[
  {
    "path": ".github/workflows/cmake.yml",
    "content": "# Heavily inspired (i.e. copy/paste) from https://gist.github.com/NickNaso/0d478f1481686d5bcc868cac06620a60\nname: CMake Build Matrix\n\n# Controls when the action will run. Triggers the workflow on push\non: \n  push:\n  pull_request:\n  release:\n    # tags:\n    # - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10\n\n# A workflow run is made up of one or more jobs that can run sequentially or in parallel\njobs:\n  # This workflow contains a single job called \"build\"\n  build:\n    # The type of runner that the job will run on\n    name: ${{ matrix.config.name }}\n    runs-on: ${{ matrix.config.os }}\n    strategy:\n      fail-fast: false\n      matrix:\n        config: \n        - {\n            name: \"Ubuntu-latest GCC NoGui\",\n            os: ubuntu-latest,\n            build_type: \"Debug\",\n            cc: \"gcc\",\n            cxx: \"g++\"\n          }\n        - {\n            name: \"Ubuntu-latest GCC Qt6\",\n            os: ubuntu-latest,\n            build_type: \"Debug\",\n            cc: \"gcc\",\n            cxx: \"g++\",\n          }\n        - {\n            name: \"Ubuntu-latest GCC Qt5\",\n            os: ubuntu-latest,\n            build_type: \"Debug\",\n            cc: \"gcc\",\n            cxx: \"g++\",\n          }\n        - {\n            name: \"Ubuntu 22.04 GCC Qt5\",\n            os: ubuntu-22.04,\n            build_type: \"Debug\",\n            cc: \"gcc\",\n            cxx: \"g++\"\n          }\n        - {\n            name: \"macOS Clang Qt6\",\n            os: macos-latest,\n            build_type: \"Debug\",\n            cc: \"clang\",\n            cxx: \"clang++\"\n          }\n        - {\n            name: \"macOS Clang Qt5\",\n            os: macos-latest,\n            build_type: \"Debug\",\n            cc: \"clang\",\n            cxx: \"clang++\"\n          }\n        - {\n            name: \"Windows MinGW Qt6\",\n            os: windows-latest,\n            build_type: \"Debug\",\n            cc: \"gcc\",\n            cxx: \"g++\"\n          }\n        - {\n            name: \"Windows MinGW Qt5\",\n            os: windows-latest,\n            build_type: \"Debug\",\n            cc: \"gcc\",\n            cxx: \"g++\"\n          }\n\n    steps:\n      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it\n      - uses: actions/checkout@v4\n\n      - name: Print env\n        run: |\n          echo github.event.action: ${{ github.event.action }}\n          echo github.event_name: ${{ github.event_name }}\n\n      - name: Install common dependencies on all Ubuntu\n        if: \"startsWith(matrix.config.name, 'Ubuntu')\"\n        run: |\n          sudo apt-get update\n          sudo apt-get install build-essential g++ git cmake ninja-build sqlite3 libsqlite3-dev cscope exuberant-ctags\n          uname -a\n          lsb_release -a\n          gcc -v && g++ -v && cmake --version && ninja --version\n\n      - name: Install dependencies on Ubuntu-latest GCC Qt6\n        if: \"startsWith(matrix.config.name, 'Ubuntu-latest GCC Qt6')\"\n        run: |\n          sudo apt-get install libglx-dev libgl1-mesa-dev libvulkan-dev libxkbcommon-dev\n          sudo apt-get install qt6-base-dev qt6-base-dev-tools qt6-tools-dev qt6-tools-dev-tools\n          sudo apt-get install libqt6core5compat6-dev qt6-l10n-tools qt6-wayland\n\n      - name: Install dependencies on Ubuntu-latest GCC Qt5\n        if: \"startsWith(matrix.config.name, 'Ubuntu-latest GCC Qt5')\"\n        run: |\n          sudo apt-get install qtcreator qtbase5-dev qt5-qmake qttools5-dev-tools qttools5-dev\n\n      - name: Install dependencies on Ubuntu 22.04 GCC Qt5\n        if: \"startsWith(matrix.config.name, 'Ubuntu 22.04 GCC Qt5')\"\n        run: |\n          sudo apt-get install qtcreator qtbase5-dev qt5-qmake qttools5-dev-tools qttools5-dev\n\n      - name: Install dependencies on macOS Clang Qt6\n        if: startsWith(matrix.config.name, 'macOS Clang Qt6')\n        run: |\n          brew install cmake ninja qt@6 sqlite cscope ctags vulkan-headers\n          clang -v\n          cmake --version\n          ninja --version\n          brew info qt@6\n\n      - name: Install dependencies on macOS Clang Qt5\n        if: startsWith(matrix.config.name, 'macOS Clang Qt5')\n        run: |\n          brew install cmake ninja qt@5 sqlite cscope ctags\n          clang -v\n          cmake --version\n          ninja --version\n          brew info qt@5\n\n      - name: Install Qt6 on Windows\n        if: startsWith(matrix.config.name, 'Windows MinGW Qt6')\n        uses: jurplel/install-qt-action@v4\n        with:\n          version: '6.9.*'\n          host: 'windows'\n          target: 'desktop'\n          arch: 'win64_mingw'\n          modules: 'qt5compat'\n          cache: 'false'\n\n      - name: Install Qt5 on Windows\n        if: startsWith(matrix.config.name, 'Windows MinGW Qt5')\n        uses: jurplel/install-qt-action@v4\n        with:\n          version: '5.15.2'\n          host: 'windows'\n          target: 'desktop'\n          arch: 'win64_mingw81'\n          cache: 'false'\n\n      - name: Install sqlite3 on Windows\n        shell: cmd\n        if: startsWith(matrix.config.name, 'Windows MinGW')\n        run: vcpkg install sqlite3:x64-windows\n\n      - name: Install ninja on Windows\n        if: startsWith(matrix.config.name, 'Windows MinGW')\n        uses: seanmiddleditch/gha-setup-ninja@master\n\n      - name: Configure CMake and Build on Ubuntu GCC Qt6\n        shell: bash\n        if: \"contains(matrix.config.name, 'Ubuntu-latest GCC Qt6')\"\n        run: |\n          export CC=gcc\n          export CXX=g++\n          cmake -G Ninja -S . -B build\n          cmake --build build\n          sudo cmake --install build\n\n      - name: Configure CMake and Build on Ubuntu GCC Qt5\n        shell: bash\n        if: \"contains(matrix.config.name, 'Ubuntu-latest GCC Qt5') || contains(matrix.config.name, 'Ubuntu 22.04 GCC Qt5')\"\n        run: |\n          export CC=gcc\n          export CXX=g++\n          cmake -G Ninja -DBUILD_QT5=ON -S . -B build\n          cmake --build build\n          sudo cmake --install build\n          \n      - name: Configure CMake and Build on Ubuntu-latest GCC NoGui\n        shell: bash\n        if: contains(matrix.config.name, 'Ubuntu-latest GCC NoGui')\n        run: |\n          export CC=gcc\n          export CXX=g++\n          cmake -G Ninja -DNO_GUI=ON -S . -B build\n          cmake --build build\n          sudo cmake --install build\n\n      - name: Configure CMake and Build on macOS Clang Qt6\n        shell: bash\n        if: contains(matrix.config.name, 'macOS Clang Qt6')\n        run: |\n          export CC=clang\n          export CXX=clang++\n          cmake -G Ninja -DCMAKE_PREFIX_PATH=/usr/local/opt/qt@6/lib/cmake -S . -B build\n          cmake --build build\n          sudo cmake --install build\n\n      - name: Configure CMake and Build on macOS Clang Qt5\n        shell: bash\n        if: contains(matrix.config.name, 'macOS Clang Qt5')\n        run: |\n          export CC=clang\n          export CXX=clang++\n          cmake -G Ninja -DBUILD_QT5=ON -DCMAKE_PREFIX_PATH=/opt/homebrew/opt/qt@5/lib/cmake -S . -B build\n          cmake --build build\n          sudo cmake --install build\n\n      - name: Configure CMake and Build on Windows MinGW Qt6\n        shell: cmd\n        if: contains(matrix.config.name, 'Windows MinGW Qt6')\n        run: call \"windows-install/qt6/buildqt6_github.bat\"\n\n      - name: Configure CMake and Build on Windows MinGW Qt5\n        shell: cmd\n        if: contains(matrix.config.name, 'Windows MinGW Qt5')\n        run: call \"windows-install/qt5/buildqt5_github.bat\"\n\n      - name: Test on Linux, MacOS\n        shell: bash\n        if: ${{ !contains(matrix.config.name, 'Windows MinGW') }}\n        run: |\n          find . -name \"*.h\" > cscope.files\n          find . -name \"*.c\" >> cscope.files\n          find . -name \"*.cpp\" >> cscope.files\n          find . -name \"*.cxx\" >> cscope.files\n          cqmakedb -v\n          cscope -cb\n          ctags --fields=+i -n -L cscope.files\n          cqmakedb -s cq.db -c cscope.out -t tags -p -d\n          cqsearch -s cq.db -p 1 -t CODEQUERY_SW_VERSION -u\n          cscope -b -f cscope1.out\n          cqmakedb -s cq1.db -c cscope1.out -t tags -p -d\n          cqsearch -s cq1.db -p 1 -t CODEQUERY_SW_VERSION -u\n\n      - name: Test on Windows Qt6\n        shell: cmd\n        if: contains(matrix.config.name, 'Windows MinGW Qt6')\n        run: call \"windows-install/qt6/testqt6_github.bat\"\n\n      - name: Test on Windows Qt5\n        shell: cmd\n        if: contains(matrix.config.name, 'Windows MinGW Qt5')\n        run: call \"windows-install/qt5/testqt5_github.bat\"\n\n      - name: Pack on Windows Qt6\n        shell: cmd\n        if: contains(matrix.config.name, 'Windows MinGW Qt6')\n        run: call \"windows-install/qt6/packqt6_github.bat\"\n\n      - name: Pack on Windows Qt5\n        shell: cmd\n        if: contains(matrix.config.name, 'Windows MinGW Qt5')\n        run: call \"windows-install/qt5/packqt5_github.bat\"\n\n"
  },
  {
    "path": ".gitignore",
    "content": "# Compiled Object files\n*.slo\n*.lo\n*.o\n\n# Compiled Dynamic libraries\n*.so\n*.dylib\n\n# Compiled Static libraries\n*.lai\n*.la\n*.a\n\n# Ignore backups\n*~\n*.bak\n\n# Ignore the following directories\nbuild/\nbuildnogui/\nbuildqt4/\nbuildqt5/\nbuildqt6/\noutput/\nOutput/\nbin/\nhtml/\n.vscode/\n\n# Ignore cscope and ctags files, and our db files\ncscope*.files\ncscope*.out\ntags\n*.db\n\n\n"
  },
  {
    "path": "CMakeLists.txt",
    "content": "#\n# CodeQuery\n# Copyright (C) 2013-2018 ruben2020 https://github.com/ruben2020/\n#\n# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not distributed with this\n# file, You can obtain one at http://mozilla.org/MPL/2.0/.\n#\n\ncmake_minimum_required(VERSION 3.16.0)\nproject(CodeQuery)\n\noption(BUILD_QT6 \"Qt6 option\"    ON)\noption(BUILD_QT5 \"Qt5 option\"    OFF)\noption(NO_GUI    \"No GUI option\" OFF)\noption(GHAWIN    \"GitHub Actions on Windows\" OFF)\n\nif (NO_GUI)\nMESSAGE(\"-- NO_GUI = \" ${NO_GUI})\nelse (NO_GUI)\n\nif (BUILD_QT5)\nmessage(\"-- BUILD_QT5 = \" ${BUILD_QT5})\nelse (BUILD_QT5)\nmessage(\"-- BUILD_QT6 = \" ${BUILD_QT6})\nendif(BUILD_QT5)\n\nendif(NO_GUI)\n\nif (GHAWIN)\nMESSAGE(\"-- GHAWIN = \" ${GHAWIN})\nelse (GHAWIN)\nendif(GHAWIN)\n\nset(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} \"${CMAKE_SOURCE_DIR}/cmakefind/\")\n\n\n# C++17 now always required\nSET( CMAKE_CXX_STANDARD 17 )\nSET( CMAKE_CXX_STANDARD_REQUIRED ON )\n\n#set(CMAKE_BUILD_TYPE Debug)\n#SET(CMAKE_C_FLAGS_DEBUG \"-g -ggdb -O0 -Wno-unused-result -Wno-return-type\")\n#SET(CMAKE_CXX_FLAGS_DEBUG \"-g -ggdb -O0 -Wno-unused-result -Wno-return-type\")\n\nIF(MSVC)\nADD_DEFINITIONS(/D _CRT_SECURE_NO_WARNINGS)\nELSE(MSVC)\nSET( CMAKE_CXX_FLAGS  \"-O2 -Wno-unused-result -Wno-return-type ${CMAKE_CXX_FLAGS}\")\nSET( CMAKE_CXX_FLAGS_DEBUG  \"-g -ggdb -O0 -Wno-unused-result -Wno-return-type ${CMAKE_CXX_FLAGS_DEBUG}\" )\nSET( CMAKE_CXX_FLAGS_RELEASE  \"-O2 -Wno-unused-result -Wno-return-type ${CMAKE_CXX_FLAGS_RELEASE}\" )\nENDIF(MSVC)\n\n\nset( EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR} )\n\n\nadd_subdirectory( \"querylib\" )\nadd_subdirectory( \"makedb\" )\nadd_subdirectory( \"cli\" )\n\nif (NO_GUI)\nelse (NO_GUI)\nadd_subdirectory( \"lexilla\" )\nadd_subdirectory( \"scintilla/qt/ScintillaEdit\" )\nadd_subdirectory( \"showgraph\" )\nadd_subdirectory( \"gui\" )\nendif (NO_GUI)\n"
  },
  {
    "path": "LICENSE.md",
    "content": "Mozilla Public License Version 2.0\n==================================\n\n### 1. Definitions\n\n**1.1. “Contributor”**  \n    means each individual or legal entity that creates, contributes to\n    the creation of, or owns Covered Software.\n\n**1.2. “Contributor Version”**  \n    means the combination of the Contributions of others (if any) used\n    by a Contributor and that particular Contributor's Contribution.\n\n**1.3. “Contribution”**  \n    means Covered Software of a particular Contributor.\n\n**1.4. “Covered Software”**  \n    means Source Code Form to which the initial Contributor has attached\n    the notice in Exhibit A, the Executable Form of such Source Code\n    Form, and Modifications of such Source Code Form, in each case\n    including portions thereof.\n\n**1.5. “Incompatible With Secondary Licenses”**  \n    means\n\n* **(a)** that the initial Contributor has attached the notice described\n    in Exhibit B to the Covered Software; or\n* **(b)** that the Covered Software was made available under the terms of\n    version 1.1 or earlier of the License, but not also under the\n    terms of a Secondary License.\n\n**1.6. “Executable Form”**  \n    means any form of the work other than Source Code Form.\n\n**1.7. “Larger Work”**  \n    means a work that combines Covered Software with other material, in \n    a separate file or files, that is not Covered Software.\n\n**1.8. “License”**  \n    means this document.\n\n**1.9. “Licensable”**  \n    means having the right to grant, to the maximum extent possible,\n    whether at the time of the initial grant or subsequently, any and\n    all of the rights conveyed by this License.\n\n**1.10. “Modifications”**  \n    means any of the following:\n\n* **(a)** any file in Source Code Form that results from an addition to,\n    deletion from, or modification of the contents of Covered\n    Software; or\n* **(b)** any new file in Source Code Form that contains any Covered\n    Software.\n\n**1.11. “Patent Claims” of a Contributor**  \n    means any patent claim(s), including without limitation, method,\n    process, and apparatus claims, in any patent Licensable by such\n    Contributor that would be infringed, but for the grant of the\n    License, by the making, using, selling, offering for sale, having\n    made, import, or transfer of either its Contributions or its\n    Contributor Version.\n\n**1.12. “Secondary License”**  \n    means either the GNU General Public License, Version 2.0, the GNU\n    Lesser General Public License, Version 2.1, the GNU Affero General\n    Public License, Version 3.0, or any later versions of those\n    licenses.\n\n**1.13. “Source Code Form”**  \n    means the form of the work preferred for making modifications.\n\n**1.14. “You” (or “Your”)**  \n    means an individual or a legal entity exercising rights under this\n    License. For legal entities, “You” includes any entity that\n    controls, is controlled by, or is under common control with You. For\n    purposes of this definition, “control” means **(a)** the power, direct\n    or indirect, to cause the direction or management of such entity,\n    whether by contract or otherwise, or **(b)** ownership of more than\n    fifty percent (50%) of the outstanding shares or beneficial\n    ownership of such entity.\n\n\n### 2. License Grants and Conditions\n\n#### 2.1. Grants\n\nEach Contributor hereby grants You a world-wide, royalty-free,\nnon-exclusive license:\n\n* **(a)** under intellectual property rights (other than patent or trademark)\n    Licensable by such Contributor to use, reproduce, make available,\n    modify, display, perform, distribute, and otherwise exploit its\n    Contributions, either on an unmodified basis, with Modifications, or\n    as part of a Larger Work; and\n* **(b)** under Patent Claims of such Contributor to make, use, sell, offer\n    for sale, have made, import, and otherwise transfer either its\n    Contributions or its Contributor Version.\n\n#### 2.2. Effective Date\n\nThe licenses granted in Section 2.1 with respect to any Contribution\nbecome effective for each Contribution on the date the Contributor first\ndistributes such Contribution.\n\n#### 2.3. Limitations on Grant Scope\n\nThe licenses granted in this Section 2 are the only rights granted under\nthis License. No additional rights or licenses will be implied from the\ndistribution or licensing of Covered Software under this License.\nNotwithstanding Section 2.1(b) above, no patent license is granted by a\nContributor:\n\n* **(a)** for any code that a Contributor has removed from Covered Software;\n    or\n* **(b)** for infringements caused by: **(i)** Your and any other third party's\n    modifications of Covered Software, or **(ii)** the combination of its\n    Contributions with other software (except as part of its Contributor\n    Version); or\n* **(c)** under Patent Claims infringed by Covered Software in the absence of\n    its Contributions.\n\nThis License does not grant any rights in the trademarks, service marks,\nor logos of any Contributor (except as may be necessary to comply with\nthe notice requirements in Section 3.4).\n\n#### 2.4. Subsequent Licenses\n\nNo Contributor makes additional grants as a result of Your choice to\ndistribute the Covered Software under a subsequent version of this\nLicense (see Section 10.2) or under the terms of a Secondary License (if\npermitted under the terms of Section 3.3).\n\n#### 2.5. Representation\n\nEach Contributor represents that the Contributor believes its\nContributions are its original creation(s) or it has sufficient rights\nto grant the rights to its Contributions conveyed by this License.\n\n#### 2.6. Fair Use\n\nThis License is not intended to limit any rights You have under\napplicable copyright doctrines of fair use, fair dealing, or other\nequivalents.\n\n#### 2.7. Conditions\n\nSections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted\nin Section 2.1.\n\n\n### 3. Responsibilities\n\n#### 3.1. Distribution of Source Form\n\nAll distribution of Covered Software in Source Code Form, including any\nModifications that You create or to which You contribute, must be under\nthe terms of this License. You must inform recipients that the Source\nCode Form of the Covered Software is governed by the terms of this\nLicense, and how they can obtain a copy of this License. You may not\nattempt to alter or restrict the recipients' rights in the Source Code\nForm.\n\n#### 3.2. Distribution of Executable Form\n\nIf You distribute Covered Software in Executable Form then:\n\n* **(a)** such Covered Software must also be made available in Source Code\n    Form, as described in Section 3.1, and You must inform recipients of\n    the Executable Form how they can obtain a copy of such Source Code\n    Form by reasonable means in a timely manner, at a charge no more\n    than the cost of distribution to the recipient; and\n\n* **(b)** You may distribute such Executable Form under the terms of this\n    License, or sublicense it under different terms, provided that the\n    license for the Executable Form does not attempt to limit or alter\n    the recipients' rights in the Source Code Form under this License.\n\n#### 3.3. Distribution of a Larger Work\n\nYou may create and distribute a Larger Work under terms of Your choice,\nprovided that You also comply with the requirements of this License for\nthe Covered Software. If the Larger Work is a combination of Covered\nSoftware with a work governed by one or more Secondary Licenses, and the\nCovered Software is not Incompatible With Secondary Licenses, this\nLicense permits You to additionally distribute such Covered Software\nunder the terms of such Secondary License(s), so that the recipient of\nthe Larger Work may, at their option, further distribute the Covered\nSoftware under the terms of either this License or such Secondary\nLicense(s).\n\n#### 3.4. Notices\n\nYou may not remove or alter the substance of any license notices\n(including copyright notices, patent notices, disclaimers of warranty,\nor limitations of liability) contained within the Source Code Form of\nthe Covered Software, except that You may alter any license notices to\nthe extent required to remedy known factual inaccuracies.\n\n#### 3.5. Application of Additional Terms\n\nYou may choose to offer, and to charge a fee for, warranty, support,\nindemnity or liability obligations to one or more recipients of Covered\nSoftware. However, You may do so only on Your own behalf, and not on\nbehalf of any Contributor. You must make it absolutely clear that any\nsuch warranty, support, indemnity, or liability obligation is offered by\nYou alone, and You hereby agree to indemnify every Contributor for any\nliability incurred by such Contributor as a result of warranty, support,\nindemnity or liability terms You offer. You may include additional\ndisclaimers of warranty and limitations of liability specific to any\njurisdiction.\n\n\n### 4. Inability to Comply Due to Statute or Regulation\n\nIf it is impossible for You to comply with any of the terms of this\nLicense with respect to some or all of the Covered Software due to\nstatute, judicial order, or regulation then You must: **(a)** comply with\nthe terms of this License to the maximum extent possible; and **(b)**\ndescribe the limitations and the code they affect. Such description must\nbe placed in a text file included with all distributions of the Covered\nSoftware under this License. Except to the extent prohibited by statute\nor regulation, such description must be sufficiently detailed for a\nrecipient of ordinary skill to be able to understand it.\n\n\n### 5. Termination\n\n**5.1.** The rights granted under this License will terminate automatically\nif You fail to comply with any of its terms. However, if You become\ncompliant, then the rights granted under this License from a particular\nContributor are reinstated **(a)** provisionally, unless and until such\nContributor explicitly and finally terminates Your grants, and **(b)** on an\nongoing basis, if such Contributor fails to notify You of the\nnon-compliance by some reasonable means prior to 60 days after You have\ncome back into compliance. Moreover, Your grants from a particular\nContributor are reinstated on an ongoing basis if such Contributor\nnotifies You of the non-compliance by some reasonable means, this is the\nfirst time You have received notice of non-compliance with this License\nfrom such Contributor, and You become compliant prior to 30 days after\nYour receipt of the notice.\n\n**5.2.** If You initiate litigation against any entity by asserting a patent\ninfringement claim (excluding declaratory judgment actions,\ncounter-claims, and cross-claims) alleging that a Contributor Version\ndirectly or indirectly infringes any patent, then the rights granted to\nYou by any and all Contributors for the Covered Software under Section\n2.1 of this License shall terminate.\n\n**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all\nend user license agreements (excluding distributors and resellers) which\nhave been validly granted by You or Your distributors under this License\nprior to termination shall survive termination.\n\n\n### 6. Disclaimer of Warranty\n\n> Covered Software is provided under this License on an “as is”\n> basis, without warranty of any kind, either expressed, implied, or\n> statutory, including, without limitation, warranties that the\n> Covered Software is free of defects, merchantable, fit for a\n> particular purpose or non-infringing. The entire risk as to the\n> quality and performance of the Covered Software is with You.\n> Should any Covered Software prove defective in any respect, You\n> (not any Contributor) assume the cost of any necessary servicing,\n> repair, or correction. This disclaimer of warranty constitutes an\n> essential part of this License. No use of any Covered Software is\n> authorized under this License except under this disclaimer.\n\n### 7. Limitation of Liability\n\n> Under no circumstances and under no legal theory, whether tort\n> (including negligence), contract, or otherwise, shall any\n> Contributor, or anyone who distributes Covered Software as\n> permitted above, be liable to You for any direct, indirect,\n> special, incidental, or consequential damages of any character\n> including, without limitation, damages for lost profits, loss of\n> goodwill, work stoppage, computer failure or malfunction, or any\n> and all other commercial damages or losses, even if such party\n> shall have been informed of the possibility of such damages. This\n> limitation of liability shall not apply to liability for death or\n> personal injury resulting from such party's negligence to the\n> extent applicable law prohibits such limitation. Some\n> jurisdictions do not allow the exclusion or limitation of\n> incidental or consequential damages, so this exclusion and\n> limitation may not apply to You.\n\n\n### 8. Litigation\n\nAny litigation relating to this License may be brought only in the\ncourts of a jurisdiction where the defendant maintains its principal\nplace of business and such litigation shall be governed by laws of that\njurisdiction, without reference to its conflict-of-law provisions.\nNothing in this Section shall prevent a party's ability to bring\ncross-claims or counter-claims.\n\n\n### 9. Miscellaneous\n\nThis License represents the complete agreement concerning the subject\nmatter hereof. If any provision of this License is held to be\nunenforceable, such provision shall be reformed only to the extent\nnecessary to make it enforceable. Any law or regulation which provides\nthat the language of a contract shall be construed against the drafter\nshall not be used to construe this License against a Contributor.\n\n\n### 10. Versions of the License\n\n#### 10.1. New Versions\n\nMozilla Foundation is the license steward. Except as provided in Section\n10.3, no one other than the license steward has the right to modify or\npublish new versions of this License. Each version will be given a\ndistinguishing version number.\n\n#### 10.2. Effect of New Versions\n\nYou may distribute the Covered Software under the terms of the version\nof the License under which You originally received the Covered Software,\nor under the terms of any subsequent version published by the license\nsteward.\n\n#### 10.3. Modified Versions\n\nIf you create software not governed by this License, and you want to\ncreate a new license for such software, you may create and use a\nmodified version of this License if you rename the license and remove\nany references to the name of the license steward (except to note that\nsuch modified license differs from this License).\n\n#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses\n\nIf You choose to distribute Source Code Form that is Incompatible With\nSecondary Licenses under the terms of this version of the License, the\nnotice described in Exhibit B of this License must be attached.\n\n## Exhibit A - Source Code Form License Notice\n\n    This Source Code Form is subject to the terms of the Mozilla Public\n    License, v. 2.0. If a copy of the MPL was not distributed with this\n    file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\nIf it is not possible or desirable to put the notice in a particular\nfile, then You may include the notice in a location (such as a LICENSE\nfile in a relevant directory) where a recipient would be likely to look\nfor such a notice.\n\nYou may add additional accurate notices of copyright ownership.\n\n## Exhibit B - “Incompatible With Secondary Licenses” Notice\n\n    This Source Code Form is \"Incompatible With Secondary Licenses\", as\n    defined by the Mozilla Public License, v. 2.0.\n\n\n"
  },
  {
    "path": "NEWS.md",
    "content": "Changelog\n=========\n\nVersion 1.0.1 - July 14, 2025\n-----------------------------\nMinor code changes to avoid compilation errors with certain versions of the dependent libraries          \nAdded THIRDPARTY.md file to provide info on third party dependencies\n\nVersion 1.0.0 - May 24, 2024\n-----------------------------\nEnhancement: Migrated to Qt6, which is now the default build option           \nEnhancement: Updated Scintilla to 5.5.0          \nQt5 and NO_GUI remain additional build options           \nQt4 and 32-bit Windows support removed\n\nVersion 0.27.0 - Jan 25, 2024\n-----------------------------\nEnhancement: Compressed cscope.out (built without -c) supported experimentally          \nEnhancement: CodeQuery database file can be opened by CodeQuery GUI through command line argument\n\nVersion 0.26.0 - Dec 19, 2022\n-----------------------------\nBugfix: File path label with too large contents extending window beyond viewport GUI bug fixed          \nEnhancement: Default external editor configuration for MacOS added\n\nVersion 0.25.0 - Apr 17, 2022\n-----------------------------\nEnhancement: Workaround for pycscope trailer start offset bug running on Python 3.8         \nEnhancement: Updated Scintilla to 3.21.1        \nEnhancement: Removed warnings for Qt 5.15         \nEnhancement: Windows installer now includes Qt 5.15.2 and sqlite 3.38.2 binaries       \nEnhancement: Moved from Travis CI to Github Actions (for Linux, MacOS and Windows builds)        \n\nVersion 0.24.0 - Jan 17, 2021\n-----------------------------\nEnhancement: Improved German translation for CodeQuery GUI, contributed by stweise       \n\nVersion 0.23.0 - Apr 15, 2020\n-----------------------------\nThe CMake build directory is now moveable and renameable, which is useful for Debian source package creation      \n\nVersion 0.22.0 - Apr 12, 2020\n-----------------------------\nEnhancement: Added build option for no GUI      \nEnhancement: Updated Scintilla to 3.11.2      \nEnhancement: Performance improvement by using QString instead of STL String for search through GUI      \nEnhancement: Added ability to general call function and class inheritance graph through cqsearch CLI      \nEnhancement: Added ability to filter by path added to cqsearch CLI      \nEnhancement: Changing query type on the GUI dropbox will start a search immediately      \nEnhancement: Clicking on a line in the GUI file viewer, will now highlight the appropriate function in the function list      \nEnhancement: Now Qt5 becomes the default build option in CMakeLists.txt     \nEnhancement: Windows installer changed from InnoSetup to Wix Toolset, to generate MSI installer     \nEnhancement: Now Windows installer will be in two versions: Qt5, 64-bit or Qt4, 32-bit     \nBugfix: Default font selection for GUI file viewer, instead of becoming empty     \nBugfix: Improved annotation accuracy in GUI     \nBugfix: Improved brace highlighting in GUI     \nBugfix: Fixed the bug where function list next to GUI file viewer doesn't work properly for grep     \n\nVersion 0.21.1 - Sept 16, 2018\n------------------------------\nFixed a build error due to new version of Qt5 (5.11)    \n\nVersion 0.21.0 - Apr 30, 2017\n-----------------------------\nFixes in the ctags file parser     \n\"List of files\" button added to the GUI     \nImproved \"full path for file\" results list in GUI      \n\nVersion 0.20.0 - Apr 9, 2017\n----------------------------\nMajor bug fix for a performance issue in the GUI, wrt clearing of the search results list    \nOther minor bug fixes    \n\nVersion 0.19.0 - Apr 2, 2017\n----------------------------\nMigrated from GPLv2 to MPLv2 because of incompatibility with Qt5's license    \nNow officially supporting Qt5 for Linux and Mac, but Qt4 for Windows    \nReplaced QScintilla (by Riverbank Computing) with Scintilla (by Neil Hodgson), to avoid GPLv3    \nUnicode UTF-8 files now viewable on CodeQuery GUI    \nSource code preview text line length now unlimited in database    \nCodeQuery CLI now has feature to change the source code preview text line truncation length    \nGolang syntax highlighting added    \nTravis script now also builds with clang and Qt5 for Mac build testing    \nFixed a build bug in CMake scripts for Arch Linux    \nDebian and tarball packages would now be separated into Qt5 and Qt4    \n\nVersion 0.18.0 - Oct 9, 2016\n----------------------------\nMigrated from GPLv3 to GPLv2 because some companies ban GPLv3 software    \nList of functions in the file viewer area is a major new feature    \nNow the selection of one or two levels has been added for function call graphs    \nReplaced Dipperstein's optlist with Sittler's getopt replacement (MIT licensed), to avoid LGPLv3    \nUpdated showgraph (now BSD licensed), with rebase from the git repo    \nVarious bug fixes for the file viewer    \n\nVersion 0.17.0 - Sept 25, 2016\n------------------------------\nNow Javascript is officially supported through starscope    \nThe full file path option is added to the command-line version of the tool for vim support    \nHOWTO documentation updated for compatibility with Mac OS    \nCodeQuery now officially built using Qt5 for Mac OS, but still in Qt4 for Windows and Linux    \nTravis script updated to include Coverity scanning    \n\nVersion 0.16.0 - May 2, 2015\n----------------------------\nBrace matching on the file viewer    \nBetter handling for current line highlight    \nAnnotation in file viewer to quickly and easily identify the selected item    \nChanged version to the semantic versioning scheme MAJOR.MINOR.PATCH    \nQt4 (default) and Qt5 now supported by CMake build option    \n\nVersion 0.15 - Aug 12, 2014\n---------------------------\nAdded support for Mac OS    \nAllowed -q in cscope.out header    \nAdded info to HOWTOs on how to exclude standard include paths    \n\nVersion 0.14 - Mar 9, 2014\n--------------------------\nFixed Java and Ruby syntax highlight bug    \nFixed bug where database file combobox becomes too large due to very long filename    \n\nVersion 0.13 - Mar 1, 2014\n--------------------------\nGrep feature added    \nLast search history stored persistently    \n\nVersion 0.12 - Feb 23, 2014\n---------------------------\nQScintilla used for code editing widget    \nImported a number of syntax highlight themes from Notepad++    \nRuby and Go now officially supported through starscope    \nRPM packages will now be generated also    \n\nVersion 0.11 - Dec 31, 2013\n---------------------------\nFile path filter    \nNew query type: Calls of this function    \nSearch results traversing within same file    \nImprovements on graph's initial size and zoom    \nBug fix on external editor settings text    \n\nVersion 0.10 - Aug 10, 2013\n---------------------------\nctags file processing optimization    \nNew GUI features: Header files only, Functions inside this file, new About box    \nNew GUI features: Ability to change file viewer font and tab space width    \nAutocomplete made asynchronous and optimized    \n\nVersion 0.09 - Apr 20, 2013\n---------------------------\nFixed some cscope.out parser and SQL handling bugs    \nAdded font resize buttons for file viewer    \n\nVersion 0.08 - Apr 14, 2013\n---------------------------\nFixed Windows app icon and taskbar bugs    \n\nVersion 0.07 - Apr 13, 2013\n---------------------------\nAdded ability to parse cscope.out generated by pycscope (for Python support)    \nAdded syntax highlighting for Python and Java    \nFile path can now be selected and copied in the GUI tool    \n\nVersion 0.06 - Feb 27, 2013\n---------------------------\nFixed syntax highlight bug, added user warning if CQ database is older than viewed source file,    \nremoved the extra console window appearing alongside the GUI app in Windows    \n\nVersion 0.05 - Feb 25, 2013\n---------------------------\nFixed file path bug in Windows and initial version of cqsearch CLI tool    \n\nVersion 0.04 - Feb 24, 2013\n---------------------------\nInitial version of visualization for function call graph and class inheritance is now working.    \n\nVersion 0.03 - Feb 22, 2013\n---------------------------\nAdded wildcard search * and ?. Added previous and next history browsing for search.    \n\nVersion 0.02 - Feb 19, 2013\n---------------------------\nFixed external editor file path recognition bug for Windows    \n(could not recognize spaces e.g. C:\\Program Files).    \n\nVersion 0.01 - Feb 18, 2013\n---------------------------\nInitial release    \n\n"
  },
  {
    "path": "README.md",
    "content": "![CodeQuery](doc/logotitle.png)\n===============================\n\nThis is a tool to index, then query or search C, C++, Java, Python, Ruby, Go and Javascript source code.\n\nIt builds upon the databases of [cscope](http://cscope.sourceforge.net/) and [Exuberant ctags](http://ctags.sourceforge.net/). It can also work with [Universal ctags](https://github.com/universal-ctags/ctags/), which is a drop-in replacement for Exuberant ctags.\n\nThe databases of *cscope* and *ctags* would be processed by the *cqmakedb* tool to generate the CodeQuery database file.\n\nThe CodeQuery database file can be viewed and queried using the *codequery* GUI tool.\n\n[![Build Status](https://github.com/ruben2020/codequery/actions/workflows/cmake.yml/badge.svg?branch=master)](https://github.com/ruben2020/codequery/actions)        [![Coverity Status](https://scan.coverity.com/projects/10066/badge.svg)](https://scan.coverity.com/projects/ruben2020-codequery)\n      \n\n## Latest version = 1.0.1\n\nWindows binaries available here for download: [CodeQuery@sourceforge downloads](https://sourceforge.net/projects/codequery/files/)\n\nOn Debian and Ubuntu Linux, the software can be installed using `apt-get install codequery`.\n\nTo build on Linux, please read the [INSTALL-LINUX](doc/INSTALL-LINUX.md) file.\n\nOn Mac, the software can be installed through [Brew](http://brew.sh/) using `brew install codequery`.\n\nPlease read [NEWS](NEWS.md) to find out more.\n\n\n## How is it different from cscope and ctags? What are the advantages?\n\nBoth cscope and ctags can do symbol lookup and identify functions, macros, classes and structs.\n\ncscope is very C-centric, but is fuzzy enough to cover C++ and Java, but not very well for e.g. it doesn't understand destructors and class member instantiations. It can't provide relationships of class inheritance and membership. cscope can do \"functions that call this function\" and \"functions called by this function\". This is a very powerful feature that makes cscope stand out among comparable tools.\n\nctags does many languages well and understands destructors, member instantiations, and the relationships of class membership and inheritance. From ctags, we can find out \"members and methods of this class\", \"class which owns this member or method\", \"parent of this class\", \"child of this class\" etc. However, it doesn't do \"functions that call this function\" or \"functions called by this function\".\n\nSo both these tools have their pros and cons, but complement each other.\n\nCodeQuery is a project that attempts to combine the features available from both cscope and ctags, provide faster database access compared to cscope (because it uses sqlite) and provides a nice GUI tool as well. Due to this faster database access, fast auto-completion of search terms and multiple complex queries to perform visualization is possible.\n\nIn addition, [pycscope](https://github.com/portante/pycscope) is used to add support for Python, in place of cscope.\n\nIn addition, [starscope](https://github.com/eapache/starscope) is used to add support for Ruby, Go and Javascript, in place of cscope.\n\n\n## What features does CodeQuery have?\n\n* Combines the best of both cscope and ctags\n* Faster due to the use of sqlite for the CodeQuery database\n* Cross-platform GUI tool\n* Fast auto-completion of search term\n* Case-insensitive, partial keyword search - wildcard search supported * and ?\n* Exact match search\n* Filter search results by file path\n* File viewer with syntax highlighting, for UTF-8 encoded source files\n* Ability to open viewed file in an external editor or IDE\n* Visualization of function call graph and class inheritance based on search term\n* Visualization graphs can be saved to PNG or Graphviz DOT files\n\n\n## What types of query can I make?\n\n* Symbol\n* Function or macro definition\n* Class or struct\n* Functions calling this function\n* Functions called by this function\n* Calls of this function or macro\n* Class which owns this member or method\n* Members and methods of this class\n* Parent of this class (inheritance)\n* Children of this class (inheritance)\n* Files including this file\n* Full path for file\n* Functions and macros inside this file\n* Grep\n\n\n## What does it look like?\n\n![CodeQuery screenshot](doc/screenshot.png)\n\n\n## How does the visualization look like?\n\nHere's a function call graph based on the search term of \"updateFilePathLabel\". A -> B means A calls B:    \n![Visualization screenshot](doc/screenshot2.png)\n\n\n## Are other editors like vim or emacs or Visual Studio Code supported?\n\nYes!\n\nThere is a vim plugin for CodeQuery called [vim-codequery](https://github.com/devjoe/vim-codequery) by [devjoe](https://github.com/devjoe).\n\nThere is a Visual Studio Code extension for CodeQuery called [codequery4vscode](https://github.com/ruben2020/codequery4vscode) by [ruben2020](https://github.com/ruben2020). The Visual Studio Code Extension Marketplace page for this extension is [ruben2020.codequery4vscode](https://marketplace.visualstudio.com/items?itemName=ruben2020.codequery4vscode).\n\nWe welcome contributors to develop plugins for other editors too.\n\n\n## What does it cost? How is it licensed?\n\nIt's freeware and free open source software.\n\nThis software is licensed under the [Mozilla Public License, version 2.0 (MPL-2.0)](https://www.mozilla.org/en-US/MPL/2.0/). See [LICENSE.md](LICENSE.md) or [LICENSE.txt](windows-install/wincommon/LICENSE.txt). This applies to both the distributed Source Code Form and the distributed Executable Form of the software.\n\nTo understand the MPL-2.0 license, please read the [MPL-2.0 FAQ by mozilla.org](https://www.mozilla.org/en-US/MPL/2.0/FAQ/).\n\nFiles under the `querylib` directory are licensed under the [MIT license](http://opensource.org/licenses/MIT). See [QueryLib README](querylib/README.txt). This is a library to query CodeQuery database files. This library is MIT-licensed, so that it may be used to create plugins for editors, IDEs and other software without restrictions. It's only dependency is on sqlite3.\n\nThird party software attribution can be found in [THIRDPARTY.md](THIRDPARTY.md).\n\n## Can I use it in a commercial environment without purchasing, for an unlimited time?\n\nYes. However, donations are welcomed.\n\n\n## Which platforms are supported?\n\nIt has been tested on Windows 10 64-bit, Mac OS X, Ubuntu and Arch Linux 64-bit.\n\nContributions are welcomed to attempt ports to other operating systems.\n\n\n## Is the software available in other languages?\n\nYes. This applies only to the GUI tool.\n\nContributions are welcomed to update or provide new translations.\n\n\n## How to install it?\n\nOn Windows, EXE setup packages will be provided here: [CodeQuery@sourceforge downloads](https://sourceforge.net/projects/codequery/files/). The EXE setup package shall also contain cscope.exe, ctags.exe and the required DLLs. So, everything you need is in one package. However, [pycscope](https://github.com/portante/pycscope) (optional - only for Python) and [starscope](https://github.com/eapache/starscope) (optional - only for Ruby, Go and Javascript) are not bundled together with this setup package and need to be installed separately.\n\nOn Debian and Ubuntu Linux, the software can be installed using `apt-get install codequery`.\n\nOn Mac, the software can be installed through [Brew](http://brew.sh/) using `brew install codequery`.\n\nTo build on Linux and Mac, please read the [INSTALL-LINUX](doc/INSTALL-LINUX.md) file.\n\nVersion 15.8a of [cscope](http://cscope.sourceforge.net/) or higher, works best with CodeQuery.\n\n\n## How do I use it?\n\nOn Windows: [HOWTO-WINDOWS](windows-install/wincommon/HOWTO-WINDOWS.txt). This file is included in the EXE setup package.\n\nOn Linux and Mac: [HOWTO-LINUX](doc/HOWTO-LINUX.md)\n\nPlease read the HOWTO file provided for each platform. The workflow looks like this:\n![CodeQuery workflow](doc/workflow.png)\n\n\n## How do I generate whole-program call graphs or UML class diagrams?\n\nCodeQuery cannot do this at the moment.\n\nTo generate whole-program call graphs, please use [GNU cflow](https://www.gnu.org/software/cflow/) or [CodeViz](https://github.com/petersenna/codeviz) for C and C++. For Java, there is [Javashot](http://code.google.com/p/javashot/). \n\nTo generate whole-program UML class diagrams for various object-oriented languages, please use [tags2uml](https://github.com/ruben2020/tags2uml). \n\n\n## Are there any known limitations?\n\nFor C and C++, [inline assembly code](http://en.wikipedia.org/wiki/Inline_assembler) is not supported by all the tools. This mainly affects embedded software, OS and driver code.\n\nPlease exclude files with inline assembly code from the list of files (cscope.files) to be scanned.\n\n\n## How do I contact the authors for support, issues, bug reports, fix patches, feature requests etc.?\n\nPlease see the email address below, and also the Issues tab in GitHub.\n\nEmail address:    \n![Contact address](doc/emailaddr.png)\n\nWebsite: [CodeQuery website](https://github.com/ruben2020/codequery)\n\n\n## How can I contribute?\n\n* Report bugs\n* Provide feedback, new ideas, suggestions etc. What would you like to see?\n* Tell your friends, recommend it on StackOverflow or social media\n* Fix bugs (see Issues tab)\n* Update translations (Deutsch, Francais, Japanese etc.)\n* Port to other platforms\n* Write plugins for emacs, eclipse, Notepad++, NetBeans, Jenkins etc.\n* Add support for other languages e.g. Objective-C, Swift\n\n\n## List of Contributors\n\n[ruben2020](https://github.com/ruben2020)    \n[naseer](https://github.com/naseer)    \n[bruno-](https://github.com/bruno-)    \n[devjoe](https://github.com/devjoe)    \n[jonashaag](https://github.com/jonashaag)    \n[ilovezfs](https://github.com/ilovezfs)    \n[JCount](https://github.com/JCount)    \n[brianonn](https://github.com/brianonn)    \n[teungri](https://github.com/teungri)    \n[stweise](https://github.com/stweise)    \n(More welcomed)\n\n\n## Credits\n\nWe thank the people behind the following projects:    \n[cscope](http://cscope.sourceforge.net/) - our database is derived from this   \n[Exuberant ctags](http://ctags.sourceforge.net/)- our database is derived from this   \n[Universal ctags](https://github.com/universal-ctags/ctags/) - drop-in replacement for Exuberant ctags    \n[pycscope](https://github.com/portante/pycscope) - our database (for Python) is derived from this    \n[starscope](https://github.com/eapache/starscope) - our database (for Ruby, Go and Javascript) is derived from this    \n[sqlite3](http://www.sqlite.org/) - our database is using this format    \n[CMake](http://www.cmake.org/) - cross-platform build toolchain for CodeQuery    \n[Qt open source](http://qt-project.org/) - GUI toolkit used to build CodeQuery    \n[showgraph](http://code.google.com/p/showgraph/) - visualization done using this library    \n[scintilla](http://www.scintilla.org/) - our code editing widget    \n[vim-codequery](https://github.com/devjoe/vim-codequery) - vim plugin for CodeQuery    \n[Axialis](http://www.axialis.com/iconworkshop) - free images for CodeQuery and this website    \n[brew](http://brew.sh/) - binaries for Mac here    \n\n\n"
  },
  {
    "path": "THIRDPARTY.md",
    "content": "Third Party Software\n====================\n\nBoth the source and binary distributions of this software are linked to some \nthird party software. All the third party software included or linked is \nredistributed under the terms and conditions of their original licenses.\nThese licenses are compatible with the license of this software, \nfor the purposes they are being used.\n\nThe following list provides attribution for these third party software\nin accordance with the conditions of their licenses.\n\nQt6 open source\n---------------\nTitle: Qt 6.x     \nAuthor: The Qt Company Ltd. and other contributors.     \nSource: https://www.qt.io/download-open-source     \nLicense: LGPL-3.0-only     \nLicense file: https://doc.qt.io/qt-6/lgpl.html     \nLinking method: Dynamic linking       \nDistribution method: Distributed together with CodeQuery for Windows\n\nScintilla\n---------\nTitle: Scintilla 5.5.x     \nAuthor: Neil Hodgson     \nSource: https://www.scintilla.org/     \nLicense: ISC-like license     \nLicense file: [scintilla/License.txt](scintilla/License.txt)       \nLinking method: Static linking       \nDistribution method: Included in CodeQuery binaries\n\nLexilla\n-------\nTitle: Lexilla 5.3.x     \nAuthor: Neil Hodgson     \nSource: https://www.scintilla.org/     \nLicense: ISC-like license     \nLicense file: [lexilla/License.txt](lexilla/License.txt)       \nLinking method: Static linking         \nDistribution method: Included in CodeQuery binaries\n\nSQLite\n-------\nTitle: SQLite 3.x     \nAuthor: D. Richard Hipp, Dan Kennedy, Joe Mistachkin     \nSource: https://www.sqlite.org/     \nLicense: Public domain     \nLicense file: https://www.sqlite.org/copyright.html     \nLinking method: Dynamic linking         \nDistribution method: Distributed together with CodeQuery for Windows\n\ngetopt2\n-------\nTitle: getopt2     \nAuthor: Russ Allbery, Benjamin Sittler     \nSource: (unknown)     \nLicense: MIT      \nLicense file: [querylib/getopt2.h](querylib/getopt2.h)     \nLinking method: Static linking       \nDistribution method: Included in CodeQuery binaries\n\nwinmain.cpp from gosu project\n-----------------------------\nTitle: WinMain.cpp (gosu)      \nAuthor: Julian Raschke, Jan Lücker, cyberarm, and all       \nSource: https://github.com/gosu/gosu/blob/master/src/WinMain.cpp       \nLicense: MIT      \nLicense file: [gui/winmain.cpp](gui/winmain.cpp)       \nLinking method: Static linking       \nDistribution method: Included in CodeQuery binaries for Windows\n\nshowgraph\n---------\nTitle: showgraph     \nAuthor: Boris Shurygin     \nSource: https://github.com/boris-shurygin/showgraph     \nLicense: BSD-3-Clause     \nLicense file: [showgraph/LICENSE.txt](showgraph/LICENSE.txt)      \nLinking method: Static linking         \nDistribution method: Included in CodeQuery binaries\n\nAxialis\n-------\nTitle: Axialis Free Icons     \nAuthor: Axialis Software SA     \nSource: https://www.axialis.com/free/icons/     \nLicense: CC BY-ND 4.0     \nLicense file: https://www.axialis.com/icons/license.html#free       \nDistribution method: Icon images used in the GUI app\n\ncscope\n------\nTitle: cscope 15.8a     \nAuthor: Santa Cruz Operation Inc.     \nSource: https://cscope.sourceforge.net/      \nLicense: BSD-3-Clause     \nLicense file: https://cscope.sourceforge.net/license.html        \nDistribution method: Distributed together with CodeQuery for Windows\n\nctags\n-----\nTitle: ctags 5.8      \nAuthor: Darren Hiebert       \nSource: https://ctags.sourceforge.net/       \nLicense: GPL-2.0-only        \nLicense file: https://sourceforge.net/projects/ctags/         \nDistribution method: Distributed together with CodeQuery for Windows\n\nWix Toolset\n-----------\nTitle: Wix Toolset     \nAuthor: .NET Foundation and contributors     \nSource: https://github.com/wixtoolset/web      \nLicense: MS-RL      \nLicense file: https://github.com/wixtoolset/web/blob/master/LICENSE.TXT         \nDistribution method: Used to create the Windows installer for CodeQuery\n"
  },
  {
    "path": "cli/CMakeLists.txt",
    "content": "#\n# CodeQuery\n# Copyright (C) 2013-2018 ruben2020 https://github.com/ruben2020/\n#\n# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not distributed with this\n# file, You can obtain one at http://mozilla.org/MPL/2.0/.\n#\n\ncmake_minimum_required(VERSION 3.16.0)\nproject(CodeQueryCLI)\n\n#add_definitions( -Wall )\n\nfind_package(Sqlite REQUIRED)\n\ninclude_directories( \".\" )\ninclude_directories( \"../makedb\" )\ninclude_directories( \"../querylib\" )\ninclude_directories( \"${SQLITE_INCLUDE_DIR}\" )\n\nset( CQSEARCH_SRCS\n     main_cli.cpp\n   )\n\nadd_executable( cqsearch ${CQSEARCH_SRCS} )\ntarget_link_libraries( cqsearch ${SQLITE_LIBRARIES} small_lib sqlquery_lib )\n\ninstall(TARGETS cqsearch RUNTIME DESTINATION bin)\n\n\n"
  },
  {
    "path": "cli/README.md",
    "content": "CodeQuery command line interface\n================================\n\nThis provides the command line interface (CLI) for CodeQuery's query interface.\n\nType the following to get help:    \n```bash\ncqsearch -h\n```\n\n\n"
  },
  {
    "path": "cli/main_cli.cpp",
    "content": "\n/*\n * CodeQuery\n * Copyright (C) 2013-2017 ruben2020 https://github.com/ruben2020/\n * \n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n */\n\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <memory>\n#include \"small_lib.h\"\n#include \"getopt2.h\"\n#include \"sqlquery.h\"\n#include \"swver.h\"\n\n\nvoid printhelp(const char* str)\n{\n\tprintf(\"Usage:\\n\");\n\tprintf(\"%s [-s <sqdbfile> [-p <n>] [-g] [-t <term>] [-l <len>] -[e|f] [-u] [-b <path>]]  [-d] [-v] [-h]\\n\\n\", str);\n\tprintf(\"options:\\n\");\n\tprintf(\"  -s : CodeQuery sqlite3 db file path\\n\");\n\tprintf(\"  -p : parameter is a number denoted by n\\n\");\n\tprintf(\"       default n = 1 (Symbol)\\n\");\n\tprintf(\"  -g : Create GraphViz DOT output instead of search results\\n\");\n\tprintf(\"       Applicable only for function or macro def(n=2) and\\n\");\n\tprintf(\"       class or struct (n=3)\\n\");\n\tprintf(\"  -t : search term without spaces\\n\");\n\tprintf(\"       if Exact Match is switched off, wild card\\n\");\n\tprintf(\"       searches are possible. Use * and ?\\n\");\n\tprintf(\"  -l : limited line length for truncated source code preview text\\n\");\n\tprintf(\"       Accepted range: 0 - 800 (use 0 for limitless)\\n\");\n\tprintf(\"       By default it is 80\\n\");\n\tprintf(\"  -e : Exact Match switched ON \\n\");\n\tprintf(\"       Case-sensitive\\n\");\n\tprintf(\"  -f : Exact Match switched OFF (fuzzy search)\\n\");\n\tprintf(\"       Case-insensitive with wild card search (default)\\n\");\n\tprintf(\"  -u : show full file path instead of file name\\n\");\n\tprintf(\"  -b : filters the results by source file path term\\n\");\n\tprintf(\"       For example, if the path term is \\\"test\\\" (without quotes),\\n\");\n\tprintf(\"       then the results will be filtered by source files whose\\n\");\n\tprintf(\"       path includes the term \\\"test\\\"\\n\");\n\tprintf(\"  -d : debug\\n\");\n\tprintf(\"  -v : version\\n\");\n\tprintf(\"  -h : help\\n\\n\");\n\tprintf(\"The combinations possible are -s -t -e, -s -t -f -u\\n\");\n\tprintf(\"The additional optional arguments are -d\\n\\n\");\n\tprintf(\"The possible values for n are:\\n\");\n\tprintf(\"    1: Symbol (default)\\n\");\n\tprintf(\"    2: Function or macro definition\\n\");\n\tprintf(\"    3: Class or struct\\n\");\n\tprintf(\"    4: Files including this file\\n\");\n\tprintf(\"    5: Full file path\\n\");\n\tprintf(\"    6: Functions calling this function\\n\");\n\tprintf(\"    7: Functions called by this function\\n\");\n\tprintf(\"    8: Calls of this function or macro\\n\");\n\tprintf(\"    9: Members and methods of this class\\n\");\n\tprintf(\"   10: Class which owns this member or method\\n\");\n\tprintf(\"   11: Children of this class (inheritance)\\n\");\n\tprintf(\"   12: Parent of this class (inheritance)\\n\");\n\tprintf(\"   13: Functions or macros inside this file\\n\\n\");\n\tprintf(\"Example:\\n%s -s myproject.db -p 6 -t read*file -f\\n\\n\", str);\n\tprintf(\"Example of using -g with GraphViz:\\n\");\n\tprintf(\"%s -s myproject.db -p 2 -g -t read*file > functioncallgraph.dot\\n\", str);\n\tprintf(\"dot -Tpng -ofunctioncallgraph.png functioncallgraph.dot\\n\\n\");\n\n}\n\nvoid printlicense(void)\n{\n\tprintf(CODEQUERY_SW_VERSION);\n\tprintf(\"\\n\");\n\tprintf(CODEQUERY_SW_LICENSE);\n}\n\nbool fileexists(const char* fn)\n{\n\tbool retval;\n\tFILE *fp;\n\tfp = fopen(fn, \"r\");\n\tretval = (fp != NULL);\n\tif (retval) fclose(fp);\n\treturn retval;\n}\n\nvoid process_argwithopt(char* thisOpt, int option, bool& err, tStr& fnstr, bool filemustexist)\n{\n\tif (thisOpt != NULL)\n\t{\n\t\tfnstr = thisOpt;\n\t\tif (filemustexist && (fileexists(fnstr.c_str()) == false))\n\t\t{\n\t\t\tprintf(\"Error: File %s doesn't exist.\\n\", fnstr.c_str());\n\t\t\terr = true;\n\t\t}\n\t}\n\telse\n\t{\n\t\tprintf(\"Error: -%c used without file option.\\n\", option);\n\t\terr = true;\n\t}\n}\n\ntStr limitcstr(int limitlen, tStr str)\n{\n\tif (limitlen <= 0)\n\t\treturn str;\n\telse\n\t\treturn str.substr(0,limitlen);\n}\n\nint process_query(tStr sqfn, tStr term, tStr param, bool exact, \n\t\t   bool full, bool debug, int limitlen, bool graph, tStr fpath)\n{\n\tif ((sqfn.empty())||(term.empty())||(param.empty())) return 1;\n\tint retVal = 0;\n\tsqlquery sq;\n\ttStr lstr;\n\tsqlquery::en_filereadstatus filestatus = sq.open_dbfile(sqfn);\n\ttVecStr grpxml, grpdot;\n\tbool res = false;\n\ttStr errstr;\n\tswitch (filestatus)\n\t{\n\t\tcase sqlquery::sqlfileOK:\n\t\t\tbreak;\n\t\tcase sqlquery::sqlfileOPENERROR:\n\t\t\tprintf(\"Error: File %s open error!\\n\", sqfn.c_str());\n\t\t\treturn 1;\n\t\tcase sqlquery::sqlfileNOTCORRECTDB:\n\t\t\tprintf(\"Error: File %s does not have correct database format!\\n\", sqfn.c_str());\n\t\t\treturn 1;\n\t\tcase sqlquery::sqlfileINCORRECTVER:\n\t\t\tprintf(\"Error: File %s has an unsupported database version number!\\n\", sqfn.c_str());\n\t\t\treturn 1;\n\t\tcase sqlquery::sqlfileUNKNOWNERROR:\n\t\t\tprintf(\"Error: Unknown Error!\\n\");\n\t\t\treturn 1;\n\t}\n\tint intParam = atoi(param.c_str()) - 1;\n\tif ((intParam < 0) || (intParam >= sqlquery::sqlresultAUTOCOMPLETE))\n\t{\n\t\tprintf(\"Error: Parameter is out of range!\\n\");\n\t\treturn 1;\t\n\t}\n\tsqlqueryresultlist resultlst;\n\tif (graph)\n\t{\n\t\tif (intParam == sqlquery::sqlresultFUNC_MACRO)\n\t\t{\n\t\t\tres = sq.search_funcgraph(term, exact, grpxml, grpdot, 1, &errstr);\n\t\t}\n\t\telse if (intParam == sqlquery::sqlresultCLASS_STRUCT)\n\t\t{\n\t\t\tres = sq.search_classinheritgraph(term, exact, grpxml, grpdot, &errstr);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tprintf(\"Error: -g only works with function or macro def(n=2) and\\n\");\n\t\t\tprintf(\"       class or struct (n=3)\\n\");\n\t\t\treturn 1;\n\t\t}\n\t\tif (res == false)\n\t\t{\n\t\t\tprintf(\"Error: SQL Error! %s!\\n\", errstr.c_str());\n\t\t\treturn 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor (auto it = grpdot.begin(); it != grpdot.end(); it++)\n\t\t\t\tprintf(\"%s\\n\", it->c_str());\n\t\t\treturn 0;\n\t\t}\n\t}\n\tresultlst = sq.search(term, (sqlquery::en_queryType) intParam, exact, fpath);\n\tif (resultlst.result_type == sqlqueryresultlist::sqlresultERROR)\n\t{\n\t\tprintf(\"Error: SQL Error! %s!\\n\", resultlst.sqlerrmsg.c_str());\n\t\treturn 1;\t\n\t}\n\tfor(std::vector<sqlqueryresult>::iterator it = resultlst.resultlist.begin();\n\t\tit != resultlst.resultlist.end(); it++)\n\t{\n\t\tlstr = limitcstr(limitlen, it->linetext);\n\t\tswitch(resultlst.result_type)\n\t\t{\n\t\t\tcase sqlqueryresultlist::sqlresultFULL:\n\t\t\t\tprintf(\"%s\\t%s:%s\\t%s\\n\", \n\t\t\t\t\t\tit->symname.c_str(), \n\t\t\t\t\t\t(full ? it->filepath.c_str() : it->filename.c_str()),\n\t\t\t\t\t\tit->linenum.c_str(),\n\t\t\t\t\t\tlstr.c_str());\n\t\t\t\tbreak;\t\n\t\t\tcase sqlqueryresultlist::sqlresultFILE_LINE:\n\t\t\t\tprintf(\"%s:%s\\t%s\\n\",\n\t\t\t\t\t\t(full ? it->filepath.c_str() : it->filename.c_str()),\n\t\t\t\t\t\tit->linenum.c_str(),\n\t\t\t\t\t\tlstr.c_str());\n\t\t\t\tbreak;\t\n\t\t\tcase sqlqueryresultlist::sqlresultFILE_ONLY:\n\t\t\t\tprintf(\"%s\\n\", it->filepath.c_str());\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\t\n\t\t}\n\t}\n\treturn retVal;\n}\n\nint main(int argc, char *argv[])\n{\n\tint c;\n\tbool bSqlite, bParam, bGraph, bTerm, bExact, bFull;\n\tbool bDebug, bVersion, bHelp, bError;\n\tint countExact = 0;\n\tint limitlen = 80;\n\tbSqlite = false;\n\tbParam = false;\n\tbGraph = false;\n\tbTerm = false;\n\tbExact = false;\n\tbFull = false;\n\tbDebug = false;\n\tbVersion = false;\n\tbHelp = (argc <= 1);\n\tbError = false;\n\ttStr sqfn, param = \"1\", term, fpath = \"\";\n\n    while ((c = getopt2(argc, argv, \"s:p:gt:l:efub:dvh\")) != -1)\n    {\n\t\tswitch(c)\n\t\t{\n\t\t\tcase 'v':\n\t\t\t\tbVersion = true;\n\t\t\t\tbreak;\n\t\t\tcase 'h':\n\t\t\t\tbHelp = true;\n\t\t\t\tbreak;\n\t\t\tcase 'e':\n\t\t\t\tbExact = true;\n\t\t\t\tcountExact++;\n\t\t\t\tbError = bError || (countExact > 1);\n\t\t\t\tif (countExact > 1) printf(\"Error: either -e or -f but not both!\\n\");\n\t\t\t\tbreak;\n\t\t\tcase 'f':\n\t\t\t\tbExact = false;\n\t\t\t\tcountExact++;\n\t\t\t\tbError = bError || (countExact > 1);\n\t\t\t\tif (countExact > 1) printf(\"Error: either -e or -f but not both!\\n\");\n\t\t\t\tbreak;\n\t\t\tcase 's':\n\t\t\t\tbSqlite = true;\n\t\t\t\tprocess_argwithopt(optarg, c, bError, sqfn, true);\n\t\t\t\tbreak;\n\t\t\tcase 'p':\n\t\t\t\tbParam = true;\n\t\t\t\tparam = optarg;\n\t\t\t\tbreak;\n\t\t\tcase 'b':\n\t\t\t\tfpath = optarg;\n\t\t\t\tbreak;\n\t\t\tcase 'g':\n\t\t\t\tbGraph = true;\n\t\t\t\tbreak;\n\t\t\tcase 't':\n\t\t\t\tbTerm = true;\n\t\t\t\tterm = optarg;\n\t\t\t\tbreak;\n\t\t\tcase 'l':\n\t\t\t\tlimitlen = atoi(optarg);\n\t\t\t\tbreak;\n\t\t\tcase 'u':\n\t\t\t\tbFull = true;\n\t\t\t\tbreak;\n\t\t\tcase 'd':\n\t\t\t\tbDebug = true;\n\t\t\t\tbreak;\n\t\t\tcase '?':\n\t\t\t\tbError = true;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n    }\n\tif (bVersion)\n\t{\n\t\tprintlicense();\n\t\treturn 0;\n\t}\n\tif (bHelp || bError)\n\t{\n\t\tprinthelp(extract_filename(argv[0]));\n\t\treturn (bError ? 1 : 0);\n\t}\n\tif (!bSqlite)\n\t{\n\t\tprintf(\"Error: -s is required.\\n\");\n\t\tbError = true;\n\t}\n\tif (!bTerm)\n\t{\n\t\tprintf(\"Error: -t is required.\\n\");\n\t\tbError = true;\n\t}\n\tif (bError)\n\t{\n\t\tprinthelp(extract_filename(argv[0]));\n\t\treturn 1;\n\t}\n\tif (bSqlite && bTerm)\n\t{\n\t\tbError = process_query(sqfn, term, param, bExact, bFull, bDebug, limitlen, bGraph, fpath) > 0;\n\t}\n\tif (bError)\n\t{\n\t\tprinthelp(extract_filename(argv[0]));\n\t}\n\treturn bError;\n}\n\n"
  },
  {
    "path": "cmakefind/FindSqlite.cmake",
    "content": "\n#\n# The following license applies only to this file:\n#\n\n# - find Sqlite 3\n# SQLITE_INCLUDE_DIR - Where to find Sqlite 3 header files (directory)\n# SQLITE_LIBRARIES - Sqlite 3 libraries\n# SQLITE_LIBRARY_RELEASE - Where the release library is\n# SQLITE_LIBRARY_DEBUG - Where the debug library is\n# SQLITE_FOUND - Set to TRUE if we found everything (library, includes and executable)\n\n# Copyright (c) 2010 Pau Garcia i Quiles, <pgquiles@elpauer.org>\n#\n# Redistribution and use is allowed according to the terms of the BSD license.\n# For details see the accompanying COPYING-CMAKE-SCRIPTS file.\n#\n# Generated by CModuler, a CMake Module Generator - http://gitorious.org/cmoduler\n\nIF( SQLITE_INCLUDE_DIR AND SQLITE_LIBRARY_RELEASE )\n    SET(SQLITE_FIND_QUIETLY TRUE)\nENDIF( SQLITE_INCLUDE_DIR AND SQLITE_LIBRARY_RELEASE )\n\n\nIF ( UNIX )\n\n   FIND_PATH( SQLITE_INCLUDE_DIR sqlite3.h  )\n\n   FIND_LIBRARY(SQLITE_LIBRARY_RELEASE NAMES sqlite3 )\n\nELSE ( UNIX )\n\n   FIND_PATH( SQLITE_INCLUDE_DIR sqlite3.h \n              \"/sqlite3/include\")\n\n   FIND_LIBRARY( SQLITE_LIBRARY_RELEASE NAMES sqlite3 )\n\nENDIF ( UNIX )\n\nIF( SQLITE_LIBRARY_RELEASE AND SQLITE_INCLUDE_DIR )\n        SET( SQLITE_FOUND TRUE )\nENDIF( SQLITE_LIBRARY_RELEASE AND SQLITE_INCLUDE_DIR )\n\nIF( SQLITE_LIBRARY_RELEASE )\n        SET( SQLITE_LIBRARIES ${SQLITE_LIBRARY_RELEASE} )\nENDIF( SQLITE_LIBRARY_RELEASE )\n\nIF( SQLITE_FOUND )\n        IF( NOT SQLITE_FIND_QUIETLY )\n                MESSAGE( STATUS \"Found Sqlite3 header file in ${SQLITE_INCLUDE_DIR}\")\n                MESSAGE( STATUS \"Found Sqlite3 libraries: ${SQLITE_LIBRARIES}\")\n        ENDIF( NOT SQLITE_FIND_QUIETLY )\nELSE(SQLITE_FOUND)\n        IF( SQLITE_FIND_REQUIRED)\n                MESSAGE( FATAL_ERROR \"Could not find Sqlite3\" )\n        ELSE( SQLITE_FIND_REQUIRED)\n                MESSAGE( STATUS \"Optional package Sqlite3 was not found\" )\n        ENDIF( SQLITE_FIND_REQUIRED)\n\t\t\nENDIF(SQLITE_FOUND)\n\n"
  },
  {
    "path": "doc/HOWTO-LINUX.md",
    "content": "\nHOWTO GUIDE\n===========\n\nThis HOWTO guide applies to Linux only\n\n## HOW TO USE CODEQUERY WITH C/C++ CODE?\n\n1. Change directory to the base folder of your source code like this:\n```bash\ncd ~/projects/myproject/src\n```\n2. Create a cscope.files file with all the C/C++ source files listed in it. Files with [inline assembly code](http://en.wikipedia.org/wiki/Inline_assembler) should be excluded from this list.\n```bash\nfind . -iname \"*.c\"    > ./cscope.files\nfind . -iname \"*.cpp\" >> ./cscope.files\nfind . -iname \"*.cxx\" >> ./cscope.files\nfind . -iname \"*.cc \" >> ./cscope.files\nfind . -iname \"*.h\"   >> ./cscope.files\nfind . -iname \"*.hpp\" >> ./cscope.files\nfind . -iname \"*.hxx\" >> ./cscope.files\nfind . -iname \"*.hh \" >> ./cscope.files\n```\n3. Create a cscope database like this (add `k`, if you don't want standard include paths like for stdio.h):\n```bash\ncscope -cb\n```\nOmission of `c` (to use compressed cscope database) is now supported experimentally.      \n4. Create a ctags database like this.\n```bash\nctags --fields=+i -n -L ./cscope.files\n```\n5. Run cqmakedb to create a CodeQuery database out of the cscope and ctags databases, like this:\n```bash\ncqmakedb -s ./myproject.db -c ./cscope.out -t ./tags -p\n```\n6. Open myproject.db using the CodeQuery GUI tool by running the following. Wild card search (* and ?) supported if Exact Match is switched off. Or use cqsearch, the CLI-version of CodeQuery (type `cqsearch -h` for more info).\n```bash\ncodequery\n```\nUse `cqmakedb -h` to get help on cqmakedb command line arguments.      \nUse `codequery -h` to get help on codequery command line arguments.\n\n\n\n## HOW TO USE CODEQUERY WITH JAVA CODE?\n\n1. Change directory to the base folder of your source code like this:\n```bash\ncd ~/projects/myproject/src\n```\n2. Create a cscope.files file with all the Java source files listed in it.\n```bash\nfind . -iname \"*.java\" > ./cscope.files\n```\n3. Create a cscope database like this:\n```bash\ncscope -cb\n```\nOmission of `c` (to use compressed cscope database) is now supported experimentally.      \n4. Create a ctags database like this:\n```bash\nctags --fields=+i -n -L ./cscope.files\n```\n5. Run cqmakedb to create a CodeQuery database out of the cscope and ctags databases, like this:\n```bash\ncqmakedb -s ./myproject.db -c ./cscope.out -t ./tags -p\n```\n6. Open myproject.db using the CodeQuery GUI tool by running the following. Wild card search (* and ?) supported if Exact Match is switched off. Or use cqsearch, the CLI-version of CodeQuery (type `cqsearch -h` for more info).\n```bash\ncodequery\n```\nUse `cqmakedb -h` to get help on cqmakedb command line arguments.      \nUse `codequery -h` to get help on codequery command line arguments.\n\n\n\n## HOW TO USE CODEQUERY WITH PYTHON CODE?\n\nIf you want to browse Python code, don't forget to install [pycscope](https://github.com/portante/pycscope). Information on how to install this tool is available on its github page.\n\n1. Change directory to the base folder of your source code like this:\n```bash\ncd ~/projects/myproject/src\n```\n2. Create a cscope.files file with all the Python source files listed in it.\n```bash\nfind . -iname \"*.py\"    > ./cscope.files\n```\n3. Create a cscope database like this:\n```bash\npycscope -i ./cscope.files\n```\n4. Create a ctags database like this.\n```bash\nctags --fields=+i -n -L ./cscope.files\n```\n5. Run cqmakedb to create a CodeQuery database out of the cscope and ctags databases, like this:\n```bash\ncqmakedb -s ./myproject.db -c ./cscope.out -t ./tags -p\n```\n6. Open myproject.db using the CodeQuery GUI tool by running the following. Wild card search (* and ?) supported if Exact Match is switched off. Or use cqsearch, the CLI-version of CodeQuery (type `cqsearch -h` for more info).\n```bash\ncodequery\n```\nUse `cqmakedb -h` to get help on cqmakedb command line arguments.      \nUse `codequery -h` to get help on codequery command line arguments.\n\n\n\n## HOW TO USE CODEQUERY WITH RUBY, GO AND JAVASCRIPT CODE?\n\nIf you want to browse Ruby, Go or Javascript code, don't forget to install [starscope](https://github.com/eapache/starscope). Information on how to install this tool is available on its github page.\n\n1. Change directory to the base folder of your source code like this:\n```bash\ncd ~/projects/myproject/src\n```\n2. Create a cscope.files file with all the Ruby, Go or Javascript source files listed in it.\n```bash\nfind . -iname \"*.rb\"    > ./cscope.files\nfind . -iname \"*.go\"    >> ./cscope.files\nfind . -iname \"*.js\"    >> ./cscope.files\n```\n3. Create a cscope database like this:\n```bash\nstarscope -e cscope\n```\n4. Create a ctags database like this.\n```bash\nctags --fields=+i -n -L ./cscope.files\n```\n5. Run cqmakedb to create a CodeQuery database out of the cscope and ctags databases, like this:\n```bash\ncqmakedb -s ./myproject.db -c ./cscope.out -t ./tags -p\n```\n6. Open myproject.db using the CodeQuery GUI tool by running the following. Wild card search (* and ?) supported if Exact Match is switched off. Or use cqsearch, the CLI-version of CodeQuery (type `cqsearch -h` for more info).\n```bash\ncodequery\n```\nUse `cqmakedb -h` to get help on cqmakedb command line arguments.      \nUse `codequery -h` to get help on codequery command line arguments.\n\n"
  },
  {
    "path": "doc/INSTALL-LINUX.md",
    "content": "HOW TO INSTALL CODEQUERY IN LINUX\n=================================\n\nThis INSTALL guide applies to Linux and Mac only\n\n(For Windows, a SETUP EXE package will be provided)\n\n\n## HOW TO INSTALL IN LINUX?\n\nStep 1: Install CMake (>=3.16), sqlite3, Qt5 (>=5.12) or Qt6 (>=6.4) for Qt5 or Qt6, cscope (15.8a or higher), ctags. If you have Ubuntu, Linux Mint, Debian or Fedora installed, most of these should be obtainable through the package managers. Note that the cscope version on the Ubuntu repositories may not be the latest one. It's better to have the latest version of cscope installed.   \n[CMake](http://www.cmake.org/)   \n[sqlite3](http://www.sqlite.org/)   \n[Qt5 or Qt6](http://qt-project.org/)   \n[cscope](http://cscope.sourceforge.net/) for C/C++/Java   \n[Exuberant ctags](http://ctags.sourceforge.net/)    \n[Universal ctags](https://github.com/universal-ctags/ctags/)    \n[pycscope](https://github.com/portante/pycscope) for Python    \n[starscope](https://github.com/eapache/starscope) for Ruby, Go and Javascript    \n\nIn Ubuntu or Linux Mint or Debian, do the following first:    \n```bash\nsudo apt-get update\nsudo apt-get install build-essential g++ git cmake ninja-build sqlite3 libsqlite3-dev cscope exuberant-ctags\n```\n\nIn Ubuntu or Linux Mint or Debian, do the following next for Qt5:    \n```bash\nsudo apt-get install qtcreator qtbase5-dev qt5-qmake qttools5-dev-tools qttools5-dev\n```\n\nIn Ubuntu or Linux Mint or Debian, do the following next for Qt6:    \n```bash\nsudo apt-get install libglx-dev libgl1-mesa-dev libvulkan-dev libxkbcommon-dev\nsudo apt-get install qt6-base-dev qt6-base-dev-tools qt6-tools-dev qt6-tools-dev-tools\nsudo apt-get install libqt6core5compat6-dev qt6-l10n-tools qt6-wayland\n```\n\nIf you want to browse Python code, don't forget to install [pycscope](https://github.com/portante/pycscope) at this point. Information on how to install this tool is available on its github page.\n\nIf you want to browse Ruby, Go or Javascript code, don't forget to install [starscope](https://github.com/eapache/starscope) at this point. Information on how to install this tool is available on its github page.\n\n\nStep 2: Download the repository as a ZIP file from github or clone git repository:     \n[codequery@github](https://github.com/ruben2020/codequery)     \n```bash\ncd ~/myrepos\ngit clone https://github.com/ruben2020/codequery.git\n```\n\nStep 3: Unzip to a directory and change to that directory.     \n```bash\ncd ~/myrepos/codequery\n```\n\nStep 4: Run cmake (first line for Qt6 OR second line for Qt5 OR third line for no GUI).     \n```bash\ncmake -G Ninja -S . -B build\ncmake -G Ninja -DBUILD_QT5=ON -S . -B build\ncmake -G Ninja -DNO_GUI=ON -S . -B build\n```\n\nStep 5: Build and install.       \n```bash\ncmake --build build\nsudo cmake --install build\n```\n\nIf you want to install to an alternative directory instead of the default one, use the following:     \n```bash\ncmake -DCMAKE_INSTALL_PREFIX=\"/home/johndoe/tools/\" -G Ninja -S . -B build\ncmake --build build\nsudo cmake --install build\n```\n\n\nStep 6: Please read [HOWTO-LINUX](HOWTO-LINUX.md) to learn how to use this software.\n\nIf the theming of the codequery GUI app looks strange in environments other than KDE Plasma, please refer to [this page](https://wiki.archlinux.org/title/Qt#Configuration_of_Qt_5/6_applications_under_environments_other_than_KDE_Plasma) for hints.\n\n"
  },
  {
    "path": "gui/CMakeLists.txt",
    "content": "#\n# CodeQuery\n# Copyright (C) 2013-2018 ruben2020 https://github.com/ruben2020/\n#\n# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not distributed with this\n# file, You can obtain one at http://mozilla.org/MPL/2.0/.\n#\n\ncmake_minimum_required(VERSION 3.16.0)\nproject(CodeQueryGUI)\n\n#ADD_DEFINITIONS( -Wall )\n\nif(${CMAKE_VERSION} VERSION_GREATER_EQUAL \"3.10.0\") \nforeach(p\n    CMP0071 # 3.10: Let AUTOMOC and AUTOUIC process GENERATED files\n    )\n  if(POLICY ${p})\n    cmake_policy(SET ${p} NEW)\n  endif()\nendforeach()\nendif()\n\n\n\n  # with SET() command you can change variables or define new ones\n  # here we define CODEQUERY_SRCS variable that contains a list of all .cpp files\n  # note that we don't need \\ at the end of line\n  SET( CODEQUERY_SRCS\n       ../querylib/small_lib.cpp\n       ../querylib/sqlquery.cpp\n       langtable.cpp\n       fileviewer.cpp\n       listhandler.cpp\n       searchhandler.cpp\n       mainwindow.cpp\n       graphdialog.cpp\n       aboutdialog.cpp\n       fileviewsettingsdialog.cpp\n       themes.cpp\n       main_gui.cpp\n       winmain.cpp\n  )\n  \n  # another list, this time it includes all header files that should be treated with moc\n  SET( CODEQUERY_MOC_HDRS\n       fileviewer.h\n       listhandler.h\n       searchhandler.h\n       mainwindow.h\n       graphdialog.h\n       aboutdialog.h\n       fileviewsettingsdialog.h\n  )\n  \n  # some .ui files\n  SET( CODEQUERY_UIS\n       ui/mainWindow.ui\n       ui/graphDialog.ui\n       ui/aboutDialog.ui\n       ui/fileViewSettingsDialog.ui\n  )\n  \n  # and finally an resource file\n  #SET( CODEQUERY_RCS\n  #     codequery.qrc\n  #)\n\n  # translation files\n  SET( CODEQUERY_TRANS\n\ntranslations/codequery_de.ts\ntranslations/codequery_en.ts\ntranslations/codequery_es.ts\ntranslations/codequery_fr.ts\ntranslations/codequery_id.ts\ntranslations/codequery_it.ts\ntranslations/codequery_ja.ts\ntranslations/codequery_ko.ts\ntranslations/codequery_zh-CHS.ts\ntranslations/codequery_zh-CHT.ts\n\n  )  \n\n  SET( CQIMAGES_RC_QRC   \"${CMAKE_CURRENT_SOURCE_DIR}/cqimages.qrc\")\n  SET( CQIMAGES_RC_SRCS  \"${CMAKE_CURRENT_BINARY_DIR}/qrc_cqimages.cxx\")\n  SET( CQTRANS_RC_QRCT   \"${CMAKE_CURRENT_SOURCE_DIR}/cqtrans.qrc.template\")\n  SET( CQTRANS_RC_QRC    \"${CMAKE_CURRENT_BINARY_DIR}/cqtrans.qrc\")\n  SET( CQTRANS_RC_SRCS   \"${CMAKE_CURRENT_BINARY_DIR}/qrc_cqtrans.cxx\")\n\nif (WIN32)\n  SET( COPY_COMMAND  \"copy\")\n  string(REPLACE \"/\" \"\\\\\" CQTRANS_RC_QRCT_CP \"${CQTRANS_RC_QRCT}\")\n  string(REPLACE \"/\" \"\\\\\" CQTRANS_RC_QRC_CP  \"${CQTRANS_RC_QRC}\")\nelse (WIN32)\n  SET( COPY_COMMAND  \"cp\")\n  SET( CQTRANS_RC_QRCT_CP  \"${CQTRANS_RC_QRCT}\")\n  SET( CQTRANS_RC_QRC_CP   \"${CQTRANS_RC_QRC}\")\nendif (WIN32)\n\n  add_definitions( -DNO_QDESIGNER_WIDGET_EXPORT )\n\n  INCLUDE_DIRECTORIES( \"${CMAKE_CURRENT_BINARY_DIR}\" )\n  INCLUDE_DIRECTORIES( \".\" )\n  INCLUDE_DIRECTORIES( \"./translations\" )\n  INCLUDE_DIRECTORIES( \"../querylib\" )\n  INCLUDE_DIRECTORIES( \"../makedb\" )\n  INCLUDE_DIRECTORIES( \"../showgraph\" )\n  INCLUDE_DIRECTORIES( \"/usr/local/include\" )\n  INCLUDE_DIRECTORIES( \"../lexilla/include\" )\n  INCLUDE_DIRECTORIES( \"../scintilla/qt/ScintillaEdit\" )\n  INCLUDE_DIRECTORIES( \"../scintilla/qt/ScintillaEditBase\" )\n  INCLUDE_DIRECTORIES( \"../scintilla/include\" )\n  INCLUDE_DIRECTORIES( \"../scintilla/src\" )\n  INCLUDE_DIRECTORIES( \"../scintilla/lexlib\" )\n\nif(GHAWIN)\nfind_package(unofficial-sqlite3 CONFIG REQUIRED)\nset( SQLITE_LIBRARIES \"unofficial::sqlite3::sqlite3\" )\nelse(GHAWIN)\nfind_package(Sqlite REQUIRED)\ninclude_directories( \"${SQLITE_INCLUDE_DIR}\" )\nendif(GHAWIN)\n\nif (BUILD_QT5)\n\n  # this command finds Qt4 libraries and sets all required variables\n  # note that it's Qt4, not QT4 or qt4\n  FIND_PACKAGE( Qt5Widgets REQUIRED )\n  FIND_PACKAGE( Qt5Core REQUIRED )\n  FIND_PACKAGE( Qt5Concurrent REQUIRED )\n  FIND_PACKAGE( Qt5Xml REQUIRED )\n  FIND_PACKAGE( Qt5LinguistTools REQUIRED )\n\n  add_definitions( -DUSE_QT5 )\n  #add_compile_definitions(QT_DISABLE_DEPRECATED_UP_TO=0x050F00)\n\n  set_target_properties(Qt5::Core PROPERTIES MAP_IMPORTED_CONFIG_COVERAGE \"RELEASE\")\n  \n  SET(CMAKE_AUTOMOC ON)\n  SET(CMAKE_INCLUDE_CURRENT_DIR ON)\n\n  get_target_property(QT_RCC_EXECUTABLE Qt5::rcc LOCATION)\n\n  QT5_ADD_TRANSLATION( QM ${CODEQUERY_TRANS} )  \n  \n  # this command will generate rules that will run rcc on all files from CODEQUERY_RCS\n  # in result CQIMAGES_RC_SRCS variable will contain paths to files produced by rcc\n  # QT4_ADD_RESOURCES( CQIMAGES_RC_SRCS ${CODEQUERY_RCS} )\n\n  # Run the resource compiler (rcc_options should already be set).\n  ADD_CUSTOM_COMMAND(\n    OUTPUT ${CQIMAGES_RC_SRCS}\n    COMMAND ${QT_RCC_EXECUTABLE}\n    ARGS ${rcc_options} -name cqimages -o ${CQIMAGES_RC_SRCS} ${CQIMAGES_RC_QRC}\n    )\n\n  ADD_CUSTOM_COMMAND(\n    OUTPUT ${CQTRANS_RC_SRCS}\n    COMMAND ${QT_RCC_EXECUTABLE}\n    ARGS ${rcc_options} -name cqtrans -o ${CQTRANS_RC_SRCS} ${CQTRANS_RC_QRC}\n    DEPENDS ${QM} ${CQTRANS_RC_QRC}\n    )\n\n  ADD_CUSTOM_COMMAND(\n    OUTPUT ${CQTRANS_RC_QRC}\n    COMMAND ${COPY_COMMAND}\n    ARGS ${CQTRANS_RC_QRCT_CP} ${CQTRANS_RC_QRC_CP}\n    )\n    \n\n  # this will run uic on .ui files:\n  QT5_WRAP_UI( CODEQUERY_UI_HDRS ${CODEQUERY_UIS} )\n\n  # we need this to be able to include headers produced by uic in our code\n  # (CMAKE_BINARY_DIR holds a path to the build directory, while INCLUDE_DIRECTORIES() works just like INCLUDEPATH from qmake)\n  INCLUDE_DIRECTORIES( \"${Qt5Widgets_INCLUDE_DIRS}\" )\n\nif(WIN32)\n  SET(CQ_WIN_RCS cqwin64.rc)\n  add_executable( codequery WIN32 ${CODEQUERY_SRCS} ${CODEQUERY_MOC_SRCS} ${CQIMAGES_RC_SRCS} ${CQTRANS_RC_SRCS} ${CODEQUERY_UI_HDRS} ${QM} ${CQ_WIN_RCS} )\n  target_link_libraries( codequery Qt5::Widgets Qt5::Concurrent Qt5::WinMain ${SQLITE_LIBRARIES} cqshowgraph-qt5 scintillaedit lexilla)\nelse()\n  add_executable( codequery ${CODEQUERY_SRCS} ${CODEQUERY_MOC_SRCS} ${CQIMAGES_RC_SRCS} ${CQTRANS_RC_SRCS} ${CODEQUERY_UI_HDRS} ${QM} )\n  target_link_libraries( codequery Qt5::Widgets Qt5::Concurrent ${SQLITE_LIBRARIES} cqshowgraph-qt5 scintillaedit lexilla)\nendif()\n  \n  install(TARGETS codequery RUNTIME DESTINATION bin)\n\n\nelse (BUILD_QT5)\n\n  find_package(Qt6 REQUIRED COMPONENTS Core Widgets Concurrent Xml LinguistTools )\n  set(CMAKE_AUTOMOC ON)\n  set(CMAKE_AUTORCC OFF)\n  set(CMAKE_AUTOUIC OFF)\n\n  add_definitions( -DUSE_QT6 )\n  add_compile_definitions(QT_DISABLE_DEPRECATED_UP_TO=0x050F00)\n\n  set_target_properties(Qt6::Core PROPERTIES MAP_IMPORTED_CONFIG_COVERAGE \"RELEASE\")\n\n  get_target_property(QT_RCC_EXECUTABLE Qt6::rcc LOCATION)\n\n  qt6_add_translation( QM ${CODEQUERY_TRANS} )\n\n  ADD_CUSTOM_COMMAND(\n    OUTPUT ${CQIMAGES_RC_SRCS}\n    COMMAND ${QT_RCC_EXECUTABLE}\n    ARGS ${rcc_options} -name cqimages -o ${CQIMAGES_RC_SRCS} ${CQIMAGES_RC_QRC}\n    )\n\n  ADD_CUSTOM_COMMAND(\n    OUTPUT ${CQTRANS_RC_SRCS}\n    COMMAND ${QT_RCC_EXECUTABLE}\n    ARGS ${rcc_options} -name cqtrans -o ${CQTRANS_RC_SRCS} ${CQTRANS_RC_QRC}\n    DEPENDS ${QM} ${CQTRANS_RC_QRC}\n    )\n\n  ADD_CUSTOM_COMMAND(\n    OUTPUT ${CQTRANS_RC_QRC}\n    COMMAND ${COPY_COMMAND}\n    ARGS ${CQTRANS_RC_QRCT_CP} ${CQTRANS_RC_QRC_CP}\n    )\n\n  qt6_wrap_ui( CODEQUERY_UI_HDRS ${CODEQUERY_UIS} )\n\nif(WIN32)\n  SET(CQ_WIN_RCS cqwin64.rc)\n  add_executable( codequery WIN32 ${CODEQUERY_SRCS} ${CODEQUERY_MOC_SRCS} ${CQIMAGES_RC_SRCS} ${CQTRANS_RC_SRCS} ${CODEQUERY_UI_HDRS} ${QM} ${CQ_WIN_RCS} )\n  target_link_libraries( codequery PRIVATE Qt6::Widgets Qt6::Concurrent ${SQLITE_LIBRARIES} cqshowgraph-qt6 scintillaedit lexilla )\nelse()\n  add_executable( codequery ${CODEQUERY_SRCS} ${CODEQUERY_MOC_SRCS} ${CQIMAGES_RC_SRCS} ${CQTRANS_RC_SRCS} ${CODEQUERY_UI_HDRS} ${QM} )\n  target_link_libraries( codequery PRIVATE Qt6::Widgets Qt6::Concurrent ${SQLITE_LIBRARIES} cqshowgraph-qt6 scintillaedit lexilla )\nendif()\n\n  install(TARGETS codequery RUNTIME DESTINATION bin)\n\n\nendif (BUILD_QT5)\n\n"
  },
  {
    "path": "gui/aboutdialog.cpp",
    "content": "\n/*\n * CodeQuery\n * Copyright (C) 2013-2017 ruben2020 https://github.com/ruben2020/\n * \n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n */\n\n\n#include \"ui_aboutDialog.h\"\n#include \"aboutdialog.h\"\n#include \"swver.h\"\n\n\ncqDialogAbout::cqDialogAbout(QWidget *parent)\n:QDialog(parent)\n,dialog_ui(new Ui::aboutDialog)\n {\n\tdialog_ui->setupUi(this);\n\tdialog_ui->labelTitle->setText(CODEQUERY_SW_VERSION_WEBSITE);\n\tdialog_ui->labelLicense->setText(CODEQUERY_SW_LICENSE_PARA_LINK);\n\tconnect(dialog_ui->pushButtonCloseAbout, SIGNAL(clicked()),\n\t\tthis, SLOT(accept()));\n\tresize(sizeHint());\n\tlayout()->setSizeConstraint(QLayout::SetFixedSize) ;\n\tsetSizeGripEnabled(false) ;\n}\n\ncqDialogAbout::~cqDialogAbout()\n {\n\tdisconnect();\n\tdelete dialog_ui;\n }\n\n\n"
  },
  {
    "path": "gui/aboutdialog.h",
    "content": "\n/*\n * CodeQuery\n * Copyright (C) 2013-2017 ruben2020 https://github.com/ruben2020/\n * \n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n */\n\n\n#ifndef ABOUTDIALOG_H_CQ\n#define ABOUTDIALOG_H_CQ\n\n#include <QtGlobal>\n#include <QtWidgets>\n\n namespace Ui {\n     class aboutDialog;\n }\n\nclass cqDialogAbout : public QDialog\n{\n  Q_OBJECT\n\npublic:\nUi::aboutDialog *dialog_ui;\ncqDialogAbout(QWidget *parent);\nvirtual ~cqDialogAbout();\n\n\n};\n\n\n#endif //ABOUTDIALOG_H_CQ\n\n\n"
  },
  {
    "path": "gui/cqimages.qrc",
    "content": "<RCC>\n  <qresource prefix=\"/mainwindow\">\n    <file>images/Folder2.png</file>\n    <file>images/Search.png</file>\n    <file>images/Arrow2_Left.png</file>\n    <file>images/Arrow2_Right.png</file>\n    <file>images/Arrow2_Up.png</file>\n    <file>images/Arrow2_Down.png</file>\n    <file>images/Clipboard_Copy.png</file>\n    <file>images/Clipboard_Paste.png</file>\n    <file>images/Database.png</file>\n    <file>images/Document2.png</file>\n    <file>images/Flag.png</file>\n    <file>images/Graph.png</file>\n    <file>images/Zoom_Out.png</file>\n    <file>images/Zoom_In.png</file>\n    <file>images/Text_Minus.png</file>\n    <file>images/Text_Plus.png</file>\n    <file>images/logo.png</file>\n  </qresource>\n</RCC>\n"
  },
  {
    "path": "gui/cqtrans.qrc.template",
    "content": "<RCC>\n  <qresource prefix=\"/trans\">\n    <file>codequery_de.qm</file>\n    <file>codequery_en.qm</file>\n    <file>codequery_es.qm</file>\n    <file>codequery_fr.qm</file>\n    <file>codequery_id.qm</file>\n    <file>codequery_it.qm</file>\n    <file>codequery_ja.qm</file>\n    <file>codequery_ko.qm</file>\n    <file>codequery_zh-CHS.qm</file>\n    <file>codequery_zh-CHT.qm</file>\n  </qresource>\n</RCC>\n"
  },
  {
    "path": "gui/cqwin32.rc",
    "content": "IDI_ICON1 ICON DISCARDABLE \"images/logo6464.ico\"\r\nIDI_ICON2 ICON DISCARDABLE \"images/logo4848.ico\"\r\nIDI_ICON3 ICON DISCARDABLE \"images/logo3232.ico\"\r\nIDI_ICON4 ICON DISCARDABLE \"images/logo1616.ico\"\r\n\r\n"
  },
  {
    "path": "gui/cqwin64.rc",
    "content": "IDI_ICON1 ICON DISCARDABLE \"images/logo128128.ico\"\r\nIDI_ICON2 ICON DISCARDABLE \"images/logo6464.ico\"\r\nIDI_ICON3 ICON DISCARDABLE \"images/logo4848.ico\"\r\nIDI_ICON4 ICON DISCARDABLE \"images/logo3232.ico\"\r\nIDI_ICON5 ICON DISCARDABLE \"images/logo1616.ico\"\r\n\r\n"
  },
  {
    "path": "gui/fileviewer.cpp",
    "content": "\n/*\n * CodeQuery\n * Copyright (C) 2013-2017 ruben2020 https://github.com/ruben2020/\n * \n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n */\n\n\n#include <stdlib.h>\n#include <string.h>\n#include <QProcess>\n#include <QInputDialog>\n#include <QFontDatabase>\n#include <QFontMetrics>\n\n#include \"ILexer.h\"\n#include \"Lexilla.h\"\n#include \"ScintillaEdit.h\"\n#include \"SciLexer.h\"\n\n#include \"fileviewer.h\"\n#include \"mainwindow.h\"\n#include \"fileviewsettingsdialog.h\"\n#include \"themes.h\"\n\n#if defined(_WIN32)\n#define EXT_EDITOR_DEFAULT_PATH \"notepad %f\"\n#elif defined(__APPLE__)\n#define EXT_EDITOR_DEFAULT_PATH \"open -t %f\"\n#else\n#define EXT_EDITOR_DEFAULT_PATH \"gedit %f +%n\"\n#endif\n\nfiledata::filedata()\n{\n\tlinenum = \"1\";\n\tfileid = -99;\n}\nfiledata::filedata(const QString& fn, const QString& ln, const int& fi)\n{\n\tlinenum = ln;\n\tfilename = fn;\n\tfileid = fi;\n}\n\nbool filedata::compare(const filedata& fd)\n{\n\tbool cmp;\n\tif ((fileid < 0)||(fd.fileid < 0))\n\t{\n\t\tcmp = ((linenum.compare(fd.linenum) == 0)&&\n\t\t\t(filename.compare(fd.filename) == 0));\n\t}\n\telse\n\t{\n\t\tcmp = ((linenum.compare(fd.linenum) == 0)&&\n\t\t\t(fileid == fd.fileid));\n\t}\n\treturn cmp;\n}\n\nbool filedata::compareFilePathOnly(const filedata& fd)\n{\n\tbool cmp;\n\tif ((fileid < 0)||(fd.fileid < 0))\n\t{\n\t\tcmp = (filename.compare(fd.filename) == 0);\n\t}\n\telse\n\t{\n\t\tcmp = (fileid == fd.fileid);\n\t}\n\treturn cmp;\n}\n\nbool filedata::compareFileNameOnly(const filedata& fd)\n{\n\tbool cmp;\n\tif ((fileid < 0)||(fd.fileid < 0))\n\t{\n\t\tcmp =(strcmp(\n\t\textract_filename(filename.C_STR()),\n\t\textract_filename(fd.filename.C_STR())) == 0);\n\t}\n\telse\n\t{\n\t\tcmp = (fileid == fd.fileid);\n\t}\n\treturn cmp;\n}\n\nfiledata::filedata(const filedata& fd)\n{\n\tlinenum = fd.linenum;\n\tfilename = fd.filename;\n\tfileid = fd.fileid;\n}\n\nfiledata& filedata::operator=(const filedata& fd)\n{\n\tif (&fd != this)\n\t{\n\t\tlinenum = fd.linenum;\n\t\tfilename = fd.filename;\n\t\tfileid = fd.fileid;\n\t}\n\treturn *this;\n}\n\nfileviewer::fileviewer(mainwindow* pmw)\n:mw(pmw)\n,m_pushButtonPrev(NULL)\n,m_pushButtonNext(NULL)\n,m_pushButtonOpenInEditor(NULL)\n,m_pushButtonPaste(NULL)\n,m_pushButtonGoToLine(NULL)\n,m_labelFilePath(NULL)\n,m_textEditSource(NULL)\n,m_textEditSourceFont(\"Courier New\", 12)\n,m_externalEditorPath(EXT_EDITOR_DEFAULT_PATH)\n,m_timestampMismatchWarned(false)\n,m_lexer(NULL)\n,m_fontsize(0)\n,m_currentlang(enHighlightCPP)\n,m_currentline(1)\n,m_annotline(1)\n,m_pushButtonTextShrink(NULL)\n,m_pushButtonTextEnlarge(NULL)\n,m_checkBoxSymbolOnly(NULL)\n,m_listWidgetFunc(NULL)\n,m_comboBoxFuncListSort(NULL)\n,m_fontwidthtemp(1)\n,m_markerhandle(1)\n,m_markerhandle2(2)\n{\n\tm_iter = m_fileDataList.begin();\n\tm_textEditSourceFont.setStyleHint(QFont::TypeWriter);\t\n}\n\nfileviewer::~fileviewer()\n{\n\tdisconnect();\n}\n\nvoid fileviewer::createFontList(void)\n{\n\tQFontDatabase fontdb;\n\tQStringList fontlst = fontdb.families(QFontDatabase::Latin);\n\tQStringList fixedpitch;\n\tQStringList::iterator it;\n\tfor(it = fontlst.begin(); it != fontlst.end(); it++)\n\t{\n\t\tif (fontdb.isFixedPitch(*it))\n\t\t{\n\t\t\tfixedpitch << (*it);\n\t\t}\n\t}\n\tfixedpitch.sort();\n\tm_fontlist = fixedpitch;\n}\n\nQString fileviewer::checkFontFamily(QString fontname)\n{\n\tQString newfont;\n#ifdef _WIN32\n\tQString tryfont1 = \"Consolas\";\n\tQString tryfont2 = \"Courier New\";\n#else\n\tQString tryfont1 = \"Monospace\";\n\tQString tryfont2 = \"Ubuntu Mono\";\n#endif\n\tif (m_fontlist.isEmpty()) createFontList();\n\tif (m_fontlist.contains(fontname))\n\t{\n\t\tnewfont = fontname;\n\t}\n\telse\n\t{\n\t\tnewfont = QFontDatabase::systemFont(QFontDatabase::FixedFont).family();\n\t}\n\treturn newfont;\n}\n\nvoid fileviewer::init(void)\n{\n\tm_pushButtonPaste->setEnabled(false);\n\tm_pushButtonPrev->setEnabled(false);\n\tm_pushButtonNext->setEnabled(false);\n\tm_pushButtonTextShrink->setEnabled(false);\n\tm_pushButtonTextEnlarge->setEnabled(false);\n\tm_pushButtonGoToLine->setEnabled(false);\n\tm_pushButtonOpenInEditor->setEnabled(false);\n\tm_labelFilePath->clear();\n\tm_textEditSource->setWrapMode(SC_WRAP_NONE);\n\tm_textEditSource->setReadOnly(true);\n\tm_markerhandle = 0;\n\tm_markerhandle2 = 1;\n\tm_textEditSource->markerDefine(m_markerhandle, SC_MARK_BACKGROUND);\n\tm_textEditSource->markerDefine(m_markerhandle2, SC_MARK_ARROW);\n\tm_textEditSource->setMarginTypeN(0, SC_MARGIN_NUMBER);\n\tm_textEditSource->setMarginTypeN(1, SC_MARGIN_SYMBOL);\n\tm_textEditSource->annotationSetVisible(ANNOTATION_BOXED);\n\tm_textEditSource->setCodePage(SC_CP_UTF8);\n\tm_textEditSource->setCaretPeriod(0);\n\tcreateFontList();\n\tScintillaEditBase *textEditSourceBase = m_textEditSource;\n\tconnect(textEditSourceBase, SIGNAL(selectionChanged(bool)),\n\t\t\tthis, SLOT(AbleToCopy(bool)));\n\tconnect(m_pushButtonGoToLine, SIGNAL(clicked(bool)),\n\t\t\tthis, SLOT(GoToLine_ButtonClick(bool)));\n\tconnect(m_pushButtonPaste, SIGNAL(clicked(bool)),\n\t\t\tthis, SLOT(Paste_ButtonClick(bool)));\n\tconnect(m_pushButtonPrev, SIGNAL(clicked(bool)),\n\t\t\tthis, SLOT(Prev_ButtonClick(bool)));\n\tconnect(m_pushButtonNext, SIGNAL(clicked(bool)),\n\t\t\tthis, SLOT(Next_ButtonClick(bool)));\n\tconnect(m_pushButtonOpenInEditor, SIGNAL(clicked(bool)),\n\t\t\tthis, SLOT(OpenInEditor_ButtonClick(bool)));\n\tconnect(m_pushButtonTextShrink, SIGNAL(clicked(bool)),\n\t\t\tthis, SLOT(TextShrink_ButtonClick(bool)));\n\tconnect(m_pushButtonTextEnlarge, SIGNAL(clicked(bool)),\n\t\t\tthis, SLOT(TextEnlarge_ButtonClick(bool)));\n\tconnect(m_listWidgetFunc, SIGNAL(itemPressed(QListWidgetItem *)),\n\t\t\tthis, SLOT(funcItemSelected(QListWidgetItem *)));\n\tconnect(m_comboBoxFuncListSort, SIGNAL(currentIndexChanged(int)),\n\t\t\tthis, SLOT(FuncListSort_indexChanged(int)));\n\tm_fileDataList.clear();\n\tclearTextEdit();\n\tsetLexer();\n}\n\nvoid fileviewer::clearList()\n{\n\t//printf(\"Fileview clearlist\\n\");\n\tm_pushButtonPaste->setEnabled(false);\n\tm_pushButtonPrev->setEnabled(false);\n\tm_pushButtonNext->setEnabled(false);\n\tm_pushButtonTextShrink->setEnabled(false);\n\tm_pushButtonTextEnlarge->setEnabled(false);\n\tm_pushButtonGoToLine->setEnabled(false);\n\tm_pushButtonOpenInEditor->setEnabled(false);\n\tm_labelFilePath->clear();\n\tclearTextEdit();\n\tm_fileDataList.clear();\n\tm_iter = m_fileDataList.begin();\n\tm_timestampMismatchWarned = false;\n\tm_listWidgetFunc->clear();\n}\n\nvoid fileviewer::recvDBtimestamp(QDateTime dt)\n{\n\tm_DBtimestamp = dt;\n}\n\nvoid fileviewer::fileToBeOpened(QString filename, QString linenum, int fileid)\n{\n\tfilename.replace(QString(\"$HOME\"), QDir::homePath());\n#ifdef _WIN32\n\tfilename.replace(\"/\", \"\\\\\");\n#endif\n\tif (!(QFile::exists(filename)))\n\t{\n\t\tsetFilePathLabelText(tr(\"File not found\"));\n\t\thandleFileCannotBeOpenedCase();\n\t\treturn;\n\t}\n\tQFile file(filename);\n\tif (!file.open(QIODevice::ReadOnly | QIODevice::Text))\n\t{\n\t\tsetFilePathLabelText(tr(\"File could not be opened\"));\n\t\thandleFileCannotBeOpenedCase();\n\t\treturn;\n\t}\n\tfile.close();\n\n\tQFileInfo fi(filename);\n\tif ((m_DBtimestamp < fi.lastModified())&&(m_timestampMismatchWarned == false))\n\t{\n\t\t\n\t\tm_timestampMismatchWarned = true;\n\t\tQMessageBox msgBox((QWidget*)mw);\n\t\tmsgBox.setIcon(QMessageBox::Warning);\n\t\tmsgBox.setStandardButtons(QMessageBox::Ok);\n\t\tmsgBox.setText(tr(\"The source file to be viewed is newer than the CodeQuery database file. You are recommended to manually regenerate the CodeQuery database file.\"));\n\t\tmsgBox.exec();\n\t}\n\tfiledata fd(filename, linenum, fileid);\n\tif (m_fileDataList.isEmpty())\n\t{\n\t\t//printf(\"Fileviewer: empty list\\n\");\n\t\tm_fileDataList.push_back(fd);\n\t\tm_iter = m_fileDataList.end() - 1;\n\t\tm_pushButtonPrev->setEnabled(false);\n\t\tm_pushButtonNext->setEnabled(false);\n\t\tupdateTextEdit();\n\t\treturn;\n\t}\n\telse if (m_iter == m_fileDataList.end())\n\t{\n\t\t// previous file not found\n\t\t//printf(\"Fileviewer: previous file not found %d, %d\\n\", m_fileDataList.end(), m_fileDataList.end() - 1);\n\t\tm_fileDataList.push_back(fd);\n\t\tm_iter = m_fileDataList.end() - 1;\n\t\tm_pushButtonPrev->setEnabled(m_iter != m_fileDataList.begin());\n\t\tm_pushButtonNext->setEnabled(false);\n\t\tupdateTextEdit();\t\t\n\t}\n\telse if (m_iter->compare(fd))\n\t{\n\t\t// the same filename and line number\n\t\t//printf(\"Fileviewer: same filename and line number\\n\");\n\t\tupdateFilePathLabel();\n\t\treturn;\n\t}\n\telse if (m_iter->compareFilePathOnly(fd))\n\t{\n\t\t// same file, different line number\n\t\t//printf(\"Fileviewer: same file, different line number\\n\");\n\t\tm_fileDataList.push_back(fd);\n\t\tm_iter = m_fileDataList.end() - 1;\n\t\tm_pushButtonPrev->setEnabled(true);\n\t\tm_pushButtonNext->setEnabled(false);\n\t\thighlightLine(fd.linenum.toInt());\n\t\tupdateFilePathLabel();\n\t}\n\telse\n\t{\n\t\t// different file\n\t\t//printf(\"Fileviewer: different file\\n\");\n\t\tm_fileDataList.push_back(fd);\n\t\tm_iter = m_fileDataList.end() - 1;\n\t\tm_pushButtonPrev->setEnabled(true);\n\t\tm_pushButtonNext->setEnabled(false);\n\t\tupdateTextEdit();\n\t}\n\tif ((m_fileDataList.isEmpty())||(m_iter == m_fileDataList.end())) return;\n\tQVector<filedata>::iterator it = m_fileDataList.begin();\n\twhile ((it != m_fileDataList.end() - 1)&&(it != m_fileDataList.end()))\n\t{\n\t\tif (it->compare(fd)) it = m_fileDataList.erase(it);\n\t\telse it++;\n\t}\n\tif (m_fileDataList.size() > 20) m_fileDataList.erase(m_fileDataList.begin());\n\tm_iter = m_fileDataList.end() - 1;\n}\n\nvoid fileviewer::clearTextEdit(void)\n{\n\tm_textEditSource->setReadOnly(false);\n\tm_textEditSource->clearAll();\n\tm_textEditSource->setReadOnly(true);\n}\n\nvoid fileviewer::updateTextEdit(void)\n{\n\tif (m_iter == m_fileDataList.end()) return;\n\tQApplication::setOverrideCursor(QCursor(Qt::WaitCursor));\n\tclearTextEdit();\n\n\tQFile file(m_iter->filename);\n\tif (!file.open(QIODevice::ReadOnly | QIODevice::Text))\n\t{\n\t\tQApplication::restoreOverrideCursor();\n\t\treturn;\n\t}\n\tQTextStream in(&file);\n\n\tint lang = enHighlightCPP; // default\n\n\tQRegularExpression rx1(\"\\\\.py$\", QRegularExpression::CaseInsensitiveOption);\n\tauto pos = rx1.match(m_iter->filename);\n\tif (pos.hasMatch()) lang = enHighlightPython;\n\n\tQRegularExpression rx2(\"\\\\.java$\", QRegularExpression::CaseInsensitiveOption);\n\tpos = rx2.match(m_iter->filename);\n\tif (pos.hasMatch()) lang = enHighlightJava;\n\n\tQRegularExpression rx3(\"\\\\.rb$\", QRegularExpression::CaseInsensitiveOption);\n\tpos = rx3.match(m_iter->filename);\n\tif (pos.hasMatch()) lang = enHighlightRuby;\n\n\tQRegularExpression rx4(\"\\\\.js$\", QRegularExpression::CaseInsensitiveOption);\n\tpos = rx4.match(m_iter->filename);\n\tif (pos.hasMatch()) lang = enHighlightJavascript;\n\n\tQRegularExpression rx5(\"\\\\.go$\", QRegularExpression::CaseInsensitiveOption);\n\tpos = rx5.match(m_iter->filename);\n\tif (pos.hasMatch()) lang = enHighlightGo;\n\n\tm_currentlang = lang;\n\n\tQString alltext;\n\twhile (!in.atEnd())\n\t{\n\t\talltext = in.readAll();\n\t}\n\tm_textEditSource->setReadOnly(false);\n\tm_textEditSource->setText(alltext.toUtf8().data());\n\tm_textEditSource->setReadOnly(true);\n\tm_textEditSource->setMarginWidthN(0,  m_textEditSource->textWidth(STYLE_LINENUMBER, QString::number(m_textEditSource->lineCount() * 10).C_STR()));\n\thighlightLine(m_iter->linenum.toInt());\n\tupdateFilePathLabel();\n\tm_pushButtonGoToLine->setEnabled(true);\n\tm_pushButtonOpenInEditor->setEnabled(true);\n\tm_pushButtonTextShrink->setEnabled(true);\n\tm_pushButtonTextEnlarge->setEnabled(true);\n\tm_listWidgetFunc->clear();\n\tif (m_iter->fileid < 0)\t{emit requestFuncList_filename(m_iter->filename);}\n\telse {emit requestFuncList_fileid(m_iter->fileid);}\n\tsetLexer(lang);\n\tQApplication::restoreOverrideCursor();\n}\n\nvoid fileviewer::updateFilePathLabel(void)\n{\n\tQString labeltext = m_iter->filename;\n\tlabeltext += \":\";\n\tlabeltext += m_iter->linenum;\n\tsetFilePathLabelText(labeltext);\n\tm_pushButtonGoToLine->setEnabled(true);\n}\n\nvoid fileviewer::setFilePathLabelText(QString text)\n{\n\tm_filepathlabeltextfull = text.simplified();\n\tfilePathLabelTextResized();\n\trepaintWidget();\n}\n\nvoid fileviewer::filePathLabelTextResized()\n{\n\tQFontMetrics metrics(m_labelFilePath->font());\n\tQString elidedText = metrics.elidedText(m_filepathlabeltextfull, Qt::ElideLeft, m_labelFilePath->width());\n\tm_labelFilePath->setText(elidedText);\n}\n\nvoid fileviewer::repaintWidget()\n{\n\tQPalette palette = m_labelFilePath->palette();\n\tpalette.setColor(QPalette::Base, palette.color(QPalette::Window));\n\tm_labelFilePath->setPalette(palette);\n}\n\nvoid fileviewer::braceMatchCheck(void)\n{\n\tlong cpos, matchpos;\n\tcpos     = m_textEditSource->currentPos();\n\tmatchpos = m_textEditSource->braceMatch(cpos, 0);\n\tif (matchpos == -1)\n\t{\n\t\tcpos--;\n\t\tmatchpos = m_textEditSource->braceMatch(cpos, 0);\n\t}\n\tif (matchpos != -1) m_textEditSource->braceHighlight(cpos, matchpos);\n\telse m_textEditSource->braceHighlight(-1, -1);\n}\n\nvoid fileviewer::updateFuncList(void)\n{\n\tif (m_funclist.resultlist.empty()) return;\n\tlong line = m_textEditSource->lineFromPosition(m_textEditSource->currentPos()) + 1;\n\ttStr selectedfunc = \"\";\n\tunsigned int selectedline, line1;\n\tauto previt = m_funclist.resultlist.begin();\n\tfor (auto it = m_funclist.resultlist.begin(); it != m_funclist.resultlist.end(); it++)\n\t{\n\t\tif ( (line < it->intLinenum) && (line >= previt->intLinenum) )\n\t\t{\n\t\t\tselectedfunc = previt->symname;\n\t\t\tselectedline = previt->intLinenum;\n\t\t\tbreak;\n\t\t}\n\t\tprevit = it;\n\t}\n\tif (selectedfunc.isEmpty() == false)\n\t{\n\t\tauto itemlist = m_listWidgetFunc->findItems(selectedfunc, Qt::MatchExactly);\n\t\tfor (auto it = itemlist.begin(); it != itemlist.end(); it++)\n\t\t{\n\t\t\tline1 = (*it)->data(Qt::UserRole).toUInt();\n\t\t\tif (selectedline == line1)\n\t\t\t{\n\t\t\t\tm_listWidgetFunc->setCurrentItem(*it);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n}\n\nvoid fileviewer::AbleToCopy(bool copy)\n{\n\tm_pushButtonPaste->setEnabled(copy);\n\tm_textEditSource->annotationClearAll();\n\tbraceMatchCheck();\n\tupdateFuncList();\n\tif (copy)\n\t{\n\t\tm_textEditSource->copy();\n\t\tm_annotline = m_textEditSource->lineFromPosition(m_textEditSource->selectionEnd());\n\t\tQString str = (QApplication::clipboard())->text();\n\t\tif (str.length() > 0)\n\t\t{\n\t\t\temit requestAnnotation(str);\n\t\t}\n\t}\n}\n\nvoid fileviewer::GoToLine_ButtonClick(bool checked)\n{\n\tif (!checked) highlightLine(m_iter->linenum.toInt());\n}\n\nvoid fileviewer::Prev_ButtonClick(bool checked)\n{\n\tif (m_fileDataList.isEmpty())\n\t{\n\t\tm_pushButtonPrev->setEnabled(false);\n\t\tm_pushButtonNext->setEnabled(false);\n\t\treturn;\n\t}\n\tif(m_iter == m_fileDataList.begin())\n\t{\n\t\tm_pushButtonPrev->setEnabled(false);\n\t\treturn;\n\t}\n\tif (!checked)\n\t{\n\t\tQVector<filedata>::iterator it = m_iter;\n\t\tm_iter--;\n\t\tif ((it != m_fileDataList.end())&&(m_iter->compareFilePathOnly(*it)))\n\t\t{\n\t\t\thighlightLine(m_iter->linenum.toInt());\n\t\t\tupdateFilePathLabel();\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tupdateTextEdit();\n\t\t}\n\t\tm_pushButtonPrev->setEnabled(m_iter != m_fileDataList.begin());\n\t\tm_pushButtonNext->setEnabled(m_iter != m_fileDataList.end() - 1);\n\t}\n}\n\nvoid fileviewer::Next_ButtonClick(bool checked)\n{\n\tif (m_fileDataList.isEmpty())\n\t{\n\t\tm_pushButtonPrev->setEnabled(false);\n\t\tm_pushButtonNext->setEnabled(false);\n\t\treturn;\n\t}\n\tif((m_iter == m_fileDataList.end() - 1)||\n\t\t(m_iter == m_fileDataList.end()))\n\t{\n\t\tm_pushButtonNext->setEnabled(false);\n\t\treturn;\n\t}\n\tif (!checked)\n\t{\n\t\tQVector<filedata>::iterator it = m_iter;\n\t\tm_iter++;\n\t\tif (m_iter->compareFilePathOnly(*it))\n\t\t{\n\t\t\thighlightLine(m_iter->linenum.toInt());\n\t\t\tupdateFilePathLabel();\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tupdateTextEdit();\n\t\t}\n\t\tm_pushButtonPrev->setEnabled(m_iter != m_fileDataList.begin());\n\t\tm_pushButtonNext->setEnabled(m_iter != m_fileDataList.end() - 1);\n\t}\n}\n\nvoid fileviewer::handleFileCannotBeOpenedCase(void)\n{\n\t//printf(\"handleFileCannotBeOpenedCase\\n\");\n\tclearTextEdit();\n\tm_pushButtonTextShrink->setEnabled(false);\n\tm_pushButtonTextEnlarge->setEnabled(false);\n\tm_pushButtonGoToLine->setEnabled(false);\t\n\tm_pushButtonNext->setEnabled(false);\n\tm_pushButtonPrev->setEnabled(m_fileDataList.isEmpty() == false);\n\tm_iter = m_fileDataList.end();\n}\n\n\nvoid fileviewer::Paste_ButtonClick(bool checked)\n{\n\tif (!checked)\n\t{\n\t\tm_textEditSource->copy();\n\t\tif (m_checkBoxSymbolOnly->isChecked())\n\t\t\temit searchCopiedTextSymbolOnly();\n\t\telse emit searchCopiedText();\n\t}\n}\n\nvoid fileviewer::fileViewSettings_Triggered(bool checked)\n{\n\tcqDialogFileViewSettings cqdg((QWidget*)mw, this,\n\t\tm_fontlist, themes::getThemesList());\n\tm_fonttemp = m_textEditSourceFont.family();\n\tm_fontwidthtemp = (m_textEditSource->tabWidth());\n\tm_themetemp = m_theme;\n\tcqdg.setCurrentFontType(m_fonttemp);\n\tcqdg.setTabWidth(m_fontwidthtemp);\n\tcqdg.setCurrentTheme(m_themetemp);\n\tcqdg.setModal(true);\n\tcqdg.exec();\n\tif (cqdg.result() == QDialog::Accepted)\n\t{\n\t\tm_textEditSourceFont.setFamily(m_fonttemp);\n\t\tm_textEditSource->setTabWidth(m_fontwidthtemp);\n\t\tm_textEditSource->setZoom(m_fontsize);\n\t\tm_theme = m_themetemp;\n\t\tm_themelast = \"1234\";\n\t\tsetLexer();\n\t}\n}\n\nvoid fileviewer::OptionsExtEditor_Triggered(bool checked)\n{\n\tbool ok;\n\tQString inptext;\n\tQInputDialog qinp(mw);\n\tqinp.setCancelButtonText(tr(\"Cancel\"));\n\tqinp.setOkButtonText(tr(\"OK\"));\n\tqinp.setInputMode(QInputDialog::TextInput);\n\tqinp.setWindowTitle(tr(\"External Editor Configuration\"));\n\tQString exted = tr(\"Please enter the path and arguments for the external editor. Replace as follows:\");\n\texted += \"\\n%f - \";\n\texted += tr(\"for file path\");\n\texted += \"\\n%n - \";\n\texted += tr(\"for line number\");\n\texted += \"\\n\";\n\texted += tr(\"For example:\");\n#ifdef _WIN32\n\texted += \"\\n\\\"C:\\\\Program Files\\\\Notepad++\\\\notepad++.exe\\\" -n%n %f\";\n#else\n\texted += \"\\ngedit %f +%n\";\n#endif\n\tqinp.setLabelText(exted);\n\tqinp.setTextEchoMode(QLineEdit::Normal);\n\tqinp.setTextValue(m_externalEditorPath);\n\tqinp.exec();\n\tok = (qinp.result() == QDialog::Accepted);\n\tinptext = qinp.textValue();\n\tif (ok && (inptext.isEmpty() == false)) m_externalEditorPath = inptext.trimmed();\n}\n\nvoid fileviewer::OpenInEditor_ButtonClick(bool checked)\n{\n\tQMessageBox msgBox(mw);\n\tmsgBox.setIcon(QMessageBox::Warning);\n\tmsgBox.setStandardButtons(QMessageBox::Ok);\n\tif (!checked)\n\t{\n\t\tQFile file(m_iter->filename);\n\t\tif (!file.open(QIODevice::ReadOnly | QIODevice::Text))\n\t\t{\n\t\t\tmsgBox.setText(tr(\"File could not be opened!\"));\n\t\t\tmsgBox.exec();\n\t\t\treturn;\n\t\t}\n\t\tfile.close();\n\n\t\tQStringList arguments;\n\t\tQString program;\n\t\tQRegularExpression rx(\"^\\\"([^\\\"]+)\\\" (.*)\");\n\t\tauto pos = rx.match(m_externalEditorPath);\n\t\tif (pos.hasMatch())\n\t\t{\n\t\t\tprogram = pos.captured(1);\n\t\t\targuments = (pos.captured(2)).split(QRegularExpression(\"[ ]+\"));\n\t\t}\n\t\telse\n\t\t{\n\t\t\targuments = m_externalEditorPath.split(QRegularExpression(\"[ ]+\"));\n\t\t\tprogram = arguments.takeFirst();\n\t\t}\n\t\targuments.replaceInStrings(QRegularExpression(\"%f\"), m_iter->filename);\n\t\targuments.replaceInStrings(QRegularExpression(\"%n\"), m_iter->linenum);\n\n\t\tif (QProcess::startDetached(program, arguments) == false)\n\t\t{\n\t\t\tmsgBox.setText(tr(\"External editor could not be started. Please check Options!\"));\n\t\t\tmsgBox.exec();\n\t\t\treturn;\n\t\t}\n\t}\n}\n\nvoid fileviewer::TextShrink_ButtonClick(bool checked)\n{\n\tif (!checked)\n\t{\n\t\ttextSizeChange(0-1);\n\t\t//m_textEditSource->zoomOut();\n\t}\n}\n\nvoid fileviewer::TextEnlarge_ButtonClick(bool checked)\n{\n\tif (!checked)\n\t{\n\t\ttextSizeChange(1);\n\t\t//m_textEditSource->zoomIn();\n\t}\n}\n\nvoid fileviewer::textSizeChange(int n)\n{\n\t//m_fontwidthtemp = (m_textEditSource->tabWidth());\n\tm_fontsize += n;\n\tm_textEditSource->setZoom(m_fontsize);\n\tm_textEditSource->setMarginWidthN(0,  m_textEditSource->textWidth(STYLE_LINENUMBER, QString::number(m_textEditSource->lineCount() * 10).C_STR()));\n\t//m_textEditSource->setTabWidth(m_fontwidthtemp);\n}\n\nvoid fileviewer::fontSelectionTemporary(const QString &fonttxt)\n{\n\tm_fonttemp = fonttxt;\n}\n\nvoid fileviewer::themeSelectionTemporary(const QString &themetxt)\n{\n\tm_themetemp = themetxt;\n}\n\nvoid fileviewer::tabWidthSelectionTemporary(const QString &width)\n{\n\tm_fontwidthtemp = width.toInt();\n}\n\nvoid fileviewer::highlightLine(unsigned int num)\n{\n\tm_textEditSource->markerDeleteAll(-1);\n\tif (num <= 0)\n\t{\n\t\tnum = 1;\n\t}\n\telse\n\t{\n\t\tnum = num - 1; // not sure why it's one off\n\t\tm_textEditSource->markerAdd(num, m_markerhandle);\n\t\tm_textEditSource->markerAdd(num, m_markerhandle2);\n\t}\n\tm_textEditSource->setFirstVisibleLine(num);\n\tm_currentline = num;\n}\n\nvoid fileviewer::setLexer(int lang)\n{\n\tif (lang == -1) lang = m_currentlang;\n\n\tswitch(lang)\n\t{\n\n\t\tcase enHighlightCPP:\n\t\t\treplaceLexer(SCLEX_CPP, lang);\n\t\t\tbreak;\n\n\t\tcase enHighlightPython:\n\t\t\treplaceLexer(SCLEX_PYTHON, lang);\n\t\t\tbreak;\n\n\t\tcase enHighlightJava:\n\t\t\treplaceLexer(SCLEX_CPP, lang);\n\t\t\tbreak;\n\n\t\tcase enHighlightRuby:\n\t\t\treplaceLexer(SCLEX_RUBY, lang);\n\t\t\tbreak;\n\n\t\tcase enHighlightJavascript:\n\t\t\treplaceLexer(SCLEX_CPP, lang);\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\treplaceLexer(SCLEX_CPP, lang);\n\t\t\tbreak;\n\n\t}\n}\n\nvoid fileviewer::replaceLexer(int sclang, int lang)\n{\n\tQColor markerlinebgcolor;\n\tQColor linenumfgcolor;\n\t\tswitch (lang)\n\t\t{\n\t\t\tcase enHighlightCPP:\n\t\t\t\tm_lexer = CreateLexer(\"cpp\");\n\t\t\t\tbreak;\n\n\t\t\tcase enHighlightPython:\n\t\t\t\tm_lexer = CreateLexer(\"python\");\n\t\t\t\tbreak;\n\n\t\t\tcase enHighlightJava:\n\t\t\t\tm_lexer = CreateLexer(\"cpp\");\n\t\t\t\tbreak;\n\n\t\t\tcase enHighlightRuby:\n\t\t\t\tm_lexer = CreateLexer(\"ruby\");\n\t\t\t\tbreak;\n\n\t\t\tcase enHighlightJavascript:\n\t\t\t\tm_lexer = CreateLexer(\"cpp\");\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tm_lexer = CreateLexer(\"cpp\");\n\t\t\t\tbreak;\n\t\t}\n\t\tm_textEditSource->setILexer((sptr_t)m_lexer);\n\t\tm_textEditSource->clearDocumentStyle();\n\t\tm_textEditSource->setZoom(m_fontsize);\n\t\tm_themelast = \"1234\";\n\t\tm_themelast = m_theme;\n\t\tthemes::setTheme(m_theme, lang, m_textEditSource, m_textEditSourceFont, markerlinebgcolor, linenumfgcolor);\n\t\tm_textEditSource->markerSetBack(m_markerhandle, themes::QC2SC(markerlinebgcolor));\n\t\tm_textEditSource->markerSetBack(m_markerhandle2, themes::QC2SC(linenumfgcolor));\n\t\tm_textEditSource->markerSetAlpha(m_markerhandle, SC_ALPHA_NOALPHA);\n\t\tm_textEditSource->markerSetAlpha(m_markerhandle2, SC_ALPHA_NOALPHA);\n\t\tm_textEditSource->styleSetFont(STYLE_LINENUMBER, m_textEditSourceFont.family().C_STR());\n\t\tm_textEditSource->setZoom(m_fontsize);\n\t\tm_textEditSource->setMarginWidthN(0, m_textEditSource->textWidth(STYLE_LINENUMBER, QString::number(m_textEditSource->lineCount() * 10).C_STR()));\n\t\tthemes::setKeywords(lang, m_textEditSource);\n\t\tm_textEditSource->colourise(0, -1);\n}\n\nvoid fileviewer::annotate(QStringList annotstrLst)\n{\n\tm_textEditSource->copy();\n\tQString str = (QApplication::clipboard())->text();\n\tm_annotline = m_textEditSource->lineFromPosition(m_textEditSource->selectionEnd());\n\tif ((annotstrLst.length() >= 2)&&(annotstrLst[0] == str))\n\t{\n\t\tm_textEditSource->annotationClearAll();\n\t\tm_textEditSource->annotationSetText(m_annotline, annotstrLst[1].toUtf8().data());\n\t\tm_textEditSource->annotationSetStyle(m_annotline, 29);\n\t}\n\telse if (str.length() > 0)\n\t{\n\t\temit requestAnnotation(str);\n\t}\n}\n\nvoid fileviewer::recvFuncList(sqlqueryresultlist* reslist)\n{\n\tm_listWidgetFunc->clear();\n\tif ((m_fileDataList.isEmpty())||(m_iter == m_fileDataList.end())) return;\n\tm_funclist = *reslist;\n\tm_funclist.sort_by_linenum();\n\tfor (auto it = m_funclist.resultlist.begin(); it != m_funclist.resultlist.end(); it++)\n\t{\n\t\tit->intLinenum = atoi(it->linenum.C_STR());\n\t}\n\tfiledata fd(m_funclist.resultlist[0].filename, \"1\", -99);\n\tif (m_iter->compareFileNameOnly(fd) == false)\n\t{\n\t\tif (m_iter->fileid < 0)\t{emit requestFuncList_filename(m_iter->filename);}\n\t\telse {emit requestFuncList_fileid(m_iter->fileid);}\n\t\treturn;\n\t}\n\tsqlqueryresultlist templist = m_funclist;\n\tif (m_comboBoxFuncListSort->currentIndex() != 0) templist.sort_by_name();\n\tQListWidgetItem* item;\n\tfor (auto it = templist.resultlist.begin(); it != templist.resultlist.end(); it++)\n\t{\n\t\titem = new QListWidgetItem(it->symname);\n\t\titem->setData(Qt::UserRole, QVariant(it->intLinenum));\n\t\tm_listWidgetFunc->addItem(item);\n\t}\n}\n\nvoid fileviewer::funcItemSelected(QListWidgetItem * curitem)\n{\n\tif (curitem == nullptr) return;\n\tunsigned int num = curitem->data(Qt::UserRole).toUInt();\n\tm_textEditSource->setFirstVisibleLine(num - 1);\n}\n\nvoid fileviewer::FuncListSort_indexChanged(const int& idx)\n{\n\trecvFuncList(&m_funclist);\n}\n\n"
  },
  {
    "path": "gui/fileviewer.h",
    "content": "\n/*\n * CodeQuery\n * Copyright (C) 2013-2017 ruben2020 https://github.com/ruben2020/\n * \n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n */\n\n\n#ifndef FILEVIEWER_H_CQ\n#define FILEVIEWER_H_CQ\n\n#include <QtGlobal>\n#include <QtWidgets>\n#include \"sqlquery.h\"\nQ_DECLARE_METATYPE(sqlqueryresultlist*)\n\n\nclass mainwindow;\nclass ScintillaEdit;\n\n\nclass filedata\n{\n\tpublic:\n\tQString filename;\n\tQString linenum;\n\tint fileid;\n\t\n\tfiledata();\n\tfiledata(const QString& fn, const QString& ln, const int& fi);\n\tfiledata(const filedata& fd);\n\tbool compare(const filedata& fd);\n\tbool compareFilePathOnly(const filedata& fd);\n\tbool compareFileNameOnly(const filedata& fd);\n\tfiledata& operator=(const filedata& fd);\n};\n\n\nenum langtypes\n{\n\tenHighlightNone = 0,\n\tenHighlightCPP,\n\tenHighlightPython,\n\tenHighlightJava,\n\tenHighlightRuby,\n\tenHighlightGo,\n\tenHighlightJavascript\n};\n\nclass fileviewer : public QObject\n{\n  Q_OBJECT\n\npublic:\nQPushButton *m_pushButtonPrev;\nQPushButton *m_pushButtonNext;\nQPushButton *m_pushButtonOpenInEditor;\nQPushButton *m_pushButtonPaste;\nQPushButton *m_pushButtonGoToLine;\nQPushButton *m_pushButtonTextShrink;\nQPushButton *m_pushButtonTextEnlarge;\nQCheckBox   *m_checkBoxSymbolOnly;\nQLineEdit *m_labelFilePath;\nScintillaEdit *m_textEditSource;\nQListWidget *m_listWidgetFunc;\nQComboBox *m_comboBoxFuncListSort;\nQString m_externalEditorPath;\nQFont m_textEditSourceFont;\nvoid *m_lexer;\nint m_fontsize;\nQString m_theme;\n\nfileviewer(mainwindow* pmw);\n~fileviewer();\nvoid init(void);\nvoid updateTextEdit(void);\nvoid updateFilePathLabel(void);\nvoid handleFileCannotBeOpenedCase(void);\nQString checkFontFamily(QString fontname);\n\npublic slots:\nvoid fileToBeOpened(QString filename, QString linenum, int fileid);\nvoid AbleToCopy(bool copy);\nvoid GoToLine_ButtonClick(bool checked);\nvoid Paste_ButtonClick(bool checked);\nvoid Prev_ButtonClick(bool checked);\nvoid Next_ButtonClick(bool checked);\nvoid OpenInEditor_ButtonClick(bool checked);\nvoid TextShrink_ButtonClick(bool checked);\nvoid TextEnlarge_ButtonClick(bool checked);\nvoid OptionsExtEditor_Triggered(bool checked);\nvoid fileViewSettings_Triggered(bool checked);\nvoid clearList();\nvoid recvDBtimestamp(QDateTime dt);\nvoid fontSelectionTemporary(const QString &fonttxt);\nvoid themeSelectionTemporary(const QString &themetxt);\nvoid tabWidthSelectionTemporary(const QString &width);\nvoid annotate(QStringList annotstrLst);\nvoid recvFuncList(sqlqueryresultlist* reslist);\nvoid funcItemSelected(QListWidgetItem * curitem);\nvoid FuncListSort_indexChanged(const int& idx);\nvoid filePathLabelTextResized();\nvoid repaintWidget();\n\nsignals:\nvoid searchCopiedText();\nvoid searchCopiedTextSymbolOnly();\nvoid requestAnnotation(QString searchstr);\nvoid requestFuncList_filename(QString filename);\nvoid requestFuncList_fileid(int fileid);\n\nprivate:\nmainwindow *mw;\nQVector<filedata> m_fileDataList;\nQVector<filedata>::iterator m_iter;\nQDateTime m_DBtimestamp;\nbool m_timestampMismatchWarned;\nQStringList m_fontlist;\nQString m_fonttemp;\nQString m_themetemp;\nQString m_themelast;\nQString m_filepathlabeltextfull;\nint m_currentlang;\nint m_fontwidthtemp;\nint m_markerhandle;\nint m_markerhandle2;\nlong m_currentline;\nlong m_annotline;\nsqlqueryresultlist m_funclist;\n\nvoid createFontList(void);\nvoid textSizeChange(int n);\nvoid highlightLine(unsigned int num = 0);\nvoid setLexer(int lang = -1);\nvoid replaceLexer(int sclang, int lang);\nvoid clearTextEdit(void);\nvoid braceMatchCheck(void);\nvoid updateFuncList(void);\nvoid setFilePathLabelText(QString text);\n\n};\n\n\n#endif\n"
  },
  {
    "path": "gui/fileviewsettingsdialog.cpp",
    "content": "\n/*\n * CodeQuery\n * Copyright (C) 2013-2017 ruben2020 https://github.com/ruben2020/\n * \n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n */\n\n\n#include \"ui_fileViewSettingsDialog.h\"\n#include \"fileviewsettingsdialog.h\"\n#include \"fileviewer.h\"\n#include <QFontDatabase>\n\ncqDialogFileViewSettings::cqDialogFileViewSettings(QWidget *parent,\n\t\tfileviewer* fv, const QStringList& fontlst, const QStringList& themeslst)\n:QDialog(parent)\n,m_fv(fv)\n,dialog_ui(new Ui::fileViewSettingsDialog)\n,m_tabwidthvalidator(1,64)\n {\n\tdialog_ui->setupUi(this);\n\tdialog_ui->lineEditTabWidth->setValidator(&m_tabwidthvalidator);\n        dialog_ui->comboBoxFont->addItems(fontlst);\n        dialog_ui->comboBoxTheme->addItems(themeslst);\n\tconnect(dialog_ui->pushButtonOK, SIGNAL(clicked()),\n\t\tthis, SLOT(accept()));\n\tconnect(dialog_ui->pushButtonCancel, SIGNAL(clicked()),\n\t\tthis, SLOT(reject()));\n\tconnect(dialog_ui->comboBoxFont, SIGNAL(currentIndexChanged(int)),\n\t\tthis, SLOT(fontSelectionTemporary(int)));\n\tconnect(dialog_ui->comboBoxTheme, SIGNAL(currentIndexChanged(int)),\n\t\tthis, SLOT(themeSelectionTemporary(int)));\n\tconnect(dialog_ui->lineEditTabWidth, SIGNAL(textEdited(const QString &)),\n\t\t\tfv, SLOT(tabWidthSelectionTemporary(const QString &)));\n\tconnect(this, SIGNAL(fontSelectionChanged(const QString &)),\n\t\tfv, SLOT(fontSelectionTemporary(const QString &)));\n\tconnect(this, SIGNAL(themeSelectionChanged(const QString &)),\n\t\tfv, SLOT(themeSelectionTemporary(const QString &)));\n\tresize(sizeHint());\n\tlayout()->setSizeConstraint(QLayout::SetFixedSize) ;\n\tsetSizeGripEnabled(false) ;\n}\n\ncqDialogFileViewSettings::~cqDialogFileViewSettings()\n {\n\tdisconnect();\n\tdelete dialog_ui;\n }\n\nvoid cqDialogFileViewSettings::setCurrentFontType(const QString& fonttype)\n{\n\tint idx = dialog_ui->comboBoxFont->findText(fonttype, Qt::MatchContains);\n\tdialog_ui->comboBoxFont->setCurrentIndex(idx);\n}\n\nvoid cqDialogFileViewSettings::setCurrentTheme(const QString& theme)\n{\n\tint idx = dialog_ui->comboBoxTheme->findText(theme, Qt::MatchContains);\n\tdialog_ui->comboBoxTheme->setCurrentIndex(idx);\n}\n\nvoid cqDialogFileViewSettings::setTabWidth(const int& width)\n{\n\tdialog_ui->lineEditTabWidth->setText(QString::number(width));\n}\n\nvoid cqDialogFileViewSettings::fontSelectionTemporary(int index)\n{\n\temit fontSelectionChanged(dialog_ui->comboBoxFont->itemText(index));\n}\n\nvoid cqDialogFileViewSettings::themeSelectionTemporary(int index)\n{\n\temit themeSelectionChanged(dialog_ui->comboBoxTheme->itemText(index));\n}\n\n"
  },
  {
    "path": "gui/fileviewsettingsdialog.h",
    "content": "\n/*\n * CodeQuery\n * Copyright (C) 2013-2017 ruben2020 https://github.com/ruben2020/\n * \n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n */\n\n\n#ifndef FILEVIEWSETTINGSDIALOG_H_CQ\n#define FILEVIEWSETTINGSDIALOG_H_CQ\n\n#include <QtGlobal>\n#include <QtWidgets>\n\n namespace Ui {\n     class fileViewSettingsDialog;\n }\n\nclass fileviewer;\n\nclass cqDialogFileViewSettings : public QDialog\n{\n  Q_OBJECT\n\npublic:\nUi::fileViewSettingsDialog *dialog_ui;\n\ncqDialogFileViewSettings(QWidget *parent, fileviewer* fv,\nconst QStringList& fontlst, const QStringList& themeslst);\nvirtual ~cqDialogFileViewSettings();\nvoid setCurrentFontType(const QString& fonttype);\nvoid setCurrentTheme(const QString& theme);\nvoid setTabWidth(const int& width);\n\npublic slots:\nvoid fontSelectionTemporary(int index);\nvoid themeSelectionTemporary(int index);\n\nsignals:\nvoid fontSelectionChanged(const QString& str);\nvoid themeSelectionChanged(const QString& str);\n\nprivate:\nQIntValidator m_tabwidthvalidator;\nfileviewer* m_fv;\n\n};\n\n\n#endif //FILEVIEWSETTINGSDIALOG_H_CQ\n\n"
  },
  {
    "path": "gui/graphdialog.cpp",
    "content": "\n/*\n * CodeQuery\n * Copyright (C) 2013-2017 ruben2020 https://github.com/ruben2020/\n * \n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n */\n\n\n#include \"ui_graphDialog.h\"\n#include \"graphdialog.h\"\n#include \"showgraph.h\"\n\n\ncqDialogGraph::cqDialogGraph(QWidget *parent)\n:QDialog(parent)\n,dialog_ui(new Ui::DialogGraph)\n,m_scaleFactor(5.0)\n {\n\tdialog_ui->setupUi(this);\n\tconnect(dialog_ui->pushButtonClose, SIGNAL(clicked()),\n\t\tthis, SLOT(accept()));\n\tconnect(dialog_ui->pushButtonZoomOut, SIGNAL(clicked()),\n\t\tthis, SLOT(zoomout()));\n\tconnect(dialog_ui->pushButtonZoomIn, SIGNAL(clicked()),\n\t\tthis, SLOT(zoomin()));\n\tconnect(dialog_ui->pushButtonSave, SIGNAL(clicked()),\n\t\tthis, SLOT(savetoimagefile()));\n\tconnect(dialog_ui->pushButtonSaveDot, SIGNAL(clicked()),\n\t\tthis, SLOT(savetodotfile()));\n\tconnect(dialog_ui->comboBoxNbrOfLevels, SIGNAL(currentIndexChanged(int)),\n\t\tthis, SLOT(numberOfLevelsChanged(int)));\n\n}\n\ncqDialogGraph::~cqDialogGraph()\n {\n\tdisconnect();\n\tdelete dialog_ui;\n }\n\nvoid cqDialogGraph::setupGraphFromXML(QStringList& grpxml, QStringList& grpdot, QString& desc)\n{\n\tm_grpxml = grpxml;\n\tm_grpdot = grpdot;\n\tm_img = showgraph::convertToImage(grpxml[0]);\n\tdialog_ui->labelGraph->setPixmap(QPixmap::fromImage(m_img));\n#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0))\n\tdialog_ui->labelGraph->setMask(dialog_ui->labelGraph->pixmap(Qt::ReturnByValue).mask());\n#else\n\tdialog_ui->labelGraph->setMask(dialog_ui->labelGraph->pixmap()->mask());\n#endif\n\tif (desc.length() > 0) dialog_ui->labelDesc->setText(desc);\n\tfor (unsigned int i=0; i < grpxml.size(); i++) dialog_ui->comboBoxNbrOfLevels->addItem(QString::number(i+1));\n\tdialog_ui->comboBoxNbrOfLevels->setCurrentIndex(0);\n\tshow();\n\tadjustScrollBar(dialog_ui->scrollArea->horizontalScrollBar(), m_scaleFactor/5);\n\tadjustScrollBar(dialog_ui->scrollArea->verticalScrollBar(), m_scaleFactor/5);\n}\n\nvoid cqDialogGraph::numberOfLevelsChanged(int num)\n{\n\tm_img = showgraph::convertToImage(m_grpxml[dialog_ui->comboBoxNbrOfLevels->currentIndex()]);\n\tdialog_ui->labelGraph->setPixmap(QPixmap::fromImage(m_img));\n#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0))\n\tdialog_ui->labelGraph->setMask(dialog_ui->labelGraph->pixmap(Qt::ReturnByValue).mask());\n#else\n\tdialog_ui->labelGraph->setMask(dialog_ui->labelGraph->pixmap()->mask());\n#endif\n\tadjustScrollBar(dialog_ui->scrollArea->horizontalScrollBar(), m_scaleFactor/5);\n\tadjustScrollBar(dialog_ui->scrollArea->verticalScrollBar(), m_scaleFactor/5);\n}\n\nvoid cqDialogGraph::zoomout()\n{\n     scaleImage(-1);\n}\n\nvoid cqDialogGraph::zoomin()\n{\n     scaleImage(1);\n}\n\nvoid cqDialogGraph::savetoimagefile()\n{\n\tQString filetype = tr(\"Images\");\n\tfiletype += \" (*.png *.jpg *.bmp *.tiff)\";\n\tQString fileName =\n\tQFileDialog::getSaveFileName( this, tr(\"Export Image\"),\n\t\t\t\t\tQDir::currentPath(),\n\t\t\t\t\tfiletype);\n\tif (fileName.isEmpty()) return;\n\n\tQMessageBox msgBox(this);\n\tmsgBox.setIcon(QMessageBox::Warning);\n\tmsgBox.setStandardButtons(QMessageBox::Ok);\n\tQImageWriter writer( fileName);\n\tif ((writer.canWrite() && writer.write(m_img)) == false)\n\t{\n\t\tmsgBox.setText(tr(\"File could not be saved!\"));\n\t\tmsgBox.exec();\n\t}\n}\n\nvoid cqDialogGraph::savetodotfile()\n{\n\tQString fileName =\n\tQFileDialog::getSaveFileName( this, tr(\"Export DOT file\"),\n\t\t\t\t\tQDir::currentPath(),\n\t\t\t\t\t\"Graphviz DOT (*.dot)\");\n\tif (fileName.isEmpty()) return;\n\n\tQFile outfile(fileName);\n\tQMessageBox msgBox(this);\n\tmsgBox.setIcon(QMessageBox::Warning);\n\tmsgBox.setStandardButtons(QMessageBox::Ok);\n\tif (outfile.open(QIODevice::WriteOnly | QIODevice::Text) == false)\n\t{\n\t\tmsgBox.setText(tr(\"File could not be saved!\"));\n\t\tmsgBox.exec();\n\t\treturn;\n\t}\n\tQTextStream out(&outfile);\n\tout << m_grpdot[dialog_ui->comboBoxNbrOfLevels->currentIndex()];\n\toutfile.close();\n}\n\nvoid cqDialogGraph::scaleImage(double factor)\n{\n     QPixmap p = QPixmap::fromImage(m_img);\n     m_scaleFactor += factor;\n     m_scaleFactor = (m_scaleFactor < 1.0) ? 1.0 : m_scaleFactor;\n     dialog_ui->labelGraph->setPixmap(p.scaled((m_scaleFactor/5) * p.size(), Qt::KeepAspectRatio));\n     adjustScrollBar(dialog_ui->scrollArea->horizontalScrollBar(), m_scaleFactor/5);\n     adjustScrollBar(dialog_ui->scrollArea->verticalScrollBar(), m_scaleFactor/5);\n}\n\nvoid cqDialogGraph::adjustScrollBar(QScrollBar *scrollBar, double factor)\n{\n\tint minim = scrollBar->minimum();\n\tscrollBar->setValue((scrollBar->maximum() - minim)/2 + minim);\n}\n\n"
  },
  {
    "path": "gui/graphdialog.h",
    "content": "\n/*\n * CodeQuery\n * Copyright (C) 2013-2017 ruben2020 https://github.com/ruben2020/\n * \n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n */\n\n\n#ifndef GRAPHDIALOG_H_CQ\n#define GRAPHDIALOG_H_CQ\n\n#include <QtGlobal>\n#include <QtWidgets>\n\n namespace Ui {\n     class DialogGraph;\n }\n\nclass cqDialogGraph : public QDialog\n{\n  Q_OBJECT\n\npublic:\nUi::DialogGraph *dialog_ui;\ncqDialogGraph(QWidget *parent);\nvirtual ~cqDialogGraph();\nvoid setupGraphFromXML(QStringList& grpxml, QStringList& grpdot, QString& desc);\nvoid scaleImage(double factor);\nvoid adjustScrollBar(QScrollBar *scrollBar, double factor);\n\npublic slots:\nvoid zoomout();\nvoid zoomin();\nvoid savetoimagefile();\nvoid savetodotfile();\nvoid numberOfLevelsChanged(int num);\n\nprivate:\ndouble m_scaleFactor;\nQImage m_img;\nQString m_dot;\nQStringList m_grpxml;\nQStringList m_grpdot;\n\n};\n\n\n#endif //GRAPHDIALOG_H_CQ\n\n\n"
  },
  {
    "path": "gui/images/axialisReadMe.txt",
    "content": "Free Icons by Axialis Software \r\nhttp://www.axialis.com \r\n\r\nHere is a library of icons that you can freely use in your projects. All \r\nthe icons are licensed under the Creative Commons Attribution License \r\n(http://creativecommons.org/licenses/by/2.5/). It means that you can use \r\nthem in any project or website, commercially or not. \r\n\r\nThe icons have been created by Axialis IconWorkshop, the professional\r\nicon authoring tool for Windows. For more info visit this page:\r\nhttp://www.axialis.com/iconworkshop\r\n\r\nTERMS OF USE\r\nThe only restrictions are: (a) you must keep the credits of the authors: \r\n\"Axialis Team\", even if you modify them; (b) link to us if you use them \r\non your website (see below). \r\n\r\nLINK TO US\r\nIf you use the icons in your website, you must add the following link on \r\nEACH PAGE containing the icons (at the bottom of the page for example). \r\nThe HTML code for this link is:\r\n\r\n  <a href=\"http://www.axialis.com/free/icons\">Icons</a> by <a href=\"http://www.axialis.com\">Axialis Team</a>\r\n \r\n\r\n \r\n\r\n\r\n"
  },
  {
    "path": "gui/langtable.cpp",
    "content": "\n/*\n * CodeQuery\n * Copyright (C) 2013-2017 ruben2020 https://github.com/ruben2020/\n * \n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n */\n\n\n#include <QString>\n#include <QStringList>\n\n#include \"small_lib.h\"\n#include \"langtable.h\"\n\n#define BASE_LANG_PATH \":/trans/\"\n\n\ntypedef struct\n{\n\tconst char* langName;\n\tconst char* langFile;\n}langTableType;\n\nstatic const langTableType langTable[]=\n{\n#include \"tslist.txt\"\n};\n\nQStringList langtable::getLangNameList(void)\n{\n\tQStringList lst;\n\tfor(int i=0; i<DIM(langTable); i++)\n\t{\n\t\tlst << QString::fromLatin1(langTable[i].langName);\n\t}\n\tlst.sort();\n\treturn lst;\n}\n\nQString langtable::getLangFilePath(const QString& lang)\n{\n\tQString langfp = BASE_LANG_PATH;\n\tQString langfn = \"codequery_en\";\n\tfor (int i=0; i<DIM(langTable); i++)\n\t{\n\t\tif (lang.compare(QString::fromLatin1(langTable[i].langName)) == 0)\n\t\t{\n\t\t\tlangfn = langTable[i].langFile;\n\t\t\tbreak;\n\t\t}\n\t}\n\tlangfp += langfn;\n\treturn langfp;\n}\n\n\n"
  },
  {
    "path": "gui/langtable.h",
    "content": "\n/*\n * CodeQuery\n * Copyright (C) 2013-2017 ruben2020 https://github.com/ruben2020/\n * \n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n */\n\n\n#ifndef LANGTABLE_H_CQ\n#define LANGTABLE_H_CQ\n\n// Forward declarations\nclass QString;\n//class QStringList;\n\nclass langtable\n{\n\npublic:\nstatic QStringList getLangNameList(void);\nstatic QString getLangFilePath(const QString& lang);\n\n};\n\n#endif // LANGTABLE_H_CQ\n\n"
  },
  {
    "path": "gui/listhandler.cpp",
    "content": "\n/*\n * CodeQuery\n * Copyright (C) 2013-2017 ruben2020 https://github.com/ruben2020/\n * \n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n */\n\n\n#include \"listhandler.h\"\n\nlisthandler::listhandler(mainwindow* pmw)\n:mw(pmw)\n,m_treeWidgetSearchResults(NULL)\n,m_pushButtonUp(NULL)\n,m_pushButtonDown(NULL)\n,m_noclick(false)\n{\n}\n\nlisthandler::~listhandler()\n{\n\tdisconnect();\n}\n\nvoid listhandler::prepareToExit(void)\n{\n\tdisconnect();\n\tm_noclick = true;\n\tm_treeWidgetSearchResults->clear();\n\tm_sqlist.resultlist.clear();\n}\n\nvoid listhandler::init(void)\n{\n\tconnect(m_treeWidgetSearchResults, SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)),\n\t\t\tthis, SLOT(listItemClicked(QTreeWidgetItem *, QTreeWidgetItem *)));\n\tconnect(m_pushButtonUp, SIGNAL(clicked(bool)),\n\t\t\tthis, SLOT(Up_ButtonClick(bool)));\n\tconnect(m_pushButtonDown, SIGNAL(clicked(bool)),\n\t\t\tthis, SLOT(Down_ButtonClick(bool)));\n\tm_pushButtonUp->setEnabled(false);\n\tm_pushButtonDown->setEnabled(false);\n\tm_treeWidgetSearchResults->setSelectionMode(QAbstractItemView::SingleSelection);\n\tm_sqlist.resultlist.clear();\n\tm_sqlist.result_type = sqlqueryresultlist::sqlresultFULL;\n\tm_noclick = true;\n\tupdateListHeaders();\n\tm_noclick = false;\n\tm_sqlist.result_type = sqlqueryresultlist::sqlresultERROR;\n}\n\nvoid listhandler::populateList(sqlqueryresultlist resultlist, int selectitem)\n{\n\tbool headersChanged = (m_sqlist.result_type != resultlist.result_type);\n\tm_sqlist = resultlist;\n\tm_noclick = true;\n\tQApplication::setOverrideCursor(QCursor(Qt::WaitCursor));\n\tclearList();\n\tif (headersChanged) updateListHeaders();\n\tupdateList();\n\tresizeColumns();\n\tQApplication::restoreOverrideCursor();\n\tm_noclick = false;\n\tm_treeWidgetSearchResults->setCurrentItem(m_treeWidgetSearchResults->topLevelItem(selectitem));\n\temit listRowNumUpdated(selectitem);\n}\n\nvoid listhandler::listItemClicked(QTreeWidgetItem * current, QTreeWidgetItem * previous)\n{\n\tif (current == NULL) return;\n\tif (m_noclick) return;\n\tcheckUpDown();\n\temit listRowNumUpdated(m_treeWidgetSearchResults->indexOfTopLevelItem(current));\n\temit openFile(m_sqlist.resultlist[current->data(0,Qt::UserRole).toLongLong()].filepath,\n\t\t\tm_sqlist.resultlist[current->data(0,Qt::UserRole).toLongLong()].linenum,\n\t\t\tm_sqlist.resultlist[current->data(0,Qt::UserRole).toLongLong()].fileid);\n}\n\nvoid listhandler::requestToProvideResultCurrentListItemSymbolName()\n{\n\tQString symName(\"\");\n\tif (m_treeWidgetSearchResults->topLevelItemCount() > 0)\n\t{\n\t\tQTreeWidgetItem* current = m_treeWidgetSearchResults->currentItem();\n\t\tsymName = m_sqlist.resultlist[current->data(0,Qt::UserRole).toLongLong()].symname;\n\t}\n\temit sendResultCurrentListItemSymbolName(symName);\n}\n\nvoid listhandler::updateList(void)\n{\n\tif (m_sqlist.resultlist.empty()) return;\n\tqlonglong i = 0;\n\tint col;\n\tQList<QTreeWidgetItem*> treeitemlist;\n\ttreeitemlist.reserve(m_sqlist.resultlist.size());\n\tfor(std::vector<sqlqueryresult>::iterator it = m_sqlist.resultlist.begin();\n\t\tit != m_sqlist.resultlist.end(); it++)\n\t{\n\t\tcol = 0;\n\t\ttreeitemlist += new QTreeWidgetItem(m_treeWidgetSearchResults);\n\t\tif (m_sqlist.result_type == sqlqueryresultlist::sqlresultFULL)\n\t\t\ttreeitemlist.last()->setText(col++, it->symname);\n\t\ttreeitemlist.last()->setText(col++, it->filename);\n\t\tif ((m_sqlist.result_type == sqlqueryresultlist::sqlresultFULL)||\n\t\t\t(m_sqlist.result_type == sqlqueryresultlist::sqlresultFILE_LINE))\n\t\t{\n\t\t\ttreeitemlist.last()->setText(col++, it->linenum);\n\t\t\ttreeitemlist.last()->setText(col++, it->linetext);\n\t\t}\n\t\ttreeitemlist.last()->setData(0, Qt::UserRole, QVariant(i++));\n\t}\n\tm_treeWidgetSearchResults->addTopLevelItems(treeitemlist);\n}\n\nvoid listhandler::updateListHeaders(void)\n{\n\tQStringList headers;\n\tif (m_sqlist.result_type == sqlqueryresultlist::sqlresultFULL)\n\t\theaders += tr(\"Symbol\");\n\theaders += tr(\"File\");\n\tif ((m_sqlist.result_type == sqlqueryresultlist::sqlresultFULL)||\n\t\t(m_sqlist.result_type == sqlqueryresultlist::sqlresultFILE_LINE))\n\t\theaders << tr(\"Line\") << tr(\"Preview\");\n\tm_treeWidgetSearchResults->setHeaderLabels(headers);\n\tif (m_sqlist.result_type == sqlqueryresultlist::sqlresultFULL)\n\t\t{\n\t\t\tm_treeWidgetSearchResults->setColumnCount(4);\n\t\t}\n\telse if (m_sqlist.result_type == sqlqueryresultlist::sqlresultFILE_LINE)\n\t\t{\n\t\t\tm_treeWidgetSearchResults->setColumnCount(3);\n\t\t}\n\telse if (m_sqlist.result_type == sqlqueryresultlist::sqlresultFILE_ONLY)\n\t\t{\n\t\t\tm_treeWidgetSearchResults->setColumnCount(1);\n\t\t}\n}\n\nvoid listhandler::resizeColumns(void)\n{\n\tint n = m_treeWidgetSearchResults->columnCount();\n\tif (n > 1) n--;\n\tfor(int i=0; i < n; i++)\n\t\t{m_treeWidgetSearchResults->resizeColumnToContents(i);}\n}\n\nvoid listhandler::clearList()\n{\n\tbool noclick = m_noclick;\n\tm_pushButtonUp->setEnabled(false);\n\tm_pushButtonDown->setEnabled(false);\n\tm_noclick = true;\n\tm_treeWidgetSearchResults->clear();\n\tm_noclick = noclick;\n}\n\nvoid listhandler::retranslateUi(void)\n{\n\tm_noclick = true;\n\tif (m_treeWidgetSearchResults->topLevelItemCount() <= 0)\n\t{\n\t\tm_sqlist.result_type = sqlqueryresultlist::sqlresultFULL;\n\t\tupdateListHeaders();\n\t\tm_noclick = false;\n\t}\n\telse\n\t{\n\t\tint curItemIdx = m_treeWidgetSearchResults->indexOfTopLevelItem(m_treeWidgetSearchResults->currentItem());\n\t\tclearList();\n\t\tupdateListHeaders();\n\t\tupdateList();\n\t\tresizeColumns();\n\t\tm_treeWidgetSearchResults->setCurrentItem(m_treeWidgetSearchResults->topLevelItem(curItemIdx));\n\t\tm_noclick = false;\n\t\tlistItemClicked(m_treeWidgetSearchResults->topLevelItem(curItemIdx), NULL);\n\t}\n}\n\nvoid listhandler::Up_ButtonClick(bool checked)\n{\n\tQTreeWidgetItem *item = NULL;\n\ttStr curFilepath;\n\ttStr itemFilepath;\n\tif ((!checked)&&(m_treeWidgetSearchResults->topLevelItemCount() > 0))\n\t{\n\t\titem = m_treeWidgetSearchResults->currentItem();\n\t\tif (item != NULL)\n\t\t\tcurFilepath = m_sqlist.resultlist[item->data(0,Qt::UserRole).toLongLong()].filepath;\n\t\twhile (item != NULL)\n\t\t{\n\t\t\titem = m_treeWidgetSearchResults->itemAbove(item);\n\t\t\tif (item == NULL) break;\n\t\t\titemFilepath = m_sqlist.resultlist[item->data(0,Qt::UserRole).toLongLong()].filepath;\n\t\t\tif (strrevcmp(curFilepath, itemFilepath))\n\t\t\t{\n\t\t\t\tm_treeWidgetSearchResults->setCurrentItem(item);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n}\n\nvoid listhandler::Down_ButtonClick(bool checked)\n{\n\tQTreeWidgetItem *item = NULL;\n\ttStr curFilepath;\n\ttStr itemFilepath;\n\tif ((!checked)&&(m_treeWidgetSearchResults->topLevelItemCount() > 0))\n\t{\n\t\titem = m_treeWidgetSearchResults->currentItem();\n\t\tif (item != NULL)\n\t\t\tcurFilepath = m_sqlist.resultlist[item->data(0,Qt::UserRole).toLongLong()].filepath;\n\t\twhile (item != NULL)\n\t\t{\n\t\t\titem = m_treeWidgetSearchResults->itemBelow(item);\n\t\t\tif (item == NULL) break;\n\t\t\titemFilepath = m_sqlist.resultlist[item->data(0,Qt::UserRole).toLongLong()].filepath;\n\t\t\tif (strrevcmp(curFilepath, itemFilepath))\n\t\t\t{\n\t\t\t\tm_treeWidgetSearchResults->setCurrentItem(item);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n}\n\nvoid listhandler::checkUpDown(void)\n{\n\tQTreeWidgetItem *item = NULL;\n\tQTreeWidgetItem *curItem = NULL;\n\ttStr curFilepath, itemFilepath;\n\tbool upArrow=false, downArrow=false;\n\tif (m_treeWidgetSearchResults->topLevelItemCount() <= 0) return;\n\titem = m_treeWidgetSearchResults->currentItem();\n\tcurItem = item;\n\tif (item != NULL)\n\t\tcurFilepath = m_sqlist.resultlist[item->data(0,Qt::UserRole).toLongLong()].filepath;\n\n\twhile (item != NULL)\n\t{\n\t\titem = m_treeWidgetSearchResults->itemAbove(item);\n\t\tif (item == NULL) break;\n\t\titemFilepath = m_sqlist.resultlist[item->data(0,Qt::UserRole).toLongLong()].filepath;\n\t\tif (strrevcmp(curFilepath, itemFilepath))\n\t\t{\n\t\t\tupArrow = true;\n\t\t\tbreak;\n\t\t}\n\n\t\t// for now, assume items with same file path are grouped together\n\t\t// This is to speed up the search\n\t\telse break;\n\t}\n\n\titem = curItem;\n\twhile (item != NULL)\n\t{\n\t\titem = m_treeWidgetSearchResults->itemBelow(item);\n\t\tif (item == NULL) break;\n\t\titemFilepath = m_sqlist.resultlist[item->data(0,Qt::UserRole).toLongLong()].filepath;\n\t\tif (strrevcmp(curFilepath, itemFilepath))\n\t\t{\n\t\t\tdownArrow = true;\n\t\t\tbreak;\n\t\t}\n\n\t\t// for now, assume items with same file path are grouped together\n\t\t// This is to speed up the search\n\t\telse break;\n\t}\n\n\tm_pushButtonUp->setEnabled(upArrow);\n\tm_pushButtonDown->setEnabled(downArrow);\n}\n\n"
  },
  {
    "path": "gui/listhandler.h",
    "content": "\n/*\n * CodeQuery\n * Copyright (C) 2013-2017 ruben2020 https://github.com/ruben2020/\n * \n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n */\n\n\n#ifndef LISTHANDLER_H_CQ\n#define LISTHANDLER_H_CQ\n\n#include <QtGlobal>\n#include <QtWidgets>\n\n#include \"sqlquery.h\"\n\nclass mainwindow;\n\nclass listhandler : public QObject\n{\n  Q_OBJECT\n\npublic:\nQTreeWidget *m_treeWidgetSearchResults;\nQPushButton *m_pushButtonUp;\nQPushButton *m_pushButtonDown;\n\nlisthandler(mainwindow* pmw);\n~listhandler();\nvoid init(void);\nvoid updateList(void);\nvoid prepareToExit(void);\nvoid updateListHeaders(void);\nvoid resizeColumns(void);\nvoid retranslateUi(void);\nvoid checkUpDown(void);\n\npublic slots:\nvoid populateList(sqlqueryresultlist resultlist, int selectitem);\nvoid listItemClicked(QTreeWidgetItem * current, QTreeWidgetItem * previous);\nvoid clearList();\nvoid requestToProvideResultCurrentListItemSymbolName();\nvoid Up_ButtonClick(bool checked);\nvoid Down_ButtonClick(bool checked);\n\nsignals:\nvoid openFile(QString file, QString linenum, int fileid);\nvoid listRowNumUpdated(int row);\nvoid sendResultCurrentListItemSymbolName(const QString symName);\n\nprivate:\nmainwindow *mw;\nsqlqueryresultlist m_sqlist;\nbool m_noclick;\n\n};\n\n\n#endif\n\n"
  },
  {
    "path": "gui/main_gui.cpp",
    "content": "\n/*\n * CodeQuery\n * Copyright (C) 2013-2017 ruben2020 https://github.com/ruben2020/\n * \n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n */\n\n\n#ifdef _WIN32\n#include <windows.h>\n#endif\n\n#include \"mainwindow.h\"\n\n\nint main(int argc, char *argv[])\n{\n\tQApplication app(argc, argv);\n\tQMainWindow *wndw = new QMainWindow;\n\n/*\n#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)\n#if defined(__unix__) || defined(__linux__)\n\tapp.setAttribute(Qt::AA_DontUseNativeDialogs, true);\n#endif\n#endif\n*/\n\n\tmainwindow mw(wndw, &app);\n\n\tmw.show();\n\n#ifdef _WIN32\n\tShowWindow( (HWND) mw.winId(), SW_HIDE);\n\tSetWindowLongPtr( (HWND) mw.winId(), GWL_EXSTYLE, \n\t\t\tGetWindowLongPtr( (HWND) mw.winId(), GWL_EXSTYLE) | WS_EX_APPWINDOW);\n\tShowWindow( (HWND) mw.winId(), SW_SHOW);\n#endif\n\n\treturn app.exec();\n}\n"
  },
  {
    "path": "gui/mainwindow.cpp",
    "content": "\n/*\n * CodeQuery\n * Copyright (C) 2013-2017 ruben2020 https://github.com/ruben2020/\n * \n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n */\n\n\n#include \"mainwindow.h\"\n#include \"ui_mainWindow.h\"\n#include \"fileviewer.h\"\n#include \"listhandler.h\"\n#include \"searchhandler.h\"\n#include \"langtable.h\"\n#include \"aboutdialog.h\"\n#include \"swver.h\"\n\n#include <QInputDialog>\n#include <QMessageBox>\n\nmainwindow::mainwindow(QMainWindow *parent, QApplication *app)\n:QMainWindow(parent)\n,m_app(app)\n,ui(new Ui::MainWindow)\n,m_translator(this)\n,m_fileviewer(NULL)\n,m_listhandler(NULL)\n,m_searchhandler(NULL)\n,m_currentLanguage(\"English\")\n {\n     ui->setupUi(this);\n     init();\n }\n\nmainwindow::~mainwindow()\n {\n\tdisconnect();\n\tdelete m_fileviewer;\n\tdelete m_listhandler;\n\tdelete m_searchhandler;\n\tdelete ui;\n }\n\nvoid mainwindow::init(void)\n{\n\tm_fileviewer = new fileviewer(this);\n\tm_listhandler = new listhandler(this);\n\tm_searchhandler = new searchhandler(this);\n\tsetup_fileviewer();\n\tsetup_listhandler();\n\tsetup_searchhandler();\n\tconnect(m_searchhandler, SIGNAL(searchresults(sqlqueryresultlist, int)),\n\t\t\tm_listhandler, SLOT(populateList(sqlqueryresultlist, int)));\n\tconnect(m_searchhandler, SIGNAL(DBreset()),\n\t\t\tm_fileviewer, SLOT(clearList()));\n\tconnect(m_searchhandler, SIGNAL(sendDBtimestamp(QDateTime)),\n\t\t\tm_fileviewer, SLOT(recvDBtimestamp(QDateTime)));\n\tconnect(m_searchhandler, SIGNAL(DBreset()),\n\t\t\tm_listhandler, SLOT(clearList()));\n\tconnect(m_listhandler, SIGNAL(openFile(QString, QString, int)),\n\t\t\tm_fileviewer, SLOT(fileToBeOpened(QString, QString, int)));\n\tconnect(m_listhandler, SIGNAL(listRowNumUpdated(int)),\n\t\t\tm_searchhandler, SLOT(updateListItemRowNum(int)));\n\tconnect(m_fileviewer, SIGNAL(searchCopiedText()),\n\t\t\tm_searchhandler, SLOT(newSearchText()));\n\tconnect(m_fileviewer, SIGNAL(searchCopiedTextSymbolOnly()),\n\t\t\tm_searchhandler, SLOT(newSearchTextSymbolOnly()));\n\tconnect(m_searchhandler, SIGNAL(updateStatus(const QString&, int)),\n\t\t\tui->statusbar, SLOT(showMessage(const QString&, int)));\n\tconnect(m_searchhandler, SIGNAL(getResultCurrentListItemSymbolName()),\n\t\t\tm_listhandler, SLOT(requestToProvideResultCurrentListItemSymbolName()));\n\tconnect(m_listhandler, SIGNAL(sendResultCurrentListItemSymbolName(QString)),\n\t\t\tm_searchhandler, SLOT(resultCurrentListItemSymbolName(QString)));\n\tconnect(m_searchhandler, SIGNAL(searchDeclarationResultsReady(QStringList)),\n\t\t\tm_fileviewer, SLOT(annotate(QStringList)));\n\tconnect(m_fileviewer, SIGNAL(requestAnnotation(QString)),\n\t\t\tm_searchhandler, SLOT(searchDeclaration(QString)));\n\tconnect(m_searchhandler, SIGNAL(searchListFuncResultsReady(sqlqueryresultlist*)),\n\t\t\tm_fileviewer, SLOT(recvFuncList(sqlqueryresultlist*)));\n\tconnect(m_fileviewer, SIGNAL(requestFuncList_filename(QString)),\n\t\t\tm_searchhandler, SLOT(searchFuncList_filename(QString)));\n\tconnect(m_fileviewer, SIGNAL(requestFuncList_fileid(int)),\n\t\t\tm_searchhandler, SLOT(searchFuncList_fileid(int)));\n\tconnect(this, SIGNAL(windowResized()),\n\t\t\tm_fileviewer, SLOT(filePathLabelTextResized()));\n\tconnect(this, SIGNAL(windowRepainted()),\n\t\t\tm_fileviewer, SLOT(repaintWidget()));\n\tconnect(ui->actionExit, SIGNAL(triggered(bool)),\n\t\t\tthis, SLOT(ExitTriggered(bool)));\n\tconnect(ui->actionAbout, SIGNAL(triggered(bool)),\n\t\t\tthis, SLOT(AboutTriggered(bool)));\n\tconnect(ui->actionAbout_Qt, SIGNAL(triggered(bool)),\n\t\t\tthis, SLOT(AboutQtTriggered(bool)));\n\tconnect(ui->actionLanguage, SIGNAL(triggered(bool)),\n\t\t\tthis, SLOT(LanguageTriggered(bool)));\n\tconnect(ui->actionOpenDB, SIGNAL(triggered(bool)),\n\t\t\tm_searchhandler, SLOT(OpenDB_ButtonClick(bool)));\n\tconnect(ui->actionOptionsExtEditor, SIGNAL(triggered(bool)),\n\t\t\tm_fileviewer, SLOT(OptionsExtEditor_Triggered(bool)));\n\tconnect(ui->actionFileViewSettings, SIGNAL(triggered(bool)),\n\t\t\tm_fileviewer, SLOT(fileViewSettings_Triggered(bool)));\n\tm_app->setQuitOnLastWindowClosed(false);\n//\tconnect(m_app, SIGNAL(lastWindowClosed()),\n//\t\t\tthis, SLOT(prepareToExit()));\n\treadSettings();\n}\n\nvoid mainwindow::setup_fileviewer(void)\n{\n\tm_fileviewer->m_pushButtonPrev = ui->pushButtonPrev;\n\tm_fileviewer->m_pushButtonNext = ui->pushButtonNext;\n\tm_fileviewer->m_pushButtonTextShrink = ui->pushButtonTextShrink;\n\tm_fileviewer->m_pushButtonTextEnlarge = ui->pushButtonTextEnlarge;\n\tm_fileviewer->m_pushButtonOpenInEditor = ui->pushButtonOpenInEditor;\n\tm_fileviewer->m_pushButtonPaste = ui->pushButtonPaste;\n\tm_fileviewer->m_pushButtonGoToLine = ui->pushButtonGoToLine;\n\tm_fileviewer->m_labelFilePath = ui->labelFilePath;\n\tm_fileviewer->m_textEditSource = ui->textEditSource;\n\tm_fileviewer->m_listWidgetFunc = ui->listWidgetFunc;\n\tm_fileviewer->m_comboBoxFuncListSort = ui->comboBoxFuncListSort;\n\tm_fileviewer->m_checkBoxSymbolOnly = ui->checkBoxSymbolOnly;\n\tm_fileviewer->init();\n}\n\nvoid mainwindow::setup_listhandler(void)\n{\n\tm_listhandler->m_treeWidgetSearchResults = ui->treeWidgetSearchResults;\n\tm_listhandler->m_pushButtonUp = ui->pushButtonUp;\n\tm_listhandler->m_pushButtonDown = ui->pushButtonDown;\n\tm_listhandler->init();\n}\n\nvoid mainwindow::setup_searchhandler(void)\n{\n\tm_searchhandler->m_pushButtonOpenDB = ui->pushButtonOpenDB;\n\tm_searchhandler->m_comboBoxDB = ui->comboBoxDB;\n\tm_searchhandler->m_checkBoxAutoComplete = ui->checkBoxAutoComplete;\n\tm_searchhandler->m_checkBoxExactMatch = ui->checkBoxExactMatch;\n\tm_searchhandler->m_pushButtonSearch = ui->pushButtonSearch;\n\tm_searchhandler->m_pushButtonClipSearch = ui->pushButtonClipSearch;\n\tm_searchhandler->m_comboBoxSearch = ui->comboBoxSearch;\n\tm_searchhandler->m_comboBoxQueryType = ui->comboBoxQueryType;\n\tm_searchhandler->m_pushButtonSearchPrev = ui->pushButtonSearchPrev;\n\tm_searchhandler->m_pushButtonSearchNext = ui->pushButtonSearchNext;\n\tm_searchhandler->m_pushButtonGraph = ui->pushButtonGraph;\n\tm_searchhandler->m_pushButtonFilesList = ui->pushButtonFilesList;\n\tm_searchhandler->m_checkBoxFilter = ui->checkBoxFilter;\n\tm_searchhandler->m_comboBoxFilter = ui->comboBoxFilter;\n\tm_searchhandler->init();\n}\n\nvoid mainwindow::LanguageTriggered(bool checked)\n{\n\tQStringList items(langtable::getLangNameList());\n\tbool ok;\n\tint curLangIdx = items.indexOf(m_currentLanguage);\n\tcurLangIdx = curLangIdx != -1 ? curLangIdx : 0;\n\n\tQInputDialog qinp(this);\n\tqinp.setCancelButtonText(tr(\"Cancel\"));\n\tqinp.setOkButtonText(tr(\"OK\"));\n\tqinp.setInputMode(QInputDialog::TextInput);\n\tqinp.setWindowTitle(tr(\"Language\"));\n\tqinp.setLabelText(tr(\"Select language:\"));\n\tqinp.setComboBoxEditable(false);\n\tqinp.setComboBoxItems(items);\n\tqinp.setTextValue(m_currentLanguage);\n\tqinp.exec();\n\tok = (qinp.result() == QDialog::Accepted);\n\tQString item = qinp.textValue();\n\tif (ok && (item.isEmpty() == false))\n\t\t{\n\t\t\tm_currentLanguage = item;\n\t\t\tretranslateUi();\n\t\t}\n}\n\nvoid mainwindow::retranslateUi(void)\n{\n\tQApplication::setOverrideCursor(QCursor(Qt::WaitCursor));\n\tm_translator.load(langtable::getLangFilePath(m_currentLanguage));\n\tm_app->installTranslator(&m_translator);\n\tui->retranslateUi(this);\n\tQString langtxt = ui->actionLanguage->text();\n\tif (m_currentLanguage.compare(\"English\") != 0) langtxt += \" (Language)\";\n\tui->actionLanguage->setText(langtxt);\n\tm_searchhandler->retranslateUi();\n\tm_listhandler->retranslateUi();\n\tQApplication::restoreOverrideCursor();\n}\n\nvoid mainwindow::ExitTriggered(bool checked)\n{\n\tclose();\n}\n\nvoid mainwindow::AboutQtTriggered(bool checked)\n{\n\tQMessageBox::aboutQt(this);\n}\n\nvoid mainwindow::AboutTriggered(bool checked)\n{\n\tcqDialogAbout cqdg(this);\n\tcqdg.setModal(true);\n\tcqdg.exec();\n}\n\nvoid mainwindow::prepareToExit()\n{\n\twriteSettings();\n\tm_listhandler->prepareToExit();\n\tm_app->quit();\n}\n\nvoid mainwindow::writeSettings()\n{\n\tQSettings settings(\"ruben2020_foss\", \"CodeQuery\");\n\n\tsettings.beginGroup(\"MainWindow\");\n\tsettings.setValue(\"Size\", size());\n\tsettings.setValue(\"Pos\", pos());\n\tsettings.setValue(\"Maximized\", isMaximized());\n\tsettings.setValue(\"AutoComplete\", ui->checkBoxAutoComplete->isChecked());\n\tsettings.setValue(\"ExactMatch\", ui->checkBoxExactMatch->isChecked());\n\tsettings.setValue(\"SymbolOnly\", ui->checkBoxSymbolOnly->isChecked());\n\tsettings.setValue(\"FilterCheckBox\", ui->checkBoxFilter->isChecked());\n\tsettings.setValue(\"QueryType\", ui->comboBoxQueryType->currentIndex());\n\tsettings.setValue(\"LastOpenDB\", ui->comboBoxDB->currentIndex());\n\tsettings.setValue(\"Language\", m_currentLanguage);\n\tsettings.setValue(\"ExtEditorPath\", m_fileviewer->m_externalEditorPath);\n\t//settings.setValue(\"FileViewerFontSize\", m_fileviewer->m_textEditSourceFont.pixelSize());\n\tsettings.setValue(\"FileViewerFontSize\", m_fileviewer->m_fontsize);\n\tsettings.setValue(\"FileViewerFontType\", m_fileviewer->m_textEditSourceFont.family());\n\tsettings.setValue(\"FileViewerTabWidth\", (int) m_fileviewer->m_textEditSource->tabWidth());\n\tsettings.setValue(\"FileViewerTheme\", m_fileviewer->m_theme);\n\tsettings.setValue(\"FuncListSortType\", ui->comboBoxFuncListSort->currentIndex());\n\tsettings.endGroup();\n\n\tsettings.beginWriteArray(\"SearchHistory\");\n\tfor (int i=0; i < ui->comboBoxSearch->count(); i++)\n\t{\n\t\tsettings.setArrayIndex(i);\n\t\tsettings.setValue(\"hist\", ui->comboBoxSearch->itemText(i));\n\t}\n\tsettings.endArray();\n\n\tsettings.beginWriteArray(\"OpenDBHistory\");\n\tfor (int i=0; i < ui->comboBoxDB->count(); i++)\n\t{\n\t\tsettings.setArrayIndex(i);\n\t\tsettings.setValue(\"db\", ui->comboBoxDB->itemText(i));\n\t}\n\tsettings.endArray();\n\n\tsettings.beginWriteArray(\"FilterHistory\");\n\tfor (int i=0; i < ui->comboBoxFilter->count(); i++)\n\t{\n\t\tsettings.setArrayIndex(i);\n\t\tsettings.setValue(\"filter\", ui->comboBoxFilter->itemText(i));\n\t}\n\tsettings.endArray();\n\n}\n\nvoid mainwindow::readSettings()\n{\n\tQSettings settings(\"ruben2020_foss\", \"CodeQuery\");\n\n\tint sizee = settings.beginReadArray(\"OpenDBHistory\");\n\tQStringList dbhist;\n\tQString ftoopen = checkForFileToOpen();\n\tif (ftoopen.isEmpty() == false) dbhist << ftoopen;\n\tfor (int i=0; i < sizee; i++)\n\t{\n\t\tsettings.setArrayIndex(i);\n\t\tdbhist << settings.value(\"db\").toString();\n\t}\n\tsettings.endArray();\n\tdbhist.removeDuplicates();\n\tif (dbhist.count() > 7) dbhist.removeLast();\n\tif (dbhist.isEmpty() == false) ui->comboBoxDB->addItems(dbhist);\n\n\tint sizef = settings.beginReadArray(\"FilterHistory\");\n\tQStringList filterhist;\n\tfor (int i=0; i < sizef; i++)\n\t{\n\t\tsettings.setArrayIndex(i);\n\t\tfilterhist << settings.value(\"filter\").toString();\n\t}\n\tsettings.endArray();\n\tif (filterhist.isEmpty()) filterhist << \"*.h\" << \"*.c\" << \"src\";\n\tui->comboBoxFilter->addItems(filterhist);\n\tui->comboBoxFilter->setCurrentIndex(0);\n\n\tsettings.beginGroup(\"MainWindow\");\n\tresize(settings.value(\"Size\", size()).toSize());\n\tmove(settings.value(\"Pos\", pos()).toPoint());\n\tif (settings.value(\"Maximized\", false).toBool()) showMaximized();\n\telse showNormal();\n\tui->checkBoxAutoComplete->setChecked(settings.value(\"AutoComplete\", true).toBool());\n\tui->checkBoxExactMatch->setChecked(settings.value(\"ExactMatch\", false).toBool());\n\tui->checkBoxSymbolOnly->setChecked(settings.value(\"SymbolOnly\", false).toBool());\n\tui->checkBoxFilter->setChecked(settings.value(\"FilterCheckBox\", false).toBool());\n\tui->comboBoxQueryType->setCurrentIndex(settings.value(\"QueryType\", 0).toInt());\n\tif (ftoopen.isEmpty() == false) ui->comboBoxDB->setCurrentIndex(0);\n\telse ui->comboBoxDB->setCurrentIndex(settings.value(\"LastOpenDB\", ui->comboBoxDB->currentIndex()).toInt());\n\tm_currentLanguage = settings.value(\"Language\", QString(\"English\")).toString();\n\tretranslateUi();\n\tm_fileviewer->m_externalEditorPath =\n\t\tsettings.value(\"ExtEditorPath\", m_fileviewer->m_externalEditorPath).toString();\n\t//m_fileviewer->m_textEditSourceFont.setPixelSize(settings.value(\"FileViewerFontSize\", 12).toInt());\n\tm_fileviewer->m_fontsize = settings.value(\"FileViewerFontSize\", 0).toInt();\n\tm_fileviewer->m_textEditSource->setZoom(m_fileviewer->m_fontsize);\n\tm_fileviewer->m_textEditSourceFont.setFamily(m_fileviewer->checkFontFamily(\n\t\tsettings.value(\"FileViewerFontType\", \n\t\t\tQFontDatabase::systemFont(QFontDatabase::FixedFont).family()).toString()));\n\tm_fileviewer->m_textEditSource->setFont(m_fileviewer->m_textEditSourceFont);\n\tm_fileviewer->m_textEditSource->setTabWidth(settings.value(\"FileViewerTabWidth\", 4).toInt());\n\tm_fileviewer->m_theme = (settings.value(\"FileViewerTheme\", \"Eclipse Default\").toString());\n\tui->comboBoxFuncListSort->setCurrentIndex(settings.value(\"FuncListSortType\", ui->comboBoxFuncListSort->currentIndex()).toInt());\n\n\tsettings.endGroup();\n\n\tint sizeh = settings.beginReadArray(\"SearchHistory\");\n\tQStringList searchhist;\n\tfor (int i=0; i < sizeh; i++)\n\t{\n\t\tsettings.setArrayIndex(i);\n\t\tsearchhist << settings.value(\"hist\").toString();\n\t}\n\tsettings.endArray();\n\tif (searchhist.isEmpty() == false)\n\t{\n\t\tui->comboBoxSearch->addItems(searchhist);\n\t\tui->comboBoxSearch->setCurrentIndex(-1);\n\t}\n\n}\n\nQString mainwindow::checkForFileToOpen(void)\n{\n\tQStringList arg = m_app->arguments();\n\tQString fn;\n\tif (arg.size() <= 1) return fn;\n\tif (arg.size() >= 3)\n\t{\n\t\tprintHelpAndExit(\"ERROR: More than 1 argument is not recognized.\");\n\t\treturn fn;\n\t}\n\tif ((arg[1] == \"--help\")||\n\t\t(arg[1] == \"-h\")||\n\t\t(arg[1] == \"-?\")||\n\t\t(arg[1] == \"/?\"))\n\t{\n\t\tprintHelpAndExit(\"\");\n\t\treturn fn;\n\t}\n\tQFileInfo qfi(arg[1]);\n\tif ((qfi.exists() == false) || (qfi.isFile() == false))\n\t{\n\t\ttempbuf buf(3000);\n\t\tsprintf(buf.get(), \"ERROR: File \\\"%s\\\" does not exist!\", arg[1].toStdString().c_str());\n\t\tprintHelpAndExit(buf.get());\n\t\treturn fn;\n\t}\n\tfn = qfi.canonicalFilePath();\n\treturn fn;\n}\n\nvoid mainwindow::printHelpAndExit(QString str)\n{\n\t\tprintf(\"codequery [path_to_codequery_database_file_to_open]\\n\");\n\t\tprintf(\"The argument is optional.\\n\");\n\t\tif (str.isEmpty() == false) printf(\"%s\\n\", str.toStdString().c_str());\n\t\tprintf(\"\\n\");\n\t\tm_listhandler->prepareToExit();\n\t\tm_app->quit();\n\t\texit(str.isEmpty() ? 0 : 1);\n}\n\n\nvoid mainwindow::resizeEvent(QResizeEvent* event)\n{\n\tQMainWindow::resizeEvent(event);\n\temit windowResized();\n}\n\nvoid mainwindow::paintEvent(QPaintEvent* event)\n{\n\tQMainWindow::paintEvent(event);\n\temit windowRepainted();\n}\n\nvoid mainwindow::closeEvent(QCloseEvent* event)\n{\n\tprepareToExit();\n}\n\n"
  },
  {
    "path": "gui/mainwindow.h",
    "content": "\n/*\n * CodeQuery\n * Copyright (C) 2013-2017 ruben2020 https://github.com/ruben2020/\n * \n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n */\n\n\n#ifndef MAINWINDOW_H_CQ\n#define MAINWINDOW_H_CQ\n\n#include <QtGlobal>\n#include <QtWidgets>\n\n namespace Ui {\n     class MainWindow;\n }\n\nclass fileviewer;\nclass listhandler;\nclass searchhandler;\n\nclass mainwindow : public QMainWindow\n{\n  Q_OBJECT\n\npublic:\nUi::MainWindow *ui;\nmainwindow(QMainWindow *parent = NULL, QApplication *app = NULL);\nvirtual ~mainwindow();\nvoid setup_fileviewer(void);\nvoid setup_listhandler(void);\nvoid setup_searchhandler(void);\nvoid retranslateUi(void);\nvoid writeSettings();\nvoid readSettings();\n\npublic slots:\nvoid AboutQtTriggered(bool checked);\nvoid AboutTriggered(bool checked);\nvoid ExitTriggered(bool checked);\nvoid LanguageTriggered(bool checked);\nvoid prepareToExit();\n\nsignals:\nvoid windowResized();\nvoid windowRepainted();\n\nprivate:\nQApplication *m_app;\nfileviewer* m_fileviewer;\nlisthandler* m_listhandler;\nsearchhandler* m_searchhandler;\nQString m_currentLanguage;\nQTranslator m_translator;\n\nvoid init(void);\nQString checkForFileToOpen(void);\nvoid printHelpAndExit(QString str);\n\nprotected:\nvirtual void resizeEvent(QResizeEvent* event);\nvirtual void paintEvent(QPaintEvent* event);\nvirtual void closeEvent(QCloseEvent* event);\n\n};\n\n \n \n#endif\n \n"
  },
  {
    "path": "gui/searchhandler.cpp",
    "content": "\n/*\n * CodeQuery\n * Copyright (C) 2013-2017 ruben2020 https://github.com/ruben2020/\n * \n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n */\n\n\n#include <QVector>\n#include <QPair>\n#include \"graphdialog.h\"\n#include \"searchhandler.h\"\n#include <QtConcurrent/QtConcurrent>\n\nsqlquery* searchhandler::sq = NULL;\nbool searchhandler::m_grepExactMatch = false;\nQRegularExpression* searchhandler::m_grepRegExp = NULL;\n\nsearchitem::searchitem()\n:exactmatch(false)\n,qtype(sqlquery::sqlquerySYMBOL)\n,rownum(1)\n{\n}\n\nsearchitem::searchitem(const searchitem& otheritem)\n{\n\tsearchterm = otheritem.searchterm;\n\tfilterterm = otheritem.filterterm;\n\texactmatch = otheritem.exactmatch;\n\tqtype = otheritem.qtype;\n\trownum = otheritem.rownum;\n}\n\nsearchitem& searchitem::operator=(const searchitem& otheritem)\n{\n\tif (&otheritem != this)\n\t{\n\t\tsearchterm = otheritem.searchterm;\n\t\tfilterterm = otheritem.filterterm;\n\t\texactmatch = otheritem.exactmatch;\n\t\tqtype = otheritem.qtype;\n\t\trownum = otheritem.rownum;\n\t}\n\treturn *this;\n}\n\n// return value: 0=same, 1=completely different, 2=only linenum changed\nint searchitem::compare(const searchitem& otheritem)\n{\n\tif ((searchterm.compare(otheritem.searchterm, Qt::CaseSensitive) != 0) ||\n\t\t(exactmatch != otheritem.exactmatch) ||\n\t\t(qtype != otheritem.qtype) ||\n\t\t(filterterm.compare(otheritem.filterterm, Qt::CaseSensitive) != 0)) return 1;\n\tif (rownum != otheritem.rownum) return 2;\n\treturn 0;\n}\n\n\nsearchhandler::searchhandler(mainwindow* pmw)\n:mw(pmw)\n,m_pushButtonOpenDB(NULL)\n,m_comboBoxDB(NULL)\n,m_checkBoxAutoComplete(NULL)\n,m_checkBoxExactMatch(NULL)\n,m_pushButtonSearch(NULL)\n,m_comboBoxSearch(NULL)\n,m_comboBoxQueryType(NULL)\n,m_checkBoxFilter(NULL)\n,m_comboBoxFilter(NULL)\n,m_srchStrLstModel(QStringList())\n,m_typeOfGraph(1)\n,m_autocompBusy(false)\n,m_declarBusy(false)\n,m_funcListBusy(false)\n,m_pushButtonClipSearch(NULL)\n,m_pushButtonSearchPrev(NULL)\n,m_pushButtonSearchNext(NULL)\n,m_pushButtonGraph(NULL)\n,m_pushButtonFilesList(NULL)\n{\n\tsq = new sqlquery;\n\tm_completer = new QCompleter(&m_srchStrLstModel, (QWidget*)mw);\n\tm_grepRegExp = new QRegularExpression();\n\tm_iter = m_searchMemoryList.begin();\n}\n\nsearchhandler::~searchhandler()\n{\n\tdisconnect();\n\tdelete sq;\n\tdelete m_completer;\n\tdelete m_grepRegExp;\n}\n\nvoid searchhandler::OpenDB_ButtonClick(bool checked)\n{\n\tif (!checked) perform_open_db();\n}\n\nvoid searchhandler::Search_ButtonClick(bool checked)\n{\n\tif (!checked) perform_search(m_comboBoxSearch->lineEdit()->text().trimmed().C_STR(),\n\t\t\t\t\tm_checkBoxExactMatch->isChecked());\n}\n\nvoid searchhandler::ClipSearch_ButtonClick(bool checked)\n{\n\tif (!checked) newSearchText();\n}\n\nvoid searchhandler::Graph_ButtonClick(bool checked)\n{\n\tif (!checked)\n\t{\n\t\temit getResultCurrentListItemSymbolName();\n\t}\n}\n\nvoid searchhandler::FilesList_ButtonClick(bool checked)\n{\n\tif (!checked)\n\t{\n\t\tperform_search(\"*\",\n\t\t\tfalse,\n\t\t\tsqlquery::sqlresultFILESLIST,\n\t\t\t\"*\",\n\t\t\t0,\n\t\t\tfalse);\n\t}\n}\n\nvoid searchhandler::PrevSearch_ButtonClick(bool checked)\n{\n\tif (!checked) goBackInSearchMemory();\n}\n\nvoid searchhandler::NextSearch_ButtonClick(bool checked)\n{\n\tif (!checked) goForwardInSearchMemory();\n}\n\nvoid searchhandler::Search_EnterKeyPressed()\n{\n\tperform_search(m_comboBoxSearch->lineEdit()->text().trimmed().C_STR(),\n\t\t\tm_checkBoxExactMatch->isChecked());\n}\n\nvoid searchhandler::searchTextEdited(const QString& searchtxt)\n{\n\tif (m_checkBoxAutoComplete->isChecked())\n\t{\n\t\tif ((m_autocompBusy)||(m_declarBusy)||(m_funcListBusy))\n\t\t{\n\t\t\tm_autocompSrchTerm = searchtxt;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tm_autocompBusy = true;\n\t\t\tm_autocompSrchTerm.clear();\n\t\t\tm_autocompFutureWatcher.setFuture(\n\t\t\t\tQtConcurrent::run(search_autocomplete_qt, searchtxt));\n\t\t}\n\t}\n\tm_autocompBusy = (!m_autocompFutureWatcher.isFinished());\n}\n\nvoid searchhandler::autoCompleteFinished()\n{\n\tif (!m_autocompBusy) return;\n\tm_srchStrLstModel.setStringList(m_autocompFutureWatcher.result());\n\tif (m_autocompSrchTerm.isEmpty())\n\t{\n\t\tm_autocompBusy = false;\n\t}\n\telse\n\t{\n\t\tm_autocompBusy = true;\n\t\tm_autocompFutureWatcher.setFuture(\n\t\t\tQtConcurrent::run(search_autocomplete_qt, m_autocompSrchTerm));\n\t\tm_autocompSrchTerm.clear();\n\t}\n}\n\nvoid searchhandler::declarSearchFinished()\n{\n\tQStringList strLst = m_declarFutureWatcher.result();\n\tm_declarBusy = false;\n\tif (strLst.length() > 0)\n\t\temit searchDeclarationResultsReady(strLst);\n}\n\nvoid searchhandler::searchDeclaration(QString searchstr)\n{\n\tif ((!m_declarBusy)&&(!m_autocompBusy)&&(!m_funcListBusy))\n\t{\n\t\tm_declarBusy = true;\n\t\tm_declarFutureWatcher.setFuture(\n\t\t\tQtConcurrent::run(search_declaration_qt, searchstr));\n\t}\n}\n\nvoid searchhandler::funcListSearchFinished()\n{\n\tsqlqueryresultlist res = m_listFuncFutureWatcher.result();\n\tif ((res.result_type == sqlqueryresultlist::sqlresultFUNC_IN_ONE_FILE) &&\n\t\t(res.resultlist.empty() == false))\n\t{\n\t\temit searchListFuncResultsReady(&res);\n\t}\n\tm_funcListBusy = false;\n}\n\nvoid searchhandler::searchFuncList_filename(QString filename)\n{\n\tif ((filename.isEmpty() == false)&&(!m_declarBusy)&&(!m_autocompBusy)&&(!m_funcListBusy))\n\t{\n\t\tm_funcListBusy = true;\n\t\tm_listFuncFutureWatcher.setFuture(\n\t\t\tQtConcurrent::run(search_funclist_qt_filename, filename));\n\t}\n}\n\nvoid searchhandler::searchFuncList_fileid(int fileid)\n{\n\tif ((fileid >= 0)&&(!m_declarBusy)&&(!m_autocompBusy)&&(!m_funcListBusy))\n\t{\n\t\tm_funcListBusy = true;\n\t\tm_listFuncFutureWatcher.setFuture(\n\t\t\tQtConcurrent::run(search_funclist_qt_fileid, fileid));\n\t}\n}\n\nsqlqueryresultlist searchhandler::search_funclist_qt_filename(QString filename)\n{\n\treturn sq->search_funclist_filename(extract_filename(filename.C_STR()));\n}\n\nsqlqueryresultlist searchhandler::search_funclist_qt_fileid(int fileid)\n{\n\treturn sq->search_funclist_fileid(fileid);\n}\n\nQStringList searchhandler::search_declaration_qt(QString searchtxt)\n{\n\tQStringList strLst;\n\tQString str;\n\tsqlqueryresultlist reslst = sq->search_declaration(searchtxt.C_STR());\n\tif (reslst.resultlist.size() > 0)\n\t{\n\t\tstr.append(reslst.resultlist[0].filename.C_STR())\n\t\t\t.append(\":\")\n\t\t\t.append(reslst.resultlist[0].linenum.C_STR())\n\t\t\t.append(\" ==> \")\n\t\t\t.append(reslst.resultlist[0].linetext.C_STR());\n\t\tstrLst << searchtxt;\n\t\tstrLst << str;\n\t}\n\treturn strLst;\n}\n\nQStringList searchhandler::search_autocomplete_qt(QString searchtxt)\n{\n\treturn sq->search_autocomplete(searchtxt.C_STR());\n}\n\nvoid searchhandler::autoCompleteStateChanged(int state)\n{\n\tif (state == Qt::Checked)\n\t{\n\t\tm_srchStrLstModel.setStringList(QStringList(m_comboBoxSearch->lineEdit()->text().trimmed()));\n\t}\n\telse if (state == Qt::Unchecked)\n\t{\n\t\tm_srchStrLstModel.setStringList(QStringList());\n\t}\n}\n\nvoid searchhandler::newSearchText()\n{\n\tQString txt = (QApplication::clipboard())->text();\n\t//m_comboBoxSearch->lineEdit()->setText(txt);\n\tperform_search(txt,m_checkBoxExactMatch->isChecked());\n}\n\nvoid searchhandler::newSearchTextSymbolOnly()\n{\n\tQString txt = (QApplication::clipboard())->text();\n\t//m_comboBoxSearch->lineEdit()->setText(txt);\n\tperform_search(txt, m_checkBoxExactMatch->isChecked(), sqlquery::sqlquerySYMBOL);\n}\n\nvoid searchhandler::init(void)\n{\n\tm_completer->setModelSorting(QCompleter::CaseSensitivelySortedModel);\n\tm_completer->setCaseSensitivity(Qt::CaseInsensitive);\n\tm_comboBoxSearch->lineEdit()->setCompleter(m_completer);\n\tm_comboBoxSearch->setInsertPolicy(QComboBox::NoInsert);\n\tretranslateUi();\n\tm_pushButtonSearchPrev->setEnabled(false);\n\tm_pushButtonSearchNext->setEnabled(false);\n\tconnect(m_pushButtonOpenDB, SIGNAL(clicked(bool)),\n\t\t\tthis, SLOT(OpenDB_ButtonClick(bool)));\n\tconnect(m_pushButtonSearch, SIGNAL(clicked(bool)),\n\t\t\tthis, SLOT(Search_ButtonClick(bool)));\n\tconnect(m_pushButtonClipSearch, SIGNAL(clicked(bool)),\n\t\t\tthis, SLOT(ClipSearch_ButtonClick(bool)));\n\tconnect(m_pushButtonGraph, SIGNAL(clicked(bool)),\n\t\t\tthis, SLOT(Graph_ButtonClick(bool)));\n\tconnect(m_pushButtonFilesList, SIGNAL(clicked(bool)),\n\t\t\tthis, SLOT(FilesList_ButtonClick(bool)));\n\tconnect(m_comboBoxSearch->lineEdit(), SIGNAL(returnPressed()),\n\t\t\tthis, SLOT(Search_EnterKeyPressed()));\n\tconnect(m_comboBoxSearch->lineEdit(), SIGNAL(textEdited(QString)),\n\t\t\tthis, SLOT(searchTextEdited(QString)));\n\tconnect(m_comboBoxDB, SIGNAL(currentIndexChanged(int)),\n\t\t\tthis, SLOT(OpenDB_indexChanged(int)));\n\tconnect(m_comboBoxQueryType, SIGNAL(currentIndexChanged(int)),\n\t\t\tthis, SLOT(QueryType_indexChanged(int)));\n\tconnect(m_checkBoxAutoComplete, SIGNAL(stateChanged(int)),\n\t\t\tthis, SLOT(autoCompleteStateChanged(int)));\n\tconnect(m_pushButtonSearchPrev, SIGNAL(clicked(bool)),\n\t\t\tthis, SLOT(PrevSearch_ButtonClick(bool)));\n\tconnect(m_pushButtonSearchNext, SIGNAL(clicked(bool)),\n\t\t\tthis, SLOT(NextSearch_ButtonClick(bool)));\n\tconnect(&m_autocompFutureWatcher, SIGNAL(finished()),\n\t\t\tthis, SLOT(autoCompleteFinished()));\n\tconnect(&m_declarFutureWatcher, SIGNAL(finished()),\n\t\t\tthis, SLOT(declarSearchFinished()));\n\tconnect(&m_listFuncFutureWatcher, SIGNAL(finished()),\n\t\t\tthis, SLOT(funcListSearchFinished()));\n}\n\nvoid searchhandler::retranslateUi(void)\n{\n\tint curidx = 0;\n\tif (m_comboBoxQueryType->count() > 0) curidx = \n\t\t\tm_comboBoxQueryType->currentIndex();\n\tm_comboBoxQueryType->clear();\n\tm_comboBoxQueryType->addItem(QIcon(),\n\t\t\t\ttr(\"Symbol\"),\n\t\t\t\tQVariant(sqlquery::sqlquerySYMBOL));\n\tm_comboBoxQueryType->addItem(QIcon(),\n\t\t\t\ttr(\"Function or macro definition (Graph available)\"),\n\t\t\t\tQVariant(sqlquery::sqlresultFUNC_MACRO));\n\tm_comboBoxQueryType->addItem(QIcon(),\n\t\t\t\ttr(\"Calls of this function or macro\"),\n\t\t\t\tQVariant(sqlquery::sqlresultCALLSOFFUNC));\n\tm_comboBoxQueryType->addItem(QIcon(),\n\t\t\t\ttr(\"Functions calling this function\"),\n\t\t\t\tQVariant(sqlquery::sqlresultCALLINGFUNC));\n\tm_comboBoxQueryType->addItem(QIcon(),\n\t\t\t\ttr(\"Functions called by this function\"),\n\t\t\t\tQVariant(sqlquery::sqlresultCALLEDFUNC));\n\tm_comboBoxQueryType->addItem(QIcon(),\n\t\t\t\ttr(\"Class or struct (Graph available)\"),\n\t\t\t\tQVariant(sqlquery::sqlresultCLASS_STRUCT));\n\tm_comboBoxQueryType->addItem(QIcon(),\n\t\t\t\ttr(\"Class which owns this member or method\"),\n\t\t\t\tQVariant(sqlquery::sqlresultOWNERCLASS));\n\tm_comboBoxQueryType->addItem(QIcon(),\n\t\t\t\ttr(\"Members or methods of this class\"),\n\t\t\t\tQVariant(sqlquery::sqlresultMEMBERS));\n\tm_comboBoxQueryType->addItem(QIcon(),\n\t\t\t\ttr(\"Parent of this class\"),\n\t\t\t\tQVariant(sqlquery::sqlresultPARENTCLASS));\n\tm_comboBoxQueryType->addItem(QIcon(),\n\t\t\t\ttr(\"Children of this class\"),\n\t\t\t\tQVariant(sqlquery::sqlresultCHILDCLASS));\n\tm_comboBoxQueryType->addItem(QIcon(),\n\t\t\t\ttr(\"Files including this file\"),\n\t\t\t\tQVariant(sqlquery::sqlresultINCLUDE));\n\tm_comboBoxQueryType->addItem(QIcon(),\n\t\t\t\ttr(\"Full path for file\"),\n\t\t\t\tQVariant(sqlquery::sqlresultFILESLIST));\n\tm_comboBoxQueryType->addItem(QIcon(),\n\t\t\t\ttr(\"Functions or macros inside this file\"),\n\t\t\t\tQVariant(sqlquery::sqlresultFUNCSINFILE));\n\tm_comboBoxQueryType->addItem(QIcon(),\n\t\t\t\t\"Grep\",\n\t\t\t\tQVariant(sqlquery::sqlresultGREP));\n\tm_comboBoxQueryType->setCurrentIndex(curidx);\n\n}\n\nvoid searchhandler::perform_open_db(void)\n{\n\tQString fileext = tr(\"CodeQuery DB Files\");\n\tfileext += \" (*.db)\";\n\tQString fileName = QFileDialog::getOpenFileName( (QWidget*)mw,\n\ttr(\"Open CQ database file\"), \"\", fileext);\n\tif (fileName.isEmpty() == false)\n\t{\n\t\tm_comboBoxDB->insertItem(0, fileName);\n\t\tm_comboBoxDB->setCurrentIndex(0);\n\t\tfor (int i=1; i < (m_comboBoxDB->count()); i++)\n\t\t{\n\t\t\tif (fileName.compare(m_comboBoxDB->itemText(i), Qt::CaseSensitive) == 0)\n\t\t\t{\n\t\t\t\tm_comboBoxDB->removeItem(i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (m_comboBoxDB->count() > 7) m_comboBoxDB->removeItem(m_comboBoxDB->count() - 1);\n\t}\n}\n\nvoid searchhandler::OpenDB_indexChanged(const int& idx)\n{\n\tif (idx < 0) return;\n\tsqlquery::en_filereadstatus sqstatus;\n\tif (m_autocompBusy)\n\t{\n\t\tm_autocompBusy = false;\n\t\tm_autocompFutureWatcher.waitForFinished();\n\t}\n\tif (m_declarBusy)\n\t{\n\t\tm_declarBusy = false;\n\t\tm_declarFutureWatcher.waitForFinished();\n\t}\n\tif (m_funcListBusy)\n\t{\n\t\tm_funcListBusy = false;\n\t\tm_listFuncFutureWatcher.waitForFinished();\n\t}\n\tsq->close_dbfile();\n\tQFileInfo dbfile(m_comboBoxDB->itemText(idx));\n\tsqstatus = sq->open_dbfile(m_comboBoxDB->itemText(idx));\n\tif (sqstatus != sqlquery::sqlfileOK)\n\t{\n\t\tQMessageBox msgBox((QWidget*)mw);\n\t\tmsgBox.setText(sqlerrormsg(sqstatus));\n\t\tmsgBox.exec();\n\t\tm_comboBoxDB->removeItem(idx);\n\t}\n\telse\n\t{\n\t\tQApplication::setOverrideCursor(QCursor(Qt::WaitCursor));\n\t\tm_comboBoxSearch->clear();\n\t\tm_comboBoxSearch->lineEdit()->clear();\n\t\tm_searchMemoryList.clear();\n\t\tm_iter = m_searchMemoryList.begin();\n\t\tm_pushButtonSearchPrev->setEnabled(false);\n\t\tm_pushButtonSearchNext->setEnabled(false);\n\t\temit sendDBtimestamp(dbfile.lastModified());\n\t\temit DBreset();\n\t\tQApplication::restoreOverrideCursor();\n\t}\n}\n\nvoid searchhandler::QueryType_indexChanged(const int& idx)\n{\n\tint qrytype;\n\tm_pushButtonGraph->setEnabled(false);\n\tqrytype = m_comboBoxQueryType->itemData(idx).toInt();\n\tswitch(qrytype)\n\t{\n\t\tcase sqlquery::sqlresultFUNC_MACRO: // function or macro\n\t\t\tm_graphdesc = tr(\"Function Call Graph\");\n\t\t\tm_typeOfGraph = 1;\n\t\t\tbreak;\n\t\tcase sqlquery::sqlresultCLASS_STRUCT: // class or struct\n\t\t\tm_graphdesc = tr(\"Class Inheritance Graph\");\n\t\t\tm_typeOfGraph = 2;\n\t\t\tbreak;\n\t}\n\tif (qrytype == sqlquery::sqlresultGREP)\n\t{\n#ifndef QT_NO_TOOLTIP\n        m_comboBoxSearch->setToolTip(\"Grep: QRegularExpression regular expressions\");\n#endif // QT_NO_TOOLTIP\n#ifndef QT_NO_STATUSTIP\n        m_comboBoxSearch->setStatusTip(\"Grep: QRegularExpression regular expressions\");\n#endif // QT_NO_STATUSTIP\n\t}\n\telse\n\t{\n#ifndef QT_NO_TOOLTIP\n        m_comboBoxSearch->setToolTip(tr(\"If Exact Match is switched off, wildcard searches (* and ?) are supported\"));\n#endif // QT_NO_TOOLTIP\n#ifndef QT_NO_STATUSTIP\n        m_comboBoxSearch->setStatusTip(tr(\"If Exact Match is switched off, wildcard searches (* and ?) are supported\"));\n#endif // QT_NO_STATUSTIP\n\t}\n\tSearch_EnterKeyPressed();\n}\n\nvoid searchhandler::perform_search(QString searchtxt,\n\t\t\tbool exactmatch,\n\t\t\tsqlquery::en_queryType qrytyp,\n\t\t\tQString filtertxt,\n\t\t\tint selectitem,\n\t\t\tbool updSearchMemory)\n{\n\tif (sq->isDBOpen() == false) return;\n\tif (searchtxt.isEmpty()) return;\n\tsqlqueryresultlist sqlresultlist;\n\tQApplication::setOverrideCursor(QCursor(Qt::WaitCursor));\n\tif (m_autocompBusy)\n\t{\n\t\tm_autocompBusy = false;\n\t\tm_autocompFutureWatcher.waitForFinished();\n\t}\n\tif (m_declarBusy)\n\t{\n\t\tm_declarBusy = false;\n\t\tm_declarFutureWatcher.waitForFinished();\n\t}\n\tif (m_funcListBusy)\n\t{\n\t\tm_funcListBusy = false;\n\t\tm_listFuncFutureWatcher.waitForFinished();\n\t}\n\tsqlquery::en_queryType querytype = qrytyp;\n\tif (querytype == sqlquery::sqlresultDEFAULT) querytype = \n\t\t(sqlquery::en_queryType)m_comboBoxQueryType->itemData(m_comboBoxQueryType->currentIndex()).toInt();\n\tif ((filtertxt.isEmpty()) && (m_checkBoxFilter->isChecked()))\n\t{\n\t\tfiltertxt = m_comboBoxFilter->lineEdit()->text().trimmed();\n\t\tif (updSearchMemory) updateFilterHistory(filtertxt);\n\t}\n\tif (querytype == sqlquery::sqlresultGREP)\n\t{\n\t\tif (filtertxt.isEmpty()) filtertxt = \"*\";\n\t\tsqlresultlist = sq->search(filtertxt.C_STR(),\n\t\t\t\tsqlquery::sqlresultFILEPATH, false);\n\t}\n\telse\n\t{\n\t\tsqlresultlist = sq->search(searchtxt.C_STR(),\n\t\t\t\tquerytype, exactmatch,\n\t\t\t\tfiltertxt.C_STR());\n\t}\n\tQApplication::restoreOverrideCursor();\n\tif (sqlresultlist.result_type == sqlqueryresultlist::sqlresultERROR)\n\t{\n\t\tQMessageBox msgBox((QWidget*)mw);\n\t\tmsgBox.setText(sqlresultlist.sqlerrmsg);\n\t\tmsgBox.exec();\n\t}\n\telse\n\t{\n\t\tm_pushButtonGraph->setEnabled((querytype == sqlquery::sqlresultFUNC_MACRO)||\n\t\t\t(querytype == sqlquery::sqlresultCLASS_STRUCT));\n\t\tupdateSearchHistory(searchtxt);\n\t\tif (updSearchMemory) addToSearchMemory(searchtxt, filtertxt);\n\t\tif (querytype == sqlquery::sqlresultGREP)\n\t\t{\n\t\t\tsqlresultlist = perform_grep(searchtxt, sqlresultlist, exactmatch);\n\t\t}\n\t\temit searchresults(sqlresultlist, selectitem);\n\t\tQString str;\n\t\tstr = QString(\"%1\").arg(sqlresultlist.resultlist.size());\n\t\tstr += \" \";\n\t\tstr += tr(\"results found\");\n\t\temit updateStatus(str, 5000);\n\t}\n}\n\nsqlqueryresultlist searchhandler::perform_grep(QString searchtxt, sqlqueryresultlist searchlist, bool exactmatch)\n{\n\tQVector<QPair<QString, int>> strvec;\n\tsqlqueryresultlist resultlist;\n\tQFutureWatcher<sqlqueryresultlist> futureWatcher;\n\tQProgressDialog dialog;\n\tlong n = searchlist.resultlist.size();\n\tif (n == 0) return resultlist;\n\tstrvec.resize(n);\n\tfor (long i=0; i < n; i++)\n\t{\n\t\tstrvec.replace(i, qMakePair(searchlist.resultlist[i].filepath, searchlist.resultlist[i].fileid));\n\t}\n\tdialog.setAutoReset(false);\n\tdialog.setLabelText(QString(\"Grep \").append(QString(tr(\"in progress\"))).append(QString(\" ...\")));\n\tdialog.setCancelButtonText(tr(\"Cancel\"));\n\tQObject::connect(&futureWatcher, SIGNAL(finished()), &dialog, SLOT(reset()));\n\tQObject::connect(&dialog, SIGNAL(canceled()), &futureWatcher, SLOT(cancel()));\n\tQObject::connect(&futureWatcher, SIGNAL(progressRangeChanged(int,int)), &dialog, SLOT(setRange(int,int)));\n\tQObject::connect(&futureWatcher, SIGNAL(progressValueChanged(int)), &dialog, SLOT(setValue(int)));\n\tm_grepExactMatch = exactmatch;\n\t(*m_grepRegExp) = QRegularExpression(searchtxt.C_STR(), QRegularExpression::CaseInsensitiveOption);\n\tfutureWatcher.setFuture(QtConcurrent::mappedReduced(strvec, doGrep,\n\t\t\t\tcollateGrep, QtConcurrent::SequentialReduce));\n\tdialog.exec();\n\tfutureWatcher.waitForFinished();\n\tif (futureWatcher.isCanceled() == false)\n\t\tresultlist = futureWatcher.result();\n\treturn resultlist;\n}\n\nsqlqueryresultlist searchhandler::doGrep(const QPair<QString, int> &fp)\n{\n\tsqlqueryresultlist reslist;\n\tsqlqueryresult res;\n\ttStr str, fp2, fn;\n\tQRegularExpressionMatch pos;\n\tlong linenumber=0;\n\tchar numtext[30];\n\tQRegularExpression rx1(*m_grepRegExp);\n\treslist.result_type = sqlqueryresultlist::sqlresultFILE_LINE;\n\tfp2 = fp.first; // path of file to be searched\n\tfp2.replace(QString(\"$HOME\"), QDir::homePath());\n#ifdef _WIN32\n\tfp2.replace(\"/\", \"\\\\\");\n#endif\n\tfn = extract_filename(fp2.C_STR());\n\tQFile file(fp2);\n\tQTextStream in(&file);\n\tif (!file.open(QIODevice::ReadOnly | QIODevice::Text))\n\t{\n\t\treturn reslist;\n\t}\n\twhile (!in.atEnd())\n\t{\n\t\tlinenumber++;\n\t\tstr = in.readLine();\n\t\tpos = rx1.match(str);\n\t\tif (pos.hasMatch())\n\t\t{\n\t\t\tres.filepath = fp2;\n\t\t\tres.filename = fn;\n\t\t\tres.fileid = fp.second;\n\t\t\tsprintf(numtext, \"%ld\", linenumber);\n\t\t\tres.linenum = numtext;\n\t\t\tres.linetext = str.trimmed().left(800);\n\t\t\treslist.resultlist.push_back(res);\n\t\t}\n\t}\n\treturn reslist;\n}\n\nvoid searchhandler::collateGrep(sqlqueryresultlist &result,\n\t\t\tconst sqlqueryresultlist &intermediate)\n{\n\tlong i, n;\n\tn = intermediate.resultlist.size();\n\tresult.result_type = sqlqueryresultlist::sqlresultFILE_LINE;\n\tresult.resultlist.reserve(n);\n\tfor(i=0; i<n; i++)\n\t{\n\t\tresult.resultlist.push_back(intermediate.resultlist[i]);\n\t}\n}\n\nvoid searchhandler::updateFilterHistory(QString filtertxt)\n{\n\tif (filtertxt.isEmpty()) return;\n\tm_comboBoxFilter->insertItem(0, filtertxt);\n\tm_comboBoxFilter->setCurrentIndex(0);\n\tfor(int i=1; i < m_comboBoxFilter->count(); i++)\n\t{\n\t\tif (m_comboBoxFilter->itemText(i).compare(filtertxt) == 0)\n\t\t{\n\t\t\tm_comboBoxFilter->removeItem(i);\n\t\t\tbreak;\n\t\t}\n\t}\n\tif (m_comboBoxFilter->count() > 7) // limit to 7\n\t{\n\t\tm_comboBoxFilter->removeItem(m_comboBoxFilter->count() - 1);\n\t}\n}\n\nvoid searchhandler::resultCurrentListItemSymbolName(const QString symName)\n{\n\tif (symName.isEmpty())\n\t{\n\t\tQMessageBox msgBox((QWidget*)mw);\n\t\tmsgBox.setIcon(QMessageBox::Information);\n\t\tmsgBox.setStandardButtons(QMessageBox::Ok);\n\t\tmsgBox.setText(tr(\"You have to first select an item from the list before pushing the Graph button.\"));\n\t\tmsgBox.exec();\n\t\treturn;\n\t}\t\n\n\tQStringList grpxml, grpdot;\n\tbool res;\n\tQApplication::setOverrideCursor(QCursor(Qt::WaitCursor));\n\tif (m_autocompBusy)\n\t{\n\t\tm_autocompBusy = false;\n\t\tm_autocompFutureWatcher.waitForFinished();\n\t}\n\tif (m_declarBusy)\n\t{\n\t\tm_declarBusy = false;\n\t\tm_declarFutureWatcher.waitForFinished();\n\t}\n\tif (m_funcListBusy)\n\t{\n\t\tm_funcListBusy = false;\n\t\tm_listFuncFutureWatcher.waitForFinished();\n\t}\n\tif (m_typeOfGraph == 1)\n\t{\n\t\tres = sq->search_funcgraph(symName,\n\t\t\t\ttrue,\n\t\t\t\tgrpxml, grpdot);\n\t\tres = sq->search_funcgraph(symName,\n\t\t\t\ttrue,\n\t\t\t\tgrpxml, grpdot, 2);\n\t}\n\telse if (m_typeOfGraph == 2)\n\t{\n\t\tres = sq->search_classinheritgraph(symName,\n\t\t\t\ttrue,\n\t\t\t\tgrpxml, grpdot);\n\t}\n\telse {QApplication::restoreOverrideCursor(); return;}\n\tQApplication::restoreOverrideCursor();\n\tQMessageBox msgBox((QWidget*)mw);\n\tmsgBox.setIcon(QMessageBox::Warning);\n\tmsgBox.setStandardButtons(QMessageBox::Ok);\n\tif (!res)\n\t{\n\t\tmsgBox.setText(\"SQL Query error\");\n\t\tmsgBox.exec();\n\t\treturn;\n\t}\n\tQApplication::setOverrideCursor(QCursor(Qt::WaitCursor));\n\tcqDialogGraph cqdg((QWidget*)mw);\n\tcqdg.setModal(true);\n\tcqdg.setupGraphFromXML(grpxml, grpdot, m_graphdesc);\n\tQApplication::restoreOverrideCursor();\n\tcqdg.exec();\n}\n\nvoid searchhandler::addToSearchMemory(const QString& searchtxt, const QString& filtertxt)\n{\n\tsearchitem item;\n\titem.searchterm = searchtxt;\n\titem.filterterm = filtertxt;\n\titem.exactmatch = m_checkBoxExactMatch->isChecked();\n\titem.qtype = (sqlquery::en_queryType)\n\t\tm_comboBoxQueryType->itemData(m_comboBoxQueryType->currentIndex()).toInt();\n\tm_searchMemoryList.push_back(item);\n\tif (m_searchMemoryList.size() > 20) m_searchMemoryList.erase(m_searchMemoryList.begin());\n\tm_iter = m_searchMemoryList.end() - 1;\n\tm_pushButtonSearchPrev->setEnabled(m_searchMemoryList.isEmpty() == false);\n\tm_pushButtonSearchNext->setEnabled(false);\n}\n\nvoid searchhandler::goForwardInSearchMemory(void)\n{\n\tif (m_searchMemoryList.size() <= 1) return;\n\tif (m_iter == m_searchMemoryList.end() - 1) return;\n\tm_iter++;\n\tm_pushButtonSearchPrev->setEnabled(m_searchMemoryList.isEmpty() == false);\n\tm_pushButtonSearchNext->setEnabled(m_iter != m_searchMemoryList.end() - 1);\n\trestoreSearchMemoryItem();\n}\n\nvoid searchhandler::goBackInSearchMemory(void)\n{\n\tif (m_searchMemoryList.size() <= 1) return;\n\tif (m_iter == m_searchMemoryList.begin()) return;\n\tm_iter--;\n\tm_pushButtonSearchPrev->setEnabled(m_iter != m_searchMemoryList.begin());\n\tm_pushButtonSearchNext->setEnabled(m_searchMemoryList.isEmpty() == false);\n\trestoreSearchMemoryItem();\n}\n\nvoid searchhandler::restoreSearchMemoryItem(void)\n{\n\tperform_search(m_iter->searchterm,\n\t\t\tm_iter->exactmatch,\n\t\t\tm_iter->qtype,\n\t\t\tm_iter->filterterm,\n\t\t\tm_iter->rownum,\n\t\t\tfalse);\n}\n\nvoid searchhandler::updateListItemRowNum(const int& row)\n{\n\tif (m_searchMemoryList.isEmpty() == false) m_iter->rownum = row;\n}\n\nvoid searchhandler::updateSearchHistory(const QString& searchtxt)\n{\n\tm_comboBoxSearch->insertItem(0, searchtxt); // insert to top\n\tint n = (m_comboBoxSearch->count());\n\tfor(int i=1; i < n; i++)\n\t{\n\t\tif (m_comboBoxSearch->itemText(i).compare(searchtxt, Qt::CaseSensitive) == 0)\n\t\t{\n\t\t\tm_comboBoxSearch->removeItem(i); // remove duplicates\n\t\t\tbreak;\n\t\t}\n\t}\n\t// limit to 15 only\n\tif (m_comboBoxSearch->count() > 15) m_comboBoxSearch->removeItem(m_comboBoxSearch->count() - 1);\n\tm_comboBoxSearch->setCurrentIndex(0);\n}\n\nQString searchhandler::sqlerrormsg(sqlquery::en_filereadstatus status)\n{\n\tQString str;\n\tswitch(status)\n\t{\n\t\tcase sqlquery::sqlfileOPENERROR: str = tr(\"File open error\"); break;\n\t\tcase sqlquery::sqlfileNOTCORRECTDB: str = tr(\"Wrong file format\"); break;\n\t\tcase sqlquery::sqlfileINCORRECTVER: str = tr(\"Incorrect CQ database version\"); break;\n\t\tcase sqlquery::sqlfileOK: str = tr(\"OK\"); break;\n\t\tcase sqlquery::sqlfileUNKNOWNERROR:\n\t\tdefault: str = tr(\"Unknown Error\"); break;\n\t}\n\treturn str;\n}\n\n"
  },
  {
    "path": "gui/searchhandler.h",
    "content": "\n/*\n * CodeQuery\n * Copyright (C) 2013-2017 ruben2020 https://github.com/ruben2020/\n * \n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n */\n\n\n#ifndef SEARCHHANDLER_H_CQ\n#define SEARCHHANDLER_H_CQ\n\n#include <QtGlobal>\n#include <QtWidgets>\n\n#include \"sqlquery.h\"\n\nclass mainwindow;\n\nclass searchitem\n{\npublic:\n\tsearchitem();\n\t~searchitem(){}\n\tsearchitem(const searchitem& otheritem);\n\tsearchitem& operator=(const searchitem& otheritem);\n\n\t// return value: 0=same, 1=completely different, 2=only linenum changed\n\tint compare(const searchitem& otheritem);\n\n\tQString searchterm;\n\tQString filterterm;\n\tbool exactmatch;\n\tsqlquery::en_queryType qtype;\n\tint rownum;\n};\n\nclass searchhandler : public QObject\n{\n  Q_OBJECT\n\npublic:\nQPushButton *m_pushButtonOpenDB;\nQComboBox *m_comboBoxDB;\nQCheckBox *m_checkBoxAutoComplete;\nQCheckBox *m_checkBoxExactMatch;\nQPushButton *m_pushButtonSearch;\nQPushButton *m_pushButtonClipSearch;\nQPushButton *m_pushButtonSearchPrev;\nQPushButton *m_pushButtonSearchNext;\nQComboBox *m_comboBoxSearch;\nQComboBox *m_comboBoxQueryType;\nQPushButton *m_pushButtonGraph;\nQPushButton *m_pushButtonFilesList;\nQCheckBox *m_checkBoxFilter;\nQComboBox *m_comboBoxFilter;\nQCompleter *m_completer;\nQFutureWatcher<QStringList> m_autocompFutureWatcher;\nQFutureWatcher<QStringList> m_declarFutureWatcher;\nQFutureWatcher<sqlqueryresultlist> m_listFuncFutureWatcher;\nstatic bool m_grepExactMatch;\nstatic QRegularExpression* m_grepRegExp;\n\nsearchhandler(mainwindow* pmw);\n~searchhandler();\nvoid init(void);\nvoid perform_open_db(void);\nvoid perform_search(QString searchtxt,\n\t\t\tbool exactmatch,\n\t\t\tsqlquery::en_queryType qrytyp = sqlquery::sqlresultDEFAULT,\n\t\t\tQString filtertxt = \"\",\n\t\t\tint selectitem = 0,\n\t\t\tbool updSearchMemory = true);\nvoid updateSearchHistory(const QString& searchtxt);\nvoid addToSearchMemory(const QString& searchtxt, const QString& filtertxt);\nvoid goForwardInSearchMemory(void);\nvoid goBackInSearchMemory(void);\nvoid restoreSearchMemoryItem(void);\nvoid retranslateUi(void);\nstatic QStringList search_autocomplete_qt(QString searchtxt);\nstatic QStringList search_declaration_qt(QString searchtxt);\nstatic sqlqueryresultlist search_funclist_qt_filename(QString filename);\nstatic sqlqueryresultlist search_funclist_qt_fileid(int fileid);\nstatic sqlqueryresultlist doGrep(const QPair<QString, int> &fp);\nstatic void collateGrep(sqlqueryresultlist &result,\n\t\t\tconst sqlqueryresultlist &intermediate);\n\npublic slots:\nvoid OpenDB_ButtonClick(bool checked);\nvoid Search_ButtonClick(bool checked);\nvoid PrevSearch_ButtonClick(bool checked);\nvoid NextSearch_ButtonClick(bool checked);\nvoid ClipSearch_ButtonClick(bool checked);\nvoid Graph_ButtonClick(bool checked);\nvoid FilesList_ButtonClick(bool checked);\nvoid Search_EnterKeyPressed();\nvoid searchTextEdited(const QString& searchtxt);\nvoid newSearchText();\nvoid newSearchTextSymbolOnly();\nvoid autoCompleteStateChanged(int state);\nvoid OpenDB_indexChanged(const int& idx);\nvoid QueryType_indexChanged(const int& idx);\nvoid updateListItemRowNum(const int& row);\nvoid resultCurrentListItemSymbolName(const QString symName);\nvoid searchDeclaration(QString searchstr);\nvoid searchFuncList_filename(QString filename);\nvoid searchFuncList_fileid(int fileid);\nvoid autoCompleteFinished();\nvoid declarSearchFinished();\nvoid funcListSearchFinished();\n\nsignals:\nvoid searchresults(sqlqueryresultlist resultlist, int selectitem);\nvoid updateStatus(const QString & message, int timeout = 0);\nvoid DBreset();\nvoid sendDBtimestamp(QDateTime dt);\nvoid getResultCurrentListItemSymbolName();\nvoid searchDeclarationResultsReady(QStringList resdeclar);\nvoid searchListFuncResultsReady(sqlqueryresultlist* res);\n\nprivate:\nmainwindow *mw;\nstatic sqlquery* sq;\nQString m_graphdesc;\nint m_typeOfGraph; // 1 = Function Call, 2 = Class Inheritance\nQStringListModel m_srchStrLstModel;\nQString sqlerrormsg(sqlquery::en_filereadstatus status);\nQVector<searchitem> m_searchMemoryList;\nQVector<searchitem>::iterator m_iter;\nbool m_autocompBusy;\nbool m_declarBusy;\nbool m_funcListBusy;\nQString m_autocompSrchTerm;\n\nvoid updateFilterHistory(QString filtertxt);\nsqlqueryresultlist perform_grep(QString searchtxt, sqlqueryresultlist searchlist, bool exactmatch);\n\n};\n\n\n#endif\n\n"
  },
  {
    "path": "gui/themes/Bespin.xml",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\" ?>\r\n<!--//\r\n\r\nBespin\r\nCopyright (c) 2009 Oren Farhi, Orizen Designs - http://www.orizens.com\r\n\r\nPermission is hereby granted, free of charge, to any person\r\nobtaining a copy of this software and associated documentation\r\nfiles (the \"Software\"), to deal in the Software without\r\nrestriction, including without limitation the rights to use,\r\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\r\ncopies of the Software, and to permit persons to whom the\r\nSoftware is furnished to do so, subject to the following\r\nconditions:\r\n\r\nThe above copyright notice and this permission notice shall be\r\nincluded in all copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\r\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\r\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\r\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\r\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\r\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\r\nOTHER DEALINGS IN THE SOFTWARE.\r\n\r\nRequirements:\r\n    * This style is based on DejaVu fonts <http://dejavu.sourceforge.net/wiki/index.php/Main_Page>.\r\n    * Notepad++, of course.\r\n\r\nInstallation:\r\n    Copy this file to C:\\Documents and Settings\\%%USERNAME%%\\Application Data\\Notepad++\\themes\r\n\r\n\r\nCredits:\r\n    Thanks for the original Textmate theme author.\r\n    Thanks for Fabio Zendhi Nagao for the tmTheme2nppStyler.\r\n    Thanks for the user for the tmTheme source.\r\n\r\n//-->\r\n<NotepadPlus>\r\n    <LexerStyles>\r\n        <LexerType name=\"c\" desc=\"C\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F6F080\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPEWORD\" styleID=\"16\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFB454\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"cpp\" desc=\"C++\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F6F080\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFB454\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"java\" desc=\"Java\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F6F080\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFB454\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"cs\" desc=\"C#\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F6F080\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFB454\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"rc\" desc=\"RC\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F6F080\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFB454\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"tcl\" desc=\"TCL\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F6F080\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFB454\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"objc\" desc=\"Objective-C\" ext=\"\">\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"19\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"QUALIFIER\" styleID=\"20\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F6F080\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFB454\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"sql\" desc=\"SQL\" ext=\"\">\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"5\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"7\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"html\" desc=\"HTML\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"BDAE9D\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"666666\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"6\" fgColor=\"80FF80\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"7\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"37A8ED\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAGEND\" styleID=\"11\" fgColor=\"37A8ED\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAGUNKNOWN\" styleID=\"2\" fgColor=\"FF0000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"3\" fgColor=\"E5C138\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ATTRIBUTEUNKNOWN\" styleID=\"4\" fgColor=\"FF0080\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SGMLDEFAULT\" styleID=\"21\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CDATA\" styleID=\"17\" fgColor=\"FF82B0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VALUE\" styleID=\"19\" fgColor=\"FF8080\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ENTITY\" styleID=\"10\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"php\" desc=\"php\" ext=\"\">\r\n            <WordsStyle name=\"QUESTION MARK\" styleID=\"18\" fgColor=\"FF0080\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"118\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"USER-DEFINED\" styleID=\"16\" fgColor=\"FF5555\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\">the_ID the_post have_posts wp_link_pages the_content</WordsStyle>\r\n            <WordsStyle name=\"STRING\" styleID=\"119\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING VARIABLE\" styleID=\"126\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SIMPLESTRING\" styleID=\"120\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"121\" fgColor=\"37A3ED\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\">$_POST $_GET $_SESSION</WordsStyle>\r\n            <WordsStyle name=\"NUMBER\" styleID=\"122\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"123\" fgColor=\"BDAF9D\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"124\" fgColor=\"666666\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"125\" fgColor=\"666666\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"127\" fgColor=\"E5C138\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"javascript\" desc=\"Javascript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"41\" fgColor=\"BDAF9D\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"45\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"46\" fgColor=\"BDAE9D\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"47\" fgColor=\"37A3ED\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\">alert appendChild arguments array blur checked childNodes className confirm dialogArguments event focus getElementById getElementsByTagName innerHTML keyCode length location null number parentNode push RegExp replace selectNodes selectSingleNode setAttribute split src srcElement test undefined value window</WordsStyle>\r\n            <WordsStyle name=\"USER-DEFINED\" styleID=\"16\" fgColor=\"FF5555\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\">XmlUtil loadXmlString TopologyXmlTree NotificationArea loadXmlFile debug</WordsStyle>\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"48\" fgColor=\"00FF40\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"49\" fgColor=\"80FF00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SYMBOLS\" styleID=\"50\" fgColor=\"E5C138\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"51\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"52\" fgColor=\"FFB454\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"42\" fgColor=\"666666\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"43\" fgColor=\"666666\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTDOC\" styleID=\"44\" fgColor=\"FFFF80\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"FF0080\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\">param @projectDescription projectDescription @param</WordsStyle>\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"FF0080\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"asp\" desc=\"asp\" ext=\"asp\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"81\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"82\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"83\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"84\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\">import</WordsStyle>\r\n            <WordsStyle name=\"STRING\" styleID=\"85\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\">import</WordsStyle>\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"87\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"86\" fgColor=\"EB939A\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ASPSYBOL\" styleID=\"15\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SCRIPTTYPE\" styleID=\"16\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"xml\" desc=\"XML\" ext=\"\">\r\n            <WordsStyle name=\"XMLSTART\" styleID=\"12\" fgColor=\"FF0080\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"XMLEND\" styleID=\"13\" fgColor=\"FF0080\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"666666\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"6\" fgColor=\"80FF80\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"7\" fgColor=\"80FF00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"37A8ED\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAGEND\" styleID=\"11\" fgColor=\"37A8ED\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAGUNKNOWN\" styleID=\"2\" fgColor=\"FF0000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"3\" fgColor=\"BDAE9D\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ATTRIBUTEUNKNOWN\" styleID=\"4\" fgColor=\"FF8080\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SGMLDEFAULT\" styleID=\"21\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CDATA\" styleID=\"17\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"ini\" desc=\"ini file\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"2\" fgColor=\"EFE900\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ASSIGNMENT\" styleID=\"3\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFVAL\" styleID=\"4\" fgColor=\"EFE900\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"props\" desc=\"Properties file\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ASSIGNMENT\" styleID=\"3\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFVAL\" styleID=\"4\" fgColor=\"EFE900\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"diff\" desc=\"DIFF\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"2\" fgColor=\"EB939A\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"HEADER\" styleID=\"3\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"POSITION\" styleID=\"4\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DELETED\" styleID=\"5\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ADDED\" styleID=\"6\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"nfo\" desc=\"Dos Style\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"32\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontSize=\"\" fontStyle=\"0\" />\r\n        </LexerType>\r\n        <LexerType name=\"makefile\" desc=\"Makefile\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"2\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"3\" fgColor=\"EB939A\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"4\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TARGET\" styleID=\"5\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDEOL\" styleID=\"9\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"vb\" desc=\"VB / VBS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"7\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"3\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DATE\" styleID=\"8\" fgColor=\"9DF39F\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"css\" desc=\"CSS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"EFE900\" bgColor=\"2A211C\" fontName=\"Batang\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CLASS\" styleID=\"2\" fgColor=\"EFE900\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PSEUDOCLASS\" styleID=\"3\" fgColor=\"EFE900\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"UNKNOWN_PSEUDOCLASS\" styleID=\"4\" fgColor=\"EFE900\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"5\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"6\" fgColor=\"EB939A\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"UNKNOWN_IDENTIFIER\" styleID=\"7\" fgColor=\"EB939A\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VALUE\" styleID=\"8\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ID\" styleID=\"10\" fgColor=\"EFE900\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IMPORTANT\" styleID=\"11\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"12\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"pascal\" desc=\"Pascal\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"EB939A\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F6F080\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFB454\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"perl\" desc=\"Perl\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F6F080\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"17\" fgColor=\"FFB454\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SCALAR\" styleID=\"12\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ARRAY\" styleID=\"13\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"HASH\" styleID=\"14\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SYMBOL TABLE\" styleID=\"15\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PUNCTUATION\" styleID=\"8\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"POD\" styleID=\"3\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"LONGQUOTE\" styleID=\"19\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DATASECTION\" styleID=\"21\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGSUBST\" styleID=\"18\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"20\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"python\" desc=\"Python\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"4\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KEYWORDS\" styleID=\"5\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TRIPLE\" styleID=\"6\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TRIPLEDOUBLE\" styleID=\"7\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CLASSNAME\" styleID=\"8\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFNAME\" styleID=\"9\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"EB939A\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTBLOCK\" styleID=\"12\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"12\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"batch\" desc=\"Batch\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KEYWORDS\" styleID=\"2\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"3\" fgColor=\"EFE900\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"HIDE SYBOL\" styleID=\"4\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"5\" fgColor=\"EB939A\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"6\" fgColor=\"FB9A4B\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"lua\" desc=\"Lua\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"LITERALSTRING\" styleID=\"8\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F6F080\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"FUNC1\" styleID=\"13\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"FUNC2\" styleID=\"14\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"FUNC3\" styleID=\"15\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n        </LexerType>\r\n        <LexerType name=\"tex\" desc=\"TeX\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"1\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"GROUP\" styleID=\"2\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"3\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"4\" fgColor=\"EB939A\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"5\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"nsis\" desc=\"NSIS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING DOUBLE QUOTE\" styleID=\"2\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING LEFT QUOTE\" styleID=\"3\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING RIGHT QUOTE\" styleID=\"4\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\">endfunction endif</WordsStyle>\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"5\" fgColor=\"FFB454\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"6\" fgColor=\"FB9A4B\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"7\" fgColor=\"EFE900\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"USER DEFINED\" styleID=\"8\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"9\" fgColor=\"EFE900\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SUBSECTION\" styleID=\"10\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IF DEFINE\" styleID=\"11\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"12\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING VAR\" styleID=\"13\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"14\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SECTION GROUP\" styleID=\"15\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PAGE EX\" styleID=\"16\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"FUNCTION DEFINITIONS\" styleID=\"17\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"18\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"actionscript\" desc=\"ActionScript\" ext=\"\">\r\n            <!--\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"19\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            -->\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"BDAF9D\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"20\" fgColor=\"37A3ED\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\">ContentScroller</WordsStyle>\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"E5C138\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"37A3ED\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\">onMotionChanged onMotionFinished Tween ImagesStrip ContentScroller mx transitions easing Sprite Point MouseEvent Event BitmapData Timer TimerEvent addEventListener event x y height width</WordsStyle>\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"80FF80\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"7E7E7E\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFFF00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"7E7E7E\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"7E7E7E\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"FFFF80\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"FFFF80\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"FF0080\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"FF0000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"bash\" desc=\"bash\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"4\" fgColor=\"F6F080\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"5\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"6\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"8\" fgColor=\"EB939A\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SCALAR\" styleID=\"9\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PARAM\" styleID=\"10\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"11\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"HERE DELIM\" styleID=\"12\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"HERE Q\" styleID=\"13\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"fortran\" desc=\"Fortran\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"4\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"5\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"EB939A\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"8\" fgColor=\"F6F080\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION1\" styleID=\"9\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"FUNCTION2\" styleID=\"10\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"11\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR2\" styleID=\"12\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"13\" fgColor=\"EFE900\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CONTINUATION\" styleID=\"14\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"lisp\" desc=\"LISP\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"FUNCTION WORD\" styleID=\"3\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"5\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"8\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"9\" fgColor=\"EB939A\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"11\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"asm\" desc=\"Assembler\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"4\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"5\" fgColor=\"EB939A\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CPU INSTRUCTION\" styleID=\"6\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"MATH INSTRUCTION\" styleID=\"7\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"REGISTER\" styleID=\"8\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"9\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"DIRECTIVE OPERAND\" styleID=\"10\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"COMMENT BLOCK\" styleID=\"11\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"12\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"13\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"EXT INSTRUCTION\" styleID=\"14\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type4\" />\r\n        </LexerType>\r\n        <LexerType name=\"ruby\" desc=\"Ruby\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"2\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"POD\" styleID=\"3\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"5\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CLASS NAME\" styleID=\"8\" fgColor=\"EFE900\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEF NAME\" styleID=\"9\" fgColor=\"EFE900\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"EB939A\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"12\" fgColor=\"FFB454\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"13\" fgColor=\"FB9A4B\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"14\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"MODULE NAME\" styleID=\"15\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTANCE VAR\" styleID=\"16\" fgColor=\"FB9A4B\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CLASS VAR\" styleID=\"17\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"18\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DATA SECTION\" styleID=\"19\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING Q\" styleID=\"24\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"postscript\" desc=\"Postscript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DSC COMMENT\" styleID=\"2\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DSC VALUE\" styleID=\"3\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"Name\" styleID=\"5\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"6\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"LITERAL\" styleID=\"7\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IMMEVAL\" styleID=\"8\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PAREN ARRAY\" styleID=\"9\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PAREN DICT\" styleID=\"10\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PAREN PROC\" styleID=\"11\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"12\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"HEX STRING\" styleID=\"13\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BASE85 STRING\" styleID=\"14\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BAD STRING CHAR\" styleID=\"15\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"vhdl\" desc=\"VHDL\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LIne\" styleID=\"2\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"5\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\">True False</WordsStyle>\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"6\" fgColor=\"EB939A\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"7\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"8\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STD OPERATOR\" styleID=\"9\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"10\" fgColor=\"EFE900\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"9\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DIRECTIVE OPERAND\" styleID=\"10\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STD FUNCTION\" styleID=\"11\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"STD PACKAGE\" styleID=\"12\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"STD TYPE\" styleID=\"13\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"USER DEFINE\" styleID=\"14\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type5\" />\r\n        </LexerType>\r\n        <LexerType name=\"smalltalk\" desc=\"Smalltalk\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"1\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"3\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"4\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BINARY\" styleID=\"5\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BOOL\" styleID=\"6\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SELF\" styleID=\"7\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SUPER\" styleID=\"8\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NIL\" styleID=\"9\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"10\" fgColor=\"FB9A4B\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"RETURN\" styleID=\"11\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"12\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KWS END\" styleID=\"13\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ASSIGN\" styleID=\"14\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"15\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SPECIAL SELECTOR\" styleID=\"16\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"caml\" desc=\"Caml\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"EB939A\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAGNAME\" styleID=\"2\" fgColor=\"EFE900\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"3\" fgColor=\"F6F080\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"BUILIN FUNC &amp; TYPE\" styleID=\"4\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"TYPE\" styleID=\"5\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\">if else for while</WordsStyle>\r\n            <WordsStyle name=\"LINENUM\" styleID=\"6\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\">bool long int char</WordsStyle>\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"8\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"9\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"11\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"13\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"14\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"verilog\" desc=\"Verilog\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"EB939A\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAGNAME\" styleID=\"2\" fgColor=\"EFE900\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F6F080\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"7\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE BANG\" styleID=\"3\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"12\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"USER\" styleID=\"19\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"kix\" desc=\"KiXtart\" ext=\"\">\r\n            <!--\r\n            <WordsStyle name=\"\" styleID=\"0\" fgColor=\"\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        -->\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"31\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"2\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"3\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VAR\" styleID=\"5\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"6\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"7\" fgColor=\"F6F080\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"8\" fgColor=\"FFB454\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"9\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"autoit\" desc=\"autoIt\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"2\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"4\" fgColor=\"FFB454\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F6F080\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"6\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"7\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"8\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"9\" fgColor=\"FB9A4B\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SENT\" styleID=\"10\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"11\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"12\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"EXPAND\" styleID=\"13\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type5\" />\r\n            <WordsStyle name=\"COMOBJ\" styleID=\"14\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"ada\" desc=\"ADA\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"1\" fgColor=\"F6F080\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"2\" fgColor=\"EB939A\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DELIMITER\" styleID=\"4\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"5\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER EOL\" styleID=\"6\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"7\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"8\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"9\" fgColor=\"EFE900\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"10\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ILLEGAL\" styleID=\"11\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"matlab\" desc=\"Matlab\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"2\" fgColor=\"EB939A\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"4\" fgColor=\"F6F080\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"5\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"EB939A\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DOUBLE QUOTE STRING\" styleID=\"8\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"haskell\" desc=\"Haskell\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"EB939A\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"2\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"5\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CLASS\" styleID=\"6\" fgColor=\"EFE900\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"MODULE\" styleID=\"7\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CAPITAL\" styleID=\"8\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DATA\" styleID=\"9\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IMPORT\" styleID=\"10\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"11\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTANCE\" styleID=\"12\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"13\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTBLOCK\" styleID=\"14\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTBLOCK2\" styleID=\"15\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTBLOCK3\" styleID=\"16\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"inno\" desc=\"InnoSetup\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"2\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"PARAMETER\" styleID=\"3\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"4\" fgColor=\"EFE900\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR INLINE\" styleID=\"6\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT PASCAL\" styleID=\"7\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KEYWORD PASCAL\" styleID=\"8\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"KEYWORD USER\" styleID=\"9\" fgColor=\"FFAA00\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"STRING DOUBLE\" styleID=\"10\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING SINGLE\" styleID=\"11\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"12\" fgColor=\"EB939A\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"cmake\" desc=\"CMakeFile\" ext=\"cmake\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING D\" styleID=\"2\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING L\" styleID=\"3\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING R\" styleID=\"4\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"5\" fgColor=\"EB939A\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"PARAMETER\" styleID=\"6\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"7\" fgColor=\"FB9A4B\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"USER DEFINED\" styleID=\"8\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"WHILEDEF\" styleID=\"9\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"FOREACHDEF\" styleID=\"10\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IFDEF\" styleID=\"11\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"MACRODEF\" styleID=\"12\" fgColor=\"000000\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING VARIABLE\" styleID=\"13\" fgColor=\"55E439\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"14\" fgColor=\"FF3A83\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"searchResult\" desc=\"Search result\" ext=\"\">\r\n            <WordsStyle name=\"Default\" styleID=\"0\" fgColor=\"BDAF9D\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Search Header\" styleID=\"1\" fgColor=\"000080\" bgColor=\"BBBBFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"File Header\" styleID=\"2\" fgColor=\"008000\" bgColor=\"D5FFD5\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"Line Number\" styleID=\"3\" fgColor=\"E5C138\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Hit Word\" styleID=\"4\" fgColor=\"2A211C\" bgColor=\"E5C138\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Selected Line\" styleID=\"5\" fgColor=\"37A3ED\" bgColor=\"4F3E35\" fontName=\"\" fontStyle=\"0\" fontSize=\"\">if else for while</WordsStyle>\r\n            <WordsStyle name=\"Current line background colour\" styleID=\"6\" bgColor=\"4F3E35\" fgColor=\"0080FF\" fontSize=\"\" fontStyle=\"0\">bool long int char</WordsStyle>\r\n        </LexerType>\r\n    </LexerStyles>\r\n    <GlobalStyles>\r\n        <!-- Attention : Don't modify the name of styleID=\"0\" -->\r\n        <WidgetStyle name=\"Global override\" styleID=\"0\" fgColor=\"BDAE9D\" bgColor=\"2A211C\" fontName=\"DejaVu Sans Mono\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Default Style\" styleID=\"32\" fgColor=\"BDAE9D\" bgColor=\"2A211C\" fontName=\"DejaVu Sans Mono\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Indent guideline style\" styleID=\"37\" fgColor=\"888A85\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Brace highlight style\" styleID=\"34\" fgColor=\"E5C138\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"1\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Bad brace colour\" styleID=\"35\" fgColor=\"EF2929\" bgColor=\"2A211C\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Current line background colour\" styleID=\"0\" bgColor=\"4B3C34\" fgColor=\"CCFF33\" fontSize=\"\" fontStyle=\"0\" />\r\n        <WidgetStyle name=\"Mark colour\" styleID=\"0\" fgColor=\"CC0000\" bgColor=\"EDD400\" />\r\n        <WidgetStyle name=\"Selected text colour\" styleID=\"0\" bgColor=\"83675A\" fgColor=\"C00000\" fontStyle=\"0\" />\r\n        <WidgetStyle name=\"Caret colour\" styleID=\"2069\" fgColor=\"37A8ED\" bgColor=\"80FF00\" fontSize=\"\" fontStyle=\"0\" />\r\n        <WidgetStyle name=\"Find Mark Style\" styleID=\"31\" fgColor=\"CC0000\" bgColor=\"EDD400\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Edge colour\" styleID=\"0\" fgColor=\"EEEEEC\" bgColor=\"2A211C\" fontSize=\"8\" fontStyle=\"0\" />\r\n        <WidgetStyle name=\"Line number margin\" styleID=\"33\" fgColor=\"E5C138\" bgColor=\"4C4A41\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n        <WidgetStyle name=\"Fold\" styleID=\"0\" fgColor=\"2E3436\" bgColor=\"EEEEEC\" fontSize=\"\" fontStyle=\"0\" />\r\n        <WidgetStyle name=\"Fold margin\" styleID=\"0\" fgColor=\"2E3436\" bgColor=\"6A5448\" />\r\n        <WidgetStyle name=\"White space symbol\" styleID=\"0\" fgColor=\"FCAF3E\" bgColor=\"00FF40\" fontSize=\"\" fontStyle=\"1\" />\r\n        <WidgetStyle name=\"Smart HighLighting\" styleID=\"29\" bgColor=\"FF0080\" fgColor=\"555753\" fontSize=\"10\" fontStyle=\"0\" />\r\n        <WidgetStyle name=\"Find Mark Style\" styleID=\"31\" bgColor=\"EDD400\" fgColor=\"CC0000\" fontName=\"\" fontSize=\"10\" fontStyle=\"0\" />\r\n        <WidgetStyle name=\"Mark Style 1\" styleID=\"25\" bgColor=\"00FFFF\" />\r\n        <WidgetStyle name=\"Mark Style 2\" styleID=\"24\" bgColor=\"FF8000\" fgColor=\"FAAA3C\" />\r\n        <WidgetStyle name=\"Mark Style 3\" styleID=\"23\" bgColor=\"FFFF00\" fgColor=\"FFFF80\" fontSize=\"10\" fontStyle=\"0\" />\r\n        <WidgetStyle name=\"Mark Style 4\" styleID=\"22\" bgColor=\"8000FF\" fgColor=\"000000\" fontSize=\"10\" fontStyle=\"0\" />\r\n        <WidgetStyle name=\"Mark Style 5\" styleID=\"21\" bgColor=\"008000\" fgColor=\"808080\" />\r\n        <WidgetStyle name=\"Incremental highlight all\" styleID=\"28\" bgColor=\"0080FF\" fgColor=\"FFCAB0\" />\r\n        <WidgetStyle name=\"Tags match highlighting\" styleID=\"27\" bgColor=\"808000\" fgColor=\"000000\" />\r\n        <WidgetStyle name=\"Tags attribute\" styleID=\"26\" bgColor=\"808080\" fgColor=\"8080C0\" />\r\n        <WidgetStyle name=\"Active tab focused indicator\" styleID=\"0\" fgColor=\"FAAA3C\" bgColor=\"FF0000\" />\r\n        <WidgetStyle name=\"Active tab unfocused indicator\" styleID=\"0\" fgColor=\"FFCAB0\" bgColor=\"80FF00\" />\r\n        <WidgetStyle name=\"Active tab text\" styleID=\"0\" fgColor=\"000000\" bgColor=\"8000FF\" />\r\n        <WidgetStyle name=\"Inactive tabs\" styleID=\"0\" fgColor=\"808080\" bgColor=\"C0C0C0\" />\r\n    </GlobalStyles>\r\n</NotepadPlus>\r\n"
  },
  {
    "path": "gui/themes/Black_board.xml",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\" ?>\r\n<!--//\r\n\r\nBlackboard\r\nCopyright (c) 2008 Fabio Zendhi Nagao <http://zend.lojcomm.com.br/>\r\n\r\nPermission is hereby granted, free of charge, to any person\r\nobtaining a copy of this software and associated documentation\r\nfiles (the \"Software\"), to deal in the Software without\r\nrestriction, including without limitation the rights to use,\r\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\r\ncopies of the Software, and to permit persons to whom the\r\nSoftware is furnished to do so, subject to the following\r\nconditions:\r\n\r\nThe above copyright notice and this permission notice shall be\r\nincluded in all copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\r\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\r\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\r\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\r\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\r\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\r\nOTHER DEALINGS IN THE SOFTWARE.\r\n\r\nRequirements:\r\n    * This style is based on DejaVu fonts <http://dejavu.sourceforge.net/wiki/index.php/Main_Page>.\r\n    * Notepad++, of course.\r\n\r\nInstallation:\r\n    Copy this file to C:\\Documents and Settings\\%%USERNAME%%\\Application Data\\Notepad++\\\r\n\r\nAbout:\r\n    This styler has been built by Textmate theme to Notepad++ styler <http://framework.lojcomm.com.br/tmTheme2nppStyler/>\r\n\r\nCredits:\r\n    Thanks for the original Textmate theme author.\r\n    Thanks for Fabio Zendhi Nagao for the tmTheme2nppStyler.\r\n    Thanks for the user for the tmTheme source.\r\n\r\n//-->\r\n<NotepadPlus>\r\n    <LexerStyles>\r\n        <LexerType name=\"c\" desc=\"C\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPEWORD\" styleID=\"16\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"cpp\" desc=\"C++\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"java\" desc=\"Java\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"cs\" desc=\"C#\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"rc\" desc=\"RC\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"tcl\" desc=\"TCL\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"objc\" desc=\"Objective-C\" ext=\"\">\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"19\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"QUALIFIER\" styleID=\"20\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"sql\" desc=\"SQL\" ext=\"\">\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"5\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"7\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"html\" desc=\"HTML\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"6\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"7\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"FF6400\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAGEND\" styleID=\"11\" fgColor=\"FF6400\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAGUNKNOWN\" styleID=\"2\" fgColor=\"FF6400\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"3\" fgColor=\"FF6400\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ATTRIBUTEUNKNOWN\" styleID=\"4\" fgColor=\"FF6400\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SGMLDEFAULT\" styleID=\"21\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CDATA\" styleID=\"17\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VALUE\" styleID=\"19\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ENTITY\" styleID=\"10\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"php\" desc=\"php\" ext=\"\">\r\n            <WordsStyle name=\"QUESTION MARK\" styleID=\"18\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"118\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"119\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING VARIABLE\" styleID=\"126\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SIMPLESTRING\" styleID=\"120\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"121\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"122\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"123\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"124\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"125\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"127\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"javascript\" desc=\"Javascript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"41\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"45\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"46\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"47\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"48\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"49\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SYMBOLS\" styleID=\"50\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"51\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"52\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"42\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"43\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTDOC\" styleID=\"44\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"asp\" desc=\"asp\" ext=\"asp\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"81\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"82\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"83\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"84\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"85\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"87\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"86\" fgColor=\"8DA6CE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ASPSYBOL\" styleID=\"15\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SCRIPTTYPE\" styleID=\"16\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"xml\" desc=\"XML\" ext=\"\">\r\n            <WordsStyle name=\"XMLSTART\" styleID=\"12\" fgColor=\"7F90AA\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"XMLEND\" styleID=\"13\" fgColor=\"7F90AA\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"6\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"7\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"FF6400\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAGEND\" styleID=\"11\" fgColor=\"FF6400\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAGUNKNOWN\" styleID=\"2\" fgColor=\"FF6400\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"3\" fgColor=\"FF6400\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ATTRIBUTEUNKNOWN\" styleID=\"4\" fgColor=\"FF6400\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SGMLDEFAULT\" styleID=\"21\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CDATA\" styleID=\"17\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"ini\" desc=\"ini file\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"2\" fgColor=\"FF6400\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ASSIGNMENT\" styleID=\"3\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFVAL\" styleID=\"4\" fgColor=\"FF6400\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"props\" desc=\"Properties file\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ASSIGNMENT\" styleID=\"3\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFVAL\" styleID=\"4\" fgColor=\"FF6400\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"diff\" desc=\"DIFF\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"2\" fgColor=\"8DA6CE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"HEADER\" styleID=\"3\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"POSITION\" styleID=\"4\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DELETED\" styleID=\"5\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ADDED\" styleID=\"6\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"nfo\" desc=\"Dos Style\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"32\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontSize=\"\" fontStyle=\"0\" />\r\n        </LexerType>\r\n        <LexerType name=\"makefile\" desc=\"Makefile\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"2\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"3\" fgColor=\"8DA6CE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"4\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TARGET\" styleID=\"5\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDEOL\" styleID=\"9\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"vb\" desc=\"VB / VBS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"7\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"3\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DATE\" styleID=\"8\" fgColor=\"8DA6CE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"css\" desc=\"CSS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"FF6400\" bgColor=\"0C1021\" fontName=\"Batang\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CLASS\" styleID=\"2\" fgColor=\"FF6400\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PSEUDOCLASS\" styleID=\"3\" fgColor=\"FF6400\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"UNKNOWN_PSEUDOCLASS\" styleID=\"4\" fgColor=\"FF6400\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"5\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"6\" fgColor=\"8DA6CE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"UNKNOWN_IDENTIFIER\" styleID=\"7\" fgColor=\"8DA6CE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VALUE\" styleID=\"8\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ID\" styleID=\"10\" fgColor=\"FF6400\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IMPORTANT\" styleID=\"11\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"12\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"pascal\" desc=\"Pascal\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"8DA6CE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"perl\" desc=\"Perl\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"17\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SCALAR\" styleID=\"12\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ARRAY\" styleID=\"13\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"HASH\" styleID=\"14\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SYMBOL TABLE\" styleID=\"15\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PUNCTUATION\" styleID=\"8\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"POD\" styleID=\"3\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"LONGQUOTE\" styleID=\"19\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DATASECTION\" styleID=\"21\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGSUBST\" styleID=\"18\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"20\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"python\" desc=\"Python\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"4\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KEYWORDS\" styleID=\"5\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TRIPLE\" styleID=\"6\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TRIPLEDOUBLE\" styleID=\"7\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CLASSNAME\" styleID=\"8\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFNAME\" styleID=\"9\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"8DA6CE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTBLOCK\" styleID=\"12\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"12\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"batch\" desc=\"Batch\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KEYWORDS\" styleID=\"2\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"3\" fgColor=\"FF6400\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"HIDE SYBOL\" styleID=\"4\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"5\" fgColor=\"8DA6CE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"6\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"lua\" desc=\"Lua\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"LITERALSTRING\" styleID=\"8\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"FUNC1\" styleID=\"13\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"FUNC2\" styleID=\"14\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"FUNC3\" styleID=\"15\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n        </LexerType>\r\n        <LexerType name=\"tex\" desc=\"TeX\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"1\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"GROUP\" styleID=\"2\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"3\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"4\" fgColor=\"8DA6CE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"5\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"nsis\" desc=\"NSIS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING DOUBLE QUOTE\" styleID=\"2\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING LEFT QUOTE\" styleID=\"3\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING RIGHT QUOTE\" styleID=\"4\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\">endfunction endif</WordsStyle>\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"5\" fgColor=\"8DA6CE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"6\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"7\" fgColor=\"FF6400\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"USER DEFINED\" styleID=\"8\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"9\" fgColor=\"FF6400\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SUBSECTION\" styleID=\"10\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IF DEFINE\" styleID=\"11\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"12\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING VAR\" styleID=\"13\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"14\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SECTION GROUP\" styleID=\"15\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PAGE EX\" styleID=\"16\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"FUNCTION DEFINITIONS\" styleID=\"17\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"18\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"actionscript\" desc=\"ActionScript\" ext=\"\">\r\n            <!--\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"19\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            -->\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"20\" fgColor=\"8DA6CE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"bash\" desc=\"bash\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"4\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"5\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"6\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"8\" fgColor=\"8DA6CE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SCALAR\" styleID=\"9\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PARAM\" styleID=\"10\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"11\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"HERE DELIM\" styleID=\"12\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"HERE Q\" styleID=\"13\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"fortran\" desc=\"Fortran\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"4\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"5\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"8DA6CE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"8\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION1\" styleID=\"9\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"FUNCTION2\" styleID=\"10\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"11\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR2\" styleID=\"12\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"13\" fgColor=\"FF6400\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CONTINUATION\" styleID=\"14\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"lisp\" desc=\"LISP\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"FUNCTION WORD\" styleID=\"3\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"5\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"8\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"9\" fgColor=\"8DA6CE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"11\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"asm\" desc=\"Assembler\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"4\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"5\" fgColor=\"8DA6CE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CPU INSTRUCTION\" styleID=\"6\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"MATH INSTRUCTION\" styleID=\"7\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"REGISTER\" styleID=\"8\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"9\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"DIRECTIVE OPERAND\" styleID=\"10\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"COMMENT BLOCK\" styleID=\"11\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"12\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"13\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"EXT INSTRUCTION\" styleID=\"14\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type4\" />\r\n        </LexerType>\r\n        <LexerType name=\"ruby\" desc=\"Ruby\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"2\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"POD\" styleID=\"3\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"5\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CLASS NAME\" styleID=\"8\" fgColor=\"FF6400\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEF NAME\" styleID=\"9\" fgColor=\"FF6400\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"8DA6CE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"12\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"13\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"14\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"MODULE NAME\" styleID=\"15\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTANCE VAR\" styleID=\"16\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CLASS VAR\" styleID=\"17\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"18\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DATA SECTION\" styleID=\"19\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING Q\" styleID=\"24\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"postscript\" desc=\"Postscript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DSC COMMENT\" styleID=\"2\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DSC VALUE\" styleID=\"3\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"Name\" styleID=\"5\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"6\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"LITERAL\" styleID=\"7\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IMMEVAL\" styleID=\"8\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PAREN ARRAY\" styleID=\"9\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PAREN DICT\" styleID=\"10\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PAREN PROC\" styleID=\"11\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"12\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"HEX STRING\" styleID=\"13\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BASE85 STRING\" styleID=\"14\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BAD STRING CHAR\" styleID=\"15\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"vhdl\" desc=\"VHDL\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LIne\" styleID=\"2\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"5\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\">True False</WordsStyle>\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"6\" fgColor=\"8DA6CE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"7\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"8\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STD OPERATOR\" styleID=\"9\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"10\" fgColor=\"FF6400\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"9\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DIRECTIVE OPERAND\" styleID=\"10\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STD FUNCTION\" styleID=\"11\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"STD PACKAGE\" styleID=\"12\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"STD TYPE\" styleID=\"13\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"USER DEFINE\" styleID=\"14\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type5\" />\r\n        </LexerType>\r\n        <LexerType name=\"smalltalk\" desc=\"Smalltalk\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"1\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"3\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"4\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BINARY\" styleID=\"5\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BOOL\" styleID=\"6\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SELF\" styleID=\"7\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SUPER\" styleID=\"8\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NIL\" styleID=\"9\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"10\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"RETURN\" styleID=\"11\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"12\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KWS END\" styleID=\"13\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ASSIGN\" styleID=\"14\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"15\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SPECIAL SELECTOR\" styleID=\"16\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"caml\" desc=\"Caml\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"8DA6CE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAGNAME\" styleID=\"2\" fgColor=\"FF6400\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"3\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"BUILIN FUNC &amp; TYPE\" styleID=\"4\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"TYPE\" styleID=\"5\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"LINENUM\" styleID=\"6\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"8\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"9\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"11\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"13\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"14\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"verilog\" desc=\"Verilog\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"8DA6CE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAGNAME\" styleID=\"2\" fgColor=\"FF6400\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"7\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE BANG\" styleID=\"3\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"12\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"USER\" styleID=\"19\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"kix\" desc=\"KiXtart\" ext=\"\">\r\n            <!--\r\n            <WordsStyle name=\"\" styleID=\"0\" fgColor=\"\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        -->\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"31\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"2\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"3\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VAR\" styleID=\"5\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"6\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"7\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"8\" fgColor=\"8DA6CE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"9\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"autoit\" desc=\"autoIt\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"1\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"2\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"4\" fgColor=\"8DA6CE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"6\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"7\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"8\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"9\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SENT\" styleID=\"10\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"11\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"12\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"EXPAND\" styleID=\"13\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type5\" />\r\n            <WordsStyle name=\"COMOBJ\" styleID=\"14\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"ada\" desc=\"ADA\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"1\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"2\" fgColor=\"8DA6CE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DELIMITER\" styleID=\"4\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"5\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER EOL\" styleID=\"6\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"7\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"8\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"9\" fgColor=\"FF6400\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"10\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ILLEGAL\" styleID=\"11\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"matlab\" desc=\"Matlab\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"2\" fgColor=\"8DA6CE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"4\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"5\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"8DA6CE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DOUBLE QUOTE STRING\" styleID=\"8\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"haskell\" desc=\"Haskell\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"8DA6CE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"2\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"5\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CLASS\" styleID=\"6\" fgColor=\"FF6400\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"MODULE\" styleID=\"7\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CAPITAL\" styleID=\"8\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DATA\" styleID=\"9\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IMPORT\" styleID=\"10\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"11\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTANCE\" styleID=\"12\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"13\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTBLOCK\" styleID=\"14\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTBLOCK2\" styleID=\"15\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTBLOCK3\" styleID=\"16\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"inno\" desc=\"InnoSetup\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"2\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"PARAMETER\" styleID=\"3\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"4\" fgColor=\"FF6400\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR INLINE\" styleID=\"6\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT PASCAL\" styleID=\"7\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KEYWORD PASCAL\" styleID=\"8\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"KEYWORD USER\" styleID=\"9\" fgColor=\"FBDE2D\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"STRING DOUBLE\" styleID=\"10\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING SINGLE\" styleID=\"11\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"12\" fgColor=\"8DA6CE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"cmake\" desc=\"CMakeFile\" ext=\"cmake\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"AEAEAE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING D\" styleID=\"2\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING L\" styleID=\"3\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING R\" styleID=\"4\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"5\" fgColor=\"8DA6CE\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"PARAMETER\" styleID=\"6\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"7\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"USER DEFINED\" styleID=\"8\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"WHILEDEF\" styleID=\"9\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"FOREACHDEF\" styleID=\"10\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IFDEF\" styleID=\"11\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"MACRODEF\" styleID=\"12\" fgColor=\"000000\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING VARIABLE\" styleID=\"13\" fgColor=\"61CE3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"14\" fgColor=\"D8FA3C\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"searchResult\" desc=\"Search result\" ext=\"\">\r\n            <WordsStyle name=\"Default\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Search Header\" styleID=\"1\" fgColor=\"000080\" bgColor=\"BBBBFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"File Header\" styleID=\"2\" fgColor=\"008000\" bgColor=\"D5FFD5\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"Line Number\" styleID=\"3\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Hit Word\" styleID=\"4\" fgColor=\"FF0000\" bgColor=\"FFFFBF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Selected Line\" styleID=\"5\" fgColor=\"000080\" bgColor=\"FFFF4F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\">if else for while</WordsStyle>\r\n            <WordsStyle name=\"Current line background colour\" styleID=\"6\" bgColor=\"E8E8FF\" fgColor=\"0080FF\" fontSize=\"\" fontStyle=\"0\">bool long int char</WordsStyle>\r\n        </LexerType>\r\n    </LexerStyles>\r\n    <GlobalStyles>\r\n        <!-- Attention : Don't modify the name of styleID=\"0\" -->\r\n        <WidgetStyle name=\"Global override\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"DejaVu Sans Mono\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Default Style\" styleID=\"32\" fgColor=\"F8F8F8\" bgColor=\"0C1021\" fontName=\"DejaVu Sans Mono\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Indent guideline style\" styleID=\"37\" fgColor=\"888A85\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Brace highlight style\" styleID=\"34\" fgColor=\"FCE94F\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"1\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Bad brace colour\" styleID=\"35\" fgColor=\"EF2929\" bgColor=\"0C1021\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Current line background colour\" styleID=\"0\" bgColor=\"121830\" fgColor=\"0080C0\" />\r\n        <WidgetStyle name=\"Mark colour\" styleID=\"0\" fgColor=\"CC0000\" bgColor=\"EDD400\" />\r\n        <WidgetStyle name=\"Selected text colour\" styleID=\"0\" bgColor=\"253B76\" fgColor=\"8000FF\" fontStyle=\"0\" />\r\n        <WidgetStyle name=\"Caret colour\" styleID=\"2069\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontSize=\"\" fontStyle=\"0\" />\r\n        <WidgetStyle name=\"Find Mark Style\" styleID=\"31\" fgColor=\"CC0000\" bgColor=\"EDD400\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Edge colour\" styleID=\"0\" fgColor=\"EEEEEC\" bgColor=\"F3F3F3\" fontSize=\"8\" fontStyle=\"0\" />\r\n        <WidgetStyle name=\"Line number margin\" styleID=\"33\" fgColor=\"EEEEEC\" bgColor=\"2E3436\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n        <WidgetStyle name=\"Fold\" styleID=\"0\" fgColor=\"2E3436\" bgColor=\"EEEEEC\" />\r\n        <WidgetStyle name=\"Fold margin\" styleID=\"0\" fgColor=\"555753\" bgColor=\"2E3436\" />\r\n        <WidgetStyle name=\"White space symbol\" styleID=\"0\" fgColor=\"FCAF3E\" bgColor=\"FF0000\" />\r\n        <WidgetStyle name=\"Smart HighLighting\" styleID=\"29\" bgColor=\"00FF00\" fgColor=\"555753\" />\r\n        <WidgetStyle name=\"Find Mark Style\" styleID=\"31\" bgColor=\"FF0000\" fgColor=\"FCAF3E\" />\r\n        <WidgetStyle name=\"Mark Style 1\" styleID=\"25\" bgColor=\"00FFFF\" />\r\n        <WidgetStyle name=\"Mark Style 2\" styleID=\"24\" bgColor=\"FF8000\" />\r\n        <WidgetStyle name=\"Mark Style 3\" styleID=\"23\" bgColor=\"FFFF00\" />\r\n        <WidgetStyle name=\"Mark Style 4\" styleID=\"22\" bgColor=\"8000FF\" />\r\n        <WidgetStyle name=\"Mark Style 5\" styleID=\"21\" bgColor=\"008000\" />\r\n        <WidgetStyle name=\"Incremental highlight all\" styleID=\"28\" bgColor=\"0080FF\" fgColor=\"FFCAB0\" />\r\n        <WidgetStyle name=\"Tags match highlighting\" styleID=\"27\" bgColor=\"8000FF\" fgColor=\"000000\" />\r\n        <WidgetStyle name=\"Tags attribute\" styleID=\"26\" bgColor=\"FFFF00\" fgColor=\"8080C0\" />\r\n        <WidgetStyle name=\"Active tab focused indicator\" styleID=\"0\" fgColor=\"FAAA3C\" bgColor=\"FF0000\" />\r\n        <WidgetStyle name=\"Active tab unfocused indicator\" styleID=\"0\" fgColor=\"FFCAB0\" bgColor=\"80FF00\" />\r\n        <WidgetStyle name=\"Active tab text\" styleID=\"0\" fgColor=\"000000\" />\r\n        <WidgetStyle name=\"Inactive tabs\" styleID=\"0\" fgColor=\"808080\" bgColor=\"C0C0C0\" />\r\n    </GlobalStyles>\r\n</NotepadPlus>\r\n"
  },
  {
    "path": "gui/themes/Choco.xml",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\" ?>\r\n<!--//\r\n\r\nchoco\r\nCopyright (c) 2008 Fabio Zendhi Nagao <http://zend.lojcomm.com.br/>\r\n\r\nPermission is hereby granted, free of charge, to any person\r\nobtaining a copy of this software and associated documentation\r\nfiles (the \"Software\"), to deal in the Software without\r\nrestriction, including without limitation the rights to use,\r\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\r\ncopies of the Software, and to permit persons to whom the\r\nSoftware is furnished to do so, subject to the following\r\nconditions:\r\n\r\nThe above copyright notice and this permission notice shall be\r\nincluded in all copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\r\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\r\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\r\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\r\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\r\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\r\nOTHER DEALINGS IN THE SOFTWARE.\r\n\r\nRequirements:\r\n    * This style is based on DejaVu fonts <http://dejavu.sourceforge.net/wiki/index.php/Main_Page>.\r\n    * Notepad++, of course.\r\n\r\nInstallation:\r\n    Copy this file to C:\\Documents and Settings\\%%USERNAME%%\\Application Data\\Notepad++\\\r\n\r\nAbout:\r\n    This styler has been built by Textmate theme to Notepad++ styler <http://framework.lojcomm.com.br/tmTheme2nppStyler/>\r\n\r\nCredits:\r\n    Thanks for the original Textmate theme author.\r\n    Thanks for Fabio Zendhi Nagao for the tmTheme2nppStyler.\r\n    Thanks for the user for the tmTheme source.\r\n\r\n//-->\r\n<NotepadPlus>\r\n    <LexerStyles>\r\n        <LexerType name=\"c\" desc=\"C\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"8996A8\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F1E694\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPEWORD\" styleID=\"16\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"E9C062\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"cpp\" desc=\"C++\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"8996A8\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F1E694\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"E9C062\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"java\" desc=\"Java\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"8996A8\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F1E694\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"E9C062\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"cs\" desc=\"C#\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"8996A8\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F1E694\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"E9C062\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"rc\" desc=\"RC\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"8996A8\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F1E694\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"E9C062\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"tcl\" desc=\"TCL\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"8996A8\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F1E694\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"E9C062\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"objc\" desc=\"Objective-C\" ext=\"\">\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"19\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"QUALIFIER\" styleID=\"20\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"8996A8\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F1E694\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"E9C062\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"sql\" desc=\"SQL\" ext=\"\">\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"5\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\">ooooo</WordsStyle>\r\n            <WordsStyle name=\"STRING2\" styleID=\"7\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"html\" desc=\"HTML\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"6\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"7\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"6D4C2F\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAGEND\" styleID=\"11\" fgColor=\"6D4C2F\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAGUNKNOWN\" styleID=\"2\" fgColor=\"6D4C2F\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"3\" fgColor=\"6D4C2F\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ATTRIBUTEUNKNOWN\" styleID=\"4\" fgColor=\"6D4C2F\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SGMLDEFAULT\" styleID=\"21\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CDATA\" styleID=\"17\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VALUE\" styleID=\"19\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ENTITY\" styleID=\"10\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"php\" desc=\"php\" ext=\"\">\r\n            <WordsStyle name=\"QUESTION MARK\" styleID=\"18\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"118\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"119\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING VARIABLE\" styleID=\"126\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SIMPLESTRING\" styleID=\"120\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"121\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"122\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"123\" fgColor=\"7989A6\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"124\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"125\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"127\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"javascript\" desc=\"Javascript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"41\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"45\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"46\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"47\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"48\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"49\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SYMBOLS\" styleID=\"50\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"51\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"52\" fgColor=\"E9C062\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"42\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"43\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTDOC\" styleID=\"44\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"asp\" desc=\"asp\" ext=\"asp\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"81\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"82\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"83\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"84\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"85\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"87\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"86\" fgColor=\"D77261\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ASPSYBOL\" styleID=\"15\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SCRIPTTYPE\" styleID=\"16\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"xml\" desc=\"XML\" ext=\"\">\r\n            <WordsStyle name=\"XMLSTART\" styleID=\"12\" fgColor=\"494949\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"XMLEND\" styleID=\"13\" fgColor=\"494949\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"6\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"7\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"6D4C2F\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAGEND\" styleID=\"11\" fgColor=\"6D4C2F\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAGUNKNOWN\" styleID=\"2\" fgColor=\"6D4C2F\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"3\" fgColor=\"6D4C2F\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ATTRIBUTEUNKNOWN\" styleID=\"4\" fgColor=\"6D4C2F\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SGMLDEFAULT\" styleID=\"21\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CDATA\" styleID=\"17\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"ini\" desc=\"ini file\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"2\" fgColor=\"6D4C2F\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ASSIGNMENT\" styleID=\"3\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFVAL\" styleID=\"4\" fgColor=\"6D4C2F\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"props\" desc=\"Properties file\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ASSIGNMENT\" styleID=\"3\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFVAL\" styleID=\"4\" fgColor=\"6D4C2F\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"diff\" desc=\"DIFF\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"2\" fgColor=\"D77261\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"HEADER\" styleID=\"3\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"POSITION\" styleID=\"4\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DELETED\" styleID=\"5\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ADDED\" styleID=\"6\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"nfo\" desc=\"Dos Style\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"32\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontSize=\"\" fontStyle=\"0\" />\r\n        </LexerType>\r\n        <LexerType name=\"makefile\" desc=\"Makefile\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"2\" fgColor=\"8996A8\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"3\" fgColor=\"D77261\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"4\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TARGET\" styleID=\"5\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDEOL\" styleID=\"9\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"vb\" desc=\"VB / VBS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"7\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"3\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"8996A8\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DATE\" styleID=\"8\" fgColor=\"A8799C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"css\" desc=\"CSS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"6D4C2F\" bgColor=\"1A0F0B\" fontName=\"Batang\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CLASS\" styleID=\"2\" fgColor=\"6D4C2F\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PSEUDOCLASS\" styleID=\"3\" fgColor=\"6D4C2F\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"UNKNOWN_PSEUDOCLASS\" styleID=\"4\" fgColor=\"6D4C2F\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"5\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"6\" fgColor=\"D77261\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"UNKNOWN_IDENTIFIER\" styleID=\"7\" fgColor=\"D77261\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VALUE\" styleID=\"8\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ID\" styleID=\"10\" fgColor=\"6D4C2F\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IMPORTANT\" styleID=\"11\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"12\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"pascal\" desc=\"Pascal\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"8996A8\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"D77261\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F1E694\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"E9C062\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"perl\" desc=\"Perl\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"8996A8\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F1E694\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"17\" fgColor=\"E9C062\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SCALAR\" styleID=\"12\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ARRAY\" styleID=\"13\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"HASH\" styleID=\"14\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SYMBOL TABLE\" styleID=\"15\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PUNCTUATION\" styleID=\"8\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"POD\" styleID=\"3\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"LONGQUOTE\" styleID=\"19\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DATASECTION\" styleID=\"21\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGSUBST\" styleID=\"18\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"20\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"python\" desc=\"Python\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"4\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KEYWORDS\" styleID=\"5\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TRIPLE\" styleID=\"6\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TRIPLEDOUBLE\" styleID=\"7\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CLASSNAME\" styleID=\"8\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFNAME\" styleID=\"9\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"D77261\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTBLOCK\" styleID=\"12\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"12\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"batch\" desc=\"Batch\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KEYWORDS\" styleID=\"2\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"3\" fgColor=\"6D4C2F\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"HIDE SYBOL\" styleID=\"4\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"5\" fgColor=\"D77261\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"6\" fgColor=\"7989A6\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"lua\" desc=\"Lua\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"LITERALSTRING\" styleID=\"8\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"8996A8\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F1E694\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"FUNC1\" styleID=\"13\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"FUNC2\" styleID=\"14\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"FUNC3\" styleID=\"15\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n        </LexerType>\r\n        <LexerType name=\"tex\" desc=\"TeX\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"1\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"GROUP\" styleID=\"2\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"3\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"4\" fgColor=\"D77261\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"5\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"nsis\" desc=\"NSIS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING DOUBLE QUOTE\" styleID=\"2\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING LEFT QUOTE\" styleID=\"3\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING RIGHT QUOTE\" styleID=\"4\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\">endfunction endif</WordsStyle>\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"5\" fgColor=\"C29863\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"6\" fgColor=\"7989A6\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"7\" fgColor=\"6D4C2F\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"USER DEFINED\" styleID=\"8\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"9\" fgColor=\"6D4C2F\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SUBSECTION\" styleID=\"10\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IF DEFINE\" styleID=\"11\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"12\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING VAR\" styleID=\"13\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"14\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SECTION GROUP\" styleID=\"15\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PAGE EX\" styleID=\"16\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"FUNCTION DEFINITIONS\" styleID=\"17\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"18\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"actionscript\" desc=\"ActionScript\" ext=\"\">\r\n            <!--\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"19\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            -->\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"20\" fgColor=\"C29863\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"8996A8\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F1E694\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"E9C062\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"bash\" desc=\"bash\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"4\" fgColor=\"F1E694\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"5\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"6\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"8\" fgColor=\"D77261\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SCALAR\" styleID=\"9\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PARAM\" styleID=\"10\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"11\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"HERE DELIM\" styleID=\"12\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"HERE Q\" styleID=\"13\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"fortran\" desc=\"Fortran\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"4\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"5\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"D77261\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"8\" fgColor=\"F1E694\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION1\" styleID=\"9\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"FUNCTION2\" styleID=\"10\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"11\" fgColor=\"8996A8\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR2\" styleID=\"12\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"13\" fgColor=\"6D4C2F\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CONTINUATION\" styleID=\"14\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"lisp\" desc=\"LISP\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"FUNCTION WORD\" styleID=\"3\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"5\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"8\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"9\" fgColor=\"D77261\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"11\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"asm\" desc=\"Assembler\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"4\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"5\" fgColor=\"D77261\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CPU INSTRUCTION\" styleID=\"6\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"MATH INSTRUCTION\" styleID=\"7\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"REGISTER\" styleID=\"8\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"9\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"DIRECTIVE OPERAND\" styleID=\"10\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"COMMENT BLOCK\" styleID=\"11\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"12\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"13\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"EXT INSTRUCTION\" styleID=\"14\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type4\" />\r\n        </LexerType>\r\n        <LexerType name=\"ruby\" desc=\"Ruby\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"2\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"POD\" styleID=\"3\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"5\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CLASS NAME\" styleID=\"8\" fgColor=\"6D4C2F\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEF NAME\" styleID=\"9\" fgColor=\"6D4C2F\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"D77261\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"12\" fgColor=\"E9C062\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"13\" fgColor=\"7989A6\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"14\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"MODULE NAME\" styleID=\"15\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTANCE VAR\" styleID=\"16\" fgColor=\"7989A6\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CLASS VAR\" styleID=\"17\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"18\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DATA SECTION\" styleID=\"19\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING Q\" styleID=\"24\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"postscript\" desc=\"Postscript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DSC COMMENT\" styleID=\"2\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DSC VALUE\" styleID=\"3\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"Name\" styleID=\"5\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"6\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"LITERAL\" styleID=\"7\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IMMEVAL\" styleID=\"8\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PAREN ARRAY\" styleID=\"9\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PAREN DICT\" styleID=\"10\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PAREN PROC\" styleID=\"11\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"12\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"HEX STRING\" styleID=\"13\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BASE85 STRING\" styleID=\"14\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BAD STRING CHAR\" styleID=\"15\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"vhdl\" desc=\"VHDL\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LIne\" styleID=\"2\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"5\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\">True False</WordsStyle>\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"6\" fgColor=\"D77261\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"7\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"8\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STD OPERATOR\" styleID=\"9\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"10\" fgColor=\"6D4C2F\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"9\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DIRECTIVE OPERAND\" styleID=\"10\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STD FUNCTION\" styleID=\"11\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"STD PACKAGE\" styleID=\"12\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"STD TYPE\" styleID=\"13\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"USER DEFINE\" styleID=\"14\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type5\" />\r\n        </LexerType>\r\n        <LexerType name=\"smalltalk\" desc=\"Smalltalk\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"1\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"3\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"4\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BINARY\" styleID=\"5\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BOOL\" styleID=\"6\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SELF\" styleID=\"7\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SUPER\" styleID=\"8\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NIL\" styleID=\"9\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"10\" fgColor=\"7989A6\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"RETURN\" styleID=\"11\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"12\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KWS END\" styleID=\"13\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ASSIGN\" styleID=\"14\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"15\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SPECIAL SELECTOR\" styleID=\"16\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"caml\" desc=\"Caml\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"D77261\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAGNAME\" styleID=\"2\" fgColor=\"6D4C2F\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"3\" fgColor=\"F1E694\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"BUILIN FUNC &amp; TYPE\" styleID=\"4\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"TYPE\" styleID=\"5\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\">if else for while</WordsStyle>\r\n            <WordsStyle name=\"LINENUM\" styleID=\"6\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\">bool long int char</WordsStyle>\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"8\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"9\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"11\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"13\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"14\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"verilog\" desc=\"Verilog\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"D77261\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAGNAME\" styleID=\"2\" fgColor=\"6D4C2F\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F1E694\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"7\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"8996A8\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE BANG\" styleID=\"3\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"12\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"USER\" styleID=\"19\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"kix\" desc=\"KiXtart\" ext=\"\">\r\n            <!--\r\n            <WordsStyle name=\"\" styleID=\"0\" fgColor=\"\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        -->\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"31\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"2\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"3\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VAR\" styleID=\"5\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"6\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"7\" fgColor=\"F1E694\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"8\" fgColor=\"C29863\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"9\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"autoit\" desc=\"autoIt\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"1\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"2\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"4\" fgColor=\"C29863\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F1E694\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"6\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"7\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"8\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"9\" fgColor=\"7989A6\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SENT\" styleID=\"10\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"11\" fgColor=\"8996A8\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"12\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"EXPAND\" styleID=\"13\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type5\" />\r\n            <WordsStyle name=\"COMOBJ\" styleID=\"14\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"ada\" desc=\"ADA\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"1\" fgColor=\"F1E694\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"2\" fgColor=\"D77261\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DELIMITER\" styleID=\"4\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"5\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER EOL\" styleID=\"6\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"7\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"8\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"9\" fgColor=\"6D4C2F\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"10\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ILLEGAL\" styleID=\"11\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"matlab\" desc=\"Matlab\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"2\" fgColor=\"D77261\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"4\" fgColor=\"F1E694\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"5\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"D77261\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DOUBLE QUOTE STRING\" styleID=\"8\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"haskell\" desc=\"Haskell\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"D77261\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"2\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"5\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CLASS\" styleID=\"6\" fgColor=\"6D4C2F\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"MODULE\" styleID=\"7\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CAPITAL\" styleID=\"8\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DATA\" styleID=\"9\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IMPORT\" styleID=\"10\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"11\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTANCE\" styleID=\"12\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"13\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTBLOCK\" styleID=\"14\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTBLOCK2\" styleID=\"15\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTBLOCK3\" styleID=\"16\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"inno\" desc=\"InnoSetup\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"2\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"PARAMETER\" styleID=\"3\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"4\" fgColor=\"6D4C2F\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"8996A8\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR INLINE\" styleID=\"6\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT PASCAL\" styleID=\"7\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KEYWORD PASCAL\" styleID=\"8\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"KEYWORD USER\" styleID=\"9\" fgColor=\"B3935C\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"STRING DOUBLE\" styleID=\"10\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING SINGLE\" styleID=\"11\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"12\" fgColor=\"D77261\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"cmake\" desc=\"CMakeFile\" ext=\"cmake\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"679D47\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING D\" styleID=\"2\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING L\" styleID=\"3\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING R\" styleID=\"4\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"5\" fgColor=\"D77261\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"PARAMETER\" styleID=\"6\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"7\" fgColor=\"7989A6\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"USER DEFINED\" styleID=\"8\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"WHILEDEF\" styleID=\"9\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"FOREACHDEF\" styleID=\"10\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IFDEF\" styleID=\"11\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"MACRODEF\" styleID=\"12\" fgColor=\"000000\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING VARIABLE\" styleID=\"13\" fgColor=\"7CA563\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"14\" fgColor=\"DA5659\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"searchResult\" desc=\"Search result\" ext=\"\">\r\n            <WordsStyle name=\"Default\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Search Header\" styleID=\"1\" fgColor=\"000080\" bgColor=\"BBBBFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"File Header\" styleID=\"2\" fgColor=\"008000\" bgColor=\"D5FFD5\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"Line Number\" styleID=\"3\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Hit Word\" styleID=\"4\" fgColor=\"FF0000\" bgColor=\"FFFFBF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Selected Line\" styleID=\"5\" fgColor=\"000080\" bgColor=\"FFFF4F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\">if else for while</WordsStyle>\r\n            <WordsStyle name=\"Current line background colour\" styleID=\"6\" bgColor=\"E8E8FF\" fgColor=\"0080FF\" fontSize=\"\" fontStyle=\"0\">bool long int char</WordsStyle>\r\n        </LexerType>\r\n    </LexerStyles>\r\n    <GlobalStyles>\r\n        <!-- Attention : Don't modify the name of styleID=\"0\" -->\r\n        <WidgetStyle name=\"Global override\" styleID=\"0\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"DejaVu Sans Mono\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Default Style\" styleID=\"32\" fgColor=\"C3BE98\" bgColor=\"1A0F0B\" fontName=\"DejaVu Sans Mono\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Indent guideline style\" styleID=\"37\" fgColor=\"888A85\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Brace highlight style\" styleID=\"34\" fgColor=\"FCE94F\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"1\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Bad brace colour\" styleID=\"35\" fgColor=\"EF2929\" bgColor=\"1A0F0B\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Current line background colour\" styleID=\"0\" bgColor=\"281711\" fgColor=\"0080C0\" fontSize=\"\" fontStyle=\"0\" />\r\n        <WidgetStyle name=\"Mark colour\" styleID=\"0\" fgColor=\"CC0000\" bgColor=\"EDD400\" />\r\n        <WidgetStyle name=\"Selected text colour\" styleID=\"0\" bgColor=\"372017\" fgColor=\"8000FF\" fontStyle=\"0\" />\r\n        <WidgetStyle name=\"Caret colour\" styleID=\"2069\" fgColor=\"A7A7A7\" bgColor=\"112435\" fontSize=\"\" fontStyle=\"0\" />\r\n        <WidgetStyle name=\"Find Mark Style\" styleID=\"31\" fgColor=\"CC0000\" bgColor=\"EDD400\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Edge colour\" styleID=\"0\" fgColor=\"EEEEEC\" bgColor=\"F3F3F3\" fontSize=\"8\" fontStyle=\"0\" />\r\n        <WidgetStyle name=\"Line number margin\" styleID=\"33\" fgColor=\"EEEEEC\" bgColor=\"2E3436\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n        <WidgetStyle name=\"Fold\" styleID=\"0\" fgColor=\"2E3436\" bgColor=\"EEEEEC\" fontSize=\"\" fontStyle=\"0\" />\r\n        <WidgetStyle name=\"Fold margin\" styleID=\"0\" fgColor=\"555753\" bgColor=\"2E3436\" />\r\n        <WidgetStyle name=\"White space symbol\" styleID=\"0\" fgColor=\"FCAF3E\" bgColor=\"FF0000\" fontSize=\"\" fontStyle=\"1\" />\r\n        <WidgetStyle name=\"Smart HighLighting\" styleID=\"29\" bgColor=\"00FF00\" fgColor=\"555753\" />\r\n        <WidgetStyle name=\"Find Mark Style\" styleID=\"31\" bgColor=\"EDD400\" fgColor=\"CC0000\" fontName=\"\" fontSize=\"10\" fontStyle=\"0\" />\r\n        <WidgetStyle name=\"Mark Style 1\" styleID=\"25\" bgColor=\"00FFFF\" fgColor=\"80D4B2\" />\r\n        <WidgetStyle name=\"Mark Style 2\" styleID=\"24\" bgColor=\"FF8000\" fgColor=\"3FBA89\" />\r\n        <WidgetStyle name=\"Mark Style 3\" styleID=\"23\" bgColor=\"FFFF00\" fgColor=\"101010\" />\r\n        <WidgetStyle name=\"Mark Style 4\" styleID=\"22\" bgColor=\"8000FF\" fgColor=\"808080\" fontSize=\"\" fontStyle=\"0\" />\r\n        <WidgetStyle name=\"Mark Style 5\" styleID=\"21\" bgColor=\"008000\" fgColor=\"FAAA3C\" />\r\n        <WidgetStyle name=\"Incremental highlight all\" styleID=\"28\" bgColor=\"0080FF\" fgColor=\"FFCAB0\" />\r\n        <WidgetStyle name=\"Tags match highlighting\" styleID=\"27\" bgColor=\"972FFF\" fgColor=\"000000\" />\r\n        <WidgetStyle name=\"Tags attribute\" styleID=\"26\" bgColor=\"FFFF00\" fgColor=\"8080C0\" />\r\n        <WidgetStyle name=\"Active tab focused indicator\" styleID=\"0\" fgColor=\"FAAA3C\" bgColor=\"FF0000\" />\r\n        <WidgetStyle name=\"Active tab unfocused indicator\" styleID=\"0\" fgColor=\"FFCAB0\" bgColor=\"80FF00\" />\r\n        <WidgetStyle name=\"Active tab text\" styleID=\"0\" fgColor=\"000000\" />\r\n        <WidgetStyle name=\"Inactive tabs\" styleID=\"0\" fgColor=\"808080\" bgColor=\"C0C0C0\" />\r\n    </GlobalStyles>\r\n</NotepadPlus>\r\n"
  },
  {
    "path": "gui/themes/Deep_Black.xml",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\" ?>\r\n<!--\r\nStyle Name:         Deep Black\r\nDescription:        Based on the theme Port VibrantInk by tyler\r\nFile name:          Deep Black.xml\r\nCreated by:         Mariusz Kasperkiewicz\r\nFeatured language:  SQL, C, C++, Pascal, Php, Css, Javascript, Html, XML, others?\r\nNote:               Feel free to modify this style and re-release it. This style is available under the terms of the GNU Free License.\r\n\r\nKeep Notepad++ development active, donate!:\r\nhttp://sourceforge.net/donate/index.php?group_id=95717\r\n\r\n2009.05.28\r\n-->\r\n<NotepadPlus>\r\n    <LexerStyles>\r\n        <LexerType name=\"c\" desc=\"C\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"C0C0C0\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cpp\" desc=\"C++\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"C0C0C0\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"00FFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"FFFF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FF8080\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"java\" desc=\"Java\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"EDF8F9\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cs\" desc=\"C#\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"EDF8F9\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"rc\" desc=\"RC\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"EDF8F9\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"tcl\" desc=\"TCL\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"EDF8F9\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"objc\" desc=\"Objective-C\" ext=\"\">\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"19\" fgColor=\"A001D6\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"QUALIFIER\" styleID=\"20\" fgColor=\"95004A\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"EDF8F9\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"sql\" desc=\"SQL\" ext=\"\">\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"5\" fgColor=\"00FFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF00FF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"FFFF80\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"7\" fgColor=\"FFFF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"html\" desc=\"HTML\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"FF00FF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"6\" fgColor=\"FFFF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"7\" fgColor=\"FFFF80\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGEND\" styleID=\"11\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGUNKNOWN\" styleID=\"2\" fgColor=\"FF8080\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"3\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTEUNKNOWN\" styleID=\"4\" fgColor=\"FF8080\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SGMLDEFAULT\" styleID=\"21\" fgColor=\"FFFFFF\" bgColor=\"707070\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CDATA\" styleID=\"17\" fgColor=\"C0C0C0\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VALUE\" styleID=\"19\" fgColor=\"00FFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ENTITY\" styleID=\"10\" fgColor=\"0080FF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"php\" desc=\"php\" ext=\"\">\r\n            <WordsStyle name=\"QUESTION MARK\" styleID=\"18\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"118\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"119\" fgColor=\"FFFF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING VARIABLE\" styleID=\"126\" fgColor=\"FFFF80\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SIMPLESTRING\" styleID=\"120\" fgColor=\"FFFF80\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"121\" fgColor=\"00FFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"122\" fgColor=\"FF00FF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"123\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"124\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"125\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"127\" fgColor=\"C0C0C0\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"javascript\" desc=\"Javascript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"41\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"45\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"46\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"47\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"48\" fgColor=\"FFFF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"49\" fgColor=\"FFFF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOLS\" styleID=\"50\" fgColor=\"999966\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"51\" fgColor=\"CCCCCC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"52\" fgColor=\"339999\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"42\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"43\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTDOC\" styleID=\"44\" fgColor=\"772CB7\" bgColor=\"070707\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"asp\" desc=\"asp\" ext=\"asp\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"81\" fgColor=\"66FF00\" bgColor=\"C4F9FD\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"82\" fgColor=\"9933CC\" bgColor=\"C4F9FD\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"83\" fgColor=\"99CC99\" bgColor=\"C4F9FD\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"84\" fgColor=\"FFCC00\" bgColor=\"C4F9FD\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"85\" fgColor=\"66FF00\" bgColor=\"C4F9FD\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"87\" fgColor=\"66FF00\" bgColor=\"C4F9FD\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"86\" fgColor=\"FFFFFF\" bgColor=\"C4F9FD\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASPSYBOL\" styleID=\"15\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SCRIPTTYPE\" styleID=\"16\" fgColor=\"FFFFFF\" bgColor=\"FFC000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"xml\" desc=\"XML\" ext=\"\">\r\n            <WordsStyle name=\"XMLSTART\" styleID=\"12\" fgColor=\"00FF80\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"XMLEND\" styleID=\"13\" fgColor=\"80FF80\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"FF00FF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"6\" fgColor=\"FFFF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"7\" fgColor=\"FFFF80\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGEND\" styleID=\"11\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGUNKNOWN\" styleID=\"2\" fgColor=\"FF0000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"3\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTEUNKNOWN\" styleID=\"4\" fgColor=\"008000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SGMLDEFAULT\" styleID=\"21\" fgColor=\"C0C0C0\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CDATA\" styleID=\"17\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"ini\" desc=\"ini file\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"2\" fgColor=\"66FF00\" bgColor=\"070707\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASSIGNMENT\" styleID=\"3\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFVAL\" styleID=\"4\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"props\" desc=\"Properties file\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASSIGNMENT\" styleID=\"3\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFVAL\" styleID=\"4\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"diff\" desc=\"DIFF\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"2\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"HEADER\" styleID=\"3\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"POSITION\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DELETED\" styleID=\"5\" fgColor=\"808040\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ADDED\" styleID=\"6\" fgColor=\"339999\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"nfo\" desc=\"Dos Style\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"32\" fgColor=\"C0C0C0\" bgColor=\"000000\" fontSize=\"\" fontStyle=\"0\" />\r\n        </LexerType>\r\n        <LexerType name=\"makefile\" desc=\"Makefile\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"2\" fgColor=\"FFFF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"3\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"TARGET\" styleID=\"5\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDEOL\" styleID=\"9\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"vb\" desc=\"VB / VBS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"3\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATE\" styleID=\"8\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"css\" desc=\"CSS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"Batang\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS\" styleID=\"2\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PSEUDOCLASS\" styleID=\"3\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"UNKNOWN_PSEUDOCLASS\" styleID=\"4\" fgColor=\"FF8080\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"6\" fgColor=\"999966\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"UNKNOWN_IDENTIFIER\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VALUE\" styleID=\"8\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"ID\" styleID=\"10\" fgColor=\"339999\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IMPORTANT\" styleID=\"11\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"12\" fgColor=\"339999\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"pascal\" desc=\"Pascal\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"808080\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"00FFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF00FF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FFFF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FF8040\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"perl\" desc=\"Perl\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"EDF8F9\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"17\" fgColor=\"8080FF\" bgColor=\"F8FEDE\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"SCALAR\" styleID=\"12\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ARRAY\" styleID=\"13\" fgColor=\"CF34CF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HASH\" styleID=\"14\" fgColor=\"999966\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL TABLE\" styleID=\"15\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"PUNCTUATION\" styleID=\"8\" fgColor=\"EDF8F9\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"POD\" styleID=\"3\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"FF80C0\" bgColor=\"000000\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"LONGQUOTE\" styleID=\"19\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATASECTION\" styleID=\"21\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGSUBST\" styleID=\"18\" fgColor=\"999966\" bgColor=\"FFEEEC\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"20\" fgColor=\"FFFF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"python\" desc=\"Python\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"4\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORDS\" styleID=\"5\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TRIPLE\" styleID=\"6\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TRIPLEDOUBLE\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASSNAME\" styleID=\"8\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFNAME\" styleID=\"9\" fgColor=\"FF00FF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK\" styleID=\"12\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"12\" fgColor=\"FFFF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"batch\" desc=\"Batch\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORDS\" styleID=\"2\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"3\" fgColor=\"99CC99\" bgColor=\"FFFF80\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"HIDE SYBOL\" styleID=\"4\" fgColor=\"FF00FF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"5\" fgColor=\"339999\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"6\" fgColor=\"FF8000\" bgColor=\"FCFFF0\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"lua\" desc=\"Lua\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"LITERALSTRING\" styleID=\"8\" fgColor=\"95004A\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"EDF8F9\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNC1\" styleID=\"13\" fgColor=\"0080C0\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"FUNC2\" styleID=\"14\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"FUNC3\" styleID=\"15\" fgColor=\"0000A0\" bgColor=\"000000\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" keywordClass=\"type2\" />\r\n        </LexerType>\r\n        <LexerType name=\"tex\" desc=\"TeX\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"1\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"GROUP\" styleID=\"2\" fgColor=\"FF00FF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"3\" fgColor=\"800000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"4\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"4\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"nsis\" desc=\"NSIS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING DOUBLE QUOTE\" styleID=\"2\" fgColor=\"FFFF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING LEFT QUOTE\" styleID=\"3\" fgColor=\"FFFF80\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING RIGHT QUOTE\" styleID=\"4\" fgColor=\"FFFF80\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\">endfunction endif</WordsStyle>\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"5\" fgColor=\"00FFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"6\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"7\" fgColor=\"FF00FF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"USER DEFINED\" styleID=\"8\" fgColor=\"0080FF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"4\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"9\" fgColor=\"FF0080\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SUBSECTION\" styleID=\"10\" fgColor=\"FF8080\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IF DEFINE\" styleID=\"11\" fgColor=\"808040\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"12\" fgColor=\"800000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING VAR\" styleID=\"13\" fgColor=\"BCFF80\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"14\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"actionscript\" desc=\"ActionScript\" ext=\"\">\r\n            <!--\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"19\" fgColor=\"A001D6\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n\t\t\t-->\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"20\" fgColor=\"95004A\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"EDF8F9\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"bash\" desc=\"bash\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"FFFFFF\" bgColor=\"FF0000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"4\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"5\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"6\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"EDF8F9\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"8\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SCALAR\" styleID=\"9\" fgColor=\"FF8040\" bgColor=\"FFFFD9\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"PARAM\" styleID=\"10\" fgColor=\"9933CC\" bgColor=\"00FFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"11\" fgColor=\"804040\" bgColor=\"E1FFF3\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE DELIM\" styleID=\"12\" fgColor=\"FF6600\" bgColor=\"FF0000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE Q\" styleID=\"13\" fgColor=\"99CC99\" bgColor=\"0000FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"fortran\" desc=\"Fortran\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"4\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"5\" fgColor=\"808040\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"8\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION1\" styleID=\"9\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"FUNCTION2\" styleID=\"10\" fgColor=\"0080C0\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"11\" fgColor=\"800000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR2\" styleID=\"12\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"FF80FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"CONTINUATION\" styleID=\"14\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"lisp\" desc=\"LISP\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION WORD\" styleID=\"3\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"5\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"8\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"9\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"0080C0\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"11\" fgColor=\"800000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"asm\" desc=\"Assembler\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"4\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CPU INSTRUCTION\" styleID=\"6\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"MATH INSTRUCTION\" styleID=\"7\" fgColor=\"0080C0\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"REGISTER\" styleID=\"8\" fgColor=\"8080FF\" bgColor=\"FFFFCC\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"9\" fgColor=\"339999\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"DIRECTIVE OPERAND\" styleID=\"10\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"COMMENT BLOCK\" styleID=\"11\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"12\" fgColor=\"808000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"13\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"EXT INSTRUCTION\" styleID=\"14\" fgColor=\"EDF8F9\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type4\" />\r\n        </LexerType>\r\n        <LexerType name=\"ruby\" desc=\"Ruby\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"2\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"POD\" styleID=\"3\" fgColor=\"004000\" bgColor=\"C0FFC0\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"5\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"808000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS NAME\" styleID=\"8\" fgColor=\"0080C0\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEF NAME\" styleID=\"9\" fgColor=\"8080FF\" bgColor=\"FFFFCC\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"12\" fgColor=\"339999\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"13\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MODULE NAME\" styleID=\"15\" fgColor=\"EDF8F9\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTANCE VAR\" styleID=\"16\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS VAR\" styleID=\"17\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"18\" fgColor=\"FFFF00\" bgColor=\"A08080\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATA SECTION\" styleID=\"19\" fgColor=\"600000\" bgColor=\"FFF0D8\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING Q\" styleID=\"24\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"postscript\" desc=\"Postscript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"DSC COMMENT\" styleID=\"2\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"DSC VALUE\" styleID=\"3\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Name\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"6\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"LITERAL\" styleID=\"7\" fgColor=\"0080C0\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IMMEVAL\" styleID=\"8\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAREN ARRAY\" styleID=\"9\" fgColor=\"FF00FF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAREN DICT\" styleID=\"10\" fgColor=\"339999\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAREN PROC\" styleID=\"11\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"12\" fgColor=\"808000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HEX STRING\" styleID=\"13\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BASE85 STRING\" styleID=\"14\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BAD STRING CHAR\" styleID=\"15\" fgColor=\"EDF8F9\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"vhdl\" desc=\"VHDL\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LIne\" styleID=\"2\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"5\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\">True False</WordsStyle>\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"7\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"8\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STD OPERATOR\" styleID=\"9\" fgColor=\"0080C0\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"10\" fgColor=\"8080FF\" bgColor=\"FFFFCC\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"9\" fgColor=\"808000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DIRECTIVE OPERAND\" styleID=\"10\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"STD FUNCTION\" styleID=\"11\" fgColor=\"339999\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"STD PACKAGE\" styleID=\"12\" fgColor=\"800000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"STD TYPE\" styleID=\"13\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"USER DEFINE\" styleID=\"14\" fgColor=\"B5E71F\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type5\" />\r\n        </LexerType>\r\n        <LexerType name=\"smalltalk\" desc=\"Smalltalk\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"1\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"3\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"4\" fgColor=\"408080\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"BINARY\" styleID=\"5\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BOOL\" styleID=\"6\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SELF\" styleID=\"7\" fgColor=\"8080FF\" bgColor=\"FFFFCC\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SUPER\" styleID=\"8\" fgColor=\"339999\" bgColor=\"ECFFEA\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"NIL\" styleID=\"9\" fgColor=\"999966\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"10\" fgColor=\"800000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"RETURN\" styleID=\"11\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"12\" fgColor=\"808000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KWS END\" styleID=\"13\" fgColor=\"339999\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASSIGN\" styleID=\"14\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"15\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SPECIAL SELECTOR\" styleID=\"16\" fgColor=\"FF80C0\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"caml\" desc=\"Caml\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGNAME\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"3\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"BUILIN FUNC &amp; TYPE\" styleID=\"4\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"TYPE\" styleID=\"5\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\">if else for while</WordsStyle>\r\n            <WordsStyle name=\"LINENUM\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\">bool long int char</WordsStyle>\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"8\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"9\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"11\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"13\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"14\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"verilog\" desc=\"Verilog\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGNAME\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"7\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"EDF8F9\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE BANG\" styleID=\"3\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"12\" fgColor=\"66FF00\" bgColor=\"F2F4FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"USER\" styleID=\"19\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"kix\" desc=\"KiXtart\" ext=\"\">\r\n            <!--\r\n            <WordsStyle name=\"\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n\t\t-->\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"31\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"2\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"3\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VAR\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"6\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"7\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"8\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"9\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"autoit\" desc=\"autoIt\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"1\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"2\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"4\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"6\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"7\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"8\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"9\" fgColor=\"FF0080\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"SENT\" styleID=\"10\" fgColor=\"999966\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"11\" fgColor=\"EDF8F9\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"12\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"EXPAND\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type5\" />\r\n            <WordsStyle name=\"COMOBJ\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"ada\" desc=\"ADA\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"1\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DELIMITER\" styleID=\"4\" fgColor=\"FF8080\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"5\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER EOL\" styleID=\"6\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"7\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"8\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"9\" fgColor=\"EDF8F9\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"10\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"ILLEGAL\" styleID=\"11\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"matlab\" desc=\"Matlab\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"2\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"4\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"5\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLE QUOTE STRING\" styleID=\"8\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"haskell\" desc=\"Haskell\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"2\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"800080\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"CA6500\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"5\" fgColor=\"CA6500\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"MODULE\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CAPITAL\" styleID=\"8\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATA\" styleID=\"9\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IMPORT\" styleID=\"10\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"11\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTANCE\" styleID=\"12\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"13\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK\" styleID=\"14\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK2\" styleID=\"15\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK3\" styleID=\"16\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"inno\" desc=\"InnoSetup\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"2\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"PARAMETER\" styleID=\"3\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"4\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"800000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR INLINE\" styleID=\"6\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT PASCAL\" styleID=\"7\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD PASCAL\" styleID=\"8\" fgColor=\"0080C0\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"KEYWORD USER\" styleID=\"9\" fgColor=\"8080FF\" bgColor=\"FFFFCC\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"STRING DOUBLE\" styleID=\"10\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING SINGLE\" styleID=\"11\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"12\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cmake\" desc=\"CMakeFile\" ext=\"cmake\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING D\" styleID=\"2\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING L\" styleID=\"3\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING R\" styleID=\"4\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"4\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"5\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"PARAMETER\" styleID=\"6\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"7\" fgColor=\"FF8040\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"USER DEFINED\" styleID=\"8\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"WHILEDEF\" styleID=\"9\" fgColor=\"339999\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"FOREACHDEF\" styleID=\"10\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"IFDEF\" styleID=\"11\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"MACRODEF\" styleID=\"12\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING VARIABLE\" styleID=\"13\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"14\" fgColor=\"804040\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"searchResult\" desc=\"Search result\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SELECTED LINE\" styleID=\"6\" fgColor=\"FFFF80\" bgColor=\"0000FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"HEARDER\" styleID=\"1\" fgColor=\"9933CC\" bgColor=\"D5FFD5\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HIT WORD\" styleID=\"3\" fgColor=\"99CC99\" bgColor=\"FFFF80\" fontName=\"\" fontStyle=\"4\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD1\" styleID=\"4\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\">if else for while</WordsStyle>\r\n            <WordsStyle name=\"KEYWORD2\" styleID=\"5\" fgColor=\"339999\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\">bool long int char</WordsStyle>\r\n        </LexerType>\r\n        <LexerType name=\"yaml\" desc=\"YAML\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"2\" fgColor=\"000080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"Comic Sans MS\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"3\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8040\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REFERENCE\" styleID=\"5\" fgColor=\"804000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\">if else for while</WordsStyle>\r\n            <WordsStyle name=\"DOCUMENT\" styleID=\"6\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\">bool long int char</WordsStyle>\r\n            <WordsStyle name=\"TEXT\" styleID=\"7\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"8\" fgColor=\"FF0000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n    </LexerStyles>\r\n    <GlobalStyles>\r\n        <!-- Attention : Don't modify the name of styleID=\"0\" -->\r\n        <WidgetStyle name=\"Global override\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"Courier New\" fontStyle=\"0\" fontSize=\"9\" />\r\n        <WidgetStyle name=\"Default Style\" styleID=\"32\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"Courier New\" fontStyle=\"0\" fontSize=\"9\" />\r\n        <WidgetStyle name=\"Indent guideline style\" styleID=\"37\" fgColor=\"C0C0C0\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Brace highlight style\" styleID=\"34\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Bad brace colour\" styleID=\"35\" fgColor=\"FF0000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Current line background colour\" styleID=\"0\" bgColor=\"333333\" fgColor=\"0080C0\" fontSize=\"\" fontStyle=\"0\" />\r\n        <WidgetStyle name=\"Selected text colour\" styleID=\"0\" bgColor=\"6699CC\" fgColor=\"CC0000\" />\r\n        <WidgetStyle name=\"Caret colour\" styleID=\"2069\" fgColor=\"FFFFFF\" bgColor=\"253B76\" fontStyle=\"0\" />\r\n        <WidgetStyle name=\"Edge colour\" styleID=\"0\" fgColor=\"80FFFF\" bgColor=\"112435\" fontSize=\"\" fontStyle=\"0\" />\r\n        <WidgetStyle name=\"Line number margin\" styleID=\"33\" fgColor=\"C0C0C0\" bgColor=\"333333\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Fold\" styleID=\"0\" fgColor=\"6A6A6A\" bgColor=\"333333\" fontSize=\"8\" fontStyle=\"0\" />\r\n        <WidgetStyle name=\"Fold margin\" styleID=\"0\" fgColor=\"1A1A1A\" bgColor=\"1A1A1A\" fontSize=\"8\" fontStyle=\"0\" />\r\n        <WidgetStyle name=\"White space symbol\" styleID=\"0\" fgColor=\"FF8080\" bgColor=\"EEEEEC\" fontSize=\"\" fontStyle=\"0\" />\r\n        <WidgetStyle name=\"Smart HighLighting\" styleID=\"29\" bgColor=\"80FF00\" fgColor=\"555753\" />\r\n        <WidgetStyle name=\"Find Mark Style\" styleID=\"31\" fgColor=\"FFFF00\" bgColor=\"FF0000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Incremental highlight all\" styleID=\"28\" bgColor=\"FF8000\" fgColor=\"555753\" />\r\n        <WidgetStyle name=\"Tags match highlighting\" styleID=\"27\" bgColor=\"0080FF\" fgColor=\"FCAF3E\" />\r\n        <WidgetStyle name=\"Tags attribute\" styleID=\"26\" bgColor=\"808080\" />\r\n        <WidgetStyle name=\"Active tab focused indicator\" styleID=\"0\" fgColor=\"FAAA3C\" bgColor=\"FF8000\" />\r\n        <WidgetStyle name=\"Active tab unfocused indicator\" styleID=\"0\" fgColor=\"FFCAB0\" bgColor=\"FFFF00\" />\r\n        <WidgetStyle name=\"Active tab text\" styleID=\"0\" fgColor=\"000000\" bgColor=\"8000FF\" fontSize=\"10\" fontStyle=\"0\" />\r\n        <WidgetStyle name=\"Inactive tabs\" styleID=\"0\" fgColor=\"808080\" bgColor=\"C0C0C0\" />\r\n    </GlobalStyles>\r\n</NotepadPlus>\r\n"
  },
  {
    "path": "gui/themes/Eclipse_Default.xml",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\" ?>\r\n<!--//\r\n\r\nEclipse\r\nCopyright (c) 2009 Fesenko Alexander <http://return0x000.blogspot.com/>\r\n\r\nPermission is hereby granted, free of charge, to any person\r\nobtaining a copy of this software and associated documentation\r\nfiles (the \"Software\"), to deal in the Software without\r\nrestriction, including without limitation the rights to use,\r\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\r\ncopies of the Software, and to permit persons to whom the\r\nSoftware is furnished to do so, subject to the following\r\nconditions:\r\n\r\nThe above copyright notice and this permission notice shall be\r\nincluded in all copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\r\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\r\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\r\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\r\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\r\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\r\nOTHER DEALINGS IN THE SOFTWARE.\r\n\r\nInstallation:\r\n    Rename this file to stylers.xml and copy to\r\n\tC:\\Documents and Settings\\%%USERNAME%%\\Application Data\\Notepad++\\\r\n\tor C:\\Program Files\\Notepad++\\ (depends on installation type)\r\n\r\nAbout:\r\n    This style is based on Eclipse IDE default color theme\r\n\r\n//-->\r\n<NotepadPlus>\r\n    <LexerStyles>\r\n        <LexerType name=\"actionscript\" desc=\"ActionScript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"20\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"7F7F9F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"646464\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"7F9FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"7F9FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"ada\" desc=\"ADA\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"1\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"2\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DELIMITER\" styleID=\"4\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"5\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER EOL\" styleID=\"6\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"7\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"8\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"9\" fgColor=\"7F9FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"10\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ILLEGAL\" styleID=\"11\" fgColor=\"FF0000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"asp\" desc=\"asp\" ext=\"asp\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"81\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"82\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"83\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"84\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"85\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"87\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"86\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASPSYBOL\" styleID=\"15\" fgColor=\"7F9FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SCRIPTTYPE\" styleID=\"16\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"asm\" desc=\"Assembly\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"4\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"5\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CPU INSTRUCTION\" styleID=\"6\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"MATH INSTRUCTION\" styleID=\"7\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"REGISTER\" styleID=\"8\" fgColor=\"0000C0\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"9\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"DIRECTIVE OPERAND\" styleID=\"10\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"COMMENT BLOCK\" styleID=\"11\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"12\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"13\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"EXT INSTRUCTION\" styleID=\"14\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type4\" />\r\n        </LexerType>\r\n        <LexerType name=\"autoit\" desc=\"autoIt\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"1\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"2\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"4\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"6\" fgColor=\"7F9FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"7\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"8\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"9\" fgColor=\"0000C0\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"SENT\" styleID=\"10\" fgColor=\"7F9FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"11\" fgColor=\"7F7F9F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"12\" fgColor=\"7F7F9F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"EXPAND\" styleID=\"13\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type5\" />\r\n            <WordsStyle name=\"COMOBJ\" styleID=\"14\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"bash\" desc=\"bash\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"FF0000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"4\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"5\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"6\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"8\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SCALAR\" styleID=\"9\" fgColor=\"0000C0\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PARAM\" styleID=\"10\" fgColor=\"7F9FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"11\" fgColor=\"646464\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE DELIM\" styleID=\"12\" fgColor=\"646464\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE Q\" styleID=\"13\" fgColor=\"646464\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"batch\" desc=\"Batch\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORDS\" styleID=\"2\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"3\" fgColor=\"7F9FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"HIDE SYBOL\" styleID=\"4\" fgColor=\"646464\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"5\" fgColor=\"0000C0\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"6\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"c\" desc=\"C\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"7F7F9F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"646464\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"646464\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"7F9FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"7F9FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cpp\" desc=\"C++\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"7F7F9F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"646464\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"646464\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"7F9FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"7F9FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cs\" desc=\"C#\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"7F7F9F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"646464\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"646464\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"7F9FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"7F9FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"caml\" desc=\"Caml\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGNAME\" styleID=\"2\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"3\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"BUILIN FUNC &amp; TYPE\" styleID=\"4\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"TYPE\" styleID=\"5\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"LINENUM\" styleID=\"6\" fgColor=\"646464\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"8\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"9\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"11\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"13\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"14\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cmake\" desc=\"CMakeFile\" ext=\"cmake\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING D\" styleID=\"2\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING L\" styleID=\"3\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING R\" styleID=\"4\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"4\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"5\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"PARAMETER\" styleID=\"6\" fgColor=\"0000C0\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"7\" fgColor=\"0000C0\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"USER DEFINED\" styleID=\"8\" fgColor=\"646464\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"WHILEDEF\" styleID=\"9\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"FOREACHDEF\" styleID=\"10\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IFDEF\" styleID=\"11\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"MACRODEF\" styleID=\"12\" fgColor=\"7F9FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING VARIABLE\" styleID=\"13\" fgColor=\"0000C0\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"14\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"css\" desc=\"CSS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"3F7F7F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS\" styleID=\"2\" fgColor=\"3F7F7F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PSEUDOCLASS\" styleID=\"3\" fgColor=\"3F7F7F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"UNKNOWN_PSEUDOCLASS\" styleID=\"4\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"5\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"6\" fgColor=\"7F007F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"UNKNOWN_IDENTIFIER\" styleID=\"7\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VALUE\" styleID=\"8\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ID\" styleID=\"10\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IMPORTANT\" styleID=\"11\" fgColor=\"FF0000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"12\" fgColor=\"7F9FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"diff\" desc=\"DIFF\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"2\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"HEADER\" styleID=\"3\" fgColor=\"0000C0\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"POSITION\" styleID=\"4\" fgColor=\"7F7F9F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DELETED\" styleID=\"5\" fgColor=\"646464\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ADDED\" styleID=\"6\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"nfo\" desc=\"Dos Style\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"32\" fgColor=\"7F9FBF\" bgColor=\"000000\" />\r\n        </LexerType>\r\n        <LexerType name=\"fortran\" desc=\"Fortran\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"4\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"5\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"8\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION1\" styleID=\"9\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"FUNCTION2\" styleID=\"10\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"11\" fgColor=\"7F7F9F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR2\" styleID=\"12\" fgColor=\"646464\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"13\" fgColor=\"7F9FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"CONTINUATION\" styleID=\"14\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"haskell\" desc=\"Haskell\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"2\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"5\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS\" styleID=\"6\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MODULE\" styleID=\"7\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CAPITAL\" styleID=\"8\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATA\" styleID=\"9\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IMPORT\" styleID=\"10\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"11\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTANCE\" styleID=\"12\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"13\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK\" styleID=\"14\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK2\" styleID=\"15\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK3\" styleID=\"16\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"html\" desc=\"HTML\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"6\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"7\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"3F7F7F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGEND\" styleID=\"11\" fgColor=\"3F7F7F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGUNKNOWN\" styleID=\"2\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"3\" fgColor=\"7F007F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTEUNKNOWN\" styleID=\"4\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SGMLDEFAULT\" styleID=\"21\" fgColor=\"000000\" bgColor=\"A6CAF0\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CDATA\" styleID=\"17\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VALUE\" styleID=\"19\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ENTITY\" styleID=\"10\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"ini\" desc=\"ini file\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"0000C0\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"2\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASSIGNMENT\" styleID=\"3\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFVAL\" styleID=\"4\" fgColor=\"646464\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"inno\" desc=\"InnoSetup\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"2\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"PARAMETER\" styleID=\"3\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"4\" fgColor=\"7F7F9F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"7F7F9F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR INLINE\" styleID=\"6\" fgColor=\"7F7F9F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT PASCAL\" styleID=\"7\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD PASCAL\" styleID=\"8\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"KEYWORD USER\" styleID=\"9\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"STRING DOUBLE\" styleID=\"10\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING SINGLE\" styleID=\"11\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"12\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"java\" desc=\"Java\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"7F7F9F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"646464\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"646464\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"7F9FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"7F9FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"javascript\" desc=\"Javascript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"41\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"45\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"46\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"47\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"48\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"49\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOLS\" styleID=\"50\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"51\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"52\" fgColor=\"646464\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"42\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"43\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTDOC\" styleID=\"44\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"kix\" desc=\"KiXtart\" ext=\"\">\r\n            <!--\r\n            <WordsStyle name=\"\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n\t\t-->\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"31\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"2\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"3\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VAR\" styleID=\"5\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"6\" fgColor=\"7F7F9F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"7\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"8\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"9\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"lisp\" desc=\"LISP\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION WORD\" styleID=\"3\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"5\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"8\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"9\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"11\" fgColor=\"7F7F9F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"lua\" desc=\"Lua\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"LITERALSTRING\" styleID=\"8\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"7F7F9F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNC1\" styleID=\"13\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"FUNC2\" styleID=\"14\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"FUNC3\" styleID=\"15\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" keywordClass=\"type2\" />\r\n        </LexerType>\r\n        <LexerType name=\"makefile\" desc=\"Makefile\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"2\" fgColor=\"7F7F9F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"3\" fgColor=\"0000C0\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"4\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TARGET\" styleID=\"5\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDEOL\" styleID=\"9\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"matlab\" desc=\"Matlab\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"2\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"4\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"5\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLE QUOTE STRING\" styleID=\"8\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"nsis\" desc=\"NSIS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING DOUBLE QUOTE\" styleID=\"2\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING LEFT QUOTE\" styleID=\"3\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING RIGHT QUOTE\" styleID=\"4\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"5\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"6\" fgColor=\"0000C0\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"7\" fgColor=\"7F9FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"USER DEFINED\" styleID=\"8\" fgColor=\"646464\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"4\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"9\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SUBSECTION\" styleID=\"10\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IF DEFINE\" styleID=\"11\" fgColor=\"7F7F9F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"12\" fgColor=\"7F7F9F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING VAR\" styleID=\"13\" fgColor=\"0000C0\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"14\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SECTION GROUP\" styleID=\"15\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAGE EX\" styleID=\"16\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION DEFINITIONS\" styleID=\"17\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"18\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"objc\" desc=\"Objective-C\" ext=\"\">\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"19\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"QUALIFIER\" styleID=\"20\" fgColor=\"95004A\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"7F7F9F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"646464\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"7F9FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"7F9FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"pascal\" desc=\"Pascal\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"7F7F9F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"646464\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"perl\" desc=\"Perl\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"7F7F9F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"646464\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"17\" fgColor=\"646464\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SCALAR\" styleID=\"12\" fgColor=\"0000C0\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ARRAY\" styleID=\"13\" fgColor=\"0000C0\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HASH\" styleID=\"14\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL TABLE\" styleID=\"15\" fgColor=\"646464\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PUNCTUATION\" styleID=\"8\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"POD\" styleID=\"3\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"FF0000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"LONGQUOTE\" styleID=\"19\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATASECTION\" styleID=\"21\" fgColor=\"646464\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGSUBST\" styleID=\"18\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"20\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"php\" desc=\"php\" ext=\"\">\r\n            <WordsStyle name=\"QUESTION MARK\" styleID=\"18\" fgColor=\"7F9FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"118\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"119\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING VARIABLE\" styleID=\"126\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SIMPLESTRING\" styleID=\"120\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"121\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"122\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"123\" fgColor=\"0000C0\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"124\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"125\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"127\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"postscript\" desc=\"Postscript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DSC COMMENT\" styleID=\"2\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DSC VALUE\" styleID=\"3\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Name\" styleID=\"5\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"6\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"LITERAL\" styleID=\"7\" fgColor=\"7F9FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IMMEVAL\" styleID=\"8\" fgColor=\"0000C0\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAREN ARRAY\" styleID=\"9\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAREN DICT\" styleID=\"10\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAREN PROC\" styleID=\"11\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"12\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HEX STRING\" styleID=\"13\" fgColor=\"646464\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BASE85 STRING\" styleID=\"14\" fgColor=\"646464\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BAD STRING CHAR\" styleID=\"15\" fgColor=\"FF0000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"props\" desc=\"Properties file\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASSIGNMENT\" styleID=\"3\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFVAL\" styleID=\"4\" fgColor=\"646464\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"python\" desc=\"Python\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"4\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORDS\" styleID=\"5\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TRIPLE\" styleID=\"6\" fgColor=\"646464\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TRIPLEDOUBLE\" styleID=\"7\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASSNAME\" styleID=\"8\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFNAME\" styleID=\"9\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK\" styleID=\"12\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"12\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"rc\" desc=\"RC\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"7F7F9F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"646464\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"646464\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"7F9FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"7F9FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"ruby\" desc=\"Ruby\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"FF0000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"2\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"POD\" styleID=\"3\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"5\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS NAME\" styleID=\"8\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEF NAME\" styleID=\"9\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"12\" fgColor=\"646464\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"13\" fgColor=\"0000C0\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"14\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MODULE NAME\" styleID=\"15\" fgColor=\"7F7F9F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTANCE VAR\" styleID=\"16\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS VAR\" styleID=\"17\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"18\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATA SECTION\" styleID=\"19\" fgColor=\"646464\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING Q\" styleID=\"24\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"smalltalk\" desc=\"Smalltalk\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"1\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"3\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"4\" fgColor=\"646464\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BINARY\" styleID=\"5\" fgColor=\"646464\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BOOL\" styleID=\"6\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SELF\" styleID=\"7\" fgColor=\"0000C0\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SUPER\" styleID=\"8\" fgColor=\"7F9FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"NIL\" styleID=\"9\" fgColor=\"646464\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"10\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"RETURN\" styleID=\"11\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"12\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KWS END\" styleID=\"13\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASSIGN\" styleID=\"14\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"15\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SPECIAL SELECTOR\" styleID=\"16\" fgColor=\"7F9FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"sql\" desc=\"SQL\" ext=\"\">\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"5\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"646464\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"7\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"tcl\" desc=\"TCL\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"7F7F9F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"646464\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"646464\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"7F9FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"7F9FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"tex\" desc=\"TeX\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"1\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"GROUP\" styleID=\"2\" fgColor=\"646464\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"3\" fgColor=\"646464\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"4\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"5\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"vb\" desc=\"VB / VBS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"7\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"3\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"7F7F9F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATE\" styleID=\"8\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"verilog\" desc=\"Verilog\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGNAME\" styleID=\"2\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"7\" fgColor=\"0000C0\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"7F7F9F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE BANG\" styleID=\"3\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"12\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"USER\" styleID=\"19\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"vhdl\" desc=\"VHDL\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LIne\" styleID=\"2\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"5\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"6\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"7\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"8\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STD OPERATOR\" styleID=\"9\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"10\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"9\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DIRECTIVE OPERAND\" styleID=\"10\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"STD FUNCTION\" styleID=\"11\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"STD PACKAGE\" styleID=\"12\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"STD TYPE\" styleID=\"13\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"USER DEFINE\" styleID=\"14\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type5\" />\r\n        </LexerType>\r\n        <LexerType name=\"xml\" desc=\"XML\" ext=\"\">\r\n            <WordsStyle name=\"XMLSTART\" styleID=\"12\" fgColor=\"3F7F7F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"XMLEND\" styleID=\"13\" fgColor=\"3F7F7F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"3F5FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"6\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"7\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"3F7F7F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGEND\" styleID=\"11\" fgColor=\"3F7F7F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGUNKNOWN\" styleID=\"2\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"3\" fgColor=\"7F007F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTEUNKNOWN\" styleID=\"4\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SGMLDEFAULT\" styleID=\"21\" fgColor=\"000000\" bgColor=\"A6CAF0\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CDATA\" styleID=\"17\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"yaml\" desc=\"YAML\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"2\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"3F7F5F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"3\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REFERENCE\" styleID=\"5\" fgColor=\"3F3FBF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOCUMENT\" styleID=\"6\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"7\" fgColor=\"2A00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"8\" fgColor=\"FF0000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"searchResult\" desc=\"Search result\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SELECTED LINE\" styleID=\"6\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"HEARDER\" styleID=\"1\" fgColor=\"3F7F5F\" bgColor=\"D5FFD5\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HIT WORD\" styleID=\"3\" fgColor=\"000000\" bgColor=\"FFFF80\" fontName=\"\" fontStyle=\"4\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD1\" styleID=\"4\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\">if else for while</WordsStyle>\r\n            <WordsStyle name=\"KEYWORD2\" styleID=\"5\" fgColor=\"7F0055\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\">bool long int char</WordsStyle>\r\n        </LexerType>\r\n    </LexerStyles>\r\n    <GlobalStyles>\r\n        <!-- Attention : Don't modify the name of styleID=\"0\" -->\r\n        <WidgetStyle name=\"Global override\" styleID=\"0\" fgColor=\"FFFF80\" bgColor=\"FF8000\" fontName=\"Courier New\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Default Style\" styleID=\"32\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"Courier New\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Indent guideline style\" styleID=\"37\" fgColor=\"C0C0C0\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Brace highlight style\" styleID=\"34\" fgColor=\"FF0000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Bad brace colour\" styleID=\"35\" fgColor=\"800000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Current line background colour\" styleID=\"0\" bgColor=\"E8F2FE\" />\r\n        <WidgetStyle name=\"Selected text colour\" styleID=\"0\" bgColor=\"D4D4D4\" />\r\n        <WidgetStyle name=\"Caret colour\" styleID=\"2069\" fgColor=\"000000\" />\r\n        <WidgetStyle name=\"Edge colour\" styleID=\"0\" fgColor=\"80FFFF\" />\r\n        <WidgetStyle name=\"Line number margin\" styleID=\"33\" fgColor=\"808080\" bgColor=\"E4E4E4\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Fold\" styleID=\"0\" fgColor=\"808080\" bgColor=\"F3F3F3\" />\r\n        <WidgetStyle name=\"Fold margin\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"E9E9E9\" />\r\n        <WidgetStyle name=\"White space symbol\" styleID=\"0\" fgColor=\"7F9FBF\" />\r\n        <WidgetStyle name=\"Smart HighLighting\" styleID=\"29\" bgColor=\"A3A3A3\" />\r\n        <WidgetStyle name=\"Find Mark Style\" styleID=\"31\" bgColor=\"FF0000\" />\r\n        <WidgetStyle name=\"Incremental highlight all\" styleID=\"28\" bgColor=\"FFFF00\" />\r\n        <WidgetStyle name=\"Tags match highlighting\" styleID=\"27\" bgColor=\"FFFF00\" />\r\n        <WidgetStyle name=\"Tags attribute\" styleID=\"26\" bgColor=\"FFFFFF\" />\r\n        <WidgetStyle name=\"Active tab focused indicator\" styleID=\"0\" fgColor=\"FAAA3C\" />\r\n        <WidgetStyle name=\"Active tab unfocused indicator\" styleID=\"0\" fgColor=\"FFCAB0\" />\r\n        <WidgetStyle name=\"Active tab text\" styleID=\"0\" fgColor=\"000000\" />\r\n        <WidgetStyle name=\"Inactive tabs\" styleID=\"0\" fgColor=\"808080\" bgColor=\"C0C0C0\" />\r\n    </GlobalStyles>\r\n</NotepadPlus>\r\n"
  },
  {
    "path": "gui/themes/Hello_Kitty.xml",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\" ?>\r\n<!--\r\nTheme name : Hello Kitty\r\nThis theme is not complete. If you enhance it, please send it back to me :\r\n<don.h@free.fr>\r\nso your enhanced file can be included in Notepad++ future release.\r\n-->\r\n<NotepadPlus>\r\n    <LexerStyles>\r\n        <LexerType name=\"actionscript\" desc=\"ActionScript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"20\" fgColor=\"95004A\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"804000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"8000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"000080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"008080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"008080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"008080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"008080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"ada\" desc=\"ADA\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"1\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"2\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"FF8000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DELIMITER\" styleID=\"4\" fgColor=\"FF8080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"5\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER EOL\" styleID=\"6\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"7\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"8\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"9\" fgColor=\"804000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"10\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ILLEGAL\" styleID=\"11\" fgColor=\"FF0000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"asp\" desc=\"asp\" ext=\"asp\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"81\" fgColor=\"8000FF\" bgColor=\"C4F9FD\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"82\" fgColor=\"008000\" bgColor=\"C4F9FD\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"83\" fgColor=\"FF0000\" bgColor=\"C4F9FD\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"84\" fgColor=\"000080\" bgColor=\"C4F9FD\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"85\" fgColor=\"808080\" bgColor=\"C4F9FD\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"87\" fgColor=\"808080\" bgColor=\"C4F9FD\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"86\" fgColor=\"000000\" bgColor=\"C4F9FD\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASPSYBOL\" styleID=\"15\" fgColor=\"000000\" bgColor=\"FFFF00\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SCRIPTTYPE\" styleID=\"16\" fgColor=\"000000\" bgColor=\"FFC000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"asm\" desc=\"Assembly\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FF8000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"4\" fgColor=\"000080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"5\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CPU INSTRUCTION\" styleID=\"6\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"MATH INSTRUCTION\" styleID=\"7\" fgColor=\"0080C0\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"REGISTER\" styleID=\"8\" fgColor=\"8080FF\" bgColor=\"FFFFCC\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"9\" fgColor=\"0080FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"DIRECTIVE OPERAND\" styleID=\"10\" fgColor=\"000080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"COMMENT BLOCK\" styleID=\"11\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"12\" fgColor=\"808000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"13\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"EXT INSTRUCTION\" styleID=\"14\" fgColor=\"804000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type4\" />\r\n        </LexerType>\r\n        <LexerType name=\"autoit\" desc=\"autoIt\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"2\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"FF8000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"4\" fgColor=\"8000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"6\" fgColor=\"8000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"7\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"8\" fgColor=\"000080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"9\" fgColor=\"FF0080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"SENT\" styleID=\"10\" fgColor=\"8080C0\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"11\" fgColor=\"804000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"12\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"EXPAND\" styleID=\"13\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type5\" />\r\n            <WordsStyle name=\"COMOBJ\" styleID=\"14\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"bash\" desc=\"bash\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"FFFFFF\" bgColor=\"FF0000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"4\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"FF0000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"5\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"6\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"804000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"8\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SCALAR\" styleID=\"9\" fgColor=\"FF8040\" bgColor=\"FFFFD9\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PARAM\" styleID=\"10\" fgColor=\"008080\" bgColor=\"00FFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"11\" fgColor=\"804040\" bgColor=\"E1FFF3\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE DELIM\" styleID=\"12\" fgColor=\"0000FF\" bgColor=\"FF0000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE Q\" styleID=\"13\" fgColor=\"FF0000\" bgColor=\"0000FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"batch\" desc=\"Batch\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORDS\" styleID=\"2\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"3\" fgColor=\"FF0000\" bgColor=\"FFFF80\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"HIDE SYBOL\" styleID=\"4\" fgColor=\"FF00FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"5\" fgColor=\"0080FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"6\" fgColor=\"FF8000\" bgColor=\"FCFFF0\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"FF0000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"c\" desc=\"C\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"804000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"8000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"000080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"008080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"008080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"008080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"008080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cpp\" desc=\"C++\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"804000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"8000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"000080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"008080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"008080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"008080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"008080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cs\" desc=\"C#\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"804000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"8000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"000080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"008080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"008080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"008080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"008080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"caml\" desc=\"Caml\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGNAME\" styleID=\"2\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"3\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"BUILIN FUNC &amp; TYPE\" styleID=\"4\" fgColor=\"8000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"TYPE\" styleID=\"5\" fgColor=\"8000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"LINENUM\" styleID=\"6\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"000080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"8\" fgColor=\"FF8000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"9\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"11\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"13\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"14\" fgColor=\"008080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"008080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cmake\" desc=\"CMakeFile\" ext=\"cmake\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING D\" styleID=\"2\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING L\" styleID=\"3\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING R\" styleID=\"4\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"4\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"PARAMETER\" styleID=\"6\" fgColor=\"8000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"7\" fgColor=\"FF8040\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"USER DEFINED\" styleID=\"8\" fgColor=\"000080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"WHILEDEF\" styleID=\"9\" fgColor=\"0080FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"FOREACHDEF\" styleID=\"10\" fgColor=\"008080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IFDEF\" styleID=\"11\" fgColor=\"8000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"MACRODEF\" styleID=\"12\" fgColor=\"FF0000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING VARIABLE\" styleID=\"13\" fgColor=\"808080\" bgColor=\"FEFCF5\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"14\" fgColor=\"804040\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"css\" desc=\"CSS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"Batang\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS\" styleID=\"2\" fgColor=\"FF0000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PSEUDOCLASS\" styleID=\"3\" fgColor=\"FF8000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"UNKNOWN_PSEUDOCLASS\" styleID=\"4\" fgColor=\"FF8080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"5\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"6\" fgColor=\"8080C0\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"UNKNOWN_IDENTIFIER\" styleID=\"7\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VALUE\" styleID=\"8\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ID\" styleID=\"10\" fgColor=\"0080FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IMPORTANT\" styleID=\"11\" fgColor=\"FF0000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"12\" fgColor=\"0080FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"diff\" desc=\"DIFF\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"2\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"HEADER\" styleID=\"3\" fgColor=\"8000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"POSITION\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DELETED\" styleID=\"5\" fgColor=\"808040\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ADDED\" styleID=\"6\" fgColor=\"0080FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"nfo\" desc=\"Dos Style\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"32\" fgColor=\"C0C0C0\" bgColor=\"000000\" fontSize=\"10\" fontStyle=\"0\" />\r\n        </LexerType>\r\n        <LexerType name=\"fortran\" desc=\"Fortran\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FF8000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"4\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"5\" fgColor=\"808040\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"000080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"8\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION1\" styleID=\"9\" fgColor=\"8000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"FUNCTION2\" styleID=\"10\" fgColor=\"0080C0\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"11\" fgColor=\"800000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR2\" styleID=\"12\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"FF80FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"CONTINUATION\" styleID=\"14\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"haskell\" desc=\"Haskell\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"2\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"800080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"CA6500\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"5\" fgColor=\"CA6500\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS\" styleID=\"6\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"MODULE\" styleID=\"7\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CAPITAL\" styleID=\"8\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATA\" styleID=\"9\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IMPORT\" styleID=\"10\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"11\" fgColor=\"000080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTANCE\" styleID=\"12\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"13\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK\" styleID=\"14\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK2\" styleID=\"15\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK3\" styleID=\"16\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"html\" desc=\"HTML\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"FF0000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"6\" fgColor=\"8000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"7\" fgColor=\"8000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGEND\" styleID=\"11\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGUNKNOWN\" styleID=\"2\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"3\" fgColor=\"FF0000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTEUNKNOWN\" styleID=\"4\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SGMLDEFAULT\" styleID=\"21\" fgColor=\"000000\" bgColor=\"A6CAF0\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CDATA\" styleID=\"17\" fgColor=\"FF8000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VALUE\" styleID=\"19\" fgColor=\"FF8000\" bgColor=\"FEFDE0\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ENTITY\" styleID=\"10\" fgColor=\"000000\" bgColor=\"FEFDE0\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"ini\" desc=\"ini file\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"2\" fgColor=\"8000FF\" bgColor=\"F2F4FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASSIGNMENT\" styleID=\"3\" fgColor=\"FF0000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFVAL\" styleID=\"4\" fgColor=\"FF0000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"inno\" desc=\"InnoSetup\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"2\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"PARAMETER\" styleID=\"3\" fgColor=\"FF8000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"4\" fgColor=\"000080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"800000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR INLINE\" styleID=\"6\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT PASCAL\" styleID=\"7\" fgColor=\"008080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD PASCAL\" styleID=\"8\" fgColor=\"0080C0\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"KEYWORD USER\" styleID=\"9\" fgColor=\"8080FF\" bgColor=\"FFFFCC\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"STRING DOUBLE\" styleID=\"10\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING SINGLE\" styleID=\"11\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"12\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"java\" desc=\"Java\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"804000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"8000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"000080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"008080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"008080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"008080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"008080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"javascript\" desc=\"Javascript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"41\" fgColor=\"000000\" bgColor=\"F2F4FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"45\" fgColor=\"FF0000\" bgColor=\"F2F4FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"46\" fgColor=\"000000\" bgColor=\"F2F4FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"47\" fgColor=\"000080\" bgColor=\"F2F4FF\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"48\" fgColor=\"808080\" bgColor=\"F2F4FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"49\" fgColor=\"808080\" bgColor=\"F2F4FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOLS\" styleID=\"50\" fgColor=\"000000\" bgColor=\"F2F4FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"51\" fgColor=\"808080\" bgColor=\"F2F4FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"52\" fgColor=\"8000FF\" bgColor=\"F2F4FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"42\" fgColor=\"008000\" bgColor=\"F2F4FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"43\" fgColor=\"008000\" bgColor=\"F2F4FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTDOC\" styleID=\"44\" fgColor=\"008080\" bgColor=\"F2F4FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"kix\" desc=\"KiXtart\" ext=\"\">\r\n            <!--\r\n            <WordsStyle name=\"\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n\t\t-->\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"31\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"2\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"3\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VAR\" styleID=\"5\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"6\" fgColor=\"8000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"7\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"8\" fgColor=\"8000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"9\" fgColor=\"000080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"lisp\" desc=\"LISP\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FF8000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION WORD\" styleID=\"3\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"5\" fgColor=\"000080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"8\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"9\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"0080C0\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"11\" fgColor=\"800000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"lua\" desc=\"Lua\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"008080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"LITERALSTRING\" styleID=\"8\" fgColor=\"95004A\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"804000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"000080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNC1\" styleID=\"13\" fgColor=\"0080C0\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"FUNC2\" styleID=\"14\" fgColor=\"8000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"FUNC3\" styleID=\"15\" fgColor=\"0000A0\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" keywordClass=\"type2\" />\r\n        </LexerType>\r\n        <LexerType name=\"makefile\" desc=\"Makefile\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"2\" fgColor=\"FFFF00\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"3\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"4\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"TARGET\" styleID=\"5\" fgColor=\"FF0000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDEOL\" styleID=\"9\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"matlab\" desc=\"Matlab\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"2\" fgColor=\"8000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"FF8000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"4\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\">endfunction endif</WordsStyle>\r\n            <WordsStyle name=\"STRING\" styleID=\"5\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"000080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLE QUOTE STRING\" styleID=\"8\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"nsis\" desc=\"NSIS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING DOUBLE QUOTE\" styleID=\"2\" fgColor=\"808080\" bgColor=\"EEEEEE\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING LEFT QUOTE\" styleID=\"3\" fgColor=\"FFFF80\" bgColor=\"C0C0C0\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING RIGHT QUOTE\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"C0C0C0\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"6\" fgColor=\"FF8000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"7\" fgColor=\"FF0000\" bgColor=\"FFFF80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"USER DEFINED\" styleID=\"8\" fgColor=\"FDFFEC\" bgColor=\"FF80FF\" fontName=\"\" fontStyle=\"4\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"9\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SUBSECTION\" styleID=\"10\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IF DEFINE\" styleID=\"11\" fgColor=\"808040\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"12\" fgColor=\"800000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING VAR\" styleID=\"13\" fgColor=\"FF8000\" bgColor=\"EFEFEF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"14\" fgColor=\"FF0000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SECTION GROUP\" styleID=\"15\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAGE EX\" styleID=\"16\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION DEFINITIONS\" styleID=\"17\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"18\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"objc\" desc=\"Objective-C\" ext=\"\">\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"19\" fgColor=\"A001D6\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"QUALIFIER\" styleID=\"20\" fgColor=\"95004A\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"804000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"8000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"000080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"008080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"008080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"008080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"008080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"pascal\" desc=\"Pascal\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"804000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"000080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"008080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"perl\" desc=\"Perl\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"804000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FF0000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF0000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"000080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"17\" fgColor=\"8080FF\" bgColor=\"F8FEDE\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SCALAR\" styleID=\"12\" fgColor=\"FF8000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ARRAY\" styleID=\"13\" fgColor=\"CF34CF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HASH\" styleID=\"14\" fgColor=\"8080C0\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL TABLE\" styleID=\"15\" fgColor=\"FF0000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"PUNCTUATION\" styleID=\"8\" fgColor=\"804000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"POD\" styleID=\"3\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"FF80C0\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"LONGQUOTE\" styleID=\"19\" fgColor=\"FF8000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATASECTION\" styleID=\"21\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGSUBST\" styleID=\"18\" fgColor=\"8080C0\" bgColor=\"FFEEEC\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"20\" fgColor=\"FFFF00\" bgColor=\"808080\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"php\" desc=\"php\" ext=\"\">\r\n            <WordsStyle name=\"QUESTION MARK\" styleID=\"18\" fgColor=\"FF0000\" bgColor=\"FDF8E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"118\" fgColor=\"000000\" bgColor=\"FEFCF5\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"119\" fgColor=\"808080\" bgColor=\"FEFCF5\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING VARIABLE\" styleID=\"126\" fgColor=\"808080\" bgColor=\"FEFCF5\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SIMPLESTRING\" styleID=\"120\" fgColor=\"808080\" bgColor=\"FEFCF5\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"121\" fgColor=\"0000FF\" bgColor=\"FEFCF5\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"122\" fgColor=\"FF8000\" bgColor=\"FEFCF5\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"123\" fgColor=\"000080\" bgColor=\"FEFCF5\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"124\" fgColor=\"008000\" bgColor=\"FEFCF5\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"125\" fgColor=\"008000\" bgColor=\"FEFCF5\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"127\" fgColor=\"8000FF\" bgColor=\"FEFCF5\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"postscript\" desc=\"Postscript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DSC COMMENT\" styleID=\"2\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DSC VALUE\" styleID=\"3\" fgColor=\"FF0000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Name\" styleID=\"5\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"6\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"LITERAL\" styleID=\"7\" fgColor=\"0080C0\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IMMEVAL\" styleID=\"8\" fgColor=\"000080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAREN ARRAY\" styleID=\"9\" fgColor=\"FF00FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAREN DICT\" styleID=\"10\" fgColor=\"0080FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAREN PROC\" styleID=\"11\" fgColor=\"000080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"12\" fgColor=\"808000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HEX STRING\" styleID=\"13\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BASE85 STRING\" styleID=\"14\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BAD STRING CHAR\" styleID=\"15\" fgColor=\"804000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"props\" desc=\"Properties file\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"2\" fgColor=\"8000FF\" bgColor=\"F2F4FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASSIGNMENT\" styleID=\"3\" fgColor=\"FF0000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFVAL\" styleID=\"4\" fgColor=\"FF0000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"python\" desc=\"Python\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FF0000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"4\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORDS\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\">True False</WordsStyle>\r\n            <WordsStyle name=\"TRIPLE\" styleID=\"6\" fgColor=\"FF8000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TRIPLEDOUBLE\" styleID=\"7\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASSNAME\" styleID=\"8\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFNAME\" styleID=\"9\" fgColor=\"FF00FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"000080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK\" styleID=\"12\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"12\" fgColor=\"FFFF00\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"rc\" desc=\"RC\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"804000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"8000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"000080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"008080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"008080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"008080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"008080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"ruby\" desc=\"Ruby\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"2\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"POD\" styleID=\"3\" fgColor=\"004000\" bgColor=\"C0FFC0\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"808000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS NAME\" styleID=\"8\" fgColor=\"0080C0\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEF NAME\" styleID=\"9\" fgColor=\"8080FF\" bgColor=\"FFFFCC\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"000080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"12\" fgColor=\"0080FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"13\" fgColor=\"000080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"14\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MODULE NAME\" styleID=\"15\" fgColor=\"804000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTANCE VAR\" styleID=\"16\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS VAR\" styleID=\"17\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"18\" fgColor=\"FFFF00\" bgColor=\"A08080\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATA SECTION\" styleID=\"19\" fgColor=\"600000\" bgColor=\"FFF0D8\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING Q\" styleID=\"24\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"smalltalk\" desc=\"Smalltalk\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"1\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FF8000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"3\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"4\" fgColor=\"408080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"BINARY\" styleID=\"5\" fgColor=\"000080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BOOL\" styleID=\"6\" fgColor=\"8000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SELF\" styleID=\"7\" fgColor=\"8080FF\" bgColor=\"FFFFCC\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SUPER\" styleID=\"8\" fgColor=\"0080FF\" bgColor=\"ECFFEA\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"NIL\" styleID=\"9\" fgColor=\"8080C0\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"10\" fgColor=\"800000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"RETURN\" styleID=\"11\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"12\" fgColor=\"808000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KWS END\" styleID=\"13\" fgColor=\"0080FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASSIGN\" styleID=\"14\" fgColor=\"FF0000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"15\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SPECIAL SELECTOR\" styleID=\"16\" fgColor=\"FF80C0\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"sql\" desc=\"SQL\" ext=\"\">\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"7\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"000080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"tcl\" desc=\"TCL\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"804000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"8000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"000080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"008080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"008080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"008080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"008080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"tex\" desc=\"TeX\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"1\" fgColor=\"FF8000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"GROUP\" styleID=\"2\" fgColor=\"8000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"3\" fgColor=\"800000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"4\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"5\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"vb\" desc=\"VB / VBS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"7\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FF0000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"3\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"FF0000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATE\" styleID=\"8\" fgColor=\"00FF00\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"verilog\" desc=\"Verilog\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGNAME\" styleID=\"2\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"7\" fgColor=\"8000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"000080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"804000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE BANG\" styleID=\"3\" fgColor=\"008080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"12\" fgColor=\"808080\" bgColor=\"F2F4FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"USER\" styleID=\"19\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"vhdl\" desc=\"VHDL\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LIne\" styleID=\"2\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"FF8000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"5\" fgColor=\"000080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"6\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"7\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"8\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STD OPERATOR\" styleID=\"9\" fgColor=\"0080C0\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"10\" fgColor=\"8080FF\" bgColor=\"FFFFCC\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"9\" fgColor=\"808000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DIRECTIVE OPERAND\" styleID=\"10\" fgColor=\"000080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"STD FUNCTION\" styleID=\"11\" fgColor=\"0080FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"STD PACKAGE\" styleID=\"12\" fgColor=\"800000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"STD TYPE\" styleID=\"13\" fgColor=\"8000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"USER DEFINE\" styleID=\"14\" fgColor=\"B5E71F\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type5\" />\r\n        </LexerType>\r\n        <LexerType name=\"xml\" desc=\"XML\" ext=\"\">\r\n            <WordsStyle name=\"XMLSTART\" styleID=\"12\" fgColor=\"FF0000\" bgColor=\"FFFF00\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"XMLEND\" styleID=\"13\" fgColor=\"FF0000\" bgColor=\"FFFF00\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"FF0000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"6\" fgColor=\"8000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"7\" fgColor=\"8000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGEND\" styleID=\"11\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGUNKNOWN\" styleID=\"2\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"3\" fgColor=\"FF0000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTEUNKNOWN\" styleID=\"4\" fgColor=\"FF0000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SGMLDEFAULT\" styleID=\"21\" fgColor=\"000000\" bgColor=\"A6CAF0\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CDATA\" styleID=\"17\" fgColor=\"FF8000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"yaml\" desc=\"YAML\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"2\" fgColor=\"000080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"3\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8040\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REFERENCE\" styleID=\"5\" fgColor=\"804000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\">if else for while</WordsStyle>\r\n            <WordsStyle name=\"DOCUMENT\" styleID=\"6\" fgColor=\"0000FF\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\">bool long int char</WordsStyle>\r\n            <WordsStyle name=\"TEXT\" styleID=\"7\" fgColor=\"808080\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"8\" fgColor=\"FF0000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"searchResult\" desc=\"Search result\" ext=\"\">\r\n            <WordsStyle name=\"Default\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Search Header\" styleID=\"1\" fgColor=\"000080\" bgColor=\"BBBBFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"File Header\" styleID=\"2\" fgColor=\"008000\" bgColor=\"D5FFD5\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"Line Number\" styleID=\"3\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Hit Word\" styleID=\"4\" fgColor=\"FF0000\" bgColor=\"FFFFBF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Selected Line\" styleID=\"5\" fgColor=\"000080\" bgColor=\"FFFF4F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\">if else for while</WordsStyle>\r\n            <WordsStyle name=\"Current line background colour\" styleID=\"6\" bgColor=\"E8E8FF\" fgColor=\"0080FF\" fontSize=\"\" fontStyle=\"0\">bool long int char</WordsStyle>\r\n        </LexerType>\r\n    </LexerStyles>\r\n    <GlobalStyles>\r\n        <!-- Attention : Don't modify the name of styleID=\"0\" -->\r\n        <WidgetStyle name=\"Global override\" styleID=\"0\" fgColor=\"FFFF80\" bgColor=\"FFB0FF\" fontName=\"Courier New\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Default Style\" styleID=\"32\" fgColor=\"000000\" bgColor=\"FFB0FF\" fontName=\"Courier New\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Indent guideline style\" styleID=\"37\" fgColor=\"C0C0C0\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Brace highlight style\" styleID=\"34\" fgColor=\"FF0000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"12\" />\r\n        <WidgetStyle name=\"Bad brace colour\" styleID=\"35\" fgColor=\"800000\" bgColor=\"FFB0FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Current line background colour\" styleID=\"0\" bgColor=\"FF80C0\" fgColor=\"0080C0\" />\r\n        <WidgetStyle name=\"Selected text colour\" styleID=\"0\" bgColor=\"FFD5FF\" fgColor=\"CC0000\" />\r\n        <WidgetStyle name=\"Caret colour\" styleID=\"2069\" fgColor=\"FFFFFF\" bgColor=\"372017\" fontStyle=\"0\" />\r\n        <WidgetStyle name=\"Edge colour\" styleID=\"0\" fgColor=\"80FFFF\" bgColor=\"112435\" fontSize=\"\" fontStyle=\"0\" />\r\n        <WidgetStyle name=\"Line number margin\" styleID=\"33\" fgColor=\"FFFFFF\" bgColor=\"FF80FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Fold\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"FF80C0\" fontSize=\"8\" fontStyle=\"0\" />\r\n        <WidgetStyle name=\"Fold margin\" styleID=\"0\" fgColor=\"FF80C0\" bgColor=\"FF80C0\" fontSize=\"8\" fontStyle=\"0\" />\r\n        <WidgetStyle name=\"White space symbol\" styleID=\"0\" fgColor=\"FFB56A\" bgColor=\"EEEEEC\" />\r\n        <WidgetStyle name=\"Smart HighLighting\" styleID=\"29\" bgColor=\"00FF00\" fgColor=\"555753\" />\r\n        <WidgetStyle name=\"Find Mark Style\" styleID=\"31\" bgColor=\"FF0000\" fgColor=\"FCAF3E\" />\r\n        <WidgetStyle name=\"Mark Style 1\" styleID=\"25\" bgColor=\"00FFFF\" />\r\n        <WidgetStyle name=\"Mark Style 2\" styleID=\"24\" bgColor=\"FF8000\" />\r\n        <WidgetStyle name=\"Mark Style 3\" styleID=\"23\" bgColor=\"FFFF00\" />\r\n        <WidgetStyle name=\"Mark Style 4\" styleID=\"22\" bgColor=\"8000FF\" />\r\n        <WidgetStyle name=\"Mark Style 5\" styleID=\"21\" bgColor=\"008000\" fgColor=\"FAAA3C\" />\r\n        <WidgetStyle name=\"Incremental highlight all\" styleID=\"28\" bgColor=\"0080FF\" fgColor=\"FFCAB0\" />\r\n        <WidgetStyle name=\"Tags match highlighting\" styleID=\"27\" bgColor=\"8000FF\" fgColor=\"000000\" />\r\n        <WidgetStyle name=\"Tags attribute\" styleID=\"26\" bgColor=\"FFFF00\" fgColor=\"8080C0\" />\r\n        <WidgetStyle name=\"Active tab focused indicator\" styleID=\"0\" fgColor=\"FAAA3C\" bgColor=\"FF0000\" />\r\n        <WidgetStyle name=\"Active tab unfocused indicator\" styleID=\"0\" fgColor=\"FFCAB0\" bgColor=\"80FF00\" />\r\n        <WidgetStyle name=\"Active tab text\" styleID=\"0\" fgColor=\"000000\" />\r\n        <WidgetStyle name=\"Inactive tabs\" styleID=\"0\" fgColor=\"808080\" bgColor=\"C0C0C0\" />\r\n    </GlobalStyles>\r\n</NotepadPlus>\r\n"
  },
  {
    "path": "gui/themes/HotFudgeSundae.xml",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\" ?>\r\n<!--//\r\nFile Name:           HotFudgeSundae.xml\r\nStyle Name:          HotFudgeSundae\r\nDescription:         HotFudgeSundae theme for Notepad++.\r\n                     Hues from photographs of hot fudge sundaes.\r\n                     Hot fudge, some ice cream peeking out, drizzled with\r\n                     caramel, nuts, and sprinkles with a cherry on top. \r\nSupported languages: All the languages supported by release 5.9.8\r\nCreated by:          Paul Neubauer (PaulRNeubauer at gmail dot com)\r\nLast Modified:       7:05 AM 5/29/2012\r\nReleased:            4/17/2012\r\nLicense:             Feel free to modify this theme. \r\n                     This theme is available under the terms of the Creative Commons\r\n                     Attribution 3.0 Unported License. You are free to to copy,\r\n                     distribute and transmit the work, to adapt the work, or to make\r\n                     commercial use of the work under the condition that you must\r\n                     attribute the work in the manner specified by the author or\r\n                     licensor (but not in any way that suggests that they endorse you\r\n                     or your use of the work). See\r\n                     http://creativecommons.org/licenses/by/3.0/ \r\n                     for a legal description of the license terms. Briefly, this\r\n                     means: please note in derivatives of this theme, that they are\r\n                     based on my work. Of course, if you are using this file as no\r\n                     more than a framework for an entirely different color scheme, you\r\n                     may, and should, omit such attribution.\r\n\r\nInstallation:\r\n    Copy this file to C:\\Program Files (x86)\\Notepad++\\themes  OR\r\n    For WindowsXP:\r\n    Copy this file to C:\\Documents and Settings\\%%USERNAME%%\\Application Data\\Notepad++\\themes\r\n    For Windows Vista or 7:\r\n    Copy this file to C:\\Users\\%%USERNAME%%\\AppData\\Roaming\\Notepad++\\themes\r\n\r\n//-->\r\n<NotepadPlus>\r\n    <LexerStyles>\r\n        <LexerType name=\"actionscript\" desc=\"ActionScript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"20\" fgColor=\"d92b10\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"C11418\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"AFA7D6\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"ff00ff\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"ada\" desc=\"ADA\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"1\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"2\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"AFA7D6\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DELIMITER\" styleID=\"4\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"5\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER EOL\" styleID=\"6\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"7\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"8\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"9\" fgColor=\"d92b10\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"10\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"ILLEGAL\" styleID=\"11\" fgColor=\"ff00ff\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"asm\" desc=\"Assembly\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"AFA7D6\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"4\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"5\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CPU INSTRUCTION\" styleID=\"6\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"MATH INSTRUCTION\" styleID=\"7\" fgColor=\"7578DB\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"REGISTER\" styleID=\"8\" fgColor=\"d92b10\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"9\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"DIRECTIVE OPERAND\" styleID=\"10\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"COMMENT BLOCK\" styleID=\"11\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"12\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"EXT INSTRUCTION\" styleID=\"14\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\" />\r\n        </LexerType>\r\n        <LexerType name=\"asp\" desc=\"asp\" ext=\"asp\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"81\" fgColor=\"B7975D\" bgColor=\"352319\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"82\" fgColor=\"255C08\" bgColor=\"352319\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"83\" fgColor=\"AFA7D6\" bgColor=\"352319\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"84\" fgColor=\"42A658\" bgColor=\"352319\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"85\" fgColor=\"BCBB80\" bgColor=\"352319\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"86\" fgColor=\"cfba28\" bgColor=\"352319\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASPSYBOL\" styleID=\"15\" fgColor=\"C11418\" bgColor=\"9A7E13\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SCRIPTTYPE\" styleID=\"16\" fgColor=\"d92b10\" bgColor=\"352319\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"autoit\" desc=\"autoIt\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"1\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"2\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"AFA7D6\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"4\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"6\" fgColor=\"d92b10\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"7\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"8\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"9\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SENT\" styleID=\"10\" fgColor=\"d92b10\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"11\" fgColor=\"C11418\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"12\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"EXPAND\" styleID=\"13\" fgColor=\"C11418\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type5\" />\r\n            <WordsStyle name=\"COMOBJ\" styleID=\"14\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"bash\" desc=\"bash\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"ff00ff\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"4\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"AFA7D6\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"5\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"6\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"8\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SCALAR\" styleID=\"9\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"PARAM\" styleID=\"10\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"11\" fgColor=\"98AE66\" bgColor=\"602F1A\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE DELIM\" styleID=\"12\" fgColor=\"C11418\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE Q\" styleID=\"13\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"batch\" desc=\"Batch\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORDS\" styleID=\"2\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"3\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HIDE SYBOL\" styleID=\"4\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"5\" fgColor=\"d92b10\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"6\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"c\" desc=\"C\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"C11418\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPEWORD\" styleID=\"16\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"AFA7D6\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"ff00ff\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"caml\" desc=\"Caml\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGNAME\" styleID=\"2\" fgColor=\"d92b10\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"3\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"BUILIN FUNC &amp; TYPE\" styleID=\"4\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"TYPE\" styleID=\"5\" fgColor=\"7578DB\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"LINENUM\" styleID=\"6\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"8\" fgColor=\"AFA7D6\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"9\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"11\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"13\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"14\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cmake\" desc=\"CMakeFile\" ext=\"cmake\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING D\" styleID=\"2\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING L\" styleID=\"3\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING R\" styleID=\"4\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"5\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"PARAMETER\" styleID=\"6\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"7\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"USER DEFINED\" styleID=\"8\" fgColor=\"7578DB\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"WHILEDEF\" styleID=\"9\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FOREACHDEF\" styleID=\"10\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IFDEF\" styleID=\"11\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MACRODEF\" styleID=\"12\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING VARIABLE\" styleID=\"13\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"14\" fgColor=\"AFA7D6\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cobol\" desc=\"COBOL\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"C11418\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DECLARATION\" styleID=\"5\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"16\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"8\" fgColor=\"7578DB\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"AFA7D6\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"ff00ff\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cpp\" desc=\"C++\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"C11418\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"AFA7D6\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"ff00ff\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cs\" desc=\"C#\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"C11418\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"AFA7D6\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"ff00ff\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"css\" desc=\"CSS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS\" styleID=\"2\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PSEUDOCLASS\" styleID=\"3\" fgColor=\"d92b10\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"UNKNOWN_PSEUDOCLASS\" styleID=\"4\" fgColor=\"C11418\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"5\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"6\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"UNKNOWN_IDENTIFIER\" styleID=\"7\" fgColor=\"ff00ff\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VALUE\" styleID=\"8\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"ID\" styleID=\"10\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IMPORTANT\" styleID=\"11\" fgColor=\"C11418\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"12\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"13\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"14\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"d\" desc=\"D\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"14\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"6\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"KEYWORD1\" styleID=\"7\" fgColor=\"7578DB\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\"/>\r\n            <WordsStyle name=\"KEYWORD2\" styleID=\"8\" fgColor=\"7578DB\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\"/>\r\n            <WordsStyle name=\"KEYWORD3\" styleID=\"9\" fgColor=\"7578DB\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\"/>\r\n            <WordsStyle name=\"KEYWORD4\" styleID=\"20\" fgColor=\"7578DB\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\"/>\r\n            <WordsStyle name=\"KEYWORD5\" styleID=\"21\" fgColor=\"7578DB\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\"/>\r\n            <WordsStyle name=\"KEYWORD6\" styleID=\"22\" fgColor=\"7578DB\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type5\"/>\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"AFA7D6\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"10\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"12\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"13\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT NESTED\" styleID=\"4\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"16\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"17\" fgColor=\"ff00ff\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n         </LexerType>\r\n        <LexerType name=\"diff\" desc=\"DIFF\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"2\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HEADER\" styleID=\"3\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"POSITION\" styleID=\"4\" fgColor=\"d92b10\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DELETED\" styleID=\"5\" fgColor=\"7578DB\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"ADDED\" styleID=\"6\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"fortran\" desc=\"Fortran\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"AFA7D6\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"4\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"5\" fgColor=\"C11418\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"8\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION1\" styleID=\"9\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"FUNCTION2\" styleID=\"10\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"11\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR2\" styleID=\"12\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"13\" fgColor=\"d92b10\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CONTINUATION\" styleID=\"14\" fgColor=\"ff00ff\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"gui4cli\" desc=\"GUI4CLI\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"1\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"2\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"5\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"EVENT\" styleID=\"5\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"16\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"CONTROL\" styleID=\"16\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"16\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"haskell\" desc=\"Haskell\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"2\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"AFA7D6\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"5\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS\" styleID=\"6\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MODULE\" styleID=\"7\" fgColor=\"d92b10\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CAPITAL\" styleID=\"8\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATA\" styleID=\"9\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IMPORT\" styleID=\"10\" fgColor=\"C11418\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"11\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTANCE\" styleID=\"12\" fgColor=\"7578DB\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"13\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK\" styleID=\"14\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK2\" styleID=\"15\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK3\" styleID=\"16\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"html\" desc=\"HTML\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"ff00ff\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"6\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"7\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGEND\" styleID=\"11\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGUNKNOWN\" styleID=\"2\" fgColor=\"ff00ff\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"3\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTEUNKNOWN\" styleID=\"4\" fgColor=\"ff00ff\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SGMLDEFAULT\" styleID=\"21\" fgColor=\"BE211A\" bgColor=\"77610F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CDATA\" styleID=\"17\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VALUE\" styleID=\"19\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ENTITY\" styleID=\"10\" fgColor=\"7578DB\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"ini\" desc=\"ini file\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"2\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASSIGNMENT\" styleID=\"3\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFVAL\" styleID=\"4\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"inno\" desc=\"InnoSetup\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"2\" fgColor=\"d92b10\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"PARAMETER\" styleID=\"3\" fgColor=\"7578DB\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"4\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR INLINE\" styleID=\"6\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT PASCAL\" styleID=\"7\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD PASCAL\" styleID=\"8\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"KEYWORD USER\" styleID=\"9\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"STRING DOUBLE\" styleID=\"10\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING SINGLE\" styleID=\"11\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"12\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"java\" desc=\"Java\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"C11418\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"AFA7D6\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"ff00ff\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"javascript\" desc=\"Javascript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"41\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"45\" fgColor=\"AFA7D6\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"46\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"47\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"48\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"49\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOLS\" styleID=\"50\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"51\" fgColor=\"C11418\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"52\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"42\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"43\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTDOC\" styleID=\"44\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"3\" fontSize=\"\">param @projectDescription projectDescription @param</WordsStyle>\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"ff00ff\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"kix\" desc=\"KiXtart\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"31\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"2\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"3\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"AFA7D6\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VAR\" styleID=\"5\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"6\" fgColor=\"d92b10\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"7\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"8\" fgColor=\"7578DB\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"9\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"lisp\" desc=\"LISP\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"AFA7D6\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION WORD\" styleID=\"3\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION WORD2\" styleID=\"4\" fgColor=\"7578DB\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"5\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"8\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"9\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"11\" fgColor=\"d92b10\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"lua\" desc=\"Lua\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"LITERALSTRING\" styleID=\"8\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"C11418\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"AFA7D6\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNC1\" styleID=\"13\" fgColor=\"d92b10\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"FUNC2\" styleID=\"14\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"FUNC3\" styleID=\"15\" fgColor=\"7578DB\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n        </LexerType>\r\n        <LexerType name=\"makefile\" desc=\"Makefile\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"2\" fgColor=\"d92b10\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"3\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"4\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TARGET\" styleID=\"5\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDEOL\" styleID=\"9\" fgColor=\"d92b10\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"matlab\" desc=\"Matlab\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"2\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"AFA7D6\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"4\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"5\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLE QUOTE STRING\" styleID=\"8\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"nfo\" desc=\"Dos Style\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"32\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontSize=\"\" fontStyle=\"0\" />\r\n        </LexerType>\r\n        <LexerType name=\"nsis\" desc=\"NSIS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING DOUBLE QUOTE\" styleID=\"2\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING LEFT QUOTE\" styleID=\"3\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING RIGHT QUOTE\" styleID=\"4\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"5\" fgColor=\"d92b10\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"6\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"7\" fgColor=\"7578DB\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"USER DEFINED\" styleID=\"8\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"9\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SUBSECTION\" styleID=\"10\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IF DEFINE\" styleID=\"11\" fgColor=\"C11418\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"12\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING VAR\" styleID=\"13\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"14\" fgColor=\"AFA7D6\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SECTION GROUP\" styleID=\"15\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAGE EX\" styleID=\"16\" fgColor=\"C11418\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION DEFINITIONS\" styleID=\"17\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"18\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"objc\" desc=\"Objective-C\" ext=\"\">\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"19\" fgColor=\"d92b10\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"QUALIFIER\" styleID=\"20\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"C11418\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"AFA7D6\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"ff00ff\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"pascal\" desc=\"Pascal\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"2\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"3\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"4\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"C11418\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR2\" styleID=\"6\" fgColor=\"C11418\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"7\" fgColor=\"AFA7D6\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HEX NUMBER\" styleID=\"8\" fgColor=\"AFA7D6\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"9\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"10\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"12\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"13\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASM\" styleID=\"14\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"perl\" desc=\"Perl\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"C11418\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"AFA7D6\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"17\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGSUBST\" styleID=\"18\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SCALAR\" styleID=\"12\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ARRAY\" styleID=\"13\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HASH\" styleID=\"14\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL TABLE\" styleID=\"15\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PUNCTUATION\" styleID=\"8\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"POD\" styleID=\"3\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"POD VERB\" styleID=\"31\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"ff00ff\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"LONGQUOTE\" styleID=\"19\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATASECTION\" styleID=\"21\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"20\" fgColor=\"98AE66\" bgColor=\"602F1A\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE DELIM\" styleID=\"22\" fgColor=\"BE211A\" bgColor=\"77610F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE Q\" styleID=\"23\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE QQ\" styleID=\"24\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE QX\" styleID=\"25\" fgColor=\"98AE66\" bgColor=\"602F1A\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING Q\" styleID=\"26\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING QQ\" styleID=\"27\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING QX\" styleID=\"28\" fgColor=\"98AE66\" bgColor=\"602F1A\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING QR\" styleID=\"29\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING QW\" styleID=\"30\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FORMAT IDENT\" styleID=\"41\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FORMAT\" styleID=\"42\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"php\" desc=\"php\" ext=\"\">\r\n            <WordsStyle name=\"QUESTION MARK\" styleID=\"18\" fgColor=\"C11418\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"118\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"119\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING VARIABLE\" styleID=\"126\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SIMPLESTRING\" styleID=\"120\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"121\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"122\" fgColor=\"AFA7D6\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"123\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"124\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"125\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"127\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"postscript\" desc=\"Postscript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"DSC COMMENT\" styleID=\"2\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"DSC VALUE\" styleID=\"3\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"AFA7D6\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Name\" styleID=\"5\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"6\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"LITERAL\" styleID=\"7\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IMMEVAL\" styleID=\"8\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAREN ARRAY\" styleID=\"9\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAREN DICT\" styleID=\"10\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAREN PROC\" styleID=\"11\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"12\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HEX STRING\" styleID=\"13\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BASE85 STRING\" styleID=\"14\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BAD STRING CHAR\" styleID=\"15\" fgColor=\"ff00ff\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"powershell\" desc=\"PowerShell\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"2\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"3\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"AFA7D6\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"5\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"8\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"CMDLET\" styleID=\"9\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"ALIAS\" styleID=\"10\" fgColor=\"d92b10\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n        </LexerType>\r\n        <LexerType name=\"props\" desc=\"Properties file\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"2\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASSIGNMENT\" styleID=\"3\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFVAL\" styleID=\"4\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"python\" desc=\"Python\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"AFA7D6\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"4\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORDS\" styleID=\"5\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TRIPLE\" styleID=\"6\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TRIPLEDOUBLE\" styleID=\"7\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASSNAME\" styleID=\"8\" fgColor=\"d92b10\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFNAME\" styleID=\"9\" fgColor=\"d92b10\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK\" styleID=\"12\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"12\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"r\" desc=\"R\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"2\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"BASE WORD\" styleID=\"3\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"4\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"AFA7D6\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"7\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"8\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INFIX\" styleID=\"10\" fgColor=\"d92b10\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"rc\" desc=\"RC\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"C11418\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"d92b10\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"AFA7D6\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"ff00ff\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"ruby\" desc=\"Ruby\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"C11418\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"2\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"POD\" styleID=\"3\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"AFA7D6\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"5\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS NAME\" styleID=\"8\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEF NAME\" styleID=\"9\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"12\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"13\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"14\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MODULE NAME\" styleID=\"15\" fgColor=\"d92b10\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTANCE VAR\" styleID=\"16\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS VAR\" styleID=\"17\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"18\" fgColor=\"98AE66\" bgColor=\"602F1A\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATA SECTION\" styleID=\"19\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING Q\" styleID=\"24\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BOOLEAN\" styleID=\"25\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n        </LexerType>\r\n        <LexerType name=\"scheme\" desc=\"Scheme\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"AFA7D6\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION WORD\" styleID=\"3\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION WORD2\" styleID=\"4\" fgColor=\"7578DB\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"5\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"9\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"11\" fgColor=\"d92b10\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"searchResult\" desc=\"Search result\" ext=\"\">\r\n            <WordsStyle name=\"Default\" styleID=\"0\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Search Header\" styleID=\"1\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"File Header\" styleID=\"2\" fgColor=\"d92b10\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Line Number\" styleID=\"3\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Hit Word\" styleID=\"4\" fgColor=\"cfba28\" bgColor=\"7578DB\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Selected Line\" styleID=\"5\" fgColor=\"B7975D\" bgColor=\"faf1c6\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Current line background colour\" styleID=\"6\" bgColor=\"432c13\" />\r\n        </LexerType>\r\n        <LexerType name=\"smalltalk\" desc=\"Smalltalk\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"1\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"AFA7D6\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"3\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"4\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BINARY\" styleID=\"5\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BOOL\" styleID=\"6\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SELF\" styleID=\"7\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SUPER\" styleID=\"8\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NIL\" styleID=\"9\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"10\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"RETURN\" styleID=\"11\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"12\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KWS END\" styleID=\"13\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASSIGN\" styleID=\"14\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"15\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SPECIAL SELECTOR\" styleID=\"16\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"sql\" desc=\"SQL\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"AFA7D6\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"5\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"7\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"tcl\" desc=\"TCL\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MODIFIER\" styleID=\"10\" fgColor=\"d92b10\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"EXPAND\" styleID=\"11\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"12\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"13\" fgColor=\"7578DB\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"AFA7D6\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SUB BRACE\" styleID=\"9\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SUBSTITUTION\" styleID=\"8\" fgColor=\"7578DB\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD IN QUOTE\" styleID=\"4\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IN QUOTE\" styleID=\"5\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT BOX\" styleID=\"17\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"BLOCK COMMENT\" styleID=\"18\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"tex\" desc=\"TeX\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"1\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"GROUP\" styleID=\"2\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"3\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"4\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"5\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"vb\" desc=\"VB / VBS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"7\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"AFA7D6\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"3\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"C11418\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATE\" styleID=\"8\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"verilog\" desc=\"Verilog\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGNAME\" styleID=\"2\" fgColor=\"d92b10\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"7\" fgColor=\"7578DB\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"AFA7D6\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"C11418\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE BANG\" styleID=\"3\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"12\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"USER\" styleID=\"19\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"vhdl\" desc=\"VHDL\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LIne\" styleID=\"2\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"AFA7D6\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"5\" fgColor=\"D6C479\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"6\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"7\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"8\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STD OPERATOR\" styleID=\"9\" fgColor=\"d92b10\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"10\" fgColor=\"7578DB\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"9\" fgColor=\"C11418\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DIRECTIVE OPERAND\" styleID=\"10\" fgColor=\"C11418\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STD FUNCTION\" styleID=\"11\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"STD PACKAGE\" styleID=\"12\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"STD TYPE\" styleID=\"13\" fgColor=\"d92b10\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"USER DEFINE\" styleID=\"14\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type5\" />\r\n        </LexerType>\r\n        <LexerType name=\"xml\" desc=\"XML\" ext=\"\">\r\n            <WordsStyle name=\"XMLSTART\" styleID=\"12\" fgColor=\"C11418\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"XMLEND\" styleID=\"13\" fgColor=\"C11418\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"ff00ff\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"6\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"7\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGEND\" styleID=\"11\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGUNKNOWN\" styleID=\"2\" fgColor=\"ff00ff\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"3\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTEUNKNOWN\" styleID=\"4\" fgColor=\"ff00ff\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SGMLDEFAULT\" styleID=\"21\" fgColor=\"BE211A\" bgColor=\"77610F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CDATA\" styleID=\"17\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"yaml\" desc=\"YAML\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"2\" fgColor=\"cfba28\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"255C08\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"3\" fgColor=\"42A658\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"AFA7D6\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REFERENCE\" styleID=\"5\" fgColor=\"0088CE\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOCUMENT\" styleID=\"6\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"7\" fgColor=\"BCBB80\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"8\" fgColor=\"ff00ff\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n    </LexerStyles>\r\n    <GlobalStyles>\r\n        <!-- Attention : Don't modify the name of styleID=\"0\" -->\r\n        <WidgetStyle name=\"Global override\" styleID=\"0\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"Consolas\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Default Style\" styleID=\"32\" fgColor=\"B7975D\" bgColor=\"2b0f01\" fontName=\"Consolas\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Indent guideline style\" styleID=\"37\" fgColor=\"8B642B\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Brace highlight style\" styleID=\"34\" fgColor=\"2b0f01\" bgColor=\"EC6221\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Bad brace colour\" styleID=\"35\" fgColor=\"ff00ff\" bgColor=\"2b0f01\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Current line background colour\" styleID=\"0\" bgColor=\"432c13\" />\r\n        <WidgetStyle name=\"Selected text colour\" styleID=\"0\" bgColor=\"666666\" />\r\n        <WidgetStyle name=\"Caret colour\" styleID=\"2069\" fgColor=\"faf1c6\" />\r\n        <WidgetStyle name=\"Edge colour\" styleID=\"0\" fgColor=\"8B642B\" />\r\n        <WidgetStyle name=\"Line number margin\" styleID=\"33\" fgColor=\"8B642B\" bgColor=\"43250b\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Fold\" styleID=\"0\" fgColor=\"8B642B\" bgColor=\"43250b\" />\r\n        <WidgetStyle name=\"Fold active\" styleID=\"0\" fgColor=\"cfba28\" />\r\n        <WidgetStyle name=\"Fold margin\" styleID=\"0\" fgColor=\"8B642B\" bgColor=\"43250b\" />\r\n        <WidgetStyle name=\"White space symbol\" styleID=\"0\" fgColor=\"cfba28\" />\r\n        <WidgetStyle name=\"Smart HighLighting\" styleID=\"29\" bgColor=\"008947\" />\r\n        <WidgetStyle name=\"Find Mark Style\" styleID=\"31\" bgColor=\"7578DB\" />\r\n        <WidgetStyle name=\"Mark Style 1\" styleID=\"25\" bgColor=\"C11418\" />\r\n        <WidgetStyle name=\"Mark Style 2\" styleID=\"24\" bgColor=\"0088CE\" />\r\n        <WidgetStyle name=\"Mark Style 3\" styleID=\"23\" bgColor=\"BCBB80\" />\r\n        <WidgetStyle name=\"Mark Style 4\" styleID=\"22\" bgColor=\"42A658\" />\r\n        <WidgetStyle name=\"Mark Style 5\" styleID=\"21\" bgColor=\"cfba28\" />\r\n        <WidgetStyle name=\"Incremental highlight all\" styleID=\"28\" bgColor=\"2b0f01\" />\r\n        <WidgetStyle name=\"Tags match highlighting\" styleID=\"27\" bgColor=\"990000\" />\r\n        <WidgetStyle name=\"Tags attribute\" styleID=\"26\" bgColor=\"3D0B0C\" />\r\n        <WidgetStyle name=\"Active tab focused indicator\" styleID=\"0\" fgColor=\"d92b10\" />\r\n        <WidgetStyle name=\"Active tab unfocused indicator\" styleID=\"0\" fgColor=\"2b0f01\" />\r\n        <WidgetStyle name=\"Active tab text\" styleID=\"0\" fgColor=\"000000\" />\r\n        <WidgetStyle name=\"Inactive tabs\" styleID=\"0\" fgColor=\"43250b\" bgColor=\"D5BC93\" />\r\n    </GlobalStyles>\r\n</NotepadPlus>"
  },
  {
    "path": "gui/themes/Mono_Industrial.xml",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\" ?>\r\n<!--//\r\n\r\nmonoindustrial\r\nCopyright (c) 2008 Fabio Zendhi Nagao <http://zend.lojcomm.com.br/>\r\n\r\nPermission is hereby granted, free of charge, to any person\r\nobtaining a copy of this software and associated documentation\r\nfiles (the \"Software\"), to deal in the Software without\r\nrestriction, including without limitation the rights to use,\r\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\r\ncopies of the Software, and to permit persons to whom the\r\nSoftware is furnished to do so, subject to the following\r\nconditions:\r\n\r\nThe above copyright notice and this permission notice shall be\r\nincluded in all copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\r\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\r\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\r\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\r\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\r\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\r\nOTHER DEALINGS IN THE SOFTWARE.\r\n\r\nRequirements:\r\n    * This style is based on DejaVu fonts <http://dejavu.sourceforge.net/wiki/index.php/Main_Page>.\r\n    * Notepad++, of course.\r\n\r\nInstallation:\r\n    Copy this file to C:\\Documents and Settings\\%%USERNAME%%\\Application Data\\Notepad++\\\r\n\r\nAbout:\r\n    This styler has been built by Textmate theme to Notepad++ styler <http://framework.lojcomm.com.br/tmTheme2nppStyler/>\r\n\r\nCredits:\r\n    Thanks for the original Textmate theme author.\r\n    Thanks for Fabio Zendhi Nagao for the tmTheme2nppStyler.\r\n    Thanks for the user for the tmTheme source.\r\n\r\n//-->\r\n<NotepadPlus>\r\n    <LexerStyles>\r\n        <LexerType name=\"c\" desc=\"C\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"A39E64\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"C23B00\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPEWORD\" styleID=\"16\" fgColor=\"A39E64\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"A8B3AB\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"cpp\" desc=\"C++\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"A39E64\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"C23B00\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"A39E64\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"A8B3AB\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"java\" desc=\"Java\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"A39E64\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"C23B00\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"A39E64\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"A8B3AB\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"cs\" desc=\"C#\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"A39E64\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"C23B00\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"A39E64\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"A8B3AB\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"rc\" desc=\"RC\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"A39E64\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"C23B00\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"A39E64\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"A8B3AB\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"tcl\" desc=\"TCL\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"A39E64\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"C23B00\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"A39E64\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"A8B3AB\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"objc\" desc=\"Objective-C\" ext=\"\">\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"19\" fgColor=\"A39E64\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"QUALIFIER\" styleID=\"20\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"A39E64\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"C23B00\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"A39E64\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"A8B3AB\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"sql\" desc=\"SQL\" ext=\"\">\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"5\" fgColor=\"A8B3AB\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"A8B3AB\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"html\" desc=\"HTML\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"A65EFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAGEND\" styleID=\"11\" fgColor=\"A65EFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAGUNKNOWN\" styleID=\"2\" fgColor=\"A65EFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"3\" fgColor=\"909993\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ATTRIBUTEUNKNOWN\" styleID=\"4\" fgColor=\"909993\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SGMLDEFAULT\" styleID=\"21\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CDATA\" styleID=\"17\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VALUE\" styleID=\"19\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ENTITY\" styleID=\"10\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"php\" desc=\"php\" ext=\"\">\r\n            <WordsStyle name=\"QUESTION MARK\" styleID=\"18\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"118\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"119\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING VARIABLE\" styleID=\"126\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SIMPLESTRING\" styleID=\"120\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"121\" fgColor=\"A39E64\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"122\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"123\" fgColor=\"648BD2\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"124\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"125\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"127\" fgColor=\"A8B3AB\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"javascript\" desc=\"Javascript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"41\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"45\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"46\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"47\" fgColor=\"A8B3AB\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"48\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"49\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SYMBOLS\" styleID=\"50\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"51\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"52\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"42\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"43\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTDOC\" styleID=\"44\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"asp\" desc=\"asp\" ext=\"asp\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"81\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"82\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"83\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"84\" fgColor=\"A39E64\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"85\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"87\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"86\" fgColor=\"C87500\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ASPSYBOL\" styleID=\"15\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SCRIPTTYPE\" styleID=\"16\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"xml\" desc=\"XML\" ext=\"\">\r\n            <WordsStyle name=\"XMLSTART\" styleID=\"12\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"XMLEND\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"A65EFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAGEND\" styleID=\"11\" fgColor=\"A65EFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAGUNKNOWN\" styleID=\"2\" fgColor=\"A65EFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"3\" fgColor=\"909993\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ATTRIBUTEUNKNOWN\" styleID=\"4\" fgColor=\"909993\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SGMLDEFAULT\" styleID=\"21\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CDATA\" styleID=\"17\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"ini\" desc=\"ini file\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"2\" fgColor=\"909993\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ASSIGNMENT\" styleID=\"3\" fgColor=\"A8B3AB\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFVAL\" styleID=\"4\" fgColor=\"A8B3AB\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"props\" desc=\"Properties file\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ASSIGNMENT\" styleID=\"3\" fgColor=\"A8B3AB\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFVAL\" styleID=\"4\" fgColor=\"A8B3AB\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"diff\" desc=\"DIFF\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"2\" fgColor=\"C87500\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"HEADER\" styleID=\"3\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"POSITION\" styleID=\"4\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DELETED\" styleID=\"5\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ADDED\" styleID=\"6\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"nfo\" desc=\"Dos Style\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"32\" fgColor=\"FFFFFF\" bgColor=\"222C28\" />\r\n        </LexerType>\r\n        <LexerType name=\"makefile\" desc=\"Makefile\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"2\" fgColor=\"A39E64\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"3\" fgColor=\"C87500\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"4\" fgColor=\"A8B3AB\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TARGET\" styleID=\"5\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDEOL\" styleID=\"9\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"vb\" desc=\"VB / VBS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"3\" fgColor=\"A39E64\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"A39E64\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"A8B3AB\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DATE\" styleID=\"8\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"css\" desc=\"CSS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"A65EFF\" bgColor=\"222C28\" fontName=\"Batang\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CLASS\" styleID=\"2\" fgColor=\"909993\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PSEUDOCLASS\" styleID=\"3\" fgColor=\"909993\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"UNKNOWN_PSEUDOCLASS\" styleID=\"4\" fgColor=\"909993\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"5\" fgColor=\"A8B3AB\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"6\" fgColor=\"C87500\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"UNKNOWN_IDENTIFIER\" styleID=\"7\" fgColor=\"C87500\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VALUE\" styleID=\"8\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ID\" styleID=\"10\" fgColor=\"909993\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IMPORTANT\" styleID=\"11\" fgColor=\"A39E64\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"12\" fgColor=\"A39E64\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"pascal\" desc=\"Pascal\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"A39E64\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"C87500\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"C23B00\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"A8B3AB\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"perl\" desc=\"Perl\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"A39E64\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"C23B00\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"A8B3AB\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"17\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SCALAR\" styleID=\"12\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ARRAY\" styleID=\"13\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"HASH\" styleID=\"14\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SYMBOL TABLE\" styleID=\"15\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PUNCTUATION\" styleID=\"8\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"POD\" styleID=\"3\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"LONGQUOTE\" styleID=\"19\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DATASECTION\" styleID=\"21\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGSUBST\" styleID=\"18\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"20\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"python\" desc=\"Python\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KEYWORDS\" styleID=\"5\" fgColor=\"A8B3AB\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TRIPLE\" styleID=\"6\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TRIPLEDOUBLE\" styleID=\"7\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CLASSNAME\" styleID=\"8\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFNAME\" styleID=\"9\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"A8B3AB\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"C87500\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTBLOCK\" styleID=\"12\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"12\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"batch\" desc=\"Batch\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KEYWORDS\" styleID=\"2\" fgColor=\"A8B3AB\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"3\" fgColor=\"909993\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"HIDE SYBOL\" styleID=\"4\" fgColor=\"A8B3AB\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"5\" fgColor=\"C87500\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"6\" fgColor=\"648BD2\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"A8B3AB\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"lua\" desc=\"Lua\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"LITERALSTRING\" styleID=\"8\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"A39E64\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"C23B00\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"A8B3AB\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"FUNC1\" styleID=\"13\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"FUNC2\" styleID=\"14\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"FUNC3\" styleID=\"15\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n        </LexerType>\r\n        <LexerType name=\"tex\" desc=\"TeX\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"1\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"GROUP\" styleID=\"2\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"3\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"4\" fgColor=\"C87500\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"nsis\" desc=\"NSIS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING DOUBLE QUOTE\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING LEFT QUOTE\" styleID=\"3\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING RIGHT QUOTE\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"5\" fgColor=\"588E60\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"6\" fgColor=\"648BD2\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"7\" fgColor=\"909993\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"USER DEFINED\" styleID=\"8\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"9\" fgColor=\"909993\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SUBSECTION\" styleID=\"10\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IF DEFINE\" styleID=\"11\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"12\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING VAR\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"14\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SECTION GROUP\" styleID=\"15\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PAGE EX\" styleID=\"16\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"FUNCTION DEFINITIONS\" styleID=\"17\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"18\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"actionscript\" desc=\"ActionScript\" ext=\"\">\r\n            <!--\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"19\" fgColor=\"A39E64\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            -->\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"20\" fgColor=\"588E60\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"A39E64\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"C23B00\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"A39E64\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"A8B3AB\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"bash\" desc=\"bash\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"4\" fgColor=\"C23B00\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"A8B3AB\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"8\" fgColor=\"C87500\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SCALAR\" styleID=\"9\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PARAM\" styleID=\"10\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"11\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"HERE DELIM\" styleID=\"12\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"HERE Q\" styleID=\"13\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"fortran\" desc=\"Fortran\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"A8B3AB\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"C87500\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"8\" fgColor=\"C23B00\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION1\" styleID=\"9\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"FUNCTION2\" styleID=\"10\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"11\" fgColor=\"A39E64\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR2\" styleID=\"12\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"13\" fgColor=\"909993\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CONTINUATION\" styleID=\"14\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"lisp\" desc=\"LISP\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"FUNCTION WORD\" styleID=\"3\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"8\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"9\" fgColor=\"C87500\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"A8B3AB\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"11\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"asm\" desc=\"Assembler\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"4\" fgColor=\"A8B3AB\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"5\" fgColor=\"C87500\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CPU INSTRUCTION\" styleID=\"6\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"MATH INSTRUCTION\" styleID=\"7\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"REGISTER\" styleID=\"8\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"9\" fgColor=\"A39E64\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"DIRECTIVE OPERAND\" styleID=\"10\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"COMMENT BLOCK\" styleID=\"11\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"12\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"EXT INSTRUCTION\" styleID=\"14\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type4\" />\r\n        </LexerType>\r\n        <LexerType name=\"ruby\" desc=\"Ruby\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"2\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"POD\" styleID=\"3\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"5\" fgColor=\"A39E64\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CLASS NAME\" styleID=\"8\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEF NAME\" styleID=\"9\" fgColor=\"A8B3AB\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"A8B3AB\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"C87500\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"12\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"13\" fgColor=\"648BD2\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"MODULE NAME\" styleID=\"15\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTANCE VAR\" styleID=\"16\" fgColor=\"648BD2\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CLASS VAR\" styleID=\"17\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"18\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DATA SECTION\" styleID=\"19\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING Q\" styleID=\"24\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"postscript\" desc=\"Postscript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DSC COMMENT\" styleID=\"2\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DSC VALUE\" styleID=\"3\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"Name\" styleID=\"5\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"6\" fgColor=\"A39E64\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"LITERAL\" styleID=\"7\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IMMEVAL\" styleID=\"8\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PAREN ARRAY\" styleID=\"9\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PAREN DICT\" styleID=\"10\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PAREN PROC\" styleID=\"11\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"12\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"HEX STRING\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BASE85 STRING\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BAD STRING CHAR\" styleID=\"15\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"vhdl\" desc=\"VHDL\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LIne\" styleID=\"2\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"5\" fgColor=\"A8B3AB\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"6\" fgColor=\"C87500\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"8\" fgColor=\"A39E64\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STD OPERATOR\" styleID=\"9\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"10\" fgColor=\"909993\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"9\" fgColor=\"A39E64\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DIRECTIVE OPERAND\" styleID=\"10\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STD FUNCTION\" styleID=\"11\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"STD PACKAGE\" styleID=\"12\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"STD TYPE\" styleID=\"13\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"USER DEFINE\" styleID=\"14\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type5\" />\r\n        </LexerType>\r\n        <LexerType name=\"smalltalk\" desc=\"Smalltalk\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"1\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"3\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BINARY\" styleID=\"5\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BOOL\" styleID=\"6\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SELF\" styleID=\"7\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SUPER\" styleID=\"8\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NIL\" styleID=\"9\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"10\" fgColor=\"648BD2\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"RETURN\" styleID=\"11\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"12\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KWS END\" styleID=\"13\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ASSIGN\" styleID=\"14\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"15\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SPECIAL SELECTOR\" styleID=\"16\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"caml\" desc=\"Caml\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"C87500\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAGNAME\" styleID=\"2\" fgColor=\"A65EFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"3\" fgColor=\"C23B00\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"BUILIN FUNC &amp; TYPE\" styleID=\"4\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"TYPE\" styleID=\"5\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"LINENUM\" styleID=\"6\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"A8B3AB\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"8\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"9\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"13\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"14\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"verilog\" desc=\"Verilog\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"C87500\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAGNAME\" styleID=\"2\" fgColor=\"A65EFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"C23B00\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"7\" fgColor=\"A8B3AB\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"A8B3AB\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"A39E64\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE BANG\" styleID=\"3\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"12\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"USER\" styleID=\"19\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"kix\" desc=\"KiXtart\" ext=\"\">\r\n            <!--\r\n            <WordsStyle name=\"\" styleID=\"0\" fgColor=\"\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        -->\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"31\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"3\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VAR\" styleID=\"5\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"6\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"7\" fgColor=\"C23B00\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"8\" fgColor=\"588E60\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"9\" fgColor=\"A8B3AB\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"autoit\" desc=\"autoIt\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"1\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"2\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"4\" fgColor=\"588E60\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"C23B00\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"6\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"8\" fgColor=\"A8B3AB\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"9\" fgColor=\"648BD2\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SENT\" styleID=\"10\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"11\" fgColor=\"A39E64\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"12\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"EXPAND\" styleID=\"13\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type5\" />\r\n            <WordsStyle name=\"COMOBJ\" styleID=\"14\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"ada\" desc=\"ADA\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"1\" fgColor=\"C23B00\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"2\" fgColor=\"C87500\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DELIMITER\" styleID=\"4\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER EOL\" styleID=\"6\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"8\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"9\" fgColor=\"909993\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"10\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ILLEGAL\" styleID=\"11\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"matlab\" desc=\"Matlab\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"2\" fgColor=\"C87500\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"4\" fgColor=\"C23B00\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"A8B3AB\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"C87500\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DOUBLE QUOTE STRING\" styleID=\"8\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"haskell\" desc=\"Haskell\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"C87500\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"2\" fgColor=\"A8B3AB\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CLASS\" styleID=\"6\" fgColor=\"909993\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"MODULE\" styleID=\"7\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CAPITAL\" styleID=\"8\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DATA\" styleID=\"9\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IMPORT\" styleID=\"10\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"11\" fgColor=\"A8B3AB\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTANCE\" styleID=\"12\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"13\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTBLOCK\" styleID=\"14\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTBLOCK2\" styleID=\"15\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTBLOCK3\" styleID=\"16\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"inno\" desc=\"InnoSetup\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"2\" fgColor=\"A8B3AB\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"PARAMETER\" styleID=\"3\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"4\" fgColor=\"909993\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"A39E64\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR INLINE\" styleID=\"6\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT PASCAL\" styleID=\"7\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KEYWORD PASCAL\" styleID=\"8\" fgColor=\"A8B3AB\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"KEYWORD USER\" styleID=\"9\" fgColor=\"A8B3AB\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"STRING DOUBLE\" styleID=\"10\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING SINGLE\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"12\" fgColor=\"C87500\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"cmake\" desc=\"CMakeFile\" ext=\"cmake\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"666C68\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING D\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING L\" styleID=\"3\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING R\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"5\" fgColor=\"C87500\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"PARAMETER\" styleID=\"6\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"7\" fgColor=\"648BD2\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"USER DEFINED\" styleID=\"8\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"WHILEDEF\" styleID=\"9\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"FOREACHDEF\" styleID=\"10\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IFDEF\" styleID=\"11\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"MACRODEF\" styleID=\"12\" fgColor=\"000000\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING VARIABLE\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"14\" fgColor=\"E98800\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"searchResult\" desc=\"Search result\" ext=\"\">\r\n            <WordsStyle name=\"Default\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Search Header\" styleID=\"1\" fgColor=\"000080\" bgColor=\"BBBBFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"File Header\" styleID=\"2\" fgColor=\"008000\" bgColor=\"D5FFD5\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"Line Number\" styleID=\"3\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Hit Word\" styleID=\"4\" fgColor=\"FF0000\" bgColor=\"FFFFBF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Selected Line\" styleID=\"5\" fgColor=\"000080\" bgColor=\"FFFF4F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\">if else for while</WordsStyle>\r\n            <WordsStyle name=\"Current line background colour\" styleID=\"6\" bgColor=\"E8E8FF\" fgColor=\"0080FF\" fontSize=\"\" fontStyle=\"0\">bool long int char</WordsStyle>\r\n        </LexerType>\r\n    </LexerStyles>\r\n    <GlobalStyles>\r\n        <!-- Attention : Don't modify the name of styleID=\"0\" -->\r\n        <WidgetStyle name=\"Global override\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"DejaVu Sans Mono\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Default Style\" styleID=\"32\" fgColor=\"FFFFFF\" bgColor=\"222C28\" fontName=\"DejaVu Sans Mono\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Indent guideline style\" styleID=\"37\" fgColor=\"888A85\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Brace highlight style\" styleID=\"34\" fgColor=\"FCE94F\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"1\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Bad brace colour\" styleID=\"35\" fgColor=\"EF2929\" bgColor=\"222C28\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Current line background colour\" styleID=\"0\" bgColor=\"2C3833\" />\r\n        <WidgetStyle name=\"Mark colour\" styleID=\"0\" fgColor=\"CC0000\" bgColor=\"EDD400\" />\r\n        <WidgetStyle name=\"Selected text colour\" styleID=\"0\" bgColor=\"919994\" />\r\n        <WidgetStyle name=\"Caret colour\" styleID=\"2069\" fgColor=\"FFFFFF\" />\r\n        <WidgetStyle name=\"Find Mark Style\" styleID=\"31\" fgColor=\"CC0000\" bgColor=\"EDD400\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Edge colour\" styleID=\"0\" fgColor=\"EEEEEC\" />\r\n        <WidgetStyle name=\"Line number margin\" styleID=\"33\" fgColor=\"EEEEEC\" bgColor=\"2E3436\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n        <WidgetStyle name=\"Fold\" styleID=\"0\" fgColor=\"2E3436\" bgColor=\"EEEEEC\" />\r\n        <WidgetStyle name=\"Fold margin\" styleID=\"0\" fgColor=\"555753\" bgColor=\"2E3436\" />\r\n        <WidgetStyle name=\"White space symbol\" styleID=\"0\" fgColor=\"FCAF3E\" />\r\n        <WidgetStyle name=\"Smart HighLighting\" styleID=\"29\" bgColor=\"00FF00\" fgColor=\"555753\" />\r\n        <WidgetStyle name=\"Find Mark Style\" styleID=\"31\" bgColor=\"FF0000\" fgColor=\"FCAF3E\" />\r\n        <WidgetStyle name=\"Mark Style 1\" styleID=\"25\" bgColor=\"00FFFF\" />\r\n        <WidgetStyle name=\"Mark Style 2\" styleID=\"24\" bgColor=\"FF8000\" />\r\n        <WidgetStyle name=\"Mark Style 3\" styleID=\"23\" bgColor=\"FFFF00\" />\r\n        <WidgetStyle name=\"Mark Style 4\" styleID=\"22\" bgColor=\"8000FF\" />\r\n        <WidgetStyle name=\"Mark Style 5\" styleID=\"21\" bgColor=\"008000\" />\r\n        <WidgetStyle name=\"Incremental highlight all\" styleID=\"28\" bgColor=\"0080FF\" fgColor=\"FFCAB0\" />\r\n        <WidgetStyle name=\"Tags match highlighting\" styleID=\"27\" bgColor=\"8000FF\" fgColor=\"000000\" />\r\n        <WidgetStyle name=\"Tags attribute\" styleID=\"26\" bgColor=\"FFFF00\" fgColor=\"8080C0\" />\r\n        <WidgetStyle name=\"Active tab focused indicator\" styleID=\"0\" fgColor=\"FAAA3C\" bgColor=\"FF0000\" />\r\n        <WidgetStyle name=\"Active tab unfocused indicator\" styleID=\"0\" fgColor=\"FFCAB0\" bgColor=\"80FF00\" />\r\n        <WidgetStyle name=\"Active tab text\" styleID=\"0\" fgColor=\"000000\" />\r\n        <WidgetStyle name=\"Inactive tabs\" styleID=\"0\" fgColor=\"808080\" bgColor=\"C0C0C0\" />\r\n    </GlobalStyles>\r\n</NotepadPlus>\r\n"
  },
  {
    "path": "gui/themes/Monokai.xml",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\" ?>\r\n<!--//\r\n\r\nMonokai\r\nCopyright (c) 2008 Fabio Zendhi Nagao <http://zend.lojcomm.com.br/>\r\n\r\nPermission is hereby granted, free of charge, to any person\r\nobtaining a copy of this software and associated documentation\r\nfiles (the \"Software\"), to deal in the Software without\r\nrestriction, including without limitation the rights to use,\r\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\r\ncopies of the Software, and to permit persons to whom the\r\nSoftware is furnished to do so, subject to the following\r\nconditions:\r\n\r\nThe above copyright notice and this permission notice shall be\r\nincluded in all copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\r\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\r\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\r\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\r\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\r\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\r\nOTHER DEALINGS IN THE SOFTWARE.\r\n\r\nRequirements:\r\n    * This style is based on DejaVu fonts <http://dejavu.sourceforge.net/wiki/index.php/Main_Page>.\r\n    * Notepad++, of course.\r\n\r\nInstallation:\r\n    Copy this file to C:\\Documents and Settings\\%%USERNAME%%\\Application Data\\Notepad++\\\r\n\r\nAbout:\r\n    This styler has been built by Textmate theme to Notepad++ styler <http://framework.lojcomm.com.br/tmTheme2nppStyler/>\r\n\r\nCredits:\r\n    Thanks for the original Textmate theme author.\r\n    Thanks for Fabio Zendhi Nagao for the tmTheme2nppStyler.\r\n    Thanks for the user for the tmTheme source.\r\n\r\n//-->\r\n<NotepadPlus>\r\n    <LexerStyles>\r\n        <LexerType name=\"c\" desc=\"C\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"66D9EF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPEWORD\" styleID=\"16\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"cpp\" desc=\"C++\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"66D9EF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"java\" desc=\"Java\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"66D9EF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"cs\" desc=\"C#\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"66D9EF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"rc\" desc=\"RC\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"66D9EF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"tcl\" desc=\"TCL\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"66D9EF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"objc\" desc=\"Objective-C\" ext=\"\">\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"19\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"QUALIFIER\" styleID=\"20\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"66D9EF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"sql\" desc=\"SQL\" ext=\"\">\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"5\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"7\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"html\" desc=\"HTML\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"6\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"7\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAGEND\" styleID=\"11\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAGUNKNOWN\" styleID=\"2\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"3\" fgColor=\"A6E22E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ATTRIBUTEUNKNOWN\" styleID=\"4\" fgColor=\"A6E22E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SGMLDEFAULT\" styleID=\"21\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CDATA\" styleID=\"17\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VALUE\" styleID=\"19\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ENTITY\" styleID=\"10\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"php\" desc=\"php\" ext=\"\">\r\n            <WordsStyle name=\"QUESTION MARK\" styleID=\"18\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"118\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"119\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING VARIABLE\" styleID=\"126\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SIMPLESTRING\" styleID=\"120\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"121\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"122\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"123\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"124\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"125\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"127\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"javascript\" desc=\"Javascript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"41\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"45\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"46\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"47\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"48\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"49\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SYMBOLS\" styleID=\"50\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"51\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"52\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"42\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"43\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTDOC\" styleID=\"44\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"asp\" desc=\"asp\" ext=\"asp\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"81\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"82\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"83\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"84\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"85\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"87\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"86\" fgColor=\"66D9EF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ASPSYBOL\" styleID=\"15\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SCRIPTTYPE\" styleID=\"16\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"xml\" desc=\"XML\" ext=\"\">\r\n            <WordsStyle name=\"XMLSTART\" styleID=\"12\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"XMLEND\" styleID=\"13\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"6\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"7\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAGEND\" styleID=\"11\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAGUNKNOWN\" styleID=\"2\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"3\" fgColor=\"A6E22E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ATTRIBUTEUNKNOWN\" styleID=\"4\" fgColor=\"A6E22E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SGMLDEFAULT\" styleID=\"21\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CDATA\" styleID=\"17\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"ini\" desc=\"ini file\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"2\" fgColor=\"A6E22E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ASSIGNMENT\" styleID=\"3\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFVAL\" styleID=\"4\" fgColor=\"A6E22E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"props\" desc=\"Properties file\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ASSIGNMENT\" styleID=\"3\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFVAL\" styleID=\"4\" fgColor=\"A6E22E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"diff\" desc=\"DIFF\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"2\" fgColor=\"66D9EF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"HEADER\" styleID=\"3\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"POSITION\" styleID=\"4\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DELETED\" styleID=\"5\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ADDED\" styleID=\"6\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"nfo\" desc=\"Dos Style\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"32\" fgColor=\"F8F8F2\" bgColor=\"272822\" />\r\n        </LexerType>\r\n        <LexerType name=\"makefile\" desc=\"Makefile\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"2\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"3\" fgColor=\"66D9EF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"4\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TARGET\" styleID=\"5\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDEOL\" styleID=\"9\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"vb\" desc=\"VB / VBS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"7\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"3\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DATE\" styleID=\"8\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"css\" desc=\"CSS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"Batang\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CLASS\" styleID=\"2\" fgColor=\"A6E22E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PSEUDOCLASS\" styleID=\"3\" fgColor=\"A6E22E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"UNKNOWN_PSEUDOCLASS\" styleID=\"4\" fgColor=\"A6E22E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"5\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"6\" fgColor=\"66D9EF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"UNKNOWN_IDENTIFIER\" styleID=\"7\" fgColor=\"66D9EF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VALUE\" styleID=\"8\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ID\" styleID=\"10\" fgColor=\"A6E22E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IMPORTANT\" styleID=\"11\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"12\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"pascal\" desc=\"Pascal\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"66D9EF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"66D9EF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"perl\" desc=\"Perl\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"66D9EF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"17\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SCALAR\" styleID=\"12\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ARRAY\" styleID=\"13\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"HASH\" styleID=\"14\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SYMBOL TABLE\" styleID=\"15\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PUNCTUATION\" styleID=\"8\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"POD\" styleID=\"3\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"LONGQUOTE\" styleID=\"19\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DATASECTION\" styleID=\"21\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGSUBST\" styleID=\"18\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"20\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"python\" desc=\"Python\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"4\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KEYWORDS\" styleID=\"5\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TRIPLE\" styleID=\"6\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TRIPLEDOUBLE\" styleID=\"7\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CLASSNAME\" styleID=\"8\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFNAME\" styleID=\"9\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"66D9EF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTBLOCK\" styleID=\"12\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"12\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"batch\" desc=\"Batch\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KEYWORDS\" styleID=\"2\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"3\" fgColor=\"A6E22E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"HIDE SYBOL\" styleID=\"4\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"5\" fgColor=\"66D9EF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"6\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"lua\" desc=\"Lua\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"LITERALSTRING\" styleID=\"8\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"66D9EF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"FUNC1\" styleID=\"13\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"FUNC2\" styleID=\"14\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"FUNC3\" styleID=\"15\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"type2\" />\r\n        </LexerType>\r\n        <LexerType name=\"tex\" desc=\"TeX\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"1\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"GROUP\" styleID=\"2\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"3\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"4\" fgColor=\"66D9EF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"5\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"nsis\" desc=\"NSIS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING DOUBLE QUOTE\" styleID=\"2\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING LEFT QUOTE\" styleID=\"3\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING RIGHT QUOTE\" styleID=\"4\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"5\" fgColor=\"66D9EF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"6\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"7\" fgColor=\"A6E22E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"USER DEFINED\" styleID=\"8\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"9\" fgColor=\"A6E22E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SUBSECTION\" styleID=\"10\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IF DEFINE\" styleID=\"11\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"12\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING VAR\" styleID=\"13\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"14\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SECTION GROUP\" styleID=\"15\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PAGE EX\" styleID=\"16\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"FUNCTION DEFINITIONS\" styleID=\"17\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"18\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"actionscript\" desc=\"ActionScript\" ext=\"\">\r\n            <!--\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"19\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            -->\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"20\" fgColor=\"66D9EF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"66D9EF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"bash\" desc=\"bash\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"4\" fgColor=\"66D9EF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"5\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"6\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"8\" fgColor=\"66D9EF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SCALAR\" styleID=\"9\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PARAM\" styleID=\"10\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"11\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"HERE DELIM\" styleID=\"12\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"HERE Q\" styleID=\"13\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"fortran\" desc=\"Fortran\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"4\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"5\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"66D9EF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"8\" fgColor=\"66D9EF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION1\" styleID=\"9\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"FUNCTION2\" styleID=\"10\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"11\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR2\" styleID=\"12\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"13\" fgColor=\"A6E22E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CONTINUATION\" styleID=\"14\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"lisp\" desc=\"LISP\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"FUNCTION WORD\" styleID=\"3\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"5\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"8\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"9\" fgColor=\"66D9EF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"11\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"asm\" desc=\"Assembler\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"4\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"5\" fgColor=\"66D9EF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CPU INSTRUCTION\" styleID=\"6\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"MATH INSTRUCTION\" styleID=\"7\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"REGISTER\" styleID=\"8\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"9\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"DIRECTIVE OPERAND\" styleID=\"10\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"COMMENT BLOCK\" styleID=\"11\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"12\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"13\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"EXT INSTRUCTION\" styleID=\"14\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"type4\" />\r\n        </LexerType>\r\n        <LexerType name=\"ruby\" desc=\"Ruby\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"2\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"POD\" styleID=\"3\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"5\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CLASS NAME\" styleID=\"8\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEF NAME\" styleID=\"9\" fgColor=\"A6E22E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"66D9EF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"12\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"13\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"14\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"MODULE NAME\" styleID=\"15\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTANCE VAR\" styleID=\"16\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CLASS VAR\" styleID=\"17\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"18\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DATA SECTION\" styleID=\"19\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING Q\" styleID=\"24\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"postscript\" desc=\"Postscript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DSC COMMENT\" styleID=\"2\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DSC VALUE\" styleID=\"3\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"Name\" styleID=\"5\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"6\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"LITERAL\" styleID=\"7\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IMMEVAL\" styleID=\"8\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PAREN ARRAY\" styleID=\"9\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PAREN DICT\" styleID=\"10\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PAREN PROC\" styleID=\"11\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"12\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"HEX STRING\" styleID=\"13\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BASE85 STRING\" styleID=\"14\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BAD STRING CHAR\" styleID=\"15\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"vhdl\" desc=\"VHDL\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LIne\" styleID=\"2\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"5\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"6\" fgColor=\"66D9EF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"7\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"8\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STD OPERATOR\" styleID=\"9\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"10\" fgColor=\"A6E22E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"9\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DIRECTIVE OPERAND\" styleID=\"10\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STD FUNCTION\" styleID=\"11\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"STD PACKAGE\" styleID=\"12\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"STD TYPE\" styleID=\"13\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"USER DEFINE\" styleID=\"14\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"type5\" />\r\n        </LexerType>\r\n        <LexerType name=\"smalltalk\" desc=\"Smalltalk\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"1\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"3\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"4\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BINARY\" styleID=\"5\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BOOL\" styleID=\"6\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SELF\" styleID=\"7\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SUPER\" styleID=\"8\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NIL\" styleID=\"9\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"10\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"RETURN\" styleID=\"11\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"12\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KWS END\" styleID=\"13\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ASSIGN\" styleID=\"14\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"15\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SPECIAL SELECTOR\" styleID=\"16\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"caml\" desc=\"Caml\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"66D9EF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAGNAME\" styleID=\"2\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"3\" fgColor=\"66D9EF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"BUILIN FUNC &amp; TYPE\" styleID=\"4\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"TYPE\" styleID=\"5\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"LINENUM\" styleID=\"6\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"8\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"9\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"11\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"13\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"14\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"verilog\" desc=\"Verilog\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"66D9EF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAGNAME\" styleID=\"2\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"66D9EF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"7\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE BANG\" styleID=\"3\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"12\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"USER\" styleID=\"19\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"kix\" desc=\"KiXtart\" ext=\"\">\r\n            <!--\r\n            <WordsStyle name=\"\" styleID=\"0\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        -->\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"31\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"2\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"3\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VAR\" styleID=\"5\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"6\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"7\" fgColor=\"66D9EF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"8\" fgColor=\"66D9EF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"9\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"autoit\" desc=\"autoIt\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"1\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"2\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"4\" fgColor=\"66D9EF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"66D9EF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"6\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"7\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"8\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"9\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SENT\" styleID=\"10\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"11\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"12\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"EXPAND\" styleID=\"13\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"type5\" />\r\n            <WordsStyle name=\"COMOBJ\" styleID=\"14\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"ada\" desc=\"ADA\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"1\" fgColor=\"66D9EF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"2\" fgColor=\"66D9EF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DELIMITER\" styleID=\"4\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"5\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER EOL\" styleID=\"6\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"7\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"8\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"9\" fgColor=\"A6E22E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"10\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ILLEGAL\" styleID=\"11\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"matlab\" desc=\"Matlab\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"2\" fgColor=\"66D9EF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"4\" fgColor=\"66D9EF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"5\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"66D9EF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DOUBLE QUOTE STRING\" styleID=\"8\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"haskell\" desc=\"Haskell\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"66D9EF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"2\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"5\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CLASS\" styleID=\"6\" fgColor=\"A6E22E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"MODULE\" styleID=\"7\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CAPITAL\" styleID=\"8\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DATA\" styleID=\"9\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IMPORT\" styleID=\"10\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"11\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTANCE\" styleID=\"12\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"13\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTBLOCK\" styleID=\"14\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTBLOCK2\" styleID=\"15\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTBLOCK3\" styleID=\"16\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"inno\" desc=\"InnoSetup\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"2\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"PARAMETER\" styleID=\"3\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"4\" fgColor=\"A6E22E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR INLINE\" styleID=\"6\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT PASCAL\" styleID=\"7\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KEYWORD PASCAL\" styleID=\"8\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"KEYWORD USER\" styleID=\"9\" fgColor=\"F92672\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"STRING DOUBLE\" styleID=\"10\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING SINGLE\" styleID=\"11\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"12\" fgColor=\"66D9EF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"cmake\" desc=\"CMakeFile\" ext=\"cmake\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"75715E\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING D\" styleID=\"2\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING L\" styleID=\"3\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING R\" styleID=\"4\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"5\" fgColor=\"66D9EF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"PARAMETER\" styleID=\"6\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"7\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"USER DEFINED\" styleID=\"8\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"WHILEDEF\" styleID=\"9\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"FOREACHDEF\" styleID=\"10\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IFDEF\" styleID=\"11\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"MACRODEF\" styleID=\"12\" fgColor=\"\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING VARIABLE\" styleID=\"13\" fgColor=\"E6DB74\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"14\" fgColor=\"AE81FF\" bgColor=\"272822\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"searchResult\" desc=\"Search result\" ext=\"\">\r\n            <WordsStyle name=\"Default\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Search Header\" styleID=\"1\" fgColor=\"000080\" bgColor=\"BBBBFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"File Header\" styleID=\"2\" fgColor=\"008000\" bgColor=\"D5FFD5\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"Line Number\" styleID=\"3\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Hit Word\" styleID=\"4\" fgColor=\"FF0000\" bgColor=\"FFFFBF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Selected Line\" styleID=\"5\" fgColor=\"000080\" bgColor=\"FFFF4F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\">if else for while</WordsStyle>\r\n            <WordsStyle name=\"Current line background colour\" styleID=\"6\" bgColor=\"E8E8FF\" fgColor=\"0080FF\" fontSize=\"\" fontStyle=\"0\">bool long int char</WordsStyle>\r\n        </LexerType>\r\n    </LexerStyles>\r\n    <GlobalStyles>\r\n        <!-- Attention : Don't modify the name of styleID=\"0\" -->\r\n        <WidgetStyle name=\"Global override\" styleID=\"0\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"DejaVu Sans Mono\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Default Style\" styleID=\"32\" fgColor=\"F8F8F2\" bgColor=\"272822\" fontName=\"DejaVu Sans Mono\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Indent guideline style\" styleID=\"37\" fgColor=\"888A85\" bgColor=\"272822\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Brace highlight style\" styleID=\"34\" fgColor=\"FCE94F\" bgColor=\"272822\" fontName=\"\" fontStyle=\"1\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Bad brace colour\" styleID=\"35\" fgColor=\"EF2929\" bgColor=\"272822\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Current line background colour\" styleID=\"0\" bgColor=\"3E3D32\" />\r\n        <WidgetStyle name=\"Mark colour\" styleID=\"0\" fgColor=\"CC0000\" bgColor=\"EDD400\" />\r\n        <WidgetStyle name=\"Selected text colour\" styleID=\"0\" bgColor=\"49483E\" />\r\n        <WidgetStyle name=\"Caret colour\" styleID=\"2069\" fgColor=\"F8F8F0\" />\r\n        <WidgetStyle name=\"Find Mark Style\" styleID=\"31\" fgColor=\"CC0000\" bgColor=\"EDD400\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Edge colour\" styleID=\"0\" fgColor=\"EEEEEC\" />\r\n        <WidgetStyle name=\"Line number margin\" styleID=\"33\" fgColor=\"EEEEEC\" bgColor=\"2E3436\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n        <WidgetStyle name=\"Fold\" styleID=\"0\" fgColor=\"2E3436\" bgColor=\"EEEEEC\" />\r\n        <WidgetStyle name=\"Fold margin\" styleID=\"0\" fgColor=\"555753\" bgColor=\"2E3436\" />\r\n        <WidgetStyle name=\"White space symbol\" styleID=\"0\" fgColor=\"FCAF3E\" />\r\n        <WidgetStyle name=\"Smart HighLighting\" styleID=\"29\" bgColor=\"00FF00\" fgColor=\"555753\" />\r\n        <WidgetStyle name=\"Find Mark Style\" styleID=\"31\" bgColor=\"FF0000\" fgColor=\"FCAF3E\" />\r\n        <WidgetStyle name=\"Mark Style 1\" styleID=\"25\" bgColor=\"00FFFF\" />\r\n        <WidgetStyle name=\"Mark Style 2\" styleID=\"24\" bgColor=\"FF8000\" />\r\n        <WidgetStyle name=\"Mark Style 3\" styleID=\"23\" bgColor=\"FFFF00\" />\r\n        <WidgetStyle name=\"Mark Style 4\" styleID=\"22\" bgColor=\"8000FF\" />\r\n        <WidgetStyle name=\"Mark Style 5\" styleID=\"21\" bgColor=\"008000\" />\r\n        <WidgetStyle name=\"Incremental highlight all\" styleID=\"28\" bgColor=\"0080FF\" fgColor=\"FFCAB0\" />\r\n        <WidgetStyle name=\"Tags match highlighting\" styleID=\"27\" bgColor=\"8000FF\" fgColor=\"000000\" />\r\n        <WidgetStyle name=\"Tags attribute\" styleID=\"26\" bgColor=\"FFFF00\" fgColor=\"8080C0\" />\r\n        <WidgetStyle name=\"Active tab focused indicator\" styleID=\"0\" fgColor=\"FAAA3C\" bgColor=\"FF0000\" />\r\n        <WidgetStyle name=\"Active tab unfocused indicator\" styleID=\"0\" fgColor=\"FFCAB0\" bgColor=\"80FF00\" />\r\n        <WidgetStyle name=\"Active tab text\" styleID=\"0\" fgColor=\"000000\" />\r\n        <WidgetStyle name=\"Inactive tabs\" styleID=\"0\" fgColor=\"808080\" bgColor=\"C0C0C0\" />\r\n    </GlobalStyles>\r\n</NotepadPlus>\r\n"
  },
  {
    "path": "gui/themes/MossyLawn.xml",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\" ?>\r\n<!--//\r\nFile Name:           MossyLawn.xml\r\nStyle Name:          MossyLawn\r\nDescription:         MossyLawn theme for Notepad++.\r\n                     A \"natural\" theme for NP++\r\n                     The hues are taken from photographs of mosses and grasses, with a few \r\n                     hues from tree trunks, autumn leaves and flowers added for contrast.\r\n                     The name is a tip of the hat to Terry Pratchett.\r\nSupported languages: All the languages supported by release 5.9.8\r\nCreated by:          Paul Neubauer (PaulRNeubauer at gmail dot com)\r\nLast Modified:       7:05 AM 5/29/2012\r\nReleased:            4/17/2012\r\nLicense:             Feel free to modify this theme. \r\n                     This theme is available under the terms of the Creative Commons\r\n                     Attribution 3.0 Unported License. You are free to to copy,\r\n                     distribute and transmit the work, to adapt the work, or to make\r\n                     commercial use of the work under the condition that you must\r\n                     attribute the work in the manner specified by the author or\r\n                     licensor (but not in any way that suggests that they endorse you\r\n                     or your use of the work). See\r\n                     http://creativecommons.org/licenses/by/3.0/ \r\n                     for a legal description of the license terms. Briefly, this\r\n                     means: please note in derivatives of this theme, that they are\r\n                     based on my work. Of course, if you are using this file as no\r\n                     more than a framework for an entirely different color scheme, you\r\n                     may, and should, omit such attribution.\r\n\r\nInstallation:\r\n    Copy this file to C:\\Program Files (x86)\\Notepad++\\themes  OR\r\n    For WindowsXP:\r\n    Copy this file to C:\\Documents and Settings\\%%USERNAME%%\\Application Data\\Notepad++\\themes\r\n    For Windows Vista or 7:\r\n    Copy this file to C:\\Users\\%%USERNAME%%\\AppData\\Roaming\\Notepad++\\themes\r\n\r\n//-->\r\n<NotepadPlus>\r\n    <LexerStyles>\r\n        <LexerType name=\"actionscript\" desc=\"ActionScript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"20\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"ccc457\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"981f0e\" bgColor=\"fdd64a\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"ada\" desc=\"ADA\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"1\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"2\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DELIMITER\" styleID=\"4\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"5\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER EOL\" styleID=\"6\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"7\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"8\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"9\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"10\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"ILLEGAL\" styleID=\"11\" fgColor=\"981f0e\" bgColor=\"fdd64a\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"asm\" desc=\"Assembly\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"4\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"5\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CPU INSTRUCTION\" styleID=\"6\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"MATH INSTRUCTION\" styleID=\"7\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"REGISTER\" styleID=\"8\" fgColor=\"d3d09d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"9\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"DIRECTIVE OPERAND\" styleID=\"10\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"COMMENT BLOCK\" styleID=\"11\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"12\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"EXT INSTRUCTION\" styleID=\"14\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\" />\r\n        </LexerType>\r\n        <LexerType name=\"asp\" desc=\"asp\" ext=\"asp\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"81\" fgColor=\"f2c476\" bgColor=\"627353\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"82\" fgColor=\"2a390e\" bgColor=\"627353\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"83\" fgColor=\"ffdc87\" bgColor=\"627353\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"84\" fgColor=\"cbe248\" bgColor=\"627353\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"85\" fgColor=\"ffdc87\" bgColor=\"627353\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"86\" fgColor=\"efc53d\" bgColor=\"627353\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASPSYBOL\" styleID=\"15\" fgColor=\"3e2c04\" bgColor=\"ccc457\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SCRIPTTYPE\" styleID=\"16\" fgColor=\"ccc457\" bgColor=\"627353\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"autoit\" desc=\"autoIt\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"1\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"2\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"4\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"6\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"7\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"8\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"9\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SENT\" styleID=\"10\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"11\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"12\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"EXPAND\" styleID=\"13\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type5\" />\r\n            <WordsStyle name=\"COMOBJ\" styleID=\"14\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"bash\" desc=\"bash\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"981f0e\" bgColor=\"fdd64a\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"4\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"5\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"6\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"8\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SCALAR\" styleID=\"9\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"PARAM\" styleID=\"10\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"11\" fgColor=\"bfb8c4\" bgColor=\"7e8a28\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE DELIM\" styleID=\"12\" fgColor=\"a32129\" bgColor=\"ccc457\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE Q\" styleID=\"13\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"batch\" desc=\"Batch\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORDS\" styleID=\"2\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"3\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HIDE SYBOL\" styleID=\"4\" fgColor=\"561e0f\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"5\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"6\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"c\" desc=\"C\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPEWORD\" styleID=\"16\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"981f0e\" bgColor=\"fdd64a\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"caml\" desc=\"Caml\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGNAME\" styleID=\"2\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"3\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"BUILIN FUNC &amp; TYPE\" styleID=\"4\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"TYPE\" styleID=\"5\" fgColor=\"561e0f\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"LINENUM\" styleID=\"6\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"8\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"9\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"11\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"13\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"14\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cmake\" desc=\"CMakeFile\" ext=\"cmake\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING D\" styleID=\"2\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING L\" styleID=\"3\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING R\" styleID=\"4\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"5\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"PARAMETER\" styleID=\"6\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"7\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"USER DEFINED\" styleID=\"8\" fgColor=\"561e0f\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"WHILEDEF\" styleID=\"9\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FOREACHDEF\" styleID=\"10\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IFDEF\" styleID=\"11\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MACRODEF\" styleID=\"12\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING VARIABLE\" styleID=\"13\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"14\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cobol\" desc=\"COBOL\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DECLARATION\" styleID=\"5\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"16\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"8\" fgColor=\"561e0f\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"981f0e\" bgColor=\"fdd64a\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cpp\" desc=\"C++\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"981f0e\" bgColor=\"fdd64a\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cs\" desc=\"C#\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"981f0e\" bgColor=\"fdd64a\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"css\" desc=\"CSS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS\" styleID=\"2\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PSEUDOCLASS\" styleID=\"3\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"UNKNOWN_PSEUDOCLASS\" styleID=\"4\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"5\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"6\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"UNKNOWN_IDENTIFIER\" styleID=\"7\" fgColor=\"981f0e\" bgColor=\"fdd64a\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VALUE\" styleID=\"8\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"ID\" styleID=\"10\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IMPORTANT\" styleID=\"11\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"12\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"13\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"14\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"d\" desc=\"D\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"14\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"6\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"KEYWORD1\" styleID=\"7\" fgColor=\"561e0f\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\"/>\r\n            <WordsStyle name=\"KEYWORD2\" styleID=\"8\" fgColor=\"561e0f\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\"/>\r\n            <WordsStyle name=\"KEYWORD3\" styleID=\"9\" fgColor=\"561e0f\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\"/>\r\n            <WordsStyle name=\"KEYWORD4\" styleID=\"20\" fgColor=\"561e0f\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\"/>\r\n            <WordsStyle name=\"KEYWORD5\" styleID=\"21\" fgColor=\"561e0f\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\"/>\r\n            <WordsStyle name=\"KEYWORD6\" styleID=\"22\" fgColor=\"561e0f\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type5\"/>\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"10\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"12\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"13\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT NESTED\" styleID=\"4\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"16\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"17\" fgColor=\"981f0e\" bgColor=\"fdd64a\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n         </LexerType>\r\n        <LexerType name=\"diff\" desc=\"DIFF\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"2\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HEADER\" styleID=\"3\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"POSITION\" styleID=\"4\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DELETED\" styleID=\"5\" fgColor=\"561e0f\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"ADDED\" styleID=\"6\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"fortran\" desc=\"Fortran\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"4\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"5\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"8\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION1\" styleID=\"9\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"FUNCTION2\" styleID=\"10\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"11\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR2\" styleID=\"12\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"13\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CONTINUATION\" styleID=\"14\" fgColor=\"981f0e\" bgColor=\"fdd64a\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"gui4cli\" desc=\"GUI4CLI\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"1\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"2\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"5\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"EVENT\" styleID=\"5\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"16\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"CONTROL\" styleID=\"16\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"16\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"haskell\" desc=\"Haskell\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"2\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"5\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS\" styleID=\"6\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MODULE\" styleID=\"7\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CAPITAL\" styleID=\"8\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATA\" styleID=\"9\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IMPORT\" styleID=\"10\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"11\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTANCE\" styleID=\"12\" fgColor=\"561e0f\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"13\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK\" styleID=\"14\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK2\" styleID=\"15\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK3\" styleID=\"16\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"html\" desc=\"HTML\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"981f0e\" bgColor=\"fdd64a\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"6\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"7\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"d3d09d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGEND\" styleID=\"11\" fgColor=\"d3d09d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGUNKNOWN\" styleID=\"2\" fgColor=\"981f0e\" bgColor=\"fdd64a\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"3\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTEUNKNOWN\" styleID=\"4\" fgColor=\"981f0e\" bgColor=\"fdd64a\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SGMLDEFAULT\" styleID=\"21\" fgColor=\"3e2c04\" bgColor=\"ccc457\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CDATA\" styleID=\"17\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VALUE\" styleID=\"19\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ENTITY\" styleID=\"10\" fgColor=\"561e0f\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"ini\" desc=\"ini file\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"2\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASSIGNMENT\" styleID=\"3\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFVAL\" styleID=\"4\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"inno\" desc=\"InnoSetup\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"2\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"PARAMETER\" styleID=\"3\" fgColor=\"d3d09d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"4\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR INLINE\" styleID=\"6\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT PASCAL\" styleID=\"7\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD PASCAL\" styleID=\"8\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"KEYWORD USER\" styleID=\"9\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"STRING DOUBLE\" styleID=\"10\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING SINGLE\" styleID=\"11\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"12\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"java\" desc=\"Java\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"981f0e\" bgColor=\"fdd64a\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"javascript\" desc=\"Javascript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"41\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"45\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"46\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"47\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"48\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"49\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOLS\" styleID=\"50\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"51\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"52\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"42\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"43\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTDOC\" styleID=\"44\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"3\" fontSize=\"\">param @projectDescription projectDescription @param</WordsStyle>\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"981f0e\" bgColor=\"fdd64a\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"kix\" desc=\"KiXtart\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"31\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"2\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"3\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VAR\" styleID=\"5\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"6\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"7\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"8\" fgColor=\"561e0f\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"9\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"lisp\" desc=\"LISP\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION WORD\" styleID=\"3\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION WORD2\" styleID=\"4\" fgColor=\"d3d09d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"5\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"8\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"9\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"11\" fgColor=\"bfb8c4\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"lua\" desc=\"Lua\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"LITERALSTRING\" styleID=\"8\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNC1\" styleID=\"13\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"FUNC2\" styleID=\"14\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"FUNC3\" styleID=\"15\" fgColor=\"561e0f\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n        </LexerType>\r\n        <LexerType name=\"makefile\" desc=\"Makefile\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"2\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"3\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"4\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"TARGET\" styleID=\"5\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDEOL\" styleID=\"9\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"matlab\" desc=\"Matlab\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"2\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"4\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"5\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLE QUOTE STRING\" styleID=\"8\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n\t\t<LexerType name=\"nfo\" desc=\"Dos Style\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"32\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontSize=\"\" fontStyle=\"0\" />\r\n        </LexerType>\r\n        <LexerType name=\"nsis\" desc=\"NSIS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING DOUBLE QUOTE\" styleID=\"2\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING LEFT QUOTE\" styleID=\"3\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING RIGHT QUOTE\" styleID=\"4\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"5\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"6\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"7\" fgColor=\"561e0f\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"USER DEFINED\" styleID=\"8\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"9\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SUBSECTION\" styleID=\"10\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IF DEFINE\" styleID=\"11\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"12\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING VAR\" styleID=\"13\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"14\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SECTION GROUP\" styleID=\"15\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAGE EX\" styleID=\"16\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION DEFINITIONS\" styleID=\"17\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"18\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"objc\" desc=\"Objective-C\" ext=\"\">\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"19\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"QUALIFIER\" styleID=\"20\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"981f0e\" bgColor=\"fdd64a\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"pascal\" desc=\"Pascal\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"2\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"3\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"4\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR2\" styleID=\"6\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"7\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HEX NUMBER\" styleID=\"8\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"9\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"10\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"12\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"13\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASM\" styleID=\"14\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"perl\" desc=\"Perl\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"17\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGSUBST\" styleID=\"18\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SCALAR\" styleID=\"12\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ARRAY\" styleID=\"13\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HASH\" styleID=\"14\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL TABLE\" styleID=\"15\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PUNCTUATION\" styleID=\"8\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"POD\" styleID=\"3\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"POD VERB\" styleID=\"31\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"981f0e\" bgColor=\"fdd64a\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"LONGQUOTE\" styleID=\"19\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATASECTION\" styleID=\"21\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"20\" fgColor=\"bfb8c4\" bgColor=\"7e8a28\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE DELIM\" styleID=\"22\" fgColor=\"a32129\" bgColor=\"ccc457\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE Q\" styleID=\"23\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE QQ\" styleID=\"24\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE QX\" styleID=\"25\" fgColor=\"bfb8c4\" bgColor=\"7e8a28\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING Q\" styleID=\"26\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING QQ\" styleID=\"27\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING QX\" styleID=\"28\" fgColor=\"bfb8c4\" bgColor=\"7e8a28\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING QR\" styleID=\"29\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING QW\" styleID=\"30\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FORMAT IDENT\" styleID=\"41\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FORMAT\" styleID=\"42\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n       </LexerType>\r\n        <LexerType name=\"php\" desc=\"php\" ext=\"\">\r\n            <WordsStyle name=\"QUESTION MARK\" styleID=\"18\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"118\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"119\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING VARIABLE\" styleID=\"126\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SIMPLESTRING\" styleID=\"120\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"121\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"122\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"123\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"124\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"125\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"127\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"postscript\" desc=\"Postscript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"DSC COMMENT\" styleID=\"2\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"DSC VALUE\" styleID=\"3\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Name\" styleID=\"5\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"6\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"LITERAL\" styleID=\"7\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IMMEVAL\" styleID=\"8\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAREN ARRAY\" styleID=\"9\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAREN DICT\" styleID=\"10\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAREN PROC\" styleID=\"11\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"12\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HEX STRING\" styleID=\"13\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BASE85 STRING\" styleID=\"14\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BAD STRING CHAR\" styleID=\"15\" fgColor=\"981f0e\" bgColor=\"fdd64a\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"powershell\" desc=\"PowerShell\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"2\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"3\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"5\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"8\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"CMDLET\" styleID=\"9\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"ALIAS\" styleID=\"10\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n        </LexerType>\r\n        <LexerType name=\"props\" desc=\"Properties file\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"2\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASSIGNMENT\" styleID=\"3\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFVAL\" styleID=\"4\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"python\" desc=\"Python\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"4\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORDS\" styleID=\"5\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TRIPLE\" styleID=\"6\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TRIPLEDOUBLE\" styleID=\"7\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASSNAME\" styleID=\"8\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFNAME\" styleID=\"9\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK\" styleID=\"12\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"12\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"r\" desc=\"R\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"2\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"BASE WORD\" styleID=\"3\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"4\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"7\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"8\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"INFIX\" styleID=\"10\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"rc\" desc=\"RC\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"981f0e\" bgColor=\"fdd64a\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"ruby\" desc=\"Ruby\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"2\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"POD\" styleID=\"3\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"5\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS NAME\" styleID=\"8\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEF NAME\" styleID=\"9\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"12\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"13\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"14\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MODULE NAME\" styleID=\"15\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTANCE VAR\" styleID=\"16\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS VAR\" styleID=\"17\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"18\" fgColor=\"bfb8c4\" bgColor=\"7e8a28\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATA SECTION\" styleID=\"19\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING Q\" styleID=\"24\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BOOLEAN\" styleID=\"25\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n        </LexerType>\r\n        <LexerType name=\"scheme\" desc=\"Scheme\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION WORD\" styleID=\"3\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION WORD2\" styleID=\"4\" fgColor=\"d3d09d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"5\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"9\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"11\" fgColor=\"bfb8c4\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"searchResult\" desc=\"Search result\" ext=\"\">\r\n            <WordsStyle name=\"Default\" styleID=\"0\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Search Header\" styleID=\"1\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"File Header\" styleID=\"2\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Line Number\" styleID=\"3\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Hit Word\" styleID=\"4\" fgColor=\"efc53d\" bgColor=\"561e0f\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Selected Line\" styleID=\"5\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Current line background colour\" styleID=\"6\" bgColor=\"858e4d\" />\r\n        </LexerType>\r\n        <LexerType name=\"smalltalk\" desc=\"Smalltalk\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"1\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"3\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"4\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BINARY\" styleID=\"5\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BOOL\" styleID=\"6\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SELF\" styleID=\"7\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SUPER\" styleID=\"8\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NIL\" styleID=\"9\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"10\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"RETURN\" styleID=\"11\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"12\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"KWS END\" styleID=\"13\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASSIGN\" styleID=\"14\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"15\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SPECIAL SELECTOR\" styleID=\"16\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"sql\" desc=\"SQL\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"5\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"7\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n\t\t</LexerType>\r\n        <LexerType name=\"tcl\" desc=\"TCL\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MODIFIER\" styleID=\"10\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"EXPAND\" styleID=\"11\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"12\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"13\" fgColor=\"561e0f\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SUB BRACE\" styleID=\"9\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SUBSTITUTION\" styleID=\"8\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD IN QUOTE\" styleID=\"4\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IN QUOTE\" styleID=\"5\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT BOX\" styleID=\"17\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"BLOCK COMMENT\" styleID=\"18\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"tex\" desc=\"TeX\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"1\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"GROUP\" styleID=\"2\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"3\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"4\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"5\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"vb\" desc=\"VB / VBS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"7\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"3\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATE\" styleID=\"8\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"verilog\" desc=\"Verilog\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGNAME\" styleID=\"2\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"7\" fgColor=\"bfb8c4\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE BANG\" styleID=\"3\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"12\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"USER\" styleID=\"19\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"vhdl\" desc=\"VHDL\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LIne\" styleID=\"2\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"5\" fgColor=\"ffee88\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"6\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"7\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"8\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STD OPERATOR\" styleID=\"9\" fgColor=\"d3d09d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"10\" fgColor=\"561e0f\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"9\" fgColor=\"d3d09d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DIRECTIVE OPERAND\" styleID=\"10\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STD FUNCTION\" styleID=\"11\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"STD PACKAGE\" styleID=\"12\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"STD TYPE\" styleID=\"13\" fgColor=\"d3d09d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"USER DEFINE\" styleID=\"14\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type5\" />\r\n        </LexerType>\r\n        <LexerType name=\"xml\" desc=\"XML\" ext=\"\">\r\n            <WordsStyle name=\"XMLSTART\" styleID=\"12\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"XMLEND\" styleID=\"13\" fgColor=\"a32129\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"6\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"7\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"d3d09d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGEND\" styleID=\"11\" fgColor=\"d3d09d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGUNKNOWN\" styleID=\"2\" fgColor=\"981f0e\" bgColor=\"fdd64a\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"3\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTEUNKNOWN\" styleID=\"4\" fgColor=\"981f0e\" bgColor=\"fdd64a\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SGMLDEFAULT\" styleID=\"21\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CDATA\" styleID=\"17\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"yaml\" desc=\"YAML\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"2\" fgColor=\"efc53d\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"2a390e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"3\" fgColor=\"cbe248\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REFERENCE\" styleID=\"5\" fgColor=\"afcf90\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOCUMENT\" styleID=\"6\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"7\" fgColor=\"ffdc87\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"8\" fgColor=\"981f0e\" bgColor=\"fdd64a\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n    </LexerStyles>\r\n    <GlobalStyles>\r\n        <!-- Attention : Don't modify the name of styleID=\"0\" -->\r\n        <WidgetStyle name=\"Global override\" styleID=\"0\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"Consolas\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Default Style\" styleID=\"32\" fgColor=\"f2c476\" bgColor=\"6c7d51\" fontName=\"Consolas\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Indent guideline style\" styleID=\"37\" fgColor=\"003709\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Brace highlight style\" styleID=\"34\" fgColor=\"561e0f\" bgColor=\"9ece3c\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Bad brace colour\" styleID=\"35\" fgColor=\"981f0e\" bgColor=\"6c7d51\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Current line background colour\" styleID=\"0\" bgColor=\"858e4d\" />\r\n        <WidgetStyle name=\"Selected text colour\" styleID=\"0\" bgColor=\"8B6733\" />\r\n        <WidgetStyle name=\"Caret colour\" styleID=\"2069\" fgColor=\"ffc973\" />\r\n        <WidgetStyle name=\"Edge colour\" styleID=\"0\" fgColor=\"003709\" />\r\n        <WidgetStyle name=\"Line number margin\" styleID=\"33\" fgColor=\"603d13\" bgColor=\"7e8a28\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Fold\" styleID=\"0\" fgColor=\"603d13\" bgColor=\"7e8a28\" />\r\n        <WidgetStyle name=\"Fold active\" styleID=\"0\" fgColor=\"a32129\" />\r\n        <WidgetStyle name=\"Fold margin\" styleID=\"0\" fgColor=\"7e8a28\" bgColor=\"7e8a28\" />\r\n        <WidgetStyle name=\"White space symbol\" styleID=\"0\" fgColor=\"ffc973\" />\r\n        <WidgetStyle name=\"Smart HighLighting\" styleID=\"29\" bgColor=\"bf8830\" />\r\n        <WidgetStyle name=\"Find Mark Style\" styleID=\"31\" bgColor=\"6a1a01\" />\r\n        <WidgetStyle name=\"Mark Style 1\" styleID=\"25\" bgColor=\"fdd64a\" />\r\n        <WidgetStyle name=\"Mark Style 2\" styleID=\"24\" bgColor=\"afcf90\" />\r\n        <WidgetStyle name=\"Mark Style 3\" styleID=\"23\" bgColor=\"ffdc87\" />\r\n        <WidgetStyle name=\"Mark Style 4\" styleID=\"22\" bgColor=\"cbe248\" />\r\n        <WidgetStyle name=\"Mark Style 5\" styleID=\"21\" bgColor=\"8abbe4\" />\r\n        <WidgetStyle name=\"Incremental highlight all\" styleID=\"28\" bgColor=\"6a1a01\" />\r\n        <WidgetStyle name=\"Tags match highlighting\" styleID=\"27\" bgColor=\"92983e\" />\r\n        <WidgetStyle name=\"Tags attribute\" styleID=\"26\" bgColor=\"dab57e\" />\r\n        <WidgetStyle name=\"Active tab focused indicator\" styleID=\"0\" fgColor=\"6c7d51\" />\r\n        <WidgetStyle name=\"Active tab unfocused indicator\" styleID=\"0\" fgColor=\"6c7d51\" />\r\n        <WidgetStyle name=\"Active tab text\" styleID=\"0\" fgColor=\"012001\" />\r\n        <WidgetStyle name=\"Inactive tabs\" styleID=\"0\" fgColor=\"2a390e\" bgColor=\"BBCF60\" />\r\n    </GlobalStyles>\r\n</NotepadPlus>"
  },
  {
    "path": "gui/themes/Navajo.xml",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\" ?>\r\n<!--//\r\nFile Name:           Navajo.xml\r\nStyle Name:          Navajo\r\nDescription:         Navajo theme for Notepad++.\r\n                     Based on navajo.vim by R. Edward Ralston\r\n                     Official Navajo home page: http://www.vim.org/scripts/script.php?script_id=190\r\nSupported languages: All the languages supported by release 5.9.8\r\nCreated by:          Paul Neubauer (PaulRNeubauer at gmail dot com)\r\nLast Modified:       7:04 AM 5/29/2012\r\nReleased:            4/17/2012\r\nLicense:             Feel free to modify this theme. \r\n                     This theme is available under the terms of the Creative Commons\r\n                     Attribution 3.0 Unported License. You are free to to copy,\r\n                     distribute and transmit the work, to adapt the work, or to make\r\n                     commercial use of the work under the condition that you must\r\n                     attribute the work in the manner specified by the author or\r\n                     licensor (but not in any way that suggests that they endorse you\r\n                     or your use of the work). See\r\n                     http://creativecommons.org/licenses/by/3.0/ \r\n                     for a legal description of the license terms. Briefly, this\r\n                     means: please note in derivatives of this theme, that they are\r\n                     based on my work. Of course, if you are using this file as no\r\n                     more than a framework for an entirely different color scheme, you\r\n                     may, and should, omit such attribution.\r\n\r\nInstallation:\r\n    Copy this file to C:\\Program Files (x86)\\Notepad++\\themes  OR\r\n    For WindowsXP:\r\n    Copy this file to C:\\Documents and Settings\\%%USERNAME%%\\Application Data\\Notepad++\\themes\r\n    For Windows Vista or 7:\r\n    Copy this file to C:\\Users\\%%USERNAME%%\\AppData\\Roaming\\Notepad++\\themes\r\n\r\n//-->\r\n<NotepadPlus>\r\n    <LexerStyles>\r\n        <LexerType name=\"actionscript\" desc=\"ActionScript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"20\" fgColor=\"106060\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"870087\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"BCBCBC\" bgColor=\"5F0000\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"ada\" desc=\"ADA\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"1\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"2\" fgColor=\"106060\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DELIMITER\" styleID=\"4\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"5\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER EOL\" styleID=\"6\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"7\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"8\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"9\" fgColor=\"D92B10\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"10\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"ILLEGAL\" styleID=\"11\" fgColor=\"BCBCBC\" bgColor=\"5F0000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"asm\" desc=\"Assembly\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"4\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"5\" fgColor=\"106060\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CPU INSTRUCTION\" styleID=\"6\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"MATH INSTRUCTION\" styleID=\"7\" fgColor=\"3b4092\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"REGISTER\" styleID=\"8\" fgColor=\"D92B10\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"9\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"DIRECTIVE OPERAND\" styleID=\"10\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"COMMENT BLOCK\" styleID=\"11\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"12\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"EXT INSTRUCTION\" styleID=\"14\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\" />\r\n        </LexerType>\r\n        <LexerType name=\"asp\" desc=\"asp\" ext=\"asp\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"81\" fgColor=\"000000\" bgColor=\"CDB38B\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"82\" fgColor=\"181880\" bgColor=\"CDB38B\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"83\" fgColor=\"C00058\" bgColor=\"CDB38B\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"84\" fgColor=\"804040\" bgColor=\"CDB38B\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"85\" fgColor=\"C00058\" bgColor=\"CDB38B\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"86\" fgColor=\"000000\" bgColor=\"CDB38B\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASPSYBOL\" styleID=\"15\" fgColor=\"870087\" bgColor=\"afaf87\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SCRIPTTYPE\" styleID=\"16\" fgColor=\"D92B10\" bgColor=\"CDB38B\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"autoit\" desc=\"autoIt\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"1\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"2\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"4\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"6\" fgColor=\"D92B10\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"7\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"8\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"9\" fgColor=\"106060\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SENT\" styleID=\"10\" fgColor=\"D92B10\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"11\" fgColor=\"870087\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"12\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"EXPAND\" styleID=\"13\" fgColor=\"870087\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type5\" />\r\n            <WordsStyle name=\"COMOBJ\" styleID=\"14\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"bash\" desc=\"bash\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"BCBCBC\" bgColor=\"5F0000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"4\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"5\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"6\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"8\" fgColor=\"106060\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SCALAR\" styleID=\"9\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"PARAM\" styleID=\"10\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"11\" fgColor=\"C00058\" bgColor=\"CDB38B\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE DELIM\" styleID=\"12\" fgColor=\"870087\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE Q\" styleID=\"13\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"batch\" desc=\"Batch\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORDS\" styleID=\"2\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"3\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HIDE SYBOL\" styleID=\"4\" fgColor=\"3b4092\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"5\" fgColor=\"D92B10\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"6\" fgColor=\"106060\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"c\" desc=\"C\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"870087\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPEWORD\" styleID=\"16\" fgColor=\"1E8B47\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"BCBCBC\" bgColor=\"5F0000\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"caml\" desc=\"Caml\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"106060\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGNAME\" styleID=\"2\" fgColor=\"D92B10\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"3\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"BUILIN FUNC &amp; TYPE\" styleID=\"4\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"TYPE\" styleID=\"5\" fgColor=\"3b4092\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"LINENUM\" styleID=\"6\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"8\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"9\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"11\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"13\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"14\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cmake\" desc=\"CMakeFile\" ext=\"cmake\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING D\" styleID=\"2\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING L\" styleID=\"3\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING R\" styleID=\"4\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"5\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"PARAMETER\" styleID=\"6\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"7\" fgColor=\"106060\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"USER DEFINED\" styleID=\"8\" fgColor=\"3b4092\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"WHILEDEF\" styleID=\"9\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FOREACHDEF\" styleID=\"10\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IFDEF\" styleID=\"11\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MACRODEF\" styleID=\"12\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING VARIABLE\" styleID=\"13\" fgColor=\"106060\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"14\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cobol\" desc=\"COBOL\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"870087\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DECLARATION\" styleID=\"5\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"16\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"8\" fgColor=\"3b4092\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"BCBCBC\" bgColor=\"5F0000\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cpp\" desc=\"C++\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"870087\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"1E8B47\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"BCBCBC\" bgColor=\"5F0000\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cs\" desc=\"C#\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"870087\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"1E8B47\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"BCBCBC\" bgColor=\"5F0000\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"css\" desc=\"CSS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS\" styleID=\"2\" fgColor=\"106060\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PSEUDOCLASS\" styleID=\"3\" fgColor=\"D92B10\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"UNKNOWN_PSEUDOCLASS\" styleID=\"4\" fgColor=\"870087\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"5\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"6\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"UNKNOWN_IDENTIFIER\" styleID=\"7\" fgColor=\"BCBCBC\" bgColor=\"5F0000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VALUE\" styleID=\"8\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"ID\" styleID=\"10\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IMPORTANT\" styleID=\"11\" fgColor=\"870087\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"12\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"13\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"14\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"d\" desc=\"D\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"14\" fgColor=\"106060\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"6\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"KEYWORD1\" styleID=\"7\" fgColor=\"3b4092\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\"/>\r\n            <WordsStyle name=\"KEYWORD2\" styleID=\"8\" fgColor=\"3b4092\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\"/>\r\n            <WordsStyle name=\"KEYWORD3\" styleID=\"9\" fgColor=\"3b4092\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\"/>\r\n            <WordsStyle name=\"KEYWORD4\" styleID=\"20\" fgColor=\"3b4092\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\"/>\r\n            <WordsStyle name=\"KEYWORD5\" styleID=\"21\" fgColor=\"3b4092\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\"/>\r\n            <WordsStyle name=\"KEYWORD6\" styleID=\"22\" fgColor=\"3b4092\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type5\"/>\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"10\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"12\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"13\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT NESTED\" styleID=\"4\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"16\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"17\" fgColor=\"BCBCBC\" bgColor=\"5F0000\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n         </LexerType>\r\n        <LexerType name=\"diff\" desc=\"DIFF\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"2\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HEADER\" styleID=\"3\" fgColor=\"106060\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"POSITION\" styleID=\"4\" fgColor=\"D92B10\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DELETED\" styleID=\"5\" fgColor=\"3b4092\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"ADDED\" styleID=\"6\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"fortran\" desc=\"Fortran\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"4\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"5\" fgColor=\"870087\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"106060\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"8\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION1\" styleID=\"9\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"FUNCTION2\" styleID=\"10\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"11\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR2\" styleID=\"12\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"13\" fgColor=\"D92B10\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CONTINUATION\" styleID=\"14\" fgColor=\"5F0000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"gui4cli\" desc=\"GUI4CLI\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"1\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"2\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"5\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"EVENT\" styleID=\"5\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"16\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"CONTROL\" styleID=\"16\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"16\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"haskell\" desc=\"Haskell\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"106060\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"2\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"5\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS\" styleID=\"6\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MODULE\" styleID=\"7\" fgColor=\"D92B10\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CAPITAL\" styleID=\"8\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATA\" styleID=\"9\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IMPORT\" styleID=\"10\" fgColor=\"870087\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"11\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTANCE\" styleID=\"12\" fgColor=\"3b4092\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"13\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK\" styleID=\"14\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK2\" styleID=\"15\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK3\" styleID=\"16\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"html\" desc=\"HTML\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"BCBCBC\" bgColor=\"5F0000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"6\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"7\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGEND\" styleID=\"11\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGUNKNOWN\" styleID=\"2\" fgColor=\"BCBCBC\" bgColor=\"5F0000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"3\" fgColor=\"1E8B47\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTEUNKNOWN\" styleID=\"4\" fgColor=\"BCBCBC\" bgColor=\"5F0000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SGMLDEFAULT\" styleID=\"21\" fgColor=\"000000\" bgColor=\"AFAF87\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CDATA\" styleID=\"17\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VALUE\" styleID=\"19\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ENTITY\" styleID=\"10\" fgColor=\"3b4092\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"ini\" desc=\"ini file\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"2\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASSIGNMENT\" styleID=\"3\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFVAL\" styleID=\"4\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"inno\" desc=\"InnoSetup\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"2\" fgColor=\"D92B10\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"PARAMETER\" styleID=\"3\" fgColor=\"3b4092\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"4\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR INLINE\" styleID=\"6\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT PASCAL\" styleID=\"7\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD PASCAL\" styleID=\"8\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"KEYWORD USER\" styleID=\"9\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"STRING DOUBLE\" styleID=\"10\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING SINGLE\" styleID=\"11\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"12\" fgColor=\"106060\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"java\" desc=\"Java\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"870087\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"1E8B47\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"BCBCBC\" bgColor=\"5F0000\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"javascript\" desc=\"Javascript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"41\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"45\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"46\" fgColor=\"106060\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"47\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"48\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"49\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOLS\" styleID=\"50\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"51\" fgColor=\"870087\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"52\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"42\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"43\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTDOC\" styleID=\"44\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"3\" fontSize=\"\">param @projectDescription projectDescription @param</WordsStyle>\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"BCBCBC\" bgColor=\"5F0000\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"kix\" desc=\"KiXtart\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"31\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"2\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"3\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VAR\" styleID=\"5\" fgColor=\"106060\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"6\" fgColor=\"D92B10\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"7\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"8\" fgColor=\"3b4092\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"9\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"lisp\" desc=\"LISP\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION WORD\" styleID=\"3\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION WORD2\" styleID=\"4\" fgColor=\"3b4092\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"5\" fgColor=\"106060\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"8\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"9\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"11\" fgColor=\"106060\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"lua\" desc=\"Lua\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"LITERALSTRING\" styleID=\"8\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"870087\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNC1\" styleID=\"13\" fgColor=\"D92B10\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"FUNC2\" styleID=\"14\" fgColor=\"106060\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"FUNC3\" styleID=\"15\" fgColor=\"3b4092\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n        </LexerType>\r\n        <LexerType name=\"makefile\" desc=\"Makefile\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"2\" fgColor=\"D92B10\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"3\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"4\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"TARGET\" styleID=\"5\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDEOL\" styleID=\"9\" fgColor=\"D92B10\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"matlab\" desc=\"Matlab\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"2\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"4\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"5\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"106060\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLE QUOTE STRING\" styleID=\"8\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n\t\t<LexerType name=\"nfo\" desc=\"Dos Style\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"32\" fgColor=\"000000\" bgColor=\"BA9C80\" fontSize=\"\" fontStyle=\"0\" />\r\n        </LexerType>\r\n        <LexerType name=\"nsis\" desc=\"NSIS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING DOUBLE QUOTE\" styleID=\"2\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING LEFT QUOTE\" styleID=\"3\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING RIGHT QUOTE\" styleID=\"4\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"5\" fgColor=\"D92B10\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"6\" fgColor=\"106060\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"7\" fgColor=\"3b4092\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"USER DEFINED\" styleID=\"8\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"9\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SUBSECTION\" styleID=\"10\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IF DEFINE\" styleID=\"11\" fgColor=\"870087\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"12\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING VAR\" styleID=\"13\" fgColor=\"106060\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"14\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SECTION GROUP\" styleID=\"15\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAGE EX\" styleID=\"16\" fgColor=\"870087\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION DEFINITIONS\" styleID=\"17\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"18\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"objc\" desc=\"Objective-C\" ext=\"\">\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"19\" fgColor=\"D92B10\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"QUALIFIER\" styleID=\"20\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"870087\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"1E8B47\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"BCBCBC\" bgColor=\"5F0000\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"pascal\" desc=\"Pascal\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"2\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"3\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"4\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"870087\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR2\" styleID=\"6\" fgColor=\"870087\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"7\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HEX NUMBER\" styleID=\"8\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"9\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"10\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"12\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"13\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASM\" styleID=\"14\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"perl\" desc=\"Perl\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"870087\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"17\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGSUBST\" styleID=\"18\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SCALAR\" styleID=\"12\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ARRAY\" styleID=\"13\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HASH\" styleID=\"14\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL TABLE\" styleID=\"15\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PUNCTUATION\" styleID=\"8\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"POD\" styleID=\"3\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"POD VERB\" styleID=\"31\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"BCBCBC\" bgColor=\"5F0000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"LONGQUOTE\" styleID=\"19\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATASECTION\" styleID=\"21\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"20\" fgColor=\"C00058\" bgColor=\"CDB38B\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE DELIM\" styleID=\"22\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE Q\" styleID=\"23\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE QQ\" styleID=\"24\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE QX\" styleID=\"25\" fgColor=\"C00058\" bgColor=\"CDB38B\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING Q\" styleID=\"26\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING QQ\" styleID=\"27\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING QX\" styleID=\"28\" fgColor=\"C00058\" bgColor=\"CDB38B\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING QR\" styleID=\"29\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING QW\" styleID=\"30\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FORMAT IDENT\" styleID=\"41\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FORMAT\" styleID=\"42\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n       </LexerType>\r\n        <LexerType name=\"php\" desc=\"php\" ext=\"\">\r\n            <WordsStyle name=\"QUESTION MARK\" styleID=\"18\" fgColor=\"870087\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"118\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"119\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING VARIABLE\" styleID=\"126\" fgColor=\"106060\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SIMPLESTRING\" styleID=\"120\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"121\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"122\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"123\" fgColor=\"106060\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"124\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"125\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"127\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"postscript\" desc=\"Postscript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"DSC COMMENT\" styleID=\"2\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"DSC VALUE\" styleID=\"3\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Name\" styleID=\"5\" fgColor=\"106060\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"6\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"LITERAL\" styleID=\"7\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IMMEVAL\" styleID=\"8\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAREN ARRAY\" styleID=\"9\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAREN DICT\" styleID=\"10\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAREN PROC\" styleID=\"11\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"12\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HEX STRING\" styleID=\"13\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BASE85 STRING\" styleID=\"14\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BAD STRING CHAR\" styleID=\"15\" fgColor=\"BCBCBC\" bgColor=\"5F0000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"powershell\" desc=\"PowerShell\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"2\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"3\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"5\" fgColor=\"106060\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"8\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"CMDLET\" styleID=\"9\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"ALIAS\" styleID=\"10\" fgColor=\"D92B10\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n        </LexerType>\r\n        <LexerType name=\"props\" desc=\"Properties file\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"2\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASSIGNMENT\" styleID=\"3\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFVAL\" styleID=\"4\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"python\" desc=\"Python\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"4\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORDS\" styleID=\"5\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TRIPLE\" styleID=\"6\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TRIPLEDOUBLE\" styleID=\"7\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASSNAME\" styleID=\"8\" fgColor=\"D92B10\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFNAME\" styleID=\"9\" fgColor=\"D92B10\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"106060\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK\" styleID=\"12\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"12\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"r\" desc=\"R\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"2\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"BASE WORD\" styleID=\"3\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"4\" fgColor=\"106060\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"7\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"8\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"INFIX\" styleID=\"10\" fgColor=\"D92B10\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"rc\" desc=\"RC\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"870087\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"D92B10\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"BCBCBC\" bgColor=\"5F0000\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"ruby\" desc=\"Ruby\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"870087\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"2\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"POD\" styleID=\"3\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"5\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS NAME\" styleID=\"8\" fgColor=\"106060\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEF NAME\" styleID=\"9\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"106060\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"12\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"13\" fgColor=\"106060\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"14\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MODULE NAME\" styleID=\"15\" fgColor=\"D92B10\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTANCE VAR\" styleID=\"16\" fgColor=\"106060\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS VAR\" styleID=\"17\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"18\" fgColor=\"C00058\" bgColor=\"CDB38B\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATA SECTION\" styleID=\"19\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING Q\" styleID=\"24\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BOOLEAN\" styleID=\"25\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n        </LexerType>\r\n        <LexerType name=\"scheme\" desc=\"Scheme\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION WORD\" styleID=\"3\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION WORD2\" styleID=\"4\" fgColor=\"3b4092\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"5\" fgColor=\"106060\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"9\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"11\" fgColor=\"106060\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"searchResult\" desc=\"Search result\" ext=\"\">\r\n            <WordsStyle name=\"Default\" styleID=\"0\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Search Header\" styleID=\"1\" fgColor=\"106060\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"File Header\" styleID=\"2\" fgColor=\"3B4092\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Line Number\" styleID=\"3\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Hit Word\" styleID=\"4\" fgColor=\"D92B10\" bgColor=\"AFAF87\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Selected Line\" styleID=\"5\" fgColor=\"000000\" bgColor=\"BCBCBC\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Current line background colour\" styleID=\"6\" bgColor=\"B39674\" />\r\n        </LexerType>\r\n        <LexerType name=\"smalltalk\" desc=\"Smalltalk\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"1\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"3\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"4\" fgColor=\"106060\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BINARY\" styleID=\"5\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BOOL\" styleID=\"6\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SELF\" styleID=\"7\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SUPER\" styleID=\"8\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NIL\" styleID=\"9\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"10\" fgColor=\"D92B10\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"RETURN\" styleID=\"11\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"12\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KWS END\" styleID=\"13\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASSIGN\" styleID=\"14\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"15\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SPECIAL SELECTOR\" styleID=\"16\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"sql\" desc=\"SQL\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"5\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"106060\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"7\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n\t\t</LexerType>\r\n        <LexerType name=\"tcl\" desc=\"TCL\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MODIFIER\" styleID=\"10\" fgColor=\"D92B10\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"EXPAND\" styleID=\"11\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"12\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"13\" fgColor=\"3b4092\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SUB BRACE\" styleID=\"9\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SUBSTITUTION\" styleID=\"8\" fgColor=\"3b4092\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"106060\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD IN QUOTE\" styleID=\"4\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IN QUOTE\" styleID=\"5\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT BOX\" styleID=\"17\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"BLOCK COMMENT\" styleID=\"18\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"tex\" desc=\"TeX\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"1\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"GROUP\" styleID=\"2\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"3\" fgColor=\"106060\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"4\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"5\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"vb\" desc=\"VB / VBS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"7\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"3\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"870087\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATE\" styleID=\"8\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"verilog\" desc=\"Verilog\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"106060\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGNAME\" styleID=\"2\" fgColor=\"D92B10\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"7\" fgColor=\"3b4092\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"870087\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE BANG\" styleID=\"3\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"12\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"USER\" styleID=\"19\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"vhdl\" desc=\"VHDL\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LIne\" styleID=\"2\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"5\" fgColor=\"010101\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"6\" fgColor=\"106060\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"7\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"8\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STD OPERATOR\" styleID=\"9\" fgColor=\"D92B10\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"10\" fgColor=\"3b4092\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"9\" fgColor=\"870087\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DIRECTIVE OPERAND\" styleID=\"10\" fgColor=\"870087\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STD FUNCTION\" styleID=\"11\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"STD PACKAGE\" styleID=\"12\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"STD TYPE\" styleID=\"13\" fgColor=\"D92B10\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"USER DEFINE\" styleID=\"14\" fgColor=\"106060\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type5\" />\r\n        </LexerType>\r\n        <LexerType name=\"xml\" desc=\"XML\" ext=\"\">\r\n            <WordsStyle name=\"XMLSTART\" styleID=\"12\" fgColor=\"870087\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"XMLEND\" styleID=\"13\" fgColor=\"870087\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"BCBCBC\" bgColor=\"5F0000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"6\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"7\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"106060\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGEND\" styleID=\"11\" fgColor=\"106060\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGUNKNOWN\" styleID=\"2\" fgColor=\"BCBCBC\" bgColor=\"5F0000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"3\" fgColor=\"1E8B47\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTEUNKNOWN\" styleID=\"4\" fgColor=\"BCBCBC\" bgColor=\"5F0000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SGMLDEFAULT\" styleID=\"21\" fgColor=\"000000\" bgColor=\"AFAF87\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CDATA\" styleID=\"17\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"yaml\" desc=\"YAML\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"2\" fgColor=\"106060\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"3\" fgColor=\"804040\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REFERENCE\" styleID=\"5\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOCUMENT\" styleID=\"6\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"7\" fgColor=\"C00058\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"8\" fgColor=\"BCBCBC\" bgColor=\"5F0000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n    </LexerStyles>\r\n    <GlobalStyles>\r\n        <!-- Attention : Don't modify the name of styleID=\"0\" -->\r\n        <WidgetStyle name=\"Global override\" styleID=\"0\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"Consolas\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Default Style\" styleID=\"32\" fgColor=\"000000\" bgColor=\"BA9C80\" fontName=\"Consolas\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Indent guideline style\" styleID=\"37\" fgColor=\"181880\" bgColor=\"BA9C80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Brace highlight style\" styleID=\"34\" fgColor=\"000000\" bgColor=\"00FFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Bad brace colour\" styleID=\"35\" fgColor=\"BCBCBC\" bgColor=\"5F0000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Current line background colour\" styleID=\"0\" bgColor=\"B39674\" />\r\n        <WidgetStyle name=\"Selected text colour\" styleID=\"0\" bgColor=\"BCBCBC\" />\r\n        <WidgetStyle name=\"Caret colour\" styleID=\"2069\" fgColor=\"FFFFFF\" />\r\n        <WidgetStyle name=\"Edge colour\" styleID=\"0\" fgColor=\"181880\" />\r\n        <WidgetStyle name=\"Line number margin\" styleID=\"33\" fgColor=\"000000\" bgColor=\"808080\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Fold\" styleID=\"0\" fgColor=\"000000\" bgColor=\"808080\" />\r\n        <WidgetStyle name=\"Fold active\" styleID=\"0\" fgColor=\"FF0000\" />\r\n        <WidgetStyle name=\"Fold margin\" styleID=\"0\" fgColor=\"808080\" bgColor=\"808080\" />\r\n        <WidgetStyle name=\"White space symbol\" styleID=\"0\" fgColor=\"106060\" />\r\n        <WidgetStyle name=\"Smart HighLighting\" styleID=\"29\" bgColor=\"BCBCBC\" />\r\n        <WidgetStyle name=\"Find Mark Style\" styleID=\"31\" bgColor=\"3b4092\" />\r\n        <WidgetStyle name=\"Mark Style 1\" styleID=\"25\" bgColor=\"870087\" />\r\n        <WidgetStyle name=\"Mark Style 2\" styleID=\"24\" bgColor=\"C00058\" />\r\n        <WidgetStyle name=\"Mark Style 3\" styleID=\"23\" bgColor=\"181880\" />\r\n        <WidgetStyle name=\"Mark Style 4\" styleID=\"22\" bgColor=\"804040\" />\r\n        <WidgetStyle name=\"Mark Style 5\" styleID=\"21\" bgColor=\"106060\" />\r\n        <WidgetStyle name=\"Incremental highlight all\" styleID=\"28\" bgColor=\"BA9C80\" />\r\n        <WidgetStyle name=\"Tags match highlighting\" styleID=\"27\" bgColor=\"D92B10\" />\r\n        <WidgetStyle name=\"Tags attribute\" styleID=\"26\" bgColor=\"D92B10\" />\r\n        <WidgetStyle name=\"Active tab focused indicator\" styleID=\"0\" fgColor=\"D92B10\" />\r\n        <WidgetStyle name=\"Active tab unfocused indicator\" styleID=\"0\" fgColor=\"BA9C80\" />\r\n        <WidgetStyle name=\"Active tab text\" styleID=\"0\" fgColor=\"000000\" />\r\n        <WidgetStyle name=\"Inactive tabs\" styleID=\"0\" fgColor=\"181880\" bgColor=\"BA9C80\" />\r\n    </GlobalStyles>\r\n</NotepadPlus>"
  },
  {
    "path": "gui/themes/NotepadPlusPlus.xml",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\" ?>\r\n<NotepadPlus>\r\n    <LexerStyles>\r\n        <LexerType name=\"actionscript\" desc=\"ActionScript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"20\" fgColor=\"95004A\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"804000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"8000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"000080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"008080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"008080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"008080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"008080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"ada\" desc=\"ADA\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"1\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"2\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"FF8000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DELIMITER\" styleID=\"4\" fgColor=\"FF8080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"5\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"7\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"9\" fgColor=\"804000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"10\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ILLEGAL\" styleID=\"11\" fgColor=\"FF0000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"asp\" desc=\"asp\" ext=\"asp\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"81\" fgColor=\"8000FF\" bgColor=\"C4F9FD\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"82\" fgColor=\"008000\" bgColor=\"C4F9FD\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"83\" fgColor=\"FF0000\" bgColor=\"C4F9FD\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"84\" fgColor=\"000080\" bgColor=\"C4F9FD\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"85\" fgColor=\"808080\" bgColor=\"C4F9FD\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"86\" fgColor=\"000000\" bgColor=\"C4F9FD\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASPSYBOL\" styleID=\"15\" fgColor=\"000000\" bgColor=\"FFFF00\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SCRIPTTYPE\" styleID=\"16\" fgColor=\"000000\" bgColor=\"FFC000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"asm\" desc=\"Assembly\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FF8000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"4\" fgColor=\"000080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"5\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CPU INSTRUCTION\" styleID=\"6\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"MATH INSTRUCTION\" styleID=\"7\" fgColor=\"0080C0\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"REGISTER\" styleID=\"8\" fgColor=\"8080FF\" bgColor=\"FFFFCC\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"9\" fgColor=\"0080FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"DIRECTIVE OPERAND\" styleID=\"10\" fgColor=\"000080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"COMMENT BLOCK\" styleID=\"11\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"12\" fgColor=\"808000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"EXT INSTRUCTION\" styleID=\"14\" fgColor=\"804000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type4\" />\r\n        </LexerType>\r\n        <LexerType name=\"autoit\" desc=\"autoIt\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"2\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"FF8000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"4\" fgColor=\"8000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"6\" fgColor=\"8000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"7\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"8\" fgColor=\"000080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"9\" fgColor=\"FF0080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"SENT\" styleID=\"10\" fgColor=\"8080C0\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"11\" fgColor=\"804000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"12\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"EXPAND\" styleID=\"13\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type5\" />\r\n            <WordsStyle name=\"COMOBJ\" styleID=\"14\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"bash\" desc=\"bash\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"FFFFFF\" bgColor=\"FF0000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"4\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"FF0000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"5\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"6\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"804000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"8\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SCALAR\" styleID=\"9\" fgColor=\"FF8040\" bgColor=\"FFFFD9\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PARAM\" styleID=\"10\" fgColor=\"008080\" bgColor=\"00FFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"11\" fgColor=\"804040\" bgColor=\"E1FFF3\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE DELIM\" styleID=\"12\" fgColor=\"0000FF\" bgColor=\"FF0000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE Q\" styleID=\"13\" fgColor=\"FF0000\" bgColor=\"0000FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"batch\" desc=\"Batch\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORDS\" styleID=\"2\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"3\" fgColor=\"FF0000\" bgColor=\"FFFF80\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"HIDE SYBOL\" styleID=\"4\" fgColor=\"FF00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"5\" fgColor=\"0080FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"6\" fgColor=\"FF8000\" bgColor=\"FCFFF0\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"FF0000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"c\" desc=\"C\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"804000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"8000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"000080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"008080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"008080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"008080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"008080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cpp\" desc=\"C++\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"804000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"8000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"000080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"008080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"008080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"008080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"008080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cs\" desc=\"C#\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"804000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"8000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"000080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"008080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"008080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"008080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"008080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"caml\" desc=\"Caml\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGNAME\" styleID=\"2\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"3\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"BUILIN FUNC &amp; TYPE\" styleID=\"4\" fgColor=\"8000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"TYPE\" styleID=\"5\" fgColor=\"8000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"LINENUM\" styleID=\"6\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"000080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"8\" fgColor=\"FF8000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"9\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"11\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"13\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"14\" fgColor=\"008080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"008080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cmake\" desc=\"CMakeFile\" ext=\"cmake\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING D\" styleID=\"2\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING L\" styleID=\"3\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING R\" styleID=\"4\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"4\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"PARAMETER\" styleID=\"6\" fgColor=\"8000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"7\" fgColor=\"FF8040\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"USER DEFINED\" styleID=\"8\" fgColor=\"000080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"WHILEDEF\" styleID=\"9\" fgColor=\"0080FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"FOREACHDEF\" styleID=\"10\" fgColor=\"008080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IFDEF\" styleID=\"11\" fgColor=\"8000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"MACRODEF\" styleID=\"12\" fgColor=\"FF0000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING VARIABLE\" styleID=\"13\" fgColor=\"808080\" bgColor=\"FEFCF5\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"14\" fgColor=\"804040\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"css\" desc=\"CSS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"Batang\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS\" styleID=\"2\" fgColor=\"FF0000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PSEUDOCLASS\" styleID=\"3\" fgColor=\"FF8000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"UNKNOWN_PSEUDOCLASS\" styleID=\"4\" fgColor=\"FF8080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"5\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"6\" fgColor=\"8080C0\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"UNKNOWN_IDENTIFIER\" styleID=\"7\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VALUE\" styleID=\"8\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ID\" styleID=\"10\" fgColor=\"0080FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IMPORTANT\" styleID=\"11\" fgColor=\"FF0000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"12\" fgColor=\"0080FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cobol\" desc=\"COBOL\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"804000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DECLARATION\" styleID=\"5\" fgColor=\"8000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"16\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"8\" fgColor=\"0080FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"000080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"008080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"008080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"008080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"008080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"d\" desc=\"D\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"14\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"6\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"KEWORD1\" styleID=\"7\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\"/>\r\n            <WordsStyle name=\"KEWORD2\" styleID=\"8\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\"/>\r\n            <WordsStyle name=\"KEWORD3\" styleID=\"9\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\"/>\r\n            <WordsStyle name=\"KEWORD4\" styleID=\"20\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\"/>\r\n            <WordsStyle name=\"KEWORD5\" styleID=\"21\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\"/>\r\n            <WordsStyle name=\"KEWORD6\" styleID=\"22\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type5\"/>\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"FF8000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"10\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"12\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"13\" fgColor=\"000080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"008080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT NESTED\" styleID=\"4\" fgColor=\"008080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"008080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"16\" fgColor=\"008080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"17\" fgColor=\"008080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"diff\" desc=\"DIFF\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"2\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"HEADER\" styleID=\"3\" fgColor=\"8000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"POSITION\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DELETED\" styleID=\"5\" fgColor=\"808040\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ADDED\" styleID=\"6\" fgColor=\"0080FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"gui4cli\" desc=\"GUI4CLI\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"2\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"EVENT\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"16\" fgColor=\"8000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"CONTROL\" styleID=\"16\" fgColor=\"8000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"16\" fgColor=\"8000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"000080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"nfo\" desc=\"Dos Style\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"32\" fgColor=\"2E2E2E\" bgColor=\"FFFFFF\" />\r\n        </LexerType>\r\n        <LexerType name=\"fortran\" desc=\"Fortran\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FF8000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"4\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"000080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"8\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION1\" styleID=\"9\" fgColor=\"8000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"FUNCTION2\" styleID=\"10\" fgColor=\"0080C0\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"11\" fgColor=\"800000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR2\" styleID=\"12\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"FF80FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"CONTINUATION\" styleID=\"14\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"haskell\" desc=\"Haskell\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"2\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"800080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"CA6500\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"5\" fgColor=\"CA6500\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS\" styleID=\"6\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"MODULE\" styleID=\"7\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CAPITAL\" styleID=\"8\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATA\" styleID=\"9\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IMPORT\" styleID=\"10\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"11\" fgColor=\"000080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTANCE\" styleID=\"12\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"13\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK\" styleID=\"14\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK2\" styleID=\"15\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK3\" styleID=\"16\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"html\" desc=\"HTML\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"FF0000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"6\" fgColor=\"8000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"7\" fgColor=\"8000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGEND\" styleID=\"11\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGUNKNOWN\" styleID=\"2\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"3\" fgColor=\"FF0000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTEUNKNOWN\" styleID=\"4\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SGMLDEFAULT\" styleID=\"21\" fgColor=\"000000\" bgColor=\"A6CAF0\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CDATA\" styleID=\"17\" fgColor=\"FF8000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VALUE\" styleID=\"19\" fgColor=\"FF8000\" bgColor=\"FEFDE0\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ENTITY\" styleID=\"10\" fgColor=\"000000\" bgColor=\"FEFDE0\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"ini\" desc=\"ini file\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"2\" fgColor=\"8000FF\" bgColor=\"F2F4FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASSIGNMENT\" styleID=\"3\" fgColor=\"FF0000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFVAL\" styleID=\"4\" fgColor=\"FF0000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"inno\" desc=\"InnoSetup\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"2\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"PARAMETER\" styleID=\"3\" fgColor=\"FF8000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"4\" fgColor=\"000080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"800000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR INLINE\" styleID=\"6\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT PASCAL\" styleID=\"7\" fgColor=\"008080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD PASCAL\" styleID=\"8\" fgColor=\"0080C0\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"KEYWORD USER\" styleID=\"9\" fgColor=\"8080FF\" bgColor=\"FFFFCC\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"STRING DOUBLE\" styleID=\"10\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING SINGLE\" styleID=\"11\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"12\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"java\" desc=\"Java\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"804000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"8000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"000080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"008080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"008080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"008080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"008080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"javascript\" desc=\"Javascript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"41\" fgColor=\"000000\" bgColor=\"F2F4FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"45\" fgColor=\"FF0000\" bgColor=\"F2F4FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"46\" fgColor=\"000000\" bgColor=\"F2F4FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"47\" fgColor=\"000080\" bgColor=\"F2F4FF\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"48\" fgColor=\"808080\" bgColor=\"F2F4FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"49\" fgColor=\"808080\" bgColor=\"F2F4FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOLS\" styleID=\"50\" fgColor=\"000000\" bgColor=\"F2F4FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"52\" fgColor=\"8000FF\" bgColor=\"F2F4FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"42\" fgColor=\"008000\" bgColor=\"F2F4FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"43\" fgColor=\"008000\" bgColor=\"F2F4FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTDOC\" styleID=\"44\" fgColor=\"008080\" bgColor=\"F2F4FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"kix\" desc=\"KiXtart\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"31\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"2\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"3\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VAR\" styleID=\"5\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"6\" fgColor=\"8000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"7\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"8\" fgColor=\"8000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"9\" fgColor=\"000080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"lisp\" desc=\"LISP\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FF8000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION WORD\" styleID=\"3\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION WORD2\" styleID=\"4\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"5\" fgColor=\"000080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"9\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"0080C0\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"11\" fgColor=\"800000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"lua\" desc=\"Lua\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"008080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"LITERALSTRING\" styleID=\"8\" fgColor=\"95004A\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"804000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"000080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNC1\" styleID=\"13\" fgColor=\"0080C0\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"FUNC2\" styleID=\"14\" fgColor=\"8000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"FUNC3\" styleID=\"15\" fgColor=\"0000A0\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" keywordClass=\"type2\" />\r\n        </LexerType>\r\n        <LexerType name=\"makefile\" desc=\"Makefile\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"2\" fgColor=\"FFFF00\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"3\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"4\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"TARGET\" styleID=\"5\" fgColor=\"FF0000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDEOL\" styleID=\"9\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"matlab\" desc=\"Matlab\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"2\" fgColor=\"8000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"FF8000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"4\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"5\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"000080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLE QUOTE STRING\" styleID=\"8\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"nsis\" desc=\"NSIS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING DOUBLE QUOTE\" styleID=\"2\" fgColor=\"808080\" bgColor=\"EEEEEE\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING LEFT QUOTE\" styleID=\"3\" fgColor=\"FFFF80\" bgColor=\"C0C0C0\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING RIGHT QUOTE\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"C0C0C0\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"6\" fgColor=\"FF8000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"7\" fgColor=\"FF0000\" bgColor=\"FFFF80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"USER DEFINED\" styleID=\"8\" fgColor=\"FDFFEC\" bgColor=\"FF80FF\" fontName=\"\" fontStyle=\"4\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"9\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SUBSECTION\" styleID=\"10\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IF DEFINE\" styleID=\"11\" fgColor=\"808040\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"12\" fgColor=\"800000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING VAR\" styleID=\"13\" fgColor=\"FF8000\" bgColor=\"EFEFEF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"14\" fgColor=\"FF0000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SECTION GROUP\" styleID=\"15\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAGE EX\" styleID=\"16\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION DEFINITIONS\" styleID=\"17\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"18\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"objc\" desc=\"Objective-C\" ext=\"\">\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"19\" fgColor=\"A001D6\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"QUALIFIER\" styleID=\"20\" fgColor=\"95004A\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"804000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"8000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"000080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"008080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"008080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"008080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"008080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"pascal\" desc=\"Pascal\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"2\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"3\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"4\" fgColor=\"008080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"804000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR2\" styleID=\"6\" fgColor=\"804000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"7\" fgColor=\"FF8000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HEX NUMBER\" styleID=\"8\" fgColor=\"FF8000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"9\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"10\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"12\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"13\" fgColor=\"000080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASM\" styleID=\"14\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"perl\" desc=\"Perl\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"804000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FF0000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF0000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"000080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"17\" fgColor=\"8080FF\" bgColor=\"F8FEDE\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SCALAR\" styleID=\"12\" fgColor=\"FF8000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ARRAY\" styleID=\"13\" fgColor=\"CF34CF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HASH\" styleID=\"14\" fgColor=\"8080C0\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL TABLE\" styleID=\"15\" fgColor=\"FF0000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"PUNCTUATION\" styleID=\"8\" fgColor=\"804000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"POD\" styleID=\"3\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"FF80C0\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"LONGQUOTE\" styleID=\"19\" fgColor=\"FF8000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATASECTION\" styleID=\"21\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGSUBST\" styleID=\"18\" fgColor=\"8080C0\" bgColor=\"FFEEEC\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"20\" fgColor=\"FFFF00\" bgColor=\"808080\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"php\" desc=\"php\" ext=\"\">\r\n            <WordsStyle name=\"QUESTION MARK\" styleID=\"18\" fgColor=\"FF0000\" bgColor=\"FDF8E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"118\" fgColor=\"000000\" bgColor=\"FEFCF5\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"119\" fgColor=\"808080\" bgColor=\"FEFCF5\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING VARIABLE\" styleID=\"126\" fgColor=\"808080\" bgColor=\"FEFCF5\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SIMPLESTRING\" styleID=\"120\" fgColor=\"808080\" bgColor=\"FEFCF5\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"121\" fgColor=\"0000FF\" bgColor=\"FEFCF5\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"122\" fgColor=\"FF8000\" bgColor=\"FEFCF5\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"123\" fgColor=\"000080\" bgColor=\"FEFCF5\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"124\" fgColor=\"008000\" bgColor=\"FEFCF5\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"125\" fgColor=\"008000\" bgColor=\"FEFCF5\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"127\" fgColor=\"8000FF\" bgColor=\"FEFCF5\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"postscript\" desc=\"Postscript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DSC COMMENT\" styleID=\"2\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DSC VALUE\" styleID=\"3\" fgColor=\"FF0000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Name\" styleID=\"5\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"6\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"LITERAL\" styleID=\"7\" fgColor=\"0080C0\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IMMEVAL\" styleID=\"8\" fgColor=\"000080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAREN ARRAY\" styleID=\"9\" fgColor=\"FF00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAREN DICT\" styleID=\"10\" fgColor=\"0080FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAREN PROC\" styleID=\"11\" fgColor=\"000080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"12\" fgColor=\"808000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HEX STRING\" styleID=\"13\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BASE85 STRING\" styleID=\"14\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BAD STRING CHAR\" styleID=\"15\" fgColor=\"804000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"powershell\" desc=\"PowerShell\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"2\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"3\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"5\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"000080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"8\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"CMDLET\" styleID=\"9\" fgColor=\"8000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"ALIAS\" styleID=\"10\" fgColor=\"0080FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n        </LexerType>\r\n        <LexerType name=\"props\" desc=\"Properties file\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"2\" fgColor=\"8000FF\" bgColor=\"F2F4FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASSIGNMENT\" styleID=\"3\" fgColor=\"FF0000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFVAL\" styleID=\"4\" fgColor=\"FF0000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"python\" desc=\"Python\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FF0000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"4\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORDS\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TRIPLE\" styleID=\"6\" fgColor=\"FF8000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TRIPLEDOUBLE\" styleID=\"7\" fgColor=\"FF8000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASSNAME\" styleID=\"8\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFNAME\" styleID=\"9\" fgColor=\"FF00FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"000080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK\" styleID=\"12\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"r\" desc=\"R\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"2\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"BASE WORD\" styleID=\"3\" fgColor=\"8000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"4\" fgColor=\"0080FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"FF8000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"7\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"8\" fgColor=\"000080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"INFIX\" styleID=\"10\" fgColor=\"804000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"rc\" desc=\"RC\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"804000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"8000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"000080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"008080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"008080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"008080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"008080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"ruby\" desc=\"Ruby\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"2\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"POD\" styleID=\"3\" fgColor=\"004000\" bgColor=\"C0FFC0\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"808000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS NAME\" styleID=\"8\" fgColor=\"0080C0\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEF NAME\" styleID=\"9\" fgColor=\"8080FF\" bgColor=\"FFFFCC\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"000080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"12\" fgColor=\"0080FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"13\" fgColor=\"000080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"14\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MODULE NAME\" styleID=\"15\" fgColor=\"804000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTANCE VAR\" styleID=\"16\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS VAR\" styleID=\"17\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"18\" fgColor=\"FFFF00\" bgColor=\"A08080\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATA SECTION\" styleID=\"19\" fgColor=\"600000\" bgColor=\"FFF0D8\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING Q\" styleID=\"24\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"scheme\" desc=\"Scheme\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FF8000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION WORD\" styleID=\"3\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION WORD2\" styleID=\"4\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"5\" fgColor=\"000080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"9\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"0080C0\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"11\" fgColor=\"800000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"smalltalk\" desc=\"Smalltalk\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"1\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FF8000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"3\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"4\" fgColor=\"408080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"BINARY\" styleID=\"5\" fgColor=\"000080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BOOL\" styleID=\"6\" fgColor=\"8000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SELF\" styleID=\"7\" fgColor=\"8080FF\" bgColor=\"FFFFCC\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SUPER\" styleID=\"8\" fgColor=\"0080FF\" bgColor=\"ECFFEA\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"NIL\" styleID=\"9\" fgColor=\"8080C0\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"10\" fgColor=\"800000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"RETURN\" styleID=\"11\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"12\" fgColor=\"808000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KWS END\" styleID=\"13\" fgColor=\"0080FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASSIGN\" styleID=\"14\" fgColor=\"FF0000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"15\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SPECIAL SELECTOR\" styleID=\"16\" fgColor=\"FF80C0\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"sql\" desc=\"SQL\" ext=\"\">\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"7\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"000080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"tcl\" desc=\"TCL\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MODIFIER\" styleID=\"10\" fgColor=\"804000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"EXPAND\" styleID=\"11\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"12\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"13\" fgColor=\"8000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"FF8000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SUB BRACE\" styleID=\"9\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SUBSTITUTION\" styleID=\"8\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"000080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD IN QUOTE\" styleID=\"4\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IN QUOTE\" styleID=\"5\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT BOX\" styleID=\"17\" fgColor=\"008080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"BLOCK COMMENT\" styleID=\"18\" fgColor=\"008080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"tex\" desc=\"TeX\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"1\" fgColor=\"FF8000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"GROUP\" styleID=\"2\" fgColor=\"8000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"3\" fgColor=\"800000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"4\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"5\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"vb\" desc=\"VB / VBS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"7\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FF0000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"3\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"FF0000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATE\" styleID=\"8\" fgColor=\"00FF00\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"verilog\" desc=\"Verilog\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGNAME\" styleID=\"2\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"7\" fgColor=\"8000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"000080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"804000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE BANG\" styleID=\"3\" fgColor=\"008080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"USER\" styleID=\"19\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"vhdl\" desc=\"VHDL\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LIne\" styleID=\"2\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"FF8000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"5\" fgColor=\"000080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"6\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"8\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STD OPERATOR\" styleID=\"9\" fgColor=\"0080C0\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"10\" fgColor=\"8080FF\" bgColor=\"FFFFCC\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"9\" fgColor=\"808000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DIRECTIVE OPERAND\" styleID=\"10\" fgColor=\"000080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"STD FUNCTION\" styleID=\"11\" fgColor=\"0080FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"STD PACKAGE\" styleID=\"12\" fgColor=\"800000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"STD TYPE\" styleID=\"13\" fgColor=\"8000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"USER DEFINE\" styleID=\"14\" fgColor=\"B5E71F\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type5\" />\r\n        </LexerType>\r\n        <LexerType name=\"xml\" desc=\"XML\" ext=\"\">\r\n            <WordsStyle name=\"XMLSTART\" styleID=\"12\" fgColor=\"FF0000\" bgColor=\"FFFF00\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"XMLEND\" styleID=\"13\" fgColor=\"FF0000\" bgColor=\"FFFF00\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"FF0000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"6\" fgColor=\"8000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"7\" fgColor=\"8000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGEND\" styleID=\"11\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGUNKNOWN\" styleID=\"2\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"3\" fgColor=\"FF0000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTEUNKNOWN\" styleID=\"4\" fgColor=\"FF0000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SGMLDEFAULT\" styleID=\"21\" fgColor=\"000000\" bgColor=\"A6CAF0\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CDATA\" styleID=\"17\" fgColor=\"FF8000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"yaml\" desc=\"YAML\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"2\" fgColor=\"000080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"008000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"3\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8040\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REFERENCE\" styleID=\"5\" fgColor=\"804000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOCUMENT\" styleID=\"6\" fgColor=\"0000FF\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"7\" fgColor=\"808080\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"8\" fgColor=\"FF0000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"searchResult\" desc=\"Search result\" ext=\"\">\r\n            <WordsStyle name=\"Default\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Search Header\" styleID=\"1\" fgColor=\"000080\" bgColor=\"BBBBFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"File Header\" styleID=\"2\" fgColor=\"008000\" bgColor=\"D5FFD5\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"Line Number\" styleID=\"3\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Hit Word\" styleID=\"4\" fgColor=\"FF0000\" bgColor=\"FFFFBF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Selected Line\" styleID=\"5\" fgColor=\"000080\" bgColor=\"FFFF4F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Current line background colour\" styleID=\"6\" bgColor=\"E8E8FF\" />\r\n        </LexerType>\r\n    </LexerStyles>\r\n    <GlobalStyles>\r\n        <!-- Attention : Don't modify the name of styleID=\"0\" -->\r\n        <WidgetStyle name=\"Global override\" styleID=\"0\" fgColor=\"FFFF80\" bgColor=\"FF8000\" fontName=\"Courier New\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Default Style\" styleID=\"32\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"Courier New\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Indent guideline style\" styleID=\"37\" fgColor=\"C0C0C0\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Brace highlight style\" styleID=\"34\" fgColor=\"FF0000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"12\" />\r\n        <WidgetStyle name=\"Bad brace colour\" styleID=\"35\" fgColor=\"800000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Current line background colour\" styleID=\"0\" bgColor=\"E8E8FF\" />\r\n        <WidgetStyle name=\"Selected text colour\" styleID=\"0\" bgColor=\"C0C0C0\" />\r\n        <WidgetStyle name=\"Caret colour\" styleID=\"2069\" fgColor=\"8000FF\" />\r\n        <WidgetStyle name=\"Edge colour\" styleID=\"0\" fgColor=\"80FFFF\" />\r\n        <WidgetStyle name=\"Line number margin\" styleID=\"33\" fgColor=\"808080\" bgColor=\"E4E4E4\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Fold\" styleID=\"0\" fgColor=\"808080\" bgColor=\"F3F3F3\" />\r\n        <WidgetStyle name=\"Fold active\" styleID=\"0\" fgColor=\"FF0000\" />\r\n        <WidgetStyle name=\"Fold margin\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"E9E9E9\" />\r\n        <WidgetStyle name=\"White space symbol\" styleID=\"0\" fgColor=\"FFB56A\" />\r\n        <WidgetStyle name=\"Smart HighLighting\" styleID=\"29\" bgColor=\"00FF00\" />\r\n        <WidgetStyle name=\"Find Mark Style\" styleID=\"31\" bgColor=\"FF0000\" />\r\n        <WidgetStyle name=\"Mark Style 1\" styleID=\"25\" bgColor=\"00FFFF\" />\r\n        <WidgetStyle name=\"Mark Style 2\" styleID=\"24\" bgColor=\"FF8000\" />\r\n        <WidgetStyle name=\"Mark Style 3\" styleID=\"23\" bgColor=\"FFFF00\" />\r\n        <WidgetStyle name=\"Mark Style 4\" styleID=\"22\" bgColor=\"8000FF\" />\r\n        <WidgetStyle name=\"Mark Style 5\" styleID=\"21\" bgColor=\"008000\" />\r\n        <WidgetStyle name=\"Incremental highlight all\" styleID=\"28\" bgColor=\"0080FF\" />\r\n        <WidgetStyle name=\"Tags match highlighting\" styleID=\"27\" bgColor=\"8000FF\" />\r\n        <WidgetStyle name=\"Tags attribute\" styleID=\"26\" bgColor=\"FFFF00\" />\r\n        <WidgetStyle name=\"Active tab focused indicator\" styleID=\"0\" fgColor=\"FAAA3C\" />\r\n        <WidgetStyle name=\"Active tab unfocused indicator\" styleID=\"0\" fgColor=\"FFCAB0\" />\r\n        <WidgetStyle name=\"Active tab text\" styleID=\"0\" fgColor=\"000000\" />\r\n        <WidgetStyle name=\"Inactive tabs\" styleID=\"0\" fgColor=\"808080\" bgColor=\"C0C0C0\" />\r\n    </GlobalStyles>\r\n</NotepadPlus>\r\n"
  },
  {
    "path": "gui/themes/Obsidian.xml",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\" ?>\r\n<!--\r\nNotepad++ Custom Style\r\n\r\n  Style name:    Obsidian\r\n      Author:    Joni Eskelinen\r\n        Date:    2009-04-06 (last changed 2009-07-30)\r\n   Languages:    php, html, css, xml, javascript, python, sql, c, c++, \r\n                   assembly, bash, batch, lua at least for detail. Everything else more or less...\r\n        Info:    Inspired by Oblivion theme for gedit.\r\n-->\r\n<NotepadPlus>\r\n    <LexerStyles>\r\n        <LexerType name=\"actionscript\" desc=\"ActionScript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"20\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"A082BD\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"93C763\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"678CB1\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFCD22\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"EC7600\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FF8409\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"E8E2B7\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"D39745\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"6C788C\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"6C788C\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"6C788C\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"6C788C\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"ada\" desc=\"ADA\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"1\" fgColor=\"93C763\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"2\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"FFCD22\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DELIMITER\" styleID=\"4\" fgColor=\"E8E2B7\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"5\" fgColor=\"FF8409\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER EOL\" styleID=\"6\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"7\" fgColor=\"EC7600\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"8\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"9\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"10\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ILLEGAL\" styleID=\"11\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"asp\" desc=\"asp\" ext=\"asp\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"81\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"82\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"83\" fgColor=\"FFCD22\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"84\" fgColor=\"93C763\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"85\" fgColor=\"EC7600\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"87\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"86\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASPSYBOL\" styleID=\"15\" fgColor=\"D955C1\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SCRIPTTYPE\" styleID=\"16\" fgColor=\"D955C1\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"asm\" desc=\"Assembly\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FFCD22\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"EC7600\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"4\" fgColor=\"E8E2B7\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"5\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CPU INSTRUCTION\" styleID=\"6\" fgColor=\"93C763\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"MATH INSTRUCTION\" styleID=\"7\" fgColor=\"93C763\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"REGISTER\" styleID=\"8\" fgColor=\"D39745\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"9\" fgColor=\"A082BD\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"DIRECTIVE OPERAND\" styleID=\"10\" fgColor=\"D2C5E0\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"COMMENT BLOCK\" styleID=\"11\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"12\" fgColor=\"FF8409\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"13\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"EXT INSTRUCTION\" styleID=\"14\" fgColor=\"93C763\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type4\" />\r\n        </LexerType>\r\n        <LexerType name=\"autoit\" desc=\"autoIt\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"1\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"2\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"FFCD22\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"4\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"93C763\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"6\" fgColor=\"D39745\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"7\" fgColor=\"EC7600\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"8\" fgColor=\"E8E2B7\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"9\" fgColor=\"678CB1\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SENT\" styleID=\"10\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"11\" fgColor=\"A082BD\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"12\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"EXPAND\" styleID=\"13\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type5\" />\r\n            <WordsStyle name=\"COMOBJ\" styleID=\"14\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"bash\" desc=\"bash\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"FFC6C6\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"4\" fgColor=\"93C763\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"FFCD22\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"5\" fgColor=\"EC7600\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"6\" fgColor=\"FF8409\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"E8E2B7\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"8\" fgColor=\"678CB1\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SCALAR\" styleID=\"9\" fgColor=\"B7C8D9\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PARAM\" styleID=\"10\" fgColor=\"A082BD\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"11\" fgColor=\"D39745\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE DELIM\" styleID=\"12\" fgColor=\"FF8409\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE Q\" styleID=\"13\" fgColor=\"EC7600\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"batch\" desc=\"Batch\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORDS\" styleID=\"2\" fgColor=\"93C763\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"3\" fgColor=\"C29F56\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HIDE SYBOL\" styleID=\"4\" fgColor=\"D3DA50\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"5\" fgColor=\"FFCD22\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"6\" fgColor=\"678CB1\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"E8E2B7\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"c\" desc=\"C\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"A082BD\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"93C763\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"678CB1\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFCD22\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"EC7600\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FF8409\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"E8E2B7\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"D39745\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"6C788C\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"6C788C\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"6C788C\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"6C788C\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cpp\" desc=\"C++\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"A082BD\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"93C763\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"678CB1\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFCD22\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"EC7600\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FF8409\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"E8E2B7\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"D39745\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"6C788C\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"6C788C\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"6C788C\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"6C788C\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cs\" desc=\"C#\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"A082BD\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"93C763\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"678CB1\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFCD22\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"EC7600\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FF8409\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"E8E2B7\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"D39745\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"6C788C\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"6C788C\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"6C788C\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"6C788C\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"caml\" desc=\"Caml\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGNAME\" styleID=\"2\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"3\" fgColor=\"93C763\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"BUILIN FUNC &amp; TYPE\" styleID=\"4\" fgColor=\"A082BD\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"TYPE\" styleID=\"5\" fgColor=\"678CB1\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"LINENUM\" styleID=\"6\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"E8E2B7\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"8\" fgColor=\"FFCD22\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"9\" fgColor=\"FF8409\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"11\" fgColor=\"EC7600\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"13\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"14\" fgColor=\"6C788C\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"6C788C\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cmake\" desc=\"CMakeFile\" ext=\"cmake\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING D\" styleID=\"2\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING L\" styleID=\"3\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING R\" styleID=\"4\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"5\" fgColor=\"93C763\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"PARAMETER\" styleID=\"6\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"7\" fgColor=\"678CB1\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"USER DEFINED\" styleID=\"8\" fgColor=\"A082BD\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"WHILEDEF\" styleID=\"9\" fgColor=\"D0D2B5\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"FOREACHDEF\" styleID=\"10\" fgColor=\"D0D2B5\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IFDEF\" styleID=\"11\" fgColor=\"D0D2B5\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"MACRODEF\" styleID=\"12\" fgColor=\"D0D2B5\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING VARIABLE\" styleID=\"13\" fgColor=\"EC7600\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"14\" fgColor=\"FFCD22\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"css\" desc=\"CSS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"D0D2B5\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS\" styleID=\"2\" fgColor=\"93C763\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PSEUDOCLASS\" styleID=\"3\" fgColor=\"A082BD\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"UNKNOWN_PSEUDOCLASS\" styleID=\"4\" fgColor=\"A082BD\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"5\" fgColor=\"9CB4AA\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"6\" fgColor=\"678CB1\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"UNKNOWN_IDENTIFIER\" styleID=\"7\" fgColor=\"678CB1\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VALUE\" styleID=\"8\" fgColor=\"F0F0F0\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ID\" styleID=\"10\" fgColor=\"D5AB55\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IMPORTANT\" styleID=\"11\" fgColor=\"F3DB2E\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"12\" fgColor=\"A082BD\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"diff\" desc=\"DIFF\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"2\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"HEADER\" styleID=\"3\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"POSITION\" styleID=\"4\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DELETED\" styleID=\"5\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ADDED\" styleID=\"6\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"nfo\" desc=\"Dos Style\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"32\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontSize=\"\" fontStyle=\"0\" />\r\n        </LexerType>\r\n        <LexerType name=\"fortran\" desc=\"Fortran\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FFCD22\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"EC7600\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"4\" fgColor=\"FF8409\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"5\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"E8E2B7\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"8\" fgColor=\"93C763\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION1\" styleID=\"9\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"FUNCTION2\" styleID=\"10\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"11\" fgColor=\"A082BD\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR2\" styleID=\"12\" fgColor=\"E8E2B7\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"13\" fgColor=\"678CB1\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CONTINUATION\" styleID=\"14\" fgColor=\"9FAC95\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"haskell\" desc=\"Haskell\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"2\" fgColor=\"93C763\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"FFCD22\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"EC7600\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"5\" fgColor=\"FF8409\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS\" styleID=\"6\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MODULE\" styleID=\"7\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CAPITAL\" styleID=\"8\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATA\" styleID=\"9\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IMPORT\" styleID=\"10\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"11\" fgColor=\"E8E2B7\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTANCE\" styleID=\"12\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"13\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK\" styleID=\"14\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK2\" styleID=\"15\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK3\" styleID=\"16\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"html\" desc=\"HTML\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"FFCD22\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"6\" fgColor=\"E1E2CF\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"7\" fgColor=\"E1E2CF\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"8CBBAD\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGEND\" styleID=\"11\" fgColor=\"8CBBAD\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGUNKNOWN\" styleID=\"2\" fgColor=\"8CBBAD\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"3\" fgColor=\"B3B689\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTEUNKNOWN\" styleID=\"4\" fgColor=\"B3B689\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SGMLDEFAULT\" styleID=\"21\" fgColor=\"D39745\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CDATA\" styleID=\"17\" fgColor=\"D0D2B5\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VALUE\" styleID=\"19\" fgColor=\"FF8000\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ENTITY\" styleID=\"10\" fgColor=\"BBBBBB\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"ini\" desc=\"ini file\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"2\" fgColor=\"A082BD\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASSIGNMENT\" styleID=\"3\" fgColor=\"E8E2B7\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFVAL\" styleID=\"4\" fgColor=\"FFCD22\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"inno\" desc=\"InnoSetup\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"2\" fgColor=\"93C763\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"PARAMETER\" styleID=\"3\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"4\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR INLINE\" styleID=\"6\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT PASCAL\" styleID=\"7\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD PASCAL\" styleID=\"8\" fgColor=\"93C763\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"KEYWORD USER\" styleID=\"9\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"STRING DOUBLE\" styleID=\"10\" fgColor=\"EC7600\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING SINGLE\" styleID=\"11\" fgColor=\"FF8409\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"12\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"java\" desc=\"Java\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"A082BD\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"93C763\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"678CB1\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFCD22\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"EC7600\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FF8409\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"E8E2B7\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"D39745\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"6C788C\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"6C788C\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"6C788C\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"6C788C\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"javascript\" desc=\"Javascript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"41\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"45\" fgColor=\"FFCD22\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"46\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"47\" fgColor=\"93C763\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"48\" fgColor=\"EC7600\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"49\" fgColor=\"EC7600\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOLS\" styleID=\"50\" fgColor=\"E8E2B7\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"51\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"52\" fgColor=\"D39745\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"42\" fgColor=\"818E96\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"43\" fgColor=\"818E96\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTDOC\" styleID=\"44\" fgColor=\"6C788C\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"kix\" desc=\"KiXtart\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"31\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"2\" fgColor=\"EC7600\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"3\" fgColor=\"FF8409\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFCD22\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VAR\" styleID=\"5\" fgColor=\"678CB1\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"6\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"7\" fgColor=\"93C763\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"8\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"9\" fgColor=\"E8E2B7\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"lisp\" desc=\"LISP\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FFCD22\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION WORD\" styleID=\"3\" fgColor=\"93C763\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"5\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"EC7600\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"8\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"9\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"E8E2B7\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"11\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"lua\" desc=\"Lua\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"6C788C\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"LITERALSTRING\" styleID=\"8\" fgColor=\"C29F56\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"A082BD\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"93C763\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFCD22\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"EC7600\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FF8409\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"E8E2B7\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNC1\" styleID=\"13\" fgColor=\"678CB1\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"FUNC2\" styleID=\"14\" fgColor=\"678CB1\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"FUNC3\" styleID=\"15\" fgColor=\"678CB1\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n        </LexerType>\r\n        <LexerType name=\"makefile\" desc=\"Makefile\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"2\" fgColor=\"A082BD\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"3\" fgColor=\"678CB1\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"4\" fgColor=\"E8E2B7\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TARGET\" styleID=\"5\" fgColor=\"93C763\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDEOL\" styleID=\"9\" fgColor=\"D39745\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"matlab\" desc=\"Matlab\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"2\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"FFCD22\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"4\" fgColor=\"93C763\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\">endfunction endif</WordsStyle>\r\n            <WordsStyle name=\"STRING\" styleID=\"5\" fgColor=\"FF8409\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"E8E2B7\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLE QUOTE STRING\" styleID=\"8\" fgColor=\"EC7600\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"nsis\" desc=\"NSIS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING DOUBLE QUOTE\" styleID=\"2\" fgColor=\"EC7600\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING LEFT QUOTE\" styleID=\"3\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING RIGHT QUOTE\" styleID=\"4\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"5\" fgColor=\"93C763\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"6\" fgColor=\"678CB1\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"7\" fgColor=\"D39745\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"USER DEFINED\" styleID=\"8\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"9\" fgColor=\"D955C1\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SUBSECTION\" styleID=\"10\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IF DEFINE\" styleID=\"11\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"12\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING VAR\" styleID=\"13\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"14\" fgColor=\"FFCD22\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SECTION GROUP\" styleID=\"15\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAGE EX\" styleID=\"16\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION DEFINITIONS\" styleID=\"17\" fgColor=\"A082BD\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"18\" fgColor=\"6C788C\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"objc\" desc=\"Objective-C\" ext=\"\">\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"19\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"QUALIFIER\" styleID=\"20\" fgColor=\"ABBFD3\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"A082BD\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"93C763\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"678CB1\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFCD22\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"EC7600\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FF8409\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"E8E2B7\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"D39745\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"6C788C\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"6C788C\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"6C788C\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"6C788C\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"pascal\" desc=\"Pascal\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"A082BD\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR2\" styleID=\"6\" fgColor=\"9473B5\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"93C763\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFCD22\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HEX NUMBER\" styleID=\"8\" fgColor=\"FFCD22\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"10\" fgColor=\"EC7600\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"10\" fgColor=\"EC7600\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"EC7600\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"E8E2B7\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"D39745\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"6C788C\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"perl\" desc=\"Perl\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"A082BD\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"93C763\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFCD22\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"EC7600\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FF8409\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"E8E2B7\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"17\" fgColor=\"D39745\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SCALAR\" styleID=\"12\" fgColor=\"678CB1\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ARRAY\" styleID=\"13\" fgColor=\"5899C0\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HASH\" styleID=\"14\" fgColor=\"5AB9BE\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL TABLE\" styleID=\"15\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PUNCTUATION\" styleID=\"8\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"POD\" styleID=\"3\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"LONGQUOTE\" styleID=\"19\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATASECTION\" styleID=\"21\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGSUBST\" styleID=\"18\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"20\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"php\" desc=\"php\" ext=\"\">\r\n            <WordsStyle name=\"QUESTION MARK\" styleID=\"18\" fgColor=\"D955C1\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"118\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"119\" fgColor=\"EC7600\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING VARIABLE\" styleID=\"126\" fgColor=\"D39745\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SIMPLESTRING\" styleID=\"120\" fgColor=\"FF8409\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"121\" fgColor=\"93C763\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"122\" fgColor=\"FFCD22\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"123\" fgColor=\"678CB1\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"124\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"125\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"127\" fgColor=\"E8E2B7\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"postscript\" desc=\"Postscript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DSC COMMENT\" styleID=\"2\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DSC VALUE\" styleID=\"3\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFCD22\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Name\" styleID=\"5\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"6\" fgColor=\"93C763\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"LITERAL\" styleID=\"7\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IMMEVAL\" styleID=\"8\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAREN ARRAY\" styleID=\"9\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAREN DICT\" styleID=\"10\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAREN PROC\" styleID=\"11\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"12\" fgColor=\"EC7600\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HEX STRING\" styleID=\"13\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BASE85 STRING\" styleID=\"14\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BAD STRING CHAR\" styleID=\"15\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"props\" desc=\"Properties file\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"2\" fgColor=\"A082BD\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASSIGNMENT\" styleID=\"3\" fgColor=\"E8E2B7\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFVAL\" styleID=\"4\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"python\" desc=\"Python\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FFCD22\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"EC7600\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"4\" fgColor=\"FF8409\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORDS\" styleID=\"5\" fgColor=\"93C763\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\">True False</WordsStyle>\r\n            <WordsStyle name=\"TRIPLE\" styleID=\"6\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TRIPLEDOUBLE\" styleID=\"7\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASSNAME\" styleID=\"8\" fgColor=\"A082BD\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFNAME\" styleID=\"9\" fgColor=\"678CB1\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"E8E2B7\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK\" styleID=\"12\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"12\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"rc\" desc=\"RC\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"A082BD\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"93C763\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"678CB1\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFCD22\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"EC7600\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FF8409\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"E8E2B7\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"D39745\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"6C788C\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"6C788C\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"6C788C\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"6C788C\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"ruby\" desc=\"Ruby\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"2\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"POD\" styleID=\"3\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFCD22\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"5\" fgColor=\"93C763\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\">if else for while</WordsStyle>\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"EC7600\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\">bool long int char</WordsStyle>\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FF8409\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS NAME\" styleID=\"8\" fgColor=\"A082BD\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEF NAME\" styleID=\"9\" fgColor=\"678CB1\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"E8E2B7\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"12\" fgColor=\"D39745\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"13\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"14\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MODULE NAME\" styleID=\"15\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTANCE VAR\" styleID=\"16\" fgColor=\"B6C8DA\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS VAR\" styleID=\"17\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"18\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATA SECTION\" styleID=\"19\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING Q\" styleID=\"24\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"scheme\" desc=\"Schime\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FFCD22\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION WORD\" styleID=\"3\" fgColor=\"93C763\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"5\" fgColor=\"B3B689\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"EC7600\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"8\" fgColor=\"EC7600\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"9\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"B3B689\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"11\" fgColor=\"678CB1\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"smalltalk\" desc=\"Smalltalk\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"1\" fgColor=\"EC7600\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FFCD22\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"3\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"4\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BINARY\" styleID=\"5\" fgColor=\"E8E2B7\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BOOL\" styleID=\"6\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SELF\" styleID=\"7\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SUPER\" styleID=\"8\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NIL\" styleID=\"9\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"10\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"RETURN\" styleID=\"11\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"12\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KWS END\" styleID=\"13\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASSIGN\" styleID=\"14\" fgColor=\"E8E2B7\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"15\" fgColor=\"FF8409\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SPECIAL SELECTOR\" styleID=\"16\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"sql\" desc=\"SQL\" ext=\"\">\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"5\" fgColor=\"93C763\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFCD22\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"EC7600\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"7\" fgColor=\"EC7600\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"E8E2B7\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"tcl\" desc=\"TCL\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"A082BD\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"93C763\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"678CB1\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFCD22\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"EC7600\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FF8409\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"E8E2B7\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"D39745\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"6C788C\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"6C788C\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"6C788C\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"6C788C\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"tex\" desc=\"TeX\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"1\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"GROUP\" styleID=\"2\" fgColor=\"678CB1\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"3\" fgColor=\"E8E2B7\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"4\" fgColor=\"93C763\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"5\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"vb\" desc=\"VB / VBS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"7\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FFCD22\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"3\" fgColor=\"93C763\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"EC7600\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"A082BD\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"E8E2B7\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATE\" styleID=\"8\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"verilog\" desc=\"Verilog\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGNAME\" styleID=\"2\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"93C763\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"7\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"E8E2B7\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFCD22\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"A082BD\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"EC7600\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE BANG\" styleID=\"3\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"12\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"USER\" styleID=\"19\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"vhdl\" desc=\"VHDL\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LIne\" styleID=\"2\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"FFCD22\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"EC7600\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"5\" fgColor=\"E8E2B7\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"6\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"7\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"8\" fgColor=\"93C763\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STD OPERATOR\" styleID=\"9\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"10\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"9\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DIRECTIVE OPERAND\" styleID=\"10\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STD FUNCTION\" styleID=\"11\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"STD PACKAGE\" styleID=\"12\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"STD TYPE\" styleID=\"13\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"USER DEFINE\" styleID=\"14\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type5\" />\r\n        </LexerType>\r\n        <LexerType name=\"xml\" desc=\"XML\" ext=\"\">\r\n            <WordsStyle name=\"XMLSTART\" styleID=\"12\" fgColor=\"ABBFD3\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"XMLEND\" styleID=\"13\" fgColor=\"ABBFD3\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"FFCD22\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"6\" fgColor=\"E1E2CF\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\">if else for while</WordsStyle>\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"7\" fgColor=\"E1E2CF\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\">bool long int char</WordsStyle>\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"678CB1\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGEND\" styleID=\"11\" fgColor=\"678CB1\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGUNKNOWN\" styleID=\"2\" fgColor=\"678CB1\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"3\" fgColor=\"B3B689\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTEUNKNOWN\" styleID=\"4\" fgColor=\"B3B689\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SGMLDEFAULT\" styleID=\"21\" fgColor=\"D39745\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CDATA\" styleID=\"17\" fgColor=\"D5E6F0\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"yaml\" desc=\"YAML\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"2\" fgColor=\"678CB1\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"66747B\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"3\" fgColor=\"93C763\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFCD22\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REFERENCE\" styleID=\"5\" fgColor=\"A082BD\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\">if else for while</WordsStyle>\r\n            <WordsStyle name=\"DOCUMENT\" styleID=\"6\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\">bool long int char</WordsStyle>\r\n            <WordsStyle name=\"TEXT\" styleID=\"7\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"8\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"searchResult\" desc=\"Search result\" ext=\"\">\r\n            <WordsStyle name=\"Default\" styleID=\"0\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Search Header\" styleID=\"1\" fgColor=\"A6ABB3\" bgColor=\"3A4649\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"File Header\" styleID=\"2\" fgColor=\"78838B\" bgColor=\"2F383C\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"Line Number\" styleID=\"3\" fgColor=\"FFCD22\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Hit Word\" styleID=\"4\" fgColor=\"678CB1\" bgColor=\"293134\" fontName=\"\" fontStyle=\"5\" fontSize=\"\" />\r\n            <WordsStyle name=\"Selected Line\" styleID=\"5\" fgColor=\"FF8409\" bgColor=\"2F393C\" fontName=\"\" fontStyle=\"1\" fontSize=\"\">if else for while</WordsStyle>\r\n            <WordsStyle name=\"Current line background colour\" styleID=\"6\" bgColor=\"2F393C\" fgColor=\"E0E2E4\" fontSize=\"\" fontStyle=\"0\">bool long int char</WordsStyle>\r\n        </LexerType>\r\n    </LexerStyles>\r\n    <GlobalStyles>\r\n        <!-- Attention : Don't modify the name of styleID=\"0\" -->\r\n        <WidgetStyle name=\"Global override\" styleID=\"0\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"Courier New\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Default Style\" styleID=\"32\" fgColor=\"E0E2E4\" bgColor=\"293134\" fontName=\"Courier New\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Indent guideline style\" styleID=\"37\" fgColor=\"394448\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Brace highlight style\" styleID=\"34\" fgColor=\"F3DB2E\" bgColor=\"293134\" fontName=\"\" fontStyle=\"1\" fontSize=\"12\" />\r\n        <WidgetStyle name=\"Bad brace colour\" styleID=\"35\" fgColor=\"FB0000\" bgColor=\"293134\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Current line background colour\" styleID=\"0\" bgColor=\"2F393C\" fgColor=\"0080C0\" fontSize=\"\" fontStyle=\"0\" />\r\n        <WidgetStyle name=\"Selected text colour\" styleID=\"0\" bgColor=\"404E51\" fgColor=\"C00000\" />\r\n        <WidgetStyle name=\"Caret colour\" styleID=\"2069\" fgColor=\"C1CBD2\" bgColor=\"6699CC\" fontStyle=\"0\" />\r\n        <WidgetStyle name=\"Edge colour\" styleID=\"0\" fgColor=\"445257\" bgColor=\"112435\" fontSize=\"\" fontStyle=\"0\" />\r\n        <WidgetStyle name=\"Line number margin\" styleID=\"33\" fgColor=\"81969A\" bgColor=\"3F4B4E\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Fold\" styleID=\"0\" fgColor=\"6A8088\" bgColor=\"2F383C\" fontSize=\"\" fontStyle=\"0\" />\r\n        <WidgetStyle name=\"Fold margin\" styleID=\"0\" fgColor=\"343F41\" bgColor=\"343F41\" fontSize=\"\" fontStyle=\"0\" />\r\n        <WidgetStyle name=\"White space symbol\" styleID=\"0\" fgColor=\"343F43\" bgColor=\"3476A3\" fontSize=\"\" fontStyle=\"0\" />\r\n        <WidgetStyle name=\"Smart HighLighting\" styleID=\"29\" bgColor=\"56676D\" fgColor=\"222222\" />\r\n        <WidgetStyle name=\"Find Mark Style\" styleID=\"31\" bgColor=\"6B8189\" fgColor=\"E0E2E4\" fontSize=\"\" fontStyle=\"1\" />\r\n        <WidgetStyle name=\"Mark Style 1\" styleID=\"25\" bgColor=\"00659B\" fgColor=\"E0E2E4\" />\r\n        <WidgetStyle name=\"Mark Style 2\" styleID=\"24\" bgColor=\"00880B\" fgColor=\"E0E2E4\" fontSize=\"10\" fontStyle=\"0\" />\r\n        <WidgetStyle name=\"Mark Style 3\" styleID=\"23\" bgColor=\"A6AA00\" fgColor=\"E0E2E4\" />\r\n        <WidgetStyle name=\"Mark Style 4\" styleID=\"22\" bgColor=\"8A0B0B\" fgColor=\"E0E2E4\" />\r\n        <WidgetStyle name=\"Mark Style 5\" styleID=\"21\" bgColor=\"44116F\" fgColor=\"E0E2E4\" />\r\n        <WidgetStyle name=\"Incremental highlight all\" styleID=\"28\" bgColor=\"0080FF\" fgColor=\"FFFF80\" fontSize=\"\" fontStyle=\"0\" />\r\n        <WidgetStyle name=\"Tags match highlighting\" styleID=\"27\" bgColor=\"4D5C62\" fgColor=\"E0E2E4\" />\r\n        <WidgetStyle name=\"Tags attribute\" styleID=\"26\" bgColor=\"93975E\" fgColor=\"FFCAB0\" />\r\n        <WidgetStyle name=\"Active tab focused indicator\" styleID=\"0\" fgColor=\"FAAA3C\" bgColor=\"8000FF\" />\r\n        <WidgetStyle name=\"Active tab unfocused indicator\" styleID=\"0\" fgColor=\"FFCAB0\" bgColor=\"008000\" />\r\n        <WidgetStyle name=\"Active tab text\" styleID=\"0\" fgColor=\"000000\" bgColor=\"0080FF\" />\r\n        <WidgetStyle name=\"Inactive tabs\" styleID=\"0\" fgColor=\"808080\" bgColor=\"C0C0C0\" />\r\n    </GlobalStyles>\r\n</NotepadPlus>\r\n"
  },
  {
    "path": "gui/themes/Plastic_Code_Wrap.xml",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\" ?>\r\n<!--//\r\n\r\nPlasticCodeWrap\r\nCopyright (c) 2008 Fabio Zendhi Nagao <http://zend.lojcomm.com.br/>\r\n\r\nPermission is hereby granted, free of charge, to any person\r\nobtaining a copy of this software and associated documentation\r\nfiles (the \"Software\"), to deal in the Software without\r\nrestriction, including without limitation the rights to use,\r\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\r\ncopies of the Software, and to permit persons to whom the\r\nSoftware is furnished to do so, subject to the following\r\nconditions:\r\n\r\nThe above copyright notice and this permission notice shall be\r\nincluded in all copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\r\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\r\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\r\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\r\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\r\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\r\nOTHER DEALINGS IN THE SOFTWARE.\r\n\r\nRequirements:\r\n    * This style is based on DejaVu fonts <http://dejavu.sourceforge.net/wiki/index.php/Main_Page>.\r\n    * Notepad++, of course.\r\n\r\nInstallation:\r\n    Copy this file to C:\\Documents and Settings\\%%USERNAME%%\\Application Data\\Notepad++\\\r\n\r\nAbout:\r\n    This styler has been built by Textmate theme to Notepad++ styler <http://framework.lojcomm.com.br/tmTheme2nppStyler/>\r\n\r\nCredits:\r\n    Thanks for the original Textmate theme author.\r\n    Thanks for Fabio Zendhi Nagao for the tmTheme2nppStyler.\r\n    Thanks for the user for the tmTheme source.\r\n\r\n//-->\r\n<NotepadPlus>\r\n    <LexerStyles>\r\n        <LexerType name=\"c\" desc=\"C\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F6F080\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPEWORD\" styleID=\"16\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFB454\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"cpp\" desc=\"C++\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F6F080\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFB454\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"java\" desc=\"Java\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F6F080\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFB454\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"cs\" desc=\"C#\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F6F080\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFB454\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"rc\" desc=\"RC\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F6F080\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFB454\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"tcl\" desc=\"TCL\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F6F080\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFB454\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"objc\" desc=\"Objective-C\" ext=\"\">\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"19\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"QUALIFIER\" styleID=\"20\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F6F080\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFB454\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"sql\" desc=\"SQL\" ext=\"\">\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"5\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"7\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"html\" desc=\"HTML\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"6\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"7\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"EFE900\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAGEND\" styleID=\"11\" fgColor=\"EFE900\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAGUNKNOWN\" styleID=\"2\" fgColor=\"EFE900\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"3\" fgColor=\"EFE900\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ATTRIBUTEUNKNOWN\" styleID=\"4\" fgColor=\"EFE900\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SGMLDEFAULT\" styleID=\"21\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CDATA\" styleID=\"17\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VALUE\" styleID=\"19\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ENTITY\" styleID=\"10\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"php\" desc=\"php\" ext=\"\">\r\n            <WordsStyle name=\"QUESTION MARK\" styleID=\"18\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"118\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"119\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING VARIABLE\" styleID=\"126\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SIMPLESTRING\" styleID=\"120\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"121\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"122\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"123\" fgColor=\"FB9A4B\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"124\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"125\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"127\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"javascript\" desc=\"Javascript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"41\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"45\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"46\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"47\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"48\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"49\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SYMBOLS\" styleID=\"50\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"51\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"52\" fgColor=\"FFB454\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"42\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"43\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTDOC\" styleID=\"44\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"asp\" desc=\"asp\" ext=\"asp\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"81\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"82\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"83\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"84\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"85\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"87\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"86\" fgColor=\"EB939A\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ASPSYBOL\" styleID=\"15\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SCRIPTTYPE\" styleID=\"16\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"xml\" desc=\"XML\" ext=\"\">\r\n            <WordsStyle name=\"XMLSTART\" styleID=\"12\" fgColor=\"9EFFFF\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"XMLEND\" styleID=\"13\" fgColor=\"9EFFFF\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"6\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"7\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"EFE900\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAGEND\" styleID=\"11\" fgColor=\"EFE900\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAGUNKNOWN\" styleID=\"2\" fgColor=\"EFE900\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"3\" fgColor=\"EFE900\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ATTRIBUTEUNKNOWN\" styleID=\"4\" fgColor=\"EFE900\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SGMLDEFAULT\" styleID=\"21\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CDATA\" styleID=\"17\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"ini\" desc=\"ini file\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"2\" fgColor=\"EFE900\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ASSIGNMENT\" styleID=\"3\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFVAL\" styleID=\"4\" fgColor=\"EFE900\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"props\" desc=\"Properties file\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ASSIGNMENT\" styleID=\"3\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFVAL\" styleID=\"4\" fgColor=\"EFE900\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"diff\" desc=\"DIFF\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"2\" fgColor=\"EB939A\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"HEADER\" styleID=\"3\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"POSITION\" styleID=\"4\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DELETED\" styleID=\"5\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ADDED\" styleID=\"6\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"nfo\" desc=\"Dos Style\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"32\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" />\r\n        </LexerType>\r\n        <LexerType name=\"makefile\" desc=\"Makefile\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"2\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"3\" fgColor=\"EB939A\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"4\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TARGET\" styleID=\"5\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDEOL\" styleID=\"9\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"vb\" desc=\"VB / VBS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"7\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"3\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DATE\" styleID=\"8\" fgColor=\"9DF39F\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"css\" desc=\"CSS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"EFE900\" bgColor=\"0B161D\" fontName=\"Batang\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CLASS\" styleID=\"2\" fgColor=\"EFE900\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PSEUDOCLASS\" styleID=\"3\" fgColor=\"EFE900\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"UNKNOWN_PSEUDOCLASS\" styleID=\"4\" fgColor=\"EFE900\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"5\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"6\" fgColor=\"EB939A\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"UNKNOWN_IDENTIFIER\" styleID=\"7\" fgColor=\"EB939A\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VALUE\" styleID=\"8\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ID\" styleID=\"10\" fgColor=\"EFE900\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IMPORTANT\" styleID=\"11\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"12\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"pascal\" desc=\"Pascal\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"EB939A\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F6F080\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFB454\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"perl\" desc=\"Perl\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F6F080\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"17\" fgColor=\"FFB454\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SCALAR\" styleID=\"12\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ARRAY\" styleID=\"13\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"HASH\" styleID=\"14\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SYMBOL TABLE\" styleID=\"15\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PUNCTUATION\" styleID=\"8\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"POD\" styleID=\"3\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"LONGQUOTE\" styleID=\"19\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DATASECTION\" styleID=\"21\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGSUBST\" styleID=\"18\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"20\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"python\" desc=\"Python\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"4\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KEYWORDS\" styleID=\"5\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TRIPLE\" styleID=\"6\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TRIPLEDOUBLE\" styleID=\"7\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CLASSNAME\" styleID=\"8\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFNAME\" styleID=\"9\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"EB939A\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTBLOCK\" styleID=\"12\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"12\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"batch\" desc=\"Batch\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KEYWORDS\" styleID=\"2\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"3\" fgColor=\"EFE900\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"HIDE SYBOL\" styleID=\"4\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"5\" fgColor=\"EB939A\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"6\" fgColor=\"FB9A4B\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"lua\" desc=\"Lua\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"LITERALSTRING\" styleID=\"8\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F6F080\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"FUNC1\" styleID=\"13\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"FUNC2\" styleID=\"14\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"FUNC3\" styleID=\"15\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n        </LexerType>\r\n        <LexerType name=\"tex\" desc=\"TeX\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"1\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"GROUP\" styleID=\"2\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"3\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"4\" fgColor=\"EB939A\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"5\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"nsis\" desc=\"NSIS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING DOUBLE QUOTE\" styleID=\"2\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING LEFT QUOTE\" styleID=\"3\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING RIGHT QUOTE\" styleID=\"4\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"5\" fgColor=\"FFB454\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"6\" fgColor=\"FB9A4B\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"7\" fgColor=\"EFE900\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"USER DEFINED\" styleID=\"8\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"9\" fgColor=\"EFE900\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SUBSECTION\" styleID=\"10\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IF DEFINE\" styleID=\"11\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"12\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING VAR\" styleID=\"13\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"14\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SECTION GROUP\" styleID=\"15\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PAGE EX\" styleID=\"16\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"FUNCTION DEFINITIONS\" styleID=\"17\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"18\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"actionscript\" desc=\"ActionScript\" ext=\"\">\r\n            <!--\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"19\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            -->\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"20\" fgColor=\"FFB454\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F6F080\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFB454\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"bash\" desc=\"bash\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"4\" fgColor=\"F6F080\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"5\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"6\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"8\" fgColor=\"EB939A\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SCALAR\" styleID=\"9\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PARAM\" styleID=\"10\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"11\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"HERE DELIM\" styleID=\"12\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"HERE Q\" styleID=\"13\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"fortran\" desc=\"Fortran\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"4\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"5\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"EB939A\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"8\" fgColor=\"F6F080\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION1\" styleID=\"9\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"FUNCTION2\" styleID=\"10\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"11\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR2\" styleID=\"12\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"13\" fgColor=\"EFE900\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CONTINUATION\" styleID=\"14\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"lisp\" desc=\"LISP\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"FUNCTION WORD\" styleID=\"3\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"5\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"8\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"9\" fgColor=\"EB939A\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"11\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"asm\" desc=\"Assembler\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"4\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"5\" fgColor=\"EB939A\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CPU INSTRUCTION\" styleID=\"6\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"MATH INSTRUCTION\" styleID=\"7\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"REGISTER\" styleID=\"8\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"9\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"DIRECTIVE OPERAND\" styleID=\"10\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"COMMENT BLOCK\" styleID=\"11\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"12\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"13\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"EXT INSTRUCTION\" styleID=\"14\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type4\" />\r\n        </LexerType>\r\n        <LexerType name=\"ruby\" desc=\"Ruby\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"2\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"POD\" styleID=\"3\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"5\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CLASS NAME\" styleID=\"8\" fgColor=\"EFE900\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEF NAME\" styleID=\"9\" fgColor=\"EFE900\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"EB939A\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"12\" fgColor=\"FFB454\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"13\" fgColor=\"FB9A4B\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"14\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"MODULE NAME\" styleID=\"15\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTANCE VAR\" styleID=\"16\" fgColor=\"FB9A4B\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CLASS VAR\" styleID=\"17\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"18\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DATA SECTION\" styleID=\"19\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING Q\" styleID=\"24\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"postscript\" desc=\"Postscript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DSC COMMENT\" styleID=\"2\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DSC VALUE\" styleID=\"3\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"Name\" styleID=\"5\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"6\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"LITERAL\" styleID=\"7\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IMMEVAL\" styleID=\"8\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PAREN ARRAY\" styleID=\"9\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PAREN DICT\" styleID=\"10\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PAREN PROC\" styleID=\"11\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"12\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"HEX STRING\" styleID=\"13\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BASE85 STRING\" styleID=\"14\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BAD STRING CHAR\" styleID=\"15\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"vhdl\" desc=\"VHDL\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LIne\" styleID=\"2\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"5\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"6\" fgColor=\"EB939A\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"7\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"8\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STD OPERATOR\" styleID=\"9\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"10\" fgColor=\"EFE900\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"9\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DIRECTIVE OPERAND\" styleID=\"10\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STD FUNCTION\" styleID=\"11\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"STD PACKAGE\" styleID=\"12\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"STD TYPE\" styleID=\"13\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"USER DEFINE\" styleID=\"14\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type5\" />\r\n        </LexerType>\r\n        <LexerType name=\"smalltalk\" desc=\"Smalltalk\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"1\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"3\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"4\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BINARY\" styleID=\"5\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BOOL\" styleID=\"6\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SELF\" styleID=\"7\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SUPER\" styleID=\"8\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NIL\" styleID=\"9\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"10\" fgColor=\"FB9A4B\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"RETURN\" styleID=\"11\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"12\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KWS END\" styleID=\"13\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ASSIGN\" styleID=\"14\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"15\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SPECIAL SELECTOR\" styleID=\"16\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"caml\" desc=\"Caml\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"EB939A\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAGNAME\" styleID=\"2\" fgColor=\"EFE900\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"3\" fgColor=\"F6F080\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"BUILIN FUNC &amp; TYPE\" styleID=\"4\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"TYPE\" styleID=\"5\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"LINENUM\" styleID=\"6\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"8\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"9\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"11\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"13\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"14\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"verilog\" desc=\"Verilog\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"EB939A\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAGNAME\" styleID=\"2\" fgColor=\"EFE900\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F6F080\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"7\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE BANG\" styleID=\"3\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"12\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"USER\" styleID=\"19\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"kix\" desc=\"KiXtart\" ext=\"\">\r\n            <!--\r\n            <WordsStyle name=\"\" styleID=\"0\" fgColor=\"\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        -->\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"31\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"2\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"3\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VAR\" styleID=\"5\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"6\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"7\" fgColor=\"F6F080\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"8\" fgColor=\"FFB454\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"9\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"autoit\" desc=\"autoIt\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"2\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"4\" fgColor=\"FFB454\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F6F080\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"6\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"7\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"8\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"9\" fgColor=\"FB9A4B\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SENT\" styleID=\"10\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"11\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"12\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"EXPAND\" styleID=\"13\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type5\" />\r\n            <WordsStyle name=\"COMOBJ\" styleID=\"14\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"ada\" desc=\"ADA\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"1\" fgColor=\"F6F080\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"2\" fgColor=\"EB939A\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DELIMITER\" styleID=\"4\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"5\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER EOL\" styleID=\"6\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"7\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"8\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"9\" fgColor=\"EFE900\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"10\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ILLEGAL\" styleID=\"11\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"matlab\" desc=\"Matlab\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"2\" fgColor=\"EB939A\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"4\" fgColor=\"F6F080\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"5\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"EB939A\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DOUBLE QUOTE STRING\" styleID=\"8\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"haskell\" desc=\"Haskell\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"EB939A\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"2\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"5\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CLASS\" styleID=\"6\" fgColor=\"EFE900\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"MODULE\" styleID=\"7\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CAPITAL\" styleID=\"8\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DATA\" styleID=\"9\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IMPORT\" styleID=\"10\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"11\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTANCE\" styleID=\"12\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"13\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTBLOCK\" styleID=\"14\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTBLOCK2\" styleID=\"15\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTBLOCK3\" styleID=\"16\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"inno\" desc=\"InnoSetup\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"2\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"PARAMETER\" styleID=\"3\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"4\" fgColor=\"EFE900\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR INLINE\" styleID=\"6\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT PASCAL\" styleID=\"7\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KEYWORD PASCAL\" styleID=\"8\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"KEYWORD USER\" styleID=\"9\" fgColor=\"FFAA00\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"STRING DOUBLE\" styleID=\"10\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING SINGLE\" styleID=\"11\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"12\" fgColor=\"EB939A\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"cmake\" desc=\"CMakeFile\" ext=\"cmake\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"1E9AE0\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING D\" styleID=\"2\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING L\" styleID=\"3\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING R\" styleID=\"4\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"5\" fgColor=\"EB939A\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"PARAMETER\" styleID=\"6\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"7\" fgColor=\"FB9A4B\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"USER DEFINED\" styleID=\"8\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"WHILEDEF\" styleID=\"9\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"FOREACHDEF\" styleID=\"10\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IFDEF\" styleID=\"11\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"MACRODEF\" styleID=\"12\" fgColor=\"000000\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING VARIABLE\" styleID=\"13\" fgColor=\"55E439\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"14\" fgColor=\"FF3A83\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"searchResult\" desc=\"Search result\" ext=\"\">\r\n            <WordsStyle name=\"Default\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Search Header\" styleID=\"1\" fgColor=\"000080\" bgColor=\"BBBBFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"File Header\" styleID=\"2\" fgColor=\"008000\" bgColor=\"D5FFD5\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"Line Number\" styleID=\"3\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Hit Word\" styleID=\"4\" fgColor=\"FF0000\" bgColor=\"FFFFBF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Selected Line\" styleID=\"5\" fgColor=\"000080\" bgColor=\"FFFF4F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\">if else for while</WordsStyle>\r\n            <WordsStyle name=\"Current line background colour\" styleID=\"6\" bgColor=\"E8E8FF\" fgColor=\"0080FF\" fontSize=\"\" fontStyle=\"0\">bool long int char</WordsStyle>\r\n        </LexerType>\r\n    </LexerStyles>\r\n    <GlobalStyles>\r\n        <!-- Attention : Don't modify the name of styleID=\"0\" -->\r\n        <WidgetStyle name=\"Global override\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"DejaVu Sans Mono\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Default Style\" styleID=\"32\" fgColor=\"F8F8F8\" bgColor=\"0B161D\" fontName=\"DejaVu Sans Mono\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Indent guideline style\" styleID=\"37\" fgColor=\"888A85\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Brace highlight style\" styleID=\"34\" fgColor=\"FCE94F\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"1\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Bad brace colour\" styleID=\"35\" fgColor=\"EF2929\" bgColor=\"0B161D\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Current line background colour\" styleID=\"0\" bgColor=\"11222D\" />\r\n        <WidgetStyle name=\"Mark colour\" styleID=\"0\" fgColor=\"CC0000\" bgColor=\"EDD400\" />\r\n        <WidgetStyle name=\"Selected text colour\" styleID=\"0\" bgColor=\"162E3D\" />\r\n        <WidgetStyle name=\"Caret colour\" styleID=\"2069\" fgColor=\"8BA7A7\" />\r\n        <WidgetStyle name=\"Find Mark Style\" styleID=\"31\" fgColor=\"CC0000\" bgColor=\"EDD400\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Edge colour\" styleID=\"0\" fgColor=\"EEEEEC\" />\r\n        <WidgetStyle name=\"Line number margin\" styleID=\"33\" fgColor=\"EEEEEC\" bgColor=\"2E3436\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n        <WidgetStyle name=\"Fold\" styleID=\"0\" fgColor=\"2E3436\" bgColor=\"EEEEEC\" />\r\n        <WidgetStyle name=\"Fold margin\" styleID=\"0\" fgColor=\"555753\" bgColor=\"2E3436\" />\r\n        <WidgetStyle name=\"White space symbol\" styleID=\"0\" fgColor=\"FCAF3E\" />\r\n        <WidgetStyle name=\"Smart HighLighting\" styleID=\"29\" bgColor=\"00FF00\" fgColor=\"555753\" />\r\n        <WidgetStyle name=\"Find Mark Style\" styleID=\"31\" bgColor=\"FF0000\" fgColor=\"FCAF3E\" />\r\n        <WidgetStyle name=\"Mark Style 1\" styleID=\"25\" bgColor=\"00FFFF\" />\r\n        <WidgetStyle name=\"Mark Style 2\" styleID=\"24\" bgColor=\"FF8000\" />\r\n        <WidgetStyle name=\"Mark Style 3\" styleID=\"23\" bgColor=\"FFFF00\" />\r\n        <WidgetStyle name=\"Mark Style 4\" styleID=\"22\" bgColor=\"8000FF\" />\r\n        <WidgetStyle name=\"Mark Style 5\" styleID=\"21\" bgColor=\"008000\" />\r\n        <WidgetStyle name=\"Incremental highlight all\" styleID=\"28\" bgColor=\"0080FF\" fgColor=\"FFCAB0\" />\r\n        <WidgetStyle name=\"Tags match highlighting\" styleID=\"27\" bgColor=\"8000FF\" fgColor=\"000000\" />\r\n        <WidgetStyle name=\"Tags attribute\" styleID=\"26\" bgColor=\"FFFF00\" fgColor=\"8080C0\" />\r\n        <WidgetStyle name=\"Active tab focused indicator\" styleID=\"0\" fgColor=\"FAAA3C\" bgColor=\"FF0000\" />\r\n        <WidgetStyle name=\"Active tab unfocused indicator\" styleID=\"0\" fgColor=\"FFCAB0\" bgColor=\"80FF00\" />\r\n        <WidgetStyle name=\"Active tab text\" styleID=\"0\" fgColor=\"000000\" />\r\n        <WidgetStyle name=\"Inactive tabs\" styleID=\"0\" fgColor=\"808080\" bgColor=\"C0C0C0\" />\r\n    </GlobalStyles>\r\n</NotepadPlus>\r\n"
  },
  {
    "path": "gui/themes/Ruby_Blue.xml",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\" ?>\r\n<!-- \r\nNotepad++ Custom stylers\r\nStyle name: \t\tPort Ruby Blue\r\nFile name: \t\t\tstylers.xml\r\nCreated by:\t\t\ttomsolo (aka tonoslo on sourceforge.net)\r\n\t\t\t\thttp://www.3276.hu\r\nFeatured language:\tPhp, Css, Sql, Javascript, Html, XML. \r\nNote: \t\t\tIf u create other languages with this style please send me the modified styler.xml : tonoslo at users.sourceforge.net (ty!)\r\nOther info:\t\t\tthis style is based on and inspired by Textmate (a Mac source editor, http:/www.textmate.org) user submitted theme:\r\n\t\t\t\tRuby Blue theme created by John W. Long, http://wiseheartdesign.com/articles/2006/03/11/ruby-blue-textmate-theme)\r\n\t\t\t\tThanks John!\r\n\t\t\t\tThis style available under the terms of the GNU Free License.\r\n\r\n\r\nRequirements: \r\n\t1. The style is based on DejaVu fonts, go to \r\n\thttp://dejavu.sourceforge.net/wiki/index.php/Main_Page\r\n\tand grab this font pack and install (use DejaVu Mono).\r\n\t2. Use Cleartype, for nice smooth font on screen (optional).\r\n\t3. Notepad 3.5 install :)\r\n\r\nInstall: copy your installed Notepad++ directory root, overwrite old stylers.xml (backup old file first), \r\nor copy c:\\Documents and Settings\\**USERNAME**\\Application Data\\Notepad++\\\r\noverwrite old stylers.xml (backup old file first)\r\n\r\n\r\nENJOY!\r\n\r\n\r\nIf u like, please donate Notepad++:\r\nhttp://sourceforge.net/donate/index.php?group_id=95717\r\n\r\n \r\n\r\n2006.03.27.\r\n-->\r\n<NotepadPlus>\r\n    <LexerStyles>\r\n        <LexerType name=\"c\" desc=\"C\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cpp\" desc=\"C++\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"java\" desc=\"Java\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cs\" desc=\"C#\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"rc\" desc=\"RC\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"tcl\" desc=\"TCL\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"objc\" desc=\"Objective-C\" ext=\"\">\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"19\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"QUALIFIER\" styleID=\"20\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"sql\" desc=\"SQL\" ext=\"\">\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"5\" fgColor=\"7BC22F\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"F4DD0B\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"8DB0D3\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"7\" fgColor=\"8DB0D3\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"F08047\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"3A8BDA\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"3A8BDA\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"html\" desc=\"HTML\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"3A8BDA\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"FF00FF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"6\" fgColor=\"8DB0D3\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"7\" fgColor=\"FFFF00\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"7BD827\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGEND\" styleID=\"11\" fgColor=\"7BD827\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGUNKNOWN\" styleID=\"2\" fgColor=\"FF0000\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"3\" fgColor=\"F0804F\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTEUNKNOWN\" styleID=\"4\" fgColor=\"FF0000\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SGMLDEFAULT\" styleID=\"21\" fgColor=\"FFFF00\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CDATA\" styleID=\"17\" fgColor=\"8080C0\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VALUE\" styleID=\"19\" fgColor=\"FFFF80\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ENTITY\" styleID=\"10\" fgColor=\"800080\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"php\" desc=\"php\" ext=\"\">\r\n            <WordsStyle name=\"QUESTION MARK\" styleID=\"18\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"118\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"119\" fgColor=\"FFFF80\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING VARIABLE\" styleID=\"126\" fgColor=\"FFFF80\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SIMPLESTRING\" styleID=\"120\" fgColor=\"F4DD0B\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"121\" fgColor=\"E6A82D\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"122\" fgColor=\"7BD827\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"123\" fgColor=\"8DB0D3\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"124\" fgColor=\"3A8BDA\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"125\" fgColor=\"3A8BDA\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"127\" fgColor=\"F0804F\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"javascript\" desc=\"Javascript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"41\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"45\" fgColor=\"FF00FF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"46\" fgColor=\"8DB0D3\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"47\" fgColor=\"FFFF80\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"48\" fgColor=\"F08047\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"49\" fgColor=\"F08047\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOLS\" styleID=\"50\" fgColor=\"7BD827\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"51\" fgColor=\"730080\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"52\" fgColor=\"FF00FF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"42\" fgColor=\"3A8BDA\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"43\" fgColor=\"3A8BDA\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTDOC\" styleID=\"44\" fgColor=\"3A8BDA\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"asp\" desc=\"asp\" ext=\"asp\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"81\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"82\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"83\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"84\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"85\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"87\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"86\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASPSYBOL\" styleID=\"15\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SCRIPTTYPE\" styleID=\"16\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"xml\" desc=\"XML\" ext=\"\">\r\n            <WordsStyle name=\"XMLSTART\" styleID=\"12\" fgColor=\"FF00FF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"XMLEND\" styleID=\"13\" fgColor=\"FF00FF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"8DB0D3\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"3A8BDA\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"6\" fgColor=\"F08047\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"7\" fgColor=\"F08047\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"8DB0D3\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGEND\" styleID=\"11\" fgColor=\"8DB0D3\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGUNKNOWN\" styleID=\"2\" fgColor=\"FF0000\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"3\" fgColor=\"7BC22F\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTEUNKNOWN\" styleID=\"4\" fgColor=\"FF0000\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SGMLDEFAULT\" styleID=\"21\" fgColor=\"FFFF80\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CDATA\" styleID=\"17\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"ini\" desc=\"ini file\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASSIGNMENT\" styleID=\"3\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFVAL\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"props\" desc=\"Properties file\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASSIGNMENT\" styleID=\"3\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFVAL\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"diff\" desc=\"DIFF\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HEADER\" styleID=\"3\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"POSITION\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DELETED\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ADDED\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"nfo\" desc=\"Dos Style\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"32\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontSize=\"\" fontStyle=\"0\" />\r\n        </LexerType>\r\n        <LexerType name=\"makefile\" desc=\"Makefile\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"3\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TARGET\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDEOL\" styleID=\"9\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"vb\" desc=\"VB / VBS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"3\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATE\" styleID=\"8\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"css\" desc=\"CSS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"7BD827\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS\" styleID=\"2\" fgColor=\"F4DD0B\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PSEUDOCLASS\" styleID=\"3\" fgColor=\"FFFF80\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"UNKNOWN_PSEUDOCLASS\" styleID=\"4\" fgColor=\"FF0000\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"5\" fgColor=\"FF00FF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"UNKNOWN_IDENTIFIER\" styleID=\"7\" fgColor=\"FF0000\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VALUE\" styleID=\"8\" fgColor=\"8DB0D3\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"3A8BDA\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ID\" styleID=\"10\" fgColor=\"F08047\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IMPORTANT\" styleID=\"11\" fgColor=\"FF00FF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"12\" fgColor=\"730080\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"pascal\" desc=\"Pascal\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"perl\" desc=\"Perl\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"17\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SCALAR\" styleID=\"12\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ARRAY\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HASH\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL TABLE\" styleID=\"15\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PUNCTUATION\" styleID=\"8\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"POD\" styleID=\"3\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"LONGQUOTE\" styleID=\"19\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATASECTION\" styleID=\"21\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGSUBST\" styleID=\"18\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"20\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"python\" desc=\"Python\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORDS\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TRIPLE\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TRIPLEDOUBLE\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASSNAME\" styleID=\"8\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFNAME\" styleID=\"9\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK\" styleID=\"12\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"12\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"batch\" desc=\"Batch\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORDS\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"3\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HIDE SYBOL\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"lua\" desc=\"Lua\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"LITERALSTRING\" styleID=\"8\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNC1\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"FUNC2\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"FUNC3\" styleID=\"15\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n        </LexerType>\r\n        <LexerType name=\"tex\" desc=\"TeX\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"1\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"GROUP\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"3\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"nsis\" desc=\"NSIS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING DOUBLE QUOTE\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING LEFT QUOTE\" styleID=\"3\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING RIGHT QUOTE\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"USER DEFINED\" styleID=\"8\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"9\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SUBSECTION\" styleID=\"10\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IF DEFINE\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"12\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING VAR\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"actionscript\" desc=\"ActionScript\" ext=\"\">\r\n            <!--\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"19\" fgColor=\"\" bgColor=\"\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n\t\t\t-->\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"20\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"bash\" desc=\"bash\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"8\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SCALAR\" styleID=\"9\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PARAM\" styleID=\"10\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE DELIM\" styleID=\"12\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE Q\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"fortran\" desc=\"Fortran\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"8\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION1\" styleID=\"9\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"FUNCTION2\" styleID=\"10\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR2\" styleID=\"12\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CONTINUATION\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"lisp\" desc=\"LISP\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION WORD\" styleID=\"3\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"8\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"9\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"asm\" desc=\"Assembler\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CPU INSTRUCTION\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"MATH INSTRUCTION\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"REGISTER\" styleID=\"8\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"9\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"DIRECTIVE OPERAND\" styleID=\"10\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"COMMENT BLOCK\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"12\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"EXT INSTRUCTION\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\" />\r\n        </LexerType>\r\n        <LexerType name=\"ruby\" desc=\"Ruby\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"POD\" styleID=\"3\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS NAME\" styleID=\"8\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEF NAME\" styleID=\"9\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"12\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MODULE NAME\" styleID=\"15\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTANCE VAR\" styleID=\"16\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS VAR\" styleID=\"17\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"18\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATA SECTION\" styleID=\"19\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING Q\" styleID=\"24\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"postscript\" desc=\"Postscript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DSC COMMENT\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DSC VALUE\" styleID=\"3\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Name\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"LITERAL\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IMMEVAL\" styleID=\"8\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAREN ARRAY\" styleID=\"9\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAREN DICT\" styleID=\"10\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAREN PROC\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"12\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HEX STRING\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BASE85 STRING\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BAD STRING CHAR\" styleID=\"15\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"vhdl\" desc=\"VHDL\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LIne\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"8\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STD OPERATOR\" styleID=\"9\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"10\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"9\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DIRECTIVE OPERAND\" styleID=\"10\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STD FUNCTION\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"STD PACKAGE\" styleID=\"12\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"STD TYPE\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"USER DEFINE\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type5\" />\r\n        </LexerType>\r\n        <LexerType name=\"smalltalk\" desc=\"Smalltalk\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"1\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"3\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BINARY\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BOOL\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SELF\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SUPER\" styleID=\"8\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NIL\" styleID=\"9\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"10\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"RETURN\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"12\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KWS END\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASSIGN\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"15\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SPECIAL SELECTOR\" styleID=\"16\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"searchResult\" desc=\"Search result\" ext=\"\">\r\n            <WordsStyle name=\"Default\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Search Header\" styleID=\"1\" fgColor=\"000080\" bgColor=\"BBBBFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"File Header\" styleID=\"2\" fgColor=\"008000\" bgColor=\"D5FFD5\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"Line Number\" styleID=\"3\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Hit Word\" styleID=\"4\" fgColor=\"FF0000\" bgColor=\"FFFFBF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Selected Line\" styleID=\"5\" fgColor=\"000080\" bgColor=\"FFFF4F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\">if else for while</WordsStyle>\r\n            <WordsStyle name=\"Current line background colour\" styleID=\"6\" bgColor=\"E8E8FF\" fgColor=\"0080FF\" fontSize=\"\" fontStyle=\"0\">bool long int char</WordsStyle>\r\n        </LexerType>\r\n    </LexerStyles>\r\n    <GlobalStyles>\r\n        <!-- Attention : Don't modify the name of styleID=\"0\" -->\r\n        <WidgetStyle name=\"Global override\" styleID=\"0\" fgColor=\"FFFF80\" bgColor=\"FF8000\" fontName=\"Courier New\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Default Style\" styleID=\"32\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"DejaVu Sans Mono\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Indent guideline style\" styleID=\"37\" fgColor=\"0080FF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Brace highlight style\" styleID=\"34\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Bad brace colour\" styleID=\"35\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Current line background colour\" styleID=\"0\" bgColor=\"273A4B\" fgColor=\"CCFF33\" fontSize=\"\" fontStyle=\"0\" />\r\n        <WidgetStyle name=\"Mark colour\" styleID=\"0\" fgColor=\"0080C0\" bgColor=\"B0D926\" />\r\n        <WidgetStyle name=\"Selected text colour\" styleID=\"0\" bgColor=\"0000FF\" fgColor=\"C00000\" fontStyle=\"0\" />\r\n        <WidgetStyle name=\"Caret colour\" styleID=\"2069\" fgColor=\"FFFFFF\" fontStyle=\"0\" bgColor=\"6699CC\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Find Mark Style\" styleID=\"31\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Edge colour\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"FF0000\" fontSize=\"\" fontStyle=\"1\" />\r\n        <WidgetStyle name=\"Line number margin\" styleID=\"33\" fgColor=\"FFFFFF\" bgColor=\"1F4661\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n        <WidgetStyle name=\"Fold\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"F0804F\" fontSize=\"\" fontStyle=\"0\" />\r\n        <WidgetStyle name=\"Fold margin\" styleID=\"0\" fgColor=\"4096BF\" bgColor=\"3476A3\" />\r\n        <WidgetStyle name=\"White space symbol\" styleID=\"0\" fgColor=\"FF8080\" bgColor=\"112435\" />\r\n        <WidgetStyle name=\"Smart HighLighting\" styleID=\"29\" bgColor=\"00FF00\" fgColor=\"555753\" />\r\n        <WidgetStyle name=\"Find Mark Style\" styleID=\"31\" bgColor=\"FF0000\" fgColor=\"FCAF3E\" />\r\n        <WidgetStyle name=\"Mark Style 1\" styleID=\"25\" bgColor=\"00FFFF\" />\r\n        <WidgetStyle name=\"Mark Style 2\" styleID=\"24\" bgColor=\"FF8000\" />\r\n        <WidgetStyle name=\"Mark Style 3\" styleID=\"23\" bgColor=\"FFFF00\" />\r\n        <WidgetStyle name=\"Mark Style 4\" styleID=\"22\" bgColor=\"8000FF\" />\r\n        <WidgetStyle name=\"Mark Style 5\" styleID=\"21\" bgColor=\"008000\" />\r\n        <WidgetStyle name=\"Incremental highlight all\" styleID=\"28\" bgColor=\"0080FF\" fgColor=\"FFCAB0\" />\r\n        <WidgetStyle name=\"Tags match highlighting\" styleID=\"27\" bgColor=\"8000FF\" fgColor=\"000000\" />\r\n        <WidgetStyle name=\"Tags attribute\" styleID=\"26\" bgColor=\"FFFF00\" fgColor=\"8080C0\" />\r\n        <WidgetStyle name=\"Active tab focused indicator\" styleID=\"0\" fgColor=\"FAAA3C\" bgColor=\"FF0000\" />\r\n        <WidgetStyle name=\"Active tab unfocused indicator\" styleID=\"0\" fgColor=\"FFCAB0\" bgColor=\"80FF00\" />\r\n        <WidgetStyle name=\"Active tab text\" styleID=\"0\" fgColor=\"000000\" />\r\n        <WidgetStyle name=\"Inactive tabs\" styleID=\"0\" fgColor=\"808080\" bgColor=\"C0C0C0\" />\r\n    </GlobalStyles>\r\n</NotepadPlus>\r\n"
  },
  {
    "path": "gui/themes/Solarized.xml",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\" ?>\r\n<!--//\r\nFile Name:           Solarized.xml\r\nStyle Name:          Solarized\r\nDescription:         Solarized theme for Notepad++.\r\n                     Based on Solarized by Ethan Schoonover\r\n                     Official Solarized home page: http://ethanschoonover.com/solarized\r\nCommpliance:         Nearly complete (see README.txt for exceptions).\r\nSupported languages: All the languages supported by release 5.9.8\r\nCreated by:          Paul Neubauer (PaulRNeubauer at gmail dot com)\r\nLast Modified:       7:04 AM 5/29/2012\r\nReleased:            3/7/2012\r\nLicense:             Feel free to modify this theme. \r\n                     This theme is available under the terms of the Creative Commons\r\n                     Attribution 3.0 Unported License. You are free to to copy,\r\n                     distribute and transmit the work, to adapt the work, or to make\r\n                     commercial use of the work under the condition that you must\r\n                     attribute the work in the manner specified by the author or\r\n                     licensor (but not in any way that suggests that they endorse you\r\n                     or your use of the work). See\r\n                     http://creativecommons.org/licenses/by/3.0/ \r\n                     for a legal description of the license terms. Briefly, this\r\n                     means: please note in derivatives of this theme, that they are\r\n                     based on my work. Of course, if you are using this file as no\r\n                     more than a framework for an entirely different color scheme, you\r\n                     may, and should, omit such attribution.\r\n\r\nRequirements:\r\n    * This theme is based on the Inconsolata-dz font http://media.nodnod.net/Inconsolata-dz.otf.zip\r\n      However, that font may be replaced in the \"GlobalStyles\" section of this \r\n      file, where it is found in only the \"Global override\" and \"Default Style\" lines.\r\n      Fonts are not separately specified anywhere else in this version of the style file.\r\n      Note 3/29/2012: I have replaced Inconsola-dz with Consolas, since Consolas is\r\n      installed by default in recent versions of Windows.\r\n      \r\n    * Notepad++, of course.\r\n\r\nInstallation:\r\n    Copy this file to C:\\Program Files (x86)\\Notepad++\\themes  OR\r\n    For WindowsXP:\r\n    Copy this file to C:\\Documents and Settings\\%%USERNAME%%\\Application Data\\Notepad++\\themes\r\n    For Windows Vista or 7:\r\n    Copy this file to C:\\Users\\%%USERNAME%%\\AppData\\Roaming\\Notepad++\\themes\r\n\r\n//-->\r\n<NotepadPlus>\r\n    <LexerStyles>\r\n        <LexerType name=\"actionscript\" desc=\"ActionScript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"20\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"DC322F\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"D33682\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"ada\" desc=\"ADA\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"1\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"2\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DELIMITER\" styleID=\"4\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"5\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER EOL\" styleID=\"6\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"7\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"8\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"9\" fgColor=\"CB4B16\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"10\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"ILLEGAL\" styleID=\"11\" fgColor=\"D33682\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"asm\" desc=\"Assembly\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"4\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"5\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CPU INSTRUCTION\" styleID=\"6\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"MATH INSTRUCTION\" styleID=\"7\" fgColor=\"6C71C4\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"REGISTER\" styleID=\"8\" fgColor=\"CB4B16\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"9\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"DIRECTIVE OPERAND\" styleID=\"10\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"COMMENT BLOCK\" styleID=\"11\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"12\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"EXT INSTRUCTION\" styleID=\"14\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\" />\r\n        </LexerType>\r\n        <LexerType name=\"asp\" desc=\"asp\" ext=\"asp\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"81\" fgColor=\"839496\" bgColor=\"083C4B\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"82\" fgColor=\"586E75\" bgColor=\"083C4B\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"83\" fgColor=\"2AA198\" bgColor=\"083C4B\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"84\" fgColor=\"859900\" bgColor=\"083C4B\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"85\" fgColor=\"2AA198\" bgColor=\"083C4B\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"86\" fgColor=\"B58900\" bgColor=\"083C4B\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASPSYBOL\" styleID=\"15\" fgColor=\"DC322F\" bgColor=\"083C4B\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SCRIPTTYPE\" styleID=\"16\" fgColor=\"CB4B16\" bgColor=\"083C4B\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"autoit\" desc=\"autoIt\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"1\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"2\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"4\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"6\" fgColor=\"CB4B16\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"7\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"8\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"9\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SENT\" styleID=\"10\" fgColor=\"CB4B16\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"11\" fgColor=\"DC322F\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"12\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"EXPAND\" styleID=\"13\" fgColor=\"DC322F\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type5\" />\r\n            <WordsStyle name=\"COMOBJ\" styleID=\"14\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"bash\" desc=\"bash\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"D33682\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"4\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"5\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"6\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"8\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SCALAR\" styleID=\"9\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"PARAM\" styleID=\"10\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"11\" fgColor=\"CB4B16\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE DELIM\" styleID=\"12\" fgColor=\"DC322F\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE Q\" styleID=\"13\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"batch\" desc=\"Batch\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORDS\" styleID=\"2\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"3\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HIDE SYBOL\" styleID=\"4\" fgColor=\"6C71C4\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"5\" fgColor=\"CB4B16\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"6\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"c\" desc=\"C\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"DC322F\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPEWORD\" styleID=\"16\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"D33682\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"caml\" desc=\"Caml\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGNAME\" styleID=\"2\" fgColor=\"CB4B16\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"3\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"BUILIN FUNC &amp; TYPE\" styleID=\"4\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"TYPE\" styleID=\"5\" fgColor=\"6C71C4\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"LINENUM\" styleID=\"6\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"8\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"9\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"11\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"13\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"14\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cmake\" desc=\"CMakeFile\" ext=\"cmake\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING D\" styleID=\"2\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING L\" styleID=\"3\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING R\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"5\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"PARAMETER\" styleID=\"6\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"7\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"USER DEFINED\" styleID=\"8\" fgColor=\"6C71C4\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"WHILEDEF\" styleID=\"9\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FOREACHDEF\" styleID=\"10\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IFDEF\" styleID=\"11\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MACRODEF\" styleID=\"12\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING VARIABLE\" styleID=\"13\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"14\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cobol\" desc=\"COBOL\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"DC322F\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DECLARATION\" styleID=\"5\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"16\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"8\" fgColor=\"6C71C4\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"D33682\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cpp\" desc=\"C++\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"DC322F\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"D33682\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cs\" desc=\"C#\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"DC322F\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"D33682\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"css\" desc=\"CSS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS\" styleID=\"2\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PSEUDOCLASS\" styleID=\"3\" fgColor=\"CB4B16\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"UNKNOWN_PSEUDOCLASS\" styleID=\"4\" fgColor=\"DC322F\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"5\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"6\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"UNKNOWN_IDENTIFIER\" styleID=\"7\" fgColor=\"D33682\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VALUE\" styleID=\"8\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"ID\" styleID=\"10\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IMPORTANT\" styleID=\"11\" fgColor=\"DC322F\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"12\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"13\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"14\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"d\" desc=\"D\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"14\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"6\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"KEYWORD1\" styleID=\"7\" fgColor=\"6C71C4\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\"/>\r\n            <WordsStyle name=\"KEYWORD2\" styleID=\"8\" fgColor=\"6C71C4\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\"/>\r\n            <WordsStyle name=\"KEYWORD3\" styleID=\"9\" fgColor=\"6C71C4\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\"/>\r\n            <WordsStyle name=\"KEYWORD4\" styleID=\"20\" fgColor=\"6C71C4\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\"/>\r\n            <WordsStyle name=\"KEYWORD5\" styleID=\"21\" fgColor=\"6C71C4\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\"/>\r\n            <WordsStyle name=\"KEYWORD6\" styleID=\"22\" fgColor=\"6C71C4\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type5\"/>\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"10\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"12\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"13\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT NESTED\" styleID=\"4\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"16\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"17\" fgColor=\"D33682\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n         </LexerType>\r\n        <LexerType name=\"diff\" desc=\"DIFF\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"2\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HEADER\" styleID=\"3\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"POSITION\" styleID=\"4\" fgColor=\"CB4B16\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DELETED\" styleID=\"5\" fgColor=\"6C71C4\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"ADDED\" styleID=\"6\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"fortran\" desc=\"Fortran\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"5\" fgColor=\"DC322F\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"8\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION1\" styleID=\"9\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"FUNCTION2\" styleID=\"10\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"11\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR2\" styleID=\"12\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"13\" fgColor=\"CB4B16\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CONTINUATION\" styleID=\"14\" fgColor=\"D33682\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"gui4cli\" desc=\"GUI4CLI\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"1\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"2\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"5\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"EVENT\" styleID=\"5\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"16\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"CONTROL\" styleID=\"16\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"16\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"haskell\" desc=\"Haskell\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"2\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"5\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS\" styleID=\"6\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MODULE\" styleID=\"7\" fgColor=\"CB4B16\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CAPITAL\" styleID=\"8\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATA\" styleID=\"9\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IMPORT\" styleID=\"10\" fgColor=\"DC322F\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"11\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTANCE\" styleID=\"12\" fgColor=\"6C71C4\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"13\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK\" styleID=\"14\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK2\" styleID=\"15\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK3\" styleID=\"16\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"html\" desc=\"HTML\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"D33682\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"6\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"7\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGEND\" styleID=\"11\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGUNKNOWN\" styleID=\"2\" fgColor=\"D33682\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"3\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTEUNKNOWN\" styleID=\"4\" fgColor=\"D33682\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SGMLDEFAULT\" styleID=\"21\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CDATA\" styleID=\"17\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VALUE\" styleID=\"19\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ENTITY\" styleID=\"10\" fgColor=\"6C71C4\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"ini\" desc=\"ini file\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"2\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASSIGNMENT\" styleID=\"3\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFVAL\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"inno\" desc=\"InnoSetup\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"2\" fgColor=\"CB4B16\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"PARAMETER\" styleID=\"3\" fgColor=\"6C71C4\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"4\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR INLINE\" styleID=\"6\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT PASCAL\" styleID=\"7\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD PASCAL\" styleID=\"8\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"KEYWORD USER\" styleID=\"9\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"STRING DOUBLE\" styleID=\"10\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING SINGLE\" styleID=\"11\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"12\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"java\" desc=\"Java\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"DC322F\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"D33682\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"javascript\" desc=\"Javascript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"41\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"45\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"46\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"47\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"48\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"49\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOLS\" styleID=\"50\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"51\" fgColor=\"DC322F\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"52\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"42\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"43\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTDOC\" styleID=\"44\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"3\" fontSize=\"\">param @projectDescription projectDescription @param</WordsStyle>\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"D33682\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"kix\" desc=\"KiXtart\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"31\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"2\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"3\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VAR\" styleID=\"5\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"6\" fgColor=\"CB4B16\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"7\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"8\" fgColor=\"6C71C4\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"9\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"lisp\" desc=\"LISP\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION WORD\" styleID=\"3\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION WORD2\" styleID=\"4\" fgColor=\"6C71C4\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"5\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"8\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"9\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"11\" fgColor=\"CB4B16\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"lua\" desc=\"Lua\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"LITERALSTRING\" styleID=\"8\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"DC322F\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNC1\" styleID=\"13\" fgColor=\"CB4B16\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"FUNC2\" styleID=\"14\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"FUNC3\" styleID=\"15\" fgColor=\"6C71C4\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n        </LexerType>\r\n        <LexerType name=\"makefile\" desc=\"Makefile\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"2\" fgColor=\"CB4B16\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"3\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"4\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TARGET\" styleID=\"5\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDEOL\" styleID=\"9\" fgColor=\"CB4B16\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"matlab\" desc=\"Matlab\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"2\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"4\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"5\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLE QUOTE STRING\" styleID=\"8\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n\t\t<LexerType name=\"nfo\" desc=\"Dos Style\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"32\" fgColor=\"839496\" bgColor=\"002B36\" fontSize=\"\" fontStyle=\"0\" />\r\n        </LexerType>\r\n        <LexerType name=\"nsis\" desc=\"NSIS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING DOUBLE QUOTE\" styleID=\"2\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING LEFT QUOTE\" styleID=\"3\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING RIGHT QUOTE\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"5\" fgColor=\"CB4B16\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"6\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"7\" fgColor=\"6C71C4\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"USER DEFINED\" styleID=\"8\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"9\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SUBSECTION\" styleID=\"10\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IF DEFINE\" styleID=\"11\" fgColor=\"DC322F\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"12\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING VAR\" styleID=\"13\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"14\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SECTION GROUP\" styleID=\"15\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAGE EX\" styleID=\"16\" fgColor=\"DC322F\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION DEFINITIONS\" styleID=\"17\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"18\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"objc\" desc=\"Objective-C\" ext=\"\">\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"19\" fgColor=\"CB4B16\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"QUALIFIER\" styleID=\"20\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"DC322F\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"D33682\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"pascal\" desc=\"Pascal\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"2\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"3\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"4\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"DC322F\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR2\" styleID=\"6\" fgColor=\"DC322F\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"7\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HEX NUMBER\" styleID=\"8\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"9\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"10\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"12\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"13\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASM\" styleID=\"14\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"perl\" desc=\"Perl\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"DC322F\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"17\" fgColor=\"6C71C4\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGSUBST\" styleID=\"18\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SCALAR\" styleID=\"12\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ARRAY\" styleID=\"13\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HASH\" styleID=\"14\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL TABLE\" styleID=\"15\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PUNCTUATION\" styleID=\"8\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"POD\" styleID=\"3\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"POD VERB\" styleID=\"31\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"D33682\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"LONGQUOTE\" styleID=\"19\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATASECTION\" styleID=\"21\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"20\" fgColor=\"EEE8D5\" bgColor=\"6C71C4\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE DELIM\" styleID=\"22\" fgColor=\"CB4B16\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE Q\" styleID=\"23\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE QQ\" styleID=\"24\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE QX\" styleID=\"25\" fgColor=\"EEE8D5\" bgColor=\"6C71C4\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING Q\" styleID=\"26\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING QQ\" styleID=\"27\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING QX\" styleID=\"28\" fgColor=\"EEE8D5\" bgColor=\"6C71C4\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING QR\" styleID=\"29\" fgColor=\"6C71C4\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING QW\" styleID=\"30\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FORMAT IDENT\" styleID=\"41\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FORMAT\" styleID=\"42\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n       </LexerType>\r\n        <LexerType name=\"php\" desc=\"php\" ext=\"\">\r\n            <WordsStyle name=\"QUESTION MARK\" styleID=\"18\" fgColor=\"DC322F\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"118\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"119\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING VARIABLE\" styleID=\"126\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SIMPLESTRING\" styleID=\"120\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"121\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"122\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"123\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"124\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"125\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"127\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"postscript\" desc=\"Postscript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"DSC COMMENT\" styleID=\"2\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"DSC VALUE\" styleID=\"3\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Name\" styleID=\"5\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"6\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"LITERAL\" styleID=\"7\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IMMEVAL\" styleID=\"8\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAREN ARRAY\" styleID=\"9\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAREN DICT\" styleID=\"10\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAREN PROC\" styleID=\"11\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"12\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HEX STRING\" styleID=\"13\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BASE85 STRING\" styleID=\"14\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BAD STRING CHAR\" styleID=\"15\" fgColor=\"D33682\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"powershell\" desc=\"PowerShell\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"2\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"3\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"5\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"8\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"CMDLET\" styleID=\"9\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"ALIAS\" styleID=\"10\" fgColor=\"CB4B16\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n        </LexerType>\r\n        <LexerType name=\"props\" desc=\"Properties file\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"2\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASSIGNMENT\" styleID=\"3\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFVAL\" styleID=\"4\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"python\" desc=\"Python\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORDS\" styleID=\"5\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TRIPLE\" styleID=\"6\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TRIPLEDOUBLE\" styleID=\"7\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASSNAME\" styleID=\"8\" fgColor=\"CB4B16\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFNAME\" styleID=\"9\" fgColor=\"CB4B16\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK\" styleID=\"12\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"12\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"r\" desc=\"R\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"2\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"BASE WORD\" styleID=\"3\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"4\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"7\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"8\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INFIX\" styleID=\"10\" fgColor=\"CB4B16\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"rc\" desc=\"RC\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"DC322F\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"CB4B16\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"D33682\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"ruby\" desc=\"Ruby\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"DC322F\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"2\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"POD\" styleID=\"3\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"5\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS NAME\" styleID=\"8\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEF NAME\" styleID=\"9\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"12\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"13\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"14\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MODULE NAME\" styleID=\"15\" fgColor=\"CB4B16\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTANCE VAR\" styleID=\"16\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS VAR\" styleID=\"17\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"18\" fgColor=\"EEE8D5\" bgColor=\"6C71C4\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATA SECTION\" styleID=\"19\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING Q\" styleID=\"24\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BOOLEAN\" styleID=\"25\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n        </LexerType>\r\n        <LexerType name=\"scheme\" desc=\"Scheme\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION WORD\" styleID=\"3\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION WORD2\" styleID=\"4\" fgColor=\"6C71C4\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"5\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"9\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"11\" fgColor=\"CB4B16\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"searchResult\" desc=\"Search result\" ext=\"\">\r\n            <WordsStyle name=\"Default\" styleID=\"0\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Search Header\" styleID=\"1\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"File Header\" styleID=\"2\" fgColor=\"CB4B16\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Line Number\" styleID=\"3\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Hit Word\" styleID=\"4\" fgColor=\"B58900\" bgColor=\"6C71C4\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Selected Line\" styleID=\"5\" fgColor=\"839496\" bgColor=\"EEE8D5\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Current line background colour\" styleID=\"6\" bgColor=\"073642\" />\r\n        </LexerType>\r\n        <LexerType name=\"smalltalk\" desc=\"Smalltalk\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"1\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"3\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"4\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BINARY\" styleID=\"5\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BOOL\" styleID=\"6\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SELF\" styleID=\"7\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SUPER\" styleID=\"8\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NIL\" styleID=\"9\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"10\" fgColor=\"CB4B16\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"RETURN\" styleID=\"11\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"12\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KWS END\" styleID=\"13\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASSIGN\" styleID=\"14\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"15\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SPECIAL SELECTOR\" styleID=\"16\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"sql\" desc=\"SQL\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"5\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"7\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n\t\t</LexerType>\r\n        <LexerType name=\"tcl\" desc=\"TCL\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MODIFIER\" styleID=\"10\" fgColor=\"CB4B16\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"EXPAND\" styleID=\"11\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"12\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"13\" fgColor=\"6C71C4\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SUB BRACE\" styleID=\"9\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SUBSTITUTION\" styleID=\"8\" fgColor=\"6C71C4\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD IN QUOTE\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IN QUOTE\" styleID=\"5\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT BOX\" styleID=\"17\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"BLOCK COMMENT\" styleID=\"18\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"tex\" desc=\"TeX\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"1\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"GROUP\" styleID=\"2\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"3\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"4\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"5\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"vb\" desc=\"VB / VBS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"7\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"3\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"DC322F\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATE\" styleID=\"8\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"verilog\" desc=\"Verilog\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGNAME\" styleID=\"2\" fgColor=\"CB4B16\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"7\" fgColor=\"6C71C4\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"DC322F\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE BANG\" styleID=\"3\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"12\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"USER\" styleID=\"19\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"vhdl\" desc=\"VHDL\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LIne\" styleID=\"2\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"5\" fgColor=\"93A1A1\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"6\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"7\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"8\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STD OPERATOR\" styleID=\"9\" fgColor=\"CB4B16\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"10\" fgColor=\"6C71C4\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"9\" fgColor=\"DC322F\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DIRECTIVE OPERAND\" styleID=\"10\" fgColor=\"DC322F\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STD FUNCTION\" styleID=\"11\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"STD PACKAGE\" styleID=\"12\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"STD TYPE\" styleID=\"13\" fgColor=\"CB4B16\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"USER DEFINE\" styleID=\"14\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type5\" />\r\n        </LexerType>\r\n        <LexerType name=\"xml\" desc=\"XML\" ext=\"\">\r\n            <WordsStyle name=\"XMLSTART\" styleID=\"12\" fgColor=\"DC322F\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"XMLEND\" styleID=\"13\" fgColor=\"DC322F\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"D33682\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"6\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"7\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGEND\" styleID=\"11\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGUNKNOWN\" styleID=\"2\" fgColor=\"D33682\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"3\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTEUNKNOWN\" styleID=\"4\" fgColor=\"D33682\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SGMLDEFAULT\" styleID=\"21\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CDATA\" styleID=\"17\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"yaml\" desc=\"YAML\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"2\" fgColor=\"B58900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"3\" fgColor=\"859900\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REFERENCE\" styleID=\"5\" fgColor=\"268BD2\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOCUMENT\" styleID=\"6\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"7\" fgColor=\"2AA198\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"8\" fgColor=\"D33682\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n    </LexerStyles>\r\n    <GlobalStyles>\r\n        <!-- Attention : Don't modify the name of styleID=\"0\" -->\r\n        <WidgetStyle name=\"Global override\" styleID=\"0\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"Consolas\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Default Style\" styleID=\"32\" fgColor=\"839496\" bgColor=\"002B36\" fontName=\"Consolas\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Indent guideline style\" styleID=\"37\" fgColor=\"586E75\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Brace highlight style\" styleID=\"34\" fgColor=\"DC322F\" bgColor=\"859900\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Bad brace colour\" styleID=\"35\" fgColor=\"D33682\" bgColor=\"002B36\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Current line background colour\" styleID=\"0\" bgColor=\"073642\" />\r\n        <WidgetStyle name=\"Selected text colour\" styleID=\"0\" bgColor=\"EEE8D5\" />\r\n        <WidgetStyle name=\"Caret colour\" styleID=\"2069\" fgColor=\"EEE8D5\" />\r\n        <WidgetStyle name=\"Edge colour\" styleID=\"0\" fgColor=\"586E75\" />\r\n        <WidgetStyle name=\"Line number margin\" styleID=\"33\" fgColor=\"586E75\" bgColor=\"073642\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Fold\" styleID=\"0\" fgColor=\"586E75\" bgColor=\"073642\" />\r\n        <WidgetStyle name=\"Fold active\" styleID=\"0\" fgColor=\"DC322F\" />\r\n        <WidgetStyle name=\"Fold margin\" styleID=\"0\" fgColor=\"586E75\" bgColor=\"073642\" />\r\n        <WidgetStyle name=\"White space symbol\" styleID=\"0\" fgColor=\"B58900\" />\r\n        <WidgetStyle name=\"Smart HighLighting\" styleID=\"29\" bgColor=\"FDF6E3\" />\r\n        <WidgetStyle name=\"Find Mark Style\" styleID=\"31\" bgColor=\"6C71C4\" />\r\n        <WidgetStyle name=\"Mark Style 1\" styleID=\"25\" bgColor=\"DC322F\" />\r\n        <WidgetStyle name=\"Mark Style 2\" styleID=\"24\" bgColor=\"268BD2\" />\r\n        <WidgetStyle name=\"Mark Style 3\" styleID=\"23\" bgColor=\"2AA198\" />\r\n        <WidgetStyle name=\"Mark Style 4\" styleID=\"22\" bgColor=\"859900\" />\r\n        <WidgetStyle name=\"Mark Style 5\" styleID=\"21\" bgColor=\"B58900\" />\r\n        <WidgetStyle name=\"Incremental highlight all\" styleID=\"28\" bgColor=\"002B36\" />\r\n        <WidgetStyle name=\"Tags match highlighting\" styleID=\"27\" bgColor=\"CB4B16\" />\r\n        <WidgetStyle name=\"Tags attribute\" styleID=\"26\" bgColor=\"CB4B16\" />\r\n        <WidgetStyle name=\"Active tab focused indicator\" styleID=\"0\" fgColor=\"CB4B16\" />\r\n        <WidgetStyle name=\"Active tab unfocused indicator\" styleID=\"0\" fgColor=\"002B36\" />\r\n        <WidgetStyle name=\"Active tab text\" styleID=\"0\" fgColor=\"000000\" />\r\n        <WidgetStyle name=\"Inactive tabs\" styleID=\"0\" fgColor=\"EEE8D5\" bgColor=\"586E75\" />\r\n    </GlobalStyles>\r\n</NotepadPlus>"
  },
  {
    "path": "gui/themes/Solarized_light.xml",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\" ?>\r\n<!--//\r\nFile Name:           Solarized-light.xml\r\nStyle Name:          Solarized-light\r\nDescription:         Solarized theme for Notepad++.\r\n                     Based on Solarized by Ethan Schoonover\r\n                     Official Solarized home page: http://ethanschoonover.com/solarized\r\nCommpliance:         Nearly complete (see README.txt for exceptions).\r\nSupported languages: All the languages supported by release 5.9.8\r\nCreated by:          Paul Neubauer (PaulRNeubauer at gmail dot com)\r\nLast Modified:       7:04 AM 5/29/2012\r\nReleased:            3/7/2012\r\nLicense:             Feel free to modify this theme. \r\n                     This theme is available under the terms of the Creative Commons\r\n                     Attribution 3.0 Unported License. You are free to to copy,\r\n                     distribute and transmit the work, to adapt the work, or to make\r\n                     commercial use of the work under the condition that you must\r\n                     attribute the work in the manner specified by the author or\r\n                     licensor (but not in any way that suggests that they endorse you\r\n                     or your use of the work). See\r\n                     http://creativecommons.org/licenses/by/3.0/ \r\n                     for a legal description of the license terms. Briefly, this\r\n                     means: please note in derivatives of this theme, that they are\r\n                     based on my work. Of course, if you are using this file as no\r\n                     more than a framework for an entirely different color scheme, you\r\n                     may, and should, omit such attribution.\r\n\r\nRequirements:\r\n    * This theme is based on the Inconsolata-dz font http://media.nodnod.net/Inconsolata-dz.otf.zip\r\n      However, that font may be replaced in the \"GlobalStyles\" section of this \r\n      file, where it is found in only the \"Global override\" and \"Default Style\" lines.\r\n      Fonts are not separately specified anywhere else in this version of the style file.\r\n      Note 3/29/2012: I have replaced Inconsola-dz with Consolas, since Consolas is\r\n      installed by default in recent versions of Windows.\r\n      \r\n    * Notepad++, of course.\r\n\r\nInstallation:\r\n    Copy this file to C:\\Program Files (x86)\\Notepad++\\themes  OR\r\n    For WindowsXP:\r\n    Copy this file to C:\\Documents and Settings\\%%USERNAME%%\\Application Data\\Notepad++\\themes\r\n    For Windows Vista or 7:\r\n    Copy this file to C:\\Users\\%%USERNAME%%\\AppData\\Roaming\\Notepad++\\themes\r\n\r\n//-->\r\n<NotepadPlus>\r\n    <LexerStyles>\r\n        <LexerType name=\"actionscript\" desc=\"ActionScript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"20\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"DC322F\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"D33682\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"ada\" desc=\"ADA\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"1\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"2\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DELIMITER\" styleID=\"4\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"5\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER EOL\" styleID=\"6\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"7\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"8\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"9\" fgColor=\"CB4B16\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"10\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"ILLEGAL\" styleID=\"11\" fgColor=\"D33682\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"asm\" desc=\"Assembly\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"4\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"5\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CPU INSTRUCTION\" styleID=\"6\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"MATH INSTRUCTION\" styleID=\"7\" fgColor=\"6C71C4\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"REGISTER\" styleID=\"8\" fgColor=\"CB4B16\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"9\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"DIRECTIVE OPERAND\" styleID=\"10\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"COMMENT BLOCK\" styleID=\"11\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"12\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"EXT INSTRUCTION\" styleID=\"14\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\" />\r\n        </LexerType>\r\n        <LexerType name=\"asp\" desc=\"asp\" ext=\"asp\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"81\" fgColor=\"657B83\" bgColor=\"E8DFC6\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"82\" fgColor=\"93A1A1\" bgColor=\"E8DFC6\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"83\" fgColor=\"2AA198\" bgColor=\"E8DFC6\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"84\" fgColor=\"859900\" bgColor=\"E8DFC6\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"85\" fgColor=\"2AA198\" bgColor=\"E8DFC6\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"86\" fgColor=\"B58900\" bgColor=\"E8DFC6\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASPSYBOL\" styleID=\"15\" fgColor=\"DC322F\" bgColor=\"E8DFC6\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SCRIPTTYPE\" styleID=\"16\" fgColor=\"CB4B16\" bgColor=\"E8DFC6\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"autoit\" desc=\"autoIt\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"1\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"2\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"4\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"6\" fgColor=\"CB4B16\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"7\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"8\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"9\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SENT\" styleID=\"10\" fgColor=\"CB4B16\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"11\" fgColor=\"DC322F\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"12\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"EXPAND\" styleID=\"13\" fgColor=\"DC322F\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type5\" />\r\n            <WordsStyle name=\"COMOBJ\" styleID=\"14\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"bash\" desc=\"bash\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"D33682\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"4\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"5\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"6\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"8\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SCALAR\" styleID=\"9\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"PARAM\" styleID=\"10\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"11\" fgColor=\"CB4B16\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE DELIM\" styleID=\"12\" fgColor=\"DC322F\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE Q\" styleID=\"13\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"batch\" desc=\"Batch\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORDS\" styleID=\"2\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"3\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HIDE SYBOL\" styleID=\"4\" fgColor=\"6C71C4\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"5\" fgColor=\"CB4B16\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"6\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"c\" desc=\"C\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"DC322F\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPEWORD\" styleID=\"16\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"D33682\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"caml\" desc=\"Caml\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGNAME\" styleID=\"2\" fgColor=\"CB4B16\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"3\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"BUILIN FUNC &amp; TYPE\" styleID=\"4\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"TYPE\" styleID=\"5\" fgColor=\"6C71C4\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"LINENUM\" styleID=\"6\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"8\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"9\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"11\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"13\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"14\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cmake\" desc=\"CMakeFile\" ext=\"cmake\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING D\" styleID=\"2\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING L\" styleID=\"3\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING R\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"5\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"PARAMETER\" styleID=\"6\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"7\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"USER DEFINED\" styleID=\"8\" fgColor=\"6C71C4\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"WHILEDEF\" styleID=\"9\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FOREACHDEF\" styleID=\"10\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IFDEF\" styleID=\"11\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MACRODEF\" styleID=\"12\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING VARIABLE\" styleID=\"13\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"14\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cobol\" desc=\"COBOL\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"DC322F\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DECLARATION\" styleID=\"5\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"16\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"8\" fgColor=\"6C71C4\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"D33682\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cpp\" desc=\"C++\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"DC322F\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"D33682\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cs\" desc=\"C#\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"DC322F\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"D33682\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"css\" desc=\"CSS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS\" styleID=\"2\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PSEUDOCLASS\" styleID=\"3\" fgColor=\"CB4B16\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"UNKNOWN_PSEUDOCLASS\" styleID=\"4\" fgColor=\"DC322F\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"5\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"6\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"UNKNOWN_IDENTIFIER\" styleID=\"7\" fgColor=\"D33682\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VALUE\" styleID=\"8\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"ID\" styleID=\"10\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IMPORTANT\" styleID=\"11\" fgColor=\"DC322F\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"12\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"13\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"14\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"d\" desc=\"D\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"14\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"6\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"KEYWORD1\" styleID=\"7\" fgColor=\"6C71C4\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\"/>\r\n            <WordsStyle name=\"KEYWORD2\" styleID=\"8\" fgColor=\"6C71C4\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\"/>\r\n            <WordsStyle name=\"KEYWORD3\" styleID=\"9\" fgColor=\"6C71C4\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\"/>\r\n            <WordsStyle name=\"KEYWORD4\" styleID=\"20\" fgColor=\"6C71C4\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\"/>\r\n            <WordsStyle name=\"KEYWORD5\" styleID=\"21\" fgColor=\"6C71C4\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\"/>\r\n            <WordsStyle name=\"KEYWORD6\" styleID=\"22\" fgColor=\"6C71C4\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type5\"/>\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"10\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"12\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"13\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT NESTED\" styleID=\"4\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"16\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"17\" fgColor=\"D33682\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n         </LexerType>\r\n        <LexerType name=\"diff\" desc=\"DIFF\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"2\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HEADER\" styleID=\"3\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"POSITION\" styleID=\"4\" fgColor=\"CB4B16\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DELETED\" styleID=\"5\" fgColor=\"6C71C4\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"ADDED\" styleID=\"6\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"fortran\" desc=\"Fortran\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"5\" fgColor=\"DC322F\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"8\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION1\" styleID=\"9\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"FUNCTION2\" styleID=\"10\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"11\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR2\" styleID=\"12\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"13\" fgColor=\"CB4B16\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CONTINUATION\" styleID=\"14\" fgColor=\"D33682\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"gui4cli\" desc=\"GUI4CLI\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"1\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"2\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"5\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"EVENT\" styleID=\"5\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"16\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"CONTROL\" styleID=\"16\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"16\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"haskell\" desc=\"Haskell\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"2\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"5\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS\" styleID=\"6\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MODULE\" styleID=\"7\" fgColor=\"CB4B16\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CAPITAL\" styleID=\"8\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATA\" styleID=\"9\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IMPORT\" styleID=\"10\" fgColor=\"DC322F\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"11\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTANCE\" styleID=\"12\" fgColor=\"6C71C4\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"13\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK\" styleID=\"14\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK2\" styleID=\"15\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK3\" styleID=\"16\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"html\" desc=\"HTML\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"D33682\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"6\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"7\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGEND\" styleID=\"11\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGUNKNOWN\" styleID=\"2\" fgColor=\"D33682\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"3\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTEUNKNOWN\" styleID=\"4\" fgColor=\"D33682\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SGMLDEFAULT\" styleID=\"21\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CDATA\" styleID=\"17\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VALUE\" styleID=\"19\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ENTITY\" styleID=\"10\" fgColor=\"6C71C4\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"ini\" desc=\"ini file\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"2\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASSIGNMENT\" styleID=\"3\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFVAL\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"inno\" desc=\"InnoSetup\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"2\" fgColor=\"CB4B16\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"PARAMETER\" styleID=\"3\" fgColor=\"6C71C4\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"4\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR INLINE\" styleID=\"6\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT PASCAL\" styleID=\"7\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD PASCAL\" styleID=\"8\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"KEYWORD USER\" styleID=\"9\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"STRING DOUBLE\" styleID=\"10\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING SINGLE\" styleID=\"11\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"12\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"java\" desc=\"Java\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"DC322F\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"D33682\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"javascript\" desc=\"Javascript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"41\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"45\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"46\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"47\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"48\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"49\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOLS\" styleID=\"50\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"51\" fgColor=\"DC322F\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"52\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"42\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"43\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTDOC\" styleID=\"44\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"3\" fontSize=\"\">param @projectDescription projectDescription @param</WordsStyle>\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"D33682\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"kix\" desc=\"KiXtart\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"31\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"2\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"3\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VAR\" styleID=\"5\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"6\" fgColor=\"CB4B16\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"7\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"8\" fgColor=\"6C71C4\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"9\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"lisp\" desc=\"LISP\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION WORD\" styleID=\"3\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION WORD2\" styleID=\"4\" fgColor=\"6C71C4\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"5\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"8\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"9\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"11\" fgColor=\"CB4B16\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"lua\" desc=\"Lua\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"LITERALSTRING\" styleID=\"8\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"DC322F\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNC1\" styleID=\"13\" fgColor=\"CB4B16\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"FUNC2\" styleID=\"14\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"FUNC3\" styleID=\"15\" fgColor=\"6C71C4\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n        </LexerType>\r\n        <LexerType name=\"makefile\" desc=\"Makefile\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"2\" fgColor=\"CB4B16\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"3\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"4\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TARGET\" styleID=\"5\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDEOL\" styleID=\"9\" fgColor=\"CB4B16\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"matlab\" desc=\"Matlab\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"2\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"4\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"5\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLE QUOTE STRING\" styleID=\"8\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n\t\t<LexerType name=\"nfo\" desc=\"Dos Style\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"32\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontSize=\"\" fontStyle=\"0\" />\r\n        </LexerType>\r\n        <LexerType name=\"nsis\" desc=\"NSIS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING DOUBLE QUOTE\" styleID=\"2\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING LEFT QUOTE\" styleID=\"3\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING RIGHT QUOTE\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"5\" fgColor=\"CB4B16\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"6\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"7\" fgColor=\"6C71C4\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"USER DEFINED\" styleID=\"8\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"9\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SUBSECTION\" styleID=\"10\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IF DEFINE\" styleID=\"11\" fgColor=\"DC322F\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"12\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING VAR\" styleID=\"13\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"14\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SECTION GROUP\" styleID=\"15\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAGE EX\" styleID=\"16\" fgColor=\"DC322F\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION DEFINITIONS\" styleID=\"17\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"18\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"objc\" desc=\"Objective-C\" ext=\"\">\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"19\" fgColor=\"CB4B16\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"QUALIFIER\" styleID=\"20\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"DC322F\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"D33682\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"pascal\" desc=\"Pascal\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"2\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"3\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"4\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"DC322F\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR2\" styleID=\"6\" fgColor=\"DC322F\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"7\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HEX NUMBER\" styleID=\"8\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"9\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"10\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"12\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"13\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASM\" styleID=\"14\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"perl\" desc=\"Perl\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"DC322F\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"17\" fgColor=\"6C71C4\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGSUBST\" styleID=\"18\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SCALAR\" styleID=\"12\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ARRAY\" styleID=\"13\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HASH\" styleID=\"14\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL TABLE\" styleID=\"15\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PUNCTUATION\" styleID=\"8\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"POD\" styleID=\"3\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"POD VERB\" styleID=\"31\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"D33682\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"LONGQUOTE\" styleID=\"19\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATASECTION\" styleID=\"21\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"20\" fgColor=\"073642\" bgColor=\"6C71C4\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE DELIM\" styleID=\"22\" fgColor=\"CB4B16\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE Q\" styleID=\"23\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE QQ\" styleID=\"24\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE QX\" styleID=\"25\" fgColor=\"073642\" bgColor=\"6C71C4\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING Q\" styleID=\"26\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING QQ\" styleID=\"27\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING QX\" styleID=\"28\" fgColor=\"073642\" bgColor=\"6C71C4\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING QR\" styleID=\"29\" fgColor=\"6C71C4\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING QW\" styleID=\"30\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FORMAT IDENT\" styleID=\"41\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FORMAT\" styleID=\"42\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n       </LexerType>\r\n        <LexerType name=\"php\" desc=\"php\" ext=\"\">\r\n            <WordsStyle name=\"QUESTION MARK\" styleID=\"18\" fgColor=\"DC322F\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"118\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"119\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING VARIABLE\" styleID=\"126\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SIMPLESTRING\" styleID=\"120\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"121\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"122\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"123\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"124\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"125\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"127\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"postscript\" desc=\"Postscript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"DSC COMMENT\" styleID=\"2\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"DSC VALUE\" styleID=\"3\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Name\" styleID=\"5\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"6\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"LITERAL\" styleID=\"7\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IMMEVAL\" styleID=\"8\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAREN ARRAY\" styleID=\"9\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAREN DICT\" styleID=\"10\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAREN PROC\" styleID=\"11\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"12\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HEX STRING\" styleID=\"13\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BASE85 STRING\" styleID=\"14\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BAD STRING CHAR\" styleID=\"15\" fgColor=\"D33682\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"powershell\" desc=\"PowerShell\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"2\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"3\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"5\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"8\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"CMDLET\" styleID=\"9\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"ALIAS\" styleID=\"10\" fgColor=\"CB4B16\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n        </LexerType>\r\n        <LexerType name=\"props\" desc=\"Properties file\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"2\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASSIGNMENT\" styleID=\"3\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFVAL\" styleID=\"4\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"python\" desc=\"Python\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORDS\" styleID=\"5\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TRIPLE\" styleID=\"6\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TRIPLEDOUBLE\" styleID=\"7\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASSNAME\" styleID=\"8\" fgColor=\"CB4B16\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFNAME\" styleID=\"9\" fgColor=\"CB4B16\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK\" styleID=\"12\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"12\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"r\" desc=\"R\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"2\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"BASE WORD\" styleID=\"3\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"4\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"7\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"8\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INFIX\" styleID=\"10\" fgColor=\"CB4B16\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"rc\" desc=\"RC\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"DC322F\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"CB4B16\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"D33682\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"ruby\" desc=\"Ruby\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"DC322F\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"2\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"POD\" styleID=\"3\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"5\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS NAME\" styleID=\"8\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEF NAME\" styleID=\"9\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"12\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"13\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"14\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MODULE NAME\" styleID=\"15\" fgColor=\"CB4B16\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTANCE VAR\" styleID=\"16\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS VAR\" styleID=\"17\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"18\" fgColor=\"073642\" bgColor=\"6C71C4\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATA SECTION\" styleID=\"19\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING Q\" styleID=\"24\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BOOLEAN\" styleID=\"25\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n        </LexerType>\r\n        <LexerType name=\"scheme\" desc=\"Scheme\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION WORD\" styleID=\"3\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION WORD2\" styleID=\"4\" fgColor=\"6C71C4\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"5\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"9\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"11\" fgColor=\"CB4B16\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"searchResult\" desc=\"Search result\" ext=\"\">\r\n            <WordsStyle name=\"Default\" styleID=\"0\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Search Header\" styleID=\"1\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"File Header\" styleID=\"2\" fgColor=\"CB4B16\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Line Number\" styleID=\"3\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Hit Word\" styleID=\"4\" fgColor=\"B58900\" bgColor=\"6C71C4\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Selected Line\" styleID=\"5\" fgColor=\"657B83\" bgColor=\"073642\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Current line background colour\" styleID=\"6\" bgColor=\"EEE8D5\" />\r\n        </LexerType>\r\n        <LexerType name=\"smalltalk\" desc=\"Smalltalk\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"1\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"3\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"4\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BINARY\" styleID=\"5\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BOOL\" styleID=\"6\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SELF\" styleID=\"7\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SUPER\" styleID=\"8\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NIL\" styleID=\"9\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"10\" fgColor=\"CB4B16\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"RETURN\" styleID=\"11\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"12\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KWS END\" styleID=\"13\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASSIGN\" styleID=\"14\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"15\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SPECIAL SELECTOR\" styleID=\"16\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"sql\" desc=\"SQL\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"5\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"7\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n\t\t</LexerType>\r\n        <LexerType name=\"tcl\" desc=\"TCL\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MODIFIER\" styleID=\"10\" fgColor=\"CB4B16\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"EXPAND\" styleID=\"11\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"12\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"13\" fgColor=\"6C71C4\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SUB BRACE\" styleID=\"9\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SUBSTITUTION\" styleID=\"8\" fgColor=\"6C71C4\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD IN QUOTE\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IN QUOTE\" styleID=\"5\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT BOX\" styleID=\"17\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"BLOCK COMMENT\" styleID=\"18\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"tex\" desc=\"TeX\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"1\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"GROUP\" styleID=\"2\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"3\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"4\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"5\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"vb\" desc=\"VB / VBS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"7\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"3\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"DC322F\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATE\" styleID=\"8\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"verilog\" desc=\"Verilog\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGNAME\" styleID=\"2\" fgColor=\"CB4B16\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"7\" fgColor=\"6C71C4\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"DC322F\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE BANG\" styleID=\"3\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"12\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"USER\" styleID=\"19\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"vhdl\" desc=\"VHDL\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LIne\" styleID=\"2\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"5\" fgColor=\"586E75\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"6\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"7\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"8\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STD OPERATOR\" styleID=\"9\" fgColor=\"CB4B16\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"10\" fgColor=\"6C71C4\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"9\" fgColor=\"DC322F\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DIRECTIVE OPERAND\" styleID=\"10\" fgColor=\"DC322F\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STD FUNCTION\" styleID=\"11\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"STD PACKAGE\" styleID=\"12\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"STD TYPE\" styleID=\"13\" fgColor=\"CB4B16\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"USER DEFINE\" styleID=\"14\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type5\" />\r\n        </LexerType>\r\n        <LexerType name=\"xml\" desc=\"XML\" ext=\"\">\r\n            <WordsStyle name=\"XMLSTART\" styleID=\"12\" fgColor=\"DC322F\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"XMLEND\" styleID=\"13\" fgColor=\"DC322F\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"D33682\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"6\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"7\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGEND\" styleID=\"11\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGUNKNOWN\" styleID=\"2\" fgColor=\"D33682\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"3\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTEUNKNOWN\" styleID=\"4\" fgColor=\"D33682\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SGMLDEFAULT\" styleID=\"21\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CDATA\" styleID=\"17\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"yaml\" desc=\"YAML\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"2\" fgColor=\"B58900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"3\" fgColor=\"859900\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REFERENCE\" styleID=\"5\" fgColor=\"268BD2\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOCUMENT\" styleID=\"6\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"7\" fgColor=\"2AA198\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"8\" fgColor=\"D33682\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n    </LexerStyles>\r\n    <GlobalStyles>\r\n        <!-- Attention : Don't modify the name of styleID=\"0\" -->\r\n        <WidgetStyle name=\"Global override\" styleID=\"0\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"Consolas\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Default Style\" styleID=\"32\" fgColor=\"657B83\" bgColor=\"FDF6E3\" fontName=\"Consolas\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Indent guideline style\" styleID=\"37\" fgColor=\"93A1A1\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Brace highlight style\" styleID=\"34\" fgColor=\"DC322F\" bgColor=\"859900\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Bad brace colour\" styleID=\"35\" fgColor=\"D33682\" bgColor=\"FDF6E3\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Current line background colour\" styleID=\"0\" bgColor=\"EEE8D5\" />\r\n        <WidgetStyle name=\"Selected text colour\" styleID=\"0\" bgColor=\"073642\" />\r\n        <WidgetStyle name=\"Caret colour\" styleID=\"2069\" fgColor=\"073642\" />\r\n        <WidgetStyle name=\"Edge colour\" styleID=\"0\" fgColor=\"93A1A1\" />\r\n        <WidgetStyle name=\"Line number margin\" styleID=\"33\" fgColor=\"93A1A1\" bgColor=\"EEE8D5\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Fold\" styleID=\"0\" fgColor=\"93A1A1\" bgColor=\"EEE8D5\" />\r\n        <WidgetStyle name=\"Fold active\" styleID=\"0\" fgColor=\"DC322F\" />\r\n        <WidgetStyle name=\"Fold margin\" styleID=\"0\" fgColor=\"93A1A1\" bgColor=\"EEE8D5\" />\r\n        <WidgetStyle name=\"White space symbol\" styleID=\"0\" fgColor=\"B58900\" />\r\n        <WidgetStyle name=\"Smart HighLighting\" styleID=\"29\" bgColor=\"002B36\" />\r\n        <WidgetStyle name=\"Find Mark Style\" styleID=\"31\" bgColor=\"6C71C4\" />\r\n        <WidgetStyle name=\"Mark Style 1\" styleID=\"25\" bgColor=\"DC322F\" />\r\n        <WidgetStyle name=\"Mark Style 2\" styleID=\"24\" bgColor=\"268BD2\" />\r\n        <WidgetStyle name=\"Mark Style 3\" styleID=\"23\" bgColor=\"2AA198\" />\r\n        <WidgetStyle name=\"Mark Style 4\" styleID=\"22\" bgColor=\"859900\" />\r\n        <WidgetStyle name=\"Mark Style 5\" styleID=\"21\" bgColor=\"B58900\" />\r\n        <WidgetStyle name=\"Incremental highlight all\" styleID=\"28\" bgColor=\"FDF6E3\" />\r\n        <WidgetStyle name=\"Tags match highlighting\" styleID=\"27\" bgColor=\"CB4B16\" />\r\n        <WidgetStyle name=\"Tags attribute\" styleID=\"26\" bgColor=\"CB4B16\" />\r\n        <WidgetStyle name=\"Active tab focused indicator\" styleID=\"0\" fgColor=\"CB4B16\" />\r\n        <WidgetStyle name=\"Active tab unfocused indicator\" styleID=\"0\" fgColor=\"FDF6E3\" />\r\n        <WidgetStyle name=\"Active tab text\" styleID=\"0\" fgColor=\"000000\" />\r\n        <WidgetStyle name=\"Inactive tabs\" styleID=\"0\" fgColor=\"073642\" bgColor=\"93A1A1\" />\r\n    </GlobalStyles>\r\n</NotepadPlus>"
  },
  {
    "path": "gui/themes/Twilight.xml",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\" ?>\r\n<!--//\r\n\r\nTwilight\r\nCopyright (c) 2008 Fabio Zendhi Nagao <http://zend.lojcomm.com.br/>\r\n\r\nPermission is hereby granted, free of charge, to any person\r\nobtaining a copy of this software and associated documentation\r\nfiles (the \"Software\"), to deal in the Software without\r\nrestriction, including without limitation the rights to use,\r\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\r\ncopies of the Software, and to permit persons to whom the\r\nSoftware is furnished to do so, subject to the following\r\nconditions:\r\n\r\nThe above copyright notice and this permission notice shall be\r\nincluded in all copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\r\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\r\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\r\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\r\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\r\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\r\nOTHER DEALINGS IN THE SOFTWARE.\r\n\r\nRequirements:\r\n    * This style is based on DejaVu fonts <http://dejavu.sourceforge.net/wiki/index.php/Main_Page>.\r\n    * Notepad++, of course.\r\n\r\nInstallation:\r\n    Copy this file to C:\\Documents and Settings\\%%USERNAME%%\\Application Data\\Notepad++\\\r\n\r\nAbout:\r\n    This styler has been built by Textmate theme to Notepad++ styler <http://framework.lojcomm.com.br/tmTheme2nppStyler/>\r\n\r\nCredits:\r\n    Thanks for the original Textmate theme author.\r\n    Thanks for Fabio Zendhi Nagao for the tmTheme2nppStyler.\r\n    Thanks for the user for the tmTheme source.\r\n\r\n//-->\r\n<NotepadPlus>\r\n    <LexerStyles>\r\n        <LexerType name=\"c\" desc=\"C\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"8996A8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F9EE98\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPEWORD\" styleID=\"16\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"E9C062\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"cpp\" desc=\"C++\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"8996A8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F9EE98\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"E9C062\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"java\" desc=\"Java\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"8996A8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F9EE98\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"E9C062\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"cs\" desc=\"C#\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"8996A8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F9EE98\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"E9C062\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"rc\" desc=\"RC\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"8996A8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F9EE98\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"E9C062\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"tcl\" desc=\"TCL\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"8996A8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F9EE98\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"E9C062\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"objc\" desc=\"Objective-C\" ext=\"\">\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"19\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"QUALIFIER\" styleID=\"20\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"8996A8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F9EE98\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"E9C062\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"sql\" desc=\"SQL\" ext=\"\">\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"5\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"7\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"html\" desc=\"HTML\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"6\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"7\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"9B703F\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAGEND\" styleID=\"11\" fgColor=\"9B703F\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAGUNKNOWN\" styleID=\"2\" fgColor=\"9B703F\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"3\" fgColor=\"9B703F\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ATTRIBUTEUNKNOWN\" styleID=\"4\" fgColor=\"9B703F\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SGMLDEFAULT\" styleID=\"21\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CDATA\" styleID=\"17\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VALUE\" styleID=\"19\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ENTITY\" styleID=\"10\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"php\" desc=\"php\" ext=\"\">\r\n            <WordsStyle name=\"QUESTION MARK\" styleID=\"18\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"118\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"119\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING VARIABLE\" styleID=\"126\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SIMPLESTRING\" styleID=\"120\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"121\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"122\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"123\" fgColor=\"7587A6\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"124\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"125\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"127\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"javascript\" desc=\"Javascript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"41\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"45\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"46\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"47\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"48\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"49\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SYMBOLS\" styleID=\"50\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"51\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"52\" fgColor=\"E9C062\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"42\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"43\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTDOC\" styleID=\"44\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"asp\" desc=\"asp\" ext=\"asp\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"81\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"82\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"83\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"84\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"85\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"87\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"86\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ASPSYBOL\" styleID=\"15\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SCRIPTTYPE\" styleID=\"16\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"xml\" desc=\"XML\" ext=\"\">\r\n            <WordsStyle name=\"XMLSTART\" styleID=\"12\" fgColor=\"494949\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"XMLEND\" styleID=\"13\" fgColor=\"494949\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"CCCCCC\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"6\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"7\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"9B703F\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAGEND\" styleID=\"11\" fgColor=\"9B703F\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAGUNKNOWN\" styleID=\"2\" fgColor=\"9B703F\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"3\" fgColor=\"CCCCCC\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ATTRIBUTEUNKNOWN\" styleID=\"4\" fgColor=\"CCCCCC\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SGMLDEFAULT\" styleID=\"21\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CDATA\" styleID=\"17\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"ini\" desc=\"ini file\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"2\" fgColor=\"9B703F\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ASSIGNMENT\" styleID=\"3\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFVAL\" styleID=\"4\" fgColor=\"9B703F\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"props\" desc=\"Properties file\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ASSIGNMENT\" styleID=\"3\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFVAL\" styleID=\"4\" fgColor=\"9B703F\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"diff\" desc=\"DIFF\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"2\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"2\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"2\" fontSize=\"10\" />\r\n            <WordsStyle name=\"HEADER\" styleID=\"3\" fgColor=\"E8DD8E\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"POSITION\" styleID=\"4\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"2\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DELETED\" styleID=\"5\" fgColor=\"CD6749\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ADDED\" styleID=\"6\" fgColor=\"8FC6E8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"nfo\" desc=\"Dos Style\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"32\" fgColor=\"F8F8F8\" bgColor=\"141414\" />\r\n        </LexerType>\r\n        <LexerType name=\"makefile\" desc=\"Makefile\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"2\" fgColor=\"8996A8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"3\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"4\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TARGET\" styleID=\"5\" fgColor=\"E8DD8E\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDEOL\" styleID=\"9\" fgColor=\"E8DD8E\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"vb\" desc=\"VB / VBS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"7\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"3\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"8996A8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DATE\" styleID=\"8\" fgColor=\"9B859D\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"css\" desc=\"CSS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"9B703F\" bgColor=\"141414\" fontName=\"Batang\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CLASS\" styleID=\"2\" fgColor=\"9B703F\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PSEUDOCLASS\" styleID=\"3\" fgColor=\"9B703F\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"UNKNOWN_PSEUDOCLASS\" styleID=\"4\" fgColor=\"9B703F\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"5\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"6\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"UNKNOWN_IDENTIFIER\" styleID=\"7\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VALUE\" styleID=\"8\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ID\" styleID=\"10\" fgColor=\"9B703F\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IMPORTANT\" styleID=\"11\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"12\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"pascal\" desc=\"Pascal\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"8996A8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F9EE98\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"E9C062\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"perl\" desc=\"Perl\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"8996A8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F9EE98\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"17\" fgColor=\"E9C062\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SCALAR\" styleID=\"12\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ARRAY\" styleID=\"13\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"HASH\" styleID=\"14\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SYMBOL TABLE\" styleID=\"15\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PUNCTUATION\" styleID=\"8\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"POD\" styleID=\"3\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"LONGQUOTE\" styleID=\"19\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DATASECTION\" styleID=\"21\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGSUBST\" styleID=\"18\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"20\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"python\" desc=\"Python\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"4\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KEYWORDS\" styleID=\"5\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TRIPLE\" styleID=\"6\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TRIPLEDOUBLE\" styleID=\"7\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CLASSNAME\" styleID=\"8\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEFNAME\" styleID=\"9\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTBLOCK\" styleID=\"12\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"12\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"batch\" desc=\"Batch\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KEYWORDS\" styleID=\"2\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"3\" fgColor=\"9B703F\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"HIDE SYBOL\" styleID=\"4\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"5\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"6\" fgColor=\"7587A6\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"lua\" desc=\"Lua\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"LITERALSTRING\" styleID=\"8\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"8996A8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F9EE98\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"FUNC1\" styleID=\"13\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"FUNC2\" styleID=\"14\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"FUNC3\" styleID=\"15\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n        </LexerType>\r\n        <LexerType name=\"tex\" desc=\"TeX\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"1\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"GROUP\" styleID=\"2\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"3\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"4\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"5\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"nsis\" desc=\"NSIS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING DOUBLE QUOTE\" styleID=\"2\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING LEFT QUOTE\" styleID=\"3\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING RIGHT QUOTE\" styleID=\"4\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"5\" fgColor=\"DAD085\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"6\" fgColor=\"7587A6\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"7\" fgColor=\"9B703F\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"USER DEFINED\" styleID=\"8\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"9\" fgColor=\"9B703F\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SUBSECTION\" styleID=\"10\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IF DEFINE\" styleID=\"11\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"12\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING VAR\" styleID=\"13\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"14\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SECTION GROUP\" styleID=\"15\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PAGE EX\" styleID=\"16\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"FUNCTION DEFINITIONS\" styleID=\"17\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"18\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"actionscript\" desc=\"ActionScript\" ext=\"\">\r\n            <!--\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"19\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            -->\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"20\" fgColor=\"DAD085\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"8996A8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F9EE98\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"E9C062\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"bash\" desc=\"bash\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"FF6464\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"4\" fgColor=\"F9EE98\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"5\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"6\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"8\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SCALAR\" styleID=\"9\" fgColor=\"8996A8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PARAM\" styleID=\"10\" fgColor=\"8996A8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"11\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"HERE DELIM\" styleID=\"12\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"HERE Q\" styleID=\"13\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"fortran\" desc=\"Fortran\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"4\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"5\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"8\" fgColor=\"F9EE98\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION1\" styleID=\"9\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"FUNCTION2\" styleID=\"10\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"11\" fgColor=\"8996A8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR2\" styleID=\"12\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"13\" fgColor=\"9B703F\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CONTINUATION\" styleID=\"14\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"lisp\" desc=\"LISP\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"FUNCTION WORD\" styleID=\"3\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"5\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"8\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"9\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"11\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"asm\" desc=\"Assembler\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"4\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"5\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CPU INSTRUCTION\" styleID=\"6\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"MATH INSTRUCTION\" styleID=\"7\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"REGISTER\" styleID=\"8\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"9\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"DIRECTIVE OPERAND\" styleID=\"10\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"COMMENT BLOCK\" styleID=\"11\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"12\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"13\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"EXT INSTRUCTION\" styleID=\"14\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type4\" />\r\n        </LexerType>\r\n        <LexerType name=\"ruby\" desc=\"Ruby\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"2\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"POD\" styleID=\"3\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"5\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\">raise</WordsStyle>\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CLASS NAME\" styleID=\"8\" fgColor=\"9B703F\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DEF NAME\" styleID=\"9\" fgColor=\"9B703F\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"12\" fgColor=\"E9C062\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"13\" fgColor=\"7587A6\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"14\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"MODULE NAME\" styleID=\"15\" fgColor=\"9B703F\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTANCE VAR\" styleID=\"16\" fgColor=\"7587A6\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CLASS VAR\" styleID=\"17\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"18\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DATA SECTION\" styleID=\"19\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING Q\" styleID=\"24\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"postscript\" desc=\"Postscript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DSC COMMENT\" styleID=\"2\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DSC VALUE\" styleID=\"3\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"Name\" styleID=\"5\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"6\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"LITERAL\" styleID=\"7\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IMMEVAL\" styleID=\"8\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PAREN ARRAY\" styleID=\"9\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PAREN DICT\" styleID=\"10\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PAREN PROC\" styleID=\"11\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"12\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"HEX STRING\" styleID=\"13\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BASE85 STRING\" styleID=\"14\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BAD STRING CHAR\" styleID=\"15\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"vhdl\" desc=\"VHDL\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LIne\" styleID=\"2\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"5\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"6\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"7\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"8\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STD OPERATOR\" styleID=\"9\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"10\" fgColor=\"9B703F\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"9\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DIRECTIVE OPERAND\" styleID=\"10\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STD FUNCTION\" styleID=\"11\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"STD PACKAGE\" styleID=\"12\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"STD TYPE\" styleID=\"13\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"USER DEFINE\" styleID=\"14\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type5\" />\r\n        </LexerType>\r\n        <LexerType name=\"smalltalk\" desc=\"Smalltalk\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"1\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"3\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"4\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BINARY\" styleID=\"5\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"BOOL\" styleID=\"6\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SELF\" styleID=\"7\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SUPER\" styleID=\"8\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NIL\" styleID=\"9\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"10\" fgColor=\"7587A6\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"RETURN\" styleID=\"11\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"12\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KWS END\" styleID=\"13\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ASSIGN\" styleID=\"14\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"15\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SPECIAL SELECTOR\" styleID=\"16\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"caml\" desc=\"Caml\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAGNAME\" styleID=\"2\" fgColor=\"9B703F\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"3\" fgColor=\"F9EE98\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"BUILIN FUNC &amp; TYPE\" styleID=\"4\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"TYPE\" styleID=\"5\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"LINENUM\" styleID=\"6\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"8\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"9\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"11\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"13\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"14\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"verilog\" desc=\"Verilog\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"TAGNAME\" styleID=\"2\" fgColor=\"9B703F\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F9EE98\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"7\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"8996A8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE BANG\" styleID=\"3\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"12\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"USER\" styleID=\"19\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"kix\" desc=\"KiXtart\" ext=\"\">\r\n            <!--\r\n            <WordsStyle name=\"\" styleID=\"0\" fgColor=\"\" bgColor=\"141414\" fontName=\"\" fontStyle=\"\" fontSize=\"10\" />\r\n        -->\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"31\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"2\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"3\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VAR\" styleID=\"5\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"6\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"7\" fgColor=\"F9EE98\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"8\" fgColor=\"DAD085\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"9\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"autoit\" desc=\"autoIt\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"1\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"2\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"4\" fgColor=\"DAD085\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"F9EE98\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"6\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"7\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"8\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"9\" fgColor=\"7587A6\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"SENT\" styleID=\"10\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"11\" fgColor=\"8996A8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"12\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"EXPAND\" styleID=\"13\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type5\" />\r\n            <WordsStyle name=\"COMOBJ\" styleID=\"14\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"ada\" desc=\"ADA\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"1\" fgColor=\"F9EE98\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"2\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DELIMITER\" styleID=\"4\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"5\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER EOL\" styleID=\"6\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"7\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"8\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"9\" fgColor=\"9B703F\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"10\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"ILLEGAL\" styleID=\"11\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"matlab\" desc=\"Matlab\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"2\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"4\" fgColor=\"F9EE98\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"5\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DOUBLE QUOTE STRING\" styleID=\"8\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"haskell\" desc=\"Haskell\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"2\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"5\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CLASS\" styleID=\"6\" fgColor=\"9B703F\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"MODULE\" styleID=\"7\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"CAPITAL\" styleID=\"8\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"DATA\" styleID=\"9\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IMPORT\" styleID=\"10\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"11\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"INSTANCE\" styleID=\"12\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"13\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTBLOCK\" styleID=\"14\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTBLOCK2\" styleID=\"15\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENTBLOCK3\" styleID=\"16\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"inno\" desc=\"InnoSetup\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"2\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"PARAMETER\" styleID=\"3\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"4\" fgColor=\"9B703F\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"8996A8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR INLINE\" styleID=\"6\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT PASCAL\" styleID=\"7\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"KEYWORD PASCAL\" styleID=\"8\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"KEYWORD USER\" styleID=\"9\" fgColor=\"CDA869\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"STRING DOUBLE\" styleID=\"10\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING SINGLE\" styleID=\"11\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"12\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"cmake\" desc=\"CMakeFile\" ext=\"cmake\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"5F5A60\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING D\" styleID=\"2\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING L\" styleID=\"3\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING R\" styleID=\"4\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"5\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"PARAMETER\" styleID=\"6\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"7\" fgColor=\"7587A6\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"USER DEFINED\" styleID=\"8\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"WHILEDEF\" styleID=\"9\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"FOREACHDEF\" styleID=\"10\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"IFDEF\" styleID=\"11\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"MACRODEF\" styleID=\"12\" fgColor=\"000000\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"STRING VARIABLE\" styleID=\"13\" fgColor=\"8F9D6A\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"14\" fgColor=\"CF6A4C\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        </LexerType>\r\n        <LexerType name=\"searchResult\" desc=\"Search result\" ext=\"\">\r\n            <WordsStyle name=\"Default\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Search Header\" styleID=\"1\" fgColor=\"000080\" bgColor=\"BBBBFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"File Header\" styleID=\"2\" fgColor=\"008000\" bgColor=\"D5FFD5\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"Line Number\" styleID=\"3\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Hit Word\" styleID=\"4\" fgColor=\"FF0000\" bgColor=\"FFFFBF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Selected Line\" styleID=\"5\" fgColor=\"000080\" bgColor=\"FFFF4F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\">if else for while</WordsStyle>\r\n            <WordsStyle name=\"Current line background colour\" styleID=\"6\" bgColor=\"5A5A5A\" fgColor=\"0080FF\" fontSize=\"\" fontStyle=\"0\">bool long int char</WordsStyle>\r\n        </LexerType>\r\n    </LexerStyles>\r\n    <GlobalStyles>\r\n        <!-- Attention : Don't modify the name of styleID=\"0\" -->\r\n        <WidgetStyle name=\"Global override\" styleID=\"0\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"Consolas\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Default Style\" styleID=\"32\" fgColor=\"F8F8F8\" bgColor=\"141414\" fontName=\"Consolas\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Indent guideline style\" styleID=\"37\" fgColor=\"888A85\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Brace highlight style\" styleID=\"34\" fgColor=\"FCE94F\" bgColor=\"141414\" fontName=\"\" fontStyle=\"1\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Bad brace colour\" styleID=\"35\" fgColor=\"EF2929\" bgColor=\"141414\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Current line background colour\" styleID=\"0\" bgColor=\"292929\" />\r\n        <WidgetStyle name=\"Mark colour\" styleID=\"0\" fgColor=\"CC0000\" bgColor=\"EDD400\" />\r\n        <WidgetStyle name=\"Selected text colour\" styleID=\"0\" bgColor=\"3E3E3E\" />\r\n        <WidgetStyle name=\"Caret colour\" styleID=\"2069\" fgColor=\"A7A7A7\" />\r\n        <WidgetStyle name=\"Find Mark Style\" styleID=\"31\" fgColor=\"CC0000\" bgColor=\"EDD400\" fontName=\"\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Edge colour\" styleID=\"0\" fgColor=\"EEEEEC\" />\r\n        <WidgetStyle name=\"Line number margin\" styleID=\"33\" fgColor=\"EEEEEC\" bgColor=\"2E3436\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n        <WidgetStyle name=\"Fold\" styleID=\"0\" fgColor=\"2E3436\" bgColor=\"EEEEEC\" />\r\n        <WidgetStyle name=\"Fold margin\" styleID=\"0\" fgColor=\"555753\" bgColor=\"2E3436\" />\r\n        <WidgetStyle name=\"White space symbol\" styleID=\"0\" fgColor=\"FCAF3E\" />\r\n        <WidgetStyle name=\"Smart HighLighting\" styleID=\"29\" bgColor=\"00FF00\" fgColor=\"555753\" />\r\n        <WidgetStyle name=\"Find Mark Style\" styleID=\"31\" bgColor=\"FF0000\" fgColor=\"FCAF3E\" />\r\n        <WidgetStyle name=\"Mark Style 1\" styleID=\"25\" bgColor=\"00FFFF\" />\r\n        <WidgetStyle name=\"Mark Style 2\" styleID=\"24\" bgColor=\"FF8000\" />\r\n        <WidgetStyle name=\"Mark Style 3\" styleID=\"23\" bgColor=\"FFFF00\" />\r\n        <WidgetStyle name=\"Mark Style 4\" styleID=\"22\" bgColor=\"8000FF\" />\r\n        <WidgetStyle name=\"Mark Style 5\" styleID=\"21\" bgColor=\"008000\" />\r\n        <WidgetStyle name=\"Incremental highlight all\" styleID=\"28\" bgColor=\"0080FF\" fgColor=\"FFCAB0\" />\r\n        <WidgetStyle name=\"Tags match highlighting\" styleID=\"27\" bgColor=\"8000FF\" fgColor=\"000000\" />\r\n        <WidgetStyle name=\"Tags attribute\" styleID=\"26\" bgColor=\"FFFF00\" fgColor=\"8080C0\" />\r\n        <WidgetStyle name=\"Active tab focused indicator\" styleID=\"0\" fgColor=\"FAAA3C\" bgColor=\"FF0000\" />\r\n        <WidgetStyle name=\"Active tab unfocused indicator\" styleID=\"0\" fgColor=\"FFCAB0\" bgColor=\"80FF00\" />\r\n        <WidgetStyle name=\"Active tab text\" styleID=\"0\" fgColor=\"000000\" />\r\n        <WidgetStyle name=\"Inactive tabs\" styleID=\"0\" fgColor=\"808080\" bgColor=\"C0C0C0\" />\r\n    </GlobalStyles>\r\n</NotepadPlus>\r\n"
  },
  {
    "path": "gui/themes/Vibrant_Ink.xml",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\" ?>\r\n<!-- \r\nStyle Name: Port VibrantInk\r\nDescription: Based on the Textmate theme VibrantInk (http://alternateidea.com/blog/articles/2006/01/03/textmate-vibrant-ink-theme-and-prototype-bundle) by Justin Palmer\r\nFile name: \t\t\tstylers.xml\r\nCreated by:\t\t\ttyler (tyler at impoverishedgourmet.com)\r\nFeatured language:\tPhp, Css, Javascript, Html, XML, others? \r\nNote:\t\t\t\tFeel free to modify this style and re-release it.  Any additions to languages or syntax to bring it closer to VibrantInk would be appreciated.\r\n\t\t\t\t\tThis style available under the terms of the GNU Free License.\r\n\r\nInstall: copy your installed Notepad++ directory root, overwrite old stylers.xml (backup old file first), \r\nor copy %APPDATA%\\Notepad++\\\r\noverwrite old stylers.xml (backup old file first)\r\n\r\nKeep Notepad++ development active, donate!:\r\nhttp://sourceforge.net/donate/index.php?group_id=95717\r\n\r\n2007.11.16\r\n-->\r\n<NotepadPlus>\r\n    <LexerStyles>\r\n        <LexerType name=\"c\" desc=\"C\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"EDF8F9\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n        </LexerType>\r\n        <LexerType name=\"cpp\" desc=\"C++\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"EDF8F9\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n        </LexerType>\r\n        <LexerType name=\"java\" desc=\"Java\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"EDF8F9\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n        </LexerType>\r\n        <LexerType name=\"cs\" desc=\"C#\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"EDF8F9\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n        </LexerType>\r\n        <LexerType name=\"rc\" desc=\"RC\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"EDF8F9\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n        </LexerType>\r\n        <LexerType name=\"tcl\" desc=\"TCL\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"EDF8F9\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n        </LexerType>\r\n        <LexerType name=\"objc\" desc=\"Objective-C\" ext=\"\">\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"19\" fgColor=\"A001D6\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"QUALIFIER\" styleID=\"20\" fgColor=\"95004A\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"EDF8F9\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n        </LexerType>\r\n        <LexerType name=\"sql\" desc=\"SQL\" ext=\"\">\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"5\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"7\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n        </LexerType>\r\n        <LexerType name=\"html\" desc=\"HTML\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"6\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"7\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGEND\" styleID=\"11\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGUNKNOWN\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"3\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTEUNKNOWN\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SGMLDEFAULT\" styleID=\"21\" fgColor=\"FFFFFF\" bgColor=\"707070\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CDATA\" styleID=\"17\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VALUE\" styleID=\"19\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ENTITY\" styleID=\"10\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"php\" desc=\"php\" ext=\"\">\r\n            <WordsStyle name=\"QUESTION MARK\" styleID=\"18\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"118\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"119\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING VARIABLE\" styleID=\"126\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SIMPLESTRING\" styleID=\"120\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"121\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"122\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"123\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"124\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"125\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"127\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"javascript\" desc=\"Javascript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"41\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"45\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"46\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"47\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"48\" fgColor=\"FFFF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"49\" fgColor=\"FFFF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOLS\" styleID=\"50\" fgColor=\"999966\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"51\" fgColor=\"CCCCCC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"52\" fgColor=\"339999\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"42\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"43\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTDOC\" styleID=\"44\" fgColor=\"772CB7\" bgColor=\"070707\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"asp\" desc=\"asp\" ext=\"asp\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"81\" fgColor=\"66FF00\" bgColor=\"C4F9FD\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"82\" fgColor=\"9933CC\" bgColor=\"C4F9FD\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"83\" fgColor=\"99CC99\" bgColor=\"C4F9FD\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"84\" fgColor=\"FFCC00\" bgColor=\"C4F9FD\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"85\" fgColor=\"66FF00\" bgColor=\"C4F9FD\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"87\" fgColor=\"66FF00\" bgColor=\"C4F9FD\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"86\" fgColor=\"FFFFFF\" bgColor=\"C4F9FD\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASPSYBOL\" styleID=\"15\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SCRIPTTYPE\" styleID=\"16\" fgColor=\"FFFFFF\" bgColor=\"FFC000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"xml\" desc=\"XML\" ext=\"\">\r\n            <WordsStyle name=\"XMLSTART\" styleID=\"12\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"XMLEND\" styleID=\"13\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"6\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"7\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGEND\" styleID=\"11\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGUNKNOWN\" styleID=\"2\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"3\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTEUNKNOWN\" styleID=\"4\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SGMLDEFAULT\" styleID=\"21\" fgColor=\"FFFFFF\" bgColor=\"707070\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CDATA\" styleID=\"17\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"ini\" desc=\"ini file\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"2\" fgColor=\"66FF00\" bgColor=\"070707\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASSIGNMENT\" styleID=\"3\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFVAL\" styleID=\"4\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"props\" desc=\"Properties file\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"ASSIGNMENT\" styleID=\"3\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFVAL\" styleID=\"4\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"diff\" desc=\"DIFF\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"2\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"HEADER\" styleID=\"3\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"POSITION\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DELETED\" styleID=\"5\" fgColor=\"808040\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ADDED\" styleID=\"6\" fgColor=\"339999\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"nfo\" desc=\"Dos Style\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"32\" fgColor=\"C0C0C0\" bgColor=\"000000\" fontSize=\"\" fontStyle=\"0\" />\r\n        </LexerType>\r\n        <LexerType name=\"makefile\" desc=\"Makefile\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"2\" fgColor=\"FFFF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"3\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"TARGET\" styleID=\"5\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDEOL\" styleID=\"9\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"vb\" desc=\"VB / VBS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"3\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATE\" styleID=\"8\" fgColor=\"00FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"css\" desc=\"CSS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"Batang\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS\" styleID=\"2\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PSEUDOCLASS\" styleID=\"3\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"UNKNOWN_PSEUDOCLASS\" styleID=\"4\" fgColor=\"FF8080\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"6\" fgColor=\"999966\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"UNKNOWN_IDENTIFIER\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VALUE\" styleID=\"8\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"ID\" styleID=\"10\" fgColor=\"339999\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IMPORTANT\" styleID=\"11\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"12\" fgColor=\"339999\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"pascal\" desc=\"Pascal\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"EDF8F9\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"9933CC\" bgColor=\"707070\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n        </LexerType>\r\n        <LexerType name=\"perl\" desc=\"Perl\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"EDF8F9\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"17\" fgColor=\"8080FF\" bgColor=\"F8FEDE\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"SCALAR\" styleID=\"12\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ARRAY\" styleID=\"13\" fgColor=\"CF34CF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HASH\" styleID=\"14\" fgColor=\"999966\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL TABLE\" styleID=\"15\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"PUNCTUATION\" styleID=\"8\" fgColor=\"EDF8F9\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"POD\" styleID=\"3\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"FF80C0\" bgColor=\"000000\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"LONGQUOTE\" styleID=\"19\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATASECTION\" styleID=\"21\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGSUBST\" styleID=\"18\" fgColor=\"999966\" bgColor=\"FFEEEC\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"20\" fgColor=\"FFFF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"python\" desc=\"Python\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"4\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORDS\" styleID=\"5\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TRIPLE\" styleID=\"6\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TRIPLEDOUBLE\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASSNAME\" styleID=\"8\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFNAME\" styleID=\"9\" fgColor=\"FF00FF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK\" styleID=\"12\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"12\" fgColor=\"FFFF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"batch\" desc=\"Batch\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"KEYWORDS\" styleID=\"2\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"3\" fgColor=\"99CC99\" bgColor=\"FFFF80\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"HIDE SYBOL\" styleID=\"4\" fgColor=\"FF00FF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"5\" fgColor=\"339999\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"6\" fgColor=\"FF8000\" bgColor=\"FCFFF0\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"lua\" desc=\"Lua\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"LITERALSTRING\" styleID=\"8\" fgColor=\"95004A\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"EDF8F9\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNC1\" styleID=\"13\" fgColor=\"0080C0\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"FUNC2\" styleID=\"14\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"FUNC3\" styleID=\"15\" fgColor=\"0000A0\" bgColor=\"000000\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" keywordClass=\"type2\" />\r\n        </LexerType>\r\n        <LexerType name=\"tex\" desc=\"TeX\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"1\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"GROUP\" styleID=\"2\" fgColor=\"FF00FF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"3\" fgColor=\"800000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"4\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"8\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"4\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"nsis\" desc=\"NSIS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"STRING DOUBLE QUOTE\" styleID=\"2\" fgColor=\"66FF00\" bgColor=\"EEEEEE\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING LEFT QUOTE\" styleID=\"3\" fgColor=\"FFFF80\" bgColor=\"C0C0C0\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING RIGHT QUOTE\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"C0C0C0\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"5\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"6\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"7\" fgColor=\"99CC99\" bgColor=\"FFFF80\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"USER DEFINED\" styleID=\"8\" fgColor=\"FDFFEC\" bgColor=\"FF80FF\" fontName=\"\" fontStyle=\"4\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"9\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SUBSECTION\" styleID=\"10\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IF DEFINE\" styleID=\"11\" fgColor=\"808040\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"12\" fgColor=\"800000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING VAR\" styleID=\"13\" fgColor=\"FF8000\" bgColor=\"EFEFEF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"14\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"actionscript\" desc=\"ActionScript\" ext=\"\">\r\n            <!--\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"19\" fgColor=\"A001D6\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n\t\t\t-->\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"20\" fgColor=\"95004A\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"EDF8F9\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n        </LexerType>\r\n        <LexerType name=\"bash\" desc=\"bash\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"FFFFFF\" bgColor=\"FF0000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"4\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"5\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"6\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"EDF8F9\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"8\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SCALAR\" styleID=\"9\" fgColor=\"FF8040\" bgColor=\"FFFFD9\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"PARAM\" styleID=\"10\" fgColor=\"9933CC\" bgColor=\"00FFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"11\" fgColor=\"804040\" bgColor=\"E1FFF3\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE DELIM\" styleID=\"12\" fgColor=\"FF6600\" bgColor=\"FF0000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE Q\" styleID=\"13\" fgColor=\"99CC99\" bgColor=\"0000FF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"fortran\" desc=\"Fortran\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"4\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"5\" fgColor=\"808040\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"8\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION1\" styleID=\"9\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"FUNCTION2\" styleID=\"10\" fgColor=\"0080C0\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"11\" fgColor=\"800000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR2\" styleID=\"12\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"FF80FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"CONTINUATION\" styleID=\"14\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"lisp\" desc=\"LISP\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION WORD\" styleID=\"3\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"5\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"8\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"9\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"0080C0\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"11\" fgColor=\"800000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"asm\" desc=\"Assembler\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"4\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CPU INSTRUCTION\" styleID=\"6\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"MATH INSTRUCTION\" styleID=\"7\" fgColor=\"0080C0\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"REGISTER\" styleID=\"8\" fgColor=\"8080FF\" bgColor=\"FFFFCC\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"9\" fgColor=\"339999\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"DIRECTIVE OPERAND\" styleID=\"10\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"COMMENT BLOCK\" styleID=\"11\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"12\" fgColor=\"808000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"13\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"EXT INSTRUCTION\" styleID=\"14\" fgColor=\"EDF8F9\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type4\" />\r\n        </LexerType>\r\n        <LexerType name=\"ruby\" desc=\"Ruby\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"2\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"POD\" styleID=\"3\" fgColor=\"004000\" bgColor=\"C0FFC0\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"5\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"808000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS NAME\" styleID=\"8\" fgColor=\"0080C0\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEF NAME\" styleID=\"9\" fgColor=\"8080FF\" bgColor=\"FFFFCC\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"12\" fgColor=\"339999\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"13\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MODULE NAME\" styleID=\"15\" fgColor=\"EDF8F9\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTANCE VAR\" styleID=\"16\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS VAR\" styleID=\"17\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"18\" fgColor=\"FFFF00\" bgColor=\"A08080\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATA SECTION\" styleID=\"19\" fgColor=\"600000\" bgColor=\"FFF0D8\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING Q\" styleID=\"24\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"postscript\" desc=\"Postscript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"DSC COMMENT\" styleID=\"2\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"DSC VALUE\" styleID=\"3\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Name\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"6\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"LITERAL\" styleID=\"7\" fgColor=\"0080C0\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IMMEVAL\" styleID=\"8\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAREN ARRAY\" styleID=\"9\" fgColor=\"FF00FF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAREN DICT\" styleID=\"10\" fgColor=\"339999\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAREN PROC\" styleID=\"11\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"12\" fgColor=\"808000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HEX STRING\" styleID=\"13\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BASE85 STRING\" styleID=\"14\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BAD STRING CHAR\" styleID=\"15\" fgColor=\"EDF8F9\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"vhdl\" desc=\"VHDL\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT LIne\" styleID=\"2\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"5\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"7\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"8\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STD OPERATOR\" styleID=\"9\" fgColor=\"0080C0\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"10\" fgColor=\"8080FF\" bgColor=\"FFFFCC\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"9\" fgColor=\"808000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DIRECTIVE OPERAND\" styleID=\"10\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"STD FUNCTION\" styleID=\"11\" fgColor=\"339999\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"STD PACKAGE\" styleID=\"12\" fgColor=\"800000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"STD TYPE\" styleID=\"13\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"USER DEFINE\" styleID=\"14\" fgColor=\"B5E71F\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type5\" />\r\n        </LexerType>\r\n        <LexerType name=\"smalltalk\" desc=\"Smalltalk\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"1\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"3\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"4\" fgColor=\"408080\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"BINARY\" styleID=\"5\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BOOL\" styleID=\"6\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SELF\" styleID=\"7\" fgColor=\"8080FF\" bgColor=\"FFFFCC\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SUPER\" styleID=\"8\" fgColor=\"339999\" bgColor=\"ECFFEA\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"NIL\" styleID=\"9\" fgColor=\"999966\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"10\" fgColor=\"800000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"RETURN\" styleID=\"11\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"12\" fgColor=\"808000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KWS END\" styleID=\"13\" fgColor=\"339999\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASSIGN\" styleID=\"14\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"15\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SPECIAL SELECTOR\" styleID=\"16\" fgColor=\"FF80C0\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"caml\" desc=\"Caml\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGNAME\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"3\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"BUILIN FUNC &amp; TYPE\" styleID=\"4\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"TYPE\" styleID=\"5\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"LINENUM\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"8\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"9\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"11\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"13\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"14\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n        </LexerType>\r\n        <LexerType name=\"verilog\" desc=\"Verilog\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGNAME\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"7\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"EDF8F9\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT LINE BANG\" styleID=\"3\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"12\" fgColor=\"66FF00\" bgColor=\"F2F4FF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"USER\" styleID=\"19\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"kix\" desc=\"KiXtart\" ext=\"\">\r\n            <!--\r\n            <WordsStyle name=\"\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n\t\t-->\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"31\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"2\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"3\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VAR\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"6\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"7\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"8\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"9\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"autoit\" desc=\"autoIt\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"1\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"2\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"4\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"6\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"7\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"8\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"9\" fgColor=\"FF0080\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"SENT\" styleID=\"10\" fgColor=\"999966\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"11\" fgColor=\"EDF8F9\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"12\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"EXPAND\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type5\" />\r\n            <WordsStyle name=\"COMOBJ\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"ada\" desc=\"ADA\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"1\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DELIMITER\" styleID=\"4\" fgColor=\"FF8080\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"5\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER EOL\" styleID=\"6\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"7\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"8\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"9\" fgColor=\"EDF8F9\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"10\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"ILLEGAL\" styleID=\"11\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"matlab\" desc=\"Matlab\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"2\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"4\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"5\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLE QUOTE STRING\" styleID=\"8\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"haskell\" desc=\"Haskell\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"2\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"800080\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"CA6500\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"5\" fgColor=\"CA6500\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"MODULE\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CAPITAL\" styleID=\"8\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATA\" styleID=\"9\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IMPORT\" styleID=\"10\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"11\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTANCE\" styleID=\"12\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"13\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK\" styleID=\"14\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK2\" styleID=\"15\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK3\" styleID=\"16\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"inno\" desc=\"InnoSetup\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"2\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"PARAMETER\" styleID=\"3\" fgColor=\"FF8000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"4\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"800000\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR INLINE\" styleID=\"6\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT PASCAL\" styleID=\"7\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"KEYWORD PASCAL\" styleID=\"8\" fgColor=\"0080C0\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"KEYWORD USER\" styleID=\"9\" fgColor=\"8080FF\" bgColor=\"FFFFCC\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"STRING DOUBLE\" styleID=\"10\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING SINGLE\" styleID=\"11\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"12\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cmake\" desc=\"CMakeFile\" ext=\"cmake\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"8\" />\r\n            <WordsStyle name=\"STRING D\" styleID=\"2\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING L\" styleID=\"3\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING R\" styleID=\"4\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"4\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"5\" fgColor=\"FF6600\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"PARAMETER\" styleID=\"6\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"7\" fgColor=\"FF8040\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"USER DEFINED\" styleID=\"8\" fgColor=\"FFCC00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"WHILEDEF\" styleID=\"9\" fgColor=\"339999\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"FOREACHDEF\" styleID=\"10\" fgColor=\"9933CC\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IFDEF\" styleID=\"11\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"MACRODEF\" styleID=\"12\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING VARIABLE\" styleID=\"13\" fgColor=\"66FF00\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"14\" fgColor=\"804040\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"searchResult\" desc=\"Search result\" ext=\"\">\r\n            <WordsStyle name=\"Default\" styleID=\"0\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Search Header\" styleID=\"1\" fgColor=\"000080\" bgColor=\"BBBBFF\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"File Header\" styleID=\"2\" fgColor=\"008000\" bgColor=\"D5FFD5\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"Line Number\" styleID=\"3\" fgColor=\"000000\" bgColor=\"FFFFFF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Hit Word\" styleID=\"4\" fgColor=\"FF0000\" bgColor=\"FFFFBF\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Selected Line\" styleID=\"5\" fgColor=\"000080\" bgColor=\"FFFF4F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\">if else for while</WordsStyle>\r\n            <WordsStyle name=\"Current line background colour\" styleID=\"6\" bgColor=\"E8E8FF\" fgColor=\"0080FF\" fontSize=\"\" fontStyle=\"0\">bool long int char</WordsStyle>\r\n        </LexerType>\r\n    </LexerStyles>\r\n    <GlobalStyles>\r\n        <!-- Attention : Don't modify the name of styleID=\"0\" -->\r\n        <WidgetStyle name=\"Global override\" styleID=\"0\" fgColor=\"FFFF80\" bgColor=\"FF8000\" fontName=\"Courier New\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Default Style\" styleID=\"32\" fgColor=\"FFFFFF\" bgColor=\"000000\" fontName=\"Monaco\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Indent guideline style\" styleID=\"37\" fgColor=\"C0C0C0\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Brace highlight style\" styleID=\"34\" fgColor=\"99CC99\" bgColor=\"000000\" fontName=\"\" fontStyle=\"1\" fontSize=\"12\" />\r\n        <WidgetStyle name=\"Bad brace colour\" styleID=\"35\" fgColor=\"CCFF33\" bgColor=\"000000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Current line background colour\" styleID=\"0\" bgColor=\"333333\" fgColor=\"0080C0\" fontSize=\"\" fontStyle=\"0\" />\r\n        <WidgetStyle name=\"Mark colour\" styleID=\"0\" fgColor=\"C00000\" bgColor=\"000000\" />\r\n        <WidgetStyle name=\"Selected text colour\" styleID=\"0\" bgColor=\"6699CC\" fgColor=\"8000FF\" fontStyle=\"0\" />\r\n        <WidgetStyle name=\"Caret colour\" styleID=\"2069\" fgColor=\"FFFFFF\" bgColor=\"112435\" fontSize=\"\" fontStyle=\"0\" />\r\n        <WidgetStyle name=\"Find Mark Style\" styleID=\"31\" fgColor=\"FFFF00\" bgColor=\"FF0000\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Edge colour\" styleID=\"0\" fgColor=\"80FFFF\" bgColor=\"F3F3F3\" fontSize=\"8\" fontStyle=\"0\" />\r\n        <WidgetStyle name=\"Line number margin\" styleID=\"33\" fgColor=\"E4E4E4\" bgColor=\"333333\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Fold\" styleID=\"0\" fgColor=\"999999\" bgColor=\"333333\" fontSize=\"\" fontStyle=\"0\" />\r\n        <WidgetStyle name=\"Fold margin\" styleID=\"0\" fgColor=\"222222\" bgColor=\"111111\" />\r\n        <WidgetStyle name=\"White space symbol\" styleID=\"0\" fgColor=\"FF8080\" bgColor=\"000000\" />\r\n        <WidgetStyle name=\"Smart HighLighting\" styleID=\"29\" bgColor=\"00FF00\" fgColor=\"555753\" />\r\n        <WidgetStyle name=\"Find Mark Style\" styleID=\"31\" bgColor=\"FF0000\" fgColor=\"FCAF3E\" />\r\n        <WidgetStyle name=\"Mark Style 1\" styleID=\"25\" bgColor=\"00FFFF\" />\r\n        <WidgetStyle name=\"Mark Style 2\" styleID=\"24\" bgColor=\"FF8000\" />\r\n        <WidgetStyle name=\"Mark Style 3\" styleID=\"23\" bgColor=\"FFFF00\" />\r\n        <WidgetStyle name=\"Mark Style 4\" styleID=\"22\" bgColor=\"8000FF\" />\r\n        <WidgetStyle name=\"Mark Style 5\" styleID=\"21\" bgColor=\"008000\" />\r\n        <WidgetStyle name=\"Incremental highlight all\" styleID=\"28\" bgColor=\"0080FF\" fgColor=\"FFCAB0\" />\r\n        <WidgetStyle name=\"Tags match highlighting\" styleID=\"27\" bgColor=\"8000FF\" fgColor=\"000000\" />\r\n        <WidgetStyle name=\"Tags attribute\" styleID=\"26\" bgColor=\"FFFF00\" fgColor=\"8080C0\" />\r\n        <WidgetStyle name=\"Active tab focused indicator\" styleID=\"0\" fgColor=\"FAAA3C\" bgColor=\"FF0000\" />\r\n        <WidgetStyle name=\"Active tab unfocused indicator\" styleID=\"0\" fgColor=\"FFCAB0\" bgColor=\"80FF00\" />\r\n        <WidgetStyle name=\"Active tab text\" styleID=\"0\" fgColor=\"000000\" />\r\n        <WidgetStyle name=\"Inactive tabs\" styleID=\"0\" fgColor=\"808080\" bgColor=\"C0C0C0\" />\r\n    </GlobalStyles>\r\n</NotepadPlus>\r\n"
  },
  {
    "path": "gui/themes/Zenburn.xml",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\" ?>\r\n<!--\r\nFile name:           Zenburn.xml\r\nStyle Name:          Zenburn\r\nDescription:         Zenburn-like style for Notepad++.\r\n                     Inspired by the original Zenburn colorscheme for Vim by Jani Nurminen.\r\n                     Official Vim Zenburn home page: http://slinky.imukuppi.org/zenburnpage/\r\nSupported languages: All the languages supported by release 6.2.3\r\nCreated by:          Jani Kesnen (jani dot kesanen gmail com)\r\nReleased:            25.01.2013\r\nLicense:             Feel free to modify this style and re-release it. This style is available under the terms of the GNU Free License.\r\n-->\r\n<NotepadPlus>\r\n    <LexerStyles>\r\n        <LexerType name=\"actionscript\" desc=\"ActionScript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"20\" fgColor=\"EFEF8F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"DFC47D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"CEDF99\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"C89191\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"DCA3A3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"DCA3A3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"C89191\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"ada\" desc=\"ADA\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"1\" fgColor=\"DFC47D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"2\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DELIMITER\" styleID=\"4\" fgColor=\"9F9D6D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"5\" fgColor=\"DCA3A3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"7\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"9\" fgColor=\"CEDF99\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"10\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"ILLEGAL\" styleID=\"11\" fgColor=\"EBD6EB\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"asp\" desc=\"asp\" ext=\"asp\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"81\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"82\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"83\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"84\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"85\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"86\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASPSYBOL\" styleID=\"15\" fgColor=\"DFC47D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SCRIPTTYPE\" styleID=\"16\" fgColor=\"DFDFDF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"asm\" desc=\"Assembly\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"C89191\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"4\" fgColor=\"9F9D6D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"5\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CPU INSTRUCTION\" styleID=\"6\" fgColor=\"E3CEAB\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"MATH INSTRUCTION\" styleID=\"7\" fgColor=\"E3CEAB\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"REGISTER\" styleID=\"8\" fgColor=\"FFEBDD\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"9\" fgColor=\"CEDF99\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"DIRECTIVE OPERAND\" styleID=\"10\" fgColor=\"9F9D6D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"COMMENT BLOCK\" styleID=\"11\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"12\" fgColor=\"DCA3A3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"EXT INSTRUCTION\" styleID=\"14\" fgColor=\"E3CEAB\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type4\" />\r\n        </LexerType>\r\n        <LexerType name=\"autoit\" desc=\"autoIt\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"1\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"2\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"4\" fgColor=\"EFEF8F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"DFC47D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"6\" fgColor=\"FFEBDD\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"7\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"8\" fgColor=\"9F9D6D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"9\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"SENT\" styleID=\"10\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"11\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"12\" fgColor=\"FFEBDD\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"EXPAND\" styleID=\"13\" fgColor=\"CEDF99\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type5\" />\r\n            <WordsStyle name=\"COMOBJ\" styleID=\"14\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"bash\" desc=\"bash\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"EDD6ED\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"4\" fgColor=\"DFC47D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"5\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"6\" fgColor=\"DCA3A3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"9F9D6D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"8\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SCALAR\" styleID=\"9\" fgColor=\"E3CEAB\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"PARAM\" styleID=\"10\" fgColor=\"FFEBDD\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"11\" fgColor=\"CEDF99\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE DELIM\" styleID=\"12\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE Q\" styleID=\"13\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"batch\" desc=\"Batch\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORDS\" styleID=\"2\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"3\" fgColor=\"DFC47D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"HIDE SYBOL\" styleID=\"4\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"5\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"6\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"9F9D6D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"c\" desc=\"C\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"DFC47D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"CEDF99\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"DCA3A3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"9F9D6D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"C89191\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cpp\" desc=\"C++\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"DFC47D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"CEDF99\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"DCA3A3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"9F9D6D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"C89191\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cs\" desc=\"C#\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"DFC47D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"CEDF99\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"DCA3A3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"9F9D6D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"C89191\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"caml\" desc=\"Caml\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"E3CEAB\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGNAME\" styleID=\"2\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"3\" fgColor=\"DFC47D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"BUILIN FUNC &amp; TYPE\" styleID=\"4\" fgColor=\"FFEBDD\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"TYPE\" styleID=\"5\" fgColor=\"CEDF99\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"LINENUM\" styleID=\"6\" fgColor=\"C2BE9E\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"9F9D6D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"8\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"9\" fgColor=\"DCA3A3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"11\" fgColor=\"C89191\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"13\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"14\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cmake\" desc=\"CMakeFile\" ext=\"cmake\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING D\" styleID=\"2\" fgColor=\"C89191\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING L\" styleID=\"3\" fgColor=\"DCA3A3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING R\" styleID=\"4\" fgColor=\"DCA3A3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"5\" fgColor=\"EFEF8F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"PARAMETER\" styleID=\"6\" fgColor=\"E3CEAB\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"7\" fgColor=\"E3CEAB\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"USER DEFINED\" styleID=\"8\" fgColor=\"CEDF99\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"WHILEDEF\" styleID=\"9\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"FOREACHDEF\" styleID=\"10\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IFDEF\" styleID=\"11\" fgColor=\"DFC47D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"MACRODEF\" styleID=\"12\" fgColor=\"DFC47D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING VARIABLE\" styleID=\"13\" fgColor=\"E3CEAB\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"14\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"css\" desc=\"CSS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"E3CEAB\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS\" styleID=\"2\" fgColor=\"CEDF99\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PSEUDOCLASS\" styleID=\"3\" fgColor=\"CEDF99\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"UNKNOWN_PSEUDOCLASS\" styleID=\"4\" fgColor=\"CEDF99\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"5\" fgColor=\"9F9D6D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"6\" fgColor=\"C2BE9E\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"UNKNOWN_IDENTIFIER\" styleID=\"7\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VALUE\" styleID=\"8\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"ID\" styleID=\"10\" fgColor=\"CEDF99\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IMPORTANT\" styleID=\"11\" fgColor=\"BFCAA9\" bgColor=\"274E27\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"12\" fgColor=\"CEDF99\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cobol\" desc=\"COBOL\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DECLARATION\" styleID=\"5\" fgColor=\"FFEBDD\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"16\" fgColor=\"DFC47D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"8\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"E3CEAB\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"DCA3A3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"9F9D6D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"d\" desc=\"D\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"14\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"6\" fgColor=\"DFC47D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"KEYWORD1\" styleID=\"7\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"KEYWORD2\" styleID=\"8\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"KEYWORD3\" styleID=\"9\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"KEYWORD4\" styleID=\"20\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"KEYWORD5\" styleID=\"21\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"KEYWORD6\" styleID=\"22\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type5\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"10\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"12\" fgColor=\"DCA3A3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"13\" fgColor=\"9F9D6D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT NESTED\" styleID=\"4\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"16\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"17\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"diff\" desc=\"DIFF\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"2\" fgColor=\"DBDBBC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"HEADER\" styleID=\"3\" fgColor=\"DEDEBE\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"POSITION\" styleID=\"4\" fgColor=\"FDCEAE\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DELETED\" styleID=\"5\" fgColor=\"CFBFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ADDED\" styleID=\"6\" fgColor=\"E3CEAB\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"fortran\" desc=\"Fortran\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"4\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"9F9D6D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"8\" fgColor=\"CEDF99\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION1\" styleID=\"9\" fgColor=\"EFEF8F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"FUNCTION2\" styleID=\"10\" fgColor=\"DFC47D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"11\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR2\" styleID=\"12\" fgColor=\"9F9D6D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"13\" fgColor=\"DFC47D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"CONTINUATION\" styleID=\"14\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"gui4cli\" desc=\"GUI4CLI\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"1\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"2\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"5\" fgColor=\"FFEBDD\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"EVENT\" styleID=\"5\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"16\" fgColor=\"DFDFDF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"CONTROL\" styleID=\"16\" fgColor=\"DFC47D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"16\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"9F9D6D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"haskell\" desc=\"Haskell\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"2\" fgColor=\"E3CEAB\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"C89191\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"5\" fgColor=\"DCA3A3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS\" styleID=\"6\" fgColor=\"DFC47D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"MODULE\" styleID=\"7\" fgColor=\"FFEBDD\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CAPITAL\" styleID=\"8\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATA\" styleID=\"9\" fgColor=\"CEDF99\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IMPORT\" styleID=\"10\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"11\" fgColor=\"9F9D6D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTANCE\" styleID=\"12\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"13\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK\" styleID=\"14\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK2\" styleID=\"15\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK3\" styleID=\"16\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"html\" desc=\"HTML\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"6\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"7\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"E3CEAB\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGEND\" styleID=\"11\" fgColor=\"E3CEAB\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGUNKNOWN\" styleID=\"2\" fgColor=\"EDD6ED\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"3\" fgColor=\"DFDFDF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTEUNKNOWN\" styleID=\"4\" fgColor=\"DFDFDF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"SGMLDEFAULT\" styleID=\"21\" fgColor=\"DFDFDF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CDATA\" styleID=\"17\" fgColor=\"C89191\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VALUE\" styleID=\"19\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"ENTITY\" styleID=\"10\" fgColor=\"CFBFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"ini\" desc=\"ini file\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"2\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASSIGNMENT\" styleID=\"3\" fgColor=\"9F9D6D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFVAL\" styleID=\"4\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"inno\" desc=\"InnoSetup\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"2\" fgColor=\"CEDF99\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"PARAMETER\" styleID=\"3\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"4\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR INLINE\" styleID=\"6\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT PASCAL\" styleID=\"7\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD PASCAL\" styleID=\"8\" fgColor=\"CEDF99\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"KEYWORD USER\" styleID=\"9\" fgColor=\"DFC47D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"STRING DOUBLE\" styleID=\"10\" fgColor=\"C89191\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING SINGLE\" styleID=\"11\" fgColor=\"DCA3A3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"12\" fgColor=\"DFC47D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"java\" desc=\"Java\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"DFC47D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"CEDF99\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"DCA3A3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"9F9D6D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"C89191\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"javascript\" desc=\"Javascript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"41\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"45\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"46\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"47\" fgColor=\"CEDF99\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"48\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"49\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOLS\" styleID=\"50\" fgColor=\"DFC47D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"52\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"42\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"43\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTDOC\" styleID=\"44\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"kix\" desc=\"KiXtart\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"31\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"2\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"3\" fgColor=\"DCA3A3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VAR\" styleID=\"5\" fgColor=\"CEDF99\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"6\" fgColor=\"DFC47D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"7\" fgColor=\"E3CEAB\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"8\" fgColor=\"EFEF8F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"9\" fgColor=\"9F9D6D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"lisp\" desc=\"LISP\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION WORD\" styleID=\"3\" fgColor=\"EFEF8F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION WORD2\" styleID=\"4\" fgColor=\"EFEF8F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"5\" fgColor=\"E3CEAB\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"9\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"DFC47D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"11\" fgColor=\"EDD6ED\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"lua\" desc=\"Lua\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"LITERALSTRING\" styleID=\"8\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"DFC47D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"DCA3A3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"9F9D6D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNC1\" styleID=\"13\" fgColor=\"CEDF99\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"FUNC2\" styleID=\"14\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"FUNC3\" styleID=\"15\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" keywordClass=\"type2\" />\r\n        </LexerType>\r\n        <LexerType name=\"makefile\" desc=\"Makefile\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"2\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"3\" fgColor=\"DFC47D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"4\" fgColor=\"9F9D6D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"TARGET\" styleID=\"5\" fgColor=\"CEDF99\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDEOL\" styleID=\"9\" fgColor=\"C89191\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"matlab\" desc=\"Matlab\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"2\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"4\" fgColor=\"DFC47D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"5\" fgColor=\"C89191\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"9F9D6D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLE QUOTE STRING\" styleID=\"8\" fgColor=\"DCA3A3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"nfo\" desc=\"Dos Style\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"32\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontSize=\"\" fontStyle=\"0\" />\r\n        </LexerType>\r\n        <LexerType name=\"nsis\" desc=\"NSIS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING DOUBLE QUOTE\" styleID=\"2\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING LEFT QUOTE\" styleID=\"3\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING RIGHT QUOTE\" styleID=\"4\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"5\" fgColor=\"EFEF8F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"6\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"7\" fgColor=\"DCA3A3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"USER DEFINED\" styleID=\"8\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"4\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"9\" fgColor=\"E3CEAB\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SUBSECTION\" styleID=\"10\" fgColor=\"E3CEAB\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"IF DEFINE\" styleID=\"11\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"12\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING VAR\" styleID=\"13\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"14\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SECTION GROUP\" styleID=\"15\" fgColor=\"E3CEAB\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"4\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAGE EX\" styleID=\"16\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION DEFINITIONS\" styleID=\"17\" fgColor=\"EFEF8F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"18\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"objc\" desc=\"Objective-C\" ext=\"\">\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"19\" fgColor=\"CEDF99\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"QUALIFIER\" styleID=\"20\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"DFC47D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"CEDF99\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"DCA3A3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"9F9D6D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"C89191\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"C89191\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"pascal\" desc=\"Pascal\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"E3CEAB\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"2\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"3\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"4\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR2\" styleID=\"6\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"7\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HEX NUMBER\" styleID=\"8\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"9\" fgColor=\"DFC47D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"10\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"12\" fgColor=\"DCA3A3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"13\" fgColor=\"9F9D6D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASM\" styleID=\"14\" fgColor=\"FFEBDD\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"perl\" desc=\"Perl\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"DFC47D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"DCA3A3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"9F9D6D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"17\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"SCALAR\" styleID=\"12\" fgColor=\"E3CEAB\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ARRAY\" styleID=\"13\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HASH\" styleID=\"14\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL TABLE\" styleID=\"15\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"PUNCTUATION\" styleID=\"8\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"POD\" styleID=\"3\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"EBD6EB\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"LONGQUOTE\" styleID=\"19\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATASECTION\" styleID=\"21\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGSUBST\" styleID=\"18\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"20\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"php\" desc=\"php\" ext=\"\">\r\n            <WordsStyle name=\"QUESTION MARK\" styleID=\"18\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"118\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"119\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING VARIABLE\" styleID=\"126\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SIMPLESTRING\" styleID=\"120\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"121\" fgColor=\"DFC47D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"122\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"123\" fgColor=\"CEDF99\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"124\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"125\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"127\" fgColor=\"9F9D6D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"postscript\" desc=\"Postscript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"DSC COMMENT\" styleID=\"2\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"DSC VALUE\" styleID=\"3\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Name\" styleID=\"5\" fgColor=\"CEDF99\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"6\" fgColor=\"E3CEAB\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"LITERAL\" styleID=\"7\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IMMEVAL\" styleID=\"8\" fgColor=\"C89191\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAREN ARRAY\" styleID=\"9\" fgColor=\"DFC47D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAREN DICT\" styleID=\"10\" fgColor=\"DFC47D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAREN PROC\" styleID=\"11\" fgColor=\"DFC47D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"12\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HEX STRING\" styleID=\"13\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BASE85 STRING\" styleID=\"14\" fgColor=\"E3CEAB\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BAD STRING CHAR\" styleID=\"15\" fgColor=\"ECA9A9\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"powershell\" desc=\"PowerShell\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"2\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"3\" fgColor=\"DCA3A3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"5\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"9F9D6D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"8\" fgColor=\"DFC47D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"CMDLET\" styleID=\"9\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"ALIAS\" styleID=\"10\" fgColor=\"CEDF99\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n        </LexerType>\r\n        <LexerType name=\"props\" desc=\"Properties file\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASSIGNMENT\" styleID=\"3\" fgColor=\"9F9D6D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFVAL\" styleID=\"4\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"2\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"python\" desc=\"Python\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"4\" fgColor=\"DCA3A3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORDS\" styleID=\"5\" fgColor=\"DFC47D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TRIPLE\" styleID=\"6\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TRIPLEDOUBLE\" styleID=\"7\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASSNAME\" styleID=\"8\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFNAME\" styleID=\"9\" fgColor=\"CEDF99\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"9F9D6D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK\" styleID=\"12\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"r\" desc=\"R\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"2\" fgColor=\"E3CEAB\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"BASE WORD\" styleID=\"3\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"4\" fgColor=\"DFC47D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"7\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"8\" fgColor=\"9F9D6D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"INFIX\" styleID=\"10\" fgColor=\"CEDF99\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"rc\" desc=\"RC\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"DFC47D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"CEDF99\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"DCA3A3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"9F9D6D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"C89191\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"ruby\" desc=\"Ruby\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"EBD6EB\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"2\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"POD\" styleID=\"3\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"5\" fgColor=\"E3CEAB\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"DCA3A3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS NAME\" styleID=\"8\" fgColor=\"DFE4CF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEF NAME\" styleID=\"9\" fgColor=\"EFEF8F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"9F9D6D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"FFEBDD\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"12\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"13\" fgColor=\"FFEBDD\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"14\" fgColor=\"E3CEAB\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MODULE NAME\" styleID=\"15\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTANCE VAR\" styleID=\"16\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS VAR\" styleID=\"17\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"18\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATA SECTION\" styleID=\"19\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING Q\" styleID=\"24\" fgColor=\"C89191\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"scheme\" desc=\"Scheme\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION WORD\" styleID=\"3\" fgColor=\"EFEF8F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n\t\t\t<WordsStyle name=\"FUNCTION WORD2\" styleID=\"4\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"5\" fgColor=\"E3CEAB\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"9\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"9F9D6D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"11\" fgColor=\"FFEBDD\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"smalltalk\" desc=\"Smalltalk\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"1\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"3\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"4\" fgColor=\"FFEBDD\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"BINARY\" styleID=\"5\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BOOL\" styleID=\"6\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SELF\" styleID=\"7\" fgColor=\"CEDF99\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SUPER\" styleID=\"8\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"NIL\" styleID=\"9\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"10\" fgColor=\"EFEF8F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"RETURN\" styleID=\"11\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"12\" fgColor=\"E3CEAB\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KWS END\" styleID=\"13\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASSIGN\" styleID=\"14\" fgColor=\"9F9D6D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"15\" fgColor=\"DCA3A3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SPECIAL SELECTOR\" styleID=\"16\" fgColor=\"E3CEAB\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"sql\" desc=\"SQL\" ext=\"\">\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"5\" fgColor=\"DFC47D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"7\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"9F9D6D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"tcl\" desc=\"TCL\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MODIFIER\" styleID=\"10\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"EXPAND\" styleID=\"11\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"12\" fgColor=\"DFC47D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"13\" fgColor=\"CEDF99\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SUB BRACE\" styleID=\"9\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SUBSTITUTION\" styleID=\"8\" fgColor=\"FFEBDD\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"9F9D6D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD IN QUOTE\" styleID=\"4\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IN QUOTE\" styleID=\"5\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT BOX\" styleID=\"17\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"BLOCK COMMENT\" styleID=\"18\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"tex\" desc=\"TeX\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"1\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"GROUP\" styleID=\"2\" fgColor=\"CEDF99\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"3\" fgColor=\"DFC47D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"4\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"5\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"vb\" desc=\"VB / VBS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"7\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"3\" fgColor=\"CEDF99\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"9F9D6D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATE\" styleID=\"8\" fgColor=\"DFC47D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"verilog\" desc=\"Verilog\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGNAME\" styleID=\"2\" fgColor=\"E3CEAB\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"DFC47D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"7\" fgColor=\"CEDF99\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"9F9D6D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE BANG\" styleID=\"3\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"USER\" styleID=\"19\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"vhdl\" desc=\"VHDL\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"5\" fgColor=\"9F9D6D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"6\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"8\" fgColor=\"E3CEAB\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STD OPERATOR\" styleID=\"9\" fgColor=\"DFC47D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"10\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"9\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DIRECTIVE OPERAND\" styleID=\"10\" fgColor=\"9F9D6D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"STD FUNCTION\" styleID=\"11\" fgColor=\"EFEF8F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"STD PACKAGE\" styleID=\"12\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"STD TYPE\" styleID=\"13\" fgColor=\"CEDF99\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"USER DEFINE\" styleID=\"14\" fgColor=\"FFEBDD\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type5\" />\r\n        </LexerType>\r\n        <LexerType name=\"xml\" desc=\"XML\" ext=\"\">\r\n            <WordsStyle name=\"XMLSTART\" styleID=\"12\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"XMLEND\" styleID=\"13\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"6\" fgColor=\"C89191\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"7\" fgColor=\"C89191\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"E3CEAB\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGEND\" styleID=\"11\" fgColor=\"E3CEAB\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGUNKNOWN\" styleID=\"2\" fgColor=\"EDD6ED\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"3\" fgColor=\"BEC89E\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTEUNKNOWN\" styleID=\"4\" fgColor=\"DFDFDF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"SGMLDEFAULT\" styleID=\"21\" fgColor=\"DFDFDF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CDATA\" styleID=\"17\" fgColor=\"C89191\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"yaml\" desc=\"YAML\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"2\" fgColor=\"FFCFAF\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"7F9F7F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"3\" fgColor=\"DFC47D\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REFERENCE\" styleID=\"5\" fgColor=\"CEDF99\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOCUMENT\" styleID=\"6\" fgColor=\"E3CEAB\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"7\" fgColor=\"CC9393\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"8\" fgColor=\"EBD6EB\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"searchResult\" desc=\"Search result\" ext=\"\">\r\n            <WordsStyle name=\"Default\" styleID=\"0\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Search Header\" styleID=\"1\" fgColor=\"101010\" bgColor=\"8FAF9F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"File Header\" styleID=\"2\" fgColor=\"E3CEAB\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"Line Number\" styleID=\"3\" fgColor=\"8CD0D3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"Hit Word\" styleID=\"4\" fgColor=\"CCE08C\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"Selected Line\" styleID=\"5\" fgColor=\"AFE7B3\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"Current line background colour\" styleID=\"6\" bgColor=\"585858\" />\r\n        </LexerType>\r\n    </LexerStyles>\r\n    <GlobalStyles>\r\n        <!-- Attention : Don't modify the name of styleID=\"0\" -->\r\n        <WidgetStyle name=\"Global override\" styleID=\"0\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"Consolas\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Default Style\" styleID=\"32\" fgColor=\"DCDCCC\" bgColor=\"3F3F3F\" fontName=\"Consolas\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Indent guideline style\" styleID=\"37\" fgColor=\"4F5F5F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Brace highlight style\" styleID=\"34\" fgColor=\"F0F9F9\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Bad brace colour\" styleID=\"35\" fgColor=\"F09F9F\" bgColor=\"3F3F3F\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Current line background colour\" styleID=\"0\" bgColor=\"101010\" />\r\n        <WidgetStyle name=\"Selected text colour\" styleID=\"0\" bgColor=\"585858\" />\r\n        <WidgetStyle name=\"Caret colour\" styleID=\"2069\" fgColor=\"8FAF9F\" />\r\n        <WidgetStyle name=\"Edge colour\" styleID=\"0\" fgColor=\"4F5F5F\" />\r\n        <WidgetStyle name=\"Line number margin\" styleID=\"33\" fgColor=\"8A8A8A\" bgColor=\"0C0C0C\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Fold\" styleID=\"0\" fgColor=\"707070\" bgColor=\"101010\" />\r\n\t\t<WidgetStyle name=\"Fold active\" styleID=\"0\" fgColor=\"7F9F7F\" />\r\n        <WidgetStyle name=\"Fold margin\" styleID=\"0\" fgColor=\"181818\" bgColor=\"101010\" />\r\n        <WidgetStyle name=\"White space symbol\" styleID=\"0\" fgColor=\"5F5F5F\" />\r\n        <WidgetStyle name=\"Smart HighLighting\" styleID=\"29\" bgColor=\"358A35\" />\r\n        <WidgetStyle name=\"Find Mark Style\" styleID=\"31\" bgColor=\"FF0000\" />\r\n        <WidgetStyle name=\"Mark Style 1\" styleID=\"25\" bgColor=\"88B090\" />\r\n        <WidgetStyle name=\"Mark Style 2\" styleID=\"24\" bgColor=\"F8F893\" />\r\n        <WidgetStyle name=\"Mark Style 3\" styleID=\"23\" bgColor=\"F18C96\" />\r\n        <WidgetStyle name=\"Mark Style 4\" styleID=\"22\" bgColor=\"408040\" />\r\n        <WidgetStyle name=\"Mark Style 5\" styleID=\"21\" bgColor=\"968CF1\" />\r\n        <WidgetStyle name=\"Incremental highlight all\" styleID=\"28\" bgColor=\"C3BF9F\" />\r\n        <WidgetStyle name=\"Tags match highlighting\" styleID=\"27\" bgColor=\"C6C600\" />\r\n        <WidgetStyle name=\"Tags attribute\" styleID=\"26\" bgColor=\"78926F\" />\r\n        <WidgetStyle name=\"Active tab focused indicator\" styleID=\"0\" fgColor=\"80D4B2\" />\r\n        <WidgetStyle name=\"Active tab unfocused indicator\" styleID=\"0\" fgColor=\"3FBA89\" />\r\n        <WidgetStyle name=\"Active tab text\" styleID=\"0\" fgColor=\"101010\" />\r\n        <WidgetStyle name=\"Inactive tabs\" styleID=\"0\" fgColor=\"808080\" bgColor=\"C0C0C0\" />\r\n    </GlobalStyles>\r\n</NotepadPlus>\r\n"
  },
  {
    "path": "gui/themes/khaki.xml",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\" ?>\r\n<!--//\r\nFile Name:           khaki.xml\r\nStyle Name:          khaki\r\nDescription:         khaki theme for Notepad++.\r\n                     Based (moderately closely) on khaki.vim by Frank Baruch\r\n                     http://www.vim.org/scripts/script.php?script_id=1987\r\nSupported languages: All the languages supported by release 5.9.8\r\nCreated by:          Paul Neubauer (PaulRNeubauer at gmail dot com)\r\nLast Modified:       7:04 AM 5/29/2012\r\nReleased:            4/17/2012\r\nLicense:             Feel free to modify this theme. \r\n                     This theme is available under the terms of the Creative Commons\r\n                     Attribution 3.0 Unported License. You are free to to copy,\r\n                     distribute and transmit the work, to adapt the work, or to make\r\n                     commercial use of the work under the condition that you must\r\n                     attribute the work in the manner specified by the author or\r\n                     licensor (but not in any way that suggests that they endorse you\r\n                     or your use of the work). See\r\n                     http://creativecommons.org/licenses/by/3.0/ \r\n                     for a legal description of the license terms. Briefly, this\r\n                     means: please note in derivatives of this theme, that they are\r\n                     based on my work. Of course, if you are using this file as no\r\n                     more than a framework for an entirely different color scheme, you\r\n                     may, and should, omit such attribution.\r\n\r\nInstallation:\r\n    Copy this file to C:\\Program Files (x86)\\Notepad++\\themes  OR\r\n    For WindowsXP:\r\n    Copy this file to C:\\Documents and Settings\\%%USERNAME%%\\Application Data\\Notepad++\\themes\r\n    For Windows Vista or 7:\r\n    Copy this file to C:\\Users\\%%USERNAME%%\\AppData\\Roaming\\Notepad++\\themes\r\n\r\n//-->\r\n<NotepadPlus>\r\n    <LexerStyles>\r\n        <LexerType name=\"actionscript\" desc=\"ActionScript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"20\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"5f0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"5f005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"00005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"0087af\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"d700d7\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"ada\" desc=\"ADA\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"1\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"2\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DELIMITER\" styleID=\"4\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"5\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER EOL\" styleID=\"6\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"7\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"8\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"9\" fgColor=\"af0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"10\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"ILLEGAL\" styleID=\"11\" fgColor=\"d700d7\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"asm\" desc=\"Assembly\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"4\" fgColor=\"00005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"5\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CPU INSTRUCTION\" styleID=\"6\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"MATH INSTRUCTION\" styleID=\"7\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"REGISTER\" styleID=\"8\" fgColor=\"af0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"9\" fgColor=\"5f0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"DIRECTIVE OPERAND\" styleID=\"10\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"COMMENT BLOCK\" styleID=\"11\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"12\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"EXT INSTRUCTION\" styleID=\"14\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\" />\r\n        </LexerType>\r\n        <LexerType name=\"asp\" desc=\"asp\" ext=\"asp\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"81\" fgColor=\"5f5f00\" bgColor=\"bfbf97\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"82\" fgColor=\"87875f\" bgColor=\"bfbf97\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"83\" fgColor=\"005f5f\" bgColor=\"bfbf97\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"84\" fgColor=\"87005f\" bgColor=\"bfbf97\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"85\" fgColor=\"005f5f\" bgColor=\"bfbf97\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"86\" fgColor=\"000087\" bgColor=\"bfbf97\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASPSYBOL\" styleID=\"15\" fgColor=\"005f00\" bgColor=\"bfbf97\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SCRIPTTYPE\" styleID=\"16\" fgColor=\"005f00\" bgColor=\"bfbf97\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"autoit\" desc=\"autoIt\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"1\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"2\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"4\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"6\" fgColor=\"af0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"7\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"8\" fgColor=\"00005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"9\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SENT\" styleID=\"10\" fgColor=\"af0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"11\" fgColor=\"5f0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"12\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"EXPAND\" styleID=\"13\" fgColor=\"af5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type5\" />\r\n            <WordsStyle name=\"COMOBJ\" styleID=\"14\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"bash\" desc=\"bash\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"d700d7\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"4\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"5\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"6\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"00005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"8\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SCALAR\" styleID=\"9\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"PARAM\" styleID=\"10\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"11\" fgColor=\"af0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE DELIM\" styleID=\"12\" fgColor=\"af5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE Q\" styleID=\"13\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"batch\" desc=\"Batch\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORDS\" styleID=\"2\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"3\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HIDE SYBOL\" styleID=\"4\" fgColor=\"870000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"5\" fgColor=\"af0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"6\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"00005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"c\" desc=\"C\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"5f0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPEWORD\" styleID=\"16\" fgColor=\"5f005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"00005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"0087af\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"d700d7\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"caml\" desc=\"Caml\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGNAME\" styleID=\"2\" fgColor=\"af0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"3\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"BUILIN FUNC &amp; TYPE\" styleID=\"4\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"TYPE\" styleID=\"5\" fgColor=\"5f005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"LINENUM\" styleID=\"6\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"00005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"8\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"9\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"11\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"13\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"14\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cmake\" desc=\"CMakeFile\" ext=\"cmake\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING D\" styleID=\"2\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING L\" styleID=\"3\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING R\" styleID=\"4\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"5\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"PARAMETER\" styleID=\"6\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"7\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"USER DEFINED\" styleID=\"8\" fgColor=\"870000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"WHILEDEF\" styleID=\"9\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FOREACHDEF\" styleID=\"10\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IFDEF\" styleID=\"11\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MACRODEF\" styleID=\"12\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING VARIABLE\" styleID=\"13\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"14\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cobol\" desc=\"COBOL\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"5f0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DECLARATION\" styleID=\"5\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"16\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"8\" fgColor=\"870000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"00005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"d700d7\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cpp\" desc=\"C++\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"5f0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"5f005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"00005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"0087af\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"d700d7\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cs\" desc=\"C#\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"5f0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"5f005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"00005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"0087af\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"d700d7\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"css\" desc=\"CSS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS\" styleID=\"2\" fgColor=\"5f0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PSEUDOCLASS\" styleID=\"3\" fgColor=\"5f0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"UNKNOWN_PSEUDOCLASS\" styleID=\"4\" fgColor=\"5f0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"5\" fgColor=\"00005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"6\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"UNKNOWN_IDENTIFIER\" styleID=\"7\" fgColor=\"d700d7\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VALUE\" styleID=\"8\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"ID\" styleID=\"10\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IMPORTANT\" styleID=\"11\" fgColor=\"af5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"12\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"13\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"14\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"d\" desc=\"D\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"14\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"6\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"KEYWORD1\" styleID=\"7\" fgColor=\"870000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\"/>\r\n            <WordsStyle name=\"KEYWORD2\" styleID=\"8\" fgColor=\"870000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\"/>\r\n            <WordsStyle name=\"KEYWORD3\" styleID=\"9\" fgColor=\"870000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\"/>\r\n            <WordsStyle name=\"KEYWORD4\" styleID=\"20\" fgColor=\"870000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\"/>\r\n            <WordsStyle name=\"KEYWORD5\" styleID=\"21\" fgColor=\"870000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\"/>\r\n            <WordsStyle name=\"KEYWORD6\" styleID=\"22\" fgColor=\"870000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type5\"/>\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"10\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"12\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"13\" fgColor=\"00005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT NESTED\" styleID=\"4\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"16\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"17\" fgColor=\"d700d7\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n         </LexerType>\r\n        <LexerType name=\"diff\" desc=\"DIFF\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"2\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HEADER\" styleID=\"3\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"POSITION\" styleID=\"4\" fgColor=\"af0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DELETED\" styleID=\"5\" fgColor=\"870000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"ADDED\" styleID=\"6\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"fortran\" desc=\"Fortran\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"4\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"5\" fgColor=\"af5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"00005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"8\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION1\" styleID=\"9\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"FUNCTION2\" styleID=\"10\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"11\" fgColor=\"5f0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR2\" styleID=\"12\" fgColor=\"00005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"13\" fgColor=\"af0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CONTINUATION\" styleID=\"14\" fgColor=\"d700d7\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"gui4cli\" desc=\"GUI4CLI\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"1\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"2\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"5\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"EVENT\" styleID=\"5\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"16\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"CONTROL\" styleID=\"16\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"16\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"00005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"haskell\" desc=\"Haskell\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"2\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"5\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS\" styleID=\"6\" fgColor=\"5f0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MODULE\" styleID=\"7\" fgColor=\"af0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CAPITAL\" styleID=\"8\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATA\" styleID=\"9\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IMPORT\" styleID=\"10\" fgColor=\"af5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"11\" fgColor=\"00005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTANCE\" styleID=\"12\" fgColor=\"870000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"13\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK\" styleID=\"14\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK2\" styleID=\"15\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK3\" styleID=\"16\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"html\" desc=\"HTML\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"ff005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"6\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"7\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGEND\" styleID=\"11\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGUNKNOWN\" styleID=\"2\" fgColor=\"ff005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"3\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTEUNKNOWN\" styleID=\"4\" fgColor=\"ff005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SGMLDEFAULT\" styleID=\"21\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CDATA\" styleID=\"17\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VALUE\" styleID=\"19\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ENTITY\" styleID=\"10\" fgColor=\"870000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"ini\" desc=\"ini file\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"2\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASSIGNMENT\" styleID=\"3\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFVAL\" styleID=\"4\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"inno\" desc=\"InnoSetup\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"2\" fgColor=\"af0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"PARAMETER\" styleID=\"3\" fgColor=\"870000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"4\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"5f0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR INLINE\" styleID=\"6\" fgColor=\"5f0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT PASCAL\" styleID=\"7\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD PASCAL\" styleID=\"8\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"KEYWORD USER\" styleID=\"9\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"STRING DOUBLE\" styleID=\"10\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING SINGLE\" styleID=\"11\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"12\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"java\" desc=\"Java\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"5f0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"5f005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"00005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"0087af\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"d700d7\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"javascript\" desc=\"Javascript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"41\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"45\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"46\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"47\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"48\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"49\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOLS\" styleID=\"50\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"51\" fgColor=\"af5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"52\" fgColor=\"0087af\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"42\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"43\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTDOC\" styleID=\"44\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"3\" fontSize=\"\">param @projectDescription projectDescription @param</WordsStyle>\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"d700d7\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"kix\" desc=\"KiXtart\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"31\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"2\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"3\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VAR\" styleID=\"5\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"6\" fgColor=\"af0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"7\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"8\" fgColor=\"870000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"9\" fgColor=\"00005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"lisp\" desc=\"LISP\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION WORD\" styleID=\"3\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION WORD2\" styleID=\"4\" fgColor=\"870000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"5\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"8\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"9\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"00005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"11\" fgColor=\"af0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"lua\" desc=\"Lua\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"LITERALSTRING\" styleID=\"8\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"5f0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNC1\" styleID=\"13\" fgColor=\"af0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"FUNC2\" styleID=\"14\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"FUNC3\" styleID=\"15\" fgColor=\"870000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n        </LexerType>\r\n        <LexerType name=\"makefile\" desc=\"Makefile\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"2\" fgColor=\"5f0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"3\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"4\" fgColor=\"00005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TARGET\" styleID=\"5\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDEOL\" styleID=\"9\" fgColor=\"af0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"matlab\" desc=\"Matlab\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"2\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"4\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"5\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"00005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLE QUOTE STRING\" styleID=\"8\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n\t\t<LexerType name=\"nfo\" desc=\"Dos Style\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"32\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontSize=\"\" fontStyle=\"0\" />\r\n        </LexerType>\r\n        <LexerType name=\"nsis\" desc=\"NSIS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING DOUBLE QUOTE\" styleID=\"2\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING LEFT QUOTE\" styleID=\"3\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING RIGHT QUOTE\" styleID=\"4\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"5\" fgColor=\"af0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"6\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"7\" fgColor=\"870000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"USER DEFINED\" styleID=\"8\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"9\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SUBSECTION\" styleID=\"10\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IF DEFINE\" styleID=\"11\" fgColor=\"af5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"12\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING VAR\" styleID=\"13\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"14\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SECTION GROUP\" styleID=\"15\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAGE EX\" styleID=\"16\" fgColor=\"af5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION DEFINITIONS\" styleID=\"17\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"18\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"objc\" desc=\"Objective-C\" ext=\"\">\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"19\" fgColor=\"af0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"QUALIFIER\" styleID=\"20\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"5f0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"5f005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"00005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"0087af\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"d700d7\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"pascal\" desc=\"Pascal\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"2\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"3\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"4\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"5f0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR2\" styleID=\"6\" fgColor=\"5f0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"7\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HEX NUMBER\" styleID=\"8\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"9\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"10\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"12\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"13\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASM\" styleID=\"14\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"perl\" desc=\"Perl\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"5f0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"00005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"17\" fgColor=\"0087af\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGSUBST\" styleID=\"18\" fgColor=\"0087af\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SCALAR\" styleID=\"12\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ARRAY\" styleID=\"13\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HASH\" styleID=\"14\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL TABLE\" styleID=\"15\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PUNCTUATION\" styleID=\"8\" fgColor=\"00005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"POD\" styleID=\"3\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"POD VERB\" styleID=\"31\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"d700d7\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"LONGQUOTE\" styleID=\"19\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATASECTION\" styleID=\"21\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"20\" fgColor=\"af0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE DELIM\" styleID=\"22\" fgColor=\"870000\" bgColor=\"afaf87\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE Q\" styleID=\"23\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE QQ\" styleID=\"24\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE QX\" styleID=\"25\" fgColor=\"af0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING Q\" styleID=\"26\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING QQ\" styleID=\"27\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING QX\" styleID=\"28\" fgColor=\"af0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING QR\" styleID=\"29\" fgColor=\"0087af\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING QW\" styleID=\"30\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FORMAT IDENT\" styleID=\"41\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FORMAT\" styleID=\"42\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n       </LexerType>\r\n        <LexerType name=\"php\" desc=\"php\" ext=\"\">\r\n            <WordsStyle name=\"QUESTION MARK\" styleID=\"18\" fgColor=\"af5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"118\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"119\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING VARIABLE\" styleID=\"126\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SIMPLESTRING\" styleID=\"120\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"121\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"122\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"123\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"124\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"125\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"127\" fgColor=\"00005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"postscript\" desc=\"Postscript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"DSC COMMENT\" styleID=\"2\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"DSC VALUE\" styleID=\"3\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Name\" styleID=\"5\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"6\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"LITERAL\" styleID=\"7\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IMMEVAL\" styleID=\"8\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAREN ARRAY\" styleID=\"9\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAREN DICT\" styleID=\"10\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAREN PROC\" styleID=\"11\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"12\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HEX STRING\" styleID=\"13\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BASE85 STRING\" styleID=\"14\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BAD STRING CHAR\" styleID=\"15\" fgColor=\"d700d7\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"powershell\" desc=\"PowerShell\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"2\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"3\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"5\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"00005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"8\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"CMDLET\" styleID=\"9\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"ALIAS\" styleID=\"10\" fgColor=\"af0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n        </LexerType>\r\n        <LexerType name=\"props\" desc=\"Properties file\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"2\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASSIGNMENT\" styleID=\"3\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFVAL\" styleID=\"4\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"python\" desc=\"Python\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"4\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORDS\" styleID=\"5\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TRIPLE\" styleID=\"6\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TRIPLEDOUBLE\" styleID=\"7\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASSNAME\" styleID=\"8\" fgColor=\"5f0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFNAME\" styleID=\"9\" fgColor=\"af0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"00005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK\" styleID=\"12\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"12\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"r\" desc=\"R\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"2\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"BASE WORD\" styleID=\"3\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"4\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"7\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"8\" fgColor=\"00005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INFIX\" styleID=\"10\" fgColor=\"af0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"rc\" desc=\"RC\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"5f0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"5f005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"00005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"0087af\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"d700d7\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"ruby\" desc=\"Ruby\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"af5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"2\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"POD\" styleID=\"3\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"5\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS NAME\" styleID=\"8\" fgColor=\"5f0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEF NAME\" styleID=\"9\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"00005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"12\" fgColor=\"0087af\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"13\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"14\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MODULE NAME\" styleID=\"15\" fgColor=\"af0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTANCE VAR\" styleID=\"16\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS VAR\" styleID=\"17\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"18\" fgColor=\"af0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATA SECTION\" styleID=\"19\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING Q\" styleID=\"24\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BOOLEAN\" styleID=\"25\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n        </LexerType>\r\n        <LexerType name=\"scheme\" desc=\"Scheme\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION WORD\" styleID=\"3\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION WORD2\" styleID=\"4\" fgColor=\"870000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"5\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"9\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"00005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"11\" fgColor=\"af0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"searchResult\" desc=\"Search result\" ext=\"\">\r\n            <WordsStyle name=\"Default\" styleID=\"0\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Search Header\" styleID=\"1\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"File Header\" styleID=\"2\" fgColor=\"af0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Line Number\" styleID=\"3\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Hit Word\" styleID=\"4\" fgColor=\"000087\" bgColor=\"870000\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Selected Line\" styleID=\"5\" fgColor=\"5f5f00\" bgColor=\"EEE8D5\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Current line background colour\" styleID=\"6\" bgColor=\"073642\" />\r\n        </LexerType>\r\n        <LexerType name=\"smalltalk\" desc=\"Smalltalk\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"1\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"3\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"4\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BINARY\" styleID=\"5\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BOOL\" styleID=\"6\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SELF\" styleID=\"7\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SUPER\" styleID=\"8\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NIL\" styleID=\"9\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"10\" fgColor=\"af0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"RETURN\" styleID=\"11\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"12\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KWS END\" styleID=\"13\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASSIGN\" styleID=\"14\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"15\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SPECIAL SELECTOR\" styleID=\"16\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"sql\" desc=\"SQL\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"5\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"af5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"7\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"00005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n\t\t</LexerType>\r\n        <LexerType name=\"tcl\" desc=\"TCL\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MODIFIER\" styleID=\"10\" fgColor=\"af0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"EXPAND\" styleID=\"11\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"12\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"13\" fgColor=\"5f005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SUB BRACE\" styleID=\"9\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SUBSTITUTION\" styleID=\"8\" fgColor=\"870000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"00005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD IN QUOTE\" styleID=\"4\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IN QUOTE\" styleID=\"5\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT BOX\" styleID=\"17\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"BLOCK COMMENT\" styleID=\"18\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"tex\" desc=\"TeX\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"1\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"GROUP\" styleID=\"2\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"3\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"4\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"5\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"vb\" desc=\"VB / VBS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"7\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"3\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"af5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"00005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATE\" styleID=\"8\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"verilog\" desc=\"Verilog\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGNAME\" styleID=\"2\" fgColor=\"af0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"7\" fgColor=\"870000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"00005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"5f0000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE BANG\" styleID=\"3\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"12\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"USER\" styleID=\"19\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"vhdl\" desc=\"VHDL\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LIne\" styleID=\"2\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"5\" fgColor=\"00005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"6\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"7\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"8\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STD OPERATOR\" styleID=\"9\" fgColor=\"00005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"10\" fgColor=\"870000\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"9\" fgColor=\"af5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DIRECTIVE OPERAND\" styleID=\"10\" fgColor=\"af5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STD FUNCTION\" styleID=\"11\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"STD PACKAGE\" styleID=\"12\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"STD TYPE\" styleID=\"13\" fgColor=\"5f005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"USER DEFINE\" styleID=\"14\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type5\" />\r\n        </LexerType>\r\n        <LexerType name=\"xml\" desc=\"XML\" ext=\"\">\r\n            <WordsStyle name=\"XMLSTART\" styleID=\"12\" fgColor=\"af5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"XMLEND\" styleID=\"13\" fgColor=\"af5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"ff005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"6\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"7\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGEND\" styleID=\"11\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGUNKNOWN\" styleID=\"2\" fgColor=\"ff005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"3\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTEUNKNOWN\" styleID=\"4\" fgColor=\"ff005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SGMLDEFAULT\" styleID=\"21\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CDATA\" styleID=\"17\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"yaml\" desc=\"YAML\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"2\" fgColor=\"000087\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"87875f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"3\" fgColor=\"87005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"005f00\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REFERENCE\" styleID=\"5\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOCUMENT\" styleID=\"6\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"7\" fgColor=\"005f5f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"8\" fgColor=\"d700d7\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n    </LexerStyles>\r\n    <GlobalStyles>\r\n        <!-- Attention : Don't modify the name of styleID=\"0\" -->\r\n        <WidgetStyle name=\"Global override\" styleID=\"0\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"Consolas\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Default Style\" styleID=\"32\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" fontName=\"Consolas\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Indent guideline style\" styleID=\"37\" fgColor=\"afaf87\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Brace highlight style\" styleID=\"34\" fgColor=\"d7d7af\" bgColor=\"005f00\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Bad brace colour\" styleID=\"35\" fgColor=\"ff005f\" bgColor=\"d7d7af\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Current line background colour\" styleID=\"0\" bgColor=\"afaf87\" />\r\n        <WidgetStyle name=\"Selected text colour\" styleID=\"0\" bgColor=\"d7ff87\" />\r\n        <WidgetStyle name=\"Caret colour\" styleID=\"2069\" fgColor=\"5f5f00\" />\r\n        <WidgetStyle name=\"Edge colour\" styleID=\"0\" fgColor=\"afaf87\" />\r\n        <WidgetStyle name=\"Line number margin\" styleID=\"33\" fgColor=\"5f5f00\" bgColor=\"afaf87\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Fold\" styleID=\"0\" fgColor=\"5f5f00\" bgColor=\"afaf87\" />\r\n        <WidgetStyle name=\"Fold active\" styleID=\"0\" fgColor=\"af0000\" />\r\n        <WidgetStyle name=\"Fold margin\" styleID=\"0\" fgColor=\"afaf87\" bgColor=\"afaf87\" />\r\n        <WidgetStyle name=\"White space symbol\" styleID=\"0\" fgColor=\"005f00\" />\r\n        <WidgetStyle name=\"Smart HighLighting\" styleID=\"29\" bgColor=\"d7ff87\" />\r\n        <WidgetStyle name=\"Find Mark Style\" styleID=\"31\" bgColor=\"d7ff87\" />\r\n        <WidgetStyle name=\"Mark Style 1\" styleID=\"25\" bgColor=\"af5f00\" />\r\n        <WidgetStyle name=\"Mark Style 2\" styleID=\"24\" bgColor=\"005f5f\" />\r\n        <WidgetStyle name=\"Mark Style 3\" styleID=\"23\" bgColor=\"afaf87\" />\r\n        <WidgetStyle name=\"Mark Style 4\" styleID=\"22\" bgColor=\"87005f\" />\r\n        <WidgetStyle name=\"Mark Style 5\" styleID=\"21\" bgColor=\"d7ff87\" />\r\n        <WidgetStyle name=\"Incremental highlight all\" styleID=\"28\" bgColor=\"d7ff87\" />\r\n        <WidgetStyle name=\"Tags match highlighting\" styleID=\"27\" bgColor=\"afff87\" />\r\n        <WidgetStyle name=\"Tags attribute\" styleID=\"26\" bgColor=\"5faf5f\" />\r\n        <WidgetStyle name=\"Active tab focused indicator\" styleID=\"0\" fgColor=\"5f0000\" />\r\n        <WidgetStyle name=\"Active tab unfocused indicator\" styleID=\"0\" fgColor=\"d7d7af\" />\r\n        <WidgetStyle name=\"Active tab text\" styleID=\"0\" fgColor=\"000000\" />\r\n        <WidgetStyle name=\"Inactive tabs\" styleID=\"0\" fgColor=\"5f5f00\" bgColor=\"d7d7af\" />\r\n<!--        <WidgetStyle name=\"Inactive tabs\" styleID=\"0\" fgColor=\"ffffd7\" bgColor=\"5f5f00\" /> -->\r\n    </GlobalStyles>\r\n</NotepadPlus>"
  },
  {
    "path": "gui/themes/parse_themes.pl",
    "content": "#!/usr/bin/perl\n\n# Process theme XML files, to generate C++ code\n#\n# This license applies only to this file:\n#\n# Copyright (c) 2014 ruben2020\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to\n# deal in the Software without restriction, including without limitation the\n# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n# sell copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be included in\n# all copies or substantial portions of the Software.\n#\n# THE SOTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n#\n\nuse strict;\n\nuse XML::LibXML;\n\nmy $debug = 0;\n\nmy $themelist;\nmy $numOfThemes = 0;\nmy $lexstyle;\n\nmy $cppstyle;\nmy $javastyle;\nmy $pythonstyle;\nmy $rubystyle;\nmy $javascriptstyle;\n\nmy $langname;\nmy $langdesc;\nmy $themename;\nmy $themename2;\nmy @themes;\nmy $defaultbgcolor;\nmy $defaultfgcolor;\nmy $defaultfontstyle;\nmy $currentlinebgcolor;\nmy $linenumfgcolor;\nmy $stylename;\nmy $styleid;\nmy $fgcolor;\nmy $bgcolor;\nmy $fontstyle;\n\nmy %acceptedlang =\n(\n\t'C++' => 'cpp',\n\t'Java' => 'java',\n\t'Python' => 'python',\n\t'Ruby' => 'ruby',\n\t'Javascript' => 'javascript'\n);\n\nmy $filename;\nmy $parser;\nmy $xmldoc;\n\n$themelist .= \"static const char* themelist[] = {\\n\";\n\n$cppstyle .= \"static const langstyle cppstyle[] = {\\n\";\n$javastyle .= \"static const langstyle javastyle[] = {\\n\";\n$pythonstyle .= \"static const langstyle pythonstyle[] = {\\n\";\n$rubystyle .= \"static const langstyle rubystyle[] = {\\n\";\n$javascriptstyle .= \"static const langstyle javascriptstyle[] = {\\n\";\n\nopendir(DIR1, '.');\nwhile($filename = readdir(DIR1))\n{\n\t$themename = '';\n\tif ((-f $filename )&&($filename =~ /\\.xml$/i))\n\t{\n\t\t$themename = $filename;\n\t\t$themename =~ s/\\.xml$//i;\n\t\t$themename2 = $themename;\n\t\t$themename2 =~ s/_/ /g;\n\t\tprint \"\\n ==> $themename\\n\" if ($debug);\n\t\tpush @themes, $themename2;\n\t\tprocessfile();\n\t\t$numOfThemes++;\n\t}\n}\nclose(DIR1);\n@themes = sort {lc $a cmp lc $b} @themes;\nforeach my $them(@themes)\n{\n\t$themelist .= \"\\t\\\"$them\\\",\\n\";\n}\n$themelist .= \"};\\n\\n\";\n\n\n$cppstyle          .= \"\\t{ NULL, NULL, NULL, 0 }\\n};\\n\\n\";\n$javastyle         .= \"\\t{ NULL, NULL, NULL, 0 }\\n};\\n\\n\";\n$pythonstyle       .= \"\\t{ NULL, NULL, NULL, 0 }\\n};\\n\\n\";\n$rubystyle         .= \"\\t{ NULL, NULL, NULL, 0 }\\n};\\n\\n\";\n$javascriptstyle   .= \"\\t{ NULL, NULL, NULL, 0 }\\n};\\n\\n\";\nopen(FILO,\">themes_gen.cpp\");\nprint FILO \"\\n /* THIS FILE WAS AUTO_GENERATED USING parse_themes.pl */\";\nprint FILO \"\\n /* DO NOT CHANGE BY HAND                              */\\n\\n\";\nprint FILO \"#define NUM_OF_THEMES   $numOfThemes\\n\\n\";\nprint FILO $themelist;\nprint FILO $lexstyle.\"\\n\";\nprint FILO $cppstyle;\nprint FILO $javastyle;\nprint FILO $pythonstyle;\nprint FILO $rubystyle;\nprint FILO $javascriptstyle;\nclose(FILO);\n\n################################################\nsub processfile\n{\n\n$parser = XML::LibXML->new();\n$xmldoc = $parser->parse_file($filename);\nmy $lstyle;\nmy $numofstyles=0;\nmy $numofglobalstyles=0;\n$currentlinebgcolor = '';\n$linenumfgcolor = '';\n\nforeach my $sample ( $xmldoc->findnodes('/NotepadPlus/GlobalStyles') )\n{\n\t$lexstyle .= \"\\nstatic const lexstyle global_\".$themename.\"[] = {\\n\";\n\t$defaultbgcolor = '';\n\t$defaultfgcolor = '';\n\t$defaultfontstyle = '';\n\t$numofglobalstyles = 0;\n\tforeach my $child ( $sample->getChildnodes )\n\t{\n\t\tif (( $child->nodeType() == XML_ELEMENT_NODE )&&($child->nodeName() eq 'WidgetStyle'))\n\t\t{\n\t\t\t$stylename = '';\n\t\t\t$styleid = '';\n\t\t\t$fgcolor = '';\n\t\t\t$bgcolor = '';\n\t\t\t$fontstyle = '';\n\t\t\t$stylename = $child->getAttribute('name') if ($child->hasAttribute('name'));\n\t\t\t$styleid = $child->getAttribute('styleID') if ($child->hasAttribute('styleID'));\n\t\t\t$fgcolor = $child->getAttribute('fgColor') if ($child->hasAttribute('fgColor'));\n\t\t\t$bgcolor = $child->getAttribute('bgColor') if ($child->hasAttribute('bgColor'));\n\t\t\t$fontstyle = $child->getAttribute('fontStyle') if ($child->hasAttribute('fontStyle'));\n\t\t\tif ($stylename eq 'Current line background colour') {$currentlinebgcolor = $bgcolor;}\n\t\t\tif ($styleid eq '33') {$linenumfgcolor = $fgcolor;}\n\t\t\tif ($styleid eq '0') {next;}\n\t\t\t$defaultbgcolor = $bgcolor if ($stylename eq 'Default Style');\n\t\t\t$defaultfgcolor = $fgcolor if ($stylename eq 'Default Style');\n\t\t\t$defaultfontstyle = $fontstyle if ($stylename eq 'Default Style');\n\t\t\t$defaultfontstyle = \"0\" if (length($defaultfontstyle) == 0);\n\t\t\t$bgcolor = $defaultbgcolor if (length($bgcolor) == 0);\n\t\t\t$fgcolor = $defaultfgcolor if (length($fgcolor) == 0);\n\t\t\t$fontstyle = $defaultfontstyle if (length($fontstyle) == 0);\n\t\t\tprint \"$stylename, $styleid, $fgcolor, $bgcolor, $fontstyle\\n\" if ($debug);\n\t\t\t$lexstyle .= \"\\t{ $styleid, \\\"$fgcolor\\\", \\\"$bgcolor\\\", $fontstyle }, // $stylename\\n\";\n\t\t\t$numofglobalstyles++;\n        \t}\n\t}\n\t$lexstyle .= \"};\\n\\n\";\n}\n\nforeach my $sample ( $xmldoc->findnodes('/NotepadPlus/LexerStyles/LexerType') )\n{\n\t$langname = '';\n\t$langdesc = '';\n\t$langname = $sample->getAttribute('name') if ($sample->hasAttribute('name'));\n\t$langdesc = $sample->getAttribute('desc') if ($sample->hasAttribute('desc'));\n\tnext if (!(defined($acceptedlang{$langdesc})));\n\n\tprint \"\\n$langname, $langdesc\\n\" if ($debug);\n\t$lexstyle .= \"\\nstatic const lexstyle \".$langname.\"_\".$themename.\"[] = {\\n\";\n\t$numofstyles = 0;\n\tforeach my $child ( $sample->getChildnodes )\n\t{\n\t\tif (( $child->nodeType() == XML_ELEMENT_NODE )&&($child->nodeName() eq 'WordsStyle'))\n\t\t{\n\t\t\t$stylename = '';\n\t\t\t$styleid = '';\n\t\t\t$fgcolor = '';\n\t\t\t$bgcolor = '';\n\t\t\t$fontstyle = '';\n\t\t\t$stylename = $child->getAttribute('name') if ($child->hasAttribute('name'));\n\t\t\t$styleid = $child->getAttribute('styleID') if ($child->hasAttribute('styleID'));\n\t\t\t$fgcolor = $child->getAttribute('fgColor') if ($child->hasAttribute('fgColor'));\n\t\t\t$bgcolor = $child->getAttribute('bgColor') if ($child->hasAttribute('bgColor'));\n\t\t\t$fontstyle = $child->getAttribute('fontStyle') if ($child->hasAttribute('fontStyle'));\n\t\t\t$defaultbgcolor = $bgcolor if ($stylename eq 'DEFAULT');\n\t\t\t$defaultfgcolor = $fgcolor if ($stylename eq 'DEFAULT');\n\t\t\t$defaultfontstyle = $fontstyle if ($stylename eq 'DEFAULT');\n\t\t\t$defaultfontstyle = \"0\" if (length($defaultfontstyle) == 0);\n\t\t\t$bgcolor = $defaultbgcolor if (length($bgcolor) == 0);\n\t\t\t$fgcolor = $defaultfgcolor if (length($fgcolor) == 0);\n\t\t\t$fontstyle = $defaultfontstyle if (length($fontstyle) == 0);\n\t\t\tprint \"$stylename, $styleid, $fgcolor, $bgcolor, $fontstyle\\n\" if ($debug);\n\t\t\t$lexstyle .= \"\\t{ $styleid, \\\"$fgcolor\\\", \\\"$bgcolor\\\", $fontstyle }, // $stylename\\n\";\n\t\t\t$numofstyles++;\n        \t}\n\t}\n\t$lexstyle .= \"};\\n\";\n\t$lstyle = \"\t{ \\\"$themename2\\\", \\\"$defaultfgcolor\\\", \\\"$defaultbgcolor\\\", \\\"$currentlinebgcolor\\\", \\\"$linenumfgcolor\\\", \".$langname.\"_\".$themename.\", global_\".$themename.\", $numofstyles, $numofglobalstyles },\\n\";\n\t$cppstyle          .= $lstyle if ($langdesc eq 'C++');\n\t$javastyle         .= $lstyle if ($langdesc eq 'Java');\n\t$pythonstyle       .= $lstyle if ($langdesc eq 'Python');\n\t$rubystyle         .= $lstyle if ($langdesc eq 'Ruby');\n\t$javascriptstyle   .= $lstyle if ($langdesc eq 'Javascript');\n}\n\n}\n\n"
  },
  {
    "path": "gui/themes/vim_Dark_Blue.xml",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\" ?>\r\n<NotepadPlus>\r\n    <LexerStyles>\r\n        <LexerType name=\"actionscript\" desc=\"ActionScript\" ext=\"\">\r\n            <!--\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"19\" fgColor=\"A001D6\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n\t\t\t-->\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"20\" fgColor=\"95004A\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"804000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"8000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"808080\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"ada\" desc=\"ADA\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"1\" fgColor=\"0000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"2\" fgColor=\"C0C0C0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DELIMITER\" styleID=\"4\" fgColor=\"FF8080\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"5\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER EOL\" styleID=\"6\" fgColor=\"808080\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"7\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"8\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"9\" fgColor=\"804000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"10\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ILLEGAL\" styleID=\"11\" fgColor=\"FF0000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"asp\" desc=\"asp\" ext=\"asp\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"81\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"82\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"83\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"84\" fgColor=\"000080\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"85\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"87\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"86\" fgColor=\"C0C0C0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASPSYBOL\" styleID=\"15\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SCRIPTTYPE\" styleID=\"16\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"asm\" desc=\"Assembly\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"5\" fgColor=\"C0C0C0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CPU INSTRUCTION\" styleID=\"6\" fgColor=\"0000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"MATH INSTRUCTION\" styleID=\"7\" fgColor=\"0080C0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"REGISTER\" styleID=\"8\" fgColor=\"8080FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"9\" fgColor=\"0080FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"DIRECTIVE OPERAND\" styleID=\"10\" fgColor=\"000080\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"COMMENT BLOCK\" styleID=\"11\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"12\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"13\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"EXT INSTRUCTION\" styleID=\"14\" fgColor=\"804000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type4\" />\r\n        </LexerType>\r\n        <LexerType name=\"autoit\" desc=\"autoIt\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"1\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"2\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"4\" fgColor=\"8000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"6\" fgColor=\"8000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"7\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"8\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"9\" fgColor=\"FF0080\" bgColor=\"000040\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"SENT\" styleID=\"10\" fgColor=\"8080C0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"11\" fgColor=\"804000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"12\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"EXPAND\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type5\" />\r\n            <WordsStyle name=\"COMOBJ\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"bash\" desc=\"bash\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"FF8000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"4\" fgColor=\"FFFF00\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"5\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"6\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"8\" fgColor=\"C0C0C0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SCALAR\" styleID=\"9\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PARAM\" styleID=\"10\" fgColor=\"80FFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"11\" fgColor=\"00FF40\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE DELIM\" styleID=\"12\" fgColor=\"80FF80\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HERE Q\" styleID=\"13\" fgColor=\"80FF00\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"batch\" desc=\"Batch\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORDS\" styleID=\"2\" fgColor=\"FFFF00\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"3\" fgColor=\"80FFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"4\" fontSize=\"\" />\r\n            <WordsStyle name=\"HIDE SYBOL\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"5\" fgColor=\"FF80FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"c\" desc=\"C\" ext=\"pmc\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FFFF00\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"FFFF00\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cpp\" desc=\"C++\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FFFF00\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"00FF00\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"00FFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"80FFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cs\" desc=\"C#\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FFFF00\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"FFFF00\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"FF80FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"caml\" desc=\"Caml\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"C0C0C0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGNAME\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"3\" fgColor=\"0000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"BUILIN FUNC &amp; TYPE\" styleID=\"4\" fgColor=\"8000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"TYPE\" styleID=\"5\" fgColor=\"8000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"LINENUM\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"8\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"9\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"11\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"13\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"14\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"cmake\" desc=\"CMakeFile\" ext=\"cmake\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING D\" styleID=\"2\" fgColor=\"808080\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING L\" styleID=\"3\" fgColor=\"808080\" bgColor=\"000040\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING R\" styleID=\"4\" fgColor=\"808080\" bgColor=\"000040\" fontName=\"\" fontStyle=\"4\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"PARAMETER\" styleID=\"6\" fgColor=\"8000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"7\" fgColor=\"FF8040\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"USER DEFINED\" styleID=\"8\" fgColor=\"000080\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"WHILEDEF\" styleID=\"9\" fgColor=\"0080FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"FOREACHDEF\" styleID=\"10\" fgColor=\"008080\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IFDEF\" styleID=\"11\" fgColor=\"8000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"MACRODEF\" styleID=\"12\" fgColor=\"FF0000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING VARIABLE\" styleID=\"13\" fgColor=\"808080\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"css\" desc=\"CSS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"0000FF\" bgColor=\"000040\" fontName=\"Batang\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS\" styleID=\"2\" fgColor=\"FF0000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PSEUDOCLASS\" styleID=\"3\" fgColor=\"FF8000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"UNKNOWN_PSEUDOCLASS\" styleID=\"4\" fgColor=\"FF8080\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"6\" fgColor=\"C0C0C0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"UNKNOWN_IDENTIFIER\" styleID=\"7\" fgColor=\"C0C0C0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VALUE\" styleID=\"8\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ID\" styleID=\"10\" fgColor=\"0080FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IMPORTANT\" styleID=\"11\" fgColor=\"FF0000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"12\" fgColor=\"0080FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"diff\" desc=\"DIFF\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"2\" fgColor=\"FFFF00\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"HEADER\" styleID=\"3\" fgColor=\"80FFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"POSITION\" styleID=\"4\" fgColor=\"FF80FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DELETED\" styleID=\"5\" fgColor=\"FF8080\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ADDED\" styleID=\"6\" fgColor=\"0080FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"nfo\" desc=\"Dos Style\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"32\" fgColor=\"FFFFFF\" bgColor=\"000040\" />\r\n        </LexerType>\r\n        <LexerType name=\"fortran\" desc=\"Fortran\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"4\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"5\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"C0C0C0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"8\" fgColor=\"0000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION1\" styleID=\"9\" fgColor=\"8000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"FUNCTION2\" styleID=\"10\" fgColor=\"0080C0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"11\" fgColor=\"800000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR2\" styleID=\"12\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"CONTINUATION\" styleID=\"14\" fgColor=\"008000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"haskell\" desc=\"Haskell\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"1\" fgColor=\"C0C0C0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"2\" fgColor=\"0000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"5\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"MODULE\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CAPITAL\" styleID=\"8\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATA\" styleID=\"9\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IMPORT\" styleID=\"10\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTANCE\" styleID=\"12\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"13\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK\" styleID=\"14\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK2\" styleID=\"15\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK3\" styleID=\"16\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"html\" desc=\"HTML\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"6\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"7\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"0000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGEND\" styleID=\"11\" fgColor=\"0000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGUNKNOWN\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"3\" fgColor=\"FF0000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTEUNKNOWN\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SGMLDEFAULT\" styleID=\"21\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CDATA\" styleID=\"17\" fgColor=\"FF8000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VALUE\" styleID=\"19\" fgColor=\"FF8000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ENTITY\" styleID=\"10\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"ini\" desc=\"ini file\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"2\" fgColor=\"FFFF00\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASSIGNMENT\" styleID=\"3\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFVAL\" styleID=\"4\" fgColor=\"FF8080\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"inno\" desc=\"InnoSetup\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"80FF80\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"2\" fgColor=\"FFFF00\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"PARAMETER\" styleID=\"3\" fgColor=\"FF8000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"4\" fgColor=\"00FFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"80FF00\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR INLINE\" styleID=\"6\" fgColor=\"00FF00\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT PASCAL\" styleID=\"7\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD PASCAL\" styleID=\"8\" fgColor=\"80FFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"KEYWORD USER\" styleID=\"9\" fgColor=\"80FF80\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"STRING DOUBLE\" styleID=\"10\" fgColor=\"FF80C0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING SINGLE\" styleID=\"11\" fgColor=\"FF80C0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"12\" fgColor=\"C0C0C0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"java\" desc=\"Java\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"804000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"8000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"javascript\" desc=\"Javascript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"41\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"45\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"46\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"47\" fgColor=\"000080\" bgColor=\"000040\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"48\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"49\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOLS\" styleID=\"50\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"51\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"52\" fgColor=\"8000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"42\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"43\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTDOC\" styleID=\"44\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"kix\" desc=\"KiXtart\" ext=\"\">\r\n            <!--\r\n            <WordsStyle name=\"\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n\t\t-->\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"31\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"2\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"3\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VAR\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"6\" fgColor=\"8000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"7\" fgColor=\"0000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"8\" fgColor=\"8000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"9\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"lisp\" desc=\"LISP\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION WORD\" styleID=\"3\" fgColor=\"0000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"5\" fgColor=\"000080\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"8\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"9\" fgColor=\"C0C0C0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"11\" fgColor=\"800000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"12\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"lua\" desc=\"Lua\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"LITERALSTRING\" styleID=\"8\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"804000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNC1\" styleID=\"13\" fgColor=\"0080C0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"FUNC2\" styleID=\"14\" fgColor=\"8000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"FUNC3\" styleID=\"15\" fgColor=\"0000A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"3\" fontSize=\"\" keywordClass=\"type2\" />\r\n        </LexerType>\r\n        <LexerType name=\"makefile\" desc=\"Makefile\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"2\" fgColor=\"FFFF00\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"3\" fgColor=\"C0C0C0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"TARGET\" styleID=\"5\" fgColor=\"FF0000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDEOL\" styleID=\"9\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"2\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"matlab\" desc=\"Matlab\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"2\" fgColor=\"FFFF00\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"4\" fgColor=\"FFFF00\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\">endfunction endif</WordsStyle>\r\n            <WordsStyle name=\"STRING\" styleID=\"5\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"7\" fgColor=\"C0C0C0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLE QUOTE STRING\" styleID=\"8\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"nsis\" desc=\"NSIS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING DOUBLE QUOTE\" styleID=\"2\" fgColor=\"808080\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING LEFT QUOTE\" styleID=\"3\" fgColor=\"FFFF80\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING RIGHT QUOTE\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"6\" fgColor=\"FF8000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"LABEL\" styleID=\"7\" fgColor=\"FF0000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"USER DEFINED\" styleID=\"8\" fgColor=\"FDFFEC\" bgColor=\"000040\" fontName=\"\" fontStyle=\"4\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"SECTION\" styleID=\"9\" fgColor=\"0000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SUBSECTION\" styleID=\"10\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IF DEFINE\" styleID=\"11\" fgColor=\"808040\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MACRO\" styleID=\"12\" fgColor=\"800000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING VAR\" styleID=\"13\" fgColor=\"FF8000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SECTION GROUP\" styleID=\"15\" fgColor=\"0000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAGE EX\" styleID=\"16\" fgColor=\"0000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"FUNCTION DEFINITIONS\" styleID=\"17\" fgColor=\"0000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"18\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"objc\" desc=\"Objective-C\" ext=\"\">\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"19\" fgColor=\"A001D6\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"QUALIFIER\" styleID=\"20\" fgColor=\"95004A\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"804000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"8000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"808080\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"pascal\" desc=\"Pascal\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"804000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"C0C0C0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"perl\" desc=\"Perl\" ext=\"cgi\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"804000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"FFFF00\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"17\" fgColor=\"8080FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SCALAR\" styleID=\"12\" fgColor=\"FF8000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ARRAY\" styleID=\"13\" fgColor=\"CF34CF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HASH\" styleID=\"14\" fgColor=\"8080C0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL TABLE\" styleID=\"15\" fgColor=\"FF0000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PUNCTUATION\" styleID=\"8\" fgColor=\"804000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"POD\" styleID=\"3\" fgColor=\"00FF00\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"FF80C0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"LONGQUOTE\" styleID=\"19\" fgColor=\"FF8000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATASECTION\" styleID=\"21\" fgColor=\"808080\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGSUBST\" styleID=\"18\" fgColor=\"8080C0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"20\" fgColor=\"FFFF00\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"php\" desc=\"php\" ext=\"\">\r\n            <WordsStyle name=\"QUESTION MARK\" styleID=\"18\" fgColor=\"FF0000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"118\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"119\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING VARIABLE\" styleID=\"126\" fgColor=\"808080\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SIMPLESTRING\" styleID=\"120\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"121\" fgColor=\"0000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"122\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"VARIABLE\" styleID=\"123\" fgColor=\"000080\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"124\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"125\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"127\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"postscript\" desc=\"Postscript\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DSC COMMENT\" styleID=\"2\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DSC VALUE\" styleID=\"3\" fgColor=\"FF0000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"Name\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"6\" fgColor=\"0000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"LITERAL\" styleID=\"7\" fgColor=\"0080C0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IMMEVAL\" styleID=\"8\" fgColor=\"000080\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAREN ARRAY\" styleID=\"9\" fgColor=\"FF00FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAREN DICT\" styleID=\"10\" fgColor=\"0080FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"PAREN PROC\" styleID=\"11\" fgColor=\"000080\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"12\" fgColor=\"808000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HEX STRING\" styleID=\"13\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BASE85 STRING\" styleID=\"14\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BAD STRING CHAR\" styleID=\"15\" fgColor=\"804000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"props\" desc=\"Properties file\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASSIGNMENT\" styleID=\"3\" fgColor=\"FF0000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFVAL\" styleID=\"4\" fgColor=\"FF0000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"python\" desc=\"Python\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"1\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"3\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"4\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORDS\" styleID=\"5\" fgColor=\"FFFF00\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\">True False</WordsStyle>\r\n            <WordsStyle name=\"TRIPLE\" styleID=\"6\" fgColor=\"FF8000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TRIPLEDOUBLE\" styleID=\"7\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASSNAME\" styleID=\"8\" fgColor=\"40FFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFNAME\" styleID=\"9\" fgColor=\"40FFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"C0C0C0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTBLOCK\" styleID=\"12\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRINGEOL\" styleID=\"12\" fgColor=\"008080\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"rc\" desc=\"RC\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"804000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"8000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"ruby\" desc=\"Ruby\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"1\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENTLINE\" styleID=\"2\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"POD\" styleID=\"3\" fgColor=\"004000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS NAME\" styleID=\"8\" fgColor=\"0080C0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEF NAME\" styleID=\"9\" fgColor=\"8080FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"C0C0C0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"12\" fgColor=\"0080FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"MODULE NAME\" styleID=\"15\" fgColor=\"804000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTANCE VAR\" styleID=\"16\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CLASS VAR\" styleID=\"17\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BACKTICKS\" styleID=\"18\" fgColor=\"FFFF00\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATA SECTION\" styleID=\"19\" fgColor=\"600000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING Q\" styleID=\"24\" fgColor=\"808080\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"smalltalk\" desc=\"Smalltalk\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"1\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"3\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"4\" fgColor=\"408080\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"BINARY\" styleID=\"5\" fgColor=\"000080\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"BOOL\" styleID=\"6\" fgColor=\"8000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SELF\" styleID=\"7\" fgColor=\"8080FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SUPER\" styleID=\"8\" fgColor=\"0080FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"NIL\" styleID=\"9\" fgColor=\"8080C0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"GLOBAL\" styleID=\"10\" fgColor=\"800000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"RETURN\" styleID=\"11\" fgColor=\"0000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"12\" fgColor=\"808000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"KWS END\" styleID=\"13\" fgColor=\"0080FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ASSIGN\" styleID=\"14\" fgColor=\"FF0000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"15\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SPECIAL SELECTOR\" styleID=\"16\" fgColor=\"FF80C0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"sql\" desc=\"SQL\" ext=\"pck\">\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"5\" fgColor=\"FFFF00\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING2\" styleID=\"7\" fgColor=\"FF80FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"tcl\" desc=\"TCL\" ext=\"\">\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"804000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"11\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"TYPE WORD\" styleID=\"16\" fgColor=\"8000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CHARACTER\" styleID=\"7\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"VERBATIM\" styleID=\"13\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REGEX\" styleID=\"14\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC\" styleID=\"3\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE DOC\" styleID=\"15\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD\" styleID=\"17\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT DOC KEYWORD ERROR\" styleID=\"18\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"tex\" desc=\"TeX\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SPECIAL\" styleID=\"1\" fgColor=\"FF8000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"GROUP\" styleID=\"2\" fgColor=\"8000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"SYMBOL\" styleID=\"3\" fgColor=\"800000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMAND\" styleID=\"4\" fgColor=\"0000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"vb\" desc=\"VB / VBS\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"7\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"WORD\" styleID=\"3\" fgColor=\"FFFF00\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"5\" fgColor=\"80FF80\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"6\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"DATE\" styleID=\"8\" fgColor=\"80FF80\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"verilog\" desc=\"Verilog\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"11\" fgColor=\"C0C0C0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGNAME\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"5\" fgColor=\"0000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"KEYWORD\" styleID=\"7\" fgColor=\"8000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"10\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"PREPROCESSOR\" styleID=\"9\" fgColor=\"804000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"6\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE\" styleID=\"2\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LINE BANG\" styleID=\"3\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"12\" fgColor=\"808080\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"USER\" styleID=\"19\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"vhdl\" desc=\"VHDL\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT LIne\" styleID=\"2\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"3\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING\" styleID=\"4\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"OPERATOR\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"6\" fgColor=\"C0C0C0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"STRING EOL\" styleID=\"7\" fgColor=\"808080\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION\" styleID=\"8\" fgColor=\"0000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"STD OPERATOR\" styleID=\"9\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"10\" fgColor=\"8080FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type1\" />\r\n            <WordsStyle name=\"DIRECTIVE\" styleID=\"9\" fgColor=\"808000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DIRECTIVE OPERAND\" styleID=\"10\" fgColor=\"000080\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"STD FUNCTION\" styleID=\"11\" fgColor=\"0080FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"type2\" />\r\n            <WordsStyle name=\"STD PACKAGE\" styleID=\"12\" fgColor=\"800000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type3\" />\r\n            <WordsStyle name=\"STD TYPE\" styleID=\"13\" fgColor=\"8000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type4\" />\r\n            <WordsStyle name=\"USER DEFINE\" styleID=\"14\" fgColor=\"B5E71F\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type5\" />\r\n        </LexerType>\r\n        <LexerType name=\"xml\" desc=\"XML\" ext=\"csproj\">\r\n            <WordsStyle name=\"XMLSTART\" styleID=\"12\" fgColor=\"80FFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"XMLEND\" styleID=\"13\" fgColor=\"80FFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"9\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"5\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOUBLESTRING\" styleID=\"6\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SINGLESTRING\" styleID=\"7\" fgColor=\"FFA0A0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAG\" styleID=\"1\" fgColor=\"00FFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGEND\" styleID=\"11\" fgColor=\"80FFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TAGUNKNOWN\" styleID=\"2\" fgColor=\"C0C0C0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTE\" styleID=\"3\" fgColor=\"00FF40\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"ATTRIBUTEUNKNOWN\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SGMLDEFAULT\" styleID=\"21\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"CDATA\" styleID=\"17\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"yaml\" desc=\"YAML\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"IDENTIFIER\" styleID=\"2\" fgColor=\"C0C0C0\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"COMMENT\" styleID=\"1\" fgColor=\"80A0FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"INSTRUCTION WORD\" styleID=\"3\" fgColor=\"0000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre1\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"4\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"REFERENCE\" styleID=\"5\" fgColor=\"804000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"DOCUMENT\" styleID=\"6\" fgColor=\"0000FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"TEXT\" styleID=\"7\" fgColor=\"808080\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"ERROR\" styleID=\"8\" fgColor=\"FF0000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        </LexerType>\r\n        <LexerType name=\"searchResult\" desc=\"Search result\" ext=\"\">\r\n            <WordsStyle name=\"DEFAULT\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"SELECTED LINE\" styleID=\"6\" fgColor=\"FFFF80\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"HEARDER\" styleID=\"1\" fgColor=\"008000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n            <WordsStyle name=\"NUMBER\" styleID=\"2\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n            <WordsStyle name=\"HIT WORD\" styleID=\"3\" fgColor=\"80FF80\" bgColor=\"000040\" fontName=\"\" fontStyle=\"4\" fontSize=\"\" />\r\n            <WordsStyle name=\"KEYWORD1\" styleID=\"4\" fgColor=\"00FF40\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" keywordClass=\"instre2\">if else for while</WordsStyle>\r\n            <WordsStyle name=\"KEYWORD2\" styleID=\"5\" fgColor=\"0080FF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" keywordClass=\"type1\">bool long int char</WordsStyle>\r\n        </LexerType>\r\n    </LexerStyles>\r\n    <GlobalStyles>\r\n        <!-- Attention : Don't modify the name of styleID=\"0\" -->\r\n        <WidgetStyle name=\"Global override\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Default Style\" styleID=\"32\" fgColor=\"FFFFBF\" bgColor=\"000040\" fontName=\"Consolas\" fontStyle=\"0\" fontSize=\"10\" />\r\n        <WidgetStyle name=\"Indent guideline style\" styleID=\"37\" fgColor=\"808080\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Brace highlight style\" styleID=\"34\" fgColor=\"80FF80\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Bad brace colour\" styleID=\"35\" fgColor=\"FF8000\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Current line background colour\" styleID=\"0\" bgColor=\"000040\" />\r\n        <WidgetStyle name=\"Mark colour\" styleID=\"0\" fgColor=\"C00000\" bgColor=\"000040\" />\r\n        <WidgetStyle name=\"Selected text colour\" styleID=\"0\" bgColor=\"2050D0\" />\r\n        <WidgetStyle name=\"Caret colour\" styleID=\"2069\" fgColor=\"FFFF00\" />\r\n        <WidgetStyle name=\"Find Mark Style\" styleID=\"31\" fgColor=\"FFFF00\" bgColor=\"000040\" fontName=\"\" fontStyle=\"1\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Edge colour\" styleID=\"0\" fgColor=\"80FFFF\" />\r\n        <WidgetStyle name=\"Line number margin\" styleID=\"33\" fgColor=\"FFFFFF\" bgColor=\"000040\" fontName=\"\" fontStyle=\"0\" fontSize=\"\" />\r\n        <WidgetStyle name=\"Fold\" styleID=\"0\" fgColor=\"FFFFFF\" bgColor=\"000040\" />\r\n        <WidgetStyle name=\"Fold margin\" styleID=\"0\" fgColor=\"000040\" bgColor=\"000040\" />\r\n        <WidgetStyle name=\"White space symbol\" styleID=\"0\" fgColor=\"004040\" />\r\n        <WidgetStyle name=\"Smart HighLighting\" styleID=\"29\" bgColor=\"2050D0\" />\r\n        <WidgetStyle name=\"Incremental highlight all\" styleID=\"28\" bgColor=\"008000\" />\r\n        <WidgetStyle name=\"Tags match highlighting\" styleID=\"27\" bgColor=\"000040\" />\r\n        <WidgetStyle name=\"Tags attribute\" styleID=\"26\" bgColor=\"000040\" />\r\n        <WidgetStyle name=\"Active tab focused indicator\" styleID=\"0\" fgColor=\"FAAA3C\" />\r\n        <WidgetStyle name=\"Active tab unfocused indicator\" styleID=\"0\" fgColor=\"FFCAB0\" />\r\n        <WidgetStyle name=\"Active tab text\" styleID=\"0\" fgColor=\"000000\" />\r\n        <WidgetStyle name=\"Inactive tabs\" styleID=\"0\" fgColor=\"8080C0\" bgColor=\"CECECE\" />\r\n        <WidgetStyle name=\"Unsaved change marker\" styleID=\"0\" bgColor=\"FF0000\" />\r\n        <WidgetStyle name=\"Saved change marker\" styleID=\"0\" bgColor=\"80FF00\" />\r\n    </GlobalStyles>\r\n</NotepadPlus>\r\n\n \t  \t \n"
  },
  {
    "path": "gui/themes.cpp",
    "content": "\n/*\n * CodeQuery\n * Copyright (C) 2013-2017 ruben2020 https://github.com/ruben2020/\n * \n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n */\n\n\n#include <QString>\n#include <QStringList>\n\n#include \"ScintillaEdit.h\"\n\n#include \"small_lib.h\"\n#include \"fileviewer.h\"\n#include \"themes.h\"\n\ntypedef struct\n{\n\tconst char *themename;\n\tconst char *defaultfgcolor;\n\tconst char *defaultbgcolor;\n\tconst char *currentlinebgcolor;\n\tconst char *linenumfgcolor;\n\tconst lexstyle *lexstyletable;\n\tconst lexstyle *globallexstyletable;\n\tint lexstylesize;\n\tint globallexstylesize;\n}langstyle;\n\n\n#include \"themes_gen.cpp\"\n\n// Keywords lists below taken from langs.model.xml of Notepad++\n\nconst char* python_keywords =\n\"and as assert break class continue def \"\n\"del elif else except exec False finally \"\n\"for from global if import in is lambda \"\n\"None not or pass print raise return \"\n\"True try while with yield async await\";\n\nconst char* ruby_keywords =\n\"ARGF ARGV BEGIN END ENV FALSE DATA NIL \"\n\"RUBY_PATCHLEVEL RUBY_PLATFORM RUBY_RELEASE_DATE \"\n\"RUBY_VERSION PLATFORM RELEASE_DATE STDERR STDIN \"\n\"STDOUT TOPLEVEL_BINDING TRUE __ENCODING__ \"\n\"__END__ __FILE__ __LINE__ alias and begin break \"\n\"case class def defined? do else elsif end ensure \"\n\"false for if in module next nil not or redo rescue \"\n\"retry return self super then true undef \"\n\"unless until when while yield\";\n\nconst char* js_keywords =\n\"abstract async await boolean break byte case catch \"\n\"char class const continue debugger default delete do \"\n\"double else enum export extends final finally float \"\n\"for from function goto if implements import in instanceof \"\n\"int interface let long native new null of package private \"\n\"protected public return short static super switch synchronized \"\n\"this throw throws transient try typeof var void \"\n\"volatile while with true false prototype yield\";\n\nconst char* js_types =\n\"Array Date eval hasOwnProperty Infinity isFinite isNaN \"\n\"isPrototypeOf Math NaN Number Object prototype \"\n\"String toString undefined valueOf\";\n\nconst char* java_keywords =\n\"instanceof assert if else switch case default break goto \"\n\"return for while do continue new throw throws try catch \"\n\"finally this super extends implements import true false null\";\n\nconst char* java_types =\n\"package transient strictfp void char short int long double \"\n\"float const static volatile byte boolean class interface \"\n\"native private protected public final abstract synchronized enum\";\n\nconst char* cpp_keywords =\n\"alignof and and_eq bitand bitor break case catch compl const_cast \"\n\"continue default delete do dynamic_cast else false for goto if \"\n\"namespace new not not_eq nullptr operator or or_eq reinterpret_cast \"\n\"return sizeof static_assert static_cast switch this \"\n\"throw true try typedef typeid using while xor xor_eq NULL\";\n\nconst char* cpp_types =\n\"alignas asm auto bool char char16_t char32_t class clock_t \"\n\"const constexpr decltype double enum explicit export extern \"\n\"final float friend inline int int8_t int16_t int32_t int64_t \"\n\"int_fast8_t int_fast16_t int_fast32_t int_fast64_t intmax_t \"\n\"intptr_t long mutable noexcept override private protected \"\n\"ptrdiff_t public register short signed size_t ssize_t static \"\n\"struct template thread_local time_t typename uint8_t uint16_t \"\n\"uint32_t uint64_t uint_fast8_t uint_fast16_t uint_fast32_t \"\n\"uint_fast64_t uintmax_t uintptr_t union \"\n\"unsigned virtual void volatile wchar_t\";\n\nconst char* cpp_docwords =\n\"a addindex addtogroup anchor arg attention author authors b brief \"\n\"bug c callergraph callgraph category cite class code cond \"\n\"copybrief copydetails copydoc copyright date def defgroup deprecated \"\n\"details diafile dir docbookonly dontinclude dot dotfile e else elseif \"\n\"em endcode endcond enddocbookonly enddot endhtmlonly endif endinternal \"\n\"endlatexonly endlink endmanonly endmsc endparblock endrtfonly \"\n\"endsecreflist enduml endverbatim endxmlonly enum example exception \"\n\"extends f$ f[ f] file fn f{ f} headerfile hidecallergraph hidecallgraph \"\n\"hideinitializer htmlinclude htmlonly idlexcept if ifnot image \"\n\"implements include includelineno ingroup interface internal invariant \"\n\"latexinclude latexonly li line link mainpage manonly memberof msc mscfile \"\n\"n name namespace nosubgrouping note overload p package page par paragraph \"\n\"param parblock post pre private privatesection property protected \"\n\"protectedsection protocol public publicsection pure ref refitem related \"\n\"relatedalso relates relatesalso remark remarks result return returns \"\n\"retval rtfonly sa secreflist section see short showinitializer since \"\n\"skip skipline snippet startuml struct subpage subsection subsubsection \"\n\"tableofcontents test throw throws todo tparam typedef union until var \"\n\"verbatim verbinclude version vhdlflow warning weakgroup xmlonly xrefitem\";\n\nconst char* go_keywords = \"break default func interface select \"\n\"case defer go map struct chan else goto package switch \"\n\"const fallthrough if range type continue for import return var \"\n\"append cap close complex copy delete imag len \"\n\"make new panic print println real recover\";\n\nconst char* go_types = \"true false iota nil \"\n\"bool byte complex64 complex128 error float32 float64 \"\n\"int int8 int16 int32 int64 rune string \"\n\"uint uint8 uint16 uint32 uint64 uintptr\";\n\n\nQStringList themes::getThemesList(void)\n{\n\tQStringList lst;\n\tfor(int i=0; i<NUM_OF_THEMES; i++)\n\t{\n\t\tlst << QString::fromLatin1(themelist[i]);\n\t}\n\treturn lst;\n}\n\nvoid themes::setKeywords(int lang, ScintillaEdit* lexer)\n{\n\tint i;\n\tfor (i=1; i <= 2; i++) lexer->setKeyWords(i, \" \");\n\tswitch(lang)\n\t{\n\t\tcase enHighlightPython:\n\t\tlexer->setKeyWords(0, python_keywords);\n\t\tbreak;\n\n\t\tcase enHighlightJava:\n\t\tlexer->setKeyWords(0, java_keywords);\n\t\tlexer->setKeyWords(1, java_types);\n\t\tbreak;\n\n\t\tcase enHighlightRuby:\n\t\tlexer->setKeyWords(0, ruby_keywords);\n\t\tbreak;\n\n\t\tcase enHighlightJavascript:\n\t\tlexer->setKeyWords(0, js_keywords);\n\t\tlexer->setKeyWords(1, js_types);\n\t\tbreak;\n\n\t\tcase enHighlightGo:\n\t\tlexer->setKeyWords(0, go_keywords);\n\t\tlexer->setKeyWords(1, go_types);\n\t\tbreak;\n\n\t\tcase enHighlightCPP:\n\t\t\t// fall through\n\t\tdefault:\n\t\tlexer->setKeyWords(0, cpp_keywords);\n\t\tlexer->setKeyWords(1, cpp_types);\n\t\tlexer->setKeyWords(2, cpp_docwords);\n\t\tbreak;\n\t}\n\n}\n\nlong themes::QC2SC(QColor colour)\n{\n\tlong retval;\n\tretval  =  (long) colour.red();\n\tretval |= ((long) colour.green()) << 8;\n\tretval |= ((long) colour.blue())  << 16;\n\treturn  retval;\n}\n\nvoid themes::setTheme(const QString& theme, int lang, ScintillaEdit* lexer, const QFont& fontt, QColor& curlinebgcolor, QColor& linenumbgcolor)\n{\n\tlangstyle *lngstyle = NULL;\n\tlexstyle *lxstyle = NULL;\n\tlexstyle *globallxstyle = NULL;\n\tint i=0;\n\tint lxstylesize=0;\n\tint globallxstylesize=0;\n\tlong defbgcolor;\n\tlong deffgcolor;\n\tQFont font1 = fontt;\n\t//font1.setFixedPitch(true);\n\tfont1.setBold(false);\n\tfont1.setItalic(false);\n\tfor (i=0; i < 4; i++) lexer->setKeyWords(i, \"\");\n\tswitch(lang)\n\t{\n\t\tcase enHighlightCPP:\n\t\tlngstyle = (langstyle *) cppstyle;\n\t\tbreak;\n\n\t\tcase enHighlightPython:\n\t\tlngstyle = (langstyle *) pythonstyle;\n\t\tbreak;\n\n\t\tcase enHighlightJava:\n\t\tlngstyle = (langstyle *) javastyle;\n\t\tbreak;\n\n\t\tcase enHighlightRuby:\n\t\tlngstyle = (langstyle *) rubystyle;\n\t\tbreak;\n\n\t\tcase enHighlightJavascript:\n\t\tlngstyle = (langstyle *) cppstyle;\n\t\t//lngstyle = (langstyle *) javascriptstyle;\n\t\tbreak;\n\n\t\tdefault:\n\t\tlngstyle = (langstyle *) cppstyle;\n\t\tbreak;\n\t}\n\ti = 0;\n\twhile (lngstyle[i].lexstylesize > 0)\n\t{\n\t\tif (theme.compare(QString(lngstyle[i].themename)) == 0)\n\t\t{\n\t\t\tlxstyle = (lexstyle *) lngstyle[i].lexstyletable;\n\t\t\tgloballxstyle = (lexstyle *) lngstyle[i].globallexstyletable;\n\t\t\tlxstylesize = lngstyle[i].lexstylesize;\n\t\t\tgloballxstylesize = lngstyle[i].globallexstylesize;\n\t\t\tdefbgcolor = QC2SC(QColor(QString(\"#\").append(QString(lngstyle[i].defaultbgcolor))));\n\t\t\tdeffgcolor = QC2SC(QColor(QString(\"#\").append(QString(lngstyle[i].defaultfgcolor))));\n\t\t\tlexer->styleSetBack(  STYLE_DEFAULT, defbgcolor);\n\t\t\tlexer->styleSetFore(  STYLE_DEFAULT, deffgcolor);\n\t\t\tlexer->styleSetFont(  STYLE_DEFAULT, font1.family().toLatin1().data());\n\t\t\tlexer->styleSetBold(  STYLE_DEFAULT, false);\n\t\t\tlexer->styleSetItalic(STYLE_DEFAULT, false);\n\t\t\tlexer->styleClearAll();\n\t\t\tlexer->setCaretFore(deffgcolor);\n\t\t\tbreak;\n\t\t}\n\t\ti++;\n\t}\n\tsetThemeStyle(lexer, globallxstyle, globallxstylesize, font1);\n\tsetThemeStyle(lexer, lxstyle      , lxstylesize      , font1);\n\tcurlinebgcolor = QColor(QString(\"#\").append(QString(lngstyle[i].currentlinebgcolor)));\n\tlinenumbgcolor = QColor(QString(\"#\").append(QString(lngstyle[i].linenumfgcolor)));\n}\n\nvoid themes::setThemeStyle(ScintillaEdit* lexer, lexstyle *lxstyle, int lxstylesize, QFont& font1)\n{\n\tint i;\n\tif (lxstyle != NULL)\n\tfor(i=0; i<lxstylesize; i++)\n\t{\n\t\tif (\n\t\t\t(lxstyle[i].styleid == 0) ||\n\t\t\t(lxstyle[i].styleid == STYLE_DEFAULT))\n\t\t\t\tcontinue;\n\t\tlexer->styleSetBack(lxstyle[i].styleid, QC2SC(QColor(QString(\"#\").append(QString(lxstyle[i].bgcolor)))));\n\t\tlexer->styleSetFore(lxstyle[i].styleid, QC2SC(QColor(QString(\"#\").append(QString(lxstyle[i].fgcolor)))));\n\t\tlexer->styleSetFont(lxstyle[i].styleid, font1.family().toLatin1().data());\n\t\tswitch(lxstyle[i].fontstyle)\n\t\t{\n\t\t\tcase 1:\n\t\t\t\tlexer->styleSetBold(lxstyle[i].styleid, true);\n\t\t\t\tlexer->styleSetItalic(lxstyle[i].styleid, false);\n\t\t\t\tbreak;\n\n\t\t\tcase 2:\n\t\t\t\tlexer->styleSetBold(lxstyle[i].styleid, false);\n\t\t\t\tlexer->styleSetItalic(lxstyle[i].styleid, true);\n\t\t\t\tbreak;\n\n\t\t\tcase 3:\n\t\t\t\tlexer->styleSetBold(lxstyle[i].styleid, true);\n\t\t\t\tlexer->styleSetItalic(lxstyle[i].styleid, true);\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tlexer->styleSetBold(lxstyle[i].styleid, false);\n\t\t\t\tlexer->styleSetItalic(lxstyle[i].styleid, false);\n\t\t\t\tbreak;\n\n\t\t}\n\t}\n}\n\n"
  },
  {
    "path": "gui/themes.h",
    "content": "\n/*\n * CodeQuery\n * Copyright (C) 2013-2017 ruben2020 https://github.com/ruben2020/\n * \n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n */\n\n\n#ifndef THEMES_H_CQ\n#define THEMES_H_CQ\n\n#include <QtGlobal>\n#include <QtWidgets>\n\nclass ScintillaEdit;\n\ntypedef struct\n{\n\tint styleid;\n\tconst char *fgcolor;\n\tconst char *bgcolor;\n\tint fontstyle;\n}lexstyle;\n\nclass themes\n{\npublic:\n\tstatic QStringList getThemesList(void);\n\tstatic void setTheme(const QString& theme, int lang, ScintillaEdit* lexer, const QFont& fontt, QColor& curlinebgcolor, QColor& linenumbgcolor);\n\tstatic void setKeywords(int lang, ScintillaEdit* lexer);\n\tstatic long QC2SC(QColor colour);\n\nprivate:\n\tstatic void setThemeStyle(ScintillaEdit* lexer, lexstyle *lxstyle, int lxstylesize, QFont& font1);\n};\n\n\n#endif // THEMES_H_CQ\n\n"
  },
  {
    "path": "gui/themes_gen.cpp",
    "content": "\n /* THIS FILE WAS AUTO_GENERATED USING parse_themes.pl */\n /* DO NOT CHANGE BY HAND                              */\n\n#define NUM_OF_THEMES   22\n\nstatic const char* themelist[] = {\n\t\"Bespin\",\n\t\"Black board\",\n\t\"Choco\",\n\t\"Deep Black\",\n\t\"Eclipse Default\",\n\t\"Hello Kitty\",\n\t\"HotFudgeSundae\",\n\t\"khaki\",\n\t\"Mono Industrial\",\n\t\"Monokai\",\n\t\"MossyLawn\",\n\t\"Navajo\",\n\t\"NotepadPlusPlus\",\n\t\"Obsidian\",\n\t\"Plastic Code Wrap\",\n\t\"Ruby Blue\",\n\t\"Solarized\",\n\t\"Solarized light\",\n\t\"Twilight\",\n\t\"Vibrant Ink\",\n\t\"vim Dark Blue\",\n\t\"Zenburn\",\n};\n\n\nstatic const lexstyle global_Monokai[] = {\n\t{ 32, \"F8F8F2\", \"272822\", 0 }, // Default Style\n\t{ 37, \"888A85\", \"272822\", 0 }, // Indent guideline style\n\t{ 34, \"FCE94F\", \"272822\", 1 }, // Brace highlight style\n\t{ 35, \"EF2929\", \"272822\", 0 }, // Bad brace colour\n\t{ 2069, \"F8F8F0\", \"272822\", 0 }, // Caret colour\n\t{ 31, \"CC0000\", \"EDD400\", 0 }, // Find Mark Style\n\t{ 33, \"EEEEEC\", \"2E3436\", 0 }, // Line number margin\n\t{ 29, \"555753\", \"00FF00\", 0 }, // Smart HighLighting\n\t{ 31, \"FCAF3E\", \"FF0000\", 0 }, // Find Mark Style\n\t{ 25, \"F8F8F2\", \"00FFFF\", 0 }, // Mark Style 1\n\t{ 24, \"F8F8F2\", \"FF8000\", 0 }, // Mark Style 2\n\t{ 23, \"F8F8F2\", \"FFFF00\", 0 }, // Mark Style 3\n\t{ 22, \"F8F8F2\", \"8000FF\", 0 }, // Mark Style 4\n\t{ 21, \"F8F8F2\", \"008000\", 0 }, // Mark Style 5\n\t{ 28, \"FFCAB0\", \"0080FF\", 0 }, // Incremental highlight all\n\t{ 27, \"000000\", \"8000FF\", 0 }, // Tags match highlighting\n\t{ 26, \"8080C0\", \"FFFF00\", 0 }, // Tags attribute\n};\n\n\nstatic const lexstyle cpp_Monokai[] = {\n\t{ 9, \"F92672\", \"272822\", 0 }, // PREPROCESSOR\n\t{ 11, \"F8F8F2\", \"272822\", 0 }, // DEFAULT\n\t{ 5, \"66D9EF\", \"272822\", 0 }, // INSTRUCTION WORD\n\t{ 16, \"F92672\", \"272822\", 0 }, // TYPE WORD\n\t{ 4, \"AE81FF\", \"272822\", 0 }, // NUMBER\n\t{ 6, \"E6DB74\", \"272822\", 0 }, // STRING\n\t{ 7, \"E6DB74\", \"272822\", 0 }, // CHARACTER\n\t{ 10, \"F92672\", \"272822\", 0 }, // OPERATOR\n\t{ 13, \"AE81FF\", \"272822\", 0 }, // VERBATIM\n\t{ 14, \"E6DB74\", \"272822\", 0 }, // REGEX\n\t{ 1, \"75715E\", \"272822\", 0 }, // COMMENT\n\t{ 2, \"75715E\", \"272822\", 0 }, // COMMENT LINE\n\t{ 3, \"75715E\", \"272822\", 0 }, // COMMENT DOC\n\t{ 15, \"75715E\", \"272822\", 0 }, // COMMENT LINE DOC\n\t{ 17, \"75715E\", \"272822\", 0 }, // COMMENT DOC KEYWORD\n\t{ 18, \"75715E\", \"272822\", 0 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle java_Monokai[] = {\n\t{ 9, \"F92672\", \"272822\", 0 }, // PREPROCESSOR\n\t{ 11, \"F8F8F2\", \"272822\", 0 }, // DEFAULT\n\t{ 5, \"66D9EF\", \"272822\", 0 }, // INSTRUCTION WORD\n\t{ 16, \"F92672\", \"272822\", 0 }, // TYPE WORD\n\t{ 4, \"AE81FF\", \"272822\", 0 }, // NUMBER\n\t{ 6, \"E6DB74\", \"272822\", 0 }, // STRING\n\t{ 7, \"E6DB74\", \"272822\", 0 }, // CHARACTER\n\t{ 10, \"F92672\", \"272822\", 0 }, // OPERATOR\n\t{ 13, \"AE81FF\", \"272822\", 0 }, // VERBATIM\n\t{ 14, \"E6DB74\", \"272822\", 0 }, // REGEX\n\t{ 1, \"75715E\", \"272822\", 0 }, // COMMENT\n\t{ 2, \"75715E\", \"272822\", 0 }, // COMMENT LINE\n\t{ 3, \"75715E\", \"272822\", 0 }, // COMMENT DOC\n\t{ 15, \"75715E\", \"272822\", 0 }, // COMMENT LINE DOC\n\t{ 17, \"75715E\", \"272822\", 0 }, // COMMENT DOC KEYWORD\n\t{ 18, \"75715E\", \"272822\", 0 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle javascript_Monokai[] = {\n\t{ 41, \"F8F8F2\", \"272822\", 0 }, // DEFAULT\n\t{ 45, \"AE81FF\", \"272822\", 0 }, // NUMBER\n\t{ 46, \"F8F8F2\", \"272822\", 0 }, // WORD\n\t{ 47, \"F92672\", \"272822\", 0 }, // KEYWORD\n\t{ 48, \"E6DB74\", \"272822\", 0 }, // DOUBLESTRING\n\t{ 49, \"E6DB74\", \"272822\", 0 }, // SINGLESTRING\n\t{ 50, \"F8F8F2\", \"272822\", 0 }, // SYMBOLS\n\t{ 51, \"E6DB74\", \"272822\", 0 }, // STRINGEOL\n\t{ 52, \"E6DB74\", \"272822\", 0 }, // REGEX\n\t{ 42, \"75715E\", \"272822\", 0 }, // COMMENT\n\t{ 43, \"75715E\", \"272822\", 0 }, // COMMENTLINE\n\t{ 44, \"75715E\", \"272822\", 0 }, // COMMENTDOC\n};\n\nstatic const lexstyle python_Monokai[] = {\n\t{ 0, \"F8F8F2\", \"272822\", 0 }, // DEFAULT\n\t{ 1, \"75715E\", \"272822\", 0 }, // COMMENTLINE\n\t{ 2, \"AE81FF\", \"272822\", 0 }, // NUMBER\n\t{ 3, \"E6DB74\", \"272822\", 0 }, // STRING\n\t{ 4, \"E6DB74\", \"272822\", 0 }, // CHARACTER\n\t{ 5, \"F92672\", \"272822\", 0 }, // KEYWORDS\n\t{ 6, \"F8F8F2\", \"272822\", 0 }, // TRIPLE\n\t{ 7, \"F8F8F2\", \"272822\", 0 }, // TRIPLEDOUBLE\n\t{ 8, \"F8F8F2\", \"272822\", 0 }, // CLASSNAME\n\t{ 9, \"F8F8F2\", \"272822\", 0 }, // DEFNAME\n\t{ 10, \"F92672\", \"272822\", 0 }, // OPERATOR\n\t{ 11, \"66D9EF\", \"272822\", 0 }, // IDENTIFIER\n\t{ 12, \"75715E\", \"272822\", 0 }, // COMMENTBLOCK\n\t{ 12, \"E6DB74\", \"272822\", 0 }, // STRINGEOL\n};\n\nstatic const lexstyle ruby_Monokai[] = {\n\t{ 0, \"F8F8F2\", \"272822\", 0 }, // DEFAULT\n\t{ 1, \"F8F8F2\", \"272822\", 0 }, // ERROR\n\t{ 2, \"75715E\", \"272822\", 0 }, // COMMENTLINE\n\t{ 3, \"F8F8F2\", \"272822\", 0 }, // POD\n\t{ 4, \"AE81FF\", \"272822\", 0 }, // NUMBER\n\t{ 5, \"F92672\", \"272822\", 0 }, // INSTRUCTION\n\t{ 6, \"E6DB74\", \"272822\", 0 }, // STRING\n\t{ 7, \"E6DB74\", \"272822\", 0 }, // CHARACTER\n\t{ 8, \"F8F8F2\", \"272822\", 0 }, // CLASS NAME\n\t{ 9, \"A6E22E\", \"272822\", 0 }, // DEF NAME\n\t{ 10, \"F92672\", \"272822\", 0 }, // OPERATOR\n\t{ 11, \"66D9EF\", \"272822\", 0 }, // IDENTIFIER\n\t{ 12, \"E6DB74\", \"272822\", 0 }, // REGEX\n\t{ 13, \"F8F8F2\", \"272822\", 0 }, // GLOBAL\n\t{ 14, \"F8F8F2\", \"272822\", 0 }, // SYMBOL\n\t{ 15, \"F8F8F2\", \"272822\", 0 }, // MODULE NAME\n\t{ 16, \"F8F8F2\", \"272822\", 0 }, // INSTANCE VAR\n\t{ 17, \"F8F8F2\", \"272822\", 0 }, // CLASS VAR\n\t{ 18, \"F8F8F2\", \"272822\", 0 }, // BACKTICKS\n\t{ 19, \"F8F8F2\", \"272822\", 0 }, // DATA SECTION\n\t{ 24, \"E6DB74\", \"272822\", 0 }, // STRING Q\n};\n\nstatic const lexstyle global_Vibrant_Ink[] = {\n\t{ 32, \"FFFFFF\", \"000000\", 0 }, // Default Style\n\t{ 37, \"C0C0C0\", \"000000\", 0 }, // Indent guideline style\n\t{ 34, \"99CC99\", \"000000\", 1 }, // Brace highlight style\n\t{ 35, \"CCFF33\", \"000000\", 0 }, // Bad brace colour\n\t{ 2069, \"FFFFFF\", \"112435\", 0 }, // Caret colour\n\t{ 31, \"FFFF00\", \"FF0000\", 1 }, // Find Mark Style\n\t{ 33, \"E4E4E4\", \"333333\", 0 }, // Line number margin\n\t{ 29, \"555753\", \"00FF00\", 0 }, // Smart HighLighting\n\t{ 31, \"FCAF3E\", \"FF0000\", 0 }, // Find Mark Style\n\t{ 25, \"FFFFFF\", \"00FFFF\", 0 }, // Mark Style 1\n\t{ 24, \"FFFFFF\", \"FF8000\", 0 }, // Mark Style 2\n\t{ 23, \"FFFFFF\", \"FFFF00\", 0 }, // Mark Style 3\n\t{ 22, \"FFFFFF\", \"8000FF\", 0 }, // Mark Style 4\n\t{ 21, \"FFFFFF\", \"008000\", 0 }, // Mark Style 5\n\t{ 28, \"FFCAB0\", \"0080FF\", 0 }, // Incremental highlight all\n\t{ 27, \"000000\", \"8000FF\", 0 }, // Tags match highlighting\n\t{ 26, \"8080C0\", \"FFFF00\", 0 }, // Tags attribute\n};\n\n\nstatic const lexstyle cpp_Vibrant_Ink[] = {\n\t{ 9, \"EDF8F9\", \"000000\", 0 }, // PREPROCESSOR\n\t{ 11, \"FFFFFF\", \"000000\", 0 }, // DEFAULT\n\t{ 5, \"FF6600\", \"000000\", 1 }, // INSTRUCTION WORD\n\t{ 16, \"66FF00\", \"000000\", 0 }, // TYPE WORD\n\t{ 4, \"FF8000\", \"000000\", 0 }, // NUMBER\n\t{ 6, \"66FF00\", \"000000\", 0 }, // STRING\n\t{ 7, \"66FF00\", \"000000\", 0 }, // CHARACTER\n\t{ 10, \"FFCC00\", \"000000\", 1 }, // OPERATOR\n\t{ 13, \"FFFFFF\", \"000000\", 0 }, // VERBATIM\n\t{ 14, \"FFFFFF\", \"000000\", 1 }, // REGEX\n\t{ 1, \"9933CC\", \"000000\", 0 }, // COMMENT\n\t{ 2, \"9933CC\", \"000000\", 0 }, // COMMENT LINE\n\t{ 3, \"9933CC\", \"000000\", 0 }, // COMMENT DOC\n\t{ 15, \"9933CC\", \"000000\", 0 }, // COMMENT LINE DOC\n\t{ 17, \"9933CC\", \"000000\", 1 }, // COMMENT DOC KEYWORD\n\t{ 18, \"9933CC\", \"000000\", 0 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle java_Vibrant_Ink[] = {\n\t{ 9, \"EDF8F9\", \"000000\", 0 }, // PREPROCESSOR\n\t{ 11, \"FFFFFF\", \"000000\", 0 }, // DEFAULT\n\t{ 5, \"FF6600\", \"000000\", 1 }, // INSTRUCTION WORD\n\t{ 16, \"66FF00\", \"000000\", 0 }, // TYPE WORD\n\t{ 4, \"FF8000\", \"000000\", 0 }, // NUMBER\n\t{ 6, \"66FF00\", \"000000\", 0 }, // STRING\n\t{ 7, \"66FF00\", \"000000\", 0 }, // CHARACTER\n\t{ 10, \"FFCC00\", \"000000\", 1 }, // OPERATOR\n\t{ 13, \"FFFFFF\", \"000000\", 0 }, // VERBATIM\n\t{ 14, \"FFFFFF\", \"000000\", 1 }, // REGEX\n\t{ 1, \"9933CC\", \"000000\", 0 }, // COMMENT\n\t{ 2, \"9933CC\", \"000000\", 0 }, // COMMENT LINE\n\t{ 3, \"9933CC\", \"000000\", 0 }, // COMMENT DOC\n\t{ 15, \"9933CC\", \"000000\", 0 }, // COMMENT LINE DOC\n\t{ 17, \"9933CC\", \"000000\", 1 }, // COMMENT DOC KEYWORD\n\t{ 18, \"9933CC\", \"000000\", 0 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle javascript_Vibrant_Ink[] = {\n\t{ 41, \"FFFFFF\", \"000000\", 0 }, // DEFAULT\n\t{ 45, \"99CC99\", \"000000\", 0 }, // NUMBER\n\t{ 46, \"FF6600\", \"000000\", 0 }, // WORD\n\t{ 47, \"FFCC00\", \"000000\", 3 }, // KEYWORD\n\t{ 48, \"FFFF00\", \"000000\", 0 }, // DOUBLESTRING\n\t{ 49, \"FFFF00\", \"000000\", 0 }, // SINGLESTRING\n\t{ 50, \"999966\", \"000000\", 1 }, // SYMBOLS\n\t{ 51, \"CCCCCC\", \"000000\", 1 }, // STRINGEOL\n\t{ 52, \"339999\", \"000000\", 0 }, // REGEX\n\t{ 42, \"9933CC\", \"000000\", 0 }, // COMMENT\n\t{ 43, \"9933CC\", \"000000\", 0 }, // COMMENTLINE\n\t{ 44, \"772CB7\", \"070707\", 0 }, // COMMENTDOC\n};\n\nstatic const lexstyle python_Vibrant_Ink[] = {\n\t{ 0, \"FFFFFF\", \"000000\", 0 }, // DEFAULT\n\t{ 1, \"9933CC\", \"000000\", 0 }, // COMMENTLINE\n\t{ 2, \"99CC99\", \"000000\", 0 }, // NUMBER\n\t{ 3, \"66FF00\", \"000000\", 0 }, // STRING\n\t{ 4, \"66FF00\", \"000000\", 0 }, // CHARACTER\n\t{ 5, \"FF6600\", \"000000\", 1 }, // KEYWORDS\n\t{ 6, \"FF8000\", \"000000\", 0 }, // TRIPLE\n\t{ 7, \"FFFFFF\", \"000000\", 0 }, // TRIPLEDOUBLE\n\t{ 8, \"FFFFFF\", \"000000\", 1 }, // CLASSNAME\n\t{ 9, \"FF00FF\", \"000000\", 0 }, // DEFNAME\n\t{ 10, \"FFCC00\", \"000000\", 1 }, // OPERATOR\n\t{ 11, \"FFFFFF\", \"000000\", 0 }, // IDENTIFIER\n\t{ 12, \"9933CC\", \"000000\", 0 }, // COMMENTBLOCK\n\t{ 12, \"FFFF00\", \"000000\", 0 }, // STRINGEOL\n};\n\nstatic const lexstyle ruby_Vibrant_Ink[] = {\n\t{ 0, \"FFFFFF\", \"000000\", 0 }, // DEFAULT\n\t{ 1, \"FFFFFF\", \"000000\", 0 }, // ERROR\n\t{ 2, \"9933CC\", \"000000\", 0 }, // COMMENTLINE\n\t{ 3, \"004000\", \"C0FFC0\", 0 }, // POD\n\t{ 4, \"FF8000\", \"000000\", 0 }, // NUMBER\n\t{ 5, \"FF6600\", \"000000\", 1 }, // INSTRUCTION\n\t{ 6, \"66FF00\", \"000000\", 0 }, // STRING\n\t{ 7, \"808000\", \"000000\", 0 }, // CHARACTER\n\t{ 8, \"0080C0\", \"000000\", 1 }, // CLASS NAME\n\t{ 9, \"8080FF\", \"FFFFCC\", 1 }, // DEF NAME\n\t{ 10, \"FFCC00\", \"000000\", 1 }, // OPERATOR\n\t{ 11, \"FFFFFF\", \"000000\", 0 }, // IDENTIFIER\n\t{ 12, \"339999\", \"000000\", 0 }, // REGEX\n\t{ 13, \"FFCC00\", \"000000\", 1 }, // GLOBAL\n\t{ 14, \"FFFFFF\", \"000000\", 0 }, // SYMBOL\n\t{ 15, \"EDF8F9\", \"000000\", 1 }, // MODULE NAME\n\t{ 16, \"FFFFFF\", \"000000\", 0 }, // INSTANCE VAR\n\t{ 17, \"FFFFFF\", \"000000\", 0 }, // CLASS VAR\n\t{ 18, \"FFFF00\", \"A08080\", 0 }, // BACKTICKS\n\t{ 19, \"600000\", \"FFF0D8\", 0 }, // DATA SECTION\n\t{ 24, \"66FF00\", \"000000\", 0 }, // STRING Q\n};\n\nstatic const lexstyle global_Solarized_light[] = {\n\t{ 32, \"657B83\", \"FDF6E3\", 0 }, // Default Style\n\t{ 37, \"93A1A1\", \"FDF6E3\", 0 }, // Indent guideline style\n\t{ 34, \"DC322F\", \"859900\", 1 }, // Brace highlight style\n\t{ 35, \"D33682\", \"FDF6E3\", 0 }, // Bad brace colour\n\t{ 2069, \"073642\", \"FDF6E3\", 0 }, // Caret colour\n\t{ 33, \"93A1A1\", \"EEE8D5\", 0 }, // Line number margin\n\t{ 29, \"657B83\", \"002B36\", 0 }, // Smart HighLighting\n\t{ 31, \"657B83\", \"6C71C4\", 0 }, // Find Mark Style\n\t{ 25, \"657B83\", \"DC322F\", 0 }, // Mark Style 1\n\t{ 24, \"657B83\", \"268BD2\", 0 }, // Mark Style 2\n\t{ 23, \"657B83\", \"2AA198\", 0 }, // Mark Style 3\n\t{ 22, \"657B83\", \"859900\", 0 }, // Mark Style 4\n\t{ 21, \"657B83\", \"B58900\", 0 }, // Mark Style 5\n\t{ 28, \"657B83\", \"FDF6E3\", 0 }, // Incremental highlight all\n\t{ 27, \"657B83\", \"CB4B16\", 0 }, // Tags match highlighting\n\t{ 26, \"657B83\", \"CB4B16\", 0 }, // Tags attribute\n};\n\n\nstatic const lexstyle cpp_Solarized_light[] = {\n\t{ 9, \"DC322F\", \"FDF6E3\", 0 }, // PREPROCESSOR\n\t{ 11, \"657B83\", \"FDF6E3\", 0 }, // DEFAULT\n\t{ 5, \"859900\", \"FDF6E3\", 0 }, // INSTRUCTION WORD\n\t{ 16, \"B58900\", \"FDF6E3\", 0 }, // TYPE WORD\n\t{ 4, \"2AA198\", \"FDF6E3\", 0 }, // NUMBER\n\t{ 6, \"2AA198\", \"FDF6E3\", 0 }, // STRING\n\t{ 7, \"2AA198\", \"FDF6E3\", 0 }, // CHARACTER\n\t{ 10, \"586E75\", \"FDF6E3\", 0 }, // OPERATOR\n\t{ 13, \"2AA198\", \"FDF6E3\", 0 }, // VERBATIM\n\t{ 14, \"268BD2\", \"FDF6E3\", 0 }, // REGEX\n\t{ 1, \"93A1A1\", \"FDF6E3\", 2 }, // COMMENT\n\t{ 2, \"93A1A1\", \"FDF6E3\", 2 }, // COMMENT LINE\n\t{ 3, \"93A1A1\", \"FDF6E3\", 2 }, // COMMENT DOC\n\t{ 15, \"93A1A1\", \"FDF6E3\", 2 }, // COMMENT LINE DOC\n\t{ 17, \"93A1A1\", \"FDF6E3\", 3 }, // COMMENT DOC KEYWORD\n\t{ 18, \"D33682\", \"FDF6E3\", 3 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle java_Solarized_light[] = {\n\t{ 9, \"DC322F\", \"FDF6E3\", 0 }, // PREPROCESSOR\n\t{ 11, \"657B83\", \"FDF6E3\", 0 }, // DEFAULT\n\t{ 5, \"859900\", \"FDF6E3\", 0 }, // INSTRUCTION WORD\n\t{ 16, \"B58900\", \"FDF6E3\", 0 }, // TYPE WORD\n\t{ 4, \"2AA198\", \"FDF6E3\", 0 }, // NUMBER\n\t{ 6, \"2AA198\", \"FDF6E3\", 0 }, // STRING\n\t{ 7, \"2AA198\", \"FDF6E3\", 0 }, // CHARACTER\n\t{ 10, \"586E75\", \"FDF6E3\", 0 }, // OPERATOR\n\t{ 13, \"2AA198\", \"FDF6E3\", 0 }, // VERBATIM\n\t{ 14, \"268BD2\", \"FDF6E3\", 0 }, // REGEX\n\t{ 1, \"93A1A1\", \"FDF6E3\", 2 }, // COMMENT\n\t{ 2, \"93A1A1\", \"FDF6E3\", 2 }, // COMMENT LINE\n\t{ 3, \"93A1A1\", \"FDF6E3\", 2 }, // COMMENT DOC\n\t{ 15, \"93A1A1\", \"FDF6E3\", 2 }, // COMMENT LINE DOC\n\t{ 17, \"268BD2\", \"FDF6E3\", 3 }, // COMMENT DOC KEYWORD\n\t{ 18, \"D33682\", \"FDF6E3\", 3 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle javascript_Solarized_light[] = {\n\t{ 41, \"657B83\", \"FDF6E3\", 0 }, // DEFAULT\n\t{ 45, \"2AA198\", \"FDF6E3\", 0 }, // NUMBER\n\t{ 46, \"B58900\", \"FDF6E3\", 0 }, // WORD\n\t{ 47, \"859900\", \"FDF6E3\", 0 }, // KEYWORD\n\t{ 48, \"2AA198\", \"FDF6E3\", 0 }, // DOUBLESTRING\n\t{ 49, \"2AA198\", \"FDF6E3\", 0 }, // SINGLESTRING\n\t{ 50, \"657B83\", \"FDF6E3\", 0 }, // SYMBOLS\n\t{ 51, \"DC322F\", \"FDF6E3\", 0 }, // STRINGEOL\n\t{ 52, \"268BD2\", \"FDF6E3\", 0 }, // REGEX\n\t{ 42, \"93A1A1\", \"FDF6E3\", 2 }, // COMMENT\n\t{ 43, \"93A1A1\", \"FDF6E3\", 2 }, // COMMENTLINE\n\t{ 44, \"93A1A1\", \"FDF6E3\", 2 }, // COMMENTDOC\n\t{ 17, \"268BD2\", \"FDF6E3\", 3 }, // COMMENT DOC KEYWORD\n\t{ 18, \"D33682\", \"FDF6E3\", 3 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle python_Solarized_light[] = {\n\t{ 0, \"657B83\", \"FDF6E3\", 0 }, // DEFAULT\n\t{ 1, \"93A1A1\", \"FDF6E3\", 2 }, // COMMENTLINE\n\t{ 2, \"2AA198\", \"FDF6E3\", 0 }, // NUMBER\n\t{ 3, \"2AA198\", \"FDF6E3\", 0 }, // STRING\n\t{ 4, \"2AA198\", \"FDF6E3\", 0 }, // CHARACTER\n\t{ 5, \"859900\", \"FDF6E3\", 0 }, // KEYWORDS\n\t{ 6, \"2AA198\", \"FDF6E3\", 0 }, // TRIPLE\n\t{ 7, \"2AA198\", \"FDF6E3\", 0 }, // TRIPLEDOUBLE\n\t{ 8, \"CB4B16\", \"FDF6E3\", 0 }, // CLASSNAME\n\t{ 9, \"CB4B16\", \"FDF6E3\", 0 }, // DEFNAME\n\t{ 10, \"586E75\", \"FDF6E3\", 0 }, // OPERATOR\n\t{ 11, \"B58900\", \"FDF6E3\", 0 }, // IDENTIFIER\n\t{ 12, \"93A1A1\", \"FDF6E3\", 2 }, // COMMENTBLOCK\n\t{ 12, \"93A1A1\", \"FDF6E3\", 0 }, // STRINGEOL\n};\n\nstatic const lexstyle ruby_Solarized_light[] = {\n\t{ 0, \"657B83\", \"FDF6E3\", 0 }, // DEFAULT\n\t{ 1, \"DC322F\", \"FDF6E3\", 0 }, // ERROR\n\t{ 2, \"93A1A1\", \"FDF6E3\", 2 }, // COMMENTLINE\n\t{ 3, \"657B83\", \"FDF6E3\", 2 }, // POD\n\t{ 4, \"2AA198\", \"FDF6E3\", 0 }, // NUMBER\n\t{ 5, \"859900\", \"FDF6E3\", 0 }, // INSTRUCTION\n\t{ 6, \"2AA198\", \"FDF6E3\", 0 }, // STRING\n\t{ 7, \"2AA198\", \"FDF6E3\", 0 }, // CHARACTER\n\t{ 8, \"B58900\", \"FDF6E3\", 0 }, // CLASS NAME\n\t{ 9, \"268BD2\", \"FDF6E3\", 0 }, // DEF NAME\n\t{ 10, \"586E75\", \"FDF6E3\", 0 }, // OPERATOR\n\t{ 11, \"B58900\", \"FDF6E3\", 0 }, // IDENTIFIER\n\t{ 12, \"268BD2\", \"FDF6E3\", 0 }, // REGEX\n\t{ 13, \"B58900\", \"FDF6E3\", 0 }, // GLOBAL\n\t{ 14, \"657B83\", \"FDF6E3\", 0 }, // SYMBOL\n\t{ 15, \"CB4B16\", \"FDF6E3\", 0 }, // MODULE NAME\n\t{ 16, \"B58900\", \"FDF6E3\", 0 }, // INSTANCE VAR\n\t{ 17, \"657B83\", \"FDF6E3\", 0 }, // CLASS VAR\n\t{ 18, \"073642\", \"6C71C4\", 0 }, // BACKTICKS\n\t{ 19, \"2AA198\", \"FDF6E3\", 0 }, // DATA SECTION\n\t{ 24, \"2AA198\", \"FDF6E3\", 0 }, // STRING Q\n\t{ 25, \"268BD2\", \"FDF6E3\", 0 }, // BOOLEAN\n};\n\nstatic const lexstyle global_Twilight[] = {\n\t{ 32, \"F8F8F8\", \"141414\", 0 }, // Default Style\n\t{ 37, \"888A85\", \"141414\", 0 }, // Indent guideline style\n\t{ 34, \"FCE94F\", \"141414\", 1 }, // Brace highlight style\n\t{ 35, \"EF2929\", \"141414\", 0 }, // Bad brace colour\n\t{ 2069, \"A7A7A7\", \"141414\", 0 }, // Caret colour\n\t{ 31, \"CC0000\", \"EDD400\", 0 }, // Find Mark Style\n\t{ 33, \"EEEEEC\", \"2E3436\", 0 }, // Line number margin\n\t{ 29, \"555753\", \"00FF00\", 0 }, // Smart HighLighting\n\t{ 31, \"FCAF3E\", \"FF0000\", 0 }, // Find Mark Style\n\t{ 25, \"F8F8F8\", \"00FFFF\", 0 }, // Mark Style 1\n\t{ 24, \"F8F8F8\", \"FF8000\", 0 }, // Mark Style 2\n\t{ 23, \"F8F8F8\", \"FFFF00\", 0 }, // Mark Style 3\n\t{ 22, \"F8F8F8\", \"8000FF\", 0 }, // Mark Style 4\n\t{ 21, \"F8F8F8\", \"008000\", 0 }, // Mark Style 5\n\t{ 28, \"FFCAB0\", \"0080FF\", 0 }, // Incremental highlight all\n\t{ 27, \"000000\", \"8000FF\", 0 }, // Tags match highlighting\n\t{ 26, \"8080C0\", \"FFFF00\", 0 }, // Tags attribute\n};\n\n\nstatic const lexstyle cpp_Twilight[] = {\n\t{ 9, \"8996A8\", \"141414\", 0 }, // PREPROCESSOR\n\t{ 11, \"F8F8F8\", \"141414\", 0 }, // DEFAULT\n\t{ 5, \"F9EE98\", \"141414\", 0 }, // INSTRUCTION WORD\n\t{ 16, \"CDA869\", \"141414\", 0 }, // TYPE WORD\n\t{ 4, \"CF6A4C\", \"141414\", 0 }, // NUMBER\n\t{ 6, \"8F9D6A\", \"141414\", 0 }, // STRING\n\t{ 7, \"8F9D6A\", \"141414\", 0 }, // CHARACTER\n\t{ 10, \"CDA869\", \"141414\", 0 }, // OPERATOR\n\t{ 13, \"CF6A4C\", \"141414\", 0 }, // VERBATIM\n\t{ 14, \"E9C062\", \"141414\", 0 }, // REGEX\n\t{ 1, \"5F5A60\", \"141414\", 0 }, // COMMENT\n\t{ 2, \"5F5A60\", \"141414\", 0 }, // COMMENT LINE\n\t{ 3, \"5F5A60\", \"141414\", 0 }, // COMMENT DOC\n\t{ 15, \"5F5A60\", \"141414\", 0 }, // COMMENT LINE DOC\n\t{ 17, \"5F5A60\", \"141414\", 0 }, // COMMENT DOC KEYWORD\n\t{ 18, \"5F5A60\", \"141414\", 0 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle java_Twilight[] = {\n\t{ 9, \"8996A8\", \"141414\", 0 }, // PREPROCESSOR\n\t{ 11, \"F8F8F8\", \"141414\", 0 }, // DEFAULT\n\t{ 5, \"F9EE98\", \"141414\", 0 }, // INSTRUCTION WORD\n\t{ 16, \"CDA869\", \"141414\", 0 }, // TYPE WORD\n\t{ 4, \"CF6A4C\", \"141414\", 0 }, // NUMBER\n\t{ 6, \"8F9D6A\", \"141414\", 0 }, // STRING\n\t{ 7, \"8F9D6A\", \"141414\", 0 }, // CHARACTER\n\t{ 10, \"CDA869\", \"141414\", 0 }, // OPERATOR\n\t{ 13, \"CF6A4C\", \"141414\", 0 }, // VERBATIM\n\t{ 14, \"E9C062\", \"141414\", 0 }, // REGEX\n\t{ 1, \"5F5A60\", \"141414\", 0 }, // COMMENT\n\t{ 2, \"5F5A60\", \"141414\", 0 }, // COMMENT LINE\n\t{ 3, \"5F5A60\", \"141414\", 0 }, // COMMENT DOC\n\t{ 15, \"5F5A60\", \"141414\", 0 }, // COMMENT LINE DOC\n\t{ 17, \"5F5A60\", \"141414\", 0 }, // COMMENT DOC KEYWORD\n\t{ 18, \"5F5A60\", \"141414\", 0 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle javascript_Twilight[] = {\n\t{ 41, \"F8F8F8\", \"141414\", 0 }, // DEFAULT\n\t{ 45, \"CF6A4C\", \"141414\", 0 }, // NUMBER\n\t{ 46, \"F8F8F8\", \"141414\", 0 }, // WORD\n\t{ 47, \"CDA869\", \"141414\", 0 }, // KEYWORD\n\t{ 48, \"8F9D6A\", \"141414\", 0 }, // DOUBLESTRING\n\t{ 49, \"8F9D6A\", \"141414\", 0 }, // SINGLESTRING\n\t{ 50, \"F8F8F8\", \"141414\", 0 }, // SYMBOLS\n\t{ 51, \"8F9D6A\", \"141414\", 0 }, // STRINGEOL\n\t{ 52, \"E9C062\", \"141414\", 0 }, // REGEX\n\t{ 42, \"5F5A60\", \"141414\", 0 }, // COMMENT\n\t{ 43, \"5F5A60\", \"141414\", 0 }, // COMMENTLINE\n\t{ 44, \"5F5A60\", \"141414\", 0 }, // COMMENTDOC\n};\n\nstatic const lexstyle python_Twilight[] = {\n\t{ 0, \"F8F8F8\", \"141414\", 0 }, // DEFAULT\n\t{ 1, \"5F5A60\", \"141414\", 0 }, // COMMENTLINE\n\t{ 2, \"CF6A4C\", \"141414\", 0 }, // NUMBER\n\t{ 3, \"8F9D6A\", \"141414\", 0 }, // STRING\n\t{ 4, \"8F9D6A\", \"141414\", 0 }, // CHARACTER\n\t{ 5, \"CDA869\", \"141414\", 0 }, // KEYWORDS\n\t{ 6, \"8F9D6A\", \"141414\", 0 }, // TRIPLE\n\t{ 7, \"8F9D6A\", \"141414\", 0 }, // TRIPLEDOUBLE\n\t{ 8, \"F8F8F8\", \"141414\", 0 }, // CLASSNAME\n\t{ 9, \"F8F8F8\", \"141414\", 0 }, // DEFNAME\n\t{ 10, \"CDA869\", \"141414\", 0 }, // OPERATOR\n\t{ 11, \"CF6A4C\", \"141414\", 0 }, // IDENTIFIER\n\t{ 12, \"5F5A60\", \"141414\", 0 }, // COMMENTBLOCK\n\t{ 12, \"8F9D6A\", \"141414\", 0 }, // STRINGEOL\n};\n\nstatic const lexstyle ruby_Twilight[] = {\n\t{ 0, \"F8F8F8\", \"141414\", 0 }, // DEFAULT\n\t{ 1, \"000000\", \"141414\", 0 }, // ERROR\n\t{ 2, \"5F5A60\", \"141414\", 0 }, // COMMENTLINE\n\t{ 3, \"000000\", \"141414\", 0 }, // POD\n\t{ 4, \"CF6A4C\", \"141414\", 0 }, // NUMBER\n\t{ 5, \"CDA869\", \"141414\", 0 }, // INSTRUCTION\n\t{ 6, \"8F9D6A\", \"141414\", 0 }, // STRING\n\t{ 7, \"8F9D6A\", \"141414\", 0 }, // CHARACTER\n\t{ 8, \"9B703F\", \"141414\", 0 }, // CLASS NAME\n\t{ 9, \"9B703F\", \"141414\", 0 }, // DEF NAME\n\t{ 10, \"CDA869\", \"141414\", 0 }, // OPERATOR\n\t{ 11, \"CF6A4C\", \"141414\", 0 }, // IDENTIFIER\n\t{ 12, \"E9C062\", \"141414\", 0 }, // REGEX\n\t{ 13, \"7587A6\", \"141414\", 0 }, // GLOBAL\n\t{ 14, \"F8F8F8\", \"141414\", 0 }, // SYMBOL\n\t{ 15, \"9B703F\", \"141414\", 0 }, // MODULE NAME\n\t{ 16, \"7587A6\", \"141414\", 0 }, // INSTANCE VAR\n\t{ 17, \"000000\", \"141414\", 0 }, // CLASS VAR\n\t{ 18, \"000000\", \"141414\", 0 }, // BACKTICKS\n\t{ 19, \"000000\", \"141414\", 0 }, // DATA SECTION\n\t{ 24, \"8F9D6A\", \"141414\", 0 }, // STRING Q\n};\n\nstatic const lexstyle global_vim_Dark_Blue[] = {\n\t{ 32, \"FFFFBF\", \"000040\", 0 }, // Default Style\n\t{ 37, \"808080\", \"000040\", 0 }, // Indent guideline style\n\t{ 34, \"80FF80\", \"000040\", 1 }, // Brace highlight style\n\t{ 35, \"FF8000\", \"000040\", 0 }, // Bad brace colour\n\t{ 2069, \"FFFF00\", \"000040\", 0 }, // Caret colour\n\t{ 31, \"FFFF00\", \"000040\", 1 }, // Find Mark Style\n\t{ 33, \"FFFFFF\", \"000040\", 0 }, // Line number margin\n\t{ 29, \"FFFFBF\", \"2050D0\", 0 }, // Smart HighLighting\n\t{ 28, \"FFFFBF\", \"008000\", 0 }, // Incremental highlight all\n\t{ 27, \"FFFFBF\", \"000040\", 0 }, // Tags match highlighting\n\t{ 26, \"FFFFBF\", \"000040\", 0 }, // Tags attribute\n};\n\n\nstatic const lexstyle cpp_vim_Dark_Blue[] = {\n\t{ 9, \"FFFFFF\", \"000040\", 0 }, // PREPROCESSOR\n\t{ 11, \"FFFFFF\", \"000040\", 0 }, // DEFAULT\n\t{ 5, \"FFFF00\", \"000040\", 1 }, // INSTRUCTION WORD\n\t{ 16, \"00FF00\", \"000040\", 0 }, // TYPE WORD\n\t{ 4, \"FFFFFF\", \"000040\", 0 }, // NUMBER\n\t{ 6, \"FFA0A0\", \"000040\", 0 }, // STRING\n\t{ 7, \"FFA0A0\", \"000040\", 0 }, // CHARACTER\n\t{ 10, \"FFFFFF\", \"000040\", 1 }, // OPERATOR\n\t{ 13, \"00FFFF\", \"000040\", 0 }, // VERBATIM\n\t{ 14, \"80FFFF\", \"000040\", 1 }, // REGEX\n\t{ 1, \"80A0FF\", \"000040\", 0 }, // COMMENT\n\t{ 2, \"80A0FF\", \"000040\", 0 }, // COMMENT LINE\n\t{ 3, \"80A0FF\", \"000040\", 0 }, // COMMENT DOC\n\t{ 15, \"80A0FF\", \"000040\", 0 }, // COMMENT LINE DOC\n\t{ 17, \"80A0FF\", \"000040\", 1 }, // COMMENT DOC KEYWORD\n\t{ 18, \"80A0FF\", \"000040\", 0 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle java_vim_Dark_Blue[] = {\n\t{ 9, \"804000\", \"000040\", 0 }, // PREPROCESSOR\n\t{ 11, \"FFFFFF\", \"000040\", 0 }, // DEFAULT\n\t{ 5, \"0000FF\", \"000040\", 1 }, // INSTRUCTION WORD\n\t{ 16, \"8000FF\", \"000040\", 0 }, // TYPE WORD\n\t{ 4, \"FFFFFF\", \"000040\", 0 }, // NUMBER\n\t{ 6, \"FFA0A0\", \"000040\", 0 }, // STRING\n\t{ 7, \"FFA0A0\", \"000040\", 0 }, // CHARACTER\n\t{ 10, \"FFFFFF\", \"000040\", 1 }, // OPERATOR\n\t{ 13, \"FFFFFF\", \"000040\", 0 }, // VERBATIM\n\t{ 14, \"FFFFFF\", \"000040\", 1 }, // REGEX\n\t{ 1, \"80A0FF\", \"000040\", 0 }, // COMMENT\n\t{ 2, \"80A0FF\", \"000040\", 0 }, // COMMENT LINE\n\t{ 3, \"80A0FF\", \"000040\", 0 }, // COMMENT DOC\n\t{ 15, \"80A0FF\", \"000040\", 0 }, // COMMENT LINE DOC\n\t{ 17, \"80A0FF\", \"000040\", 1 }, // COMMENT DOC KEYWORD\n\t{ 18, \"80A0FF\", \"000040\", 0 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle javascript_vim_Dark_Blue[] = {\n\t{ 41, \"FFFFFF\", \"000040\", 0 }, // DEFAULT\n\t{ 45, \"FFFFFF\", \"000040\", 0 }, // NUMBER\n\t{ 46, \"FFFFFF\", \"000040\", 0 }, // WORD\n\t{ 47, \"000080\", \"000040\", 3 }, // KEYWORD\n\t{ 48, \"FFA0A0\", \"000040\", 0 }, // DOUBLESTRING\n\t{ 49, \"FFA0A0\", \"000040\", 0 }, // SINGLESTRING\n\t{ 50, \"FFFFFF\", \"000040\", 1 }, // SYMBOLS\n\t{ 51, \"FFA0A0\", \"000040\", 1 }, // STRINGEOL\n\t{ 52, \"8000FF\", \"000040\", 0 }, // REGEX\n\t{ 42, \"80A0FF\", \"000040\", 0 }, // COMMENT\n\t{ 43, \"80A0FF\", \"000040\", 0 }, // COMMENTLINE\n\t{ 44, \"80A0FF\", \"000040\", 0 }, // COMMENTDOC\n};\n\nstatic const lexstyle python_vim_Dark_Blue[] = {\n\t{ 0, \"FFFFFF\", \"000040\", 0 }, // DEFAULT\n\t{ 1, \"80A0FF\", \"000040\", 0 }, // COMMENTLINE\n\t{ 2, \"FFFFFF\", \"000040\", 0 }, // NUMBER\n\t{ 3, \"FFA0A0\", \"000040\", 0 }, // STRING\n\t{ 4, \"FFA0A0\", \"000040\", 0 }, // CHARACTER\n\t{ 5, \"FFFF00\", \"000040\", 0 }, // KEYWORDS\n\t{ 6, \"FF8000\", \"000040\", 0 }, // TRIPLE\n\t{ 7, \"FFA0A0\", \"000040\", 0 }, // TRIPLEDOUBLE\n\t{ 8, \"40FFFF\", \"000040\", 0 }, // CLASSNAME\n\t{ 9, \"40FFFF\", \"000040\", 0 }, // DEFNAME\n\t{ 10, \"FFFFFF\", \"000040\", 0 }, // OPERATOR\n\t{ 11, \"C0C0C0\", \"000040\", 0 }, // IDENTIFIER\n\t{ 12, \"80A0FF\", \"000040\", 0 }, // COMMENTBLOCK\n\t{ 12, \"008080\", \"000040\", 0 }, // STRINGEOL\n};\n\nstatic const lexstyle ruby_vim_Dark_Blue[] = {\n\t{ 0, \"FFFFFF\", \"000040\", 0 }, // DEFAULT\n\t{ 1, \"FFFFFF\", \"000040\", 0 }, // ERROR\n\t{ 2, \"80A0FF\", \"000040\", 0 }, // COMMENTLINE\n\t{ 3, \"004000\", \"000040\", 0 }, // POD\n\t{ 4, \"FFFFFF\", \"000040\", 0 }, // NUMBER\n\t{ 5, \"0000FF\", \"000040\", 1 }, // INSTRUCTION\n\t{ 6, \"FFA0A0\", \"000040\", 0 }, // STRING\n\t{ 7, \"FFA0A0\", \"000040\", 0 }, // CHARACTER\n\t{ 8, \"0080C0\", \"000040\", 1 }, // CLASS NAME\n\t{ 9, \"8080FF\", \"000040\", 1 }, // DEF NAME\n\t{ 10, \"FFFFFF\", \"000040\", 1 }, // OPERATOR\n\t{ 11, \"C0C0C0\", \"000040\", 0 }, // IDENTIFIER\n\t{ 12, \"0080FF\", \"000040\", 0 }, // REGEX\n\t{ 13, \"FFFFFF\", \"000040\", 1 }, // GLOBAL\n\t{ 14, \"FFFFFF\", \"000040\", 0 }, // SYMBOL\n\t{ 15, \"804000\", \"000040\", 1 }, // MODULE NAME\n\t{ 16, \"FFFFFF\", \"000040\", 0 }, // INSTANCE VAR\n\t{ 17, \"FFFFFF\", \"000040\", 0 }, // CLASS VAR\n\t{ 18, \"FFFF00\", \"000040\", 0 }, // BACKTICKS\n\t{ 19, \"600000\", \"000040\", 0 }, // DATA SECTION\n\t{ 24, \"808080\", \"000040\", 0 }, // STRING Q\n};\n\nstatic const lexstyle global_Deep_Black[] = {\n\t{ 32, \"FFFFFF\", \"000000\", 0 }, // Default Style\n\t{ 37, \"C0C0C0\", \"000000\", 0 }, // Indent guideline style\n\t{ 34, \"00FF00\", \"000000\", 1 }, // Brace highlight style\n\t{ 35, \"FF0000\", \"000000\", 1 }, // Bad brace colour\n\t{ 2069, \"FFFFFF\", \"253B76\", 0 }, // Caret colour\n\t{ 33, \"C0C0C0\", \"333333\", 0 }, // Line number margin\n\t{ 29, \"555753\", \"80FF00\", 0 }, // Smart HighLighting\n\t{ 31, \"FFFF00\", \"FF0000\", 1 }, // Find Mark Style\n\t{ 28, \"555753\", \"FF8000\", 0 }, // Incremental highlight all\n\t{ 27, \"FCAF3E\", \"0080FF\", 0 }, // Tags match highlighting\n\t{ 26, \"FFFFFF\", \"808080\", 0 }, // Tags attribute\n};\n\n\nstatic const lexstyle cpp_Deep_Black[] = {\n\t{ 9, \"C0C0C0\", \"000000\", 0 }, // PREPROCESSOR\n\t{ 11, \"FFFFFF\", \"000000\", 0 }, // DEFAULT\n\t{ 5, \"FF6600\", \"000000\", 1 }, // INSTRUCTION WORD\n\t{ 16, \"00FFFF\", \"000000\", 1 }, // TYPE WORD\n\t{ 4, \"FF8000\", \"000000\", 0 }, // NUMBER\n\t{ 6, \"FFFF00\", \"000000\", 0 }, // STRING\n\t{ 7, \"FF8080\", \"000000\", 0 }, // CHARACTER\n\t{ 10, \"FFCC00\", \"000000\", 0 }, // OPERATOR\n\t{ 13, \"FFFFFF\", \"000000\", 0 }, // VERBATIM\n\t{ 14, \"FFFFFF\", \"000000\", 1 }, // REGEX\n\t{ 1, \"00FF00\", \"000000\", 2 }, // COMMENT\n\t{ 2, \"00FF00\", \"000000\", 2 }, // COMMENT LINE\n\t{ 3, \"00FF00\", \"000000\", 2 }, // COMMENT DOC\n\t{ 15, \"00FF00\", \"000000\", 2 }, // COMMENT LINE DOC\n\t{ 17, \"00FF00\", \"000000\", 2 }, // COMMENT DOC KEYWORD\n\t{ 18, \"00FF00\", \"000000\", 2 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle java_Deep_Black[] = {\n\t{ 9, \"EDF8F9\", \"000000\", 0 }, // PREPROCESSOR\n\t{ 11, \"FFFFFF\", \"000000\", 0 }, // DEFAULT\n\t{ 5, \"FF6600\", \"000000\", 1 }, // INSTRUCTION WORD\n\t{ 16, \"66FF00\", \"000000\", 0 }, // TYPE WORD\n\t{ 4, \"FF8000\", \"000000\", 0 }, // NUMBER\n\t{ 6, \"66FF00\", \"000000\", 0 }, // STRING\n\t{ 7, \"66FF00\", \"000000\", 0 }, // CHARACTER\n\t{ 10, \"FFCC00\", \"000000\", 1 }, // OPERATOR\n\t{ 13, \"FFFFFF\", \"000000\", 0 }, // VERBATIM\n\t{ 14, \"FFFFFF\", \"000000\", 1 }, // REGEX\n\t{ 1, \"00FF00\", \"000000\", 2 }, // COMMENT\n\t{ 2, \"00FF00\", \"000000\", 2 }, // COMMENT LINE\n\t{ 3, \"00FF00\", \"000000\", 2 }, // COMMENT DOC\n\t{ 15, \"00FF00\", \"000000\", 2 }, // COMMENT LINE DOC\n\t{ 17, \"00FF00\", \"000000\", 2 }, // COMMENT DOC KEYWORD\n\t{ 18, \"00FF00\", \"000000\", 2 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle javascript_Deep_Black[] = {\n\t{ 41, \"FFFFFF\", \"000000\", 0 }, // DEFAULT\n\t{ 45, \"99CC99\", \"000000\", 0 }, // NUMBER\n\t{ 46, \"FF6600\", \"000000\", 0 }, // WORD\n\t{ 47, \"FFCC00\", \"000000\", 3 }, // KEYWORD\n\t{ 48, \"FFFF00\", \"000000\", 0 }, // DOUBLESTRING\n\t{ 49, \"FFFF00\", \"000000\", 0 }, // SINGLESTRING\n\t{ 50, \"999966\", \"000000\", 1 }, // SYMBOLS\n\t{ 51, \"CCCCCC\", \"000000\", 1 }, // STRINGEOL\n\t{ 52, \"339999\", \"000000\", 0 }, // REGEX\n\t{ 42, \"00FF00\", \"000000\", 2 }, // COMMENT\n\t{ 43, \"00FF00\", \"000000\", 2 }, // COMMENTLINE\n\t{ 44, \"772CB7\", \"070707\", 0 }, // COMMENTDOC\n};\n\nstatic const lexstyle python_Deep_Black[] = {\n\t{ 0, \"FFFFFF\", \"000000\", 0 }, // DEFAULT\n\t{ 1, \"00FF00\", \"000000\", 2 }, // COMMENTLINE\n\t{ 2, \"99CC99\", \"000000\", 0 }, // NUMBER\n\t{ 3, \"66FF00\", \"000000\", 0 }, // STRING\n\t{ 4, \"66FF00\", \"000000\", 0 }, // CHARACTER\n\t{ 5, \"FF6600\", \"000000\", 1 }, // KEYWORDS\n\t{ 6, \"FF8000\", \"000000\", 0 }, // TRIPLE\n\t{ 7, \"FFFFFF\", \"000000\", 0 }, // TRIPLEDOUBLE\n\t{ 8, \"FFFFFF\", \"000000\", 1 }, // CLASSNAME\n\t{ 9, \"FF00FF\", \"000000\", 0 }, // DEFNAME\n\t{ 10, \"FFCC00\", \"000000\", 1 }, // OPERATOR\n\t{ 11, \"FFFFFF\", \"000000\", 0 }, // IDENTIFIER\n\t{ 12, \"00FF00\", \"000000\", 2 }, // COMMENTBLOCK\n\t{ 12, \"FFFF00\", \"000000\", 0 }, // STRINGEOL\n};\n\nstatic const lexstyle ruby_Deep_Black[] = {\n\t{ 0, \"FFFFFF\", \"000000\", 0 }, // DEFAULT\n\t{ 1, \"FFFFFF\", \"000000\", 0 }, // ERROR\n\t{ 2, \"00FF00\", \"000000\", 2 }, // COMMENTLINE\n\t{ 3, \"004000\", \"C0FFC0\", 0 }, // POD\n\t{ 4, \"FF8000\", \"000000\", 0 }, // NUMBER\n\t{ 5, \"FF6600\", \"000000\", 1 }, // INSTRUCTION\n\t{ 6, \"66FF00\", \"000000\", 0 }, // STRING\n\t{ 7, \"808000\", \"000000\", 0 }, // CHARACTER\n\t{ 8, \"0080C0\", \"000000\", 1 }, // CLASS NAME\n\t{ 9, \"8080FF\", \"FFFFCC\", 1 }, // DEF NAME\n\t{ 10, \"FFCC00\", \"000000\", 1 }, // OPERATOR\n\t{ 11, \"FFFFFF\", \"000000\", 0 }, // IDENTIFIER\n\t{ 12, \"339999\", \"000000\", 0 }, // REGEX\n\t{ 13, \"FFCC00\", \"000000\", 1 }, // GLOBAL\n\t{ 14, \"FFFFFF\", \"000000\", 0 }, // SYMBOL\n\t{ 15, \"EDF8F9\", \"000000\", 1 }, // MODULE NAME\n\t{ 16, \"FFFFFF\", \"000000\", 0 }, // INSTANCE VAR\n\t{ 17, \"FFFFFF\", \"000000\", 0 }, // CLASS VAR\n\t{ 18, \"FFFF00\", \"A08080\", 0 }, // BACKTICKS\n\t{ 19, \"600000\", \"FFF0D8\", 0 }, // DATA SECTION\n\t{ 24, \"66FF00\", \"000000\", 0 }, // STRING Q\n};\n\nstatic const lexstyle global_Mono_Industrial[] = {\n\t{ 32, \"FFFFFF\", \"222C28\", 0 }, // Default Style\n\t{ 37, \"888A85\", \"222C28\", 0 }, // Indent guideline style\n\t{ 34, \"FCE94F\", \"222C28\", 1 }, // Brace highlight style\n\t{ 35, \"EF2929\", \"222C28\", 0 }, // Bad brace colour\n\t{ 2069, \"FFFFFF\", \"222C28\", 0 }, // Caret colour\n\t{ 31, \"CC0000\", \"EDD400\", 0 }, // Find Mark Style\n\t{ 33, \"EEEEEC\", \"2E3436\", 0 }, // Line number margin\n\t{ 29, \"555753\", \"00FF00\", 0 }, // Smart HighLighting\n\t{ 31, \"FCAF3E\", \"FF0000\", 0 }, // Find Mark Style\n\t{ 25, \"FFFFFF\", \"00FFFF\", 0 }, // Mark Style 1\n\t{ 24, \"FFFFFF\", \"FF8000\", 0 }, // Mark Style 2\n\t{ 23, \"FFFFFF\", \"FFFF00\", 0 }, // Mark Style 3\n\t{ 22, \"FFFFFF\", \"8000FF\", 0 }, // Mark Style 4\n\t{ 21, \"FFFFFF\", \"008000\", 0 }, // Mark Style 5\n\t{ 28, \"FFCAB0\", \"0080FF\", 0 }, // Incremental highlight all\n\t{ 27, \"000000\", \"8000FF\", 0 }, // Tags match highlighting\n\t{ 26, \"8080C0\", \"FFFF00\", 0 }, // Tags attribute\n};\n\n\nstatic const lexstyle cpp_Mono_Industrial[] = {\n\t{ 9, \"A39E64\", \"222C28\", 0 }, // PREPROCESSOR\n\t{ 11, \"FFFFFF\", \"222C28\", 0 }, // DEFAULT\n\t{ 5, \"C23B00\", \"222C28\", 0 }, // INSTRUCTION WORD\n\t{ 16, \"A39E64\", \"222C28\", 0 }, // TYPE WORD\n\t{ 4, \"E98800\", \"222C28\", 0 }, // NUMBER\n\t{ 6, \"FFFFFF\", \"222C28\", 0 }, // STRING\n\t{ 7, \"FFFFFF\", \"222C28\", 0 }, // CHARACTER\n\t{ 10, \"A8B3AB\", \"222C28\", 0 }, // OPERATOR\n\t{ 13, \"E98800\", \"222C28\", 0 }, // VERBATIM\n\t{ 14, \"FFFFFF\", \"222C28\", 0 }, // REGEX\n\t{ 1, \"666C68\", \"222C28\", 0 }, // COMMENT\n\t{ 2, \"666C68\", \"222C28\", 0 }, // COMMENT LINE\n\t{ 3, \"666C68\", \"222C28\", 0 }, // COMMENT DOC\n\t{ 15, \"666C68\", \"222C28\", 0 }, // COMMENT LINE DOC\n\t{ 17, \"666C68\", \"222C28\", 0 }, // COMMENT DOC KEYWORD\n\t{ 18, \"666C68\", \"222C28\", 0 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle java_Mono_Industrial[] = {\n\t{ 9, \"A39E64\", \"222C28\", 0 }, // PREPROCESSOR\n\t{ 11, \"FFFFFF\", \"222C28\", 0 }, // DEFAULT\n\t{ 5, \"C23B00\", \"222C28\", 0 }, // INSTRUCTION WORD\n\t{ 16, \"A39E64\", \"222C28\", 0 }, // TYPE WORD\n\t{ 4, \"E98800\", \"222C28\", 0 }, // NUMBER\n\t{ 6, \"FFFFFF\", \"222C28\", 0 }, // STRING\n\t{ 7, \"FFFFFF\", \"222C28\", 0 }, // CHARACTER\n\t{ 10, \"A8B3AB\", \"222C28\", 0 }, // OPERATOR\n\t{ 13, \"E98800\", \"222C28\", 0 }, // VERBATIM\n\t{ 14, \"FFFFFF\", \"222C28\", 0 }, // REGEX\n\t{ 1, \"666C68\", \"222C28\", 0 }, // COMMENT\n\t{ 2, \"666C68\", \"222C28\", 0 }, // COMMENT LINE\n\t{ 3, \"666C68\", \"222C28\", 0 }, // COMMENT DOC\n\t{ 15, \"666C68\", \"222C28\", 0 }, // COMMENT LINE DOC\n\t{ 17, \"666C68\", \"222C28\", 0 }, // COMMENT DOC KEYWORD\n\t{ 18, \"666C68\", \"222C28\", 0 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle javascript_Mono_Industrial[] = {\n\t{ 41, \"FFFFFF\", \"222C28\", 0 }, // DEFAULT\n\t{ 45, \"E98800\", \"222C28\", 0 }, // NUMBER\n\t{ 46, \"FFFFFF\", \"222C28\", 0 }, // WORD\n\t{ 47, \"A8B3AB\", \"222C28\", 0 }, // KEYWORD\n\t{ 48, \"FFFFFF\", \"222C28\", 0 }, // DOUBLESTRING\n\t{ 49, \"FFFFFF\", \"222C28\", 0 }, // SINGLESTRING\n\t{ 50, \"FFFFFF\", \"222C28\", 0 }, // SYMBOLS\n\t{ 51, \"FFFFFF\", \"222C28\", 0 }, // STRINGEOL\n\t{ 52, \"FFFFFF\", \"222C28\", 0 }, // REGEX\n\t{ 42, \"666C68\", \"222C28\", 0 }, // COMMENT\n\t{ 43, \"666C68\", \"222C28\", 0 }, // COMMENTLINE\n\t{ 44, \"666C68\", \"222C28\", 0 }, // COMMENTDOC\n};\n\nstatic const lexstyle python_Mono_Industrial[] = {\n\t{ 0, \"FFFFFF\", \"222C28\", 0 }, // DEFAULT\n\t{ 1, \"666C68\", \"222C28\", 0 }, // COMMENTLINE\n\t{ 2, \"E98800\", \"222C28\", 0 }, // NUMBER\n\t{ 3, \"FFFFFF\", \"222C28\", 0 }, // STRING\n\t{ 4, \"FFFFFF\", \"222C28\", 0 }, // CHARACTER\n\t{ 5, \"A8B3AB\", \"222C28\", 0 }, // KEYWORDS\n\t{ 6, \"000000\", \"222C28\", 0 }, // TRIPLE\n\t{ 7, \"000000\", \"222C28\", 0 }, // TRIPLEDOUBLE\n\t{ 8, \"000000\", \"222C28\", 0 }, // CLASSNAME\n\t{ 9, \"000000\", \"222C28\", 0 }, // DEFNAME\n\t{ 10, \"A8B3AB\", \"222C28\", 0 }, // OPERATOR\n\t{ 11, \"C87500\", \"222C28\", 0 }, // IDENTIFIER\n\t{ 12, \"666C68\", \"222C28\", 0 }, // COMMENTBLOCK\n\t{ 12, \"FFFFFF\", \"222C28\", 0 }, // STRINGEOL\n};\n\nstatic const lexstyle ruby_Mono_Industrial[] = {\n\t{ 0, \"FFFFFF\", \"222C28\", 0 }, // DEFAULT\n\t{ 1, \"000000\", \"222C28\", 0 }, // ERROR\n\t{ 2, \"666C68\", \"222C28\", 0 }, // COMMENTLINE\n\t{ 3, \"000000\", \"222C28\", 0 }, // POD\n\t{ 4, \"E98800\", \"222C28\", 0 }, // NUMBER\n\t{ 5, \"A39E64\", \"222C28\", 0 }, // INSTRUCTION\n\t{ 6, \"FFFFFF\", \"222C28\", 0 }, // STRING\n\t{ 7, \"FFFFFF\", \"222C28\", 0 }, // CHARACTER\n\t{ 8, \"FFFFFF\", \"222C28\", 0 }, // CLASS NAME\n\t{ 9, \"A8B3AB\", \"222C28\", 0 }, // DEF NAME\n\t{ 10, \"A8B3AB\", \"222C28\", 0 }, // OPERATOR\n\t{ 11, \"C87500\", \"222C28\", 0 }, // IDENTIFIER\n\t{ 12, \"FFFFFF\", \"222C28\", 0 }, // REGEX\n\t{ 13, \"648BD2\", \"222C28\", 0 }, // GLOBAL\n\t{ 14, \"FFFFFF\", \"222C28\", 0 }, // SYMBOL\n\t{ 15, \"000000\", \"222C28\", 0 }, // MODULE NAME\n\t{ 16, \"648BD2\", \"222C28\", 0 }, // INSTANCE VAR\n\t{ 17, \"000000\", \"222C28\", 0 }, // CLASS VAR\n\t{ 18, \"000000\", \"222C28\", 0 }, // BACKTICKS\n\t{ 19, \"000000\", \"222C28\", 0 }, // DATA SECTION\n\t{ 24, \"FFFFFF\", \"222C28\", 0 }, // STRING Q\n};\n\nstatic const lexstyle global_Ruby_Blue[] = {\n\t{ 32, \"FFFFFF\", \"112435\", 0 }, // Default Style\n\t{ 37, \"0080FF\", \"112435\", 1 }, // Indent guideline style\n\t{ 34, \"FFFFFF\", \"112435\", 0 }, // Brace highlight style\n\t{ 35, \"FFFFFF\", \"112435\", 0 }, // Bad brace colour\n\t{ 2069, \"FFFFFF\", \"6699CC\", 0 }, // Caret colour\n\t{ 31, \"FFFFFF\", \"112435\", 0 }, // Find Mark Style\n\t{ 33, \"FFFFFF\", \"1F4661\", 0 }, // Line number margin\n\t{ 29, \"555753\", \"00FF00\", 0 }, // Smart HighLighting\n\t{ 31, \"FCAF3E\", \"FF0000\", 0 }, // Find Mark Style\n\t{ 25, \"FFFFFF\", \"00FFFF\", 0 }, // Mark Style 1\n\t{ 24, \"FFFFFF\", \"FF8000\", 0 }, // Mark Style 2\n\t{ 23, \"FFFFFF\", \"FFFF00\", 0 }, // Mark Style 3\n\t{ 22, \"FFFFFF\", \"8000FF\", 0 }, // Mark Style 4\n\t{ 21, \"FFFFFF\", \"008000\", 0 }, // Mark Style 5\n\t{ 28, \"FFCAB0\", \"0080FF\", 0 }, // Incremental highlight all\n\t{ 27, \"000000\", \"8000FF\", 0 }, // Tags match highlighting\n\t{ 26, \"8080C0\", \"FFFF00\", 0 }, // Tags attribute\n};\n\n\nstatic const lexstyle cpp_Ruby_Blue[] = {\n\t{ 9, \"FFFFFF\", \"112435\", 0 }, // PREPROCESSOR\n\t{ 11, \"FFFFFF\", \"112435\", 0 }, // DEFAULT\n\t{ 5, \"FFFFFF\", \"112435\", 0 }, // INSTRUCTION WORD\n\t{ 16, \"FFFFFF\", \"112435\", 0 }, // TYPE WORD\n\t{ 4, \"FFFFFF\", \"112435\", 0 }, // NUMBER\n\t{ 6, \"FFFFFF\", \"112435\", 0 }, // STRING\n\t{ 7, \"FFFFFF\", \"112435\", 0 }, // CHARACTER\n\t{ 10, \"FFFFFF\", \"112435\", 0 }, // OPERATOR\n\t{ 13, \"FFFFFF\", \"112435\", 0 }, // VERBATIM\n\t{ 14, \"FFFFFF\", \"112435\", 0 }, // REGEX\n\t{ 1, \"FFFFFF\", \"112435\", 0 }, // COMMENT\n\t{ 2, \"FFFFFF\", \"112435\", 0 }, // COMMENT LINE\n\t{ 3, \"FFFFFF\", \"112435\", 0 }, // COMMENT DOC\n\t{ 15, \"FFFFFF\", \"112435\", 0 }, // COMMENT LINE DOC\n\t{ 17, \"FFFFFF\", \"112435\", 0 }, // COMMENT DOC KEYWORD\n\t{ 18, \"FFFFFF\", \"112435\", 0 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle java_Ruby_Blue[] = {\n\t{ 9, \"FFFFFF\", \"112435\", 0 }, // PREPROCESSOR\n\t{ 11, \"FFFFFF\", \"112435\", 0 }, // DEFAULT\n\t{ 5, \"FFFFFF\", \"112435\", 0 }, // INSTRUCTION WORD\n\t{ 16, \"FFFFFF\", \"112435\", 0 }, // TYPE WORD\n\t{ 4, \"FFFFFF\", \"112435\", 0 }, // NUMBER\n\t{ 6, \"FFFFFF\", \"112435\", 0 }, // STRING\n\t{ 7, \"FFFFFF\", \"112435\", 0 }, // CHARACTER\n\t{ 10, \"FFFFFF\", \"112435\", 0 }, // OPERATOR\n\t{ 13, \"FFFFFF\", \"112435\", 0 }, // VERBATIM\n\t{ 14, \"FFFFFF\", \"112435\", 0 }, // REGEX\n\t{ 1, \"FFFFFF\", \"112435\", 0 }, // COMMENT\n\t{ 2, \"FFFFFF\", \"112435\", 0 }, // COMMENT LINE\n\t{ 3, \"FFFFFF\", \"112435\", 0 }, // COMMENT DOC\n\t{ 15, \"FFFFFF\", \"112435\", 0 }, // COMMENT LINE DOC\n\t{ 17, \"FFFFFF\", \"112435\", 0 }, // COMMENT DOC KEYWORD\n\t{ 18, \"FFFFFF\", \"112435\", 0 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle javascript_Ruby_Blue[] = {\n\t{ 41, \"FFFFFF\", \"112435\", 0 }, // DEFAULT\n\t{ 45, \"FF00FF\", \"112435\", 0 }, // NUMBER\n\t{ 46, \"8DB0D3\", \"112435\", 0 }, // WORD\n\t{ 47, \"FFFF80\", \"112435\", 0 }, // KEYWORD\n\t{ 48, \"F08047\", \"112435\", 0 }, // DOUBLESTRING\n\t{ 49, \"F08047\", \"112435\", 0 }, // SINGLESTRING\n\t{ 50, \"7BD827\", \"112435\", 0 }, // SYMBOLS\n\t{ 51, \"730080\", \"112435\", 0 }, // STRINGEOL\n\t{ 52, \"FF00FF\", \"112435\", 0 }, // REGEX\n\t{ 42, \"3A8BDA\", \"112435\", 0 }, // COMMENT\n\t{ 43, \"3A8BDA\", \"112435\", 0 }, // COMMENTLINE\n\t{ 44, \"3A8BDA\", \"112435\", 0 }, // COMMENTDOC\n};\n\nstatic const lexstyle python_Ruby_Blue[] = {\n\t{ 0, \"FFFFFF\", \"112435\", 0 }, // DEFAULT\n\t{ 1, \"FFFFFF\", \"112435\", 0 }, // COMMENTLINE\n\t{ 2, \"FFFFFF\", \"112435\", 0 }, // NUMBER\n\t{ 3, \"FFFFFF\", \"112435\", 0 }, // STRING\n\t{ 4, \"FFFFFF\", \"112435\", 0 }, // CHARACTER\n\t{ 5, \"FFFFFF\", \"112435\", 0 }, // KEYWORDS\n\t{ 6, \"FFFFFF\", \"112435\", 0 }, // TRIPLE\n\t{ 7, \"FFFFFF\", \"112435\", 0 }, // TRIPLEDOUBLE\n\t{ 8, \"FFFFFF\", \"112435\", 0 }, // CLASSNAME\n\t{ 9, \"FFFFFF\", \"112435\", 0 }, // DEFNAME\n\t{ 10, \"FFFFFF\", \"112435\", 0 }, // OPERATOR\n\t{ 11, \"FFFFFF\", \"112435\", 0 }, // IDENTIFIER\n\t{ 12, \"FFFFFF\", \"112435\", 0 }, // COMMENTBLOCK\n\t{ 12, \"FFFFFF\", \"112435\", 0 }, // STRINGEOL\n};\n\nstatic const lexstyle ruby_Ruby_Blue[] = {\n\t{ 0, \"FFFFFF\", \"112435\", 0 }, // DEFAULT\n\t{ 1, \"FFFFFF\", \"112435\", 0 }, // ERROR\n\t{ 2, \"FFFFFF\", \"112435\", 0 }, // COMMENTLINE\n\t{ 3, \"FFFFFF\", \"112435\", 0 }, // POD\n\t{ 4, \"FFFFFF\", \"112435\", 0 }, // NUMBER\n\t{ 5, \"FFFFFF\", \"112435\", 0 }, // INSTRUCTION\n\t{ 6, \"FFFFFF\", \"112435\", 0 }, // STRING\n\t{ 7, \"FFFFFF\", \"112435\", 0 }, // CHARACTER\n\t{ 8, \"FFFFFF\", \"112435\", 0 }, // CLASS NAME\n\t{ 9, \"FFFFFF\", \"112435\", 0 }, // DEF NAME\n\t{ 10, \"FFFFFF\", \"112435\", 0 }, // OPERATOR\n\t{ 11, \"FFFFFF\", \"112435\", 0 }, // IDENTIFIER\n\t{ 12, \"FFFFFF\", \"112435\", 0 }, // REGEX\n\t{ 13, \"FFFFFF\", \"112435\", 0 }, // GLOBAL\n\t{ 14, \"FFFFFF\", \"112435\", 0 }, // SYMBOL\n\t{ 15, \"FFFFFF\", \"112435\", 0 }, // MODULE NAME\n\t{ 16, \"FFFFFF\", \"112435\", 0 }, // INSTANCE VAR\n\t{ 17, \"FFFFFF\", \"112435\", 0 }, // CLASS VAR\n\t{ 18, \"FFFFFF\", \"112435\", 0 }, // BACKTICKS\n\t{ 19, \"FFFFFF\", \"112435\", 0 }, // DATA SECTION\n\t{ 24, \"FFFFFF\", \"112435\", 0 }, // STRING Q\n};\n\nstatic const lexstyle global_Choco[] = {\n\t{ 32, \"C3BE98\", \"1A0F0B\", 0 }, // Default Style\n\t{ 37, \"888A85\", \"1A0F0B\", 0 }, // Indent guideline style\n\t{ 34, \"FCE94F\", \"1A0F0B\", 1 }, // Brace highlight style\n\t{ 35, \"EF2929\", \"1A0F0B\", 0 }, // Bad brace colour\n\t{ 2069, \"A7A7A7\", \"112435\", 0 }, // Caret colour\n\t{ 31, \"CC0000\", \"EDD400\", 0 }, // Find Mark Style\n\t{ 33, \"EEEEEC\", \"2E3436\", 0 }, // Line number margin\n\t{ 29, \"555753\", \"00FF00\", 0 }, // Smart HighLighting\n\t{ 31, \"CC0000\", \"EDD400\", 0 }, // Find Mark Style\n\t{ 25, \"80D4B2\", \"00FFFF\", 0 }, // Mark Style 1\n\t{ 24, \"3FBA89\", \"FF8000\", 0 }, // Mark Style 2\n\t{ 23, \"101010\", \"FFFF00\", 0 }, // Mark Style 3\n\t{ 22, \"808080\", \"8000FF\", 0 }, // Mark Style 4\n\t{ 21, \"FAAA3C\", \"008000\", 0 }, // Mark Style 5\n\t{ 28, \"FFCAB0\", \"0080FF\", 0 }, // Incremental highlight all\n\t{ 27, \"000000\", \"972FFF\", 0 }, // Tags match highlighting\n\t{ 26, \"8080C0\", \"FFFF00\", 0 }, // Tags attribute\n};\n\n\nstatic const lexstyle cpp_Choco[] = {\n\t{ 9, \"8996A8\", \"1A0F0B\", 0 }, // PREPROCESSOR\n\t{ 11, \"C3BE98\", \"1A0F0B\", 0 }, // DEFAULT\n\t{ 5, \"F1E694\", \"1A0F0B\", 0 }, // INSTRUCTION WORD\n\t{ 16, \"B3935C\", \"1A0F0B\", 0 }, // TYPE WORD\n\t{ 4, \"DA5659\", \"1A0F0B\", 0 }, // NUMBER\n\t{ 6, \"7CA563\", \"1A0F0B\", 0 }, // STRING\n\t{ 7, \"7CA563\", \"1A0F0B\", 0 }, // CHARACTER\n\t{ 10, \"B3935C\", \"1A0F0B\", 0 }, // OPERATOR\n\t{ 13, \"DA5659\", \"1A0F0B\", 0 }, // VERBATIM\n\t{ 14, \"E9C062\", \"1A0F0B\", 0 }, // REGEX\n\t{ 1, \"679D47\", \"1A0F0B\", 0 }, // COMMENT\n\t{ 2, \"679D47\", \"1A0F0B\", 0 }, // COMMENT LINE\n\t{ 3, \"679D47\", \"1A0F0B\", 0 }, // COMMENT DOC\n\t{ 15, \"679D47\", \"1A0F0B\", 0 }, // COMMENT LINE DOC\n\t{ 17, \"679D47\", \"1A0F0B\", 0 }, // COMMENT DOC KEYWORD\n\t{ 18, \"679D47\", \"1A0F0B\", 0 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle java_Choco[] = {\n\t{ 9, \"8996A8\", \"1A0F0B\", 0 }, // PREPROCESSOR\n\t{ 11, \"C3BE98\", \"1A0F0B\", 0 }, // DEFAULT\n\t{ 5, \"F1E694\", \"1A0F0B\", 0 }, // INSTRUCTION WORD\n\t{ 16, \"B3935C\", \"1A0F0B\", 0 }, // TYPE WORD\n\t{ 4, \"DA5659\", \"1A0F0B\", 0 }, // NUMBER\n\t{ 6, \"7CA563\", \"1A0F0B\", 0 }, // STRING\n\t{ 7, \"7CA563\", \"1A0F0B\", 0 }, // CHARACTER\n\t{ 10, \"B3935C\", \"1A0F0B\", 0 }, // OPERATOR\n\t{ 13, \"DA5659\", \"1A0F0B\", 0 }, // VERBATIM\n\t{ 14, \"E9C062\", \"1A0F0B\", 0 }, // REGEX\n\t{ 1, \"679D47\", \"1A0F0B\", 0 }, // COMMENT\n\t{ 2, \"679D47\", \"1A0F0B\", 0 }, // COMMENT LINE\n\t{ 3, \"679D47\", \"1A0F0B\", 0 }, // COMMENT DOC\n\t{ 15, \"679D47\", \"1A0F0B\", 0 }, // COMMENT LINE DOC\n\t{ 17, \"679D47\", \"1A0F0B\", 0 }, // COMMENT DOC KEYWORD\n\t{ 18, \"679D47\", \"1A0F0B\", 0 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle javascript_Choco[] = {\n\t{ 41, \"C3BE98\", \"1A0F0B\", 0 }, // DEFAULT\n\t{ 45, \"DA5659\", \"1A0F0B\", 0 }, // NUMBER\n\t{ 46, \"C3BE98\", \"1A0F0B\", 0 }, // WORD\n\t{ 47, \"B3935C\", \"1A0F0B\", 0 }, // KEYWORD\n\t{ 48, \"7CA563\", \"1A0F0B\", 0 }, // DOUBLESTRING\n\t{ 49, \"7CA563\", \"1A0F0B\", 0 }, // SINGLESTRING\n\t{ 50, \"C3BE98\", \"1A0F0B\", 0 }, // SYMBOLS\n\t{ 51, \"7CA563\", \"1A0F0B\", 0 }, // STRINGEOL\n\t{ 52, \"E9C062\", \"1A0F0B\", 0 }, // REGEX\n\t{ 42, \"679D47\", \"1A0F0B\", 0 }, // COMMENT\n\t{ 43, \"679D47\", \"1A0F0B\", 0 }, // COMMENTLINE\n\t{ 44, \"679D47\", \"1A0F0B\", 0 }, // COMMENTDOC\n};\n\nstatic const lexstyle python_Choco[] = {\n\t{ 0, \"C3BE98\", \"1A0F0B\", 0 }, // DEFAULT\n\t{ 1, \"679D47\", \"1A0F0B\", 0 }, // COMMENTLINE\n\t{ 2, \"DA5659\", \"1A0F0B\", 0 }, // NUMBER\n\t{ 3, \"7CA563\", \"1A0F0B\", 0 }, // STRING\n\t{ 4, \"7CA563\", \"1A0F0B\", 0 }, // CHARACTER\n\t{ 5, \"B3935C\", \"1A0F0B\", 0 }, // KEYWORDS\n\t{ 6, \"000000\", \"1A0F0B\", 0 }, // TRIPLE\n\t{ 7, \"000000\", \"1A0F0B\", 0 }, // TRIPLEDOUBLE\n\t{ 8, \"000000\", \"1A0F0B\", 0 }, // CLASSNAME\n\t{ 9, \"000000\", \"1A0F0B\", 0 }, // DEFNAME\n\t{ 10, \"B3935C\", \"1A0F0B\", 0 }, // OPERATOR\n\t{ 11, \"D77261\", \"1A0F0B\", 0 }, // IDENTIFIER\n\t{ 12, \"679D47\", \"1A0F0B\", 0 }, // COMMENTBLOCK\n\t{ 12, \"7CA563\", \"1A0F0B\", 0 }, // STRINGEOL\n};\n\nstatic const lexstyle ruby_Choco[] = {\n\t{ 0, \"C3BE98\", \"1A0F0B\", 0 }, // DEFAULT\n\t{ 1, \"000000\", \"1A0F0B\", 0 }, // ERROR\n\t{ 2, \"679D47\", \"1A0F0B\", 0 }, // COMMENTLINE\n\t{ 3, \"000000\", \"1A0F0B\", 0 }, // POD\n\t{ 4, \"DA5659\", \"1A0F0B\", 0 }, // NUMBER\n\t{ 5, \"B3935C\", \"1A0F0B\", 0 }, // INSTRUCTION\n\t{ 6, \"7CA563\", \"1A0F0B\", 0 }, // STRING\n\t{ 7, \"7CA563\", \"1A0F0B\", 0 }, // CHARACTER\n\t{ 8, \"6D4C2F\", \"1A0F0B\", 0 }, // CLASS NAME\n\t{ 9, \"6D4C2F\", \"1A0F0B\", 0 }, // DEF NAME\n\t{ 10, \"B3935C\", \"1A0F0B\", 0 }, // OPERATOR\n\t{ 11, \"D77261\", \"1A0F0B\", 0 }, // IDENTIFIER\n\t{ 12, \"E9C062\", \"1A0F0B\", 0 }, // REGEX\n\t{ 13, \"7989A6\", \"1A0F0B\", 0 }, // GLOBAL\n\t{ 14, \"C3BE98\", \"1A0F0B\", 0 }, // SYMBOL\n\t{ 15, \"000000\", \"1A0F0B\", 0 }, // MODULE NAME\n\t{ 16, \"7989A6\", \"1A0F0B\", 0 }, // INSTANCE VAR\n\t{ 17, \"000000\", \"1A0F0B\", 0 }, // CLASS VAR\n\t{ 18, \"000000\", \"1A0F0B\", 0 }, // BACKTICKS\n\t{ 19, \"000000\", \"1A0F0B\", 0 }, // DATA SECTION\n\t{ 24, \"7CA563\", \"1A0F0B\", 0 }, // STRING Q\n};\n\nstatic const lexstyle global_khaki[] = {\n\t{ 32, \"5f5f00\", \"d7d7af\", 0 }, // Default Style\n\t{ 37, \"afaf87\", \"d7d7af\", 0 }, // Indent guideline style\n\t{ 34, \"d7d7af\", \"005f00\", 1 }, // Brace highlight style\n\t{ 35, \"ff005f\", \"d7d7af\", 0 }, // Bad brace colour\n\t{ 2069, \"5f5f00\", \"d7d7af\", 0 }, // Caret colour\n\t{ 33, \"5f5f00\", \"afaf87\", 0 }, // Line number margin\n\t{ 29, \"5f5f00\", \"d7ff87\", 0 }, // Smart HighLighting\n\t{ 31, \"5f5f00\", \"d7ff87\", 0 }, // Find Mark Style\n\t{ 25, \"5f5f00\", \"af5f00\", 0 }, // Mark Style 1\n\t{ 24, \"5f5f00\", \"005f5f\", 0 }, // Mark Style 2\n\t{ 23, \"5f5f00\", \"afaf87\", 0 }, // Mark Style 3\n\t{ 22, \"5f5f00\", \"87005f\", 0 }, // Mark Style 4\n\t{ 21, \"5f5f00\", \"d7ff87\", 0 }, // Mark Style 5\n\t{ 28, \"5f5f00\", \"d7ff87\", 0 }, // Incremental highlight all\n\t{ 27, \"5f5f00\", \"afff87\", 0 }, // Tags match highlighting\n\t{ 26, \"5f5f00\", \"5faf5f\", 0 }, // Tags attribute\n};\n\n\nstatic const lexstyle cpp_khaki[] = {\n\t{ 9, \"5f0000\", \"d7d7af\", 0 }, // PREPROCESSOR\n\t{ 11, \"5f5f00\", \"d7d7af\", 0 }, // DEFAULT\n\t{ 5, \"87005f\", \"d7d7af\", 0 }, // INSTRUCTION WORD\n\t{ 16, \"5f005f\", \"d7d7af\", 0 }, // TYPE WORD\n\t{ 4, \"005f00\", \"d7d7af\", 0 }, // NUMBER\n\t{ 6, \"005f5f\", \"d7d7af\", 0 }, // STRING\n\t{ 7, \"005f5f\", \"d7d7af\", 0 }, // CHARACTER\n\t{ 10, \"00005f\", \"d7d7af\", 0 }, // OPERATOR\n\t{ 13, \"005f5f\", \"d7d7af\", 0 }, // VERBATIM\n\t{ 14, \"0087af\", \"d7d7af\", 0 }, // REGEX\n\t{ 1, \"87875f\", \"d7d7af\", 2 }, // COMMENT\n\t{ 2, \"87875f\", \"d7d7af\", 2 }, // COMMENT LINE\n\t{ 3, \"87875f\", \"d7d7af\", 2 }, // COMMENT DOC\n\t{ 15, \"87875f\", \"d7d7af\", 2 }, // COMMENT LINE DOC\n\t{ 17, \"87875f\", \"d7d7af\", 3 }, // COMMENT DOC KEYWORD\n\t{ 18, \"d700d7\", \"d7d7af\", 3 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle java_khaki[] = {\n\t{ 9, \"5f0000\", \"d7d7af\", 0 }, // PREPROCESSOR\n\t{ 11, \"5f5f00\", \"d7d7af\", 0 }, // DEFAULT\n\t{ 5, \"87005f\", \"d7d7af\", 0 }, // INSTRUCTION WORD\n\t{ 16, \"5f005f\", \"d7d7af\", 0 }, // TYPE WORD\n\t{ 4, \"005f00\", \"d7d7af\", 0 }, // NUMBER\n\t{ 6, \"005f5f\", \"d7d7af\", 0 }, // STRING\n\t{ 7, \"005f5f\", \"d7d7af\", 0 }, // CHARACTER\n\t{ 10, \"00005f\", \"d7d7af\", 0 }, // OPERATOR\n\t{ 13, \"005f5f\", \"d7d7af\", 0 }, // VERBATIM\n\t{ 14, \"0087af\", \"d7d7af\", 0 }, // REGEX\n\t{ 1, \"87875f\", \"d7d7af\", 2 }, // COMMENT\n\t{ 2, \"87875f\", \"d7d7af\", 2 }, // COMMENT LINE\n\t{ 3, \"87875f\", \"d7d7af\", 2 }, // COMMENT DOC\n\t{ 15, \"87875f\", \"d7d7af\", 2 }, // COMMENT LINE DOC\n\t{ 17, \"005f5f\", \"d7d7af\", 3 }, // COMMENT DOC KEYWORD\n\t{ 18, \"d700d7\", \"d7d7af\", 3 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle javascript_khaki[] = {\n\t{ 41, \"5f5f00\", \"d7d7af\", 0 }, // DEFAULT\n\t{ 45, \"005f00\", \"d7d7af\", 0 }, // NUMBER\n\t{ 46, \"000087\", \"d7d7af\", 0 }, // WORD\n\t{ 47, \"87005f\", \"d7d7af\", 0 }, // KEYWORD\n\t{ 48, \"005f5f\", \"d7d7af\", 0 }, // DOUBLESTRING\n\t{ 49, \"005f5f\", \"d7d7af\", 0 }, // SINGLESTRING\n\t{ 50, \"5f5f00\", \"d7d7af\", 0 }, // SYMBOLS\n\t{ 51, \"af5f00\", \"d7d7af\", 0 }, // STRINGEOL\n\t{ 52, \"0087af\", \"d7d7af\", 0 }, // REGEX\n\t{ 42, \"87875f\", \"d7d7af\", 2 }, // COMMENT\n\t{ 43, \"87875f\", \"d7d7af\", 2 }, // COMMENTLINE\n\t{ 44, \"87875f\", \"d7d7af\", 2 }, // COMMENTDOC\n\t{ 17, \"005f5f\", \"d7d7af\", 3 }, // COMMENT DOC KEYWORD\n\t{ 18, \"d700d7\", \"d7d7af\", 3 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle python_khaki[] = {\n\t{ 0, \"5f5f00\", \"d7d7af\", 0 }, // DEFAULT\n\t{ 1, \"87875f\", \"d7d7af\", 2 }, // COMMENTLINE\n\t{ 2, \"005f00\", \"d7d7af\", 0 }, // NUMBER\n\t{ 3, \"005f5f\", \"d7d7af\", 0 }, // STRING\n\t{ 4, \"005f5f\", \"d7d7af\", 0 }, // CHARACTER\n\t{ 5, \"87005f\", \"d7d7af\", 0 }, // KEYWORDS\n\t{ 6, \"005f5f\", \"d7d7af\", 0 }, // TRIPLE\n\t{ 7, \"005f5f\", \"d7d7af\", 0 }, // TRIPLEDOUBLE\n\t{ 8, \"5f0000\", \"d7d7af\", 0 }, // CLASSNAME\n\t{ 9, \"af0000\", \"d7d7af\", 0 }, // DEFNAME\n\t{ 10, \"00005f\", \"d7d7af\", 0 }, // OPERATOR\n\t{ 11, \"000087\", \"d7d7af\", 0 }, // IDENTIFIER\n\t{ 12, \"87875f\", \"d7d7af\", 2 }, // COMMENTBLOCK\n\t{ 12, \"87875f\", \"d7d7af\", 0 }, // STRINGEOL\n};\n\nstatic const lexstyle ruby_khaki[] = {\n\t{ 0, \"5f5f00\", \"d7d7af\", 0 }, // DEFAULT\n\t{ 1, \"af5f00\", \"d7d7af\", 0 }, // ERROR\n\t{ 2, \"87875f\", \"d7d7af\", 2 }, // COMMENTLINE\n\t{ 3, \"5f5f00\", \"d7d7af\", 2 }, // POD\n\t{ 4, \"005f00\", \"d7d7af\", 0 }, // NUMBER\n\t{ 5, \"87005f\", \"d7d7af\", 0 }, // INSTRUCTION\n\t{ 6, \"005f5f\", \"d7d7af\", 0 }, // STRING\n\t{ 7, \"005f5f\", \"d7d7af\", 0 }, // CHARACTER\n\t{ 8, \"5f0000\", \"d7d7af\", 0 }, // CLASS NAME\n\t{ 9, \"005f5f\", \"d7d7af\", 0 }, // DEF NAME\n\t{ 10, \"00005f\", \"d7d7af\", 0 }, // OPERATOR\n\t{ 11, \"000087\", \"d7d7af\", 0 }, // IDENTIFIER\n\t{ 12, \"0087af\", \"d7d7af\", 0 }, // REGEX\n\t{ 13, \"000087\", \"d7d7af\", 0 }, // GLOBAL\n\t{ 14, \"5f5f00\", \"d7d7af\", 0 }, // SYMBOL\n\t{ 15, \"af0000\", \"d7d7af\", 0 }, // MODULE NAME\n\t{ 16, \"000087\", \"d7d7af\", 0 }, // INSTANCE VAR\n\t{ 17, \"000087\", \"d7d7af\", 0 }, // CLASS VAR\n\t{ 18, \"af0000\", \"d7d7af\", 0 }, // BACKTICKS\n\t{ 19, \"005f5f\", \"d7d7af\", 0 }, // DATA SECTION\n\t{ 24, \"005f5f\", \"d7d7af\", 0 }, // STRING Q\n\t{ 25, \"005f5f\", \"d7d7af\", 0 }, // BOOLEAN\n};\n\nstatic const lexstyle global_Bespin[] = {\n\t{ 32, \"BDAE9D\", \"2A211C\", 0 }, // Default Style\n\t{ 37, \"888A85\", \"2A211C\", 0 }, // Indent guideline style\n\t{ 34, \"E5C138\", \"2A211C\", 1 }, // Brace highlight style\n\t{ 35, \"EF2929\", \"2A211C\", 0 }, // Bad brace colour\n\t{ 2069, \"37A8ED\", \"80FF00\", 0 }, // Caret colour\n\t{ 31, \"CC0000\", \"EDD400\", 0 }, // Find Mark Style\n\t{ 33, \"E5C138\", \"4C4A41\", 0 }, // Line number margin\n\t{ 29, \"555753\", \"FF0080\", 0 }, // Smart HighLighting\n\t{ 31, \"CC0000\", \"EDD400\", 0 }, // Find Mark Style\n\t{ 25, \"BDAE9D\", \"00FFFF\", 0 }, // Mark Style 1\n\t{ 24, \"FAAA3C\", \"FF8000\", 0 }, // Mark Style 2\n\t{ 23, \"FFFF80\", \"FFFF00\", 0 }, // Mark Style 3\n\t{ 22, \"000000\", \"8000FF\", 0 }, // Mark Style 4\n\t{ 21, \"808080\", \"008000\", 0 }, // Mark Style 5\n\t{ 28, \"FFCAB0\", \"0080FF\", 0 }, // Incremental highlight all\n\t{ 27, \"000000\", \"808000\", 0 }, // Tags match highlighting\n\t{ 26, \"8080C0\", \"808080\", 0 }, // Tags attribute\n};\n\n\nstatic const lexstyle cpp_Bespin[] = {\n\t{ 9, \"FFAA00\", \"2A211C\", 0 }, // PREPROCESSOR\n\t{ 11, \"F8F8F8\", \"2A211C\", 0 }, // DEFAULT\n\t{ 5, \"F6F080\", \"2A211C\", 0 }, // INSTRUCTION WORD\n\t{ 16, \"FFAA00\", \"2A211C\", 0 }, // TYPE WORD\n\t{ 4, \"FF3A83\", \"2A211C\", 0 }, // NUMBER\n\t{ 6, \"55E439\", \"2A211C\", 0 }, // STRING\n\t{ 7, \"55E439\", \"2A211C\", 0 }, // CHARACTER\n\t{ 10, \"FFAA00\", \"2A211C\", 0 }, // OPERATOR\n\t{ 13, \"FF3A83\", \"2A211C\", 0 }, // VERBATIM\n\t{ 14, \"FFB454\", \"2A211C\", 0 }, // REGEX\n\t{ 1, \"1E9AE0\", \"2A211C\", 0 }, // COMMENT\n\t{ 2, \"1E9AE0\", \"2A211C\", 0 }, // COMMENT LINE\n\t{ 3, \"1E9AE0\", \"2A211C\", 0 }, // COMMENT DOC\n\t{ 15, \"1E9AE0\", \"2A211C\", 0 }, // COMMENT LINE DOC\n\t{ 17, \"1E9AE0\", \"2A211C\", 0 }, // COMMENT DOC KEYWORD\n\t{ 18, \"1E9AE0\", \"2A211C\", 0 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle java_Bespin[] = {\n\t{ 9, \"FFAA00\", \"2A211C\", 0 }, // PREPROCESSOR\n\t{ 11, \"F8F8F8\", \"2A211C\", 0 }, // DEFAULT\n\t{ 5, \"F6F080\", \"2A211C\", 0 }, // INSTRUCTION WORD\n\t{ 16, \"FFAA00\", \"2A211C\", 0 }, // TYPE WORD\n\t{ 4, \"FF3A83\", \"2A211C\", 0 }, // NUMBER\n\t{ 6, \"55E439\", \"2A211C\", 0 }, // STRING\n\t{ 7, \"55E439\", \"2A211C\", 0 }, // CHARACTER\n\t{ 10, \"FFAA00\", \"2A211C\", 0 }, // OPERATOR\n\t{ 13, \"FF3A83\", \"2A211C\", 0 }, // VERBATIM\n\t{ 14, \"FFB454\", \"2A211C\", 0 }, // REGEX\n\t{ 1, \"1E9AE0\", \"2A211C\", 0 }, // COMMENT\n\t{ 2, \"1E9AE0\", \"2A211C\", 0 }, // COMMENT LINE\n\t{ 3, \"1E9AE0\", \"2A211C\", 0 }, // COMMENT DOC\n\t{ 15, \"1E9AE0\", \"2A211C\", 0 }, // COMMENT LINE DOC\n\t{ 17, \"1E9AE0\", \"2A211C\", 0 }, // COMMENT DOC KEYWORD\n\t{ 18, \"1E9AE0\", \"2A211C\", 0 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle javascript_Bespin[] = {\n\t{ 41, \"BDAF9D\", \"2A211C\", 0 }, // DEFAULT\n\t{ 45, \"FF3A83\", \"2A211C\", 0 }, // NUMBER\n\t{ 46, \"BDAE9D\", \"2A211C\", 0 }, // WORD\n\t{ 47, \"37A3ED\", \"2A211C\", 0 }, // KEYWORD\n\t{ 16, \"FF5555\", \"2A211C\", 0 }, // USER-DEFINED\n\t{ 48, \"00FF40\", \"2A211C\", 0 }, // DOUBLESTRING\n\t{ 49, \"80FF00\", \"2A211C\", 0 }, // SINGLESTRING\n\t{ 50, \"E5C138\", \"2A211C\", 0 }, // SYMBOLS\n\t{ 51, \"55E439\", \"2A211C\", 0 }, // STRINGEOL\n\t{ 52, \"FFB454\", \"2A211C\", 0 }, // REGEX\n\t{ 42, \"666666\", \"2A211C\", 0 }, // COMMENT\n\t{ 43, \"666666\", \"2A211C\", 0 }, // COMMENTLINE\n\t{ 44, \"FFFF80\", \"2A211C\", 0 }, // COMMENTDOC\n\t{ 17, \"FF0080\", \"2A211C\", 0 }, // COMMENT DOC KEYWORD\n\t{ 18, \"FF0080\", \"2A211C\", 0 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle python_Bespin[] = {\n\t{ 0, \"F8F8F8\", \"2A211C\", 0 }, // DEFAULT\n\t{ 1, \"1E9AE0\", \"2A211C\", 0 }, // COMMENTLINE\n\t{ 2, \"FF3A83\", \"2A211C\", 0 }, // NUMBER\n\t{ 3, \"55E439\", \"2A211C\", 0 }, // STRING\n\t{ 4, \"55E439\", \"2A211C\", 0 }, // CHARACTER\n\t{ 5, \"FFAA00\", \"2A211C\", 0 }, // KEYWORDS\n\t{ 6, \"000000\", \"2A211C\", 0 }, // TRIPLE\n\t{ 7, \"000000\", \"2A211C\", 0 }, // TRIPLEDOUBLE\n\t{ 8, \"000000\", \"2A211C\", 0 }, // CLASSNAME\n\t{ 9, \"000000\", \"2A211C\", 0 }, // DEFNAME\n\t{ 10, \"FFAA00\", \"2A211C\", 0 }, // OPERATOR\n\t{ 11, \"EB939A\", \"2A211C\", 0 }, // IDENTIFIER\n\t{ 12, \"1E9AE0\", \"2A211C\", 0 }, // COMMENTBLOCK\n\t{ 12, \"55E439\", \"2A211C\", 0 }, // STRINGEOL\n};\n\nstatic const lexstyle ruby_Bespin[] = {\n\t{ 0, \"F8F8F8\", \"2A211C\", 0 }, // DEFAULT\n\t{ 1, \"000000\", \"2A211C\", 0 }, // ERROR\n\t{ 2, \"1E9AE0\", \"2A211C\", 0 }, // COMMENTLINE\n\t{ 3, \"000000\", \"2A211C\", 0 }, // POD\n\t{ 4, \"FF3A83\", \"2A211C\", 0 }, // NUMBER\n\t{ 5, \"FFAA00\", \"2A211C\", 0 }, // INSTRUCTION\n\t{ 6, \"55E439\", \"2A211C\", 0 }, // STRING\n\t{ 7, \"55E439\", \"2A211C\", 0 }, // CHARACTER\n\t{ 8, \"EFE900\", \"2A211C\", 0 }, // CLASS NAME\n\t{ 9, \"EFE900\", \"2A211C\", 0 }, // DEF NAME\n\t{ 10, \"FFAA00\", \"2A211C\", 0 }, // OPERATOR\n\t{ 11, \"EB939A\", \"2A211C\", 0 }, // IDENTIFIER\n\t{ 12, \"FFB454\", \"2A211C\", 0 }, // REGEX\n\t{ 13, \"FB9A4B\", \"2A211C\", 0 }, // GLOBAL\n\t{ 14, \"F8F8F8\", \"2A211C\", 0 }, // SYMBOL\n\t{ 15, \"000000\", \"2A211C\", 0 }, // MODULE NAME\n\t{ 16, \"FB9A4B\", \"2A211C\", 0 }, // INSTANCE VAR\n\t{ 17, \"000000\", \"2A211C\", 0 }, // CLASS VAR\n\t{ 18, \"000000\", \"2A211C\", 0 }, // BACKTICKS\n\t{ 19, \"000000\", \"2A211C\", 0 }, // DATA SECTION\n\t{ 24, \"55E439\", \"2A211C\", 0 }, // STRING Q\n};\n\nstatic const lexstyle global_Zenburn[] = {\n\t{ 32, \"DCDCCC\", \"3F3F3F\", 0 }, // Default Style\n\t{ 37, \"4F5F5F\", \"3F3F3F\", 0 }, // Indent guideline style\n\t{ 34, \"F0F9F9\", \"3F3F3F\", 1 }, // Brace highlight style\n\t{ 35, \"F09F9F\", \"3F3F3F\", 0 }, // Bad brace colour\n\t{ 2069, \"8FAF9F\", \"3F3F3F\", 0 }, // Caret colour\n\t{ 33, \"8A8A8A\", \"0C0C0C\", 0 }, // Line number margin\n\t{ 29, \"DCDCCC\", \"358A35\", 0 }, // Smart HighLighting\n\t{ 31, \"DCDCCC\", \"FF0000\", 0 }, // Find Mark Style\n\t{ 25, \"DCDCCC\", \"88B090\", 0 }, // Mark Style 1\n\t{ 24, \"DCDCCC\", \"F8F893\", 0 }, // Mark Style 2\n\t{ 23, \"DCDCCC\", \"F18C96\", 0 }, // Mark Style 3\n\t{ 22, \"DCDCCC\", \"408040\", 0 }, // Mark Style 4\n\t{ 21, \"DCDCCC\", \"968CF1\", 0 }, // Mark Style 5\n\t{ 28, \"DCDCCC\", \"C3BF9F\", 0 }, // Incremental highlight all\n\t{ 27, \"DCDCCC\", \"C6C600\", 0 }, // Tags match highlighting\n\t{ 26, \"DCDCCC\", \"78926F\", 0 }, // Tags attribute\n};\n\n\nstatic const lexstyle cpp_Zenburn[] = {\n\t{ 9, \"FFCFAF\", \"3F3F3F\", 0 }, // PREPROCESSOR\n\t{ 11, \"DCDCCC\", \"3F3F3F\", 0 }, // DEFAULT\n\t{ 5, \"DFC47D\", \"3F3F3F\", 1 }, // INSTRUCTION WORD\n\t{ 16, \"CEDF99\", \"3F3F3F\", 1 }, // TYPE WORD\n\t{ 4, \"8CD0D3\", \"3F3F3F\", 0 }, // NUMBER\n\t{ 6, \"CC9393\", \"3F3F3F\", 0 }, // STRING\n\t{ 7, \"DCA3A3\", \"3F3F3F\", 0 }, // CHARACTER\n\t{ 10, \"9F9D6D\", \"3F3F3F\", 1 }, // OPERATOR\n\t{ 13, \"CC9393\", \"3F3F3F\", 0 }, // VERBATIM\n\t{ 14, \"C89191\", \"3F3F3F\", 1 }, // REGEX\n\t{ 1, \"7F9F7F\", \"3F3F3F\", 3 }, // COMMENT\n\t{ 2, \"7F9F7F\", \"3F3F3F\", 3 }, // COMMENT LINE\n\t{ 3, \"7F9F7F\", \"3F3F3F\", 2 }, // COMMENT DOC\n\t{ 15, \"7F9F7F\", \"3F3F3F\", 2 }, // COMMENT LINE DOC\n\t{ 17, \"7F9F7F\", \"3F3F3F\", 3 }, // COMMENT DOC KEYWORD\n\t{ 18, \"7F9F7F\", \"3F3F3F\", 2 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle java_Zenburn[] = {\n\t{ 9, \"FFCFAF\", \"3F3F3F\", 0 }, // PREPROCESSOR\n\t{ 11, \"DCDCCC\", \"3F3F3F\", 0 }, // DEFAULT\n\t{ 5, \"DFC47D\", \"3F3F3F\", 1 }, // INSTRUCTION WORD\n\t{ 16, \"CEDF99\", \"3F3F3F\", 1 }, // TYPE WORD\n\t{ 4, \"8CD0D3\", \"3F3F3F\", 0 }, // NUMBER\n\t{ 6, \"CC9393\", \"3F3F3F\", 0 }, // STRING\n\t{ 7, \"DCA3A3\", \"3F3F3F\", 0 }, // CHARACTER\n\t{ 10, \"9F9D6D\", \"3F3F3F\", 1 }, // OPERATOR\n\t{ 13, \"CC9393\", \"3F3F3F\", 0 }, // VERBATIM\n\t{ 14, \"C89191\", \"3F3F3F\", 1 }, // REGEX\n\t{ 1, \"7F9F7F\", \"3F3F3F\", 3 }, // COMMENT\n\t{ 2, \"7F9F7F\", \"3F3F3F\", 3 }, // COMMENT LINE\n\t{ 3, \"7F9F7F\", \"3F3F3F\", 3 }, // COMMENT DOC\n\t{ 15, \"7F9F7F\", \"3F3F3F\", 2 }, // COMMENT LINE DOC\n\t{ 17, \"7F9F7F\", \"3F3F3F\", 2 }, // COMMENT DOC KEYWORD\n\t{ 18, \"7F9F7F\", \"3F3F3F\", 2 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle javascript_Zenburn[] = {\n\t{ 41, \"DCDCCC\", \"3F3F3F\", 0 }, // DEFAULT\n\t{ 45, \"8CD0D3\", \"3F3F3F\", 0 }, // NUMBER\n\t{ 46, \"DCDCCC\", \"3F3F3F\", 0 }, // WORD\n\t{ 47, \"CEDF99\", \"3F3F3F\", 3 }, // KEYWORD\n\t{ 48, \"CC9393\", \"3F3F3F\", 0 }, // DOUBLESTRING\n\t{ 49, \"CC9393\", \"3F3F3F\", 0 }, // SINGLESTRING\n\t{ 50, \"DFC47D\", \"3F3F3F\", 1 }, // SYMBOLS\n\t{ 52, \"CC9393\", \"3F3F3F\", 1 }, // REGEX\n\t{ 42, \"7F9F7F\", \"3F3F3F\", 3 }, // COMMENT\n\t{ 43, \"7F9F7F\", \"3F3F3F\", 3 }, // COMMENTLINE\n\t{ 44, \"7F9F7F\", \"3F3F3F\", 2 }, // COMMENTDOC\n};\n\nstatic const lexstyle python_Zenburn[] = {\n\t{ 0, \"DCDCCC\", \"3F3F3F\", 0 }, // DEFAULT\n\t{ 1, \"7F9F7F\", \"3F3F3F\", 3 }, // COMMENTLINE\n\t{ 2, \"8CD0D3\", \"3F3F3F\", 0 }, // NUMBER\n\t{ 3, \"CC9393\", \"3F3F3F\", 0 }, // STRING\n\t{ 4, \"DCA3A3\", \"3F3F3F\", 0 }, // CHARACTER\n\t{ 5, \"DFC47D\", \"3F3F3F\", 1 }, // KEYWORDS\n\t{ 6, \"7F9F7F\", \"3F3F3F\", 0 }, // TRIPLE\n\t{ 7, \"7F9F7F\", \"3F3F3F\", 0 }, // TRIPLEDOUBLE\n\t{ 8, \"DCDCCC\", \"3F3F3F\", 0 }, // CLASSNAME\n\t{ 9, \"CEDF99\", \"3F3F3F\", 0 }, // DEFNAME\n\t{ 10, \"9F9D6D\", \"3F3F3F\", 1 }, // OPERATOR\n\t{ 11, \"DCDCCC\", \"3F3F3F\", 0 }, // IDENTIFIER\n\t{ 12, \"7F9F7F\", \"3F3F3F\", 0 }, // COMMENTBLOCK\n};\n\nstatic const lexstyle ruby_Zenburn[] = {\n\t{ 0, \"DCDCCC\", \"3F3F3F\", 0 }, // DEFAULT\n\t{ 1, \"EBD6EB\", \"3F3F3F\", 0 }, // ERROR\n\t{ 2, \"7F9F7F\", \"3F3F3F\", 3 }, // COMMENTLINE\n\t{ 3, \"DCDCCC\", \"3F3F3F\", 0 }, // POD\n\t{ 4, \"8CD0D3\", \"3F3F3F\", 0 }, // NUMBER\n\t{ 5, \"E3CEAB\", \"3F3F3F\", 1 }, // INSTRUCTION\n\t{ 6, \"CC9393\", \"3F3F3F\", 0 }, // STRING\n\t{ 7, \"DCA3A3\", \"3F3F3F\", 0 }, // CHARACTER\n\t{ 8, \"DFE4CF\", \"3F3F3F\", 1 }, // CLASS NAME\n\t{ 9, \"EFEF8F\", \"3F3F3F\", 0 }, // DEF NAME\n\t{ 10, \"9F9D6D\", \"3F3F3F\", 1 }, // OPERATOR\n\t{ 11, \"FFEBDD\", \"3F3F3F\", 0 }, // IDENTIFIER\n\t{ 12, \"CC9393\", \"3F3F3F\", 1 }, // REGEX\n\t{ 13, \"FFEBDD\", \"3F3F3F\", 3 }, // GLOBAL\n\t{ 14, \"E3CEAB\", \"3F3F3F\", 0 }, // SYMBOL\n\t{ 15, \"DCDCCC\", \"3F3F3F\", 1 }, // MODULE NAME\n\t{ 16, \"FFCFAF\", \"3F3F3F\", 0 }, // INSTANCE VAR\n\t{ 17, \"FFCFAF\", \"3F3F3F\", 1 }, // CLASS VAR\n\t{ 18, \"DCDCCC\", \"3F3F3F\", 0 }, // BACKTICKS\n\t{ 19, \"DCDCCC\", \"3F3F3F\", 0 }, // DATA SECTION\n\t{ 24, \"C89191\", \"3F3F3F\", 0 }, // STRING Q\n};\n\nstatic const lexstyle global_Plastic_Code_Wrap[] = {\n\t{ 32, \"F8F8F8\", \"0B161D\", 0 }, // Default Style\n\t{ 37, \"888A85\", \"0B161D\", 0 }, // Indent guideline style\n\t{ 34, \"FCE94F\", \"0B161D\", 1 }, // Brace highlight style\n\t{ 35, \"EF2929\", \"0B161D\", 0 }, // Bad brace colour\n\t{ 2069, \"8BA7A7\", \"0B161D\", 0 }, // Caret colour\n\t{ 31, \"CC0000\", \"EDD400\", 0 }, // Find Mark Style\n\t{ 33, \"EEEEEC\", \"2E3436\", 0 }, // Line number margin\n\t{ 29, \"555753\", \"00FF00\", 0 }, // Smart HighLighting\n\t{ 31, \"FCAF3E\", \"FF0000\", 0 }, // Find Mark Style\n\t{ 25, \"F8F8F8\", \"00FFFF\", 0 }, // Mark Style 1\n\t{ 24, \"F8F8F8\", \"FF8000\", 0 }, // Mark Style 2\n\t{ 23, \"F8F8F8\", \"FFFF00\", 0 }, // Mark Style 3\n\t{ 22, \"F8F8F8\", \"8000FF\", 0 }, // Mark Style 4\n\t{ 21, \"F8F8F8\", \"008000\", 0 }, // Mark Style 5\n\t{ 28, \"FFCAB0\", \"0080FF\", 0 }, // Incremental highlight all\n\t{ 27, \"000000\", \"8000FF\", 0 }, // Tags match highlighting\n\t{ 26, \"8080C0\", \"FFFF00\", 0 }, // Tags attribute\n};\n\n\nstatic const lexstyle cpp_Plastic_Code_Wrap[] = {\n\t{ 9, \"FFAA00\", \"0B161D\", 0 }, // PREPROCESSOR\n\t{ 11, \"F8F8F8\", \"0B161D\", 0 }, // DEFAULT\n\t{ 5, \"F6F080\", \"0B161D\", 0 }, // INSTRUCTION WORD\n\t{ 16, \"FFAA00\", \"0B161D\", 0 }, // TYPE WORD\n\t{ 4, \"FF3A83\", \"0B161D\", 0 }, // NUMBER\n\t{ 6, \"55E439\", \"0B161D\", 0 }, // STRING\n\t{ 7, \"55E439\", \"0B161D\", 0 }, // CHARACTER\n\t{ 10, \"FFAA00\", \"0B161D\", 0 }, // OPERATOR\n\t{ 13, \"FF3A83\", \"0B161D\", 0 }, // VERBATIM\n\t{ 14, \"FFB454\", \"0B161D\", 0 }, // REGEX\n\t{ 1, \"1E9AE0\", \"0B161D\", 0 }, // COMMENT\n\t{ 2, \"1E9AE0\", \"0B161D\", 0 }, // COMMENT LINE\n\t{ 3, \"1E9AE0\", \"0B161D\", 0 }, // COMMENT DOC\n\t{ 15, \"1E9AE0\", \"0B161D\", 0 }, // COMMENT LINE DOC\n\t{ 17, \"1E9AE0\", \"0B161D\", 0 }, // COMMENT DOC KEYWORD\n\t{ 18, \"1E9AE0\", \"0B161D\", 0 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle java_Plastic_Code_Wrap[] = {\n\t{ 9, \"FFAA00\", \"0B161D\", 0 }, // PREPROCESSOR\n\t{ 11, \"F8F8F8\", \"0B161D\", 0 }, // DEFAULT\n\t{ 5, \"F6F080\", \"0B161D\", 0 }, // INSTRUCTION WORD\n\t{ 16, \"FFAA00\", \"0B161D\", 0 }, // TYPE WORD\n\t{ 4, \"FF3A83\", \"0B161D\", 0 }, // NUMBER\n\t{ 6, \"55E439\", \"0B161D\", 0 }, // STRING\n\t{ 7, \"55E439\", \"0B161D\", 0 }, // CHARACTER\n\t{ 10, \"FFAA00\", \"0B161D\", 0 }, // OPERATOR\n\t{ 13, \"FF3A83\", \"0B161D\", 0 }, // VERBATIM\n\t{ 14, \"FFB454\", \"0B161D\", 0 }, // REGEX\n\t{ 1, \"1E9AE0\", \"0B161D\", 0 }, // COMMENT\n\t{ 2, \"1E9AE0\", \"0B161D\", 0 }, // COMMENT LINE\n\t{ 3, \"1E9AE0\", \"0B161D\", 0 }, // COMMENT DOC\n\t{ 15, \"1E9AE0\", \"0B161D\", 0 }, // COMMENT LINE DOC\n\t{ 17, \"1E9AE0\", \"0B161D\", 0 }, // COMMENT DOC KEYWORD\n\t{ 18, \"1E9AE0\", \"0B161D\", 0 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle javascript_Plastic_Code_Wrap[] = {\n\t{ 41, \"F8F8F8\", \"0B161D\", 0 }, // DEFAULT\n\t{ 45, \"FF3A83\", \"0B161D\", 0 }, // NUMBER\n\t{ 46, \"F8F8F8\", \"0B161D\", 0 }, // WORD\n\t{ 47, \"FFAA00\", \"0B161D\", 0 }, // KEYWORD\n\t{ 48, \"55E439\", \"0B161D\", 0 }, // DOUBLESTRING\n\t{ 49, \"55E439\", \"0B161D\", 0 }, // SINGLESTRING\n\t{ 50, \"F8F8F8\", \"0B161D\", 0 }, // SYMBOLS\n\t{ 51, \"55E439\", \"0B161D\", 0 }, // STRINGEOL\n\t{ 52, \"FFB454\", \"0B161D\", 0 }, // REGEX\n\t{ 42, \"1E9AE0\", \"0B161D\", 0 }, // COMMENT\n\t{ 43, \"1E9AE0\", \"0B161D\", 0 }, // COMMENTLINE\n\t{ 44, \"1E9AE0\", \"0B161D\", 0 }, // COMMENTDOC\n};\n\nstatic const lexstyle python_Plastic_Code_Wrap[] = {\n\t{ 0, \"F8F8F8\", \"0B161D\", 0 }, // DEFAULT\n\t{ 1, \"1E9AE0\", \"0B161D\", 0 }, // COMMENTLINE\n\t{ 2, \"FF3A83\", \"0B161D\", 0 }, // NUMBER\n\t{ 3, \"55E439\", \"0B161D\", 0 }, // STRING\n\t{ 4, \"55E439\", \"0B161D\", 0 }, // CHARACTER\n\t{ 5, \"FFAA00\", \"0B161D\", 0 }, // KEYWORDS\n\t{ 6, \"000000\", \"0B161D\", 0 }, // TRIPLE\n\t{ 7, \"000000\", \"0B161D\", 0 }, // TRIPLEDOUBLE\n\t{ 8, \"000000\", \"0B161D\", 0 }, // CLASSNAME\n\t{ 9, \"000000\", \"0B161D\", 0 }, // DEFNAME\n\t{ 10, \"FFAA00\", \"0B161D\", 0 }, // OPERATOR\n\t{ 11, \"EB939A\", \"0B161D\", 0 }, // IDENTIFIER\n\t{ 12, \"1E9AE0\", \"0B161D\", 0 }, // COMMENTBLOCK\n\t{ 12, \"55E439\", \"0B161D\", 0 }, // STRINGEOL\n};\n\nstatic const lexstyle ruby_Plastic_Code_Wrap[] = {\n\t{ 0, \"F8F8F8\", \"0B161D\", 0 }, // DEFAULT\n\t{ 1, \"000000\", \"0B161D\", 0 }, // ERROR\n\t{ 2, \"1E9AE0\", \"0B161D\", 0 }, // COMMENTLINE\n\t{ 3, \"000000\", \"0B161D\", 0 }, // POD\n\t{ 4, \"FF3A83\", \"0B161D\", 0 }, // NUMBER\n\t{ 5, \"FFAA00\", \"0B161D\", 0 }, // INSTRUCTION\n\t{ 6, \"55E439\", \"0B161D\", 0 }, // STRING\n\t{ 7, \"55E439\", \"0B161D\", 0 }, // CHARACTER\n\t{ 8, \"EFE900\", \"0B161D\", 0 }, // CLASS NAME\n\t{ 9, \"EFE900\", \"0B161D\", 0 }, // DEF NAME\n\t{ 10, \"FFAA00\", \"0B161D\", 0 }, // OPERATOR\n\t{ 11, \"EB939A\", \"0B161D\", 0 }, // IDENTIFIER\n\t{ 12, \"FFB454\", \"0B161D\", 0 }, // REGEX\n\t{ 13, \"FB9A4B\", \"0B161D\", 0 }, // GLOBAL\n\t{ 14, \"F8F8F8\", \"0B161D\", 0 }, // SYMBOL\n\t{ 15, \"000000\", \"0B161D\", 0 }, // MODULE NAME\n\t{ 16, \"FB9A4B\", \"0B161D\", 0 }, // INSTANCE VAR\n\t{ 17, \"000000\", \"0B161D\", 0 }, // CLASS VAR\n\t{ 18, \"000000\", \"0B161D\", 0 }, // BACKTICKS\n\t{ 19, \"000000\", \"0B161D\", 0 }, // DATA SECTION\n\t{ 24, \"55E439\", \"0B161D\", 0 }, // STRING Q\n};\n\nstatic const lexstyle global_Solarized[] = {\n\t{ 32, \"839496\", \"002B36\", 0 }, // Default Style\n\t{ 37, \"586E75\", \"002B36\", 0 }, // Indent guideline style\n\t{ 34, \"DC322F\", \"859900\", 1 }, // Brace highlight style\n\t{ 35, \"D33682\", \"002B36\", 0 }, // Bad brace colour\n\t{ 2069, \"EEE8D5\", \"002B36\", 0 }, // Caret colour\n\t{ 33, \"586E75\", \"073642\", 0 }, // Line number margin\n\t{ 29, \"839496\", \"FDF6E3\", 0 }, // Smart HighLighting\n\t{ 31, \"839496\", \"6C71C4\", 0 }, // Find Mark Style\n\t{ 25, \"839496\", \"DC322F\", 0 }, // Mark Style 1\n\t{ 24, \"839496\", \"268BD2\", 0 }, // Mark Style 2\n\t{ 23, \"839496\", \"2AA198\", 0 }, // Mark Style 3\n\t{ 22, \"839496\", \"859900\", 0 }, // Mark Style 4\n\t{ 21, \"839496\", \"B58900\", 0 }, // Mark Style 5\n\t{ 28, \"839496\", \"002B36\", 0 }, // Incremental highlight all\n\t{ 27, \"839496\", \"CB4B16\", 0 }, // Tags match highlighting\n\t{ 26, \"839496\", \"CB4B16\", 0 }, // Tags attribute\n};\n\n\nstatic const lexstyle cpp_Solarized[] = {\n\t{ 9, \"DC322F\", \"002B36\", 0 }, // PREPROCESSOR\n\t{ 11, \"839496\", \"002B36\", 0 }, // DEFAULT\n\t{ 5, \"859900\", \"002B36\", 0 }, // INSTRUCTION WORD\n\t{ 16, \"B58900\", \"002B36\", 0 }, // TYPE WORD\n\t{ 4, \"2AA198\", \"002B36\", 0 }, // NUMBER\n\t{ 6, \"2AA198\", \"002B36\", 0 }, // STRING\n\t{ 7, \"2AA198\", \"002B36\", 0 }, // CHARACTER\n\t{ 10, \"93A1A1\", \"002B36\", 0 }, // OPERATOR\n\t{ 13, \"2AA198\", \"002B36\", 0 }, // VERBATIM\n\t{ 14, \"268BD2\", \"002B36\", 0 }, // REGEX\n\t{ 1, \"586E75\", \"002B36\", 2 }, // COMMENT\n\t{ 2, \"586E75\", \"002B36\", 2 }, // COMMENT LINE\n\t{ 3, \"586E75\", \"002B36\", 2 }, // COMMENT DOC\n\t{ 15, \"586E75\", \"002B36\", 2 }, // COMMENT LINE DOC\n\t{ 17, \"586E75\", \"002B36\", 3 }, // COMMENT DOC KEYWORD\n\t{ 18, \"D33682\", \"002B36\", 3 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle java_Solarized[] = {\n\t{ 9, \"DC322F\", \"002B36\", 0 }, // PREPROCESSOR\n\t{ 11, \"839496\", \"002B36\", 0 }, // DEFAULT\n\t{ 5, \"859900\", \"002B36\", 0 }, // INSTRUCTION WORD\n\t{ 16, \"B58900\", \"002B36\", 0 }, // TYPE WORD\n\t{ 4, \"2AA198\", \"002B36\", 0 }, // NUMBER\n\t{ 6, \"2AA198\", \"002B36\", 0 }, // STRING\n\t{ 7, \"2AA198\", \"002B36\", 0 }, // CHARACTER\n\t{ 10, \"93A1A1\", \"002B36\", 0 }, // OPERATOR\n\t{ 13, \"2AA198\", \"002B36\", 0 }, // VERBATIM\n\t{ 14, \"268BD2\", \"002B36\", 0 }, // REGEX\n\t{ 1, \"586E75\", \"002B36\", 2 }, // COMMENT\n\t{ 2, \"586E75\", \"002B36\", 2 }, // COMMENT LINE\n\t{ 3, \"586E75\", \"002B36\", 2 }, // COMMENT DOC\n\t{ 15, \"586E75\", \"002B36\", 2 }, // COMMENT LINE DOC\n\t{ 17, \"268BD2\", \"002B36\", 3 }, // COMMENT DOC KEYWORD\n\t{ 18, \"D33682\", \"002B36\", 3 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle javascript_Solarized[] = {\n\t{ 41, \"839496\", \"002B36\", 0 }, // DEFAULT\n\t{ 45, \"2AA198\", \"002B36\", 0 }, // NUMBER\n\t{ 46, \"B58900\", \"002B36\", 0 }, // WORD\n\t{ 47, \"859900\", \"002B36\", 0 }, // KEYWORD\n\t{ 48, \"2AA198\", \"002B36\", 0 }, // DOUBLESTRING\n\t{ 49, \"2AA198\", \"002B36\", 0 }, // SINGLESTRING\n\t{ 50, \"839496\", \"002B36\", 0 }, // SYMBOLS\n\t{ 51, \"DC322F\", \"002B36\", 0 }, // STRINGEOL\n\t{ 52, \"268BD2\", \"002B36\", 0 }, // REGEX\n\t{ 42, \"586E75\", \"002B36\", 2 }, // COMMENT\n\t{ 43, \"586E75\", \"002B36\", 2 }, // COMMENTLINE\n\t{ 44, \"586E75\", \"002B36\", 2 }, // COMMENTDOC\n\t{ 17, \"268BD2\", \"002B36\", 3 }, // COMMENT DOC KEYWORD\n\t{ 18, \"D33682\", \"002B36\", 3 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle python_Solarized[] = {\n\t{ 0, \"839496\", \"002B36\", 0 }, // DEFAULT\n\t{ 1, \"586E75\", \"002B36\", 2 }, // COMMENTLINE\n\t{ 2, \"2AA198\", \"002B36\", 0 }, // NUMBER\n\t{ 3, \"2AA198\", \"002B36\", 0 }, // STRING\n\t{ 4, \"2AA198\", \"002B36\", 0 }, // CHARACTER\n\t{ 5, \"859900\", \"002B36\", 0 }, // KEYWORDS\n\t{ 6, \"2AA198\", \"002B36\", 0 }, // TRIPLE\n\t{ 7, \"2AA198\", \"002B36\", 0 }, // TRIPLEDOUBLE\n\t{ 8, \"CB4B16\", \"002B36\", 0 }, // CLASSNAME\n\t{ 9, \"CB4B16\", \"002B36\", 0 }, // DEFNAME\n\t{ 10, \"93A1A1\", \"002B36\", 0 }, // OPERATOR\n\t{ 11, \"B58900\", \"002B36\", 0 }, // IDENTIFIER\n\t{ 12, \"586E75\", \"002B36\", 2 }, // COMMENTBLOCK\n\t{ 12, \"586E75\", \"002B36\", 0 }, // STRINGEOL\n};\n\nstatic const lexstyle ruby_Solarized[] = {\n\t{ 0, \"839496\", \"002B36\", 0 }, // DEFAULT\n\t{ 1, \"DC322F\", \"002B36\", 0 }, // ERROR\n\t{ 2, \"586E75\", \"002B36\", 2 }, // COMMENTLINE\n\t{ 3, \"839496\", \"002B36\", 2 }, // POD\n\t{ 4, \"2AA198\", \"002B36\", 0 }, // NUMBER\n\t{ 5, \"859900\", \"002B36\", 0 }, // INSTRUCTION\n\t{ 6, \"2AA198\", \"002B36\", 0 }, // STRING\n\t{ 7, \"2AA198\", \"002B36\", 0 }, // CHARACTER\n\t{ 8, \"B58900\", \"002B36\", 0 }, // CLASS NAME\n\t{ 9, \"268BD2\", \"002B36\", 0 }, // DEF NAME\n\t{ 10, \"93A1A1\", \"002B36\", 0 }, // OPERATOR\n\t{ 11, \"B58900\", \"002B36\", 0 }, // IDENTIFIER\n\t{ 12, \"268BD2\", \"002B36\", 0 }, // REGEX\n\t{ 13, \"B58900\", \"002B36\", 0 }, // GLOBAL\n\t{ 14, \"839496\", \"002B36\", 0 }, // SYMBOL\n\t{ 15, \"CB4B16\", \"002B36\", 0 }, // MODULE NAME\n\t{ 16, \"B58900\", \"002B36\", 0 }, // INSTANCE VAR\n\t{ 17, \"839496\", \"002B36\", 0 }, // CLASS VAR\n\t{ 18, \"EEE8D5\", \"6C71C4\", 0 }, // BACKTICKS\n\t{ 19, \"2AA198\", \"002B36\", 0 }, // DATA SECTION\n\t{ 24, \"2AA198\", \"002B36\", 0 }, // STRING Q\n\t{ 25, \"268BD2\", \"002B36\", 0 }, // BOOLEAN\n};\n\nstatic const lexstyle global_Hello_Kitty[] = {\n\t{ 32, \"000000\", \"FFB0FF\", 0 }, // Default Style\n\t{ 37, \"C0C0C0\", \"FFB0FF\", 0 }, // Indent guideline style\n\t{ 34, \"FF0000\", \"FFB0FF\", 1 }, // Brace highlight style\n\t{ 35, \"800000\", \"FFB0FF\", 0 }, // Bad brace colour\n\t{ 2069, \"FFFFFF\", \"372017\", 0 }, // Caret colour\n\t{ 33, \"FFFFFF\", \"FF80FF\", 0 }, // Line number margin\n\t{ 29, \"555753\", \"00FF00\", 0 }, // Smart HighLighting\n\t{ 31, \"FCAF3E\", \"FF0000\", 0 }, // Find Mark Style\n\t{ 25, \"000000\", \"00FFFF\", 0 }, // Mark Style 1\n\t{ 24, \"000000\", \"FF8000\", 0 }, // Mark Style 2\n\t{ 23, \"000000\", \"FFFF00\", 0 }, // Mark Style 3\n\t{ 22, \"000000\", \"8000FF\", 0 }, // Mark Style 4\n\t{ 21, \"FAAA3C\", \"008000\", 0 }, // Mark Style 5\n\t{ 28, \"FFCAB0\", \"0080FF\", 0 }, // Incremental highlight all\n\t{ 27, \"000000\", \"8000FF\", 0 }, // Tags match highlighting\n\t{ 26, \"8080C0\", \"FFFF00\", 0 }, // Tags attribute\n};\n\n\nstatic const lexstyle cpp_Hello_Kitty[] = {\n\t{ 9, \"804000\", \"FFB0FF\", 0 }, // PREPROCESSOR\n\t{ 11, \"000000\", \"FFB0FF\", 0 }, // DEFAULT\n\t{ 5, \"0000FF\", \"FFB0FF\", 1 }, // INSTRUCTION WORD\n\t{ 16, \"8000FF\", \"FFB0FF\", 0 }, // TYPE WORD\n\t{ 4, \"FF8000\", \"FFB0FF\", 0 }, // NUMBER\n\t{ 6, \"808080\", \"FFB0FF\", 0 }, // STRING\n\t{ 7, \"808080\", \"FFB0FF\", 0 }, // CHARACTER\n\t{ 10, \"000080\", \"FFB0FF\", 1 }, // OPERATOR\n\t{ 13, \"000000\", \"FFB0FF\", 0 }, // VERBATIM\n\t{ 14, \"000000\", \"FFB0FF\", 1 }, // REGEX\n\t{ 1, \"008000\", \"FFB0FF\", 0 }, // COMMENT\n\t{ 2, \"008000\", \"FFB0FF\", 0 }, // COMMENT LINE\n\t{ 3, \"008080\", \"FFB0FF\", 0 }, // COMMENT DOC\n\t{ 15, \"008080\", \"FFB0FF\", 0 }, // COMMENT LINE DOC\n\t{ 17, \"008080\", \"FFB0FF\", 1 }, // COMMENT DOC KEYWORD\n\t{ 18, \"008080\", \"FFB0FF\", 0 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle java_Hello_Kitty[] = {\n\t{ 9, \"804000\", \"FFB0FF\", 0 }, // PREPROCESSOR\n\t{ 11, \"000000\", \"FFB0FF\", 0 }, // DEFAULT\n\t{ 5, \"0000FF\", \"FFB0FF\", 1 }, // INSTRUCTION WORD\n\t{ 16, \"8000FF\", \"FFB0FF\", 0 }, // TYPE WORD\n\t{ 4, \"FF8000\", \"FFB0FF\", 0 }, // NUMBER\n\t{ 6, \"808080\", \"FFB0FF\", 0 }, // STRING\n\t{ 7, \"808080\", \"FFB0FF\", 0 }, // CHARACTER\n\t{ 10, \"000080\", \"FFB0FF\", 1 }, // OPERATOR\n\t{ 13, \"000000\", \"FFB0FF\", 0 }, // VERBATIM\n\t{ 14, \"000000\", \"FFB0FF\", 1 }, // REGEX\n\t{ 1, \"008000\", \"FFB0FF\", 0 }, // COMMENT\n\t{ 2, \"008000\", \"FFB0FF\", 0 }, // COMMENT LINE\n\t{ 3, \"008080\", \"FFB0FF\", 0 }, // COMMENT DOC\n\t{ 15, \"008080\", \"FFB0FF\", 0 }, // COMMENT LINE DOC\n\t{ 17, \"008080\", \"FFB0FF\", 1 }, // COMMENT DOC KEYWORD\n\t{ 18, \"008080\", \"FFB0FF\", 0 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle javascript_Hello_Kitty[] = {\n\t{ 41, \"000000\", \"F2F4FF\", 0 }, // DEFAULT\n\t{ 45, \"FF0000\", \"F2F4FF\", 0 }, // NUMBER\n\t{ 46, \"000000\", \"F2F4FF\", 0 }, // WORD\n\t{ 47, \"000080\", \"F2F4FF\", 3 }, // KEYWORD\n\t{ 48, \"808080\", \"F2F4FF\", 0 }, // DOUBLESTRING\n\t{ 49, \"808080\", \"F2F4FF\", 0 }, // SINGLESTRING\n\t{ 50, \"000000\", \"F2F4FF\", 1 }, // SYMBOLS\n\t{ 51, \"808080\", \"F2F4FF\", 1 }, // STRINGEOL\n\t{ 52, \"8000FF\", \"F2F4FF\", 0 }, // REGEX\n\t{ 42, \"008000\", \"F2F4FF\", 0 }, // COMMENT\n\t{ 43, \"008000\", \"F2F4FF\", 0 }, // COMMENTLINE\n\t{ 44, \"008080\", \"F2F4FF\", 0 }, // COMMENTDOC\n};\n\nstatic const lexstyle python_Hello_Kitty[] = {\n\t{ 0, \"000000\", \"FFB0FF\", 0 }, // DEFAULT\n\t{ 1, \"008000\", \"FFB0FF\", 0 }, // COMMENTLINE\n\t{ 2, \"FF0000\", \"FFB0FF\", 0 }, // NUMBER\n\t{ 3, \"808080\", \"FFB0FF\", 0 }, // STRING\n\t{ 4, \"808080\", \"FFB0FF\", 0 }, // CHARACTER\n\t{ 5, \"0000FF\", \"FFB0FF\", 1 }, // KEYWORDS\n\t{ 6, \"FF8000\", \"FFB0FF\", 0 }, // TRIPLE\n\t{ 7, \"000000\", \"FFB0FF\", 0 }, // TRIPLEDOUBLE\n\t{ 8, \"000000\", \"FFB0FF\", 1 }, // CLASSNAME\n\t{ 9, \"FF00FF\", \"FFB0FF\", 0 }, // DEFNAME\n\t{ 10, \"000080\", \"FFB0FF\", 1 }, // OPERATOR\n\t{ 11, \"000000\", \"FFB0FF\", 0 }, // IDENTIFIER\n\t{ 12, \"008000\", \"FFB0FF\", 0 }, // COMMENTBLOCK\n\t{ 12, \"FFFF00\", \"FFB0FF\", 0 }, // STRINGEOL\n};\n\nstatic const lexstyle ruby_Hello_Kitty[] = {\n\t{ 0, \"000000\", \"FFB0FF\", 0 }, // DEFAULT\n\t{ 1, \"000000\", \"FFB0FF\", 0 }, // ERROR\n\t{ 2, \"008000\", \"FFB0FF\", 0 }, // COMMENTLINE\n\t{ 3, \"004000\", \"C0FFC0\", 0 }, // POD\n\t{ 4, \"FF8000\", \"FFB0FF\", 0 }, // NUMBER\n\t{ 5, \"0000FF\", \"FFB0FF\", 1 }, // INSTRUCTION\n\t{ 6, \"808080\", \"FFB0FF\", 0 }, // STRING\n\t{ 7, \"808000\", \"FFB0FF\", 0 }, // CHARACTER\n\t{ 8, \"0080C0\", \"FFB0FF\", 1 }, // CLASS NAME\n\t{ 9, \"8080FF\", \"FFFFCC\", 1 }, // DEF NAME\n\t{ 10, \"000080\", \"FFB0FF\", 1 }, // OPERATOR\n\t{ 11, \"000000\", \"FFB0FF\", 0 }, // IDENTIFIER\n\t{ 12, \"0080FF\", \"FFB0FF\", 0 }, // REGEX\n\t{ 13, \"000080\", \"FFB0FF\", 1 }, // GLOBAL\n\t{ 14, \"000000\", \"FFB0FF\", 0 }, // SYMBOL\n\t{ 15, \"804000\", \"FFB0FF\", 1 }, // MODULE NAME\n\t{ 16, \"000000\", \"FFB0FF\", 0 }, // INSTANCE VAR\n\t{ 17, \"000000\", \"FFB0FF\", 0 }, // CLASS VAR\n\t{ 18, \"FFFF00\", \"A08080\", 0 }, // BACKTICKS\n\t{ 19, \"600000\", \"FFF0D8\", 0 }, // DATA SECTION\n\t{ 24, \"808080\", \"FFB0FF\", 0 }, // STRING Q\n};\n\nstatic const lexstyle global_HotFudgeSundae[] = {\n\t{ 32, \"B7975D\", \"2b0f01\", 0 }, // Default Style\n\t{ 37, \"8B642B\", \"2b0f01\", 0 }, // Indent guideline style\n\t{ 34, \"2b0f01\", \"EC6221\", 1 }, // Brace highlight style\n\t{ 35, \"ff00ff\", \"2b0f01\", 0 }, // Bad brace colour\n\t{ 2069, \"faf1c6\", \"2b0f01\", 0 }, // Caret colour\n\t{ 33, \"8B642B\", \"43250b\", 0 }, // Line number margin\n\t{ 29, \"B7975D\", \"008947\", 0 }, // Smart HighLighting\n\t{ 31, \"B7975D\", \"7578DB\", 0 }, // Find Mark Style\n\t{ 25, \"B7975D\", \"C11418\", 0 }, // Mark Style 1\n\t{ 24, \"B7975D\", \"0088CE\", 0 }, // Mark Style 2\n\t{ 23, \"B7975D\", \"BCBB80\", 0 }, // Mark Style 3\n\t{ 22, \"B7975D\", \"42A658\", 0 }, // Mark Style 4\n\t{ 21, \"B7975D\", \"cfba28\", 0 }, // Mark Style 5\n\t{ 28, \"B7975D\", \"2b0f01\", 0 }, // Incremental highlight all\n\t{ 27, \"B7975D\", \"990000\", 0 }, // Tags match highlighting\n\t{ 26, \"B7975D\", \"3D0B0C\", 0 }, // Tags attribute\n};\n\n\nstatic const lexstyle cpp_HotFudgeSundae[] = {\n\t{ 9, \"C11418\", \"2b0f01\", 0 }, // PREPROCESSOR\n\t{ 11, \"B7975D\", \"2b0f01\", 0 }, // DEFAULT\n\t{ 5, \"42A658\", \"2b0f01\", 0 }, // INSTRUCTION WORD\n\t{ 16, \"cfba28\", \"2b0f01\", 0 }, // TYPE WORD\n\t{ 4, \"AFA7D6\", \"2b0f01\", 0 }, // NUMBER\n\t{ 6, \"BCBB80\", \"2b0f01\", 0 }, // STRING\n\t{ 7, \"BCBB80\", \"2b0f01\", 0 }, // CHARACTER\n\t{ 10, \"D6C479\", \"2b0f01\", 0 }, // OPERATOR\n\t{ 13, \"BCBB80\", \"2b0f01\", 0 }, // VERBATIM\n\t{ 14, \"0088CE\", \"2b0f01\", 0 }, // REGEX\n\t{ 1, \"255C08\", \"2b0f01\", 2 }, // COMMENT\n\t{ 2, \"255C08\", \"2b0f01\", 2 }, // COMMENT LINE\n\t{ 3, \"255C08\", \"2b0f01\", 2 }, // COMMENT DOC\n\t{ 15, \"255C08\", \"2b0f01\", 2 }, // COMMENT LINE DOC\n\t{ 17, \"255C08\", \"2b0f01\", 3 }, // COMMENT DOC KEYWORD\n\t{ 18, \"ff00ff\", \"2b0f01\", 3 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle java_HotFudgeSundae[] = {\n\t{ 9, \"C11418\", \"2b0f01\", 0 }, // PREPROCESSOR\n\t{ 11, \"B7975D\", \"2b0f01\", 0 }, // DEFAULT\n\t{ 5, \"42A658\", \"2b0f01\", 0 }, // INSTRUCTION WORD\n\t{ 16, \"cfba28\", \"2b0f01\", 0 }, // TYPE WORD\n\t{ 4, \"AFA7D6\", \"2b0f01\", 0 }, // NUMBER\n\t{ 6, \"BCBB80\", \"2b0f01\", 0 }, // STRING\n\t{ 7, \"BCBB80\", \"2b0f01\", 0 }, // CHARACTER\n\t{ 10, \"D6C479\", \"2b0f01\", 0 }, // OPERATOR\n\t{ 13, \"BCBB80\", \"2b0f01\", 0 }, // VERBATIM\n\t{ 14, \"0088CE\", \"2b0f01\", 0 }, // REGEX\n\t{ 1, \"255C08\", \"2b0f01\", 2 }, // COMMENT\n\t{ 2, \"255C08\", \"2b0f01\", 2 }, // COMMENT LINE\n\t{ 3, \"255C08\", \"2b0f01\", 2 }, // COMMENT DOC\n\t{ 15, \"255C08\", \"2b0f01\", 2 }, // COMMENT LINE DOC\n\t{ 17, \"0088CE\", \"2b0f01\", 3 }, // COMMENT DOC KEYWORD\n\t{ 18, \"ff00ff\", \"2b0f01\", 3 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle javascript_HotFudgeSundae[] = {\n\t{ 41, \"B7975D\", \"2b0f01\", 0 }, // DEFAULT\n\t{ 45, \"AFA7D6\", \"2b0f01\", 0 }, // NUMBER\n\t{ 46, \"cfba28\", \"2b0f01\", 0 }, // WORD\n\t{ 47, \"42A658\", \"2b0f01\", 0 }, // KEYWORD\n\t{ 48, \"BCBB80\", \"2b0f01\", 0 }, // DOUBLESTRING\n\t{ 49, \"BCBB80\", \"2b0f01\", 0 }, // SINGLESTRING\n\t{ 50, \"B7975D\", \"2b0f01\", 0 }, // SYMBOLS\n\t{ 51, \"C11418\", \"2b0f01\", 0 }, // STRINGEOL\n\t{ 52, \"0088CE\", \"2b0f01\", 0 }, // REGEX\n\t{ 42, \"255C08\", \"2b0f01\", 2 }, // COMMENT\n\t{ 43, \"255C08\", \"2b0f01\", 2 }, // COMMENTLINE\n\t{ 44, \"255C08\", \"2b0f01\", 2 }, // COMMENTDOC\n\t{ 17, \"0088CE\", \"2b0f01\", 3 }, // COMMENT DOC KEYWORD\n\t{ 18, \"ff00ff\", \"2b0f01\", 3 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle python_HotFudgeSundae[] = {\n\t{ 0, \"B7975D\", \"2b0f01\", 0 }, // DEFAULT\n\t{ 1, \"255C08\", \"2b0f01\", 2 }, // COMMENTLINE\n\t{ 2, \"AFA7D6\", \"2b0f01\", 0 }, // NUMBER\n\t{ 3, \"BCBB80\", \"2b0f01\", 0 }, // STRING\n\t{ 4, \"BCBB80\", \"2b0f01\", 0 }, // CHARACTER\n\t{ 5, \"42A658\", \"2b0f01\", 0 }, // KEYWORDS\n\t{ 6, \"BCBB80\", \"2b0f01\", 0 }, // TRIPLE\n\t{ 7, \"BCBB80\", \"2b0f01\", 0 }, // TRIPLEDOUBLE\n\t{ 8, \"d92b10\", \"2b0f01\", 0 }, // CLASSNAME\n\t{ 9, \"d92b10\", \"2b0f01\", 0 }, // DEFNAME\n\t{ 10, \"D6C479\", \"2b0f01\", 0 }, // OPERATOR\n\t{ 11, \"cfba28\", \"2b0f01\", 0 }, // IDENTIFIER\n\t{ 12, \"255C08\", \"2b0f01\", 2 }, // COMMENTBLOCK\n\t{ 12, \"255C08\", \"2b0f01\", 0 }, // STRINGEOL\n};\n\nstatic const lexstyle ruby_HotFudgeSundae[] = {\n\t{ 0, \"B7975D\", \"2b0f01\", 0 }, // DEFAULT\n\t{ 1, \"C11418\", \"2b0f01\", 0 }, // ERROR\n\t{ 2, \"255C08\", \"2b0f01\", 2 }, // COMMENTLINE\n\t{ 3, \"B7975D\", \"2b0f01\", 2 }, // POD\n\t{ 4, \"AFA7D6\", \"2b0f01\", 0 }, // NUMBER\n\t{ 5, \"42A658\", \"2b0f01\", 0 }, // INSTRUCTION\n\t{ 6, \"BCBB80\", \"2b0f01\", 0 }, // STRING\n\t{ 7, \"BCBB80\", \"2b0f01\", 0 }, // CHARACTER\n\t{ 8, \"cfba28\", \"2b0f01\", 0 }, // CLASS NAME\n\t{ 9, \"0088CE\", \"2b0f01\", 0 }, // DEF NAME\n\t{ 10, \"D6C479\", \"2b0f01\", 0 }, // OPERATOR\n\t{ 11, \"cfba28\", \"2b0f01\", 0 }, // IDENTIFIER\n\t{ 12, \"0088CE\", \"2b0f01\", 0 }, // REGEX\n\t{ 13, \"cfba28\", \"2b0f01\", 0 }, // GLOBAL\n\t{ 14, \"B7975D\", \"2b0f01\", 0 }, // SYMBOL\n\t{ 15, \"d92b10\", \"2b0f01\", 0 }, // MODULE NAME\n\t{ 16, \"cfba28\", \"2b0f01\", 0 }, // INSTANCE VAR\n\t{ 17, \"B7975D\", \"2b0f01\", 0 }, // CLASS VAR\n\t{ 18, \"98AE66\", \"602F1A\", 0 }, // BACKTICKS\n\t{ 19, \"BCBB80\", \"2b0f01\", 0 }, // DATA SECTION\n\t{ 24, \"BCBB80\", \"2b0f01\", 0 }, // STRING Q\n\t{ 25, \"0088CE\", \"2b0f01\", 0 }, // BOOLEAN\n};\n\nstatic const lexstyle global_Black_board[] = {\n\t{ 32, \"F8F8F8\", \"0C1021\", 0 }, // Default Style\n\t{ 37, \"888A85\", \"0C1021\", 0 }, // Indent guideline style\n\t{ 34, \"FCE94F\", \"0C1021\", 1 }, // Brace highlight style\n\t{ 35, \"EF2929\", \"0C1021\", 0 }, // Bad brace colour\n\t{ 2069, \"FFFFFF\", \"112435\", 0 }, // Caret colour\n\t{ 31, \"CC0000\", \"EDD400\", 0 }, // Find Mark Style\n\t{ 33, \"EEEEEC\", \"2E3436\", 0 }, // Line number margin\n\t{ 29, \"555753\", \"00FF00\", 0 }, // Smart HighLighting\n\t{ 31, \"FCAF3E\", \"FF0000\", 0 }, // Find Mark Style\n\t{ 25, \"F8F8F8\", \"00FFFF\", 0 }, // Mark Style 1\n\t{ 24, \"F8F8F8\", \"FF8000\", 0 }, // Mark Style 2\n\t{ 23, \"F8F8F8\", \"FFFF00\", 0 }, // Mark Style 3\n\t{ 22, \"F8F8F8\", \"8000FF\", 0 }, // Mark Style 4\n\t{ 21, \"F8F8F8\", \"008000\", 0 }, // Mark Style 5\n\t{ 28, \"FFCAB0\", \"0080FF\", 0 }, // Incremental highlight all\n\t{ 27, \"000000\", \"8000FF\", 0 }, // Tags match highlighting\n\t{ 26, \"8080C0\", \"FFFF00\", 0 }, // Tags attribute\n};\n\n\nstatic const lexstyle cpp_Black_board[] = {\n\t{ 9, \"FBDE2D\", \"0C1021\", 0 }, // PREPROCESSOR\n\t{ 11, \"F8F8F8\", \"0C1021\", 0 }, // DEFAULT\n\t{ 5, \"FBDE2D\", \"0C1021\", 0 }, // INSTRUCTION WORD\n\t{ 16, \"FBDE2D\", \"0C1021\", 0 }, // TYPE WORD\n\t{ 4, \"D8FA3C\", \"0C1021\", 0 }, // NUMBER\n\t{ 6, \"61CE3C\", \"0C1021\", 0 }, // STRING\n\t{ 7, \"61CE3C\", \"0C1021\", 0 }, // CHARACTER\n\t{ 10, \"FBDE2D\", \"0C1021\", 0 }, // OPERATOR\n\t{ 13, \"D8FA3C\", \"0C1021\", 0 }, // VERBATIM\n\t{ 14, \"61CE3C\", \"0C1021\", 0 }, // REGEX\n\t{ 1, \"AEAEAE\", \"0C1021\", 0 }, // COMMENT\n\t{ 2, \"AEAEAE\", \"0C1021\", 0 }, // COMMENT LINE\n\t{ 3, \"AEAEAE\", \"0C1021\", 0 }, // COMMENT DOC\n\t{ 15, \"AEAEAE\", \"0C1021\", 0 }, // COMMENT LINE DOC\n\t{ 17, \"AEAEAE\", \"0C1021\", 0 }, // COMMENT DOC KEYWORD\n\t{ 18, \"AEAEAE\", \"0C1021\", 0 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle java_Black_board[] = {\n\t{ 9, \"FBDE2D\", \"0C1021\", 0 }, // PREPROCESSOR\n\t{ 11, \"F8F8F8\", \"0C1021\", 0 }, // DEFAULT\n\t{ 5, \"FBDE2D\", \"0C1021\", 0 }, // INSTRUCTION WORD\n\t{ 16, \"FBDE2D\", \"0C1021\", 0 }, // TYPE WORD\n\t{ 4, \"D8FA3C\", \"0C1021\", 0 }, // NUMBER\n\t{ 6, \"61CE3C\", \"0C1021\", 0 }, // STRING\n\t{ 7, \"61CE3C\", \"0C1021\", 0 }, // CHARACTER\n\t{ 10, \"FBDE2D\", \"0C1021\", 0 }, // OPERATOR\n\t{ 13, \"D8FA3C\", \"0C1021\", 0 }, // VERBATIM\n\t{ 14, \"61CE3C\", \"0C1021\", 0 }, // REGEX\n\t{ 1, \"AEAEAE\", \"0C1021\", 0 }, // COMMENT\n\t{ 2, \"AEAEAE\", \"0C1021\", 0 }, // COMMENT LINE\n\t{ 3, \"AEAEAE\", \"0C1021\", 0 }, // COMMENT DOC\n\t{ 15, \"AEAEAE\", \"0C1021\", 0 }, // COMMENT LINE DOC\n\t{ 17, \"AEAEAE\", \"0C1021\", 0 }, // COMMENT DOC KEYWORD\n\t{ 18, \"AEAEAE\", \"0C1021\", 0 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle javascript_Black_board[] = {\n\t{ 41, \"F8F8F8\", \"0C1021\", 0 }, // DEFAULT\n\t{ 45, \"D8FA3C\", \"0C1021\", 0 }, // NUMBER\n\t{ 46, \"F8F8F8\", \"0C1021\", 0 }, // WORD\n\t{ 47, \"FBDE2D\", \"0C1021\", 0 }, // KEYWORD\n\t{ 48, \"61CE3C\", \"0C1021\", 0 }, // DOUBLESTRING\n\t{ 49, \"61CE3C\", \"0C1021\", 0 }, // SINGLESTRING\n\t{ 50, \"F8F8F8\", \"0C1021\", 0 }, // SYMBOLS\n\t{ 51, \"61CE3C\", \"0C1021\", 0 }, // STRINGEOL\n\t{ 52, \"61CE3C\", \"0C1021\", 0 }, // REGEX\n\t{ 42, \"AEAEAE\", \"0C1021\", 0 }, // COMMENT\n\t{ 43, \"AEAEAE\", \"0C1021\", 0 }, // COMMENTLINE\n\t{ 44, \"AEAEAE\", \"0C1021\", 0 }, // COMMENTDOC\n};\n\nstatic const lexstyle python_Black_board[] = {\n\t{ 0, \"F8F8F8\", \"0C1021\", 0 }, // DEFAULT\n\t{ 1, \"AEAEAE\", \"0C1021\", 0 }, // COMMENTLINE\n\t{ 2, \"D8FA3C\", \"0C1021\", 0 }, // NUMBER\n\t{ 3, \"61CE3C\", \"0C1021\", 0 }, // STRING\n\t{ 4, \"61CE3C\", \"0C1021\", 0 }, // CHARACTER\n\t{ 5, \"FBDE2D\", \"0C1021\", 0 }, // KEYWORDS\n\t{ 6, \"000000\", \"0C1021\", 0 }, // TRIPLE\n\t{ 7, \"000000\", \"0C1021\", 0 }, // TRIPLEDOUBLE\n\t{ 8, \"000000\", \"0C1021\", 0 }, // CLASSNAME\n\t{ 9, \"000000\", \"0C1021\", 0 }, // DEFNAME\n\t{ 10, \"FBDE2D\", \"0C1021\", 0 }, // OPERATOR\n\t{ 11, \"8DA6CE\", \"0C1021\", 0 }, // IDENTIFIER\n\t{ 12, \"AEAEAE\", \"0C1021\", 0 }, // COMMENTBLOCK\n\t{ 12, \"61CE3C\", \"0C1021\", 0 }, // STRINGEOL\n};\n\nstatic const lexstyle ruby_Black_board[] = {\n\t{ 0, \"F8F8F8\", \"0C1021\", 0 }, // DEFAULT\n\t{ 1, \"000000\", \"0C1021\", 0 }, // ERROR\n\t{ 2, \"AEAEAE\", \"0C1021\", 0 }, // COMMENTLINE\n\t{ 3, \"000000\", \"0C1021\", 0 }, // POD\n\t{ 4, \"D8FA3C\", \"0C1021\", 0 }, // NUMBER\n\t{ 5, \"FBDE2D\", \"0C1021\", 0 }, // INSTRUCTION\n\t{ 6, \"61CE3C\", \"0C1021\", 0 }, // STRING\n\t{ 7, \"61CE3C\", \"0C1021\", 0 }, // CHARACTER\n\t{ 8, \"FF6400\", \"0C1021\", 0 }, // CLASS NAME\n\t{ 9, \"FF6400\", \"0C1021\", 0 }, // DEF NAME\n\t{ 10, \"FBDE2D\", \"0C1021\", 0 }, // OPERATOR\n\t{ 11, \"8DA6CE\", \"0C1021\", 0 }, // IDENTIFIER\n\t{ 12, \"61CE3C\", \"0C1021\", 0 }, // REGEX\n\t{ 13, \"F8F8F8\", \"0C1021\", 0 }, // GLOBAL\n\t{ 14, \"F8F8F8\", \"0C1021\", 0 }, // SYMBOL\n\t{ 15, \"000000\", \"0C1021\", 0 }, // MODULE NAME\n\t{ 16, \"F8F8F8\", \"0C1021\", 0 }, // INSTANCE VAR\n\t{ 17, \"000000\", \"0C1021\", 0 }, // CLASS VAR\n\t{ 18, \"000000\", \"0C1021\", 0 }, // BACKTICKS\n\t{ 19, \"000000\", \"0C1021\", 0 }, // DATA SECTION\n\t{ 24, \"61CE3C\", \"0C1021\", 0 }, // STRING Q\n};\n\nstatic const lexstyle global_MossyLawn[] = {\n\t{ 32, \"f2c476\", \"6c7d51\", 0 }, // Default Style\n\t{ 37, \"003709\", \"6c7d51\", 0 }, // Indent guideline style\n\t{ 34, \"561e0f\", \"9ece3c\", 1 }, // Brace highlight style\n\t{ 35, \"981f0e\", \"6c7d51\", 0 }, // Bad brace colour\n\t{ 2069, \"ffc973\", \"6c7d51\", 0 }, // Caret colour\n\t{ 33, \"603d13\", \"7e8a28\", 0 }, // Line number margin\n\t{ 29, \"f2c476\", \"bf8830\", 0 }, // Smart HighLighting\n\t{ 31, \"f2c476\", \"6a1a01\", 0 }, // Find Mark Style\n\t{ 25, \"f2c476\", \"fdd64a\", 0 }, // Mark Style 1\n\t{ 24, \"f2c476\", \"afcf90\", 0 }, // Mark Style 2\n\t{ 23, \"f2c476\", \"ffdc87\", 0 }, // Mark Style 3\n\t{ 22, \"f2c476\", \"cbe248\", 0 }, // Mark Style 4\n\t{ 21, \"f2c476\", \"8abbe4\", 0 }, // Mark Style 5\n\t{ 28, \"f2c476\", \"6a1a01\", 0 }, // Incremental highlight all\n\t{ 27, \"f2c476\", \"92983e\", 0 }, // Tags match highlighting\n\t{ 26, \"f2c476\", \"dab57e\", 0 }, // Tags attribute\n};\n\n\nstatic const lexstyle cpp_MossyLawn[] = {\n\t{ 9, \"a32129\", \"6c7d51\", 0 }, // PREPROCESSOR\n\t{ 11, \"f2c476\", \"6c7d51\", 0 }, // DEFAULT\n\t{ 5, \"cbe248\", \"6c7d51\", 0 }, // INSTRUCTION WORD\n\t{ 16, \"efc53d\", \"6c7d51\", 0 }, // TYPE WORD\n\t{ 4, \"ffdc87\", \"6c7d51\", 0 }, // NUMBER\n\t{ 6, \"ffdc87\", \"6c7d51\", 0 }, // STRING\n\t{ 7, \"ffdc87\", \"6c7d51\", 0 }, // CHARACTER\n\t{ 10, \"ffee88\", \"6c7d51\", 1 }, // OPERATOR\n\t{ 13, \"ffdc87\", \"6c7d51\", 0 }, // VERBATIM\n\t{ 14, \"afcf90\", \"6c7d51\", 0 }, // REGEX\n\t{ 1, \"2a390e\", \"6c7d51\", 2 }, // COMMENT\n\t{ 2, \"2a390e\", \"6c7d51\", 2 }, // COMMENT LINE\n\t{ 3, \"2a390e\", \"6c7d51\", 2 }, // COMMENT DOC\n\t{ 15, \"2a390e\", \"6c7d51\", 2 }, // COMMENT LINE DOC\n\t{ 17, \"2a390e\", \"6c7d51\", 3 }, // COMMENT DOC KEYWORD\n\t{ 18, \"981f0e\", \"fdd64a\", 3 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle java_MossyLawn[] = {\n\t{ 9, \"a32129\", \"6c7d51\", 0 }, // PREPROCESSOR\n\t{ 11, \"f2c476\", \"6c7d51\", 0 }, // DEFAULT\n\t{ 5, \"cbe248\", \"6c7d51\", 0 }, // INSTRUCTION WORD\n\t{ 16, \"efc53d\", \"6c7d51\", 0 }, // TYPE WORD\n\t{ 4, \"ffdc87\", \"6c7d51\", 0 }, // NUMBER\n\t{ 6, \"ffdc87\", \"6c7d51\", 0 }, // STRING\n\t{ 7, \"ffdc87\", \"6c7d51\", 0 }, // CHARACTER\n\t{ 10, \"ffee88\", \"6c7d51\", 1 }, // OPERATOR\n\t{ 13, \"ffdc87\", \"6c7d51\", 0 }, // VERBATIM\n\t{ 14, \"afcf90\", \"6c7d51\", 0 }, // REGEX\n\t{ 1, \"2a390e\", \"6c7d51\", 2 }, // COMMENT\n\t{ 2, \"2a390e\", \"6c7d51\", 2 }, // COMMENT LINE\n\t{ 3, \"2a390e\", \"6c7d51\", 2 }, // COMMENT DOC\n\t{ 15, \"2a390e\", \"6c7d51\", 2 }, // COMMENT LINE DOC\n\t{ 17, \"afcf90\", \"6c7d51\", 3 }, // COMMENT DOC KEYWORD\n\t{ 18, \"981f0e\", \"fdd64a\", 3 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle javascript_MossyLawn[] = {\n\t{ 41, \"f2c476\", \"6c7d51\", 0 }, // DEFAULT\n\t{ 45, \"ffdc87\", \"6c7d51\", 0 }, // NUMBER\n\t{ 46, \"efc53d\", \"6c7d51\", 0 }, // WORD\n\t{ 47, \"cbe248\", \"6c7d51\", 0 }, // KEYWORD\n\t{ 48, \"ffdc87\", \"6c7d51\", 0 }, // DOUBLESTRING\n\t{ 49, \"ffdc87\", \"6c7d51\", 0 }, // SINGLESTRING\n\t{ 50, \"f2c476\", \"6c7d51\", 0 }, // SYMBOLS\n\t{ 51, \"a32129\", \"6c7d51\", 0 }, // STRINGEOL\n\t{ 52, \"afcf90\", \"6c7d51\", 0 }, // REGEX\n\t{ 42, \"2a390e\", \"6c7d51\", 2 }, // COMMENT\n\t{ 43, \"2a390e\", \"6c7d51\", 2 }, // COMMENTLINE\n\t{ 44, \"2a390e\", \"6c7d51\", 2 }, // COMMENTDOC\n\t{ 17, \"afcf90\", \"6c7d51\", 3 }, // COMMENT DOC KEYWORD\n\t{ 18, \"981f0e\", \"fdd64a\", 3 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle python_MossyLawn[] = {\n\t{ 0, \"f2c476\", \"6c7d51\", 0 }, // DEFAULT\n\t{ 1, \"2a390e\", \"6c7d51\", 2 }, // COMMENTLINE\n\t{ 2, \"ffdc87\", \"6c7d51\", 0 }, // NUMBER\n\t{ 3, \"ffdc87\", \"6c7d51\", 0 }, // STRING\n\t{ 4, \"ffdc87\", \"6c7d51\", 0 }, // CHARACTER\n\t{ 5, \"cbe248\", \"6c7d51\", 0 }, // KEYWORDS\n\t{ 6, \"ffdc87\", \"6c7d51\", 0 }, // TRIPLE\n\t{ 7, \"ffdc87\", \"6c7d51\", 0 }, // TRIPLEDOUBLE\n\t{ 8, \"a32129\", \"6c7d51\", 0 }, // CLASSNAME\n\t{ 9, \"a32129\", \"6c7d51\", 0 }, // DEFNAME\n\t{ 10, \"ffee88\", \"6c7d51\", 1 }, // OPERATOR\n\t{ 11, \"efc53d\", \"6c7d51\", 0 }, // IDENTIFIER\n\t{ 12, \"2a390e\", \"6c7d51\", 2 }, // COMMENTBLOCK\n\t{ 12, \"2a390e\", \"6c7d51\", 0 }, // STRINGEOL\n};\n\nstatic const lexstyle ruby_MossyLawn[] = {\n\t{ 0, \"f2c476\", \"6c7d51\", 0 }, // DEFAULT\n\t{ 1, \"a32129\", \"6c7d51\", 0 }, // ERROR\n\t{ 2, \"2a390e\", \"6c7d51\", 2 }, // COMMENTLINE\n\t{ 3, \"f2c476\", \"6c7d51\", 2 }, // POD\n\t{ 4, \"ffdc87\", \"6c7d51\", 0 }, // NUMBER\n\t{ 5, \"cbe248\", \"6c7d51\", 0 }, // INSTRUCTION\n\t{ 6, \"ffdc87\", \"6c7d51\", 0 }, // STRING\n\t{ 7, \"ffdc87\", \"6c7d51\", 0 }, // CHARACTER\n\t{ 8, \"efc53d\", \"6c7d51\", 0 }, // CLASS NAME\n\t{ 9, \"afcf90\", \"6c7d51\", 0 }, // DEF NAME\n\t{ 10, \"ffee88\", \"6c7d51\", 1 }, // OPERATOR\n\t{ 11, \"efc53d\", \"6c7d51\", 0 }, // IDENTIFIER\n\t{ 12, \"afcf90\", \"6c7d51\", 0 }, // REGEX\n\t{ 13, \"efc53d\", \"6c7d51\", 0 }, // GLOBAL\n\t{ 14, \"f2c476\", \"6c7d51\", 0 }, // SYMBOL\n\t{ 15, \"a32129\", \"6c7d51\", 0 }, // MODULE NAME\n\t{ 16, \"efc53d\", \"6c7d51\", 0 }, // INSTANCE VAR\n\t{ 17, \"f2c476\", \"6c7d51\", 0 }, // CLASS VAR\n\t{ 18, \"bfb8c4\", \"7e8a28\", 0 }, // BACKTICKS\n\t{ 19, \"ffdc87\", \"6c7d51\", 0 }, // DATA SECTION\n\t{ 24, \"ffdc87\", \"6c7d51\", 0 }, // STRING Q\n\t{ 25, \"afcf90\", \"6c7d51\", 0 }, // BOOLEAN\n};\n\nstatic const lexstyle global_Obsidian[] = {\n\t{ 32, \"E0E2E4\", \"293134\", 0 }, // Default Style\n\t{ 37, \"394448\", \"293134\", 0 }, // Indent guideline style\n\t{ 34, \"F3DB2E\", \"293134\", 1 }, // Brace highlight style\n\t{ 35, \"FB0000\", \"293134\", 0 }, // Bad brace colour\n\t{ 2069, \"C1CBD2\", \"6699CC\", 0 }, // Caret colour\n\t{ 33, \"81969A\", \"3F4B4E\", 0 }, // Line number margin\n\t{ 29, \"222222\", \"56676D\", 0 }, // Smart HighLighting\n\t{ 31, \"E0E2E4\", \"6B8189\", 1 }, // Find Mark Style\n\t{ 25, \"E0E2E4\", \"00659B\", 0 }, // Mark Style 1\n\t{ 24, \"E0E2E4\", \"00880B\", 0 }, // Mark Style 2\n\t{ 23, \"E0E2E4\", \"A6AA00\", 0 }, // Mark Style 3\n\t{ 22, \"E0E2E4\", \"8A0B0B\", 0 }, // Mark Style 4\n\t{ 21, \"E0E2E4\", \"44116F\", 0 }, // Mark Style 5\n\t{ 28, \"FFFF80\", \"0080FF\", 0 }, // Incremental highlight all\n\t{ 27, \"E0E2E4\", \"4D5C62\", 0 }, // Tags match highlighting\n\t{ 26, \"FFCAB0\", \"93975E\", 0 }, // Tags attribute\n};\n\n\nstatic const lexstyle cpp_Obsidian[] = {\n\t{ 9, \"A082BD\", \"293134\", 0 }, // PREPROCESSOR\n\t{ 11, \"E0E2E4\", \"293134\", 0 }, // DEFAULT\n\t{ 5, \"93C763\", \"293134\", 1 }, // INSTRUCTION WORD\n\t{ 16, \"678CB1\", \"293134\", 0 }, // TYPE WORD\n\t{ 4, \"FFCD22\", \"293134\", 0 }, // NUMBER\n\t{ 6, \"EC7600\", \"293134\", 0 }, // STRING\n\t{ 7, \"FF8409\", \"293134\", 0 }, // CHARACTER\n\t{ 10, \"E8E2B7\", \"293134\", 0 }, // OPERATOR\n\t{ 13, \"E0E2E4\", \"293134\", 0 }, // VERBATIM\n\t{ 14, \"D39745\", \"293134\", 0 }, // REGEX\n\t{ 1, \"66747B\", \"293134\", 0 }, // COMMENT\n\t{ 2, \"66747B\", \"293134\", 0 }, // COMMENT LINE\n\t{ 3, \"6C788C\", \"293134\", 0 }, // COMMENT DOC\n\t{ 15, \"6C788C\", \"293134\", 0 }, // COMMENT LINE DOC\n\t{ 17, \"6C788C\", \"293134\", 1 }, // COMMENT DOC KEYWORD\n\t{ 18, \"6C788C\", \"293134\", 1 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle java_Obsidian[] = {\n\t{ 9, \"A082BD\", \"293134\", 0 }, // PREPROCESSOR\n\t{ 11, \"E0E2E4\", \"293134\", 0 }, // DEFAULT\n\t{ 5, \"93C763\", \"293134\", 1 }, // INSTRUCTION WORD\n\t{ 16, \"678CB1\", \"293134\", 0 }, // TYPE WORD\n\t{ 4, \"FFCD22\", \"293134\", 0 }, // NUMBER\n\t{ 6, \"EC7600\", \"293134\", 0 }, // STRING\n\t{ 7, \"FF8409\", \"293134\", 0 }, // CHARACTER\n\t{ 10, \"E8E2B7\", \"293134\", 0 }, // OPERATOR\n\t{ 13, \"E0E2E4\", \"293134\", 0 }, // VERBATIM\n\t{ 14, \"D39745\", \"293134\", 0 }, // REGEX\n\t{ 1, \"66747B\", \"293134\", 0 }, // COMMENT\n\t{ 2, \"66747B\", \"293134\", 0 }, // COMMENT LINE\n\t{ 3, \"6C788C\", \"293134\", 0 }, // COMMENT DOC\n\t{ 15, \"6C788C\", \"293134\", 0 }, // COMMENT LINE DOC\n\t{ 17, \"6C788C\", \"293134\", 1 }, // COMMENT DOC KEYWORD\n\t{ 18, \"6C788C\", \"293134\", 1 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle javascript_Obsidian[] = {\n\t{ 41, \"E0E2E4\", \"293134\", 0 }, // DEFAULT\n\t{ 45, \"FFCD22\", \"293134\", 0 }, // NUMBER\n\t{ 46, \"E0E2E4\", \"293134\", 0 }, // WORD\n\t{ 47, \"93C763\", \"293134\", 1 }, // KEYWORD\n\t{ 48, \"EC7600\", \"293134\", 0 }, // DOUBLESTRING\n\t{ 49, \"EC7600\", \"293134\", 0 }, // SINGLESTRING\n\t{ 50, \"E8E2B7\", \"293134\", 0 }, // SYMBOLS\n\t{ 51, \"E0E2E4\", \"293134\", 0 }, // STRINGEOL\n\t{ 52, \"D39745\", \"293134\", 0 }, // REGEX\n\t{ 42, \"818E96\", \"293134\", 0 }, // COMMENT\n\t{ 43, \"818E96\", \"293134\", 0 }, // COMMENTLINE\n\t{ 44, \"6C788C\", \"293134\", 0 }, // COMMENTDOC\n};\n\nstatic const lexstyle python_Obsidian[] = {\n\t{ 0, \"E0E2E4\", \"293134\", 0 }, // DEFAULT\n\t{ 1, \"66747B\", \"293134\", 0 }, // COMMENTLINE\n\t{ 2, \"FFCD22\", \"293134\", 0 }, // NUMBER\n\t{ 3, \"EC7600\", \"293134\", 0 }, // STRING\n\t{ 4, \"FF8409\", \"293134\", 0 }, // CHARACTER\n\t{ 5, \"93C763\", \"293134\", 1 }, // KEYWORDS\n\t{ 6, \"66747B\", \"293134\", 0 }, // TRIPLE\n\t{ 7, \"66747B\", \"293134\", 0 }, // TRIPLEDOUBLE\n\t{ 8, \"A082BD\", \"293134\", 1 }, // CLASSNAME\n\t{ 9, \"678CB1\", \"293134\", 1 }, // DEFNAME\n\t{ 10, \"E8E2B7\", \"293134\", 0 }, // OPERATOR\n\t{ 11, \"E0E2E4\", \"293134\", 0 }, // IDENTIFIER\n\t{ 12, \"66747B\", \"293134\", 0 }, // COMMENTBLOCK\n\t{ 12, \"E0E2E4\", \"293134\", 0 }, // STRINGEOL\n};\n\nstatic const lexstyle ruby_Obsidian[] = {\n\t{ 0, \"E0E2E4\", \"293134\", 0 }, // DEFAULT\n\t{ 1, \"E0E2E4\", \"293134\", 0 }, // ERROR\n\t{ 2, \"66747B\", \"293134\", 0 }, // COMMENTLINE\n\t{ 3, \"E0E2E4\", \"293134\", 0 }, // POD\n\t{ 4, \"FFCD22\", \"293134\", 0 }, // NUMBER\n\t{ 5, \"93C763\", \"293134\", 1 }, // INSTRUCTION\n\t{ 6, \"EC7600\", \"293134\", 0 }, // STRING\n\t{ 7, \"FF8409\", \"293134\", 0 }, // CHARACTER\n\t{ 8, \"A082BD\", \"293134\", 1 }, // CLASS NAME\n\t{ 9, \"678CB1\", \"293134\", 1 }, // DEF NAME\n\t{ 10, \"E8E2B7\", \"293134\", 0 }, // OPERATOR\n\t{ 11, \"E0E2E4\", \"293134\", 0 }, // IDENTIFIER\n\t{ 12, \"D39745\", \"293134\", 0 }, // REGEX\n\t{ 13, \"E0E2E4\", \"293134\", 0 }, // GLOBAL\n\t{ 14, \"E0E2E4\", \"293134\", 0 }, // SYMBOL\n\t{ 15, \"E0E2E4\", \"293134\", 0 }, // MODULE NAME\n\t{ 16, \"B6C8DA\", \"293134\", 0 }, // INSTANCE VAR\n\t{ 17, \"E0E2E4\", \"293134\", 0 }, // CLASS VAR\n\t{ 18, \"E0E2E4\", \"293134\", 0 }, // BACKTICKS\n\t{ 19, \"E0E2E4\", \"293134\", 0 }, // DATA SECTION\n\t{ 24, \"E0E2E4\", \"293134\", 0 }, // STRING Q\n};\n\nstatic const lexstyle global_Eclipse_Default[] = {\n\t{ 32, \"000000\", \"FFFFFF\", 0 }, // Default Style\n\t{ 37, \"C0C0C0\", \"FFFFFF\", 0 }, // Indent guideline style\n\t{ 34, \"FF0000\", \"FFFFFF\", 1 }, // Brace highlight style\n\t{ 35, \"800000\", \"FFFFFF\", 1 }, // Bad brace colour\n\t{ 2069, \"000000\", \"FFFFFF\", 0 }, // Caret colour\n\t{ 33, \"808080\", \"E4E4E4\", 0 }, // Line number margin\n\t{ 29, \"000000\", \"A3A3A3\", 0 }, // Smart HighLighting\n\t{ 31, \"000000\", \"FF0000\", 0 }, // Find Mark Style\n\t{ 28, \"000000\", \"FFFF00\", 0 }, // Incremental highlight all\n\t{ 27, \"000000\", \"FFFF00\", 0 }, // Tags match highlighting\n\t{ 26, \"000000\", \"FFFFFF\", 0 }, // Tags attribute\n};\n\n\nstatic const lexstyle cpp_Eclipse_Default[] = {\n\t{ 9, \"7F7F9F\", \"FFFFFF\", 1 }, // PREPROCESSOR\n\t{ 11, \"000000\", \"FFFFFF\", 0 }, // DEFAULT\n\t{ 5, \"7F0055\", \"FFFFFF\", 1 }, // INSTRUCTION WORD\n\t{ 16, \"7F0055\", \"FFFFFF\", 1 }, // TYPE WORD\n\t{ 4, \"000000\", \"FFFFFF\", 0 }, // NUMBER\n\t{ 6, \"2A00FF\", \"FFFFFF\", 0 }, // STRING\n\t{ 7, \"2A00FF\", \"FFFFFF\", 0 }, // CHARACTER\n\t{ 10, \"000000\", \"FFFFFF\", 0 }, // OPERATOR\n\t{ 13, \"646464\", \"FFFFFF\", 0 }, // VERBATIM\n\t{ 14, \"646464\", \"FFFFFF\", 0 }, // REGEX\n\t{ 1, \"3F7F5F\", \"FFFFFF\", 0 }, // COMMENT\n\t{ 2, \"3F7F5F\", \"FFFFFF\", 0 }, // COMMENT LINE\n\t{ 3, \"3F5FBF\", \"FFFFFF\", 0 }, // COMMENT DOC\n\t{ 15, \"3F5FBF\", \"FFFFFF\", 0 }, // COMMENT LINE DOC\n\t{ 17, \"7F9FBF\", \"FFFFFF\", 1 }, // COMMENT DOC KEYWORD\n\t{ 18, \"7F9FBF\", \"FFFFFF\", 1 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle java_Eclipse_Default[] = {\n\t{ 9, \"7F7F9F\", \"FFFFFF\", 1 }, // PREPROCESSOR\n\t{ 11, \"000000\", \"FFFFFF\", 0 }, // DEFAULT\n\t{ 5, \"7F0055\", \"FFFFFF\", 1 }, // INSTRUCTION WORD\n\t{ 16, \"7F0055\", \"FFFFFF\", 1 }, // TYPE WORD\n\t{ 4, \"000000\", \"FFFFFF\", 0 }, // NUMBER\n\t{ 6, \"2A00FF\", \"FFFFFF\", 0 }, // STRING\n\t{ 7, \"2A00FF\", \"FFFFFF\", 0 }, // CHARACTER\n\t{ 10, \"000000\", \"FFFFFF\", 0 }, // OPERATOR\n\t{ 13, \"646464\", \"FFFFFF\", 0 }, // VERBATIM\n\t{ 14, \"646464\", \"FFFFFF\", 0 }, // REGEX\n\t{ 1, \"3F7F5F\", \"FFFFFF\", 0 }, // COMMENT\n\t{ 2, \"3F7F5F\", \"FFFFFF\", 0 }, // COMMENT LINE\n\t{ 3, \"3F5FBF\", \"FFFFFF\", 0 }, // COMMENT DOC\n\t{ 15, \"3F5FBF\", \"FFFFFF\", 0 }, // COMMENT LINE DOC\n\t{ 17, \"7F9FBF\", \"FFFFFF\", 1 }, // COMMENT DOC KEYWORD\n\t{ 18, \"7F9FBF\", \"FFFFFF\", 1 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle javascript_Eclipse_Default[] = {\n\t{ 41, \"000000\", \"FFFFFF\", 0 }, // DEFAULT\n\t{ 45, \"000000\", \"FFFFFF\", 0 }, // NUMBER\n\t{ 46, \"000000\", \"FFFFFF\", 0 }, // WORD\n\t{ 47, \"7F0055\", \"FFFFFF\", 1 }, // KEYWORD\n\t{ 48, \"2A00FF\", \"FFFFFF\", 0 }, // DOUBLESTRING\n\t{ 49, \"2A00FF\", \"FFFFFF\", 0 }, // SINGLESTRING\n\t{ 50, \"000000\", \"FFFFFF\", 0 }, // SYMBOLS\n\t{ 51, \"2A00FF\", \"FFFFFF\", 0 }, // STRINGEOL\n\t{ 52, \"646464\", \"FFFFFF\", 0 }, // REGEX\n\t{ 42, \"3F7F5F\", \"FFFFFF\", 0 }, // COMMENT\n\t{ 43, \"3F7F5F\", \"FFFFFF\", 0 }, // COMMENTLINE\n\t{ 44, \"3F5FBF\", \"FFFFFF\", 0 }, // COMMENTDOC\n};\n\nstatic const lexstyle python_Eclipse_Default[] = {\n\t{ 0, \"000000\", \"FFFFFF\", 0 }, // DEFAULT\n\t{ 1, \"3F7F5F\", \"FFFFFF\", 0 }, // COMMENTLINE\n\t{ 2, \"000000\", \"FFFFFF\", 0 }, // NUMBER\n\t{ 3, \"2A00FF\", \"FFFFFF\", 0 }, // STRING\n\t{ 4, \"2A00FF\", \"FFFFFF\", 0 }, // CHARACTER\n\t{ 5, \"7F0055\", \"FFFFFF\", 1 }, // KEYWORDS\n\t{ 6, \"646464\", \"FFFFFF\", 0 }, // TRIPLE\n\t{ 7, \"000000\", \"FFFFFF\", 0 }, // TRIPLEDOUBLE\n\t{ 8, \"000000\", \"FFFFFF\", 0 }, // CLASSNAME\n\t{ 9, \"3F5FBF\", \"FFFFFF\", 1 }, // DEFNAME\n\t{ 10, \"000000\", \"FFFFFF\", 0 }, // OPERATOR\n\t{ 11, \"000000\", \"FFFFFF\", 0 }, // IDENTIFIER\n\t{ 12, \"3F7F5F\", \"FFFFFF\", 0 }, // COMMENTBLOCK\n\t{ 12, \"2A00FF\", \"FFFFFF\", 0 }, // STRINGEOL\n};\n\nstatic const lexstyle ruby_Eclipse_Default[] = {\n\t{ 0, \"000000\", \"FFFFFF\", 0 }, // DEFAULT\n\t{ 1, \"FF0000\", \"FFFFFF\", 0 }, // ERROR\n\t{ 2, \"3F7F5F\", \"FFFFFF\", 0 }, // COMMENTLINE\n\t{ 3, \"000000\", \"FFFFFF\", 0 }, // POD\n\t{ 4, \"000000\", \"FFFFFF\", 0 }, // NUMBER\n\t{ 5, \"7F0055\", \"FFFFFF\", 1 }, // INSTRUCTION\n\t{ 6, \"2A00FF\", \"FFFFFF\", 0 }, // STRING\n\t{ 7, \"2A00FF\", \"FFFFFF\", 0 }, // CHARACTER\n\t{ 8, \"000000\", \"FFFFFF\", 0 }, // CLASS NAME\n\t{ 9, \"3F5FBF\", \"FFFFFF\", 1 }, // DEF NAME\n\t{ 10, \"000000\", \"FFFFFF\", 0 }, // OPERATOR\n\t{ 11, \"000000\", \"FFFFFF\", 0 }, // IDENTIFIER\n\t{ 12, \"646464\", \"FFFFFF\", 0 }, // REGEX\n\t{ 13, \"0000C0\", \"FFFFFF\", 0 }, // GLOBAL\n\t{ 14, \"000000\", \"FFFFFF\", 0 }, // SYMBOL\n\t{ 15, \"7F7F9F\", \"FFFFFF\", 1 }, // MODULE NAME\n\t{ 16, \"000000\", \"FFFFFF\", 0 }, // INSTANCE VAR\n\t{ 17, \"000000\", \"FFFFFF\", 0 }, // CLASS VAR\n\t{ 18, \"000000\", \"FFFFFF\", 0 }, // BACKTICKS\n\t{ 19, \"646464\", \"FFFFFF\", 0 }, // DATA SECTION\n\t{ 24, \"2A00FF\", \"FFFFFF\", 0 }, // STRING Q\n};\n\nstatic const lexstyle global_Navajo[] = {\n\t{ 32, \"000000\", \"BA9C80\", 0 }, // Default Style\n\t{ 37, \"181880\", \"BA9C80\", 0 }, // Indent guideline style\n\t{ 34, \"000000\", \"00FFFF\", 1 }, // Brace highlight style\n\t{ 35, \"BCBCBC\", \"5F0000\", 0 }, // Bad brace colour\n\t{ 2069, \"FFFFFF\", \"BA9C80\", 0 }, // Caret colour\n\t{ 33, \"000000\", \"808080\", 0 }, // Line number margin\n\t{ 29, \"000000\", \"BCBCBC\", 0 }, // Smart HighLighting\n\t{ 31, \"000000\", \"3b4092\", 0 }, // Find Mark Style\n\t{ 25, \"000000\", \"870087\", 0 }, // Mark Style 1\n\t{ 24, \"000000\", \"C00058\", 0 }, // Mark Style 2\n\t{ 23, \"000000\", \"181880\", 0 }, // Mark Style 3\n\t{ 22, \"000000\", \"804040\", 0 }, // Mark Style 4\n\t{ 21, \"000000\", \"106060\", 0 }, // Mark Style 5\n\t{ 28, \"000000\", \"BA9C80\", 0 }, // Incremental highlight all\n\t{ 27, \"000000\", \"D92B10\", 0 }, // Tags match highlighting\n\t{ 26, \"000000\", \"D92B10\", 0 }, // Tags attribute\n};\n\n\nstatic const lexstyle cpp_Navajo[] = {\n\t{ 9, \"870087\", \"BA9C80\", 0 }, // PREPROCESSOR\n\t{ 11, \"000000\", \"BA9C80\", 0 }, // DEFAULT\n\t{ 5, \"804040\", \"BA9C80\", 0 }, // INSTRUCTION WORD\n\t{ 16, \"1E8B47\", \"BA9C80\", 0 }, // TYPE WORD\n\t{ 4, \"C00058\", \"BA9C80\", 0 }, // NUMBER\n\t{ 6, \"C00058\", \"BA9C80\", 0 }, // STRING\n\t{ 7, \"C00058\", \"BA9C80\", 0 }, // CHARACTER\n\t{ 10, \"010101\", \"BA9C80\", 1 }, // OPERATOR\n\t{ 13, \"C00058\", \"BA9C80\", 0 }, // VERBATIM\n\t{ 14, \"C00058\", \"BA9C80\", 0 }, // REGEX\n\t{ 1, \"181880\", \"BA9C80\", 2 }, // COMMENT\n\t{ 2, \"181880\", \"BA9C80\", 2 }, // COMMENT LINE\n\t{ 3, \"181880\", \"BA9C80\", 2 }, // COMMENT DOC\n\t{ 15, \"181880\", \"BA9C80\", 2 }, // COMMENT LINE DOC\n\t{ 17, \"181880\", \"BA9C80\", 3 }, // COMMENT DOC KEYWORD\n\t{ 18, \"BCBCBC\", \"5F0000\", 3 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle java_Navajo[] = {\n\t{ 9, \"870087\", \"BA9C80\", 0 }, // PREPROCESSOR\n\t{ 11, \"000000\", \"BA9C80\", 0 }, // DEFAULT\n\t{ 5, \"804040\", \"BA9C80\", 0 }, // INSTRUCTION WORD\n\t{ 16, \"1E8B47\", \"BA9C80\", 0 }, // TYPE WORD\n\t{ 4, \"C00058\", \"BA9C80\", 0 }, // NUMBER\n\t{ 6, \"C00058\", \"BA9C80\", 0 }, // STRING\n\t{ 7, \"C00058\", \"BA9C80\", 0 }, // CHARACTER\n\t{ 10, \"010101\", \"BA9C80\", 1 }, // OPERATOR\n\t{ 13, \"C00058\", \"BA9C80\", 0 }, // VERBATIM\n\t{ 14, \"C00058\", \"BA9C80\", 0 }, // REGEX\n\t{ 1, \"181880\", \"BA9C80\", 2 }, // COMMENT\n\t{ 2, \"181880\", \"BA9C80\", 2 }, // COMMENT LINE\n\t{ 3, \"181880\", \"BA9C80\", 2 }, // COMMENT DOC\n\t{ 15, \"181880\", \"BA9C80\", 2 }, // COMMENT LINE DOC\n\t{ 17, \"C00058\", \"BA9C80\", 3 }, // COMMENT DOC KEYWORD\n\t{ 18, \"BCBCBC\", \"5F0000\", 3 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle javascript_Navajo[] = {\n\t{ 41, \"000000\", \"BA9C80\", 0 }, // DEFAULT\n\t{ 45, \"C00058\", \"BA9C80\", 0 }, // NUMBER\n\t{ 46, \"106060\", \"BA9C80\", 0 }, // WORD\n\t{ 47, \"804040\", \"BA9C80\", 0 }, // KEYWORD\n\t{ 48, \"C00058\", \"BA9C80\", 0 }, // DOUBLESTRING\n\t{ 49, \"C00058\", \"BA9C80\", 0 }, // SINGLESTRING\n\t{ 50, \"000000\", \"BA9C80\", 0 }, // SYMBOLS\n\t{ 51, \"870087\", \"BA9C80\", 0 }, // STRINGEOL\n\t{ 52, \"C00058\", \"BA9C80\", 0 }, // REGEX\n\t{ 42, \"181880\", \"BA9C80\", 2 }, // COMMENT\n\t{ 43, \"181880\", \"BA9C80\", 2 }, // COMMENTLINE\n\t{ 44, \"181880\", \"BA9C80\", 2 }, // COMMENTDOC\n\t{ 17, \"C00058\", \"BA9C80\", 3 }, // COMMENT DOC KEYWORD\n\t{ 18, \"BCBCBC\", \"5F0000\", 3 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle python_Navajo[] = {\n\t{ 0, \"000000\", \"BA9C80\", 0 }, // DEFAULT\n\t{ 1, \"181880\", \"BA9C80\", 2 }, // COMMENTLINE\n\t{ 2, \"C00058\", \"BA9C80\", 0 }, // NUMBER\n\t{ 3, \"C00058\", \"BA9C80\", 0 }, // STRING\n\t{ 4, \"C00058\", \"BA9C80\", 0 }, // CHARACTER\n\t{ 5, \"804040\", \"BA9C80\", 0 }, // KEYWORDS\n\t{ 6, \"C00058\", \"BA9C80\", 0 }, // TRIPLE\n\t{ 7, \"C00058\", \"BA9C80\", 0 }, // TRIPLEDOUBLE\n\t{ 8, \"D92B10\", \"BA9C80\", 0 }, // CLASSNAME\n\t{ 9, \"D92B10\", \"BA9C80\", 0 }, // DEFNAME\n\t{ 10, \"010101\", \"BA9C80\", 1 }, // OPERATOR\n\t{ 11, \"106060\", \"BA9C80\", 0 }, // IDENTIFIER\n\t{ 12, \"181880\", \"BA9C80\", 2 }, // COMMENTBLOCK\n\t{ 12, \"181880\", \"BA9C80\", 0 }, // STRINGEOL\n};\n\nstatic const lexstyle ruby_Navajo[] = {\n\t{ 0, \"000000\", \"BA9C80\", 0 }, // DEFAULT\n\t{ 1, \"870087\", \"BA9C80\", 0 }, // ERROR\n\t{ 2, \"181880\", \"BA9C80\", 2 }, // COMMENTLINE\n\t{ 3, \"000000\", \"BA9C80\", 2 }, // POD\n\t{ 4, \"C00058\", \"BA9C80\", 0 }, // NUMBER\n\t{ 5, \"804040\", \"BA9C80\", 0 }, // INSTRUCTION\n\t{ 6, \"C00058\", \"BA9C80\", 0 }, // STRING\n\t{ 7, \"C00058\", \"BA9C80\", 0 }, // CHARACTER\n\t{ 8, \"106060\", \"BA9C80\", 0 }, // CLASS NAME\n\t{ 9, \"C00058\", \"BA9C80\", 0 }, // DEF NAME\n\t{ 10, \"010101\", \"BA9C80\", 1 }, // OPERATOR\n\t{ 11, \"106060\", \"BA9C80\", 0 }, // IDENTIFIER\n\t{ 12, \"C00058\", \"BA9C80\", 0 }, // REGEX\n\t{ 13, \"106060\", \"BA9C80\", 0 }, // GLOBAL\n\t{ 14, \"000000\", \"BA9C80\", 0 }, // SYMBOL\n\t{ 15, \"D92B10\", \"BA9C80\", 0 }, // MODULE NAME\n\t{ 16, \"106060\", \"BA9C80\", 0 }, // INSTANCE VAR\n\t{ 17, \"000000\", \"BA9C80\", 0 }, // CLASS VAR\n\t{ 18, \"C00058\", \"CDB38B\", 0 }, // BACKTICKS\n\t{ 19, \"C00058\", \"BA9C80\", 0 }, // DATA SECTION\n\t{ 24, \"C00058\", \"BA9C80\", 0 }, // STRING Q\n\t{ 25, \"C00058\", \"BA9C80\", 0 }, // BOOLEAN\n};\n\nstatic const lexstyle global_NotepadPlusPlus[] = {\n\t{ 32, \"000000\", \"FFFFFF\", 0 }, // Default Style\n\t{ 37, \"C0C0C0\", \"FFFFFF\", 0 }, // Indent guideline style\n\t{ 34, \"FF0000\", \"FFFFFF\", 1 }, // Brace highlight style\n\t{ 35, \"800000\", \"FFFFFF\", 0 }, // Bad brace colour\n\t{ 2069, \"8000FF\", \"FFFFFF\", 0 }, // Caret colour\n\t{ 33, \"808080\", \"E4E4E4\", 0 }, // Line number margin\n\t{ 29, \"000000\", \"00FF00\", 0 }, // Smart HighLighting\n\t{ 31, \"000000\", \"FF0000\", 0 }, // Find Mark Style\n\t{ 25, \"000000\", \"00FFFF\", 0 }, // Mark Style 1\n\t{ 24, \"000000\", \"FF8000\", 0 }, // Mark Style 2\n\t{ 23, \"000000\", \"FFFF00\", 0 }, // Mark Style 3\n\t{ 22, \"000000\", \"8000FF\", 0 }, // Mark Style 4\n\t{ 21, \"000000\", \"008000\", 0 }, // Mark Style 5\n\t{ 28, \"000000\", \"0080FF\", 0 }, // Incremental highlight all\n\t{ 27, \"000000\", \"8000FF\", 0 }, // Tags match highlighting\n\t{ 26, \"000000\", \"FFFF00\", 0 }, // Tags attribute\n};\n\n\nstatic const lexstyle cpp_NotepadPlusPlus[] = {\n\t{ 9, \"804000\", \"FFFFFF\", 0 }, // PREPROCESSOR\n\t{ 11, \"000000\", \"FFFFFF\", 0 }, // DEFAULT\n\t{ 5, \"0000FF\", \"FFFFFF\", 1 }, // INSTRUCTION WORD\n\t{ 16, \"8000FF\", \"FFFFFF\", 0 }, // TYPE WORD\n\t{ 4, \"FF8000\", \"FFFFFF\", 0 }, // NUMBER\n\t{ 6, \"808080\", \"FFFFFF\", 0 }, // STRING\n\t{ 7, \"808080\", \"FFFFFF\", 0 }, // CHARACTER\n\t{ 10, \"000080\", \"FFFFFF\", 1 }, // OPERATOR\n\t{ 13, \"000000\", \"FFFFFF\", 0 }, // VERBATIM\n\t{ 14, \"000000\", \"FFFFFF\", 1 }, // REGEX\n\t{ 1, \"008000\", \"FFFFFF\", 0 }, // COMMENT\n\t{ 2, \"008000\", \"FFFFFF\", 0 }, // COMMENT LINE\n\t{ 3, \"008080\", \"FFFFFF\", 0 }, // COMMENT DOC\n\t{ 15, \"008080\", \"FFFFFF\", 0 }, // COMMENT LINE DOC\n\t{ 17, \"008080\", \"FFFFFF\", 1 }, // COMMENT DOC KEYWORD\n\t{ 18, \"008080\", \"FFFFFF\", 0 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle java_NotepadPlusPlus[] = {\n\t{ 9, \"804000\", \"FFFFFF\", 0 }, // PREPROCESSOR\n\t{ 11, \"000000\", \"FFFFFF\", 0 }, // DEFAULT\n\t{ 5, \"0000FF\", \"FFFFFF\", 1 }, // INSTRUCTION WORD\n\t{ 16, \"8000FF\", \"FFFFFF\", 0 }, // TYPE WORD\n\t{ 4, \"FF8000\", \"FFFFFF\", 0 }, // NUMBER\n\t{ 6, \"808080\", \"FFFFFF\", 0 }, // STRING\n\t{ 7, \"808080\", \"FFFFFF\", 0 }, // CHARACTER\n\t{ 10, \"000080\", \"FFFFFF\", 1 }, // OPERATOR\n\t{ 13, \"000000\", \"FFFFFF\", 0 }, // VERBATIM\n\t{ 14, \"000000\", \"FFFFFF\", 1 }, // REGEX\n\t{ 1, \"008000\", \"FFFFFF\", 0 }, // COMMENT\n\t{ 2, \"008000\", \"FFFFFF\", 0 }, // COMMENT LINE\n\t{ 3, \"008080\", \"FFFFFF\", 0 }, // COMMENT DOC\n\t{ 15, \"008080\", \"FFFFFF\", 0 }, // COMMENT LINE DOC\n\t{ 17, \"008080\", \"FFFFFF\", 1 }, // COMMENT DOC KEYWORD\n\t{ 18, \"008080\", \"FFFFFF\", 0 }, // COMMENT DOC KEYWORD ERROR\n};\n\nstatic const lexstyle javascript_NotepadPlusPlus[] = {\n\t{ 41, \"000000\", \"F2F4FF\", 0 }, // DEFAULT\n\t{ 45, \"FF0000\", \"F2F4FF\", 0 }, // NUMBER\n\t{ 46, \"000000\", \"F2F4FF\", 0 }, // WORD\n\t{ 47, \"000080\", \"F2F4FF\", 3 }, // KEYWORD\n\t{ 48, \"808080\", \"F2F4FF\", 0 }, // DOUBLESTRING\n\t{ 49, \"808080\", \"F2F4FF\", 0 }, // SINGLESTRING\n\t{ 50, \"000000\", \"F2F4FF\", 1 }, // SYMBOLS\n\t{ 52, \"8000FF\", \"F2F4FF\", 0 }, // REGEX\n\t{ 42, \"008000\", \"F2F4FF\", 0 }, // COMMENT\n\t{ 43, \"008000\", \"F2F4FF\", 0 }, // COMMENTLINE\n\t{ 44, \"008080\", \"F2F4FF\", 0 }, // COMMENTDOC\n};\n\nstatic const lexstyle python_NotepadPlusPlus[] = {\n\t{ 0, \"000000\", \"FFFFFF\", 0 }, // DEFAULT\n\t{ 1, \"008000\", \"FFFFFF\", 0 }, // COMMENTLINE\n\t{ 2, \"FF0000\", \"FFFFFF\", 0 }, // NUMBER\n\t{ 3, \"808080\", \"FFFFFF\", 0 }, // STRING\n\t{ 4, \"808080\", \"FFFFFF\", 0 }, // CHARACTER\n\t{ 5, \"0000FF\", \"FFFFFF\", 1 }, // KEYWORDS\n\t{ 6, \"FF8000\", \"FFFFFF\", 0 }, // TRIPLE\n\t{ 7, \"FF8000\", \"FFFFFF\", 0 }, // TRIPLEDOUBLE\n\t{ 8, \"000000\", \"FFFFFF\", 1 }, // CLASSNAME\n\t{ 9, \"FF00FF\", \"FFFFFF\", 0 }, // DEFNAME\n\t{ 10, \"000080\", \"FFFFFF\", 1 }, // OPERATOR\n\t{ 11, \"000000\", \"FFFFFF\", 0 }, // IDENTIFIER\n\t{ 12, \"008000\", \"FFFFFF\", 0 }, // COMMENTBLOCK\n};\n\nstatic const lexstyle ruby_NotepadPlusPlus[] = {\n\t{ 0, \"000000\", \"FFFFFF\", 0 }, // DEFAULT\n\t{ 1, \"000000\", \"FFFFFF\", 0 }, // ERROR\n\t{ 2, \"008000\", \"FFFFFF\", 0 }, // COMMENTLINE\n\t{ 3, \"004000\", \"C0FFC0\", 0 }, // POD\n\t{ 4, \"FF8000\", \"FFFFFF\", 0 }, // NUMBER\n\t{ 5, \"0000FF\", \"FFFFFF\", 1 }, // INSTRUCTION\n\t{ 6, \"808080\", \"FFFFFF\", 0 }, // STRING\n\t{ 7, \"808000\", \"FFFFFF\", 0 }, // CHARACTER\n\t{ 8, \"0080C0\", \"FFFFFF\", 1 }, // CLASS NAME\n\t{ 9, \"8080FF\", \"FFFFCC\", 1 }, // DEF NAME\n\t{ 10, \"000080\", \"FFFFFF\", 1 }, // OPERATOR\n\t{ 11, \"000000\", \"FFFFFF\", 0 }, // IDENTIFIER\n\t{ 12, \"0080FF\", \"FFFFFF\", 0 }, // REGEX\n\t{ 13, \"000080\", \"FFFFFF\", 1 }, // GLOBAL\n\t{ 14, \"000000\", \"FFFFFF\", 0 }, // SYMBOL\n\t{ 15, \"804000\", \"FFFFFF\", 1 }, // MODULE NAME\n\t{ 16, \"000000\", \"FFFFFF\", 0 }, // INSTANCE VAR\n\t{ 17, \"000000\", \"FFFFFF\", 0 }, // CLASS VAR\n\t{ 18, \"FFFF00\", \"A08080\", 0 }, // BACKTICKS\n\t{ 19, \"600000\", \"FFF0D8\", 0 }, // DATA SECTION\n\t{ 24, \"808080\", \"FFFFFF\", 0 }, // STRING Q\n};\n\nstatic const langstyle cppstyle[] = {\n\t{ \"Monokai\", \"F8F8F2\", \"272822\", \"3E3D32\", \"EEEEEC\", cpp_Monokai, global_Monokai, 16, 17 },\n\t{ \"Vibrant Ink\", \"FFFFFF\", \"000000\", \"333333\", \"E4E4E4\", cpp_Vibrant_Ink, global_Vibrant_Ink, 16, 17 },\n\t{ \"Solarized light\", \"657B83\", \"FDF6E3\", \"EEE8D5\", \"93A1A1\", cpp_Solarized_light, global_Solarized_light, 16, 16 },\n\t{ \"Twilight\", \"F8F8F8\", \"141414\", \"292929\", \"EEEEEC\", cpp_Twilight, global_Twilight, 16, 17 },\n\t{ \"vim Dark Blue\", \"FFFFFF\", \"000040\", \"000040\", \"FFFFFF\", cpp_vim_Dark_Blue, global_vim_Dark_Blue, 16, 11 },\n\t{ \"Deep Black\", \"FFFFFF\", \"000000\", \"333333\", \"C0C0C0\", cpp_Deep_Black, global_Deep_Black, 16, 11 },\n\t{ \"Mono Industrial\", \"FFFFFF\", \"222C28\", \"2C3833\", \"EEEEEC\", cpp_Mono_Industrial, global_Mono_Industrial, 16, 17 },\n\t{ \"Ruby Blue\", \"FFFFFF\", \"112435\", \"273A4B\", \"FFFFFF\", cpp_Ruby_Blue, global_Ruby_Blue, 16, 17 },\n\t{ \"Choco\", \"C3BE98\", \"1A0F0B\", \"281711\", \"EEEEEC\", cpp_Choco, global_Choco, 16, 17 },\n\t{ \"khaki\", \"5f5f00\", \"d7d7af\", \"afaf87\", \"5f5f00\", cpp_khaki, global_khaki, 16, 16 },\n\t{ \"Bespin\", \"F8F8F8\", \"2A211C\", \"4B3C34\", \"E5C138\", cpp_Bespin, global_Bespin, 16, 17 },\n\t{ \"Zenburn\", \"DCDCCC\", \"3F3F3F\", \"101010\", \"8A8A8A\", cpp_Zenburn, global_Zenburn, 16, 16 },\n\t{ \"Plastic Code Wrap\", \"F8F8F8\", \"0B161D\", \"11222D\", \"EEEEEC\", cpp_Plastic_Code_Wrap, global_Plastic_Code_Wrap, 16, 17 },\n\t{ \"Solarized\", \"839496\", \"002B36\", \"073642\", \"586E75\", cpp_Solarized, global_Solarized, 16, 16 },\n\t{ \"Hello Kitty\", \"000000\", \"FFB0FF\", \"FF80C0\", \"FFFFFF\", cpp_Hello_Kitty, global_Hello_Kitty, 16, 16 },\n\t{ \"HotFudgeSundae\", \"B7975D\", \"2b0f01\", \"432c13\", \"8B642B\", cpp_HotFudgeSundae, global_HotFudgeSundae, 16, 16 },\n\t{ \"Black board\", \"F8F8F8\", \"0C1021\", \"121830\", \"EEEEEC\", cpp_Black_board, global_Black_board, 16, 17 },\n\t{ \"MossyLawn\", \"f2c476\", \"6c7d51\", \"858e4d\", \"603d13\", cpp_MossyLawn, global_MossyLawn, 16, 16 },\n\t{ \"Obsidian\", \"E0E2E4\", \"293134\", \"2F393C\", \"81969A\", cpp_Obsidian, global_Obsidian, 16, 16 },\n\t{ \"Eclipse Default\", \"000000\", \"FFFFFF\", \"E8F2FE\", \"808080\", cpp_Eclipse_Default, global_Eclipse_Default, 16, 11 },\n\t{ \"Navajo\", \"000000\", \"BA9C80\", \"B39674\", \"000000\", cpp_Navajo, global_Navajo, 16, 16 },\n\t{ \"NotepadPlusPlus\", \"000000\", \"FFFFFF\", \"E8E8FF\", \"808080\", cpp_NotepadPlusPlus, global_NotepadPlusPlus, 16, 16 },\n\t{ NULL, NULL, NULL, 0 }\n};\n\nstatic const langstyle javastyle[] = {\n\t{ \"Monokai\", \"F8F8F2\", \"272822\", \"3E3D32\", \"EEEEEC\", java_Monokai, global_Monokai, 16, 17 },\n\t{ \"Vibrant Ink\", \"FFFFFF\", \"000000\", \"333333\", \"E4E4E4\", java_Vibrant_Ink, global_Vibrant_Ink, 16, 17 },\n\t{ \"Solarized light\", \"657B83\", \"FDF6E3\", \"EEE8D5\", \"93A1A1\", java_Solarized_light, global_Solarized_light, 16, 16 },\n\t{ \"Twilight\", \"F8F8F8\", \"141414\", \"292929\", \"EEEEEC\", java_Twilight, global_Twilight, 16, 17 },\n\t{ \"vim Dark Blue\", \"FFFFFF\", \"000040\", \"000040\", \"FFFFFF\", java_vim_Dark_Blue, global_vim_Dark_Blue, 16, 11 },\n\t{ \"Deep Black\", \"FFFFFF\", \"000000\", \"333333\", \"C0C0C0\", java_Deep_Black, global_Deep_Black, 16, 11 },\n\t{ \"Mono Industrial\", \"FFFFFF\", \"222C28\", \"2C3833\", \"EEEEEC\", java_Mono_Industrial, global_Mono_Industrial, 16, 17 },\n\t{ \"Ruby Blue\", \"FFFFFF\", \"112435\", \"273A4B\", \"FFFFFF\", java_Ruby_Blue, global_Ruby_Blue, 16, 17 },\n\t{ \"Choco\", \"C3BE98\", \"1A0F0B\", \"281711\", \"EEEEEC\", java_Choco, global_Choco, 16, 17 },\n\t{ \"khaki\", \"5f5f00\", \"d7d7af\", \"afaf87\", \"5f5f00\", java_khaki, global_khaki, 16, 16 },\n\t{ \"Bespin\", \"F8F8F8\", \"2A211C\", \"4B3C34\", \"E5C138\", java_Bespin, global_Bespin, 16, 17 },\n\t{ \"Zenburn\", \"DCDCCC\", \"3F3F3F\", \"101010\", \"8A8A8A\", java_Zenburn, global_Zenburn, 16, 16 },\n\t{ \"Plastic Code Wrap\", \"F8F8F8\", \"0B161D\", \"11222D\", \"EEEEEC\", java_Plastic_Code_Wrap, global_Plastic_Code_Wrap, 16, 17 },\n\t{ \"Solarized\", \"839496\", \"002B36\", \"073642\", \"586E75\", java_Solarized, global_Solarized, 16, 16 },\n\t{ \"Hello Kitty\", \"000000\", \"FFB0FF\", \"FF80C0\", \"FFFFFF\", java_Hello_Kitty, global_Hello_Kitty, 16, 16 },\n\t{ \"HotFudgeSundae\", \"B7975D\", \"2b0f01\", \"432c13\", \"8B642B\", java_HotFudgeSundae, global_HotFudgeSundae, 16, 16 },\n\t{ \"Black board\", \"F8F8F8\", \"0C1021\", \"121830\", \"EEEEEC\", java_Black_board, global_Black_board, 16, 17 },\n\t{ \"MossyLawn\", \"f2c476\", \"6c7d51\", \"858e4d\", \"603d13\", java_MossyLawn, global_MossyLawn, 16, 16 },\n\t{ \"Obsidian\", \"E0E2E4\", \"293134\", \"2F393C\", \"81969A\", java_Obsidian, global_Obsidian, 16, 16 },\n\t{ \"Eclipse Default\", \"000000\", \"FFFFFF\", \"E8F2FE\", \"808080\", java_Eclipse_Default, global_Eclipse_Default, 16, 11 },\n\t{ \"Navajo\", \"000000\", \"BA9C80\", \"B39674\", \"000000\", java_Navajo, global_Navajo, 16, 16 },\n\t{ \"NotepadPlusPlus\", \"000000\", \"FFFFFF\", \"E8E8FF\", \"808080\", java_NotepadPlusPlus, global_NotepadPlusPlus, 16, 16 },\n\t{ NULL, NULL, NULL, 0 }\n};\n\nstatic const langstyle pythonstyle[] = {\n\t{ \"Monokai\", \"F8F8F2\", \"272822\", \"3E3D32\", \"EEEEEC\", python_Monokai, global_Monokai, 14, 17 },\n\t{ \"Vibrant Ink\", \"FFFFFF\", \"000000\", \"333333\", \"E4E4E4\", python_Vibrant_Ink, global_Vibrant_Ink, 14, 17 },\n\t{ \"Solarized light\", \"657B83\", \"FDF6E3\", \"EEE8D5\", \"93A1A1\", python_Solarized_light, global_Solarized_light, 14, 16 },\n\t{ \"Twilight\", \"F8F8F8\", \"141414\", \"292929\", \"EEEEEC\", python_Twilight, global_Twilight, 14, 17 },\n\t{ \"vim Dark Blue\", \"FFFFFF\", \"000040\", \"000040\", \"FFFFFF\", python_vim_Dark_Blue, global_vim_Dark_Blue, 14, 11 },\n\t{ \"Deep Black\", \"FFFFFF\", \"000000\", \"333333\", \"C0C0C0\", python_Deep_Black, global_Deep_Black, 14, 11 },\n\t{ \"Mono Industrial\", \"FFFFFF\", \"222C28\", \"2C3833\", \"EEEEEC\", python_Mono_Industrial, global_Mono_Industrial, 14, 17 },\n\t{ \"Ruby Blue\", \"FFFFFF\", \"112435\", \"273A4B\", \"FFFFFF\", python_Ruby_Blue, global_Ruby_Blue, 14, 17 },\n\t{ \"Choco\", \"C3BE98\", \"1A0F0B\", \"281711\", \"EEEEEC\", python_Choco, global_Choco, 14, 17 },\n\t{ \"khaki\", \"5f5f00\", \"d7d7af\", \"afaf87\", \"5f5f00\", python_khaki, global_khaki, 14, 16 },\n\t{ \"Bespin\", \"F8F8F8\", \"2A211C\", \"4B3C34\", \"E5C138\", python_Bespin, global_Bespin, 14, 17 },\n\t{ \"Zenburn\", \"DCDCCC\", \"3F3F3F\", \"101010\", \"8A8A8A\", python_Zenburn, global_Zenburn, 13, 16 },\n\t{ \"Plastic Code Wrap\", \"F8F8F8\", \"0B161D\", \"11222D\", \"EEEEEC\", python_Plastic_Code_Wrap, global_Plastic_Code_Wrap, 14, 17 },\n\t{ \"Solarized\", \"839496\", \"002B36\", \"073642\", \"586E75\", python_Solarized, global_Solarized, 14, 16 },\n\t{ \"Hello Kitty\", \"000000\", \"FFB0FF\", \"FF80C0\", \"FFFFFF\", python_Hello_Kitty, global_Hello_Kitty, 14, 16 },\n\t{ \"HotFudgeSundae\", \"B7975D\", \"2b0f01\", \"432c13\", \"8B642B\", python_HotFudgeSundae, global_HotFudgeSundae, 14, 16 },\n\t{ \"Black board\", \"F8F8F8\", \"0C1021\", \"121830\", \"EEEEEC\", python_Black_board, global_Black_board, 14, 17 },\n\t{ \"MossyLawn\", \"f2c476\", \"6c7d51\", \"858e4d\", \"603d13\", python_MossyLawn, global_MossyLawn, 14, 16 },\n\t{ \"Obsidian\", \"E0E2E4\", \"293134\", \"2F393C\", \"81969A\", python_Obsidian, global_Obsidian, 14, 16 },\n\t{ \"Eclipse Default\", \"000000\", \"FFFFFF\", \"E8F2FE\", \"808080\", python_Eclipse_Default, global_Eclipse_Default, 14, 11 },\n\t{ \"Navajo\", \"000000\", \"BA9C80\", \"B39674\", \"000000\", python_Navajo, global_Navajo, 14, 16 },\n\t{ \"NotepadPlusPlus\", \"000000\", \"FFFFFF\", \"E8E8FF\", \"808080\", python_NotepadPlusPlus, global_NotepadPlusPlus, 13, 16 },\n\t{ NULL, NULL, NULL, 0 }\n};\n\nstatic const langstyle rubystyle[] = {\n\t{ \"Monokai\", \"F8F8F2\", \"272822\", \"3E3D32\", \"EEEEEC\", ruby_Monokai, global_Monokai, 21, 17 },\n\t{ \"Vibrant Ink\", \"FFFFFF\", \"000000\", \"333333\", \"E4E4E4\", ruby_Vibrant_Ink, global_Vibrant_Ink, 21, 17 },\n\t{ \"Solarized light\", \"657B83\", \"FDF6E3\", \"EEE8D5\", \"93A1A1\", ruby_Solarized_light, global_Solarized_light, 22, 16 },\n\t{ \"Twilight\", \"F8F8F8\", \"141414\", \"292929\", \"EEEEEC\", ruby_Twilight, global_Twilight, 21, 17 },\n\t{ \"vim Dark Blue\", \"FFFFFF\", \"000040\", \"000040\", \"FFFFFF\", ruby_vim_Dark_Blue, global_vim_Dark_Blue, 21, 11 },\n\t{ \"Deep Black\", \"FFFFFF\", \"000000\", \"333333\", \"C0C0C0\", ruby_Deep_Black, global_Deep_Black, 21, 11 },\n\t{ \"Mono Industrial\", \"FFFFFF\", \"222C28\", \"2C3833\", \"EEEEEC\", ruby_Mono_Industrial, global_Mono_Industrial, 21, 17 },\n\t{ \"Ruby Blue\", \"FFFFFF\", \"112435\", \"273A4B\", \"FFFFFF\", ruby_Ruby_Blue, global_Ruby_Blue, 21, 17 },\n\t{ \"Choco\", \"C3BE98\", \"1A0F0B\", \"281711\", \"EEEEEC\", ruby_Choco, global_Choco, 21, 17 },\n\t{ \"khaki\", \"5f5f00\", \"d7d7af\", \"afaf87\", \"5f5f00\", ruby_khaki, global_khaki, 22, 16 },\n\t{ \"Bespin\", \"F8F8F8\", \"2A211C\", \"4B3C34\", \"E5C138\", ruby_Bespin, global_Bespin, 21, 17 },\n\t{ \"Zenburn\", \"DCDCCC\", \"3F3F3F\", \"101010\", \"8A8A8A\", ruby_Zenburn, global_Zenburn, 21, 16 },\n\t{ \"Plastic Code Wrap\", \"F8F8F8\", \"0B161D\", \"11222D\", \"EEEEEC\", ruby_Plastic_Code_Wrap, global_Plastic_Code_Wrap, 21, 17 },\n\t{ \"Solarized\", \"839496\", \"002B36\", \"073642\", \"586E75\", ruby_Solarized, global_Solarized, 22, 16 },\n\t{ \"Hello Kitty\", \"000000\", \"FFB0FF\", \"FF80C0\", \"FFFFFF\", ruby_Hello_Kitty, global_Hello_Kitty, 21, 16 },\n\t{ \"HotFudgeSundae\", \"B7975D\", \"2b0f01\", \"432c13\", \"8B642B\", ruby_HotFudgeSundae, global_HotFudgeSundae, 22, 16 },\n\t{ \"Black board\", \"F8F8F8\", \"0C1021\", \"121830\", \"EEEEEC\", ruby_Black_board, global_Black_board, 21, 17 },\n\t{ \"MossyLawn\", \"f2c476\", \"6c7d51\", \"858e4d\", \"603d13\", ruby_MossyLawn, global_MossyLawn, 22, 16 },\n\t{ \"Obsidian\", \"E0E2E4\", \"293134\", \"2F393C\", \"81969A\", ruby_Obsidian, global_Obsidian, 21, 16 },\n\t{ \"Eclipse Default\", \"000000\", \"FFFFFF\", \"E8F2FE\", \"808080\", ruby_Eclipse_Default, global_Eclipse_Default, 21, 11 },\n\t{ \"Navajo\", \"000000\", \"BA9C80\", \"B39674\", \"000000\", ruby_Navajo, global_Navajo, 22, 16 },\n\t{ \"NotepadPlusPlus\", \"000000\", \"FFFFFF\", \"E8E8FF\", \"808080\", ruby_NotepadPlusPlus, global_NotepadPlusPlus, 21, 16 },\n\t{ NULL, NULL, NULL, 0 }\n};\n\nstatic const langstyle javascriptstyle[] = {\n\t{ \"Monokai\", \"F8F8F2\", \"272822\", \"3E3D32\", \"EEEEEC\", javascript_Monokai, global_Monokai, 12, 17 },\n\t{ \"Vibrant Ink\", \"FFFFFF\", \"000000\", \"333333\", \"E4E4E4\", javascript_Vibrant_Ink, global_Vibrant_Ink, 12, 17 },\n\t{ \"Solarized light\", \"657B83\", \"FDF6E3\", \"EEE8D5\", \"93A1A1\", javascript_Solarized_light, global_Solarized_light, 14, 16 },\n\t{ \"Twilight\", \"F8F8F8\", \"141414\", \"292929\", \"EEEEEC\", javascript_Twilight, global_Twilight, 12, 17 },\n\t{ \"vim Dark Blue\", \"FFFFFF\", \"000040\", \"000040\", \"FFFFFF\", javascript_vim_Dark_Blue, global_vim_Dark_Blue, 12, 11 },\n\t{ \"Deep Black\", \"FFFFFF\", \"000000\", \"333333\", \"C0C0C0\", javascript_Deep_Black, global_Deep_Black, 12, 11 },\n\t{ \"Mono Industrial\", \"FFFFFF\", \"222C28\", \"2C3833\", \"EEEEEC\", javascript_Mono_Industrial, global_Mono_Industrial, 12, 17 },\n\t{ \"Ruby Blue\", \"FFFFFF\", \"112435\", \"273A4B\", \"FFFFFF\", javascript_Ruby_Blue, global_Ruby_Blue, 12, 17 },\n\t{ \"Choco\", \"C3BE98\", \"1A0F0B\", \"281711\", \"EEEEEC\", javascript_Choco, global_Choco, 12, 17 },\n\t{ \"khaki\", \"5f5f00\", \"d7d7af\", \"afaf87\", \"5f5f00\", javascript_khaki, global_khaki, 14, 16 },\n\t{ \"Bespin\", \"BDAF9D\", \"2A211C\", \"4B3C34\", \"E5C138\", javascript_Bespin, global_Bespin, 15, 17 },\n\t{ \"Zenburn\", \"DCDCCC\", \"3F3F3F\", \"101010\", \"8A8A8A\", javascript_Zenburn, global_Zenburn, 11, 16 },\n\t{ \"Plastic Code Wrap\", \"F8F8F8\", \"0B161D\", \"11222D\", \"EEEEEC\", javascript_Plastic_Code_Wrap, global_Plastic_Code_Wrap, 12, 17 },\n\t{ \"Solarized\", \"839496\", \"002B36\", \"073642\", \"586E75\", javascript_Solarized, global_Solarized, 14, 16 },\n\t{ \"Hello Kitty\", \"000000\", \"F2F4FF\", \"FF80C0\", \"FFFFFF\", javascript_Hello_Kitty, global_Hello_Kitty, 12, 16 },\n\t{ \"HotFudgeSundae\", \"B7975D\", \"2b0f01\", \"432c13\", \"8B642B\", javascript_HotFudgeSundae, global_HotFudgeSundae, 14, 16 },\n\t{ \"Black board\", \"F8F8F8\", \"0C1021\", \"121830\", \"EEEEEC\", javascript_Black_board, global_Black_board, 12, 17 },\n\t{ \"MossyLawn\", \"f2c476\", \"6c7d51\", \"858e4d\", \"603d13\", javascript_MossyLawn, global_MossyLawn, 14, 16 },\n\t{ \"Obsidian\", \"E0E2E4\", \"293134\", \"2F393C\", \"81969A\", javascript_Obsidian, global_Obsidian, 12, 16 },\n\t{ \"Eclipse Default\", \"000000\", \"FFFFFF\", \"E8F2FE\", \"808080\", javascript_Eclipse_Default, global_Eclipse_Default, 12, 11 },\n\t{ \"Navajo\", \"000000\", \"BA9C80\", \"B39674\", \"000000\", javascript_Navajo, global_Navajo, 14, 16 },\n\t{ \"NotepadPlusPlus\", \"000000\", \"F2F4FF\", \"E8E8FF\", \"808080\", javascript_NotepadPlusPlus, global_NotepadPlusPlus, 11, 16 },\n\t{ NULL, NULL, NULL, 0 }\n};\n\n"
  },
  {
    "path": "gui/translations/codequery_de.ts",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!DOCTYPE TS>\n<TS version=\"2.0\" language=\"de_DE\">\n<context>\n    <name>DialogGraph</name>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"17\"/>\n        <source>Graph</source>\n        <translation>Diagramm</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"26\"/>\n        <source>Please wait ...</source>\n        <translation>Bitte warten...</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"73\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"76\"/>\n        <source>Zoom Out</source>\n        <translation>Verkleinern</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"96\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"99\"/>\n        <source>Zoom In</source>\n        <translation>Vergrößern</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"126\"/>\n        <source>Number of levels:</source>\n        <translation>Anzahl der Ebenen:</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"156\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"159\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"162\"/>\n        <source>Save to DOT file</source>\n        <translation>Als DOT-Datei speichern</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"175\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"178\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"181\"/>\n        <source>Save Image</source>\n        <translation>Bild speichern</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"194\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"197\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"200\"/>\n        <source>Close</source>\n        <translation>Schließen</translation>\n    </message>\n</context>\n<context>\n    <name>MainWindow</name>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"17\"/>\n        <source>CodeQuery</source>\n        <translation>CodeQuery</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"30\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"33\"/>\n        <source>Open Database</source>\n        <translation>Datenbank öffnen</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"79\"/>\n        <source>Auto-complete</source>\n        <translation>Automatische Vervollständigung</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"93\"/>\n        <source>Exact match</source>\n        <translation>Genaue Übereinstimmung</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"107\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"110\"/>\n        <source>File path filter</source>\n        <translation>Dateipfadfilter</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"113\"/>\n        <source>Filter</source>\n        <translation>Filter</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"129\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"132\"/>\n        <source>File path filter, wildcard searches (* and ?) are supported</source>\n        <translation>Dateipfadfilter, Platzhaltersuchen (* und ?) werden unterstützt</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"155\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"158\"/>\n        <source>Previous search term</source>\n        <translation>Vorheriger Suchbegriff</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"178\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"181\"/>\n        <source>Next search term</source>\n        <translation>Nächster Suchbegriff</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"207\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"210\"/>\n        <source>If Exact Match is switched off, wildcard searches (* and ?) are supported</source>\n        <translation>Wenn \"Genaue Übereinstimmung\" ausgeschaltet ist, werden Platzhaltersuchen (* und ?) unterstützt</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"229\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"232\"/>\n        <source>Search</source>\n        <translation>Suche</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"252\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"255\"/>\n        <source>Paste and Search</source>\n        <translation>Einfügen und suchen</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"275\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"278\"/>\n        <source>List of all files</source>\n        <translation>Liste aller Dateien</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"301\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"304\"/>\n        <source>Draw graph</source>\n        <translation>Diagramm zeichnen</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"361\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"364\"/>\n        <source>Previous File</source>\n        <translation>Vorherige Datei</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"384\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"387\"/>\n        <source>Next File</source>\n        <translation>Nächste Datei</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"407\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"410\"/>\n        <source>Open in Editor</source>\n        <translation>In Editor öffnen</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"430\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"433\"/>\n        <source>Go to selected line</source>\n        <translation>Zur ausgewählten Zeile gehen</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"453\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"456\"/>\n        <source>Reduce font size</source>\n        <translation>Schriftgrad verkleinern</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"476\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"479\"/>\n        <source>Increase font size</source>\n        <translation>Schriftgrad erhöhen</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"506\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"509\"/>\n        <source>Copy, paste and search</source>\n        <translation>Kopieren, einfügen und suchen</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"529\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"532\"/>\n        <source>Symbol search only for paste and search</source>\n        <translation>Einfügen und Suchen auf Symbolsuche einschränken</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"535\"/>\n        <source>Symbol only</source>\n        <translation>Nur Symbol</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"549\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"552\"/>\n        <source>Previous search result in this file</source>\n        <translation>Vorheriges Suchergebnis in dieser Datei</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"572\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"575\"/>\n        <source>Next search result in this file</source>\n        <translation>Nächstes Suchergebnis in dieser Datei</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"607\"/>\n        <source>FilePath:0</source>\n        <translation>Dateipfad:0</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"636\"/>\n        <source>Sort by line number</source>\n        <translation>Nach Zeilennummer sortieren</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"641\"/>\n        <source>Sort by name</source>\n        <translation>Nach Namen sortieren</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"691\"/>\n        <source>File</source>\n        <translation>Datei</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"698\"/>\n        <source>Options</source>\n        <translation>Optionen</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"706\"/>\n        <source>Help</source>\n        <translation>Hilfe</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"718\"/>\n        <source>Exit</source>\n        <translation>Beenden</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"726\"/>\n        <source>Open</source>\n        <translation>Offene</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"731\"/>\n        <source>About</source>\n        <translation>Über</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"736\"/>\n        <source>External Editor</source>\n        <translation>Externer Editor</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"741\"/>\n        <source>Open CQ Database</source>\n        <translation>CQ-Datenbank öffnen</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"746\"/>\n        <source>Language</source>\n        <translation>Sprache</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"751\"/>\n        <source>About Qt</source>\n        <translation>Über Qt</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"759\"/>\n        <source>File Viewer Settings</source>\n        <translation>Dateibetrachter Einstellungen</translation>\n    </message>\n</context>\n<context>\n    <name>aboutDialog</name>\n    <message>\n        <location filename=\"../ui/aboutDialog.ui\" line=\"23\"/>\n        <source>About CodeQuery</source>\n        <translation>Über CodeQuery</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/aboutDialog.ui\" line=\"119\"/>\n        <source>OK</source>\n        <translation>Okay</translation>\n    </message>\n</context>\n<context>\n    <name>cqDialogGraph</name>\n    <message>\n        <location filename=\"../graphdialog.cpp\" line=\"81\"/>\n        <source>Images</source>\n        <translation>Bilder</translation>\n    </message>\n    <message>\n        <location filename=\"../graphdialog.cpp\" line=\"84\"/>\n        <source>Export Image</source>\n        <translation>Bild exportieren</translation>\n    </message>\n    <message>\n        <location filename=\"../graphdialog.cpp\" line=\"95\"/>\n        <location filename=\"../graphdialog.cpp\" line=\"114\"/>\n        <source>File could not be saved!</source>\n        <translation>Datei konnte nicht gespeichert werden!</translation>\n    </message>\n    <message>\n        <location filename=\"../graphdialog.cpp\" line=\"103\"/>\n        <source>Export DOT file</source>\n        <translation>DOT-Datei exportieren</translation>\n    </message>\n</context>\n<context>\n    <name>fileViewSettingsDialog</name>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"17\"/>\n        <source>File Viewer Settings</source>\n        <translation>Dateibetrachter Einstellungen</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"36\"/>\n        <source>Font</source>\n        <translation>Schriftart</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"49\"/>\n        <source>Syntax highlight theme</source>\n        <translation>Syntaxhervorhebung Farbthema</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"62\"/>\n        <source>Tab Width (number of spaces)</source>\n        <translation>Tabstoppweite (Anzahl der Leerzeichen)</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"122\"/>\n        <source>Cancel</source>\n        <translation>Abbrechen</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"135\"/>\n        <source>OK</source>\n        <translation>Okay</translation>\n    </message>\n</context>\n<context>\n    <name>fileviewer</name>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"248\"/>\n        <source>File not found</source>\n        <translation>Datei nicht gefunden</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"255\"/>\n        <source>File could not be opened</source>\n        <translation>Datei konnte nicht geöffnet werden</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"269\"/>\n        <source>The source file to be viewed is newer than the CodeQuery database file. You are recommended to manually regenerate the CodeQuery database file.</source>\n        <translation>Die Quelldatei, die angezeigt werden soll, ist neuer als die CodeQuery-Datenbankdatei. Wir empfehlen, die CodeQuery-Datenbankdatei manuell zu regenerieren.</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"557\"/>\n        <source>Cancel</source>\n        <translation>Abbrechen</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"558\"/>\n        <source>OK</source>\n        <translation>Okay</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"560\"/>\n        <source>External Editor Configuration</source>\n        <translation>Konfiguration externer Editor</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"561\"/>\n        <source>Please enter the path and arguments for the external editor. Replace as follows:</source>\n        <translation>Bitte geben Sie den Pfad und die Argumente für den externen Editor ein. Wie folgt ersetzen:</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"563\"/>\n        <source>for file path</source>\n        <translation>für Dateipfad</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"565\"/>\n        <source>for line number</source>\n        <translation>für Zeilennummer</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"567\"/>\n        <source>For example:</source>\n        <translation>Zum Beispiel:</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"592\"/>\n        <source>File could not be opened!</source>\n        <translation>Datei konnte nicht geöffnet werden!</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"617\"/>\n        <source>External editor could not be started. Please check Options!</source>\n        <translation>Externer Editor konnte nicht gestartet werden. Bitte überprüfen Sie die Optionen!</translation>\n    </message>\n</context>\n<context>\n    <name>listhandler</name>\n    <message>\n        <location filename=\"../listhandler.cpp\" line=\"125\"/>\n        <source>Symbol</source>\n        <translation>Symbol</translation>\n    </message>\n    <message>\n        <location filename=\"../listhandler.cpp\" line=\"126\"/>\n        <source>File</source>\n        <translation>Datei</translation>\n    </message>\n    <message>\n        <location filename=\"../listhandler.cpp\" line=\"129\"/>\n        <source>Line</source>\n        <translation>Linie</translation>\n    </message>\n    <message>\n        <location filename=\"../listhandler.cpp\" line=\"129\"/>\n        <source>Preview</source>\n        <translation>Vorschau</translation>\n    </message>\n</context>\n<context>\n    <name>mainwindow</name>\n    <message>\n        <location filename=\"../mainwindow.cpp\" line=\"160\"/>\n        <source>Cancel</source>\n        <translation>Abbrechen</translation>\n    </message>\n    <message>\n        <location filename=\"../mainwindow.cpp\" line=\"161\"/>\n        <source>OK</source>\n        <translation>Okay</translation>\n    </message>\n    <message>\n        <location filename=\"../mainwindow.cpp\" line=\"163\"/>\n        <source>Language</source>\n        <translation>Sprache</translation>\n    </message>\n    <message>\n        <location filename=\"../mainwindow.cpp\" line=\"164\"/>\n        <source>Select language:</source>\n        <translation>Sprache auswählen:</translation>\n    </message>\n</context>\n<context>\n    <name>searchhandler</name>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"346\"/>\n        <source>Symbol</source>\n        <translation>Symbol</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"349\"/>\n        <source>Function or macro definition (Graph available)</source>\n        <translation>Funktion oder ein Makro-Definition (Diagramm verfügbar)</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"361\"/>\n        <source>Class or struct (Graph available)</source>\n        <translation>Klasse oder Struktur (Diagramm verfügbar)</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"355\"/>\n        <source>Functions calling this function</source>\n        <translation>Funktionen, die diese Funktion aufrufen</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"358\"/>\n        <source>Functions called by this function</source>\n        <translation>Von dieser Funktion aufgerufene Funktionen</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"352\"/>\n        <source>Calls of this function or macro</source>\n        <translation>Aufrufe dieser Funktion oder dieses Makros</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"364\"/>\n        <source>Class which owns this member or method</source>\n        <translation>Klasse, die dieses Klassenmitglied oder die Methode besitzt</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"367\"/>\n        <source>Members or methods of this class</source>\n        <translation>Klassenmitglieder oder Methoden dieser Klasse</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"370\"/>\n        <source>Parent of this class</source>\n        <translation>Basisklasse dieser Klasse</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"373\"/>\n        <source>Children of this class</source>\n        <translation>Abgeleitete Klassen dieser Klasse</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"376\"/>\n        <source>Files including this file</source>\n        <translation>Dateien, die diese Datei einbinden</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"379\"/>\n        <source>Full path for file</source>\n        <translation>Vollständiger Pfad für Datei</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"382\"/>\n        <source>Functions or macros inside this file</source>\n        <translation>Funktionen oder Makros in dieser Datei</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"393\"/>\n        <source>CodeQuery DB Files</source>\n        <translation>CodeQuery DB Dateien</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"396\"/>\n        <source>Open CQ database file</source>\n        <translation>CQ-Datenbankdatei öffnen</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"465\"/>\n        <source>Function Call Graph</source>\n        <translation>Funktionsaufruf-Diagramm</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"469\"/>\n        <source>Class Inheritance Graph</source>\n        <translation>Klassen-Vererbungs-Diagramm</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"485\"/>\n        <location filename=\"../searchhandler.cpp\" line=\"488\"/>\n        <source>If Exact Match is switched off, wildcard searches (* and ?) are supported</source>\n        <translation>Wenn \"Genaue Übereinstimmung\" ausgeschaltet ist, werden Platzhaltersuchen (* und ?) unterstützt</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"560\"/>\n        <source>results found</source>\n        <translation>Treffer gefunden</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"579\"/>\n        <source>in progress</source>\n        <translation>in Bearbeitung</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"580\"/>\n        <source>Cancel</source>\n        <translation>Abbrechen</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"677\"/>\n        <source>You have to first select an item from the list before pushing the Graph button.</source>\n        <translation>Du musst zuerst ein Element aus der Liste auswählen, bevor die Schaltfläche \"Diagramm zeichnen\" verwendet werden kann.</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"806\"/>\n        <source>File open error</source>\n        <translation>Fehler beim Öffnen der Datei</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"807\"/>\n        <source>Wrong file format</source>\n        <translation>Falsches Dateiformat</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"808\"/>\n        <source>Incorrect CQ database version</source>\n        <translation>Falsche CQ-Datenbankversion</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"809\"/>\n        <source>OK</source>\n        <translation>Okay</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"811\"/>\n        <source>Unknown Error</source>\n        <translation>Unbekannter Fehler</translation>\n    </message>\n</context>\n</TS>\n"
  },
  {
    "path": "gui/translations/codequery_en.ts",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!DOCTYPE TS>\n<TS version=\"2.0\" language=\"en_US\">\n<context>\n    <name>DialogGraph</name>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"17\"/>\n        <source>Graph</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"26\"/>\n        <source>Please wait ...</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"73\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"76\"/>\n        <source>Zoom Out</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"96\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"99\"/>\n        <source>Zoom In</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"126\"/>\n        <source>Number of levels:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"156\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"159\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"162\"/>\n        <source>Save to DOT file</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"175\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"178\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"181\"/>\n        <source>Save Image</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"194\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"197\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"200\"/>\n        <source>Close</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>MainWindow</name>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"17\"/>\n        <source>CodeQuery</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"30\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"33\"/>\n        <source>Open Database</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"79\"/>\n        <source>Auto-complete</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"93\"/>\n        <source>Exact match</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"107\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"110\"/>\n        <source>File path filter</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"113\"/>\n        <source>Filter</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"129\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"132\"/>\n        <source>File path filter, wildcard searches (* and ?) are supported</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"155\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"158\"/>\n        <source>Previous search term</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"178\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"181\"/>\n        <source>Next search term</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"207\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"210\"/>\n        <source>If Exact Match is switched off, wildcard searches (* and ?) are supported</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"229\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"232\"/>\n        <source>Search</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"252\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"255\"/>\n        <source>Paste and Search</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"275\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"278\"/>\n        <source>List of all files</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"301\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"304\"/>\n        <source>Draw graph</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"361\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"364\"/>\n        <source>Previous File</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"384\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"387\"/>\n        <source>Next File</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"407\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"410\"/>\n        <source>Open in Editor</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"430\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"433\"/>\n        <source>Go to selected line</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"453\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"456\"/>\n        <source>Reduce font size</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"476\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"479\"/>\n        <source>Increase font size</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"506\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"509\"/>\n        <source>Copy, paste and search</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"529\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"532\"/>\n        <source>Symbol search only for paste and search</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"535\"/>\n        <source>Symbol only</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"549\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"552\"/>\n        <source>Previous search result in this file</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"572\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"575\"/>\n        <source>Next search result in this file</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"607\"/>\n        <source>FilePath:0</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"636\"/>\n        <source>Sort by line number</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"641\"/>\n        <source>Sort by name</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"691\"/>\n        <source>File</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"698\"/>\n        <source>Options</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"706\"/>\n        <source>Help</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"718\"/>\n        <source>Exit</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"726\"/>\n        <source>Open</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"731\"/>\n        <source>About</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"736\"/>\n        <source>External Editor</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"741\"/>\n        <source>Open CQ Database</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"746\"/>\n        <source>Language</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"751\"/>\n        <source>About Qt</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"759\"/>\n        <source>File Viewer Settings</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>aboutDialog</name>\n    <message>\n        <location filename=\"../ui/aboutDialog.ui\" line=\"23\"/>\n        <source>About CodeQuery</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/aboutDialog.ui\" line=\"119\"/>\n        <source>OK</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>cqDialogGraph</name>\n    <message>\n        <location filename=\"../graphdialog.cpp\" line=\"81\"/>\n        <source>Images</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../graphdialog.cpp\" line=\"84\"/>\n        <source>Export Image</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../graphdialog.cpp\" line=\"95\"/>\n        <location filename=\"../graphdialog.cpp\" line=\"114\"/>\n        <source>File could not be saved!</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../graphdialog.cpp\" line=\"103\"/>\n        <source>Export DOT file</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>fileViewSettingsDialog</name>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"17\"/>\n        <source>File Viewer Settings</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"36\"/>\n        <source>Font</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"49\"/>\n        <source>Syntax highlight theme</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"62\"/>\n        <source>Tab Width (number of spaces)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"122\"/>\n        <source>Cancel</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"135\"/>\n        <source>OK</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>fileviewer</name>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"248\"/>\n        <source>File not found</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"255\"/>\n        <source>File could not be opened</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"269\"/>\n        <source>The source file to be viewed is newer than the CodeQuery database file. You are recommended to manually regenerate the CodeQuery database file.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"557\"/>\n        <source>Cancel</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"558\"/>\n        <source>OK</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"560\"/>\n        <source>External Editor Configuration</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"561\"/>\n        <source>Please enter the path and arguments for the external editor. Replace as follows:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"563\"/>\n        <source>for file path</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"565\"/>\n        <source>for line number</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"567\"/>\n        <source>For example:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"592\"/>\n        <source>File could not be opened!</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"617\"/>\n        <source>External editor could not be started. Please check Options!</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>listhandler</name>\n    <message>\n        <location filename=\"../listhandler.cpp\" line=\"125\"/>\n        <source>Symbol</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../listhandler.cpp\" line=\"126\"/>\n        <source>File</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../listhandler.cpp\" line=\"129\"/>\n        <source>Line</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../listhandler.cpp\" line=\"129\"/>\n        <source>Preview</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>mainwindow</name>\n    <message>\n        <location filename=\"../mainwindow.cpp\" line=\"160\"/>\n        <source>Cancel</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../mainwindow.cpp\" line=\"161\"/>\n        <source>OK</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../mainwindow.cpp\" line=\"163\"/>\n        <source>Language</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../mainwindow.cpp\" line=\"164\"/>\n        <source>Select language:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>searchhandler</name>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"346\"/>\n        <source>Symbol</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"349\"/>\n        <source>Function or macro definition (Graph available)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"361\"/>\n        <source>Class or struct (Graph available)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"355\"/>\n        <source>Functions calling this function</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"358\"/>\n        <source>Functions called by this function</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"352\"/>\n        <source>Calls of this function or macro</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"364\"/>\n        <source>Class which owns this member or method</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"367\"/>\n        <source>Members or methods of this class</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"370\"/>\n        <source>Parent of this class</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"373\"/>\n        <source>Children of this class</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"376\"/>\n        <source>Files including this file</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"379\"/>\n        <source>Full path for file</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"382\"/>\n        <source>Functions or macros inside this file</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"393\"/>\n        <source>CodeQuery DB Files</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"396\"/>\n        <source>Open CQ database file</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"465\"/>\n        <source>Function Call Graph</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"469\"/>\n        <source>Class Inheritance Graph</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"485\"/>\n        <location filename=\"../searchhandler.cpp\" line=\"488\"/>\n        <source>If Exact Match is switched off, wildcard searches (* and ?) are supported</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"560\"/>\n        <source>results found</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"579\"/>\n        <source>in progress</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"580\"/>\n        <source>Cancel</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"677\"/>\n        <source>You have to first select an item from the list before pushing the Graph button.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"806\"/>\n        <source>File open error</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"807\"/>\n        <source>Wrong file format</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"808\"/>\n        <source>Incorrect CQ database version</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"809\"/>\n        <source>OK</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"811\"/>\n        <source>Unknown Error</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n</TS>\n"
  },
  {
    "path": "gui/translations/codequery_es.ts",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!DOCTYPE TS>\n<TS version=\"2.0\" language=\"es_ES\">\n<context>\n    <name>DialogGraph</name>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"17\"/>\n        <source>Graph</source>\n        <translation>Gráfico</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"26\"/>\n        <source>Please wait ...</source>\n        <translation>Espera...</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"73\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"76\"/>\n        <source>Zoom Out</source>\n        <translation>Alejar</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"96\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"99\"/>\n        <source>Zoom In</source>\n        <translation>Zoom</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"126\"/>\n        <source>Number of levels:</source>\n        <translation>Número de niveles:</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"156\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"159\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"162\"/>\n        <source>Save to DOT file</source>\n        <translation>Guardar en un archivo de punto</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"175\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"178\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"181\"/>\n        <source>Save Image</source>\n        <translation>Guardar imagen</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"194\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"197\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"200\"/>\n        <source>Close</source>\n        <translation>Cerrar</translation>\n    </message>\n</context>\n<context>\n    <name>MainWindow</name>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"17\"/>\n        <source>CodeQuery</source>\n        <translation>CodeQuery</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"30\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"33\"/>\n        <source>Open Database</source>\n        <translation>Base de datos abierta</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"79\"/>\n        <source>Auto-complete</source>\n        <translation>Completar automáticamente</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"93\"/>\n        <source>Exact match</source>\n        <translation>Coincidencia exacta</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"107\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"110\"/>\n        <source>File path filter</source>\n        <translation>Filtro de ruta de archivo</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"113\"/>\n        <source>Filter</source>\n        <translation>Filtro</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"129\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"132\"/>\n        <source>File path filter, wildcard searches (* and ?) are supported</source>\n        <translation>Filtro de ruta de acceso de archivo, búsquedas de comodín (* y?) son compatibles</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"155\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"158\"/>\n        <source>Previous search term</source>\n        <translation>Término de búsqueda anterior</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"178\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"181\"/>\n        <source>Next search term</source>\n        <translation>Al término de la búsqueda</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"207\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"210\"/>\n        <source>If Exact Match is switched off, wildcard searches (* and ?) are supported</source>\n        <translation>Si está apagado coincidencia exacta, búsquedas de comodín (* y?) son compatibles</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"229\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"232\"/>\n        <source>Search</source>\n        <translation>Búsqueda</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"252\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"255\"/>\n        <source>Paste and Search</source>\n        <translation>Pasta y búsqueda</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"275\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"278\"/>\n        <source>List of all files</source>\n        <translation>lista de todos los archivos</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"301\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"304\"/>\n        <source>Draw graph</source>\n        <translation>Gráfica</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"361\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"364\"/>\n        <source>Previous File</source>\n        <translation>Archivo anterior</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"384\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"387\"/>\n        <source>Next File</source>\n        <translation>Siguiente archivo</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"407\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"410\"/>\n        <source>Open in Editor</source>\n        <translation>Abierto en el Editor</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"430\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"433\"/>\n        <source>Go to selected line</source>\n        <translation>Ir a la línea seleccionada</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"453\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"456\"/>\n        <source>Reduce font size</source>\n        <translation>Reducir el tamaño de la fuente</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"476\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"479\"/>\n        <source>Increase font size</source>\n        <translation>Aumentar tamaño de fuente</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"506\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"509\"/>\n        <source>Copy, paste and search</source>\n        <translation>Copiar, pegar y buscar</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"529\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"532\"/>\n        <source>Symbol search only for paste and search</source>\n        <translation>Búsqueda de símbolo sólo para pasta y búsqueda</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"535\"/>\n        <source>Symbol only</source>\n        <translation>Símbolo sólo</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"549\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"552\"/>\n        <source>Previous search result in this file</source>\n        <translation>Resultado de la búsqueda anterior en este archivo</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"572\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"575\"/>\n        <source>Next search result in this file</source>\n        <translation>A continuación resultados de la búsqueda en este archivo</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"607\"/>\n        <source>FilePath:0</source>\n        <translation>FilePath:0</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"636\"/>\n        <source>Sort by line number</source>\n        <translation>Ordenar por número de línea</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"641\"/>\n        <source>Sort by name</source>\n        <translation>Ordenar por nombre</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"691\"/>\n        <source>File</source>\n        <translation>Archivo</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"698\"/>\n        <source>Options</source>\n        <translation>Opciones</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"706\"/>\n        <source>Help</source>\n        <translation>Ayuda</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"718\"/>\n        <source>Exit</source>\n        <translation>Salida</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"726\"/>\n        <source>Open</source>\n        <translation>Abierto</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"731\"/>\n        <source>About</source>\n        <translation>Acerca de</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"736\"/>\n        <source>External Editor</source>\n        <translation>Editor externo</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"741\"/>\n        <source>Open CQ Database</source>\n        <translation>Base de datos abierta CQ</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"746\"/>\n        <source>Language</source>\n        <translation>Idioma</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"751\"/>\n        <source>About Qt</source>\n        <translation>Acerca de Qt</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"759\"/>\n        <source>File Viewer Settings</source>\n        <translation>Configuraciones de visor de archivos</translation>\n    </message>\n</context>\n<context>\n    <name>aboutDialog</name>\n    <message>\n        <location filename=\"../ui/aboutDialog.ui\" line=\"23\"/>\n        <source>About CodeQuery</source>\n        <translation>Acerca de CodeQuery</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/aboutDialog.ui\" line=\"119\"/>\n        <source>OK</source>\n        <translation>Vale</translation>\n    </message>\n</context>\n<context>\n    <name>cqDialogGraph</name>\n    <message>\n        <location filename=\"../graphdialog.cpp\" line=\"81\"/>\n        <source>Images</source>\n        <translation>Imágenes</translation>\n    </message>\n    <message>\n        <location filename=\"../graphdialog.cpp\" line=\"84\"/>\n        <source>Export Image</source>\n        <translation>Exportar imagen</translation>\n    </message>\n    <message>\n        <location filename=\"../graphdialog.cpp\" line=\"95\"/>\n        <location filename=\"../graphdialog.cpp\" line=\"114\"/>\n        <source>File could not be saved!</source>\n        <translation>No se han podido guardar archivo!</translation>\n    </message>\n    <message>\n        <location filename=\"../graphdialog.cpp\" line=\"103\"/>\n        <source>Export DOT file</source>\n        <translation>Archivo de punto de exportación</translation>\n    </message>\n</context>\n<context>\n    <name>fileViewSettingsDialog</name>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"17\"/>\n        <source>File Viewer Settings</source>\n        <translation>Configuraciones de visor de archivos</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"36\"/>\n        <source>Font</source>\n        <translation>Fuente</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"49\"/>\n        <source>Syntax highlight theme</source>\n        <translation>Tema de resaltado de sintaxis</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"62\"/>\n        <source>Tab Width (number of spaces)</source>\n        <translation>Ficha anchura (número de espacios)</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"122\"/>\n        <source>Cancel</source>\n        <translation>Cancelar</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"135\"/>\n        <source>OK</source>\n        <translation>Vale</translation>\n    </message>\n</context>\n<context>\n    <name>fileviewer</name>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"248\"/>\n        <source>File not found</source>\n        <translation>Archivo no encontrado</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"255\"/>\n        <source>File could not be opened</source>\n        <translation>No se pudo abrir el archivo</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"269\"/>\n        <source>The source file to be viewed is newer than the CodeQuery database file. You are recommended to manually regenerate the CodeQuery database file.</source>\n        <translation>El archivo de origen para ser visto es más reciente que el archivo de base de datos de CodeQuery. Se recomienda para regenerar manualmente el archivo de base de datos de CodeQuery.</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"557\"/>\n        <source>Cancel</source>\n        <translation>Cancelar</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"558\"/>\n        <source>OK</source>\n        <translation>Vale</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"560\"/>\n        <source>External Editor Configuration</source>\n        <translation>Configuración del Editor externo</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"561\"/>\n        <source>Please enter the path and arguments for the external editor. Replace as follows:</source>\n        <translation>Por favor ingrese la ruta y argumentos para el editor externo. Reemplace como sigue:</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"563\"/>\n        <source>for file path</source>\n        <translation>para la ruta del archivo</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"565\"/>\n        <source>for line number</source>\n        <translation>para el número de línea</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"567\"/>\n        <source>For example:</source>\n        <translation>Por ejemplo:</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"592\"/>\n        <source>File could not be opened!</source>\n        <translation>No se pudo abrir el archivo!</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"617\"/>\n        <source>External editor could not be started. Please check Options!</source>\n        <translation>No se pudo iniciar el editor externo. Consulte Opciones!</translation>\n    </message>\n</context>\n<context>\n    <name>listhandler</name>\n    <message>\n        <location filename=\"../listhandler.cpp\" line=\"125\"/>\n        <source>Symbol</source>\n        <translation>Símbolo</translation>\n    </message>\n    <message>\n        <location filename=\"../listhandler.cpp\" line=\"126\"/>\n        <source>File</source>\n        <translation>Archivo</translation>\n    </message>\n    <message>\n        <location filename=\"../listhandler.cpp\" line=\"129\"/>\n        <source>Line</source>\n        <translation>Línea</translation>\n    </message>\n    <message>\n        <location filename=\"../listhandler.cpp\" line=\"129\"/>\n        <source>Preview</source>\n        <translation>Vista previa</translation>\n    </message>\n</context>\n<context>\n    <name>mainwindow</name>\n    <message>\n        <location filename=\"../mainwindow.cpp\" line=\"160\"/>\n        <source>Cancel</source>\n        <translation>Cancelar</translation>\n    </message>\n    <message>\n        <location filename=\"../mainwindow.cpp\" line=\"161\"/>\n        <source>OK</source>\n        <translation>Vale</translation>\n    </message>\n    <message>\n        <location filename=\"../mainwindow.cpp\" line=\"163\"/>\n        <source>Language</source>\n        <translation>Idioma</translation>\n    </message>\n    <message>\n        <location filename=\"../mainwindow.cpp\" line=\"164\"/>\n        <source>Select language:</source>\n        <translation>Seleccionar idioma:</translation>\n    </message>\n</context>\n<context>\n    <name>searchhandler</name>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"346\"/>\n        <source>Symbol</source>\n        <translation>Símbolo</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"349\"/>\n        <source>Function or macro definition (Graph available)</source>\n        <translation>Definición de función o macro (gráfico disponible)</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"361\"/>\n        <source>Class or struct (Graph available)</source>\n        <translation>Clase o estructura (gráfico disponible)</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"355\"/>\n        <source>Functions calling this function</source>\n        <translation>Funciones llamar a esta función</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"358\"/>\n        <source>Functions called by this function</source>\n        <translation>Funciones de llamada por esta función</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"352\"/>\n        <source>Calls of this function or macro</source>\n        <translation>Llamadas de esta función o macro</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"364\"/>\n        <source>Class which owns this member or method</source>\n        <translation>Clase que posee este miembro o método</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"367\"/>\n        <source>Members or methods of this class</source>\n        <translation>Miembros o métodos de esta clase</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"370\"/>\n        <source>Parent of this class</source>\n        <translation>Padres de esta clase</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"373\"/>\n        <source>Children of this class</source>\n        <translation>Niños de esta clase</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"376\"/>\n        <source>Files including this file</source>\n        <translation>Archivos incluyendo este archivo</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"379\"/>\n        <source>Full path for file</source>\n        <translation>Ruta de acceso completa de archivo</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"382\"/>\n        <source>Functions or macros inside this file</source>\n        <translation>Funciones o macros dentro de este archivo</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"393\"/>\n        <source>CodeQuery DB Files</source>\n        <translation>CodeQuery DB archivos</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"396\"/>\n        <source>Open CQ database file</source>\n        <translation>Abrir archivo de base de datos de CQ</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"465\"/>\n        <source>Function Call Graph</source>\n        <translation>Gráfico de la llamada de función</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"469\"/>\n        <source>Class Inheritance Graph</source>\n        <translation>Gráfico de la herencia de clase</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"485\"/>\n        <location filename=\"../searchhandler.cpp\" line=\"488\"/>\n        <source>If Exact Match is switched off, wildcard searches (* and ?) are supported</source>\n        <translation>Si está apagado coincidencia exacta, búsquedas de comodín (* y?) son compatibles</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"560\"/>\n        <source>results found</source>\n        <translation>se han encontrado resultados</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"579\"/>\n        <source>in progress</source>\n        <translation>en progreso</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"580\"/>\n        <source>Cancel</source>\n        <translation>Cancelar</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"677\"/>\n        <source>You have to first select an item from the list before pushing the Graph button.</source>\n        <translation>Tienes que seleccionar primero un elemento de la lista antes de presionar el botón gráfico.</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"806\"/>\n        <source>File open error</source>\n        <translation>Error de archivo abierto</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"807\"/>\n        <source>Wrong file format</source>\n        <translation>Formato de archivo incorrecto</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"808\"/>\n        <source>Incorrect CQ database version</source>\n        <translation>Versión incorrecta de la base de datos de CQ</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"809\"/>\n        <source>OK</source>\n        <translation>Vale</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"811\"/>\n        <source>Unknown Error</source>\n        <translation>Error desconocido</translation>\n    </message>\n</context>\n</TS>\n"
  },
  {
    "path": "gui/translations/codequery_fr.ts",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!DOCTYPE TS>\n<TS version=\"2.0\" language=\"fr_FR\">\n<context>\n    <name>DialogGraph</name>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"17\"/>\n        <source>Graph</source>\n        <translation>Graphique</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"26\"/>\n        <source>Please wait ...</source>\n        <translation>Veuillez patienter...</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"73\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"76\"/>\n        <source>Zoom Out</source>\n        <translation>Effectuer un zoom arrière</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"96\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"99\"/>\n        <source>Zoom In</source>\n        <translation>Effectuez un zoom avant</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"126\"/>\n        <source>Number of levels:</source>\n        <translation>Nombre de niveaux:</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"156\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"159\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"162\"/>\n        <source>Save to DOT file</source>\n        <translation>Enregistrer dans fichier DOT</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"175\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"178\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"181\"/>\n        <source>Save Image</source>\n        <translation>Enregistrer l&apos;Image</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"194\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"197\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"200\"/>\n        <source>Close</source>\n        <translation>Fermer</translation>\n    </message>\n</context>\n<context>\n    <name>MainWindow</name>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"17\"/>\n        <source>CodeQuery</source>\n        <translation>CodeQuery</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"30\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"33\"/>\n        <source>Open Database</source>\n        <translation>Base de données ouverte</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"79\"/>\n        <source>Auto-complete</source>\n        <translation>Semi-automatique</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"93\"/>\n        <source>Exact match</source>\n        <translation>Correspondance exacte</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"107\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"110\"/>\n        <source>File path filter</source>\n        <translation>Filtre de chemin de fichier</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"113\"/>\n        <source>Filter</source>\n        <translation>Filtre</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"129\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"132\"/>\n        <source>File path filter, wildcard searches (* and ?) are supported</source>\n        <translation>Filtre de chemin d&apos;accès de fichier, les recherches génériques (* et?) sont pris en charge</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"155\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"158\"/>\n        <source>Previous search term</source>\n        <translation>Terme de la recherche précédente</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"178\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"181\"/>\n        <source>Next search term</source>\n        <translation>Prochain mandat de recherche</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"207\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"210\"/>\n        <source>If Exact Match is switched off, wildcard searches (* and ?) are supported</source>\n        <translation>Si une correspondance exacte déconnexion, recherches génériques (* et?) sont pris en charge</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"229\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"232\"/>\n        <source>Search</source>\n        <translation>Rechercher</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"252\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"255\"/>\n        <source>Paste and Search</source>\n        <translation>Pâte et recherche</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"275\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"278\"/>\n        <source>List of all files</source>\n        <translation>liste de tous les fichiers</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"301\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"304\"/>\n        <source>Draw graph</source>\n        <translation>Tracer graphique</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"361\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"364\"/>\n        <source>Previous File</source>\n        <translation>Fichier précédent</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"384\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"387\"/>\n        <source>Next File</source>\n        <translation>Fichier suivant</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"407\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"410\"/>\n        <source>Open in Editor</source>\n        <translation>Ouvert dans l&apos;éditeur</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"430\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"433\"/>\n        <source>Go to selected line</source>\n        <translation>Aller à la ligne sélectionnée</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"453\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"456\"/>\n        <source>Reduce font size</source>\n        <translation>Réduire la taille de police</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"476\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"479\"/>\n        <source>Increase font size</source>\n        <translation>Augmenter la taille de police</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"506\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"509\"/>\n        <source>Copy, paste and search</source>\n        <translation>Copier, coller et Rechercher</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"529\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"532\"/>\n        <source>Symbol search only for paste and search</source>\n        <translation>Recherche de symbole que pour la pâte et de la recherche</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"535\"/>\n        <source>Symbol only</source>\n        <translation>Symbole seulement</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"549\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"552\"/>\n        <source>Previous search result in this file</source>\n        <translation>Résultat de la recherche précédente dans ce fichier</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"572\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"575\"/>\n        <source>Next search result in this file</source>\n        <translation>Résultat de la recherche suivante dans ce fichier</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"607\"/>\n        <source>FilePath:0</source>\n        <translation>FilePath:0</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"636\"/>\n        <source>Sort by line number</source>\n        <translation>Trier par numéro de ligne</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"641\"/>\n        <source>Sort by name</source>\n        <translation>Trier par nom</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"691\"/>\n        <source>File</source>\n        <translation>Fichier</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"698\"/>\n        <source>Options</source>\n        <translation>Options</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"706\"/>\n        <source>Help</source>\n        <translation>Aide</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"718\"/>\n        <source>Exit</source>\n        <translation>Sortie</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"726\"/>\n        <source>Open</source>\n        <translation>Ouvert</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"731\"/>\n        <source>About</source>\n        <translation>Sur</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"736\"/>\n        <source>External Editor</source>\n        <translation>External Editor</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"741\"/>\n        <source>Open CQ Database</source>\n        <translation>Base de données ouverte CQ</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"746\"/>\n        <source>Language</source>\n        <translation>Langue</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"751\"/>\n        <source>About Qt</source>\n        <translation>Sur Qt</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"759\"/>\n        <source>File Viewer Settings</source>\n        <translation>Paramètres de visionneuse de fichiers</translation>\n    </message>\n</context>\n<context>\n    <name>aboutDialog</name>\n    <message>\n        <location filename=\"../ui/aboutDialog.ui\" line=\"23\"/>\n        <source>About CodeQuery</source>\n        <translation>Sur CodeQuery</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/aboutDialog.ui\" line=\"119\"/>\n        <source>OK</source>\n        <translation>Bien</translation>\n    </message>\n</context>\n<context>\n    <name>cqDialogGraph</name>\n    <message>\n        <location filename=\"../graphdialog.cpp\" line=\"81\"/>\n        <source>Images</source>\n        <translation>Images</translation>\n    </message>\n    <message>\n        <location filename=\"../graphdialog.cpp\" line=\"84\"/>\n        <source>Export Image</source>\n        <translation>Exporter Image</translation>\n    </message>\n    <message>\n        <location filename=\"../graphdialog.cpp\" line=\"95\"/>\n        <location filename=\"../graphdialog.cpp\" line=\"114\"/>\n        <source>File could not be saved!</source>\n        <translation>Fichier n&apos;a pas pu être sauvé !</translation>\n    </message>\n    <message>\n        <location filename=\"../graphdialog.cpp\" line=\"103\"/>\n        <source>Export DOT file</source>\n        <translation>Exporter fichier DOT</translation>\n    </message>\n</context>\n<context>\n    <name>fileViewSettingsDialog</name>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"17\"/>\n        <source>File Viewer Settings</source>\n        <translation>Paramètres de visionneuse de fichiers</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"36\"/>\n        <source>Font</source>\n        <translation>Polices</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"49\"/>\n        <source>Syntax highlight theme</source>\n        <translation>Thème de point culminant de syntaxe</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"62\"/>\n        <source>Tab Width (number of spaces)</source>\n        <translation>Onglet largeur (nombre de places)</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"122\"/>\n        <source>Cancel</source>\n        <translation>Annuler</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"135\"/>\n        <source>OK</source>\n        <translation>Bien</translation>\n    </message>\n</context>\n<context>\n    <name>fileviewer</name>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"248\"/>\n        <source>File not found</source>\n        <translation>Fichier non trouvé</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"255\"/>\n        <source>File could not be opened</source>\n        <translation>Fichier n&apos;a pas pu être ouvert</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"269\"/>\n        <source>The source file to be viewed is newer than the CodeQuery database file. You are recommended to manually regenerate the CodeQuery database file.</source>\n        <translation>Le fichier source à afficher est plus récent que le fichier de base de données CodeQuery. Il est conseillé de régénérer manuellement le fichier de base de données CodeQuery.</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"557\"/>\n        <source>Cancel</source>\n        <translation>Annuler</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"558\"/>\n        <source>OK</source>\n        <translation>Bien</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"560\"/>\n        <source>External Editor Configuration</source>\n        <translation>Configuration de l&apos;éditeur externe</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"561\"/>\n        <source>Please enter the path and arguments for the external editor. Replace as follows:</source>\n        <translation>Veuillez entrer le chemin d&apos;accès et les arguments de l&apos;éditeur externe. Remplacer comme suit :</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"563\"/>\n        <source>for file path</source>\n        <translation>pour le chemin du fichier</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"565\"/>\n        <source>for line number</source>\n        <translation>pour le numéro de ligne</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"567\"/>\n        <source>For example:</source>\n        <translation>Par exemple :</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"592\"/>\n        <source>File could not be opened!</source>\n        <translation>Fichier n&apos;a pas pu être ouvert !</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"617\"/>\n        <source>External editor could not be started. Please check Options!</source>\n        <translation>Éditeur externe n&apos;a pas pu être démarré. Vérifiez les Options !</translation>\n    </message>\n</context>\n<context>\n    <name>listhandler</name>\n    <message>\n        <location filename=\"../listhandler.cpp\" line=\"125\"/>\n        <source>Symbol</source>\n        <translation>Symbole</translation>\n    </message>\n    <message>\n        <location filename=\"../listhandler.cpp\" line=\"126\"/>\n        <source>File</source>\n        <translation>Fichier</translation>\n    </message>\n    <message>\n        <location filename=\"../listhandler.cpp\" line=\"129\"/>\n        <source>Line</source>\n        <translation>Ligne</translation>\n    </message>\n    <message>\n        <location filename=\"../listhandler.cpp\" line=\"129\"/>\n        <source>Preview</source>\n        <translation>Aperçu</translation>\n    </message>\n</context>\n<context>\n    <name>mainwindow</name>\n    <message>\n        <location filename=\"../mainwindow.cpp\" line=\"160\"/>\n        <source>Cancel</source>\n        <translation>Annuler</translation>\n    </message>\n    <message>\n        <location filename=\"../mainwindow.cpp\" line=\"161\"/>\n        <source>OK</source>\n        <translation>Bien</translation>\n    </message>\n    <message>\n        <location filename=\"../mainwindow.cpp\" line=\"163\"/>\n        <source>Language</source>\n        <translation>Langue</translation>\n    </message>\n    <message>\n        <location filename=\"../mainwindow.cpp\" line=\"164\"/>\n        <source>Select language:</source>\n        <translation>Sélectionner une langue:</translation>\n    </message>\n</context>\n<context>\n    <name>searchhandler</name>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"346\"/>\n        <source>Symbol</source>\n        <translation>Symbole</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"349\"/>\n        <source>Function or macro definition (Graph available)</source>\n        <translation>Définition de fonction ou de la macro (graphique disponible)</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"361\"/>\n        <source>Class or struct (Graph available)</source>\n        <translation>Classe ou struct (graphique disponible)</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"355\"/>\n        <source>Functions calling this function</source>\n        <translation>Fonctions d&apos;appel de cette fonction</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"358\"/>\n        <source>Functions called by this function</source>\n        <translation>Fonctions appelées par cette fonction</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"352\"/>\n        <source>Calls of this function or macro</source>\n        <translation>Appels de la fonction ou la macro</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"364\"/>\n        <source>Class which owns this member or method</source>\n        <translation>Classe qui possède ce membre ou la méthode</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"367\"/>\n        <source>Members or methods of this class</source>\n        <translation>Membres ou méthodes de cette classe</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"370\"/>\n        <source>Parent of this class</source>\n        <translation>Parent de cette classe</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"373\"/>\n        <source>Children of this class</source>\n        <translation>Enfants de cette classe</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"376\"/>\n        <source>Files including this file</source>\n        <translation>Fichiers à inclure ce fichier</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"379\"/>\n        <source>Full path for file</source>\n        <translation>Chemin d&apos;accès complet pour le fichier</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"382\"/>\n        <source>Functions or macros inside this file</source>\n        <translation>Fonctions ou des macros à l&apos;intérieur de ce fichier</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"393\"/>\n        <source>CodeQuery DB Files</source>\n        <translation>CodeQuery DB fichiers</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"396\"/>\n        <source>Open CQ database file</source>\n        <translation>Ouvrir le fichier de base de données CQ</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"465\"/>\n        <source>Function Call Graph</source>\n        <translation>Fonction Call Graph</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"469\"/>\n        <source>Class Inheritance Graph</source>\n        <translation>Classe héritage graphique</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"485\"/>\n        <location filename=\"../searchhandler.cpp\" line=\"488\"/>\n        <source>If Exact Match is switched off, wildcard searches (* and ?) are supported</source>\n        <translation>Si une correspondance exacte déconnexion, recherches génériques (* et?) sont pris en charge</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"560\"/>\n        <source>results found</source>\n        <translation>résultats trouvés</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"579\"/>\n        <source>in progress</source>\n        <translation>en cours</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"580\"/>\n        <source>Cancel</source>\n        <translation>Annuler</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"677\"/>\n        <source>You have to first select an item from the list before pushing the Graph button.</source>\n        <translation>Vous devez d&apos;abord sélectionner un élément dans la liste avant de pousser le bouton graphique.</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"806\"/>\n        <source>File open error</source>\n        <translation>Erreur de fichier ouvert</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"807\"/>\n        <source>Wrong file format</source>\n        <translation>Format de fichier incorrect</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"808\"/>\n        <source>Incorrect CQ database version</source>\n        <translation>Version de base de données incorrecte CQ</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"809\"/>\n        <source>OK</source>\n        <translation>Bien</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"811\"/>\n        <source>Unknown Error</source>\n        <translation>Erreur inconnue</translation>\n    </message>\n</context>\n</TS>\n"
  },
  {
    "path": "gui/translations/codequery_id.ts",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!DOCTYPE TS>\n<TS version=\"2.0\" language=\"id_ID\">\n<context>\n    <name>DialogGraph</name>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"17\"/>\n        <source>Graph</source>\n        <translation>Grafik</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"26\"/>\n        <source>Please wait ...</source>\n        <translation>Harap tunggu...</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"73\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"76\"/>\n        <source>Zoom Out</source>\n        <translation>Zoom Out</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"96\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"99\"/>\n        <source>Zoom In</source>\n        <translation>Memperbesar</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"126\"/>\n        <source>Number of levels:</source>\n        <translation>Jumlah tingkat:</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"156\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"159\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"162\"/>\n        <source>Save to DOT file</source>\n        <translation>Menyimpan DOT file</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"175\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"178\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"181\"/>\n        <source>Save Image</source>\n        <translation>Simpan gambar</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"194\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"197\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"200\"/>\n        <source>Close</source>\n        <translation>Dekat</translation>\n    </message>\n</context>\n<context>\n    <name>MainWindow</name>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"17\"/>\n        <source>CodeQuery</source>\n        <translation>CodeQuery</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"30\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"33\"/>\n        <source>Open Database</source>\n        <translation>Buka Database</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"79\"/>\n        <source>Auto-complete</source>\n        <translation>Auto-lengkap</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"93\"/>\n        <source>Exact match</source>\n        <translation>Pencocokan sama persis</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"107\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"110\"/>\n        <source>File path filter</source>\n        <translation>File path filter</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"113\"/>\n        <source>Filter</source>\n        <translation>Filter</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"129\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"132\"/>\n        <source>File path filter, wildcard searches (* and ?) are supported</source>\n        <translation>File path filter, pencarian wildcard (* dan?) yang didukung</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"155\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"158\"/>\n        <source>Previous search term</source>\n        <translation>Istilah penelusuran sebelumnya</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"178\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"181\"/>\n        <source>Next search term</source>\n        <translation>Istilah pencarian berikutnya</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"207\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"210\"/>\n        <source>If Exact Match is switched off, wildcard searches (* and ?) are supported</source>\n        <translation>Jika pencocokan sama persis dimatikan, pencarian wildcard (* dan?) yang didukung</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"229\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"232\"/>\n        <source>Search</source>\n        <translation>Cari</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"252\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"255\"/>\n        <source>Paste and Search</source>\n        <translation>Tempel dan telusuri</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"275\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"278\"/>\n        <source>List of all files</source>\n        <translation>Daftar semua file</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"301\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"304\"/>\n        <source>Draw graph</source>\n        <translation>Menggambar grafik</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"361\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"364\"/>\n        <source>Previous File</source>\n        <translation>File sebelumnya</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"384\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"387\"/>\n        <source>Next File</source>\n        <translation>Sebelumnya/berikutnya</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"407\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"410\"/>\n        <source>Open in Editor</source>\n        <translation>Terbuka di Editor</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"430\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"433\"/>\n        <source>Go to selected line</source>\n        <translation>Pergi ke saluran yang dipilih</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"453\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"456\"/>\n        <source>Reduce font size</source>\n        <translation>Mengurangi ukuran font</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"476\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"479\"/>\n        <source>Increase font size</source>\n        <translation>Meningkatkan ukuran font</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"506\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"509\"/>\n        <source>Copy, paste and search</source>\n        <translation>Salin, Tempel dan telusuri</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"529\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"532\"/>\n        <source>Symbol search only for paste and search</source>\n        <translation>Simbol pencarian hanya untuk Tempel dan telusuri</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"535\"/>\n        <source>Symbol only</source>\n        <translation>Simbol hanya</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"549\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"552\"/>\n        <source>Previous search result in this file</source>\n        <translation>Hasil penelusuran sebelumnya dalam file ini</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"572\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"575\"/>\n        <source>Next search result in this file</source>\n        <translation>Hasil pencarian berikutnya dalam file ini</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"607\"/>\n        <source>FilePath:0</source>\n        <translation>FilePath:0</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"636\"/>\n        <source>Sort by line number</source>\n        <translation>Urut berdasarkan nomor baris</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"641\"/>\n        <source>Sort by name</source>\n        <translation>Urut berdasarkan nama</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"691\"/>\n        <source>File</source>\n        <translation>File</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"698\"/>\n        <source>Options</source>\n        <translation>Pilihan</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"706\"/>\n        <source>Help</source>\n        <translation>Tolong</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"718\"/>\n        <source>Exit</source>\n        <translation>Keluar</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"726\"/>\n        <source>Open</source>\n        <translation>Buka</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"731\"/>\n        <source>About</source>\n        <translation>Tentang</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"736\"/>\n        <source>External Editor</source>\n        <translation>Editor eksternal</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"741\"/>\n        <source>Open CQ Database</source>\n        <translation>CQ buka Database</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"746\"/>\n        <source>Language</source>\n        <translation>Bahasa</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"751\"/>\n        <source>About Qt</source>\n        <translation>Tentang Qt</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"759\"/>\n        <source>File Viewer Settings</source>\n        <translation>Pengaturan file Viewer</translation>\n    </message>\n</context>\n<context>\n    <name>aboutDialog</name>\n    <message>\n        <location filename=\"../ui/aboutDialog.ui\" line=\"23\"/>\n        <source>About CodeQuery</source>\n        <translation>Tentang CodeQuery</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/aboutDialog.ui\" line=\"119\"/>\n        <source>OK</source>\n        <translation>Oke</translation>\n    </message>\n</context>\n<context>\n    <name>cqDialogGraph</name>\n    <message>\n        <location filename=\"../graphdialog.cpp\" line=\"81\"/>\n        <source>Images</source>\n        <translation>Gambar</translation>\n    </message>\n    <message>\n        <location filename=\"../graphdialog.cpp\" line=\"84\"/>\n        <source>Export Image</source>\n        <translation>Ekspor gambar</translation>\n    </message>\n    <message>\n        <location filename=\"../graphdialog.cpp\" line=\"95\"/>\n        <location filename=\"../graphdialog.cpp\" line=\"114\"/>\n        <source>File could not be saved!</source>\n        <translation>File tidak bisa diselamatkan!</translation>\n    </message>\n    <message>\n        <location filename=\"../graphdialog.cpp\" line=\"103\"/>\n        <source>Export DOT file</source>\n        <translation>Mengekspor DOT file</translation>\n    </message>\n</context>\n<context>\n    <name>fileViewSettingsDialog</name>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"17\"/>\n        <source>File Viewer Settings</source>\n        <translation>Pengaturan file Viewer</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"36\"/>\n        <source>Font</source>\n        <translation>Font</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"49\"/>\n        <source>Syntax highlight theme</source>\n        <translation>Sintaks sorot tema</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"62\"/>\n        <source>Tab Width (number of spaces)</source>\n        <translation>Tab lebar (jumlah ruang)</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"122\"/>\n        <source>Cancel</source>\n        <translation>Batal</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"135\"/>\n        <source>OK</source>\n        <translation>Oke</translation>\n    </message>\n</context>\n<context>\n    <name>fileviewer</name>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"248\"/>\n        <source>File not found</source>\n        <translation>File tidak ditemukan</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"255\"/>\n        <source>File could not be opened</source>\n        <translation>File tidak bisa dibuka</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"269\"/>\n        <source>The source file to be viewed is newer than the CodeQuery database file. You are recommended to manually regenerate the CodeQuery database file.</source>\n        <translation>File sumber untuk dilihat lebih baru daripada CodeQuery database file. Anda disarankan untuk secara manual regenerasi CodeQuery database file.</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"557\"/>\n        <source>Cancel</source>\n        <translation>Batal</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"558\"/>\n        <source>OK</source>\n        <translation>Oke</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"560\"/>\n        <source>External Editor Configuration</source>\n        <translation>Konfigurasi eksternal Editor</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"561\"/>\n        <source>Please enter the path and arguments for the external editor. Replace as follows:</source>\n        <translation>Harap masukkan path dan argumen untuk editor eksternal. Ganti sebagai berikut:</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"563\"/>\n        <source>for file path</source>\n        <translation>untuk file path</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"565\"/>\n        <source>for line number</source>\n        <translation>untuk nomor baris</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"567\"/>\n        <source>For example:</source>\n        <translation>Sebagai contoh:</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"592\"/>\n        <source>File could not be opened!</source>\n        <translation>File tidak bisa dibuka!</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"617\"/>\n        <source>External editor could not be started. Please check Options!</source>\n        <translation>Editor eksternal tidak dapat dimulai. Silakan periksa pilihan!</translation>\n    </message>\n</context>\n<context>\n    <name>listhandler</name>\n    <message>\n        <location filename=\"../listhandler.cpp\" line=\"125\"/>\n        <source>Symbol</source>\n        <translation>Simbol</translation>\n    </message>\n    <message>\n        <location filename=\"../listhandler.cpp\" line=\"126\"/>\n        <source>File</source>\n        <translation>File</translation>\n    </message>\n    <message>\n        <location filename=\"../listhandler.cpp\" line=\"129\"/>\n        <source>Line</source>\n        <translation>Baris</translation>\n    </message>\n    <message>\n        <location filename=\"../listhandler.cpp\" line=\"129\"/>\n        <source>Preview</source>\n        <translation>Tinjauan</translation>\n    </message>\n</context>\n<context>\n    <name>mainwindow</name>\n    <message>\n        <location filename=\"../mainwindow.cpp\" line=\"160\"/>\n        <source>Cancel</source>\n        <translation>Batal</translation>\n    </message>\n    <message>\n        <location filename=\"../mainwindow.cpp\" line=\"161\"/>\n        <source>OK</source>\n        <translation>Oke</translation>\n    </message>\n    <message>\n        <location filename=\"../mainwindow.cpp\" line=\"163\"/>\n        <source>Language</source>\n        <translation>Bahasa</translation>\n    </message>\n    <message>\n        <location filename=\"../mainwindow.cpp\" line=\"164\"/>\n        <source>Select language:</source>\n        <translation>Pilih bahasa:</translation>\n    </message>\n</context>\n<context>\n    <name>searchhandler</name>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"346\"/>\n        <source>Symbol</source>\n        <translation>Simbol</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"349\"/>\n        <source>Function or macro definition (Graph available)</source>\n        <translation>Definisi fungsi atau makro (grafik tersedia)</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"361\"/>\n        <source>Class or struct (Graph available)</source>\n        <translation>Kelas atau struct (grafik tersedia)</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"355\"/>\n        <source>Functions calling this function</source>\n        <translation>Fungsi-fungsi yang memanggil fungsi ini</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"358\"/>\n        <source>Functions called by this function</source>\n        <translation>Fungsi-fungsi yang disebut oleh fungsi ini</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"352\"/>\n        <source>Calls of this function or macro</source>\n        <translation>Panggilan ini fungsi atau makro</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"364\"/>\n        <source>Class which owns this member or method</source>\n        <translation>Kelas yang memiliki anggota atau metode ini</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"367\"/>\n        <source>Members or methods of this class</source>\n        <translation>Anggota atau metode kelas ini</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"370\"/>\n        <source>Parent of this class</source>\n        <translation>Orang tua dari kelas ini</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"373\"/>\n        <source>Children of this class</source>\n        <translation>Anak-anak kelas ini</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"376\"/>\n        <source>Files including this file</source>\n        <translation>File termasuk file ini</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"379\"/>\n        <source>Full path for file</source>\n        <translation>Path lengkap untuk file</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"382\"/>\n        <source>Functions or macros inside this file</source>\n        <translation>Fungsi atau Macro di dalam file ini</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"393\"/>\n        <source>CodeQuery DB Files</source>\n        <translation>CodeQuery DB file</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"396\"/>\n        <source>Open CQ database file</source>\n        <translation>Buka file database CQ</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"465\"/>\n        <source>Function Call Graph</source>\n        <translation>Grafik fungsi panggilan</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"469\"/>\n        <source>Class Inheritance Graph</source>\n        <translation>Kelas warisan grafik</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"485\"/>\n        <location filename=\"../searchhandler.cpp\" line=\"488\"/>\n        <source>If Exact Match is switched off, wildcard searches (* and ?) are supported</source>\n        <translation>Jika pencocokan sama persis dimatikan, pencarian wildcard (* dan?) yang didukung</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"560\"/>\n        <source>results found</source>\n        <translation>hasil ditemukan</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"579\"/>\n        <source>in progress</source>\n        <translation>sedang berlangsung</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"580\"/>\n        <source>Cancel</source>\n        <translation>Batal</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"677\"/>\n        <source>You have to first select an item from the list before pushing the Graph button.</source>\n        <translation>Anda harus memilih dulu item dari daftar sebelum menekan tombol grafik.</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"806\"/>\n        <source>File open error</source>\n        <translation>Buka file kesalahan</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"807\"/>\n        <source>Wrong file format</source>\n        <translation>Format file salah</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"808\"/>\n        <source>Incorrect CQ database version</source>\n        <translation>Salah CQ database versi</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"809\"/>\n        <source>OK</source>\n        <translation>Oke</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"811\"/>\n        <source>Unknown Error</source>\n        <translation>Error tidak diketahui</translation>\n    </message>\n</context>\n</TS>\n"
  },
  {
    "path": "gui/translations/codequery_it.ts",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!DOCTYPE TS>\n<TS version=\"2.0\" language=\"it_IT\">\n<context>\n    <name>DialogGraph</name>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"17\"/>\n        <source>Graph</source>\n        <translation>Grafico</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"26\"/>\n        <source>Please wait ...</source>\n        <translation>Attendere prego...</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"73\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"76\"/>\n        <source>Zoom Out</source>\n        <translation>Zoom indietro</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"96\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"99\"/>\n        <source>Zoom In</source>\n        <translation>Zoom In</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"126\"/>\n        <source>Number of levels:</source>\n        <translation>Numero di livelli:</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"156\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"159\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"162\"/>\n        <source>Save to DOT file</source>\n        <translation>Salvare file DOT</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"175\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"178\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"181\"/>\n        <source>Save Image</source>\n        <translation>Salva immagine</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"194\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"197\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"200\"/>\n        <source>Close</source>\n        <translation>Chiudere</translation>\n    </message>\n</context>\n<context>\n    <name>MainWindow</name>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"17\"/>\n        <source>CodeQuery</source>\n        <translation>CodeQuery</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"30\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"33\"/>\n        <source>Open Database</source>\n        <translation>Database aperto</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"79\"/>\n        <source>Auto-complete</source>\n        <translation>Completamento automatico</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"93\"/>\n        <source>Exact match</source>\n        <translation>Corrispondenza esatta</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"107\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"110\"/>\n        <source>File path filter</source>\n        <translation>Filtro percorso file</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"113\"/>\n        <source>Filter</source>\n        <translation>Filtro</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"129\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"132\"/>\n        <source>File path filter, wildcard searches (* and ?) are supported</source>\n        <translation>Filtro percorso file, ricerche con caratteri jolly (* e?) sono supportati</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"155\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"158\"/>\n        <source>Previous search term</source>\n        <translation>Termine di ricerca precedente</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"178\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"181\"/>\n        <source>Next search term</source>\n        <translation>Successivo al termine di ricerca</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"207\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"210\"/>\n        <source>If Exact Match is switched off, wildcard searches (* and ?) are supported</source>\n        <translation>Se la corrispondenza esatta è spento, ricerche con caratteri jolly (* e?) sono supportati</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"229\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"232\"/>\n        <source>Search</source>\n        <translation>Ricerca</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"252\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"255\"/>\n        <source>Paste and Search</source>\n        <translation>Incolla e ricerca</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"275\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"278\"/>\n        <source>List of all files</source>\n        <translation>elenco di tutti i file</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"301\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"304\"/>\n        <source>Draw graph</source>\n        <translation>Disegnare il grafico</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"361\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"364\"/>\n        <source>Previous File</source>\n        <translation>Precedente File</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"384\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"387\"/>\n        <source>Next File</source>\n        <translation>File successivo</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"407\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"410\"/>\n        <source>Open in Editor</source>\n        <translation>Aperto nell&apos;Editor</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"430\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"433\"/>\n        <source>Go to selected line</source>\n        <translation>Vai alla riga selezionata.</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"453\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"456\"/>\n        <source>Reduce font size</source>\n        <translation>Ridurre la dimensione del carattere</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"476\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"479\"/>\n        <source>Increase font size</source>\n        <translation>Aumentare la dimensione del carattere</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"506\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"509\"/>\n        <source>Copy, paste and search</source>\n        <translation>Copia, incolla e ricerca</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"529\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"532\"/>\n        <source>Symbol search only for paste and search</source>\n        <translation>Simbolo cerca solo pasta e ricerca</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"535\"/>\n        <source>Symbol only</source>\n        <translation>Unico simbolo</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"549\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"552\"/>\n        <source>Previous search result in this file</source>\n        <translation>Risultato della ricerca precedente in questo file</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"572\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"575\"/>\n        <source>Next search result in this file</source>\n        <translation>Risultati di ricerca successivo in questo file</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"607\"/>\n        <source>FilePath:0</source>\n        <translation>FilePath:0</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"636\"/>\n        <source>Sort by line number</source>\n        <translation>Ordina per numero di riga</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"641\"/>\n        <source>Sort by name</source>\n        <translation>Ordina per nome</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"691\"/>\n        <source>File</source>\n        <translation>File</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"698\"/>\n        <source>Options</source>\n        <translation>Opzioni</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"706\"/>\n        <source>Help</source>\n        <translation>Guida</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"718\"/>\n        <source>Exit</source>\n        <translation>Uscita</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"726\"/>\n        <source>Open</source>\n        <translation>Open</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"731\"/>\n        <source>About</source>\n        <translation>Info su</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"736\"/>\n        <source>External Editor</source>\n        <translation>Editor esterno</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"741\"/>\n        <source>Open CQ Database</source>\n        <translation>CQ Open Database</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"746\"/>\n        <source>Language</source>\n        <translation>Lingua</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"751\"/>\n        <source>About Qt</source>\n        <translation>Info su Qt</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"759\"/>\n        <source>File Viewer Settings</source>\n        <translation>Impostazioni del file Viewer</translation>\n    </message>\n</context>\n<context>\n    <name>aboutDialog</name>\n    <message>\n        <location filename=\"../ui/aboutDialog.ui\" line=\"23\"/>\n        <source>About CodeQuery</source>\n        <translation>Info su CodeQuery</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/aboutDialog.ui\" line=\"119\"/>\n        <source>OK</source>\n        <translation>Ok</translation>\n    </message>\n</context>\n<context>\n    <name>cqDialogGraph</name>\n    <message>\n        <location filename=\"../graphdialog.cpp\" line=\"81\"/>\n        <source>Images</source>\n        <translation>Immagini</translation>\n    </message>\n    <message>\n        <location filename=\"../graphdialog.cpp\" line=\"84\"/>\n        <source>Export Image</source>\n        <translation>Esportazione immagine</translation>\n    </message>\n    <message>\n        <location filename=\"../graphdialog.cpp\" line=\"95\"/>\n        <location filename=\"../graphdialog.cpp\" line=\"114\"/>\n        <source>File could not be saved!</source>\n        <translation>File non poteva essere salvato!</translation>\n    </message>\n    <message>\n        <location filename=\"../graphdialog.cpp\" line=\"103\"/>\n        <source>Export DOT file</source>\n        <translation>Esportare file DOT</translation>\n    </message>\n</context>\n<context>\n    <name>fileViewSettingsDialog</name>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"17\"/>\n        <source>File Viewer Settings</source>\n        <translation>Impostazioni del file Viewer</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"36\"/>\n        <source>Font</source>\n        <translation>Tipo di carattere</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"49\"/>\n        <source>Syntax highlight theme</source>\n        <translation>Tema di evidenziazione sintassi</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"62\"/>\n        <source>Tab Width (number of spaces)</source>\n        <translation>Larghezza scheda (numero di spazi)</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"122\"/>\n        <source>Cancel</source>\n        <translation>Annulla</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"135\"/>\n        <source>OK</source>\n        <translation>Ok</translation>\n    </message>\n</context>\n<context>\n    <name>fileviewer</name>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"248\"/>\n        <source>File not found</source>\n        <translation>File non trovato</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"255\"/>\n        <source>File could not be opened</source>\n        <translation>File non può essere aperto</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"269\"/>\n        <source>The source file to be viewed is newer than the CodeQuery database file. You are recommended to manually regenerate the CodeQuery database file.</source>\n        <translation>Il file di origine per essere visualizzati è più recente rispetto al file di database CodeQuery. Si raccomanda di rigenerare manualmente il file di database CodeQuery.</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"557\"/>\n        <source>Cancel</source>\n        <translation>Annulla</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"558\"/>\n        <source>OK</source>\n        <translation>Ok</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"560\"/>\n        <source>External Editor Configuration</source>\n        <translation>Configurazione Editor esterno</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"561\"/>\n        <source>Please enter the path and arguments for the external editor. Replace as follows:</source>\n        <translation>Inserisci il percorso e gli argomenti per l&apos;editor esterno. Sostituire come segue:</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"563\"/>\n        <source>for file path</source>\n        <translation>per il percorso del file</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"565\"/>\n        <source>for line number</source>\n        <translation>per numero di riga</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"567\"/>\n        <source>For example:</source>\n        <translation>Ad esempio:</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"592\"/>\n        <source>File could not be opened!</source>\n        <translation>File non può essere aperto!</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"617\"/>\n        <source>External editor could not be started. Please check Options!</source>\n        <translation>Editor esterno potrebbe non essere avviato. Si prega di controllare le opzioni!</translation>\n    </message>\n</context>\n<context>\n    <name>listhandler</name>\n    <message>\n        <location filename=\"../listhandler.cpp\" line=\"125\"/>\n        <source>Symbol</source>\n        <translation>Simbolo</translation>\n    </message>\n    <message>\n        <location filename=\"../listhandler.cpp\" line=\"126\"/>\n        <source>File</source>\n        <translation>File</translation>\n    </message>\n    <message>\n        <location filename=\"../listhandler.cpp\" line=\"129\"/>\n        <source>Line</source>\n        <translation>Linea</translation>\n    </message>\n    <message>\n        <location filename=\"../listhandler.cpp\" line=\"129\"/>\n        <source>Preview</source>\n        <translation>Anteprima</translation>\n    </message>\n</context>\n<context>\n    <name>mainwindow</name>\n    <message>\n        <location filename=\"../mainwindow.cpp\" line=\"160\"/>\n        <source>Cancel</source>\n        <translation>Annulla</translation>\n    </message>\n    <message>\n        <location filename=\"../mainwindow.cpp\" line=\"161\"/>\n        <source>OK</source>\n        <translation>Ok</translation>\n    </message>\n    <message>\n        <location filename=\"../mainwindow.cpp\" line=\"163\"/>\n        <source>Language</source>\n        <translation>Lingua</translation>\n    </message>\n    <message>\n        <location filename=\"../mainwindow.cpp\" line=\"164\"/>\n        <source>Select language:</source>\n        <translation>Seleziona lingua:</translation>\n    </message>\n</context>\n<context>\n    <name>searchhandler</name>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"346\"/>\n        <source>Symbol</source>\n        <translation>Simbolo</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"349\"/>\n        <source>Function or macro definition (Graph available)</source>\n        <translation>Definizione di funzione o macro (grafico disponibile)</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"361\"/>\n        <source>Class or struct (Graph available)</source>\n        <translation>Classe o struttura (grafico disponibile)</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"355\"/>\n        <source>Functions calling this function</source>\n        <translation>Funzioni di chiamata a questa funzione</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"358\"/>\n        <source>Functions called by this function</source>\n        <translation>Funzioni chiamate da questa funzione</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"352\"/>\n        <source>Calls of this function or macro</source>\n        <translation>Chiamate di questa funzione o macro</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"364\"/>\n        <source>Class which owns this member or method</source>\n        <translation>Classe che possiede questo membro o metodo.</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"367\"/>\n        <source>Members or methods of this class</source>\n        <translation>Membri o i metodi di questa classe</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"370\"/>\n        <source>Parent of this class</source>\n        <translation>Padre di questa classe</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"373\"/>\n        <source>Children of this class</source>\n        <translation>Bambini di questa classe</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"376\"/>\n        <source>Files including this file</source>\n        <translation>File incluso questo file</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"379\"/>\n        <source>Full path for file</source>\n        <translation>Percorso completo per il file</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"382\"/>\n        <source>Functions or macros inside this file</source>\n        <translation>Macro o funzioni all&apos;interno di questo file.</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"393\"/>\n        <source>CodeQuery DB Files</source>\n        <translation>CodeQuery DB file</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"396\"/>\n        <source>Open CQ database file</source>\n        <translation>Aprire il file database CQ</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"465\"/>\n        <source>Function Call Graph</source>\n        <translation>Funzione Call Graph</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"469\"/>\n        <source>Class Inheritance Graph</source>\n        <translation>Grafico di ereditarietà di classe</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"485\"/>\n        <location filename=\"../searchhandler.cpp\" line=\"488\"/>\n        <source>If Exact Match is switched off, wildcard searches (* and ?) are supported</source>\n        <translation>Se la corrispondenza esatta è spento, ricerche con caratteri jolly (* e?) sono supportati</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"560\"/>\n        <source>results found</source>\n        <translation>risultati trovati</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"579\"/>\n        <source>in progress</source>\n        <translation>in corso</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"580\"/>\n        <source>Cancel</source>\n        <translation>Annulla</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"677\"/>\n        <source>You have to first select an item from the list before pushing the Graph button.</source>\n        <translation>È necessario innanzitutto selezionare un elemento dall&apos;elenco prima di spingere il pulsante grafico.</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"806\"/>\n        <source>File open error</source>\n        <translation>Errore di file aperti</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"807\"/>\n        <source>Wrong file format</source>\n        <translation>Formato di file sbagliato</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"808\"/>\n        <source>Incorrect CQ database version</source>\n        <translation>Versione del database corretto CQ</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"809\"/>\n        <source>OK</source>\n        <translation>Ok</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"811\"/>\n        <source>Unknown Error</source>\n        <translation>Errore sconosciuto</translation>\n    </message>\n</context>\n</TS>\n"
  },
  {
    "path": "gui/translations/codequery_ja.ts",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!DOCTYPE TS>\n<TS version=\"2.0\" language=\"ja_JP\">\n<context>\n    <name>DialogGraph</name>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"17\"/>\n        <source>Graph</source>\n        <translation>グラフ</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"26\"/>\n        <source>Please wait ...</source>\n        <translation>お待ちください。。。</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"73\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"76\"/>\n        <source>Zoom Out</source>\n        <translation>ズーム アウト</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"96\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"99\"/>\n        <source>Zoom In</source>\n        <translation>ズームインします。</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"126\"/>\n        <source>Number of levels:</source>\n        <translation>レベル数:</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"156\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"159\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"162\"/>\n        <source>Save to DOT file</source>\n        <translation>ドット ファイルに保存します。</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"175\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"178\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"181\"/>\n        <source>Save Image</source>\n        <translation>画像を保存します。</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"194\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"197\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"200\"/>\n        <source>Close</source>\n        <translation>閉じる</translation>\n    </message>\n</context>\n<context>\n    <name>MainWindow</name>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"17\"/>\n        <source>CodeQuery</source>\n        <translation>CodeQuery</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"30\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"33\"/>\n        <source>Open Database</source>\n        <translation>データベースを開く</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"79\"/>\n        <source>Auto-complete</source>\n        <translation>自動車-完全な</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"93\"/>\n        <source>Exact match</source>\n        <translation>完全に一致します。</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"107\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"110\"/>\n        <source>File path filter</source>\n        <translation>ファイル パス フィルター</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"113\"/>\n        <source>Filter</source>\n        <translation>フィルター</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"129\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"132\"/>\n        <source>File path filter, wildcard searches (* and ?) are supported</source>\n        <translation>ファイル パス フィルター、ワイルドカード検索 (* と?) がサポートされています</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"155\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"158\"/>\n        <source>Previous search term</source>\n        <translation>前の検索クエリ</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"178\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"181\"/>\n        <source>Next search term</source>\n        <translation>次の検索用語</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"207\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"210\"/>\n        <source>If Exact Match is switched off, wildcard searches (* and ?) are supported</source>\n        <translation>完全に一致するワイルドカード検索を切り替えた場合 (* と?) サポートされています。</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"229\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"232\"/>\n        <source>Search</source>\n        <translation>検索</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"252\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"255\"/>\n        <source>Paste and Search</source>\n        <translation>貼り付け、検索</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"275\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"278\"/>\n        <source>List of all files</source>\n        <translation>すべてのファイルの一覧</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"301\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"304\"/>\n        <source>Draw graph</source>\n        <translation>グラフを描く</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"361\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"364\"/>\n        <source>Previous File</source>\n        <translation>以前のファイル</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"384\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"387\"/>\n        <source>Next File</source>\n        <translation>次のファイル</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"407\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"410\"/>\n        <source>Open in Editor</source>\n        <translation>エディターで開く</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"430\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"433\"/>\n        <source>Go to selected line</source>\n        <translation>選択した行に移動します。</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"453\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"456\"/>\n        <source>Reduce font size</source>\n        <translation>フォント サイズを小さく</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"476\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"479\"/>\n        <source>Increase font size</source>\n        <translation>フォント サイズを大きく</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"506\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"509\"/>\n        <source>Copy, paste and search</source>\n        <translation>コピー、貼り付け、検索</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"529\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"532\"/>\n        <source>Symbol search only for paste and search</source>\n        <translation>シンボル検索は、貼り付け、検索のみ</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"535\"/>\n        <source>Symbol only</source>\n        <translation>シンボルのみ</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"549\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"552\"/>\n        <source>Previous search result in this file</source>\n        <translation>このファイルの前の検索結果</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"572\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"575\"/>\n        <source>Next search result in this file</source>\n        <translation>このファイルの次の検索結果</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"607\"/>\n        <source>FilePath:0</source>\n        <translation>FilePath:0</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"636\"/>\n        <source>Sort by line number</source>\n        <translation>行番号順に並べ替えます</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"641\"/>\n        <source>Sort by name</source>\n        <translation>名前順に並べ替えます</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"691\"/>\n        <source>File</source>\n        <translation>ファイル</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"698\"/>\n        <source>Options</source>\n        <translation>オプション</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"706\"/>\n        <source>Help</source>\n        <translation>ヘルプ</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"718\"/>\n        <source>Exit</source>\n        <translation>終了</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"726\"/>\n        <source>Open</source>\n        <translation>オープン</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"731\"/>\n        <source>About</source>\n        <translation>について</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"736\"/>\n        <source>External Editor</source>\n        <translation>外部エディター</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"741\"/>\n        <source>Open CQ Database</source>\n        <translation>オープン cq, データベース</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"746\"/>\n        <source>Language</source>\n        <translation>言語</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"751\"/>\n        <source>About Qt</source>\n        <translation>Qt について</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"759\"/>\n        <source>File Viewer Settings</source>\n        <translation>ファイル ビューアーの設定</translation>\n    </message>\n</context>\n<context>\n    <name>aboutDialog</name>\n    <message>\n        <location filename=\"../ui/aboutDialog.ui\" line=\"23\"/>\n        <source>About CodeQuery</source>\n        <translation>CodeQuery について</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/aboutDialog.ui\" line=\"119\"/>\n        <source>OK</source>\n        <translation>わかりました</translation>\n    </message>\n</context>\n<context>\n    <name>cqDialogGraph</name>\n    <message>\n        <location filename=\"../graphdialog.cpp\" line=\"81\"/>\n        <source>Images</source>\n        <translation>画像</translation>\n    </message>\n    <message>\n        <location filename=\"../graphdialog.cpp\" line=\"84\"/>\n        <source>Export Image</source>\n        <translation>イメージをエクスポートします。</translation>\n    </message>\n    <message>\n        <location filename=\"../graphdialog.cpp\" line=\"95\"/>\n        <location filename=\"../graphdialog.cpp\" line=\"114\"/>\n        <source>File could not be saved!</source>\n        <translation>ファイルを保存できませんでした ！</translation>\n    </message>\n    <message>\n        <location filename=\"../graphdialog.cpp\" line=\"103\"/>\n        <source>Export DOT file</source>\n        <translation>ドット ファイルをエクスポートします。</translation>\n    </message>\n</context>\n<context>\n    <name>fileViewSettingsDialog</name>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"17\"/>\n        <source>File Viewer Settings</source>\n        <translation>ファイル ビューアーの設定</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"36\"/>\n        <source>Font</source>\n        <translation>フォント</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"49\"/>\n        <source>Syntax highlight theme</source>\n        <translation>構文強調表示テーマ</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"62\"/>\n        <source>Tab Width (number of spaces)</source>\n        <translation>タブ幅 (スペース数)</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"122\"/>\n        <source>Cancel</source>\n        <translation>キャンセル</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"135\"/>\n        <source>OK</source>\n        <translation>わかりました</translation>\n    </message>\n</context>\n<context>\n    <name>fileviewer</name>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"248\"/>\n        <source>File not found</source>\n        <translation>ファイルが見つかりません</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"255\"/>\n        <source>File could not be opened</source>\n        <translation>ファイルを開くことができません。</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"269\"/>\n        <source>The source file to be viewed is newer than the CodeQuery database file. You are recommended to manually regenerate the CodeQuery database file.</source>\n        <translation>ソース ファイルを表示するのには、CodeQuery データベース ファイルよりも新しいです。CodeQuery データベース ファイルを手動で再生成に推奨されます。</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"557\"/>\n        <source>Cancel</source>\n        <translation>キャンセル</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"558\"/>\n        <source>OK</source>\n        <translation>わかりました</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"560\"/>\n        <source>External Editor Configuration</source>\n        <translation>外部エディターの構成</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"561\"/>\n        <source>Please enter the path and arguments for the external editor. Replace as follows:</source>\n        <translation>外部エディターの引数とパスを入力してください。次のように置き換えます。</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"563\"/>\n        <source>for file path</source>\n        <translation>ファイルのパス</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"565\"/>\n        <source>for line number</source>\n        <translation>行番号について</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"567\"/>\n        <source>For example:</source>\n        <translation>たとえば。</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"592\"/>\n        <source>File could not be opened!</source>\n        <translation>ファイルを開くことができません ！</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"617\"/>\n        <source>External editor could not be started. Please check Options!</source>\n        <translation>外部エディターを開始できませんでした。オプションを確認してください ！</translation>\n    </message>\n</context>\n<context>\n    <name>listhandler</name>\n    <message>\n        <location filename=\"../listhandler.cpp\" line=\"125\"/>\n        <source>Symbol</source>\n        <translation>シンボル</translation>\n    </message>\n    <message>\n        <location filename=\"../listhandler.cpp\" line=\"126\"/>\n        <source>File</source>\n        <translation>ファイル</translation>\n    </message>\n    <message>\n        <location filename=\"../listhandler.cpp\" line=\"129\"/>\n        <source>Line</source>\n        <translation>ライン</translation>\n    </message>\n    <message>\n        <location filename=\"../listhandler.cpp\" line=\"129\"/>\n        <source>Preview</source>\n        <translation>プレビュー</translation>\n    </message>\n</context>\n<context>\n    <name>mainwindow</name>\n    <message>\n        <location filename=\"../mainwindow.cpp\" line=\"160\"/>\n        <source>Cancel</source>\n        <translation>キャンセル</translation>\n    </message>\n    <message>\n        <location filename=\"../mainwindow.cpp\" line=\"161\"/>\n        <source>OK</source>\n        <translation>わかりました</translation>\n    </message>\n    <message>\n        <location filename=\"../mainwindow.cpp\" line=\"163\"/>\n        <source>Language</source>\n        <translation>言語</translation>\n    </message>\n    <message>\n        <location filename=\"../mainwindow.cpp\" line=\"164\"/>\n        <source>Select language:</source>\n        <translation>言語の選択：</translation>\n    </message>\n</context>\n<context>\n    <name>searchhandler</name>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"346\"/>\n        <source>Symbol</source>\n        <translation>シンボル</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"349\"/>\n        <source>Function or macro definition (Graph available)</source>\n        <translation>関数またはマクロの定義 (グラフ)</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"361\"/>\n        <source>Class or struct (Graph available)</source>\n        <translation>クラスまたは構造体 (利用可能なグラフ)</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"355\"/>\n        <source>Functions calling this function</source>\n        <translation>この関数を呼び出す関数</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"358\"/>\n        <source>Functions called by this function</source>\n        <translation>この関数によって呼び出された関数</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"352\"/>\n        <source>Calls of this function or macro</source>\n        <translation>この関数やマクロの呼び出し</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"364\"/>\n        <source>Class which owns this member or method</source>\n        <translation>このメンバーまたはメソッドを所有しているクラス</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"367\"/>\n        <source>Members or methods of this class</source>\n        <translation>このクラスのメンバーやメソッド</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"370\"/>\n        <source>Parent of this class</source>\n        <translation>このクラスの親</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"373\"/>\n        <source>Children of this class</source>\n        <translation>このクラスの子供たち</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"376\"/>\n        <source>Files including this file</source>\n        <translation>このファイルを含むファイル</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"379\"/>\n        <source>Full path for file</source>\n        <translation>ファイルの完全なパス</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"382\"/>\n        <source>Functions or macros inside this file</source>\n        <translation>関数またはこのファイル内のマクロ</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"393\"/>\n        <source>CodeQuery DB Files</source>\n        <translation>CodeQuery DB ファイル</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"396\"/>\n        <source>Open CQ database file</source>\n        <translation>Cq, データベース ファイルを開く</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"465\"/>\n        <source>Function Call Graph</source>\n        <translation>関数コール グラフ</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"469\"/>\n        <source>Class Inheritance Graph</source>\n        <translation>クラス継承グラフ</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"485\"/>\n        <location filename=\"../searchhandler.cpp\" line=\"488\"/>\n        <source>If Exact Match is switched off, wildcard searches (* and ?) are supported</source>\n        <translation>完全に一致するワイルドカード検索を切り替えた場合 (* と?) サポートされています。</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"560\"/>\n        <source>results found</source>\n        <translation>検索結果</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"579\"/>\n        <source>in progress</source>\n        <translation>進行中</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"580\"/>\n        <source>Cancel</source>\n        <translation>キャンセル</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"677\"/>\n        <source>You have to first select an item from the list before pushing the Graph button.</source>\n        <translation>[グラフ] ボタンを押す前にまず一覧から項目を選択する必要があります。</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"806\"/>\n        <source>File open error</source>\n        <translation>ファイルを開くエラー</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"807\"/>\n        <source>Wrong file format</source>\n        <translation>ファイル フォーマット</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"808\"/>\n        <source>Incorrect CQ database version</source>\n        <translation>Cq, データベース バージョンが正しくないです。</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"809\"/>\n        <source>OK</source>\n        <translation>わかりました</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"811\"/>\n        <source>Unknown Error</source>\n        <translation>不明なエラー</translation>\n    </message>\n</context>\n</TS>\n"
  },
  {
    "path": "gui/translations/codequery_ko.ts",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!DOCTYPE TS>\n<TS version=\"2.0\" language=\"ko_KR\">\n<context>\n    <name>DialogGraph</name>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"17\"/>\n        <source>Graph</source>\n        <translation>그래프</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"26\"/>\n        <source>Please wait ...</source>\n        <translation>잠시만 기다려 주십시오...</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"73\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"76\"/>\n        <source>Zoom Out</source>\n        <translation>축소</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"96\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"99\"/>\n        <source>Zoom In</source>\n        <translation>확대</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"126\"/>\n        <source>Number of levels:</source>\n        <translation>수준의 수:</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"156\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"159\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"162\"/>\n        <source>Save to DOT file</source>\n        <translation>점 파일에 저장</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"175\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"178\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"181\"/>\n        <source>Save Image</source>\n        <translation>이미지 저장</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"194\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"197\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"200\"/>\n        <source>Close</source>\n        <translation>닫기</translation>\n    </message>\n</context>\n<context>\n    <name>MainWindow</name>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"17\"/>\n        <source>CodeQuery</source>\n        <translation>CodeQuery</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"30\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"33\"/>\n        <source>Open Database</source>\n        <translation>데이터베이스 열기</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"79\"/>\n        <source>Auto-complete</source>\n        <translation>자동 완성</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"93\"/>\n        <source>Exact match</source>\n        <translation>정확 하 게 일치</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"107\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"110\"/>\n        <source>File path filter</source>\n        <translation>파일 경로 필터</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"113\"/>\n        <source>Filter</source>\n        <translation>필터</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"129\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"132\"/>\n        <source>File path filter, wildcard searches (* and ?) are supported</source>\n        <translation>파일 경로 필터, 와일드 카드 검색 (* 및?) 지원</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"155\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"158\"/>\n        <source>Previous search term</source>\n        <translation>이전 검색어</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"178\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"181\"/>\n        <source>Next search term</source>\n        <translation>다음 검색어</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"207\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"210\"/>\n        <source>If Exact Match is switched off, wildcard searches (* and ?) are supported</source>\n        <translation>정확히 일치 하는 와일드 카드 검색을 전환 하는 경우 (* 및?) 지원</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"229\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"232\"/>\n        <source>Search</source>\n        <translation>검색</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"252\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"255\"/>\n        <source>Paste and Search</source>\n        <translation>붙여넣기 및 검색</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"275\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"278\"/>\n        <source>List of all files</source>\n        <translation>모든 파일의 목록</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"301\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"304\"/>\n        <source>Draw graph</source>\n        <translation>그래프 그리기</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"361\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"364\"/>\n        <source>Previous File</source>\n        <translation>이전 파일</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"384\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"387\"/>\n        <source>Next File</source>\n        <translation>다음 파일</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"407\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"410\"/>\n        <source>Open in Editor</source>\n        <translation>편집기에서 열려</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"430\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"433\"/>\n        <source>Go to selected line</source>\n        <translation>선택 된 줄으로 이동</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"453\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"456\"/>\n        <source>Reduce font size</source>\n        <translation>글꼴 크기 줄이기</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"476\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"479\"/>\n        <source>Increase font size</source>\n        <translation>글꼴 크기 증가</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"506\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"509\"/>\n        <source>Copy, paste and search</source>\n        <translation>복사, 붙여넣기 및 검색</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"529\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"532\"/>\n        <source>Symbol search only for paste and search</source>\n        <translation>붙여넣기 및 검색에 대해서만 기호 검색</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"535\"/>\n        <source>Symbol only</source>\n        <translation>상징만</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"549\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"552\"/>\n        <source>Previous search result in this file</source>\n        <translation>이 파일에서 이전 검색 결과</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"572\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"575\"/>\n        <source>Next search result in this file</source>\n        <translation>이 파일에서 다음 검색 결과</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"607\"/>\n        <source>FilePath:0</source>\n        <translation>FilePath:0</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"636\"/>\n        <source>Sort by line number</source>\n        <translation>줄 번호로 정렬 합니다</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"641\"/>\n        <source>Sort by name</source>\n        <translation>이름으로 정렬 합니다</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"691\"/>\n        <source>File</source>\n        <translation>파일</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"698\"/>\n        <source>Options</source>\n        <translation>옵션</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"706\"/>\n        <source>Help</source>\n        <translation>도움말</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"718\"/>\n        <source>Exit</source>\n        <translation>출구</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"726\"/>\n        <source>Open</source>\n        <translation>오픈</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"731\"/>\n        <source>About</source>\n        <translation>에 대 한</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"736\"/>\n        <source>External Editor</source>\n        <translation>외부 편집기</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"741\"/>\n        <source>Open CQ Database</source>\n        <translation>오픈 CQ 데이터베이스</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"746\"/>\n        <source>Language</source>\n        <translation>언어</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"751\"/>\n        <source>About Qt</source>\n        <translation>Qt에 대 한</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"759\"/>\n        <source>File Viewer Settings</source>\n        <translation>파일 뷰어 설정</translation>\n    </message>\n</context>\n<context>\n    <name>aboutDialog</name>\n    <message>\n        <location filename=\"../ui/aboutDialog.ui\" line=\"23\"/>\n        <source>About CodeQuery</source>\n        <translation>CodeQuery에 대 한</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/aboutDialog.ui\" line=\"119\"/>\n        <source>OK</source>\n        <translation>괜찮았던 것</translation>\n    </message>\n</context>\n<context>\n    <name>cqDialogGraph</name>\n    <message>\n        <location filename=\"../graphdialog.cpp\" line=\"81\"/>\n        <source>Images</source>\n        <translation>이미지</translation>\n    </message>\n    <message>\n        <location filename=\"../graphdialog.cpp\" line=\"84\"/>\n        <source>Export Image</source>\n        <translation>이미지 내보내기</translation>\n    </message>\n    <message>\n        <location filename=\"../graphdialog.cpp\" line=\"95\"/>\n        <location filename=\"../graphdialog.cpp\" line=\"114\"/>\n        <source>File could not be saved!</source>\n        <translation>파일을 저장할 수 없습니다!</translation>\n    </message>\n    <message>\n        <location filename=\"../graphdialog.cpp\" line=\"103\"/>\n        <source>Export DOT file</source>\n        <translation>도트 파일 내보내기</translation>\n    </message>\n</context>\n<context>\n    <name>fileViewSettingsDialog</name>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"17\"/>\n        <source>File Viewer Settings</source>\n        <translation>파일 뷰어 설정</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"36\"/>\n        <source>Font</source>\n        <translation>글꼴</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"49\"/>\n        <source>Syntax highlight theme</source>\n        <translation>구문 하이라이트 테마</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"62\"/>\n        <source>Tab Width (number of spaces)</source>\n        <translation>탭 너비 (공백 수)</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"122\"/>\n        <source>Cancel</source>\n        <translation>취소</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"135\"/>\n        <source>OK</source>\n        <translation>괜찮았던 것</translation>\n    </message>\n</context>\n<context>\n    <name>fileviewer</name>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"248\"/>\n        <source>File not found</source>\n        <translation>파일을 찾을 수 없습니다</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"255\"/>\n        <source>File could not be opened</source>\n        <translation>파일을 열 수 없습니다.</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"269\"/>\n        <source>The source file to be viewed is newer than the CodeQuery database file. You are recommended to manually regenerate the CodeQuery database file.</source>\n        <translation>소스 파일을 볼 수 CodeQuery 데이터베이스 파일 보다 최신입니다. CodeQuery 데이터베이스 파일을 수동으로 다시 생성 하는 것이 좋습니다.</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"557\"/>\n        <source>Cancel</source>\n        <translation>취소</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"558\"/>\n        <source>OK</source>\n        <translation>괜찮았던 것</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"560\"/>\n        <source>External Editor Configuration</source>\n        <translation>외부 편집기 구성</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"561\"/>\n        <source>Please enter the path and arguments for the external editor. Replace as follows:</source>\n        <translation>경로 및 외부 편집기에 대 한 인수를 입력 해 주시기 바랍니다. 다음과 같이 바꿉니다.</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"563\"/>\n        <source>for file path</source>\n        <translation>파일 경로 대 한</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"565\"/>\n        <source>for line number</source>\n        <translation>줄 번호에 대 한</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"567\"/>\n        <source>For example:</source>\n        <translation>예를 들어:</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"592\"/>\n        <source>File could not be opened!</source>\n        <translation>파일을 열 수 없습니다!</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"617\"/>\n        <source>External editor could not be started. Please check Options!</source>\n        <translation>외부 편집기를 시작할 수 없습니다. 옵션을 확인 하십시오!</translation>\n    </message>\n</context>\n<context>\n    <name>listhandler</name>\n    <message>\n        <location filename=\"../listhandler.cpp\" line=\"125\"/>\n        <source>Symbol</source>\n        <translation>기호</translation>\n    </message>\n    <message>\n        <location filename=\"../listhandler.cpp\" line=\"126\"/>\n        <source>File</source>\n        <translation>파일</translation>\n    </message>\n    <message>\n        <location filename=\"../listhandler.cpp\" line=\"129\"/>\n        <source>Line</source>\n        <translation>선</translation>\n    </message>\n    <message>\n        <location filename=\"../listhandler.cpp\" line=\"129\"/>\n        <source>Preview</source>\n        <translation>미리 보기</translation>\n    </message>\n</context>\n<context>\n    <name>mainwindow</name>\n    <message>\n        <location filename=\"../mainwindow.cpp\" line=\"160\"/>\n        <source>Cancel</source>\n        <translation>취소</translation>\n    </message>\n    <message>\n        <location filename=\"../mainwindow.cpp\" line=\"161\"/>\n        <source>OK</source>\n        <translation>괜찮았던 것</translation>\n    </message>\n    <message>\n        <location filename=\"../mainwindow.cpp\" line=\"163\"/>\n        <source>Language</source>\n        <translation>언어</translation>\n    </message>\n    <message>\n        <location filename=\"../mainwindow.cpp\" line=\"164\"/>\n        <source>Select language:</source>\n        <translation>언어 선택:</translation>\n    </message>\n</context>\n<context>\n    <name>searchhandler</name>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"346\"/>\n        <source>Symbol</source>\n        <translation>기호</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"349\"/>\n        <source>Function or macro definition (Graph available)</source>\n        <translation>함수 또는 매크로 정의 (그래프 제공)</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"361\"/>\n        <source>Class or struct (Graph available)</source>\n        <translation>클래스 또는 구조체 (그래프 제공)</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"355\"/>\n        <source>Functions calling this function</source>\n        <translation>이 함수를 호출 하는 함수</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"358\"/>\n        <source>Functions called by this function</source>\n        <translation>이 함수에 의해 호출 된 함수</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"352\"/>\n        <source>Calls of this function or macro</source>\n        <translation>이 함수 또는 매크로의 호출</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"364\"/>\n        <source>Class which owns this member or method</source>\n        <translation>클래스 멤버 또는 메서드가 소유 하 고 있는</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"367\"/>\n        <source>Members or methods of this class</source>\n        <translation>회원 또는이 클래스의 메서드</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"370\"/>\n        <source>Parent of this class</source>\n        <translation>이 클래스의 부모</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"373\"/>\n        <source>Children of this class</source>\n        <translation>이 클래스의 자식</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"376\"/>\n        <source>Files including this file</source>\n        <translation>이 파일을 포함 한 파일</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"379\"/>\n        <source>Full path for file</source>\n        <translation>파일의 전체 경로</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"382\"/>\n        <source>Functions or macros inside this file</source>\n        <translation>이 파일 안에 매크로 또는 함수</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"393\"/>\n        <source>CodeQuery DB Files</source>\n        <translation>CodeQuery DB 파일</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"396\"/>\n        <source>Open CQ database file</source>\n        <translation>CQ 데이터베이스 파일 열기</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"465\"/>\n        <source>Function Call Graph</source>\n        <translation>함수 호출 그래프</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"469\"/>\n        <source>Class Inheritance Graph</source>\n        <translation>클래스 상속 그래프</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"485\"/>\n        <location filename=\"../searchhandler.cpp\" line=\"488\"/>\n        <source>If Exact Match is switched off, wildcard searches (* and ?) are supported</source>\n        <translation>정확히 일치 하는 와일드 카드 검색을 전환 하는 경우 (* 및?) 지원</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"560\"/>\n        <source>results found</source>\n        <translation>찾은 결과</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"579\"/>\n        <source>in progress</source>\n        <translation>진행 중</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"580\"/>\n        <source>Cancel</source>\n        <translation>취소</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"677\"/>\n        <source>You have to first select an item from the list before pushing the Graph button.</source>\n        <translation>먼저 그래프 버튼을 추진 하기 전에 목록에서 항목을 선택 해야 합니다.</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"806\"/>\n        <source>File open error</source>\n        <translation>파일 열기 오류</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"807\"/>\n        <source>Wrong file format</source>\n        <translation>잘못 된 파일 형식</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"808\"/>\n        <source>Incorrect CQ database version</source>\n        <translation>잘못 된 CQ 데이터베이스 버전</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"809\"/>\n        <source>OK</source>\n        <translation>괜찮았던 것</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"811\"/>\n        <source>Unknown Error</source>\n        <translation>알 수 없는 오류</translation>\n    </message>\n</context>\n</TS>\n"
  },
  {
    "path": "gui/translations/codequery_zh-CHS.ts",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!DOCTYPE TS>\n<TS version=\"2.0\" language=\"zh_CN\">\n<context>\n    <name>DialogGraph</name>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"17\"/>\n        <source>Graph</source>\n        <translation>图</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"26\"/>\n        <source>Please wait ...</source>\n        <translation>请稍候。。。</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"73\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"76\"/>\n        <source>Zoom Out</source>\n        <translation>缩小</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"96\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"99\"/>\n        <source>Zoom In</source>\n        <translation>放大</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"126\"/>\n        <source>Number of levels:</source>\n        <translation>级别数:</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"156\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"159\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"162\"/>\n        <source>Save to DOT file</source>\n        <translation>将保存到点文件</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"175\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"178\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"181\"/>\n        <source>Save Image</source>\n        <translation>保存图像</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"194\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"197\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"200\"/>\n        <source>Close</source>\n        <translation>关闭</translation>\n    </message>\n</context>\n<context>\n    <name>MainWindow</name>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"17\"/>\n        <source>CodeQuery</source>\n        <translation>CodeQuery</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"30\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"33\"/>\n        <source>Open Database</source>\n        <translation>打开的数据库</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"79\"/>\n        <source>Auto-complete</source>\n        <translation>自动完成</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"93\"/>\n        <source>Exact match</source>\n        <translation>精确匹配</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"107\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"110\"/>\n        <source>File path filter</source>\n        <translation>文件路径筛选器</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"113\"/>\n        <source>Filter</source>\n        <translation>筛选器</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"129\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"132\"/>\n        <source>File path filter, wildcard searches (* and ?) are supported</source>\n        <translation>文件路径筛选器、 通配符搜索 （* 和?） 支持</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"155\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"158\"/>\n        <source>Previous search term</source>\n        <translation>以前的搜索词</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"178\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"181\"/>\n        <source>Next search term</source>\n        <translation>下一个搜索词</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"207\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"210\"/>\n        <source>If Exact Match is switched off, wildcard searches (* and ?) are supported</source>\n        <translation>如果精确匹配关掉，通配符搜索 （* 和?） 支持</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"229\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"232\"/>\n        <source>Search</source>\n        <translation>搜索</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"252\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"255\"/>\n        <source>Paste and Search</source>\n        <translation>粘贴并搜索</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"275\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"278\"/>\n        <source>List of all files</source>\n        <translation>所有文件列表</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"301\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"304\"/>\n        <source>Draw graph</source>\n        <translation>绘制关系图</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"361\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"364\"/>\n        <source>Previous File</source>\n        <translation>以前的文件</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"384\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"387\"/>\n        <source>Next File</source>\n        <translation>下一个文件</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"407\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"410\"/>\n        <source>Open in Editor</source>\n        <translation>在编辑器中打开</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"430\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"433\"/>\n        <source>Go to selected line</source>\n        <translation>转到所选行</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"453\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"456\"/>\n        <source>Reduce font size</source>\n        <translation>减小字体大小</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"476\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"479\"/>\n        <source>Increase font size</source>\n        <translation>增加字体大小</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"506\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"509\"/>\n        <source>Copy, paste and search</source>\n        <translation>复制、 粘贴和搜索</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"529\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"532\"/>\n        <source>Symbol search only for paste and search</source>\n        <translation>仅用于粘贴和搜索符号搜索</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"535\"/>\n        <source>Symbol only</source>\n        <translation>只有符号</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"549\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"552\"/>\n        <source>Previous search result in this file</source>\n        <translation>此文件中的上一个搜索结果</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"572\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"575\"/>\n        <source>Next search result in this file</source>\n        <translation>在此文件中的下一个搜索结果</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"607\"/>\n        <source>FilePath:0</source>\n        <translation>FilePath:0</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"636\"/>\n        <source>Sort by line number</source>\n        <translation>按行号排序</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"641\"/>\n        <source>Sort by name</source>\n        <translation>按名称排序</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"691\"/>\n        <source>File</source>\n        <translation>文件</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"698\"/>\n        <source>Options</source>\n        <translation>选项</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"706\"/>\n        <source>Help</source>\n        <translation>帮助</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"718\"/>\n        <source>Exit</source>\n        <translation>退出</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"726\"/>\n        <source>Open</source>\n        <translation>开放</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"731\"/>\n        <source>About</source>\n        <translation>关于</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"736\"/>\n        <source>External Editor</source>\n        <translation>外部编辑器</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"741\"/>\n        <source>Open CQ Database</source>\n        <translation>打开 CQ 数据库</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"746\"/>\n        <source>Language</source>\n        <translation>语言</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"751\"/>\n        <source>About Qt</source>\n        <translation>关于 Qt</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"759\"/>\n        <source>File Viewer Settings</source>\n        <translation>文件查看器设置</translation>\n    </message>\n</context>\n<context>\n    <name>aboutDialog</name>\n    <message>\n        <location filename=\"../ui/aboutDialog.ui\" line=\"23\"/>\n        <source>About CodeQuery</source>\n        <translation>关于 CodeQuery</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/aboutDialog.ui\" line=\"119\"/>\n        <source>OK</source>\n        <translation>还行</translation>\n    </message>\n</context>\n<context>\n    <name>cqDialogGraph</name>\n    <message>\n        <location filename=\"../graphdialog.cpp\" line=\"81\"/>\n        <source>Images</source>\n        <translation>图像</translation>\n    </message>\n    <message>\n        <location filename=\"../graphdialog.cpp\" line=\"84\"/>\n        <source>Export Image</source>\n        <translation>导出图像</translation>\n    </message>\n    <message>\n        <location filename=\"../graphdialog.cpp\" line=\"95\"/>\n        <location filename=\"../graphdialog.cpp\" line=\"114\"/>\n        <source>File could not be saved!</source>\n        <translation>无法保存文件 ！</translation>\n    </message>\n    <message>\n        <location filename=\"../graphdialog.cpp\" line=\"103\"/>\n        <source>Export DOT file</source>\n        <translation>出口点文件</translation>\n    </message>\n</context>\n<context>\n    <name>fileViewSettingsDialog</name>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"17\"/>\n        <source>File Viewer Settings</source>\n        <translation>文件查看器设置</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"36\"/>\n        <source>Font</source>\n        <translation>字体</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"49\"/>\n        <source>Syntax highlight theme</source>\n        <translation>语法突出显示主题</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"62\"/>\n        <source>Tab Width (number of spaces)</source>\n        <translation>标签宽度 （空格的数量）</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"122\"/>\n        <source>Cancel</source>\n        <translation>取消</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"135\"/>\n        <source>OK</source>\n        <translation>还行</translation>\n    </message>\n</context>\n<context>\n    <name>fileviewer</name>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"248\"/>\n        <source>File not found</source>\n        <translation>找不到文件</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"255\"/>\n        <source>File could not be opened</source>\n        <translation>不能打开文件</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"269\"/>\n        <source>The source file to be viewed is newer than the CodeQuery database file. You are recommended to manually regenerate the CodeQuery database file.</source>\n        <translation>要查看源文件是比 CodeQuery 数据库文件更新。建议您手动重新生成的 CodeQuery 数据库文件。</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"557\"/>\n        <source>Cancel</source>\n        <translation>取消</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"558\"/>\n        <source>OK</source>\n        <translation>还行</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"560\"/>\n        <source>External Editor Configuration</source>\n        <translation>外部编辑器配置</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"561\"/>\n        <source>Please enter the path and arguments for the external editor. Replace as follows:</source>\n        <translation>请输入路径和参数的外部编辑器。替换，如下所示：</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"563\"/>\n        <source>for file path</source>\n        <translation>文件路径</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"565\"/>\n        <source>for line number</source>\n        <translation>为行号</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"567\"/>\n        <source>For example:</source>\n        <translation>例如：</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"592\"/>\n        <source>File could not be opened!</source>\n        <translation>不能打开文件 ！</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"617\"/>\n        <source>External editor could not be started. Please check Options!</source>\n        <translation>无法启动外部编辑器。请检查选项 ！</translation>\n    </message>\n</context>\n<context>\n    <name>listhandler</name>\n    <message>\n        <location filename=\"../listhandler.cpp\" line=\"125\"/>\n        <source>Symbol</source>\n        <translation>符号</translation>\n    </message>\n    <message>\n        <location filename=\"../listhandler.cpp\" line=\"126\"/>\n        <source>File</source>\n        <translation>文件</translation>\n    </message>\n    <message>\n        <location filename=\"../listhandler.cpp\" line=\"129\"/>\n        <source>Line</source>\n        <translation>行</translation>\n    </message>\n    <message>\n        <location filename=\"../listhandler.cpp\" line=\"129\"/>\n        <source>Preview</source>\n        <translation>预览</translation>\n    </message>\n</context>\n<context>\n    <name>mainwindow</name>\n    <message>\n        <location filename=\"../mainwindow.cpp\" line=\"160\"/>\n        <source>Cancel</source>\n        <translation>取消</translation>\n    </message>\n    <message>\n        <location filename=\"../mainwindow.cpp\" line=\"161\"/>\n        <source>OK</source>\n        <translation>还行</translation>\n    </message>\n    <message>\n        <location filename=\"../mainwindow.cpp\" line=\"163\"/>\n        <source>Language</source>\n        <translation>语言</translation>\n    </message>\n    <message>\n        <location filename=\"../mainwindow.cpp\" line=\"164\"/>\n        <source>Select language:</source>\n        <translation>选择语言：</translation>\n    </message>\n</context>\n<context>\n    <name>searchhandler</name>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"346\"/>\n        <source>Symbol</source>\n        <translation>符号</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"349\"/>\n        <source>Function or macro definition (Graph available)</source>\n        <translation>函数或宏的定义 （Graph 中可用)</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"361\"/>\n        <source>Class or struct (Graph available)</source>\n        <translation>类或结构 （Graph 中可用）</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"355\"/>\n        <source>Functions calling this function</source>\n        <translation>调用此函数的函数</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"358\"/>\n        <source>Functions called by this function</source>\n        <translation>此函数调用的函数</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"352\"/>\n        <source>Calls of this function or macro</source>\n        <translation>此函数或宏的调用</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"364\"/>\n        <source>Class which owns this member or method</source>\n        <translation>拥有此成员或方法的类</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"367\"/>\n        <source>Members or methods of this class</source>\n        <translation>此类方法或成员</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"370\"/>\n        <source>Parent of this class</source>\n        <translation>此类的父</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"373\"/>\n        <source>Children of this class</source>\n        <translation>儿童的此类</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"376\"/>\n        <source>Files including this file</source>\n        <translation>此文件包括文件</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"379\"/>\n        <source>Full path for file</source>\n        <translation>文件的完整路径</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"382\"/>\n        <source>Functions or macros inside this file</source>\n        <translation>函数或此文件中的宏</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"393\"/>\n        <source>CodeQuery DB Files</source>\n        <translation>CodeQuery DB 文件</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"396\"/>\n        <source>Open CQ database file</source>\n        <translation>打开 CQ 数据库文件</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"465\"/>\n        <source>Function Call Graph</source>\n        <translation>函数的调用关系图</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"469\"/>\n        <source>Class Inheritance Graph</source>\n        <translation>类继承关系图</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"485\"/>\n        <location filename=\"../searchhandler.cpp\" line=\"488\"/>\n        <source>If Exact Match is switched off, wildcard searches (* and ?) are supported</source>\n        <translation>如果精确匹配关掉，通配符搜索 （* 和?） 支持</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"560\"/>\n        <source>results found</source>\n        <translation>找到的结果</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"579\"/>\n        <source>in progress</source>\n        <translation>在进行中</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"580\"/>\n        <source>Cancel</source>\n        <translation>取消</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"677\"/>\n        <source>You have to first select an item from the list before pushing the Graph button.</source>\n        <translation>您必须先推图形按钮之前从列表中选择一个项。</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"806\"/>\n        <source>File open error</source>\n        <translation>文件打开错误</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"807\"/>\n        <source>Wrong file format</source>\n        <translation>错误的文件格式</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"808\"/>\n        <source>Incorrect CQ database version</source>\n        <translation>CQ 数据库版本不正确</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"809\"/>\n        <source>OK</source>\n        <translation>还行</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"811\"/>\n        <source>Unknown Error</source>\n        <translation>未知的错误</translation>\n    </message>\n</context>\n</TS>\n"
  },
  {
    "path": "gui/translations/codequery_zh-CHT.ts",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!DOCTYPE TS>\n<TS version=\"2.0\" language=\"zh_CN\">\n<context>\n    <name>DialogGraph</name>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"17\"/>\n        <source>Graph</source>\n        <translation>圖</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"26\"/>\n        <source>Please wait ...</source>\n        <translation>請稍候。。。</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"73\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"76\"/>\n        <source>Zoom Out</source>\n        <translation>縮小</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"96\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"99\"/>\n        <source>Zoom In</source>\n        <translation>放大</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"126\"/>\n        <source>Number of levels:</source>\n        <translation>級別數:</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"156\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"159\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"162\"/>\n        <source>Save to DOT file</source>\n        <translation>將保存到點檔</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"175\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"178\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"181\"/>\n        <source>Save Image</source>\n        <translation>保存圖像</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/graphDialog.ui\" line=\"194\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"197\"/>\n        <location filename=\"../ui/graphDialog.ui\" line=\"200\"/>\n        <source>Close</source>\n        <translation>關閉</translation>\n    </message>\n</context>\n<context>\n    <name>MainWindow</name>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"17\"/>\n        <source>CodeQuery</source>\n        <translation>CodeQuery</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"30\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"33\"/>\n        <source>Open Database</source>\n        <translation>打開的資料庫</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"79\"/>\n        <source>Auto-complete</source>\n        <translation>自動完成</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"93\"/>\n        <source>Exact match</source>\n        <translation>精確匹配</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"107\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"110\"/>\n        <source>File path filter</source>\n        <translation>檔路徑篩選器</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"113\"/>\n        <source>Filter</source>\n        <translation>篩選器</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"129\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"132\"/>\n        <source>File path filter, wildcard searches (* and ?) are supported</source>\n        <translation>檔路徑篩選器、 萬用字元搜尋 （* 和?） 支援</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"155\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"158\"/>\n        <source>Previous search term</source>\n        <translation>以前的搜索詞</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"178\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"181\"/>\n        <source>Next search term</source>\n        <translation>下一個搜索詞</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"207\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"210\"/>\n        <source>If Exact Match is switched off, wildcard searches (* and ?) are supported</source>\n        <translation>如果精確匹配關掉，萬用字元搜尋 （* 和?） 支援</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"229\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"232\"/>\n        <source>Search</source>\n        <translation>搜索</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"252\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"255\"/>\n        <source>Paste and Search</source>\n        <translation>粘貼並搜索</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"275\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"278\"/>\n        <source>List of all files</source>\n        <translation>所有檔案清單</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"301\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"304\"/>\n        <source>Draw graph</source>\n        <translation>繪製關係圖</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"361\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"364\"/>\n        <source>Previous File</source>\n        <translation>以前的檔</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"384\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"387\"/>\n        <source>Next File</source>\n        <translation>下一個檔</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"407\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"410\"/>\n        <source>Open in Editor</source>\n        <translation>在編輯器中打開</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"430\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"433\"/>\n        <source>Go to selected line</source>\n        <translation>轉到所選行</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"453\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"456\"/>\n        <source>Reduce font size</source>\n        <translation>減小字體大小</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"476\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"479\"/>\n        <source>Increase font size</source>\n        <translation>增加字體大小</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"506\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"509\"/>\n        <source>Copy, paste and search</source>\n        <translation>複製、 粘貼和搜索</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"529\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"532\"/>\n        <source>Symbol search only for paste and search</source>\n        <translation>僅用於粘貼和搜索符號搜索</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"535\"/>\n        <source>Symbol only</source>\n        <translation>只有符號</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"549\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"552\"/>\n        <source>Previous search result in this file</source>\n        <translation>此檔中的上一個搜尋結果</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"572\"/>\n        <location filename=\"../ui/mainWindow.ui\" line=\"575\"/>\n        <source>Next search result in this file</source>\n        <translation>在此檔中的下一個搜尋結果</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"607\"/>\n        <source>FilePath:0</source>\n        <translation>FilePath:0</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"636\"/>\n        <source>Sort by line number</source>\n        <translation>按行號排序</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"641\"/>\n        <source>Sort by name</source>\n        <translation>按名稱排序</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"691\"/>\n        <source>File</source>\n        <translation>檔</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"698\"/>\n        <source>Options</source>\n        <translation>選項</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"706\"/>\n        <source>Help</source>\n        <translation>説明</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"718\"/>\n        <source>Exit</source>\n        <translation>退出</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"726\"/>\n        <source>Open</source>\n        <translation>開放</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"731\"/>\n        <source>About</source>\n        <translation>關於</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"736\"/>\n        <source>External Editor</source>\n        <translation>外部編輯器</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"741\"/>\n        <source>Open CQ Database</source>\n        <translation>打開 CQ 資料庫</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"746\"/>\n        <source>Language</source>\n        <translation>語言</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"751\"/>\n        <source>About Qt</source>\n        <translation>關於 Qt</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/mainWindow.ui\" line=\"759\"/>\n        <source>File Viewer Settings</source>\n        <translation>檔檢視器設置</translation>\n    </message>\n</context>\n<context>\n    <name>aboutDialog</name>\n    <message>\n        <location filename=\"../ui/aboutDialog.ui\" line=\"23\"/>\n        <source>About CodeQuery</source>\n        <translation>關於 CodeQuery</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/aboutDialog.ui\" line=\"119\"/>\n        <source>OK</source>\n        <translation>還行</translation>\n    </message>\n</context>\n<context>\n    <name>cqDialogGraph</name>\n    <message>\n        <location filename=\"../graphdialog.cpp\" line=\"81\"/>\n        <source>Images</source>\n        <translation>圖像</translation>\n    </message>\n    <message>\n        <location filename=\"../graphdialog.cpp\" line=\"84\"/>\n        <source>Export Image</source>\n        <translation>匯出圖像</translation>\n    </message>\n    <message>\n        <location filename=\"../graphdialog.cpp\" line=\"95\"/>\n        <location filename=\"../graphdialog.cpp\" line=\"114\"/>\n        <source>File could not be saved!</source>\n        <translation>無法保存檔 ！</translation>\n    </message>\n    <message>\n        <location filename=\"../graphdialog.cpp\" line=\"103\"/>\n        <source>Export DOT file</source>\n        <translation>出口點檔</translation>\n    </message>\n</context>\n<context>\n    <name>fileViewSettingsDialog</name>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"17\"/>\n        <source>File Viewer Settings</source>\n        <translation>檔檢視器設置</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"36\"/>\n        <source>Font</source>\n        <translation>字體</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"49\"/>\n        <source>Syntax highlight theme</source>\n        <translation>語法突出顯示主題</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"62\"/>\n        <source>Tab Width (number of spaces)</source>\n        <translation>標籤寬度 （空格的數量）</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"122\"/>\n        <source>Cancel</source>\n        <translation>取消</translation>\n    </message>\n    <message>\n        <location filename=\"../ui/fileViewSettingsDialog.ui\" line=\"135\"/>\n        <source>OK</source>\n        <translation>還行</translation>\n    </message>\n</context>\n<context>\n    <name>fileviewer</name>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"248\"/>\n        <source>File not found</source>\n        <translation>找不到檔</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"255\"/>\n        <source>File could not be opened</source>\n        <translation>不能打開檔</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"269\"/>\n        <source>The source file to be viewed is newer than the CodeQuery database file. You are recommended to manually regenerate the CodeQuery database file.</source>\n        <translation>要查看原始檔案是比 CodeQuery 資料庫檔案更新。建議您手動重新生成的 CodeQuery 資料庫檔案。</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"557\"/>\n        <source>Cancel</source>\n        <translation>取消</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"558\"/>\n        <source>OK</source>\n        <translation>還行</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"560\"/>\n        <source>External Editor Configuration</source>\n        <translation>外部編輯器配置</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"561\"/>\n        <source>Please enter the path and arguments for the external editor. Replace as follows:</source>\n        <translation>請輸入路徑和參數的外部編輯器。替換，如下所示：</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"563\"/>\n        <source>for file path</source>\n        <translation>檔路徑</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"565\"/>\n        <source>for line number</source>\n        <translation>為行號</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"567\"/>\n        <source>For example:</source>\n        <translation>例如：</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"592\"/>\n        <source>File could not be opened!</source>\n        <translation>不能打開檔 ！</translation>\n    </message>\n    <message>\n        <location filename=\"../fileviewer.cpp\" line=\"617\"/>\n        <source>External editor could not be started. Please check Options!</source>\n        <translation>無法啟動外部編輯器。請檢查選項 ！</translation>\n    </message>\n</context>\n<context>\n    <name>listhandler</name>\n    <message>\n        <location filename=\"../listhandler.cpp\" line=\"125\"/>\n        <source>Symbol</source>\n        <translation>符號</translation>\n    </message>\n    <message>\n        <location filename=\"../listhandler.cpp\" line=\"126\"/>\n        <source>File</source>\n        <translation>檔</translation>\n    </message>\n    <message>\n        <location filename=\"../listhandler.cpp\" line=\"129\"/>\n        <source>Line</source>\n        <translation>行</translation>\n    </message>\n    <message>\n        <location filename=\"../listhandler.cpp\" line=\"129\"/>\n        <source>Preview</source>\n        <translation>預覽</translation>\n    </message>\n</context>\n<context>\n    <name>mainwindow</name>\n    <message>\n        <location filename=\"../mainwindow.cpp\" line=\"160\"/>\n        <source>Cancel</source>\n        <translation>取消</translation>\n    </message>\n    <message>\n        <location filename=\"../mainwindow.cpp\" line=\"161\"/>\n        <source>OK</source>\n        <translation>還行</translation>\n    </message>\n    <message>\n        <location filename=\"../mainwindow.cpp\" line=\"163\"/>\n        <source>Language</source>\n        <translation>語言</translation>\n    </message>\n    <message>\n        <location filename=\"../mainwindow.cpp\" line=\"164\"/>\n        <source>Select language:</source>\n        <translation>選擇語言：</translation>\n    </message>\n</context>\n<context>\n    <name>searchhandler</name>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"346\"/>\n        <source>Symbol</source>\n        <translation>符號</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"349\"/>\n        <source>Function or macro definition (Graph available)</source>\n        <translation>函數或宏的定義 （Graph 中可用)</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"361\"/>\n        <source>Class or struct (Graph available)</source>\n        <translation>類或結構 （Graph 中可用）</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"355\"/>\n        <source>Functions calling this function</source>\n        <translation>調用此函數的函數</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"358\"/>\n        <source>Functions called by this function</source>\n        <translation>此函式呼叫的函數</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"352\"/>\n        <source>Calls of this function or macro</source>\n        <translation>此函數或宏的調用</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"364\"/>\n        <source>Class which owns this member or method</source>\n        <translation>擁有此成員或方法的類</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"367\"/>\n        <source>Members or methods of this class</source>\n        <translation>此類方法或成員</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"370\"/>\n        <source>Parent of this class</source>\n        <translation>此類的父</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"373\"/>\n        <source>Children of this class</source>\n        <translation>兒童的此類</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"376\"/>\n        <source>Files including this file</source>\n        <translation>此檔包括檔</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"379\"/>\n        <source>Full path for file</source>\n        <translation>檔的完整路徑</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"382\"/>\n        <source>Functions or macros inside this file</source>\n        <translation>函數或此檔中的宏</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"393\"/>\n        <source>CodeQuery DB Files</source>\n        <translation>CodeQuery DB 檔</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"396\"/>\n        <source>Open CQ database file</source>\n        <translation>打開 CQ 資料庫檔案</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"465\"/>\n        <source>Function Call Graph</source>\n        <translation>函數的調用關係圖</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"469\"/>\n        <source>Class Inheritance Graph</source>\n        <translation>類繼承關係圖</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"485\"/>\n        <location filename=\"../searchhandler.cpp\" line=\"488\"/>\n        <source>If Exact Match is switched off, wildcard searches (* and ?) are supported</source>\n        <translation>如果精確匹配關掉，萬用字元搜尋 （* 和?） 支援</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"560\"/>\n        <source>results found</source>\n        <translation>找到的結果</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"579\"/>\n        <source>in progress</source>\n        <translation>在進行中</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"580\"/>\n        <source>Cancel</source>\n        <translation>取消</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"677\"/>\n        <source>You have to first select an item from the list before pushing the Graph button.</source>\n        <translation>您必須先推圖形按鈕之前從清單中選擇一個項。</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"806\"/>\n        <source>File open error</source>\n        <translation>檔打開錯誤</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"807\"/>\n        <source>Wrong file format</source>\n        <translation>錯誤的檔案格式</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"808\"/>\n        <source>Incorrect CQ database version</source>\n        <translation>CQ 資料庫版本不正確</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"809\"/>\n        <source>OK</source>\n        <translation>還行</translation>\n    </message>\n    <message>\n        <location filename=\"../searchhandler.cpp\" line=\"811\"/>\n        <source>Unknown Error</source>\n        <translation>未知的錯誤</translation>\n    </message>\n</context>\n</TS>\n"
  },
  {
    "path": "gui/translations/dolupdate.pl",
    "content": "\n\n# lupdate\n#\n# This license applies only to this file:\n#\n# Copyright (c) 2013 ruben2020\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to\n# deal in the Software without restriction, including without limitation the\n# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n# sell copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be included in\n# all copies or substantial portions of the Software.\n#\n# THE SOTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n#\n\nuse strict;\n\nmy @langfiles;\nopen(FIL, \"./tslist.txt\");\nwhile(<FIL>)\n{\n\tchomp;\n\tif (/\\{[ \\t]*\\\"(.+)\\\"[ \\t]*,[ \\t]*\\\"(.+)\\\"[ \\t]*\\}/)\n\t{\n\t\tpush @langfiles, $2;\n\t}\n}\nclose(FIL);\n\nforeach(@langfiles)\n{\n\tsystem(\"lupdate-qt4 -no-obsolete ../*.cpp ../ui/*.ui -ts ./$_.ts\");\n}\n\n\n"
  },
  {
    "path": "gui/translations/dowebtranslate.pl",
    "content": "\n\n# Automatically web-translate ts files.\n#\n# This license applies only to this file:\n#\n# Copyright (c) 2013 ruben2020\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to\n# deal in the Software without restriction, including without limitation the\n# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n# sell copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be included in\n# all copies or substantial portions of the Software.\n#\n# THE SOTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n#\n\nuse strict;\nuse HTTP::Request::Common qw(POST);  \nuse LWP::UserAgent; \n\nmy @langfiles;\nopen(FIL, \"./tslist.txt\");\nwhile(<FIL>)\n{\n\tchomp;\n\tif (/\\{[ \\t]*\\\"(.+)\\\"[ \\t]*,[ \\t]*\\\"(.+)\\\"[ \\t]*\\}/)\n\t{\n\t\tpush @langfiles, $2;\n\t}\n}\nclose(FIL);\n\nforeach(@langfiles)\n{\n\tsystem(\"lupdate-qt4 -no-obsolete ../*.cpp ../ui/*.ui -ts ./$_.ts\");\n}\n\nmy $langout;\nmy $langfil;\nforeach(@langfiles)\n{\n\t$langfil = \"./$_.ts\";\n\tif ($_ =~ /codequery\\_([A-Za-z0-9-]+)/) {$langout = $1;}\n\tif ($langout eq 'en') {next;}\n\tprint \"Web translating $langfil $langout ...\\n\";\n\t&translatedoc($langfil, $langout);\n}\n\n\n#############################################\nsub translatedoc\n{\nmy ($fn, $lang) = @_;\nmy $ua = LWP::UserAgent->new();  \nmy $req = POST 'http://maille.tk/translate/index-curl.php',\n              Content_Type => 'multipart/form-data',\n              Content => [ \n             \"bingkey\" => \"689AC7C9ABE8CF4C53B930FE1A0019F73C0C8AB5\",\n             \"languagein\" => \"en\",\n             \"languageout\" => $lang,\n             \"output\" => \"pofile\",\n             \"pofile\" => [$fn]\n]; \nmy $resp = $ua->request($req);\nmy @respxml;\nif ($resp->is_success)\n{\n\topen(FILO, \">$fn\");\n\t@respxml = split /\\n/, $resp->content;\n\t$respxml[0] =~ s/^[ \\t]*<\\?xml/<?xml/;\n\tprint FILO join(\"\\n\", @respxml);\n\tclose(FILO);\n}\nelse {print $resp->as_string;}\n\n}\n\n\n"
  },
  {
    "path": "gui/translations/tslist.txt",
    "content": "{\"English\", \"codequery_en\" },\n{\"Deutsch\", \"codequery_de\" },\n{\"Fran\\347ais\", \"codequery_fr\" },\n{\"Espa\\361ol\", \"codequery_es\" },\n{\"Italiano\", \"codequery_it\" },\n{\"Bahasa Indonesia\", \"codequery_id\" },\n{\"Chinese Simplified\", \"codequery_zh-CHS\" },\n{\"Chinese Traditional\", \"codequery_zh-CHT\" },\n{\"Japanese\", \"codequery_ja\" },\n{\"Korean\", \"codequery_ko\" },\n\n"
  },
  {
    "path": "gui/ui/aboutDialog.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- This Source Code Form is subject to the terms of the Mozilla Public\n   - License, v. 2.0. If a copy of the MPL was not distributed with this\n   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->\n<ui version=\"4.0\">\n <class>aboutDialog</class>\n <widget class=\"QDialog\" name=\"aboutDialog\">\n  <property name=\"geometry\">\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>400</width>\n    <height>300</height>\n   </rect>\n  </property>\n  <property name=\"sizePolicy\">\n   <sizepolicy hsizetype=\"Fixed\" vsizetype=\"Fixed\">\n    <horstretch>0</horstretch>\n    <verstretch>0</verstretch>\n   </sizepolicy>\n  </property>\n  <property name=\"windowTitle\">\n   <string>About CodeQuery</string>\n  </property>\n  <property name=\"modal\">\n   <bool>true</bool>\n  </property>\n  <layout class=\"QHBoxLayout\" name=\"horizontalLayout\">\n   <item>\n    <layout class=\"QVBoxLayout\" name=\"verticalLayout\">\n     <item>\n      <layout class=\"QHBoxLayout\" name=\"horizontalLayout_2\">\n       <item>\n        <widget class=\"QLabel\" name=\"labelLogo\">\n         <property name=\"sizePolicy\">\n          <sizepolicy hsizetype=\"Minimum\" vsizetype=\"Preferred\">\n           <horstretch>0</horstretch>\n           <verstretch>0</verstretch>\n          </sizepolicy>\n         </property>\n         <property name=\"text\">\n          <string/>\n         </property>\n         <property name=\"pixmap\">\n          <pixmap resource=\"../codequery.qrc\">:/mainwindow/images/logo.png</pixmap>\n         </property>\n         <property name=\"openExternalLinks\">\n          <bool>false</bool>\n         </property>\n        </widget>\n       </item>\n       <item>\n        <widget class=\"QLabel\" name=\"labelTitle\">\n         <property name=\"sizePolicy\">\n          <sizepolicy hsizetype=\"Expanding\" vsizetype=\"Expanding\">\n           <horstretch>0</horstretch>\n           <verstretch>0</verstretch>\n          </sizepolicy>\n         </property>\n         <property name=\"text\">\n          <string/>\n         </property>\n         <property name=\"alignment\">\n          <set>Qt::AlignCenter</set>\n         </property>\n         <property name=\"wordWrap\">\n          <bool>true</bool>\n         </property>\n         <property name=\"openExternalLinks\">\n          <bool>true</bool>\n         </property>\n        </widget>\n       </item>\n      </layout>\n     </item>\n     <item>\n      <widget class=\"QLabel\" name=\"labelLicense\">\n       <property name=\"sizePolicy\">\n        <sizepolicy hsizetype=\"Expanding\" vsizetype=\"Expanding\">\n         <horstretch>0</horstretch>\n         <verstretch>0</verstretch>\n        </sizepolicy>\n       </property>\n       <property name=\"text\">\n        <string/>\n       </property>\n       <property name=\"wordWrap\">\n        <bool>true</bool>\n       </property>\n       <property name=\"openExternalLinks\">\n        <bool>true</bool>\n       </property>\n      </widget>\n     </item>\n     <item>\n      <layout class=\"QHBoxLayout\" name=\"horizontalLayout_3\">\n       <item>\n        <spacer name=\"horizontalSpacer\">\n         <property name=\"orientation\">\n          <enum>Qt::Horizontal</enum>\n         </property>\n         <property name=\"sizeHint\" stdset=\"0\">\n          <size>\n           <width>40</width>\n           <height>20</height>\n          </size>\n         </property>\n        </spacer>\n       </item>\n       <item>\n        <widget class=\"QPushButton\" name=\"pushButtonCloseAbout\">\n         <property name=\"sizePolicy\">\n          <sizepolicy hsizetype=\"Fixed\" vsizetype=\"Fixed\">\n           <horstretch>0</horstretch>\n           <verstretch>0</verstretch>\n          </sizepolicy>\n         </property>\n         <property name=\"text\">\n          <string>OK</string>\n         </property>\n        </widget>\n       </item>\n      </layout>\n     </item>\n    </layout>\n   </item>\n  </layout>\n </widget>\n <resources>\n  <include location=\"../codequery.qrc\"/>\n </resources>\n <connections/>\n</ui>\n"
  },
  {
    "path": "gui/ui/fileViewSettingsDialog.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- This Source Code Form is subject to the terms of the Mozilla Public\n   - License, v. 2.0. If a copy of the MPL was not distributed with this\n   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->\n<ui version=\"4.0\">\n <class>fileViewSettingsDialog</class>\n <widget class=\"QDialog\" name=\"fileViewSettingsDialog\">\n  <property name=\"geometry\">\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>423</width>\n    <height>162</height>\n   </rect>\n  </property>\n  <property name=\"windowTitle\">\n   <string>File Viewer Settings</string>\n  </property>\n  <property name=\"modal\">\n   <bool>true</bool>\n  </property>\n  <layout class=\"QHBoxLayout\" name=\"horizontalLayout\">\n   <item>\n    <layout class=\"QVBoxLayout\" name=\"verticalLayout\">\n     <item>\n      <layout class=\"QGridLayout\" name=\"gridLayout\">\n       <item row=\"0\" column=\"0\">\n        <widget class=\"QLabel\" name=\"labelFont\">\n         <property name=\"sizePolicy\">\n          <sizepolicy hsizetype=\"Preferred\" vsizetype=\"Minimum\">\n           <horstretch>0</horstretch>\n           <verstretch>0</verstretch>\n          </sizepolicy>\n         </property>\n         <property name=\"text\">\n          <string>Font</string>\n         </property>\n        </widget>\n       </item>\n       <item row=\"2\" column=\"0\">\n        <widget class=\"QLabel\" name=\"labelTheme\">\n         <property name=\"sizePolicy\">\n          <sizepolicy hsizetype=\"Preferred\" vsizetype=\"Minimum\">\n           <horstretch>0</horstretch>\n           <verstretch>0</verstretch>\n          </sizepolicy>\n         </property>\n         <property name=\"text\">\n          <string>Syntax highlight theme</string>\n         </property>\n        </widget>\n       </item>\n       <item row=\"1\" column=\"0\">\n        <widget class=\"QLabel\" name=\"labelTabWidth\">\n         <property name=\"sizePolicy\">\n          <sizepolicy hsizetype=\"Preferred\" vsizetype=\"Minimum\">\n           <horstretch>0</horstretch>\n           <verstretch>0</verstretch>\n          </sizepolicy>\n         </property>\n         <property name=\"text\">\n          <string>Tab Width (number of spaces)</string>\n         </property>\n        </widget>\n       </item>\n       <item row=\"1\" column=\"1\">\n        <widget class=\"QLineEdit\" name=\"lineEditTabWidth\">\n         <property name=\"sizePolicy\">\n          <sizepolicy hsizetype=\"Expanding\" vsizetype=\"Minimum\">\n           <horstretch>0</horstretch>\n           <verstretch>0</verstretch>\n          </sizepolicy>\n         </property>\n        </widget>\n       </item>\n       <item row=\"2\" column=\"1\">\n        <widget class=\"QComboBox\" name=\"comboBoxTheme\">\n         <property name=\"sizePolicy\">\n          <sizepolicy hsizetype=\"MinimumExpanding\" vsizetype=\"Minimum\">\n           <horstretch>0</horstretch>\n           <verstretch>0</verstretch>\n          </sizepolicy>\n         </property>\n        </widget>\n       </item>\n       <item row=\"0\" column=\"1\">\n        <widget class=\"QComboBox\" name=\"comboBoxFont\">\n         <property name=\"sizePolicy\">\n          <sizepolicy hsizetype=\"MinimumExpanding\" vsizetype=\"Minimum\">\n           <horstretch>0</horstretch>\n           <verstretch>0</verstretch>\n          </sizepolicy>\n         </property>\n        </widget>\n       </item>\n      </layout>\n     </item>\n     <item>\n      <layout class=\"QHBoxLayout\" name=\"horizontalLayout_2\">\n       <item>\n        <spacer name=\"horizontalSpacer\">\n         <property name=\"orientation\">\n          <enum>Qt::Horizontal</enum>\n         </property>\n         <property name=\"sizeHint\" stdset=\"0\">\n          <size>\n           <width>40</width>\n           <height>20</height>\n          </size>\n         </property>\n        </spacer>\n       </item>\n       <item>\n        <widget class=\"QPushButton\" name=\"pushButtonCancel\">\n         <property name=\"sizePolicy\">\n          <sizepolicy hsizetype=\"Fixed\" vsizetype=\"Fixed\">\n           <horstretch>0</horstretch>\n           <verstretch>0</verstretch>\n          </sizepolicy>\n         </property>\n         <property name=\"text\">\n          <string>Cancel</string>\n         </property>\n        </widget>\n       </item>\n       <item>\n        <widget class=\"QPushButton\" name=\"pushButtonOK\">\n         <property name=\"sizePolicy\">\n          <sizepolicy hsizetype=\"Fixed\" vsizetype=\"Fixed\">\n           <horstretch>0</horstretch>\n           <verstretch>0</verstretch>\n          </sizepolicy>\n         </property>\n         <property name=\"text\">\n          <string>OK</string>\n         </property>\n        </widget>\n       </item>\n      </layout>\n     </item>\n    </layout>\n   </item>\n  </layout>\n </widget>\n <tabstops>\n  <tabstop>comboBoxFont</tabstop>\n  <tabstop>lineEditTabWidth</tabstop>\n  <tabstop>comboBoxTheme</tabstop>\n </tabstops>\n <resources/>\n <connections/>\n</ui>\n"
  },
  {
    "path": "gui/ui/graphDialog.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- This Source Code Form is subject to the terms of the Mozilla Public\n   - License, v. 2.0. If a copy of the MPL was not distributed with this\n   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->\n<ui version=\"4.0\">\n <class>DialogGraph</class>\n <widget class=\"QDialog\" name=\"DialogGraph\">\n  <property name=\"geometry\">\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>999</width>\n    <height>713</height>\n   </rect>\n  </property>\n  <property name=\"windowTitle\">\n   <string>Graph</string>\n  </property>\n  <property name=\"modal\">\n   <bool>true</bool>\n  </property>\n  <layout class=\"QVBoxLayout\" name=\"verticalLayout\">\n   <item>\n    <widget class=\"QLabel\" name=\"labelDesc\">\n     <property name=\"text\">\n      <string>Please wait ...</string>\n     </property>\n     <property name=\"alignment\">\n      <set>Qt::AlignCenter</set>\n     </property>\n    </widget>\n   </item>\n   <item>\n    <widget class=\"QScrollArea\" name=\"scrollArea\">\n     <property name=\"widgetResizable\">\n      <bool>true</bool>\n     </property>\n     <widget class=\"QWidget\" name=\"scrollAreaWidgetContents\">\n      <property name=\"geometry\">\n       <rect>\n        <x>0</x>\n        <y>0</y>\n        <width>979</width>\n        <height>591</height>\n       </rect>\n      </property>\n      <property name=\"layoutDirection\">\n       <enum>Qt::LeftToRight</enum>\n      </property>\n      <layout class=\"QGridLayout\" name=\"gridLayout\">\n       <item row=\"0\" column=\"0\">\n        <widget class=\"QLabel\" name=\"labelGraph\">\n         <property name=\"text\">\n          <string/>\n         </property>\n        </widget>\n       </item>\n      </layout>\n     </widget>\n    </widget>\n   </item>\n   <item>\n    <layout class=\"QHBoxLayout\" name=\"horizontalLayout_2\">\n     <item>\n      <widget class=\"QPushButton\" name=\"pushButtonZoomOut\">\n       <property name=\"sizePolicy\">\n        <sizepolicy hsizetype=\"Expanding\" vsizetype=\"Fixed\">\n         <horstretch>1</horstretch>\n         <verstretch>0</verstretch>\n        </sizepolicy>\n       </property>\n       <property name=\"toolTip\">\n        <string>Zoom Out</string>\n       </property>\n       <property name=\"statusTip\">\n        <string>Zoom Out</string>\n       </property>\n       <property name=\"text\">\n        <string/>\n       </property>\n       <property name=\"icon\">\n        <iconset resource=\"../codequery.qrc\">\n         <normaloff>:/mainwindow/images/Zoom_Out.png</normaloff>:/mainwindow/images/Zoom_Out.png</iconset>\n       </property>\n      </widget>\n     </item>\n     <item>\n      <widget class=\"QPushButton\" name=\"pushButtonZoomIn\">\n       <property name=\"sizePolicy\">\n        <sizepolicy hsizetype=\"Expanding\" vsizetype=\"Fixed\">\n         <horstretch>1</horstretch>\n         <verstretch>0</verstretch>\n        </sizepolicy>\n       </property>\n       <property name=\"toolTip\">\n        <string>Zoom In</string>\n       </property>\n       <property name=\"statusTip\">\n        <string>Zoom In</string>\n       </property>\n       <property name=\"text\">\n        <string/>\n       </property>\n       <property name=\"icon\">\n        <iconset resource=\"../codequery.qrc\">\n         <normaloff>:/mainwindow/images/Zoom_In.png</normaloff>:/mainwindow/images/Zoom_In.png</iconset>\n       </property>\n      </widget>\n     </item>\n     <item>\n      <widget class=\"Line\" name=\"line\">\n       <property name=\"orientation\">\n        <enum>Qt::Vertical</enum>\n       </property>\n      </widget>\n     </item>\n     <item>\n      <widget class=\"QLabel\" name=\"labelNbrOfLevels\">\n       <property name=\"sizePolicy\">\n        <sizepolicy hsizetype=\"Preferred\" vsizetype=\"Preferred\">\n         <horstretch>5</horstretch>\n         <verstretch>0</verstretch>\n        </sizepolicy>\n       </property>\n       <property name=\"text\">\n        <string>Number of levels:</string>\n       </property>\n       <property name=\"alignment\">\n        <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>\n       </property>\n      </widget>\n     </item>\n     <item>\n      <widget class=\"QComboBox\" name=\"comboBoxNbrOfLevels\">\n       <property name=\"sizePolicy\">\n        <sizepolicy hsizetype=\"Minimum\" vsizetype=\"Fixed\">\n         <horstretch>1</horstretch>\n         <verstretch>0</verstretch>\n        </sizepolicy>\n       </property>\n      </widget>\n     </item>\n    </layout>\n   </item>\n   <item>\n    <layout class=\"QHBoxLayout\" name=\"horizontalLayout\">\n     <item>\n      <widget class=\"QPushButton\" name=\"pushButtonSaveDot\">\n       <property name=\"sizePolicy\">\n        <sizepolicy hsizetype=\"MinimumExpanding\" vsizetype=\"Fixed\">\n         <horstretch>0</horstretch>\n         <verstretch>0</verstretch>\n        </sizepolicy>\n       </property>\n       <property name=\"toolTip\">\n        <string>Save to DOT file</string>\n       </property>\n       <property name=\"statusTip\">\n        <string>Save to DOT file</string>\n       </property>\n       <property name=\"text\">\n        <string>Save to DOT file</string>\n       </property>\n      </widget>\n     </item>\n     <item>\n      <widget class=\"QPushButton\" name=\"pushButtonSave\">\n       <property name=\"sizePolicy\">\n        <sizepolicy hsizetype=\"MinimumExpanding\" vsizetype=\"Fixed\">\n         <horstretch>0</horstretch>\n         <verstretch>0</verstretch>\n        </sizepolicy>\n       </property>\n       <property name=\"toolTip\">\n        <string>Save Image</string>\n       </property>\n       <property name=\"statusTip\">\n        <string>Save Image</string>\n       </property>\n       <property name=\"text\">\n        <string>Save Image</string>\n       </property>\n      </widget>\n     </item>\n     <item>\n      <widget class=\"QPushButton\" name=\"pushButtonClose\">\n       <property name=\"sizePolicy\">\n        <sizepolicy hsizetype=\"MinimumExpanding\" vsizetype=\"Fixed\">\n         <horstretch>0</horstretch>\n         <verstretch>0</verstretch>\n        </sizepolicy>\n       </property>\n       <property name=\"toolTip\">\n        <string>Close</string>\n       </property>\n       <property name=\"statusTip\">\n        <string>Close</string>\n       </property>\n       <property name=\"text\">\n        <string>Close</string>\n       </property>\n      </widget>\n     </item>\n    </layout>\n   </item>\n  </layout>\n </widget>\n <tabstops>\n  <tabstop>pushButtonZoomOut</tabstop>\n  <tabstop>pushButtonZoomIn</tabstop>\n  <tabstop>pushButtonSaveDot</tabstop>\n  <tabstop>pushButtonSave</tabstop>\n  <tabstop>pushButtonClose</tabstop>\n </tabstops>\n <resources>\n  <include location=\"../codequery.qrc\"/>\n </resources>\n <connections/>\n</ui>\n"
  },
  {
    "path": "gui/ui/mainWindow.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- This Source Code Form is subject to the terms of the Mozilla Public\n   - License, v. 2.0. If a copy of the MPL was not distributed with this\n   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->\n<ui version=\"4.0\">\n <class>MainWindow</class>\n <widget class=\"QMainWindow\" name=\"MainWindow\">\n  <property name=\"geometry\">\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>967</width>\n    <height>813</height>\n   </rect>\n  </property>\n  <property name=\"windowTitle\">\n   <string>CodeQuery</string>\n  </property>\n  <property name=\"windowIcon\">\n   <iconset resource=\"../cqimages.qrc\">\n    <normaloff>:/mainwindow/images/logo.png</normaloff>:/mainwindow/images/logo.png</iconset>\n  </property>\n  <widget class=\"QWidget\" name=\"centralwidget\">\n   <layout class=\"QVBoxLayout\" name=\"verticalLayout_3\">\n    <item>\n     <layout class=\"QHBoxLayout\" name=\"horizontalLayout\">\n      <item>\n       <widget class=\"QPushButton\" name=\"pushButtonOpenDB\">\n        <property name=\"toolTip\">\n         <string>Open Database</string>\n        </property>\n        <property name=\"statusTip\">\n         <string>Open Database</string>\n        </property>\n        <property name=\"text\">\n         <string/>\n        </property>\n        <property name=\"icon\">\n         <iconset resource=\"../cqimages.qrc\">\n          <normaloff>:/mainwindow/images/Database.png</normaloff>:/mainwindow/images/Database.png</iconset>\n        </property>\n        <property name=\"iconSize\">\n         <size>\n          <width>24</width>\n          <height>24</height>\n         </size>\n        </property>\n       </widget>\n      </item>\n      <item>\n       <widget class=\"QComboBox\" name=\"comboBoxDB\">\n        <property name=\"sizePolicy\">\n         <sizepolicy hsizetype=\"Expanding\" vsizetype=\"Fixed\">\n          <horstretch>0</horstretch>\n          <verstretch>0</verstretch>\n         </sizepolicy>\n        </property>\n        <property name=\"layoutDirection\">\n         <enum>Qt::RightToLeft</enum>\n        </property>\n        <property name=\"sizeAdjustPolicy\">\n         <enum>QComboBox::AdjustToContents</enum>\n        </property>\n       </widget>\n      </item>\n      <item>\n       <widget class=\"Line\" name=\"line_2\">\n        <property name=\"orientation\">\n         <enum>Qt::Vertical</enum>\n        </property>\n       </widget>\n      </item>\n      <item>\n       <widget class=\"QCheckBox\" name=\"checkBoxAutoComplete\">\n        <property name=\"layoutDirection\">\n         <enum>Qt::LeftToRight</enum>\n        </property>\n        <property name=\"text\">\n         <string>Auto-complete</string>\n        </property>\n       </widget>\n      </item>\n      <item>\n       <widget class=\"Line\" name=\"line_3\">\n        <property name=\"orientation\">\n         <enum>Qt::Vertical</enum>\n        </property>\n       </widget>\n      </item>\n      <item>\n       <widget class=\"QCheckBox\" name=\"checkBoxExactMatch\">\n        <property name=\"text\">\n         <string>Exact match</string>\n        </property>\n       </widget>\n      </item>\n      <item>\n       <widget class=\"Line\" name=\"line_4\">\n        <property name=\"orientation\">\n         <enum>Qt::Vertical</enum>\n        </property>\n       </widget>\n      </item>\n      <item>\n       <widget class=\"QCheckBox\" name=\"checkBoxFilter\">\n        <property name=\"toolTip\">\n         <string>File path filter</string>\n        </property>\n        <property name=\"statusTip\">\n         <string>File path filter</string>\n        </property>\n        <property name=\"text\">\n         <string>Filter</string>\n        </property>\n        <property name=\"checked\">\n         <bool>true</bool>\n        </property>\n       </widget>\n      </item>\n      <item>\n       <widget class=\"QComboBox\" name=\"comboBoxFilter\">\n        <property name=\"sizePolicy\">\n         <sizepolicy hsizetype=\"MinimumExpanding\" vsizetype=\"Fixed\">\n          <horstretch>0</horstretch>\n          <verstretch>0</verstretch>\n         </sizepolicy>\n        </property>\n        <property name=\"toolTip\">\n         <string>File path filter, wildcard searches (* and ?) are supported</string>\n        </property>\n        <property name=\"statusTip\">\n         <string>File path filter, wildcard searches (* and ?) are supported</string>\n        </property>\n        <property name=\"layoutDirection\">\n         <enum>Qt::RightToLeft</enum>\n        </property>\n        <property name=\"editable\">\n         <bool>true</bool>\n        </property>\n        <property name=\"insertPolicy\">\n         <enum>QComboBox::NoInsert</enum>\n        </property>\n        <property name=\"sizeAdjustPolicy\">\n         <enum>QComboBox::AdjustToContents</enum>\n        </property>\n       </widget>\n      </item>\n     </layout>\n    </item>\n    <item>\n     <layout class=\"QHBoxLayout\" name=\"horizontalLayout_2\">\n      <item>\n       <widget class=\"QPushButton\" name=\"pushButtonSearchPrev\">\n        <property name=\"toolTip\">\n         <string>Previous search term</string>\n        </property>\n        <property name=\"statusTip\">\n         <string>Previous search term</string>\n        </property>\n        <property name=\"text\">\n         <string/>\n        </property>\n        <property name=\"icon\">\n         <iconset resource=\"../cqimages.qrc\">\n          <normaloff>:/mainwindow/images/Arrow2_Left.png</normaloff>:/mainwindow/images/Arrow2_Left.png</iconset>\n        </property>\n        <property name=\"iconSize\">\n         <size>\n          <width>24</width>\n          <height>24</height>\n         </size>\n        </property>\n       </widget>\n      </item>\n      <item>\n       <widget class=\"QPushButton\" name=\"pushButtonSearchNext\">\n        <property name=\"toolTip\">\n         <string>Next search term</string>\n        </property>\n        <property name=\"statusTip\">\n         <string>Next search term</string>\n        </property>\n        <property name=\"text\">\n         <string/>\n        </property>\n        <property name=\"icon\">\n         <iconset resource=\"../cqimages.qrc\">\n          <normaloff>:/mainwindow/images/Arrow2_Right.png</normaloff>:/mainwindow/images/Arrow2_Right.png</iconset>\n        </property>\n        <property name=\"iconSize\">\n         <size>\n          <width>24</width>\n          <height>24</height>\n         </size>\n        </property>\n       </widget>\n      </item>\n      <item>\n       <widget class=\"QComboBox\" name=\"comboBoxSearch\">\n        <property name=\"sizePolicy\">\n         <sizepolicy hsizetype=\"Expanding\" vsizetype=\"Fixed\">\n          <horstretch>0</horstretch>\n          <verstretch>0</verstretch>\n         </sizepolicy>\n        </property>\n        <property name=\"toolTip\">\n         <string>If Exact Match is switched off, wildcard searches (* and ?) are supported</string>\n        </property>\n        <property name=\"statusTip\">\n         <string>If Exact Match is switched off, wildcard searches (* and ?) are supported</string>\n        </property>\n        <property name=\"editable\">\n         <bool>true</bool>\n        </property>\n        <property name=\"insertPolicy\">\n         <enum>QComboBox::NoInsert</enum>\n        </property>\n        <property name=\"sizeAdjustPolicy\">\n         <enum>QComboBox::AdjustToContents</enum>\n        </property>\n        <property name=\"duplicatesEnabled\">\n         <bool>true</bool>\n        </property>\n       </widget>\n      </item>\n      <item>\n       <widget class=\"QPushButton\" name=\"pushButtonSearch\">\n        <property name=\"toolTip\">\n         <string>Search</string>\n        </property>\n        <property name=\"statusTip\">\n         <string>Search</string>\n        </property>\n        <property name=\"text\">\n         <string/>\n        </property>\n        <property name=\"icon\">\n         <iconset resource=\"../cqimages.qrc\">\n          <normaloff>:/mainwindow/images/Search.png</normaloff>:/mainwindow/images/Search.png</iconset>\n        </property>\n        <property name=\"iconSize\">\n         <size>\n          <width>24</width>\n          <height>24</height>\n         </size>\n        </property>\n       </widget>\n      </item>\n      <item>\n       <widget class=\"QPushButton\" name=\"pushButtonClipSearch\">\n        <property name=\"toolTip\">\n         <string>Paste and Search</string>\n        </property>\n        <property name=\"statusTip\">\n         <string>Paste and Search</string>\n        </property>\n        <property name=\"text\">\n         <string/>\n        </property>\n        <property name=\"icon\">\n         <iconset resource=\"../cqimages.qrc\">\n          <normaloff>:/mainwindow/images/Clipboard_Paste.png</normaloff>:/mainwindow/images/Clipboard_Paste.png</iconset>\n        </property>\n        <property name=\"iconSize\">\n         <size>\n          <width>24</width>\n          <height>24</height>\n         </size>\n        </property>\n       </widget>\n      </item>\n      <item>\n       <widget class=\"QPushButton\" name=\"pushButtonFilesList\">\n        <property name=\"toolTip\">\n         <string>List of all files</string>\n        </property>\n        <property name=\"statusTip\">\n         <string>List of all files</string>\n        </property>\n        <property name=\"text\">\n         <string/>\n        </property>\n        <property name=\"icon\">\n         <iconset resource=\"../cqimages.qrc\">\n          <normaloff>:/mainwindow/images/Folder2.png</normaloff>:/mainwindow/images/Folder2.png</iconset>\n        </property>\n        <property name=\"iconSize\">\n         <size>\n          <width>24</width>\n          <height>24</height>\n         </size>\n        </property>\n       </widget>\n      </item>\n      <item>\n       <widget class=\"QPushButton\" name=\"pushButtonGraph\">\n        <property name=\"enabled\">\n         <bool>false</bool>\n        </property>\n        <property name=\"toolTip\">\n         <string>Draw graph</string>\n        </property>\n        <property name=\"statusTip\">\n         <string>Draw graph</string>\n        </property>\n        <property name=\"text\">\n         <string/>\n        </property>\n        <property name=\"icon\">\n         <iconset resource=\"../cqimages.qrc\">\n          <normaloff>:/mainwindow/images/Graph.png</normaloff>:/mainwindow/images/Graph.png</iconset>\n        </property>\n        <property name=\"iconSize\">\n         <size>\n          <width>24</width>\n          <height>24</height>\n         </size>\n        </property>\n       </widget>\n      </item>\n      <item>\n       <widget class=\"QComboBox\" name=\"comboBoxQueryType\">\n        <property name=\"sizePolicy\">\n         <sizepolicy hsizetype=\"MinimumExpanding\" vsizetype=\"Fixed\">\n          <horstretch>0</horstretch>\n          <verstretch>0</verstretch>\n         </sizepolicy>\n        </property>\n        <property name=\"maxVisibleItems\">\n         <number>15</number>\n        </property>\n        <property name=\"insertPolicy\">\n         <enum>QComboBox::NoInsert</enum>\n        </property>\n        <property name=\"sizeAdjustPolicy\">\n         <enum>QComboBox::AdjustToContents</enum>\n        </property>\n       </widget>\n      </item>\n     </layout>\n    </item>\n    <item>\n     <widget class=\"QSplitter\" name=\"splitter_2\">\n      <property name=\"orientation\">\n       <enum>Qt::Vertical</enum>\n      </property>\n      <widget class=\"QTreeWidget\" name=\"treeWidgetSearchResults\">\n       <column>\n        <property name=\"text\">\n         <string notr=\"true\">1</string>\n        </property>\n       </column>\n      </widget>\n      <widget class=\"QWidget\" name=\"layoutWidget1\">\n       <layout class=\"QVBoxLayout\" name=\"verticalLayout_2\">\n        <item>\n         <layout class=\"QHBoxLayout\" name=\"horizontalLayout_3\">\n          <item>\n           <widget class=\"QPushButton\" name=\"pushButtonPrev\">\n            <property name=\"toolTip\">\n             <string>Previous File</string>\n            </property>\n            <property name=\"statusTip\">\n             <string>Previous File</string>\n            </property>\n            <property name=\"text\">\n             <string/>\n            </property>\n            <property name=\"icon\">\n             <iconset resource=\"../cqimages.qrc\">\n              <normaloff>:/mainwindow/images/Arrow2_Left.png</normaloff>:/mainwindow/images/Arrow2_Left.png</iconset>\n            </property>\n            <property name=\"iconSize\">\n             <size>\n              <width>24</width>\n              <height>24</height>\n             </size>\n            </property>\n           </widget>\n          </item>\n          <item>\n           <widget class=\"QPushButton\" name=\"pushButtonNext\">\n            <property name=\"toolTip\">\n             <string>Next File</string>\n            </property>\n            <property name=\"statusTip\">\n             <string>Next File</string>\n            </property>\n            <property name=\"text\">\n             <string/>\n            </property>\n            <property name=\"icon\">\n             <iconset resource=\"../cqimages.qrc\">\n              <normaloff>:/mainwindow/images/Arrow2_Right.png</normaloff>:/mainwindow/images/Arrow2_Right.png</iconset>\n            </property>\n            <property name=\"iconSize\">\n             <size>\n              <width>24</width>\n              <height>24</height>\n             </size>\n            </property>\n           </widget>\n          </item>\n          <item>\n           <widget class=\"QPushButton\" name=\"pushButtonOpenInEditor\">\n            <property name=\"toolTip\">\n             <string>Open in Editor</string>\n            </property>\n            <property name=\"statusTip\">\n             <string>Open in Editor</string>\n            </property>\n            <property name=\"text\">\n             <string/>\n            </property>\n            <property name=\"icon\">\n             <iconset resource=\"../cqimages.qrc\">\n              <normaloff>:/mainwindow/images/Document2.png</normaloff>:/mainwindow/images/Document2.png</iconset>\n            </property>\n            <property name=\"iconSize\">\n             <size>\n              <width>24</width>\n              <height>24</height>\n             </size>\n            </property>\n           </widget>\n          </item>\n          <item>\n           <widget class=\"QPushButton\" name=\"pushButtonGoToLine\">\n            <property name=\"toolTip\">\n             <string>Go to selected line</string>\n            </property>\n            <property name=\"statusTip\">\n             <string>Go to selected line</string>\n            </property>\n            <property name=\"text\">\n             <string/>\n            </property>\n            <property name=\"icon\">\n             <iconset resource=\"../cqimages.qrc\">\n              <normaloff>:/mainwindow/images/Flag.png</normaloff>:/mainwindow/images/Flag.png</iconset>\n            </property>\n            <property name=\"iconSize\">\n             <size>\n              <width>24</width>\n              <height>24</height>\n             </size>\n            </property>\n           </widget>\n          </item>\n          <item>\n           <widget class=\"QPushButton\" name=\"pushButtonTextShrink\">\n            <property name=\"toolTip\">\n             <string>Reduce font size</string>\n            </property>\n            <property name=\"statusTip\">\n             <string>Reduce font size</string>\n            </property>\n            <property name=\"text\">\n             <string/>\n            </property>\n            <property name=\"icon\">\n             <iconset resource=\"../cqimages.qrc\">\n              <normaloff>:/mainwindow/images/Text_Minus.png</normaloff>:/mainwindow/images/Text_Minus.png</iconset>\n            </property>\n            <property name=\"iconSize\">\n             <size>\n              <width>24</width>\n              <height>24</height>\n             </size>\n            </property>\n           </widget>\n          </item>\n          <item>\n           <widget class=\"QPushButton\" name=\"pushButtonTextEnlarge\">\n            <property name=\"toolTip\">\n             <string>Increase font size</string>\n            </property>\n            <property name=\"statusTip\">\n             <string>Increase font size</string>\n            </property>\n            <property name=\"text\">\n             <string/>\n            </property>\n            <property name=\"icon\">\n             <iconset resource=\"../cqimages.qrc\">\n              <normaloff>:/mainwindow/images/Text_Plus.png</normaloff>:/mainwindow/images/Text_Plus.png</iconset>\n            </property>\n            <property name=\"iconSize\">\n             <size>\n              <width>24</width>\n              <height>24</height>\n             </size>\n            </property>\n           </widget>\n          </item>\n          <item>\n           <widget class=\"Line\" name=\"line\">\n            <property name=\"orientation\">\n             <enum>Qt::Vertical</enum>\n            </property>\n           </widget>\n          </item>\n          <item>\n           <widget class=\"QPushButton\" name=\"pushButtonPaste\">\n            <property name=\"toolTip\">\n             <string>Copy, paste and search</string>\n            </property>\n            <property name=\"statusTip\">\n             <string>Copy, paste and search</string>\n            </property>\n            <property name=\"text\">\n             <string/>\n            </property>\n            <property name=\"icon\">\n             <iconset resource=\"../cqimages.qrc\">\n              <normaloff>:/mainwindow/images/Clipboard_Paste.png</normaloff>:/mainwindow/images/Clipboard_Paste.png</iconset>\n            </property>\n            <property name=\"iconSize\">\n             <size>\n              <width>24</width>\n              <height>24</height>\n             </size>\n            </property>\n           </widget>\n          </item>\n          <item>\n           <widget class=\"QCheckBox\" name=\"checkBoxSymbolOnly\">\n            <property name=\"toolTip\">\n             <string>Symbol search only for paste and search</string>\n            </property>\n            <property name=\"statusTip\">\n             <string>Symbol search only for paste and search</string>\n            </property>\n            <property name=\"text\">\n             <string>Symbol only</string>\n            </property>\n           </widget>\n          </item>\n          <item>\n           <widget class=\"Line\" name=\"line_5\">\n            <property name=\"orientation\">\n             <enum>Qt::Vertical</enum>\n            </property>\n           </widget>\n          </item>\n          <item>\n           <widget class=\"QPushButton\" name=\"pushButtonUp\">\n            <property name=\"toolTip\">\n             <string>Previous search result in this file</string>\n            </property>\n            <property name=\"statusTip\">\n             <string>Previous search result in this file</string>\n            </property>\n            <property name=\"text\">\n             <string/>\n            </property>\n            <property name=\"icon\">\n             <iconset resource=\"../cqimages.qrc\">\n              <normaloff>:/mainwindow/images/Arrow2_Up.png</normaloff>:/mainwindow/images/Arrow2_Up.png</iconset>\n            </property>\n            <property name=\"iconSize\">\n             <size>\n              <width>24</width>\n              <height>24</height>\n             </size>\n            </property>\n           </widget>\n          </item>\n          <item>\n           <widget class=\"QPushButton\" name=\"pushButtonDown\">\n            <property name=\"toolTip\">\n             <string>Next search result in this file</string>\n            </property>\n            <property name=\"statusTip\">\n             <string>Next search result in this file</string>\n            </property>\n            <property name=\"text\">\n             <string/>\n            </property>\n            <property name=\"icon\">\n             <iconset resource=\"../cqimages.qrc\">\n              <normaloff>:/mainwindow/images/Arrow2_Down.png</normaloff>:/mainwindow/images/Arrow2_Down.png</iconset>\n            </property>\n            <property name=\"iconSize\">\n             <size>\n              <width>24</width>\n              <height>24</height>\n             </size>\n            </property>\n           </widget>\n          </item>\n          <item>\n           <widget class=\"QLineEdit\" name=\"labelFilePath\">\n            <property name=\"cursor\">\n             <cursorShape>ArrowCursor</cursorShape>\n            </property>\n            <property name=\"acceptDrops\">\n             <bool>false</bool>\n            </property>\n            <property name=\"autoFillBackground\">\n             <bool>true</bool>\n            </property>\n            <property name=\"text\">\n             <string>FilePath:0</string>\n            </property>\n            <property name=\"alignment\">\n             <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>\n            </property>\n            <property name=\"readOnly\">\n             <bool>true</bool>\n            </property>\n           </widget>\n          </item>\n         </layout>\n        </item>\n        <item>\n         <widget class=\"QSplitter\" name=\"splitter\">\n          <property name=\"orientation\">\n           <enum>Qt::Horizontal</enum>\n          </property>\n          <widget class=\"QWidget\" name=\"layoutWidget2\">\n           <layout class=\"QVBoxLayout\" name=\"verticalLayout\">\n            <item>\n             <widget class=\"QComboBox\" name=\"comboBoxFuncListSort\">\n              <property name=\"maxCount\">\n               <number>100</number>\n              </property>\n              <property name=\"insertPolicy\">\n               <enum>QComboBox::NoInsert</enum>\n              </property>\n              <item>\n               <property name=\"text\">\n                <string>Sort by line number</string>\n               </property>\n              </item>\n              <item>\n               <property name=\"text\">\n                <string>Sort by name</string>\n               </property>\n              </item>\n             </widget>\n            </item>\n            <item>\n             <widget class=\"QListWidget\" name=\"listWidgetFunc\">\n              <property name=\"sizePolicy\">\n               <sizepolicy hsizetype=\"Expanding\" vsizetype=\"Expanding\">\n                <horstretch>1</horstretch>\n                <verstretch>0</verstretch>\n               </sizepolicy>\n              </property>\n             </widget>\n            </item>\n           </layout>\n          </widget>\n          <widget class=\"ScintillaEdit\" name=\"textEditSource\">\n           <property name=\"sizePolicy\">\n            <sizepolicy hsizetype=\"Expanding\" vsizetype=\"Expanding\">\n             <horstretch>4</horstretch>\n             <verstretch>0</verstretch>\n            </sizepolicy>\n           </property>\n           <property name=\"toolTip\">\n            <string/>\n           </property>\n           <property name=\"whatsThis\">\n            <string/>\n           </property>\n          </widget>\n         </widget>\n        </item>\n       </layout>\n      </widget>\n     </widget>\n    </item>\n   </layout>\n  </widget>\n  <widget class=\"QMenuBar\" name=\"menubar\">\n   <property name=\"geometry\">\n    <rect>\n     <x>0</x>\n     <y>0</y>\n     <width>967</width>\n     <height>29</height>\n    </rect>\n   </property>\n   <widget class=\"QMenu\" name=\"menuFile\">\n    <property name=\"title\">\n     <string>File</string>\n    </property>\n    <addaction name=\"actionOpenDB\"/>\n    <addaction name=\"actionExit\"/>\n   </widget>\n   <widget class=\"QMenu\" name=\"menuOptions\">\n    <property name=\"title\">\n     <string>Options</string>\n    </property>\n    <addaction name=\"actionOptionsExtEditor\"/>\n    <addaction name=\"actionLanguage\"/>\n    <addaction name=\"actionFileViewSettings\"/>\n   </widget>\n   <widget class=\"QMenu\" name=\"menuHelp\">\n    <property name=\"title\">\n     <string>Help</string>\n    </property>\n    <addaction name=\"actionAbout_Qt\"/>\n    <addaction name=\"actionAbout\"/>\n   </widget>\n   <addaction name=\"menuFile\"/>\n   <addaction name=\"menuOptions\"/>\n   <addaction name=\"menuHelp\"/>\n  </widget>\n  <widget class=\"QStatusBar\" name=\"statusbar\"/>\n  <action name=\"actionExit\">\n   <property name=\"text\">\n    <string>Exit</string>\n   </property>\n   <property name=\"menuRole\">\n    <enum>QAction::QuitRole</enum>\n   </property>\n  </action>\n  <action name=\"actionOpen\">\n   <property name=\"text\">\n    <string>Open</string>\n   </property>\n  </action>\n  <action name=\"actionAbout\">\n   <property name=\"text\">\n    <string>About</string>\n   </property>\n  </action>\n  <action name=\"actionOptionsExtEditor\">\n   <property name=\"text\">\n    <string>External Editor</string>\n   </property>\n  </action>\n  <action name=\"actionOpenDB\">\n   <property name=\"text\">\n    <string>Open CQ Database</string>\n   </property>\n  </action>\n  <action name=\"actionLanguage\">\n   <property name=\"text\">\n    <string>Language</string>\n   </property>\n  </action>\n  <action name=\"actionAbout_Qt\">\n   <property name=\"text\">\n    <string>About Qt</string>\n   </property>\n   <property name=\"menuRole\">\n    <enum>QAction::AboutQtRole</enum>\n   </property>\n  </action>\n  <action name=\"actionFileViewSettings\">\n   <property name=\"text\">\n    <string>File Viewer Settings</string>\n   </property>\n  </action>\n </widget>\n <customwidgets>\n  <customwidget>\n   <class>ScintillaEdit</class>\n   <extends>QFrame</extends>\n   <header>ScintillaEdit.h</header>\n   <container>1</container>\n  </customwidget>\n </customwidgets>\n <tabstops>\n  <tabstop>pushButtonOpenDB</tabstop>\n  <tabstop>comboBoxDB</tabstop>\n  <tabstop>checkBoxAutoComplete</tabstop>\n  <tabstop>checkBoxExactMatch</tabstop>\n  <tabstop>checkBoxFilter</tabstop>\n  <tabstop>comboBoxFilter</tabstop>\n  <tabstop>pushButtonSearchPrev</tabstop>\n  <tabstop>pushButtonSearchNext</tabstop>\n  <tabstop>comboBoxSearch</tabstop>\n  <tabstop>pushButtonSearch</tabstop>\n  <tabstop>pushButtonClipSearch</tabstop>\n  <tabstop>pushButtonFilesList</tabstop>\n  <tabstop>pushButtonGraph</tabstop>\n  <tabstop>comboBoxQueryType</tabstop>\n  <tabstop>treeWidgetSearchResults</tabstop>\n  <tabstop>pushButtonPrev</tabstop>\n  <tabstop>pushButtonNext</tabstop>\n  <tabstop>pushButtonOpenInEditor</tabstop>\n  <tabstop>pushButtonGoToLine</tabstop>\n  <tabstop>pushButtonTextShrink</tabstop>\n  <tabstop>pushButtonTextEnlarge</tabstop>\n  <tabstop>pushButtonPaste</tabstop>\n  <tabstop>checkBoxSymbolOnly</tabstop>\n  <tabstop>pushButtonUp</tabstop>\n  <tabstop>pushButtonDown</tabstop>\n  <tabstop>comboBoxFuncListSort</tabstop>\n  <tabstop>listWidgetFunc</tabstop>\n </tabstops>\n <resources>\n  <include location=\"../cqimages.qrc\"/>\n </resources>\n <connections>\n  <connection>\n   <sender>checkBoxFilter</sender>\n   <signal>toggled(bool)</signal>\n   <receiver>comboBoxFilter</receiver>\n   <slot>setEnabled(bool)</slot>\n   <hints>\n    <hint type=\"sourcelabel\">\n     <x>675</x>\n     <y>65</y>\n    </hint>\n    <hint type=\"destinationlabel\">\n     <x>956</x>\n     <y>68</y>\n    </hint>\n   </hints>\n  </connection>\n </connections>\n</ui>\n"
  },
  {
    "path": "gui/winmain.cpp",
    "content": "\n/*\n\nTaken from:\nhttps://github.com/gosu/gosu/blob/master/src/WinMain.cpp\n\nThis license applies only to this file:\n\nCopyright (C) 2001-2023 Julian Raschke, Jan Lücker, cyberarm, and all\nother contributors: https://github.com/gosu/gosu/graphs/contributors\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\n            Julian Raschke <julian@raschke.de> & contributors\n                        https://www.libgosu.org/\n\n*/\n\n//#ifdef _MSC_VER\n#ifdef _WIN32\n\n#include <exception>\n#include <string>\n#include <vector>\n#include <windows.h>\nusing namespace std;\n\nvector<string> split_cmd_line()\n{\n    vector<string> result;\n\n    const char* cmd_line = ::GetCommandLineA();\n\n    const char* arg_begin = nullptr;\n    bool is_quoted_arg = false;\n\n    while (*cmd_line) {\n        if (*cmd_line == '\"') {\n            if (arg_begin == nullptr) {\n                arg_begin = cmd_line + 1;\n                is_quoted_arg = true;\n            }\n            else if (is_quoted_arg) {\n                result.push_back(string(arg_begin, cmd_line));\n                arg_begin = nullptr;\n            }\n        }\n        else if (!isspace((unsigned char)*cmd_line) && arg_begin == nullptr) {\n            arg_begin = cmd_line;\n            is_quoted_arg = false;\n        }\n        else if (isspace((unsigned char)*cmd_line) && arg_begin != nullptr && !is_quoted_arg) {\n            result.push_back(string(arg_begin, cmd_line + 1));\n            arg_begin = nullptr;\n        }\n        ++cmd_line;\n    }\n\n    if (arg_begin != 0) result.push_back(arg_begin);\n\n    return result;\n}\n\nint main(int argc, char* argv[]);\n\nint WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)\n{\n    try {\n        vector<string> arguments = split_cmd_line();\n        vector<char*> argv(arguments.size());\n        for (unsigned i = 0; i < argv.size(); ++i) {\n            argv[i] = const_cast<char*>(arguments[i].c_str());\n        }\n        return main(argv.size(), &argv[0]);\n    }\n    catch (const exception& e) {\n        ::MessageBoxA(0, e.what(), \"Uncaught Exception\", MB_OK | MB_ICONERROR);\n        return EXIT_FAILURE;\n    }\n}\n\n#endif\n"
  },
  {
    "path": "lexilla/.gitattributes",
    "content": "* -text\r\n**.cxx text\r\n**.cpp text\r\n**.c text\r\n**.h text\r\n**.hpp text\r\n**.m text\r\n**.mm text\r\n**.iface text\r\n**.template text\r\n**.mk text\r\n**.py text\r\n**.rc text\r\n**.css text\r\n**.html text\r\n**.bat text\r\n**.bsh text\r\n**.zsh text\r\n**.mak text\r\n**.def text\r\n**.manifest text\r\n**.properties text\r\n**.props text\r\n**.session text\r\n**.styled text\r\n**.folded text\r\n**.adoc text\r\n**.asp text\r\n**.aspx text\r\n**.php text\r\n**.vb text\r\n**.asm text\r\n**.cob text\r\n**.cmake text\r\n**.d text\r\n**.diff text\r\n**.erl text\r\n**.f text\r\n**.gd text\r\n**.gui text\r\n**.iss text\r\n**.jl text\r\n**.json text\r\n**.lua text\r\n**.m3 text\r\n**.matlab text\r\n**.ml text\r\n**.nim text\r\n**.octave text\r\n**.pl text\r\n**.p6 text\r\n**.ps1 text\r\n**.r text\r\n**.rb text\r\n**.rs text\r\n**.sql text\r\n**.tcl text\r\n**.tsql text\r\n**.err text\r\n**.mms text\r\n**.tex text\r\n**.fs text\r\n**.vh text\r\n**.vhd text\r\n**.x12 text\r\n**.yaml text\r\n**.md text\r\n**.txt text\r\n**.pch text\r\n**.hg* text\r\n**.dsp text\r\n**.pbxproj text\r\n**.plist text\r\n**.xcworkspacedata text\r\n**.pro text\r\n**.gen text\r\n**makefile text\r\n**.bmp binary\r\n**.cur binary\r\n**.ico binary\r\n**.jpg binary\r\n**.png binary\r\n**.sh text eol=lf\r\ntgzsrc text eol=lf\r\n"
  },
  {
    "path": "lexilla/.github/workflows/build-check-macos.yml",
    "content": "name: \"Build and check Lexilla on macOS\"\n\non: [push]\n\njobs:\n    build:\n\n        runs-on: macos-11\n\n        strategy:\n            matrix:\n                cpp_compiler: [clang++]\n\n        steps:\n        - uses: actions/checkout@v4\n        - name: Install Scintilla source\n          run: |\n              (cd .. && wget --no-verbose https://www.scintilla.org/scintilla500.zip)\n              (cd .. && unzip scintilla500.zip)\n        - name: Unit Test\n          run: (cd test/unit && make DEBUG=1 CXX=${{matrix.cpp_compiler}} test)\n        - name: Build Lexilla\n          run: (cd src && make DEBUG=1 CXX=${{matrix.cpp_compiler}})\n        - uses: actions/upload-artifact@v4\n          with:\n              name: liblexilla.dylib\n              path: bin/liblexilla.dylib\n        - name: Test lexing and folding\n          run: (cd test && make DEBUG=1 CXX=${{matrix.cpp_compiler}} test)\n        - name: CheckLexilla C Example\n          run: (cd examples/CheckLexilla && make DEBUG=1 check)\n        - name: SimpleLexer Example\n          run: (cd examples/SimpleLexer && make DEBUG=1 CXX=${{matrix.cpp_compiler}} check)\n"
  },
  {
    "path": "lexilla/.github/workflows/build-check-win32.yml",
    "content": "name: \"Build and check Lexilla on Win32 with Visual C++\"\n\non: [push]\n\njobs:\n    build:\n\n        runs-on: windows-latest\n\n        steps:\n        - uses: actions/checkout@v4\n        - name: Preparing nmake\n          uses: ilammy/msvc-dev-cmd@v1\n          with:\n            arch: x64\n        - name: Install Scintilla source\n          run: |\n              pwd\n              cd ..\n              curl -O https://www.scintilla.org/scintilla500.zip\n              ls\n              7z x scintilla500.zip\n              cd lexilla\n        - name: Unit Test\n          run: |\n              cd test/unit\n              nmake -f test.mak DEBUG=1 test\n              cd ../..\n        - name: Build Lexilla\n          run: |\n              cd src\n              nmake -f lexilla.mak DEBUG=1\n              cd ..\n        - uses: actions/upload-artifact@v4\n          with:\n              name: lexilla.dll\n              path: bin/lexilla.dll\n        - name: Test lexing and folding\n          run: |\n              cd test\n              nmake -f testlexers.mak DEBUG=1 test\n              cd ..\n        - name: CheckLexilla C Example\n          run: |\n              cd examples/CheckLexilla\n              cl CheckLexilla.c -I ../../include -Fe: CheckLexilla\n              .\\CheckLexilla.exe\n              cd ../..\n        - name: SimpleLexer Example\n          run: |\n              cd examples/SimpleLexer\n              cl -std:c++17 -EHsc -LD -I ../../../scintilla/include -I ../../include -I ../../lexlib SimpleLexer.cxx ../../lexlib/*.cxx\n              cd ../..\n"
  },
  {
    "path": "lexilla/.github/workflows/build-check.yml",
    "content": "name: \"Build and check Lexilla on Linux\"\n\non: [push]\n\njobs:\n    build:\n\n        runs-on: ubuntu-latest\n\n        strategy:\n            matrix:\n                cpp_compiler: [g++, clang++]\n\n        steps:\n        - uses: actions/checkout@v4\n        - name: Install Scintilla source\n          run: |\n              (cd .. && wget --no-verbose https://www.scintilla.org/scintilla500.zip)\n              (cd .. && unzip scintilla500.zip)\n        - name: Unit Test\n          run: (cd test/unit && make DEBUG=1 CXX=${{matrix.cpp_compiler}} test)\n        - name: Build Lexilla\n          run: (cd src && make DEBUG=1 CXX=${{matrix.cpp_compiler}})\n        - uses: actions/upload-artifact@v4\n          with:\n              name: liblexilla-${{matrix.cpp_compiler}}.so\n              path: bin/liblexilla.so\n              overwrite: true\n        - name: Test lexing and folding\n          run: (cd test && make DEBUG=1 CXX=${{matrix.cpp_compiler}} test)\n        - name: CheckLexilla C Example\n          run: (cd examples/CheckLexilla && make DEBUG=1 check)\n        - name: SimpleLexer Example\n          run: (cd examples/SimpleLexer && make DEBUG=1 CXX=${{matrix.cpp_compiler}} check)\n"
  },
  {
    "path": "lexilla/.gitignore",
    "content": "*.o\n*.a\n*.lib\n*.obj\n*.iobj\n__pycache__\n*.pyc\n*.dll\n*.so\n*.dylib\n*.framework\n*.pyd\n*.exe\n*.exp\n*.lib\n*.pdb\n*.ipdb\n*.res\n*.bak\n*.sbr\n*.suo\n*.aps\n*.sln\n*.vcxproj.*\n*.idb\n*.bsc\n*.intermediate.manifest\n*.lastbuildstate\n*.nativecodeanalysis.xml\n*.cache\n*.ilk\n*.ncb\n*.tlog\n*.sdf\ngtk/*.plist\nwin32/*.plist\n*.opt\n*.plg\n*.pbxbtree\n*.mode1v3\n*.pbxuser\n*.pbproj\n*.tgz\n*.log\n*.xcbkptlist\n*.xcuserstate\nxcuserdata/\n*.xcsettings\nxcschememanagement.plist\n.DS_Store\ntest/TestLexers\nRelease\nDebug\nx64\nARM64\ncocoa/build\ncocoa/ScintillaFramework/build\ncocoa/ScintillaTest/build\nmacosx/SciTest/build\n*.cppcheck\n*.pro.user\n.qmake.stash\ncov-int\n.vs\nmeson-private\nmeson-logs\nbuild.ninja\n.ninja*\ncompile_commands.json\n.vscode/\nVTune Profiler Results/\n"
  },
  {
    "path": "lexilla/.travis.yml",
    "content": "# Build Lexilla with gcc and clang on Linux, macOS, and Windows\r\n# Test Lexilla with gcc and clang on Linux and macOS \r\n# Windows has older versions of libraries so can't compile std::filesystem\r\n# with gcc or std::string::starts_with with clang.\r\n# On macOS, gcc is a synonym for clang so exclude gcc.\r\nos:\r\n - linux\r\n - osx\r\n - windows\r\n\r\ndist: focal\r\n\r\nosx_image: xcode12.3\r\n\r\nlanguage: cpp\r\n\r\njobs:\r\n  exclude:\r\n  - os: osx\r\n    compiler: gcc\r\n\r\ninstall:\r\n - cd ..\r\n - wget --no-verbose https://www.scintilla.org/scintilla500.zip\r\n - if [ \"$TRAVIS_OS_NAME\" = \"windows\" ]; then 7z x scintilla500.zip ; else unzip scintilla500.zip ; fi\r\n - cd lexilla\r\n\r\ncompiler:\r\n - gcc\r\n - clang\r\n\r\nscript:\r\n - if [ \"$TRAVIS_OS_NAME\" = \"windows\" ]; then MAKER=\"mingw32-make windir=1\" ; else MAKER=\"make\" ; fi\r\n - (cd src && $MAKER DEBUG=1)\r\n - cd test\r\n - if [ \"$TRAVIS_OS_NAME\" != \"windows\" ]; then make DEBUG=1 test ; fi\r\n - (cd unit && $MAKER DEBUG=1 test)\r\n - cd ..\r\n - cd examples\r\n - (cd CheckLexilla && $MAKER DEBUG=1 check)\r\n - (cd SimpleLexer && $MAKER DEBUG=1 check)\r\n - cd ..\r\n"
  },
  {
    "path": "lexilla/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.16.0)\nproject(Lexilla)\n  \n#FILE(GLOB LEXER_SRCS  \"./lexers/*.cxx\")\nFILE(GLOB LEXLIB_SRCS \"./lexlib/*.cxx\")\nFILE(GLOB LEXINT_SRCS  \"./src/*.cxx\")\n\n  SET( LEXER_SRCS\n       ./lexers/LexCPP.cxx\n       ./lexers/LexRuby.cxx\n       ./lexers/LexPython.cxx\n  )\n\n\nINCLUDE_DIRECTORIES( \"./include\" )\nINCLUDE_DIRECTORIES( \"./src\" )\nINCLUDE_DIRECTORIES( \"./lexlib\" )\nINCLUDE_DIRECTORIES( \"../scintilla/include\" )\n\nadd_definitions( -DSCINTILLA_QT=1 -DSCI_LEXER=1 -D_CRT_SECURE_NO_DEPRECATE=1 -DSTATIC_BUILD=1 )\n\nadd_library( lexilla STATIC ${LEXER_SRCS} ${LEXLIB_SRCS} ${LEXINT_SRCS} )\ntarget_link_libraries( lexilla )\n\n"
  },
  {
    "path": "lexilla/CONTRIBUTING",
    "content": "Lexilla is on GitHub at https://github.com/ScintillaOrg/lexilla\r\n\r\nBugs, fixes and features should be posted to the Issue Tracker\r\nhttps://github.com/ScintillaOrg/lexilla/issues\r\n\r\nPatches should include test cases. Add a test case file in \r\nlexilla/test/examples/<language> and run the test program in \r\nlexilla/test.\r\nThe result will be new files with \".styled.new\" and \".folded.new\"\r\nappended containing lexing or folding results.\r\nFor lexing, there are brace surrounded style numbers for each style\r\nstart as markup:\r\n{5}import{0} {11}contextlib{0}\r\n\r\nFor folding, there are 4 columns of folding results preceding the example text:\r\n 2 400   0 + --[[ coding:UTF-8\r\n 0 402   0 | comment ]]\r\nSee the test/README file for more explanation of the folding results.\r\n\r\nTo build lexilla and the tests with gcc there are Windows batch\r\nand Unix shell files scripts/RunTest.bat scripts/RunTest.sh.\r\nCheck the result of the .new files and, if correct, rename replacing\r\n\".styled.new\" with \".styled\" and \".folded.new\" with \".folded\".\r\nRun the tests again and success should be reported.\r\nInclude the .styled and .folded files in the patch.\r\nIncluding test cases ensures that the change won't be undone by\r\nother changes in the future and clarifies the intentions of the author.\r\n\r\nEither send unified diffs (or patch files) or zip archives with whole files.\r\nMercurial/Git patch files are best as they include author information and commit\r\nmessages.\r\n\r\nQuestions should go to the scintilla-interest mailing list\r\nhttps://groups.google.com/forum/#!forum/scintilla-interest\r\n\r\nCode should follow the guidelines at\r\nhttps://www.scintilla.org/SciCoding.html\r\n\r\nLexilla is on GitHub so use its facilities rather than SourceForge which is\r\nthe home of Scintilla.\r\nThe neilh @ scintilla.org account receives much spam and is only checked\r\noccasionally. Almost all Scintilla mail should go to the mailing list.\r\n"
  },
  {
    "path": "lexilla/License.txt",
    "content": "License for Lexilla, Scintilla, and SciTE\n\nCopyright 1998-2021 by Neil Hodgson <neilh@scintilla.org>\n\nAll Rights Reserved\n\nPermission to use, copy, modify, and distribute this software and its\ndocumentation for any purpose and without fee is hereby granted,\nprovided that the above copyright notice appear in all copies and that\nboth that copyright notice and this permission notice appear in\nsupporting documentation.\n\nNEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS\nSOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS, IN NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY\nSPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,\nWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER\nTORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE\nOR PERFORMANCE OF THIS SOFTWARE."
  },
  {
    "path": "lexilla/README",
    "content": "README for Lexilla library.\r\n\r\nThe Lexilla library contains a set of lexers and folders that provides support for\r\nprogramming, mark-up, and data languages for the Scintilla source code editing\r\ncomponent.\r\n\r\nLexilla is made available as both a shared library and static library.\r\nThe shared library is called liblexilla.so / liblexilla.dylib / lexilla.dll on Linux / macOS /\r\nWindows.\r\nThe static library is called liblexilla.a when built with GCC or Clang and liblexilla.lib\r\nwhen built with MSVC.\r\n\r\nLexilla is developed on Windows, Linux, and macOS and requires a C++17 compiler.\r\nIt may work on other Unix platforms like BSD but that is not a development focus.\r\nMSVC 2019.4, GCC 9.0, Clang 9.0, and Apple Clang 11.0 are known to work.\r\n\r\nMSVC is only available on Windows.\r\n\r\nGCC and Clang work on Windows and Linux.\r\n\r\nOn macOS, only Apple Clang is available.\r\n\r\nLexilla requires some headers from Scintilla to build and expects a directory named\r\n\"scintilla\" containing a copy of Scintilla 5+ to be a peer of the Lexilla top level\r\ndirectory conventionally called \"lexilla\".\r\n\r\nTo use GCC, run lexilla/src/makefile:\r\n\tmake\r\n\r\nTo use Clang, run lexilla/test/makefile:\r\n\tmake CLANG=1\r\nOn macOS, CLANG is set automatically so this can just be\r\n\tmake\r\n\r\nTo use MSVC, run lexilla/test/lexilla.mak:\r\n\tnmake -f lexilla.mak\r\n\r\nTo build a debugging version of the library, add DEBUG=1 to the command:\r\n\tmake DEBUG=1\r\n\t\r\nThe built libraries are copied into lexilla/bin.\r\n\r\nLexilla relies on a list of lexers from the lexilla/lexers directory. If any changes are\r\nmade to the set of lexers then source and build files can be regenerated with the\r\nlexilla/scripts/LexillaGen.py script which requires Python 3 and is tested with 3.7+.\r\nUnix:\r\n\tpython3 LexillaGen.py\r\nWindows:\r\n\tpyw LexillaGen.py\r\n"
  },
  {
    "path": "lexilla/access/LexillaAccess.cxx",
    "content": "// SciTE - Scintilla based Text Editor\n/** @file LexillaAccess.cxx\n ** Interface to loadable lexers.\n ** Maintains a list of lexer library paths and CreateLexer functions.\n ** If list changes then load all the lexer libraries and find the functions.\n ** When asked to create a lexer, call each function until one succeeds.\n **/\n// Copyright 2019 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <cstring>\n\n#include <string>\n#include <string_view>\n#include <vector>\n#include <set>\n\n#if !defined(_WIN32)\n#include <dlfcn.h>\n#else\n#include <windows.h>\n#endif\n\n#include \"ILexer.h\"\n\n#include \"Lexilla.h\"\n\n#include \"LexillaAccess.h\"\n\nnamespace {\n\n#if defined(_WIN32)\ntypedef FARPROC Function;\ntypedef HMODULE Module;\nconstexpr const char *pathSeparator = \"\\\\\";\n#else\ntypedef void *Function;\ntypedef void *Module;\nconstexpr const char *pathSeparator = \"/\";\n#endif\n\n/// Generic function to convert from a Function(void* or FARPROC) to a function pointer.\n/// This avoids undefined and conditionally defined behaviour.\ntemplate<typename T>\nT FunctionPointer(Function function) noexcept {\n\tstatic_assert(sizeof(T) == sizeof(function));\n\tT fp {};\n\tmemcpy(&fp, &function, sizeof(T));\n\treturn fp;\n}\n\n#if defined(_WIN32)\n\nstd::wstring WideStringFromUTF8(std::string_view sv) {\n\tconst int sLength = static_cast<int>(sv.length());\n\tconst int cchWide = ::MultiByteToWideChar(CP_UTF8, 0, sv.data(), sLength, nullptr, 0);\n\tstd::wstring sWide(cchWide, 0);\n\t::MultiByteToWideChar(CP_UTF8, 0, sv.data(), sLength, sWide.data(), cchWide);\n\treturn sWide;\n}\n\n#endif\n\n// Turn off deprecation checks as LexillaAccess deprecates its wrapper over\n// the deprecated LexerNameFromID. Thus use within LexillaAccess is intentional.\n#if defined(__GNUC__) || defined(__clang__)\n#pragma GCC diagnostic ignored \"-Wdeprecated-declarations\"\n#else\n#pragma warning(disable: 4996)\n#endif\n\nstd::string directoryLoadDefault;\nstd::string lastLoaded;\n\nstruct LexLibrary {\n\tLexilla::CreateLexerFn fnCL;\n\tLexilla::LexerNameFromIDFn fnLNFI;\n\tLexilla::GetLibraryPropertyNamesFn fnGLPN;\n\tLexilla::SetLibraryPropertyFn fnSLP;\n\tstd::string nameSpace;\n};\nstd::vector<LexLibrary> libraries;\n\nstd::vector<std::string> lexers;\nstd::vector<std::string> libraryProperties;\n\nFunction FindSymbol(Module m, const char *symbol) noexcept {\n#if defined(_WIN32)\n\treturn ::GetProcAddress(m, symbol);\n#else\n\treturn dlsym(m, symbol);\n#endif\n}\n\nLexilla::CreateLexerFn pCreateLexerDefault = nullptr;\n\nbool NameContainsDot(std::string_view path) noexcept {\n\tfor (std::string_view::const_reverse_iterator it = path.crbegin();\n\t     it != path.crend(); ++it) {\n\t\tif (*it == '.')\n\t\t\treturn true;\n\t\tif (*it == '/' || *it == '\\\\')\n\t\t\treturn false;\n\t}\n\treturn false;\n}\n\nconstexpr bool HasPrefix(std::string_view s, std::string_view prefix) noexcept {\n\treturn (s.size() >= prefix.size()) && (prefix == s.substr(0, prefix.size()));\n}\n\n}\n\nvoid Lexilla::SetDefault(CreateLexerFn pCreate) noexcept {\n\tpCreateLexerDefault = pCreate;\n}\n\nvoid Lexilla::SetDefaultDirectory(std::string_view directory) {\n\tdirectoryLoadDefault = directory;\n}\n\nbool Lexilla::Load(std::string_view sharedLibraryPaths) {\n\tif (sharedLibraryPaths == lastLoaded) {\n\t\treturn !libraries.empty();\n\t}\n\n\tstd::string_view paths = sharedLibraryPaths;\n\tlexers.clear();\n\n\tlibraries.clear();\n\twhile (!paths.empty()) {\n\t\tconst size_t separator = paths.find_first_of(';');\n\t\tstd::string path(paths.substr(0, separator));\n\t\tif (separator == std::string::npos) {\n\t\t\tpaths.remove_prefix(paths.size());\n\t\t} else {\n\t\t\tpaths.remove_prefix(separator + 1);\n\t\t}\n\t\tif (path == \".\") {\n\t\t\tif (directoryLoadDefault.empty()) {\n\t\t\t\tpath = \"\";\n\t\t\t} else {\n\t\t\t\tpath = directoryLoadDefault;\n\t\t\t\tpath += pathSeparator;\n\t\t\t}\n\t\t\tpath += LEXILLA_LIB;\n\t\t}\n\t\tif (!NameContainsDot(path)) {\n\t\t\t// No '.' in name so add extension\n\t\t\tpath.append(LEXILLA_EXTENSION);\n\t\t}\n#if defined(_WIN32)\n\t\t// Convert from UTF-8 to wide characters\n\t\tstd::wstring wsPath = WideStringFromUTF8(path);\n\t\tModule lexillaDL = ::LoadLibraryW(wsPath.c_str());\n#else\n\t\tModule lexillaDL = dlopen(path.c_str(), RTLD_LAZY);\n#endif\n\t\tif (lexillaDL) {\n\t\t\tGetLexerCountFn fnLexerCount = FunctionPointer<GetLexerCountFn>(\n\t\t\t\tFindSymbol(lexillaDL, LEXILLA_GETLEXERCOUNT));\n\t\t\tGetLexerNameFn fnLexerName = FunctionPointer<GetLexerNameFn>(\n\t\t\t\tFindSymbol(lexillaDL, LEXILLA_GETLEXERNAME));\n\t\t\tif (fnLexerCount && fnLexerName) {\n\t\t\t\tconst int nLexers = fnLexerCount();\n\t\t\t\tfor (int i = 0; i < nLexers; i++) {\n\t\t\t\t\tchar name[100] = \"\";\n\t\t\t\t\tfnLexerName(i, name, sizeof(name));\n\t\t\t\t\tlexers.push_back(name);\n\t\t\t\t}\n\t\t\t}\n\t\t\tCreateLexerFn fnCL = FunctionPointer<CreateLexerFn>(\n\t\t\t\tFindSymbol(lexillaDL, LEXILLA_CREATELEXER));\n\t\t\tLexerNameFromIDFn fnLNFI = FunctionPointer<LexerNameFromIDFn>(\n\t\t\t\tFindSymbol(lexillaDL, LEXILLA_LEXERNAMEFROMID));\n\t\t\tGetLibraryPropertyNamesFn fnGLPN = FunctionPointer<GetLibraryPropertyNamesFn>(\n\t\t\t\tFindSymbol(lexillaDL, LEXILLA_GETLIBRARYPROPERTYNAMES));\n\t\t\tSetLibraryPropertyFn fnSLP = FunctionPointer<SetLibraryPropertyFn>(\n\t\t\t\tFindSymbol(lexillaDL, LEXILLA_SETLIBRARYPROPERTY));\n\t\t\tGetNameSpaceFn fnGNS = FunctionPointer<GetNameSpaceFn>(\n\t\t\t\tFindSymbol(lexillaDL, LEXILLA_GETNAMESPACE));\n\t\t\tstd::string nameSpace;\n\t\t\tif (fnGNS) {\n\t\t\t\tnameSpace = fnGNS();\n\t\t\t\tnameSpace += LEXILLA_NAMESPACE_SEPARATOR;\n\t\t\t}\n\t\t\tLexLibrary lexLib {\n\t\t\t\tfnCL,\n\t\t\t\tfnLNFI,\n\t\t\t\tfnGLPN,\n\t\t\t\tfnSLP,\n\t\t\t\tnameSpace\n\t\t\t};\n\t\t\tlibraries.push_back(lexLib);\n\t\t}\n\t}\n\tlastLoaded = sharedLibraryPaths;\n\n\tstd::set<std::string> nameSet;\n\tfor (const LexLibrary &lexLib : libraries) {\n\t\tif (lexLib.fnGLPN) {\n\t\t\tconst char *cpNames = lexLib.fnGLPN();\n\t\t\tif (cpNames) {\n\t\t\t\tstd::string_view names = cpNames;\n\t\t\t\twhile (!names.empty()) {\n\t\t\t\t\tconst size_t separator = names.find_first_of('\\n');\n\t\t\t\t\tstd::string name(names.substr(0, separator));\n\t\t\t\t\tnameSet.insert(name);\n\t\t\t\t\tif (separator == std::string::npos) {\n\t\t\t\t\t\tnames.remove_prefix(names.size());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnames.remove_prefix(separator + 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t// Standard Lexilla does not have any properties so can't be added to set.\n\tlibraryProperties = std::vector<std::string>(nameSet.begin(), nameSet.end());\n\n\treturn !libraries.empty();\n}\n\nScintilla::ILexer5 *Lexilla::MakeLexer(std::string_view languageName) {\n\tstd::string sLanguageName(languageName);\t// Ensure NUL-termination\n\t// First, try to match namespace then name suffix\n\tfor (const LexLibrary &lexLib : libraries) {\n\t\tif (lexLib.fnCL && !lexLib.nameSpace.empty()) {\n\t\t\tif (HasPrefix(languageName, lexLib.nameSpace)) {\n\t\t\t\tScintilla::ILexer5 *pLexer = lexLib.fnCL(sLanguageName.substr(lexLib.nameSpace.size()).c_str());\n\t\t\t\tif (pLexer) {\n\t\t\t\t\treturn pLexer;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t// If no match with namespace, try to just match name\n\tfor (const LexLibrary &lexLib : libraries) {\n\t\tif (lexLib.fnCL) {\n\t\t\tScintilla::ILexer5 *pLexer = lexLib.fnCL(sLanguageName.c_str());\n\t\t\tif (pLexer) {\n\t\t\t\treturn pLexer;\n\t\t\t}\n\t\t}\n\t}\n\tif (pCreateLexerDefault) {\n\t\treturn pCreateLexerDefault(sLanguageName.c_str());\n\t}\n#if defined(LEXILLA_STATIC)\n\tScintilla::ILexer5 *pLexer = CreateLexer(sLanguageName.c_str());\n\tif (pLexer) {\n\t\treturn pLexer;\n\t}\n#endif\n\treturn nullptr;\n}\n\nstd::vector<std::string> Lexilla::Lexers() {\n\treturn lexers;\n}\n\nstd::string Lexilla::NameFromID(int identifier) {\n\tfor (const LexLibrary &lexLib : libraries) {\n\t\tif (lexLib.fnLNFI) {\n\t\t\tconst char *name = lexLib.fnLNFI(identifier);\n\t\t\tif (name) {\n\t\t\t\treturn name;\n\t\t\t}\n\t\t}\n\t}\n\treturn std::string();\n}\n\nstd::vector<std::string> Lexilla::LibraryProperties() {\n\treturn libraryProperties;\n}\n\nvoid Lexilla::SetProperty(const char *key, const char *value) {\n\tfor (const LexLibrary &lexLib : libraries) {\n\t\tif (lexLib.fnSLP) {\n\t\t\tlexLib.fnSLP(key, value);\n\t\t}\n\t}\n\t// Standard Lexilla does not have any properties so don't set.\n}\n"
  },
  {
    "path": "lexilla/access/LexillaAccess.h",
    "content": "// SciTE - Scintilla based Text Editor\n/** @file LexillaAccess.h\n ** Interface to loadable lexers.\n ** This does not depend on SciTE code so can be copied out into other projects.\n **/\n// Copyright 2019 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#ifndef LEXILLAACCESS_H\n#define LEXILLAACCESS_H\n\nnamespace Lexilla {\n\n// Directory to load default Lexilla from, commonly the directory of the application.\nvoid SetDefaultDirectory(std::string_view directory);\n\n// Specify CreateLexer when statically linked so no hard dependency in LexillaAccess\n// so it doesn't have to be built in two forms - static and dynamic.\nvoid SetDefault(CreateLexerFn pCreate) noexcept;\n\n// sharedLibraryPaths is a ';' separated list of shared libraries to load.\n// On Win32 it is treated as UTF-8 and on Unix it is passed to dlopen directly.\n// Return true if any shared libraries are loaded.\nbool Load(std::string_view sharedLibraryPaths);\n\nScintilla::ILexer5 *MakeLexer(std::string_view languageName);\n\nstd::vector<std::string> Lexers();\n[[deprecated]] std::string NameFromID(int identifier);\nstd::vector<std::string> LibraryProperties();\nvoid SetProperty(const char *key, const char *value);\n\n}\n\n#endif\n"
  },
  {
    "path": "lexilla/access/README",
    "content": "README for access directory.\r\n\r\nLexillaAccess is a module that simplifies using multiple libraries that follow the Lexilla protocol.\r\n\r\nIt can be compiled into a Lexilla client application.\r\n\r\nApplications with complex needs can copy the code and customise it to meet their requirements.\r\n\r\nThis module is not meant to be compiled into Lexilla.\r\n"
  },
  {
    "path": "lexilla/cppcheck.suppress",
    "content": "// File to suppress cppcheck warnings for files that will not be fixed.\r\n// Does not suppress warnings where an additional occurrence of the warning may be of interest.\r\n// Configured for cppcheck 2.12\r\n\r\n// Coding style is to use assignments in constructor when there are many\r\n// members to initialize or the initialization is complex or has comments.\r\nuseInitializationList\r\n\r\n// These may be interesting but its not clear without examining each instance closely\r\n// Would have to ensure that any_of/all_of has same early/late exits as current code and\r\n// produces same result on empty collections\r\nuseStlAlgorithm\r\n\r\n// Some non-explicit constructors are used for conversions or are private to lexers\r\nnoExplicitConstructor\r\n\r\n// The performance cost of by-value passing is often small and using a reference decreases\r\n// code legibility.\r\npassedByValue\r\n\r\n// cppcheck 2.11 can't find system headers on Win32.\r\nmissingIncludeSystem\r\n\r\n// Passing temporary string into hidden object creator functions: they do not hold the argument\r\ndanglingTemporaryLifetime:lexilla/access/LexillaAccess.cxx\r\nreturnDanglingLifetime:lexilla/access/LexillaAccess.cxx\r\n\r\n// cppcheck seems to believe that unique_ptr<char *[]>::get returns void* instead of char**\r\narithOperationsOnVoidPointer:lexilla/lexlib/WordList.cxx\r\n\r\n// cppcheck 2.11 limits checking of complex functions unless --check-level=exhaustive but that\r\n// only finds one false issue in LexRuby\r\ncheckLevelNormal:lexilla/lexers/LexBash.cxx\r\ncheckLevelNormal:lexilla/lexers/LexCPP.cxx\r\ncheckLevelNormal:lexilla/lexers/LexHTML.cxx\r\ncheckLevelNormal:lexilla/lexers/LexPerl.cxx\r\ncheckLevelNormal:lexilla/lexers/LexRuby.cxx\r\n\r\n// Physically but not logically const.\r\nconstVariablePointer:lexilla/examples/CheckLexilla/CheckLexilla.c\r\n\r\n// Suppress most lexer warnings since the lexers are maintained by others\r\nredundantCondition:lexilla/lexers/LexA68k.cxx\r\nconstParameterReference:lexilla/lexers/LexAbaqus.cxx\r\nconstParameterReference:lexilla/lexers/LexAda.cxx\r\nconstParameterReference:lexilla/lexers/LexAsciidoc.cxx\r\nconstParameterCallback:lexilla/lexers/LexAsn1.cxx\r\nknownConditionTrueFalse:lexilla/lexers/LexAU3.cxx\r\nshadowVariable:lexilla/lexers/LexAU3.cxx\r\nconstParameterReference:lexilla/lexers/LexBaan.cxx\r\nunreadVariable:lexilla/lexers/LexBaan.cxx\r\nvariableScope:lexilla/lexers/LexBaan.cxx\r\nconstParameterPointer:lexilla/lexers/LexBaan.cxx\r\nconstParameterReference:lexilla/lexers/LexBash.cxx\r\nknownConditionTrueFalse:lexilla/lexers/LexBash.cxx\r\nvariableScope:lexilla/lexers/LexBash.cxx\r\nconstVariable:lexilla/lexers/LexBasic.cxx\r\nconstParameterReference:lexilla/lexers/LexCLW.cxx\r\nknownConditionTrueFalse:lexilla/lexers/LexCLW.cxx\r\nvariableScope:lexilla/lexers/LexCmake.cxx\r\nknownConditionTrueFalse:lexilla/lexers/LexCmake.cxx\r\nconstParameterReference:lexilla/lexers/LexCmake.cxx\r\nconstParameterReference:lexilla/lexers/LexCOBOL.cxx\r\nconstParameterReference:lexilla/lexers/LexCoffeeScript.cxx\r\nconstParameterPointer:lexilla/lexers/LexCoffeeScript.cxx\r\nknownConditionTrueFalse:lexilla/lexers/LexCoffeeScript.cxx\r\nconstVariableReference:lexilla/lexers/LexConf.cxx\r\nconstParameterReference:lexilla/lexers/LexCPP.cxx\r\nvariableScope:lexilla/lexers/LexCSS.cxx\r\nknownConditionTrueFalse:lexilla/lexers/LexDataflex.cxx\r\nconstParameterReference:lexilla/lexers/LexDataflex.cxx\r\nvariableScope:lexilla/lexers/LexDataflex.cxx\r\nknownConditionTrueFalse:lexilla/lexers/LexECL.cxx\r\nvariableScope:lexilla/lexers/LexECL.cxx\r\nconstParameter:lexilla/lexers/LexEDIFACT.cxx\r\nconstParameterPointer:lexilla/lexers/LexEDIFACT.cxx\r\nknownConditionTrueFalse:lexilla/lexers/LexEiffel.cxx\r\nvariableScope:lexilla/lexers/LexErlang.cxx\r\nknownConditionTrueFalse:lexilla/lexers/LexEScript.cxx\r\nconstParameter:lexilla/lexers/LexFortran.cxx\r\nconstParameterReference:lexilla/lexers/LexFortran.cxx\r\nredundantContinue:lexilla/lexers/LexFortran.cxx\r\nknownConditionTrueFalse:lexilla/lexers/LexFSharp.cxx\r\nconstParameterReference:lexilla/lexers/LexGAP.cxx\r\nconstParameterReference:lexilla/lexers/LexGDScript.cxx\r\nvariableScope:lexilla/lexers/LexGui4Cli.cxx\r\nconstParameterReference:lexilla/lexers/LexHaskell.cxx\r\nconstParameterReference:lexilla/lexers/LexHex.cxx\r\nknownConditionTrueFalse:lexilla/lexers/LexHex.cxx\r\nconstVariable:lexilla/lexers/LexHollywood.cxx\r\nvariableScope:lexilla/lexers/LexInno.cxx\r\nconstVariableReference:lexilla/lexers/LexInno.cxx\r\nconstParameterReference:lexilla/lexers/LexJSON.cxx\r\nconstParameterPointer:lexilla/lexers/LexJulia.cxx\r\nconstParameterReference:lexilla/lexers/LexJulia.cxx\r\nknownConditionTrueFalse:lexilla/lexers/LexJulia.cxx\r\nunreadVariable:lexilla/lexers/LexJulia.cxx\r\nvariableScope:lexilla/lexers/LexJulia.cxx\r\nvariableScope:lexilla/lexers/LexLaTeX.cxx\r\nconstParameterReference:lexilla/lexers/LexLaTeX.cxx\r\nconstParameterPointer:lexilla/lexers/LexMagik.cxx\r\nconstParameterReference:lexilla/lexers/LexMagik.cxx\r\nconstParameterReference:lexilla/lexers/LexMarkdown.cxx\r\nconstParameterPointer:lexilla/lexers/LexMatlab.cxx\r\nconstParameterReference:lexilla/lexers/LexMatlab.cxx\r\nunreadVariable:lexilla/lexers/LexMatlab.cxx\r\nvariableScope:lexilla/lexers/LexMatlab.cxx\r\nvariableScope:lexilla/lexers/LexMetapost.cxx\r\nconstParameterReference:lexilla/lexers/LexModula.cxx\r\nvariableScope:lexilla/lexers/LexModula.cxx\r\nconstParameterReference:lexilla/lexers/LexMPT.cxx\r\nvariableScope:lexilla/lexers/LexMSSQL.cxx\r\nshadowArgument:lexilla/lexers/LexMySQL.cxx\r\nconstParameterReference:lexilla/lexers/LexNim.cxx\r\nconstParameterReference:lexilla/lexers/LexNimrod.cxx\r\nknownConditionTrueFalse:lexilla/lexers/LexNimrod.cxx\r\nvariableScope:lexilla/lexers/LexNimrod.cxx\r\nvariableScope:lexilla/lexers/LexNsis.cxx\r\nconstParameterReference:lexilla/lexers/LexNsis.cxx\r\nknownConditionTrueFalse:lexilla/lexers/LexNsis.cxx\r\nvariableScope:lexilla/lexers/LexOpal.cxx\r\nconstParameterReference:lexilla/lexers/LexOpal.cxx\r\nknownConditionTrueFalse:lexilla/lexers/LexOpal.cxx\r\nconstParameterReference:lexilla/lexers/LexOScript.cxx\r\nconstParameterReference:lexilla/lexers/LexPascal.cxx\r\nvariableScope:lexilla/lexers/LexPB.cxx\r\nconstParameterReference:lexilla/lexers/LexPerl.cxx\r\nconstVariableReference:lexilla/lexers/LexPerl.cxx\r\nknownConditionTrueFalse:lexilla/lexers/LexPerl.cxx\r\nconstParameterReference:lexilla/lexers/LexPLM.cxx\r\nconstParameterReference:lexilla/lexers/LexPO.cxx\r\nconstParameterReference:lexilla/lexers/LexPython.cxx\r\nshadowVariable:lexilla/lexers/LexPowerPro.cxx\r\nknownConditionTrueFalse:lexilla/lexers/LexPowerPro.cxx\r\nvariableScope:lexilla/lexers/LexProgress.cxx\r\nconstParameterReference:lexilla/lexers/LexProgress.cxx\r\nconstParameterReference:lexilla/lexers/LexRaku.cxx\r\nvariableScope:lexilla/lexers/LexRaku.cxx\r\nredundantInitialization:lexilla/lexers/LexRegistry.cxx\r\nconstParameterReference:lexilla/lexers/LexRuby.cxx\r\nconstParameterReference:lexilla/lexers/LexRust.cxx\r\nknownConditionTrueFalse:lexilla/lexers/LexScriptol.cxx\r\nvariableScope:lexilla/lexers/LexSpecman.cxx\r\nunreadVariable:lexilla/lexers/LexSpice.cxx\r\nconstParameterReference:lexilla/lexers/LexSpice.cxx\r\nconstParameterReference:lexilla/lexers/LexSTTXT.cxx\r\nconstParameterReference:lexilla/lexers/LexTACL.cxx\r\nknownConditionTrueFalse:lexilla/lexers/LexTACL.cxx\r\nclarifyCalculation:lexilla/lexers/LexTADS3.cxx\r\nconstParameterReference:lexilla/lexers/LexTADS3.cxx\r\nconstParameterReference:lexilla/lexers/LexTAL.cxx\r\nconstVariableReference:lexilla/lexers/LexTCL.cxx\r\ninvalidscanf:lexilla/lexers/LexTCMD.cxx\r\nconstParameterReference:lexilla/lexers/LexTeX.cxx\r\nvariableScope:lexilla/lexers/LexTeX.cxx\r\nknownConditionTrueFalse:lexilla/lexers/LexTxt2tags.cxx\r\nknownConditionTrueFalse:lexilla/lexers/LexVB.cxx\r\nconstParameterReference:lexilla/lexers/LexVerilog.cxx\r\nvariableScope:lexilla/lexers/LexVerilog.cxx\r\nbadBitmaskCheck:lexilla/lexers/LexVerilog.cxx\r\nuselessCallsSubstr:lexilla/lexers/LexVerilog.cxx\r\nconstParameterReference:lexilla/lexers/LexVHDL.cxx\r\nconstVariable:lexilla/lexers/LexVHDL.cxx\r\nshadowVariable:lexilla/lexers/LexVHDL.cxx\r\nunreadVariable:lexilla/lexers/LexVHDL.cxx\r\nvariableScope:lexilla/lexers/LexVHDL.cxx\r\nunreadVariable:lexilla/lexers/LexVisualProlog.cxx\r\nvariableScope:lexilla/lexers/LexVisualProlog.cxx\r\nshiftTooManyBitsSigned:lexilla/lexers/LexVisualProlog.cxx\r\niterateByValue:lexilla/lexers/LexVisualProlog.cxx\r\nunreadVariable:lexilla/lexers/LexX12.cxx\r\nconstVariableReference:lexilla/lexers/LexX12.cxx\r\nconstParameterPointer:lexilla/lexers/LexX12.cxx\r\nuselessCallsSubstr:lexilla/lexers/LexX12.cxx\r\nconstParameterReference:lexilla/lexers/LexYAML.cxx\r\nconstParameterPointer:lexilla/lexers/LexYAML.cxx\r\nknownConditionTrueFalse:lexilla/lexers/LexYAML.cxx\r\n\r\n// These are due to Accessor::IndentAmount not declaring the callback as taking a const.\r\n// Changing this could cause problems for downstream projects.\r\nconstParameterCallback:lexilla/lexers/LexEiffel.cxx\r\nconstParameterCallback:lexilla/lexers/LexGDScript.cxx\r\nconstParameterCallback:lexilla/lexers/LexPython.cxx\r\nconstParameterCallback:lexilla/lexers/LexScriptol.cxx\r\nconstParameterCallback:lexilla/lexers/LexVB.cxx\r\n\r\nconstVariableReference:lexilla/lexers/LexBibTeX.cxx\r\nconstVariableReference:lexilla/lexers/LexCSS.cxx\r\nconstVariableReference:lexilla/lexers/LexCrontab.cxx\r\nconstVariableReference:lexilla/lexers/LexGui4Cli.cxx\r\nconstVariableReference:lexilla/lexers/LexMetapost.cxx\r\nconstVariableReference:lexilla/lexers/LexOpal.cxx\r\n\r\n// Suppress everything in test example files\r\n*:lexilla/test/examples/*\r\n\r\n// Suppress everything in catch.hpp as won't be changing\r\n*:lexilla/test/unit/catch.hpp\r\n// cppcheck gives up inside catch.hpp\r\n*:lexilla/test/unit/UnitTester.cxx\r\n*:lexilla/test/unit/unitTest.cxx\r\n\r\n// Tests often test things that are always true\r\nknownConditionTrueFalse:lexilla/test/unit/testCharacterSet.cxx\r\n\r\n// cppcheck fails REQUIRE from Catch\r\ncomparisonOfFuncReturningBoolError:lexilla/test/unit/*.cxx\r\n"
  },
  {
    "path": "lexilla/delbin.bat",
    "content": "@del /S /Q *.a *.aps *.bsc *.dll *.dsw *.exe *.idb *.ilc *.ild *.ilf *.ilk *.ils *.lib *.map *.ncb *.obj *.o *.opt *.ipdb *.pdb *.plg *.res *.sbr *.tds *.exp *.tlog *.lastbuildstate >NUL:\n"
  },
  {
    "path": "lexilla/doc/Lexilla.html",
    "content": "<?xml version=\"1.0\"?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n    \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n  <head>\n    <meta name=\"generator\" content=\"HTML Tidy, see www.w3.org\" />\n    <meta name=\"generator\" content=\"SciTE\" />\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\n    <meta name=\"keywords\" content=\"Scintilla, SciTE, Editing Component, Text Editor\" />\n    <meta name=\"Description\"\n    content=\"www.scintilla.org is the home of the Scintilla editing component and SciTE text editor application.\" />\n    <meta name=\"Date.Modified\" content=\"20240423\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <style type=\"text/css\">\n        .logo {\n            background: url(https://www.scintilla.org/LexillaLogo.png) no-repeat;\n            background-image: image-set(\n                        url(https://www.scintilla.org/LexillaLogo.png) 1x,\n                        url(https://www.scintilla.org/LexillaLogo2x.png) 2x  );\n            height:150px;\n        }\n        #versionlist {\n            margin: 0;\n            padding: .5em;\n            list-style-type: none;\n            color: #FFCC99;\n            background: #000000;\n        }\n        #versionlist li {\n            margin-bottom: .5em;\n        }\n        #menu {\n            margin: 0;\n            padding: .5em 0;\n            list-style-type: none;\n            font-size: larger;\n            background: #CCCCCC;\n        }\n        #menu li {\n            margin: 0;\n            padding: 0 .5em;\n            display: inline;\n        }\n    </style>\n    <script type=\"text/javascript\">\n   \tfunction IsRemote() {\n\t\tvar loc = '' + window.location;\n\t\treturn (loc.indexOf('http:')) != -1 || (loc.indexOf('https:') != -1);\n   \t}\n    </script>\n     <title>\n       Lexilla\n     </title>\n  </head>\n  <body bgcolor=\"#FFFFFF\" text=\"#000000\">\n    <table bgcolor=\"#000000\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n      <tr>\n        <td width=\"256\">\n        </td>\n        <td width=\"40%\" align=\"left\">\n          <font color=\"#FFCC99\" size=\"4\"> A library of language lexers for use with Scintilla</font>\n        </td>\n        <td width=\"40%\" align=\"right\">\n          <font color=\"#FFCC99\" size=\"3\">Release version 5.3.2<br />\n           Site last modified April 23 2024</font>\n        </td>\n        <td width=\"20%\">\n          &nbsp;\n        </td>\n      </tr>\n    </table>\n    <table bgcolor=\"#000000\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n      <tr>\n        <td width=\"100%\" class=\"logo\">\n          &nbsp;\n        </td>\n      </tr>\n    </table>\n    <ul id=\"versionlist\">\n      <li>Version 5.3.2 improves COBOL, HTML, Lua, Ruby, and Rust.</li>\n      <li>Version 5.3.1 improves Assembler, Bash, Batch, JavaScript, Python, and Ruby.</li>\n      <li>Version 5.3.0 improves Bash, HTML, and Lua.</li>\n      <li>Version 5.2.9 fixes potential problems on macOS 12 and older when built with Xcode 15.0.</li>\n      <li>Version 5.2.8 improves Python and R.</li>\n    </ul>\n    <ul id=\"menu\">\n      <li id=\"remote1\"><a href=\"https://www.scintilla.org/SciTEImage.html\">Screenshot</a></li>\n      <li id=\"remote2\"><a href=\"https://www.scintilla.org/LexillaDownload.html\">Download</a></li>\n      <li><a href=\"https://www.scintilla.org/LexillaDoc.html\">Documentation</a></li>\n      <li><a href=\"https://github.com/ScintillaOrg/lexilla/issues\">Bugs</a></li>\n      <li id=\"remote3\"><a href=\"https://www.scintilla.org/SciTE.html\">SciTE</a></li>\n      <li><a href=\"https://www.scintilla.org/LexillaHistory.html\">History</a></li>\n      <li><a href=\"https://www.scintilla.org/ScintillaRelated.html\">Related</a></li>\n      <li id=\"remote4\"><a href=\"https://www.scintilla.org/Privacy.html\">Privacy</a></li>\n    </ul>\n<script type=\"text/javascript\" language=\"JavaScript\"><!--\nif (!IsRemote()) { //if NOT remote...\n    document.getElementById('remote1').style.display='none';\n    document.getElementById('remote2').style.display='none';\n    document.getElementById('remote3').style.display='none';\n    document.getElementById('remote4').style.display='none';\n}\n//--></script>\n    <p>\n       <a href=\"https://www.scintilla.org/LexillaDoc.html\">Lexilla</a> is a free library of language\n       lexers that can be used with the <a href=\"https://www.scintilla.org/index.html\">Scintilla</a>\n       editing component.\n       It comes with complete source code and a <a href=\"https://www.scintilla.org/License.txt\">license</a> that\n       permits use in any free project or commercial product.\n    </p>\n    <p>\n       Originally, this functionality was incorporated inside Scintilla.\n       It has been extracted as a separate project to make it easier for contributors to work on\n       support for new languages and to fix bugs in existing lexers.\n       It also defines a protocol where projects can implement their own lexers and distribute\n       them as they wish.\n    </p>\n    <p>\n       Current development requires a recent C++ compiler that supports C++17.\n       The testing framework uses some C++20 features but the basic library only uses C++17.\n    </p>\n    <p>\n       Lexilla is currently available for Intel Win32, macOS, and Linux compatible operating\n      systems. It has been run on Windows 10, macOS 10.13+, and on Ubuntu 20.04 but is likely\n      to run on earlier systems as it has no GUI functionality.\n    </p>\n    <p>\n       You can <a href=\"https://www.scintilla.org/LexillaDownload.html\">download Lexilla.</a>\n    </p>\n    <p>\n       The source code can be downloaded via Git at GitHub\n\t<a href=\"https://github.com/ScintillaOrg/lexilla\">Lexilla project page</a>.<br />\n        git clone https://github.com/ScintillaOrg/lexilla\n    </p>\n    <p>Current repository status:<br />\n    <a href=\"https://github.com/ScintillaOrg/lexilla/actions/workflows/build-check.yml\"><img src=\"https://github.com/ScintillaOrg/lexilla/actions/workflows/build-check.yml/badge.svg\" /></a><br />\n    <a href=\"https://github.com/ScintillaOrg/lexilla/actions/workflows/build-check-win32.yml\"><img src=\"https://github.com/ScintillaOrg/lexilla/actions/workflows/build-check-win32.yml/badge.svg\" /></a><br />\n    <a href=\"https://github.com/ScintillaOrg/lexilla/actions/workflows/build-check-macos.yml\"><img src=\"https://github.com/ScintillaOrg/lexilla/actions/workflows/build-check-macos.yml/badge.svg\" /></a>\n    </p>\n    <p>\n       <a href=\"https://www.scintilla.org/ScintillaRelated.html\">Related sites.</a>\n    </p>\n    <p>\n       <a href=\"https://github.com/ScintillaOrg/lexilla/issues\">Bugs and other issues.</a>\n    </p>\n    <p>\n       <a href=\"https://www.scintilla.org/LexillaHistory.html\">History and contribution credits.</a>\n    </p>\n    <p>\n      Questions and comments about Lexilla should be directed to the\n      <a href=\"https://groups.google.com/forum/#!forum/scintilla-interest\">scintilla-interest</a>\n      mailing list,\n      which is for discussion of Scintilla and related projects, their bugs and future features.\n      This is a low traffic list, averaging less than 20 messages per week.\n      To avoid spam, only list members can write to the list.\n      New versions of Lexilla are announced on scintilla-interest.\n      <br />\n    </p>\n  </body>\n</html>\n\n"
  },
  {
    "path": "lexilla/doc/LexillaDoc.html",
    "content": "<?xml version=\"1.0\"?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n    \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n  <head>\n    <meta name=\"generator\"\n    content=\"HTML Tidy for Windows (vers 1st August 2002), see www.w3.org\" />\n    <meta name=\"generator\" content=\"SciTE\" />\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\n\n    <title>Lexilla Documentation</title>\n\n    <style type=\"text/css\">\n<!--\n/*<![CDATA[*/\n\tCODE { font-weight: bold; font-family: Menlo,Consolas,Bitstream Vera Sans Mono,Courier New,monospace; }\n\tA:visited { color: blue; }\n\tA:hover { text-decoration: underline ! important; }\n\tA.message { text-decoration: none; font-weight: bold; font-family: Menlo,Consolas,Bitstream Vera Sans Mono,Courier New,monospace; }\n\tA.seealso { text-decoration: none; font-weight: bold; font-family: Menlo,Consolas,Bitstream Vera Sans Mono,Courier New,monospace; }\n\tA.toc { text-decoration: none; }\n\tA.jump { text-decoration: none; }\n\tLI.message { text-decoration: none; font-weight: bold; font-family: Menlo,Consolas,Bitstream Vera Sans Mono,Courier New,monospace; }\n\tH2 { background: #E0EAFF; }\n\n\ttable {\n\t\tborder: 0px;\n\t\tborder-collapse: collapse;\n\t}\n\n        div.console {\n            font-family: Menlo,Consolas,Bitstream Vera Sans Mono,Courier New,monospace;\n            color: #008000;\n            font-weight: bold;\n            background: #F7FCF7;\n            border: 1px solid #C0D7C0;\n            margin: 0.3em 3em;\n            padding: 0.3em 0.6em;\n        }\n        span.console {\n            font-family: Menlo,Consolas,Bitstream Vera Sans Mono,Courier New,monospace;\n            color: #008000;\n            font-weight: bold;\n            background: #F7FCF7;\n            border: 1px solid #C0D7C0;\n            margin: 0.1em 0em;\n            padding: 0.1em 0.3em;\n        }\n\n        .name {\n\t\tcolor: #B08000;\n        }\n/*]]>*/\n-->\n    </style>\n  </head>\n\n  <body bgcolor=\"#FFFFFF\" text=\"#000000\">\n    <table bgcolor=\"#000000\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\"\n    summary=\"Banner\">\n      <tr>\n        <td><img src=\"SciTEIco.png\" border=\"3\" height=\"64\" width=\"64\" alt=\"Lexilla icon\" /></td>\n\n        <td><a href=\"index.html\"\n        style=\"color:white;text-decoration:none;font-size:200%\">Lexilla</a></td>\n      </tr>\n    </table>\n\n    <h1>Lexilla Documentation</h1>\n\n    <p>Last edited 21 April 2021 NH</p>\n\n    <h2>Introduction</h2>\n\n    <p>Lexilla is a library containing lexers for use with Scintilla. It can be either a static library\n    that is linked into an application or a shared library that is loaded at runtime.</p>\n\n    <p>Lexilla does not interact with the display so there is no need to compile it for a\n    particular GUI toolkit. Therefore there can be a common library shared by applications using\n    different GUI toolkits. In some circumstances there may need to be both 32-bit and 64-bit versions\n    on one system to match different applications.</p>\n\n    <p>Different extensions are commonly used for shared libraries: .so on Linux, .dylib on macOS, and .DLL on Windows.\n     </p>\n\n    <h2>The Lexilla protocol</h2>\n\n    <p>A set of functions is defined by Lexilla for use by applications. Libraries that provide these functions\n    can be used as a replacement for Lexilla or to add new lexers beyond those provided by Lexilla.</p>\n\n    <p>The Lexilla protocol is a superset of the external lexer protocol and defines these functions that may be exported from a shared library:<br />\n    <code>int <span class=\"name\">GetLexerCount</span>()</code><br />\n    <code>void <span class=\"name\">GetLexerName</span>(unsigned int index, char *name, int buflength)</code><br />\n    <code>LexerFactoryFunction <span class=\"name\">GetLexerFactory</span>(unsigned int index)</code><br />\n    <code>ILexer5 *<span class=\"name\">CreateLexer</span>(const char *name)</code><br />\n    <code>const char *<span class=\"name\">LexerNameFromID</span>(int identifier)</code><br />\n    <code>const char *<span class=\"name\">GetLibraryPropertyNames</span>()</code><br />\n    <code>void <span class=\"name\">SetLibraryProperty</span>(const char *key, const char *value)</code><br />\n    <code>const char *<span class=\"name\">GetNameSpace</span>()</code>\n    </p>\n\n    <p><span class=\"name\">ILexer5</span> is defined by Scintilla in include/ILexer.h as the interface provided by lexers which is called by Scintilla.\n    Many clients do not actually need to call methods on <span class=\"name\">ILexer5</span> - they just take the return from CreateLexer and plug it\n    straight into Scintilla so it can be treated as a machine pointer (void *).\n    </p>\n\n    <p><span class=\"name\">LexerFactoryFunction</span> is defined as a function that takes no arguments and returns an <span class=\"name\">ILexer5</span> *:\n    <code>ILexer5 *(*LexerFactoryFunction)()</code> but this can be ignored by most client code.\n    </p>\n\n    <p>The Lexilla protocol is a superset of the earlier external lexer protocol that defined the first 3 functions\n    (<span class=\"name\">GetLexerCount</span>, <span class=\"name\">GetLexerName</span>, <span class=\"name\">GetLexerFactory</span>)\n    so Lexilla can be loaded by applications that support that protocol.\n    <span class=\"name\">GetLexerFactory</span> will rarely be used now as it is easier to call <span class=\"name\">CreateLexer</span>.\n    </p>\n\n    <p><span class=\"name\">CreateLexer</span> is the main call that will create a lexer for a particular language. The returned lexer can then be\n    set as the current lexer in Scintilla by calling\n    <a class=\"seealso\" href=\"ScintillaDoc.html#SCI_SETILEXER\">SCI_SETILEXER</a>.</p>\n\n    <p><span class=\"name\">LexerNameFromID</span> is an optional function that returns the name for a lexer identifier.\n    <code>LexerNameFromID(SCLEX_CPP) &rarr; \"cpp\"</code>.\n    This is a temporary affordance to make it easier to convert applications to using Lexilla.\n    Applications should move to using lexer names instead of IDs.\n    This function is deprecated, showing warnings with some compilers, and will be removed in a future version of Lexilla.</p>\n\n    <p><span class=\"name\">SetLibraryProperty</span> and <span class=\"name\">GetLibraryPropertyNames</span>\n    are optional functions that can be\n    defined if a library requires initialisation before calling other methods.\n    For example, a lexer library that reads language definitions from XML files may require that the\n    directory containing these files be set before a call to CreateLexer.\n    <code>SetLibraryProperty(\"definitions.directory\", \"/usr/share/xeditor/language-definitions\")</code>\n    If a library implements SetLibraryProperty then it may also provide a set of valid property names with\n    GetLibraryPropertyNames that can then be used by the application to define configuration file property\n    names or user interface elements for options dialogs.</p>\n\n    <p><span class=\"name\">GetNameSpace</span> is an optional function that returns a namespace string\n    that can be used to disambiguate lexers with the same name from different providers.\n    If Lexilla and XMLLexers both provide a \"cpp\" lexer than a request for \"cpp\" may be satisfied by either but \"xmllexers.cpp\"\n    unambiguously refers to the \"cpp\" lexer from XMLLexers.</p>\n\n    <h2>Building Lexilla</h2>\n\n    <p>Before using Lexilla it must be built or downloaded.</p>\n    <p>Lexilla requires some headers from Scintilla to build and expects a directory named\n    \"scintilla\" containing a copy of Scintilla 5+ to be a peer of the Lexilla top level\n    directory conventionally called \"lexilla\".</p>\n\n    <div>To build Lexilla, in the lexilla/src directory, run make (for gcc or clang)</div>\n    <div class=\"console\">make</div>\n    <div>or nmake for MSVC</div>\n    <div class=\"console\">nmake -f lexilla.mak</div>\n    <br />\n\n    <div>After building Lexilla, its test suite can be run with make/nmake in the lexilla/test directory. For gcc or clang</div>\n    <div class=\"console\">make test</div>\n    or for MSVC<br />\n    <div class=\"console\">nmake -f testlexers.mak test</div>\n    <div>Each test case should show \"<code>Lexing ...</code>\" and errors will display a diagnostic, commonly showing\n    a difference between the actual and expected result:<br>\n    <code>C:\\u\\hg\\lexilla\\test\\examples\\python\\x.py:1: is different</code>\n    </div>\n\n    <p>There are also RunTest.sh / RunTest.bat scripts in the scripts directory to build Lexilla and then build and run the tests.\n    These both use gcc/clang, not MSVC.</p>\n\n    <p>There are Microsoft Visual C++ and Xcode projects that can be used to build Lexilla.\n    For Visual C++: src/Lexilla.vcxproj. For Xcode: src/Lexilla/Lexilla.xcodeproj.\n    There is also test/TestLexers.vcxproj to build the tests with Visual C++.</p>\n\n    <h2>Using Lexilla</h2>\n\n    <p>Definitions for using Lexilla from C and C++ are included in lexilla/include/Lexilla.h.\n    For C++, scintilla/include/ILexer.h should be included before Lexilla.h as the\n    <code>ILexer5</code> type is used.\n    For C, ILexer.h should not be included as C does not understand it and from C,\n    <code>void*</code> is used instead of <code>ILexer5*</code>.\n    </p>\n\n    <p>For many applications the main Lexilla operations are loading the Lexilla library, creating a\n    lexer and using that lexer in Scintilla.\n    Applications need to define the location (or locations) they expect\n    to find Lexilla or libraries that support the Lexilla protocol.\n    They also need to define how they request particular lexers, perhaps with a mapping from\n    file extensions to lexer names.</p>\n\n    <h3 id=\"CheckLexilla\">From C - CheckLexilla</h3>\n\n    <p>An example C program for accessing Lexilla is provided in lexilla/examples/CheckLexilla.\n    Build with <span class=\"console\">make</span> and run with <span class=\"console\">make check</span>.\n    </p>\n\n    <h3>From C++ - LexillaAccess</h3>\n\n    <p>A C++ module, LexillaAccess.cxx / LexillaAccess.h is provided in lexilla/access.\n    This can either be compiled into the application when it is sufficient\n    or the source code can be copied into the application and customized when the application has additional requirements\n    (such as checking code signatures).\n    SciTE uses LexillaAccess.</p>\n\n    <p>LexillaAccess supports loading multiple shared libraries implementing the Lexilla protocol at one time.</p>\n\n    <h3>From Qt</h3>\n\n    <p>For Qt, use either LexillaAccess from above or Qt's QLibrary class. With 'Call' defined to call Scintilla APIs.<br />\n    <code>\n#if _WIN32<br />\n&nbsp;&nbsp;&nbsp;&nbsp;typedef void *(__stdcall *CreateLexerFn)(const char *name);<br />\n#else<br />\n&nbsp;&nbsp;&nbsp;&nbsp;typedef void *(*CreateLexerFn)(const char *name);<br />\n#endif<br />\n&nbsp;&nbsp;&nbsp;&nbsp;QFunctionPointer fn = QLibrary::resolve(\"lexilla\", \"CreateLexer\");<br />\n&nbsp;&nbsp;&nbsp;&nbsp;void *lexCpp = ((CreateLexerFn)fn)(\"cpp\");<br />\n&nbsp;&nbsp;&nbsp;&nbsp;Call(SCI_SETILEXER, 0, (sptr_t)(void *)lexCpp);<br />\n    </code></p>\n\n    <p>Applications may discover the set of lexers provided by a library by first calling\n    <span class=\"name\">GetLexerCount</span> to find the number of lexers implemented in the library then looping over calling\n    <span class=\"name\">GetLexerName</span> with integers 0 to <code>GetLexerCount()-1</code>.</p>\n\n    <p>Applications may set properties on a library by calling <span class=\"name\">SetLibraryProperty</span> if provided.\n    This may be needed for initialisation so should before calling <span class=\"name\">GetLexerCount</span> or <span class=\"name\">CreateLexer</span>.\n    A set of property names may be available from <span class=\"name\">GetLibraryPropertyNames</span> if provided.\n    It returns a string pointer where the string contains a list of property names separated by '\\n'.\n    It is up to applications to define how properties are defined and persisted in its user interface\n    and configuration files.</p>\n\n    <h2>Modifying or adding lexers</h2>\n\n    <p>Lexilla can be modified or a new library created that can be used to replace or augment Lexilla.</p>\n\n    <p>Lexer libraries that provide the same functions as Lexilla may provide lexers for use by Scintilla,\n    augmenting or replacing those provided by Lexilla.\n    To allow initialisation of lexer libraries, a <code>SetLibraryProperty(const char *key, const char *value)</code>\n    may optionally be implemented. For example, a lexer library that uses XML based lexer definitions may\n    be provided with a directory to search for such definitions.\n    Lexer libraries should ignore any properties that they do not understand.\n    The set of properties supported by a lexer library is specified as a '\\n' separated list of property names by\n    an optional <code>const char *GetLibraryPropertyNames()</code> function.\n    </p>\n\n    <p>Lexilla and its contained lexers can be tested with the TestLexers program in lexilla/test.\n    Read lexilla/test/README for information on building and using TestLexers.</p>\n\n    <p>An example of a simple lexer housed in a shared library that is compatible with the\n    Lexilla protocol can be found in lexilla/examples/SimpleLexer. It is implemented in C++.\n    Build with <span class=\"console\">make</span> and check by running <a href=\"#CheckLexilla\">CheckLexilla</a> against it with\n    <span class=\"console\">make check</span>.\n    </p>\n\n  </body>\n</html>\n\n"
  },
  {
    "path": "lexilla/doc/LexillaDownload.html",
    "content": "<?xml version=\"1.0\"?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n    \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n  <head>\n    <meta name=\"generator\" content=\"HTML Tidy, see www.w3.org\" />\n    <meta name=\"generator\" content=\"SciTE\" />\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <title>\n      Download Lexilla\n    </title>\n  </head>\n  <body bgcolor=\"#FFFFFF\" text=\"#000000\">\n    <table bgcolor=\"#000000\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n      <tr>\n        <td>\n          <img src=\"SciTEIco.png\" border=\"3\" height=\"64\" width=\"64\" alt=\"Scintilla icon\" />\n        </td>\n        <td>\n          <a href=\"index.html\" style=\"color:white;text-decoration:none\"><font size=\"5\">Download\n          Lexilla</font></a>\n        </td>\n      </tr>\n    </table>\n    <table bgcolor=\"#CCCCCC\" width=\"100%\" cellspacing=\"0\" cellpadding=\"8\" border=\"0\">\n      <tr>\n        <td>\n          <font size=\"4\"> <a href=\"https://www.scintilla.org/lexilla532.zip\">\n\tWindows</a>&nbsp;&nbsp;\n\t<a href=\"https://www.scintilla.org/lexilla532.tgz\">\n          GTK/Linux</a>&nbsp;&nbsp;\n\t</font>\n        </td>\n      </tr>\n    </table>\n    <h2>\n       Download.\n    </h2>\n    <p>\n       The <a href=\"License.txt\">license</a> for using Lexilla is similar to that of Python\n      containing very few restrictions.\n    </p>\n    <h3>\n       Release 5.3.2\n    </h3>\n    <h4>\n       Source Code\n    </h4>\n       The source code package contains all of the source code for Lexilla but no binary\n\texecutable code and is available in\n       <ul>\n       <li><a href=\"https://www.scintilla.org/lexilla532.zip\">zip format</a> (1.3M) commonly used on Windows</li>\n       <li><a href=\"https://www.scintilla.org/lexilla532.tgz\">tgz format</a> (0.9M) commonly used on Linux and compatible operating systems</li>\n       </ul>\n       Instructions for building on both Windows and Linux are included in the readme file.\n    <h4>\n       Windows Executable Code\n    </h4>\n       There is no download available containing only the Lexilla DLL.\n       However, it is included in the <a href=\"SciTEDownload.html\">SciTE\n       executable full download</a> as Lexilla.DLL.\n    <p>\n       <a href=\"SciTEDownload.html\">SciTE</a> is a good demonstration of Lexilla.\n    </p>\n    <p>\n       Previous versions can be downloaded from the <a href=\"LexillaHistory.html\">history\n      page</a>.\n    </p>\n  </body>\n</html>\n"
  },
  {
    "path": "lexilla/doc/LexillaHistory.html",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n    \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n  <head>\n    <meta name=\"generator\" content=\"HTML Tidy, see www.w3.org\" />\n    <meta name=\"generator\" content=\"SciTE\" />\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <title>\n      Lexilla\n    </title>\n    <style type=\"text/css\">\n        table {\n            border-collapse: collapse;\n            font-size: 80%;\n        }\n        td {\n            xborder: 1px solid #1F1F1F;\n            padding: 0px 4px;\n        }\n    </style>\n  </head>\n  <body bgcolor=\"#FFFFFF\" text=\"#000000\">\n    <table bgcolor=\"#000000\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n      <tr>\n        <td>\n          <img src=\"SciTEIco.png\" border=\"3\" height=\"64\" width=\"64\" alt=\"Scintilla icon\" />\n        </td>\n        <td>\n          <a href=\"index.html\" style=\"color:white;text-decoration:none\"><font size=\"5\">Lexilla</font></a>\n        </td>\n      </tr>\n    </table>\n    <h1>History of Lexilla</h1>\n    <p>\n       Lexilla was originally code that was part of the Scintilla project.\n       Thus it shares much of the history and contributors of Scintilla before it was extracted as its own project.\n    </p>\n    <h2>Contributors</h2>\n    <p>\n       Thanks to all the people that have contributed patches, bug reports and suggestions.\n    </p>\n    <p>\n       Source code and documentation have been contributed by\n    </p>\n    <table>\n      <tr>\n\t<td>Atsuo Ishimoto</td>\n\t<td>Mark Hammond</td>\n\t<td>Francois Le Coguiec</td>\n\t<td>Dale Nagata</td>\n      </tr><tr>\n\t<td>Ralf Reinhardt</td>\n\t<td>Philippe Lhoste</td>\n\t<td>Andrew McKinlay</td>\n\t<td>Stephan R. A. Deibel</td>\n      </tr><tr>\n\t<td>Hans Eckardt</td>\n\t<td>Vassili Bourdo</td>\n\t<td>Maksim Lin</td>\n\t<td>Robin Dunn</td>\n      </tr><tr>\n\t<td>John Ehresman</td>\n\t<td>Steffen Goeldner</td>\n\t<td>Deepak S.</td>\n\t<td><a href=\"http://www.develop.com\">DevelopMentor</a></td>\n      </tr><tr>\n\t<td>Yann Gaillard</td>\n\t<td>Aubin Paul</td>\n\t<td>Jason Diamond</td>\n\t<td>Ahmad Baitalmal</td>\n      </tr><tr>\n\t<td>Paul Winwood</td>\n\t<td>Maxim Baranov</td>\n\t<td>Ragnar Højland</td>\n\t<td>Christian Obrecht</td>\n      </tr><tr>\n\t<td>Andreas Neukoetter</td>\n\t<td>Adam Gates</td>\n\t<td>Steve Lhomme</td>\n\t<td>Ferdinand Prantl</td>\n      </tr><tr>\n\t<td>Jan Dries</td>\n\t<td>Markus Gritsch</td>\n\t<td>Tahir Karaca</td>\n\t<td>Ahmad Zawawi</td>\n      </tr><tr>\n\t<td>Laurent le Tynevez</td>\n\t<td>Walter Braeu</td>\n\t<td>Ashley Cambrell</td>\n\t<td>Garrett Serack</td>\n      </tr><tr>\n\t<td>Holger Schmidt</td>\n\t<td><a href=\"http://www.activestate.com\">ActiveState</a></td>\n\t<td>James Larcombe</td>\n\t<td>Alexey Yutkin</td>\n      </tr><tr>\n\t<td>Jan Hercek</td>\n\t<td>Richard Pecl</td>\n\t<td>Edward K. Ream</td>\n\t<td>Valery Kondakoff</td>\n      </tr><tr>\n\t<td>Smári McCarthy</td>\n\t<td>Clemens Wyss</td>\n\t<td>Simon Steele</td>\n\t<td>Serge A. Baranov</td>\n      </tr><tr>\n\t<td>Xavier Nodet</td>\n\t<td>Willy Devaux</td>\n\t<td>David Clain</td>\n\t<td>Brendon Yenson</td>\n      </tr><tr>\n\t<td><a href=\"http://www.baanboard.com\">Vamsi Potluru</a></td>\n\t<td>Praveen Ambekar</td>\n\t<td>Alan Knowles</td>\n\t<td>Kengo Jinno</td>\n      </tr><tr>\n\t<td>Valentin Valchev</td>\n\t<td>Marcos E. Wurzius</td>\n\t<td>Martin Alderson</td>\n\t<td>Robert Gustavsson</td>\n      </tr><tr>\n\t<td>José Fonseca</td>\n\t<td>Holger Kiemes</td>\n\t<td>Francis Irving</td>\n\t<td>Scott Kirkwood</td>\n      </tr><tr>\n\t<td>Brian Quinlan</td>\n\t<td>Ubi</td>\n\t<td>Michael R. Duerig</td>\n\t<td>Deepak T</td>\n      </tr><tr>\n\t<td>Don Paul Beletsky</td>\n\t<td>Gerhard Kalab</td>\n\t<td>Olivier Dagenais</td>\n\t<td>Josh Wingstrom</td>\n      </tr><tr>\n\t<td>Bruce Dodson</td>\n\t<td>Sergey Koshcheyev</td>\n\t<td>Chuan-jian Shen</td>\n\t<td>Shane Caraveo</td>\n      </tr><tr>\n\t<td>Alexander Scripnik</td>\n\t<td>Ryan Christianson</td>\n\t<td>Martin Steffensen</td>\n\t<td>Jakub Vrána</td>\n      </tr><tr>\n\t<td>The Black Horus</td>\n\t<td>Bernd Kreuss</td>\n\t<td>Thomas Lauer</td>\n\t<td>Mike Lansdaal</td>\n      </tr><tr>\n\t<td>Yukihiro Nakai</td>\n\t<td>Jochen Tucht</td>\n\t<td>Greg Smith</td>\n\t<td>Steve Schoettler</td>\n      </tr><tr>\n\t<td>Mauritius Thinnes</td>\n\t<td>Darren Schroeder</td>\n\t<td>Pedro Guerreiro</td>\n\t<td>Steven te Brinke</td>\n      </tr><tr>\n\t<td>Dan Petitt</td>\n\t<td>Biswapesh Chattopadhyay</td>\n\t<td>Kein-Hong Man</td>\n\t<td>Patrizio Bekerle</td>\n      </tr><tr>\n\t<td>Nigel Hathaway</td>\n\t<td>Hrishikesh Desai</td>\n\t<td>Sergey Puljajev</td>\n\t<td>Mathias Rauen</td>\n      </tr><tr>\n\t<td><a href=\"http://www.spaceblue.com\">Angelo Mandato</a></td>\n\t<td>Denis Sureau</td>\n\t<td>Kaspar Schiess</td>\n\t<td>Christoph Hösler</td>\n      </tr><tr>\n\t<td>João Paulo F Farias</td>\n\t<td>Ron Schofield</td>\n\t<td>Stefan Wosnik</td>\n\t<td>Marius Gheorghe</td>\n      </tr><tr>\n\t<td>Naba Kumar</td>\n\t<td>Sean O'Dell</td>\n\t<td>Stefanos Togoulidis</td>\n\t<td>Hans Hagen</td>\n      </tr><tr>\n\t<td>Jim Cape</td>\n\t<td>Roland Walter</td>\n\t<td>Brian Mosher</td>\n\t<td>Nicholas Nemtsev</td>\n      </tr><tr>\n\t<td>Roy Wood</td>\n\t<td>Peter-Henry Mander</td>\n\t<td>Robert Boucher</td>\n\t<td>Christoph Dalitz</td>\n      </tr><tr>\n\t<td>April White</td>\n\t<td>S. Umar</td>\n\t<td>Trent Mick</td>\n\t<td>Filip Yaghob</td>\n      </tr><tr>\n\t<td>Avi Yegudin</td>\n\t<td>Vivi Orunitia</td>\n\t<td>Manfred Becker</td>\n\t<td>Dimitris Keletsekis</td>\n      </tr><tr>\n\t<td>Yuiga</td>\n\t<td>Davide Scola</td>\n\t<td>Jason Boggs</td>\n\t<td>Reinhold Niesner</td>\n      </tr><tr>\n\t<td>Jos van der Zande</td>\n\t<td>Pescuma</td>\n\t<td>Pavol Bosik</td>\n\t<td>Johannes Schmid</td>\n      </tr><tr>\n\t<td>Blair McGlashan</td>\n\t<td>Mikael Hultgren</td>\n\t<td>Florian Balmer</td>\n\t<td>Hadar Raz</td>\n      </tr><tr>\n\t<td>Herr Pfarrer</td>\n\t<td>Ben Key</td>\n\t<td>Gene Barry</td>\n\t<td>Niki Spahiev</td>\n      </tr><tr>\n\t<td>Carsten Sperber</td>\n\t<td>Phil Reid</td>\n\t<td>Iago Rubio</td>\n\t<td>Régis Vaquette</td>\n      </tr><tr>\n\t<td>Massimo Corà</td>\n\t<td>Elias Pschernig</td>\n\t<td>Chris Jones</td>\n\t<td>Josiah Reynolds</td>\n      </tr><tr>\n\t<td>Robert Roessler <a href=\"http://www.rftp.com\">rftp.com</a></td>\n\t<td>Steve Donovan</td>\n\t<td>Jan Martin Pettersen</td>\n\t<td>Sergey Philippov</td>\n      </tr><tr>\n\t<td>Borujoa</td>\n\t<td>Michael Owens</td>\n\t<td>Franck Marcia</td>\n\t<td>Massimo Maria Ghisalberti</td>\n      </tr><tr>\n\t<td>Frank Wunderlich</td>\n\t<td>Josepmaria Roca</td>\n\t<td>Tobias Engvall</td>\n\t<td>Suzumizaki Kimitaka</td>\n      </tr><tr>\n\t<td>Michael Cartmell</td>\n\t<td>Pascal Hurni</td>\n\t<td>Andre</td>\n\t<td>Randy Butler</td>\n      </tr><tr>\n\t<td>Georg Ritter</td>\n\t<td>Michael Goffioul</td>\n\t<td>Ben Harper</td>\n\t<td>Adam Strzelecki</td>\n      </tr><tr>\n\t<td>Kamen Stanev</td>\n\t<td>Steve Menard</td>\n\t<td>Oliver Yeoh</td>\n\t<td>Eric Promislow</td>\n      </tr><tr>\n\t<td>Joseph Galbraith</td>\n\t<td>Jeffrey Ren</td>\n\t<td>Armel Asselin</td>\n\t<td>Jim Pattee</td>\n      </tr><tr>\n\t<td>Friedrich Vedder</td>\n\t<td>Sebastian Pipping</td>\n\t<td>Andre Arpin</td>\n\t<td>Stanislav Maslovski</td>\n      </tr><tr>\n\t<td>Martin Stone</td>\n\t<td>Fabien Proriol</td>\n\t<td>mimir</td>\n\t<td>Nicola Civran</td>\n      </tr><tr>\n\t<td>Snow</td>\n\t<td>Mitchell Foral</td>\n\t<td>Pieter Holtzhausen</td>\n\t<td>Waldemar Augustyn</td>\n      </tr><tr>\n\t<td>Jason Haslam</td>\n\t<td>Sebastian Steinlechner</td>\n\t<td>Chris Rickard</td>\n\t<td>Rob McMullen</td>\n      </tr><tr>\n\t<td>Stefan Schwendeler</td>\n\t<td>Cristian Adam</td>\n\t<td>Nicolas Chachereau</td>\n\t<td>Istvan Szollosi</td>\n      </tr><tr>\n\t<td>Xie Renhui</td>\n\t<td>Enrico Tröger</td>\n\t<td>Todd Whiteman</td>\n\t<td>Yuval Papish</td>\n      </tr><tr>\n\t<td>instanton</td>\n\t<td>Sergio Lucato</td>\n\t<td>VladVRO</td>\n\t<td>Dmitry Maslov</td>\n      </tr><tr>\n\t<td>chupakabra</td>\n\t<td>Juan Carlos Arevalo Baeza</td>\n\t<td>Nick Treleaven</td>\n\t<td>Stephen Stagg</td>\n      </tr><tr>\n\t<td>Jean-Paul Iribarren</td>\n\t<td>Tim Gerundt</td>\n\t<td>Sam Harwell</td>\n\t<td>Boris</td>\n      </tr><tr>\n\t<td>Jason Oster</td>\n\t<td>Gertjan Kloosterman</td>\n\t<td>alexbodn</td>\n\t<td>Sergiu Dotenco</td>\n      </tr><tr>\n\t<td>Anders Karlsson</td>\n\t<td>ozlooper</td>\n\t<td>Marko Njezic</td>\n\t<td>Eugen Bitter</td>\n      </tr><tr>\n\t<td>Christoph Baumann</td>\n\t<td>Christopher Bean</td>\n\t<td>Sergey Kishchenko</td>\n\t<td>Kai Liu</td>\n      </tr><tr>\n\t<td>Andreas Rumpf</td>\n\t<td>James Moffatt</td>\n\t<td>Yuzhou Xin</td>\n\t<td>Nic Jansma</td>\n      </tr><tr>\n\t<td>Evan Jones</td>\n\t<td>Mike Lischke</td>\n\t<td>Eric Kidd</td>\n\t<td>maXmo</td>\n      </tr><tr>\n\t<td>David Severwright</td>\n\t<td>Jon Strait</td>\n\t<td>Oliver Kiddle</td>\n\t<td>Etienne Girondel</td>\n      </tr><tr>\n\t<td>Haimag Ren</td>\n\t<td>Andrey Moskalyov</td>\n\t<td>Xavi</td>\n\t<td>Toby Inkster</td>\n      </tr><tr>\n\t<td>Eric Forgeot</td>\n\t<td>Colomban Wendling</td>\n\t<td>Neo</td>\n\t<td>Jordan Russell</td>\n      </tr><tr>\n\t<td>Farshid Lashkari</td>\n\t<td>Sam Rawlins</td>\n\t<td>Michael Mullin</td>\n\t<td>Carlos SS</td>\n      </tr><tr>\n\t<td>vim</td>\n\t<td>Martial Demolins</td>\n\t<td>Tino Weinkauf</td>\n\t<td>Jérôme Laforge</td>\n      </tr><tr>\n\t<td>Udo Lechner</td>\n\t<td>Marco Falda</td>\n\t<td>Dariusz Knociński</td>\n\t<td>Ben Fisher</td>\n      </tr><tr>\n\t<td>Don Gobin</td>\n\t<td>John Yeung</td>\n\t<td>Adobe</td>\n\t<td>Elizabeth A. Irizarry</td>\n      </tr><tr>\n\t<td>Mike Schroeder</td>\n\t<td>Morten MacFly</td>\n\t<td>Jaime Gimeno</td>\n\t<td>Thomas Linder Puls</td>\n      </tr><tr>\n\t<td>Artyom Zuikov</td>\n\t<td>Gerrit</td>\n\t<td>Occam's Razor</td>\n\t<td>Ben Bluemel</td>\n      </tr><tr>\n\t<td>David Wolfendale</td>\n\t<td>Chris Angelico</td>\n\t<td>Marat Dukhan</td>\n\t<td>Stefan Weil</td>\n      </tr><tr>\n\t<td>Rex Conn</td>\n\t<td>Ross McKay</td>\n\t<td>Bruno Barbieri</td>\n\t<td>Gordon Smith</td>\n      </tr><tr>\n\t<td>dimitar</td>\n\t<td>Sébastien Granjoux</td>\n\t<td>zeniko</td>\n\t<td>James Ribe</td>\n      </tr><tr>\n\t<td>Markus Nißl</td>\n\t<td>Martin Panter</td>\n\t<td>Mark Yen</td>\n\t<td>Philippe Elsass</td>\n      </tr><tr>\n\t<td>Dimitar Zhekov</td>\n\t<td>Fan Yang</td>\n\t<td>Denis Shelomovskij</td>\n\t<td>darmar</td>\n      </tr><tr>\n\t<td>John Vella</td>\n\t<td>Chinh Nguyen</td>\n\t<td>Sakshi Verma</td>\n\t<td>Joel B. Mohler</td>\n      </tr><tr>\n\t<td>Isiledhel</td>\n\t<td>Vidya Wasi</td>\n\t<td>G. Hu</td>\n\t<td>Byron Hawkins</td>\n      </tr><tr>\n\t<td>Alpha</td>\n\t<td>John Donoghue</td>\n\t<td>kudah</td>\n\t<td>Igor Shaula</td>\n      </tr><tr>\n\t<td>Pavel Bulochkin</td>\n\t<td>Yosef Or Boczko</td>\n\t<td>Brian Griffin</td>\n\t<td>Özgür Emir</td>\n      </tr><tr>\n\t<td>Neomi</td>\n\t<td>OmegaPhil</td>\n\t<td>SiegeLord</td>\n\t<td>Erik</td>\n      </tr><tr>\n\t<td>TJF</td>\n\t<td>Mark Robinson</td>\n\t<td>Thomas Martitz</td>\n\t<td>felix</td>\n      </tr><tr>\n\t<td>Christian Walther</td>\n\t<td>Ebben</td>\n\t<td>Robert Gieseke</td>\n\t<td>Mike M</td>\n      </tr><tr>\n\t<td>nkmathew</td>\n\t<td>Andreas Tscharner</td>\n\t<td>Lee Wilmott</td>\n\t<td>johnsonj</td>\n      </tr><tr>\n\t<td>Vicente</td>\n\t<td>Nick Gravgaard</td>\n\t<td>Ian Goldby</td>\n\t<td>Holger Stenger</td>\n      </tr><tr>\n\t<td>danselmi</td>\n\t<td>Mat Berchtold</td>\n\t<td>Michael Staszewski</td>\n\t<td>Baurzhan Muftakhidinov</td>\n      </tr><tr>\n\t<td>Erik Angelin</td>\n\t<td>Yusuf Ramazan Karagöz</td>\n\t<td>Markus Heidelberg</td>\n\t<td>Joe Mueller</td>\n      </tr><tr>\n\t<td>Mika Attila</td>\n\t<td>JoMazM</td>\n\t<td>Markus Moser</td>\n\t<td>Stefan Küng</td>\n      </tr><tr>\n\t<td>Jiří Techet</td>\n\t<td>Jonathan Hunt</td>\n\t<td>Serg Stetsuk</td>\n\t<td>Jordan Jueckstock</td>\n      </tr><tr>\n\t<td>Yury Dubinsky</td>\n\t<td>Sam Hocevar</td>\n\t<td>Luyomi</td>\n\t<td>Matt Gilarde</td>\n      </tr><tr>\n\t<td>Mark C</td>\n\t<td>Johannes Sasongko</td>\n\t<td>fstirlitz</td>\n\t<td>Robin Haberkorn</td>\n      </tr><tr>\n\t<td>Pavel Sountsov</td>\n\t<td>Dirk Lorenzen</td>\n\t<td>Kasper B. Graversen</td>\n\t<td>Chris Mayo</td>\n      </tr><tr>\n\t<td>Van de Bugger</td>\n\t<td>Tse Kit Yam</td>\n\t<td><a href=\"https://www.smartsharesystems.com/\">SmartShare Systems</a></td>\n\t<td>Morten Brørup</td>\n      </tr><tr>\n\t<td>Alexey Denisov</td>\n\t<td>Justin Dailey</td>\n\t<td>oirfeodent</td>\n\t<td>A-R-C-A</td>\n      </tr><tr>\n\t<td>Roberto Rossi</td>\n\t<td>Kenny Liu</td>\n\t<td>Iain Clarke</td>\n\t<td>desto</td>\n      </tr><tr>\n\t<td>John Flatness</td>\n\t<td>Thorsten Kani</td>\n\t<td>Bernhard M. Wiedemann</td>\n\t<td>Baldur Karlsson</td>\n      </tr><tr>\n\t<td>Martin Kleusberg</td>\n\t<td>Jannick</td>\n\t<td>Zufu Liu</td>\n\t<td>Simon Sobisch</td>\n      </tr><tr>\n\t<td>Georger Araújo</td>\n\t<td>Tobias Kühne</td>\n\t<td>Dimitar Radev</td>\n\t<td>Liang Bai</td>\n      </tr><tr>\n\t<td>Gunter Königsmann</td>\n\t<td>Nicholai Benalal</td>\n\t<td>Uniface</td>\n\t<td>Raghda Morsy</td>\n      </tr><tr>\n\t<td>Giuseppe Corbelli</td>\n\t<td>Andreas Rönnquist</td>\n\t<td>Henrik Hank</td>\n\t<td>Luke Rasmussen</td>\n      </tr><tr>\n\t<td>Philipp</td>\n\t<td>maboroshin</td>\n\t<td>Gokul Krishnan</td>\n\t<td>John Horigan</td>\n      </tr><tr>\n\t<td>jj5</td>\n\t<td>Jad Altahan</td>\n\t<td>Andrea Ricchi</td>\n\t<td>Juarez Rudsatz</td>\n      </tr><tr>\n\t<td>Wil van Antwerpen</td>\n\t<td>Hodong Kim</td>\n\t<td>Michael Conrad</td>\n\t<td>Dejan Budimir</td>\n      </tr><tr>\n\t<td>Andreas Falkenhahn</td>\n\t<td>Mark Reay</td>\n\t<td>David Shuman</td>\n\t<td>McLoo</td>\n      </tr><tr>\n\t<td>Shmuel Zeigerman</td>\n\t<td>Chris Graham</td>\n\t<td>Hugues Larrive</td>\n\t<td>Prakash Sahni</td>\n      </tr><tr>\n\t<td>Michel Sauvard</td>\n\t<td>uhf7</td>\n\t<td>gnombat</td>\n\t<td>Derek Brown</td>\n      </tr><tr>\n\t<td>Robert Di Pardo</td>\n\t<td>riQQ</td>\n\t<td>YX Hao</td>\n\t<td>Bertrand Lacoste</td>\n      </tr><tr>\n\t<td>Ivan Ustûžanin</td>\n\t<td>Rainer Kottenhoff</td>\n\t<td>feitoi</td>\n\t<td>vsl7</td>\n      </tr><tr>\n\t<td>Michael Heath</td>\n\t<td>Antonio Cebrián</td>\n\t<td>David Yu Yang</td>\n\t<td>Arkadiusz Michalski</td>\n      </tr><tr>\n\t<td>Red_M</td>\n\t<td>cdbdev</td>\n\t<td>Andrey Smolyakov</td>\n\t<td>Knut Leimbert</td>\n      </tr><tr>\n\t<td>German Aizek</td>\n\t<td>Tsuyoshi Miyake</td>\n\t<td>Martin Schäfer</td>\n\t<td>RainRat</td>\n    </tr>\n    </table>\n    <h2>Releases</h2>\n    <h3>\n       <a href=\"https://www.scintilla.org/lexilla532.zip\">Release 5.3.2</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 23 April 2024.\n\t</li>\n\t<li>\n\tCOBOL: Stop string literal continuing over line end.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/229\">Issue #229</a>.\n\t</li>\n\t<li>\n\tCOBOL: Stop doc comment assigning different styles to \\r and \\n at line end.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/229\">Issue #229</a>.\n\t</li>\n\t<li>\n\tCOBOL: Recognize keywords that start with 'V'.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/230\">Issue #230</a>.\n\t</li>\n\t<li>\n\tCOBOL: Recognize comments after tag or that start with '/'.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/231\">Issue #231</a>.\n\t</li>\n\t<li>\n\tHTML: Implement substyles for tags, attributes, and identifiers\n\tSCE_H_TAG, SCE_H_ATTRIBUTE, SCE_HJ_WORD, SCE_HJA_WORD, SCE_HB_WORD, SCE_HP_WORD, SCE_HPHP_WORD.\n\t</li>\n\t<li>\n\tHTML: Implement context-sensitive attributes. \"tag.attribute\" matches \"attribute\" only inside \"tag\".\n\t</li>\n\t<li>\n\tHTML: Match standard handling of comments.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/232\">Issue #232</a>.\n\t</li>\n\t<li>\n\tLua: Implement substyles for identifiers SCE_LUA_IDENTIFIER.\n\t</li>\n\t<li>\n\tRuby: Allow non-ASCII here-doc delimiters.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/234\">Issue #234</a>.\n\t</li>\n\t<li>\n\tRuby: Allow modifier if, unless, while and until after heredoc delimiter.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/236\">Issue #236</a>.\n\t</li>\n\t<li>\n\tRust: Recognize raw identifiers.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/239\">Issue #239</a>,\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/pull/240\">Pull request #240</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/lexilla531.zip\">Release 5.3.1</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 5 March 2024.\n\t</li>\n\t<li>\n\tAssembler: After comments, treat \\r\\n line ends the same as \\n. This makes testing easier.\n\t</li>\n\t<li>\n\tBash: Fix folding when line changed to/from comment and previous line is comment.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/224\">Issue #224</a>.\n\t</li>\n\t<li>\n\tBatch: Fix handling ':' next to keywords.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/222\">Issue #222</a>.\n\t</li>\n\t<li>\n\tJavaScript: in cpp lexer, add lexer.cpp.backquoted.strings=2 mode to treat ` back-quoted\n\tstrings as template literals which allow embedded ${expressions}.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/94\">Issue #94</a>.\n\t</li>\n\t<li>\n\tPython: fix lexing of rb'' and rf'' strings.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/223\">Issue #223</a>,\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/pull/227\">Pull request #227</a>.\n\t</li>\n\t<li>\n\tRuby: fix lexing of methods on numeric literals like '3.times' so the '.' and method name do not appear in numeric style.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/225\">Issue #225</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/lexilla530.zip\">Release 5.3.0</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 27 December 2023.\n\t</li>\n\t<li>\n\tFix calling AddStaticLexerModule by defining as C++ instead of C which matches header.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2421/\">Bug #2421</a>.\n\t</li>\n\t<li>\n\tBash: Fix shift operator &lt;&lt; incorrectly recognized as here-doc.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/215\">Issue #215</a>.\n\t</li>\n\t<li>\n\tBash: Fix termination of '${' with first unquoted '}' instead of nesting.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/216\">Issue #216</a>.\n\t</li>\n\t<li>\n\tHTML: JavaScript double-quoted strings may escape line end with '\\'.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/214\">Issue #214</a>.\n\t</li>\n\t<li>\n\tLua: recognize --- doc comments.\n\tDefined by <a href=\"https://github.com/lunarmodules/ldoc\">LDoc</a>.\n\tDoes not recognize --[[-- doc comments which seem less common.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/lexilla529.zip\">Release 5.2.9</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 18 November 2023.\n\t</li>\n\t<li>\n\tXcode build settings changed to avoid problems with Xcode 15.0.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/lexilla528.zip\">Release 5.2.8</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 5 November 2023.\n\t</li>\n\t<li>\n\tPython: Update f-string handling to match PEP 701 and Python 3.12.\n\tControlled with property lexer.python.strings.f.pep.701.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/150\">Issue #150</a>,\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/pull/209\">Pull request #209</a>.\n\t</li>\n\t<li>\n\tR: Fix escape sequence highlighting with change of for loop to while loop.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/206\">Issue #206</a>,\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/pull/207\">Pull request #207</a>.\n\t</li>\n\t<li>\n\tMinimum supported macOS release increased to 10.13.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/lexilla527.zip\">Release 5.2.7</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 22 September 2023.\n\t</li>\n\t<li>\n\tFix building on Windows with non-English environment.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/pull/200\">Pull request #200</a>.\n\t</li>\n\t<li>\n\tBash: fix line continuation for comments and when multiple backslashes at line end.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/195\">Issue #195</a>.\n\t</li>\n\t<li>\n\tBash: treat  += as operator and, inside arithmetic expressions, treat ++ and -- as operators.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/197\">Issue #197</a>.\n\t</li>\n\t<li>\n\tBash: improve backslash handling inside backquoted command substitution and fix $ at end of backtick expression.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/194\">Issue #194</a>.\n\t</li>\n\t<li>\n\tBash: treat words that are similar to numbers but invalid wholly as identifiers.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/199\">Issue #199</a>.\n\t</li>\n\t<li>\n\tBash: consistently handle '-' options at line start and after '|' as identifiers.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/202\">Issue #202</a>.\n\t</li>\n\t<li>\n\tBash: handle '-' options differently in [ single ] and [[ double ]] bracket constructs.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/203\">Issue #203</a>.\n\t</li>\n\t<li>\n\tF#: improve speed of folding long lines.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/198\">Issue #198</a>.\n\t</li>\n\t<li>\n\tHTML: fix invalid entity at line end and terminate invalid entity before invalid character.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/192\">Issue #192</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/lexilla526.zip\">Release 5.2.6</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 26 July 2023.\n\t</li>\n\t<li>\n\tInclude empty word list names in value returned by DescribeWordListSets and SCI_DESCRIBEKEYWORDSETS.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/175\">Issue #175</a>,\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/pull/176\">Pull request #176</a>.\n\t</li>\n\t<li>\n\tBash: style here-doc end delimiters as SCE_SH_HERE_DELIM instead of SCE_SH_HERE_Q.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/177\">Issue #177</a>.\n\t</li>\n\t<li>\n\tBash: allow '$' as last character in string.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/180\">Issue #180</a>,\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/pull/181\">Pull request #181</a>.\n\t</li>\n\t<li>\n\tBash: fix state after expansion. Highlight all numeric and file test operators.\n\tDon't highlight dash in long option as operator.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/182\">Issue #182</a>,\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/pull/183\">Pull request #183</a>.\n\t</li>\n\t<li>\n\tBash: strict checking of special parameters ($*, $@, $$, ...) with property lexer.bash.special.parameter to specify\n\tvalid parameters.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/184\">Issue #184</a>,\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/pull/186\">Pull request #186</a>.\n\t</li>\n\t<li>\n\tBash: recognize keyword before redirection operators (&lt; and &gt;).\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/188\">Issue #188</a>,\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/pull/189\">Pull request #189</a>.\n\t</li>\n\t<li>\n\tErrorlist: recognize Bash diagnostic messages.\n\t</li>\n\t<li>\n\tHTML: allow ASP block to terminate inside line comment.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/185\">Issue #185</a>.\n\t</li>\n\t<li>\n\tHTML: fix folding with JSP/ASP.NET &lt;%-- comment.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/191\">Issue #191</a>.\n\t</li>\n\t<li>\n\tHTML: fix incremental styling of multi-line ASP.NET directive.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/191\">Issue #191</a>.\n\t</li>\n\t<li>\n\tMatlab: improve arguments blocks.\n\tAdd support for multiple arguments blocks.\n\tPrevent \"arguments\" from being keyword in function declaration line.\n\tFix semicolon handling.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/pull/179\">Pull request #179</a>.\n\t</li>\n\t<li>\n\tVisual Prolog: add support for embedded syntax with SCE_VISUALPROLOG_EMBEDDED\n\tand SCE_VISUALPROLOG_PLACEHOLDER.<br />\n\tStyling of string literals changed with no differentiation between literals with quotes and those\n\tthat are prefixed with \"@\".\n\tQuote characters are in a separate style (SCE_VISUALPROLOG_STRING_QUOTE)\n\tto contents (SCE_VISUALPROLOG_STRING).<br />\n\tSCE_VISUALPROLOG_CHARACTER, SCE_VISUALPROLOG_CHARACTER_TOO_MANY,\n\tSCE_VISUALPROLOG_CHARACTER_ESCAPE_ERROR, SCE_VISUALPROLOG_STRING_EOL_OPEN,\n\tand SCE_VISUALPROLOG_STRING_VERBATIM_SPECIAL were removed (replaced with\n\tSCE_VISUALPROLOG_UNUSED[1-5]).\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/pull/178\">Pull request #178</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/lexilla525.zip\">Release 5.2.5</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 31 May 2023.\n\t</li>\n\t<li>\n\tAdd CharacterSetArray constructor without setBase initial argument for common case\n\twhere this is setNone and the initialSet argument completely defines the characters.\n\tThis shortens and clarifies use of CharacterSetArray.\n\t</li>\n\t<li>\n\tBash: implement highlighting inside quoted elements and here-docs.\n\tControlled with properties lexer.bash.styling.inside.string, lexer.bash.styling.inside.backticks,\n\tlexer.bash.styling.inside.parameter, and lexer.bash.styling.inside.heredoc.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/154\">Issue #154</a>,\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/153\">Issue #153</a>,\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1033/\">Feature #1033</a>.\n\t</li>\n\t<li>\n\tBash: add property lexer.bash.command.substitution to choose how to style command substitutions.\n\t0 &rarr; SCE_SH_BACKTICKS;\n\t1 &rarr; surrounding \"$(\" and \")\" as operators and contents styled as bash code;\n\t2 &rarr; use distinct styles (base style + 64) for contents.\n\tChoice (2) is a provisional feature and details may change before it is finalized.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/153\">Issue #153</a>.\n\t</li>\n\t<li>\n\tBash: fix nesting of parameters (SCE_SH_PARAM) like ${var/$sub/\"${rep}}\"}.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/154\">Issue #154</a>.\n\t</li>\n\t<li>\n\tBash: fix single character special parameters like $? by limiting style.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/154\">Issue #154</a>.\n\t</li>\n\t<li>\n\tBash: treat \"$$\" as special parameter and end scalars before \"$\".\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/154\">Issue #154</a>.\n\t</li>\n\t<li>\n\tBash: treat \"&lt;&lt;\" in arithmetic contexts as left bitwise shift operator instead of here-doc.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/137\">Issue #137</a>.\n\t</li>\n\t<li>\n\tBatch: style SCE_BAT_AFTER_LABEL used for rest of line after label which is not executed.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/148\">Issue #148</a>.\n\t</li>\n\t<li>\n\tF#: Lex interpolated verbatim strings as verbatim.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/156\">Issue #156</a>.\n\t</li>\n\t<li>\n\tVB: allow multiline strings when lexer.vb.strings.multiline set.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/151\">Issue #151</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/lexilla524.zip\">Release 5.2.4</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 13 March 2023.\n\t</li>\n\t<li>\n\tC++: Fix failure to recognize keywords containing upper case.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/149\">Issue #149</a>.\n\t</li>\n\t<li>\n\tGDScript: Support % and $ node paths.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/145\">Issue #145</a>,\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/pull/146\">Pull request #146</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/lexilla523.zip\">Release 5.2.3</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 8 March 2023.\n\t</li>\n\t<li>\n\tAdd scripts/PromoteNew.bat script to promote .new files after checking.\n\t</li>\n\t<li>\n\tMakefile: Remove 1024-byte line length limit..\n\t</li>\n\t<li>\n\tRuby: Add new lexical classes for % literals SCE_RB_STRING_W (%w non-interpolable string array),\n\tSCE_RB_STRING_I (%i non-interpolable symbol array),\n\tSCE_RB_STRING_QI (%I interpolable symbol array),\n\tand SCE_RB_STRING_QS (%s symbol).\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/124\">Issue #124</a>.\n\t</li>\n\t<li>\n\tRuby: Disambiguate %= which may be a quote or modulo assignment.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/124\">Issue #124</a>,\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1255/\">Bug #1255</a>,\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2182/\">Bug #2182</a>.\n\t</li>\n\t<li>\n\tRuby: Fix additional fold level for single character in SCE_RB_STRING_QW.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/132\">Issue #132</a>.\n\t</li>\n\t<li>\n\tRuby: Set SCE_RB_HERE_QQ for unquoted and double-quoted heredocs and\n\tSCE_RB_HERE_QX for backticks-quoted heredocs.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/134\">Issue #134</a>.\n\t</li>\n\t<li>\n\tRuby: Recognise #{} inside SCE_RB_HERE_QQ and SCE_RB_HERE_QX.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/134\">Issue #134</a>.\n\t</li>\n\t<li>\n\tRuby: Improve regex and heredoc recognition.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/136\">Issue #136</a>.\n\t</li>\n\t<li>\n\tRuby: Highlight #@, #@@ and #$ style interpolation.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/140\">Issue #140</a>.\n\t</li>\n\t<li>\n\tRuby: Fix folding for multiple heredocs started on one line.\n\tFix folding when there is a space after heredoc opening delimiter.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/135\">Issue #135</a>.\n\t</li>\n\t<li>\n\tYAML: Remove 1024-byte line length limit.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/lexilla522.zip\">Release 5.2.2</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 8 February 2023.\n\t</li>\n\t<li>\n\tC++: Fix keywords that start with non-ASCII. Also affects other lexers.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/130\">Issue #130</a>.\n\t</li>\n\t<li>\n\tMatlab: Include more prefix and suffix characters in numeric literals.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/120\">Issue #120</a>.\n\t</li>\n\t<li>\n\tMatlab: More accurate treatment of line ends inside strings. Matlab and Octave are different here.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/18\">Issue #18</a>.\n\t</li>\n\t<li>\n\tModula-3: Don't treat identifier suffix that matches keyword as keyword.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/129\">Issue #129</a>.\n\t</li>\n\t<li>\n\tModula-3: Fix endless loop in folder.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/128\">Issue #128</a>.\n\t</li>\n\t<li>\n\tModula-3: Fix access to lines beyond document end in folder.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/131\">Issue #131</a>.\n\t</li>\n\t<li>\n\tPython: Don't highlight match and case as keywords in contexts where they probably aren't used as keywords.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/pull/122\">Pull request #122</a>.\n\t</li>\n\t<li>\n\tX12: Support empty envelopes.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2369/\">Bug #2369</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/lexilla521.zip\">Release 5.2.1</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 6 December 2022.\n\t</li>\n\t<li>\n\tUpdate to Unicode 14.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1461/\">Feature #1461</a>.\n\t</li>\n\t<li>\n\tChange default compilation optimization option to favour speed over space.\n\t-O2 for MSVC and -O3 for gcc and clang.\n\t</li>\n\t<li>\n\tBatch: Fix comments starting inside strings.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/115\">Issue #115</a>.\n\t</li>\n\t<li>\n\tF#: Lex signed numeric literals more accurately.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/110\">Issue #110</a>,\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/111\">Issue #111</a>.\n\t</li>\n\t<li>\n\tF#: Add specifiers for 64-bit integer and floating point literals.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/112\">Issue #112</a>.\n\t</li>\n\t<li>\n\tMarkdown: Stop styling numbers at line start in PRECHAR style.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/117\">Issue #117</a>.\n\t</li>\n\t<li>\n\tPowerShell: Recognise numeric literals more accurately.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/118\">Issue #118</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/lexilla520.zip\">Release 5.2.0</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 12 October 2022.\n\t</li>\n\t<li>\n\tPowerShell: End comment before \\r carriage return so \\r and \\n in same\n\tSCE_POWERSHELL_DEFAULT style.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/pull/99\">Pull request #99</a>.\n\t</li>\n\t<li>\n\tPowerShell: Fix character truncation bug that lead to 'ġ' styled as an operator since its low 8 bits\n\tare equal to '!'.\n\t</li>\n\t<li>\n\tR: Support hexadecimal, float exponent and number suffix.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/101\">Issue #101</a>.\n\t</li>\n\t<li>\n\tR: Highlight backticks.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/pull/102\">Pull request #102</a>.\n\t</li>\n\t<li>\n\tR: Highlight raw strings.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/100\">Issue #100</a>.\n\t</li>\n\t<li>\n\tR: Optionally highlight escape sequences in strings.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/100\">Issue #100</a>.\n\t</li>\n\t<li>\n\tFix early truncation from LexAccessor::GetRange and LexAccessor::GetRangeLowered.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/17\">Issue #17</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/lexilla519.zip\">Release 5.1.9</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 27 August 2022.\n\t</li>\n\t<li>\n\tJulia: Parse unicode forall and exists as identifiers #42314.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/pull/98\">Pull request #98</a>.\n\t</li>\n\t<li>\n\tJulia: Parse apostrophe as char and not adjoint after exclamation.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/97\">Issue #97</a>,\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/pull/98\">Pull request #98</a>.\n\t</li>\n\t<li>\n\tProperties: Don't set header flag for empty section.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/96\">Issue #96</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/lexilla518.zip\">Release 5.1.8</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 10 July 2022.\n\t</li>\n\t<li>\n\tF#: Recognize nested comments in F#.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/93\">Issue #93</a>.\n\t</li>\n\t<li>\n\tMS SQL: Recognize nested comments in Transact-SQL.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/87\">Issue #87</a>.\n\t</li>\n\t<li>\n\tMS SQL: Preference data types more consistently to not depend on how lexing is broken\n\tup into segments. This is needed because there are keywords that are both data type\n\tnames and function names such as 'CHAR'.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/90\">Issue #90</a>.\n\t</li>\n\t<li>\n\tPowerShell: Fix single quoted strings to not treat backtick as escape.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/pull/92\">Pull request #92</a>.\n\t</li>\n\t<li>\n\tVisual Prolog: Treat \\r\\n line ends the same as \\n. This makes testing easier.\n\tAdd test case.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/83\">Issue #83</a>.\n\t</li>\n\t<li>\n\tVisual Prolog: Allow disabling verbatim strings.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/pull/89\">Pull request #89</a>.\n\t</li>\n\t<li>\n\tVisual Prolog: Support backquoted strings.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/pull/89\">Pull request #89</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/lexilla517.zip\">Release 5.1.7</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 22 May 2022.\n\t</li>\n\t<li>\n\tAdd LexAccessor::StyleIndexAt to retrieve style values as unsigned to handle styles > 127 better.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/61\">Issue #61</a>.\n\t</li>\n\t<li>\n\tAssociate more than one file extension with a setting for testing.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/81\">Issue #81</a>.\n\t</li>\n\t<li>\n\tCMake: Fix folding of \"ElseIf\".\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/77\">Issue #77</a>,\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/pull/78\">Pull request #78</a>,\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2213/\">Bug #2213</a>.\n\t</li>\n\t<li>\n\tHTML: Fix folding of JavaScript doc comments.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2219/\">Bug #2219</a>.\n\t</li>\n\t<li>\n\tMatlab: add \"classdef\" and \"spmd\" to folding keywords.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/pull/70\">Pull request #70</a>.\n\t</li>\n\t<li>\n\tMatlab: handle \"arguments\" contextual keyword.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/pull/70\">Pull request #70</a>.\n\t</li>\n\t<li>\n\tMatlab: improve support of class definition syntax.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/pull/75\">Pull request #75</a>.\n\t</li>\n\t<li>\n\tRaku: fix escape detection.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/pull/76\">Pull request #76</a>.\n\t</li>\n\t<li>\n\tRuby: fix character sequence \"?\\\\#\" to not include '#' in SCE_RB_NUMBER as only second '\\' is quoted.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/69\">Issue #69</a>.\n\t</li>\n\t<li>\n\tRuby: improve styling of ternary expressions as commonly used.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/69\">Issue #69</a>.\n\t</li>\n\t<li>\n\tVHDL: support folding for VHDL 08 else-generate and case-generate.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/pull/80\">Pull request #80</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/lexilla516.zip\">Release 5.1.6</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 31 March 2022.\n\t</li>\n\t<li>\n\tImplement conditional statements \"if\" and \"match\", comparison function \"$(=\", and \"FileNameExt\"\n\tproperty in TestLexers to allow varying lexer properties over different files.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/62\">Issue #62</a>.\n\t</li>\n\t<li>\n\tAdd LexAccessor::BufferStyleAt to retrieve style values to simplify logic and\n\timprove performance.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/54\">Issue #54</a>.\n\t</li>\n\t<li>\n\tMarkdown: Optionally style all of Markdown header lines.\n\tEnabled with lexer.markdown.header.eolfill=1.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/60\">Issue #60</a>.\n\t</li>\n\t<li>\n\tRuby: Fix operator method styling so next word not treated as method name.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/65\">Issue #65</a>.\n\t</li>\n\t<li>\n\tRuby: Fix folding for Ruby 3 endless method definition.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/65\">Issue #65</a>.\n\t</li>\n\t<li>\n\tRuby: Fold string array SCE_RB_STRING_QW.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/65\">Issue #65</a>.\n\t</li>\n\t<li>\n\tRuby: Fix final \\n in indented heredoc to be SCE_RB_HERE_Q.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/66\">Issue #66</a>.\n\t</li>\n\t<li>\n\tRuby: Fix heredoc recognition when '.' and ',' used in method calls and after SCE_RB_GLOBAL.\n\tClassify word after heredoc delimiter instead of styling as keyword.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/67\">Issue #67</a>.\n\t</li>\n\t<li>\n\tRuby: Improve method highlighting so method name is styled as SCE_RB_DEFNAME and class/object\n\tis styled appropriately.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/68\">Issue #68</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/lexilla515.zip\">Release 5.1.5</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 9 February 2022.\n\t</li>\n\t<li>\n\tBash: Treat \\r\\n line ends the same as \\n. This makes testing easier.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/57\">Issue #57</a>.\n\t</li>\n\t<li>\n\tBatch: Recognise \"::\" comments when second command on line.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2304/\">Bug #2304</a>.\n\t</li>\n\t<li>\n\tF#: Recognise format specifiers in interpolated strings and %B for binary.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/46\">Issue #46</a>.\n\t</li>\n\t<li>\n\tF#: More accurate line-based folding.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/56\">Issue #56</a>.\n\t</li>\n\t<li>\n\tHTML: Fix folding inside script blocks.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/47\">Issue #47</a>,\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/53\">Issue #53</a>.\n\t</li>\n\t<li>\n\tInno Setup: Fix multiline comments in code.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/44\">Issue #44</a>.\n\t</li>\n\t<li>\n\tPython: Add attribute style with properties lexer.python.identifier.attributes and\n\tlexer.python.decorator.attributes.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/pull/49\">Pull request #49</a>.\n\t</li>\n\t<li>\n\tAllow choice of object file directory with makefile by setting DIR_O.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/50\">Issue #50</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/lexilla514.zip\">Release 5.1.4</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 7 December 2021.\n\t</li>\n\t<li>\n\tAdd AsciiDoc lexer.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/pull/39\">Pull request #39</a>.\n\t</li>\n\t<li>\n\tAdd GDScript lexer.\n\tSome behaviour and lexical states may change before this lexer is stable.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/pull/41\">Pull request #41</a>.\n\t</li>\n\t<li>\n\tFix strings ending in escaped '\\' in F#.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/38\">Issue #38</a>.\n\t</li>\n\t<li>\n\tBetter handling of bad terminators and folding for X12.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1420/\">Feature #1420</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/lexilla513.zip\">Release 5.1.3</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 8 November 2021.\n\t</li>\n\t<li>\n\tFix parsing of 128-bit integer literals in Rust.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/33\">Issue #33</a>.\n\t</li>\n\t<li>\n\tFix different styles between \\r and \\n at end of line comments for Rust.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/34\">Issue #34</a>.\n\t</li>\n\t<li>\n\tFor Rust, don't go past end when file ends with unterminated block comment.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/35\">Issue #35</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/lexilla512.zip\">Release 5.1.2</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 23 September 2021.\n\t</li>\n\t<li>\n\tImplement conditional group rules in CSS.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/25\">Issue #25</a>,\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/pull/28\">Pull request #28</a>.\n\t</li>\n\t<li>\n\tAllow F# triple-quoted strings to interpolate string literals.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/21\">Issue #21</a>.\n\t</li>\n\t<li>\n\tHighlight F# printf specifiers in type-checked interpolated strings.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/24\">Issue #24</a>.\n\t</li>\n\t<li>\n\tFix styling for Inno Setup scripts handling unterminated strings,\n\tmessage sections, and avoid terminating comments between CR and LF.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/pull/29\">Pull request #29</a>.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1415/\">Feature #1415</a>.\n\t</li>\n\t<li>\n\tFix Markdown hang when document ends with \"`\", \"*\", \"_\",  or similar.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/23\">Issue #23</a>.\n\t</li>\n\t<li>\n\tTreat '.' as an operator instead of part of a word for PHP.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/22\">Issue #22</a>.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2225/\">Bug #2225</a>.\n\t</li>\n\t<li>\n\tCheck PHP numeric literals, showing invalid values with default style instead of numeric.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/20\">Issue #20</a>.\n\t</li>\n\t<li>\n\tFor PHP, recognize start of comment after numeric literal.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/20\">Issue #20</a>.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2143/\">Bug #2143</a>.\n\t</li>\n\t<li>\n\tFor PHP, recognize PHP code within JavaScript strings.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/pull/27\">Pull request #27</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/lexilla511.zip\">Release 5.1.1</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 26 July 2021.\n\t</li>\n\t<li>\n\tOn 32-bit Win32 using Visual C++ projects, stop exported functions ending with @n causing failures with GetProcAddress.\n\t</li>\n\t<li>\n\tFixed crash when calling TagsOfStyle on C++ lexer after allocating substyles.\n\t</li>\n\t<li>\n\tFixed folding for Julia which could be inconsistent depending on range folded.\n\tAdded SCE_JULIA_KEYWORD4 and SCE_JULIA_TYPEOPERATOR lexical styles and\n\tchanged keyword set 4 from \"Raw string literals\" to \"Built in functions\".\n\tProperty lexer.julia.string.interpolation removed.\n\tUpdated set of characters for identifiers.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/pull/13\">Pull request #13</a>.\n\t</li>\n\t<li>\n\tFixed Markdown emphasis spans to only be recognized when closed in same paragraph.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1216/\">Bug #1216</a>.\n\t</li>\n\t<li>\n\tFixed Markdown code block to terminate when end marker is indented.\n\tDisplay all of end marker in code block style.\n\tOnly recognize inline code when closed in same paragraph.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2247/\">Bug #2247</a>.\n\t</li>\n\t<li>\n\tFixed Matlab to not allow escape sequences in double-quoted strings.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/18\">Issue #18</a>.\n\t</li>\n\t<li>\n\tSupport flexible heredoc and nowdoc syntax for PHP.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/19\">Issue #19</a>.\n\t</li>\n\t<li>\n\tEnabled '_' digit separator in numbers for PHP.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/19\">Issue #19</a>.\n\t</li>\n\t<li>\n\tStop styling attributes as comments for PHP.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/19\">Issue #19</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/lexilla510.zip\">Release 5.1.0</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 23 June 2021.\n\t</li>\n\t<li>\n\tThis is a stable release. The Lexilla protocol should remain compatible through 5.x releases.\n\t</li>\n\t<li>\n\tFixed bugs with styling Erlang by handling \\n and \\r\\n line endings consistently.\n\t</li>\n\t<li>\n\tFixed folding for F# open statements and for strings that contain comment prefixes.\n\t</li>\n\t<li>\n\tFormat specifiers lexed in F# strings.\n\t</li>\n\t<li>\n\tFixed folding for ASP files where scripts were treated inconsistently when '&lt;%' was included\n\tor not included in range examined.\n\t</li>\n\t<li>\n\tFixed folding of Raku heredocs that start with \"q:to\" or \"qq:to\".\n\t</li>\n\t<li>\n\tFixed folding at end of Ruby files where these is no final new line.\n\t</li>\n\t<li>\n\tMade folding of Tcl files more consistent by always treating completely empty lines as whitespace.\n\t</li>\n\t<li>\n\tFixed styling of \"a:b\" with no spaces in YAML as a single piece of text instead of a key-value pair.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/pull/15\">Pull request #15</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/lexilla503.zip\">Release 5.0.3</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 2 June 2021.\n\t</li>\n\t<li>\n\tAdd namespace feature with GetNameSpace function.\n\t</li>\n\t<li>\n\tAdd Julia lexer.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1380/\">Feature #1380</a>.\n\t</li>\n\t<li>\n\tFix transition to comment for --> inside JavaScript string.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2207/\">Bug #2207</a>.\n\t</li>\n\t<li>\n\tFix variable expansion in Batch.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/4\">Issue #4</a>.\n\t</li>\n\t<li>\n\tFix empty link titles in Markdown.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2235/\">Bug #2235</a>.\n\tAlso fix detection of whether the previous line had content which treated '\\n' and '\\r\\n' line endings differently.\n\t</li>\n\t<li>\n\tRemove nested comment and long string support as these were removed from Lua.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2205/\">Bug #2205</a>.\n\t</li>\n\t<li>\n\tUpdate to Unicode 13.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1379/\">Feature #1379</a>.\n\t</li>\n\t<li>\n\tAddStaticLexerModule function adds a static lexer to Lexilla's list.\n\t</li>\n\t<li>\n\tOn Win32 enable hardware-enforced stack protection.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1405/\">Feature #1405</a>.\n\t</li>\n\t<li>\n\tOn 32-bit Win32 using g++, stop exported functions ending with @n causing failures with GetProcAddress.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/issues/10\">Issue #10</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/lexilla502.zip\">Release 5.0.2</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 23 April 2021.\n\t</li>\n\t<li>\n\tFix assertion in cpp lexer handling of preprocessor.\n\tEmpty preprocessor statement '#' caused preprocessor history to be stored on incorrect line number.\n\tDangling #else or #elif without corresponding #if led to inconsistent state.\n\tChange treatment of empty preprocessor statement to set subsequent line end characters in\n\tpreprocessor style as this is more consistent with other preprocessor directives and avoids\n\tdifferences between \\n and \\r\\n line ends.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2245/\">Bug #2245</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/lexilla501.zip\">Release 5.0.1</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 9 April 2021.\n\t</li>\n\t<li>\n\tAdd LexerNameFromID function to Lexilla protocol as optional and temporary to\n\thelp applications migrate to Lexilla.\n\tIt is marked deprecated and will be removed in a future release.\n\t</li>\n\t<li>\n\tThe cpp lexer supports XML styled comment doc keywords.\n\t<a href=\"https://github.com/ScintillaOrg/lexilla/pull/2\">Pull request #2</a>.\n\t</li>\n\t<li>\n\tThe errorlist lexer detects NMAKE fatal errors and Microsoft linker errors as SCE_ERR_MS.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/lexilla500.zip\">Release 5.0.0</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 5 March 2021.\n\t</li>\n\t<li>\n\tFirst version that separates Lexilla from Scintilla.\n\tEach of the 3 projects now has a separate history page but history before 5.0.0 remains combined.\n\t</li>\n\t<li>\n\tLexer added for F#.\n\t</li>\n    </ul>\n    <h3>\n       Lexilla became a separate project at this point.\n    </h3>\n    <h3>\n       <a href=\"https://www.scintilla.org/scite446.zip\">Release 4.4.6</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 1 December 2020.\n\t</li>\n\t<li>\n\tFix building with Xcode 12.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2187/\">Bug #2187</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/scite445.zip\">Release 4.4.5</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 11 September 2020.\n\t</li>\n\t<li>\n\tLexilla interface supports setting initialisation properties on lexer libraries with\n\tSetLibraryProperty and GetLibraryPropertyNames functions.\n\tThese are called by SciTE which will forward properties to lexer libraries that are prefixed with\n\t\"lexilla.context.\".\n\t</li>\n\t<li>\n\tAllow cross-building for GTK by choosing pkg-config.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2189/\">Bug #2189</a>.\n\t</li>\n\t<li>\n\tOn GTK, allow setting CPPFLAGS (and LDFLAGS for SciTE) to support hardening.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2191/\">Bug #2191</a>.\n\t</li>\n\t<li>\n\tChanged SciTE's indent.auto mode to set tab size to indent size when file uses tabs for indentation.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2198/\">Bug #2198</a>.\n\t</li>\n\t<li>\n\tFix position of marker symbols for SC_MARGIN_RTEXT which were being moved based on\n\twidth of text.\n\t</li>\n\t<li>\n\tFixed bug on Win32 where cursor was flickering between hand and text over an\n\tindicator with hover style.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2170/\">Bug #2170</a>.\n\t</li>\n\t<li>\n\tFixed bug where hovered indicator was not returning to non-hover\n\tappearance when mouse moved out of window or into margin.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2193/\">Bug #2193</a>.\n\t</li>\n\t<li>\n\tFixed bug where a hovered INDIC_TEXTFORE indicator was not applying the hover\n\tcolour to the whole range.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2199/\">Bug #2199</a>.\n\t</li>\n\t<li>\n\tFixed bug where gradient indicators were not showing hovered appearance.\n\t</li>\n\t<li>\n\tFixed bug where layout caching was ineffective.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2197/\">Bug #2197</a>.\n\t</li>\n\t<li>\n\tFor SciTE, don't show the output pane for quiet jobs.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1365/\">Feature #1365</a>.\n\t</li>\n\t<li>\n\tSupport command.quiet for SciTE on GTK.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1365/\">Feature #1365</a>.\n\t</li>\n\t<li>\n\tFixed a bug in SciTE with stack balance when a syntax error in the Lua startup script\n\tcaused continuing failures to find functions after the syntax error was corrected.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2176/\">Bug #2176</a>.\n\t</li>\n\t<li>\n\tAdded method for iterating through multiple vertical edges: SCI_GETMULTIEDGECOLUMN.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1350/\">Feature #1350</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/scite444.zip\">Release 4.4.4</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 21 July 2020.\n\t</li>\n\t<li>\n\tEnd of line annotations implemented.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2141/\">Bug #2141</a>.\n\t</li>\n\t<li>\n\tAdd SCI_BRACEMATCHNEXT API.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1368/\">Feature #1368</a>.\n\t</li>\n\t<li>\n\tThe latex lexer supports lstlisting environment that is similar to verbatim.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1358/\">Feature #1358</a>.\n\t</li>\n\t<li>\n\tFor SciTE on Linux, place liblexilla.so and libscintilla.so in /usr/lib/scite.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2184/\">Bug #2184</a>.\n\t</li>\n\t<li>\n\tRound SCI_TEXTWIDTH instead of truncating as this may be more accurate when sizing application\n\telements to match text.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1355/\">Feature #1355</a>.\n\t</li>\n\t<li>\n\tDisplay DEL control character as visible \"DEL\" block like other control characters.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1369/\">Feature #1369</a>.\n\t</li>\n\t<li>\n\tAllow caret width to be up to 20 pixels.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1361/\">Feature #1361</a>.\n\t</li>\n\t<li>\n\tSciTE on Windows adds create.hidden.console option to stop console window flashing\n\twhen Lua script calls os.execute or io.popen.\n\t</li>\n\t<li>\n\tFix translucent rectangle drawing on Qt. When drawing a translucent selection, there were edge\n\tartifacts as the calls used were drawing outlines over fill areas. Make bottom and right borders on\n\tINDIC_ROUNDBOX be same intensity as top and left.\n\tReplaced some deprecated Qt calls with currently supported calls.\n\t</li>\n\t<li>\n\tFix printing on Windows to use correct text size.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2185/\">Bug #2185</a>.\n\t</li>\n\t<li>\n\tFix bug on Win32 where calling WM_GETTEXT for more text than in document could return\n\tless text than in document.\n\t</li>\n\t<li>\n\tFixed a bug in SciTE with Lua stack balance causing failure to find\n\tfunctions after reloading script.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2176/\">Bug #2176</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/scite443.zip\">Release 4.4.3</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 3 June 2020.\n\t</li>\n\t<li>\n\tFix syntax highlighting for SciTE on Windows by setting executable directory for loading Lexilla.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2181/\">Bug #2181</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/scite442.zip\">Release 4.4.2</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 2 June 2020.\n\t</li>\n\t<li>\n\tOn Cocoa using Xcode changed Lexilla.dylib install path to @rpath as would otherwise try /usr/lib which\n\twon't work for sandboxed applications.\n\t</li>\n\t<li>\n\tOn Cocoa using Xcode made work on old versions of macOS by specifying deployment target as 10.8\n\tinstead of 10.15.\n\t</li>\n\t<li>\n\tOn Win32 fix static linking of Lexilla by specifying calling convention in Lexilla.h.\n\t</li>\n\t<li>\n\tSciTE now uses default shared library extension even when directory contains '.'.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/scite440.zip\">Release 4.4.0</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 1 June 2020.\n\t</li>\n\t<li>\n\tAdded Xcode project files for Lexilla and Scintilla with no lexers (cocoa/Scintilla).\n\t</li>\n\t<li>\n\tFor GTK, build a shared library with no lexers libscintilla.so or libscintilla.dll.\n\t</li>\n\t<li>\n\tLexilla used as a shared library for most builds of SciTE except for the single file executable on Win32.\n\tOn GTK, Scintilla shared library used.\n\tLexillaLibrary code can be copied out of SciTE for other applications that want to interface to Lexilla.\n\t</li>\n\t<li>\n\tConstants in Scintilla.h can be disabled with SCI_DISABLE_AUTOGENERATED.\n\t</li>\n\t<li>\n\tImplement per-monitor DPI Awareness on Win32 so both Scintilla and SciTE\n\twill adapt to the display scale when moved between monitors.\n\tApplications should forward WM_DPICHANGED to Scintilla.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2171/\">Bug #2171</a>,\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2063/\">Bug #2063</a>.\n\t</li>\n\t<li>\n\tOptimized performance when opening huge files.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1347/\">Feature #1347</a>.\n\t</li>\n\t<li>\n\tAdd Appearance and Contrast properties to SciTE that allow customising visuals for dark mode and\n\thigh contrast modes.\n\t</li>\n\t<li>\n\tFixed bug in Batch lexer where a single character line with a single character line end continued\n\tstate onto the next line.\n\t</li>\n\t<li>\n\tAdded SCE_ERR_GCC_EXCERPT style for GCC 9 diagnostics in errorlist lexer.\n\t</li>\n\t<li>\n\tFixed buffer over-read bug with absolute references in MMIXAL lexer.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2019/\">Bug #2019</a>.\n\t</li>\n\t<li>\n\tFixed bug with GTK on recent Linux distributions where underscores were invisible.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2173/\">Bug #2173</a>.\n\t</li>\n\t<li>\n\tFixed GTK on Linux bug when pasting from closed application.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2175/\">Bug #2175</a>.\n\t</li>\n\t<li>\n\tFixed bug in SciTE with Lua stack balance.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2176/\">Bug #2176</a>.\n\t</li>\n\t<li>\n\tFor macOS, SciTE reverts to running python (2) due to python3 not being available in the sandbox.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/scite433.zip\">Release 4.3.3</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 27 April 2020.\n\t</li>\n\t<li>\n\tAdded Visual Studio project files for Lexilla and Scintilla with no lexers.\n\t</li>\n\t<li>\n\tAdd methods for iterating through the marker handles and marker numbers on a line:\n\tSCI_MARKERHANDLEFROMLINE and SCI_MARKERNUMBERFROMLINE.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1344/\">Feature #1344</a>.\n\t</li>\n\t<li>\n\tAssembler lexers asm and as can change comment character with lexer.as.comment.character property.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1314/\">Feature #1314</a>.\n\t</li>\n\t<li>\n\tFix brace styling in Batch lexer so that brace matching works.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1624/\">Bug #1624</a>,\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1906/\">Bug #1906</a>,\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1997/\">Bug #1997</a>,\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2065/\">Bug #2065</a>.\n\t</li>\n\t<li>\n\tChange Perl lexer to style all line ends of comment lines in comment line style.\n\tPreviously, the last character was in default style which made the characters in\n\t\\r\\n line ends have mismatching styles.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2164/\">Bug #2164</a>.\n\t</li>\n\t<li>\n\tWhen a lexer has been set with SCI_SETILEXER, fix SCI_GETLEXER and avoid\n\tsending SCN_STYLENEEDED notifications.\n\t</li>\n\t<li>\n\tOn Win32 fix handling Japanese IME input when both GCS_COMPSTR and\n\tGCS_RESULTSTR set.\n\t</li>\n\t<li>\n\tWith Qt on Win32 add support for line copy format on clipboard, compatible with Visual Studio.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2167/\">Bug #2167</a>.\n\t</li>\n\t<li>\n\tOn Qt with default encoding (ISO 8859-1) fix bug where 'µ' (Micro Sign) case-insensitively matches '?'\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2168/\">Bug #2168</a>.\n\t</li>\n\t<li>\n\tOn GTK with Wayland fix display of windowed IME.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2149/\">Bug #2149</a>.\n\t</li>\n\t<li>\n\tFor Python programs, SciTE defaults to running python3 on Unix and pyw on Windows which will run\n\tthe most recently installed Python in many cases.\n\tSet the \"python.command\" property to override this.\n\tScripts distributed with Scintilla and SciTE are checked with Python 3 and may not work with Python 2.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/scite432.zip\">Release 4.3.2</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 6 March 2020.\n\t</li>\n\t<li>\n\tOn Win32 fix new bug that treated all dropped text as rectangular.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/scite431.zip\">Release 4.3.1</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 4 March 2020.\n\t</li>\n\t<li>\n\tAdd default argument for StyleContext::GetRelative.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1336/\">Feature #1336</a>.\n\t</li>\n\t<li>\n\tFix drag and drop between different encodings on Win32 by always providing CF_UNICODETEXT only.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2151/\">Bug #2151</a>.\n\t</li>\n\t<li>\n\tAutomatically scroll while dragging text.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/497/\">Feature #497</a>.\n\t</li>\n\t<li>\n\tOn Win32, the numeric keypad with Alt pressed can be used to enter characters by number.\n\tThis can produce unexpected results in non-numlock mode when function keys are assigned.\n\tPotentially problematic keys like Alt+KeypadUp are now ignored.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2152/\">Bug #2152</a>.\n\t</li>\n\t<li>\n\tCrash fixed with Direct2D on Win32 when updating driver.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2138/\">Bug #2138</a>.\n\t</li>\n\t<li>\n\tFor SciTE on Win32, fix crashes when Lua script closes application.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2155/\">Bug #2155</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/scite430.zip\">Release 4.3.0</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 16 January 2020.\n\t</li>\n\t<li>\n\tLexers made available as Lexilla library.\n\tTestLexers program with tests for Lexilla and lexers added in lexilla/test.\n\t</li>\n\t<li>\n\tSCI_SETILEXER implemented to use lexers from Lexilla or other sources.\n\t</li>\n\t<li>\n\tILexer5 interface defined provisionally to support use of Lexilla.\n\tThe details of this interface may change before being stabilised in Scintilla 5.0.\n\t</li>\n\t<li>\n\tSCI_LOADLEXERLIBRARY implemented on Cocoa.\n\t</li>\n\t<li>\n\tBuild Scintilla with SCI_EMPTYCATALOGUE to avoid making lexers available.\n\t</li>\n\t<li>\n\tLexer and folder added for Raku language.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1328/\">Feature #1328</a>.\n\t</li>\n\t<li>\n\tDon't clear clipboard before copying text with Qt.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2147/\">Bug #2147</a>.\n\t</li>\n\t<li>\n\tOn Win32, remove support for CF_TEXT clipboard format as Windows will convert to\n\tCF_UNICODETEXT.\n\t</li>\n\t<li>\n\tImprove IME behaviour on GTK.\n\tSet candidate position for windowed IME.\n\tImprove location of candidate window.\n\tPrevent movement of candidate window while typing.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2135/\">Bug #2135</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/scite423.zip\">Release 4.2.3</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 11 December 2019.\n\t</li>\n\t<li>\n\tFix failure in SciTE's Complete Symbol command.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/scite422.zip\">Release 4.2.2</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 7 December 2019.\n\t</li>\n\t<li>\n\tMove rather than grow selection when insertion at start.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2140/\">Bug #2140</a>.\n\t</li>\n\t<li>\n\tAllow target to have virtual space.\n\tAdd methods for finding the virtual space at start and end of multiple selections.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1316/\">Feature #1316</a>.\n\t</li>\n\t<li>\n\tSciTE on Win32 adds mouse button \"Forward\" and \"Backward\" key definitions for use in\n\tproperties like user.shortcuts.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1317/\">Feature #1317</a>.\n\t</li>\n\t<li>\n\tLexer and folder added for Hollywood language.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1324/\">Feature #1324</a>.\n\t</li>\n\t<li>\n\tHTML lexer treats custom tags from HTML5 as known tags. These contain \"-\" like \"custom-tag\".\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1299/\">Feature #1299</a>.\n\t</li>\n\t<li>\n\tHTML lexer fixes bug with some non-alphabetic characters in unknown tags.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1320/\">Feature #1320</a>.\n\t</li>\n\t<li>\n\tFix bug in properties file lexer where long lines were only styled for the first 1024 characters.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1933/\">Bug #1933</a>.\n\t</li>\n\t<li>\n\tRuby lexer recognizes squiggly heredocs.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1326/\">Feature #1326</a>.\n\t</li>\n\t<li>\n\tAvoid unnecessary IME caret movement on Win32.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1304/\">Feature #1304</a>.\n\t</li>\n\t<li>\n\tClear IME state when switching language on Win32.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2137/\">Bug #2137</a>.\n\t</li>\n\t<li>\n\tFixed drawing of translucent rounded rectangles on Win32 with Direct2D.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2144/\">Bug #2144</a>.\n\t</li>\n\t<li>\n\tSetting rectangular selection made faster.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2130/\">Bug #2130</a>.\n\t</li>\n\t<li>\n\tSciTE reassigns *.s extension to the GNU Assembler language from the S+ statistical language.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/scite421.zip\">Release 4.2.1</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 24 October 2019.\n\t</li>\n\t<li>\n\tAdd SCI_SETTABMINIMUMWIDTH to set the minimum width of tabs.\n\tThis allows minimaps or overviews to be laid out to match the full size editing view.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2118/\">Bug #2118</a>.\n\t</li>\n\t<li>\n\tSciTE enables use of SCI_ commands in user.context.menu.\n\t</li>\n \t<li>\n\tXML folder adds fold.xml.at.tag.open option to fold tags at the start of the tag \"&lt;\" instead of the end \"&gt;\".\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2128/\">Bug #2128</a>.\n\t</li>\n \t<li>\n\tMetapost lexer fixes crash with 'interface=none' comment.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2129/\">Bug #2129</a>.\n\t</li>\n \t<li>\n\tPerl lexer supports indented here-docs.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2121/\">Bug #2121</a>.\n\t</li>\n \t<li>\n\tPerl folder folds qw arrays.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1306/\">Feature #1306</a>.\n\t</li>\n \t<li>\n\tTCL folder can turn off whitespace flag by setting fold.compact property to 0.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2131/\">Bug #2131</a>.\n\t</li>\n \t<li>\n\tOptimize setting up keyword lists in lexers.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1305/\">Feature #1305</a>.\n\t</li>\n\t<li>\n\tUpdated case conversion and character categories to Unicode 12.1.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1315/\">Feature #1315</a>.\n\t</li>\n \t<li>\n\tOn Win32, stop the IME candidate window moving unnecessarily and position it better.<br />\n\tStop candidate window overlapping composition text and taskbar.<br />\n\tPosition candidate window closer to composition text.<br />\n\tStop candidate window moving while typing.<br />\n\tAlign candidate window to target part of composition text.<br />\n\tStop Google IME on Windows 7 moving while typing.<br />\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2120/\">Bug #2120</a>.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1300/\">Feature #1300</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/scite420.zip\">Release 4.2.0</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 5 July 2019.\n\t</li>\n \t<li>\n\tScintilla.iface adds line and pointer types, increases use of the position type, uses enumeration\n\ttypes in methods and properties, and adds enumeration aliases to produce better CamelCase\n\tidentifiers.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1297/\">Feature #1297</a>.\n\t</li>\n \t<li>\n\tSource of input (direct / IME composition / IME result) reported in SCN_CHARADDED so applications\n\tcan treat temporary IME composition input differently.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2038/\">Bug #2038</a>.\n\t</li>\n \t<li>\n\tLexer added for DataFlex.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1295/\">Feature #1295</a>.\n\t</li>\n \t<li>\n\tMatlab lexer now treats keywords as case-sensitive.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2112/\">Bug #2112</a>.\n\t</li>\n \t<li>\n\tSQL lexer fixes single quoted strings where '\" (quote, double quote) was seen as continuing the string.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2098/\">Bug #2098</a>.\n\t</li>\n \t<li>\n\tPlatform layers should use InsertCharacter method to perform keyboard and IME input, replacing\n\tAddCharUTF method.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1293/\">Feature #1293</a>.\n\t</li>\n \t<li>\n\tAdd CARETSTYLE_BLOCK_AFTER option to always display block caret after selection.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1924/\">Bug #1924</a>.\n\t</li>\n \t<li>\n\tOn Win32, limit text returned from WM_GETTEXT to the length specified in wParam.\n\tThis could cause failures when using assistive technologies like NVDA.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2110/\">Bug #2110</a>,\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2114/\">Bug #2114</a>.\n\t</li>\n \t<li>\n\tFix deletion of isolated invalid bytes.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2116/\">Bug #2116</a>.\n\t</li>\n \t<li>\n\tFix position of line caret when overstrike caret set to block.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2106/\">Bug #2106</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/scite417.zip\">Release 4.1.7</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 13 June 2019.\n\t</li>\n\t<li>\n\tFixes an incorrect default setting in SciTE which caused multiple visual features to fail to display.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/scite416.zip\">Release 4.1.6</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 10 June 2019.\n\t</li>\n\t<li>\n\tFor Visual C++ 2019, /std:c++latest now includes some C++20 features so switch to /std:c++17.\n\t</li>\n\t<li>\n\tSciTE supports editing files larger than 2 gigabytes when built as a 64-bit application.\n\t</li>\n \t<li>\n\tLexer added for X12.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1280/\">Feature #1280</a>.\n\t</li>\n \t<li>\n\tCMake folder folds function - endfunction.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1289/\">Feature #1289</a>.\n\t</li>\n \t<li>\n\tVB lexer adds support for VB2017 binary literal &amp;B and digit separators 123_456.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1288/\">Feature #1288</a>.\n\t</li>\n\t<li>\n\tImproved performance of line folding code on large files when no folds are contracted.\n\tThis improves the time taken to open or close large files.\n\t</li>\n\t<li>\n\tFix bug where changing identifier sets in lexers preserved previous identifiers.\n\t</li>\n\t<li>\n\tFixed bug where changing to Unicode would rediscover line end positions even if still\n\tsticking to ASCII (not Unicode NEL, LS, PS) line ends.\n\tOnly noticeable on huge files with over 100,000 lines.\n\t</li>\n \t<li>\n\tChanged behaviour of SCI_STYLESETCASE(*,SC_CASE_CAMEL) so that it only treats 'a-zA-Z'\n\tas word characters because this covers the feature's intended use (viewing case-insensitive ASCII-only\n\tkeywords in a specified casing style) and simplifies the behaviour and code.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1238/\">Feature #1238</a>.\n\t</li>\n \t<li>\n\tIn SciTE added Camel case option \"case:c\" for styles to show keywords with initial capital.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/scite415.zip\">Release 4.1.5</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 17 April 2019.\n\t</li>\n \t<li>\n\tOn Win32, removed special handling of non-0 wParam to WM_PAINT.\n\t</li>\n \t<li>\n\tImplement high-priority idle on Win32 to make redraw smoother and more efficient.\n\t</li>\n\t<li>\n\tAdd vertical bookmark symbol SC_MARK_VERTICALBOOKMARK.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1276/\">Feature #1276</a>.\n\t</li>\n \t<li>\n\tSet default fold display text SCI_SETDEFAULTFOLDDISPLAYTEXT(text).\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1272/\">Feature #1272</a>.\n\t</li>\n \t<li>\n\tAdd SCI_SETCHARACTERCATEGORYOPTIMIZATION API to optimize speed\n\tof character category features like determining whether a character is a space or number\n\tat the expense of memory.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1259/\">Feature #1259</a>.\n\t</li>\n \t<li>\n\tImprove the styling of numbers in Nim.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1268/\">Feature #1268</a>.\n\t</li>\n \t<li>\n\tFix exception when inserting DBCS text.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2093/\">Bug #2093</a>.\n\t</li>\n\t<li>\n\tImprove performance of accessibility on GTK.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2094/\">Bug #2094</a>.\n\t</li>\n \t<li>\n\tFix text reported for deletion with accessibility on GTK.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2095/\">Bug #2095</a>.\n\t</li>\n \t<li>\n\tFix flicker when inserting primary selection on GTK.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2087/\">Bug #2087</a>.\n\t</li>\n \t<li>\n\tSupport coloured text in Windows 8.1+.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1277/\">Feature #1277</a>.\n\t</li>\n \t<li>\n\tAvoid potential long hangs with idle styling for huge documents on Cocoa and GTK.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/scite414.zip\">Release 4.1.4</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 7 March 2019.\n\t</li>\n\t<li>\n\tCalltips implemented on Qt.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1548/\">Bug #1548</a>.\n\t</li>\n \t<li>\n\tBlock caret in overtype mode SCI_SETCARETSTYLE(caretStyle | CARETSTYLE_OVERSTRIKE_BLOCK).\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1217/\">Feature #1217</a>.\n\t</li>\n \t<li>\n\tSciTE supports changing caret style via caret.style property.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1264/\">Feature #1264</a>.\n\t</li>\n \t<li>\n\tLexer added for .NET's Common Intermediate Language CIL.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1265/\">Feature #1265</a>.\n\t</li>\n \t<li>\n\tThe C++ lexer, with styling.within.preprocessor on, now interprets \"(\" in preprocessor \"#if(\"\n\tas an operator instead of part of the directive. This improves folding as well which could become\n\tunbalanced.\n\t</li>\n \t<li>\n\tFix raw strings in Nim.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1253/\">Feature #1253</a>.\n\t</li>\n \t<li>\n\tFix inconsistency with dot styling in Nim.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1260/\">Feature #1260</a>.\n\t</li>\n \t<li>\n\tEnhance the styling of backticks in Nim.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1261/\">Feature #1261</a>.\n\t</li>\n \t<li>\n\tEnhance raw string identifier styling in Nim.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1262/\">Feature #1262</a>.\n\t</li>\n \t<li>\n\tFix fold behaviour with comments in Nim.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1254/\">Feature #1254</a>.\n\t</li>\n \t<li>\n\tFix TCL lexer recognizing '\"' after \",\" inside a bracketed substitution.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1947/\">Bug #1947</a>.\n\t</li>\n \t<li>\n\tFix garbage text from SCI_MOVESELECTEDLINESUP and SCI_MOVESELECTEDLINESDOWN\n\tfor rectangular or thin selection by performing no action.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2078/\">Bug #2078</a>.\n\t</li>\n \t<li>\n\tEnsure container notified if Insert pressed when caret off-screen.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2083/\">Bug #2083</a>.\n\t</li>\n \t<li>\n\tFix memory leak when checking running instance on GTK.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1267/\">Feature #1267</a>.\n\t</li>\n\t<li>\n\tPlatform layer font cache removed on Win32 as there is a platform-independent cache.\n\t</li>\n\t<li>\n\tSciTE for GTK easier to build on macOS.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2084/\">Bug #2084</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/scite413.zip\">Release 4.1.3</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 10 January 2019.\n\t</li>\n\t<li>\n\tAdd SCI_SETCOMMANDEVENTS API to allow turning off command events as they\n\tcan be a significant performance cost.\n\t</li>\n\t<li>\n\tImprove efficiency of idle wrapping by wrapping in blocks as large as possible while\n\tstill remaining responsive.\n\t</li>\n\t<li>\n\tUpdated case conversion and character categories to Unicode 11.\n\t</li>\n\t<li>\n\tErrorlist lexer recognizes negative line numbers as some programs show whole-file\n\terrors occurring on line -1.\n\tSciTE's parsing of diagnostics also updated to handle this case.\n\t</li>\n \t<li>\n\tAdded \"nim\" lexer (SCLEX_NIM) for the Nim language which was previously called Nimrod.\n\tFor compatibility, the old \"nimrod\" lexer is still present but is deprecated and will be removed at the\n\tnext major version.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1242/\">Feature #1242</a>.\n\t</li>\n \t<li>\n\tThe Bash lexer implements substyles for multiple sets of keywords and supports SCI_PROPERTYNAMES.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2054/\">Bug #2054</a>.\n\t</li>\n \t<li>\n\tThe C++ lexer interprets continued preprocessor lines correctly by reading all of\n\tthe logical line.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2062/\">Bug #2062</a>.\n\t</li>\n \t<li>\n\tThe C++ lexer interprets preprocessor arithmetic expressions containing multiplicative and additive\n\toperators correctly by following operator precedence rules.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2069/\">Bug #2069</a>.\n\t</li>\n \t<li>\n\tThe EDIFACT lexer handles message groups as well as messages.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1247/\">Feature #1247</a>.\n\t</li>\n \t<li>\n\tFor SciTE's Find in Files, allow case-sensitivity and whole-word options when running\n\ta user defined command.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2053/\">Bug #2053</a>.\n\t</li>\n\t<li>\n\tNotify with SC_UPDATE_SELECTION when user performs a multiple selection add.\n\t</li>\n\t<li>\n\tOn macOS 10.14 Cocoa, fix incorrect horizontal offset.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2022/\">Bug #2022</a>.\n\t</li>\n\t<li>\n\tOn Cocoa, fix a crash that occurred when entering a dead key diacritic then a character\n\tthat can not take that diacritic, such as option+e (acute accent) followed by g.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2061/\">Bug #2061</a>.\n\t</li>\n\t<li>\n\tOn Cocoa, use dark info bar background when system is set to Dark Appearance.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2055/\">Bug #2055</a>.\n\t</li>\n\t<li>\n\tFixed a crash on Cocoa in bidirectional mode where some patterns of invalid UTF-8\n\tcaused failures to create Unicode strings.\n\t</li>\n\t<li>\n\tSCI_MARKERADD returns -1 for invalid lines as documented instead of 0.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2051/\">Bug #2051</a>.\n\t</li>\n\t<li>\n\tImprove performance of text insertion when Unicode line indexing off.\n\t</li>\n\t<li>\n\tFor Qt on Windows, stop specifying -std:c++latest as that is no longer needed\n\tto enable C++17 with MSVC 2017 and Qt 5.12 and it caused duplicate flag warnings.\n\t</li>\n\t<li>\n\tOn Linux, enable Lua to access dynamic libraries.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2058/\">Bug #2058</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/scite412.zip\">Release 4.1.2</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 2 October 2018.\n\t</li>\n\t<li>\n\tC++ lexer fixes evaluation of \"#elif\".\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2045/\">Bug #2045</a>.\n\t</li>\n\t<li>\n\tMarkdown lexer fixes highlighting of non-ASCII characters in links.\n\t</li>\n\t<li>\n\tSciTE on Win32 drops menukey feature, makes Del key work again in find and replace strips\n\tand disables F5 while command running.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2044/\">Bug #2044</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/scite411.zip\">Release 4.1.1</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 9 September 2018.\n\t</li>\n\t<li>\n\tOptional indexing of line starts in UTF-8 documents by UTF-32 code points and UTF-16 code units added.\n\tThis can improve performance for clients that provide UTF-32 or UTF-16 interfaces or that need to interoperate\n\twith UTF-32 or UTF-16 components.\n\t</li>\n\t<li>\n\tLexers added for SAS and Stata.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1185/\">Feature #1185.</a>\n\t</li>\n\t<li>\n\tShell folder folds \"if\", \"do\", and \"case\".\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1144/\">Feature #1144.</a>\n\t</li>\n\t<li>\n\tSciTE's menukey feature implemented on Windows.\n\t</li>\n\t<li>\n\tFor SciTE on Windows, user defined strip lists are now scrollable.\n\tCursor no longer flickers in edit and combo boxes.\n\tFocus in and out events occur for combo boxes.\n\t</li>\n\t<li>\n\tFix a leak in the bidirectional code on Win32.\n\t</li>\n\t<li>\n\tFix crash on Win32 when switching technology to default after setting bidirectional mode.\n\t</li>\n\t<li>\n\tFix margin cursor on Cocoa to point more accurately.\n\t</li>\n\t<li>\n\tFix SciTE crash on GTK+ when using director interface.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/scite410.zip\">Release 4.1.0</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 19 June 2018.\n\t</li>\n\t<li>\n\tExperimental and incomplete support added for bidirectional text on Windows using DirectWrite and Cocoa for\n\tUTF-8 documents by calling SCI_SETBIDIRECTIONAL(SC_BIDIRECTIONAL_L2R).\n\tThis allows documents that contain Arabic or Hebrew to be edited more easily in a way that is similar\n\tto other editors.\n\t</li>\n\t<li>\n\tINDIC_GRADIENT and INDIC_GRADIENTCENTRE indicator types added.\n\tINDIC_GRADIENT starts with a specified colour and alpha at top of line and fades\n\tto fully transparent at bottom.\n\tINDIC_GRADIENTCENTRE starts with a specified colour and alpha at centre of line and fades\n\tto fully transparent at top and bottom.\n\t</li>\n\t<li>\n\tWrap indent mode SC_WRAPINDENT_DEEPINDENT added which indents two tabs from previous line.\n\t</li>\n\t<li>\n\tIndicators are drawn for line end characters when displayed.\n\t</li>\n\t<li>\n\tMost invalid bytes in DBCS encodings are displayed as blobs to make problems clear\n\tand ensure something is shown.\n\t</li>\n\t<li>\n\tOn Cocoa, invalid text in DBCS encodings will be interpreted through the\n\tsingle-byte MacRoman encoding as that will accept any byte.\n\t</li>\n\t<li>\n\tDiff lexer adds styles for diffs containing patches.\n\t</li>\n\t<li>\n\tCrashes fixed on macOS for invalid DBCS characters when dragging text,\n\tchanging case of text, case-insensitive searching, and retrieving text as UTF-8.\n\t</li>\n\t<li>\n\tRegular expression crash fixed on macOS when linking to libstdc++.\n\t</li>\n\t<li>\n\tSciTE on GTK+, when running in single-instance mode, now forwards all command line arguments\n\tto the already running instance.\n\tThis allows \"SciTE filename -goto:line\" to work.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/scite405.zip\">Release 4.0.5</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 10 May 2018.\n\t</li>\n\t<li>\n\tAdd experimental SC_DOCUMENTOPTION_TEXT_LARGE option to accommodate documents larger than\n\t2 GigaBytes.\n\t</li>\n\t<li>\n\tAdditional print option SC_PRINT_SCREENCOLOURS prints with the same colours used on screen\n\tincluding line numbers.\n\t</li>\n\t<li>\n\tSciTE can read settings in EditorConfig format when enabled with editor.config.enable property.\n\t</li>\n\t<li>\n\tEDIFACT lexer adds property lexer.edifact.highlight.un.all to highlight all UN* segments.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1166/\">Feature #1166.</a>\n\t</li>\n\t<li>\n\tFortran folder understands \"change team\" and \"endteam\".\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1216/\">Feature #1216.</a>\n\t</li>\n\t<li>\n\tSet the last X chosen when SCI_REPLACESEL called to ensure macros work\n\twhen text insertion followed by caret up or down.\n\t</li>\n\t<li>\n\tBugs fixed in regular expression searches in Scintilla where some matches did not occur in an\n\teffort to avoid infinite loops when replacing on empty matches like \"^\" and \"$\".\n\tApplications should always handle empty matches in a way that avoids infinite loops, commonly\n\tby incrementing the search position after replacing an empty match.\n\tSciTE fixes a bug where replacing \"^\" always matched on the first line even when it was an\n\t\"in selection\" replace and the selection started after the line start.\n\t</li>\n\t<li>\n\tBug fixed in SciTE where invalid numeric properties could crash.\n\t</li>\n\t<li>\n\tRuntime warnings fixed with SciTE on GTK after using Find in Files.\n\t</li>\n\t<li>\n\tSciTE on Windows find and replace strips place caret at end of text after search.\n\t</li>\n\t<li>\n\tBug fixed with SciTE on macOS where corner debris appeared in the margin when scrolling.\n\tFixed by not completely hiding the status bar so the curved corner is no longer part of the\n\tscrolling region.\n\tBy default, 4 pixels of the status bar remain visible and this can be changed with\n\tthe statusbar.minimum.height property or turned off if the debris are not a problem by\n\tsetting the property to 0.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/scite404.zip\">Release 4.0.4</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 10 April 2018.\n\t</li>\n\t<li>\n\tOn Win32, the standard makefiles build a libscintilla static library as well as the existing dynamic libraries.\n\tThe statically linked version of SciTE, Sc1, links to this static library. A new file, ScintillaDLL.cxx, provides\n\tthe DllMain function required for a stand-alone Scintilla DLL. Build and project files should include this\n\tfile when producing a DLL and omit it when producing a static library or linking Scintilla statically.\n\tThe STATIC_BUILD preprocessor symbol is no longer used.\n\t</li>\n\t<li>\n\tOn Win32, Direct2D support is no longer automatically detected during build.\n\tDISABLE_D2D may still be defined to remove Direct2D features.\n\t</li>\n\t<li>\n\tIn some cases, invalid UTF-8 is handled in a way that is a little friendlier.\n\tFor example, when copying to the clipboard on Windows, an invalid lead byte will be copied as the\n\tequivalent ISO 8859-1 character and will not hide the following byte.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1211/\">Feature #1211.</a>\n\t</li>\n\t<li>\n\tLexer added for the Maxima computer algebra language.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1210/\">Feature #1210.</a>\n\t</li>\n\t<li>\n\tFix hang in Lua lexer when lexing a label up to the terminating \"::\".\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1999/\">Bug #1999</a>.\n\t</li>\n\t<li>\n\tLua lexer matches identifier chains with dots and colons.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1952/\">Bug #1952</a>.\n\t</li>\n\t<li>\n\tFor rectangular selections, pressing Home or End now moves the caret to the Home or End\n\tposition instead of the limit of the rectangular selection.\n\t</li>\n\t<li>\n\tFix move-extends-selection mode for rectangular and line selections.\n\t</li>\n\t<li>\n\tOn GTK+, change lifetime of selection widget to avoid runtime warnings.\n\t</li>\n\t<li>\n\tFix building on Mingw/MSYS to perform file copies and deletions.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1993/\">Bug #1993</a>.\n\t</li>\n\t<li>\n\tSciTE can match a wider variety of file patterns where '*' is in the middle of\n\tthe pattern and where there are multiple '*'.\n\tA '?' matches any single character.\n\t</li>\n\t<li>\n\tSciTE on Windows can execute Python scripts directly by name when on path.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1209/\">Feature #1209.</a>\n\t</li>\n\t<li>\n\tSciTE on Windows Find in Files checks for cancel after every 10,000 lines read so\n\tcan be stopped on huge files.\n\t</li>\n\t<li>\n\tSciTE remembers entered values in lists in more cases for find, replace and find in files.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1715/\">Bug #1715</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/scite403.zip\">Release 4.0.3</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 12 February 2018.\n\t</li>\n\t<li>\n\tFeatures from C++14 and C++17 are used more often, with build files now specifying\n\tc++17, gnu++17, c++1z, or std:c++latest (MSVC).\n\tRequires Microsoft Visual C++ 2017.5, GCC 7, Xcode 9.2 or Clang 4.0 or newer.\n\t</li>\n\t<li>\n\tSCI_CREATEDOCUMENT adds a bytes argument to allocate memory for an initial size.\n\tSCI_CREATELOADER and SCI_CREATEDOCUMENT add a documentOption argument to\n\tallow choosing different document capabilities.\n\t</li>\n\t<li>\n\tAdd SC_DOCUMENTOPTION_STYLES_NONE option to stop allocating memory for styles.\n\t</li>\n\t<li>\n\tAdd SCI_GETMOVEEXTENDSSELECTION to allow applications to add more\n\tcomplex selection commands.\n\t</li>\n\t<li>\n\tSciTE property bookmark.symbol allows choosing symbol used for bookmarks.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1208/\">Feature #1208.</a>\n\t</li>\n\t<li>\n\tImprove VHDL lexer's handling of character literals and escape characters in strings.\n\t</li>\n\t<li>\n\tFix double tap word selection on Windows 10 1709 Fall Creators Update.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1983/\">Bug #1983</a>.\n\t</li>\n\t<li>\n\tFix closing autocompletion lists on Cocoa for macOS 10.13 where the window\n\twas emptying but staying visible.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1981/\">Bug #1981</a>.\n\t</li>\n\t<li>\n\tFix drawing failure on Cocoa with animated find indicator in large files with macOS 10.12\n\tby disabling animation.\n\t</li>\n\t<li>\n\tSciTE on GTK+ installs its desktop file as non-executable and supports the common\n\tLDLIBS make variable.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1989/\">Bug #1989</a>,\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1990/\">Bug #1990</a>.\n\t</li>\n\t<li>\n\tSciTE shows correct column number when caret in virtual space.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1991/\">Bug #1991</a>.\n\t</li>\n\t<li>\n\tSciTE preserves selection positions when saving with strip.trailing.spaces\n\tand virtual space turned on.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1992/\">Bug #1992</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/scite402.zip\">Release 4.0.2</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 26 October 2017.\n\t</li>\n\t<li>\n\tFix HTML lexer handling of Django so that nesting a  &#123;&#123; &#125;&#125; or &#123;% %&#125;\n\tDjango tag inside of a &#123;# #&#125; Django comment does not break highlighting of rest of file\n\t</li>\n\t<li>\n\tThe Matlab folder now treats \"while\" as a fold start.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1985/\">Bug #1985</a>.\n\t</li>\n\t<li>\n\tFix failure on Cocoa with animated find indicator in large files with macOS 10.13\n\tby disabling animation on 10.13.\n\t</li>\n\t<li>\n\tFix Cocoa hang when Scintilla loaded from SMB share on macOS 10.13.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1979/\">Bug #1979</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/scite401.zip\">Release 4.0.1</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 23 October 2017.\n\t</li>\n\t<li>\n\tThe ILoader interface is defined in its own header ILoader.h as it is not\n\trelated to lexing so doesn't belong in ILexer.h.\n\t</li>\n\t<li>\n\tThe Scintilla namespace is always active for internal symbols and for the lexer interfaces\n\tILexer4 and IDocument.\n\t</li>\n\t<li>\n\tThe Baan lexer checks that matches to 3rd set of keywords are function calls and leaves as identifiers if not.\n\tBaan lexer and folder support #context_on / #context_off preprocessor feature.\n\t</li>\n\t<li>\n\tThe C++ lexer improved preprocessor conformance.<br />\n\tDefault value of 0 for undefined preprocessor symbols.<br />\n\t#define A is treated as #define A 1.<br />\n\t\"defined A\" removes \"A\" before replacing \"defined\" with value.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1966/\">Bug #1966</a>.\n\t</li>\n\t<li>\n\tThe Python folder treats triple-quoted f-strings like triple-quoted strings.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1977/\">Bug #1977</a>.\n\t</li>\n\t<li>\n\tThe SQL lexer uses sql.backslash.escapes for double quoted strings.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1968/\">Bug #1968</a>.\n\t</li>\n\t<li>\n\tMinor undefined behaviour fixed.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1978/\">Bug #1978</a>.\n\t</li>\n\t<li>\n\tOn Cocoa, improve scrolling on macOS 10.12.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1885/\">Bug #1885</a>.\n\t</li>\n\t<li>\n\tOn Cocoa, fix line selection by clicking in the margin when scrolled.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1971/\">Bug #1971</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/scite400.zip\">Release 4.0.0</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 16 August 2017.\n\t</li>\n\t<li>\n\tThis is an unstable release with changes to interfaces used for lexers and platform access.\n\tSome more changes may occur to internal and external interfaces before stability is regained with 4.1.0.\n\t</li>\n\t<li>\n\tUses C++14 features. Requires Microsoft Visual C++ 2017, GCC 7, and Clang 4.0 or newer.\n\t</li>\n\t<li>\n\tSupport dropped for GTK+ versions before 2.24.\n\t</li>\n\t<li>\n\tThe lexer interfaces ILexer and ILexerWithSubStyles, along with additional style metadata methods, were merged into ILexer4.\n\tMost lexers will need to be updated to match the new interfaces.\n\t</li>\n\t<li>\n\tThe IDocumentWithLineEnd interface was merged into IDocument.\n\t</li>\n\t<li>\n\tThe platform layer interface has changed with unused methods removed, a new mechanism for\n\treporting events, removal of methods that take individual keyboard modifiers, and removal of old timer methods.\n\t</li>\n\t<li>\n\t<a href=\"StyleMetadata.html\">Style metadata</a> may be retrieved from lexers that support this through the SCI_GETNAMEDSTYLES, SCI_NAMEOFSTYLE,\n\tSCI_TAGSOFSTYLE, and SCI_DESCRIPTIONOFSTYLE APIs.\n\t</li>\n\t<li>\n\tThe Cocoa platform layer uses Automatic Reference Counting (ARC).\n\t</li>\n\t<li>\n\tThe default encoding in Scintilla is UTF-8.\n\t</li>\n\t<li>\n\tAn SCN_AUTOCSELECTIONCHANGE notification is sent when items are highlighted in an autocompletion or user list.\n\t</li>\n\t<li>\n\tThe data parameter to ILoader::AddData made const.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1955/\">Bug #1955</a>.\n\t</li>\n\t<li>\n\tSciTE's embedded Lua interpreter updated to Lua 5.3.\n\t</li>\n\t<li>\n\tSciTE allows event handlers to be arbitrary callables, not just functions.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1190/\">Feature #1190.</a>\n\t</li>\n\t<li>\n\tSciTE allows user.shortcuts to be defined with symbolic Scintilla messages like\n\t'Ctrl+L|SCI_LINEDELETE|'.\n\t</li>\n\t<li>\n\tThe Matlab lexer treats 'end' as a number rather than a keyword when used as an index.\n\tThis also stops incorrect folding.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1951/\">Bug #1951</a>.\n\t</li>\n\t<li>\n\tThe Matlab folder implements \"fold\", \"fold.comment\", and \"fold.compact\" properties.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1965/\">Bug #1965</a>.\n\t</li>\n\t<li>\n\tThe Rust lexer recognizes 'usize' numeric literal suffixes.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1919/\">Bug #1919</a>.\n\t</li>\n\t<li>\n\tEnsure redraw when application changes overtype mode so caret change visible even when not blinking.\n\tNotify application with SC_UPDATE_SELECTION when overtype changed - previously\n\tsent SC_UPDATE_CONTENT.\n\t</li>\n\t<li>\n\tFix drawing failure when in wrap mode for delete to start/end of line which\n\taffects later lines but did not redraw them.\n\tAlso fixed drawing for wrap mode on GTK+ 2.x.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1949/\">Bug #1949</a>.\n\t</li>\n\t<li>\n\tOn GTK+ fix drawing problems including incorrect scrollbar redrawing and flickering of text.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1876/\">Bug #1876</a>.\n\t</li>\n\t<li>\n\tOn Linux, both for GTK+ and Qt, the default modifier key for rectangular selection is now Alt.\n\tThis is the same as Windows and macOS.\n\tThis was changed from Ctrl as window managers are less likely to intercept Alt+Drag for\n\tmoving windows than in the past.\n\t</li>\n\t<li>\n\tOn Cocoa, fix doCommandBySelector but avoid double effect of 'delete'\n\tkey.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1958/\">Bug #1958</a>.\n\t</li>\n\t<li>\n\tOn Qt, the updateUi signal includes the 'updated' flags.\n\tNo updateUi signal is sent for focus in events.\n\tThese changes make Qt behave more like the other platforms.\n\t</li>\n\t<li>\n\tOn Qt, dropping files on Scintilla now fires the SCN_URIDROPPED notification\n\tinstead of inserting text.\n\t</li>\n\t<li>\n\tOn Qt, focus changes send the focusChanged signal.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1957/\">Bug #1957</a>.\n\t</li>\n\t<li>\n\tOn Qt, mouse tracking is reenabled when the window is reshown.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1948/\">Bug #1948</a>.\n\t</li>\n\t<li>\n\tOn Windows, the DirectWrite modes SC_TECHNOLOGY_DIRECTWRITEDC and\n\tSC_TECHNOLOGY_DIRECTWRITERETAIN are no longer provisional.\n\t</li>\n\t<li>\n\tSciTE on macOS fixes a crash when platform-specific and platform-independent\n\tsession restoration clashed.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1960/\">Bug #1960</a>.\n\t</li>\n\t<li>\n\tSciTE on GTK+ implements find.close.on.find.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1152/\">Bug #1152</a>,\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1254/\">Bug #1254</a>,\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1762/\">Bug #1762</a>,\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/849/\">Feature #849</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/scintilla376.zip\">Release 3.7.6</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 8 August 2017.\n\t</li>\n\t<li>\n\tThis is the first release of the\n\t<a href=\"https://scintilla.sourceforge.io/LongTermDownload.html\">long term branch</a>\n\twhich avoids using features from C++14 or later in order to support older systems.\n\t</li>\n\t<li>\n\tThe Baan lexer correctly highlights numbers when followed by an operator.\n\t</li>\n\t<li>\n\tOn Cocoa, fix a bug with retrieving encoded bytes.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/scite375.zip\">Release 3.7.5</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 26 May 2017.\n\t</li>\n\t<li>\n\tThis is the final release of SciTE 3.x.\n\t</li>\n\t<li>\n\tSupport dropped for Microsoft Visual C++ 2013 due to increased use of C++11 features.\n\t</li>\n\t<li>\n\tAdded a caret line frame as an alternative visual for highlighting the caret line.\n\t</li>\n\t<li>\n\tAdded \"Reverse Selected Lines\" feature.\n\t</li>\n\t<li>\n\tSciTE adds \"Select All Bookmarks\" command.\n\t</li>\n\t<li>\n\tSciTE adds a save.path.suggestion setting to suggest a file name when saving an\n\tunnamed buffer.\n\t</li>\n\t<li>\n\tUpdated case conversion and character categories to Unicode 9.\n\t</li>\n\t<li>\n\tThe Baan lexer recognizes numeric literals in a more compliant manner including\n\thexadecimal numbers and exponentials.\n\t</li>\n\t<li>\n\tThe Bash lexer recognizes strings in lists in more cases.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1944/\">Bug #1944</a>.\n\t</li>\n\t<li>\n\tThe Fortran lexer recognizes a preprocessor line after a line continuation &amp;.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1935/\">Bug #1935</a>.\n\t</li>\n\t<li>\n\tThe Fortran folder can fold comments.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1936/\">Bug #1936</a>.\n\t</li>\n\t<li>\n\tThe PowerShell lexer recognizes escaped quotes in strings.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1929/\">Bug #1929</a>.\n\t</li>\n\t<li>\n\tThe Python lexer recognizes identifiers more accurately when they include non-ASCII characters.\n\t</li>\n\t<li>\n\tThe Python folder treats comments at the end of the file as separate from the preceding structure.\n\t</li>\n\t<li>\n\tThe YAML lexer recognizes comments in more situations and styles a\n\t\"...\" line like a \"---\" line.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1931/\">Bug #1931</a>.\n\t</li>\n\t<li>\n\tUpdate scroll bar when annotations added, removed, or visibility changed.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1187/\">Feature #1187.</a>\n\t</li>\n\t<li>\n\tCanceling modes with the Esc key preserves a rectangular selection.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1940/\">Bug #1940</a>.\n\t</li>\n\t<li>\n\tBuilds are made with a sorted list of lexers to be more reproducible.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1946/\">Bug #1946</a>.\n\t</li>\n\t<li>\n\tOn Cocoa, a leak of mouse tracking areas was fixed.\n\t</li>\n\t<li>\n\tOn Cocoa, the autocompletion is 4 pixels wider to avoid text truncation.\n\t</li>\n\t<li>\n\tOn Windows, stop drawing a focus rectangle on the autocompletion list and\n\traise the default list length to 9 items.\n\t</li>\n\t<li>\n\tSciTE examines at most 1 MB of a file to automatically determine indentation\n\tfor indent.auto to avoid a lengthy pause when loading very large files.\n\t</li>\n\t<li>\n\tSciTE user interface uses lighter colours and fewer 3D elements to match current desktop environments.\n\t</li>\n\t<li>\n\tSciTE sets buffer dirty and shows message when file deleted if load.on.activate on.\n\t</li>\n\t<li>\n\tSciTE on Windows Find strip Find button works in incremental no-close mode.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1926/\">Bug #1926</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/scite374.zip\">Release 3.7.4</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 21 March 2017.\n\t</li>\n\t<li>\n\tRequires a C++11 compiler. GCC 4.8 and MSVC 2015 are supported.\n\t</li>\n\t<li>\n\tSupport dropped for Windows NT 4.\n\t</li>\n\t<li>\n\tAccessibility support may be queried with SCI_GETACCESSIBILITY.\n\tOn GTK+, accessibility may be disabled by calling SCI_SETACCESSIBILITY.\n\t</li>\n\t<li>\n\tLexer added for \"indent\" language which is styled as plain text but folded by indentation level.\n\t</li>\n\t<li>\n\tThe Progress ABL lexer handles nested comments where comment starts or ends\n\tare adjacent like \"/*/*\" or \"*/*/\".\n\t</li>\n\t<li>\n\tIn the Python lexer, improve f-string support.\n\tAdd support for multiline expressions in triple quoted f-strings.\n\tHandle nested \"()\", \"[]\", and \"{}\" in f-string expressions and terminate expression colouring at \":\" or \"!\".\n\tEnd f-string if ending quote is seen in a \"{}\" expression.\n\tFix terminating single quoted f-string at EOL.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1918/\">Bug #1918</a>.\n\t</li>\n\t<li>\n\tThe VHDL folder folds an \"entity\" on the first line of the file.\n\t</li>\n\t<li>\n\tFor IMEs, do not clear selected text when there is no composition text to show.\n\t</li>\n\t<li>\n\tFix to crash with fold tags where line inserted at start.\n\t</li>\n\t<li>\n\tFix to stream selection mode when moving caret up or down.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1905/\">Bug #1905</a>.\n\t</li>\n\t<li>\n\tDrawing fixes for fold tags include fully drawing lines and not overlapping some\n\tdrawing and ensuring edges and mark underlines are visible.\n\t</li>\n\t<li>\n\tFix Cocoa failure to display accented character chooser for European\n\tlanguages by partially reverting a change made to prevent a crash with\n\tChinese input by special-casing the Cangjie input source.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1881/\">Bug #1881</a>.\n\t</li>\n\t<li>\n\tFix potential problems with IME on Cocoa when document contains invalid\n\tUTF-8.\n\t</li>\n\t<li>\n\tFix crash on Cocoa with OS X 10.9 due to accessibility API not available.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1915/\">Bug #1915</a>.\n\t</li>\n\t<li>\n\tImproved speed of accessibility code on GTK+ by using additional memory\n\tas a cache.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1910/\">Bug #1910</a>.\n\t</li>\n\t<li>\n\tFix crash in accessibility code on GTK+ &lt; 3.3.6 caused by previous bug fix.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1907/\">Bug #1907</a>.\n\t</li>\n\t<li>\n\tFix to prevent double scrolling on GTK+ with X11.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1901/\">Bug #1901</a>.\n\t</li>\n\t<li>\n\tSciTE on GTK+ adds an \"accessibility\" property to allow disabling accessibility\n\ton GTK+ as an optimization.\n\t</li>\n\t<li>\n\tSciTE on GTK+ has changed file chooser behaviour for some actions:\n\toverwriting an existing file shows a warning;\n\tthe default session file name \"SciTE.session\" is shown and a \"*.session\" filter is applied;\n\tappropriate filters are applied when exporting;\n\tthe current file name is displayed in \"Save As\" even when that file no longer exists.\n\t</li>\n\t<li>\n\tSciTE fixed a bug where, on GTK+, when the output pane had focus, menu commands\n\tperformed by mouse were sent instead to the edit pane.\n\t</li>\n\t<li>\n\tSciTE on Windows 8+ further restricts the paths searched for DLLs to the application\n\tand system directories which may prevent some binary planting attacks.\n\t</li>\n\t<li>\n\tFix failure to load Direct2D on Windows when used on old versions of Windows.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1653/\">Bug #1653</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/scite373.zip\">Release 3.7.3</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 19 February 2017.\n\t</li>\n\t<li>\n\tDisplay block caret over the character at the end of a selection to be similar\n\tto other editors.\n\t</li>\n\t<li>\n\tIn SciTE can choose colours for fold markers.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1172/\">Feature #1172.</a>\n\t</li>\n\t<li>\n\tIn SciTE can hide buffer numbers in tabs.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1173/\">Feature #1173.</a>\n\t</li>\n\t<li>\n\tThe Diff lexer recognizes deleted lines that start with \"--- \".\n\t</li>\n\t<li>\n\tThe Lua lexer requires the first line to start with \"#!\" to be treated as a shebang comment,\n\tnot just \"#\".\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1900/\">Bug #1900</a>.\n\t</li>\n\t<li>\n\tThe Matlab lexer requires block comment start and end to be alone on a line.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1902/\">Bug #1902</a>.\n\t</li>\n\t<li>\n\tThe Python lexer supports f-strings with new styles, allows Unicode identifiers,\n\tand no longer allows @1 to be a decorator.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1848/\">Bug #1848</a>.\n\t</li>\n\t<li>\n\tFix folding inconsistency when fold header added above a folded part.\n\tAvoid unnecessary unfolding when a deletion does not include a line end.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1896/\">Bug #1896</a>.\n\t</li>\n\t<li>\n\tFix finalization crash on Cocoa.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1909/\">Bug #1909</a>.\n\t</li>\n\t<li>\n\tSciTE on GTK+ can have a wide divider between the panes with the\n\tsplit.wide property.\n\t</li>\n\t<li>\n\tFix display of autocompletion lists and calltips on GTK+ 3.22 on Wayland.\n\tNewer APIs used on GTK+ 3.22 as older APIs were deprecated.\n\t</li>\n\t<li>\n\tFix crash in accessibility code on GTK+ due to signal receipt after destruction.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1907/\">Bug #1907</a>.\n\t</li>\n\t<li>\n\tMake trackpad scrolling work on Wayland.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1901/\">Bug #1901</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/scite372.zip\">Release 3.7.2</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 30 December 2016.\n\t</li>\n\t<li>\n\tMinimize redrawing for SCI_SETSELECTIONN* APIs.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1888/\">Bug #1888</a>.\n\t</li>\n\t<li>\n\tUse more precision to allow selecting individual lines in files with\n\tmore than 16.7 million lines.\n\t</li>\n\t<li>\n\tFor Qt 5, define QT_WS_MAC or QT_WS_X11 on those platforms.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1887/\">Bug #1887</a>.\n\t</li>\n\t<li>\n\tFor Cocoa, fix crash on view destruction with macOS 10.12.2.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1891/\">Bug #1891</a>.\n\t</li>\n\t<li>\n\tFix crash on GTK+ &lt;3.8 due to incorrect lifetime of accessibility object.\n\tMore accurate reporting of attribute ranges and deletion lengths for accessibility.\n\t</li>\n\t<li>\n\tIn SciTE, if a Lua script causes a Scintilla failure exception, display error\n\tmessage in output pane instead of exiting.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1773/\">Bug #1773</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/scite371.zip\">Release 3.7.1</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 4 December 2016.\n\t</li>\n\t<li>\n\tThe Scintilla namespace is no longer applied to struct definitions in Scintilla.h even\n\twhen SCI_NAMESPACE defined.\n\tClient code should not define SCI_NAMESPACE.\n\t</li>\n\t<li>\n\tStructure names in Scintilla.h without prefixes are deprecated and will now only\n\tbe usable with INCLUDE_DEPRECATED_FEATURES defined.<br />\n\tUse the newer names with the \"Sci_\" prefix:<br />\n\tCharacterRange &rarr; Sci_CharacterRange<br />\n\tTextRange &rarr; Sci_TextRange<br />\n\tTextToFind &rarr; Sci_TextToFind<br />\n\tRangeToFormat &rarr; Sci_RangeToFormat<br />\n\tNotifyHeader &rarr; Sci_NotifyHeader\n\t</li>\n\t<li>\n\tPreviously deprecated features SC_CP_DBCS, SCI_SETUSEPALETTE. and SCI_GETUSEPALETTE\n\thave been removed and can no longer be used in client code.\n\t</li>\n\t<li>\n\tSingle phase drawing SC_PHASES_ONE is deprecated along with the\n\tSCI_SETTWOPHASEDRAW and SCI_GETTWOPHASEDRAW messages.\n\t</li>\n\t<li>\n\tAccessibility support allowing screen readers to work added on GTK+ and Cocoa.\n\t</li>\n\t<li>\n\tTextual tags may be displayed to the right on folded lines with SCI_TOGGLEFOLDSHOWTEXT.\n\tThis is commonly something like \"{ ... }\" or \"&lt;tr&gt;...&lt;/tr&gt;\".\n\tIt is displayed with the STYLE_FOLDDISPLAYTEXT style and may have a box drawn around it\n\twith SCI_FOLDDISPLAYTEXTSETSTYLE.\n\t</li>\n\t<li>\n\tA mouse right-click over the margin may send an SCN_MARGINRIGHTCLICK event.\n\tThis only occurs when popup menus are turned off.\n\tSCI_USEPOPUP now has three states: SC_POPUP_NEVER, SC_POPUP_ALL, or SC_POPUP_TEXT.\n\t</li>\n\t<li>\n\tINDIC_POINT and INDIC_POINTCHARACTER indicators added to display small arrows\n\tunderneath positions or characters.\n\t</li>\n\t<li>\n\tAdded alternate appearance for visible tabs which looks like a horizontal line.\n\tControlled with SCI_SETTABDRAWMODE.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1165/\">Feature #1165.</a>\n\t</li>\n\t<li>\n\tOn Cocoa, a modulemap file is included to allow Scintilla to be treated as a module.\n\tThis makes it easier to use Scintilla from the Swift language.\n\t</li>\n\t<li>\n\tBaan folder accommodates sections and lexer fixes definition of SCE_BAAN_FUNCDEF.\n\t</li>\n\t<li>\n\tEDIFACT lexer and folder added.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1166/\">Feature #1166.</a>\n\t</li>\n\t<li>\n\tJSON folder fixed where it didn't resume folding with the correct fold level.\n\t</li>\n\t<li>\n\tMatlab folder based on syntax instead of indentation so more accurate.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1692/\">Bug #1692</a>.\n\t</li>\n\t<li>\n\tYAML lexer fixed style of references and keywords when followed by a comment.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1872/\">Bug #1872</a>.\n\t</li>\n\t<li>\n\tMargin click to select line now clears rectangular and additional selections.\n\t</li>\n\t<li>\n\tFixed a NULL access bug on GTK+ where the scrollbars could be used during destruction.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1873/\">Bug #1873</a>.\n\t</li>\n\t<li>\n\tA potential bug on GTK+ fixed where asynchronous clipboard could be delivered after its\n\ttarget Scintilla instance was destroyed.\n\t</li>\n\t<li>\n\tCocoa IME made more compliant with documented behaviour to avoid bugs that caused\n\thuge allocations.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1881/\">Bug #1881</a>.\n\t</li>\n\t<li>\n\tOn Win32 fix EM_SETSEL to match Microsoft documentation..\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1886/\">Bug #1886</a>.\n\t</li>\n\t<li>\n\tSciTE on GTK+ allows localizing tool bar tool tips.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1167/\">Feature #1167.</a>\n\t</li>\n\t<li>\n\tSciTE on Windows restores focus to edit pane after closing user strip.\n\t</li>\n\t<li>\n\tSciTE measures files larger that 2 GB which allows it to refuse to open huge files more consistently\n\tand to show better warning messages.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/scite370.zip\">Release 3.7.0</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 16 October 2016.\n\t</li>\n\t<li>\n\tWord selection, navigation, and manipulation is now performed on characters instead of bytes\n\tleading to more natural behaviour for multi-byte encodings like UTF-8.\n\tFor UTF-8 characters 0x80 and above, classification into word; punctuation; space; or line-end\n\tis based on the Unicode general category of the character and is not customizable.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1832/\">Bug #1832</a>.\n\t</li>\n\t<li>\n\tTwo enums changed in Scintilla.iface which may lead to changed bindings.\n\tThere were 2 FontQuality enums and the first is now PhasesDraw.\n\tThe prefix for FoldAction was SC_FOLDACTION and is now SC_FOLDACTION_\n\twhich is similar to other enums.\n\tThese changes do not affect the standard C/C++ binding.\n\t</li>\n\t<li>\n\tEDGE_MULTILINE and SCI_MULTIEDGEADDLINE added to allow displaying multiple\n\tvertical edges simultaneously.\n\t</li>\n\t<li>\n\tThe number of margins can be changed with SCI_SETMARGINS.\n\t</li>\n\t<li>\n\tMargin type SC_MARGIN_COLOUR added so that the application may\n\tchoose any colour for a margin with SCI_SETMARGINBACKN.\n\t</li>\n\t<li>\n\tOn Win32, mouse wheel scrolling can be restricted to only occur when the mouse is\n\twithin the window.\n\t</li>\n\t<li>\n\tThe WordList class in lexlib used by lexers adds an InListAbridged method for\n\tmatching keywords that have particular prefixes and/or suffixes.\n\t</li>\n\t<li>\n\tThe Baan lexer was changed significantly with more lexical states, keyword sets,\n\tand support for abridged keywords.\n\t</li>\n\t<li>\n\tThe CoffeeScript lexer styles interpolated code in strings.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1865/\">Bug #1865</a>.\n\t</li>\n\t<li>\n\tThe Progress lexer \"progress\" has been replaced with a new lexer \"abl\"\n\t(Advanced Business Language)\n\twith a different set of lexical states and more functionality.\n\tThe lexical state prefix has changed from SCE_4GL_ to SCE_ABL_.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1143/\">Feature #1143.</a>\n\t</li>\n\t<li>\n\tThe PowerShell lexer understands the grave accent escape character.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1868/\">Bug #1868</a>.\n\t</li>\n\t<li>\n\tThe YAML lexer recognizes inline comments.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1660/\">Bug #1660</a>.\n\t</li>\n\t<li>\n\tSciTE on Windows can retain coloured selection when inactive with\n\tselection.always.visible property.\n\t</li>\n\t<li>\n\tSciTE on Windows adds a state to close.on.find to close the find strip when\n\ta match is found.\n\t</li>\n\t<li>\n\tFix caret position after left or right movement with rectangular selection.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1861/\">Bug #1861</a>.\n\t</li>\n\t<li>\n\tIn SciTE, optional prefix argument added to scite.ConstantName method.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1860/\">Bug #1860</a>.\n\t</li>\n\t<li>\n\tOn Cocoa, include ILexer.h in the public headers of the framework.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1855/\">Bug #1855</a>.\n\t</li>\n\t<li>\n\tOn Cocoa, allow subclass of SCIContentView to set cursor.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1863/\">Bug #1863</a>.\n\t</li>\n\t<li>\n\tOn Cocoa, recognize the numeric keypad '+', '-', and '/' keys as\n\tSCK_ADD, SCK_SUBTRACT, and SCK_DIVIDE.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1867/\">Bug #1867</a>.\n\t</li>\n\t<li>\n\tOn GTK+ 3.21+ fix incorrect font size in auto-completion list.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1859/\">Bug #1859</a>.\n\t</li>\n\t<li>\n\tFix SciTE crash when command.mode ends with comma.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1857/\">Bug #1857</a>.\n\t</li>\n\t<li>\n\tSciTE on Windows has a full size toolbar icon for \"Close\".\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/scite367.zip\">Release 3.6.7</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 4 September 2016.\n\t</li>\n\t<li>\n\tC++11 range-based for loops used in SciTE so GCC 4.6 is now the minimum supported version.\n\t</li>\n\t<li>\n\tSC_CHARSET_DEFAULT now means code page 1252 on Windows unless a code page is set.\n\tThis prevents unexpected behaviour and crashes on East Asian systems where default locales are commonly DBCS.\n\tProjects which want to default to DBCS code pages in East Asian locales should set the code page and\n\tcharacter set explicitly.\n\t</li>\n\t<li>\n\tSCVS_NOWRAPLINESTART option stops left arrow from wrapping to the previous line.\n\tMost commonly wanted when virtual space is used.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1648/\">Bug #1648</a>.\n\t</li>\n\t<li>\n\tThe C++ lexer can fold on #else and #elif with the fold.cpp.preprocessor.at.else property.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/210/\">Bug #210</a>.\n\t</li>\n\t<li>\n\tThe errorlist lexer detects warnings from Visual C++ which do not contain line numbers.\n\t</li>\n\t<li>\n\tThe HTML lexer no longer treats \"&lt;?\" inside a string in a script as potentially starting an XML document.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/767/\">Bug #767</a>.\n\t</li>\n\t<li>\n\tThe HTML lexer fixes a problem resuming at a script start where the starting state continued\n\tpast where it should.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1849/\">Bug #1849</a>.\n\t</li>\n\t<li>\n\tWhen inserting spaces for virtual space and the position is in indentation and tabs are enabled\n\tfor indentation then use tabs.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1850/\">Bug #1850</a>.\n\t</li>\n\t<li>\n\tFix fold expand when some child text not styled.\n\tCaused by fixes for Bug #1799.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1842/\">Bug #1842</a>.\n\t</li>\n\t<li>\n\tFix key binding bug on Cocoa for control+.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1854/\">Bug #1854</a>.\n\t</li>\n\t<li>\n\tFix scroll bar size warnings on GTK+ caused by #1831.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1851/\">Bug #1851</a>.\n\t</li>\n\t<li>\n\tSmall fixes for GTK+ makefile.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1844/\">Bug #1844</a>.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1845/\">Bug #1845</a>.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1846/\">Bug #1846</a>.\n\t</li>\n\t<li>\n\tFix SciTE indentation after code like \"void function () {}\".\n\t</li>\n\t<li>\n\tFix SciTE global regex replace of \"^\" with something which missed the line after empty\n\tlines with LF line ends.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1839/\">Bug #1839</a>.\n\t</li>\n\t<li>\n\tFix SciTE on GTK+ 3.20 bug where toggle buttons on find and replace strips\n\tdid not show active state.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1853/\">Bug #1853</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/scite366.zip\">Release 3.6.6</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 24 May 2016.\n\t</li>\n\t<li>\n\tC++ 11 &lt;regex&gt; support built by default. Can be disabled by defining NO_CXX11_REGEX.\n\t</li>\n\t<li>\n\tSciTE_USERHOME environment variable allows separate location for writeable properties files.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/965/\">Feature #965.</a>\n\t</li>\n\t<li>\n\tGObject introspection supports notify and command events.\n\t</li>\n\t<li>\n\tThe Progress lexer now allows comments preceded by a tab.\n\t</li>\n\t<li>\n\tScripts reading Scintilla.iface file include comments for enu and lex definitions.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1829/\">Bug #1829</a>.\n\t</li>\n\t<li>\n\tFix crashes on GTK+ if idle work active when destroyed.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1827/\">Bug #1827</a>.\n\t</li>\n\t<li>\n\tFixed bugs when used on GTK+ 3.20.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1825/\">Bug #1825</a>.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1831/\">Bug #1831</a>.\n\t</li>\n\t<li>\n\tFix SciTE search field background with dark theme on GTK+ 2.x.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1826/\">Bug #1826</a>.\n\t</li>\n\t<li>\n\tFixed bug on Win32 that allowed resizing autocompletion from bottom when it was\n\tlocated above the caret.\n\t</li>\n\t<li>\n\tOn Win32, when using a screen reader and selecting text using Shift+Arrow,\n\tfix bug when scrolling made the caret stay at the same screen location\n\tso the screen reader did not speak the added or removed selection.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/scite365.zip\">Release 3.6.5</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 26 April 2016.\n\t</li>\n\t<li>\n\tJSON lexer added.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1140/\">Feature #1140.</a>\n\t</li>\n\t<li>\n\tThe C++ lexer fixes a bug with multi-line strings with line continuation where the string style\n\toverflowed after an edit.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1824/\">Bug #1824</a>.\n\t</li>\n\t<li>\n\tThe Python lexer treats '@' as an operator except when it is the first visible character on a line.\n\tThis is for Python 3.5.\n\t</li>\n\t<li>\n\tThe Rust lexer allows '?' as an operator.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1146/\">Feature #1146.</a>\n\t</li>\n\t<li>\n\tDoubled size of compiled regex buffer.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1822/\">Bug #1822</a>.\n\t</li>\n\t<li>\n\tFor GTK+, the Super modifier key can be used in key bindings.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1142/\">Feature #1142.</a>\n\t</li>\n\t<li>\n\tFor GTK+, fix some crashes when using multiple threads.\n\t</li>\n\t<li>\n\tPlatform layer font cache removed on GTK+ as platform-independent caches are used.\n\tThis avoids the use of thread locking and initialization of threads so any GTK+\n\tapplications that rely on Scintilla initializing threads will have to do that themselves.\n\t</li>\n\t<li>\n\tSciTE bug fixed with exported HTML where extra line shown.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1816/\">Bug #1816</a>.\n\t</li>\n\t<li>\n\tSciTE on Windows fixes bugs with pop-up menus in the find and replace strips.\n\tFor the replace strip, menu choices change the state.\n\tFor the find strip, menu choices are reflected in the appearance of their corresponding buttons.\n\t</li>\n\t<li>\n\tSciTE on Windows on high DPI displays fixes the height of edit boxes in user strips.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/scite364.zip\">Release 3.6.4</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 13 March 2016.\n\t</li>\n\t<li>\n\tSciTE allows setting the autocompletion type separator character.\n\t</li>\n\t<li>\n\tThe C++ folder folds code on '(' and ')' to allow multi-line calls to be folded.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1138/\">Feature #1138.</a>\n\t</li>\n\t<li>\n\tFor the HTML lexer, limit the extent of Mako line comments to finish before\n\tthe line end characters.\n\t</li>\n\t<li>\n\tFolds unfolded when two fold regions are merged by either deleting an intervening line\n\tor changing its fold level by adding characters.\n\tThis was fixed both in Scintilla and in SciTE's equivalent code.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1799/\">Bug #1799</a>.<br />\n\t</li>\n\t<li>\n\tThe Progress lexer supports hexadecimal numeric literals,\n\tsingle-line comments, abbreviated keywords and\n\textends nested comments to unlimited levels.\n\t</li>\n\t<li>\n\tRuby lexer treats alternate hash key syntax \"key:\" as a symbol.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1810/\">Bug #1810</a>.\n\t</li>\n\t<li>\n\tRust lexer handles bracketed Unicode string escapes like \"\\u{123abc}\".\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1809/\">Bug #1809</a>.\n\t</li>\n\t<li>\n\tFor GTK+ on Windows fix 64-bit build which was broken in 3.6.3.\n\t</li>\n\t<li>\n\tFor Qt, release builds have assertions turned off.\n\t</li>\n\t<li>\n\tFor Qt on Windows, fix compilation failure for Qt 4.x.\n\t</li>\n\t<li>\n\tIME target range displayed on Qt for OS X.\n\t</li>\n\t<li>\n\tOn Windows, make clipboard operations more robust by retrying OpenClipboard if it fails\n\tas this may occur when another application has opened the clipboard.\n\t</li>\n\t<li>\n\tOn Windows back out change that removed use of def file to ensure\n\tScintilla_DirectFunction exported without name mangling.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1813/\">Bug #1813</a>.\n\t</li>\n\t<li>\n\tOn GTK+ and Qt over Win32 in Korean fix bug caused by last release's word input change.\n\t</li>\n\t<li>\n\tFor SciTE, more descriptive error messages are displayed when there are problems loading the\n\tLua startup script.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1139/\">Feature #1139.</a>\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/scite363.zip\">Release 3.6.3</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 18 January 2016.\n\t</li>\n\t<li>\n\tAllow painting without first styling all visible text then styling in the background\n\tusing idle-time. This helps performance when scrolling down in very large documents.\n\tCan also incrementally style after the visible area to the end of the document so that\n\tthe document is already styled when the user scrolls to it.\n\t</li>\n\t<li>\n\tSupport GObject introspection on GTK+.\n\t</li>\n\t<li>\n\tSciTE supports pasting to each selection with the selection.multipaste setting.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1123/\">Feature #1123.</a>\n\t</li>\n\t<li>\n\tSciTE can optionally display a read-only indicator on tabs and in the Buffers menu.\n\t</li>\n\t<li>\n\tBash lexer flags incomplete here doc delimiters as syntax errors.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1789/\">Bug #1789</a>.<br />\n\tSupport added for using '#' in non-comment ways as is possible with zsh.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1794/\">Bug #1794</a>.<br />\n\tRecognize more characters as here-doc delimiters.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1778/\">Bug #1778</a>.\n\t</li>\n\t<li>\n\tErrorlist lexer highlights warning messages from the Microsoft linker.\n\t</li>\n\t<li>\n\tErrorlist lexer fixes bug with final line in escape sequence recognition mode.\n\t</li>\n\t<li>\n\tLua lexer includes '&amp;' and '|' bitwise operators for Lua 5.3.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1790/\">Bug #1790</a>.\n\t</li>\n\t<li>\n\tPerl lexer updated for Perl 5.20 and 5.22.<br />\n\tAllow '_' for subroutine prototypes.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1791/\">Bug #1791</a>.<br />\n\tDouble-diamond operator &lt;&lt;&gt;&gt;.<br />\n\tHexadecimal floating point literals.<br />\n\tRepetition in list assignment.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1793/\">Bug #1793</a>.<br />\n\tHighlight changed subroutine prototype syntax for Perl 5.20.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1797/\">Bug #1797</a>.<br />\n\tFix module ::-syntax when special characters such as 'x' are used.<br />\n\tAdded ' and \" detection as prefix chars for x repetition operator.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1800/\">Bug #1800</a>.\n\t</li>\n\t<li>\n\tVisual Prolog lexer recognizes numbers more accurately and allows non-ASCII verbatim\n\tquoting characters.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1130/\">Feature #1130.</a>\n\t</li>\n\t<li>\n\tSend SCN_UPDATEUI with SC_UPDATE_SELECTION when the application changes multiple\n\tselection.\n\t</li>\n\t<li>\n\tExpand folded areas before deleting fold header line.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1796/\">Bug #1796</a>.\n\t</li>\n\t<li>\n\tTreat Unicode line ends like common line ends when maintaining fold state.\n\t</li>\n\t<li>\n\tHighlight whole run for hover indicator when wrapped.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1784/\">Bug #1784</a>.\n\t</li>\n\t<li>\n\tOn Cocoa, fix crash when autocompletion list closed during scroll bounce-back.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1788/\">Bug #1788</a>.\n\t</li>\n\t<li>\n\tOn Windows, fix non-BMP input through WM_CHAR and allow WM_UNICHAR to work\n\twith non-BMP characters and on non-Unicode documents.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1779/\">Bug #1779</a>.\n\t</li>\n\t<li>\n\tOn Windows using DirectWrite, for ligatures and other character clusters,\n\tdisplay caret and selections part-way through clusters so that the caret doesn't stick\n\tto the end of the cluster making it easier to understand editing actions.\n\t</li>\n\t<li>\n\tOn Windows, Scintilla no longer uses a .DEF file during linking as it duplicates\n\tsource code directives.\n\t</li>\n\t<li>\n\tOn GTK+ and Qt, Korean input by word fixed.\n\t</li>\n\t<li>\n\tOn GTK+, Qt, and Win32 block IME input when document is read-only or any selected text\n\tis protected.\n\t</li>\n\t<li>\n\tOn GTK+ on OS X, fix warning during destruction.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1777/\">Bug #1777</a>.\n\t</li>\n\t<li>\n\tFix SciTE crashes when using LPEG lexers.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/scite362.zip\">Release 3.6.2</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 6 November 2015.\n\t</li>\n\t<li>\n\tWhitespace may be made visible just in indentation.\n\t</li>\n\t<li>\n\tWhitespace dots are centred when larger than 1 pixel.\n\t</li>\n\t<li>\n\tThe Scintilla framework on Cocoa now contains version numbers.\n\t</li>\n\t<li>\n\tSciTE's standard properties collect values from all active .properties file to produce the Language menu\n\tand the file types pull-down in the File open dialog.\n\t</li>\n\t<li>\n\tThe single executable version of SciTE, Sc1, uses 'module' statements within its embedded\n\tproperties. This makes it act more like the full distribution allowing languages to be turned on\n\tand off by setting imports.include and imports.exclude.\n\tThe default imports.exclude property adds eiffel, erlang, ps, and pov so these languages are\n\tturned off by default.\n\t</li>\n\t<li>\n\tSciTE adds an output.blank.margin.left property to allow setting the output pane\n\tmargin to a different width than the edit pane.\n\t</li>\n\t<li>\n\tCoffeeScript lexer highlights ranges correctly.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1765/\">Bug #1765</a>.\n\t</li>\n\t<li>\n\tMarkdown lexer treats line starts consistently to always highlight *foo* or similar at line start.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1766/\">Bug #1766</a>.\n\t</li>\n\t<li>\n\tOptimize marker redrawing by only drawing affected lines when markers shown in the text.\n\t</li>\n\t<li>\n\tOn Cocoa, timers and idling now work in modal dialogs. This also stops some crashes.\n\t</li>\n\t<li>\n\tOn Cocoa, fix crashes when deleting a ScintillaView. These crashes could occur when scrolling\n\tat the time the ScintillaView was deleted although there may have been other cases.\n\t</li>\n\t<li>\n\tOn GTK+ 2.x, fix height of lines in autocompletion lists.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1774/\">Bug #1774</a>.\n\t</li>\n\t<li>\n\tFix bug with SCI_LINEENDDISPLAY where the caret moved to the next document line instead of the\n\tend of the display line.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1772/\">Bug #1772</a>.\n\t</li>\n\t<li>\n\tReport error (SC_STATUS_FAILURE) when negative length passed to SCI_SETSTYLING.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1768/\">Bug #1768</a>.\n\t</li>\n\t<li>\n\tWhen SC_MARK_UNDERLINE is not assigned to a margin, stop drawing the whole line.\n\t</li>\n\t<li>\n\tWhen reverting an untitled document in SciTE, just clear it with no message about a file.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1764/\">Bug #1764</a>.\n\t</li>\n\t<li>\n\tSciTE on GTK+ allows use of Ctrl+A (Select All) inside find and replace strips.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1769/\">Bug #1769</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/scite361.zip\">Release 3.6.1</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 15 September 2015.\n\t</li>\n\t<li>\n\tThe oldest version of GTK+ supported now is 2.18 and for glib it is 2.22.\n\t</li>\n\t<li>\n\tOn GTK+, SC_CHARSET_OEM866 added to allow editing Russian files encoded in code page 866.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1019/\">Feature #1019.</a>\n\t</li>\n\t<li>\n\tOn Windows, reconversion is performed when requested by the IME.\n\t</li>\n\t<li>\n\tCoffeeScript lexer adds lexical class for instance properties and fixes some cases of regex highlighting.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1749/\">Bug #1749</a>.\n\t</li>\n\t<li>\n\tThe errorlist lexer understands some ANSI escape sequences to change foreground colour and intensity.\n\tThis is sufficient to colour diagnostic output from gcc and clang when -fdiagnostics-color set.\n\t</li>\n\t<li>\n\tThe errorlist lexer allows the line number to be 0 in GCC errors as some tools report whole file\n\terrors as line 0.\n\t</li>\n\t<li>\n\tMySql lexer fixes empty comments /**/ so the comment state does not continue.\n\t</li>\n\t<li>\n\tVHDL folder supports \"protected\" keyword.\n\t</li>\n\t<li>\n\tTreat CRLF line end as two characters in SCI_COUNTCHARACTERS.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1757/\">Bug #1757</a>.\n\t</li>\n\t<li>\n\tOn GTK+ 3.x, fix height of lines in autocompletion lists to match the font.\n\tSwitch from deprecated style calls to CSS styling.\n\tRemoved setting list colours on GTK+ 3.16+ as no longer appears needed.\n\t</li>\n\t<li>\n\tOn GTK+, avoid \"Invalid rectangle passed\" warning messages by never reporting the client\n\trectangle with a negative width or height.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1743/\">Bug #1743</a>.\n\t</li>\n\t<li>\n\tOn Cocoa, copy Sci_Position.h into the framework so clients can build.\n\t</li>\n\t<li>\n\tOn Cocoa fix bug with drag and drop that could lead to crashes.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1751/\">Bug #1751</a>.\n\t</li>\n\t<li>\n\tFix SciTE disk exhaustion bug by reporting failures when writing files.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1760/\">Bug #1760</a>.\n\t</li>\n\t<li>\n\tFix find strip in SciTE on Windows XP to be visible.\n\t</li>\n\t<li>\n\tSciTE on Windows changes the way it detects that a tool has finished executing to ensure all output data\n\tfrom the process is read.\n\t</li>\n\t<li>\n\tSciTE on Windows improves the time taken to read output from tools that produce a large amount\n\tof output by a factor of around 10.\n\t</li>\n\t<li>\n\tOn GTK+ the keyboard command for View | End of Line was changed to Ctrl+Shift+N\n\tto avoid clash with Search | Selection Add Next.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1750/\">Bug #1750</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite360.zip?download\">Release 3.6.0</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 3 August 2015.\n\t</li>\n\t<li>\n\tExternal interfaces use the Sci_Position and Sci_PositionU typedefs instead of int and unsigned int\n\tto allow for changes to a 64-bit interface on 64-bit platforms in the future.\n\tApplications and external lexers should start using the new type names so that\n\tthey will be compatible when the 64-bit change occurs.\n\tThere is also Sci_PositionCR (long) for use in the Sci_CharacterRange struct which will\n\talso eventually become 64-bit.\n\t</li>\n\t<li>\n\tMultiple selection now works over more key commands.\n\tThe new multiple-selection handling commands include horizontal movement and selection commands,\n\tline up and down movement and selection commands, word and line deletion commands, and\n\tline end insertion.\n\tThis change in behaviours is conditional on setting the SCI_SETADDITIONALSELECTIONTYPING property.\n\t</li>\n\t<li>\n\tAutocompletion lists send an SCN_AUTOCCOMPLETED notification after the text has been inserted.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1109/\">Feature #1109.</a>\n\t</li>\n\t<li>\n\tThe case mode style attribute can now be SC_CASE_CAMEL.\n\t</li>\n\t<li>\n\tThe Python lexer supports substyles for identifiers.\n\t</li>\n\t<li>\n\tSciTE adds support for substyles.\n\t</li>\n\t<li>\n\tSciTE's Export as RTF and Copy as RTF commands support UTF-8.\n\t</li>\n\t<li>\n\tSciTE can display autocompletion on all IME input with ime.autocomplete property.\n\t</li>\n\t<li>\n\tSciTE properties files now discard trailing white space on variable names.\n\t</li>\n\t<li>\n\tCalling SCI_SETIDENTIFIERS resets styling to ensure any added identifier are highlighted.\n\t</li>\n\t<li>\n\tAvoid candidate box randomly popping up away from edit pane with (especially\n\tJapanese) IME input.\n\t</li>\n\t<li>\n\tOn Cocoa fix problems with positioning of autocompletion lists near screen edge\n\tor under dock. Cancel autocompletion when window moved.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1740/\">Bug #1740</a>.\n\t</li>\n\t<li>\n\tFix drawing problem when control characters are in a hidden style as they then\n\thave a zero width rectangle to draw but modify that rectangle in a way that\n\tclears some pixels.\n\t</li>\n\t<li>\n\tReport error when attempt to resize buffer to more than 2GB with SC_STATUS_FAILURE.\n\t</li>\n\t<li>\n\tFix bug on GTK+ with scroll bars leaking.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1742/\">Bug #1742</a>.\n\t</li>\n\t<li>\n\tLexOthers.cxx file split into one file per lexer: LexBatch, LexDiff,\n\tLexErrorList, LexMake, LexNull, and LexProps.\n\t</li>\n\t<li>\n\tSciTE exporters handle styles &gt; 127 correctly now.\n\t</li>\n\t<li>\n\tSciTE on Windows can scale window element sizes based on the system DPI setting.\n\t</li>\n\t<li>\n\tSciTE implements find.in.files.close.on.find on all platforms, not just Windows.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite357.zip?download\">Release 3.5.7</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 20 June 2015.\n\t</li>\n\t<li>\n\tAdded SCI_MULTIPLESELECTADDNEXT to add the next occurrence of the main selection within the\n\ttarget to the set of selections as main. If the current selection is empty then select word around caret.\n\tSCI_MULTIPLESELECTADDEACH adds each occurrence of the main selection within the\n\ttarget to the set of selections.\n\t</li>\n\t<li>\n\tSciTE adds \"Selection Add Next\" and \"Selection Add Each\" commands to the Search menu.\n\t</li>\n\t<li>\n\tAdded SCI_ISRANGEWORD to determine if the parameters are at the start and end of a word.\n\t</li>\n\t<li>\n\tAdded SCI_TARGETWHOLEDOCUMENT to set the target to the whole document.\n\t</li>\n\t<li>\n\tVerilog lexer recognizes protected regions and the folder folds protected regions.\n\t</li>\n\t<li>\n\tA performance problem with markers when deleting many lines was fixed.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1733/\">Bug #1733</a>.\n\t</li>\n\t<li>\n\tOn Cocoa fix crash when ScintillaView destroyed if no autocompletion ever displayed.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1728/\">Bug #1728</a>.\n\t</li>\n\t<li>\n\tOn Cocoa fix crash in drag and drop.\n\t</li>\n\t<li>\n\tOn GTK+ 3.4+, when there are both horizontal and vertical scrollbars, draw the lower-right corner\n\tso that it does not appear black when text selected.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1611/\">Bug #1611</a>.\n\t</li>\n\t<li>\n\tFixed most calls deprecated in GTK+ 3.16. Does not fix style override calls\n\tas they are more complex.\n\t</li>\n\t<li>\n\tSciTE on GTK+ 3.x uses a different technique for highlighting the search strip when there is\n\tno match which is more compatible with future and past versions and different themes.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite356.zip?download\">Release 3.5.6</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 26 May 2015.\n\t</li>\n\t<li>\n\tOn Qt, use fractional positioning calls and avoid rounding to ensure consistency.\n\t</li>\n\t<li>\n\tSCI_TARGETASUTF8 and SCI_ENCODEDFROMUTF8 implemented on\n\tWin32 as well as GTK+ and Cocoa.\n\t</li>\n\t<li>\n\tC++ lexer fixes empty backquoted string.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1711/\">Bug #1711</a>.\n\t</li>\n\t<li>\n\tC++ lexer fixes #undef directive.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1719/\">Bug #1719</a>.\n\t</li>\n\t<li>\n\tFortran folder fixes handling of \"selecttype\" and \"selectcase\".\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1724/\">Bug #1724</a>.\n\t</li>\n\t<li>\n\tVerilog folder folds interface definitions.\n\t</li>\n\t<li>\n\tVHDL folder folds units declarations and fixes a case insensitivity bug with not treating \"IS\" the same as \"is\".\n\t</li>\n\t<li>\n\tFix bug when drawing text margins in buffered mode which would use default\n\tencoding instead of chosen encoding.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1703/\">Bug #1703</a>.\n\t</li>\n\t<li>\n\tFix bug with Korean Hanja conversions in DBCS encoding on Windows.\n\t</li>\n\t<li>\n\tFix for reading a UTF-16 file in SciTE where a non-BMP character is split over a read buffer boundary.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1710/\">Bug #1710</a>.\n\t</li>\n\t<li>\n\tFix bug on GTK+ 2.x for Windows where there was an ABI difference between\n\tcompiler version.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1726/\">Bug #1726</a>.\n\t</li>\n\t<li>\n\tFix undo bug on Cocoa that could lose data..\n\t</li>\n\t<li>\n\tFix link error on Windows when SCI_NAMESPACE used.\n\t</li>\n\t<li>\n\tFix exporting from SciTE when using Scintillua for lexing.\n\t</li>\n\t<li>\n\tSciTE does not report twice that a search string can not be found when \"Replace\" pressed.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1716/\">Bug #1716</a>.\n\t</li>\n\t<li>\n\tSciTE on GTK+ 3.x disables arrow in search combo when no entries.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1717/\">Bug #1717</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite355.zip?download\">Release 3.5.5</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 17 April 2015.\n\t</li>\n\t<li>\n\tScintilla on Windows is now always a wide character window so SCI_SETKEYSUNICODE has no effect\n\tand SCI_GETKEYSUNICODE always returns true. These APIs are deprecated and should not be called.\n\t</li>\n\t<li>\n\tThe wxWidgets-specific ascent member of Font has been removed which breaks\n\tcompatibility with current wxStyledTextCtrl.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1682/\">Bug #1682</a>.\n\t</li>\n\t<li>\n\tIME on Qt supports multiple carets and behaves more like other platforms.\n\t</li>\n\t<li>\n\tAlways use inline IME on GTK+ for Korean.\n\t</li>\n\t<li>\n\tSQL lexer fixes handling of '+' and '-' in numbers so the '-' in '1-1' is seen as an operator and for\n\t'1--comment' the comment is recognized.\n\t</li>\n\t<li>\n\tTCL lexer reverts change to string handling.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1642/\">Bug #1642</a>.\n\t</li>\n\t<li>\n\tVerilog lexer fixes bugs with macro styling.\n\tVerilog folder fixes bugs with `end completing an `if* instead of `endif and fold.at.else, and implements\n\tfolding at preprocessor `else.\n\t</li>\n\t<li>\n\tVHDL lexer supports extended identifiers.\n\t</li>\n\t<li>\n\tFix bug on Cocoa where the calltip would display incorrectly when\n\tswitching calltips and the new calltip required a taller window.\n\t</li>\n\t<li>\n\tFix leak on Cocoa with autocompletion lists.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1706/\">Bug #1706</a>.\n\t</li>\n\t<li>\n\tFix potential crash on Cocoa with drag and drop.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1709/\">Bug #1709</a>.\n\t</li>\n\t<li>\n\tFix bug on Windows when compiling with MinGW-w64 which caused text to not be drawn\n\twhen in wrap mode.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1705/\">Bug #1705</a>.\n\t</li>\n\t<li>\n\tFix SciTE bug with missing file open filters and add hex to excluded set of properties files so that its\n\tsettings don't appear.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1707/\">Bug #1707</a>.\n\t</li>\n\t<li>\n\tFix SciTE bug where files without extensions like \"makefile\" were not highlighted correctly.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite354.zip?download\">Release 3.5.4</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 8 March 2015.\n\t</li>\n\t<li>\n\tIndicators may have a different colour and style when the mouse is over them or the caret is moved into them.\n\t</li>\n\t<li>\n\tAn indicator may display in a large variety of colours with the SC_INDICFLAG_VALUEFORE\n\tflag taking the colour from the indicator's value, which may differ for every character, instead of its\n\tforeground colour attribute.\n\t</li>\n\t<li>\n\tOn Cocoa, additional IME methods implemented so that more commands are enabled.\n\tFor Japanese: Reverse Conversion, Convert to Related Character, and Search Similar Kanji\n\tcan now be performed.\n\tThe global definition hotkey Command+Control+D and the equivalent three finger tap gesture\n\tcan be used.\n\t</li>\n\t<li>\n\tMinimum version of Qt supported is now 4.8 due to the use of QElapsedTimer::nsecsElapsed.\n\t</li>\n\t<li>\n\tOn Windows, for Korean, the VK_HANJA key is implemented to choose Hanja for Hangul and\n\tto convert from Hanja to Hangul.\n\t</li>\n\t<li>\n\tC++ lexer adds lexer.cpp.verbatim.strings.allow.escapes option that allows verbatim (@\") strings\n\tto contain escape sequences. This should remain off (0) for C# and be turned on (1) for Objective C.\n\t</li>\n\t<li>\n\tRust lexer accepts new 'is'/'us' integer suffixes instead of 'i'/'u'.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1098/\">Bug #1098</a>.\n\t</li>\n\t<li>\n\tRuby folder can fold multiline comments.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1697/\">Bug #1697</a>.\n\t</li>\n\t<li>\n\tSQL lexer fixes a bug with the q-quote operator.\n\t</li>\n\t<li>\n\tTCL lexer fixes a bug with some strings.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1642/\">Bug #1642</a>.\n\t</li>\n\t<li>\n\tVerilog lexer handles escaped identifiers that begin with \\ and end with space like \\reset* .\n\tVerilog folder fixes one bug with inconsistent folding when fold.comment is on and another\n\twith typedef class statements creating a fold point, expecting an endclass statement.\n\t</li>\n\t<li>\n\tVHDL folder fixes hang in folding when document starts with \"entity\".\n\t</li>\n\t<li>\n\tAdd new indicators INDIC_COMPOSITIONTHIN, INDIC_FULLBOX, and INDIC_TEXTFORE.\n\tINDIC_COMPOSITIONTHIN is a thin underline that mimics the appearance of non-target segments in OS X IME.\n\tINDIC_FULLBOX is similar to INDIC_STRAIGHTBOX but covers the entire character area which means that\n\tindicators with this style on contiguous lines may touch. INDIC_TEXTFORE changes the text foreground colour.\n\t</li>\n\t<li>\n\tFix adaptive scrolling speed for GTK+ on OS X with GTK Quartz backend (as opposed to X11 backend).\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1696/\">Bug #1696</a>.\n\t</li>\n\t<li>\n\tFix position of autocompletion and calltips on Cocoa when there were two screens stacked vertically.\n\t</li>\n\t<li>\n\tFix crash in SciTE when saving large files in background when closing application.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1691/\">Bug #1691</a>.\n\t</li>\n\t<li>\n\tFix decoding of MSVC warnings in SciTE so that files in the C:\\Program Files (x86)\\ directory can be opened.\n\tThis is a common location of system include files.\n\t</li>\n\t<li>\n\tFix compilation failure of C++11 &lt;regex&gt; on Windows using gcc.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite353.zip?download\">Release 3.5.3</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 20 January 2015.\n\t</li>\n\t<li>\n\tSupport removed for Windows 95, 98, and ME.\n\t</li>\n\t<li>\n\tLexers added for Motorola S-Record files, Intel hex files, and Tektronix extended hex files with folding for Intel hex files.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1091/\">Feature #1091.</a>\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1093/\">Feature #1093.</a>\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1095/\">Feature #1095.</a>\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1096/\">Feature #1096.</a>\n\t</li>\n\t<li>\n\tC++ folder allows folding on square brackets '['.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1087/\">Feature #1087.</a>\n\t</li>\n\t<li>\n\tShell lexer fixes three issues with here-documents.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1672/\">Bug #1672</a>.\n\t</li>\n\t<li>\n\tVerilog lexer highlights doc comment keywords; has separate styles for input, output, and inout ports\n\t(lexer.verilog.portstyling); fixes a bug in highlighting numbers; can treat upper-case identifiers as\n\tkeywords (lexer.verilog.allupperkeywords); and can use different styles for code that is inactive due\n\tto preprocessor commands (lexer.verilog.track.preprocessor, lexer.verilog.update.preprocessor).\n\t</li>\n\t<li>\n\tWhen the calltip window is taller than the Scintilla window, leave it in a\n\tposition that avoids overlapping the Scintilla text.\n\t</li>\n\t<li>\n\tWhen a text margin is displayed, for annotation lines, use the background colour of the base line.\n\t</li>\n\t<li>\n\tOn Windows GDI, assume font names are encoded in UTF-8. This matches the Direct2D code path.\n\t</li>\n\t<li>\n\tFix paste for GTK+ on OS X.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1677/\">Bug #1677</a>.\n\t</li>\n\t<li>\n\tReverted a fix on Qt where Qt 5.3 has returned to the behaviour of 4.x.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1575/\">Bug #1575</a>.\n\t</li>\n\t<li>\n\tWhen the mouse is on the line between margin and text changed to treat as within text.\n\tThis makes the PLAT_CURSES character cell platform work better.\n\t</li>\n\t<li>\n\tFix a crash in SciTE when the command line is just \"-close:\".\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1675/\">Bug #1675</a>.\n\t</li>\n\t<li>\n\tFix unexpected dialog in SciTE on Windows when the command line has a quoted filename then ends with a space.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1673/\">Bug #1673</a>.\n\t</li>\n\t<li>\n\tOn Windows and GTK+, use indicators for inline IME.\n\t</li>\n\t<li>\n\tSciTE shuts down quicker when there is no user-written OnClose function and no directors are attached.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite352.zip?download\">Release 3.5.2</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 2 December 2014.\n\t</li>\n\t<li>\n\tFor OS X Cocoa switch C++ runtime to libc++ to enable use of features that will never\n\tbe added to libstdc++ including those part of C++11.\n\tScintilla will now run only on OS X 10.7 or later and only in 64-bit mode.\n\t</li>\n\t<li>\n\tInclude support for using C++11 &lt;regex&gt; for regular expression searches.\n\tEnabling this requires rebuilding Scintilla with a non-default option.\n\tThis is a provisional feature and may change API before being made permanent.\n\t</li>\n\t<li>\n\tAllocate indicators used for Input Method Editors after 31 which was the previous limit of indicators to\n\tensure no clash between the use of indicators for IME and for the application.\n\t</li>\n\t<li>\n\tANNOTATION_INDENTED added which is similar to ANNOTATION_BOXED in terms of positioning\n\tbut does not show a border.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1086/\">Feature #1086.</a>\n\t</li>\n\t<li>\n\tAllow platform overrides for drawing tab arrows, wrap markers, and line markers.\n\tSize of double click detection area is a variable.\n\tThese enable better visuals and behaviour for PLAT_CURSES as it is character cell based.\n\t</li>\n\t<li>\n\tCoffeeScript lexer fixes \"/*\" to not be a comment.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1420/\">Bug #1420</a>.\n\t</li>\n\t<li>\n\tVHDL folder fixes \"block\" keyword.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1664/\">Bug #1664</a>.\n\t</li>\n\t<li>\n\tPrevent caret blinking when holding down Delete key.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1657/\">Bug #1657</a>.\n\t</li>\n\t<li>\n\tOn Windows, allow right click selection in popup menu.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1080/\">Feature #1080.</a>\n\t</li>\n\t<li>\n\tOn Windows, only call ShowCaret in GDI mode as it interferes with caret drawing when using Direct2D.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1643/\">Bug #1643</a>.\n\t</li>\n\t<li>\n\tOn Windows, another DirectWrite mode SC_TECHNOLOGY_DIRECTWRITEDC added\n\twhich may avoid drawing failures in some circumstances by drawing into a GDI DC.\n\tThis feature is provisional and may be changed or removed if a better solution is found.\n\t</li>\n\t<li>\n\tOn Windows, avoid processing mouse move events where the mouse has not moved as these can\n\tcause unexpected dwell start notifications.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1670/\">Bug #1670</a>.\n\t</li>\n\t<li>\n\tFor GTK+ on Windows, avoid extra space when pasting from external application.\n\t</li>\n\t<li>\n\tOn GTK+ 2.x allow Scintilla to be used inside tool tips by changing when preedit window created.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1662/\">Bug #1662</a>.\n\t</li>\n\t<li>\n\tSupport MinGW compilation under Linux.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1077/\">Feature #1077.</a>\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite351.zip?download\">Release 3.5.1</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 30 September 2014.\n\t</li>\n\t<li>\n\tBibTeX lexer added.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1071/\">Feature #1071.</a>\n\t</li>\n\t<li>\n\tSQL lexer supports the q-quote operator as SCE_SQL_QOPERATOR(24).\n\t</li>\n\t<li>\n\tVHDL lexer supports block comments.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1527/\">Bug #1527</a>.\n\t</li>\n\t<li>\n\tVHDL folder fixes case where \"component\" used before name.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/613/\">Bug #613</a>.\n\t</li>\n\t<li>\n\tRestore fractional pixel tab positioning which was truncated to whole pixels in 3.5.0.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1652/\">Bug #1652</a>.\n\t</li>\n\t<li>\n\tAllow choice between windowed and inline IME on some platforms.\n\t</li>\n\t<li>\n\tOn GTK+ cache autocomplete window to avoid platform bug where windows\n\twere sometimes lost.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1649/\">Bug #1649</a>.\n\t</li>\n\t<li>\n\tOn GTK+ size autocomplete window more accurately.\n\t</li>\n\t<li>\n\tOn Windows only unregister windows classes registered.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1639/\">Bug #1639</a>.\n\t</li>\n\t<li>\n\tOn Windows another DirectWrite mode SC_TECHNOLOGY_DIRECTWRITERETAIN added\n\twhich may avoid drawing failures on some cards and drivers.\n\tThis feature is provisional and may be changed or removed if a better solution is found.\n\t</li>\n\t<li>\n\tOn Windows support the Visual Studio 2010+ clipboard format that indicates a line copy.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1636/\">Bug #1636</a>.\n\t</li>\n\t<li>\n\tSciTE session files remember the scroll position.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite350.zip?download\">Release 3.5.0</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 13 August 2014.\n\t</li>\n\t<li>\n\tText may share space vertically so that extreme ascenders and descenders are\n\tnot cut off by calling SCI_SETPHASESDRAW(SC_PHASES_MULTIPLE).\n\t</li>\n\t<li>\n\tSeparate timers are used for each type of periodic activity and they are turned on and off\n\tas required. This saves power as there are fewer wake ups.\n\tOn recent releases of OS X Cocoa and Windows, coalescing timers are used to further\n\tsave power.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1086/\">Bug #1086</a>.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1532/\">Bug #1532</a>.\n\t</li>\n\t<li>\n\tExplicit tab stops may be set for each line.\n\t</li>\n\t<li>\n\tOn Windows and GTK+, when using Korean input methods, IME composition is moved from a\n\tseparate window into the Scintilla window.\n\t</li>\n\t<li>\n\tSciTE adds a \"Clean\" command to the \"Tools\" menu which is meant to be bound to a command like\n\t\"make clean\".\n\t</li>\n\t<li>\n\tLexer added for Windows registry files.\n\t</li>\n\t<li>\n\tHTML lexer fixes a crash with SGML after a Mako comment.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1622/\">Bug #1622</a>.\n\t</li>\n\t<li>\n\tKiXtart lexer adds a block comment state.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1053/\">Feature #1053.</a>\n\t</li>\n\t<li>\n\tMatlab lexer fixes transpose operations like \"X{1}'\".\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1629/\">Bug #1629</a>.\n\t</li>\n\t<li>\n\tRuby lexer fixes bugs with the syntax of symbols including allowing a symbol to end with '?'.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1627/\">Bug #1627</a>.\n\t</li>\n\t<li>\n\tRust lexer supports byte string literals, naked CR can be escaped in strings, and files starting with\n\t\"#![\" are not treated as starting with a hashbang comment.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1063/\">Feature #1063.</a>\n\t</li>\n\t<li>\n\tBug fixed where style data was stale when deleting a rectangular selection.\n\t</li>\n\t<li>\n\tBug fixed where annotations disappeared when SCI_CLEARDOCUMENTSTYLE called.\n\t</li>\n\t<li>\n\tBug fixed where selection not redrawn after SCI_DELWORDRIGHT.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1633/\">Bug #1633</a>.\n\t</li>\n\t<li>\n\tChange the function prototypes to be complete for functions exported as \"C\".\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1618/\">Bug #1618</a>.\n\t</li>\n\t<li>\n\tFix a memory leak on GTK+ with autocompletion lists.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1638/\">Bug #1638</a>.\n\t</li>\n\t<li>\n\tOn GTK+, use the full character width for the overstrike caret for multibyte characters.\n\t</li>\n\t<li>\n\tOn Qt, set list icon size to largest icon. Add padding on OS X.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1634/\">Bug #1634</a>.\n\t</li>\n\t<li>\n\tOn Qt, fix building on FreeBSD 9.2.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1635/\">Bug #1635</a>.\n\t</li>\n\t<li>\n\tOn Qt, add a get_character method on the document.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1064/\">Feature #1064.</a>\n\t</li>\n\t<li>\n\tOn Qt, add SCI_* for methods to ScintillaConstants.py.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1065/\">Feature #1065.</a>\n\t</li>\n\t<li>\n\tSciTE on GTK+ crash fixed with Insert Abbreviation command.\n\t</li>\n\t<li>\n\tFor SciTE with read-only files and are.you.sure=0 reenable choice to save to another\n\tlocation when using Save or Close commands.\n\t</li>\n\t<li>\n\tFix SciTE bug where toggle bookmark did not work after multiple lines with bookmarks merged.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1617/\">Bug #1617</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite344.zip?download\">Release 3.4.4</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 3 July 2014.\n\t</li>\n\t<li>\n\tStyle byte indicators removed. They were deprecated in 2007. Standard indicators should be used instead.\n\tSome elements used by lexers no longer take number of bits or mask arguments so lexers may need to be\n\tupdated for LexAccessor::StartAt,  LexAccessor::SetFlags (removed),  LexerModule::LexerModule.\n\t</li>\n\t<li>\n\tWhen multiple selections are active, autocompletion text may be inserted at each selection with new\n\tSCI_AUTOCSETMULTI method.\n\t</li>\n\t<li>\n\tC++ lexer fixes crash for \"#define x(\".\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1614/\">Bug #1614</a>.\n\t</li>\n\t<li>\n\tC++ lexer fixes raw string recognition so that R\"xxx(blah)xxx\" is styled as SCE_C_STRINGRAW.\n\t</li>\n\t<li>\n\tThe Postscript lexer no longer marks token edges with indicators as this used style byte indicators.\n\t</li>\n\t<li>\n\tThe Scriptol lexer no longer displays indicators for poor indentation as this used style byte indicators.\n\t</li>\n\t<li>\n\tTCL lexer fixes names of keyword sets.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1615/\">Bug #1615</a>.\n\t</li>\n\t<li>\n\tShell lexer fixes fold matching problem caused by \"&lt;&lt;&lt;\".\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1605/\">Bug #1605</a>.\n\t</li>\n\t<li>\n\tFix bug where indicators were not removed when fold highlighting on.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1604/\">Bug #1604</a>.\n\t</li>\n\t<li>\n\tFix bug on Cocoa where emoji were treated as being zero width.\n\t</li>\n\t<li>\n\tFix crash on GTK+ with Ubuntu 12.04 and overlay scroll bars.\n\t</li>\n\t<li>\n\tAvoid creating a Cairo context when measuring text on GTK+ as future versions of GTK+\n\tmay prohibit calling gdk_cairo_create except inside drawing handlers. This prohibition may\n\tbe required on Wayland.\n\t</li>\n\t<li>\n\tOn Cocoa, the registerNotifyCallback method is now marked as deprecated so client code that\n\tuses it will display an error message.\n\tClient code should use the delegate mechanism or subclassing instead.\n\tThe method will be removed in the next version.\n\t</li>\n\t<li>\n\tOn Cocoa, package Scintilla more in compliance with platform conventions.\n\tOnly publish public headers in the framework headers directory.\n\tOnly define the Scintilla namespace in Scintilla.h when compiling as C++.\n\tUse the Cocoa NS_ENUM and NS_OPTIONS macros for exposed enumerations.\n\tHide internal methods from public headers.\n\tThese changes are aimed towards publishing Scintilla as a module which will allow it to\n\tbe used from the Swift programming language, although more changes will be needed here.\n\t</li>\n\t<li>\n\tFix crash in SciTE when stream comment performed at line end.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1610/\">Bug #1610</a>.\n\t</li>\n\t<li>\n\tFor SciTE on Windows, display error message when common dialogs fail.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/156/\">Bug #156</a>.\n\t</li>\n\t<li>\n\tFor SciTE on GTK+ fix bug with initialization of toggle buttons in find and replace strips.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1612/\">Bug #1612</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite343.zip?download\">Release 3.4.3</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 27 May 2014.\n\t</li>\n\t<li>\n\tFix hangs and crashes in DLL at shutdown on Windows when using Direct2D.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite342.zip?download\">Release 3.4.2</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 22 May 2014.\n\t</li>\n\t<li>\n\tInsertions can be filtered or modified by calling SCI_CHANGEINSERTION inside a handler for\n\tSC_MOD_INSERTCHECK.\n\t</li>\n\t<li>\n\tDMIS lexer added. DMIS is a language for coordinate measuring machines.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1049/\">Feature #1049.</a>\n\t</li>\n\t<li>\n\tLine state may be displayed in the line number margin to aid in debugging lexing and folding with\n\tSC_FOLDFLAG_LINESTATE (128).\n\t</li>\n\t<li>\n\tC++ lexer understands more preprocessor statements. #if defined SYMBOL is understood.\n\tSome macros with arguments can be understood and these may be predefined in keyword set 4\n\t(keywords5 for SciTE)\n\twith syntax similar to CHECKVERSION(x)=(x&lt;3).\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1051/\">Feature #1051.</a>\n\t</li>\n\t<li>\n\tC++ lexer can highlight task marker keywords in comments as SCE_C_TASKMARKER.\n\t</li>\n\t<li>\n\tC++ lexer can optionally highlight escape sequences in strings as SCE_C_ESCAPESEQUENCE.\n\t</li>\n\t<li>\n\tC++ lexer supports Go back quoted raw string literals with lexer.cpp.backquoted.strings option.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1047/\">Feature #1047.</a>\n\t</li>\n\t<li>\n\tSciTE performs word and search match highlighting as an idle task to improve interactivity\n\tand allow use of these features on large files.\n\t</li>\n\t<li>\n\tBug fixed on Cocoa where previous caret lines were visible.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1593/\">Bug #1593</a>.\n\t</li>\n\t<li>\n\tBug fixed where caret remained invisible when period set to 0.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1592/\">Bug #1592</a>.\n\t</li>\n\t<li>\n\tFixed display flashing when scrolling with GTK+ 3.10.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1567/\">Bug #1567</a>.\n\t</li>\n\t<li>\n\tFixed calls and constants deprecated in GTK+ 3.10.\n\t</li>\n\t<li>\n\tFixed bug on Windows where WM_GETTEXT did not provide data in UTF-16 for Unicode window.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/685/\">Bug #685</a>.\n\t</li>\n\t<li>\n\tFor SciTE, protect access to variables used by threads with a mutex to prevent data races.\n\t</li>\n\t<li>\n\tFor SciTE on GTK+ fix thread object leaks.\n\tDisplay the version of GTK+ compiled against in the about box.\n\t</li>\n\t<li>\n\tFor SciTE on GTK+ 3.10, fix the size of the tab bar's content and use\n\tfreedesktop.org standard icon names where possible.\n\t</li>\n\t<li>\n\tFor SciTE on Windows, fix bug where invoking help resubmitted the\n\trunning program.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/272/\">Bug #272</a>.\n\t</li>\n\t<li>\n\tSciTE's highlight current word feature no longer matches the selection when it contains space.\n\t</li>\n\t<li>\n\tFor building SciTE in Visual C++, the win\\SciTE.vcxproj project file should be used.\n\tThe boundscheck directory and its project and solution files have been removed.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite341.zip?download\">Release 3.4.1</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 1 April 2014.\n\t</li>\n\t<li>\n\tDisplay Unicode line ends as [LS], [PS], and [NEL] blobs.\n\t</li>\n\t<li>\n\tBug fixed where cursor down failed on wrapped lines.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1585/\">Bug #1585</a>.\n\t</li>\n\t<li>\n\tCaret positioning changed a little to appear inside characters less often by\n\trounding the caret position to the pixel grid instead of truncating.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1588/\">Bug #1588</a>.\n\t</li>\n\t<li>\n\tBug fixed where automatic indentation wrong when caret in virtual space.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1586/\">Bug #1586</a>.\n\t</li>\n\t<li>\n\tBug fixed on Windows where WM_LBUTTONDBLCLK was no longer sent to window.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1587/\">Bug #1587</a>.\n\t</li>\n\t<li>\n\tBug fixed with SciTE on Windows XP where black stripes appeared inside the find and\n\treplace strips.\n\t</li>\n\t<li>\n\tCrash fixed in SciTE with recursive properties files.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1507/\">Bug #1507</a>.\n\t</li>\n\t<li>\n\tBug fixed with SciTE where Ctrl+E before an unmatched end brace jumps to file start.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/315/\">Bug #315</a>.\n\t</li>\n\t<li>\n\tFixed scrolling on Cocoa to avoid display glitches and be smoother.\n\t</li>\n\t<li>\n\tFixed crash on Cocoa when character composition used when autocompletion list active.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite340.zip?download\">Release 3.4.0</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 22 March 2014.\n\t</li>\n\t<li>\n\tThe Unicode line ends and substyles features added as provisional in 3.2.5 are now finalized.\n\tThere are now no provisional features.\n\t</li>\n\t<li>\n\tAdded wrap mode SC_WRAP_WHITESPACE which only wraps on whitespace, not on style changes.\n\t</li>\n\t<li>\n\tSciTE find and replace strips can perform incremental searching and temporary highlighting of all\n\tmatches with the find.strip.incremental, replace.strip.incremental, and find.indicator.incremental settings.\n\t</li>\n\t<li>\n\tSciTE default settings changed to use strips for find and replace and to draw with Direct2D and\n\tDirectWrite on Windows.\n\t</li>\n\t<li>\n\tSciTE on Windows scales image buttons on the find and replace strips to match the current system scale factor.\n\t</li>\n\t<li>\n\tAdditional assembler lexer variant As(SCLEX_AS) for Unix assembly code which uses '#' for comments and\n\t';' to separate statements.\n\t</li>\n\t<li>\n\tFix Coffeescript lexer for keyword style extending past end of word.\n\tAlso fixes styling 0...myArray.length all as a number.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1583/\">Bug #1583</a>.\n\t</li>\n\t<li>\n\tFix crashes and other bugs in Fortran folder by removing folding of do-label constructs.\n\t</li>\n\t<li>\n\tDeleting a whole line deletes the annotations on that line instead of the annotations on the next line.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1577/\">Bug #1577</a>.\n\t</li>\n\t<li>\n\tChanged position of tall calltips to prefer lower half of screen to cut off end instead of start.\n\t</li>\n\t<li>\n\tFix Qt bug where double click treated as triple click.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1575/\">Bug #1575</a>.\n\t</li>\n\t<li>\n\tOn Qt, selecting an item in an autocompletion list that is not currently visible positions it at the top.\n\t</li>\n\t<li>\n\tFix bug on Windows when resizing autocompletion list with only short strings caused the list to move.\n\t</li>\n\t<li>\n\tOn Cocoa reduce scrollable height by one line to fix bugs with moving caret\n\tup or down.\n\t</li>\n\t<li>\n\tOn Cocoa fix calltips which did not appear when they were created in an off-screen position.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite339.zip?download\">Release 3.3.9</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 31 January 2014.\n\t</li>\n\t<li>\n\tFix 3.3.8 bug where external lexers became inaccessible.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1574/\">Bug #1574</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite338.zip?download\">Release 3.3.8</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 28 January 2014.\n\t</li>\n\t<li>\n\tDropSelectionN API added to drop a selection from a multiple selection.\n\t</li>\n\t<li>\n\tCallTipSetPosStart API added to change the position at which backspacing removes the calltip.\n\t</li>\n\t<li>\n\tSC_MARK_BOOKMARK marker symbol added which looks like bookmark ribbons used in\n\tbook reading applications.\n\t</li>\n\t<li>\n\tBasic lexer highlights hex, octal, and binary numbers in FreeBASIC which use the prefixes\n\t&amp;h, &amp;o and &amp;b respectively.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1041/\">Feature #1041.</a>\n\t</li>\n\t<li>\n\tC++ lexer fixes bug where keyword followed immediately by quoted string continued\n\tkeyword style.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1564/\">Bug #1564</a>.\n\t</li>\n\t<li>\n\tMatlab lexer treats '!' differently for Matlab and Octave languages.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1571/\">Bug #1571</a>.\n\t</li>\n\t<li>\n\tRust lexer improved with nested comments, more compliant doc-comment detection,\n\toctal literals, NUL characters treated as valid, and highlighting of raw string literals and float literals fixed.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1038/\">Feature #1038.</a>\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1570/\">Bug #1570</a>.\n\t</li>\n\t<li>\n\tOn Qt expose the EOLMode on the document object.\n\t</li>\n\t<li>\n\tFix hotspot clicking where area was off by half a character width.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1562/\">Bug #1562</a>.\n\t</li>\n\t<li>\n\tTweaked scroll positioning by either 2 pixels or 1 pixel when caret is at left or right of view\n\tto ensure caret is inside visible area.\n\t</li>\n\t<li>\n\tSend SCN_UPDATEUI with SC_UPDATE_SELECTION for Shift+Tab inside text.\n\t</li>\n\t<li>\n\tOn Windows update the system caret position when scrolling to help screen readers\n\tsee the scroll quickly.\n\t</li>\n\t<li>\n\tOn Cocoa, GTK+, and Windows/Direct2D draw circles more accurately so that\n\tcircular folding margin markers appear circular, of consistent size, and centred.\n\tMake SC_MARK_ARROWS drawing more even.\n\tFix corners of SC_MARK_ROUNDRECT with Direct2D to be similar to other platforms.\n\t</li>\n\t<li>\n\tSciTE uses a bookmark ribbon symbol for bookmarks as it scales better to higher resolutions\n\tthan the previous blue gem bitmap.\n\t</li>\n\t<li>\n\tSciTE will change the width of margins while running when the margin.width and fold.margin.width\n\tproperties are changed.\n\t</li>\n\t<li>\n\tSciTE on Windows can display a larger tool bar with the toolbar.large property.\n\t</li>\n\t<li>\n\tSciTE displays a warning message when asked to open a directory.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1568/\">Bug #1568</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite337.zip?download\">Release 3.3.7</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 12 December 2013.\n\t</li>\n\t<li>\n\tLexer added for DMAP language.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1026/\">Feature #1026.</a>\n\t</li>\n\t<li>\n\tBasic lexer supports multiline comments in FreeBASIC.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1023/\">Feature #1023.</a>\n\t</li>\n\t<li>\n\tBash lexer allows '#' inside words..\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1553/\">Bug #1553</a>.\n\t</li>\n\t<li>\n\tC++ lexer recognizes C++11 user-defined literals and applies lexical class SCE_C_USERLITERAL.\n\t</li>\n\t<li>\n\tC++ lexer allows single quote characters as digit separators in numeric literals like 123'456 as this is\n\tincluded in C++14.\n\t</li>\n\t<li>\n\tC++ lexer fixes bug with #include statements without \" or &gt; terminating filename.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1538/\">Bug #1538</a>.\n\t</li>\n\t<li>\n\tC++ lexer fixes split of Doxygen keywords @code{.fileExtension} and @param[in,out].\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1551/\">Bug #1551</a>.\n\t</li>\n\t<li>\n\tC++ lexer styles Doxygen keywords at end of document.\n\t</li>\n\t<li>\n\tCmake lexer fixes bug with empty comments.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1550/\">Bug #1550</a>.\n\t</li>\n\t<li>\n\tFortran folder improved. Treats \"else\" as fold header.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/962/\">Feature #962.</a>\n\t</li>\n\t<li>\n\tFix bug with adjacent instances of the same indicator with different values where only the first was drawn.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1560/\">Bug #1560</a>.\n\t</li>\n\t<li>\n\tFor DirectWrite, use the GDI ClearType gamma value for SC_EFF_QUALITY_LCD_OPTIMIZED as\n\tthis results in text that is similar in colour intensity to GDI.\n\tFor the duller default DirectWrite ClearType text appearance, use SC_EFF_QUALITY_DEFAULT.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/887/\">Feature #887.</a>\n\t</li>\n\t<li>\n\tFix another problem with drawing on Windows with Direct2D when returning from lock screen.\n\tThe whole window is redrawn as just redrawing the initially required area left other areas black.\n\t</li>\n\t<li>\n\tWhen scroll width is tracked, take width of annotation lines into account.\n\t</li>\n\t<li>\n\tFor Cocoa on OS X 10.9, responsive scrolling is supported.\n\t</li>\n\t<li>\n\tOn Cocoa, apply font quality setting to line numbers.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1544/\">Bug #1544</a>.\n\t</li>\n\t<li>\n\tOn Cocoa, clicking in margin now sets focus.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1542/\">Bug #1542</a>.\n\t</li>\n\t<li>\n\tOn Cocoa, correct cursor displayed in margin after showing dialog.\n\t</li>\n\t<li>\n\tOn Cocoa, multipaste mode now works.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1541/\">Bug #1541</a>.\n\t</li>\n\t<li>\n\tOn GTK+, chain up to superclass finalize so that all finalization is performed.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1549/\">Bug #1549</a>.\n\t</li>\n\t<li>\n\tOn GTK+, fix horizontal scroll bar range to not be double the needed width.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1546/\">Bug #1546</a>.\n\t</li>\n\t<li>\n\tOn OS X GTK+, report control key as SCI_META for mouse down events.\n\t</li>\n\t<li>\n\tOn Qt, bug fixed with drawing of scrollbars, where previous contents were not drawn over with some\n\tthemes.\n\t</li>\n\t<li>\n\tOn Qt, bug fixed with finding monitor rectangle which could lead to autocomplete showing at wrong location.\n\t</li>\n\t<li>\n\tSciTE fix for multiple message boxes when failing to save a file with save.on.deactivate.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1540/\">Bug #1540</a>.\n\t</li>\n\t<li>\n\tSciTE on GTK+ fixes SIGCHLD handling so that Lua scripts can determine the exit status of processes\n\tthey start.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1557/\">Bug #1557</a>.\n\t</li>\n\t<li>\n\tSciTE on Windows XP fixes bad display of find and replace values when using strips.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite336.zip?download\">Release 3.3.6</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 15 October 2013.\n\t</li>\n\t<li>\n\tAdded functions to help convert between substyles and base styles and between secondary and primary styles.\n\tSCI_GETSTYLEFROMSUBSTYLE finds the base style of substyles.\n\tCan be used to treat all substyles of a style equivalent to that style.\n\tSCI_GETPRIMARYSTYLEFROMSTYLE finds the primary style of secondary styles.\n\tStyleFromSubStyle and PrimaryStyleFromStyle methods were added to ILexerWithSubStyles so each lexer can implement these.\n\t</li>\n\t<li>\n\tLexer added for Rust language.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1024/\">Feature #1024.</a>\n\t</li>\n\t<li>\n\tAvoid false matches in errorlist lexer which is used for the SciTE output pane\n\tby stricter checking of ctags lines.\n\t</li>\n\t<li>\n\tPerl lexer fixes bugs with multi-byte characters, including in HEREDOCs and PODs.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1528/\">Bug #1528</a>.\n\t</li>\n\t<li>\n\tSQL folder folds 'create view' statements.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1020/\">Feature #1020.</a>\n\t</li>\n\t<li>\n\tVisual Prolog lexer updated with better support for string literals and Unicode.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1025/\">Feature #1025.</a>\n\t</li>\n\t<li>\n\tFor SCI_SETIDENTIFIERS, \\t, \\r, and \\n are allowed as well as space between identifiers.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1521/\">Bug #1521</a>.\n\t</li>\n\t<li>\n\tGaining and losing focus is now reported as a notification with the code set to SCN_FOCUSIN\n\tor SCN_FOCUSOUT.\n\tThis allows clients to uniformly use notifications instead of commands.\n\tSince there is no longer a need for commands they will be deprecated in a future version.\n\tClients should switch any code that currently uses SCEN_SETFOCUS or SCEN_KILLFOCUS.\n\t</li>\n\t<li>\n\tOn Cocoa, clients should use the delegate mechanism or subclass ScintillaView in preference\n\tto registerNotifyCallback: which will be deprecated in the future.\n\t</li>\n\t<li>\n\tOn Cocoa, the ScintillaView.h header hides internal implementation details from Platform.h and ScintillaCocoa.h.\n\tInnerView was renamed to SCIContentView and MarginView was renamed to SCIMarginView.\n\tdealloc removed from @interface.\n\t</li>\n\t<li>\n\tOn Cocoa, clients may customize SCIContentView by subclassing both SCIContentView and ScintillaView\n\tand implementing the contentViewClass class method on the ScintillaView subclass to return the class of\n\tthe SCIContentView subclass.\n\t</li>\n\t<li>\n\tOn Cocoa, fixed appearance of alpha rectangles to use specified alpha and colour for outline as well as corner size.\n\tThis makes INDIC_STRAIGHTBOX and INDIC_ROUNDBOX look correct.\n\t</li>\n\t<li>\n\tOn Cocoa, memory leak fixed for MarginView.\n\t</li>\n\t<li>\n\tOn Cocoa, make drag and drop work when destination view is empty.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1534/\">Bug #1534</a>.\n\t</li>\n\t<li>\n\tOn Cocoa, drag image fixed when view scrolled.\n\t</li>\n\t<li>\n\tOn Cocoa, SCI_POSITIONFROMPOINTCLOSE fixed when view scrolled.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1021/\">Feature #1021.</a>\n\t</li>\n\t<li>\n\tOn Cocoa, don't send selection change notification when scrolling.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1522/\">Bug #1522</a>.\n\t</li>\n\t<li>\n\tOn Qt, turn off idle events on destruction to prevent repeatedly calling idle.\n\t</li>\n\t<li>\n\tQt bindings in ScintillaEdit changed to use signed first parameter.\n\t</li>\n\t<li>\n\tCompilation errors fixed on Windows and GTK+ with SCI_NAMESPACE.\n\t</li>\n\t<li>\n\tOn Windows, building with gcc will check if Direct2D headers are available and enable Direct2D if they are.\n\t</li>\n\t<li>\n\tAvoid attempts to redraw empty areas when lexing beyond the currently visible lines.\n\t</li>\n\t<li>\n\tControl more attributes of indicators in SciTE with find.mark.indicator and highlight.current.word.indicator\n\tproperties.\n\t</li>\n\t<li>\n\tFix SciTE bug with buffers becoming read-only.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1525/\">Bug #1525</a>.\n\t</li>\n\t<li>\n\tFix linking SciTE on non-Linux Unix systems with GNU toolchain by linking to libdl.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1523/\">Bug #1523</a>.\n\t</li>\n\t<li>\n\tOn Windows, SciTE's Incremental Search displays match failures by changing the background colour\n\tinstead of not adding the character that caused failure.\n\t</li>\n\t<li>\n\tFix SciTE on GTK+ 3.x incremental search to change foreground colour when no match as\n\tchanging background colour is difficult.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite335.zip?download\">Release 3.3.5</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 31 August 2013.\n\t</li>\n\t<li>\n\tCharacters may be represented by strings.\n\tIn Unicode mode C1 control characters are represented by their mnemonics.\n\t</li>\n\t<li>\n\tAdded SCI_POSITIONRELATIVE to optimize navigation by character.\n\t</li>\n\t<li>\n\tOption to allow mouse selection to switch to rectangular by pressing Alt after start of gesture.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1007/\">Feature #1007.</a>\n\t</li>\n\t<li>\n\tLexer added for KVIrc script.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1008/\">Feature #1008.</a>\n\t</li>\n\t<li>\n\tBash lexer fixed quoted HereDoc delimiters.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1500/\">Bug #1500</a>.\n\t</li>\n\t<li>\n\tMS SQL lexer fixed ';' to appear as an operator.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1509/\">Bug #1509</a>.\n\t</li>\n\t<li>\n\tStructured Text lexer fixed styling of enumeration members.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1508/\">Bug #1508</a>.\n\t</li>\n\t<li>\n\tFixed bug with horizontal caret position when margin changed.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1512/\">Bug #1512</a>.\n\t</li>\n\t<li>\n\tFixed bug on Cocoa where coordinates were relative to text subview instead of whole view.\n\t</li>\n\t<li>\n\tEnsure selection redrawn correctly in two cases.\n\tWhen switching from stream to rectangular selection with Alt+Shift+Up.\n\tWhen reducing the range of an additional selection by moving mouse up.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1007/\">Feature #1007.</a>\n\t</li>\n\t<li>\n\tCopy and paste of rectangular selections compatible with Borland Delphi IDE on Windows.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1002/\">Feature #1002.</a>\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1513/\">Bug #1513</a>.\n\t</li>\n\t<li>\n\tInitialize extended styles to the default style.\n\t</li>\n\t<li>\n\tOn Windows, fix painting on an explicit HDC when first paint attempt abandoned.\n\t</li>\n\t<li>\n\tQt bindings in ScintillaEdit made to work on 64-bit Unix systems.\n\t</li>\n\t<li>\n\tEasier access to printing on Qt with formatRange method.\n\t</li>\n\t<li>\n\tFixed SciTE failure to save initial buffer in single buffer mode.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1339/\">Bug #1339</a>.\n\t</li>\n\t<li>\n\tFixed compilation problem with Visual C++ in non-English locales.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1506/\">Bug #1506</a>.\n\t</li>\n\t<li>\n\tDisable Direct2D when compiling with MinGW gcc on Windows because of changes in the recent MinGW release.\n\t</li>\n\t<li>\n\tSciTE crash fixed for negative line.margin.width.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1504/\">Bug #1504</a>.\n\t</li>\n\t<li>\n\tSciTE fix for infinite dialog boxes when failing to automatically save a file.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1503/\">Bug #1503</a>.\n\t</li>\n\t<li>\n\tSciTE settings buffered.draw, two.phase.draw, and technology are applied to the\n\toutput pane as well as the edit pane.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite334.zip?download\">Release 3.3.4</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 19 July 2013.\n\t</li>\n\t<li>\n\tHandling of UTF-8 and DBCS text in lexers improved with methods ForwardBytes and\n\tGetRelativeCharacter added to StyleContext.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1483/\">Bug #1483</a>.\n\t</li>\n\t<li>\n\tFor Unicode text, case-insensitive searching and making text upper or lower case is now\n\tcompliant with Unicode standards on all platforms and is much faster for non-ASCII characters.\n\t</li>\n\t<li>\n\tA CategoriseCharacter function was added to return the Unicode general category of a character\n\twhich can be useful in lexers.\n\t</li>\n\t<li>\n\tOn Cocoa, the LCD Optimized font quality level turns font smoothing on.\n\t</li>\n\t<li>\n\tSciTE 'immediate' subsystem added to allow scripts that work while tools are executed.\n\t</li>\n\t<li>\n\tFont quality exposed in SciTE as font.quality setting.\n\t</li>\n\t<li>\n\tOn Cocoa, message:... methods simplify direct access to Scintilla and avoid call layers..\n\t</li>\n\t<li>\n\tA68K lexer updated.\n\t</li>\n\t<li>\n\tCoffeeScript lexer fixes a bug with comment blocks.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1495/\">Bug #1495</a>\n\t</li>\n\t<li>\n\tECL lexer regular expression code fixed.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1491/\">Bug #1491</a>.\n\t</li>\n\t<li>\n\terrorlist lexer only recognizes Perl diagnostics when there is a filename between\n\t\"at\" and \"line\". Had been triggering for MSVC errors containing \"at line\".\n\t</li>\n\t<li>\n\tHaskell lexer fixed to avoid unnecessary full redraws.\n\tDon't highlight CPP inside comments when styling.within.preprocessor is on.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1459/\">Bug #1459</a>.\n\t</li>\n\t<li>\n\tLua lexer fixes bug in labels with UTF-8 text.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1483/\">Bug #1483</a>.\n\t</li>\n\t<li>\n\tPerl lexer fixes bug in string interpolation with UTF-8 text.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1483/\">Bug #1483</a>.\n\t</li>\n\t<li>\n\tFixed bugs with case conversion when the result was longer or shorter than the original text.\n\tCould access past end of string potentially crashing.\n\tSelection now updated to result length.\n\t</li>\n\t<li>\n\tFixed bug where data being inserted and removed was not being reported in\n\tnotification messages. Bug was introduced in 3.3.2.\n\t</li>\n\t<li>\n\tWord wrap bug fixed where the last line could be shown twice.\n\t</li>\n\t<li>\n\tWord wrap bug fixed for lines wrapping too short on Windows and GTK+.\n\t</li>\n\t<li>\n\tWord wrap performance improved.\n\t</li>\n\t<li>\n\tMinor memory leak fixed.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1487/\">Bug #1487</a>.\n\t</li>\n\t<li>\n\tOn Cocoa, fixed insertText: method which was broken when implementing a newer protocol.\n\t</li>\n\t<li>\n\tOn Cocoa, fixed a crash when performing string folding for bytes that do not represent a character\n\tin the current encoding.\n\t</li>\n\t<li>\n\tOn Qt, fixed layout problem when QApplication construction delayed.\n\t</li>\n\t<li>\n\tOn Qt, find_text reports failure with -1 as first element of return value.\n\t</li>\n\t<li>\n\tFixed SciTE on GTK+ bug where a tool command could be performed using the keyboard while one was\n\talready running leading to confusion and crashes.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1486/\">Bug #1486</a>.\n\t</li>\n\t<li>\n\tFixed SciTE bug in Copy as RTF which was limited to first 32 styles.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1011/\">Bug #1011</a>.\n\t</li>\n\t<li>\n\tFixed SciTE on Windows user strip height when the system text scaling factor is 125% or 150%.\n\t</li>\n\t<li>\n\tCompile time checks for Digital Mars C++ removed.\n\t</li>\n\t<li>\n\tVisual C++ 2013 supported.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1492/\">Bug #1492</a>.\n\t</li>\n\t<li>\n\tPython scripts used for building and maintenance improved and moved into scripts directory.\n\t</li>\n\t<li>\n\tTesting scripts now work on Linux using Qt and PySide.\n\t</li>\n\t<li>\n\tTk platform defined.\n\tImplementation for Tk will be available separately from main Scintilla distribution.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite333.zip?download\">Release 3.3.3</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 2 June 2013.\n\t</li>\n\t<li>\n\tLexer and folder added for Structured Text language.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/959/\">Feature #959.</a>\n\t</li>\n\t<li>\n\tOut of bounds access fixed for GTK+.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1480/\">Bug #1480</a>.\n\t</li>\n\t<li>\n\tCrash fixed for GTK+ on Windows paste.\n\t</li>\n\t<li>\n\tBug fixed with incorrect event copying on GTK+ 3.x.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1481/\">Bug #1481</a>.\n\t</li>\n\t<li>\n\tBug fixed with right to left locales, like Hebrew, on GTK+.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1477/\">Bug #1477</a>.\n\t</li>\n\t<li>\n\tBug fixed with undo grouping of tab and backtab commands.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1478/\">Bug #1478</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite332.zip?download\">Release 3.3.2</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 22 May 2013.\n\t</li>\n\t<li>\n\tBasic implementations of common folding methods added to Scintilla to make it\n\teasier for containers to implement folding.\n\t</li>\n\t<li>\n\tAdd indicator INDIC_COMPOSITIONTHICK, a thick low underline, to mimic an\n\tappearance used for Asian language input composition.\n\t</li>\n\t<li>\n\tOn Cocoa, implement font quality setting.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/988/\">Feature #988.</a>\n\t</li>\n\t<li>\n\tOn Cocoa, implement automatic enabling of commands and added clear command.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/987/\">Feature #987.</a>\n\t</li>\n\t<li>\n\tC++ lexer adds style for preprocessor doc comment.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/990/\">Feature #990.</a>\n\t</li>\n\t<li>\n\tHaskell lexer and folder improved. Separate mode for literate Haskell \"literatehaskell\" SCLEX_LITERATEHASKELL.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1459/\">Bug #1459 </a>.\n\t</li>\n\t<li>\n\tLaTeX lexer bug fixed for Unicode character following '\\'.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1468/\">Bug #1468 </a>.\n\t</li>\n\t<li>\n\tPowerShell lexer recognizes here strings and doccomment keywords.\n\t#region folding added.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/985/\">Feature #985.</a>\n\t</li>\n\t<li>\n\tFix multi-typing when two carets are located in virtual space on one line so that spaces\n\tare preserved.\n\t</li>\n\t<li>\n\tFixes to input composition on Cocoa and implementation of accented character input through\n\tpress and hold. Set selection correctly so that changes to pieces of composition text are easier to perform.\n\tRestore undo collection after a sequence of composition actions.\n\tComposition popups appear near input.\n\t</li>\n\t<li>\n\tFix lexer problem where no line end was seen at end of document.\n\t</li>\n\t<li>\n\tFix crash on Cocoa when view deallocated.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1466/\">Bug #1466</a>.\n\t</li>\n\t<li>\n\tFix Qt window positioning to not assume the top right of a monitor is at 0, 0.\n\t</li>\n\t<li>\n\tFix Qt to not track mouse when widget is hidden.\n\t</li>\n\t<li>\n\tQt now supports Qt 5.0.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1448/\">Bug #1448</a>.\n\t</li>\n\t<li>\n\tFix drawing on Windows with Direct2D when returning from lock screen.\n\tThe render target had to be recreated and an area would be black since the drawing was not retried.\n\t</li>\n\t<li>\n\tFix display of DBCS documents on Windows Direct2D/DirectWrite with default character set.\n\t</li>\n\t<li>\n\tFor SciTE on Windows, fixed most-recently-used menu when files opened through check.if.already.opened.\n\t</li>\n\t<li>\n\tIn SciTE, do not call OnSave twice when files saved asynchronously.\n\t</li>\n\t<li>\n\tScintilla no longer builds with Visual C++ 6.0.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite331.zip?download\">Release 3.3.1</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 11 April 2013.\n\t</li>\n\t<li>\n\tAutocompletion lists can now appear in priority order or be sorted by Scintilla.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/981/\">Feature #981.</a>\n\t</li>\n\t<li>\n\tMost lexers now lex an extra NUL byte at the end of the\n\tdocument which makes it more likely they will classify keywords at document end correctly.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/574/\">Bug #574</a>,\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/588/\">Bug #588.</a>\n\t</li>\n\t<li>\n\tHaskell lexer improved in several ways.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1459/\">Bug #1459.</a>\n\t</li>\n\t<li>\n\tMatlab/Octave lexer recognizes block comments and ... comments.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1414/\">Bug #1414.</a>\n\t</li>\n\t<li>\n\tRuby lexer crash fixed with keyword at start of document.\n\t</li>\n\t<li>\n\tThe PLAT_NCURSES platform now called PLAT_CURSES as may work on other implementations.\n\t</li>\n\t<li>\n\tBug on Cocoa fixed where input composition with multiple selection or virtual space selection\n\tcould make undo stop working.\n\t</li>\n\t<li>\n\tDirect2D/DirectWrite mode on Windows now displays documents in non-Latin1 8-bit encodings correctly.\n\t</li>\n\t<li>\n\tCharacter positioning corrected in Direct2D/DirectWrite mode on Windows to avoid text moving and cutting off\n\tlower parts of characters.\n\t</li>\n\t<li>\n\tPosition of calltip and autocompletion lists fixed on Cocoa.\n\t</li>\n\t<li>\n\tWhile regular expression search in DBCS text is still not working, matching partial characters is now avoided\n\tby moving end of match to end of character.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite330.zip?download\">Release 3.3.0</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 30 March 2013.\n\t</li>\n\t<li>\n\tOverlay scrollers and kinetic scrolling implemented on Cocoa.\n\t</li>\n\t<li>\n\tTo improve display smoothness, styling and UI Update notifications will, when possible, be performed in\n\ta high-priority idle task on Cocoa instead of during painting.\n\tPerforming these jobs inside painting can cause paints to be abandoned and a new paint scheduled.\n\tOn GTK+, the high-priority idle task is used in more cases.\n\t</li>\n\t<li>\n\tSCI_SCROLLRANGE added to scroll the view to display a range of text.\n\tIf the whole range can not be displayed, priority is given to one end.\n\t</li>\n\t<li>\n\tC++ lexer no longer recognizes raw (R\"\") strings when the first character after \"\n\tis invalid.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1454/\">Bug #1454.</a>\n\t</li>\n\t<li>\n\tHTML lexer recognizes JavaScript RegEx literals in more contexts.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1412/\">Bug #1412.</a>\n\t</li>\n\t<li>\n\tFixed automatic display of folded text when return pressed at end of fold header and\n\tfirst folded line was blank.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1455/\">Bug #1455.</a>\n\t</li>\n\t<li>\n\tSCI_VISIBLEFROMDOCLINE fixed to never return a line beyond the document end.\n\t</li>\n\t<li>\n\tSCI_LINESCROLL fixed for a negative column offset.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1450/\">Bug #1450.</a>\n\t</li>\n\t<li>\n\tOn GTK+, fix tab markers so visible if indent markers are visible.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1453/\">Bug #1453.</a>\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite325.zip?download\">Release 3.2.5</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 26 February 2013.\n\t</li>\n\t<li>\n\tTo allow cooperation between different uses of extended (beyond 255) styles they should be allocated\n\tusing SCI_ALLOCATEEXTENDEDSTYLES.\n\t</li>\n\t<li>\n\tFor Unicode documents, lexers that use StyleContext will retrieve whole characters\n\tinstead of bytes.\n\tLexAccessor provides a LineEnd method which can be a more efficient way to\n\thandle line ends and can enable Unicode line ends.\n\t</li>\n\t<li>\n\tThe C++ lexer understands the #undef directive when determining preprocessor definitions.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/978/\">Feature #978.</a>\n\t</li>\n\t<li>\n\tThe errorlist lexer recognizes gcc include path diagnostics that appear before an error.\n\t</li>\n\t<li>\n\tFolding implemented for GetText (PO)  translation language.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1437/\">Bug #1437.</a>\n\t</li>\n\t<li>\n\tHTML lexer does not interrupt comment style for processing instructions.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1447/\">Bug #1447.</a>\n\t</li>\n\t<li>\n\tFix SciTE forgetting caret x-position when switching documents.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1442/\">Bug #1442.</a>\n\t</li>\n\t<li>\n\tFixed bug where vertical scrollbar thumb appeared at beginning of document when\n\tscrollbar shown.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1446/\">Bug #1446.</a>\n\t</li>\n\t<li>\n\tFixed brace-highlighting bug on OS X 10.8 where matching brace is on a different line.\n\t</li>\n\t<li>\n\t<a href=\"ScintillaDoc.html#ProvisionalMessages\">Provisional features</a>\n\tare new features that may change or be removed if they cause problems but should become\n\tpermanent if they work well.\n\tFor this release <a href=\"ScintillaDoc.html#SCI_GETLINEENDTYPESSUPPORTED\">Unicode line ends</a> and\n\t<a href=\"ScintillaDoc.html#Substyles\">substyles</a>\n\tare provisional features.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite324.zip?download\">Release 3.2.4</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 17 January 2013.\n\t</li>\n\t<li>\n\tCaret line highlight can optionally remain visible when window does not have focus.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/964/\">Feature #964.</a>\n\t</li>\n\t<li>\n\tDelegate mechanism for notifications added on Cocoa.\n\t</li>\n\t<li>\n\tNUL characters in selection are copied to clipboard as spaces to avoid truncating\n\tat the NUL.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1289/\">Bug #1289.</a>\n\t</li>\n\t<li>\n\tC++ lexer fixes problem with showing inactive sections when preprocessor lines contain trailing comment.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1413/\">Bug #1413.</a>\n\t</li>\n\t<li>\n\tC++ lexer fixes problem with JavaScript regular expressions with '/' in character ranges.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1415/\">Bug #1415.</a>\n\t</li>\n\t<li>\n\tLaTeX folder added.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/970/\">Feature #970.</a>\n\t</li>\n\t<li>\n\tLaTeX lexer improves styling of math environments.\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/970/\">Feature #970.</a>\n\t</li>\n\t<li>\n\tMySQL lexer implements hidden commands.\n\t</li>\n\t<li>\n\tOnly produce a single undo step when autocompleting a single word.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1421/\">Bug #1421.</a>\n\t</li>\n\t<li>\n\tFixed crash when printing lines longer than 8000 characters.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1430/\">Bug #1430.</a>\n\t</li>\n\t<li>\n\tFixed problem in character movement extends selection mode where reversing\n\tdirection collapsed the selection.\n\t</li>\n\t<li>\n\tMemory issues fixed on Cocoa, involving object ownership,\n\tlifetime of timers, and images held by the info bar.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1436/\">Bug #1436.</a>\n\t</li>\n\t<li>\n\tCocoa key binding for Alt+Delete changed to delete previous word to be more compatible with\n\tplatform standards.\n\t</li>\n\t<li>\n\tFixed crash on Cocoa with scrollbar when there is no scrolling possible.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1416/\">Bug #1416.</a>\n\t</li>\n\t<li>\n\tOn Cocoa with retina display fixed positioning of autocompletion lists.\n\t</li>\n\t<li>\n\tFixed SciTE on Windows failure to run a batch file with a name containing a space by\n\tquoting the path in the properties file.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1423/\">Bug #1423.</a>\n\t</li>\n\t<li>\n\tFixed scaling bug when printing on GTK+.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1427/\">Bug #1427.</a>\n\t</li>\n\t<li>\n\tSciTE on GTK toolbar.detachable feature removed.\n\t</li>\n\t<li>\n\tFixed some background saving bugs in SciTE.\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1366/\">Bug #1366.</a>\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1339/\">Bug #1339.</a>\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite323.zip?download\">Release 3.2.3</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 21 October 2012.\n\t</li>\n\t<li>\n\tImprove speed when performing multiple searches.\n\t</li>\n\t<li>\n\tSciTE adds definition of PLAT_UNIX for both PLAT_GTK and PLAT_MAC to allow consolidation of\n\tsettings valid on all Unix variants.\n\t</li>\n\t<li>\n\tSignal autoCompleteCancelled added on Qt.\n\t</li>\n\t<li>\n\tBash lexer supports nested delimiter pairs.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3569352&group_id=2439\">Feature #3569352.</a>\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=1515556&group_id=2439\">Bug #1515556.</a>\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3008483&group_id=2439\">Bug #3008483.</a>\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3512208&group_id=2439\">Bug #3512208.</a>\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3515392&group_id=2439\">Bug #3515392.</a>\n\t</li>\n\t<li>\n\tFor C/C++, recognize exponent in floating point hexadecimal literals.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3576454&group_id=2439\">Bug #3576454.</a>\n\t</li>\n\t<li>\n\tFor C #include statements, do not treat // in the path as a comment.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3519260&group_id=2439\">Bug #3519260.</a>\n\t</li>\n\t<li>\n\tLexer for GetText translations (PO) improved with additional styles and single instance limitation fixed.\n\t</li>\n\t<li>\n\tRuby for loop folding fixed.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3240902&group_id=2439\">Bug #3240902.</a>\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3567391&group_id=2439\">Bug #3567391.</a>\n\t</li>\n\t<li>\n\tRuby recognition of here-doc after class or instance variable fixed.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3567809&group_id=2439\">Bug #3567809.</a>\n\t</li>\n\t<li>\n\tSQL folding of loop and case fixed.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3567905&group_id=2439\">Bug #3567905.</a>\n\t</li>\n\t<li>\n\tSQL folding of case with assignment fixed.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3571820&group_id=2439\">Bug #3571820.</a>\n\t</li>\n\t<li>\n\tFix hang when removing all characters from indicator at end of document.\n\t</li>\n\t<li>\n\tFix failure of \\xhh in regular expression search for values greater than 0x79.\n\t</li>\n\t<li>\n\tOn Cocoa on OS X 10.8, fix inverted drawing of find indicator.\n\t</li>\n\t<li>\n\tOn Cocoa, fix double drawing when horizontal scroll range small and user swipes horizontally.\n\t</li>\n\t<li>\n\tOn Cocoa, remove incorrect setting of save point when reading information through 'string' and 'selectedString'.\n\t</li>\n\t<li>\n\tOn Cocoa, fix incorrect memory management of infoBar.\n\t</li>\n\t<li>\n\tOn GTK+ 3 Ubuntu, fix crash when drawing margin.\n\t</li>\n\t<li>\n\tOn ncurses, fix excessive spacing with italics line end.\n\t</li>\n\t<li>\n\tOn Windows, search for D2D1.DLL and DWRITE.DLL in system directory to avoid loading from earlier\n\tin path where could be planted by malware.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite322.zip?download\">Release 3.2.2</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 31 August 2012.\n\t</li>\n\t<li>\n\tRetina display support for Cocoa. Text size fixed.\n\tScale factor for images implemented so they can be displayed in high definition.\n\t</li>\n\t<li>\n\tImplement INDIC_SQUIGGLEPIXMAP as a faster version of INDIC_SQUIGGLE.\n\tAvoid poor drawing at right of INDIC_SQUIGGLE.\n\tAlign INDIC_DOTBOX to pixel grid for full intensity.\n\t</li>\n\t<li>\n\tImplement SCI_GETSELECTIONEMPTY API.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3543121&group_id=2439\">Bug #3543121.</a>\n\t</li>\n\t<li>\n\tAdded SCI_VCHOMEDISPLAY and SCI_VCHOMEDISPLAYEXTEND key commands.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3561433&group_id=2439\">Feature #3561433.</a>\n\t</li>\n\t<li>\n\tAllow specifying SciTE Find in Files directory with find.in.directory property.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3558594&group_id=2439\">Feature #3558594.</a>\n\t</li>\n\t<li>\n\tOverride SciTE global strip.trailing.spaces with strip.trailing.spaces by pattern files.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3556320&group_id=2439\">Feature #3556320.</a>\n\t</li>\n\t<li>\n\tFix long XML script tag handling in XML lexer.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3534190&group_id=2439\">Bug #3534190.</a>\n\t</li>\n\t<li>\n\tFix rectangular selection range after backspace.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3543097&group_id=2439\">Bug #3543097.</a>\n\t</li>\n\t<li>\n\tSend SCN_UPDATEUI with SC_UPDATE_SELECTION for backspace in virtual space.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3543121&group_id=2439\">Bug #3543121.</a>\n\t</li>\n\t<li>\n\tAvoid problems when calltip highlight range is negative.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3545938&group_id=2439\">Bug #3545938.</a>\n\t</li>\n\t<li>\n\tOn Cocoa, fix image drawing code so that image is not accessed after being freed\n\tand is drawn in the correct location.\n\t</li>\n\t<li>\n\tOn Cocoa, limit horizontal touch scrolling to existing established width.\n\t</li>\n\t<li>\n\tOn Cocoa, decrease sensitivity of pinch-zoom.\n\t</li>\n\t<li>\n\tFix Cocoa drawing where style changes were not immediately visible.\n\t</li>\n\t<li>\n\tFix Cocoa memory leak due to reference cycle.\n\t</li>\n\t<li>\n\tFix Cocoa bug where notifications were sent after Scintilla was freed.\n\t</li>\n\t<li>\n\tSciTE on OS X user shortcuts treats \"Ctrl+D\" as equivalent to \"Ctrl+d\".\n\t</li>\n\t<li>\n\tOn Windows, saving SciTE's Lua startup script causes it to run.\n\t</li>\n\t<li>\n\tLimit time allowed to highlight current word in SciTE to 0.25 seconds to remain responsive.\n\t</li>\n\t<li>\n\tFixed SciTE read-only mode to stick with buffer.\n\t</li>\n\t<li>\n\tFor SciTE on Windows, enable Ctrl+Z, Ctrl+X, and Ctrl+C (Undo, Cut, and Copy) in the\n\teditable fields of find and replace strips\n\t</li>\n\t<li>\n\tRemove limit on logical line length in SciTE .properties files.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3544312&group_id=2439\">Bug #3544312.</a>\n\t</li>\n\t<li>\n\tImprove performance of SciTE Save As command.\n\t</li>\n\t<li>\n\tFix SciTE crash with empty .properties files. Bug #3545938.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3555308&group_id=2439\">Bug #3555308.</a>\n\t</li>\n\t<li>\n\tFix repeated letter in SciTE calltips.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3545938&group_id=2439\">Bug #3545938.</a>\n\t</li>\n\t<li>\n\tRefine build time checking for Direct2D and DirectWrite.\n\t</li>\n\t<li>\n\tAvoid potential build problems on Windows with MultiMon.h by explicitly checking for multi-monitor APIs.\n\t</li>\n\t<li>\n\tAutomatically disable themed drawing in SciTE when building on Windows 2000.\n\tReenable building for Windows NT 4 on NT 4 .\n\t</li>\n\t<li>\n\tAdded ncurses platform definitions. Implementation is maintained separately as\n\t<a href=\"https://orbitalquark.github.io/scinterm\">Scinterm</a>.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite321.zip?download\">Release 3.2.1</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 14 July 2012.\n\t</li>\n\t<li>\n\tIn Scintilla.iface, specify features as properties instead of functions where possible and fix some enumerations.\n\t</li>\n\t<li>\n\tIn SciTE Lua scripts, string properties in Scintilla API can be retrieved as well as set using property notation.\n\t</li>\n\t<li>\n\tAdded character class APIs: SCI_SETPUNCTUATIONCHARS, SCI_GETWORDCHARS, SCI_GETWHITESPACECHARS,\n\tand SCI_GETPUNCTUATIONCHARS.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3529805&group_id=2439\">Feature #3529805.</a>\n\t</li>\n\t<li>\n\tLess/Hss support added to CSS lexer.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3532413&group_id=2439\">Feature #3532413.</a>\n\t</li>\n\t<li>\n\tC++ lexer style SCE_C_PREPROCESSORCOMMENT added for stream comments in preprocessor.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3487406&group_id=2439\">Bug #3487406.</a>\n\t</li>\n\t<li>\n\tFix incorrect styling of inactive code in C++ lexer.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3533036&group_id=2439\">Bug #3533036.</a>\n\t</li>\n\t<li>\n\tFix incorrect styling by C++ lexer after empty lines in preprocessor style.\n\t</li>\n\t<li>\n\tC++ lexer option \"lexer.cpp.allow.dollars\" fixed so can be turned off after being on.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3541461&group_id=2439\">Bug #3541461.</a>\n\t</li>\n\t<li>\n\tFortran fixed format lexer fixed to style comments from column 73.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3540486&group_id=2439\">Bug #3540486.</a>\n\t</li>\n\t<li>\n\tFortran folder folds CRITICAL .. END CRITICAL.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3540486&group_id=2439\">Bug #3540486.</a>\n\t</li>\n\t<li>\n\tFortran lexer fixes styling after comment line ending with '&amp;'.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3087226&group_id=2439\">Bug #3087226.</a>\n\t</li>\n\t<li>\n\tFortran lexer styles preprocessor lines so they do not trigger incorrect folding.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2906275&group_id=2439\">Bug #2906275.</a>\n\t</li>\n\t<li>\n\tFortran folder fixes folding of nested ifs.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2809176&group_id=2439\">Bug #2809176.</a>\n\t</li>\n\t<li>\n\tHTML folder fixes folding of CDATA when fold.html.preprocessor=0.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3540491&group_id=2439\">Bug #3540491.</a>\n\t</li>\n\t<li>\n\tOn Cocoa, fix autocompletion font lifetime issue and row height computation.\n\t</li>\n\t<li>\n\tIn 'choose single' mode, autocompletion will close an existing list if asked to display a single entry list.\n\t</li>\n\t<li>\n\tFixed SCI_MARKERDELETE to only delete one marker per call.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3535806&group_id=2439\">Bug #3535806.</a>\n\t</li>\n\t<li>\n\tProperly position caret after undoing coalesced delete operations.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3523326&group_id=2439\">Bug #3523326.</a>\n\t</li>\n\t<li>\n\tEnsure margin is redrawn when SCI_MARGINSETSTYLE called.\n\t</li>\n\t<li>\n\tFix clicks in first pixel of margins to send SCN_MARGINCLICK.\n\t</li>\n\t<li>\n\tFix infinite loop when drawing block caret for a zero width space character at document start.\n\t</li>\n\t<li>\n\tCrash fixed for deleting negative range.\n\t</li>\n\t<li>\n\tFor characters that overlap the beginning of their space such as italics descenders and bold serifs, allow start\n\tof text to draw 1 pixel into margin.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=699587&group_id=2439\">Bug #699587.</a>\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3537799&group_id=2439\">Bug #3537799.</a>\n\t</li>\n\t<li>\n\tFixed problems compiling Scintilla for Qt with GCC 4.7.1 x64.\n\t</li>\n\t<li>\n\tFixed problem with determining GTK+ sub-platform caused when adding Qt support in 3.2.0.\n\t</li>\n\t<li>\n\tFix incorrect measurement of untitled file in SciTE on Linux leading to message \"File ...' is 2147483647 bytes long\".\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3537764&group_id=2439\">Bug #3537764.</a>\n\t</li>\n\t<li>\n\tIn SciTE, fix open of selected filename with line number to go to that line.\n\t</li>\n\t<li>\n\tFix problem with last visible buffer closing in SciTE causing invisible buffers to be active.\n\t</li>\n\t<li>\n\tAvoid blinking of SciTE's current word highlight when output pane changes.\n\t</li>\n\t<li>\n\tSciTE properties files can be longer than 60K.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite320.zip?download\">Release 3.2.0</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 1 June 2012.\n\t</li>\n\t<li>\n\tPlatform layer added for the Qt open-source cross-platform application and user interface framework\n\tfor development in C++ or in Python with the PySide bindings for Qt.\n\t</li>\n\t<li>\n\tDirect access provided to the document bytes for ranges within Scintilla.\n\tThis is similar to the existing SCI_GETCHARACTERPOINTER API but allows for better performance.\n\t</li>\n\t<li>\n\tCtrl+Double Click and Ctrl+Triple Click add the word or line to the set of selections.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3520037&group_id=2439\">Feature #3520037.</a>\n\t</li>\n\t<li>\n\tA SCI_DELETERANGE API was added for deleting a range of text.\n\t</li>\n\t<li>\n\tLine wrap markers may now be drawn in the line number margin.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3518198&group_id=2439\">Feature #3518198.</a>\n\t</li>\n\t<li>\n\tSciTE on OS X adds option to hide hidden files in the open dialog box.\n\t</li>\n\t<li>\n\tLexer added for OScript language.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3523197&group_id=2439\">Feature #3523197.</a>\n\t</li>\n\t<li>\n\tLexer added for Visual Prolog language.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3523018&group_id=2439\">Feature #3523018.</a>\n\t</li>\n\t<li>\n\tUTF-8 validity is checked more stringently and consistently. All 66 non-characters are now treated as invalid.\n\t</li>\n\t<li>\n\tHTML lexer bug fixed with inconsistent highlighting for PHP when attribute on separate line from tag.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3520027&group_id=2439\">Bug #3520027.</a>\n\t</li>\n\t<li>\n\tHTML lexer bug fixed for JavaScript block comments.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3520032&group_id=2439\">Bug #3520032.</a>\n\t</li>\n\t<li>\n\tAnnotation drawing bug fixed when box displayed with different colours on different lines.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3519872&group_id=2439\">Bug #3519872.</a>\n\t</li>\n\t<li>\n\tOn Windows with Direct2D, fix drawing with 125% and 150% DPI system settings.\n\t</li>\n\t<li>\n\tVirtual space selection bug fixed for rectangular selections.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3519246&group_id=2439\">Bug #3519246.</a>\n\t</li>\n\t<li>\n\tReplacing multiple selection with newline changed to only affect main selection.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3522251&group_id=2439\">Bug #3522251.</a>\n\t</li>\n\t<li>\n\tReplacing selection with newline changed to group deletion and insertion as a single undo action.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3522250&group_id=2439\">Bug #3522250.</a>\n\t</li>\n\t<li>\n\tAuto-completion lists on GTK+ 3 set height correctly instead of showing too few lines.\n\t</li>\n\t<li>\n\tMouse wheel scrolling changed to avoid GTK+ bug in recent distributions.\n\t</li>\n\t<li>\n\tIME bug on Windows fixed for horizontal jump.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3529728&group_id=2439\">Bug #3529728.</a>\n\t</li>\n\t<li>\n\tSciTE case-insensitive autocompletion filters equal identifiers better.\n\tCalltip arrows work with bare word identifiers.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3517810&group_id=2439\">Bug #3517810.</a>\n\t</li>\n\t<li>\n\tSciTE bug fixed where shbang lines not setting file type when switching\n\tto file loaded in background.\n\t</li>\n\t<li>\n\tSciTE on GTK+ shows open and save dialogs with the directory of the current file displayed.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite310.zip?download\">Release 3.1.0</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 20 April 2012.\n\t</li>\n\t<li>\n\tAnimated find indicator added on Cocoa.\n\t</li>\n\t<li>\n\tButtons can be made default in SciTE user strips.\n\t</li>\n\t<li>\n\tSciTE allows find and replace histories to be saved in session.\n\t</li>\n\t<li>\n\tOption added to allow case-insensitive selection in auto-completion lists.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3516538&group_id=2439\">Bug #3516538.</a>\n\t</li>\n\t<li>\n\tReplace \\0 by complete found text in regular expressions.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3510979&group_id=2439\">Feature #3510979.</a>\n\t</li>\n\t<li>\n\tFixed single quoted strings in bash lexer.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3512208&group_id=2439\">Bug #3512208.</a>\n\t</li>\n\t<li>\n\tIncorrect highlighting fixed in C++ lexer for continued lines.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3509317&group_id=2439\">Bug #3509317.</a>\n\t</li>\n\t<li>\n\tHang fixed in diff lexer.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3508602&group_id=2439\">Bug #3508602.</a>\n\t</li>\n\t<li>\n\tFolding improved for SQL CASE/MERGE statement.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3503277&group_id=2439\">Bug #3503277.</a>\n\t</li>\n\t<li>\n\tFix extra drawing of selection inside word wrap indentation.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3515555&group_id=2439\">Bug #3515555.</a>\n\t</li>\n\t<li>\n\tFix problem with determining the last line that needs styling when drawing.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3514882&group_id=2439\">Bug #3514882.</a>\n\t</li>\n\t<li>\n\tFix problems with drawing in margins.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3514882&group_id=2439\">Bug #3514882.</a>\n\t</li>\n\t<li>\n\tFix printing crash when using Direct2D to display on-screen.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3513946&group_id=2439\">Bug #3513946.</a>\n\t</li>\n\t<li>\n\tFix SciTE bug where background.*.size disabled restoration of bookmarks and positions from session.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3514885&group_id=2439\">Bug #3514885.</a>\n\t</li>\n\t<li>\n\tFixed the Move Selected Lines command when last line does not end with a line end character.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3511023&group_id=2439\">Bug #3511023.</a>\n\t</li>\n\t<li>\n\tFix word wrap indentation printing to use printer settings instead of screen settings.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3512961&group_id=2439\">Bug #3512961.</a>\n\t</li>\n\t<li>\n\tFix SciTE bug where executing an empty command prevented executing further commands\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3512976&group_id=2439\">Bug #3512976.</a>\n\t</li>\n\t<li>\n\tFix SciTE bugs with focus in user strips and made strips more robust with invalid definitions.\n\t</li>\n\t<li>\n\tSuppress SciTE regular expression option when searching with find next selection.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3510985&group_id=2439\">Bug #3510985.</a>\n\t</li>\n\t<li>\n\tSciTE Find in Files command matches empty pattern to all files.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3495918&group_id=2439\">Feature #3495918.</a>\n\t</li>\n\t<li>\n\tFix scroll with mouse wheel on GTK+.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3501321&group_id=2439\">Bug #3501321.</a>\n\t</li>\n\t<li>\n\tFix column finding method so that tab is counted correctly.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3483713&group_id=2439\">Bug #3483713.</a>\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite304.zip?download\">Release 3.0.4</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 8 March 2012.\n\t</li>\n\t<li>\n\tSciTE scripts can create user interfaces as strips.\n\t</li>\n\t<li>\n\tSciTE can save files automatically in the background.\n\t</li>\n\t<li>\n\tPinch zoom implemented on Cocoa.\n\t</li>\n\t<li>\n\tECL lexer added.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3488209&group_id=2439\">Feature #3488209.</a>\n\t</li>\n\t<li>\n\tCPP lexer fixes styling after document comment keywords.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3495445&group_id=2439\">Bug #3495445.</a>\n\t</li>\n\t<li>\n\tPascal folder improves handling of some constructs.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3486385&group_id=2439\">Feature #3486385.</a>\n\t</li>\n\t<li>\n\tXML lexer avoids entering a bad mode due to complex preprocessor instructions.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3488060&group_id=2439\">Bug #3488060.</a>\n\t</li>\n\t<li>\n\tDuplicate command is always remembered as a distinct command for undo.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3495836&group_id=2439\">Bug #3495836.</a>\n\t</li>\n\t<li>\n\tSciTE xml.auto.close.tags no longer closes with PHP code similar to &lt;a $this-&gt;\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3488067&group_id=2439\">Bug #3488067.</a>\n\t</li>\n\t<li>\n\tFix bug where setting an indicator for the whole document would fail.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3487440&group_id=2439\">Bug #3487440.</a>\n\t</li>\n\t<li>\n\tCrash fixed for SCI_MOVESELECTEDLINESDOWN with empty vertical selection.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3496403&group_id=2439\">Bug #3496403.</a>\n\t</li>\n\t<li>\n\tDifferences between buffered and unbuffered mode on Direct2D eliminated.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3495791&group_id=2439\">Bug #3495791.</a>\n\t</li>\n\t<li>\n\tFont leading implemented for Direct2D to improve display of character blobs.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3494744&group_id=2439\">Bug #3494744.</a>\n\t</li>\n\t<li>\n\tFractional widths used for line numbers, character markers and other situations.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3494492&group_id=2439\">Bug #3494492.</a>\n\t</li>\n\t<li>\n\tTranslucent rectangles drawn using Direct2D with sharper corners.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3494492&group_id=2439\">Bug #3494492.</a>\n\t</li>\n\t<li>\n\tRGBA markers drawn sharper when centred using Direct2D.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3494202&group_id=2439\">Bug #3494202.</a>\n\t</li>\n\t<li>\n\tRGBA markers are drawn centred when taller than line.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3494184&group_id=2439\">Bug #3494184.</a>\n\t</li>\n\t<li>\n\tImage marker drawing problem fixed for markers taller than line.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3493503&group_id=2439\">Bug #3493503.</a>\n\t</li>\n\t<li>\n\tMarkers are drawn horizontally off-centre based on margin type instead of dimensions.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3488696&group_id=2439\">Bug #3488696.</a>\n\t</li>\n\t<li>\n\tFold tail markers drawn vertically centred.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3488289&group_id=2439\">Feature #3488289.</a>\n\t</li>\n\t<li>\n\tOn Windows, Scintilla is more responsive in wrap mode.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3487397&group_id=2439\">Bug #3487397.</a>\n\t</li>\n\t<li>\n\tUnimportant \"Gdk-CRITICAL\" messages are no longer displayed.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3488481&group_id=2439\">Bug #3488481.</a>\n\t</li>\n\t<li>\n\tSciTE on Windows Find in Files sets focus to dialog when already created; allows opening dialog when a job is running.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3480635&group_id=2439\">Bug #3480635.</a>\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3486657&group_id=2439\">Bug #3486657.</a>\n\t</li>\n\t<li>\n\tFixed problems with multiple clicks in margin and with mouse actions combined with virtual space.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3484370&group_id=2439\">Bug #3484370.</a>\n\t</li>\n\t<li>\n\tFixed bug with using page up and down and not returning to original line.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3485669&group_id=2439\">Bug #3485669.</a>\n\t</li>\n\t<li>\n\tDown arrow with wrapped text no longer skips lines.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=1776560&group_id=2439\">Bug #1776560.</a>\n\t</li>\n\t<li>\n\tFix problem with dwell ending immediately due to word wrap.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3484416&group_id=2439\">Bug #3484416.</a>\n\t</li>\n\t<li>\n\tWrapped lines are rewrapped more consistently while resizing window.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3484179&group_id=2439\">Bug #3484179.</a>\n\t</li>\n\t<li>\n\tSelected line ends are highlighted more consistently.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3484330&group_id=2439\">Bug #3484330.</a>\n\t</li>\n\t<li>\n\tFix grey background on files that use shbang to choose language.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3482777&group_id=2439\">Bug #3482777.</a>\n\t</li>\n\t<li>\n\tFix failure messages from empty commands in SciTE.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3480645&group_id=2439\">Bug #3480645.</a>\n\t</li>\n\t<li>\n\tRedrawing reduced for some marker calls.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3493530&group_id=2439\">Feature #3493530.</a>\n\t</li>\n\t<li>\n\tMatch brace and select brace commands work in SciTE output pane.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3486598&group_id=2439\">Feature #3486598.</a>\n\t</li>\n\t<li>\n\tPerforming SciTE \"Show Calltip\" command when a calltip is already visible shows the next calltip.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3487017&group_id=2439\">Feature #3487017.</a>\n\t</li>\n\t<li>\n\tSciTE allows saving file even when file unchanged.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3486654&group_id=2439\">Feature #3486654.</a>\n\t</li>\n\t<li>\n\tSciTE allows optional use of character escapes in calltips.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3495239&group_id=2439\">Feature #3495239.</a>\n\t</li>\n\t<li>\n\tSciTE can open file:// URLs with Ctrl+Shift+O.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3495389&group_id=2439\">Feature #3495389.</a>\n\t</li>\n\t<li>\n\tKey modifiers updated for GTK+ on OS X to match upstream changes.\n\t</li>\n\t<li>\n\tSciTE hang when marking all occurrences of regular expressions fixed.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite303.zip?download\">Release 3.0.3</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 28 January 2012.\n\t</li>\n\t<li>\n\tPrinting works on GTK+ version 2.x as well as 3.x.\n\t</li>\n\t<li>\n\tLexer added for the AviSynth language.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3475611&group_id=2439\">Feature #3475611.</a>\n\t</li>\n\t<li>\n\tLexer added for the Take Command / TCC scripting language.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3462462&group_id=2439\">Feature #3462462.</a>\n\t</li>\n\t<li>\n\tCSS lexer gains support for SCSS.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3268017&group_id=2439\">Feature #3268017.</a>\n\t</li>\n\t<li>\n\tCPP lexer fixes problems in the preprocessor structure caused by continuation lines.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3458508&group_id=2439\">Bug #3458508.</a>\n\t</li>\n\t<li>\n\tErrorlist lexer handles column numbers for GCC format diagnostics.\n\tIn SciTE, Next Message goes to column where this can be decoded from GCC format diagnostics.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3453075&group_id=2439\">Feature #3453075.</a>\n\t</li>\n\t<li>\n\tHTML folder fixes spurious folds on some tags.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3459262&group_id=2439\">Bug #3459262.</a>\n\t</li>\n\t<li>\n\tRuby lexer fixes bug where '=' at start of file caused whole file to appear as a comment.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3452488&group_id=2439\">Bug #3452488.</a>\n\t</li>\n\t<li>\n\tSQL folder folds blocks of single line comments.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3467425&group_id=2439\">Feature #3467425.</a>\n\t</li>\n\t<li>\n\tOn Windows using Direct2D, defer invalidation of render target until completion of painting to avoid failures.\n\t</li>\n\t<li>\n\tFurther support of fractional positioning. Spaces, tabs, and single character tokens can take fractional space\n\tand wrapped lines are positioned taking fractional positions into account.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3471998&group_id=2439\">Bug #3471998.</a>\n\t</li>\n\t<li>\n\tOn Windows using Direct2D, fix extra carets appearing.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3471998&group_id=2439\">Bug #3471998.</a>\n\t</li>\n\t<li>\n\tFor autocompletion lists Page Up and Down move by the list height instead of by 5 lines.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3455493&group_id=2439\">Bug #3455493.</a>\n\t</li>\n\t<li>\n\tFor SCI_LINESCROLLDOWN/UP don't select into virtual space.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3451681&group_id=2439\">Bug #3451681.</a>\n\t</li>\n\t<li>\n\tFix fold highlight not being fully drawn.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3469936&group_id=2439\">Bug #3469936.</a>\n\t</li>\n\t<li>\n\tFix selection margin appearing black when starting in wrap mode.\n\t</li>\n\t<li>\n\tFix crash when changing end of document after adding an annotation.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3476637&group_id=2439\">Bug #3476637.</a>\n\t</li>\n\t<li>\n\tFix problems with building to make RPMs.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3476149&group_id=2439\">Bug #3476149.</a>\n\t</li>\n\t<li>\n\tFix problem with building on GTK+ where recent distributions could not find gmodule.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3469056&group_id=2439\">Bug #3469056.</a>\n\t</li>\n\t<li>\n\tFix problem with installing SciTE on GTK+ due to icon definition in .desktop file including an extension.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3476117&group_id=2439\">Bug #3476117.</a>\n\t</li>\n\t<li>\n\tFix SciTE bug where new buffers inherited some properties from previously opened file.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3457060&group_id=2439\">Bug #3457060.</a>\n\t</li>\n\t<li>\n\tFix focus when closing tab in SciTE with middle click. Focus moves to edit pane instead of staying on tab bar.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3440142&group_id=2439\">Bug #3440142.</a>\n\t</li>\n\t<li>\n\tFor SciTE on Windows fix bug where Open Selected Filename for URL would append a file extension.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3459185&group_id=2439\">Feature #3459185.</a>\n\t</li>\n\t<li>\n\tFor SciTE on Windows fix key handling of control characters in Parameters dialog so normal editing (Ctrl+C, ...) works.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3459345&group_id=2439\">Bug #3459345.</a>\n\t</li>\n\t<li>\n\tFix SciTE bug where files became read-only after saving. Drop the \"*\" dirty marker after save completes.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3467432&group_id=2439\">Bug #3467432.</a>\n\t</li>\n\t<li>\n\tFor SciTE handling of diffs with \"+++\" and \"---\" lines, also handle case where not followed by tab.\n\tGo to correct line for diff \"+++\" message.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3467143&group_id=2439\">Bug #3467143.</a>\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3467178&group_id=2439\">Bug #3467178.</a>\n\t</li>\n\t<li>\n\tSciTE on GTK+ now performs threaded actions even on GTK+ versions before 2.12.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite302.zip?download\">Release 3.0.2</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 9 December 2011.\n\t</li>\n\t<li>\n\tSciTE saves files in the background without blocking the user interface.\n\t</li>\n\t<li>\n\tPrinting implemented in SciTE on GTK+ 3.x.\n\t</li>\n\t<li>\n\tILoader interface for background loading finalized and documented.\n\t</li>\n\t<li>\n\tCoffeeScript lexer added.\n\t</li>\n\t<li>\n\tC++ lexer fixes crash with \"#if defined( XXX 1\".\n\t</li>\n\t<li>\n\tCrash with Direct2D on Windows fixed.\n\t</li>\n\t<li>\n\tBackspace removing protected range fixed.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3445911&group_id=2439\">Bug #3445911.</a>\n\t</li>\n\t<li>\n\tCursor setting failure on Windows when screen saver on fixed.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3438780&group_id=2439\">Bug #3438780.</a>\n\t</li>\n\t<li>\n\tSciTE on GTK+ hang fixed with -open:file option.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3441980&group_id=2439\">Bug #3441980.</a>\n\t</li>\n\t<li>\n\tFailure to evaluate shbang fixed in SciTE.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3441801&group_id=2439\">Bug #3441801.</a>\n\t</li>\n\t<li>\n\tSciTE failure to treat files starting with \"&lt;?xml\" as XML fixed.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3440718&group_id=2439\">Bug #3440718.</a>\n\t</li>\n\t<li>\n\tMade untitled tab saveable when created by closing all files.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3440244&group_id=2439\">Bug #3440244.</a>\n\t</li>\n\t<li>\n\tSciTE crash fixed when using Scintillua.\n\t</li>\n\t<li>\n\tSciTE revert command fixed so that undo works on individual actions instead of undoing to revert point.\n\t</li>\n\t<li>\n\tFocus loss in SciTE when opening a recent file fixed.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3440142&group_id=2439\">Bug #3440142.</a>\n\t</li>\n\t<li>\n\tFixed SciTE SelLength property to measure characters instead of bytes.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3283519&group_id=2439\">Bug #3283519.</a>\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite301.zip?download\">Release 3.0.1</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 15 November 2011.\n\t</li>\n\t<li>\n\tSciTE on Windows now runs Lua scripts directly on the main thread instead of starting them on a\n\tsecondary thread and then moving back to the main thread.\n\t</li>\n\t<li>\n\tHighlight \"else\" as a keyword for TCL in the same way as other languages.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=1836954&group_id=2439\">Bug #1836954.</a>\n\t</li>\n\t<li>\n\tFix problems with setting fonts for autocompletion lists on Windows where\n\tfont handles were copied and later deleted causing a system default font to be used.\n\t</li>\n\t<li>\n\tFix font size used on Windows for Asian language input methods which sometimes led to IME not being visible.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3436753&group_id=2439\">Bug #3436753.</a>\n\t</li>\n\t<li>\n\tFixed polygon drawing on Windows so fold symbols are visible again.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3433558&group_id=2439\">Bug #3433558.</a>\n\t</li>\n\t<li>\n\tChanged background drawing on GTK+ to allow for fractional character positioning as occurs on OS X\n\tas this avoids faint lines at lexeme boundaries.\n\t</li>\n\t<li>\n\tEnsure pixmaps allocated before painting as there was a crash when Scintilla drew without common initialization calls.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3432354&group_id=2439\">Bug #3432354.</a>\n\t</li>\n\t<li>\n\tFixed SciTE on Windows bug causing wrong caret position after indenting a selection.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3433433&group_id=2439\">Bug #3433433.</a>\n\t</li>\n\t<li>\n\tFixed SciTE session saving to store buffer position matching buffer.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3434372&group_id=2439\">Bug #3434372.</a>\n\t</li>\n\t<li>\n\tFixed leak of document objects in SciTE.\n\t</li>\n\t<li>\n\tRecognize URL characters '?' and '%' for Open Selected command in SciTE.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3429409&group_id=2439\">Bug #3429409.</a>\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite300.zip?download\">Release 3.0.0</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 1 November 2011.\n\t</li>\n\t<li>\n\tCarbon platform support removed. OS X applications should switch to Cocoa.\n\t</li>\n\t<li>\n\tOn Windows Vista or newer, drawing may be performed with Direct2D and DirectWrite instead of GDI.\n\t</li>\n\t<li>\n\tCairo is now used for all drawing on GTK+. GDK drawing was removed.\n\t</li>\n\t<li>\n\tPaletted display support removed.\n\t</li>\n\t<li>\n\tFractional font sizes can be specified.\n\t</li>\n\t<li>\n\tDifferent weights of text supported on some platforms instead of just normal and bold.\n\t</li>\n\t<li>\n\tSub-pixel character positioning supported.\n\t</li>\n\t<li>\n\tSciTE loads files in the background without blocking the user interface.\n\t</li>\n\t<li>\n\tSciTE can display diagnostic messages interleaved with the text of files immediately after the\n\tline referred to by the diagnostic.\n\t</li>\n\t<li>\n\tNew API to see if all lines are visible which can be used to optimize processing fold structure notifications.\n\t</li>\n\t<li>\n\tScrolling optimized by avoiding invalidation of fold margin when redrawing whole window.\n\t</li>\n\t<li>\n\tOptimized SCI_MARKERNEXT.\n\t</li>\n\t<li>\n\tC++ lexer supports Pike hash quoted strings when turned on with lexer.cpp.hashquoted.strings.\n\t</li>\n\t<li>\n\tFixed incorrect line height with annotations in wrapped mode when there are multiple views.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3388159&group_id=2439\">Bug #3388159.</a>\n\t</li>\n\t<li>\n\tCalltips may be displayed above the text as well as below.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3410830&group_id=2439\">Bug #3410830.</a>\n\t</li>\n\t<li>\n\tFor huge files SciTE only examines the first megabyte for newline discovery.\n\t</li>\n\t<li>\n\tSciTE on GTK+ removes the fileselector.show.hidden property and check box as this was buggy and GTK+ now\n\tsupports an equivalent feature.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3413630&group_id=2439\">Bug #3413630.</a>\n\t</li>\n\t<li>\n\tSciTE on GTK+ supports mnemonics in dynamic menus.\n\t</li>\n\t<li>\n\tSciTE on GTK+ displays the user's home directory as '~' in menus to make them shorter.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite229.zip?download\">Release 2.29</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 16 September 2011.\n\t</li>\n\t<li>\n\tTo automatically discover the encoding of a file when opening it, SciTE can run a program set with command.discover.properties.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3324341&group_id=2439\">Feature #3324341.</a>\n\t</li>\n\t<li>\n\tCairo always used for drawing on GTK+.\n\t</li>\n\t<li>\n\tThe set of properties files imported by SciTE can be controlled with the properties imports.include and imports.exclude.\n\tThe import statement has been extended to allow \"import *\".\n\tThe properties files for some languages are no longer automatically loaded by default. The properties files affected are\n\tavenue, baan, escript, lot, metapost, and mmixal.\n\t</li>\n\t<li>\n\tC++ lexer fixed a bug with raw strings being recognized too easily.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3388122&group_id=2439\">Bug #3388122.</a>\n\t</li>\n\t<li>\n\tLaTeX lexer improved with more states and fixes to most outstanding bugs.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=1493111&group_id=2439\">Bug #1493111.</a>\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=1856356&group_id=2439\">Bug #1856356.</a>\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3081692&group_id=2439\">Bug #3081692.</a>\n\t</li>\n\t<li>\n\tLua lexer updates for Lua 5.2 beta with goto labels and \"\\z\" string escape.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3386330&group_id=2439\">Feature #3386330.</a>\n\t</li>\n\t<li>\n\tPerl string styling highlights interpolated variables.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3394258&group_id=2439\">Feature #3394258.</a>\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3076629&group_id=2439\">Bug #3076629.</a>\n\t</li>\n\t<li>\n\tPerl lexer updated for Perl 5.14.0 with 0X and 0B numeric literal prefixes, break keyword and \"+\" supported in subroutine prototypes.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3388802&group_id=2439\">Feature #3388802.</a>\n\t</li>\n\t<li>\n\tPerl bug fixed with CRLF line endings.\n\t</li>\n\t<li>\n\tMarkdown lexer fixed to not change state with \"_\" in middle of word.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3398184&group_id=2439\">Bug #3398184.</a>\n\t</li>\n\t<li>\n\tCocoa restores compatibility with OS X 10.5.\n\t</li>\n\t<li>\n\tMouse pointer changes over selection to an arrow near start when scrolled horizontally.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3389055&group_id=2439\">Bug #3389055.</a>\n\t</li>\n\t<li>\n\tIndicators that finish at the end of the document no longer expand when text is appended.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3378718&group_id=2439\">Bug #3378718.</a>\n\t</li>\n\t<li>\n\tSparseState merge fixed to check if other range is empty.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3387053&group_id=2439\">Bug #3387053.</a>\n\t</li>\n\t<li>\n\tOn Windows, autocompletion lists will scroll instead of document when mouse wheel spun.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3403600&group_id=2439\">Feature #3403600.</a>\n\t</li>\n\t<li>\n\tSciTE performs more rapid polling for command completion so will return faster and report more accurate times.\n\t</li>\n\t<li>\n\tSciTE resizes panes proportionally when switched between horizontal and vertical layout.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3376784&group_id=2439\">Feature #3376784.</a>\n\t</li>\n\t<li>\n\tSciTE on GTK+ opens multiple files into a single instance more reliably.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3363754&group_id=2439\">Bug #3363754.</a>\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite228.zip?download\">Release 2.28</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 1 August 2011.\n\t</li>\n\t<li>\n\tGTK+ Cairo support works back to GTK+ version 2.8. Requires changing Scintilla source code to enable before GTK+ 2.22.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3322351&group_id=2439\">Bug #3322351.</a>\n\t</li>\n\t<li>\n\tTranslucent images in RGBA format can be used for margin markers and in autocompletion lists.\n\t</li>\n\t<li>\n\tINDIC_DOTBOX added as a translucent dotted rectangular indicator.\n\t</li>\n\t<li>\n\tAsian text input using IME works for GTK+ 3.x and GTK+ 2.x with Cairo.\n\t</li>\n\t<li>\n\tOn GTK+, IME works for Ctrl+Shift+U Unicode input in Scintilla. For SciTE, Ctrl+Shift+U is still Make Selection Uppercase.\n\t</li>\n\t<li>\n\tKey bindings for GTK+ on OS X made compatible with Cocoa port and platform conventions.\n\t</li>\n\t<li>\n\tCocoa port supports different character encodings, improves scrolling performance and drag image appearance.\n\tThe control ID is included in WM_COMMAND notifications. Text may be deleted by dragging to the trash.\n\tScrollToStart and ScrollToEnd key commands added to simplify implementation of standard OS X Home and End\n\tbehaviour.\n\t</li>\n\t<li>\n\tSciTE on GTK+ uses a paned widget to contain the edit and output panes instead of custom code.\n\tThis allows the divider to be moved easily on GTK+ 3 and its appearance follows GTK+ conventions more closely.\n\t</li>\n\t<li>\n\tSciTE builds and installs on BSD.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3324644&group_id=2439\">Bug #3324644.</a>\n\t</li>\n\t<li>\n\tCobol supports fixed format comments.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3014850&group_id=2439\">Bug #3014850.</a>\n\t</li>\n\t<li>\n\tMako template language block syntax extended and ## comments recognized.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3325178&group_id=2439\">Feature #3325178.</a>\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3318818&group_id=2439\">Bug #3318818.</a>\n\t</li>\n\t<li>\n\tFolding of Mako template language within HTML fixed.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3324563&group_id=2439\">Bug #3324563.</a>\n\t</li>\n\t<li>\n\tPython lexer has lexer.python.keywords2.no.sub.identifiers option to avoid highlighting second set of\n\tkeywords following '.'.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3325333&group_id=2439\">Bug #3325333.</a>\n\t</li>\n\t<li>\n\tPython folder fixes bug where fold would not extend to final line.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3349157&group_id=2439\">Bug #3349157.</a>\n\t</li>\n\t<li>\n\tSciTE treats LPEG lexers the same as script lexers by setting all 8 style bits.\n\t</li>\n\t<li>\n\tFor Cocoa, crashes with unsupported font variants and memory leaks for colour objects fixed.\n\t</li>\n\t<li>\n\tShift-JIS lead byte ranges modified to match Windows.\n\t</li>\n\t<li>\n\tMouse pointer changes over selection to an arrow more consistently.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3315756&group_id=2439\">Bug #3315756.</a>\n\t</li>\n\t<li>\n\tBug fixed with annotations beyond end of document.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3347268&group_id=2439\">Bug #3347268.</a>\n\t</li>\n\t<li>\n\tIncorrect drawing fixed for combination of background colour change and translucent selection.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3377116&group_id=2439\">Bug #3377116.</a>\n\t</li>\n\t<li>\n\tLexers initialized correctly when started at position other than start of line.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3377148&group_id=2439\">Bug #3377148.</a>\n\t</li>\n\t<li>\n\tFold highlight drawing fixed for some situations.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3323015&group_id=2439\">Bug #3323015.</a>\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3323805&group_id=2439\">Bug #3323805.</a>\n\t</li>\n\t<li>\n\tCase insensitive search fixed for cases where folded character uses fewer bytes than base character.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3362038&group_id=2439\">Bug #3362038.</a>\n\t</li>\n\t<li>\n\tSciTE bookmark.alpha setting fixed.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3373907&group_id=2439\">Bug #3373907.</a>\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite227.zip?download\">Release 2.27</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 20 June 2011.\n\t</li>\n\t<li>\n\tOn recent GTK+ 2.x versions when using Cairo, bug fixed where wrong colours were drawn.\n\t</li>\n\t<li>\n\tSciTE on GTK+ slow performance in menu maintenance fixed.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3315233&group_id=2439\">Bug #3315233.</a>\n\t</li>\n\t<li>\n\tCocoa platform supports 64-bit builds and uses only non-deprecated APIs.\n\tAsian Input Method Editors are supported.\n\tAutocompletion lists and calltips implemented.\n\tControl identifier used in notifications.\n\t</li>\n\t<li>\n\tOn Cocoa, rectangular selection now uses Option/Alt key to be compatible with Apple Human\n\tInterface Guidelines and other applications.\n\tThe Control key is reported with an SCMOD_META modifier bit.\n\t</li>\n\t<li>\n\tAPI added for setting and retrieving the identifier number used in notifications.\n\t</li>\n\t<li>\n\tSCI_SETEMPTYSELECTION added to set selection without scrolling or redrawing more than needed.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3314877&group_id=2439\">Feature #3314877.</a>\n\t</li>\n\t<li>\n\tAdded new indicators. INDIC_DASH and INDIC_DOTS are variants of underlines.\n\tINDIC_SQUIGGLELOW indicator added as shorter alternative to INDIC_SQUIGGLE for small fonts.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3314591&group_id=2439\">Bug #3314591</a>\n\t</li>\n\t<li>\n\tMargin line selection can be changed to select display lines instead of document lines.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3312763&group_id=2439\">Bug #3312763.</a>\n\t</li>\n\t<li>\n\tOn Windows, SciTE can perform reverse searches by pressing Shift+Enter\n\tin the Find or Replace strips or dialogs.\n\t</li>\n\t<li>\n\tMatlab lexer does not special case '\\' in single quoted strings.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=948757&group_id=2439\">Bug #948757</a>\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=1755950&group_id=2439\">Bug #1755950</a>\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=1888738&group_id=2439\">Bug #1888738</a>\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3316852&group_id=2439\">Bug #3316852.</a>\n\t</li>\n\t<li>\n\tVerilog lexer supports SystemVerilog folding and keywords.\n\t</li>\n\t<li>\n\tFont leak fixed.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3306156&group_id=2439\">Bug #3306156.</a>\n\t</li>\n\t<li>\n\tAutomatic scrolling works for long wrapped lines.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3312763&group_id=2439\">Bug #3312763.</a>\n\t</li>\n\t<li>\n\tMultiple typing works for cases where selections collapse together.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3309906&group_id=2439\">Bug #3309906.</a>\n\t</li>\n\t<li>\n\tFold expanded when needed in word wrap mode.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3291579&group_id=2439\">Bug #3291579.</a>\n\t</li>\n\t<li>\n\tBug fixed with edge drawn in wrong place on wrapped lines.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3314807&group_id=2439\">Bug #3314807.</a>\n\t</li>\n\t<li>\n\tBug fixed with unnecessary scrolling for SCI_GOTOLINE.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3303406&group_id=2439\">Bug #3303406.</a>\n\t</li>\n\t<li>\n\tBug fixed where extra step needed to undo SCI_CLEAR in virtual space.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3159691&group_id=2439\">Bug #3159691.</a>\n\t</li>\n\t<li>\n\tRegular expression search fixed for \\$ on last line of search range.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3313746&group_id=2439\">Bug #3313746.</a>\n\t</li>\n\t<li>\n\tSciTE performance improved when switching to a tab with a very large file.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3311421&group_id=2439\">Bug #3311421.</a>\n\t</li>\n\t<li>\n\tOn Windows, SciTE advanced search remembers the \"Search only in this style\" setting.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3313344&group_id=2439\">Bug #3313344.</a>\n\t</li>\n\t<li>\n\tOn GTK+, SciTE opens help using \"xdg-open\" instead of \"netscape\" as \"netscape\" no longer commonly installed.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3314377&group_id=2439\">Bug #3314377.</a>\n\t</li>\n\t<li>\n\tSciTE script lexers can use 256 styles.\n\t</li>\n\t<li>\n\tSciTE word highlight works for words containing DBCS characters.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3315173&group_id=2439\">Bug #3315173.</a>\n\t</li>\n\t<li>\n\tCompilation fixed for wxWidgets.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3306156&group_id=2439\">Bug #3306156.</a>\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite226.zip?download\">Release 2.26</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 25 May 2011.\n\t</li>\n\t<li>\n\tFolding margin symbols can be highlighted for the current folding block.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3147069&group_id=2439\">Feature #3147069.</a>\n\t</li>\n\t<li>\n\tSelected lines can be moved up or down together.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3304850&group_id=2439\">Feature #3304850.</a>\n\t</li>\n\t<li>\n\tSciTE can highlight all occurrences of the current word or selected text.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3291636&group_id=2439\">Feature #3291636.</a>\n\t</li>\n\t<li>\n\tExperimental GTK+ 3.0 support: build with \"make GTK3=1\".\n\t</li>\n\t<li>\n\tINDIC_STRAIGHTBOX added. Is similar to INDIC_ROUNDBOX but without rounded corners.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3290435&group_id=2439\">Bug #3290435.</a>\n\t</li>\n\t<li>\n\tCan show brace matching and mismatching with indicators instead of text style.\n\tTranslucency of outline can be altered for INDIC_ROUNDBOX and INDIC_STRAIGHTBOX.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3290434&group_id=2439\">Feature #3290434.</a>\n\t</li>\n\t<li>\n\tSciTE can automatically indent python by examining previous line for scope-starting ':' with indent.python.colon.\n\t</li>\n\t<li>\n\tBatch file lexer allows braces '(' or ')' inside variable names.\n\t</li>\n\t<li>\n\tThe cpp lexer only recognizes Vala triple quoted strings when lexer.cpp.triplequoted.strings property is set.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3239234&group_id=2439\">Bug #3239234.</a>\n\t</li>\n\t<li>\n\tMake file lexer treats a variable with a nested variable like $(f$(qx)b) as one variable.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3298223&group_id=2439\">Bug #3298223.</a>\n\t</li>\n\t<li>\n\tFolding bug fixed for JavaScript with nested PHP.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3193530&group_id=2439\">Bug #3193530.</a>\n\t</li>\n\t<li>\n\tHTML lexer styles Django's {# #} comments.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3013798&group_id=2439\">Bug #3013798.</a>\n\t</li>\n\t<li>\n\tHTML lexer styles JavaScript regular expression correctly for /abc/i.test('abc');.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3209108&group_id=2439\">Bug #3209108.</a>\n\t</li>\n\t<li>\n\tInno Setup Script lexer now works properly when it restarts from middle of [CODE] section.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3283880&group_id=2439\">Bug #3283880.</a>\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3129044&group_id=2439\">Bug #3129044.</a>\n\t</li>\n\t<li>\n\tLua lexer updated for Lua 5.2 with hexadecimal floating-point numbers and '\\*' whitespace escaping in strings.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3243811&group_id=2439\">Feature #3243811.</a>\n\t</li>\n\t<li>\n\tPerl folding folds \"here doc\"s and adds options fold.perl.at.else and fold.perl.comment.explicit. Fold structure for Perl fixed.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3112671&group_id=2439\">Feature #3112671.</a>\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3265401&group_id=2439\">Bug #3265401.</a>\n\t</li>\n\t<li>\n\tPython lexer supports cpdef keyword for Cython.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3279728&group_id=2439\">Bug #3279728.</a>\n\t</li>\n\t<li>\n\tSQL folding option lexer.sql.fold.at.else renamed to fold.sql.at.else.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3271474&group_id=2439\">Bug #3271474.</a>\n\t</li>\n\t<li>\n\tSQL lexer no longer treats ';' as terminating a comment.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3196071&group_id=2439\">Bug #3196071.</a>\n\t</li>\n\t<li>\n\tText drawing and measurement segmented into smaller runs to avoid platform bugs.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3277449&group_id=2439\">Bug #3277449.</a>\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3165743&group_id=2439\">Bug #3165743.</a>\n\t</li>\n\t<li>\n\tSciTE on Windows adds temp.files.sync.load property to open dropped temporary files synchronously as they may\n\tbe removed before they can be opened asynchronously.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3072009&group_id=2439\">Bug #3072009.</a>\n\t</li>\n\t<li>\n\tBug fixed with indentation guides ignoring first line in SC_IV_LOOKBOTH mode.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3291317&group_id=2439\">Bug #3291317.</a>\n\t</li>\n\t<li>\n\tBugs fixed in backward regex search.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3292659&group_id=2439\">Bug #3292659.</a>\n\t</li>\n\t<li>\n\tBugs with display of folding structure fixed for wrapped lines and where there is a fold header but no body.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3291579&group_id=2439\">Bug #3291579.</a>\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3265401&group_id=2439\">Bug #3265401.</a>\n\t</li>\n\t<li>\n\tSciTE on Windows cursor changes to an arrow now when over horizontal splitter near top of window.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3286620&group_id=2439\">Bug #3286620.</a>\n\t</li>\n\t<li>\n\tFixed default widget size problem on GTK+.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3267892&group_id=2439\">Bug #3267892.</a>\n\t</li>\n\t<li>\n\tFixed font size when using Cairo on GTK+.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3272662&group_id=2439\">Bug #3272662.</a>\n\t</li>\n\t<li>\n\tFixed primary selection and cursor issues on GTK+ when unrealized then realized.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3256153&group_id=2439\">Bug #3256153.</a>\n\t</li>\n\t<li>\n\tRight click now cancels selection on GTK+ like on Windows.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3235190&group_id=2439\">Bug #3235190.</a>\n\t</li>\n\t<li>\n\tSciTE on GTK+ implements z-order buffer switching like on Windows.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3228384&group_id=2439\">Bug #3228384.</a>\n\t</li>\n\t<li>\n\tImprove selection position after SciTE Insert Abbreviation command when abbreviation expansion includes '|'.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite225.zip?download\">Release 2.25</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 21 March 2011.\n\t</li>\n\t<li>\n\tSparseState class makes it easier to write lexers which have to remember complex state between lines.\n\t</li>\n\t<li>\n\tVisual Studio project (.dsp) files removed. The make files should be used instead as described in the README.\n\t</li>\n\t<li>\n\tModula 3 lexer added along with SciTE support.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3173374&group_id=2439\">Feature #3173374.</a>\n\t</li>\n\t<li>\n\tAsm, Basic, and D lexers add extra folding properties.\n\t</li>\n\t<li>\n\tRaw string literals for C++0x supported in C++ lexer.\n\t</li>\n\t<li>\n\tTriple-quoted strings used in Vala language supported in C++ lexer.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3177601&group_id=2439\">Feature #3177601.</a>\n\t</li>\n\t<li>\n \tThe errorlist lexer used in SciTE's output pane colours lines that start with '&lt;' as diff deletions.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3172878&group_id=2439\">Feature #3172878.</a>\n\t</li>\n\t<li>\n \tThe Fortran lexer correctly folds type-bound procedures from Fortran 2003.\n\t</li>\n\t<li>\n\tLPeg lexer support‎ improved in SciTE.\n\t</li>\n\t<li>\n\tSciTE on Windows-64 fixes for menu localization and Lua scripts.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3204502&group_id=2439\">Bug #3204502.</a>\n\t</li>\n\t<li>\n\tSciTE on Windows avoids locking folders when using the open or save dialogs.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=1795484&group_id=2439\">Bug #1795484.</a>\n\t</li>\n\t<li>\n\tDiff lexer fixes problem where diffs of diffs producing lines that start with \"----\".\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3197952&group_id=2439\">Bug #3197952.</a>\n\t</li>\n\t<li>\n\tBug fixed when searching upwards in Chinese code page 936.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3176271&group_id=2439\">Bug #3176271.</a>\n\t</li>\n\t<li>\n\tOn Cocoa, translucent drawing performed as on other platforms instead of 2.5 times less translucent.\n\t</li>\n\t<li>\n\tPerformance issue and potential bug fixed on GTK+ with caret line for long lines.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite224.zip?download\">Release 2.24</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 3 February 2011.\n\t</li>\n\t<li>\n\tFixed memory leak in GTK+ Cairo code.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3157655&group_id=2439\">Feature #3157655.</a>\n\t</li>\n\t<li>\n\tInsert Abbreviation dialog added to SciTE on GTK+.\n\t</li>\n\t<li>\n\tSCN_UPDATEUI notifications received when window scrolled. An 'updated' bit mask indicates which\n\ttypes of update have occurred from SC_UPDATE_SELECTION, SC_UPDATE_CONTENT, SC_UPDATE_H_SCROLL\n\tor SC_UPDATE_V_SCROLL.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3125977&group_id=2439\">Feature #3125977.</a>\n\t</li>\n\t<li>\n\tOn Windows, to ensure reverse arrow cursor matches platform default, it is now generated by\n\treflecting the platform arrow cursor.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3143968&group_id=2439\">Feature #3143968.</a>\n\t</li>\n\t<li>\n\tCan choose mouse cursor used in margins.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3161326&group_id=2439\">Feature #3161326.</a>\n\t</li>\n\t<li>\n\tOn GTK+, SciTE sets a mime type of text/plain in its .desktop file so that it will appear in the shell context menu.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3137126&group_id=2439\">Feature #3137126.</a>\n\t</li>\n\t<li>\n\tBash folder handles here docs.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3118223&group_id=2439\">Feature #3118223.</a>\n\t</li>\n\t<li>\n\tC++ folder adds fold.cpp.syntax.based, fold.cpp.comment.multiline, fold.cpp.explicit.start, fold.cpp.explicit.end,\n\tand fold.cpp.explicit.anywhere properties to allow more control over folding and choice of explicit fold markers.\n\t</li>\n\t<li>\n\tC++ lexer fixed to always handle single quote strings continued past a line end.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3150522&group_id=2439\">Bug #3150522.</a>\n\t</li>\n\t<li>\n\tRuby folder handles here docs.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3118224&group_id=2439\">Feature #3118224.</a>\n\t</li>\n\t<li>\n\tSQL lexer allows '.' to be part of words.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3103129&group_id=2439\">Feature #3103129.</a>\n\t</li>\n\t<li>\n\tSQL folder handles case statements in more situations.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3135027&group_id=2439\">Feature #3135027.</a>\n\t</li>\n\t<li>\n\tSQL folder adds fold points inside expressions based on bracket structure.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3165488&group_id=2439\">Feature #3165488.</a>\n\t</li>\n\t<li>\n\tSQL folder drops fold.sql.exists property as 'exists' is handled automatically.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3164194&group_id=2439\">Bug #3164194.</a>\n\t</li>\n\t<li>\n\tSciTE only forwards properties to lexers when they have been explicitly set so the defaults set by lexers are used\n\trather than 0.\n\t</li>\n\t<li>\n\tMouse double click word selection chooses the word around the character under the mouse rather than\n\tthe inter-character position under the mouse. This makes double clicking select what the user is pointing\n\tat and avoids selecting adjacent non-word characters.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3111174&group_id=2439\">Bug #3111174.</a>\n\t</li>\n\t<li>\n\tFixed mouse double click to always perform word select, not line select.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3143635&group_id=2439\">Bug #3143635.</a>\n\t</li>\n\t<li>\n\tRight click cancels autocompletion.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3144531&group_id=2439\">Bug #3144531.</a>\n\t</li>\n\t<li>\n\tFixed multiPaste to work when additionalSelectionTyping off.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3126221&group_id=2439\">Bug #3126221.</a>\n\t</li>\n\t<li>\n\tFixed virtual space problems when text modified at caret.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3154986&group_id=2439\">Bug #3154986.</a>\n\t</li>\n\t<li>\n\tFixed memory leak in lexer object code.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3133672&group_id=2439\">Bug #3133672.</a>\n\t</li>\n\t<li>\n\tFixed SciTE on GTK+ search failure when using regular expression.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3156217&group_id=2439\">Bug #3156217.</a>\n\t</li>\n\t<li>\n\tAvoid unnecessary full window redraw for SCI_GOTOPOS.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3146650&group_id=2439\">Feature #3146650.</a>\n\t</li>\n\t<li>\n\tAvoid unnecessary redraw when indicator fill range makes no real change.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite223.zip?download\">Release 2.23</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 7 December 2010.\n\t</li>\n\t<li>\n\tOn GTK+ version 2.22 and later, drawing is performed with Cairo rather than GDK.\n\tThis is in preparation for GTK+ 3.0 which will no longer support GDK drawing.\n\tThe appearance of some elements will be different with Cairo as it is anti-aliased and uses sub-pixel positioning.\n\tCairo may be turned on for GTK+ versions before 2.22 by defining USE_CAIRO although this has not\n\tbeen extensively tested.\n\t</li>\n\t<li>\n\tNew lexer a68k for Motorola 68000 assembler.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3101598&group_id=2439\">Feature #3101598.</a>\n\t</li>\n\t<li>\n\tBorland C++ is no longer supported for building Scintilla or SciTE on Windows.\n\t</li>\n\t<li>\n\tPerformance improved when creating large rectangular selections.\n\t</li>\n\t<li>\n\tPHP folder recognizes #region and #endregion comments.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3101624&group_id=2439\">Feature #3101624.</a>\n\t</li>\n\t<li>\n\tSQL lexer has a lexer.sql.numbersign.comment option to turn off use of '#' comments\n\tas these are a non-standard feature only available in some implementations.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3098071&group_id=2439\">Feature #3098071.</a>\n\t</li>\n\t<li>\n\tSQL folder recognizes case statements and understands the fold.at.else property.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3104091&group_id=2439\">Bug #3104091.</a>\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3107362&group_id=2439\">Bug #3107362.</a>\n\t</li>\n\t<li>\n\tSQL folder fixes bugs with end statements when fold.sql.only.begin=1.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3104091&group_id=2439\">Bug #3104091.</a>\n\t</li>\n\t<li>\n\tSciTE on Windows bug fixed with multi-line tab bar not adjusting correctly when maximizing and demaximizing.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3097517&group_id=2439\">Bug #3097517.</a>\n\t</li>\n\t<li>\n\tCrash fixed on GTK+ when Scintilla widget destroyed while it still has an outstanding style idle pending.\n\t</li>\n\t<li>\n\tBug fixed where searching backwards in DBCS text (code page 936 or similar) failed to find occurrences at the start of the line.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3103936&group_id=2439\">Bug #3103936.</a>\n\t</li>\n\t<li>\n\tSciTE on Windows supports Unicode file names when executing help applications with winhelp and htmlhelp subsystems.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite222.zip?download\">Release 2.22</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 27 October 2010.\n\t</li>\n\t<li>\n\tSciTE includes support for integrating with Scintillua which allows lexers to be implemented in Lua as a\n\tParsing Expression Grammar (PEG).\n\t</li>\n\t<li>\n\tRegular expressions allow use of '?' for non-greedy matches or to match 0 or 1 instances of an item.\n\t</li>\n\t<li>\n\tSCI_CONTRACTEDFOLDNEXT added to allow rapid retrieval of folding state.\n\t</li>\n\t<li>\n\tSCN_HOTSPOTRELEASECLICK notification added which is similar to SCN_HOTSPOTCLICK but occurs\n\twhen the mouse is released.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3082409&group_id=2439\">Feature #3082409.</a>\n\t</li>\n\t<li>\n\tCommand added for centring current line in window.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3064696&group_id=2439\">Feature #3064696.</a>\n\t</li>\n\t<li>\n\tSciTE performance improved by not examining document for line ends when switching buffers and not\n\tstoring folds when folding turned off.\n\t</li>\n\t<li>\n\tBug fixed where scrolling to ensure the caret is visible did not take into account all pixels of the line.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3081721&group_id=2439\">Bug #3081721.</a>\n\t</li>\n\t<li>\n\tBug fixed for autocompletion list overlapping text when WS_EX_CLIENTEDGE used.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3079778&group_id=2439\">Bug #3079778.</a>\n\t</li>\n\t<li>\n\tAfter autocompletion, the caret's X is updated.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3079114&group_id=2439\">Bug #3079114.</a>\n\t</li>\n\t<li>\n\tOn Windows, default to the system caret blink time.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3079784&group_id=2439\">Feature #3079784.</a>\n\t</li>\n\t<li>\n\tPgUp/PgDn fixed to allow virtual space.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3077452&group_id=2439\">Bug #3077452.</a>\n\t</li>\n\t<li>\n\tCrash fixed when AddMark and AddMarkSet called with negative argument.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3075074&group_id=2439\">Bug #3075074.</a>\n\t</li>\n\t<li>\n\tDwell notifications fixed so that they do not occur when the mouse is outside Scintilla.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3073481&group_id=2439\">Bug #3073481.</a>\n\t</li>\n\t<li>\n\tBash lexer bug fixed for here docs starting with &lt;&lt;-.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3063822&group_id=2439\">Bug #3063822.</a>\n\t</li>\n\t<li>\n\tC++ lexer bug fixed for // comments that are continued onto a second line by a \\.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3066031&group_id=2439\">Bug #3066031.</a>\n\t</li>\n\t<li>\n\tC++ lexer fixes wrong highlighting for float literals containing +/-.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3058924&group_id=2439\">Bug #3058924.</a>\n\t</li>\n\t<li>\n\tJavaScript lexer recognize regexes following return keyword.‎\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3062287&group_id=2439\">Bug #3062287.</a>\n\t</li>\n\t<li>\n\tRuby lexer handles % quoting better and treats range dots as operators in 1..2 and 1...2.\n\tRuby folder handles \"if\" keyword used as a modifier even when it is separated from the modified statement by an escaped new line.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2093767&group_id=2439\">Bug #2093767.</a>\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3058496&group_id=2439\">Bug #3058496.</a>\n\t</li>\n\t<li>\n\tBug fixed where upwards search failed with DBCS code pages.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3065912&group_id=2439\">Bug #3065912.</a>\n\t</li>\n\t<li>\n\tSciTE has a default Lua startup script name distributed in SciTEGlobal.properties.\n\tNo error message is displayed if this file does not exist.\n\t</li>\n\t<li>\n\tSciTE on Windows tab control height is calculated better.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2635702&group_id=2439\">Bug #2635702.</a>\n\t</li>\n\t<li>\n\tSciTE on Windows uses better themed check buttons in find and replace strips.\n\t</li>\n\t<li>\n\tSciTE on Windows fixes bug with Find strip appearing along with Incremental Find strip.\n\t</li>\n\t<li>\n\tSciTE setting find.close.on.find added to allow preventing the Find dialog from closing.\n\t</li>\n\t<li>\n\tSciTE on Windows attempts to rerun commands that fail by prepending them with \"cmd.exe /c\".\n\tThis allows commands built in to the command processor like \"dir\" to run.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite221.zip?download\">Release 2.21</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 1 September 2010.\n\t</li>\n\t<li>\n\tAsian Double Byte Character Set (DBCS) support improved.\n\tCase insensitive search works and other operations are much faster.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2999125&group_id=2439\">Bug #2999125,</a>\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2774616&group_id=2439\">Bug #2774616,</a>\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2991942&group_id=2439\">Bug #2991942,</a>\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3005688&group_id=2439\">Bug #3005688.</a>\n\t</li>\n\t<li>\n\tScintilla on GTK+ uses only non-deprecated APIs (for GTK+ 2.20) except for GdkFont and GdkFont use can be disabled\n\twith the preprocessor symbol DISABLE_GDK_FONT.\n\t</li>\n\t<li>\n\tIDocument interface used by lexers adds BufferPointer and GetLineIndentation methods.\n\t</li>\n\t<li>\n\tOn Windows, clicking sets focus before processing the click or sending notifications.\n\t</li>\n\t<li>\n\tBug on OS X (macosx platform) fixed where drag/drop overwrote clipboard.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3039732&group_id=2439\">Bug #3039732.</a>\n\t</li>\n\t<li>\n\tGTK+ drawing bug when the view was horizontally scrolled more than 32000 pixels fixed.\n\t</li>\n\t<li>\n\tSciTE bug fixed with invoking Complete Symbol from output pane.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3050957&group_id=2439\">Bug #3050957.</a>\n\t</li>\n\t<li>\n\tBug fixed where it was not possible to disable folding.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3040649&group_id=2439\">Bug #3040649.</a>\n\t</li>\n\t<li>\n\tBug fixed with pressing Enter on a folded fold header line not opening the fold.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3043419&group_id=2439\">Bug #3043419.</a>\n\t</li>\n\t<li>\n\tSciTE 'Match case' option in find and replace user interfaces changed to 'Case sensitive' to allow use of 'v'\n\trather than 'c' as the mnemonic.\n\t</li>\n\t<li>\n\tSciTE displays stack trace for Lua when error occurs..\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3051397&group_id=2439\">Bug #3051397.</a>\n\t</li>\n\t<li>\n\tSciTE on Windows fixes bug where double clicking on error message left focus in output pane.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=1264835&group_id=2439\">Bug #1264835.</a>\n\t</li>\n\t<li>\n\tSciTE on Windows uses SetDllDirectory to avoid a security problem.\n\t</li>\n\t<li>\n\tC++ lexer crash fixed with preprocessor expression that looked like division by 0.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3056825&group_id=2439\">Bug #3056825.</a>\n\t</li>\n\t<li>\n\tHaskell lexer improved.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3039490&group_id=2439\">Feature #3039490.</a>\n\t</li>\n\t<li>\n\tHTML lexing fixed around Django {% %} tags.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3034853&group_id=2439\">Bug #3034853.</a>\n\t</li>\n\t<li>\n\tHTML JavaScript lexing fixed when line end escaped.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3038381&group_id=2439\">Bug #3038381.</a>\n\t</li>\n\t<li>\n\tHTML lexer stores line state produced by a line on that line rather than on the next line.\n\t</li>\n\t<li>\n\tMarkdown lexer fixes infinite loop.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3045386&group_id=2439\">Bug #3045386.</a>\n\t</li>\n\t<li>\n\tMySQL folding bugs with END statements fixed.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3031742&group_id=2439\">Bug #3031742.</a>\n\t</li>\n\t<li>\n\tPowerShell lexer allows '_' as a word character.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3042228&group_id=2439\">Feature #3042228.</a>\n\t</li>\n\t<li>\n\tSciTE on GTK+ abandons processing of subsequent commands if a command.go.needs command fails.\n\t</li>\n\t<li>\n\tWhen SciTE is closed, all buffers now receive an OnClose call.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3033857&group_id=2439\">Bug #3033857.</a>\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite220.zip?download\">Release 2.20</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 30 July 2010.\n\t</li>\n\t<li>\n\tLexers are implemented as objects so that they may retain extra state.\n\tThe interfaces defined for this are tentative and may change before the next release.\n\tCompatibility classes allow current lexers compiled into Scintilla to run with few changes.\n\tThe interface to external lexers has changed and existing external lexers will need to have changes\n\tmade and be recompiled.\n\tA single lexer object is attached to a document whereas previously lexers were attached to views\n\twhich could lead to different lexers being used for split views with confusing results.\n\t</li>\n\t<li>\n\tC++ lexer understands the preprocessor enough to grey-out inactive code due to conditional compilation.\n\t</li>\n\t<li>\n\tSciTE can use strips within the main window for find and replace rather than dialogs.\n\tOn Windows SciTE always uses a strip for incremental search.\n\t</li>\n\t<li>\n\tLexer added for Txt2Tags language.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3018736&group_id=2439\">Feature #3018736.</a>\n\t</li>\n\t<li>\n\tSticky caret feature enhanced with additional SC_CARETSTICKY_WHITESPACE mode .\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3027559&group_id=2439\">Feature #3027559.</a>\n\t</li>\n\t<li>\n\tBash lexer implements basic parsing of compound commands and constructs.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3033135&group_id=2439\">Feature #3033135.</a>\n\t</li>\n\t<li>\n\tC++ folder allows disabling explicit fold comments.\n\t</li>\n\t<li>\n\tPerl folder works for array blocks, adjacent package statements, nested PODs, and terminates package folding at __DATA__, ^D and ^Z.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3030887&group_id=2439\">Feature #3030887.</a>\n\t</li>\n\t<li>\n\tPowerShell lexer supports multiline &lt;# .. #&gt; comments and adds 2 keyword classes.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3015176&group_id=2439\">Feature #3015176.</a>\n\t</li>\n\t<li>\n\tLexing performed incrementally when needed by wrapping to make user interface more responsive.\n\t</li>\n\t<li>\n\tSciTE setting replaceselection:yes works on GTK+.\n\t</li>\n\t<li>\n\tSciTE Lua scripts calling io.open or io.popen on Windows have arguments treated as UTF-8 and converted to Unicode\n\tso that non-ASCII file paths will work. Lua files with non-ASCII paths run.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3016951&group_id=2439\">Bug #3016951.</a>\n\t</li>\n\t<li>\n\tCrash fixed when searching for empty string.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3017572&group_id=2439\">Bug #3017572.</a>\n\t</li>\n\t<li>\n\tBugs fixed with folding and lexing when Enter pressed at start of line.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3032652&group_id=2439\">Bug #3032652.</a>\n\t</li>\n\t<li>\n\tBug fixed with line selection mode not affecting selection range.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3021480&group_id=2439\">Bug #3021480.</a>\n\t</li>\n\t<li>\n\tBug fixed where indicator alpha was limited to 100 rather than 255.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3021473&group_id=2439\">Bug #3021473.</a>\n\t</li>\n\t<li>\n\tBug fixed where changing annotation did not cause automatic redraw.\n\t</li>\n\t<li>\n\tRegular expression bug fixed when a character range included non-ASCII characters.\n\t</li>\n\t<li>\n\tCompilation failure with recent compilers fixed on GTK+.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3022027&group_id=2439\">Bug #3022027.</a>\n\t</li>\n\t<li>\n\tBug fixed on Windows with multiple monitors where autocomplete pop up would appear off-screen\n\tor straddling monitors.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3017512&group_id=2439\">Bug #3017512.</a>\n\t</li>\n\t<li>\n\tSciTE on Windows bug fixed where changing directory to a Unicode path failed.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3011987&group_id=2439\">Bug #3011987.</a>\n\t</li>\n\t<li>\n\tSciTE on Windows bug fixed where combo boxes were not allowing Unicode characters.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3012986&group_id=2439\">Bug #3012986.</a>\n\t</li>\n\t<li>\n\tSciTE on GTK+ bug fixed when dragging files into SciTE on KDE.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3026555&group_id=2439\">Bug #3026555.</a>\n\t</li>\n\t<li>\n\tSciTE bug fixed where closing untitled file could lose data if attempt to name file same as another buffer.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3011680&group_id=2439\">Bug #3011680.</a>\n\t</li>\n\t<li>\n\tCOBOL number masks now correctly highlighted.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3012164&group_id=2439\">Bug #3012164.</a>\n\t</li>\n\t<li>\n\tPHP comments can include &lt;?PHP without triggering state change.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2854183&group_id=2439\">Bug #2854183.</a>\n\t</li>\n\t<li>\n\tVHDL lexer styles unclosed string correctly.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3029627&group_id=2439\">Bug #3029627.</a>\n\t</li>\n\t<li>\n\tMemory leak fixed in list boxes on GTK+.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3007669&group_id=2439\">Bug #3007669.</a>\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite212.zip?download\">Release 2.12</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 1 June 2010.\n\t</li>\n\t<li>\n\tDrawing optimizations improve speed and fix some visible flashing when scrolling.\n\t</li>\n\t<li>\n\tCopy Path command added to File menu in SciTE.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2986745&group_id=2439\">Feature #2986745.</a>\n\t</li>\n\t<li>\n\tOptional warning displayed by SciTE when saving a file which has been modified by another process.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2975041&group_id=2439\">Feature #2975041.</a>\n\t</li>\n\t<li>\n\tFlagship lexer for xBase languages updated to follow the language much more closely.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2992689&group_id=2439\">Feature #2992689.</a>\n\t</li>\n\t<li>\n\tHTML lexer highlights Django templates in more regions.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3002874&group_id=2439\">Feature #3002874.</a>\n\t</li>\n\t<li>\n\tDropping files on SciTE on Windows, releases the drag object earlier and opens the files asynchronously,\n\tleading to smoother user experience.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2986724&group_id=2439\">Feature #2986724.</a>\n\t</li>\n\t<li>\n\tSciTE HTML exports take the Use Monospaced Font setting into account.\n\t</li>\n\t<li>\n\tSciTE window title \"[n of m]\" localized.\n\t</li>\n\t<li>\n\tWhen new line inserted at start of line, markers are moved down.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2986727&group_id=2439\">Bug #2986727.</a>\n\t</li>\n\t<li>\n\tOn Windows, dropped text has its line ends converted, similar to pasting.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3005328&group_id=2439\">Bug #3005328.</a>\n\t</li>\n\t<li>\n\tFixed bug with middle-click paste in block select mode where text was pasted next to selection rather than at cursor.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2984460&group_id=2439\">Bug #2984460.</a>\n\t</li>\n\t<li>\n\tFixed SciTE crash where a style had a size parameter without a value.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3003834&group_id=2439\">Bug #3003834.</a>\n\t</li>\n\t<li>\n\tDebug assertions in multiple lexers fixed.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3000566&group_id=2439\">Bug #3000566.</a>\n\t</li>\n\t<li>\n\tCSS lexer fixed bug where @font-face displayed incorrectly\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2994224&group_id=2439\">Bug #2994224.</a>\n\t</li>\n\t<li>\n\tCSS lexer fixed bug where open comment caused highlighting error.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=1683672&group_id=2439\">Bug #1683672.</a>\n\t</li>\n\t<li>\n\tShell file lexer fixed highlight glitch with here docs where the first line is a comment.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2830239&group_id=2439\">Bug #2830239.</a>\n\t</li>\n\t<li>\n\tBug fixed in SciTE openpath property that caused Open Selected File to fail to open the selected file.\n\t</li>\n\t<li>\n\tBug fixed in SciTE FileExt property when file name with no extension evaluated to whole path.\n\t</li>\n\t<li>\n\tFixed SciTE on Windows printing bug where the $(CurrentTime), $(CurrentPage) variables were not expanded.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2994612&group_id=2439\">Bug #2994612.</a>\n\t</li>\n\t<li>\n\tSciTE compiles for 64-bit Windows and runs without crashing.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2986312&group_id=2439\">Bug #2986312.</a>\n\t</li>\n\t<li>\n\tFull Screen mode in Windows Vista/7 improved to hide Start button and size borders a little better.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3002813&group_id=2439\">Bug #3002813.</a>\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite211.zip?download\">Release 2.11</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 9 April 2010.\n\t</li>\n\t<li>\n\tFixes compatibility of Scintilla.h with the C language.\n\t</li>\n\t<li>\n\tWith a rectangular selection SCI_GETSELECTIONSTART and SCI_GETSELECTIONEND return limits of the\n\trectangular selection rather than the limits of the main selection.\n\t</li>\n\t<li>\n\tWhen SciTE on Windows is minimized to tray, only takes a single click to restore rather than a double click.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=981917&group_id=2439\">Feature #981917.</a>\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite210.zip?download\">Release 2.10</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 4 April 2010.\n\t</li>\n\t<li>\n\tVersion 1.x of GTK+ is no longer supported.\n\t</li>\n\t<li>\n\tSciTE is no longer supported on Windows 95, 98 or ME.\n\t</li>\n\t<li>\n\tCase-insensitive search works for non-ASCII characters in UTF-8 and 8-bit encodings.\n\tNon-regex search in DBCS encodings is always case-sensitive.\n\t</li>\n\t<li>\n\tNon-ASCII characters may be changed to upper and lower case.\n\t</li>\n\t<li>\n\tSciTE on Windows can access all files including those with names outside the user's preferred character encoding.\n\t</li>\n\t<li>\n\tSciTE may be extended with lexers written in Lua.\n\t</li>\n\t<li>\n\tWhen there are multiple selections, the paste command can go either to the main selection or to each\n\tselection. This is controlled with SCI_SETMULTIPASTE.\n\t</li>\n\t<li>\n\tMore forms of bad UTF-8 are detected including overlong sequences, surrogates, and characters outside\n\tthe valid range. Bad UTF-8 bytes are now displayed as 2 hex digits preceded by 'x'.\n\t</li>\n\t<li>\n\tSCI_GETTAG retrieves the value of captured expressions within regular expression searches.\n\t</li>\n\t<li>\n\tDjango template highlighting added to the HTML lexer.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2974889&group_id=2439\">Feature #2974889.</a>\n\t</li>\n\t<li>\n\tVerilog line comments can be folded.\n\t</li>\n\t<li>\n\tSciTE on Windows allows specifying a filter for the Save As dialog.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2943445&group_id=2439\">Feature #2943445.</a>\n\t</li>\n\t<li>\n\tBug fixed when multiple selection disabled where rectangular selections could be expanded into multiple selections.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2948260&group_id=2439\">Bug #2948260.</a>\n\t</li>\n\t<li>\n\tBug fixed when document horizontally scrolled and up/down-arrow did not return to the same\n\tcolumn after horizontal scroll occurred.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2950799&group_id=2439\">Bug #2950799.</a>\n\t</li>\n\t<li>\n\tBug fixed to remove hotspot highlight when mouse is moved out of the document. Windows only fix.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&aid=2951353&group_id=2439&atid=102439\">Bug #2951353.</a>\n\t</li>\n\t<li>\n\tR lexer now performs case-sensitive check for keywords.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2956543&group_id=2439\">Bug #2956543.</a>\n\t</li>\n\t<li>\n\tBug fixed on GTK+ where text disappeared when a wrap occurred.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2958043&group_id=2439\">Bug #2958043.</a>\n\t</li>\n\t<li>\n\tBug fixed where regular expression replace cannot escape the '\\' character by using '\\\\'.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2959876&group_id=2439\">Bug #2959876.</a>\n\t</li>\n\t<li>\n\tBug fixed on GTK+ when virtual space disabled, middle-click could still paste text beyond end of line.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2971618&group_id=2439\">Bug #2971618.</a>\n\t</li>\n\t<li>\n\tSciTE crash fixed when double clicking on a malformed error message in the output pane.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2976551&group_id=2439\">Bug #2976551.</a>\n\t</li>\n\t<li>\n\tImproved performance on GTK+ when changing parameters associated with scroll bars to the same value.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2964357&group_id=2439\">Bug #2964357.</a>\n\t</li>\n\t<li>\n\tFixed bug with pressing Shift+Tab with a rectangular selection so that it performs an un-indent\n\tsimilar to how Tab performs an indent.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite203.zip?download\">Release 2.03</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased 14 February 2010.\n\t</li>\n\t<li>\n\tAdded SCI_SETFIRSTVISIBLELINE to match SCI_GETFIRSTVISIBLELINE.\n\t</li>\n\t<li>\n\tErlang lexer extended set of numeric bases recognized; separate style for module:function_name; detects\n\tbuilt-in functions, known module attributes, and known preprocessor instructions; recognizes EDoc and EDoc macros;\n\tseparates types of comments.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2942448&group_id=2439\">Bug #2942448.</a>\n\t</li>\n\t<li>\n\tPython lexer extended with lexer.python.strings.over.newline option that allows non-triple-quoted strings to extend\n\tpast line ends. This allows use of the Ren'Py language.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2945550&group_id=2439\">Feature #2945550.</a>\n\t</li>\n\t<li>\n\tFixed bugs with cursor movement after deleting a rectangular selection.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2942131&group_id=2439\">Bug #2942131.</a>\n\t</li>\n\t<li>\n\tFixed bug where calling SCI_SETSEL when there is a rectangular selection left\n\tthe additional selections selected.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2947064&group_id=2439\">Bug #2947064.</a>\n\t</li>\n\t<li>\n\tFixed macro recording bug where not all bytes in multi-byte character insertions were reported through\n\tSCI_REPLACESEL.\n\t</li>\n\t<li>\n\tFixed SciTE bug where using Ctrl+Enter followed by Ctrl+Space produced an autocompletion list\n\twith only a single line containing all the identifiers.\n\t</li>\n\t<li>\n\tFixed SciTE on GTK+ bug where running a tool made the user interface completely unresponsive.\n\t</li>\n\t<li>\n\tFixed SciTE on Windows Copy to RTF bug.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2108574&group_id=2439\">Bug #2108574.</a>\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite202.zip?download\">Release 2.02</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased on 25 January 2010.\n\t</li>\n\t<li>\n\tMarkdown lexer added.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2844081&group_id=2439\">Feature #2844081.</a>\n\t</li>\n\t<li>\n\tOn GTK+, include code that understands the ranges of lead bytes for code pages 932, 936, and 950\n\tso that most Chinese and Japanese text can be used on systems that are not set to the corresponding locale.\n\t</li>\n\t<li>\n\tAllow changing the size of dots in visible whitespace using SCI_SETWHITESPACESIZE.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2839427&group_id=2439\">Feature #2839427.</a>\n\t</li>\n\t<li>\n\tAdditional carets can be hidden with SCI_SETADDITIONALCARETSVISIBLE.\n\t</li>\n\t<li>\n\tCan choose anti-aliased, non-anti-aliased or lcd-optimized text using SCI_SETFONTQUALITY.\n\t</li>\n\t<li>\n\tRetrieve the current selected text in the autocompletion list with SCI_AUTOCGETCURRENTTEXT.\n\t</li>\n\t<li>\n\tRetrieve the name of the current lexer with SCI_GETLEXERLANGUAGE.\n\t</li>\n\t<li>\n\tProgress 4GL lexer improves handling of comments in preprocessor declaration.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2902206&group_id=2439\">Feature #2902206.</a>\n\t</li>\n\t<li>\n\tHTML lexer extended to handle Mako template language.\n\t</li>\n\t<li>\n\tSQL folder extended for SQL Anywhere \"EXISTS\" and \"ENDIF\" keywords.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2887524&group_id=2439\">Feature #2887524.</a>\n\t</li>\n\t<li>\n\tSciTE adds APIPath and AbbrevPath variables.\n\t</li>\n\t<li>\n\tSciTE on GTK+ uses pipes instead of temporary files for running tools. This should be more secure.\n\t</li>\n\t<li>\n\tFixed crash when calling SCI_STYLEGETFONT for a style which does not have a font set.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2857425&group_id=2439\">Bug #2857425.</a>\n\t</li>\n\t<li>\n\tFixed crash caused by not having sufficient styles allocated after choosing a lexer.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2881279&group_id=2439\">Bug #2881279.</a>\n\t</li>\n\t<li>\n\tFixed crash in SciTE using autocomplete word when word characters includes space.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2840141&group_id=2439\">Bug #2840141.</a>\n\t</li>\n\t<li>\n\tFixed bug with handling upper-case file extensions SciTE on GTK+.\n\t</li>\n\t<li>\n\tFixed SciTE loading files from sessions with folded folds where it would not\n\tbe scrolled to the correct location.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2882775&group_id=2439\">Bug #2882775.</a>\n\t</li>\n\t<li>\n\tFixed SciTE loading files from sessions when file no longer exists.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2883437&group_id=2439\">Bug #2883437.</a>\n\t</li>\n\t<li>\n\tFixed SciTE export to HTML using the wrong background colour.\n\t</li>\n\t<li>\n\tFixed crash when adding an annotation and then adding a new line after the annotation.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2929708&group_id=2439\">Bug #2929708.</a>\n\t</li>\n\t<li>\n\tFixed crash in SciTE setting a property to nil from Lua.\n\t</li>\n\t<li>\n\tSCI_GETSELTEXT fixed to return correct length.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2929441&group_id=2439\">Bug #2929441.</a>\n\t</li>\n\t<li>\n\tFixed text positioning problems with selection in some circumstances.\n\t</li>\n\t<li>\n\tFixed text positioning problems with ligatures on GTK+.\n\t</li>\n\t<li>\n\tFixed problem pasting into rectangular selection with caret at bottom caused text to go from the caret down\n\trather than replacing the selection.\n\t</li>\n\t<li>\n\tFixed problem replacing in a rectangular selection where only the final line was changed.\n\t</li>\n\t<li>\n\tFixed inability to select a rectangular area using Alt+Shift+Click at both corners.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2899746&group_id=2439\">Bug #2899746.</a>\n\t</li>\n\t<li>\n\tFixed problem moving to start/end of a rectangular selection with left/right key.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2871358&group_id=2439\">Bug #2871358.</a>\n\t</li>\n\t<li>\n\tFixed problem with Select All when there's a rectangular selection.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2930488&group_id=2439\">Bug #2930488.</a>\n\t</li>\n\t<li>\n\tFixed SCI_LINEDUPLICATE on a rectangular selection to not produce multiple discontinuous selections.\n\t</li>\n\t<li>\n\tVirtual space removed when performing delete word left or delete line left.\n\tVirtual space converted to real space for delete word right.\n\tPreserve virtual space when pressing Delete key.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2882566&group_id=2439\">Bug #2882566.</a>\n\t</li>\n\t<li>\n\tFixed problem where Shift+Alt+Down did not move through wrapped lines.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2871749&group_id=2439\">Bug #2871749.</a>\n\t</li>\n\t<li>\n\tFixed incorrect background colour when using coloured lines with virtual space.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2914691&group_id=2439\">Bug #2914691.</a>\n\t</li>\n\t<li>\n\tFixed failure to display wrap symbol for SC_WRAPVISUALFLAGLOC_END_BY_TEXT.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2936108&group_id=2439\">Bug #2936108.</a>\n\t</li>\n\t<li>\n\tFixed blank background colour with EOLFilled style on last line.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2890105&group_id=2439\">Bug #2890105.</a>\n\t</li>\n\t<li>\n\tFixed problem in VB lexer with keyword at end of file.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2901239&group_id=2439\">Bug #2901239.</a>\n\t</li>\n\t<li>\n\tFixed SciTE bug where double clicking on a tab closed the file.\n\t</li>\n\t<li>\n\tFixed SciTE brace matching commands to only work when the caret is next to the brace, not when\n\tit is in virtual space.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2885560&group_id=2439\">Bug #2885560.</a>\n\t</li>\n\t<li>\n\tFixed SciTE on Windows Vista to access files in the Program Files directory rather than allow Windows\n\tto virtualize access.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2916685&group_id=2439\">Bug #2916685.</a>\n\t</li>\n\t<li>\n\tFixed NSIS folder to handle keywords that start with '!'.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2872157&group_id=2439\">Bug #2872157.</a>\n\t</li>\n\t<li>\n\tChanged linkage of Scintilla_LinkLexers to \"C\" so that it can be used by clients written in C.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2844718&group_id=2439\">Bug #2844718.</a>\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite201.zip?download\">Release 2.01</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased on 19 August 2009.\n\t</li>\n\t<li>\n\tFix to positioning rectangular paste when viewing line ends.\n\t</li>\n\t<li>\n\tDon't insert new lines and indentation for line ends at end of rectangular paste.\n\t</li>\n\t<li>\n\tWhen not in additional selection typing mode, cutting a rectangular selection removes all of the selected text.\n\t</li>\n\t<li>\n\tRectangular selections are copied to the clipboard in document order, not in the order of selection.\n\t</li>\n\t<li>\n\tSCI_SETCURRENTPOS and SCI_SETANCHOR work in rectangular mode.\n\t</li>\n\t<li>\n\tOn GTK+, drag and drop to a later position in the document now drops at the position.\n\t</li>\n\t<li>\n\tFix bug where missing property did not use default value.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite200.zip?download\">Release 2.0</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased on 11 August 2009.\n\t</li>\n\t<li>\n\tMultiple pieces of text can be selected simultaneously by holding control while dragging the mouse.\n\tTyping, backspace and delete may affect all selections together.\n\t</li>\n\t<li>\n\tVirtual space allows selecting beyond the last character on a line.\n\t</li>\n\t<li>\n\tSciTE on GTK+ path bar is now optional and defaults to off.\n\t</li>\n\t<li>\n\tMagikSF lexer recognizes numbers correctly.\n\t</li>\n\t<li>\n\tFolding of Python comments and blank lines improved. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=210240&group_id=2439\">Bug #210240.</a>\n\t</li>\n\t<li>\n\tBug fixed where background colour of last character in document leaked past that character.\n\t</li>\n\t<li>\n\tCrash fixed when adding marker beyond last line in document. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2830307&group_id=2439\">Bug #2830307.</a>\n\t</li>\n\t<li>\n\tResource leak fixed in SciTE for Windows when printing fails. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2816524&group_id=2439\">Bug #2816524.</a>\n\t</li>\n\t<li>\n\tBug fixed on Windows where the system caret was destroyed during destruction when another window\n\twas using the system caret. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2830223&group_id=2439\">Bug #2830223.</a>\n\t</li>\n\t<li>\n\tBug fixed where indentation guides were drawn over text when the indentation used a style with a different\n\tspace width to the default style.\n\t</li>\n\t<li>\n\tSciTE bug fixed where box comment added a bare line feed rather than the chosen line end. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2818104&group_id=2439\">Bug #2818104.</a>\n\t</li>\n\t<li>\n\tReverted fix that led to wrapping whole document when displaying the first line of the document.\n\t</li>\n\t<li>\n\tExport to LaTeX in SciTE fixed to work in more cases and not use as much space. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=1286548&group_id=2439\">Bug #1286548.</a>\n\t</li>\n\t<li>\n\tBug fixed where EN_CHANGE notification was sent when performing a paste operation in a\n\tread-only document. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2825485&group_id=2439\">Bug #2825485.</a>\n\t</li>\n\t<li>\n\tRefactored code so that Scintilla exposes less of its internal implementation and uses the C++ standard\n\tlibrary for some basic collections. Projects that linked to Scintilla's SString or PropSet classes\n\tshould copy this code from a previous version of Scintilla or from SciTE.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite179.zip?download\">Release 1.79</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased on 1 July 2009.\n\t</li>\n\t<li>\n\tMemory exhaustion and other exceptions handled by placing an error value into the\n\tstatus property rather than crashing.\n\tScintilla now builds with exception handling enabled and requires exception handling to be enabled. <br />\n\tThis is a major change and application developers should consider how they will deal with Scintilla exhausting\n\tmemory since Scintilla may not be in a stable state.\n\t</li>\n\t<li>\n\tDeprecated APIs removed. The symbols removed are:\n\t<ul>\n <li>SCI_SETCARETPOLICY</li>\n<li> CARET_CENTER</li>\n<li> CARET_XEVEN</li>\n<li> CARET_XJUMPS</li>\n<li> SC_FOLDFLAG_BOX</li>\n<li> SC_FOLDLEVELBOXHEADERFLAG</li>\n<li> SC_FOLDLEVELBOXFOOTERFLAG</li>\n<li> SC_FOLDLEVELCONTRACTED</li>\n<li> SC_FOLDLEVELUNINDENT</li>\n<li> SCN_POSCHANGED</li>\n<li> SCN_CHECKBRACE</li>\n<li> SCLEX_ASP</li>\n<li> SCLEX_PHP</li>\n</ul>\n\t</li>\n\t<li>\n\tCocoa platform added.\n\t</li>\n\t<li>\n\tNames of struct types in Scintilla.h now start with \"Sci_\" to avoid possible clashes with platform\n\tdefinitions. Currently, the old names still work but these will be phased out.\n\t</li>\n\t<li>\n\tWhen lines are wrapped, subsequent lines may be indented to match the indent of the initial line,\n\tor one more indentation level. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2796119&group_id=2439\">Feature #2796119.</a>\n\t</li>\n\t<li>\n\tAPIs added for finding the character at a point rather than an inter-character position. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2646738&group_id=2439\">Feature #2646738.</a>\n\t</li>\n\t<li>\n\tA new marker SC_MARK_BACKGROUND_UNDERLINE is drawn in the text area as an underline\n\tthe full width of the window.\n\t</li>\n\t<li>\n\tBatch file lexer understands variables surrounded by '!'.\n\t</li>\n\t<li>\n\tCAML lexer also supports SML.\n\t</li>\n\t<li>\n\tD lexer handles string and numeric literals more accurately. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2793782&group_id=2439\">Feature #2793782.</a>\n\t</li>\n\t<li>\n\tForth lexer is now case-insensitive and better supports numbers like $hex and %binary. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2804894&group_id=2439\">Feature #2804894.</a>\n\t</li>\n\t<li>\n\tLisp lexer treats '[', ']', '{', and '}' as balanced delimiters which is common usage. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2794989&group_id=2439\">Feature #2794989.</a>\n\t<br />\n\tIt treats keyword argument names as being equivalent to symbols. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2794901&group_id=2439\">Feature #2794901.</a>\n\t</li>\n\t<li>\n\tPascal lexer bug fixed to prevent hang when 'interface' near beginning of file. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2802863&group_id=2439\">Bug #2802863.</a>\n\t</li>\n\t<li>\n\tPerl lexer bug fixed where previous lexical states persisted causing \"/\" special case styling and\n\tsubroutine prototype styling to not be correct. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2809168&group_id=2439\">Bug #2809168.</a>\n\t</li>\n\t<li>\n\tXML lexer fixes bug where Unicode entities like '&amp;—' were broken into fragments. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2804760&group_id=2439\">Bug #2804760.</a>\n\t</li>\n\t<li>\n\tSciTE on GTK+ enables scrolling the tab bar on recent versions of GTK+. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2061821&group_id=2439\">Feature #2061821.</a>\n\t</li>\n\t<li>\n\tSciTE on Windows allows tab bar tabs to be reordered by drag and drop.\n\t</li>\n\t<li>\n\tUnit test script for Scintilla on Windows included with source code.\n\t</li>\n\t<li>\n\tUser defined menu items are now localized when there is a matching translation.\n\t</li>\n\t<li>\n\tWidth of icon column of autocompletion lists on GTK+ made more consistent.\n\t</li>\n\t<li>\n\tBug with slicing UTF-8 text into character fragments when there is a sequence of 100 or more 3 byte characters. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2780566&group_id=2439\">Bug #2780566.</a>\n\t</li>\n\t<li>\n\tFolding bugs introduced in 1.78 fixed. Some of the fix was generic and there was also a specific fix for C++.\n\t</li>\n\t<li>\n\tBug fixed where a rectangular paste was not padding the line with sufficient spaces to align the pasted text.\n\t</li>\n\t<li>\n\tBug fixed with showing all text on each line of multi-line annotations when styling the whole annotation using SCI_ANNOTATIONSETSTYLE. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2789430&group_id=2439\">Bug #2789430.</a>\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite178.zip?download\">Release 1.78</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased on 28 April 2009.\n\t</li>\n\t<li>\n\tAnnotation lines may be added to each line.\n\t</li>\n\t<li>\n\tA text margin may be defined with different text on each line.\n\t</li>\n\t<li>\n\tApplication actions may be added to the undo history.\n\t</li>\n\t<li>\n\tCan query the symbol defined for a marker.\n\tAn available symbol added for applications to indicate that plugins may allocate a marker.\n\t</li>\n\t<li>\n\tCan increase the amount of font ascent and descent.\n\t</li>\n\t<li>\n\tCOBOL lexer added. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2127406&group_id=2439\">Feature #2127406.</a>\n\t</li>\n\t<li>\n\tNimrod lexer added. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2642620&group_id=2439\">Feature #2642620.</a>\n\t</li>\n\t<li>\n\tPowerPro lexer added. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2195308&group_id=2439\">Feature #2195308.</a>\n\t</li>\n\t<li>\n\tSML lexer added. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2710950&group_id=2439\">Feature #2710950.</a>\n\t</li>\n\t<li>\n\tSORCUS Installation file lexer added. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2343375&group_id=2439\">Feature #2343375.</a>\n\t</li>\n\t<li>\n\tTACL lexer added. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2127406&group_id=2439\">Feature #2127406.</a>\n\t</li>\n\t<li>\n\tTAL lexer added. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2127406&group_id=2439\">Feature #2127406.</a>\n\t</li>\n\t<li>\n\tRewritten Pascal lexer with improved folding and other fixes. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2190650&group_id=2439\">Feature #2190650.</a>\n\t</li>\n\t<li>\n\tINDIC_ROUNDBOX translucency level can be modified. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2586290&group_id=2439\">Feature #2586290.</a>\n\t</li>\n\t<li>\n\tC++ lexer treats angle brackets in #include directives as quotes when styling.within.preprocessor. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2551033&group_id=2439\">Bug #2551033.</a>\n\t</li>\n\t<li>\n\tInno Setup lexer is sensitive to whether within the [Code] section and handles comments better. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2552973&group_id=2439\">Bug #2552973.</a>\n\t</li>\n\t<li>\n\tHTML lexer does not go into script mode when script tag is self-closing.\n\t</li>\n\t<li>\n\tHTML folder fixed where confused by comments when fold.html.preprocessor off. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2532774&group_id=2439\">Bug #2532774.</a>\n\t</li>\n\t<li>\n\tPerl lexer fixes problem with string matching caused by line endings. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2648342&group_id=2439\">Bug #2648342.</a>\n\t</li>\n\t<li>\n\tProgress lexer fixes problem with \"last-event:function\" phrase. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2483619&group_id=2439\">Bug #2483619.</a>\n\t</li>\n\t<li>\n\tProperties file lexer extended to handle RFC2822 text when lexer.props.allow.initial.spaces on.\n\t</li>\n\t<li>\n\tPython lexer adds options for Python 3 and Cython.\n\t</li>\n\t<li>\n\tShell lexer fixes heredoc problem caused by line endings. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2635257&group_id=2439\">Bug #2635257.</a>\n\t</li>\n\t<li>\n\tTeX lexer handles comment at end of line correctly. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2698766&group_id=2439\">Bug #2698766.</a>\n\t</li>\n\t<li>\n\tSciTE retains selection range when performing a replace selection command. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2339160&group_id=2439\">Feature #2339160.</a>\n\t</li>\n\t<li>\n\tSciTE definition of word characters fixed to match documentation. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2464531&group_id=2439\">Bug #2464531.</a>\n\t</li>\n\t<li>\n\tSciTE on GTK+ performing Search or Replace when dialog already shown now brings dialog to foreground.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2634224&group_id=2439\">Bug #2634224.</a>\n\t</li>\n\t<li>\n\tFixed encoding bug with calltips on GTK+.\n\t</li>\n\t<li>\n\tBlock caret drawn in correct place on wrapped lines. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2126144&group_id=2439\">Bug #2126144.</a>\n\t</li>\n\t<li>\n\tCompilation for 64 bit Windows works using MinGW. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2515578&group_id=2439\">Bug #2515578.</a>\n\t</li>\n\t<li>\n\tIncorrect memory freeing fixed on OS X.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2354098&group_id=2439\">Bug #2354098</a>,\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2671749&group_id=2439\">Bug #2671749.</a>\n\t</li>\n\t<li>\n\tSciTE on GTK+ crash fixed on startup when child process exits before initialization complete.\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2716987&group_id=2439\">Bug #2716987.</a>\n\t</li>\n\t<li>\n\tCrash fixed when AutoCompleteGetCurrent called with no active autocompletion.\n\t</li>\n\t<li>\n\tFlickering diminished when pressing Tab. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2723006&group_id=2439\">Bug #2723006.</a>\n\t</li>\n\t<li>\n\tNamespace compilation issues with GTK+ on OS X fixed.\n\t</li>\n\t<li>\n\tIncreased maximum length of SciTE's Language menu on GTK+ to 100 items. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2528241&group_id=2439\">Bug #2528241.</a>\n\t</li>\n\t<li>\n\tFixed incorrect Python lexing for multi-line continued strings. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2450963&group_id=2439\">Bug #2450963.</a>\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite177.zip?download\">Release 1.77</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased on 18 October 2008.\n\t</li>\n\t<li>\n\tDirect temporary access to Scintilla's text buffer to allow simple efficient interfacing\n\tto libraries like regular expression libraries.\n\t</li>\n\t<li>\n\tScintilla on Windows can interpret keys as Unicode even when a narrow character\n\twindow with SCI_SETKEYSUNICODE.\n\t</li>\n\t<li>\n\tNotification sent when autocompletion cancelled.\n\t</li>\n\t<li>\n\tMySQL lexer added.\n\t</li>\n\t<li>\n\tLexer for gettext .po files added.\n\t</li>\n\t<li>\n\tAbaqus lexer handles program structure more correctly.\n\t</li>\n\t<li>\n\tAssembler lexer works with non-ASCII text.\n\t</li>\n\t<li>\n\tC++ lexer allows mixed case doc comment tags.\n\t</li>\n\t<li>\n\tCSS lexer updated and works with non-ASCII.\n\t</li>\n\t<li>\n\tDiff lexer adds style for changed lines, handles subversion diffs better and\n\tfixes styling and folding for lines containing chunk dividers (\"---\").\n\t</li>\n\t<li>\n\tFORTRAN lexer accepts more styles of compiler directive.\n\t</li>\n\t<li>\n\tHaskell lexer allows hexadecimal literals.\n\t</li>\n\t<li>\n\tHTML lexer improves PHP and JavaScript folding.\n\tPHP heredocs, nowdocs, strings and comments processed more accurately.\n\tInternet Explorer's non-standard &gt;comment&lt; tag supported.\n\tScript recognition in XML can be controlled with lexer.xml.allow.scripts property.\n\t</li>\n\t<li>\n\tLua lexer styles last character correctly.\n\t</li>\n\t<li>\n\tPerl lexer update.\n\t</li>\n\t<li>\n\tComment folding implemented for Ruby.\n\t</li>\n\t<li>\n\tBetter TeX folding.\n\t</li>\n\t<li>\n\tVerilog lexer updated.\n\t</li>\n\t<li>\n\tWindows Batch file lexer handles %~ and %*.\n\t</li>\n\t<li>\n\tYAML lexer allows non-ASCII text.\n\t</li>\n\t<li>\n\tSciTE on GTK+ implements \"Replace in Buffers\" in advanced mode.\n\t</li>\n\t<li>\n\tThe extender OnBeforeSave method can override the default file saving behaviour by retuning true.\n\t</li>\n\t<li>\n\tWindow position and recent files list may be saved into the session file.\n\t</li>\n\t<li>\n\tRight button press outside the selection moves the caret.\n\t</li>\n\t<li>\n\tSciTE load.on.activate works when closing a document reveals a changed document.\n\t</li>\n\t<li>\n\tSciTE bug fixed where eol.mode not used for initial buffer.\n\t</li>\n\t<li>\n\tSciTE bug fixed where a file could be saved as the same name as another\n\tbuffer leading to confusing behaviour.\n\t</li>\n\t<li>\n\tFixed display bug for long lines in same style on Windows.\n\t</li>\n\t<li>\n\tFixed SciTE crash when finding matching preprocessor command used on some files.\n\t</li>\n\t<li>\n\tDrawing performance improved for files with many blank lines.\n\t</li>\n\t<li>\n\tFolding bugs fixed where changing program text produced a decrease in fold level on a fold header line.\n\t</li>\n\t<li>\n\tClearing document style now clears all indicators.\n\t</li>\n\t<li>\n\tSciTE's embedded Lua updated to 5.1.4.\n\t</li>\n\t<li>\n\tSciTE will compile with versions of GTK+ before 2.8 again.\n\t</li>\n\t<li>\n\tSciTE on GTK+ bug fixed where multiple files not opened.\n\t</li>\n\t<li>\n\tBug fixed with SCI_VCHOMEWRAP and SCI_VCHOMEWRAPEXTEND on white last line.\n\t</li>\n\t<li>\n\tRegular expression bug fixed where \"^[^(]+$\" matched empty lines.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite176.zip?download\">Release 1.76</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased on 16 March 2008.\n\t</li>\n\t<li>\n\tSupport for PowerShell.\n\t</li>\n\t<li>\n\tLexer added for Magik.\n\t</li>\n\t<li>\n\tDirector extension working on GTK+.\n\t</li>\n\t<li>\n\tDirector extension may set focus to SciTE through \"focus:\" message on GTK+.\n\t</li>\n\t<li>\n\tC++ folder handles final line better in some cases.\n\t</li>\n\t<li>\n\tSCI_COPYALLOWLINE added which is similar to SCI_COPY except that if the selection is empty then\n\tthe line holding the caret is copied. On Windows an extra clipboard format allows pasting this as a whole\n\tline before the current selection. This behaviour is compatible with Visual Studio.\n\t</li>\n\t<li>\n\tOn Windows, the horizontal scroll bar can handle wider files.\n\t</li>\n\t<li>\n\tOn Windows, a system palette leak was fixed. Should not affect many as palette mode is rarely used.\n\t</li>\n\t<li>\n\tInstall command on GTK+ no longer tries to set explicit owner.\n\t</li>\n\t<li>\n\tPerl lexer handles defined-or operator \"//\".\n\t</li>\n\t<li>\n\tOctave lexer fixes \"!=\" operator.\n\t</li>\n\t<li>\n\tOptimized selection change drawing to not redraw as much when not needed.\n\t</li>\n\t<li>\n\tSciTE on GTK+ no longer echoes Lua commands so is same as on Windows.\n\t</li>\n\t<li>\n\tAutomatic vertical scrolling limited to one line at a time so is not too fast.\n\t</li>\n\t<li>\n\tCrash fixed when line states set beyond end of line states. This occurred when lexers did not\n\tset a line state for each line.\n\t</li>\n\t<li>\n\tCrash in SciTE on Windows fixed when search for 513 character string fails.\n\t</li>\n\t<li>\n\tSciTE disables translucent features on Windows 9x due to crashes reported when using translucency.\n\t</li>\n\t<li>\n\tBug fixed where whitespace background was not seen on wrapped lines.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite175.zip?download\">Release 1.75</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased on 22 November 2007.\n\t</li>\n\t<li>\n\tSome WordList and PropSet functionality moved from Scintilla to SciTE.\n\tProjects that link to Scintilla's code for these classes may need to copy\n\tcode from SciTE.\n\t</li>\n\t<li>\n\tBorland C++ can no longer build Scintilla.\n\t</li>\n\t<li>\n\tInvalid bytes in UTF-8 mode are displayed as hex blobs. This also prevents crashes due to\n\tpassing invalid UTF-8 to platform calls.\n\t</li>\n\t<li>\n\tIndentation guides enhanced to be visible on completely empty lines when possible.\n\t</li>\n\t<li>\n\tThe horizontal scroll bar may grow to match the widest line displayed.\n\t</li>\n\t<li>\n\tAllow autocomplete pop ups to appear outside client rectangle in some cases.\n\t</li>\n\t<li>\n\tWhen line state changed, SC_MOD_CHANGELINESTATE modification notification sent and\n\tmargin redrawn.\n\t</li>\n\t<li>\n\tSciTE scripts can access the menu command values IDM_*.\n\t</li>\n\t<li>\n\tSciTE's statement.end property has been implemented again.\n\t</li>\n\t<li>\n\tSciTE shows paths and matches in different styles for Find In Files.\n\t</li>\n\t<li>\n\tIncremental search in SciTE for Windows is modeless to make it easier to exit.\n\t</li>\n\t<li>\n\tFolding performance improved.\n\t</li>\n\t<li>\n\tSciTE for GTK+ now includes a Browse button in the Find In Files dialog.\n\t</li>\n\t<li>\n\tOn Windows versions that support Unicode well, Scintilla is a wide character window\n\twhich allows input for some less common languages like Armenian, Devanagari,\n\tTamil, and Georgian. To fully benefit, applications should use wide character calls.\n\t</li>\n\t<li>\n\tLua function names are exported from SciTE to allow some extension libraries to work.\n\t</li>\n\t<li>\n\tLexers added for Abaqus, Ansys APDL, Asymptote, and R.\n\t</li>\n\t<li>\n\tSCI_DELWORDRIGHTEND added for closer compatibility with GTK+ entry widget.\n\t</li>\n\t<li>\n\tThe styling buffer may now use all 8 bits in each byte for lexical states with 0 bits for indicators.\n\t</li>\n\t<li>\n\tMultiple characters may be set for SciTE's calltip.&lt;lexer&gt;.parameters.start property.\n\t</li>\n\t<li>\n\tBash lexer handles octal literals.\n\t</li>\n\t<li>\n\tC++/JavaScript lexer recognizes regex literals in more situations.\n\t</li>\n\t<li>\n\tHaskell lexer fixed for quoted strings.\n\t</li>\n\t<li>\n\tHTML/XML lexer does not notice XML indicator if there is\n\tnon-whitespace between the \"&lt;?\" and \"XML\".\n\tASP problem fixed where &lt;/ is used inside a comment.\n\t</li>\n\t<li>\n\tError messages from Lua 5.1 are recognized.\n\t</li>\n\t<li>\n\tFolding implemented for Metapost.\n\t</li>\n\t<li>\n\tPerl lexer enhanced for handling minus-prefixed barewords,\n\tunderscores in numeric literals and vector/version strings,\n\t^D and ^Z similar to __END__,\n\tsubroutine prototypes as a new lexical class,\n\tformats and format blocks as new lexical classes, and\n\t'/' suffixed keywords and barewords.\n\t</li>\n\t<li>\n\tPython lexer styles all of a decorator in the decorator style rather than just the name.\n\t</li>\n\t<li>\n\tYAML lexer styles colons as operators.\n\t</li>\n\t<li>\n\tFixed SciTE bug where undo would group together multiple separate modifications.\n\t</li>\n\t<li>\n\tBug fixed where setting background colour of calltip failed.\n\t</li>\n\t<li>\n\tSciTE allows wildcard suffixes for file pattern based properties.\n\t</li>\n\t<li>\n\tSciTE on GTK+ bug fixed where user not prompted to save untitled buffer.\n\t</li>\n\t<li>\n\tSciTE bug fixed where property values from one file were not seen by lower priority files.\n\t</li>\n\t<li>\n\tBug fixed when showing selection with a foreground colour change which highlighted\n\tan incorrect range in some positions.\n\t</li>\n\t<li>\n\tCut now invokes SCN_MODIFYATTEMPTRO notification.\n\t</li>\n\t<li>\n\tBug fixed where caret not shown at beginning of wrapped lines.\n\tCaret made visible in some cases after wrapping and scroll bar updated after wrapping.\n\t</li>\n\t<li>\n\tModern indicators now work on wrapped lines.\n\t</li>\n\t<li>\n\tSome crashes fixed for 64-bit GTK+.\n\t</li>\n\t<li>\n\tOn GTK+ clipboard features improved for VMWare tools copy and paste.\n\tSciTE exports the clipboard more consistently on shut down.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite174.zip?download\">Release 1.74</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased on 18 June 2007.\n\t</li>\n\t<li>\n\tOS X support.\n\t</li>\n\t<li>\n\tIndicators changed to be a separate data structure allowing more indicators. Storing indicators in high bits\n\tof styling bytes is deprecated and will be removed in the next version.\n\t</li>\n\t<li>\n\tUnicode support extended to all Unicode characters not just the Basic Multilingual Plane.\n\t</li>\n\t<li>\n\tPerformance improved on wide lines by breaking long runs in a single style into shorter segments.\n\t</li>\n\t<li>\n\tPerformance improved by caching layout of short text segments.\n\t</li>\n\t<li>\n\tSciTE includes Lua 5.1.\n\t</li>\n\t<li>\n\tCaret may be displayed as a block.\n\t</li>\n\t<li>\n\tLexer added for GAP.\n\t</li>\n\t<li>\n\tLexer added for PL/M.\n\t</li>\n\t<li>\n\tLexer added for Progress.\n\t</li>\n\t<li>\n\tSciTE session files have changed format to be like other SciTE .properties files\n\tand now use the extension .session.\n\tBookmarks and folds may optionally be saved in session files.\n\tSession files created with previous versions of SciTE will not load into this version.\n\t</li>\n\t<li>\n\tSciTE's extension and scripting interfaces add OnKey, OnDwellStart, and OnClose methods.\n\t</li>\n\t<li>\n\tOn GTK+, copying to the clipboard does not include the text/urilist type since this caused problems when\n\tpasting into Open Office.\n\t</li>\n\t<li>\n\tOn GTK+, Scintilla defaults caret blink rate to platform preference.\n\t</li>\n\t<li>\n\tDragging does not start until the mouse has been dragged a certain amount.\n\tThis stops spurious drags when just clicking inside the selection.\n\t</li>\n\t<li>\n\tBug fixed where brace highlight not shown when caret line background set.\n\t</li>\n\t<li>\n\tBug fixed in Ruby lexer where out of bounds access could occur.\n\t</li>\n\t<li>\n\tBug fixed in XML folding where tags were not being folded because they are singletons in HTML.\n\t</li>\n\t<li>\n\tBug fixed when many font names used.\n\t</li>\n\t<li>\n\tLayout bug fixed on GTK+ where fonts have ligatures available.\n\t</li>\n\t<li>\n\tBug fixed with SCI_LINETRANSPOSE on a blank line.\n\t</li>\n\t<li>\n\tSciTE hang fixed when using UNC path with directory properties feature.\n\t</li>\n\t<li>\n\tBug on Windows fixed by examining dropped text for Unicode even in non-Unicode mode so it\n\tcan work when source only provides Unicode or when using an encoding different from the\n\tsystem default.\n\t</li>\n\t<li>\n\tSciTE bug on GTK+ fixed where Stop Executing did not work when more than a single process started.\n\t</li>\n\t<li>\n\tSciTE bug on GTK+ fixed where mouse wheel was not switching between buffers.\n\t</li>\n\t<li>\n\tMinor line end fix to PostScript lexer.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite173.zip?download\">Release 1.73</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased on 31 March 2007.\n\t</li>\n\t<li>\n\tSciTE adds a Directory properties file to configure behaviour for files in a directory and its subdirectories.\n\t</li>\n\t<li>\n\tStyle changes may be made during text modification events.\n\t</li>\n\t<li>\n\tRegular expressions recognize \\d, \\D, \\s, \\S, \\w, \\W, and \\xHH.\n\t</li>\n\t<li>\n\tSupport for cmake language added.\n\t</li>\n\t<li>\n\tMore Scintilla properties can be queried.\n\t</li>\n\t<li>\n\tEdge line drawn under text.\n\t</li>\n\t<li>\n\tA savesession command added to SciTE director interface.\n\t</li>\n\t<li>\n\tSciTE File | Encoding menu item names changed to be less confusing.\n\t</li>\n\t<li>\n\tSciTE on GTK+ dialog buttons reordered to follow guidelines.\n\t</li>\n\t<li>\n\tSciTE on GTK+ removed GTK+ 1.x compatible file dialog code.\n\t</li>\n\t<li>\n\tSciTE on GTK+ recognizes key names KeypadMultiply and KeypadDivide.\n\t</li>\n\t<li>\n\tBackground colour of line wrapping visual flag changed to STYLE_DEFAULT.\n\t</li>\n\t<li>\n\tMakefile lexing enhanced for ':=' operator and when lines start with tab.\n\t</li>\n\t<li>\n\tTADS3 lexer and folder improved.\n\t</li>\n\t<li>\n\tSCN_DOUBLECLICK notification may set SCI_SHIFT, SCI_CTRL, and SCI_ALT flags on modifiers field.\n\t</li>\n\t<li>\n\tSlow folding of large constructs in Python fixed.\n\t</li>\n\t<li>\n\tMSSQL folding fixed to be case-insensitive and fold at more keywords.\n\t</li>\n\t<li>\n\tSciTE's brace matching works better for HTML.\n\t</li>\n\t<li>\n\tDetermining API list items checks for specified parameters start character before default '('.\n\t</li>\n\t<li>\n\tHang fixed in HTML lexer.\n\t</li>\n\t<li>\n\tBug fixed in with LineTranspose command where markers could move to different line.\n\t</li>\n\t<li>\n\tMemory released when buffer completely emptied.\n\t</li>\n\t<li>\n\tIf translucency not available on Windows, draw rectangular outline instead.\n\t</li>\n\t<li>\n\tBash lexer handles \"-x\" in \"--x-includes...\" better.\n\t</li>\n\t<li>\n\tAutoIt3 lexer fixes string followed by '+'.\n\t</li>\n\t<li>\n\tLinesJoin fixed where it stopped early due to not adjusting for inserted spaces..\n\t</li>\n\t<li>\n\tStutteredPageDown fixed when lines wrapped.\n\t</li>\n\t<li>\n\tFormatRange fixed to not double count line number width which could lead to a large space.\n\t</li>\n\t<li>\n\tSciTE Export As PDF and Latex commands fixed to format floating point numbers with '.' even in locales\n\tthat use ','.\n\t</li>\n\t<li>\n\tSciTE bug fixed where File | New could produce buffer with contents of previous file when using read-only mode.\n\t</li>\n\t<li>\n\tSciTE retains current scroll position when switching buffers and fold.on.open set.\n\t</li>\n\t<li>\n\tSciTE crash fixed where '*' used to invoke parameters dialog.\n\t</li>\n\t<li>\n\tSciTE bugs when writing large UCS-2 files fixed.\n\t</li>\n\t<li>\n\tBug fixed when scrolling inside a SCN_PAINTED event by invalidating window\n\trather than trying to perform synchronous painting.\n\t</li>\n\t<li>\n\tSciTE for GTK+ View | Full Screen works on recent versions of GTK+.\n\t</li>\n\t<li>\n\tSciTE for Windows enables and disables toolbar commands correctly.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite172.zip?download\">Release 1.72</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased on 15 January 2007.\n\t</li>\n\t<li>\n\tPerformance of per-line data improved.\n\t</li>\n\t<li>\n\tSC_STARTACTION flag set on the first modification notification in an undo\n\ttransaction to help synchronize the container's undo stack with Scintilla's.\n\t</li>\n\t<li>\n\tOn GTK+ drag and drop defaults to move rather than copy.\n\t</li>\n\t<li>\n\tScintilla supports extending appearance of selection to right hand margin.\n\t</li>\n\t<li>\n\tIncremental search available on GTK+.\n\t</li>\n\t<li>\n\tSciTE Indentation Settings dialog available on GTK+ and adds a \"Convert\" button.\n\t</li>\n\t<li>\n\tFind in Files can optionally ignore binary files or directories that start with \".\".\n\t</li>\n\t<li>\n\tLexer added for \"D\" language.\n\t</li>\n\t<li>\n\tExport as HTML shows folding with underline lines and +/- symbols.\n\t</li>\n\t<li>\n\tRuby lexer interprets interpolated strings as expressions.\n\t</li>\n\t<li>\n\tLua lexer fixes some cases of numeric literals.\n\t</li>\n\t<li>\n\tC++ folder fixes bug with \"@\" in doc comments.\n\t</li>\n\t<li>\n\tNSIS folder handles !if and related commands.\n\t</li>\n\t<li>\n\tInno setup lexer adds styling for single and double quoted strings.\n\t</li>\n\t<li>\n\tMatlab lexer handles backslashes in string literals correctly.\n\t</li>\n\t<li>\n\tHTML lexer fixed to allow \"?&gt;\" in comments in Basic script.\n\t</li>\n\t<li>\n\tAdded key codes for Windows key and Menu key.\n\t</li>\n\t<li>\n\tLua script method scite.MenuCommand(x) performs a menu command.\n\t</li>\n\t<li>\n\tSciTE bug fixed with box comment command near start of file setting selection to end of file.\n\t</li>\n\t<li>\n\tSciTE on GTK+, fixed loop that occurred with automatic loading for an unreadable file.\n\t</li>\n\t<li>\n\tSciTE asks whether to save files when Windows shuts down.\n\t</li>\n\t<li>\n\tSave Session on Windows now defaults the extension to \"ses\".\n\t</li>\n\t<li>\n\tBug fixed with single character keywords.\n\t</li>\n\t<li>\n\tFixed infinite loop for SCI_GETCOLUMN for position beyond end of document.\n\t</li>\n\t<li>\n\tFixed failure to accept typing on Solaris/GTK+ when using default ISO-8859-1 encoding.\n\t</li>\n\t<li>\n\tFixed warning from Lua in SciTE when creating a new buffer when already have\n\tmaximum number of buffers open.\n\t</li>\n\t<li>\n\tCrash fixed with \"%%\" at end of batch file.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite171.zip?download\">Release 1.71</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased on 21 August 2006.\n\t</li>\n\t<!--li>\n\tOn GTK+ drag and drop defaults to move rather than copy.\n\t</li-->\n\t<li>\n\tDouble click notification includes line and position.\n\t</li>\n\t<li>\n\tVB lexer bugs fixed for preprocessor directive below a comment or some other states and\n\tto use string not closed style back to the starting quote when there are internal doubled quotes.\n\t</li>\n\t<li>\n\tC++ lexer allows identifiers to contain '$' and non-ASCII characters such as UTF-8.\n\tThe '$' character can be disallowed with lexer.cpp.allow.dollars=0.\n\t</li>\n\t<li>\n\tPerl lexer allows UTF-8 identifiers and has some other small improvements.\n\t</li>\n\t<li>\n\tSciTE's $(CurrentWord) uses word.characters.&lt;filepattern&gt; to define the word\n\trather than a hardcoded list of word characters.\n\t</li>\n\t<li>\n\tSciTE Export as HTML adds encoding information for UTF-8 file and fixes DOCTYPE.\n\t</li>\n\t<li>\n\tSciTE session and .recent files default to the user properties directory rather than global\n\tproperties directory.\n\t</li>\n\t<li>\n\tLeft and right scroll events handled correctly on GTK+ and horizontal scroll bar has more sensible\n\tdistances for page and arrow clicks.\n\t</li>\n\t<li>\n\tSciTE on GTK+ tab bar fixed to work on recent versions of GTK+.\n\t</li>\n\t<li>\n\tOn GTK+, if the approximate character set conversion is unavailable, a second attempt is made\n\twithout approximations. This may allow keyboard input and paste to work on older systems.\n\t</li>\n\t<li>\n\tSciTE on GTK+ can redefine the Insert key.\n\t</li>\n\t<li>\n\tSciTE scripting interface bug fixed where some string properties could not be changed.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite170.zip?download\">Release 1.70</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased on 20 June 2006.\n\t</li>\n\t<li>\n\tOn GTK+, character set conversion is performed using an option that allows approximate conversions rather\n\tthan failures when a character can not be converted. This may lead to similar characters being inserted or\n\twhen no similar character is available a '?' may be inserted.\n\t</li>\n\t<li>\n\tOn GTK+, the internationalized IM (Input Method) feature is used for all typed input for all character sets.\n\t</li>\n\t<li>\n\tScintilla has new margin types SC_MARGIN_BACK and SC_MARGIN_FORE that use the default\n\tstyle's background and foreground colours (normally white and black) as the background to the margin.\n\t</li>\n\t<li>\n\tScintilla/GTK+ allows file drops on Windows when drop is of type DROPFILES_DND\n\tas well as text/uri-list.\n\t</li>\n\t<li>\n\tCode page can only be set to one of the listed valid values.\n\t</li>\n\t<li>\n\tText wrapping fixed for cases where insertion was not wide enough to trigger\n\twrapping before being styled but was after styling.\n\t</li>\n\t<li>\n\tSciTE find marks are removed before printing or exporting to avoid producing incorrect styles.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite169.zip?download\">Release 1.69</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased on 29 May 2006.\n\t</li>\n\t<li>\n\tSciTE supports z-order based buffer switching on Ctrl+Tab.\n\t</li>\n\t<li>\n\tTranslucent support for selection and whole line markers.\n\t</li>\n\t<li>\n\tSciTE may have per-language abbreviations files.\n\t</li>\n\t<li>\n\tSupport for Spice language.\n\t</li>\n\t<li>\n\tOn GTK+ autocompletion lists are optimized and use correct selection colours.\n\t</li>\n\t<li>\n\tOn GTK+ the URI data type is preferred in drag and drop so that applications\n\twill see files dragged from the shell rather than dragging the text of the file name\n\tinto the document.\n\t</li>\n\t<li>\n\tIncreased number of margins to 5.\n\t</li>\n\t<li>\n\tBasic lexer allows include directive $include: \"file name\".\n\t</li>\n\t<li>\n\tSQL lexer no longer bases folding on indentation.\n\t</li>\n\t<li>\n\tLine ends are transformed when copied to clipboard on\n\tWindows/GTK+2 as well as Windows/GTK+ 1.\n\t</li>\n\t<li>\n\tLexing code masks off the indicator bits on the start style before calling the lexer\n\tto avoid confusing the lexer when an application has used an indicator.\n\t</li>\n\t<li>\n\tSciTE savebefore:yes only saves the file when it has been changed.\n\t</li>\n\t<li>\n\tSciTE adds output.initial.hide setting to allow setting the size of the output pane\n\twithout it showing initially.\n\t</li>\n\t<li>\n\tSciTE on Windows Go To dialog allows line number with more digits.\n\t</li>\n\t<li>\n\tBug in HTML lexer fixed where a segment of PHP could switch scripting language\n\tbased on earlier text on that line.\n\t</li>\n\t<li>\n\tMemory bug fixed when freeing regions on GTK+.\n\tOther minor bugs fixed on GTK+.\n\t</li>\n\t<li>\n\tDeprecated GTK+ calls in Scintilla replaced with current calls.\n\t</li>\n\t<li>\n\tFixed a SciTE bug where closing the final buffer, if read-only, left the text present in an\n\tuntitled buffer.\n\t</li>\n\t<li>\n\tBug fixed in bash lexer that prevented folding.\n\t</li>\n\t<li>\n\tCrash fixed in bash lexer when backslash at end of file.\n\t</li>\n\t<li>\n\tCrash on recent releases of GTK+ 2.x avoided by changing default font from X\n\tcore font to Pango font \"!Sans\".\n\t</li>\n\t<li>\n\tFix for SciTE properties files where multiline properties continued over completely blank lines.\n\t</li>\n\t<li>\n\tBug fixed in SciTE/GTK+ director interface where more data available than\n\tbuffer size.\n\t</li>\n\t<li>\n\tMinor visual fixes to SciTE splitter on GTK+.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite168.zip?download\">Release 1.68</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased on 9 March 2006.\n\t</li>\n\t<li>\n\tTranslucent drawing implemented for caret line and box indicators.\n\t</li>\n\t<li>\n\tLexer specifically for TCL is much more accurate than reusing C++ lexer.\n\t</li>\n\t<li>\n\tSupport for Inno Setup scripts.\n\t</li>\n\t<li>\n\tSupport for Opal language.\n\t</li>\n\t<li>\n\tCalltips may use a new style, STYLE_CALLTIP which allows choosing a\n\tdifferent font for calltips.\n\t</li>\n\t<li>\n\tPython lexer styles comments on decorators.\n\t</li>\n\t<li>\n\tHTML lexer refined handling of \"?>\" and \"%>\" within server\n\tside scripts.\n\t</li>\n\t<li>\n\tBatch file lexer improved.\n\t</li>\n\t<li>\n\tEiffel lexer doesn't treat '.' as a name character.\n\t</li>\n\t<li>\n\tLua lexer handles length operator, #, and hex literals.\n\t</li>\n\t<li>\n\tProperties file lexer has separate style for keys.\n\t</li>\n\t<li>\n\tPL/SQL folding improved.\n\t</li>\n\t<li>\n\tSciTE Replace dialog always searches in forwards direction.\n\t</li>\n\t<li>\n\tSciTE can detect language of file from initial #! line.\n\t</li>\n\t<li>\n\tSciTE on GTK+ supports output.scroll=2 setting.\n\t</li>\n\t<li>\n\tSciTE can perform an import a properties file from the command line.\n\t</li>\n\t<li>\n\tSet of word characters used for regular expression \\&lt; and \\&gt;.\n\t</li>\n\t<li>\n\tBug fixed with SCI_COPYTEXT stopping too early.\n\t</li>\n\t<li>\n\tBug fixed with splitting lines so that all lines are split.\n\t</li>\n\t<li>\n\tSciTE calls OnSwitchFile when closing one buffer causes a switch to another.\n\t</li>\n\t<li>\n\tSciTE bug fixed where properties were being reevaluated without good reason\n\tafter running a macro.\n\t</li>\n\t<li>\n\tCrash fixed when clearing document with some lines contracted in word wrap mode.\n\t</li>\n\t<li>\n\tPalette expands as more entries are needed.\n\t</li>\n\t<li>\n\tSCI_POSITIONFROMPOINT returns more reasonable value when close to\n\tlast text on a line.\n\t</li>\n\t<li>\n\tOn Windows, long pieces of text may be drawn in segments if they fail to draw\n\tas a whole.\n\t</li>\n\t<li>\n\tBug fixed with bad drawing when some visual changes made inside SCN_UPDATEUI\n\tnotification.\n\t</li>\n\t<li>\n\tSciTE bug fixed with groupundo setting.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite167.zip?download\">Release 1.67</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased on 17 December 2005.\n\t</li>\n\t<li>\n\tScintilla checks the paint region more accurately when seeing if an area is being\n\trepainted. Platform layer implementations may need to change for this to take\n\teffect. This fixes some drawing and styling bugs. Also optimized some parts of\n\tmarker code to only redraw the line of the marker rather than whole of the margin.\n\t</li>\n\t<li>\n\tQuoted identifier style for SQL. SQL folding performed more simply.\n\t</li>\n\t<li>\n\tRuby lexer improved to better handle here documents and non-ASCII\n\tcharacters.\n\t</li>\n\t<li>\n\tLua lexer supports long string and block comment syntax from Lua 5.1.\n\t</li>\n\t<li>\n\tBash lexer handles here documents better.\n\t</li>\n\t<li>\n\tJavaScript lexing recognizes regular expressions more accurately and includes flag\n\tcharacters in the regular expression style. This is both in JavaScript files and when\n\tJavaScript is embedded in HTML.\n\t</li>\n\t<li>\n\tScintilla API provided to reveal how many style bits are needed for the\n\tcurrent lexer.\n\t</li>\n\t<li>\n\tSelection duplicate added.\n\t</li>\n\t<li>\n\tScintilla API for adding a set of markers to a line.\n\t</li>\n\t<li>\n\tDBCS encodings work on Windows 9x.\n\t</li>\n\t<li>\n\tConvention defined for property names to be used by lexers and folders\n\tso they can be automatically discovered and forwarded from containers.\n\t</li>\n\t<li>\n\tDefault bookmark in SciTE changed to a blue sphere image.\n\t</li>\n\t<li>\n\tSciTE stores the time of last asking for a save separately for each buffer\n\twhich fixes bugs with automatic reloading.\n\t</li>\n\t<li>\n\tOn Windows, pasted text has line ends converted to current preference.\n\tGTK+ already did this.\n\t</li>\n\t<li>\n\tKid template language better handled by HTML lexer by finishing ASP Python\n\tmode when a ?> is found.\n\t</li>\n\t<li>\n\tSciTE counts number of characters in a rectangular selection correctly.\n\t</li>\n\t<li>\n\t64-bit compatibility improved. One change that may affect user code is that\n\tthe notification message header changed to include a pointer-sized id field\n\tto match the current Windows definition.\n\t</li>\n\t<li>\n\tEmpty ranges can no longer be dragged.\n\t</li>\n\t<li>\n\tCrash fixed when calls made that use layout inside the painted notification.\n\t</li>\n\t<li>\n\tBug fixed where Scintilla created pixmap buffers that were too large leading\n\tto failures when many instances used.\n\t</li>\n\t<li>\n\tSciTE sets the directory of a new file to the directory of the currently\n\tactive file.\n\t</li>\n\t<li>\n\tSciTE allows choosing a code page for the output pane.\n\t</li>\n\t<li>\n\tSciTE HTML exporter no longer honours monospaced font setting.\n\t</li>\n\t<li>\n\tLine layout cache in page mode caches the line of the caret. An assertion is\n\tnow used to ensure that the layout reentrancy problem that caused this\n\tis easier to find.\n\t</li>\n\t<li>\n\tSpeed optimized for long lines and lines containing many control characters.\n\t</li>\n\t<li>\n\tBug fixed in brace matching in DBCS files where byte inside character\n\tis same as brace.\n\t</li>\n\t<li>\n\tIndent command does not indent empty lines.\n\t</li>\n\t<li>\n\tSciTE bug fixed for commands that operate on files with empty extensions.\n\t</li>\n\t<li>\n\tSciTE bug fixed where monospaced option was copied for subsequently opened files.\n\t</li>\n\t<li>\n\tSciTE on Windows bug fixed in the display of a non-ASCII search string\n\twhich can not be found.\n\t</li>\n\t<li>\n\tBugs fixed with nested calls displaying a new calltip while one is already\n\tdisplayed.\n\t</li>\n\t<li>\n\tBug fixed when styling PHP strings.\n\t</li>\n\t<li>\n\tBug fixed when styling C++ continued preprocessor lines.\n\t</li>\n\t<li>\n\tSciTE bug fixed where opening file from recently used list reset choice of\n\tlanguage.\n\t</li>\n\t<li>\n\tSciTE bug fixed when compiled with NO_EXTENSIONS and\n\tclosing one file closes the application.\n\t</li>\n\t<li>\n\tSciTE crash fixed for error messages that look like Lua messages but aren't\n\tin the same order.\n\t</li>\n\t<li>\n\tRemaining fold box support deprecated. The symbols SC_FOLDLEVELBOXHEADERFLAG,\n   SC_FOLDLEVELBOXFOOTERFLAG, SC_FOLDLEVELCONTRACTED,\n   SC_FOLDLEVELUNINDENT, and SC_FOLDFLAG_BOX are deprecated.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite166.zip?download\">Release 1.66</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased on 26 August 2005.\n\t</li>\n\t<li>\n\tNew, more ambitious Ruby lexer.\n\t</li>\n\t<li>\n\tSciTE Find in Files dialog has options for matching case and whole words which are\n\tenabled when the internal find command is used.\n\t</li>\n\t<li>\n\tSciTE output pane can display automatic completion after \"$(\" typed.\n\tAn initial \">\" on a line is ignored when Enter pressed.\n\t</li>\n\t<li>\n\tC++ lexer recognizes keywords within line doc comments. It continues styles over line\n\tend characters more consistently so that eolfilled style can be used for preprocessor lines\n\tand line comments.\n\t</li>\n\t<li>\n\tVB lexer improves handling of file numbers and date literals.\n\t</li>\n\t<li>\n\tLua folder handles repeat until, nested comments and nested strings.\n\t</li>\n\t<li>\n\tPOV lexer improves handling of comment lines.\n\t</li>\n\t<li>\n\tAU3 lexer and folder updated. COMOBJ style added.\n\t</li>\n\t<li>\n\tBug fixed with text display on GTK+ with Pango 1.8.\n\t</li>\n\t<li>\n\tCaret painting avoided when not focused.\n\t</li>\n\t<li>\n\tSciTE on GTK+ handles file names used to reference properties as case-sensitive.\n\t</li>\n\t<li>\n\tSciTE on GTK+ Save As and Export commands set the file name field.\n\tOn GTK+ the Export commands modify the file name in the same way as on Windows.\n\t</li>\n\t<li>\n\tFixed SciTE problem where confirmation was not displaying when closing a file where all\n\tcontents had been deleted.\n\t</li>\n\t<li>\n\tMiddle click on SciTE tab now closes correct buffer on Windows when tool bar is visible.\n\t</li>\n\t<li>\n\tSciTE bugs fixed where files contained in directory that includes '.' character.\n\t</li>\n\t<li>\n\tSciTE bug fixed where import in user options was reading file from directory of\n\tglobal options.\n\t</li>\n\t<li>\n\tSciTE calltip bug fixed where single line calltips had arrow displayed incorrectly.\n\t</li>\n\t<li>\n\tSciTE folding bug fixed where empty lines were shown for no reason.\n\t</li>\n\t<li>\n\tBug fixed where 2 byte per pixel XPM images caused crash although they are still not\n\tdisplayed.\n\t</li>\n\t<li>\n\tAutocompletion list size tweaked.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite165.zip?download\">Release 1.65</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased on 1 August 2005.\n\t</li>\n\t<li>\n\tFreeBasic support.\n\t</li>\n\t<li>\n\tSciTE on Windows handles command line arguments\n\t\"-\" (read standard input into buffer),\n\t\"--\" (read standard input into output pane) and\n\t\"-@\" (read file names from standard input and open each).\n\t</li>\n\t<li>\n\tSciTE includes a simple implementation of Find in Files which is used if no find.command is set.\n\t</li>\n\t<li>\n\tSciTE can close tabs with a mouse middle click.\n\t</li>\n\t<li>\n\tSciTE includes a save.all.for.build setting.\n\t</li>\n\t<li>\n\tFolder for MSSQL.\n\t</li>\n\t<li>\n\tBatch file lexer understands more of the syntax and the behaviour of built in commands.\n\t</li>\n\t<li>\n\tPerl lexer handles here docs better; disambiguates barewords, quote-like delimiters, and repetition operators;\n\thandles Pods after __END__; recognizes numbers better; and handles some typeglob special variables.\n\t</li>\n\t<li>\n\tLisp adds more lexical states.\n\t</li>\n\t<li>\n\tPHP allows spaces after &lt;&lt;&lt;.\n\t</li>\n\t<li>\n\tTADS3 has a simpler set of states and recognizes identifiers.\n\t</li>\n\t<li>\n\tAvenue elseif folds better.\n\t</li>\n\t<li>\n\tErrorlist lexer treats lines starting with '+++' and '---' as separate\n\tstyles from '+' and '-' as they indicate file names in diffs.\n\t</li>\n\t<li>\n\tSciTE error recognizer handles file paths in extra explanatory lines from MSVC\n\tand in '+++' and '---' lines from diff.\n\t</li>\n\t<li>\n\tBugs fixed in SciTE and Scintilla folding behaviour when text pasted before\n\tfolded text caused unnecessary\n\tunfolding and cutting text could lead to text being irretrievably hidden.\n\t</li>\n\t<li>\n\tSciTE on Windows uses correct font for dialogs and better font for tab bar\n\tallowing better localization\n\t</li>\n\t<li>\n\tWhen Windows is used with a secondary monitor before the primary\n\tmonitor, autocompletion lists are not forced onto the primary monitor.\n\t</li>\n\t<li>\n\tScintilla calltip bug fixed where down arrow setting wrong value in notification\n\tif not in first line. SciTE bug fixed where second arrow only shown on multiple line\n\tcalltip and was therefore misinterpreting the notification value.\n\t</li>\n\t<li>\n\tLexers will no longer be re-entered recursively during, for example, fold level setting.\n\t</li>\n\t<li>\n\tUndo of typing in overwrite mode undoes one character at a time rather than requiring a removal\n\tand addition step for each character.\n\t</li>\n\t<li>\n\tEM_EXSETSEL(0,-1) fixed.\n\t</li>\n\t<li>\n\tBug fixed where part of a rectangular selection was not shown as selected.\n\t</li>\n\t<li>\n\tAutocomplete window size fixed.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite164.zip?download\">Release 1.64</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased on 6 June 2005.\n\t</li>\n\t<li>\n\tTADS3 support\n\t</li>\n\t<li>\n\tSmalltalk support.\n\t</li>\n\t<li>\n\tRebol support.\n\t</li>\n\t<li>\n\tFlagship (Clipper / XBase) support.\n\t</li>\n\t<li>\n\tCSound support.\n\t</li>\n\t<li>\n\tSQL enhanced to support SQL*Plus.\n\t</li>\n\t<li>\n\tSC_MARK_FULLRECT margin marker fills the whole marker margin for marked\n\tlines with a colour.\n\t</li>\n\t<li>\n\tPerformance improved for some large undo and redo operations and modification flags\n\tadded in notifications.\n\t</li>\n\t<li>\n\tSciTE adds command equivalents for fold margin mouse actions.\n\t</li>\n\t<li>\n\tSciTE adds OnUpdateUI to set of events that can be handled by a Lua script.\n\t</li>\n\t<li>\n\tProperties set in Scintilla can be read.\n\t</li>\n\t<li>\n\tGTK+ SciTE exit confirmation adds Cancel button.\n\t</li>\n\t<li>\n\tMore accurate lexing of numbers in PHP and Caml.\n\t</li>\n\t<li>\n\tPerl can fold POD and package sections. POD verbatim section style.\n\tGlobbing syntax recognized better.\n\t</li>\n\t<li>\n\tContext menu moved slightly on GTK+ so that it will be under the mouse and will\n\tstay open if just clicked rather than held.\n\t</li>\n\t<li>\n\tRectangular selection paste works the same whichever direction the selection was dragged in.\n\t</li>\n\t<li>\n\tEncodedFromUTF8 handles -1 length argument as documented.\n\t</li>\n\t<li>\n\tUndo and redo can cause SCN_MODIFYATTEMPTRO notifications.\n\t</li>\n\t<li>\n\tIndicators display correctly when they start at the second character on a line.\n\t</li>\n\t<li>\n\tSciTE Export As HTML uses standards compliant CSS.\n\t</li>\n\t<li>\n\tSciTE automatic indentation handles keywords for indentation better.\n\t</li>\n\t<li>\n\tSciTE fold.comment.python property removed as does not work.\n\t</li>\n\t<li>\n\tFixed problem with character set conversion when pasting on GTK+.\n\t</li>\n\t<li>\n\tSciTE default character set changed from ANSI_CHARSET to DEFAULT_CHARSET.\n\t</li>\n\t<li>\n\tFixed crash when creating empty autocompletion list.\n\t</li>\n\t<li>\n\tAutocomplete window size made larger under some conditions to make truncation less common.\n\t</li>\n\t<li>\n\tBug fixed where changing case of a selection did not affect initial character of lines\n\tin multi-byte encodings.\n\t</li>\n\t<li>\n\tBug fixed where rectangular selection not displayed after Alt+Shift+Click.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite163.zip?download\">Release 1.63</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased on 4 April 2005.\n\t</li>\n\t<li>\n\tAutocompletion on Windows changed to use pop up window, be faster,\n\tallow choice of maximum width and height, and to highlight only the text of the\n\tselected item rather than both the text and icon if any.\n\t</li>\n\t<li>\n\tExtra items can be added to the context menu in SciTE.\n\t</li>\n\t<li>\n\tCharacter wrap mode in Scintilla helps East Asian languages.\n\t</li>\n\t<li>\n\tLexer added for Haskell.\n\t</li>\n\t<li>\n\tObjective Caml support.\n\t</li>\n\t<li>\n\tBlitzBasic and PureBasic support.\n\t</li>\n\t<li>\n\tCSS support updated to handle CSS2.\n\t</li>\n\t<li>\n\tC++ lexer is more selective about document comment keywords.\n\t</li>\n\t<li>\n\tAutoIt 3 lexer improved.\n\t</li>\n\t<li>\n\tLua lexer styles end of line characters on comment and preprocessor\n\tlines so that the eolfilled style can be applied to them.\n\t</li>\n\t<li>\n\tNSIS support updated for line continuations, box comments, SectionGroup and\n\tPageEx, and with more up-to-date properties.\n\t</li>\n\t<li>\n\tClarion lexer updated to perform folding and have more styles.\n\t</li>\n\t<li>\n\tSQL lexer gains second set of keywords.\n\t</li>\n\t<li>\n\tErrorlist lexer recognizes Borland Delphi error messages.\n\t</li>\n\t<li>\n\tMethod added for determining number of visual lines occupied by a document\n\tline due to wrapping.\n\t</li>\n\t<li>\n\tSticky caret mode does not modify the preferred caret x position when typing\n\tand may be useful for typing columns of text.\n\t</li>\n\t<li>\n\tDwell end notification sent when scroll occurs.\n\t</li>\n\t<li>\n\tOn GTK+, Scintilla requisition height is screen height rather than large fixed value.\n\t</li>\n\t<li>\n\tCase insensitive autocompletion prefers exact case match.\n\t</li>\n\t<li>\n\tSCI_PARADOWN and SCI_PARAUP treat lines containing only white\n\tspace as empty and handle text hidden by folding.\n\t</li>\n\t<li>\n\tScintilla on Windows supports WM_PRINTCLIENT although there are some\n\tlimitations.\n\t</li>\n\t<li>\n\tSCN_AUTOCSELECTION notification sent when user selects from autoselection list.\n\t</li>\n\t<li>\n\tSciTE's standard properties file sets buffers to 10, uses Pango fonts on GTK+ and\n\thas dropped several languages to make the menu fit on screen.\n\t</li>\n\t<li>\n\tSciTE's encoding cookie detection loosened so that common XML files will load\n\tin UTF-8 if that is their declared encoding.\n\t</li>\n\t<li>\n\tSciTE on GTK+ changes menus and toolbars to not be detachable unless turned\n\ton with a property. Menus no longer tear off. The toolbar may be set to use the\n\tdefault theme icons rather than SciTE's set. Changed key for View | End of Line\n\tbecause of a conflict. Language menu can contain more items.\n\t</li>\n\t<li>\n\tSciTE on GTK+ 2.x allows the height and width of the file open file chooser to\n\tbe set, for the show hidden files check box to be set from an option and for it\n\tto be opened in the directory of the current file explicitly. Enter key works in\n\tsave chooser.\n\t</li>\n\t<li>\n\tScintilla lexers should no longer see bits in style bytes that are outside the set\n\tthey modify so should be able to correctly lex documents where the container\n\thas used indicators.\n\t</li>\n\t<li>\n\tSciTE no longer asks to save before performing a revert.\n\t</li>\n\t<li>\n\tSciTE director interface adds a reloadproperties command to reload properties\n\tfrom files.\n\t</li>\n\t<li>\n\tAllow build on CYGWIN platform.\n\t</li>\n\t<li>\n\tAllow use from LccWin compiler.\n\t</li>\n\t<li>\n\tSCI_COLOURISE for SCLEX_CONTAINER causes a\n\tSCN_STYLENEEDED notification.\n\t</li>\n\t<li>\n\tBugs fixed in lexing of HTML/ASP/JScript.\n\t</li>\n\t<li>\n\tFix for folding becoming confused.\n\t</li>\n\t<li>\n\tOn Windows, fixes for Japanese Input Method Editor and for 8 bit Katakana\n\tcharacters.\n\t</li>\n\t<li>\n\tFixed buffer size bug avoided when typing long words by making buffer bigger.\n\t</li>\n\t<li>\n\tUndo after automatic indentation more sensible.\n\t</li>\n\t<li>\n\tSciTE menus on GTK+ uses Shift and Ctrl rather than old style abbreviations.\n\t</li>\n\t<li>\n\tSciTE full screen mode on Windows calculates size more correctly.\n\t</li>\n\t<li>\n\tSciTE on Windows menus work better with skinning applications.\n\t</li>\n\t<li>\n\tSearching bugs fixed.\n\t</li>\n\t<li>\n\tColours reallocated when changing image using SCI_REGISTERIMAGE.\n\t</li>\n\t<li>\n\tCaret stays visible when Enter held down.\n\t</li>\n\t<li>\n\tUndo of automatic indentation more reasonable.\n\t</li>\n\t<li>\n\tHigh processor usage fixed in background wrapping under some\n\tcircumstances.\n\t</li>\n\t<li>\n\tCrashing bug fixed on AMD64.\n\t</li>\n\t<li>\n\tSciTE crashing bug fixed when position.height or position.width not set.\n\t</li>\n\t<li>\n\tCrashing bug on GTK+ fixed when setting cursor and window is NULL.\n\t</li>\n\t<li>\n\tCrashing bug on GTK+ preedit window fixed.\n\t</li>\n\t<li>\n\tSciTE crashing bug fixed in incremental search on Windows ME.\n\t</li>\n\t<li>\n\tSciTE on Windows has an optional find and replace dialogs that can search through\n\tall buffers and search within a particular style number.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite162.zip?download\">Release 1.62</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased on 31 October 2004.\n\t</li>\n\t<li>\n\tLexer added for ASN.1.\n\t</li>\n\t<li>\n\tLexer added for VHDL.\n\t</li>\n\t<li>\n\tOn Windows, an invisible system caret is used to allow screen readers to determine\n\twhere the caret is. The visible caret is still drawn by the painting code.\n\t</li>\n\t<li>\n\tOn GTK+, Scintilla has methods to read the target as UTF-8 and to convert\n\ta string from UTF-8 to the document encoding. This eases integration with\n\tcontainers that use the UTF-8 encoding which is the API encoding for GTK+ 2.\n\t</li>\n\t<li>\n\tSciTE on GTK+2 and Windows NT/2000/XP allows search and replace of Unicode text.\n\t</li>\n\t<li>\n\tSciTE calltips allow setting the characters used to start and end parameter lists and\n\tto separate parameters.\n\t</li>\n\t<li>\n\tFindColumn method converts a line and column into a position, taking into account\n\ttabs and multi-byte characters.\n\t</li>\n\t<li>\n\tOn Windows, when Scintilla copies text to the clipboard as Unicode, it avoids\n\tadding an ANSI copy as the system will automatically convert as required in\n\ta context-sensitive manner.\n\t</li>\n\t<li>\n\tSciTE indent.auto setting automatically determines indent.size and use.tabs from\n\tdocument contents.\n\t</li>\n\t<li>\n\tSciTE defines a CurrentMessage property that holds the most recently selected\n\toutput pane message.\n\t</li>\n\t<li>\n\tSciTE Lua scripting enhanced with\n\t<ul>\n\t<li>A Lua table called 'buffer' is associated with each buffer and can be used to\n\tmaintain buffer-specific state.</li>\n\t<li>A 'scite' object allows interaction with the application such as opening\n\tfiles from script.</li>\n\t<li>Dynamic properties can be reset by assigning nil to a given key in\n\tthe props table.</li>\n\t<li>An 'OnClear' event fires whenever properties and extension scripts are\n\tabout to be reloaded.</li>\n\t<li>On Windows, loadlib is enabled and can be used to access Lua\n\tbinary modules / DLLs.</li></ul>\n\t</li>\n\t<li>\n\tSciTE Find in Files on Windows can be used in a modeless way and gains a '..'\n\tbutton to move up to the parent directory. It is also wider so that longer paths\n\tcan be seen.\n\t</li>\n\t<li>\n\tClose buttons added to dialogs in SciTE on Windows.\n\t</li>\n\t<li>\n\tSciTE on GTK+ 2 has a \"hidden files\" check box in file open dialog.\n\t</li>\n\t<li>\n\tSciTE use.monospaced setting removed. More information in the\n\t<a href=\"SciTEFAQ.html\">FAQ</a>.\n\t</li>\n\t<li>\n\tAPDL lexer updated with more lexical classes\n\t</li>\n\t<li>\n\tAutoIt3 lexer updated.\n\t</li>\n\t<li>\n\tAda lexer fixed to support non-ASCII text.\n\t</li>\n\t<li>\n\tCpp lexer now only matches exactly three slashes as starting a doc-comment so that\n\tlines of slashes are seen as a normal comment.\n\tLine ending characters are appear in default style on preprocessor and single line\n\tcomment lines.\n\t</li>\n\t<li>\n\tCSS lexer updated to support CSS2 including second set of keywords.\n\t</li>\n\t<li>\n\tErrorlist lexer now understands Java stack trace lines.\n\t</li>\n\t<li>\n\tSciTE's handling of HTML Tidy messages jumps to column as well as line indicated.\n\t</li>\n\t<li>\n\tLisp lexer allows multiline strings.\n\t</li>\n\t<li>\n\tLua lexer treats .. as an operator when between identifiers.\n\t</li>\n\t<li>\n\tPHP lexer handles 'e' in numerical literals.\n\t</li>\n\t<li>\n\tPowerBasic lexer updated for macros and optimized.\n\t</li>\n\t<li>\n\tProperties file folder changed to leave lines before a header at the base level\n\tand thus avoid a vertical line when using connected folding symbols.\n\t</li>\n\t<li>\n\tGTK+ on Windows version uses Alt for rectangular selection to be compatible with\n\tplatform convention.\n\t</li>\n\t<li>\n\tSciTE abbreviations file moved from system directory to user directory\n\tso each user can have separate abbreviations.\n\t</li>\n\t<li>\n\tSciTE on GTK+ has improved .desktop file and make install support that may\n\tlead to better integration with system shell.\n\t</li>\n\t<li>\n\tDisabling of themed background drawing on GTK+ extended to all cases.\n\t</li>\n\t<li>\n\tSciTE date formatting on Windows performed with the user setting rather than the\n\tsystem setting.\n\t</li>\n\t<li>\n\tGTK+ 2 redraw while scrolling fixed.\n\t</li>\n\t<li>\n\tRecursive property definitions are safer, avoiding expansion when detected.\n\t</li>\n\t<li>\n\tSciTE thread synchronization for scripts no longer uses HWND_MESSAGE\n\tso is compatible with older versions of Windows.\n\tOther Lua scripting bugs fixed.\n\t</li>\n\t<li>\n\tSciTE on Windows localization of menu accelerators changed to be compatible\n\twith alternative UI themes.\n\t</li>\n\t<li>\n\tSciTE on Windows full screen mode now fits better when menu different height\n\tto title bar height.\n\t</li>\n\t<li>\n\tSC_MARK_EMPTY marker is now invisible and does not change the background\n\tcolour.\n\t</li>\n\t<li>\n\tBug fixed in HTML lexer to allow use of &lt;?xml in strings in scripts without\n\ttriggering xml mode.\n\t</li>\n\t<li>\n\tBug fixed in SciTE abbreviation expansion that could break indentation or crash.\n\t</li>\n\t<li>\n\tBug fixed when searching for a whole word string that ends one character before\n\tend of document.\n\t</li>\n\t<li>\n\tDrawing bug fixed when indicators drawn on wrapped lines.\n\t</li>\n\t<li>\n\tBug fixed when double clicking a hotspot.\n\t</li>\n\t<li>\n\tBug fixed where autocompletion would remove typed text if no match found.\n\t</li>\n\t<li>\n\tBug fixed where display does not scroll when inserting in long wrapped line.\n\t</li>\n\t<li>\n\tBug fixed where SCI_MARKERDELETEALL would only remove one of the markers\n\ton a line that contained multiple markers with the same number.\n\t</li>\n\t<li>\n\tBug fixed where markers would move when converting line endings.\n\t</li>\n\t<li>\n\tBug fixed where SCI_LINEENDWRAP would move too far when line ends are visible.\n\t</li>\n\t<li>\n\tBugs fixed where calltips with unicode or other non-ASCII text would display\n\tincorrectly.\n\t</li>\n\t<li>\n\tBug fixed in determining if at save point after undoing from save point and then\n\tperforming changes.\n\t</li>\n\t<li>\n\tBug fixed on GTK+ using unsupported code pages where extraneous text could\n\tbe drawn.\n\t</li>\n\t<li>\n\tBug fixed in drag and drop code on Windows where dragging from SciTE to\n\tFirefox could hang both applications.\n\t</li>\n\t<li>\n\tCrashing bug fixed on GTK+ when no font allocation succeeds.\n\t</li>\n\t<li>\n\tCrashing bug fixed when autocompleting word longer than 1000 characters.\n\t</li>\n\t<li>\n\tSciTE crashing bug fixed when both Find and Replace dialogs shown by disallowing\n\tthis situation.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite161.zip?download\">Release 1.61</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased on 29 May 2004.\n\t</li>\n\t<li>\n\tImprovements to selection handling on GTK+.\n\t</li>\n\t<li>\n\tSciTE on GTK+ 2.4 uses the improved file chooser which allows\n\tfile extension filters, multiple selection, and remembers favourite\n\tdirectories.\n\t</li>\n\t<li>\n\tSciTE Load Session and Save Session commands available on GTK+.\n\t</li>\n\t<li>\n\tSciTE lists Lua Startup Script in Options menu when loaded.\n\t</li>\n\t<li>\n\tIn SciTE, OnUserListSelection can be implemented in Lua.\n\t</li>\n\t<li>\n\tSciTE on Windows has a context menu on the file tabs.\n\t</li>\n\t<li>\n\tSQL lexer allows '#' comments and optionally '\\' quoting inside strings.\n\t</li>\n\t<li>\n\tMssql lexer improved.\n\t</li>\n\t<li>\n\tAutoIt3 lexer updated.\n\t</li>\n\t<li>\n\tPerl lexer recognizes regular expression use better.\n\t</li>\n\t<li>\n\tErrorlist lexer understands Lua tracebacks and copes with findstr\n\toutput for file names that end with digits.\n\t</li>\n\t<li>\n\tDrawing of lines on GTK+ improved and made more like Windows\n\twithout final point.\n\t</li>\n\t<li>\n\tSciTE on GTK+ uses a high resolution window icon.\n\t</li>\n\t<li>\n\tSciTE can be set to warn before loading files larger than a particular size.\n\t</li>\n\t<li>\n\tSciTE Lua scripting bugs fixed included a crashing bug when using\n\tan undefined function name that would go before first actual name.\n\t</li>\n\t<li>\n\tSciTE bug fixed where a modified buffer was not saved if it was\n\tthe last buffer and was not current when the New command used.\n\t</li>\n\t<li>\n\tSciTE monofont mode no longer affects line numbers.\n\t</li>\n\t<li>\n\tCrashing bug in SciTE avoided by not allowing both the Find and Replace\n\tdialogs to be visible at one time.\n\t</li>\n\t<li>\n\tCrashing bug in SciTE fixed when Lua scripts were being run\n\tconcurrently.\n\t</li>\n\t<li>\n\tBug fixed that caused incorrect line number width in SciTE.\n\t</li>\n\t<li>\n\tPHP folding bug fixed.\n\t</li>\n\t<li>\n\tRegression fixed when setting word characters to not include\n\tsome of the standard word characters.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite160.zip?download\">Release 1.60</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased on 1 May 2004.\n\t</li>\n\t<li>\n\tSciTE can be scripted using the Lua programming language.\n\t</li>\n\t<li>\n\tcommand.mode is a better way to specify tool command options in SciTE.\n\t</li>\n\t<li>\n\tContinuation markers can be displayed so that you can see which lines are wrapped.\n\t</li>\n\t<li>\n\tLexer for Gui4Cli language.\n\t</li>\n\t<li>\n\tLexer for Kix language.\n\t</li>\n\t<li>\n\tLexer for Specman E language.\n\t</li>\n\t<li>\n\tLexer for AutoIt3 language.\n\t</li>\n\t<li>\n\tLexer for APDL language.\n\t</li>\n\t<li>\n\tLexer for Bash language. Also reasonable for other Unix shells.\n\t</li>\n\t<li>\n\tSciTE can load lexers implemented in external shared libraries.\n\t</li>\n\t<li>\n\tPerl treats \".\" not as part of an identifier and interprets '/' and '->'\n\tcorrectly in more circumstances.\n\t</li>\n\t<li>\n\tPHP recognizes variables within strings.\n\t</li>\n\t<li>\n\tNSIS has properties \"nsis.uservars\" and \"nsis.ignorecase\".\n\t</li>\n\t<li>\n\tMSSQL lexer adds keyword list for operators and stored procedures,\n\tdefines '(', ')', and ',' as operators and changes some other details.\n\t</li>\n\t<li>\n\tInput method preedit window on GTK+ 2 may support some Asian languages.\n\t</li>\n\t<li>\n\tPlatform interface adds an extra platform-specific flag to Font::Create.\n\tUsed on wxWidgets to choose antialiased text display but may be used for\n\tany task that a platform needs.\n\t</li>\n\t<li>\n\tOnBeforeSave method added to Extension interface.\n\t</li>\n\t<li>\n\tScintilla methods that return strings can be called with a NULL pointer\n\tto find out how long the string should be.\n\t</li>\n\t<li>\n\tVisual Studio .NET project file now in VS .NET 2003 format so can not be used\n\tdirectly in VS .NET 2002.\n\t</li>\n\t<li>\n\tScintilla can be built with GTK+ 2 on Windows.\n\t</li>\n\t<li>\n\tUpdated RPM spec for SciTE on GTK+.\n\t</li>\n\t<li>\n\tGTK+ makefile for SciTE allows selection of destination directory, creates destination\n\tdirectories and sets file modes and owners better.\n\t</li>\n\t<li>\n\tTab indents now go to next tab multiple rather than add tab size.\n\t</li>\n\t<li>\n\tSciTE abbreviations now use the longest possible match rather than the shortest.\n\t</li>\n\t<li>\n\tAutocompletion does not remove prefix when actioned with no choice selected.\n\t</li>\n\t<li>\n\tAutocompletion cancels when moving beyond the start position, not at the start position.\n\t</li>\n\t<li>\n\tSciTE now shows only calltips for functions that match exactly, not\n\tthose that match as a prefix.\n\t</li>\n\t<li>\n\tSciTE can repair box comment sections where some lines were added without\n\tthe box comment middle line prefix.\n\t</li>\n\t<li>\n\tAlt+ works in user.shortcuts on Windows.\n\t</li>\n\t<li>\n\tSciTE on GTK+ enables replace in selection for rectangular selections.\n\t</li>\n\t<li>\n\tKey bindings for command.shortcut implemented in a way that doesn't break\n\twhen the menus are localized.\n\t</li>\n\t<li>\n\tDrawing of background on GTK+ faster as theme drawing disabled.\n\t</li>\n\t<li>\n\tOn GTK+, calltips are moved back onto the screen if they extend beyond the screen bounds.\n\t</li>\n\t<li>\n\tOn Windows, the Scintilla object is destroyed on WM_NCDESTROY rather than\n\tWM_DESTROY which arrives earlier. This fixes some problems when Scintilla was subclassed.\n\t</li>\n\t<li>\n\tThe zorder switching feature removed due to number of crashing bugs.\n\t</li>\n\t<li>\n\tCode for XPM images made more robust.\n\t</li>\n\t<li>\n\tBug fixed with primary selection on GTK+.\n\t</li>\n\t<li>\n\tOn GTK+ 2, copied or cut text can still be pasted after the Scintilla widget is destroyed.\n\t</li>\n\t<li>\n\tStyling change not visible problem fixed when line was cached.\n\t</li>\n\t<li>\n\tBug in SciTE on Windows fixed where clipboard commands stopped working.\n\t</li>\n\t<li>\n\tCrashing bugs in display fixed in line layout cache.\n\t</li>\n\t<li>\n\tCrashing bug may be fixed on AMD64 processor on GTK+.\n\t</li>\n\t<li>\n\tRare hanging crash fixed in Python lexer.\n\t</li>\n\t<li>\n\tDisplay bugs fixed with DBCS characters on GTK+.\n\t</li>\n\t<li>\n\tAutocompletion lists on GTK+ 2 are not sorted by the ListModel as the\n\tcontents are sorted correctly by Scintilla.\n\t</li>\n\t<li>\n\tSciTE fixed to not open extra untitled buffers with check.if.already.open.\n\t</li>\n\t<li>\n\tSizing bug fixed on GTK+ when window resized while unmapped.\n\t</li>\n\t<li>\n\tText drawing crashing bug fixed on GTK+ with non-Pango fonts and long strings.\n\t</li>\n\t<li>\n\tFixed some issues if characters are unsigned.\n\t</li>\n\t<li>\n\tFixes in NSIS support.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite159.zip?download\">Release 1.59</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased on 19 February 2004.\n\t</li>\n\t<li>\n\tSciTE Options and Language menus reduced in length by commenting\n\tout some languages. Languages can be enabled by editing the global\n\tproperties file.\n\t</li>\n\t<li>\n\tVerilog language supported.\n\t</li>\n\t<li>\n\tLexer for Microsoft dialect of SQL. SciTE properties file available from extras page.\n\t</li>\n\t<li>\n\tPerl lexer disambiguates '/' better.\n\t</li>\n\t<li>\n\tNSIS lexer improved with a lexical class for numbers, option for ignoring case\n\tof keywords, and folds only occurring when folding keyword first on line.\n\t</li>\n\t<li>\n\tPowerBasic lexer improved with styles for constants and assembler and\n\tfolding improvements.\n\t</li>\n\t<li>\n\tOn GTK+, input method support only invoked for Asian languages and not\n\tEuropean languages as the old European keyboard code works better.\n\t</li>\n\t<li>\n\tScintilla can be requested to allocate a certain amount and so avoid repeated\n\treallocations and memory inefficiencies. SciTE uses this and so should require\n\tless memory.\n\t</li>\n\t<li>\n\tSciTE's \"toggle current fold\" works when invoked on child line as well as\n\tfold header.\n\t</li>\n\t<li>\n\tSciTE output pane scrolling can be set to not scroll back to start after\n\tcompletion of command.\n\t</li>\n\t<li>\n\tSciTE has a $(SessionPath) property.\n\t</li>\n\t<li>\n\tSciTE on Windows can use VK_* codes for keys in user.shortcuts.\n\t</li>\n\t<li>\n\tStack overwrite bug fixed in SciTE's command to move to the end of a\n\tpreprocessor conditional.\n\t</li>\n\t<li>\n\tBug fixed where vertical selection appeared to select a different set of characters\n\tthen would be used by, for example, a copy.\n\t</li>\n\t<li>\n\tSciTE memory leak fixed in fold state remembering.\n\t</li>\n\t<li>\n\tBug fixed where changing the style of some text outside the\n\tstandard StyleNeeded notification would not be visible.\n\t</li>\n\t<li>\n\tOn GTK+ 2 g_iconv is used in preference to iconv, as it is provided by GTK+\n\tso should avoid problems finding the iconv library.\n\t</li>\n\t<li>\n\tOn GTK+ fixed a style reference count bug.\n\t</li>\n\t<li>\n\tMemory corruption bug fixed with GetSelText.\n\t</li>\n\t<li>\n\tOn Windows Scintilla deletes memory on WM_NCDESTROY rather than\n\tthe earlier WM_DESTROY to avoid problems when the window is subclassed.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite158.zip?download\">Release 1.58</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased on 11 January 2004.\n\t</li>\n\t<li>\n\tMethod to discover the currently highlighted element in an autocompletion list.\n\t</li>\n\t<li>\n\tOn GTK+, the lexers are now included in the scintilla.a library file. This\n\twill require changes to the make files of dependent projects.\n\t</li>\n\t<li>\n\tOctave support added alongside related Matlab language and Matlab support improved.\n\t</li>\n\t<li>\n\tVB lexer gains an unterminated string state and 4 sets of keywords.\n\t</li>\n\t<li>\n\tRuby lexer handles $' correctly.\n\t</li>\n\t<li>\n\tError line handling improved for FORTRAN compilers from Absoft and Intel.\n\t</li>\n\t<li>\n\tInternational input enabled on GTK+ 2 although there is no way to choose an\n\tinput method.\n\t</li>\n\t<li>\n\tMultiplexExtension in SciTE allows multiple extensions to be used at once.\n\t</li>\n\t<li>\n\tRegular expression replace interprets backslash expressions \\a, \\b, \\f, \\n, \\r, \\t,\n\tand \\v in the replacement value.\n\t</li>\n\t<li>\n\tSciTE Replace dialog displays number of replacements made when Replace All or\n\tReplace in Selection performed.\n\t</li>\n\t<li>\n\tLocalization files may contain a translation.encoding setting which is used\n\ton GTK+ 2 to automatically reencode the translation to UTF-8 so it will be\n\tthe localized text will be displayed correctly.\n\t</li>\n\t<li>\n\tSciTE on GTK+ implements check.if.already.open.\n\t</li>\n\t<li>\n\tMake files for Mac OS X made more robust.\n\t</li>\n\t<li>\n\tPerformance improved in SciTE when switching buffers when there\n\tis a rectangular selection.\n\t</li>\n\t<li>\n\tFixed failure to display some text when wrapped.\n\t</li>\n\t<li>\n\tSciTE crashes from Ctrl+Tab buffer cycling fixed.\n\tMay still be some rare bugs here.\n\t</li>\n\t<li>\n\tCrash fixed when decoding an error message that appears similar to a\n\tBorland error message.\n\t</li>\n\t<li>\n\tFix to auto-scrolling allows containers to implement enhanced double click selection.\n\t</li>\n\t<li>\n\tHang fixed in idle word wrap.\n\t</li>\n\t<li>\n\tCrash fixed in hotspot display code..\n\t</li>\n\t<li>\n\tSciTE on Windows Incremental Search no longer moves caret back.\n\t</li>\n\t<li>\n\tSciTE hang fixed when performing a replace with a find string that\n\tmatched zero length strings such as \".*\".\n\t</li>\n\t<li>\n\tSciTE no longer styles the whole file when saving buffer fold state\n\tas that was slow.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite157.zip?download\">Release 1.57</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased on 27 November 2003.\n\t</li>\n\t<li>\n\tSciTE remembers folding of each buffer.\n\t</li>\n\t<li>\n\tLexer for Erlang language.\n\t</li>\n\t<li>\n\tScintilla allows setting the set of white space characters.\n\t</li>\n\t<li>\n\tScintilla has 'stuttered' page movement commands to first move\n\tto top or bottom within current visible lines before scrolling.\n\t</li>\n\t<li>\n\tScintilla commands for moving to end of words.\n\t</li>\n\t<li>\n\tIncremental line wrap enabled on Windows.\n\t</li>\n\t<li>\n\tSciTE PDF exporter produces output that is more compliant with reader\n\tapplications, is smaller and allows more configuration.\n\tHTML exporter optimizes size of output files.\n\t</li>\n\t<li>\n\tSciTE defines properties PLAT_WINNT and PLAT_WIN95 on the\n\tcorresponding platforms.\n\t</li>\n\t<li>\n\tSciTE can adjust the line margin width to fit the largest line number.\n\tThe line.numbers property is split between line.margin.visible and\n\tline.margin.width.\n\t</li>\n\t<li>\n\tSciTE on GTK+ allows user defined menu accelerators.\n\tAlt can be included in user.shortcuts.\n\t</li>\n\t<li>\n\tSciTE Language menu can have items commented out.\n\t</li>\n\t<li>\n\tSciTE on Windows Go to dialog allows choosing a column number as\n\twell as a line number.\n\t</li>\n\t<li>\n\tSciTE on GTK+ make file uses prefix setting more consistently.\n\t</li>\n\t<li>\n\tBug fixed that caused word wrapping to fail to display all text.\n\t</li>\n\t<li>\n\tCrashing bug fixed in GTK+ version of Scintilla when using GDK fonts\n\tand opening autocompletion.\n\t</li>\n\t<li>\n\tBug fixed in Scintilla SCI_GETSELTEXT where an extra NUL\n\twas included at end of returned string\n\t</li>\n\t<li>\n\tCrashing bug fixed in SciTE z-order switching implementation.\n\t</li>\n\t<li>\n\tHanging bug fixed in Perl lexer.\n\t</li>\n\t<li>\n\tSciTE crashing bug fixed for using 'case' without argument in style definition.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite156.zip?download\">Release 1.56</a>\n    </h3>\n    <ul>\n\t<li>\n\tReleased on 25 October 2003.\n\t</li>\n\t<li>\n\tRectangular selection can be performed using the keyboard.\n\tGreater programmatic control over rectangular selection.\n\tThis has caused several changes to key bindings.\n\t</li>\n\t<li>\n\tSciTE Replace In Selection works on rectangular selections.\n\t</li>\n\t<li>\n\tImproved lexer for TeX, new lexer for Metapost and other support for these\n\tlanguages.\n\t</li>\n\t<li>\n\tLexer for PowerBasic.\n\t</li>\n\t<li>\n\tLexer for Forth.\n\t</li>\n\t<li>\n\tYAML lexer improved to include error styling.\n\t</li>\n\t<li>\n\tPerl lexer improved to correctly handle more cases.\n\t</li>\n\t<li>\n\tAssembler lexer updated to support single-quote strings and fix some\n\tproblems.\n\t</li>\n\t<li>\n\tSciTE on Windows can switch between buffers in order of use (z-order) rather\n\tthan static order.\n\t</li>\n\t<li>\n\tSciTE supports adding an extension for \"Open Selected Filename\".\n\tThe openpath setting works on GTK+.\n\t</li>\n\t<li>\n\tSciTE can Export as XML.\n\t</li>\n\t<li>\n\tSciTE $(SelHeight) variable gives a more natural result for empty and whole line\n\tselections.\n\t</li>\n\t<li>\n\tFixes to wrapping problems, such as only first display line being visible in some\n\tcases.\n\t</li>\n\t<li>\n\tFixes to hotspot to only highlight when over the hotspot, only use background\n\tcolour when set and option to limit hotspots to a single line.\n\t</li>\n\t<li>\n\tSmall fixes to FORTRAN lexing and folding.\n\t</li>\n\t<li>\n\tSQL lexer treats single quote strings as a separate class to double quote strings..\n\t</li>\n\t<li>\n\tScintilla made compatible with expectations of container widget in GTK+ 2.3.\n\t</li>\n\t<li>\n\tFix to strip out pixmap ID when automatically choosing from an autocompletion\n\tlist with only one element.\n\t</li>\n\t<li>\n\tSciTE bug fixed where UTF-8 files longer than 128K were gaining more than one\n\tBOM.\n\t</li>\n\t<li>\n\tCrashing bug fixed in SciTE on GTK+ where using \"Stop Executing\" twice leads\n\tto all applications exiting.\n\t</li>\n\t<li>\n\tBug fixed in autocompletion scrolling on GTK+ 2 with a case sensitive list.\n\tThe ListBox::Sort method is no longer needed or available so platform\n\tmaintainers should remove it.\n\t</li>\n\t<li>\n\tSciTE check.if.already.open setting removed from GTK+ version as unmaintained.\n\t</li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite155.zip?download\">Release 1.55</a>\n    </h3>\n    <ul>\n      <li>\n\tReleased on 25 September 2003.\n      </li>\n      <li>\n\tFix a crashing bug in indicator display in Scintilla.\n      </li>\n      <li>\n\tGTK+ version now defaults to building for GTK+ 2 rather than 1.\n      </li>\n      <li>\n\tMingw make file detects compiler version and avoids options\n\tthat are cause problems for some versions.\n      </li>\n      <li>\n\tLarge performance improvement on GTK+ 2 for long lines.\n      </li>\n      <li>\n\tIncremental line wrap on GTK+.\n      </li>\n      <li>\n\tInternational text entry works much better on GTK+ with particular\n\timprovements for Baltic languages and languages that use 'dead' accents.\n\tNUL key events such as those generated by some function keys, ignored.\n      </li>\n      <li>\n\tUnicode clipboard support on GTK+.\n      </li>\n      <li>\n\tIndicator type INDIC_BOX draws a rectangle around the text.\n      </li>\n      <li>\n\tClarion language support.\n      </li>\n      <li>\n\tYAML language support.\n      </li>\n      <li>\n\tMPT LOG language support.\n      </li>\n      <li>\n\tOn Windows, SciTE can switch buffers based on activation order rather\n\tthan buffer number.\n      </li>\n      <li>\n\tSciTE save.on.deactivate saves all buffers rather than just the current buffer.\n      </li>\n      <li>\n\tLua lexer handles non-ASCII characters correctly.\n      </li>\n      <li>\n\tError lexer understands Borland errors with pathnames that contain space.\n      </li>\n      <li>\n\tOn GTK+ 2, autocompletion uses TreeView rather than deprecated CList.\n      </li>\n      <li>\n\tSciTE autocompletion removed when expand abbreviation command used.\n      </li>\n      <li>\n\tSciTE calltips support overloaded functions.\n      </li>\n      <li>\n\tWhen Save fails in SciTE, choice offered to Save As.\n      </li>\n      <li>\n\tSciTE message boxes on Windows may be moved to front when needed.\n      </li>\n      <li>\n\tIndicators drawn correctly on wrapped lines.\n      </li>\n      <li>\n\tRegular expression search no longer matches characters with high bit\n\tset to characters without high bit set.\n      </li>\n      <li>\n\tHang fixed in backwards search in multi byte character documents.\n      </li>\n      <li>\n\tHang fixed in SciTE Mark All command when wrap around turned off.\n      </li>\n      <li>\n\tSciTE Incremental Search no longer uses hot keys on Windows.\n      </li>\n      <li>\n\tCalltips draw non-ASCII characters correctly rather than as arrows.\n      </li>\n      <li>\n\tSciTE crash fixed when going to an error message with empty file name.\n      </li>\n      <li>\n\tBugs fixed in XPM image handling code.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite154.zip?download\">Release 1.54</a>\n    </h3>\n    <ul>\n      <li>\n\tReleased on 12 August 2003.\n      </li>\n      <li>\n\tSciTE on GTK+ 2.x can display a tab bar.\n      </li>\n      <li>\n\tSciTE on Windows provides incremental search.\n      </li>\n      <li>\n\tLexer for PostScript.\n      </li>\n      <li>\n\tLexer for the NSIS scripting language.\n      </li>\n      <li>\n\tNew lexer for POV-Ray Scene Description Language\n\treplaces previous implementation.\n      </li>\n      <li>\n\tLexer for the MMIX Assembler language.\n      </li>\n      <li>\n\tLexer for the Scriptol language.\n      </li>\n      <li>\n\tIncompatibility: SQL keywords are specified in lower case rather than upper case.\n\tSQL lexer allows double quoted strings.\n      </li>\n      <li>\n\tPascal lexer: character constants that start with '#' understood,\n\t'@' only allowed within assembler blocks,\n\t'$' can be the start of a number,\n\tinitial '.' in 0..constant not treated as part of a number,\n\tand assembler blocks made more distinctive.\n      </li>\n      <li>\n\tLua lexer allows '.' in keywords.\n\tMulti-line strings and comments can be folded.\n      </li>\n      <li>\n\tCSS lexer handles multiple psuedoclasses.\n      </li>\n      <li>\n\tProperties file folder works for INI file format.\n      </li>\n      <li>\n\tHidden indicator style allows the container to mark text within Scintilla\n\twithout there being any visual effect.\n      </li>\n      <li>\n\tSciTE does not prompt to save changes when the buffer is empty and untitled.\n      </li>\n      <li>\n\tModification notifications caused by SCI_INSERTSTYLEDSTRING\n\tnow include the contents of the insertion.\n      </li>\n      <li>\n\tSCI_MARKERDELETEALL deletes all the markers on a line\n\trather than just the first match.\n      </li>\n      <li>\n\tBetter handling of 'dead' accents on GTK+ 2 for languages\n\tthat use accented characters.\n      </li>\n      <li>\n\tSciTE now uses value of output.vertical.size property.\n      </li>\n      <li>\n\tCrash fixed in SciTE autocompletion on long lines.\n      </li>\n      <li>\n\tCrash fixed in SciTE comment command on long lines.\n      </li>\n      <li>\n\tBug fixed with backwards regular expression search skipping\n\tevery second match.\n      </li>\n      <li>\n\tHang fixed with regular expression replace where both target and replacement were empty.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite153.zip?download\">Release 1.53</a>\n    </h3>\n    <ul>\n      <li>\n\tReleased on 16 May 2003.\n      </li>\n      <li>\n\tOn GTK+ 2, encodings other than ASCII, Latin1, and Unicode are\n\tsupported for both display and input using iconv.\n      </li>\n      <li>\n\tExternal lexers supported on GTK+/Linux.\n\tExternal lexers must now be explicitly loaded with SCI_LOADLEXERLIBRARY\n\trather than relying upon a naming convention and automatic loading.\n      </li>\n      <li>\n\tSupport of Lout typesetting language.\n      </li>\n      <li>\n\tSupport of E-Scripts language used in the POL Ultima Online Emulator.\n      </li>\n      <li>\n\tScrolling and drawing performance on GTK+ enhanced, particularly for GTK+ 2.x\n\twith an extra window for the text area avoiding conflicts with the scroll bars.\n      </li>\n      <li>\n\tCopyText and CopyRange methods in Scintilla allow container to\n\teasily copy to the system clipboard.\n      </li>\n      <li>\n\tLine Copy command implemented and bound to Ctrl+Shift+T.\n      </li>\n      <li>\n\tScintilla APIs PositionBefore and PositionAfter can be used to iterate through\n\ta document taking into account the encoding and multi-byte characters.\n      </li>\n      <li>\n\tC++ folder can fold on the \"} else {\" line of an if statement by setting\n\tfold.at.else property to 1.\n      </li>\n      <li>\n\tC++ lexer allows an extra set of keywords.\n      </li>\n      <li>\n\tProperty names and thus abbreviations may be non-ASCII.\n      </li>\n      <li>\n\tRemoved attempt to load a file when setting properties that was\n\tpart of an old scripting experiment.\n      </li>\n      <li>\n\tSciTE no longer warns about a file not existing when opening\n\tproperties files from the Options menu as there is a good chance\n\tthe user wants to create one.\n      </li>\n      <li>\n\tBug fixed with brace recognition in multi-byte encoded files where a partial\n\tcharacter matched a brace byte.\n      </li>\n      <li>\n\tMore protection against infinite loops or recursion with recursive property definitions.\n      </li>\n      <li>\n\tOn Windows, cursor will no longer disappear over margins in custom builds when\n\tcursor resource not present. The Windows default cursor is displayed instead.\n      </li>\n      <li>\n\tload.on.activate fixed in SciTE as was broken in 1.52.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite152.zip?download\">Release 1.52</a>\n    </h3>\n    <ul>\n      <li>\n\tReleased on 17 April 2003.\n      </li>\n      <li>\n\tPango font support on GTK+ 2.\n\tUnicode input improved on GTK+ 2.\n      </li>\n      <li>\n\tHotspot style implemented in Scintilla.\n      </li>\n      <li>\n\tSmall up and down arrows can be displayed in calltips and the container\n\tis notified when the mouse is clicked on a calltip.\n\tNormal and selected calltip text colours can be set.\n      </li>\n      <li>\n\tPOSIX compatibility flag in Scintilla regular expression search\n\tinterprets bare ( and ) as tagged sections.\n      </li>\n      <li>\n\tError message lexer tightened to yield fewer false matches.\n\tRecognition of Lahey and Intel FORTRAN error formats.\n      </li>\n      <li>\n\tScintilla keyboard commands for moving to start and end of\n\tscreen lines rather than document lines, unless already there\n\twhere these keys move to the start or end of the document line.\n      </li>\n      <li>\n\tLine joining command.\n      </li>\n      <li>\n\tLexer for POV-Ray.\n      </li>\n      <li>\n\tCalltips on Windows are no longer clipped by the parent window.\n      </li>\n      <li>\n\tAutocompletion lists are cancelled when focus leaves their parent window.\n      </li>\n      <li>\n\tMove to next/previous empty line delimited paragraph key commands.\n      </li>\n      <li>\n\tSciTE hang fixed with recursive property definitions by placing limit\n\ton number of substitutions performed.\n      </li>\n      <li>\n\tSciTE Export as PDF reenabled and works.\n      </li>\n      <li>\n\tAdded loadsession: command line command to SciTE.\n      </li>\n      <li>\n\tSciTE option to quit application when last document closed.\n      </li>\n      <li>\n\tSciTE option to ask user if it is OK to reload a file that has been\n\tmodified outside SciTE.\n      </li>\n      <li>\n\tSciTE option to automatically save before running particular command tools\n\tor to ask user or to not save.\n      </li>\n      <li>\n\tSciTE on Windows 9x will write a Ctrl+Z to the process input pipe before\n\tclosing the pipe when running tool commands that take input.\n      </li>\n      <li>\n\tAdded a manifest resource to SciTE on Windows to enable Windows XP\n\tthemed UI.\n      </li>\n      <li>\n\tSciTE calltips handle nested calls and other situations better.\n      </li>\n      <li>\n\tCSS lexer improved.\n      </li>\n      <li>\n\tInterface to platform layer changed - Surface initialization now requires\n\ta WindowID parameter.\n      </li>\n      <li>\n\tBug fixed with drawing or measuring long pieces of text on Windows 9x\n\tby truncating the pieces.\n      </li>\n      <li>\n\tBug fixed with SciTE on GTK+ where a user shortcut for a visible character\n\tinserted the character as well as executing the command.\n      </li>\n      <li>\n\tBug fixed where primary selection on GTK+ was reset by\n\tScintilla during creation.\n      </li>\n      <li>\n\tBug fixed where SciTE would close immediately on startup\n\twhen using save.session.\n      </li>\n      <li>\n\tCrash fixed when entering '\\' in LaTeX file.\n      </li>\n      <li>\n\tHang fixed when '#' last character in VB file.\n      </li>\n      <li>\n\tCrash fixed in error message lexer.\n      </li>\n      <li>\n\tCrash fixed when searching for long regular expressions.\n      </li>\n      <li>\n\tPressing return when nothing selected in user list sends notification with\n\tempty text rather than random text.\n      </li>\n      <li>\n\tMouse debouncing disabled on Windows as it interfered with some\n\tmouse utilities.\n      </li>\n      <li>\n\tBug fixed where overstrike mode inserted before rather than replaced last\n\tcharacter in document.\n      </li>\n      <li>\n\tBug fixed with syntax highlighting of Japanese text.\n      </li>\n      <li>\n\tBug fixed in split lines function.\n      </li>\n      <li>\n\tCosmetic fix to SciTE tab bar on Windows when window resized.\n\tFocus sticks to either pane more consistently.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite151.zip?download\">Release 1.51</a>\n    </h3>\n    <ul>\n      <li>\n\tReleased on 16 February 2003.\n      </li>\n      <li>\n\tTwo phase drawing avoids cutting off text that overlaps runs by drawing\n\tall the backgrounds of a line then drawing all the text transparently.\n\tSingle phase drawing is an option.\n      </li>\n      <li>\n\tScintilla method to split lines at a particular width by adding new line\n\tcharacters.\n      </li>\n      <li>\n\tThe character used in autocompletion lists to separate the text from the image\n\tnumber can be changed.\n      </li>\n      <li>\n\tThe scrollbar range will automatically expand when the caret is moved\n\tbeyond the current range.\n\tThe scroll bar is updated when SCI_SETXOFFSET is called.\n      </li>\n      <li>\n\tMouse cursors on GTK+ improved to be consistent with other applications\n\tand the Windows version.\n      </li>\n      <li>\n\tHorizontal scrollbar on GTK+ now disappears in wrapped mode.\n      </li>\n      <li>\n\tScintilla on GTK+ 2: mouse wheel scrolling, cursor over scrollbars, focus,\n\tand syntax highlighting now work.\n\tgtk_selection_notify avoided for compatibility with GTK+ 2.2.\n      </li>\n      <li>\n\tFold margin colours can now be set.\n      </li>\n      <li>\n\tSciTE can be built for GTK+ 2.\n      </li>\n      <li>\n\tSciTE can optionally preserve the undo history over an automatic file reload.\n      </li>\n      <li>\n\tTags can optionally be case insensitive in XML and HTML.\n      </li>\n      <li>\n\tSciTE on Windows handles input to tool commands in a way that should avoid\n\tdeadlock. Output from tools can be used to replace the selection.\n      </li>\n      <li>\n\tSciTE on GTK+ automatically substitutes '|' for '/' in menu items as '/'\n\tis used to define the menu hierarchy.\n      </li>\n      <li>\n\tOptional buffer number in SciTE title bar.\n      </li>\n      <li>\n\tCrash fixed in SciTE brace matching.\n      </li>\n      <li>\n\tBug fixed where automatic scrolling past end of document\n\tflipped back to the beginning.\n      </li>\n      <li>\n\tBug fixed where wrapping caused text to disappear.\n      </li>\n      <li>\n\tBug fixed on Windows where images in autocompletion lists were\n\tshown on the wrong item.\n      </li>\n      <li>\n\tCrash fixed due to memory bug in autocompletion lists on Windows.\n      </li>\n      <li>\n\tCrash fixed when double clicking some error messages.\n      </li>\n      <li>\n\tBug fixed in word part movement where sometimes no movement would occur.\n      </li>\n      <li>\n\tBug fixed on Windows NT where long text runs were truncated by\n\ttreating NT differently to 9x where there is a limitation.\n      </li>\n      <li>\n\tText in not-changeable style works better but there remain some cases where\n\tit is still possible to delete text protected this way.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite150.zip?download\">Release 1.50</a>\n    </h3>\n    <ul>\n      <li>\n\tReleased on 24 January 2003.\n      </li>\n      <li>\n\tAutocompletion lists may have a per-item pixmap.\n      </li>\n      <li>\n\tAutocompletion lists allow Unicode text on Windows.\n      </li>\n      <li>\n\tScintilla documentation rewritten.\n      </li>\n      <li>\n\tAdditional DBCS encoding support in Scintilla on GTK+ primarily aimed at\n\tJapanese EUC encoding.\n      </li>\n      <li>\n\tCSS (Cascading Style Sheets) lexer added.\n      </li>\n      <li>\n\tdiff lexer understands some more formats.\n      </li>\n      <li>\n\tFold box feature is an alternative way to show the structure of code.\n      </li>\n      <li>\n\tAvenue lexer supports multiple keyword lists.\n      </li>\n      <li>\n\tThe caret may now be made invisible by setting the caret width to 0.\n      </li>\n      <li>\n\tPython folder attaches comments before blocks to the next block rather\n\tthan the previous block.\n      </li>\n      <li>\n\tSciTE openpath property on Windows searches a path for files that are\n\tthe subject of the Open Selected Filename command.\n      </li>\n      <li>\n        The localization file name can be changed with the locale.properties property.\n      </li>\n      <li>\n\tOn Windows, SciTE can pipe the result of a string expression into a command line tool.\n      </li>\n      <li>\n\tOn Windows, SciTE's Find dialog has a Mark All button.\n      </li>\n      <li>\n\tOn Windows, there is an Insert Abbreviation command that allows a choice from\n\tthe defined abbreviations and inserts the selection into the abbreviation at the\n\tposition of a '|'.\n      </li>\n      <li>\n\tMinor fixes to Fortran lexer.\n      </li>\n      <li>\n\tfold.html.preprocessor decides whether to fold &lt;? and ?&gt;.\n\tMinor improvements to PHP folding.\n      </li>\n      <li>\n\tMaximum number of keyword lists allowed increased from 6 to 9.\n      </li>\n      <li>\n\tDuplicate line command added with default assignment to Ctrl+D.\n      </li>\n      <li>\n\tSciTE sets $(Replacements) to the number of replacements made by the\n\tReplace All command. $(CurrentWord) is set to the word before the caret if the caret\n\tis at the end of a word.\n      </li>\n      <li>\n\tOpening a SciTE session now loads files in remembered order, sets the current file\n\tas remembered, and moves the caret to the remembered line.\n      </li>\n      <li>\n\tBugs fixed with printing on Windows where line wrapping was causing some text\n\tto not print.\n      </li>\n      <li>\n\tBug fixed with Korean Input Method Editor on Windows.\n      </li>\n      <li>\n\tBugs fixed with line wrap which would sometimes choose different break positions\n\tafter switching focus away and back.\n      </li>\n      <li>\n\tBug fixed where wheel scrolling had no effect on GTK+ after opening a fold.\n      </li>\n      <li>\n\tBug fixed with file paths containing non-ASCII characters on Windows.\n      </li>\n      <li>\n\tCrash fixed with printing on Windows after defining pixmap marker.\n      </li>\n      <li>\n\tCrash fixed in makefile lexer when first character on line was '='.\n      </li>\n      <li>\n\tBug fixed where local properties were not always being applied.\n      </li>\n      <li>\n\tCtrl+Keypad* fold command works on GTK+.\n      </li>\n      <li>\n\tHangs fixed in SciTE's Replace All command when replacing regular expressions '^'\n\tor '$'.\n      </li>\n      <li>\n\tSciTE monospace setting behaves more sensibly.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite149.zip?download\">Release 1.49</a>\n    </h3>\n    <ul>\n      <li>\n\tReleased on 1 November 2002.\n      </li>\n      <li>\n\tUnicode supported on GTK+. To perform well, this added a font cache to GTK+\n\tand to make that safe, a mutex is used. The mutex requires the application to link in\n\tthe threading library by evaluating `glib-config --libs gthread`. A Unicode locale\n\tshould also be set up by a call like setlocale(LC_CTYPE, \"en_US.UTF-8\").\n\tscintilla_release_resources function added to release mutex.\n      </li>\n      <li>\n\tFORTRAN and assembler lexers added along with other support for these\n\tlanguages in SciTE.\n      </li>\n      <li>\n\tAda lexer improved handling of based numbers, identifier validity and attributes\n\tdistinguished from character literals.\n      </li>\n      <li>\n\tLua lexer handles block comments and a deep level of nesting for literal strings\n\tand block comments.\n      </li>\n      <li>\n\tErrorlist lexer recognizes PHP error messages.\n      </li>\n      <li>\n\tVariant of the C++ lexer with case insensitive keywords\n\tcalled cppnocase. Whitespace in preprocessor text handled more correctly.\n      </li>\n      <li>\n\tFolder added for Perl.\n      </li>\n      <li>\n\tCompilation with GCC 3.2 supported.\n      </li>\n      <li>\n\tMarkers can be pixmaps.\n      </li>\n      <li>\n\tLines are wrapped when printing.\n\tBug fixed which printed line numbers in different styles.\n      </li>\n      <li>\n\tText can be appended to end with AppendText method.\n      </li>\n      <li>\n\tChooseCaretX method added.\n      </li>\n      <li>\n\tVertical scroll bar can be turned off with SetVScrollBar method.\n      </li>\n      <li>\n\tSciTE Save All command saves all buffers.\n      </li>\n      <li>\n\tSciTE localization compares keys case insensitively to make translations more flexible.\n      </li>\n      <li>\n\tSciTE detects a utf-8 coding cookie \"coding: utf-8\" in first two\n\tlines and goes into Unicode mode.\n      </li>\n      <li>\n\tSciTE key bindings are definable.\n      </li>\n      <li>\n\tSciTE Find in Files dialog can display directory browser to\n\tchoose directory to search.\n      </li>\n      <li>\n\tSciTE enabling of undo and redo toolbar buttons improved.\n      </li>\n      <li>\n\tSciTE on Windows file type filters in open dialog sorted.\n      </li>\n      <li>\n\tFixed crashing bug when using automatic tag closing in XML or HTML.\n      </li>\n      <li>\n\tFixed bug on Windows causing very long (&gt;64K) lines to not display.\n      </li>\n      <li>\n\tFixed bug in backwards regular expression searching.\n      </li>\n      <li>\n\tFixed bug in calltips where wrong argument was highlighted.\n      </li>\n      <li>\n\tFixed bug in tab timmy feature when file has line feed line endings.\n      </li>\n      <li>\n\tFixed bug in compiling without INCLUDE_DEPRECATED_FEATURES\n\tdefined.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite148.zip?download\">Release 1.48</a>\n    </h3>\n    <ul>\n      <li>\n\tReleased on 9 September 2002.\n      </li>\n      <li>\n\tImproved Pascal lexer with context sensitive keywords\n\tand separate folder which handles  //{ and //} folding comments and\n\t{$region} and {$end} folding directives.\n\tThe \"case\" statement now folds correctly.\n      </li>\n      <li>\n\tC++ lexer correctly handles comments on preprocessor lines.\n      </li>\n      <li>\n\tNew commands for moving to beginning and end of display lines when in line\n\twrap mode. Key bindings added for these commands.\n      </li>\n      <li>\n\tNew marker symbols that look like \">>>\" and \"...\" which can be used for\n\tinteractive shell prompts for Python.\n      </li>\n      <li>\n\tThe foreground and background colours of visible whitespace can be chosen\n\tindependent of the colours chosen for the lexical class of that whitespace.\n      </li>\n      <li>\n\tPer line data optimized by using an exponential allocation scheme.\n      </li>\n      <li>\n\tSciTE API file loading optimized.\n      </li>\n      <li>\n\tSciTE for GTK+ subsystem 2 documented. The exit status of commands\n\tis decoded into more understandable fields.\n      </li>\n      <li>\n\tSciTE find dialog remembers previous find string when there is no selection.\n\tFind in Selection button disabled when selection is rectangular as command\n\tdid not work.\n      </li>\n      <li>\n\tShift+Enter made equivalent to Enter to avoid users having to let go of\n\tthe shift key when typing. Avoids the possibility of entering single carriage\n\treturns in a file that contains CR+LF line ends.\n      </li>\n      <li>\n\tAutocompletion does not immediately disappear when the length parameter\n\tto SCI_AUTOCSHOW is 0.\n      </li>\n      <li>\n\tSciTE focuses on the editor pane when File | New executed and when the\n\toutput pane is closed with F8. Double clicking on a non-highlighted output\n\tpane line selects the word under the cursor rather than seeking the next\n\thighlighted line.\n      </li>\n      <li>\n\tSciTE director interface implements an \"askproperty\" command.\n      </li>\n      <li>\n\tSciTE's Export as LaTeX output improved.\n      </li>\n      <li>\n\tBetter choice of autocompletion displaying above the caret rather than\n\tbelow when that is more sensible.\n      </li>\n      <li>\n\tBug fixed where context menu would not be completely visible if invoked\n\twhen cursor near bottom or left of screen.\n      </li>\n      <li>\n\tCrashing bug fixed when displaying long strings on GTK+ caused failure of X server\n\tby displaying long text in segments.\n      </li>\n      <li>\n\tCrashing bug fixed on GTK+ when a Scintilla window was removed from its parent\n\tbut was still the selection owner.\n      </li>\n      <li>\n\tBug fixed on Windows in Unicode mode where not all characters on a line\n\twere displayed when that line contained some characters not in ASCII.\n      </li>\n      <li>\n\tCrashing bug fixed in SciTE on Windows with clearing output while running command.\n      </li>\n      <li>\n\tBug fixed in SciTE for GTK+ with command completion not detected when\n\tno output was produced by the command.\n      </li>\n      <li>\n\tBug fixed in SciTE for Windows where menus were not shown translated.\n      </li>\n      <li>\n\tBug fixed where words failed to display in line wrapping mode with visible\n\tline ends.\n      </li>\n      <li>\n\tBug fixed in SciTE where files opened from a session file were not closed.\n      </li>\n      <li>\n\tCosmetic flicker fixed when using Ctrl+Up and Ctrl+Down with some caret policies.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite147.zip?download\">Release 1.47</a>\n    </h3>\n    <ul>\n      <li>\n\tReleased on 1 August 2002.\n      </li>\n      <li>\n\tSupport for GTK+ 2 in Scintilla. International input methods not supported\n\ton GTK+2.\n      </li>\n      <li>\n\tLine wrapping performance improved greatly.\n      </li>\n      <li>\n\tNew caret policy implementation that treats horizontal and vertical\n\tpositioning equivalently and independently. Old caret policy methods\n\tdeprecated and not all options work correctly with old methods.\n      </li>\n      <li>\n\tExtra fold points for C, C++, Java, ... for fold comments //{ .. //} and\n\t#if / #ifdef .. #endif and the #region .. #endregion feature of C#.\n      </li>\n      <li>\n\tScintilla method to find the height in pixels of a line. Currently returns the\n\tsame result for every line as all lines are same height.\n      </li>\n      <li>\n\tSeparate make file, scintilla_vc6.mak, for Scintilla to use Visual C++\n\tversion 6 since main makefile now assumes VS .NET.\n\tVS .NET project files available for combined Scintilla and\n\tSciTE in scite/boundscheck.\n      </li>\n      <li>\n\tSciTE automatically recognizes Unicode files based\n\ton their Byte Order Marks and switches to Unicode mode.\n\tOn Windows, where SciTE supports Unicode display, this\n\tallows display of non European characters.\n\tThe file is saved back into the same character encoding unless\n\tthe user decides to switch using the File | Encoding menu.\n      </li>\n      <li>\n\tHandling of character input changed so that a fillup character, typically '('\n\tdisplays a calltip when an autocompletion list was being displayed.\n      </li>\n      <li>\n\tMultiline strings lexed better for C++ and Lua.\n      </li>\n      <li>\n\tRegular expressions in JavaScript within hypertext files are lexed better.\n      </li>\n      <li>\n\tOn Windows, Scintilla exports a function called Scintilla_DirectFunction\n\tthat can be used the same as the function returned by GetDirectFunction.\n      </li>\n      <li>\n\tScintilla converts line endings of text obtained from the clipboard to\n\tthe current default line endings.\n      </li>\n      <li>\n\tNew SciTE property ensure.final.line.end can ensure that saved files\n\talways end with a new line as this is required by some tools.\n\tThe ensure.consistent.line.ends property ensures all line ends are the\n\tcurrent default when saving files.\n\tThe strip.trailing.spaces property now works on the buffer so the\n\tbuffer in memory and the file on disk are the same after a save is performed.\n      </li>\n      <li>\n\tThe SciTE expand abbreviation command again allows '|' characters\n\tin expansions to be quoted by using '||'.\n      </li>\n      <li>\n\tSciTE on Windows can send data to the find tool through standard\n\tinput rather than using a command line argument to avoid problems\n\twith quoting command line arguments.\n      </li>\n      <li>\n\tThe Stop Executing command in SciTE on Windows improved to send\n\ta Ctrl+Z character to the tool. Better messages when stopping a tool.\n      </li>\n      <li>\n\tAutocompletion can automatically \"fill up\" when one of a set of characters is\n\ttype with the autocomplete.&lt;lexer&gt;.fillups property.\n      </li>\n      <li>\n\tNew predefined properties in SciTE, SelectionStartColumn, SelectionStartLine,\n\tSelectionEndColumn, SelectionEndLine can be used to integrate with other\n\tapplications.\n      </li>\n      <li>\n\tEnvironment variables are available as properties in SciTE.\n      </li>\n      <li>\n\tSciTE on Windows keeps status line more current.\n      </li>\n      <li>\n\tAbbreviations work in SciTE on Linux when first opened.\n      </li>\n      <li>\n\tFile saving fixed in SciTE to ensure files are not closed when they can not be\n\tsaved because of file permissions. Also fixed a problem with buffers that\n\tcaused files to not be saved.\n      </li>\n      <li>\n\tSciTE bug fixed where monospace mode not remembered when saving files.\n\tSome searching options now remembered when switching files.\n      </li>\n      <li>\n\tSciTE on Linux now waits on child termination when it shuts a child down\n\tto avoid zombies.\n      </li>\n      <li>\n\tSciTE on Linux has a Print menu command that defaults to invoking a2ps.\n      </li>\n      <li>\n\tFixed incorrect highlighting of indentation guides in SciTE for Python.\n      </li>\n      <li>\n\tCrash fixed in Scintilla when calling GetText for 0 characters.\n      </li>\n      <li>\n\tExporting as LaTeX improved when processing backslashes and tabs\n\tand setting up font.\n      </li>\n      <li>\n\tCrash fixed in SciTE when exporting or copying as RTF.\n      </li>\n      <li>\n\tSciTE session loading fixed to handle more than 10 files in session.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite146.zip?download\">Release 1.46</a>\n    </h3>\n    <ul>\n      <li>\n\tReleased on 10 May 2002.\n      </li>\n      <li>\n\tSet of lexers compiled into Scintilla can now be changed by adding and\n\tremoving lexer source files from scintilla/src and running LexGen.py.\n      </li>\n      <li>\n\tSCN_ZOOM notification provided by Scintilla when user changes zoom level.\n\tMethod to determine width of strings in pixels so that elements can be sized\n\trelative to text size.\n\tSciTE changed to keep line number column displaying a given\n\tnumber of characters.\n      </li>\n      <li>\n\tThe logical width of the document used to determine scroll bar range can be set.\n      </li>\n      <li>\n\tSetting to allow vertical scrolling to display last line at top rather than\n\tbottom of window.\n      </li>\n      <li>\n\tRead-only mode improved to avoid changing the selection in most cases\n\twhen a modification is attempted. Drag and drop cursors display correctly\n\tfor read-only in some cases.\n      </li>\n      <li>\n\tVisual C++ options in make files changed to suit Visual Studio .NET.\n      </li>\n      <li>\n\tScintilla.iface includes feature types for enumerations and lexers.\n      </li>\n      <li>\n\tLua lexer improves handling of literal strings and copes with nested literal strings.\n      </li>\n      <li>\n\tDiff lexer changed to treat lines starting with \"***\" similarly to \"---\".\n\tSymbolic names defined for lexical classes.\n      </li>\n      <li>\n\tnncrontab lexer improved.\n      </li>\n      <li>\n\tTurkish fonts (iso8859-9) supported on GTK+.\n      </li>\n      <li>\n\tAutomatic close tag feature for XML and HTML in SciTE.\n      </li>\n      <li>\n\tAutomatic indentation in SciTE improved.\n      </li>\n      <li>\n\tMaximum number of buffers available in SciTE increased. May be up to 100\n\talthough other restrictions on menu length limit the real maximum.\n      </li>\n      <li>\n\tSave a Copy command added to SciTE.\n      </li>\n      <li>\n\tExport as TeX command added to SciTE.\n      </li>\n      <li>\n\tExport as HTML command in SciTE respects Use Monospaced Font and\n\tbackground colour settings.\n      </li>\n      <li>\n\tCompilation problem on Solaris fixed.\n      </li>\n      <li>\n\tOrder of files displayed for SciTE's previous and next menu and key commands\n\tare now consistent.\n      </li>\n      <li>\n\tSaving of MRU in recent file changed so files open when SciTE quit\n\tare remembered.\n      </li>\n      <li>\n\tMore variants of ctags tags handled by Open Selected Filename in SciTE.\n      </li>\n      <li>\n\tJavaScript embedded in XML highlighted again.\n      </li>\n      <li>\n\tSciTE status bar updated after changing parameters in case they are being\n\tdisplayed in status bar.\n      </li>\n      <li>\n\tCrash fixed when handling some multi-byte languages.\n      </li>\n      <li>\n\tCrash fixed when replacing end of line characters.\n      </li>\n      <li>\n\tBug in SciTE fixed in multiple buffer mode where automatic loading\n\tturned on could lead to losing file contents.\n      </li>\n      <li>\n\tBug in SciTE on GTK+ fixed where dismissing dialogs with close box led to\n\tthose dialogs never being shown again.\n      </li>\n      <li>\n\tBug in SciTE on Windows fixed where position.tile with default positions\n\tled to SciTE being positioned off-screen.\n      </li>\n      <li>\n\tBug fixed in read-only mode, clearing all deletes contraction state data\n\tleading to it not being synchronized with text.\n      </li>\n      <li>\n\tCrash fixed in SciTE on Windows when tab bar displayed.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite145.zip?download\">Release 1.45</a>\n    </h3>\n    <ul>\n      <li>\n\tReleased on 15 March 2002.\n      </li>\n      <li>\n\tLine layout cache implemented to improve performance by maintaining\n\tthe positioning of characters on lines. Can be set to cache nothing,\n\tthe line with the caret, the visible page or the whole document.\n      </li>\n      <li>\n\tSupport, including a new lexer, added for Matlab programs.\n      </li>\n      <li>\n\tLua folder supports folding {} ranges and compact mode.\n\tLua lexer styles floating point numbers in number style instead of\n\tsetting the '.' in operator style.\n\tUp to 6 sets of keywords.\n\tBetter support for [[ although only works well\n\twhen all on one line.\n      </li>\n      <li>\n\tPython lexer improved to handle floating point numbers that contain negative\n\texponents and that start with '.'.\n      </li>\n      <li>\n\tWhen performing a rectangular paste, the caret now remains at the\n\tinsertion point.\n      </li>\n      <li>\n\tOn Windows with a wheel mouse, page-at-a-time mode is recognized.\n      </li>\n      <li>\n\tRead-only mode added to SciTE with a property to initialize it and another property,\n\t$(ReadOnly) available to show this mode in the status bar.\n      </li>\n      <li>\n\tSciTE status bar can show the number of lines in the selection\n\twith the $(SelHeight) property.\n      </li>\n      <li>\n\tSciTE's \"Export as HTML\" command uses the current character set to produce\n\tcorrect output for non-Western-European character sets, such as Russian.\n      </li>\n      <li>\n\tSciTE's \"Export as RTF\" fixed to produce correct output when file contains '\\'.\n      </li>\n      <li>\n\tSciTE goto command accepts a column as well as a line.\n\tIf given a column, it selects the word at that column.\n      </li>\n      <li>\n\tSciTE's Build, Compile and Go commands are now disabled if no\n\taction has been assigned to them.\n      </li>\n      <li>\n\tThe Refresh button in the status bar has been removed from SciTE on Windows.\n      </li>\n      <li>\n\tBug fixed in line wrap mode where cursor up or down command did not work.\n      </li>\n      <li>\n\tSome styling bugs fixed that were due to a compilation problem with\n\tgcc and inline functions with same name but different code.\n      </li>\n      <li>\n\tThe way that lexers loop over text was changed to avoid accessing beyond the\n\tend or setting beyond the end. May fix some bugs and make the code safer but\n\tmay also cause new bugs.\n      </li>\n      <li>\n\tBug fixed in HTML lexer's handling of SGML.\n      </li>\n      <li>\n\tBug fixed on GTK+/X where lines wider than 32767 pixels did not display.\n      </li>\n      <li>\n\tSciTE bug fixed with file name generation for standard property files.\n      </li>\n      <li>\n\tSciTE bug fixed with Open Selected Filename command when used with\n\tfile name and line number combination.\n      </li>\n      <li>\n\tIn SciTE, indentation and tab settings stored with buffers so maintained correctly\n\tas buffers selected.\n\tThe properties used to initialize these settings can now be set separately for different\n\tfile patterns.\n      </li>\n      <li>\n\tThread safety improved on Windows with a critical section protecting the font\n\tcache and initialization of globals performed within Scintilla_RegisterClasses.\n\tNew Scintilla_ReleaseResources call provided to allow explicit freeing of resources\n\twhen statically bound into another application. Resources automatically freed\n\tin DLL version. The window classes are now unregistered as part of resource\n\tfreeing which fixes bugs that occurred in some containers such as Internet Explorer.\n      </li>\n      <li>\n\t'make install' fixed on Solaris.\n      </li>\n      <li>\n\tBug fixed that could lead to a file being opened twice in SciTE.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite144.zip?download\">Release 1.44</a>\n    </h3>\n    <ul>\n      <li>\n\tReleased on 4 February 2002.\n      </li>\n      <li>\n\tCrashing bug fixed in Editor::Paint.\n      </li>\n      <li>\n\tLua lexer no longer treats '.' as a word character and\n\thandles 6 keyword sets.\n      </li>\n      <li>\n\tWordStartPosition and WordEndPosition take an onlyWordCharacters\n\targument.\n      </li>\n      <li>\n\tSciTE option for simplified automatic indentation which repeats\n\tthe indentation of the previous line.\n      </li>\n      <li>\n\tCompilation fix on Alpha because of 64 bit.\n      </li>\n      <li>\n\tCompilation fix for static linking.\n      </li>\n      <li>\n\tLimited maximum line length handled to 8000 characters as previous\n\tvalue of 16000 was causing stack exhaustion crashes for some.\n      </li>\n      <li>\n\tWhen whole document line selected, only the last display line gets\n\tthe extra selected rectangle at the right hand side rather than\n\tevery display line.\n      </li>\n      <li>\n\tCaret disappearing bug fixed for the case that the caret was not on the\n\tfirst display line of a document line.\n      </li>\n      <li>\n\tSciTE bug fixed where untitled buffer containing text was sometimes\n\tdeleted without chance to save.\n      </li>\n      <li>\n\tSciTE bug fixed where use.monospaced not working with\n\tmultiple buffers.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite143.zip?download\">Release 1.43</a>\n    </h3>\n    <ul>\n      <li>\n\tReleased on 19 January 2002.\n      </li>\n      <li>\n\tLine wrapping robustness and performance improved in Scintilla.\n      </li>\n      <li>\n\tLine wrapping option added to SciTE for both edit and output panes.\n      </li>\n      <li>\n\tStatic linking on Windows handles cursor resource better.\n\tDocumentation of static linking improved.\n      </li>\n      <li>\n\tAutocompletion has an option to delete any word characters after the caret\n\tupon selecting an item.\n      </li>\n      <li>\n\tFOX version identified by PLAT_FOX in Platform.h.\n      </li>\n      <li>\n\tCalltips in SciTE use the calltip.&lt;lexer&gt;.word.characters setting to\n\tcorrectly find calltips for functions that include characters like '$' which\n\tis not normally considered a word character.\n      </li>\n      <li>\n\tSciTE has a command to show help on itself which gets hooked up to displaying\n\tSciTEDoc.html.\n      </li>\n      <li>\n\tSciTE option calltip.&lt;lexer&gt;.end.definition to display help text on a\n\tsecond line of calltip.\n      </li>\n      <li>\n\tFixed the handling of the Buffers menu on GTK+ to ensure current buffer\n\tindicated and no warnings occur.\n\tChanged some menu items on GTK+ version to be same as Windows version.\n      </li>\n      <li>\n\tuse.monospaced property for SciTE determines initial state of Use Monospaced Font\n\tsetting.\n      </li>\n      <li>\n\tThe SciTE Complete Symbol command now works when there are no word\n\tcharacters before the caret, even though it is slow to display the whole set of\n\tsymbols.\n      </li>\n      <li>\n\tFunction names removed from SciTE's list of PHP keywords. The full list of\n\tpredefined functions is available from another web site mentioned on the\n\tExtras page.\n      </li>\n      <li>\n\tCrashing bug at startup on GTK+ for some configurations fixed.\n      </li>\n      <li>\n\tCrashing bug on GTK+ on 64 bit platforms fixed.\n      </li>\n      <li>\n\tCompilation problem with some compilers fixed in GTK+.\n      </li>\n      <li>\n\tJapanese text entry improved on Windows 9x.\n      </li>\n      <li>\n        SciTE recent files directory problem on Windows when HOME and SciTE_HOME\n\tenvironment variables not set is now the directory of the executable.\n      </li>\n      <li>\n\tSession files no longer include untitled buffers.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite142.zip?download\">Release 1.42</a>\n    </h3>\n    <ul>\n      <li>\n\tReleased on 24 December 2001.\n      </li>\n      <li>\n\tBetter localization support including context menus and most messages.\n\tTranslations of the SciTE user interface available for Bulgarian,\n\tFrench, German, Italian, Russian, and Turkish.\n      </li>\n      <li>\n\tCan specify a character to use to indicate control characters\n\trather than having them displayed as mnemonics.\n      </li>\n      <li>\n\tScintilla key command for backspace that will not delete line\n\tend characters.\n      </li>\n      <li>\n\tScintilla method to find start and end of words.\n      </li>\n      <li>\n\tSciTE on GTK+ now supports the load.on.activate and save.on.deactivate\n\tproperties in an equivalent way to the Windows version.\n      </li>\n      <li>\n\tThe output pane of SciTE on Windows is now interactive so command line\n\tutilities that prompt for input or confirmation can be used.\n      </li>\n      <li>\n\tSciTE on Windows can choose directory for a \"Find in Files\"\n\tcommand like the GTK+ version could.\n      </li>\n      <li>\n\tSciTE can now load a set of API files rather than just one file.\n      </li>\n      <li>\n\tElapsedTime class added to Platform for accurate measurement of durations.\n\tUsed for debugging and for showing the user how long commands take in SciTE.\n      </li>\n      <li>\n\tBaan lexer added.\n      </li>\n      <li>\n\tIn C++ lexer, document comment keywords no longer have to be at the start\n\tof the line.\n      </li>\n      <li>\n\tPHP lexer changed to match keywords case insensitively.\n      </li>\n      <li>\n\tMore shell keywords added.\n      </li>\n      <li>\n\tSciTE support for VoiceXML added to xml.properties.\n      </li>\n       <li>\n\tIn SciTE the selection is not copied to the find field of the Search and Replace\n\tdialogs if it contains end of line characters.\n      </li>\n      <li>\n\tSciTE on Windows has a menu item to decide whether to respond to other\n\tinstances which are performing their check.if.already.open check.\n      </li>\n      <li>\n\tSciTE accelerator key for Box Comment command changed to avoid problems\n\tin non-English locales.\n      </li>\n      <li>\n\tSciTE context menu includes Close command for the editor pane and\n\tHide command for the output pane.\n      </li>\n      <li>\n\toutput: command added to SciTE director interface to add text to the\n\toutput pane. The director interface can execute commands (such as tool\n\tcommands with subsystem set to 3) by sending a macro:run message.\n      </li>\n      <li>\n\tSciTE on GTK+ will defer to the Window Manager for position if position.left or\n\tposition.top not set and for size if position.width or position.height not set.\n      </li>\n      <li>\n\tSciTE on Windows has a position.tile property to place a second instance\n\tto the right of the first.\n      </li>\n      <li>\n\t Scintilla on Windows again supports EM_GETSEL and EM_SETSEL.\n      </li>\n      <li>\n\tProblem fixed in Scintilla on Windows where control ID is no longer cached\n\tas it could be changed by external code.\n      </li>\n      <li>\n\tProblems fixed in SciTE on Windows when finding any other open instances at\n\tstart up when check.if.already.open is true.\n      </li>\n      <li>\n\tBugs fixed in SciTE where command strings were not always having\n\tvariables evaluated.\n      </li>\n      <li>\n\tBugs fixed with displaying partial double-byte and Unicode characters\n\tin rectangular selections and at the edge when edge mode is EDGE_BACKGROUND.\n\tColumn numbers reported by GetColumn treat multiple byte characters as one column\n\trather than counting bytes.\n      </li>\n      <li>\n\tBug fixed with caret movement over folded lines.\n      </li>\n      <li>\n        Another bug fixed with tracking selection in secondary views when performing\n\tmodifications.\n      </li>\n      <li>\n\tHorizontal scrolling and display of long lines optimized.\n      </li>\n      <li>\n\tCursor setting in Scintilla on GTK+ optimized.\n      </li>\n      <li>\n\tExperimental changeable style attribute.\n\tSet to false to make text read-only.\n\tCurrently only stops caret from being within not-changeable\n\ttext and does not yet stop deleting a range that contains\n\tnot-changeable text.\n\tCan be used from SciTE by adding notchangeable to style entries.\n      </li>\n      <li>\n\tExperimental line wrapping.\n\tCurrently has performance and appearance problems.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite141.zip?download\">Release 1.41</a>\n    </h3>\n    <ul>\n      <li>\n\tReleased on 6 November 2001.\n      </li>\n      <li>\n        Changed Platform.h to not include platform\theaders. This lessens likelihood and impact of\n\tname clashes from system headers and also speeds up compilation.\n\tRenamed DrawText to DrawTextNoClip to avoid name clash.\n      </li>\n      <li>\n        Changed way word functions work to treat a sequence of punctuation as\n\ta word. This is more sensible and also more compatible with other editors.\n      </li>\n      <li>\n        Cursor changes over the margins and selection on GTK+ platform.\n      </li>\n      <li>\n        SC_MARK_BACKGROUND is a marker that only changes the line's background colour.\n      </li>\n      <li>\n\tEnhanced Visual Basic lexer handles character date and octal literals,\n\tand bracketed keywords for VB.NET. There are two VB lexers, vb and vbscript\n\twith type indication characters like ! and $ allowed at the end of identifiers\n\tin vb but not vbscript. Lexer states now separate from those used for C++ and\n\tnames start with SCE_B.\n      </li>\n      <li>\n         Lexer added for Bullant language.\n      </li>\n      <li>\n         The horizontal scroll position, xOffset, is now exposed through the API.\n      </li>\n      <li>\n         The SCN_POSCHANGED notification is deprecated as it was causing confusion.\n\t Use SCN_UPDATEUI  instead.\n      </li>\n      <li>\n         Compilation problems fixed for some versions of gcc.\n      </li>\n      <li>\n        Support for WM_GETTEXT restored on Windows.\n      </li>\n      <li>\n        Double clicking on an autocompletion list entry works on GTK+.\n      </li>\n      <li>\n        Bug fixed with case insensitive sorts for autocompletion lists.\n      </li>\n      <li>\n        Bug fixed with tracking selection in secondary views when performing modifications.\n      </li>\n      <li>\n        SciTE's abbreviation expansion feature will now indent expansions to the current\n\tindentation level if indent.automatic is on.\n      </li>\n      <li>\n        SciTE allows setting up of parameters to commands from a dialog and can also\n       show this dialog automatically to prompt for arguments when running a command.\n      </li>\n      <li>\n        SciTE's Language menu (formerly Options | Use Lexer) is now defined by the\n\tmenu.language property rather than being hardcoded.\n      </li>\n      <li>\n        The user interface of SciTE can be localized to a particular language by editing\n\ta locale.properties file.\n      </li>\n      <li>\n        On Windows, SciTE will try to move to the front when opening a new file from\n\tthe shell and using check.if.already.open.\n      </li>\n      <li>\n        SciTE can display the file name and directory in the title bar in the form\n\t\"file @ directory\" when title.full.path=2.\n      </li>\n      <li>\n        The SciTE time.commands property reports the time taken by a command as well\n\tas its status when completed.\n      </li>\n      <li>\n        The SciTE find.files property is now a list separated by '|' characters and this list is\n\tadded into the Files pull down of the Find in Files dialog.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite140.zip?download\">Release 1.40</a>\n    </h3>\n    <ul>\n      <li>\n\tReleased on 23 September 2001.\n      </li>\n      <li>\n\tRemoval of emulation of Win32 RichEdit control in core of Scintilla.\n\t<em>This change may be incompatible with existing client code.</em>\n\tSome emulation still done in Windows platform layer.\n      </li>\n      <li>\n\tSGML support in the HTML/XML lexer.\n      </li>\n      <li>\n\tSciTE's \"Stop Executing\" command will terminate GUI programs on\n\tWindows NT and Windows 2000.\n      </li>\n      <li>\n\tStyleContext class helps construct lexers that are simple and accurate.\n\tUsed in the C++, Eiffel, and Python lexers.\n      </li>\n      <li>\n\tClipboard operations in GTK+ version convert between platform '\\n' line endings and\n\tcurrently chosen line endings.\n      </li>\n      <li>\n\tAny character in range 0..255 can be used as a marker.\n\tThis can be used to support numbered bookmarks, for example.\n      </li>\n      <li>\n\tThe default scripting language for ASP can be set.\n      </li>\n      <li>\n\tNew lexer and other support for crontab files used with the nncron scheduler.\n      </li>\n      <li>\n\tFolding of Python improved.\n      </li>\n      <li>\n\tThe ` character is treated as a Python operator.\n      </li>\n      <li>\n\tLine continuations (\"\\\" at end of line) handled inside Python strings.\n      </li>\n      <li>\n\tMore consistent handling of line continuation ('\\' at end of line) in\n\tC++ lexer.\n\tThis fixes macro definitions that span more than one line.\n      </li>\n      <li>\n\tC++ lexer can understand Doxygen keywords in doc comments.\n      </li>\n      <li>\n\tSciTE on Windows allows choosing to open the \"open\" dialog on the directory\n\tof the current file rather than in the default directory.\n      </li>\n      <li>\n\tSciTE on Windows handles command line arguments in \"check.if.already.open\"\n\tcorrectly when the current directory of the new instance is different to the\n\talready open instance of SciTE.\n      </li>\n      <li>\n\t\"cwd\" command (change working directory) defined for SciTE director interface.\n      </li>\n      <li>\n\tSciTE \"Export As HTML\" produces better, more compliant, and shorter files.\n      </li>\n      <li>\n\tSciTE on Windows allows several options for determining default file name\n\tfor exported files.\n      </li>\n      <li>\n\tAutomatic indentation of Python in SciTE fixed.\n      </li>\n      <li>\n\tExported HTML can support folding.\n      </li>\n      <li>\n\tBug fixed in SCI_GETTEXT macro command of director interface.\n      </li>\n      <li>\n\tCursor leak fixed on GTK+.\n      </li>\n      <li>\n\tDuring SciTE shutdown, \"identity\" messages are no longer sent over the director interface.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite139.zip?download\">Release 1.39</a>\n    </h3>\n    <ul>\n      <li>\n\tReleased on 22 August 2001.\n      </li>\n      <li>\n\tWindows version requires msvcrt.dll to be available so will not work\n\ton original Windows 95 version 1. The msvcrt.dll file is installed\n\tby almost everything including Internet Explorer so should be available.\n      </li>\n      <li>\n\tFlattened tree control style folding margin. The SciTE fold.plus option is\n\tnow fold.symbols and has more values for the new styles.\n      </li>\n      <li>\n\tMouse dwell events are generated when the user holds the mouse steady\n\tover Scintilla.\n      </li>\n      <li>\n      PositionFromPointClose is like PositionFromPoint but returns\n      INVALID_POSITION when point outside window or after end of line.\n      </li>\n      <li>\n      Input of Hungarian and Russian characters in GTK+ version works by\n      truncating input to 8 bits if in the range of normal characters.\n      </li>\n      <li>\n      Better choices for font descriptors on GTK+ for most character sets.\n      </li>\n      <li>\n      GTK+ Scintilla is destroyed upon receiving destroy signal rather than\n      destroy_event signal.\n      </li>\n      <li>\n      Style setting that force upper or lower case text.\n      </li>\n      <li>\n      Case-insensitive autocompletion lists work correctly.\n      </li>\n      <li>\n      Keywords can be prefix based so ^GTK_ will treat all words that start\n      with GTK_ as keywords.\n      </li>\n      <li>\n      Horizontal scrolling can be jumpy rather than gradual.\n      </li>\n      <li>\n      GetSelText places a '\\0' in the buffer if the selection is empty..\n      </li>\n      <li>\n      EnsureVisible split into two methods EnsureVisible which will not scroll to show\n      the line and EnsureVisibleEnforcePolicy which may scroll.\n      </li>\n      <li>\n      Python folder has options to fold multi-line comments and triple quoted strings.\n      </li>\n      <li>\n      C++ lexer handles keywords before '.' like \"this.x\" in Java as keywords.\n      Compact folding mode option chooses whether blank lines after a structure are\n      folded with that structure. Second set of keywords with separate style supported.\n      </li>\n      <li>\n      Ruby lexer handles multi-line comments.\n      </li>\n      <li>\n      VB has folder.\n      </li>\n      <li>\n      PHP lexer has an operator style, handles \"&lt;?\" and \"?&gt;\" inside strings\n      and some comments.\n      </li>\n      <li>\n      TCL lexer which is just an alias for the C++ lexer so does not really\n      understand TCL syntax.\n      </li>\n      <li>\n      Error lines lexer has styles for Lua error messages and .NET stack traces.\n      </li>\n      <li>\n      Makefile lexer has a target style.\n      </li>\n      <li>\n      Lua lexer handles some [[]] string literals.\n      </li>\n      <li>\n      HTML and XML lexer have a SCE_H_SGML state for tags that\n      start with \"&lt;!\".\n      </li>\n      <li>\n      Fixed Scintilla bugs with folding. When modifications were performed near\n      folded regions sometimes no unfolding occurred when it should have. Deleting a\n      fold causing character sometimes failed to update fold information correctly.\n      </li>\n      <li>\n      Better support for Scintilla on GTK+ for Win32 including separate\n      PLAT_GTK_WIN32 definition and correct handling of rectangular selection\n      with clipboard operations.\n      </li>\n      <li>\n      SciTE has a Tools | Switch Pane (Ctrl+F6) command to switch focus between\n      edit and output panes.\n      </li>\n      <li>\n      SciTE option output.scroll allows automatic scrolling of output pane to\n      be turned off.\n      </li>\n      <li>\n      Commands can be typed into the SciTE output pane similar to a shell window.\n      </li>\n      <li>\n      SciTE properties magnification and output magnification set initial zoom levels.\n      </li>\n      <li>\n      Option for SciTE comment block command to place comments at start of line.\n      </li>\n      <li>\n       SciTE for Win32 has an option to minimize to the tray rather than the task bar.\n      </li>\n      <li>\n      Close button on SciTE tool bar for Win32.\n      </li>\n      <li>\n      SciTE compiles with GCC 3.0.\n      </li>\n      <li>\n      SciTE's automatic indentation of C++ handles braces without preceding keyword\n      correctly.\n      </li>\n      <li>\n      Bug fixed with GetLine method writing past the end of where it should.\n      </li>\n      <li>\n      Bug fixed with mouse drag automatic scrolling when some lines were folded.\n      </li>\n      <li>\n      Bug fixed because caret XEven setting was inverted.\n      </li>\n      <li>\n      Bug fixed where caret was initially visible even though window was not focussed.\n      </li>\n      <li>\n      Bug fixed where some file names could end with \"\\\\\" which caused slow\n      downs on Windows 9x.\n      </li>\n      <li>\n      On Win32, SciTE Replace dialog starts with focus on replacement text.\n      </li>\n      <li>\n      SciTE Go to dialog displays correct current line.\n      </li>\n      <li>\n      Fixed bug with SciTE opening multiple files at once.\n      </li>\n      <li>\n      Fixed bug with Unicode key values reported to container truncated.\n      </li>\n      <li>\n      Fixed bug with unnecessary save point notifications.\n      </li>\n      <li>\n      Fixed bugs with indenting and unindenting at start of line.\n      </li>\n      <li>\n      Monospace Font setting behaves more consistently.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite138.zip?download\">Release 1.38</a>\n    </h3>\n    <ul>\n      <li>\n\tReleased on 23 May 2001.\n      </li>\n      <li>\n\tLoadable lexer plugins on Windows.\n      </li>\n      <li>\n\tRuby lexer and support.\n      </li>\n      <li>\n\tLisp lexer and support.\n      </li>\n      <li>\n\tEiffel lexer and support.\n      </li>\n      <li>\n\tModes for better handling of Tab and BackSpace keys within\n\tindentation. Mode to avoid autocompletion list cancelling when\n\tthere are no viable matches.\n      </li>\n      <li>\n\tReplaceTarget replaced with two calls ReplaceTarget\n\t(which is incompatible with previous ReplaceTarget) and\n\tReplaceTargetRE. Both of these calls have a count first\n\tparameter which allows using strings containing nulls.\n\tSearchInTarget and SetSearchFlags functions allow\n\tspecifying a search in several simple steps which helps\n\tsome clients which can not create structs or pointers easily.\n      </li>\n      <li>\n\tAsian language input through an Input Method Editor works\n\ton Windows 2000.\n      </li>\n      <li>\n\tOn Windows, control characters can be entered through use of\n\tthe numeric keypad in conjunction with the Alt key.\n      </li>\n      <li>\n\tDocument memory allocation changed to grow exponentially\n\twhich reduced time to load a 30 Megabyte file from\n\t1000 seconds to 25. Change means more memory may be used.\n      </li>\n      <li>\n\tWord part movement keys now handled in Scintilla rather than\n\tSciTE.\n      </li>\n      <li>\n\tRegular expression '^' and '$' work more often allowing insertion\n\tof text at start or end of line with a replace command.\n\tBackslash quoted control characters \\a, \\b, \\f, \\t, and \\v\n\trecognized within sets.\n      </li>\n      <li>\n\tSession files for SciTE.\n      </li>\n      <li>\n\tExport as PDF command hidden in SciTE as it often failed.\n\tCode still present so can be turned on by those willing to cope.\n      </li>\n      <li>\n\tBug fixed in HTML lexer handling % before &gt; as end ASP\n\teven when no start ASP encountered.\n        Bug fixed when scripts ended with a quoted string and\n        end tag was not seen.\n      </li>\n      <li>\n\tBug fixed on Windows where context menu key caused menu to\n\tappear in corner of screen rather than within window.\n      </li>\n      <li>\n\tBug fixed in SciTE's Replace All command not processing\n\twhole file when replace string longer than search string.\n      </li>\n      <li>\n\tBug fixed in SciTE's MRU list repeating entries if Ctrl+Tab\n\tused when all entries filled.\n      </li>\n      <li>\n\tConvertEOLs call documentation fixed.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite137.zip?download\">Release 1.37</a>\n    </h3>\n    <ul>\n      <li>\n\tReleased on 17 April 2001.\n      </li>\n      <li>\n\tBug fixed with scroll bars being invisible on GTK+ 1.2.9.\n      </li>\n      <li>\n\tScintilla and SciTE support find and replace using simple regular\n\texpressions with tagged expressions. SciTE supports C '\\' escapes\n\tin the Find and Replace dialogs.\n\tReplace in Selection available in SciTE.\n      </li>\n      <li>\n\tScintilla has a 'target' feature for replacing code rapidly without\n\tcausing display updates.\n      </li>\n      <li>\n\tScintilla and SciTE on GTK+ support file dropping from file managers\n\tsuch as Nautilus and gmc. Files or other URIs dropped on Scintilla\n\tresult in a URIDropped notification.\n      </li>\n      <li>\n\tLexers may have separate Lex and Fold functions.\n      </li>\n      <li>\n\tLexer infrastructure improved to allow for plug in lexers and for referring\n\tto lexers by name rather than by ID.\n      </li>\n      <li>\n\tAda lexer and support added.\n      </li>\n      <li>\n\tOption in both Scintilla and SciTE to treat both left and right margin\n\tas equally important when repositioning visible area in response to\n\tcaret movement. Default is to prefer visible area positioning which\n\tminimizes the horizontal scroll position thus favouring the left margin.\n      </li>\n      <li>\n\tCaret line highlighting.\n      </li>\n      <li>\n\tCommands to delete from the caret to the end of line and\n\tfrom the caret to the beginning of line.\n      </li>\n      <li>\n\tSciTE has commands for inserting and removing block comments and\n\tfor inserting stream comments.\n      </li>\n      <li>\n\tSciTE Director interface uses C++ '\\' escapes to send control characters.\n      </li>\n      <li>\n\tSciTE Director interface adds more commands including support for macros.\n      </li>\n      <li>\n\tSciTE has menu options for recording and playing macros which are visible\n\twhen used with a companion program that supports these features.\n      </li>\n      <li>\n\tSciTE has an Expand Abbreviation command.\n\tAbbreviations are stored in a global abbrev.properties file.\n      </li>\n      <li>\n\tSciTE has a Full Screen command to switch between a normal window\n\tsize and using the full screen. On Windows, the menu bar can be turned\n\toff when in full screen mode.\n      </li>\n      <li>\n\tSciTE has a Use monospaced font command to switch between the normal\n\tset of fonts and one size of a particular fixed width font.\n      </li>\n      <li>\n\tSciTE's use of tabs can be controlled for particular file names\n\tas well as globally.\n      </li>\n      <li>\n\tThe contents of SciTE's status bar can be defined by a property and\n\tinclude variables. On Windows, several status bar definitions can be active\n\twith a click on the status bar cycling through them.\n      </li>\n      <li>\n\tCopy as RTF command in SciTE on Windows to allow pasting\n\tstyled text into word processors.\n      </li>\n      <li>\n\tSciTE can allow the use of non-alphabetic characters in\n\tComplete Symbol lists and can automatically display this autocompletion\n\tlist when a trigger character such as '.' is typed.\n\tComplete word can be set to pop up when the user is typing a word and\n\tthere is only one matching word in the document.\n      </li>\n      <li>\n\tSciTE lists the imported properties files on a menu to allow rapid\n\taccess to them.\n      </li>\n      <li>\n\tSciTE on GTK+ improvements to handling accelerator keys and focus\n\tin dialogs. Message boxes respond to key presses without the Alt key as\n\tthey have no text entries to accept normal keystrokes.\n      </li>\n      <li>\n\tSciTE on GTK+ sets the application icon.\n      </li>\n      <li>\n\tSciTE allows setting the colours used to indicate the current\n\terror line.\n      </li>\n      <li>\n\tVariables within PHP strings have own style. Keyword list updated.\n      </li>\n      <li>\n\tKeyword list for Lua updated for Lua 4.0.\n      </li>\n      <li>\n\tBug fixed in rectangular selection where rectangle still appeared\n\tselected after using cursor keys to move caret.\n      </li>\n      <li>\n\tBug fixed in C++ lexer when deleting a '{' controlling a folded range\n\tled to that range becoming permanently invisible.\n      </li>\n      <li>\n\tBug fixed in Batch lexer where comments were not recognized.\n      </li>\n      <li>\n\tBug fixed with undo actions coalescing into steps incorrectly.\n      </li>\n      <li>\n\tBug fixed with Scintilla on GTK+ positioning scroll bars 1 pixel\n\tover the Scintilla window leading to their sides being chopped off.\n      </li>\n      <li>\n\tBugs fixed in SciTE when doing some actions led to the start\n\tor end of the file being displayed rather than the current location.\n      </li>\n      <li>\n\tAppearance of calltips fixed to look like document text including\n\tany zoom factor. Positioned to be outside current line even when\n\tmultiple fonts and sizes used.\n      </li>\n      <li>\n\tBug fixed in Scintilla macro support where typing Enter caused both a newline\n\tcommand and newline character insertion to be recorded.\n      </li>\n      <li>\n\tBug fixed in SciTE on GTK+ where focus was moving\n\tbetween widgets incorrectly.\n      </li>\n      <li>\n\tBug fixed with fold symbols sometimes not updating when\n\tthe text changed.\n      </li>\n      <li>\n\tBugs fixed in SciTE's handling of folding commands.\n      </li>\n      <li>\n\tDeprecated undo collection enumeration removed from API.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite136.zip?download\">Release 1.36</a>\n    </h3>\n    <ul>\n      <li>\n\tReleased on 1 March 2001.\n      </li>\n      <li>\n\tScintilla supports GTK+ on Win32.\n      </li>\n      <li>\n\tSome untested work on making Scintilla and SciTE 64 bit compatible.\n\tFor users on GTK+ this requires including Scintilla.h before\n\tScintillaWidget.h.\n      </li>\n      <li>\n\tHTML lexer allows folding HTML.\n      </li>\n      <li>\n\tNew lexer for Avenue files which are used in the ESRI ArcView GIS.\n      </li>\n      <li>\n\tDOS Batch file lexer has states for '@', external commands, variables and\n\toperators.\n      </li>\n      <li>\n\tC++ lexer can fold comments of /* .. */ form.\n      </li>\n      <li>\n\tBetter disabling of pop up menu items in Scintilla when in read-only mode.\n      </li>\n      <li>\n\tStarting to move to Doxygen compatible commenting.\n      </li>\n      <li>\n\tDirector interface on Windows enables another application to control SciTE.\n      </li>\n      <li>\n\tOpening SciTE on Windows 9x sped up greatly for some cases.\n      </li>\n      <li>\n\tThe command.build.directory property allows SciTE to run the build\n\tcommand in a different directory to the source files.\n      </li>\n      <li>\n\tSciTE on Windows allows setting foreground and background colours\n\tfor printed headers and footers.\n      </li>\n      <li>\n\tBug fixed in finding calltips in SciTE which led to no calltips for some identifiers.\n      </li>\n      <li>\n\tDocumentation added for lexers and for the extension and director interfaces.\n      </li>\n      <li>\n\tSciTE menus rearranged with new View menu taking over some of the items that\n\twere under the Options menu. Clear All Bookmarks command added.\n      </li>\n      <li>\n\tClear Output command in SciTE.\n      </li>\n      <li>\n\tSciTE on Windows gains an Always On Top command.\n      </li>\n      <li>\n\tBug fixed in SciTE with attempts to define properties recursively.\n      </li>\n      <li>\n\tBug fixed in SciTE properties where only one level of substitution was done.\n      </li>\n      <li>\n\tBug fixed in SciTE properties where extensions were not being\n\tmatched in a case insensitive manner.\n      </li>\n      <li>\n\tBug fixed in SciTE on Windows where the Go to dialog displays the correct\n\tline number.\n      </li>\n      <li>\n\tIn SciTE, if fold.on.open set then switching buffers also performs fold.\n      </li>\n      <li>\n\tBug fixed in Scintilla where ensuring a line was visible in the presence of folding\n\toperated on the document line instead of the visible line.\n      </li>\n      <li>\n\tSciTE command line processing modified to operate on arguments in order and in\n\ttwo phases. First any arguments before the first file name are processed, then the\n\tUI is opened, then the remaining arguments are processed. Actions defined for the\n\tDirector interface (currently only \"open\") may also be used on the command line.\n\tFor example, \"SciTE -open:x.txt\" will start SciTE and open x.txt.\n      </li>\n      <li>\n\tNumbered menu items SciTE's Buffers menu and the Most Recently Used portion\n\tof the File menu go from 1..0 rather than 0..9.\n      </li>\n      <li>\n\tThe tab bar in SciTE for Windows has numbers.\n\tThe tab.hide.one option hides the tab bar until there is more than one buffer open.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite135.zip?download\">Release 1.35</a>\n    </h3>\n    <ul>\n      <li>\n        Released on 29 January 2001.\n      </li>\n      <li>\n        Rewritten and simplified widget code for the GTK+ version to enhance\n        solidity and make more fully compliant with platform norms. This includes more\n        normal handling of keystrokes so they are forwarded to containers correctly.\n      </li>\n      <li>\n        User defined lists can be shown.\n      </li>\n      <li>\n        Many fixes to the Perl lexer.\n      </li>\n      <li>\n        Pascal lexer handles comments more correctly.\n      </li>\n      <li>\n        C/C++/Java/JavaScript lexer has a state for line doc comments.\n      </li>\n      <li>\n        Error output lexer understands Sun CC messages.\n      </li>\n      <li>\n        Make file lexer has variable, preprocessor, and operator states.\n      </li>\n      <li>\n        Wider area given to an italics character that is at the end of a line to prevent it\n\tbeing cut off.\n      </li>\n      <li>\n        Call to move the caret inside the currently visible area.\n      </li>\n      <li>\n        Paste Rectangular will space fill on the left hand side of the pasted text as\n\tneeded to ensure it is kept rectangular.\n      </li>\n      <li>\n        Cut and Paste Rectangular does nothing in read-only mode.\n      </li>\n      <li>\n        Undo batching changed so that a paste followed by typing creates two undo actions..\n      </li>\n      <li>\n        A \"visibility policy\" setting for Scintilla determines which range of lines are displayed\n\twhen a particular line is moved to. Also exposed as a property in SciTE.\n      </li>\n      <li>\n        SciTE command line allows property settings.\n      </li>\n      <li>\n        SciTE has a View Output command to hide or show the output pane.\n      </li>\n      <li>\n        SciTE's Edit menu has been split in two with searching commands moved to a\n\tnew Search menu. Find Previous and Previous Bookmark are in the Search menu.\n      </li>\n      <li>\n        SciTE on Windows has options for setting print margins, headers and footers.\n      </li>\n      <li>\n        SciTE on Windows has tooltips for toolbar.\n      </li>\n      <li>\n        SciTE on GTK+ has properties for setting size of file selector.\n      </li>\n      <li>\n        Visual and audio cues in SciTE on Windows enhanced.\n      </li>\n      <li>\n        Fixed performance problem in SciTE for GTK+ by dropping the extra 3D\n        effect on the content windows.\n      </li>\n      <li>\n        Fixed problem in SciTE where choosing a specific lexer then meant\n        that no lexer was chosen when files opened.\n      </li>\n      <li>\n        Default selection colour changed to be visible on low colour displays.\n      </li>\n      <li>\n        Fixed problems with automatically reloading changed documents in SciTE on\n        Windows.\n      </li>\n      <li>\n        Fixed problem with uppercase file extensions in SciTE.\n      </li>\n      <li>\n        Fixed some problems when using characters >= 128, some of which were being\n        incorrectly treated as spaces.\n      </li>\n      <li>\n        Fixed handling multiple line tags, non-inline scripts, and XML end tags /&gt; in HTML/XML lexer.\n      </li>\n      <li>\n        Bookmarks in SciTE no longer disappear when switching between buffers.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite134.zip?download\">Release 1.34</a>\n    </h3>\n    <ul>\n      <li>\n        Released on 28 November 2000.\n      </li>\n      <li>\n        Pascal lexer.\n      </li>\n      <li>\n        Export as PDF in SciTE.\n      </li>\n      <li>\n        Support for the OpenVMS operating system in SciTE.\n      </li>\n      <li>\n        SciTE for GTK+ can check for another instance of SciTE\n\tediting a file and switch to it rather than open a second instance\n\ton one file.\n      </li>\n      <li>\n        Fixes to quoting and here documents in the Perl lexer.\n      </li>\n      <li>\n        SciTE on Windows can give extra visual and audio cues when a\n\twarning is shown or find restarts from beginning of file.\n      </li>\n      <li>\n        Open Selected Filename command in SciTE. Also understands some\n\twarning message formats.\n      </li>\n      <li>\n        Wider area for line numbers when printing.\n      </li>\n      <li>\n        Better scrolling performance on GTK+.\n      </li>\n      <li>\n        Fixed problem where rectangles with negative coordinates were\n\tinvalidated leading to trouble with platforms that use\n\tunsigned coordinates.\n      </li>\n      <li>\n        GTK+ Scintilla uses more compliant signalling code so that keyboard\n\tevents should propagate to containers.\n      </li>\n      <li>\n        Bug fixed with opening full or partial paths.\n      </li>\n      <li>\n        Improved handling of paths in error messages in SciTE.\n      </li>\n      <li>\n        Better handling of F6 in SciTE.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite133.zip?download\">Release 1.33</a>\n    </h3>\n    <ul>\n      <li>\n        Released on 6 November 2000.\n      </li>\n      <li>\n        XIM support for the GTK+ version of Scintilla ensures that more non-English\n        characters can be typed.\n      </li>\n      <li>\n        Caret may be 1, 2, or 3 pixels wide.\n      </li>\n      <li>\n        Cursor may be switched to wait image during lengthy processing.\n      </li>\n      <li>\n        Scintilla's internal focus flag is exposed for clients where focus is handled in\n        complex ways.\n      </li>\n      <li>\n        Error status defined for Scintilla to hold indication that an operation failed and the reason\n        for that failure. No detection yet implemented but clients may start using the interface\n        so as to be ready for when it does.\n      </li>\n      <li>\n        Context sensitive help in SciTE.\n      </li>\n      <li>\n        CurrentWord property available in SciTE holding the value of the word the\n        caret is within or near.\n      </li>\n      <li>\n        Apache CONF file lexer.\n      </li>\n      <li>\n        Changes to Python lexer to allow 'as' as a context sensitive keyword and the\n        string forms starting with u, r, and ur to be recognized.\n      </li>\n      <li>\n        SCN_POSCHANGED notification now working and SCN_PAINTED notification added.\n      </li>\n      <li>\n        Word part movement commands for cursoring between the parts of reallyLongCamelIdentifiers and\n        other_ways_of_making_words.\n      </li>\n      <li>\n        When text on only one line is selected, Shift+Tab moves to the previous tab stop.\n      </li>\n      <li>\n        Tab control available for Windows version of SciTE listing all the buffers\n        and making it easy to switch between them.\n      </li>\n      <li>\n        SciTE can be set to automatically determine the line ending type from the contents of a\n        file when it is opened.\n      </li>\n      <li>\n        Dialogs in GTK+ version of SciTE made more modal and have accelerator keys.\n      </li>\n      <li>\n        Find in Files command in GTK+ version of SciTE allows choice of directory.\n      </li>\n      <li>\n        On Windows, multiple files can be opened at once.\n      </li>\n      <li>\n        SciTE source broken up into more files.\n      </li>\n      <li>\n        Scintilla headers made safe for C language, not just C++.\n      </li>\n      <li>\n        New printing modes - force background to white and force default background to white.\n      </li>\n      <li>\n        Automatic unfolding not occurring when Enter pressed at end of line bug fixed.\n      </li>\n      <li>\n        Bugs fixed in line selection.\n      </li>\n      <li>\n        Bug fixed with escapes in PHP strings in the HTML lexer.\n      </li>\n      <li>\n        Bug fixed in SciTE for GTK+ opening files when given full paths.\n      </li>\n      <li>\n        Bug fixed in autocompletion where user backspaces into existing text.\n      </li>\n      <li>\n        Bugs fixed in opening files and ensuring they are saved before running.\n        A case bug also fixed here.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite132.zip?download\">Release 1.32</a>\n    </h3>\n    <ul>\n      <li>\n        Released on 8 September 2000.\n      </li>\n      <li>\n        Fixes bugs in complete word and related code. Protection against a bug when\n\treceiving a bad argument.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite131.zip?download\">Release 1.31</a>\n    </h3>\n    <ul>\n      <li>\n        Released on 6 September 2000.\n      </li>\n      <li>\n        Scintilla is available as a COM control from the scintillactrl module in CVS.\n      </li>\n      <li>\n        Style setting to underline text. Exposed in SciTE as \"underlined\".\n      </li>\n      <li>\n        Style setting to make text invisible.\n      </li>\n      <li>\n        SciTE has an extensibility interface that can be used to implement features such as\n        a scripting language or remote control. An example use of this is the extlua module\n        available from CVS which allows SciTE to be scripted in Lua.\n      </li>\n      <li>\n        Many minor fixes to all of the lexers.\n      </li>\n      <li>\n        New lexer for diff and patch files.\n      </li>\n      <li>\n        Error message lexer understands Perl error messages.\n      </li>\n      <li>\n        C/C++/Java lexer now supports C#, specifically verbatim strings and\n\t@ quoting of identifiers that are the same as keywords. SciTE has\n\ta set of keywords for C# and a build command set up for C#.\n      </li>\n      <li>\n        Scintilla property to see whether in overtype or insert state.\n      </li>\n      <li>\n         PosChanged notification fired when caret moved.\n      </li>\n      <li>\n        Comboboxes in dialogs in SciTE on Windows can be horizontally scrolled.\n      </li>\n      <li>\n        Autocompletion and calltips can treat the document as case sensitive or\n        case insensitive.\n      </li>\n      <li>\n        Autocompletion can be set to automatically choose the only\n\telement in a single element list.\n      </li>\n      <li>\n        Set of characters that automatically complete an autocompletion list\n\tcan be set.\n      </li>\n      <li>\n        SciTE command to display calltip - useful when dropped because of\n\tediting.\n      </li>\n      <li>\n        SciTE has a Revert command to go back to the last saved version.\n      </li>\n      <li>\n        SciTE has an Export as RTF command. Save as HTML is renamed\n\tto Export as HTML and is located on the Export sub menu.\n      </li>\n      <li>\n        SciTE command \"Complete Word\" searches document for any\n\twords starting with characters before caret.\n      </li>\n      <li>\n        SciTE options for changing aspects of the formatting of files exported\n\tas HTML or RTF.\n      </li>\n      <li>\n        SciTE \"character.set\" option for choosing the character\n\tset for all fonts.\n      </li>\n      <li>\n        SciTE has a \"Toggle all folds\" command.\n      </li>\n      <li>\n        The makefiles have changed. The makefile_vc and\n\tmakefile_bor files in scintilla/win32 and scite/win32 have been\n\tmerged into scintilla/win32/scintilla.mak and scite/win32/scite.mak.\n\tDEBUG may be defined for all make files and this will turn on\n\tassertions and for some make files will choose other debugging\n\toptions.\n      </li>\n      <li>\n         To make debugging easier and allow good use of BoundsChecker\n\t there is a Visual C++ project file in scite/boundscheck that builds\n\t all of Scintilla and SciTE into one executable.\n      </li>\n      <li>\n         The size of the SciTE output window can be set with the\n\t output.horizontal.size and output.vertical.size settings.\n      </li>\n      <li>\n         SciTE status bar indicator for insert or overwrite mode.\n      </li>\n      <li>\n        Performance improvements to autocompletion and calltips.\n      </li>\n      <li>\n        A caret redraw problem when undoing is fixed.\n      </li>\n      <li>\n        Crash with long lines fixed.\n      </li>\n      <li>\n        Bug fixed with merging markers when lines merged.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite130.zip?download\">Release 1.30</a>\n    </h3>\n    <ul>\n      <li>\n        Released on 26 July 2000.\n      </li>\n      <li>\n        Much better support for PHP which is now an integral part of the HTML support.\n      </li>\n      <li>\n        Start replacement of Windows-specific APIs with cross platform APIs.\n        In 1.30, the new APIs are introduced but the old APIs are still available.\n        For the GTK+ version, may have to include \"WinDefs.h\" explicitly to\n        use the old APIs.\n      </li>\n      <li>\n        \"if\" and \"import\" statements in SciTE properties files allows modularization into\n        language-specific properties files and choices based upon platform.\n        This means that SciTE is delivered with 9 language-specific properties files\n        as well as the standard SciTEGlobal.properties file.\n      </li>\n      <li>\n        Much lower resource usage on Windows 9x.\n      </li>\n      <li>\n        \"/p\" option in SciTE on Windows for printing a file and then exiting.\n      </li>\n      <li>\n        Options for printing with inverted brightness (when the screen is set to use\n        a dark background) and to force black on white printing.\n      </li>\n      <li>\n        Option for printing magnified or miniaturized from screen settings.\n      </li>\n      <li>\n        In SciTE, Ctrl+F3 and Ctrl+Shift+F3 find the selection in the forwards and backwards\n        directions respectively.\n      </li>\n      <li>\n        Auto-completion lists may be set to cancel when the cursor goes before\n        its start position or before the start of string being completed.\n      </li>\n      <li>\n        Auto-completion lists automatically size more sensibly.\n      </li>\n      <li>\n        SCI_CLEARDOCUMENTSTYLE zeroes all style bytes, ensures all\n        lines are shown and deletes all folding information.\n      </li>\n      <li>\n        On Windows, auto-completion lists are visually outdented rather than indented.\n      </li>\n      <li>\n        Close all command in SciTE.\n      </li>\n      <li>\n        On Windows multiple files can be dragged into SciTE.\n      </li>\n      <li>\n        When saving a file, the SciTE option save.deletes.first deletes it before doing the save.\n        This allows saving with a different capitalization on Windows.\n      </li>\n      <li>\n        When use tabs option is off pressing the tab key inserts spaces.\n      </li>\n      <li>\n        Bug in indicators leading to extra line drawn fixed.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite128.zip?download\">Release 1.28</a>\n    </h3>\n    <ul>\n      <li>\n        Released on 27 June 2000.\n      </li>\n      <li>\n         Fixes crash in indentation guides when indent size set to 0.\n      </li>\n      <li>\n         Fixes to installation on GTK+/Linux. User properties file on GTK+ has a dot at front of name:\n         .SciTEUser.properties. Global properties file location configurable at compile time\n         defaulting to $prefix/share/scite. $prefix determined from Gnome if present else its\n         /usr/local and can be overridden by installer. Gnome menu integration performed in\n         make install if Gnome present.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite127.zip?download\">Release 1.27</a>\n    </h3>\n    <ul>\n      <li>\n        Released on 23 June 2000.\n      </li>\n      <li>\n         Indentation guides. View whitespace mode may be set to not display whitespace\n\t in indentation.\n      </li>\n      <li>\n        Set methods have corresponding gets for UndoCollection, BufferedDraw,\n\tCodePage, UsePalette, ReadOnly, CaretFore, and ModEventMask.\n      </li>\n      <li>\n        Caret is continuously on rather than blinking while typing or holding down\n\tdelete or backspace. And is now always shown if non blinking when focused on GTK+.\n      </li>\n      <li>\n        Bug fixed in SciTE with file extension comparison now done in case insensitive way.\n      </li>\n      <li>\n        Bugs fixed in SciTE's file path handling on Windows.\n      </li>\n      <li>\n        Bug fixed with preprocessor '#' last visible character causing hang.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite126.zip?download\">Release 1.26</a>\n    </h3>\n    <ul>\n      <li>\n        Released on 13 June 2000.\n      </li>\n      <li>\n         Support for the Lua language in both Scintilla and SciTE.\n      </li>\n      <li>\n        Multiple buffers may be open in SciTE.\n      </li>\n      <li>\n        Each style may have a character set configured. This may determine\n\tthe characters that are displayed by the style.\n      </li>\n      <li>\n         In the C++ lexer, lexing of preprocessor source may either treat it all as being in\n\t the preprocessor class or only the initial # and preprocessor command word as\n\t being in the preprocessor class.\n      </li>\n      <li>\n        Scintilla provides SCI_CREATEDOCUMENT, SCI_ADDREFDOCUMENT, and\n\tSCI_RELEASEDOCUMENT to make it easier for a container to deal with multiple\n\tdocuments.\n      </li>\n      <li>\n        GTK+ specific definitions in Scintilla.h were removed to ScintillaWidget.h. All GTK+ clients will need to\n\t#include \"ScintillaWidget.h\".\n      </li>\n      <li>\n        For GTK+, tools can be executed in the background by setting subsystem to 2.\n      </li>\n      <li>\n        Keys in the properties files are now case sensitive. This leads to a performance increase.\n      </li>\n      <li>\n        Menu to choose which lexer to use on a file.\n      </li>\n      <li>\n        Tab size dialog on Windows.\n      </li>\n      <li>\n        File dialogs enlarged on GTK+.\n      </li>\n      <li>\n         Match Brace command bound to Ctrl+E on both platforms with Ctrl+] a synonym on Windows.\n         Ctrl+Shift+E is select to matching brace. Brace matching tries to match to either the inside or the\n         outside, depending on whether the cursor is inside or outside the braces initially.\n\tView End of Line bound to Ctrl+Shift+O.\n      </li>\n      <li>\n        The Home key may be bound to move the caret to either the start of the line or the start of the\n        text on the line.\n      </li>\n      <li>\n        Visual C++ project file for SciTE.\n      </li>\n      <li>\n        Bug fixed with current x location after Tab key.\n      </li>\n      <li>\n        Bug fixed with hiding fold margin by setting fold.margin.width to 0.\n      </li>\n      <li>\n        Bugs fixed with file name confusion on Windows when long and short names used, or different capitalizations,\n\tor relative paths.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite125.zip?download\">Release 1.25</a>\n    </h3>\n    <ul>\n      <li>\n        Released on 9 May 2000.\n      </li>\n      <li>\n        Some Unicode support on Windows. Treats buffer and API as UTF-8 and displays\n\tthrough UCS-2 of Windows.\n      </li>\n      <li>\n        Automatic indentation. Indentation size can be different to tab size.\n      </li>\n      <li>\n        Tool bar.\n      </li>\n      <li>\n        Status bar now on Windows as well as GTK+.\n      </li>\n      <li>\n        Input fields in Find and Replace dialogs now have history on both Windows and\n\tGTK+.\n      </li>\n      <li>\n        Auto completion list items may be separated by a chosen character to allow spaces\n\tin items. The selected item may be changed through the API.\n      </li>\n      <li>\n        Horizontal scrollbar can be turned off.\n      </li>\n      <li>\n        Property to remove trailing spaces when saving file.\n      </li>\n      <li>\n        On Windows, changed font size calculation to be more compatible with\n\tother applications.\n      </li>\n      <li>\n        On GTK+, SciTE's global properties files are looked for in the directory specified in the\n\tSCITE_HOME environment variable if it is set. This allows hiding in a dot directory.\n      </li>\n      <li>\n        Keyword lists in SciTE updated for JavaScript to include those destined to be used in\n\tthe future. IDL includes XPIDL keywords as well as MSIDL keywords.\n      </li>\n      <li>\n        Zoom level can be set and queried through API.\n      </li>\n      <li>\n        New notification sent before insertions and deletions.\n      </li>\n      <li>\n        LaTeX lexer.\n      </li>\n      <li>\n        Fixes to folding including when deletions and additions are performed.\n      </li>\n      <li>\n        Fix for crash with very long lines.\n      </li>\n      <li>\n        Fix to affect all of rectangular selections with deletion and case changing.\n      </li>\n      <li>\n        Removed non-working messages that had been included only for Richedit compatibility.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/scite124.zip\">Release 1.24</a>\n    </h3>\n    <ul>\n      <li>\n        Released on 29 March 2000.\n      </li>\n      <li>\n        Added lexing of IDL based on C++ lexer with extra UUID lexical class.\n      </li>\n      <li>\n        Functions and associated keys for Line Delete, Line Cut, Line Transpose,\n\tSelection Lower Case and Selection Upper Case.\n      </li>\n      <li>\n        Property setting for SciTE, eol.mode, chooses initial state of line end characters.\n      </li>\n      <li>\n        Fixed bugs in undo history with small almost-contiguous changes being incorrectly coalesced.\n      </li>\n      <li>\n        Fixed bugs with incorrect expansion of ContractionState data structures causing crash.\n      </li>\n      <li>\n        Fixed bugs relating to null fonts.\n      </li>\n      <li>\n        Fixed bugs where recolourization was not done sometimes when required.\n      </li>\n      <li>\n        Fixed compilation problems with SVector.h.\n      </li>\n      <li>\n        Fixed bad setting of fold points in Python.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite123.zip?download\">Release 1.23</a>\n    </h3>\n    <ul>\n      <li>\n        Released on 21 March 2000.\n      </li>\n      <li>\n        Directory structure to separate on basis of product (Scintilla, SciTE, DMApp)\n\tand environment (Cross-platform, Win32, GTK+).\n      </li>\n      <li>\n        Download packaging to allow download of the source or platform dependent executables.\n      </li>\n      <li>\n        Source code now available from CVS at SourceForge.\n      </li>\n      <li>\n        Very simple Windows-only demonstration application DMApp is available from cvs as dmapp.\n      </li>\n      <li>\n        Lexing functionality may optionally be included in Scintilla rather than be provided by\n        the container.\n      </li>\n      <li>\n        Set of lexers included is determined at link time by defining which of the Lex* object files\n\tare linked in.\n      </li>\n      <li>\n        On Windows, the SciLexer.DLL extends Scintilla.DLL with the standard lexers.\n      </li>\n      <li>\n        Enhanced HTML lexer styles embedded VBScript and Python.\n\tASP segments are styled and ASP scripts in JavaScript, VBScript and Python are styled.\n      </li>\n      <li>\n        PLSQL and PHP supported.\n      </li>\n      <li>\n        Maximum number of lexical states extended to 128.\n      </li>\n      <li>\n        Lexers may store per line parse state for multiple line features such as ASP script language choice.\n      </li>\n      <li>\n        Lexing API simplified.\n      </li>\n      <li>\n        Project file for Visual C++.\n      </li>\n      <li>\n        Can now cycle through all recent files with Ctrl+Tab in SciTE.\n      </li>\n      <li>\n        Bookmarks in SciTE.\n      </li>\n      <li>\n        Drag and drop copy works when dragging to the edge of the selection.\n      </li>\n      <li>\n        Fixed bug with value sizes in properties file.\n      </li>\n      <li>\n        Fixed bug with last line in properties file not being used.\n      </li>\n      <li>\n        Bug with multiple views of one document fixed.\n      </li>\n      <li>\n        Keypad now works on GTK+.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/SciTE122.zip?download\">Release 1.22</a>\n    </h3>\n    <ul>\n      <li>\n        Released on 27 February 2000.\n      </li>\n      <li>\n        wxWindows platform defined.\n\tImplementation for wxWindows will be available separately\n\tfrom main Scintilla distribution.\n      </li>\n      <li>\n        Line folding in Scintilla.\n      </li>\n      <li>\n        SciTE performs syntax directed folding for C/C++/Java/JavaScript and for Python.\n      </li>\n      <li>\n        Optional macro recording support.\n      </li>\n      <li>\n        User properties file (SciTEUser.properties) allows for customization by the user\n\tthat is not overwritten with each installation of SciTE.\n      </li>\n      <li>\n        Python lexer detects and highlights inconsistent indentation.\n      </li>\n      <li>\n        Margin API made more orthogonal. SCI_SETMARGINWIDTH and SCI_SETLINENUMBERWIDTH\n        are deprecated in favour of this new API.\n      </li>\n      <li>\n        Margins may be made sensitive to forward mouse click events to container.\n      </li>\n      <li>\n        SQL lexer and styles included.\n      </li>\n      <li>\n        Perl lexer handles regular expressions better.\n      </li>\n      <li>\n        Caret policy determines how closely caret is tracked by visible area.\n      </li>\n      <li>\n        New marker shapes: arrow pointing down, plus and minus.\n      </li>\n      <li>\n        Optionally display full path in title rather than just file name.\n      </li>\n      <li>\n        Container is notified when Scintilla gains or loses focus.\n      </li>\n      <li>\n        SciTE handles focus in a more standard way and applies the main\n\tedit commands to the focused pane.\n      </li>\n      <li>\n        Container is notified when Scintilla determines that a line needs to be made visible.\n      </li>\n      <li>\n        Document watchers receive notification when document about to be deleted.\n      </li>\n      <li>\n        Document interface allows access to list of watchers.\n      </li>\n      <li>\n        Line end determined correctly for lines ending with only a '\\n'.\n      </li>\n      <li>\n        Search variant that searches form current selection and sets selection.\n      </li>\n      <li>\n        SciTE understands format of diagnostic messages from WScript.\n      </li>\n      <li>\n        SciTE remembers top line of window for each file in MRU list so switching to a recent file\n\tis more likely to show the same text as when the file was previously visible.\n      </li>\n      <li>\n        Document reference count now initialized correctly.\n      </li>\n      <li>\n        Setting a null document pointer creates an empty document.\n      </li>\n      <li>\n        WM_GETTEXT can no longer overrun buffer.\n      </li>\n      <li>\n        Polygon drawing bug fixed on GTK+.\n      </li>\n      <li>\n        Java and JavaScript lexers merged into C++ lexer.\n      </li>\n      <li>\n        C++ lexer indicates unterminated strings by colouring the end of the line\n\trather than changing the rest of the file to string style. This is less\n\tobtrusive and helps the folding.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/SciTE121.zip?download\">Release 1.21</a>\n    </h3>\n    <ul>\n      <li>\n        Released on 2 February 2000.\n      </li>\n      <li>\n        Blank margins on left and right side of text.\n      </li>\n      <li>\n        SCN_CHECKBRACE renamed SCN_UPDATEUI and made more efficient.\n      </li>\n      <li>\n        SciTE source code refactored into platform independent and platform specific classes.\n      </li>\n      <li>\n        XML and Perl subset lexers in SciTE.\n      </li>\n      <li>\n        Large improvement to lexing speed.\n      </li>\n      <li>\n        A new subsystem, 2, allows use of ShellExec on Windows.\n      </li>\n      <li>\n        Borland compatible makefile.\n      </li>\n      <li>\n        Status bar showing caret position in GTK+ version of SciTE.\n      </li>\n      <li>\n        Bug fixes to selection drawing when part of selection outside window, mouse release over\n        scroll bars, and scroll positioning after deletion.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/SciTE120.zip\">Release 1.2</a>\n    </h3>\n    <ul>\n      <li>\n        Released on 21 January 2000.\n      </li>\n      <li>\n        Multiple views of one document.\n      </li>\n      <li>\n        Rectangular selection, cut, copy, paste, drag and drop.\n      </li>\n      <li>\n        Long line indication.\n      </li>\n      <li>\n        Reverse searching\n      </li>\n      <li>\n        Line end conversion.\n      </li>\n      <li>\n        Generic autocompletion and calltips in SciTE.\n      </li>\n      <li>\n        Call tip background colour can be set.\n      </li>\n      <li>\n        SCI_MARKERPREV for moving to a previous marker.\n      </li>\n      <li>\n        Caret kept more within window where possible.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/SciTE115.zip\">Release 1.15</a>\n    </h3>\n    <ul>\n      <li>\n        Released on 15 December 1999.\n      </li>\n      <li>\n        Brace highlighting and badlighting (for mismatched braces).\n      </li>\n      <li>\n        Visible line ends.\n      </li>\n      <li>\n        Multiple line call tips.\n      </li>\n      <li>\n        Printing now works from SciTE on Windows.\n      </li>\n      <li>\n        SciTE has a global \"*\" lexer style that is used as the basis for all the lexers' styles.\n      </li>\n      <li>\n        Fixes some warnings on GTK+ 1.2.6.\n      </li>\n      <li>\n        Better handling of modal dialogs on GTK+.\n      </li>\n      <li>\n        Resize handle drawn on pane splitter in SciTE on GTK+ so it looks more like a regular GTK+\n        *paned widget.\n      </li>\n      <li>\n        SciTE does not place window origin offscreen if no properties file found on GTK+.\n      </li>\n      <li>\n        File open filter remembered in SciTE on Windows.\n      </li>\n      <li>\n        New mechanism using style numbers 32 to 36 standardizes the setting of styles for brace\n        highlighting, brace badlighting, line numbers, control characters and the default style.\n      </li>\n      <li>\n        Old messages SCI_SETFORE .. SCI_SETFONT have been replaced by the default style 32. The old\n        messages are deprecated and will disappear in a future version.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/SciTE114.zip\">Release 1.14</a>\n    </h3>\n    <ul>\n      <li>\n        Released on 20 November 1999.\n      </li>\n      <li>\n        Fixes a scrolling bug reported on GTK+.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/SciTE113.zip\">Release 1.13</a>\n    </h3>\n    <ul>\n      <li>\n        Released on 18 November 1999.\n      </li>\n      <li>\n        Fixes compilation problems with the mingw32 GCC 2.95.2 on Windows.\n      </li>\n      <li>\n        Control characters are now visible.\n      </li>\n      <li>\n        Performance has improved, particularly for scrolling.\n      </li>\n      <li>\n        Windows RichEdit emulation is more accurate. This may break client code that uses these\n        messages: EM_GETLINE, EM_GETLINECOUNT, EM_EXGETSEL, EM_EXSETSEL, EM_EXLINEFROMCHAR,\n        EM_LINELENGTH, EM_LINEINDEX, EM_CHARFROMPOS, EM_POSFROMCHAR, and EM_GETTEXTRANGE.\n      </li>\n      <li>\n        Menus rearranged and accelerator keys set for all static items.\n      </li>\n      <li>\n        Placement of space indicators in view whitespace mode is more accurate with some fonts.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/SciTE112.zip\">Release 1.12</a>\n    </h3>\n    <ul>\n      <li>\n        Released on 9 November 1999.\n      </li>\n      <li>\n        Packaging error in 1.11 meant that the compilation error was not fixed in that release.\n        Linux/GTK+ should compile with GCC 2.95 this time.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/SciTE111.zip\">Release 1.11</a>\n    </h3>\n    <ul>\n      <li>\n        Released on 7 November 1999.\n      </li>\n      <li>\n        Fixed a compilation bug in ScintillaGTK.cxx.\n      </li>\n      <li>\n        Added a README file to explain how to build.\n      </li>\n      <li>\n        GTK+/Linux downloads now include documentation.\n      </li>\n      <li>\n        Binary only Sc1.EXE one file download for Windows.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/SciTE110.zip\">Release 1.1</a>\n    </h3>\n    <ul>\n      <li>\n        Released on 6 November 1999.\n      </li>\n      <li>\n        Major restructuring for better modularity and platform independence.\n      </li>\n      <li>\n        Inter-application drag and drop.\n      </li>\n      <li>\n        Printing support in Scintilla on Windows.\n      </li>\n      <li>\n        Styles can select colouring to end of line. This can be used when a file contains more than\n        one language to differentiate between the areas in each language. An example is the HTML +\n        JavaScript styling in SciTE.\n      </li>\n      <li>\n        Actions can be grouped in the undo stack, so they will be undone together. This grouping is\n        hierarchical so higher level actions such as replace all can be undone in one go. Call to\n        discover whether there are any actions to redo.\n      </li>\n      <li>\n        The set of characters that define words can be changed.\n      </li>\n      <li>\n        Markers now have identifiers and can be found and deleted by their identifier. The empty\n        marker type can be used to make a marker that is invisible and which is only used to trace\n        where a particular line moves to.\n      </li>\n      <li>\n        Double click notification.\n      </li>\n      <li>\n        HTML styling in SciTE also styles embedded JavaScript.\n      </li>\n      <li>\n        Additional tool commands can be added to SciTE.\n      </li>\n      <li>\n        SciTE option to allow reloading if changed upon application activation and saving on\n        application deactivation. Not yet working on GTK+ version.\n      </li>\n      <li>\n        Entry fields in search dialogs remember last 10 user entries. Not working in all cases in\n        Windows version.\n      </li>\n      <li>\n        SciTE can save a styled copy of the current file in HTML format. As SciTE does not yet\n        support printing, this can be used to print a file by then using a browser to print the\n        HTML file.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/SciTE102.zip\">Release 1.02</a>\n    </h3>\n    <ul>\n      <li>\n        Released on 1 October 1999.\n      </li>\n      <li>\n        GTK+ version compiles with GCC 2.95.\n      </li>\n      <li>\n        Properly deleting objects when window destroyed under GTK+.\n      </li>\n      <li>\n        If the selection is not empty backspace deletes the selection.\n      </li>\n      <li>\n        Some X style middle mouse button handling for copying the primary selection to and from\n        Scintilla. Does not work in all cases.\n      </li>\n      <li>\n        HTML styling in SciTE.\n      </li>\n      <li>\n        Stopped dirty flag being set in SciTE when results pane modified.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/SciTE101.zip\">Release 1.01</a>\n    </h3>\n    <ul>\n      <li>\n        Released on 28 September 1999.\n      </li>\n      <li>\n        Better DBCS support on Windows including IME.\n      </li>\n      <li>\n        Wheel mouse support for scrolling and zooming on Windows. Zooming with Ctrl+KeypadPlus and\n        Ctrl+KeypadMinus.\n      </li>\n      <li>\n        Performance improvements especially on GTK+.\n      </li>\n      <li>\n        Caret blinking and settable colour on both GTK+ and Windows.\n      </li>\n      <li>\n        Drag and drop within a Scintilla window. On Windows, files can be dragged into SciTE.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/SciTE100.zip\">Release 1.0</a>\n    </h3>\n    <ul>\n      <li>\n        Released on 17 May 1999.\n      </li>\n      <li>\n        Changed name of \"Tide\" to \"SciTE\" to avoid clash with a TCL based IDE. \"SciTE\" is a\n        SCIntilla based Text Editor and is Latin meaning something like \"understanding in a neat\n        way\" and is also an Old English version of the word \"shit\".\n      </li>\n      <li>\n        There is a SCI_AUTOCSTOPS message for defining a string of characters that will stop\n        autocompletion mode. Autocompletion mode is cancelled when any cursor movement occurs apart\n        from backspace.\n      </li>\n      <li>\n        GTK+ version now splits horizontally as well as vertically and all dialogs cancel when the\n        escape key is pressed.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/Tide92.zip\">Beta release 0.93</a>\n    </h3>\n    <ul>\n      <li>\n        Released on 12 May 1999.\n      </li>\n      <li>\n        A bit more robust than 0.92 and supports SCI_MARKERNEXT message.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/Tide92.zip\">Beta release 0.92</a>\n    </h3>\n    <ul>\n      <li>\n        Released on 11 May 1999.\n      </li>\n      <li>\n        GTK+ version now contains all features of Windows version with some very small differences.\n        Executing programs works much better now.\n      </li>\n      <li>\n        New palette code to allow more colours to be displayed in 256 colour screen modes. A line\n        number column can be displayed to the left of the selection margin.\n      </li>\n      <li>\n        The code that maps from line numbers to text positions and back has been completely\n        rewritten to be faster, and to allow markers to move with the text.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/Tide91.zip\">Beta release 0.91</a>\n    </h3>\n    <ul>\n      <li>\n        Released on 30 April 1999, containing fixes to text measuring to make Scintilla work better\n        with bitmap fonts. Also some small fixes to make compiling work with Visual C++.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/Tide90.zip\">Beta release 0.90</a>\n    </h3>\n    <ul>\n      <li>\n        Released on 29 April 1999, containing working GTK+/Linux version.\n      </li>\n      <li>\n        The Java, C++ and Python lexers recognize operators as distinct from default allowing them\n        to be highlighted.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/Tide82.zip\">Beta release 0.82</a>\n    </h3>\n    <ul>\n      <li>\n        Released on 1 April 1999, to fix a problem with handling the Enter key in PythonWin. Also\n        fixes some problems with cmd key mapping.\n      </li>\n    </ul>\n    <h3>\n       <a href=\"https://www.scintilla.org/Tide81.zip\">Beta release 0.81</a>\n    </h3>\n    <ul>\n      <li>\n        Released on 30th March 1999, containing bug fixes and a few more features.\n      </li>\n      <li>\n        Static linking supported and Tidy.EXE, a statically linked version of Tide.EXE. Changes to\n        compiler flags in the makefiles to optimize for size.\n      </li>\n      <li>\n        Scintilla supports a 'savepoint' in the undo stack which can be set by the container when\n        the document is saved. Notifications are sent to the container when the savepoint is\n        entered or left, allowing the container to display a dirty indicator and change its\n        menus.\n      </li>\n      <li>\n        When Scintilla is set to read-only mode, a notification is sent to the container should the\n        user try to edit the document. This can be used to check the document out of a version\n        control system.\n      </li>\n      <li>\n        There is an API for setting the appearance of indicators.\n      </li>\n      <li>\n        The keyboard mapping can be redefined or removed so it can be implemented completely by the\n        container. All of the keyboard commands are now commands which can be sent by the\n        container.\n      </li>\n      <li>\n        A home command like Visual C++ with one hit going to the start of the text on the line and\n        the next going to the left margin is available. I do not personally like this but my\n        fingers have become trained to it by much repetition.\n      </li>\n      <li>\n        SCI_MARKERDELETEALL has an argument in wParam which is the number of the type marker to\n        delete with -1 performing the old action of removing all marker types.\n      </li>\n      <li>\n        Tide now understands both the file name and line numbers in error messages in most cases.\n      </li>\n      <li>\n        Tide remembers the current lines of files in the recently used list.\n      </li>\n      <li>\n        Tide has a Find in Files command.\n      </li>\n    </ul>\n    <h3>\n       Beta release 0.80\n    </h3>\n    <ul>\n      <li>\n        This was the first public release on 14th March 1999, containing a mostly working Win32\n        Scintilla DLL and Tide EXE.\n      </li>\n    </ul>\n    <h3>\n       Beta releases of SciTE were called Tide\n    </h3>\n  </body>\n</html>\n"
  },
  {
    "path": "lexilla/examples/CheckLexilla/CheckLexilla.c",
    "content": "// Lexilla lexer library use example\n/** @file CheckLexilla.c\n ** Check that Lexilla.h works.\n **/\n// Copyright 2021 by Neil Hodgson <neilh@scintilla.org>\n// This file is in the public domain.\n// If the public domain is not possible in your location then it can also be used under the same\n// license as Scintilla. https://www.scintilla.org/License.txt\n\n/* Build and run\n\n    Win32\ngcc CheckLexilla.c -I ../../include -o CheckLexilla\nCheckLexilla\nCheckLexilla ../SimpleLexer/SimpleLexer.dll\n\n   Win32 Visual C++\ncl CheckLexilla.c -I ../../include -Fe: CheckLexilla\nCheckLexilla\nCheckLexilla ../SimpleLexer/SimpleLexer.dll\n\n    macOS\nclang CheckLexilla.c -I ../../include -o CheckLexilla\n./CheckLexilla\n./CheckLexilla ../SimpleLexer/SimpleLexer.dylib\n\n    Linux\ngcc CheckLexilla.c -I ../../include -ldl -o CheckLexilla\n./CheckLexilla\n./CheckLexilla ../SimpleLexer/SimpleLexer.so\n\nWhile principally meant for compilation as C to act as an example of using Lexilla\nfrom C it can also be built as C++.\n\nWarnings are intentionally shown for the deprecated typedef LexerNameFromIDFn when compiled with\nGCC or Clang or as C++.\n\n*/\n\n#include <stdio.h>\n\n#if defined(_WIN32)\n#include <windows.h>\n#else\n#include <dlfcn.h>\n#endif\n\n#if defined(__cplusplus)\n#include \"ILexer.h\"\n#endif\n\n#include \"Lexilla.h\"\n\n#if defined(__cplusplus)\nusing namespace Lexilla;\n#endif\n\n#if defined(_WIN32)\ntypedef FARPROC Function;\ntypedef HMODULE Module;\n#else\ntypedef void *Function;\ntypedef void *Module;\n#endif\n\nstatic Function FindSymbol(Module m, const char *symbol) {\n#if defined(_WIN32)\n\treturn GetProcAddress(m, symbol);\n#else\n\treturn dlsym(m, symbol);\n#endif\n}\n\nint main(int argc, char *argv[]) {\n\tchar szLexillaPath[] = \"../../bin/\" LEXILLA_LIB LEXILLA_EXTENSION;\n\tconst char *libPath = szLexillaPath;\n\tif (argc > 1) {\n\t\tlibPath = argv[1];\n\t}\n#if defined(_WIN32)\n\tModule lexillaLibrary = LoadLibraryA(libPath);\n#else\n\tModule lexillaLibrary = dlopen(libPath, RTLD_LAZY);\n#endif\n\n\tprintf(\"Opened %s -> %p.\\n\", libPath, lexillaLibrary);\n\tif (lexillaLibrary) {\n\t\tGetLexerCountFn lexerCount = (GetLexerCountFn)FindSymbol(lexillaLibrary, LEXILLA_GETLEXERCOUNT);\n\t\tif (lexerCount) {\n\t\t\tint nLexers = lexerCount();\n\t\t\tprintf(\"There are %d lexers.\\n\", nLexers);\n\t\t\tGetLexerNameFn lexerName = (GetLexerNameFn)FindSymbol(lexillaLibrary, LEXILLA_GETLEXERNAME);\n\t\t\tfor (int i = 0; i < nLexers; i++) {\n\t\t\t\tchar name[100] = \"\";\n\t\t\t\tlexerName(i, name, sizeof(name));\n\t\t\t\tprintf(\"%s \", name);\n\t\t\t}\n\t\t\tprintf(\"\\n\");\n\n\t\t\tGetLexerFactoryFn lexerFactory = (GetLexerFactoryFn)FindSymbol(lexillaLibrary, LEXILLA_GETLEXERFACTORY);\n\t\t\tLexerFactoryFunction lexerFactory4 = lexerFactory(4);\t// 4th entry is \"as\" which is an object lexer so works\n\t\t\tprintf(\"Lexer factory 4 -> %p.\\n\", lexerFactory4);\n\n\t\t\tCreateLexerFn lexerCreate = (CreateLexerFn)FindSymbol(lexillaLibrary, LEXILLA_CREATELEXER);\n\t\t\tILexer5 *lexerCpp = lexerCreate(\"cpp\");\n\t\t\tprintf(\"Created cpp lexer -> %p.\\n\", lexerCpp);\n\n\t\t\tLexerNameFromIDFn lexerNameFromID = (LexerNameFromIDFn)FindSymbol(lexillaLibrary, LEXILLA_LEXERNAMEFROMID);\n\t\t\tif (lexerNameFromID) {\n\t\t\t\tconst char *lexerNameCpp = lexerNameFromID(3);\t// SCLEX_CPP=3\n\t\t\t\tif (lexerNameCpp) {\n\t\t\t\t\tprintf(\"Lexer name 3 -> %s.\\n\", lexerNameCpp);\n\t\t\t\t} else {\n\t\t\t\t\tprintf(\"Lexer name 3 not available.\\n\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tprintf(\"Lexer name from ID not supported.\\n\");\n\t\t\t}\n\n\t\t\tGetLibraryPropertyNamesFn libraryProperties = (GetLibraryPropertyNamesFn)FindSymbol(lexillaLibrary, LEXILLA_GETLIBRARYPROPERTYNAMES);\n\t\t\tif (libraryProperties) {\n\t\t\t\tconst char *names = libraryProperties();\n\t\t\t\tprintf(\"Property names '%s'.\\n\", names);\n\t\t\t} else {\n\t\t\t\tprintf(\"Property names not supported.\\n\");\n\t\t\t}\n\n\t\t\tSetLibraryPropertyFn librarySetProperty = (SetLibraryPropertyFn)FindSymbol(lexillaLibrary, LEXILLA_SETLIBRARYPROPERTY);\n\t\t\tif (librarySetProperty) {\n\t\t\t\tlibrarySetProperty(\"key\", \"value\");\n\t\t\t} else {\n\t\t\t\tprintf(\"Set property not supported.\\n\");\n\t\t\t}\n\n\t\t\tGetNameSpaceFn libraryNameSpace = (GetLibraryPropertyNamesFn)FindSymbol(lexillaLibrary, LEXILLA_GETNAMESPACE);\n\t\t\tif (libraryNameSpace) {\n\t\t\t\tconst char *nameSpace = libraryNameSpace();\n\t\t\t\tprintf(\"Name space '%s'.\\n\", nameSpace);\n\t\t\t} else {\n\t\t\t\tprintf(\"Name space not supported.\\n\");\n\t\t\t}\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "lexilla/examples/CheckLexilla/makefile",
    "content": ".PHONY: all check clean\n\nINCLUDES = -I ../../include\nEXE = $(if $(windir),CheckLexilla.exe,CheckLexilla)\n\nifdef windir\n\tRM = $(if $(wildcard $(dir $(SHELL))rm.exe), $(dir $(SHELL))rm.exe -f, del /q)\n\tCC = gcc\nelse\n\tLIBS += -ldl\nendif\n\nall: $(EXE)\n\ncheck: $(EXE)\n\t./$(EXE)\n\nclean:\n\t$(RM) $(EXE)\n\n$(EXE): *.c\n\t$(CC) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $^ $(LIBS) $(LDLIBS) -o $@\n"
  },
  {
    "path": "lexilla/examples/SimpleLexer/SimpleLexer.cxx",
    "content": "//  A simple lexer\n/** @file SimpleLexer.cxx\n ** A lexer that follows the Lexilla protocol to allow it to be used from Lexilla clients like SciTE.\n ** The lexer applies alternating styles (0,1) to bytes of the text.\n **/\n// Copyright 2021 by Neil Hodgson <neilh@scintilla.org>\n// This file is in the public domain.\n// If the public domain is not possible in your location then it can also be used under the same\n// license as Scintilla. https://www.scintilla.org/License.txt\n\n// Windows/MSVC\n// cl -std:c++17 -EHsc -LD -I ../../../scintilla/include -I ../../include -I ../../lexlib SimpleLexer.cxx ../../lexlib/*.cxx\n\n// macOS/clang\n// clang++ -dynamiclib --std=c++17 -I ../../../scintilla/include -I ../../include -I ../../lexlib SimpleLexer.cxx ../../lexlib/*.cxx -o SimpleLexer.dylib\n\n// Linux/g++\n// g++ -fPIC -shared --std=c++17 -I ../../../scintilla/include -I ../../include -I ../../lexlib SimpleLexer.cxx ../../lexlib/*.cxx -o SimpleLexer.so\n\n/* It can be demonstrated in SciTE like this, substituting the actual shared library location as lexilla.path:\nlexilla.path=.;C:\\u\\hg\\lexilla\\examples\\SimpleLexer\\SimpleLexer.dll\nlexer.*.xx=simple\nstyle.simple.1=fore:#FF0000\n*/\n\n#include <stdlib.h>\n#include <string.h>\n#include <assert.h>\n\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n// Lexilla.h should not be included here as it declares statically linked functions without the __declspec( dllexport )\n\n#include \"WordList.h\"\n#include \"PropSetSimple.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n#include \"LexerBase.h\"\n\nusing namespace Scintilla;\nusing namespace Lexilla;\n\nclass LexerSimple : public LexerBase {\npublic:\n        LexerSimple() {\n        }\n        void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override {\n                try {\n\t\t\tAccessor astyler(pAccess, &props);\n\t\t\tif (length > 0) {\n\t\t\t\tastyler.StartAt(startPos);\n\t\t\t\tastyler.StartSegment(startPos);\n\t\t\t\tfor (unsigned int k=0; k<length; k++) {\n\t\t\t\t\tastyler.ColourTo(startPos+k, (startPos+k)%2);\n\t\t\t\t}\n\t\t\t}\n                        astyler.Flush();\n                } catch (...) {\n                        // Should not throw into caller as may be compiled with different compiler or options\n                        pAccess->SetErrorStatus(SC_STATUS_FAILURE);\n                }\n        }\n        void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override {\n        }\n\n        static ILexer5 *LexerFactorySimple() {\n                try {\n                        return new LexerSimple();\n                } catch (...) {\n                        // Should not throw into caller as may be compiled with different compiler or options\n                        return nullptr;\n                }\n        }\n};\n\n#if defined(_WIN32)\n#define EXPORT_FUNCTION __declspec(dllexport)\n#define CALLING_CONVENTION __stdcall\n#else\n#define EXPORT_FUNCTION __attribute__((visibility(\"default\")))\n#define CALLING_CONVENTION\n#endif\n\nstatic const char *lexerName = \"simple\";\n\nextern \"C\" {\n\nEXPORT_FUNCTION int CALLING_CONVENTION GetLexerCount() {\n        return 1;\n}\n\nEXPORT_FUNCTION void CALLING_CONVENTION GetLexerName(unsigned int index, char *name, int buflength) {\n        *name = 0;\n        if ((index == 0) && (buflength > static_cast<int>(strlen(lexerName)))) {\n                strcpy(name, lexerName);\n        }\n}\n\nEXPORT_FUNCTION LexerFactoryFunction CALLING_CONVENTION GetLexerFactory(unsigned int index) {\n        if (index == 0)\n                return LexerSimple::LexerFactorySimple;\n        else\n                return 0;\n}\n\nEXPORT_FUNCTION Scintilla::ILexer5* CALLING_CONVENTION CreateLexer(const char *name) {\n\tif (0 == strcmp(name, lexerName)) {\n\t\treturn LexerSimple::LexerFactorySimple();\n\t}\n\treturn nullptr;\n}\n\nEXPORT_FUNCTION const char * CALLING_CONVENTION GetNameSpace() {\n\treturn \"example\";\n}\n\n}\n"
  },
  {
    "path": "lexilla/examples/SimpleLexer/makefile",
    "content": ".PHONY: all check clean\n\nINCLUDES = -I ../../../scintilla/include -I ../../include -I ../../lexlib\n\nBASE_FLAGS += --std=c++17 -shared\n\nifdef windir\n    SHAREDEXTENSION = dll\nelse\n    ifeq ($(shell uname),Darwin)\n        SHAREDEXTENSION = dylib\n        BASE_FLAGS += -dynamiclib -arch arm64 -arch x86_64\n    else\n        BASE_FLAGS += -fPIC\n        SHAREDEXTENSION = so\n    endif\n    BASE_FLAGS += -fvisibility=hidden\nendif\n\nifdef windir\n\tRM = $(if $(wildcard $(dir $(SHELL))rm.exe), $(dir $(SHELL))rm.exe -f, del /q)\n\tCXX = g++\nendif\n\nLIBRARY = SimpleLexer.$(SHAREDEXTENSION)\nLEXLIB = ../../lexlib/*.cxx\n\nall: $(LIBRARY)\n\n# make check requires CheckLexilla to have already been built\ncheck: $(LIBRARY)\n\t../CheckLexilla/CheckLexilla ./$(LIBRARY)\n\nclean:\n\t$(RM) *.o *obj *.lib *.exp $(LIBRARY)\n\n$(LIBRARY): *.cxx\n\t$(CXX) $(INCLUDES) $(BASE_FLAGS) $(CPPFLAGS) $(CXXFLAGS) $^ $(LEXLIB) $(LIBS) $(LDLIBS) -o $@\n"
  },
  {
    "path": "lexilla/include/LexicalStyles.iface",
    "content": "## This file defines the interface to Lexilla\n\n## Copyright 2000-2020 by Neil Hodgson <neilh@scintilla.org>\n## The License.txt file describes the conditions under which this software may be distributed.\n\n## Similar file structure as Scintilla.iface but only contains constants.\n\ncat Default\n\n################################################\n# For SciLexer.h\nenu Lexer=SCLEX_\nval SCLEX_CONTAINER=0\nval SCLEX_NULL=1\nval SCLEX_PYTHON=2\nval SCLEX_CPP=3\nval SCLEX_HTML=4\nval SCLEX_XML=5\nval SCLEX_PERL=6\nval SCLEX_SQL=7\nval SCLEX_VB=8\nval SCLEX_PROPERTIES=9\nval SCLEX_ERRORLIST=10\nval SCLEX_MAKEFILE=11\nval SCLEX_BATCH=12\nval SCLEX_XCODE=13\nval SCLEX_LATEX=14\nval SCLEX_LUA=15\nval SCLEX_DIFF=16\nval SCLEX_CONF=17\nval SCLEX_PASCAL=18\nval SCLEX_AVE=19\nval SCLEX_ADA=20\nval SCLEX_LISP=21\nval SCLEX_RUBY=22\nval SCLEX_EIFFEL=23\nval SCLEX_EIFFELKW=24\nval SCLEX_TCL=25\nval SCLEX_NNCRONTAB=26\nval SCLEX_BULLANT=27\nval SCLEX_VBSCRIPT=28\nval SCLEX_BAAN=31\nval SCLEX_MATLAB=32\nval SCLEX_SCRIPTOL=33\nval SCLEX_ASM=34\nval SCLEX_CPPNOCASE=35\nval SCLEX_FORTRAN=36\nval SCLEX_F77=37\nval SCLEX_CSS=38\nval SCLEX_POV=39\nval SCLEX_LOUT=40\nval SCLEX_ESCRIPT=41\nval SCLEX_PS=42\nval SCLEX_NSIS=43\nval SCLEX_MMIXAL=44\nval SCLEX_CLW=45\nval SCLEX_CLWNOCASE=46\nval SCLEX_LOT=47\nval SCLEX_YAML=48\nval SCLEX_TEX=49\nval SCLEX_METAPOST=50\nval SCLEX_POWERBASIC=51\nval SCLEX_FORTH=52\nval SCLEX_ERLANG=53\nval SCLEX_OCTAVE=54\nval SCLEX_MSSQL=55\nval SCLEX_VERILOG=56\nval SCLEX_KIX=57\nval SCLEX_GUI4CLI=58\nval SCLEX_SPECMAN=59\nval SCLEX_AU3=60\nval SCLEX_APDL=61\nval SCLEX_BASH=62\nval SCLEX_ASN1=63\nval SCLEX_VHDL=64\nval SCLEX_CAML=65\nval SCLEX_BLITZBASIC=66\nval SCLEX_PUREBASIC=67\nval SCLEX_HASKELL=68\nval SCLEX_PHPSCRIPT=69\nval SCLEX_TADS3=70\nval SCLEX_REBOL=71\nval SCLEX_SMALLTALK=72\nval SCLEX_FLAGSHIP=73\nval SCLEX_CSOUND=74\nval SCLEX_FREEBASIC=75\nval SCLEX_INNOSETUP=76\nval SCLEX_OPAL=77\nval SCLEX_SPICE=78\nval SCLEX_D=79\nval SCLEX_CMAKE=80\nval SCLEX_GAP=81\nval SCLEX_PLM=82\nval SCLEX_PROGRESS=83\nval SCLEX_ABAQUS=84\nval SCLEX_ASYMPTOTE=85\nval SCLEX_R=86\nval SCLEX_MAGIK=87\nval SCLEX_POWERSHELL=88\nval SCLEX_MYSQL=89\nval SCLEX_PO=90\nval SCLEX_TAL=91\nval SCLEX_COBOL=92\nval SCLEX_TACL=93\nval SCLEX_SORCUS=94\nval SCLEX_POWERPRO=95\nval SCLEX_NIMROD=96\nval SCLEX_SML=97\nval SCLEX_MARKDOWN=98\nval SCLEX_TXT2TAGS=99\nval SCLEX_A68K=100\nval SCLEX_MODULA=101\nval SCLEX_COFFEESCRIPT=102\nval SCLEX_TCMD=103\nval SCLEX_AVS=104\nval SCLEX_ECL=105\nval SCLEX_OSCRIPT=106\nval SCLEX_VISUALPROLOG=107\nval SCLEX_LITERATEHASKELL=108\nval SCLEX_STTXT=109\nval SCLEX_KVIRC=110\nval SCLEX_RUST=111\nval SCLEX_DMAP=112\nval SCLEX_AS=113\nval SCLEX_DMIS=114\nval SCLEX_REGISTRY=115\nval SCLEX_BIBTEX=116\nval SCLEX_SREC=117\nval SCLEX_IHEX=118\nval SCLEX_TEHEX=119\nval SCLEX_JSON=120\nval SCLEX_EDIFACT=121\nval SCLEX_INDENT=122\nval SCLEX_MAXIMA=123\nval SCLEX_STATA=124\nval SCLEX_SAS=125\nval SCLEX_NIM=126\nval SCLEX_CIL=127\nval SCLEX_X12=128\nval SCLEX_DATAFLEX=129\nval SCLEX_HOLLYWOOD=130\nval SCLEX_RAKU=131\nval SCLEX_FSHARP=132\nval SCLEX_JULIA=133\nval SCLEX_ASCIIDOC=134\nval SCLEX_GDSCRIPT=135\n\n# When a lexer specifies its language as SCLEX_AUTOMATIC it receives a\n# value assigned in sequence from SCLEX_AUTOMATIC+1.\nval SCLEX_AUTOMATIC=1000\n# Lexical states for SCLEX_PYTHON\nlex Python=SCLEX_PYTHON SCE_P_\nlex Nimrod=SCLEX_NIMROD SCE_P_\nval SCE_P_DEFAULT=0\nval SCE_P_COMMENTLINE=1\nval SCE_P_NUMBER=2\nval SCE_P_STRING=3\nval SCE_P_CHARACTER=4\nval SCE_P_WORD=5\nval SCE_P_TRIPLE=6\nval SCE_P_TRIPLEDOUBLE=7\nval SCE_P_CLASSNAME=8\nval SCE_P_DEFNAME=9\nval SCE_P_OPERATOR=10\nval SCE_P_IDENTIFIER=11\nval SCE_P_COMMENTBLOCK=12\nval SCE_P_STRINGEOL=13\nval SCE_P_WORD2=14\nval SCE_P_DECORATOR=15\nval SCE_P_FSTRING=16\nval SCE_P_FCHARACTER=17\nval SCE_P_FTRIPLE=18\nval SCE_P_FTRIPLEDOUBLE=19\nval SCE_P_ATTRIBUTE=20\n# Lexical states for SCLEX_CPP\n# Lexical states for SCLEX_BULLANT\n# Lexical states for SCLEX_COBOL\n# Lexical states for SCLEX_TACL\n# Lexical states for SCLEX_TAL\nlex Cpp=SCLEX_CPP SCE_C_\nlex BullAnt=SCLEX_BULLANT SCE_C_\nlex COBOL=SCLEX_COBOL SCE_C_\nlex TACL=SCLEX_TACL SCE_C_\nlex TAL=SCLEX_TAL SCE_C_\nval SCE_C_DEFAULT=0\nval SCE_C_COMMENT=1\nval SCE_C_COMMENTLINE=2\nval SCE_C_COMMENTDOC=3\nval SCE_C_NUMBER=4\nval SCE_C_WORD=5\nval SCE_C_STRING=6\nval SCE_C_CHARACTER=7\nval SCE_C_UUID=8\nval SCE_C_PREPROCESSOR=9\nval SCE_C_OPERATOR=10\nval SCE_C_IDENTIFIER=11\nval SCE_C_STRINGEOL=12\nval SCE_C_VERBATIM=13\nval SCE_C_REGEX=14\nval SCE_C_COMMENTLINEDOC=15\nval SCE_C_WORD2=16\nval SCE_C_COMMENTDOCKEYWORD=17\nval SCE_C_COMMENTDOCKEYWORDERROR=18\nval SCE_C_GLOBALCLASS=19\nval SCE_C_STRINGRAW=20\nval SCE_C_TRIPLEVERBATIM=21\nval SCE_C_HASHQUOTEDSTRING=22\nval SCE_C_PREPROCESSORCOMMENT=23\nval SCE_C_PREPROCESSORCOMMENTDOC=24\nval SCE_C_USERLITERAL=25\nval SCE_C_TASKMARKER=26\nval SCE_C_ESCAPESEQUENCE=27\n# Lexical states for SCLEX_D\nlex D=SCLEX_D SCE_D_\nval SCE_D_DEFAULT=0\nval SCE_D_COMMENT=1\nval SCE_D_COMMENTLINE=2\nval SCE_D_COMMENTDOC=3\nval SCE_D_COMMENTNESTED=4\nval SCE_D_NUMBER=5\nval SCE_D_WORD=6\nval SCE_D_WORD2=7\nval SCE_D_WORD3=8\nval SCE_D_TYPEDEF=9\nval SCE_D_STRING=10\nval SCE_D_STRINGEOL=11\nval SCE_D_CHARACTER=12\nval SCE_D_OPERATOR=13\nval SCE_D_IDENTIFIER=14\nval SCE_D_COMMENTLINEDOC=15\nval SCE_D_COMMENTDOCKEYWORD=16\nval SCE_D_COMMENTDOCKEYWORDERROR=17\nval SCE_D_STRINGB=18\nval SCE_D_STRINGR=19\nval SCE_D_WORD5=20\nval SCE_D_WORD6=21\nval SCE_D_WORD7=22\n# Lexical states for SCLEX_TCL\nlex TCL=SCLEX_TCL SCE_TCL_\nval SCE_TCL_DEFAULT=0\nval SCE_TCL_COMMENT=1\nval SCE_TCL_COMMENTLINE=2\nval SCE_TCL_NUMBER=3\nval SCE_TCL_WORD_IN_QUOTE=4\nval SCE_TCL_IN_QUOTE=5\nval SCE_TCL_OPERATOR=6\nval SCE_TCL_IDENTIFIER=7\nval SCE_TCL_SUBSTITUTION=8\nval SCE_TCL_SUB_BRACE=9\nval SCE_TCL_MODIFIER=10\nval SCE_TCL_EXPAND=11\nval SCE_TCL_WORD=12\nval SCE_TCL_WORD2=13\nval SCE_TCL_WORD3=14\nval SCE_TCL_WORD4=15\nval SCE_TCL_WORD5=16\nval SCE_TCL_WORD6=17\nval SCE_TCL_WORD7=18\nval SCE_TCL_WORD8=19\nval SCE_TCL_COMMENT_BOX=20\nval SCE_TCL_BLOCK_COMMENT=21\n# Lexical states for SCLEX_HTML, SCLEX_XML\nlex HTML=SCLEX_HTML SCE_H_ SCE_HJ_ SCE_HJA_ SCE_HB_ SCE_HBA_ SCE_HP_ SCE_HPHP_ SCE_HPA_\nlex XML=SCLEX_XML SCE_H_ SCE_HJ_ SCE_HJA_ SCE_HB_ SCE_HBA_ SCE_HP_ SCE_HPHP_ SCE_HPA_\nval SCE_H_DEFAULT=0\nval SCE_H_TAG=1\nval SCE_H_TAGUNKNOWN=2\nval SCE_H_ATTRIBUTE=3\nval SCE_H_ATTRIBUTEUNKNOWN=4\nval SCE_H_NUMBER=5\nval SCE_H_DOUBLESTRING=6\nval SCE_H_SINGLESTRING=7\nval SCE_H_OTHER=8\nval SCE_H_COMMENT=9\nval SCE_H_ENTITY=10\n# XML and ASP\nval SCE_H_TAGEND=11\nval SCE_H_XMLSTART=12\nval SCE_H_XMLEND=13\nval SCE_H_SCRIPT=14\nval SCE_H_ASP=15\nval SCE_H_ASPAT=16\nval SCE_H_CDATA=17\nval SCE_H_QUESTION=18\n# More HTML\nval SCE_H_VALUE=19\n# X-Code, ASP.NET, JSP\nval SCE_H_XCCOMMENT=20\n# SGML\nval SCE_H_SGML_DEFAULT=21\nval SCE_H_SGML_COMMAND=22\nval SCE_H_SGML_1ST_PARAM=23\nval SCE_H_SGML_DOUBLESTRING=24\nval SCE_H_SGML_SIMPLESTRING=25\nval SCE_H_SGML_ERROR=26\nval SCE_H_SGML_SPECIAL=27\nval SCE_H_SGML_ENTITY=28\nval SCE_H_SGML_COMMENT=29\nval SCE_H_SGML_1ST_PARAM_COMMENT=30\nval SCE_H_SGML_BLOCK_DEFAULT=31\n# Embedded Javascript\nval SCE_HJ_START=40\nval SCE_HJ_DEFAULT=41\nval SCE_HJ_COMMENT=42\nval SCE_HJ_COMMENTLINE=43\nval SCE_HJ_COMMENTDOC=44\nval SCE_HJ_NUMBER=45\nval SCE_HJ_WORD=46\nval SCE_HJ_KEYWORD=47\nval SCE_HJ_DOUBLESTRING=48\nval SCE_HJ_SINGLESTRING=49\nval SCE_HJ_SYMBOLS=50\nval SCE_HJ_STRINGEOL=51\nval SCE_HJ_REGEX=52\n# ASP Javascript\nval SCE_HJA_START=55\nval SCE_HJA_DEFAULT=56\nval SCE_HJA_COMMENT=57\nval SCE_HJA_COMMENTLINE=58\nval SCE_HJA_COMMENTDOC=59\nval SCE_HJA_NUMBER=60\nval SCE_HJA_WORD=61\nval SCE_HJA_KEYWORD=62\nval SCE_HJA_DOUBLESTRING=63\nval SCE_HJA_SINGLESTRING=64\nval SCE_HJA_SYMBOLS=65\nval SCE_HJA_STRINGEOL=66\nval SCE_HJA_REGEX=67\n# Embedded VBScript\nval SCE_HB_START=70\nval SCE_HB_DEFAULT=71\nval SCE_HB_COMMENTLINE=72\nval SCE_HB_NUMBER=73\nval SCE_HB_WORD=74\nval SCE_HB_STRING=75\nval SCE_HB_IDENTIFIER=76\nval SCE_HB_STRINGEOL=77\n# ASP VBScript\nval SCE_HBA_START=80\nval SCE_HBA_DEFAULT=81\nval SCE_HBA_COMMENTLINE=82\nval SCE_HBA_NUMBER=83\nval SCE_HBA_WORD=84\nval SCE_HBA_STRING=85\nval SCE_HBA_IDENTIFIER=86\nval SCE_HBA_STRINGEOL=87\n# Embedded Python\nval SCE_HP_START=90\nval SCE_HP_DEFAULT=91\nval SCE_HP_COMMENTLINE=92\nval SCE_HP_NUMBER=93\nval SCE_HP_STRING=94\nval SCE_HP_CHARACTER=95\nval SCE_HP_WORD=96\nval SCE_HP_TRIPLE=97\nval SCE_HP_TRIPLEDOUBLE=98\nval SCE_HP_CLASSNAME=99\nval SCE_HP_DEFNAME=100\nval SCE_HP_OPERATOR=101\nval SCE_HP_IDENTIFIER=102\n# PHP\nval SCE_HPHP_COMPLEX_VARIABLE=104\n# ASP Python\nval SCE_HPA_START=105\nval SCE_HPA_DEFAULT=106\nval SCE_HPA_COMMENTLINE=107\nval SCE_HPA_NUMBER=108\nval SCE_HPA_STRING=109\nval SCE_HPA_CHARACTER=110\nval SCE_HPA_WORD=111\nval SCE_HPA_TRIPLE=112\nval SCE_HPA_TRIPLEDOUBLE=113\nval SCE_HPA_CLASSNAME=114\nval SCE_HPA_DEFNAME=115\nval SCE_HPA_OPERATOR=116\nval SCE_HPA_IDENTIFIER=117\n# PHP\nval SCE_HPHP_DEFAULT=118\nval SCE_HPHP_HSTRING=119\nval SCE_HPHP_SIMPLESTRING=120\nval SCE_HPHP_WORD=121\nval SCE_HPHP_NUMBER=122\nval SCE_HPHP_VARIABLE=123\nval SCE_HPHP_COMMENT=124\nval SCE_HPHP_COMMENTLINE=125\nval SCE_HPHP_HSTRING_VARIABLE=126\nval SCE_HPHP_OPERATOR=127\n# Lexical states for SCLEX_PERL\nlex Perl=SCLEX_PERL SCE_PL_\nval SCE_PL_DEFAULT=0\nval SCE_PL_ERROR=1\nval SCE_PL_COMMENTLINE=2\nval SCE_PL_POD=3\nval SCE_PL_NUMBER=4\nval SCE_PL_WORD=5\nval SCE_PL_STRING=6\nval SCE_PL_CHARACTER=7\nval SCE_PL_PUNCTUATION=8\nval SCE_PL_PREPROCESSOR=9\nval SCE_PL_OPERATOR=10\nval SCE_PL_IDENTIFIER=11\nval SCE_PL_SCALAR=12\nval SCE_PL_ARRAY=13\nval SCE_PL_HASH=14\nval SCE_PL_SYMBOLTABLE=15\nval SCE_PL_VARIABLE_INDEXER=16\nval SCE_PL_REGEX=17\nval SCE_PL_REGSUBST=18\nval SCE_PL_LONGQUOTE=19\nval SCE_PL_BACKTICKS=20\nval SCE_PL_DATASECTION=21\nval SCE_PL_HERE_DELIM=22\nval SCE_PL_HERE_Q=23\nval SCE_PL_HERE_QQ=24\nval SCE_PL_HERE_QX=25\nval SCE_PL_STRING_Q=26\nval SCE_PL_STRING_QQ=27\nval SCE_PL_STRING_QX=28\nval SCE_PL_STRING_QR=29\nval SCE_PL_STRING_QW=30\nval SCE_PL_POD_VERB=31\nval SCE_PL_SUB_PROTOTYPE=40\nval SCE_PL_FORMAT_IDENT=41\nval SCE_PL_FORMAT=42\nval SCE_PL_STRING_VAR=43\nval SCE_PL_XLAT=44\nval SCE_PL_REGEX_VAR=54\nval SCE_PL_REGSUBST_VAR=55\nval SCE_PL_BACKTICKS_VAR=57\nval SCE_PL_HERE_QQ_VAR=61\nval SCE_PL_HERE_QX_VAR=62\nval SCE_PL_STRING_QQ_VAR=64\nval SCE_PL_STRING_QX_VAR=65\nval SCE_PL_STRING_QR_VAR=66\n# Lexical states for SCLEX_RUBY\nlex Ruby=SCLEX_RUBY SCE_RB_\nval SCE_RB_DEFAULT=0\nval SCE_RB_ERROR=1\nval SCE_RB_COMMENTLINE=2\nval SCE_RB_POD=3\nval SCE_RB_NUMBER=4\nval SCE_RB_WORD=5\nval SCE_RB_STRING=6\nval SCE_RB_CHARACTER=7\nval SCE_RB_CLASSNAME=8\nval SCE_RB_DEFNAME=9\nval SCE_RB_OPERATOR=10\nval SCE_RB_IDENTIFIER=11\nval SCE_RB_REGEX=12\nval SCE_RB_GLOBAL=13\nval SCE_RB_SYMBOL=14\nval SCE_RB_MODULE_NAME=15\nval SCE_RB_INSTANCE_VAR=16\nval SCE_RB_CLASS_VAR=17\nval SCE_RB_BACKTICKS=18\nval SCE_RB_DATASECTION=19\nval SCE_RB_HERE_DELIM=20\nval SCE_RB_HERE_Q=21\nval SCE_RB_HERE_QQ=22\nval SCE_RB_HERE_QX=23\nval SCE_RB_STRING_Q=24\nval SCE_RB_STRING_QQ=25\nval SCE_RB_STRING_QX=26\nval SCE_RB_STRING_QR=27\nval SCE_RB_STRING_QW=28\nval SCE_RB_WORD_DEMOTED=29\nval SCE_RB_STDIN=30\nval SCE_RB_STDOUT=31\nval SCE_RB_STDERR=40\nval SCE_RB_STRING_W=41\nval SCE_RB_STRING_I=42\nval SCE_RB_STRING_QI=43\nval SCE_RB_STRING_QS=44\nval SCE_RB_UPPER_BOUND=45\n# Lexical states for SCLEX_VB, SCLEX_VBSCRIPT, SCLEX_POWERBASIC, SCLEX_BLITZBASIC, SCLEX_PUREBASIC, SCLEX_FREEBASIC\nlex VB=SCLEX_VB SCE_B_\nlex VBScript=SCLEX_VBSCRIPT SCE_B_\nlex PowerBasic=SCLEX_POWERBASIC SCE_B_\nlex BlitzBasic=SCLEX_BLITZBASIC SCE_B_\nlex PureBasic=SCLEX_PUREBASIC SCE_B_\nlex FreeBasic=SCLEX_FREEBASIC SCE_B_\nval SCE_B_DEFAULT=0\nval SCE_B_COMMENT=1\nval SCE_B_NUMBER=2\nval SCE_B_KEYWORD=3\nval SCE_B_STRING=4\nval SCE_B_PREPROCESSOR=5\nval SCE_B_OPERATOR=6\nval SCE_B_IDENTIFIER=7\nval SCE_B_DATE=8\nval SCE_B_STRINGEOL=9\nval SCE_B_KEYWORD2=10\nval SCE_B_KEYWORD3=11\nval SCE_B_KEYWORD4=12\nval SCE_B_CONSTANT=13\nval SCE_B_ASM=14\nval SCE_B_LABEL=15\nval SCE_B_ERROR=16\nval SCE_B_HEXNUMBER=17\nval SCE_B_BINNUMBER=18\nval SCE_B_COMMENTBLOCK=19\nval SCE_B_DOCLINE=20\nval SCE_B_DOCBLOCK=21\nval SCE_B_DOCKEYWORD=22\n# Lexical states for SCLEX_PROPERTIES\nlex Properties=SCLEX_PROPERTIES SCE_PROPS_\nval SCE_PROPS_DEFAULT=0\nval SCE_PROPS_COMMENT=1\nval SCE_PROPS_SECTION=2\nval SCE_PROPS_ASSIGNMENT=3\nval SCE_PROPS_DEFVAL=4\nval SCE_PROPS_KEY=5\n# Lexical states for SCLEX_LATEX\nlex LaTeX=SCLEX_LATEX SCE_L_\nval SCE_L_DEFAULT=0\nval SCE_L_COMMAND=1\nval SCE_L_TAG=2\nval SCE_L_MATH=3\nval SCE_L_COMMENT=4\nval SCE_L_TAG2=5\nval SCE_L_MATH2=6\nval SCE_L_COMMENT2=7\nval SCE_L_VERBATIM=8\nval SCE_L_SHORTCMD=9\nval SCE_L_SPECIAL=10\nval SCE_L_CMDOPT=11\nval SCE_L_ERROR=12\n# Lexical states for SCLEX_LUA\nlex Lua=SCLEX_LUA SCE_LUA_\nval SCE_LUA_DEFAULT=0\nval SCE_LUA_COMMENT=1\nval SCE_LUA_COMMENTLINE=2\nval SCE_LUA_COMMENTDOC=3\nval SCE_LUA_NUMBER=4\nval SCE_LUA_WORD=5\nval SCE_LUA_STRING=6\nval SCE_LUA_CHARACTER=7\nval SCE_LUA_LITERALSTRING=8\nval SCE_LUA_PREPROCESSOR=9\nval SCE_LUA_OPERATOR=10\nval SCE_LUA_IDENTIFIER=11\nval SCE_LUA_STRINGEOL=12\nval SCE_LUA_WORD2=13\nval SCE_LUA_WORD3=14\nval SCE_LUA_WORD4=15\nval SCE_LUA_WORD5=16\nval SCE_LUA_WORD6=17\nval SCE_LUA_WORD7=18\nval SCE_LUA_WORD8=19\nval SCE_LUA_LABEL=20\n# Lexical states for SCLEX_ERRORLIST\nlex ErrorList=SCLEX_ERRORLIST SCE_ERR_\nval SCE_ERR_DEFAULT=0\nval SCE_ERR_PYTHON=1\nval SCE_ERR_GCC=2\nval SCE_ERR_MS=3\nval SCE_ERR_CMD=4\nval SCE_ERR_BORLAND=5\nval SCE_ERR_PERL=6\nval SCE_ERR_NET=7\nval SCE_ERR_LUA=8\nval SCE_ERR_CTAG=9\nval SCE_ERR_DIFF_CHANGED=10\nval SCE_ERR_DIFF_ADDITION=11\nval SCE_ERR_DIFF_DELETION=12\nval SCE_ERR_DIFF_MESSAGE=13\nval SCE_ERR_PHP=14\nval SCE_ERR_ELF=15\nval SCE_ERR_IFC=16\nval SCE_ERR_IFORT=17\nval SCE_ERR_ABSF=18\nval SCE_ERR_TIDY=19\nval SCE_ERR_JAVA_STACK=20\nval SCE_ERR_VALUE=21\nval SCE_ERR_GCC_INCLUDED_FROM=22\nval SCE_ERR_ESCSEQ=23\nval SCE_ERR_ESCSEQ_UNKNOWN=24\nval SCE_ERR_GCC_EXCERPT=25\nval SCE_ERR_BASH=26\nval SCE_ERR_ES_BLACK=40\nval SCE_ERR_ES_RED=41\nval SCE_ERR_ES_GREEN=42\nval SCE_ERR_ES_BROWN=43\nval SCE_ERR_ES_BLUE=44\nval SCE_ERR_ES_MAGENTA=45\nval SCE_ERR_ES_CYAN=46\nval SCE_ERR_ES_GRAY=47\nval SCE_ERR_ES_DARK_GRAY=48\nval SCE_ERR_ES_BRIGHT_RED=49\nval SCE_ERR_ES_BRIGHT_GREEN=50\nval SCE_ERR_ES_YELLOW=51\nval SCE_ERR_ES_BRIGHT_BLUE=52\nval SCE_ERR_ES_BRIGHT_MAGENTA=53\nval SCE_ERR_ES_BRIGHT_CYAN=54\nval SCE_ERR_ES_WHITE=55\n# Lexical states for SCLEX_BATCH\nlex Batch=SCLEX_BATCH SCE_BAT_\nval SCE_BAT_DEFAULT=0\nval SCE_BAT_COMMENT=1\nval SCE_BAT_WORD=2\nval SCE_BAT_LABEL=3\nval SCE_BAT_HIDE=4\nval SCE_BAT_COMMAND=5\nval SCE_BAT_IDENTIFIER=6\nval SCE_BAT_OPERATOR=7\nval SCE_BAT_AFTER_LABEL=8\n# Lexical states for SCLEX_TCMD\nlex TCMD=SCLEX_TCMD SCE_TCMD_\nval SCE_TCMD_DEFAULT=0\nval SCE_TCMD_COMMENT=1\nval SCE_TCMD_WORD=2\nval SCE_TCMD_LABEL=3\nval SCE_TCMD_HIDE=4\nval SCE_TCMD_COMMAND=5\nval SCE_TCMD_IDENTIFIER=6\nval SCE_TCMD_OPERATOR=7\nval SCE_TCMD_ENVIRONMENT=8\nval SCE_TCMD_EXPANSION=9\nval SCE_TCMD_CLABEL=10\n# Lexical states for SCLEX_MAKEFILE\nlex MakeFile=SCLEX_MAKEFILE SCE_MAKE_\nval SCE_MAKE_DEFAULT=0\nval SCE_MAKE_COMMENT=1\nval SCE_MAKE_PREPROCESSOR=2\nval SCE_MAKE_IDENTIFIER=3\nval SCE_MAKE_OPERATOR=4\nval SCE_MAKE_TARGET=5\nval SCE_MAKE_IDEOL=9\n# Lexical states for SCLEX_DIFF\nlex Diff=SCLEX_DIFF SCE_DIFF_\nval SCE_DIFF_DEFAULT=0\nval SCE_DIFF_COMMENT=1\nval SCE_DIFF_COMMAND=2\nval SCE_DIFF_HEADER=3\nval SCE_DIFF_POSITION=4\nval SCE_DIFF_DELETED=5\nval SCE_DIFF_ADDED=6\nval SCE_DIFF_CHANGED=7\nval SCE_DIFF_PATCH_ADD=8\nval SCE_DIFF_PATCH_DELETE=9\nval SCE_DIFF_REMOVED_PATCH_ADD=10\nval SCE_DIFF_REMOVED_PATCH_DELETE=11\n# Lexical states for SCLEX_CONF (Apache Configuration Files Lexer)\nlex Conf=SCLEX_CONF SCE_CONF_\nval SCE_CONF_DEFAULT=0\nval SCE_CONF_COMMENT=1\nval SCE_CONF_NUMBER=2\nval SCE_CONF_IDENTIFIER=3\nval SCE_CONF_EXTENSION=4\nval SCE_CONF_PARAMETER=5\nval SCE_CONF_STRING=6\nval SCE_CONF_OPERATOR=7\nval SCE_CONF_IP=8\nval SCE_CONF_DIRECTIVE=9\n# Lexical states for SCLEX_AVE, Avenue\nlex Avenue=SCLEX_AVE SCE_AVE_\nval SCE_AVE_DEFAULT=0\nval SCE_AVE_COMMENT=1\nval SCE_AVE_NUMBER=2\nval SCE_AVE_WORD=3\nval SCE_AVE_STRING=6\nval SCE_AVE_ENUM=7\nval SCE_AVE_STRINGEOL=8\nval SCE_AVE_IDENTIFIER=9\nval SCE_AVE_OPERATOR=10\nval SCE_AVE_WORD1=11\nval SCE_AVE_WORD2=12\nval SCE_AVE_WORD3=13\nval SCE_AVE_WORD4=14\nval SCE_AVE_WORD5=15\nval SCE_AVE_WORD6=16\n# Lexical states for SCLEX_ADA\nlex Ada=SCLEX_ADA SCE_ADA_\nval SCE_ADA_DEFAULT=0\nval SCE_ADA_WORD=1\nval SCE_ADA_IDENTIFIER=2\nval SCE_ADA_NUMBER=3\nval SCE_ADA_DELIMITER=4\nval SCE_ADA_CHARACTER=5\nval SCE_ADA_CHARACTEREOL=6\nval SCE_ADA_STRING=7\nval SCE_ADA_STRINGEOL=8\nval SCE_ADA_LABEL=9\nval SCE_ADA_COMMENTLINE=10\nval SCE_ADA_ILLEGAL=11\n# Lexical states for SCLEX_BAAN\nlex Baan=SCLEX_BAAN SCE_BAAN_\nval SCE_BAAN_DEFAULT=0\nval SCE_BAAN_COMMENT=1\nval SCE_BAAN_COMMENTDOC=2\nval SCE_BAAN_NUMBER=3\nval SCE_BAAN_WORD=4\nval SCE_BAAN_STRING=5\nval SCE_BAAN_PREPROCESSOR=6\nval SCE_BAAN_OPERATOR=7\nval SCE_BAAN_IDENTIFIER=8\nval SCE_BAAN_STRINGEOL=9\nval SCE_BAAN_WORD2=10\nval SCE_BAAN_WORD3=11\nval SCE_BAAN_WORD4=12\nval SCE_BAAN_WORD5=13\nval SCE_BAAN_WORD6=14\nval SCE_BAAN_WORD7=15\nval SCE_BAAN_WORD8=16\nval SCE_BAAN_WORD9=17\nval SCE_BAAN_TABLEDEF=18\nval SCE_BAAN_TABLESQL=19\nval SCE_BAAN_FUNCTION=20\nval SCE_BAAN_DOMDEF=21\nval SCE_BAAN_FUNCDEF=22\nval SCE_BAAN_OBJECTDEF=23\nval SCE_BAAN_DEFINEDEF=24\n# Lexical states for SCLEX_LISP\nlex Lisp=SCLEX_LISP SCE_LISP_\nval SCE_LISP_DEFAULT=0\nval SCE_LISP_COMMENT=1\nval SCE_LISP_NUMBER=2\nval SCE_LISP_KEYWORD=3\nval SCE_LISP_KEYWORD_KW=4\nval SCE_LISP_SYMBOL=5\nval SCE_LISP_STRING=6\nval SCE_LISP_STRINGEOL=8\nval SCE_LISP_IDENTIFIER=9\nval SCE_LISP_OPERATOR=10\nval SCE_LISP_SPECIAL=11\nval SCE_LISP_MULTI_COMMENT=12\n# Lexical states for SCLEX_EIFFEL and SCLEX_EIFFELKW\nlex Eiffel=SCLEX_EIFFEL SCE_EIFFEL_\nlex EiffelKW=SCLEX_EIFFELKW SCE_EIFFEL_\nval SCE_EIFFEL_DEFAULT=0\nval SCE_EIFFEL_COMMENTLINE=1\nval SCE_EIFFEL_NUMBER=2\nval SCE_EIFFEL_WORD=3\nval SCE_EIFFEL_STRING=4\nval SCE_EIFFEL_CHARACTER=5\nval SCE_EIFFEL_OPERATOR=6\nval SCE_EIFFEL_IDENTIFIER=7\nval SCE_EIFFEL_STRINGEOL=8\n# Lexical states for SCLEX_NNCRONTAB (nnCron crontab Lexer)\nlex NNCronTab=SCLEX_NNCRONTAB SCE_NNCRONTAB_\nval SCE_NNCRONTAB_DEFAULT=0\nval SCE_NNCRONTAB_COMMENT=1\nval SCE_NNCRONTAB_TASK=2\nval SCE_NNCRONTAB_SECTION=3\nval SCE_NNCRONTAB_KEYWORD=4\nval SCE_NNCRONTAB_MODIFIER=5\nval SCE_NNCRONTAB_ASTERISK=6\nval SCE_NNCRONTAB_NUMBER=7\nval SCE_NNCRONTAB_STRING=8\nval SCE_NNCRONTAB_ENVIRONMENT=9\nval SCE_NNCRONTAB_IDENTIFIER=10\n# Lexical states for SCLEX_FORTH (Forth Lexer)\nlex Forth=SCLEX_FORTH SCE_FORTH_\nval SCE_FORTH_DEFAULT=0\nval SCE_FORTH_COMMENT=1\nval SCE_FORTH_COMMENT_ML=2\nval SCE_FORTH_IDENTIFIER=3\nval SCE_FORTH_CONTROL=4\nval SCE_FORTH_KEYWORD=5\nval SCE_FORTH_DEFWORD=6\nval SCE_FORTH_PREWORD1=7\nval SCE_FORTH_PREWORD2=8\nval SCE_FORTH_NUMBER=9\nval SCE_FORTH_STRING=10\nval SCE_FORTH_LOCALE=11\n# Lexical states for SCLEX_MATLAB\nlex MatLab=SCLEX_MATLAB SCE_MATLAB_\nval SCE_MATLAB_DEFAULT=0\nval SCE_MATLAB_COMMENT=1\nval SCE_MATLAB_COMMAND=2\nval SCE_MATLAB_NUMBER=3\nval SCE_MATLAB_KEYWORD=4\n# single quoted string\nval SCE_MATLAB_STRING=5\nval SCE_MATLAB_OPERATOR=6\nval SCE_MATLAB_IDENTIFIER=7\nval SCE_MATLAB_DOUBLEQUOTESTRING=8\n# Lexical states for SCLEX_MAXIMA\nlex Maxima=SCLEX_MAXIMA SCE_MAXIMA_\nval SCE_MAXIMA_OPERATOR=0\nval SCE_MAXIMA_COMMANDENDING=1\nval SCE_MAXIMA_COMMENT=2\nval SCE_MAXIMA_NUMBER=3\nval SCE_MAXIMA_STRING=4\nval SCE_MAXIMA_COMMAND=5\nval SCE_MAXIMA_VARIABLE=6\nval SCE_MAXIMA_UNKNOWN=7\n# Lexical states for SCLEX_SCRIPTOL\nlex Sol=SCLEX_SCRIPTOL SCE_SCRIPTOL_\nval SCE_SCRIPTOL_DEFAULT=0\nval SCE_SCRIPTOL_WHITE=1\nval SCE_SCRIPTOL_COMMENTLINE=2\nval SCE_SCRIPTOL_PERSISTENT=3\nval SCE_SCRIPTOL_CSTYLE=4\nval SCE_SCRIPTOL_COMMENTBLOCK=5\nval SCE_SCRIPTOL_NUMBER=6\nval SCE_SCRIPTOL_STRING=7\nval SCE_SCRIPTOL_CHARACTER=8\nval SCE_SCRIPTOL_STRINGEOL=9\nval SCE_SCRIPTOL_KEYWORD=10\nval SCE_SCRIPTOL_OPERATOR=11\nval SCE_SCRIPTOL_IDENTIFIER=12\nval SCE_SCRIPTOL_TRIPLE=13\nval SCE_SCRIPTOL_CLASSNAME=14\nval SCE_SCRIPTOL_PREPROCESSOR=15\n# Lexical states for SCLEX_ASM, SCLEX_AS\nlex Asm=SCLEX_ASM SCE_ASM_\nlex As=SCLEX_AS SCE_ASM_\nval SCE_ASM_DEFAULT=0\nval SCE_ASM_COMMENT=1\nval SCE_ASM_NUMBER=2\nval SCE_ASM_STRING=3\nval SCE_ASM_OPERATOR=4\nval SCE_ASM_IDENTIFIER=5\nval SCE_ASM_CPUINSTRUCTION=6\nval SCE_ASM_MATHINSTRUCTION=7\nval SCE_ASM_REGISTER=8\nval SCE_ASM_DIRECTIVE=9\nval SCE_ASM_DIRECTIVEOPERAND=10\nval SCE_ASM_COMMENTBLOCK=11\nval SCE_ASM_CHARACTER=12\nval SCE_ASM_STRINGEOL=13\nval SCE_ASM_EXTINSTRUCTION=14\nval SCE_ASM_COMMENTDIRECTIVE=15\n# Lexical states for SCLEX_FORTRAN\nlex Fortran=SCLEX_FORTRAN SCE_F_\nlex F77=SCLEX_F77 SCE_F_\nval SCE_F_DEFAULT=0\nval SCE_F_COMMENT=1\nval SCE_F_NUMBER=2\nval SCE_F_STRING1=3\nval SCE_F_STRING2=4\nval SCE_F_STRINGEOL=5\nval SCE_F_OPERATOR=6\nval SCE_F_IDENTIFIER=7\nval SCE_F_WORD=8\nval SCE_F_WORD2=9\nval SCE_F_WORD3=10\nval SCE_F_PREPROCESSOR=11\nval SCE_F_OPERATOR2=12\nval SCE_F_LABEL=13\nval SCE_F_CONTINUATION=14\n# Lexical states for SCLEX_CSS\nlex CSS=SCLEX_CSS SCE_CSS_\nval SCE_CSS_DEFAULT=0\nval SCE_CSS_TAG=1\nval SCE_CSS_CLASS=2\nval SCE_CSS_PSEUDOCLASS=3\nval SCE_CSS_UNKNOWN_PSEUDOCLASS=4\nval SCE_CSS_OPERATOR=5\nval SCE_CSS_IDENTIFIER=6\nval SCE_CSS_UNKNOWN_IDENTIFIER=7\nval SCE_CSS_VALUE=8\nval SCE_CSS_COMMENT=9\nval SCE_CSS_ID=10\nval SCE_CSS_IMPORTANT=11\nval SCE_CSS_DIRECTIVE=12\nval SCE_CSS_DOUBLESTRING=13\nval SCE_CSS_SINGLESTRING=14\nval SCE_CSS_IDENTIFIER2=15\nval SCE_CSS_ATTRIBUTE=16\nval SCE_CSS_IDENTIFIER3=17\nval SCE_CSS_PSEUDOELEMENT=18\nval SCE_CSS_EXTENDED_IDENTIFIER=19\nval SCE_CSS_EXTENDED_PSEUDOCLASS=20\nval SCE_CSS_EXTENDED_PSEUDOELEMENT=21\nval SCE_CSS_GROUP_RULE=22\nval SCE_CSS_VARIABLE=23\n# Lexical states for SCLEX_POV\nlex POV=SCLEX_POV SCE_POV_\nval SCE_POV_DEFAULT=0\nval SCE_POV_COMMENT=1\nval SCE_POV_COMMENTLINE=2\nval SCE_POV_NUMBER=3\nval SCE_POV_OPERATOR=4\nval SCE_POV_IDENTIFIER=5\nval SCE_POV_STRING=6\nval SCE_POV_STRINGEOL=7\nval SCE_POV_DIRECTIVE=8\nval SCE_POV_BADDIRECTIVE=9\nval SCE_POV_WORD2=10\nval SCE_POV_WORD3=11\nval SCE_POV_WORD4=12\nval SCE_POV_WORD5=13\nval SCE_POV_WORD6=14\nval SCE_POV_WORD7=15\nval SCE_POV_WORD8=16\n# Lexical states for SCLEX_LOUT\nlex LOUT=SCLEX_LOUT SCE_LOUT_\nval SCE_LOUT_DEFAULT=0\nval SCE_LOUT_COMMENT=1\nval SCE_LOUT_NUMBER=2\nval SCE_LOUT_WORD=3\nval SCE_LOUT_WORD2=4\nval SCE_LOUT_WORD3=5\nval SCE_LOUT_WORD4=6\nval SCE_LOUT_STRING=7\nval SCE_LOUT_OPERATOR=8\nval SCE_LOUT_IDENTIFIER=9\nval SCE_LOUT_STRINGEOL=10\n# Lexical states for SCLEX_ESCRIPT\nlex ESCRIPT=SCLEX_ESCRIPT SCE_ESCRIPT_\nval SCE_ESCRIPT_DEFAULT=0\nval SCE_ESCRIPT_COMMENT=1\nval SCE_ESCRIPT_COMMENTLINE=2\nval SCE_ESCRIPT_COMMENTDOC=3\nval SCE_ESCRIPT_NUMBER=4\nval SCE_ESCRIPT_WORD=5\nval SCE_ESCRIPT_STRING=6\nval SCE_ESCRIPT_OPERATOR=7\nval SCE_ESCRIPT_IDENTIFIER=8\nval SCE_ESCRIPT_BRACE=9\nval SCE_ESCRIPT_WORD2=10\nval SCE_ESCRIPT_WORD3=11\n# Lexical states for SCLEX_PS\nlex PS=SCLEX_PS SCE_PS_\nval SCE_PS_DEFAULT=0\nval SCE_PS_COMMENT=1\nval SCE_PS_DSC_COMMENT=2\nval SCE_PS_DSC_VALUE=3\nval SCE_PS_NUMBER=4\nval SCE_PS_NAME=5\nval SCE_PS_KEYWORD=6\nval SCE_PS_LITERAL=7\nval SCE_PS_IMMEVAL=8\nval SCE_PS_PAREN_ARRAY=9\nval SCE_PS_PAREN_DICT=10\nval SCE_PS_PAREN_PROC=11\nval SCE_PS_TEXT=12\nval SCE_PS_HEXSTRING=13\nval SCE_PS_BASE85STRING=14\nval SCE_PS_BADSTRINGCHAR=15\n# Lexical states for SCLEX_NSIS\nlex NSIS=SCLEX_NSIS SCE_NSIS_\nval SCE_NSIS_DEFAULT=0\nval SCE_NSIS_COMMENT=1\nval SCE_NSIS_STRINGDQ=2\nval SCE_NSIS_STRINGLQ=3\nval SCE_NSIS_STRINGRQ=4\nval SCE_NSIS_FUNCTION=5\nval SCE_NSIS_VARIABLE=6\nval SCE_NSIS_LABEL=7\nval SCE_NSIS_USERDEFINED=8\nval SCE_NSIS_SECTIONDEF=9\nval SCE_NSIS_SUBSECTIONDEF=10\nval SCE_NSIS_IFDEFINEDEF=11\nval SCE_NSIS_MACRODEF=12\nval SCE_NSIS_STRINGVAR=13\nval SCE_NSIS_NUMBER=14\nval SCE_NSIS_SECTIONGROUP=15\nval SCE_NSIS_PAGEEX=16\nval SCE_NSIS_FUNCTIONDEF=17\nval SCE_NSIS_COMMENTBOX=18\n# Lexical states for SCLEX_MMIXAL\nlex MMIXAL=SCLEX_MMIXAL SCE_MMIXAL_\nval SCE_MMIXAL_LEADWS=0\nval SCE_MMIXAL_COMMENT=1\nval SCE_MMIXAL_LABEL=2\nval SCE_MMIXAL_OPCODE=3\nval SCE_MMIXAL_OPCODE_PRE=4\nval SCE_MMIXAL_OPCODE_VALID=5\nval SCE_MMIXAL_OPCODE_UNKNOWN=6\nval SCE_MMIXAL_OPCODE_POST=7\nval SCE_MMIXAL_OPERANDS=8\nval SCE_MMIXAL_NUMBER=9\nval SCE_MMIXAL_REF=10\nval SCE_MMIXAL_CHAR=11\nval SCE_MMIXAL_STRING=12\nval SCE_MMIXAL_REGISTER=13\nval SCE_MMIXAL_HEX=14\nval SCE_MMIXAL_OPERATOR=15\nval SCE_MMIXAL_SYMBOL=16\nval SCE_MMIXAL_INCLUDE=17\n# Lexical states for SCLEX_CLW\nlex Clarion=SCLEX_CLW SCE_CLW_\nval SCE_CLW_DEFAULT=0\nval SCE_CLW_LABEL=1\nval SCE_CLW_COMMENT=2\nval SCE_CLW_STRING=3\nval SCE_CLW_USER_IDENTIFIER=4\nval SCE_CLW_INTEGER_CONSTANT=5\nval SCE_CLW_REAL_CONSTANT=6\nval SCE_CLW_PICTURE_STRING=7\nval SCE_CLW_KEYWORD=8\nval SCE_CLW_COMPILER_DIRECTIVE=9\nval SCE_CLW_RUNTIME_EXPRESSIONS=10\nval SCE_CLW_BUILTIN_PROCEDURES_FUNCTION=11\nval SCE_CLW_STRUCTURE_DATA_TYPE=12\nval SCE_CLW_ATTRIBUTE=13\nval SCE_CLW_STANDARD_EQUATE=14\nval SCE_CLW_ERROR=15\nval SCE_CLW_DEPRECATED=16\n# Lexical states for SCLEX_LOT\nlex LOT=SCLEX_LOT SCE_LOT_\nval SCE_LOT_DEFAULT=0\nval SCE_LOT_HEADER=1\nval SCE_LOT_BREAK=2\nval SCE_LOT_SET=3\nval SCE_LOT_PASS=4\nval SCE_LOT_FAIL=5\nval SCE_LOT_ABORT=6\n# Lexical states for SCLEX_YAML\nlex YAML=SCLEX_YAML SCE_YAML_\nval SCE_YAML_DEFAULT=0\nval SCE_YAML_COMMENT=1\nval SCE_YAML_IDENTIFIER=2\nval SCE_YAML_KEYWORD=3\nval SCE_YAML_NUMBER=4\nval SCE_YAML_REFERENCE=5\nval SCE_YAML_DOCUMENT=6\nval SCE_YAML_TEXT=7\nval SCE_YAML_ERROR=8\nval SCE_YAML_OPERATOR=9\n# Lexical states for SCLEX_TEX\nlex TeX=SCLEX_TEX SCE_TEX_\nval SCE_TEX_DEFAULT=0\nval SCE_TEX_SPECIAL=1\nval SCE_TEX_GROUP=2\nval SCE_TEX_SYMBOL=3\nval SCE_TEX_COMMAND=4\nval SCE_TEX_TEXT=5\nlex Metapost=SCLEX_METAPOST SCE_METAPOST_\nval SCE_METAPOST_DEFAULT=0\nval SCE_METAPOST_SPECIAL=1\nval SCE_METAPOST_GROUP=2\nval SCE_METAPOST_SYMBOL=3\nval SCE_METAPOST_COMMAND=4\nval SCE_METAPOST_TEXT=5\nval SCE_METAPOST_EXTRA=6\n# Lexical states for SCLEX_ERLANG\nlex Erlang=SCLEX_ERLANG SCE_ERLANG_\nval SCE_ERLANG_DEFAULT=0\nval SCE_ERLANG_COMMENT=1\nval SCE_ERLANG_VARIABLE=2\nval SCE_ERLANG_NUMBER=3\nval SCE_ERLANG_KEYWORD=4\nval SCE_ERLANG_STRING=5\nval SCE_ERLANG_OPERATOR=6\nval SCE_ERLANG_ATOM=7\nval SCE_ERLANG_FUNCTION_NAME=8\nval SCE_ERLANG_CHARACTER=9\nval SCE_ERLANG_MACRO=10\nval SCE_ERLANG_RECORD=11\nval SCE_ERLANG_PREPROC=12\nval SCE_ERLANG_NODE_NAME=13\nval SCE_ERLANG_COMMENT_FUNCTION=14\nval SCE_ERLANG_COMMENT_MODULE=15\nval SCE_ERLANG_COMMENT_DOC=16\nval SCE_ERLANG_COMMENT_DOC_MACRO=17\nval SCE_ERLANG_ATOM_QUOTED=18\nval SCE_ERLANG_MACRO_QUOTED=19\nval SCE_ERLANG_RECORD_QUOTED=20\nval SCE_ERLANG_NODE_NAME_QUOTED=21\nval SCE_ERLANG_BIFS=22\nval SCE_ERLANG_MODULES=23\nval SCE_ERLANG_MODULES_ATT=24\nval SCE_ERLANG_UNKNOWN=31\n# Lexical states for SCLEX_OCTAVE are identical to MatLab\nlex Octave=SCLEX_OCTAVE SCE_MATLAB_\n# Lexical states for SCLEX_JULIA\nlex Julia=SCLEX_JULIA SCE_JULIA_\nval SCE_JULIA_DEFAULT=0\nval SCE_JULIA_COMMENT=1\nval SCE_JULIA_NUMBER=2\nval SCE_JULIA_KEYWORD1=3\nval SCE_JULIA_KEYWORD2=4\nval SCE_JULIA_KEYWORD3=5\nval SCE_JULIA_CHAR=6\nval SCE_JULIA_OPERATOR=7\nval SCE_JULIA_BRACKET=8\nval SCE_JULIA_IDENTIFIER=9\nval SCE_JULIA_STRING=10\nval SCE_JULIA_SYMBOL=11\nval SCE_JULIA_MACRO=12\nval SCE_JULIA_STRINGINTERP=13\nval SCE_JULIA_DOCSTRING=14\nval SCE_JULIA_STRINGLITERAL=15\nval SCE_JULIA_COMMAND=16\nval SCE_JULIA_COMMANDLITERAL=17\nval SCE_JULIA_TYPEANNOT=18\nval SCE_JULIA_LEXERROR=19\nval SCE_JULIA_KEYWORD4=20\nval SCE_JULIA_TYPEOPERATOR=21\n# Lexical states for SCLEX_MSSQL\nlex MSSQL=SCLEX_MSSQL SCE_MSSQL_\nval SCE_MSSQL_DEFAULT=0\nval SCE_MSSQL_COMMENT=1\nval SCE_MSSQL_LINE_COMMENT=2\nval SCE_MSSQL_NUMBER=3\nval SCE_MSSQL_STRING=4\nval SCE_MSSQL_OPERATOR=5\nval SCE_MSSQL_IDENTIFIER=6\nval SCE_MSSQL_VARIABLE=7\nval SCE_MSSQL_COLUMN_NAME=8\nval SCE_MSSQL_STATEMENT=9\nval SCE_MSSQL_DATATYPE=10\nval SCE_MSSQL_SYSTABLE=11\nval SCE_MSSQL_GLOBAL_VARIABLE=12\nval SCE_MSSQL_FUNCTION=13\nval SCE_MSSQL_STORED_PROCEDURE=14\nval SCE_MSSQL_DEFAULT_PREF_DATATYPE=15\nval SCE_MSSQL_COLUMN_NAME_2=16\n# Lexical states for SCLEX_VERILOG\nlex Verilog=SCLEX_VERILOG SCE_V_\nval SCE_V_DEFAULT=0\nval SCE_V_COMMENT=1\nval SCE_V_COMMENTLINE=2\nval SCE_V_COMMENTLINEBANG=3\nval SCE_V_NUMBER=4\nval SCE_V_WORD=5\nval SCE_V_STRING=6\nval SCE_V_WORD2=7\nval SCE_V_WORD3=8\nval SCE_V_PREPROCESSOR=9\nval SCE_V_OPERATOR=10\nval SCE_V_IDENTIFIER=11\nval SCE_V_STRINGEOL=12\nval SCE_V_USER=19\nval SCE_V_COMMENT_WORD=20\nval SCE_V_INPUT=21\nval SCE_V_OUTPUT=22\nval SCE_V_INOUT=23\nval SCE_V_PORT_CONNECT=24\n# Lexical states for SCLEX_KIX\nlex Kix=SCLEX_KIX SCE_KIX_\nval SCE_KIX_DEFAULT=0\nval SCE_KIX_COMMENT=1\nval SCE_KIX_STRING1=2\nval SCE_KIX_STRING2=3\nval SCE_KIX_NUMBER=4\nval SCE_KIX_VAR=5\nval SCE_KIX_MACRO=6\nval SCE_KIX_KEYWORD=7\nval SCE_KIX_FUNCTIONS=8\nval SCE_KIX_OPERATOR=9\nval SCE_KIX_COMMENTSTREAM=10\nval SCE_KIX_IDENTIFIER=31\n# Lexical states for SCLEX_GUI4CLI\nlex Gui4Cli=SCLEX_GUI4CLI SCE_GC_\nval SCE_GC_DEFAULT=0\nval SCE_GC_COMMENTLINE=1\nval SCE_GC_COMMENTBLOCK=2\nval SCE_GC_GLOBAL=3\nval SCE_GC_EVENT=4\nval SCE_GC_ATTRIBUTE=5\nval SCE_GC_CONTROL=6\nval SCE_GC_COMMAND=7\nval SCE_GC_STRING=8\nval SCE_GC_OPERATOR=9\n# Lexical states for SCLEX_SPECMAN\nlex Specman=SCLEX_SPECMAN SCE_SN_\nval SCE_SN_DEFAULT=0\nval SCE_SN_CODE=1\nval SCE_SN_COMMENTLINE=2\nval SCE_SN_COMMENTLINEBANG=3\nval SCE_SN_NUMBER=4\nval SCE_SN_WORD=5\nval SCE_SN_STRING=6\nval SCE_SN_WORD2=7\nval SCE_SN_WORD3=8\nval SCE_SN_PREPROCESSOR=9\nval SCE_SN_OPERATOR=10\nval SCE_SN_IDENTIFIER=11\nval SCE_SN_STRINGEOL=12\nval SCE_SN_REGEXTAG=13\nval SCE_SN_SIGNAL=14\nval SCE_SN_USER=19\n# Lexical states for SCLEX_AU3\nlex Au3=SCLEX_AU3 SCE_AU3_\nval SCE_AU3_DEFAULT=0\nval SCE_AU3_COMMENT=1\nval SCE_AU3_COMMENTBLOCK=2\nval SCE_AU3_NUMBER=3\nval SCE_AU3_FUNCTION=4\nval SCE_AU3_KEYWORD=5\nval SCE_AU3_MACRO=6\nval SCE_AU3_STRING=7\nval SCE_AU3_OPERATOR=8\nval SCE_AU3_VARIABLE=9\nval SCE_AU3_SENT=10\nval SCE_AU3_PREPROCESSOR=11\nval SCE_AU3_SPECIAL=12\nval SCE_AU3_EXPAND=13\nval SCE_AU3_COMOBJ=14\nval SCE_AU3_UDF=15\n# Lexical states for SCLEX_APDL\nlex APDL=SCLEX_APDL SCE_APDL_\nval SCE_APDL_DEFAULT=0\nval SCE_APDL_COMMENT=1\nval SCE_APDL_COMMENTBLOCK=2\nval SCE_APDL_NUMBER=3\nval SCE_APDL_STRING=4\nval SCE_APDL_OPERATOR=5\nval SCE_APDL_WORD=6\nval SCE_APDL_PROCESSOR=7\nval SCE_APDL_COMMAND=8\nval SCE_APDL_SLASHCOMMAND=9\nval SCE_APDL_STARCOMMAND=10\nval SCE_APDL_ARGUMENT=11\nval SCE_APDL_FUNCTION=12\n# Lexical states for SCLEX_BASH\nlex Bash=SCLEX_BASH SCE_SH_\nval SCE_SH_DEFAULT=0\nval SCE_SH_ERROR=1\nval SCE_SH_COMMENTLINE=2\nval SCE_SH_NUMBER=3\nval SCE_SH_WORD=4\nval SCE_SH_STRING=5\nval SCE_SH_CHARACTER=6\nval SCE_SH_OPERATOR=7\nval SCE_SH_IDENTIFIER=8\nval SCE_SH_SCALAR=9\nval SCE_SH_PARAM=10\nval SCE_SH_BACKTICKS=11\nval SCE_SH_HERE_DELIM=12\nval SCE_SH_HERE_Q=13\n# Lexical states for SCLEX_ASN1\nlex Asn1=SCLEX_ASN1 SCE_ASN1_\nval SCE_ASN1_DEFAULT=0\nval SCE_ASN1_COMMENT=1\nval SCE_ASN1_IDENTIFIER=2\nval SCE_ASN1_STRING=3\nval SCE_ASN1_OID=4\nval SCE_ASN1_SCALAR=5\nval SCE_ASN1_KEYWORD=6\nval SCE_ASN1_ATTRIBUTE=7\nval SCE_ASN1_DESCRIPTOR=8\nval SCE_ASN1_TYPE=9\nval SCE_ASN1_OPERATOR=10\n# Lexical states for SCLEX_VHDL\nlex VHDL=SCLEX_VHDL SCE_VHDL_\nval SCE_VHDL_DEFAULT=0\nval SCE_VHDL_COMMENT=1\nval SCE_VHDL_COMMENTLINEBANG=2\nval SCE_VHDL_NUMBER=3\nval SCE_VHDL_STRING=4\nval SCE_VHDL_OPERATOR=5\nval SCE_VHDL_IDENTIFIER=6\nval SCE_VHDL_STRINGEOL=7\nval SCE_VHDL_KEYWORD=8\nval SCE_VHDL_STDOPERATOR=9\nval SCE_VHDL_ATTRIBUTE=10\nval SCE_VHDL_STDFUNCTION=11\nval SCE_VHDL_STDPACKAGE=12\nval SCE_VHDL_STDTYPE=13\nval SCE_VHDL_USERWORD=14\nval SCE_VHDL_BLOCK_COMMENT=15\n# Lexical states for SCLEX_CAML\nlex Caml=SCLEX_CAML SCE_CAML_\nval SCE_CAML_DEFAULT=0\nval SCE_CAML_IDENTIFIER=1\nval SCE_CAML_TAGNAME=2\nval SCE_CAML_KEYWORD=3\nval SCE_CAML_KEYWORD2=4\nval SCE_CAML_KEYWORD3=5\nval SCE_CAML_LINENUM=6\nval SCE_CAML_OPERATOR=7\nval SCE_CAML_NUMBER=8\nval SCE_CAML_CHAR=9\nval SCE_CAML_WHITE=10\nval SCE_CAML_STRING=11\nval SCE_CAML_COMMENT=12\nval SCE_CAML_COMMENT1=13\nval SCE_CAML_COMMENT2=14\nval SCE_CAML_COMMENT3=15\n# Lexical states for SCLEX_HASKELL\nlex Haskell=SCLEX_HASKELL SCE_HA_\nval SCE_HA_DEFAULT=0\nval SCE_HA_IDENTIFIER=1\nval SCE_HA_KEYWORD=2\nval SCE_HA_NUMBER=3\nval SCE_HA_STRING=4\nval SCE_HA_CHARACTER=5\nval SCE_HA_CLASS=6\nval SCE_HA_MODULE=7\nval SCE_HA_CAPITAL=8\nval SCE_HA_DATA=9\nval SCE_HA_IMPORT=10\nval SCE_HA_OPERATOR=11\nval SCE_HA_INSTANCE=12\nval SCE_HA_COMMENTLINE=13\nval SCE_HA_COMMENTBLOCK=14\nval SCE_HA_COMMENTBLOCK2=15\nval SCE_HA_COMMENTBLOCK3=16\nval SCE_HA_PRAGMA=17\nval SCE_HA_PREPROCESSOR=18\nval SCE_HA_STRINGEOL=19\nval SCE_HA_RESERVED_OPERATOR=20\nval SCE_HA_LITERATE_COMMENT=21\nval SCE_HA_LITERATE_CODEDELIM=22\n# Lexical states of SCLEX_TADS3\nlex TADS3=SCLEX_TADS3 SCE_T3_\nval SCE_T3_DEFAULT=0\nval SCE_T3_X_DEFAULT=1\nval SCE_T3_PREPROCESSOR=2\nval SCE_T3_BLOCK_COMMENT=3\nval SCE_T3_LINE_COMMENT=4\nval SCE_T3_OPERATOR=5\nval SCE_T3_KEYWORD=6\nval SCE_T3_NUMBER=7\nval SCE_T3_IDENTIFIER=8\nval SCE_T3_S_STRING=9\nval SCE_T3_D_STRING=10\nval SCE_T3_X_STRING=11\nval SCE_T3_LIB_DIRECTIVE=12\nval SCE_T3_MSG_PARAM=13\nval SCE_T3_HTML_TAG=14\nval SCE_T3_HTML_DEFAULT=15\nval SCE_T3_HTML_STRING=16\nval SCE_T3_USER1=17\nval SCE_T3_USER2=18\nval SCE_T3_USER3=19\nval SCE_T3_BRACE=20\n# Lexical states for SCLEX_REBOL\nlex Rebol=SCLEX_REBOL SCE_REBOL_\nval SCE_REBOL_DEFAULT=0\nval SCE_REBOL_COMMENTLINE=1\nval SCE_REBOL_COMMENTBLOCK=2\nval SCE_REBOL_PREFACE=3\nval SCE_REBOL_OPERATOR=4\nval SCE_REBOL_CHARACTER=5\nval SCE_REBOL_QUOTEDSTRING=6\nval SCE_REBOL_BRACEDSTRING=7\nval SCE_REBOL_NUMBER=8\nval SCE_REBOL_PAIR=9\nval SCE_REBOL_TUPLE=10\nval SCE_REBOL_BINARY=11\nval SCE_REBOL_MONEY=12\nval SCE_REBOL_ISSUE=13\nval SCE_REBOL_TAG=14\nval SCE_REBOL_FILE=15\nval SCE_REBOL_EMAIL=16\nval SCE_REBOL_URL=17\nval SCE_REBOL_DATE=18\nval SCE_REBOL_TIME=19\nval SCE_REBOL_IDENTIFIER=20\nval SCE_REBOL_WORD=21\nval SCE_REBOL_WORD2=22\nval SCE_REBOL_WORD3=23\nval SCE_REBOL_WORD4=24\nval SCE_REBOL_WORD5=25\nval SCE_REBOL_WORD6=26\nval SCE_REBOL_WORD7=27\nval SCE_REBOL_WORD8=28\n# Lexical states for SCLEX_SQL\nlex SQL=SCLEX_SQL SCE_SQL_\nval SCE_SQL_DEFAULT=0\nval SCE_SQL_COMMENT=1\nval SCE_SQL_COMMENTLINE=2\nval SCE_SQL_COMMENTDOC=3\nval SCE_SQL_NUMBER=4\nval SCE_SQL_WORD=5\nval SCE_SQL_STRING=6\nval SCE_SQL_CHARACTER=7\nval SCE_SQL_SQLPLUS=8\nval SCE_SQL_SQLPLUS_PROMPT=9\nval SCE_SQL_OPERATOR=10\nval SCE_SQL_IDENTIFIER=11\nval SCE_SQL_SQLPLUS_COMMENT=13\nval SCE_SQL_COMMENTLINEDOC=15\nval SCE_SQL_WORD2=16\nval SCE_SQL_COMMENTDOCKEYWORD=17\nval SCE_SQL_COMMENTDOCKEYWORDERROR=18\nval SCE_SQL_USER1=19\nval SCE_SQL_USER2=20\nval SCE_SQL_USER3=21\nval SCE_SQL_USER4=22\nval SCE_SQL_QUOTEDIDENTIFIER=23\nval SCE_SQL_QOPERATOR=24\n# Lexical states for SCLEX_SMALLTALK\nlex Smalltalk=SCLEX_SMALLTALK SCE_ST_\nval SCE_ST_DEFAULT=0\nval SCE_ST_STRING=1\nval SCE_ST_NUMBER=2\nval SCE_ST_COMMENT=3\nval SCE_ST_SYMBOL=4\nval SCE_ST_BINARY=5\nval SCE_ST_BOOL=6\nval SCE_ST_SELF=7\nval SCE_ST_SUPER=8\nval SCE_ST_NIL=9\nval SCE_ST_GLOBAL=10\nval SCE_ST_RETURN=11\nval SCE_ST_SPECIAL=12\nval SCE_ST_KWSEND=13\nval SCE_ST_ASSIGN=14\nval SCE_ST_CHARACTER=15\nval SCE_ST_SPEC_SEL=16\n# Lexical states for SCLEX_FLAGSHIP (clipper)\nlex FlagShip=SCLEX_FLAGSHIP SCE_FS_\nval SCE_FS_DEFAULT=0\nval SCE_FS_COMMENT=1\nval SCE_FS_COMMENTLINE=2\nval SCE_FS_COMMENTDOC=3\nval SCE_FS_COMMENTLINEDOC=4\nval SCE_FS_COMMENTDOCKEYWORD=5\nval SCE_FS_COMMENTDOCKEYWORDERROR=6\nval SCE_FS_KEYWORD=7\nval SCE_FS_KEYWORD2=8\nval SCE_FS_KEYWORD3=9\nval SCE_FS_KEYWORD4=10\nval SCE_FS_NUMBER=11\nval SCE_FS_STRING=12\nval SCE_FS_PREPROCESSOR=13\nval SCE_FS_OPERATOR=14\nval SCE_FS_IDENTIFIER=15\nval SCE_FS_DATE=16\nval SCE_FS_STRINGEOL=17\nval SCE_FS_CONSTANT=18\nval SCE_FS_WORDOPERATOR=19\nval SCE_FS_DISABLEDCODE=20\nval SCE_FS_DEFAULT_C=21\nval SCE_FS_COMMENTDOC_C=22\nval SCE_FS_COMMENTLINEDOC_C=23\nval SCE_FS_KEYWORD_C=24\nval SCE_FS_KEYWORD2_C=25\nval SCE_FS_NUMBER_C=26\nval SCE_FS_STRING_C=27\nval SCE_FS_PREPROCESSOR_C=28\nval SCE_FS_OPERATOR_C=29\nval SCE_FS_IDENTIFIER_C=30\nval SCE_FS_STRINGEOL_C=31\n# Lexical states for SCLEX_CSOUND\nlex Csound=SCLEX_CSOUND SCE_CSOUND_\nval SCE_CSOUND_DEFAULT=0\nval SCE_CSOUND_COMMENT=1\nval SCE_CSOUND_NUMBER=2\nval SCE_CSOUND_OPERATOR=3\nval SCE_CSOUND_INSTR=4\nval SCE_CSOUND_IDENTIFIER=5\nval SCE_CSOUND_OPCODE=6\nval SCE_CSOUND_HEADERSTMT=7\nval SCE_CSOUND_USERKEYWORD=8\nval SCE_CSOUND_COMMENTBLOCK=9\nval SCE_CSOUND_PARAM=10\nval SCE_CSOUND_ARATE_VAR=11\nval SCE_CSOUND_KRATE_VAR=12\nval SCE_CSOUND_IRATE_VAR=13\nval SCE_CSOUND_GLOBAL_VAR=14\nval SCE_CSOUND_STRINGEOL=15\n# Lexical states for SCLEX_INNOSETUP\nlex Inno=SCLEX_INNOSETUP SCE_INNO_\nval SCE_INNO_DEFAULT=0\nval SCE_INNO_COMMENT=1\nval SCE_INNO_KEYWORD=2\nval SCE_INNO_PARAMETER=3\nval SCE_INNO_SECTION=4\nval SCE_INNO_PREPROC=5\nval SCE_INNO_INLINE_EXPANSION=6\nval SCE_INNO_COMMENT_PASCAL=7\nval SCE_INNO_KEYWORD_PASCAL=8\nval SCE_INNO_KEYWORD_USER=9\nval SCE_INNO_STRING_DOUBLE=10\nval SCE_INNO_STRING_SINGLE=11\nval SCE_INNO_IDENTIFIER=12\n# Lexical states for SCLEX_OPAL\nlex Opal=SCLEX_OPAL SCE_OPAL_\nval SCE_OPAL_SPACE=0\nval SCE_OPAL_COMMENT_BLOCK=1\nval SCE_OPAL_COMMENT_LINE=2\nval SCE_OPAL_INTEGER=3\nval SCE_OPAL_KEYWORD=4\nval SCE_OPAL_SORT=5\nval SCE_OPAL_STRING=6\nval SCE_OPAL_PAR=7\nval SCE_OPAL_BOOL_CONST=8\nval SCE_OPAL_DEFAULT=32\n# Lexical states for SCLEX_SPICE\nlex Spice=SCLEX_SPICE SCE_SPICE_\nval SCE_SPICE_DEFAULT=0\nval SCE_SPICE_IDENTIFIER=1\nval SCE_SPICE_KEYWORD=2\nval SCE_SPICE_KEYWORD2=3\nval SCE_SPICE_KEYWORD3=4\nval SCE_SPICE_NUMBER=5\nval SCE_SPICE_DELIMITER=6\nval SCE_SPICE_VALUE=7\nval SCE_SPICE_COMMENTLINE=8\n# Lexical states for SCLEX_CMAKE\nlex CMAKE=SCLEX_CMAKE SCE_CMAKE_\nval SCE_CMAKE_DEFAULT=0\nval SCE_CMAKE_COMMENT=1\nval SCE_CMAKE_STRINGDQ=2\nval SCE_CMAKE_STRINGLQ=3\nval SCE_CMAKE_STRINGRQ=4\nval SCE_CMAKE_COMMANDS=5\nval SCE_CMAKE_PARAMETERS=6\nval SCE_CMAKE_VARIABLE=7\nval SCE_CMAKE_USERDEFINED=8\nval SCE_CMAKE_WHILEDEF=9\nval SCE_CMAKE_FOREACHDEF=10\nval SCE_CMAKE_IFDEFINEDEF=11\nval SCE_CMAKE_MACRODEF=12\nval SCE_CMAKE_STRINGVAR=13\nval SCE_CMAKE_NUMBER=14\n# Lexical states for SCLEX_GAP\nlex Gap=SCLEX_GAP SCE_GAP_\nval SCE_GAP_DEFAULT=0\nval SCE_GAP_IDENTIFIER=1\nval SCE_GAP_KEYWORD=2\nval SCE_GAP_KEYWORD2=3\nval SCE_GAP_KEYWORD3=4\nval SCE_GAP_KEYWORD4=5\nval SCE_GAP_STRING=6\nval SCE_GAP_CHAR=7\nval SCE_GAP_OPERATOR=8\nval SCE_GAP_COMMENT=9\nval SCE_GAP_NUMBER=10\nval SCE_GAP_STRINGEOL=11\n# Lexical state for SCLEX_PLM\nlex PLM=SCLEX_PLM SCE_PLM_\nval SCE_PLM_DEFAULT=0\nval SCE_PLM_COMMENT=1\nval SCE_PLM_STRING=2\nval SCE_PLM_NUMBER=3\nval SCE_PLM_IDENTIFIER=4\nval SCE_PLM_OPERATOR=5\nval SCE_PLM_CONTROL=6\nval SCE_PLM_KEYWORD=7\n# Lexical state for SCLEX_PROGRESS\nlex Progress=SCLEX_PROGRESS SCE_ABL_\nval SCE_ABL_DEFAULT=0\nval SCE_ABL_NUMBER=1\nval SCE_ABL_WORD=2\nval SCE_ABL_STRING=3\nval SCE_ABL_CHARACTER=4\nval SCE_ABL_PREPROCESSOR=5\nval SCE_ABL_OPERATOR=6\nval SCE_ABL_IDENTIFIER=7\nval SCE_ABL_BLOCK=8\nval SCE_ABL_END=9\nval SCE_ABL_COMMENT=10\nval SCE_ABL_TASKMARKER=11\nval SCE_ABL_LINECOMMENT=12\n# Lexical states for SCLEX_ABAQUS\nlex ABAQUS=SCLEX_ABAQUS SCE_ABAQUS_\nval SCE_ABAQUS_DEFAULT=0\nval SCE_ABAQUS_COMMENT=1\nval SCE_ABAQUS_COMMENTBLOCK=2\nval SCE_ABAQUS_NUMBER=3\nval SCE_ABAQUS_STRING=4\nval SCE_ABAQUS_OPERATOR=5\nval SCE_ABAQUS_WORD=6\nval SCE_ABAQUS_PROCESSOR=7\nval SCE_ABAQUS_COMMAND=8\nval SCE_ABAQUS_SLASHCOMMAND=9\nval SCE_ABAQUS_STARCOMMAND=10\nval SCE_ABAQUS_ARGUMENT=11\nval SCE_ABAQUS_FUNCTION=12\n# Lexical states for SCLEX_ASYMPTOTE\nlex Asymptote=SCLEX_ASYMPTOTE SCE_ASY_\nval SCE_ASY_DEFAULT=0\nval SCE_ASY_COMMENT=1\nval SCE_ASY_COMMENTLINE=2\nval SCE_ASY_NUMBER=3\nval SCE_ASY_WORD=4\nval SCE_ASY_STRING=5\nval SCE_ASY_CHARACTER=6\nval SCE_ASY_OPERATOR=7\nval SCE_ASY_IDENTIFIER=8\nval SCE_ASY_STRINGEOL=9\nval SCE_ASY_COMMENTLINEDOC=10\nval SCE_ASY_WORD2=11\n# Lexical states for SCLEX_R\nlex R=SCLEX_R SCE_R_\nval SCE_R_DEFAULT=0\nval SCE_R_COMMENT=1\nval SCE_R_KWORD=2\nval SCE_R_BASEKWORD=3\nval SCE_R_OTHERKWORD=4\nval SCE_R_NUMBER=5\nval SCE_R_STRING=6\nval SCE_R_STRING2=7\nval SCE_R_OPERATOR=8\nval SCE_R_IDENTIFIER=9\nval SCE_R_INFIX=10\nval SCE_R_INFIXEOL=11\nval SCE_R_BACKTICKS=12\nval SCE_R_RAWSTRING=13\nval SCE_R_RAWSTRING2=14\nval SCE_R_ESCAPESEQUENCE=15\n# Lexical state for SCLEX_MAGIK\nlex MagikSF=SCLEX_MAGIK SCE_MAGIK_\nval SCE_MAGIK_DEFAULT=0\nval SCE_MAGIK_COMMENT=1\nval SCE_MAGIK_HYPER_COMMENT=16\nval SCE_MAGIK_STRING=2\nval SCE_MAGIK_CHARACTER=3\nval SCE_MAGIK_NUMBER=4\nval SCE_MAGIK_IDENTIFIER=5\nval SCE_MAGIK_OPERATOR=6\nval SCE_MAGIK_FLOW=7\nval SCE_MAGIK_CONTAINER=8\nval SCE_MAGIK_BRACKET_BLOCK=9\nval SCE_MAGIK_BRACE_BLOCK=10\nval SCE_MAGIK_SQBRACKET_BLOCK=11\nval SCE_MAGIK_UNKNOWN_KEYWORD=12\nval SCE_MAGIK_KEYWORD=13\nval SCE_MAGIK_PRAGMA=14\nval SCE_MAGIK_SYMBOL=15\n# Lexical state for SCLEX_POWERSHELL\nlex PowerShell=SCLEX_POWERSHELL SCE_POWERSHELL_\nval SCE_POWERSHELL_DEFAULT=0\nval SCE_POWERSHELL_COMMENT=1\nval SCE_POWERSHELL_STRING=2\nval SCE_POWERSHELL_CHARACTER=3\nval SCE_POWERSHELL_NUMBER=4\nval SCE_POWERSHELL_VARIABLE=5\nval SCE_POWERSHELL_OPERATOR=6\nval SCE_POWERSHELL_IDENTIFIER=7\nval SCE_POWERSHELL_KEYWORD=8\nval SCE_POWERSHELL_CMDLET=9\nval SCE_POWERSHELL_ALIAS=10\nval SCE_POWERSHELL_FUNCTION=11\nval SCE_POWERSHELL_USER1=12\nval SCE_POWERSHELL_COMMENTSTREAM=13\nval SCE_POWERSHELL_HERE_STRING=14\nval SCE_POWERSHELL_HERE_CHARACTER=15\nval SCE_POWERSHELL_COMMENTDOCKEYWORD=16\n# Lexical state for SCLEX_MYSQL\nlex MySQL=SCLEX_MYSQL SCE_MYSQL_\nval SCE_MYSQL_DEFAULT=0\nval SCE_MYSQL_COMMENT=1\nval SCE_MYSQL_COMMENTLINE=2\nval SCE_MYSQL_VARIABLE=3\nval SCE_MYSQL_SYSTEMVARIABLE=4\nval SCE_MYSQL_KNOWNSYSTEMVARIABLE=5\nval SCE_MYSQL_NUMBER=6\nval SCE_MYSQL_MAJORKEYWORD=7\nval SCE_MYSQL_KEYWORD=8\nval SCE_MYSQL_DATABASEOBJECT=9\nval SCE_MYSQL_PROCEDUREKEYWORD=10\nval SCE_MYSQL_STRING=11\nval SCE_MYSQL_SQSTRING=12\nval SCE_MYSQL_DQSTRING=13\nval SCE_MYSQL_OPERATOR=14\nval SCE_MYSQL_FUNCTION=15\nval SCE_MYSQL_IDENTIFIER=16\nval SCE_MYSQL_QUOTEDIDENTIFIER=17\nval SCE_MYSQL_USER1=18\nval SCE_MYSQL_USER2=19\nval SCE_MYSQL_USER3=20\nval SCE_MYSQL_HIDDENCOMMAND=21\nval SCE_MYSQL_PLACEHOLDER=22\n# Lexical state for SCLEX_PO\nlex Po=SCLEX_PO SCE_PO_\nval SCE_PO_DEFAULT=0\nval SCE_PO_COMMENT=1\nval SCE_PO_MSGID=2\nval SCE_PO_MSGID_TEXT=3\nval SCE_PO_MSGSTR=4\nval SCE_PO_MSGSTR_TEXT=5\nval SCE_PO_MSGCTXT=6\nval SCE_PO_MSGCTXT_TEXT=7\nval SCE_PO_FUZZY=8\nval SCE_PO_PROGRAMMER_COMMENT=9\nval SCE_PO_REFERENCE=10\nval SCE_PO_FLAGS=11\nval SCE_PO_MSGID_TEXT_EOL=12\nval SCE_PO_MSGSTR_TEXT_EOL=13\nval SCE_PO_MSGCTXT_TEXT_EOL=14\nval SCE_PO_ERROR=15\n# Lexical states for SCLEX_PASCAL\nlex Pascal=SCLEX_PASCAL SCE_PAS_\nval SCE_PAS_DEFAULT=0\nval SCE_PAS_IDENTIFIER=1\nval SCE_PAS_COMMENT=2\nval SCE_PAS_COMMENT2=3\nval SCE_PAS_COMMENTLINE=4\nval SCE_PAS_PREPROCESSOR=5\nval SCE_PAS_PREPROCESSOR2=6\nval SCE_PAS_NUMBER=7\nval SCE_PAS_HEXNUMBER=8\nval SCE_PAS_WORD=9\nval SCE_PAS_STRING=10\nval SCE_PAS_STRINGEOL=11\nval SCE_PAS_CHARACTER=12\nval SCE_PAS_OPERATOR=13\nval SCE_PAS_ASM=14\n# Lexical state for SCLEX_SORCUS\nlex SORCUS=SCLEX_SORCUS SCE_SORCUS_\nval SCE_SORCUS_DEFAULT=0\nval SCE_SORCUS_COMMAND=1\nval SCE_SORCUS_PARAMETER=2\nval SCE_SORCUS_COMMENTLINE=3\nval SCE_SORCUS_STRING=4\nval SCE_SORCUS_STRINGEOL=5\nval SCE_SORCUS_IDENTIFIER=6\nval SCE_SORCUS_OPERATOR=7\nval SCE_SORCUS_NUMBER=8\nval SCE_SORCUS_CONSTANT=9\n# Lexical state for SCLEX_POWERPRO\nlex PowerPro=SCLEX_POWERPRO SCE_POWERPRO_\nval SCE_POWERPRO_DEFAULT=0\nval SCE_POWERPRO_COMMENTBLOCK=1\nval SCE_POWERPRO_COMMENTLINE=2\nval SCE_POWERPRO_NUMBER=3\nval SCE_POWERPRO_WORD=4\nval SCE_POWERPRO_WORD2=5\nval SCE_POWERPRO_WORD3=6\nval SCE_POWERPRO_WORD4=7\nval SCE_POWERPRO_DOUBLEQUOTEDSTRING=8\nval SCE_POWERPRO_SINGLEQUOTEDSTRING=9\nval SCE_POWERPRO_LINECONTINUE=10\nval SCE_POWERPRO_OPERATOR=11\nval SCE_POWERPRO_IDENTIFIER=12\nval SCE_POWERPRO_STRINGEOL=13\nval SCE_POWERPRO_VERBATIM=14\nval SCE_POWERPRO_ALTQUOTE=15\nval SCE_POWERPRO_FUNCTION=16\n# Lexical states for SCLEX_SML\nlex SML=SCLEX_SML SCE_SML_\nval SCE_SML_DEFAULT=0\nval SCE_SML_IDENTIFIER=1\nval SCE_SML_TAGNAME=2\nval SCE_SML_KEYWORD=3\nval SCE_SML_KEYWORD2=4\nval SCE_SML_KEYWORD3=5\nval SCE_SML_LINENUM=6\nval SCE_SML_OPERATOR=7\nval SCE_SML_NUMBER=8\nval SCE_SML_CHAR=9\nval SCE_SML_STRING=11\nval SCE_SML_COMMENT=12\nval SCE_SML_COMMENT1=13\nval SCE_SML_COMMENT2=14\nval SCE_SML_COMMENT3=15\n# Lexical state for SCLEX_MARKDOWN\nlex Markdown=SCLEX_MARKDOWN SCE_MARKDOWN_\nval SCE_MARKDOWN_DEFAULT=0\nval SCE_MARKDOWN_LINE_BEGIN=1\nval SCE_MARKDOWN_STRONG1=2\nval SCE_MARKDOWN_STRONG2=3\nval SCE_MARKDOWN_EM1=4\nval SCE_MARKDOWN_EM2=5\nval SCE_MARKDOWN_HEADER1=6\nval SCE_MARKDOWN_HEADER2=7\nval SCE_MARKDOWN_HEADER3=8\nval SCE_MARKDOWN_HEADER4=9\nval SCE_MARKDOWN_HEADER5=10\nval SCE_MARKDOWN_HEADER6=11\nval SCE_MARKDOWN_PRECHAR=12\nval SCE_MARKDOWN_ULIST_ITEM=13\nval SCE_MARKDOWN_OLIST_ITEM=14\nval SCE_MARKDOWN_BLOCKQUOTE=15\nval SCE_MARKDOWN_STRIKEOUT=16\nval SCE_MARKDOWN_HRULE=17\nval SCE_MARKDOWN_LINK=18\nval SCE_MARKDOWN_CODE=19\nval SCE_MARKDOWN_CODE2=20\nval SCE_MARKDOWN_CODEBK=21\n# Lexical state for SCLEX_TXT2TAGS\nlex Txt2tags=SCLEX_TXT2TAGS SCE_TXT2TAGS_\nval SCE_TXT2TAGS_DEFAULT=0\nval SCE_TXT2TAGS_LINE_BEGIN=1\nval SCE_TXT2TAGS_STRONG1=2\nval SCE_TXT2TAGS_STRONG2=3\nval SCE_TXT2TAGS_EM1=4\nval SCE_TXT2TAGS_EM2=5\nval SCE_TXT2TAGS_HEADER1=6\nval SCE_TXT2TAGS_HEADER2=7\nval SCE_TXT2TAGS_HEADER3=8\nval SCE_TXT2TAGS_HEADER4=9\nval SCE_TXT2TAGS_HEADER5=10\nval SCE_TXT2TAGS_HEADER6=11\nval SCE_TXT2TAGS_PRECHAR=12\nval SCE_TXT2TAGS_ULIST_ITEM=13\nval SCE_TXT2TAGS_OLIST_ITEM=14\nval SCE_TXT2TAGS_BLOCKQUOTE=15\nval SCE_TXT2TAGS_STRIKEOUT=16\nval SCE_TXT2TAGS_HRULE=17\nval SCE_TXT2TAGS_LINK=18\nval SCE_TXT2TAGS_CODE=19\nval SCE_TXT2TAGS_CODE2=20\nval SCE_TXT2TAGS_CODEBK=21\nval SCE_TXT2TAGS_COMMENT=22\nval SCE_TXT2TAGS_OPTION=23\nval SCE_TXT2TAGS_PREPROC=24\nval SCE_TXT2TAGS_POSTPROC=25\n# Lexical states for SCLEX_A68K\nlex A68k=SCLEX_A68K SCE_A68K_\nval SCE_A68K_DEFAULT=0\nval SCE_A68K_COMMENT=1\nval SCE_A68K_NUMBER_DEC=2\nval SCE_A68K_NUMBER_BIN=3\nval SCE_A68K_NUMBER_HEX=4\nval SCE_A68K_STRING1=5\nval SCE_A68K_OPERATOR=6\nval SCE_A68K_CPUINSTRUCTION=7\nval SCE_A68K_EXTINSTRUCTION=8\nval SCE_A68K_REGISTER=9\nval SCE_A68K_DIRECTIVE=10\nval SCE_A68K_MACRO_ARG=11\nval SCE_A68K_LABEL=12\nval SCE_A68K_STRING2=13\nval SCE_A68K_IDENTIFIER=14\nval SCE_A68K_MACRO_DECLARATION=15\nval SCE_A68K_COMMENT_WORD=16\nval SCE_A68K_COMMENT_SPECIAL=17\nval SCE_A68K_COMMENT_DOXYGEN=18\n# Lexical states for SCLEX_MODULA\nlex Modula=SCLEX_MODULA SCE_MODULA_\nval SCE_MODULA_DEFAULT=0\nval SCE_MODULA_COMMENT=1\nval SCE_MODULA_DOXYCOMM=2\nval SCE_MODULA_DOXYKEY=3\nval SCE_MODULA_KEYWORD=4\nval SCE_MODULA_RESERVED=5\nval SCE_MODULA_NUMBER=6\nval SCE_MODULA_BASENUM=7\nval SCE_MODULA_FLOAT=8\nval SCE_MODULA_STRING=9\nval SCE_MODULA_STRSPEC=10\nval SCE_MODULA_CHAR=11\nval SCE_MODULA_CHARSPEC=12\nval SCE_MODULA_PROC=13\nval SCE_MODULA_PRAGMA=14\nval SCE_MODULA_PRGKEY=15\nval SCE_MODULA_OPERATOR=16\nval SCE_MODULA_BADSTR=17\n# Lexical states for SCLEX_COFFEESCRIPT\nlex CoffeeScript=SCLEX_COFFEESCRIPT SCE_COFFEESCRIPT_\nval SCE_COFFEESCRIPT_DEFAULT=0\nval SCE_COFFEESCRIPT_COMMENT=1\nval SCE_COFFEESCRIPT_COMMENTLINE=2\nval SCE_COFFEESCRIPT_COMMENTDOC=3\nval SCE_COFFEESCRIPT_NUMBER=4\nval SCE_COFFEESCRIPT_WORD=5\nval SCE_COFFEESCRIPT_STRING=6\nval SCE_COFFEESCRIPT_CHARACTER=7\nval SCE_COFFEESCRIPT_UUID=8\nval SCE_COFFEESCRIPT_PREPROCESSOR=9\nval SCE_COFFEESCRIPT_OPERATOR=10\nval SCE_COFFEESCRIPT_IDENTIFIER=11\nval SCE_COFFEESCRIPT_STRINGEOL=12\nval SCE_COFFEESCRIPT_VERBATIM=13\nval SCE_COFFEESCRIPT_REGEX=14\nval SCE_COFFEESCRIPT_COMMENTLINEDOC=15\nval SCE_COFFEESCRIPT_WORD2=16\nval SCE_COFFEESCRIPT_COMMENTDOCKEYWORD=17\nval SCE_COFFEESCRIPT_COMMENTDOCKEYWORDERROR=18\nval SCE_COFFEESCRIPT_GLOBALCLASS=19\nval SCE_COFFEESCRIPT_STRINGRAW=20\nval SCE_COFFEESCRIPT_TRIPLEVERBATIM=21\nval SCE_COFFEESCRIPT_COMMENTBLOCK=22\nval SCE_COFFEESCRIPT_VERBOSE_REGEX=23\nval SCE_COFFEESCRIPT_VERBOSE_REGEX_COMMENT=24\nval SCE_COFFEESCRIPT_INSTANCEPROPERTY=25\n# Lexical states for SCLEX_AVS\nlex AVS=SCLEX_AVS SCE_AVS_\nval SCE_AVS_DEFAULT=0\nval SCE_AVS_COMMENTBLOCK=1\nval SCE_AVS_COMMENTBLOCKN=2\nval SCE_AVS_COMMENTLINE=3\nval SCE_AVS_NUMBER=4\nval SCE_AVS_OPERATOR=5\nval SCE_AVS_IDENTIFIER=6\nval SCE_AVS_STRING=7\nval SCE_AVS_TRIPLESTRING=8\nval SCE_AVS_KEYWORD=9\nval SCE_AVS_FILTER=10\nval SCE_AVS_PLUGIN=11\nval SCE_AVS_FUNCTION=12\nval SCE_AVS_CLIPPROP=13\nval SCE_AVS_USERDFN=14\n# Lexical states for SCLEX_ECL\nlex ECL=SCLEX_ECL SCE_ECL_\nval SCE_ECL_DEFAULT=0\nval SCE_ECL_COMMENT=1\nval SCE_ECL_COMMENTLINE=2\nval SCE_ECL_NUMBER=3\nval SCE_ECL_STRING=4\nval SCE_ECL_WORD0=5\nval SCE_ECL_OPERATOR=6\nval SCE_ECL_CHARACTER=7\nval SCE_ECL_UUID=8\nval SCE_ECL_PREPROCESSOR=9\nval SCE_ECL_UNKNOWN=10\nval SCE_ECL_IDENTIFIER=11\nval SCE_ECL_STRINGEOL=12\nval SCE_ECL_VERBATIM=13\nval SCE_ECL_REGEX=14\nval SCE_ECL_COMMENTLINEDOC=15\nval SCE_ECL_WORD1=16\nval SCE_ECL_COMMENTDOCKEYWORD=17\nval SCE_ECL_COMMENTDOCKEYWORDERROR=18\nval SCE_ECL_WORD2=19\nval SCE_ECL_WORD3=20\nval SCE_ECL_WORD4=21\nval SCE_ECL_WORD5=22\nval SCE_ECL_COMMENTDOC=23\nval SCE_ECL_ADDED=24\nval SCE_ECL_DELETED=25\nval SCE_ECL_CHANGED=26\nval SCE_ECL_MOVED=27\n# Lexical states for SCLEX_OSCRIPT\nlex OScript=SCLEX_OSCRIPT SCE_OSCRIPT_\nval SCE_OSCRIPT_DEFAULT=0\nval SCE_OSCRIPT_LINE_COMMENT=1\nval SCE_OSCRIPT_BLOCK_COMMENT=2\nval SCE_OSCRIPT_DOC_COMMENT=3\nval SCE_OSCRIPT_PREPROCESSOR=4\nval SCE_OSCRIPT_NUMBER=5\nval SCE_OSCRIPT_SINGLEQUOTE_STRING=6\nval SCE_OSCRIPT_DOUBLEQUOTE_STRING=7\nval SCE_OSCRIPT_CONSTANT=8\nval SCE_OSCRIPT_IDENTIFIER=9\nval SCE_OSCRIPT_GLOBAL=10\nval SCE_OSCRIPT_KEYWORD=11\nval SCE_OSCRIPT_OPERATOR=12\nval SCE_OSCRIPT_LABEL=13\nval SCE_OSCRIPT_TYPE=14\nval SCE_OSCRIPT_FUNCTION=15\nval SCE_OSCRIPT_OBJECT=16\nval SCE_OSCRIPT_PROPERTY=17\nval SCE_OSCRIPT_METHOD=18\n# Lexical states for SCLEX_VISUALPROLOG\nlex VisualProlog=SCLEX_VISUALPROLOG SCE_VISUALPROLOG_\nval SCE_VISUALPROLOG_DEFAULT=0\nval SCE_VISUALPROLOG_KEY_MAJOR=1\nval SCE_VISUALPROLOG_KEY_MINOR=2\nval SCE_VISUALPROLOG_KEY_DIRECTIVE=3\nval SCE_VISUALPROLOG_COMMENT_BLOCK=4\nval SCE_VISUALPROLOG_COMMENT_LINE=5\nval SCE_VISUALPROLOG_COMMENT_KEY=6\nval SCE_VISUALPROLOG_COMMENT_KEY_ERROR=7\nval SCE_VISUALPROLOG_IDENTIFIER=8\nval SCE_VISUALPROLOG_VARIABLE=9\nval SCE_VISUALPROLOG_ANONYMOUS=10\nval SCE_VISUALPROLOG_NUMBER=11\nval SCE_VISUALPROLOG_OPERATOR=12\nval SCE_VISUALPROLOG_UNUSED1=13\nval SCE_VISUALPROLOG_UNUSED2=14\nval SCE_VISUALPROLOG_UNUSED3=15\nval SCE_VISUALPROLOG_STRING_QUOTE=16\nval SCE_VISUALPROLOG_STRING_ESCAPE=17\nval SCE_VISUALPROLOG_STRING_ESCAPE_ERROR=18\nval SCE_VISUALPROLOG_UNUSED4=19\nval SCE_VISUALPROLOG_STRING=20\nval SCE_VISUALPROLOG_UNUSED5=21\nval SCE_VISUALPROLOG_STRING_EOL=22\nval SCE_VISUALPROLOG_EMBEDDED=23\nval SCE_VISUALPROLOG_PLACEHOLDER=24\n# Lexical states for SCLEX_STTXT\nlex StructuredText=SCLEX_STTXT SCE_STTXT_\nval SCE_STTXT_DEFAULT=0\nval SCE_STTXT_COMMENT=1\nval SCE_STTXT_COMMENTLINE=2\nval SCE_STTXT_KEYWORD=3\nval SCE_STTXT_TYPE=4\nval SCE_STTXT_FUNCTION=5\nval SCE_STTXT_FB=6\nval SCE_STTXT_NUMBER=7\nval SCE_STTXT_HEXNUMBER=8\nval SCE_STTXT_PRAGMA=9\nval SCE_STTXT_OPERATOR=10\nval SCE_STTXT_CHARACTER=11\nval SCE_STTXT_STRING1=12\nval SCE_STTXT_STRING2=13\nval SCE_STTXT_STRINGEOL=14\nval SCE_STTXT_IDENTIFIER=15\nval SCE_STTXT_DATETIME=16\nval SCE_STTXT_VARS=17\nval SCE_STTXT_PRAGMAS=18\n# Lexical states for SCLEX_KVIRC\nlex KVIrc=SCLEX_KVIRC SCE_KVIRC_\nval SCE_KVIRC_DEFAULT=0\nval SCE_KVIRC_COMMENT=1\nval SCE_KVIRC_COMMENTBLOCK=2\nval SCE_KVIRC_STRING=3\nval SCE_KVIRC_WORD=4\nval SCE_KVIRC_KEYWORD=5\nval SCE_KVIRC_FUNCTION_KEYWORD=6\nval SCE_KVIRC_FUNCTION=7\nval SCE_KVIRC_VARIABLE=8\nval SCE_KVIRC_NUMBER=9\nval SCE_KVIRC_OPERATOR=10\nval SCE_KVIRC_STRING_FUNCTION=11\nval SCE_KVIRC_STRING_VARIABLE=12\n# Lexical states for SCLEX_RUST\nlex Rust=SCLEX_RUST SCE_RUST_\nval SCE_RUST_DEFAULT=0\nval SCE_RUST_COMMENTBLOCK=1\nval SCE_RUST_COMMENTLINE=2\nval SCE_RUST_COMMENTBLOCKDOC=3\nval SCE_RUST_COMMENTLINEDOC=4\nval SCE_RUST_NUMBER=5\nval SCE_RUST_WORD=6\nval SCE_RUST_WORD2=7\nval SCE_RUST_WORD3=8\nval SCE_RUST_WORD4=9\nval SCE_RUST_WORD5=10\nval SCE_RUST_WORD6=11\nval SCE_RUST_WORD7=12\nval SCE_RUST_STRING=13\nval SCE_RUST_STRINGR=14\nval SCE_RUST_CHARACTER=15\nval SCE_RUST_OPERATOR=16\nval SCE_RUST_IDENTIFIER=17\nval SCE_RUST_LIFETIME=18\nval SCE_RUST_MACRO=19\nval SCE_RUST_LEXERROR=20\nval SCE_RUST_BYTESTRING=21\nval SCE_RUST_BYTESTRINGR=22\nval SCE_RUST_BYTECHARACTER=23\n# Lexical states for SCLEX_DMAP\nlex DMAP=SCLEX_DMAP SCE_DMAP_\nval SCE_DMAP_DEFAULT=0\nval SCE_DMAP_COMMENT=1\nval SCE_DMAP_NUMBER=2\nval SCE_DMAP_STRING1=3\nval SCE_DMAP_STRING2=4\nval SCE_DMAP_STRINGEOL=5\nval SCE_DMAP_OPERATOR=6\nval SCE_DMAP_IDENTIFIER=7\nval SCE_DMAP_WORD=8\nval SCE_DMAP_WORD2=9\nval SCE_DMAP_WORD3=10\n# Lexical states for SCLEX_DMIS\nlex DMIS=SCLEX_DMIS SCE_DMIS_\nval SCE_DMIS_DEFAULT=0\nval SCE_DMIS_COMMENT=1\nval SCE_DMIS_STRING=2\nval SCE_DMIS_NUMBER=3\nval SCE_DMIS_KEYWORD=4\nval SCE_DMIS_MAJORWORD=5\nval SCE_DMIS_MINORWORD=6\nval SCE_DMIS_UNSUPPORTED_MAJOR=7\nval SCE_DMIS_UNSUPPORTED_MINOR=8\nval SCE_DMIS_LABEL=9\n# Lexical states for SCLEX_REGISTRY\nlex REG=SCLEX_REGISTRY SCE_REG_\nval SCE_REG_DEFAULT=0\nval SCE_REG_COMMENT=1\nval SCE_REG_VALUENAME=2\nval SCE_REG_STRING=3\nval SCE_REG_HEXDIGIT=4\nval SCE_REG_VALUETYPE=5\nval SCE_REG_ADDEDKEY=6\nval SCE_REG_DELETEDKEY=7\nval SCE_REG_ESCAPED=8\nval SCE_REG_KEYPATH_GUID=9\nval SCE_REG_STRING_GUID=10\nval SCE_REG_PARAMETER=11\nval SCE_REG_OPERATOR=12\n# Lexical state for SCLEX_BIBTEX\nlex BibTeX=SCLEX_BIBTEX SCE_BIBTEX_\nval SCE_BIBTEX_DEFAULT=0\nval SCE_BIBTEX_ENTRY=1\nval SCE_BIBTEX_UNKNOWN_ENTRY=2\nval SCE_BIBTEX_KEY=3\nval SCE_BIBTEX_PARAMETER=4\nval SCE_BIBTEX_VALUE=5\nval SCE_BIBTEX_COMMENT=6\n# Lexical state for SCLEX_SREC\nlex Srec=SCLEX_SREC SCE_HEX_\nval SCE_HEX_DEFAULT=0\nval SCE_HEX_RECSTART=1\nval SCE_HEX_RECTYPE=2\nval SCE_HEX_RECTYPE_UNKNOWN=3\nval SCE_HEX_BYTECOUNT=4\nval SCE_HEX_BYTECOUNT_WRONG=5\nval SCE_HEX_NOADDRESS=6\nval SCE_HEX_DATAADDRESS=7\nval SCE_HEX_RECCOUNT=8\nval SCE_HEX_STARTADDRESS=9\nval SCE_HEX_ADDRESSFIELD_UNKNOWN=10\nval SCE_HEX_EXTENDEDADDRESS=11\nval SCE_HEX_DATA_ODD=12\nval SCE_HEX_DATA_EVEN=13\nval SCE_HEX_DATA_UNKNOWN=14\nval SCE_HEX_DATA_EMPTY=15\nval SCE_HEX_CHECKSUM=16\nval SCE_HEX_CHECKSUM_WRONG=17\nval SCE_HEX_GARBAGE=18\n# Lexical state for SCLEX_IHEX (shared with Srec)\nlex IHex=SCLEX_IHEX SCE_HEX_\n# Lexical state for SCLEX_TEHEX (shared with Srec)\nlex TEHex=SCLEX_TEHEX SCE_HEX_\n# Lexical states for SCLEX_JSON\nlex JSON=SCLEX_JSON SCE_JSON_\nval SCE_JSON_DEFAULT=0\nval SCE_JSON_NUMBER=1\nval SCE_JSON_STRING=2\nval SCE_JSON_STRINGEOL=3\nval SCE_JSON_PROPERTYNAME=4\nval SCE_JSON_ESCAPESEQUENCE=5\nval SCE_JSON_LINECOMMENT=6\nval SCE_JSON_BLOCKCOMMENT=7\nval SCE_JSON_OPERATOR=8\nval SCE_JSON_URI=9\nval SCE_JSON_COMPACTIRI=10\nval SCE_JSON_KEYWORD=11\nval SCE_JSON_LDKEYWORD=12\nval SCE_JSON_ERROR=13\nlex EDIFACT=SCLEX_EDIFACT SCE_EDI_\nval SCE_EDI_DEFAULT=0\nval SCE_EDI_SEGMENTSTART=1\nval SCE_EDI_SEGMENTEND=2\nval SCE_EDI_SEP_ELEMENT=3\nval SCE_EDI_SEP_COMPOSITE=4\nval SCE_EDI_SEP_RELEASE=5\nval SCE_EDI_UNA=6\nval SCE_EDI_UNH=7\nval SCE_EDI_BADSEGMENT=8\n# Lexical states for SCLEX_STATA\nlex STATA=SCLEX_STATA SCE_STATA_\nval SCE_STATA_DEFAULT=0\nval SCE_STATA_COMMENT=1\nval SCE_STATA_COMMENTLINE=2\nval SCE_STATA_COMMENTBLOCK=3\nval SCE_STATA_NUMBER=4\nval SCE_STATA_OPERATOR=5\nval SCE_STATA_IDENTIFIER=6\nval SCE_STATA_STRING=7\nval SCE_STATA_TYPE=8\nval SCE_STATA_WORD=9\nval SCE_STATA_GLOBAL_MACRO=10\nval SCE_STATA_MACRO=11\n# Lexical states for SCLEX_SAS\nlex SAS=SCLEX_SAS SCE_SAS_\nval SCE_SAS_DEFAULT=0\nval SCE_SAS_COMMENT=1\nval SCE_SAS_COMMENTLINE=2\nval SCE_SAS_COMMENTBLOCK=3\nval SCE_SAS_NUMBER=4\nval SCE_SAS_OPERATOR=5\nval SCE_SAS_IDENTIFIER=6\nval SCE_SAS_STRING=7\nval SCE_SAS_TYPE=8\nval SCE_SAS_WORD=9\nval SCE_SAS_GLOBAL_MACRO=10\nval SCE_SAS_MACRO=11\nval SCE_SAS_MACRO_KEYWORD=12\nval SCE_SAS_BLOCK_KEYWORD=13\nval SCE_SAS_MACRO_FUNCTION=14\nval SCE_SAS_STATEMENT=15\n# Lexical states for SCLEX_NIM\nlex Nim=SCLEX_NIM SCE_NIM_\nval SCE_NIM_DEFAULT=0\nval SCE_NIM_COMMENT=1\nval SCE_NIM_COMMENTDOC=2\nval SCE_NIM_COMMENTLINE=3\nval SCE_NIM_COMMENTLINEDOC=4\nval SCE_NIM_NUMBER=5\nval SCE_NIM_STRING=6\nval SCE_NIM_CHARACTER=7\nval SCE_NIM_WORD=8\nval SCE_NIM_TRIPLE=9\nval SCE_NIM_TRIPLEDOUBLE=10\nval SCE_NIM_BACKTICKS=11\nval SCE_NIM_FUNCNAME=12\nval SCE_NIM_STRINGEOL=13\nval SCE_NIM_NUMERROR=14\nval SCE_NIM_OPERATOR=15\nval SCE_NIM_IDENTIFIER=16\n# Lexical states for SCLEX_CIL\nlex CIL=SCLEX_CIL SCE_CIL_\nval SCE_CIL_DEFAULT=0\nval SCE_CIL_COMMENT=1\nval SCE_CIL_COMMENTLINE=2\nval SCE_CIL_WORD=3\nval SCE_CIL_WORD2=4\nval SCE_CIL_WORD3=5\nval SCE_CIL_STRING=6\nval SCE_CIL_LABEL=7\nval SCE_CIL_OPERATOR=8\nval SCE_CIL_IDENTIFIER=9\nval SCE_CIL_STRINGEOL=10\n# Lexical states for SCLEX_X12\nlex X12=SCLEX_X12 SCE_X12_\nval SCE_X12_DEFAULT=0\nval SCE_X12_BAD=1\nval SCE_X12_ENVELOPE=2\nval SCE_X12_FUNCTIONGROUP=3\nval SCE_X12_TRANSACTIONSET=4\nval SCE_X12_SEGMENTHEADER=5\nval SCE_X12_SEGMENTEND=6\nval SCE_X12_SEP_ELEMENT=7\nval SCE_X12_SEP_SUBELEMENT=8\n# Lexical states for SCLEX_DATAFLEX\nlex Dataflex=SCLEX_DATAFLEX SCE_DF_\nval SCE_DF_DEFAULT=0\nval SCE_DF_IDENTIFIER=1\nval SCE_DF_METATAG=2\nval SCE_DF_IMAGE=3\nval SCE_DF_COMMENTLINE=4\nval SCE_DF_PREPROCESSOR=5\nval SCE_DF_PREPROCESSOR2=6\nval SCE_DF_NUMBER=7\nval SCE_DF_HEXNUMBER=8\nval SCE_DF_WORD=9\nval SCE_DF_STRING=10\nval SCE_DF_STRINGEOL=11\nval SCE_DF_SCOPEWORD=12\nval SCE_DF_OPERATOR=13\nval SCE_DF_ICODE=14\n# Lexical states for SCLEX_HOLLYWOOD\nlex Hollywood=SCLEX_HOLLYWOOD SCE_HOLLYWOOD_\nval SCE_HOLLYWOOD_DEFAULT=0\nval SCE_HOLLYWOOD_COMMENT=1\nval SCE_HOLLYWOOD_COMMENTBLOCK=2\nval SCE_HOLLYWOOD_NUMBER=3\nval SCE_HOLLYWOOD_KEYWORD=4\nval SCE_HOLLYWOOD_STDAPI=5\nval SCE_HOLLYWOOD_PLUGINAPI=6\nval SCE_HOLLYWOOD_PLUGINMETHOD=7\nval SCE_HOLLYWOOD_STRING=8\nval SCE_HOLLYWOOD_STRINGBLOCK=9\nval SCE_HOLLYWOOD_PREPROCESSOR=10\nval SCE_HOLLYWOOD_OPERATOR=11\nval SCE_HOLLYWOOD_IDENTIFIER=12\nval SCE_HOLLYWOOD_CONSTANT=13\nval SCE_HOLLYWOOD_HEXNUMBER=14\n# Lexical states for SCLEX_RAKU\nlex Raku=SCLEX_RAKU SCE_RAKU_\nval SCE_RAKU_DEFAULT=0\nval SCE_RAKU_ERROR=1\nval SCE_RAKU_COMMENTLINE=2\nval SCE_RAKU_COMMENTEMBED=3\nval SCE_RAKU_POD=4\nval SCE_RAKU_CHARACTER=5\nval SCE_RAKU_HEREDOC_Q=6\nval SCE_RAKU_HEREDOC_QQ=7\nval SCE_RAKU_STRING=8\nval SCE_RAKU_STRING_Q=9\nval SCE_RAKU_STRING_QQ=10\nval SCE_RAKU_STRING_Q_LANG=11\nval SCE_RAKU_STRING_VAR=12\nval SCE_RAKU_REGEX=13\nval SCE_RAKU_REGEX_VAR=14\nval SCE_RAKU_ADVERB=15\nval SCE_RAKU_NUMBER=16\nval SCE_RAKU_PREPROCESSOR=17\nval SCE_RAKU_OPERATOR=18\nval SCE_RAKU_WORD=19\nval SCE_RAKU_FUNCTION=20\nval SCE_RAKU_IDENTIFIER=21\nval SCE_RAKU_TYPEDEF=22\nval SCE_RAKU_MU=23\nval SCE_RAKU_POSITIONAL=24\nval SCE_RAKU_ASSOCIATIVE=25\nval SCE_RAKU_CALLABLE=26\nval SCE_RAKU_GRAMMAR=27\nval SCE_RAKU_CLASS=28\n# Lexical states for SCLEX_FSHARP\nlex FSharp=SCLEX_FSHARP SCE_FSHARP_\nval SCE_FSHARP_DEFAULT=0\nval SCE_FSHARP_KEYWORD=1\nval SCE_FSHARP_KEYWORD2=2\nval SCE_FSHARP_KEYWORD3=3\nval SCE_FSHARP_KEYWORD4=4\nval SCE_FSHARP_KEYWORD5=5\nval SCE_FSHARP_IDENTIFIER=6\nval SCE_FSHARP_QUOT_IDENTIFIER=7\nval SCE_FSHARP_COMMENT=8\nval SCE_FSHARP_COMMENTLINE=9\nval SCE_FSHARP_PREPROCESSOR=10\nval SCE_FSHARP_LINENUM=11\nval SCE_FSHARP_OPERATOR=12\nval SCE_FSHARP_NUMBER=13\nval SCE_FSHARP_CHARACTER=14\nval SCE_FSHARP_STRING=15\nval SCE_FSHARP_VERBATIM=16\nval SCE_FSHARP_QUOTATION=17\nval SCE_FSHARP_ATTRIBUTE=18\nval SCE_FSHARP_FORMAT_SPEC=19\n# Lexical states for SCLEX_ASCIIDOC\nlex Asciidoc=SCLEX_ASCIIDOC SCE_ASCIIDOC_\nval SCE_ASCIIDOC_DEFAULT=0\nval SCE_ASCIIDOC_STRONG1=1\nval SCE_ASCIIDOC_STRONG2=2\nval SCE_ASCIIDOC_EM1=3\nval SCE_ASCIIDOC_EM2=4\nval SCE_ASCIIDOC_HEADER1=5\nval SCE_ASCIIDOC_HEADER2=6\nval SCE_ASCIIDOC_HEADER3=7\nval SCE_ASCIIDOC_HEADER4=8\nval SCE_ASCIIDOC_HEADER5=9\nval SCE_ASCIIDOC_HEADER6=10\nval SCE_ASCIIDOC_ULIST_ITEM=11\nval SCE_ASCIIDOC_OLIST_ITEM=12\nval SCE_ASCIIDOC_BLOCKQUOTE=13\nval SCE_ASCIIDOC_LINK=14\nval SCE_ASCIIDOC_CODEBK=15\nval SCE_ASCIIDOC_PASSBK=16\nval SCE_ASCIIDOC_COMMENT=17\nval SCE_ASCIIDOC_COMMENTBK=18\nval SCE_ASCIIDOC_LITERAL=19\nval SCE_ASCIIDOC_LITERALBK=20\nval SCE_ASCIIDOC_ATTRIB=21\nval SCE_ASCIIDOC_ATTRIBVAL=22\nval SCE_ASCIIDOC_MACRO=23\n# Lexical states for SCLEX_GDSCRIPT\nlex GDScript=SCLEX_GDSCRIPT SCE_GD_\nval SCE_GD_DEFAULT=0\nval SCE_GD_COMMENTLINE=1\nval SCE_GD_NUMBER=2\nval SCE_GD_STRING=3\nval SCE_GD_CHARACTER=4\nval SCE_GD_WORD=5\nval SCE_GD_TRIPLE=6\nval SCE_GD_TRIPLEDOUBLE=7\nval SCE_GD_CLASSNAME=8\nval SCE_GD_FUNCNAME=9\nval SCE_GD_OPERATOR=10\nval SCE_GD_IDENTIFIER=11\nval SCE_GD_COMMENTBLOCK=12\nval SCE_GD_STRINGEOL=13\nval SCE_GD_WORD2=14\nval SCE_GD_ANNOTATION=15\nval SCE_GD_NODEPATH=16\n"
  },
  {
    "path": "lexilla/include/Lexilla.h",
    "content": "// Lexilla lexer library\n/** @file Lexilla.h\n ** Lexilla definitions for dynamic and static linking.\n ** For C++, more features and type safety are available with the LexillaAccess module.\n **/\n// Copyright 2020 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#ifndef LEXILLA_H\n#define LEXILLA_H\n\n// Define the default Lexilla shared library name for each platform\n#if defined(_WIN32)\n#define LEXILLA_LIB \"lexilla\"\n#define LEXILLA_EXTENSION \".dll\"\n#else\n#define LEXILLA_LIB \"liblexilla\"\n#if defined(__APPLE__)\n#define LEXILLA_EXTENSION \".dylib\"\n#else\n#define LEXILLA_EXTENSION \".so\"\n#endif\n#endif\n\n// On Win32 use the stdcall calling convention otherwise use the standard calling convention\n#if defined(_WIN32)\n#define LEXILLA_CALL __stdcall\n#else\n#define LEXILLA_CALL\n#endif\n\n#if defined(__OBJC2__)\n// Objective C(++) treats '[' as a message expression.\n#define DEPRECATE_DEFINITION\n#elif defined(__cplusplus)\n#define DEPRECATE_DEFINITION [[deprecated]]\n#elif defined(__GNUC__) || defined(__clang__)\n#define DEPRECATE_DEFINITION __attribute__((deprecated))\n#else\n// MSVC __declspec(deprecated) has different positioning rules to GCC so define to nothing\n#define DEPRECATE_DEFINITION\n#endif\n\n#if defined(__cplusplus)\n// Must have already included ILexer.h to have Scintilla::ILexer5 defined.\nusing Scintilla::ILexer5;\n#else\ntypedef void ILexer5;\n#endif\n\ntypedef ILexer5 *(*LexerFactoryFunction)(void);\n\n#if defined(__cplusplus)\nnamespace Lexilla {\n#endif\n\ntypedef int (LEXILLA_CALL *GetLexerCountFn)(void);\ntypedef void (LEXILLA_CALL *GetLexerNameFn)(unsigned int Index, char *name, int buflength);\ntypedef LexerFactoryFunction(LEXILLA_CALL *GetLexerFactoryFn)(unsigned int Index);\ntypedef ILexer5*(LEXILLA_CALL *CreateLexerFn)(const char *name);\nDEPRECATE_DEFINITION typedef const char *(LEXILLA_CALL *LexerNameFromIDFn)(int identifier);\ntypedef const char *(LEXILLA_CALL *GetLibraryPropertyNamesFn)(void);\ntypedef void(LEXILLA_CALL *SetLibraryPropertyFn)(const char *key, const char *value);\ntypedef const char *(LEXILLA_CALL *GetNameSpaceFn)(void);\n\n#if defined(__cplusplus)\n}\n#endif\n\n#define LEXILLA_NAMESPACE_SEPARATOR '.'\n\n#define LEXILLA_GETLEXERCOUNT \"GetLexerCount\"\n#define LEXILLA_GETLEXERNAME \"GetLexerName\"\n#define LEXILLA_GETLEXERFACTORY \"GetLexerFactory\"\n#define LEXILLA_CREATELEXER \"CreateLexer\"\n#define LEXILLA_LEXERNAMEFROMID \"LexerNameFromID\"\n#define LEXILLA_GETLIBRARYPROPERTYNAMES \"GetLibraryPropertyNames\"\n#define LEXILLA_SETLIBRARYPROPERTY \"SetLibraryProperty\"\n#define LEXILLA_GETNAMESPACE \"GetNameSpace\"\n\n// Static linking prototypes\n\n#if defined(__cplusplus)\nextern \"C\" {\n#endif\n\nILexer5 * LEXILLA_CALL CreateLexer(const char *name);\nint LEXILLA_CALL GetLexerCount(void);\nvoid LEXILLA_CALL GetLexerName(unsigned int index, char *name, int buflength);\nLexerFactoryFunction LEXILLA_CALL GetLexerFactory(unsigned int index);\nDEPRECATE_DEFINITION const char *LEXILLA_CALL LexerNameFromID(int identifier);\nconst char * LEXILLA_CALL GetLibraryPropertyNames(void);\nvoid LEXILLA_CALL SetLibraryProperty(const char *key, const char *value);\nconst char *LEXILLA_CALL GetNameSpace(void);\n\n#if defined(__cplusplus)\n}\n#endif\n\n#if defined(__cplusplus)\nnamespace Lexilla {\n\tclass LexerModule;\n}\n// Add a static lexer (in the same binary) to Lexilla's list\nvoid AddStaticLexerModule(Lexilla::LexerModule *plm);\n#endif\n\n#endif\n"
  },
  {
    "path": "lexilla/include/SciLexer.h",
    "content": "/* Scintilla source code edit control */\n/** @file SciLexer.h\n ** Interface to the added lexer functions in the SciLexer version of the edit control.\n **/\n/* Copyright 1998-2002 by Neil Hodgson <neilh@scintilla.org>\n * The License.txt file describes the conditions under which this software may be distributed. */\n\n/* Most of this file is automatically generated from the Scintilla.iface interface definition\n * file which contains any comments about the definitions. HFacer.py does the generation. */\n\n#ifndef SCILEXER_H\n#define SCILEXER_H\n\n/* SciLexer features - not in standard Scintilla */\n\n/* ++Autogenerated -- start of section automatically generated from Scintilla.iface */\n#define SCLEX_CONTAINER 0\n#define SCLEX_NULL 1\n#define SCLEX_PYTHON 2\n#define SCLEX_CPP 3\n#define SCLEX_HTML 4\n#define SCLEX_XML 5\n#define SCLEX_PERL 6\n#define SCLEX_SQL 7\n#define SCLEX_VB 8\n#define SCLEX_PROPERTIES 9\n#define SCLEX_ERRORLIST 10\n#define SCLEX_MAKEFILE 11\n#define SCLEX_BATCH 12\n#define SCLEX_XCODE 13\n#define SCLEX_LATEX 14\n#define SCLEX_LUA 15\n#define SCLEX_DIFF 16\n#define SCLEX_CONF 17\n#define SCLEX_PASCAL 18\n#define SCLEX_AVE 19\n#define SCLEX_ADA 20\n#define SCLEX_LISP 21\n#define SCLEX_RUBY 22\n#define SCLEX_EIFFEL 23\n#define SCLEX_EIFFELKW 24\n#define SCLEX_TCL 25\n#define SCLEX_NNCRONTAB 26\n#define SCLEX_BULLANT 27\n#define SCLEX_VBSCRIPT 28\n#define SCLEX_BAAN 31\n#define SCLEX_MATLAB 32\n#define SCLEX_SCRIPTOL 33\n#define SCLEX_ASM 34\n#define SCLEX_CPPNOCASE 35\n#define SCLEX_FORTRAN 36\n#define SCLEX_F77 37\n#define SCLEX_CSS 38\n#define SCLEX_POV 39\n#define SCLEX_LOUT 40\n#define SCLEX_ESCRIPT 41\n#define SCLEX_PS 42\n#define SCLEX_NSIS 43\n#define SCLEX_MMIXAL 44\n#define SCLEX_CLW 45\n#define SCLEX_CLWNOCASE 46\n#define SCLEX_LOT 47\n#define SCLEX_YAML 48\n#define SCLEX_TEX 49\n#define SCLEX_METAPOST 50\n#define SCLEX_POWERBASIC 51\n#define SCLEX_FORTH 52\n#define SCLEX_ERLANG 53\n#define SCLEX_OCTAVE 54\n#define SCLEX_MSSQL 55\n#define SCLEX_VERILOG 56\n#define SCLEX_KIX 57\n#define SCLEX_GUI4CLI 58\n#define SCLEX_SPECMAN 59\n#define SCLEX_AU3 60\n#define SCLEX_APDL 61\n#define SCLEX_BASH 62\n#define SCLEX_ASN1 63\n#define SCLEX_VHDL 64\n#define SCLEX_CAML 65\n#define SCLEX_BLITZBASIC 66\n#define SCLEX_PUREBASIC 67\n#define SCLEX_HASKELL 68\n#define SCLEX_PHPSCRIPT 69\n#define SCLEX_TADS3 70\n#define SCLEX_REBOL 71\n#define SCLEX_SMALLTALK 72\n#define SCLEX_FLAGSHIP 73\n#define SCLEX_CSOUND 74\n#define SCLEX_FREEBASIC 75\n#define SCLEX_INNOSETUP 76\n#define SCLEX_OPAL 77\n#define SCLEX_SPICE 78\n#define SCLEX_D 79\n#define SCLEX_CMAKE 80\n#define SCLEX_GAP 81\n#define SCLEX_PLM 82\n#define SCLEX_PROGRESS 83\n#define SCLEX_ABAQUS 84\n#define SCLEX_ASYMPTOTE 85\n#define SCLEX_R 86\n#define SCLEX_MAGIK 87\n#define SCLEX_POWERSHELL 88\n#define SCLEX_MYSQL 89\n#define SCLEX_PO 90\n#define SCLEX_TAL 91\n#define SCLEX_COBOL 92\n#define SCLEX_TACL 93\n#define SCLEX_SORCUS 94\n#define SCLEX_POWERPRO 95\n#define SCLEX_NIMROD 96\n#define SCLEX_SML 97\n#define SCLEX_MARKDOWN 98\n#define SCLEX_TXT2TAGS 99\n#define SCLEX_A68K 100\n#define SCLEX_MODULA 101\n#define SCLEX_COFFEESCRIPT 102\n#define SCLEX_TCMD 103\n#define SCLEX_AVS 104\n#define SCLEX_ECL 105\n#define SCLEX_OSCRIPT 106\n#define SCLEX_VISUALPROLOG 107\n#define SCLEX_LITERATEHASKELL 108\n#define SCLEX_STTXT 109\n#define SCLEX_KVIRC 110\n#define SCLEX_RUST 111\n#define SCLEX_DMAP 112\n#define SCLEX_AS 113\n#define SCLEX_DMIS 114\n#define SCLEX_REGISTRY 115\n#define SCLEX_BIBTEX 116\n#define SCLEX_SREC 117\n#define SCLEX_IHEX 118\n#define SCLEX_TEHEX 119\n#define SCLEX_JSON 120\n#define SCLEX_EDIFACT 121\n#define SCLEX_INDENT 122\n#define SCLEX_MAXIMA 123\n#define SCLEX_STATA 124\n#define SCLEX_SAS 125\n#define SCLEX_NIM 126\n#define SCLEX_CIL 127\n#define SCLEX_X12 128\n#define SCLEX_DATAFLEX 129\n#define SCLEX_HOLLYWOOD 130\n#define SCLEX_RAKU 131\n#define SCLEX_FSHARP 132\n#define SCLEX_JULIA 133\n#define SCLEX_ASCIIDOC 134\n#define SCLEX_GDSCRIPT 135\n#define SCLEX_AUTOMATIC 1000\n#define SCE_P_DEFAULT 0\n#define SCE_P_COMMENTLINE 1\n#define SCE_P_NUMBER 2\n#define SCE_P_STRING 3\n#define SCE_P_CHARACTER 4\n#define SCE_P_WORD 5\n#define SCE_P_TRIPLE 6\n#define SCE_P_TRIPLEDOUBLE 7\n#define SCE_P_CLASSNAME 8\n#define SCE_P_DEFNAME 9\n#define SCE_P_OPERATOR 10\n#define SCE_P_IDENTIFIER 11\n#define SCE_P_COMMENTBLOCK 12\n#define SCE_P_STRINGEOL 13\n#define SCE_P_WORD2 14\n#define SCE_P_DECORATOR 15\n#define SCE_P_FSTRING 16\n#define SCE_P_FCHARACTER 17\n#define SCE_P_FTRIPLE 18\n#define SCE_P_FTRIPLEDOUBLE 19\n#define SCE_P_ATTRIBUTE 20\n#define SCE_C_DEFAULT 0\n#define SCE_C_COMMENT 1\n#define SCE_C_COMMENTLINE 2\n#define SCE_C_COMMENTDOC 3\n#define SCE_C_NUMBER 4\n#define SCE_C_WORD 5\n#define SCE_C_STRING 6\n#define SCE_C_CHARACTER 7\n#define SCE_C_UUID 8\n#define SCE_C_PREPROCESSOR 9\n#define SCE_C_OPERATOR 10\n#define SCE_C_IDENTIFIER 11\n#define SCE_C_STRINGEOL 12\n#define SCE_C_VERBATIM 13\n#define SCE_C_REGEX 14\n#define SCE_C_COMMENTLINEDOC 15\n#define SCE_C_WORD2 16\n#define SCE_C_COMMENTDOCKEYWORD 17\n#define SCE_C_COMMENTDOCKEYWORDERROR 18\n#define SCE_C_GLOBALCLASS 19\n#define SCE_C_STRINGRAW 20\n#define SCE_C_TRIPLEVERBATIM 21\n#define SCE_C_HASHQUOTEDSTRING 22\n#define SCE_C_PREPROCESSORCOMMENT 23\n#define SCE_C_PREPROCESSORCOMMENTDOC 24\n#define SCE_C_USERLITERAL 25\n#define SCE_C_TASKMARKER 26\n#define SCE_C_ESCAPESEQUENCE 27\n#define SCE_D_DEFAULT 0\n#define SCE_D_COMMENT 1\n#define SCE_D_COMMENTLINE 2\n#define SCE_D_COMMENTDOC 3\n#define SCE_D_COMMENTNESTED 4\n#define SCE_D_NUMBER 5\n#define SCE_D_WORD 6\n#define SCE_D_WORD2 7\n#define SCE_D_WORD3 8\n#define SCE_D_TYPEDEF 9\n#define SCE_D_STRING 10\n#define SCE_D_STRINGEOL 11\n#define SCE_D_CHARACTER 12\n#define SCE_D_OPERATOR 13\n#define SCE_D_IDENTIFIER 14\n#define SCE_D_COMMENTLINEDOC 15\n#define SCE_D_COMMENTDOCKEYWORD 16\n#define SCE_D_COMMENTDOCKEYWORDERROR 17\n#define SCE_D_STRINGB 18\n#define SCE_D_STRINGR 19\n#define SCE_D_WORD5 20\n#define SCE_D_WORD6 21\n#define SCE_D_WORD7 22\n#define SCE_TCL_DEFAULT 0\n#define SCE_TCL_COMMENT 1\n#define SCE_TCL_COMMENTLINE 2\n#define SCE_TCL_NUMBER 3\n#define SCE_TCL_WORD_IN_QUOTE 4\n#define SCE_TCL_IN_QUOTE 5\n#define SCE_TCL_OPERATOR 6\n#define SCE_TCL_IDENTIFIER 7\n#define SCE_TCL_SUBSTITUTION 8\n#define SCE_TCL_SUB_BRACE 9\n#define SCE_TCL_MODIFIER 10\n#define SCE_TCL_EXPAND 11\n#define SCE_TCL_WORD 12\n#define SCE_TCL_WORD2 13\n#define SCE_TCL_WORD3 14\n#define SCE_TCL_WORD4 15\n#define SCE_TCL_WORD5 16\n#define SCE_TCL_WORD6 17\n#define SCE_TCL_WORD7 18\n#define SCE_TCL_WORD8 19\n#define SCE_TCL_COMMENT_BOX 20\n#define SCE_TCL_BLOCK_COMMENT 21\n#define SCE_H_DEFAULT 0\n#define SCE_H_TAG 1\n#define SCE_H_TAGUNKNOWN 2\n#define SCE_H_ATTRIBUTE 3\n#define SCE_H_ATTRIBUTEUNKNOWN 4\n#define SCE_H_NUMBER 5\n#define SCE_H_DOUBLESTRING 6\n#define SCE_H_SINGLESTRING 7\n#define SCE_H_OTHER 8\n#define SCE_H_COMMENT 9\n#define SCE_H_ENTITY 10\n#define SCE_H_TAGEND 11\n#define SCE_H_XMLSTART 12\n#define SCE_H_XMLEND 13\n#define SCE_H_SCRIPT 14\n#define SCE_H_ASP 15\n#define SCE_H_ASPAT 16\n#define SCE_H_CDATA 17\n#define SCE_H_QUESTION 18\n#define SCE_H_VALUE 19\n#define SCE_H_XCCOMMENT 20\n#define SCE_H_SGML_DEFAULT 21\n#define SCE_H_SGML_COMMAND 22\n#define SCE_H_SGML_1ST_PARAM 23\n#define SCE_H_SGML_DOUBLESTRING 24\n#define SCE_H_SGML_SIMPLESTRING 25\n#define SCE_H_SGML_ERROR 26\n#define SCE_H_SGML_SPECIAL 27\n#define SCE_H_SGML_ENTITY 28\n#define SCE_H_SGML_COMMENT 29\n#define SCE_H_SGML_1ST_PARAM_COMMENT 30\n#define SCE_H_SGML_BLOCK_DEFAULT 31\n#define SCE_HJ_START 40\n#define SCE_HJ_DEFAULT 41\n#define SCE_HJ_COMMENT 42\n#define SCE_HJ_COMMENTLINE 43\n#define SCE_HJ_COMMENTDOC 44\n#define SCE_HJ_NUMBER 45\n#define SCE_HJ_WORD 46\n#define SCE_HJ_KEYWORD 47\n#define SCE_HJ_DOUBLESTRING 48\n#define SCE_HJ_SINGLESTRING 49\n#define SCE_HJ_SYMBOLS 50\n#define SCE_HJ_STRINGEOL 51\n#define SCE_HJ_REGEX 52\n#define SCE_HJA_START 55\n#define SCE_HJA_DEFAULT 56\n#define SCE_HJA_COMMENT 57\n#define SCE_HJA_COMMENTLINE 58\n#define SCE_HJA_COMMENTDOC 59\n#define SCE_HJA_NUMBER 60\n#define SCE_HJA_WORD 61\n#define SCE_HJA_KEYWORD 62\n#define SCE_HJA_DOUBLESTRING 63\n#define SCE_HJA_SINGLESTRING 64\n#define SCE_HJA_SYMBOLS 65\n#define SCE_HJA_STRINGEOL 66\n#define SCE_HJA_REGEX 67\n#define SCE_HB_START 70\n#define SCE_HB_DEFAULT 71\n#define SCE_HB_COMMENTLINE 72\n#define SCE_HB_NUMBER 73\n#define SCE_HB_WORD 74\n#define SCE_HB_STRING 75\n#define SCE_HB_IDENTIFIER 76\n#define SCE_HB_STRINGEOL 77\n#define SCE_HBA_START 80\n#define SCE_HBA_DEFAULT 81\n#define SCE_HBA_COMMENTLINE 82\n#define SCE_HBA_NUMBER 83\n#define SCE_HBA_WORD 84\n#define SCE_HBA_STRING 85\n#define SCE_HBA_IDENTIFIER 86\n#define SCE_HBA_STRINGEOL 87\n#define SCE_HP_START 90\n#define SCE_HP_DEFAULT 91\n#define SCE_HP_COMMENTLINE 92\n#define SCE_HP_NUMBER 93\n#define SCE_HP_STRING 94\n#define SCE_HP_CHARACTER 95\n#define SCE_HP_WORD 96\n#define SCE_HP_TRIPLE 97\n#define SCE_HP_TRIPLEDOUBLE 98\n#define SCE_HP_CLASSNAME 99\n#define SCE_HP_DEFNAME 100\n#define SCE_HP_OPERATOR 101\n#define SCE_HP_IDENTIFIER 102\n#define SCE_HPHP_COMPLEX_VARIABLE 104\n#define SCE_HPA_START 105\n#define SCE_HPA_DEFAULT 106\n#define SCE_HPA_COMMENTLINE 107\n#define SCE_HPA_NUMBER 108\n#define SCE_HPA_STRING 109\n#define SCE_HPA_CHARACTER 110\n#define SCE_HPA_WORD 111\n#define SCE_HPA_TRIPLE 112\n#define SCE_HPA_TRIPLEDOUBLE 113\n#define SCE_HPA_CLASSNAME 114\n#define SCE_HPA_DEFNAME 115\n#define SCE_HPA_OPERATOR 116\n#define SCE_HPA_IDENTIFIER 117\n#define SCE_HPHP_DEFAULT 118\n#define SCE_HPHP_HSTRING 119\n#define SCE_HPHP_SIMPLESTRING 120\n#define SCE_HPHP_WORD 121\n#define SCE_HPHP_NUMBER 122\n#define SCE_HPHP_VARIABLE 123\n#define SCE_HPHP_COMMENT 124\n#define SCE_HPHP_COMMENTLINE 125\n#define SCE_HPHP_HSTRING_VARIABLE 126\n#define SCE_HPHP_OPERATOR 127\n#define SCE_PL_DEFAULT 0\n#define SCE_PL_ERROR 1\n#define SCE_PL_COMMENTLINE 2\n#define SCE_PL_POD 3\n#define SCE_PL_NUMBER 4\n#define SCE_PL_WORD 5\n#define SCE_PL_STRING 6\n#define SCE_PL_CHARACTER 7\n#define SCE_PL_PUNCTUATION 8\n#define SCE_PL_PREPROCESSOR 9\n#define SCE_PL_OPERATOR 10\n#define SCE_PL_IDENTIFIER 11\n#define SCE_PL_SCALAR 12\n#define SCE_PL_ARRAY 13\n#define SCE_PL_HASH 14\n#define SCE_PL_SYMBOLTABLE 15\n#define SCE_PL_VARIABLE_INDEXER 16\n#define SCE_PL_REGEX 17\n#define SCE_PL_REGSUBST 18\n#define SCE_PL_LONGQUOTE 19\n#define SCE_PL_BACKTICKS 20\n#define SCE_PL_DATASECTION 21\n#define SCE_PL_HERE_DELIM 22\n#define SCE_PL_HERE_Q 23\n#define SCE_PL_HERE_QQ 24\n#define SCE_PL_HERE_QX 25\n#define SCE_PL_STRING_Q 26\n#define SCE_PL_STRING_QQ 27\n#define SCE_PL_STRING_QX 28\n#define SCE_PL_STRING_QR 29\n#define SCE_PL_STRING_QW 30\n#define SCE_PL_POD_VERB 31\n#define SCE_PL_SUB_PROTOTYPE 40\n#define SCE_PL_FORMAT_IDENT 41\n#define SCE_PL_FORMAT 42\n#define SCE_PL_STRING_VAR 43\n#define SCE_PL_XLAT 44\n#define SCE_PL_REGEX_VAR 54\n#define SCE_PL_REGSUBST_VAR 55\n#define SCE_PL_BACKTICKS_VAR 57\n#define SCE_PL_HERE_QQ_VAR 61\n#define SCE_PL_HERE_QX_VAR 62\n#define SCE_PL_STRING_QQ_VAR 64\n#define SCE_PL_STRING_QX_VAR 65\n#define SCE_PL_STRING_QR_VAR 66\n#define SCE_RB_DEFAULT 0\n#define SCE_RB_ERROR 1\n#define SCE_RB_COMMENTLINE 2\n#define SCE_RB_POD 3\n#define SCE_RB_NUMBER 4\n#define SCE_RB_WORD 5\n#define SCE_RB_STRING 6\n#define SCE_RB_CHARACTER 7\n#define SCE_RB_CLASSNAME 8\n#define SCE_RB_DEFNAME 9\n#define SCE_RB_OPERATOR 10\n#define SCE_RB_IDENTIFIER 11\n#define SCE_RB_REGEX 12\n#define SCE_RB_GLOBAL 13\n#define SCE_RB_SYMBOL 14\n#define SCE_RB_MODULE_NAME 15\n#define SCE_RB_INSTANCE_VAR 16\n#define SCE_RB_CLASS_VAR 17\n#define SCE_RB_BACKTICKS 18\n#define SCE_RB_DATASECTION 19\n#define SCE_RB_HERE_DELIM 20\n#define SCE_RB_HERE_Q 21\n#define SCE_RB_HERE_QQ 22\n#define SCE_RB_HERE_QX 23\n#define SCE_RB_STRING_Q 24\n#define SCE_RB_STRING_QQ 25\n#define SCE_RB_STRING_QX 26\n#define SCE_RB_STRING_QR 27\n#define SCE_RB_STRING_QW 28\n#define SCE_RB_WORD_DEMOTED 29\n#define SCE_RB_STDIN 30\n#define SCE_RB_STDOUT 31\n#define SCE_RB_STDERR 40\n#define SCE_RB_STRING_W 41\n#define SCE_RB_STRING_I 42\n#define SCE_RB_STRING_QI 43\n#define SCE_RB_STRING_QS 44\n#define SCE_RB_UPPER_BOUND 45\n#define SCE_B_DEFAULT 0\n#define SCE_B_COMMENT 1\n#define SCE_B_NUMBER 2\n#define SCE_B_KEYWORD 3\n#define SCE_B_STRING 4\n#define SCE_B_PREPROCESSOR 5\n#define SCE_B_OPERATOR 6\n#define SCE_B_IDENTIFIER 7\n#define SCE_B_DATE 8\n#define SCE_B_STRINGEOL 9\n#define SCE_B_KEYWORD2 10\n#define SCE_B_KEYWORD3 11\n#define SCE_B_KEYWORD4 12\n#define SCE_B_CONSTANT 13\n#define SCE_B_ASM 14\n#define SCE_B_LABEL 15\n#define SCE_B_ERROR 16\n#define SCE_B_HEXNUMBER 17\n#define SCE_B_BINNUMBER 18\n#define SCE_B_COMMENTBLOCK 19\n#define SCE_B_DOCLINE 20\n#define SCE_B_DOCBLOCK 21\n#define SCE_B_DOCKEYWORD 22\n#define SCE_PROPS_DEFAULT 0\n#define SCE_PROPS_COMMENT 1\n#define SCE_PROPS_SECTION 2\n#define SCE_PROPS_ASSIGNMENT 3\n#define SCE_PROPS_DEFVAL 4\n#define SCE_PROPS_KEY 5\n#define SCE_L_DEFAULT 0\n#define SCE_L_COMMAND 1\n#define SCE_L_TAG 2\n#define SCE_L_MATH 3\n#define SCE_L_COMMENT 4\n#define SCE_L_TAG2 5\n#define SCE_L_MATH2 6\n#define SCE_L_COMMENT2 7\n#define SCE_L_VERBATIM 8\n#define SCE_L_SHORTCMD 9\n#define SCE_L_SPECIAL 10\n#define SCE_L_CMDOPT 11\n#define SCE_L_ERROR 12\n#define SCE_LUA_DEFAULT 0\n#define SCE_LUA_COMMENT 1\n#define SCE_LUA_COMMENTLINE 2\n#define SCE_LUA_COMMENTDOC 3\n#define SCE_LUA_NUMBER 4\n#define SCE_LUA_WORD 5\n#define SCE_LUA_STRING 6\n#define SCE_LUA_CHARACTER 7\n#define SCE_LUA_LITERALSTRING 8\n#define SCE_LUA_PREPROCESSOR 9\n#define SCE_LUA_OPERATOR 10\n#define SCE_LUA_IDENTIFIER 11\n#define SCE_LUA_STRINGEOL 12\n#define SCE_LUA_WORD2 13\n#define SCE_LUA_WORD3 14\n#define SCE_LUA_WORD4 15\n#define SCE_LUA_WORD5 16\n#define SCE_LUA_WORD6 17\n#define SCE_LUA_WORD7 18\n#define SCE_LUA_WORD8 19\n#define SCE_LUA_LABEL 20\n#define SCE_ERR_DEFAULT 0\n#define SCE_ERR_PYTHON 1\n#define SCE_ERR_GCC 2\n#define SCE_ERR_MS 3\n#define SCE_ERR_CMD 4\n#define SCE_ERR_BORLAND 5\n#define SCE_ERR_PERL 6\n#define SCE_ERR_NET 7\n#define SCE_ERR_LUA 8\n#define SCE_ERR_CTAG 9\n#define SCE_ERR_DIFF_CHANGED 10\n#define SCE_ERR_DIFF_ADDITION 11\n#define SCE_ERR_DIFF_DELETION 12\n#define SCE_ERR_DIFF_MESSAGE 13\n#define SCE_ERR_PHP 14\n#define SCE_ERR_ELF 15\n#define SCE_ERR_IFC 16\n#define SCE_ERR_IFORT 17\n#define SCE_ERR_ABSF 18\n#define SCE_ERR_TIDY 19\n#define SCE_ERR_JAVA_STACK 20\n#define SCE_ERR_VALUE 21\n#define SCE_ERR_GCC_INCLUDED_FROM 22\n#define SCE_ERR_ESCSEQ 23\n#define SCE_ERR_ESCSEQ_UNKNOWN 24\n#define SCE_ERR_GCC_EXCERPT 25\n#define SCE_ERR_BASH 26\n#define SCE_ERR_ES_BLACK 40\n#define SCE_ERR_ES_RED 41\n#define SCE_ERR_ES_GREEN 42\n#define SCE_ERR_ES_BROWN 43\n#define SCE_ERR_ES_BLUE 44\n#define SCE_ERR_ES_MAGENTA 45\n#define SCE_ERR_ES_CYAN 46\n#define SCE_ERR_ES_GRAY 47\n#define SCE_ERR_ES_DARK_GRAY 48\n#define SCE_ERR_ES_BRIGHT_RED 49\n#define SCE_ERR_ES_BRIGHT_GREEN 50\n#define SCE_ERR_ES_YELLOW 51\n#define SCE_ERR_ES_BRIGHT_BLUE 52\n#define SCE_ERR_ES_BRIGHT_MAGENTA 53\n#define SCE_ERR_ES_BRIGHT_CYAN 54\n#define SCE_ERR_ES_WHITE 55\n#define SCE_BAT_DEFAULT 0\n#define SCE_BAT_COMMENT 1\n#define SCE_BAT_WORD 2\n#define SCE_BAT_LABEL 3\n#define SCE_BAT_HIDE 4\n#define SCE_BAT_COMMAND 5\n#define SCE_BAT_IDENTIFIER 6\n#define SCE_BAT_OPERATOR 7\n#define SCE_BAT_AFTER_LABEL 8\n#define SCE_TCMD_DEFAULT 0\n#define SCE_TCMD_COMMENT 1\n#define SCE_TCMD_WORD 2\n#define SCE_TCMD_LABEL 3\n#define SCE_TCMD_HIDE 4\n#define SCE_TCMD_COMMAND 5\n#define SCE_TCMD_IDENTIFIER 6\n#define SCE_TCMD_OPERATOR 7\n#define SCE_TCMD_ENVIRONMENT 8\n#define SCE_TCMD_EXPANSION 9\n#define SCE_TCMD_CLABEL 10\n#define SCE_MAKE_DEFAULT 0\n#define SCE_MAKE_COMMENT 1\n#define SCE_MAKE_PREPROCESSOR 2\n#define SCE_MAKE_IDENTIFIER 3\n#define SCE_MAKE_OPERATOR 4\n#define SCE_MAKE_TARGET 5\n#define SCE_MAKE_IDEOL 9\n#define SCE_DIFF_DEFAULT 0\n#define SCE_DIFF_COMMENT 1\n#define SCE_DIFF_COMMAND 2\n#define SCE_DIFF_HEADER 3\n#define SCE_DIFF_POSITION 4\n#define SCE_DIFF_DELETED 5\n#define SCE_DIFF_ADDED 6\n#define SCE_DIFF_CHANGED 7\n#define SCE_DIFF_PATCH_ADD 8\n#define SCE_DIFF_PATCH_DELETE 9\n#define SCE_DIFF_REMOVED_PATCH_ADD 10\n#define SCE_DIFF_REMOVED_PATCH_DELETE 11\n#define SCE_CONF_DEFAULT 0\n#define SCE_CONF_COMMENT 1\n#define SCE_CONF_NUMBER 2\n#define SCE_CONF_IDENTIFIER 3\n#define SCE_CONF_EXTENSION 4\n#define SCE_CONF_PARAMETER 5\n#define SCE_CONF_STRING 6\n#define SCE_CONF_OPERATOR 7\n#define SCE_CONF_IP 8\n#define SCE_CONF_DIRECTIVE 9\n#define SCE_AVE_DEFAULT 0\n#define SCE_AVE_COMMENT 1\n#define SCE_AVE_NUMBER 2\n#define SCE_AVE_WORD 3\n#define SCE_AVE_STRING 6\n#define SCE_AVE_ENUM 7\n#define SCE_AVE_STRINGEOL 8\n#define SCE_AVE_IDENTIFIER 9\n#define SCE_AVE_OPERATOR 10\n#define SCE_AVE_WORD1 11\n#define SCE_AVE_WORD2 12\n#define SCE_AVE_WORD3 13\n#define SCE_AVE_WORD4 14\n#define SCE_AVE_WORD5 15\n#define SCE_AVE_WORD6 16\n#define SCE_ADA_DEFAULT 0\n#define SCE_ADA_WORD 1\n#define SCE_ADA_IDENTIFIER 2\n#define SCE_ADA_NUMBER 3\n#define SCE_ADA_DELIMITER 4\n#define SCE_ADA_CHARACTER 5\n#define SCE_ADA_CHARACTEREOL 6\n#define SCE_ADA_STRING 7\n#define SCE_ADA_STRINGEOL 8\n#define SCE_ADA_LABEL 9\n#define SCE_ADA_COMMENTLINE 10\n#define SCE_ADA_ILLEGAL 11\n#define SCE_BAAN_DEFAULT 0\n#define SCE_BAAN_COMMENT 1\n#define SCE_BAAN_COMMENTDOC 2\n#define SCE_BAAN_NUMBER 3\n#define SCE_BAAN_WORD 4\n#define SCE_BAAN_STRING 5\n#define SCE_BAAN_PREPROCESSOR 6\n#define SCE_BAAN_OPERATOR 7\n#define SCE_BAAN_IDENTIFIER 8\n#define SCE_BAAN_STRINGEOL 9\n#define SCE_BAAN_WORD2 10\n#define SCE_BAAN_WORD3 11\n#define SCE_BAAN_WORD4 12\n#define SCE_BAAN_WORD5 13\n#define SCE_BAAN_WORD6 14\n#define SCE_BAAN_WORD7 15\n#define SCE_BAAN_WORD8 16\n#define SCE_BAAN_WORD9 17\n#define SCE_BAAN_TABLEDEF 18\n#define SCE_BAAN_TABLESQL 19\n#define SCE_BAAN_FUNCTION 20\n#define SCE_BAAN_DOMDEF 21\n#define SCE_BAAN_FUNCDEF 22\n#define SCE_BAAN_OBJECTDEF 23\n#define SCE_BAAN_DEFINEDEF 24\n#define SCE_LISP_DEFAULT 0\n#define SCE_LISP_COMMENT 1\n#define SCE_LISP_NUMBER 2\n#define SCE_LISP_KEYWORD 3\n#define SCE_LISP_KEYWORD_KW 4\n#define SCE_LISP_SYMBOL 5\n#define SCE_LISP_STRING 6\n#define SCE_LISP_STRINGEOL 8\n#define SCE_LISP_IDENTIFIER 9\n#define SCE_LISP_OPERATOR 10\n#define SCE_LISP_SPECIAL 11\n#define SCE_LISP_MULTI_COMMENT 12\n#define SCE_EIFFEL_DEFAULT 0\n#define SCE_EIFFEL_COMMENTLINE 1\n#define SCE_EIFFEL_NUMBER 2\n#define SCE_EIFFEL_WORD 3\n#define SCE_EIFFEL_STRING 4\n#define SCE_EIFFEL_CHARACTER 5\n#define SCE_EIFFEL_OPERATOR 6\n#define SCE_EIFFEL_IDENTIFIER 7\n#define SCE_EIFFEL_STRINGEOL 8\n#define SCE_NNCRONTAB_DEFAULT 0\n#define SCE_NNCRONTAB_COMMENT 1\n#define SCE_NNCRONTAB_TASK 2\n#define SCE_NNCRONTAB_SECTION 3\n#define SCE_NNCRONTAB_KEYWORD 4\n#define SCE_NNCRONTAB_MODIFIER 5\n#define SCE_NNCRONTAB_ASTERISK 6\n#define SCE_NNCRONTAB_NUMBER 7\n#define SCE_NNCRONTAB_STRING 8\n#define SCE_NNCRONTAB_ENVIRONMENT 9\n#define SCE_NNCRONTAB_IDENTIFIER 10\n#define SCE_FORTH_DEFAULT 0\n#define SCE_FORTH_COMMENT 1\n#define SCE_FORTH_COMMENT_ML 2\n#define SCE_FORTH_IDENTIFIER 3\n#define SCE_FORTH_CONTROL 4\n#define SCE_FORTH_KEYWORD 5\n#define SCE_FORTH_DEFWORD 6\n#define SCE_FORTH_PREWORD1 7\n#define SCE_FORTH_PREWORD2 8\n#define SCE_FORTH_NUMBER 9\n#define SCE_FORTH_STRING 10\n#define SCE_FORTH_LOCALE 11\n#define SCE_MATLAB_DEFAULT 0\n#define SCE_MATLAB_COMMENT 1\n#define SCE_MATLAB_COMMAND 2\n#define SCE_MATLAB_NUMBER 3\n#define SCE_MATLAB_KEYWORD 4\n#define SCE_MATLAB_STRING 5\n#define SCE_MATLAB_OPERATOR 6\n#define SCE_MATLAB_IDENTIFIER 7\n#define SCE_MATLAB_DOUBLEQUOTESTRING 8\n#define SCE_MAXIMA_OPERATOR 0\n#define SCE_MAXIMA_COMMANDENDING 1\n#define SCE_MAXIMA_COMMENT 2\n#define SCE_MAXIMA_NUMBER 3\n#define SCE_MAXIMA_STRING 4\n#define SCE_MAXIMA_COMMAND 5\n#define SCE_MAXIMA_VARIABLE 6\n#define SCE_MAXIMA_UNKNOWN 7\n#define SCE_SCRIPTOL_DEFAULT 0\n#define SCE_SCRIPTOL_WHITE 1\n#define SCE_SCRIPTOL_COMMENTLINE 2\n#define SCE_SCRIPTOL_PERSISTENT 3\n#define SCE_SCRIPTOL_CSTYLE 4\n#define SCE_SCRIPTOL_COMMENTBLOCK 5\n#define SCE_SCRIPTOL_NUMBER 6\n#define SCE_SCRIPTOL_STRING 7\n#define SCE_SCRIPTOL_CHARACTER 8\n#define SCE_SCRIPTOL_STRINGEOL 9\n#define SCE_SCRIPTOL_KEYWORD 10\n#define SCE_SCRIPTOL_OPERATOR 11\n#define SCE_SCRIPTOL_IDENTIFIER 12\n#define SCE_SCRIPTOL_TRIPLE 13\n#define SCE_SCRIPTOL_CLASSNAME 14\n#define SCE_SCRIPTOL_PREPROCESSOR 15\n#define SCE_ASM_DEFAULT 0\n#define SCE_ASM_COMMENT 1\n#define SCE_ASM_NUMBER 2\n#define SCE_ASM_STRING 3\n#define SCE_ASM_OPERATOR 4\n#define SCE_ASM_IDENTIFIER 5\n#define SCE_ASM_CPUINSTRUCTION 6\n#define SCE_ASM_MATHINSTRUCTION 7\n#define SCE_ASM_REGISTER 8\n#define SCE_ASM_DIRECTIVE 9\n#define SCE_ASM_DIRECTIVEOPERAND 10\n#define SCE_ASM_COMMENTBLOCK 11\n#define SCE_ASM_CHARACTER 12\n#define SCE_ASM_STRINGEOL 13\n#define SCE_ASM_EXTINSTRUCTION 14\n#define SCE_ASM_COMMENTDIRECTIVE 15\n#define SCE_F_DEFAULT 0\n#define SCE_F_COMMENT 1\n#define SCE_F_NUMBER 2\n#define SCE_F_STRING1 3\n#define SCE_F_STRING2 4\n#define SCE_F_STRINGEOL 5\n#define SCE_F_OPERATOR 6\n#define SCE_F_IDENTIFIER 7\n#define SCE_F_WORD 8\n#define SCE_F_WORD2 9\n#define SCE_F_WORD3 10\n#define SCE_F_PREPROCESSOR 11\n#define SCE_F_OPERATOR2 12\n#define SCE_F_LABEL 13\n#define SCE_F_CONTINUATION 14\n#define SCE_CSS_DEFAULT 0\n#define SCE_CSS_TAG 1\n#define SCE_CSS_CLASS 2\n#define SCE_CSS_PSEUDOCLASS 3\n#define SCE_CSS_UNKNOWN_PSEUDOCLASS 4\n#define SCE_CSS_OPERATOR 5\n#define SCE_CSS_IDENTIFIER 6\n#define SCE_CSS_UNKNOWN_IDENTIFIER 7\n#define SCE_CSS_VALUE 8\n#define SCE_CSS_COMMENT 9\n#define SCE_CSS_ID 10\n#define SCE_CSS_IMPORTANT 11\n#define SCE_CSS_DIRECTIVE 12\n#define SCE_CSS_DOUBLESTRING 13\n#define SCE_CSS_SINGLESTRING 14\n#define SCE_CSS_IDENTIFIER2 15\n#define SCE_CSS_ATTRIBUTE 16\n#define SCE_CSS_IDENTIFIER3 17\n#define SCE_CSS_PSEUDOELEMENT 18\n#define SCE_CSS_EXTENDED_IDENTIFIER 19\n#define SCE_CSS_EXTENDED_PSEUDOCLASS 20\n#define SCE_CSS_EXTENDED_PSEUDOELEMENT 21\n#define SCE_CSS_GROUP_RULE 22\n#define SCE_CSS_VARIABLE 23\n#define SCE_POV_DEFAULT 0\n#define SCE_POV_COMMENT 1\n#define SCE_POV_COMMENTLINE 2\n#define SCE_POV_NUMBER 3\n#define SCE_POV_OPERATOR 4\n#define SCE_POV_IDENTIFIER 5\n#define SCE_POV_STRING 6\n#define SCE_POV_STRINGEOL 7\n#define SCE_POV_DIRECTIVE 8\n#define SCE_POV_BADDIRECTIVE 9\n#define SCE_POV_WORD2 10\n#define SCE_POV_WORD3 11\n#define SCE_POV_WORD4 12\n#define SCE_POV_WORD5 13\n#define SCE_POV_WORD6 14\n#define SCE_POV_WORD7 15\n#define SCE_POV_WORD8 16\n#define SCE_LOUT_DEFAULT 0\n#define SCE_LOUT_COMMENT 1\n#define SCE_LOUT_NUMBER 2\n#define SCE_LOUT_WORD 3\n#define SCE_LOUT_WORD2 4\n#define SCE_LOUT_WORD3 5\n#define SCE_LOUT_WORD4 6\n#define SCE_LOUT_STRING 7\n#define SCE_LOUT_OPERATOR 8\n#define SCE_LOUT_IDENTIFIER 9\n#define SCE_LOUT_STRINGEOL 10\n#define SCE_ESCRIPT_DEFAULT 0\n#define SCE_ESCRIPT_COMMENT 1\n#define SCE_ESCRIPT_COMMENTLINE 2\n#define SCE_ESCRIPT_COMMENTDOC 3\n#define SCE_ESCRIPT_NUMBER 4\n#define SCE_ESCRIPT_WORD 5\n#define SCE_ESCRIPT_STRING 6\n#define SCE_ESCRIPT_OPERATOR 7\n#define SCE_ESCRIPT_IDENTIFIER 8\n#define SCE_ESCRIPT_BRACE 9\n#define SCE_ESCRIPT_WORD2 10\n#define SCE_ESCRIPT_WORD3 11\n#define SCE_PS_DEFAULT 0\n#define SCE_PS_COMMENT 1\n#define SCE_PS_DSC_COMMENT 2\n#define SCE_PS_DSC_VALUE 3\n#define SCE_PS_NUMBER 4\n#define SCE_PS_NAME 5\n#define SCE_PS_KEYWORD 6\n#define SCE_PS_LITERAL 7\n#define SCE_PS_IMMEVAL 8\n#define SCE_PS_PAREN_ARRAY 9\n#define SCE_PS_PAREN_DICT 10\n#define SCE_PS_PAREN_PROC 11\n#define SCE_PS_TEXT 12\n#define SCE_PS_HEXSTRING 13\n#define SCE_PS_BASE85STRING 14\n#define SCE_PS_BADSTRINGCHAR 15\n#define SCE_NSIS_DEFAULT 0\n#define SCE_NSIS_COMMENT 1\n#define SCE_NSIS_STRINGDQ 2\n#define SCE_NSIS_STRINGLQ 3\n#define SCE_NSIS_STRINGRQ 4\n#define SCE_NSIS_FUNCTION 5\n#define SCE_NSIS_VARIABLE 6\n#define SCE_NSIS_LABEL 7\n#define SCE_NSIS_USERDEFINED 8\n#define SCE_NSIS_SECTIONDEF 9\n#define SCE_NSIS_SUBSECTIONDEF 10\n#define SCE_NSIS_IFDEFINEDEF 11\n#define SCE_NSIS_MACRODEF 12\n#define SCE_NSIS_STRINGVAR 13\n#define SCE_NSIS_NUMBER 14\n#define SCE_NSIS_SECTIONGROUP 15\n#define SCE_NSIS_PAGEEX 16\n#define SCE_NSIS_FUNCTIONDEF 17\n#define SCE_NSIS_COMMENTBOX 18\n#define SCE_MMIXAL_LEADWS 0\n#define SCE_MMIXAL_COMMENT 1\n#define SCE_MMIXAL_LABEL 2\n#define SCE_MMIXAL_OPCODE 3\n#define SCE_MMIXAL_OPCODE_PRE 4\n#define SCE_MMIXAL_OPCODE_VALID 5\n#define SCE_MMIXAL_OPCODE_UNKNOWN 6\n#define SCE_MMIXAL_OPCODE_POST 7\n#define SCE_MMIXAL_OPERANDS 8\n#define SCE_MMIXAL_NUMBER 9\n#define SCE_MMIXAL_REF 10\n#define SCE_MMIXAL_CHAR 11\n#define SCE_MMIXAL_STRING 12\n#define SCE_MMIXAL_REGISTER 13\n#define SCE_MMIXAL_HEX 14\n#define SCE_MMIXAL_OPERATOR 15\n#define SCE_MMIXAL_SYMBOL 16\n#define SCE_MMIXAL_INCLUDE 17\n#define SCE_CLW_DEFAULT 0\n#define SCE_CLW_LABEL 1\n#define SCE_CLW_COMMENT 2\n#define SCE_CLW_STRING 3\n#define SCE_CLW_USER_IDENTIFIER 4\n#define SCE_CLW_INTEGER_CONSTANT 5\n#define SCE_CLW_REAL_CONSTANT 6\n#define SCE_CLW_PICTURE_STRING 7\n#define SCE_CLW_KEYWORD 8\n#define SCE_CLW_COMPILER_DIRECTIVE 9\n#define SCE_CLW_RUNTIME_EXPRESSIONS 10\n#define SCE_CLW_BUILTIN_PROCEDURES_FUNCTION 11\n#define SCE_CLW_STRUCTURE_DATA_TYPE 12\n#define SCE_CLW_ATTRIBUTE 13\n#define SCE_CLW_STANDARD_EQUATE 14\n#define SCE_CLW_ERROR 15\n#define SCE_CLW_DEPRECATED 16\n#define SCE_LOT_DEFAULT 0\n#define SCE_LOT_HEADER 1\n#define SCE_LOT_BREAK 2\n#define SCE_LOT_SET 3\n#define SCE_LOT_PASS 4\n#define SCE_LOT_FAIL 5\n#define SCE_LOT_ABORT 6\n#define SCE_YAML_DEFAULT 0\n#define SCE_YAML_COMMENT 1\n#define SCE_YAML_IDENTIFIER 2\n#define SCE_YAML_KEYWORD 3\n#define SCE_YAML_NUMBER 4\n#define SCE_YAML_REFERENCE 5\n#define SCE_YAML_DOCUMENT 6\n#define SCE_YAML_TEXT 7\n#define SCE_YAML_ERROR 8\n#define SCE_YAML_OPERATOR 9\n#define SCE_TEX_DEFAULT 0\n#define SCE_TEX_SPECIAL 1\n#define SCE_TEX_GROUP 2\n#define SCE_TEX_SYMBOL 3\n#define SCE_TEX_COMMAND 4\n#define SCE_TEX_TEXT 5\n#define SCE_METAPOST_DEFAULT 0\n#define SCE_METAPOST_SPECIAL 1\n#define SCE_METAPOST_GROUP 2\n#define SCE_METAPOST_SYMBOL 3\n#define SCE_METAPOST_COMMAND 4\n#define SCE_METAPOST_TEXT 5\n#define SCE_METAPOST_EXTRA 6\n#define SCE_ERLANG_DEFAULT 0\n#define SCE_ERLANG_COMMENT 1\n#define SCE_ERLANG_VARIABLE 2\n#define SCE_ERLANG_NUMBER 3\n#define SCE_ERLANG_KEYWORD 4\n#define SCE_ERLANG_STRING 5\n#define SCE_ERLANG_OPERATOR 6\n#define SCE_ERLANG_ATOM 7\n#define SCE_ERLANG_FUNCTION_NAME 8\n#define SCE_ERLANG_CHARACTER 9\n#define SCE_ERLANG_MACRO 10\n#define SCE_ERLANG_RECORD 11\n#define SCE_ERLANG_PREPROC 12\n#define SCE_ERLANG_NODE_NAME 13\n#define SCE_ERLANG_COMMENT_FUNCTION 14\n#define SCE_ERLANG_COMMENT_MODULE 15\n#define SCE_ERLANG_COMMENT_DOC 16\n#define SCE_ERLANG_COMMENT_DOC_MACRO 17\n#define SCE_ERLANG_ATOM_QUOTED 18\n#define SCE_ERLANG_MACRO_QUOTED 19\n#define SCE_ERLANG_RECORD_QUOTED 20\n#define SCE_ERLANG_NODE_NAME_QUOTED 21\n#define SCE_ERLANG_BIFS 22\n#define SCE_ERLANG_MODULES 23\n#define SCE_ERLANG_MODULES_ATT 24\n#define SCE_ERLANG_UNKNOWN 31\n#define SCE_JULIA_DEFAULT 0\n#define SCE_JULIA_COMMENT 1\n#define SCE_JULIA_NUMBER 2\n#define SCE_JULIA_KEYWORD1 3\n#define SCE_JULIA_KEYWORD2 4\n#define SCE_JULIA_KEYWORD3 5\n#define SCE_JULIA_CHAR 6\n#define SCE_JULIA_OPERATOR 7\n#define SCE_JULIA_BRACKET 8\n#define SCE_JULIA_IDENTIFIER 9\n#define SCE_JULIA_STRING 10\n#define SCE_JULIA_SYMBOL 11\n#define SCE_JULIA_MACRO 12\n#define SCE_JULIA_STRINGINTERP 13\n#define SCE_JULIA_DOCSTRING 14\n#define SCE_JULIA_STRINGLITERAL 15\n#define SCE_JULIA_COMMAND 16\n#define SCE_JULIA_COMMANDLITERAL 17\n#define SCE_JULIA_TYPEANNOT 18\n#define SCE_JULIA_LEXERROR 19\n#define SCE_JULIA_KEYWORD4 20\n#define SCE_JULIA_TYPEOPERATOR 21\n#define SCE_MSSQL_DEFAULT 0\n#define SCE_MSSQL_COMMENT 1\n#define SCE_MSSQL_LINE_COMMENT 2\n#define SCE_MSSQL_NUMBER 3\n#define SCE_MSSQL_STRING 4\n#define SCE_MSSQL_OPERATOR 5\n#define SCE_MSSQL_IDENTIFIER 6\n#define SCE_MSSQL_VARIABLE 7\n#define SCE_MSSQL_COLUMN_NAME 8\n#define SCE_MSSQL_STATEMENT 9\n#define SCE_MSSQL_DATATYPE 10\n#define SCE_MSSQL_SYSTABLE 11\n#define SCE_MSSQL_GLOBAL_VARIABLE 12\n#define SCE_MSSQL_FUNCTION 13\n#define SCE_MSSQL_STORED_PROCEDURE 14\n#define SCE_MSSQL_DEFAULT_PREF_DATATYPE 15\n#define SCE_MSSQL_COLUMN_NAME_2 16\n#define SCE_V_DEFAULT 0\n#define SCE_V_COMMENT 1\n#define SCE_V_COMMENTLINE 2\n#define SCE_V_COMMENTLINEBANG 3\n#define SCE_V_NUMBER 4\n#define SCE_V_WORD 5\n#define SCE_V_STRING 6\n#define SCE_V_WORD2 7\n#define SCE_V_WORD3 8\n#define SCE_V_PREPROCESSOR 9\n#define SCE_V_OPERATOR 10\n#define SCE_V_IDENTIFIER 11\n#define SCE_V_STRINGEOL 12\n#define SCE_V_USER 19\n#define SCE_V_COMMENT_WORD 20\n#define SCE_V_INPUT 21\n#define SCE_V_OUTPUT 22\n#define SCE_V_INOUT 23\n#define SCE_V_PORT_CONNECT 24\n#define SCE_KIX_DEFAULT 0\n#define SCE_KIX_COMMENT 1\n#define SCE_KIX_STRING1 2\n#define SCE_KIX_STRING2 3\n#define SCE_KIX_NUMBER 4\n#define SCE_KIX_VAR 5\n#define SCE_KIX_MACRO 6\n#define SCE_KIX_KEYWORD 7\n#define SCE_KIX_FUNCTIONS 8\n#define SCE_KIX_OPERATOR 9\n#define SCE_KIX_COMMENTSTREAM 10\n#define SCE_KIX_IDENTIFIER 31\n#define SCE_GC_DEFAULT 0\n#define SCE_GC_COMMENTLINE 1\n#define SCE_GC_COMMENTBLOCK 2\n#define SCE_GC_GLOBAL 3\n#define SCE_GC_EVENT 4\n#define SCE_GC_ATTRIBUTE 5\n#define SCE_GC_CONTROL 6\n#define SCE_GC_COMMAND 7\n#define SCE_GC_STRING 8\n#define SCE_GC_OPERATOR 9\n#define SCE_SN_DEFAULT 0\n#define SCE_SN_CODE 1\n#define SCE_SN_COMMENTLINE 2\n#define SCE_SN_COMMENTLINEBANG 3\n#define SCE_SN_NUMBER 4\n#define SCE_SN_WORD 5\n#define SCE_SN_STRING 6\n#define SCE_SN_WORD2 7\n#define SCE_SN_WORD3 8\n#define SCE_SN_PREPROCESSOR 9\n#define SCE_SN_OPERATOR 10\n#define SCE_SN_IDENTIFIER 11\n#define SCE_SN_STRINGEOL 12\n#define SCE_SN_REGEXTAG 13\n#define SCE_SN_SIGNAL 14\n#define SCE_SN_USER 19\n#define SCE_AU3_DEFAULT 0\n#define SCE_AU3_COMMENT 1\n#define SCE_AU3_COMMENTBLOCK 2\n#define SCE_AU3_NUMBER 3\n#define SCE_AU3_FUNCTION 4\n#define SCE_AU3_KEYWORD 5\n#define SCE_AU3_MACRO 6\n#define SCE_AU3_STRING 7\n#define SCE_AU3_OPERATOR 8\n#define SCE_AU3_VARIABLE 9\n#define SCE_AU3_SENT 10\n#define SCE_AU3_PREPROCESSOR 11\n#define SCE_AU3_SPECIAL 12\n#define SCE_AU3_EXPAND 13\n#define SCE_AU3_COMOBJ 14\n#define SCE_AU3_UDF 15\n#define SCE_APDL_DEFAULT 0\n#define SCE_APDL_COMMENT 1\n#define SCE_APDL_COMMENTBLOCK 2\n#define SCE_APDL_NUMBER 3\n#define SCE_APDL_STRING 4\n#define SCE_APDL_OPERATOR 5\n#define SCE_APDL_WORD 6\n#define SCE_APDL_PROCESSOR 7\n#define SCE_APDL_COMMAND 8\n#define SCE_APDL_SLASHCOMMAND 9\n#define SCE_APDL_STARCOMMAND 10\n#define SCE_APDL_ARGUMENT 11\n#define SCE_APDL_FUNCTION 12\n#define SCE_SH_DEFAULT 0\n#define SCE_SH_ERROR 1\n#define SCE_SH_COMMENTLINE 2\n#define SCE_SH_NUMBER 3\n#define SCE_SH_WORD 4\n#define SCE_SH_STRING 5\n#define SCE_SH_CHARACTER 6\n#define SCE_SH_OPERATOR 7\n#define SCE_SH_IDENTIFIER 8\n#define SCE_SH_SCALAR 9\n#define SCE_SH_PARAM 10\n#define SCE_SH_BACKTICKS 11\n#define SCE_SH_HERE_DELIM 12\n#define SCE_SH_HERE_Q 13\n#define SCE_ASN1_DEFAULT 0\n#define SCE_ASN1_COMMENT 1\n#define SCE_ASN1_IDENTIFIER 2\n#define SCE_ASN1_STRING 3\n#define SCE_ASN1_OID 4\n#define SCE_ASN1_SCALAR 5\n#define SCE_ASN1_KEYWORD 6\n#define SCE_ASN1_ATTRIBUTE 7\n#define SCE_ASN1_DESCRIPTOR 8\n#define SCE_ASN1_TYPE 9\n#define SCE_ASN1_OPERATOR 10\n#define SCE_VHDL_DEFAULT 0\n#define SCE_VHDL_COMMENT 1\n#define SCE_VHDL_COMMENTLINEBANG 2\n#define SCE_VHDL_NUMBER 3\n#define SCE_VHDL_STRING 4\n#define SCE_VHDL_OPERATOR 5\n#define SCE_VHDL_IDENTIFIER 6\n#define SCE_VHDL_STRINGEOL 7\n#define SCE_VHDL_KEYWORD 8\n#define SCE_VHDL_STDOPERATOR 9\n#define SCE_VHDL_ATTRIBUTE 10\n#define SCE_VHDL_STDFUNCTION 11\n#define SCE_VHDL_STDPACKAGE 12\n#define SCE_VHDL_STDTYPE 13\n#define SCE_VHDL_USERWORD 14\n#define SCE_VHDL_BLOCK_COMMENT 15\n#define SCE_CAML_DEFAULT 0\n#define SCE_CAML_IDENTIFIER 1\n#define SCE_CAML_TAGNAME 2\n#define SCE_CAML_KEYWORD 3\n#define SCE_CAML_KEYWORD2 4\n#define SCE_CAML_KEYWORD3 5\n#define SCE_CAML_LINENUM 6\n#define SCE_CAML_OPERATOR 7\n#define SCE_CAML_NUMBER 8\n#define SCE_CAML_CHAR 9\n#define SCE_CAML_WHITE 10\n#define SCE_CAML_STRING 11\n#define SCE_CAML_COMMENT 12\n#define SCE_CAML_COMMENT1 13\n#define SCE_CAML_COMMENT2 14\n#define SCE_CAML_COMMENT3 15\n#define SCE_HA_DEFAULT 0\n#define SCE_HA_IDENTIFIER 1\n#define SCE_HA_KEYWORD 2\n#define SCE_HA_NUMBER 3\n#define SCE_HA_STRING 4\n#define SCE_HA_CHARACTER 5\n#define SCE_HA_CLASS 6\n#define SCE_HA_MODULE 7\n#define SCE_HA_CAPITAL 8\n#define SCE_HA_DATA 9\n#define SCE_HA_IMPORT 10\n#define SCE_HA_OPERATOR 11\n#define SCE_HA_INSTANCE 12\n#define SCE_HA_COMMENTLINE 13\n#define SCE_HA_COMMENTBLOCK 14\n#define SCE_HA_COMMENTBLOCK2 15\n#define SCE_HA_COMMENTBLOCK3 16\n#define SCE_HA_PRAGMA 17\n#define SCE_HA_PREPROCESSOR 18\n#define SCE_HA_STRINGEOL 19\n#define SCE_HA_RESERVED_OPERATOR 20\n#define SCE_HA_LITERATE_COMMENT 21\n#define SCE_HA_LITERATE_CODEDELIM 22\n#define SCE_T3_DEFAULT 0\n#define SCE_T3_X_DEFAULT 1\n#define SCE_T3_PREPROCESSOR 2\n#define SCE_T3_BLOCK_COMMENT 3\n#define SCE_T3_LINE_COMMENT 4\n#define SCE_T3_OPERATOR 5\n#define SCE_T3_KEYWORD 6\n#define SCE_T3_NUMBER 7\n#define SCE_T3_IDENTIFIER 8\n#define SCE_T3_S_STRING 9\n#define SCE_T3_D_STRING 10\n#define SCE_T3_X_STRING 11\n#define SCE_T3_LIB_DIRECTIVE 12\n#define SCE_T3_MSG_PARAM 13\n#define SCE_T3_HTML_TAG 14\n#define SCE_T3_HTML_DEFAULT 15\n#define SCE_T3_HTML_STRING 16\n#define SCE_T3_USER1 17\n#define SCE_T3_USER2 18\n#define SCE_T3_USER3 19\n#define SCE_T3_BRACE 20\n#define SCE_REBOL_DEFAULT 0\n#define SCE_REBOL_COMMENTLINE 1\n#define SCE_REBOL_COMMENTBLOCK 2\n#define SCE_REBOL_PREFACE 3\n#define SCE_REBOL_OPERATOR 4\n#define SCE_REBOL_CHARACTER 5\n#define SCE_REBOL_QUOTEDSTRING 6\n#define SCE_REBOL_BRACEDSTRING 7\n#define SCE_REBOL_NUMBER 8\n#define SCE_REBOL_PAIR 9\n#define SCE_REBOL_TUPLE 10\n#define SCE_REBOL_BINARY 11\n#define SCE_REBOL_MONEY 12\n#define SCE_REBOL_ISSUE 13\n#define SCE_REBOL_TAG 14\n#define SCE_REBOL_FILE 15\n#define SCE_REBOL_EMAIL 16\n#define SCE_REBOL_URL 17\n#define SCE_REBOL_DATE 18\n#define SCE_REBOL_TIME 19\n#define SCE_REBOL_IDENTIFIER 20\n#define SCE_REBOL_WORD 21\n#define SCE_REBOL_WORD2 22\n#define SCE_REBOL_WORD3 23\n#define SCE_REBOL_WORD4 24\n#define SCE_REBOL_WORD5 25\n#define SCE_REBOL_WORD6 26\n#define SCE_REBOL_WORD7 27\n#define SCE_REBOL_WORD8 28\n#define SCE_SQL_DEFAULT 0\n#define SCE_SQL_COMMENT 1\n#define SCE_SQL_COMMENTLINE 2\n#define SCE_SQL_COMMENTDOC 3\n#define SCE_SQL_NUMBER 4\n#define SCE_SQL_WORD 5\n#define SCE_SQL_STRING 6\n#define SCE_SQL_CHARACTER 7\n#define SCE_SQL_SQLPLUS 8\n#define SCE_SQL_SQLPLUS_PROMPT 9\n#define SCE_SQL_OPERATOR 10\n#define SCE_SQL_IDENTIFIER 11\n#define SCE_SQL_SQLPLUS_COMMENT 13\n#define SCE_SQL_COMMENTLINEDOC 15\n#define SCE_SQL_WORD2 16\n#define SCE_SQL_COMMENTDOCKEYWORD 17\n#define SCE_SQL_COMMENTDOCKEYWORDERROR 18\n#define SCE_SQL_USER1 19\n#define SCE_SQL_USER2 20\n#define SCE_SQL_USER3 21\n#define SCE_SQL_USER4 22\n#define SCE_SQL_QUOTEDIDENTIFIER 23\n#define SCE_SQL_QOPERATOR 24\n#define SCE_ST_DEFAULT 0\n#define SCE_ST_STRING 1\n#define SCE_ST_NUMBER 2\n#define SCE_ST_COMMENT 3\n#define SCE_ST_SYMBOL 4\n#define SCE_ST_BINARY 5\n#define SCE_ST_BOOL 6\n#define SCE_ST_SELF 7\n#define SCE_ST_SUPER 8\n#define SCE_ST_NIL 9\n#define SCE_ST_GLOBAL 10\n#define SCE_ST_RETURN 11\n#define SCE_ST_SPECIAL 12\n#define SCE_ST_KWSEND 13\n#define SCE_ST_ASSIGN 14\n#define SCE_ST_CHARACTER 15\n#define SCE_ST_SPEC_SEL 16\n#define SCE_FS_DEFAULT 0\n#define SCE_FS_COMMENT 1\n#define SCE_FS_COMMENTLINE 2\n#define SCE_FS_COMMENTDOC 3\n#define SCE_FS_COMMENTLINEDOC 4\n#define SCE_FS_COMMENTDOCKEYWORD 5\n#define SCE_FS_COMMENTDOCKEYWORDERROR 6\n#define SCE_FS_KEYWORD 7\n#define SCE_FS_KEYWORD2 8\n#define SCE_FS_KEYWORD3 9\n#define SCE_FS_KEYWORD4 10\n#define SCE_FS_NUMBER 11\n#define SCE_FS_STRING 12\n#define SCE_FS_PREPROCESSOR 13\n#define SCE_FS_OPERATOR 14\n#define SCE_FS_IDENTIFIER 15\n#define SCE_FS_DATE 16\n#define SCE_FS_STRINGEOL 17\n#define SCE_FS_CONSTANT 18\n#define SCE_FS_WORDOPERATOR 19\n#define SCE_FS_DISABLEDCODE 20\n#define SCE_FS_DEFAULT_C 21\n#define SCE_FS_COMMENTDOC_C 22\n#define SCE_FS_COMMENTLINEDOC_C 23\n#define SCE_FS_KEYWORD_C 24\n#define SCE_FS_KEYWORD2_C 25\n#define SCE_FS_NUMBER_C 26\n#define SCE_FS_STRING_C 27\n#define SCE_FS_PREPROCESSOR_C 28\n#define SCE_FS_OPERATOR_C 29\n#define SCE_FS_IDENTIFIER_C 30\n#define SCE_FS_STRINGEOL_C 31\n#define SCE_CSOUND_DEFAULT 0\n#define SCE_CSOUND_COMMENT 1\n#define SCE_CSOUND_NUMBER 2\n#define SCE_CSOUND_OPERATOR 3\n#define SCE_CSOUND_INSTR 4\n#define SCE_CSOUND_IDENTIFIER 5\n#define SCE_CSOUND_OPCODE 6\n#define SCE_CSOUND_HEADERSTMT 7\n#define SCE_CSOUND_USERKEYWORD 8\n#define SCE_CSOUND_COMMENTBLOCK 9\n#define SCE_CSOUND_PARAM 10\n#define SCE_CSOUND_ARATE_VAR 11\n#define SCE_CSOUND_KRATE_VAR 12\n#define SCE_CSOUND_IRATE_VAR 13\n#define SCE_CSOUND_GLOBAL_VAR 14\n#define SCE_CSOUND_STRINGEOL 15\n#define SCE_INNO_DEFAULT 0\n#define SCE_INNO_COMMENT 1\n#define SCE_INNO_KEYWORD 2\n#define SCE_INNO_PARAMETER 3\n#define SCE_INNO_SECTION 4\n#define SCE_INNO_PREPROC 5\n#define SCE_INNO_INLINE_EXPANSION 6\n#define SCE_INNO_COMMENT_PASCAL 7\n#define SCE_INNO_KEYWORD_PASCAL 8\n#define SCE_INNO_KEYWORD_USER 9\n#define SCE_INNO_STRING_DOUBLE 10\n#define SCE_INNO_STRING_SINGLE 11\n#define SCE_INNO_IDENTIFIER 12\n#define SCE_OPAL_SPACE 0\n#define SCE_OPAL_COMMENT_BLOCK 1\n#define SCE_OPAL_COMMENT_LINE 2\n#define SCE_OPAL_INTEGER 3\n#define SCE_OPAL_KEYWORD 4\n#define SCE_OPAL_SORT 5\n#define SCE_OPAL_STRING 6\n#define SCE_OPAL_PAR 7\n#define SCE_OPAL_BOOL_CONST 8\n#define SCE_OPAL_DEFAULT 32\n#define SCE_SPICE_DEFAULT 0\n#define SCE_SPICE_IDENTIFIER 1\n#define SCE_SPICE_KEYWORD 2\n#define SCE_SPICE_KEYWORD2 3\n#define SCE_SPICE_KEYWORD3 4\n#define SCE_SPICE_NUMBER 5\n#define SCE_SPICE_DELIMITER 6\n#define SCE_SPICE_VALUE 7\n#define SCE_SPICE_COMMENTLINE 8\n#define SCE_CMAKE_DEFAULT 0\n#define SCE_CMAKE_COMMENT 1\n#define SCE_CMAKE_STRINGDQ 2\n#define SCE_CMAKE_STRINGLQ 3\n#define SCE_CMAKE_STRINGRQ 4\n#define SCE_CMAKE_COMMANDS 5\n#define SCE_CMAKE_PARAMETERS 6\n#define SCE_CMAKE_VARIABLE 7\n#define SCE_CMAKE_USERDEFINED 8\n#define SCE_CMAKE_WHILEDEF 9\n#define SCE_CMAKE_FOREACHDEF 10\n#define SCE_CMAKE_IFDEFINEDEF 11\n#define SCE_CMAKE_MACRODEF 12\n#define SCE_CMAKE_STRINGVAR 13\n#define SCE_CMAKE_NUMBER 14\n#define SCE_GAP_DEFAULT 0\n#define SCE_GAP_IDENTIFIER 1\n#define SCE_GAP_KEYWORD 2\n#define SCE_GAP_KEYWORD2 3\n#define SCE_GAP_KEYWORD3 4\n#define SCE_GAP_KEYWORD4 5\n#define SCE_GAP_STRING 6\n#define SCE_GAP_CHAR 7\n#define SCE_GAP_OPERATOR 8\n#define SCE_GAP_COMMENT 9\n#define SCE_GAP_NUMBER 10\n#define SCE_GAP_STRINGEOL 11\n#define SCE_PLM_DEFAULT 0\n#define SCE_PLM_COMMENT 1\n#define SCE_PLM_STRING 2\n#define SCE_PLM_NUMBER 3\n#define SCE_PLM_IDENTIFIER 4\n#define SCE_PLM_OPERATOR 5\n#define SCE_PLM_CONTROL 6\n#define SCE_PLM_KEYWORD 7\n#define SCE_ABL_DEFAULT 0\n#define SCE_ABL_NUMBER 1\n#define SCE_ABL_WORD 2\n#define SCE_ABL_STRING 3\n#define SCE_ABL_CHARACTER 4\n#define SCE_ABL_PREPROCESSOR 5\n#define SCE_ABL_OPERATOR 6\n#define SCE_ABL_IDENTIFIER 7\n#define SCE_ABL_BLOCK 8\n#define SCE_ABL_END 9\n#define SCE_ABL_COMMENT 10\n#define SCE_ABL_TASKMARKER 11\n#define SCE_ABL_LINECOMMENT 12\n#define SCE_ABAQUS_DEFAULT 0\n#define SCE_ABAQUS_COMMENT 1\n#define SCE_ABAQUS_COMMENTBLOCK 2\n#define SCE_ABAQUS_NUMBER 3\n#define SCE_ABAQUS_STRING 4\n#define SCE_ABAQUS_OPERATOR 5\n#define SCE_ABAQUS_WORD 6\n#define SCE_ABAQUS_PROCESSOR 7\n#define SCE_ABAQUS_COMMAND 8\n#define SCE_ABAQUS_SLASHCOMMAND 9\n#define SCE_ABAQUS_STARCOMMAND 10\n#define SCE_ABAQUS_ARGUMENT 11\n#define SCE_ABAQUS_FUNCTION 12\n#define SCE_ASY_DEFAULT 0\n#define SCE_ASY_COMMENT 1\n#define SCE_ASY_COMMENTLINE 2\n#define SCE_ASY_NUMBER 3\n#define SCE_ASY_WORD 4\n#define SCE_ASY_STRING 5\n#define SCE_ASY_CHARACTER 6\n#define SCE_ASY_OPERATOR 7\n#define SCE_ASY_IDENTIFIER 8\n#define SCE_ASY_STRINGEOL 9\n#define SCE_ASY_COMMENTLINEDOC 10\n#define SCE_ASY_WORD2 11\n#define SCE_R_DEFAULT 0\n#define SCE_R_COMMENT 1\n#define SCE_R_KWORD 2\n#define SCE_R_BASEKWORD 3\n#define SCE_R_OTHERKWORD 4\n#define SCE_R_NUMBER 5\n#define SCE_R_STRING 6\n#define SCE_R_STRING2 7\n#define SCE_R_OPERATOR 8\n#define SCE_R_IDENTIFIER 9\n#define SCE_R_INFIX 10\n#define SCE_R_INFIXEOL 11\n#define SCE_R_BACKTICKS 12\n#define SCE_R_RAWSTRING 13\n#define SCE_R_RAWSTRING2 14\n#define SCE_R_ESCAPESEQUENCE 15\n#define SCE_MAGIK_DEFAULT 0\n#define SCE_MAGIK_COMMENT 1\n#define SCE_MAGIK_HYPER_COMMENT 16\n#define SCE_MAGIK_STRING 2\n#define SCE_MAGIK_CHARACTER 3\n#define SCE_MAGIK_NUMBER 4\n#define SCE_MAGIK_IDENTIFIER 5\n#define SCE_MAGIK_OPERATOR 6\n#define SCE_MAGIK_FLOW 7\n#define SCE_MAGIK_CONTAINER 8\n#define SCE_MAGIK_BRACKET_BLOCK 9\n#define SCE_MAGIK_BRACE_BLOCK 10\n#define SCE_MAGIK_SQBRACKET_BLOCK 11\n#define SCE_MAGIK_UNKNOWN_KEYWORD 12\n#define SCE_MAGIK_KEYWORD 13\n#define SCE_MAGIK_PRAGMA 14\n#define SCE_MAGIK_SYMBOL 15\n#define SCE_POWERSHELL_DEFAULT 0\n#define SCE_POWERSHELL_COMMENT 1\n#define SCE_POWERSHELL_STRING 2\n#define SCE_POWERSHELL_CHARACTER 3\n#define SCE_POWERSHELL_NUMBER 4\n#define SCE_POWERSHELL_VARIABLE 5\n#define SCE_POWERSHELL_OPERATOR 6\n#define SCE_POWERSHELL_IDENTIFIER 7\n#define SCE_POWERSHELL_KEYWORD 8\n#define SCE_POWERSHELL_CMDLET 9\n#define SCE_POWERSHELL_ALIAS 10\n#define SCE_POWERSHELL_FUNCTION 11\n#define SCE_POWERSHELL_USER1 12\n#define SCE_POWERSHELL_COMMENTSTREAM 13\n#define SCE_POWERSHELL_HERE_STRING 14\n#define SCE_POWERSHELL_HERE_CHARACTER 15\n#define SCE_POWERSHELL_COMMENTDOCKEYWORD 16\n#define SCE_MYSQL_DEFAULT 0\n#define SCE_MYSQL_COMMENT 1\n#define SCE_MYSQL_COMMENTLINE 2\n#define SCE_MYSQL_VARIABLE 3\n#define SCE_MYSQL_SYSTEMVARIABLE 4\n#define SCE_MYSQL_KNOWNSYSTEMVARIABLE 5\n#define SCE_MYSQL_NUMBER 6\n#define SCE_MYSQL_MAJORKEYWORD 7\n#define SCE_MYSQL_KEYWORD 8\n#define SCE_MYSQL_DATABASEOBJECT 9\n#define SCE_MYSQL_PROCEDUREKEYWORD 10\n#define SCE_MYSQL_STRING 11\n#define SCE_MYSQL_SQSTRING 12\n#define SCE_MYSQL_DQSTRING 13\n#define SCE_MYSQL_OPERATOR 14\n#define SCE_MYSQL_FUNCTION 15\n#define SCE_MYSQL_IDENTIFIER 16\n#define SCE_MYSQL_QUOTEDIDENTIFIER 17\n#define SCE_MYSQL_USER1 18\n#define SCE_MYSQL_USER2 19\n#define SCE_MYSQL_USER3 20\n#define SCE_MYSQL_HIDDENCOMMAND 21\n#define SCE_MYSQL_PLACEHOLDER 22\n#define SCE_PO_DEFAULT 0\n#define SCE_PO_COMMENT 1\n#define SCE_PO_MSGID 2\n#define SCE_PO_MSGID_TEXT 3\n#define SCE_PO_MSGSTR 4\n#define SCE_PO_MSGSTR_TEXT 5\n#define SCE_PO_MSGCTXT 6\n#define SCE_PO_MSGCTXT_TEXT 7\n#define SCE_PO_FUZZY 8\n#define SCE_PO_PROGRAMMER_COMMENT 9\n#define SCE_PO_REFERENCE 10\n#define SCE_PO_FLAGS 11\n#define SCE_PO_MSGID_TEXT_EOL 12\n#define SCE_PO_MSGSTR_TEXT_EOL 13\n#define SCE_PO_MSGCTXT_TEXT_EOL 14\n#define SCE_PO_ERROR 15\n#define SCE_PAS_DEFAULT 0\n#define SCE_PAS_IDENTIFIER 1\n#define SCE_PAS_COMMENT 2\n#define SCE_PAS_COMMENT2 3\n#define SCE_PAS_COMMENTLINE 4\n#define SCE_PAS_PREPROCESSOR 5\n#define SCE_PAS_PREPROCESSOR2 6\n#define SCE_PAS_NUMBER 7\n#define SCE_PAS_HEXNUMBER 8\n#define SCE_PAS_WORD 9\n#define SCE_PAS_STRING 10\n#define SCE_PAS_STRINGEOL 11\n#define SCE_PAS_CHARACTER 12\n#define SCE_PAS_OPERATOR 13\n#define SCE_PAS_ASM 14\n#define SCE_SORCUS_DEFAULT 0\n#define SCE_SORCUS_COMMAND 1\n#define SCE_SORCUS_PARAMETER 2\n#define SCE_SORCUS_COMMENTLINE 3\n#define SCE_SORCUS_STRING 4\n#define SCE_SORCUS_STRINGEOL 5\n#define SCE_SORCUS_IDENTIFIER 6\n#define SCE_SORCUS_OPERATOR 7\n#define SCE_SORCUS_NUMBER 8\n#define SCE_SORCUS_CONSTANT 9\n#define SCE_POWERPRO_DEFAULT 0\n#define SCE_POWERPRO_COMMENTBLOCK 1\n#define SCE_POWERPRO_COMMENTLINE 2\n#define SCE_POWERPRO_NUMBER 3\n#define SCE_POWERPRO_WORD 4\n#define SCE_POWERPRO_WORD2 5\n#define SCE_POWERPRO_WORD3 6\n#define SCE_POWERPRO_WORD4 7\n#define SCE_POWERPRO_DOUBLEQUOTEDSTRING 8\n#define SCE_POWERPRO_SINGLEQUOTEDSTRING 9\n#define SCE_POWERPRO_LINECONTINUE 10\n#define SCE_POWERPRO_OPERATOR 11\n#define SCE_POWERPRO_IDENTIFIER 12\n#define SCE_POWERPRO_STRINGEOL 13\n#define SCE_POWERPRO_VERBATIM 14\n#define SCE_POWERPRO_ALTQUOTE 15\n#define SCE_POWERPRO_FUNCTION 16\n#define SCE_SML_DEFAULT 0\n#define SCE_SML_IDENTIFIER 1\n#define SCE_SML_TAGNAME 2\n#define SCE_SML_KEYWORD 3\n#define SCE_SML_KEYWORD2 4\n#define SCE_SML_KEYWORD3 5\n#define SCE_SML_LINENUM 6\n#define SCE_SML_OPERATOR 7\n#define SCE_SML_NUMBER 8\n#define SCE_SML_CHAR 9\n#define SCE_SML_STRING 11\n#define SCE_SML_COMMENT 12\n#define SCE_SML_COMMENT1 13\n#define SCE_SML_COMMENT2 14\n#define SCE_SML_COMMENT3 15\n#define SCE_MARKDOWN_DEFAULT 0\n#define SCE_MARKDOWN_LINE_BEGIN 1\n#define SCE_MARKDOWN_STRONG1 2\n#define SCE_MARKDOWN_STRONG2 3\n#define SCE_MARKDOWN_EM1 4\n#define SCE_MARKDOWN_EM2 5\n#define SCE_MARKDOWN_HEADER1 6\n#define SCE_MARKDOWN_HEADER2 7\n#define SCE_MARKDOWN_HEADER3 8\n#define SCE_MARKDOWN_HEADER4 9\n#define SCE_MARKDOWN_HEADER5 10\n#define SCE_MARKDOWN_HEADER6 11\n#define SCE_MARKDOWN_PRECHAR 12\n#define SCE_MARKDOWN_ULIST_ITEM 13\n#define SCE_MARKDOWN_OLIST_ITEM 14\n#define SCE_MARKDOWN_BLOCKQUOTE 15\n#define SCE_MARKDOWN_STRIKEOUT 16\n#define SCE_MARKDOWN_HRULE 17\n#define SCE_MARKDOWN_LINK 18\n#define SCE_MARKDOWN_CODE 19\n#define SCE_MARKDOWN_CODE2 20\n#define SCE_MARKDOWN_CODEBK 21\n#define SCE_TXT2TAGS_DEFAULT 0\n#define SCE_TXT2TAGS_LINE_BEGIN 1\n#define SCE_TXT2TAGS_STRONG1 2\n#define SCE_TXT2TAGS_STRONG2 3\n#define SCE_TXT2TAGS_EM1 4\n#define SCE_TXT2TAGS_EM2 5\n#define SCE_TXT2TAGS_HEADER1 6\n#define SCE_TXT2TAGS_HEADER2 7\n#define SCE_TXT2TAGS_HEADER3 8\n#define SCE_TXT2TAGS_HEADER4 9\n#define SCE_TXT2TAGS_HEADER5 10\n#define SCE_TXT2TAGS_HEADER6 11\n#define SCE_TXT2TAGS_PRECHAR 12\n#define SCE_TXT2TAGS_ULIST_ITEM 13\n#define SCE_TXT2TAGS_OLIST_ITEM 14\n#define SCE_TXT2TAGS_BLOCKQUOTE 15\n#define SCE_TXT2TAGS_STRIKEOUT 16\n#define SCE_TXT2TAGS_HRULE 17\n#define SCE_TXT2TAGS_LINK 18\n#define SCE_TXT2TAGS_CODE 19\n#define SCE_TXT2TAGS_CODE2 20\n#define SCE_TXT2TAGS_CODEBK 21\n#define SCE_TXT2TAGS_COMMENT 22\n#define SCE_TXT2TAGS_OPTION 23\n#define SCE_TXT2TAGS_PREPROC 24\n#define SCE_TXT2TAGS_POSTPROC 25\n#define SCE_A68K_DEFAULT 0\n#define SCE_A68K_COMMENT 1\n#define SCE_A68K_NUMBER_DEC 2\n#define SCE_A68K_NUMBER_BIN 3\n#define SCE_A68K_NUMBER_HEX 4\n#define SCE_A68K_STRING1 5\n#define SCE_A68K_OPERATOR 6\n#define SCE_A68K_CPUINSTRUCTION 7\n#define SCE_A68K_EXTINSTRUCTION 8\n#define SCE_A68K_REGISTER 9\n#define SCE_A68K_DIRECTIVE 10\n#define SCE_A68K_MACRO_ARG 11\n#define SCE_A68K_LABEL 12\n#define SCE_A68K_STRING2 13\n#define SCE_A68K_IDENTIFIER 14\n#define SCE_A68K_MACRO_DECLARATION 15\n#define SCE_A68K_COMMENT_WORD 16\n#define SCE_A68K_COMMENT_SPECIAL 17\n#define SCE_A68K_COMMENT_DOXYGEN 18\n#define SCE_MODULA_DEFAULT 0\n#define SCE_MODULA_COMMENT 1\n#define SCE_MODULA_DOXYCOMM 2\n#define SCE_MODULA_DOXYKEY 3\n#define SCE_MODULA_KEYWORD 4\n#define SCE_MODULA_RESERVED 5\n#define SCE_MODULA_NUMBER 6\n#define SCE_MODULA_BASENUM 7\n#define SCE_MODULA_FLOAT 8\n#define SCE_MODULA_STRING 9\n#define SCE_MODULA_STRSPEC 10\n#define SCE_MODULA_CHAR 11\n#define SCE_MODULA_CHARSPEC 12\n#define SCE_MODULA_PROC 13\n#define SCE_MODULA_PRAGMA 14\n#define SCE_MODULA_PRGKEY 15\n#define SCE_MODULA_OPERATOR 16\n#define SCE_MODULA_BADSTR 17\n#define SCE_COFFEESCRIPT_DEFAULT 0\n#define SCE_COFFEESCRIPT_COMMENT 1\n#define SCE_COFFEESCRIPT_COMMENTLINE 2\n#define SCE_COFFEESCRIPT_COMMENTDOC 3\n#define SCE_COFFEESCRIPT_NUMBER 4\n#define SCE_COFFEESCRIPT_WORD 5\n#define SCE_COFFEESCRIPT_STRING 6\n#define SCE_COFFEESCRIPT_CHARACTER 7\n#define SCE_COFFEESCRIPT_UUID 8\n#define SCE_COFFEESCRIPT_PREPROCESSOR 9\n#define SCE_COFFEESCRIPT_OPERATOR 10\n#define SCE_COFFEESCRIPT_IDENTIFIER 11\n#define SCE_COFFEESCRIPT_STRINGEOL 12\n#define SCE_COFFEESCRIPT_VERBATIM 13\n#define SCE_COFFEESCRIPT_REGEX 14\n#define SCE_COFFEESCRIPT_COMMENTLINEDOC 15\n#define SCE_COFFEESCRIPT_WORD2 16\n#define SCE_COFFEESCRIPT_COMMENTDOCKEYWORD 17\n#define SCE_COFFEESCRIPT_COMMENTDOCKEYWORDERROR 18\n#define SCE_COFFEESCRIPT_GLOBALCLASS 19\n#define SCE_COFFEESCRIPT_STRINGRAW 20\n#define SCE_COFFEESCRIPT_TRIPLEVERBATIM 21\n#define SCE_COFFEESCRIPT_COMMENTBLOCK 22\n#define SCE_COFFEESCRIPT_VERBOSE_REGEX 23\n#define SCE_COFFEESCRIPT_VERBOSE_REGEX_COMMENT 24\n#define SCE_COFFEESCRIPT_INSTANCEPROPERTY 25\n#define SCE_AVS_DEFAULT 0\n#define SCE_AVS_COMMENTBLOCK 1\n#define SCE_AVS_COMMENTBLOCKN 2\n#define SCE_AVS_COMMENTLINE 3\n#define SCE_AVS_NUMBER 4\n#define SCE_AVS_OPERATOR 5\n#define SCE_AVS_IDENTIFIER 6\n#define SCE_AVS_STRING 7\n#define SCE_AVS_TRIPLESTRING 8\n#define SCE_AVS_KEYWORD 9\n#define SCE_AVS_FILTER 10\n#define SCE_AVS_PLUGIN 11\n#define SCE_AVS_FUNCTION 12\n#define SCE_AVS_CLIPPROP 13\n#define SCE_AVS_USERDFN 14\n#define SCE_ECL_DEFAULT 0\n#define SCE_ECL_COMMENT 1\n#define SCE_ECL_COMMENTLINE 2\n#define SCE_ECL_NUMBER 3\n#define SCE_ECL_STRING 4\n#define SCE_ECL_WORD0 5\n#define SCE_ECL_OPERATOR 6\n#define SCE_ECL_CHARACTER 7\n#define SCE_ECL_UUID 8\n#define SCE_ECL_PREPROCESSOR 9\n#define SCE_ECL_UNKNOWN 10\n#define SCE_ECL_IDENTIFIER 11\n#define SCE_ECL_STRINGEOL 12\n#define SCE_ECL_VERBATIM 13\n#define SCE_ECL_REGEX 14\n#define SCE_ECL_COMMENTLINEDOC 15\n#define SCE_ECL_WORD1 16\n#define SCE_ECL_COMMENTDOCKEYWORD 17\n#define SCE_ECL_COMMENTDOCKEYWORDERROR 18\n#define SCE_ECL_WORD2 19\n#define SCE_ECL_WORD3 20\n#define SCE_ECL_WORD4 21\n#define SCE_ECL_WORD5 22\n#define SCE_ECL_COMMENTDOC 23\n#define SCE_ECL_ADDED 24\n#define SCE_ECL_DELETED 25\n#define SCE_ECL_CHANGED 26\n#define SCE_ECL_MOVED 27\n#define SCE_OSCRIPT_DEFAULT 0\n#define SCE_OSCRIPT_LINE_COMMENT 1\n#define SCE_OSCRIPT_BLOCK_COMMENT 2\n#define SCE_OSCRIPT_DOC_COMMENT 3\n#define SCE_OSCRIPT_PREPROCESSOR 4\n#define SCE_OSCRIPT_NUMBER 5\n#define SCE_OSCRIPT_SINGLEQUOTE_STRING 6\n#define SCE_OSCRIPT_DOUBLEQUOTE_STRING 7\n#define SCE_OSCRIPT_CONSTANT 8\n#define SCE_OSCRIPT_IDENTIFIER 9\n#define SCE_OSCRIPT_GLOBAL 10\n#define SCE_OSCRIPT_KEYWORD 11\n#define SCE_OSCRIPT_OPERATOR 12\n#define SCE_OSCRIPT_LABEL 13\n#define SCE_OSCRIPT_TYPE 14\n#define SCE_OSCRIPT_FUNCTION 15\n#define SCE_OSCRIPT_OBJECT 16\n#define SCE_OSCRIPT_PROPERTY 17\n#define SCE_OSCRIPT_METHOD 18\n#define SCE_VISUALPROLOG_DEFAULT 0\n#define SCE_VISUALPROLOG_KEY_MAJOR 1\n#define SCE_VISUALPROLOG_KEY_MINOR 2\n#define SCE_VISUALPROLOG_KEY_DIRECTIVE 3\n#define SCE_VISUALPROLOG_COMMENT_BLOCK 4\n#define SCE_VISUALPROLOG_COMMENT_LINE 5\n#define SCE_VISUALPROLOG_COMMENT_KEY 6\n#define SCE_VISUALPROLOG_COMMENT_KEY_ERROR 7\n#define SCE_VISUALPROLOG_IDENTIFIER 8\n#define SCE_VISUALPROLOG_VARIABLE 9\n#define SCE_VISUALPROLOG_ANONYMOUS 10\n#define SCE_VISUALPROLOG_NUMBER 11\n#define SCE_VISUALPROLOG_OPERATOR 12\n#define SCE_VISUALPROLOG_UNUSED1 13\n#define SCE_VISUALPROLOG_UNUSED2 14\n#define SCE_VISUALPROLOG_UNUSED3 15\n#define SCE_VISUALPROLOG_STRING_QUOTE 16\n#define SCE_VISUALPROLOG_STRING_ESCAPE 17\n#define SCE_VISUALPROLOG_STRING_ESCAPE_ERROR 18\n#define SCE_VISUALPROLOG_UNUSED4 19\n#define SCE_VISUALPROLOG_STRING 20\n#define SCE_VISUALPROLOG_UNUSED5 21\n#define SCE_VISUALPROLOG_STRING_EOL 22\n#define SCE_VISUALPROLOG_EMBEDDED 23\n#define SCE_VISUALPROLOG_PLACEHOLDER 24\n#define SCE_STTXT_DEFAULT 0\n#define SCE_STTXT_COMMENT 1\n#define SCE_STTXT_COMMENTLINE 2\n#define SCE_STTXT_KEYWORD 3\n#define SCE_STTXT_TYPE 4\n#define SCE_STTXT_FUNCTION 5\n#define SCE_STTXT_FB 6\n#define SCE_STTXT_NUMBER 7\n#define SCE_STTXT_HEXNUMBER 8\n#define SCE_STTXT_PRAGMA 9\n#define SCE_STTXT_OPERATOR 10\n#define SCE_STTXT_CHARACTER 11\n#define SCE_STTXT_STRING1 12\n#define SCE_STTXT_STRING2 13\n#define SCE_STTXT_STRINGEOL 14\n#define SCE_STTXT_IDENTIFIER 15\n#define SCE_STTXT_DATETIME 16\n#define SCE_STTXT_VARS 17\n#define SCE_STTXT_PRAGMAS 18\n#define SCE_KVIRC_DEFAULT 0\n#define SCE_KVIRC_COMMENT 1\n#define SCE_KVIRC_COMMENTBLOCK 2\n#define SCE_KVIRC_STRING 3\n#define SCE_KVIRC_WORD 4\n#define SCE_KVIRC_KEYWORD 5\n#define SCE_KVIRC_FUNCTION_KEYWORD 6\n#define SCE_KVIRC_FUNCTION 7\n#define SCE_KVIRC_VARIABLE 8\n#define SCE_KVIRC_NUMBER 9\n#define SCE_KVIRC_OPERATOR 10\n#define SCE_KVIRC_STRING_FUNCTION 11\n#define SCE_KVIRC_STRING_VARIABLE 12\n#define SCE_RUST_DEFAULT 0\n#define SCE_RUST_COMMENTBLOCK 1\n#define SCE_RUST_COMMENTLINE 2\n#define SCE_RUST_COMMENTBLOCKDOC 3\n#define SCE_RUST_COMMENTLINEDOC 4\n#define SCE_RUST_NUMBER 5\n#define SCE_RUST_WORD 6\n#define SCE_RUST_WORD2 7\n#define SCE_RUST_WORD3 8\n#define SCE_RUST_WORD4 9\n#define SCE_RUST_WORD5 10\n#define SCE_RUST_WORD6 11\n#define SCE_RUST_WORD7 12\n#define SCE_RUST_STRING 13\n#define SCE_RUST_STRINGR 14\n#define SCE_RUST_CHARACTER 15\n#define SCE_RUST_OPERATOR 16\n#define SCE_RUST_IDENTIFIER 17\n#define SCE_RUST_LIFETIME 18\n#define SCE_RUST_MACRO 19\n#define SCE_RUST_LEXERROR 20\n#define SCE_RUST_BYTESTRING 21\n#define SCE_RUST_BYTESTRINGR 22\n#define SCE_RUST_BYTECHARACTER 23\n#define SCE_DMAP_DEFAULT 0\n#define SCE_DMAP_COMMENT 1\n#define SCE_DMAP_NUMBER 2\n#define SCE_DMAP_STRING1 3\n#define SCE_DMAP_STRING2 4\n#define SCE_DMAP_STRINGEOL 5\n#define SCE_DMAP_OPERATOR 6\n#define SCE_DMAP_IDENTIFIER 7\n#define SCE_DMAP_WORD 8\n#define SCE_DMAP_WORD2 9\n#define SCE_DMAP_WORD3 10\n#define SCE_DMIS_DEFAULT 0\n#define SCE_DMIS_COMMENT 1\n#define SCE_DMIS_STRING 2\n#define SCE_DMIS_NUMBER 3\n#define SCE_DMIS_KEYWORD 4\n#define SCE_DMIS_MAJORWORD 5\n#define SCE_DMIS_MINORWORD 6\n#define SCE_DMIS_UNSUPPORTED_MAJOR 7\n#define SCE_DMIS_UNSUPPORTED_MINOR 8\n#define SCE_DMIS_LABEL 9\n#define SCE_REG_DEFAULT 0\n#define SCE_REG_COMMENT 1\n#define SCE_REG_VALUENAME 2\n#define SCE_REG_STRING 3\n#define SCE_REG_HEXDIGIT 4\n#define SCE_REG_VALUETYPE 5\n#define SCE_REG_ADDEDKEY 6\n#define SCE_REG_DELETEDKEY 7\n#define SCE_REG_ESCAPED 8\n#define SCE_REG_KEYPATH_GUID 9\n#define SCE_REG_STRING_GUID 10\n#define SCE_REG_PARAMETER 11\n#define SCE_REG_OPERATOR 12\n#define SCE_BIBTEX_DEFAULT 0\n#define SCE_BIBTEX_ENTRY 1\n#define SCE_BIBTEX_UNKNOWN_ENTRY 2\n#define SCE_BIBTEX_KEY 3\n#define SCE_BIBTEX_PARAMETER 4\n#define SCE_BIBTEX_VALUE 5\n#define SCE_BIBTEX_COMMENT 6\n#define SCE_HEX_DEFAULT 0\n#define SCE_HEX_RECSTART 1\n#define SCE_HEX_RECTYPE 2\n#define SCE_HEX_RECTYPE_UNKNOWN 3\n#define SCE_HEX_BYTECOUNT 4\n#define SCE_HEX_BYTECOUNT_WRONG 5\n#define SCE_HEX_NOADDRESS 6\n#define SCE_HEX_DATAADDRESS 7\n#define SCE_HEX_RECCOUNT 8\n#define SCE_HEX_STARTADDRESS 9\n#define SCE_HEX_ADDRESSFIELD_UNKNOWN 10\n#define SCE_HEX_EXTENDEDADDRESS 11\n#define SCE_HEX_DATA_ODD 12\n#define SCE_HEX_DATA_EVEN 13\n#define SCE_HEX_DATA_UNKNOWN 14\n#define SCE_HEX_DATA_EMPTY 15\n#define SCE_HEX_CHECKSUM 16\n#define SCE_HEX_CHECKSUM_WRONG 17\n#define SCE_HEX_GARBAGE 18\n#define SCE_JSON_DEFAULT 0\n#define SCE_JSON_NUMBER 1\n#define SCE_JSON_STRING 2\n#define SCE_JSON_STRINGEOL 3\n#define SCE_JSON_PROPERTYNAME 4\n#define SCE_JSON_ESCAPESEQUENCE 5\n#define SCE_JSON_LINECOMMENT 6\n#define SCE_JSON_BLOCKCOMMENT 7\n#define SCE_JSON_OPERATOR 8\n#define SCE_JSON_URI 9\n#define SCE_JSON_COMPACTIRI 10\n#define SCE_JSON_KEYWORD 11\n#define SCE_JSON_LDKEYWORD 12\n#define SCE_JSON_ERROR 13\n#define SCE_EDI_DEFAULT 0\n#define SCE_EDI_SEGMENTSTART 1\n#define SCE_EDI_SEGMENTEND 2\n#define SCE_EDI_SEP_ELEMENT 3\n#define SCE_EDI_SEP_COMPOSITE 4\n#define SCE_EDI_SEP_RELEASE 5\n#define SCE_EDI_UNA 6\n#define SCE_EDI_UNH 7\n#define SCE_EDI_BADSEGMENT 8\n#define SCE_STATA_DEFAULT 0\n#define SCE_STATA_COMMENT 1\n#define SCE_STATA_COMMENTLINE 2\n#define SCE_STATA_COMMENTBLOCK 3\n#define SCE_STATA_NUMBER 4\n#define SCE_STATA_OPERATOR 5\n#define SCE_STATA_IDENTIFIER 6\n#define SCE_STATA_STRING 7\n#define SCE_STATA_TYPE 8\n#define SCE_STATA_WORD 9\n#define SCE_STATA_GLOBAL_MACRO 10\n#define SCE_STATA_MACRO 11\n#define SCE_SAS_DEFAULT 0\n#define SCE_SAS_COMMENT 1\n#define SCE_SAS_COMMENTLINE 2\n#define SCE_SAS_COMMENTBLOCK 3\n#define SCE_SAS_NUMBER 4\n#define SCE_SAS_OPERATOR 5\n#define SCE_SAS_IDENTIFIER 6\n#define SCE_SAS_STRING 7\n#define SCE_SAS_TYPE 8\n#define SCE_SAS_WORD 9\n#define SCE_SAS_GLOBAL_MACRO 10\n#define SCE_SAS_MACRO 11\n#define SCE_SAS_MACRO_KEYWORD 12\n#define SCE_SAS_BLOCK_KEYWORD 13\n#define SCE_SAS_MACRO_FUNCTION 14\n#define SCE_SAS_STATEMENT 15\n#define SCE_NIM_DEFAULT 0\n#define SCE_NIM_COMMENT 1\n#define SCE_NIM_COMMENTDOC 2\n#define SCE_NIM_COMMENTLINE 3\n#define SCE_NIM_COMMENTLINEDOC 4\n#define SCE_NIM_NUMBER 5\n#define SCE_NIM_STRING 6\n#define SCE_NIM_CHARACTER 7\n#define SCE_NIM_WORD 8\n#define SCE_NIM_TRIPLE 9\n#define SCE_NIM_TRIPLEDOUBLE 10\n#define SCE_NIM_BACKTICKS 11\n#define SCE_NIM_FUNCNAME 12\n#define SCE_NIM_STRINGEOL 13\n#define SCE_NIM_NUMERROR 14\n#define SCE_NIM_OPERATOR 15\n#define SCE_NIM_IDENTIFIER 16\n#define SCE_CIL_DEFAULT 0\n#define SCE_CIL_COMMENT 1\n#define SCE_CIL_COMMENTLINE 2\n#define SCE_CIL_WORD 3\n#define SCE_CIL_WORD2 4\n#define SCE_CIL_WORD3 5\n#define SCE_CIL_STRING 6\n#define SCE_CIL_LABEL 7\n#define SCE_CIL_OPERATOR 8\n#define SCE_CIL_IDENTIFIER 9\n#define SCE_CIL_STRINGEOL 10\n#define SCE_X12_DEFAULT 0\n#define SCE_X12_BAD 1\n#define SCE_X12_ENVELOPE 2\n#define SCE_X12_FUNCTIONGROUP 3\n#define SCE_X12_TRANSACTIONSET 4\n#define SCE_X12_SEGMENTHEADER 5\n#define SCE_X12_SEGMENTEND 6\n#define SCE_X12_SEP_ELEMENT 7\n#define SCE_X12_SEP_SUBELEMENT 8\n#define SCE_DF_DEFAULT 0\n#define SCE_DF_IDENTIFIER 1\n#define SCE_DF_METATAG 2\n#define SCE_DF_IMAGE 3\n#define SCE_DF_COMMENTLINE 4\n#define SCE_DF_PREPROCESSOR 5\n#define SCE_DF_PREPROCESSOR2 6\n#define SCE_DF_NUMBER 7\n#define SCE_DF_HEXNUMBER 8\n#define SCE_DF_WORD 9\n#define SCE_DF_STRING 10\n#define SCE_DF_STRINGEOL 11\n#define SCE_DF_SCOPEWORD 12\n#define SCE_DF_OPERATOR 13\n#define SCE_DF_ICODE 14\n#define SCE_HOLLYWOOD_DEFAULT 0\n#define SCE_HOLLYWOOD_COMMENT 1\n#define SCE_HOLLYWOOD_COMMENTBLOCK 2\n#define SCE_HOLLYWOOD_NUMBER 3\n#define SCE_HOLLYWOOD_KEYWORD 4\n#define SCE_HOLLYWOOD_STDAPI 5\n#define SCE_HOLLYWOOD_PLUGINAPI 6\n#define SCE_HOLLYWOOD_PLUGINMETHOD 7\n#define SCE_HOLLYWOOD_STRING 8\n#define SCE_HOLLYWOOD_STRINGBLOCK 9\n#define SCE_HOLLYWOOD_PREPROCESSOR 10\n#define SCE_HOLLYWOOD_OPERATOR 11\n#define SCE_HOLLYWOOD_IDENTIFIER 12\n#define SCE_HOLLYWOOD_CONSTANT 13\n#define SCE_HOLLYWOOD_HEXNUMBER 14\n#define SCE_RAKU_DEFAULT 0\n#define SCE_RAKU_ERROR 1\n#define SCE_RAKU_COMMENTLINE 2\n#define SCE_RAKU_COMMENTEMBED 3\n#define SCE_RAKU_POD 4\n#define SCE_RAKU_CHARACTER 5\n#define SCE_RAKU_HEREDOC_Q 6\n#define SCE_RAKU_HEREDOC_QQ 7\n#define SCE_RAKU_STRING 8\n#define SCE_RAKU_STRING_Q 9\n#define SCE_RAKU_STRING_QQ 10\n#define SCE_RAKU_STRING_Q_LANG 11\n#define SCE_RAKU_STRING_VAR 12\n#define SCE_RAKU_REGEX 13\n#define SCE_RAKU_REGEX_VAR 14\n#define SCE_RAKU_ADVERB 15\n#define SCE_RAKU_NUMBER 16\n#define SCE_RAKU_PREPROCESSOR 17\n#define SCE_RAKU_OPERATOR 18\n#define SCE_RAKU_WORD 19\n#define SCE_RAKU_FUNCTION 20\n#define SCE_RAKU_IDENTIFIER 21\n#define SCE_RAKU_TYPEDEF 22\n#define SCE_RAKU_MU 23\n#define SCE_RAKU_POSITIONAL 24\n#define SCE_RAKU_ASSOCIATIVE 25\n#define SCE_RAKU_CALLABLE 26\n#define SCE_RAKU_GRAMMAR 27\n#define SCE_RAKU_CLASS 28\n#define SCE_FSHARP_DEFAULT 0\n#define SCE_FSHARP_KEYWORD 1\n#define SCE_FSHARP_KEYWORD2 2\n#define SCE_FSHARP_KEYWORD3 3\n#define SCE_FSHARP_KEYWORD4 4\n#define SCE_FSHARP_KEYWORD5 5\n#define SCE_FSHARP_IDENTIFIER 6\n#define SCE_FSHARP_QUOT_IDENTIFIER 7\n#define SCE_FSHARP_COMMENT 8\n#define SCE_FSHARP_COMMENTLINE 9\n#define SCE_FSHARP_PREPROCESSOR 10\n#define SCE_FSHARP_LINENUM 11\n#define SCE_FSHARP_OPERATOR 12\n#define SCE_FSHARP_NUMBER 13\n#define SCE_FSHARP_CHARACTER 14\n#define SCE_FSHARP_STRING 15\n#define SCE_FSHARP_VERBATIM 16\n#define SCE_FSHARP_QUOTATION 17\n#define SCE_FSHARP_ATTRIBUTE 18\n#define SCE_FSHARP_FORMAT_SPEC 19\n#define SCE_ASCIIDOC_DEFAULT 0\n#define SCE_ASCIIDOC_STRONG1 1\n#define SCE_ASCIIDOC_STRONG2 2\n#define SCE_ASCIIDOC_EM1 3\n#define SCE_ASCIIDOC_EM2 4\n#define SCE_ASCIIDOC_HEADER1 5\n#define SCE_ASCIIDOC_HEADER2 6\n#define SCE_ASCIIDOC_HEADER3 7\n#define SCE_ASCIIDOC_HEADER4 8\n#define SCE_ASCIIDOC_HEADER5 9\n#define SCE_ASCIIDOC_HEADER6 10\n#define SCE_ASCIIDOC_ULIST_ITEM 11\n#define SCE_ASCIIDOC_OLIST_ITEM 12\n#define SCE_ASCIIDOC_BLOCKQUOTE 13\n#define SCE_ASCIIDOC_LINK 14\n#define SCE_ASCIIDOC_CODEBK 15\n#define SCE_ASCIIDOC_PASSBK 16\n#define SCE_ASCIIDOC_COMMENT 17\n#define SCE_ASCIIDOC_COMMENTBK 18\n#define SCE_ASCIIDOC_LITERAL 19\n#define SCE_ASCIIDOC_LITERALBK 20\n#define SCE_ASCIIDOC_ATTRIB 21\n#define SCE_ASCIIDOC_ATTRIBVAL 22\n#define SCE_ASCIIDOC_MACRO 23\n#define SCE_GD_DEFAULT 0\n#define SCE_GD_COMMENTLINE 1\n#define SCE_GD_NUMBER 2\n#define SCE_GD_STRING 3\n#define SCE_GD_CHARACTER 4\n#define SCE_GD_WORD 5\n#define SCE_GD_TRIPLE 6\n#define SCE_GD_TRIPLEDOUBLE 7\n#define SCE_GD_CLASSNAME 8\n#define SCE_GD_FUNCNAME 9\n#define SCE_GD_OPERATOR 10\n#define SCE_GD_IDENTIFIER 11\n#define SCE_GD_COMMENTBLOCK 12\n#define SCE_GD_STRINGEOL 13\n#define SCE_GD_WORD2 14\n#define SCE_GD_ANNOTATION 15\n#define SCE_GD_NODEPATH 16\n/* --Autogenerated -- end of section automatically generated from Scintilla.iface */\n\n#endif\n"
  },
  {
    "path": "lexilla/lexers/LexA68k.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexA68k.cxx\n ** Lexer for Assembler, just for the MASM syntax\n ** Written by Martial Demolins AKA Folco\n **/\n// Copyright 2010 Martial Demolins <mdemolins(a)gmail.com>\n// The License.txt file describes the conditions under which this software\n// may be distributed.\n\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\n\n// Return values for GetOperatorType\n#define NO_OPERATOR     0\n#define OPERATOR_1CHAR  1\n#define OPERATOR_2CHAR  2\n\n\n/**\n *  IsIdentifierStart\n *\n *  Return true if the given char is a valid identifier first char\n */\n\nstatic inline bool IsIdentifierStart (const int ch)\n{\n    return (isalpha(ch) || (ch == '_') || (ch == '\\\\'));\n}\n\n\n/**\n *  IsIdentifierChar\n *\n *  Return true if the given char is a valid identifier char\n */\n\nstatic inline bool IsIdentifierChar (const int ch)\n{\n    return (isalnum(ch) || (ch == '_') || (ch == '@') || (ch == ':') || (ch == '.'));\n}\n\n\n/**\n *  GetOperatorType\n *\n *  Return:\n *  NO_OPERATOR     if char is not an operator\n *  OPERATOR_1CHAR  if the operator is one char long\n *  OPERATOR_2CHAR  if the operator is two chars long\n */\n\nstatic inline int GetOperatorType (const int ch1, const int ch2)\n{\n    int OpType = NO_OPERATOR;\n\n    if ((ch1 == '+') || (ch1 == '-') || (ch1 == '*') || (ch1 == '/') || (ch1 == '#') ||\n        (ch1 == '(') || (ch1 == ')') || (ch1 == '~') || (ch1 == '&') || (ch1 == '|') || (ch1 == ','))\n        OpType = OPERATOR_1CHAR;\n\n    else if ((ch1 == ch2) && (ch1 == '<' || ch1 == '>'))\n        OpType = OPERATOR_2CHAR;\n\n    return OpType;\n}\n\n\n/**\n *  IsBin\n *\n *  Return true if the given char is 0 or 1\n */\n\nstatic inline bool IsBin (const int ch)\n{\n    return (ch == '0') || (ch == '1');\n}\n\n\n/**\n *  IsDoxygenChar\n *\n *  Return true if the char may be part of a Doxygen keyword\n */\n\nstatic inline bool IsDoxygenChar (const int ch)\n{\n    return isalpha(ch) || (ch == '$') || (ch == '[') || (ch == ']') || (ch == '{') || (ch == '}');\n}\n\n\n/**\n *  ColouriseA68kDoc\n *\n *  Main function, which colourises a 68k source\n */\n\nstatic void ColouriseA68kDoc (Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[], Accessor &styler)\n{\n    // Used to buffer a string, to be able to compare it using built-in functions\n    char Buffer[100];\n\n\n    // Used to know the length of an operator\n    int OpType;\n\n\n    // Get references to keywords lists\n    WordList &cpuInstruction = *keywordlists[0];\n    WordList &registers = *keywordlists[1];\n    WordList &directive = *keywordlists[2];\n    WordList &extInstruction = *keywordlists[3];\n    WordList &alert          = *keywordlists[4];\n    WordList &doxygenKeyword = *keywordlists[5];\n\n\n    // Instanciate a context for our source\n    StyleContext sc(startPos, length, initStyle, styler);\n\n\n    /************************************************************\n    *\n    *   Parse the source\n    *\n    ************************************************************/\n\n    for ( ; sc.More(); sc.Forward())\n    {\n        /************************************************************\n        *\n        *   A style always terminates at the end of a line, even for\n        *   comments (no multi-lines comments)\n        *\n        ************************************************************/\n        if (sc.atLineStart) {\n            sc.SetState(SCE_A68K_DEFAULT);\n        }\n\n\n        /************************************************************\n        *\n        *   If we are not in \"default style\", check if the style continues\n        *   In this case, we just have to loop\n        *\n        ************************************************************/\n\n        if (sc.state != SCE_A68K_DEFAULT)\n        {\n            if (   ((sc.state == SCE_A68K_NUMBER_DEC)        && isdigit(sc.ch))                      // Decimal number\n                || ((sc.state == SCE_A68K_NUMBER_BIN) && IsBin(sc.ch))                                      // Binary number\n                || ((sc.state == SCE_A68K_NUMBER_HEX) && isxdigit(sc.ch))                                   // Hexa number\n                || ((sc.state == SCE_A68K_MACRO_ARG)         && isdigit(sc.ch))                      // Macro argument\n                || ((sc.state == SCE_A68K_STRING1)    && (sc.ch != '\\''))                                   // String single-quoted\n                || ((sc.state == SCE_A68K_STRING2)    && (sc.ch != '\\\"'))                                   // String double-quoted\n                || ((sc.state == SCE_A68K_MACRO_DECLARATION) && IsIdentifierChar(sc.ch))             // Macro declaration (or global label, we don't know at this point)\n                || ((sc.state == SCE_A68K_IDENTIFIER)        && IsIdentifierChar(sc.ch))             // Identifier\n                || ((sc.state == SCE_A68K_LABEL)             && IsIdentifierChar(sc.ch))             // Label (local)\n                || ((sc.state == SCE_A68K_COMMENT_DOXYGEN)   && IsDoxygenChar(sc.ch))                // Doxygen keyword\n                || ((sc.state == SCE_A68K_COMMENT_SPECIAL)   && isalpha(sc.ch))                      // Alert\n                || ((sc.state == SCE_A68K_COMMENT)           && !isalpha(sc.ch) && (sc.ch != '\\\\'))) // Normal comment\n            {\n                continue;\n            }\n\n        /************************************************************\n        *\n        *   Check if current state terminates\n        *\n        ************************************************************/\n\n            // Strings: include terminal ' or \" in the current string by skipping it\n            if ((sc.state == SCE_A68K_STRING1) || (sc.state == SCE_A68K_STRING2)) {\n                sc.Forward();\n                }\n\n\n            // If a macro declaration was terminated with ':', it was a label\n            else if ((sc.state == SCE_A68K_MACRO_DECLARATION) && (sc.chPrev == ':')) {\n                sc.ChangeState(SCE_A68K_LABEL);\n            }\n\n\n            // If it wasn't a Doxygen keyword, change it to normal comment\n            else if (sc.state == SCE_A68K_COMMENT_DOXYGEN) {\n                sc.GetCurrent(Buffer, sizeof(Buffer));\n                if (!doxygenKeyword.InList(Buffer)) {\n                    sc.ChangeState(SCE_A68K_COMMENT);\n                }\n                sc.SetState(SCE_A68K_COMMENT);\n                continue;\n            }\n\n\n            // If it wasn't an Alert, change it to normal comment\n            else if (sc.state == SCE_A68K_COMMENT_SPECIAL) {\n                sc.GetCurrent(Buffer, sizeof(Buffer));\n                if (!alert.InList(Buffer)) {\n                    sc.ChangeState(SCE_A68K_COMMENT);\n                }\n                // Reset style to normal comment, or to Doxygen keyword if it begins with '\\'\n                if (sc.ch == '\\\\') {\n                    sc.SetState(SCE_A68K_COMMENT_DOXYGEN);\n                }\n                else {\n                sc.SetState(SCE_A68K_COMMENT);\n                }\n                continue;\n            }\n\n\n            // If we are in a comment, it's a Doxygen keyword or an Alert\n            else if (sc.state == SCE_A68K_COMMENT) {\n                if (sc.ch == '\\\\') {\n                    sc.SetState(SCE_A68K_COMMENT_DOXYGEN);\n                }\n                else {\n                    sc.SetState(SCE_A68K_COMMENT_SPECIAL);\n                }\n                continue;\n            }\n\n\n            // Check if we are at the end of an identifier\n            // In this case, colourise it if was a keyword.\n            else if ((sc.state == SCE_A68K_IDENTIFIER) && !IsIdentifierChar(sc.ch)) {\n                sc.GetCurrentLowered(Buffer, sizeof(Buffer));                           // Buffer the string of the current context\n                if (cpuInstruction.InList(Buffer)) {                                    // And check if it belongs to a keyword list\n                    sc.ChangeState(SCE_A68K_CPUINSTRUCTION);\n                }\n                else if (extInstruction.InList(Buffer)) {\n                    sc.ChangeState(SCE_A68K_EXTINSTRUCTION);\n                }\n                else if (registers.InList(Buffer)) {\n                    sc.ChangeState(SCE_A68K_REGISTER);\n                }\n                else if (directive.InList(Buffer)) {\n                    sc.ChangeState(SCE_A68K_DIRECTIVE);\n                }\n            }\n\n            // All special contexts are now handled.Come back to default style\n            sc.SetState(SCE_A68K_DEFAULT);\n        }\n\n\n        /************************************************************\n        *\n        *   Check if we must enter a new state\n        *\n        ************************************************************/\n\n        // Something which begins at the beginning of a line, and with\n        // - '\\' + an identifier start char, or\n        // - '\\\\@' + an identifier start char\n        // is a local label (second case is used for macro local labels). We set it already as a label, it can't be a macro/equ declaration\n        if (sc.atLineStart && (sc.ch < 0x80) && IsIdentifierStart(sc.chNext) && (sc.ch == '\\\\')) {\n            sc.SetState(SCE_A68K_LABEL);\n        }\n\n        if (sc.atLineStart && (sc.ch < 0x80) && (sc.ch == '\\\\') && (sc.chNext == '\\\\')) {\n            sc.Forward(2);\n            if ((sc.ch == '@') && IsIdentifierStart(sc.chNext)) {\n                sc.ChangeState(SCE_A68K_LABEL);\n                sc.SetState(SCE_A68K_LABEL);\n            }\n        }\n\n        // Label and macro identifiers start at the beginning of a line\n        // We set both as a macro id, but if it wasn't one (':' at the end),\n        // it will be changed as a label.\n        if (sc.atLineStart && (sc.ch < 0x80) && IsIdentifierStart(sc.ch)) {\n            sc.SetState(SCE_A68K_MACRO_DECLARATION);\n        }\n        else if ((sc.ch < 0x80) && (sc.ch == ';')) {                            // Default: alert in a comment. If it doesn't match\n            sc.SetState(SCE_A68K_COMMENT);                                      // with an alert, it will be toggle to a normal comment\n        }\n        else if ((sc.ch < 0x80) && isdigit(sc.ch)) {                            // Decimal numbers haven't prefix\n            sc.SetState(SCE_A68K_NUMBER_DEC);\n        }\n        else if ((sc.ch < 0x80) && (sc.ch == '%')) {                            // Binary numbers are prefixed with '%'\n            sc.SetState(SCE_A68K_NUMBER_BIN);\n        }\n        else if ((sc.ch < 0x80) && (sc.ch == '$')) {                            // Hexadecimal numbers are prefixed with '$'\n            sc.SetState(SCE_A68K_NUMBER_HEX);\n        }\n        else if ((sc.ch < 0x80) && (sc.ch == '\\'')) {                           // String (single-quoted)\n            sc.SetState(SCE_A68K_STRING1);\n        }\n        else if ((sc.ch < 0x80) && (sc.ch == '\\\"')) {                           // String (double-quoted)\n            sc.SetState(SCE_A68K_STRING2);\n        }\n        else if ((sc.ch < 0x80) && (sc.ch == '\\\\') && (isdigit(sc.chNext))) {   // Replacement symbols in macro are prefixed with '\\'\n            sc.SetState(SCE_A68K_MACRO_ARG);\n        }\n        else if ((sc.ch < 0x80) && IsIdentifierStart(sc.ch)) {                  // An identifier: constant, label, etc...\n            sc.SetState(SCE_A68K_IDENTIFIER);\n        }\n        else {\n            if (sc.ch < 0x80) {\n                OpType = GetOperatorType(sc.ch, sc.chNext);                     // Check if current char is an operator\n                if (OpType != NO_OPERATOR) {\n                    sc.SetState(SCE_A68K_OPERATOR);\n                    if (OpType == OPERATOR_2CHAR) {                             // Check if the operator is 2 bytes long\n                        sc.ForwardSetState(SCE_A68K_OPERATOR);                  // (>> or <<)\n                    }\n                }\n            }\n        }\n    }                                                                           // End of for()\n    sc.Complete();\n}\n\n\n// Names of the keyword lists\n\nstatic const char * const a68kWordListDesc[] =\n{\n    \"CPU instructions\",\n    \"Registers\",\n    \"Directives\",\n    \"Extended instructions\",\n    \"Comment special words\",\n    \"Doxygen keywords\",\n    0\n};\n\nLexerModule lmA68k(SCLEX_A68K, ColouriseA68kDoc, \"a68k\", 0, a68kWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexAPDL.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexAPDL.cxx\n ** Lexer for APDL. Based on the lexer for Assembler by The Black Horus.\n ** By Hadar Raz.\n **/\n// Copyright 1998-2003 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nstatic inline bool IsAWordChar(const int ch) {\n\treturn (ch < 0x80 && (isalnum(ch) || ch == '_'));\n}\n\nstatic inline bool IsAnOperator(char ch) {\n\t// '.' left out as it is used to make up numbers\n\tif (ch == '*' || ch == '/' || ch == '-' || ch == '+' ||\n\t\tch == '(' || ch == ')' || ch == '=' || ch == '^' ||\n\t\tch == '[' || ch == ']' || ch == '<' || ch == '&' ||\n\t\tch == '>' || ch == ',' || ch == '|' || ch == '~' ||\n\t\tch == '$' || ch == ':' || ch == '%')\n\t\treturn true;\n\treturn false;\n}\n\nstatic void ColouriseAPDLDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[],\n                            Accessor &styler) {\n\n\tint stringStart = ' ';\n\n\tWordList &processors = *keywordlists[0];\n\tWordList &commands = *keywordlists[1];\n\tWordList &slashcommands = *keywordlists[2];\n\tWordList &starcommands = *keywordlists[3];\n\tWordList &arguments = *keywordlists[4];\n\tWordList &functions = *keywordlists[5];\n\n\t// Do not leak onto next line\n\tinitStyle = SCE_APDL_DEFAULT;\n\tStyleContext sc(startPos, length, initStyle, styler);\n\n\tfor (; sc.More(); sc.Forward()) {\n\t\t// Determine if the current state should terminate.\n\t\tif (sc.state == SCE_APDL_NUMBER) {\n\t\t\tif (!(IsADigit(sc.ch) || sc.ch == '.' || (sc.ch == 'e' || sc.ch == 'E') ||\n\t\t\t\t((sc.ch == '+' || sc.ch == '-') && (sc.chPrev == 'e' || sc.chPrev == 'E')))) {\n\t\t\t\tsc.SetState(SCE_APDL_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_APDL_COMMENT) {\n\t\t\tif (sc.atLineEnd) {\n\t\t\t\tsc.SetState(SCE_APDL_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_APDL_COMMENTBLOCK) {\n\t\t\tif (sc.atLineEnd) {\n\t\t\t\tif (sc.ch == '\\r') {\n\t\t\t\tsc.Forward();\n\t\t\t\t}\n\t\t\t\tsc.ForwardSetState(SCE_APDL_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_APDL_STRING) {\n\t\t\tif (sc.atLineEnd) {\n\t\t\t\tsc.SetState(SCE_APDL_DEFAULT);\n\t\t\t} else if ((sc.ch == '\\'' && stringStart == '\\'') || (sc.ch == '\\\"' && stringStart == '\\\"')) {\n\t\t\t\tsc.ForwardSetState(SCE_APDL_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_APDL_WORD) {\n\t\t\tif (!IsAWordChar(sc.ch)) {\n\t\t\t\tchar s[100];\n\t\t\t\tsc.GetCurrentLowered(s, sizeof(s));\n\t\t\t\tif (processors.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_APDL_PROCESSOR);\n\t\t\t\t} else if (slashcommands.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_APDL_SLASHCOMMAND);\n\t\t\t\t} else if (starcommands.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_APDL_STARCOMMAND);\n\t\t\t\t} else if (commands.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_APDL_COMMAND);\n\t\t\t\t} else if (arguments.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_APDL_ARGUMENT);\n\t\t\t\t} else if (functions.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_APDL_FUNCTION);\n\t\t\t\t}\n\t\t\t\tsc.SetState(SCE_APDL_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_APDL_OPERATOR) {\n\t\t\tif (!IsAnOperator(static_cast<char>(sc.ch))) {\n\t\t\t    sc.SetState(SCE_APDL_DEFAULT);\n\t\t\t}\n\t\t}\n\n\t\t// Determine if a new state should be entered.\n\t\tif (sc.state == SCE_APDL_DEFAULT) {\n\t\t\tif (sc.ch == '!' && sc.chNext == '!') {\n\t\t\t\tsc.SetState(SCE_APDL_COMMENTBLOCK);\n\t\t\t} else if (sc.ch == '!') {\n\t\t\t\tsc.SetState(SCE_APDL_COMMENT);\n\t\t\t} else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) {\n\t\t\t\tsc.SetState(SCE_APDL_NUMBER);\n\t\t\t} else if (sc.ch == '\\'' || sc.ch == '\\\"') {\n\t\t\t\tsc.SetState(SCE_APDL_STRING);\n\t\t\t\tstringStart = sc.ch;\n\t\t\t} else if (IsAWordChar(sc.ch) || ((sc.ch == '*' || sc.ch == '/') && !isgraph(sc.chPrev))) {\n\t\t\t\tsc.SetState(SCE_APDL_WORD);\n\t\t\t} else if (IsAnOperator(static_cast<char>(sc.ch))) {\n\t\t\t\tsc.SetState(SCE_APDL_OPERATOR);\n\t\t\t}\n\t\t}\n\t}\n\tsc.Complete();\n}\n\n//------------------------------------------------------------------------------\n// 06-27-07 Sergio Lucato\n// - Included code folding for Ansys APDL lexer\n// - Copyied from LexBasic.cxx and modified for APDL\n//------------------------------------------------------------------------------\n\n/* Bits:\n * 1  - whitespace\n * 2  - operator\n * 4  - identifier\n * 8  - decimal digit\n * 16 - hex digit\n * 32 - bin digit\n */\nstatic int character_classification[128] =\n{\n    0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  0,  0,  1,  0,  0,\n    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,\n    1,  2,  0,  2,  2,  2,  2,  2,  2,  2,  6,  2,  2,  2,  10, 6,\n    60, 60, 28, 28, 28, 28, 28, 28, 28, 28, 2,  2,  2,  2,  2,  2,\n    2,  20, 20, 20, 20, 20, 20, 4,  4,  4,  4,  4,  4,  4,  4,  4,\n    4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  2,  2,  2,  2,  4,\n    2,  20, 20, 20, 20, 20, 20, 4,  4,  4,  4,  4,  4,  4,  4,  4,\n    4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  2,  2,  2,  2,  0\n};\n\nstatic bool IsSpace(int c) {\n\treturn c < 128 && (character_classification[c] & 1);\n}\n\nstatic bool IsIdentifier(int c) {\n\treturn c < 128 && (character_classification[c] & 4);\n}\n\nstatic int LowerCase(int c)\n{\n\tif (c >= 'A' && c <= 'Z')\n\t\treturn 'a' + c - 'A';\n\treturn c;\n}\n\nstatic int CheckAPDLFoldPoint(char const *token, int &level) {\n\tif (!strcmp(token, \"*if\") ||\n\t\t!strcmp(token, \"*do\") ||\n\t\t!strcmp(token, \"*dowhile\") ) {\n\t\tlevel |= SC_FOLDLEVELHEADERFLAG;\n\t\treturn 1;\n\t}\n\tif (!strcmp(token, \"*endif\") ||\n\t\t!strcmp(token, \"*enddo\") ) {\n\t\treturn -1;\n\t}\n\treturn 0;\n}\n\nstatic void FoldAPDLDoc(Sci_PositionU startPos, Sci_Position length, int,\n\tWordList *[], Accessor &styler) {\n\n\tSci_Position line = styler.GetLine(startPos);\n\tint level = styler.LevelAt(line);\n\tint go = 0, done = 0;\n\tSci_Position endPos = startPos + length;\n\tchar word[256];\n\tint wordlen = 0;\n\tSci_Position i;\n    bool foldCompact = styler.GetPropertyInt(\"fold.compact\", 1) != 0;\n\t// Scan for tokens at the start of the line (they may include\n\t// whitespace, for tokens like \"End Function\"\n\tfor (i = startPos; i < endPos; i++) {\n\t\tint c = styler.SafeGetCharAt(i);\n\t\tif (!done && !go) {\n\t\t\tif (wordlen) { // are we scanning a token already?\n\t\t\t\tword[wordlen] = static_cast<char>(LowerCase(c));\n\t\t\t\tif (!IsIdentifier(c)) { // done with token\n\t\t\t\t\tword[wordlen] = '\\0';\n\t\t\t\t\tgo = CheckAPDLFoldPoint(word, level);\n\t\t\t\t\tif (!go) {\n\t\t\t\t\t\t// Treat any whitespace as single blank, for\n\t\t\t\t\t\t// things like \"End   Function\".\n\t\t\t\t\t\tif (IsSpace(c) && IsIdentifier(word[wordlen - 1])) {\n\t\t\t\t\t\t\tword[wordlen] = ' ';\n\t\t\t\t\t\t\tif (wordlen < 255)\n\t\t\t\t\t\t\t\twordlen++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse // done with this line\n\t\t\t\t\t\t\tdone = 1;\n\t\t\t\t\t}\n\t\t\t\t} else if (wordlen < 255) {\n\t\t\t\t\twordlen++;\n\t\t\t\t}\n\t\t\t} else { // start scanning at first non-whitespace character\n\t\t\t\tif (!IsSpace(c)) {\n\t\t\t\t\tif (IsIdentifier(c)) {\n\t\t\t\t\t\tword[0] = static_cast<char>(LowerCase(c));\n\t\t\t\t\t\twordlen = 1;\n\t\t\t\t\t} else // done with this line\n\t\t\t\t\t\tdone = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (c == '\\n') { // line end\n\t\t\tif (!done && wordlen == 0 && foldCompact) // line was only space\n\t\t\t\tlevel |= SC_FOLDLEVELWHITEFLAG;\n\t\t\tif (level != styler.LevelAt(line))\n\t\t\t\tstyler.SetLevel(line, level);\n\t\t\tlevel += go;\n\t\t\tline++;\n\t\t\t// reset state\n\t\t\twordlen = 0;\n\t\t\tlevel &= ~SC_FOLDLEVELHEADERFLAG;\n\t\t\tlevel &= ~SC_FOLDLEVELWHITEFLAG;\n\t\t\tgo = 0;\n\t\t\tdone = 0;\n\t\t}\n\t}\n}\n\nstatic const char * const apdlWordListDesc[] = {\n    \"processors\",\n    \"commands\",\n    \"slashommands\",\n    \"starcommands\",\n    \"arguments\",\n    \"functions\",\n    0\n};\n\nLexerModule lmAPDL(SCLEX_APDL, ColouriseAPDLDoc, \"apdl\", FoldAPDLDoc, apdlWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexASY.cxx",
    "content": "// Scintilla source code edit control\n// @file LexASY.cxx\n//Author: instanton (email: soft_share<at>126<dot>com)\n// This lexer is for the Asymptote vector graphics language\n// https://en.wikipedia.org/wiki/Asymptote_(vector_graphics_language)\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nstatic void ColouriseAsyDoc(Sci_PositionU startPos, Sci_Position length, int initStyle,\n\t\tWordList *keywordlists[], Accessor &styler) {\n\n\tWordList &keywords = *keywordlists[0];\n\tWordList &keywords2 = *keywordlists[1];\n\n\tCharacterSet setWordStart(CharacterSet::setAlpha, \"_\", 0x80, true);\n\tCharacterSet setWord(CharacterSet::setAlphaNum, \"._\", 0x80, true);\n\n\tint visibleChars = 0;\n\n\tStyleContext sc(startPos, length, initStyle, styler);\n\n\tfor (; sc.More(); sc.Forward()) {\n\n\t\tif (sc.atLineStart) {\n\t\t\tif (sc.state == SCE_ASY_STRING) {\n\t\t\t\tsc.SetState(SCE_ASY_STRING);\n\t\t\t}\n\t\t\tvisibleChars = 0;\n\t\t}\n\n\t\tif (sc.ch == '\\\\') {\n\t\t\tif (sc.chNext == '\\n' || sc.chNext == '\\r') {\n\t\t\t\tsc.Forward();\n\t\t\t\tif (sc.ch == '\\r' && sc.chNext == '\\n') {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t}\n//\t\t\t\tcontinuationLine = true;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\t// Determine if the current state should terminate.\n\t\tswitch (sc.state) {\n\t\t\tcase SCE_ASY_OPERATOR:\n\t\t\t\tsc.SetState(SCE_ASY_DEFAULT);\n\t\t\t\tbreak;\n\t\t\tcase SCE_ASY_NUMBER:\n\t\t\t\tif (!setWord.Contains(sc.ch)) {\n\t\t\t\t\tsc.SetState(SCE_ASY_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_ASY_IDENTIFIER:\n\t\t\t\tif (!setWord.Contains(sc.ch) || (sc.ch == '.')) {\n\t\t\t\t\tchar s[1000];\n\t\t\t\t\tsc.GetCurrentLowered(s, sizeof(s));\n\t\t\t\t\tif (keywords.InList(s)) {\n\t\t\t\t\t\tsc.ChangeState(SCE_ASY_WORD);\n\t\t\t\t\t} else if (keywords2.InList(s)) {\n\t\t\t\t\t\tsc.ChangeState(SCE_ASY_WORD2);\n\t\t\t\t\t}\n\t\t\t\t\tsc.SetState(SCE_ASY_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_ASY_COMMENT:\n\t\t\t\tif (sc.Match('*', '/')) {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\tsc.ForwardSetState(SCE_ASY_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_ASY_COMMENTLINE:\n\t\t\t\tif (sc.atLineStart) {\n\t\t\t\t\tsc.SetState(SCE_ASY_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_ASY_STRING:\n\t\t\t\tif (sc.atLineEnd) {\n\t\t\t\t\tsc.ChangeState(SCE_ASY_STRINGEOL);\n\t\t\t\t} else if (sc.ch == '\\\\') {\n\t\t\t\t\tif (sc.chNext == '\\\"' || sc.chNext == '\\'' || sc.chNext == '\\\\') {\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t}\n\t\t\t\t} else if (sc.ch == '\\\"') {\n\t\t\t\t\tsc.ForwardSetState(SCE_ASY_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_ASY_CHARACTER:\n\t\t\t\tif (sc.atLineEnd) {\n\t\t\t\t\tsc.ChangeState(SCE_ASY_STRINGEOL);\n\t\t\t\t} else \tif (sc.ch == '\\\\') {\n\t\t\t\t\tif (sc.chNext == '\\\"' || sc.chNext == '\\'' || sc.chNext == '\\\\') {\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t}\n\t\t\t\t} else if (sc.ch == '\\'') {\n\t\t\t\t\tsc.ForwardSetState(SCE_ASY_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// Determine if a new state should be entered.\n\t\tif (sc.state == SCE_ASY_DEFAULT) {\n\t\t\tif (setWordStart.Contains(sc.ch) || (sc.ch == '@')) {\n\t\t\t\tsc.SetState(SCE_ASY_IDENTIFIER);\n\t\t\t} else if (sc.Match('/', '*')) {\n\t\t\t\tsc.SetState(SCE_ASY_COMMENT);\n\t\t\t\tsc.Forward();\t//\n\t\t\t} else if (sc.Match('/', '/')) {\n\t\t\t\tsc.SetState(SCE_ASY_COMMENTLINE);\n\t\t\t} else if (sc.ch == '\\\"') {\n\t\t\t\tsc.SetState(SCE_ASY_STRING);\n\t\t\t} else if (sc.ch == '\\'') {\n\t\t\t\tsc.SetState(SCE_ASY_CHARACTER);\n\t\t\t} else if (sc.ch == '#' && visibleChars == 0) {\n\t\t\t\tdo {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t} while ((sc.ch == ' ' || sc.ch == '\\t') && sc.More());\n\t\t\t\tif (sc.atLineEnd) {\n\t\t\t\t\tsc.SetState(SCE_ASY_DEFAULT);\n\t\t\t\t}\n\t\t\t} else if (isoperator(static_cast<char>(sc.ch))) {\n\t\t\t\tsc.SetState(SCE_ASY_OPERATOR);\n\t\t\t}\n\t\t}\n\n\t}\n\tsc.Complete();\n}\n\nstatic bool IsAsyCommentStyle(int style) {\n\treturn style == SCE_ASY_COMMENT;\n}\n\n\nstatic inline bool isASYidentifier(int ch) {\n\treturn\n      ((ch >= 'a') && (ch <= 'z')) || ((ch >= 'A') && (ch <= 'Z')) ;\n}\n\nstatic int ParseASYWord(Sci_PositionU pos, Accessor &styler, char *word)\n{\n  int length=0;\n  char ch=styler.SafeGetCharAt(pos);\n  *word=0;\n\n  while(isASYidentifier(ch) && length<100){\n          word[length]=ch;\n          length++;\n          ch=styler.SafeGetCharAt(pos+length);\n  }\n  word[length]=0;\n  return length;\n}\n\nstatic bool IsASYDrawingLine(Sci_Position line, Accessor &styler) {\n\tSci_Position pos = styler.LineStart(line);\n\tSci_Position eol_pos = styler.LineStart(line + 1) - 1;\n\n\tSci_Position startpos = pos;\n\tchar buffer[100]=\"\";\n\n\twhile (startpos<eol_pos){\n\t\tchar ch = styler[startpos];\n\t\tParseASYWord(startpos,styler,buffer);\n\t\tbool drawcommands = strncmp(buffer,\"draw\",4)==0||\n\t\t\tstrncmp(buffer,\"pair\",4)==0||strncmp(buffer,\"label\",5)==0;\n\t\tif (!drawcommands && ch!=' ') return false;\n\t\telse if (drawcommands) return true;\n\t\tstartpos++;\n\t}\n\treturn false;\n}\n\nstatic void FoldAsyDoc(Sci_PositionU startPos, Sci_Position length, int initStyle,\n\t\t\t\t\t   WordList *[], Accessor &styler) {\n\tbool foldComment = styler.GetPropertyInt(\"fold.comment\") != 0;\n\tbool foldCompact = styler.GetPropertyInt(\"fold.compact\", 1) != 0;\n\tbool foldAtElse = styler.GetPropertyInt(\"fold.at.else\", 0) != 0;\n\tSci_PositionU endPos = startPos + length;\n\tint visibleChars = 0;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tint levelCurrent = SC_FOLDLEVELBASE;\n\tif (lineCurrent > 0)\n\t\tlevelCurrent = styler.LevelAt(lineCurrent-1) >> 16;\n\tint levelMinCurrent = levelCurrent;\n\tint levelNext = levelCurrent;\n\tchar chNext = styler[startPos];\n\tint styleNext = styler.StyleAt(startPos);\n\tint style = initStyle;\n\tfor (Sci_PositionU i = startPos; i < endPos; i++) {\n\t\tchar ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\tint stylePrev = style;\n\t\tstyle = styleNext;\n\t\tstyleNext = styler.StyleAt(i + 1);\n\t\tbool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n\t\tif (foldComment && IsAsyCommentStyle(style)) {\n\t\t\tif (!IsAsyCommentStyle(stylePrev) && (stylePrev != SCE_ASY_COMMENTLINEDOC)) {\n\t\t\t\tlevelNext++;\n\t\t\t} else if (!IsAsyCommentStyle(styleNext) && (styleNext != SCE_ASY_COMMENTLINEDOC) && !atEOL) {\n\t\t\t\tlevelNext--;\n\t\t\t}\n\t\t}\n\t\tif (style == SCE_ASY_OPERATOR) {\n\t\t\tif (ch == '{') {\n\t\t\t\tif (levelMinCurrent > levelNext) {\n\t\t\t\t\tlevelMinCurrent = levelNext;\n\t\t\t\t}\n\t\t\t\tlevelNext++;\n\t\t\t} else if (ch == '}') {\n\t\t\t\tlevelNext--;\n\t\t\t}\n\t\t}\n\n\t\tif (atEOL && IsASYDrawingLine(lineCurrent, styler)){\n\t\t\tif (lineCurrent==0 && IsASYDrawingLine(lineCurrent + 1, styler))\n\t\t\t\tlevelNext++;\n\t\t\telse if (lineCurrent!=0 && !IsASYDrawingLine(lineCurrent - 1, styler)\n\t\t\t\t&& IsASYDrawingLine(lineCurrent + 1, styler)\n\t\t\t\t)\n\t\t\t\tlevelNext++;\n\t\t\telse if (lineCurrent!=0 && IsASYDrawingLine(lineCurrent - 1, styler) &&\n\t\t\t\t!IsASYDrawingLine(lineCurrent+1, styler))\n\t\t\t\tlevelNext--;\n\t\t}\n\n\t\tif (atEOL) {\n\t\t\tint levelUse = levelCurrent;\n\t\t\tif (foldAtElse) {\n\t\t\t\tlevelUse = levelMinCurrent;\n\t\t\t}\n\t\t\tint lev = levelUse | levelNext << 16;\n\t\t\tif (visibleChars == 0 && foldCompact)\n\t\t\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\t\t\tif (levelUse < levelNext)\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\tif (lev != styler.LevelAt(lineCurrent)) {\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\t\t\t}\n\t\t\tlineCurrent++;\n\t\t\tlevelCurrent = levelNext;\n\t\t\tlevelMinCurrent = levelCurrent;\n\t\t\tvisibleChars = 0;\n\t\t}\n\t\tif (!IsASpace(ch))\n\t\t\tvisibleChars++;\n\t}\n}\n\nstatic const char * const asyWordLists[] = {\n            \"Primary keywords and identifiers\",\n            \"Secondary keywords and identifiers\",\n            0,\n        };\n\nLexerModule lmASY(SCLEX_ASYMPTOTE, ColouriseAsyDoc, \"asy\", FoldAsyDoc, asyWordLists);\n"
  },
  {
    "path": "lexilla/lexers/LexAU3.cxx",
    "content": "// Scintilla source code edit control\n// @file LexAU3.cxx\n// Lexer for AutoIt3 https://www.autoitscript.com/site/\n// by Jos van der Zande, jvdzande@yahoo.com\n//\n// Changes:\n// March 28, 2004 - Added the standard Folding code\n// April 21, 2004 - Added Preprosessor Table + Syntax Highlighting\n//                  Fixed Number highlighting\n//                  Changed default isoperator to IsAOperator to have a better match to AutoIt3\n//                  Fixed \"#comments_start\" -> \"#comments-start\"\n//                  Fixed \"#comments_end\" -> \"#comments-end\"\n//                  Fixed Sendkeys in Strings when not terminated with }\n//                  Added support for Sendkey strings that have second parameter e.g. {UP 5} or {a down}\n// April 26, 2004 - Fixed # pre-processor statement inside of comment block would invalidly change the color.\n//                  Added logic for #include <xyz.au3> to treat the <> as string\n//                  Added underscore to IsAOperator.\n// May 17, 2004   - Changed the folding logic from indent to keyword folding.\n//                  Added Folding logic for blocks of single-commentlines or commentblock.\n//                        triggered by: fold.comment=1\n//                  Added Folding logic for preprocessor blocks triggered by fold.preprocessor=1\n//                  Added Special for #region - #endregion syntax highlight and folding.\n// May 30, 2004   - Fixed issue with continuation lines on If statements.\n// June 5, 2004   - Added comma to Operators for better readability.\n//                  Added fold.compact support set with fold.compact=1\n//                  Changed folding inside of #cs-#ce. Default is no keyword folding inside comment blocks when fold.comment=1\n//                        it will now only happen when fold.comment=2.\n// Sep 5, 2004    - Added logic to handle colourizing words on the last line.\n//                        Typed Characters now show as \"default\" till they match any table.\n// Oct 10, 2004   - Added logic to show Comments in \"Special\" directives.\n// Nov  1, 2004   - Added better testing for Numbers supporting x and e notation.\n// Nov 28, 2004   - Added logic to handle continuation lines for syntax highlighting.\n// Jan 10, 2005   - Added Abbreviations Keyword used for expansion\n// Mar 24, 2005   - Updated Abbreviations Keywords to fix when followed by Operator.\n// Apr 18, 2005   - Updated #CE/#Comment-End logic to take a linecomment \";\" into account\n//                - Added folding support for With...EndWith\n//                - Added support for a DOT in variable names\n//                - Fixed Underscore in CommentBlock\n// May 23, 2005   - Fixed the SentKey lexing in case of a missing }\n// Aug 11, 2005   - Fixed possible bug with s_save length > 100.\n// Aug 23, 2005   - Added Switch/endswitch support to the folding logic.\n// Sep 27, 2005   - Fixed the SentKey lexing logic in case of multiple sentkeys.\n// Mar 12, 2006   - Fixed issue with <> coloring as String in stead of Operator in rare occasions.\n// Apr  8, 2006   - Added support for AutoIt3 Standard UDF library (SCE_AU3_UDF)\n// Mar  9, 2007   - Fixed bug with + following a String getting the wrong Color.\n// Jun 20, 2007   - Fixed Commentblock issue when LF's are used as EOL.\n// Jul 26, 2007   - Fixed #endregion undetected bug.\n//\n// Copyright for Scintilla: 1998-2001 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n// Scintilla source code edit control\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nstatic inline bool IsTypeCharacter(const int ch)\n{\n    return ch == '$';\n}\nstatic inline bool IsAWordChar(const int ch)\n{\n    return (ch < 0x80) && (isalnum(ch) || ch == '_');\n}\n\nstatic inline bool IsAWordStart(const int ch)\n{\n    return (ch < 0x80) && (isalnum(ch) || ch == '_' || ch == '@' || ch == '#' || ch == '$' || ch == '.');\n}\n\nstatic inline bool IsAOperator(char ch) {\n\tif (IsASCII(ch) && isalnum(ch))\n\t\treturn false;\n\tif (ch == '+' || ch == '-' || ch == '*' || ch == '/' ||\n\t    ch == '&' || ch == '^' || ch == '=' || ch == '<' || ch == '>' ||\n\t    ch == '(' || ch == ')' || ch == '[' || ch == ']' || ch == ',' )\n\t\treturn true;\n\treturn false;\n}\n\n///////////////////////////////////////////////////////////////////////////////\n// GetSendKey() filters the portion before and after a/multiple space(s)\n// and return the first portion to be looked-up in the table\n// also check if the second portion is valid... (up,down.on.off,toggle or a number)\n///////////////////////////////////////////////////////////////////////////////\n\nstatic int GetSendKey(const char *szLine, char *szKey)\n{\n\tint\t\tnFlag\t= 0;\n\tint\t\tnStartFound\t= 0;\n\tint\t\tnKeyPos\t= 0;\n\tint\t\tnSpecPos= 0;\n\tint\t\tnSpecNum= 1;\n\tint\t\tnPos\t= 0;\n\tchar\tcTemp;\n\tchar\tszSpecial[100];\n\n\t// split the portion of the sendkey in the part before and after the spaces\n\twhile ( ( (cTemp = szLine[nPos]) != '\\0'))\n\t{\n\t\t// skip leading Ctrl/Shift/Alt state\n\t\tif (cTemp == '{') {\n\t\t\tnStartFound = 1;\n\t\t}\n\t\t//\n\t\tif (nStartFound == 1) {\n\t\t\tif ((cTemp == ' ') && (nFlag == 0) ) // get the stuff till first space\n\t\t\t{\n\t\t\t\tnFlag = 1;\n\t\t\t\t// Add } to the end of the first bit for table lookup later.\n\t\t\t\tszKey[nKeyPos++] = '}';\n\t\t\t}\n\t\t\telse if (cTemp == ' ')\n\t\t\t{\n\t\t\t\t// skip other spaces\n\t\t\t}\n\t\t\telse if (nFlag == 0)\n\t\t\t{\n\t\t\t\t// save first portion into var till space or } is hit\n\t\t\t\tszKey[nKeyPos++] = cTemp;\n\t\t\t}\n\t\t\telse if ((nFlag == 1) && (cTemp != '}'))\n\t\t\t{\n\t\t\t\t// Save second portion into var...\n\t\t\t\tszSpecial[nSpecPos++] = cTemp;\n\t\t\t\t// check if Second portion is all numbers for repeat fuction\n\t\t\t\tif (isdigit(cTemp) == false) {nSpecNum = 0;}\n\t\t\t}\n\t\t}\n\t\tnPos++;\t\t\t\t\t\t\t\t\t// skip to next char\n\n\t} // End While\n\n\n\t// Check if the second portion is either a number or one of these keywords\n\tszKey[nKeyPos] = '\\0';\n\tszSpecial[nSpecPos] = '\\0';\n\tif (strcmp(szSpecial,\"down\")== 0    || strcmp(szSpecial,\"up\")== 0  ||\n\t\tstrcmp(szSpecial,\"on\")== 0      || strcmp(szSpecial,\"off\")== 0 ||\n\t\tstrcmp(szSpecial,\"toggle\")== 0  || nSpecNum == 1 )\n\t{\n\t\tnFlag = 0;\n\t}\n\telse\n\t{\n\t\tnFlag = 1;\n\t}\n\treturn nFlag;  // 1 is bad, 0 is good\n\n} // GetSendKey()\n\n//\n// Routine to check the last \"none comment\" character on a line to see if its a continuation\n//\nstatic bool IsContinuationLine(Sci_PositionU szLine, Accessor &styler)\n{\n\tSci_Position nsPos = styler.LineStart(szLine);\n\tSci_Position nePos = styler.LineStart(szLine+1) - 2;\n\t//int stylech = styler.StyleAt(nsPos);\n\twhile (nsPos < nePos)\n\t{\n\t\t//stylech = styler.StyleAt(nePos);\n\t\tint stylech = styler.StyleAt(nsPos);\n\t\tif (!(stylech == SCE_AU3_COMMENT)) {\n\t\t\tchar ch = styler.SafeGetCharAt(nePos);\n\t\t\tif (!isspacechar(ch)) {\n\t\t\t\tif (ch == '_')\n\t\t\t\t\treturn true;\n\t\t\t\telse\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tnePos--; // skip to next char\n\t} // End While\n\treturn false;\n} // IsContinuationLine()\n\n//\n// syntax highlighting logic\nstatic void ColouriseAU3Doc(Sci_PositionU startPos,\n\t\t\t\t\t\t\tSci_Position length, int initStyle,\n\t\t\t\t\t\t\tWordList *keywordlists[],\n\t\t\t\t\t\t\tAccessor &styler) {\n\n    WordList &keywords = *keywordlists[0];\n    WordList &keywords2 = *keywordlists[1];\n    WordList &keywords3 = *keywordlists[2];\n    WordList &keywords4 = *keywordlists[3];\n    WordList &keywords5 = *keywordlists[4];\n    WordList &keywords6 = *keywordlists[5];\n    WordList &keywords7 = *keywordlists[6];\n    WordList &keywords8 = *keywordlists[7];\n\t// find the first previous line without continuation character at the end\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tSci_Position s_startPos = startPos;\n\t// When not inside a Block comment: find First line without _\n\tif (!(initStyle==SCE_AU3_COMMENTBLOCK)) {\n\t\twhile ((lineCurrent > 0 && IsContinuationLine(lineCurrent,styler)) ||\n\t\t\t   (lineCurrent > 1 && IsContinuationLine(lineCurrent-1,styler))) {\n\t\t\tlineCurrent--;\n\t\t\tstartPos = styler.LineStart(lineCurrent); // get start position\n\t\t\tinitStyle =  0;                           // reset the start style to 0\n\t\t}\n\t}\n\t// Set the new length to include it from the start and set the start position\n\tlength = length + s_startPos - startPos;      // correct the total length to process\n    styler.StartAt(startPos);\n\n    StyleContext sc(startPos, length, initStyle, styler);\n\tchar si;     // string indicator \"=1 '=2\n\tchar ni;     // Numeric indicator error=9 normal=0 normal+dec=1 hex=2 Enot=3\n\tchar ci;     // comment indicator 0=not linecomment(;)\n\tchar s_save[100] = \"\";\n\tsi=0;\n\tni=0;\n\tci=0;\n\t//$$$\n    for (; sc.More(); sc.Forward()) {\n\t\tchar s[100];\n\t\tsc.GetCurrentLowered(s, sizeof(s));\n\t\t// **********************************************\n\t\t// save the total current word for eof processing\n\t\tif (IsAWordChar(sc.ch) || sc.ch == '}')\n\t\t{\n\t\t\tstrcpy(s_save,s);\n\t\t\tint tp = static_cast<int>(strlen(s_save));\n\t\t\tif (tp < 99) {\n\t\t\t\ts_save[tp] = static_cast<char>(tolower(sc.ch));\n\t\t\t\ts_save[tp+1] = '\\0';\n\t\t\t}\n\t\t}\n\t\t// **********************************************\n\t\t//\n\t\tswitch (sc.state)\n        {\n            case SCE_AU3_COMMENTBLOCK:\n            {\n\t\t\t\t//Reset at line end\n\t\t\t\tif (sc.atLineEnd) {\n\t\t\t\t\tci=0;\n\t\t\t\t\tif (strcmp(s, \"#ce\")== 0 || strcmp(s, \"#comments-end\")== 0) {\n\t\t\t\t\t\tif (sc.atLineEnd)\n\t\t\t\t\t\t\tsc.SetState(SCE_AU3_DEFAULT);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tsc.SetState(SCE_AU3_COMMENTBLOCK);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t//skip rest of line when a ; is encountered\n\t\t\t\tif (sc.chPrev == ';') {\n\t\t\t\t\tci=2;\n\t\t\t\t\tsc.SetState(SCE_AU3_COMMENTBLOCK);\n\t\t\t\t}\n\t\t\t\t// skip rest of the line\n\t\t\t\tif (ci==2)\n\t\t\t\t\tbreak;\n\t\t\t\t// check when first character is detected on the line\n\t\t\t\tif (ci==0) {\n\t\t\t\t\tif (IsAWordStart(static_cast<char>(sc.ch)) || IsAOperator(static_cast<char>(sc.ch))) {\n\t\t\t\t\t\tci=1;\n\t\t\t\t\t\tsc.SetState(SCE_AU3_COMMENTBLOCK);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (!(IsAWordChar(sc.ch) || (sc.ch == '-' && strcmp(s, \"#comments\") == 0))) {\n\t\t\t\t\tif ((strcmp(s, \"#ce\")== 0 || strcmp(s, \"#comments-end\")== 0))\n\t\t\t\t\t\t\tsc.SetState(SCE_AU3_COMMENT);  // set to comment line for the rest of the line\n\t\t\t\t\telse\n\t\t\t\t\t\tci=2;  // line doesn't begin with #CE so skip the rest of the line\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n            case SCE_AU3_COMMENT:\n            {\n                if (sc.atLineEnd) {sc.SetState(SCE_AU3_DEFAULT);}\n                break;\n            }\n            case SCE_AU3_OPERATOR:\n            {\n                // check if its a COMobject\n\t\t\t\tif (sc.chPrev == '.' && IsAWordChar(sc.ch)) {\n\t\t\t\t\tsc.SetState(SCE_AU3_COMOBJ);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tsc.SetState(SCE_AU3_DEFAULT);\n\t\t\t\t}\n                break;\n            }\n            case SCE_AU3_SPECIAL:\n            {\n                if (sc.ch == ';') {sc.SetState(SCE_AU3_COMMENT);}\n\t\t\t\tif (sc.atLineEnd) {sc.SetState(SCE_AU3_DEFAULT);}\n                break;\n            }\n            case SCE_AU3_KEYWORD:\n            {\n                if (!(IsAWordChar(sc.ch) || (sc.ch == '-' && (strcmp(s, \"#comments\") == 0 || strcmp(s, \"#include\") == 0))))\n                {\n                    if (!IsTypeCharacter(sc.ch))\n                    {\n\t\t\t\t\t\tif (strcmp(s, \"#cs\")== 0 || strcmp(s, \"#comments-start\")== 0 )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tsc.ChangeState(SCE_AU3_COMMENTBLOCK);\n\t\t\t\t\t\t\tsc.SetState(SCE_AU3_COMMENTBLOCK);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (keywords.InList(s)) {\n\t\t\t\t\t\t\tsc.ChangeState(SCE_AU3_KEYWORD);\n\t\t\t\t\t\t\tsc.SetState(SCE_AU3_DEFAULT);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (keywords2.InList(s)) {\n\t\t\t\t\t\t\tsc.ChangeState(SCE_AU3_FUNCTION);\n\t\t\t\t\t\t\tsc.SetState(SCE_AU3_DEFAULT);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (keywords3.InList(s)) {\n\t\t\t\t\t\t\tsc.ChangeState(SCE_AU3_MACRO);\n\t\t\t\t\t\t\tsc.SetState(SCE_AU3_DEFAULT);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (keywords5.InList(s)) {\n\t\t\t\t\t\t\tsc.ChangeState(SCE_AU3_PREPROCESSOR);\n\t\t\t\t\t\t\tsc.SetState(SCE_AU3_DEFAULT);\n\t\t\t\t\t\t\tif (strcmp(s, \"#include\")== 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tsi = 3;   // use to determine string start for #inlude <>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (keywords6.InList(s)) {\n\t\t\t\t\t\t\tsc.ChangeState(SCE_AU3_SPECIAL);\n\t\t\t\t\t\t\tsc.SetState(SCE_AU3_SPECIAL);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if ((keywords7.InList(s)) && (!IsAOperator(static_cast<char>(sc.ch)))) {\n\t\t\t\t\t\t\tsc.ChangeState(SCE_AU3_EXPAND);\n\t\t\t\t\t\t\tsc.SetState(SCE_AU3_DEFAULT);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (keywords8.InList(s)) {\n\t\t\t\t\t\t\tsc.ChangeState(SCE_AU3_UDF);\n\t\t\t\t\t\t\tsc.SetState(SCE_AU3_DEFAULT);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (strcmp(s, \"_\") == 0) {\n\t\t\t\t\t\t\tsc.ChangeState(SCE_AU3_OPERATOR);\n\t\t\t\t\t\t\tsc.SetState(SCE_AU3_DEFAULT);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (!IsAWordChar(sc.ch)) {\n\t\t\t\t\t\t\tsc.ChangeState(SCE_AU3_DEFAULT);\n\t\t\t\t\t\t\tsc.SetState(SCE_AU3_DEFAULT);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n                if (sc.atLineEnd) {\n\t\t\t\t\tsc.SetState(SCE_AU3_DEFAULT);}\n                break;\n            }\n\t\t\tcase SCE_AU3_NUMBER:\n            {\n\t\t\t\t// Numeric indicator error=9 normal=0 normal+dec=1 hex=2 E-not=3\n\t\t\t\t//\n\t\t\t\t// test for Hex notation\n\t\t\t\tif (strcmp(s, \"0\") == 0 && (sc.ch == 'x' || sc.ch == 'X') && ni == 0)\n\t\t\t\t{\n\t\t\t\t\tni = 2;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t// test for E notation\n\t\t\t\tif (IsADigit(sc.chPrev) && (sc.ch == 'e' || sc.ch == 'E') && ni <= 1)\n\t\t\t\t{\n\t\t\t\t\tni = 3;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t//  Allow Hex characters inside hex numeric strings\n\t\t\t\tif ((ni == 2) &&\n\t\t\t\t\t(sc.ch == 'a' || sc.ch == 'b' || sc.ch == 'c' || sc.ch == 'd' || sc.ch == 'e' || sc.ch == 'f' ||\n\t\t\t\t\t sc.ch == 'A' || sc.ch == 'B' || sc.ch == 'C' || sc.ch == 'D' || sc.ch == 'E' || sc.ch == 'F' ))\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t// test for 1 dec point only\n\t\t\t\tif (sc.ch == '.')\n\t\t\t\t{\n\t\t\t\t\tif (ni==0)\n\t\t\t\t\t{\n\t\t\t\t\t\tni=1;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tni=9;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t// end of numeric string ?\n\t\t\t\tif (!(IsADigit(sc.ch)))\n\t\t\t\t{\n\t\t\t\t\tif (ni==9)\n\t\t\t\t\t{\n\t\t\t\t\t\tsc.ChangeState(SCE_AU3_DEFAULT);\n\t\t\t\t\t}\n\t\t\t\t\tsc.SetState(SCE_AU3_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase SCE_AU3_VARIABLE:\n\t\t\t{\n\t\t\t\t// Check if its a COMObject\n\t\t\t\tif (sc.ch == '.' && !IsADigit(sc.chNext)) {\n\t\t\t\t\tsc.SetState(SCE_AU3_OPERATOR);\n\t\t\t\t}\n\t\t\t\telse if (!IsAWordChar(sc.ch)) {\n\t\t\t\t\tsc.SetState(SCE_AU3_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n            }\n\t\t\tcase SCE_AU3_COMOBJ:\n\t\t\t{\n\t\t\t\tif (!(IsAWordChar(sc.ch))) {\n\t\t\t\t\tsc.SetState(SCE_AU3_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n            }\n            case SCE_AU3_STRING:\n            {\n\t\t\t\t// check for \" to end a double qouted string or\n\t\t\t\t// check for ' to end a single qouted string\n\t            if ((si == 1 && sc.ch == '\\\"') || (si == 2 && sc.ch == '\\'') || (si == 3 && sc.ch == '>'))\n\t\t\t\t{\n\t\t\t\t\tsc.ForwardSetState(SCE_AU3_DEFAULT);\n\t\t\t\t\tsi=0;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n                if (sc.atLineEnd)\n\t\t\t\t{\n\t\t\t\t\tsi=0;\n\t\t\t\t\t// at line end and not found a continuation char then reset to default\n\t\t\t\t\tSci_Position lineCurrent = styler.GetLine(sc.currentPos);\n\t\t\t\t\tif (!IsContinuationLine(lineCurrent,styler))\n\t\t\t\t\t{\n\t\t\t\t\t\tsc.SetState(SCE_AU3_DEFAULT);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// find Sendkeys in a STRING\n\t\t\t\tif (sc.ch == '{' || sc.ch == '+' || sc.ch == '!' || sc.ch == '^' || sc.ch == '#' ) {\n\t\t\t\t\tsc.SetState(SCE_AU3_SENT);}\n\t\t\t\tbreak;\n            }\n\n            case SCE_AU3_SENT:\n            {\n\t\t\t\t// Send key string ended\n\t\t\t\tif (sc.chPrev == '}' && sc.ch != '}')\n\t\t\t\t{\n\t\t\t\t\t// set color to SENDKEY when valid sendkey .. else set back to regular string\n\t\t\t\t\tchar sk[100];\n\t\t\t\t\t// split {111 222} and return {111} and check if 222 is valid.\n\t\t\t\t\t// if return code = 1 then invalid 222 so must be string\n\t\t\t\t\tif (GetSendKey(s,sk))\n\t\t\t\t\t{\n\t\t\t\t\t\tsc.ChangeState(SCE_AU3_STRING);\n\t\t\t\t\t}\n\t\t\t\t\t// if single char between {?} then its ok as sendkey for a single character\n\t\t\t\t\telse if (strlen(sk) == 3)\n\t\t\t\t\t{\n\t\t\t\t\t\tsc.ChangeState(SCE_AU3_SENT);\n\t\t\t\t\t}\n\t\t\t\t\t// if sendkey {111} is in table then ok as sendkey\n\t\t\t\t\telse if (keywords4.InList(sk))\n\t\t\t\t\t{\n\t\t\t\t\t\tsc.ChangeState(SCE_AU3_SENT);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tsc.ChangeState(SCE_AU3_STRING);\n\t\t\t\t\t}\n\t\t\t\t\tsc.SetState(SCE_AU3_STRING);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// check if the start is a valid SendKey start\n\t\t\t\t\tSci_Position\t\tnPos\t= 0;\n\t\t\t\t\tint\t\tnState\t= 1;\n\t\t\t\t\tchar\tcTemp;\n\t\t\t\t\twhile (!(nState == 2) && ((cTemp = s[nPos]) != '\\0'))\n\t\t\t\t\t{\n\t\t\t\t\t\tif (cTemp == '{' && nState == 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tnState = 2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (nState == 1 && !(cTemp == '+' || cTemp == '!' || cTemp == '^' || cTemp == '#' ))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tnState = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnPos++;\n\t\t\t\t\t}\n\t\t\t\t\t//Verify characters infront of { ... if not assume  regular string\n\t\t\t\t\tif (nState == 1 && (!(sc.ch == '{' || sc.ch == '+' || sc.ch == '!' || sc.ch == '^' || sc.ch == '#' ))) {\n\t\t\t\t\t\tsc.ChangeState(SCE_AU3_STRING);\n\t\t\t\t\t\tsc.SetState(SCE_AU3_STRING);\n\t\t\t\t\t}\n\t\t\t\t\t// If invalid character found then assume its a regular string\n\t\t\t\t\tif (nState == 0) {\n\t\t\t\t\t\tsc.ChangeState(SCE_AU3_STRING);\n\t\t\t\t\t\tsc.SetState(SCE_AU3_STRING);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// check if next portion is again a sendkey\n\t\t\t\tif (sc.atLineEnd)\n\t\t\t\t{\n\t\t\t\t\tsc.ChangeState(SCE_AU3_STRING);\n\t\t\t\t\tsc.SetState(SCE_AU3_DEFAULT);\n\t\t\t\t\tsi = 0;  // reset string indicator\n\t\t\t\t}\n\t\t\t\t//* check in next characters following a sentkey are again a sent key\n\t\t\t\t// Need this test incase of 2 sentkeys like {F1}{ENTER} but not detect {{}\n\t\t\t\tif (sc.state == SCE_AU3_STRING && (sc.ch == '{' || sc.ch == '+' || sc.ch == '!' || sc.ch == '^' || sc.ch == '#' )) {\n\t\t\t\t\tsc.SetState(SCE_AU3_SENT);}\n\t\t\t\t// check to see if the string ended...\n\t\t\t\t// Sendkey string isn't complete but the string ended....\n\t\t\t\tif ((si == 1 && sc.ch == '\\\"') || (si == 2 && sc.ch == '\\''))\n\t\t\t\t{\n\t\t\t\t\tsc.ChangeState(SCE_AU3_STRING);\n\t\t\t\t\tsc.ForwardSetState(SCE_AU3_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n            }\n        }  //switch (sc.state)\n\n        // Determine if a new state should be entered:\n\n\t\tif (sc.state == SCE_AU3_DEFAULT)\n        {\n            if (sc.ch == ';') {sc.SetState(SCE_AU3_COMMENT);}\n            else if (sc.ch == '#') {sc.SetState(SCE_AU3_KEYWORD);}\n            else if (sc.ch == '$') {sc.SetState(SCE_AU3_VARIABLE);}\n            else if (sc.ch == '.' && !IsADigit(sc.chNext)) {sc.SetState(SCE_AU3_OPERATOR);}\n            else if (sc.ch == '@') {sc.SetState(SCE_AU3_KEYWORD);}\n            //else if (sc.ch == '_') {sc.SetState(SCE_AU3_KEYWORD);}\n            else if (sc.ch == '<' && si==3) {sc.SetState(SCE_AU3_STRING);}  // string after #include\n            else if (sc.ch == '\\\"') {\n\t\t\t\tsc.SetState(SCE_AU3_STRING);\n\t\t\t\tsi = 1;\t}\n            else if (sc.ch == '\\'') {\n\t\t\t\tsc.SetState(SCE_AU3_STRING);\n\t\t\t\tsi = 2;\t}\n            else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext)))\n\t\t\t{\n\t\t\t\tsc.SetState(SCE_AU3_NUMBER);\n\t\t\t\tni = 0;\n\t\t\t}\n            else if (IsAWordStart(sc.ch)) {sc.SetState(SCE_AU3_KEYWORD);}\n            else if (IsAOperator(static_cast<char>(sc.ch))) {sc.SetState(SCE_AU3_OPERATOR);}\n\t\t\telse if (sc.atLineEnd) {sc.SetState(SCE_AU3_DEFAULT);}\n        }\n    }      //for (; sc.More(); sc.Forward())\n\n\t//*************************************\n\t// Colourize the last word correctly\n\t//*************************************\n\tif (sc.state == SCE_AU3_KEYWORD)\n\t\t{\n\t\tif (strcmp(s_save, \"#cs\")== 0 || strcmp(s_save, \"#comments-start\")== 0 )\n\t\t{\n\t\t\tsc.ChangeState(SCE_AU3_COMMENTBLOCK);\n\t\t\tsc.SetState(SCE_AU3_COMMENTBLOCK);\n\t\t}\n\t\telse if (keywords.InList(s_save)) {\n\t\t\tsc.ChangeState(SCE_AU3_KEYWORD);\n\t\t\tsc.SetState(SCE_AU3_KEYWORD);\n\t\t}\n\t\telse if (keywords2.InList(s_save)) {\n\t\t\tsc.ChangeState(SCE_AU3_FUNCTION);\n\t\t\tsc.SetState(SCE_AU3_FUNCTION);\n\t\t}\n\t\telse if (keywords3.InList(s_save)) {\n\t\t\tsc.ChangeState(SCE_AU3_MACRO);\n\t\t\tsc.SetState(SCE_AU3_MACRO);\n\t\t}\n\t\telse if (keywords5.InList(s_save)) {\n\t\t\tsc.ChangeState(SCE_AU3_PREPROCESSOR);\n\t\t\tsc.SetState(SCE_AU3_PREPROCESSOR);\n\t\t}\n\t\telse if (keywords6.InList(s_save)) {\n\t\t\tsc.ChangeState(SCE_AU3_SPECIAL);\n\t\t\tsc.SetState(SCE_AU3_SPECIAL);\n\t\t}\n\t\telse if (keywords7.InList(s_save) && sc.atLineEnd) {\n\t\t\tsc.ChangeState(SCE_AU3_EXPAND);\n\t\t\tsc.SetState(SCE_AU3_EXPAND);\n\t\t}\n\t\telse if (keywords8.InList(s_save)) {\n\t\t\tsc.ChangeState(SCE_AU3_UDF);\n\t\t\tsc.SetState(SCE_AU3_UDF);\n\t\t}\n\t\telse {\n\t\t\tsc.ChangeState(SCE_AU3_DEFAULT);\n\t\t\tsc.SetState(SCE_AU3_DEFAULT);\n\t\t}\n\t}\n\tif (sc.state == SCE_AU3_SENT)\n    {\n\t\t// Send key string ended\n\t\tif (sc.chPrev == '}' && sc.ch != '}')\n\t\t{\n\t\t\t// set color to SENDKEY when valid sendkey .. else set back to regular string\n\t\t\tchar sk[100];\n\t\t\t// split {111 222} and return {111} and check if 222 is valid.\n\t\t\t// if return code = 1 then invalid 222 so must be string\n\t\t\tif (GetSendKey(s_save,sk))\n\t\t\t{\n\t\t\t\tsc.ChangeState(SCE_AU3_STRING);\n\t\t\t}\n\t\t\t// if single char between {?} then its ok as sendkey for a single character\n\t\t\telse if (strlen(sk) == 3)\n\t\t\t{\n\t\t\t\tsc.ChangeState(SCE_AU3_SENT);\n\t\t\t}\n\t\t\t// if sendkey {111} is in table then ok as sendkey\n\t\t\telse if (keywords4.InList(sk))\n\t\t\t{\n\t\t\t\tsc.ChangeState(SCE_AU3_SENT);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tsc.ChangeState(SCE_AU3_STRING);\n\t\t\t}\n\t\t\tsc.SetState(SCE_AU3_STRING);\n\t\t}\n\t\t// check if next portion is again a sendkey\n\t\tif (sc.atLineEnd)\n\t\t{\n\t\t\tsc.ChangeState(SCE_AU3_STRING);\n\t\t\tsc.SetState(SCE_AU3_DEFAULT);\n\t\t}\n    }\n\t//*************************************\n\tsc.Complete();\n}\n\n//\nstatic bool IsStreamCommentStyle(int style) {\n\treturn style == SCE_AU3_COMMENT || style == SCE_AU3_COMMENTBLOCK;\n}\n\n//\n// Routine to find first none space on the current line and return its Style\n// needed for comment lines not starting on pos 1\nstatic int GetStyleFirstWord(Sci_PositionU szLine, Accessor &styler)\n{\n\tSci_Position nsPos = styler.LineStart(szLine);\n\tSci_Position nePos = styler.LineStart(szLine+1) - 1;\n\twhile (isspacechar(styler.SafeGetCharAt(nsPos)) && nsPos < nePos)\n\t{\n\t\tnsPos++; // skip to next char\n\n\t} // End While\n\treturn styler.StyleAt(nsPos);\n\n} // GetStyleFirstWord()\n\n\n//\nstatic void FoldAU3Doc(Sci_PositionU startPos, Sci_Position length, int, WordList *[], Accessor &styler)\n{\n\tSci_Position endPos = startPos + length;\n\t// get settings from the config files for folding comments and preprocessor lines\n\tbool foldComment = styler.GetPropertyInt(\"fold.comment\") != 0;\n\tbool foldInComment = styler.GetPropertyInt(\"fold.comment\") == 2;\n\tbool foldCompact = styler.GetPropertyInt(\"fold.compact\", 1) != 0;\n\tbool foldpreprocessor = styler.GetPropertyInt(\"fold.preprocessor\") != 0;\n\t// Backtrack to previous line in case need to fix its fold status\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tif (startPos > 0) {\n\t\tif (lineCurrent > 0) {\n\t\t\tlineCurrent--;\n\t\t\tstartPos = styler.LineStart(lineCurrent);\n\t\t}\n\t}\n\t// vars for style of previous/current/next lines\n\tint style = GetStyleFirstWord(lineCurrent,styler);\n\tint stylePrev = 0;\n\t// find the first previous line without continuation character at the end\n\twhile ((lineCurrent > 0 && IsContinuationLine(lineCurrent,styler)) ||\n\t       (lineCurrent > 1 && IsContinuationLine(lineCurrent-1,styler))) {\n\t\tlineCurrent--;\n\t\tstartPos = styler.LineStart(lineCurrent);\n\t}\n\tif (lineCurrent > 0) {\n\t\tstylePrev = GetStyleFirstWord(lineCurrent-1,styler);\n\t}\n\t// vars for getting first word to check for keywords\n\tbool FirstWordStart = false;\n\tbool FirstWordEnd = false;\n\tchar szKeyword[11]=\"\";\n\tint\t szKeywordlen = 0;\n\tchar szThen[5]=\"\";\n\tint\t szThenlen = 0;\n\tbool ThenFoundLast = false;\n\t// var for indentlevel\n\tint levelCurrent = SC_FOLDLEVELBASE;\n\tif (lineCurrent > 0)\n\t\tlevelCurrent = styler.LevelAt(lineCurrent-1) >> 16;\n\tint levelNext = levelCurrent;\n\t//\n\tint\tvisibleChars = 0;\n\tchar chNext = styler.SafeGetCharAt(startPos);\n\tchar chPrev = ' ';\n\t//\n\tfor (Sci_Position i = startPos; i < endPos; i++) {\n\t\tchar ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\tif (IsAWordChar(ch)) {\n\t\t\tvisibleChars++;\n\t\t}\n\t\t// get the syle for the current character neede to check in comment\n\t\tint stylech = styler.StyleAt(i);\n\t\t// get first word for the line for indent check max 9 characters\n\t\tif (FirstWordStart && (!(FirstWordEnd))) {\n\t\t\tif (!IsAWordChar(ch)) {\n\t\t\t\tFirstWordEnd = true;\n\t\t\t\tszKeyword[szKeywordlen] = '\\0';\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (szKeywordlen < 10) {\n\t\t\t\tszKeyword[szKeywordlen++] = static_cast<char>(tolower(ch));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// start the capture of the first word\n\t\tif (!(FirstWordStart)) {\n\t\t\tif (IsAWordChar(ch) || IsAWordStart(ch) || ch == ';') {\n\t\t\t\tFirstWordStart = true;\n\t\t\t\tszKeyword[szKeywordlen++] = static_cast<char>(tolower(ch));\n\t\t\t}\n\t\t}\n\t\t// only process this logic when not in comment section\n\t\tif (!(stylech == SCE_AU3_COMMENT)) {\n\t\t\tif (ThenFoundLast) {\n\t\t\t\tif (IsAWordChar(ch)) {\n\t\t\t\t\tThenFoundLast = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// find out if the word \"then\" is the last on a \"if\" line\n\t\t\tif (FirstWordEnd && strcmp(szKeyword,\"if\") == 0) {\n\t\t\t\tif (szThenlen == 4) {\n\t\t\t\t\tszThen[0] = szThen[1];\n\t\t\t\t\tszThen[1] = szThen[2];\n\t\t\t\t\tszThen[2] = szThen[3];\n\t\t\t\t\tszThen[3] = static_cast<char>(tolower(ch));\n\t\t\t\t\tif (strcmp(szThen,\"then\") == 0 ) {\n\t\t\t\t\t\tThenFoundLast = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tszThen[szThenlen++] = static_cast<char>(tolower(ch));\n\t\t\t\t\tif (szThenlen == 5) {\n\t\t\t\t\t\tszThen[4] = '\\0';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// End of Line found so process the information\n\t\tif ((ch == '\\r' && chNext != '\\n') || (ch == '\\n') || (i == endPos)) {\n\t\t\t// **************************\n\t\t\t// Folding logic for Keywords\n\t\t\t// **************************\n\t\t\t// if a keyword is found on the current line and the line doesn't end with _ (continuation)\n\t\t\t//    and we are not inside a commentblock.\n\t\t\tif (szKeywordlen > 0 && (!(chPrev == '_')) &&\n\t\t\t\t((!(IsStreamCommentStyle(style)) || foldInComment)) ) {\n\t\t\t\tszKeyword[szKeywordlen] = '\\0';\n\t\t\t\t// only fold \"if\" last keyword is \"then\"  (else its a one line if)\n\t\t\t\tif (strcmp(szKeyword,\"if\") == 0  && ThenFoundLast) {\n\t\t\t\t\t\tlevelNext++;\n\t\t\t\t}\n\t\t\t\t// create new fold for these words\n\t\t\t\tif (strcmp(szKeyword,\"do\") == 0   || strcmp(szKeyword,\"for\") == 0 ||\n\t\t\t\t\tstrcmp(szKeyword,\"func\") == 0 || strcmp(szKeyword,\"while\") == 0||\n\t\t\t\t\tstrcmp(szKeyword,\"with\") == 0 || strcmp(szKeyword,\"#region\") == 0 ) {\n\t\t\t\t\t\tlevelNext++;\n\t\t\t\t}\n\t\t\t\t// create double Fold for select&switch because Case will subtract one of the current level\n\t\t\t\tif (strcmp(szKeyword,\"select\") == 0 || strcmp(szKeyword,\"switch\") == 0) {\n\t\t\t\t\t\tlevelNext++;\n\t\t\t\t\t\tlevelNext++;\n\t\t\t\t}\n\t\t\t\t// end the fold for these words before the current line\n\t\t\t\tif (strcmp(szKeyword,\"endfunc\") == 0 || strcmp(szKeyword,\"endif\") == 0 ||\n\t\t\t\t\tstrcmp(szKeyword,\"next\") == 0    || strcmp(szKeyword,\"until\") == 0 ||\n\t\t\t\t\tstrcmp(szKeyword,\"endwith\") == 0 ||strcmp(szKeyword,\"wend\") == 0){\n\t\t\t\t\t\tlevelNext--;\n\t\t\t\t\t\tlevelCurrent--;\n\t\t\t\t}\n\t\t\t\t// end the fold for these words before the current line and Start new fold\n\t\t\t\tif (strcmp(szKeyword,\"case\") == 0      || strcmp(szKeyword,\"else\") == 0 ||\n\t\t\t\t\tstrcmp(szKeyword,\"elseif\") == 0 ) {\n\t\t\t\t\t\tlevelCurrent--;\n\t\t\t\t}\n\t\t\t\t// end the double fold for this word before the current line\n\t\t\t\tif (strcmp(szKeyword,\"endselect\") == 0 || strcmp(szKeyword,\"endswitch\") == 0 ) {\n\t\t\t\t\t\tlevelNext--;\n\t\t\t\t\t\tlevelNext--;\n\t\t\t\t\t\tlevelCurrent--;\n\t\t\t\t\t\tlevelCurrent--;\n\t\t\t\t}\n\t\t\t\t// end the fold for these words on the current line\n\t\t\t\tif (strcmp(szKeyword,\"#endregion\") == 0 ) {\n\t\t\t\t\t\tlevelNext--;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Preprocessor and Comment folding\n\t\t\tint styleNext = GetStyleFirstWord(lineCurrent + 1,styler);\n\t\t\t// *************************************\n\t\t\t// Folding logic for preprocessor blocks\n\t\t\t// *************************************\n\t\t\t// process preprosessor line\n\t\t\tif (foldpreprocessor && style == SCE_AU3_PREPROCESSOR) {\n\t\t\t\tif (!(stylePrev == SCE_AU3_PREPROCESSOR) && (styleNext == SCE_AU3_PREPROCESSOR)) {\n\t\t\t\t    levelNext++;\n\t\t\t\t}\n\t\t\t\t// fold till the last line for normal comment lines\n\t\t\t\telse if (stylePrev == SCE_AU3_PREPROCESSOR && !(styleNext == SCE_AU3_PREPROCESSOR)) {\n\t\t\t\t\tlevelNext--;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// *********************************\n\t\t\t// Folding logic for Comment blocks\n\t\t\t// *********************************\n\t\t\tif (foldComment && IsStreamCommentStyle(style)) {\n\t\t\t\t// Start of a comment block\n\t\t\t\tif (!(stylePrev==style) && IsStreamCommentStyle(styleNext) && styleNext==style) {\n\t\t\t\t    levelNext++;\n\t\t\t\t}\n\t\t\t\t// fold till the last line for normal comment lines\n\t\t\t\telse if (IsStreamCommentStyle(stylePrev)\n\t\t\t\t\t\t&& !(styleNext == SCE_AU3_COMMENT)\n\t\t\t\t\t\t&& stylePrev == SCE_AU3_COMMENT\n\t\t\t\t\t\t&& style == SCE_AU3_COMMENT) {\n\t\t\t\t\tlevelNext--;\n\t\t\t\t}\n\t\t\t\t// fold till the one but last line for Blockcomment lines\n\t\t\t\telse if (IsStreamCommentStyle(stylePrev)\n\t\t\t\t\t\t&& !(styleNext == SCE_AU3_COMMENTBLOCK)\n\t\t\t\t\t\t&& style == SCE_AU3_COMMENTBLOCK) {\n\t\t\t\t\tlevelNext--;\n\t\t\t\t\tlevelCurrent--;\n\t\t\t\t}\n\t\t\t}\n\t\t\tint levelUse = levelCurrent;\n\t\t\tint lev = levelUse | levelNext << 16;\n\t\t\tif (visibleChars == 0 && foldCompact)\n\t\t\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\t\t\tif (levelUse < levelNext) {\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\t}\n\t\t\tif (lev != styler.LevelAt(lineCurrent)) {\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\t\t\t}\n\t\t\t// reset values for the next line\n\t\t\tlineCurrent++;\n\t\t\tstylePrev = style;\n\t\t\tstyle = styleNext;\n\t\t\tlevelCurrent = levelNext;\n\t\t\tvisibleChars = 0;\n\t\t\t// if the last character is an Underscore then don't reset since the line continues on the next line.\n\t\t\tif (!(chPrev == '_')) {\n\t\t\t\tszKeywordlen = 0;\n\t\t\t\tszThenlen = 0;\n\t\t\t\tFirstWordStart = false;\n\t\t\t\tFirstWordEnd = false;\n\t\t\t\tThenFoundLast = false;\n\t\t\t}\n\t\t}\n\t\t// save the last processed character\n\t\tif (!isspacechar(ch)) {\n\t\t\tchPrev = ch;\n\t\t\tvisibleChars++;\n\t\t}\n\t}\n}\n\n\n//\n\nstatic const char * const AU3WordLists[] = {\n    \"#autoit keywords\",\n    \"#autoit functions\",\n    \"#autoit macros\",\n    \"#autoit Sent keys\",\n    \"#autoit Pre-processors\",\n    \"#autoit Special\",\n    \"#autoit Expand\",\n    \"#autoit UDF\",\n    0\n};\nLexerModule lmAU3(SCLEX_AU3, ColouriseAU3Doc, \"au3\", FoldAU3Doc , AU3WordLists);\n"
  },
  {
    "path": "lexilla/lexers/LexAVE.cxx",
    "content": "// SciTE - Scintilla based Text Editor\n/** @file LexAVE.cxx\n ** Lexer for Avenue.\n **\n  ** Written by Alexey Yutkin <yutkin@geol.msu.ru>.\n **/\n// Copyright 1998-2002 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\n\nstatic inline bool IsAWordChar(const int ch) {\n\treturn (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_');\n}\nstatic inline bool IsEnumChar(const int ch) {\n\treturn (ch < 0x80) && (isalnum(ch)|| ch == '_');\n}\nstatic inline bool IsANumberChar(const int ch) {\n\treturn (ch < 0x80) && (isalnum(ch) || ch == '.' );\n}\n\ninline bool IsAWordStart(const int ch) {\n\treturn (ch < 0x80) && (isalnum(ch) || ch == '_');\n}\n\ninline bool isAveOperator(char ch) {\n\tif (IsASCII(ch) && isalnum(ch))\n\t\treturn false;\n\t// '.' left out as it is used to make up numbers\n\tif (ch == '*' || ch == '/' || ch == '-' || ch == '+' ||\n\t\tch == '(' || ch == ')' || ch == '=' ||\n\t\tch == '{' || ch == '}' ||\n\t\tch == '[' || ch == ']' || ch == ';' ||\n\t\tch == '<' || ch == '>' || ch == ',' ||\n\t\tch == '.'  )\n\t\treturn true;\n\treturn false;\n}\n\nstatic void ColouriseAveDoc(\n\tSci_PositionU startPos,\n\tSci_Position length,\n\tint initStyle,\n\tWordList *keywordlists[],\n\tAccessor &styler) {\n\n\tWordList &keywords = *keywordlists[0];\n\tWordList &keywords2 = *keywordlists[1];\n\tWordList &keywords3 = *keywordlists[2];\n\tWordList &keywords4 = *keywordlists[3];\n\tWordList &keywords5 = *keywordlists[4];\n\tWordList &keywords6 = *keywordlists[5];\n\n\t// Do not leak onto next line\n\tif (initStyle == SCE_AVE_STRINGEOL) {\n\t\tinitStyle = SCE_AVE_DEFAULT;\n\t}\n\n\tStyleContext sc(startPos, length, initStyle, styler);\n\n\tfor (; sc.More(); sc.Forward()) {\n\t\tif (sc.atLineEnd) {\n\t\t\t// Update the line state, so it can be seen by next line\n\t\t\tSci_Position currentLine = styler.GetLine(sc.currentPos);\n\t\t\tstyler.SetLineState(currentLine, 0);\n\t\t}\n\t\tif (sc.atLineStart && (sc.state == SCE_AVE_STRING)) {\n\t\t\t// Prevent SCE_AVE_STRINGEOL from leaking back to previous line\n\t\t\tsc.SetState(SCE_AVE_STRING);\n\t\t}\n\n\n\t\t// Determine if the current state should terminate.\n\t\tif (sc.state == SCE_AVE_OPERATOR) {\n\t\t\tsc.SetState(SCE_AVE_DEFAULT);\n\t\t} else if (sc.state == SCE_AVE_NUMBER) {\n\t\t\tif (!IsANumberChar(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_AVE_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_AVE_ENUM) {\n\t\t\tif (!IsEnumChar(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_AVE_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_AVE_IDENTIFIER) {\n\t\t\tif (!IsAWordChar(sc.ch) || (sc.ch == '.')) {\n\t\t\t\tchar s[100];\n\t\t\t\t//sc.GetCurrent(s, sizeof(s));\n\t\t\t\tsc.GetCurrentLowered(s, sizeof(s));\n\t\t\t\tif (keywords.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_AVE_WORD);\n\t\t\t\t} else if (keywords2.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_AVE_WORD2);\n\t\t\t\t} else if (keywords3.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_AVE_WORD3);\n\t\t\t\t} else if (keywords4.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_AVE_WORD4);\n\t\t\t\t} else if (keywords5.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_AVE_WORD5);\n\t\t\t\t} else if (keywords6.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_AVE_WORD6);\n\t\t\t\t}\n\t\t\t\tsc.SetState(SCE_AVE_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_AVE_COMMENT) {\n\t\t\tif (sc.atLineEnd) {\n\t\t\t\tsc.SetState(SCE_AVE_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_AVE_STRING) {\n\t\t\t if (sc.ch == '\\\"') {\n\t\t\t\tsc.ForwardSetState(SCE_AVE_DEFAULT);\n\t\t\t} else if (sc.atLineEnd) {\n\t\t\t\tsc.ChangeState(SCE_AVE_STRINGEOL);\n\t\t\t\tsc.ForwardSetState(SCE_AVE_DEFAULT);\n\t\t\t}\n\t\t}\n\n\t\t// Determine if a new state should be entered.\n\t\tif (sc.state == SCE_AVE_DEFAULT) {\n\t\t\tif (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) {\n\t\t\t\tsc.SetState(SCE_AVE_NUMBER);\n\t\t\t} else if (IsAWordStart(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_AVE_IDENTIFIER);\n\t\t\t} else if (sc.Match('\\\"')) {\n\t\t\t\tsc.SetState(SCE_AVE_STRING);\n\t\t\t} else if (sc.Match('\\'')) {\n\t\t\t\tsc.SetState(SCE_AVE_COMMENT);\n\t\t\t\tsc.Forward();\n\t\t\t} else if (isAveOperator(static_cast<char>(sc.ch))) {\n\t\t\t\tsc.SetState(SCE_AVE_OPERATOR);\n\t\t\t} else if (sc.Match('#')) {\n\t\t\t\tsc.SetState(SCE_AVE_ENUM);\n\t\t\t\tsc.Forward();\n\t\t\t}\n\t\t}\n\t}\n\tsc.Complete();\n}\n\nstatic void FoldAveDoc(Sci_PositionU startPos, Sci_Position length, int /* initStyle */, WordList *[],\n                       Accessor &styler) {\n\tSci_PositionU lengthDoc = startPos + length;\n\tint visibleChars = 0;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tint levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK;\n\tint levelCurrent = levelPrev;\n\tchar chNext = static_cast<char>(tolower(styler[startPos]));\n\tbool foldCompact = styler.GetPropertyInt(\"fold.compact\", 1) != 0;\n\tint styleNext = styler.StyleAt(startPos);\n\tchar s[10] = \"\";\n\n\tfor (Sci_PositionU i = startPos; i < lengthDoc; i++) {\n\t\tchar ch = static_cast<char>(tolower(chNext));\n\t\tchNext = static_cast<char>(tolower(styler.SafeGetCharAt(i + 1)));\n\t\tint style = styleNext;\n\t\tstyleNext = styler.StyleAt(i + 1);\n\t\tbool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n\t\tif (style == SCE_AVE_WORD) {\n\t\t\tif (ch == 't' || ch == 'f' || ch == 'w' || ch == 'e') {\n\t\t\t\tfor (unsigned int j = 0; j < 6; j++) {\n\t\t\t\t\tif (!iswordchar(styler[i + j])) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\ts[j] = static_cast<char>(tolower(styler[i + j]));\n\t\t\t\t\ts[j + 1] = '\\0';\n\t\t\t\t}\n\n\t\t\t\tif ((strcmp(s, \"then\") == 0) || (strcmp(s, \"for\") == 0) || (strcmp(s, \"while\") == 0)) {\n\t\t\t\t\tlevelCurrent++;\n\t\t\t\t}\n\t\t\t\tif ((strcmp(s, \"end\") == 0) || (strcmp(s, \"elseif\") == 0)) {\n\t\t\t\t\t// Normally \"elseif\" and \"then\" will be on the same line and will cancel\n\t\t\t\t\t// each other out.  // As implemented, this does not support fold.at.else.\n\t\t\t\t\tlevelCurrent--;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (style == SCE_AVE_OPERATOR) {\n\t\t\tif (ch == '{' || ch == '(') {\n\t\t\t\tlevelCurrent++;\n\t\t\t} else if (ch == '}' || ch == ')') {\n\t\t\t\tlevelCurrent--;\n\t\t\t}\n\t\t}\n\n\t\tif (atEOL) {\n\t\t\tint lev = levelPrev;\n\t\t\tif (visibleChars == 0 && foldCompact) {\n\t\t\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\t\t\t}\n\t\t\tif ((levelCurrent > levelPrev) && (visibleChars > 0)) {\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\t}\n\t\t\tif (lev != styler.LevelAt(lineCurrent)) {\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\t\t\t}\n\t\t\tlineCurrent++;\n\t\t\tlevelPrev = levelCurrent;\n\t\t\tvisibleChars = 0;\n\t\t}\n\t\tif (!isspacechar(ch)) {\n\t\t\tvisibleChars++;\n\t\t}\n\t}\n\t// Fill in the real level of the next line, keeping the current flags as they will be filled in later\n\n\tint flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK;\n\tstyler.SetLevel(lineCurrent, levelPrev | flagsNext);\n}\n\nLexerModule lmAVE(SCLEX_AVE, ColouriseAveDoc, \"ave\", FoldAveDoc);\n\n"
  },
  {
    "path": "lexilla/lexers/LexAVS.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexAVS.cxx\n ** Lexer for AviSynth.\n **/\n// Copyright 2012 by Bruno Barbieri <brunorex@gmail.com>\n// Heavily based on LexPOV by Neil Hodgson\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nstatic inline bool IsAWordChar(const int ch) {\n\treturn (ch < 0x80) && (isalnum(ch) || ch == '_');\n}\n\nstatic inline bool IsAWordStart(int ch) {\n\treturn isalpha(ch) || (ch != ' ' && ch != '\\n' && ch != '(' && ch != '.' && ch != ',');\n}\n\nstatic inline bool IsANumberChar(int ch) {\n\t// Not exactly following number definition (several dots are seen as OK, etc.)\n\t// but probably enough in most cases.\n\treturn (ch < 0x80) &&\n\t\t\t(isdigit(ch) || ch == '.' || ch == '-' || ch == '+');\n}\n\nstatic void ColouriseAvsDoc(\n\tSci_PositionU startPos,\n\tSci_Position length,\n\tint initStyle,\n\tWordList *keywordlists[],\n\tAccessor &styler) {\n\n\tWordList &keywords = *keywordlists[0];\n\tWordList &filters = *keywordlists[1];\n\tWordList &plugins = *keywordlists[2];\n\tWordList &functions = *keywordlists[3];\n\tWordList &clipProperties = *keywordlists[4];\n\tWordList &userDefined = *keywordlists[5];\n\n\tSci_Position currentLine = styler.GetLine(startPos);\n\t// Initialize the block comment nesting level, if we are inside such a comment.\n\tint blockCommentLevel = 0;\n\tif (initStyle == SCE_AVS_COMMENTBLOCK || initStyle == SCE_AVS_COMMENTBLOCKN) {\n\t\tblockCommentLevel = styler.GetLineState(currentLine - 1);\n\t}\n\n\t// Do not leak onto next line\n\tif (initStyle == SCE_AVS_COMMENTLINE) {\n\t\tinitStyle = SCE_AVS_DEFAULT;\n\t}\n\n\tStyleContext sc(startPos, length, initStyle, styler);\n\n\tfor (; sc.More(); sc.Forward()) {\n\t\tif (sc.atLineEnd) {\n\t\t\t// Update the line state, so it can be seen by next line\n\t\t\tcurrentLine = styler.GetLine(sc.currentPos);\n\t\t\tif (sc.state == SCE_AVS_COMMENTBLOCK || sc.state == SCE_AVS_COMMENTBLOCKN) {\n\t\t\t\t// Inside a block comment, we set the line state\n\t\t\t\tstyler.SetLineState(currentLine, blockCommentLevel);\n\t\t\t} else {\n\t\t\t\t// Reset the line state\n\t\t\t\tstyler.SetLineState(currentLine, 0);\n\t\t\t}\n\t\t}\n\n\t\t// Determine if the current state should terminate.\n\t\tif (sc.state == SCE_AVS_OPERATOR) {\n\t\t\tsc.SetState(SCE_AVS_DEFAULT);\n\t\t} else if (sc.state == SCE_AVS_NUMBER) {\n\t\t\t// We stop the number definition on non-numerical non-dot non-sign char\n\t\t\tif (!IsANumberChar(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_AVS_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_AVS_IDENTIFIER) {\n\t\t\tif (!IsAWordChar(sc.ch)) {\n\t\t\t\tchar s[100];\n\t\t\t\tsc.GetCurrentLowered(s, sizeof(s));\n\n\t\t\t\tif (keywords.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_AVS_KEYWORD);\n\t\t\t\t} else if (filters.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_AVS_FILTER);\n\t\t\t\t} else if (plugins.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_AVS_PLUGIN);\n\t\t\t\t} else if (functions.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_AVS_FUNCTION);\n\t\t\t\t} else if (clipProperties.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_AVS_CLIPPROP);\n\t\t\t\t} else if (userDefined.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_AVS_USERDFN);\n\t\t\t\t}\n\t\t\t\tsc.SetState(SCE_AVS_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_AVS_COMMENTBLOCK) {\n\t\t\tif (sc.Match('/', '*')) {\n\t\t\t\tblockCommentLevel++;\n\t\t\t\tsc.Forward();\n\t\t\t} else if (sc.Match('*', '/') && blockCommentLevel > 0) {\n\t\t\t\tblockCommentLevel--;\n\t\t\t\tsc.Forward();\n\t\t\t\tif (blockCommentLevel == 0) {\n\t\t\t\t\tsc.ForwardSetState(SCE_AVS_DEFAULT);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (sc.state == SCE_AVS_COMMENTBLOCKN) {\n\t\t\tif (sc.Match('[', '*')) {\n\t\t\t\tblockCommentLevel++;\n\t\t\t\tsc.Forward();\n\t\t\t} else if (sc.Match('*', ']') && blockCommentLevel > 0) {\n\t\t\t\tblockCommentLevel--;\n\t\t\t\tsc.Forward();\n\t\t\t\tif (blockCommentLevel == 0) {\n\t\t\t\t\tsc.ForwardSetState(SCE_AVS_DEFAULT);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (sc.state == SCE_AVS_COMMENTLINE) {\n\t\t\tif (sc.atLineEnd) {\n\t\t\t\tsc.ForwardSetState(SCE_AVS_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_AVS_STRING) {\n\t\t\tif (sc.ch == '\\\"') {\n\t\t\t\tsc.ForwardSetState(SCE_AVS_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_AVS_TRIPLESTRING) {\n\t\t\tif (sc.Match(\"\\\"\\\"\\\"\")) {\n\t\t\t\tsc.Forward();\n\t\t\t\tsc.Forward();\n\t\t\t\tsc.ForwardSetState(SCE_AVS_DEFAULT);\n\t\t\t}\n\t\t}\n\n\t\t// Determine if a new state should be entered.\n\t\tif (sc.state == SCE_AVS_DEFAULT) {\n\t\t\tif (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) {\n\t\t\t\tsc.SetState(SCE_AVS_NUMBER);\n\t\t\t} else \tif (IsADigit(sc.ch) || (sc.ch == ',' && IsADigit(sc.chNext))) {\n\t\t\t\tsc.Forward();\n\t\t\t\tsc.SetState(SCE_AVS_NUMBER);\n\t\t\t} else if (sc.Match('/', '*')) {\n\t\t\t\tblockCommentLevel = 1;\n\t\t\t\tsc.SetState(SCE_AVS_COMMENTBLOCK);\n\t\t\t\tsc.Forward();\t// Eat the * so it isn't used for the end of the comment\n\t\t\t} else if (sc.Match('[', '*')) {\n\t\t\t\tblockCommentLevel = 1;\n\t\t\t\tsc.SetState(SCE_AVS_COMMENTBLOCKN);\n\t\t\t\tsc.Forward();\t// Eat the * so it isn't used for the end of the comment\n\t\t\t} else if (sc.ch == '#') {\n\t\t\t\tsc.SetState(SCE_AVS_COMMENTLINE);\n\t\t\t} else if (sc.ch == '\\\"') {\n\t\t\t\tif (sc.Match(\"\\\"\\\"\\\"\")) {\n\t\t\t\t\tsc.SetState(SCE_AVS_TRIPLESTRING);\n\t\t\t\t} else {\n\t\t\t\t\tsc.SetState(SCE_AVS_STRING);\n\t\t\t\t}\n\t\t\t} else if (isoperator(static_cast<char>(sc.ch))) {\n\t\t\t\tsc.SetState(SCE_AVS_OPERATOR);\n\t\t\t} else if (IsAWordStart(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_AVS_IDENTIFIER);\n\t\t\t}\n\t\t}\n\t}\n\n\t// End of file: complete any pending changeState\n\tif (sc.state == SCE_AVS_IDENTIFIER) {\n\t\tif (!IsAWordChar(sc.ch)) {\n\t\t\tchar s[100];\n\t\t\tsc.GetCurrentLowered(s, sizeof(s));\n\n\t\t\tif (keywords.InList(s)) {\n\t\t\t\tsc.ChangeState(SCE_AVS_KEYWORD);\n\t\t\t} else if (filters.InList(s)) {\n\t\t\t\tsc.ChangeState(SCE_AVS_FILTER);\n\t\t\t} else if (plugins.InList(s)) {\n\t\t\t\tsc.ChangeState(SCE_AVS_PLUGIN);\n\t\t\t} else if (functions.InList(s)) {\n\t\t\t\tsc.ChangeState(SCE_AVS_FUNCTION);\n\t\t\t} else if (clipProperties.InList(s)) {\n\t\t\t\tsc.ChangeState(SCE_AVS_CLIPPROP);\n\t\t\t} else if (userDefined.InList(s)) {\n\t\t\t\tsc.ChangeState(SCE_AVS_USERDFN);\n\t\t\t}\n\t\t\tsc.SetState(SCE_AVS_DEFAULT);\n\t\t}\n\t}\n\n\tsc.Complete();\n}\n\nstatic void FoldAvsDoc(\n\tSci_PositionU startPos,\n\tSci_Position length,\n\tint initStyle,\n\tWordList *[],\n\tAccessor &styler) {\n\n\tbool foldComment = styler.GetPropertyInt(\"fold.comment\") != 0;\n\tbool foldCompact = styler.GetPropertyInt(\"fold.compact\", 1) != 0;\n\tSci_PositionU endPos = startPos + length;\n\tint visibleChars = 0;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tint levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK;\n\tint levelCurrent = levelPrev;\n\tchar chNext = styler[startPos];\n\tint styleNext = styler.StyleAt(startPos);\n\tint style = initStyle;\n\n\tfor (Sci_PositionU i = startPos; i < endPos; i++) {\n\t\tchar ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\tint stylePrev = style;\n\t\tstyle = styleNext;\n\t\tstyleNext = styler.StyleAt(i + 1);\n\t\tbool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n\t\tif (foldComment && style == SCE_AVS_COMMENTBLOCK) {\n\t\t\tif (stylePrev != SCE_AVS_COMMENTBLOCK) {\n\t\t\t\tlevelCurrent++;\n\t\t\t} else if ((styleNext != SCE_AVS_COMMENTBLOCK) && !atEOL) {\n\t\t\t\t// Comments don't end at end of line and the next character may be unstyled.\n\t\t\t\tlevelCurrent--;\n\t\t\t}\n\t\t}\n\n\t\tif (foldComment && style == SCE_AVS_COMMENTBLOCKN) {\n\t\t\tif (stylePrev != SCE_AVS_COMMENTBLOCKN) {\n\t\t\t\tlevelCurrent++;\n\t\t\t} else if ((styleNext != SCE_AVS_COMMENTBLOCKN) && !atEOL) {\n\t\t\t\t// Comments don't end at end of line and the next character may be unstyled.\n\t\t\t\tlevelCurrent--;\n\t\t\t}\n\t\t}\n\n\t\tif (style == SCE_AVS_OPERATOR) {\n\t\t\tif (ch == '{') {\n\t\t\t\tlevelCurrent++;\n\t\t\t} else if (ch == '}') {\n\t\t\t\tlevelCurrent--;\n\t\t\t}\n\t\t}\n\n\t\tif (atEOL) {\n\t\t\tint lev = levelPrev;\n\t\t\tif (visibleChars == 0 && foldCompact)\n\t\t\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\t\t\tif ((levelCurrent > levelPrev) && (visibleChars > 0))\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\tif (lev != styler.LevelAt(lineCurrent)) {\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\t\t\t}\n\t\t\tlineCurrent++;\n\t\t\tlevelPrev = levelCurrent;\n\t\t\tvisibleChars = 0;\n\t\t}\n\n\t\tif (!isspacechar(ch))\n\t\t\tvisibleChars++;\n\t}\n\t// Fill in the real level of the next line, keeping the current flags as they will be filled in later\n\tint flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK;\n\tstyler.SetLevel(lineCurrent, levelPrev | flagsNext);\n}\n\nstatic const char * const avsWordLists[] = {\n\t\"Keywords\",\n\t\"Filters\",\n\t\"Plugins\",\n\t\"Functions\",\n\t\"Clip properties\",\n\t\"User defined functions\",\n\t0,\n};\n\nLexerModule lmAVS(SCLEX_AVS, ColouriseAvsDoc, \"avs\", FoldAvsDoc, avsWordLists);\n"
  },
  {
    "path": "lexilla/lexers/LexAbaqus.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexAbaqus.cxx\n ** Lexer for ABAQUS. Based on the lexer for APDL by Hadar Raz.\n ** By Sergio Lucato.\n ** Sort of completely rewritten by Gertjan Kloosterman\n **/\n// The License.txt file describes the conditions under which this software may be distributed.\n\n// Code folding copyied and modified from LexBasic.cxx\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nstatic inline bool IsAKeywordChar(const int ch) {\n\treturn (ch < 0x80 && (isalnum(ch) || (ch == '_') || (ch == ' ')));\n}\n\nstatic inline bool IsASetChar(const int ch) {\n\treturn (ch < 0x80 && (isalnum(ch) || (ch == '_') || (ch == '.') || (ch == '-')));\n}\n\nstatic void ColouriseABAQUSDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList*[] /* *keywordlists[] */,\n                            Accessor &styler) {\n\tenum localState { KW_LINE_KW, KW_LINE_COMMA, KW_LINE_PAR, KW_LINE_EQ, KW_LINE_VAL, \\\n\t\t\t\t\t  DAT_LINE_VAL, DAT_LINE_COMMA,\\\n\t\t\t\t\t  COMMENT_LINE,\\\n\t\t\t\t\t  ST_ERROR, LINE_END } state ;\n\n\t// Do not leak onto next line\n\tstate = LINE_END ;\n\tinitStyle = SCE_ABAQUS_DEFAULT;\n\tStyleContext sc(startPos, length, initStyle, styler);\n\n\t// Things are actually quite simple\n\t// we have commentlines\n\t// keywordlines and datalines\n\t// On a data line there will only be colouring of numbers\n\t// a keyword line is constructed as\n\t// *word,[ paramname[=paramvalue]]*\n\t// if the line ends with a , the keyword line continues onto the new line\n\n\tfor (; sc.More(); sc.Forward()) {\n\t\tswitch ( state ) {\n        case KW_LINE_KW :\n            if ( sc.atLineEnd ) {\n                // finished the line in keyword state, switch to LINE_END\n                sc.SetState(SCE_ABAQUS_DEFAULT) ;\n                state = LINE_END ;\n            } else if ( IsAKeywordChar(sc.ch) ) {\n                // nothing changes\n                state = KW_LINE_KW ;\n            } else if ( sc.ch == ',' ) {\n                // Well well we say a comma, arguments *MUST* follow\n                sc.SetState(SCE_ABAQUS_OPERATOR) ;\n                state = KW_LINE_COMMA ;\n            } else {\n                // Flag an error\n                sc.SetState(SCE_ABAQUS_PROCESSOR) ;\n                state = ST_ERROR ;\n            }\n            // Done with processing\n            break ;\n        case KW_LINE_COMMA :\n            // acomma on a keywordline was seen\n            if ( IsAKeywordChar(sc.ch)) {\n                sc.SetState(SCE_ABAQUS_ARGUMENT) ;\n                state = KW_LINE_PAR ;\n            } else if ( sc.atLineEnd || (sc.ch == ',') ) {\n                // we remain in keyword mode\n                state = KW_LINE_COMMA ;\n            } else if ( sc.ch == ' ' ) {\n                sc.SetState(SCE_ABAQUS_DEFAULT) ;\n                state = KW_LINE_COMMA ;\n            } else {\n                // Anything else constitutes an error\n                sc.SetState(SCE_ABAQUS_PROCESSOR) ;\n                state = ST_ERROR ;\n            }\n            break ;\n        case KW_LINE_PAR :\n            if ( sc.atLineEnd ) {\n                sc.SetState(SCE_ABAQUS_DEFAULT) ;\n                state = LINE_END ;\n            } else if ( IsAKeywordChar(sc.ch) || (sc.ch == '-') ) {\n                // remain in this state\n                state = KW_LINE_PAR ;\n            } else if ( sc.ch == ',' ) {\n                sc.SetState(SCE_ABAQUS_OPERATOR) ;\n                state = KW_LINE_COMMA ;\n            } else if ( sc.ch == '=' ) {\n                sc.SetState(SCE_ABAQUS_OPERATOR) ;\n                state = KW_LINE_EQ ;\n            } else {\n                // Anything else constitutes an error\n                sc.SetState(SCE_ABAQUS_PROCESSOR) ;\n                state = ST_ERROR ;\n            }\n            break ;\n        case KW_LINE_EQ :\n            if ( sc.ch == ' ' ) {\n                sc.SetState(SCE_ABAQUS_DEFAULT) ;\n                // remain in this state\n                state = KW_LINE_EQ ;\n            } else if ( IsADigit(sc.ch) || (sc.ch == '-') || (sc.ch == '.' && IsADigit(sc.chNext)) ) {\n                sc.SetState(SCE_ABAQUS_NUMBER) ;\n                state = KW_LINE_VAL ;\n            } else if ( IsAKeywordChar(sc.ch) ) {\n                sc.SetState(SCE_ABAQUS_DEFAULT) ;\n                state = KW_LINE_VAL ;\n            } else if ( (sc.ch == '\\'') || (sc.ch == '\\\"') ) {\n                sc.SetState(SCE_ABAQUS_STRING) ;\n                state = KW_LINE_VAL ;\n            } else {\n                sc.SetState(SCE_ABAQUS_PROCESSOR) ;\n                state = ST_ERROR ;\n            }\n            break ;\n        case KW_LINE_VAL :\n            if ( sc.atLineEnd ) {\n                sc.SetState(SCE_ABAQUS_DEFAULT) ;\n                state = LINE_END ;\n            } else if ( IsASetChar(sc.ch) && (sc.state == SCE_ABAQUS_DEFAULT) ) {\n                // nothing changes\n                state = KW_LINE_VAL ;\n            } else if (( (IsADigit(sc.ch) || sc.ch == '.' || (sc.ch == 'e' || sc.ch == 'E') ||\n                    ((sc.ch == '+' || sc.ch == '-') && (sc.chPrev == 'e' || sc.chPrev == 'E')))) &&\n                    (sc.state == SCE_ABAQUS_NUMBER)) {\n                // remain in number mode\n                state = KW_LINE_VAL ;\n            } else if (sc.state == SCE_ABAQUS_STRING) {\n                // accept everything until a closing quote\n                if ( sc.ch == '\\'' || sc.ch == '\\\"' ) {\n                    sc.SetState(SCE_ABAQUS_DEFAULT) ;\n                    state = KW_LINE_VAL ;\n                }\n            } else if ( sc.ch == ',' ) {\n                sc.SetState(SCE_ABAQUS_OPERATOR) ;\n                state = KW_LINE_COMMA ;\n            } else {\n                // anything else is an error\n                sc.SetState(SCE_ABAQUS_PROCESSOR) ;\n                state = ST_ERROR ;\n            }\n            break ;\n        case DAT_LINE_VAL :\n            if ( sc.atLineEnd ) {\n                sc.SetState(SCE_ABAQUS_DEFAULT) ;\n                state = LINE_END ;\n            } else if ( IsASetChar(sc.ch) && (sc.state == SCE_ABAQUS_DEFAULT) ) {\n                // nothing changes\n                state = DAT_LINE_VAL ;\n            } else if (( (IsADigit(sc.ch) || sc.ch == '.' || (sc.ch == 'e' || sc.ch == 'E') ||\n                    ((sc.ch == '+' || sc.ch == '-') && (sc.chPrev == 'e' || sc.chPrev == 'E')))) &&\n                    (sc.state == SCE_ABAQUS_NUMBER)) {\n                // remain in number mode\n                state = DAT_LINE_VAL ;\n            } else if (sc.state == SCE_ABAQUS_STRING) {\n                // accept everything until a closing quote\n                if ( sc.ch == '\\'' || sc.ch == '\\\"' ) {\n                    sc.SetState(SCE_ABAQUS_DEFAULT) ;\n                    state = DAT_LINE_VAL ;\n                }\n            } else if ( sc.ch == ',' ) {\n                sc.SetState(SCE_ABAQUS_OPERATOR) ;\n                state = DAT_LINE_COMMA ;\n            } else {\n                // anything else is an error\n                sc.SetState(SCE_ABAQUS_PROCESSOR) ;\n                state = ST_ERROR ;\n            }\n            break ;\n        case DAT_LINE_COMMA :\n            // a comma on a data line was seen\n            if ( sc.atLineEnd ) {\n                sc.SetState(SCE_ABAQUS_DEFAULT) ;\n                state = LINE_END ;\n            } else if ( sc.ch == ' ' ) {\n                sc.SetState(SCE_ABAQUS_DEFAULT) ;\n                state = DAT_LINE_COMMA ;\n            } else if (sc.ch == ',')  {\n                sc.SetState(SCE_ABAQUS_OPERATOR) ;\n                state = DAT_LINE_COMMA ;\n            } else if ( IsADigit(sc.ch) || (sc.ch == '-')|| (sc.ch == '.' && IsADigit(sc.chNext)) ) {\n                sc.SetState(SCE_ABAQUS_NUMBER) ;\n                state = DAT_LINE_VAL ;\n            } else if ( IsAKeywordChar(sc.ch) ) {\n                sc.SetState(SCE_ABAQUS_DEFAULT) ;\n                state = DAT_LINE_VAL ;\n            } else if ( (sc.ch == '\\'') || (sc.ch == '\\\"') ) {\n                sc.SetState(SCE_ABAQUS_STRING) ;\n                state = DAT_LINE_VAL ;\n            } else {\n                sc.SetState(SCE_ABAQUS_PROCESSOR) ;\n                state = ST_ERROR ;\n            }\n            break ;\n        case COMMENT_LINE :\n            if ( sc.atLineEnd ) {\n                sc.SetState(SCE_ABAQUS_DEFAULT) ;\n                state = LINE_END ;\n            }\n            break ;\n        case ST_ERROR :\n            if ( sc.atLineEnd ) {\n                sc.SetState(SCE_ABAQUS_DEFAULT) ;\n                state = LINE_END ;\n            }\n            break ;\n        case LINE_END :\n            if ( sc.atLineEnd || sc.ch == ' ' ) {\n                // nothing changes\n                state = LINE_END ;\n            } else if ( sc.ch == '*' ) {\n                if ( sc.chNext == '*' ) {\n                    state = COMMENT_LINE ;\n                    sc.SetState(SCE_ABAQUS_COMMENT) ;\n                } else {\n                    state = KW_LINE_KW ;\n                    sc.SetState(SCE_ABAQUS_STARCOMMAND) ;\n                }\n            } else {\n                // it must be a data line, things are as if we are in DAT_LINE_COMMA\n                if ( sc.ch == ',' ) {\n                    sc.SetState(SCE_ABAQUS_OPERATOR) ;\n                    state = DAT_LINE_COMMA ;\n                } else if ( IsADigit(sc.ch) || (sc.ch == '-')|| (sc.ch == '.' && IsADigit(sc.chNext)) ) {\n                    sc.SetState(SCE_ABAQUS_NUMBER) ;\n                    state = DAT_LINE_VAL ;\n                } else if ( IsAKeywordChar(sc.ch) ) {\n                    sc.SetState(SCE_ABAQUS_DEFAULT) ;\n                    state = DAT_LINE_VAL ;\n                } else if ( (sc.ch == '\\'') || (sc.ch == '\\\"') ) {\n                    sc.SetState(SCE_ABAQUS_STRING) ;\n                    state = DAT_LINE_VAL ;\n                } else {\n                    sc.SetState(SCE_ABAQUS_PROCESSOR) ;\n                    state = ST_ERROR ;\n                }\n            }\n            break ;\n\t\t  }\n   }\n   sc.Complete();\n}\n\n//------------------------------------------------------------------------------\n// This copyied and modified from LexBasic.cxx\n//------------------------------------------------------------------------------\n\n/* Bits:\n * 1  - whitespace\n * 2  - operator\n * 4  - identifier\n * 8  - decimal digit\n * 16 - hex digit\n * 32 - bin digit\n */\nstatic int character_classification[128] =\n{\n    0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  0,  0,  1,  0,  0,\n    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,\n    1,  2,  0,  2,  2,  2,  2,  2,  2,  2,  6,  2,  2,  2,  10, 6,\n    60, 60, 28, 28, 28, 28, 28, 28, 28, 28, 2,  2,  2,  2,  2,  2,\n    2,  20, 20, 20, 20, 20, 20, 4,  4,  4,  4,  4,  4,  4,  4,  4,\n    4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  2,  2,  2,  2,  4,\n    2,  20, 20, 20, 20, 20, 20, 4,  4,  4,  4,  4,  4,  4,  4,  4,\n    4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  2,  2,  2,  2,  0\n};\n\nstatic bool IsSpace(int c) {\n\treturn c < 128 && (character_classification[c] & 1);\n}\n\nstatic bool IsIdentifier(int c) {\n\treturn c < 128 && (character_classification[c] & 4);\n}\n\nstatic int LowerCase(int c)\n{\n\tif (c >= 'A' && c <= 'Z')\n\t\treturn 'a' + c - 'A';\n\treturn c;\n}\n\nstatic Sci_Position LineEnd(Sci_Position line, Accessor &styler)\n{\n    const Sci_Position docLines = styler.GetLine(styler.Length() - 1);  // Available last line\n    Sci_Position eol_pos ;\n    // if the line is the last line, the eol_pos is styler.Length()\n    // eol will contain a new line, or a virtual new line\n    if ( docLines == line )\n        eol_pos = styler.Length() ;\n    else\n        eol_pos = styler.LineStart(line + 1) - 1;\n    return eol_pos ;\n}\n\nstatic Sci_Position LineStart(Sci_Position line, Accessor &styler)\n{\n    return styler.LineStart(line) ;\n}\n\n// LineType\n//\n// bits determines the line type\n// 1  : data line\n// 2  : only whitespace\n// 3  : data line with only whitespace\n// 4  : keyword line\n// 5  : block open keyword line\n// 6  : block close keyword line\n// 7  : keyword line in error\n// 8  : comment line\nstatic int LineType(Sci_Position line, Accessor &styler) {\n    Sci_Position pos = LineStart(line, styler) ;\n    Sci_Position eol_pos = LineEnd(line, styler) ;\n\n    int c ;\n    char ch = ' ';\n\n    Sci_Position i = pos ;\n    while ( i < eol_pos ) {\n        c = styler.SafeGetCharAt(i);\n        ch = static_cast<char>(LowerCase(c));\n        // We can say something as soon as no whitespace\n        // was encountered\n        if ( !IsSpace(c) )\n            break ;\n        i++ ;\n    }\n\n    if ( i >= eol_pos ) {\n        // This is a whitespace line, currently\n        // classifies as data line\n        return 3 ;\n    }\n\n    if ( ch != '*' ) {\n        // This is a data line\n        return 1 ;\n    }\n\n    if ( i == eol_pos - 1 ) {\n        // Only a single *, error but make keyword line\n        return 4+3 ;\n    }\n\n    // This means we can have a second character\n    // if that is also a * this means a comment\n    // otherwise it is a keyword.\n    c = styler.SafeGetCharAt(i+1);\n    ch = static_cast<char>(LowerCase(c));\n    if ( ch == '*' ) {\n        return 8 ;\n    }\n\n    // At this point we know this is a keyword line\n    // the character at position i is a *\n    // it is not a comment line\n    char word[256] ;\n    int  wlen = 0;\n\n    word[wlen] = '*' ;\n\twlen++ ;\n\n    i++ ;\n    while ( (i < eol_pos) && (wlen < 255) ) {\n        c = styler.SafeGetCharAt(i);\n        ch = static_cast<char>(LowerCase(c));\n\n        if ( (!IsSpace(c)) && (!IsIdentifier(c)) )\n            break ;\n\n        if ( IsIdentifier(c) ) {\n            word[wlen] = ch ;\n\t\t\twlen++ ;\n\t\t}\n\n        i++ ;\n    }\n\n    word[wlen] = 0 ;\n\n    // Make a comparison\n\tif ( !strcmp(word, \"*step\") ||\n         !strcmp(word, \"*part\") ||\n         !strcmp(word, \"*instance\") ||\n         !strcmp(word, \"*assembly\")) {\n       return 4+1 ;\n    }\n\n\tif ( !strcmp(word, \"*endstep\") ||\n         !strcmp(word, \"*endpart\") ||\n         !strcmp(word, \"*endinstance\") ||\n         !strcmp(word, \"*endassembly\")) {\n       return 4+2 ;\n    }\n\n    return 4 ;\n}\n\nstatic void SafeSetLevel(Sci_Position line, int level, Accessor &styler)\n{\n    if ( line < 0 )\n        return ;\n\n    int mask = ((~SC_FOLDLEVELHEADERFLAG) | (~SC_FOLDLEVELWHITEFLAG));\n\n    if ( (level & mask) < 0 )\n        return ;\n\n    if ( styler.LevelAt(line) != level )\n        styler.SetLevel(line, level) ;\n}\n\nstatic void FoldABAQUSDoc(Sci_PositionU startPos, Sci_Position length, int,\nWordList *[], Accessor &styler) {\n    Sci_Position startLine = styler.GetLine(startPos) ;\n    Sci_Position endLine   = styler.GetLine(startPos+length-1) ;\n\n    // bool foldCompact = styler.GetPropertyInt(\"fold.compact\", 1) != 0;\n    // We want to deal with all the cases\n    // To know the correct indentlevel, we need to look back to the\n    // previous command line indentation level\n\t// order of formatting keyline datalines commentlines\n    Sci_Position beginData    = -1 ;\n    Sci_Position beginComment = -1 ;\n    Sci_Position prvKeyLine   = startLine ;\n    Sci_Position prvKeyLineTp =  0 ;\n\n    // Scan until we find the previous keyword line\n    // this will give us the level reference that we need\n    while ( prvKeyLine > 0 ) {\n        prvKeyLine-- ;\n        prvKeyLineTp = LineType(prvKeyLine, styler) ;\n        if ( prvKeyLineTp & 4 )\n            break ;\n    }\n\n    // Determine the base line level of all lines following\n    // the previous keyword\n    // new keyword lines are placed on this level\n    //if ( prvKeyLineTp & 4 ) {\n    int level = styler.LevelAt(prvKeyLine) & ~SC_FOLDLEVELHEADERFLAG ;\n    //}\n\n    // uncomment line below if weird behaviour continues\n    prvKeyLine = -1 ;\n\n    // Now start scanning over the lines.\n    for ( Sci_Position line = startLine; line <= endLine; line++ ) {\n        int lineType = LineType(line, styler) ;\n\n        // Check for comment line\n        if ( lineType == 8 ) {\n            if ( beginComment < 0 ) {\n                beginComment = line ;\n\t\t\t}\n        }\n\n        // Check for data line\n        if ( (lineType == 1) || (lineType == 3) ) {\n            if ( beginData < 0 ) {\n                if ( beginComment >= 0 ) {\n                    beginData = beginComment ;\n                } else {\n                    beginData = line ;\n                }\n            }\n\t\t\tbeginComment = -1 ;\n\t\t}\n\n        // Check for keywordline.\n        // As soon as a keyword line is encountered, we can set the\n        // levels of everything from the previous keyword line to this one\n        if ( lineType & 4 ) {\n            // this is a keyword, we can now place the previous keyword\n            // all its data lines and the remainder\n\n            // Write comments and data line\n            if ( beginComment < 0 ) {\n                beginComment = line ;\n\t\t\t}\n\n            if ( beginData < 0 ) {\n                beginData = beginComment ;\n\t\t\t\tif ( prvKeyLineTp != 5 )\n\t\t\t\t\tSafeSetLevel(prvKeyLine, level, styler) ;\n\t\t\t\telse\n\t\t\t\t\tSafeSetLevel(prvKeyLine, level | SC_FOLDLEVELHEADERFLAG, styler) ;\n            } else {\n                SafeSetLevel(prvKeyLine, level | SC_FOLDLEVELHEADERFLAG, styler) ;\n            }\n\n            int datLevel = level + 1 ;\n\t\t\tif ( !(prvKeyLineTp & 4) ) {\n\t\t\t\tdatLevel = level ;\n\t\t\t}\n\n            for ( Sci_Position ll = beginData; ll < beginComment; ll++ )\n                SafeSetLevel(ll, datLevel, styler) ;\n\n            // The keyword we just found is going to be written at another level\n            // if we have a type 5 and type 6\n            if ( prvKeyLineTp == 5 ) {\n                level += 1 ;\n\t\t\t}\n\n            if ( prvKeyLineTp == 6 ) {\n                level -= 1 ;\n\t\t\t\tif ( level < 0 ) {\n\t\t\t\t\tlevel = 0 ;\n\t\t\t\t}\n            }\n\n            for ( Sci_Position lll = beginComment; lll < line; lll++ )\n                SafeSetLevel(lll, level, styler) ;\n\n            // wrap and reset\n            beginComment = -1 ;\n            beginData    = -1 ;\n            prvKeyLine   = line ;\n            prvKeyLineTp = lineType ;\n        }\n\n    }\n\n    if ( beginComment < 0 ) {\n        beginComment = endLine + 1 ;\n    } else {\n        // We need to find out whether this comment block is followed by\n        // a data line or a keyword line\n        const Sci_Position docLines = styler.GetLine(styler.Length() - 1);\n\n        for ( Sci_Position line = endLine + 1; line <= docLines; line++ ) {\n            Sci_Position lineType = LineType(line, styler) ;\n\n            if ( lineType != 8 ) {\n\t\t\t\tif ( !(lineType & 4) )  {\n\t\t\t\t\tbeginComment = endLine + 1 ;\n\t\t\t\t}\n                break ;\n\t\t\t}\n        }\n    }\n\n    if ( beginData < 0 ) {\n        beginData = beginComment ;\n\t\tif ( prvKeyLineTp != 5 )\n\t\t\tSafeSetLevel(prvKeyLine, level, styler) ;\n\t\telse\n\t\t\tSafeSetLevel(prvKeyLine, level | SC_FOLDLEVELHEADERFLAG, styler) ;\n    } else {\n        SafeSetLevel(prvKeyLine, level | SC_FOLDLEVELHEADERFLAG, styler) ;\n    }\n\n    int datLevel = level + 1 ;\n\tif ( !(prvKeyLineTp & 4) ) {\n\t\tdatLevel = level ;\n\t}\n\n    for ( Sci_Position ll = beginData; ll < beginComment; ll++ )\n        SafeSetLevel(ll, datLevel, styler) ;\n\n    if ( prvKeyLineTp == 5 ) {\n        level += 1 ;\n    }\n\n    if ( prvKeyLineTp == 6 ) {\n        level -= 1 ;\n    }\n    for ( Sci_Position m = beginComment; m <= endLine; m++ )\n        SafeSetLevel(m, level, styler) ;\n}\n\nstatic const char * const abaqusWordListDesc[] = {\n    \"processors\",\n    \"commands\",\n    \"slashommands\",\n    \"starcommands\",\n    \"arguments\",\n    \"functions\",\n    0\n};\n\nLexerModule lmAbaqus(SCLEX_ABAQUS, ColouriseABAQUSDoc, \"abaqus\", FoldABAQUSDoc, abaqusWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexAda.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexAda.cxx\n ** Lexer for Ada 95\n **/\n// Copyright 2002 by Sergey Koshcheyev <sergey.k@seznam.cz>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\n/*\n * Interface\n */\n\nstatic void ColouriseDocument(\n    Sci_PositionU startPos,\n    Sci_Position length,\n    int initStyle,\n    WordList *keywordlists[],\n    Accessor &styler);\n\nstatic const char * const adaWordListDesc[] = {\n\t\"Keywords\",\n\t0\n};\n\nLexerModule lmAda(SCLEX_ADA, ColouriseDocument, \"ada\", NULL, adaWordListDesc);\n\n/*\n * Implementation\n */\n\n// Functions that have apostropheStartsAttribute as a parameter set it according to whether\n// an apostrophe encountered after processing the current token will start an attribute or\n// a character literal.\nstatic void ColouriseCharacter(StyleContext& sc, bool& apostropheStartsAttribute);\nstatic void ColouriseComment(StyleContext& sc, bool& apostropheStartsAttribute);\nstatic void ColouriseContext(StyleContext& sc, char chEnd, int stateEOL);\nstatic void ColouriseDelimiter(StyleContext& sc, bool& apostropheStartsAttribute);\nstatic void ColouriseLabel(StyleContext& sc, WordList& keywords, bool& apostropheStartsAttribute);\nstatic void ColouriseNumber(StyleContext& sc, bool& apostropheStartsAttribute);\nstatic void ColouriseString(StyleContext& sc, bool& apostropheStartsAttribute);\nstatic void ColouriseWhiteSpace(StyleContext& sc, bool& apostropheStartsAttribute);\nstatic void ColouriseWord(StyleContext& sc, WordList& keywords, bool& apostropheStartsAttribute);\n\nstatic inline bool IsDelimiterCharacter(int ch);\nstatic inline bool IsSeparatorOrDelimiterCharacter(int ch);\nstatic bool IsValidIdentifier(const std::string& identifier);\nstatic bool IsValidNumber(const std::string& number);\nstatic inline bool IsWordStartCharacter(int ch);\nstatic inline bool IsWordCharacter(int ch);\n\nstatic void ColouriseCharacter(StyleContext& sc, bool& apostropheStartsAttribute) {\n\tapostropheStartsAttribute = true;\n\n\tsc.SetState(SCE_ADA_CHARACTER);\n\n\t// Skip the apostrophe and one more character (so that '' is shown as non-terminated and '''\n\t// is handled correctly)\n\tsc.Forward();\n\tsc.Forward();\n\n\tColouriseContext(sc, '\\'', SCE_ADA_CHARACTEREOL);\n}\n\nstatic void ColouriseContext(StyleContext& sc, char chEnd, int stateEOL) {\n\twhile (!sc.atLineEnd && !sc.Match(chEnd)) {\n\t\tsc.Forward();\n\t}\n\n\tif (!sc.atLineEnd) {\n\t\tsc.ForwardSetState(SCE_ADA_DEFAULT);\n\t} else {\n\t\tsc.ChangeState(stateEOL);\n\t}\n}\n\nstatic void ColouriseComment(StyleContext& sc, bool& /*apostropheStartsAttribute*/) {\n\t// Apostrophe meaning is not changed, but the parameter is present for uniformity\n\n\tsc.SetState(SCE_ADA_COMMENTLINE);\n\n\twhile (!sc.atLineEnd) {\n\t\tsc.Forward();\n\t}\n}\n\nstatic void ColouriseDelimiter(StyleContext& sc, bool& apostropheStartsAttribute) {\n\tapostropheStartsAttribute = sc.Match (')');\n\tsc.SetState(SCE_ADA_DELIMITER);\n\tsc.ForwardSetState(SCE_ADA_DEFAULT);\n}\n\nstatic void ColouriseLabel(StyleContext& sc, WordList& keywords, bool& apostropheStartsAttribute) {\n\tapostropheStartsAttribute = false;\n\n\tsc.SetState(SCE_ADA_LABEL);\n\n\t// Skip \"<<\"\n\tsc.Forward();\n\tsc.Forward();\n\n\tstd::string identifier;\n\n\twhile (!sc.atLineEnd && !IsSeparatorOrDelimiterCharacter(sc.ch)) {\n\t\tidentifier += static_cast<char>(tolower(sc.ch));\n\t\tsc.Forward();\n\t}\n\n\t// Skip \">>\"\n\tif (sc.Match('>', '>')) {\n\t\tsc.Forward();\n\t\tsc.Forward();\n\t} else {\n\t\tsc.ChangeState(SCE_ADA_ILLEGAL);\n\t}\n\n\t// If the name is an invalid identifier or a keyword, then make it invalid label\n\tif (!IsValidIdentifier(identifier) || keywords.InList(identifier.c_str())) {\n\t\tsc.ChangeState(SCE_ADA_ILLEGAL);\n\t}\n\n\tsc.SetState(SCE_ADA_DEFAULT);\n\n}\n\nstatic void ColouriseNumber(StyleContext& sc, bool& apostropheStartsAttribute) {\n\tapostropheStartsAttribute = true;\n\n\tstd::string number;\n\tsc.SetState(SCE_ADA_NUMBER);\n\n\t// Get all characters up to a delimiter or a separator, including points, but excluding\n\t// double points (ranges).\n\twhile (!IsSeparatorOrDelimiterCharacter(sc.ch) || (sc.ch == '.' && sc.chNext != '.')) {\n\t\tnumber += static_cast<char>(sc.ch);\n\t\tsc.Forward();\n\t}\n\n\t// Special case: exponent with sign\n\tif ((sc.chPrev == 'e' || sc.chPrev == 'E') &&\n\t        (sc.ch == '+' || sc.ch == '-')) {\n\t\tnumber += static_cast<char>(sc.ch);\n\t\tsc.Forward ();\n\n\t\twhile (!IsSeparatorOrDelimiterCharacter(sc.ch)) {\n\t\t\tnumber += static_cast<char>(sc.ch);\n\t\t\tsc.Forward();\n\t\t}\n\t}\n\n\tif (!IsValidNumber(number)) {\n\t\tsc.ChangeState(SCE_ADA_ILLEGAL);\n\t}\n\n\tsc.SetState(SCE_ADA_DEFAULT);\n}\n\nstatic void ColouriseString(StyleContext& sc, bool& apostropheStartsAttribute) {\n\tapostropheStartsAttribute = true;\n\n\tsc.SetState(SCE_ADA_STRING);\n\tsc.Forward();\n\n\tColouriseContext(sc, '\"', SCE_ADA_STRINGEOL);\n}\n\nstatic void ColouriseWhiteSpace(StyleContext& sc, bool& /*apostropheStartsAttribute*/) {\n\t// Apostrophe meaning is not changed, but the parameter is present for uniformity\n\tsc.SetState(SCE_ADA_DEFAULT);\n\tsc.ForwardSetState(SCE_ADA_DEFAULT);\n}\n\nstatic void ColouriseWord(StyleContext& sc, WordList& keywords, bool& apostropheStartsAttribute) {\n\tapostropheStartsAttribute = true;\n\tsc.SetState(SCE_ADA_IDENTIFIER);\n\n\tstd::string word;\n\n\twhile (!sc.atLineEnd && !IsSeparatorOrDelimiterCharacter(sc.ch)) {\n\t\tword += static_cast<char>(tolower(sc.ch));\n\t\tsc.Forward();\n\t}\n\n\tif (!IsValidIdentifier(word)) {\n\t\tsc.ChangeState(SCE_ADA_ILLEGAL);\n\n\t} else if (keywords.InList(word.c_str())) {\n\t\tsc.ChangeState(SCE_ADA_WORD);\n\n\t\tif (word != \"all\") {\n\t\t\tapostropheStartsAttribute = false;\n\t\t}\n\t}\n\n\tsc.SetState(SCE_ADA_DEFAULT);\n}\n\n//\n// ColouriseDocument\n//\n\nstatic void ColouriseDocument(\n    Sci_PositionU startPos,\n    Sci_Position length,\n    int initStyle,\n    WordList *keywordlists[],\n    Accessor &styler) {\n\tWordList &keywords = *keywordlists[0];\n\n\tStyleContext sc(startPos, length, initStyle, styler);\n\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tbool apostropheStartsAttribute = (styler.GetLineState(lineCurrent) & 1) != 0;\n\n\twhile (sc.More()) {\n\t\tif (sc.atLineEnd) {\n\t\t\t// Go to the next line\n\t\t\tsc.Forward();\n\t\t\tlineCurrent++;\n\n\t\t\t// Remember the line state for future incremental lexing\n\t\t\tstyler.SetLineState(lineCurrent, apostropheStartsAttribute);\n\n\t\t\t// Don't continue any styles on the next line\n\t\t\tsc.SetState(SCE_ADA_DEFAULT);\n\t\t}\n\n\t\t// Comments\n\t\tif (sc.Match('-', '-')) {\n\t\t\tColouriseComment(sc, apostropheStartsAttribute);\n\n\t\t// Strings\n\t\t} else if (sc.Match('\"')) {\n\t\t\tColouriseString(sc, apostropheStartsAttribute);\n\n\t\t// Characters\n\t\t} else if (sc.Match('\\'') && !apostropheStartsAttribute) {\n\t\t\tColouriseCharacter(sc, apostropheStartsAttribute);\n\n\t\t// Labels\n\t\t} else if (sc.Match('<', '<')) {\n\t\t\tColouriseLabel(sc, keywords, apostropheStartsAttribute);\n\n\t\t// Whitespace\n\t\t} else if (IsASpace(sc.ch)) {\n\t\t\tColouriseWhiteSpace(sc, apostropheStartsAttribute);\n\n\t\t// Delimiters\n\t\t} else if (IsDelimiterCharacter(sc.ch)) {\n\t\t\tColouriseDelimiter(sc, apostropheStartsAttribute);\n\n\t\t// Numbers\n\t\t} else if (IsADigit(sc.ch) || sc.ch == '#') {\n\t\t\tColouriseNumber(sc, apostropheStartsAttribute);\n\n\t\t// Keywords or identifiers\n\t\t} else {\n\t\t\tColouriseWord(sc, keywords, apostropheStartsAttribute);\n\t\t}\n\t}\n\n\tsc.Complete();\n}\n\nstatic inline bool IsDelimiterCharacter(int ch) {\n\tswitch (ch) {\n\tcase '&':\n\tcase '\\'':\n\tcase '(':\n\tcase ')':\n\tcase '*':\n\tcase '+':\n\tcase ',':\n\tcase '-':\n\tcase '.':\n\tcase '/':\n\tcase ':':\n\tcase ';':\n\tcase '<':\n\tcase '=':\n\tcase '>':\n\tcase '|':\n\t\treturn true;\n\tdefault:\n\t\treturn false;\n\t}\n}\n\nstatic inline bool IsSeparatorOrDelimiterCharacter(int ch) {\n\treturn IsASpace(ch) || IsDelimiterCharacter(ch);\n}\n\nstatic bool IsValidIdentifier(const std::string& identifier) {\n\t// First character can't be '_', so initialize the flag to true\n\tbool lastWasUnderscore = true;\n\n\tsize_t length = identifier.length();\n\n\t// Zero-length identifiers are not valid (these can occur inside labels)\n\tif (length == 0) {\n\t\treturn false;\n\t}\n\n\t// Check for valid character at the start\n\tif (!IsWordStartCharacter(identifier[0])) {\n\t\treturn false;\n\t}\n\n\t// Check for only valid characters and no double underscores\n\tfor (size_t i = 0; i < length; i++) {\n\t\tif (!IsWordCharacter(identifier[i]) ||\n\t\t        (identifier[i] == '_' && lastWasUnderscore)) {\n\t\t\treturn false;\n\t\t}\n\t\tlastWasUnderscore = identifier[i] == '_';\n\t}\n\n\t// Check for underscore at the end\n\tif (lastWasUnderscore == true) {\n\t\treturn false;\n\t}\n\n\t// All checks passed\n\treturn true;\n}\n\nstatic bool IsValidNumber(const std::string& number) {\n\tsize_t hashPos = number.find(\"#\");\n\tbool seenDot = false;\n\n\tsize_t i = 0;\n\tsize_t length = number.length();\n\n\tif (length == 0)\n\t\treturn false; // Just in case\n\n\t// Decimal number\n\tif (hashPos == std::string::npos) {\n\t\tbool canBeSpecial = false;\n\n\t\tfor (; i < length; i++) {\n\t\t\tif (number[i] == '_') {\n\t\t\t\tif (!canBeSpecial) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tcanBeSpecial = false;\n\t\t\t} else if (number[i] == '.') {\n\t\t\t\tif (!canBeSpecial || seenDot) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tcanBeSpecial = false;\n\t\t\t\tseenDot = true;\n\t\t\t} else if (IsADigit(number[i])) {\n\t\t\t\tcanBeSpecial = true;\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (!canBeSpecial)\n\t\t\treturn false;\n\t} else {\n\t\t// Based number\n\t\tbool canBeSpecial = false;\n\t\tint base = 0;\n\n\t\t// Parse base\n\t\tfor (; i < length; i++) {\n\t\t\tint ch = number[i];\n\t\t\tif (ch == '_') {\n\t\t\t\tif (!canBeSpecial)\n\t\t\t\t\treturn false;\n\t\t\t\tcanBeSpecial = false;\n\t\t\t} else if (IsADigit(ch)) {\n\t\t\t\tbase = base * 10 + (ch - '0');\n\t\t\t\tif (base > 16)\n\t\t\t\t\treturn false;\n\t\t\t\tcanBeSpecial = true;\n\t\t\t} else if (ch == '#' && canBeSpecial) {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tif (base < 2)\n\t\t\treturn false;\n\t\tif (i == length)\n\t\t\treturn false;\n\n\t\ti++; // Skip over '#'\n\n\t\t// Parse number\n\t\tcanBeSpecial = false;\n\n\t\tfor (; i < length; i++) {\n\t\t\tint ch = tolower(number[i]);\n\n\t\t\tif (ch == '_') {\n\t\t\t\tif (!canBeSpecial) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tcanBeSpecial = false;\n\n\t\t\t} else if (ch == '.') {\n\t\t\t\tif (!canBeSpecial || seenDot) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tcanBeSpecial = false;\n\t\t\t\tseenDot = true;\n\n\t\t\t} else if (IsADigit(ch)) {\n\t\t\t\tif (ch - '0' >= base) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tcanBeSpecial = true;\n\n\t\t\t} else if (ch >= 'a' && ch <= 'f') {\n\t\t\t\tif (ch - 'a' + 10 >= base) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tcanBeSpecial = true;\n\n\t\t\t} else if (ch == '#' && canBeSpecial) {\n\t\t\t\tbreak;\n\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tif (i == length) {\n\t\t\treturn false;\n\t\t}\n\n\t\ti++;\n\t}\n\n\t// Exponent (optional)\n\tif (i < length) {\n\t\tif (number[i] != 'e' && number[i] != 'E')\n\t\t\treturn false;\n\n\t\ti++; // Move past 'E'\n\n\t\tif (i == length) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (number[i] == '+')\n\t\t\ti++;\n\t\telse if (number[i] == '-') {\n\t\t\tif (seenDot) {\n\t\t\t\ti++;\n\t\t\t} else {\n\t\t\t\treturn false; // Integer literals should not have negative exponents\n\t\t\t}\n\t\t}\n\n\t\tif (i == length) {\n\t\t\treturn false;\n\t\t}\n\n\t\tbool canBeSpecial = false;\n\n\t\tfor (; i < length; i++) {\n\t\t\tif (number[i] == '_') {\n\t\t\t\tif (!canBeSpecial) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tcanBeSpecial = false;\n\t\t\t} else if (IsADigit(number[i])) {\n\t\t\t\tcanBeSpecial = true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tif (!canBeSpecial)\n\t\t\treturn false;\n\t}\n\n\t// if i == length, number was parsed successfully.\n\treturn i == length;\n}\n\nstatic inline bool IsWordCharacter(int ch) {\n\treturn IsWordStartCharacter(ch) || IsADigit(ch);\n}\n\nstatic inline bool IsWordStartCharacter(int ch) {\n\treturn (IsASCII(ch) && isalpha(ch)) || ch == '_';\n}\n"
  },
  {
    "path": "lexilla/lexers/LexAsciidoc.cxx",
    "content": "/******************************************************************\n *  LexAsciidoc.cxx\n *\n *  A simple Asciidoc lexer for scintilla.\n *\n *  Based on the LexMarkdown.cxx by Jon Strait - jstrait@moonloop.net\n *\n *  The License.txt file describes the conditions under which this\n *  software may be distributed.\n *\n *****************************************************************/\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nnamespace {\n\ntypedef struct {\n    bool start;\n    int len1;\n    int len2;\n    const char *name;\n} MacroItem;\n\nstatic const MacroItem MacroList[] = {\n    // Directives\n    {true,  5, 2, \"ifdef::\"},\n    {true,  6, 2, \"ifeval::\"},\n    {true,  6, 2, \"ifndef::\"},\n    {true,  5, 2, \"endif::\"},\n    // Macros\n    {true,  5, 2, \"audio::\"},\n    {true,  7, 2, \"include::\"},\n    {true,  5, 2, \"image::\"},\n    {true,  5, 2, \"video::\"},\n    {false, 8, 1, \"asciimath:\"},\n    {false, 3, 1, \"btn:\"},\n    {false, 5, 1, \"image:\"},\n    {false, 3, 1, \"kbd:\"},\n    {false, 9, 1, \"latexmath:\"},\n    {false, 4, 1, \"link:\"},\n    {false, 6, 1, \"mailto:\"},\n    {false, 4, 1, \"menu:\"},\n    {false, 4, 1, \"pass:\"},\n    {false, 4, 1, \"stem:\"},\n    {false, 4, 1, \"xref:\"},\n    // Admonitions\n    {true,  7, 1, \"CAUTION:\"},\n    {true,  9, 1, \"IMPORTANT:\"},\n    {true,  4, 1, \"NOTE:\"},\n    {true,  3, 1, \"TIP:\"},\n    {true,  7, 1, \"WARNING:\"},\n    {false, 0, 0, NULL}\n};\n\nconstexpr bool IsNewline(const int ch) {\n    // sc.GetRelative(i) returns '\\0' if out of range\n    return (ch == '\\n' || ch == '\\r' || ch == '\\0');\n}\n\n}\n\nstatic bool AtTermStart(StyleContext &sc) {\n    return sc.currentPos == 0 || sc.chPrev == 0 || isspacechar(sc.chPrev);\n}\n\nstatic void ColorizeAsciidocDoc(Sci_PositionU startPos, Sci_Position length, int initStyle,\n                                WordList **, Accessor &styler) {\n    bool freezeCursor = false;\n\n    StyleContext sc(startPos, static_cast<Sci_PositionU>(length), initStyle, styler);\n\n    while (sc.More()) {\n        // Skip past escaped characters\n        if (sc.ch == '\\\\') {\n            sc.Forward();\n            continue;\n        }\n\n        // Skip newline.\n        if (IsNewline(sc.ch)) {\n            // Newline doesn't end blocks\n            if (sc.state != SCE_ASCIIDOC_CODEBK && \\\n                sc.state != SCE_ASCIIDOC_PASSBK && \\\n                sc.state != SCE_ASCIIDOC_COMMENTBK && \\\n                sc.state != SCE_ASCIIDOC_LITERALBK) {\n                sc.SetState(SCE_ASCIIDOC_DEFAULT);\n            }\n            sc.Forward();\n            continue;\n        }\n\n        // Conditional state-based actions\n        switch (sc.state) {\n\n        // Strong\n        case SCE_ASCIIDOC_STRONG1:\n            if (sc.ch == '*' && sc.chPrev != ' ') {\n                sc.Forward();\n                sc.SetState(SCE_ASCIIDOC_DEFAULT);\n                freezeCursor = true;\n            }\n            break;\n        case SCE_ASCIIDOC_STRONG2:\n            if (sc.Match(\"**\") && sc.chPrev != ' ') {\n                sc.Forward(2);\n                sc.SetState(SCE_ASCIIDOC_DEFAULT);\n                freezeCursor = true;\n            }\n            break;\n\n        // Emphasis\n        case SCE_ASCIIDOC_EM1:\n            if (sc.ch == '_' && sc.chPrev != ' ') {\n                sc.Forward();\n                sc.SetState(SCE_ASCIIDOC_DEFAULT);\n                freezeCursor = true;\n            }\n            break;\n        case SCE_ASCIIDOC_EM2:\n            if (sc.Match(\"__\") && sc.chPrev != ' ') {\n                sc.Forward(2);\n                sc.SetState(SCE_ASCIIDOC_DEFAULT);\n                freezeCursor = true;\n            }\n            break;\n\n        // Link\n        case SCE_ASCIIDOC_LINK:\n            if (sc.ch == ']' && sc.chPrev != '\\\\') {\n                sc.SetState(SCE_ASCIIDOC_DEFAULT);\n            }\n            break;\n\n        // Code block\n        case SCE_ASCIIDOC_CODEBK:\n            if (sc.atLineStart && sc.Match(\"----\") && IsNewline(sc.GetRelative(4))) {\n                sc.Forward(4);\n                sc.SetState(SCE_ASCIIDOC_DEFAULT);\n            }\n            break;\n\n        // Passthrough block\n        case SCE_ASCIIDOC_PASSBK:\n            if (sc.atLineStart && sc.Match(\"++++\") && IsNewline(sc.GetRelative(4))) {\n                sc.Forward(4);\n                sc.SetState(SCE_ASCIIDOC_DEFAULT);\n            }\n            break;\n\n        // Comment block\n        case SCE_ASCIIDOC_COMMENTBK:\n            if (sc.atLineStart && sc.Match(\"////\") && IsNewline(sc.GetRelative(4))) {\n                sc.Forward(4);\n                sc.SetState(SCE_ASCIIDOC_DEFAULT);\n            }\n            break;\n\n        // Literal\n        case SCE_ASCIIDOC_LITERAL:\n            if (sc.ch == '+' && sc.chPrev != '\\\\') {\n                sc.SetState(SCE_ASCIIDOC_DEFAULT);\n            }\n            break;\n\n        // Literal block\n        case SCE_ASCIIDOC_LITERALBK:\n            if (sc.atLineStart && sc.Match(\"....\") && IsNewline(sc.GetRelative(4))) {\n                sc.Forward(4);\n                sc.SetState(SCE_ASCIIDOC_DEFAULT);\n            }\n            break;\n\n        // Attribute\n        case SCE_ASCIIDOC_ATTRIB:\n            if (sc.ch == ':' && sc.chPrev != ' ' && sc.chNext == ' ') {\n                sc.Forward();\n                sc.SetState(SCE_ASCIIDOC_ATTRIBVAL);\n            }\n            break;\n\n        // Macro\n        case SCE_ASCIIDOC_MACRO:\n            if (sc.ch == ']' && sc.chPrev != '\\\\') {\n                sc.SetState(SCE_ASCIIDOC_DEFAULT);\n            }\n            break;\n\n        // Default\n        case SCE_ASCIIDOC_DEFAULT:\n            // Headers\n            if (sc.atLineStart && sc.Match(\"====== \")) {\n                sc.SetState(SCE_ASCIIDOC_HEADER6);\n                sc.Forward(6);\n            }\n            else if (sc.atLineStart && sc.Match(\"===== \")) {\n                sc.SetState(SCE_ASCIIDOC_HEADER5);\n                sc.Forward(5);\n            }\n            else if (sc.atLineStart && sc.Match(\"==== \")) {\n                sc.SetState(SCE_ASCIIDOC_HEADER4);\n                sc.Forward(4);\n            }\n            else if (sc.atLineStart && sc.Match(\"=== \")) {\n                sc.SetState(SCE_ASCIIDOC_HEADER3);\n                sc.Forward(3);\n            }\n            else if (sc.atLineStart && sc.Match(\"== \")) {\n                sc.SetState(SCE_ASCIIDOC_HEADER2);\n                sc.Forward(2);\n            }\n            else if (sc.atLineStart && sc.Match(\"= \")) {\n                sc.SetState(SCE_ASCIIDOC_HEADER1);\n                sc.Forward(1);\n            }\n            // Unordered list item\n            else if (sc.atLineStart && sc.Match(\"****** \")) {\n                sc.SetState(SCE_ASCIIDOC_ULIST_ITEM);\n                sc.Forward(6);\n                sc.SetState(SCE_ASCIIDOC_DEFAULT);\n            }\n            else if (sc.atLineStart && sc.Match(\"***** \")) {\n                sc.SetState(SCE_ASCIIDOC_ULIST_ITEM);\n                sc.Forward(5);\n                sc.SetState(SCE_ASCIIDOC_DEFAULT);\n            }\n            else if (sc.atLineStart && sc.Match(\"**** \")) {\n                sc.SetState(SCE_ASCIIDOC_ULIST_ITEM);\n                sc.Forward(4);\n                sc.SetState(SCE_ASCIIDOC_DEFAULT);\n            }\n            else if (sc.atLineStart && sc.Match(\"*** \")) {\n                sc.SetState(SCE_ASCIIDOC_ULIST_ITEM);\n                sc.Forward(3);\n                sc.SetState(SCE_ASCIIDOC_DEFAULT);\n            }\n            else if (sc.atLineStart && sc.Match(\"** \")) {\n                sc.SetState(SCE_ASCIIDOC_ULIST_ITEM);\n                sc.Forward(2);\n                sc.SetState(SCE_ASCIIDOC_DEFAULT);\n            }\n            else if (sc.atLineStart && sc.Match(\"* \")) {\n                sc.SetState(SCE_ASCIIDOC_ULIST_ITEM);\n                sc.Forward(1);\n                sc.SetState(SCE_ASCIIDOC_DEFAULT);\n            }\n            // Ordered list item\n            else if (sc.atLineStart && sc.Match(\"...... \")) {\n                sc.SetState(SCE_ASCIIDOC_OLIST_ITEM);\n                sc.Forward(6);\n                sc.SetState(SCE_ASCIIDOC_DEFAULT);\n            }\n            else if (sc.atLineStart && sc.Match(\"..... \")) {\n                sc.SetState(SCE_ASCIIDOC_OLIST_ITEM);\n                sc.Forward(5);\n                sc.SetState(SCE_ASCIIDOC_DEFAULT);\n            }\n            else if (sc.atLineStart && sc.Match(\".... \")) {\n                sc.SetState(SCE_ASCIIDOC_OLIST_ITEM);\n                sc.Forward(4);\n                sc.SetState(SCE_ASCIIDOC_DEFAULT);\n            }\n            else if (sc.atLineStart && sc.Match(\"... \")) {\n                sc.SetState(SCE_ASCIIDOC_OLIST_ITEM);\n                sc.Forward(3);\n                sc.SetState(SCE_ASCIIDOC_DEFAULT);\n            }\n            else if (sc.atLineStart && sc.Match(\".. \")) {\n                sc.SetState(SCE_ASCIIDOC_OLIST_ITEM);\n                sc.Forward(2);\n                sc.SetState(SCE_ASCIIDOC_DEFAULT);\n            }\n            else if (sc.atLineStart && sc.Match(\". \")) {\n                sc.SetState(SCE_ASCIIDOC_OLIST_ITEM);\n                sc.Forward(1);\n                sc.SetState(SCE_ASCIIDOC_DEFAULT);\n            }\n            // Blockquote\n            else if (sc.atLineStart && sc.Match(\"> \")) {\n                sc.SetState(SCE_ASCIIDOC_BLOCKQUOTE);\n                sc.Forward();\n            }\n            // Link\n            else if (!sc.atLineStart && sc.ch == '[' && sc.chPrev != '\\\\' && sc.chNext != ' ') {\n                sc.Forward();\n                sc.SetState(SCE_ASCIIDOC_LINK);\n                freezeCursor = true;\n            }\n            // Code block\n            else if (sc.atLineStart && sc.Match(\"----\") && IsNewline(sc.GetRelative(4))) {\n                sc.SetState(SCE_ASCIIDOC_CODEBK);\n                sc.Forward(4);\n            }\n            // Passthrough block\n            else if (sc.atLineStart && sc.Match(\"++++\") && IsNewline(sc.GetRelative(4))) {\n                sc.SetState(SCE_ASCIIDOC_PASSBK);\n                sc.Forward(4);\n            }\n            // Comment block\n            else if (sc.atLineStart && sc.Match(\"////\") && IsNewline(sc.GetRelative(4))) {\n                sc.SetState(SCE_ASCIIDOC_COMMENTBK);\n                sc.Forward(4);\n            }\n            // Comment\n            else if (sc.atLineStart && sc.Match(\"//\")) {\n                sc.SetState(SCE_ASCIIDOC_COMMENT);\n                sc.Forward();\n            }\n            // Literal\n            else if (sc.ch == '+' && sc.chPrev != '\\\\' && sc.chNext != ' ' && AtTermStart(sc)) {\n                sc.Forward();\n                sc.SetState(SCE_ASCIIDOC_LITERAL);\n                freezeCursor = true;\n            }\n            // Literal block\n            else if (sc.atLineStart && sc.Match(\"....\") && IsNewline(sc.GetRelative(4))) {\n                sc.SetState(SCE_ASCIIDOC_LITERALBK);\n                sc.Forward(4);\n            }\n            // Attribute\n            else if (sc.atLineStart && sc.ch == ':' && sc.chNext != ' ') {\n                sc.SetState(SCE_ASCIIDOC_ATTRIB);\n            }\n            // Strong\n            else if (sc.Match(\"**\") && sc.GetRelative(2) != ' ') {\n                sc.SetState(SCE_ASCIIDOC_STRONG2);\n                sc.Forward();\n            }\n            else if (sc.ch == '*' && sc.chNext != ' ' && AtTermStart(sc)) {\n                sc.SetState(SCE_ASCIIDOC_STRONG1);\n            }\n            // Emphasis\n            else if (sc.Match(\"__\") && sc.GetRelative(2) != ' ') {\n                sc.SetState(SCE_ASCIIDOC_EM2);\n                sc.Forward();\n            }\n            else if (sc.ch == '_' && sc.chNext != ' ' && AtTermStart(sc)) {\n                sc.SetState(SCE_ASCIIDOC_EM1);\n            }\n            // Macro\n            else if (sc.atLineStart && sc.ch == '[' && sc.chNext != ' ') {\n                sc.Forward();\n                sc.SetState(SCE_ASCIIDOC_MACRO);\n                freezeCursor = true;\n            }\n            else {\n                int i = 0;\n                bool found = false;\n                while (!found && MacroList[i].name != NULL) {\n                    if (MacroList[i].start)\n                        found = sc.atLineStart && sc.Match(MacroList[i].name);\n                    else\n                        found = sc.Match(MacroList[i].name);\n                    if (found) {\n                        sc.SetState(SCE_ASCIIDOC_MACRO);\n                        sc.Forward(MacroList[i].len1);\n                        sc.SetState(SCE_ASCIIDOC_DEFAULT);\n                        if (MacroList[i].len2 > 1)\n                            sc.Forward(MacroList[i].len2 - 1);\n                    }\n                    i++;\n                }\n            }\n            break;\n        }\n        // Advance if not holding back the cursor for this iteration.\n        if (!freezeCursor)\n            sc.Forward();\n        freezeCursor = false;\n    }\n    sc.Complete();\n}\n\nLexerModule lmAsciidoc(SCLEX_ASCIIDOC, ColorizeAsciidocDoc, \"asciidoc\");\n"
  },
  {
    "path": "lexilla/lexers/LexAsm.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexAsm.cxx\n ** Lexer for Assembler, just for the MASM syntax\n ** Written by The Black Horus\n ** Enhancements and NASM stuff by Kein-Hong Man, 2003-10\n ** SCE_ASM_COMMENTBLOCK and SCE_ASM_CHARACTER are for future GNU as colouring\n ** Converted to lexer object and added further folding features/properties by \"Udo Lechner\" <dlchnr(at)gmx(dot)net>\n **/\n// Copyright 1998-2003 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n#include <map>\n#include <set>\n#include <functional>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n#include \"OptionSet.h\"\n#include \"DefaultLexer.h\"\n\nusing namespace Scintilla;\nusing namespace Lexilla;\n\nstatic inline bool IsAWordChar(const int ch) {\n\treturn (ch < 0x80) && (isalnum(ch) || ch == '.' ||\n\t\tch == '_' || ch == '?');\n}\n\nstatic inline bool IsAWordStart(const int ch) {\n\treturn (ch < 0x80) && (isalnum(ch) || ch == '_' || ch == '.' ||\n\t\tch == '%' || ch == '@' || ch == '$' || ch == '?');\n}\n\nstatic inline bool IsAsmOperator(const int ch) {\n\tif ((ch < 0x80) && (isalnum(ch)))\n\t\treturn false;\n\t// '.' left out as it is used to make up numbers\n\tif (ch == '*' || ch == '/' || ch == '-' || ch == '+' ||\n\t\tch == '(' || ch == ')' || ch == '=' || ch == '^' ||\n\t\tch == '[' || ch == ']' || ch == '<' || ch == '&' ||\n\t\tch == '>' || ch == ',' || ch == '|' || ch == '~' ||\n\t\tch == '%' || ch == ':')\n\t\treturn true;\n\treturn false;\n}\n\nstatic bool IsStreamCommentStyle(int style) {\n\treturn style == SCE_ASM_COMMENTDIRECTIVE || style == SCE_ASM_COMMENTBLOCK;\n}\n\nstatic inline int LowerCase(int c) {\n\tif (c >= 'A' && c <= 'Z')\n\t\treturn 'a' + c - 'A';\n\treturn c;\n}\n\n// An individual named option for use in an OptionSet\n\n// Options used for LexerAsm\nstruct OptionsAsm {\n\tstd::string delimiter;\n\tbool fold;\n\tbool foldSyntaxBased;\n\tbool foldCommentMultiline;\n\tbool foldCommentExplicit;\n\tstd::string foldExplicitStart;\n\tstd::string foldExplicitEnd;\n\tbool foldExplicitAnywhere;\n\tbool foldCompact;\n\tstd::string commentChar;\n\tOptionsAsm() {\n\t\tdelimiter = \"\";\n\t\tfold = false;\n\t\tfoldSyntaxBased = true;\n\t\tfoldCommentMultiline = false;\n\t\tfoldCommentExplicit = false;\n\t\tfoldExplicitStart = \"\";\n\t\tfoldExplicitEnd   = \"\";\n\t\tfoldExplicitAnywhere = false;\n\t\tfoldCompact = true;\n\t\tcommentChar = \"\";\n\t}\n};\n\nstatic const char * const asmWordListDesc[] = {\n\t\"CPU instructions\",\n\t\"FPU instructions\",\n\t\"Registers\",\n\t\"Directives\",\n\t\"Directive operands\",\n\t\"Extended instructions\",\n\t\"Directives4Foldstart\",\n\t\"Directives4Foldend\",\n\t0\n};\n\nstruct OptionSetAsm : public OptionSet<OptionsAsm> {\n\tOptionSetAsm() {\n\t\tDefineProperty(\"lexer.asm.comment.delimiter\", &OptionsAsm::delimiter,\n\t\t\t\"Character used for COMMENT directive's delimiter, replacing the standard \\\"~\\\".\");\n\n\t\tDefineProperty(\"fold\", &OptionsAsm::fold);\n\n\t\tDefineProperty(\"fold.asm.syntax.based\", &OptionsAsm::foldSyntaxBased,\n\t\t\t\"Set this property to 0 to disable syntax based folding.\");\n\n\t\tDefineProperty(\"fold.asm.comment.multiline\", &OptionsAsm::foldCommentMultiline,\n\t\t\t\"Set this property to 1 to enable folding multi-line comments.\");\n\n\t\tDefineProperty(\"fold.asm.comment.explicit\", &OptionsAsm::foldCommentExplicit,\n\t\t\t\"This option enables folding explicit fold points when using the Asm lexer. \"\n\t\t\t\"Explicit fold points allows adding extra folding by placing a ;{ comment at the start and a ;} \"\n\t\t\t\"at the end of a section that should fold.\");\n\n\t\tDefineProperty(\"fold.asm.explicit.start\", &OptionsAsm::foldExplicitStart,\n\t\t\t\"The string to use for explicit fold start points, replacing the standard ;{.\");\n\n\t\tDefineProperty(\"fold.asm.explicit.end\", &OptionsAsm::foldExplicitEnd,\n\t\t\t\"The string to use for explicit fold end points, replacing the standard ;}.\");\n\n\t\tDefineProperty(\"fold.asm.explicit.anywhere\", &OptionsAsm::foldExplicitAnywhere,\n\t\t\t\"Set this property to 1 to enable explicit fold points anywhere, not just in line comments.\");\n\n\t\tDefineProperty(\"fold.compact\", &OptionsAsm::foldCompact);\n\n\t\tDefineProperty(\"lexer.as.comment.character\", &OptionsAsm::commentChar,\n\t\t\t\"Overrides the default comment character (which is ';' for asm and '#' for as).\");\n\n\t\tDefineWordListSets(asmWordListDesc);\n\t}\n};\n\nclass LexerAsm : public DefaultLexer {\n\tWordList cpuInstruction;\n\tWordList mathInstruction;\n\tWordList registers;\n\tWordList directive;\n\tWordList directiveOperand;\n\tWordList extInstruction;\n\tWordList directives4foldstart;\n\tWordList directives4foldend;\n\tOptionsAsm options;\n\tOptionSetAsm osAsm;\n\tint commentChar;\npublic:\n\tLexerAsm(const char *languageName_, int language_, int commentChar_) : DefaultLexer(languageName_, language_) {\n\t\tcommentChar = commentChar_;\n\t}\n\tvirtual ~LexerAsm() {\n\t}\n\tvoid SCI_METHOD Release() override {\n\t\tdelete this;\n\t}\n\tint SCI_METHOD Version() const override {\n\t\treturn lvRelease5;\n\t}\n\tconst char * SCI_METHOD PropertyNames() override {\n\t\treturn osAsm.PropertyNames();\n\t}\n\tint SCI_METHOD PropertyType(const char *name) override {\n\t\treturn osAsm.PropertyType(name);\n\t}\n\tconst char * SCI_METHOD DescribeProperty(const char *name) override {\n\t\treturn osAsm.DescribeProperty(name);\n\t}\n\tSci_Position SCI_METHOD PropertySet(const char *key, const char *val) override;\n\tconst char * SCI_METHOD PropertyGet(const char *key) override {\n\t\treturn osAsm.PropertyGet(key);\n\t}\n\tconst char * SCI_METHOD DescribeWordListSets() override {\n\t\treturn osAsm.DescribeWordListSets();\n\t}\n\tSci_Position SCI_METHOD WordListSet(int n, const char *wl) override;\n\tvoid SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;\n\tvoid SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;\n\n\tvoid * SCI_METHOD PrivateCall(int, void *) override {\n\t\treturn 0;\n\t}\n\n\tstatic ILexer5 *LexerFactoryAsm() {\n\t\treturn new LexerAsm(\"asm\", SCLEX_ASM, ';');\n\t}\n\n\tstatic ILexer5 *LexerFactoryAs() {\n\t\treturn new LexerAsm(\"as\", SCLEX_AS, '#');\n\t}\n};\n\nSci_Position SCI_METHOD LexerAsm::PropertySet(const char *key, const char *val) {\n\tif (osAsm.PropertySet(&options, key, val)) {\n\t\treturn 0;\n\t}\n\treturn -1;\n}\n\nSci_Position SCI_METHOD LexerAsm::WordListSet(int n, const char *wl) {\n\tWordList *wordListN = 0;\n\tswitch (n) {\n\tcase 0:\n\t\twordListN = &cpuInstruction;\n\t\tbreak;\n\tcase 1:\n\t\twordListN = &mathInstruction;\n\t\tbreak;\n\tcase 2:\n\t\twordListN = &registers;\n\t\tbreak;\n\tcase 3:\n\t\twordListN = &directive;\n\t\tbreak;\n\tcase 4:\n\t\twordListN = &directiveOperand;\n\t\tbreak;\n\tcase 5:\n\t\twordListN = &extInstruction;\n\t\tbreak;\n\tcase 6:\n\t\twordListN = &directives4foldstart;\n\t\tbreak;\n\tcase 7:\n\t\twordListN = &directives4foldend;\n\t\tbreak;\n\t}\n\tSci_Position firstModification = -1;\n\tif (wordListN) {\n\t\tif (wordListN->Set(wl)) {\n\t\t\tfirstModification = 0;\n\t\t}\n\t}\n\treturn firstModification;\n}\n\nvoid SCI_METHOD LexerAsm::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) {\n\tLexAccessor styler(pAccess);\n\n\tconst char commentCharacter = options.commentChar.empty() ?\n\t\tcommentChar : options.commentChar.front();\n\n\t// Do not leak onto next line\n\tif (initStyle == SCE_ASM_STRINGEOL)\n\t\tinitStyle = SCE_ASM_DEFAULT;\n\n\tStyleContext sc(startPos, length, initStyle, styler);\n\n\tfor (; sc.More(); sc.Forward())\n\t{\n\n\t\tif (sc.atLineStart) {\n\t\t\tswitch (sc.state) {\n\t\t\tcase SCE_ASM_STRING:\n\t\t\tcase SCE_ASM_CHARACTER:\n\t\t\t\t// Prevent SCE_ASM_STRINGEOL from leaking back to previous line\n\t\t\t\tsc.SetState(sc.state);\n\t\t\t\tbreak;\n\t\t\tcase SCE_ASM_COMMENT:\n\t\t\t\tsc.SetState(SCE_ASM_DEFAULT);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// Handle line continuation generically.\n\t\tif (sc.ch == '\\\\') {\n\t\t\tif (sc.chNext == '\\n' || sc.chNext == '\\r') {\n\t\t\t\tsc.Forward();\n\t\t\t\tif (sc.ch == '\\r' && sc.chNext == '\\n') {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\t// Determine if the current state should terminate.\n\t\tif (sc.state == SCE_ASM_OPERATOR) {\n\t\t\tif (!IsAsmOperator(sc.ch)) {\n\t\t\t    sc.SetState(SCE_ASM_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_ASM_NUMBER) {\n\t\t\tif (!IsAWordChar(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_ASM_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_ASM_IDENTIFIER) {\n\t\t\tif (!IsAWordChar(sc.ch) ) {\n\t\t\t\tchar s[100];\n\t\t\t\tsc.GetCurrentLowered(s, sizeof(s));\n\t\t\t\tbool IsDirective = false;\n\n\t\t\t\tif (cpuInstruction.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_ASM_CPUINSTRUCTION);\n\t\t\t\t} else if (mathInstruction.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_ASM_MATHINSTRUCTION);\n\t\t\t\t} else if (registers.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_ASM_REGISTER);\n\t\t\t\t}  else if (directive.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_ASM_DIRECTIVE);\n\t\t\t\t\tIsDirective = true;\n\t\t\t\t} else if (directiveOperand.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_ASM_DIRECTIVEOPERAND);\n\t\t\t\t} else if (extInstruction.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_ASM_EXTINSTRUCTION);\n\t\t\t\t}\n\t\t\t\tsc.SetState(SCE_ASM_DEFAULT);\n\t\t\t\tif (IsDirective && !strcmp(s, \"comment\")) {\n\t\t\t\t\tchar delimiter = options.delimiter.empty() ? '~' : options.delimiter.c_str()[0];\n\t\t\t\t\twhile (IsASpaceOrTab(sc.ch) && !sc.atLineEnd) {\n\t\t\t\t\t\tsc.ForwardSetState(SCE_ASM_DEFAULT);\n\t\t\t\t\t}\n\t\t\t\t\tif (sc.ch == delimiter) {\n\t\t\t\t\t\tsc.SetState(SCE_ASM_COMMENTDIRECTIVE);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (sc.state == SCE_ASM_COMMENTDIRECTIVE) {\n\t\t\tchar delimiter = options.delimiter.empty() ? '~' : options.delimiter.c_str()[0];\n\t\t\tif (sc.ch == delimiter) {\n\t\t\t\twhile (!sc.MatchLineEnd()) {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t}\n\t\t\t\tsc.SetState(SCE_ASM_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_ASM_STRING) {\n\t\t\tif (sc.ch == '\\\\') {\n\t\t\t\tif (sc.chNext == '\\\"' || sc.chNext == '\\'' || sc.chNext == '\\\\') {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t}\n\t\t\t} else if (sc.ch == '\\\"') {\n\t\t\t\tsc.ForwardSetState(SCE_ASM_DEFAULT);\n\t\t\t} else if (sc.atLineEnd) {\n\t\t\t\tsc.ChangeState(SCE_ASM_STRINGEOL);\n\t\t\t\tsc.ForwardSetState(SCE_ASM_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_ASM_CHARACTER) {\n\t\t\tif (sc.ch == '\\\\') {\n\t\t\t\tif (sc.chNext == '\\\"' || sc.chNext == '\\'' || sc.chNext == '\\\\') {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t}\n\t\t\t} else if (sc.ch == '\\'') {\n\t\t\t\tsc.ForwardSetState(SCE_ASM_DEFAULT);\n\t\t\t} else if (sc.atLineEnd) {\n\t\t\t\tsc.ChangeState(SCE_ASM_STRINGEOL);\n\t\t\t\tsc.ForwardSetState(SCE_ASM_DEFAULT);\n\t\t\t}\n\t\t}\n\n\t\t// Determine if a new state should be entered.\n\t\tif (sc.state == SCE_ASM_DEFAULT) {\n\t\t\tif (sc.ch == commentCharacter) {\n\t\t\t\tsc.SetState(SCE_ASM_COMMENT);\n\t\t\t} else if (IsASCII(sc.ch) && (isdigit(sc.ch) || (sc.ch == '.' && IsASCII(sc.chNext) && isdigit(sc.chNext)))) {\n\t\t\t\tsc.SetState(SCE_ASM_NUMBER);\n\t\t\t} else if (IsAWordStart(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_ASM_IDENTIFIER);\n\t\t\t} else if (sc.ch == '\\\"') {\n\t\t\t\tsc.SetState(SCE_ASM_STRING);\n\t\t\t} else if (sc.ch == '\\'') {\n\t\t\t\tsc.SetState(SCE_ASM_CHARACTER);\n\t\t\t} else if (IsAsmOperator(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_ASM_OPERATOR);\n\t\t\t}\n\t\t}\n\n\t}\n\tsc.Complete();\n}\n\n// Store both the current line's fold level and the next lines in the\n// level store to make it easy to pick up with each increment\n// and to make it possible to fiddle the current level for \"else\".\n\nvoid SCI_METHOD LexerAsm::Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) {\n\n\tif (!options.fold)\n\t\treturn;\n\n\tLexAccessor styler(pAccess);\n\n\tSci_PositionU endPos = startPos + length;\n\tint visibleChars = 0;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tint levelCurrent = SC_FOLDLEVELBASE;\n\tif (lineCurrent > 0)\n\t\tlevelCurrent = styler.LevelAt(lineCurrent-1) >> 16;\n\tint levelNext = levelCurrent;\n\tchar chNext = styler[startPos];\n\tint styleNext = styler.StyleAt(startPos);\n\tint style = initStyle;\n\tchar word[100];\n\tint wordlen = 0;\n\tconst bool userDefinedFoldMarkers = !options.foldExplicitStart.empty() && !options.foldExplicitEnd.empty();\n\tfor (Sci_PositionU i = startPos; i < endPos; i++) {\n\t\tchar ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\tint stylePrev = style;\n\t\tstyle = styleNext;\n\t\tstyleNext = styler.StyleAt(i + 1);\n\t\tbool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n\t\tif (options.foldCommentMultiline && IsStreamCommentStyle(style)) {\n\t\t\tif (!IsStreamCommentStyle(stylePrev)) {\n\t\t\t\tlevelNext++;\n\t\t\t} else if (!IsStreamCommentStyle(styleNext) && !atEOL) {\n\t\t\t\t// Comments don't end at end of line and the next character may be unstyled.\n\t\t\t\tlevelNext--;\n\t\t\t}\n\t\t}\n\t\tif (options.foldCommentExplicit && ((style == SCE_ASM_COMMENT) || options.foldExplicitAnywhere)) {\n\t\t\tif (userDefinedFoldMarkers) {\n\t\t\t\tif (styler.Match(i, options.foldExplicitStart.c_str())) {\n \t\t\t\t\tlevelNext++;\n\t\t\t\t} else if (styler.Match(i, options.foldExplicitEnd.c_str())) {\n \t\t\t\t\tlevelNext--;\n \t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (ch == ';') {\n\t\t\t\t\tif (chNext == '{') {\n\t\t\t\t\t\tlevelNext++;\n\t\t\t\t\t} else if (chNext == '}') {\n\t\t\t\t\t\tlevelNext--;\n\t\t\t\t\t}\n\t\t\t\t}\n \t\t\t}\n \t\t}\n\t\tif (options.foldSyntaxBased && (style == SCE_ASM_DIRECTIVE)) {\n\t\t\tword[wordlen++] = static_cast<char>(LowerCase(ch));\n\t\t\tif (wordlen == 100) {                   // prevent overflow\n\t\t\t\tword[0] = '\\0';\n\t\t\t\twordlen = 1;\n\t\t\t}\n\t\t\tif (styleNext != SCE_ASM_DIRECTIVE) {   // reading directive ready\n\t\t\t\tword[wordlen] = '\\0';\n\t\t\t\twordlen = 0;\n\t\t\t\tif (directives4foldstart.InList(word)) {\n\t\t\t\t\tlevelNext++;\n\t\t\t\t} else if (directives4foldend.InList(word)){\n\t\t\t\t\tlevelNext--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (!IsASpace(ch))\n\t\t\tvisibleChars++;\n\t\tif (atEOL || (i == endPos-1)) {\n\t\t\tint levelUse = levelCurrent;\n\t\t\tint lev = levelUse | levelNext << 16;\n\t\t\tif (visibleChars == 0 && options.foldCompact)\n\t\t\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\t\t\tif (levelUse < levelNext)\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\tif (lev != styler.LevelAt(lineCurrent)) {\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\t\t\t}\n\t\t\tlineCurrent++;\n\t\t\tlevelCurrent = levelNext;\n\t\t\tif (atEOL && (i == static_cast<Sci_PositionU>(styler.Length() - 1))) {\n\t\t\t\t// There is an empty line at end of file so give it same level and empty\n\t\t\t\tstyler.SetLevel(lineCurrent, (levelCurrent | levelCurrent << 16) | SC_FOLDLEVELWHITEFLAG);\n\t\t\t}\n\t\t\tvisibleChars = 0;\n\t\t}\n\t}\n}\n\nLexerModule lmAsm(SCLEX_ASM, LexerAsm::LexerFactoryAsm, \"asm\", asmWordListDesc);\nLexerModule lmAs(SCLEX_AS, LexerAsm::LexerFactoryAs, \"as\", asmWordListDesc);\n\n"
  },
  {
    "path": "lexilla/lexers/LexAsn1.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexAsn1.cxx\n ** Lexer for ASN.1\n **/\n// Copyright 2004 by Herr Pfarrer rpfarrer <at> yahoo <dot> de\n// Last Updated: 20/07/2004\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\n// Some char test functions\nstatic bool isAsn1Number(int ch)\n{\n\treturn (ch >= '0' && ch <= '9');\n}\n\nstatic bool isAsn1Letter(int ch)\n{\n\treturn (ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z');\n}\n\nstatic bool isAsn1Char(int ch)\n{\n\treturn (ch == '-' ) || isAsn1Number(ch) || isAsn1Letter (ch);\n}\n\n//\n//\tFunction determining the color of a given code portion\n//\tBased on a \"state\"\n//\nstatic void ColouriseAsn1Doc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordLists[], Accessor &styler)\n{\n\t// The keywords\n\tWordList &Keywords = *keywordLists[0];\n\tWordList &Attributes = *keywordLists[1];\n\tWordList &Descriptors = *keywordLists[2];\n\tWordList &Types = *keywordLists[3];\n\n\t// Parse the whole buffer character by character using StyleContext\n\tStyleContext sc(startPos, length, initStyle, styler);\n\tfor (; sc.More(); sc.Forward())\n\t{\n\t\t// The state engine\n\t\tswitch (sc.state)\n\t\t{\n\t\tcase SCE_ASN1_DEFAULT:\t\t// Plain characters\nasn1_default:\n\t\t\tif (sc.ch == '-' && sc.chNext == '-')\n\t\t\t\t// A comment begins here\n\t\t\t\tsc.SetState(SCE_ASN1_COMMENT);\n\t\t\telse if (sc.ch == '\"')\n\t\t\t\t// A string begins here\n\t\t\t\tsc.SetState(SCE_ASN1_STRING);\n\t\t\telse if (isAsn1Number (sc.ch))\n\t\t\t\t// A number starts here (identifier should start with a letter in ASN.1)\n\t\t\t\tsc.SetState(SCE_ASN1_SCALAR);\n\t\t\telse if (isAsn1Char (sc.ch))\n\t\t\t\t// An identifier starts here (identifier always start with a letter)\n\t\t\t\tsc.SetState(SCE_ASN1_IDENTIFIER);\n\t\t\telse if (sc.ch == ':')\n\t\t\t\t// A ::= operator starts here\n\t\t\t\tsc.SetState(SCE_ASN1_OPERATOR);\n\t\t\tbreak;\n\t\tcase SCE_ASN1_COMMENT:\t\t// A comment\n\t\t\tif (sc.ch == '\\r' || sc.ch == '\\n')\n\t\t\t\t// A comment ends here\n\t\t\t\tsc.SetState(SCE_ASN1_DEFAULT);\n\t\t\tbreak;\n\t\tcase SCE_ASN1_IDENTIFIER:\t// An identifier (keyword, attribute, descriptor or type)\n\t\t\tif (!isAsn1Char (sc.ch))\n\t\t\t{\n\t\t\t\t// The end of identifier is here: we can look for it in lists by now and change its state\n\t\t\t\tchar s[100];\n\t\t\t\tsc.GetCurrent(s, sizeof(s));\n\t\t\t\tif (Keywords.InList(s))\n\t\t\t\t\t// It's a keyword, change its state\n\t\t\t\t\tsc.ChangeState(SCE_ASN1_KEYWORD);\n\t\t\t\telse if (Attributes.InList(s))\n\t\t\t\t\t// It's an attribute, change its state\n\t\t\t\t\tsc.ChangeState(SCE_ASN1_ATTRIBUTE);\n\t\t\t\telse if (Descriptors.InList(s))\n\t\t\t\t\t// It's a descriptor, change its state\n\t\t\t\t\tsc.ChangeState(SCE_ASN1_DESCRIPTOR);\n\t\t\t\telse if (Types.InList(s))\n\t\t\t\t\t// It's a type, change its state\n\t\t\t\t\tsc.ChangeState(SCE_ASN1_TYPE);\n\n\t\t\t\t// Set to default now\n\t\t\t\tsc.SetState(SCE_ASN1_DEFAULT);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_ASN1_STRING:\t\t// A string delimited by \"\"\n\t\t\tif (sc.ch == '\"')\n\t\t\t{\n\t\t\t\t// A string ends here\n\t\t\t\tsc.ForwardSetState(SCE_ASN1_DEFAULT);\n\n\t\t\t\t// To correctly manage a char sticking to the string quote\n\t\t\t\tgoto asn1_default;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_ASN1_SCALAR:\t\t// A plain number\n\t\t\tif (!isAsn1Number (sc.ch))\n\t\t\t\t// A number ends here\n\t\t\t\tsc.SetState(SCE_ASN1_DEFAULT);\n\t\t\tbreak;\n\t\tcase SCE_ASN1_OPERATOR:\t\t// The affectation operator ::= and wath follows (eg: ::= { org 6 } OID or ::= 12 trap)\n\t\t\tif (sc.ch == '{')\n\t\t\t{\n\t\t\t\t// An OID definition starts here: enter the sub loop\n\t\t\t\tfor (; sc.More(); sc.Forward())\n\t\t\t\t{\n\t\t\t\t\tif (isAsn1Number (sc.ch) && (!isAsn1Char (sc.chPrev) || isAsn1Number (sc.chPrev)))\n\t\t\t\t\t\t// The OID number is highlighted\n\t\t\t\t\t\tsc.SetState(SCE_ASN1_OID);\n\t\t\t\t\telse if (isAsn1Char (sc.ch))\n\t\t\t\t\t\t// The OID parent identifier is plain\n\t\t\t\t\t\tsc.SetState(SCE_ASN1_IDENTIFIER);\n\t\t\t\t\telse\n\t\t\t\t\t\tsc.SetState(SCE_ASN1_DEFAULT);\n\n\t\t\t\t\tif (sc.ch == '}')\n\t\t\t\t\t\t// Here ends the OID and the operator sub loop: go back to main loop\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (isAsn1Number (sc.ch))\n\t\t\t{\n\t\t\t\t// A trap number definition starts here: enter the sub loop\n\t\t\t\tfor (; sc.More(); sc.Forward())\n\t\t\t\t{\n\t\t\t\t\tif (isAsn1Number (sc.ch))\n\t\t\t\t\t\t// The trap number is highlighted\n\t\t\t\t\t\tsc.SetState(SCE_ASN1_OID);\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// The number ends here: go back to main loop\n\t\t\t\t\t\tsc.SetState(SCE_ASN1_DEFAULT);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (sc.ch != ':' && sc.ch != '=' && sc.ch != ' ')\n\t\t\t\t// The operator doesn't imply an OID definition nor a trap, back to main loop\n\t\t\t\tgoto asn1_default; // To be sure to handle actually the state change\n\t\t\tbreak;\n\t\t}\n\t}\n\tsc.Complete();\n}\n\nstatic void FoldAsn1Doc(Sci_PositionU, Sci_Position, int, WordList *[], Accessor &styler)\n{\n\t// No folding enabled, no reason to continue...\n\tif( styler.GetPropertyInt(\"fold\") == 0 )\n\t\treturn;\n\n\t// No folding implemented: doesn't make sense for ASN.1\n}\n\nstatic const char * const asn1WordLists[] = {\n\t\"Keywords\",\n\t\"Attributes\",\n\t\"Descriptors\",\n\t\"Types\",\n\t0, };\n\n\nLexerModule lmAsn1(SCLEX_ASN1, ColouriseAsn1Doc, \"asn1\", FoldAsn1Doc, asn1WordLists);\n"
  },
  {
    "path": "lexilla/lexers/LexBaan.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexBaan.cxx\n** Lexer for Baan.\n** Based heavily on LexCPP.cxx\n**/\n// Copyright 2001- by Vamsi Potluru <vamsi@who.net> & Praveen Ambekar <ambekarpraveen@yahoo.com>\n// Maintainer Email: oirfeodent@yahoo.co.in\n// The License.txt file describes the conditions under which this software may be distributed.\n\n// C standard library\n#include <stdlib.h>\n#include <string.h>\n\n// C++ wrappers of C standard library\n#include <cassert>\n\n// C++ standard library\n#include <string>\n#include <string_view>\n#include <map>\n#include <functional>\n\n// Scintilla headers\n\n// Non-platform-specific headers\n\n// include\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n// lexlib\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n#include \"OptionSet.h\"\n#include \"DefaultLexer.h\"\n\nusing namespace Scintilla;\nusing namespace Lexilla;\n\nnamespace {\n// Use an unnamed namespace to protect the functions and classes from name conflicts\n\n// Options used for LexerBaan\nstruct OptionsBaan {\n\tbool fold;\n\tbool foldComment;\n\tbool foldPreprocessor;\n\tbool foldCompact;\n\tbool baanFoldSyntaxBased;\n\tbool baanFoldKeywordsBased;\n\tbool baanFoldSections;\n\tbool baanFoldInnerLevel;\n\tbool baanStylingWithinPreprocessor;\n\tOptionsBaan() {\n\t\tfold = false;\n\t\tfoldComment = false;\n\t\tfoldPreprocessor = false;\n\t\tfoldCompact = false;\n\t\tbaanFoldSyntaxBased = false;\n\t\tbaanFoldKeywordsBased = false;\n\t\tbaanFoldSections = false;\n\t\tbaanFoldInnerLevel = false;\n\t\tbaanStylingWithinPreprocessor = false;\n\t}\n};\n\nconst char *const baanWordLists[] = {\n\t\"Baan & BaanSQL Reserved Keywords \",\n\t\"Baan Standard functions\",\n\t\"Baan Functions Abridged\",\n\t\"Baan Main Sections \",\n\t\"Baan Sub Sections\",\n\t\"PreDefined Variables\",\n\t\"PreDefined Attributes\",\n\t\"Enumerates\",\n\t0,\n};\n\nstruct OptionSetBaan : public OptionSet<OptionsBaan> {\n\tOptionSetBaan() {\n\t\tDefineProperty(\"fold\", &OptionsBaan::fold);\n\n\t\tDefineProperty(\"fold.comment\", &OptionsBaan::foldComment);\n\n\t\tDefineProperty(\"fold.preprocessor\", &OptionsBaan::foldPreprocessor);\n\n\t\tDefineProperty(\"fold.compact\", &OptionsBaan::foldCompact);\n\n\t\tDefineProperty(\"fold.baan.syntax.based\", &OptionsBaan::baanFoldSyntaxBased,\n\t\t\t\"Set this property to 0 to disable syntax based folding, which is folding based on '{' & '('.\");\n\n\t\tDefineProperty(\"fold.baan.keywords.based\", &OptionsBaan::baanFoldKeywordsBased,\n\t\t\t\"Set this property to 0 to disable keywords based folding, which is folding based on \"\n\t\t\t\" for, if, on (case), repeat, select, while and fold ends based on endfor, endif, endcase, until, endselect, endwhile respectively.\"\n\t\t\t\"Also folds declarations which are grouped together.\");\n\n\t\tDefineProperty(\"fold.baan.sections\", &OptionsBaan::baanFoldSections,\n\t\t\t\"Set this property to 0 to disable folding of Main Sections as well as Sub Sections.\");\n\n\t\tDefineProperty(\"fold.baan.inner.level\", &OptionsBaan::baanFoldInnerLevel,\n\t\t\t\"Set this property to 1 to enable folding of inner levels of select statements.\"\n\t\t\t\"Disabled by default. case and if statements are also eligible\" );\n\n\t\tDefineProperty(\"lexer.baan.styling.within.preprocessor\", &OptionsBaan::baanStylingWithinPreprocessor,\n\t\t\t\"For Baan code, determines whether all preprocessor code is styled in the \"\n\t\t\t\"preprocessor style (0, the default) or only from the initial # to the end \"\n\t\t\t\"of the command word(1).\");\n\n\t\tDefineWordListSets(baanWordLists);\n\t}\n};\n\nstatic inline bool IsAWordChar(const int  ch) {\n\treturn (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_' || ch == '$');\n}\n\nstatic inline bool IsAnOperator(int ch) {\n\tif (IsAlphaNumeric(ch))\n\t\treturn false;\n\tif (ch == '#' || ch == '^' || ch == '&' || ch == '*' ||\n\t\tch == '(' || ch == ')' || ch == '-' || ch == '+' ||\n\t\tch == '=' || ch == '|' || ch == '{' || ch == '}' ||\n\t\tch == '[' || ch == ']' || ch == ':' || ch == ';' ||\n\t\tch == '<' || ch == '>' || ch == ',' || ch == '/' ||\n\t\tch == '?' || ch == '!' || ch == '\"' || ch == '~' ||\n\t\tch == '\\\\')\n\t\treturn true;\n\treturn false;\n}\n\nstatic inline int IsAnyOtherIdentifier(char *s, Sci_Position sLength) {\n\n\t/*\tIsAnyOtherIdentifier uses standard templates used in baan.\n\tThe matching template is shown as comments just above the return condition.\n\t^ - refers to any character [a-z].\n\t# - refers to any number [0-9].\n\tOther characters shown are compared as is.\n\tTried implementing with Regex... it was too complicated for me.\n\tAny other implementation suggestion welcome.\n\t*/\n\tswitch (sLength) {\n\tcase 8:\n\t\tif (isalpha(s[0]) && isalpha(s[1]) && isalpha(s[2]) && isalpha(s[3]) && isalpha(s[4]) && IsADigit(s[5]) && IsADigit(s[6]) && IsADigit(s[7])) {\n\t\t\t//^^^^^###\n\t\t\treturn(SCE_BAAN_TABLEDEF);\n\t\t}\n\t\tbreak;\n\tcase 9:\n\t\tif (s[0] == 't' && isalpha(s[1]) && isalpha(s[2]) && isalpha(s[3]) && isalpha(s[4]) && isalpha(s[5]) && IsADigit(s[6]) && IsADigit(s[7]) && IsADigit(s[8])) {\n\t\t\t//t^^^^^###\n\t\t\treturn(SCE_BAAN_TABLEDEF);\n\t\t}\n\t\telse if (s[8] == '.' && isalpha(s[0]) && isalpha(s[1]) && isalpha(s[2]) && isalpha(s[3]) && isalpha(s[4]) && IsADigit(s[5]) && IsADigit(s[6]) && IsADigit(s[7])) {\n\t\t\t//^^^^^###.\n\t\t\treturn(SCE_BAAN_TABLESQL);\n\t\t}\n\t\tbreak;\n\tcase 13:\n\t\tif (s[8] == '.' && isalpha(s[0]) && isalpha(s[1]) && isalpha(s[2]) && isalpha(s[3]) && isalpha(s[4]) && IsADigit(s[5]) && IsADigit(s[6]) && IsADigit(s[7])) {\n\t\t\t//^^^^^###.****\n\t\t\treturn(SCE_BAAN_TABLESQL);\n\t\t}\n\t\telse if (s[0] == 'r' && s[1] == 'c' && s[2] == 'd' && s[3] == '.' && s[4] == 't' && isalpha(s[5]) && isalpha(s[6]) && isalpha(s[7]) && isalpha(s[8]) && isalpha(s[9]) && IsADigit(s[10]) && IsADigit(s[11]) && IsADigit(s[12])) {\n\t\t\t//rcd.t^^^^^###\n\t\t\treturn(SCE_BAAN_TABLEDEF);\n\t\t}\n\t\tbreak;\n\tcase 14:\n\tcase 15:\n\t\tif (s[8] == '.' && isalpha(s[0]) && isalpha(s[1]) && isalpha(s[2]) && isalpha(s[3]) && isalpha(s[4]) && IsADigit(s[5]) && IsADigit(s[6]) && IsADigit(s[7])) {\n\t\t\tif (s[13] != ':') {\n\t\t\t\t//^^^^^###.******\n\t\t\t\treturn(SCE_BAAN_TABLESQL);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\tcase 16:\n\tcase 17:\n\t\tif (s[8] == '.' && s[9] == '_' && s[10] == 'i' && s[11] == 'n' && s[12] == 'd' && s[13] == 'e' && s[14] == 'x' && IsADigit(s[15]) && isalpha(s[0]) && isalpha(s[1]) && isalpha(s[2]) && isalpha(s[3]) && isalpha(s[4]) && IsADigit(s[5]) && IsADigit(s[6]) && IsADigit(s[7])) {\n\t\t\t//^^^^^###._index##\n\t\t\treturn(SCE_BAAN_TABLEDEF);\n\t\t}\n\t\telse if (s[8] == '.' && s[9] == '_' && s[10] == 'c' && s[11] == 'o' && s[12] == 'm' && s[13] == 'p' && s[14] == 'n' && s[15] == 'r' && isalpha(s[0]) && isalpha(s[1]) && isalpha(s[2]) && isalpha(s[3]) && isalpha(s[4]) && IsADigit(s[5]) && IsADigit(s[6]) && IsADigit(s[7])) {\n\t\t\t//^^^^^###._compnr\n\t\t\treturn(SCE_BAAN_TABLEDEF);\n\t\t}\n\t\tbreak;\n\tdefault:\n\t\tbreak;\n\t}\n\tif (sLength > 14 && s[5] == '.' && s[6] == 'd' && s[7] == 'l' && s[8] == 'l' && s[13] == '.' && isalpha(s[0]) && isalpha(s[1]) && isalpha(s[2]) && isalpha(s[3]) && isalpha(s[4]) && IsADigit(s[9]) && IsADigit(s[10]) && IsADigit(s[11]) && IsADigit(s[12])) {\n\t\t//^^^^^.dll####.\n\t\treturn(SCE_BAAN_FUNCTION);\n\t}\n\telse if (sLength > 15 && s[2] == 'i' && s[3] == 'n' && s[4] == 't' && s[5] == '.' && s[6] == 'd' && s[7] == 'l' && s[8] == 'l' && isalpha(s[0]) && isalpha(s[1]) && isalpha(s[9]) && isalpha(s[10]) && isalpha(s[11]) && isalpha(s[12]) && isalpha(s[13])) {\n\t\t//^^int.dll^^^^^.\n\t\treturn(SCE_BAAN_FUNCTION);\n\t}\n\telse if (sLength > 11 && s[0] == 'i' && s[10] == '.' && isalpha(s[1]) && isalpha(s[2]) && isalpha(s[3]) && isalpha(s[4]) && isalpha(s[5]) && IsADigit(s[6]) && IsADigit(s[7]) && IsADigit(s[8]) && IsADigit(s[9])) {\n\t\t//i^^^^^####.\n\t\treturn(SCE_BAAN_FUNCTION);\n\t}\n\n\treturn(SCE_BAAN_DEFAULT);\n}\n\nstatic bool IsCommentLine(Sci_Position line, LexAccessor &styler) {\n\tSci_Position pos = styler.LineStart(line);\n\tSci_Position eol_pos = styler.LineStart(line + 1) - 1;\n\tfor (Sci_Position i = pos; i < eol_pos; i++) {\n\t\tchar ch = styler[i];\n\t\tint style = styler.StyleAt(i);\n\t\tif (ch == '|' && style == SCE_BAAN_COMMENT)\n\t\t\treturn true;\n\t\telse if (!IsASpaceOrTab(ch))\n\t\t\treturn false;\n\t}\n\treturn false;\n}\n\nstatic bool IsPreProcLine(Sci_Position line, LexAccessor &styler) {\n\tSci_Position pos = styler.LineStart(line);\n\tSci_Position eol_pos = styler.LineStart(line + 1) - 1;\n\tfor (Sci_Position i = pos; i < eol_pos; i++) {\n\t\tchar ch = styler[i];\n\t\tint style = styler.StyleAt(i);\n\t\tif (ch == '#' && style == SCE_BAAN_PREPROCESSOR) {\n\t\t\tif (styler.Match(i, \"#elif\") || styler.Match(i, \"#else\") || styler.Match(i, \"#endif\")\n\t\t\t\t|| styler.Match(i, \"#if\") || styler.Match(i, \"#ifdef\") || styler.Match(i, \"#ifndef\"))\n\t\t\t\t// Above PreProcessors has a seperate fold mechanism.\n\t\t\t\treturn false;\n\t\t\telse\n\t\t\t\treturn true;\n\t\t}\n\t\telse if (ch == '^')\n\t\t\treturn true;\n\t\telse if (!IsASpaceOrTab(ch))\n\t\t\treturn false;\n\t}\n\treturn false;\n}\n\nstatic int mainOrSubSectionLine(Sci_Position line, LexAccessor &styler) {\n\tSci_Position pos = styler.LineStart(line);\n\tSci_Position eol_pos = styler.LineStart(line + 1) - 1;\n\tfor (Sci_Position i = pos; i < eol_pos; i++) {\n\t\tchar ch = styler[i];\n\t\tint style = styler.StyleAt(i);\n\t\tif (style == SCE_BAAN_WORD5 || style == SCE_BAAN_WORD4)\n\t\t\treturn style;\n\t\telse if (IsASpaceOrTab(ch))\n\t\t\tcontinue;\n\t\telse\n\t\t\tbreak;\n\t}\n\treturn 0;\n}\n\nstatic bool priorSectionIsSubSection(Sci_Position line, LexAccessor &styler){\n\twhile (line > 0) {\n\t\tSci_Position pos = styler.LineStart(line);\n\t\tSci_Position eol_pos = styler.LineStart(line + 1) - 1;\n\t\tfor (Sci_Position i = pos; i < eol_pos; i++) {\n\t\t\tchar ch = styler[i];\n\t\t\tint style = styler.StyleAt(i);\n\t\t\tif (style == SCE_BAAN_WORD4)\n\t\t\t\treturn true;\n\t\t\telse if (style == SCE_BAAN_WORD5)\n\t\t\t\treturn false;\n\t\t\telse if (IsASpaceOrTab(ch))\n\t\t\t\tcontinue;\n\t\t\telse\n\t\t\t\tbreak;\n\t\t}\n\t\tline--;\n\t}\n\treturn false;\n}\n\nstatic bool nextSectionIsSubSection(Sci_Position line, LexAccessor &styler) {\n\twhile (line > 0) {\n\t\tSci_Position pos = styler.LineStart(line);\n\t\tSci_Position eol_pos = styler.LineStart(line + 1) - 1;\n\t\tfor (Sci_Position i = pos; i < eol_pos; i++) {\n\t\t\tchar ch = styler[i];\n\t\t\tint style = styler.StyleAt(i);\n\t\t\tif (style == SCE_BAAN_WORD4)\n\t\t\t\treturn true;\n\t\t\telse if (style == SCE_BAAN_WORD5)\n\t\t\t\treturn false;\n\t\t\telse if (IsASpaceOrTab(ch))\n\t\t\t\tcontinue;\n\t\t\telse\n\t\t\t\tbreak;\n\t\t}\n\t\tline++;\n\t}\n\treturn false;\n}\n\nstatic bool IsDeclarationLine(Sci_Position line, LexAccessor &styler) {\n\tSci_Position pos = styler.LineStart(line);\n\tSci_Position eol_pos = styler.LineStart(line + 1) - 1;\n\tfor (Sci_Position i = pos; i < eol_pos; i++) {\n\t\tchar ch = styler[i];\n\t\tint style = styler.StyleAt(i);\n\t\tif (style == SCE_BAAN_WORD) {\n\t\t\tif (styler.Match(i, \"table\") || styler.Match(i, \"extern\") || styler.Match(i, \"long\")\n\t\t\t\t|| styler.Match(i, \"double\") || styler.Match(i, \"boolean\") || styler.Match(i, \"string\")\n\t\t\t\t|| styler.Match(i, \"domain\")) {\n\t\t\t\tfor (Sci_Position j = eol_pos; j > pos; j--) {\n\t\t\t\t\tint styleFromEnd = styler.StyleAt(j);\n\t\t\t\t\tif (styleFromEnd == SCE_BAAN_COMMENT)\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\telse if (IsASpace(styler[j]))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\telse if (styler[j] != ',')\n\t\t\t\t\t\t//Above conditions ensures, Declaration is not part of any function parameters.\n\t\t\t\t\t\treturn true;\n\t\t\t\t\telse\n\t\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\telse if (!IsASpaceOrTab(ch))\n\t\t\treturn false;\n\t}\n\treturn false;\n}\n\nstatic bool IsInnerLevelFold(Sci_Position line, LexAccessor &styler) {\n\tSci_Position pos = styler.LineStart(line);\n\tSci_Position eol_pos = styler.LineStart(line + 1) - 1;\n\tfor (Sci_Position i = pos; i < eol_pos; i++) {\n\t\tchar ch = styler[i];\n\t\tint style = styler.StyleAt(i);\n\t\tif (style == SCE_BAAN_WORD && (styler.Match(i, \"else\" ) || styler.Match(i, \"case\")\n\t\t\t|| styler.Match(i, \"default\") || styler.Match(i, \"selectdo\") || styler.Match(i, \"selecteos\")\n\t\t\t|| styler.Match(i, \"selectempty\") || styler.Match(i, \"selecterror\")))\n\t\t\treturn true;\n\t\telse if (IsASpaceOrTab(ch))\n\t\t\tcontinue;\n\t\telse\n\t\t\treturn false;\n\t}\n\treturn false;\n}\n\nstatic inline bool wordInArray(const std::string& value, std::string *array, int length)\n{\n\tfor (int i = 0; i < length; i++)\n\t{\n\t\tif (value == array[i])\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\n\nclass WordListAbridged : public WordList {\npublic:\n\tWordListAbridged() {\n\t\tkwAbridged = false;\n\t\tkwHasSection = false;\n\t};\n\t~WordListAbridged() {\n\t\tClear();\n\t};\n\tbool kwAbridged;\n\tbool kwHasSection;\n\tbool Contains(const char *s) {\n\t\treturn kwAbridged ? InListAbridged(s, '~') : InList(s);\n\t};\n};\n\n}\n\nclass LexerBaan : public DefaultLexer {\n\tWordListAbridged keywords;\n\tWordListAbridged keywords2;\n\tWordListAbridged keywords3;\n\tWordListAbridged keywords4;\n\tWordListAbridged keywords5;\n\tWordListAbridged keywords6;\n\tWordListAbridged keywords7;\n\tWordListAbridged keywords8;\n\tWordListAbridged keywords9;\n\tOptionsBaan options;\n\tOptionSetBaan osBaan;\npublic:\n\tLexerBaan() : DefaultLexer(\"baan\", SCLEX_BAAN) {\n\t}\n\n\tvirtual ~LexerBaan() {\n\t}\n\n\tint SCI_METHOD Version() const override {\n\t\treturn lvRelease5;\n\t}\n\n\tvoid SCI_METHOD Release() override {\n\t\tdelete this;\n\t}\n\n\tconst char * SCI_METHOD PropertyNames() override {\n\t\treturn osBaan.PropertyNames();\n\t}\n\n\tint SCI_METHOD PropertyType(const char * name) override {\n\t\treturn osBaan.PropertyType(name);\n\t}\n\n\tconst char * SCI_METHOD DescribeProperty(const char * name) override {\n\t\treturn osBaan.DescribeProperty(name);\n\t}\n\n\tSci_Position SCI_METHOD PropertySet(const char *key, const char *val) override;\n\n\tconst char * SCI_METHOD PropertyGet(const char *key) override {\n\t\treturn osBaan.PropertyGet(key);\n\t}\n\n\tconst char * SCI_METHOD DescribeWordListSets() override {\n\t\treturn osBaan.DescribeWordListSets();\n\t}\n\n\tSci_Position SCI_METHOD WordListSet(int n, const char *wl) override;\n\n\tvoid SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;\n\n\tvoid SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;\n\n\tvoid * SCI_METHOD PrivateCall(int, void *) override {\n\t\treturn NULL;\n\t}\n\n\tstatic ILexer5 * LexerFactoryBaan() {\n\t\treturn new LexerBaan();\n\t}\n};\n\nSci_Position SCI_METHOD LexerBaan::PropertySet(const char *key, const char *val) {\n\tif (osBaan.PropertySet(&options, key, val)) {\n\t\treturn 0;\n\t}\n\treturn -1;\n}\n\nSci_Position SCI_METHOD LexerBaan::WordListSet(int n, const char *wl) {\n\tWordListAbridged *WordListAbridgedN = 0;\n\tswitch (n) {\n\tcase 0:\n\t\tWordListAbridgedN = &keywords;\n\t\tbreak;\n\tcase 1:\n\t\tWordListAbridgedN = &keywords2;\n\t\tbreak;\n\tcase 2:\n\t\tWordListAbridgedN = &keywords3;\n\t\tbreak;\n\tcase 3:\n\t\tWordListAbridgedN = &keywords4;\n\t\tbreak;\n\tcase 4:\n\t\tWordListAbridgedN = &keywords5;\n\t\tbreak;\n\tcase 5:\n\t\tWordListAbridgedN = &keywords6;\n\t\tbreak;\n\tcase 6:\n\t\tWordListAbridgedN = &keywords7;\n\t\tbreak;\n\tcase 7:\n\t\tWordListAbridgedN = &keywords8;\n\t\tbreak;\n\tcase 8:\n\t\tWordListAbridgedN = &keywords9;\n\t\tbreak;\n\t}\n\tSci_Position firstModification = -1;\n\tif (WordListAbridgedN) {\n\t\tWordListAbridged wlNew;\n\t\twlNew.Set(wl);\n\t\tif (*WordListAbridgedN != wlNew) {\n\t\t\tWordListAbridgedN->Set(wl);\n\t\t\tWordListAbridgedN->kwAbridged = strchr(wl, '~') != NULL;\n\t\t\tWordListAbridgedN->kwHasSection = strchr(wl, ':') != NULL;\n\n\t\t\tfirstModification = 0;\n\t\t}\n\t}\n\treturn firstModification;\n}\n\nvoid SCI_METHOD LexerBaan::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) {\n\n\tif (initStyle == SCE_BAAN_STRINGEOL)\t// Does not leak onto next line\n\t\tinitStyle = SCE_BAAN_DEFAULT;\n\n\tint visibleChars = 0;\n\tbool lineHasDomain = false;\n\tbool lineHasFunction = false;\n\tbool lineHasPreProc = false;\n\tbool lineIgnoreString = false;\n\tbool lineHasDefines = false;\n\tbool numberIsHex = false;\n\tchar word[1000];\n\tint wordlen = 0;\n\n\tstd::string preProcessorTags[13] = { \"#context_off\", \"#context_on\",\n\t\t\"#define\", \"#elif\", \"#else\", \"#endif\",\n\t\t\"#ident\", \"#if\", \"#ifdef\", \"#ifndef\",\n\t\t\"#include\", \"#pragma\", \"#undef\" };\n\tLexAccessor styler(pAccess);\n\tStyleContext sc(startPos, length, initStyle, styler);\n\n\tfor (; sc.More(); sc.Forward()) {\n\n\t\t// Determine if the current state should terminate.\n\t\tswitch (sc.state) {\n\t\tcase SCE_BAAN_OPERATOR:\n\t\t\tsc.SetState(SCE_BAAN_DEFAULT);\n\t\t\tbreak;\n\t\tcase SCE_BAAN_NUMBER:\n\t\t\tif (IsASpaceOrTab(sc.ch) || sc.ch == '\\r' || sc.ch == '\\n' || IsAnOperator(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_BAAN_DEFAULT);\n\t\t\t}\n\t\t\telse if ((numberIsHex && !(MakeLowerCase(sc.ch) == 'x' || MakeLowerCase(sc.ch) == 'e' ||\n\t\t\t\tIsADigit(sc.ch, 16) || sc.ch == '.' || sc.ch == '-' || sc.ch == '+')) ||\n\t\t\t\t(!numberIsHex && !(MakeLowerCase(sc.ch) == 'e' || IsADigit(sc.ch)\n\t\t\t\t|| sc.ch == '.' || sc.ch == '-' || sc.ch == '+'))) {\n\t\t\t\t\t// check '-' for possible -10e-5. Add '+' as well.\n\t\t\t\t\tnumberIsHex = false;\n\t\t\t\t\tsc.ChangeState(SCE_BAAN_IDENTIFIER);\n\t\t\t\t\tsc.SetState(SCE_BAAN_DEFAULT);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_BAAN_IDENTIFIER:\n\t\t\tif (!IsAWordChar(sc.ch)) {\n\t\t\t\tchar s[1000];\n\t\t\t\tchar s1[1000];\n\t\t\t\tsc.GetCurrentLowered(s, sizeof(s));\n\t\t\t\tif (sc.ch == ':') {\n\t\t\t\t\tmemcpy(s1, s, sizeof(s));\n\t\t\t\t\ts1[sc.LengthCurrent()] = sc.ch;\n\t\t\t\t\ts1[sc.LengthCurrent() + 1] = '\\0';\n\t\t\t\t}\n\t\t\t\tif ((keywords.kwHasSection && (sc.ch == ':')) ? keywords.Contains(s1) : keywords.Contains(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_BAAN_WORD);\n\t\t\t\t\tif (0 == strcmp(s, \"domain\")) {\n\t\t\t\t\t\tlineHasDomain = true;\n\t\t\t\t\t}\n\t\t\t\t\telse if (0 == strcmp(s, \"function\")) {\n\t\t\t\t\t\tlineHasFunction = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (lineHasDomain) {\n\t\t\t\t\tsc.ChangeState(SCE_BAAN_DOMDEF);\n\t\t\t\t\tlineHasDomain = false;\n\t\t\t\t}\n\t\t\t\telse if (lineHasFunction) {\n\t\t\t\t\tsc.ChangeState(SCE_BAAN_FUNCDEF);\n\t\t\t\t\tlineHasFunction = false;\n\t\t\t\t}\n\t\t\t\telse if ((keywords2.kwHasSection && (sc.ch == ':')) ? keywords2.Contains(s1) : keywords2.Contains(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_BAAN_WORD2);\n\t\t\t\t}\n\t\t\t\telse if ((keywords3.kwHasSection && (sc.ch == ':')) ? keywords3.Contains(s1) : keywords3.Contains(s)) {\n\t\t\t\t\tif (sc.ch == '(')\n\t\t\t\t\t\tsc.ChangeState(SCE_BAAN_WORD3);\n\t\t\t\t\telse\n\t\t\t\t\t\tsc.ChangeState(SCE_BAAN_IDENTIFIER);\n\t\t\t\t}\n\t\t\t\telse if ((keywords4.kwHasSection && (sc.ch == ':')) ? keywords4.Contains(s1) : keywords4.Contains(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_BAAN_WORD4);\n\t\t\t\t}\n\t\t\t\telse if ((keywords5.kwHasSection && (sc.ch == ':')) ? keywords5.Contains(s1) : keywords5.Contains(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_BAAN_WORD5);\n\t\t\t\t}\n\t\t\t\telse if ((keywords6.kwHasSection && (sc.ch == ':')) ? keywords6.Contains(s1) : keywords6.Contains(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_BAAN_WORD6);\n\t\t\t\t}\n\t\t\t\telse if ((keywords7.kwHasSection && (sc.ch == ':')) ? keywords7.Contains(s1) : keywords7.Contains(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_BAAN_WORD7);\n\t\t\t\t}\n\t\t\t\telse if ((keywords8.kwHasSection && (sc.ch == ':')) ? keywords8.Contains(s1) : keywords8.Contains(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_BAAN_WORD8);\n\t\t\t\t}\n\t\t\t\telse if ((keywords9.kwHasSection && (sc.ch == ':')) ? keywords9.Contains(s1) : keywords9.Contains(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_BAAN_WORD9);\n\t\t\t\t}\n\t\t\t\telse if (lineHasPreProc) {\n\t\t\t\t\tsc.ChangeState(SCE_BAAN_OBJECTDEF);\n\t\t\t\t\tlineHasPreProc = false;\n\t\t\t\t}\n\t\t\t\telse if (lineHasDefines) {\n\t\t\t\t\tsc.ChangeState(SCE_BAAN_DEFINEDEF);\n\t\t\t\t\tlineHasDefines = false;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tint state = IsAnyOtherIdentifier(s, sc.LengthCurrent());\n\t\t\t\t\tif (state > 0) {\n\t\t\t\t\t\tsc.ChangeState(state);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsc.SetState(SCE_BAAN_DEFAULT);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_BAAN_PREPROCESSOR:\n\t\t\tif (options.baanStylingWithinPreprocessor) {\n\t\t\t\tif (IsASpace(sc.ch) || IsAnOperator(sc.ch)) {\n\t\t\t\t\tsc.SetState(SCE_BAAN_DEFAULT);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (sc.atLineEnd && (sc.chNext != '^')) {\n\t\t\t\t\tsc.SetState(SCE_BAAN_DEFAULT);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_BAAN_COMMENT:\n\t\t\tif (sc.ch == '\\r' || sc.ch == '\\n') {\n\t\t\t\tsc.SetState(SCE_BAAN_DEFAULT);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_BAAN_COMMENTDOC:\n\t\t\tif (sc.MatchIgnoreCase(\"enddllusage\")) {\n\t\t\t\tfor (unsigned int i = 0; i < 10; i++) {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t}\n\t\t\t\tsc.ForwardSetState(SCE_BAAN_DEFAULT);\n\t\t\t}\n\t\t\telse if (sc.MatchIgnoreCase(\"endfunctionusage\")) {\n\t\t\t\tfor (unsigned int i = 0; i < 15; i++) {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t}\n\t\t\t\tsc.ForwardSetState(SCE_BAAN_DEFAULT);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_BAAN_STRING:\n\t\t\tif (sc.ch == '\\\"') {\n\t\t\t\tsc.ForwardSetState(SCE_BAAN_DEFAULT);\n\t\t\t}\n\t\t\telse if ((sc.atLineEnd) && (sc.chNext != '^')) {\n\t\t\t\tsc.ChangeState(SCE_BAAN_STRINGEOL);\n\t\t\t\tsc.ForwardSetState(SCE_BAAN_DEFAULT);\n\t\t\t\tvisibleChars = 0;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t\t// Determine if a new state should be entered.\n\t\tif (sc.state == SCE_BAAN_DEFAULT) {\n\t\t\tif (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))\n\t\t\t\t|| ((sc.ch == '-' || sc.ch == '+') && (IsADigit(sc.chNext) || sc.chNext == '.'))\n\t\t\t\t|| (MakeLowerCase(sc.ch) == 'e' && (IsADigit(sc.chNext) || sc.chNext == '+' || sc.chNext == '-'))) {\n\t\t\t\tif ((sc.ch == '0' && MakeLowerCase(sc.chNext) == 'x') ||\n\t\t\t\t\t((sc.ch == '-' || sc.ch == '+') && sc.chNext == '0' && MakeLowerCase(sc.GetRelativeCharacter(2)) == 'x')){\n\t\t\t\t\tnumberIsHex = true;\n\t\t\t\t}\n\t\t\t\tsc.SetState(SCE_BAAN_NUMBER);\n\t\t\t}\n\t\t\telse if (sc.MatchIgnoreCase(\"dllusage\") || sc.MatchIgnoreCase(\"functionusage\")) {\n\t\t\t\tsc.SetState(SCE_BAAN_COMMENTDOC);\n\t\t\t\tdo {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t} while ((!sc.atLineEnd) && sc.More());\n\t\t\t}\n\t\t\telse if (iswordstart(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_BAAN_IDENTIFIER);\n\t\t\t}\n\t\t\telse if (sc.Match('|')) {\n\t\t\t\tsc.SetState(SCE_BAAN_COMMENT);\n\t\t\t}\n\t\t\telse if (sc.ch == '\\\"' && !(lineIgnoreString)) {\n\t\t\t\tsc.SetState(SCE_BAAN_STRING);\n\t\t\t}\n\t\t\telse if (sc.ch == '#' && visibleChars == 0) {\n\t\t\t\t// Preprocessor commands are alone on their line\n\t\t\t\tsc.SetState(SCE_BAAN_PREPROCESSOR);\n\t\t\t\tword[0] = '\\0';\n\t\t\t\twordlen = 0;\n\t\t\t\twhile (sc.More() && !(IsASpace(sc.chNext) || IsAnOperator(sc.chNext))) {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\twordlen++;\n\t\t\t\t}\n\t\t\t\tsc.GetCurrentLowered(word, sizeof(word));\n\t\t\t\tif (!sc.atLineEnd) {\n\t\t\t\t\tword[wordlen++] = sc.ch;\n\t\t\t\t\tword[wordlen++] = '\\0';\n\t\t\t\t}\n\t\t\t\tif (!wordInArray(word, preProcessorTags, 13))\n\t\t\t\t\t// Colorise only preprocessor built in Baan.\n\t\t\t\t\tsc.ChangeState(SCE_BAAN_IDENTIFIER);\n\t\t\t\tif (strcmp(word, \"#pragma\") == 0 || strcmp(word, \"#include\") == 0) {\n\t\t\t\t\tlineHasPreProc = true;\n\t\t\t\t\tlineIgnoreString = true;\n\t\t\t\t}\n\t\t\t\telse if (strcmp(word, \"#define\") == 0 || strcmp(word, \"#undef\") == 0 ||\n\t\t\t\t\tstrcmp(word, \"#ifdef\") == 0 || strcmp(word, \"#if\") == 0 || strcmp(word, \"#ifndef\") == 0) {\n\t\t\t\t\tlineHasDefines = true;\n\t\t\t\t\tlineIgnoreString = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (IsAnOperator(static_cast<char>(sc.ch))) {\n\t\t\t\tsc.SetState(SCE_BAAN_OPERATOR);\n\t\t\t}\n\t\t}\n\n\t\tif (sc.atLineEnd) {\n\t\t\t// Reset states to begining of colourise so no surprises\n\t\t\t// if different sets of lines lexed.\n\t\t\tvisibleChars = 0;\n\t\t\tlineHasDomain = false;\n\t\t\tlineHasFunction = false;\n\t\t\tlineHasPreProc = false;\n\t\t\tlineIgnoreString = false;\n\t\t\tlineHasDefines = false;\n\t\t\tnumberIsHex = false;\n\t\t}\n\t\tif (!IsASpace(sc.ch)) {\n\t\t\tvisibleChars++;\n\t\t}\n\t}\n\tsc.Complete();\n}\n\nvoid SCI_METHOD LexerBaan::Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) {\n\tif (!options.fold)\n\t\treturn;\n\n\tchar word[100];\n\tint wordlen = 0;\n\tbool foldStart = true;\n\tbool foldNextSelect = true;\n\tbool afterFunctionSection = false;\n\tbool beforeDeclarationSection = false;\n\tint currLineStyle = 0;\n\tint nextLineStyle = 0;\n\n\tstd::string startTags[6] = { \"for\", \"if\", \"on\", \"repeat\", \"select\", \"while\" };\n\tstd::string endTags[6] = { \"endcase\", \"endfor\", \"endif\", \"endselect\", \"endwhile\", \"until\" };\n\tstd::string selectCloseTags[5] = { \"selectdo\", \"selecteos\", \"selectempty\", \"selecterror\", \"endselect\" };\n\n\tLexAccessor styler(pAccess);\n\tSci_PositionU endPos = startPos + length;\n\tint visibleChars = 0;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\n\t// Backtrack to previous line in case need to fix its fold status\n\tif (startPos > 0) {\n\t\tif (lineCurrent > 0) {\n\t\t\tlineCurrent--;\n\t\t\tstartPos = styler.LineStart(lineCurrent);\n\t\t}\n\t}\n\n\tint levelPrev = SC_FOLDLEVELBASE;\n\tif (lineCurrent > 0)\n\t\tlevelPrev = styler.LevelAt(lineCurrent - 1) >> 16;\n\tint levelCurrent = levelPrev;\n\tchar chNext = styler[startPos];\n\tint style = initStyle;\n\tint styleNext = styler.StyleAt(startPos);\n\n\tfor (Sci_PositionU i = startPos; i < endPos; i++) {\n\t\tchar ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\tstyle = styleNext;\n\t\tstyleNext = styler.StyleAt(i + 1);\n\t\tint stylePrev = (i) ? styler.StyleAt(i - 1) : SCE_BAAN_DEFAULT;\n\t\tbool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n\n\t\t// Comment folding\n\t\tif (options.foldComment && style == SCE_BAAN_COMMENTDOC) {\n\t\t\tif (style != stylePrev) {\n\t\t\t\tlevelCurrent++;\n\t\t\t}\n\t\t\telse if (style != styleNext) {\n\t\t\t\tlevelCurrent--;\n\t\t\t}\n\t\t}\n\t\tif (options.foldComment && atEOL && IsCommentLine(lineCurrent, styler)) {\n\t\t\tif (!IsCommentLine(lineCurrent - 1, styler)\n\t\t\t\t&& IsCommentLine(lineCurrent + 1, styler))\n\t\t\t\tlevelCurrent++;\n\t\t\telse if (IsCommentLine(lineCurrent - 1, styler)\n\t\t\t\t&& !IsCommentLine(lineCurrent + 1, styler))\n\t\t\t\tlevelCurrent--;\n\t\t}\n\t\t// PreProcessor Folding\n\t\tif (options.foldPreprocessor) {\n\t\t\tif (atEOL && IsPreProcLine(lineCurrent, styler)) {\n\t\t\t\tif (!IsPreProcLine(lineCurrent - 1, styler)\n\t\t\t\t\t&& IsPreProcLine(lineCurrent + 1, styler))\n\t\t\t\t\tlevelCurrent++;\n\t\t\t\telse if (IsPreProcLine(lineCurrent - 1, styler)\n\t\t\t\t\t&& !IsPreProcLine(lineCurrent + 1, styler))\n\t\t\t\t\tlevelCurrent--;\n\t\t\t}\n\t\t\telse if (style == SCE_BAAN_PREPROCESSOR) {\n\t\t\t\t// folds #ifdef/#if/#ifndef - they are not part of the IsPreProcLine folding.\n\t\t\t\tif (ch == '#') {\n\t\t\t\t\tif (styler.Match(i, \"#ifdef\") || styler.Match(i, \"#if\") || styler.Match(i, \"#ifndef\")\n\t\t\t\t\t\t|| styler.Match(i, \"#context_on\"))\n\t\t\t\t\t\tlevelCurrent++;\n\t\t\t\t\telse if (styler.Match(i, \"#endif\") || styler.Match(i, \"#context_off\"))\n\t\t\t\t\t\tlevelCurrent--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Syntax Folding\n\t\tif (options.baanFoldSyntaxBased && (style == SCE_BAAN_OPERATOR)) {\n\t\t\tif (ch == '{' || ch == '(') {\n\t\t\t\tlevelCurrent++;\n\t\t\t}\n\t\t\telse if (ch == '}' || ch == ')') {\n\t\t\t\tlevelCurrent--;\n\t\t\t}\n\t\t}\n\t\t//Keywords Folding\n\t\tif (options.baanFoldKeywordsBased) {\n\t\t\tif (atEOL && IsDeclarationLine(lineCurrent, styler)) {\n\t\t\t\tif (!IsDeclarationLine(lineCurrent - 1, styler)\n\t\t\t\t\t&& IsDeclarationLine(lineCurrent + 1, styler))\n\t\t\t\t\tlevelCurrent++;\n\t\t\t\telse if (IsDeclarationLine(lineCurrent - 1, styler)\n\t\t\t\t\t&& !IsDeclarationLine(lineCurrent + 1, styler))\n\t\t\t\t\tlevelCurrent--;\n\t\t\t}\n\t\t\telse if (style == SCE_BAAN_WORD) {\n\t\t\t\tword[wordlen++] = static_cast<char>(MakeLowerCase(ch));\n\t\t\t\tif (wordlen == 100) {                   // prevent overflow\n\t\t\t\t\tword[0] = '\\0';\n\t\t\t\t\twordlen = 1;\n\t\t\t\t}\n\t\t\t\tif (styleNext != SCE_BAAN_WORD) {\n\t\t\t\t\tword[wordlen] = '\\0';\n\t\t\t\t\twordlen = 0;\n\t\t\t\t\tif (strcmp(word, \"for\") == 0) {\n\t\t\t\t\t\tSci_PositionU j = i + 1;\n\t\t\t\t\t\twhile ((j < endPos) && IsASpaceOrTab(styler.SafeGetCharAt(j))) {\n\t\t\t\t\t\t\tj++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (styler.Match(j, \"update\")) {\n\t\t\t\t\t\t\t// Means this is a \"for update\" used by Select which is already folded.\n\t\t\t\t\t\t\tfoldStart = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (strcmp(word, \"on\") == 0) {\n\t\t\t\t\t\tSci_PositionU j = i + 1;\n\t\t\t\t\t\twhile ((j < endPos) && IsASpaceOrTab(styler.SafeGetCharAt(j))) {\n\t\t\t\t\t\t\tj++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!styler.Match(j, \"case\")) {\n\t\t\t\t\t\t\t// Means this is not a \"on Case\" statement... could be \"on\" used by index.\n\t\t\t\t\t\t\tfoldStart = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (strcmp(word, \"select\") == 0) {\n\t\t\t\t\t\tif (foldNextSelect) {\n\t\t\t\t\t\t\t// Next Selects are sub-clause till reach of selectCloseTags[] array.\n\t\t\t\t\t\t\tfoldNextSelect = false;\n\t\t\t\t\t\t\tfoldStart = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tfoldNextSelect = false;\n\t\t\t\t\t\t\tfoldStart = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (wordInArray(word, selectCloseTags, 5)) {\n\t\t\t\t\t\t// select clause ends, next select clause can be folded.\n\t\t\t\t\t\tfoldNextSelect = true;\n\t\t\t\t\t\tfoldStart = true;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tfoldStart = true;\n\t\t\t\t\t}\n\t\t\t\t\tif (foldStart) {\n\t\t\t\t\t\tif (wordInArray(word, startTags, 6)) {\n\t\t\t\t\t\t\tlevelCurrent++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (wordInArray(word, endTags, 6)) {\n\t\t\t\t\t\t\tlevelCurrent--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Fold inner level of if/select/case statements\n\t\tif (options.baanFoldInnerLevel && atEOL) {\n\t\t\tbool currLineInnerLevel = IsInnerLevelFold(lineCurrent, styler);\n\t\t\tbool nextLineInnerLevel = IsInnerLevelFold(lineCurrent + 1, styler);\n\t\t\tif (currLineInnerLevel && currLineInnerLevel != nextLineInnerLevel) {\n\t\t\t\tlevelCurrent++;\n\t\t\t}\n\t\t\telse if (nextLineInnerLevel && nextLineInnerLevel != currLineInnerLevel) {\n\t\t\t\tlevelCurrent--;\n\t\t\t}\n\t\t}\n\t\t// Section Foldings.\n\t\t// One way of implementing Section Foldings, as there is no END markings of sections.\n\t\t// first section ends on the previous line of next section.\n\t\t// Re-written whole folding to accomodate this.\n\t\tif (options.baanFoldSections && atEOL) {\n\t\t\tcurrLineStyle = mainOrSubSectionLine(lineCurrent, styler);\n\t\t\tnextLineStyle = mainOrSubSectionLine(lineCurrent + 1, styler);\n\t\t\tif (currLineStyle != 0 && currLineStyle != nextLineStyle) {\n\t\t\t\tif (levelCurrent < levelPrev)\n\t\t\t\t\t--levelPrev;\n\t\t\t\tfor (Sci_Position j = styler.LineStart(lineCurrent); j < styler.LineStart(lineCurrent + 1) - 1; j++) {\n\t\t\t\t\tif (IsASpaceOrTab(styler[j]))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\telse if (styler.StyleAt(j) == SCE_BAAN_WORD5) {\n\t\t\t\t\t\tif (styler.Match(j, \"functions:\")) {\n\t\t\t\t\t\t\t// Means functions: is the end of MainSections.\n\t\t\t\t\t\t\t// Nothing to fold after this.\n\t\t\t\t\t\t\tafterFunctionSection = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tafterFunctionSection = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tafterFunctionSection = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!afterFunctionSection)\n\t\t\t\t\tlevelCurrent++;\n\t\t\t}\n\t\t\telse if (nextLineStyle != 0 && currLineStyle != nextLineStyle\n\t\t\t\t&& (priorSectionIsSubSection(lineCurrent -1 ,styler)\n\t\t\t\t\t|| !nextSectionIsSubSection(lineCurrent + 1, styler))) {\n\t\t\t\tfor (Sci_Position j = styler.LineStart(lineCurrent + 1); j < styler.LineStart(lineCurrent + 1 + 1) - 1; j++) {\n\t\t\t\t\tif (IsASpaceOrTab(styler[j]))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\telse if (styler.StyleAt(j) == SCE_BAAN_WORD5) {\n\t\t\t\t\t\tif (styler.Match(j, \"declaration:\")) {\n\t\t\t\t\t\t\t// Means declaration: is the start of MainSections.\n\t\t\t\t\t\t\t// Nothing to fold before this.\n\t\t\t\t\t\t\tbeforeDeclarationSection = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tbeforeDeclarationSection = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tbeforeDeclarationSection = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!beforeDeclarationSection) {\n\t\t\t\t\tlevelCurrent--;\n\t\t\t\t\tif (nextLineStyle == SCE_BAAN_WORD5 && priorSectionIsSubSection(lineCurrent-1, styler))\n\t\t\t\t\t\t// next levelCurrent--; is to unfold previous subsection fold.\n\t\t\t\t\t\t// On reaching the next main section, the previous main as well sub section ends.\n\t\t\t\t\t\tlevelCurrent--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (atEOL) {\n\t\t\tint lev = levelPrev;\n\t\t\tlev |= levelCurrent << 16;\n\t\t\tif (visibleChars == 0 && options.foldCompact)\n\t\t\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\t\t\tif ((levelCurrent > levelPrev) && (visibleChars > 0))\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\tif (lev != styler.LevelAt(lineCurrent)) {\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\t\t\t}\n\t\t\tlineCurrent++;\n\t\t\tlevelPrev = levelCurrent;\n\t\t\tvisibleChars = 0;\n\t\t}\n\t\tif (!isspacechar(ch))\n\t\t\tvisibleChars++;\n\t}\n\tint flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK;\n\tstyler.SetLevel(lineCurrent, levelPrev | flagsNext);\n}\n\nLexerModule lmBaan(SCLEX_BAAN, LexerBaan::LexerFactoryBaan, \"baan\", baanWordLists);\n"
  },
  {
    "path": "lexilla/lexers/LexBash.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexBash.cxx\n ** Lexer for Bash.\n **/\n// Copyright 2004-2012 by Neil Hodgson <neilh@scintilla.org>\n// Adapted from LexPerl by Kein-Hong Man 2004\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <cstdlib>\n#include <cassert>\n#include <cstring>\n#include <cstdio>\n#include <cstdarg>\n\n#include <string>\n#include <string_view>\n#include <vector>\n#include <map>\n#include <initializer_list>\n#include <functional>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"StringCopy.h\"\n#include \"InList.h\"\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n#include \"OptionSet.h\"\n#include \"SubStyles.h\"\n#include \"DefaultLexer.h\"\n\nusing namespace Scintilla;\nusing namespace Lexilla;\n\nnamespace {\n\n#define HERE_DELIM_MAX\t\t\t256\n\n// define this if you want 'invalid octals' to be marked as errors\n// usually, this is not a good idea, permissive lexing is better\n#undef PEDANTIC_OCTAL\n\n#define BASH_BASE_ERROR\t\t\t65\n#define BASH_BASE_DECIMAL\t\t66\n#define BASH_BASE_HEX\t\t\t67\n#ifdef PEDANTIC_OCTAL\n#define BASH_BASE_OCTAL\t\t\t68\n#define\tBASH_BASE_OCTAL_ERROR\t69\n#endif\n\n// state constants for parts of a bash command segment\nenum class CmdState {\n\tBody,\n\tStart,\n\tWord,\n\tTest,\t\t\t// test\n\tSingleBracket,\t// []\n\tDoubleBracket,\t// [[]]\n\tArithmetic,\n\tDelimiter,\n};\n\nenum class CommandSubstitution : int {\n\tBacktick,\n\tInside,\n\tInsideTrack,\n};\n\n// state constants for nested delimiter pairs, used by\n// SCE_SH_STRING, SCE_SH_PARAM and SCE_SH_BACKTICKS processing\nenum class QuoteStyle {\n\tLiteral,\t\t// ''\n\tCString,\t\t// $''\n\tString,\t\t\t// \"\"\n\tLString,\t\t// $\"\"\n\tHereDoc,\t\t// here document\n\tBacktick,\t\t// ``\n\tParameter,\t\t// ${}\n\tCommand,\t\t// $()\n\tCommandInside,\t// $() with styling inside\n\tArithmetic,\t\t// $(()), $[]\n};\n\n#define BASH_QUOTE_STACK_MAX\t7\n#define BASH_SPECIAL_PARAMETER\t\"*@#?-$!\"\n\nconstexpr int commandSubstitutionFlag = 0x40;\nconstexpr int MaskCommand(int state) noexcept {\n\treturn state & ~commandSubstitutionFlag;\n}\n\nconstexpr int translateBashDigit(int ch) noexcept {\n\tif (ch >= '0' && ch <= '9') {\n\t\treturn ch - '0';\n\t} else if (ch >= 'a' && ch <= 'z') {\n\t\treturn ch - 'a' + 10;\n\t} else if (ch >= 'A' && ch <= 'Z') {\n\t\treturn ch - 'A' + 36;\n\t} else if (ch == '@') {\n\t\treturn 62;\n\t} else if (ch == '_') {\n\t\treturn 63;\n\t}\n\treturn BASH_BASE_ERROR;\n}\n\nint getBashNumberBase(char *s) noexcept {\n\tint i = 0;\n\tint base = 0;\n\twhile (*s) {\n\t\tbase = base * 10 + (*s++ - '0');\n\t\ti++;\n\t}\n\tif (base > 64 || i > 2) {\n\t\treturn BASH_BASE_ERROR;\n\t}\n\treturn base;\n}\n\nconstexpr int opposite(int ch) noexcept {\n\tif (ch == '(') return ')';\n\tif (ch == '[') return ']';\n\tif (ch == '{') return '}';\n\tif (ch == '<') return '>';\n\treturn ch;\n}\n\nint GlobScan(StyleContext &sc) {\n\t// forward scan for zsh globs, disambiguate versus bash arrays\n\t// complex expressions may still fail, e.g. unbalanced () '' \"\" etc\n\tint c = 0;\n\tint sLen = 0;\n\tint pCount = 0;\n\tint hash = 0;\n\twhile ((c = sc.GetRelativeCharacter(++sLen)) != 0) {\n\t\tif (IsASpace(c)) {\n\t\t\treturn 0;\n\t\t} else if (c == '\\'' || c == '\\\"') {\n\t\t\tif (hash != 2) return 0;\n\t\t} else if (c == '#' && hash == 0) {\n\t\t\thash = (sLen == 1) ? 2:1;\n\t\t} else if (c == '(') {\n\t\t\tpCount++;\n\t\t} else if (c == ')') {\n\t\t\tif (pCount == 0) {\n\t\t\t\tif (hash) return sLen;\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\tpCount--;\n\t\t}\n\t}\n\treturn 0;\n}\n\nbool IsCommentLine(Sci_Position line, LexAccessor &styler) {\n\tconst Sci_Position pos = styler.LineStart(line);\n\tconst Sci_Position eol_pos = styler.LineStart(line + 1) - 1;\n\tfor (Sci_Position i = pos; i < eol_pos; i++) {\n\t\tconst char ch = styler[i];\n\t\tif (ch == '#')\n\t\t\treturn true;\n\t\telse if (ch != ' ' && ch != '\\t')\n\t\t\treturn false;\n\t}\n\treturn false;\n}\n\nconstexpr bool StyleForceBacktrack(int state) noexcept {\n\treturn AnyOf(state, SCE_SH_CHARACTER, SCE_SH_STRING, SCE_SH_BACKTICKS, SCE_SH_HERE_Q, SCE_SH_PARAM);\n}\n\nstruct OptionsBash {\n\tbool fold = false;\n\tbool foldComment = false;\n\tbool foldCompact = true;\n\tbool stylingInsideString = false;\n\tbool stylingInsideBackticks = false;\n\tbool stylingInsideParameter = false;\n\tbool stylingInsideHeredoc = false;\n\tbool nestedBackticks = true;\n\tCommandSubstitution commandSubstitution = CommandSubstitution::Backtick;\n\tstd::string specialParameter = BASH_SPECIAL_PARAMETER;\n\n\t[[nodiscard]] bool stylingInside(int state) const noexcept {\n\t\tswitch (state) {\n\t\tcase SCE_SH_STRING:\n\t\t\treturn stylingInsideString;\n\t\tcase SCE_SH_BACKTICKS:\n\t\t\treturn stylingInsideBackticks;\n\t\tcase SCE_SH_PARAM:\n\t\t\treturn stylingInsideParameter;\n\t\tcase SCE_SH_HERE_Q:\n\t\t\treturn stylingInsideHeredoc;\n\t\tdefault:\n\t\t\treturn false;\n\t\t}\n\t}\n};\n\nconst char * const bashWordListDesc[] = {\n\t\"Keywords\",\n\tnullptr\n};\n\nstruct OptionSetBash : public OptionSet<OptionsBash> {\n\tOptionSetBash() {\n\t\tDefineProperty(\"fold\", &OptionsBash::fold);\n\n\t\tDefineProperty(\"fold.comment\", &OptionsBash::foldComment);\n\n\t\tDefineProperty(\"fold.compact\", &OptionsBash::foldCompact);\n\n\t\tDefineProperty(\"lexer.bash.styling.inside.string\", &OptionsBash::stylingInsideString,\n\t\t\t\"Set this property to 1 to highlight shell expansions inside string.\");\n\n\t\tDefineProperty(\"lexer.bash.styling.inside.backticks\", &OptionsBash::stylingInsideBackticks,\n\t\t\t\"Set this property to 1 to highlight shell expansions inside backticks.\");\n\n\t\tDefineProperty(\"lexer.bash.styling.inside.parameter\", &OptionsBash::stylingInsideParameter,\n\t\t\t\"Set this property to 1 to highlight shell expansions inside ${} parameter expansion.\");\n\n\t\tDefineProperty(\"lexer.bash.styling.inside.heredoc\", &OptionsBash::stylingInsideHeredoc,\n\t\t\t\"Set this property to 1 to highlight shell expansions inside here document.\");\n\n\t\tDefineProperty(\"lexer.bash.command.substitution\", &OptionsBash::commandSubstitution,\n\t\t\t\"Set how to highlight $() command substitution. \"\n\t\t\t\"0 (the default) highlighted as backticks. \"\n\t\t\t\"1 highlighted inside. \"\n\t\t\t\"2 highlighted inside with extra scope tracking.\");\n\n\t\tDefineProperty(\"lexer.bash.nested.backticks\", &OptionsBash::nestedBackticks,\n\t\t\t\"Set this property to 0 to disable nested backquoted command substitution.\");\n\n\t\tDefineProperty(\"lexer.bash.special.parameter\", &OptionsBash::specialParameter,\n\t\t\t\"Set shell (default is Bash) special parameters.\");\n\n\t\tDefineWordListSets(bashWordListDesc);\n\t}\n};\n\nclass QuoteCls {\t// Class to manage quote pairs (simplified vs LexPerl)\npublic:\n\tint Count = 0;\n\tint Up = '\\0';\n\tint Down = '\\0';\n\tQuoteStyle Style = QuoteStyle::Literal;\n\tint Outer = SCE_SH_DEFAULT;\n\tCmdState State = CmdState::Body;\n\tvoid Clear() noexcept {\n\t\tCount = 0;\n\t\tUp\t  = '\\0';\n\t\tDown  = '\\0';\n\t\tStyle = QuoteStyle::Literal;\n\t\tOuter = SCE_SH_DEFAULT;\n\t\tState = CmdState::Body;\n\t}\n\tvoid Start(int u, QuoteStyle s, int outer, CmdState state) noexcept {\n\t\tCount = 1;\n\t\tUp    = u;\n\t\tDown  = opposite(Up);\n\t\tStyle = s;\n\t\tOuter = outer;\n\t\tState = state;\n\t}\n};\n\nclass QuoteStackCls {\t// Class to manage quote pairs that nest\npublic:\n\tint Depth = 0;\n\tint State = SCE_SH_DEFAULT;\n\tbool lineContinuation = false;\n\tbool nestedBackticks = false;\n\tCommandSubstitution commandSubstitution = CommandSubstitution::Backtick;\n\tint insideCommand = 0;\n\tunsigned backtickLevel = 0;\n\tQuoteCls Current;\n\tQuoteCls Stack[BASH_QUOTE_STACK_MAX];\n\tconst CharacterSet &setParamStart;\n\tQuoteStackCls(const CharacterSet &setParamStart_) noexcept : setParamStart{setParamStart_} {}\n\t[[nodiscard]] bool Empty() const noexcept {\n\t\treturn Current.Up == '\\0';\n\t}\n\tvoid Start(int u, QuoteStyle s, int outer, CmdState state) noexcept {\n\t\tif (Empty()) {\n\t\t\tCurrent.Start(u, s, outer, state);\n\t\t\tif (s == QuoteStyle::Backtick) {\n\t\t\t\t++backtickLevel;\n\t\t\t}\n\t\t} else {\n\t\t\tPush(u, s, outer, state);\n\t\t}\n\t}\n\tvoid Push(int u, QuoteStyle s, int outer, CmdState state) noexcept {\n\t\tif (Depth >= BASH_QUOTE_STACK_MAX) {\n\t\t\treturn;\n\t\t}\n\t\tStack[Depth] = Current;\n\t\tDepth++;\n\t\tCurrent.Start(u, s, outer, state);\n\t\tif (s == QuoteStyle::Backtick) {\n\t\t\t++backtickLevel;\n\t\t}\n\t}\n\tvoid Pop() noexcept {\n\t\tif (Depth == 0) {\n\t\t\tClear();\n\t\t\treturn;\n\t\t}\n\t\tif (backtickLevel != 0 && Current.Style == QuoteStyle::Backtick) {\n\t\t\t--backtickLevel;\n\t\t}\n\t\tif (insideCommand != 0 && Current.Style == QuoteStyle::CommandInside) {\n\t\t\tinsideCommand = 0;\n\t\t\tfor (int i = 0; i < Depth; i++) {\n\t\t\t\tif (Stack[i].Style == QuoteStyle::CommandInside) {\n\t\t\t\t\tinsideCommand = commandSubstitutionFlag;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tDepth--;\n\t\tCurrent = Stack[Depth];\n\t}\n\tvoid Clear() noexcept {\n\t\tDepth = 0;\n\t\tState = SCE_SH_DEFAULT;\n\t\tinsideCommand = 0;\n\t\tbacktickLevel = 0;\n\t\tCurrent.Clear();\n\t}\n\tbool CountDown(StyleContext &sc, CmdState &cmdState) {\n\t\tCurrent.Count--;\n\t\twhile (Current.Count > 0 && sc.chNext == Current.Down) {\n\t\t\tCurrent.Count--;\n\t\t\tsc.Forward();\n\t\t}\n\t\tif (Current.Count == 0) {\n\t\t\tcmdState = Current.State;\n\t\t\tconst int outer = Current.Outer;\n\t\t\tPop();\n\t\t\tsc.ForwardSetState(outer | insideCommand);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\tvoid Expand(StyleContext &sc, CmdState &cmdState, bool stylingInside) {\n\t\tconst CmdState current = cmdState;\n\t\tconst int state = sc.state;\n\t\tQuoteStyle style = QuoteStyle::Literal;\n\t\tState = state;\n\t\tsc.SetState(SCE_SH_SCALAR);\n\t\tsc.Forward();\n\t\tif (sc.ch == '{') {\n\t\t\tstyle = QuoteStyle::Parameter;\n\t\t\tsc.ChangeState(SCE_SH_PARAM);\n\t\t} else if (sc.ch == '\\'') {\n\t\t\tstyle = QuoteStyle::CString;\n\t\t\tsc.ChangeState(SCE_SH_STRING);\n\t\t} else if (sc.ch == '\"') {\n\t\t\tstyle = QuoteStyle::LString;\n\t\t\tsc.ChangeState(SCE_SH_STRING);\n\t\t} else if (sc.ch == '(' || sc.ch == '[') {\n\t\t\tif (sc.ch == '[' || sc.chNext == '(') {\n\t\t\t\tstyle = QuoteStyle::Arithmetic;\n\t\t\t\tcmdState = CmdState::Arithmetic;\n\t\t\t\tsc.ChangeState(SCE_SH_OPERATOR);\n\t\t\t} else {\n\t\t\t\tif (stylingInside && commandSubstitution >= CommandSubstitution::Inside) {\n\t\t\t\t\tstyle = QuoteStyle::CommandInside;\n\t\t\t\t\tcmdState = CmdState::Delimiter;\n\t\t\t\t\tsc.ChangeState(SCE_SH_OPERATOR);\n\t\t\t\t\tif (commandSubstitution == CommandSubstitution::InsideTrack) {\n\t\t\t\t\t\tinsideCommand = commandSubstitutionFlag;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tstyle = QuoteStyle::Command;\n\t\t\t\t\tsc.ChangeState(SCE_SH_BACKTICKS);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t// scalar has no delimiter pair\n\t\t\tif (!setParamStart.Contains(sc.ch)) {\n\t\t\t\tstylingInside = false; // not scalar\n\t\t\t}\n\t\t}\n\t\tif (!stylingInside) {\n\t\t\tsc.ChangeState(state);\n\t\t} else {\n\t\t\tsc.ChangeState(sc.state | insideCommand);\n\t\t}\n\t\tif (style != QuoteStyle::Literal) {\n\t\t\tStart(sc.ch, style, state, current);\n\t\t\tsc.Forward();\n\t\t}\n\t}\n\tvoid Escape(StyleContext &sc) {\n\t\tunsigned count = 1;\n\t\twhile (sc.chNext == '\\\\') {\n\t\t\t++count;\n\t\t\tsc.Forward();\n\t\t}\n\t\tbool escaped = count & 1U; // odd backslash escape next character\n\t\tif (escaped && (sc.chNext == '\\r' || sc.chNext == '\\n')) {\n\t\t\tlineContinuation = true;\n\t\t\tif (sc.state == SCE_SH_IDENTIFIER) {\n\t\t\t\tsc.SetState(SCE_SH_OPERATOR | insideCommand);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif (backtickLevel > 0 && nestedBackticks) {\n\t\t\t/*\n\t\t\tfor $k$ level substitution with $N$ backslashes:\n\t\t\t* when $N/2^k$ is odd, following dollar is escaped.\n\t\t\t* when $(N - 1)/2^k$ is even, following quote is escaped.\n\t\t\t* when $N = n\\times 2^{k + 1} - 1$, following backtick is escaped.\n\t\t\t* when $N = n\\times 2^{k + 1} + 2^k - 1$, following backtick starts inner substitution.\n\t\t\t* when $N = m\\times 2^k + 2^{k - 1} - 1$ and $k > 1$, following backtick ends current substitution.\n\t\t\t*/\n\t\t\tif (sc.chNext == '$') {\n\t\t\t\tescaped = (count >> backtickLevel) & 1U;\n\t\t\t} else if (sc.chNext == '\\\"' || sc.chNext == '\\'') {\n\t\t\t\tescaped = (((count - 1) >> backtickLevel) & 1U) == 0;\n\t\t\t} else if (sc.chNext == '`' && escaped) {\n\t\t\t\tunsigned mask = 1U << (backtickLevel + 1);\n\t\t\t\tcount += 1;\n\t\t\t\tescaped = (count & (mask - 1)) == 0;\n\t\t\t\tif (!escaped) {\n\t\t\t\t\tunsigned remain = count - (mask >> 1U);\n\t\t\t\t\tif (static_cast<int>(remain) >= 0 && (remain & (mask - 1)) == 0) {\n\t\t\t\t\t\tescaped = true;\n\t\t\t\t\t\t++backtickLevel;\n\t\t\t\t\t} else if (backtickLevel > 1) {\n\t\t\t\t\t\tmask >>= 1U;\n\t\t\t\t\t\tremain = count - (mask >> 1U);\n\t\t\t\t\t\tif (static_cast<int>(remain) >= 0 && (remain & (mask - 1)) == 0) {\n\t\t\t\t\t\t\tescaped = true;\n\t\t\t\t\t\t\t--backtickLevel;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (escaped) {\n\t\t\tsc.Forward();\n\t\t}\n\t}\n};\n\nconst char styleSubable[] = { SCE_SH_IDENTIFIER, SCE_SH_SCALAR, 0 };\n\nconst LexicalClass lexicalClasses[] = {\n\t// Lexer Bash SCLEX_BASH SCE_SH_:\n\t0, \"SCE_SH_DEFAULT\", \"default\", \"White space\",\n\t1, \"SCE_SH_ERROR\", \"error\", \"Error\",\n\t2, \"SCE_SH_COMMENTLINE\", \"comment line\", \"Line comment: #\",\n\t3, \"SCE_SH_NUMBER\", \"literal numeric\", \"Number\",\n\t4, \"SCE_SH_WORD\", \"keyword\", \"Keyword\",\n\t5, \"SCE_SH_STRING\", \"literal string\", \"String\",\n\t6, \"SCE_SH_CHARACTER\", \"literal string\", \"Single quoted string\",\n\t7, \"SCE_SH_OPERATOR\", \"operator\", \"Operators\",\n\t8, \"SCE_SH_IDENTIFIER\", \"identifier\", \"Identifiers\",\n\t9, \"SCE_SH_SCALAR\", \"identifier\", \"Scalar variable\",\n\t10, \"SCE_SH_PARAM\", \"identifier\", \"Parameter\",\n\t11, \"SCE_SH_BACKTICKS\", \"literal string\", \"Backtick quoted command\",\n\t12, \"SCE_SH_HERE_DELIM\", \"operator\", \"Heredoc delimiter\",\n\t13, \"SCE_SH_HERE_Q\", \"here-doc literal string\", \"Heredoc quoted string\",\n};\n\n}\n\nclass LexerBash final : public DefaultLexer {\n\tWordList keywords;\n\tWordList cmdDelimiter;\n\tWordList bashStruct;\n\tWordList bashStruct_in;\n\tWordList testOperator;\n\tOptionsBash options;\n\tOptionSetBash osBash;\n\tCharacterSet setParamStart;\n\tenum { ssIdentifier, ssScalar };\n\tSubStyles subStyles{styleSubable};\npublic:\n\tLexerBash() :\n\t\tDefaultLexer(\"bash\", SCLEX_BASH, lexicalClasses, std::size(lexicalClasses)),\n\t\tsetParamStart(CharacterSet::setAlphaNum, \"_\" BASH_SPECIAL_PARAMETER) {\n\t\tcmdDelimiter.Set(\"| || |& & && ; ;; ( ) { }\");\n\t\tbashStruct.Set(\"if elif fi while until else then do done esac eval\");\n\t\tbashStruct_in.Set(\"for case select\");\n\t\ttestOperator.Set(\"eq ge gt le lt ne ef nt ot\");\n\t}\n\tvoid SCI_METHOD Release() override {\n\t\tdelete this;\n\t}\n\tint SCI_METHOD Version() const override {\n\t\treturn lvRelease5;\n\t}\n\tconst char * SCI_METHOD PropertyNames() override {\n\t\treturn osBash.PropertyNames();\n\t}\n\tint SCI_METHOD PropertyType(const char* name) override {\n\t\treturn osBash.PropertyType(name);\n\t}\n\tconst char * SCI_METHOD DescribeProperty(const char *name) override {\n\t\treturn osBash.DescribeProperty(name);\n\t}\n\tSci_Position SCI_METHOD PropertySet(const char *key, const char *val) override;\n\tconst char * SCI_METHOD PropertyGet(const char* key) override {\n\t\treturn osBash.PropertyGet(key);\n\t}\n\tconst char * SCI_METHOD DescribeWordListSets() override {\n\t\treturn osBash.DescribeWordListSets();\n\t}\n\tSci_Position SCI_METHOD WordListSet(int n, const char *wl) override;\n\tvoid SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;\n\tvoid SCI_METHOD Fold(Sci_PositionU startPos_, Sci_Position length, int initStyle, IDocument *pAccess) override;\n\n\tvoid * SCI_METHOD PrivateCall(int, void *) override {\n\t\treturn nullptr;\n\t}\n\n\tint SCI_METHOD AllocateSubStyles(int styleBase, int numberStyles) override {\n\t\treturn subStyles.Allocate(styleBase, numberStyles);\n\t}\n\tint SCI_METHOD SubStylesStart(int styleBase) override {\n\t\treturn subStyles.Start(styleBase);\n\t}\n\tint SCI_METHOD SubStylesLength(int styleBase) override {\n\t\treturn subStyles.Length(styleBase);\n\t}\n\tint SCI_METHOD StyleFromSubStyle(int subStyle) override {\n\t\tconst int styleBase = subStyles.BaseStyle(subStyle);\n\t\treturn styleBase;\n\t}\n\tint SCI_METHOD PrimaryStyleFromStyle(int style) override {\n\t\treturn style;\n\t}\n\tvoid SCI_METHOD FreeSubStyles() override {\n\t\tsubStyles.Free();\n\t}\n\tvoid SCI_METHOD SetIdentifiers(int style, const char *identifiers) override {\n\t\tsubStyles.SetIdentifiers(style, identifiers);\n\t}\n\tint SCI_METHOD DistanceToSecondaryStyles() override {\n\t\treturn 0;\n\t}\n\tconst char *SCI_METHOD GetSubStyleBases() override {\n\t\treturn styleSubable;\n\t}\n\n\tbool IsTestOperator(const char *s, const CharacterSet &setSingleCharOp) const noexcept {\n\t\treturn (s[2] == '\\0' && setSingleCharOp.Contains(s[1]))\n\t\t\t|| testOperator.InList(s + 1);\n\t}\n\n\tstatic ILexer5 *LexerFactoryBash() {\n\t\treturn new LexerBash();\n\t}\n};\n\nSci_Position SCI_METHOD LexerBash::PropertySet(const char *key, const char *val) {\n\tif (osBash.PropertySet(&options, key, val)) {\n\t\tif (strcmp(key, \"lexer.bash.special.parameter\") == 0) {\n\t\t\tsetParamStart = CharacterSet(CharacterSet::setAlphaNum, \"_\");\n\t\t\tsetParamStart.AddString(options.specialParameter.empty() ? BASH_SPECIAL_PARAMETER : options.specialParameter.c_str());\n\t\t}\n\t\treturn 0;\n\t}\n\treturn -1;\n}\n\nSci_Position SCI_METHOD LexerBash::WordListSet(int n, const char *wl) {\n\tWordList *wordListN = nullptr;\n\tswitch (n) {\n\tcase 0:\n\t\twordListN = &keywords;\n\t\tbreak;\n\t}\n\tSci_Position firstModification = -1;\n\tif (wordListN) {\n\t\tif (wordListN->Set(wl)) {\n\t\t\tfirstModification = 0;\n\t\t}\n\t}\n\treturn firstModification;\n}\n\nvoid SCI_METHOD LexerBash::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) {\n\tconst CharacterSet setWordStart(CharacterSet::setAlpha, \"_\");\n\t// note that [+-] are often parts of identifiers in shell scripts\n\tconst CharacterSet setWord(CharacterSet::setAlphaNum, \"._+-\");\n\tCharacterSet setMetaCharacter(CharacterSet::setNone, \"|&;()<> \\t\\r\\n\");\n\tsetMetaCharacter.Add(0);\n\tconst CharacterSet setBashOperator(CharacterSet::setNone, \"^&%()-+=|{}[]:;>,*/<?!.~@\");\n\tconst CharacterSet setSingleCharOp(CharacterSet::setNone, \"rwxoRWXOezsfdlpSbctugkTBMACahGLNn\");\n\tconst CharacterSet setParam(CharacterSet::setAlphaNum, \"_\");\n\tconst CharacterSet setHereDoc(CharacterSet::setAlpha, \"_\\\\-+!%*,./:?@[]^`{}~\");\n\tconst CharacterSet setHereDoc2(CharacterSet::setAlphaNum, \"_-+!%*,./:=?@[]^`{}~\");\n\tconst CharacterSet setLeftShift(CharacterSet::setDigits, \"$\");\n\n\tclass HereDocCls {\t// Class to manage HERE document elements\n\tpublic:\n\t\tint State = 0;\t\t\t// 0: '<<' encountered\n\t\t// 1: collect the delimiter\n\t\t// 2: here doc text (lines after the delimiter)\n\t\tint Quote = '\\0';\t\t// the char after '<<'\n\t\tbool Quoted = false;\t\t// true if Quote in ('\\'','\"','`')\n\t\tbool Escaped = false;\t\t// backslash in delimiter, common in configure script\n\t\tbool Indent = false;\t\t// indented delimiter (for <<-)\n\t\tint DelimiterLength = 0;\t// strlen(Delimiter)\n\t\tchar Delimiter[HERE_DELIM_MAX]{};\t// the Delimiter\n\t\tHereDocCls() noexcept = default;\n\t\tvoid Append(int ch) {\n\t\t\tDelimiter[DelimiterLength++] = static_cast<char>(ch);\n\t\t\tDelimiter[DelimiterLength] = '\\0';\n\t\t}\n\t};\n\tHereDocCls HereDoc;\n\n\tQuoteStackCls QuoteStack(setParamStart);\n\tQuoteStack.nestedBackticks = options.nestedBackticks;\n\tQuoteStack.commandSubstitution = options.commandSubstitution;\n\n\tconst WordClassifier &classifierIdentifiers = subStyles.Classifier(SCE_SH_IDENTIFIER);\n\tconst WordClassifier &classifierScalars = subStyles.Classifier(SCE_SH_SCALAR);\n\n\tint numBase = 0;\n\tint digit = 0;\n\tconst Sci_PositionU endPos = startPos + length;\n\tCmdState cmdState = CmdState::Start;\n\tLexAccessor styler(pAccess);\n\n\t// Always backtracks to the start of a line that is not a continuation\n\t// of the previous line (i.e. start of a bash command segment)\n\tSci_Position ln = styler.GetLine(startPos);\n\tif (ln > 0 && startPos == static_cast<Sci_PositionU>(styler.LineStart(ln)))\n\t\tln--;\n\tfor (;;) {\n\t\tstartPos = styler.LineStart(ln);\n\t\tif (ln == 0 || styler.GetLineState(ln) == static_cast<int>(CmdState::Start))\n\t\t\tbreak;\n\t\tln--;\n\t}\n\tinitStyle = SCE_SH_DEFAULT;\n\n\tStyleContext sc(startPos, endPos - startPos, initStyle, styler);\n\n\twhile (sc.More()) {\n\n\t\t// handle line continuation, updates per-line stored state\n\t\tif (sc.atLineStart) {\n\t\t\tCmdState state = CmdState::Body;\t// force backtrack while retaining cmdState\n\t\t\tif (!StyleForceBacktrack(MaskCommand(sc.state))) {\n\t\t\t\t// retain last line's state\n\t\t\t\t// arithmetic expression and double bracket test can span multiline without line continuation\n\t\t\t\tif (!QuoteStack.lineContinuation && !AnyOf(cmdState, CmdState::DoubleBracket, CmdState::Arithmetic)) {\n\t\t\t\t\tcmdState = CmdState::Start;\n\t\t\t\t}\n\t\t\t\tif (QuoteStack.Empty()) {\t// force backtrack when nesting\n\t\t\t\t\tstate = cmdState;\n\t\t\t\t}\n\t\t\t}\n\t\t\tQuoteStack.lineContinuation = false;\n\t\t\tstyler.SetLineState(sc.currentLine, static_cast<int>(state));\n\t\t}\n\n\t\t// controls change of cmdState at the end of a non-whitespace element\n\t\t// states Body|Test|Arithmetic persist until the end of a command segment\n\t\t// state Word persist, but ends with 'in' or 'do' construct keywords\n\t\tCmdState cmdStateNew = CmdState::Body;\n\t\tif (cmdState >= CmdState::Word && cmdState <= CmdState::Arithmetic)\n\t\t\tcmdStateNew = cmdState;\n\t\tconst int stylePrev = MaskCommand(sc.state);\n\t\tconst int insideCommand = QuoteStack.insideCommand;\n\n\t\t// Determine if the current state should terminate.\n\t\tswitch (MaskCommand(sc.state)) {\n\t\t\tcase SCE_SH_OPERATOR:\n\t\t\t\tsc.SetState(SCE_SH_DEFAULT | insideCommand);\n\t\t\t\tif (cmdState == CmdState::Delimiter)\t\t// if command delimiter, start new command\n\t\t\t\t\tcmdStateNew = CmdState::Start;\n\t\t\t\telse if (sc.chPrev == '\\\\')\t\t\t// propagate command state if line continued\n\t\t\t\t\tcmdStateNew = cmdState;\n\t\t\t\tbreak;\n\t\t\tcase SCE_SH_WORD:\n\t\t\t\t// \".\" never used in Bash variable names but used in file names\n\t\t\t\tif (!setWord.Contains(sc.ch) || sc.Match('+', '=') || sc.Match('.', '.')) {\n\t\t\t\t\tchar s[500];\n\t\t\t\t\tsc.GetCurrent(s, sizeof(s));\n\t\t\t\t\tint identifierStyle = SCE_SH_IDENTIFIER | insideCommand;\n\t\t\t\t\tconst int subStyle = classifierIdentifiers.ValueFor(s);\n\t\t\t\t\tif (subStyle >= 0) {\n\t\t\t\t\t\tidentifierStyle = subStyle | insideCommand;\n\t\t\t\t\t}\n\t\t\t\t\t// allow keywords ending in a whitespace, meta character or command delimiter\n\t\t\t\t\tchar s2[10];\n\t\t\t\t\ts2[0] = static_cast<char>(sc.ch);\n\t\t\t\t\ts2[1] = '\\0';\n\t\t\t\t\tconst bool keywordEnds = IsASpace(sc.ch) || setMetaCharacter.Contains(sc.ch) || cmdDelimiter.InList(s2);\n\t\t\t\t\t// 'in' or 'do' may be construct keywords\n\t\t\t\t\tif (cmdState == CmdState::Word) {\n\t\t\t\t\t\tif (strcmp(s, \"in\") == 0 && keywordEnds)\n\t\t\t\t\t\t\tcmdStateNew = CmdState::Body;\n\t\t\t\t\t\telse if (strcmp(s, \"do\") == 0 && keywordEnds)\n\t\t\t\t\t\t\tcmdStateNew = CmdState::Start;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tsc.ChangeState(identifierStyle);\n\t\t\t\t\t\tsc.SetState(SCE_SH_DEFAULT | insideCommand);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t// a 'test' keyword starts a test expression\n\t\t\t\t\tif (strcmp(s, \"test\") == 0) {\n\t\t\t\t\t\tif (cmdState == CmdState::Start && keywordEnds) {\n\t\t\t\t\t\t\tcmdStateNew = CmdState::Test;\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\tsc.ChangeState(identifierStyle);\n\t\t\t\t\t}\n\t\t\t\t\t// detect bash construct keywords\n\t\t\t\t\telse if (bashStruct.InList(s)) {\n\t\t\t\t\t\tif (cmdState == CmdState::Start && keywordEnds)\n\t\t\t\t\t\t\tcmdStateNew = CmdState::Start;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tsc.ChangeState(identifierStyle);\n\t\t\t\t\t}\n\t\t\t\t\t// 'for'|'case'|'select' needs 'in'|'do' to be highlighted later\n\t\t\t\t\telse if (bashStruct_in.InList(s)) {\n\t\t\t\t\t\tif (cmdState == CmdState::Start && keywordEnds)\n\t\t\t\t\t\t\tcmdStateNew = CmdState::Word;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tsc.ChangeState(identifierStyle);\n\t\t\t\t\t}\n\t\t\t\t\t// disambiguate option items and file test operators\n\t\t\t\t\telse if (s[0] == '-') {\n\t\t\t\t\t\tif (!AnyOf(cmdState, CmdState::Test, CmdState::SingleBracket, CmdState::DoubleBracket)\n\t\t\t\t\t\t\t  || !keywordEnds || !IsTestOperator(s, setSingleCharOp))\n\t\t\t\t\t\t\tsc.ChangeState(identifierStyle);\n\t\t\t\t\t}\n\t\t\t\t\t// disambiguate keywords and identifiers\n\t\t\t\t\telse if (cmdState != CmdState::Start\n\t\t\t\t\t\t  || !(keywords.InList(s) && keywordEnds)) {\n\t\t\t\t\t\tsc.ChangeState(identifierStyle);\n\t\t\t\t\t}\n\t\t\t\t\tsc.SetState(SCE_SH_DEFAULT | insideCommand);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_SH_IDENTIFIER:\n\t\t\t\tif (!setWord.Contains(sc.ch) ||\n\t\t\t\t\t  (cmdState == CmdState::Arithmetic && !setWordStart.Contains(sc.ch))) {\n\t\t\t\t\tchar s[500];\n\t\t\t\t\tsc.GetCurrent(s, sizeof(s));\n\t\t\t\t\tconst int subStyle = classifierIdentifiers.ValueFor(s);\n\t\t\t\t\tif (subStyle >= 0) {\n\t\t\t\t\t\tsc.ChangeState(subStyle | insideCommand);\n\t\t\t\t\t}\n\t\t\t\t\tsc.SetState(SCE_SH_DEFAULT | insideCommand);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_SH_NUMBER:\n\t\t\t\tdigit = translateBashDigit(sc.ch);\n\t\t\t\tif (numBase == BASH_BASE_DECIMAL) {\n\t\t\t\t\tif (sc.ch == '#') {\n\t\t\t\t\t\tchar s[10];\n\t\t\t\t\t\tsc.GetCurrent(s, sizeof(s));\n\t\t\t\t\t\tnumBase = getBashNumberBase(s);\n\t\t\t\t\t\tif (numBase != BASH_BASE_ERROR)\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else if (IsADigit(sc.ch))\n\t\t\t\t\t\tbreak;\n\t\t\t\t} else if (numBase == BASH_BASE_HEX) {\n\t\t\t\t\tif (IsADigit(sc.ch, 16))\n\t\t\t\t\t\tbreak;\n#ifdef PEDANTIC_OCTAL\n\t\t\t\t} else if (numBase == BASH_BASE_OCTAL ||\n\t\t\t\t\t\t   numBase == BASH_BASE_OCTAL_ERROR) {\n\t\t\t\t\tif (digit <= 7)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tif (digit <= 9) {\n\t\t\t\t\t\tnumBase = BASH_BASE_OCTAL_ERROR;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n#endif\n\t\t\t\t} else if (numBase == BASH_BASE_ERROR) {\n\t\t\t\t\tif (digit <= 9)\n\t\t\t\t\t\tbreak;\n\t\t\t\t} else {\t// DD#DDDD number style handling\n\t\t\t\t\tif (digit != BASH_BASE_ERROR) {\n\t\t\t\t\t\tif (numBase <= 36) {\n\t\t\t\t\t\t\t// case-insensitive if base<=36\n\t\t\t\t\t\t\tif (digit >= 36) digit -= 26;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (digit < numBase)\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tif (digit <= 9) {\n\t\t\t\t\t\t\tnumBase = BASH_BASE_ERROR;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// fallthrough when number is at an end or error\n\t\t\t\tif (numBase == BASH_BASE_ERROR\n#ifdef PEDANTIC_OCTAL\n\t\t\t\t\t|| numBase == BASH_BASE_OCTAL_ERROR\n#endif\n\t\t\t\t) {\n\t\t\t\t\tsc.ChangeState(SCE_SH_ERROR | insideCommand);\n\t\t\t\t} else if (digit < 62 || digit == 63 || (cmdState != CmdState::Arithmetic &&\n\t\t\t\t\t(sc.ch == '-' || (sc.ch == '.' && sc.chNext != '.')))) {\n\t\t\t\t\t// current character is alpha numeric, underscore, hyphen or dot\n\t\t\t\t\tsc.ChangeState(SCE_SH_IDENTIFIER | insideCommand);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tsc.SetState(SCE_SH_DEFAULT | insideCommand);\n\t\t\t\tbreak;\n\t\t\tcase SCE_SH_COMMENTLINE:\n\t\t\t\tif (sc.MatchLineEnd()) {\n\t\t\t\t\tsc.SetState(SCE_SH_DEFAULT | insideCommand);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_SH_HERE_DELIM:\n\t\t\t\t// From Bash info:\n\t\t\t\t// ---------------\n\t\t\t\t// Specifier format is: <<[-]WORD\n\t\t\t\t// Optional '-' is for removal of leading tabs from here-doc.\n\t\t\t\t// Whitespace acceptable after <<[-] operator\n\t\t\t\t//\n\t\t\t\tif (HereDoc.State == 0) { // '<<' encountered\n\t\t\t\t\tHereDoc.Quote = sc.chNext;\n\t\t\t\t\tHereDoc.Quoted = false;\n\t\t\t\t\tHereDoc.Escaped = false;\n\t\t\t\t\tHereDoc.DelimiterLength = 0;\n\t\t\t\t\tHereDoc.Delimiter[HereDoc.DelimiterLength] = '\\0';\n\t\t\t\t\tif (sc.chNext == '\\'' || sc.chNext == '\\\"') {\t// a quoted here-doc delimiter (' or \")\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t\tHereDoc.Quoted = true;\n\t\t\t\t\t\tHereDoc.State = 1;\n\t\t\t\t\t} else if (setHereDoc.Contains(sc.chNext) ||\n\t\t\t\t\t           (sc.chNext == '=' && cmdState != CmdState::Arithmetic)) {\n\t\t\t\t\t\t// an unquoted here-doc delimiter, no special handling\n\t\t\t\t\t\tHereDoc.State = 1;\n\t\t\t\t\t} else if (sc.chNext == '<') {\t// HERE string <<<\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t\tsc.ForwardSetState(SCE_SH_DEFAULT | insideCommand);\n\t\t\t\t\t} else if (IsASpace(sc.chNext)) {\n\t\t\t\t\t\t// eat whitespace\n\t\t\t\t\t} else if (setLeftShift.Contains(sc.chNext) ||\n\t\t\t\t\t           (sc.chNext == '=' && cmdState == CmdState::Arithmetic)) {\n\t\t\t\t\t\t// left shift <<$var or <<= cases\n\t\t\t\t\t\tsc.ChangeState(SCE_SH_OPERATOR | insideCommand);\n\t\t\t\t\t\tsc.ForwardSetState(SCE_SH_DEFAULT | insideCommand);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// symbols terminates; deprecated zero-length delimiter\n\t\t\t\t\t\tHereDoc.State = 1;\n\t\t\t\t\t}\n\t\t\t\t} else if (HereDoc.State == 1) { // collect the delimiter\n\t\t\t\t\t// * if single quoted, there's no escape\n\t\t\t\t\t// * if double quoted, there are \\\\ and \\\" escapes\n\t\t\t\t\tif ((HereDoc.Quote == '\\'' && sc.ch != HereDoc.Quote) ||\n\t\t\t\t\t    (HereDoc.Quoted && sc.ch != HereDoc.Quote && sc.ch != '\\\\') ||\n\t\t\t\t\t    (HereDoc.Quote != '\\'' && sc.chPrev == '\\\\') ||\n\t\t\t\t\t    (setHereDoc2.Contains(sc.ch))) {\n\t\t\t\t\t\tHereDoc.Append(sc.ch);\n\t\t\t\t\t} else if (HereDoc.Quoted && sc.ch == HereDoc.Quote) {\t// closing quote => end of delimiter\n\t\t\t\t\t\tsc.ForwardSetState(SCE_SH_DEFAULT);\n\t\t\t\t\t} else if (sc.ch == '\\\\') {\n\t\t\t\t\t\tHereDoc.Escaped = true;\n\t\t\t\t\t\tif (HereDoc.Quoted && sc.chNext != HereDoc.Quote && sc.chNext != '\\\\') {\n\t\t\t\t\t\t\t// in quoted prefixes only \\ and the quote eat the escape\n\t\t\t\t\t\t\tHereDoc.Append(sc.ch);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// skip escape prefix\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (!HereDoc.Quoted) {\n\t\t\t\t\t\tsc.SetState(SCE_SH_DEFAULT | insideCommand);\n\t\t\t\t\t}\n\t\t\t\t\tif (HereDoc.DelimiterLength >= HERE_DELIM_MAX - 1) {\t// force blowup\n\t\t\t\t\t\tsc.SetState(SCE_SH_ERROR | insideCommand);\n\t\t\t\t\t\tHereDoc.State = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_SH_SCALAR:\t// variable names\n\t\t\t\tif (!setParam.Contains(sc.ch)) {\n\t\t\t\t\tchar s[500];\n\t\t\t\t\tsc.GetCurrent(s, sizeof(s));\n\t\t\t\t\tconst int subStyle = classifierScalars.ValueFor(&s[1]); // skip the $\n\t\t\t\t\tif (subStyle >= 0) {\n\t\t\t\t\t\tsc.ChangeState(subStyle | insideCommand);\n\t\t\t\t\t}\n\t\t\t\t\tif (sc.LengthCurrent() == 1) {\n\t\t\t\t\t\t// Special variable\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t}\n\t\t\t\t\tsc.SetState(QuoteStack.State | insideCommand);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_SH_HERE_Q:\n\t\t\t\t// HereDoc.State == 2\n\t\t\t\tif (sc.atLineStart && QuoteStack.Current.Style == QuoteStyle::HereDoc) {\n\t\t\t\t\tsc.SetState(SCE_SH_HERE_Q | insideCommand);\n\t\t\t\t\tif (HereDoc.Indent) { // tabulation prefix\n\t\t\t\t\t\twhile (sc.ch == '\\t') {\n\t\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ((static_cast<Sci_Position>(sc.currentPos + HereDoc.DelimiterLength) == sc.lineEnd) &&\n\t\t\t\t\t\t(HereDoc.DelimiterLength == 0 || sc.Match(HereDoc.Delimiter))) {\n\t\t\t\t\t\tif (HereDoc.DelimiterLength != 0) {\n\t\t\t\t\t\t\tsc.SetState(SCE_SH_HERE_DELIM | insideCommand);\n\t\t\t\t\t\t\twhile (!sc.MatchLineEnd()) {\n\t\t\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tQuoteStack.Pop();\n\t\t\t\t\t\tsc.SetState(SCE_SH_DEFAULT | QuoteStack.insideCommand);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (HereDoc.Quoted || HereDoc.Escaped) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t// fall through to handle nested shell expansions\n\t\t\t\t[[fallthrough]];\n\t\t\tcase SCE_SH_STRING:\t// delimited styles, can nest\n\t\t\tcase SCE_SH_PARAM: // ${parameter}\n\t\t\tcase SCE_SH_BACKTICKS:\n\t\t\t\tif (sc.ch == '\\\\') {\n\t\t\t\t\tif (QuoteStack.Current.Style != QuoteStyle::Literal)\n\t\t\t\t\t\tQuoteStack.Escape(sc);\n\t\t\t\t} else if (sc.ch == QuoteStack.Current.Down) {\n\t\t\t\t\tif (QuoteStack.CountDown(sc, cmdState)) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t} else if (sc.ch == QuoteStack.Current.Up) {\n\t\t\t\t\tif (QuoteStack.Current.Style != QuoteStyle::Parameter) {\n\t\t\t\t\t\tQuoteStack.Current.Count++;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (QuoteStack.Current.Style == QuoteStyle::String ||\n\t\t\t\t\t\tQuoteStack.Current.Style == QuoteStyle::HereDoc ||\n\t\t\t\t\t\tQuoteStack.Current.Style == QuoteStyle::LString\n\t\t\t\t\t) {\t// do nesting for \"string\", $\"locale-string\", heredoc\n\t\t\t\t\t\tconst bool stylingInside = options.stylingInside(MaskCommand(sc.state));\n\t\t\t\t\t\tif (sc.ch == '`') {\n\t\t\t\t\t\t\tQuoteStack.Push(sc.ch, QuoteStyle::Backtick, sc.state, cmdState);\n\t\t\t\t\t\t\tif (stylingInside) {\n\t\t\t\t\t\t\t\tsc.SetState(SCE_SH_BACKTICKS | insideCommand);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (sc.ch == '$' && !AnyOf(sc.chNext, '\\\"', '\\'')) {\n\t\t\t\t\t\t\tQuoteStack.Expand(sc, cmdState, stylingInside);\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (QuoteStack.Current.Style == QuoteStyle::Command ||\n\t\t\t\t\t\t\t   QuoteStack.Current.Style == QuoteStyle::Parameter ||\n\t\t\t\t\t\t\t   QuoteStack.Current.Style == QuoteStyle::Backtick\n\t\t\t\t\t) {\t// do nesting for $(command), `command`, ${parameter}\n\t\t\t\t\t\tconst bool stylingInside = options.stylingInside(MaskCommand(sc.state));\n\t\t\t\t\t\tif (sc.ch == '\\'') {\n\t\t\t\t\t\t\tif (stylingInside) {\n\t\t\t\t\t\t\t\tQuoteStack.State = sc.state;\n\t\t\t\t\t\t\t\tsc.SetState(SCE_SH_CHARACTER | insideCommand);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tQuoteStack.Push(sc.ch, QuoteStyle::Literal, sc.state, cmdState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (sc.ch == '\\\"') {\n\t\t\t\t\t\t\tQuoteStack.Push(sc.ch, QuoteStyle::String, sc.state, cmdState);\n\t\t\t\t\t\t\tif (stylingInside) {\n\t\t\t\t\t\t\t\tsc.SetState(SCE_SH_STRING | insideCommand);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (sc.ch == '`') {\n\t\t\t\t\t\t\tQuoteStack.Push(sc.ch, QuoteStyle::Backtick, sc.state, cmdState);\n\t\t\t\t\t\t\tif (stylingInside) {\n\t\t\t\t\t\t\t\tsc.SetState(SCE_SH_BACKTICKS | insideCommand);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (sc.ch == '$') {\n\t\t\t\t\t\t\tQuoteStack.Expand(sc, cmdState, stylingInside);\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_SH_CHARACTER: // singly-quoted strings\n\t\t\t\tif (sc.ch == '\\'') {\n\t\t\t\t\tsc.ForwardSetState(QuoteStack.State | insideCommand);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// Must check end of HereDoc state 1 before default state is handled\n\t\tif (HereDoc.State == 1 && sc.MatchLineEnd()) {\n\t\t\t// Begin of here-doc (the line after the here-doc delimiter):\n\t\t\t// Lexically, the here-doc starts from the next line after the >>, but the\n\t\t\t// first line of here-doc seem to follow the style of the last EOL sequence\n\t\t\tHereDoc.State = 2;\n\t\t\tif (HereDoc.Quoted) {\n\t\t\t\tif (MaskCommand(sc.state) == SCE_SH_HERE_DELIM) {\n\t\t\t\t\t// Missing quote at end of string! Syntax error in bash 4.3\n\t\t\t\t\t// Mark this bit as an error, do not colour any here-doc\n\t\t\t\t\tsc.ChangeState(SCE_SH_ERROR | insideCommand);\n\t\t\t\t\tsc.SetState(SCE_SH_DEFAULT | insideCommand);\n\t\t\t\t} else {\n\t\t\t\t\t// HereDoc.Quote always == '\\''\n\t\t\t\t\tsc.SetState(SCE_SH_HERE_Q | insideCommand);\n\t\t\t\t\tQuoteStack.Start(-1, QuoteStyle::HereDoc, SCE_SH_DEFAULT, cmdState);\n\t\t\t\t}\n\t\t\t} else if (HereDoc.DelimiterLength == 0) {\n\t\t\t\t// no delimiter, illegal (but '' and \"\" are legal)\n\t\t\t\tsc.ChangeState(SCE_SH_ERROR | insideCommand);\n\t\t\t\tsc.SetState(SCE_SH_DEFAULT | insideCommand);\n\t\t\t} else {\n\t\t\t\tsc.SetState(SCE_SH_HERE_Q | insideCommand);\n\t\t\t\tQuoteStack.Start(-1, QuoteStyle::HereDoc, SCE_SH_DEFAULT, cmdState);\n\t\t\t}\n\t\t}\n\n\t\t// update cmdState about the current command segment\n\t\tif (stylePrev != SCE_SH_DEFAULT && MaskCommand(sc.state) == SCE_SH_DEFAULT) {\n\t\t\tcmdState = cmdStateNew;\n\t\t}\n\t\t// Determine if a new state should be entered.\n\t\tif (MaskCommand(sc.state) == SCE_SH_DEFAULT) {\n\t\t\tif (sc.ch == '\\\\') {\n\t\t\t\t// Bash can escape any non-newline as a literal\n\t\t\t\tsc.SetState(SCE_SH_IDENTIFIER | insideCommand);\n\t\t\t\tQuoteStack.Escape(sc);\n\t\t\t} else if (IsADigit(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_SH_NUMBER | insideCommand);\n\t\t\t\tnumBase = BASH_BASE_DECIMAL;\n\t\t\t\tif (sc.ch == '0') {\t// hex,octal\n\t\t\t\t\tif (sc.chNext == 'x' || sc.chNext == 'X') {\n\t\t\t\t\t\tnumBase = BASH_BASE_HEX;\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t} else if (IsADigit(sc.chNext)) {\n#ifdef PEDANTIC_OCTAL\n\t\t\t\t\t\tnumBase = BASH_BASE_OCTAL;\n#endif\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (setWordStart.Contains(sc.ch)) {\n\t\t\t\tsc.SetState(((cmdState == CmdState::Arithmetic)? SCE_SH_IDENTIFIER : SCE_SH_WORD) | insideCommand);\n\t\t\t} else if (sc.ch == '#') {\n\t\t\t\tif (stylePrev != SCE_SH_WORD && stylePrev != SCE_SH_IDENTIFIER &&\n\t\t\t\t\t(sc.currentPos == 0 || setMetaCharacter.Contains(sc.chPrev))) {\n\t\t\t\t\tsc.SetState(SCE_SH_COMMENTLINE | insideCommand);\n\t\t\t\t} else {\n\t\t\t\t\tsc.SetState(SCE_SH_WORD | insideCommand);\n\t\t\t\t}\n\t\t\t\t// handle some zsh features within arithmetic expressions only\n\t\t\t\tif (cmdState == CmdState::Arithmetic) {\n\t\t\t\t\tif (sc.chPrev == '[') {\t// [#8] [##8] output digit setting\n\t\t\t\t\t\tsc.SetState(SCE_SH_WORD | insideCommand);\n\t\t\t\t\t\tif (sc.chNext == '#') {\n\t\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (sc.Match(\"##^\") && IsUpperCase(sc.GetRelative(3))) {\t// ##^A\n\t\t\t\t\t\tsc.SetState(SCE_SH_IDENTIFIER | insideCommand);\n\t\t\t\t\t\tsc.Forward(3);\n\t\t\t\t\t} else if (sc.chNext == '#' && !IsASpace(sc.GetRelative(2))) {\t// ##a\n\t\t\t\t\t\tsc.SetState(SCE_SH_IDENTIFIER | insideCommand);\n\t\t\t\t\t\tsc.Forward(2);\n\t\t\t\t\t} else if (setWordStart.Contains(sc.chNext)) {\t// #name\n\t\t\t\t\t\tsc.SetState(SCE_SH_IDENTIFIER | insideCommand);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (sc.ch == '\\\"') {\n\t\t\t\tsc.SetState(SCE_SH_STRING | insideCommand);\n\t\t\t\tQuoteStack.Start(sc.ch, QuoteStyle::String, SCE_SH_DEFAULT, cmdState);\n\t\t\t} else if (sc.ch == '\\'') {\n\t\t\t\tQuoteStack.State = SCE_SH_DEFAULT;\n\t\t\t\tsc.SetState(SCE_SH_CHARACTER | insideCommand);\n\t\t\t} else if (sc.ch == '`') {\n\t\t\t\tsc.SetState(SCE_SH_BACKTICKS | insideCommand);\n\t\t\t\tQuoteStack.Start(sc.ch, QuoteStyle::Backtick, SCE_SH_DEFAULT, cmdState);\n\t\t\t} else if (sc.ch == '$') {\n\t\t\t\tQuoteStack.Expand(sc, cmdState, true);\n\t\t\t\tcontinue;\n\t\t\t} else if (cmdState != CmdState::Arithmetic && sc.Match('<', '<')) {\n\t\t\t\tsc.SetState(SCE_SH_HERE_DELIM | insideCommand);\n\t\t\t\tHereDoc.State = 0;\n\t\t\t\tif (sc.GetRelative(2) == '-') {\t// <<- indent case\n\t\t\t\t\tHereDoc.Indent = true;\n\t\t\t\t\tsc.Forward();\n\t\t\t\t} else {\n\t\t\t\t\tHereDoc.Indent = false;\n\t\t\t\t}\n\t\t\t} else if (sc.ch == '-' && // test operator or short and long option\n\t\t\t\t\t   cmdState != CmdState::Arithmetic &&\n\t\t\t\t\t   sc.chPrev != '~' && !IsADigit(sc.chNext)) {\n\t\t\t\tif (IsASpace(sc.chPrev) || setMetaCharacter.Contains(sc.chPrev)) {\n\t\t\t\t\tsc.SetState(SCE_SH_WORD | insideCommand);\n\t\t\t\t} else {\n\t\t\t\t\tsc.SetState(SCE_SH_IDENTIFIER | insideCommand);\n\t\t\t\t}\n\t\t\t} else if (setBashOperator.Contains(sc.ch)) {\n\t\t\t\tbool isCmdDelim = false;\n\t\t\t\tsc.SetState(SCE_SH_OPERATOR | insideCommand);\n\t\t\t\t// arithmetic expansion and command substitution\n\t\t\t\tif (QuoteStack.Current.Style == QuoteStyle::Arithmetic || QuoteStack.Current.Style == QuoteStyle::CommandInside) {\n\t\t\t\t\tif (sc.ch == QuoteStack.Current.Down) {\n\t\t\t\t\t\tif (QuoteStack.CountDown(sc, cmdState)) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (sc.ch == QuoteStack.Current.Up) {\n\t\t\t\t\t\tQuoteStack.Current.Count++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// globs have no whitespace, do not appear in arithmetic expressions\n\t\t\t\tif (cmdState != CmdState::Arithmetic && sc.ch == '(' && sc.chNext != '(') {\n\t\t\t\t\tconst int i = GlobScan(sc);\n\t\t\t\t\tif (i > 1) {\n\t\t\t\t\t\tsc.SetState(SCE_SH_IDENTIFIER | insideCommand);\n\t\t\t\t\t\tsc.Forward(i + 1);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// handle opening delimiters for test/arithmetic expressions - ((,[[,[\n\t\t\t\tif (cmdState == CmdState::Start\n\t\t\t\t || cmdState == CmdState::Body) {\n\t\t\t\t\tif (sc.Match('(', '(')) {\n\t\t\t\t\t\tcmdState = CmdState::Arithmetic;\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t} else if (sc.Match('[', '[') && IsASpace(sc.GetRelative(2))) {\n\t\t\t\t\t\tcmdState = CmdState::DoubleBracket;\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t} else if (sc.ch == '[' && IsASpace(sc.chNext)) {\n\t\t\t\t\t\tcmdState = CmdState::SingleBracket;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// special state -- for ((x;y;z)) in ... looping\n\t\t\t\tif (cmdState == CmdState::Word && sc.Match('(', '(')) {\n\t\t\t\t\tcmdState = CmdState::Arithmetic;\n\t\t\t\t\tsc.Forward(2);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// handle command delimiters in command Start|Body|Word state, also Test if 'test' or '[]'\n\t\t\t\tif (cmdState < CmdState::DoubleBracket) {\n\t\t\t\t\tchar s[10];\n\t\t\t\t\ts[0] = static_cast<char>(sc.ch);\n\t\t\t\t\tif (setBashOperator.Contains(sc.chNext)) {\n\t\t\t\t\t\ts[1] = static_cast<char>(sc.chNext);\n\t\t\t\t\t\ts[2] = '\\0';\n\t\t\t\t\t\tisCmdDelim = cmdDelimiter.InList(s);\n\t\t\t\t\t\tif (isCmdDelim)\n\t\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t}\n\t\t\t\t\tif (!isCmdDelim) {\n\t\t\t\t\t\ts[1] = '\\0';\n\t\t\t\t\t\tisCmdDelim = cmdDelimiter.InList(s);\n\t\t\t\t\t}\n\t\t\t\t\tif (isCmdDelim) {\n\t\t\t\t\t\tcmdState = CmdState::Delimiter;\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// handle closing delimiters for test/arithmetic expressions - )),]],]\n\t\t\t\tif (cmdState == CmdState::Arithmetic && sc.Match(')', ')')) {\n\t\t\t\t\tcmdState = CmdState::Body;\n\t\t\t\t\tsc.Forward();\n\t\t\t\t} else if (sc.ch == ']' && IsASpace(sc.chPrev)) {\n\t\t\t\t\tif (cmdState == CmdState::SingleBracket) {\n\t\t\t\t\t\tcmdState = CmdState::Body;\n\t\t\t\t\t} else if (cmdState == CmdState::DoubleBracket && sc.chNext == ']') {\n\t\t\t\t\t\tcmdState = CmdState::Body;\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}// sc.state\n\n\t\tsc.Forward();\n\t}\n\tsc.Complete();\n\tif (MaskCommand(sc.state) == SCE_SH_HERE_Q) {\n\t\tstyler.ChangeLexerState(sc.currentPos, styler.Length());\n\t}\n\tsc.Complete();\n}\n\nvoid SCI_METHOD LexerBash::Fold(Sci_PositionU startPos_, Sci_Position length, int initStyle, IDocument *pAccess) {\n\tif(!options.fold)\n\t\treturn;\n\n\tLexAccessor styler(pAccess);\n\n\tSci_Position startPos = startPos_;\n\tconst Sci_Position endPos = startPos + length;\n\tint visibleChars = 0;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\t// Backtrack to previous line in case need to fix its fold status\n\tif (lineCurrent > 0) {\n\t\tlineCurrent--;\n\t\tstartPos = styler.LineStart(lineCurrent);\n\t\tinitStyle = (startPos > 0) ? styler.StyleIndexAt(startPos - 1) : 0;\n\t}\n\n\tint levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK;\n\tint levelCurrent = levelPrev;\n\tchar chNext = styler[startPos];\n\tint styleNext = MaskCommand(styler.StyleIndexAt(startPos));\n\tint style = MaskCommand(initStyle);\n\tchar word[8] = { '\\0' }; // we're not interested in long words anyway\n\tsize_t wordlen = 0;\n\tfor (Sci_Position i = startPos; i < endPos; i++) {\n\t\tconst char ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\tconst int stylePrev = style;\n\t\tstyle = styleNext;\n\t\tstyleNext = MaskCommand(styler.StyleIndexAt(i + 1));\n\t\tconst bool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n\t\t// Comment folding\n\t\tif (options.foldComment && atEOL && IsCommentLine(lineCurrent, styler))\n\t\t{\n\t\t\tif (!IsCommentLine(lineCurrent - 1, styler)\n\t\t\t\t&& IsCommentLine(lineCurrent + 1, styler))\n\t\t\t\tlevelCurrent++;\n\t\t\telse if (IsCommentLine(lineCurrent - 1, styler)\n\t\t\t\t\t && !IsCommentLine(lineCurrent + 1, styler))\n\t\t\t\tlevelCurrent--;\n\t\t}\n\n\t\tswitch (style) {\n\t\tcase SCE_SH_WORD:\n\t\t\tif ((wordlen + 1) < sizeof(word))\n\t\t\t\tword[wordlen++] = ch;\n\t\t\tif (styleNext != style) {\n\t\t\t\tword[wordlen] = '\\0';\n\t\t\t\twordlen = 0;\n\t\t\t\tif (InList(word, {\"if\", \"case\", \"do\"})) {\n\t\t\t\t\tlevelCurrent++;\n\t\t\t\t} else if (InList(word, {\"fi\", \"esac\", \"done\"})) {\n\t\t\t\t\tlevelCurrent--;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase SCE_SH_OPERATOR:\n\t\t\tif (ch == '{') {\n\t\t\t\tlevelCurrent++;\n\t\t\t} else if (ch == '}') {\n\t\t\t\tlevelCurrent--;\n\t\t\t}\n\t\t\tbreak;\n\n\t\t// Here Document folding\n\t\tcase SCE_SH_HERE_DELIM:\n\t\t\tif (stylePrev == SCE_SH_HERE_Q) {\n\t\t\t\tlevelCurrent--;\n\t\t\t} else if (stylePrev != SCE_SH_HERE_DELIM) {\n\t\t\t\tif (ch == '<' && chNext == '<') {\n\t\t\t\t\tif (styler.SafeGetCharAt(i + 2) != '<') {\n\t\t\t\t\t\tlevelCurrent++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_SH_HERE_Q:\n\t\t\tif (styleNext == SCE_SH_DEFAULT) {\n\t\t\t\tlevelCurrent--;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t\tif (atEOL) {\n\t\t\tint lev = levelPrev;\n\t\t\tif (visibleChars == 0 && options.foldCompact)\n\t\t\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\t\t\tif ((levelCurrent > levelPrev) && (visibleChars > 0))\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\tif (lev != styler.LevelAt(lineCurrent)) {\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\t\t\t}\n\t\t\tlineCurrent++;\n\t\t\tlevelPrev = levelCurrent;\n\t\t\tvisibleChars = 0;\n\t\t}\n\t\tif (!isspacechar(ch))\n\t\t\tvisibleChars++;\n\t}\n\t// Fill in the real level of the next line, keeping the current flags as they will be filled in later\n\tconst int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK;\n\tstyler.SetLevel(lineCurrent, levelPrev | flagsNext);\n}\n\nLexerModule lmBash(SCLEX_BASH, LexerBash::LexerFactoryBash, \"bash\", bashWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexBasic.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexBasic.cxx\n ** Lexer for BlitzBasic and PureBasic.\n ** Converted to lexer object and added further folding features/properties by \"Udo Lechner\" <dlchnr(at)gmx(dot)net>\n **/\n// Copyright 1998-2003 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n// This tries to be a unified Lexer/Folder for all the BlitzBasic/BlitzMax/PurBasic basics\n// and derivatives. Once they diverge enough, might want to split it into multiple\n// lexers for more code clearity.\n//\n// Mail me (elias <at> users <dot> sf <dot> net) for any bugs.\n\n// Folding only works for simple things like functions or types.\n\n// You may want to have a look at my ctags lexer as well, if you additionally to coloring\n// and folding need to extract things like label tags in your editor.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n#include <map>\n#include <functional>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n#include \"OptionSet.h\"\n#include \"DefaultLexer.h\"\n\nusing namespace Scintilla;\nusing namespace Lexilla;\n\n/* Bits:\n * 1  - whitespace\n * 2  - operator\n * 4  - identifier\n * 8  - decimal digit\n * 16 - hex digit\n * 32 - bin digit\n * 64 - letter\n */\nstatic int character_classification[128] =\n{\n\t\t0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  0,  0,  1,  0,  0,\n\t\t0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,\n\t\t1,  2,  0,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  10, 2,\n\t 60, 60, 28, 28, 28, 28, 28, 28, 28, 28,  2,  2,  2,  2,  2,  2,\n\t\t2, 84, 84, 84, 84, 84, 84, 68, 68, 68, 68, 68, 68, 68, 68, 68,\n\t 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68,  2,  2,  2,  2, 68,\n\t\t2, 84, 84, 84, 84, 84, 84, 68, 68, 68, 68, 68, 68, 68, 68, 68,\n\t 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68,  2,  2,  2,  2,  0\n};\n\nstatic bool IsSpace(int c) {\n\treturn c < 128 && (character_classification[c] & 1);\n}\n\nstatic bool IsOperator(int c) {\n\treturn c < 128 && (character_classification[c] & 2);\n}\n\nstatic bool IsIdentifier(int c) {\n\treturn c < 128 && (character_classification[c] & 4);\n}\n\nstatic bool IsDigit(int c) {\n\treturn c < 128 && (character_classification[c] & 8);\n}\n\nstatic bool IsHexDigit(int c) {\n\treturn c < 128 && (character_classification[c] & 16);\n}\n\nstatic bool IsBinDigit(int c) {\n\treturn c < 128 && (character_classification[c] & 32);\n}\n\nstatic bool IsLetter(int c) {\n\treturn c < 128 && (character_classification[c] & 64);\n}\n\nstatic int LowerCase(int c)\n{\n\tif (c >= 'A' && c <= 'Z')\n\t\treturn 'a' + c - 'A';\n\treturn c;\n}\n\nstatic int CheckBlitzFoldPoint(char const *token, int &level) {\n\tif (!strcmp(token, \"function\") ||\n\t\t!strcmp(token, \"type\")) {\n\t\tlevel |= SC_FOLDLEVELHEADERFLAG;\n\t\treturn 1;\n\t}\n\tif (!strcmp(token, \"end function\") ||\n\t\t!strcmp(token, \"end type\")) {\n\t\treturn -1;\n\t}\n\treturn 0;\n}\n\nstatic int CheckPureFoldPoint(char const *token, int &level) {\n\tif (!strcmp(token, \"procedure\") ||\n\t\t!strcmp(token, \"enumeration\") ||\n\t\t!strcmp(token, \"interface\") ||\n\t\t!strcmp(token, \"structure\")) {\n\t\tlevel |= SC_FOLDLEVELHEADERFLAG;\n\t\treturn 1;\n\t}\n\tif (!strcmp(token, \"endprocedure\") ||\n\t\t!strcmp(token, \"endenumeration\") ||\n\t\t!strcmp(token, \"endinterface\") ||\n\t\t!strcmp(token, \"endstructure\")) {\n\t\treturn -1;\n\t}\n\treturn 0;\n}\n\nstatic int CheckFreeFoldPoint(char const *token, int &level) {\n\tif (!strcmp(token, \"function\") ||\n\t\t!strcmp(token, \"sub\") ||\n\t\t!strcmp(token, \"enum\") ||\n\t\t!strcmp(token, \"type\") ||\n\t\t!strcmp(token, \"union\") ||\n\t\t!strcmp(token, \"property\") ||\n\t\t!strcmp(token, \"destructor\") ||\n\t\t!strcmp(token, \"constructor\")) {\n\t\tlevel |= SC_FOLDLEVELHEADERFLAG;\n\t\treturn 1;\n\t}\n\tif (!strcmp(token, \"end function\") ||\n\t\t!strcmp(token, \"end sub\") ||\n\t\t!strcmp(token, \"end enum\") ||\n\t\t!strcmp(token, \"end type\") ||\n\t\t!strcmp(token, \"end union\") ||\n\t\t!strcmp(token, \"end property\") ||\n\t\t!strcmp(token, \"end destructor\") ||\n\t\t!strcmp(token, \"end constructor\")) {\n\t\treturn -1;\n\t}\n\treturn 0;\n}\n\n// An individual named option for use in an OptionSet\n\n// Options used for LexerBasic\nstruct OptionsBasic {\n\tbool fold;\n\tbool foldSyntaxBased;\n\tbool foldCommentExplicit;\n\tstd::string foldExplicitStart;\n\tstd::string foldExplicitEnd;\n\tbool foldExplicitAnywhere;\n\tbool foldCompact;\n\tOptionsBasic() {\n\t\tfold = false;\n\t\tfoldSyntaxBased = true;\n\t\tfoldCommentExplicit = false;\n\t\tfoldExplicitStart = \"\";\n\t\tfoldExplicitEnd   = \"\";\n\t\tfoldExplicitAnywhere = false;\n\t\tfoldCompact = true;\n\t}\n};\n\nstatic const char * const blitzbasicWordListDesc[] = {\n\t\"BlitzBasic Keywords\",\n\t\"user1\",\n\t\"user2\",\n\t\"user3\",\n\t0\n};\n\nstatic const char * const purebasicWordListDesc[] = {\n\t\"PureBasic Keywords\",\n\t\"PureBasic PreProcessor Keywords\",\n\t\"user defined 1\",\n\t\"user defined 2\",\n\t0\n};\n\nstatic const char * const freebasicWordListDesc[] = {\n\t\"FreeBasic Keywords\",\n\t\"FreeBasic PreProcessor Keywords\",\n\t\"user defined 1\",\n\t\"user defined 2\",\n\t0\n};\n\nstruct OptionSetBasic : public OptionSet<OptionsBasic> {\n\tOptionSetBasic(const char * const wordListDescriptions[]) {\n\t\tDefineProperty(\"fold\", &OptionsBasic::fold);\n\n\t\tDefineProperty(\"fold.basic.syntax.based\", &OptionsBasic::foldSyntaxBased,\n\t\t\t\"Set this property to 0 to disable syntax based folding.\");\n\n\t\tDefineProperty(\"fold.basic.comment.explicit\", &OptionsBasic::foldCommentExplicit,\n\t\t\t\"This option enables folding explicit fold points when using the Basic lexer. \"\n\t\t\t\"Explicit fold points allows adding extra folding by placing a ;{ (BB/PB) or '{ (FB) comment at the start \"\n\t\t\t\"and a ;} (BB/PB) or '} (FB) at the end of a section that should be folded.\");\n\n\t\tDefineProperty(\"fold.basic.explicit.start\", &OptionsBasic::foldExplicitStart,\n\t\t\t\"The string to use for explicit fold start points, replacing the standard ;{ (BB/PB) or '{ (FB).\");\n\n\t\tDefineProperty(\"fold.basic.explicit.end\", &OptionsBasic::foldExplicitEnd,\n\t\t\t\"The string to use for explicit fold end points, replacing the standard ;} (BB/PB) or '} (FB).\");\n\n\t\tDefineProperty(\"fold.basic.explicit.anywhere\", &OptionsBasic::foldExplicitAnywhere,\n\t\t\t\"Set this property to 1 to enable explicit fold points anywhere, not just in line comments.\");\n\n\t\tDefineProperty(\"fold.compact\", &OptionsBasic::foldCompact);\n\n\t\tDefineWordListSets(wordListDescriptions);\n\t}\n};\n\nclass LexerBasic : public DefaultLexer {\n\tchar comment_char;\n\tint (*CheckFoldPoint)(char const *, int &);\n\tWordList keywordlists[4];\n\tOptionsBasic options;\n\tOptionSetBasic osBasic;\npublic:\n\tLexerBasic(const char *languageName_, int language_, char comment_char_,\n\t\tint (*CheckFoldPoint_)(char const *, int &), const char * const wordListDescriptions[]) :\n\t\t\t\t\t\t DefaultLexer(languageName_, language_),\n\t\t\t\t\t\t comment_char(comment_char_),\n\t\t\t\t\t\t CheckFoldPoint(CheckFoldPoint_),\n\t\t\t\t\t\t osBasic(wordListDescriptions) {\n\t}\n\tvirtual ~LexerBasic() {\n\t}\n\tvoid SCI_METHOD Release() override {\n\t\tdelete this;\n\t}\n\tint SCI_METHOD Version() const override {\n\t\treturn lvRelease5;\n\t}\n\tconst char * SCI_METHOD PropertyNames() override {\n\t\treturn osBasic.PropertyNames();\n\t}\n\tint SCI_METHOD PropertyType(const char *name) override {\n\t\treturn osBasic.PropertyType(name);\n\t}\n\tconst char * SCI_METHOD DescribeProperty(const char *name) override {\n\t\treturn osBasic.DescribeProperty(name);\n\t}\n\tSci_Position SCI_METHOD PropertySet(const char *key, const char *val) override;\n\tconst char * SCI_METHOD PropertyGet(const char *key) override {\n\t\treturn osBasic.PropertyGet(key);\n\t}\n\tconst char * SCI_METHOD DescribeWordListSets() override {\n\t\treturn osBasic.DescribeWordListSets();\n\t}\n\tSci_Position SCI_METHOD WordListSet(int n, const char *wl) override;\n\tvoid SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;\n\tvoid SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;\n\n\tvoid * SCI_METHOD PrivateCall(int, void *) override {\n\t\treturn 0;\n\t}\n\tstatic ILexer5 *LexerFactoryBlitzBasic() {\n\t\treturn new LexerBasic(\"blitzbasic\", SCLEX_BLITZBASIC, ';', CheckBlitzFoldPoint, blitzbasicWordListDesc);\n\t}\n\tstatic ILexer5 *LexerFactoryPureBasic() {\n\t\treturn new LexerBasic(\"purebasic\", SCLEX_PUREBASIC, ';', CheckPureFoldPoint, purebasicWordListDesc);\n\t}\n\tstatic ILexer5 *LexerFactoryFreeBasic() {\n\t\treturn new LexerBasic(\"freebasic\", SCLEX_FREEBASIC, '\\'', CheckFreeFoldPoint, freebasicWordListDesc );\n\t}\n};\n\nSci_Position SCI_METHOD LexerBasic::PropertySet(const char *key, const char *val) {\n\tif (osBasic.PropertySet(&options, key, val)) {\n\t\treturn 0;\n\t}\n\treturn -1;\n}\n\nSci_Position SCI_METHOD LexerBasic::WordListSet(int n, const char *wl) {\n\tWordList *wordListN = 0;\n\tswitch (n) {\n\tcase 0:\n\t\twordListN = &keywordlists[0];\n\t\tbreak;\n\tcase 1:\n\t\twordListN = &keywordlists[1];\n\t\tbreak;\n\tcase 2:\n\t\twordListN = &keywordlists[2];\n\t\tbreak;\n\tcase 3:\n\t\twordListN = &keywordlists[3];\n\t\tbreak;\n\t}\n\tSci_Position firstModification = -1;\n\tif (wordListN) {\n\t\tWordList wlNew;\n\t\twlNew.Set(wl);\n\t\tif (*wordListN != wlNew) {\n\t\t\twordListN->Set(wl);\n\t\t\tfirstModification = 0;\n\t\t}\n\t}\n\treturn firstModification;\n}\n\nvoid SCI_METHOD LexerBasic::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) {\n\tLexAccessor styler(pAccess);\n\n\tbool wasfirst = true, isfirst = true; // true if first token in a line\n\tstyler.StartAt(startPos);\n\tint styleBeforeKeyword = SCE_B_DEFAULT;\n\n\tStyleContext sc(startPos, length, initStyle, styler);\n\n\t// Can't use sc.More() here else we miss the last character\n\tfor (; ; sc.Forward()) {\n\t\tif (sc.state == SCE_B_IDENTIFIER) {\n\t\t\tif (!IsIdentifier(sc.ch)) {\n\t\t\t\t// Labels\n\t\t\t\tif (wasfirst && sc.Match(':')) {\n\t\t\t\t\tsc.ChangeState(SCE_B_LABEL);\n\t\t\t\t\tsc.ForwardSetState(SCE_B_DEFAULT);\n\t\t\t\t} else {\n\t\t\t\t\tchar s[100];\n\t\t\t\t\tint kstates[4] = {\n\t\t\t\t\t\tSCE_B_KEYWORD,\n\t\t\t\t\t\tSCE_B_KEYWORD2,\n\t\t\t\t\t\tSCE_B_KEYWORD3,\n\t\t\t\t\t\tSCE_B_KEYWORD4,\n\t\t\t\t\t};\n\t\t\t\t\tsc.GetCurrentLowered(s, sizeof(s));\n\t\t\t\t\tfor (int i = 0; i < 4; i++) {\n\t\t\t\t\t\tif (keywordlists[i].InList(s)) {\n\t\t\t\t\t\t\tsc.ChangeState(kstates[i]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// Types, must set them as operator else they will be\n\t\t\t\t\t// matched as number/constant\n\t\t\t\t\tif (sc.Match('.') || sc.Match('$') || sc.Match('%') ||\n\t\t\t\t\t\tsc.Match('#')) {\n\t\t\t\t\t\tsc.SetState(SCE_B_OPERATOR);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsc.SetState(SCE_B_DEFAULT);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (sc.state == SCE_B_OPERATOR) {\n\t\t\tif (!IsOperator(sc.ch) || sc.Match('#'))\n\t\t\t\tsc.SetState(SCE_B_DEFAULT);\n\t\t} else if (sc.state == SCE_B_LABEL) {\n\t\t\tif (!IsIdentifier(sc.ch))\n\t\t\t\tsc.SetState(SCE_B_DEFAULT);\n\t\t} else if (sc.state == SCE_B_CONSTANT) {\n\t\t\tif (!IsIdentifier(sc.ch))\n\t\t\t\tsc.SetState(SCE_B_DEFAULT);\n\t\t} else if (sc.state == SCE_B_NUMBER) {\n\t\t\tif (!IsDigit(sc.ch))\n\t\t\t\tsc.SetState(SCE_B_DEFAULT);\n\t\t} else if (sc.state == SCE_B_HEXNUMBER) {\n\t\t\tif (!IsHexDigit(sc.ch))\n\t\t\t\tsc.SetState(SCE_B_DEFAULT);\n\t\t} else if (sc.state == SCE_B_BINNUMBER) {\n\t\t\tif (!IsBinDigit(sc.ch))\n\t\t\t\tsc.SetState(SCE_B_DEFAULT);\n\t\t} else if (sc.state == SCE_B_STRING) {\n\t\t\tif (sc.ch == '\"') {\n\t\t\t\tsc.ForwardSetState(SCE_B_DEFAULT);\n\t\t\t}\n\t\t\tif (sc.atLineEnd) {\n\t\t\t\tsc.ChangeState(SCE_B_ERROR);\n\t\t\t\tsc.SetState(SCE_B_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_B_COMMENT || sc.state == SCE_B_PREPROCESSOR) {\n\t\t\tif (sc.atLineEnd) {\n\t\t\t\tsc.SetState(SCE_B_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_B_DOCLINE) {\n\t\t\tif (sc.atLineEnd) {\n\t\t\t\tsc.SetState(SCE_B_DEFAULT);\n\t\t\t} else if (sc.ch == '\\\\' || sc.ch == '@') {\n\t\t\t\tif (IsLetter(sc.chNext) && sc.chPrev != '\\\\') {\n\t\t\t\t\tstyleBeforeKeyword = sc.state;\n\t\t\t\t\tsc.SetState(SCE_B_DOCKEYWORD);\n\t\t\t\t};\n\t\t\t}\n\t\t} else if (sc.state == SCE_B_DOCKEYWORD) {\n\t\t\tif (IsSpace(sc.ch)) {\n\t\t\t\tsc.SetState(styleBeforeKeyword);\n\t\t\t}\telse if (sc.atLineEnd && styleBeforeKeyword == SCE_B_DOCLINE) {\n\t\t\t\tsc.SetState(SCE_B_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_B_COMMENTBLOCK) {\n\t\t\tif (sc.Match(\"\\'/\")) {\n\t\t\t\tsc.Forward();\n\t\t\t\tsc.ForwardSetState(SCE_B_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_B_DOCBLOCK) {\n\t\t\tif (sc.Match(\"\\'/\")) {\n\t\t\t\tsc.Forward();\n\t\t\t\tsc.ForwardSetState(SCE_B_DEFAULT);\n\t\t\t} else if (sc.ch == '\\\\' || sc.ch == '@') {\n\t\t\t\tif (IsLetter(sc.chNext) && sc.chPrev != '\\\\') {\n\t\t\t\t\tstyleBeforeKeyword = sc.state;\n\t\t\t\t\tsc.SetState(SCE_B_DOCKEYWORD);\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tif (sc.atLineStart)\n\t\t\tisfirst = true;\n\n\t\tif (sc.state == SCE_B_DEFAULT || sc.state == SCE_B_ERROR) {\n\t\t\tif (isfirst && sc.Match('.') && comment_char != '\\'') {\n\t\t\t\t\tsc.SetState(SCE_B_LABEL);\n\t\t\t} else if (isfirst && sc.Match('#')) {\n\t\t\t\twasfirst = isfirst;\n\t\t\t\tsc.SetState(SCE_B_IDENTIFIER);\n\t\t\t} else if (sc.Match(comment_char)) {\n\t\t\t\t// Hack to make deprecated QBASIC '$Include show\n\t\t\t\t// up in freebasic with SCE_B_PREPROCESSOR.\n\t\t\t\tif (comment_char == '\\'' && sc.Match(comment_char, '$'))\n\t\t\t\t\tsc.SetState(SCE_B_PREPROCESSOR);\n\t\t\t\telse if (sc.Match(\"\\'*\") || sc.Match(\"\\'!\")) {\n\t\t\t\t\tsc.SetState(SCE_B_DOCLINE);\n\t\t\t\t} else {\n\t\t\t\t\tsc.SetState(SCE_B_COMMENT);\n\t\t\t\t}\n\t\t\t} else if (sc.Match(\"/\\'\")) {\n\t\t\t\tif (sc.Match(\"/\\'*\") || sc.Match(\"/\\'!\")) {\t// Support of gtk-doc/Doxygen doc. style\n\t\t\t\t\tsc.SetState(SCE_B_DOCBLOCK);\n\t\t\t\t} else {\n\t\t\t\t\tsc.SetState(SCE_B_COMMENTBLOCK);\n\t\t\t\t}\n\t\t\t\tsc.Forward();\t// Eat the ' so it isn't used for the end of the comment\n\t\t\t} else if (sc.Match('\"')) {\n\t\t\t\tsc.SetState(SCE_B_STRING);\n\t\t\t} else if (IsDigit(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_B_NUMBER);\n\t\t\t} else if (sc.Match('$') || sc.Match(\"&h\") || sc.Match(\"&H\") || sc.Match(\"&o\") || sc.Match(\"&O\")) {\n\t\t\t\tsc.SetState(SCE_B_HEXNUMBER);\n\t\t\t} else if (sc.Match('%') || sc.Match(\"&b\") || sc.Match(\"&B\")) {\n\t\t\t\tsc.SetState(SCE_B_BINNUMBER);\n\t\t\t} else if (sc.Match('#')) {\n\t\t\t\tsc.SetState(SCE_B_CONSTANT);\n\t\t\t} else if (IsOperator(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_B_OPERATOR);\n\t\t\t} else if (IsIdentifier(sc.ch)) {\n\t\t\t\twasfirst = isfirst;\n\t\t\t\tsc.SetState(SCE_B_IDENTIFIER);\n\t\t\t} else if (!IsSpace(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_B_ERROR);\n\t\t\t}\n\t\t}\n\n\t\tif (!IsSpace(sc.ch))\n\t\t\tisfirst = false;\n\n\t\tif (!sc.More())\n\t\t\tbreak;\n\t}\n\tsc.Complete();\n}\n\n\nvoid SCI_METHOD LexerBasic::Fold(Sci_PositionU startPos, Sci_Position length, int /* initStyle */, IDocument *pAccess) {\n\n\tif (!options.fold)\n\t\treturn;\n\n\tLexAccessor styler(pAccess);\n\n\tSci_Position line = styler.GetLine(startPos);\n\tint level = styler.LevelAt(line);\n\tint go = 0, done = 0;\n\tSci_Position endPos = startPos + length;\n\tchar word[256];\n\tint wordlen = 0;\n\tconst bool userDefinedFoldMarkers = !options.foldExplicitStart.empty() && !options.foldExplicitEnd.empty();\n\tint cNext = styler[startPos];\n\n\t// Scan for tokens at the start of the line (they may include\n\t// whitespace, for tokens like \"End Function\"\n\tfor (Sci_Position i = startPos; i < endPos; i++) {\n\t\tint c = cNext;\n\t\tcNext = styler.SafeGetCharAt(i + 1);\n\t\tbool atEOL = (c == '\\r' && cNext != '\\n') || (c == '\\n');\n\t\tif (options.foldSyntaxBased && !done && !go) {\n\t\t\tif (wordlen) { // are we scanning a token already?\n\t\t\t\tword[wordlen] = static_cast<char>(LowerCase(c));\n\t\t\t\tif (!IsIdentifier(c)) { // done with token\n\t\t\t\t\tword[wordlen] = '\\0';\n\t\t\t\t\tgo = CheckFoldPoint(word, level);\n\t\t\t\t\tif (!go) {\n\t\t\t\t\t\t// Treat any whitespace as single blank, for\n\t\t\t\t\t\t// things like \"End   Function\".\n\t\t\t\t\t\tif (IsSpace(c) && IsIdentifier(word[wordlen - 1])) {\n\t\t\t\t\t\t\tword[wordlen] = ' ';\n\t\t\t\t\t\t\tif (wordlen < 255)\n\t\t\t\t\t\t\t\twordlen++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse // done with this line\n\t\t\t\t\t\t\tdone = 1;\n\t\t\t\t\t}\n\t\t\t\t} else if (wordlen < 255) {\n\t\t\t\t\twordlen++;\n\t\t\t\t}\n\t\t\t} else { // start scanning at first non-whitespace character\n\t\t\t\tif (!IsSpace(c)) {\n\t\t\t\t\tif (IsIdentifier(c)) {\n\t\t\t\t\t\tword[0] = static_cast<char>(LowerCase(c));\n\t\t\t\t\t\twordlen = 1;\n\t\t\t\t\t} else // done with this line\n\t\t\t\t\t\tdone = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (options.foldCommentExplicit && ((styler.StyleAt(i) == SCE_B_COMMENT) || options.foldExplicitAnywhere)) {\n\t\t\tif (userDefinedFoldMarkers) {\n\t\t\t\tif (styler.Match(i, options.foldExplicitStart.c_str())) {\n \t\t\t\t\tlevel |= SC_FOLDLEVELHEADERFLAG;\n\t\t\t\t\tgo = 1;\n\t\t\t\t} else if (styler.Match(i, options.foldExplicitEnd.c_str())) {\n \t\t\t\t\tgo = -1;\n \t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (c == comment_char) {\n\t\t\t\t\tif (cNext == '{') {\n\t\t\t\t\t\tlevel |= SC_FOLDLEVELHEADERFLAG;\n\t\t\t\t\t\tgo = 1;\n\t\t\t\t\t} else if (cNext == '}') {\n\t\t\t\t\t\tgo = -1;\n\t\t\t\t\t}\n\t\t\t\t}\n \t\t\t}\n \t\t}\n\t\tif (atEOL) { // line end\n\t\t\tif (!done && wordlen == 0 && options.foldCompact) // line was only space\n\t\t\t\tlevel |= SC_FOLDLEVELWHITEFLAG;\n\t\t\tif (level != styler.LevelAt(line))\n\t\t\t\tstyler.SetLevel(line, level);\n\t\t\tlevel += go;\n\t\t\tline++;\n\t\t\t// reset state\n\t\t\twordlen = 0;\n\t\t\tlevel &= ~SC_FOLDLEVELHEADERFLAG;\n\t\t\tlevel &= ~SC_FOLDLEVELWHITEFLAG;\n\t\t\tgo = 0;\n\t\t\tdone = 0;\n\t\t}\n\t}\n}\n\nLexerModule lmBlitzBasic(SCLEX_BLITZBASIC, LexerBasic::LexerFactoryBlitzBasic, \"blitzbasic\", blitzbasicWordListDesc);\n\nLexerModule lmPureBasic(SCLEX_PUREBASIC, LexerBasic::LexerFactoryPureBasic, \"purebasic\", purebasicWordListDesc);\n\nLexerModule lmFreeBasic(SCLEX_FREEBASIC, LexerBasic::LexerFactoryFreeBasic, \"freebasic\", freebasicWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexBatch.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexBatch.cxx\n ** Lexer for batch files.\n **/\n// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <cstdlib>\n#include <cassert>\n#include <cstring>\n#include <cctype>\n#include <cstdio>\n#include <cstdarg>\n\n#include <string>\n#include <string_view>\n#include <initializer_list>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"InList.h\"\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nnamespace {\n\nconstexpr bool Is0To9(char ch) noexcept {\n\treturn (ch >= '0') && (ch <= '9');\n}\n\nbool IsAlphabetic(int ch) noexcept {\n\treturn IsASCII(ch) && isalpha(ch);\n}\n\ninline bool AtEOL(Accessor &styler, Sci_PositionU i) {\n\treturn (styler[i] == '\\n') ||\n\t       ((styler[i] == '\\r') && (styler.SafeGetCharAt(i + 1) != '\\n'));\n}\n\n// Tests for BATCH Operators\nconstexpr bool IsBOperator(char ch) noexcept {\n\treturn (ch == '=') || (ch == '+') || (ch == '>') || (ch == '<') ||\n\t\t(ch == '|') || (ch == '?') || (ch == '*')||\n\t\t(ch == '&') || (ch == '(') || (ch == ')');\n}\n\n// Tests for BATCH Separators\nconstexpr bool IsBSeparator(char ch) noexcept {\n\treturn (ch == '\\\\') || (ch == '.') || (ch == ';') ||\n\t\t(ch == '\\\"') || (ch == '\\'') || (ch == '/');\n}\n\n// Tests for escape character\nconstexpr bool IsEscaped(const char* wordStr, Sci_PositionU pos) noexcept {\n\tbool isQoted=false;\n\twhile (pos>0){\n\t\tpos--;\n\t\tif (wordStr[pos]=='^')\n\t\t\tisQoted=!isQoted;\n\t\telse\n\t\t\tbreak;\n\t}\n\treturn isQoted;\n}\n\nconstexpr bool IsQuotedBy(std::string_view svBuffer, char quote) noexcept {\n\tbool CurrentStatus = false;\n\tsize_t pQuote = svBuffer.find(quote);\n\twhile (pQuote != std::string_view::npos) {\n\t\tif (!IsEscaped(svBuffer.data(), pQuote)) {\n\t\t\tCurrentStatus = !CurrentStatus;\n\t\t}\n\t\tpQuote = svBuffer.find(quote, pQuote + 1);\n\t}\n\treturn CurrentStatus;\n}\n\n// Tests for quote character\nconstexpr bool textQuoted(const char *lineBuffer, Sci_PositionU endPos) noexcept {\n\tconst std::string_view svBuffer(lineBuffer, endPos);\n\treturn IsQuotedBy(svBuffer, '\\\"') || IsQuotedBy(svBuffer, '\\'');\n}\n\nvoid ColouriseBatchDoc(\n    Sci_PositionU startPos,\n    Sci_Position length,\n    int /*initStyle*/,\n    WordList *keywordlists[],\n    Accessor &styler) {\n\t// Always backtracks to the start of a line that is not a continuation\n\t// of the previous line\n\tif (startPos > 0) {\n\t\tSci_Position ln = styler.GetLine(startPos); // Current line number\n\t\twhile (startPos > 0) {\n\t\t\tln--;\n\t\t\tif ((styler.SafeGetCharAt(startPos-3) == '^' && styler.SafeGetCharAt(startPos-2) == '\\r' && styler.SafeGetCharAt(startPos-1) == '\\n')\n\t\t\t|| styler.SafeGetCharAt(startPos-2) == '^') {\t// handle '^' line continuation\n\t\t\t\t// When the line continuation is found,\n\t\t\t\t// set the Start Position to the Start of the previous line\n\t\t\t\tlength+=startPos-styler.LineStart(ln);\n\t\t\t\tstartPos=styler.LineStart(ln);\n\t\t\t}\n\t\t\telse\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tchar lineBuffer[1024] {};\n\n\tstyler.StartAt(startPos);\n\tstyler.StartSegment(startPos);\n\tSci_PositionU linePos = 0;\n\tSci_PositionU startLine = startPos;\n\tbool continueProcessing = true;\t// Used to toggle Regular Keyword Checking\n\tbool isNotAssigned=false; // Used to flag Assignment in Set operation\n\n\tfor (Sci_PositionU i = startPos; i < startPos + length; i++) {\n\t\tlineBuffer[linePos++] = styler[i];\n\t\tif (AtEOL(styler, i) || (linePos >= sizeof(lineBuffer) - 1) || (i==startPos + length-1)) {\n\t\t\t// End of line (or of line buffer) (or End of Last Line) met, colourise it\n\t\t\tlineBuffer[linePos] = '\\0';\n\t\t\tconst Sci_PositionU lengthLine=linePos;\n\t\t\tconst Sci_PositionU endPos=i;\n\t\t\tconst WordList &keywords = *keywordlists[0];      // Internal Commands\n\t\t\tconst WordList &keywords2 = *keywordlists[1];     // External Commands (optional)\n\n\t\t\t// CHOICE, ECHO, GOTO, PROMPT and SET have Default Text that may contain Regular Keywords\n\t\t\t//   Toggling Regular Keyword Checking off improves readability\n\t\t\t// Other Regular Keywords and External Commands / Programs might also benefit from toggling\n\t\t\t//   Need a more robust algorithm to properly toggle Regular Keyword Checking\n\t\t\tbool stopLineProcessing=false;  // Used to stop line processing if Comment or Drive Change found\n\n\t\t\tSci_PositionU offset = 0;\t// Line Buffer Offset\n\t\t\t// Skip initial spaces\n\t\t\twhile ((offset < lengthLine) && (isspacechar(lineBuffer[offset]))) {\n\t\t\t\toffset++;\n\t\t\t}\n\t\t\t// Colorize Default Text\n\t\t\tstyler.ColourTo(startLine + offset - 1, SCE_BAT_DEFAULT);\n\t\t\t// Set External Command / Program Location\n\t\t\tSci_PositionU cmdLoc = offset;\n\n\t\t\t// Check for Fake Label (Comment) or Real Label - return if found\n\t\t\tif (lineBuffer[offset] == ':') {\n\t\t\t\tif (lineBuffer[offset + 1] == ':') {\n\t\t\t\t\t// Colorize Fake Label (Comment) - :: is similar to REM, see http://content.techweb.com/winmag/columns/explorer/2000/21.htm\n\t\t\t\t\tstyler.ColourTo(endPos, SCE_BAT_COMMENT);\n\t\t\t\t} else {\n\t\t\t\t\t// Colorize Real Label\n\t\t\t\t\t// :[\\t ]*[^\\t &+:<>|]+\n\t\t\t\t\tconst char *startLabelName = lineBuffer + offset + 1;\n\t\t\t\t\tconst size_t whitespaceLength = strspn(startLabelName, \"\\t \");\n\t\t\t\t\t// Set of label-terminating characters determined experimentally\n\t\t\t\t\tconst char *endLabel = strpbrk(startLabelName + whitespaceLength, \"\\t &+:<>|\");\n\t\t\t\t\tif (endLabel) {\n\t\t\t\t\t\tstyler.ColourTo(startLine + offset + endLabel - startLabelName, SCE_BAT_LABEL);\n\t\t\t\t\t\tstyler.ColourTo(endPos, SCE_BAT_AFTER_LABEL);\t// New style\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstyler.ColourTo(endPos, SCE_BAT_LABEL);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstopLineProcessing=true;\n\t\t\t// Check for Drive Change (Drive Change is internal command) - return if found\n\t\t\t} else if ((IsAlphabetic(lineBuffer[offset])) &&\n\t\t\t\t(lineBuffer[offset + 1] == ':') &&\n\t\t\t\t((isspacechar(lineBuffer[offset + 2])) ||\n\t\t\t\t(((lineBuffer[offset + 2] == '\\\\')) &&\n\t\t\t\t(isspacechar(lineBuffer[offset + 3]))))) {\n\t\t\t\t// Colorize Regular Keyword\n\t\t\t\tstyler.ColourTo(endPos, SCE_BAT_WORD);\n\t\t\t\tstopLineProcessing=true;\n\t\t\t}\n\n\t\t\t// Check for Hide Command (@ECHO OFF/ON)\n\t\t\tif (lineBuffer[offset] == '@') {\n\t\t\t\tstyler.ColourTo(startLine + offset, SCE_BAT_HIDE);\n\t\t\t\toffset++;\n\t\t\t}\n\t\t\t// Skip next spaces\n\t\t\twhile ((offset < lengthLine) && (isspacechar(lineBuffer[offset]))) {\n\t\t\t\toffset++;\n\t\t\t}\n\n\t\t\t// Read remainder of line word-at-a-time or remainder-of-word-at-a-time\n\t\t\twhile (offset < lengthLine  && !stopLineProcessing) {\n\t\t\t\tif (offset > startLine) {\n\t\t\t\t\t// Colorize Default Text\n\t\t\t\t\tstyler.ColourTo(startLine + offset - 1, SCE_BAT_DEFAULT);\n\t\t\t\t}\n\t\t\t\tchar wordBuffer[81]{};\t\t// Word Buffer - large to catch long paths\n\t\t\t\t// Copy word from Line Buffer into Word Buffer and convert to lower case\n\t\t\t\tSci_PositionU wbl = 0;\t\t// Word Buffer Length\n\t\t\t\tfor (; offset < lengthLine && wbl < 80 &&\n\t\t\t\t\t\t!isspacechar(lineBuffer[offset]); wbl++, offset++) {\n\t\t\t\t\twordBuffer[wbl] = MakeLowerCase(lineBuffer[offset]);\n\t\t\t\t}\n\t\t\t\twordBuffer[wbl] = '\\0';\n\t\t\t\tconst std::string_view wordView(wordBuffer);\n\t\t\t\tSci_PositionU wbo = 0;\t\t// Word Buffer Offset - also Special Keyword Buffer Length\n\n\t\t\t\t// Check for Comment - return if found\n\t\t\t\tif (continueProcessing) {\n\t\t\t\t\tif ((wordView == \"rem\") || (wordBuffer[0] == ':' && wordBuffer[1] == ':')) {\n\t\t\t\t\t\tif ((offset == wbl) || !textQuoted(lineBuffer, offset - wbl)) {\n\t\t\t\t\t\t\tstyler.ColourTo(startLine + offset - wbl - 1, SCE_BAT_DEFAULT);\n\t\t\t\t\t\t\tstyler.ColourTo(endPos, SCE_BAT_COMMENT);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Check for Separator\n\t\t\t\tif (IsBSeparator(wordBuffer[0])) {\n\t\t\t\t\t// Check for External Command / Program\n\t\t\t\t\tif ((cmdLoc == offset - wbl) &&\n\t\t\t\t\t\t((wordBuffer[0] == ':') ||\n\t\t\t\t\t\t(wordBuffer[0] == '\\\\') ||\n\t\t\t\t\t\t(wordBuffer[0] == '.'))) {\n\t\t\t\t\t\t// Reset Offset to re-process remainder of word\n\t\t\t\t\t\toffset -= (wbl - 1);\n\t\t\t\t\t\t// Colorize External Command / Program\n\t\t\t\t\t\tif (!keywords2) {\n\t\t\t\t\t\t\tstyler.ColourTo(startLine + offset - 1, SCE_BAT_COMMAND);\n\t\t\t\t\t\t} else if (keywords2.InList(wordBuffer)) {\n\t\t\t\t\t\t\tstyler.ColourTo(startLine + offset - 1, SCE_BAT_COMMAND);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tstyler.ColourTo(startLine + offset - 1, SCE_BAT_DEFAULT);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Reset External Command / Program Location\n\t\t\t\t\t\tcmdLoc = offset;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Reset Offset to re-process remainder of word\n\t\t\t\t\t\toffset -= (wbl - 1);\n\t\t\t\t\t\t// Colorize Default Text\n\t\t\t\t\t\tstyler.ColourTo(startLine + offset - 1, SCE_BAT_DEFAULT);\n\t\t\t\t\t}\n\t\t\t\t// Check for Regular Keyword in list\n\t\t\t\t} else if ((keywords.InList(wordBuffer)) &&\n\t\t\t\t\t(continueProcessing)) {\n\t\t\t\t\t// ECHO, GOTO, PROMPT and SET require no further Regular Keyword Checking\n\t\t\t\t\tif (InList(wordView, {\"echo\", \"goto\", \"prompt\"})) {\n\t\t\t\t\t\tcontinueProcessing = false;\n\t\t\t\t\t}\n\t\t\t\t\t// SET requires additional processing for the assignment operator\n\t\t\t\t\tif (wordView == \"set\") {\n\t\t\t\t\t\tcontinueProcessing = false;\n\t\t\t\t\t\tisNotAssigned=true;\n\t\t\t\t\t}\n\t\t\t\t\t// Identify External Command / Program Location for ERRORLEVEL, and EXIST\n\t\t\t\t\tif (InList(wordView, {\"errorlevel\", \"exist\"})) {\n\t\t\t\t\t\t// Reset External Command / Program Location\n\t\t\t\t\t\tcmdLoc = offset;\n\t\t\t\t\t\t// Skip next spaces\n\t\t\t\t\t\twhile ((cmdLoc < lengthLine) &&\n\t\t\t\t\t\t\t(isspacechar(lineBuffer[cmdLoc]))) {\n\t\t\t\t\t\t\tcmdLoc++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Skip comparison\n\t\t\t\t\t\twhile ((cmdLoc < lengthLine) &&\n\t\t\t\t\t\t\t(!isspacechar(lineBuffer[cmdLoc]))) {\n\t\t\t\t\t\t\tcmdLoc++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Skip next spaces\n\t\t\t\t\t\twhile ((cmdLoc < lengthLine) &&\n\t\t\t\t\t\t\t(isspacechar(lineBuffer[cmdLoc]))) {\n\t\t\t\t\t\t\tcmdLoc++;\n\t\t\t\t\t\t}\n\t\t\t\t\t// Identify External Command / Program Location for CALL, DO, LOADHIGH and LH\n\t\t\t\t\t} else if (InList(wordView, {\"call\", \"do\", \"loadhigh\", \"lh\"})) {\n\t\t\t\t\t\t// Reset External Command / Program Location\n\t\t\t\t\t\tcmdLoc = offset;\n\t\t\t\t\t\t// Skip next spaces\n\t\t\t\t\t\twhile ((cmdLoc < lengthLine) &&\n\t\t\t\t\t\t\t(isspacechar(lineBuffer[cmdLoc]))) {\n\t\t\t\t\t\t\tcmdLoc++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Check if call is followed by a label\n\t\t\t\t\t\tif ((lineBuffer[cmdLoc] == ':') &&\n\t\t\t\t\t\t\t(wordView == \"call\")) {\n\t\t\t\t\t\t\tcontinueProcessing = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// Colorize Regular keyword\n\t\t\t\t\tstyler.ColourTo(startLine + offset - 1, SCE_BAT_WORD);\n\t\t\t\t\t// No need to Reset Offset\n\t\t\t\t// Check for Special Keyword in list, External Command / Program, or Default Text\n\t\t\t\t} else if ((wordBuffer[0] != '%') &&\n\t\t\t\t\t\t   (wordBuffer[0] != '!') &&\n\t\t\t\t\t(!IsBOperator(wordBuffer[0])) &&\n\t\t\t\t\t(continueProcessing)) {\n\t\t\t\t\t// Check for Special Keyword\n\t\t\t\t\t//     Affected Commands are in Length range 2-6\n\t\t\t\t\t//     Good that ERRORLEVEL, EXIST, CALL, DO, LOADHIGH, and LH are unaffected\n\t\t\t\t\tbool sKeywordFound = false;\t\t// Exit Special Keyword for-loop if found\n\t\t\t\t\tfor (Sci_PositionU keywordLength = 2; keywordLength < wbl && keywordLength < 7 && !sKeywordFound; keywordLength++) {\n\t\t\t\t\t\t// Special Keywords are those that allow certain characters without whitespace after the command\n\t\t\t\t\t\t// Examples are: cd. cd\\ md. rd. dir| dir> echo: echo. path=\n\t\t\t\t\t\t// Special Keyword Buffer used to determine if the first n characters is a Keyword\n\t\t\t\t\t\tchar sKeywordBuffer[10]{};\t// Special Keyword Buffer\n\t\t\t\t\t\twbo = 0;\n\t\t\t\t\t\t// Copy Keyword Length from Word Buffer into Special Keyword Buffer\n\t\t\t\t\t\tfor (; wbo < keywordLength; wbo++) {\n\t\t\t\t\t\t\tsKeywordBuffer[wbo] = wordBuffer[wbo];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsKeywordBuffer[wbo] = '\\0';\n\t\t\t\t\t\t// Check for Special Keyword in list\n\t\t\t\t\t\tif ((keywords.InList(sKeywordBuffer)) &&\n\t\t\t\t\t\t\t((IsBOperator(wordBuffer[wbo])) ||\n\t\t\t\t\t\t\t(IsBSeparator(wordBuffer[wbo])) ||\n\t\t\t\t\t\t\t(wordBuffer[wbo] == ':' &&\n\t\t\t\t\t\t\t(InList(sKeywordBuffer, {\"call\", \"echo\", \"goto\"}) )))) {\n\t\t\t\t\t\t\tsKeywordFound = true;\n\t\t\t\t\t\t\t// ECHO requires no further Regular Keyword Checking\n\t\t\t\t\t\t\tif (std::string_view(sKeywordBuffer) == \"echo\") {\n\t\t\t\t\t\t\t\tcontinueProcessing = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Colorize Special Keyword as Regular Keyword\n\t\t\t\t\t\t\tstyler.ColourTo(startLine + offset - 1 - (wbl - wbo), SCE_BAT_WORD);\n\t\t\t\t\t\t\t// Reset Offset to re-process remainder of word\n\t\t\t\t\t\t\toffset -= (wbl - wbo);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// Check for External Command / Program or Default Text\n\t\t\t\t\tif (!sKeywordFound) {\n\t\t\t\t\t\twbo = 0;\n\t\t\t\t\t\t// Check for External Command / Program\n\t\t\t\t\t\tif (cmdLoc == offset - wbl) {\n\t\t\t\t\t\t\t// Read up to %, Operator or Separator\n\t\t\t\t\t\t\twhile ((wbo < wbl) &&\n\t\t\t\t\t\t\t\t(((wordBuffer[wbo] != '%') &&\n\t\t\t\t\t\t\t\t(wordBuffer[wbo] != '!') &&\n\t\t\t\t\t\t\t\t(!IsBOperator(wordBuffer[wbo])) &&\n\t\t\t\t\t\t\t\t(!IsBSeparator(wordBuffer[wbo]))))) {\n\t\t\t\t\t\t\t\twbo++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Reset External Command / Program Location\n\t\t\t\t\t\t\tcmdLoc = offset - (wbl - wbo);\n\t\t\t\t\t\t\t// Reset Offset to re-process remainder of word\n\t\t\t\t\t\t\toffset -= (wbl - wbo);\n\t\t\t\t\t\t\t// CHOICE requires no further Regular Keyword Checking\n\t\t\t\t\t\t\tif (wordView == \"choice\") {\n\t\t\t\t\t\t\t\tcontinueProcessing = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Check for START (and its switches) - What follows is External Command \\ Program\n\t\t\t\t\t\t\tif (wordView == \"start\") {\n\t\t\t\t\t\t\t\t// Reset External Command / Program Location\n\t\t\t\t\t\t\t\tcmdLoc = offset;\n\t\t\t\t\t\t\t\t// Skip next spaces\n\t\t\t\t\t\t\t\twhile ((cmdLoc < lengthLine) &&\n\t\t\t\t\t\t\t\t\t(isspacechar(lineBuffer[cmdLoc]))) {\n\t\t\t\t\t\t\t\t\tcmdLoc++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Reset External Command / Program Location if command switch detected\n\t\t\t\t\t\t\t\tif (lineBuffer[cmdLoc] == '/') {\n\t\t\t\t\t\t\t\t\t// Skip command switch\n\t\t\t\t\t\t\t\t\twhile ((cmdLoc < lengthLine) &&\n\t\t\t\t\t\t\t\t\t\t(!isspacechar(lineBuffer[cmdLoc]))) {\n\t\t\t\t\t\t\t\t\t\tcmdLoc++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// Skip next spaces\n\t\t\t\t\t\t\t\t\twhile ((cmdLoc < lengthLine) &&\n\t\t\t\t\t\t\t\t\t\t(isspacechar(lineBuffer[cmdLoc]))) {\n\t\t\t\t\t\t\t\t\t\tcmdLoc++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Colorize External Command / Program\n\t\t\t\t\t\t\tif (!keywords2) {\n\t\t\t\t\t\t\t\tstyler.ColourTo(startLine + offset - 1, SCE_BAT_COMMAND);\n\t\t\t\t\t\t\t} else if (keywords2.InList(wordBuffer)) {\n\t\t\t\t\t\t\t\tstyler.ColourTo(startLine + offset - 1, SCE_BAT_COMMAND);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tstyler.ColourTo(startLine + offset - 1, SCE_BAT_DEFAULT);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// No need to Reset Offset\n\t\t\t\t\t\t// Check for Default Text\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Read up to %, Operator or Separator\n\t\t\t\t\t\t\twhile ((wbo < wbl) &&\n\t\t\t\t\t\t\t\t(((wordBuffer[wbo] != '%') &&\n\t\t\t\t\t\t\t\t(wordBuffer[wbo] != '!') &&\n\t\t\t\t\t\t\t\t(!IsBOperator(wordBuffer[wbo])) &&\n\t\t\t\t\t\t\t\t(!IsBSeparator(wordBuffer[wbo]))))) {\n\t\t\t\t\t\t\t\twbo++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Colorize Default Text\n\t\t\t\t\t\t\tstyler.ColourTo(startLine + offset - 1 - (wbl - wbo), SCE_BAT_DEFAULT);\n\t\t\t\t\t\t\t// Reset Offset to re-process remainder of word\n\t\t\t\t\t\t\toffset -= (wbl - wbo);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t// Check for Argument  (%n), Environment Variable (%x...%) or Local Variable (%%a)\n\t\t\t\t} else if (wordBuffer[0] == '%') {\n\t\t\t\t\t// Colorize Default Text\n\t\t\t\t\tstyler.ColourTo(startLine + offset - 1 - wbl, SCE_BAT_DEFAULT);\n\t\t\t\t\twbo++;\n\t\t\t\t\t// Search to end of word for second % (can be a long path)\n\t\t\t\t\twhile ((wbo < wbl) &&\n\t\t\t\t\t\t(wordBuffer[wbo] != '%')) {\n\t\t\t\t\t\twbo++;\n\t\t\t\t\t}\n\t\t\t\t\t// Check for Argument (%n) or (%*)\n\t\t\t\t\tif (((Is0To9(wordBuffer[1])) || (wordBuffer[1] == '*')) &&\n\t\t\t\t\t\t(wordBuffer[wbo] != '%')) {\n\t\t\t\t\t\t// Check for External Command / Program\n\t\t\t\t\t\tif (cmdLoc == offset - wbl) {\n\t\t\t\t\t\t\tcmdLoc = offset - (wbl - 2);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Colorize Argument\n\t\t\t\t\t\tstyler.ColourTo(startLine + offset - 1 - (wbl - 2), SCE_BAT_IDENTIFIER);\n\t\t\t\t\t\t// Reset Offset to re-process remainder of word\n\t\t\t\t\t\toffset -= (wbl - 2);\n\t\t\t\t\t// Check for Expanded Argument (%~...) / Variable (%%~...)\n\t\t\t\t\t// Expanded Argument: %~[<path-operators>]<single digit>\n\t\t\t\t\t// Expanded Variable: %%~[<path-operators>]<single identifier character>\n\t\t\t\t\t// Path operators are exclusively alphabetic.\n\t\t\t\t\t// Expanded arguments have a single digit at the end.\n\t\t\t\t\t// Expanded variables have a single identifier character as variable name.\n\t\t\t\t\t} else if (((wbl > 1) && (wordBuffer[1] == '~')) ||\n\t\t\t\t\t\t((wbl > 2) && (wordBuffer[1] == '%') && (wordBuffer[2] == '~'))) {\n\t\t\t\t\t\t// Check for External Command / Program\n\t\t\t\t\t\tif (cmdLoc == offset - wbl) {\n\t\t\t\t\t\t\tcmdLoc = offset - (wbl - wbo);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst bool isArgument = (wordBuffer[1] == '~');\n\t\t\t\t\t\tif (isArgument) {\n\t\t\t\t\t\t\tSci_PositionU expansionStopOffset = 2;\n\t\t\t\t\t\t\tbool isValid = false;\n\t\t\t\t\t\t\tfor (; expansionStopOffset < wbl; expansionStopOffset++) {\n\t\t\t\t\t\t\t\tif (Is0To9(wordBuffer[expansionStopOffset])) {\n\t\t\t\t\t\t\t\t\texpansionStopOffset++;\n\t\t\t\t\t\t\t\t\tisValid = true;\n\t\t\t\t\t\t\t\t\twbo = expansionStopOffset;\n\t\t\t\t\t\t\t\t\t// Colorize Expanded Argument\n\t\t\t\t\t\t\t\t\tstyler.ColourTo(startLine + offset - 1 - (wbl - wbo), SCE_BAT_IDENTIFIER);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (!isValid) {\n\t\t\t\t\t\t\t\t// not a valid expanded argument or variable\n\t\t\t\t\t\t\t\tstyler.ColourTo(startLine + offset - 1 - (wbl - wbo), SCE_BAT_DEFAULT);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t// Expanded Variable\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// start after ~\n\t\t\t\t\t\t\twbo = 3;\n\t\t\t\t\t\t\t// Search to end of word for another % (can be a long path)\n\t\t\t\t\t\t\twhile ((wbo < wbl) &&\n\t\t\t\t\t\t\t\t(wordBuffer[wbo] != '%') &&\n\t\t\t\t\t\t\t\t(!IsBOperator(wordBuffer[wbo])) &&\n\t\t\t\t\t\t\t\t(!IsBSeparator(wordBuffer[wbo]))) {\n\t\t\t\t\t\t\t\twbo++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (wbo > 3) {\n\t\t\t\t\t\t\t\t// Colorize Expanded Variable\n\t\t\t\t\t\t\t\tstyler.ColourTo(startLine + offset - 1 - (wbl - wbo), SCE_BAT_IDENTIFIER);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// not a valid expanded argument or variable\n\t\t\t\t\t\t\t\tstyler.ColourTo(startLine + offset - 1 - (wbl - wbo), SCE_BAT_DEFAULT);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Reset Offset to re-process remainder of word\n\t\t\t\t\t\toffset -= (wbl - wbo);\n\t\t\t\t\t// Check for Environment Variable (%x...%)\n\t\t\t\t\t} else if ((wordBuffer[1] != '%') &&\n\t\t\t\t\t\t(wordBuffer[wbo] == '%')) {\n\t\t\t\t\t\twbo++;\n\t\t\t\t\t\t// Check for External Command / Program\n\t\t\t\t\t\tif (cmdLoc == offset - wbl) {\n\t\t\t\t\t\t\tcmdLoc = offset - (wbl - wbo);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Colorize Environment Variable\n\t\t\t\t\t\tstyler.ColourTo(startLine + offset - 1 - (wbl - wbo), SCE_BAT_IDENTIFIER);\n\t\t\t\t\t\t// Reset Offset to re-process remainder of word\n\t\t\t\t\t\toffset -= (wbl - wbo);\n\t\t\t\t\t// Check for Local Variable (%%a)\n\t\t\t\t\t} else if (\n\t\t\t\t\t\t(wbl > 2) &&\n\t\t\t\t\t\t(wordBuffer[1] == '%') &&\n\t\t\t\t\t\t(wordBuffer[2] != '%') &&\n\t\t\t\t\t\t(!IsBOperator(wordBuffer[2])) &&\n\t\t\t\t\t\t(!IsBSeparator(wordBuffer[2]))) {\n\t\t\t\t\t\t// Check for External Command / Program\n\t\t\t\t\t\tif (cmdLoc == offset - wbl) {\n\t\t\t\t\t\t\tcmdLoc = offset - (wbl - 3);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Colorize Local Variable\n\t\t\t\t\t\tstyler.ColourTo(startLine + offset - 1 - (wbl - 3), SCE_BAT_IDENTIFIER);\n\t\t\t\t\t\t// Reset Offset to re-process remainder of word\n\t\t\t\t\t\toffset -= (wbl - 3);\n\t\t\t\t\t// escaped %\n\t\t\t\t\t} else if (\n\t\t\t\t\t\t(wbl > 1) &&\n\t\t\t\t\t\t(wordBuffer[1] == '%')) {\n\n\t\t\t\t\t\t// Reset Offset to re-process remainder of word\n\t\t\t\t\t\tstyler.ColourTo(startLine + offset - 1 - (wbl - 2), SCE_BAT_DEFAULT);\n\t\t\t\t\t\toffset -= (wbl - 2);\n\t\t\t\t\t}\n\t\t\t\t// Check for Environment Variable (!x...!)\n\t\t\t\t} else if (wordBuffer[0] == '!') {\n\t\t\t\t\t// Colorize Default Text\n\t\t\t\t\tstyler.ColourTo(startLine + offset - 1 - wbl, SCE_BAT_DEFAULT);\n\t\t\t\t\twbo++;\n\t\t\t\t\t// Search to end of word for second ! (can be a long path)\n\t\t\t\t\twhile ((wbo < wbl) &&\n\t\t\t\t\t\t(wordBuffer[wbo] != '!')) {\n\t\t\t\t\t\twbo++;\n\t\t\t\t\t}\n\t\t\t\t\tif (wordBuffer[wbo] == '!') {\n\t\t\t\t\t\twbo++;\n\t\t\t\t\t\t// Check for External Command / Program\n\t\t\t\t\t\tif (cmdLoc == offset - wbl) {\n\t\t\t\t\t\t\tcmdLoc = offset - (wbl - wbo);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Colorize Environment Variable\n\t\t\t\t\t\tstyler.ColourTo(startLine + offset - 1 - (wbl - wbo), SCE_BAT_IDENTIFIER);\n\t\t\t\t\t\t// Reset Offset to re-process remainder of word\n\t\t\t\t\t\toffset -= (wbl - wbo);\n\t\t\t\t\t}\n\t\t\t\t// Check for Operator\n\t\t\t\t} else if (IsBOperator(wordBuffer[0])) {\n\t\t\t\t\t// Colorize Default Text\n\t\t\t\t\tstyler.ColourTo(startLine + offset - 1 - wbl, SCE_BAT_DEFAULT);\n\t\t\t\t\t// Check for Comparison Operator\n\t\t\t\t\tif ((wordBuffer[0] == '=') && (wordBuffer[1] == '=')) {\n\t\t\t\t\t\t// Identify External Command / Program Location for IF\n\t\t\t\t\t\tcmdLoc = offset;\n\t\t\t\t\t\t// Skip next spaces\n\t\t\t\t\t\twhile ((cmdLoc < lengthLine) &&\n\t\t\t\t\t\t\t(isspacechar(lineBuffer[cmdLoc]))) {\n\t\t\t\t\t\t\tcmdLoc++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Colorize Comparison Operator\n\t\t\t\t\t\tif (continueProcessing)\n\t\t\t\t\t\t\tstyler.ColourTo(startLine + offset - 1 - (wbl - 2), SCE_BAT_OPERATOR);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tstyler.ColourTo(startLine + offset - 1 - (wbl - 2), SCE_BAT_DEFAULT);\n\t\t\t\t\t\t// Reset Offset to re-process remainder of word\n\t\t\t\t\t\toffset -= (wbl - 2);\n\t\t\t\t\t// Check for Pipe Operator\n\t\t\t\t\t} else if ((wordBuffer[0] == '|') &&\n\t\t\t\t\t\t\t\t!(IsEscaped(lineBuffer,offset - wbl + wbo) || textQuoted(lineBuffer, offset - wbl) )) {\n\t\t\t\t\t\t// Reset External Command / Program Location\n\t\t\t\t\t\tcmdLoc = offset - wbl + 1;\n\t\t\t\t\t\t// Skip next spaces\n\t\t\t\t\t\twhile ((cmdLoc < lengthLine) &&\n\t\t\t\t\t\t\t(isspacechar(lineBuffer[cmdLoc]))) {\n\t\t\t\t\t\t\tcmdLoc++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Colorize Pipe Operator\n\t\t\t\t\t\tstyler.ColourTo(startLine + offset - 1 - (wbl - 1), SCE_BAT_OPERATOR);\n\t\t\t\t\t\t// Reset Offset to re-process remainder of word\n\t\t\t\t\t\toffset -= (wbl - 1);\n\t\t\t\t\t\tcontinueProcessing = true;\n\t\t\t\t\t// Check for Other Operator\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Check for Operators: >, |, &\n\t\t\t\t\t\tif (((wordBuffer[0] == '>')||\n\t\t\t\t\t\t   (wordBuffer[0] == ')')||\n\t\t\t\t\t\t   (wordBuffer[0] == '(')||\n\t\t\t\t\t\t   (wordBuffer[0] == '&' )) &&\n\t\t\t\t\t\t   !(!continueProcessing && (IsEscaped(lineBuffer,offset - wbl + wbo)\n\t\t\t\t\t\t   || textQuoted(lineBuffer, offset - wbl) ))){\n\t\t\t\t\t\t\t// Turn Keyword and External Command / Program checking back on\n\t\t\t\t\t\t\tcontinueProcessing = true;\n\t\t\t\t\t\t\tisNotAssigned=false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Colorize Other Operators\n\t\t\t\t\t\t// Do not Colorize Parenthesis, quoted text and escaped operators\n\t\t\t\t\t\tif (((wordBuffer[0] != ')') && (wordBuffer[0] != '(')\n\t\t\t\t\t\t&& !textQuoted(lineBuffer, offset - wbl)  && !IsEscaped(lineBuffer,offset - wbl + wbo))\n\t\t\t\t\t\t&& !((wordBuffer[0] == '=') && !isNotAssigned ))\n\t\t\t\t\t\t\tstyler.ColourTo(startLine + offset - 1 - (wbl - 1), SCE_BAT_OPERATOR);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tstyler.ColourTo(startLine + offset - 1 - (wbl - 1), SCE_BAT_DEFAULT);\n\t\t\t\t\t\t// Reset Offset to re-process remainder of word\n\t\t\t\t\t\toffset -= (wbl - 1);\n\n\t\t\t\t\t\tif ((wordBuffer[0] == '=') && isNotAssigned ){\n\t\t\t\t\t\t\tisNotAssigned=false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t// Check for Default Text\n\t\t\t\t} else {\n\t\t\t\t\t// Read up to %, Operator or Separator\n\t\t\t\t\twhile ((wbo < wbl) &&\n\t\t\t\t\t\t((wordBuffer[wbo] != '%') &&\n\t\t\t\t\t\t(wordBuffer[wbo] != '!') &&\n\t\t\t\t\t\t(!IsBOperator(wordBuffer[wbo])) &&\n\t\t\t\t\t\t(!IsBSeparator(wordBuffer[wbo])))) {\n\t\t\t\t\t\twbo++;\n\t\t\t\t\t}\n\t\t\t\t\t// Colorize Default Text\n\t\t\t\t\tstyler.ColourTo(startLine + offset - 1 - (wbl - wbo), SCE_BAT_DEFAULT);\n\t\t\t\t\t// Reset Offset to re-process remainder of word\n\t\t\t\t\toffset -= (wbl - wbo);\n\t\t\t\t}\n\t\t\t\t// Skip next spaces - nothing happens if Offset was Reset\n\t\t\t\twhile ((offset < lengthLine) && (isspacechar(lineBuffer[offset]))) {\n\t\t\t\t\toffset++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Colorize Default Text for remainder of line - currently not lexed\n\t\t\tstyler.ColourTo(endPos, SCE_BAT_DEFAULT);\n\n\t\t\t// handle line continuation for SET and ECHO commands except the last line\n\t\t\tif (!continueProcessing && (i<startPos + length-1)) {\n\t\t\t\tif (linePos==1 || (linePos==2 && lineBuffer[1]=='\\r')) // empty line on Unix and Mac or on Windows\n\t\t\t\t\tcontinueProcessing=true;\n\t\t\t\telse {\n\t\t\t\t\tSci_PositionU lineContinuationPos;\n\t\t\t\t\tif ((linePos>2) && lineBuffer[linePos-2]=='\\r') // Windows EOL\n\t\t\t\t\t\tlineContinuationPos=linePos-3;\n\t\t\t\t\telse\n\t\t\t\t\t\tlineContinuationPos=linePos-2; // Unix or Mac EOL\n\t\t\t\t\t// Reset continueProcessing\tif line continuation was not found\n\t\t\t\t\tif ((lineBuffer[lineContinuationPos]!='^')\n\t\t\t\t\t\t\t|| IsEscaped(lineBuffer, lineContinuationPos)\n\t\t\t\t\t\t\t|| textQuoted(lineBuffer, lineContinuationPos))\n\t\t\t\t\t\tcontinueProcessing=true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlinePos = 0;\n\t\t\tstartLine = i + 1;\n\t\t}\n\t}\n}\n\nconst char *const batchWordListDesc[] = {\n\t\"Internal Commands\",\n\t\"External Commands\",\n\tnullptr\n};\n\n}\n\nLexerModule lmBatch(SCLEX_BATCH, ColouriseBatchDoc, \"batch\", nullptr, batchWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexBibTeX.cxx",
    "content": "// Copyright 2008-2010 Sergiu Dotenco. The License.txt file describes the\n// conditions under which this software may be distributed.\n\n/**\n * @file LexBibTeX.cxx\n * @brief General BibTeX coloring scheme.\n * @author Sergiu Dotenco\n * @date April 18, 2009\n */\n\n#include <stdlib.h>\n#include <string.h>\n\n#include <cassert>\n#include <cctype>\n\n#include <string>\n#include <string_view>\n#include <algorithm>\n#include <functional>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"PropSetSimple.h\"\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nnamespace {\n\tbool IsAlphabetic(unsigned int ch)\n\t{\n\t\treturn IsASCII(ch) && std::isalpha(ch) != 0;\n\t}\n\tbool IsAlphaNumeric(char ch)\n\t{\n\t    return IsASCII(ch) && std::isalnum(ch);\n\t}\n\n\tbool EqualCaseInsensitive(const char* a, const char* b)\n\t{\n\t\treturn CompareCaseInsensitive(a, b) == 0;\n\t}\n\n\tbool EntryWithoutKey(const char* name)\n\t{\n\t\treturn EqualCaseInsensitive(name,\"string\");\n\t}\n\n\tchar GetClosingBrace(char openbrace)\n\t{\n\t\tchar result = openbrace;\n\n\t\tswitch (openbrace) {\n\t\t\tcase '(': result = ')'; break;\n\t\t\tcase '{': result = '}'; break;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tbool IsEntryStart(char prev, char ch)\n\t{\n\t\treturn prev != '\\\\' && ch == '@';\n\t}\n\n\tbool IsEntryStart(const StyleContext& sc)\n\t{\n\t\treturn IsEntryStart(sc.chPrev, sc.ch);\n\t}\n\n\tvoid ColorizeBibTeX(Sci_PositionU start_pos, Sci_Position length, int /*init_style*/, WordList* keywordlists[], Accessor& styler)\n\t{\n\t    WordList &EntryNames = *keywordlists[0];\n\t\tbool fold_compact = styler.GetPropertyInt(\"fold.compact\", 1) != 0;\n\n\t\tstd::string buffer;\n\t\tbuffer.reserve(25);\n\n\t\t// We always colorize a section from the beginning, so let's\n\t\t// search for the @ character which isn't escaped, i.e. \\@\n\t\twhile (start_pos > 0 && !IsEntryStart(styler.SafeGetCharAt(start_pos - 1),\n\t\t\tstyler.SafeGetCharAt(start_pos))) {\n\t\t\t--start_pos; ++length;\n\t\t}\n\n\t\tstyler.StartAt(start_pos);\n\t\tstyler.StartSegment(start_pos);\n\n\t\tSci_Position current_line = styler.GetLine(start_pos);\n\t\tint prev_level = styler.LevelAt(current_line) & SC_FOLDLEVELNUMBERMASK;\n\t\tint current_level = prev_level;\n\t\tint visible_chars = 0;\n\n\t\tbool in_comment = false ;\n\t\tStyleContext sc(start_pos, length, SCE_BIBTEX_DEFAULT, styler);\n\n\t\tbool going = sc.More(); // needed because of a fuzzy end of file state\n\t\tchar closing_brace = 0;\n\t\tbool collect_entry_name = false;\n\n\t\tfor (; going; sc.Forward()) {\n\t\t\tif (!sc.More())\n\t\t\t\tgoing = false; // we need to go one behind the end of text\n\n\t\t\tif (in_comment) {\n\t\t\t\tif (sc.atLineEnd) {\n\t\t\t\t\tsc.SetState(SCE_BIBTEX_DEFAULT);\n\t\t\t\t\tin_comment = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// Found @entry\n\t\t\t\tif (IsEntryStart(sc)) {\n\t\t\t\t\tsc.SetState(SCE_BIBTEX_UNKNOWN_ENTRY);\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\t++current_level;\n\n\t\t\t\t\tbuffer.clear();\n\t\t\t\t\tcollect_entry_name = true;\n\t\t\t\t}\n\t\t\t\telse if ((sc.state == SCE_BIBTEX_ENTRY || sc.state == SCE_BIBTEX_UNKNOWN_ENTRY)\n\t\t\t\t\t&& (sc.ch == '{' || sc.ch == '(')) {\n\t\t\t\t\t// Entry name colorization done\n\t\t\t\t\t// Found either a { or a ( after entry's name, e.g. @entry(...) @entry{...}\n\t\t\t\t\t// Closing counterpart needs to be stored.\n\t\t\t\t\tclosing_brace = GetClosingBrace(sc.ch);\n\n\t\t\t\t\tsc.SetState(SCE_BIBTEX_DEFAULT); // Don't colorize { (\n\n\t\t\t\t\t// @string doesn't have any key\n\t\t\t\t\tif (EntryWithoutKey(buffer.c_str()))\n\t\t\t\t\t\tsc.ForwardSetState(SCE_BIBTEX_PARAMETER);\n\t\t\t\t\telse\n\t\t\t\t\t\tsc.ForwardSetState(SCE_BIBTEX_KEY); // Key/label colorization\n\t\t\t\t}\n\n\t\t\t\t// Need to handle the case where entry's key is empty\n\t\t\t\t// e.g. @book{,...}\n\t\t\t\tif (sc.state == SCE_BIBTEX_KEY && sc.ch == ',') {\n\t\t\t\t\t// Key/label colorization done\n\t\t\t\t\tsc.SetState(SCE_BIBTEX_DEFAULT); // Don't colorize the ,\n\t\t\t\t\tsc.ForwardSetState(SCE_BIBTEX_PARAMETER); // Parameter colorization\n\t\t\t\t}\n\t\t\t\telse if (sc.state == SCE_BIBTEX_PARAMETER && sc.ch == '=') {\n\t\t\t\t\tsc.SetState(SCE_BIBTEX_DEFAULT); // Don't colorize the =\n\t\t\t\t\tsc.ForwardSetState(SCE_BIBTEX_VALUE); // Parameter value colorization\n\n\t\t\t\t\tSci_Position start = sc.currentPos;\n\n\t\t\t\t\t// We need to handle multiple situations:\n\t\t\t\t\t// 1. name\"one two {three}\"\n\t\t\t\t\t// 2. name={one {one two {two}} three}\n\t\t\t\t\t// 3. year=2005\n\n\t\t\t\t\t// Skip \", { until we encounter the first alphanumerical character\n\t\t\t\t\twhile (sc.More() && !(IsAlphaNumeric(sc.ch) || sc.ch == '\"' || sc.ch == '{'))\n\t\t\t\t\t\tsc.Forward();\n\n\t\t\t\t\tif (sc.More()) {\n\t\t\t\t\t\t// Store \" or {\n\t\t\t\t\t\tchar ch = sc.ch;\n\n\t\t\t\t\t\t// Not interested in alphanumerical characters\n\t\t\t\t\t\tif (IsAlphaNumeric(ch))\n\t\t\t\t\t\t\tch = 0;\n\n\t\t\t\t\t\tint skipped = 0;\n\n\t\t\t\t\t\tif (ch) {\n\t\t\t\t\t\t\t// Skip preceding \" or { such as in name={{test}}.\n\t\t\t\t\t\t\t// Remember how many characters have been skipped\n\t\t\t\t\t\t\t// Make sure that empty values, i.e. \"\" are also handled correctly\n\t\t\t\t\t\t\twhile (sc.More() && (sc.ch == ch && (ch != '\"' || skipped < 1))) {\n\t\t\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t\t\t\t++skipped;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Closing counterpart for \" is the same character\n\t\t\t\t\t\tif (ch == '{')\n\t\t\t\t\t\t\tch = '}';\n\n\t\t\t\t\t\t// We have reached the parameter value\n\t\t\t\t\t\t// In case the open character was a alnum char, skip until , is found\n\t\t\t\t\t\t// otherwise until skipped == 0\n\t\t\t\t\t\twhile (sc.More() && (skipped > 0 || (!ch && !(sc.ch == ',' || sc.ch == closing_brace)))) {\n\t\t\t\t\t\t\t// Make sure the character isn't escaped\n\t\t\t\t\t\t\tif (sc.chPrev != '\\\\') {\n\t\t\t\t\t\t\t\t// Parameter value contains a { which is the 2nd case described above\n\t\t\t\t\t\t\t\tif (sc.ch == '{')\n\t\t\t\t\t\t\t\t\t++skipped; // Remember it\n\t\t\t\t\t\t\t\telse if (sc.ch == '}')\n\t\t\t\t\t\t\t\t\t--skipped;\n\t\t\t\t\t\t\t\telse if (skipped == 1 && sc.ch == ch && ch == '\"') // Don't ignore cases like {\"o}\n\t\t\t\t\t\t\t\t\tskipped = 0;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Don't colorize the ,\n\t\t\t\t\tsc.SetState(SCE_BIBTEX_DEFAULT);\n\n\t\t\t\t\t// Skip until the , or entry's closing closing_brace is found\n\t\t\t\t\t// since this parameter might be the last one\n\t\t\t\t\twhile (sc.More() && !(sc.ch == ',' || sc.ch == closing_brace))\n\t\t\t\t\t\tsc.Forward();\n\n\t\t\t\t\tint state = SCE_BIBTEX_PARAMETER; // The might be more parameters\n\n\t\t\t\t\t// We've reached the closing closing_brace for the bib entry\n\t\t\t\t\t// in case no \" or {} has been used to enclose the value,\n\t\t\t\t\t// as in 3rd case described above\n\t\t\t\t\tif (sc.ch == closing_brace) {\n\t\t\t\t\t\t--current_level;\n\t\t\t\t\t\t// Make sure the text between entries is not colored\n\t\t\t\t\t\t// using parameter's style\n\t\t\t\t\t\tstate = SCE_BIBTEX_DEFAULT;\n\t\t\t\t\t}\n\n\t\t\t\t\tSci_Position end = sc.currentPos;\n\t\t\t\t\tcurrent_line = styler.GetLine(end);\n\n\t\t\t\t\t// We have possibly skipped some lines, so the folding levels\n\t\t\t\t\t// have to be adjusted separately\n\t\t\t\t\tfor (Sci_Position i = styler.GetLine(start); i <= styler.GetLine(end); ++i)\n\t\t\t\t\t\tstyler.SetLevel(i, prev_level);\n\n\t\t\t\t\tsc.ForwardSetState(state);\n\t\t\t\t}\n\n\t\t\t\tif (sc.state == SCE_BIBTEX_PARAMETER && sc.ch == closing_brace) {\n\t\t\t\t\tsc.SetState(SCE_BIBTEX_DEFAULT);\n\t\t\t\t\t--current_level;\n\t\t\t\t}\n\n\t\t\t\t// Non escaped % found which represents a comment until the end of the line\n\t\t\t\tif (sc.chPrev != '\\\\' && sc.ch == '%') {\n\t\t\t\t\tin_comment = true;\n\t\t\t\t\tsc.SetState(SCE_BIBTEX_COMMENT);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (sc.state == SCE_BIBTEX_UNKNOWN_ENTRY || sc.state == SCE_BIBTEX_ENTRY) {\n\t\t\t\tif (!IsAlphabetic(sc.ch) && collect_entry_name)\n\t\t\t\t\tcollect_entry_name = false;\n\n\t\t\t\tif (collect_entry_name) {\n\t\t\t\t\tbuffer += static_cast<char>(tolower(sc.ch));\n                    if (EntryNames.InList(buffer.c_str()))\n                        sc.ChangeState(SCE_BIBTEX_ENTRY);\n                    else\n                        sc.ChangeState(SCE_BIBTEX_UNKNOWN_ENTRY);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (sc.atLineEnd) {\n\t\t\t\tint level = prev_level;\n\n\t\t\t\tif (visible_chars == 0 && fold_compact)\n\t\t\t\t\tlevel |= SC_FOLDLEVELWHITEFLAG;\n\n\t\t\t\tif ((current_level > prev_level))\n\t\t\t\t\tlevel |= SC_FOLDLEVELHEADERFLAG;\n\t\t\t\t// else if (current_level < prev_level)\n\t\t\t\t//\tlevel |= SC_FOLDLEVELBOXFOOTERFLAG; // Deprecated\n\n\t\t\t\tif (level != styler.LevelAt(current_line)) {\n\t\t\t\t\tstyler.SetLevel(current_line, level);\n\t\t\t\t}\n\n\t\t\t\t++current_line;\n\t\t\t\tprev_level = current_level;\n\t\t\t\tvisible_chars = 0;\n\t\t\t}\n\n\t\t\tif (!isspacechar(sc.ch))\n\t\t\t\t++visible_chars;\n\t\t}\n\n\t\tsc.Complete();\n\n\t\t// Fill in the real level of the next line, keeping the current flags as they will be filled in later\n\t\tint flagsNext = styler.LevelAt(current_line) & ~SC_FOLDLEVELNUMBERMASK;\n\t\tstyler.SetLevel(current_line, prev_level | flagsNext);\n\t}\n}\nstatic const char * const BibTeXWordLists[] = {\n            \"Entry Names\",\n            0,\n};\n\n\nLexerModule lmBibTeX(SCLEX_BIBTEX, ColorizeBibTeX, \"bib\", 0, BibTeXWordLists);\n\n// Entry Names\n//    article, book, booklet, conference, inbook,\n//    incollection, inproceedings, manual, mastersthesis,\n//    misc, phdthesis, proceedings, techreport, unpublished,\n//    string, url\n\n"
  },
  {
    "path": "lexilla/lexers/LexBullant.cxx",
    "content": "// SciTE - Scintilla based Text Editor\n// LexBullant.cxx - lexer for Bullant\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nstatic int classifyWordBullant(Sci_PositionU start, Sci_PositionU end, WordList &keywords, Accessor &styler) {\n\tchar s[100];\n\ts[0] = '\\0';\n\tfor (Sci_PositionU i = 0; i < end - start + 1 && i < 30; i++) {\n\t\ts[i] = static_cast<char>(tolower(styler[start + i]));\n\t\ts[i + 1] = '\\0';\n\t}\n\tint lev= 0;\n\tchar chAttr = SCE_C_IDENTIFIER;\n\tif (isdigit(s[0]) || (s[0] == '.')){\n\t\tchAttr = SCE_C_NUMBER;\n\t}\n\telse {\n\t\tif (keywords.InList(s)) {\n\t\t\tchAttr = SCE_C_WORD;\n\t\t\tif (strcmp(s, \"end\") == 0)\n\t\t\t\tlev = -1;\n\t\t\telse if (strcmp(s, \"method\") == 0 ||\n\t\t\t\tstrcmp(s, \"case\") == 0 ||\n\t\t\t\tstrcmp(s, \"class\") == 0 ||\n\t\t\t\tstrcmp(s, \"debug\") == 0 ||\n\t\t\t\tstrcmp(s, \"test\") == 0 ||\n\t\t\t\tstrcmp(s, \"if\") == 0 ||\n\t\t\t\tstrcmp(s, \"lock\") == 0 ||\n\t\t\t\tstrcmp(s, \"transaction\") == 0 ||\n\t\t\t\tstrcmp(s, \"trap\") == 0 ||\n\t\t\t\tstrcmp(s, \"until\") == 0 ||\n\t\t\t\tstrcmp(s, \"while\") == 0)\n\t\t\t\tlev = 1;\n\t\t}\n\t}\n\tstyler.ColourTo(end, chAttr);\n\treturn lev;\n}\n\nstatic void ColouriseBullantDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[],\n\tAccessor &styler) {\n\tWordList &keywords = *keywordlists[0];\n\n\tstyler.StartAt(startPos);\n\n\tbool fold = styler.GetPropertyInt(\"fold\") != 0;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tint levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK;\n\tint levelCurrent = levelPrev;\n\n\tint state = initStyle;\n\tif (state == SCE_C_STRINGEOL)\t// Does not leak onto next line\n\t\tstate = SCE_C_DEFAULT;\n\tchar chPrev = ' ';\n\tchar chNext = styler[startPos];\n\tSci_PositionU lengthDoc = startPos + length;\n\tint visibleChars = 0;\n\tstyler.StartSegment(startPos);\n\tint endFoundThisLine = 0;\n\tfor (Sci_PositionU i = startPos; i < lengthDoc; i++) {\n\t\tchar ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\n\t\tif ((ch == '\\r' && chNext != '\\n') || (ch == '\\n')) {\n\t\t\t// Trigger on CR only (Mac style) or either on LF from CR+LF (Dos/Win) or on LF alone (Unix)\n\t\t\t// Avoid triggering two times on Dos/Win\n\t\t\t// End of line\n\t\t\tendFoundThisLine = 0;\n\t\t\tif (state == SCE_C_STRINGEOL) {\n\t\t\t\tstyler.ColourTo(i, state);\n\t\t\t\tstate = SCE_C_DEFAULT;\n\t\t\t}\n\t\t\tif (fold) {\n\t\t\t\tint lev = levelPrev;\n\t\t\t\tif (visibleChars == 0)\n\t\t\t\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\t\t\t\tif ((levelCurrent > levelPrev) && (visibleChars > 0))\n\t\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\t\t\t\tlineCurrent++;\n\t\t\t\tlevelPrev = levelCurrent;\n\t\t\t}\n\t\t\tvisibleChars = 0;\n\n/*\t\t\tint indentBlock = GetLineIndentation(lineCurrent);\n\t\t\tif (blockChange==1){\n\t\t\t\tlineCurrent++;\n\t\t\t\tint pos=SetLineIndentation(lineCurrent, indentBlock + indentSize);\n\t\t\t} else if (blockChange==-1) {\n\t\t\t\tindentBlock -= indentSize;\n\t\t\t\tif (indentBlock < 0)\n\t\t\t\t\tindentBlock = 0;\n\t\t\t\tSetLineIndentation(lineCurrent, indentBlock);\n\t\t\t\tlineCurrent++;\n\t\t\t}\n\t\t\tblockChange=0;\n*/\t\t}\n\t\tif (!(IsASCII(ch) && isspace(ch)))\n\t\t\tvisibleChars++;\n\n\t\tif (styler.IsLeadByte(ch)) {\n\t\t\tchNext = styler.SafeGetCharAt(i + 2);\n\t\t\tchPrev = ' ';\n\t\t\ti += 1;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (state == SCE_C_DEFAULT) {\n\t\t\tif (iswordstart(ch)) {\n\t\t\t\tstyler.ColourTo(i-1, state);\n\t\t\t\t\tstate = SCE_C_IDENTIFIER;\n\t\t\t} else if (ch == '@' && chNext == 'o') {\n\t\t\t\tif ((styler.SafeGetCharAt(i+2) =='f') && (styler.SafeGetCharAt(i+3) == 'f')) {\n\t\t\t\t\tstyler.ColourTo(i-1, state);\n\t\t\t\t\tstate = SCE_C_COMMENT;\n\t\t\t\t}\n\t\t\t} else if (ch == '#') {\n\t\t\t\tstyler.ColourTo(i-1, state);\n\t\t\t\tstate = SCE_C_COMMENTLINE;\n\t\t\t} else if (ch == '\\\"') {\n\t\t\t\tstyler.ColourTo(i-1, state);\n\t\t\t\tstate = SCE_C_STRING;\n\t\t\t} else if (ch == '\\'') {\n\t\t\t\tstyler.ColourTo(i-1, state);\n\t\t\t\tstate = SCE_C_CHARACTER;\n\t\t\t} else if (isoperator(ch)) {\n\t\t\t\tstyler.ColourTo(i-1, state);\n\t\t\t\tstyler.ColourTo(i, SCE_C_OPERATOR);\n\t\t\t}\n\t\t} else if (state == SCE_C_IDENTIFIER) {\n\t\t\tif (!iswordchar(ch)) {\n\t\t\t\tint levelChange = classifyWordBullant(styler.GetStartSegment(), i - 1, keywords, styler);\n\t\t\t\tstate = SCE_C_DEFAULT;\n\t\t\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\t\t\tif (ch == '#') {\n\t\t\t\t\tstate = SCE_C_COMMENTLINE;\n\t\t\t\t} else if (ch == '\\\"') {\n\t\t\t\t\tstate = SCE_C_STRING;\n\t\t\t\t} else if (ch == '\\'') {\n\t\t\t\t\tstate = SCE_C_CHARACTER;\n\t\t\t\t} else if (isoperator(ch)) {\n\t\t\t\t\tstyler.ColourTo(i, SCE_C_OPERATOR);\n\t\t\t\t}\n\t\t\t\tif (endFoundThisLine == 0)\n\t\t\t\t\tlevelCurrent+=levelChange;\n\t\t\t\tif (levelChange == -1)\n\t\t\t\t\tendFoundThisLine=1;\n\t\t\t}\n\t\t} else if (state == SCE_C_COMMENT) {\n\t\t\tif (ch == '@' && chNext == 'o') {\n\t\t\t\tif (styler.SafeGetCharAt(i+2) == 'n') {\n\t\t\t\t\tstyler.ColourTo(i+2, state);\n\t\t\t\t\tstate = SCE_C_DEFAULT;\n\t\t\t\t\ti+=2;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (state == SCE_C_COMMENTLINE) {\n\t\t\tif (ch == '\\r' || ch == '\\n') {\n\t\t\t\tendFoundThisLine = 0;\n\t\t\t\tstyler.ColourTo(i-1, state);\n\t\t\t\tstate = SCE_C_DEFAULT;\n\t\t\t}\n\t\t} else if (state == SCE_C_STRING) {\n\t\t\tif (ch == '\\\\') {\n\t\t\t\tif (chNext == '\\\"' || chNext == '\\'' || chNext == '\\\\') {\n\t\t\t\t\ti++;\n\t\t\t\t\tch = chNext;\n\t\t\t\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\t\t\t}\n\t\t\t} else if (ch == '\\\"') {\n\t\t\t\tstyler.ColourTo(i, state);\n\t\t\t\tstate = SCE_C_DEFAULT;\n\t\t\t} else if (chNext == '\\r' || chNext == '\\n') {\n\t\t\t\tendFoundThisLine = 0;\n\t\t\t\tstyler.ColourTo(i-1, SCE_C_STRINGEOL);\n\t\t\t\tstate = SCE_C_STRINGEOL;\n\t\t\t}\n\t\t} else if (state == SCE_C_CHARACTER) {\n\t\t\tif ((ch == '\\r' || ch == '\\n') && (chPrev != '\\\\')) {\n\t\t\t\tendFoundThisLine = 0;\n\t\t\t\tstyler.ColourTo(i-1, SCE_C_STRINGEOL);\n\t\t\t\tstate = SCE_C_STRINGEOL;\n\t\t\t} else if (ch == '\\\\') {\n\t\t\t\tif (chNext == '\\\"' || chNext == '\\'' || chNext == '\\\\') {\n\t\t\t\t\ti++;\n\t\t\t\t\tch = chNext;\n\t\t\t\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\t\t\t}\n\t\t\t} else if (ch == '\\'') {\n\t\t\t\tstyler.ColourTo(i, state);\n\t\t\t\tstate = SCE_C_DEFAULT;\n\t\t\t}\n\t\t}\n\t\tchPrev = ch;\n\t}\n\tstyler.ColourTo(lengthDoc - 1, state);\n\n\t// Fill in the real level of the next line, keeping the current flags as they will be filled in later\n\tif (fold) {\n\t\tint flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK;\n\t\t//styler.SetLevel(lineCurrent, levelCurrent | flagsNext);\n\t\tstyler.SetLevel(lineCurrent, levelPrev | flagsNext);\n\n\t}\n}\n\nstatic const char * const bullantWordListDesc[] = {\n\t\"Keywords\",\n\t0\n};\n\nLexerModule lmBullant(SCLEX_BULLANT, ColouriseBullantDoc, \"bullant\", 0, bullantWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexCIL.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexCIL.cxx\n ** Lexer for Common Intermediate Language\n ** Written by Jad Altahan (github.com/xv)\n ** CIL manual: https://www.ecma-international.org/publications/standards/Ecma-335.htm\n **/\n// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n#include <map>\n#include <algorithm>\n#include <functional>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"StringCopy.h\"\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n#include \"OptionSet.h\"\n#include \"DefaultLexer.h\"\n\nusing namespace Scintilla;\nusing namespace Lexilla;\n\nnamespace {\n    // Use an unnamed namespace to protect the functions and classes from name conflicts\n\nbool IsAWordChar(const int ch) {\n    return (ch < 0x80) && (isalnum(ch) || ch == '_' || ch == '.');\n}\n\nbool IsOperator(const int ch) {\n    if ((ch < 0x80) && (isalnum(ch)))\n        return false;\n\n    if (strchr(\"!%&*+-/<=>@^|~()[]{}\", ch)) {\n        return true;\n    }\n\n    return false;\n}\n\nconstexpr bool IsStreamCommentStyle(const int style) noexcept {\n    return style == SCE_CIL_COMMENT;\n}\n\nstruct OptionsCIL {\n    bool fold;\n    bool foldComment;\n    bool foldCommentMultiline;\n    bool foldCompact;\n\n    OptionsCIL() {\n        fold = true;\n        foldComment = false;\n        foldCommentMultiline = true;\n        foldCompact = true;\n    }\n};\n\nstatic const char *const cilWordListDesc[] = {\n    \"Primary CIL keywords\",\n    \"Metadata\",\n    \"Opcode instructions\",\n    0\n};\n\nstruct OptionSetCIL : public OptionSet<OptionsCIL> {\n    OptionSetCIL() {\n        DefineProperty(\"fold\", &OptionsCIL::fold);\n        DefineProperty(\"fold.comment\", &OptionsCIL::foldComment);\n\n        DefineProperty(\"fold.cil.comment.multiline\", &OptionsCIL::foldCommentMultiline,\n            \"Set this property to 0 to disable folding multi-line comments when fold.comment=1.\");\n\n        DefineProperty(\"fold.compact\", &OptionsCIL::foldCompact);\n\n        DefineWordListSets(cilWordListDesc);\n    }\n};\n\nLexicalClass lexicalClasses[] = {\n    // Lexer CIL SCLEX_CIL SCE_CIL_:\n    0,  \"SCE_CIL_DEFAULT\",     \"default\",              \"White space\",\n    1,  \"SCE_CIL_COMMENT\",     \"comment\",              \"Multi-line comment\",\n    2,  \"SCE_CIL_COMMENTLINE\", \"comment line\",         \"Line comment\",\n    3,  \"SCE_CIL_WORD\",        \"keyword\",              \"Keyword 1\",\n    4,  \"SCE_CIL_WORD2\",       \"keyword\",              \"Keyword 2\",\n    5,  \"SCE_CIL_WORD3\",       \"keyword\",              \"Keyword 3\",\n    6,  \"SCE_CIL_STRING\",      \"literal string\",       \"Double quoted string\",\n    7,  \"SCE_CIL_LABEL\",       \"label\",                \"Code label\",\n    8,  \"SCE_CIL_OPERATOR\",    \"operator\",             \"Operators\",\n    9,  \"SCE_CIL_STRINGEOL\",   \"error literal string\", \"String is not closed\",\n    10, \"SCE_CIL_IDENTIFIER\",  \"identifier\",           \"Identifiers\",\n};\n\n}\n\nclass LexerCIL : public DefaultLexer {\n    WordList keywords, keywords2, keywords3;\n    OptionsCIL options;\n    OptionSetCIL osCIL;\n\npublic:\n    LexerCIL() : DefaultLexer(\"cil\", SCLEX_CIL, lexicalClasses, ELEMENTS(lexicalClasses)) { }\n\n    virtual ~LexerCIL() { }\n\n    void SCI_METHOD Release() override {\n        delete this;\n    }\n\n    int SCI_METHOD Version() const override {\n        return lvRelease5;\n    }\n\n    const char * SCI_METHOD PropertyNames() override {\n        return osCIL.PropertyNames();\n    }\n\n    int SCI_METHOD PropertyType(const char *name) override {\n        return osCIL.PropertyType(name);\n    }\n\n    const char * SCI_METHOD DescribeProperty(const char *name) override {\n        return osCIL.DescribeProperty(name);\n    }\n\n    Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) override;\n\n\tconst char * SCI_METHOD PropertyGet(const char* key) override {\n\t\treturn osCIL.PropertyGet(key);\n\t}\n\n    const char * SCI_METHOD DescribeWordListSets() override {\n        return osCIL.DescribeWordListSets();\n    }\n\n    Sci_Position SCI_METHOD WordListSet(int n, const char *wl) override;\n\n    void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;\n    void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;\n\n    void * SCI_METHOD PrivateCall(int, void *) override {\n        return 0;\n    }\n\n    int SCI_METHOD LineEndTypesSupported() override {\n        return SC_LINE_END_TYPE_UNICODE;\n    }\n\n    int SCI_METHOD PrimaryStyleFromStyle(int style) override {\n        return style;\n    }\n\n    static ILexer5 *LexerFactoryCIL() {\n        return new LexerCIL();\n    }\n};\n\nSci_Position SCI_METHOD LexerCIL::PropertySet(const char *key, const char *val) {\n    if (osCIL.PropertySet(&options, key, val)) {\n        return 0;\n    }\n\n    return -1;\n}\n\nSci_Position SCI_METHOD LexerCIL::WordListSet(int n, const char *wl) {\n    WordList *wordListN = 0;\n\n    switch (n) {\n        case 0:\n            wordListN = &keywords;\n            break;\n        case 1:\n            wordListN = &keywords2;\n            break;\n        case 2:\n            wordListN = &keywords3;\n            break;\n    }\n\n    Sci_Position firstModification = -1;\n\n    if (wordListN) {\n        WordList wlNew;\n        wlNew.Set(wl);\n\n        if (*wordListN != wlNew) {\n            wordListN->Set(wl);\n            firstModification = 0;\n        }\n    }\n\n    return firstModification;\n}\n\nvoid SCI_METHOD LexerCIL::Lex(Sci_PositionU startPos, Sci_Position length,\n                              int initStyle, IDocument *pAccess) {\n    if (initStyle == SCE_CIL_STRINGEOL) {\n        initStyle = SCE_CIL_DEFAULT;\n    }\n\n    Accessor styler(pAccess, NULL);\n    StyleContext sc(startPos, length, initStyle, styler);\n\n    bool identAtLineStart = false, // Checks if an identifier is at line start (ignoring spaces)\n         canStyleLabels = false;   // Checks if conditions are met to style SCE_CIL_LABEL\n\n    for (; sc.More(); sc.Forward()) {\n        if (sc.atLineStart) {\n            if (sc.state == SCE_CIL_STRING) {\n                sc.SetState(SCE_CIL_STRING);\n            }\n\n            identAtLineStart = true;\n        }\n\n        // Handle string line continuation\n        if (sc.ch == '\\\\' && (sc.chNext == '\\n' || sc.chNext == '\\r') &&\n           (sc.state == SCE_CIL_STRING)) {\n            sc.Forward();\n\n            if (sc.ch == '\\r' && sc.chNext == '\\n') {\n                sc.Forward();\n            }\n\n            continue;\n        }\n\n        switch (sc.state) {\n            case SCE_CIL_OPERATOR:\n                sc.SetState(SCE_CIL_DEFAULT);\n                break;\n            case SCE_CIL_IDENTIFIER:\n                if (!IsAWordChar(sc.ch)) {\n                    if (canStyleLabels && (sc.ch == ':' && sc.chNext != ':')) {\n                        sc.ChangeState(SCE_CIL_LABEL);\n                        sc.ForwardSetState(SCE_CIL_DEFAULT);\n                    } else {\n                        char kwSize[100];\n                        sc.GetCurrent(kwSize, sizeof(kwSize));\n                        int style = SCE_CIL_IDENTIFIER;\n\n                        if (keywords.InList(kwSize)) {\n                            style = SCE_CIL_WORD;\n                        } else if (keywords2.InList(kwSize)) {\n                            style = SCE_CIL_WORD2;\n                        } else if (keywords3.InList(kwSize)) {\n                            style = SCE_CIL_WORD3;\n                        }\n\n                        sc.ChangeState(style);\n                        sc.SetState(SCE_CIL_DEFAULT);\n                    }\n                }\n                break;\n            case SCE_CIL_COMMENT:\n                if (sc.Match('*', '/')) {\n                    sc.Forward();\n                    sc.ForwardSetState(SCE_CIL_DEFAULT);\n                }\n                break;\n            case SCE_CIL_COMMENTLINE:\n                if (sc.atLineStart) {\n                    sc.SetState(SCE_CIL_DEFAULT);\n                }\n                break;\n            case SCE_CIL_STRING:\n                if (sc.ch == '\\\\') {\n                    if (sc.chNext == '\"' || sc.chNext == '\\\\') {\n                        sc.Forward();\n                    }\n                } else if (sc.ch == '\"') {\n                    sc.ForwardSetState(SCE_CIL_DEFAULT);\n                } else if (sc.atLineEnd) {\n                    sc.ChangeState(SCE_CIL_STRINGEOL);\n                    sc.ForwardSetState(SCE_CIL_DEFAULT);\n                }\n                break;\n        }\n\n        if (sc.state == SCE_CIL_DEFAULT) {\n            // String\n            if (sc.ch == '\"') {\n                sc.SetState(SCE_CIL_STRING);\n            }\n            // Keyword\n            else if (IsAWordChar(sc.ch)) {\n                // Allow setting SCE_CIL_LABEL style only if the label is the\n                // first token in the line and does not start with a dot or a digit\n                canStyleLabels = identAtLineStart && !(sc.ch == '.' || IsADigit(sc.ch));\n                sc.SetState(SCE_CIL_IDENTIFIER);\n            }\n            // Multi-line comment\n            else if (sc.Match('/', '*')) {\n                sc.SetState(SCE_CIL_COMMENT);\n                sc.Forward();\n            }\n            // Line comment\n            else if (sc.Match('/', '/')) {\n                sc.SetState(SCE_CIL_COMMENTLINE);\n            }\n            // Operators\n            else if (IsOperator(sc.ch)) {\n                sc.SetState(SCE_CIL_OPERATOR);\n            }\n        }\n\n        if (!IsASpace(sc.ch)) {\n            identAtLineStart = false;\n        }\n    }\n\n    sc.Complete();\n}\n\nvoid SCI_METHOD LexerCIL::Fold(Sci_PositionU startPos, Sci_Position length, \n                               int initStyle, IDocument *pAccess) {\n    if (!options.fold) {\n        return;\n    }\n\n    LexAccessor styler(pAccess);\n\n    const Sci_PositionU endPos = startPos + length;\n    Sci_Position lineCurrent = styler.GetLine(startPos);\n\n    int levelCurrent = SC_FOLDLEVELBASE;\n    if (lineCurrent > 0)\n        levelCurrent = styler.LevelAt(lineCurrent - 1) >> 16;\n    \n    int style = initStyle;\n    int styleNext = styler.StyleAt(startPos);\n    int levelNext = levelCurrent;\n    int visibleChars = 0;\n\n    char chNext = styler[startPos];\n\n    for (Sci_PositionU i = startPos; i < endPos; i++) {\n        const char ch = chNext;\n        int stylePrev = style;\n\n        chNext = styler.SafeGetCharAt(i + 1);\n        style = styleNext;\n        styleNext = styler.StyleAt(i + 1);\n\n        const bool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n\n        if (options.foldComment && \n            options.foldCommentMultiline && IsStreamCommentStyle(style)) {\n            if (!IsStreamCommentStyle(stylePrev)) {\n                levelNext++;\n            } else if (!IsStreamCommentStyle(styleNext) && !atEOL) {\n                levelNext--;\n            }\n        }\n\n        if (style == SCE_CIL_OPERATOR) {\n            if (ch == '{') {\n                levelNext++;\n            } else if (ch == '}') {\n                levelNext--;\n            }\n        }\n\n        if (!IsASpace(ch)) {\n            visibleChars++;\n        }\n\n        if (atEOL || (i == endPos - 1)) {\n            int lev = levelCurrent | levelNext << 16;\n            if (visibleChars == 0 && options.foldCompact)\n                lev |= SC_FOLDLEVELWHITEFLAG;\n            if (levelCurrent < levelNext)\n                lev |= SC_FOLDLEVELHEADERFLAG;\n            if (lev != styler.LevelAt(lineCurrent)) {\n                styler.SetLevel(lineCurrent, lev);\n            }\n            \n            lineCurrent++;\n            levelCurrent = levelNext;\n            \n            if (options.foldCompact &&\n                i == static_cast<Sci_PositionU>(styler.Length() - 1)) {\n                styler.SetLevel(lineCurrent, lev | SC_FOLDLEVELWHITEFLAG);\n            }\n\n            visibleChars = 0;\n        }\n    }\n}\n\nLexerModule lmCIL(SCLEX_CIL, LexerCIL::LexerFactoryCIL, \"cil\", cilWordListDesc);"
  },
  {
    "path": "lexilla/lexers/LexCLW.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexCLW.cxx\n ** Lexer for Clarion.\n ** 2004/12/17 Updated Lexer\n **/\n// Copyright 2003-2004 by Ron Schofield <ron@schofieldcomputer.com>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\n// Is an end of line character\ninline bool IsEOL(const int ch) {\n\n\treturn(ch == '\\n');\n}\n\n// Convert character to uppercase\nstatic char CharacterUpper(char chChar) {\n\n\tif (chChar < 'a' || chChar > 'z') {\n\t\treturn(chChar);\n\t}\n\telse {\n\t\treturn(static_cast<char>(chChar - 'a' + 'A'));\n\t}\n}\n\n// Convert string to uppercase\nstatic void StringUpper(char *szString) {\n\n\twhile (*szString) {\n\t\t*szString = CharacterUpper(*szString);\n\t\tszString++;\n\t}\n}\n\n// Is a label start character\ninline bool IsALabelStart(const int iChar) {\n\n\treturn(isalpha(iChar) || iChar == '_');\n}\n\n// Is a label character\ninline bool IsALabelCharacter(const int iChar) {\n\n\treturn(isalnum(iChar) || iChar == '_' || iChar == ':');\n}\n\n// Is the character is a ! and the the next character is not a !\ninline bool IsACommentStart(const int iChar) {\n\n\treturn(iChar == '!');\n}\n\n// Is the character a Clarion hex character (ABCDEF)\ninline bool IsAHexCharacter(const int iChar, bool bCaseSensitive) {\n\n\t// Case insensitive.\n\tif (!bCaseSensitive) {\n\t\tif (strchr(\"ABCDEFabcdef\", iChar) != NULL) {\n\t\t\treturn(true);\n\t\t}\n\t}\n\t// Case sensitive\n\telse {\n\t\tif (strchr(\"ABCDEF\", iChar) != NULL) {\n\t\t\treturn(true);\n\t\t}\n\t}\n\treturn(false);\n}\n\n// Is the character a Clarion base character (B=Binary, O=Octal, H=Hex)\ninline bool IsANumericBaseCharacter(const int iChar, bool bCaseSensitive) {\n\n\t// Case insensitive.\n\tif (!bCaseSensitive) {\n\t\t// If character is a numeric base character\n\t\tif (strchr(\"BOHboh\", iChar) != NULL) {\n\t\t\treturn(true);\n\t\t}\n\t}\n\t// Case sensitive\n\telse {\n\t\t// If character is a numeric base character\n\t\tif (strchr(\"BOH\", iChar) != NULL) {\n\t\t\treturn(true);\n\t\t}\n\t}\n\treturn(false);\n}\n\n// Set the correct numeric constant state\ninline bool SetNumericConstantState(StyleContext &scDoc) {\n\n\tint iPoints = 0;\t\t\t// Point counter\n\tchar cNumericString[512];\t// Numeric string buffer\n\n\t// Buffer the current numberic string\n\tscDoc.GetCurrent(cNumericString, sizeof(cNumericString));\n\t// Loop through the string until end of string (NULL termination)\n\tfor (int iIndex = 0; cNumericString[iIndex] != '\\0'; iIndex++) {\n\t\t// Depending on the character\n\t\tswitch (cNumericString[iIndex]) {\n\t\t\t// Is a . (point)\n\t\t\tcase '.' :\n\t\t\t\t// Increment point counter\n\t\t\t\tiPoints++;\n\t\t\t\tbreak;\n\t\t\tdefault :\n\t\t\t\tbreak;\n\t\t}\n\t}\n\t// If points found (can be more than one for improper formatted number\n\tif (iPoints > 0) {\n\t\treturn(true);\n\t}\n\t// Else no points found\n\telse {\n\t\treturn(false);\n\t}\n}\n\n// Get the next word in uppercase from the current position (keyword lookahead)\ninline bool GetNextWordUpper(Accessor &styler, Sci_PositionU uiStartPos, Sci_Position iLength, char *cWord) {\n\n\tSci_PositionU iIndex = 0;\t\t// Buffer Index\n\n\t// Loop through the remaining string from the current position\n\tfor (Sci_Position iOffset = uiStartPos; iOffset < iLength; iOffset++) {\n\t\t// Get the character from the buffer using the offset\n\t\tchar cCharacter = styler[iOffset];\n\t\tif (IsEOL(cCharacter)) {\n\t\t\tbreak;\n\t\t}\n\t\t// If the character is alphabet character\n\t\tif (isalpha(cCharacter)) {\n\t\t\t// Add UPPERCASE character to the word buffer\n\t\t\tcWord[iIndex++] = CharacterUpper(cCharacter);\n\t\t}\n\t}\n\t// Add null termination\n\tcWord[iIndex] = '\\0';\n\t// If no word was found\n\tif (iIndex == 0) {\n\t\t// Return failure\n\t\treturn(false);\n\t}\n\t// Else word was found\n\telse {\n\t\t// Return success\n\t\treturn(true);\n\t}\n}\n\n// Clarion Language Colouring Procedure\nstatic void ColouriseClarionDoc(Sci_PositionU uiStartPos, Sci_Position iLength, int iInitStyle, WordList *wlKeywords[], Accessor &accStyler, bool bCaseSensitive) {\n\n\tint iParenthesesLevel = 0;\t\t// Parenthese Level\n\tint iColumn1Label = false;\t\t// Label starts in Column 1\n\n\tWordList &wlClarionKeywords = *wlKeywords[0];\t\t\t// Clarion Keywords\n\tWordList &wlCompilerDirectives = *wlKeywords[1];\t\t// Compiler Directives\n\tWordList &wlRuntimeExpressions = *wlKeywords[2];\t\t// Runtime Expressions\n\tWordList &wlBuiltInProcsFuncs = *wlKeywords[3];\t\t\t// Builtin Procedures and Functions\n\tWordList &wlStructsDataTypes = *wlKeywords[4];\t\t\t// Structures and Data Types\n\tWordList &wlAttributes = *wlKeywords[5];\t\t\t\t// Procedure Attributes\n\tWordList &wlStandardEquates = *wlKeywords[6];\t\t\t// Standard Equates\n\tWordList &wlLabelReservedWords = *wlKeywords[7];\t\t// Clarion Reserved Keywords (Labels)\n\tWordList &wlProcLabelReservedWords = *wlKeywords[8];\t// Clarion Reserved Keywords (Procedure Labels)\n\n\tconst char wlProcReservedKeywordList[] =\n\t\"PROCEDURE FUNCTION\";\n\tWordList wlProcReservedKeywords;\n\twlProcReservedKeywords.Set(wlProcReservedKeywordList);\n\n\tconst char wlCompilerKeywordList[] =\n\t\"COMPILE OMIT\";\n\tWordList wlCompilerKeywords;\n\twlCompilerKeywords.Set(wlCompilerKeywordList);\n\n\tconst char wlLegacyStatementsList[] =\n\t\"BOF EOF FUNCTION POINTER SHARE\";\n\tWordList wlLegacyStatements;\n\twlLegacyStatements.Set(wlLegacyStatementsList);\n\n\tStyleContext scDoc(uiStartPos, iLength, iInitStyle, accStyler);\n\n\t// lex source code\n    for (; scDoc.More(); scDoc.Forward())\n\t{\n\t\t//\n\t\t// Determine if the current state should terminate.\n\t\t//\n\n\t\t// Label State Handling\n\t\tif (scDoc.state == SCE_CLW_LABEL) {\n\t\t\t// If the character is not a valid label\n\t\t\tif (!IsALabelCharacter(scDoc.ch)) {\n\t\t\t\t// If the character is a . (dot syntax)\n\t\t\t\tif (scDoc.ch == '.') {\n\t\t\t\t\t// Turn off column 1 label flag as label now cannot be reserved work\n\t\t\t\t\tiColumn1Label = false;\n\t\t\t\t\t// Uncolour the . (dot) to default state, move forward one character,\n\t\t\t\t\t// and change back to the label state.\n\t\t\t\t\tscDoc.SetState(SCE_CLW_DEFAULT);\n\t\t\t\t\tscDoc.Forward();\n\t\t\t\t\tscDoc.SetState(SCE_CLW_LABEL);\n\t\t\t\t}\n\t\t\t\t// Else check label\n\t\t\t\telse {\n\t\t\t\t\tchar cLabel[512];\t\t// Label buffer\n\t\t\t\t\t// Buffer the current label string\n\t\t\t\t\tscDoc.GetCurrent(cLabel,sizeof(cLabel));\n\t\t\t\t\t// If case insensitive, convert string to UPPERCASE to match passed keywords.\n\t\t\t\t\tif (!bCaseSensitive) {\n\t\t\t\t\t\tStringUpper(cLabel);\n\t\t\t\t\t}\n\t\t\t\t\t// Else if UPPERCASE label string is in the Clarion compiler keyword list\n\t\t\t\t\tif (wlCompilerKeywords.InList(cLabel) && iColumn1Label){\n\t\t\t\t\t\t// change the label to error state\n\t\t\t\t\t\tscDoc.ChangeState(SCE_CLW_COMPILER_DIRECTIVE);\n\t\t\t\t\t}\n\t\t\t\t\t// Else if UPPERCASE label string is in the Clarion reserved keyword list\n\t\t\t\t\telse if (wlLabelReservedWords.InList(cLabel) && iColumn1Label){\n\t\t\t\t\t\t// change the label to error state\n\t\t\t\t\t\tscDoc.ChangeState(SCE_CLW_ERROR);\n\t\t\t\t\t}\n\t\t\t\t\t// Else if UPPERCASE label string is\n\t\t\t\t\telse if (wlProcLabelReservedWords.InList(cLabel) && iColumn1Label) {\n\t\t\t\t\t\tchar cWord[512];\t// Word buffer\n\t\t\t\t\t\t// Get the next word from the current position\n\t\t\t\t\t\tif (GetNextWordUpper(accStyler,scDoc.currentPos,uiStartPos+iLength,cWord)) {\n\t\t\t\t\t\t\t// If the next word is a procedure reserved word\n\t\t\t\t\t\t\tif (wlProcReservedKeywords.InList(cWord)) {\n\t\t\t\t\t\t\t\t// Change the label to error state\n\t\t\t\t\t\t\t\tscDoc.ChangeState(SCE_CLW_ERROR);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// Else if label string is in the compiler directive keyword list\n\t\t\t\t\telse if (wlCompilerDirectives.InList(cLabel)) {\n\t\t\t\t\t\t// change the state to compiler directive state\n\t\t\t\t\t\tscDoc.ChangeState(SCE_CLW_COMPILER_DIRECTIVE);\n\t\t\t\t\t}\n\t\t\t\t\t// Terminate the label state and set to default state\n\t\t\t\t\tscDoc.SetState(SCE_CLW_DEFAULT);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Keyword State Handling\n\t\telse if (scDoc.state == SCE_CLW_KEYWORD) {\n\t\t\t// If character is : (colon)\n\t\t\tif (scDoc.ch == ':') {\n\t\t\t\tchar cEquate[512];\t\t// Equate buffer\n\t\t\t\t// Move forward to include : (colon) in buffer\n\t\t\t\tscDoc.Forward();\n\t\t\t\t// Buffer the equate string\n\t\t\t\tscDoc.GetCurrent(cEquate,sizeof(cEquate));\n\t\t\t\t// If case insensitive, convert string to UPPERCASE to match passed keywords.\n\t\t\t\tif (!bCaseSensitive) {\n\t\t\t\t\tStringUpper(cEquate);\n\t\t\t\t}\n\t\t\t\t// If statement string is in the equate list\n\t\t\t\tif (wlStandardEquates.InList(cEquate)) {\n\t\t\t\t\t// Change to equate state\n\t\t\t\t\tscDoc.ChangeState(SCE_CLW_STANDARD_EQUATE);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If the character is not a valid label character\n\t\t\telse if (!IsALabelCharacter(scDoc.ch)) {\n\t\t\t\tchar cStatement[512];\t\t// Statement buffer\n\t\t\t\t// Buffer the statement string\n\t\t\t\tscDoc.GetCurrent(cStatement,sizeof(cStatement));\n\t\t\t\t// If case insensitive, convert string to UPPERCASE to match passed keywords.\n\t\t\t\tif (!bCaseSensitive) {\n\t\t\t\t\tStringUpper(cStatement);\n\t\t\t\t}\n\t\t\t\t// If statement string is in the Clarion keyword list\n\t\t\t\tif (wlClarionKeywords.InList(cStatement)) {\n\t\t\t\t\t// Change the statement string to the Clarion keyword state\n\t\t\t\t\tscDoc.ChangeState(SCE_CLW_KEYWORD);\n\t\t\t\t}\n\t\t\t\t// Else if statement string is in the compiler directive keyword list\n\t\t\t\telse if (wlCompilerDirectives.InList(cStatement)) {\n\t\t\t\t\t// Change the statement string to the compiler directive state\n\t\t\t\t\tscDoc.ChangeState(SCE_CLW_COMPILER_DIRECTIVE);\n\t\t\t\t}\n\t\t\t\t// Else if statement string is in the runtime expressions keyword list\n\t\t\t\telse if (wlRuntimeExpressions.InList(cStatement)) {\n\t\t\t\t\t// Change the statement string to the runtime expressions state\n\t\t\t\t\tscDoc.ChangeState(SCE_CLW_RUNTIME_EXPRESSIONS);\n\t\t\t\t}\n\t\t\t\t// Else if statement string is in the builtin procedures and functions keyword list\n\t\t\t\telse if (wlBuiltInProcsFuncs.InList(cStatement)) {\n\t\t\t\t\t// Change the statement string to the builtin procedures and functions state\n\t\t\t\t\tscDoc.ChangeState(SCE_CLW_BUILTIN_PROCEDURES_FUNCTION);\n\t\t\t\t}\n\t\t\t\t// Else if statement string is in the tructures and data types keyword list\n\t\t\t\telse if (wlStructsDataTypes.InList(cStatement)) {\n\t\t\t\t\t// Change the statement string to the structures and data types state\n\t\t\t\t\tscDoc.ChangeState(SCE_CLW_STRUCTURE_DATA_TYPE);\n\t\t\t\t}\n\t\t\t\t// Else if statement string is in the procedure attribute keyword list\n\t\t\t\telse if (wlAttributes.InList(cStatement)) {\n\t\t\t\t\t// Change the statement string to the procedure attribute state\n\t\t\t\t\tscDoc.ChangeState(SCE_CLW_ATTRIBUTE);\n\t\t\t\t}\n\t\t\t\t// Else if statement string is in the standard equate keyword list\n\t\t\t\telse if (wlStandardEquates.InList(cStatement)) {\n\t\t\t\t\t// Change the statement string to the standard equate state\n\t\t\t\t\tscDoc.ChangeState(SCE_CLW_STANDARD_EQUATE);\n\t\t\t\t}\n\t\t\t\t// Else if statement string is in the deprecated or legacy keyword list\n\t\t\t\telse if (wlLegacyStatements.InList(cStatement)) {\n\t\t\t\t\t// Change the statement string to the standard equate state\n\t\t\t\t\tscDoc.ChangeState(SCE_CLW_DEPRECATED);\n\t\t\t\t}\n\t\t\t\t// Else the statement string doesn't match any work list\n\t\t\t\telse {\n\t\t\t\t\t// Change the statement string to the default state\n\t\t\t\t\tscDoc.ChangeState(SCE_CLW_DEFAULT);\n\t\t\t\t}\n\t\t\t\t// Terminate the keyword state and set to default state\n\t\t\t\tscDoc.SetState(SCE_CLW_DEFAULT);\n\t\t\t}\n\t\t}\n\t\t// String State Handling\n\t\telse if (scDoc.state == SCE_CLW_STRING) {\n\t\t\t// If the character is an ' (single quote)\n\t\t\tif (scDoc.ch == '\\'') {\n\t\t\t\t// Set the state to default and move forward colouring\n\t\t\t\t// the ' (single quote) as default state\n\t\t\t\t// terminating the string state\n\t\t\t\tscDoc.SetState(SCE_CLW_DEFAULT);\n\t\t\t\tscDoc.Forward();\n\t\t\t}\n\t\t\t// If the next character is an ' (single quote)\n\t\t\tif (scDoc.chNext == '\\'') {\n\t\t\t\t// Move forward one character and set to default state\n\t\t\t\t// colouring the next ' (single quote) as default state\n\t\t\t\t// terminating the string state\n\t\t\t\tscDoc.ForwardSetState(SCE_CLW_DEFAULT);\n\t\t\t\tscDoc.Forward();\n\t\t\t}\n\t\t}\n\t\t// Picture String State Handling\n\t\telse if (scDoc.state == SCE_CLW_PICTURE_STRING) {\n\t\t\t// If the character is an ( (open parenthese)\n\t\t\tif (scDoc.ch == '(') {\n\t\t\t\t// Increment the parenthese level\n\t\t\t\tiParenthesesLevel++;\n\t\t\t}\n\t\t\t// Else if the character is a ) (close parenthese)\n\t\t\telse if (scDoc.ch == ')') {\n\t\t\t\t// If the parenthese level is set to zero\n\t\t\t\t// parentheses matched\n\t\t\t\tif (!iParenthesesLevel) {\n\t\t\t\t\tscDoc.SetState(SCE_CLW_DEFAULT);\n\t\t\t\t}\n\t\t\t\t// Else parenthese level is greater than zero\n\t\t\t\t// still looking for matching parentheses\n\t\t\t\telse {\n\t\t\t\t\t// Decrement the parenthese level\n\t\t\t\t\tiParenthesesLevel--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Standard Equate State Handling\n\t\telse if (scDoc.state == SCE_CLW_STANDARD_EQUATE) {\n\t\t\tif (!isalnum(scDoc.ch)) {\n\t\t\t\tscDoc.SetState(SCE_CLW_DEFAULT);\n\t\t\t}\n\t\t}\n\t\t// Integer Constant State Handling\n\t\telse if (scDoc.state == SCE_CLW_INTEGER_CONSTANT) {\n\t\t\t// If the character is not a digit (0-9)\n\t\t\t// or character is not a hexidecimal character (A-F)\n\t\t\t// or character is not a . (point)\n\t\t\t// or character is not a numberic base character (B,O,H)\n\t\t\tif (!(isdigit(scDoc.ch)\n\t\t\t|| IsAHexCharacter(scDoc.ch, bCaseSensitive)\n\t\t\t|| scDoc.ch == '.'\n\t\t\t|| IsANumericBaseCharacter(scDoc.ch, bCaseSensitive))) {\n\t\t\t\t// If the number was a real\n\t\t\t\tif (SetNumericConstantState(scDoc)) {\n\t\t\t\t\t// Colour the matched string to the real constant state\n\t\t\t\t\tscDoc.ChangeState(SCE_CLW_REAL_CONSTANT);\n\t\t\t\t}\n\t\t\t\t// Else the number was an integer\n\t\t\t\telse {\n\t\t\t\t\t// Colour the matched string to an integer constant state\n\t\t\t\t\tscDoc.ChangeState(SCE_CLW_INTEGER_CONSTANT);\n\t\t\t\t}\n\t\t\t\t// Terminate the integer constant state and set to default state\n\t\t\t\tscDoc.SetState(SCE_CLW_DEFAULT);\n\t\t\t}\n\t\t}\n\n\t\t//\n\t\t// Determine if a new state should be entered.\n\t\t//\n\n\t\t// Beginning of Line Handling\n\t\tif (scDoc.atLineStart) {\n\t\t\t// Reset the column 1 label flag\n\t\t\tiColumn1Label = false;\n\t\t\t// If column 1 character is a label start character\n\t\t\tif (IsALabelStart(scDoc.ch)) {\n\t\t\t\t// Label character is found in column 1\n\t\t\t\t// so set column 1 label flag and clear last column 1 label\n\t\t\t\tiColumn1Label = true;\n\t\t\t\t// Set the state to label\n\t\t\t\tscDoc.SetState(SCE_CLW_LABEL);\n\t\t\t}\n\t\t\t// else if character is a space or tab\n\t\t\telse if (IsASpace(scDoc.ch)){\n\t\t\t\t// Set to default state\n\t\t\t\tscDoc.SetState(SCE_CLW_DEFAULT);\n\t\t\t}\n\t\t\t// else if comment start (!) or is an * (asterisk)\n\t\t\telse if (IsACommentStart(scDoc.ch) || scDoc.ch == '*' ) {\n\t\t\t\t// then set the state to comment.\n\t\t\t\tscDoc.SetState(SCE_CLW_COMMENT);\n\t\t\t}\n\t\t\t// else the character is a ? (question mark)\n\t\t\telse if (scDoc.ch == '?') {\n\t\t\t\t// Change to the compiler directive state, move forward,\n\t\t\t\t// colouring the ? (question mark), change back to default state.\n\t\t\t\tscDoc.ChangeState(SCE_CLW_COMPILER_DIRECTIVE);\n\t\t\t\tscDoc.Forward();\n\t\t\t\tscDoc.SetState(SCE_CLW_DEFAULT);\n\t\t\t}\n\t\t\t// else an invalid character in column 1\n\t\t\telse {\n\t\t\t\t// Set to error state\n\t\t\t\tscDoc.SetState(SCE_CLW_ERROR);\n\t\t\t}\n\t\t}\n\t\t// End of Line Handling\n\t\telse if (scDoc.atLineEnd) {\n\t\t\t// Reset to the default state at the end of each line.\n\t\t\tscDoc.SetState(SCE_CLW_DEFAULT);\n\t\t}\n\t\t// Default Handling\n\t\telse {\n\t\t\t// If in default state\n\t\t\tif (scDoc.state == SCE_CLW_DEFAULT) {\n\t\t\t\t// If is a letter could be a possible statement\n\t\t\t\tif (isalpha(scDoc.ch)) {\n\t\t\t\t\t// Set the state to Clarion Keyword and verify later\n\t\t\t\t\tscDoc.SetState(SCE_CLW_KEYWORD);\n\t\t\t\t}\n\t\t\t\t// else is a number\n\t\t\t\telse if (isdigit(scDoc.ch)) {\n\t\t\t\t\t// Set the state to Integer Constant and verify later\n\t\t\t\t\tscDoc.SetState(SCE_CLW_INTEGER_CONSTANT);\n\t\t\t\t}\n\t\t\t\t// else if the start of a comment or a | (line continuation)\n\t\t\t\telse if (IsACommentStart(scDoc.ch) || scDoc.ch == '|') {\n\t\t\t\t\t// then set the state to comment.\n\t\t\t\t\tscDoc.SetState(SCE_CLW_COMMENT);\n\t\t\t\t}\n\t\t\t\t// else if the character is a ' (single quote)\n\t\t\t\telse if (scDoc.ch == '\\'') {\n\t\t\t\t\t// If the character is also a ' (single quote)\n\t\t\t\t\t// Embedded Apostrophe\n\t\t\t\t\tif (scDoc.chNext == '\\'') {\n\t\t\t\t\t\t// Move forward colouring it as default state\n\t\t\t\t\t\tscDoc.ForwardSetState(SCE_CLW_DEFAULT);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t// move to the next character and then set the state to comment.\n\t\t\t\t\t\tscDoc.ForwardSetState(SCE_CLW_STRING);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// else the character is an @ (ampersand)\n\t\t\t\telse if (scDoc.ch == '@') {\n\t\t\t\t\t// Case insensitive.\n\t\t\t\t\tif (!bCaseSensitive) {\n\t\t\t\t\t\t// If character is a valid picture token character\n\t\t\t\t\t\tif (strchr(\"DEKNPSTdeknpst\", scDoc.chNext) != NULL) {\n\t\t\t\t\t\t\t// Set to the picture string state\n\t\t\t\t\t\t\tscDoc.SetState(SCE_CLW_PICTURE_STRING);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// Case sensitive\n\t\t\t\t\telse {\n\t\t\t\t\t\t// If character is a valid picture token character\n\t\t\t\t\t\tif (strchr(\"DEKNPST\", scDoc.chNext) != NULL) {\n\t\t\t\t\t\t\t// Set the picture string state\n\t\t\t\t\t\t\tscDoc.SetState(SCE_CLW_PICTURE_STRING);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t// lexing complete\n\tscDoc.Complete();\n}\n\n// Clarion Language Case Sensitive Colouring Procedure\nstatic void ColouriseClarionDocSensitive(Sci_PositionU uiStartPos, Sci_Position iLength, int iInitStyle, WordList *wlKeywords[], Accessor &accStyler) {\n\n\tColouriseClarionDoc(uiStartPos, iLength, iInitStyle, wlKeywords, accStyler, true);\n}\n\n// Clarion Language Case Insensitive Colouring Procedure\nstatic void ColouriseClarionDocInsensitive(Sci_PositionU uiStartPos, Sci_Position iLength, int iInitStyle, WordList *wlKeywords[], Accessor &accStyler) {\n\n\tColouriseClarionDoc(uiStartPos, iLength, iInitStyle, wlKeywords, accStyler, false);\n}\n\n// Fill Buffer\n\nstatic void FillBuffer(Sci_PositionU uiStart, Sci_PositionU uiEnd, Accessor &accStyler, char *szBuffer, Sci_PositionU uiLength) {\n\n\tSci_PositionU uiPos = 0;\n\n\twhile ((uiPos < uiEnd - uiStart + 1) && (uiPos < uiLength-1)) {\n\t\tszBuffer[uiPos] = static_cast<char>(toupper(accStyler[uiStart + uiPos]));\n\t\tuiPos++;\n\t}\n\tszBuffer[uiPos] = '\\0';\n}\n\n// Classify Clarion Fold Point\n\nstatic int ClassifyClarionFoldPoint(int iLevel, const char* szString) {\n\n\tif (!(isdigit(szString[0]) || (szString[0] == '.'))) {\n\t\tif (strcmp(szString, \"PROCEDURE\") == 0) {\n\t//\t\tiLevel = SC_FOLDLEVELBASE + 1;\n\t\t}\n\t\telse if (strcmp(szString, \"MAP\") == 0 ||\n\t\t\tstrcmp(szString,\"ACCEPT\") == 0 ||\n\t\t\tstrcmp(szString,\"BEGIN\") == 0 ||\n\t\t\tstrcmp(szString,\"CASE\") == 0 ||\n\t\t\tstrcmp(szString,\"EXECUTE\") == 0 ||\n\t\t\tstrcmp(szString,\"IF\") == 0 ||\n\t\t\tstrcmp(szString,\"ITEMIZE\") == 0 ||\n\t\t\tstrcmp(szString,\"INTERFACE\") == 0 ||\n\t\t\tstrcmp(szString,\"JOIN\") == 0 ||\n\t\t\tstrcmp(szString,\"LOOP\") == 0 ||\n\t\t\tstrcmp(szString,\"MODULE\") == 0 ||\n\t\t\tstrcmp(szString,\"RECORD\") == 0) {\n\t\t\tiLevel++;\n\t\t}\n\t\telse if (strcmp(szString, \"APPLICATION\") == 0 ||\n\t\t\tstrcmp(szString, \"CLASS\") == 0 ||\n\t\t\tstrcmp(szString, \"DETAIL\") == 0 ||\n\t\t\tstrcmp(szString, \"FILE\") == 0 ||\n\t\t\tstrcmp(szString, \"FOOTER\") == 0 ||\n\t\t\tstrcmp(szString, \"FORM\") == 0 ||\n\t\t\tstrcmp(szString, \"GROUP\") == 0 ||\n\t\t\tstrcmp(szString, \"HEADER\") == 0 ||\n\t\t\tstrcmp(szString, \"INTERFACE\") == 0 ||\n\t\t\tstrcmp(szString, \"MENU\") == 0 ||\n\t\t\tstrcmp(szString, \"MENUBAR\") == 0 ||\n\t\t\tstrcmp(szString, \"OLE\") == 0 ||\n\t\t\tstrcmp(szString, \"OPTION\") == 0 ||\n\t\t\tstrcmp(szString, \"QUEUE\") == 0 ||\n\t\t\tstrcmp(szString, \"REPORT\") == 0 ||\n\t\t\tstrcmp(szString, \"SHEET\") == 0 ||\n\t\t\tstrcmp(szString, \"TAB\") == 0 ||\n\t\t\tstrcmp(szString, \"TOOLBAR\") == 0 ||\n\t\t\tstrcmp(szString, \"VIEW\") == 0 ||\n\t\t\tstrcmp(szString, \"WINDOW\") == 0) {\n\t\t\tiLevel++;\n\t\t}\n\t\telse if (strcmp(szString, \"END\") == 0 ||\n\t\t\tstrcmp(szString, \"UNTIL\") == 0 ||\n\t\t\tstrcmp(szString, \"WHILE\") == 0) {\n\t\t\tiLevel--;\n\t\t}\n\t}\n\treturn(iLevel);\n}\n\n// Clarion Language Folding Procedure\nstatic void FoldClarionDoc(Sci_PositionU uiStartPos, Sci_Position iLength, int iInitStyle, WordList *[], Accessor &accStyler) {\n\n\tSci_PositionU uiEndPos = uiStartPos + iLength;\n\tSci_Position iLineCurrent = accStyler.GetLine(uiStartPos);\n\tint iLevelPrev = accStyler.LevelAt(iLineCurrent) & SC_FOLDLEVELNUMBERMASK;\n\tint iLevelCurrent = iLevelPrev;\n\tchar chNext = accStyler[uiStartPos];\n\tint iStyle = iInitStyle;\n\tint iStyleNext = accStyler.StyleAt(uiStartPos);\n\tint iVisibleChars = 0;\n\tSci_Position iLastStart = 0;\n\n\tfor (Sci_PositionU uiPos = uiStartPos; uiPos < uiEndPos; uiPos++) {\n\n\t\tchar chChar = chNext;\n\t\tchNext = accStyler.SafeGetCharAt(uiPos + 1);\n\t\tint iStylePrev = iStyle;\n\t\tiStyle = iStyleNext;\n\t\tiStyleNext = accStyler.StyleAt(uiPos + 1);\n\t\tbool bEOL = (chChar == '\\r' && chNext != '\\n') || (chChar == '\\n');\n\n\t\tif (iStylePrev == SCE_CLW_DEFAULT) {\n\t\t\tif (iStyle == SCE_CLW_KEYWORD || iStyle == SCE_CLW_STRUCTURE_DATA_TYPE) {\n\t\t\t\t// Store last word start point.\n\t\t\t\tiLastStart = uiPos;\n\t\t\t}\n\t\t}\n\n\t\tif (iStylePrev == SCE_CLW_KEYWORD || iStylePrev == SCE_CLW_STRUCTURE_DATA_TYPE) {\n\t\t\tif(iswordchar(chChar) && !iswordchar(chNext)) {\n\t\t\t\tchar chBuffer[100];\n\t\t\t\tFillBuffer(iLastStart, uiPos, accStyler, chBuffer, sizeof(chBuffer));\n\t\t\t\tiLevelCurrent = ClassifyClarionFoldPoint(iLevelCurrent,chBuffer);\n\t\t\t//\tif ((iLevelCurrent == SC_FOLDLEVELBASE + 1) && iLineCurrent > 1) {\n\t\t\t//\t\taccStyler.SetLevel(iLineCurrent-1,SC_FOLDLEVELBASE);\n\t\t\t//\t\tiLevelPrev = SC_FOLDLEVELBASE;\n\t\t\t//\t}\n\t\t\t}\n\t\t}\n\n\t\tif (bEOL) {\n\t\t\tint iLevel = iLevelPrev;\n\t\t\tif ((iLevelCurrent > iLevelPrev) && (iVisibleChars > 0))\n\t\t\t\tiLevel |= SC_FOLDLEVELHEADERFLAG;\n\t\t\tif (iLevel != accStyler.LevelAt(iLineCurrent)) {\n\t\t\t\taccStyler.SetLevel(iLineCurrent,iLevel);\n\t\t\t}\n\t\t\tiLineCurrent++;\n\t\t\tiLevelPrev = iLevelCurrent;\n\t\t\tiVisibleChars = 0;\n\t\t}\n\n\t\tif (!isspacechar(chChar))\n\t\t\tiVisibleChars++;\n\t}\n\n\t// Fill in the real level of the next line, keeping the current flags\n\t// as they will be filled in later.\n\tint iFlagsNext = accStyler.LevelAt(iLineCurrent) & ~SC_FOLDLEVELNUMBERMASK;\n\taccStyler.SetLevel(iLineCurrent, iLevelPrev | iFlagsNext);\n}\n\n// Word List Descriptions\nstatic const char * const rgWordListDescriptions[] = {\n\t\"Clarion Keywords\",\n\t\"Compiler Directives\",\n\t\"Built-in Procedures and Functions\",\n\t\"Runtime Expressions\",\n\t\"Structure and Data Types\",\n\t\"Attributes\",\n\t\"Standard Equates\",\n\t\"Reserved Words (Labels)\",\n\t\"Reserved Words (Procedure Labels)\",\n\t0,\n};\n\n// Case Sensitive Clarion Language Lexer\nLexerModule lmClw(SCLEX_CLW, ColouriseClarionDocSensitive, \"clarion\", FoldClarionDoc, rgWordListDescriptions);\n\n// Case Insensitive Clarion Language Lexer\nLexerModule lmClwNoCase(SCLEX_CLWNOCASE, ColouriseClarionDocInsensitive, \"clarionnocase\", FoldClarionDoc, rgWordListDescriptions);\n"
  },
  {
    "path": "lexilla/lexers/LexCOBOL.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexCOBOL.cxx\n ** Lexer for COBOL\n ** Based on LexPascal.cxx\n ** Written by Laurent le Tynevez\n ** Updated by Simon Steele <s.steele@pnotepad.org> September 2002\n ** Updated by Mathias Rauen <scite@madshi.net> May 2003 (Delphi adjustments)\n ** Updated by Rod Falck, Aug 2006 Converted to COBOL\n **/\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\n#define IN_DIVISION 0x01\n#define IN_DECLARATIVES 0x02\n#define IN_SECTION 0x04\n#define IN_PARAGRAPH 0x08\n#define IN_FLAGS 0xF\n#define NOT_HEADER 0x10\n\ninline bool isCOBOLoperator(char ch)\n    {\n    return isoperator(ch);\n    }\n\ninline bool isCOBOLwordchar(char ch)\n    {\n    return IsASCII(ch) && (isalnum(ch) || ch == '-');\n\n    }\n\ninline bool isCOBOLwordstart(char ch)\n    {\n    return IsASCII(ch) && isalnum(ch);\n    }\n\nstatic int CountBits(int nBits)\n    {\n    int count = 0;\n    for (int i = 0; i < 32; ++i)\n        {\n        count += nBits & 1;\n        nBits >>= 1;\n        }\n    return count;\n    }\n\nstatic void getRange(Sci_PositionU start,\n        Sci_PositionU end,\n        Accessor &styler,\n        char *s,\n        Sci_PositionU len) {\n    Sci_PositionU i = 0;\n    while ((i < end - start + 1) && (i < len-1)) {\n        s[i] = static_cast<char>(tolower(styler[start + i]));\n        i++;\n    }\n    s[i] = '\\0';\n}\n\nstatic void ColourTo(Accessor &styler, Sci_PositionU end, unsigned int attr) {\n    styler.ColourTo(end, attr);\n}\n\n\nstatic int classifyWordCOBOL(Sci_PositionU start, Sci_PositionU end, /*WordList &keywords*/WordList *keywordlists[], Accessor &styler, int nContainment, bool *bAarea) {\n    int ret = 0;\n\n    char s[100];\n    s[0] = '\\0';\n    s[1] = '\\0';\n    getRange(start, end, styler, s, sizeof(s));\n\n    int chAttr = SCE_C_IDENTIFIER;\n    if (isdigit(s[0]) || (s[0] == '.') || (s[0] == 'v')) {\n        chAttr = SCE_C_NUMBER;\n        char *p = s + 1;\n        while (*p) {\n            if ((!isdigit(*p) && (*p) != 'v') && isCOBOLwordchar(*p)) {\n                chAttr = SCE_C_IDENTIFIER;\n                break;\n            }\n            ++p;\n        }\n    }\n    if (chAttr == SCE_C_IDENTIFIER) {\n        WordList& a_keywords = *keywordlists[0];\n        WordList& b_keywords = *keywordlists[1];\n        WordList& c_keywords = *keywordlists[2];\n\n        if (a_keywords.InList(s)) {\n            chAttr = SCE_C_WORD;\n        }\n        else if (b_keywords.InList(s)) {\n            chAttr = SCE_C_WORD2;\n        }\n        else if (c_keywords.InList(s)) {\n            chAttr = SCE_C_UUID;\n        }\n    }\n    if (*bAarea) {\n        if (strcmp(s, \"division\") == 0) {\n            ret = IN_DIVISION;\n            // we've determined the containment, anything else is just ignored for those purposes\n            *bAarea = false;\n        } else if (strcmp(s, \"declaratives\") == 0) {\n            ret = IN_DIVISION | IN_DECLARATIVES;\n            if (nContainment & IN_DECLARATIVES)\n                ret |= NOT_HEADER | IN_SECTION;\n            // we've determined the containment, anything else is just ignored for those purposes\n            *bAarea = false;\n        } else if (strcmp(s, \"section\") == 0) {\n            ret = (nContainment &~ IN_PARAGRAPH) | IN_SECTION;\n            // we've determined the containment, anything else is just ignored for those purposes\n            *bAarea = false;\n        } else if (strcmp(s, \"end\") == 0 && (nContainment & IN_DECLARATIVES)) {\n            ret = IN_DIVISION | IN_DECLARATIVES | IN_SECTION | NOT_HEADER;\n        } else {\n            ret = nContainment | IN_PARAGRAPH;\n        }\n    }\n    ColourTo(styler, end, chAttr);\n    return ret;\n}\n\nstatic void ColouriseCOBOLDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[],\n    Accessor &styler) {\n\n    styler.StartAt(startPos);\n\n    int state = initStyle;\n    if (state == SCE_C_CHARACTER)   // Does not leak onto next line\n        state = SCE_C_DEFAULT;\n    char chPrev = ' ';\n    char chNext = styler[startPos];\n    Sci_PositionU lengthDoc = startPos + length;\n\n    int nContainment;\n\n    Sci_Position currentLine = styler.GetLine(startPos);\n    if (currentLine > 0) {\n        styler.SetLineState(currentLine, styler.GetLineState(currentLine-1));\n        nContainment = styler.GetLineState(currentLine);\n        nContainment &= ~NOT_HEADER;\n    } else {\n        styler.SetLineState(currentLine, 0);\n        nContainment = 0;\n    }\n\n    styler.StartSegment(startPos);\n    bool bNewLine = true;\n    bool bAarea = !isspacechar(chNext);\n    int column = 0;\n    for (Sci_PositionU i = startPos; i < lengthDoc; i++) {\n        char ch = chNext;\n\n        chNext = styler.SafeGetCharAt(i + 1);\n\n        ++column;\n\n        if (bNewLine) {\n            column = 0;\n        }\n        if (column <= 1 && !bAarea) {\n            bAarea = !isspacechar(ch);\n        }\n        bool bSetNewLine = false;\n        if ((ch == '\\r' && chNext != '\\n') || (ch == '\\n')) {\n            // Trigger on CR only (Mac style) or either on LF from CR+LF (Dos/Win) or on LF alone (Unix)\n            // Avoid triggering two times on Dos/Win\n            // End of line\n            if (state == SCE_C_CHARACTER) {\n                ColourTo(styler, i, state);\n                state = SCE_C_DEFAULT;\n            }\n            styler.SetLineState(currentLine, nContainment);\n            currentLine++;\n            bSetNewLine = true;\n            if (nContainment & NOT_HEADER)\n                nContainment &= ~(NOT_HEADER | IN_DECLARATIVES | IN_SECTION);\n        }\n\n        if (styler.IsLeadByte(ch)) {\n            chNext = styler.SafeGetCharAt(i + 2);\n            chPrev = ' ';\n            i += 1;\n            continue;\n        }\n\n        if (state == SCE_C_DEFAULT) {\n            if (isCOBOLwordstart(ch) || (ch == '$' && IsASCII(chNext) && isalpha(chNext))) {\n                ColourTo(styler, i-1, state);\n                state = SCE_C_IDENTIFIER;\n            } else if (column == 6 && (ch == '*' || ch == '/')) {\n            // Cobol comment line: asterisk in column 7.\n                ColourTo(styler, i-1, state);\n                state = SCE_C_COMMENTLINE;\n            } else if (ch == '*' && chNext == '>') {\n            // Cobol inline comment: asterisk, followed by greater than.\n                ColourTo(styler, i-1, state);\n                state = SCE_C_COMMENTLINE;\n            } else if (column == 0 && ch == '*' && chNext != '*') {\n                ColourTo(styler, i-1, state);\n                state = SCE_C_COMMENTLINE;\n            } else if (column == 0 && ch == '/' && chNext != '*') {\n                ColourTo(styler, i-1, state);\n                state = SCE_C_COMMENTLINE;\n            } else if (column == 0 && ch == '*' && chNext == '*') {\n                ColourTo(styler, i-1, state);\n                state = SCE_C_COMMENTDOC;\n            } else if (column == 0 && ch == '/' && chNext == '*') {\n                ColourTo(styler, i-1, state);\n                state = SCE_C_COMMENTDOC;\n            } else if (ch == '\"') {\n                ColourTo(styler, i-1, state);\n                state = SCE_C_STRING;\n            } else if (ch == '\\'') {\n                ColourTo(styler, i-1, state);\n                state = SCE_C_CHARACTER;\n            } else if (ch == '?' && column == 0) {\n                ColourTo(styler, i-1, state);\n                state = SCE_C_PREPROCESSOR;\n            } else if (isCOBOLoperator(ch)) {\n                ColourTo(styler, i-1, state);\n                ColourTo(styler, i, SCE_C_OPERATOR);\n            }\n        } else if (state == SCE_C_IDENTIFIER) {\n            if (!isCOBOLwordchar(ch)) {\n                int lStateChange = classifyWordCOBOL(styler.GetStartSegment(), i - 1, keywordlists, styler, nContainment, &bAarea);\n\n                if(lStateChange != 0) {\n                    styler.SetLineState(currentLine, lStateChange);\n                    nContainment = lStateChange;\n                }\n\n                state = SCE_C_DEFAULT;\n                chNext = styler.SafeGetCharAt(i + 1);\n                if (column == 6 && (ch == '*' || ch == '/')) {\n                    state = SCE_C_COMMENTLINE;\n                } else if (ch == '\"') {\n                    state = SCE_C_STRING;\n                } else if (ch == '\\'') {\n                    state = SCE_C_CHARACTER;\n                } else if (isCOBOLoperator(ch)) {\n                    ColourTo(styler, i, SCE_C_OPERATOR);\n                }\n            }\n        } else {\n            if (state == SCE_C_PREPROCESSOR) {\n                if ((ch == '\\r' || ch == '\\n') && !(chPrev == '\\\\' || chPrev == '\\r')) {\n                    ColourTo(styler, i-1, state);\n                    state = SCE_C_DEFAULT;\n                }\n            } else if (state == SCE_C_COMMENT) {\n                if (ch == '\\r' || ch == '\\n') {\n                    ColourTo(styler, i-1, state);\n                    state = SCE_C_DEFAULT;\n                }\n            } else if (state == SCE_C_COMMENTDOC) {\n                if (ch == '\\r' || ch == '\\n') {\n                    if (((i > styler.GetStartSegment() + 2) || (\n                        (initStyle == SCE_C_COMMENTDOC) &&\n                        (styler.GetStartSegment() == static_cast<Sci_PositionU>(startPos))))) {\n                            ColourTo(styler, i-1, state);\n                            state = SCE_C_DEFAULT;\n                    }\n                }\n            } else if (state == SCE_C_COMMENTLINE) {\n                if (ch == '\\r' || ch == '\\n') {\n                    ColourTo(styler, i-1, state);\n                    state = SCE_C_DEFAULT;\n                }\n            } else if (state == SCE_C_STRING) {\n                if (ch == '\"') {\n                    ColourTo(styler, i, state);\n                    state = SCE_C_DEFAULT;\n                } else if (ch == '\\r' || ch == '\\n') {\n                    ColourTo(styler, i-1, state);\n                    state = SCE_C_DEFAULT;\n                }\n            } else if (state == SCE_C_CHARACTER) {\n                if (ch == '\\'') {\n                    ColourTo(styler, i, state);\n                    state = SCE_C_DEFAULT;\n                }\n            }\n        }\n        chPrev = ch;\n        bNewLine = bSetNewLine;\n        if (bNewLine)\n            {\n            bAarea = false;\n            }\n    }\n    ColourTo(styler, lengthDoc - 1, state);\n}\n\nstatic void FoldCOBOLDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[],\n                            Accessor &styler) {\n    bool foldCompact = styler.GetPropertyInt(\"fold.compact\", 1) != 0;\n    Sci_PositionU endPos = startPos + length;\n    int visibleChars = 0;\n    Sci_Position lineCurrent = styler.GetLine(startPos);\n    int levelPrev = lineCurrent > 0 ? styler.LevelAt(lineCurrent - 1) & SC_FOLDLEVELNUMBERMASK : 0xFFF;\n    char chNext = styler[startPos];\n\n    bool bNewLine = true;\n    bool bAarea = !isspacechar(chNext);\n    int column = 0;\n    bool bComment = false;\n    for (Sci_PositionU i = startPos; i < endPos; i++) {\n        char ch = chNext;\n        chNext = styler.SafeGetCharAt(i + 1);\n        ++column;\n\n        if (bNewLine) {\n            column = 0;\n            bComment = (ch == '*' || ch == '/' || ch == '?');\n        }\n        if (column <= 1 && !bAarea) {\n            bAarea = !isspacechar(ch);\n        }\n        bool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n        if (atEOL) {\n            int nContainment = styler.GetLineState(lineCurrent);\n            int lev = CountBits(nContainment & IN_FLAGS) | SC_FOLDLEVELBASE;\n            if (bAarea && !bComment)\n                --lev;\n            if (visibleChars == 0 && foldCompact)\n                lev |= SC_FOLDLEVELWHITEFLAG;\n            if ((bAarea) && (visibleChars > 0) && !(nContainment & NOT_HEADER) && !bComment)\n                lev |= SC_FOLDLEVELHEADERFLAG;\n            if (lev != styler.LevelAt(lineCurrent)) {\n                styler.SetLevel(lineCurrent, lev);\n            }\n            if ((lev & SC_FOLDLEVELNUMBERMASK) <= (levelPrev & SC_FOLDLEVELNUMBERMASK)) {\n                // this level is at the same level or less than the previous line\n                // therefore these is nothing for the previous header to collapse, so remove the header\n                styler.SetLevel(lineCurrent - 1, levelPrev & ~SC_FOLDLEVELHEADERFLAG);\n            }\n            levelPrev = lev;\n            visibleChars = 0;\n            bAarea = false;\n            bNewLine = true;\n            lineCurrent++;\n        } else {\n            bNewLine = false;\n        }\n\n\n        if (!isspacechar(ch))\n            visibleChars++;\n    }\n\n    // Fill in the real level of the next line, keeping the current flags as they will be filled in later\n    int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK;\n    styler.SetLevel(lineCurrent, levelPrev | flagsNext);\n}\n\nstatic const char * const COBOLWordListDesc[] = {\n    \"A Keywords\",\n    \"B Keywords\",\n    \"Extended Keywords\",\n    0\n};\n\nLexerModule lmCOBOL(SCLEX_COBOL, ColouriseCOBOLDoc, \"COBOL\", FoldCOBOLDoc, COBOLWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexCPP.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexCPP.cxx\n ** Lexer for C++, C, Java, and JavaScript.\n ** Further folding features and configuration properties added by \"Udo Lechner\" <dlchnr(at)gmx(dot)net>\n **/\n// Copyright 1998-2005 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <cstdlib>\n#include <cassert>\n#include <cstring>\n\n#include <utility>\n#include <string>\n#include <string_view>\n#include <vector>\n#include <map>\n#include <algorithm>\n#include <iterator>\n#include <functional>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"StringCopy.h\"\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n#include \"OptionSet.h\"\n#include \"SparseState.h\"\n#include \"SubStyles.h\"\n\nusing namespace Scintilla;\nusing namespace Lexilla;\n\nnamespace {\n\t// Use an unnamed namespace to protect the functions and classes from name conflicts\n\nconstexpr bool IsSpaceEquiv(int state) noexcept {\n\treturn (state <= SCE_C_COMMENTDOC) ||\n\t\t// including SCE_C_DEFAULT, SCE_C_COMMENT, SCE_C_COMMENTLINE\n\t\t(state == SCE_C_COMMENTLINEDOC) || (state == SCE_C_COMMENTDOCKEYWORD) ||\n\t\t(state == SCE_C_COMMENTDOCKEYWORDERROR);\n}\n\n// Preconditions: sc.currentPos points to a character after '+' or '-'.\n// The test for pos reaching 0 should be redundant,\n// and is in only for safety measures.\n// Limitation: this code will give the incorrect answer for code like\n// a = b+++/ptn/...\n// Putting a space between the '++' post-inc operator and the '+' binary op\n// fixes this, and is highly recommended for readability anyway.\nbool FollowsPostfixOperator(const StyleContext &sc, LexAccessor &styler) {\n\tSci_Position pos = sc.currentPos;\n\twhile (--pos > 0) {\n\t\tconst char ch = styler[pos];\n\t\tif (ch == '+' || ch == '-') {\n\t\t\treturn styler[pos - 1] == ch;\n\t\t}\n\t}\n\treturn false;\n}\n\nbool followsReturnKeyword(const StyleContext &sc, LexAccessor &styler) {\n\t// Don't look at styles, so no need to flush.\n\tSci_Position pos = sc.currentPos;\n\tconst Sci_Position currentLine = styler.GetLine(pos);\n\tconst Sci_Position lineStartPos = styler.LineStart(currentLine);\n\twhile (--pos > lineStartPos) {\n\t\tconst char ch = styler.SafeGetCharAt(pos);\n\t\tif (ch != ' ' && ch != '\\t') {\n\t\t\tbreak;\n\t\t}\n\t}\n\tconst char *retBack = \"nruter\";\n\tconst char *s = retBack;\n\twhile (*s\n\t\t&& pos >= lineStartPos\n\t\t&& styler.SafeGetCharAt(pos) == *s) {\n\t\ts++;\n\t\tpos--;\n\t}\n\treturn !*s;\n}\n\nconstexpr bool IsOperatorOrSpace(int ch) noexcept {\n\treturn isoperator(ch) || IsASpace(ch);\n}\n\nbool OnlySpaceOrTab(std::string_view s) noexcept {\n\tfor (const char ch : s) {\n\t\tif (!IsASpaceOrTab(ch))\n\t\t\treturn false;\n\t}\n\treturn true;\n}\n\nusing Tokens = std::vector<std::string>;\n\nTokens StringSplit(const std::string &text, int separator) {\n\tTokens vs(text.empty() ? 0 : 1);\n\tfor (const char ch : text) {\n\t\tif (ch == separator) {\n\t\t\tvs.emplace_back();\n\t\t} else {\n\t\t\tvs.back() += ch;\n\t\t}\n\t}\n\treturn vs;\n}\n\nstruct BracketPair {\n\tTokens::iterator itBracket;\n\tTokens::iterator itEndBracket;\n};\n\nBracketPair FindBracketPair(Tokens &tokens) {\n\tconst Tokens::iterator itBracket = std::find(tokens.begin(), tokens.end(), \"(\");\n\tif (itBracket != tokens.end()) {\n\t\tsize_t nest = 0;\n\t\tfor (Tokens::iterator itTok = itBracket; itTok != tokens.end(); ++itTok) {\n\t\t\tif (*itTok == \"(\") {\n\t\t\t\tnest++;\n\t\t\t} else if (*itTok == \")\") {\n\t\t\t\tnest--;\n\t\t\t\tif (nest == 0) {\n\t\t\t\t\treturn { itBracket, itTok };\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn { tokens.end(), tokens.end() };\n}\n\nvoid highlightTaskMarker(StyleContext &sc, LexAccessor &styler,\n\t\tint activity, const WordList &markerList, bool caseSensitive) {\n\tif (IsOperatorOrSpace(sc.chPrev) && !IsOperatorOrSpace(sc.ch) && markerList.Length()) {\n\t\tstd::string marker;\n\t\tfor (Sci_PositionU currPos = sc.currentPos; true; currPos++) {\n\t\t\tconst char ch = styler.SafeGetCharAt(currPos);\n\t\t\tif (IsOperatorOrSpace(ch)) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (caseSensitive)\n\t\t\t\tmarker.push_back(ch);\n\t\t\telse\n\t\t\t\tmarker.push_back(MakeLowerCase(ch));\n\t\t}\n\t\tif (markerList.InList(marker)) {\n\t\t\tsc.SetState(SCE_C_TASKMARKER|activity);\n\t\t}\n\t}\n}\n\nconst CharacterSet setHexDigits(CharacterSet::setDigits, \"ABCDEFabcdef\");\nconst CharacterSet setOctDigits(\"01234567\");\nconst CharacterSet setNoneNumeric;\n\nclass EscapeSequence {\n\tconst CharacterSet *escapeSetValid = nullptr;\n\tint digitsLeft = 0;\npublic:\n\tint outerState = SCE_C_DEFAULT;\n\tEscapeSequence() = default;\n\tvoid resetEscapeState(int state, int nextChar) noexcept {\n\t\tdigitsLeft = 0;\n\t\touterState = state;\n\t\tescapeSetValid = &setNoneNumeric;\n\t\tif (nextChar == 'U') {\n\t\t\tdigitsLeft = 9;\n\t\t\tescapeSetValid = &setHexDigits;\n\t\t} else if (nextChar == 'u') {\n\t\t\tdigitsLeft = 5;\n\t\t\tescapeSetValid = &setHexDigits;\n\t\t} else if (nextChar == 'x') {\n\t\t\tdigitsLeft = 5;\n\t\t\tescapeSetValid = &setHexDigits;\n\t\t} else if (setOctDigits.Contains(nextChar)) {\n\t\t\tdigitsLeft = 3;\n\t\t\tescapeSetValid = &setOctDigits;\n\t\t}\n\t}\n\t[[nodiscard]] bool atEscapeEnd(int currChar) const noexcept {\n\t\treturn (digitsLeft <= 0) || !escapeSetValid->Contains(currChar);\n\t}\n\tvoid consumeDigit() noexcept {\n\t\tdigitsLeft--;\n\t}\n};\n\nstd::string GetRestOfLine(LexAccessor &styler, Sci_Position start, bool allowSpace) {\n\tstd::string restOfLine;\n\tSci_Position line = styler.GetLine(start);\n\tSci_Position pos = start;\n\tSci_Position endLine = styler.LineEnd(line);\n\tchar ch = styler.SafeGetCharAt(start, '\\n');\n\twhile (pos < endLine) {\n\t\tif (ch == '\\\\' && ((pos + 1) == endLine)) {\n\t\t\t// Continuation line\n\t\t\tline++;\n\t\t\tpos = styler.LineStart(line);\n\t\t\tendLine = styler.LineEnd(line);\n\t\t\tch = styler.SafeGetCharAt(pos, '\\n');\n\t\t} else {\n\t\t\tconst char chNext = styler.SafeGetCharAt(pos + 1, '\\n');\n\t\t\tif (ch == '/' && (chNext == '/' || chNext == '*'))\n\t\t\t\tbreak;\n\t\t\tif (allowSpace || (ch != ' ')) {\n\t\t\t\trestOfLine += ch;\n\t\t\t}\n\t\t\tpos++;\n\t\t\tch = chNext;\n\t\t}\n\t}\n\treturn restOfLine;\n}\n\nconstexpr bool IsStreamCommentStyle(int style) noexcept {\n\treturn style == SCE_C_COMMENT ||\n\t\tstyle == SCE_C_COMMENTDOC ||\n\t\tstyle == SCE_C_COMMENTDOCKEYWORD ||\n\t\tstyle == SCE_C_COMMENTDOCKEYWORDERROR;\n}\n\nstruct PPDefinition {\n\tSci_Position line;\n\tstd::string key;\n\tstd::string value;\n\tbool isUndef;\n\tstd::string arguments;\n\tPPDefinition(Sci_Position line_, std::string_view key_, std::string_view value_, bool isUndef_, std::string_view arguments_) :\n\t\tline(line_), key(key_), value(value_), isUndef(isUndef_), arguments(arguments_) {\n\t}\n};\n\nconstexpr int inactiveFlag = 0x40;\n\nclass LinePPState {\n\t// Track the state of preprocessor conditionals to allow showing active and inactive\n\t// code in different styles.\n\t// Only works up to 31 levels of conditional nesting.\n\n\t// state is a bit mask with 1 bit per level\n\t// bit is 1 for level if section inactive, so any bits set = inactive style\n\tint state = 0;\n\t// ifTaken is a bit mask with 1 bit per level\n\t// bit is 1 for level if some branch at this level has been taken\n\tint ifTaken = 0;\n\t// level is the nesting level of #if constructs\n\tint level = -1;\n\tstatic const int maximumNestingLevel = 31;\n\t[[nodiscard]] int maskLevel() const noexcept {\n\t\tif (level >= 0) {\n\t\t\treturn 1 << level;\n\t\t}\n\t\treturn 1;\n\t}\npublic:\n\tLinePPState() noexcept = default;\n\t[[nodiscard]] bool ValidLevel() const noexcept {\n\t\treturn level >= 0 && level < maximumNestingLevel;\n\t}\n\t[[nodiscard]] bool IsActive() const noexcept {\n\t\treturn state == 0;\n\t}\n\t[[nodiscard]] bool IsInactive() const noexcept {\n\t\treturn state != 0;\n\t}\n\t[[nodiscard]] int ActiveState() const noexcept {\n\t\treturn state ? inactiveFlag : 0;\n\t}\n\t[[nodiscard]] bool CurrentIfTaken() const noexcept {\n\t\treturn (ifTaken & maskLevel()) != 0;\n\t}\n\tvoid StartSection(bool on) noexcept {\n\t\tlevel++;\n\t\tif (ValidLevel()) {\n\t\t\tif (on) {\n\t\t\t\tstate &= ~maskLevel();\n\t\t\t\tifTaken |= maskLevel();\n\t\t\t} else {\n\t\t\t\tstate |= maskLevel();\n\t\t\t\tifTaken &= ~maskLevel();\n\t\t\t}\n\t\t}\n\t}\n\tvoid EndSection() noexcept {\n\t\tif (ValidLevel()) {\n\t\t\tstate &= ~maskLevel();\n\t\t\tifTaken &= ~maskLevel();\n\t\t}\n\t\tlevel--;\n\t}\n\tvoid InvertCurrentLevel() noexcept {\n\t\tif (ValidLevel()) {\n\t\t\tstate ^= maskLevel();\n\t\t\tifTaken |= maskLevel();\n\t\t}\n\t}\n};\n\n// Hold the preprocessor state for each line seen.\n// Currently one entry per line but could become sparse with just one entry per preprocessor line.\nclass PPStates {\n\tstd::vector<LinePPState> vlls;\npublic:\n\t[[nodiscard]] LinePPState ForLine(Sci_Position line) const noexcept {\n\t\tif ((line > 0) && (vlls.size() > static_cast<size_t>(line))) {\n\t\t\treturn vlls[line];\n\t\t}\n\t\treturn {};\n\t}\n\tvoid Add(Sci_Position line, LinePPState lls) {\n\t\tvlls.resize(line+1);\n\t\tvlls[line] = lls;\n\t}\n};\n\nenum class BackQuotedString : int {\n\tNone,\n\tRawString,\n\tTemplateLiteral,\n};\n\n// string interpolating state\nstruct InterpolatingState {\n\tint state;\n\tint braceCount;\n};\n\nstruct Definition {\n\tstd::string_view name;\n\tstd::string_view value;\n\tstd::string_view arguments;\n};\n\nconstexpr std::string_view TrimSpaceTab(std::string_view sv) noexcept {\n\twhile (!sv.empty() && IsASpaceOrTab(sv.front())) {\n\t\tsv.remove_prefix(1);\n\t}\n\treturn sv;\n}\n\n// Parse a macro definition, either from a #define line in a file or from keywords.\n// Either an object macro <NAME> <VALUE> or a function macro <NAME>(<ARGUMENTS>) <VALUE>.\n// VALUE is optional and is treated as \"1\" if missing.\n// #define ALLOW_PRINT\n// #define VERSION 37\n// #define VER(a,b) a*10+b\n// Whitespace separates macro and value in files but keywords use '=' separator.\n// 'endName' contains a set of characters that terminate the name of the macro.\n\nconstexpr Definition ParseDefine(std::string_view definition, std::string_view endName) {\n\tDefinition ret;\n\tdefinition = TrimSpaceTab(definition);\n\tconst size_t afterName = definition.find_first_of(endName);\n\tif (afterName != std::string_view::npos) {\n\t\tret.name = definition.substr(0, afterName);\n\t\tif (definition.at(afterName) == '(') {\n\t\t\t// Macro\n\t\t\tdefinition.remove_prefix(afterName+1);\n\t\t\tconst size_t closeBracket = definition.find(')');\n\t\t\tif (closeBracket != std::string_view::npos) {\n\t\t\t\tret.arguments = definition.substr(0, closeBracket);\n\t\t\t\tdefinition.remove_prefix(closeBracket+1);\n\t\t\t\tif (!definition.empty() && (endName.find(definition.front()) != std::string_view::npos)) {\n\t\t\t\t\tdefinition.remove_prefix(1);\n\t\t\t\t}\n\t\t\t\tret.value = definition;\n\t\t\t} // else malformed as requires closing bracket\n\t\t} else {\n\t\t\tret.value = definition.substr(afterName+1);\n\t\t}\n\t} else {\n\t\tret.name = definition;\n\t\tret.value = \"1\";\n\t}\n\treturn ret;\n}\n\n// An individual named option for use in an OptionSet\n\n// Options used for LexerCPP\nstruct OptionsCPP {\n\tbool stylingWithinPreprocessor = false;\n\tbool identifiersAllowDollars = true;\n\tbool trackPreprocessor = true;\n\tbool updatePreprocessor = true;\n\tbool verbatimStringsAllowEscapes = false;\n\tbool triplequotedStrings = false;\n\tbool hashquotedStrings = false;\n\tBackQuotedString backQuotedStrings = BackQuotedString::None;\n\tbool escapeSequence = false;\n\tbool fold = false;\n\tbool foldSyntaxBased = true;\n\tbool foldComment = false;\n\tbool foldCommentMultiline = true;\n\tbool foldCommentExplicit = true;\n\tstd::string foldExplicitStart;\n\tstd::string foldExplicitEnd;\n\tbool foldExplicitAnywhere = false;\n\tbool foldPreprocessor = false;\n\tbool foldPreprocessorAtElse = false;\n\tbool foldCompact = false;\n\tbool foldAtElse = false;\n};\n\nconst char *const cppWordLists[] = {\n            \"Primary keywords and identifiers\",\n            \"Secondary keywords and identifiers\",\n            \"Documentation comment keywords\",\n            \"Global classes and typedefs\",\n            \"Preprocessor definitions\",\n            \"Task marker and error marker keywords\",\n            nullptr,\n};\n\nstruct OptionSetCPP : public OptionSet<OptionsCPP> {\n\tOptionSetCPP() {\n\t\tDefineProperty(\"styling.within.preprocessor\", &OptionsCPP::stylingWithinPreprocessor,\n\t\t\t\"For C++ code, determines whether all preprocessor code is styled in the \"\n\t\t\t\"preprocessor style (0, the default) or only from the initial # to the end \"\n\t\t\t\"of the command word(1).\");\n\n\t\tDefineProperty(\"lexer.cpp.allow.dollars\", &OptionsCPP::identifiersAllowDollars,\n\t\t\t\"Set to 0 to disallow the '$' character in identifiers with the cpp lexer.\");\n\n\t\tDefineProperty(\"lexer.cpp.track.preprocessor\", &OptionsCPP::trackPreprocessor,\n\t\t\t\"Set to 1 to interpret #if/#else/#endif to grey out code that is not active.\");\n\n\t\tDefineProperty(\"lexer.cpp.update.preprocessor\", &OptionsCPP::updatePreprocessor,\n\t\t\t\"Set to 1 to update preprocessor definitions when #define found.\");\n\n\t\tDefineProperty(\"lexer.cpp.verbatim.strings.allow.escapes\", &OptionsCPP::verbatimStringsAllowEscapes,\n\t\t\t\"Set to 1 to allow verbatim strings to contain escape sequences.\");\n\n\t\tDefineProperty(\"lexer.cpp.triplequoted.strings\", &OptionsCPP::triplequotedStrings,\n\t\t\t\"Set to 1 to enable highlighting of triple-quoted strings.\");\n\n\t\tDefineProperty(\"lexer.cpp.hashquoted.strings\", &OptionsCPP::hashquotedStrings,\n\t\t\t\"Set to 1 to enable highlighting of hash-quoted strings.\");\n\n\t\tDefineProperty(\"lexer.cpp.backquoted.strings\", &OptionsCPP::backQuotedStrings,\n\t\t\t\"Set how to highlighting back-quoted strings. \"\n\t\t\t\"0 (the default) no highlighting. \"\n\t\t\t\"1 highlighted as Go raw string. \"\n\t\t\t\"2 highlighted as JavaScript template literal.\");\n\n\t\tDefineProperty(\"lexer.cpp.escape.sequence\", &OptionsCPP::escapeSequence,\n\t\t\t\"Set to 1 to enable highlighting of escape sequences in strings\");\n\n\t\tDefineProperty(\"fold\", &OptionsCPP::fold);\n\n\t\tDefineProperty(\"fold.cpp.syntax.based\", &OptionsCPP::foldSyntaxBased,\n\t\t\t\"Set this property to 0 to disable syntax based folding.\");\n\n\t\tDefineProperty(\"fold.comment\", &OptionsCPP::foldComment,\n\t\t\t\"This option enables folding multi-line comments and explicit fold points when using the C++ lexer. \"\n\t\t\t\"Explicit fold points allows adding extra folding by placing a //{ comment at the start and a //} \"\n\t\t\t\"at the end of a section that should fold.\");\n\n\t\tDefineProperty(\"fold.cpp.comment.multiline\", &OptionsCPP::foldCommentMultiline,\n\t\t\t\"Set this property to 0 to disable folding multi-line comments when fold.comment=1.\");\n\n\t\tDefineProperty(\"fold.cpp.comment.explicit\", &OptionsCPP::foldCommentExplicit,\n\t\t\t\"Set this property to 0 to disable folding explicit fold points when fold.comment=1.\");\n\n\t\tDefineProperty(\"fold.cpp.explicit.start\", &OptionsCPP::foldExplicitStart,\n\t\t\t\"The string to use for explicit fold start points, replacing the standard //{.\");\n\n\t\tDefineProperty(\"fold.cpp.explicit.end\", &OptionsCPP::foldExplicitEnd,\n\t\t\t\"The string to use for explicit fold end points, replacing the standard //}.\");\n\n\t\tDefineProperty(\"fold.cpp.explicit.anywhere\", &OptionsCPP::foldExplicitAnywhere,\n\t\t\t\"Set this property to 1 to enable explicit fold points anywhere, not just in line comments.\");\n\n\t\tDefineProperty(\"fold.cpp.preprocessor.at.else\", &OptionsCPP::foldPreprocessorAtElse,\n\t\t\t\"This option enables folding on a preprocessor #else or #endif line of an #if statement.\");\n\n\t\tDefineProperty(\"fold.preprocessor\", &OptionsCPP::foldPreprocessor,\n\t\t\t\"This option enables folding preprocessor directives when using the C++ lexer. \"\n\t\t\t\"Includes C#'s explicit #region and #endregion folding directives.\");\n\n\t\tDefineProperty(\"fold.compact\", &OptionsCPP::foldCompact);\n\n\t\tDefineProperty(\"fold.at.else\", &OptionsCPP::foldAtElse,\n\t\t\t\"This option enables C++ folding on a \\\"} else {\\\" line of an if statement.\");\n\n\t\tDefineWordListSets(cppWordLists);\n\t}\n};\n\nconst char styleSubable[] = {SCE_C_IDENTIFIER, SCE_C_COMMENTDOCKEYWORD, 0};\n\nLexicalClass lexicalClasses[] = {\n\t// Lexer Cpp SCLEX_CPP SCE_C_:\n\t0, \"SCE_C_DEFAULT\", \"default\", \"White space\",\n\t1, \"SCE_C_COMMENT\", \"comment\", \"Comment: /* */.\",\n\t2, \"SCE_C_COMMENTLINE\", \"comment line\", \"Line Comment: //.\",\n\t3, \"SCE_C_COMMENTDOC\", \"comment documentation\", \"Doc comment: block comments beginning with /** or /*!\",\n\t4, \"SCE_C_NUMBER\", \"literal numeric\", \"Number\",\n\t5, \"SCE_C_WORD\", \"keyword\", \"Keyword\",\n\t6, \"SCE_C_STRING\", \"literal string\", \"Double quoted string\",\n\t7, \"SCE_C_CHARACTER\", \"literal string character\", \"Single quoted string\",\n\t8, \"SCE_C_UUID\", \"literal uuid\", \"UUIDs (only in IDL)\",\n\t9, \"SCE_C_PREPROCESSOR\", \"preprocessor\", \"Preprocessor\",\n\t10, \"SCE_C_OPERATOR\", \"operator\", \"Operators\",\n\t11, \"SCE_C_IDENTIFIER\", \"identifier\", \"Identifiers\",\n\t12, \"SCE_C_STRINGEOL\", \"error literal string\", \"End of line where string is not closed\",\n\t13, \"SCE_C_VERBATIM\", \"literal string multiline raw\", \"Verbatim strings for C#\",\n\t14, \"SCE_C_REGEX\", \"literal regex\", \"Regular expressions for JavaScript\",\n\t15, \"SCE_C_COMMENTLINEDOC\", \"comment documentation line\", \"Doc Comment Line: line comments beginning with /// or //!.\",\n\t16, \"SCE_C_WORD2\", \"identifier\", \"Keywords2\",\n\t17, \"SCE_C_COMMENTDOCKEYWORD\", \"comment documentation keyword\", \"Comment keyword\",\n\t18, \"SCE_C_COMMENTDOCKEYWORDERROR\", \"error comment documentation keyword\", \"Comment keyword error\",\n\t19, \"SCE_C_GLOBALCLASS\", \"identifier\", \"Global class\",\n\t20, \"SCE_C_STRINGRAW\", \"literal string multiline raw\", \"Raw strings for C++0x\",\n\t21, \"SCE_C_TRIPLEVERBATIM\", \"literal string multiline raw\", \"Triple-quoted strings for Vala\",\n\t22, \"SCE_C_HASHQUOTEDSTRING\", \"literal string\", \"Hash-quoted strings for Pike\",\n\t23, \"SCE_C_PREPROCESSORCOMMENT\", \"comment preprocessor\", \"Preprocessor stream comment\",\n\t24, \"SCE_C_PREPROCESSORCOMMENTDOC\", \"comment preprocessor documentation\", \"Preprocessor stream doc comment\",\n\t25, \"SCE_C_USERLITERAL\", \"literal\", \"User defined literals\",\n\t26, \"SCE_C_TASKMARKER\", \"comment taskmarker\", \"Task Marker\",\n\t27, \"SCE_C_ESCAPESEQUENCE\", \"literal string escapesequence\", \"Escape sequence\",\n};\n\nconst int sizeLexicalClasses = static_cast<int>(std::size(lexicalClasses));\n\n}\n\nclass LexerCPP : public ILexer5 {\n\tbool caseSensitive;\n\tCharacterSet setWord;\n\tCharacterSet setNegationOp;\n\tCharacterSet setAddOp;\n\tCharacterSet setMultOp;\n\tCharacterSet setRelOp;\n\tCharacterSet setLogicalOp;\n\tCharacterSet setWordStart;\n\tPPStates vlls;\n\tstd::vector<PPDefinition> ppDefineHistory;\n\tstd::map<Sci_Position, std::vector<InterpolatingState>> interpolatingAtEol;\n\tWordList keywords;\n\tWordList keywords2;\n\tWordList keywords3;\n\tWordList keywords4;\n\tWordList ppDefinitions;\n\tWordList markerList;\n\tstruct SymbolValue {\n\t\tstd::string value;\n\t\tstd::string arguments;\n\t\tSymbolValue() noexcept = default;\n\t\tSymbolValue(std::string_view value_, std::string_view arguments_) : value(value_), arguments(arguments_) {\n\t\t}\n\t\tSymbolValue &operator = (const std::string &value_) {\n\t\t\tvalue = value_;\n\t\t\targuments.clear();\n\t\t\treturn *this;\n\t\t}\n\t\t[[nodiscard]] bool IsMacro() const noexcept {\n\t\t\treturn !arguments.empty();\n\t\t}\n\t};\n\tusing SymbolTable = std::map<std::string, SymbolValue>;\n\tSymbolTable preprocessorDefinitionsStart;\n\tOptionsCPP options;\n\tOptionSetCPP osCPP;\n\tEscapeSequence escapeSeq;\n\tSparseState<std::string> rawStringTerminators;\n\tenum { ssIdentifier, ssDocKeyword };\n\tSubStyles subStyles{ styleSubable, SubStylesFirst, SubStylesAvailable, inactiveFlag };\n\tstd::string returnBuffer;\npublic:\n\texplicit LexerCPP(bool caseSensitive_) :\n\t\tcaseSensitive(caseSensitive_),\n\t\tsetWord(CharacterSet::setAlphaNum, \"._\", true),\n\t\tsetNegationOp(\"!\"),\n\t\tsetAddOp(\"+-\"),\n\t\tsetMultOp(\"*/%\"),\n\t\tsetRelOp(\"=!<>\"),\n\t\tsetLogicalOp(\"|&\") {\n\t}\n\t// Deleted so LexerCPP objects can not be copied.\n\tLexerCPP(const LexerCPP &) = delete;\n\tLexerCPP(LexerCPP &&) = delete;\n\tvoid operator=(const LexerCPP &) = delete;\n\tvoid operator=(LexerCPP &&) = delete;\n\tvirtual ~LexerCPP() = default;\n\tvoid SCI_METHOD Release() noexcept override {\n\t\tdelete this;\n\t}\n\tint SCI_METHOD Version() const noexcept override {\n\t\treturn lvRelease5;\n\t}\n\tconst char *SCI_METHOD PropertyNames() override {\n\t\treturn osCPP.PropertyNames();\n\t}\n\tint SCI_METHOD PropertyType(const char *name) override {\n\t\treturn osCPP.PropertyType(name);\n\t}\n\tconst char *SCI_METHOD DescribeProperty(const char *name) override {\n\t\treturn osCPP.DescribeProperty(name);\n\t}\n\tSci_Position SCI_METHOD PropertySet(const char *key, const char *val) override;\n\tconst char *SCI_METHOD DescribeWordListSets() override {\n\t\treturn osCPP.DescribeWordListSets();\n\t}\n\tSci_Position SCI_METHOD WordListSet(int n, const char *wl) override;\n\tvoid SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;\n\tvoid SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;\n\n\tvoid *SCI_METHOD PrivateCall(int, void *) noexcept override {\n\t\treturn nullptr;\n\t}\n\n\tint SCI_METHOD LineEndTypesSupported() noexcept override {\n\t\treturn SC_LINE_END_TYPE_UNICODE;\n\t}\n\n\tint SCI_METHOD AllocateSubStyles(int styleBase, int numberStyles) override {\n\t\treturn subStyles.Allocate(styleBase, numberStyles);\n\t}\n\tint SCI_METHOD SubStylesStart(int styleBase) override {\n\t\treturn subStyles.Start(styleBase);\n\t}\n\tint SCI_METHOD SubStylesLength(int styleBase) override {\n\t\treturn subStyles.Length(styleBase);\n\t}\n\tint SCI_METHOD StyleFromSubStyle(int subStyle) override {\n\t\tconst int styleBase = subStyles.BaseStyle(MaskActive(subStyle));\n\t\tconst int inactive = subStyle & inactiveFlag;\n\t\treturn styleBase | inactive;\n\t}\n\tint SCI_METHOD PrimaryStyleFromStyle(int style) noexcept override {\n\t\treturn MaskActive(style);\n\t}\n\tvoid SCI_METHOD FreeSubStyles() override {\n\t\tsubStyles.Free();\n\t}\n\tvoid SCI_METHOD SetIdentifiers(int style, const char *identifiers) override {\n\t\tsubStyles.SetIdentifiers(style, identifiers);\n\t}\n\tint SCI_METHOD DistanceToSecondaryStyles() noexcept override {\n\t\treturn inactiveFlag;\n\t}\n\tconst char *SCI_METHOD GetSubStyleBases() noexcept override {\n\t\treturn styleSubable;\n\t}\n\tint SCI_METHOD NamedStyles() override {\n\t\treturn std::max(subStyles.LastAllocated() + 1,\n\t\t\tsizeLexicalClasses) +\n\t\t\tinactiveFlag;\n\t}\n\tconst char *SCI_METHOD NameOfStyle(int style) override {\n\t\tif (style >= NamedStyles())\n\t\t\treturn \"\";\n\t\tif (style < sizeLexicalClasses)\n\t\t\treturn lexicalClasses[style].name;\n\t\t// TODO: inactive and substyles\n\t\treturn \"\";\n\t}\n\tconst char *SCI_METHOD TagsOfStyle(int style) override {\n\t\tif (style >= NamedStyles())\n\t\t\treturn \"Excess\";\n\t\treturnBuffer.clear();\n\t\tconst int firstSubStyle = subStyles.FirstAllocated();\n\t\tif (firstSubStyle >= 0) {\n\t\t\tconst int lastSubStyle = subStyles.LastAllocated();\n\t\t\tif (((style >= firstSubStyle) && (style <= (lastSubStyle))) ||\n\t\t\t\t((style >= firstSubStyle + inactiveFlag) && (style <= (lastSubStyle + inactiveFlag)))) {\n\t\t\t\tint styleActive = style;\n\t\t\t\tif (style > lastSubStyle) {\n\t\t\t\t\treturnBuffer = \"inactive \";\n\t\t\t\t\tstyleActive -= inactiveFlag;\n\t\t\t\t}\n\t\t\t\tconst int styleMain = StyleFromSubStyle(styleActive);\n\t\t\t\treturnBuffer += lexicalClasses[styleMain].tags;\n\t\t\t\treturn returnBuffer.c_str();\n\t\t\t}\n\t\t}\n\t\tif (style < sizeLexicalClasses)\n\t\t\treturn lexicalClasses[style].tags;\n\t\tif (style >= inactiveFlag) {\n\t\t\treturnBuffer = \"inactive \";\n\t\t\tconst int styleActive = style - inactiveFlag;\n\t\t\tif (styleActive < sizeLexicalClasses)\n\t\t\t\treturnBuffer += lexicalClasses[styleActive].tags;\n\t\t\telse\n\t\t\t\treturnBuffer.clear();\n\t\t\treturn returnBuffer.c_str();\n\t\t}\n\t\treturn \"\";\n\t}\n\tconst char *SCI_METHOD DescriptionOfStyle(int style) override {\n\t\tif (style >= NamedStyles())\n\t\t\treturn \"\";\n\t\tif (style < sizeLexicalClasses)\n\t\t\treturn lexicalClasses[style].description;\n\t\t// TODO: inactive and substyles\n\t\treturn \"\";\n\t}\n\n\t// ILexer5 methods\n\tconst char *SCI_METHOD GetName() override {\n\t\treturn caseSensitive ? \"cpp\" : \"cppnocase\";\n\t}\n\tint SCI_METHOD  GetIdentifier() override {\n\t\treturn caseSensitive ? SCLEX_CPP : SCLEX_CPPNOCASE;\n\t}\n\tconst char *SCI_METHOD PropertyGet(const char *key) override;\n\n\tstatic ILexer5 *LexerFactoryCPP() {\n\t\treturn new LexerCPP(true);\n\t}\n\tstatic ILexer5 *LexerFactoryCPPInsensitive() {\n\t\treturn new LexerCPP(false);\n\t}\n\tconstexpr static int MaskActive(int style) noexcept {\n\t\treturn style & ~inactiveFlag;\n\t}\n\tvoid EvaluateTokens(Tokens &tokens, const SymbolTable &preprocessorDefinitions);\n\t[[nodiscard]] Tokens Tokenize(const std::string &expr) const;\n\tbool EvaluateExpression(const std::string &expr, const SymbolTable &preprocessorDefinitions);\n};\n\nSci_Position SCI_METHOD LexerCPP::PropertySet(const char *key, const char *val) {\n\tif (osCPP.PropertySet(&options, key, val)) {\n\t\tif (strcmp(key, \"lexer.cpp.allow.dollars\") == 0) {\n\t\t\tsetWord = CharacterSet(CharacterSet::setAlphaNum, \"._\", true);\n\t\t\tif (options.identifiersAllowDollars) {\n\t\t\t\tsetWord.Add('$');\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}\n\treturn -1;\n}\n\nconst char *SCI_METHOD LexerCPP::PropertyGet(const char *key) {\n\treturn osCPP.PropertyGet(key);\n}\n\nSci_Position SCI_METHOD LexerCPP::WordListSet(int n, const char *wl) {\n\tWordList *wordListN = nullptr;\n\tswitch (n) {\n\tcase 0:\n\t\twordListN = &keywords;\n\t\tbreak;\n\tcase 1:\n\t\twordListN = &keywords2;\n\t\tbreak;\n\tcase 2:\n\t\twordListN = &keywords3;\n\t\tbreak;\n\tcase 3:\n\t\twordListN = &keywords4;\n\t\tbreak;\n\tcase 4:\n\t\twordListN = &ppDefinitions;\n\t\tbreak;\n\tcase 5:\n\t\twordListN = &markerList;\n\t\tbreak;\n\tdefault:\n\t\tbreak;\n\t}\n\tSci_Position firstModification = -1;\n\tif (wordListN) {\n\t\tif (wordListN->Set(wl)) {\n\t\t\tfirstModification = 0;\n\t\t\tif (n == 4) {\n\t\t\t\t// Rebuild preprocessorDefinitions\n\t\t\t\tpreprocessorDefinitionsStart.clear();\n\t\t\t\tfor (int nDefinition = 0; nDefinition < ppDefinitions.Length(); nDefinition++) {\n\t\t\t\t\tconst Definition def = ParseDefine(ppDefinitions.WordAt(nDefinition), \"(=\");\n\t\t\t\t\tpreprocessorDefinitionsStart[std::string(def.name)] = SymbolValue(def.value, def.arguments);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn firstModification;\n}\n\nvoid SCI_METHOD LexerCPP::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) {\n\tLexAccessor styler(pAccess);\n\n\tconst StyleContext::Transform transform = caseSensitive ?\n\t\tStyleContext::Transform::none : StyleContext::Transform::lower;\n\n\tconst CharacterSet setOKBeforeRE(\"([{=,:;!%^&*|?~+-\");\n\tconst CharacterSet setCouldBePostOp(\"+-\");\n\n\tconst CharacterSet setDoxygen(CharacterSet::setAlpha, \"$@\\\\&<>#{}[]\");\n\n\tsetWordStart = CharacterSet(CharacterSet::setAlpha, \"_\", true);\n\n\tconst CharacterSet setInvalidRawFirst(\" )\\\\\\t\\v\\f\\n\");\n\n\tif (options.identifiersAllowDollars) {\n\t\tsetWordStart.Add('$');\n\t}\n\n\tint chPrevNonWhite = ' ';\n\tint visibleChars = 0;\n\tbool lastWordWasUUID = false;\n\tint styleBeforeDCKeyword = SCE_C_DEFAULT;\n\tint styleBeforeTaskMarker = SCE_C_DEFAULT;\n\tbool continuationLine = false;\n\tbool isIncludePreprocessor = false;\n\tbool isStringInPreprocessor = false;\n\tbool inRERange = false;\n\tbool seenDocKeyBrace = false;\n\n\tstd::vector<InterpolatingState> interpolatingStack;\n\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tif (options.backQuotedStrings == BackQuotedString::TemplateLiteral) {\n\t\t// code copied from LexPython\n\t\tauto it = interpolatingAtEol.find(lineCurrent - 1);\n\t\tif (it != interpolatingAtEol.end()) {\n\t\t\tinterpolatingStack = it->second;\n\t\t}\n\t\tit = interpolatingAtEol.lower_bound(lineCurrent);\n\t\tif (it != interpolatingAtEol.end()) {\n\t\t\tinterpolatingAtEol.erase(it, interpolatingAtEol.end());\n\t\t}\n\t}\n\n\tif ((MaskActive(initStyle) == SCE_C_PREPROCESSOR) ||\n      (MaskActive(initStyle) == SCE_C_COMMENTLINE) ||\n      (MaskActive(initStyle) == SCE_C_COMMENTLINEDOC)) {\n\t\t// Set continuationLine if last character of previous line is '\\'\n\t\tif (lineCurrent > 0) {\n\t\t\tconst Sci_Position endLinePrevious = styler.LineEnd(lineCurrent - 1);\n\t\t\tif (endLinePrevious > 0) {\n\t\t\t\tcontinuationLine = styler.SafeGetCharAt(endLinePrevious-1) == '\\\\';\n\t\t\t}\n\t\t}\n\t}\n\n\t// look back to set chPrevNonWhite properly for better regex colouring\n\tif (startPos > 0) {\n\t\tSci_Position back = startPos;\n\t\twhile (--back && IsSpaceEquiv(MaskActive(styler.StyleAt(back))))\n\t\t\t;\n\t\tif (MaskActive(styler.StyleAt(back)) == SCE_C_OPERATOR) {\n\t\t\tchPrevNonWhite = styler.SafeGetCharAt(back);\n\t\t}\n\t}\n\n\tStyleContext sc(startPos, length, initStyle, styler);\n\tLinePPState preproc = vlls.ForLine(lineCurrent);\n\n\tbool definitionsChanged = false;\n\n\t// Truncate ppDefineHistory before current line\n\n\tif (!options.updatePreprocessor)\n\t\tppDefineHistory.clear();\n\n\tconst std::vector<PPDefinition>::iterator itInvalid = std::find_if(\n\t\tppDefineHistory.begin(), ppDefineHistory.end(),\n\t\t[lineCurrent](const PPDefinition &p) noexcept { return p.line >= lineCurrent; });\n\tif (itInvalid != ppDefineHistory.end()) {\n\t\tppDefineHistory.erase(itInvalid, ppDefineHistory.end());\n\t\tdefinitionsChanged = true;\n\t}\n\n\tSymbolTable preprocessorDefinitions = preprocessorDefinitionsStart;\n\tfor (const PPDefinition &ppDef : ppDefineHistory) {\n\t\tif (ppDef.isUndef)\n\t\t\tpreprocessorDefinitions.erase(ppDef.key);\n\t\telse\n\t\t\tpreprocessorDefinitions[ppDef.key] = SymbolValue(ppDef.value, ppDef.arguments);\n\t}\n\n\tstd::string rawStringTerminator = rawStringTerminators.ValueAt(lineCurrent-1);\n\tSparseState<std::string> rawSTNew(lineCurrent);\n\n\tstd::string currentText;\n\n\tint activitySet = preproc.ActiveState();\n\n\tconst WordClassifier &classifierIdentifiers = subStyles.Classifier(SCE_C_IDENTIFIER);\n\tconst WordClassifier &classifierDocKeyWords = subStyles.Classifier(SCE_C_COMMENTDOCKEYWORD);\n\n\tSci_PositionU lineEndNext = styler.LineEnd(lineCurrent);\n\n\tfor (; sc.More();) {\n\n\t\tif (sc.atLineStart) {\n\t\t\t// Using MaskActive() is not needed in the following statement.\n\t\t\t// Inside inactive preprocessor declaration, state will be reset anyway at the end of this block.\n\t\t\tif ((sc.state == SCE_C_STRING) || (sc.state == SCE_C_CHARACTER)) {\n\t\t\t\t// Prevent SCE_C_STRINGEOL from leaking back to previous line which\n\t\t\t\t// ends with a line continuation by locking in the state up to this position.\n\t\t\t\tsc.SetState(sc.state);\n\t\t\t}\n\t\t\tif ((MaskActive(sc.state) == SCE_C_PREPROCESSOR) && (!continuationLine)) {\n\t\t\t\tsc.SetState(SCE_C_DEFAULT|activitySet);\n\t\t\t}\n\t\t\t// Reset states to beginning of colourise so no surprises\n\t\t\t// if different sets of lines lexed.\n\t\t\tvisibleChars = 0;\n\t\t\tlastWordWasUUID = false;\n\t\t\tisIncludePreprocessor = false;\n\t\t\tinRERange = false;\n\t\t\tif (preproc.IsInactive()) {\n\t\t\t\tactivitySet = inactiveFlag;\n\t\t\t\tsc.SetState(sc.state | activitySet);\n\t\t\t}\n\t\t}\n\n\t\tif (sc.atLineEnd) {\n\t\t\tlineCurrent++;\n\t\t\tlineEndNext = styler.LineEnd(lineCurrent);\n\t\t\tvlls.Add(lineCurrent, preproc);\n\t\t\tif (!rawStringTerminator.empty()) {\n\t\t\t\trawSTNew.Set(lineCurrent-1, rawStringTerminator);\n\t\t\t}\n\t\t\tif (!interpolatingStack.empty()) {\n\t\t\t\tinterpolatingAtEol[sc.currentLine] = interpolatingStack;\n\t\t\t}\n\t\t}\n\n\t\t// Handle line continuation generically.\n\t\tif (sc.ch == '\\\\') {\n\t\t\tif ((sc.currentPos+1) >= lineEndNext) {\n\t\t\t\tlineCurrent++;\n\t\t\t\tlineEndNext = styler.LineEnd(lineCurrent);\n\t\t\t\tvlls.Add(lineCurrent, preproc);\n\t\t\t\tif (!rawStringTerminator.empty()) {\n\t\t\t\t\trawSTNew.Set(lineCurrent-1, rawStringTerminator);\n\t\t\t\t}\n\t\t\t\tsc.Forward();\n\t\t\t\tif (sc.ch == '\\r' && sc.chNext == '\\n') {\n\t\t\t\t\t// Even in UTF-8, \\r and \\n are separate\n\t\t\t\t\tsc.Forward();\n\t\t\t\t}\n\t\t\t\tcontinuationLine = true;\n\t\t\t\tsc.Forward();\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\tconst bool atLineEndBeforeSwitch = sc.atLineEnd;\n\n\t\t// Determine if the current state should terminate.\n\t\tswitch (MaskActive(sc.state)) {\n\t\t\tcase SCE_C_OPERATOR:\n\t\t\t\tsc.SetState(SCE_C_DEFAULT|activitySet);\n\t\t\t\tbreak;\n\t\t\tcase SCE_C_NUMBER:\n\t\t\t\t// We accept almost anything because of hex. and number suffixes\n\t\t\t\tif (sc.ch == '_') {\n\t\t\t\t\tsc.ChangeState(SCE_C_USERLITERAL|activitySet);\n\t\t\t\t} else if (!(setWord.Contains(sc.ch)\n\t\t\t\t   || (sc.ch == '\\'')\n\t\t\t\t   || (AnyOf(sc.chPrev, 'e', 'E', 'p', 'P') && AnyOf(sc.ch, '+', '-')))) {\n\t\t\t\t\tsc.SetState(SCE_C_DEFAULT|activitySet);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_C_USERLITERAL:\n\t\t\t\tif (!(setWord.Contains(sc.ch)))\n\t\t\t\t\tsc.SetState(SCE_C_DEFAULT|activitySet);\n\t\t\t\tbreak;\n\t\t\tcase SCE_C_IDENTIFIER:\n\t\t\t\tif (sc.atLineStart || sc.atLineEnd || !setWord.Contains(sc.ch) || (sc.ch == '.')) {\n\t\t\t\t\tsc.GetCurrentString(currentText, transform);\n\t\t\t\t\tif (keywords.InList(currentText)) {\n\t\t\t\t\t\tlastWordWasUUID = currentText == \"uuid\";\n\t\t\t\t\t\tsc.ChangeState(SCE_C_WORD|activitySet);\n\t\t\t\t\t} else if (keywords2.InList(currentText)) {\n\t\t\t\t\t\tsc.ChangeState(SCE_C_WORD2|activitySet);\n\t\t\t\t\t} else if (keywords4.InList(currentText)) {\n\t\t\t\t\t\tsc.ChangeState(SCE_C_GLOBALCLASS|activitySet);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst int subStyle = classifierIdentifiers.ValueFor(currentText);\n\t\t\t\t\t\tif (subStyle >= 0) {\n\t\t\t\t\t\t\tsc.ChangeState(subStyle|activitySet);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tconst bool literalString = sc.ch == '\\\"';\n\t\t\t\t\tif (literalString || sc.ch == '\\'') {\n\t\t\t\t\t\tstd::string_view s = currentText;\n\t\t\t\t\t\tsize_t lenS = s.length();\n\t\t\t\t\t\tconst bool raw = literalString && sc.chPrev == 'R' && !setInvalidRawFirst.Contains(sc.chNext);\n\t\t\t\t\t\tif (raw) {\n\t\t\t\t\t\t\ts.remove_suffix(1);\n\t\t\t\t\t\t\tlenS--;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst bool valid =\n\t\t\t\t\t\t\t(lenS == 0) ||\n\t\t\t\t\t\t\t((lenS == 1) && ((s[0] == 'L') || (s[0] == 'u') || (s[0] == 'U'))) ||\n\t\t\t\t\t\t\t((lenS == 2) && literalString && (s[0] == 'u') && (s[1] == '8'));\n\t\t\t\t\t\tif (valid) {\n\t\t\t\t\t\t\tif (literalString) {\n\t\t\t\t\t\t\t\tif (raw) {\n\t\t\t\t\t\t\t\t\t// Set the style of the string prefix to SCE_C_STRINGRAW but then change to\n\t\t\t\t\t\t\t\t\t// SCE_C_DEFAULT as that allows the raw string start code to run.\n\t\t\t\t\t\t\t\t\tsc.ChangeState(SCE_C_STRINGRAW|activitySet);\n\t\t\t\t\t\t\t\t\tsc.SetState(SCE_C_DEFAULT|activitySet);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tsc.ChangeState(SCE_C_STRING|activitySet);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tsc.ChangeState(SCE_C_CHARACTER|activitySet);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsc.SetState(SCE_C_DEFAULT | activitySet);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsc.SetState(SCE_C_DEFAULT|activitySet);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_C_PREPROCESSOR:\n\t\t\t\tif (options.stylingWithinPreprocessor) {\n\t\t\t\t\tif (IsASpace(sc.ch) || (sc.ch == '(')) {\n\t\t\t\t\t\tsc.SetState(SCE_C_DEFAULT|activitySet);\n\t\t\t\t\t}\n\t\t\t\t} else if (isStringInPreprocessor && (sc.Match('>') || sc.Match('\\\"') || sc.atLineEnd)) {\n\t\t\t\t\tisStringInPreprocessor = false;\n\t\t\t\t} else if (!isStringInPreprocessor) {\n\t\t\t\t\tif ((isIncludePreprocessor && sc.Match('<')) || sc.Match('\\\"')) {\n\t\t\t\t\t\tisStringInPreprocessor = true;\n\t\t\t\t\t} else if (sc.Match('/', '*')) {\n\t\t\t\t\t\tif (sc.Match(\"/**\") || sc.Match(\"/*!\")) {\n\t\t\t\t\t\t\tsc.SetState(SCE_C_PREPROCESSORCOMMENTDOC|activitySet);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsc.SetState(SCE_C_PREPROCESSORCOMMENT|activitySet);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsc.Forward();\t// Eat the *\n\t\t\t\t\t} else if (sc.Match('/', '/')) {\n\t\t\t\t\t\tsc.SetState(SCE_C_DEFAULT|activitySet);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_C_PREPROCESSORCOMMENT:\n\t\t\tcase SCE_C_PREPROCESSORCOMMENTDOC:\n\t\t\t\tif (sc.Match('*', '/')) {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\tsc.ForwardSetState(SCE_C_PREPROCESSOR|activitySet);\n\t\t\t\t\tcontinue;\t// Without advancing in case of '\\'.\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_C_COMMENT:\n\t\t\t\tif (sc.Match('*', '/')) {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\tsc.ForwardSetState(SCE_C_DEFAULT|activitySet);\n\t\t\t\t} else {\n\t\t\t\t\tstyleBeforeTaskMarker = SCE_C_COMMENT;\n\t\t\t\t\thighlightTaskMarker(sc, styler, activitySet, markerList, caseSensitive);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_C_COMMENTDOC:\n\t\t\t\tif (sc.Match('*', '/')) {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\tsc.ForwardSetState(SCE_C_DEFAULT|activitySet);\n\t\t\t\t} else if (sc.ch == '@' || sc.ch == '\\\\') { // JavaDoc and Doxygen support\n\t\t\t\t\t// Verify that we have the conditions to mark a comment-doc-keyword\n\t\t\t\t\tif ((IsASpace(sc.chPrev) || sc.chPrev == '*') && (!IsASpace(sc.chNext))) {\n\t\t\t\t\t\tstyleBeforeDCKeyword = SCE_C_COMMENTDOC;\n\t\t\t\t\t\tsc.SetState(SCE_C_COMMENTDOCKEYWORD|activitySet);\n\t\t\t\t\t}\n\t\t\t\t} else if ((sc.ch == '<' && sc.chNext != '/')\n\t\t\t\t\t\t\t|| (sc.ch == '/' && sc.chPrev == '<')) { // XML comment style\n\t\t\t\t\tstyleBeforeDCKeyword = SCE_C_COMMENTDOC;\n\t\t\t\t\tsc.ForwardSetState(SCE_C_COMMENTDOCKEYWORD | activitySet);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_C_COMMENTLINE:\n\t\t\t\tif (sc.atLineStart && !continuationLine) {\n\t\t\t\t\tsc.SetState(SCE_C_DEFAULT|activitySet);\n\t\t\t\t} else {\n\t\t\t\t\tstyleBeforeTaskMarker = SCE_C_COMMENTLINE;\n\t\t\t\t\thighlightTaskMarker(sc, styler, activitySet, markerList, caseSensitive);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_C_COMMENTLINEDOC:\n\t\t\t\tif (sc.atLineStart && !continuationLine) {\n\t\t\t\t\tsc.SetState(SCE_C_DEFAULT|activitySet);\n\t\t\t\t} else if (sc.ch == '@' || sc.ch == '\\\\') { // JavaDoc and Doxygen support\n\t\t\t\t\t// Verify that we have the conditions to mark a comment-doc-keyword\n\t\t\t\t\tif ((IsASpace(sc.chPrev) || sc.chPrev == '/' || sc.chPrev == '!') && (!IsASpace(sc.chNext))) {\n\t\t\t\t\t\tstyleBeforeDCKeyword = SCE_C_COMMENTLINEDOC;\n\t\t\t\t\t\tsc.SetState(SCE_C_COMMENTDOCKEYWORD|activitySet);\n\t\t\t\t\t}\n\t\t\t\t} else if ((sc.ch == '<' && sc.chNext != '/')\n\t\t\t\t\t\t\t|| (sc.ch == '/' && sc.chPrev == '<')) { // XML comment style\n\t\t\t\t\tstyleBeforeDCKeyword = SCE_C_COMMENTLINEDOC;\n\t\t\t\t\tsc.ForwardSetState(SCE_C_COMMENTDOCKEYWORD | activitySet);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_C_COMMENTDOCKEYWORD:\n\t\t\t\tif ((styleBeforeDCKeyword == SCE_C_COMMENTDOC) && sc.Match('*', '/')) {\n\t\t\t\t\tsc.ChangeState(SCE_C_COMMENTDOCKEYWORDERROR);\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\tsc.ForwardSetState(SCE_C_DEFAULT|activitySet);\n\t\t\t\t\tseenDocKeyBrace = false;\n\t\t\t\t} else if (sc.ch == '[' || sc.ch == '{') {\n\t\t\t\t\tseenDocKeyBrace = true;\n\t\t\t\t} else if (!setDoxygen.Contains(sc.ch)\n\t\t\t\t           && !(seenDocKeyBrace && AnyOf(sc.ch, ',', '.'))) {\n\t\t\t\t\tif (!(IsASpace(sc.ch) || (sc.ch == 0))) {\n\t\t\t\t\t\tsc.ChangeState(SCE_C_COMMENTDOCKEYWORDERROR|activitySet);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsc.GetCurrentString(currentText, transform);\n\t\t\t\t\t\tassert(!currentText.empty());\n\t\t\t\t\t\tconst std::string currentSuffix = currentText.substr(1);\n\t\t\t\t\t\tif (!keywords3.InList(currentSuffix) && !keywords3.InList(currentText)) {\n\t\t\t\t\t\t\tconst int subStyleCDKW = classifierDocKeyWords.ValueFor(currentSuffix);\n\t\t\t\t\t\t\tif (subStyleCDKW >= 0) {\n\t\t\t\t\t\t\t\tsc.ChangeState(subStyleCDKW | activitySet);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tsc.ChangeState(SCE_C_COMMENTDOCKEYWORDERROR | activitySet);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tsc.SetState(styleBeforeDCKeyword|activitySet);\n\t\t\t\t\tseenDocKeyBrace = false;\n\t\t\t\t} else if (sc.ch == '>') {\n\t\t\t\t\tsc.GetCurrentString(currentText, transform);\n\t\t\t\t\tif (!keywords3.InList(currentText)) {\n\t\t\t\t\t\tconst int subStyleCDKW = classifierDocKeyWords.ValueFor(currentText.substr(1));\n\t\t\t\t\t\tif (subStyleCDKW >= 0) {\n\t\t\t\t\t\t\tsc.ChangeState(subStyleCDKW | activitySet);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsc.ChangeState(SCE_C_COMMENTDOCKEYWORDERROR | activitySet);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tsc.SetState(styleBeforeDCKeyword | activitySet);\n\t\t\t\t\tseenDocKeyBrace = false;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_C_STRING:\n\t\t\t\tif (sc.atLineEnd) {\n\t\t\t\t\tsc.ChangeState(SCE_C_STRINGEOL|activitySet);\n\t\t\t\t} else if (isIncludePreprocessor) {\n\t\t\t\t\tif (sc.ch == '>') {\n\t\t\t\t\t\tsc.ForwardSetState(SCE_C_DEFAULT|activitySet);\n\t\t\t\t\t\tisIncludePreprocessor = false;\n\t\t\t\t\t}\n\t\t\t\t} else if (sc.ch == '\\\\') {\n\t\t\t\t\tif (options.escapeSequence) {\n\t\t\t\t\t\tescapeSeq.resetEscapeState(sc.state, sc.chNext);\n\t\t\t\t\t\tsc.SetState(SCE_C_ESCAPESEQUENCE|activitySet);\n\t\t\t\t\t}\n\t\t\t\t\tsc.Forward(); // Skip all characters after the backslash\n\t\t\t\t} else if (sc.ch == '\\\"') {\n\t\t\t\t\tif (sc.chNext == '_') {\n\t\t\t\t\t\tsc.ChangeState(SCE_C_USERLITERAL|activitySet);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsc.ForwardSetState(SCE_C_DEFAULT|activitySet);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_C_ESCAPESEQUENCE:\n\t\t\t\tescapeSeq.consumeDigit();\n\t\t\t\tif (escapeSeq.atEscapeEnd(sc.ch)) {\n\t\t\t\t\tsc.SetState(escapeSeq.outerState);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_C_HASHQUOTEDSTRING:\n\t\t\t\tif (sc.ch == '\\\\') {\n\t\t\t\t\tif (sc.chNext == '\\\"' || sc.chNext == '\\'' || sc.chNext == '\\\\') {\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t}\n\t\t\t\t} else if (sc.ch == '\\\"') {\n\t\t\t\t\tsc.ForwardSetState(SCE_C_DEFAULT|activitySet);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_C_STRINGRAW:\n\t\t\t\tif (sc.Match(rawStringTerminator.c_str())) {\n\t\t\t\t\tfor (size_t termPos=rawStringTerminator.size(); termPos; termPos--)\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\tsc.SetState(SCE_C_DEFAULT|activitySet);\n\t\t\t\t\tif (interpolatingStack.empty()) {\n\t\t\t\t\t\trawStringTerminator.clear();\n\t\t\t\t\t}\n\t\t\t\t} else if (options.backQuotedStrings == BackQuotedString::TemplateLiteral) {\n\t\t\t\t\tif (sc.ch == '\\\\') {\n\t\t\t\t\t\tif (options.escapeSequence) {\n\t\t\t\t\t\t\tescapeSeq.resetEscapeState(sc.state, sc.chNext);\n\t\t\t\t\t\t\tsc.SetState(SCE_C_ESCAPESEQUENCE|activitySet);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsc.Forward(); // Skip all characters after the backslash\n\t\t\t\t\t} else if (sc.Match('$', '{')) {\n\t\t\t\t\t\tinterpolatingStack.push_back({sc.state, 1});\n\t\t\t\t\t\tsc.SetState(SCE_C_OPERATOR|activitySet);\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_C_CHARACTER:\n\t\t\t\tif (sc.atLineEnd) {\n\t\t\t\t\tsc.ChangeState(SCE_C_STRINGEOL|activitySet);\n\t\t\t\t} else if (sc.ch == '\\\\') {\n\t\t\t\t\tif (sc.chNext == '\\\"' || sc.chNext == '\\'' || sc.chNext == '\\\\') {\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t}\n\t\t\t\t} else if (sc.ch == '\\'') {\n\t\t\t\t\tif (sc.chNext == '_') {\n\t\t\t\t\t\tsc.ChangeState(SCE_C_USERLITERAL|activitySet);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsc.ForwardSetState(SCE_C_DEFAULT|activitySet);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_C_REGEX:\n\t\t\t\tif (sc.atLineStart) {\n\t\t\t\t\tsc.SetState(SCE_C_DEFAULT|activitySet);\n\t\t\t\t} else if (!inRERange && sc.ch == '/') {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\twhile (IsLowerCase(sc.ch))\n\t\t\t\t\t\tsc.Forward();    // gobble regex flags\n\t\t\t\t\tsc.SetState(SCE_C_DEFAULT|activitySet);\n\t\t\t\t} else if (sc.ch == '\\\\' && ((sc.currentPos+1) < lineEndNext)) {\n\t\t\t\t\t// Gobble up the escaped character\n\t\t\t\t\tsc.Forward();\n\t\t\t\t} else if (sc.ch == '[') {\n\t\t\t\t\tinRERange = true;\n\t\t\t\t} else if (sc.ch == ']') {\n\t\t\t\t\tinRERange = false;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_C_STRINGEOL:\n\t\t\t\tif (sc.atLineStart) {\n\t\t\t\t\tsc.SetState(SCE_C_DEFAULT|activitySet);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_C_VERBATIM:\n\t\t\t\tif (options.verbatimStringsAllowEscapes && (sc.ch == '\\\\')) {\n\t\t\t\t\tsc.Forward(); // Skip all characters after the backslash\n\t\t\t\t} else if (sc.ch == '\\\"') {\n\t\t\t\t\tif (sc.chNext == '\\\"') {\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsc.ForwardSetState(SCE_C_DEFAULT|activitySet);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_C_TRIPLEVERBATIM:\n\t\t\t\tif (sc.Match(R\"(\"\"\")\")) {\n\t\t\t\t\twhile (sc.Match('\"')) {\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t}\n\t\t\t\t\tsc.SetState(SCE_C_DEFAULT|activitySet);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_C_UUID:\n\t\t\t\tif (sc.atLineEnd || sc.ch == ')') {\n\t\t\t\t\tsc.SetState(SCE_C_DEFAULT|activitySet);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_C_TASKMARKER:\n\t\t\t\tif (IsOperatorOrSpace(sc.ch)) {\n\t\t\t\t\tsc.SetState(styleBeforeTaskMarker|activitySet);\n\t\t\t\t\tstyleBeforeTaskMarker = SCE_C_DEFAULT;\n\t\t\t\t}\n\t\t}\n\n\t\tif (sc.atLineEnd && !atLineEndBeforeSwitch) {\n\t\t\t// State exit processing consumed characters up to end of line.\n\t\t\tlineCurrent++;\n\t\t\tlineEndNext = styler.LineEnd(lineCurrent);\n\t\t\tvlls.Add(lineCurrent, preproc);\n\t\t}\n\n\t\tconst bool atLineEndBeforeStateEntry = sc.atLineEnd;\n\n\t\t// Determine if a new state should be entered.\n\t\tif (MaskActive(sc.state) == SCE_C_DEFAULT) {\n\t\t\tif (sc.Match('@', '\\\"')) {\n\t\t\t\tsc.SetState(SCE_C_VERBATIM|activitySet);\n\t\t\t\tsc.Forward();\n\t\t\t} else if (options.triplequotedStrings && sc.Match(R\"(\"\"\")\")) {\n\t\t\t\tsc.SetState(SCE_C_TRIPLEVERBATIM|activitySet);\n\t\t\t\tsc.Forward(2);\n\t\t\t} else if (options.hashquotedStrings && sc.Match('#', '\\\"')) {\n\t\t\t\tsc.SetState(SCE_C_HASHQUOTEDSTRING|activitySet);\n\t\t\t\tsc.Forward();\n\t\t\t} else if ((options.backQuotedStrings != BackQuotedString::None) && sc.Match('`')) {\n\t\t\t\tsc.SetState(SCE_C_STRINGRAW|activitySet);\n\t\t\t\trawStringTerminator = \"`\";\n\t\t\t} else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) {\n\t\t\t\tif (lastWordWasUUID) {\n\t\t\t\t\tsc.SetState(SCE_C_UUID|activitySet);\n\t\t\t\t\tlastWordWasUUID = false;\n\t\t\t\t} else {\n\t\t\t\t\tsc.SetState(SCE_C_NUMBER|activitySet);\n\t\t\t\t}\n\t\t\t} else if (!sc.atLineEnd && (setWordStart.Contains(sc.ch) || (sc.ch == '@'))) {\n\t\t\t\tif (lastWordWasUUID) {\n\t\t\t\t\tsc.SetState(SCE_C_UUID|activitySet);\n\t\t\t\t\tlastWordWasUUID = false;\n\t\t\t\t} else {\n\t\t\t\t\tsc.SetState(SCE_C_IDENTIFIER|activitySet);\n\t\t\t\t}\n\t\t\t} else if (sc.Match('/', '*')) {\n\t\t\t\tif (sc.Match(\"/**\") || sc.Match(\"/*!\")) {\t// Support of Qt/Doxygen doc. style\n\t\t\t\t\tsc.SetState(SCE_C_COMMENTDOC|activitySet);\n\t\t\t\t} else {\n\t\t\t\t\tsc.SetState(SCE_C_COMMENT|activitySet);\n\t\t\t\t}\n\t\t\t\tsc.Forward();\t// Eat the * so it isn't used for the end of the comment\n\t\t\t} else if (sc.Match('/', '/')) {\n\t\t\t\tif ((sc.Match(\"///\") && !sc.Match(\"////\")) || sc.Match(\"//!\"))\n\t\t\t\t\t// Support of Qt/Doxygen doc. style\n\t\t\t\t\tsc.SetState(SCE_C_COMMENTLINEDOC|activitySet);\n\t\t\t\telse\n\t\t\t\t\tsc.SetState(SCE_C_COMMENTLINE|activitySet);\n\t\t\t} else if (sc.ch == '/'\n\t\t\t\t   && (setOKBeforeRE.Contains(chPrevNonWhite)\n\t\t\t\t       || followsReturnKeyword(sc, styler))\n\t\t\t\t   && (!setCouldBePostOp.Contains(chPrevNonWhite)\n\t\t\t\t       || !FollowsPostfixOperator(sc, styler))) {\n\t\t\t\tsc.SetState(SCE_C_REGEX|activitySet);\t// JavaScript's RegEx\n\t\t\t\tinRERange = false;\n\t\t\t} else if (sc.ch == '\\\"') {\n\t\t\t\tif (sc.chPrev == 'R') {\n\t\t\t\t\tstyler.Flush();\n\t\t\t\t\tif (MaskActive(styler.StyleAt(sc.currentPos - 1)) == SCE_C_STRINGRAW) {\n\t\t\t\t\t\tsc.SetState(SCE_C_STRINGRAW|activitySet);\n\t\t\t\t\t\trawStringTerminator = \")\";\n\t\t\t\t\t\tfor (Sci_Position termPos = sc.currentPos + 1;; termPos++) {\n\t\t\t\t\t\t\tconst char chTerminator = styler.SafeGetCharAt(termPos, '(');\n\t\t\t\t\t\t\tif (chTerminator == '(')\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\trawStringTerminator += chTerminator;\n\t\t\t\t\t\t}\n\t\t\t\t\t\trawStringTerminator += '\\\"';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsc.SetState(SCE_C_STRING|activitySet);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tsc.SetState(SCE_C_STRING|activitySet);\n\t\t\t\t}\n\t\t\t\tisIncludePreprocessor = false;\t// ensure that '>' won't end the string\n\t\t\t} else if (isIncludePreprocessor && sc.ch == '<') {\n\t\t\t\tsc.SetState(SCE_C_STRING|activitySet);\n\t\t\t} else if (sc.ch == '\\'') {\n\t\t\t\tsc.SetState(SCE_C_CHARACTER|activitySet);\n\t\t\t} else if (sc.ch == '#' && visibleChars == 0) {\n\t\t\t\t// Preprocessor commands are alone on their line\n\t\t\t\tsc.SetState(SCE_C_PREPROCESSOR|activitySet);\n\t\t\t\t// Skip whitespace between # and preprocessor word\n\t\t\t\tdo {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t} while ((sc.ch == ' ' || sc.ch == '\\t') && sc.More());\n\t\t\t\tif (sc.Match(\"include\")) {\n\t\t\t\t\tisIncludePreprocessor = true;\n\t\t\t\t} else {\n\t\t\t\t\tif (options.trackPreprocessor && IsAlphaNumeric(sc.ch)) {\n\t\t\t\t\t\t// If #if is nested too deeply (>31 levels) the active/inactive appearance\n\t\t\t\t\t\t// will stop reflecting the code.\n\t\t\t\t\t\tif (sc.Match(\"ifdef\") || sc.Match(\"ifndef\")) {\n\t\t\t\t\t\t\tconst bool isIfDef = sc.Match(\"ifdef\");\n\t\t\t\t\t\t\tconst int startRest = isIfDef ? 5 : 6;\n\t\t\t\t\t\t\tconst std::string restOfLine = GetRestOfLine(styler, sc.currentPos + startRest + 1, false);\n\t\t\t\t\t\t\tconst bool foundDef = preprocessorDefinitions.find(restOfLine) != preprocessorDefinitions.end();\n\t\t\t\t\t\t\tpreproc.StartSection(isIfDef == foundDef);\n\t\t\t\t\t\t} else if (sc.Match(\"if\")) {\n\t\t\t\t\t\t\tconst std::string restOfLine = GetRestOfLine(styler, sc.currentPos + 2, true);\n\t\t\t\t\t\t\tconst bool ifGood = EvaluateExpression(restOfLine, preprocessorDefinitions);\n\t\t\t\t\t\t\tpreproc.StartSection(ifGood);\n\t\t\t\t\t\t} else if (sc.Match(\"else\")) {\n\t\t\t\t\t\t\t// #else is shown as active if either preceding or following section is active\n\t\t\t\t\t\t\t// as that means that it contributed to the result.\n\t\t\t\t\t\t\tif (preproc.ValidLevel()) {\n\t\t\t\t\t\t\t\t// If #else has no corresponding #if then take no action as invalid\n\t\t\t\t\t\t\t\tif (!preproc.CurrentIfTaken()) {\n\t\t\t\t\t\t\t\t\t// Inactive, may become active if parent scope active\n\t\t\t\t\t\t\t\t\tassert(sc.state == (SCE_C_PREPROCESSOR | inactiveFlag));\n\t\t\t\t\t\t\t\t\tpreproc.InvertCurrentLevel();\n\t\t\t\t\t\t\t\t\tactivitySet = preproc.ActiveState();\n\t\t\t\t\t\t\t\t\t// If following is active then show \"else\" as active\n\t\t\t\t\t\t\t\t\tif (!activitySet)\n\t\t\t\t\t\t\t\t\t\tsc.ChangeState(SCE_C_PREPROCESSOR);\n\t\t\t\t\t\t\t\t} else if (preproc.IsActive()) {\n\t\t\t\t\t\t\t\t\t// Active -> inactive\n\t\t\t\t\t\t\t\t\tassert(sc.state == SCE_C_PREPROCESSOR);\n\t\t\t\t\t\t\t\t\tpreproc.InvertCurrentLevel();\n\t\t\t\t\t\t\t\t\tactivitySet = preproc.ActiveState();\n\t\t\t\t\t\t\t\t\t// Continue to show \"else\" as active as it ends active section.\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (sc.Match(\"elif\")) {\n\t\t\t\t\t\t\t// Ensure only one chosen out of #if .. #elif .. #elif .. #else .. #endif\n\t\t\t\t\t\t\t// #elif is shown as active if either preceding or following section is active\n\t\t\t\t\t\t\t// as that means that it contributed to the result.\n\t\t\t\t\t\t\tif (preproc.ValidLevel()) {\n\t\t\t\t\t\t\t\tif (!preproc.CurrentIfTaken()) {\n\t\t\t\t\t\t\t\t\t// Inactive, if expression true then may become active if parent scope active\n\t\t\t\t\t\t\t\t\tassert(sc.state == (SCE_C_PREPROCESSOR | inactiveFlag));\n\t\t\t\t\t\t\t\t\t// Similar to #if\n\t\t\t\t\t\t\t\t\tconst std::string restOfLine = GetRestOfLine(styler, sc.currentPos + 4, true);\n\t\t\t\t\t\t\t\t\tconst bool ifGood = EvaluateExpression(restOfLine, preprocessorDefinitions);\n\t\t\t\t\t\t\t\t\tif (ifGood) {\n\t\t\t\t\t\t\t\t\t\tpreproc.InvertCurrentLevel();\n\t\t\t\t\t\t\t\t\t\tactivitySet = preproc.ActiveState();\n\t\t\t\t\t\t\t\t\t\tif (!activitySet)\n\t\t\t\t\t\t\t\t\t\t\tsc.ChangeState(SCE_C_PREPROCESSOR);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (preproc.IsActive()) {\n\t\t\t\t\t\t\t\t\t// Active -> inactive\n\t\t\t\t\t\t\t\t\tassert(sc.state == SCE_C_PREPROCESSOR);\n\t\t\t\t\t\t\t\t\tpreproc.InvertCurrentLevel();\n\t\t\t\t\t\t\t\t\tactivitySet = preproc.ActiveState();\n\t\t\t\t\t\t\t\t\t// Continue to show \"elif\" as active as it ends active section.\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (sc.Match(\"endif\")) {\n\t\t\t\t\t\t\tpreproc.EndSection();\n\t\t\t\t\t\t\tactivitySet = preproc.ActiveState();\n\t\t\t\t\t\t\tsc.ChangeState(SCE_C_PREPROCESSOR|activitySet);\n\t\t\t\t\t\t} else if (sc.Match(\"define\")) {\n\t\t\t\t\t\t\tif (options.updatePreprocessor && preproc.IsActive()) {\n\t\t\t\t\t\t\t\tconst std::string restOfLine = GetRestOfLine(styler, sc.currentPos + 6, true);\n\t\t\t\t\t\t\t\tconst Definition def = ParseDefine(restOfLine, \"( \\t\");\n\t\t\t\t\t\t\t\tpreprocessorDefinitions[std::string(def.name)] = SymbolValue(def.value, def.arguments);\n\t\t\t\t\t\t\t\tppDefineHistory.emplace_back(lineCurrent, def.name, def.value, false, def.arguments);\n\t\t\t\t\t\t\t\tdefinitionsChanged = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (sc.Match(\"undef\")) {\n\t\t\t\t\t\t\tif (options.updatePreprocessor && preproc.IsActive()) {\n\t\t\t\t\t\t\t\tconst std::string restOfLine = GetRestOfLine(styler, sc.currentPos + 5, false);\n\t\t\t\t\t\t\t\tTokens tokens = Tokenize(restOfLine);\n\t\t\t\t\t\t\t\tif (!tokens.empty()) {\n\t\t\t\t\t\t\t\t\tconst std::string key = tokens[0];\n\t\t\t\t\t\t\t\t\tpreprocessorDefinitions.erase(key);\n\t\t\t\t\t\t\t\t\tppDefineHistory.emplace_back(lineCurrent, key, \"\", true, \"\");\n\t\t\t\t\t\t\t\t\tdefinitionsChanged = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (isoperator(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_C_OPERATOR|activitySet);\n\t\t\t\tif (!interpolatingStack.empty() && AnyOf(sc.ch, '{', '}')) {\n\t\t\t\t\tInterpolatingState &current = interpolatingStack.back();\n\t\t\t\t\tif (sc.ch == '{') {\n\t\t\t\t\t\tcurrent.braceCount += 1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcurrent.braceCount -= 1;\n\t\t\t\t\t\tif (current.braceCount == 0) {\n\t\t\t\t\t\t\tsc.ForwardSetState(current.state);\n\t\t\t\t\t\t\tinterpolatingStack.pop_back();\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (sc.atLineEnd && !atLineEndBeforeStateEntry) {\n\t\t\t// State entry processing consumed characters up to end of line.\n\t\t\tlineCurrent++;\n\t\t\tlineEndNext = styler.LineEnd(lineCurrent);\n\t\t\tvlls.Add(lineCurrent, preproc);\n\t\t}\n\n\t\tif (!IsASpace(sc.ch) && !IsSpaceEquiv(MaskActive(sc.state))) {\n\t\t\tchPrevNonWhite = sc.ch;\n\t\t\tvisibleChars++;\n\t\t}\n\t\tcontinuationLine = false;\n\t\tsc.Forward();\n\t}\n\tconst bool rawStringsChanged = rawStringTerminators.Merge(rawSTNew, lineCurrent);\n\tif (definitionsChanged || rawStringsChanged)\n\t\tstyler.ChangeLexerState(startPos, startPos + length);\n\tsc.Complete();\n}\n\n// Store both the current line's fold level and the next lines in the\n// level store to make it easy to pick up with each increment\n// and to make it possible to fiddle the current level for \"} else {\".\n\nvoid SCI_METHOD LexerCPP::Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) {\n\n\tif (!options.fold)\n\t\treturn;\n\n\tLexAccessor styler(pAccess);\n\n\tconst Sci_PositionU endPos = startPos + length;\n\tint visibleChars = 0;\n\tbool inLineComment = false;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tint levelCurrent = SC_FOLDLEVELBASE;\n\tif (lineCurrent > 0)\n\t\tlevelCurrent = styler.LevelAt(lineCurrent-1) >> 16;\n\tSci_PositionU lineStartNext = styler.LineStart(lineCurrent+1);\n\tint levelMinCurrent = levelCurrent;\n\tint levelNext = levelCurrent;\n\tchar chNext = styler[startPos];\n\tint styleNext = MaskActive(styler.StyleAt(startPos));\n\tint style = MaskActive(initStyle);\n\tconst bool userDefinedFoldMarkers = !options.foldExplicitStart.empty() && !options.foldExplicitEnd.empty();\n\tfor (Sci_PositionU i = startPos; i < endPos; i++) {\n\t\tconst char ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\tconst int stylePrev = style;\n\t\tstyle = styleNext;\n\t\tstyleNext = MaskActive(styler.StyleAt(i + 1));\n\t\tconst bool atEOL = i == (lineStartNext-1);\n\t\tif ((style == SCE_C_COMMENTLINE) || (style == SCE_C_COMMENTLINEDOC))\n\t\t\tinLineComment = true;\n\t\tif (options.foldComment && options.foldCommentMultiline && IsStreamCommentStyle(style) && !inLineComment) {\n\t\t\tif (!IsStreamCommentStyle(stylePrev)) {\n\t\t\t\tlevelNext++;\n\t\t\t} else if (!IsStreamCommentStyle(styleNext) && !atEOL) {\n\t\t\t\t// Comments don't end at end of line and the next character may be unstyled.\n\t\t\t\tlevelNext--;\n\t\t\t}\n\t\t}\n\t\tif (options.foldComment && options.foldCommentExplicit && ((style == SCE_C_COMMENTLINE) || options.foldExplicitAnywhere)) {\n\t\t\tif (userDefinedFoldMarkers) {\n\t\t\t\tif (styler.Match(i, options.foldExplicitStart.c_str())) {\n\t\t\t\t\tlevelNext++;\n\t\t\t\t} else if (styler.Match(i, options.foldExplicitEnd.c_str())) {\n\t\t\t\t\tlevelNext--;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ((ch == '/') && (chNext == '/')) {\n\t\t\t\t\tconst char chNext2 = styler.SafeGetCharAt(i + 2);\n\t\t\t\t\tif (chNext2 == '{') {\n\t\t\t\t\t\tlevelNext++;\n\t\t\t\t\t} else if (chNext2 == '}') {\n\t\t\t\t\t\tlevelNext--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (options.foldPreprocessor && (style == SCE_C_PREPROCESSOR)) {\n\t\t\tif (ch == '#') {\n\t\t\t\tSci_PositionU j = i + 1;\n\t\t\t\twhile ((j < endPos) && IsASpaceOrTab(styler.SafeGetCharAt(j))) {\n\t\t\t\t\tj++;\n\t\t\t\t}\n\t\t\t\tif (styler.Match(j, \"region\") || styler.Match(j, \"if\")) {\n\t\t\t\t\tlevelNext++;\n\t\t\t\t} else if (styler.Match(j, \"end\")) {\n\t\t\t\t\tlevelNext--;\n\t\t\t\t}\n\n\t\t\t\tif (options.foldPreprocessorAtElse && (styler.Match(j, \"else\") || styler.Match(j, \"elif\"))) {\n\t\t\t\t\tlevelMinCurrent--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (options.foldSyntaxBased && (style == SCE_C_OPERATOR)) {\n\t\t\tif (ch == '{' || ch == '[' || ch == '(') {\n\t\t\t\t// Measure the minimum before a '{' to allow\n\t\t\t\t// folding on \"} else {\"\n\t\t\t\tif (options.foldAtElse && levelMinCurrent > levelNext) {\n\t\t\t\t\tlevelMinCurrent = levelNext;\n\t\t\t\t}\n\t\t\t\tlevelNext++;\n\t\t\t} else if (ch == '}' || ch == ']' || ch == ')') {\n\t\t\t\tlevelNext--;\n\t\t\t}\n\t\t}\n\t\tif (!IsASpace(ch))\n\t\t\tvisibleChars++;\n\t\tif (atEOL || (i == endPos-1)) {\n\t\t\tint levelUse = levelCurrent;\n\t\t\tif ((options.foldSyntaxBased && options.foldAtElse) ||\n\t\t\t\t(options.foldPreprocessor && options.foldPreprocessorAtElse)\n\t\t\t) {\n\t\t\t\tlevelUse = levelMinCurrent;\n\t\t\t}\n\t\t\tint lev = levelUse | levelNext << 16;\n\t\t\tif (visibleChars == 0 && options.foldCompact)\n\t\t\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\t\t\tif (levelUse < levelNext)\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\tif (lev != styler.LevelAt(lineCurrent)) {\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\t\t\t}\n\t\t\tlineCurrent++;\n\t\t\tlineStartNext = styler.LineStart(lineCurrent+1);\n\t\t\tlevelCurrent = levelNext;\n\t\t\tlevelMinCurrent = levelCurrent;\n\t\t\tif (atEOL && (i == static_cast<Sci_PositionU>(styler.Length()-1))) {\n\t\t\t\t// There is an empty line at end of file so give it same level and empty\n\t\t\t\tstyler.SetLevel(lineCurrent, (levelCurrent | levelCurrent << 16) | SC_FOLDLEVELWHITEFLAG);\n\t\t\t}\n\t\t\tvisibleChars = 0;\n\t\t\tinLineComment = false;\n\t\t}\n\t}\n}\n\nvoid LexerCPP::EvaluateTokens(Tokens &tokens, const SymbolTable &preprocessorDefinitions) {\n\n\t// Remove whitespace tokens\n\ttokens.erase(std::remove_if(tokens.begin(), tokens.end(), OnlySpaceOrTab), tokens.end());\n\n\t// Evaluate defined statements to either 0 or 1\n\tfor (size_t i=0; (i+1)<tokens.size();) {\n\t\tif (tokens[i] == \"defined\") {\n\t\t\tconst char *val = \"0\";\n\t\t\tif (tokens[i+1] == \"(\") {\n\t\t\t\tif (((i + 2)<tokens.size()) && (tokens[i + 2] == \")\")) {\n\t\t\t\t\t// defined()\n\t\t\t\t\ttokens.erase(tokens.begin() + i + 1, tokens.begin() + i + 3);\n\t\t\t\t} else if (((i+3)<tokens.size()) && (tokens[i+3] == \")\")) {\n\t\t\t\t\t// defined(<identifier>)\n\t\t\t\t\tconst SymbolTable::const_iterator it = preprocessorDefinitions.find(tokens[i+2]);\n\t\t\t\t\tif (it != preprocessorDefinitions.end()) {\n\t\t\t\t\t\tval = \"1\";\n\t\t\t\t\t}\n\t\t\t\t\ttokens.erase(tokens.begin() + i + 1, tokens.begin() + i + 4);\n\t\t\t\t} else {\n\t\t\t\t\t// Spurious '(' so erase as more likely to result in false\n\t\t\t\t\ttokens.erase(tokens.begin() + i + 1, tokens.begin() + i + 2);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// defined <identifier>\n\t\t\t\tconst SymbolTable::const_iterator it = preprocessorDefinitions.find(tokens[i+1]);\n\t\t\t\tif (it != preprocessorDefinitions.end()) {\n\t\t\t\t\tval = \"1\";\n\t\t\t\t}\n\t\t\t\ttokens.erase(tokens.begin() + i + 1, tokens.begin() + i + 2);\n\t\t\t}\n\t\t\ttokens[i] = val;\n\t\t} else {\n\t\t\ti++;\n\t\t}\n\t}\n\n\t// Evaluate identifiers\n\tconstexpr size_t maxIterations = 100;\n\tsize_t iterations = 0;\t// Limit number of iterations in case there is a recursive macro.\n\tfor (size_t i = 0; (i<tokens.size()) && (iterations < maxIterations);) {\n\t\titerations++;\n\t\tif (setWordStart.Contains(tokens[i][0])) {\n\t\t\tconst SymbolTable::const_iterator it = preprocessorDefinitions.find(tokens[i]);\n\t\t\tif (it != preprocessorDefinitions.end()) {\n\t\t\t\t// Tokenize value\n\t\t\t\tTokens macroTokens = Tokenize(it->second.value);\n\t\t\t\tif (it->second.IsMacro()) {\n\t\t\t\t\tif ((i + 1 < tokens.size()) && (tokens.at(i + 1) == \"(\")) {\n\t\t\t\t\t\t// Create map of argument name to value\n\t\t\t\t\t\tconst Tokens argumentNames = StringSplit(it->second.arguments, ',');\n\t\t\t\t\t\tstd::map<std::string, std::string> arguments;\n\t\t\t\t\t\tsize_t arg = 0;\n\t\t\t\t\t\tsize_t tok = i+2;\n\t\t\t\t\t\twhile ((tok < tokens.size()) && (arg < argumentNames.size()) && (tokens.at(tok) != \")\")) {\n\t\t\t\t\t\t\tif (tokens.at(tok) != \",\") {\n\t\t\t\t\t\t\t\targuments[argumentNames.at(arg)] = tokens.at(tok);\n\t\t\t\t\t\t\t\targ++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttok++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Remove invocation\n\t\t\t\t\t\ttokens.erase(tokens.begin() + i, tokens.begin() + tok + 1);\n\n\t\t\t\t\t\t// Substitute values into macro\n\t\t\t\t\t\tmacroTokens.erase(std::remove_if(macroTokens.begin(), macroTokens.end(), OnlySpaceOrTab), macroTokens.end());\n\n\t\t\t\t\t\tfor (size_t iMacro = 0; iMacro < macroTokens.size();) {\n\t\t\t\t\t\t\tif (setWordStart.Contains(macroTokens[iMacro][0])) {\n\t\t\t\t\t\t\t\tconst std::map<std::string, std::string>::const_iterator itFind =\n\t\t\t\t\t\t\t\t\targuments.find(macroTokens[iMacro]);\n\t\t\t\t\t\t\t\tif (itFind != arguments.end()) {\n\t\t\t\t\t\t\t\t\t// TODO: Possible that value will be expression so should insert tokenized form\n\t\t\t\t\t\t\t\t\tmacroTokens[iMacro] = itFind->second;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tiMacro++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Insert results back into tokens\n\t\t\t\t\t\ttokens.insert(tokens.begin() + i, macroTokens.begin(), macroTokens.end());\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Remove invocation\n\t\t\t\t\ttokens.erase(tokens.begin() + i);\n\t\t\t\t\t// Insert results back into tokens\n\t\t\t\t\ttokens.insert(tokens.begin() + i, macroTokens.begin(), macroTokens.end());\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Identifier not found and value defaults to zero\n\t\t\t\ttokens[i] = \"0\";\n\t\t\t}\n\t\t} else {\n\t\t\ti++;\n\t\t}\n\t}\n\n\t// Find bracketed subexpressions and recurse on them\n\tBracketPair bracketPair = FindBracketPair(tokens);\n\twhile (bracketPair.itBracket != tokens.end()) {\n\t\tTokens inBracket(bracketPair.itBracket + 1, bracketPair.itEndBracket);\n\t\tEvaluateTokens(inBracket, preprocessorDefinitions);\n\n\t\t// The insertion is done before the removal because there were failures with the opposite approach\n\t\ttokens.insert(bracketPair.itBracket, inBracket.begin(), inBracket.end());\n\n\t\t// insert invalidated bracketPair. Use a new variable to avoid warning from Coverity.\n\t\tconst BracketPair pairToErase = FindBracketPair(tokens);\n\t\ttokens.erase(pairToErase.itBracket, pairToErase.itEndBracket + 1);\n\n\t\tbracketPair = FindBracketPair(tokens);\n\t}\n\n\t// Evaluate logical negations\n\tfor (size_t j=0; (j+1)<tokens.size();) {\n\t\tif (setNegationOp.Contains(tokens[j][0])) {\n\t\t\tint isTrue = atoi(tokens[j+1].c_str());\n\t\t\tif (tokens[j] == \"!\")\n\t\t\t\tisTrue = !isTrue;\n\t\t\tconst Tokens::iterator itInsert =\n\t\t\t\ttokens.erase(tokens.begin() + j, tokens.begin() + j + 2);\n\t\t\ttokens.insert(itInsert, isTrue ? \"1\" : \"0\");\n\t\t} else {\n\t\t\tj++;\n\t\t}\n\t}\n\n\t// Evaluate expressions in precedence order\n\tenum precedence { precMult, precAdd, precRelative\n\t\t, precLogical, /* end marker */ precLast };\n\tfor (int prec = precMult; prec < precLast; prec++) {\n\t\t// Looking at 3 tokens at a time so end at 2 before end\n\t\tfor (size_t k=0; (k+2)<tokens.size();) {\n\t\t\tconst char chOp = tokens[k+1][0];\n\t\t\tif (\n\t\t\t\t((prec==precMult) && setMultOp.Contains(chOp)) ||\n\t\t\t\t((prec==precAdd) && setAddOp.Contains(chOp)) ||\n\t\t\t\t((prec==precRelative) && setRelOp.Contains(chOp)) ||\n\t\t\t\t((prec==precLogical) && setLogicalOp.Contains(chOp))\n\t\t\t\t) {\n\t\t\t\tconst int valA = atoi(tokens[k].c_str());\n\t\t\t\tconst int valB = atoi(tokens[k+2].c_str());\n\t\t\t\tint result = 0;\n\t\t\t\tif (tokens[k+1] == \"+\")\n\t\t\t\t\tresult = valA + valB;\n\t\t\t\telse if (tokens[k+1] == \"-\")\n\t\t\t\t\tresult = valA - valB;\n\t\t\t\telse if (tokens[k+1] == \"*\")\n\t\t\t\t\tresult = valA * valB;\n\t\t\t\telse if (tokens[k+1] == \"/\")\n\t\t\t\t\tresult = valA / (valB ? valB : 1);\n\t\t\t\telse if (tokens[k+1] == \"%\")\n\t\t\t\t\tresult = valA % (valB ? valB : 1);\n\t\t\t\telse if (tokens[k+1] == \"<\")\n\t\t\t\t\tresult = valA < valB;\n\t\t\t\telse if (tokens[k+1] == \"<=\")\n\t\t\t\t\tresult = valA <= valB;\n\t\t\t\telse if (tokens[k+1] == \">\")\n\t\t\t\t\tresult = valA > valB;\n\t\t\t\telse if (tokens[k+1] == \">=\")\n\t\t\t\t\tresult = valA >= valB;\n\t\t\t\telse if (tokens[k+1] == \"==\")\n\t\t\t\t\tresult = valA == valB;\n\t\t\t\telse if (tokens[k+1] == \"!=\")\n\t\t\t\t\tresult = valA != valB;\n\t\t\t\telse if (tokens[k+1] == \"||\")\n\t\t\t\t\tresult = valA || valB;\n\t\t\t\telse if (tokens[k+1] == \"&&\")\n\t\t\t\t\tresult = valA && valB;\n\t\t\t\tconst Tokens::iterator itInsert =\n\t\t\t\t\ttokens.erase(tokens.begin() + k, tokens.begin() + k + 3);\n\t\t\t\ttokens.insert(itInsert, std::to_string(result));\n\t\t\t} else {\n\t\t\t\tk++;\n\t\t\t}\n\t\t}\n\t}\n}\n\nTokens LexerCPP::Tokenize(const std::string &expr) const {\n\t// Break into tokens\n\tTokens tokens;\n\tconst char *cp = expr.c_str();\n\twhile (*cp) {\n\t\tstd::string word;\n\t\tif (setWord.Contains(*cp)) {\n\t\t\t// Identifiers and numbers\n\t\t\twhile (setWord.Contains(*cp)) {\n\t\t\t\tword += *cp;\n\t\t\t\tcp++;\n\t\t\t}\n\t\t} else if (IsASpaceOrTab(*cp)) {\n\t\t\twhile (IsASpaceOrTab(*cp)) {\n\t\t\t\tword += *cp;\n\t\t\t\tcp++;\n\t\t\t}\n\t\t} else if (setRelOp.Contains(*cp)) {\n\t\t\tword += *cp;\n\t\t\tcp++;\n\t\t\tif (setRelOp.Contains(*cp)) {\n\t\t\t\tword += *cp;\n\t\t\t\tcp++;\n\t\t\t}\n\t\t} else if (setLogicalOp.Contains(*cp)) {\n\t\t\tword += *cp;\n\t\t\tcp++;\n\t\t\tif (setLogicalOp.Contains(*cp)) {\n\t\t\t\tword += *cp;\n\t\t\t\tcp++;\n\t\t\t}\n\t\t} else {\n\t\t\t// Should handle strings, characters, and comments here\n\t\t\tword += *cp;\n\t\t\tcp++;\n\t\t}\n\t\ttokens.push_back(word);\n\t}\n\treturn tokens;\n}\n\nbool LexerCPP::EvaluateExpression(const std::string &expr, const SymbolTable &preprocessorDefinitions) {\n\tTokens tokens = Tokenize(expr);\n\n\tEvaluateTokens(tokens, preprocessorDefinitions);\n\n\t// \"0\" or \"\" -> false else true\n\tconst bool isFalse = tokens.empty() ||\n\t\t((tokens.size() == 1) && (tokens[0].empty() || tokens[0] == \"0\"));\n\treturn !isFalse;\n}\n\nLexerModule lmCPP(SCLEX_CPP, LexerCPP::LexerFactoryCPP, \"cpp\", cppWordLists);\nLexerModule lmCPPNoCase(SCLEX_CPPNOCASE, LexerCPP::LexerFactoryCPPInsensitive, \"cppnocase\", cppWordLists);\n"
  },
  {
    "path": "lexilla/lexers/LexCSS.cxx",
    "content": "// Scintilla source code edit control\n// Encoding: UTF-8\n/** @file LexCSS.cxx\n ** Lexer for Cascading Style Sheets\n ** Written by Jakub Vrána\n ** Improved by Philippe Lhoste (CSS2)\n ** Improved by Ross McKay (SCSS mode; see http://sass-lang.com/ )\n **/\n// Copyright 1998-2002 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n// TODO: handle SCSS nested properties like font: { weight: bold; size: 1em; }\n// TODO: handle SCSS interpolation: #{}\n// TODO: add features for Less if somebody feels like contributing; http://lesscss.org/\n// TODO: refactor this monster so that the next poor slob can read it!\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\n\nstatic inline bool IsAWordChar(const unsigned int ch) {\n\t/* FIXME:\n\t * The CSS spec allows \"ISO 10646 characters U+00A1 and higher\" to be treated as word chars.\n\t * Unfortunately, we are only getting string bytes here, and not full unicode characters. We cannot guarantee\n\t * that our byte is between U+0080 - U+00A0 (to return false), so we have to allow all characters U+0080 and higher\n\t */\n\treturn ch >= 0x80 || isalnum(ch) || ch == '-' || ch == '_';\n}\n\ninline bool IsCssOperator(const int ch) {\n\tif (!((ch < 0x80) && isalnum(ch)) &&\n\t\t(ch == '{' || ch == '}' || ch == ':' || ch == ',' || ch == ';' ||\n\t\t ch == '.' || ch == '#' || ch == '!' || ch == '@' ||\n\t\t /* CSS2 */\n\t\t ch == '*' || ch == '>' || ch == '+' || ch == '=' || ch == '~' || ch == '|' ||\n\t\t ch == '[' || ch == ']' || ch == '(' || ch == ')')) {\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n// look behind (from start of document to our start position) to determine current nesting level\ninline int NestingLevelLookBehind(Sci_PositionU startPos, Accessor &styler) {\n\tint ch;\n\tint nestingLevel = 0;\n\n\tfor (Sci_PositionU i = 0; i < startPos; i++) {\n\t\tch = styler.SafeGetCharAt(i);\n\t\tif (ch == '{')\n\t\t\tnestingLevel++;\n\t\telse if (ch == '}')\n\t\t\tnestingLevel--;\n\t}\n\n\treturn nestingLevel;\n}\n\nstatic void ColouriseCssDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[], Accessor &styler) {\n\tWordList &css1Props = *keywordlists[0];\n\tWordList &pseudoClasses = *keywordlists[1];\n\tWordList &css2Props = *keywordlists[2];\n\tWordList &css3Props = *keywordlists[3];\n\tWordList &pseudoElements = *keywordlists[4];\n\tWordList &exProps = *keywordlists[5];\n\tWordList &exPseudoClasses = *keywordlists[6];\n\tWordList &exPseudoElements = *keywordlists[7];\n\n\tStyleContext sc(startPos, length, initStyle, styler);\n\n\tint lastState = -1; // before operator\n\tint lastStateC = -1; // before comment\n\tint lastStateS = -1; // before single-quoted/double-quoted string\n\tint lastStateVar = -1; // before variable (SCSS)\n\tint lastStateVal = -1; // before value (SCSS)\n\tint op = ' '; // last operator\n\tint opPrev = ' '; // last operator\n\tbool insideParentheses = false; // true if currently in a CSS url() or similar construct\n\n\t// property lexer.css.scss.language\n\t//\tSet to 1 for Sassy CSS (.scss)\n\tbool isScssDocument = styler.GetPropertyInt(\"lexer.css.scss.language\") != 0;\n\n\t// property lexer.css.less.language\n\t// Set to 1 for Less CSS (.less)\n\tbool isLessDocument = styler.GetPropertyInt(\"lexer.css.less.language\") != 0;\n\n\t// property lexer.css.hss.language\n\t// Set to 1 for HSS (.hss)\n\tbool isHssDocument = styler.GetPropertyInt(\"lexer.css.hss.language\") != 0;\n\n\t// SCSS/LESS/HSS have the concept of variable\n\tbool hasVariables = isScssDocument || isLessDocument || isHssDocument;\n\tchar varPrefix = 0;\n\tif (hasVariables)\n\t\tvarPrefix = isLessDocument ? '@' : '$';\n\n\t// SCSS/LESS/HSS support single-line comments\n\ttypedef enum _CommentModes { eCommentBlock = 0, eCommentLine = 1} CommentMode;\n\tCommentMode comment_mode = eCommentBlock;\n\tbool hasSingleLineComments = isScssDocument || isLessDocument || isHssDocument;\n\n\t// must keep track of nesting level in document types that support it (SCSS/LESS/HSS)\n\tbool hasNesting = false;\n\tint nestingLevel = 0;\n\tif (isScssDocument || isLessDocument || isHssDocument) {\n\t\thasNesting = true;\n\t\tnestingLevel = NestingLevelLookBehind(startPos, styler);\n\t}\n\n\t// \"the loop\"\n\tfor (; sc.More(); sc.Forward()) {\n\t\tif (sc.state == SCE_CSS_COMMENT && ((comment_mode == eCommentBlock && sc.Match('*', '/')) || (comment_mode == eCommentLine && sc.atLineEnd))) {\n\t\t\tif (lastStateC == -1) {\n\t\t\t\t// backtrack to get last state:\n\t\t\t\t// comments are like whitespace, so we must return to the previous state\n\t\t\t\tSci_PositionU i = startPos;\n\t\t\t\tfor (; i > 0; i--) {\n\t\t\t\t\tif ((lastStateC = styler.StyleAt(i-1)) != SCE_CSS_COMMENT) {\n\t\t\t\t\t\tif (lastStateC == SCE_CSS_OPERATOR) {\n\t\t\t\t\t\t\top = styler.SafeGetCharAt(i-1);\n\t\t\t\t\t\t\topPrev = styler.SafeGetCharAt(i-2);\n\t\t\t\t\t\t\twhile (--i) {\n\t\t\t\t\t\t\t\tlastState = styler.StyleAt(i-1);\n\t\t\t\t\t\t\t\tif (lastState != SCE_CSS_OPERATOR && lastState != SCE_CSS_COMMENT)\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (i == 0)\n\t\t\t\t\t\t\t\tlastState = SCE_CSS_DEFAULT;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (i == 0)\n\t\t\t\t\tlastStateC = SCE_CSS_DEFAULT;\n\t\t\t}\n\t\t\tif (comment_mode == eCommentBlock) {\n\t\t\t\tsc.Forward();\n\t\t\t\tsc.ForwardSetState(lastStateC);\n\t\t\t} else /* eCommentLine */ {\n\t\t\t\tsc.SetState(lastStateC);\n\t\t\t}\n\t\t}\n\n\t\tif (sc.state == SCE_CSS_COMMENT)\n\t\t\tcontinue;\n\n\t\tif (sc.state == SCE_CSS_DOUBLESTRING || sc.state == SCE_CSS_SINGLESTRING) {\n\t\t\tif (sc.ch != (sc.state == SCE_CSS_DOUBLESTRING ? '\\\"' : '\\''))\n\t\t\t\tcontinue;\n\t\t\tSci_PositionU i = sc.currentPos;\n\t\t\twhile (i && styler[i-1] == '\\\\')\n\t\t\t\ti--;\n\t\t\tif ((sc.currentPos - i) % 2 == 1)\n\t\t\t\tcontinue;\n\t\t\tsc.ForwardSetState(lastStateS);\n\t\t}\n\n\t\tif (sc.state == SCE_CSS_OPERATOR) {\n\t\t\tif (op == ' ') {\n\t\t\t\tSci_PositionU i = startPos;\n\t\t\t\top = styler.SafeGetCharAt(i-1);\n\t\t\t\topPrev = styler.SafeGetCharAt(i-2);\n\t\t\t\twhile (--i) {\n\t\t\t\t\tlastState = styler.StyleAt(i-1);\n\t\t\t\t\tif (lastState != SCE_CSS_OPERATOR && lastState != SCE_CSS_COMMENT)\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tswitch (op) {\n\t\t\tcase '@':\n\t\t\t\tif (lastState == SCE_CSS_DEFAULT || hasNesting)\n\t\t\t\t\tsc.SetState(SCE_CSS_DIRECTIVE);\n\t\t\t\tbreak;\n\t\t\tcase '>':\n\t\t\tcase '+':\n\t\t\t\tif (lastState == SCE_CSS_TAG || lastState == SCE_CSS_CLASS || lastState == SCE_CSS_ID ||\n\t\t\t\t\tlastState == SCE_CSS_PSEUDOCLASS || lastState == SCE_CSS_EXTENDED_PSEUDOCLASS || lastState == SCE_CSS_UNKNOWN_PSEUDOCLASS)\n\t\t\t\t\tsc.SetState(SCE_CSS_DEFAULT);\n\t\t\t\tbreak;\n\t\t\tcase '[':\n\t\t\t\tif (lastState == SCE_CSS_TAG || lastState == SCE_CSS_DEFAULT || lastState == SCE_CSS_CLASS || lastState == SCE_CSS_ID ||\n\t\t\t\t\tlastState == SCE_CSS_PSEUDOCLASS || lastState == SCE_CSS_EXTENDED_PSEUDOCLASS || lastState == SCE_CSS_UNKNOWN_PSEUDOCLASS)\n\t\t\t\t\tsc.SetState(SCE_CSS_ATTRIBUTE);\n\t\t\t\tbreak;\n\t\t\tcase ']':\n\t\t\t\tif (lastState == SCE_CSS_ATTRIBUTE)\n\t\t\t\t\tsc.SetState(SCE_CSS_TAG);\n\t\t\t\tbreak;\n\t\t\tcase '{':\n\t\t\t\tnestingLevel++;\n\t\t\t\tswitch (lastState) {\n\t\t\t\tcase SCE_CSS_GROUP_RULE:\n\t\t\t\t\tsc.SetState(SCE_CSS_DEFAULT);\n\t\t\t\t\tbreak;\n\t\t\t\tcase SCE_CSS_TAG:\n\t\t\t\tcase SCE_CSS_DIRECTIVE:\n\t\t\t\t\tsc.SetState(SCE_CSS_IDENTIFIER);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase '}':\n\t\t\t\tif (--nestingLevel < 0)\n\t\t\t\t\tnestingLevel = 0;\n\t\t\t\tswitch (lastState) {\n\t\t\t\tcase SCE_CSS_DEFAULT:\n\t\t\t\tcase SCE_CSS_VALUE:\n\t\t\t\tcase SCE_CSS_IMPORTANT:\n\t\t\t\tcase SCE_CSS_IDENTIFIER:\n\t\t\t\tcase SCE_CSS_IDENTIFIER2:\n\t\t\t\tcase SCE_CSS_IDENTIFIER3:\n\t\t\t\t\tif (hasNesting)\n\t\t\t\t\t\tsc.SetState(nestingLevel > 0 ? SCE_CSS_IDENTIFIER : SCE_CSS_DEFAULT);\n\t\t\t\t\telse\n\t\t\t\t\t\tsc.SetState(SCE_CSS_DEFAULT);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase '(':\n\t\t\t\tif (lastState == SCE_CSS_PSEUDOCLASS)\n\t\t\t\t\tsc.SetState(SCE_CSS_TAG);\n\t\t\t\telse if (lastState == SCE_CSS_EXTENDED_PSEUDOCLASS)\n\t\t\t\t\tsc.SetState(SCE_CSS_EXTENDED_PSEUDOCLASS);\n\t\t\t\tbreak;\n\t\t\tcase ')':\n\t\t\t\tif (lastState == SCE_CSS_TAG || lastState == SCE_CSS_DEFAULT || lastState == SCE_CSS_CLASS || lastState == SCE_CSS_ID ||\n\t\t\t\t\tlastState == SCE_CSS_PSEUDOCLASS || lastState == SCE_CSS_EXTENDED_PSEUDOCLASS || lastState == SCE_CSS_UNKNOWN_PSEUDOCLASS ||\n\t\t\t\t\tlastState == SCE_CSS_PSEUDOELEMENT || lastState == SCE_CSS_EXTENDED_PSEUDOELEMENT)\n\t\t\t\t\tsc.SetState(SCE_CSS_TAG);\n\t\t\t\tbreak;\n\t\t\tcase ':':\n\t\t\t\tswitch (lastState) {\n\t\t\t\tcase SCE_CSS_TAG:\n\t\t\t\tcase SCE_CSS_DEFAULT:\n\t\t\t\tcase SCE_CSS_CLASS:\n\t\t\t\tcase SCE_CSS_ID:\n\t\t\t\tcase SCE_CSS_PSEUDOCLASS:\n\t\t\t\tcase SCE_CSS_EXTENDED_PSEUDOCLASS:\n\t\t\t\tcase SCE_CSS_UNKNOWN_PSEUDOCLASS:\n\t\t\t\tcase SCE_CSS_PSEUDOELEMENT:\n\t\t\t\tcase SCE_CSS_EXTENDED_PSEUDOELEMENT:\n\t\t\t\t\tsc.SetState(SCE_CSS_PSEUDOCLASS);\n\t\t\t\t\tbreak;\n\t\t\t\tcase SCE_CSS_IDENTIFIER:\n\t\t\t\tcase SCE_CSS_IDENTIFIER2:\n\t\t\t\tcase SCE_CSS_IDENTIFIER3:\n\t\t\t\tcase SCE_CSS_EXTENDED_IDENTIFIER:\n\t\t\t\tcase SCE_CSS_UNKNOWN_IDENTIFIER:\n\t\t\t\tcase SCE_CSS_VARIABLE:\n\t\t\t\t\tsc.SetState(SCE_CSS_VALUE);\n\t\t\t\t\tlastStateVal = lastState;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase '.':\n\t\t\t\tif (lastState == SCE_CSS_TAG || lastState == SCE_CSS_DEFAULT || lastState == SCE_CSS_CLASS || lastState == SCE_CSS_ID ||\n\t\t\t\t\tlastState == SCE_CSS_PSEUDOCLASS || lastState == SCE_CSS_EXTENDED_PSEUDOCLASS || lastState == SCE_CSS_UNKNOWN_PSEUDOCLASS)\n\t\t\t\t\tsc.SetState(SCE_CSS_CLASS);\n\t\t\t\tbreak;\n\t\t\tcase '#':\n\t\t\t\tif (lastState == SCE_CSS_TAG || lastState == SCE_CSS_DEFAULT || lastState == SCE_CSS_CLASS || lastState == SCE_CSS_ID ||\n\t\t\t\t\tlastState == SCE_CSS_PSEUDOCLASS || lastState == SCE_CSS_EXTENDED_PSEUDOCLASS || lastState == SCE_CSS_UNKNOWN_PSEUDOCLASS)\n\t\t\t\t\tsc.SetState(SCE_CSS_ID);\n\t\t\t\tbreak;\n\t\t\tcase ',':\n\t\t\tcase '|':\n\t\t\tcase '~':\n\t\t\t\tif (lastState == SCE_CSS_TAG)\n\t\t\t\t\tsc.SetState(SCE_CSS_DEFAULT);\n\t\t\t\tbreak;\n\t\t\tcase ';':\n\t\t\t\tswitch (lastState) {\n\t\t\t\tcase SCE_CSS_DIRECTIVE:\n\t\t\t\t\tif (hasNesting) {\n\t\t\t\t\t\tsc.SetState(nestingLevel > 0 ? SCE_CSS_IDENTIFIER : SCE_CSS_DEFAULT);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsc.SetState(SCE_CSS_DEFAULT);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase SCE_CSS_VALUE:\n\t\t\t\tcase SCE_CSS_IMPORTANT:\n\t\t\t\t\t// data URLs can have semicolons; simplistically check for wrapping parentheses and move along\n\t\t\t\t\tif (insideParentheses) {\n\t\t\t\t\t\tsc.SetState(lastState);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (lastStateVal == SCE_CSS_VARIABLE) {\n\t\t\t\t\t\t\tsc.SetState(SCE_CSS_DEFAULT);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsc.SetState(SCE_CSS_IDENTIFIER);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase SCE_CSS_VARIABLE:\n\t\t\t\t\tif (lastStateVar == SCE_CSS_VALUE) {\n\t\t\t\t\t\t// data URLs can have semicolons; simplistically check for wrapping parentheses and move along\n\t\t\t\t\t\tif (insideParentheses) {\n\t\t\t\t\t\t\tsc.SetState(SCE_CSS_VALUE);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsc.SetState(SCE_CSS_IDENTIFIER);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsc.SetState(SCE_CSS_DEFAULT);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase '!':\n\t\t\t\tif (lastState == SCE_CSS_VALUE)\n\t\t\t\t\tsc.SetState(SCE_CSS_IMPORTANT);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (sc.ch == '*' && sc.state == SCE_CSS_DEFAULT) {\n\t\t\tsc.SetState(SCE_CSS_TAG);\n\t\t\tcontinue;\n\t\t}\n\n\t\t// check for inside parentheses (whether part of an \"operator\" or not)\n\t\tif (sc.ch == '(')\n\t\t\tinsideParentheses = true;\n\t\telse if (sc.ch == ')')\n\t\t\tinsideParentheses = false;\n\n\t\t// SCSS special modes\n\t\tif (hasVariables) {\n\t\t\t// variable name\n\t\t\tif (sc.ch == varPrefix) {\n\t\t\t\tswitch (sc.state) {\n\t\t\t\tcase SCE_CSS_DEFAULT:\n\t\t\t\t\tif (isLessDocument) // give priority to pseudo elements\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t// Falls through.\n\t\t\t\tcase SCE_CSS_VALUE:\n\t\t\t\t\tlastStateVar = sc.state;\n\t\t\t\t\tsc.SetState(SCE_CSS_VARIABLE);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (sc.state == SCE_CSS_VARIABLE) {\n\t\t\t\tif (IsAWordChar(sc.ch)) {\n\t\t\t\t\t// still looking at the variable name\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (lastStateVar == SCE_CSS_VALUE) {\n\t\t\t\t\t// not looking at the variable name any more, and it was part of a value\n\t\t\t\t\tsc.SetState(SCE_CSS_VALUE);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// nested rule parent selector\n\t\t\tif (sc.ch == '&') {\n\t\t\t\tswitch (sc.state) {\n\t\t\t\tcase SCE_CSS_DEFAULT:\n\t\t\t\tcase SCE_CSS_IDENTIFIER:\n\t\t\t\t\tsc.SetState(SCE_CSS_TAG);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// nesting rules that apply to SCSS and Less\n\t\tif (hasNesting) {\n\t\t\t// check for nested rule selector\n\t\t\tif (sc.state == SCE_CSS_IDENTIFIER && (IsAWordChar(sc.ch) || sc.ch == ':' || sc.ch == '.' || sc.ch == '#')) {\n\t\t\t\t// look ahead to see whether { comes before next ; and }\n\t\t\t\tSci_PositionU endPos = startPos + length;\n\t\t\t\tint ch;\n\n\t\t\t\tfor (Sci_PositionU i = sc.currentPos; i < endPos; i++) {\n\t\t\t\t\tch = styler.SafeGetCharAt(i);\n\t\t\t\t\tif (ch == ';' || ch == '}')\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tif (ch == '{') {\n\t\t\t\t\t\tsc.SetState(SCE_CSS_DEFAULT);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\tif (IsAWordChar(sc.ch)) {\n\t\t\tif (sc.state == SCE_CSS_DEFAULT)\n\t\t\t\tsc.SetState(SCE_CSS_TAG);\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (IsAWordChar(sc.chPrev) && (\n\t\t\tsc.state == SCE_CSS_IDENTIFIER || sc.state == SCE_CSS_IDENTIFIER2 ||\n\t\t\tsc.state == SCE_CSS_IDENTIFIER3 || sc.state == SCE_CSS_EXTENDED_IDENTIFIER ||\n\t\t\tsc.state == SCE_CSS_UNKNOWN_IDENTIFIER ||\n\t\t\tsc.state == SCE_CSS_PSEUDOCLASS || sc.state == SCE_CSS_PSEUDOELEMENT ||\n\t\t\tsc.state == SCE_CSS_EXTENDED_PSEUDOCLASS || sc.state == SCE_CSS_EXTENDED_PSEUDOELEMENT ||\n\t\t\tsc.state == SCE_CSS_UNKNOWN_PSEUDOCLASS ||\n\t\t\tsc.state == SCE_CSS_IMPORTANT ||\n\t\t\tsc.state == SCE_CSS_DIRECTIVE\n\t\t)) {\n\t\t\tchar s[100];\n\t\t\tsc.GetCurrentLowered(s, sizeof(s));\n\t\t\tchar *s2 = s;\n\t\t\twhile (*s2 && !IsAWordChar(*s2))\n\t\t\t\ts2++;\n\t\t\tswitch (sc.state) {\n\t\t\tcase SCE_CSS_IDENTIFIER:\n\t\t\tcase SCE_CSS_IDENTIFIER2:\n\t\t\tcase SCE_CSS_IDENTIFIER3:\n\t\t\tcase SCE_CSS_EXTENDED_IDENTIFIER:\n\t\t\tcase SCE_CSS_UNKNOWN_IDENTIFIER:\n\t\t\t\tif (css1Props.InList(s2))\n\t\t\t\t\tsc.ChangeState(SCE_CSS_IDENTIFIER);\n\t\t\t\telse if (css2Props.InList(s2))\n\t\t\t\t\tsc.ChangeState(SCE_CSS_IDENTIFIER2);\n\t\t\t\telse if (css3Props.InList(s2))\n\t\t\t\t\tsc.ChangeState(SCE_CSS_IDENTIFIER3);\n\t\t\t\telse if (exProps.InList(s2))\n\t\t\t\t\tsc.ChangeState(SCE_CSS_EXTENDED_IDENTIFIER);\n\t\t\t\telse\n\t\t\t\t\tsc.ChangeState(SCE_CSS_UNKNOWN_IDENTIFIER);\n\t\t\t\tbreak;\n\t\t\tcase SCE_CSS_PSEUDOCLASS:\n\t\t\tcase SCE_CSS_PSEUDOELEMENT:\n\t\t\tcase SCE_CSS_EXTENDED_PSEUDOCLASS:\n\t\t\tcase SCE_CSS_EXTENDED_PSEUDOELEMENT:\n\t\t\tcase SCE_CSS_UNKNOWN_PSEUDOCLASS:\n\t\t\t\tif (op == ':' && opPrev != ':' && pseudoClasses.InList(s2))\n\t\t\t\t\tsc.ChangeState(SCE_CSS_PSEUDOCLASS);\n\t\t\t\telse if (opPrev == ':' && pseudoElements.InList(s2))\n\t\t\t\t\tsc.ChangeState(SCE_CSS_PSEUDOELEMENT);\n\t\t\t\telse if ((op == ':' || (op == '(' && lastState == SCE_CSS_EXTENDED_PSEUDOCLASS)) && opPrev != ':' && exPseudoClasses.InList(s2))\n\t\t\t\t\tsc.ChangeState(SCE_CSS_EXTENDED_PSEUDOCLASS);\n\t\t\t\telse if (opPrev == ':' && exPseudoElements.InList(s2))\n\t\t\t\t\tsc.ChangeState(SCE_CSS_EXTENDED_PSEUDOELEMENT);\n\t\t\t\telse\n\t\t\t\t\tsc.ChangeState(SCE_CSS_UNKNOWN_PSEUDOCLASS);\n\t\t\t\tbreak;\n\t\t\tcase SCE_CSS_IMPORTANT:\n\t\t\t\tif (strcmp(s2, \"important\") != 0)\n\t\t\t\t\tsc.ChangeState(SCE_CSS_VALUE);\n\t\t\t\tbreak;\n\t\t\tcase SCE_CSS_DIRECTIVE:\n\t\t\t\tif (op == '@' && (strcmp(s2, \"media\") == 0 || strcmp(s2, \"supports\") == 0 || strcmp(s2, \"document\") == 0 || strcmp(s2, \"-moz-document\") == 0))\n\t\t\t\t\tsc.ChangeState(SCE_CSS_GROUP_RULE);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (sc.ch != '.' && sc.ch != ':' && sc.ch != '#' && (\n\t\t\tsc.state == SCE_CSS_CLASS || sc.state == SCE_CSS_ID ||\n\t\t\t(sc.ch != '(' && sc.ch != ')' && ( /* This line of the condition makes it possible to extend pseudo-classes with parentheses */\n\t\t\t\tsc.state == SCE_CSS_PSEUDOCLASS || sc.state == SCE_CSS_PSEUDOELEMENT ||\n\t\t\t\tsc.state == SCE_CSS_EXTENDED_PSEUDOCLASS || sc.state == SCE_CSS_EXTENDED_PSEUDOELEMENT ||\n\t\t\t\tsc.state == SCE_CSS_UNKNOWN_PSEUDOCLASS\n\t\t\t))\n\t\t))\n\t\t\tsc.SetState(SCE_CSS_TAG);\n\n\t\tif (sc.Match('/', '*')) {\n\t\t\tlastStateC = sc.state;\n\t\t\tcomment_mode = eCommentBlock;\n\t\t\tsc.SetState(SCE_CSS_COMMENT);\n\t\t\tsc.Forward();\n\t\t} else if (hasSingleLineComments && sc.Match('/', '/') && !insideParentheses) {\n\t\t\t// note that we've had to treat ([...]// as the start of a URL not a comment, e.g. url(http://example.com), url(//example.com)\n\t\t\tlastStateC = sc.state;\n\t\t\tcomment_mode = eCommentLine;\n\t\t\tsc.SetState(SCE_CSS_COMMENT);\n\t\t\tsc.Forward();\n\t\t} else if ((sc.state == SCE_CSS_VALUE || sc.state == SCE_CSS_ATTRIBUTE)\n\t\t\t&& (sc.ch == '\\\"' || sc.ch == '\\'')) {\n\t\t\tlastStateS = sc.state;\n\t\t\tsc.SetState((sc.ch == '\\\"' ? SCE_CSS_DOUBLESTRING : SCE_CSS_SINGLESTRING));\n\t\t} else if (IsCssOperator(sc.ch)\n\t\t\t&& (sc.state != SCE_CSS_ATTRIBUTE || sc.ch == ']')\n\t\t\t&& (sc.state != SCE_CSS_VALUE || sc.ch == ';' || sc.ch == '}' || sc.ch == '!')\n\t\t\t&& ((sc.state != SCE_CSS_DIRECTIVE && sc.state != SCE_CSS_GROUP_RULE) || sc.ch == ';' || sc.ch == '{')\n\t\t) {\n\t\t\tif (sc.state != SCE_CSS_OPERATOR)\n\t\t\t\tlastState = sc.state;\n\t\t\tsc.SetState(SCE_CSS_OPERATOR);\n\t\t\top = sc.ch;\n\t\t\topPrev = sc.chPrev;\n\t\t}\n\t}\n\n\tsc.Complete();\n}\n\nstatic void FoldCSSDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[], Accessor &styler) {\n\tbool foldComment = styler.GetPropertyInt(\"fold.comment\") != 0;\n\tbool foldCompact = styler.GetPropertyInt(\"fold.compact\", 1) != 0;\n\tSci_PositionU endPos = startPos + length;\n\tint visibleChars = 0;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tint levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK;\n\tint levelCurrent = levelPrev;\n\tchar chNext = styler[startPos];\n\tbool inComment = (styler.StyleAt(startPos-1) == SCE_CSS_COMMENT);\n\tfor (Sci_PositionU i = startPos; i < endPos; i++) {\n\t\tchar ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\tint style = styler.StyleAt(i);\n\t\tbool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n\t\tif (foldComment) {\n\t\t\tif (!inComment && (style == SCE_CSS_COMMENT))\n\t\t\t\tlevelCurrent++;\n\t\t\telse if (inComment && (style != SCE_CSS_COMMENT))\n\t\t\t\tlevelCurrent--;\n\t\t\tinComment = (style == SCE_CSS_COMMENT);\n\t\t}\n\t\tif (style == SCE_CSS_OPERATOR) {\n\t\t\tif (ch == '{') {\n\t\t\t\tlevelCurrent++;\n\t\t\t} else if (ch == '}') {\n\t\t\t\tlevelCurrent--;\n\t\t\t}\n\t\t}\n\t\tif (atEOL) {\n\t\t\tint lev = levelPrev;\n\t\t\tif (visibleChars == 0 && foldCompact)\n\t\t\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\t\t\tif ((levelCurrent > levelPrev) && (visibleChars > 0))\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\tif (lev != styler.LevelAt(lineCurrent)) {\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\t\t\t}\n\t\t\tlineCurrent++;\n\t\t\tlevelPrev = levelCurrent;\n\t\t\tvisibleChars = 0;\n\t\t}\n\t\tif (!isspacechar(ch))\n\t\t\tvisibleChars++;\n\t}\n\t// Fill in the real level of the next line, keeping the current flags as they will be filled in later\n\tint flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK;\n\tstyler.SetLevel(lineCurrent, levelPrev | flagsNext);\n}\n\nstatic const char * const cssWordListDesc[] = {\n\t\"CSS1 Properties\",\n\t\"Pseudo-classes\",\n\t\"CSS2 Properties\",\n\t\"CSS3 Properties\",\n\t\"Pseudo-elements\",\n\t\"Browser-Specific CSS Properties\",\n\t\"Browser-Specific Pseudo-classes\",\n\t\"Browser-Specific Pseudo-elements\",\n\t0\n};\n\nLexerModule lmCss(SCLEX_CSS, ColouriseCssDoc, \"css\", FoldCSSDoc, cssWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexCaml.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexCaml.cxx\n ** Lexer for Objective Caml.\n **/\n// Copyright 2005-2009 by Robert Roessler <robertr@rftp.com>\n// The License.txt file describes the conditions under which this software may be distributed.\n/*\tRelease History\n\t20050204 Initial release.\n\t20050205 Quick compiler standards/\"cleanliness\" adjustment.\n\t20050206 Added cast for IsLeadByte().\n\t20050209 Changes to \"external\" build support.\n\t20050306 Fix for 1st-char-in-doc \"corner\" case.\n\t20050502 Fix for [harmless] one-past-the-end coloring.\n\t20050515 Refined numeric token recognition logic.\n\t20051125 Added 2nd \"optional\" keywords class.\n\t20051129 Support \"magic\" (read-only) comments for RCaml.\n\t20051204 Swtich to using StyleContext infrastructure.\n\t20090629 Add full Standard ML '97 support.\n*/\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\n#if defined(__clang__)\n#pragma clang diagnostic ignored \"-Wcomma\"\n#endif\n\n//\tSince the Microsoft __iscsym[f] funcs are not ANSI...\ninline int  iscaml(int c) {return isalnum(c) || c == '_';}\ninline int iscamlf(int c) {return isalpha(c) || c == '_';}\n\nstatic const int baseT[24] = {\n\t0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\t/* A - L */\n\t0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0,16\t/* M - X */\n};\n\nusing namespace Lexilla;\n\nstatic void ColouriseCamlDoc(\n\tSci_PositionU startPos, Sci_Position length,\n\tint initStyle,\n\tWordList *keywordlists[],\n\tAccessor &styler)\n{\n\t// initialize styler\n\tStyleContext sc(startPos, length, initStyle, styler);\n\n\tSci_PositionU chToken = 0;\n\tint chBase = 0, chLit = 0;\n\tWordList& keywords  = *keywordlists[0];\n\tWordList& keywords2 = *keywordlists[1];\n\tWordList& keywords3 = *keywordlists[2];\n\tconst bool isSML = keywords.InList(\"andalso\");\n\tconst int useMagic = styler.GetPropertyInt(\"lexer.caml.magic\", 0);\n\n\t// set up [initial] state info (terminating states that shouldn't \"bleed\")\n\tconst int state_ = sc.state & 0x0f;\n\tif (state_ <= SCE_CAML_CHAR\n\t\t|| (isSML && state_ == SCE_CAML_STRING))\n\t\tsc.state = SCE_CAML_DEFAULT;\n\tint nesting = (state_ >= SCE_CAML_COMMENT)? (state_ - SCE_CAML_COMMENT): 0;\n\n\t// foreach char in range...\n\twhile (sc.More()) {\n\t\t// set up [per-char] state info\n\t\tint state2 = -1;\t\t\t\t// (ASSUME no state change)\n\t\tSci_Position chColor = sc.currentPos - 1;// (ASSUME standard coloring range)\n\t\tbool advance = true;\t\t\t// (ASSUME scanner \"eats\" 1 char)\n\n\t\t// step state machine\n\t\tswitch (sc.state & 0x0f) {\n\t\tcase SCE_CAML_DEFAULT:\n\t\t\tchToken = sc.currentPos;\t// save [possible] token start (JIC)\n\t\t\t// it's wide open; what do we have?\n\t\t\tif (iscamlf(sc.ch))\n\t\t\t\tstate2 = SCE_CAML_IDENTIFIER;\n\t\t\telse if (!isSML && sc.Match('`') && iscamlf(sc.chNext))\n\t\t\t\tstate2 = SCE_CAML_TAGNAME;\n\t\t\telse if (!isSML && sc.Match('#') && isdigit(sc.chNext))\n\t\t\t\tstate2 = SCE_CAML_LINENUM;\n\t\t\telse if (isdigit(sc.ch)) {\n\t\t\t\t// it's a number, assume base 10\n\t\t\t\tstate2 = SCE_CAML_NUMBER, chBase = 10;\n\t\t\t\tif (sc.Match('0')) {\n\t\t\t\t\t// there MAY be a base specified...\n\t\t\t\t\tconst char* baseC = \"bBoOxX\";\n\t\t\t\t\tif (isSML) {\n\t\t\t\t\t\tif (sc.chNext == 'w')\n\t\t\t\t\t\t\tsc.Forward();\t// (consume SML \"word\" indicator)\n\t\t\t\t\t\tbaseC = \"x\";\n\t\t\t\t\t}\n\t\t\t\t\t// ... change to specified base AS REQUIRED\n\t\t\t\t\tif (strchr(baseC, sc.chNext))\n\t\t\t\t\t\tchBase = baseT[tolower(sc.chNext) - 'a'], sc.Forward();\n\t\t\t\t}\n\t\t\t} else if (!isSML && sc.Match('\\''))\t// (Caml char literal?)\n\t\t\t\tstate2 = SCE_CAML_CHAR, chLit = 0;\n\t\t\telse if (isSML && sc.Match('#', '\"'))\t// (SML char literal?)\n\t\t\t\tstate2 = SCE_CAML_CHAR, sc.Forward();\n\t\t\telse if (sc.Match('\"'))\n\t\t\t\tstate2 = SCE_CAML_STRING;\n\t\t\telse if (sc.Match('(', '*'))\n\t\t\t\tstate2 = SCE_CAML_COMMENT, sc.Forward(), sc.ch = ' '; // (*)...\n\t\t\telse if (strchr(\"!?~\"\t\t\t/* Caml \"prefix-symbol\" */\n\t\t\t\t\t\"=<>@^|&+-*/$%\"\t\t\t/* Caml \"infix-symbol\" */\n\t\t\t\t\t\"()[]{};,:.#\", sc.ch)\t// Caml \"bracket\" or ;,:.#\n\t\t\t\t\t\t\t\t\t\t\t// SML \"extra\" ident chars\n\t\t\t\t|| (isSML && (sc.Match('\\\\') || sc.Match('`'))))\n\t\t\t\tstate2 = SCE_CAML_OPERATOR;\n\t\t\tbreak;\n\n\t\tcase SCE_CAML_IDENTIFIER:\n\t\t\t// [try to] interpret as [additional] identifier char\n\t\t\tif (!(iscaml(sc.ch) || sc.Match('\\''))) {\n\t\t\t\tconst Sci_Position n = sc.currentPos - chToken;\n\t\t\t\tif (n < 24) {\n\t\t\t\t\t// length is believable as keyword, [re-]construct token\n\t\t\t\t\tchar t[24];\n\t\t\t\t\tfor (Sci_Position i = -n; i < 0; i++)\n\t\t\t\t\t\tt[n + i] = static_cast<char>(sc.GetRelative(i));\n\t\t\t\t\tt[n] = '\\0';\n\t\t\t\t\t// special-case \"_\" token as KEYWORD\n\t\t\t\t\tif ((n == 1 && sc.chPrev == '_') || keywords.InList(t))\n\t\t\t\t\t\tsc.ChangeState(SCE_CAML_KEYWORD);\n\t\t\t\t\telse if (keywords2.InList(t))\n\t\t\t\t\t\tsc.ChangeState(SCE_CAML_KEYWORD2);\n\t\t\t\t\telse if (keywords3.InList(t))\n\t\t\t\t\t\tsc.ChangeState(SCE_CAML_KEYWORD3);\n\t\t\t\t}\n\t\t\t\tstate2 = SCE_CAML_DEFAULT, advance = false;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase SCE_CAML_TAGNAME:\n\t\t\t// [try to] interpret as [additional] tagname char\n\t\t\tif (!(iscaml(sc.ch) || sc.Match('\\'')))\n\t\t\t\tstate2 = SCE_CAML_DEFAULT, advance = false;\n\t\t\tbreak;\n\n\t\t/*case SCE_CAML_KEYWORD:\n\t\tcase SCE_CAML_KEYWORD2:\n\t\tcase SCE_CAML_KEYWORD3:\n\t\t\t// [try to] interpret as [additional] keyword char\n\t\t\tif (!iscaml(ch))\n\t\t\t\tstate2 = SCE_CAML_DEFAULT, advance = false;\n\t\t\tbreak;*/\n\n\t\tcase SCE_CAML_LINENUM:\n\t\t\t// [try to] interpret as [additional] linenum directive char\n\t\t\tif (!isdigit(sc.ch))\n\t\t\t\tstate2 = SCE_CAML_DEFAULT, advance = false;\n\t\t\tbreak;\n\n\t\tcase SCE_CAML_OPERATOR: {\n\t\t\t// [try to] interpret as [additional] operator char\n\t\t\tconst char* o = 0;\n\t\t\tif (iscaml(sc.ch) || isspace(sc.ch)\t\t\t// ident or whitespace\n\t\t\t\t|| (o = strchr(\")]};,\\'\\\"#\", sc.ch),o)\t// \"termination\" chars\n\t\t\t\t|| (!isSML && sc.Match('`'))\t\t\t// Caml extra term char\n\t\t\t\t|| (!strchr(\"!$%&*+-./:<=>?@^|~\", sc.ch)// \"operator\" chars\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// SML extra ident chars\n\t\t\t\t\t&& !(isSML && (sc.Match('\\\\') || sc.Match('`'))))) {\n\t\t\t\t// check for INCLUSIVE termination\n\t\t\t\tif (o && strchr(\")]};,\", sc.ch)) {\n\t\t\t\t\tif ((sc.Match(')') && sc.chPrev == '(')\n\t\t\t\t\t\t|| (sc.Match(']') && sc.chPrev == '['))\n\t\t\t\t\t\t// special-case \"()\" and \"[]\" tokens as KEYWORDS\n\t\t\t\t\t\tsc.ChangeState(SCE_CAML_KEYWORD);\n\t\t\t\t\tchColor++;\n\t\t\t\t} else\n\t\t\t\t\tadvance = false;\n\t\t\t\tstate2 = SCE_CAML_DEFAULT;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t\tcase SCE_CAML_NUMBER:\n\t\t\t// [try to] interpret as [additional] numeric literal char\n\t\t\tif ((!isSML && sc.Match('_')) || IsADigit(sc.ch, chBase))\n\t\t\t\tbreak;\n\t\t\t// how about an integer suffix?\n\t\t\tif (!isSML && (sc.Match('l') || sc.Match('L') || sc.Match('n'))\n\t\t\t\t&& (sc.chPrev == '_' || IsADigit(sc.chPrev, chBase)))\n\t\t\t\tbreak;\n\t\t\t// or a floating-point literal?\n\t\t\tif (chBase == 10) {\n\t\t\t\t// with a decimal point?\n\t\t\t\tif (sc.Match('.')\n\t\t\t\t\t&& ((!isSML && sc.chPrev == '_')\n\t\t\t\t\t\t|| IsADigit(sc.chPrev, chBase)))\n\t\t\t\t\tbreak;\n\t\t\t\t// with an exponent? (I)\n\t\t\t\tif ((sc.Match('e') || sc.Match('E'))\n\t\t\t\t\t&& ((!isSML && (sc.chPrev == '.' || sc.chPrev == '_'))\n\t\t\t\t\t\t|| IsADigit(sc.chPrev, chBase)))\n\t\t\t\t\tbreak;\n\t\t\t\t// with an exponent? (II)\n\t\t\t\tif (((!isSML && (sc.Match('+') || sc.Match('-')))\n\t\t\t\t\t\t|| (isSML && sc.Match('~')))\n\t\t\t\t\t&& (sc.chPrev == 'e' || sc.chPrev == 'E'))\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// it looks like we have run out of number\n\t\t\tstate2 = SCE_CAML_DEFAULT, advance = false;\n\t\t\tbreak;\n\n\t\tcase SCE_CAML_CHAR:\n\t\t\tif (!isSML) {\n\t\t\t\t// [try to] interpret as [additional] char literal char\n\t\t\t\tif (sc.Match('\\\\')) {\n\t\t\t\t\tchLit = 1;\t// (definitely IS a char literal)\n\t\t\t\t\tif (sc.chPrev == '\\\\')\n\t\t\t\t\t\tsc.ch = ' ';\t// (...\\\\')\n\t\t\t\t// should we be terminating - one way or another?\n\t\t\t\t} else if ((sc.Match('\\'') && sc.chPrev != '\\\\')\n\t\t\t\t\t|| sc.atLineEnd) {\n\t\t\t\t\tstate2 = SCE_CAML_DEFAULT;\n\t\t\t\t\tif (sc.Match('\\''))\n\t\t\t\t\t\tchColor++;\n\t\t\t\t\telse\n\t\t\t\t\t\tsc.ChangeState(SCE_CAML_IDENTIFIER);\n\t\t\t\t// ... maybe a char literal, maybe not\n\t\t\t\t} else if (chLit < 1 && sc.currentPos - chToken >= 2)\n\t\t\t\t\tsc.ChangeState(SCE_CAML_IDENTIFIER), advance = false;\n\t\t\t\tbreak;\n\t\t\t}/* else\n\t\t\t\t// fall through for SML char literal (handle like string) */\n\t\t\t// Falls through.\n\n\t\tcase SCE_CAML_STRING:\n\t\t\t// [try to] interpret as [additional] [SML char/] string literal char\n\t\t\tif (isSML && sc.Match('\\\\') && sc.chPrev != '\\\\' && isspace(sc.chNext))\n\t\t\t\tstate2 = SCE_CAML_WHITE;\n\t\t\telse if (sc.Match('\\\\') && sc.chPrev == '\\\\')\n\t\t\t\tsc.ch = ' ';\t// (...\\\\\")\n\t\t\t// should we be terminating - one way or another?\n\t\t\telse if ((sc.Match('\"') && sc.chPrev != '\\\\')\n\t\t\t\t|| (isSML && sc.atLineEnd)) {\n\t\t\t\tstate2 = SCE_CAML_DEFAULT;\n\t\t\t\tif (sc.Match('\"'))\n\t\t\t\t\tchColor++;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase SCE_CAML_WHITE:\n\t\t\t// [try to] interpret as [additional] SML embedded whitespace char\n\t\t\tif (sc.Match('\\\\')) {\n\t\t\t\t// style this puppy NOW...\n\t\t\t\tstate2 = SCE_CAML_STRING, sc.ch = ' ' /* (...\\\") */, chColor++,\n\t\t\t\t\tstyler.ColourTo(chColor, SCE_CAML_WHITE), styler.Flush();\n\t\t\t\t// ... then backtrack to determine original SML literal type\n\t\t\t\tSci_Position p = chColor - 2;\n\t\t\t\tfor (; p >= 0 && styler.StyleAt(p) == SCE_CAML_WHITE; p--) ;\n\t\t\t\tif (p >= 0)\n\t\t\t\t\tstate2 = static_cast<int>(styler.StyleAt(p));\n\t\t\t\t// take care of state change NOW\n\t\t\t\tsc.ChangeState(state2), state2 = -1;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase SCE_CAML_COMMENT:\n\t\tcase SCE_CAML_COMMENT1:\n\t\tcase SCE_CAML_COMMENT2:\n\t\tcase SCE_CAML_COMMENT3:\n\t\t\t// we're IN a comment - does this start a NESTED comment?\n\t\t\tif (sc.Match('(', '*'))\n\t\t\t\tstate2 = sc.state + 1, chToken = sc.currentPos,\n\t\t\t\t\tsc.Forward(), sc.ch = ' ' /* (*)... */, nesting++;\n\t\t\t// [try to] interpret as [additional] comment char\n\t\t\telse if (sc.Match(')') && sc.chPrev == '*') {\n\t\t\t\tif (nesting)\n\t\t\t\t\tstate2 = (sc.state & 0x0f) - 1, chToken = 0, nesting--;\n\t\t\t\telse\n\t\t\t\t\tstate2 = SCE_CAML_DEFAULT;\n\t\t\t\tchColor++;\n\t\t\t// enable \"magic\" (read-only) comment AS REQUIRED\n\t\t\t} else if (useMagic && sc.currentPos - chToken == 4\n\t\t\t\t&& sc.Match('c') && sc.chPrev == 'r' && sc.GetRelative(-2) == '@')\n\t\t\t\tsc.state |= 0x10;\t// (switch to read-only comment style)\n\t\t\tbreak;\n\t\t}\n\n\t\t// handle state change and char coloring AS REQUIRED\n\t\tif (state2 >= 0)\n\t\t\tstyler.ColourTo(chColor, sc.state), sc.ChangeState(state2);\n\t\t// move to next char UNLESS re-scanning current char\n\t\tif (advance)\n\t\t\tsc.Forward();\n\t}\n\n\t// do any required terminal char coloring (JIC)\n\tsc.Complete();\n}\n\nstatic\nvoid FoldCamlDoc(\n\tSci_PositionU, Sci_Position,\n\tint,\n\tWordList *[],\n\tAccessor &)\n{\n}\n\nstatic const char * const camlWordListDesc[] = {\n\t\"Keywords\",\t\t// primary Objective Caml keywords\n\t\"Keywords2\",\t// \"optional\" keywords (typically from Pervasives)\n\t\"Keywords3\",\t// \"optional\" keywords (typically typenames)\n\t0\n};\n\nLexerModule lmCaml(SCLEX_CAML, ColouriseCamlDoc, \"caml\", FoldCamlDoc, camlWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexCmake.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexCmake.cxx\n ** Lexer for Cmake\n **/\n// Copyright 2007 by Cristian Adam <cristian [dot] adam [at] gmx [dot] net>\n// based on the NSIS lexer\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nstatic bool isCmakeNumber(char ch)\n{\n    return(ch >= '0' && ch <= '9');\n}\n\nstatic bool isCmakeChar(char ch)\n{\n    return(ch == '.' ) || (ch == '_' ) || isCmakeNumber(ch) || (ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z');\n}\n\nstatic bool isCmakeLetter(char ch)\n{\n    return(ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z');\n}\n\nstatic bool CmakeNextLineHasElse(Sci_PositionU start, Sci_PositionU end, Accessor &styler)\n{\n    Sci_Position nNextLine = -1;\n    for ( Sci_PositionU i = start; i < end; i++ ) {\n        char cNext = styler.SafeGetCharAt( i );\n        if ( cNext == '\\n' ) {\n            nNextLine = i+1;\n            break;\n        }\n    }\n\n    if ( nNextLine == -1 ) // We never foudn the next line...\n        return false;\n\n    for ( Sci_PositionU firstChar = nNextLine; firstChar < end; firstChar++ ) {\n        char cNext = styler.SafeGetCharAt( firstChar );\n        if ( cNext == ' ' )\n            continue;\n        if ( cNext == '\\t' )\n            continue;\n        if ( styler.Match(firstChar, \"ELSE\")  || styler.Match(firstChar, \"else\"))\n            return true;\n        break;\n    }\n\n    return false;\n}\n\nstatic int calculateFoldCmake(Sci_PositionU start, Sci_PositionU end, int foldlevel, Accessor &styler, bool bElse)\n{\n    // If the word is too long, it is not what we are looking for\n    if ( end - start > 20 )\n        return foldlevel;\n\n    int newFoldlevel = foldlevel;\n\n    char s[20]; // The key word we are looking for has atmost 13 characters\n    for (unsigned int i = 0; i < end - start + 1 && i < 19; i++) {\n        s[i] = static_cast<char>( styler[ start + i ] );\n        s[i + 1] = '\\0';\n    }\n\n    if ( CompareCaseInsensitive(s, \"IF\") == 0 || CompareCaseInsensitive(s, \"WHILE\") == 0\n         || CompareCaseInsensitive(s, \"MACRO\") == 0 || CompareCaseInsensitive(s, \"FOREACH\") == 0\n         || CompareCaseInsensitive(s, \"FUNCTION\") == 0)\n        newFoldlevel++;\n    else if ( CompareCaseInsensitive(s, \"ENDIF\") == 0 || CompareCaseInsensitive(s, \"ENDWHILE\") == 0\n              || CompareCaseInsensitive(s, \"ENDMACRO\") == 0 || CompareCaseInsensitive(s, \"ENDFOREACH\") == 0\n              || CompareCaseInsensitive(s, \"ENDFUNCTION\") == 0)\n        newFoldlevel--;\n    else if ( bElse && CompareCaseInsensitive(s, \"ELSEIF\") == 0 )\n        newFoldlevel++;\n    else if ( bElse && CompareCaseInsensitive(s, \"ELSE\") == 0 )\n        newFoldlevel++;\n\n    return newFoldlevel;\n}\n\nstatic int classifyWordCmake(Sci_PositionU start, Sci_PositionU end, WordList *keywordLists[], Accessor &styler )\n{\n    char word[100] = {0};\n    char lowercaseWord[100] = {0};\n\n    WordList &Commands = *keywordLists[0];\n    WordList &Parameters = *keywordLists[1];\n    WordList &UserDefined = *keywordLists[2];\n\n    for (Sci_PositionU i = 0; i < end - start + 1 && i < 99; i++) {\n        word[i] = static_cast<char>( styler[ start + i ] );\n        lowercaseWord[i] = static_cast<char>(tolower(word[i]));\n    }\n\n    // Check for special words...\n    if ( CompareCaseInsensitive(word, \"MACRO\") == 0 || CompareCaseInsensitive(word, \"ENDMACRO\") == 0 )\n        return SCE_CMAKE_MACRODEF;\n\n    if ( CompareCaseInsensitive(word, \"IF\") == 0 ||  CompareCaseInsensitive(word, \"ENDIF\") == 0 )\n        return SCE_CMAKE_IFDEFINEDEF;\n\n    if ( CompareCaseInsensitive(word, \"ELSEIF\") == 0  || CompareCaseInsensitive(word, \"ELSE\") == 0 )\n        return SCE_CMAKE_IFDEFINEDEF;\n\n    if ( CompareCaseInsensitive(word, \"WHILE\") == 0 || CompareCaseInsensitive(word, \"ENDWHILE\") == 0)\n        return SCE_CMAKE_WHILEDEF;\n\n    if ( CompareCaseInsensitive(word, \"FOREACH\") == 0 || CompareCaseInsensitive(word, \"ENDFOREACH\") == 0)\n        return SCE_CMAKE_FOREACHDEF;\n\n    if ( Commands.InList(lowercaseWord) )\n        return SCE_CMAKE_COMMANDS;\n\n    if ( Parameters.InList(word) )\n        return SCE_CMAKE_PARAMETERS;\n\n\n    if ( UserDefined.InList(word) )\n        return SCE_CMAKE_USERDEFINED;\n\n    if ( strlen(word) > 3 ) {\n        if ( word[1] == '{' && word[strlen(word)-1] == '}' )\n            return SCE_CMAKE_VARIABLE;\n    }\n\n    // To check for numbers\n    if ( isCmakeNumber( word[0] ) ) {\n        bool bHasSimpleCmakeNumber = true;\n        for (unsigned int j = 1; j < end - start + 1 && j < 99; j++) {\n            if ( !isCmakeNumber( word[j] ) ) {\n                bHasSimpleCmakeNumber = false;\n                break;\n            }\n        }\n\n        if ( bHasSimpleCmakeNumber )\n            return SCE_CMAKE_NUMBER;\n    }\n\n    return SCE_CMAKE_DEFAULT;\n}\n\nstatic void ColouriseCmakeDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *keywordLists[], Accessor &styler)\n{\n    int state = SCE_CMAKE_DEFAULT;\n    if ( startPos > 0 )\n        state = styler.StyleAt(startPos-1); // Use the style from the previous line, usually default, but could be commentbox\n\n    styler.StartAt( startPos );\n    styler.GetLine( startPos );\n\n    Sci_PositionU nLengthDoc = startPos + length;\n    styler.StartSegment( startPos );\n\n    char cCurrChar;\n    bool bVarInString = false;\n    bool bClassicVarInString = false;\n\n    Sci_PositionU i;\n    for ( i = startPos; i < nLengthDoc; i++ ) {\n        cCurrChar = styler.SafeGetCharAt( i );\n        char cNextChar = styler.SafeGetCharAt(i+1);\n\n        switch (state) {\n        case SCE_CMAKE_DEFAULT:\n            if ( cCurrChar == '#' ) { // we have a comment line\n                styler.ColourTo(i-1, state );\n                state = SCE_CMAKE_COMMENT;\n                break;\n            }\n            if ( cCurrChar == '\"' ) {\n                styler.ColourTo(i-1, state );\n                state = SCE_CMAKE_STRINGDQ;\n                bVarInString = false;\n                bClassicVarInString = false;\n                break;\n            }\n            if ( cCurrChar == '\\'' ) {\n                styler.ColourTo(i-1, state );\n                state = SCE_CMAKE_STRINGRQ;\n                bVarInString = false;\n                bClassicVarInString = false;\n                break;\n            }\n            if ( cCurrChar == '`' ) {\n                styler.ColourTo(i-1, state );\n                state = SCE_CMAKE_STRINGLQ;\n                bVarInString = false;\n                bClassicVarInString = false;\n                break;\n            }\n\n            // CMake Variable\n            if ( cCurrChar == '$' || isCmakeChar(cCurrChar)) {\n                styler.ColourTo(i-1,state);\n                state = SCE_CMAKE_VARIABLE;\n\n                // If it is a number, we must check and set style here first...\n                if ( isCmakeNumber(cCurrChar) && (cNextChar == '\\t' || cNextChar == ' ' || cNextChar == '\\r' || cNextChar == '\\n' ) )\n                    styler.ColourTo( i, SCE_CMAKE_NUMBER);\n\n                break;\n            }\n\n            break;\n        case SCE_CMAKE_COMMENT:\n            if ( cCurrChar == '\\n' || cCurrChar == '\\r' ) {\n                if ( styler.SafeGetCharAt(i-1) == '\\\\' ) {\n                    styler.ColourTo(i-2,state);\n                    styler.ColourTo(i-1,SCE_CMAKE_DEFAULT);\n                }\n                else {\n                    styler.ColourTo(i-1,state);\n                    state = SCE_CMAKE_DEFAULT;\n                }\n            }\n            break;\n        case SCE_CMAKE_STRINGDQ:\n        case SCE_CMAKE_STRINGLQ:\n        case SCE_CMAKE_STRINGRQ:\n\n            if ( styler.SafeGetCharAt(i-1) == '\\\\' && styler.SafeGetCharAt(i-2) == '$' )\n                break; // Ignore the next character, even if it is a quote of some sort\n\n            if ( cCurrChar == '\"' && state == SCE_CMAKE_STRINGDQ ) {\n                styler.ColourTo(i,state);\n                state = SCE_CMAKE_DEFAULT;\n                break;\n            }\n\n            if ( cCurrChar == '`' && state == SCE_CMAKE_STRINGLQ ) {\n                styler.ColourTo(i,state);\n                state = SCE_CMAKE_DEFAULT;\n                break;\n            }\n\n            if ( cCurrChar == '\\'' && state == SCE_CMAKE_STRINGRQ ) {\n                styler.ColourTo(i,state);\n                state = SCE_CMAKE_DEFAULT;\n                break;\n            }\n\n            if ( cNextChar == '\\r' || cNextChar == '\\n' ) {\n                Sci_Position nCurLine = styler.GetLine(i+1);\n                Sci_Position nBack = i;\n                // We need to check if the previous line has a \\ in it...\n                bool bNextLine = false;\n\n                while ( nBack > 0 ) {\n                    if ( styler.GetLine(nBack) != nCurLine )\n                        break;\n\n                    char cTemp = styler.SafeGetCharAt(nBack, 'a'); // Letter 'a' is safe here\n\n                    if ( cTemp == '\\\\' ) {\n                        bNextLine = true;\n                        break;\n                    }\n                    if ( cTemp != '\\r' && cTemp != '\\n' && cTemp != '\\t' && cTemp != ' ' )\n                        break;\n\n                    nBack--;\n                }\n\n                if ( bNextLine ) {\n                    styler.ColourTo(i+1,state);\n                }\n                if ( bNextLine == false ) {\n                    styler.ColourTo(i,state);\n                    state = SCE_CMAKE_DEFAULT;\n                }\n            }\n            break;\n\n        case SCE_CMAKE_VARIABLE:\n\n            // CMake Variable:\n            if ( cCurrChar == '$' )\n                state = SCE_CMAKE_DEFAULT;\n            else if ( cCurrChar == '\\\\' && (cNextChar == 'n' || cNextChar == 'r' || cNextChar == 't' ) )\n                state = SCE_CMAKE_DEFAULT;\n            else if ( (isCmakeChar(cCurrChar) && !isCmakeChar( cNextChar) && cNextChar != '}') || cCurrChar == '}' ) {\n                state = classifyWordCmake( styler.GetStartSegment(), i, keywordLists, styler );\n                styler.ColourTo( i, state);\n                state = SCE_CMAKE_DEFAULT;\n            }\n            else if ( !isCmakeChar( cCurrChar ) && cCurrChar != '{' && cCurrChar != '}' ) {\n                if ( classifyWordCmake( styler.GetStartSegment(), i-1, keywordLists, styler) == SCE_CMAKE_NUMBER )\n                    styler.ColourTo( i-1, SCE_CMAKE_NUMBER );\n\n                state = SCE_CMAKE_DEFAULT;\n\n                if ( cCurrChar == '\"' ) {\n                    state = SCE_CMAKE_STRINGDQ;\n                    bVarInString = false;\n                    bClassicVarInString = false;\n                }\n                else if ( cCurrChar == '`' ) {\n                    state = SCE_CMAKE_STRINGLQ;\n                    bVarInString = false;\n                    bClassicVarInString = false;\n                }\n                else if ( cCurrChar == '\\'' ) {\n                    state = SCE_CMAKE_STRINGRQ;\n                    bVarInString = false;\n                    bClassicVarInString = false;\n                }\n                else if ( cCurrChar == '#' ) {\n                    state = SCE_CMAKE_COMMENT;\n                }\n            }\n            break;\n        }\n\n        if ( state == SCE_CMAKE_STRINGDQ || state == SCE_CMAKE_STRINGLQ || state == SCE_CMAKE_STRINGRQ ) {\n            bool bIngoreNextDollarSign = false;\n\n            if ( bVarInString && cCurrChar == '$' ) {\n                bVarInString = false;\n                bIngoreNextDollarSign = true;\n            }\n            else if ( bVarInString && cCurrChar == '\\\\' && (cNextChar == 'n' || cNextChar == 'r' || cNextChar == 't' || cNextChar == '\"' || cNextChar == '`' || cNextChar == '\\'' ) ) {\n                styler.ColourTo( i+1, SCE_CMAKE_STRINGVAR);\n                bVarInString = false;\n                bIngoreNextDollarSign = false;\n            }\n\n            else if ( bVarInString && !isCmakeChar(cNextChar) ) {\n                int nWordState = classifyWordCmake( styler.GetStartSegment(), i, keywordLists, styler);\n                if ( nWordState == SCE_CMAKE_VARIABLE )\n                    styler.ColourTo( i, SCE_CMAKE_STRINGVAR);\n                bVarInString = false;\n            }\n            // Covers \"${TEST}...\"\n            else if ( bClassicVarInString && cNextChar == '}' ) {\n                styler.ColourTo( i+1, SCE_CMAKE_STRINGVAR);\n                bClassicVarInString = false;\n            }\n\n            // Start of var in string\n            if ( !bIngoreNextDollarSign && cCurrChar == '$' && cNextChar == '{' ) {\n                styler.ColourTo( i-1, state);\n                bClassicVarInString = true;\n                bVarInString = false;\n            }\n            else if ( !bIngoreNextDollarSign && cCurrChar == '$' ) {\n                styler.ColourTo( i-1, state);\n                bVarInString = true;\n                bClassicVarInString = false;\n            }\n        }\n    }\n\n    // Colourise remaining document\n    styler.ColourTo(nLengthDoc-1,state);\n}\n\nstatic void FoldCmakeDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[], Accessor &styler)\n{\n    // No folding enabled, no reason to continue...\n    if ( styler.GetPropertyInt(\"fold\") == 0 )\n        return;\n\n    bool foldAtElse = styler.GetPropertyInt(\"fold.at.else\", 0) == 1;\n\n    Sci_Position lineCurrent = styler.GetLine(startPos);\n    Sci_PositionU safeStartPos = styler.LineStart( lineCurrent );\n\n    bool bArg1 = true;\n    Sci_Position nWordStart = -1;\n\n    int levelCurrent = SC_FOLDLEVELBASE;\n    if (lineCurrent > 0)\n        levelCurrent = styler.LevelAt(lineCurrent-1) >> 16;\n    int levelNext = levelCurrent;\n\n    for (Sci_PositionU i = safeStartPos; i < startPos + length; i++) {\n        char chCurr = styler.SafeGetCharAt(i);\n\n        if ( bArg1 ) {\n            if ( nWordStart == -1 && (isCmakeLetter(chCurr)) ) {\n                nWordStart = i;\n            }\n            else if ( isCmakeLetter(chCurr) == false && nWordStart > -1 ) {\n                int newLevel = calculateFoldCmake( nWordStart, i-1, levelNext, styler, foldAtElse);\n\n                if ( newLevel == levelNext ) {\n                    if ( foldAtElse ) {\n                        if ( CmakeNextLineHasElse(i, startPos + length, styler) )\n                            levelNext--;\n                    }\n                }\n                else\n                    levelNext = newLevel;\n                bArg1 = false;\n            }\n        }\n\n        if ( chCurr == '\\n' ) {\n            if ( bArg1 && foldAtElse) {\n                if ( CmakeNextLineHasElse(i, startPos + length, styler) )\n                    levelNext--;\n            }\n\n            // If we are on a new line...\n            int levelUse = levelCurrent;\n            int lev = levelUse | levelNext << 16;\n            if (levelUse < levelNext )\n                lev |= SC_FOLDLEVELHEADERFLAG;\n            if (lev != styler.LevelAt(lineCurrent))\n                styler.SetLevel(lineCurrent, lev);\n\n            lineCurrent++;\n            levelCurrent = levelNext;\n            bArg1 = true; // New line, lets look at first argument again\n            nWordStart = -1;\n        }\n    }\n\n    int levelUse = levelCurrent;\n    int lev = levelUse | levelNext << 16;\n    if (levelUse < levelNext)\n        lev |= SC_FOLDLEVELHEADERFLAG;\n    if (lev != styler.LevelAt(lineCurrent))\n        styler.SetLevel(lineCurrent, lev);\n}\n\nstatic const char * const cmakeWordLists[] = {\n    \"Commands\",\n    \"Parameters\",\n    \"UserDefined\",\n    0,\n    0,};\n\nLexerModule lmCmake(SCLEX_CMAKE, ColouriseCmakeDoc, \"cmake\", FoldCmakeDoc, cmakeWordLists);\n"
  },
  {
    "path": "lexilla/lexers/LexCoffeeScript.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexCoffeeScript.cxx\n ** Lexer for CoffeeScript.\n **/\n// Copyright 1998-2011 by Neil Hodgson <neilh@scintilla.org>\n// Based on the Scintilla C++ Lexer\n// Written by Eric Promislow <ericp@activestate.com> in 2011 for the Komodo IDE\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include <algorithm>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nstatic bool IsSpaceEquiv(int state) {\n\treturn (state == SCE_COFFEESCRIPT_DEFAULT\n\t    || state == SCE_COFFEESCRIPT_COMMENTLINE\n\t    || state == SCE_COFFEESCRIPT_COMMENTBLOCK\n\t    || state == SCE_COFFEESCRIPT_VERBOSE_REGEX\n\t    || state == SCE_COFFEESCRIPT_VERBOSE_REGEX_COMMENT\n\t    || state == SCE_COFFEESCRIPT_WORD\n\t    || state == SCE_COFFEESCRIPT_REGEX);\n}\n\n// Store the current lexer state and brace count prior to starting a new\n// `#{}` interpolation level.\n// Based on LexRuby.cxx.\nstatic void enterInnerExpression(int  *p_inner_string_types,\n                                 int  *p_inner_expn_brace_counts,\n                                 int&  inner_string_count,\n                                 int   state,\n                                 int&  brace_counts\n                                 ) {\n\tp_inner_string_types[inner_string_count] = state;\n\tp_inner_expn_brace_counts[inner_string_count] = brace_counts;\n\tbrace_counts = 0;\n\t++inner_string_count;\n}\n\n// Restore the lexer state and brace count for the previous `#{}` interpolation\n// level upon returning to it.\n// Note the previous lexer state is the return value and needs to be restored\n// manually by the StyleContext.\n// Based on LexRuby.cxx.\nstatic int exitInnerExpression(int  *p_inner_string_types,\n                               int  *p_inner_expn_brace_counts,\n                               int&  inner_string_count,\n                               int&  brace_counts\n                              ) {\n\t--inner_string_count;\n\tbrace_counts = p_inner_expn_brace_counts[inner_string_count];\n\treturn p_inner_string_types[inner_string_count];\n}\n\n// Preconditions: sc.currentPos points to a character after '+' or '-'.\n// The test for pos reaching 0 should be redundant,\n// and is in only for safety measures.\n// Limitation: this code will give the incorrect answer for code like\n// a = b+++/ptn/...\n// Putting a space between the '++' post-inc operator and the '+' binary op\n// fixes this, and is highly recommended for readability anyway.\nstatic bool FollowsPostfixOperator(StyleContext &sc, Accessor &styler) {\n\tSci_Position pos = (Sci_Position) sc.currentPos;\n\twhile (--pos > 0) {\n\t\tchar ch = styler[pos];\n\t\tif (ch == '+' || ch == '-') {\n\t\t\treturn styler[pos - 1] == ch;\n\t\t}\n\t}\n\treturn false;\n}\n\nstatic bool followsKeyword(StyleContext &sc, Accessor &styler) {\n\tSci_Position pos = (Sci_Position) sc.currentPos;\n\tSci_Position currentLine = styler.GetLine(pos);\n\tSci_Position lineStartPos = styler.LineStart(currentLine);\n\twhile (--pos > lineStartPos) {\n\t\tchar ch = styler.SafeGetCharAt(pos);\n\t\tif (ch != ' ' && ch != '\\t') {\n\t\t\tbreak;\n\t\t}\n\t}\n\tstyler.Flush();\n\treturn styler.StyleAt(pos) == SCE_COFFEESCRIPT_WORD;\n}\n\n#if defined(__clang__)\n#if __has_warning(\"-Wunused-but-set-variable\")\n// Disable warning for visibleChars\n#pragma clang diagnostic ignored \"-Wunused-but-set-variable\"\n#endif\n#endif\n\nstatic void ColouriseCoffeeScriptDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[],\n                            Accessor &styler) {\n\n\tWordList &keywords = *keywordlists[0];\n\tWordList &keywords2 = *keywordlists[1];\n\tWordList &keywords4 = *keywordlists[3];\n\n\tCharacterSet setOKBeforeRE(CharacterSet::setNone, \"([{=,:;!%^&*|?~+-\");\n\tCharacterSet setCouldBePostOp(CharacterSet::setNone, \"+-\");\n\n\tCharacterSet setWordStart(CharacterSet::setAlpha, \"_$@\", 0x80, true);\n\tCharacterSet setWord(CharacterSet::setAlphaNum, \"._$\", 0x80, true);\n\n\tint chPrevNonWhite = ' ';\n\tint visibleChars = 0;\n\n\t// String/Regex interpolation variables, based on LexRuby.cxx.\n\t// In most cases a value of 2 should be ample for the code the user is\n\t// likely to enter. For example,\n\t//   \"Filling the #{container} with #{liquid}...\"\n\t// from the CoffeeScript homepage nests to a level of 2\n\t// If the user actually hits a 6th occurrence of '#{' in a double-quoted\n\t// string (including regexes), it will stay as a string.  The problem with\n\t// this is that quotes might flip, a 7th '#{' will look like a comment,\n\t// and code-folding might be wrong.\n#define INNER_STRINGS_MAX_COUNT 5\n\t// These vars track our instances of \"...#{,,,'..#{,,,}...',,,}...\"\n\tint inner_string_types[INNER_STRINGS_MAX_COUNT];\n\t// Track # braces when we push a new #{ thing\n\tint inner_expn_brace_counts[INNER_STRINGS_MAX_COUNT];\n\tint inner_string_count = 0;\n\tint brace_counts = 0;   // Number of #{ ... } things within an expression\n\tfor (int i = 0; i < INNER_STRINGS_MAX_COUNT; i++) {\n\t\tinner_string_types[i] = 0;\n\t\tinner_expn_brace_counts[i] = 0;\n\t}\n\n\t// look back to set chPrevNonWhite properly for better regex colouring\n\tSci_Position endPos = startPos + length;\n        if (startPos > 0 && IsSpaceEquiv(initStyle)) {\n\t\tSci_PositionU back = startPos;\n\t\tstyler.Flush();\n\t\twhile (back > 0 && IsSpaceEquiv(styler.StyleAt(--back)))\n\t\t\t;\n\t\tif (styler.StyleAt(back) == SCE_COFFEESCRIPT_OPERATOR) {\n\t\t\tchPrevNonWhite = styler.SafeGetCharAt(back);\n\t\t}\n\t\tif (startPos != back) {\n\t\t\tinitStyle = styler.StyleAt(back);\n\t\t\tif (IsSpaceEquiv(initStyle)) {\n\t\t\t\tinitStyle = SCE_COFFEESCRIPT_DEFAULT;\n\t\t\t}\n\t\t}\n\t\tstartPos = back;\n\t}\n\n\tStyleContext sc(startPos, endPos - startPos, initStyle, styler);\n\n\tfor (; sc.More();) {\n\n\t\tif (sc.atLineStart) {\n\t\t\t// Reset states to beginning of colourise so no surprises\n\t\t\t// if different sets of lines lexed.\n\t\t\tvisibleChars = 0;\n\t\t}\n\n\t\t// Determine if the current state should terminate.\n\t\tswitch (sc.state) {\n\t\t\tcase SCE_COFFEESCRIPT_OPERATOR:\n\t\t\t\tsc.SetState(SCE_COFFEESCRIPT_DEFAULT);\n\t\t\t\tbreak;\n\t\t\tcase SCE_COFFEESCRIPT_NUMBER:\n\t\t\t\t// We accept almost anything because of hex. and number suffixes\n\t\t\t\tif (!setWord.Contains(sc.ch) || sc.Match('.', '.')) {\n\t\t\t\t\tsc.SetState(SCE_COFFEESCRIPT_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_COFFEESCRIPT_IDENTIFIER:\n\t\t\t\tif (!setWord.Contains(sc.ch) || (sc.ch == '.') || (sc.ch == '$')) {\n\t\t\t\t\tchar s[1000];\n\t\t\t\t\tsc.GetCurrent(s, sizeof(s));\n\t\t\t\t\tif (keywords.InList(s)) {\n\t\t\t\t\t\tsc.ChangeState(SCE_COFFEESCRIPT_WORD);\n\t\t\t\t\t} else if (keywords2.InList(s)) {\n\t\t\t\t\t\tsc.ChangeState(SCE_COFFEESCRIPT_WORD2);\n\t\t\t\t\t} else if (keywords4.InList(s)) {\n\t\t\t\t\t\tsc.ChangeState(SCE_COFFEESCRIPT_GLOBALCLASS);\n\t\t\t\t\t} else if (sc.LengthCurrent() > 0 && s[0] == '@') {\n\t\t\t\t\t\tsc.ChangeState(SCE_COFFEESCRIPT_INSTANCEPROPERTY);\n\t\t\t\t\t}\n\t\t\t\t\tsc.SetState(SCE_COFFEESCRIPT_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_COFFEESCRIPT_WORD:\n\t\t\tcase SCE_COFFEESCRIPT_WORD2:\n\t\t\tcase SCE_COFFEESCRIPT_GLOBALCLASS:\n\t\t\tcase SCE_COFFEESCRIPT_INSTANCEPROPERTY:\n\t\t\t\tif (!setWord.Contains(sc.ch)) {\n\t\t\t\t\tsc.SetState(SCE_COFFEESCRIPT_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_COFFEESCRIPT_COMMENTLINE:\n\t\t\t\tif (sc.atLineStart) {\n\t\t\t\t\tsc.SetState(SCE_COFFEESCRIPT_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_COFFEESCRIPT_STRING:\n\t\t\t\tif (sc.ch == '\\\\') {\n\t\t\t\t\tif (sc.chNext == '\\\"' || sc.chNext == '\\'' || sc.chNext == '\\\\') {\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t}\n\t\t\t\t} else if (sc.ch == '\\\"') {\n\t\t\t\t\tsc.ForwardSetState(SCE_COFFEESCRIPT_DEFAULT);\n\t\t\t\t} else if (sc.ch == '#' && sc.chNext == '{' && inner_string_count < INNER_STRINGS_MAX_COUNT) {\n\t\t\t\t\t// process interpolated code #{ ... }\n\t\t\t\t\tenterInnerExpression(inner_string_types,\n\t\t\t\t\t                     inner_expn_brace_counts,\n\t\t\t\t\t                     inner_string_count,\n\t\t\t\t\t                     sc.state,\n\t\t\t\t\t                     brace_counts);\n\t\t\t\t\tsc.SetState(SCE_COFFEESCRIPT_OPERATOR);\n\t\t\t\t\tsc.ForwardSetState(SCE_COFFEESCRIPT_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_COFFEESCRIPT_CHARACTER:\n\t\t\t\tif (sc.ch == '\\\\') {\n\t\t\t\t\tif (sc.chNext == '\\\"' || sc.chNext == '\\'' || sc.chNext == '\\\\') {\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t}\n\t\t\t\t} else if (sc.ch == '\\'') {\n\t\t\t\t\tsc.ForwardSetState(SCE_COFFEESCRIPT_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_COFFEESCRIPT_REGEX:\n\t\t\t\tif (sc.atLineStart) {\n\t\t\t\t\tsc.SetState(SCE_COFFEESCRIPT_DEFAULT);\n\t\t\t\t} else if (sc.ch == '/') {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\twhile ((sc.ch < 0x80) && islower(sc.ch))\n\t\t\t\t\t\tsc.Forward();    // gobble regex flags\n\t\t\t\t\tsc.SetState(SCE_COFFEESCRIPT_DEFAULT);\n\t\t\t\t} else if (sc.ch == '\\\\') {\n\t\t\t\t\t// Gobble up the quoted character\n\t\t\t\t\tif (sc.chNext == '\\\\' || sc.chNext == '/') {\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_COFFEESCRIPT_STRINGEOL:\n\t\t\t\tif (sc.atLineStart) {\n\t\t\t\t\tsc.SetState(SCE_COFFEESCRIPT_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_COFFEESCRIPT_COMMENTBLOCK:\n\t\t\t\tif (sc.Match(\"###\")) {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\tsc.ForwardSetState(SCE_COFFEESCRIPT_DEFAULT);\n\t\t\t\t} else if (sc.ch == '\\\\') {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_COFFEESCRIPT_VERBOSE_REGEX:\n\t\t\t\tif (sc.Match(\"///\")) {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\tsc.ForwardSetState(SCE_COFFEESCRIPT_DEFAULT);\n\t\t\t\t} else if (sc.Match('#')) {\n\t\t\t\t\tsc.SetState(SCE_COFFEESCRIPT_VERBOSE_REGEX_COMMENT);\n\t\t\t\t} else if (sc.ch == '\\\\') {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_COFFEESCRIPT_VERBOSE_REGEX_COMMENT:\n\t\t\t\tif (sc.atLineStart) {\n\t\t\t\t\tsc.SetState(SCE_COFFEESCRIPT_VERBOSE_REGEX);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// Determine if a new state should be entered.\n\t\tif (sc.state == SCE_COFFEESCRIPT_DEFAULT) {\n\t\t\tif (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) {\n\t\t\t\tsc.SetState(SCE_COFFEESCRIPT_NUMBER);\n\t\t\t} else if (setWordStart.Contains(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_COFFEESCRIPT_IDENTIFIER);\n\t\t\t} else if (sc.Match(\"///\")) {\n\t\t\t\tsc.SetState(SCE_COFFEESCRIPT_VERBOSE_REGEX);\n\t\t\t\tsc.Forward();\n\t\t\t\tsc.Forward();\n\t\t\t} else if (sc.ch == '/'\n\t\t\t\t   && (setOKBeforeRE.Contains(chPrevNonWhite)\n\t\t\t\t       || followsKeyword(sc, styler))\n\t\t\t\t   && (!setCouldBePostOp.Contains(chPrevNonWhite)\n\t\t\t\t       || !FollowsPostfixOperator(sc, styler))) {\n\t\t\t\tsc.SetState(SCE_COFFEESCRIPT_REGEX);\t// JavaScript's RegEx\n\t\t\t} else if (sc.ch == '\\\"') {\n\t\t\t\tsc.SetState(SCE_COFFEESCRIPT_STRING);\n\t\t\t} else if (sc.ch == '\\'') {\n\t\t\t\tsc.SetState(SCE_COFFEESCRIPT_CHARACTER);\n\t\t\t} else if (sc.ch == '#') {\n\t\t\t\tif (sc.Match(\"###\")) {\n\t\t\t\t\tsc.SetState(SCE_COFFEESCRIPT_COMMENTBLOCK);\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\tsc.Forward();\n\t\t\t\t} else {\n\t\t\t\t\tsc.SetState(SCE_COFFEESCRIPT_COMMENTLINE);\n\t\t\t\t}\n\t\t\t} else if (isoperator(static_cast<char>(sc.ch))) {\n\t\t\t\tsc.SetState(SCE_COFFEESCRIPT_OPERATOR);\n\t\t\t\t// Handle '..' and '...' operators correctly.\n\t\t\t\tif (sc.ch == '.') {\n\t\t\t\t\tfor (int i = 0; i < 2 && sc.chNext == '.'; i++, sc.Forward()) ;\n\t\t\t\t} else if (sc.ch == '{') {\n\t\t\t\t\t++brace_counts;\n\t\t\t\t} else if (sc.ch == '}' && --brace_counts <= 0 && inner_string_count > 0) {\n\t\t\t\t\t// Return to previous state before #{ ... }\n\t\t\t\t\tsc.ForwardSetState(exitInnerExpression(inner_string_types,\n\t\t\t\t\t                                       inner_expn_brace_counts,\n\t\t\t\t\t                                       inner_string_count,\n\t\t\t\t\t                                       brace_counts));\n\t\t\t\t\tcontinue; // skip sc.Forward() at loop end\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (!IsASpace(sc.ch) && !IsSpaceEquiv(sc.state)) {\n\t\t\tchPrevNonWhite = sc.ch;\n\t\t\tvisibleChars++;\n\t\t}\n\t\tsc.Forward();\n\t}\n\tsc.Complete();\n}\n\nstatic bool IsCommentLine(Sci_Position line, Accessor &styler) {\n\tSci_Position pos = styler.LineStart(line);\n\tSci_Position eol_pos = styler.LineStart(line + 1) - 1;\n\tfor (Sci_Position i = pos; i < eol_pos; i++) {\n\t\tchar ch = styler[i];\n\t\tif (ch == '#')\n\t\t\treturn true;\n\t\telse if (ch != ' ' && ch != '\\t')\n\t\t\treturn false;\n\t}\n\treturn false;\n}\n\nstatic void FoldCoffeeScriptDoc(Sci_PositionU startPos, Sci_Position length, int,\n\t\t\t\tWordList *[], Accessor &styler) {\n\t// A simplified version of FoldPyDoc\n\tconst Sci_Position maxPos = startPos + length;\n\tconst Sci_Position maxLines = styler.GetLine(maxPos - 1);             // Requested last line\n\tconst Sci_Position docLines = styler.GetLine(styler.Length() - 1);  // Available last line\n\n\t// property fold.coffeescript.comment\n\t// Set to 1 to allow folding of comment blocks in CoffeeScript.\n\tconst bool foldComment = styler.GetPropertyInt(\"fold.coffeescript.comment\") != 0;\n\n\tconst bool foldCompact = styler.GetPropertyInt(\"fold.compact\") != 0;\n\n\t// Backtrack to previous non-blank line so we can determine indent level\n\t// for any white space lines\n\t// and so we can fix any preceding fold level (which is why we go back\n\t// at least one line in all cases)\n\tint spaceFlags = 0;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tint indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags, NULL);\n\twhile (lineCurrent > 0) {\n\t\tlineCurrent--;\n\t\tindentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags, NULL);\n\t\tif (!(indentCurrent & SC_FOLDLEVELWHITEFLAG)\n\t\t    && !IsCommentLine(lineCurrent, styler))\n\t\t\tbreak;\n\t}\n\tint indentCurrentLevel = indentCurrent & SC_FOLDLEVELNUMBERMASK;\n\n\t// Set up initial loop state\n\tint prevComment = 0;\n\tif (lineCurrent >= 1)\n\t\tprevComment = foldComment && IsCommentLine(lineCurrent - 1, styler);\n\n\t// Process all characters to end of requested range\n\t// or comment that hangs over the end of the range.  Cap processing in all cases\n\t// to end of document (in case of comment at end).\n\twhile ((lineCurrent <= docLines) && ((lineCurrent <= maxLines) || prevComment)) {\n\n\t\t// Gather info\n\t\tint lev = indentCurrent;\n\t\tSci_Position lineNext = lineCurrent + 1;\n\t\tint indentNext = indentCurrent;\n\t\tif (lineNext <= docLines) {\n\t\t\t// Information about next line is only available if not at end of document\n\t\t\tindentNext = styler.IndentAmount(lineNext, &spaceFlags, NULL);\n\t\t}\n\t\tconst int comment = foldComment && IsCommentLine(lineCurrent, styler);\n\t\tconst int comment_start = (comment && !prevComment && (lineNext <= docLines) &&\n\t\t                           IsCommentLine(lineNext, styler) && (lev > SC_FOLDLEVELBASE));\n\t\tconst int comment_continue = (comment && prevComment);\n\t\tif (!comment)\n\t\t\tindentCurrentLevel = indentCurrent & SC_FOLDLEVELNUMBERMASK;\n\t\tif (indentNext & SC_FOLDLEVELWHITEFLAG)\n\t\t\tindentNext = SC_FOLDLEVELWHITEFLAG | indentCurrentLevel;\n\n\t\tif (comment_start) {\n\t\t\t// Place fold point at start of a block of comments\n\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t} else if (comment_continue) {\n\t\t\t// Add level to rest of lines in the block\n\t\t\tlev = lev + 1;\n\t\t}\n\n\t\t// Skip past any blank lines for next indent level info; we skip also\n\t\t// comments (all comments, not just those starting in column 0)\n\t\t// which effectively folds them into surrounding code rather\n\t\t// than screwing up folding.\n\n\t\twhile ((lineNext < docLines) &&\n\t\t        ((indentNext & SC_FOLDLEVELWHITEFLAG) ||\n\t\t         (lineNext <= docLines && IsCommentLine(lineNext, styler)))) {\n\n\t\t\tlineNext++;\n\t\t\tindentNext = styler.IndentAmount(lineNext, &spaceFlags, NULL);\n\t\t}\n\n\t\tconst int levelAfterComments = indentNext & SC_FOLDLEVELNUMBERMASK;\n\t\tconst int levelBeforeComments = std::max(indentCurrentLevel,levelAfterComments);\n\n\t\t// Now set all the indent levels on the lines we skipped\n\t\t// Do this from end to start.  Once we encounter one line\n\t\t// which is indented more than the line after the end of\n\t\t// the comment-block, use the level of the block before\n\n\t\tSci_Position skipLine = lineNext;\n\t\tint skipLevel = levelAfterComments;\n\n\t\twhile (--skipLine > lineCurrent) {\n\t\t\tint skipLineIndent = styler.IndentAmount(skipLine, &spaceFlags, NULL);\n\n\t\t\tif (foldCompact) {\n\t\t\t\tif ((skipLineIndent & SC_FOLDLEVELNUMBERMASK) > levelAfterComments)\n\t\t\t\t\tskipLevel = levelBeforeComments;\n\n\t\t\t\tint whiteFlag = skipLineIndent & SC_FOLDLEVELWHITEFLAG;\n\n\t\t\t\tstyler.SetLevel(skipLine, skipLevel | whiteFlag);\n\t\t\t} else {\n\t\t\t\tif ((skipLineIndent & SC_FOLDLEVELNUMBERMASK) > levelAfterComments &&\n\t\t\t\t\t!(skipLineIndent & SC_FOLDLEVELWHITEFLAG) &&\n\t\t\t\t\t!IsCommentLine(skipLine, styler))\n\t\t\t\t\tskipLevel = levelBeforeComments;\n\n\t\t\t\tstyler.SetLevel(skipLine, skipLevel);\n\t\t\t}\n\t\t}\n\n\t\t// Set fold header on non-comment line\n\t\tif (!comment && !(indentCurrent & SC_FOLDLEVELWHITEFLAG)) {\n\t\t\tif ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext & SC_FOLDLEVELNUMBERMASK))\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t}\n\n\t\t// Keep track of block comment state of previous line\n\t\tprevComment = comment_start || comment_continue;\n\n\t\t// Set fold level for this line and move to next line\n\t\tstyler.SetLevel(lineCurrent, lev);\n\t\tindentCurrent = indentNext;\n\t\tlineCurrent = lineNext;\n\t}\n}\n\nstatic const char *const csWordLists[] = {\n            \"Keywords\",\n            \"Secondary keywords\",\n            \"Unused\",\n            \"Global classes\",\n            0,\n};\n\nLexerModule lmCoffeeScript(SCLEX_COFFEESCRIPT, ColouriseCoffeeScriptDoc, \"coffeescript\", FoldCoffeeScriptDoc, csWordLists);\n"
  },
  {
    "path": "lexilla/lexers/LexConf.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexConf.cxx\n ** Lexer for Apache Configuration Files.\n **\n ** First working version contributed by Ahmad Zawawi <ahmad.zawawi@gmail.com> on October 28, 2000.\n ** i created this lexer because i needed something pretty when dealing\n ** when Apache Configuration files...\n **/\n// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nstatic void ColouriseConfDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *keywordLists[], Accessor &styler)\n{\n\tint state = SCE_CONF_DEFAULT;\n\tchar chNext = styler[startPos];\n\tSci_Position lengthDoc = startPos + length;\n\t// create a buffer large enough to take the largest chunk...\n\tchar *buffer = new char[length+1];\n\tSci_Position bufferCount = 0;\n\n\t// this assumes that we have 2 keyword list in conf.properties\n\tWordList &directives = *keywordLists[0];\n\tWordList &params = *keywordLists[1];\n\n\t// go through all provided text segment\n\t// using the hand-written state machine shown below\n\tstyler.StartAt(startPos);\n\tstyler.StartSegment(startPos);\n\tfor (Sci_Position i = startPos; i < lengthDoc; i++) {\n\t\tchar ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\n\t\tif (styler.IsLeadByte(ch)) {\n\t\t\tchNext = styler.SafeGetCharAt(i + 2);\n\t\t\ti++;\n\t\t\tcontinue;\n\t\t}\n\t\tswitch(state) {\n\t\t\tcase SCE_CONF_DEFAULT:\n\t\t\t\tif( ch == '\\n' || ch == '\\r' || ch == '\\t' || ch == ' ') {\n\t\t\t\t\t// whitespace is simply ignored here...\n\t\t\t\t\tstyler.ColourTo(i,SCE_CONF_DEFAULT);\n\t\t\t\t\tbreak;\n\t\t\t\t} else if( ch == '#' ) {\n\t\t\t\t\t// signals the start of a comment...\n\t\t\t\t\tstate = SCE_CONF_COMMENT;\n\t\t\t\t\tstyler.ColourTo(i,SCE_CONF_COMMENT);\n\t\t\t\t} else if( ch == '.' /*|| ch == '/'*/) {\n\t\t\t\t\t// signals the start of a file...\n\t\t\t\t\tstate = SCE_CONF_EXTENSION;\n\t\t\t\t\tstyler.ColourTo(i,SCE_CONF_EXTENSION);\n\t\t\t\t} else if( ch == '\"') {\n\t\t\t\t\tstate = SCE_CONF_STRING;\n\t\t\t\t\tstyler.ColourTo(i,SCE_CONF_STRING);\n\t\t\t\t} else if( IsASCII(ch) && ispunct(ch) ) {\n\t\t\t\t\t// signals an operator...\n\t\t\t\t\t// no state jump necessary for this\n\t\t\t\t\t// simple case...\n\t\t\t\t\tstyler.ColourTo(i,SCE_CONF_OPERATOR);\n\t\t\t\t} else if( IsASCII(ch) && isalpha(ch) ) {\n\t\t\t\t\t// signals the start of an identifier\n\t\t\t\t\tbufferCount = 0;\n\t\t\t\t\tbuffer[bufferCount++] = static_cast<char>(tolower(ch));\n\t\t\t\t\tstate = SCE_CONF_IDENTIFIER;\n\t\t\t\t} else if( IsASCII(ch) && isdigit(ch) ) {\n\t\t\t\t\t// signals the start of a number\n\t\t\t\t\tbufferCount = 0;\n\t\t\t\t\tbuffer[bufferCount++] = ch;\n\t\t\t\t\t//styler.ColourTo(i,SCE_CONF_NUMBER);\n\t\t\t\t\tstate = SCE_CONF_NUMBER;\n\t\t\t\t} else {\n\t\t\t\t\t// style it the default style..\n\t\t\t\t\tstyler.ColourTo(i,SCE_CONF_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_CONF_COMMENT:\n\t\t\t\t// if we find a newline here,\n\t\t\t\t// we simply go to default state\n\t\t\t\t// else continue to work on it...\n\t\t\t\tif( ch == '\\n' || ch == '\\r' ) {\n\t\t\t\t\tstate = SCE_CONF_DEFAULT;\n\t\t\t\t} else {\n\t\t\t\t\tstyler.ColourTo(i,SCE_CONF_COMMENT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_CONF_EXTENSION:\n\t\t\t\t// if we find a non-alphanumeric char,\n\t\t\t\t// we simply go to default state\n\t\t\t\t// else we're still dealing with an extension...\n\t\t\t\tif( (IsASCII(ch) && isalnum(ch)) || (ch == '_') ||\n\t\t\t\t\t(ch == '-') || (ch == '$') ||\n\t\t\t\t\t(ch == '/') || (ch == '.') || (ch == '*') )\n\t\t\t\t{\n\t\t\t\t\tstyler.ColourTo(i,SCE_CONF_EXTENSION);\n\t\t\t\t} else {\n\t\t\t\t\tstate = SCE_CONF_DEFAULT;\n\t\t\t\t\tchNext = styler[i--];\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_CONF_STRING:\n\t\t\t\t// if we find the end of a string char, we simply go to default state\n\t\t\t\t// else we're still dealing with an string...\n\t\t\t\tif( (ch == '\"' && styler.SafeGetCharAt(i-1)!='\\\\') || (ch == '\\n') || (ch == '\\r') ) {\n\t\t\t\t\tstate = SCE_CONF_DEFAULT;\n\t\t\t\t}\n\t\t\t\tstyler.ColourTo(i,SCE_CONF_STRING);\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_CONF_IDENTIFIER:\n\t\t\t\t// stay  in CONF_IDENTIFIER state until we find a non-alphanumeric\n\t\t\t\tif( (IsASCII(ch) && isalnum(ch)) || (ch == '_') || (ch == '-') || (ch == '/') || (ch == '$') || (ch == '.') || (ch == '*')) {\n\t\t\t\t\tbuffer[bufferCount++] = static_cast<char>(tolower(ch));\n\t\t\t\t} else {\n\t\t\t\t\tstate = SCE_CONF_DEFAULT;\n\t\t\t\t\tbuffer[bufferCount] = '\\0';\n\n\t\t\t\t\t// check if the buffer contains a keyword, and highlight it if it is a keyword...\n\t\t\t\t\tif(directives.InList(buffer)) {\n\t\t\t\t\t\tstyler.ColourTo(i-1,SCE_CONF_DIRECTIVE );\n\t\t\t\t\t} else if(params.InList(buffer)) {\n\t\t\t\t\t\tstyler.ColourTo(i-1,SCE_CONF_PARAMETER );\n\t\t\t\t\t} else if(strchr(buffer,'/') || strchr(buffer,'.')) {\n\t\t\t\t\t\tstyler.ColourTo(i-1,SCE_CONF_EXTENSION);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstyler.ColourTo(i-1,SCE_CONF_DEFAULT);\n\t\t\t\t\t}\n\n\t\t\t\t\t// push back the faulty character\n\t\t\t\t\tchNext = styler[i--];\n\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_CONF_NUMBER:\n\t\t\t\t// stay  in CONF_NUMBER state until we find a non-numeric\n\t\t\t\tif( (IsASCII(ch) && isdigit(ch)) || ch == '.') {\n\t\t\t\t\tbuffer[bufferCount++] = ch;\n\t\t\t\t} else {\n\t\t\t\t\tstate = SCE_CONF_DEFAULT;\n\t\t\t\t\tbuffer[bufferCount] = '\\0';\n\n\t\t\t\t\t// Colourize here...\n\t\t\t\t\tif( strchr(buffer,'.') ) {\n\t\t\t\t\t\t// it is an IP address...\n\t\t\t\t\t\tstyler.ColourTo(i-1,SCE_CONF_IP);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// normal number\n\t\t\t\t\t\tstyler.ColourTo(i-1,SCE_CONF_NUMBER);\n\t\t\t\t\t}\n\n\t\t\t\t\t// push back a character\n\t\t\t\t\tchNext = styler[i--];\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t}\n\t}\n\tdelete []buffer;\n}\n\nstatic const char * const confWordListDesc[] = {\n\t\"Directives\",\n\t\"Parameters\",\n\t0\n};\n\nLexerModule lmConf(SCLEX_CONF, ColouriseConfDoc, \"conf\", 0, confWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexCrontab.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexCrontab.cxx\n ** Lexer to use with extended crontab files used by a powerful\n ** Windows scheduler/event monitor/automation manager nnCron.\n ** (http://nemtsev.eserv.ru/)\n **/\n// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nstatic void ColouriseNncrontabDoc(Sci_PositionU startPos, Sci_Position length, int, WordList\n*keywordLists[], Accessor &styler)\n{\n\tint state = SCE_NNCRONTAB_DEFAULT;\n\tchar chNext = styler[startPos];\n\tSci_Position lengthDoc = startPos + length;\n\t// create a buffer large enough to take the largest chunk...\n\tchar *buffer = new char[length+1];\n\tSci_Position bufferCount = 0;\n\t// used when highliting environment variables inside quoted string:\n\tbool insideString = false;\n\n\t// this assumes that we have 3 keyword list in conf.properties\n\tWordList &section = *keywordLists[0];\n\tWordList &keyword = *keywordLists[1];\n\tWordList &modifier = *keywordLists[2];\n\n\t// go through all provided text segment\n\t// using the hand-written state machine shown below\n\tstyler.StartAt(startPos);\n\tstyler.StartSegment(startPos);\n\tfor (Sci_Position i = startPos; i < lengthDoc; i++) {\n\t\tchar ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\n\t\tif (styler.IsLeadByte(ch)) {\n\t\t\tchNext = styler.SafeGetCharAt(i + 2);\n\t\t\ti++;\n\t\t\tcontinue;\n\t\t}\n\t\tswitch(state) {\n\t\t\tcase SCE_NNCRONTAB_DEFAULT:\n\t\t\t\tif( ch == '\\n' || ch == '\\r' || ch == '\\t' || ch == ' ') {\n\t\t\t\t\t// whitespace is simply ignored here...\n\t\t\t\t\tstyler.ColourTo(i,SCE_NNCRONTAB_DEFAULT);\n\t\t\t\t\tbreak;\n\t\t\t\t} else if( ch == '#' && styler.SafeGetCharAt(i+1) == '(') {\n\t\t\t\t\t// signals the start of a task...\n\t\t\t\t\tstate = SCE_NNCRONTAB_TASK;\n\t\t\t\t\tstyler.ColourTo(i,SCE_NNCRONTAB_TASK);\n\t\t\t\t}\n\t\t\t\t  else if( ch == '\\\\' && (styler.SafeGetCharAt(i+1) == ' ' ||\n\t\t\t\t\t\t\t\t\t\t styler.SafeGetCharAt(i+1) == '\\t')) {\n\t\t\t\t\t// signals the start of an extended comment...\n\t\t\t\t\tstate = SCE_NNCRONTAB_COMMENT;\n\t\t\t\t\tstyler.ColourTo(i,SCE_NNCRONTAB_COMMENT);\n\t\t\t\t} else if( ch == '#' ) {\n\t\t\t\t\t// signals the start of a plain comment...\n\t\t\t\t\tstate = SCE_NNCRONTAB_COMMENT;\n\t\t\t\t\tstyler.ColourTo(i,SCE_NNCRONTAB_COMMENT);\n\t\t\t\t} else if( ch == ')' && styler.SafeGetCharAt(i+1) == '#') {\n\t\t\t\t\t// signals the end of a task...\n\t\t\t\t\tstate = SCE_NNCRONTAB_TASK;\n\t\t\t\t\tstyler.ColourTo(i,SCE_NNCRONTAB_TASK);\n\t\t\t\t} else if( ch == '\"') {\n\t\t\t\t\tstate = SCE_NNCRONTAB_STRING;\n\t\t\t\t\tstyler.ColourTo(i,SCE_NNCRONTAB_STRING);\n\t\t\t\t} else if( ch == '%') {\n\t\t\t\t\t// signals environment variables\n\t\t\t\t\tstate = SCE_NNCRONTAB_ENVIRONMENT;\n\t\t\t\t\tstyler.ColourTo(i,SCE_NNCRONTAB_ENVIRONMENT);\n\t\t\t\t} else if( ch == '<' && styler.SafeGetCharAt(i+1) == '%') {\n\t\t\t\t\t// signals environment variables\n\t\t\t\t\tstate = SCE_NNCRONTAB_ENVIRONMENT;\n\t\t\t\t\tstyler.ColourTo(i,SCE_NNCRONTAB_ENVIRONMENT);\n\t\t\t\t} else if( ch == '*' ) {\n\t\t\t\t\t// signals an asterisk\n\t\t\t\t\t// no state jump necessary for this simple case...\n\t\t\t\t\tstyler.ColourTo(i,SCE_NNCRONTAB_ASTERISK);\n\t\t\t\t} else if( (IsASCII(ch) && isalpha(ch)) || ch == '<' ) {\n\t\t\t\t\t// signals the start of an identifier\n\t\t\t\t\tbufferCount = 0;\n\t\t\t\t\tbuffer[bufferCount++] = ch;\n\t\t\t\t\tstate = SCE_NNCRONTAB_IDENTIFIER;\n\t\t\t\t} else if( IsASCII(ch) && isdigit(ch) ) {\n\t\t\t\t\t// signals the start of a number\n\t\t\t\t\tbufferCount = 0;\n\t\t\t\t\tbuffer[bufferCount++] = ch;\n\t\t\t\t\tstate = SCE_NNCRONTAB_NUMBER;\n\t\t\t\t} else {\n\t\t\t\t\t// style it the default style..\n\t\t\t\t\tstyler.ColourTo(i,SCE_NNCRONTAB_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_NNCRONTAB_COMMENT:\n\t\t\t\t// if we find a newline here,\n\t\t\t\t// we simply go to default state\n\t\t\t\t// else continue to work on it...\n\t\t\t\tif( ch == '\\n' || ch == '\\r' ) {\n\t\t\t\t\tstate = SCE_NNCRONTAB_DEFAULT;\n\t\t\t\t} else {\n\t\t\t\t\tstyler.ColourTo(i,SCE_NNCRONTAB_COMMENT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_NNCRONTAB_TASK:\n\t\t\t\t// if we find a newline here,\n\t\t\t\t// we simply go to default state\n\t\t\t\t// else continue to work on it...\n\t\t\t\tif( ch == '\\n' || ch == '\\r' ) {\n\t\t\t\t\tstate = SCE_NNCRONTAB_DEFAULT;\n\t\t\t\t} else {\n\t\t\t\t\tstyler.ColourTo(i,SCE_NNCRONTAB_TASK);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_NNCRONTAB_STRING:\n\t\t\t\tif( ch == '%' ) {\n\t\t\t\t\tstate = SCE_NNCRONTAB_ENVIRONMENT;\n\t\t\t\t\tinsideString = true;\n\t\t\t\t\tstyler.ColourTo(i-1,SCE_NNCRONTAB_STRING);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t// if we find the end of a string char, we simply go to default state\n\t\t\t\t// else we're still dealing with an string...\n\t\t\t\tif( (ch == '\"' && styler.SafeGetCharAt(i-1)!='\\\\') ||\n\t\t\t\t\t(ch == '\\n') || (ch == '\\r') ) {\n\t\t\t\t\tstate = SCE_NNCRONTAB_DEFAULT;\n\t\t\t\t}\n\t\t\t\tstyler.ColourTo(i,SCE_NNCRONTAB_STRING);\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_NNCRONTAB_ENVIRONMENT:\n\t\t\t\t// if we find the end of a string char, we simply go to default state\n\t\t\t\t// else we're still dealing with an string...\n\t\t\t\tif( ch == '%' && insideString ) {\n\t\t\t\t\tstate = SCE_NNCRONTAB_STRING;\n\t\t\t\t\tinsideString = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif( (ch == '%' && styler.SafeGetCharAt(i-1)!='\\\\')\n\t\t\t\t\t|| (ch == '\\n') || (ch == '\\r') || (ch == '>') ) {\n\t\t\t\t\tstate = SCE_NNCRONTAB_DEFAULT;\n\t\t\t\t\tstyler.ColourTo(i,SCE_NNCRONTAB_ENVIRONMENT);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tstyler.ColourTo(i+1,SCE_NNCRONTAB_ENVIRONMENT);\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_NNCRONTAB_IDENTIFIER:\n\t\t\t\t// stay  in CONF_IDENTIFIER state until we find a non-alphanumeric\n\t\t\t\tif( (IsASCII(ch) && isalnum(ch)) || (ch == '_') || (ch == '-') || (ch == '/') ||\n\t\t\t\t\t(ch == '$') || (ch == '.') || (ch == '<') || (ch == '>') ||\n\t\t\t\t\t(ch == '@') ) {\n\t\t\t\t\tbuffer[bufferCount++] = ch;\n\t\t\t\t} else {\n\t\t\t\t\tstate = SCE_NNCRONTAB_DEFAULT;\n\t\t\t\t\tbuffer[bufferCount] = '\\0';\n\n\t\t\t\t\t// check if the buffer contains a keyword,\n\t\t\t\t\t// and highlight it if it is a keyword...\n\t\t\t\t\tif(section.InList(buffer)) {\n\t\t\t\t\t\tstyler.ColourTo(i,SCE_NNCRONTAB_SECTION );\n\t\t\t\t\t} else if(keyword.InList(buffer)) {\n\t\t\t\t\t\tstyler.ColourTo(i-1,SCE_NNCRONTAB_KEYWORD );\n\t\t\t\t\t} // else if(strchr(buffer,'/') || strchr(buffer,'.')) {\n\t\t\t\t\t//\tstyler.ColourTo(i-1,SCE_NNCRONTAB_EXTENSION);\n\t\t\t\t\t// }\n\t\t\t\t\t  else if(modifier.InList(buffer)) {\n\t\t\t\t\t\tstyler.ColourTo(i-1,SCE_NNCRONTAB_MODIFIER );\n\t\t\t\t\t  }\telse {\n\t\t\t\t\t\tstyler.ColourTo(i-1,SCE_NNCRONTAB_DEFAULT);\n\t\t\t\t\t}\n\t\t\t\t\t// push back the faulty character\n\t\t\t\t\tchNext = styler[i--];\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_NNCRONTAB_NUMBER:\n\t\t\t\t// stay  in CONF_NUMBER state until we find a non-numeric\n\t\t\t\tif( IsASCII(ch) && isdigit(ch) /* || ch == '.' */ ) {\n\t\t\t\t\tbuffer[bufferCount++] = ch;\n\t\t\t\t} else {\n\t\t\t\t\tstate = SCE_NNCRONTAB_DEFAULT;\n\t\t\t\t\tbuffer[bufferCount] = '\\0';\n\t\t\t\t\t// Colourize here... (normal number)\n\t\t\t\t\tstyler.ColourTo(i-1,SCE_NNCRONTAB_NUMBER);\n\t\t\t\t\t// push back a character\n\t\t\t\t\tchNext = styler[i--];\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}\n\tdelete []buffer;\n}\n\nstatic const char * const cronWordListDesc[] = {\n\t\"Section keywords and Forth words\",\n\t\"nnCrontab keywords\",\n\t\"Modifiers\",\n\t0\n};\n\nLexerModule lmNncrontab(SCLEX_NNCRONTAB, ColouriseNncrontabDoc, \"nncrontab\", 0, cronWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexCsound.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexCsound.cxx\n ** Lexer for Csound (Orchestra & Score)\n ** Written by Georg Ritter - <ritterfuture A T gmail D O T com>\n **/\n// Copyright 1998-2003 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nstatic inline bool IsAWordChar(const int ch) {\n\treturn (ch < 0x80) && (isalnum(ch) || ch == '.' ||\n\t\tch == '_' || ch == '?');\n}\n\nstatic inline bool IsAWordStart(const int ch) {\n\treturn (ch < 0x80) && (isalnum(ch) || ch == '_' || ch == '.' ||\n\t\tch == '%' || ch == '@' || ch == '$' || ch == '?');\n}\n\nstatic inline bool IsCsoundOperator(char ch) {\n\tif (IsASCII(ch) && isalnum(ch))\n\t\treturn false;\n\t// '.' left out as it is used to make up numbers\n\tif (ch == '*' || ch == '/' || ch == '-' || ch == '+' ||\n\t\tch == '(' || ch == ')' || ch == '=' || ch == '^' ||\n\t\tch == '[' || ch == ']' || ch == '<' || ch == '&' ||\n\t\tch == '>' || ch == ',' || ch == '|' || ch == '~' ||\n\t\tch == '%' || ch == ':')\n\t\treturn true;\n\treturn false;\n}\n\nstatic void ColouriseCsoundDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[],\n\t\t\t\tAccessor &styler) {\n\n\tWordList &opcode = *keywordlists[0];\n\tWordList &headerStmt = *keywordlists[1];\n\tWordList &otherKeyword = *keywordlists[2];\n\n\t// Do not leak onto next line\n\tif (initStyle == SCE_CSOUND_STRINGEOL)\n\t\tinitStyle = SCE_CSOUND_DEFAULT;\n\n\tStyleContext sc(startPos, length, initStyle, styler);\n\n\tfor (; sc.More(); sc.Forward())\n\t{\n\t\t// Handle line continuation generically.\n\t\tif (sc.ch == '\\\\') {\n\t\t\tif (sc.chNext == '\\n' || sc.chNext == '\\r') {\n\t\t\t\tsc.Forward();\n\t\t\t\tif (sc.ch == '\\r' && sc.chNext == '\\n') {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\t// Determine if the current state should terminate.\n\t\tif (sc.state == SCE_CSOUND_OPERATOR) {\n\t\t\tif (!IsCsoundOperator(static_cast<char>(sc.ch))) {\n\t\t\t    sc.SetState(SCE_CSOUND_DEFAULT);\n\t\t\t}\n\t\t}else if (sc.state == SCE_CSOUND_NUMBER) {\n\t\t\tif (!IsAWordChar(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_CSOUND_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_CSOUND_IDENTIFIER) {\n\t\t\tif (!IsAWordChar(sc.ch) ) {\n\t\t\t\tchar s[100];\n\t\t\t\tsc.GetCurrent(s, sizeof(s));\n\n\t\t\t\tif (opcode.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_CSOUND_OPCODE);\n\t\t\t\t} else if (headerStmt.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_CSOUND_HEADERSTMT);\n\t\t\t\t} else if (otherKeyword.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_CSOUND_USERKEYWORD);\n\t\t\t\t} else if (s[0] == 'p') {\n\t\t\t\t\tsc.ChangeState(SCE_CSOUND_PARAM);\n\t\t\t\t} else if (s[0] == 'a') {\n\t\t\t\t\tsc.ChangeState(SCE_CSOUND_ARATE_VAR);\n\t\t\t\t} else if (s[0] == 'k') {\n\t\t\t\t\tsc.ChangeState(SCE_CSOUND_KRATE_VAR);\n\t\t\t\t} else if (s[0] == 'i') { // covers both i-rate variables and i-statements\n\t\t\t\t\tsc.ChangeState(SCE_CSOUND_IRATE_VAR);\n\t\t\t\t} else if (s[0] == 'g') {\n\t\t\t\t\tsc.ChangeState(SCE_CSOUND_GLOBAL_VAR);\n\t\t\t\t}\n\t\t\t\tsc.SetState(SCE_CSOUND_DEFAULT);\n\t\t\t}\n\t\t}\n\t\telse if (sc.state == SCE_CSOUND_COMMENT ) {\n\t\t\tif (sc.atLineEnd) {\n\t\t\t\tsc.SetState(SCE_CSOUND_DEFAULT);\n\t\t\t}\n\t\t}\n\t\telse if ((sc.state == SCE_CSOUND_ARATE_VAR) ||\n\t\t\t(sc.state == SCE_CSOUND_KRATE_VAR) ||\n\t\t(sc.state == SCE_CSOUND_IRATE_VAR)) {\n\t\t\tif (!IsAWordChar(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_CSOUND_DEFAULT);\n\t\t\t}\n\t\t}\n\n\t\t// Determine if a new state should be entered.\n\t\tif (sc.state == SCE_CSOUND_DEFAULT) {\n\t\t\tif (sc.ch == ';'){\n\t\t\t\tsc.SetState(SCE_CSOUND_COMMENT);\n\t\t\t} else if (isdigit(sc.ch) || (sc.ch == '.' && isdigit(sc.chNext))) {\n\t\t\t\tsc.SetState(SCE_CSOUND_NUMBER);\n\t\t\t} else if (IsAWordStart(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_CSOUND_IDENTIFIER);\n\t\t\t} else if (IsCsoundOperator(static_cast<char>(sc.ch))) {\n\t\t\t\tsc.SetState(SCE_CSOUND_OPERATOR);\n\t\t\t} else if (sc.ch == 'p') {\n\t\t\t\tsc.SetState(SCE_CSOUND_PARAM);\n\t\t\t} else if (sc.ch == 'a') {\n\t\t\t\tsc.SetState(SCE_CSOUND_ARATE_VAR);\n\t\t\t} else if (sc.ch == 'k') {\n\t\t\t\tsc.SetState(SCE_CSOUND_KRATE_VAR);\n\t\t\t} else if (sc.ch == 'i') { // covers both i-rate variables and i-statements\n\t\t\t\tsc.SetState(SCE_CSOUND_IRATE_VAR);\n\t\t\t} else if (sc.ch == 'g') {\n\t\t\t\tsc.SetState(SCE_CSOUND_GLOBAL_VAR);\n\t\t\t}\n\t\t}\n\t}\n\tsc.Complete();\n}\n\nstatic void FoldCsoundInstruments(Sci_PositionU startPos, Sci_Position length, int /* initStyle */, WordList *[],\n\t\tAccessor &styler) {\n\tSci_PositionU lengthDoc = startPos + length;\n\tint visibleChars = 0;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tint levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK;\n\tint levelCurrent = levelPrev;\n\tchar chNext = styler[startPos];\n\tint stylePrev = 0;\n\tint styleNext = styler.StyleAt(startPos);\n\tfor (Sci_PositionU i = startPos; i < lengthDoc; i++) {\n\t\tchar ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\tint style = styleNext;\n\t\tstyleNext = styler.StyleAt(i + 1);\n\t\tbool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n\t\tif ((stylePrev != SCE_CSOUND_OPCODE) && (style == SCE_CSOUND_OPCODE)) {\n\t\t\tchar s[20];\n\t\t\tunsigned int j = 0;\n\t\t\twhile ((j < (sizeof(s) - 1)) && (iswordchar(styler[i + j]))) {\n\t\t\t\ts[j] = styler[i + j];\n\t\t\t\tj++;\n\t\t\t}\n\t\t\ts[j] = '\\0';\n\n\t\t\tif (strcmp(s, \"instr\") == 0)\n\t\t\t\tlevelCurrent++;\n\t\t\tif (strcmp(s, \"endin\") == 0)\n\t\t\t\tlevelCurrent--;\n\t\t}\n\n\t\tif (atEOL) {\n\t\t\tint lev = levelPrev;\n\t\t\tif (visibleChars == 0)\n\t\t\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\t\t\tif ((levelCurrent > levelPrev) && (visibleChars > 0))\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\tif (lev != styler.LevelAt(lineCurrent)) {\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\t\t\t}\n\t\t\tlineCurrent++;\n\t\t\tlevelPrev = levelCurrent;\n\t\t\tvisibleChars = 0;\n\t\t}\n\t\tif (!isspacechar(ch))\n\t\t\tvisibleChars++;\n\t\tstylePrev = style;\n\t}\n\t// Fill in the real level of the next line, keeping the current flags as they will be filled in later\n\tint flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK;\n\tstyler.SetLevel(lineCurrent, levelPrev | flagsNext);\n}\n\n\nstatic const char * const csoundWordListDesc[] = {\n\t\"Opcodes\",\n\t\"Header Statements\",\n\t\"User keywords\",\n\t0\n};\n\nLexerModule lmCsound(SCLEX_CSOUND, ColouriseCsoundDoc, \"csound\", FoldCsoundInstruments, csoundWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexD.cxx",
    "content": "/** @file LexD.cxx\n ** Lexer for D.\n **\n ** Copyright (c) 2006 by Waldemar Augustyn <waldemar@wdmsys.com>\n ** Converted to lexer object and added further folding features/properties by \"Udo Lechner\" <dlchnr(at)gmx(dot)net>\n **/\n// Copyright 1998-2005 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n#include <map>\n#include <functional>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n#include \"OptionSet.h\"\n#include \"DefaultLexer.h\"\n\nusing namespace Scintilla;\nusing namespace Lexilla;\n\n/* Nested comments require keeping the value of the nesting level for every\n   position in the document.  But since scintilla always styles line by line,\n   we only need to store one value per line. The non-negative number indicates\n   nesting level at the end of the line.\n*/\n\n// Underscore, letter, digit and universal alphas from C99 Appendix D.\n\nstatic bool IsWordStart(int ch) {\n\treturn (IsASCII(ch) && (isalpha(ch) || ch == '_')) || !IsASCII(ch);\n}\n\nstatic bool IsWord(int ch) {\n\treturn (IsASCII(ch) && (isalnum(ch) || ch == '_')) || !IsASCII(ch);\n}\n\nstatic bool IsDoxygen(int ch) {\n\tif (IsASCII(ch) && islower(ch))\n\t\treturn true;\n\tif (ch == '$' || ch == '@' || ch == '\\\\' ||\n\t\tch == '&' || ch == '#' || ch == '<' || ch == '>' ||\n\t\tch == '{' || ch == '}' || ch == '[' || ch == ']')\n\t\treturn true;\n\treturn false;\n}\n\nstatic bool IsStringSuffix(int ch) {\n\treturn ch == 'c' || ch == 'w' || ch == 'd';\n}\n\nstatic bool IsStreamCommentStyle(int style) {\n\treturn style == SCE_D_COMMENT ||\n\t\tstyle == SCE_D_COMMENTDOC ||\n\t\tstyle == SCE_D_COMMENTDOCKEYWORD ||\n\t\tstyle == SCE_D_COMMENTDOCKEYWORDERROR;\n}\n\n// An individual named option for use in an OptionSet\n\n// Options used for LexerD\nstruct OptionsD {\n\tbool fold;\n\tbool foldSyntaxBased;\n\tbool foldComment;\n\tbool foldCommentMultiline;\n\tbool foldCommentExplicit;\n\tstd::string foldExplicitStart;\n\tstd::string foldExplicitEnd;\n\tbool foldExplicitAnywhere;\n\tbool foldCompact;\n\tint  foldAtElseInt;\n\tbool foldAtElse;\n\tOptionsD() {\n\t\tfold = false;\n\t\tfoldSyntaxBased = true;\n\t\tfoldComment = false;\n\t\tfoldCommentMultiline = true;\n\t\tfoldCommentExplicit = true;\n\t\tfoldExplicitStart = \"\";\n\t\tfoldExplicitEnd   = \"\";\n\t\tfoldExplicitAnywhere = false;\n\t\tfoldCompact = true;\n\t\tfoldAtElseInt = -1;\n\t\tfoldAtElse = false;\n\t}\n};\n\nstatic const char * const dWordLists[] = {\n\t\t\t\"Primary keywords and identifiers\",\n\t\t\t\"Secondary keywords and identifiers\",\n\t\t\t\"Documentation comment keywords\",\n\t\t\t\"Type definitions and aliases\",\n\t\t\t\"Keywords 5\",\n\t\t\t\"Keywords 6\",\n\t\t\t\"Keywords 7\",\n\t\t\t0,\n\t\t};\n\nstruct OptionSetD : public OptionSet<OptionsD> {\n\tOptionSetD() {\n\t\tDefineProperty(\"fold\", &OptionsD::fold);\n\n\t\tDefineProperty(\"fold.d.syntax.based\", &OptionsD::foldSyntaxBased,\n\t\t\t\"Set this property to 0 to disable syntax based folding.\");\n\n\t\tDefineProperty(\"fold.comment\", &OptionsD::foldComment);\n\n\t\tDefineProperty(\"fold.d.comment.multiline\", &OptionsD::foldCommentMultiline,\n\t\t\t\"Set this property to 0 to disable folding multi-line comments when fold.comment=1.\");\n\n\t\tDefineProperty(\"fold.d.comment.explicit\", &OptionsD::foldCommentExplicit,\n\t\t\t\"Set this property to 0 to disable folding explicit fold points when fold.comment=1.\");\n\n\t\tDefineProperty(\"fold.d.explicit.start\", &OptionsD::foldExplicitStart,\n\t\t\t\"The string to use for explicit fold start points, replacing the standard //{.\");\n\n\t\tDefineProperty(\"fold.d.explicit.end\", &OptionsD::foldExplicitEnd,\n\t\t\t\"The string to use for explicit fold end points, replacing the standard //}.\");\n\n\t\tDefineProperty(\"fold.d.explicit.anywhere\", &OptionsD::foldExplicitAnywhere,\n\t\t\t\"Set this property to 1 to enable explicit fold points anywhere, not just in line comments.\");\n\n\t\tDefineProperty(\"fold.compact\", &OptionsD::foldCompact);\n\n\t\tDefineProperty(\"lexer.d.fold.at.else\", &OptionsD::foldAtElseInt,\n\t\t\t\"This option enables D folding on a \\\"} else {\\\" line of an if statement.\");\n\n\t\tDefineProperty(\"fold.at.else\", &OptionsD::foldAtElse);\n\n\t\tDefineWordListSets(dWordLists);\n\t}\n};\n\nclass LexerD : public DefaultLexer {\n\tbool caseSensitive;\n\tWordList keywords;\n\tWordList keywords2;\n\tWordList keywords3;\n\tWordList keywords4;\n\tWordList keywords5;\n\tWordList keywords6;\n\tWordList keywords7;\n\tOptionsD options;\n\tOptionSetD osD;\npublic:\n\tLexerD(bool caseSensitive_) :\n\t\tDefaultLexer(\"D\", SCLEX_D),\n\t\tcaseSensitive(caseSensitive_) {\n\t}\n\tvirtual ~LexerD() {\n\t}\n\tvoid SCI_METHOD Release() override {\n\t\tdelete this;\n\t}\n\tint SCI_METHOD Version() const override {\n\t\treturn lvRelease5;\n\t}\n\tconst char * SCI_METHOD PropertyNames() override {\n\t\treturn osD.PropertyNames();\n\t}\n\tint SCI_METHOD PropertyType(const char *name) override {\n\t\treturn osD.PropertyType(name);\n\t}\n\tconst char * SCI_METHOD DescribeProperty(const char *name) override {\n\t\treturn osD.DescribeProperty(name);\n\t}\n\tSci_Position SCI_METHOD PropertySet(const char *key, const char *val) override;\n\tconst char * SCI_METHOD PropertyGet(const char *key) override {\n\t\treturn osD.PropertyGet(key);\n\t}\n\tconst char * SCI_METHOD DescribeWordListSets() override {\n\t\treturn osD.DescribeWordListSets();\n\t}\n\tSci_Position SCI_METHOD WordListSet(int n, const char *wl) override;\n\tvoid SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;\n\tvoid SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;\n\n\tvoid * SCI_METHOD PrivateCall(int, void *) override {\n\t\treturn 0;\n\t}\n\n\tstatic ILexer5 *LexerFactoryD() {\n\t\treturn new LexerD(true);\n\t}\n};\n\nSci_Position SCI_METHOD LexerD::PropertySet(const char *key, const char *val) {\n\tif (osD.PropertySet(&options, key, val)) {\n\t\treturn 0;\n\t}\n\treturn -1;\n}\n\nSci_Position SCI_METHOD LexerD::WordListSet(int n, const char *wl) {\n\tWordList *wordListN = 0;\n\tswitch (n) {\n\tcase 0:\n\t\twordListN = &keywords;\n\t\tbreak;\n\tcase 1:\n\t\twordListN = &keywords2;\n\t\tbreak;\n\tcase 2:\n\t\twordListN = &keywords3;\n\t\tbreak;\n\tcase 3:\n\t\twordListN = &keywords4;\n\t\tbreak;\n\tcase 4:\n\t\twordListN = &keywords5;\n\t\tbreak;\n\tcase 5:\n\t\twordListN = &keywords6;\n\t\tbreak;\n\tcase 6:\n\t\twordListN = &keywords7;\n\t\tbreak;\n\t}\n\tSci_Position firstModification = -1;\n\tif (wordListN) {\n\t\tWordList wlNew;\n\t\twlNew.Set(wl);\n\t\tif (*wordListN != wlNew) {\n\t\t\twordListN->Set(wl);\n\t\t\tfirstModification = 0;\n\t\t}\n\t}\n\treturn firstModification;\n}\n\nvoid SCI_METHOD LexerD::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) {\n\tLexAccessor styler(pAccess);\n\n\tint styleBeforeDCKeyword = SCE_D_DEFAULT;\n\n\tStyleContext sc(startPos, length, initStyle, styler);\n\n\tSci_Position curLine = styler.GetLine(startPos);\n\tint curNcLevel = curLine > 0? styler.GetLineState(curLine-1): 0;\n\tbool numFloat = false; // Float literals have '+' and '-' signs\n\tbool numHex = false;\n\n\tfor (; sc.More(); sc.Forward()) {\n\n\t\tif (sc.atLineStart) {\n\t\t\tcurLine = styler.GetLine(sc.currentPos);\n\t\t\tstyler.SetLineState(curLine, curNcLevel);\n\t\t}\n\n\t\t// Determine if the current state should terminate.\n\t\tswitch (sc.state) {\n\t\t\tcase SCE_D_OPERATOR:\n\t\t\t\tsc.SetState(SCE_D_DEFAULT);\n\t\t\t\tbreak;\n\t\t\tcase SCE_D_NUMBER:\n\t\t\t\t// We accept almost anything because of hex. and number suffixes\n\t\t\t\tif (IsASCII(sc.ch) && (isalnum(sc.ch) || sc.ch == '_')) {\n\t\t\t\t\tcontinue;\n\t\t\t\t} else if (sc.ch == '.' && sc.chNext != '.' && !numFloat) {\n\t\t\t\t\t// Don't parse 0..2 as number.\n\t\t\t\t\tnumFloat=true;\n\t\t\t\t\tcontinue;\n\t\t\t\t} else if ( ( sc.ch == '-' || sc.ch == '+' ) && (\t\t/*sign and*/\n\t\t\t\t\t( !numHex && ( sc.chPrev == 'e' || sc.chPrev == 'E' ) ) || /*decimal or*/\n\t\t\t\t\t( sc.chPrev == 'p' || sc.chPrev == 'P' ) ) ) {\t\t/*hex*/\n\t\t\t\t\t// Parse exponent sign in float literals: 2e+10 0x2e+10\n\t\t\t\t\tcontinue;\n\t\t\t\t} else {\n\t\t\t\t\tsc.SetState(SCE_D_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_D_IDENTIFIER:\n\t\t\t\tif (!IsWord(sc.ch)) {\n\t\t\t\t\tchar s[1000];\n\t\t\t\t\tif (caseSensitive) {\n\t\t\t\t\t\tsc.GetCurrent(s, sizeof(s));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsc.GetCurrentLowered(s, sizeof(s));\n\t\t\t\t\t}\n\t\t\t\t\tif (keywords.InList(s)) {\n\t\t\t\t\t\tsc.ChangeState(SCE_D_WORD);\n\t\t\t\t\t} else if (keywords2.InList(s)) {\n\t\t\t\t\t\tsc.ChangeState(SCE_D_WORD2);\n\t\t\t\t\t} else if (keywords4.InList(s)) {\n\t\t\t\t\t\tsc.ChangeState(SCE_D_TYPEDEF);\n\t\t\t\t\t} else if (keywords5.InList(s)) {\n\t\t\t\t\t\tsc.ChangeState(SCE_D_WORD5);\n\t\t\t\t\t} else if (keywords6.InList(s)) {\n\t\t\t\t\t\tsc.ChangeState(SCE_D_WORD6);\n\t\t\t\t\t} else if (keywords7.InList(s)) {\n\t\t\t\t\t\tsc.ChangeState(SCE_D_WORD7);\n\t\t\t\t\t}\n\t\t\t\t\tsc.SetState(SCE_D_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_D_COMMENT:\n\t\t\t\tif (sc.Match('*', '/')) {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\tsc.ForwardSetState(SCE_D_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_D_COMMENTDOC:\n\t\t\t\tif (sc.Match('*', '/')) {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\tsc.ForwardSetState(SCE_D_DEFAULT);\n\t\t\t\t} else if (sc.ch == '@' || sc.ch == '\\\\') { // JavaDoc and Doxygen support\n\t\t\t\t\t// Verify that we have the conditions to mark a comment-doc-keyword\n\t\t\t\t\tif ((IsASpace(sc.chPrev) || sc.chPrev == '*') && (!IsASpace(sc.chNext))) {\n\t\t\t\t\t\tstyleBeforeDCKeyword = SCE_D_COMMENTDOC;\n\t\t\t\t\t\tsc.SetState(SCE_D_COMMENTDOCKEYWORD);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_D_COMMENTLINE:\n\t\t\t\tif (sc.atLineStart) {\n\t\t\t\t\tsc.SetState(SCE_D_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_D_COMMENTLINEDOC:\n\t\t\t\tif (sc.atLineStart) {\n\t\t\t\t\tsc.SetState(SCE_D_DEFAULT);\n\t\t\t\t} else if (sc.ch == '@' || sc.ch == '\\\\') { // JavaDoc and Doxygen support\n\t\t\t\t\t// Verify that we have the conditions to mark a comment-doc-keyword\n\t\t\t\t\tif ((IsASpace(sc.chPrev) || sc.chPrev == '/' || sc.chPrev == '!') && (!IsASpace(sc.chNext))) {\n\t\t\t\t\t\tstyleBeforeDCKeyword = SCE_D_COMMENTLINEDOC;\n\t\t\t\t\t\tsc.SetState(SCE_D_COMMENTDOCKEYWORD);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_D_COMMENTDOCKEYWORD:\n\t\t\t\tif ((styleBeforeDCKeyword == SCE_D_COMMENTDOC) && sc.Match('*', '/')) {\n\t\t\t\t\tsc.ChangeState(SCE_D_COMMENTDOCKEYWORDERROR);\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\tsc.ForwardSetState(SCE_D_DEFAULT);\n\t\t\t\t} else if (!IsDoxygen(sc.ch)) {\n\t\t\t\t\tchar s[100];\n\t\t\t\t\tif (caseSensitive) {\n\t\t\t\t\t\tsc.GetCurrent(s, sizeof(s));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsc.GetCurrentLowered(s, sizeof(s));\n\t\t\t\t\t}\n\t\t\t\t\tif (!IsASpace(sc.ch) || !keywords3.InList(s + 1)) {\n\t\t\t\t\t\tsc.ChangeState(SCE_D_COMMENTDOCKEYWORDERROR);\n\t\t\t\t\t}\n\t\t\t\t\tsc.SetState(styleBeforeDCKeyword);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_D_COMMENTNESTED:\n\t\t\t\tif (sc.Match('+', '/')) {\n\t\t\t\t\tif (curNcLevel > 0)\n\t\t\t\t\t\tcurNcLevel -= 1;\n\t\t\t\t\tcurLine = styler.GetLine(sc.currentPos);\n\t\t\t\t\tstyler.SetLineState(curLine, curNcLevel);\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\tif (curNcLevel == 0) {\n\t\t\t\t\t\tsc.ForwardSetState(SCE_D_DEFAULT);\n\t\t\t\t\t}\n\t\t\t\t} else if (sc.Match('/','+')) {\n\t\t\t\t\tcurNcLevel += 1;\n\t\t\t\t\tcurLine = styler.GetLine(sc.currentPos);\n\t\t\t\t\tstyler.SetLineState(curLine, curNcLevel);\n\t\t\t\t\tsc.Forward();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_D_STRING:\n\t\t\t\tif (sc.ch == '\\\\') {\n\t\t\t\t\tif (sc.chNext == '\"' || sc.chNext == '\\\\') {\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t}\n\t\t\t\t} else if (sc.ch == '\"') {\n\t\t\t\t\tif(IsStringSuffix(sc.chNext))\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\tsc.ForwardSetState(SCE_D_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_D_CHARACTER:\n\t\t\t\tif (sc.atLineEnd) {\n\t\t\t\t\tsc.ChangeState(SCE_D_STRINGEOL);\n\t\t\t\t} else if (sc.ch == '\\\\') {\n\t\t\t\t\tif (sc.chNext == '\\'' || sc.chNext == '\\\\') {\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t}\n\t\t\t\t} else if (sc.ch == '\\'') {\n\t\t\t\t\t// Char has no suffixes\n\t\t\t\t\tsc.ForwardSetState(SCE_D_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_D_STRINGEOL:\n\t\t\t\tif (sc.atLineStart) {\n\t\t\t\t\tsc.SetState(SCE_D_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_D_STRINGB:\n\t\t\t\tif (sc.ch == '`') {\n\t\t\t\t\tif(IsStringSuffix(sc.chNext))\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\tsc.ForwardSetState(SCE_D_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_D_STRINGR:\n\t\t\t\tif (sc.ch == '\"') {\n\t\t\t\t\tif(IsStringSuffix(sc.chNext))\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\tsc.ForwardSetState(SCE_D_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// Determine if a new state should be entered.\n\t\tif (sc.state == SCE_D_DEFAULT) {\n\t\t\tif (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) {\n\t\t\t\tsc.SetState(SCE_D_NUMBER);\n\t\t\t\tnumFloat = sc.ch == '.';\n\t\t\t\t// Remember hex literal\n\t\t\t\tnumHex = sc.ch == '0' && ( sc.chNext == 'x' || sc.chNext == 'X' );\n\t\t\t} else if ( (sc.ch == 'r' || sc.ch == 'x' || sc.ch == 'q')\n\t\t\t\t&& sc.chNext == '\"' ) {\n\t\t\t\t// Limited support for hex and delimited strings: parse as r\"\"\n\t\t\t\tsc.SetState(SCE_D_STRINGR);\n\t\t\t\tsc.Forward();\n\t\t\t} else if (IsWordStart(sc.ch) || sc.ch == '$') {\n\t\t\t\tsc.SetState(SCE_D_IDENTIFIER);\n\t\t\t} else if (sc.Match('/','+')) {\n\t\t\t\tcurNcLevel += 1;\n\t\t\t\tcurLine = styler.GetLine(sc.currentPos);\n\t\t\t\tstyler.SetLineState(curLine, curNcLevel);\n\t\t\t\tsc.SetState(SCE_D_COMMENTNESTED);\n\t\t\t\tsc.Forward();\n\t\t\t} else if (sc.Match('/', '*')) {\n\t\t\t\tif (sc.Match(\"/**\") || sc.Match(\"/*!\")) {   // Support of Qt/Doxygen doc. style\n\t\t\t\t\tsc.SetState(SCE_D_COMMENTDOC);\n\t\t\t\t} else {\n\t\t\t\t\tsc.SetState(SCE_D_COMMENT);\n\t\t\t\t}\n\t\t\t\tsc.Forward();   // Eat the * so it isn't used for the end of the comment\n\t\t\t} else if (sc.Match('/', '/')) {\n\t\t\t\tif ((sc.Match(\"///\") && !sc.Match(\"////\")) || sc.Match(\"//!\"))\n\t\t\t\t\t// Support of Qt/Doxygen doc. style\n\t\t\t\t\tsc.SetState(SCE_D_COMMENTLINEDOC);\n\t\t\t\telse\n\t\t\t\t\tsc.SetState(SCE_D_COMMENTLINE);\n\t\t\t} else if (sc.ch == '\"') {\n\t\t\t\tsc.SetState(SCE_D_STRING);\n\t\t\t} else if (sc.ch == '\\'') {\n\t\t\t\tsc.SetState(SCE_D_CHARACTER);\n\t\t\t} else if (sc.ch == '`') {\n\t\t\t\tsc.SetState(SCE_D_STRINGB);\n\t\t\t} else if (isoperator(static_cast<char>(sc.ch))) {\n\t\t\t\tsc.SetState(SCE_D_OPERATOR);\n\t\t\t\tif (sc.ch == '.' && sc.chNext == '.') sc.Forward(); // Range operator\n\t\t\t}\n\t\t}\n\t}\n\tsc.Complete();\n}\n\n// Store both the current line's fold level and the next lines in the\n// level store to make it easy to pick up with each increment\n// and to make it possible to fiddle the current level for \"} else {\".\n\nvoid SCI_METHOD LexerD::Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) {\n\n\tif (!options.fold)\n\t\treturn;\n\n\tLexAccessor styler(pAccess);\n\n\tSci_PositionU endPos = startPos + length;\n\tint visibleChars = 0;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tint levelCurrent = SC_FOLDLEVELBASE;\n\tif (lineCurrent > 0)\n\t\tlevelCurrent = styler.LevelAt(lineCurrent-1) >> 16;\n\tint levelMinCurrent = levelCurrent;\n\tint levelNext = levelCurrent;\n\tchar chNext = styler[startPos];\n\tint styleNext = styler.StyleAt(startPos);\n\tint style = initStyle;\n\tbool foldAtElse = options.foldAtElseInt >= 0 ? options.foldAtElseInt != 0 : options.foldAtElse;\n\tconst bool userDefinedFoldMarkers = !options.foldExplicitStart.empty() && !options.foldExplicitEnd.empty();\n\tfor (Sci_PositionU i = startPos; i < endPos; i++) {\n\t\tchar ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\tint stylePrev = style;\n\t\tstyle = styleNext;\n\t\tstyleNext = styler.StyleAt(i + 1);\n\t\tbool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n\t\tif (options.foldComment && options.foldCommentMultiline && IsStreamCommentStyle(style)) {\n\t\t\tif (!IsStreamCommentStyle(stylePrev)) {\n\t\t\t\tlevelNext++;\n\t\t\t} else if (!IsStreamCommentStyle(styleNext) && !atEOL) {\n\t\t\t\t// Comments don't end at end of line and the next character may be unstyled.\n\t\t\t\tlevelNext--;\n\t\t\t}\n\t\t}\n\t\tif (options.foldComment && options.foldCommentExplicit && ((style == SCE_D_COMMENTLINE) || options.foldExplicitAnywhere)) {\n\t\t\tif (userDefinedFoldMarkers) {\n\t\t\t\tif (styler.Match(i, options.foldExplicitStart.c_str())) {\n \t\t\t\t\tlevelNext++;\n\t\t\t\t} else if (styler.Match(i, options.foldExplicitEnd.c_str())) {\n \t\t\t\t\tlevelNext--;\n \t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ((ch == '/') && (chNext == '/')) {\n\t\t\t\t\tchar chNext2 = styler.SafeGetCharAt(i + 2);\n\t\t\t\t\tif (chNext2 == '{') {\n\t\t\t\t\t\tlevelNext++;\n\t\t\t\t\t} else if (chNext2 == '}') {\n\t\t\t\t\t\tlevelNext--;\n\t\t\t\t\t}\n\t\t\t\t}\n \t\t\t}\n \t\t}\n\t\tif (options.foldSyntaxBased && (style == SCE_D_OPERATOR)) {\n\t\t\tif (ch == '{') {\n\t\t\t\t// Measure the minimum before a '{' to allow\n\t\t\t\t// folding on \"} else {\"\n\t\t\t\tif (levelMinCurrent > levelNext) {\n\t\t\t\t\tlevelMinCurrent = levelNext;\n\t\t\t\t}\n\t\t\t\tlevelNext++;\n\t\t\t} else if (ch == '}') {\n\t\t\t\tlevelNext--;\n\t\t\t}\n\t\t}\n\t\tif (atEOL || (i == endPos-1)) {\n\t\t\tif (options.foldComment && options.foldCommentMultiline) {  // Handle nested comments\n\t\t\t\tint nc;\n\t\t\t\tnc =  styler.GetLineState(lineCurrent);\n\t\t\t\tnc -= lineCurrent>0? styler.GetLineState(lineCurrent-1): 0;\n\t\t\t\tlevelNext += nc;\n\t\t\t}\n\t\t\tint levelUse = levelCurrent;\n\t\t\tif (options.foldSyntaxBased && foldAtElse) {\n\t\t\t\tlevelUse = levelMinCurrent;\n\t\t\t}\n\t\t\tint lev = levelUse | levelNext << 16;\n\t\t\tif (visibleChars == 0 && options.foldCompact)\n\t\t\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\t\t\tif (levelUse < levelNext)\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\tif (lev != styler.LevelAt(lineCurrent)) {\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\t\t\t}\n\t\t\tlineCurrent++;\n\t\t\tlevelCurrent = levelNext;\n\t\t\tlevelMinCurrent = levelCurrent;\n\t\t\tvisibleChars = 0;\n\t\t}\n\t\tif (!IsASpace(ch))\n\t\t\tvisibleChars++;\n\t}\n}\n\nLexerModule lmD(SCLEX_D, LexerD::LexerFactoryD, \"d\", dWordLists);\n"
  },
  {
    "path": "lexilla/lexers/LexDMAP.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexDMAP.cxx\n ** Lexer for MSC Nastran DMAP.\n ** Written by Mark Robinson, based on the Fortran lexer by Chuan-jian Shen, Last changed Aug. 2013\n **/\n// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n/***************************************/\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n/***************************************/\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n/***************************************/\n\n#if defined(__clang__) && !defined(__APPLE__)\n// Disable warning for numNonBlank\n#pragma clang diagnostic ignored \"-Wunused-but-set-variable\"\n#endif\n\nusing namespace Lexilla;\n\n/***********************************************/\nstatic inline bool IsAWordChar(const int ch) {\n    return (ch < 0x80) && (isalnum(ch) || ch == '_' || ch == '%');\n}\n/**********************************************/\nstatic inline bool IsAWordStart(const int ch) {\n    return (ch < 0x80) && (isalnum(ch));\n}\n/***************************************/\nstatic void ColouriseDMAPDoc(Sci_PositionU startPos, Sci_Position length, int initStyle,\n            WordList *keywordlists[], Accessor &styler) {\n    WordList &keywords = *keywordlists[0];\n    WordList &keywords2 = *keywordlists[1];\n    WordList &keywords3 = *keywordlists[2];\n    /***************************************/\n    Sci_Position posLineStart = 0, numNonBlank = 0;\n    Sci_Position endPos = startPos + length;\n    /***************************************/\n    // backtrack to the nearest keyword\n    while ((startPos > 1) && (styler.StyleAt(startPos) != SCE_DMAP_WORD)) {\n        startPos--;\n    }\n    startPos = styler.LineStart(styler.GetLine(startPos));\n    initStyle = styler.StyleAt(startPos - 1);\n    StyleContext sc(startPos, endPos-startPos, initStyle, styler);\n    /***************************************/\n    for (; sc.More(); sc.Forward()) {\n        // remember the start position of the line\n        if (sc.atLineStart) {\n            posLineStart = sc.currentPos;\n            numNonBlank = 0;\n            sc.SetState(SCE_DMAP_DEFAULT);\n        }\n        if (!IsASpaceOrTab(sc.ch)) numNonBlank ++;\n        /***********************************************/\n        // Handle data appearing after column 72; it is ignored\n        Sci_Position toLineStart = sc.currentPos - posLineStart;\n        if (toLineStart >= 72 || sc.ch == '$') {\n            sc.SetState(SCE_DMAP_COMMENT);\n            while (!sc.atLineEnd && sc.More()) sc.Forward(); // Until line end\n            continue;\n        }\n        /***************************************/\n        // Determine if the current state should terminate.\n        if (sc.state == SCE_DMAP_OPERATOR) {\n            sc.SetState(SCE_DMAP_DEFAULT);\n        } else if (sc.state == SCE_DMAP_NUMBER) {\n            if (!(IsAWordChar(sc.ch) || sc.ch=='\\'' || sc.ch=='\\\"' || sc.ch=='.')) {\n                sc.SetState(SCE_DMAP_DEFAULT);\n            }\n        } else if (sc.state == SCE_DMAP_IDENTIFIER) {\n            if (!IsAWordChar(sc.ch) || (sc.ch == '%')) {\n                char s[100];\n                sc.GetCurrentLowered(s, sizeof(s));\n                if (keywords.InList(s)) {\n                    sc.ChangeState(SCE_DMAP_WORD);\n                } else if (keywords2.InList(s)) {\n                    sc.ChangeState(SCE_DMAP_WORD2);\n                } else if (keywords3.InList(s)) {\n                    sc.ChangeState(SCE_DMAP_WORD3);\n                }\n                sc.SetState(SCE_DMAP_DEFAULT);\n            }\n        } else if (sc.state == SCE_DMAP_COMMENT) {\n            if (sc.ch == '\\r' || sc.ch == '\\n') {\n                sc.SetState(SCE_DMAP_DEFAULT);\n            }\n        } else if (sc.state == SCE_DMAP_STRING1) {\n            if (sc.ch == '\\'') {\n                if (sc.chNext == '\\'') {\n                    sc.Forward();\n                } else {\n                    sc.ForwardSetState(SCE_DMAP_DEFAULT);\n                }\n            } else if (sc.atLineEnd) {\n                sc.ChangeState(SCE_DMAP_STRINGEOL);\n                sc.ForwardSetState(SCE_DMAP_DEFAULT);\n            }\n        } else if (sc.state == SCE_DMAP_STRING2) {\n            if (sc.atLineEnd) {\n                sc.ChangeState(SCE_DMAP_STRINGEOL);\n                sc.ForwardSetState(SCE_DMAP_DEFAULT);\n            } else if (sc.ch == '\\\"') {\n                if (sc.chNext == '\\\"') {\n                    sc.Forward();\n                } else {\n                    sc.ForwardSetState(SCE_DMAP_DEFAULT);\n                }\n            }\n        }\n        /***************************************/\n        // Determine if a new state should be entered.\n        if (sc.state == SCE_DMAP_DEFAULT) {\n            if (sc.ch == '$') {\n                sc.SetState(SCE_DMAP_COMMENT);\n            } else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext)) || (sc.ch == '-' && IsADigit(sc.chNext))) {\n                sc.SetState(SCE_F_NUMBER);\n            } else if (IsAWordStart(sc.ch)) {\n                sc.SetState(SCE_DMAP_IDENTIFIER);\n            } else if (sc.ch == '\\\"') {\n                sc.SetState(SCE_DMAP_STRING2);\n            } else if (sc.ch == '\\'') {\n                sc.SetState(SCE_DMAP_STRING1);\n            } else if (isoperator(static_cast<char>(sc.ch))) {\n                sc.SetState(SCE_DMAP_OPERATOR);\n            }\n        }\n    }\n    sc.Complete();\n}\n/***************************************/\n// To determine the folding level depending on keywords\nstatic int classifyFoldPointDMAP(const char* s, const char* prevWord) {\n    int lev = 0;\n    if ((strcmp(prevWord, \"else\") == 0 && strcmp(s, \"if\") == 0) || strcmp(s, \"enddo\") == 0 || strcmp(s, \"endif\") == 0) {\n        lev = -1;\n    } else if ((strcmp(prevWord, \"do\") == 0 && strcmp(s, \"while\") == 0) || strcmp(s, \"then\") == 0) {\n        lev = 1;\n    }\n    return lev;\n}\n// Folding the code\nstatic void FoldDMAPDoc(Sci_PositionU startPos, Sci_Position length, int initStyle,\n                           WordList *[], Accessor &styler) {\n    //\n    // bool foldComment = styler.GetPropertyInt(\"fold.comment\") != 0;\n    // Do not know how to fold the comment at the moment.\n    //\n    bool foldCompact = styler.GetPropertyInt(\"fold.compact\", 1) != 0;\n    Sci_PositionU endPos = startPos + length;\n    int visibleChars = 0;\n    Sci_Position lineCurrent = styler.GetLine(startPos);\n    int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK;\n    int levelCurrent = levelPrev;\n    char chNext = styler[startPos];\n    int styleNext = styler.StyleAt(startPos);\n    int style = initStyle;\n    /***************************************/\n    Sci_Position lastStart = 0;\n    char prevWord[32] = \"\";\n    /***************************************/\n    for (Sci_PositionU i = startPos; i < endPos; i++) {\n        char ch = chNext;\n        chNext = styler.SafeGetCharAt(i + 1);\n        int stylePrev = style;\n        style = styleNext;\n        styleNext = styler.StyleAt(i + 1);\n        bool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n        //\n        if ((stylePrev == SCE_DMAP_DEFAULT || stylePrev == SCE_DMAP_OPERATOR || stylePrev == SCE_DMAP_COMMENT) && (style == SCE_DMAP_WORD)) {\n            // Store last word and label start point.\n            lastStart = i;\n        }\n        /***************************************/\n        if (style == SCE_DMAP_WORD) {\n            if(iswordchar(ch) && !iswordchar(chNext)) {\n                char s[32];\n                Sci_PositionU k;\n                for(k=0; (k<31 ) && (k<i-lastStart+1 ); k++) {\n                    s[k] = static_cast<char>(tolower(styler[lastStart+k]));\n                }\n                s[k] = '\\0';\n                levelCurrent += classifyFoldPointDMAP(s, prevWord);\n                strcpy(prevWord, s);\n            }\n        }\n        if (atEOL) {\n            int lev = levelPrev;\n            if (visibleChars == 0 && foldCompact)\n                lev |= SC_FOLDLEVELWHITEFLAG;\n            if ((levelCurrent > levelPrev) && (visibleChars > 0))\n                lev |= SC_FOLDLEVELHEADERFLAG;\n            if (lev != styler.LevelAt(lineCurrent)) {\n                styler.SetLevel(lineCurrent, lev);\n            }\n            lineCurrent++;\n            levelPrev = levelCurrent;\n            visibleChars = 0;\n            strcpy(prevWord, \"\");\n        }\n        /***************************************/\n        if (!isspacechar(ch)) visibleChars++;\n    }\n    /***************************************/\n    // Fill in the real level of the next line, keeping the current flags as they will be filled in later\n    int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK;\n    styler.SetLevel(lineCurrent, levelPrev | flagsNext);\n}\n/***************************************/\nstatic const char * const DMAPWordLists[] = {\n    \"Primary keywords and identifiers\",\n    \"Intrinsic functions\",\n    \"Extended and user defined functions\",\n    0,\n};\n/***************************************/\nLexerModule lmDMAP(SCLEX_DMAP, ColouriseDMAPDoc, \"DMAP\", FoldDMAPDoc, DMAPWordLists);\n"
  },
  {
    "path": "lexilla/lexers/LexDMIS.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexDMIS.cxx\n ** Lexer for DMIS.\n  **/\n// Copyright 1998-2005 by Neil Hodgson <neilh@scintilla.org>\n// Copyright 2013-2014 by Andreas Tscharner <andy@vis.ethz.ch>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n\n#include <cstdlib>\n#include <cassert>\n#include <cstring>\n#include <cctype>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n#include \"DefaultLexer.h\"\n\nusing namespace Lexilla;\n\n\nstatic const char *const DMISWordListDesc[] = {\n\t\"DMIS Major Words\",\n\t\"DMIS Minor Words\",\n\t\"Unsupported DMIS Major Words\",\n\t\"Unsupported DMIS Minor Words\",\n\t\"Keywords for code folding start\",\n\t\"Corresponding keywords for code folding end\",\n\t0\n};\n\n\nclass LexerDMIS : public DefaultLexer\n{\n\tprivate:\n\t\tchar *m_wordListSets;\n\t\tWordList m_majorWords;\n\t\tWordList m_minorWords;\n\t\tWordList m_unsupportedMajor;\n\t\tWordList m_unsupportedMinor;\n\t\tWordList m_codeFoldingStart;\n\t\tWordList m_codeFoldingEnd;\n\n\t\tchar * SCI_METHOD UpperCase(char *item);\n\t\tvoid SCI_METHOD InitWordListSets(void);\n\n\tpublic:\n\t\tLexerDMIS(void);\n\t\tvirtual ~LexerDMIS(void);\n\n\t\tint SCI_METHOD Version() const override {\n\t\t\treturn Scintilla::lvRelease5;\n\t\t}\n\n\t\tvoid SCI_METHOD Release() override {\n\t\t\tdelete this;\n\t\t}\n\n\t\tconst char * SCI_METHOD PropertyNames() override {\n\t\t\treturn NULL;\n\t\t}\n\n\t\tint SCI_METHOD PropertyType(const char *) override {\n\t\t\treturn -1;\n\t\t}\n\n\t\tconst char * SCI_METHOD DescribeProperty(const char *) override {\n\t\t\treturn NULL;\n\t\t}\n\n\t\tSci_Position SCI_METHOD PropertySet(const char *, const char *) override {\n\t\t\treturn -1;\n\t\t}\n\n\t\tconst char * SCI_METHOD PropertyGet(const char *) override {\n\t\t\treturn NULL;\n\t\t}\n\n\t\tSci_Position SCI_METHOD WordListSet(int n, const char *wl) override;\n\n\t\tvoid * SCI_METHOD PrivateCall(int, void *) override {\n\t\t\treturn NULL;\n\t\t}\n\n\t\tstatic ILexer5 *LexerFactoryDMIS() {\n\t\t\treturn new LexerDMIS;\n\t\t}\n\n\t\tconst char * SCI_METHOD DescribeWordListSets() override;\n\t\tvoid SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, Scintilla::IDocument *pAccess) override;\n\t\tvoid SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, Scintilla::IDocument *pAccess) override;\n};\n\n\nchar * SCI_METHOD LexerDMIS::UpperCase(char *item)\n{\n\tchar *itemStart;\n\n\n\titemStart = item;\n\twhile (item && *item) {\n\t\t*item = toupper(*item);\n\t\titem++;\n\t};\n\treturn itemStart;\n}\n\nvoid SCI_METHOD LexerDMIS::InitWordListSets(void)\n{\n\tsize_t totalLen = 0;\n\n\n\tfor (int i=0; DMISWordListDesc[i]; i++) {\n\t\ttotalLen += strlen(DMISWordListDesc[i]);\n\t\ttotalLen++;\n\t};\n\n\ttotalLen++;\n\tthis->m_wordListSets = new char[totalLen];\n\tmemset(this->m_wordListSets, 0, totalLen);\n\n\tfor (int i=0; DMISWordListDesc[i]; i++) {\n\t\tstrcat(this->m_wordListSets, DMISWordListDesc[i]);\n\t\tstrcat(this->m_wordListSets, \"\\n\");\n\t};\n}\n\n\nLexerDMIS::LexerDMIS(void) : DefaultLexer(\"DMIS\", SCLEX_DMIS) {\n\tthis->InitWordListSets();\n\n\tthis->m_majorWords.Clear();\n\tthis->m_minorWords.Clear();\n\tthis->m_unsupportedMajor.Clear();\n\tthis->m_unsupportedMinor.Clear();\n\tthis->m_codeFoldingStart.Clear();\n\tthis->m_codeFoldingEnd.Clear();\n}\n\nLexerDMIS::~LexerDMIS(void) {\n\tdelete[] this->m_wordListSets;\n}\n\nSci_Position SCI_METHOD LexerDMIS::WordListSet(int n, const char *wl)\n{\n\tswitch (n) {\n\t\tcase 0:\n\t\t\tthis->m_majorWords.Clear();\n\t\t\tthis->m_majorWords.Set(wl);\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tthis->m_minorWords.Clear();\n\t\t\tthis->m_minorWords.Set(wl);\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tthis->m_unsupportedMajor.Clear();\n\t\t\tthis->m_unsupportedMajor.Set(wl);\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tthis->m_unsupportedMinor.Clear();\n\t\t\tthis->m_unsupportedMinor.Set(wl);\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tthis->m_codeFoldingStart.Clear();\n\t\t\tthis->m_codeFoldingStart.Set(wl);\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tthis->m_codeFoldingEnd.Clear();\n\t\t\tthis->m_codeFoldingEnd.Set(wl);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn -1;\n\t\t\tbreak;\n\t}\n\n\treturn 0;\n}\n\nconst char * SCI_METHOD LexerDMIS::DescribeWordListSets()\n{\n\treturn this->m_wordListSets;\n}\n\nvoid SCI_METHOD LexerDMIS::Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, Scintilla::IDocument *pAccess)\n{\n\tconst Sci_PositionU MAX_STR_LEN = 100;\n\n\tLexAccessor styler(pAccess);\n\tStyleContext scCTX(startPos, lengthDoc, initStyle, styler);\n\tCharacterSet setDMISNumber(CharacterSet::setDigits, \".-+eE\");\n\tCharacterSet setDMISWordStart(CharacterSet::setAlpha, \"-234\", 0x80, true);\n\tCharacterSet setDMISWord(CharacterSet::setAlpha);\n\n\n\tbool isIFLine = false;\n\n\tfor (; scCTX.More(); scCTX.Forward()) {\n\t\tif (scCTX.atLineEnd) {\n\t\t\tisIFLine = false;\n\t\t};\n\n\t\tswitch (scCTX.state) {\n\t\t\tcase SCE_DMIS_DEFAULT:\n\t\t\t\tif (scCTX.Match('$', '$')) {\n\t\t\t\t\tscCTX.SetState(SCE_DMIS_COMMENT);\n\t\t\t\t\tscCTX.Forward();\n\t\t\t\t};\n\t\t\t\tif (scCTX.Match('\\'')) {\n\t\t\t\t\tscCTX.SetState(SCE_DMIS_STRING);\n\t\t\t\t};\n\t\t\t\tif (IsADigit(scCTX.ch) || ((scCTX.Match('-') || scCTX.Match('+')) && IsADigit(scCTX.chNext))) {\n\t\t\t\t\tscCTX.SetState(SCE_DMIS_NUMBER);\n\t\t\t\t\tbreak;\n\t\t\t\t};\n\t\t\t\tif (setDMISWordStart.Contains(scCTX.ch)) {\n\t\t\t\t\tscCTX.SetState(SCE_DMIS_KEYWORD);\n\t\t\t\t};\n\t\t\t\tif (scCTX.Match('(') && (!isIFLine)) {\n\t\t\t\t\tscCTX.SetState(SCE_DMIS_LABEL);\n\t\t\t\t};\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_DMIS_COMMENT:\n\t\t\t\tif (scCTX.atLineEnd) {\n\t\t\t\t\tscCTX.SetState(SCE_DMIS_DEFAULT);\n\t\t\t\t};\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_DMIS_STRING:\n\t\t\t\tif (scCTX.Match('\\'')) {\n\t\t\t\t\tscCTX.SetState(SCE_DMIS_DEFAULT);\n\t\t\t\t};\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_DMIS_NUMBER:\n\t\t\t\tif (!setDMISNumber.Contains(scCTX.ch)) {\n\t\t\t\t\tscCTX.SetState(SCE_DMIS_DEFAULT);\n\t\t\t\t};\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_DMIS_KEYWORD:\n\t\t\t\tif (!setDMISWord.Contains(scCTX.ch)) {\n\t\t\t\t\tchar tmpStr[MAX_STR_LEN];\n\t\t\t\t\tmemset(tmpStr, 0, MAX_STR_LEN*sizeof(char));\n\t\t\t\t\tscCTX.GetCurrent(tmpStr, (MAX_STR_LEN-1));\n\t\t\t\t\t// The following strncpy is copying from a string back onto itself which is weird and causes warnings\n\t\t\t\t\t// but is harmless so turn off the warning\n#if defined(__GNUC__) && !defined(__clang__)\n// Disable warning for strncpy\n#pragma GCC diagnostic ignored \"-Wrestrict\"\n#endif\n\t\t\t\t\tstrncpy(tmpStr, this->UpperCase(tmpStr), (MAX_STR_LEN-1));\n\n\t\t\t\t\tif (this->m_minorWords.InList(tmpStr)) {\n\t\t\t\t\t\tscCTX.ChangeState(SCE_DMIS_MINORWORD);\n\t\t\t\t\t};\n\t\t\t\t\tif (this->m_majorWords.InList(tmpStr)) {\n\t\t\t\t\t\tisIFLine = (strcmp(tmpStr, \"IF\") == 0);\n\t\t\t\t\t\tscCTX.ChangeState(SCE_DMIS_MAJORWORD);\n\t\t\t\t\t};\n\t\t\t\t\tif (this->m_unsupportedMajor.InList(tmpStr)) {\n\t\t\t\t\t\tscCTX.ChangeState(SCE_DMIS_UNSUPPORTED_MAJOR);\n\t\t\t\t\t};\n\t\t\t\t\tif (this->m_unsupportedMinor.InList(tmpStr)) {\n\t\t\t\t\t\tscCTX.ChangeState(SCE_DMIS_UNSUPPORTED_MINOR);\n\t\t\t\t\t};\n\n\t\t\t\t\tif (scCTX.Match('(') && (!isIFLine)) {\n\t\t\t\t\t\tscCTX.SetState(SCE_DMIS_LABEL);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tscCTX.SetState(SCE_DMIS_DEFAULT);\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_DMIS_LABEL:\n\t\t\t\tif (scCTX.Match(')')) {\n\t\t\t\t\tscCTX.SetState(SCE_DMIS_DEFAULT);\n\t\t\t\t};\n\t\t\t\tbreak;\n\t\t};\n\t};\n\tscCTX.Complete();\n}\n\nvoid SCI_METHOD LexerDMIS::Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int, Scintilla::IDocument *pAccess)\n{\n\tconst int MAX_STR_LEN = 100;\n\n\tLexAccessor styler(pAccess);\n\tSci_PositionU endPos = startPos + lengthDoc;\n\tchar chNext = styler[startPos];\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tint levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK;\n\tint levelCurrent = levelPrev;\n\tint strPos = 0;\n\tbool foldWordPossible = false;\n\tCharacterSet setDMISFoldWord(CharacterSet::setAlpha);\n\tchar *tmpStr;\n\n\n\ttmpStr = new char[MAX_STR_LEN];\n\tmemset(tmpStr, 0, MAX_STR_LEN*sizeof(char));\n\n\tfor (Sci_PositionU i=startPos; i<endPos; i++) {\n\t\tchar ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i+1);\n\n\t\tbool atEOL = ((ch == '\\r' && chNext != '\\n') || (ch == '\\n'));\n\n\t\tif (strPos >= (MAX_STR_LEN-1)) {\n\t\t\tstrPos = MAX_STR_LEN-1;\n\t\t};\n\n\t\tint style = styler.StyleAt(i);\n\t\tbool noFoldPos = ((style == SCE_DMIS_COMMENT) || (style == SCE_DMIS_STRING));\n\n\t\tif (foldWordPossible) {\n\t\t\tif (setDMISFoldWord.Contains(ch)) {\n\t\t\t\ttmpStr[strPos++] = ch;\n\t\t\t} else {\n\t\t\t\ttmpStr = this->UpperCase(tmpStr);\n\t\t\t\tif (this->m_codeFoldingStart.InList(tmpStr) && (!noFoldPos)) {\n\t\t\t\t\tlevelCurrent++;\n\t\t\t\t};\n\t\t\t\tif (this->m_codeFoldingEnd.InList(tmpStr) && (!noFoldPos)) {\n\t\t\t\t\tlevelCurrent--;\n\t\t\t\t};\n\t\t\t\tmemset(tmpStr, 0, MAX_STR_LEN*sizeof(char));\n\t\t\t\tstrPos = 0;\n\t\t\t\tfoldWordPossible = false;\n\t\t\t};\n\t\t} else {\n\t\t\tif (setDMISFoldWord.Contains(ch)) {\n\t\t\t\ttmpStr[strPos++] = ch;\n\t\t\t\tfoldWordPossible = true;\n\t\t\t};\n\t\t};\n\n\t\tif (atEOL || (i == (endPos-1))) {\n\t\t\tint lev = levelPrev;\n\n\t\t\tif (levelCurrent > levelPrev) {\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\t};\n\t\t\tif (lev != styler.LevelAt(lineCurrent)) {\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\t\t\t};\n\t\t\tlineCurrent++;\n\t\t\tlevelPrev = levelCurrent;\n\t\t};\n\t};\n\tdelete[] tmpStr;\n}\n\n\nLexerModule lmDMIS(SCLEX_DMIS, LexerDMIS::LexerFactoryDMIS, \"DMIS\", DMISWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexDataflex.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexDataflex.cxx\n ** Lexer for DataFlex.\n ** Based on LexPascal.cxx\n ** Written by Wil van Antwerpen, June 2019\n **/\n\n/*\n// The License.txt file describes the conditions under which this software may be distributed.\n\nA few words about features of LexDataflex...\n\nGenerally speaking LexDataflex tries to support all available DataFlex features (up\nto DataFlex 19.1 at this time).\n\n~ FOLDING:\n\nFolding is supported in the following cases:\n\n- Folding of stream-like comments\n- Folding of groups of consecutive line comments\n- Folding of preprocessor blocks (the following preprocessor blocks are\nsupported: #IFDEF, #IFNDEF, #ENDIF and #HEADER / #ENDHEADER \nblocks), \n- Folding of code blocks on appropriate keywords (the following code blocks are\nsupported: \"begin, struct, type, case / end\" blocks, class & object\ndeclarations and interface declarations)\n\nRemarks:\n\n- We pass 4 arrays to the lexer:\n1. The DataFlex keyword list, these are normal DataFlex keywords\n2. The Scope Open list, for example, begin / procedure / while\n3. The Scope Close list, for example, end / end_procedure / loop\n4. Operator list, for ex. + / - / * / Lt / iand\nThese lists are all mutually exclusive, scope open words should not be in the keyword list and vice versa\n\n- Folding of code blocks tries to handle all special cases in which folding\nshould not occur. \n\n~ KEYWORDS:\n\nThe list of keywords that can be used in dataflex.properties file (up to DataFlex\n19.1):\n\n- Keywords: .. snipped .. see dataflex.properties file.\n\n*/\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\n\nstatic void GetRangeLowered(Sci_PositionU start,\n\t\tSci_PositionU end,\n\t\tAccessor &styler,\n\t\tchar *s,\n\t\tSci_PositionU len) {\n\tSci_PositionU i = 0;\n\twhile ((i < end - start + 1) && (i < len-1)) {\n\t\ts[i] = static_cast<char>(tolower(styler[start + i]));\n\t\ti++;\n\t}\n\ts[i] = '\\0';\n}\n\nstatic void GetForwardRangeLowered(Sci_PositionU start,\n\t\tCharacterSet &charSet,\n\t\tAccessor &styler,\n\t\tchar *s,\n\t\tSci_PositionU len) {\n\tSci_PositionU i = 0;\n\twhile ((i < len-1) && charSet.Contains(styler.SafeGetCharAt(start + i))) {\n\t\ts[i] = static_cast<char>(tolower(styler.SafeGetCharAt(start + i)));\n\t\ti++;\n\t}\n\ts[i] = '\\0';\n\n}\n\nenum {\n\tstateInICode = 0x1000,\n\tstateSingleQuoteOpen = 0x2000,\n\tstateDoubleQuoteOpen = 0x4000,\n\tstateFoldInPreprocessor = 0x0100,\n\tstateFoldInCaseStatement = 0x0200,\n\tstateFoldInPreprocessorLevelMask = 0x00FF,\n\tstateFoldMaskAll = 0x0FFF\n};\n\n\nstatic bool IsFirstDataFlexWord(Sci_Position pos, Accessor &styler) {\n\tSci_Position line = styler.GetLine(pos);\n\tSci_Position start_pos = styler.LineStart(line);\n\tfor (Sci_Position i = start_pos; i < pos; i++) {\n\t\tchar ch = styler.SafeGetCharAt(i);\n\t\tif (!(ch == ' ' || ch == '\\t'))\n\t\t\treturn false;\n\t}\n\treturn true;\n}\n\n\ninline bool IsADataFlexField(int ch) {\n\treturn (ch == '.');\n}\n\n\nstatic void ClassifyDataFlexWord(WordList *keywordlists[], StyleContext &sc, Accessor &styler) {\n\tWordList& keywords = *keywordlists[0];\n\tWordList& scopeOpen   = *keywordlists[1];\n\tWordList& scopeClosed = *keywordlists[2];\n\tWordList& operators   = *keywordlists[3];\n\n\tchar s[100];\n\tint oldState;\n\tint newState;\n\tsize_t tokenlen;\n\n    oldState = sc.state;\n\tnewState = oldState;\n\tsc.GetCurrentLowered(s, sizeof(s));\n\ttokenlen = strnlen(s,sizeof(s));\n\tif (keywords.InList(s)) {\n\t\t// keywords in DataFlex can be used as table column names (file.field) and as such they\n\t\t// should not be characterized as a keyword. So test for that.\n\t\t// for ex. somebody using date as field name.\n        if (!IsADataFlexField(sc.GetRelative(-static_cast<int>(tokenlen+1)))) {\n\t      newState = SCE_DF_WORD;\n\t    }\n\t}\n\tif (oldState == newState) {\n\t\tif ((scopeOpen.InList(s) || scopeClosed.InList(s)) && (strcmp(s, \"for\") != 0) && (strcmp(s, \"repeat\") != 0)) {\n\t\t\t// scope words in DataFlex can be used as table column names (file.field) and as such they\n\t\t\t// should not be characterized as a scope word. So test for that.\n\t\t\t// for ex. somebody using procedure for field name.\n\t\t\tif (!IsADataFlexField(sc.GetRelative(-static_cast<int>(tokenlen+1)))) {\n\t\t\t\tnewState = SCE_DF_SCOPEWORD;\n\t\t\t}\n\t\t} \n\t\t// no code folding on the next words, but just want to paint them like keywords (as they are) (??? doesn't the code to the opposite?)\n\t\tif (strcmp(s, \"if\") == 0 ||  \n\t\t\tstrcmp(s, \"ifnot\") == 0 ||\n\t\t\tstrcmp(s, \"case\") == 0 ||\n\t\t\tstrcmp(s, \"else\") == 0 ) {\n\t\t\t\tnewState = SCE_DF_SCOPEWORD;\n\t\t} \n\t}\n\tif (oldState != newState && newState == SCE_DF_WORD) {\n\t\t// a for loop must have for at the start of the line, for is also used in \"define abc for 123\"\n\t\tif ( (strcmp(s, \"for\") == 0) && (IsFirstDataFlexWord(sc.currentPos-3, styler)) ) {   \n\t\t\t\tnewState = SCE_DF_SCOPEWORD;\n\t\t} \n\t}\n\tif (oldState != newState && newState == SCE_DF_WORD) {\n\t\t// a repeat loop must have repeat at the start of the line, repeat is also used in 'move (repeat(\"d\",5)) to sFoo'\n\t\tif ( (strcmp(s, \"repeat\") == 0) && (IsFirstDataFlexWord(sc.currentPos-6, styler)) ) {   \n\t\t\t\tnewState = SCE_DF_SCOPEWORD;\n\t\t} \n\t}\n\tif (oldState == newState)  {\n\t  if (operators.InList(s)) {\n\t\t  newState = SCE_DF_OPERATOR;\n\t\t} \n\t}\n\n\tif (oldState != newState) {\n\t\tsc.ChangeState(newState);\n\t}\n\tsc.SetState(SCE_DF_DEFAULT);\n}\n\nstatic void ColouriseDataFlexDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[],\n\t\tAccessor &styler) {\n//\tbool bSmartHighlighting = styler.GetPropertyInt(\"lexer.dataflex.smart.highlighting\", 1) != 0;\n\n\t\t\tCharacterSet setWordStart(CharacterSet::setAlpha, \"_$#@\", 0x80, true);\n\t\t\tCharacterSet setWord(CharacterSet::setAlphaNum, \"_$#@\", 0x80, true);\n\tCharacterSet setNumber(CharacterSet::setDigits, \".-+eE\");\n\tCharacterSet setHexNumber(CharacterSet::setDigits, \"abcdefABCDEF\");\n\tCharacterSet setOperator(CharacterSet::setNone, \"*+-/<=>^\");\n\n\tSci_Position curLine = styler.GetLine(startPos);\n\tint curLineState = curLine > 0 ? styler.GetLineState(curLine - 1) : 0;\n\n\tStyleContext sc(startPos, length, initStyle, styler);\n\n\tfor (; sc.More(); sc.Forward()) {\n\t\tif (sc.atLineEnd) {\n\t\t\t// Update the line state, so it can be seen by next line\n\t\t\tcurLine = styler.GetLine(sc.currentPos);\n\t\t\tstyler.SetLineState(curLine, curLineState);\n\t\t}\n\n\t\t// Determine if the current state should terminate.\n\t\tswitch (sc.state) {\n\t\t\tcase SCE_DF_NUMBER:\n\t\t\t\tif (!setNumber.Contains(sc.ch) || (sc.ch == '.' && sc.chNext == '.')) {\n\t\t\t\t\tsc.SetState(SCE_DF_DEFAULT);\n\t\t\t\t} else if (sc.ch == '-' || sc.ch == '+') {\n\t\t\t\t\tif (sc.chPrev != 'E' && sc.chPrev != 'e') {\n\t\t\t\t\t\tsc.SetState(SCE_DF_DEFAULT);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_DF_IDENTIFIER:\n\t\t\t\tif (!setWord.Contains(sc.ch)) {\n\t\t\t\t\tClassifyDataFlexWord(keywordlists, sc, styler);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_DF_HEXNUMBER:\n\t\t\t\tif (!(setHexNumber.Contains(sc.ch) || sc.ch == 'I') ) { // in |CI$22a we also want to color the \"I\"\n\t\t\t\t\tsc.SetState(SCE_DF_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_DF_METATAG:\n\t\t\t\tif (sc.atLineStart || sc.chPrev == '}') {\n\t\t\t\t\tsc.SetState(SCE_DF_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_DF_PREPROCESSOR:\n\t\t\t\tif (sc.atLineStart || IsASpaceOrTab(sc.ch)) {\n\t\t\t\t\tsc.SetState(SCE_DF_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_DF_IMAGE:\n\t\t\t\tif (sc.atLineStart && sc.Match(\"/*\")) {\n\t\t\t\t\tsc.Forward();  // these characters are still part of the DF Image\n\t\t\t\t\tsc.ForwardSetState(SCE_DF_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_DF_PREPROCESSOR2:\n\t\t\t\t// we don't have inline comments or preprocessor2 commands\n\t\t\t\t//if (sc.Match('*', ')')) {\n\t\t\t\t//\tsc.Forward();\n\t\t\t\t//\tsc.ForwardSetState(SCE_DF_DEFAULT);\n\t\t\t\t//}\n\t\t\t\tbreak;\n\t\t\tcase SCE_DF_COMMENTLINE:\n\t\t\t\tif (sc.atLineStart) {\n\t\t\t\t\tsc.SetState(SCE_DF_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_DF_STRING:\n\t\t\t\tif (sc.atLineEnd) {\n\t\t\t\t\tsc.ChangeState(SCE_DF_STRINGEOL);\n\t\t\t\t} else if (sc.ch == '\\'' && sc.chNext == '\\'') {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t} else if (sc.ch == '\\\"' && sc.chNext == '\\\"') {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t} else if (sc.ch == '\\'' || sc.ch == '\\\"') {\n\t\t\t\t\tif (sc.ch == '\\'' && (curLineState & stateSingleQuoteOpen) ) {\n \t\t\t\t    curLineState &= ~(stateSingleQuoteOpen);\n\t\t\t\t\tsc.ForwardSetState(SCE_DF_DEFAULT);\n\t\t\t\t\t}\n\t\t\t\t\telse if (sc.ch == '\\\"' && (curLineState & stateDoubleQuoteOpen) ) {\n \t\t\t\t    curLineState &= ~(stateDoubleQuoteOpen);\n\t\t\t\t\tsc.ForwardSetState(SCE_DF_DEFAULT);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_DF_STRINGEOL:\n\t\t\t\tif (sc.atLineStart) {\n\t\t\t\t\tsc.SetState(SCE_DF_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_DF_SCOPEWORD:\n\t\t\t\t//if (!setHexNumber.Contains(sc.ch) && sc.ch != '$') {\n\t\t\t\t//\tsc.SetState(SCE_DF_DEFAULT);\n\t\t\t\t//}\n\t\t\t\tbreak;\n\t\t\tcase SCE_DF_OPERATOR:\n//\t\t\t\tif (bSmartHighlighting && sc.chPrev == ';') {\n//\t\t\t\t\tcurLineState &= ~(stateInProperty | stateInExport);\n//\t\t\t\t}\n\t\t\t\tsc.SetState(SCE_DF_DEFAULT);\n\t\t\t\tbreak;\n\t\t\tcase SCE_DF_ICODE:\n\t\t\t\tif (sc.atLineStart || IsASpace(sc.ch) || isoperator(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_DF_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// Determine if a new state should be entered.\n\t\tif (sc.state == SCE_DF_DEFAULT) {\n\t\t\tif (IsADigit(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_DF_NUMBER);\n\t\t\t} else if (sc.Match('/', '/') || sc.Match(\"#REM\")) {\n\t\t\t\tsc.SetState(SCE_DF_COMMENTLINE);\n\t\t\t} else if ((sc.ch == '#' && !sc.Match(\"#REM\")) && IsFirstDataFlexWord(sc.currentPos, styler)) {\n\t\t\t\tsc.SetState(SCE_DF_PREPROCESSOR);\n\t\t\t// || (sc.ch == '|' && sc.chNext == 'C' && sc.GetRelativeCharacter(2) == 'I' && sc.GetRelativeCharacter(3) == '$') ) {\n\t\t\t} else if ((sc.ch == '$' && ((!setWord.Contains(sc.chPrev)) || sc.chPrev == 'I' ) ) || (sc.Match(\"|CI$\")) ) {\n\t\t\t\tsc.SetState(SCE_DF_HEXNUMBER); // start with $ and previous character not in a..zA..Z0..9 excluding \"I\" OR start with |CI$\n\t\t\t} else if (setWordStart.Contains(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_DF_IDENTIFIER);\n\t\t\t} else if (sc.ch == '{') {\n\t\t\t\tsc.SetState(SCE_DF_METATAG);\n\t\t\t//} else if (sc.Match(\"(*$\")) {\n\t\t\t//\tsc.SetState(SCE_DF_PREPROCESSOR2);\n\t\t\t} else if (sc.ch == '/' && setWord.Contains(sc.chNext) &&  sc.atLineStart) {\n\t\t\t\tsc.SetState(SCE_DF_IMAGE);\n\t\t\t//\tsc.Forward();\t// Eat the * so it isn't used for the end of the comment\n\t\t\t} else if (sc.ch == '\\'' || sc.ch == '\\\"') {\n\t\t\t\tif (sc.ch == '\\'' && !(curLineState & stateDoubleQuoteOpen)) {\n\t\t\t\t  curLineState |= stateSingleQuoteOpen;\n\t\t\t\t} else if (sc.ch == '\\\"' && !(curLineState & stateSingleQuoteOpen)) {\n\t\t\t\t  curLineState |= stateDoubleQuoteOpen;\n\t\t\t\t}\n\t\t\t    sc.SetState(SCE_DF_STRING);\n\t\t\t} else if (setOperator.Contains(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_DF_OPERATOR);\n//\t\t\t} else if (curLineState & stateInICode) {\n\t\t\t\t// ICode start ! in a string followed by close string mark is not icode\n\t\t\t} else if ((sc.ch == '!') && !(sc.ch == '!' && ((sc.chNext == '\\\"') || (sc.ch == '\\'')) )) {\n\t\t\t\tsc.SetState(SCE_DF_ICODE);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (sc.state == SCE_DF_IDENTIFIER && setWord.Contains(sc.chPrev)) {\n\t\tClassifyDataFlexWord(keywordlists, sc, styler);\n\t}\n\n\tsc.Complete();\n}\n\nstatic bool IsStreamCommentStyle(int style) {\n\treturn style == SCE_DF_IMAGE;\n}\n\nstatic bool IsCommentLine(Sci_Position line, Accessor &styler) {\n\tSci_Position pos = styler.LineStart(line);\n\tSci_Position eolPos = styler.LineStart(line + 1) - 1;\n\tfor (Sci_Position i = pos; i < eolPos; i++) {\n\t\tchar ch = styler[i];\n\t\tchar chNext = styler.SafeGetCharAt(i + 1);\n\t\tint style = styler.StyleAt(i);\n\t\tif (ch == '/' && chNext == '/' && style == SCE_DF_COMMENTLINE) {\n\t\t\treturn true;\n\t\t} else if (!IsASpaceOrTab(ch)) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn false;\n}\n\n\n\nstatic unsigned int GetFoldInPreprocessorLevelFlag(int lineFoldStateCurrent) {\n\treturn lineFoldStateCurrent & stateFoldInPreprocessorLevelMask;\n}\n\nstatic void SetFoldInPreprocessorLevelFlag(int &lineFoldStateCurrent, unsigned int nestLevel) {\n\tlineFoldStateCurrent &= ~stateFoldInPreprocessorLevelMask;\n\tlineFoldStateCurrent |= nestLevel & stateFoldInPreprocessorLevelMask;\n}\n\nstatic int ClassifyDataFlexPreprocessorFoldPoint(int &levelCurrent, int &lineFoldStateCurrent,\n\t\tSci_PositionU startPos, Accessor &styler) {\n\tCharacterSet setWord(CharacterSet::setAlpha);\n\n\tchar s[100];\t// Size of the longest possible keyword + one additional character + null\n\tGetForwardRangeLowered(startPos, setWord, styler, s, sizeof(s));\n\tsize_t iLen = strnlen(s,sizeof(s));\n\tsize_t iWordSize = 0;\n\n\tunsigned int nestLevel = GetFoldInPreprocessorLevelFlag(lineFoldStateCurrent);\n\n\tif (strcmp(s, \"command\") == 0 ||\n\t\t// The #if/#ifdef etcetera commands are not currently foldable as it is easy to write code that\n\t\t// breaks the collaps logic, so we keep things simple and not include that for now.\n\t\tstrcmp(s, \"header\") == 0) {\n\t\tnestLevel++;\n\t\tSetFoldInPreprocessorLevelFlag(lineFoldStateCurrent, nestLevel);\n\t\tlineFoldStateCurrent |= stateFoldInPreprocessor;\n\t\tlevelCurrent++;\n\t\tiWordSize = iLen;\n\t} else if (strcmp(s, \"endcommand\") == 0 ||\n\t\tstrcmp(s, \"endheader\") == 0) {\n\t\tnestLevel--;\n\t\tSetFoldInPreprocessorLevelFlag(lineFoldStateCurrent, nestLevel);\n\t\tif (nestLevel == 0) {\n\t\t\tlineFoldStateCurrent &= ~stateFoldInPreprocessor;\n\t\t}\n\t\tlevelCurrent--;\n\t\tiWordSize = iLen;\n\t\tif (levelCurrent < SC_FOLDLEVELBASE) {\n\t\t\tlevelCurrent = SC_FOLDLEVELBASE;\n\t\t}\n\t}\n\treturn static_cast<int>(iWordSize);\n}\n\n\nstatic void ClassifyDataFlexWordFoldPoint(int &levelCurrent, int &lineFoldStateCurrent,\n\t\tSci_PositionU lastStart, Sci_PositionU currentPos, WordList *[], Accessor &styler) {\n\tchar s[100];\n\n\t// property fold.dataflex.compilerlist\n\t//\tSet to 1 for enabling the code folding feature in *.prn files\n\tbool foldPRN = styler.GetPropertyInt(\"fold.dataflex.compilerlist\",0) != 0;\n\n\tGetRangeLowered(lastStart, currentPos, styler, s, sizeof(s));\n\n\tif (strcmp(s, \"case\") == 0) {\n\t\tlineFoldStateCurrent |= stateFoldInCaseStatement;\n\t} else if (strcmp(s, \"begin\") == 0) {\n\t\tlevelCurrent++;\n\t} else if (strcmp(s, \"for\") == 0 ||\n\t\tstrcmp(s, \"while\") == 0 ||\n\t\tstrcmp(s, \"repeat\") == 0 ||\n\t\tstrcmp(s, \"for_all\") == 0 ||\n\t\tstrcmp(s, \"struct\") == 0 ||\n\t\tstrcmp(s, \"type\") == 0 ||\n\t\tstrcmp(s, \"begin_row\") == 0 ||\n\t\tstrcmp(s, \"item_list\") == 0 ||\n\t\tstrcmp(s, \"begin_constraints\") == 0 ||\n\t\tstrcmp(s, \"begin_transaction\") == 0 ||\n\t\tstrcmp(s, \"enum_list\") == 0 ||\n\t\tstrcmp(s, \"class\") == 0 || \n\t\tstrcmp(s, \"object\") == 0 ||\n\t\tstrcmp(s, \"cd_popup_object\") == 0 ||\n\t\tstrcmp(s, \"procedure\") == 0 ||\n\t\tstrcmp(s, \"procedure_section\") == 0 ||\n\t\tstrcmp(s, \"function\") == 0 ) {\n\t\t\tif ((IsFirstDataFlexWord(lastStart, styler )) || foldPRN) {\n\t\t\tlevelCurrent++;\n\t\t\t}\n\t} else if (strcmp(s, \"end\") == 0) {  // end is not always the first keyword, for example \"case end\"\n\t\tlevelCurrent--;\n\t\tif (levelCurrent < SC_FOLDLEVELBASE) {\n\t\t\tlevelCurrent = SC_FOLDLEVELBASE;\n\t\t}\n\t} else if (strcmp(s, \"loop\") == 0 ||\n\t\t\t\t   strcmp(s, \"until\") == 0 ||\n\t\t\t\t   strcmp(s, \"end_class\") == 0 ||\n\t\t\t\t   strcmp(s, \"end_object\") == 0 ||\n\t\t\t\t   strcmp(s, \"cd_end_object\") == 0 ||\n\t\t\t\t   strcmp(s, \"end_procedure\") == 0 ||\n\t\t\t\t   strcmp(s, \"end_function\") == 0 ||\n\t\t\t\t   strcmp(s, \"end_for_all\") == 0 ||\n\t\t\t\t   strcmp(s, \"end_struct\") == 0 ||\n\t\t\t\t   strcmp(s, \"end_type\") == 0 ||\n\t\t\t\t   strcmp(s, \"end_row\") == 0 ||\n\t\t\t\t   strcmp(s, \"end_item_list\") == 0 ||\n\t\t\t\t   strcmp(s, \"end_constraints\") == 0 ||\n\t\t\t\t   strcmp(s, \"end_transaction\") == 0 ||\n\t\t\t\t   strcmp(s, \"end_enum_list\") == 0 ) {\n\t//\t\tlineFoldStateCurrent &= ~stateFoldInRecord;\n\t\t\tif ((IsFirstDataFlexWord(lastStart, styler )) || foldPRN) {\n\t\t\t\tlevelCurrent--;\n\t\t\t\tif (levelCurrent < SC_FOLDLEVELBASE) {\n\t\t\t\t\tlevelCurrent = SC_FOLDLEVELBASE;\n\t\t\t\t}\n\t\t\t}\n\t}\n\n}\n\n\nstatic void ClassifyDataFlexMetaDataFoldPoint(int &levelCurrent, \n\t\tSci_PositionU lastStart, Sci_PositionU currentPos, WordList *[], Accessor &styler) {\n\tchar s[100];\n\n\tGetRangeLowered(lastStart, currentPos, styler, s, sizeof(s));\n\n    if (strcmp(s, \"#beginsection\") == 0) {\n\t\tlevelCurrent++;\n\t} else if (strcmp(s, \"#endsection\") == 0) {\n\t\t\tlevelCurrent--;\n\t\t\tif (levelCurrent < SC_FOLDLEVELBASE) {\n\t\t\t\tlevelCurrent = SC_FOLDLEVELBASE;\n\t\t\t}\n\t}\n\n}\n\nstatic void FoldDataFlexDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[],\n\t\tAccessor &styler) {\n\tbool foldComment = styler.GetPropertyInt(\"fold.comment\") != 0;\n\tbool foldPreprocessor = styler.GetPropertyInt(\"fold.preprocessor\") != 0;\n\tbool foldCompact = styler.GetPropertyInt(\"fold.compact\", 1) != 0;\n\tSci_PositionU endPos = startPos + length;\n\tint visibleChars = 0;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tint levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK;\n\tint levelCurrent = levelPrev;\n\tint lineFoldStateCurrent = lineCurrent > 0 ? styler.GetLineState(lineCurrent - 1) & stateFoldMaskAll : 0;\n\tchar chNext = styler[startPos];\n\tint styleNext = styler.StyleAt(startPos);\n\tint style = initStyle;\n\tint iWordSize;\n\n\tSci_Position lastStart = 0;\n\tCharacterSet setWord(CharacterSet::setAlphaNum, \"_$#@\", 0x80, true);\n\n\tfor (Sci_PositionU i = startPos; i < endPos; i++) {\n\t\tchar ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\tint stylePrev = style;\n\t\tstyle = styleNext;\n\t\tstyleNext = styler.StyleAt(i + 1);\n\t\tbool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n\n\t\tif (foldComment && IsStreamCommentStyle(style)) {\n\t\t\tif (!IsStreamCommentStyle(stylePrev)) {\n\t\t\t\tlevelCurrent++;\n\t\t\t} else if (!IsStreamCommentStyle(styleNext)) {\n\t\t\t\tlevelCurrent--;\n\t\t\t}\n\t\t}\n\t\tif (foldComment && atEOL && IsCommentLine(lineCurrent, styler))\n\t\t{\n\t\t\tif (!IsCommentLine(lineCurrent - 1, styler)\n\t\t\t    && IsCommentLine(lineCurrent + 1, styler))\n\t\t\t\tlevelCurrent++;\n\t\t\telse if (IsCommentLine(lineCurrent - 1, styler)\n\t\t\t         && !IsCommentLine(lineCurrent+1, styler))\n\t\t\t\tlevelCurrent--;\n\t\t}\n\t\tif (foldPreprocessor) {\n\t\t\tif (style == SCE_DF_PREPROCESSOR) {\n\t\t\t\tiWordSize = ClassifyDataFlexPreprocessorFoldPoint(levelCurrent, lineFoldStateCurrent, i + 1, styler);\n\t\t\t//} else if (style == SCE_DF_PREPROCESSOR2 && ch == '(' && chNext == '*'\n\t\t\t//           && styler.SafeGetCharAt(i + 2) == '$') {\n\t\t\t//\tClassifyDataFlexPreprocessorFoldPoint(levelCurrent, lineFoldStateCurrent, i + 3, styler);\n\t\t\t\ti = i + iWordSize;\n\t\t\t}\n\t\t}\n\n\t\tif (stylePrev != SCE_DF_SCOPEWORD && style == SCE_DF_SCOPEWORD)\n\t\t{\n\t\t\t// Store last word start point.\n\t\t\tlastStart = i;\n\t\t}\n\t\tif (stylePrev == SCE_DF_SCOPEWORD) {\n\t\t\tif(setWord.Contains(ch) && !setWord.Contains(chNext)) {\n\t\t\t\tClassifyDataFlexWordFoldPoint(levelCurrent, lineFoldStateCurrent, lastStart, i, keywordlists, styler);\n\t\t\t}\n\t\t}\n\n\t\tif (stylePrev == SCE_DF_METATAG && ch == '#')\n\t\t{\n\t\t\t// Store last word start point.\n\t\t\tlastStart = i;\n\t\t}\n\t\tif (stylePrev == SCE_DF_METATAG) {\n\t\t\tif(setWord.Contains(ch) && !setWord.Contains(chNext)) {\n\t\t\t\tClassifyDataFlexMetaDataFoldPoint(levelCurrent, lastStart, i, keywordlists, styler);\n\t\t\t}\n\t\t}\n\n\t\tif (!IsASpace(ch))\n\t\t\tvisibleChars++;\n\n\t\tif (atEOL) {\n\t\t\tint lev = levelPrev;\n\t\t\tif (visibleChars == 0 && foldCompact)\n\t\t\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\t\t\tif ((levelCurrent > levelPrev) && (visibleChars > 0))\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\tif (lev != styler.LevelAt(lineCurrent)) {\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\t\t\t}\n\t\t\tint newLineState = (styler.GetLineState(lineCurrent) & ~stateFoldMaskAll) | lineFoldStateCurrent;\n\t\t\tstyler.SetLineState(lineCurrent, newLineState);\n\t\t\tlineCurrent++;\n\t\t\tlevelPrev = levelCurrent;\n\t\t\tvisibleChars = 0;\n\t\t}\n\t}\n\n\t// If we didn't reach the EOL in previous loop, store line level and whitespace information.\n\t// The rest will be filled in later...\n\tint lev = levelPrev;\n\tif (visibleChars == 0 && foldCompact)\n\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\tstyler.SetLevel(lineCurrent, lev);\n}\n\nstatic const char * const dataflexWordListDesc[] = {\n\t\"Keywords\",\n\t\"Scope open\",\n\t\"Scope close\",\n\t\"Operators\",\n\t0\n};\n\nLexerModule lmDataflex(SCLEX_DATAFLEX, ColouriseDataFlexDoc, \"dataflex\", FoldDataFlexDoc, dataflexWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexDiff.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexDiff.cxx\n ** Lexer for diff results.\n **/\n// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <cstdlib>\n#include <cassert>\n#include <cstring>\n#include <cctype>\n#include <cstdio>\n#include <cstdarg>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nnamespace {\n\ninline bool AtEOL(Accessor &styler, Sci_PositionU i) {\n\treturn (styler[i] == '\\n') ||\n\t       ((styler[i] == '\\r') && (styler.SafeGetCharAt(i + 1) != '\\n'));\n}\n\nvoid ColouriseDiffLine(const char *lineBuffer, Sci_Position endLine, Accessor &styler) {\n\t// It is needed to remember the current state to recognize starting\n\t// comment lines before the first \"diff \" or \"--- \". If a real\n\t// difference starts then each line starting with ' ' is a whitespace\n\t// otherwise it is considered a comment (Only in..., Binary file...)\n\tif (0 == strncmp(lineBuffer, \"diff \", 5)) {\n\t\tstyler.ColourTo(endLine, SCE_DIFF_COMMAND);\n\t} else if (0 == strncmp(lineBuffer, \"Index: \", 7)) {  // For subversion's diff\n\t\tstyler.ColourTo(endLine, SCE_DIFF_COMMAND);\n\t} else if (0 == strncmp(lineBuffer, \"---\", 3) && lineBuffer[3] != '-') {\n\t\t// In a context diff, --- appears in both the header and the position markers\n\t\tif (lineBuffer[3] == ' ' && atoi(lineBuffer + 4) && !strchr(lineBuffer, '/'))\n\t\t\tstyler.ColourTo(endLine, SCE_DIFF_POSITION);\n\t\telse if (lineBuffer[3] == '\\r' || lineBuffer[3] == '\\n')\n\t\t\tstyler.ColourTo(endLine, SCE_DIFF_POSITION);\n\t\telse if (lineBuffer[3] == ' ')\n\t\t\tstyler.ColourTo(endLine, SCE_DIFF_HEADER);\n\t\telse\n\t\t\tstyler.ColourTo(endLine, SCE_DIFF_DELETED);\n\t} else if (0 == strncmp(lineBuffer, \"+++ \", 4)) {\n\t\t// I don't know of any diff where \"+++ \" is a position marker, but for\n\t\t// consistency, do the same as with \"--- \" and \"*** \".\n\t\tif (atoi(lineBuffer+4) && !strchr(lineBuffer, '/'))\n\t\t\tstyler.ColourTo(endLine, SCE_DIFF_POSITION);\n\t\telse\n\t\t\tstyler.ColourTo(endLine, SCE_DIFF_HEADER);\n\t} else if (0 == strncmp(lineBuffer, \"====\", 4)) {  // For p4's diff\n\t\tstyler.ColourTo(endLine, SCE_DIFF_HEADER);\n\t} else if (0 == strncmp(lineBuffer, \"***\", 3)) {\n\t\t// In a context diff, *** appears in both the header and the position markers.\n\t\t// Also ******** is a chunk header, but here it's treated as part of the\n\t\t// position marker since there is no separate style for a chunk header.\n\t\tif (lineBuffer[3] == ' ' && atoi(lineBuffer+4) && !strchr(lineBuffer, '/'))\n\t\t\tstyler.ColourTo(endLine, SCE_DIFF_POSITION);\n\t\telse if (lineBuffer[3] == '*')\n\t\t\tstyler.ColourTo(endLine, SCE_DIFF_POSITION);\n\t\telse\n\t\t\tstyler.ColourTo(endLine, SCE_DIFF_HEADER);\n\t} else if (0 == strncmp(lineBuffer, \"? \", 2)) {    // For difflib\n\t\tstyler.ColourTo(endLine, SCE_DIFF_HEADER);\n\t} else if (lineBuffer[0] == '@') {\n\t\tstyler.ColourTo(endLine, SCE_DIFF_POSITION);\n\t} else if (lineBuffer[0] >= '0' && lineBuffer[0] <= '9') {\n\t\tstyler.ColourTo(endLine, SCE_DIFF_POSITION);\n\t} else if (0 == strncmp(lineBuffer, \"++\", 2)) {\n\t\tstyler.ColourTo(endLine, SCE_DIFF_PATCH_ADD);\n\t} else if (0 == strncmp(lineBuffer, \"+-\", 2)) {\n\t\tstyler.ColourTo(endLine, SCE_DIFF_PATCH_DELETE);\n\t} else if (0 == strncmp(lineBuffer, \"-+\", 2)) {\n\t\tstyler.ColourTo(endLine, SCE_DIFF_REMOVED_PATCH_ADD);\n\t} else if (0 == strncmp(lineBuffer, \"--\", 2)) {\n\t\tstyler.ColourTo(endLine, SCE_DIFF_REMOVED_PATCH_DELETE);\n\t} else if (lineBuffer[0] == '-' || lineBuffer[0] == '<') {\n\t\tstyler.ColourTo(endLine, SCE_DIFF_DELETED);\n\t} else if (lineBuffer[0] == '+' || lineBuffer[0] == '>') {\n\t\tstyler.ColourTo(endLine, SCE_DIFF_ADDED);\n\t} else if (lineBuffer[0] == '!') {\n\t\tstyler.ColourTo(endLine, SCE_DIFF_CHANGED);\n\t} else if (lineBuffer[0] != ' ') {\n\t\tstyler.ColourTo(endLine, SCE_DIFF_COMMENT);\n\t} else {\n\t\tstyler.ColourTo(endLine, SCE_DIFF_DEFAULT);\n\t}\n}\n\nvoid ColouriseDiffDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[], Accessor &styler) {\n\tstd::string lineBuffer;\n\tstyler.StartAt(startPos);\n\tstyler.StartSegment(startPos);\n\tfor (Sci_PositionU i = startPos; i < startPos + length; i++) {\n\t\tif (AtEOL(styler, i)) {\n\t\t\tColouriseDiffLine(lineBuffer.c_str(), i, styler);\n\t\t\tlineBuffer.clear();\n\t\t} else {\n\t\t\tlineBuffer.push_back(styler[i]);\n\t\t}\n\t}\n\tif (!lineBuffer.empty()) {\t// Last line does not have ending characters\n\t\tColouriseDiffLine(lineBuffer.c_str(), startPos + length - 1, styler);\n\t}\n}\n\nvoid FoldDiffDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[], Accessor &styler) {\n\tSci_Position curLine = styler.GetLine(startPos);\n\tSci_Position curLineStart = styler.LineStart(curLine);\n\tint prevLevel = curLine > 0 ? styler.LevelAt(curLine - 1) : SC_FOLDLEVELBASE;\n\n\tdo {\n\t\tint nextLevel = 0;\n\t\tconst int lineType = styler.StyleAt(curLineStart);\n\t\tif (lineType == SCE_DIFF_COMMAND)\n\t\t\tnextLevel = SC_FOLDLEVELBASE | SC_FOLDLEVELHEADERFLAG;\n\t\telse if (lineType == SCE_DIFF_HEADER)\n\t\t\tnextLevel = (SC_FOLDLEVELBASE + 1) | SC_FOLDLEVELHEADERFLAG;\n\t\telse if (lineType == SCE_DIFF_POSITION && styler[curLineStart] != '-')\n\t\t\tnextLevel = (SC_FOLDLEVELBASE + 2) | SC_FOLDLEVELHEADERFLAG;\n\t\telse if (prevLevel & SC_FOLDLEVELHEADERFLAG)\n\t\t\tnextLevel = (prevLevel & SC_FOLDLEVELNUMBERMASK) + 1;\n\t\telse\n\t\t\tnextLevel = prevLevel;\n\n\t\tif ((nextLevel & SC_FOLDLEVELHEADERFLAG) && (nextLevel == prevLevel))\n\t\t\tstyler.SetLevel(curLine-1, prevLevel & ~SC_FOLDLEVELHEADERFLAG);\n\n\t\tstyler.SetLevel(curLine, nextLevel);\n\t\tprevLevel = nextLevel;\n\n\t\tcurLineStart = styler.LineStart(++curLine);\n\t} while (static_cast<Sci_Position>(startPos)+length > curLineStart);\n}\n\nconst char *const emptyWordListDesc[] = {\n\tnullptr\n};\n\n}\n\nLexerModule lmDiff(SCLEX_DIFF, ColouriseDiffDoc, \"diff\", FoldDiffDoc, emptyWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexECL.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexECL.cxx\n ** Lexer for ECL.\n **/\n// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#ifdef _MSC_VER\n#pragma warning(disable: 4786)\n#endif\n#ifdef __BORLANDC__\n// Borland C++ displays warnings in vector header without this\n#pragma option -w-ccc -w-rch\n#endif\n\n#include <string>\n#include <string_view>\n#include <vector>\n#include <map>\n#include <algorithm>\n#include <functional>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"PropSetSimple.h\"\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n#include \"OptionSet.h\"\n\n#define SET_LOWER \"abcdefghijklmnopqrstuvwxyz\"\n#define SET_UPPER \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"\n#define SET_DIGITS \"0123456789\"\n\nusing namespace Lexilla;\n\nstatic bool IsSpaceEquiv(int state) {\n\tswitch (state) {\n\tcase SCE_ECL_DEFAULT:\n\tcase SCE_ECL_COMMENT:\n\tcase SCE_ECL_COMMENTLINE:\n\tcase SCE_ECL_COMMENTLINEDOC:\n\tcase SCE_ECL_COMMENTDOCKEYWORD:\n\tcase SCE_ECL_COMMENTDOCKEYWORDERROR:\n\tcase SCE_ECL_COMMENTDOC:\n\t\treturn true;\n\n\tdefault:\n\t\treturn false;\n\t}\n}\n\nstatic void ColouriseEclDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[],\n                            Accessor &styler) {\n\tWordList &keywords0 = *keywordlists[0];\n\tWordList &keywords1 = *keywordlists[1];\n\tWordList &keywords2 = *keywordlists[2];\n\tWordList &keywords3 = *keywordlists[3]; //Value Types\n\tWordList &keywords4 = *keywordlists[4];\n\tWordList &keywords5 = *keywordlists[5];\n\tWordList &keywords6 = *keywordlists[6];\t//Javadoc Tags\n\tWordList cplusplus;\n\tcplusplus.Set(\"beginc endc\");\n\n\tbool stylingWithinPreprocessor = false;\n\n\tCharacterSet setOKBeforeRE(CharacterSet::setNone, \"(=,\");\n\tCharacterSet setDoxygen(CharacterSet::setLower, \"$@\\\\&<>#{}[]\");\n\tCharacterSet setWordStart(CharacterSet::setAlpha, \"_\", 0x80, true);\n\tCharacterSet setWord(CharacterSet::setAlphaNum, \"._\", 0x80, true);\n\tCharacterSet setQualified(CharacterSet::setNone, \"uUxX\");\n\n\tint chPrevNonWhite = ' ';\n\tint visibleChars = 0;\n\tbool lastWordWasUUID = false;\n\tint styleBeforeDCKeyword = SCE_ECL_DEFAULT;\n\tbool continuationLine = false;\n\n\tif (initStyle == SCE_ECL_PREPROCESSOR) {\n\t\t// Set continuationLine if last character of previous line is '\\'\n\t\tSci_Position lineCurrent = styler.GetLine(startPos);\n\t\tif (lineCurrent > 0) {\n\t\t\tint chBack = styler.SafeGetCharAt(startPos-1, 0);\n\t\t\tint chBack2 = styler.SafeGetCharAt(startPos-2, 0);\n\t\t\tint lineEndChar = '!';\n\t\t\tif (chBack2 == '\\r' && chBack == '\\n') {\n\t\t\t\tlineEndChar = styler.SafeGetCharAt(startPos-3, 0);\n\t\t\t} else if (chBack == '\\n' || chBack == '\\r') {\n\t\t\t\tlineEndChar = chBack2;\n\t\t\t}\n\t\t\tcontinuationLine = lineEndChar == '\\\\';\n\t\t}\n\t}\n\n\t// look back to set chPrevNonWhite properly for better regex colouring\n\tif (startPos > 0) {\n\t\tSci_Position back = startPos;\n\t\twhile (--back && IsSpaceEquiv(styler.StyleAt(back)))\n\t\t\t;\n\t\tif (styler.StyleAt(back) == SCE_ECL_OPERATOR) {\n\t\t\tchPrevNonWhite = styler.SafeGetCharAt(back);\n\t\t}\n\t}\n\n\tStyleContext sc(startPos, length, initStyle, styler);\n\n\tfor (; sc.More(); sc.Forward()) {\n\t\tif (sc.atLineStart) {\n\t\t\tif (sc.state == SCE_ECL_STRING) {\n\t\t\t\t// Prevent SCE_ECL_STRINGEOL from leaking back to previous line which\n\t\t\t\t// ends with a line continuation by locking in the state upto this position.\n\t\t\t\tsc.SetState(SCE_ECL_STRING);\n\t\t\t}\n\t\t\t// Reset states to begining of colourise so no surprises\n\t\t\t// if different sets of lines lexed.\n\t\t\tvisibleChars = 0;\n\t\t\tlastWordWasUUID = false;\n\t\t}\n\n\t\t// Handle line continuation generically.\n\t\tif (sc.ch == '\\\\') {\n\t\t\tif (sc.chNext == '\\n' || sc.chNext == '\\r') {\n\t\t\t\tsc.Forward();\n\t\t\t\tif (sc.ch == '\\r' && sc.chNext == '\\n') {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t}\n\t\t\t\tcontinuationLine = true;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\t// Determine if the current state should terminate.\n\t\tswitch (sc.state) {\n\t\t\tcase SCE_ECL_ADDED:\n\t\t\tcase SCE_ECL_DELETED:\n\t\t\tcase SCE_ECL_CHANGED:\n\t\t\tcase SCE_ECL_MOVED:\n\t\t\tif (sc.atLineStart)\n\t\t\t\t\tsc.SetState(SCE_ECL_DEFAULT);\n\t\t\t\tbreak;\n\t\t\tcase SCE_ECL_OPERATOR:\n\t\t\t\tsc.SetState(SCE_ECL_DEFAULT);\n\t\t\t\tbreak;\n\t\t\tcase SCE_ECL_NUMBER:\n\t\t\t\t// We accept almost anything because of hex. and number suffixes\n\t\t\t\tif (!setWord.Contains(sc.ch)) {\n\t\t\t\t\tsc.SetState(SCE_ECL_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_ECL_IDENTIFIER:\n\t\t\t\tif (!setWord.Contains(sc.ch) || (sc.ch == '.')) {\n\t\t\t\t\tchar s[1000];\n\t\t\t\t\tsc.GetCurrentLowered(s, sizeof(s));\n\t\t\t\t\tif (keywords0.InList(s)) {\n\t\t\t\t\t\tlastWordWasUUID = strcmp(s, \"uuid\") == 0;\n\t\t\t\t\t\tsc.ChangeState(SCE_ECL_WORD0);\n\t\t\t\t\t} else if (keywords1.InList(s)) {\n\t\t\t\t\t\tsc.ChangeState(SCE_ECL_WORD1);\n\t\t\t\t\t} else if (keywords2.InList(s)) {\n\t\t\t\t\t\tsc.ChangeState(SCE_ECL_WORD2);\n\t\t\t\t\t} else if (keywords4.InList(s)) {\n\t\t\t\t\t\tsc.ChangeState(SCE_ECL_WORD4);\n\t\t\t\t\t} else if (keywords5.InList(s)) {\n\t\t\t\t\t\tsc.ChangeState(SCE_ECL_WORD5);\n\t\t\t\t\t}\n\t\t\t\t\telse\t//Data types are of from KEYWORD##\n\t\t\t\t\t{\n\t\t\t\t\t\tint i = static_cast<int>(strlen(s)) - 1;\n\t\t\t\t\t\twhile(i >= 0 && (isdigit(s[i]) || s[i] == '_'))\n\t\t\t\t\t\t\t--i;\n\n\t\t\t\t\t\tchar s2[1000];\n\t\t\t\t\t\tstrncpy(s2, s, i + 1);\n\t\t\t\t\t\ts2[i + 1] = 0;\n\t\t\t\t\t\tif (keywords3.InList(s2)) {\n\t\t\t\t\t\t\tsc.ChangeState(SCE_ECL_WORD3);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tsc.SetState(SCE_ECL_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_ECL_PREPROCESSOR:\n\t\t\t\tif (sc.atLineStart && !continuationLine) {\n\t\t\t\t\tsc.SetState(SCE_ECL_DEFAULT);\n\t\t\t\t} else if (stylingWithinPreprocessor) {\n\t\t\t\t\tif (IsASpace(sc.ch)) {\n\t\t\t\t\t\tsc.SetState(SCE_ECL_DEFAULT);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (sc.Match('/', '*') || sc.Match('/', '/')) {\n\t\t\t\t\t\tsc.SetState(SCE_ECL_DEFAULT);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_ECL_COMMENT:\n\t\t\t\tif (sc.Match('*', '/')) {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\tsc.ForwardSetState(SCE_ECL_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_ECL_COMMENTDOC:\n\t\t\t\tif (sc.Match('*', '/')) {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\tsc.ForwardSetState(SCE_ECL_DEFAULT);\n\t\t\t\t} else if (sc.ch == '@' || sc.ch == '\\\\') { // JavaDoc and Doxygen support\n\t\t\t\t\t// Verify that we have the conditions to mark a comment-doc-keyword\n\t\t\t\t\tif ((IsASpace(sc.chPrev) || sc.chPrev == '*') && (!IsASpace(sc.chNext))) {\n\t\t\t\t\t\tstyleBeforeDCKeyword = SCE_ECL_COMMENTDOC;\n\t\t\t\t\t\tsc.SetState(SCE_ECL_COMMENTDOCKEYWORD);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_ECL_COMMENTLINE:\n\t\t\t\tif (sc.atLineStart) {\n\t\t\t\t\tsc.SetState(SCE_ECL_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_ECL_COMMENTLINEDOC:\n\t\t\t\tif (sc.atLineStart) {\n\t\t\t\t\tsc.SetState(SCE_ECL_DEFAULT);\n\t\t\t\t} else if (sc.ch == '@' || sc.ch == '\\\\') { // JavaDoc and Doxygen support\n\t\t\t\t\t// Verify that we have the conditions to mark a comment-doc-keyword\n\t\t\t\t\tif ((IsASpace(sc.chPrev) || sc.chPrev == '/' || sc.chPrev == '!') && (!IsASpace(sc.chNext))) {\n\t\t\t\t\t\tstyleBeforeDCKeyword = SCE_ECL_COMMENTLINEDOC;\n\t\t\t\t\t\tsc.SetState(SCE_ECL_COMMENTDOCKEYWORD);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_ECL_COMMENTDOCKEYWORD:\n\t\t\t\tif ((styleBeforeDCKeyword == SCE_ECL_COMMENTDOC) && sc.Match('*', '/')) {\n\t\t\t\t\tsc.ChangeState(SCE_ECL_COMMENTDOCKEYWORDERROR);\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\tsc.ForwardSetState(SCE_ECL_DEFAULT);\n\t\t\t\t} else if (!setDoxygen.Contains(sc.ch)) {\n\t\t\t\t\tchar s[1000];\n\t\t\t\t\tsc.GetCurrentLowered(s, sizeof(s));\n\t\t\t\t\tif (!IsASpace(sc.ch) || !keywords6.InList(s+1)) {\n\t\t\t\t\t\tsc.ChangeState(SCE_ECL_COMMENTDOCKEYWORDERROR);\n\t\t\t\t\t}\n\t\t\t\t\tsc.SetState(styleBeforeDCKeyword);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_ECL_STRING:\n\t\t\t\tif (sc.atLineEnd) {\n\t\t\t\t\tsc.ChangeState(SCE_ECL_STRINGEOL);\n\t\t\t\t} else if (sc.ch == '\\\\') {\n\t\t\t\t\tif (sc.chNext == '\\\"' || sc.chNext == '\\'' || sc.chNext == '\\\\') {\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t}\n\t\t\t\t} else if (sc.ch == '\\\"') {\n\t\t\t\t\tsc.ForwardSetState(SCE_ECL_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_ECL_CHARACTER:\n\t\t\t\tif (sc.atLineEnd) {\n\t\t\t\t\tsc.ChangeState(SCE_ECL_STRINGEOL);\n\t\t\t\t} else if (sc.ch == '\\\\') {\n\t\t\t\t\tif (sc.chNext == '\\\"' || sc.chNext == '\\'' || sc.chNext == '\\\\') {\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t}\n\t\t\t\t} else if (sc.ch == '\\'') {\n\t\t\t\t\tsc.ForwardSetState(SCE_ECL_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_ECL_REGEX:\n\t\t\t\tif (sc.atLineStart) {\n\t\t\t\t\tsc.SetState(SCE_ECL_DEFAULT);\n\t\t\t\t} else if (sc.ch == '/') {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\twhile ((sc.ch < 0x80) && islower(sc.ch))\n\t\t\t\t\t\tsc.Forward();    // gobble regex flags\n\t\t\t\t\tsc.SetState(SCE_ECL_DEFAULT);\n\t\t\t\t} else if (sc.ch == '\\\\') {\n\t\t\t\t\t// Gobble up the quoted character\n\t\t\t\t\tif (sc.chNext == '\\\\' || sc.chNext == '/') {\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_ECL_STRINGEOL:\n\t\t\t\tif (sc.atLineStart) {\n\t\t\t\t\tsc.SetState(SCE_ECL_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_ECL_VERBATIM:\n\t\t\t\tif (sc.ch == '\\\"') {\n\t\t\t\t\tif (sc.chNext == '\\\"') {\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsc.ForwardSetState(SCE_ECL_DEFAULT);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_ECL_UUID:\n\t\t\t\tif (sc.ch == '\\r' || sc.ch == '\\n' || sc.ch == ')') {\n\t\t\t\t\tsc.SetState(SCE_ECL_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// Determine if a new state should be entered.\n\t\tSci_Position lineCurrent = styler.GetLine(sc.currentPos);\n\t\tint lineState = styler.GetLineState(lineCurrent);\n\t\tif (sc.state == SCE_ECL_DEFAULT) {\n\t\t\tif (lineState) {\n\t\t\t\tsc.SetState(lineState);\n\t\t\t}\n\t\t\telse if (sc.Match('@', '\\\"')) {\n\t\t\t\tsc.SetState(SCE_ECL_VERBATIM);\n\t\t\t\tsc.Forward();\n\t\t\t} else if (setQualified.Contains(sc.ch) && sc.chNext == '\\'') {\n\t\t\t\tsc.SetState(SCE_ECL_CHARACTER);\n\t\t\t\tsc.Forward();\n\t\t\t} else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) {\n\t\t\t\tif (lastWordWasUUID) {\n\t\t\t\t\tsc.SetState(SCE_ECL_UUID);\n\t\t\t\t\tlastWordWasUUID = false;\n\t\t\t\t} else {\n\t\t\t\t\tsc.SetState(SCE_ECL_NUMBER);\n\t\t\t\t}\n\t\t\t} else if (setWordStart.Contains(sc.ch) || (sc.ch == '@')) {\n\t\t\t\tif (lastWordWasUUID) {\n\t\t\t\t\tsc.SetState(SCE_ECL_UUID);\n\t\t\t\t\tlastWordWasUUID = false;\n\t\t\t\t} else {\n\t\t\t\t\tsc.SetState(SCE_ECL_IDENTIFIER);\n\t\t\t\t}\n\t\t\t} else if (sc.Match('/', '*')) {\n\t\t\t\tif (sc.Match(\"/**\") || sc.Match(\"/*!\")) {\t// Support of Qt/Doxygen doc. style\n\t\t\t\t\tsc.SetState(SCE_ECL_COMMENTDOC);\n\t\t\t\t} else {\n\t\t\t\t\tsc.SetState(SCE_ECL_COMMENT);\n\t\t\t\t}\n\t\t\t\tsc.Forward();\t// Eat the * so it isn't used for the end of the comment\n\t\t\t} else if (sc.Match('/', '/')) {\n\t\t\t\tif ((sc.Match(\"///\") && !sc.Match(\"////\")) || sc.Match(\"//!\"))\n\t\t\t\t\t// Support of Qt/Doxygen doc. style\n\t\t\t\t\tsc.SetState(SCE_ECL_COMMENTLINEDOC);\n\t\t\t\telse\n\t\t\t\t\tsc.SetState(SCE_ECL_COMMENTLINE);\n\t\t\t} else if (sc.ch == '/' && setOKBeforeRE.Contains(chPrevNonWhite)) {\n\t\t\t\tsc.SetState(SCE_ECL_REGEX);\t// JavaScript's RegEx\n//\t\t\t} else if (sc.ch == '\\\"') {\n//\t\t\t\tsc.SetState(SCE_ECL_STRING);\n\t\t\t} else if (sc.ch == '\\'') {\n\t\t\t\tsc.SetState(SCE_ECL_CHARACTER);\n\t\t\t} else if (sc.ch == '#' && visibleChars == 0) {\n\t\t\t\t// Preprocessor commands are alone on their line\n\t\t\t\tsc.SetState(SCE_ECL_PREPROCESSOR);\n\t\t\t\t// Skip whitespace between # and preprocessor word\n\t\t\t\tdo {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t} while ((sc.ch == ' ' || sc.ch == '\\t') && sc.More());\n\t\t\t\tif (sc.atLineEnd) {\n\t\t\t\t\tsc.SetState(SCE_ECL_DEFAULT);\n\t\t\t\t}\n\t\t\t} else if (isoperator(static_cast<char>(sc.ch))) {\n\t\t\t\tsc.SetState(SCE_ECL_OPERATOR);\n\t\t\t}\n\t\t}\n\n\t\tif (!IsASpace(sc.ch) && !IsSpaceEquiv(sc.state)) {\n\t\t\tchPrevNonWhite = sc.ch;\n\t\t\tvisibleChars++;\n\t\t}\n\t\tcontinuationLine = false;\n\t}\n\tsc.Complete();\n\n}\n\nstatic bool IsStreamCommentStyle(int style) {\n\treturn style == SCE_ECL_COMMENT ||\n\t\tstyle == SCE_ECL_COMMENTDOC ||\n\t\tstyle == SCE_ECL_COMMENTDOCKEYWORD ||\n\t\tstyle == SCE_ECL_COMMENTDOCKEYWORDERROR;\n}\n\nstatic bool MatchNoCase(Accessor & styler, Sci_PositionU & pos, const char *s) {\n\tSci_Position i=0;\n\tfor (; *s; i++) {\n\t\tchar compare_char = tolower(*s);\n\t\tchar styler_char = tolower(styler.SafeGetCharAt(pos+i));\n\t\tif (compare_char != styler_char)\n\t\t\treturn false;\n\t\ts++;\n\t}\n\tpos+=i-1;\n\treturn true;\n}\n\n\n// Store both the current line's fold level and the next lines in the\n// level store to make it easy to pick up with each increment\n// and to make it possible to fiddle the current level for \"} else {\".\nstatic void FoldEclDoc(Sci_PositionU startPos, Sci_Position length, int initStyle,\n\t\t\t\t\t   WordList *[], Accessor &styler) {\n\tbool foldComment = true;\n\tbool foldPreprocessor = true;\n\tbool foldCompact = true;\n\tbool foldAtElse = true;\n\tSci_PositionU endPos = startPos + length;\n\tint visibleChars = 0;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tint levelCurrent = SC_FOLDLEVELBASE;\n\tif (lineCurrent > 0)\n\t\tlevelCurrent = styler.LevelAt(lineCurrent-1) >> 16;\n\tint levelMinCurrent = levelCurrent;\n\tint levelNext = levelCurrent;\n\tchar chNext = styler[startPos];\n\tint styleNext = styler.StyleAt(startPos);\n\tint style = initStyle;\n\tfor (Sci_PositionU i = startPos; i < endPos; i++) {\n\t\tchar ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\tint stylePrev = style;\n\t\tstyle = styleNext;\n\t\tstyleNext = styler.StyleAt(i + 1);\n\t\tbool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n\t\tif (foldComment && IsStreamCommentStyle(style)) {\n\t\t\tif (!IsStreamCommentStyle(stylePrev) && (stylePrev != SCE_ECL_COMMENTLINEDOC)) {\n\t\t\t\tlevelNext++;\n\t\t\t} else if (!IsStreamCommentStyle(styleNext) && (styleNext != SCE_ECL_COMMENTLINEDOC) && !atEOL) {\n\t\t\t\t// Comments don't end at end of line and the next character may be unstyled.\n\t\t\t\tlevelNext--;\n\t\t\t}\n\t\t}\n\t\tif (foldComment && (style == SCE_ECL_COMMENTLINE)) {\n\t\t\tif ((ch == '/') && (chNext == '/')) {\n\t\t\t\tchar chNext2 = styler.SafeGetCharAt(i + 2);\n\t\t\t\tif (chNext2 == '{') {\n\t\t\t\t\tlevelNext++;\n\t\t\t\t} else if (chNext2 == '}') {\n\t\t\t\t\tlevelNext--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (foldPreprocessor && (style == SCE_ECL_PREPROCESSOR)) {\n\t\t\tif (ch == '#') {\n\t\t\t\tSci_PositionU j = i + 1;\n\t\t\t\twhile ((j < endPos) && IsASpaceOrTab(styler.SafeGetCharAt(j))) {\n\t\t\t\t\tj++;\n\t\t\t\t}\n\t\t\t\tif (MatchNoCase(styler, j, \"region\") || MatchNoCase(styler, j, \"if\")) {\n\t\t\t\t\tlevelNext++;\n\t\t\t\t} else if (MatchNoCase(styler, j, \"endregion\") || MatchNoCase(styler, j, \"end\")) {\n\t\t\t\t\tlevelNext--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (style == SCE_ECL_OPERATOR) {\n\t\t\tif (ch == '{') {\n\t\t\t\t// Measure the minimum before a '{' to allow\n\t\t\t\t// folding on \"} else {\"\n\t\t\t\tif (levelMinCurrent > levelNext) {\n\t\t\t\t\tlevelMinCurrent = levelNext;\n\t\t\t\t}\n\t\t\t\tlevelNext++;\n\t\t\t} else if (ch == '}') {\n\t\t\t\tlevelNext--;\n\t\t\t}\n\t\t}\n\t\tif (style == SCE_ECL_WORD2) {\n\t\t\tif (MatchNoCase(styler, i, \"record\") || MatchNoCase(styler, i, \"transform\") || MatchNoCase(styler, i, \"type\") || MatchNoCase(styler, i, \"function\") ||\n\t\t\t\tMatchNoCase(styler, i, \"module\") || MatchNoCase(styler, i, \"service\") || MatchNoCase(styler, i, \"interface\") || MatchNoCase(styler, i, \"ifblock\") ||\n\t\t\t\tMatchNoCase(styler, i, \"macro\") || MatchNoCase(styler, i, \"beginc++\")) {\n\t\t\t\tlevelNext++;\n\t\t\t} else if (MatchNoCase(styler, i, \"endmacro\") || MatchNoCase(styler, i, \"endc++\") || MatchNoCase(styler, i, \"end\")) {\n\t\t\t\tlevelNext--;\n\t\t\t}\n\t\t}\n\t\tif (atEOL || (i == endPos-1)) {\n\t\t\tint levelUse = levelCurrent;\n\t\t\tif (foldAtElse) {\n\t\t\t\tlevelUse = levelMinCurrent;\n\t\t\t}\n\t\t\tint lev = levelUse | levelNext << 16;\n\t\t\tif (visibleChars == 0 && foldCompact)\n\t\t\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\t\t\tif (levelUse < levelNext)\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\tif (lev != styler.LevelAt(lineCurrent)) {\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\t\t\t}\n\t\t\tlineCurrent++;\n\t\t\tlevelCurrent = levelNext;\n\t\t\tlevelMinCurrent = levelCurrent;\n\t\t\tif (atEOL && (i == static_cast<Sci_PositionU>(styler.Length()-1))) {\n\t\t\t\t// There is an empty line at end of file so give it same level and empty\n\t\t\t\tstyler.SetLevel(lineCurrent, (levelCurrent | levelCurrent << 16) | SC_FOLDLEVELWHITEFLAG);\n\t\t\t}\n\t\t\tvisibleChars = 0;\n\t\t}\n\t\tif (!IsASpace(ch))\n\t\t\tvisibleChars++;\n\t}\n}\n\nstatic const char * const EclWordListDesc[] = {\n\t\"Keywords\",\n\t0\n};\n\nLexerModule lmECL(\n   SCLEX_ECL,\n   ColouriseEclDoc,\n   \"ecl\",\n   FoldEclDoc,\n   EclWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexEDIFACT.cxx",
    "content": "// Scintilla Lexer for EDIFACT\n// @file LexEDIFACT.cxx\n// Written by Iain Clarke, IMCSoft & Inobiz AB.\n// EDIFACT documented here: https://www.unece.org/cefact/edifact/welcome.html\n// and more readably here: https://en.wikipedia.org/wiki/EDIFACT\n// This code is subject to the same license terms as the rest of the scintilla project:\n// The License.txt file describes the conditions under which this software may be distributed.\n//\n\n// Header order must match order in scripts/HeaderOrder.txt\n#include <cstdlib>\n#include <cassert>\n#include <cstring>\n#include <cctype>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"LexAccessor.h\"\n#include \"LexerModule.h\"\n#include \"DefaultLexer.h\"\n\nusing namespace Scintilla;\nusing namespace Lexilla;\n\nclass LexerEDIFACT : public DefaultLexer\n{\npublic:\n\tLexerEDIFACT();\n\tvirtual ~LexerEDIFACT() {} // virtual destructor, as we inherit from ILexer\n\n\tstatic ILexer5 *Factory() {\n\t\treturn new LexerEDIFACT;\n\t}\n\n\tint SCI_METHOD Version() const override\n\t{\n\t\treturn lvRelease5;\n\t}\n\tvoid SCI_METHOD Release() override\n\t{\n\t\tdelete this;\n\t}\n\n\tconst char * SCI_METHOD PropertyNames() override\n\t{\n\t\treturn \"fold\\nlexer.edifact.highlight.un.all\";\n\t}\n\tint SCI_METHOD PropertyType(const char *) override\n\t{\n\t\treturn SC_TYPE_BOOLEAN; // Only one property!\n\t}\n\tconst char * SCI_METHOD DescribeProperty(const char *name) override\n\t{\n\t\tif (!strcmp(name, \"fold\"))\n\t\t\treturn \"Whether to apply folding to document or not\";\n\t\tif (!strcmp(name, \"lexer.edifact.highlight.un.all\"))\n\t\t\treturn \"Whether to apply UN* highlighting to all UN segments, or just to UNH\";\n\t\treturn NULL;\n\t}\n\n\tSci_Position SCI_METHOD PropertySet(const char *key, const char *val) override\n\t{\n\t\tif (!strcmp(key, \"fold\"))\n\t\t{\n\t\t\tm_bFold = strcmp(val, \"0\") ? true : false;\n\t\t\treturn 0;\n\t\t}\n\t\tif (!strcmp(key, \"lexer.edifact.highlight.un.all\"))\t// GetProperty\n\t\t{\n\t\t\tm_bHighlightAllUN = strcmp(val, \"0\") ? true : false;\n\t\t\treturn 0;\n\t\t}\n\t\treturn -1;\n\t}\n\n\tconst char * SCI_METHOD PropertyGet(const char *key) override\n\t{\n\t\tm_lastPropertyValue = \"\";\n\t\tif (!strcmp(key, \"fold\"))\n\t\t{\n\t\t\tm_lastPropertyValue = m_bFold ? \"1\" : \"0\";\n\t\t}\n\t\tif (!strcmp(key, \"lexer.edifact.highlight.un.all\"))\t// GetProperty\n\t\t{\n\t\t\tm_lastPropertyValue = m_bHighlightAllUN ? \"1\" : \"0\";\n\t\t}\n\t\treturn m_lastPropertyValue.c_str();\n\t}\n\n\tconst char * SCI_METHOD DescribeWordListSets() override\n\t{\n\t\treturn NULL;\n\t}\n\tSci_Position SCI_METHOD WordListSet(int, const char *) override\n\t{\n\t\treturn -1;\n\t}\n\tvoid SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;\n\tvoid SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;\n\tvoid * SCI_METHOD PrivateCall(int, void *) override\n\t{\n\t\treturn NULL;\n\t}\n\nprotected:\n\tSci_Position InitialiseFromUNA(IDocument *pAccess, Sci_PositionU MaxLength);\n\tSci_Position FindPreviousEnd(IDocument *pAccess, Sci_Position startPos) const;\n\tSci_Position ForwardPastWhitespace(IDocument *pAccess, Sci_Position startPos, Sci_Position MaxLength) const;\n\tint DetectSegmentHeader(char SegmentHeader[3]) const;\n\n\tbool m_bFold;\n\n\t// property lexer.edifact.highlight.un.all\n\t//\tSet to 0 to highlight only UNA segments, or 1 to highlight all UNx segments.\n\tbool m_bHighlightAllUN;\n\n\tchar m_chComponent;\n\tchar m_chData;\n\tchar m_chDecimal;\n\tchar m_chRelease;\n\tchar m_chSegment;\n\n\tstd::string m_lastPropertyValue;\n};\n\nLexerModule lmEDIFACT(SCLEX_EDIFACT, LexerEDIFACT::Factory, \"edifact\");\n\n///////////////////////////////////////////////////////////////////////////////\n\n\n\n///////////////////////////////////////////////////////////////////////////////\n\nLexerEDIFACT::LexerEDIFACT() : DefaultLexer(\"edifact\", SCLEX_EDIFACT)\n{\n\tm_bFold = false;\n\tm_bHighlightAllUN = false;\n\tm_chComponent = ':';\n\tm_chData = '+';\n\tm_chDecimal = '.';\n\tm_chRelease = '?';\n\tm_chSegment = '\\'';\n}\n\nvoid LexerEDIFACT::Lex(Sci_PositionU startPos, Sci_Position length, int, IDocument *pAccess)\n{\n\tSci_PositionU posFinish = startPos + length;\n\tInitialiseFromUNA(pAccess, posFinish);\n\n\t// Look backwards for a ' or a document beginning\n\tSci_PositionU posCurrent = FindPreviousEnd(pAccess, startPos);\n\t// And jump past the ' if this was not the beginning of the document\n\tif (posCurrent != 0)\n\t\tposCurrent++;\n\n\t// Style buffer, so we're not issuing loads of notifications\n\tLexAccessor styler (pAccess);\n\tpAccess->StartStyling(posCurrent);\n\tstyler.StartSegment(posCurrent);\n\tSci_Position posSegmentStart = -1;\n\n\twhile ((posCurrent < posFinish) && (posSegmentStart == -1))\n\t{\n\t\tposCurrent = ForwardPastWhitespace(pAccess, posCurrent, posFinish);\n\t\t// Mark whitespace as default\n\t\tstyler.ColourTo(posCurrent - 1, SCE_EDI_DEFAULT);\n\t\tif (posCurrent >= posFinish)\n\t\t\tbreak;\n\n\t\t// Does is start with 3 charaters? ie, UNH\n\t\tchar SegmentHeader[4] = { 0 };\n\t\tpAccess->GetCharRange(SegmentHeader, posCurrent, 3);\n\n\t\tint SegmentStyle = DetectSegmentHeader(SegmentHeader);\n\t\tif (SegmentStyle == SCE_EDI_BADSEGMENT)\n\t\t\tbreak;\n\t\tif (SegmentStyle == SCE_EDI_UNA)\n\t\t{\n\t\t\tposCurrent += 9;\n\t\t\tstyler.ColourTo(posCurrent - 1, SCE_EDI_UNA); // UNA\n\t\t\tcontinue;\n\t\t}\n\t\tposSegmentStart = posCurrent;\n\t\tposCurrent += 3;\n\n\t\tstyler.ColourTo(posCurrent - 1, SegmentStyle); // UNH etc\n\n\t\t// Colour in the rest of the segment\n\t\tfor (char c; posCurrent < posFinish; posCurrent++)\n\t\t{\n\t\t\tpAccess->GetCharRange(&c, posCurrent, 1);\n\n\t\t\tif (c == m_chRelease) // ? escape character, check first, in case of ?'\n\t\t\t\tposCurrent++;\n\t\t\telse if (c == m_chSegment) // '\n\t\t\t{\n\t\t\t\t// Make sure the whole segment is on one line. styler won't let us go back in time, so we'll settle for marking the ' as bad.\n\t\t\t\tSci_Position lineSegmentStart = pAccess->LineFromPosition(posSegmentStart);\n\t\t\t\tSci_Position lineSegmentEnd = pAccess->LineFromPosition(posCurrent);\n\t\t\t\tif (lineSegmentStart == lineSegmentEnd)\n\t\t\t\t\tstyler.ColourTo(posCurrent, SCE_EDI_SEGMENTEND);\n\t\t\t\telse\n\t\t\t\t\tstyler.ColourTo(posCurrent, SCE_EDI_BADSEGMENT);\n\t\t\t\tposSegmentStart = -1;\n\t\t\t\tposCurrent++;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse if (c == m_chComponent) // :\n\t\t\t\tstyler.ColourTo(posCurrent, SCE_EDI_SEP_COMPOSITE);\n\t\t\telse if (c == m_chData) // +\n\t\t\t\tstyler.ColourTo(posCurrent, SCE_EDI_SEP_ELEMENT);\n\t\t\telse\n\t\t\t\tstyler.ColourTo(posCurrent, SCE_EDI_DEFAULT);\n\t\t}\n\t}\n\tstyler.Flush();\n\n\tif (posSegmentStart == -1)\n\t\treturn;\n\n\tpAccess->StartStyling(posSegmentStart);\n\tpAccess->SetStyleFor(posFinish - posSegmentStart, SCE_EDI_BADSEGMENT);\n}\n\nvoid LexerEDIFACT::Fold(Sci_PositionU startPos, Sci_Position length, int, IDocument *pAccess)\n{\n\tif (!m_bFold)\n\t\treturn;\n\n\tSci_PositionU endPos = startPos + length;\n\tstartPos = FindPreviousEnd(pAccess, startPos);\n\tchar c;\n\tchar SegmentHeader[4] = { 0 };\n\n\tbool AwaitingSegment = true;\n\tSci_PositionU currLine = pAccess->LineFromPosition(startPos);\n\tint levelCurrentStyle = SC_FOLDLEVELBASE;\n\tif (currLine > 0)\n\t\tlevelCurrentStyle = pAccess->GetLevel(currLine - 1); // bottom 12 bits are level\n\tint indentCurrent = levelCurrentStyle & SC_FOLDLEVELNUMBERMASK;\n\tint indentNext = indentCurrent;\n\n\twhile (startPos < endPos)\n\t{\n\t\tpAccess->GetCharRange(&c, startPos, 1);\n\t\tswitch (c)\n\t\t{\n\t\tcase '\\t':\n\t\tcase '\\r':\n\t\tcase ' ':\n\t\t\tstartPos++;\n\t\t\tcontinue;\n\t\tcase '\\n':\n\t\t\tcurrLine = pAccess->LineFromPosition(startPos);\n\t\t\tpAccess->SetLevel(currLine, levelCurrentStyle | indentCurrent);\n\t\t\tstartPos++;\n\t\t\tlevelCurrentStyle = SC_FOLDLEVELBASE;\n\t\t\tindentCurrent = indentNext;\n\t\t\tcontinue;\n\t\t}\n\t\tif (c == m_chRelease)\n\t\t{\n\t\t\tstartPos += 2;\n\t\t\tcontinue;\n\t\t}\n\t\tif (c == m_chSegment)\n\t\t{\n\t\t\tAwaitingSegment = true;\n\t\t\tstartPos++;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (!AwaitingSegment)\n\t\t{\n\t\t\tstartPos++;\n\t\t\tcontinue;\n\t\t}\n\t\t\n\t\t// Segment!\n\t\tpAccess->GetCharRange(SegmentHeader, startPos, 3);\n\t\tif (SegmentHeader[0] != 'U' || SegmentHeader[1] != 'N')\n\t\t{\n\t\t\tstartPos++;\n\t\t\tcontinue;\n\t\t}\n\n\t\tAwaitingSegment = false;\n\t\tswitch (SegmentHeader[2])\n\t\t{\n\t\tcase 'H':\n\t\tcase 'G':\n\t\t\tindentNext++;\n\t\t\tlevelCurrentStyle = SC_FOLDLEVELBASE | SC_FOLDLEVELHEADERFLAG;\n\t\t\tbreak;\n\n\t\tcase 'T':\n\t\tcase 'E':\n\t\t\tif (indentNext > 0)\n\t\t\t\tindentNext--;\n\t\t\tbreak;\n\t\t}\n\n\t\tstartPos += 3;\n\t}\n}\n\nSci_Position LexerEDIFACT::InitialiseFromUNA(IDocument *pAccess, Sci_PositionU MaxLength)\n{\n\tMaxLength -= 9; // drop 9 chars, to give us room for UNA:+.? '\n\n\tSci_PositionU startPos = 0;\n\tstartPos += ForwardPastWhitespace(pAccess, 0, MaxLength);\n\tif (startPos < MaxLength)\n\t{\n\t\tchar bufUNA[9];\n\t\tpAccess->GetCharRange(bufUNA, startPos, 9);\n\n\t\t// Check it's UNA segment\n\t\tif (!memcmp(bufUNA, \"UNA\", 3))\n\t\t{\n\t\t\tm_chComponent = bufUNA[3];\n\t\t\tm_chData = bufUNA[4];\n\t\t\tm_chDecimal = bufUNA[5];\n\t\t\tm_chRelease = bufUNA[6];\n\t\t\t// bufUNA [7] should be space - reserved.\n\t\t\tm_chSegment = bufUNA[8];\n\n\t\t\treturn 0; // success!\n\t\t}\n\t}\n\n\t// We failed to find a UNA, so drop to defaults\n\tm_chComponent = ':';\n\tm_chData = '+';\n\tm_chDecimal = '.';\n\tm_chRelease = '?';\n\tm_chSegment = '\\'';\n\n\treturn -1;\n}\n\nSci_Position LexerEDIFACT::ForwardPastWhitespace(IDocument *pAccess, Sci_Position startPos, Sci_Position MaxLength) const\n{\n\tchar c;\n\n\twhile (startPos < MaxLength)\n\t{\n\t\tpAccess->GetCharRange(&c, startPos, 1);\n\t\tswitch (c)\n\t\t{\n\t\tcase '\\t':\n\t\tcase '\\r':\n\t\tcase '\\n':\n\t\tcase ' ':\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn startPos;\n\t\t}\n\n\t\tstartPos++;\n\t}\n\n\treturn MaxLength;\n}\n\nint LexerEDIFACT::DetectSegmentHeader(char SegmentHeader[3]) const\n{\n\tif (\n\t\tSegmentHeader[0] < 'A' || SegmentHeader[0] > 'Z' ||\n\t\tSegmentHeader[1] < 'A' || SegmentHeader[1] > 'Z' ||\n\t\tSegmentHeader[2] < 'A' || SegmentHeader[2] > 'Z')\n\t\treturn SCE_EDI_BADSEGMENT;\n\n\tif (!memcmp(SegmentHeader, \"UNA\", 3))\n\t\treturn SCE_EDI_UNA;\n\n\tif (m_bHighlightAllUN && !memcmp(SegmentHeader, \"UN\", 2))\n\t\treturn SCE_EDI_UNH;\n\telse if (!memcmp(SegmentHeader, \"UNH\", 3))\n\t\treturn SCE_EDI_UNH;\n\telse if (!memcmp(SegmentHeader, \"UNG\", 3))\n\t\treturn SCE_EDI_UNH;\n\n\treturn SCE_EDI_SEGMENTSTART;\n}\n\n// Look backwards for a ' or a document beginning\nSci_Position LexerEDIFACT::FindPreviousEnd(IDocument *pAccess, Sci_Position startPos) const\n{\n\tfor (char c; startPos > 0; startPos--)\n\t{\n\t\tpAccess->GetCharRange(&c, startPos, 1);\n\t\tif (c == m_chSegment)\n\t\t\treturn startPos;\n\t}\n\t// We didn't find a ', so just go with the beginning\n\treturn 0;\n}\n\n\n"
  },
  {
    "path": "lexilla/lexers/LexEScript.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexEScript.cxx\n ** Lexer for ESCRIPT\n **/\n// Copyright 2003 by Patrizio Bekerle (patrizio@bekerle.com)\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\n\nstatic inline bool IsAWordChar(const int ch) {\n\treturn (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_');\n}\n\nstatic inline bool IsAWordStart(const int ch) {\n\treturn (ch < 0x80) && (isalnum(ch) || ch == '_');\n}\n\n\n\nstatic void ColouriseESCRIPTDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[],\n                            Accessor &styler) {\n\n\tWordList &keywords = *keywordlists[0];\n\tWordList &keywords2 = *keywordlists[1];\n\tWordList &keywords3 = *keywordlists[2];\n\n\t// Do not leak onto next line\n\t/*if (initStyle == SCE_ESCRIPT_STRINGEOL)\n\t\tinitStyle = SCE_ESCRIPT_DEFAULT;*/\n\n\tStyleContext sc(startPos, length, initStyle, styler);\n\n\tbool caseSensitive = styler.GetPropertyInt(\"escript.case.sensitive\", 0) != 0;\n\n\tfor (; sc.More(); sc.Forward()) {\n\n\t\t/*if (sc.atLineStart && (sc.state == SCE_ESCRIPT_STRING)) {\n\t\t\t// Prevent SCE_ESCRIPT_STRINGEOL from leaking back to previous line\n\t\t\tsc.SetState(SCE_ESCRIPT_STRING);\n\t\t}*/\n\n\t\t// Handle line continuation generically.\n\t\tif (sc.ch == '\\\\') {\n\t\t\tif (sc.chNext == '\\n' || sc.chNext == '\\r') {\n\t\t\t\tsc.Forward();\n\t\t\t\tif (sc.ch == '\\r' && sc.chNext == '\\n') {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\t// Determine if the current state should terminate.\n\t\tif (sc.state == SCE_ESCRIPT_OPERATOR || sc.state == SCE_ESCRIPT_BRACE) {\n\t\t\tsc.SetState(SCE_ESCRIPT_DEFAULT);\n\t\t} else if (sc.state == SCE_ESCRIPT_NUMBER) {\n\t\t\tif (!IsADigit(sc.ch) || sc.ch != '.') {\n\t\t\t\tsc.SetState(SCE_ESCRIPT_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_ESCRIPT_IDENTIFIER) {\n\t\t\tif (!IsAWordChar(sc.ch) || (sc.ch == '.')) {\n\t\t\t\tchar s[100];\n\t\t\t\tif (caseSensitive) {\n\t\t\t\t\tsc.GetCurrent(s, sizeof(s));\n\t\t\t\t} else {\n\t\t\t\t\tsc.GetCurrentLowered(s, sizeof(s));\n\t\t\t\t}\n\n//\t\t\t\tsc.GetCurrentLowered(s, sizeof(s));\n\n                                if (keywords.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_ESCRIPT_WORD);\n\t\t\t\t} else if (keywords2.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_ESCRIPT_WORD2);\n\t\t\t\t} else if (keywords3.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_ESCRIPT_WORD3);\n                                        // sc.state = SCE_ESCRIPT_IDENTIFIER;\n\t\t\t\t}\n\t\t\t\tsc.SetState(SCE_ESCRIPT_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_ESCRIPT_COMMENT) {\n\t\t\tif (sc.Match('*', '/')) {\n\t\t\t\tsc.Forward();\n\t\t\t\tsc.ForwardSetState(SCE_ESCRIPT_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_ESCRIPT_COMMENTDOC) {\n\t\t\tif (sc.Match('*', '/')) {\n\t\t\t\tsc.Forward();\n\t\t\t\tsc.ForwardSetState(SCE_ESCRIPT_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_ESCRIPT_COMMENTLINE) {\n\t\t\tif (sc.atLineEnd) {\n\t\t\t\tsc.SetState(SCE_ESCRIPT_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_ESCRIPT_STRING) {\n\t\t\tif (sc.ch == '\\\\') {\n\t\t\t\tif (sc.chNext == '\\\"' || sc.chNext == '\\\\') {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t}\n\t\t\t} else if (sc.ch == '\\\"') {\n\t\t\t\tsc.ForwardSetState(SCE_ESCRIPT_DEFAULT);\n\t\t\t}\n\t\t}\n\n\t\t// Determine if a new state should be entered.\n\t\tif (sc.state == SCE_ESCRIPT_DEFAULT) {\n\t\t\tif (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) {\n\t\t\t\tsc.SetState(SCE_ESCRIPT_NUMBER);\n\t\t\t} else if (IsAWordStart(sc.ch) || (sc.ch == '#')) {\n\t\t\t\tsc.SetState(SCE_ESCRIPT_IDENTIFIER);\n\t\t\t} else if (sc.Match('/', '*')) {\n\t\t\t\tsc.SetState(SCE_ESCRIPT_COMMENT);\n\t\t\t\tsc.Forward();\t// Eat the * so it isn't used for the end of the comment\n\t\t\t} else if (sc.Match('/', '/')) {\n\t\t\t\tsc.SetState(SCE_ESCRIPT_COMMENTLINE);\n\t\t\t} else if (sc.ch == '\\\"') {\n\t\t\t\tsc.SetState(SCE_ESCRIPT_STRING);\n\t\t\t\t//} else if (isoperator(static_cast<char>(sc.ch))) {\n\t\t\t} else if (sc.ch == '+' || sc.ch == '-' || sc.ch == '*' || sc.ch == '/' || sc.ch == '=' || sc.ch == '<' || sc.ch == '>' || sc.ch == '&' || sc.ch == '|' || sc.ch == '!' || sc.ch == '?' || sc.ch == ':') {\n\t\t\t\tsc.SetState(SCE_ESCRIPT_OPERATOR);\n\t\t\t} else if (sc.ch == '{' || sc.ch == '}') {\n\t\t\t\tsc.SetState(SCE_ESCRIPT_BRACE);\n\t\t\t}\n\t\t}\n\n\t}\n\tsc.Complete();\n}\n\n\nstatic int classifyFoldPointESCRIPT(const char* s, const char* prevWord) {\n\tint lev = 0;\n\tif (strcmp(prevWord, \"end\") == 0) return lev;\n\tif ((strcmp(prevWord, \"else\") == 0 && strcmp(s, \"if\") == 0) || strcmp(s, \"elseif\") == 0)\n\t\treturn -1;\n\n        if (strcmp(s, \"for\") == 0 || strcmp(s, \"foreach\") == 0\n\t    || strcmp(s, \"program\") == 0 || strcmp(s, \"function\") == 0\n\t    || strcmp(s, \"while\") == 0 || strcmp(s, \"case\") == 0\n\t    || strcmp(s, \"if\") == 0 ) {\n\t\tlev = 1;\n\t} else if ( strcmp(s, \"endfor\") == 0 || strcmp(s, \"endforeach\") == 0\n\t    || strcmp(s, \"endprogram\") == 0 || strcmp(s, \"endfunction\") == 0\n\t    || strcmp(s, \"endwhile\") == 0 || strcmp(s, \"endcase\") == 0\n\t    || strcmp(s, \"endif\") == 0 ) {\n\t\tlev = -1;\n\t}\n\n\treturn lev;\n}\n\n\nstatic bool IsStreamCommentStyle(int style) {\n\treturn style == SCE_ESCRIPT_COMMENT ||\n\t       style == SCE_ESCRIPT_COMMENTDOC ||\n\t       style == SCE_ESCRIPT_COMMENTLINE;\n}\n\nstatic void FoldESCRIPTDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *[], Accessor &styler) {\n\t//~ bool foldComment = styler.GetPropertyInt(\"fold.comment\") != 0;\n\t// Do not know how to fold the comment at the moment.\n\tbool foldCompact = styler.GetPropertyInt(\"fold.compact\", 1) != 0;\n        bool foldComment = true;\n\tSci_PositionU endPos = startPos + length;\n\tint visibleChars = 0;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tint levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK;\n\tint levelCurrent = levelPrev;\n\tchar chNext = styler[startPos];\n\tint styleNext = styler.StyleAt(startPos);\n\tint style = initStyle;\n\n\tSci_Position lastStart = 0;\n\tchar prevWord[32] = \"\";\n\n\tfor (Sci_PositionU i = startPos; i < endPos; i++) {\n\t\tchar ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\tint stylePrev = style;\n\t\tstyle = styleNext;\n\t\tstyleNext = styler.StyleAt(i + 1);\n\t\tbool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n\n\n\t\tif (foldComment && IsStreamCommentStyle(style)) {\n\t\t\tif (!IsStreamCommentStyle(stylePrev)) {\n\t\t\t\tlevelCurrent++;\n\t\t\t} else if (!IsStreamCommentStyle(styleNext) && !atEOL) {\n\t\t\t\t// Comments don't end at end of line and the next character may be unstyled.\n\t\t\t\tlevelCurrent--;\n\t\t\t}\n\t\t}\n\n\t\tif (foldComment && (style == SCE_ESCRIPT_COMMENTLINE)) {\n\t\t\tif ((ch == '/') && (chNext == '/')) {\n\t\t\t\tchar chNext2 = styler.SafeGetCharAt(i + 2);\n\t\t\t\tif (chNext2 == '{') {\n\t\t\t\t\tlevelCurrent++;\n\t\t\t\t} else if (chNext2 == '}') {\n\t\t\t\t\tlevelCurrent--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (stylePrev == SCE_ESCRIPT_DEFAULT && style == SCE_ESCRIPT_WORD3)\n\t\t{\n\t\t\t// Store last word start point.\n\t\t\tlastStart = i;\n\t\t}\n\n\t\tif (style == SCE_ESCRIPT_WORD3) {\n\t\t\tif(iswordchar(ch) && !iswordchar(chNext)) {\n\t\t\t\tchar s[32];\n\t\t\t\tSci_PositionU j;\n\t\t\t\tfor(j = 0; ( j < 31 ) && ( j < i-lastStart+1 ); j++) {\n\t\t\t\t\ts[j] = static_cast<char>(tolower(styler[lastStart + j]));\n\t\t\t\t}\n\t\t\t\ts[j] = '\\0';\n\t\t\t\tlevelCurrent += classifyFoldPointESCRIPT(s, prevWord);\n\t\t\t\tstrcpy(prevWord, s);\n\t\t\t}\n\t\t}\n\t\tif (atEOL) {\n\t\t\tint lev = levelPrev;\n\t\t\tif (visibleChars == 0 && foldCompact)\n\t\t\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\t\t\tif ((levelCurrent > levelPrev) && (visibleChars > 0))\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\tif (lev != styler.LevelAt(lineCurrent)) {\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\t\t\t}\n\t\t\tlineCurrent++;\n\t\t\tlevelPrev = levelCurrent;\n\t\t\tvisibleChars = 0;\n\t\t\tstrcpy(prevWord, \"\");\n\t\t}\n\n\t\tif (!isspacechar(ch))\n\t\t\tvisibleChars++;\n\t}\n\n\t// Fill in the real level of the next line, keeping the current flags as they will be filled in later\n\tint flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK;\n\tstyler.SetLevel(lineCurrent, levelPrev | flagsNext);\n}\n\n\n\nstatic const char * const ESCRIPTWordLists[] = {\n\t\"Primary keywords and identifiers\",\n\t\"Intrinsic functions\",\n\t\"Extended and user defined functions\",\n\t0,\n};\n\nLexerModule lmESCRIPT(SCLEX_ESCRIPT, ColouriseESCRIPTDoc, \"escript\", FoldESCRIPTDoc, ESCRIPTWordLists);\n"
  },
  {
    "path": "lexilla/lexers/LexEiffel.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexEiffel.cxx\n ** Lexer for Eiffel.\n **/\n// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nstatic inline bool isEiffelOperator(unsigned int ch) {\n\t// '.' left out as it is used to make up numbers\n\treturn ch == '*' || ch == '/' || ch == '\\\\' || ch == '-' || ch == '+' ||\n\t        ch == '(' || ch == ')' || ch == '=' ||\n\t        ch == '{' || ch == '}' || ch == '~' ||\n\t        ch == '[' || ch == ']' || ch == ';' ||\n\t        ch == '<' || ch == '>' || ch == ',' ||\n\t        ch == '.' || ch == '^' || ch == '%' || ch == ':' ||\n\t\tch == '!' || ch == '@' || ch == '?';\n}\n\nstatic inline bool IsAWordChar(unsigned int  ch) {\n\treturn (ch < 0x80) && (isalnum(ch) || ch == '_');\n}\n\nstatic inline bool IsAWordStart(unsigned int ch) {\n\treturn (ch < 0x80) && (isalnum(ch) || ch == '_');\n}\n\nstatic void ColouriseEiffelDoc(Sci_PositionU startPos,\n                            Sci_Position length,\n                            int initStyle,\n                            WordList *keywordlists[],\n                            Accessor &styler) {\n\n\tWordList &keywords = *keywordlists[0];\n\n\tStyleContext sc(startPos, length, initStyle, styler);\n\n\tfor (; sc.More(); sc.Forward()) {\n\n\t\tif (sc.state == SCE_EIFFEL_STRINGEOL) {\n\t\t\tif (sc.ch != '\\r' && sc.ch != '\\n') {\n\t\t\t\tsc.SetState(SCE_EIFFEL_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_EIFFEL_OPERATOR) {\n\t\t\tsc.SetState(SCE_EIFFEL_DEFAULT);\n\t\t} else if (sc.state == SCE_EIFFEL_WORD) {\n\t\t\tif (!IsAWordChar(sc.ch)) {\n\t\t\t\tchar s[100];\n\t\t\t\tsc.GetCurrentLowered(s, sizeof(s));\n\t\t\t\tif (!keywords.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_EIFFEL_IDENTIFIER);\n\t\t\t\t}\n\t\t\t\tsc.SetState(SCE_EIFFEL_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_EIFFEL_NUMBER) {\n\t\t\tif (!IsAWordChar(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_EIFFEL_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_EIFFEL_COMMENTLINE) {\n\t\t\tif (sc.ch == '\\r' || sc.ch == '\\n') {\n\t\t\t\tsc.SetState(SCE_EIFFEL_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_EIFFEL_STRING) {\n\t\t\tif (sc.ch == '%') {\n\t\t\t\tsc.Forward();\n\t\t\t} else if (sc.ch == '\\\"') {\n\t\t\t\tsc.Forward();\n\t\t\t\tsc.SetState(SCE_EIFFEL_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_EIFFEL_CHARACTER) {\n\t\t\tif (sc.ch == '\\r' || sc.ch == '\\n') {\n\t\t\t\tsc.SetState(SCE_EIFFEL_STRINGEOL);\n\t\t\t} else if (sc.ch == '%') {\n\t\t\t\tsc.Forward();\n\t\t\t} else if (sc.ch == '\\'') {\n\t\t\t\tsc.Forward();\n\t\t\t\tsc.SetState(SCE_EIFFEL_DEFAULT);\n\t\t\t}\n\t\t}\n\n\t\tif (sc.state == SCE_EIFFEL_DEFAULT) {\n\t\t\tif (sc.ch == '-' && sc.chNext == '-') {\n\t\t\t\tsc.SetState(SCE_EIFFEL_COMMENTLINE);\n\t\t\t} else if (sc.ch == '\\\"') {\n\t\t\t\tsc.SetState(SCE_EIFFEL_STRING);\n\t\t\t} else if (sc.ch == '\\'') {\n\t\t\t\tsc.SetState(SCE_EIFFEL_CHARACTER);\n\t\t\t} else if (IsADigit(sc.ch) || (sc.ch == '.')) {\n\t\t\t\tsc.SetState(SCE_EIFFEL_NUMBER);\n\t\t\t} else if (IsAWordStart(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_EIFFEL_WORD);\n\t\t\t} else if (isEiffelOperator(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_EIFFEL_OPERATOR);\n\t\t\t}\n\t\t}\n\t}\n\tsc.Complete();\n}\n\nstatic bool IsEiffelComment(Accessor &styler, Sci_Position pos, Sci_Position len) {\n\treturn len>1 && styler[pos]=='-' && styler[pos+1]=='-';\n}\n\nstatic void FoldEiffelDocIndent(Sci_PositionU startPos, Sci_Position length, int,\n\t\t\t\t\t\t   WordList *[], Accessor &styler) {\n\tSci_Position lengthDoc = startPos + length;\n\n\t// Backtrack to previous line in case need to fix its fold status\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tif (startPos > 0) {\n\t\tif (lineCurrent > 0) {\n\t\t\tlineCurrent--;\n\t\t\tstartPos = styler.LineStart(lineCurrent);\n\t\t}\n\t}\n\tint spaceFlags = 0;\n\tint indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags, IsEiffelComment);\n\tchar chNext = styler[startPos];\n\tfor (Sci_Position i = startPos; i < lengthDoc; i++) {\n\t\tchar ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\n\t\tif ((ch == '\\r' && chNext != '\\n') || (ch == '\\n') || (i == lengthDoc)) {\n\t\t\tint lev = indentCurrent;\n\t\t\tint indentNext = styler.IndentAmount(lineCurrent + 1, &spaceFlags, IsEiffelComment);\n\t\t\tif (!(indentCurrent & SC_FOLDLEVELWHITEFLAG)) {\n\t\t\t\t// Only non whitespace lines can be headers\n\t\t\t\tif ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext & SC_FOLDLEVELNUMBERMASK)) {\n\t\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\t\t} else if (indentNext & SC_FOLDLEVELWHITEFLAG) {\n\t\t\t\t\t// Line after is blank so check the next - maybe should continue further?\n\t\t\t\t\tint spaceFlags2 = 0;\n\t\t\t\t\tint indentNext2 = styler.IndentAmount(lineCurrent + 2, &spaceFlags2, IsEiffelComment);\n\t\t\t\t\tif ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext2 & SC_FOLDLEVELNUMBERMASK)) {\n\t\t\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tindentCurrent = indentNext;\n\t\t\tstyler.SetLevel(lineCurrent, lev);\n\t\t\tlineCurrent++;\n\t\t}\n\t}\n}\n\nstatic void FoldEiffelDocKeyWords(Sci_PositionU startPos, Sci_Position length, int /* initStyle */, WordList *[],\n                       Accessor &styler) {\n\tSci_PositionU lengthDoc = startPos + length;\n\tint visibleChars = 0;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tint levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK;\n\tint levelCurrent = levelPrev;\n\tchar chNext = styler[startPos];\n\tint stylePrev = 0;\n\tint styleNext = styler.StyleAt(startPos);\n\t// lastDeferred should be determined by looking back to last keyword in case\n\t// the \"deferred\" is on a line before \"class\"\n\tbool lastDeferred = false;\n\tfor (Sci_PositionU i = startPos; i < lengthDoc; i++) {\n\t\tchar ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\tint style = styleNext;\n\t\tstyleNext = styler.StyleAt(i + 1);\n\t\tbool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n\t\tif ((stylePrev != SCE_EIFFEL_WORD) && (style == SCE_EIFFEL_WORD)) {\n\t\t\tchar s[20];\n\t\t\tSci_PositionU j = 0;\n\t\t\twhile ((j < (sizeof(s) - 1)) && (iswordchar(styler[i + j]))) {\n\t\t\t\ts[j] = styler[i + j];\n\t\t\t\tj++;\n\t\t\t}\n\t\t\ts[j] = '\\0';\n\n\t\t\tif (\n\t\t\t\t(strcmp(s, \"check\") == 0) ||\n\t\t\t\t(strcmp(s, \"debug\") == 0) ||\n\t\t\t\t(strcmp(s, \"deferred\") == 0) ||\n\t\t\t\t(strcmp(s, \"do\") == 0) ||\n\t\t\t\t(strcmp(s, \"from\") == 0) ||\n\t\t\t\t(strcmp(s, \"if\") == 0) ||\n\t\t\t\t(strcmp(s, \"inspect\") == 0) ||\n\t\t\t\t(strcmp(s, \"once\") == 0)\n\t\t\t)\n\t\t\t\tlevelCurrent++;\n\t\t\tif (!lastDeferred && (strcmp(s, \"class\") == 0))\n\t\t\t\tlevelCurrent++;\n\t\t\tif (strcmp(s, \"end\") == 0)\n\t\t\t\tlevelCurrent--;\n\t\t\tlastDeferred = strcmp(s, \"deferred\") == 0;\n\t\t}\n\n\t\tif (atEOL) {\n\t\t\tint lev = levelPrev;\n\t\t\tif (visibleChars == 0)\n\t\t\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\t\t\tif ((levelCurrent > levelPrev) && (visibleChars > 0))\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\tif (lev != styler.LevelAt(lineCurrent)) {\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\t\t\t}\n\t\t\tlineCurrent++;\n\t\t\tlevelPrev = levelCurrent;\n\t\t\tvisibleChars = 0;\n\t\t}\n\t\tif (!isspacechar(ch))\n\t\t\tvisibleChars++;\n\t\tstylePrev = style;\n\t}\n\t// Fill in the real level of the next line, keeping the current flags as they will be filled in later\n\tint flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK;\n\tstyler.SetLevel(lineCurrent, levelPrev | flagsNext);\n}\n\nstatic const char * const eiffelWordListDesc[] = {\n\t\"Keywords\",\n\t0\n};\n\nLexerModule lmEiffel(SCLEX_EIFFEL, ColouriseEiffelDoc, \"eiffel\", FoldEiffelDocIndent, eiffelWordListDesc);\nLexerModule lmEiffelkw(SCLEX_EIFFELKW, ColouriseEiffelDoc, \"eiffelkw\", FoldEiffelDocKeyWords, eiffelWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexErlang.cxx",
    "content": "// Scintilla source code edit control\n// Encoding: UTF-8\n// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n/** @file LexErlang.cxx\n ** Lexer for Erlang.\n ** Enhanced by Etienne 'Lenain' Girondel (lenaing@gmail.com)\n ** Originally wrote by Peter-Henry Mander,\n ** based on Matlab lexer by José Fonseca.\n **/\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nstatic int is_radix(int radix, int ch) {\n\tint digit;\n\n\tif (36 < radix || 2 > radix)\n\t\treturn 0;\n\n\tif (isdigit(ch)) {\n\t\tdigit = ch - '0';\n\t} else if (isalnum(ch)) {\n\t\tdigit = toupper(ch) - 'A' + 10;\n\t} else {\n\t\treturn 0;\n\t}\n\n\treturn (digit < radix);\n}\n\ntypedef enum {\n\tSTATE_NULL,\n\tCOMMENT,\n\tCOMMENT_FUNCTION,\n\tCOMMENT_MODULE,\n\tCOMMENT_DOC,\n\tCOMMENT_DOC_MACRO,\n\tATOM_UNQUOTED,\n\tATOM_QUOTED,\n\tNODE_NAME_UNQUOTED,\n\tNODE_NAME_QUOTED,\n\tMACRO_START,\n\tMACRO_UNQUOTED,\n\tMACRO_QUOTED,\n\tRECORD_START,\n\tRECORD_UNQUOTED,\n\tRECORD_QUOTED,\n\tNUMERAL_START,\n\tNUMERAL_BASE_VALUE,\n\tNUMERAL_FLOAT,\n\tNUMERAL_EXPONENT,\n\tPREPROCESSOR\n} atom_parse_state_t;\n\nstatic inline bool IsAWordChar(const int ch) {\n\treturn (ch < 0x80) && (ch != ' ') && (isalnum(ch) || ch == '_');\n}\n\nstatic void ColouriseErlangDoc(Sci_PositionU startPos, Sci_Position length, int initStyle,\n\t\t\t\t\t\t\t\tWordList *keywordlists[], Accessor &styler) {\n\n\tStyleContext sc(startPos, length, initStyle, styler);\n\tWordList &reservedWords = *keywordlists[0];\n\tWordList &erlangBIFs = *keywordlists[1];\n\tWordList &erlangPreproc = *keywordlists[2];\n\tWordList &erlangModulesAtt = *keywordlists[3];\n\tWordList &erlangDoc = *keywordlists[4];\n\tWordList &erlangDocMacro = *keywordlists[5];\n\tint radix_digits = 0;\n\tint exponent_digits = 0;\n\tatom_parse_state_t parse_state = STATE_NULL;\n\tatom_parse_state_t old_parse_state = STATE_NULL;\n\tbool to_late_to_comment = false;\n\tchar cur[100];\n\tint old_style = SCE_ERLANG_DEFAULT;\n\n\tstyler.StartAt(startPos);\n\n\tfor (; sc.More(); sc.Forward()) {\n\t\tint style = SCE_ERLANG_DEFAULT;\n\t\tif (STATE_NULL != parse_state) {\n\n\t\t\tswitch (parse_state) {\n\n\t\t\t\tcase STATE_NULL : sc.SetState(SCE_ERLANG_DEFAULT); break;\n\n\t\t\t/* COMMENTS ------------------------------------------------------*/\n\t\t\t\tcase COMMENT : {\n\t\t\t\t\tif (sc.ch != '%') {\n\t\t\t\t\t\tto_late_to_comment = true;\n\t\t\t\t\t} else if (!to_late_to_comment && sc.ch == '%') {\n\t\t\t\t\t\t// Switch to comment level 2 (Function)\n\t\t\t\t\t\tsc.ChangeState(SCE_ERLANG_COMMENT_FUNCTION);\n\t\t\t\t\t\told_style = SCE_ERLANG_COMMENT_FUNCTION;\n\t\t\t\t\t\tparse_state = COMMENT_FUNCTION;\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// V--- Falling through!\n\t\t\t\t// Falls through.\n\t\t\t\tcase COMMENT_FUNCTION : {\n\t\t\t\t\tif (sc.ch != '%') {\n\t\t\t\t\t\tto_late_to_comment = true;\n\t\t\t\t\t} else if (!to_late_to_comment && sc.ch == '%') {\n\t\t\t\t\t\t// Switch to comment level 3 (Module)\n\t\t\t\t\t\tsc.ChangeState(SCE_ERLANG_COMMENT_MODULE);\n\t\t\t\t\t\told_style = SCE_ERLANG_COMMENT_MODULE;\n\t\t\t\t\t\tparse_state = COMMENT_MODULE;\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// V--- Falling through!\n\t\t\t\t// Falls through.\n\t\t\t\tcase COMMENT_MODULE : {\n\t\t\t\t\tif (parse_state != COMMENT) {\n\t\t\t\t\t\t// Search for comment documentation\n\t\t\t\t\t\tif (sc.chNext == '@') {\n\t\t\t\t\t\t\told_parse_state = parse_state;\n\t\t\t\t\t\t\tparse_state = ('{' == sc.ch)\n\t\t\t\t\t\t\t\t\t\t\t? COMMENT_DOC_MACRO\n\t\t\t\t\t\t\t\t\t\t\t: COMMENT_DOC;\n\t\t\t\t\t\t\tsc.ForwardSetState(sc.state);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// All comments types fall here.\n\t\t\t\t\tif (sc.MatchLineEnd()) {\n\t\t\t\t\t\tto_late_to_comment = false;\n\t\t\t\t\t\tsc.SetState(SCE_ERLANG_DEFAULT);\n\t\t\t\t\t\tparse_state = STATE_NULL;\n\t\t\t\t\t}\n\t\t\t\t} break;\n\n\t\t\t\tcase COMMENT_DOC :\n\t\t\t\t// V--- Falling through!\n\t\t\t\tcase COMMENT_DOC_MACRO : {\n\n\t\t\t\t\tif (!isalnum(sc.ch)) {\n\t\t\t\t\t\t// Try to match documentation comment\n\t\t\t\t\t\tsc.GetCurrent(cur, sizeof(cur));\n\n\t\t\t\t\t\tif (parse_state == COMMENT_DOC_MACRO\n\t\t\t\t\t\t\t&& erlangDocMacro.InList(cur)) {\n\t\t\t\t\t\t\t\tsc.ChangeState(SCE_ERLANG_COMMENT_DOC_MACRO);\n\t\t\t\t\t\t\t\twhile (sc.ch != '}' && !sc.atLineEnd)\n\t\t\t\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t\t} else if (erlangDoc.InList(cur)) {\n\t\t\t\t\t\t\tsc.ChangeState(SCE_ERLANG_COMMENT_DOC);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsc.ChangeState(old_style);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Switch back to old state\n\t\t\t\t\t\tsc.SetState(old_style);\n\t\t\t\t\t\tparse_state = old_parse_state;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (sc.MatchLineEnd()) {\n\t\t\t\t\t\tto_late_to_comment = false;\n\t\t\t\t\t\tsc.ChangeState(old_style);\n\t\t\t\t\t\tsc.SetState(SCE_ERLANG_DEFAULT);\n\t\t\t\t\t\tparse_state = STATE_NULL;\n\t\t\t\t\t}\n\t\t\t\t} break;\n\n\t\t\t/* -------------------------------------------------------------- */\n\t\t\t/* Atoms ---------------------------------------------------------*/\n\t\t\t\tcase ATOM_UNQUOTED : {\n\t\t\t\t\tif ('@' == sc.ch){\n\t\t\t\t\t\tparse_state = NODE_NAME_UNQUOTED;\n\t\t\t\t\t} else if (sc.ch == ':') {\n\t\t\t\t\t\t// Searching for module name\n\t\t\t\t\t\tif (sc.chNext == ' ') {\n\t\t\t\t\t\t\t// error\n\t\t\t\t\t\t\tsc.ChangeState(SCE_ERLANG_UNKNOWN);\n\t\t\t\t\t\t\tparse_state = STATE_NULL;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t\t\tif (isalnum(sc.ch) || (sc.ch == '\\''))  {\n\t\t\t\t\t\t\t\tsc.GetCurrent(cur, sizeof(cur));\n\t\t\t\t\t\t\t\tsc.ChangeState(SCE_ERLANG_MODULES);\n\t\t\t\t\t\t\t\tsc.SetState(SCE_ERLANG_MODULES);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (sc.ch == '\\'') {\n\t\t\t\t\t\t\t\tparse_state = ATOM_QUOTED;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (!IsAWordChar(sc.ch)) {\n\n\t\t\t\t\t\tsc.GetCurrent(cur, sizeof(cur));\n\t\t\t\t\t\tif (reservedWords.InList(cur)) {\n\t\t\t\t\t\t\tstyle = SCE_ERLANG_KEYWORD;\n\t\t\t\t\t\t} else if (erlangBIFs.InList(cur)\n\t\t\t\t\t\t\t\t\t&& strcmp(cur,\"erlang:\")){\n\t\t\t\t\t\t\tstyle = SCE_ERLANG_BIFS;\n\t\t\t\t\t\t} else if (sc.ch == '(' || '/' == sc.ch){\n\t\t\t\t\t\t\tstyle = SCE_ERLANG_FUNCTION_NAME;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tstyle = SCE_ERLANG_ATOM;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tsc.ChangeState(style);\n\t\t\t\t\t\tsc.SetState(SCE_ERLANG_DEFAULT);\n\t\t\t\t\t\tparse_state = STATE_NULL;\n\t\t\t\t\t}\n\n\t\t\t\t} break;\n\n\t\t\t\tcase ATOM_QUOTED : {\n\t\t\t\t\tif ( '@' == sc.ch ){\n\t\t\t\t\t\tparse_state = NODE_NAME_QUOTED;\n\t\t\t\t\t} else if ('\\'' == sc.ch && '\\\\' != sc.chPrev) {\n\t\t\t\t\t\tsc.ChangeState(SCE_ERLANG_ATOM_QUOTED);\n\t\t\t\t\t\tsc.ForwardSetState(SCE_ERLANG_DEFAULT);\n\t\t\t\t\t\tparse_state = STATE_NULL;\n\t\t\t\t\t}\n\t\t\t\t} break;\n\n\t\t\t/* -------------------------------------------------------------- */\n\t\t\t/* Node names ----------------------------------------------------*/\n\t\t\t\tcase NODE_NAME_UNQUOTED : {\n\t\t\t\t\tif ('@' == sc.ch) {\n\t\t\t\t\t\tsc.SetState(SCE_ERLANG_DEFAULT);\n\t\t\t\t\t\tparse_state = STATE_NULL;\n\t\t\t\t\t} else if (!IsAWordChar(sc.ch)) {\n\t\t\t\t\t\tsc.ChangeState(SCE_ERLANG_NODE_NAME);\n\t\t\t\t\t\tsc.SetState(SCE_ERLANG_DEFAULT);\n\t\t\t\t\t\tparse_state = STATE_NULL;\n\t\t\t\t\t}\n\t\t\t\t} break;\n\n\t\t\t\tcase NODE_NAME_QUOTED : {\n\t\t\t\t\tif ('@' == sc.ch) {\n\t\t\t\t\t\tsc.SetState(SCE_ERLANG_DEFAULT);\n\t\t\t\t\t\tparse_state = STATE_NULL;\n\t\t\t\t\t} else if ('\\'' == sc.ch && '\\\\' != sc.chPrev) {\n\t\t\t\t\t\tsc.ChangeState(SCE_ERLANG_NODE_NAME_QUOTED);\n\t\t\t\t\t\tsc.ForwardSetState(SCE_ERLANG_DEFAULT);\n\t\t\t\t\t\tparse_state = STATE_NULL;\n\t\t\t\t\t}\n\t\t\t\t} break;\n\n\t\t\t/* -------------------------------------------------------------- */\n\t\t\t/* Records -------------------------------------------------------*/\n\t\t\t\tcase RECORD_START : {\n\t\t\t\t\tif ('\\'' == sc.ch) {\n\t\t\t\t\t\tparse_state = RECORD_QUOTED;\n\t\t\t\t\t} else if (isalpha(sc.ch) && islower(sc.ch)) {\n\t\t\t\t\t\tparse_state = RECORD_UNQUOTED;\n\t\t\t\t\t} else { // error\n\t\t\t\t\t\tsc.SetState(SCE_ERLANG_DEFAULT);\n\t\t\t\t\t\tparse_state = STATE_NULL;\n\t\t\t\t\t}\n\t\t\t\t} break;\n\n\t\t\t\tcase RECORD_UNQUOTED : {\n\t\t\t\t\tif (!IsAWordChar(sc.ch)) {\n\t\t\t\t\t\tsc.ChangeState(SCE_ERLANG_RECORD);\n\t\t\t\t\t\tsc.SetState(SCE_ERLANG_DEFAULT);\n\t\t\t\t\t\tparse_state = STATE_NULL;\n\t\t\t\t\t}\n\t\t\t\t} break;\n\n\t\t\t\tcase RECORD_QUOTED : {\n\t\t\t\t\tif ('\\'' == sc.ch && '\\\\' != sc.chPrev) {\n\t\t\t\t\t\tsc.ChangeState(SCE_ERLANG_RECORD_QUOTED);\n\t\t\t\t\t\tsc.ForwardSetState(SCE_ERLANG_DEFAULT);\n\t\t\t\t\t\tparse_state = STATE_NULL;\n\t\t\t\t\t}\n\t\t\t\t} break;\n\n\t\t\t/* -------------------------------------------------------------- */\n\t\t\t/* Macros --------------------------------------------------------*/\n\t\t\t\tcase MACRO_START : {\n\t\t\t\t\tif ('\\'' == sc.ch) {\n\t\t\t\t\t\tparse_state = MACRO_QUOTED;\n\t\t\t\t\t} else if (isalpha(sc.ch)) {\n\t\t\t\t\t\tparse_state = MACRO_UNQUOTED;\n\t\t\t\t\t} else { // error\n\t\t\t\t\t\tsc.SetState(SCE_ERLANG_DEFAULT);\n\t\t\t\t\t\tparse_state = STATE_NULL;\n\t\t\t\t\t}\n\t\t\t\t} break;\n\n\t\t\t\tcase MACRO_UNQUOTED : {\n\t\t\t\t\tif (!IsAWordChar(sc.ch)) {\n\t\t\t\t\t\tsc.ChangeState(SCE_ERLANG_MACRO);\n\t\t\t\t\t\tsc.SetState(SCE_ERLANG_DEFAULT);\n\t\t\t\t\t\tparse_state = STATE_NULL;\n\t\t\t\t\t}\n\t\t\t\t} break;\n\n\t\t\t\tcase MACRO_QUOTED : {\n\t\t\t\t\tif ('\\'' == sc.ch && '\\\\' != sc.chPrev) {\n\t\t\t\t\t\tsc.ChangeState(SCE_ERLANG_MACRO_QUOTED);\n\t\t\t\t\t\tsc.ForwardSetState(SCE_ERLANG_DEFAULT);\n\t\t\t\t\t\tparse_state = STATE_NULL;\n\t\t\t\t\t}\n\t\t\t\t} break;\n\n\t\t\t/* -------------------------------------------------------------- */\n\t\t\t/* Numerics ------------------------------------------------------*/\n\t\t\t/* Simple integer */\n\t\t\t\tcase NUMERAL_START : {\n\t\t\t\t\tif (isdigit(sc.ch)) {\n\t\t\t\t\t\tradix_digits *= 10;\n\t\t\t\t\t\tradix_digits += sc.ch - '0'; // Assuming ASCII here!\n\t\t\t\t\t} else if ('#' == sc.ch) {\n\t\t\t\t\t\tif (2 > radix_digits || 36 < radix_digits) {\n\t\t\t\t\t\t\tsc.SetState(SCE_ERLANG_DEFAULT);\n\t\t\t\t\t\t\tparse_state = STATE_NULL;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tparse_state = NUMERAL_BASE_VALUE;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if ('.' == sc.ch && isdigit(sc.chNext)) {\n\t\t\t\t\t\tradix_digits = 0;\n\t\t\t\t\t\tparse_state = NUMERAL_FLOAT;\n\t\t\t\t\t} else if ('e' == sc.ch || 'E' == sc.ch) {\n\t\t\t\t\t\texponent_digits = 0;\n\t\t\t\t\t\tparse_state = NUMERAL_EXPONENT;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tradix_digits = 0;\n\t\t\t\t\t\tsc.ChangeState(SCE_ERLANG_NUMBER);\n\t\t\t\t\t\tsc.SetState(SCE_ERLANG_DEFAULT);\n\t\t\t\t\t\tparse_state = STATE_NULL;\n\t\t\t\t\t}\n\t\t\t\t} break;\n\n\t\t\t/* Integer in other base than 10 (x#yyy) */\n\t\t\t\tcase NUMERAL_BASE_VALUE : {\n\t\t\t\t\tif (!is_radix(radix_digits,sc.ch)) {\n\t\t\t\t\t\tradix_digits = 0;\n\n\t\t\t\t\t\tif (!isalnum(sc.ch))\n\t\t\t\t\t\t\tsc.ChangeState(SCE_ERLANG_NUMBER);\n\n\t\t\t\t\t\tsc.SetState(SCE_ERLANG_DEFAULT);\n\t\t\t\t\t\tparse_state = STATE_NULL;\n\t\t\t\t\t}\n\t\t\t\t} break;\n\n\t\t\t/* Float (x.yyy) */\n\t\t\t\tcase NUMERAL_FLOAT : {\n\t\t\t\t\tif ('e' == sc.ch || 'E' == sc.ch) {\n\t\t\t\t\t\texponent_digits = 0;\n\t\t\t\t\t\tparse_state = NUMERAL_EXPONENT;\n\t\t\t\t\t} else if (!isdigit(sc.ch)) {\n\t\t\t\t\t\tsc.ChangeState(SCE_ERLANG_NUMBER);\n\t\t\t\t\t\tsc.SetState(SCE_ERLANG_DEFAULT);\n\t\t\t\t\t\tparse_state = STATE_NULL;\n\t\t\t\t\t}\n\t\t\t\t} break;\n\n\t\t\t/* Exponent, either integer or float (xEyy, x.yyEzzz) */\n\t\t\t\tcase NUMERAL_EXPONENT : {\n\t\t\t\t\tif (('-' == sc.ch || '+' == sc.ch)\n\t\t\t\t\t\t\t&& (isdigit(sc.chNext))) {\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t} else if (!isdigit(sc.ch)) {\n\t\t\t\t\t\tif (0 < exponent_digits)\n\t\t\t\t\t\t\tsc.ChangeState(SCE_ERLANG_NUMBER);\n\t\t\t\t\t\tsc.SetState(SCE_ERLANG_DEFAULT);\n\t\t\t\t\t\tparse_state = STATE_NULL;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t++exponent_digits;\n\t\t\t\t\t}\n\t\t\t\t} break;\n\n\t\t\t/* -------------------------------------------------------------- */\n\t\t\t/* Preprocessor --------------------------------------------------*/\n\t\t\t\tcase PREPROCESSOR : {\n\t\t\t\t\tif (!IsAWordChar(sc.ch)) {\n\n\t\t\t\t\t\tsc.GetCurrent(cur, sizeof(cur));\n\t\t\t\t\t\tif (erlangPreproc.InList(cur)) {\n\t\t\t\t\t\t\tstyle = SCE_ERLANG_PREPROC;\n\t\t\t\t\t\t} else if (erlangModulesAtt.InList(cur)) {\n\t\t\t\t\t\t\tstyle = SCE_ERLANG_MODULES_ATT;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tsc.ChangeState(style);\n\t\t\t\t\t\tsc.SetState(SCE_ERLANG_DEFAULT);\n\t\t\t\t\t\tparse_state = STATE_NULL;\n\t\t\t\t\t}\n\t\t\t\t} break;\n\n\t\t\t}\n\n\t\t} /* End of : STATE_NULL != parse_state */\n\t\telse\n\t\t{\n\t\t\tswitch (sc.state) {\n\t\t\t\tcase SCE_ERLANG_VARIABLE : {\n\t\t\t\t\tif (!IsAWordChar(sc.ch))\n\t\t\t\t\t\tsc.SetState(SCE_ERLANG_DEFAULT);\n\t\t\t\t} break;\n\t\t\t\tcase SCE_ERLANG_STRING : {\n\t\t\t\t\t if (sc.ch == '\\\"' && sc.chPrev != '\\\\')\n\t\t\t\t\t\tsc.ForwardSetState(SCE_ERLANG_DEFAULT);\n\t\t\t\t} break;\n\t\t\t\tcase SCE_ERLANG_COMMENT : {\n\t\t\t\t\t if (sc.atLineEnd)\n\t\t\t\t\t\tsc.SetState(SCE_ERLANG_DEFAULT);\n\t\t\t\t} break;\n\t\t\t\tcase SCE_ERLANG_CHARACTER : {\n\t\t\t\t\tif (sc.chPrev == '\\\\') {\n\t\t\t\t\t\tsc.ForwardSetState(SCE_ERLANG_DEFAULT);\n\t\t\t\t\t} else if (sc.ch != '\\\\') {\n\t\t\t\t\t\tsc.ForwardSetState(SCE_ERLANG_DEFAULT);\n\t\t\t\t\t}\n\t\t\t\t} break;\n\t\t\t\tcase SCE_ERLANG_OPERATOR : {\n\t\t\t\t\tif (sc.chPrev == '.') {\n\t\t\t\t\t\tif (sc.ch == '*' || sc.ch == '/' || sc.ch == '\\\\'\n\t\t\t\t\t\t\t|| sc.ch == '^') {\n\t\t\t\t\t\t\tsc.ForwardSetState(SCE_ERLANG_DEFAULT);\n\t\t\t\t\t\t} else if (sc.ch == '\\'') {\n\t\t\t\t\t\t\tsc.ForwardSetState(SCE_ERLANG_DEFAULT);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsc.SetState(SCE_ERLANG_DEFAULT);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsc.SetState(SCE_ERLANG_DEFAULT);\n\t\t\t\t\t}\n\t\t\t\t} break;\n\t\t\t}\n\t\t}\n\n\t\tif (sc.state == SCE_ERLANG_DEFAULT) {\n\t\t\tbool no_new_state = false;\n\n\t\t\tswitch (sc.ch) {\n\t\t\t\tcase '\\\"' : sc.SetState(SCE_ERLANG_STRING); break;\n\t\t\t\tcase '$' : sc.SetState(SCE_ERLANG_CHARACTER); break;\n\t\t\t\tcase '%' : {\n\t\t\t\t\tparse_state = COMMENT;\n\t\t\t\t\tsc.SetState(SCE_ERLANG_COMMENT);\n\t\t\t\t} break;\n\t\t\t\tcase '#' : {\n\t\t\t\t\tparse_state = RECORD_START;\n\t\t\t\t\tsc.SetState(SCE_ERLANG_UNKNOWN);\n\t\t\t\t} break;\n\t\t\t\tcase '?' : {\n\t\t\t\t\tparse_state = MACRO_START;\n\t\t\t\t\tsc.SetState(SCE_ERLANG_UNKNOWN);\n\t\t\t\t} break;\n\t\t\t\tcase '\\'' : {\n\t\t\t\t\tparse_state = ATOM_QUOTED;\n\t\t\t\t\tsc.SetState(SCE_ERLANG_UNKNOWN);\n\t\t\t\t} break;\n\t\t\t\tcase '+' :\n\t\t\t\tcase '-' : {\n\t\t\t\t\tif (IsADigit(sc.chNext)) {\n\t\t\t\t\t\tparse_state = NUMERAL_START;\n\t\t\t\t\t\tradix_digits = 0;\n\t\t\t\t\t\tsc.SetState(SCE_ERLANG_UNKNOWN);\n\t\t\t\t\t} else if (sc.ch != '+') {\n\t\t\t\t\t\tparse_state = PREPROCESSOR;\n\t\t\t\t\t\tsc.SetState(SCE_ERLANG_UNKNOWN);\n\t\t\t\t\t}\n\t\t\t\t} break;\n\t\t\t\tdefault : no_new_state = true;\n\t\t\t}\n\n\t\t\tif (no_new_state) {\n\t\t\t\tif (isdigit(sc.ch)) {\n\t\t\t\t\tparse_state = NUMERAL_START;\n\t\t\t\t\tradix_digits = sc.ch - '0';\n\t\t\t\t\tsc.SetState(SCE_ERLANG_UNKNOWN);\n\t\t\t\t} else if (isupper(sc.ch) || '_' == sc.ch) {\n\t\t\t\t\tsc.SetState(SCE_ERLANG_VARIABLE);\n\t\t\t\t} else if (isalpha(sc.ch)) {\n\t\t\t\t\tparse_state = ATOM_UNQUOTED;\n\t\t\t\t\tsc.SetState(SCE_ERLANG_UNKNOWN);\n\t\t\t\t} else if (isoperator(static_cast<char>(sc.ch))\n\t\t\t\t\t\t\t|| sc.ch == '\\\\') {\n\t\t\t\t\tsc.SetState(SCE_ERLANG_OPERATOR);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}\n\tsc.Complete();\n}\n\nstatic int ClassifyErlangFoldPoint(\n\tAccessor &styler,\n\tint styleNext,\n\tSci_Position keyword_start\n) {\n\tint lev = 0;\n\tif (styler.Match(keyword_start,\"case\")\n\t\t|| (\n\t\t\tstyler.Match(keyword_start,\"fun\")\n\t\t\t&& (SCE_ERLANG_FUNCTION_NAME != styleNext)\n\t\t\t)\n\t\t|| styler.Match(keyword_start,\"if\")\n\t\t|| styler.Match(keyword_start,\"query\")\n\t\t|| styler.Match(keyword_start,\"receive\")\n\t) {\n\t\t++lev;\n\t} else if (styler.Match(keyword_start,\"end\")) {\n\t\t--lev;\n\t}\n\n\treturn lev;\n}\n\nstatic void FoldErlangDoc(\n\tSci_PositionU startPos, Sci_Position length, int initStyle,\n\tWordList** /*keywordlists*/, Accessor &styler\n) {\n\tSci_PositionU endPos = startPos + length;\n\tSci_Position currentLine = styler.GetLine(startPos);\n\tint lev;\n\tint previousLevel = styler.LevelAt(currentLine) & SC_FOLDLEVELNUMBERMASK;\n\tint currentLevel = previousLevel;\n\tint styleNext = styler.StyleAt(startPos);\n\tint style = initStyle;\n\tint stylePrev;\n\tSci_Position keyword_start = 0;\n\tchar ch;\n\tchar chNext = styler.SafeGetCharAt(startPos);\n\tbool atEOL;\n\n\tfor (Sci_PositionU i = startPos; i < endPos; i++) {\n\t\tch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\n\t\t// Get styles\n\t\tstylePrev = style;\n\t\tstyle = styleNext;\n\t\tstyleNext = styler.StyleAt(i + 1);\n\t\tatEOL = ((ch == '\\r') && (chNext != '\\n')) || (ch == '\\n');\n\n\t\tif (stylePrev != SCE_ERLANG_KEYWORD\n\t\t\t&& style == SCE_ERLANG_KEYWORD) {\n\t\t\tkeyword_start = i;\n\t\t}\n\n\t\t// Fold on keywords\n\t\tif (stylePrev == SCE_ERLANG_KEYWORD\n\t\t\t&& style != SCE_ERLANG_KEYWORD\n\t\t\t&& style != SCE_ERLANG_ATOM\n\t\t) {\n\t\t\tcurrentLevel += ClassifyErlangFoldPoint(styler,\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyleNext,\n\t\t\t\t\t\t\t\t\t\t\t\t\tkeyword_start);\n\t\t}\n\n\t\t// Fold on comments\n\t\tif (style == SCE_ERLANG_COMMENT\n\t\t\t|| style == SCE_ERLANG_COMMENT_MODULE\n\t\t\t|| style == SCE_ERLANG_COMMENT_FUNCTION) {\n\n\t\t\tif (ch == '%' && chNext == '{') {\n\t\t\t\tcurrentLevel++;\n\t\t\t} else if (ch == '%' && chNext == '}') {\n\t\t\t\tcurrentLevel--;\n\t\t\t}\n\t\t}\n\n\t\t// Fold on braces\n\t\tif (style == SCE_ERLANG_OPERATOR) {\n\t\t\tif (ch == '{' || ch == '(' || ch == '[') {\n\t\t\t\tcurrentLevel++;\n\t\t\t} else if (ch == '}' || ch == ')' || ch == ']') {\n\t\t\t\tcurrentLevel--;\n\t\t\t}\n\t\t}\n\n\n\t\tif (atEOL) {\n\t\t\tlev = previousLevel;\n\n\t\t\tif (currentLevel > previousLevel)\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\n\t\t\tif (lev != styler.LevelAt(currentLine))\n\t\t\t\tstyler.SetLevel(currentLine, lev);\n\n\t\t\tcurrentLine++;\n\t\t\tpreviousLevel = currentLevel;\n\t\t}\n\n\t}\n\n\t// Fill in the real level of the next line, keeping the current flags as they will be filled in later\n\tstyler.SetLevel(currentLine,\n\t\t\t\t\tpreviousLevel\n\t\t\t\t\t| (styler.LevelAt(currentLine) & ~SC_FOLDLEVELNUMBERMASK));\n}\n\nstatic const char * const erlangWordListDesc[] = {\n\t\"Erlang Reserved words\",\n\t\"Erlang BIFs\",\n\t\"Erlang Preprocessor\",\n\t\"Erlang Module Attributes\",\n\t\"Erlang Documentation\",\n\t\"Erlang Documentation Macro\",\n\t0\n};\n\nLexerModule lmErlang(\n\tSCLEX_ERLANG,\n\tColouriseErlangDoc,\n\t\"erlang\",\n\tFoldErlangDoc,\n\terlangWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexErrorList.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexErrorList.cxx\n ** Lexer for error lists. Used for the output pane in SciTE.\n **/\n// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <cstdlib>\n#include <cassert>\n#include <cstring>\n#include <cstdio>\n#include <cstdarg>\n\n#include <string>\n#include <string_view>\n#include <initializer_list>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"InList.h\"\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nnamespace {\n\nbool strstart(const char *haystack, const char *needle) noexcept {\n\treturn strncmp(haystack, needle, strlen(needle)) == 0;\n}\n\nconstexpr bool Is0To9(char ch) noexcept {\n\treturn (ch >= '0') && (ch <= '9');\n}\n\nconstexpr bool Is1To9(char ch) noexcept {\n\treturn (ch >= '1') && (ch <= '9');\n}\n\nbool AtEOL(Accessor &styler, Sci_Position i) {\n\treturn (styler[i] == '\\n') ||\n\t       ((styler[i] == '\\r') && (styler.SafeGetCharAt(i + 1) != '\\n'));\n}\n\nbool IsGccExcerpt(const char *s) noexcept {\n\twhile (*s) {\n\t\tif (s[0] == ' ' && s[1] == '|' && (s[2] == ' ' || s[2] == '+')) {\n\t\t\treturn true;\n\t\t}\n\t\tif (!(s[0] == ' ' || s[0] == '+' || Is0To9(s[0]))) {\n\t\t\treturn false;\n\t\t}\n\t\ts++;\n\t}\n\treturn true;\n}\n\nconst std::string_view bashDiagnosticMark = \": line \";\nbool IsBashDiagnostic(std::string_view sv) {\n\tconst size_t mark = sv.find(bashDiagnosticMark);\n\tif (mark == std::string_view::npos) {\n\t\treturn false;\n\t}\n\tstd::string_view rest = sv.substr(mark + bashDiagnosticMark.length());\n\tif (rest.empty() || !Is0To9(rest.front())) {\n\t\treturn false;\n\t}\n\twhile (!rest.empty() && Is0To9(rest.front())) {\n\t\trest.remove_prefix(1);\n\t}\n\treturn !rest.empty() && (rest.front() == ':');\n}\n\n\nint RecogniseErrorListLine(const char *lineBuffer, Sci_PositionU lengthLine, Sci_Position &startValue) {\n\tif (lineBuffer[0] == '>') {\n\t\t// Command or return status\n\t\treturn SCE_ERR_CMD;\n\t} else if (lineBuffer[0] == '<') {\n\t\t// Diff removal.\n\t\treturn SCE_ERR_DIFF_DELETION;\n\t} else if (lineBuffer[0] == '!') {\n\t\treturn SCE_ERR_DIFF_CHANGED;\n\t} else if (lineBuffer[0] == '+') {\n\t\tif (strstart(lineBuffer, \"+++ \")) {\n\t\t\treturn SCE_ERR_DIFF_MESSAGE;\n\t\t} else {\n\t\t\treturn SCE_ERR_DIFF_ADDITION;\n\t\t}\n\t} else if (lineBuffer[0] == '-') {\n\t\tif (strstart(lineBuffer, \"--- \")) {\n\t\t\treturn SCE_ERR_DIFF_MESSAGE;\n\t\t} else {\n\t\t\treturn SCE_ERR_DIFF_DELETION;\n\t\t}\n\t} else if (strstart(lineBuffer, \"cf90-\")) {\n\t\t// Absoft Pro Fortran 90/95 v8.2 error and/or warning message\n\t\treturn SCE_ERR_ABSF;\n\t} else if (strstart(lineBuffer, \"fortcom:\")) {\n\t\t// Intel Fortran Compiler v8.0 error/warning message\n\t\treturn SCE_ERR_IFORT;\n\t} else if (strstr(lineBuffer, \"File \\\"\") && strstr(lineBuffer, \", line \")) {\n\t\treturn SCE_ERR_PYTHON;\n\t} else if (strstr(lineBuffer, \" in \") && strstr(lineBuffer, \" on line \")) {\n\t\treturn SCE_ERR_PHP;\n\t} else if ((strstart(lineBuffer, \"Error \") ||\n\t            strstart(lineBuffer, \"Warning \")) &&\n\t           strstr(lineBuffer, \" at (\") &&\n\t           strstr(lineBuffer, \") : \") &&\n\t           (strstr(lineBuffer, \" at (\") < strstr(lineBuffer, \") : \"))) {\n\t\t// Intel Fortran Compiler error/warning message\n\t\treturn SCE_ERR_IFC;\n\t} else if (strstart(lineBuffer, \"Error \")) {\n\t\t// Borland error message\n\t\treturn SCE_ERR_BORLAND;\n\t} else if (strstart(lineBuffer, \"Warning \")) {\n\t\t// Borland warning message\n\t\treturn SCE_ERR_BORLAND;\n\t} else if (strstr(lineBuffer, \"at line \") &&\n\t        (strstr(lineBuffer, \"at line \") < (lineBuffer + lengthLine)) &&\n\t           strstr(lineBuffer, \"file \") &&\n\t           (strstr(lineBuffer, \"file \") < (lineBuffer + lengthLine))) {\n\t\t// Lua 4 error message\n\t\treturn SCE_ERR_LUA;\n\t} else if (strstr(lineBuffer, \" at \") &&\n\t        (strstr(lineBuffer, \" at \") < (lineBuffer + lengthLine)) &&\n\t           strstr(lineBuffer, \" line \") &&\n\t           (strstr(lineBuffer, \" line \") < (lineBuffer + lengthLine)) &&\n\t        (strstr(lineBuffer, \" at \") + 4 < (strstr(lineBuffer, \" line \")))) {\n\t\t// perl error message:\n\t\t// <message> at <file> line <line>\n\t\treturn SCE_ERR_PERL;\n\t} else if ((lengthLine >= 6) &&\n\t           (memcmp(lineBuffer, \"   at \", 6) == 0) &&\n\t           strstr(lineBuffer, \":line \")) {\n\t\t// A .NET traceback\n\t\treturn SCE_ERR_NET;\n\t} else if (strstart(lineBuffer, \"Line \") &&\n\t           strstr(lineBuffer, \", file \")) {\n\t\t// Essential Lahey Fortran error message\n\t\treturn SCE_ERR_ELF;\n\t} else if (strstart(lineBuffer, \"line \") &&\n\t           strstr(lineBuffer, \" column \")) {\n\t\t// HTML tidy style: line 42 column 1\n\t\treturn SCE_ERR_TIDY;\n\t} else if (strstart(lineBuffer, \"\\tat \") &&\n\t           strchr(lineBuffer, '(') &&\n\t           strstr(lineBuffer, \".java:\")) {\n\t\t// Java stack back trace\n\t\treturn SCE_ERR_JAVA_STACK;\n\t} else if (strstart(lineBuffer, \"In file included from \") ||\n\t           strstart(lineBuffer, \"                 from \")) {\n\t\t// GCC showing include path to following error\n\t\treturn SCE_ERR_GCC_INCLUDED_FROM;\n\t} else if (strstart(lineBuffer, \"NMAKE : fatal error\")) {\n\t\t// Microsoft nmake fatal error:\n\t\t// NMAKE : fatal error <code>: <program> : return code <return>\n\t\treturn SCE_ERR_MS;\n\t} else if (strstr(lineBuffer, \"warning LNK\") ||\n\t\tstrstr(lineBuffer, \"error LNK\")) {\n\t\t// Microsoft linker warning:\n\t\t// {<object> : } (warning|error) LNK9999\n\t\treturn SCE_ERR_MS;\n\t} else if (IsBashDiagnostic(lineBuffer)) {\n\t\t// Bash diagnostic\n\t\t// <filename>: line <line>:<message>\n\t\treturn SCE_ERR_BASH;\n\t} else if (IsGccExcerpt(lineBuffer)) {\n\t\t// GCC code excerpt and pointer to issue\n\t\t//    73 |   GTimeVal last_popdown;\n\t\t//       |            ^~~~~~~~~~~~\n\t\treturn SCE_ERR_GCC_EXCERPT;\n\t} else {\n\t\t// Look for one of the following formats:\n\t\t// GCC: <filename>:<line>:<message>\n\t\t// Microsoft: <filename>(<line>) :<message>\n\t\t// Common: <filename>(<line>): warning|error|note|remark|catastrophic|fatal\n\t\t// Common: <filename>(<line>) warning|error|note|remark|catastrophic|fatal\n\t\t// Microsoft: <filename>(<line>,<column>)<message>\n\t\t// CTags: <identifier>\\t<filename>\\t<message>\n\t\t// Lua 5 traceback: \\t<filename>:<line>:<message>\n\t\t// Lua 5.1: <exe>: <filename>:<line>:<message>\n\t\tconst bool initialTab = (lineBuffer[0] == '\\t');\n\t\tbool initialColonPart = false;\n\t\tbool canBeCtags = !initialTab;\t// For ctags must have an identifier with no spaces then a tab\n\t\tenum { stInitial,\n\t\t\tstGccStart, stGccDigit, stGccColumn, stGcc,\n\t\t\tstMsStart, stMsDigit, stMsBracket, stMsVc, stMsDigitComma, stMsDotNet,\n\t\t\tstCtagsStart, stCtagsFile, stCtagsStartString, stCtagsStringDollar, stCtags,\n\t\t\tstUnrecognized\n\t\t} state = stInitial;\n\t\tfor (Sci_PositionU i = 0; i < lengthLine; i++) {\n\t\t\tconst char ch = lineBuffer[i];\n\t\t\tchar chNext = ' ';\n\t\t\tif ((i + 1) < lengthLine)\n\t\t\t\tchNext = lineBuffer[i + 1];\n\t\t\tif (state == stInitial) {\n\t\t\t\tif (ch == ':') {\n\t\t\t\t\t// May be GCC, or might be Lua 5 (Lua traceback same but with tab prefix)\n\t\t\t\t\tif ((chNext != '\\\\') && (chNext != '/') && (chNext != ' ')) {\n\t\t\t\t\t\t// This check is not completely accurate as may be on\n\t\t\t\t\t\t// GTK+ with a file name that includes ':'.\n\t\t\t\t\t\tstate = stGccStart;\n\t\t\t\t\t} else if (chNext == ' ') { // indicates a Lua 5.1 error message\n\t\t\t\t\t\tinitialColonPart = true;\n\t\t\t\t\t}\n\t\t\t\t} else if ((ch == '(') && Is1To9(chNext) && (!initialTab)) {\n\t\t\t\t\t// May be Microsoft\n\t\t\t\t\t// Check against '0' often removes phone numbers\n\t\t\t\t\tstate = stMsStart;\n\t\t\t\t} else if ((ch == '\\t') && canBeCtags) {\n\t\t\t\t\t// May be CTags\n\t\t\t\t\tstate = stCtagsStart;\n\t\t\t\t} else if (ch == ' ') {\n\t\t\t\t\tcanBeCtags = false;\n\t\t\t\t}\n\t\t\t} else if (state == stGccStart) {\t// <filename>:\n\t\t\t\tstate = ((ch == '-') || Is0To9(ch)) ? stGccDigit : stUnrecognized;\n\t\t\t} else if (state == stGccDigit) {\t// <filename>:<line>\n\t\t\t\tif (ch == ':') {\n\t\t\t\t\tstate = stGccColumn;\t// :9.*: is GCC\n\t\t\t\t\tstartValue = i + 1;\n\t\t\t\t} else if (!Is0To9(ch)) {\n\t\t\t\t\tstate = stUnrecognized;\n\t\t\t\t}\n\t\t\t} else if (state == stGccColumn) {\t// <filename>:<line>:<column>\n\t\t\t\tif (!Is0To9(ch)) {\n\t\t\t\t\tstate = stGcc;\n\t\t\t\t\tif (ch == ':')\n\t\t\t\t\t\tstartValue = i + 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else if (state == stMsStart) {\t// <filename>(\n\t\t\t\tstate = Is0To9(ch) ? stMsDigit : stUnrecognized;\n\t\t\t} else if (state == stMsDigit) {\t// <filename>(<line>\n\t\t\t\tif (ch == ',') {\n\t\t\t\t\tstate = stMsDigitComma;\n\t\t\t\t} else if (ch == ')') {\n\t\t\t\t\tstate = stMsBracket;\n\t\t\t\t} else if ((ch != ' ') && !Is0To9(ch)) {\n\t\t\t\t\tstate = stUnrecognized;\n\t\t\t\t}\n\t\t\t} else if (state == stMsBracket) {\t// <filename>(<line>)\n\t\t\t\tif ((ch == ' ') && (chNext == ':')) {\n\t\t\t\t\tstate = stMsVc;\n\t\t\t\t} else if ((ch == ':' && chNext == ' ') || (ch == ' ')) {\n\t\t\t\t\t// Possibly Delphi.. don't test against chNext as it's one of the strings below.\n\t\t\t\t\tchar word[512];\n\t\t\t\t\tunsigned numstep = 0;\n\t\t\t\t\tif (ch == ' ')\n\t\t\t\t\t\tnumstep = 1; // ch was ' ', handle as if it's a delphi errorline, only add 1 to i.\n\t\t\t\t\telse\n\t\t\t\t\t\tnumstep = 2; // otherwise add 2.\n\t\t\t\t\tSci_PositionU chPos = 0;\n\t\t\t\t\tfor (Sci_PositionU j = i + numstep; j < lengthLine && IsUpperOrLowerCase(lineBuffer[j]) && chPos < sizeof(word) - 1; j++)\n\t\t\t\t\t\tword[chPos++] = lineBuffer[j];\n\t\t\t\t\tword[chPos] = 0;\n\t\t\t\t\tif (InListCaseInsensitive(word, {\"error\", \"warning\", \"fatal\", \"catastrophic\", \"note\", \"remark\"})) {\n\t\t\t\t\t\tstate = stMsVc;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstate = stUnrecognized;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tstate = stUnrecognized;\n\t\t\t\t}\n\t\t\t} else if (state == stMsDigitComma) {\t// <filename>(<line>,\n\t\t\t\tif (ch == ')') {\n\t\t\t\t\tstate = stMsDotNet;\n\t\t\t\t\tbreak;\n\t\t\t\t} else if ((ch != ' ') && !Is0To9(ch)) {\n\t\t\t\t\tstate = stUnrecognized;\n\t\t\t\t}\n\t\t\t} else if (state == stCtagsStart) {\n\t\t\t\tif (ch == '\\t') {\n\t\t\t\t\tstate = stCtagsFile;\n\t\t\t\t}\n\t\t\t} else if (state == stCtagsFile) {\n\t\t\t\tif ((lineBuffer[i - 1] == '\\t') &&\n\t\t\t\t        ((ch == '/' && chNext == '^') || Is0To9(ch))) {\n\t\t\t\t\tstate = stCtags;\n\t\t\t\t\tbreak;\n\t\t\t\t} else if ((ch == '/') && (chNext == '^')) {\n\t\t\t\t\tstate = stCtagsStartString;\n\t\t\t\t}\n\t\t\t} else if ((state == stCtagsStartString) && ((lineBuffer[i] == '$') && (lineBuffer[i + 1] == '/'))) {\n\t\t\t\tstate = stCtagsStringDollar;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (state == stGcc) {\n\t\t\treturn initialColonPart ? SCE_ERR_LUA : SCE_ERR_GCC;\n\t\t} else if ((state == stMsVc) || (state == stMsDotNet)) {\n\t\t\treturn SCE_ERR_MS;\n\t\t} else if ((state == stCtagsStringDollar) || (state == stCtags)) {\n\t\t\treturn SCE_ERR_CTAG;\n\t\t} else if (initialColonPart && strstr(lineBuffer, \": warning C\")) {\n\t\t\t// Microsoft warning without line number\n\t\t\t// <filename>: warning C9999\n\t\t\treturn SCE_ERR_MS;\n\t\t} else {\n\t\t\treturn SCE_ERR_DEFAULT;\n\t\t}\n\t}\n}\n\n#define CSI \"\\033[\"\n\nconstexpr bool SequenceEnd(int ch) noexcept {\n\treturn (ch == 0) || ((ch >= '@') && (ch <= '~'));\n}\n\nint StyleFromSequence(const char *seq) noexcept {\n\tint bold = 0;\n\tint colour = 0;\n\twhile (!SequenceEnd(*seq)) {\n\t\tif (Is0To9(*seq)) {\n\t\t\tint base = *seq - '0';\n\t\t\tif (Is0To9(seq[1])) {\n\t\t\t\tbase = base * 10;\n\t\t\t\tbase += seq[1] - '0';\n\t\t\t\tseq++;\n\t\t\t}\n\t\t\tif (base == 0) {\n\t\t\t\tcolour = 0;\n\t\t\t\tbold = 0;\n\t\t\t}\n\t\t\telse if (base == 1) {\n\t\t\t\tbold = 1;\n\t\t\t}\n\t\t\telse if (base >= 30 && base <= 37) {\n\t\t\t\tcolour = base - 30;\n\t\t\t}\n\t\t}\n\t\tseq++;\n\t}\n\treturn SCE_ERR_ES_BLACK + bold * 8 + colour;\n}\n\nvoid ColouriseErrorListLine(\n    const std::string &lineBuffer,\n    Sci_PositionU endPos,\n    Accessor &styler,\n\tbool valueSeparate,\n\tbool escapeSequences) {\n\tSci_Position startValue = -1;\n\tconst Sci_PositionU lengthLine = lineBuffer.length();\n\tconst int style = RecogniseErrorListLine(lineBuffer.c_str(), lengthLine, startValue);\n\tif (escapeSequences && strstr(lineBuffer.c_str(), CSI)) {\n\t\tconst Sci_Position startPos = endPos - lengthLine;\n\t\tconst char *linePortion = lineBuffer.c_str();\n\t\tSci_Position startPortion = startPos;\n\t\tint portionStyle = style;\n\t\twhile (const char *startSeq = strstr(linePortion, CSI)) {\n\t\t\tif (startSeq > linePortion) {\n\t\t\t\tstyler.ColourTo(startPortion + (startSeq - linePortion), portionStyle);\n\t\t\t}\n\t\t\tconst char *endSeq = startSeq + 2;\n\t\t\twhile (!SequenceEnd(*endSeq))\n\t\t\t\tendSeq++;\n\t\t\tconst Sci_Position endSeqPosition = startPortion + (endSeq - linePortion) + 1;\n\t\t\tswitch (*endSeq) {\n\t\t\tcase 0:\n\t\t\t\tstyler.ColourTo(endPos, SCE_ERR_ESCSEQ_UNKNOWN);\n\t\t\t\treturn;\n\t\t\tcase 'm':\t// Colour command\n\t\t\t\tstyler.ColourTo(endSeqPosition, SCE_ERR_ESCSEQ);\n\t\t\t\tportionStyle = StyleFromSequence(startSeq+2);\n\t\t\t\tbreak;\n\t\t\tcase 'K':\t// Erase to end of line -> ignore\n\t\t\t\tstyler.ColourTo(endSeqPosition, SCE_ERR_ESCSEQ);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tstyler.ColourTo(endSeqPosition, SCE_ERR_ESCSEQ_UNKNOWN);\n\t\t\t\tportionStyle = style;\n\t\t\t}\n\t\t\tstartPortion = endSeqPosition;\n\t\t\tlinePortion = endSeq + 1;\n\t\t}\n\t\tstyler.ColourTo(endPos, portionStyle);\n\t} else {\n\t\tif (valueSeparate && (startValue >= 0)) {\n\t\t\tstyler.ColourTo(endPos - (lengthLine - startValue), style);\n\t\t\tstyler.ColourTo(endPos, SCE_ERR_VALUE);\n\t\t} else {\n\t\t\tstyler.ColourTo(endPos, style);\n\t\t}\n\t}\n}\n\nvoid ColouriseErrorListDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[], Accessor &styler) {\n\tstd::string lineBuffer;\n\tstyler.StartAt(startPos);\n\tstyler.StartSegment(startPos);\n\n\t// property lexer.errorlist.value.separate\n\t//\tFor lines in the output pane that are matches from Find in Files or GCC-style\n\t//\tdiagnostics, style the path and line number separately from the rest of the\n\t//\tline with style 21 used for the rest of the line.\n\t//\tThis allows matched text to be more easily distinguished from its location.\n\tconst bool valueSeparate = styler.GetPropertyInt(\"lexer.errorlist.value.separate\", 0) != 0;\n\n\t// property lexer.errorlist.escape.sequences\n\t//\tSet to 1 to interpret escape sequences.\n\tconst bool escapeSequences = styler.GetPropertyInt(\"lexer.errorlist.escape.sequences\") != 0;\n\n\tfor (Sci_PositionU i = startPos; i < startPos + length; i++) {\n\t\tlineBuffer.push_back(styler[i]);\n\t\tif (AtEOL(styler, i)) {\n\t\t\t// End of line met, colourise it\n\t\t\tColouriseErrorListLine(lineBuffer, i, styler, valueSeparate, escapeSequences);\n\t\t\tlineBuffer.clear();\n\t\t}\n\t}\n\tif (!lineBuffer.empty()) {\t// Last line does not have ending characters\n\t\tColouriseErrorListLine(lineBuffer, startPos + length - 1, styler, valueSeparate, escapeSequences);\n\t}\n}\n\nconst char *const emptyWordListDesc[] = {\n\tnullptr\n};\n\n}\n\nLexerModule lmErrorList(SCLEX_ERRORLIST, ColouriseErrorListDoc, \"errorlist\", nullptr, emptyWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexFSharp.cxx",
    "content": "/**\n * @file LexFSharp.cxx\n * Lexer for F# 5.0\n * Copyright (c) 2021 Robert Di Pardo <dipardo.r@gmail.com>\n * Parts of LexerFSharp::Lex were adapted from LexCaml.cxx by Robert Roessler (\"RR\").\n * Parts of LexerFSharp::Fold were adapted from LexCPP.cxx by Neil Hodgson and Udo Lechner.\n * The License.txt file describes the conditions under which this software may be distributed.\n */\n// clang-format off\n#include <cstdlib>\n#include <cassert>\n\n#include <string>\n#include <string_view>\n#include <map>\n#include <functional>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n#include \"OptionSet.h\"\n#include \"DefaultLexer.h\"\n// clang-format on\n\nusing namespace Scintilla;\nusing namespace Lexilla;\n\nstatic const char *const lexerName = \"fsharp\";\nstatic constexpr int WORDLIST_SIZE = 5;\nstatic const char *const fsharpWordLists[] = {\n\t\"standard language keywords\",\n\t\"core functions, including those in the FSharp.Collections namespace\",\n\t\"built-in types, core namespaces, modules\",\n\t\"optional\",\n\t\"optional\",\n\tnullptr,\n};\nstatic constexpr int keywordClasses[] = {\n\tSCE_FSHARP_KEYWORD, SCE_FSHARP_KEYWORD2, SCE_FSHARP_KEYWORD3, SCE_FSHARP_KEYWORD4, SCE_FSHARP_KEYWORD5,\n};\n\nnamespace {\n\nstruct OptionsFSharp {\n\tbool fold = true;\n\tbool foldCompact = true;\n\tbool foldComment = true;\n\tbool foldCommentStream = true;\n\tbool foldCommentMultiLine = true;\n\tbool foldPreprocessor = false;\n\tbool foldImports = true;\n};\n\nstruct OptionSetFSharp : public OptionSet<OptionsFSharp> {\n\tOptionSetFSharp() {\n\t\tDefineProperty(\"fold\", &OptionsFSharp::fold);\n\t\tDefineProperty(\"fold.compact\", &OptionsFSharp::foldCompact);\n\t\tDefineProperty(\"fold.comment\", &OptionsFSharp::foldComment,\n\t\t\t\t   \"Setting this option to 0 disables comment folding in F# files.\");\n\n\t\tDefineProperty(\"fold.fsharp.comment.stream\", &OptionsFSharp::foldCommentStream,\n\t\t\t\t   \"Setting this option to 0 disables folding of ML-style comments in F# files when \"\n\t\t\t\t   \"fold.comment=1.\");\n\n\t\tDefineProperty(\"fold.fsharp.comment.multiline\", &OptionsFSharp::foldCommentMultiLine,\n\t\t\t\t   \"Setting this option to 0 disables folding of grouped line comments in F# files when \"\n\t\t\t\t   \"fold.comment=1.\");\n\n\t\tDefineProperty(\"fold.fsharp.preprocessor\", &OptionsFSharp::foldPreprocessor,\n\t\t\t\t   \"Setting this option to 1 enables folding of F# compiler directives.\");\n\n\t\tDefineProperty(\"fold.fsharp.imports\", &OptionsFSharp::foldImports,\n\t\t\t\t   \"Setting this option to 0 disables folding of F# import declarations.\");\n\n\t\tDefineWordListSets(fsharpWordLists);\n\t}\n};\n\nstruct FSharpString {\n\tSci_Position startPos = INVALID_POSITION;\n\tint startChar = '\"', nextChar = '\\0';\n\tconstexpr bool HasLength() const {\n\t\treturn startPos > INVALID_POSITION;\n\t}\n\tconstexpr bool CanInterpolate() const {\n\t\treturn startChar == '$' || (startChar == '@' && nextChar == '$');\n\t}\n\tconstexpr bool IsVerbatim() const {\n\t\treturn startChar == '@' || (startChar == '$' && nextChar == '@');\n\t}\n};\n\nclass UnicodeChar {\n\tenum class Notation { none, asciiDec, asciiHex, utf16, utf32 };\n\tNotation type = Notation::none;\n\t// single-byte Unicode char (000 - 255)\n\tint asciiDigits[3] = { 0 };\n\tint maxDigit = '9';\n\tint toEnd = 0;\n\tbool invalid = false;\n\npublic:\n\tUnicodeChar() noexcept = default;\n\texplicit UnicodeChar(const int prefix) {\n\t\tif (IsADigit(prefix)) {\n\t\t\t*asciiDigits = prefix;\n\t\t\tif (*asciiDigits >= '0' && *asciiDigits <= '2') {\n\t\t\t\ttype = Notation::asciiDec;\n\t\t\t\t// count first digit as \"prefix\"\n\t\t\t\ttoEnd = 2;\n\t\t\t}\n\t\t} else if (prefix == 'x' || prefix == 'u' || prefix == 'U') {\n\t\t\tswitch (prefix) {\n\t\t\t\tcase 'x':\n\t\t\t\t\ttype = Notation::asciiHex;\n\t\t\t\t\ttoEnd = 2;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'u':\n\t\t\t\t\ttype = Notation::utf16;\n\t\t\t\t\ttoEnd = 4;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'U':\n\t\t\t\t\ttype = Notation::utf32;\n\t\t\t\t\ttoEnd = 8;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\tvoid Parse(const int ch) {\n\t\tinvalid = false;\n\t\tswitch (type) {\n\t\t\tcase Notation::asciiDec: {\n\t\t\t\tmaxDigit = (*asciiDigits < '2') ? '9' : (asciiDigits[1] <= '4') ? '9' : '5';\n\t\t\t\tif (IsADigit(ch) && asciiDigits[1] <= maxDigit && ch <= maxDigit) {\n\t\t\t\t\tasciiDigits[1] = ch;\n\t\t\t\t\ttoEnd--;\n\t\t\t\t} else {\n\t\t\t\t\tinvalid = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase Notation::asciiHex:\n\t\t\tcase Notation::utf16:\n\t\t\t\tif (IsADigit(ch, 16)) {\n\t\t\t\t\ttoEnd--;\n\t\t\t\t} else {\n\t\t\t\t\tinvalid = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase Notation::utf32:\n\t\t\t\tif ((toEnd > 6 && ch == '0') || (toEnd <= 6 && IsADigit(ch, 16))) {\n\t\t\t\t\ttoEnd--;\n\t\t\t\t} else {\n\t\t\t\t\tinvalid = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase Notation::none:\n\t\t\t\tbreak;\n\t\t}\n\t}\n\tconstexpr bool AtEnd() noexcept {\n\t\treturn invalid || type == Notation::none || (type != Notation::none && toEnd < 0);\n\t}\n};\n\ninline bool MatchStreamCommentStart(StyleContext &cxt) {\n\t// match (* ... *), but allow point-free usage of the `*` operator,\n\t// e.g.  List.fold (*) 1 [ 1; 2; 3 ]\n\treturn (cxt.Match('(', '*') && cxt.GetRelative(2) != ')');\n}\n\ninline bool MatchStreamCommentEnd(const StyleContext &cxt) {\n\treturn (cxt.ch == ')' && cxt.chPrev == '*');\n}\n\ninline bool MatchLineComment(const StyleContext &cxt) {\n\t// style shebang lines as comments in F# scripts:\n\t// https://fsharp.org/specs/language-spec/4.1/FSharpSpec-4.1-latest.pdf#page=30&zoom=auto,-98,537\n\treturn cxt.Match('/', '/') || cxt.Match('#', '!');\n}\n\ninline bool MatchLineNumberStart(StyleContext &cxt) {\n\treturn cxt.atLineStart && (cxt.MatchIgnoreCase(\"#line\") ||\n\t\t(cxt.ch == '#' && (IsADigit(cxt.chNext) || IsADigit(cxt.GetRelative(2)))));\n}\n\ninline bool MatchPPDirectiveStart(const StyleContext &cxt) {\n\treturn (cxt.atLineStart && cxt.ch == '#' && iswordstart(cxt.chNext));\n}\n\ninline bool MatchTypeAttributeStart(const StyleContext &cxt) {\n\treturn cxt.Match('[', '<');\n}\n\ninline bool MatchTypeAttributeEnd(const StyleContext &cxt) {\n\treturn (cxt.ch == ']' && cxt.chPrev == '>');\n}\n\ninline bool MatchQuotedExpressionStart(const StyleContext &cxt) {\n\treturn cxt.Match('<', '@');\n}\n\ninline bool MatchQuotedExpressionEnd(const StyleContext &cxt) {\n\treturn (cxt.ch == '>' && cxt.chPrev == '@');\n}\n\ninline bool MatchStringStart(StyleContext &cxt) {\n\treturn (cxt.ch == '\"' || cxt.Match(\"@\\\"\") || cxt.Match(\"$\\\"\") || cxt.Match(\"@$\\\"\") || cxt.Match(\"$@\\\"\") ||\n\t\tcxt.Match(\"``\"));\n}\n\ninline bool FollowsEscapedBackslash(StyleContext &cxt) {\n\tint count = 0;\n\tfor (Sci_Position offset = 1; cxt.GetRelative(-offset) == '\\\\'; offset++)\n\t\tcount++;\n\treturn count % 2 != 0;\n}\n\ninline bool MatchStringEnd(StyleContext &cxt, const FSharpString &fsStr) {\n\treturn (fsStr.HasLength() &&\n\t\t// end of quoted identifier?\n\t\t((cxt.ch == '`' && cxt.chPrev == '`') ||\n\t\t// end of literal or interpolated triple-quoted string?\n\t\t ((fsStr.startChar == '\"' || (fsStr.CanInterpolate() && !(fsStr.IsVerbatim() || cxt.chPrev == '$'))) &&\n\t\t  cxt.MatchIgnoreCase(\"\\\"\\\"\\\"\")) ||\n\t\t// end of verbatim string?\n\t\t(fsStr.IsVerbatim() &&\n\t\t\t// embedded quotes must be in pairs\n\t\t\tcxt.ch == '\"' && cxt.chNext != '\"' &&\n\t\t\t(cxt.chPrev != '\"' ||\n\t\t\t\t// empty verbatim string?\n\t\t\t\t((cxt.GetRelative(-2) == '@' || cxt.GetRelative(-2) == '$') ||\n\t\t\t\t// pair of quotes at end of string?\n\t\t\t\t(cxt.GetRelative(-2) == '\"' && !(cxt.GetRelative(-3) == '@' || cxt.GetRelative(-3) == '$'))))))) ||\n\t\t(!fsStr.HasLength() && cxt.ch == '\"' &&\n\t\t\t((cxt.chPrev != '\\\\' || (cxt.GetRelative(-2) == '\\\\' && !FollowsEscapedBackslash(cxt))) ||\n\t\t\t// treat backslashes as char literals in verbatim strings\n\t\t\t(fsStr.IsVerbatim() && cxt.chPrev == '\\\\')));\n}\n\ninline bool MatchCharacterStart(StyleContext &cxt) {\n\t// don't style generic type parameters: 'a, 'b, 'T, etc.\n\treturn (cxt.ch == '\\'' && !(cxt.chPrev == ':' || cxt.GetRelative(-2) == ':'));\n}\n\ninline bool CanEmbedQuotes(StyleContext &cxt) {\n\t// allow unescaped double quotes inside literal or interpolated triple-quoted strings, verbatim strings,\n\t// and quoted identifiers:\n\t// - https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/strings\n\t// - https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/interpolated-strings#syntax\n\t// - https://fsharp.org/specs/language-spec/4.1/FSharpSpec-4.1-latest.pdf#page=25&zoom=auto,-98,600\n\treturn cxt.Match(\"$\\\"\\\"\\\"\") || cxt.Match(\"\\\"\\\"\\\"\") || cxt.Match(\"@$\\\"\\\"\\\"\") || cxt.Match(\"$@\\\"\\\"\\\"\") ||\n\t       cxt.Match('@', '\"') || cxt.Match('`', '`');\n}\n\ninline bool IsLineEnd(StyleContext &cxt, const Sci_Position offset) {\n\tconst int ch = cxt.GetRelative(offset, '\\n');\n\treturn (ch == '\\r' || ch == '\\n');\n}\n\nclass LexerFSharp : public DefaultLexer {\n\tWordList keywords[WORDLIST_SIZE];\n\tOptionsFSharp options;\n\tOptionSetFSharp optionSet;\n\tCharacterSet setOperators;\n\tCharacterSet setFormatSpecs;\n\tCharacterSet setDotNetFormatSpecs;\n\tCharacterSet setFormatFlags;\n\tCharacterSet numericMetaChars1;\n\tCharacterSet numericMetaChars2;\n\tstd::map<int, int> numericPrefixes = { { 'b', 2 }, { 'o', 8 }, { 'x', 16 } };\n\npublic:\n\texplicit LexerFSharp()\n\t    : DefaultLexer(lexerName, SCLEX_FSHARP),\n\t      setOperators(CharacterSet::setNone, \"~^'-+*/%=@|&<>()[]{};,:!?\"),\n\t      setFormatSpecs(CharacterSet::setNone, \".%aAbBcdeEfFgGiMoOstuxX0123456789\"),\n\t      setDotNetFormatSpecs(CharacterSet::setNone, \"cCdDeEfFgGnNpPxX\"),\n\t      setFormatFlags(CharacterSet::setNone, \".-+0 \"),\n\t      numericMetaChars1(CharacterSet::setNone, \"_uU\"),\n\t      numericMetaChars2(CharacterSet::setNone, \"fFIlLmMnsy\") {\n\t}\n\tLexerFSharp(const LexerFSharp &) = delete;\n\tLexerFSharp(LexerFSharp &&) = delete;\n\tLexerFSharp &operator=(const LexerFSharp &) = delete;\n\tLexerFSharp &operator=(LexerFSharp &&) = delete;\n\tstatic ILexer5 *LexerFactoryFSharp() {\n\t\treturn new LexerFSharp();\n\t}\n\tvirtual ~LexerFSharp() {\n\t}\n\tvoid SCI_METHOD Release() noexcept override {\n\t\tdelete this;\n\t}\n\tint SCI_METHOD Version() const noexcept override {\n\t\treturn lvRelease5;\n\t}\n\tconst char *SCI_METHOD GetName() noexcept override {\n\t\treturn lexerName;\n\t}\n\tint SCI_METHOD GetIdentifier() noexcept override {\n\t\treturn SCLEX_FSHARP;\n\t}\n\tint SCI_METHOD LineEndTypesSupported() noexcept override {\n\t\treturn SC_LINE_END_TYPE_DEFAULT;\n\t}\n\tvoid *SCI_METHOD PrivateCall(int, void *) noexcept override {\n\t\treturn nullptr;\n\t}\n\tconst char *SCI_METHOD DescribeWordListSets() override {\n\t\treturn optionSet.DescribeWordListSets();\n\t}\n\tconst char *SCI_METHOD PropertyNames() override {\n\t\treturn optionSet.PropertyNames();\n\t}\n\tint SCI_METHOD PropertyType(const char *name) override {\n\t\treturn optionSet.PropertyType(name);\n\t}\n\tconst char *SCI_METHOD DescribeProperty(const char *name) override {\n\t\treturn optionSet.DescribeProperty(name);\n\t}\n\tconst char *SCI_METHOD PropertyGet(const char *key) override {\n\t\treturn optionSet.PropertyGet(key);\n\t}\n\tSci_Position SCI_METHOD PropertySet(const char *key, const char *val) override {\n\t\tif (optionSet.PropertySet(&options, key, val)) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn INVALID_POSITION;\n\t}\n\tSci_Position SCI_METHOD WordListSet(int n, const char *wl) override;\n\tvoid SCI_METHOD Lex(Sci_PositionU start, Sci_Position length, int initStyle, IDocument *pAccess) override;\n\tvoid SCI_METHOD Fold(Sci_PositionU start, Sci_Position length, int initStyle,IDocument *pAccess) override;\n\nprivate:\n\tinline bool IsNumber(StyleContext &cxt, const int base = 10) {\n\t\treturn IsADigit(cxt.ch, base) || (IsADigit(cxt.chPrev, base) && numericMetaChars1.Contains(cxt.ch)) ||\n\t\t       (IsADigit(cxt.GetRelative(-2), base) && numericMetaChars2.Contains(cxt.ch));\n\t}\n\n\tinline bool IsFloat(StyleContext &cxt) {\n\t\tif (cxt.MatchIgnoreCase(\"e+\") || cxt.MatchIgnoreCase(\"e-\")) {\n\t\t\tcxt.Forward();\n\t\t\treturn true;\n\t\t}\n\t\treturn ((cxt.chPrev == '.' && IsADigit(cxt.ch)) ||\n\t\t\t(IsADigit(cxt.chPrev) && (cxt.ch == '.' || numericMetaChars2.Contains(cxt.ch))));\n\t}\n};\n\nSci_Position SCI_METHOD LexerFSharp::WordListSet(int n, const char *wl) {\n\tWordList *wordListN = nullptr;\n\tSci_Position firstModification = INVALID_POSITION;\n\n\tif (n < WORDLIST_SIZE) {\n\t\twordListN = &keywords[n];\n\t}\n\tif (wordListN && wordListN->Set(wl)) {\n\t\tfirstModification = 0;\n\t}\n\treturn firstModification;\n}\n\nvoid SCI_METHOD LexerFSharp::Lex(Sci_PositionU start, Sci_Position length, int initStyle, IDocument *pAccess) {\n\tLexAccessor styler(pAccess);\n\tStyleContext sc(start, static_cast<Sci_PositionU>(length), initStyle, styler);\n\tSci_Position lineCurrent = styler.GetLine(static_cast<Sci_Position>(start));\n\tSci_PositionU cursor = 0;\n\tUnicodeChar uniCh = UnicodeChar();\n\tFSharpString fsStr = FSharpString();\n\tconstexpr Sci_Position MAX_WORD_LEN = 64;\n\tconstexpr int SPACE = ' ';\n\tint currentBase = 10;\n\tint levelNesting = (lineCurrent >= 1) ? styler.GetLineState(lineCurrent - 1) : 0;\n\tbool isInterpolated = false;\n\n\twhile (sc.More()) {\n\t\tSci_PositionU colorSpan = sc.currentPos - 1;\n\t\tint state = -1;\n\t\tbool advance = true;\n\n\t\tswitch (sc.state & 0xff) {\n\t\t\tcase SCE_FSHARP_DEFAULT:\n\t\t\t\tcursor = sc.currentPos;\n\n\t\t\t\tif (MatchLineNumberStart(sc)) {\n\t\t\t\t\tstate = SCE_FSHARP_LINENUM;\n\t\t\t\t} else if (MatchPPDirectiveStart(sc)) {\n\t\t\t\t\tstate = SCE_FSHARP_PREPROCESSOR;\n\t\t\t\t} else if (MatchLineComment(sc)) {\n\t\t\t\t\tstate = SCE_FSHARP_COMMENTLINE;\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\tsc.ch = SPACE;\n\t\t\t\t} else if (MatchStreamCommentStart(sc)) {\n\t\t\t\t\tstate = SCE_FSHARP_COMMENT;\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\tsc.ch = SPACE;\n\t\t\t\t} else if (MatchTypeAttributeStart(sc)) {\n\t\t\t\t\tstate = SCE_FSHARP_ATTRIBUTE;\n\t\t\t\t\tsc.Forward();\n\t\t\t\t} else if (MatchQuotedExpressionStart(sc)) {\n\t\t\t\t\tstate = SCE_FSHARP_QUOTATION;\n\t\t\t\t\tsc.Forward();\n\t\t\t\t} else if (MatchCharacterStart(sc)) {\n\t\t\t\t\tstate = SCE_FSHARP_CHARACTER;\n\t\t\t\t} else if (MatchStringStart(sc)) {\n\t\t\t\t\tfsStr.startChar = sc.ch;\n\t\t\t\t\tfsStr.nextChar = sc.chNext;\n\t\t\t\t\tfsStr.startPos = INVALID_POSITION;\n\t\t\t\t\tif (CanEmbedQuotes(sc)) {\n\t\t\t\t\t\t// double quotes after this position should be non-terminating\n\t\t\t\t\t\tfsStr.startPos = static_cast<Sci_Position>(sc.currentPos - cursor);\n\t\t\t\t\t}\n\t\t\t\t\tif (sc.ch == '`') {\n\t\t\t\t\t\tstate = SCE_FSHARP_QUOT_IDENTIFIER;\n\t\t\t\t\t} else if (fsStr.IsVerbatim()) {\n\t\t\t\t\t\tstate = SCE_FSHARP_VERBATIM;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstate = SCE_FSHARP_STRING;\n\t\t\t\t\t}\n\t\t\t\t} else if (IsADigit(sc.ch, currentBase) ||\n\t\t\t\t\t   ((sc.ch == '+' || sc.ch == '-') && IsADigit(sc.chNext))) {\n\t\t\t\t\tstate = SCE_FSHARP_NUMBER;\n\t\t\t\t} else if (setOperators.Contains(sc.ch) &&\n\t\t\t\t\t   // don't use operator style in async keywords (e.g. `return!`)\n\t\t\t\t\t   !(sc.ch == '!' && iswordstart(sc.chPrev)) &&\n\t\t\t\t\t   // don't use operator style in member access, array/string indexing\n\t\t\t\t\t   !(sc.ch == '.' && (sc.chPrev == '\\\"' || iswordstart(sc.chPrev)) &&\n\t\t\t\t\t     (iswordstart(sc.chNext) || sc.chNext == '['))) {\n\t\t\t\t\tstate = SCE_FSHARP_OPERATOR;\n\t\t\t\t} else if (iswordstart(sc.ch)) {\n\t\t\t\t\tstate = SCE_FSHARP_IDENTIFIER;\n\t\t\t\t} else {\n\t\t\t\t\tstate = SCE_FSHARP_DEFAULT;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_FSHARP_LINENUM:\n\t\t\tcase SCE_FSHARP_PREPROCESSOR:\n\t\t\tcase SCE_FSHARP_COMMENTLINE:\n\t\t\t\tif (sc.MatchLineEnd()) {\n\t\t\t\t\tstate = SCE_FSHARP_DEFAULT;\n\t\t\t\t\tadvance = false;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_FSHARP_COMMENT:\n\t\t\t\tif (MatchStreamCommentStart(sc)) {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\tsc.ch = SPACE;\n\t\t\t\t\tlevelNesting++;\n\t\t\t\t} else if (MatchStreamCommentEnd(sc)) {\n\t\t\t\t\tif (levelNesting > 0)\n\t\t\t\t\t\tlevelNesting--;\n\t\t\t\t\telse {\n\t\t\t\t\t\tstate = SCE_FSHARP_DEFAULT;\n\t\t\t\t\t\tcolorSpan++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_FSHARP_ATTRIBUTE:\n\t\t\tcase SCE_FSHARP_QUOTATION:\n\t\t\t\tif (MatchTypeAttributeEnd(sc) || MatchQuotedExpressionEnd(sc)) {\n\t\t\t\t\tstate = SCE_FSHARP_DEFAULT;\n\t\t\t\t\tcolorSpan++;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_FSHARP_CHARACTER:\n\t\t\t\tif (sc.chPrev == '\\\\' && sc.GetRelative(-2) != '\\\\') {\n\t\t\t\t\tuniCh = UnicodeChar(sc.ch);\n\t\t\t\t} else if (sc.ch == '\\'' &&\n\t\t\t\t\t   ((sc.chPrev == ' ' && sc.GetRelative(-2) == '\\'') || sc.chPrev != '\\\\' ||\n\t\t\t\t\t\t(sc.chPrev == '\\\\' && sc.GetRelative(-2) == '\\\\'))) {\n\t\t\t\t\t// byte literal?\n\t\t\t\t\tif (sc.Match('\\'', 'B')) {\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t\tcolorSpan++;\n\t\t\t\t\t}\n\t\t\t\t\tif (!sc.atLineEnd) {\n\t\t\t\t\t\tcolorSpan++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsc.ChangeState(SCE_FSHARP_IDENTIFIER);\n\t\t\t\t\t}\n\t\t\t\t\tstate = SCE_FSHARP_DEFAULT;\n\t\t\t\t} else {\n\t\t\t\t\tuniCh.Parse(sc.ch);\n\t\t\t\t\tif (uniCh.AtEnd() && (sc.currentPos - cursor) >= 2) {\n\t\t\t\t\t\t// terminate now, since we left the char behind\n\t\t\t\t\t\tsc.ChangeState(SCE_FSHARP_IDENTIFIER);\n\t\t\t\t\t\tadvance = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_FSHARP_STRING:\n\t\t\tcase SCE_FSHARP_VERBATIM:\n\t\t\tcase SCE_FSHARP_QUOT_IDENTIFIER:\n\t\t\t\tif (MatchStringEnd(sc, fsStr)) {\n\t\t\t\t\tconst Sci_Position strLen = static_cast<Sci_Position>(sc.currentPos - cursor);\n\t\t\t\t\t// backtrack to start of string\n\t\t\t\t\tfor (Sci_Position i = -strLen; i < 0; i++) {\n\t\t\t\t\t\tconst int startQuote = sc.GetRelative(i);\n\t\t\t\t\t\tif (startQuote == '\\\"' || (startQuote == '`' && sc.GetRelative(i - 1) == '`')) {\n\t\t\t\t\t\t\t// byte array?\n\t\t\t\t\t\t\tif (sc.Match('\\\"', 'B')) {\n\t\t\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t\t\t\tcolorSpan++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (!sc.atLineEnd) {\n\t\t\t\t\t\t\t\tcolorSpan++;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tsc.ChangeState(SCE_FSHARP_IDENTIFIER);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tstate = SCE_FSHARP_DEFAULT;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (sc.ch == '%' &&\n\t\t\t\t\t   !(fsStr.startChar == '`' || sc.MatchIgnoreCase(\"%  \") || sc.MatchIgnoreCase(\"% \\\"\")) &&\n\t\t\t\t\t   (setFormatSpecs.Contains(sc.chNext) || setFormatFlags.Contains(sc.chNext))) {\n\t\t\t\t\tif (fsStr.CanInterpolate() && sc.chNext != '%') {\n\t\t\t\t\t\tfor (Sci_Position i = 2; i < length && !IsLineEnd(sc, i); i++) {\n\t\t\t\t\t\t\tif (sc.GetRelative(i) == '{') {\n\t\t\t\t\t\t\t\tstate = setFormatSpecs.Contains(sc.GetRelative(i - 1))\n\t\t\t\t\t\t\t\t\t    ? SCE_FSHARP_FORMAT_SPEC\n\t\t\t\t\t\t\t\t\t    : state;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstate = SCE_FSHARP_FORMAT_SPEC;\n\t\t\t\t\t}\n\t\t\t\t} else if (isInterpolated) {\n\t\t\t\t\tif (sc.ch == ',') {\n\t\t\t\t\t\t// .NET alignment specifier?\n\t\t\t\t\t\tstate = (sc.chNext == '+' || sc.chNext == '-' || IsADigit(sc.chNext))\n\t\t\t\t\t\t\t    ? SCE_FSHARP_FORMAT_SPEC\n\t\t\t\t\t\t\t    : state;\n\t\t\t\t\t} else if (sc.ch == ':') {\n\t\t\t\t\t\t// .NET format specifier?\n\t\t\t\t\t\tstate = setDotNetFormatSpecs.Contains(sc.chNext)\n\t\t\t\t\t\t\t    ? SCE_FSHARP_FORMAT_SPEC\n\t\t\t\t\t\t\t    : state;\n\t\t\t\t\t} else if (sc.chNext == '}') {\n\t\t\t\t\t\tisInterpolated = false;\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t\tstate = fsStr.IsVerbatim() ? SCE_FSHARP_VERBATIM : SCE_FSHARP_STRING;\n\t\t\t\t\t}\n\t\t\t\t} else if (fsStr.CanInterpolate() && sc.ch == '{') {\n\t\t\t\t\tisInterpolated = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_FSHARP_IDENTIFIER:\n\t\t\t\tif (!(iswordstart(sc.ch) || sc.ch == '\\'')) {\n\t\t\t\t\tconst Sci_Position wordLen = static_cast<Sci_Position>(sc.currentPos - cursor);\n\t\t\t\t\tif (wordLen < MAX_WORD_LEN) {\n\t\t\t\t\t\t// wordLength is believable as keyword, [re-]construct token - RR\n\t\t\t\t\t\tchar token[MAX_WORD_LEN] = { 0 };\n\t\t\t\t\t\tfor (Sci_Position i = -wordLen; i < 0; i++) {\n\t\t\t\t\t\t\ttoken[wordLen + i] = static_cast<char>(sc.GetRelative(i));\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttoken[wordLen] = '\\0';\n\t\t\t\t\t\t// a snake_case_identifier can never be a keyword\n\t\t\t\t\t\tif (!(sc.ch == '_' || sc.GetRelative(-wordLen - 1) == '_')) {\n\t\t\t\t\t\t\tfor (int i = 0; i < WORDLIST_SIZE; i++) {\n\t\t\t\t\t\t\t\tif (keywords[i].InList(token)) {\n\t\t\t\t\t\t\t\t\tsc.ChangeState(keywordClasses[i]);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tstate = SCE_FSHARP_DEFAULT;\n\t\t\t\t\tadvance = false;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_FSHARP_OPERATOR:\n\t\t\t\t// special-case \"()\" and \"[]\" tokens as KEYWORDS - RR\n\t\t\t\tif ((sc.ch == ')' && sc.chPrev == '(') || (sc.ch == ']' && sc.chPrev == '[')) {\n\t\t\t\t\tsc.ChangeState(SCE_FSHARP_KEYWORD);\n\t\t\t\t\tcolorSpan++;\n\t\t\t\t} else {\n\t\t\t\t\tadvance = false;\n\t\t\t\t}\n\t\t\t\tstate = SCE_FSHARP_DEFAULT;\n\t\t\t\tbreak;\n\t\t\tcase SCE_FSHARP_NUMBER:\n\t\t\t\tif ((setOperators.Contains(sc.chPrev) || IsASpaceOrTab(sc.chPrev)) && sc.ch == '0') {\n\t\t\t\t\tif (numericPrefixes.find(sc.chNext) != numericPrefixes.end()) {\n\t\t\t\t\t\tcurrentBase = numericPrefixes[sc.chNext];\n\t\t\t\t\t\tsc.Forward(2);\n\t\t\t\t\t}\n\t\t\t\t} else if ((setOperators.Contains(sc.GetRelative(-2)) || IsASpaceOrTab(sc.GetRelative(-2))) &&\n\t\t\t\t\t   sc.chPrev == '0') {\n\t\t\t\t\tif (numericPrefixes.find(sc.ch) != numericPrefixes.end()) {\n\t\t\t\t\t\tcurrentBase = numericPrefixes[sc.ch];\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstate = (IsNumber(sc, currentBase) || IsFloat(sc))\n\t\t\t\t\t? SCE_FSHARP_NUMBER\n\t\t\t\t\t// change style even when operators aren't spaced\n\t\t\t\t\t: setOperators.Contains(sc.ch) ? SCE_FSHARP_OPERATOR : SCE_FSHARP_DEFAULT;\n\t\t\t\tcurrentBase = (state == SCE_FSHARP_NUMBER) ? currentBase : 10;\n\t\t\t\tbreak;\n\t\t\tcase SCE_FSHARP_FORMAT_SPEC:\n\t\t\t\tif (!(isInterpolated && IsADigit(sc.chNext)) &&\n\t\t\t\t\t(!setFormatSpecs.Contains(sc.chNext) ||\n\t\t\t\t    !(setFormatFlags.Contains(sc.ch) || IsADigit(sc.ch)) ||\n\t\t\t\t    (setFormatFlags.Contains(sc.ch) && sc.ch == sc.chNext))) {\n\t\t\t\t\tcolorSpan++;\n\t\t\t\t\tstate = fsStr.IsVerbatim() ? SCE_FSHARP_VERBATIM : SCE_FSHARP_STRING;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif (sc.MatchLineEnd()) {\n\t\t\tstyler.SetLineState(lineCurrent++, (sc.state == SCE_FSHARP_COMMENT) ? levelNesting : 0);\n\t\t\tadvance = true;\n\t\t}\n\n\t\tif (state >= SCE_FSHARP_DEFAULT) {\n\t\t\tstyler.ColourTo(colorSpan, sc.state);\n\t\t\tsc.ChangeState(state);\n\t\t}\n\n\t\tif (advance) {\n\t\t\tsc.Forward();\n\t\t}\n\t}\n\n\tsc.Complete();\n}\n\nbool LineContains(LexAccessor &styler, const char *word, const Sci_Position start,\n\t\t  const int chAttr = SCE_FSHARP_DEFAULT);\n\nvoid FoldLexicalGroup(LexAccessor &styler, int &levelNext, const Sci_Position lineCurrent, const char *word,\n\t\t      const int chAttr);\n\nvoid SCI_METHOD LexerFSharp::Fold(Sci_PositionU start, Sci_Position length, int initStyle, IDocument *pAccess) {\n\tif (!options.fold) {\n\t\treturn;\n\t}\n\n\tLexAccessor styler(pAccess);\n\tconst Sci_Position startPos = static_cast<Sci_Position>(start);\n\tconst Sci_PositionU endPos = start + length;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tSci_Position lineNext = lineCurrent + 1;\n\tSci_Position lineStartNext = styler.LineStart(lineNext);\n\tint style = initStyle;\n\tint styleNext = styler.StyleAt(startPos);\n\tchar chNext = styler[startPos];\n\tint levelNext;\n\tint levelCurrent = SC_FOLDLEVELBASE;\n\tint visibleChars = 0;\n\n\tif (lineCurrent > 0) {\n\t\tlevelCurrent = styler.LevelAt(lineCurrent - 1) >> 0x10;\n\t}\n\n\tlevelNext = levelCurrent;\n\n\tfor (Sci_PositionU i = start; i < endPos; i++) {\n\t\tconst Sci_Position currentPos = static_cast<Sci_Position>(i);\n\t\tconst bool atEOL = (currentPos == (lineStartNext - 1) || styler.SafeGetCharAt(currentPos) == '\\r');\n\t\tconst bool atLineOrDocEnd = (atEOL || (i == (endPos - 1)));\n\t\tconst int stylePrev = style;\n\t\tconst char ch = chNext;\n\t\tconst bool inLineComment = (stylePrev == SCE_FSHARP_COMMENTLINE);\n\t\tstyle = styleNext;\n\t\tstyleNext = styler.StyleAt(currentPos + 1);\n\t\tchNext = styler.SafeGetCharAt(currentPos + 1);\n\n\t\tif (options.foldComment) {\n\t\t\tif (options.foldCommentMultiLine && inLineComment && atEOL) {\n\t\t\t\tFoldLexicalGroup(styler, levelNext, lineCurrent, \"//\", SCE_FSHARP_COMMENTLINE);\n\t\t\t}\n\n\t\t\tif (options.foldCommentStream && style == SCE_FSHARP_COMMENT && !inLineComment) {\n\t\t\t\tif (stylePrev != SCE_FSHARP_COMMENT ||\n\t\t\t\t    (styler.Match(currentPos, \"(*\") &&\n\t\t\t\t     !LineContains(styler, \"*)\", currentPos + 2, SCE_FSHARP_COMMENT))) {\n\t\t\t\t\tlevelNext++;\n\t\t\t\t} else if ((styleNext != SCE_FSHARP_COMMENT ||\n\t\t\t\t\t    ((styler.Match(currentPos, \"*)\") &&\n\t\t\t\t\t      !LineContains(styler, \"(*\", styler.LineStart(lineCurrent), SCE_FSHARP_COMMENT)) &&\n\t\t\t\t\t     styler.GetLineState(lineCurrent - 1) > 0)) &&\n\t\t\t\t\t   !atEOL) {\n\t\t\t\t\tlevelNext--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (options.foldPreprocessor && style == SCE_FSHARP_PREPROCESSOR) {\n\t\t\tif (styler.Match(currentPos, \"#if\")) {\n\t\t\t\tlevelNext++;\n\t\t\t} else if (styler.Match(currentPos, \"#endif\")) {\n\t\t\t\tlevelNext--;\n\t\t\t}\n\t\t}\n\n\t\tif (options.foldImports && styler.Match(currentPos, \"open \") && styleNext == SCE_FSHARP_KEYWORD) {\n\t\t\tFoldLexicalGroup(styler, levelNext, lineCurrent, \"open \", SCE_FSHARP_KEYWORD);\n\t\t}\n\n\t\tif (!IsASpace(ch)) {\n\t\t\tvisibleChars++;\n\t\t}\n\n\t\tif (atLineOrDocEnd) {\n\t\t\tint levelUse = levelCurrent;\n\t\t\tint lev = levelUse | levelNext << 16;\n\n\t\t\tif (visibleChars == 0 && options.foldCompact) {\n\t\t\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\t\t\t}\n\t\t\tif (levelUse < levelNext) {\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\t}\n\t\t\tif (lev != styler.LevelAt(lineCurrent)) {\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\t\t\t}\n\n\t\t\tvisibleChars = 0;\n\t\t\tlineCurrent++;\n\t\t\tlineNext = lineCurrent + 1;\n\t\t\tlineStartNext = styler.LineStart(lineNext);\n\t\t\tlevelCurrent = levelNext;\n\n\t\t\tif (atEOL && (currentPos == (styler.Length() - 1))) {\n\t\t\t\tstyler.SetLevel(lineCurrent, (levelCurrent | levelCurrent << 16) | SC_FOLDLEVELWHITEFLAG);\n\t\t\t}\n\t\t}\n\t}\n}\n\nbool LineContains(LexAccessor &styler, const char *word, const Sci_Position start, const int chAttr) {\n\tbool found = false;\n\tbool requireStyle = (chAttr > SCE_FSHARP_DEFAULT);\n\tfor (Sci_Position i = start; i < styler.LineStart(styler.GetLine(start) + 1) - 1; i++) {\n\t\tif (styler.Match(i, word)) {\n\t\t\tfound = requireStyle ? styler.StyleAt(i) == chAttr : true;\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn found;\n}\n\nvoid FoldLexicalGroup(LexAccessor &styler, int &levelNext, const Sci_Position lineCurrent, const char *word,\n\t\t      const int chAttr) {\n\tconst Sci_Position linePrev = styler.LineStart(lineCurrent - 1);\n\tconst Sci_Position lineNext = styler.LineStart(lineCurrent + 1);\n\tconst bool follows = (lineCurrent > 0) && LineContains(styler, word, linePrev, chAttr);\n\tconst bool isFollowed = LineContains(styler, word, lineNext, chAttr);\n\n\tif (isFollowed && !follows) {\n\t\tlevelNext++;\n\t} else if (!isFollowed && follows && levelNext > SC_FOLDLEVELBASE) {\n\t\tlevelNext--;\n\t}\n}\n} // namespace\n\nLexerModule lmFSharp(SCLEX_FSHARP, LexerFSharp::LexerFactoryFSharp, \"fsharp\", fsharpWordLists);\n"
  },
  {
    "path": "lexilla/lexers/LexFlagship.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexFlagship.cxx\n ** Lexer for Harbour and FlagShip.\n ** (Syntactically compatible to other xBase dialects, like Clipper, dBase, Clip, FoxPro etc.)\n **/\n// Copyright 2005 by Randy Butler\n// Copyright 2010 by Xavi <jarabal/at/gmail.com> (Harbour)\n// Copyright 1998-2003 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\n// Extended to accept accented characters\nstatic inline bool IsAWordChar(int ch)\n{\n\treturn ch >= 0x80 ||\n\t\t\t\t(isalnum(ch) || ch == '_');\n}\n\nstatic void ColouriseFlagShipDoc(Sci_PositionU startPos, Sci_Position length, int initStyle,\n                                 WordList *keywordlists[], Accessor &styler)\n{\n\n\tWordList &keywords = *keywordlists[0];\n\tWordList &keywords2 = *keywordlists[1];\n\tWordList &keywords3 = *keywordlists[2];\n\tWordList &keywords4 = *keywordlists[3];\n\tWordList &keywords5 = *keywordlists[4];\n\n\t// property lexer.flagship.styling.within.preprocessor\n\t//\tFor Harbour code, determines whether all preprocessor code is styled in the preprocessor style (0) or only from the\n\t//\tinitial # to the end of the command word(1, the default). It also determines how to present text, dump, and disabled code.\n\tbool stylingWithinPreprocessor = styler.GetPropertyInt(\"lexer.flagship.styling.within.preprocessor\", 1) != 0;\n\n\tCharacterSet setDoxygen(CharacterSet::setAlpha, \"$@\\\\&<>#{}[]\");\n\n\tint visibleChars = 0;\n\tint closeStringChar = 0;\n\tint styleBeforeDCKeyword = SCE_FS_DEFAULT;\n\tbool bEnableCode = initStyle < SCE_FS_DISABLEDCODE;\n\n\tStyleContext sc(startPos, length, initStyle, styler);\n\n\tfor (; sc.More(); sc.Forward()) {\n\n\t\t// Determine if the current state should terminate.\n\t\tswitch (sc.state) {\n\t\t\tcase SCE_FS_OPERATOR:\n\t\t\tcase SCE_FS_OPERATOR_C:\n\t\t\tcase SCE_FS_WORDOPERATOR:\n\t\t\t\tsc.SetState(bEnableCode ? SCE_FS_DEFAULT : SCE_FS_DEFAULT_C);\n\t\t\t\tbreak;\n\t\t\tcase SCE_FS_IDENTIFIER:\n\t\t\tcase SCE_FS_IDENTIFIER_C:\n\t\t\t\tif (!IsAWordChar(sc.ch)) {\n\t\t\t\t\tchar s[64];\n\t\t\t\t\tsc.GetCurrentLowered(s, sizeof(s));\n\t\t\t\t\tif (keywords.InList(s)) {\n\t\t\t\t\t\tsc.ChangeState(bEnableCode ? SCE_FS_KEYWORD : SCE_FS_KEYWORD_C);\n\t\t\t\t\t} else if (keywords2.InList(s)) {\n\t\t\t\t\t\tsc.ChangeState(bEnableCode ? SCE_FS_KEYWORD2 : SCE_FS_KEYWORD2_C);\n\t\t\t\t\t} else if (bEnableCode && keywords3.InList(s)) {\n\t\t\t\t\t\tsc.ChangeState(SCE_FS_KEYWORD3);\n\t\t\t\t\t} else if (bEnableCode && keywords4.InList(s)) {\n\t\t\t\t\t\tsc.ChangeState(SCE_FS_KEYWORD4);\n\t\t\t\t\t}// Else, it is really an identifier...\n\t\t\t\t\tsc.SetState(bEnableCode ? SCE_FS_DEFAULT : SCE_FS_DEFAULT_C);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_FS_NUMBER:\n\t\t\t\tif (!IsAWordChar(sc.ch) && !(sc.ch == '.' && IsADigit(sc.chNext))) {\n\t\t\t\t\tsc.SetState(SCE_FS_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_FS_NUMBER_C:\n\t\t\t\tif (!IsAWordChar(sc.ch) && sc.ch != '.') {\n\t\t\t\t\tsc.SetState(SCE_FS_DEFAULT_C);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_FS_CONSTANT:\n\t\t\t\tif (!IsAWordChar(sc.ch)) {\n\t\t\t\t\tsc.SetState(SCE_FS_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_FS_STRING:\n\t\t\tcase SCE_FS_STRING_C:\n\t\t\t\tif (sc.ch == closeStringChar) {\n\t\t\t\t\tsc.ForwardSetState(bEnableCode ? SCE_FS_DEFAULT : SCE_FS_DEFAULT_C);\n\t\t\t\t} else if (sc.atLineEnd) {\n\t\t\t\t\tsc.ChangeState(bEnableCode ? SCE_FS_STRINGEOL : SCE_FS_STRINGEOL_C);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_FS_STRINGEOL:\n\t\t\tcase SCE_FS_STRINGEOL_C:\n\t\t\t\tif (sc.atLineStart) {\n\t\t\t\t\tsc.SetState(bEnableCode ? SCE_FS_DEFAULT : SCE_FS_DEFAULT_C);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_FS_COMMENTDOC:\n\t\t\tcase SCE_FS_COMMENTDOC_C:\n\t\t\t\tif (sc.Match('*', '/')) {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\tsc.ForwardSetState(bEnableCode ? SCE_FS_DEFAULT : SCE_FS_DEFAULT_C);\n\t\t\t\t} else if (sc.ch == '@' || sc.ch == '\\\\') { // JavaDoc and Doxygen support\n\t\t\t\t\t// Verify that we have the conditions to mark a comment-doc-keyword\n\t\t\t\t\tif ((IsASpace(sc.chPrev) || sc.chPrev == '*') && (!IsASpace(sc.chNext))) {\n\t\t\t\t\t\tstyleBeforeDCKeyword = bEnableCode ? SCE_FS_COMMENTDOC : SCE_FS_COMMENTDOC_C;\n\t\t\t\t\t\tsc.SetState(SCE_FS_COMMENTDOCKEYWORD);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_FS_COMMENT:\n\t\t\tcase SCE_FS_COMMENTLINE:\n\t\t\t\tif (sc.atLineStart) {\n\t\t\t\t\tsc.SetState(SCE_FS_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_FS_COMMENTLINEDOC:\n\t\t\tcase SCE_FS_COMMENTLINEDOC_C:\n\t\t\t\tif (sc.atLineStart) {\n\t\t\t\t\tsc.SetState(bEnableCode ? SCE_FS_DEFAULT : SCE_FS_DEFAULT_C);\n\t\t\t\t} else if (sc.ch == '@' || sc.ch == '\\\\') { // JavaDoc and Doxygen support\n\t\t\t\t\t// Verify that we have the conditions to mark a comment-doc-keyword\n\t\t\t\t\tif ((IsASpace(sc.chPrev) || sc.chPrev == '/' || sc.chPrev == '!') && (!IsASpace(sc.chNext))) {\n\t\t\t\t\t\tstyleBeforeDCKeyword = bEnableCode ? SCE_FS_COMMENTLINEDOC : SCE_FS_COMMENTLINEDOC_C;\n\t\t\t\t\t\tsc.SetState(SCE_FS_COMMENTDOCKEYWORD);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_FS_COMMENTDOCKEYWORD:\n\t\t\t\tif ((styleBeforeDCKeyword == SCE_FS_COMMENTDOC || styleBeforeDCKeyword == SCE_FS_COMMENTDOC_C) &&\n\t\t\t\t\t\tsc.Match('*', '/')) {\n\t\t\t\t\tsc.ChangeState(SCE_FS_COMMENTDOCKEYWORDERROR);\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\tsc.ForwardSetState(bEnableCode ? SCE_FS_DEFAULT : SCE_FS_DEFAULT_C);\n\t\t\t\t} else if (!setDoxygen.Contains(sc.ch)) {\n\t\t\t\t\tchar s[64];\n\t\t\t\t\tsc.GetCurrentLowered(s, sizeof(s));\n\t\t\t\t\tif (!IsASpace(sc.ch) || !keywords5.InList(s + 1)) {\n\t\t\t\t\t\tsc.ChangeState(SCE_FS_COMMENTDOCKEYWORDERROR);\n\t\t\t\t\t}\n\t\t\t\t\tsc.SetState(styleBeforeDCKeyword);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_FS_PREPROCESSOR:\n\t\t\tcase SCE_FS_PREPROCESSOR_C:\n\t\t\t\tif (sc.atLineEnd) {\n\t\t\t\t\tif (!(sc.chPrev == ';' || sc.GetRelative(-2) == ';')) {\n\t\t\t\t\t\tsc.SetState(bEnableCode ? SCE_FS_DEFAULT : SCE_FS_DEFAULT_C);\n\t\t\t\t\t}\n\t\t\t\t} else if (stylingWithinPreprocessor) {\n\t\t\t\t\tif (IsASpaceOrTab(sc.ch)) {\n\t\t\t\t\t\tsc.SetState(bEnableCode ? SCE_FS_DEFAULT : SCE_FS_DEFAULT_C);\n\t\t\t\t\t}\n\t\t\t\t} else if (sc.Match('/', '*') || sc.Match('/', '/') || sc.Match('&', '&')) {\n\t\t\t\t\tsc.SetState(bEnableCode ? SCE_FS_DEFAULT : SCE_FS_DEFAULT_C);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_FS_DISABLEDCODE:\n\t\t\t\tif (sc.ch == '#' && visibleChars == 0) {\n\t\t\t\t\tsc.SetState(bEnableCode ? SCE_FS_PREPROCESSOR : SCE_FS_PREPROCESSOR_C);\n\t\t\t\t\tdo {\t// Skip whitespace between # and preprocessor word\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t} while (IsASpaceOrTab(sc.ch) && sc.More());\n\t\t\t\t\tif (sc.MatchIgnoreCase(\"pragma\")) {\n\t\t\t\t\t\tsc.Forward(6);\n\t\t\t\t\t\tdo {\t// Skip more whitespace until keyword\n\t\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t\t} while (IsASpaceOrTab(sc.ch) && sc.More());\n\t\t\t\t\t\tif (sc.MatchIgnoreCase(\"enddump\") || sc.MatchIgnoreCase(\"__endtext\")) {\n\t\t\t\t\t\t\tbEnableCode = true;\n\t\t\t\t\t\t\tsc.SetState(SCE_FS_DISABLEDCODE);\n\t\t\t\t\t\t\tsc.Forward(sc.ch == '_' ? 8 : 6);\n\t\t\t\t\t\t\tsc.ForwardSetState(SCE_FS_DEFAULT);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsc.ChangeState(SCE_FS_DISABLEDCODE);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsc.ChangeState(SCE_FS_DISABLEDCODE);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_FS_DATE:\n\t\t\t\tif (sc.ch == '}') {\n\t\t\t\t\tsc.ForwardSetState(SCE_FS_DEFAULT);\n\t\t\t\t} else if (sc.atLineEnd) {\n\t\t\t\t\tsc.ChangeState(SCE_FS_STRINGEOL);\n\t\t\t\t}\n\t\t}\n\n\t\t// Determine if a new state should be entered.\n\t\tif (sc.state == SCE_FS_DEFAULT || sc.state == SCE_FS_DEFAULT_C) {\n\t\t\tif (bEnableCode &&\n\t\t\t\t\t(sc.MatchIgnoreCase(\".and.\") || sc.MatchIgnoreCase(\".not.\"))) {\n\t\t\t\tsc.SetState(SCE_FS_WORDOPERATOR);\n\t\t\t\tsc.Forward(4);\n\t\t\t} else if (bEnableCode && sc.MatchIgnoreCase(\".or.\")) {\n\t\t\t\tsc.SetState(SCE_FS_WORDOPERATOR);\n\t\t\t\tsc.Forward(3);\n\t\t\t} else if (bEnableCode &&\n\t\t\t\t\t(sc.MatchIgnoreCase(\".t.\") || sc.MatchIgnoreCase(\".f.\") ||\n\t\t\t\t\t(!IsAWordChar(sc.GetRelative(3)) && sc.MatchIgnoreCase(\"nil\")))) {\n\t\t\t\tsc.SetState(SCE_FS_CONSTANT);\n\t\t\t\tsc.Forward(2);\n\t\t\t} else if (sc.Match('/', '*')) {\n\t\t\t\tsc.SetState(bEnableCode ? SCE_FS_COMMENTDOC : SCE_FS_COMMENTDOC_C);\n\t\t\t\tsc.Forward();\n\t\t\t} else if (bEnableCode && sc.Match('&', '&')) {\n\t\t\t\tsc.SetState(SCE_FS_COMMENTLINE);\n\t\t\t\tsc.Forward();\n\t\t\t} else if (sc.Match('/', '/')) {\n\t\t\t\tsc.SetState(bEnableCode ? SCE_FS_COMMENTLINEDOC : SCE_FS_COMMENTLINEDOC_C);\n\t\t\t\tsc.Forward();\n\t\t\t} else if (bEnableCode && sc.ch == '*' && visibleChars == 0) {\n\t\t\t\tsc.SetState(SCE_FS_COMMENT);\n\t\t\t} else if (sc.ch == '\\\"' || sc.ch == '\\'') {\n\t\t\t\tsc.SetState(bEnableCode ? SCE_FS_STRING : SCE_FS_STRING_C);\n\t\t\t\tcloseStringChar = sc.ch;\n\t\t\t} else if (closeStringChar == '>' && sc.ch == '<') {\n\t\t\t\tsc.SetState(bEnableCode ? SCE_FS_STRING : SCE_FS_STRING_C);\n\t\t\t} else if (sc.ch == '#' && visibleChars == 0) {\n\t\t\t\tsc.SetState(bEnableCode ? SCE_FS_PREPROCESSOR : SCE_FS_PREPROCESSOR_C);\n\t\t\t\tdo {\t// Skip whitespace between # and preprocessor word\n\t\t\t\t\tsc.Forward();\n\t\t\t\t} while (IsASpaceOrTab(sc.ch) && sc.More());\n\t\t\t\tif (sc.atLineEnd) {\n\t\t\t\t\tsc.SetState(bEnableCode ? SCE_FS_DEFAULT : SCE_FS_DEFAULT_C);\n\t\t\t\t} else if (sc.MatchIgnoreCase(\"include\")) {\n\t\t\t\t\tif (stylingWithinPreprocessor) {\n\t\t\t\t\t\tcloseStringChar = '>';\n\t\t\t\t\t}\n\t\t\t\t} else if (sc.MatchIgnoreCase(\"pragma\")) {\n\t\t\t\t\tsc.Forward(6);\n\t\t\t\t\tdo {\t// Skip more whitespace until keyword\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t} while (IsASpaceOrTab(sc.ch) && sc.More());\n\t\t\t\t\tif (sc.MatchIgnoreCase(\"begindump\") || sc.MatchIgnoreCase(\"__cstream\")) {\n\t\t\t\t\t\tbEnableCode = false;\n\t\t\t\t\t\tif (stylingWithinPreprocessor) {\n\t\t\t\t\t\t\tsc.SetState(SCE_FS_DISABLEDCODE);\n\t\t\t\t\t\t\tsc.Forward(8);\n\t\t\t\t\t\t\tsc.ForwardSetState(SCE_FS_DEFAULT_C);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsc.SetState(SCE_FS_DISABLEDCODE);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (sc.MatchIgnoreCase(\"enddump\") || sc.MatchIgnoreCase(\"__endtext\")) {\n\t\t\t\t\t\tbEnableCode = true;\n\t\t\t\t\t\tsc.SetState(SCE_FS_DISABLEDCODE);\n\t\t\t\t\t\tsc.Forward(sc.ch == '_' ? 8 : 6);\n\t\t\t\t\t\tsc.ForwardSetState(SCE_FS_DEFAULT);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (bEnableCode && sc.ch == '{') {\n\t\t\t\tSci_Position p = 0;\n\t\t\t\tint chSeek;\n\t\t\t\tSci_PositionU endPos(startPos + length);\n\t\t\t\tdo {\t// Skip whitespace\n\t\t\t\t\tchSeek = sc.GetRelative(++p);\n\t\t\t\t} while (IsASpaceOrTab(chSeek) && (sc.currentPos + p < endPos));\n\t\t\t\tif (chSeek == '^') {\n\t\t\t\t\tsc.SetState(SCE_FS_DATE);\n\t\t\t\t} else {\n\t\t\t\t\tsc.SetState(SCE_FS_OPERATOR);\n\t\t\t\t}\n\t\t\t} else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) {\n\t\t\t\tsc.SetState(bEnableCode ? SCE_FS_NUMBER : SCE_FS_NUMBER_C);\n\t\t\t} else if (IsAWordChar(sc.ch)) {\n\t\t\t\tsc.SetState(bEnableCode ? SCE_FS_IDENTIFIER : SCE_FS_IDENTIFIER_C);\n\t\t\t} else if (isoperator(static_cast<char>(sc.ch)) || (bEnableCode && sc.ch == '@')) {\n\t\t\t\tsc.SetState(bEnableCode ? SCE_FS_OPERATOR : SCE_FS_OPERATOR_C);\n\t\t\t}\n\t\t}\n\n\t\tif (sc.atLineEnd) {\n\t\t\tvisibleChars = 0;\n\t\t\tcloseStringChar = 0;\n\t\t}\n\t\tif (!IsASpace(sc.ch)) {\n\t\t\tvisibleChars++;\n\t\t}\n\t}\n\tsc.Complete();\n}\n\nstatic void FoldFlagShipDoc(Sci_PositionU startPos, Sci_Position length, int,\n\t\t\t\t\t\t\t\t\tWordList *[], Accessor &styler)\n{\n\n\tSci_Position endPos = startPos + length;\n\n\t// Backtrack to previous line in case need to fix its fold status\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tif (startPos > 0 && lineCurrent > 0) {\n\t\t\tlineCurrent--;\n\t\t\tstartPos = styler.LineStart(lineCurrent);\n\t}\n\tint spaceFlags = 0;\n\tint indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags);\n\tchar chNext = styler[startPos];\n\tfor (Sci_Position i = startPos; i < endPos; i++) {\n\t\tchar ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\n\t\tif ((ch == '\\r' && chNext != '\\n') || (ch == '\\n') || (i == endPos-1)) {\n\t\t\tint lev = indentCurrent;\n\t\t\tint indentNext = styler.IndentAmount(lineCurrent + 1, &spaceFlags);\n\t\t\tif (!(indentCurrent & SC_FOLDLEVELWHITEFLAG)) {\n\t\t\t\tif ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext & SC_FOLDLEVELNUMBERMASK)) {\n\t\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\t\t} else if (indentNext & SC_FOLDLEVELWHITEFLAG) {\n\t\t\t\t\tint spaceFlags2 = 0;\n\t\t\t\t\tint indentNext2 = styler.IndentAmount(lineCurrent + 2, &spaceFlags2);\n\t\t\t\t\tif ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext2 & SC_FOLDLEVELNUMBERMASK)) {\n\t\t\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tindentCurrent = indentNext;\n\t\t\tstyler.SetLevel(lineCurrent, lev);\n\t\t\tlineCurrent++;\n\t\t}\n\t}\n}\n\nstatic const char * const FSWordListDesc[] = {\n\t\"Keywords Commands\",\n\t\"Std Library Functions\",\n\t\"Procedure, return, exit\",\n\t\"Class (oop)\",\n\t\"Doxygen keywords\",\n\t0\n};\n\nLexerModule lmFlagShip(SCLEX_FLAGSHIP, ColouriseFlagShipDoc, \"flagship\", FoldFlagShipDoc, FSWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexForth.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexForth.cxx\n ** Lexer for FORTH\n **/\n// Copyright 1998-2003 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nstatic inline bool IsAWordStart(int ch) {\n\treturn (ch < 0x80) && (isalnum(ch) || ch == '_' || ch == '.');\n}\n\nstatic inline bool IsANumChar(int ch) {\n\treturn (ch < 0x80) && (isxdigit(ch) || ch == '.' || ch == 'e' || ch == 'E' );\n}\n\nstatic inline bool IsASpaceChar(int ch) {\n\treturn (ch < 0x80) && isspace(ch);\n}\n\nstatic void ColouriseForthDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordLists[],\n                            Accessor &styler) {\n\n    WordList &control = *keywordLists[0];\n    WordList &keyword = *keywordLists[1];\n    WordList &defword = *keywordLists[2];\n    WordList &preword1 = *keywordLists[3];\n    WordList &preword2 = *keywordLists[4];\n    WordList &strings = *keywordLists[5];\n\n\tStyleContext sc(startPos, length, initStyle, styler);\n\n\tfor (; sc.More(); sc.Forward())\n\t{\n\t\t// Determine if the current state should terminate.\n\t\tif (sc.state == SCE_FORTH_COMMENT) {\n\t\t\tif (sc.atLineEnd) {\n\t\t\t\tsc.SetState(SCE_FORTH_DEFAULT);\n\t\t\t}\n\t\t}else if (sc.state == SCE_FORTH_COMMENT_ML) {\n\t\t\tif (sc.ch == ')') {\n\t\t\t\tsc.ForwardSetState(SCE_FORTH_DEFAULT);\n\t\t\t}\n\t\t}else if (sc.state == SCE_FORTH_IDENTIFIER || sc.state == SCE_FORTH_NUMBER) {\n\t\t\t// handle numbers here too, because what we thought was a number might\n\t\t\t// turn out to be a keyword e.g. 2DUP\n\t\t\tif (IsASpaceChar(sc.ch) ) {\n\t\t\t\tchar s[100];\n\t\t\t\tsc.GetCurrentLowered(s, sizeof(s));\n\t\t\t\tint newState = sc.state == SCE_FORTH_NUMBER ? SCE_FORTH_NUMBER : SCE_FORTH_DEFAULT;\n\t\t\t\tif (control.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_FORTH_CONTROL);\n\t\t\t\t} else if (keyword.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_FORTH_KEYWORD);\n\t\t\t\t} else if (defword.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_FORTH_DEFWORD);\n\t\t\t\t}  else if (preword1.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_FORTH_PREWORD1);\n\t\t\t\t} else if (preword2.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_FORTH_PREWORD2);\n\t\t\t\t} else if (strings.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_FORTH_STRING);\n\t\t\t\t\tnewState = SCE_FORTH_STRING;\n\t\t\t\t}\n\t\t\t\tsc.SetState(newState);\n\t\t\t}\n\t\t\tif (sc.state == SCE_FORTH_NUMBER) {\n\t\t\t\tif (IsASpaceChar(sc.ch)) {\n\t\t\t\t\tsc.SetState(SCE_FORTH_DEFAULT);\n\t\t\t\t} else if (!IsANumChar(sc.ch)) {\n\t\t\t\t\tsc.ChangeState(SCE_FORTH_IDENTIFIER);\n\t\t\t\t}\n\t\t\t}\n\t\t}else if (sc.state == SCE_FORTH_STRING) {\n\t\t\tif (sc.ch == '\\\"') {\n\t\t\t\tsc.ForwardSetState(SCE_FORTH_DEFAULT);\n\t\t\t}\n\t\t}else if (sc.state == SCE_FORTH_LOCALE) {\n\t\t\tif (sc.ch == '}') {\n\t\t\t\tsc.ForwardSetState(SCE_FORTH_DEFAULT);\n\t\t\t}\n\t\t}else if (sc.state == SCE_FORTH_DEFWORD) {\n\t\t\tif (IsASpaceChar(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_FORTH_DEFAULT);\n\t\t\t}\n\t\t}\n\n\t\t// Determine if a new state should be entered.\n\t\tif (sc.state == SCE_FORTH_DEFAULT) {\n\t\t\tif (sc.ch == '\\\\'){\n\t\t\t\tsc.SetState(SCE_FORTH_COMMENT);\n\t\t\t} else if (sc.ch == '(' &&\n\t\t\t\t\t(sc.atLineStart || IsASpaceChar(sc.chPrev)) &&\n\t\t\t\t\t(sc.atLineEnd   || IsASpaceChar(sc.chNext))) {\n\t\t\t\tsc.SetState(SCE_FORTH_COMMENT_ML);\n\t\t\t} else if (\t(sc.ch == '$' && (IsASCII(sc.chNext) && isxdigit(sc.chNext))) ) {\n\t\t\t\t// number starting with $ is a hex number\n\t\t\t\tsc.SetState(SCE_FORTH_NUMBER);\n\t\t\t\twhile(sc.More() && IsASCII(sc.chNext) && isxdigit(sc.chNext))\n\t\t\t\t\tsc.Forward();\n\t\t\t} else if ( (sc.ch == '%' && (IsASCII(sc.chNext) && (sc.chNext == '0' || sc.chNext == '1'))) ) {\n\t\t\t\t// number starting with % is binary\n\t\t\t\tsc.SetState(SCE_FORTH_NUMBER);\n\t\t\t\twhile(sc.More() && IsASCII(sc.chNext) && (sc.chNext == '0' || sc.chNext == '1'))\n\t\t\t\t\tsc.Forward();\n\t\t\t} else if (\tIsASCII(sc.ch) &&\n\t\t\t\t\t\t(isxdigit(sc.ch) || ((sc.ch == '.' || sc.ch == '-') && IsASCII(sc.chNext) && isxdigit(sc.chNext)) )\n\t\t\t\t\t){\n\t\t\t\tsc.SetState(SCE_FORTH_NUMBER);\n\t\t\t} else if (IsAWordStart(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_FORTH_IDENTIFIER);\n\t\t\t} else if (sc.ch == '{') {\n\t\t\t\tsc.SetState(SCE_FORTH_LOCALE);\n\t\t\t} else if (sc.ch == ':' && IsASCII(sc.chNext) && isspace(sc.chNext)) {\n\t\t\t\t// highlight word definitions e.g.  : GCD ( n n -- n ) ..... ;\n\t\t\t\t//                                  ^ ^^^\n\t\t\t\tsc.SetState(SCE_FORTH_DEFWORD);\n\t\t\t\twhile(sc.More() && IsASCII(sc.chNext) && isspace(sc.chNext))\n\t\t\t\t\tsc.Forward();\n\t\t\t} else if (sc.ch == ';' &&\n\t\t\t\t\t(sc.atLineStart || IsASpaceChar(sc.chPrev)) &&\n\t\t\t\t\t(sc.atLineEnd   || IsASpaceChar(sc.chNext))\t) {\n\t\t\t\t// mark the ';' that ends a word\n\t\t\t\tsc.SetState(SCE_FORTH_DEFWORD);\n\t\t\t\tsc.ForwardSetState(SCE_FORTH_DEFAULT);\n\t\t\t}\n\t\t}\n\n\t}\n\tsc.Complete();\n}\n\nstatic void FoldForthDoc(Sci_PositionU, Sci_Position, int, WordList *[],\n\t\t\t\t\t\tAccessor &) {\n}\n\nstatic const char * const forthWordLists[] = {\n\t\t\t\"control keywords\",\n\t\t\t\"keywords\",\n\t\t\t\"definition words\",\n\t\t\t\"prewords with one argument\",\n\t\t\t\"prewords with two arguments\",\n\t\t\t\"string definition keywords\",\n\t\t\t0,\n\t\t};\n\nLexerModule lmForth(SCLEX_FORTH, ColouriseForthDoc, \"forth\", FoldForthDoc, forthWordLists);\n\n\n"
  },
  {
    "path": "lexilla/lexers/LexFortran.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexFortran.cxx\n ** Lexer for Fortran.\n ** Written by Chuan-jian Shen, Last changed Sep. 2003\n **/\n// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n/***************************************/\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n/***************************************/\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n/***************************************/\n\nusing namespace Lexilla;\n\n/***********************************************/\nstatic inline bool IsAWordChar(const int ch) {\n\treturn (ch < 0x80) && (isalnum(ch) || ch == '_' || ch == '%');\n}\n/**********************************************/\nstatic inline bool IsAWordStart(const int ch) {\n\treturn (ch < 0x80) && (isalnum(ch));\n}\n/***************************************/\nstatic inline bool IsABlank(unsigned int ch) {\n\treturn (ch == ' ') || (ch == 0x09) || (ch == 0x0b) ;\n}\n/***************************************/\nstatic inline bool IsALineEnd(char ch) {\n\treturn ((ch == '\\n') || (ch == '\\r')) ;\n}\n/***************************************/\nstatic Sci_PositionU GetContinuedPos(Sci_PositionU pos, Accessor &styler) {\n\twhile (!IsALineEnd(styler.SafeGetCharAt(pos++))) continue;\n\tif (styler.SafeGetCharAt(pos) == '\\n') pos++;\n\twhile (IsABlank(styler.SafeGetCharAt(pos++))) continue;\n\tchar chCur = styler.SafeGetCharAt(pos);\n\tif (chCur == '&') {\n\t\twhile (IsABlank(styler.SafeGetCharAt(++pos))) continue;\n\t\treturn pos;\n\t} else {\n\t\treturn pos;\n\t}\n}\n/***************************************/\nstatic void ColouriseFortranDoc(Sci_PositionU startPos, Sci_Position length, int initStyle,\n        WordList *keywordlists[], Accessor &styler, bool isFixFormat) {\n\tWordList &keywords = *keywordlists[0];\n\tWordList &keywords2 = *keywordlists[1];\n\tWordList &keywords3 = *keywordlists[2];\n\t/***************************************/\n\tSci_Position posLineStart = 0;\n\tint numNonBlank = 0, prevState = 0;\n\tSci_Position endPos = startPos + length;\n\t/***************************************/\n\t// backtrack to the nearest keyword\n\twhile ((startPos > 1) && (styler.StyleAt(startPos) != SCE_F_WORD)) {\n\t\tstartPos--;\n\t}\n\tstartPos = styler.LineStart(styler.GetLine(startPos));\n\tinitStyle = styler.StyleAt(startPos - 1);\n\tStyleContext sc(startPos, endPos-startPos, initStyle, styler);\n\t/***************************************/\n\tfor (; sc.More(); sc.Forward()) {\n\t\t// remember the start position of the line\n\t\tif (sc.atLineStart) {\n\t\t\tposLineStart = sc.currentPos;\n\t\t\tnumNonBlank = 0;\n\t\t\tsc.SetState(SCE_F_DEFAULT);\n\t\t}\n\t\tif (!IsASpaceOrTab(sc.ch)) numNonBlank ++;\n\t\t/***********************************************/\n\t\t// Handle the fix format generically\n\t\tSci_Position toLineStart = sc.currentPos - posLineStart;\n\t\tif (isFixFormat && (toLineStart < 6 || toLineStart >= 72)) {\n\t\t\tif ((toLineStart == 0 && (tolower(sc.ch) == 'c' || sc.ch == '*')) || sc.ch == '!') {\n\t\t\t\tif (sc.MatchIgnoreCase(\"cdec$\") || sc.MatchIgnoreCase(\"*dec$\") || sc.MatchIgnoreCase(\"!dec$\") ||\n\t\t\t\t        sc.MatchIgnoreCase(\"cdir$\") || sc.MatchIgnoreCase(\"*dir$\") || sc.MatchIgnoreCase(\"!dir$\") ||\n\t\t\t\t        sc.MatchIgnoreCase(\"cms$\")  || sc.MatchIgnoreCase(\"*ms$\")  || sc.MatchIgnoreCase(\"!ms$\")  ||\n\t\t\t\t        sc.chNext == '$') {\n\t\t\t\t\tsc.SetState(SCE_F_PREPROCESSOR);\n\t\t\t\t} else {\n\t\t\t\t\tsc.SetState(SCE_F_COMMENT);\n\t\t\t\t}\n\n\t\t\t\twhile (!sc.atLineEnd && sc.More()) sc.Forward(); // Until line end\n\t\t\t} else if (toLineStart >= 72) {\n\t\t\t\tsc.SetState(SCE_F_COMMENT);\n\t\t\t\twhile (!sc.atLineEnd && sc.More()) sc.Forward(); // Until line end\n\t\t\t} else if (toLineStart < 5) {\n\t\t\t\tif (IsADigit(sc.ch))\n\t\t\t\t\tsc.SetState(SCE_F_LABEL);\n\t\t\t\telse\n\t\t\t\t\tsc.SetState(SCE_F_DEFAULT);\n\t\t\t} else if (toLineStart == 5) {\n\t\t\t\t//if (!IsASpace(sc.ch) && sc.ch != '0') {\n\t\t\t\tif (sc.ch != '\\r' && sc.ch != '\\n') {\n\t\t\t\t\tsc.SetState(SCE_F_CONTINUATION);\n\t\t\t\t\tif (!IsASpace(sc.ch) && sc.ch != '0')\n\t\t\t\t\t\tsc.ForwardSetState(prevState);\n\t\t\t\t} else\n\t\t\t\t\tsc.SetState(SCE_F_DEFAULT);\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\t\t/***************************************/\n\t\t// Handle line continuation generically.\n\t\tif (!isFixFormat && sc.ch == '&' && sc.state != SCE_F_COMMENT) {\n\t\t\tchar chTemp = ' ';\n\t\t\tSci_Position j = 1;\n\t\t\twhile (IsABlank(chTemp) && j<132) {\n\t\t\t\tchTemp = static_cast<char>(sc.GetRelative(j));\n\t\t\t\tj++;\n\t\t\t}\n\t\t\tif (chTemp == '!') {\n\t\t\t\tsc.SetState(SCE_F_CONTINUATION);\n\t\t\t\tif (sc.chNext == '!') sc.ForwardSetState(SCE_F_COMMENT);\n\t\t\t} else if (chTemp == '\\r' || chTemp == '\\n') {\n\t\t\t\tint currentState = sc.state;\n\t\t\t\tsc.SetState(SCE_F_CONTINUATION);\n\t\t\t\tsc.ForwardSetState(SCE_F_DEFAULT);\n\t\t\t\twhile (IsASpace(sc.ch) && sc.More()) {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\tif (sc.atLineStart) numNonBlank = 0;\n\t\t\t\t\tif (!IsASpaceOrTab(sc.ch)) numNonBlank ++;\n\t\t\t\t}\n\t\t\t\tif (sc.ch == '&') {\n\t\t\t\t\tsc.SetState(SCE_F_CONTINUATION);\n\t\t\t\t\tsc.Forward();\n\t\t\t\t}\n\t\t\t\tsc.SetState(currentState);\n\t\t\t}\n\t\t}\n\t\t/***************************************/\n\t\t// Hanndle preprocessor directives\n\t\tif (sc.ch == '#' && numNonBlank == 1)\n\t\t{\n\t\t\tsc.SetState(SCE_F_PREPROCESSOR);\n\t\t\twhile (!sc.atLineEnd && sc.More())\n\t\t\t\tsc.Forward(); // Until line end\n\t\t}\n\t\t/***************************************/\n\t\t// Determine if the current state should terminate.\n\t\tif (sc.state == SCE_F_OPERATOR) {\n\t\t\tsc.SetState(SCE_F_DEFAULT);\n\t\t} else if (sc.state == SCE_F_NUMBER) {\n\t\t\tif (!(IsAWordChar(sc.ch) || sc.ch=='\\'' || sc.ch=='\\\"' || sc.ch=='.')) {\n\t\t\t\tsc.SetState(SCE_F_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_F_IDENTIFIER) {\n\t\t\tif (!IsAWordChar(sc.ch) || (sc.ch == '%')) {\n\t\t\t\tchar s[100];\n\t\t\t\tsc.GetCurrentLowered(s, sizeof(s));\n\t\t\t\tif (keywords.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_F_WORD);\n\t\t\t\t} else if (keywords2.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_F_WORD2);\n\t\t\t\t} else if (keywords3.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_F_WORD3);\n\t\t\t\t}\n\t\t\t\tsc.SetState(SCE_F_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_F_COMMENT || sc.state == SCE_F_PREPROCESSOR) {\n\t\t\tif (sc.ch == '\\r' || sc.ch == '\\n') {\n\t\t\t\tsc.SetState(SCE_F_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_F_STRING1) {\n\t\t\tprevState = sc.state;\n\t\t\tif (sc.ch == '\\'') {\n\t\t\t\tif (sc.chNext == '\\'') {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t} else {\n\t\t\t\t\tsc.ForwardSetState(SCE_F_DEFAULT);\n\t\t\t\t\tprevState = SCE_F_DEFAULT;\n\t\t\t\t}\n\t\t\t} else if (sc.atLineEnd) {\n\t\t\t\tsc.ChangeState(SCE_F_STRINGEOL);\n\t\t\t\tsc.ForwardSetState(SCE_F_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_F_STRING2) {\n\t\t\tprevState = sc.state;\n\t\t\tif (sc.atLineEnd) {\n\t\t\t\tsc.ChangeState(SCE_F_STRINGEOL);\n\t\t\t\tsc.ForwardSetState(SCE_F_DEFAULT);\n\t\t\t} else if (sc.ch == '\\\"') {\n\t\t\t\tif (sc.chNext == '\\\"') {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t} else {\n\t\t\t\t\tsc.ForwardSetState(SCE_F_DEFAULT);\n\t\t\t\t\tprevState = SCE_F_DEFAULT;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (sc.state == SCE_F_OPERATOR2) {\n\t\t\tif (sc.ch == '.') {\n\t\t\t\tsc.ForwardSetState(SCE_F_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_F_CONTINUATION) {\n\t\t\tsc.SetState(SCE_F_DEFAULT);\n\t\t} else if (sc.state == SCE_F_LABEL) {\n\t\t\tif (!IsADigit(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_F_DEFAULT);\n\t\t\t} else {\n\t\t\t\tif (isFixFormat && sc.currentPos-posLineStart > 4)\n\t\t\t\t\tsc.SetState(SCE_F_DEFAULT);\n\t\t\t\telse if (numNonBlank > 5)\n\t\t\t\t\tsc.SetState(SCE_F_DEFAULT);\n\t\t\t}\n\t\t}\n\t\t/***************************************/\n\t\t// Determine if a new state should be entered.\n\t\tif (sc.state == SCE_F_DEFAULT) {\n\t\t\tif (sc.ch == '!') {\n\t\t\t\tif (sc.MatchIgnoreCase(\"!dec$\") || sc.MatchIgnoreCase(\"!dir$\") ||\n\t\t\t\t\tsc.MatchIgnoreCase(\"!ms$\") || sc.chNext == '$') {\n\t\t\t\t\tsc.SetState(SCE_F_PREPROCESSOR);\n\t\t\t\t} else {\n\t\t\t\t\tsc.SetState(SCE_F_COMMENT);\n\t\t\t\t}\n\t\t\t} else if ((!isFixFormat) && IsADigit(sc.ch) && numNonBlank == 1) {\n\t\t\t\tsc.SetState(SCE_F_LABEL);\n\t\t\t} else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) {\n\t\t\t\tsc.SetState(SCE_F_NUMBER);\n\t\t\t} else if ((tolower(sc.ch) == 'b' || tolower(sc.ch) == 'o' ||\n\t\t\t\ttolower(sc.ch) == 'z') && (sc.chNext == '\\\"' || sc.chNext == '\\'')) {\n\t\t\t\tsc.SetState(SCE_F_NUMBER);\n\t\t\t\tsc.Forward();\n\t\t\t} else if (sc.ch == '.' && isalpha(sc.chNext)) {\n\t\t\t\tsc.SetState(SCE_F_OPERATOR2);\n\t\t\t} else if (IsAWordStart(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_F_IDENTIFIER);\n\t\t\t} else if (sc.ch == '\\\"') {\n\t\t\t\tsc.SetState(SCE_F_STRING2);\n\t\t\t} else if (sc.ch == '\\'') {\n\t\t\t\tsc.SetState(SCE_F_STRING1);\n\t\t\t} else if (isoperator(static_cast<char>(sc.ch))) {\n\t\t\t\tsc.SetState(SCE_F_OPERATOR);\n\t\t\t}\n\t\t}\n\t}\n\tsc.Complete();\n}\n/***************************************/\nstatic void CheckLevelCommentLine(const unsigned int nComL,\n\t\t\t\t  Sci_Position nComColB[], Sci_Position nComColF[], Sci_Position &nComCur,\n\t\t\t\t  bool comLineB[], bool comLineF[], bool &comLineCur,\n\t\t\t\t  int &levelDeltaNext) {\n\tlevelDeltaNext = 0;\n\tif (!comLineCur) {\n\t\treturn;\n\t}\n\n\tif (!comLineF[0] || nComColF[0] != nComCur) {\n\t\tunsigned int i=0;\n\t\tfor (; i<nComL; i++) {\n\t\t\tif (!comLineB[i] || nComColB[i] != nComCur) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (i == nComL) {\n\t\t\tlevelDeltaNext = -1;\n\t\t}\n\t}\n\telse if (!comLineB[0] || nComColB[0] != nComCur) {\n\t\tunsigned int i=0;\n\t\tfor (; i<nComL; i++) {\n\t\t\tif (!comLineF[i] || nComColF[i] != nComCur) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (i == nComL) {\n\t\t\tlevelDeltaNext = 1;\n\t\t}\n\t}\n}\n/***************************************/\nstatic void GetIfLineComment(Accessor &styler, bool isFixFormat, const Sci_Position line, bool &isComLine, Sci_Position &comCol) {\n\tSci_Position col = 0;\n\tisComLine = false;\n\tSci_Position pos = styler.LineStart(line);\n\tSci_Position len = styler.Length();\n\twhile(pos<len) {\n\t\tchar ch = styler.SafeGetCharAt(pos);\n\t\tif (ch == '!' || (isFixFormat && col == 0 && (tolower(ch) == 'c' || ch == '*'))) {\n\t\t\tisComLine = true;\n\t\t\tcomCol = col;\n\t\t\tbreak;\n\t\t}\n\t\telse if (!IsABlank(ch) || IsALineEnd(ch)) {\n\t\t\tbreak;\n\t\t}\n\t\tpos++;\n\t\tcol++;\n\t}\n}\n/***************************************/\nstatic void StepCommentLine(Accessor &styler, bool isFixFormat, Sci_Position lineCurrent, const unsigned int nComL,\n\t\t\t\t  Sci_Position nComColB[], Sci_Position nComColF[], Sci_Position &nComCur,\n\t\t\t\t  bool comLineB[], bool comLineF[], bool &comLineCur) {\n\tSci_Position nLineTotal = styler.GetLine(styler.Length()-1) + 1;\n\tif (lineCurrent >= nLineTotal) {\n\t\treturn;\n\t}\n\n\tfor (int i=nComL-2; i>=0; i--) {\n\t\tnComColB[i+1] = nComColB[i];\n\t\tcomLineB[i+1] = comLineB[i];\n\t}\n\tnComColB[0] = nComCur;\n\tcomLineB[0] = comLineCur;\n\tnComCur = nComColF[0];\n\tcomLineCur = comLineF[0];\n\tfor (unsigned int i=0; i+1<nComL; i++) {\n\t\tnComColF[i] = nComColF[i+1];\n\t\tcomLineF[i] = comLineF[i+1];\n\t}\n\tSci_Position chL = lineCurrent + nComL;\n\tif (chL < nLineTotal) {\n\t\tGetIfLineComment(styler, isFixFormat, chL, comLineF[nComL-1], nComColF[nComL-1]);\n\t}\n\telse {\n\t\tcomLineF[nComL-1] = false;\n\t}\n}\n/***************************************/\nstatic void CheckBackComLines(Accessor &styler, bool isFixFormat, Sci_Position lineCurrent, const unsigned int nComL,\n\t\t\t\t  Sci_Position nComColB[], Sci_Position nComColF[], Sci_Position nComCur,\n\t\t\t\t  bool comLineB[], bool comLineF[], bool &comLineCur) {\n\tunsigned int nLines = nComL + nComL + 1;\n\tbool* comL = new bool[nLines];\n\tSci_Position* nComCol = new Sci_Position[nLines];\n\tbool comL0;\n\tSci_Position nComCol0;\n\tGetIfLineComment(styler, isFixFormat, lineCurrent-nComL-1, comL0, nComCol0);\n\tfor (unsigned int i=0; i<nComL; i++) {\n\t\tunsigned copyTo = nComL - i - 1;\n\t\tcomL[copyTo]    = comLineB[i];\n\t\tnComCol[copyTo] = nComColB[i];\n\t}\n\tassert(nComL < nLines);\n\tcomL[nComL] = comLineCur;\n\tnComCol[nComL] = nComCur;\n\tfor (unsigned int i=0; i<nComL; i++) {\n\t\tunsigned copyTo = i + nComL + 1;\n\t\tcomL[copyTo]    = comLineF[i];\n\t\tnComCol[copyTo] = nComColF[i];\n\t}\n\t\n\tSci_Position lineC = lineCurrent - nComL + 1;\n\tSci_PositionU iStart;\n\tif (lineC <= 0) {\n\t\tlineC = 0;\n\t\tiStart = nComL - lineCurrent;\n\t}\n\telse {\n\t\tiStart = 1;\n\t}\n\tbool levChanged = false;\n\tint lev = styler.LevelAt(lineC) & SC_FOLDLEVELNUMBERMASK;\n\t\n\tfor (Sci_PositionU i=iStart; i<=nComL; i++) {\n\t\tif (comL[i] && (!comL[i-1] || nComCol[i] != nComCol[i-1])) {\n\t\t\tbool increase = true;\n\t\t\tSci_PositionU until = i + nComL;\n\t\t\tfor (Sci_PositionU j=i+1; j<=until; j++) {\n\t\t\t\tif (!comL[j] || nComCol[j] != nComCol[i]) {\n\t\t\t\t\tincrease = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tlev = styler.LevelAt(lineC) & SC_FOLDLEVELNUMBERMASK;\n\t\t\tif (increase) {\n\t\t\t\tint levH = lev | SC_FOLDLEVELHEADERFLAG;\n\t\t\t\tlev += 1;\n\t\t\t\tif (levH != styler.LevelAt(lineC)) {\n\t\t\t\t\tstyler.SetLevel(lineC, levH);\n\t\t\t\t}\n\t\t\t\tfor (Sci_Position j=lineC+1; j<=lineCurrent; j++) {\n\t\t\t\t\tif (lev != styler.LevelAt(j)) {\n\t\t\t\t\t\tstyler.SetLevel(j, lev);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (lev != styler.LevelAt(lineC)) {\n\t\t\t\t\tstyler.SetLevel(lineC, lev);\n\t\t\t\t}\n\t\t\t}\n\t\t\tlevChanged = true;\n\t\t}\n\t\telse if (levChanged && comL[i]) {\n\t\t\tif (lev != styler.LevelAt(lineC)) {\n\t\t\t\tstyler.SetLevel(lineC, lev);\n\t\t\t}\n\t\t}\n\t\tlineC++;\n\t}\n\tdelete[] comL;\n\tdelete[] nComCol;\n}\n/***************************************/\n// To determine the folding level depending on keywords\nstatic int classifyFoldPointFortran(const char* s, const char* prevWord, const char chNextNonBlank) {\n\tint lev = 0;\n\n\tif ((strcmp(prevWord, \"module\") == 0 && strcmp(s, \"subroutine\") == 0)\n\t\t|| (strcmp(prevWord, \"module\") == 0 && strcmp(s, \"function\") == 0)) {\n\t\tlev = 0;\n\t} else if (strcmp(s, \"associate\") == 0 || strcmp(s, \"block\") == 0\n\t        || strcmp(s, \"blockdata\") == 0 || strcmp(s, \"select\") == 0\n\t        || strcmp(s, \"selecttype\") == 0 || strcmp(s, \"selectcase\") == 0\n\t        || strcmp(s, \"do\") == 0 || strcmp(s, \"enum\") ==0\n\t        || strcmp(s, \"function\") == 0 || strcmp(s, \"interface\") == 0\n\t        || strcmp(s, \"module\") == 0 || strcmp(s, \"program\") == 0\n\t        || strcmp(s, \"subroutine\") == 0 || strcmp(s, \"then\") == 0\n\t        || (strcmp(s, \"type\") == 0 && chNextNonBlank != '(')\n\t\t|| strcmp(s, \"critical\") == 0 || strcmp(s, \"submodule\") == 0){\n\t\tif (strcmp(prevWord, \"end\") == 0)\n\t\t\tlev = 0;\n\t\telse\n\t\t\tlev = 1;\n\t} else if ((strcmp(s, \"end\") == 0 && chNextNonBlank != '=')\n\t        || strcmp(s, \"endassociate\") == 0 || strcmp(s, \"endblock\") == 0\n\t        || strcmp(s, \"endblockdata\") == 0 || strcmp(s, \"endselect\") == 0\n\t        || strcmp(s, \"enddo\") == 0 || strcmp(s, \"endenum\") ==0\n\t        || strcmp(s, \"endif\") == 0 || strcmp(s, \"endforall\") == 0\n\t        || strcmp(s, \"endfunction\") == 0 || strcmp(s, \"endinterface\") == 0\n\t        || strcmp(s, \"endmodule\") == 0 || strcmp(s, \"endprogram\") == 0\n\t        || strcmp(s, \"endsubroutine\") == 0 || strcmp(s, \"endtype\") == 0\n\t        || strcmp(s, \"endwhere\") == 0 || strcmp(s, \"endcritical\") == 0\n\t\t|| (strcmp(prevWord, \"module\") == 0 && strcmp(s, \"procedure\") == 0)  // Take care of the \"module procedure\" statement\n\t\t|| strcmp(s, \"endsubmodule\") == 0 || strcmp(s, \"endteam\") == 0) {\n\t\tlev = -1;\n\t} else if (strcmp(prevWord, \"end\") == 0 && strcmp(s, \"if\") == 0){ // end if\n\t\tlev = 0;\n\t} else if (strcmp(prevWord, \"type\") == 0 && strcmp(s, \"is\") == 0){ // type is\n\t\tlev = -1;\n\t} else if ((strcmp(prevWord, \"end\") == 0 && strcmp(s, \"procedure\") == 0)\n\t\t\t   || strcmp(s, \"endprocedure\") == 0) {\n\t\t\tlev = 1; // level back to 0, because no folding support for \"module procedure\" in submodule\n\t} else if (strcmp(prevWord, \"change\") == 0 && strcmp(s, \"team\") == 0){ // change team\n\t\tlev = 1;\n\t}\n\treturn lev;\n}\n/***************************************/\n// Folding the code\nstatic void FoldFortranDoc(Sci_PositionU startPos, Sci_Position length, int initStyle,\n        Accessor &styler, bool isFixFormat) {\n\n\tbool foldComment = styler.GetPropertyInt(\"fold.comment\", 1) != 0;\n\tbool foldCompact = styler.GetPropertyInt(\"fold.compact\", 1) != 0;\n\tSci_PositionU endPos = startPos + length;\n\tint visibleChars = 0;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tbool isPrevLine;\n\tif (lineCurrent > 0) {\n\t\tlineCurrent--;\n\t\tstartPos = styler.LineStart(lineCurrent);\n\t\tisPrevLine = true;\n\t} else {\n\t\tisPrevLine = false;\n\t}\n\tchar chNext = styler[startPos];\n\tint styleNext = styler.StyleAt(startPos);\n\tint style = initStyle;\n\tint levelDeltaNext = 0;\n\n\tconst unsigned int nComL = 3; // defines how many comment lines should be before they are folded\n\tSci_Position nComColB[nComL] = {};\n\tSci_Position nComColF[nComL] = {};\n\tSci_Position nComCur = 0;\n\tbool comLineB[nComL] = {};\n\tbool comLineF[nComL] = {};\n\tbool comLineCur;\n\tSci_Position nLineTotal = styler.GetLine(styler.Length()-1) + 1;\n\tif (foldComment) {\n\t\tfor (unsigned int i=0; i<nComL; i++) {\n\t\t\tSci_Position chL = lineCurrent-(i+1);\n\t\t\tif (chL < 0) {\n\t\t\t\tcomLineB[i] = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tGetIfLineComment(styler, isFixFormat, chL, comLineB[i], nComColB[i]);\n\t\t\tif (!comLineB[i]) {\n\t\t\t\tfor (unsigned int j=i+1; j<nComL; j++) {\n\t\t\t\t\tcomLineB[j] = false;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tfor (unsigned int i=0; i<nComL; i++) {\n\t\t\tSci_Position chL = lineCurrent+i+1;\n\t\t\tif (chL >= nLineTotal) {\n\t\t\t\tcomLineF[i] = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tGetIfLineComment(styler, isFixFormat, chL, comLineF[i], nComColF[i]);\n\t\t}\n\t\tGetIfLineComment(styler, isFixFormat, lineCurrent, comLineCur, nComCur);\n\t\tCheckBackComLines(styler, isFixFormat, lineCurrent, nComL, nComColB, nComColF, nComCur, \n\t\t\t\tcomLineB, comLineF, comLineCur);\n\t}\n\tint levelCurrent = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK;\n\n\t/***************************************/\n\tSci_Position lastStart = 0;\n\tchar prevWord[32] = \"\";\n\t/***************************************/\n\tfor (Sci_PositionU i = startPos; i < endPos; i++) {\n\t\tchar ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\tchar chNextNonBlank = chNext;\n\t\tbool nextEOL = false;\n\t\tif (IsALineEnd(chNextNonBlank)) {\n\t\t\tnextEOL = true;\n\t\t}\n\t\tSci_PositionU j=i+1;\n\t\twhile(IsABlank(chNextNonBlank) && j<endPos) {\n\t\t\tj ++ ;\n\t\t\tchNextNonBlank = styler.SafeGetCharAt(j);\n\t\t\tif (IsALineEnd(chNextNonBlank)) {\n\t\t\t\tnextEOL = true;\n\t\t\t}\n\t\t}\n\t\tif (!nextEOL && j == endPos) {\n\t\t\tnextEOL = true;\n\t\t}\n\t\tint stylePrev = style;\n\t\tstyle = styleNext;\n\t\tstyleNext = styler.StyleAt(i + 1);\n\t\tbool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n\t\t//\n\t\tif (((isFixFormat && stylePrev == SCE_F_CONTINUATION) || stylePrev == SCE_F_DEFAULT\n\t\t\t|| stylePrev == SCE_F_OPERATOR) && (style == SCE_F_WORD || style == SCE_F_LABEL)) {\n\t\t\t// Store last word and label start point.\n\t\t\tlastStart = i;\n\t\t}\n\t\t/***************************************/\n\t\tif (style == SCE_F_WORD) {\n\t\t\tif(iswordchar(ch) && !iswordchar(chNext)) {\n\t\t\t\tchar s[32];\n\t\t\t\tSci_PositionU k;\n\t\t\t\tfor(k=0; (k<31 ) && (k<i-lastStart+1 ); k++) {\n\t\t\t\t\ts[k] = static_cast<char>(tolower(styler[lastStart+k]));\n\t\t\t\t}\n\t\t\t\ts[k] = '\\0';\n\t\t\t\t// Handle the forall and where statement and structure.\n\t\t\t\tif (strcmp(s, \"forall\") == 0 || (strcmp(s, \"where\") == 0 && strcmp(prevWord, \"else\") != 0)) {\n\t\t\t\t\tif (strcmp(prevWord, \"end\") != 0) {\n\t\t\t\t\t\tj = i + 1;\n\t\t\t\t\t\tchar chBrace = '(', chSeek = ')', ch1 = styler.SafeGetCharAt(j);\n\t\t\t\t\t\t// Find the position of the first (\n\t\t\t\t\t\twhile (ch1 != chBrace && j<endPos) {\n\t\t\t\t\t\t\tj++;\n\t\t\t\t\t\t\tch1 = styler.SafeGetCharAt(j);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tchar styBrace = styler.StyleAt(j);\n\t\t\t\t\t\tint depth = 1;\n\t\t\t\t\t\tchar chAtPos;\n\t\t\t\t\t\tchar styAtPos;\n\t\t\t\t\t\twhile (j<endPos) {\n\t\t\t\t\t\t\tj++;\n\t\t\t\t\t\t\tchAtPos = styler.SafeGetCharAt(j);\n\t\t\t\t\t\t\tstyAtPos = styler.StyleAt(j);\n\t\t\t\t\t\t\tif (styAtPos == styBrace) {\n\t\t\t\t\t\t\t\tif (chAtPos == chBrace) depth++;\n\t\t\t\t\t\t\t\tif (chAtPos == chSeek) depth--;\n\t\t\t\t\t\t\t\tif (depth == 0) break;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tSci_Position tmpLineCurrent = lineCurrent;\n\t\t\t\t\t\twhile (j<endPos) {\n\t\t\t\t\t\t\tj++;\n\t\t\t\t\t\t\tchAtPos = styler.SafeGetCharAt(j);\n\t\t\t\t\t\t\tstyAtPos = styler.StyleAt(j);\n\t\t\t\t\t\t\tif (!IsALineEnd(chAtPos) && (styAtPos == SCE_F_COMMENT || IsABlank(chAtPos))) continue;\n\t\t\t\t\t\t\tif (isFixFormat) {\n\t\t\t\t\t\t\t\tif (!IsALineEnd(chAtPos)) {\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tif (tmpLineCurrent < styler.GetLine(styler.Length()-1)) {\n\t\t\t\t\t\t\t\t\t\ttmpLineCurrent++;\n\t\t\t\t\t\t\t\t\t\tj = styler.LineStart(tmpLineCurrent);\n\t\t\t\t\t\t\t\t\t\tif (styler.StyleAt(j+5) == SCE_F_CONTINUATION\n\t\t\t\t\t\t\t\t\t\t\t&& !IsABlank(styler.SafeGetCharAt(j+5)) && styler.SafeGetCharAt(j+5) != '0') {\n\t\t\t\t\t\t\t\t\t\t\tj += 5;\n\t\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tlevelDeltaNext++;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif (chAtPos == '&' && styler.StyleAt(j) == SCE_F_CONTINUATION) {\n\t\t\t\t\t\t\t\t\tj = GetContinuedPos(j+1, styler);\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t} else if (IsALineEnd(chAtPos)) {\n\t\t\t\t\t\t\t\t\tlevelDeltaNext++;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tint wordLevelDelta = classifyFoldPointFortran(s, prevWord, chNextNonBlank);\n\t\t\t\t\tlevelDeltaNext += wordLevelDelta;\n\t\t\t\t\tif (((strcmp(s, \"else\") == 0) && (nextEOL || chNextNonBlank == '!')) ||\n\t\t\t\t\t\t(strcmp(prevWord, \"else\") == 0 && strcmp(s, \"where\") == 0) || strcmp(s, \"elsewhere\") == 0) {\n\t\t\t\t\t\tif (!isPrevLine) {\n\t\t\t\t\t\t\tlevelCurrent--;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlevelDeltaNext++;\n\t\t\t\t\t} else if ((strcmp(prevWord, \"else\") == 0 && strcmp(s, \"if\") == 0) || strcmp(s, \"elseif\") == 0) {\n\t\t\t\t\t\tif (!isPrevLine) {\n\t\t\t\t\t\t\tlevelCurrent--;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if ((strcmp(prevWord, \"select\") == 0 && strcmp(s, \"case\") == 0) || strcmp(s, \"selectcase\") == 0 ||\n\t\t\t\t\t\t\t   (strcmp(prevWord, \"select\") == 0 && strcmp(s, \"type\") == 0) || strcmp(s, \"selecttype\") == 0) {\n\t\t\t\t\t\tlevelDeltaNext += 2;\n\t\t\t\t\t} else if ((strcmp(s, \"case\") == 0 && chNextNonBlank == '(') || (strcmp(prevWord, \"case\") == 0 && strcmp(s, \"default\") == 0) ||\n\t\t\t\t\t\t\t   (strcmp(prevWord, \"type\") == 0 && strcmp(s, \"is\") == 0) ||\n\t\t\t\t\t\t\t   (strcmp(prevWord, \"class\") == 0 && strcmp(s, \"is\") == 0) ||\n\t\t\t\t\t\t\t   (strcmp(prevWord, \"class\") == 0 && strcmp(s, \"default\") == 0) ) {\n\t\t\t\t\t\tif (!isPrevLine) {\n\t\t\t\t\t\t\tlevelCurrent--;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlevelDeltaNext++;\n\t\t\t\t\t} else if ((strcmp(prevWord, \"end\") == 0 && strcmp(s, \"select\") == 0) || strcmp(s, \"endselect\") == 0) {\n\t\t\t\t\t\tlevelDeltaNext -= 2;\n\t\t\t\t\t}\n\n\t\t\t\t\t// There are multiple forms of \"do\" loop. The older form with a label \"do 100 i=1,10\" would require matching\n\t\t\t\t\t// labels to ensure the folding level does not decrease too far when labels are used for other purposes.\n\t\t\t\t\t// Since this is difficult, do-label constructs are not folded.\n\t\t\t\t\tif (strcmp(s, \"do\") == 0 && IsADigit(chNextNonBlank)) {\n\t\t\t\t\t\t// Remove delta for do-label\n\t\t\t\t\t\tlevelDeltaNext -= wordLevelDelta;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstrcpy(prevWord, s);\n\t\t\t}\n\t\t}\n\t\tif (atEOL) {\n\t\t\tif (foldComment) {\n\t\t\t\tint ldNext;\n\t\t\t\tCheckLevelCommentLine(nComL, nComColB, nComColF, nComCur, comLineB, comLineF, comLineCur, ldNext);\n\t\t\t\tlevelDeltaNext += ldNext;\n\t\t\t}\n\t\t\tint lev = levelCurrent;\n\t\t\tif (visibleChars == 0 && foldCompact)\n\t\t\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\t\t\tif ((levelDeltaNext > 0) && (visibleChars > 0))\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\tif (lev != styler.LevelAt(lineCurrent))\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\n\t\t\tlineCurrent++;\n\t\t\tlevelCurrent += levelDeltaNext;\n\t\t\tlevelDeltaNext = 0;\n\t\t\tvisibleChars = 0;\n\t\t\tstrcpy(prevWord, \"\");\n\t\t\tisPrevLine = false;\n\n\t\t\tif (foldComment) {\n\t\t\t\tStepCommentLine(styler, isFixFormat, lineCurrent, nComL, nComColB, nComColF, nComCur,\n\t\t\t\t\t\tcomLineB, comLineF, comLineCur);\n\t\t\t}\n\t\t}\n\t\t/***************************************/\n\t\tif (!isspacechar(ch)) visibleChars++;\n\t}\n\t/***************************************/\n}\n/***************************************/\nstatic const char * const FortranWordLists[] = {\n\t\"Primary keywords and identifiers\",\n\t\"Intrinsic functions\",\n\t\"Extended and user defined functions\",\n\t0,\n};\n/***************************************/\nstatic void ColouriseFortranDocFreeFormat(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[],\n        Accessor &styler) {\n\tColouriseFortranDoc(startPos, length, initStyle, keywordlists, styler, false);\n}\n/***************************************/\nstatic void ColouriseFortranDocFixFormat(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[],\n        Accessor &styler) {\n\tColouriseFortranDoc(startPos, length, initStyle, keywordlists, styler, true);\n}\n/***************************************/\nstatic void FoldFortranDocFreeFormat(Sci_PositionU startPos, Sci_Position length, int initStyle,\n        WordList *[], Accessor &styler) {\n\tFoldFortranDoc(startPos, length, initStyle,styler, false);\n}\n/***************************************/\nstatic void FoldFortranDocFixFormat(Sci_PositionU startPos, Sci_Position length, int initStyle,\n        WordList *[], Accessor &styler) {\n\tFoldFortranDoc(startPos, length, initStyle,styler, true);\n}\n/***************************************/\nLexerModule lmFortran(SCLEX_FORTRAN, ColouriseFortranDocFreeFormat, \"fortran\", FoldFortranDocFreeFormat, FortranWordLists);\nLexerModule lmF77(SCLEX_F77, ColouriseFortranDocFixFormat, \"f77\", FoldFortranDocFixFormat, FortranWordLists);\n"
  },
  {
    "path": "lexilla/lexers/LexGAP.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexGAP.cxx\n ** Lexer for the GAP language. (The GAP System for Computational Discrete Algebra)\n ** http://www.gap-system.org\n **/\n// Copyright 2007 by Istvan Szollosi ( szteven <at> gmail <dot> com )\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nstatic inline bool IsGAPOperator(char ch) {\n\tif (IsASCII(ch) && isalnum(ch)) return false;\n\tif (ch == '+' || ch == '-' || ch == '*' || ch == '/' ||\n\t\tch == '^' || ch == ',' || ch == '!' || ch == '.' ||\n\t\tch == '=' || ch == '<' || ch == '>' || ch == '(' ||\n\t\tch == ')' || ch == ';' || ch == '[' || ch == ']' ||\n\t\tch == '{' || ch == '}' || ch == ':' )\n\t\treturn true;\n\treturn false;\n}\n\nstatic void GetRange(Sci_PositionU start, Sci_PositionU end, Accessor &styler, char *s, Sci_PositionU len) {\n\tSci_PositionU i = 0;\n\twhile ((i < end - start + 1) && (i < len-1)) {\n\t\ts[i] = static_cast<char>(styler[start + i]);\n\t\ti++;\n\t}\n\ts[i] = '\\0';\n}\n\nstatic void ColouriseGAPDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[], Accessor &styler) {\n\n\tWordList &keywords1 = *keywordlists[0];\n\tWordList &keywords2 = *keywordlists[1];\n\tWordList &keywords3 = *keywordlists[2];\n\tWordList &keywords4 = *keywordlists[3];\n\n\t// Do not leak onto next line\n\tif (initStyle == SCE_GAP_STRINGEOL) initStyle = SCE_GAP_DEFAULT;\n\n\tStyleContext sc(startPos, length, initStyle, styler);\n\n\tfor (; sc.More(); sc.Forward()) {\n\n\t\t// Prevent SCE_GAP_STRINGEOL from leaking back to previous line\n\t\tif ( sc.atLineStart ) {\n\t\t\tif (sc.state == SCE_GAP_STRING) sc.SetState(SCE_GAP_STRING);\n\t\t\tif (sc.state == SCE_GAP_CHAR) sc.SetState(SCE_GAP_CHAR);\n\t\t}\n\n\t\t// Handle line continuation generically\n\t\tif (sc.ch == '\\\\' ) {\n\t\t\tif (sc.chNext == '\\n' || sc.chNext == '\\r') {\n\t\t\t\tsc.Forward();\n\t\t\t\tif (sc.ch == '\\r' && sc.chNext == '\\n') {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\t// Determine if the current state should terminate\n\t\tswitch (sc.state) {\n\t\t\tcase SCE_GAP_OPERATOR :\n\t\t\t\tsc.SetState(SCE_GAP_DEFAULT);\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_GAP_NUMBER :\n\t\t\t\tif (!IsADigit(sc.ch)) {\n\t\t\t\t\tif (sc.ch == '\\\\') {\n\t\t\t\t\t\tif (!sc.atLineEnd) {\n\t\t\t\t\t\t\tif (!IsADigit(sc.chNext)) {\n\t\t\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t\t\t\tsc.ChangeState(SCE_GAP_IDENTIFIER);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (isalpha(sc.ch) || sc.ch == '_') {\n\t\t\t\t\t\tsc.ChangeState(SCE_GAP_IDENTIFIER);\n\t\t\t\t\t}\n\t\t\t\t\telse sc.SetState(SCE_GAP_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_GAP_IDENTIFIER :\n\t\t\t\tif (!(iswordstart(static_cast<char>(sc.ch)) || sc.ch == '$')) {\n\t\t\t\t\tif (sc.ch == '\\\\') sc.Forward();\n\t\t\t\t\telse {\n\t\t\t\t\t\tchar s[1000];\n\t\t\t\t\t\tsc.GetCurrent(s, sizeof(s));\n\t\t\t\t\t\tif (keywords1.InList(s)) {\n\t\t\t\t\t\t\tsc.ChangeState(SCE_GAP_KEYWORD);\n\t\t\t\t\t\t} else if (keywords2.InList(s)) {\n\t\t\t\t\t\t\tsc.ChangeState(SCE_GAP_KEYWORD2);\n\t\t\t\t\t\t} else if (keywords3.InList(s)) {\n\t\t\t\t\t\t\tsc.ChangeState(SCE_GAP_KEYWORD3);\n\t\t\t\t\t\t} else if (keywords4.InList(s)) {\n\t\t\t\t\t\t\tsc.ChangeState(SCE_GAP_KEYWORD4);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsc.SetState(SCE_GAP_DEFAULT);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_GAP_COMMENT :\n\t\t\t\tif (sc.atLineEnd) {\n\t\t\t\t\tsc.SetState(SCE_GAP_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_GAP_STRING:\n\t\t\t\tif (sc.atLineEnd) {\n\t\t\t\t\tsc.ChangeState(SCE_GAP_STRINGEOL);\n\t\t\t\t} else if (sc.ch == '\\\\') {\n\t\t\t\t\tif (sc.chNext == '\\\"' || sc.chNext == '\\'' || sc.chNext == '\\\\') {\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t}\n\t\t\t\t} else if (sc.ch == '\\\"') {\n\t\t\t\t\tsc.ForwardSetState(SCE_GAP_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_GAP_CHAR:\n\t\t\t\tif (sc.atLineEnd) {\n\t\t\t\t\tsc.ChangeState(SCE_GAP_STRINGEOL);\n\t\t\t\t} else if (sc.ch == '\\\\') {\n\t\t\t\t\tif (sc.chNext == '\\\"' || sc.chNext == '\\'' || sc.chNext == '\\\\') {\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t}\n\t\t\t\t} else if (sc.ch == '\\'') {\n\t\t\t\t\tsc.ForwardSetState(SCE_GAP_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_GAP_STRINGEOL:\n\t\t\t\tif (sc.atLineStart) {\n\t\t\t\t\tsc.SetState(SCE_GAP_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// Determine if a new state should be entered\n\t\tif (sc.state == SCE_GAP_DEFAULT) {\n\t\t\tif (IsGAPOperator(static_cast<char>(sc.ch))) {\n\t\t\t\tsc.SetState(SCE_GAP_OPERATOR);\n\t\t\t}\n\t\t\telse if (IsADigit(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_GAP_NUMBER);\n\t\t\t} else if (isalpha(sc.ch) || sc.ch == '_' || sc.ch == '\\\\' || sc.ch == '$' || sc.ch == '~') {\n\t\t\t\tsc.SetState(SCE_GAP_IDENTIFIER);\n\t\t\t\tif (sc.ch == '\\\\') sc.Forward();\n\t\t\t} else if (sc.ch == '#') {\n\t\t\t\tsc.SetState(SCE_GAP_COMMENT);\n\t\t\t} else if (sc.ch == '\\\"') {\n\t\t\t\tsc.SetState(SCE_GAP_STRING);\n\t\t\t} else if (sc.ch == '\\'') {\n\t\t\t\tsc.SetState(SCE_GAP_CHAR);\n\t\t\t}\n\t\t}\n\n\t}\n\tsc.Complete();\n}\n\nstatic int ClassifyFoldPointGAP(const char* s) {\n\tint level = 0;\n\tif (strcmp(s, \"function\") == 0 ||\n\t\tstrcmp(s, \"do\") == 0 ||\n\t\tstrcmp(s, \"if\") == 0 ||\n\t\tstrcmp(s, \"repeat\") == 0 ) {\n\t\tlevel = 1;\n\t} else if (strcmp(s, \"end\") == 0 ||\n\t\t\tstrcmp(s, \"od\") == 0 ||\n\t\t\tstrcmp(s, \"fi\") == 0 ||\n\t\t\tstrcmp(s, \"until\") == 0 ) {\n\t\tlevel = -1;\n\t}\n\treturn level;\n}\n\nstatic void FoldGAPDoc( Sci_PositionU startPos, Sci_Position length, int initStyle,   WordList** , Accessor &styler) {\n\tSci_PositionU endPos = startPos + length;\n\tint visibleChars = 0;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tint levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK;\n\tint levelCurrent = levelPrev;\n\tchar chNext = styler[startPos];\n\tint styleNext = styler.StyleAt(startPos);\n\tint style = initStyle;\n\n\tSci_Position lastStart = 0;\n\n\tfor (Sci_PositionU i = startPos; i < endPos; i++) {\n\t\tchar ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\tint stylePrev = style;\n\t\tstyle = styleNext;\n\t\tstyleNext = styler.StyleAt(i + 1);\n\t\tbool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n\n\t\tif (stylePrev != SCE_GAP_KEYWORD && style == SCE_GAP_KEYWORD) {\n\t\t\t// Store last word start point.\n\t\t\tlastStart = i;\n\t\t}\n\n\t\tif (stylePrev == SCE_GAP_KEYWORD) {\n\t\t\tif(iswordchar(ch) && !iswordchar(chNext)) {\n\t\t\t\tchar s[100];\n\t\t\t\tGetRange(lastStart, i, styler, s, sizeof(s));\n\t\t\t\tlevelCurrent += ClassifyFoldPointGAP(s);\n\t\t\t}\n\t\t}\n\n\t\tif (atEOL) {\n\t\t\tint lev = levelPrev;\n\t\t\tif ((levelCurrent > levelPrev) && (visibleChars > 0))\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\tif (lev != styler.LevelAt(lineCurrent)) {\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\t\t\t}\n\t\t\tlineCurrent++;\n\t\t\tlevelPrev = levelCurrent;\n\t\t\tvisibleChars = 0;\n\t\t}\n\n\t\tif (!isspacechar(ch))\n\t\t\tvisibleChars++;\n\t}\n\n\tint flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK;\n\tstyler.SetLevel(lineCurrent, levelPrev | flagsNext);\n}\n\nstatic const char * const GAPWordListDesc[] = {\n\t\"Keywords 1\",\n\t\"Keywords 2\",\n\t\"Keywords 3 (unused)\",\n\t\"Keywords 4 (unused)\",\n\t0\n};\n\nLexerModule lmGAP(\n   SCLEX_GAP,\n   ColouriseGAPDoc,\n   \"gap\",\n   FoldGAPDoc,\n   GAPWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexGDScript.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexGDScript.cxx\n ** Lexer for GDScript.\n **/\n// Copyright 1998-2002 by Neil Hodgson <neilh@scintilla.org>\n// Heavily modified later for GDScript\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <cstdlib>\n#include <cassert>\n#include <cstring>\n\n#include <string>\n#include <string_view>\n#include <vector>\n#include <map>\n#include <algorithm>\n#include <functional>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"StringCopy.h\"\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"CharacterCategory.h\"\n#include \"LexerModule.h\"\n#include \"OptionSet.h\"\n#include \"SubStyles.h\"\n#include \"DefaultLexer.h\"\n\nusing namespace Scintilla;\nusing namespace Lexilla;\n\nnamespace {\n\nenum kwType { kwOther, kwClass, kwDef, kwExtends};\n\nconstexpr int indicatorWhitespace = 1;\n\nbool IsGDStringStart(int ch) {\n    return (ch == '\\'' || ch == '\"');\n}\n\nbool IsGDComment(Accessor &styler, Sci_Position pos, Sci_Position len) {\n\treturn len > 0 && styler[pos] == '#';\n}\n\nconstexpr bool IsGDSingleQuoteStringState(int st) noexcept {\n\treturn ((st == SCE_GD_CHARACTER) || (st == SCE_GD_STRING));\n}\n\nconstexpr bool IsGDTripleQuoteStringState(int st) noexcept {\n\treturn ((st == SCE_GD_TRIPLE) || (st == SCE_GD_TRIPLEDOUBLE));\n}\n\nchar GetGDStringQuoteChar(int st) noexcept {\n\tif ((st == SCE_GD_CHARACTER) || (st == SCE_GD_TRIPLE))\n\t\treturn '\\'';\n\tif ((st == SCE_GD_STRING) || (st == SCE_GD_TRIPLEDOUBLE))\n\t\treturn '\"';\n\n\treturn '\\0';\n}\n\n/* Return the state to use for the string starting at i; *nextIndex will be set to the first index following the quote(s) */\nint GetGDStringState(Accessor &styler, Sci_Position i, Sci_PositionU *nextIndex) {\n\tchar ch = styler.SafeGetCharAt(i);\n\tchar chNext = styler.SafeGetCharAt(i + 1);\n\n\tif (ch != '\"' && ch != '\\'') {\n\t\t*nextIndex = i + 1;\n\t\treturn SCE_GD_DEFAULT;\n\t}\n\n\tif (ch == chNext && ch == styler.SafeGetCharAt(i + 2)) {\n\t\t*nextIndex = i + 3;\n\n\t\tif (ch == '\"')\n\t\t\treturn SCE_GD_TRIPLEDOUBLE;\n\t\telse\n\t\t\treturn SCE_GD_TRIPLE;\n\t} else {\n\t\t*nextIndex = i + 1;\n\n\t\tif (ch == '\"')\n\t\t\treturn SCE_GD_STRING;\n\t\telse\n\t\t\treturn SCE_GD_CHARACTER;\n\t}\n}\n\nint GetGDStringState(int ch) {\n\tif (ch != '\"' && ch != '\\'')\n\t\treturn SCE_GD_DEFAULT;\n\n\tif (ch == '\"')\n\t\treturn SCE_GD_STRING;\n\telse\n\t\treturn SCE_GD_CHARACTER;\n}\n\ninline bool IsAWordChar(int ch, bool unicodeIdentifiers) {\n\tif (IsASCII(ch))\n\t\treturn (IsAlphaNumeric(ch) || ch == '.' || ch == '_');\n\n\tif (!unicodeIdentifiers)\n\t\treturn false;\n\n\treturn IsXidContinue(ch);\n}\n\ninline bool IsANodePathChar(int ch, bool unicodeIdentifiers) {\n\tif (IsASCII(ch))\n\t\treturn (IsAlphaNumeric(ch) || ch == '_' || ch == '/' || ch =='%');\n\n\tif (!unicodeIdentifiers)\n\t\treturn false;\n\n\treturn IsXidContinue(ch);\n}\n\ninline bool IsAWordStart(int ch, bool unicodeIdentifiers) {\n\tif (IsASCII(ch))\n\t\treturn (IsUpperOrLowerCase(ch) || ch == '_');\n\n\tif (!unicodeIdentifiers)\n\t\treturn false;\n\n\treturn IsXidStart(ch);\n}\n\nbool IsFirstNonWhitespace(Sci_Position pos, Accessor &styler) {\n\tconst Sci_Position line = styler.GetLine(pos);\n\tconst Sci_Position start_pos = styler.LineStart(line);\n\tfor (Sci_Position i = start_pos; i < pos; i++) {\n\t\tconst char ch = styler[i];\n\t\tif (!(ch == ' ' || ch == '\\t'))\n\t\t\treturn false;\n\t}\n\treturn true;\n}\n\n// Options used for LexerGDScript\nstruct OptionsGDScript {\n\tint whingeLevel;\n\tbool base2or8Literals;\n\tbool stringsOverNewline;\n\tbool keywords2NoSubIdentifiers;\n\tbool fold;\n\tbool foldQuotes;\n\tbool foldCompact;\n\tbool unicodeIdentifiers;\n\n\tOptionsGDScript() noexcept {\n\t\twhingeLevel = 0;\n\t\tbase2or8Literals = true;\n\t\tstringsOverNewline = false;\n\t\tkeywords2NoSubIdentifiers = false;\n\t\tfold = false;\n\t\tfoldQuotes = false;\n\t\tfoldCompact = false;\n\t\tunicodeIdentifiers = true;\n\t}\n};\n\nconst char *const gdscriptWordListDesc[] = {\n\t\"Keywords\",\n\t\"Highlighted identifiers\",\n\tnullptr\n};\n\nstruct OptionSetGDScript : public OptionSet<OptionsGDScript> {\n\tOptionSetGDScript() {\n\t\tDefineProperty(\"lexer.gdscript.whinge.level\", &OptionsGDScript::whingeLevel,\n\t\t\t       \"For GDScript code, checks whether indenting is consistent. \"\n\t\t\t       \"The default, 0 turns off indentation checking, \"\n\t\t\t       \"1 checks whether each line is potentially inconsistent with the previous line, \"\n\t\t\t       \"2 checks whether any space characters occur before a tab character in the indentation, \"\n\t\t\t       \"3 checks whether any spaces are in the indentation, and \"\n\t\t\t       \"4 checks for any tab characters in the indentation. \"\n\t\t\t       \"1 is a good level to use.\");\n\n\t\tDefineProperty(\"lexer.gdscript.literals.binary\", &OptionsGDScript::base2or8Literals,\n\t\t\t       \"Set to 0 to not recognise binary and octal literals: 0b1011 0o712.\");\n\n\t\tDefineProperty(\"lexer.gdscript.strings.over.newline\", &OptionsGDScript::stringsOverNewline,\n\t\t\t       \"Set to 1 to allow strings to span newline characters.\");\n\n\t\tDefineProperty(\"lexer.gdscript.keywords2.no.sub.identifiers\", &OptionsGDScript::keywords2NoSubIdentifiers,\n\t\t\t       \"When enabled, it will not style keywords2 items that are used as a sub-identifier. \"\n\t\t\t       \"Example: when set, will not highlight \\\"foo.open\\\" when \\\"open\\\" is a keywords2 item.\");\n\n\t\tDefineProperty(\"fold\", &OptionsGDScript::fold);\n\n\t\tDefineProperty(\"fold.gdscript.quotes\", &OptionsGDScript::foldQuotes,\n\t\t\t       \"This option enables folding multi-line quoted strings when using the GDScript lexer.\");\n\n\t\tDefineProperty(\"fold.compact\", &OptionsGDScript::foldCompact);\n\n\t\tDefineProperty(\"lexer.gdscript.unicode.identifiers\", &OptionsGDScript::unicodeIdentifiers,\n\t\t\t       \"Set to 0 to not recognise Unicode identifiers.\");\n\n\t\tDefineWordListSets(gdscriptWordListDesc);\n\t}\n};\n\nconst char styleSubable[] = { SCE_GD_IDENTIFIER, 0 };\n\nLexicalClass lexicalClasses[] = {\n\t// Lexer GDScript SCLEX_GDSCRIPT SCE_GD_:\n\t0, \"SCE_GD_DEFAULT\", \"default\", \"White space\",\n\t1, \"SCE_GD_COMMENTLINE\", \"comment line\", \"Comment\",\n\t2, \"SCE_GD_NUMBER\", \"literal numeric\", \"Number\",\n\t3, \"SCE_GD_STRING\", \"literal string\", \"String\",\n\t4, \"SCE_GD_CHARACTER\", \"literal string\", \"Single quoted string\",\n\t5, \"SCE_GD_WORD\", \"keyword\", \"Keyword\",\n\t6, \"SCE_GD_TRIPLE\", \"literal string\", \"Triple quotes\",\n\t7, \"SCE_GD_TRIPLEDOUBLE\", \"literal string\", \"Triple double quotes\",\n\t8, \"SCE_GD_CLASSNAME\", \"identifier\", \"Class name definition\",\n\t9, \"SCE_GD_FUNCNAME\", \"identifier\", \"Function or method name definition\",\n\t10, \"SCE_GD_OPERATOR\", \"operator\", \"Operators\",\n\t11, \"SCE_GD_IDENTIFIER\", \"identifier\", \"Identifiers\",\n\t12, \"SCE_GD_COMMENTBLOCK\", \"comment\", \"Comment-blocks\",\n\t13, \"SCE_GD_STRINGEOL\", \"error literal string\", \"End of line where string is not closed\",\n\t14, \"SCE_GD_WORD2\", \"identifier\", \"Highlighted identifiers\",\n\t15, \"SCE_GD_ANNOTATION\", \"annotation\", \"Annotations\",\n\t16, \"SCE_GD_NODEPATH\", \"path\", \"Node path\",\n};\n\n}\n\nclass LexerGDScript : public DefaultLexer {\n\tWordList keywords;\n\tWordList keywords2;\n\tOptionsGDScript options;\n\tOptionSetGDScript osGDScript;\n\tenum { ssIdentifier };\n\tSubStyles subStyles{styleSubable};\npublic:\n\texplicit LexerGDScript() :\n\t\tDefaultLexer(\"gdscript\", SCLEX_GDSCRIPT, lexicalClasses, ELEMENTS(lexicalClasses)) {\n\t}\n\t~LexerGDScript() override {\n\t}\n\tvoid SCI_METHOD Release() override {\n\t\tdelete this;\n\t}\n\tint SCI_METHOD Version() const override {\n\t\treturn lvRelease5;\n\t}\n\tconst char *SCI_METHOD PropertyNames() override {\n\t\treturn osGDScript.PropertyNames();\n\t}\n\tint SCI_METHOD PropertyType(const char *name) override {\n\t\treturn osGDScript.PropertyType(name);\n\t}\n\tconst char *SCI_METHOD DescribeProperty(const char *name) override {\n\t\treturn osGDScript.DescribeProperty(name);\n\t}\n\tSci_Position SCI_METHOD PropertySet(const char *key, const char *val) override;\n\tconst char * SCI_METHOD PropertyGet(const char *key) override {\n\t\treturn osGDScript.PropertyGet(key);\n\t}\n\tconst char *SCI_METHOD DescribeWordListSets() override {\n\t\treturn osGDScript.DescribeWordListSets();\n\t}\n\tSci_Position SCI_METHOD WordListSet(int n, const char *wl) override;\n\tvoid SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;\n\tvoid SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;\n\n\tvoid *SCI_METHOD PrivateCall(int, void *) override {\n\t\treturn nullptr;\n\t}\n\n\tint SCI_METHOD LineEndTypesSupported() override {\n\t\treturn SC_LINE_END_TYPE_UNICODE;\n\t}\n\n\tint SCI_METHOD AllocateSubStyles(int styleBase, int numberStyles) override {\n\t\treturn subStyles.Allocate(styleBase, numberStyles);\n\t}\n\tint SCI_METHOD SubStylesStart(int styleBase) override {\n\t\treturn subStyles.Start(styleBase);\n\t}\n\tint SCI_METHOD SubStylesLength(int styleBase) override {\n\t\treturn subStyles.Length(styleBase);\n\t}\n\tint SCI_METHOD StyleFromSubStyle(int subStyle) override {\n\t\tconst int styleBase = subStyles.BaseStyle(subStyle);\n\t\treturn styleBase;\n\t}\n\tint SCI_METHOD PrimaryStyleFromStyle(int style) override {\n\t\treturn style;\n\t}\n\tvoid SCI_METHOD FreeSubStyles() override {\n\t\tsubStyles.Free();\n\t}\n\tvoid SCI_METHOD SetIdentifiers(int style, const char *identifiers) override {\n\t\tsubStyles.SetIdentifiers(style, identifiers);\n\t}\n\tint SCI_METHOD DistanceToSecondaryStyles() override {\n\t\treturn 0;\n\t}\n\tconst char *SCI_METHOD GetSubStyleBases() override {\n\t\treturn styleSubable;\n\t}\n\n\tstatic ILexer5 *LexerFactoryGDScript() {\n\t\treturn new LexerGDScript();\n\t}\n\nprivate:\n\tvoid ProcessLineEnd(StyleContext &sc, bool &inContinuedString);\n};\n\nSci_Position SCI_METHOD LexerGDScript::PropertySet(const char *key, const char *val) {\n\tif (osGDScript.PropertySet(&options, key, val)) {\n\t\treturn 0;\n\t}\n\treturn -1;\n}\n\nSci_Position SCI_METHOD LexerGDScript::WordListSet(int n, const char *wl) {\n\tWordList *wordListN = nullptr;\n\tswitch (n) {\n\tcase 0:\n\t\twordListN = &keywords;\n\t\tbreak;\n\tcase 1:\n\t\twordListN = &keywords2;\n\t\tbreak;\n\tdefault:\n\t\tbreak;\n\t}\n\tSci_Position firstModification = -1;\n\tif (wordListN) {\n\t\tWordList wlNew;\n\t\twlNew.Set(wl);\n\t\tif (*wordListN != wlNew) {\n\t\t\twordListN->Set(wl);\n\t\t\tfirstModification = 0;\n\t\t}\n\t}\n\treturn firstModification;\n}\n\nvoid LexerGDScript::ProcessLineEnd(StyleContext &sc, bool &inContinuedString) {\n\tif ((sc.state == SCE_GD_DEFAULT)\n\t\t\t|| IsGDTripleQuoteStringState(sc.state)) {\n\t\t// Perform colourisation of white space and triple quoted strings at end of each line to allow\n\t\t// tab marking to work inside white space and triple quoted strings\n\t\tsc.SetState(sc.state);\n\t}\n\n\tif (IsGDSingleQuoteStringState(sc.state)) {\n\t\tif (inContinuedString || options.stringsOverNewline) {\n\t\t\tinContinuedString = false;\n\t\t} else {\n\t\t\tsc.ChangeState(SCE_GD_STRINGEOL);\n\t\t\tsc.ForwardSetState(SCE_GD_DEFAULT);\n\t\t}\n\t}\n}\n\nvoid SCI_METHOD LexerGDScript::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) {\n\tAccessor styler(pAccess, nullptr);\n\n\tconst Sci_Position endPos = startPos + length;\n\n\t// Backtrack to previous line in case need to fix its tab whinging\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tif (startPos > 0) {\n\t\tif (lineCurrent > 0) {\n\t\t\tlineCurrent--;\n\t\t\t// Look for backslash-continued lines\n\t\t\twhile (lineCurrent > 0) {\n\t\t\t\tconst Sci_Position eolPos = styler.LineStart(lineCurrent) - 1;\n\t\t\t\tconst int eolStyle = styler.StyleAt(eolPos);\n\t\t\t\tif (eolStyle == SCE_GD_STRING || eolStyle == SCE_GD_CHARACTER\n\t\t\t\t\t\t|| eolStyle == SCE_GD_STRINGEOL) {\n\t\t\t\t\tlineCurrent -= 1;\n\t\t\t\t} else {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tstartPos = styler.LineStart(lineCurrent);\n\t\t}\n\t\tinitStyle = startPos == 0 ? SCE_GD_DEFAULT : styler.StyleAt(startPos - 1);\n\t}\n\n\tinitStyle = initStyle & 31;\n\tif (initStyle == SCE_GD_STRINGEOL) {\n\t\tinitStyle = SCE_GD_DEFAULT;\n\t}\n\n\tkwType kwLast = kwOther;\n\tint spaceFlags = 0;\n\tstyler.IndentAmount(lineCurrent, &spaceFlags, IsGDComment);\n\tbool base_n_number = false;\n\n\tconst WordClassifier &classifierIdentifiers = subStyles.Classifier(SCE_GD_IDENTIFIER);\n\n\tStyleContext sc(startPos, endPos - startPos, initStyle, styler);\n\n\tbool indentGood = true;\n\tSci_Position startIndicator = sc.currentPos;\n\tbool inContinuedString = false;\n\tbool percentIsNodePath = false;\n\tint nodePathStringState = SCE_GD_DEFAULT;\n\t\n\tfor (; sc.More(); sc.Forward()) {\n\n\t\tif (sc.atLineStart) {\n\t\t\tstyler.IndentAmount(lineCurrent, &spaceFlags, IsGDComment);\n\t\t\tindentGood = true;\n\t\t\tif (options.whingeLevel == 1) {\n\t\t\t\tindentGood = (spaceFlags & wsInconsistent) == 0;\n\t\t\t} else if (options.whingeLevel == 2) {\n\t\t\t\tindentGood = (spaceFlags & wsSpaceTab) == 0;\n\t\t\t} else if (options.whingeLevel == 3) {\n\t\t\t\tindentGood = (spaceFlags & wsSpace) == 0;\n\t\t\t} else if (options.whingeLevel == 4) {\n\t\t\t\tindentGood = (spaceFlags & wsTab) == 0;\n\t\t\t}\n\t\t\tif (!indentGood) {\n\t\t\t\tstyler.IndicatorFill(startIndicator, sc.currentPos, indicatorWhitespace, 0);\n\t\t\t\tstartIndicator = sc.currentPos;\n\t\t\t}\n\t\t}\n\n\t\tif (sc.atLineEnd) {\n\t\t\tpercentIsNodePath = false;\n\t\t\tProcessLineEnd(sc, inContinuedString);\n\t\t\tlineCurrent++;\n\t\t\tif (!sc.More())\n\t\t\t\tbreak;\n\t\t}\n\n\t\tbool needEOLCheck = false;\n\n\t\tif (sc.state == SCE_GD_OPERATOR) {\n\t\t\tkwLast = kwOther;\n\t\t\tsc.SetState(SCE_GD_DEFAULT);\n\t\t} else if (sc.state == SCE_GD_NUMBER) {\n\t\t\tif (!IsAWordChar(sc.ch, false) &&\n\t\t\t\t\t!(!base_n_number && ((sc.ch == '+' || sc.ch == '-') && (sc.chPrev == 'e' || sc.chPrev == 'E')))) {\n\t\t\t\tsc.SetState(SCE_GD_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_GD_IDENTIFIER) {\n\t\t\tif ((sc.ch == '.') || (!IsAWordChar(sc.ch, options.unicodeIdentifiers))) {\n\t\t\t\tchar s[100];\n\t\t\t\tsc.GetCurrent(s, sizeof(s));\n\t\t\t\tint style = SCE_GD_IDENTIFIER;\n\t\t\t\tif (keywords.InList(s)) {\n\t\t\t\t\tstyle = SCE_GD_WORD;\n\t\t\t\t} else if (kwLast == kwClass) {\n\t\t\t\t\tstyle = SCE_GD_CLASSNAME;\n\t\t\t\t} else if (kwLast == kwDef) {\n\t\t\t\t\tstyle = SCE_GD_FUNCNAME;\n\t\t\t\t} else if (keywords2.InList(s)) {\n\t\t\t\t\tif (options.keywords2NoSubIdentifiers) {\n\t\t\t\t\t\t// We don't want to highlight keywords2\n\t\t\t\t\t\t// that are used as a sub-identifier,\n\t\t\t\t\t\t// i.e. not open in \"foo.open\".\n\t\t\t\t\t\tconst Sci_Position pos = styler.GetStartSegment() - 1;\n\t\t\t\t\t\tif (pos < 0 || (styler.SafeGetCharAt(pos, '\\0') != '.'))\n\t\t\t\t\t\t\tstyle = SCE_GD_WORD2;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstyle = SCE_GD_WORD2;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tconst int subStyle = classifierIdentifiers.ValueFor(s);\n\t\t\t\t\tif (subStyle >= 0) {\n\t\t\t\t\t\tstyle = subStyle;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsc.ChangeState(style);\n\t\t\t\tsc.SetState(SCE_GD_DEFAULT);\n\t\t\t\tif (style == SCE_GD_WORD) {\n\t\t\t\t\tif (0 == strcmp(s, \"class\"))\n\t\t\t\t\t\tkwLast = kwClass;\n\t\t\t\t\telse if (0 == strcmp(s, \"func\"))\n\t\t\t\t\t\tkwLast = kwDef;\n\t\t\t\t\telse if (0 == strcmp(s, \"extends\"))\n\t\t\t\t\t\tkwLast = kwExtends;\n\t\t\t\t\telse\n\t\t\t\t\t\tkwLast = kwOther;\n\t\t\t\t} else {\n\t\t\t\t\tkwLast = kwOther;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if ((sc.state == SCE_GD_COMMENTLINE) || (sc.state == SCE_GD_COMMENTBLOCK)) {\n\t\t\tif (sc.ch == '\\r' || sc.ch == '\\n') {\n\t\t\t\tsc.SetState(SCE_GD_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_GD_ANNOTATION) {\n\t\t\tif (!IsAWordStart(sc.ch, options.unicodeIdentifiers)) {\n\t\t\t\tsc.SetState(SCE_GD_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_GD_NODEPATH) {\n\t\t\tif (nodePathStringState != SCE_GD_DEFAULT) {\n\t\t\t\tif (sc.ch == GetGDStringQuoteChar(nodePathStringState) ) {\n\t\t\t\t\tnodePathStringState = SCE_GD_DEFAULT;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (IsGDStringStart(sc.ch)) {\n\t\t\t\t\tnodePathStringState = GetGDStringState(sc.ch);\n\t\t\t\t} else if (!IsANodePathChar(sc.ch, options.unicodeIdentifiers)) {\n\t\t\t\t\tsc.SetState(SCE_GD_DEFAULT);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (IsGDSingleQuoteStringState(sc.state)) {\n\t\t\tif (sc.ch == '\\\\') {\n\t\t\t\tif ((sc.chNext == '\\r') && (sc.GetRelative(2) == '\\n')) {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t}\n\t\t\t\tif (sc.chNext == '\\n' || sc.chNext == '\\r') {\n\t\t\t\t\tinContinuedString = true;\n\t\t\t\t} else {\n\t\t\t\t\t// Don't roll over the newline.\n\t\t\t\t\tsc.Forward();\n\t\t\t\t}\n\t\t\t} else if (sc.ch == GetGDStringQuoteChar(sc.state)) {\n\t\t\t\tsc.ForwardSetState(SCE_GD_DEFAULT);\n\t\t\t\tneedEOLCheck = true;\n\t\t\t}\n\t\t} else if (sc.state == SCE_GD_TRIPLE) {\n\t\t\tif (sc.ch == '\\\\') {\n\t\t\t\tsc.Forward();\n\t\t\t} else if (sc.Match(R\"(''')\")) {\n\t\t\t\tsc.Forward();\n\t\t\t\tsc.Forward();\n\t\t\t\tsc.ForwardSetState(SCE_GD_DEFAULT);\n\t\t\t\tneedEOLCheck = true;\n\t\t\t}\n\t\t} else if (sc.state == SCE_GD_TRIPLEDOUBLE) {\n\t\t\tif (sc.ch == '\\\\') {\n\t\t\t\tsc.Forward();\n\t\t\t} else if (sc.Match(R\"(\"\"\")\")) {\n\t\t\t\tsc.Forward();\n\t\t\t\tsc.Forward();\n\t\t\t\tsc.ForwardSetState(SCE_GD_DEFAULT);\n\t\t\t\tneedEOLCheck = true;\n\t\t\t}\n\t\t}\n\n\t\tif (!indentGood && !IsASpaceOrTab(sc.ch)) {\n\t\t\tstyler.IndicatorFill(startIndicator, sc.currentPos, indicatorWhitespace, 1);\n\t\t\tstartIndicator = sc.currentPos;\n\t\t\tindentGood = true;\n\t\t}\n\n\t\t// State exit code may have moved on to end of line\n\t\tif (needEOLCheck && sc.atLineEnd) {\n\t\t\tProcessLineEnd(sc, inContinuedString);\n\t\t\tlineCurrent++;\n\t\t\tstyler.IndentAmount(lineCurrent, &spaceFlags, IsGDComment);\n\t\t\tif (!sc.More())\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// Check for a new state starting character\n\t\tif (sc.state == SCE_GD_DEFAULT) {\n\t\t\tif (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) {\n\t\t\t\tif (sc.ch == '0' && (sc.chNext == 'x' || sc.chNext == 'X')) {\n\t\t\t\t\tbase_n_number = true;\n\t\t\t\t\tsc.SetState(SCE_GD_NUMBER);\n\t\t\t\t} else if (sc.ch == '0' &&\n\t\t\t\t\t\t(sc.chNext == 'o' || sc.chNext == 'O' || sc.chNext == 'b' || sc.chNext == 'B')) {\n\t\t\t\t\tif (options.base2or8Literals) {\n\t\t\t\t\t\tbase_n_number = true;\n\t\t\t\t\t\tsc.SetState(SCE_GD_NUMBER);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsc.SetState(SCE_GD_NUMBER);\n\t\t\t\t\t\tsc.ForwardSetState(SCE_GD_IDENTIFIER);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tbase_n_number = false;\n\t\t\t\t\tsc.SetState(SCE_GD_NUMBER);\n\t\t\t\t}\n\t\t\t} else if ((sc.ch == '$') || (sc.ch == '%' && (percentIsNodePath || IsFirstNonWhitespace(sc.currentPos, styler)))) {\n\t\t\t\tpercentIsNodePath = false;\n\t\t\t\tsc.SetState(SCE_GD_NODEPATH);\n\t\t\t} else if (isoperator(sc.ch) || sc.ch == '`') {\n\t\t\t\tpercentIsNodePath = !((sc.ch == ')') || (sc.ch == ']') || (sc.ch == '}'));\n\t\t\t\tsc.SetState(SCE_GD_OPERATOR);\n\t\t\t} else if (sc.ch == '#') {\n\t\t\t\tsc.SetState(sc.chNext == '#' ? SCE_GD_COMMENTBLOCK : SCE_GD_COMMENTLINE);\n\t\t\t} else if (sc.ch == '@') {\n\t\t\t\tif (IsFirstNonWhitespace(sc.currentPos, styler))\n\t\t\t\t\tsc.SetState(SCE_GD_ANNOTATION);\n\t\t\t\telse\n\t\t\t\t\tsc.SetState(SCE_GD_OPERATOR);\n\t\t\t} else if (IsGDStringStart(sc.ch)) {\n\t\t\t\tSci_PositionU nextIndex = 0;\n\t\t\t\tsc.SetState(GetGDStringState(styler, sc.currentPos, &nextIndex));\n\t\t\t\twhile (nextIndex > (sc.currentPos + 1) && sc.More()) {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t}\n            } else if (IsAWordStart(sc.ch, options.unicodeIdentifiers)) {\n\t\t\t\tsc.SetState(SCE_GD_IDENTIFIER);\n\t\t\t}\n\t\t}\n\t}\n\tstyler.IndicatorFill(startIndicator, sc.currentPos, indicatorWhitespace, 0);\n\tsc.Complete();\n}\n\nstatic bool IsCommentLine(Sci_Position line, Accessor &styler) {\n\tconst Sci_Position pos = styler.LineStart(line);\n\tconst Sci_Position eol_pos = styler.LineStart(line + 1) - 1;\n\tfor (Sci_Position i = pos; i < eol_pos; i++) {\n\t\tconst char ch = styler[i];\n\t\tif (ch == '#')\n\t\t\treturn true;\n\t\telse if (ch != ' ' && ch != '\\t')\n\t\t\treturn false;\n\t}\n\treturn false;\n}\n\nstatic bool IsQuoteLine(Sci_Position line, const Accessor &styler) {\n\tconst int style = styler.StyleAt(styler.LineStart(line)) & 31;\n\treturn IsGDTripleQuoteStringState(style);\n}\n\n\nvoid SCI_METHOD LexerGDScript::Fold(Sci_PositionU startPos, Sci_Position length, int /*initStyle - unused*/, IDocument *pAccess) {\n\tif (!options.fold)\n\t\treturn;\n\n\tAccessor styler(pAccess, nullptr);\n\n\tconst Sci_Position maxPos = startPos + length;\n\tconst Sci_Position maxLines = (maxPos == styler.Length()) ? styler.GetLine(maxPos) : styler.GetLine(maxPos - 1);\t// Requested last line\n\tconst Sci_Position docLines = styler.GetLine(styler.Length());\t// Available last line\n\n\t// Backtrack to previous non-blank line so we can determine indent level\n\t// for any white space lines (needed esp. within triple quoted strings)\n\t// and so we can fix any preceding fold level (which is why we go back\n\t// at least one line in all cases)\n\tint spaceFlags = 0;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tint indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags, nullptr);\n\twhile (lineCurrent > 0) {\n\t\tlineCurrent--;\n\t\tindentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags, nullptr);\n\t\tif (!(indentCurrent & SC_FOLDLEVELWHITEFLAG) &&\n\t\t\t\t(!IsCommentLine(lineCurrent, styler)) &&\n\t\t\t\t(!IsQuoteLine(lineCurrent, styler)))\n\t\t\tbreak;\n\t}\n\tint indentCurrentLevel = indentCurrent & SC_FOLDLEVELNUMBERMASK;\n\n\t// Set up initial loop state\n\tstartPos = styler.LineStart(lineCurrent);\n\tint prev_state = SCE_GD_DEFAULT & 31;\n\tif (lineCurrent >= 1)\n\t\tprev_state = styler.StyleAt(startPos - 1) & 31;\n\tint prevQuote = options.foldQuotes && IsGDTripleQuoteStringState(prev_state);\n\n\t// Process all characters to end of requested range or end of any triple quote\n\t//that hangs over the end of the range.  Cap processing in all cases\n\t// to end of document (in case of unclosed quote at end).\n\twhile ((lineCurrent <= docLines) && ((lineCurrent <= maxLines) || prevQuote)) {\n\n\t\t// Gather info\n\t\tint lev = indentCurrent;\n\t\tSci_Position lineNext = lineCurrent + 1;\n\t\tint indentNext = indentCurrent;\n\t\tint quote = false;\n\t\tif (lineNext <= docLines) {\n\t\t\t// Information about next line is only available if not at end of document\n\t\t\tindentNext = styler.IndentAmount(lineNext, &spaceFlags, nullptr);\n\t\t\tconst Sci_Position lookAtPos = (styler.LineStart(lineNext) == styler.Length()) ? styler.Length() - 1 : styler.LineStart(lineNext);\n\t\t\tconst int style = styler.StyleAt(lookAtPos) & 31;\n\t\t\tquote = options.foldQuotes && IsGDTripleQuoteStringState(style);\n\t\t}\n\t\tconst bool quote_start = (quote && !prevQuote);\n\t\tconst bool quote_continue = (quote && prevQuote);\n\t\tif (!quote || !prevQuote)\n\t\t\tindentCurrentLevel = indentCurrent & SC_FOLDLEVELNUMBERMASK;\n\t\tif (quote)\n\t\t\tindentNext = indentCurrentLevel;\n\t\tif (indentNext & SC_FOLDLEVELWHITEFLAG)\n\t\t\tindentNext = SC_FOLDLEVELWHITEFLAG | indentCurrentLevel;\n\n\t\tif (quote_start) {\n\t\t\t// Place fold point at start of triple quoted string\n\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t} else if (quote_continue || prevQuote) {\n\t\t\t// Add level to rest of lines in the string\n\t\t\tlev = lev + 1;\n\t\t}\n\n\t\t// Skip past any blank lines for next indent level info; we skip also\n\t\t// comments (all comments, not just those starting in column 0)\n\t\t// which effectively folds them into surrounding code rather\n\t\t// than screwing up folding.  If comments end file, use the min\n\t\t// comment indent as the level after\n\n\t\tint minCommentLevel = indentCurrentLevel;\n\t\twhile (!quote &&\n\t\t\t\t(lineNext < docLines) &&\n\t\t\t\t((indentNext & SC_FOLDLEVELWHITEFLAG) || (IsCommentLine(lineNext, styler)))) {\n\n\t\t\tif (IsCommentLine(lineNext, styler) && indentNext < minCommentLevel) {\n\t\t\t\tminCommentLevel = indentNext;\n\t\t\t}\n\n\t\t\tlineNext++;\n\t\t\tindentNext = styler.IndentAmount(lineNext, &spaceFlags, nullptr);\n\t\t}\n\n\t\tconst int levelAfterComments = ((lineNext < docLines) ? indentNext & SC_FOLDLEVELNUMBERMASK : minCommentLevel);\n\t\tconst int levelBeforeComments = std::max(indentCurrentLevel, levelAfterComments);\n\n\t\t// Now set all the indent levels on the lines we skipped\n\t\t// Do this from end to start.  Once we encounter one line\n\t\t// which is indented more than the line after the end of\n\t\t// the comment-block, use the level of the block before\n\n\t\tSci_Position skipLine = lineNext;\n\t\tint skipLevel = levelAfterComments;\n\n\t\twhile (--skipLine > lineCurrent) {\n\t\t\tconst int skipLineIndent = styler.IndentAmount(skipLine, &spaceFlags, nullptr);\n\n\t\t\tif (options.foldCompact) {\n\t\t\t\tif ((skipLineIndent & SC_FOLDLEVELNUMBERMASK) > levelAfterComments)\n\t\t\t\t\tskipLevel = levelBeforeComments;\n\n\t\t\t\tconst int whiteFlag = skipLineIndent & SC_FOLDLEVELWHITEFLAG;\n\n\t\t\t\tstyler.SetLevel(skipLine, skipLevel | whiteFlag);\n\t\t\t} else {\n\t\t\t\tif ((skipLineIndent & SC_FOLDLEVELNUMBERMASK) > levelAfterComments &&\n\t\t\t\t\t\t!(skipLineIndent & SC_FOLDLEVELWHITEFLAG) &&\n\t\t\t\t\t\t!IsCommentLine(skipLine, styler))\n\t\t\t\t\tskipLevel = levelBeforeComments;\n\n\t\t\t\tstyler.SetLevel(skipLine, skipLevel);\n\t\t\t}\n\t\t}\n\n\t\t// Set fold header on non-quote line\n\t\tif (!quote && !(indentCurrent & SC_FOLDLEVELWHITEFLAG)) {\n\t\t\tif ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext & SC_FOLDLEVELNUMBERMASK))\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t}\n\n\t\t// Keep track of triple quote state of previous line\n\t\tprevQuote = quote;\n\n\t\t// Set fold level for this line and move to next line\n\t\tstyler.SetLevel(lineCurrent, options.foldCompact ? lev : lev & ~SC_FOLDLEVELWHITEFLAG);\n\t\tindentCurrent = indentNext;\n\t\tlineCurrent = lineNext;\n\t}\n\n\t// NOTE: Cannot set level of last line here because indentCurrent doesn't have\n\t// header flag set; the loop above is crafted to take care of this case!\n\t//styler.SetLevel(lineCurrent, indentCurrent);\n}\n\nLexerModule lmGDScript(SCLEX_GDSCRIPT, LexerGDScript::LexerFactoryGDScript, \"gdscript\",\n\t\t     gdscriptWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexGui4Cli.cxx",
    "content": "// Scintilla source code edit control\n// Copyright 1998-2002 by Neil Hodgson <neilh@scintilla.org>\n// @file LexGui4Cli.cxx\n/*\nThis is the Lexer for Gui4Cli, included in SciLexer.dll\n- by d. Keletsekis, 2/10/2003\n\nTo add to SciLexer.dll:\n1. Add the values below to INCLUDE\\Scintilla.iface\n2. Run the scripts/HFacer.py script\n3. Run the scripts/LexGen.py script\n\nval SCE_GC_DEFAULT=0\nval SCE_GC_COMMENTLINE=1\nval SCE_GC_COMMENTBLOCK=2\nval SCE_GC_GLOBAL=3\nval SCE_GC_EVENT=4\nval SCE_GC_ATTRIBUTE=5\nval SCE_GC_CONTROL=6\nval SCE_GC_COMMAND=7\nval SCE_GC_STRING=8\nval SCE_GC_OPERATOR=9\n*/\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\n#define debug Platform::DebugPrintf\n\nstatic inline bool IsAWordChar(const int ch) {\n\treturn (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_' || ch =='\\\\');\n}\n\ninline bool isGCOperator(int ch)\n{\tif (isalnum(ch))\n\t\treturn false;\n\t// '.' left out as it is used to make up numbers\n\tif (ch == '*' || ch == '/' || ch == '-' || ch == '+' ||\n\t\t ch == '(' || ch == ')' || ch == '=' || ch == '%' ||\n\t\t ch == '[' || ch == ']' || ch == '<' || ch == '>' ||\n\t\t ch == ',' || ch == ';' || ch == ':')\n\t\treturn true;\n\treturn false;\n}\n\n#define isSpace(x)\t\t((x)==' ' || (x)=='\\t')\n#define isNL(x)\t\t\t((x)=='\\n' || (x)=='\\r')\n#define isSpaceOrNL(x)  (isSpace(x) || isNL(x))\n#define BUFFSIZE 500\n#define isFoldPoint(x)  ((styler.LevelAt(x) & SC_FOLDLEVELNUMBERMASK) == 1024)\n\nstatic void colorFirstWord(WordList *keywordlists[], Accessor &styler,\n\t\t\t\t\t\t\t\t\tStyleContext *sc, char *buff, Sci_Position length, Sci_Position)\n{\n\tSci_Position c = 0;\n\twhile (sc->More() && isSpaceOrNL(sc->ch))\n\t{\tsc->Forward();\n\t}\n\tstyler.ColourTo(sc->currentPos - 1, sc->state);\n\n\tif (!IsAWordChar(sc->ch)) // comment, marker, etc..\n\t\treturn;\n\n\twhile (sc->More() && !isSpaceOrNL(sc->ch) && (c < length-1) && !isGCOperator(sc->ch))\n\t{\tbuff[c] = static_cast<char>(sc->ch);\n\t\t++c; sc->Forward();\n\t}\n\tbuff[c] = '\\0';\n\tchar *p = buff;\n\twhile (*p)\t// capitalize..\n\t{\tif (islower(*p)) *p = static_cast<char>(toupper(*p));\n\t\t++p;\n\t}\n\n\tWordList &kGlobal\t\t= *keywordlists[0];\t// keyword lists set by the user\n\tWordList &kEvent\t\t= *keywordlists[1];\n\tWordList &kAttribute\t= *keywordlists[2];\n\tWordList &kControl\t= *keywordlists[3];\n\tWordList &kCommand\t= *keywordlists[4];\n\n\tint state = 0;\n\t// int level = styler.LevelAt(line) & SC_FOLDLEVELNUMBERMASK;\n\t// debug (\"line = %d, level = %d\", line, level);\n\n\tif\t     (kGlobal.InList(buff))\t\tstate = SCE_GC_GLOBAL;\n\telse if (kAttribute.InList(buff))\tstate = SCE_GC_ATTRIBUTE;\n\telse if (kControl.InList(buff))\t\tstate = SCE_GC_CONTROL;\n\telse if (kCommand.InList(buff))\t\tstate = SCE_GC_COMMAND;\n\telse if (kEvent.InList(buff))\t\t\tstate = SCE_GC_EVENT;\n\n\tif (state)\n\t{\tsc->ChangeState(state);\n\t\tstyler.ColourTo(sc->currentPos - 1, sc->state);\n\t\tsc->ChangeState(SCE_GC_DEFAULT);\n\t}\n\telse\n\t{\tsc->ChangeState(SCE_GC_DEFAULT);\n\t\tstyler.ColourTo(sc->currentPos - 1, sc->state);\n\t}\n}\n\n// Main colorizing function called by Scintilla\nstatic void\nColouriseGui4CliDoc(Sci_PositionU startPos, Sci_Position length, int initStyle,\n                    WordList *keywordlists[], Accessor &styler)\n{\n\tstyler.StartAt(startPos);\n\n\tSci_Position currentline = styler.GetLine(startPos);\n\tint quotestart = 0, oldstate;\n\tstyler.StartSegment(startPos);\n\tbool noforward;\n\tchar buff[BUFFSIZE+1];\t// buffer for command name\n\n\tStyleContext sc(startPos, length, initStyle, styler);\n\tbuff[0] = '\\0'; // cbuff = 0;\n\n\tif (sc.state != SCE_GC_COMMENTBLOCK) // colorize 1st word..\n\t\tcolorFirstWord(keywordlists, styler, &sc, buff, BUFFSIZE, currentline);\n\n\twhile (sc.More())\n\t{\tnoforward = 0;\n\n\t\tswitch (sc.ch)\n\t\t{\n\t\t\tcase '/':\n\t\t\t\tif (sc.state == SCE_GC_COMMENTBLOCK || sc.state == SCE_GC_STRING)\n\t\t\t\t\tbreak;\n\t\t\t\tif (sc.chNext == '/')\t// line comment\n\t\t\t\t{\tsc.SetState (SCE_GC_COMMENTLINE);\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\tstyler.ColourTo(sc.currentPos, sc.state);\n\t\t\t\t}\n\t\t\t\telse if (sc.chNext == '*')\t// block comment\n\t\t\t\t{\tsc.SetState(SCE_GC_COMMENTBLOCK);\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\tstyler.ColourTo(sc.currentPos, sc.state);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tstyler.ColourTo(sc.currentPos, sc.state);\n\t\t\t\tbreak;\n\n\t\t\tcase '*':\t// end of comment block, or operator..\n\t\t\t\tif (sc.state == SCE_GC_STRING)\n\t\t\t\t\tbreak;\n\t\t\t\tif (sc.state == SCE_GC_COMMENTBLOCK && sc.chNext == '/')\n\t\t\t\t{\tsc.Forward();\n\t\t\t\t\tstyler.ColourTo(sc.currentPos, sc.state);\n\t\t\t\t\tsc.ChangeState (SCE_GC_DEFAULT);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tstyler.ColourTo(sc.currentPos, sc.state);\n\t\t\t\tbreak;\n\n\t\t\tcase '\\'':\tcase '\\\"': // strings..\n\t\t\t\tif (sc.state == SCE_GC_COMMENTBLOCK || sc.state == SCE_GC_COMMENTLINE)\n\t\t\t\t\tbreak;\n\t\t\t\tif (sc.state == SCE_GC_STRING)\n\t\t\t\t{\tif (sc.ch == quotestart)\t// match same quote char..\n\t\t\t\t\t{\tstyler.ColourTo(sc.currentPos, sc.state);\n\t\t\t\t\t\tsc.ChangeState(SCE_GC_DEFAULT);\n\t\t\t\t\t\tquotestart = 0;\n\t\t\t\t}\t}\n\t\t\t\telse\n\t\t\t\t{\tstyler.ColourTo(sc.currentPos - 1, sc.state);\n\t\t\t\t\tsc.ChangeState(SCE_GC_STRING);\n\t\t\t\t\tquotestart = sc.ch;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase ';':\t// end of commandline character\n\t\t\t\tif (sc.state != SCE_GC_COMMENTBLOCK && sc.state != SCE_GC_COMMENTLINE &&\n\t\t\t\t\t sc.state != SCE_GC_STRING)\n\t\t\t\t{\n\t\t\t\t\tstyler.ColourTo(sc.currentPos - 1, sc.state);\n\t\t\t\t\tstyler.ColourTo(sc.currentPos, SCE_GC_OPERATOR);\n\t\t\t\t\tsc.ChangeState(SCE_GC_DEFAULT);\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\tcolorFirstWord(keywordlists, styler, &sc, buff, BUFFSIZE, currentline);\n\t\t\t\t\tnoforward = 1; // don't move forward - already positioned at next char..\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase '+': case '-': case '=':\tcase '!':\t// operators..\n\t\t\tcase '<': case '>': case '&': case '|': case '$':\n\t\t\t\tif (sc.state != SCE_GC_COMMENTBLOCK && sc.state != SCE_GC_COMMENTLINE &&\n\t\t\t\t\t sc.state != SCE_GC_STRING)\n\t\t\t\t{\n\t\t\t\t\tstyler.ColourTo(sc.currentPos - 1, sc.state);\n\t\t\t\t\tstyler.ColourTo(sc.currentPos, SCE_GC_OPERATOR);\n\t\t\t\t\tsc.ChangeState(SCE_GC_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase '\\\\':\t// escape - same as operator, but also mark in strings..\n\t\t\t\tif (sc.state != SCE_GC_COMMENTBLOCK && sc.state != SCE_GC_COMMENTLINE)\n\t\t\t\t{\n\t\t\t\t\toldstate = sc.state;\n\t\t\t\t\tstyler.ColourTo(sc.currentPos - 1, sc.state);\n\t\t\t\t\tsc.Forward(); // mark also the next char..\n\t\t\t\t\tstyler.ColourTo(sc.currentPos, SCE_GC_OPERATOR);\n\t\t\t\t\tsc.ChangeState(oldstate);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase '\\n': case '\\r':\n\t\t\t\t++currentline;\n\t\t\t\tif (sc.state == SCE_GC_COMMENTLINE)\n\t\t\t\t{\tstyler.ColourTo(sc.currentPos, sc.state);\n\t\t\t\t\tsc.ChangeState (SCE_GC_DEFAULT);\n\t\t\t\t}\n\t\t\t\telse if (sc.state != SCE_GC_COMMENTBLOCK)\n\t\t\t\t{\tcolorFirstWord(keywordlists, styler, &sc, buff, BUFFSIZE, currentline);\n\t\t\t\t\tnoforward = 1; // don't move forward - already positioned at next char..\n\t\t\t\t}\n\t\t\t\tbreak;\n\n//\t\t\tcase ' ': case '\\t':\n//\t\t\tdefault :\n\t\t}\n\n\t\tif (!noforward) sc.Forward();\n\n\t}\n\tsc.Complete();\n}\n\n// Main folding function called by Scintilla - (based on props (.ini) files function)\nstatic void FoldGui4Cli(Sci_PositionU startPos, Sci_Position length, int,\n\t\t\t\t\t\t\t\tWordList *[], Accessor &styler)\n{\n\tbool foldCompact = styler.GetPropertyInt(\"fold.compact\", 1) != 0;\n\n\tSci_PositionU endPos = startPos + length;\n\tint visibleChars = 0;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\n\tchar chNext = styler[startPos];\n\tint styleNext = styler.StyleAt(startPos);\n\tbool headerPoint = false;\n\n\tfor (Sci_PositionU i = startPos; i < endPos; i++)\n\t{\n\t\tchar ch = chNext;\n\t\tchNext = styler[i+1];\n\n\t\tint style = styleNext;\n\t\tstyleNext = styler.StyleAt(i + 1);\n\t\tbool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n\n\t\tif (style == SCE_GC_EVENT || style == SCE_GC_GLOBAL)\n\t\t{\theaderPoint = true; // fold at events and globals\n\t\t}\n\n\t\tif (atEOL)\n\t\t{\tint lev = SC_FOLDLEVELBASE+1;\n\n\t\t\tif (headerPoint)\n\t\t\t\tlev = SC_FOLDLEVELBASE;\n\n\t\t\tif (visibleChars == 0 && foldCompact)\n\t\t\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\n\t\t\tif (headerPoint)\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\n\t\t\tif (lev != styler.LevelAt(lineCurrent)) // set level, if not already correct\n\t\t\t{\tstyler.SetLevel(lineCurrent, lev);\n\t\t\t}\n\n\t\t\tlineCurrent++;\t\t// re-initialize our flags\n\t\t\tvisibleChars = 0;\n\t\t\theaderPoint = false;\n\t\t}\n\n\t\tif (!(isspacechar(ch))) // || (style == SCE_GC_COMMENTLINE) || (style != SCE_GC_COMMENTBLOCK)))\n\t\t\tvisibleChars++;\n\t}\n\n\tint lev = headerPoint ? SC_FOLDLEVELBASE : SC_FOLDLEVELBASE+1;\n\tint flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK;\n\tstyler.SetLevel(lineCurrent, lev | flagsNext);\n}\n\n// I have no idea what these are for.. probably accessible by some message.\nstatic const char * const gui4cliWordListDesc[] = {\n\t\"Globals\", \"Events\", \"Attributes\", \"Control\", \"Commands\",\n\t0\n};\n\n// Declare language & pass our function pointers to Scintilla\nLexerModule lmGui4Cli(SCLEX_GUI4CLI, ColouriseGui4CliDoc, \"gui4cli\", FoldGui4Cli, gui4cliWordListDesc);\n\n#undef debug\n\n"
  },
  {
    "path": "lexilla/lexers/LexHTML.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexHTML.cxx\n ** Lexer for HTML.\n **/\n// Copyright 1998-2005 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <cstdlib>\n#include <cassert>\n#include <cstring>\n#include <cctype>\n#include <cstdio>\n#include <cstdarg>\n\n#include <string>\n#include <string_view>\n#include <vector>\n#include <map>\n#include <set>\n#include <functional>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n#include \"InList.h\"\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n#include \"OptionSet.h\"\n#include \"SubStyles.h\"\n#include \"DefaultLexer.h\"\n\nusing namespace Scintilla;\nusing namespace Lexilla;\n\nnamespace {\n\n#define SCE_HA_JS (SCE_HJA_START - SCE_HJ_START)\n#define SCE_HA_VBS (SCE_HBA_START - SCE_HB_START)\n#define SCE_HA_PYTHON (SCE_HPA_START - SCE_HP_START)\n\nenum script_type { eScriptNone = 0, eScriptJS, eScriptVBS, eScriptPython, eScriptPHP, eScriptXML, eScriptSGML, eScriptSGMLblock, eScriptComment };\nenum script_mode { eHtml = 0, eNonHtmlScript, eNonHtmlPreProc, eNonHtmlScriptPreProc };\n\nconstexpr bool IsAWordChar(int ch) noexcept {\n\treturn IsAlphaNumeric(ch) || ch == '.' || ch == '_';\n}\n\nconstexpr bool IsAWordStart(int ch) noexcept {\n\treturn IsAlphaNumeric(ch) || ch == '_';\n}\n\nbool IsOperator(int ch) noexcept {\n\tif (IsAlphaNumeric(ch))\n\t\treturn false;\n\t// '.' left out as it is used to make up numbers\n\tif (ch == '%' || ch == '^' || ch == '&' || ch == '*' ||\n\t        ch == '(' || ch == ')' || ch == '-' || ch == '+' ||\n\t        ch == '=' || ch == '|' || ch == '{' || ch == '}' ||\n\t        ch == '[' || ch == ']' || ch == ':' || ch == ';' ||\n\t        ch == '<' || ch == '>' || ch == ',' || ch == '/' ||\n\t        ch == '?' || ch == '!' || ch == '.' || ch == '~')\n\t\treturn true;\n\treturn false;\n}\n\nunsigned char SafeGetUnsignedCharAt(Accessor &styler, Sci_Position position, char chDefault = ' ') {\n\treturn styler.SafeGetCharAt(position, chDefault);\n}\n\n// Put an upper limit to bound time taken for unexpected text.\nconstexpr Sci_PositionU maxLengthCheck = 200;\n\nstd::string GetNextWord(Accessor &styler, Sci_PositionU start) {\n\tstd::string ret;\n\tfor (Sci_PositionU i = 0; i < maxLengthCheck; i++) {\n\t\tconst char ch = styler.SafeGetCharAt(start + i);\n\t\tif ((i == 0) && !IsAWordStart(ch))\n\t\t\tbreak;\n\t\tif ((i > 0) && !IsAWordChar(ch))\n\t\t\tbreak;\n\t\tret.push_back(ch);\n\t}\n\treturn ret;\n}\n\nbool Contains(const std::string &s, std::string_view search) noexcept {\n\treturn s.find(search) != std::string::npos;\n}\n\nscript_type segIsScriptingIndicator(Accessor &styler, Sci_PositionU start, Sci_PositionU end, script_type prevValue) {\n\tconst std::string s = styler.GetRangeLowered(start, end+1);\n\tif (Contains(s, \"vbs\"))\n\t\treturn eScriptVBS;\n\tif (Contains(s, \"pyth\"))\n\t\treturn eScriptPython;\n\t// https://html.spec.whatwg.org/multipage/scripting.html#attr-script-type\n\t// https://mimesniff.spec.whatwg.org/#javascript-mime-type\n\tif (Contains(s, \"javas\") || Contains(s, \"ecmas\") || Contains(s, \"module\") || Contains(s, \"jscr\"))\n\t\treturn eScriptJS;\n\tif (Contains(s, \"php\"))\n\t\treturn eScriptPHP;\n\tif (Contains(s, \"xml\")) {\n\t\tconst size_t xml = s.find(\"xml\");\n\t\tif (xml != std::string::npos) {\n\t\t\tfor (size_t t = 0; t < xml; t++) {\n\t\t\t\tif (!IsASpace(s[t])) {\n\t\t\t\t\treturn prevValue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn eScriptXML;\n\t}\n\n\treturn prevValue;\n}\n\nint PrintScriptingIndicatorOffset(Accessor &styler, Sci_PositionU start, Sci_PositionU end) {\n\tint iResult = 0;\n\tconst std::string s = styler.GetRangeLowered(start, end+1);\n\tif (0 == strncmp(s.c_str(), \"php\", 3)) {\n\t\tiResult = 3;\n\t}\n\treturn iResult;\n}\n\nscript_type ScriptOfState(int state) noexcept {\n\tif ((state >= SCE_HP_START) && (state <= SCE_HP_IDENTIFIER)) {\n\t\treturn eScriptPython;\n\t} else if ((state >= SCE_HB_START && state <= SCE_HB_STRINGEOL) || (state == SCE_H_ASPAT || state == SCE_H_XCCOMMENT)) {\n\t\treturn eScriptVBS;\n\t} else if ((state >= SCE_HJ_START) && (state <= SCE_HJ_REGEX)) {\n\t\treturn eScriptJS;\n\t} else if ((state >= SCE_HPHP_DEFAULT && state <= SCE_HPHP_COMMENTLINE) || (state == SCE_HPHP_COMPLEX_VARIABLE)) {\n\t\treturn eScriptPHP;\n\t} else if ((state >= SCE_H_SGML_DEFAULT) && (state < SCE_H_SGML_BLOCK_DEFAULT)) {\n\t\treturn eScriptSGML;\n\t} else if (state == SCE_H_SGML_BLOCK_DEFAULT) {\n\t\treturn eScriptSGMLblock;\n\t} else {\n\t\treturn eScriptNone;\n\t}\n}\n\nconstexpr int statePrintForState(int state, script_mode inScriptType) noexcept {\n\tint StateToPrint = state;\n\n\tif (state >= SCE_HJ_START) {\n\t\tif ((state >= SCE_HP_START) && (state <= SCE_HP_IDENTIFIER)) {\n\t\t\tStateToPrint = state + ((inScriptType == eNonHtmlScript) ? 0 : SCE_HA_PYTHON);\n\t\t} else if ((state >= SCE_HB_START) && (state <= SCE_HB_STRINGEOL)) {\n\t\t\tStateToPrint = state + ((inScriptType == eNonHtmlScript) ? 0 : SCE_HA_VBS);\n\t\t} else if ((state >= SCE_HJ_START) && (state <= SCE_HJ_REGEX)) {\n\t\t\tStateToPrint = state + ((inScriptType == eNonHtmlScript) ? 0 : SCE_HA_JS);\n\t\t}\n\t}\n\n\treturn StateToPrint;\n}\n\nconstexpr int stateForPrintState(int StateToPrint) noexcept {\n\tint state = StateToPrint;\n\n\tif ((StateToPrint >= SCE_HPA_START) && (StateToPrint <= SCE_HPA_IDENTIFIER)) {\n\t\tstate = StateToPrint - SCE_HA_PYTHON;\n\t} else if ((StateToPrint >= SCE_HBA_START) && (StateToPrint <= SCE_HBA_STRINGEOL)) {\n\t\tstate = StateToPrint - SCE_HA_VBS;\n\t} else if ((StateToPrint >= SCE_HJA_START) && (StateToPrint <= SCE_HJA_REGEX)) {\n\t\tstate = StateToPrint - SCE_HA_JS;\n\t}\n\n\treturn state;\n}\n\nconstexpr bool IsNumberChar(char ch) noexcept {\n\treturn IsADigit(ch) || ch == '.' || ch == '-' || ch == '#';\n}\n\nconstexpr bool isStringState(int state) noexcept {\n\tbool bResult = false;\n\n\tswitch (state) {\n\tcase SCE_HJ_DOUBLESTRING:\n\tcase SCE_HJ_SINGLESTRING:\n\tcase SCE_HJA_DOUBLESTRING:\n\tcase SCE_HJA_SINGLESTRING:\n\tcase SCE_HB_STRING:\n\tcase SCE_HBA_STRING:\n\tcase SCE_HP_STRING:\n\tcase SCE_HP_CHARACTER:\n\tcase SCE_HP_TRIPLE:\n\tcase SCE_HP_TRIPLEDOUBLE:\n\tcase SCE_HPA_STRING:\n\tcase SCE_HPA_CHARACTER:\n\tcase SCE_HPA_TRIPLE:\n\tcase SCE_HPA_TRIPLEDOUBLE:\n\tcase SCE_HPHP_HSTRING:\n\tcase SCE_HPHP_SIMPLESTRING:\n\tcase SCE_HPHP_HSTRING_VARIABLE:\n\tcase SCE_HPHP_COMPLEX_VARIABLE:\n\t\tbResult = true;\n\t\tbreak;\n\tdefault :\n\t\tbreak;\n\t}\n\treturn bResult;\n}\n\nconstexpr bool stateAllowsTermination(int state) noexcept {\n\tbool allowTermination = !isStringState(state);\n\tif (allowTermination) {\n\t\tswitch (state) {\n\t\tcase SCE_HPHP_COMMENT:\n\t\tcase SCE_HP_COMMENTLINE:\n\t\tcase SCE_HPA_COMMENTLINE:\n\t\t\tallowTermination = false;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn allowTermination;\n}\n\nbool isPreProcessorEndTag(int state, int ch) noexcept {\n\tconst script_type type = ScriptOfState(state);\n\tif (state == SCE_H_ASP || AnyOf(type, eScriptVBS, eScriptJS, eScriptPython)) {\n\t\treturn ch == '%';\n\t}\n\tif (type == eScriptPHP) {\n\t\treturn ch == '%' || ch == '?';\n\t}\n\treturn ch == '?';\n}\n\n// not really well done, since it's only comments that should lex the %> and <%\nconstexpr bool isCommentASPState(int state) noexcept {\n\tbool bResult = false;\n\n\tswitch (state) {\n\tcase SCE_HJ_COMMENT:\n\tcase SCE_HJ_COMMENTLINE:\n\tcase SCE_HJ_COMMENTDOC:\n\tcase SCE_HB_COMMENTLINE:\n\tcase SCE_HP_COMMENTLINE:\n\tcase SCE_HPHP_COMMENT:\n\tcase SCE_HPHP_COMMENTLINE:\n\t\tbResult = true;\n\t\tbreak;\n\tdefault :\n\t\tbreak;\n\t}\n\treturn bResult;\n}\n\nbool classifyAttribHTML(script_mode inScriptType, Sci_PositionU start, Sci_PositionU end, const WordList &keywords, const WordClassifier &classifier, Accessor &styler, const std::string &tag) {\n\tint chAttr = SCE_H_ATTRIBUTEUNKNOWN;\n\tbool isLanguageType = false;\n\tif (IsNumberChar(styler[start])) {\n\t\tchAttr = SCE_H_NUMBER;\n\t} else {\n\t\tconst std::string s = styler.GetRangeLowered(start, end+1);\n\t\tif (keywords.InList(s)) {\n\t\t\tchAttr = SCE_H_ATTRIBUTE;\n\t\t} else {\n\t\t\tint subStyle = classifier.ValueFor(s);\n\t\t\tif (subStyle < 0) {\n\t\t\t\t// Didn't find attribute, check for tag.attribute\n\t\t\t\tconst std::string tagAttribute = tag + \".\" + s;\n\t\t\t\tsubStyle = classifier.ValueFor(tagAttribute);\n\t\t\t}\n\t\t\tif (subStyle >= 0) {\n\t\t\t\tchAttr = subStyle;\n\t\t\t}\n\t\t}\n\n\t\tif (inScriptType == eNonHtmlScript) {\n\t\t\t// see https://html.spec.whatwg.org/multipage/scripting.html#script-processing-model\n\t\t\tif (s == \"type\" || s == \"language\") {\n\t\t\t\tisLanguageType = true;\n\t\t\t}\n\t\t}\n\t}\n\tif ((chAttr == SCE_H_ATTRIBUTEUNKNOWN) && !keywords)\n\t\t// No keywords -> all are known\n\t\tchAttr = SCE_H_ATTRIBUTE;\n\tstyler.ColourTo(end, chAttr);\n\treturn isLanguageType;\n}\n\n// https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-core-concepts\nbool isHTMLCustomElement(const std::string &tag) noexcept {\n\t// check valid HTML custom element name: starts with an ASCII lower alpha and contains hyphen.\n\t// IsUpperOrLowerCase() is used for `html.tags.case.sensitive=1`.\n\tif (tag.length() < 2 || !IsUpperOrLowerCase(tag[0])) {\n\t\treturn false;\n\t}\n\tif (tag.find('-') == std::string::npos) {\n\t\treturn false;\n\t}\n\treturn true;\n}\n\nint classifyTagHTML(Sci_PositionU start, Sci_PositionU end,\n                    const WordList &keywords, const WordClassifier &classifier, Accessor &styler, bool &tagDontFold,\n                    bool caseSensitive, bool isXml, bool allowScripts,\n                    const std::set<std::string> &nonFoldingTags,\n                    std::string &tag) {\n\ttag.clear();\n\t// Copy after the '<' and stop before ' '\n\tfor (Sci_PositionU cPos = start; cPos <= end; cPos++) {\n\t\tconst char ch = styler[cPos];\n\t\tif (IsASpace(ch)) {\n\t\t\tbreak;\n\t\t}\n\t\tif ((ch != '<') && (ch != '/')) {\n\t\t\ttag.push_back(caseSensitive ? ch : MakeLowerCase(ch));\n\t\t}\n\t}\n\t// if the current language is XML, I can fold any tag\n\t// if the current language is HTML, I don't want to fold certain tags (input, meta, etc.)\n\t//...to find it in the list of no-container-tags\n\ttagDontFold = (!isXml) && (nonFoldingTags.count(tag) > 0);\n\t// No keywords -> all are known\n\tint chAttr = SCE_H_TAGUNKNOWN;\n\tif (!tag.empty() && (tag[0] == '!')) {\n\t\tchAttr = SCE_H_SGML_DEFAULT;\n\t} else if (!keywords || keywords.InList(tag)) {\n\t\tchAttr = SCE_H_TAG;\n\t} else if (!isXml && isHTMLCustomElement(tag)) {\n\t\tchAttr = SCE_H_TAG;\n\t} else {\n\t\tconst int subStyle = classifier.ValueFor(tag);\n\t\tif (subStyle >= 0) {\n\t\t\tchAttr = subStyle;\n\t\t}\n\t}\n\tif (chAttr != SCE_H_TAGUNKNOWN) {\n\t\tstyler.ColourTo(end, chAttr);\n\t}\n\tif (chAttr == SCE_H_TAG) {\n\t\tif (allowScripts && (tag == \"script\")) {\n\t\t\t// check to see if this is a self-closing tag by sniffing ahead\n\t\t\tbool isSelfClose = false;\n\t\t\tfor (Sci_PositionU cPos = end; cPos <= end + maxLengthCheck; cPos++) {\n\t\t\t\tconst char ch = styler.SafeGetCharAt(cPos, '\\0');\n\t\t\t\tif (ch == '\\0' || ch == '>')\n\t\t\t\t\tbreak;\n\t\t\t\tif (ch == '/' && styler.SafeGetCharAt(cPos + 1, '\\0') == '>') {\n\t\t\t\t\tisSelfClose = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// do not enter a script state if the tag self-closed\n\t\t\tif (!isSelfClose)\n\t\t\t\tchAttr = SCE_H_SCRIPT;\n\t\t} else if (!isXml && (tag == \"comment\")) {\n\t\t\tchAttr = SCE_H_COMMENT;\n\t\t}\n\t}\n\treturn chAttr;\n}\n\nvoid classifyWordHTJS(Sci_PositionU start, Sci_PositionU end,\n                             const WordList &keywords, const WordClassifier &classifier, const WordClassifier &classifierServer, Accessor &styler, script_mode inScriptType) {\n\tconst std::string s = styler.GetRange(start, end+1);\n\tint chAttr = SCE_HJ_WORD;\n\tconst bool wordIsNumber = IsADigit(s[0]) || ((s[0] == '.') && IsADigit(s[1]));\n\tif (wordIsNumber) {\n\t\tchAttr = SCE_HJ_NUMBER;\n\t} else if (keywords.InList(s)) {\n\t\tchAttr = SCE_HJ_KEYWORD;\n\t} else {\n\t\tconst int subStyle = (inScriptType == eNonHtmlScript) ? classifier.ValueFor(s) : classifierServer.ValueFor(s);\n\t\tif (subStyle >= 0) {\n\t\t\tchAttr = subStyle;\n\t\t}\n\t}\n\n\tstyler.ColourTo(end, statePrintForState(chAttr, inScriptType));\n}\n\nint classifyWordHTVB(Sci_PositionU start, Sci_PositionU end, const WordList &keywords, const WordClassifier &classifier, Accessor &styler, script_mode inScriptType) {\n\tint chAttr = SCE_HB_IDENTIFIER;\n\tconst bool wordIsNumber = IsADigit(styler[start]) || (styler[start] == '.');\n\tif (wordIsNumber) {\n\t\tchAttr = SCE_HB_NUMBER;\n\t} else {\n\t\tconst std::string s = styler.GetRangeLowered(start, end+1);\n\t\tif (keywords.InList(s)) {\n\t\t\tchAttr = SCE_HB_WORD;\n\t\t\tif (s == \"rem\")\n\t\t\t\tchAttr = SCE_HB_COMMENTLINE;\n\t\t} else {\n\t\t\tconst int subStyle = classifier.ValueFor(s);\n\t\t\tif (subStyle >= 0) {\n\t\t\t\tchAttr = subStyle;\n\t\t\t}\n\t\t}\n\t}\n\tstyler.ColourTo(end, statePrintForState(chAttr, inScriptType));\n\tif (chAttr == SCE_HB_COMMENTLINE)\n\t\treturn SCE_HB_COMMENTLINE;\n\telse\n\t\treturn SCE_HB_DEFAULT;\n}\n\nvoid classifyWordHTPy(Sci_PositionU start, Sci_PositionU end, const WordList &keywords, const WordClassifier &classifier, Accessor &styler, std::string &prevWord, script_mode inScriptType, bool isMako) {\n\tconst bool wordIsNumber = IsADigit(styler[start]);\n\tconst std::string s = styler.GetRange(start, end + 1);\n\tint chAttr = SCE_HP_IDENTIFIER;\n\tif (prevWord == \"class\")\n\t\tchAttr = SCE_HP_CLASSNAME;\n\telse if (prevWord == \"def\")\n\t\tchAttr = SCE_HP_DEFNAME;\n\telse if (wordIsNumber)\n\t\tchAttr = SCE_HP_NUMBER;\n\telse if (keywords.InList(s))\n\t\tchAttr = SCE_HP_WORD;\n\telse if (isMako && (s == \"block\"))\n\t\tchAttr = SCE_HP_WORD;\n\telse {\n\t\tconst int subStyle = classifier.ValueFor(s);\n\t\tif (subStyle >= 0) {\n\t\t\tchAttr = subStyle;\n\t\t}\n\t}\n\tstyler.ColourTo(end, statePrintForState(chAttr, inScriptType));\n\tprevWord = s;\n}\n\n// Update the word colour to default or keyword\n// Called when in a PHP word\nvoid classifyWordHTPHP(Sci_PositionU start, Sci_PositionU end, const WordList &keywords, const WordClassifier &classifier, Accessor &styler) {\n\tint chAttr = SCE_HPHP_DEFAULT;\n\tconst bool wordIsNumber = IsADigit(styler[start]) || (styler[start] == '.' && start+1 <= end && IsADigit(styler[start+1]));\n\tif (wordIsNumber) {\n\t\tchAttr = SCE_HPHP_NUMBER;\n\t} else {\n\t\tconst std::string s = styler.GetRangeLowered(start, end+1);;\n\t\tif (keywords.InList(s)) {\n\t\t\tchAttr = SCE_HPHP_WORD;\n\t\t} else {\n\t\t\tconst int subStyle = classifier.ValueFor(s);\n\t\t\tif (subStyle >= 0) {\n\t\t\t\tchAttr = subStyle;\n\t\t\t}\n\t\t}\n\t}\n\tstyler.ColourTo(end, chAttr);\n}\n\nbool isWordHSGML(Sci_PositionU start, Sci_PositionU end, const WordList &keywords, Accessor &styler) {\n\tconst std::string s = styler.GetRange(start, end + 1);\n\treturn keywords.InList(s);\n}\n\nbool isWordCdata(Sci_PositionU start, Sci_PositionU end, Accessor &styler) {\n\tconst std::string s = styler.GetRange(start, end + 1);\n\treturn s == \"[CDATA[\";\n}\n\n// Return the first state to reach when entering a scripting language\nconstexpr int StateForScript(script_type scriptLanguage) noexcept {\n\tint Result = SCE_HJ_START;\n\tswitch (scriptLanguage) {\n\tcase eScriptVBS:\n\t\tResult = SCE_HB_START;\n\t\tbreak;\n\tcase eScriptPython:\n\t\tResult = SCE_HP_START;\n\t\tbreak;\n\tcase eScriptPHP:\n\t\tResult = SCE_HPHP_DEFAULT;\n\t\tbreak;\n\tcase eScriptXML:\n\t\tResult = SCE_H_TAGUNKNOWN;\n\t\tbreak;\n\tcase eScriptSGML:\n\t\tResult = SCE_H_SGML_DEFAULT;\n\t\tbreak;\n\tcase eScriptComment:\n\t\tResult = SCE_H_COMMENT;\n\t\tbreak;\n\tdefault :\n\t\tbreak;\n\t}\n\treturn Result;\n}\n\nconstexpr bool issgmlwordchar(int ch) noexcept {\n\treturn !IsASCII(ch) ||\n\t\t(IsAlphaNumeric(ch) || ch == '.' || ch == '_' || ch == ':' || ch == '!' || ch == '#' || ch == '[');\n}\n\nconstexpr bool IsPhpWordStart(int ch) noexcept {\n\treturn (IsUpperOrLowerCase(ch) || (ch == '_')) || (ch >= 0x7f);\n}\n\nconstexpr bool IsPhpWordChar(int ch) noexcept {\n\treturn IsADigit(ch) || IsPhpWordStart(ch);\n}\n\nconstexpr bool InTagState(int state) noexcept {\n\treturn AnyOf(state, SCE_H_TAG, SCE_H_TAGUNKNOWN, SCE_H_SCRIPT,\n\t       SCE_H_ATTRIBUTE, SCE_H_ATTRIBUTEUNKNOWN,\n\t       SCE_H_NUMBER, SCE_H_OTHER,\n\t       SCE_H_DOUBLESTRING, SCE_H_SINGLESTRING);\n}\n\nconstexpr bool IsCommentState(const int state) noexcept {\n\treturn state == SCE_H_COMMENT || state == SCE_H_SGML_COMMENT;\n}\n\nconstexpr bool IsScriptCommentState(const int state) noexcept {\n\treturn AnyOf(state, SCE_HJ_COMMENT, SCE_HJ_COMMENTLINE, SCE_HJA_COMMENT,\n\t\t   SCE_HJA_COMMENTLINE, SCE_HB_COMMENTLINE, SCE_HBA_COMMENTLINE);\n}\n\nconstexpr bool isLineEnd(int ch) noexcept {\n\treturn ch == '\\r' || ch == '\\n';\n}\n\nbool isMakoBlockEnd(const int ch, const int chNext, const std::string &blockType) noexcept {\n\tif (blockType.empty()) {\n\t\treturn ((ch == '%') && (chNext == '>'));\n\t} else if (InList(blockType, { \"inherit\", \"namespace\", \"include\", \"page\" })) {\n\t\treturn ((ch == '/') && (chNext == '>'));\n\t} else if (blockType == \"%\") {\n\t\tif (ch == '/' && isLineEnd(chNext))\n\t\t\treturn true;\n\t\telse\n\t\t\treturn isLineEnd(ch);\n\t} else if (blockType == \"{\") {\n\t\treturn ch == '}';\n\t} else {\n\t\treturn (ch == '>');\n\t}\n}\n\nbool isDjangoBlockEnd(const int ch, const int chNext, const std::string &blockType) noexcept {\n\tif (blockType.empty()) {\n\t\treturn false;\n\t} else if (blockType == \"%\") {\n\t\treturn ((ch == '%') && (chNext == '}'));\n\t} else if (blockType == \"{\") {\n\t\treturn ((ch == '}') && (chNext == '}'));\n\t} else {\n\t\treturn false;\n\t}\n}\n\nclass PhpNumberState {\n\tenum NumberBase { BASE_10 = 0, BASE_2, BASE_8, BASE_16 };\n\tstatic constexpr const char *const digitList[] = { \"_0123456789\", \"_01\", \"_01234567\", \"_0123456789abcdefABCDEF\" };\n\n\tNumberBase base = BASE_10;\n\tbool decimalPart = false;\n\tbool exponentPart = false;\n\tbool invalid = false;\n\tbool finished = false;\n\n\tbool leadingZero = false;\n\tbool invalidBase8 = false;\n\n\tbool betweenDigits = false;\n\tbool decimalChar = false;\n\tbool exponentChar = false;\n\npublic:\n\t[[nodiscard]] bool isInvalid() const noexcept { return invalid; }\n\t[[nodiscard]] bool isFinished() const noexcept { return finished; }\n\n\tbool init(int ch, int chPlus1, int chPlus2) noexcept {\n\t\tbase = BASE_10;\n\t\tdecimalPart = false;\n\t\texponentPart = false;\n\t\tinvalid = false;\n\t\tfinished = false;\n\n\t\tleadingZero = false;\n\t\tinvalidBase8 = false;\n\n\t\tbetweenDigits = false;\n\t\tdecimalChar = false;\n\t\texponentChar = false;\n\n\t\tif (ch == '.' && strchr(digitList[BASE_10] + !betweenDigits, chPlus1) != nullptr) {\n\t\t\tdecimalPart = true;\n\t\t\tbetweenDigits = true;\n\t\t} else if (ch == '0' && (chPlus1 == 'b' || chPlus1 == 'B')) {\n\t\t\tbase = BASE_2;\n\t\t} else if (ch == '0' && (chPlus1 == 'o' || chPlus1 == 'O')) {\n\t\t\tbase = BASE_8;\n\t\t} else if (ch == '0' && (chPlus1 == 'x' || chPlus1 == 'X')) {\n\t\t\tbase = BASE_16;\n\t\t} else if (strchr(digitList[BASE_10] + !betweenDigits, ch) != nullptr) {\n\t\t\tleadingZero = ch == '0';\n\t\t\tbetweenDigits = true;\n\t\t\tcheck(chPlus1, chPlus2);\n\t\t\tif (finished && leadingZero) {\n\t\t\t\t// single zero should be base 10\n\t\t\t\tbase = BASE_10;\n\t\t\t}\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}\n\n\tbool check(int ch, int chPlus1) noexcept {\n\t\tif (strchr(digitList[base] + !betweenDigits, ch) != nullptr) {\n\t\t\tif (leadingZero) {\n\t\t\t\tinvalidBase8 = invalidBase8 || strchr(digitList[BASE_8] + !betweenDigits, ch) == nullptr;\n\t\t\t}\n\n\t\t\tbetweenDigits = ch != '_';\n\t\t\tdecimalChar = false;\n\t\t\texponentChar = false;\n\t\t} else if (ch == '_') {\n\t\t\tinvalid = true;\n\n\t\t\tbetweenDigits = false;\n\t\t\tdecimalChar = false;\n\t\t\t// exponentChar is unchanged\n\t\t} else if (base == BASE_10 && ch == '.' && (\n\t\t\t\t\t!(decimalPart || exponentPart) || strchr(digitList[BASE_10] + !betweenDigits, chPlus1) != nullptr)\n\t\t\t  ) {\n\t\t\tinvalid = invalid || !betweenDigits || decimalPart || exponentPart;\n\t\t\tdecimalPart = true;\n\n\t\t\tbetweenDigits = false;\n\t\t\tdecimalChar = true;\n\t\t\texponentChar = false;\n\t\t} else if (base == BASE_10 && (ch == 'e' || ch == 'E')) {\n\t\t\tinvalid = invalid || !(betweenDigits || decimalChar) || exponentPart;\n\t\t\texponentPart = true;\n\n\t\t\tbetweenDigits = false;\n\t\t\tdecimalChar = false;\n\t\t\texponentChar = true;\n\t\t} else if (base == BASE_10 && (ch == '-' || ch == '+') && exponentChar) {\n\t\t\tinvalid = invalid || strchr(digitList[BASE_10] + !betweenDigits, chPlus1) == nullptr;\n\n\t\t\tbetweenDigits = false;\n\t\t\tdecimalChar = false;\n\t\t\t// exponentChar is unchanged\n\t\t} else if (IsPhpWordChar(ch)) {\n\t\t\tinvalid = true;\n\n\t\t\tbetweenDigits = false;\n\t\t\tdecimalChar = false;\n\t\t\texponentChar = false;\n\t\t} else {\n\t\t\tinvalid = invalid || !(betweenDigits || decimalChar);\n\t\t\tfinished = true;\n\t\t\tif (base == BASE_10 && leadingZero && !decimalPart && !exponentPart) {\n\t\t\t\tbase = BASE_8;\n\t\t\t\tinvalid = invalid || invalidBase8;\n\t\t\t}\n\t\t}\n\t\treturn finished;\n\t}\n};\n\nconstexpr bool isPHPStringState(int state) noexcept {\n\treturn\n\t    (state == SCE_HPHP_HSTRING) ||\n\t    (state == SCE_HPHP_SIMPLESTRING) ||\n\t    (state == SCE_HPHP_HSTRING_VARIABLE) ||\n\t    (state == SCE_HPHP_COMPLEX_VARIABLE);\n}\n\nSci_Position FindPhpStringDelimiter(std::string &phpStringDelimiter, Sci_Position i, const Sci_Position lengthDoc, Accessor &styler, bool &isSimpleString) {\n\tconst Sci_Position beginning = i - 1;\n\tbool isQuoted = false;\n\n\twhile (i < lengthDoc && (styler[i] == ' ' || styler[i] == '\\t'))\n\t\ti++;\n\tchar ch = styler.SafeGetCharAt(i);\n\tconst char chNext = styler.SafeGetCharAt(i + 1);\n\tphpStringDelimiter.clear();\n\tif (!IsPhpWordStart(ch)) {\n\t\tif ((ch == '\\'' || ch == '\\\"') && IsPhpWordStart(chNext)) {\n\t\t\tisSimpleString = ch == '\\'';\n\t\t\tisQuoted = true;\n\t\t\ti++;\n\t\t\tch = chNext;\n\t\t} else {\n\t\t\treturn beginning;\n\t\t}\n\t}\n\tphpStringDelimiter.push_back(ch);\n\ti++;\n\tSci_Position j = i;\n\tfor (; j < lengthDoc && !isLineEnd(styler[j]); j++) {\n\t\tif (!IsPhpWordChar(styler[j]) && isQuoted) {\n\t\t\tif (((isSimpleString && styler[j] == '\\'') || (!isSimpleString && styler[j] == '\\\"')) && isLineEnd(styler.SafeGetCharAt(j + 1))) {\n\t\t\t\tisQuoted = false;\n\t\t\t\tj++;\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tphpStringDelimiter.clear();\n\t\t\t\treturn beginning;\n\t\t\t}\n\t\t}\n\t\tphpStringDelimiter.push_back(styler[j]);\n\t}\n\tif (isQuoted) {\n\t\tphpStringDelimiter.clear();\n\t\treturn beginning;\n\t}\n\treturn j - 1;\n}\n\n// Options used for LexerHTML\nstruct OptionsHTML {\n\tint aspDefaultLanguage = eScriptJS;\n\tbool caseSensitive = false;\n\tbool allowScripts = true;\n\tbool isMako = false;\n\tbool isDjango = false;\n\tbool fold = false;\n\tbool foldHTML = false;\n\tbool foldHTMLPreprocessor = true;\n\tbool foldCompact = true;\n\tbool foldComment = false;\n\tbool foldHeredoc = false;\n\tbool foldXmlAtTagOpen = false;\n};\n\nconst char * const htmlWordListDesc[] = {\n\t\"HTML elements and attributes\",\n\t\"JavaScript keywords\",\n\t\"VBScript keywords\",\n\t\"Python keywords\",\n\t\"PHP keywords\",\n\t\"SGML and DTD keywords\",\n\tnullptr,\n};\n\nconst char * const phpscriptWordListDesc[] = {\n\t\"\", //Unused\n\t\"\", //Unused\n\t\"\", //Unused\n\t\"\", //Unused\n\t\"PHP keywords\",\n\t\"\", //Unused\n\tnullptr,\n};\n\nstruct OptionSetHTML : public OptionSet<OptionsHTML> {\n\texplicit OptionSetHTML(bool isPHPScript_) {\n\n\t\tDefineProperty(\"asp.default.language\", &OptionsHTML::aspDefaultLanguage,\n\t\t\t\"Script in ASP code is initially assumed to be in JavaScript. \"\n\t\t\t\"To change this to VBScript set asp.default.language to 2. Python is 3.\");\n\n\t\tDefineProperty(\"html.tags.case.sensitive\", &OptionsHTML::caseSensitive,\n\t\t\t\"For XML and HTML, setting this property to 1 will make tags match in a case \"\n\t\t\t\"sensitive way which is the expected behaviour for XML and XHTML.\");\n\n\t\tDefineProperty(\"lexer.xml.allow.scripts\", &OptionsHTML::allowScripts,\n\t\t\t\"Set to 0 to disable scripts in XML.\");\n\n\t\tDefineProperty(\"lexer.html.mako\", &OptionsHTML::isMako,\n\t\t\t\"Set to 1 to enable the mako template language.\");\n\n\t\tDefineProperty(\"lexer.html.django\", &OptionsHTML::isDjango,\n\t\t\t\"Set to 1 to enable the django template language.\");\n\n\t\tDefineProperty(\"fold\", &OptionsHTML::fold);\n\n\t\tDefineProperty(\"fold.html\", &OptionsHTML::foldHTML,\n\t\t\t\"Folding is turned on or off for HTML and XML files with this option. \"\n\t\t\t\"The fold option must also be on for folding to occur.\");\n\n\t\tDefineProperty(\"fold.html.preprocessor\", &OptionsHTML::foldHTMLPreprocessor,\n\t\t\t\"Folding is turned on or off for scripts embedded in HTML files with this option. \"\n\t\t\t\"The default is on.\");\n\n\t\tDefineProperty(\"fold.compact\", &OptionsHTML::foldCompact);\n\n\t\tDefineProperty(\"fold.hypertext.comment\", &OptionsHTML::foldComment,\n\t\t\t\"Allow folding for comments in scripts embedded in HTML. \"\n\t\t\t\"The default is off.\");\n\n\t\tDefineProperty(\"fold.hypertext.heredoc\", &OptionsHTML::foldHeredoc,\n\t\t\t\"Allow folding for heredocs in scripts embedded in HTML. \"\n\t\t\t\"The default is off.\");\n\n\t\tDefineProperty(\"fold.xml.at.tag.open\", &OptionsHTML::foldXmlAtTagOpen,\n\t\t\t\"Enable folding for XML at the start of open tag. \"\n\t\t\t\"The default is off.\");\n\n\t\tDefineWordListSets(isPHPScript_ ? phpscriptWordListDesc : htmlWordListDesc);\n\t}\n};\n\nconstexpr char styleSubable[] = { SCE_H_TAG, SCE_H_ATTRIBUTE, SCE_HJ_WORD, SCE_HJA_WORD, SCE_HB_WORD, SCE_HP_WORD, SCE_HPHP_WORD, 0 };\n// Allow normal styles to be contiguous using 0x80 to 0xBF by assigning sub-styles from 0xC0 to 0xFF\nconstexpr int SubStylesHTML = 0xC0;\n\nconst LexicalClass lexicalClassesHTML[] = {\n\t// Lexer HTML SCLEX_HTML SCE_H_ SCE_HJ_ SCE_HJA_ SCE_HB_ SCE_HBA_ SCE_HP_ SCE_HPHP_ SCE_HPA_:\n\t0, \"SCE_H_DEFAULT\", \"default\", \"Text\",\n\t1, \"SCE_H_TAG\", \"tag\", \"Tags\",\n\t2, \"SCE_H_ERRORTAGUNKNOWN\", \"error tag\", \"Unknown Tags\",\n\t3, \"SCE_H_ATTRIBUTE\", \"attribute\", \"Attributes\",\n\t4, \"SCE_H_ATTRIBUTEUNKNOWN\", \"error attribute\", \"Unknown Attributes\",\n\t5, \"SCE_H_NUMBER\", \"literal numeric\", \"Numbers\",\n\t6, \"SCE_H_DOUBLESTRING\", \"literal string\", \"Double quoted strings\",\n\t7, \"SCE_H_SINGLESTRING\", \"literal string\", \"Single quoted strings\",\n\t8, \"SCE_H_OTHER\", \"tag operator\", \"Other inside tag, including space and '='\",\n\t9, \"SCE_H_COMMENT\", \"comment\", \"Comment\",\n\t10, \"SCE_H_ENTITY\", \"literal\", \"Entities\",\n\t11, \"SCE_H_TAGEND\", \"tag\", \"XML style tag ends '/>'\",\n\t12, \"SCE_H_XMLSTART\", \"identifier\", \"XML identifier start '<?'\",\n\t13, \"SCE_H_XMLEND\", \"identifier\", \"XML identifier end '?>'\",\n\t14, \"SCE_H_SCRIPT\", \"error\", \"Internal state which should never be visible\",\n\t15, \"SCE_H_ASP\", \"preprocessor\", \"ASP <% ... %>\",\n\t16, \"SCE_H_ASPAT\", \"preprocessor\", \"ASP <% ... %>\",\n\t17, \"SCE_H_CDATA\", \"literal\", \"CDATA\",\n\t18, \"SCE_H_QUESTION\", \"preprocessor\", \"PHP\",\n\t19, \"SCE_H_VALUE\", \"literal string\", \"Unquoted values\",\n\t20, \"SCE_H_XCCOMMENT\", \"comment\", \"ASP.NET, JSP Comment <%-- ... --%>\",\n\t21, \"SCE_H_SGML_DEFAULT\", \"default\", \"SGML tags <! ... >\",\n\t22, \"SCE_H_SGML_COMMAND\", \"preprocessor\", \"SGML command\",\n\t23, \"SCE_H_SGML_1ST_PARAM\", \"preprocessor\", \"SGML 1st param\",\n\t24, \"SCE_H_SGML_DOUBLESTRING\", \"literal string\", \"SGML double string\",\n\t25, \"SCE_H_SGML_SIMPLESTRING\", \"literal string\", \"SGML single string\",\n\t26, \"SCE_H_SGML_ERROR\", \"error\", \"SGML error\",\n\t27, \"SCE_H_SGML_SPECIAL\", \"literal\", \"SGML special (#XXXX type)\",\n\t28, \"SCE_H_SGML_ENTITY\", \"literal\", \"SGML entity\",\n\t29, \"SCE_H_SGML_COMMENT\", \"comment\", \"SGML comment\",\n\t30, \"SCE_H_SGML_1ST_PARAM_COMMENT\", \"error comment\", \"SGML first parameter - lexer internal. It is an error if any text is in this style.\",\n\t31, \"SCE_H_SGML_BLOCK_DEFAULT\", \"default\", \"SGML block\",\n\t32, \"\", \"predefined\", \"\",\n\t33, \"\", \"predefined\", \"\",\n\t34, \"\", \"predefined\", \"\",\n\t35, \"\", \"predefined\", \"\",\n\t36, \"\", \"predefined\", \"\",\n\t37, \"\", \"predefined\", \"\",\n\t38, \"\", \"predefined\", \"\",\n\t39, \"\", \"predefined\", \"\",\n\t40, \"SCE_HJ_START\", \"client javascript default\", \"JS Start - allows eol filled background to not start on same line as SCRIPT tag\",\n\t41, \"SCE_HJ_DEFAULT\", \"client javascript default\", \"JS Default\",\n\t42, \"SCE_HJ_COMMENT\", \"client javascript comment\", \"JS Comment\",\n\t43, \"SCE_HJ_COMMENTLINE\", \"client javascript comment line\", \"JS Line Comment\",\n\t44, \"SCE_HJ_COMMENTDOC\", \"client javascript comment documentation\", \"JS Doc comment\",\n\t45, \"SCE_HJ_NUMBER\", \"client javascript literal numeric\", \"JS Number\",\n\t46, \"SCE_HJ_WORD\", \"client javascript identifier\", \"JS Word\",\n\t47, \"SCE_HJ_KEYWORD\", \"client javascript keyword\", \"JS Keyword\",\n\t48, \"SCE_HJ_DOUBLESTRING\", \"client javascript literal string\", \"JS Double quoted string\",\n\t49, \"SCE_HJ_SINGLESTRING\", \"client javascript literal string\", \"JS Single quoted string\",\n\t50, \"SCE_HJ_SYMBOLS\", \"client javascript operator\", \"JS Symbols\",\n\t51, \"SCE_HJ_STRINGEOL\", \"client javascript error literal string\", \"JavaScript EOL\",\n\t52, \"SCE_HJ_REGEX\", \"client javascript literal regex\", \"JavaScript RegEx\",\n\t53, \"\", \"unused\", \"\",\n\t54, \"\", \"unused\", \"\",\n\t55, \"SCE_HJA_START\", \"server javascript default\", \"JS Start - allows eol filled background to not start on same line as SCRIPT tag\",\n\t56, \"SCE_HJA_DEFAULT\", \"server javascript default\", \"JS Default\",\n\t57, \"SCE_HJA_COMMENT\", \"server javascript comment\", \"JS Comment\",\n\t58, \"SCE_HJA_COMMENTLINE\", \"server javascript comment line\", \"JS Line Comment\",\n\t59, \"SCE_HJA_COMMENTDOC\", \"server javascript comment documentation\", \"JS Doc comment\",\n\t60, \"SCE_HJA_NUMBER\", \"server javascript literal numeric\", \"JS Number\",\n\t61, \"SCE_HJA_WORD\", \"server javascript identifier\", \"JS Word\",\n\t62, \"SCE_HJA_KEYWORD\", \"server javascript keyword\", \"JS Keyword\",\n\t63, \"SCE_HJA_DOUBLESTRING\", \"server javascript literal string\", \"JS Double quoted string\",\n\t64, \"SCE_HJA_SINGLESTRING\", \"server javascript literal string\", \"JS Single quoted string\",\n\t65, \"SCE_HJA_SYMBOLS\", \"server javascript operator\", \"JS Symbols\",\n\t66, \"SCE_HJA_STRINGEOL\", \"server javascript error literal string\", \"JavaScript EOL\",\n\t67, \"SCE_HJA_REGEX\", \"server javascript literal regex\", \"JavaScript RegEx\",\n\t68, \"\", \"unused\", \"\",\n\t69, \"\", \"unused\", \"\",\n\t70, \"SCE_HB_START\", \"client basic default\", \"Start\",\n\t71, \"SCE_HB_DEFAULT\", \"client basic default\", \"Default\",\n\t72, \"SCE_HB_COMMENTLINE\", \"client basic comment line\", \"Comment\",\n\t73, \"SCE_HB_NUMBER\", \"client basic literal numeric\", \"Number\",\n\t74, \"SCE_HB_WORD\", \"client basic keyword\", \"KeyWord\",\n\t75, \"SCE_HB_STRING\", \"client basic literal string\", \"String\",\n\t76, \"SCE_HB_IDENTIFIER\", \"client basic identifier\", \"Identifier\",\n\t77, \"SCE_HB_STRINGEOL\", \"client basic literal string\", \"Unterminated string\",\n\t78, \"\", \"unused\", \"\",\n\t79, \"\", \"unused\", \"\",\n\t80, \"SCE_HBA_START\", \"server basic default\", \"Start\",\n\t81, \"SCE_HBA_DEFAULT\", \"server basic default\", \"Default\",\n\t82, \"SCE_HBA_COMMENTLINE\", \"server basic comment line\", \"Comment\",\n\t83, \"SCE_HBA_NUMBER\", \"server basic literal numeric\", \"Number\",\n\t84, \"SCE_HBA_WORD\", \"server basic keyword\", \"KeyWord\",\n\t85, \"SCE_HBA_STRING\", \"server basic literal string\", \"String\",\n\t86, \"SCE_HBA_IDENTIFIER\", \"server basic identifier\", \"Identifier\",\n\t87, \"SCE_HBA_STRINGEOL\", \"server basic literal string\", \"Unterminated string\",\n\t88, \"\", \"unused\", \"\",\n\t89, \"\", \"unused\", \"\",\n\t90, \"SCE_HP_START\", \"client python default\", \"Embedded Python\",\n\t91, \"SCE_HP_DEFAULT\", \"client python default\", \"Embedded Python\",\n\t92, \"SCE_HP_COMMENTLINE\", \"client python comment line\", \"Comment\",\n\t93, \"SCE_HP_NUMBER\", \"client python literal numeric\", \"Number\",\n\t94, \"SCE_HP_STRING\", \"client python literal string\", \"String\",\n\t95, \"SCE_HP_CHARACTER\", \"client python literal string character\", \"Single quoted string\",\n\t96, \"SCE_HP_WORD\", \"client python keyword\", \"Keyword\",\n\t97, \"SCE_HP_TRIPLE\", \"client python literal string\", \"Triple quotes\",\n\t98, \"SCE_HP_TRIPLEDOUBLE\", \"client python literal string\", \"Triple double quotes\",\n\t99, \"SCE_HP_CLASSNAME\", \"client python identifier\", \"Class name definition\",\n\t100, \"SCE_HP_DEFNAME\", \"client python identifier\", \"Function or method name definition\",\n\t101, \"SCE_HP_OPERATOR\", \"client python operator\", \"Operators\",\n\t102, \"SCE_HP_IDENTIFIER\", \"client python identifier\", \"Identifiers\",\n\t103, \"\", \"unused\", \"\",\n\t104, \"SCE_HPHP_COMPLEX_VARIABLE\", \"server php identifier\", \"PHP complex variable\",\n\t105, \"SCE_HPA_START\", \"server python default\", \"ASP Python\",\n\t106, \"SCE_HPA_DEFAULT\", \"server python default\", \"ASP Python\",\n\t107, \"SCE_HPA_COMMENTLINE\", \"server python comment line\", \"Comment\",\n\t108, \"SCE_HPA_NUMBER\", \"server python literal numeric\", \"Number\",\n\t109, \"SCE_HPA_STRING\", \"server python literal string\", \"String\",\n\t110, \"SCE_HPA_CHARACTER\", \"server python literal string character\", \"Single quoted string\",\n\t111, \"SCE_HPA_WORD\", \"server python keyword\", \"Keyword\",\n\t112, \"SCE_HPA_TRIPLE\", \"server python literal string\", \"Triple quotes\",\n\t113, \"SCE_HPA_TRIPLEDOUBLE\", \"server python literal string\", \"Triple double quotes\",\n\t114, \"SCE_HPA_CLASSNAME\", \"server python identifier\", \"Class name definition\",\n\t115, \"SCE_HPA_DEFNAME\", \"server python identifier\", \"Function or method name definition\",\n\t116, \"SCE_HPA_OPERATOR\", \"server python operator\", \"Operators\",\n\t117, \"SCE_HPA_IDENTIFIER\", \"server python identifier\", \"Identifiers\",\n\t118, \"SCE_HPHP_DEFAULT\", \"server php default\", \"Default\",\n\t119, \"SCE_HPHP_HSTRING\", \"server php literal string\", \"Double quoted String\",\n\t120, \"SCE_HPHP_SIMPLESTRING\", \"server php literal string\", \"Single quoted string\",\n\t121, \"SCE_HPHP_WORD\", \"server php keyword\", \"Keyword\",\n\t122, \"SCE_HPHP_NUMBER\", \"server php literal numeric\", \"Number\",\n\t123, \"SCE_HPHP_VARIABLE\", \"server php identifier\", \"Variable\",\n\t124, \"SCE_HPHP_COMMENT\", \"server php comment\", \"Comment\",\n\t125, \"SCE_HPHP_COMMENTLINE\", \"server php comment line\", \"One line comment\",\n\t126, \"SCE_HPHP_HSTRING_VARIABLE\", \"server php literal string identifier\", \"PHP variable in double quoted string\",\n\t127, \"SCE_HPHP_OPERATOR\", \"server php operator\", \"PHP operator\",\n};\n\nconst LexicalClass lexicalClassesXML[] = {\n\t// Lexer.Secondary XML SCLEX_XML SCE_H_:\n\t0, \"SCE_H_DEFAULT\", \"default\", \"Default\",\n\t1, \"SCE_H_TAG\", \"tag\", \"Tags\",\n\t2, \"SCE_H_TAGUNKNOWN\", \"error tag\", \"Unknown Tags\",\n\t3, \"SCE_H_ATTRIBUTE\", \"attribute\", \"Attributes\",\n\t4, \"SCE_H_ERRORATTRIBUTEUNKNOWN\", \"error attribute\", \"Unknown Attributes\",\n\t5, \"SCE_H_NUMBER\", \"literal numeric\", \"Numbers\",\n\t6, \"SCE_H_DOUBLESTRING\", \"literal string\", \"Double quoted strings\",\n\t7, \"SCE_H_SINGLESTRING\", \"literal string\", \"Single quoted strings\",\n\t8, \"SCE_H_OTHER\", \"tag operator\", \"Other inside tag, including space and '='\",\n\t9, \"SCE_H_COMMENT\", \"comment\", \"Comment\",\n\t10, \"SCE_H_ENTITY\", \"literal\", \"Entities\",\n\t11, \"SCE_H_TAGEND\", \"tag\", \"XML style tag ends '/>'\",\n\t12, \"SCE_H_XMLSTART\", \"identifier\", \"XML identifier start '<?'\",\n\t13, \"SCE_H_XMLEND\", \"identifier\", \"XML identifier end '?>'\",\n\t14, \"\", \"unused\", \"\",\n\t15, \"\", \"unused\", \"\",\n\t16, \"\", \"unused\", \"\",\n\t17, \"SCE_H_CDATA\", \"literal\", \"CDATA\",\n\t18, \"SCE_H_QUESTION\", \"preprocessor\", \"Question\",\n\t19, \"SCE_H_VALUE\", \"literal string\", \"Unquoted Value\",\n\t20, \"\", \"unused\", \"\",\n\t21, \"SCE_H_SGML_DEFAULT\", \"default\", \"SGML tags <! ... >\",\n\t22, \"SCE_H_SGML_COMMAND\", \"preprocessor\", \"SGML command\",\n\t23, \"SCE_H_SGML_1ST_PARAM\", \"preprocessor\", \"SGML 1st param\",\n\t24, \"SCE_H_SGML_DOUBLESTRING\", \"literal string\", \"SGML double string\",\n\t25, \"SCE_H_SGML_SIMPLESTRING\", \"literal string\", \"SGML single string\",\n\t26, \"SCE_H_SGML_ERROR\", \"error\", \"SGML error\",\n\t27, \"SCE_H_SGML_SPECIAL\", \"literal\", \"SGML special (#XXXX type)\",\n\t28, \"SCE_H_SGML_ENTITY\", \"literal\", \"SGML entity\",\n\t29, \"SCE_H_SGML_COMMENT\", \"comment\", \"SGML comment\",\n\t30, \"\", \"unused\", \"\",\n\t31, \"SCE_H_SGML_BLOCK_DEFAULT\", \"default\", \"SGML block\",\n};\n\nconst char * const tagsThatDoNotFold[] = {\n\t\"area\",\n\t\"base\",\n\t\"basefont\",\n\t\"br\",\n\t\"col\",\n\t\"command\",\n\t\"embed\",\n\t\"frame\",\n\t\"hr\",\n\t\"img\",\n\t\"input\",\n\t\"isindex\",\n\t\"keygen\",\n\t\"link\",\n\t\"meta\",\n\t\"param\",\n\t\"source\",\n\t\"track\",\n\t\"wbr\"\n};\n\n}\n\nclass LexerHTML : public DefaultLexer {\n\tbool isXml;\n\tbool isPHPScript;\n\tWordList keywords;\n\tWordList keywords2;\n\tWordList keywords3;\n\tWordList keywords4;\n\tWordList keywords5;\n\tWordList keywords6; // SGML (DTD) keywords\n\tOptionsHTML options;\n\tOptionSetHTML osHTML;\n\tstd::set<std::string> nonFoldingTags;\n\tSubStyles subStyles{styleSubable,SubStylesHTML,SubStylesAvailable,0};\npublic:\n\texplicit LexerHTML(bool isXml_, bool isPHPScript_) :\n\t\tDefaultLexer(\n\t\t\tisXml_ ? \"xml\" : (isPHPScript_ ? \"phpscript\" : \"hypertext\"),\n\t\t\tisXml_ ? SCLEX_XML : (isPHPScript_ ? SCLEX_PHPSCRIPT : SCLEX_HTML),\n\t\t\tisXml_ ?  lexicalClassesXML : lexicalClassesHTML,\n\t\t\tisXml_ ?  std::size(lexicalClassesXML) : std::size(lexicalClassesHTML)),\n\t\tisXml(isXml_),\n\t\tisPHPScript(isPHPScript_),\n\t\tosHTML(isPHPScript_),\n\t\tnonFoldingTags(std::begin(tagsThatDoNotFold), std::end(tagsThatDoNotFold)) {\n\t}\n\t~LexerHTML() override {\n\t}\n\tvoid SCI_METHOD Release() override {\n\t\tdelete this;\n\t}\n\tconst char *SCI_METHOD PropertyNames() override {\n\t\treturn osHTML.PropertyNames();\n\t}\n\tint SCI_METHOD PropertyType(const char *name) override {\n\t\treturn osHTML.PropertyType(name);\n\t}\n\tconst char *SCI_METHOD DescribeProperty(const char *name) override {\n\t\treturn osHTML.DescribeProperty(name);\n\t}\n\tSci_Position SCI_METHOD PropertySet(const char *key, const char *val) override;\n\tconst char * SCI_METHOD PropertyGet(const char *key) override {\n\t\treturn osHTML.PropertyGet(key);\n\t}\n\tconst char *SCI_METHOD DescribeWordListSets() override {\n\t\treturn osHTML.DescribeWordListSets();\n\t}\n\tSci_Position SCI_METHOD WordListSet(int n, const char *wl) override;\n\tvoid SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;\n\t// No Fold as all folding performs in Lex.\n\n\tint SCI_METHOD AllocateSubStyles(int styleBase, int numberStyles) override {\n\t\treturn subStyles.Allocate(styleBase, numberStyles);\n\t}\n\tint SCI_METHOD SubStylesStart(int styleBase) override {\n\t\treturn subStyles.Start(styleBase);\n\t}\n\tint SCI_METHOD SubStylesLength(int styleBase) override {\n\t\treturn subStyles.Length(styleBase);\n\t}\n\tint SCI_METHOD StyleFromSubStyle(int subStyle) override {\n\t\tconst int styleBase = subStyles.BaseStyle(subStyle);\n\t\treturn styleBase;\n\t}\n\tint SCI_METHOD PrimaryStyleFromStyle(int style) override {\n\t\treturn style;\n\t}\n\tvoid SCI_METHOD FreeSubStyles() override {\n\t\tsubStyles.Free();\n\t}\n\tvoid SCI_METHOD SetIdentifiers(int style, const char *identifiers) override {\n\t\tsubStyles.SetIdentifiers(style, identifiers);\n\t}\n\tint SCI_METHOD DistanceToSecondaryStyles() override {\n\t\treturn 0;\n\t}\n\tconst char *SCI_METHOD GetSubStyleBases() override {\n\t\treturn styleSubable;\n\t}\n\n\tstatic ILexer5 *LexerFactoryHTML() {\n\t\treturn new LexerHTML(false, false);\n\t}\n\tstatic ILexer5 *LexerFactoryXML() {\n\t\treturn new LexerHTML(true, false);\n\t}\n\tstatic ILexer5 *LexerFactoryPHPScript() {\n\t\treturn new LexerHTML(false, true);\n\t}\n};\n\nSci_Position SCI_METHOD LexerHTML::PropertySet(const char *key, const char *val) {\n\tif (osHTML.PropertySet(&options, key, val)) {\n\t\treturn 0;\n\t}\n\treturn -1;\n}\n\nSci_Position SCI_METHOD LexerHTML::WordListSet(int n, const char *wl) {\n\tWordList *wordListN = nullptr;\n\tswitch (n) {\n\tcase 0:\n\t\twordListN = &keywords;\n\t\tbreak;\n\tcase 1:\n\t\twordListN = &keywords2;\n\t\tbreak;\n\tcase 2:\n\t\twordListN = &keywords3;\n\t\tbreak;\n\tcase 3:\n\t\twordListN = &keywords4;\n\t\tbreak;\n\tcase 4:\n\t\twordListN = &keywords5;\n\t\tbreak;\n\tcase 5:\n\t\twordListN = &keywords6;\n\t\tbreak;\n\tdefault:\n\t\tbreak;\n\t}\n\tSci_Position firstModification = -1;\n\tif (wordListN) {\n\t\tif (wordListN->Set(wl)) {\n\t\t\tfirstModification = 0;\n\t\t}\n\t}\n\treturn firstModification;\n}\n\nvoid SCI_METHOD LexerHTML::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) {\n\tAccessor styler(pAccess, nullptr);\n\n\tconst WordClassifier &classifierTags = subStyles.Classifier(SCE_H_TAG);\n\tconst WordClassifier &classifierAttributes = subStyles.Classifier(SCE_H_ATTRIBUTE);\n\tconst WordClassifier &classifierJavaScript = subStyles.Classifier(SCE_HJ_WORD);\n\tconst WordClassifier &classifierJavaScriptServer = subStyles.Classifier(SCE_HJA_WORD);\n\tconst WordClassifier &classifierBasic = subStyles.Classifier(SCE_HB_WORD);\n\tconst WordClassifier &classifierPython = subStyles.Classifier(SCE_HP_WORD);\n\tconst WordClassifier &classifierPHP = subStyles.Classifier(SCE_HPHP_WORD);\n\n\tif (isPHPScript && (startPos == 0)) {\n\t\tinitStyle = SCE_HPHP_DEFAULT;\n\t}\n\tstyler.StartAt(startPos);\n\tstd::string lastTag;\n\tstd::string prevWord;\n\tPhpNumberState phpNumber;\n\tstd::string phpStringDelimiter;\n\tint StateToPrint = initStyle;\n\tint state = stateForPrintState(StateToPrint);\n\tstd::string makoBlockType;\n\tint makoComment = 0;\n\tstd::string djangoBlockType;\n\t// If inside a tag, it may be a script tag, so reread from the start of line starting tag to ensure any language tags are seen\n\tif (InTagState(state)) {\n\t\twhile ((startPos > 0) && (InTagState(styler.StyleIndexAt(startPos - 1)))) {\n\t\t\tconst Sci_Position backLineStart = styler.LineStart(styler.GetLine(startPos-1));\n\t\t\tlength += startPos - backLineStart;\n\t\t\tstartPos = backLineStart;\n\t\t}\n\t\tstate = SCE_H_DEFAULT;\n\t}\n\t// String can be heredoc, must find a delimiter first. Reread from beginning of line containing the string, to get the correct lineState\n\tif (isPHPStringState(state)) {\n\t\twhile (startPos > 0 && (isPHPStringState(state) || !isLineEnd(styler[startPos - 1]))) {\n\t\t\tstartPos--;\n\t\t\tlength++;\n\t\t\tstate = styler.StyleIndexAt(startPos);\n\t\t}\n\t\tif (startPos == 0)\n\t\t\tstate = SCE_H_DEFAULT;\n\t}\n\tstyler.StartAt(startPos);\n\n\t/* Nothing handles getting out of these, so we need not start in any of them.\n\t * As we're at line start and they can't span lines, we'll re-detect them anyway */\n\tswitch (state) {\n\t\tcase SCE_H_QUESTION:\n\t\tcase SCE_H_XMLSTART:\n\t\tcase SCE_H_XMLEND:\n\t\tcase SCE_H_ASP:\n\t\t\tstate = SCE_H_DEFAULT;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t}\n\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tint lineState;\n\tif (lineCurrent > 0) {\n\t\tlineState = styler.GetLineState(lineCurrent-1);\n\t} else {\n\t\t// Default client and ASP scripting language is JavaScript\n\t\tlineState = eScriptJS << 8;\n\t\tlineState |= options.aspDefaultLanguage << 4;\n\t}\n\tscript_mode inScriptType = static_cast<script_mode>((lineState >> 0) & 0x03); // 2 bits of scripting mode\n\n\tbool tagOpened = (lineState >> 2) & 0x01; // 1 bit to know if we are in an opened tag\n\tbool tagClosing = (lineState >> 3) & 0x01; // 1 bit to know if we are in a closing tag\n\tbool tagDontFold = false; //some HTML tags should not be folded\n\tscript_type aspScript = static_cast<script_type>((lineState >> 4) & 0x0F); // 4 bits of script name\n\tscript_type clientScript = static_cast<script_type>((lineState >> 8) & 0x0F); // 4 bits of script name\n\tint beforePreProc = (lineState >> 12) & 0xFF; // 8 bits of state\n\tbool isLanguageType = (lineState >> 20) & 1; // type or language attribute for script tag\n\n\tscript_type scriptLanguage = ScriptOfState(state);\n\t// If eNonHtmlScript coincides with SCE_H_COMMENT, assume eScriptComment\n\tif (inScriptType == eNonHtmlScript && state == SCE_H_COMMENT) {\n\t\tscriptLanguage = eScriptComment;\n\t}\n\tscript_type beforeLanguage = ScriptOfState(beforePreProc);\n\tconst bool foldHTML = options.foldHTML;\n\tconst bool fold = foldHTML && options.fold;\n\tconst bool foldHTMLPreprocessor = foldHTML && options.foldHTMLPreprocessor;\n\tconst bool foldCompact = options.foldCompact;\n\tconst bool foldComment = fold && options.foldComment;\n\tconst bool foldHeredoc = fold && options.foldHeredoc;\n\tconst bool foldXmlAtTagOpen = isXml && fold && options.foldXmlAtTagOpen;\n\tconst bool caseSensitive = options.caseSensitive;\n\tconst bool allowScripts = options.allowScripts;\n\tconst bool isMako = options.isMako;\n\tconst bool isDjango = options.isDjango;\n\tconst CharacterSet setHTMLWord(CharacterSet::setAlphaNum, \".-_:!#\", true);\n\tconst CharacterSet setTagContinue(CharacterSet::setAlphaNum, \".-_:!#[\", true);\n\tconst CharacterSet setAttributeContinue(CharacterSet::setAlphaNum, \".-_:!#/\", true);\n\t// TODO: also handle + and - (except if they're part of ++ or --) and return keywords\n\tconst CharacterSet setOKBeforeJSRE(CharacterSet::setNone, \"([{=,:;!%^&*|?~\");\n\t// Only allow [A-Za-z0-9.#-_:] in entities\n\tconst CharacterSet setEntity(CharacterSet::setAlphaNum, \".#-_:\");\n\n\tint levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK;\n\tint levelCurrent = levelPrev;\n\tSci_Position visibleChars = 0;\n\tint lineStartVisibleChars = 0;\n\n\tint chPrev = ' ';\n\tint ch = ' ';\n\tint chPrevNonWhite = ' ';\n\t// look back to set chPrevNonWhite properly for better regex colouring\n\tif (scriptLanguage == eScriptJS && startPos > 0) {\n\t\tSci_Position back = startPos;\n\t\tint style = 0;\n\t\twhile (--back) {\n\t\t\tstyle = styler.StyleIndexAt(back);\n\t\t\tif (style < SCE_HJ_DEFAULT || style > SCE_HJ_COMMENTDOC)\n\t\t\t\t// includes SCE_HJ_COMMENT & SCE_HJ_COMMENTLINE\n\t\t\t\tbreak;\n\t\t}\n\t\tif (style == SCE_HJ_SYMBOLS) {\n\t\t\tchPrevNonWhite = SafeGetUnsignedCharAt(styler, back);\n\t\t}\n\t}\n\n\tstyler.StartSegment(startPos);\n\tconst Sci_Position lengthDoc = startPos + length;\n\tfor (Sci_Position i = startPos; i < lengthDoc; i++) {\n\t\tconst int chPrev2 = chPrev;\n\t\tchPrev = ch;\n\t\tif (!IsASpace(ch) && state != SCE_HJ_COMMENT &&\n\t\t\tstate != SCE_HJ_COMMENTLINE && state != SCE_HJ_COMMENTDOC)\n\t\t\tchPrevNonWhite = ch;\n\t\tch = static_cast<unsigned char>(styler[i]);\n\t\tint chNext = SafeGetUnsignedCharAt(styler, i + 1);\n\t\tconst int chNext2 = SafeGetUnsignedCharAt(styler, i + 2);\n\n\t\t// Handle DBCS codepages\n\t\tif (styler.IsLeadByte(static_cast<char>(ch))) {\n\t\t\tchPrev = ' ';\n\t\t\ti += 1;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif ((!IsASpace(ch) || !foldCompact) && fold)\n\t\t\tvisibleChars++;\n\t\tif (!IsASpace(ch))\n\t\t\tlineStartVisibleChars++;\n\n\t\t// decide what is the current state to print (depending of the script tag)\n\t\tStateToPrint = statePrintForState(state, inScriptType);\n\n\t\t// handle script folding\n\t\tif (fold) {\n\t\t\tswitch (scriptLanguage) {\n\t\t\tcase eScriptJS:\n\t\t\tcase eScriptPHP:\n\t\t\t\t//not currently supported\t\t\t\tcase eScriptVBS:\n\n\t\t\t\tif (!AnyOf(state, SCE_HPHP_COMMENT, SCE_HPHP_COMMENTLINE, SCE_HJ_REGEX, SCE_HJ_COMMENT, SCE_HJ_COMMENTLINE, SCE_HJ_COMMENTDOC) &&\n\t\t\t\t    !isStringState(state)) {\n\t\t\t\t//Platform::DebugPrintf(\"state=%d, StateToPrint=%d, initStyle=%d\\n\", state, StateToPrint, initStyle);\n\t\t\t\t//if ((state == SCE_HPHP_OPERATOR) || (state == SCE_HPHP_DEFAULT) || (state == SCE_HJ_SYMBOLS) || (state == SCE_HJ_START) || (state == SCE_HJ_DEFAULT)) {\n\t\t\t\t\tif (ch == '#') {\n\t\t\t\t\t\tSci_Position j = i + 1;\n\t\t\t\t\t\twhile ((j < lengthDoc) && IsASpaceOrTab(styler.SafeGetCharAt(j))) {\n\t\t\t\t\t\t\tj++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (styler.Match(j, \"region\") || styler.Match(j, \"if\")) {\n\t\t\t\t\t\t\tlevelCurrent++;\n\t\t\t\t\t\t} else if (styler.Match(j, \"end\")) {\n\t\t\t\t\t\t\tlevelCurrent--;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if ((ch == '{') || (ch == '}') || (foldComment && (ch == '/') && (chNext == '*'))) {\n\t\t\t\t\t\tlevelCurrent += (((ch == '{') || (ch == '/')) ? 1 : -1);\n\t\t\t\t\t}\n\t\t\t\t} else if (((state == SCE_HPHP_COMMENT) || (state == SCE_HJ_COMMENT || state == SCE_HJ_COMMENTDOC)) && foldComment && (ch == '*') && (chNext == '/')) {\n\t\t\t\t\tlevelCurrent--;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase eScriptPython:\n\t\t\t\tif (state != SCE_HP_COMMENTLINE && !isMako) {\n\t\t\t\t\tif ((ch == ':') && ((chNext == '\\n') || (chNext == '\\r' && chNext2 == '\\n'))) {\n\t\t\t\t\t\tlevelCurrent++;\n\t\t\t\t\t} else if ((ch == '\\n') && !((chNext == '\\r') && (chNext2 == '\\n')) && (chNext != '\\n')) {\n\t\t\t\t\t\t// check if the number of tabs is lower than the level\n\t\t\t\t\t\tconstexpr int tabWidth = 8;\n\t\t\t\t\t\tint Findlevel = (levelCurrent & ~SC_FOLDLEVELBASE) * tabWidth;\n\t\t\t\t\t\tfor (Sci_Position j = 0; Findlevel > 0; j++) {\n\t\t\t\t\t\t\tconst char chTmp = styler.SafeGetCharAt(i + j + 1);\n\t\t\t\t\t\t\tif (chTmp == '\\t') {\n\t\t\t\t\t\t\t\tFindlevel -= tabWidth;\n\t\t\t\t\t\t\t} else if (chTmp == ' ') {\n\t\t\t\t\t\t\t\tFindlevel--;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (Findlevel > 0) {\n\t\t\t\t\t\t\tlevelCurrent -= Findlevel / tabWidth;\n\t\t\t\t\t\t\tif (Findlevel % tabWidth)\n\t\t\t\t\t\t\t\tlevelCurrent--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif ((ch == '\\r' && chNext != '\\n') || (ch == '\\n')) {\n\t\t\t// Trigger on CR only (Mac style) or either on LF from CR+LF (Dos/Win) or on LF alone (Unix)\n\t\t\t// Avoid triggering two times on Dos/Win\n\t\t\t// New line -> record any line state onto /next/ line\n\t\t\tif (fold) {\n\t\t\t\tint lev = levelPrev;\n\t\t\t\tif (visibleChars == 0)\n\t\t\t\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\t\t\t\tif ((levelCurrent > levelPrev) && (visibleChars > 0))\n\t\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\t\t\t\tvisibleChars = 0;\n\t\t\t\tlevelPrev = levelCurrent;\n\t\t\t}\n\t\t\tstyler.SetLineState(lineCurrent,\n\t\t\t                    ((inScriptType & 0x03) << 0) |\n\t\t\t                    ((tagOpened ? 1 : 0) << 2) |\n\t\t\t                    ((tagClosing ? 1 : 0) << 3) |\n\t\t\t                    ((aspScript & 0x0F) << 4) |\n\t\t\t                    ((clientScript & 0x0F) << 8) |\n\t\t\t                    ((beforePreProc & 0xFF) << 12) |\n\t\t\t                    ((isLanguageType ? 1 : 0) << 20));\n\t\t\tlineCurrent++;\n\t\t\tlineStartVisibleChars = 0;\n\t\t}\n\n\t\t// handle start of Mako comment line\n\t\tif (isMako && ch == '#' && chNext == '#') {\n\t\t\tmakoComment = 1;\n\t\t\tstate = SCE_HP_COMMENTLINE;\n\t\t}\n\n\t\t// handle end of Mako comment line\n\t\telse if (isMako && makoComment && (ch == '\\r' || ch == '\\n')) {\n\t\t\tmakoComment = 0;\n\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\tif (scriptLanguage == eScriptPython) {\n\t\t\t\tstate = SCE_HP_DEFAULT;\n\t\t\t} else {\n\t\t\t\tstate = SCE_H_DEFAULT;\n\t\t\t}\n\t\t}\n\t\t// Allow falling through to mako handling code if newline is going to end a block\n\t\tif (((ch == '\\r' && chNext != '\\n') || (ch == '\\n')) &&\n\t\t\t(!isMako || (makoBlockType != \"%\"))) {\n\t\t}\n\t\t// Ignore everything in mako comment until the line ends\n\t\telse if (isMako && makoComment) {\n\t\t}\n\n\t\t// generic end of script processing\n\t\telse if ((inScriptType == eNonHtmlScript) && (ch == '<') && (chNext == '/')) {\n\t\t\t// Check if it's the end of the script tag (or any other HTML tag)\n\t\t\tswitch (state) {\n\t\t\t\t// in these cases, you can embed HTML tags (to confirm !!!!!!!!!!!!!!!!!!!!!!)\n\t\t\tcase SCE_H_DOUBLESTRING:\n\t\t\tcase SCE_H_SINGLESTRING:\n\t\t\tcase SCE_HJ_COMMENT:\n\t\t\tcase SCE_HJ_COMMENTDOC:\n\t\t\t//case SCE_HJ_COMMENTLINE: // removed as this is a common thing done to hide\n\t\t\t// the end of script marker from some JS interpreters.\n\t\t\t//case SCE_HB_COMMENTLINE:\n\t\t\tcase SCE_HBA_COMMENTLINE:\n\t\t\tcase SCE_HJ_DOUBLESTRING:\n\t\t\tcase SCE_HJ_SINGLESTRING:\n\t\t\tcase SCE_HJ_REGEX:\n\t\t\tcase SCE_HB_STRING:\n\t\t\tcase SCE_HBA_STRING:\n\t\t\tcase SCE_HP_STRING:\n\t\t\tcase SCE_HP_TRIPLE:\n\t\t\tcase SCE_HP_TRIPLEDOUBLE:\n\t\t\tcase SCE_HPHP_HSTRING:\n\t\t\tcase SCE_HPHP_SIMPLESTRING:\n\t\t\tcase SCE_HPHP_COMMENT:\n\t\t\tcase SCE_HPHP_COMMENTLINE:\n\t\t\t\tbreak;\n\t\t\tdefault :\n\t\t\t\t// check if the closing tag is a script tag\n\t\t\t\tif (const char *tag =\n\t\t\t\t\t\t(state == SCE_HJ_COMMENTLINE || state == SCE_HB_COMMENTLINE || isXml) ? \"script\" :\n\t\t\t\t\t\tstate == SCE_H_COMMENT ? \"comment\" : nullptr) {\n\t\t\t\t\tSci_Position j = i + 2;\n\t\t\t\t\tint chr;\n\t\t\t\t\tdo {\n\t\t\t\t\t\tchr = static_cast<int>(*tag++);\n\t\t\t\t\t} while (chr != 0 && chr == MakeLowerCase(styler.SafeGetCharAt(j++)));\n\t\t\t\t\tif (chr != 0) break;\n\t\t\t\t}\n\t\t\t\t// closing tag of the script (it's a closing HTML tag anyway)\n\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\tstate = SCE_H_TAGUNKNOWN;\n\t\t\t\tinScriptType = eHtml;\n\t\t\t\tscriptLanguage = eScriptNone;\n\t\t\t\tclientScript = eScriptJS;\n\t\t\t\tisLanguageType = false;\n\t\t\t\ti += 2;\n\t\t\t\tvisibleChars += 2;\n\t\t\t\ttagClosing = true;\n\t\t\t\tif (foldXmlAtTagOpen) {\n\t\t\t\t\tlevelCurrent--;\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\t/////////////////////////////////////\n\t\t// handle the start of PHP pre-processor = Non-HTML\n\t\telse if ((state != SCE_H_ASPAT) &&\n\t\t         !isPHPStringState(state) &&\n\t\t         (state != SCE_HPHP_COMMENT) &&\n\t\t         (state != SCE_HPHP_COMMENTLINE) &&\n\t\t         (ch == '<') &&\n\t\t         (chNext == '?') &&\n\t\t\t\t !IsScriptCommentState(state)) {\n \t\t\tbeforeLanguage = scriptLanguage;\n\t\t\tscriptLanguage = segIsScriptingIndicator(styler, i + 2, i + 6, isXml ? eScriptXML : eScriptPHP);\n\t\t\tif ((scriptLanguage != eScriptPHP) && (isStringState(state) || (state==SCE_H_COMMENT))) continue;\n\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\tbeforePreProc = state;\n\t\t\ti++;\n\t\t\tvisibleChars++;\n\t\t\ti += PrintScriptingIndicatorOffset(styler, styler.GetStartSegment() + 2, i + 6);\n\t\t\tif (scriptLanguage == eScriptXML)\n\t\t\t\tstyler.ColourTo(i, SCE_H_XMLSTART);\n\t\t\telse\n\t\t\t\tstyler.ColourTo(i, SCE_H_QUESTION);\n\t\t\tstate = StateForScript(scriptLanguage);\n\t\t\tif (inScriptType == eNonHtmlScript)\n\t\t\t\tinScriptType = eNonHtmlScriptPreProc;\n\t\t\telse\n\t\t\t\tinScriptType = eNonHtmlPreProc;\n\t\t\t// Fold whole script, but not if the XML first tag (all XML-like tags in this case)\n\t\t\tif (foldHTMLPreprocessor && (scriptLanguage != eScriptXML)) {\n\t\t\t\tlevelCurrent++;\n\t\t\t}\n\t\t\t// should be better\n\t\t\tch = SafeGetUnsignedCharAt(styler, i);\n\t\t\tcontinue;\n\t\t}\n\n\t\t// handle the start Mako template Python code\n\t\telse if (isMako && scriptLanguage == eScriptNone && ((ch == '<' && chNext == '%') ||\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t (lineStartVisibleChars == 1 && ch == '%') ||\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t (lineStartVisibleChars == 1 && ch == '/' && chNext == '%') ||\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t (ch == '$' && chNext == '{') ||\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t (ch == '<' && chNext == '/' && chNext2 == '%'))) {\n\t\t\tif (ch == '%' || ch == '/')\n\t\t\t\tmakoBlockType = \"%\";\n\t\t\telse if (ch == '$')\n\t\t\t\tmakoBlockType = \"{\";\n\t\t\telse if (chNext == '/')\n\t\t\t\tmakoBlockType = GetNextWord(styler, i+3);\t// Tag end: </%tag>\n\t\t\telse\n\t\t\t\tmakoBlockType = GetNextWord(styler, i+2);\t// Tag: <%tag...>\n\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\tbeforePreProc = state;\n\t\t\tif (inScriptType == eNonHtmlScript)\n\t\t\t\tinScriptType = eNonHtmlScriptPreProc;\n\t\t\telse\n\t\t\t\tinScriptType = eNonHtmlPreProc;\n\n\t\t\tif (chNext == '/') {\n\t\t\t\ti += 2;\n\t\t\t\tvisibleChars += 2;\n\t\t\t} else if (ch != '%') {\n\t\t\t\ti++;\n\t\t\t\tvisibleChars++;\n\t\t\t}\n\t\t\tstate = SCE_HP_START;\n\t\t\tscriptLanguage = eScriptPython;\n\t\t\tstyler.ColourTo(i, SCE_H_ASP);\n\t\t\tif (ch != '%' && ch != '$' && ch != '/') {\n\t\t\t\ti += makoBlockType.length();\n\t\t\t\tvisibleChars += makoBlockType.length();\n\t\t\t\tif (keywords4.InList(makoBlockType))\n\t\t\t\t\tstyler.ColourTo(i, SCE_HP_WORD);\n\t\t\t\telse\n\t\t\t\t\tstyler.ColourTo(i, SCE_H_TAGUNKNOWN);\n\t\t\t}\n\n\t\t\tch = SafeGetUnsignedCharAt(styler, i);\n\t\t\tcontinue;\n\t\t}\n\n\t\t// handle the start/end of Django comment\n\t\telse if (isDjango && state != SCE_H_COMMENT && (ch == '{' && chNext == '#')) {\n\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\tbeforePreProc = state;\n\t\t\tbeforeLanguage = scriptLanguage;\n\t\t\tif (inScriptType == eNonHtmlScript)\n\t\t\t\tinScriptType = eNonHtmlScriptPreProc;\n\t\t\telse\n\t\t\t\tinScriptType = eNonHtmlPreProc;\n\t\t\ti += 1;\n\t\t\tvisibleChars += 1;\n\t\t\tscriptLanguage = eScriptComment;\n\t\t\tstate = SCE_H_COMMENT;\n\t\t\tstyler.ColourTo(i, SCE_H_ASP);\n\t\t\tch = SafeGetUnsignedCharAt(styler, i);\n\t\t\tcontinue;\n\t\t} else if (isDjango && state == SCE_H_COMMENT && (ch == '#' && chNext == '}')) {\n\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\ti += 1;\n\t\t\tvisibleChars += 1;\n\t\t\tstyler.ColourTo(i, SCE_H_ASP);\n\t\t\tstate = beforePreProc;\n\t\t\tif (inScriptType == eNonHtmlScriptPreProc)\n\t\t\t\tinScriptType = eNonHtmlScript;\n\t\t\telse\n\t\t\t\tinScriptType = eHtml;\n\t\t\tscriptLanguage = beforeLanguage;\n\t\t\tcontinue;\n\t\t}\n\n\t\t// handle the start Django template code\n\t\telse if (isDjango && scriptLanguage != eScriptPython && scriptLanguage != eScriptComment && (ch == '{' && (chNext == '%' ||  chNext == '{'))) {\n\t\t\tif (chNext == '%')\n\t\t\t\tdjangoBlockType = \"%\";\n\t\t\telse\n\t\t\t\tdjangoBlockType = \"{\";\n\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\tbeforePreProc = state;\n\t\t\tif (inScriptType == eNonHtmlScript)\n\t\t\t\tinScriptType = eNonHtmlScriptPreProc;\n\t\t\telse\n\t\t\t\tinScriptType = eNonHtmlPreProc;\n\n\t\t\ti += 1;\n\t\t\tvisibleChars += 1;\n\t\t\tstate = SCE_HP_START;\n\t\t\tbeforeLanguage = scriptLanguage;\n\t\t\tscriptLanguage = eScriptPython;\n\t\t\tstyler.ColourTo(i, SCE_H_ASP);\n\n\t\t\tch = SafeGetUnsignedCharAt(styler, i);\n\t\t\tcontinue;\n\t\t}\n\n\t\t// handle the start of ASP pre-processor = Non-HTML\n\t\telse if (!isMako && !isDjango && !isCommentASPState(state) && (ch == '<') && (chNext == '%') && !isPHPStringState(state)) {\n\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\tbeforePreProc = state;\n\t\t\tif (inScriptType == eNonHtmlScript)\n\t\t\t\tinScriptType = eNonHtmlScriptPreProc;\n\t\t\telse\n\t\t\t\tinScriptType = eNonHtmlPreProc;\n\t\t\t// fold whole script\n\t\t\tif (foldHTMLPreprocessor)\n\t\t\t\tlevelCurrent++;\n\t\t\tif (chNext2 == '@') {\n\t\t\t\ti += 2; // place as if it was the second next char treated\n\t\t\t\tvisibleChars += 2;\n\t\t\t\tstate = SCE_H_ASPAT;\n\t\t\t\tscriptLanguage = eScriptVBS;\n\t\t\t} else if ((chNext2 == '-') && (styler.SafeGetCharAt(i + 3) == '-')) {\n\t\t\t\tstyler.ColourTo(i + 3, SCE_H_ASP);\n\t\t\t\tstate = SCE_H_XCCOMMENT;\n\t\t\t\tscriptLanguage = eScriptVBS;\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\tif (chNext2 == '=') {\n\t\t\t\t\ti += 2; // place as if it was the second next char treated\n\t\t\t\t\tvisibleChars += 2;\n\t\t\t\t} else {\n\t\t\t\t\ti++; // place as if it was the next char treated\n\t\t\t\t\tvisibleChars++;\n\t\t\t\t}\n\n\t\t\t\tstate = StateForScript(aspScript);\n\t\t\t\tscriptLanguage = aspScript;\n\t\t\t}\n\t\t\tstyler.ColourTo(i, SCE_H_ASP);\n\t\t\t// should be better\n\t\t\tch = SafeGetUnsignedCharAt(styler, i);\n\t\t\tcontinue;\n\t\t}\n\n\t\t/////////////////////////////////////\n\t\t// handle the start of SGML language (DTD)\n\t\telse if (((scriptLanguage == eScriptNone) || (scriptLanguage == eScriptXML)) &&\n\t\t\t\t (chPrev == '<') &&\n\t\t\t\t (ch == '!') &&\n\t\t\t\t (StateToPrint != SCE_H_CDATA) &&\n\t\t\t\t (!isStringState(StateToPrint)) &&\n\t\t\t\t (!IsCommentState(StateToPrint)) &&\n\t\t\t\t (!IsScriptCommentState(StateToPrint))) {\n\t\t\tbeforePreProc = state;\n\t\t\tstyler.ColourTo(i - 2, StateToPrint);\n\t\t\tif ((chNext == '-') && (chNext2 == '-')) {\n\t\t\t\tstate = SCE_H_COMMENT; // wait for a pending command\n\t\t\t\tstyler.ColourTo(i + 2, SCE_H_COMMENT);\n\t\t\t\ti += 2; // follow styling after the --\n\t\t\t\tif (!isXml) {\n\t\t\t\t\t// handle empty comment: <!-->, <!--->\n\t\t\t\t\t// https://html.spec.whatwg.org/multipage/parsing.html#parse-error-abrupt-closing-of-empty-comment\n\t\t\t\t\tchNext = SafeGetUnsignedCharAt(styler, i + 1);\n\t\t\t\t\tif ((chNext == '>') || (chNext == '-' && SafeGetUnsignedCharAt(styler, i + 2) == '>')) {\n\t\t\t\t\t\tif (chNext == '-') {\n\t\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tchPrev = '-';\n\t\t\t\t\t\tch = '-';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (isWordCdata(i + 1, i + 7, styler)) {\n\t\t\t\tstate = SCE_H_CDATA;\n\t\t\t} else {\n\t\t\t\tstyler.ColourTo(i, SCE_H_SGML_DEFAULT); // <! is default\n\t\t\t\tscriptLanguage = eScriptSGML;\n\t\t\t\tstate = SCE_H_SGML_COMMAND; // wait for a pending command\n\t\t\t}\n\t\t\t// fold whole tag (-- when closing the tag)\n\t\t\tif (foldHTMLPreprocessor || state == SCE_H_COMMENT || state == SCE_H_CDATA)\n\t\t\t\tlevelCurrent++;\n\t\t\tcontinue;\n\t\t}\n\n\t\t// handle the end of Mako Python code\n\t\telse if (isMako &&\n\t\t\t     ((inScriptType == eNonHtmlPreProc) || (inScriptType == eNonHtmlScriptPreProc)) &&\n\t\t\t\t (scriptLanguage != eScriptNone) && stateAllowsTermination(state) &&\n\t\t\t\t isMakoBlockEnd(ch, chNext, makoBlockType)) {\n\t\t\tif (state == SCE_H_ASPAT) {\n\t\t\t\taspScript = segIsScriptingIndicator(styler,\n\t\t\t\t                                    styler.GetStartSegment(), i - 1, aspScript);\n\t\t\t}\n\t\t\tif (state == SCE_HP_WORD) {\n\t\t\t\tclassifyWordHTPy(styler.GetStartSegment(), i - 1, keywords4, classifierPython, styler, prevWord, inScriptType, isMako);\n\t\t\t} else {\n\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t}\n\t\t\tif ((makoBlockType != \"%\") && (makoBlockType != \"{\") && ch != '>') {\n\t\t\t\ti++;\n\t\t\t\tvisibleChars++;\n\t\t\t} else if ((makoBlockType == \"%\") && ch == '/') {\n\t\t\t\ti++;\n\t\t\t\tvisibleChars++;\n\t\t\t}\n\t\t\tif ((makoBlockType != \"%\") || ch == '/') {\n\t\t\t\tstyler.ColourTo(i, SCE_H_ASP);\n\t\t\t}\n\t\t\tstate = beforePreProc;\n\t\t\tif (inScriptType == eNonHtmlScriptPreProc)\n\t\t\t\tinScriptType = eNonHtmlScript;\n\t\t\telse\n\t\t\t\tinScriptType = eHtml;\n\t\t\tscriptLanguage = eScriptNone;\n\t\t\tcontinue;\n\t\t}\n\n\t\t// handle the end of Django template code\n\t\telse if (isDjango &&\n\t\t\t     ((inScriptType == eNonHtmlPreProc) || (inScriptType == eNonHtmlScriptPreProc)) &&\n\t\t\t\t (scriptLanguage != eScriptNone) && stateAllowsTermination(state) &&\n\t\t\t\t isDjangoBlockEnd(ch, chNext, djangoBlockType)) {\n\t\t\tif (state == SCE_H_ASPAT) {\n\t\t\t\taspScript = segIsScriptingIndicator(styler,\n\t\t\t\t                                    styler.GetStartSegment(), i - 1, aspScript);\n\t\t\t}\n\t\t\tif (state == SCE_HP_WORD) {\n\t\t\t\tclassifyWordHTPy(styler.GetStartSegment(), i - 1, keywords4, classifierPython, styler, prevWord, inScriptType, isMako);\n\t\t\t} else {\n\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t}\n\t\t\ti += 1;\n\t\t\tvisibleChars += 1;\n\t\t\tstyler.ColourTo(i, SCE_H_ASP);\n\t\t\tstate = beforePreProc;\n\t\t\tif (inScriptType == eNonHtmlScriptPreProc)\n\t\t\t\tinScriptType = eNonHtmlScript;\n\t\t\telse\n\t\t\t\tinScriptType = eHtml;\n\t\t\tscriptLanguage = beforeLanguage;\n\t\t\tcontinue;\n\t\t}\n\n\t\t// handle the end of a pre-processor = Non-HTML\n\t\telse if ((!isMako && !isDjango && ((inScriptType == eNonHtmlPreProc) || (inScriptType == eNonHtmlScriptPreProc)) &&\n\t\t\t\t  (((scriptLanguage != eScriptNone) && stateAllowsTermination(state))) &&\n\t\t\t\t  ((chNext == '>') && isPreProcessorEndTag(state, ch))) ||\n\t\t         ((scriptLanguage == eScriptSGML) && (ch == '>') && (state != SCE_H_SGML_COMMENT))) {\n\t\t\tif (state == SCE_H_ASPAT) {\n\t\t\t\taspScript = segIsScriptingIndicator(styler,\n\t\t\t\t                                    styler.GetStartSegment(), i - 1, aspScript);\n\t\t\t}\n\t\t\t// Bounce out of any ASP mode\n\t\t\tswitch (state) {\n\t\t\tcase SCE_HJ_WORD:\n\t\t\t\tclassifyWordHTJS(styler.GetStartSegment(), i - 1, keywords2, classifierJavaScript, classifierJavaScriptServer, styler, inScriptType);\n\t\t\t\tbreak;\n\t\t\tcase SCE_HB_WORD:\n\t\t\t\tclassifyWordHTVB(styler.GetStartSegment(), i - 1, keywords3, classifierBasic, styler, inScriptType);\n\t\t\t\tbreak;\n\t\t\tcase SCE_HP_WORD:\n\t\t\t\tclassifyWordHTPy(styler.GetStartSegment(), i - 1, keywords4, classifierPython, styler, prevWord, inScriptType, isMako);\n\t\t\t\tbreak;\n\t\t\tcase SCE_HPHP_WORD:\n\t\t\t\tclassifyWordHTPHP(styler.GetStartSegment(), i - 1, keywords5, classifierPHP, styler);\n\t\t\t\tbreak;\n\t\t\tcase SCE_H_XCCOMMENT:\n\t\t\t\tstyler.ColourTo(i - 1, state);\n\t\t\t\tbreak;\n\t\t\tdefault :\n\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (scriptLanguage != eScriptSGML) {\n\t\t\t\ti++;\n\t\t\t\tvisibleChars++;\n\t\t\t}\n\t\t\tif (ch == '%')\n\t\t\t\tstyler.ColourTo(i, SCE_H_ASP);\n\t\t\telse if (scriptLanguage == eScriptXML)\n\t\t\t\tstyler.ColourTo(i, SCE_H_XMLEND);\n\t\t\telse if (scriptLanguage == eScriptSGML)\n\t\t\t\tstyler.ColourTo(i, SCE_H_SGML_DEFAULT);\n\t\t\telse\n\t\t\t\tstyler.ColourTo(i, SCE_H_QUESTION);\n\t\t\tstate = beforePreProc;\n\t\t\tif (inScriptType == eNonHtmlScriptPreProc)\n\t\t\t\tinScriptType = eNonHtmlScript;\n\t\t\telse\n\t\t\t\tinScriptType = eHtml;\n\t\t\t// Unfold all scripting languages, except for XML tag\n\t\t\tif (foldHTMLPreprocessor && (scriptLanguage != eScriptXML)) {\n\t\t\t\tlevelCurrent--;\n\t\t\t}\n\t\t\tscriptLanguage = beforeLanguage;\n\t\t\tcontinue;\n\t\t}\n\t\t/////////////////////////////////////\n\n\t\tswitch (state) {\n\t\tcase SCE_H_DEFAULT:\n\t\t\tif (ch == '<') {\n\t\t\t\t// in HTML, fold on tag open and unfold on tag close\n\t\t\t\ttagOpened = true;\n\t\t\t\ttagClosing = (chNext == '/');\n\t\t\t\tif (foldXmlAtTagOpen && !AnyOf(chNext, '/', '?', '!', '-', '%')) {\n\t\t\t\t\tlevelCurrent++;\n\t\t\t\t}\n\t\t\t\tif (foldXmlAtTagOpen && chNext == '/') {\n\t\t\t\t\tlevelCurrent--;\n\t\t\t\t}\n\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\tif (chNext != '!')\n\t\t\t\t\tstate = SCE_H_TAGUNKNOWN;\n\t\t\t} else if (ch == '&') {\n\t\t\t\tstyler.ColourTo(i - 1, SCE_H_DEFAULT);\n\t\t\t\tstate = SCE_H_ENTITY;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_H_SGML_DEFAULT:\n\t\tcase SCE_H_SGML_BLOCK_DEFAULT:\n//\t\t\tif (scriptLanguage == eScriptSGMLblock)\n//\t\t\t\tStateToPrint = SCE_H_SGML_BLOCK_DEFAULT;\n\n\t\t\tif (ch == '\\\"') {\n\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\tstate = SCE_H_SGML_DOUBLESTRING;\n\t\t\t} else if (ch == '\\'') {\n\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\tstate = SCE_H_SGML_SIMPLESTRING;\n\t\t\t} else if ((ch == '-') && (chPrev == '-')) {\n\t\t\t\tif (static_cast<Sci_Position>(styler.GetStartSegment()) <= (i - 2)) {\n\t\t\t\t\tstyler.ColourTo(i - 2, StateToPrint);\n\t\t\t\t}\n\t\t\t\tstate = SCE_H_SGML_COMMENT;\n\t\t\t} else if (IsUpperOrLowerCase(ch) && (chPrev == '%')) {\n\t\t\t\tstyler.ColourTo(i - 2, StateToPrint);\n\t\t\t\tstate = SCE_H_SGML_ENTITY;\n\t\t\t} else if (ch == '#') {\n\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\tstate = SCE_H_SGML_SPECIAL;\n\t\t\t} else if (ch == '[') {\n\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\tscriptLanguage = eScriptSGMLblock;\n\t\t\t\tstate = SCE_H_SGML_BLOCK_DEFAULT;\n\t\t\t} else if (ch == ']') {\n\t\t\t\tif (scriptLanguage == eScriptSGMLblock) {\n\t\t\t\t\tstyler.ColourTo(i, StateToPrint);\n\t\t\t\t\tscriptLanguage = eScriptSGML;\n\t\t\t\t} else {\n\t\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\t\tstyler.ColourTo(i, SCE_H_SGML_ERROR);\n\t\t\t\t}\n\t\t\t\tstate = SCE_H_SGML_DEFAULT;\n\t\t\t} else if (scriptLanguage == eScriptSGMLblock) {\n\t\t\t\tif ((ch == '!') && (chPrev == '<')) {\n\t\t\t\t\tstyler.ColourTo(i - 2, StateToPrint);\n\t\t\t\t\tstyler.ColourTo(i, SCE_H_SGML_DEFAULT);\n\t\t\t\t\tstate = SCE_H_SGML_COMMAND;\n\t\t\t\t} else if (ch == '>') {\n\t\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\t\tstyler.ColourTo(i, SCE_H_SGML_DEFAULT);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_H_SGML_COMMAND:\n\t\t\tif ((ch == '-') && (chPrev == '-')) {\n\t\t\t\tstyler.ColourTo(i - 2, StateToPrint);\n\t\t\t\tstate = SCE_H_SGML_COMMENT;\n\t\t\t} else if (!issgmlwordchar(ch)) {\n\t\t\t\tif (isWordHSGML(styler.GetStartSegment(), i - 1, keywords6, styler)) {\n\t\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\t\tstate = SCE_H_SGML_1ST_PARAM;\n\t\t\t\t} else {\n\t\t\t\t\tstate = SCE_H_SGML_ERROR;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_H_SGML_1ST_PARAM:\n\t\t\t// wait for the beginning of the word\n\t\t\tif ((ch == '-') && (chPrev == '-')) {\n\t\t\t\tif (scriptLanguage == eScriptSGMLblock) {\n\t\t\t\t\tstyler.ColourTo(i - 2, SCE_H_SGML_BLOCK_DEFAULT);\n\t\t\t\t} else {\n\t\t\t\t\tstyler.ColourTo(i - 2, SCE_H_SGML_DEFAULT);\n\t\t\t\t}\n\t\t\t\tstate = SCE_H_SGML_1ST_PARAM_COMMENT;\n\t\t\t} else if (issgmlwordchar(ch)) {\n\t\t\t\tif (scriptLanguage == eScriptSGMLblock) {\n\t\t\t\t\tstyler.ColourTo(i - 1, SCE_H_SGML_BLOCK_DEFAULT);\n\t\t\t\t} else {\n\t\t\t\t\tstyler.ColourTo(i - 1, SCE_H_SGML_DEFAULT);\n\t\t\t\t}\n\t\t\t\t// find the length of the word\n\t\t\t\tSci_Position size = 1;\n\t\t\t\twhile (setHTMLWord.Contains(SafeGetUnsignedCharAt(styler, i + size)))\n\t\t\t\t\tsize++;\n\t\t\t\tstyler.ColourTo(i + size - 1, StateToPrint);\n\t\t\t\ti += size - 1;\n\t\t\t\tvisibleChars += size - 1;\n\t\t\t\tch = SafeGetUnsignedCharAt(styler, i);\n\t\t\t\tif (scriptLanguage == eScriptSGMLblock) {\n\t\t\t\t\tstate = SCE_H_SGML_BLOCK_DEFAULT;\n\t\t\t\t} else {\n\t\t\t\t\tstate = SCE_H_SGML_DEFAULT;\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_H_SGML_ERROR:\n\t\t\tif ((ch == '-') && (chPrev == '-')) {\n\t\t\t\tstyler.ColourTo(i - 2, StateToPrint);\n\t\t\t\tstate = SCE_H_SGML_COMMENT;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_H_SGML_DOUBLESTRING:\n\t\t\tif (ch == '\\\"') {\n\t\t\t\tstyler.ColourTo(i, StateToPrint);\n\t\t\t\tstate = SCE_H_SGML_DEFAULT;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_H_SGML_SIMPLESTRING:\n\t\t\tif (ch == '\\'') {\n\t\t\t\tstyler.ColourTo(i, StateToPrint);\n\t\t\t\tstate = SCE_H_SGML_DEFAULT;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_H_SGML_COMMENT:\n\t\t\tif ((ch == '-') && (chPrev == '-')) {\n\t\t\t\tstyler.ColourTo(i, StateToPrint);\n\t\t\t\tstate = SCE_H_SGML_DEFAULT;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_H_CDATA:\n\t\t\tif ((chPrev2 == ']') && (chPrev == ']') && (ch == '>')) {\n\t\t\t\tstyler.ColourTo(i, StateToPrint);\n\t\t\t\tstate = SCE_H_DEFAULT;\n\t\t\t\tlevelCurrent--;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_H_COMMENT:\n\t\t\tif ((scriptLanguage != eScriptComment) && (chPrev2 == '-') && (chPrev == '-') && (ch == '>' || (!isXml && ch == '!' && chNext == '>'))) {\n\t\t\t\t// close HTML comment with --!>\n\t\t\t\t// https://html.spec.whatwg.org/multipage/parsing.html#parse-error-incorrectly-closed-comment\n\t\t\t\tif (ch == '!') {\n\t\t\t\t\ti += 1;\n\t\t\t\t}\n\t\t\t\tstyler.ColourTo(i, StateToPrint);\n\t\t\t\tstate = SCE_H_DEFAULT;\n\t\t\t\tlevelCurrent--;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_H_SGML_1ST_PARAM_COMMENT:\n\t\t\tif ((ch == '-') && (chPrev == '-')) {\n\t\t\t\tstyler.ColourTo(i, SCE_H_SGML_COMMENT);\n\t\t\t\tstate = SCE_H_SGML_1ST_PARAM;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_H_SGML_SPECIAL:\n\t\t\tif (!IsUpperCase(ch)) {\n\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\tif (IsAlphaNumeric(ch)) {\n\t\t\t\t\tstate = SCE_H_SGML_ERROR;\n\t\t\t\t} else {\n\t\t\t\t\tstate = SCE_H_SGML_DEFAULT;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_H_SGML_ENTITY:\n\t\t\tif (ch == ';') {\n\t\t\t\tstyler.ColourTo(i, StateToPrint);\n\t\t\t\tstate = SCE_H_SGML_DEFAULT;\n\t\t\t} else if (!(IsAlphaNumeric(ch)) && ch != '-' && ch != '.') {\n\t\t\t\tstyler.ColourTo(i, SCE_H_SGML_ERROR);\n\t\t\t\tstate = SCE_H_SGML_DEFAULT;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_H_ENTITY:\n\t\t\tif (ch == ';') {\n\t\t\t\tstyler.ColourTo(i, StateToPrint);\n\t\t\t\tstate = SCE_H_DEFAULT;\n\t\t\t} else if (!setEntity.Contains(ch)) {\n\t\t\t\tstyler.ColourTo(i-1, SCE_H_TAGUNKNOWN);\n\t\t\t\tstate = SCE_H_DEFAULT;\n\t\t\t\tif (!isLineEnd(ch)) {\n\t\t\t\t\t// Retreat one byte so the character that is invalid inside entity\n\t\t\t\t\t// may start something else like a tag.\n\t\t\t\t\t--i;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_H_TAGUNKNOWN:\n\t\t\tif (!setTagContinue.Contains(ch) && !((ch == '/') && (chPrev == '<'))) {\n\t\t\t\tint eClass = classifyTagHTML(styler.GetStartSegment(),\n\t\t\t\t\ti - 1, keywords, classifierTags, styler, tagDontFold, caseSensitive, isXml, allowScripts, nonFoldingTags, lastTag);\n\t\t\t\tif (eClass == SCE_H_SCRIPT || eClass == SCE_H_COMMENT) {\n\t\t\t\t\tif (!tagClosing) {\n\t\t\t\t\t\tinScriptType = eNonHtmlScript;\n\t\t\t\t\t\tscriptLanguage = eClass == SCE_H_SCRIPT ? clientScript : eScriptComment;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tscriptLanguage = eScriptNone;\n\t\t\t\t\t}\n\t\t\t\t\tisLanguageType = false;\n\t\t\t\t\teClass = SCE_H_TAG;\n\t\t\t\t}\n\t\t\t\tif (ch == '>') {\n\t\t\t\t\tstyler.ColourTo(i, eClass);\n\t\t\t\t\tif (inScriptType == eNonHtmlScript) {\n\t\t\t\t\t\tstate = StateForScript(scriptLanguage);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstate = SCE_H_DEFAULT;\n\t\t\t\t\t}\n\t\t\t\t\ttagOpened = false;\n\t\t\t\t\tif (!(foldXmlAtTagOpen || tagDontFold)) {\n\t\t\t\t\t\tif (tagClosing) {\n\t\t\t\t\t\t\tlevelCurrent--;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tlevelCurrent++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\ttagClosing = false;\n\t\t\t\t} else if (ch == '/' && chNext == '>') {\n\t\t\t\t\tif (eClass == SCE_H_TAGUNKNOWN) {\n\t\t\t\t\t\tstyler.ColourTo(i + 1, SCE_H_TAGUNKNOWN);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\t\t\tstyler.ColourTo(i + 1, SCE_H_TAGEND);\n\t\t\t\t\t}\n\t\t\t\t\ti++;\n\t\t\t\t\tch = chNext;\n\t\t\t\t\tstate = SCE_H_DEFAULT;\n\t\t\t\t\ttagOpened = false;\n\t\t\t\t\tif (foldXmlAtTagOpen) {\n\t\t\t\t\t\tlevelCurrent--;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (eClass != SCE_H_TAGUNKNOWN) {\n\t\t\t\t\t\tif (eClass == SCE_H_SGML_DEFAULT) {\n\t\t\t\t\t\t\tstate = SCE_H_SGML_DEFAULT;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tstate = SCE_H_OTHER;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_H_ATTRIBUTE:\n\t\t\tif (!setAttributeContinue.Contains(ch)) {\n\t\t\t\tisLanguageType = classifyAttribHTML(inScriptType, styler.GetStartSegment(), i - 1, keywords, classifierAttributes, styler, lastTag);\n\t\t\t\tif (ch == '>') {\n\t\t\t\t\tstyler.ColourTo(i, SCE_H_TAG);\n\t\t\t\t\tif (inScriptType == eNonHtmlScript) {\n\t\t\t\t\t\tstate = StateForScript(scriptLanguage);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstate = SCE_H_DEFAULT;\n\t\t\t\t\t}\n\t\t\t\t\ttagOpened = false;\n\t\t\t\t\tif (!(foldXmlAtTagOpen || tagDontFold)) {\n\t\t\t\t\t\tif (tagClosing) {\n\t\t\t\t\t\t\tlevelCurrent--;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tlevelCurrent++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\ttagClosing = false;\n\t\t\t\t} else if (ch == '=') {\n\t\t\t\t\tstyler.ColourTo(i, SCE_H_OTHER);\n\t\t\t\t\tstate = SCE_H_VALUE;\n\t\t\t\t} else {\n\t\t\t\t\tstate = SCE_H_OTHER;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_H_OTHER:\n\t\t\tif (ch == '>') {\n\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\tstyler.ColourTo(i, SCE_H_TAG);\n\t\t\t\tif (inScriptType == eNonHtmlScript) {\n\t\t\t\t\tstate = StateForScript(scriptLanguage);\n\t\t\t\t} else {\n\t\t\t\t\tstate = SCE_H_DEFAULT;\n\t\t\t\t}\n\t\t\t\ttagOpened = false;\n\t\t\t\tif (!(foldXmlAtTagOpen || tagDontFold)) {\n\t\t\t\t\tif (tagClosing) {\n\t\t\t\t\t\tlevelCurrent--;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlevelCurrent++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttagClosing = false;\n\t\t\t} else if (ch == '\\\"') {\n\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\tstate = SCE_H_DOUBLESTRING;\n\t\t\t} else if (ch == '\\'') {\n\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\tstate = SCE_H_SINGLESTRING;\n\t\t\t} else if (ch == '=') {\n\t\t\t\tstyler.ColourTo(i, StateToPrint);\n\t\t\t\tstate = SCE_H_VALUE;\n\t\t\t} else if (ch == '/' && chNext == '>') {\n\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\tstyler.ColourTo(i + 1, SCE_H_TAGEND);\n\t\t\t\ti++;\n\t\t\t\tch = chNext;\n\t\t\t\tstate = SCE_H_DEFAULT;\n\t\t\t\ttagOpened = false;\n\t\t\t\tif (foldXmlAtTagOpen) {\n\t\t\t\t\tlevelCurrent--;\n\t\t\t\t}\n\t\t\t} else if (ch == '?' && chNext == '>') {\n\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\tstyler.ColourTo(i + 1, SCE_H_XMLEND);\n\t\t\t\ti++;\n\t\t\t\tch = chNext;\n\t\t\t\tstate = SCE_H_DEFAULT;\n\t\t\t} else if (setHTMLWord.Contains(ch)) {\n\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\tstate = SCE_H_ATTRIBUTE;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_H_DOUBLESTRING:\n\t\t\tif (ch == '\\\"') {\n\t\t\t\tif (isLanguageType) {\n\t\t\t\t\tscriptLanguage = segIsScriptingIndicator(styler, styler.GetStartSegment(), i, scriptLanguage);\n\t\t\t\t\tclientScript = scriptLanguage;\n\t\t\t\t\tisLanguageType = false;\n\t\t\t\t}\n\t\t\t\tstyler.ColourTo(i, SCE_H_DOUBLESTRING);\n\t\t\t\tstate = SCE_H_OTHER;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_H_SINGLESTRING:\n\t\t\tif (ch == '\\'') {\n\t\t\t\tif (isLanguageType) {\n\t\t\t\t\tscriptLanguage = segIsScriptingIndicator(styler, styler.GetStartSegment(), i, scriptLanguage);\n\t\t\t\t\tclientScript = scriptLanguage;\n\t\t\t\t\tisLanguageType = false;\n\t\t\t\t}\n\t\t\t\tstyler.ColourTo(i, SCE_H_SINGLESTRING);\n\t\t\t\tstate = SCE_H_OTHER;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_H_VALUE:\n\t\t\tif (!setHTMLWord.Contains(ch)) {\n\t\t\t\tif (ch == '\\\"' && chPrev == '=') {\n\t\t\t\t\t// Should really test for being first character\n\t\t\t\t\tstate = SCE_H_DOUBLESTRING;\n\t\t\t\t} else if (ch == '\\'' && chPrev == '=') {\n\t\t\t\t\tstate = SCE_H_SINGLESTRING;\n\t\t\t\t} else {\n\t\t\t\t\tif (IsNumberChar(styler[styler.GetStartSegment()])) {\n\t\t\t\t\t\tstyler.ColourTo(i - 1, SCE_H_NUMBER);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\t\t}\n\t\t\t\t\tif (ch == '>') {\n\t\t\t\t\t\tstyler.ColourTo(i, SCE_H_TAG);\n\t\t\t\t\t\tif (inScriptType == eNonHtmlScript) {\n\t\t\t\t\t\t\tstate = StateForScript(scriptLanguage);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tstate = SCE_H_DEFAULT;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttagOpened = false;\n\t\t\t\t\t\tif (!tagDontFold) {\n\t\t\t\t\t\t\tif (tagClosing) {\n\t\t\t\t\t\t\t\tlevelCurrent--;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tlevelCurrent++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttagClosing = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstate = SCE_H_OTHER;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_HJ_DEFAULT:\n\t\tcase SCE_HJ_START:\n\t\tcase SCE_HJ_SYMBOLS:\n\t\t\tif (IsAWordStart(ch)) {\n\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\tstate = SCE_HJ_WORD;\n\t\t\t} else if (ch == '/' && chNext == '*') {\n\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\tif (chNext2 == '*')\n\t\t\t\t\tstate = SCE_HJ_COMMENTDOC;\n\t\t\t\telse\n\t\t\t\t\tstate = SCE_HJ_COMMENT;\n\t\t\t\tif (chNext2 == '/') {\n\t\t\t\t\t// Eat the * so it isn't used for the end of the comment\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t} else if (ch == '/' && chNext == '/') {\n\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\tstate = SCE_HJ_COMMENTLINE;\n\t\t\t} else if (ch == '/' && setOKBeforeJSRE.Contains(chPrevNonWhite)) {\n\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\tstate = SCE_HJ_REGEX;\n\t\t\t} else if (ch == '\\\"') {\n\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\tstate = SCE_HJ_DOUBLESTRING;\n\t\t\t} else if (ch == '\\'') {\n\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\tstate = SCE_HJ_SINGLESTRING;\n\t\t\t} else if ((ch == '<') && (chNext == '!') && (chNext2 == '-') &&\n\t\t\t           styler.SafeGetCharAt(i + 3) == '-') {\n\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\tstate = SCE_HJ_COMMENTLINE;\n\t\t\t} else if ((ch == '-') && (chNext == '-') && (chNext2 == '>')) {\n\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\tstate = SCE_HJ_COMMENTLINE;\n\t\t\t\ti += 2;\n\t\t\t} else if (IsOperator(ch)) {\n\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\tstyler.ColourTo(i, statePrintForState(SCE_HJ_SYMBOLS, inScriptType));\n\t\t\t\tstate = SCE_HJ_DEFAULT;\n\t\t\t} else if ((ch == ' ') || (ch == '\\t')) {\n\t\t\t\tif (state == SCE_HJ_START) {\n\t\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\t\tstate = SCE_HJ_DEFAULT;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_HJ_WORD:\n\t\t\tif (!IsAWordChar(ch)) {\n\t\t\t\tclassifyWordHTJS(styler.GetStartSegment(), i - 1, keywords2,\n\t\t\t\t\tclassifierJavaScript, classifierJavaScriptServer, styler, inScriptType);\n\t\t\t\t//styler.ColourTo(i - 1, eHTJSKeyword);\n\t\t\t\tstate = SCE_HJ_DEFAULT;\n\t\t\t\tif (ch == '/' && chNext == '*') {\n\t\t\t\t\tif (chNext2 == '*')\n\t\t\t\t\t\tstate = SCE_HJ_COMMENTDOC;\n\t\t\t\t\telse\n\t\t\t\t\t\tstate = SCE_HJ_COMMENT;\n\t\t\t\t} else if (ch == '/' && chNext == '/') {\n\t\t\t\t\tstate = SCE_HJ_COMMENTLINE;\n\t\t\t\t} else if (ch == '\\\"') {\n\t\t\t\t\tstate = SCE_HJ_DOUBLESTRING;\n\t\t\t\t} else if (ch == '\\'') {\n\t\t\t\t\tstate = SCE_HJ_SINGLESTRING;\n\t\t\t\t} else if ((ch == '-') && (chNext == '-') && (chNext2 == '>')) {\n\t\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\t\tstate = SCE_HJ_COMMENTLINE;\n\t\t\t\t\ti += 2;\n\t\t\t\t} else if (IsOperator(ch)) {\n\t\t\t\t\tstyler.ColourTo(i, statePrintForState(SCE_HJ_SYMBOLS, inScriptType));\n\t\t\t\t\tstate = SCE_HJ_DEFAULT;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_HJ_COMMENT:\n\t\tcase SCE_HJ_COMMENTDOC:\n\t\t\tif (ch == '/' && chPrev == '*') {\n\t\t\t\tstyler.ColourTo(i, StateToPrint);\n\t\t\t\tstate = SCE_HJ_DEFAULT;\n\t\t\t\tch = ' ';\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_HJ_COMMENTLINE:\n\t\t\tif (ch == '\\r' || ch == '\\n') {\n\t\t\t\tstyler.ColourTo(i - 1, statePrintForState(SCE_HJ_COMMENTLINE, inScriptType));\n\t\t\t\tstate = SCE_HJ_DEFAULT;\n\t\t\t\tch = ' ';\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_HJ_DOUBLESTRING:\n\t\t\tif (ch == '\\\\') {\n\t\t\t\tif (chNext == '\\\"' || chNext == '\\'' || chNext == '\\\\') {\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t} else if (ch == '\\\"') {\n\t\t\t\tstyler.ColourTo(i, statePrintForState(SCE_HJ_DOUBLESTRING, inScriptType));\n\t\t\t\tstate = SCE_HJ_DEFAULT;\n\t\t\t} else if (isLineEnd(ch)) {\n\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\tif (chPrev != '\\\\' && (chPrev2 != '\\\\' || chPrev != '\\r' || ch != '\\n')) {\n\t\t\t\t\tstate = SCE_HJ_STRINGEOL;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_HJ_SINGLESTRING:\n\t\t\tif (ch == '\\\\') {\n\t\t\t\tif (chNext == '\\\"' || chNext == '\\'' || chNext == '\\\\') {\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t} else if (ch == '\\'') {\n\t\t\t\tstyler.ColourTo(i, statePrintForState(SCE_HJ_SINGLESTRING, inScriptType));\n\t\t\t\tstate = SCE_HJ_DEFAULT;\n\t\t\t} else if (isLineEnd(ch)) {\n\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\tif (chPrev != '\\\\' && (chPrev2 != '\\\\' || chPrev != '\\r' || ch != '\\n')) {\n\t\t\t\t\tstate = SCE_HJ_STRINGEOL;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_HJ_STRINGEOL:\n\t\t\tif (!isLineEnd(ch)) {\n\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\tstate = SCE_HJ_DEFAULT;\n\t\t\t} else if (!isLineEnd(chNext)) {\n\t\t\t\tstyler.ColourTo(i, StateToPrint);\n\t\t\t\tstate = SCE_HJ_DEFAULT;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_HJ_REGEX:\n\t\t\tif (ch == '\\r' || ch == '\\n' || ch == '/') {\n\t\t\t\tif (ch == '/') {\n\t\t\t\t\twhile (IsLowerCase(chNext)) {   // gobble regex flags\n\t\t\t\t\t\ti++;\n\t\t\t\t\t\tch = chNext;\n\t\t\t\t\t\tchNext = SafeGetUnsignedCharAt(styler, i + 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstyler.ColourTo(i, StateToPrint);\n\t\t\t\tstate = SCE_HJ_DEFAULT;\n\t\t\t} else if (ch == '\\\\') {\n\t\t\t\t// Gobble up the quoted character\n\t\t\t\tif (chNext == '\\\\' || chNext == '/') {\n\t\t\t\t\ti++;\n\t\t\t\t\tch = chNext;\n\t\t\t\t\tchNext = SafeGetUnsignedCharAt(styler, i + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_HB_DEFAULT:\n\t\tcase SCE_HB_START:\n\t\t\tif (IsAWordStart(ch)) {\n\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\tstate = SCE_HB_WORD;\n\t\t\t} else if (ch == '\\'') {\n\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\tstate = SCE_HB_COMMENTLINE;\n\t\t\t} else if (ch == '\\\"') {\n\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\tstate = SCE_HB_STRING;\n\t\t\t} else if ((ch == '<') && (chNext == '!') && (chNext2 == '-') &&\n\t\t\t           styler.SafeGetCharAt(i + 3) == '-') {\n\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\tstate = SCE_HB_COMMENTLINE;\n\t\t\t} else if (IsOperator(ch)) {\n\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\tstyler.ColourTo(i, statePrintForState(SCE_HB_DEFAULT, inScriptType));\n\t\t\t\tstate = SCE_HB_DEFAULT;\n\t\t\t} else if ((ch == ' ') || (ch == '\\t')) {\n\t\t\t\tif (state == SCE_HB_START) {\n\t\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\t\tstate = SCE_HB_DEFAULT;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_HB_WORD:\n\t\t\tif (!IsAWordChar(ch)) {\n\t\t\t\tstate = classifyWordHTVB(styler.GetStartSegment(), i - 1, keywords3, classifierBasic, styler, inScriptType);\n\t\t\t\tif (state == SCE_HB_DEFAULT) {\n\t\t\t\t\tif (ch == '\\\"') {\n\t\t\t\t\t\tstate = SCE_HB_STRING;\n\t\t\t\t\t} else if (ch == '\\'') {\n\t\t\t\t\t\tstate = SCE_HB_COMMENTLINE;\n\t\t\t\t\t} else if (IsOperator(ch)) {\n\t\t\t\t\t\tstyler.ColourTo(i, statePrintForState(SCE_HB_DEFAULT, inScriptType));\n\t\t\t\t\t\tstate = SCE_HB_DEFAULT;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_HB_STRING:\n\t\t\tif (ch == '\\\"') {\n\t\t\t\tstyler.ColourTo(i, StateToPrint);\n\t\t\t\tstate = SCE_HB_DEFAULT;\n\t\t\t} else if (ch == '\\r' || ch == '\\n') {\n\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\tstate = SCE_HB_STRINGEOL;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_HB_COMMENTLINE:\n\t\t\tif (ch == '\\r' || ch == '\\n') {\n\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\tstate = SCE_HB_DEFAULT;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_HB_STRINGEOL:\n\t\t\tif (!isLineEnd(ch)) {\n\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\tstate = SCE_HB_DEFAULT;\n\t\t\t} else if (!isLineEnd(chNext)) {\n\t\t\t\tstyler.ColourTo(i, StateToPrint);\n\t\t\t\tstate = SCE_HB_DEFAULT;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_HP_DEFAULT:\n\t\tcase SCE_HP_START:\n\t\t\tif (IsAWordStart(ch)) {\n\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\tstate = SCE_HP_WORD;\n\t\t\t} else if ((ch == '<') && (chNext == '!') && (chNext2 == '-') &&\n\t\t\t           styler.SafeGetCharAt(i + 3) == '-') {\n\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\tstate = SCE_HP_COMMENTLINE;\n\t\t\t} else if (ch == '#') {\n\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\tstate = SCE_HP_COMMENTLINE;\n\t\t\t} else if (ch == '\\\"') {\n\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\tif (chNext == '\\\"' && chNext2 == '\\\"') {\n\t\t\t\t\ti += 2;\n\t\t\t\t\tstate = SCE_HP_TRIPLEDOUBLE;\n\t\t\t\t\tch = ' ';\n\t\t\t\t\tchPrev = ' ';\n\t\t\t\t\tchNext = SafeGetUnsignedCharAt(styler, i + 1);\n\t\t\t\t} else {\n\t\t\t\t\t//\t\t\t\t\tstate = statePrintForState(SCE_HP_STRING,inScriptType);\n\t\t\t\t\tstate = SCE_HP_STRING;\n\t\t\t\t}\n\t\t\t} else if (ch == '\\'') {\n\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\tif (chNext == '\\'' && chNext2 == '\\'') {\n\t\t\t\t\ti += 2;\n\t\t\t\t\tstate = SCE_HP_TRIPLE;\n\t\t\t\t\tch = ' ';\n\t\t\t\t\tchPrev = ' ';\n\t\t\t\t\tchNext = SafeGetUnsignedCharAt(styler, i + 1);\n\t\t\t\t} else {\n\t\t\t\t\tstate = SCE_HP_CHARACTER;\n\t\t\t\t}\n\t\t\t} else if (IsOperator(ch)) {\n\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\tstyler.ColourTo(i, statePrintForState(SCE_HP_OPERATOR, inScriptType));\n\t\t\t} else if ((ch == ' ') || (ch == '\\t')) {\n\t\t\t\tif (state == SCE_HP_START) {\n\t\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\t\tstate = SCE_HP_DEFAULT;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_HP_WORD:\n\t\t\tif (!IsAWordChar(ch)) {\n\t\t\t\tclassifyWordHTPy(styler.GetStartSegment(), i - 1, keywords4, classifierPython, styler, prevWord, inScriptType, isMako);\n\t\t\t\tstate = SCE_HP_DEFAULT;\n\t\t\t\tif (ch == '#') {\n\t\t\t\t\tstate = SCE_HP_COMMENTLINE;\n\t\t\t\t} else if (ch == '\\\"') {\n\t\t\t\t\tif (chNext == '\\\"' && chNext2 == '\\\"') {\n\t\t\t\t\t\ti += 2;\n\t\t\t\t\t\tstate = SCE_HP_TRIPLEDOUBLE;\n\t\t\t\t\t\tch = ' ';\n\t\t\t\t\t\tchPrev = ' ';\n\t\t\t\t\t\tchNext = SafeGetUnsignedCharAt(styler, i + 1);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstate = SCE_HP_STRING;\n\t\t\t\t\t}\n\t\t\t\t} else if (ch == '\\'') {\n\t\t\t\t\tif (chNext == '\\'' && chNext2 == '\\'') {\n\t\t\t\t\t\ti += 2;\n\t\t\t\t\t\tstate = SCE_HP_TRIPLE;\n\t\t\t\t\t\tch = ' ';\n\t\t\t\t\t\tchPrev = ' ';\n\t\t\t\t\t\tchNext = SafeGetUnsignedCharAt(styler, i + 1);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstate = SCE_HP_CHARACTER;\n\t\t\t\t\t}\n\t\t\t\t} else if (IsOperator(ch)) {\n\t\t\t\t\tstyler.ColourTo(i, statePrintForState(SCE_HP_OPERATOR, inScriptType));\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_HP_COMMENTLINE:\n\t\t\tif (ch == '\\r' || ch == '\\n') {\n\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\tstate = SCE_HP_DEFAULT;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_HP_STRING:\n\t\t\tif (ch == '\\\\') {\n\t\t\t\tif (chNext == '\\\"' || chNext == '\\'' || chNext == '\\\\') {\n\t\t\t\t\ti++;\n\t\t\t\t\tch = chNext;\n\t\t\t\t\tchNext = SafeGetUnsignedCharAt(styler, i + 1);\n\t\t\t\t}\n\t\t\t} else if (ch == '\\\"') {\n\t\t\t\tstyler.ColourTo(i, StateToPrint);\n\t\t\t\tstate = SCE_HP_DEFAULT;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_HP_CHARACTER:\n\t\t\tif (ch == '\\\\') {\n\t\t\t\tif (chNext == '\\\"' || chNext == '\\'' || chNext == '\\\\') {\n\t\t\t\t\ti++;\n\t\t\t\t\tch = chNext;\n\t\t\t\t\tchNext = SafeGetUnsignedCharAt(styler, i + 1);\n\t\t\t\t}\n\t\t\t} else if (ch == '\\'') {\n\t\t\t\tstyler.ColourTo(i, StateToPrint);\n\t\t\t\tstate = SCE_HP_DEFAULT;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_HP_TRIPLE:\n\t\t\tif (ch == '\\'' && chPrev == '\\'' && chPrev2 == '\\'') {\n\t\t\t\tstyler.ColourTo(i, StateToPrint);\n\t\t\t\tstate = SCE_HP_DEFAULT;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_HP_TRIPLEDOUBLE:\n\t\t\tif (ch == '\\\"' && chPrev == '\\\"' && chPrev2 == '\\\"') {\n\t\t\t\tstyler.ColourTo(i, StateToPrint);\n\t\t\t\tstate = SCE_HP_DEFAULT;\n\t\t\t}\n\t\t\tbreak;\n\t\t\t///////////// start - PHP state handling\n\t\tcase SCE_HPHP_WORD:\n\t\t\tif (!IsPhpWordChar(ch)) {\n\t\t\t\tclassifyWordHTPHP(styler.GetStartSegment(), i - 1, keywords5, classifierPHP, styler);\n\t\t\t\tif (ch == '/' && chNext == '*') {\n\t\t\t\t\ti++;\n\t\t\t\t\tstate = SCE_HPHP_COMMENT;\n\t\t\t\t} else if (ch == '/' && chNext == '/') {\n\t\t\t\t\ti++;\n\t\t\t\t\tstate = SCE_HPHP_COMMENTLINE;\n\t\t\t\t} else if (ch == '#' && chNext != '[') {\n\t\t\t\t\tstate = SCE_HPHP_COMMENTLINE;\n\t\t\t\t} else if (ch == '\\\"') {\n\t\t\t\t\tstate = SCE_HPHP_HSTRING;\n\t\t\t\t\tphpStringDelimiter = \"\\\"\";\n\t\t\t\t} else if (styler.Match(i, \"<<<\")) {\n\t\t\t\t\tbool isSimpleString = false;\n\t\t\t\t\ti = FindPhpStringDelimiter(phpStringDelimiter, i + 3, lengthDoc, styler, isSimpleString);\n\t\t\t\t\tif (!phpStringDelimiter.empty()) {\n\t\t\t\t\t\tstate = (isSimpleString ? SCE_HPHP_SIMPLESTRING : SCE_HPHP_HSTRING);\n\t\t\t\t\t\tif (foldHeredoc) levelCurrent++;\n\t\t\t\t\t}\n\t\t\t\t} else if (ch == '\\'') {\n\t\t\t\t\tstate = SCE_HPHP_SIMPLESTRING;\n\t\t\t\t\tphpStringDelimiter = \"\\'\";\n\t\t\t\t} else if (ch == '$' && IsPhpWordStart(chNext)) {\n\t\t\t\t\tstate = SCE_HPHP_VARIABLE;\n\t\t\t\t} else if (IsOperator(ch)) {\n\t\t\t\t\tstate = SCE_HPHP_OPERATOR;\n\t\t\t\t} else {\n\t\t\t\t\tstate = SCE_HPHP_DEFAULT;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_HPHP_NUMBER:\n\t\t\tif (phpNumber.check(chNext, chNext2)) {\n\t\t\t\tstyler.ColourTo(i, phpNumber.isInvalid() ? SCE_HPHP_DEFAULT : SCE_HPHP_NUMBER);\n\t\t\t\tstate = SCE_HPHP_DEFAULT;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_HPHP_VARIABLE:\n\t\t\tif (!IsPhpWordChar(chNext)) {\n\t\t\t\tstyler.ColourTo(i, SCE_HPHP_VARIABLE);\n\t\t\t\tstate = SCE_HPHP_DEFAULT;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_HPHP_COMMENT:\n\t\t\tif (ch == '/' && chPrev == '*') {\n\t\t\t\tstyler.ColourTo(i, StateToPrint);\n\t\t\t\tstate = SCE_HPHP_DEFAULT;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_HPHP_COMMENTLINE:\n\t\t\tif (ch == '\\r' || ch == '\\n') {\n\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\tstate = SCE_HPHP_DEFAULT;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_HPHP_HSTRING:\n\t\t\tif (ch == '\\\\' && ((phpStringDelimiter == \"\\\"\") || chNext == '$' || chNext == '{')) {\n\t\t\t\t// skip the next char\n\t\t\t\ti++;\n\t\t\t} else if (((ch == '{' && chNext == '$') || (ch == '$' && chNext == '{'))\n\t\t\t\t&& IsPhpWordStart(chNext2)) {\n\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\tstate = SCE_HPHP_COMPLEX_VARIABLE;\n\t\t\t} else if (ch == '$' && IsPhpWordStart(chNext)) {\n\t\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\t\tstate = SCE_HPHP_HSTRING_VARIABLE;\n\t\t\t} else if (styler.Match(i, phpStringDelimiter.c_str())) {\n\t\t\t\tif (phpStringDelimiter == \"\\\"\") {\n\t\t\t\t\tstyler.ColourTo(i, StateToPrint);\n\t\t\t\t\tstate = SCE_HPHP_DEFAULT;\n\t\t\t\t} else if (lineStartVisibleChars == 1) {\n\t\t\t\t\tconst int psdLength = static_cast<int>(phpStringDelimiter.length());\n\t\t\t\t\tif (!IsPhpWordChar(styler.SafeGetCharAt(i + psdLength))) {\n\t\t\t\t\t\ti += (((i + psdLength) < lengthDoc) ? psdLength : lengthDoc) - 1;\n\t\t\t\t\t\tstyler.ColourTo(i, StateToPrint);\n\t\t\t\t\t\tstate = SCE_HPHP_DEFAULT;\n\t\t\t\t\t\tif (foldHeredoc) levelCurrent--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_HPHP_SIMPLESTRING:\n\t\t\tif (phpStringDelimiter == \"\\'\") {\n\t\t\t\tif (ch == '\\\\') {\n\t\t\t\t\t// skip the next char\n\t\t\t\t\ti++;\n\t\t\t\t} else if (ch == '\\'') {\n\t\t\t\t\tstyler.ColourTo(i, StateToPrint);\n\t\t\t\t\tstate = SCE_HPHP_DEFAULT;\n\t\t\t\t}\n\t\t\t} else if (lineStartVisibleChars == 1 && styler.Match(i, phpStringDelimiter.c_str())) {\n\t\t\t\tconst int psdLength = static_cast<int>(phpStringDelimiter.length());\n\t\t\t\tif (!IsPhpWordChar(styler.SafeGetCharAt(i + psdLength))) {\n\t\t\t\t\ti += (((i + psdLength) < lengthDoc) ? psdLength : lengthDoc) - 1;\n\t\t\t\t\tstyler.ColourTo(i, StateToPrint);\n\t\t\t\t\tstate = SCE_HPHP_DEFAULT;\n\t\t\t\t\tif (foldHeredoc) levelCurrent--;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_HPHP_HSTRING_VARIABLE:\n\t\t\tif (!IsPhpWordChar(chNext)) {\n\t\t\t\tstyler.ColourTo(i, StateToPrint);\n\t\t\t\tstate = SCE_HPHP_HSTRING;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_HPHP_COMPLEX_VARIABLE:\n\t\t\tif (ch == '}') {\n\t\t\t\tstyler.ColourTo(i, StateToPrint);\n\t\t\t\tstate = SCE_HPHP_HSTRING;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_HPHP_OPERATOR:\n\t\tcase SCE_HPHP_DEFAULT:\n\t\t\tstyler.ColourTo(i - 1, StateToPrint);\n\t\t\tif (phpNumber.init(ch, chNext, chNext2)) {\n\t\t\t\tif (phpNumber.isFinished()) {\n\t\t\t\t\tstyler.ColourTo(i, phpNumber.isInvalid() ? SCE_HPHP_DEFAULT : SCE_HPHP_NUMBER);\n\t\t\t\t\tstate = SCE_HPHP_DEFAULT;\n\t\t\t\t} else {\n\t\t\t\t\tstate = SCE_HPHP_NUMBER;\n\t\t\t\t}\n\t\t\t} else if (IsAWordStart(ch)) {\n\t\t\t\tstate = SCE_HPHP_WORD;\n\t\t\t} else if (ch == '/' && chNext == '*') {\n\t\t\t\ti++;\n\t\t\t\tstate = SCE_HPHP_COMMENT;\n\t\t\t} else if (ch == '/' && chNext == '/') {\n\t\t\t\ti++;\n\t\t\t\tstate = SCE_HPHP_COMMENTLINE;\n\t\t\t} else if (ch == '#' && chNext != '[') {\n\t\t\t\tstate = SCE_HPHP_COMMENTLINE;\n\t\t\t} else if (ch == '\\\"') {\n\t\t\t\tstate = SCE_HPHP_HSTRING;\n\t\t\t\tphpStringDelimiter = \"\\\"\";\n\t\t\t} else if (styler.Match(i, \"<<<\")) {\n\t\t\t\tbool isSimpleString = false;\n\t\t\t\ti = FindPhpStringDelimiter(phpStringDelimiter, i + 3, lengthDoc, styler, isSimpleString);\n\t\t\t\tif (!phpStringDelimiter.empty()) {\n\t\t\t\t\tstate = (isSimpleString ? SCE_HPHP_SIMPLESTRING : SCE_HPHP_HSTRING);\n\t\t\t\t\tif (foldHeredoc) levelCurrent++;\n\t\t\t\t}\n\t\t\t} else if (ch == '\\'') {\n\t\t\t\tstate = SCE_HPHP_SIMPLESTRING;\n\t\t\t\tphpStringDelimiter = \"\\'\";\n\t\t\t} else if (ch == '$' && IsPhpWordStart(chNext)) {\n\t\t\t\tstate = SCE_HPHP_VARIABLE;\n\t\t\t} else if (IsOperator(ch)) {\n\t\t\t\tstate = SCE_HPHP_OPERATOR;\n\t\t\t} else if ((state == SCE_HPHP_OPERATOR) && (IsASpace(ch))) {\n\t\t\t\tstate = SCE_HPHP_DEFAULT;\n\t\t\t}\n\t\t\tbreak;\n\t\t\t///////////// end - PHP state handling\n\t\t}\n\n\t\t// Some of the above terminated their lexeme but since the same character starts\n\t\t// the same class again, only reenter if non empty segment.\n\n\t\tconst bool nonEmptySegment = i >= static_cast<Sci_Position>(styler.GetStartSegment());\n\t\tif (state == SCE_HB_DEFAULT) {    // One of the above succeeded\n\t\t\tif ((ch == '\\\"') && (nonEmptySegment)) {\n\t\t\t\tstate = SCE_HB_STRING;\n\t\t\t} else if (ch == '\\'') {\n\t\t\t\tstate = SCE_HB_COMMENTLINE;\n\t\t\t} else if (IsAWordStart(ch)) {\n\t\t\t\tstate = SCE_HB_WORD;\n\t\t\t} else if (IsOperator(ch)) {\n\t\t\t\tstyler.ColourTo(i, SCE_HB_DEFAULT);\n\t\t\t}\n\t\t} else if (state == SCE_HBA_DEFAULT) {    // One of the above succeeded\n\t\t\tif ((ch == '\\\"') && (nonEmptySegment)) {\n\t\t\t\tstate = SCE_HBA_STRING;\n\t\t\t} else if (ch == '\\'') {\n\t\t\t\tstate = SCE_HBA_COMMENTLINE;\n\t\t\t} else if (IsAWordStart(ch)) {\n\t\t\t\tstate = SCE_HBA_WORD;\n\t\t\t} else if (IsOperator(ch)) {\n\t\t\t\tstyler.ColourTo(i, SCE_HBA_DEFAULT);\n\t\t\t}\n\t\t} else if (state == SCE_HJ_DEFAULT) {    // One of the above succeeded\n\t\t\tif (ch == '/' && chNext == '*') {\n\t\t\t\tif (styler.SafeGetCharAt(i + 2) == '*')\n\t\t\t\t\tstate = SCE_HJ_COMMENTDOC;\n\t\t\t\telse\n\t\t\t\t\tstate = SCE_HJ_COMMENT;\n\t\t\t} else if (ch == '/' && chNext == '/') {\n\t\t\t\tstate = SCE_HJ_COMMENTLINE;\n\t\t\t} else if ((ch == '\\\"') && (nonEmptySegment)) {\n\t\t\t\tstate = SCE_HJ_DOUBLESTRING;\n\t\t\t} else if ((ch == '\\'') && (nonEmptySegment)) {\n\t\t\t\tstate = SCE_HJ_SINGLESTRING;\n\t\t\t} else if (IsAWordStart(ch)) {\n\t\t\t\tstate = SCE_HJ_WORD;\n\t\t\t} else if (IsOperator(ch)) {\n\t\t\t\tstyler.ColourTo(i, statePrintForState(SCE_HJ_SYMBOLS, inScriptType));\n\t\t\t}\n\t\t}\n\t}\n\n\tswitch (state) {\n\tcase SCE_HJ_WORD:\n\t\tclassifyWordHTJS(styler.GetStartSegment(), lengthDoc - 1, keywords2,\n\t\t\tclassifierJavaScript, classifierJavaScriptServer, styler, inScriptType);\n\t\tbreak;\n\tcase SCE_HB_WORD:\n\t\tclassifyWordHTVB(styler.GetStartSegment(), lengthDoc - 1, keywords3, classifierBasic, styler, inScriptType);\n\t\tbreak;\n\tcase SCE_HP_WORD:\n\t\tclassifyWordHTPy(styler.GetStartSegment(), lengthDoc - 1, keywords4, classifierPython, styler, prevWord, inScriptType, isMako);\n\t\tbreak;\n\tcase SCE_HPHP_WORD:\n\t\tclassifyWordHTPHP(styler.GetStartSegment(), lengthDoc - 1, keywords5, classifierPHP, styler);\n\t\tbreak;\n\tdefault:\n\t\tStateToPrint = statePrintForState(state, inScriptType);\n\t\tif (static_cast<Sci_Position>(styler.GetStartSegment()) < lengthDoc)\n\t\t\tstyler.ColourTo(lengthDoc - 1, StateToPrint);\n\t\tbreak;\n\t}\n\n\t// Fill in the real level of the next line, keeping the current flags as they will be filled in later\n\tif (fold) {\n\t\tconst int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK;\n\t\tstyler.SetLevel(lineCurrent, levelPrev | flagsNext);\n\t}\n\tstyler.Flush();\n}\n\nLexerModule lmHTML(SCLEX_HTML, LexerHTML::LexerFactoryHTML, \"hypertext\", htmlWordListDesc);\nLexerModule lmXML(SCLEX_XML, LexerHTML::LexerFactoryXML, \"xml\", htmlWordListDesc);\nLexerModule lmPHPSCRIPT(SCLEX_PHPSCRIPT, LexerHTML::LexerFactoryPHPScript, \"phpscript\", phpscriptWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexHaskell.cxx",
    "content": "/******************************************************************\n *    LexHaskell.cxx\n *\n *    A haskell lexer for the scintilla code control.\n *    Some stuff \"lended\" from LexPython.cxx and LexCPP.cxx.\n *    External lexer stuff inspired from the caml external lexer.\n *    Folder copied from Python's.\n *\n *    Written by Tobias Engvall - tumm at dtek dot chalmers dot se\n *\n *    Several bug fixes by Krasimir Angelov - kr.angelov at gmail.com\n *\n *    Improved by kudah <kudahkukarek@gmail.com>\n *\n *    TODO:\n *    * A proper lexical folder to fold group declarations, comments, pragmas,\n *      #ifdefs, explicit layout, lists, tuples, quasi-quotes, splces, etc, etc,\n *      etc.\n *\n *****************************************************************/\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n#include <vector>\n#include <map>\n#include <functional>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"PropSetSimple.h\"\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"CharacterCategory.h\"\n#include \"LexerModule.h\"\n#include \"OptionSet.h\"\n#include \"DefaultLexer.h\"\n\nusing namespace Scintilla;\nusing namespace Lexilla;\n\n// See https://github.com/ghc/ghc/blob/master/compiler/parser/Lexer.x#L1682\n// Note, letter modifiers are prohibited.\n\nstatic int u_iswupper (int ch) {\n   CharacterCategory c = CategoriseCharacter(ch);\n   return c == ccLu || c == ccLt;\n}\n\nstatic int u_iswalpha (int ch) {\n   CharacterCategory c = CategoriseCharacter(ch);\n   return c == ccLl || c == ccLu || c == ccLt || c == ccLo;\n}\n\nstatic int u_iswalnum (int ch) {\n   CharacterCategory c = CategoriseCharacter(ch);\n   return c == ccLl || c == ccLu || c == ccLt || c == ccLo\n       || c == ccNd || c == ccNo;\n}\n\nstatic int u_IsHaskellSymbol(int ch) {\n   CharacterCategory c = CategoriseCharacter(ch);\n   return c == ccPc || c == ccPd || c == ccPo\n       || c == ccSm || c == ccSc || c == ccSk || c == ccSo;\n}\n\nstatic inline bool IsHaskellLetter(const int ch) {\n   if (IsASCII(ch)) {\n      return (ch >= 'a' && ch <= 'z')\n          || (ch >= 'A' && ch <= 'Z');\n   } else {\n      return u_iswalpha(ch) != 0;\n   }\n}\n\nstatic inline bool IsHaskellAlphaNumeric(const int ch) {\n   if (IsASCII(ch)) {\n      return IsAlphaNumeric(ch);\n   } else {\n      return u_iswalnum(ch) != 0;\n   }\n}\n\nstatic inline bool IsHaskellUpperCase(const int ch) {\n   if (IsASCII(ch)) {\n      return ch >= 'A' && ch <= 'Z';\n   } else {\n      return u_iswupper(ch) != 0;\n   }\n}\n\nstatic inline bool IsAnHaskellOperatorChar(const int ch) {\n   if (IsASCII(ch)) {\n      return\n         (  ch == '!' || ch == '#' || ch == '$' || ch == '%'\n         || ch == '&' || ch == '*' || ch == '+' || ch == '-'\n         || ch == '.' || ch == '/' || ch == ':' || ch == '<'\n         || ch == '=' || ch == '>' || ch == '?' || ch == '@'\n         || ch == '^' || ch == '|' || ch == '~' || ch == '\\\\');\n   } else {\n      return u_IsHaskellSymbol(ch) != 0;\n   }\n}\n\nstatic inline bool IsAHaskellWordStart(const int ch) {\n   return IsHaskellLetter(ch) || ch == '_';\n}\n\nstatic inline bool IsAHaskellWordChar(const int ch) {\n   return (  IsHaskellAlphaNumeric(ch)\n          || ch == '_'\n          || ch == '\\'');\n}\n\nstatic inline bool IsCommentBlockStyle(int style) {\n   return (style >= SCE_HA_COMMENTBLOCK && style <= SCE_HA_COMMENTBLOCK3);\n}\n\nstatic inline bool IsCommentStyle(int style) {\n   return (style >= SCE_HA_COMMENTLINE && style <= SCE_HA_COMMENTBLOCK3)\n       || ( style == SCE_HA_LITERATE_COMMENT\n         || style == SCE_HA_LITERATE_CODEDELIM);\n}\n\n// styles which do not belong to Haskell, but to external tools\nstatic inline bool IsExternalStyle(int style) {\n   return ( style == SCE_HA_PREPROCESSOR\n         || style == SCE_HA_LITERATE_COMMENT\n         || style == SCE_HA_LITERATE_CODEDELIM);\n}\n\nstatic inline int CommentBlockStyleFromNestLevel(const unsigned int nestLevel) {\n   return SCE_HA_COMMENTBLOCK + (nestLevel % 3);\n}\n\n// Mangled version of lexlib/Accessor.cxx IndentAmount.\n// Modified to treat comment blocks as whitespace\n// plus special case for commentline/preprocessor.\nstatic int HaskellIndentAmount(Accessor &styler, const Sci_Position line) {\n\n   // Determines the indentation level of the current line\n   // Comment blocks are treated as whitespace\n\n   Sci_Position pos = styler.LineStart(line);\n   Sci_Position eol_pos = styler.LineStart(line + 1) - 1;\n\n   char ch = styler[pos];\n   int style = styler.StyleAt(pos);\n\n   int indent = 0;\n   bool inPrevPrefix = line > 0;\n\n   Sci_Position posPrev = inPrevPrefix ? styler.LineStart(line-1) : 0;\n\n   while ((  ch == ' ' || ch == '\\t'\n          || IsCommentBlockStyle(style)\n          || style == SCE_HA_LITERATE_CODEDELIM)\n         && (pos < eol_pos)) {\n      if (inPrevPrefix) {\n         char chPrev = styler[posPrev++];\n         if (chPrev != ' ' && chPrev != '\\t') {\n            inPrevPrefix = false;\n         }\n      }\n      if (ch == '\\t') {\n         indent = (indent / 8 + 1) * 8;\n      } else { // Space or comment block\n         indent++;\n      }\n      pos++;\n      ch = styler[pos];\n      style = styler.StyleAt(pos);\n   }\n\n   indent += SC_FOLDLEVELBASE;\n   // if completely empty line or the start of a comment or preprocessor...\n   if (  styler.LineStart(line) == styler.Length()\n      || ch == ' '\n      || ch == '\\t'\n      || ch == '\\n'\n      || ch == '\\r'\n      || IsCommentStyle(style)\n      || style == SCE_HA_PREPROCESSOR)\n      return indent | SC_FOLDLEVELWHITEFLAG;\n   else\n      return indent;\n}\n\nstruct OptionsHaskell {\n   bool magicHash;\n   bool allowQuotes;\n   bool implicitParams;\n   bool highlightSafe;\n   bool cpp;\n   bool stylingWithinPreprocessor;\n   bool fold;\n   bool foldComment;\n   bool foldCompact;\n   bool foldImports;\n   OptionsHaskell() {\n      magicHash = true;       // Widespread use, enabled by default.\n      allowQuotes = true;     // Widespread use, enabled by default.\n      implicitParams = false; // Fell out of favor, seldom used, disabled.\n      highlightSafe = true;   // Moderately used, doesn't hurt to enable.\n      cpp = true;             // Widespread use, enabled by default;\n      stylingWithinPreprocessor = false;\n      fold = false;\n      foldComment = false;\n      foldCompact = false;\n      foldImports = false;\n   }\n};\n\nstatic const char * const haskellWordListDesc[] = {\n   \"Keywords\",\n   \"FFI\",\n   \"Reserved operators\",\n   0\n};\n\nstruct OptionSetHaskell : public OptionSet<OptionsHaskell> {\n   OptionSetHaskell() {\n      DefineProperty(\"lexer.haskell.allow.hash\", &OptionsHaskell::magicHash,\n         \"Set to 0 to disallow the '#' character at the end of identifiers and \"\n         \"literals with the haskell lexer \"\n         \"(GHC -XMagicHash extension)\");\n\n      DefineProperty(\"lexer.haskell.allow.quotes\", &OptionsHaskell::allowQuotes,\n         \"Set to 0 to disable highlighting of Template Haskell name quotations \"\n         \"and promoted constructors \"\n         \"(GHC -XTemplateHaskell and -XDataKinds extensions)\");\n\n      DefineProperty(\"lexer.haskell.allow.questionmark\", &OptionsHaskell::implicitParams,\n         \"Set to 1 to allow the '?' character at the start of identifiers \"\n         \"with the haskell lexer \"\n         \"(GHC & Hugs -XImplicitParams extension)\");\n\n      DefineProperty(\"lexer.haskell.import.safe\", &OptionsHaskell::highlightSafe,\n         \"Set to 0 to disallow \\\"safe\\\" keyword in imports \"\n         \"(GHC -XSafe, -XTrustworthy, -XUnsafe extensions)\");\n\n      DefineProperty(\"lexer.haskell.cpp\", &OptionsHaskell::cpp,\n         \"Set to 0 to disable C-preprocessor highlighting \"\n         \"(-XCPP extension)\");\n\n      DefineProperty(\"styling.within.preprocessor\", &OptionsHaskell::stylingWithinPreprocessor,\n         \"For Haskell code, determines whether all preprocessor code is styled in the \"\n         \"preprocessor style (0, the default) or only from the initial # to the end \"\n         \"of the command word(1).\"\n         );\n\n      DefineProperty(\"fold\", &OptionsHaskell::fold);\n\n      DefineProperty(\"fold.comment\", &OptionsHaskell::foldComment);\n\n      DefineProperty(\"fold.compact\", &OptionsHaskell::foldCompact);\n\n      DefineProperty(\"fold.haskell.imports\", &OptionsHaskell::foldImports,\n         \"Set to 1 to enable folding of import declarations\");\n\n      DefineWordListSets(haskellWordListDesc);\n   }\n};\n\nclass LexerHaskell : public DefaultLexer {\n   bool literate;\n   Sci_Position firstImportLine;\n   int firstImportIndent;\n   WordList keywords;\n   WordList ffi;\n   WordList reserved_operators;\n   OptionsHaskell options;\n   OptionSetHaskell osHaskell;\n\n   enum HashCount {\n       oneHash\n      ,twoHashes\n      ,unlimitedHashes\n   };\n\n   enum KeywordMode {\n       HA_MODE_DEFAULT = 0\n      ,HA_MODE_IMPORT1 = 1 // after \"import\", before \"qualified\" or \"safe\" or package name or module name.\n      ,HA_MODE_IMPORT2 = 2 // after module name, before \"as\" or \"hiding\".\n      ,HA_MODE_IMPORT3 = 3 // after \"as\", before \"hiding\"\n      ,HA_MODE_MODULE  = 4 // after \"module\", before module name.\n      ,HA_MODE_FFI     = 5 // after \"foreign\", before FFI keywords\n      ,HA_MODE_TYPE    = 6 // after \"type\" or \"data\", before \"family\"\n   };\n\n   enum LiterateMode {\n       LITERATE_BIRD  = 0 // if '>' is the first character on the line,\n                          //   color '>' as a codedelim and the rest of\n                          //   the line as code.\n                          // else if \"\\begin{code}\" is the only word on the\n                          //    line except whitespace, switch to LITERATE_BLOCK\n                          // otherwise color the line as a literate comment.\n      ,LITERATE_BLOCK = 1 // if the string \"\\end{code}\" is encountered at column\n                          //   0 ignoring all later characters, color the line\n                          //   as a codedelim and switch to LITERATE_BIRD\n                          // otherwise color the line as code.\n   };\n\n   struct HaskellLineInfo {\n      unsigned int nestLevel; // 22 bits ought to be enough for anybody\n      unsigned int nonexternalStyle; // 5 bits, widen if number of styles goes\n                                     // beyond 31.\n      bool pragma;\n      LiterateMode lmode;\n      KeywordMode mode;\n\n      HaskellLineInfo(int state) :\n         nestLevel (state >> 10)\n       , nonexternalStyle ((state >> 5) & 0x1F)\n       , pragma ((state >> 4) & 0x1)\n       , lmode (static_cast<LiterateMode>((state >> 3) & 0x1))\n       , mode (static_cast<KeywordMode>(state & 0x7))\n         {}\n\n      int ToLineState() {\n         return\n              (nestLevel << 10)\n            | (nonexternalStyle << 5)\n            | (pragma << 4)\n            | (lmode << 3)\n            | mode;\n      }\n   };\n\n   inline void skipMagicHash(StyleContext &sc, const HashCount hashes) const {\n      if (options.magicHash && sc.ch == '#') {\n         sc.Forward();\n         if (hashes == twoHashes && sc.ch == '#') {\n            sc.Forward();\n         } else if (hashes == unlimitedHashes) {\n            while (sc.ch == '#') {\n               sc.Forward();\n            }\n         }\n      }\n   }\n\n   bool LineContainsImport(const Sci_Position line, Accessor &styler) const {\n      if (options.foldImports) {\n         Sci_Position currentPos = styler.LineStart(line);\n         int style = styler.StyleAt(currentPos);\n\n         Sci_Position eol_pos = styler.LineStart(line + 1) - 1;\n\n         while (currentPos < eol_pos) {\n            int ch = styler[currentPos];\n            style = styler.StyleAt(currentPos);\n\n            if (ch == ' ' || ch == '\\t'\n             || IsCommentBlockStyle(style)\n             || style == SCE_HA_LITERATE_CODEDELIM) {\n               currentPos++;\n            } else {\n               break;\n            }\n         }\n\n         return (style == SCE_HA_KEYWORD\n              && styler.Match(currentPos, \"import\"));\n      } else {\n         return false;\n      }\n   }\n\n   inline int IndentAmountWithOffset(Accessor &styler, const Sci_Position line) const {\n      const int indent = HaskellIndentAmount(styler, line);\n      const int indentLevel = indent & SC_FOLDLEVELNUMBERMASK;\n      return indentLevel <= ((firstImportIndent - 1) + SC_FOLDLEVELBASE)\n               ? indent\n               : (indentLevel + firstImportIndent) | (indent & ~SC_FOLDLEVELNUMBERMASK);\n   }\n\n   inline int IndentLevelRemoveIndentOffset(const int indentLevel) const {\n      return indentLevel <= ((firstImportIndent - 1) + SC_FOLDLEVELBASE)\n            ? indentLevel\n            : indentLevel - firstImportIndent;\n   }\n\npublic:\n   LexerHaskell(bool literate_)\n      : DefaultLexer(literate_ ? \"literatehaskell\" : \"haskell\", literate_ ? SCLEX_LITERATEHASKELL : SCLEX_HASKELL)\n\t  , literate(literate_)\n      , firstImportLine(-1)\n      , firstImportIndent(0)\n      {}\n   virtual ~LexerHaskell() {}\n\n   void SCI_METHOD Release() override {\n      delete this;\n   }\n\n   int SCI_METHOD Version() const override {\n      return lvRelease5;\n   }\n\n   const char * SCI_METHOD PropertyNames() override {\n      return osHaskell.PropertyNames();\n   }\n\n   int SCI_METHOD PropertyType(const char *name) override {\n      return osHaskell.PropertyType(name);\n   }\n\n   const char * SCI_METHOD DescribeProperty(const char *name) override {\n      return osHaskell.DescribeProperty(name);\n   }\n\n   Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) override;\n\n   const char * SCI_METHOD PropertyGet(const char *key) override {\n\t   return osHaskell.PropertyGet(key);\n   }\n\n   const char * SCI_METHOD DescribeWordListSets() override {\n      return osHaskell.DescribeWordListSets();\n   }\n\n   Sci_Position SCI_METHOD WordListSet(int n, const char *wl) override;\n\n   void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;\n\n   void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;\n\n   void * SCI_METHOD PrivateCall(int, void *) override {\n      return 0;\n   }\n\n   static ILexer5 *LexerFactoryHaskell() {\n      return new LexerHaskell(false);\n   }\n\n   static ILexer5 *LexerFactoryLiterateHaskell() {\n      return new LexerHaskell(true);\n   }\n};\n\nSci_Position SCI_METHOD LexerHaskell::PropertySet(const char *key, const char *val) {\n   if (osHaskell.PropertySet(&options, key, val)) {\n      return 0;\n   }\n   return -1;\n}\n\nSci_Position SCI_METHOD LexerHaskell::WordListSet(int n, const char *wl) {\n   WordList *wordListN = 0;\n   switch (n) {\n   case 0:\n      wordListN = &keywords;\n      break;\n   case 1:\n      wordListN = &ffi;\n      break;\n   case 2:\n      wordListN = &reserved_operators;\n      break;\n   }\n   Sci_Position firstModification = -1;\n   if (wordListN) {\n      WordList wlNew;\n      wlNew.Set(wl);\n      if (*wordListN != wlNew) {\n         wordListN->Set(wl);\n         firstModification = 0;\n      }\n   }\n   return firstModification;\n}\n\nvoid SCI_METHOD LexerHaskell::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle\n                                 ,IDocument *pAccess) {\n   LexAccessor styler(pAccess);\n\n   Sci_Position lineCurrent = styler.GetLine(startPos);\n\n   HaskellLineInfo hs = HaskellLineInfo(lineCurrent ? styler.GetLineState(lineCurrent-1) : 0);\n\n   // Do not leak onto next line\n   if (initStyle == SCE_HA_STRINGEOL)\n      initStyle = SCE_HA_DEFAULT;\n   else if (initStyle == SCE_HA_LITERATE_CODEDELIM)\n      initStyle = hs.nonexternalStyle;\n\n   StyleContext sc(startPos, length, initStyle, styler);\n\n   int base = 10;\n   bool dot = false;\n\n   bool inDashes = false;\n   bool alreadyInTheMiddleOfOperator = false;\n\n   assert(!(IsCommentBlockStyle(initStyle) && hs.nestLevel == 0));\n\n   while (sc.More()) {\n      // Check for state end\n\n      if (!IsExternalStyle(sc.state)) {\n         hs.nonexternalStyle = sc.state;\n      }\n\n      // For lexer to work, states should unconditionally forward at least one\n      // character.\n      // If they don't, they should still check if they are at line end and\n      // forward if so.\n      // If a state forwards more than one character, it should check every time\n      // that it is not a line end and cease forwarding otherwise.\n      if (sc.atLineEnd) {\n         // Remember the line state for future incremental lexing\n         styler.SetLineState(lineCurrent, hs.ToLineState());\n         lineCurrent++;\n      }\n\n      // Handle line continuation generically.\n      if (sc.ch == '\\\\' && (sc.chNext == '\\n' || sc.chNext == '\\r')\n         && (  sc.state == SCE_HA_STRING\n            || sc.state == SCE_HA_PREPROCESSOR)) {\n         // Remember the line state for future incremental lexing\n         styler.SetLineState(lineCurrent, hs.ToLineState());\n         lineCurrent++;\n\n         sc.Forward();\n         if (sc.ch == '\\r' && sc.chNext == '\\n') {\n            sc.Forward();\n         }\n         sc.Forward();\n\n         continue;\n      }\n\n      if (sc.atLineStart) {\n\n         if (sc.state == SCE_HA_STRING || sc.state == SCE_HA_CHARACTER) {\n            // Prevent SCE_HA_STRINGEOL from leaking back to previous line\n            sc.SetState(sc.state);\n         }\n\n         if (literate && hs.lmode == LITERATE_BIRD) {\n            if (!IsExternalStyle(sc.state)) {\n               sc.SetState(SCE_HA_LITERATE_COMMENT);\n            }\n         }\n      }\n\n      // External\n         // Literate\n      if (  literate && hs.lmode == LITERATE_BIRD && sc.atLineStart\n         && sc.ch == '>') {\n            sc.SetState(SCE_HA_LITERATE_CODEDELIM);\n            sc.ForwardSetState(hs.nonexternalStyle);\n      }\n      else if (literate && hs.lmode == LITERATE_BIRD && sc.atLineStart\n            && (  sc.ch == ' ' || sc.ch == '\\t'\n               || sc.Match(\"\\\\begin{code}\"))) {\n         sc.SetState(sc.state);\n\n         while ((sc.ch == ' ' || sc.ch == '\\t') && sc.More())\n            sc.Forward();\n\n         if (sc.Match(\"\\\\begin{code}\")) {\n            sc.Forward(static_cast<int>(strlen(\"\\\\begin{code}\")));\n\n            bool correct = true;\n\n            while (!sc.atLineEnd && sc.More()) {\n               if (sc.ch != ' ' && sc.ch != '\\t') {\n                  correct = false;\n               }\n               sc.Forward();\n            }\n\n            if (correct) {\n               sc.ChangeState(SCE_HA_LITERATE_CODEDELIM); // color the line end\n               hs.lmode = LITERATE_BLOCK;\n            }\n         }\n      }\n      else if (literate && hs.lmode == LITERATE_BLOCK && sc.atLineStart\n            && sc.Match(\"\\\\end{code}\")) {\n         sc.SetState(SCE_HA_LITERATE_CODEDELIM);\n\n         sc.Forward(static_cast<int>(strlen(\"\\\\end{code}\")));\n\n         while (!sc.atLineEnd && sc.More()) {\n            sc.Forward();\n         }\n\n         sc.SetState(SCE_HA_LITERATE_COMMENT);\n         hs.lmode = LITERATE_BIRD;\n      }\n         // Preprocessor\n      else if (sc.atLineStart && sc.ch == '#' && options.cpp\n            && (!options.stylingWithinPreprocessor || sc.state == SCE_HA_DEFAULT)) {\n         sc.SetState(SCE_HA_PREPROCESSOR);\n         sc.Forward();\n      }\n            // Literate\n      else if (sc.state == SCE_HA_LITERATE_COMMENT) {\n         sc.Forward();\n      }\n      else if (sc.state == SCE_HA_LITERATE_CODEDELIM) {\n         sc.ForwardSetState(hs.nonexternalStyle);\n      }\n            // Preprocessor\n      else if (sc.state == SCE_HA_PREPROCESSOR) {\n         if (sc.atLineEnd) {\n            sc.SetState(options.stylingWithinPreprocessor\n                        ? SCE_HA_DEFAULT\n                        : hs.nonexternalStyle);\n            sc.Forward(); // prevent double counting a line\n         } else if (options.stylingWithinPreprocessor && !IsHaskellLetter(sc.ch)) {\n            sc.SetState(SCE_HA_DEFAULT);\n         } else {\n            sc.Forward();\n         }\n      }\n      // Haskell\n         // Operator\n      else if (sc.state == SCE_HA_OPERATOR) {\n         int style = SCE_HA_OPERATOR;\n\n         if ( sc.ch == ':'\n            && !alreadyInTheMiddleOfOperator\n            // except \"::\"\n            && !( sc.chNext == ':'\n               && !IsAnHaskellOperatorChar(sc.GetRelative(2)))) {\n            style = SCE_HA_CAPITAL;\n         }\n\n         alreadyInTheMiddleOfOperator = false;\n\n         while (IsAnHaskellOperatorChar(sc.ch))\n               sc.Forward();\n\n         char s[100];\n         sc.GetCurrent(s, sizeof(s));\n\n         if (reserved_operators.InList(s))\n            style = SCE_HA_RESERVED_OPERATOR;\n\n         sc.ChangeState(style);\n         sc.SetState(SCE_HA_DEFAULT);\n      }\n         // String\n      else if (sc.state == SCE_HA_STRING) {\n         if (sc.atLineEnd) {\n            sc.ChangeState(SCE_HA_STRINGEOL);\n            sc.ForwardSetState(SCE_HA_DEFAULT);\n         } else if (sc.ch == '\\\"') {\n            sc.Forward();\n            skipMagicHash(sc, oneHash);\n            sc.SetState(SCE_HA_DEFAULT);\n         } else if (sc.ch == '\\\\') {\n            sc.Forward(2);\n         } else {\n            sc.Forward();\n         }\n      }\n         // Char\n      else if (sc.state == SCE_HA_CHARACTER) {\n         if (sc.atLineEnd) {\n            sc.ChangeState(SCE_HA_STRINGEOL);\n            sc.ForwardSetState(SCE_HA_DEFAULT);\n         } else if (sc.ch == '\\'') {\n            sc.Forward();\n            skipMagicHash(sc, oneHash);\n            sc.SetState(SCE_HA_DEFAULT);\n         } else if (sc.ch == '\\\\') {\n            sc.Forward(2);\n         } else {\n            sc.Forward();\n         }\n      }\n         // Number\n      else if (sc.state == SCE_HA_NUMBER) {\n         if (sc.atLineEnd) {\n            sc.SetState(SCE_HA_DEFAULT);\n            sc.Forward(); // prevent double counting a line\n         } else if (IsADigit(sc.ch, base)) {\n            sc.Forward();\n         } else if (sc.ch=='.' && dot && IsADigit(sc.chNext, base)) {\n            sc.Forward(2);\n            dot = false;\n         } else if ((base == 10) &&\n                    (sc.ch == 'e' || sc.ch == 'E') &&\n                    (IsADigit(sc.chNext) || sc.chNext == '+' || sc.chNext == '-')) {\n            sc.Forward();\n            if (sc.ch == '+' || sc.ch == '-')\n                sc.Forward();\n         } else {\n            skipMagicHash(sc, twoHashes);\n            sc.SetState(SCE_HA_DEFAULT);\n         }\n      }\n         // Keyword or Identifier\n      else if (sc.state == SCE_HA_IDENTIFIER) {\n         int style = IsHaskellUpperCase(sc.ch) ? SCE_HA_CAPITAL : SCE_HA_IDENTIFIER;\n\n         assert(IsAHaskellWordStart(sc.ch));\n\n         sc.Forward();\n\n         while (sc.More()) {\n            if (IsAHaskellWordChar(sc.ch)) {\n               sc.Forward();\n            } else if (sc.ch == '.' && style == SCE_HA_CAPITAL) {\n               if (IsHaskellUpperCase(sc.chNext)) {\n                  sc.Forward();\n                  style = SCE_HA_CAPITAL;\n               } else if (IsAHaskellWordStart(sc.chNext)) {\n                  sc.Forward();\n                  style = SCE_HA_IDENTIFIER;\n               } else if (IsAnHaskellOperatorChar(sc.chNext)) {\n                  sc.Forward();\n                  style = sc.ch == ':' ? SCE_HA_CAPITAL : SCE_HA_OPERATOR;\n                  while (IsAnHaskellOperatorChar(sc.ch))\n                     sc.Forward();\n                  break;\n               } else {\n                  break;\n               }\n            } else {\n               break;\n            }\n         }\n\n         skipMagicHash(sc, unlimitedHashes);\n\n         char s[100];\n         sc.GetCurrent(s, sizeof(s));\n\n         KeywordMode new_mode = HA_MODE_DEFAULT;\n\n         if (keywords.InList(s)) {\n            style = SCE_HA_KEYWORD;\n         } else if (style == SCE_HA_CAPITAL) {\n            if (hs.mode == HA_MODE_IMPORT1 || hs.mode == HA_MODE_IMPORT3) {\n               style    = SCE_HA_MODULE;\n               new_mode = HA_MODE_IMPORT2;\n            } else if (hs.mode == HA_MODE_MODULE) {\n               style = SCE_HA_MODULE;\n            }\n         } else if (hs.mode == HA_MODE_IMPORT1 &&\n                    strcmp(s,\"qualified\") == 0) {\n             style    = SCE_HA_KEYWORD;\n             new_mode = HA_MODE_IMPORT1;\n         } else if (options.highlightSafe &&\n                    hs.mode == HA_MODE_IMPORT1 &&\n                    strcmp(s,\"safe\") == 0) {\n             style    = SCE_HA_KEYWORD;\n             new_mode = HA_MODE_IMPORT1;\n         } else if (hs.mode == HA_MODE_IMPORT2) {\n             if (strcmp(s,\"as\") == 0) {\n                style    = SCE_HA_KEYWORD;\n                new_mode = HA_MODE_IMPORT3;\n            } else if (strcmp(s,\"hiding\") == 0) {\n                style     = SCE_HA_KEYWORD;\n            }\n         } else if (hs.mode == HA_MODE_TYPE) {\n            if (strcmp(s,\"family\") == 0)\n               style    = SCE_HA_KEYWORD;\n         }\n\n         if (hs.mode == HA_MODE_FFI) {\n            if (ffi.InList(s)) {\n               style = SCE_HA_KEYWORD;\n               new_mode = HA_MODE_FFI;\n            }\n         }\n\n         sc.ChangeState(style);\n         sc.SetState(SCE_HA_DEFAULT);\n\n         if (strcmp(s,\"import\") == 0 && hs.mode != HA_MODE_FFI)\n            new_mode = HA_MODE_IMPORT1;\n         else if (strcmp(s,\"module\") == 0)\n            new_mode = HA_MODE_MODULE;\n         else if (strcmp(s,\"foreign\") == 0)\n            new_mode = HA_MODE_FFI;\n         else if (strcmp(s,\"type\") == 0\n               || strcmp(s,\"data\") == 0)\n            new_mode = HA_MODE_TYPE;\n\n         hs.mode = new_mode;\n      }\n\n         // Comments\n            // Oneliner\n      else if (sc.state == SCE_HA_COMMENTLINE) {\n         if (sc.atLineEnd) {\n            sc.SetState(hs.pragma ? SCE_HA_PRAGMA : SCE_HA_DEFAULT);\n            sc.Forward(); // prevent double counting a line\n         } else if (inDashes && sc.ch != '-' && !hs.pragma) {\n            inDashes = false;\n            if (IsAnHaskellOperatorChar(sc.ch)) {\n               alreadyInTheMiddleOfOperator = true;\n               sc.ChangeState(SCE_HA_OPERATOR);\n            }\n         } else {\n            sc.Forward();\n         }\n      }\n            // Nested\n      else if (IsCommentBlockStyle(sc.state)) {\n         if (sc.Match('{','-')) {\n            sc.SetState(CommentBlockStyleFromNestLevel(hs.nestLevel));\n            sc.Forward(2);\n            hs.nestLevel++;\n         } else if (sc.Match('-','}')) {\n            sc.Forward(2);\n            assert(hs.nestLevel > 0);\n            if (hs.nestLevel > 0)\n               hs.nestLevel--;\n            sc.SetState(\n               hs.nestLevel == 0\n                  ? (hs.pragma ? SCE_HA_PRAGMA : SCE_HA_DEFAULT)\n                  : CommentBlockStyleFromNestLevel(hs.nestLevel - 1));\n         } else {\n            sc.Forward();\n         }\n      }\n            // Pragma\n      else if (sc.state == SCE_HA_PRAGMA) {\n         if (sc.Match(\"#-}\")) {\n            hs.pragma = false;\n            sc.Forward(3);\n            sc.SetState(SCE_HA_DEFAULT);\n         } else if (sc.Match('-','-')) {\n            sc.SetState(SCE_HA_COMMENTLINE);\n            sc.Forward(2);\n            inDashes = false;\n         } else if (sc.Match('{','-')) {\n            sc.SetState(CommentBlockStyleFromNestLevel(hs.nestLevel));\n            sc.Forward(2);\n            hs.nestLevel = 1;\n         } else {\n            sc.Forward();\n         }\n      }\n            // New state?\n      else if (sc.state == SCE_HA_DEFAULT) {\n         // Digit\n         if (IsADigit(sc.ch)) {\n            hs.mode = HA_MODE_DEFAULT;\n\n            sc.SetState(SCE_HA_NUMBER);\n            if (sc.ch == '0' && (sc.chNext == 'X' || sc.chNext == 'x')) {\n               // Match anything starting with \"0x\" or \"0X\", too\n               sc.Forward(2);\n               base = 16;\n               dot = false;\n            } else if (sc.ch == '0' && (sc.chNext == 'O' || sc.chNext == 'o')) {\n               // Match anything starting with \"0o\" or \"0O\", too\n               sc.Forward(2);\n               base = 8;\n               dot = false;\n            } else {\n               sc.Forward();\n               base = 10;\n               dot = true;\n            }\n         }\n         // Pragma\n         else if (sc.Match(\"{-#\")) {\n            hs.pragma = true;\n            sc.SetState(SCE_HA_PRAGMA);\n            sc.Forward(3);\n         }\n         // Comment line\n         else if (sc.Match('-','-')) {\n            sc.SetState(SCE_HA_COMMENTLINE);\n            sc.Forward(2);\n            inDashes = true;\n         }\n         // Comment block\n         else if (sc.Match('{','-')) {\n            sc.SetState(CommentBlockStyleFromNestLevel(hs.nestLevel));\n            sc.Forward(2);\n            hs.nestLevel = 1;\n         }\n         // String\n         else if (sc.ch == '\\\"') {\n            sc.SetState(SCE_HA_STRING);\n            sc.Forward();\n         }\n         // Character or quoted name or promoted term\n         else if (sc.ch == '\\'') {\n            hs.mode = HA_MODE_DEFAULT;\n\n            sc.SetState(SCE_HA_CHARACTER);\n            sc.Forward();\n\n            if (options.allowQuotes) {\n               // Quoted type ''T\n               if (sc.ch=='\\'' && IsAHaskellWordStart(sc.chNext)) {\n                  sc.Forward();\n                  sc.ChangeState(SCE_HA_IDENTIFIER);\n               } else if (sc.chNext != '\\'') {\n                  // Quoted name 'n or promoted constructor 'N\n                  if (IsAHaskellWordStart(sc.ch)) {\n                     sc.ChangeState(SCE_HA_IDENTIFIER);\n                  // Promoted constructor operator ':~>\n                  } else if (sc.ch == ':') {\n                     alreadyInTheMiddleOfOperator = false;\n                     sc.ChangeState(SCE_HA_OPERATOR);\n                  // Promoted list or tuple '[T]\n                  } else if (sc.ch == '[' || sc.ch== '(') {\n                     sc.ChangeState(SCE_HA_OPERATOR);\n                     sc.ForwardSetState(SCE_HA_DEFAULT);\n                  }\n               }\n            }\n         }\n         // Operator starting with '?' or an implicit parameter\n         else if (sc.ch == '?') {\n            hs.mode = HA_MODE_DEFAULT;\n\n            alreadyInTheMiddleOfOperator = false;\n            sc.SetState(SCE_HA_OPERATOR);\n\n            if (  options.implicitParams\n               && IsAHaskellWordStart(sc.chNext)\n               && !IsHaskellUpperCase(sc.chNext)) {\n               sc.Forward();\n               sc.ChangeState(SCE_HA_IDENTIFIER);\n            }\n         }\n         // Operator\n         else if (IsAnHaskellOperatorChar(sc.ch)) {\n            hs.mode = HA_MODE_DEFAULT;\n\n            sc.SetState(SCE_HA_OPERATOR);\n         }\n         // Braces and punctuation\n         else if (sc.ch == ',' || sc.ch == ';'\n               || sc.ch == '(' || sc.ch == ')'\n               || sc.ch == '[' || sc.ch == ']'\n               || sc.ch == '{' || sc.ch == '}') {\n            sc.SetState(SCE_HA_OPERATOR);\n            sc.ForwardSetState(SCE_HA_DEFAULT);\n         }\n         // Keyword or Identifier\n         else if (IsAHaskellWordStart(sc.ch)) {\n            sc.SetState(SCE_HA_IDENTIFIER);\n         // Something we don't care about\n         } else {\n            sc.Forward();\n         }\n      }\n            // This branch should never be reached.\n      else {\n         assert(false);\n         sc.Forward();\n      }\n   }\n   sc.Complete();\n}\n\nvoid SCI_METHOD LexerHaskell::Fold(Sci_PositionU startPos, Sci_Position length, int // initStyle\n                                  ,IDocument *pAccess) {\n   if (!options.fold)\n      return;\n\n   Accessor styler(pAccess, NULL);\n\n   Sci_Position lineCurrent = styler.GetLine(startPos);\n\n   if (lineCurrent <= firstImportLine) {\n      firstImportLine = -1; // readjust first import position\n      firstImportIndent = 0;\n   }\n\n   const Sci_Position maxPos = startPos + length;\n   const Sci_Position maxLines =\n      maxPos == styler.Length()\n         ? styler.GetLine(maxPos)\n         : styler.GetLine(maxPos - 1);  // Requested last line\n   const Sci_Position docLines = styler.GetLine(styler.Length()); // Available last line\n\n   // Backtrack to previous non-blank line so we can determine indent level\n   // for any white space lines\n   // and so we can fix any preceding fold level (which is why we go back\n   // at least one line in all cases)\n   bool importHere = LineContainsImport(lineCurrent, styler);\n   int indentCurrent = IndentAmountWithOffset(styler, lineCurrent);\n\n   while (lineCurrent > 0) {\n      lineCurrent--;\n      importHere = LineContainsImport(lineCurrent, styler);\n      indentCurrent = IndentAmountWithOffset(styler, lineCurrent);\n      if (!(indentCurrent & SC_FOLDLEVELWHITEFLAG))\n         break;\n   }\n\n   int indentCurrentLevel = indentCurrent & SC_FOLDLEVELNUMBERMASK;\n\n   if (importHere) {\n      indentCurrentLevel = IndentLevelRemoveIndentOffset(indentCurrentLevel);\n      if (firstImportLine == -1) {\n         firstImportLine = lineCurrent;\n         firstImportIndent = (1 + indentCurrentLevel) - SC_FOLDLEVELBASE;\n      }\n      if (firstImportLine != lineCurrent) {\n         indentCurrentLevel++;\n      }\n   }\n\n   indentCurrent = indentCurrentLevel | (indentCurrent & ~SC_FOLDLEVELNUMBERMASK);\n\n   // Process all characters to end of requested range\n   //that hangs over the end of the range.  Cap processing in all cases\n   // to end of document.\n   while (lineCurrent <= docLines && lineCurrent <= maxLines) {\n\n      // Gather info\n      Sci_Position lineNext = lineCurrent + 1;\n      importHere = false;\n      int indentNext = indentCurrent;\n\n      if (lineNext <= docLines) {\n         // Information about next line is only available if not at end of document\n         importHere = LineContainsImport(lineNext, styler);\n         indentNext = IndentAmountWithOffset(styler, lineNext);\n      }\n      if (indentNext & SC_FOLDLEVELWHITEFLAG)\n         indentNext = SC_FOLDLEVELWHITEFLAG | indentCurrentLevel;\n\n      // Skip past any blank lines for next indent level info; we skip also\n      // comments (all comments, not just those starting in column 0)\n      // which effectively folds them into surrounding code rather\n      // than screwing up folding.\n\n      while (lineNext < docLines && (indentNext & SC_FOLDLEVELWHITEFLAG)) {\n         lineNext++;\n         importHere = LineContainsImport(lineNext, styler);\n         indentNext = IndentAmountWithOffset(styler, lineNext);\n      }\n\n      int indentNextLevel = indentNext & SC_FOLDLEVELNUMBERMASK;\n\n      if (importHere) {\n         indentNextLevel = IndentLevelRemoveIndentOffset(indentNextLevel);\n         if (firstImportLine == -1) {\n            firstImportLine = lineNext;\n            firstImportIndent = (1 + indentNextLevel) - SC_FOLDLEVELBASE;\n         }\n         if (firstImportLine != lineNext) {\n            indentNextLevel++;\n         }\n      }\n\n      indentNext = indentNextLevel | (indentNext & ~SC_FOLDLEVELNUMBERMASK);\n\n      const int levelBeforeComments = Maximum(indentCurrentLevel,indentNextLevel);\n\n      // Now set all the indent levels on the lines we skipped\n      // Do this from end to start.  Once we encounter one line\n      // which is indented more than the line after the end of\n      // the comment-block, use the level of the block before\n\n      Sci_Position skipLine = lineNext;\n      int skipLevel = indentNextLevel;\n\n      while (--skipLine > lineCurrent) {\n         int skipLineIndent = IndentAmountWithOffset(styler, skipLine);\n\n         if (options.foldCompact) {\n            if ((skipLineIndent & SC_FOLDLEVELNUMBERMASK) > indentNextLevel) {\n               skipLevel = levelBeforeComments;\n            }\n\n            int whiteFlag = skipLineIndent & SC_FOLDLEVELWHITEFLAG;\n\n            styler.SetLevel(skipLine, skipLevel | whiteFlag);\n         } else {\n            if (  (skipLineIndent & SC_FOLDLEVELNUMBERMASK) > indentNextLevel\n               && !(skipLineIndent & SC_FOLDLEVELWHITEFLAG)) {\n               skipLevel = levelBeforeComments;\n            }\n\n            styler.SetLevel(skipLine, skipLevel);\n         }\n      }\n\n      int lev = indentCurrent;\n\n      if (!(indentCurrent & SC_FOLDLEVELWHITEFLAG)) {\n         if ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext & SC_FOLDLEVELNUMBERMASK))\n            lev |= SC_FOLDLEVELHEADERFLAG;\n      }\n\n      // Set fold level for this line and move to next line\n      styler.SetLevel(lineCurrent, options.foldCompact ? lev : lev & ~SC_FOLDLEVELWHITEFLAG);\n\n      indentCurrent = indentNext;\n      indentCurrentLevel = indentNextLevel;\n      lineCurrent = lineNext;\n   }\n\n   // NOTE: Cannot set level of last line here because indentCurrent doesn't have\n   // header flag set; the loop above is crafted to take care of this case!\n   //styler.SetLevel(lineCurrent, indentCurrent);\n}\n\nLexerModule lmHaskell(SCLEX_HASKELL, LexerHaskell::LexerFactoryHaskell, \"haskell\", haskellWordListDesc);\nLexerModule lmLiterateHaskell(SCLEX_LITERATEHASKELL, LexerHaskell::LexerFactoryLiterateHaskell, \"literatehaskell\", haskellWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexHex.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexHex.cxx\n ** Lexers for Motorola S-Record, Intel HEX and Tektronix extended HEX.\n **\n ** Written by Markus Heidelberg\n **/\n// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n/*\n *  Motorola S-Record\n * ===============================\n *\n * Each record (line) is built as follows:\n *\n *    field       digits          states\n *\n *  +----------+\n *  | start    |  1 ('S')         SCE_HEX_RECSTART\n *  +----------+\n *  | type     |  1               SCE_HEX_RECTYPE, (SCE_HEX_RECTYPE_UNKNOWN)\n *  +----------+\n *  | count    |  2               SCE_HEX_BYTECOUNT, SCE_HEX_BYTECOUNT_WRONG\n *  +----------+\n *  | address  |  4/6/8           SCE_HEX_NOADDRESS, SCE_HEX_DATAADDRESS, SCE_HEX_RECCOUNT, SCE_HEX_STARTADDRESS, (SCE_HEX_ADDRESSFIELD_UNKNOWN)\n *  +----------+\n *  | data     |  0..504/502/500  SCE_HEX_DATA_ODD, SCE_HEX_DATA_EVEN, SCE_HEX_DATA_EMPTY, (SCE_HEX_DATA_UNKNOWN)\n *  +----------+\n *  | checksum |  2               SCE_HEX_CHECKSUM, SCE_HEX_CHECKSUM_WRONG\n *  +----------+\n *\n *\n *  Intel HEX\n * ===============================\n *\n * Each record (line) is built as follows:\n *\n *    field       digits          states\n *\n *  +----------+\n *  | start    |  1 (':')         SCE_HEX_RECSTART\n *  +----------+\n *  | count    |  2               SCE_HEX_BYTECOUNT, SCE_HEX_BYTECOUNT_WRONG\n *  +----------+\n *  | address  |  4               SCE_HEX_NOADDRESS, SCE_HEX_DATAADDRESS, (SCE_HEX_ADDRESSFIELD_UNKNOWN)\n *  +----------+\n *  | type     |  2               SCE_HEX_RECTYPE, (SCE_HEX_RECTYPE_UNKNOWN)\n *  +----------+\n *  | data     |  0..510          SCE_HEX_DATA_ODD, SCE_HEX_DATA_EVEN, SCE_HEX_DATA_EMPTY, SCE_HEX_EXTENDEDADDRESS, SCE_HEX_STARTADDRESS, (SCE_HEX_DATA_UNKNOWN)\n *  +----------+\n *  | checksum |  2               SCE_HEX_CHECKSUM, SCE_HEX_CHECKSUM_WRONG\n *  +----------+\n *\n *\n * Folding:\n *\n *   Data records (type 0x00), which follow an extended address record (type\n *   0x02 or 0x04), can be folded. The extended address record is the fold\n *   point at fold level 0, the corresponding data records are set to level 1.\n *\n *   Any record, which is not a data record, sets the fold level back to 0.\n *   Any line, which is not a record (blank lines and lines starting with a\n *   character other than ':'), leaves the fold level unchanged.\n *\n *\n *  Tektronix extended HEX\n * ===============================\n *\n * Each record (line) is built as follows:\n *\n *    field       digits          states\n *\n *  +----------+\n *  | start    |  1 ('%')         SCE_HEX_RECSTART\n *  +----------+\n *  | length   |  2               SCE_HEX_BYTECOUNT, SCE_HEX_BYTECOUNT_WRONG\n *  +----------+\n *  | type     |  1               SCE_HEX_RECTYPE, (SCE_HEX_RECTYPE_UNKNOWN)\n *  +----------+\n *  | checksum |  2               SCE_HEX_CHECKSUM, SCE_HEX_CHECKSUM_WRONG\n *  +----------+\n *  | address  |  9               SCE_HEX_DATAADDRESS, SCE_HEX_STARTADDRESS, (SCE_HEX_ADDRESSFIELD_UNKNOWN)\n *  +----------+\n *  | data     |  0..241          SCE_HEX_DATA_ODD, SCE_HEX_DATA_EVEN\n *  +----------+\n *\n *\n *  General notes for all lexers\n * ===============================\n *\n * - Depending on where the helper functions are invoked, some of them have to\n *   read beyond the current position. In case of malformed data (record too\n *   short), it has to be ensured that this either does not have bad influence\n *   or will be captured deliberately.\n *\n * - States in parentheses in the upper format descriptions indicate that they\n *   should not appear in a valid hex file.\n *\n * - State SCE_HEX_GARBAGE means garbage data after the intended end of the\n *   record, the line is too long then. This state is used in all lexers.\n */\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\n// prototypes for general helper functions\nstatic inline bool IsNewline(const int ch);\nstatic int GetHexaNibble(char hd);\nstatic int GetHexaChar(char hd1, char hd2);\nstatic int GetHexaChar(Sci_PositionU pos, Accessor &styler);\nstatic bool ForwardWithinLine(StyleContext &sc, Sci_Position nb = 1);\nstatic bool PosInSameRecord(Sci_PositionU pos1, Sci_PositionU pos2, Accessor &styler);\nstatic Sci_Position CountByteCount(Sci_PositionU startPos, Sci_Position uncountedDigits, Accessor &styler);\nstatic int CalcChecksum(Sci_PositionU startPos, Sci_Position cnt, bool twosCompl, Accessor &styler);\n\n// prototypes for file format specific helper functions\nstatic Sci_PositionU GetSrecRecStartPosition(Sci_PositionU pos, Accessor &styler);\nstatic int GetSrecByteCount(Sci_PositionU recStartPos, Accessor &styler);\nstatic Sci_Position CountSrecByteCount(Sci_PositionU recStartPos, Accessor &styler);\nstatic int GetSrecAddressFieldSize(Sci_PositionU recStartPos, Accessor &styler);\nstatic int GetSrecAddressFieldType(Sci_PositionU recStartPos, Accessor &styler);\nstatic int GetSrecDataFieldType(Sci_PositionU recStartPos, Accessor &styler);\nstatic Sci_Position GetSrecRequiredDataFieldSize(Sci_PositionU recStartPos, Accessor &styler);\nstatic int GetSrecChecksum(Sci_PositionU recStartPos, Accessor &styler);\nstatic int CalcSrecChecksum(Sci_PositionU recStartPos, Accessor &styler);\n\nstatic Sci_PositionU GetIHexRecStartPosition(Sci_PositionU pos, Accessor &styler);\nstatic int GetIHexByteCount(Sci_PositionU recStartPos, Accessor &styler);\nstatic Sci_Position CountIHexByteCount(Sci_PositionU recStartPos, Accessor &styler);\nstatic int GetIHexAddressFieldType(Sci_PositionU recStartPos, Accessor &styler);\nstatic int GetIHexDataFieldType(Sci_PositionU recStartPos, Accessor &styler);\nstatic int GetIHexRequiredDataFieldSize(Sci_PositionU recStartPos, Accessor &styler);\nstatic int GetIHexChecksum(Sci_PositionU recStartPos, Accessor &styler);\nstatic int CalcIHexChecksum(Sci_PositionU recStartPos, Accessor &styler);\n\nstatic int GetTEHexDigitCount(Sci_PositionU recStartPos, Accessor &styler);\nstatic Sci_Position CountTEHexDigitCount(Sci_PositionU recStartPos, Accessor &styler);\nstatic int GetTEHexAddressFieldType(Sci_PositionU recStartPos, Accessor &styler);\nstatic int GetTEHexChecksum(Sci_PositionU recStartPos, Accessor &styler);\nstatic int CalcTEHexChecksum(Sci_PositionU recStartPos, Accessor &styler);\n\nstatic inline bool IsNewline(const int ch)\n{\n    return (ch == '\\n' || ch == '\\r');\n}\n\nstatic int GetHexaNibble(char hd)\n{\n\tint hexValue = 0;\n\n\tif (hd >= '0' && hd <= '9') {\n\t\thexValue += hd - '0';\n\t} else if (hd >= 'A' && hd <= 'F') {\n\t\thexValue += hd - 'A' + 10;\n\t} else if (hd >= 'a' && hd <= 'f') {\n\t\thexValue += hd - 'a' + 10;\n\t} else {\n\t\treturn -1;\n\t}\n\n\treturn hexValue;\n}\n\nstatic int GetHexaChar(char hd1, char hd2)\n{\n\tint hexValue = 0;\n\n\tif (hd1 >= '0' && hd1 <= '9') {\n\t\thexValue += 16 * (hd1 - '0');\n\t} else if (hd1 >= 'A' && hd1 <= 'F') {\n\t\thexValue += 16 * (hd1 - 'A' + 10);\n\t} else if (hd1 >= 'a' && hd1 <= 'f') {\n\t\thexValue += 16 * (hd1 - 'a' + 10);\n\t} else {\n\t\treturn -1;\n\t}\n\n\tif (hd2 >= '0' && hd2 <= '9') {\n\t\thexValue += hd2 - '0';\n\t} else if (hd2 >= 'A' && hd2 <= 'F') {\n\t\thexValue += hd2 - 'A' + 10;\n\t} else if (hd2 >= 'a' && hd2 <= 'f') {\n\t\thexValue += hd2 - 'a' + 10;\n\t} else {\n\t\treturn -1;\n\t}\n\n\treturn hexValue;\n}\n\nstatic int GetHexaChar(Sci_PositionU pos, Accessor &styler)\n{\n\tchar highNibble, lowNibble;\n\n\thighNibble = styler.SafeGetCharAt(pos);\n\tlowNibble = styler.SafeGetCharAt(pos + 1);\n\n\treturn GetHexaChar(highNibble, lowNibble);\n}\n\n// Forward <nb> characters, but abort (and return false) if hitting the line\n// end. Return true if forwarding within the line was possible.\n// Avoids influence on highlighting of the subsequent line if the current line\n// is malformed (too short).\nstatic bool ForwardWithinLine(StyleContext &sc, Sci_Position nb)\n{\n\tfor (Sci_Position i = 0; i < nb; i++) {\n\t\tif (sc.atLineEnd) {\n\t\t\t// line is too short\n\t\t\tsc.SetState(SCE_HEX_DEFAULT);\n\t\t\tsc.Forward();\n\t\t\treturn false;\n\t\t} else {\n\t\t\tsc.Forward();\n\t\t}\n\t}\n\n\treturn true;\n}\n\n// Checks whether the given positions are in the same record.\nstatic bool PosInSameRecord(Sci_PositionU pos1, Sci_PositionU pos2, Accessor &styler)\n{\n\treturn styler.GetLine(pos1) == styler.GetLine(pos2);\n}\n\n// Count the number of digit pairs from <startPos> till end of record, ignoring\n// <uncountedDigits> digits.\n// If the record is too short, a negative count may be returned.\nstatic Sci_Position CountByteCount(Sci_PositionU startPos, Sci_Position uncountedDigits, Accessor &styler)\n{\n\tSci_Position cnt;\n\tSci_PositionU pos;\n\n\tpos = startPos;\n\n\twhile (!IsNewline(styler.SafeGetCharAt(pos, '\\n'))) {\n\t\tpos++;\n\t}\n\n\t// number of digits in this line minus number of digits of uncounted fields\n\tcnt = static_cast<Sci_Position>(pos - startPos) - uncountedDigits;\n\n\t// Prepare round up if odd (digit pair incomplete), this way the byte\n\t// count is considered to be valid if the checksum is incomplete.\n\tif (cnt >= 0) {\n\t\tcnt++;\n\t}\n\n\t// digit pairs\n\tcnt /= 2;\n\n\treturn cnt;\n}\n\n// Calculate the checksum of the record.\n// <startPos> is the position of the first character of the starting digit\n// pair, <cnt> is the number of digit pairs.\nstatic int CalcChecksum(Sci_PositionU startPos, Sci_Position cnt, bool twosCompl, Accessor &styler)\n{\n\tint cs = 0;\n\n\tfor (Sci_PositionU pos = startPos; pos < startPos + cnt; pos += 2) {\n\t\tint val = GetHexaChar(pos, styler);\n\n\t\tif (val < 0) {\n\t\t\treturn val;\n\t\t}\n\n\t\t// overflow does not matter\n\t\tcs += val;\n\t}\n\n\tif (twosCompl) {\n\t\t// low byte of two's complement\n\t\treturn -cs & 0xFF;\n\t} else {\n\t\t// low byte of one's complement\n\t\treturn ~cs & 0xFF;\n\t}\n}\n\n// Get the position of the record \"start\" field (first character in line) in\n// the record around position <pos>.\nstatic Sci_PositionU GetSrecRecStartPosition(Sci_PositionU pos, Accessor &styler)\n{\n\twhile (styler.SafeGetCharAt(pos) != 'S') {\n\t\tpos--;\n\t}\n\n\treturn pos;\n}\n\n// Get the value of the \"byte count\" field, it counts the number of bytes in\n// the subsequent fields (\"address\", \"data\" and \"checksum\" fields).\nstatic int GetSrecByteCount(Sci_PositionU recStartPos, Accessor &styler)\n{\n\tint val;\n\n\tval = GetHexaChar(recStartPos + 2, styler);\n\tif (val < 0) {\n\t       val = 0;\n\t}\n\n\treturn val;\n}\n\n// Count the number of digit pairs for the \"address\", \"data\" and \"checksum\"\n// fields in this record. Has to be equal to the \"byte count\" field value.\n// If the record is too short, a negative count may be returned.\nstatic Sci_Position CountSrecByteCount(Sci_PositionU recStartPos, Accessor &styler)\n{\n\treturn CountByteCount(recStartPos, 4, styler);\n}\n\n// Get the size of the \"address\" field.\nstatic int GetSrecAddressFieldSize(Sci_PositionU recStartPos, Accessor &styler)\n{\n\tswitch (styler.SafeGetCharAt(recStartPos + 1)) {\n\t\tcase '0':\n\t\tcase '1':\n\t\tcase '5':\n\t\tcase '9':\n\t\t\treturn 2; // 16 bit\n\n\t\tcase '2':\n\t\tcase '6':\n\t\tcase '8':\n\t\t\treturn 3; // 24 bit\n\n\t\tcase '3':\n\t\tcase '7':\n\t\t\treturn 4; // 32 bit\n\n\t\tdefault:\n\t\t\treturn 0;\n\t}\n}\n\n// Get the type of the \"address\" field content.\nstatic int GetSrecAddressFieldType(Sci_PositionU recStartPos, Accessor &styler)\n{\n\tswitch (styler.SafeGetCharAt(recStartPos + 1)) {\n\t\tcase '0':\n\t\t\treturn SCE_HEX_NOADDRESS;\n\n\t\tcase '1':\n\t\tcase '2':\n\t\tcase '3':\n\t\t\treturn SCE_HEX_DATAADDRESS;\n\n\t\tcase '5':\n\t\tcase '6':\n\t\t\treturn SCE_HEX_RECCOUNT;\n\n\t\tcase '7':\n\t\tcase '8':\n\t\tcase '9':\n\t\t\treturn SCE_HEX_STARTADDRESS;\n\n\t\tdefault: // handle possible format extension in the future\n\t\t\treturn SCE_HEX_ADDRESSFIELD_UNKNOWN;\n\t}\n}\n\n// Get the type of the \"data\" field content.\nstatic int GetSrecDataFieldType(Sci_PositionU recStartPos, Accessor &styler)\n{\n\tswitch (styler.SafeGetCharAt(recStartPos + 1)) {\n\t\tcase '0':\n\t\tcase '1':\n\t\tcase '2':\n\t\tcase '3':\n\t\t\treturn SCE_HEX_DATA_ODD;\n\n\t\tcase '5':\n\t\tcase '6':\n\t\tcase '7':\n\t\tcase '8':\n\t\tcase '9':\n\t\t\treturn SCE_HEX_DATA_EMPTY;\n\n\t\tdefault: // handle possible format extension in the future\n\t\t\treturn SCE_HEX_DATA_UNKNOWN;\n\t}\n}\n\n// Get the required size of the \"data\" field. Useless for block header and\n// ordinary data records (type S0, S1, S2, S3), return the value calculated\n// from the \"byte count\" and \"address field\" size in this case.\nstatic Sci_Position GetSrecRequiredDataFieldSize(Sci_PositionU recStartPos, Accessor &styler)\n{\n\tswitch (styler.SafeGetCharAt(recStartPos + 1)) {\n\t\tcase '5':\n\t\tcase '6':\n\t\tcase '7':\n\t\tcase '8':\n\t\tcase '9':\n\t\t\treturn 0;\n\n\t\tdefault:\n\t\t\treturn GetSrecByteCount(recStartPos, styler)\n\t\t\t\t- GetSrecAddressFieldSize(recStartPos, styler)\n\t\t\t\t- 1; // -1 for checksum field\n\t}\n}\n\n// Get the value of the \"checksum\" field.\nstatic int GetSrecChecksum(Sci_PositionU recStartPos, Accessor &styler)\n{\n\tint byteCount;\n\n\tbyteCount = GetSrecByteCount(recStartPos, styler);\n\n\treturn GetHexaChar(recStartPos + 2 + byteCount * 2, styler);\n}\n\n// Calculate the checksum of the record.\nstatic int CalcSrecChecksum(Sci_PositionU recStartPos, Accessor &styler)\n{\n\tSci_Position byteCount;\n\n\tbyteCount = GetSrecByteCount(recStartPos, styler);\n\n\t// sum over \"byte count\", \"address\" and \"data\" fields (6..510 digits)\n\treturn CalcChecksum(recStartPos + 2, byteCount * 2, false, styler);\n}\n\n// Get the position of the record \"start\" field (first character in line) in\n// the record around position <pos>.\nstatic Sci_PositionU GetIHexRecStartPosition(Sci_PositionU pos, Accessor &styler)\n{\n\twhile (styler.SafeGetCharAt(pos) != ':') {\n\t\tpos--;\n\t}\n\n\treturn pos;\n}\n\n// Get the value of the \"byte count\" field, it counts the number of bytes in\n// the \"data\" field.\nstatic int GetIHexByteCount(Sci_PositionU recStartPos, Accessor &styler)\n{\n\tint val;\n\n\tval = GetHexaChar(recStartPos + 1, styler);\n\tif (val < 0) {\n\t       val = 0;\n\t}\n\n\treturn val;\n}\n\n// Count the number of digit pairs for the \"data\" field in this record. Has to\n// be equal to the \"byte count\" field value.\n// If the record is too short, a negative count may be returned.\nstatic Sci_Position CountIHexByteCount(Sci_PositionU recStartPos, Accessor &styler)\n{\n\treturn CountByteCount(recStartPos, 11, styler);\n}\n\n// Get the type of the \"address\" field content.\nstatic int GetIHexAddressFieldType(Sci_PositionU recStartPos, Accessor &styler)\n{\n\tif (!PosInSameRecord(recStartPos, recStartPos + 7, styler)) {\n\t\t// malformed (record too short)\n\t\t// type cannot be determined\n\t\treturn SCE_HEX_ADDRESSFIELD_UNKNOWN;\n\t}\n\n\tswitch (GetHexaChar(recStartPos + 7, styler)) {\n\t\tcase 0x00:\n\t\t\treturn SCE_HEX_DATAADDRESS;\n\n\t\tcase 0x01:\n\t\tcase 0x02:\n\t\tcase 0x03:\n\t\tcase 0x04:\n\t\tcase 0x05:\n\t\t\treturn SCE_HEX_NOADDRESS;\n\n\t\tdefault: // handle possible format extension in the future\n\t\t\treturn SCE_HEX_ADDRESSFIELD_UNKNOWN;\n\t}\n}\n\n// Get the type of the \"data\" field content.\nstatic int GetIHexDataFieldType(Sci_PositionU recStartPos, Accessor &styler)\n{\n\tswitch (GetHexaChar(recStartPos + 7, styler)) {\n\t\tcase 0x00:\n\t\t\treturn SCE_HEX_DATA_ODD;\n\n\t\tcase 0x01:\n\t\t\treturn SCE_HEX_DATA_EMPTY;\n\n\t\tcase 0x02:\n\t\tcase 0x04:\n\t\t\treturn SCE_HEX_EXTENDEDADDRESS;\n\n\t\tcase 0x03:\n\t\tcase 0x05:\n\t\t\treturn SCE_HEX_STARTADDRESS;\n\n\t\tdefault: // handle possible format extension in the future\n\t\t\treturn SCE_HEX_DATA_UNKNOWN;\n\t}\n}\n\n// Get the required size of the \"data\" field. Useless for an ordinary data\n// record (type 00), return the \"byte count\" in this case.\nstatic int GetIHexRequiredDataFieldSize(Sci_PositionU recStartPos, Accessor &styler)\n{\n\tswitch (GetHexaChar(recStartPos + 7, styler)) {\n\t\tcase 0x01:\n\t\t\treturn 0;\n\n\t\tcase 0x02:\n\t\tcase 0x04:\n\t\t\treturn 2;\n\n\t\tcase 0x03:\n\t\tcase 0x05:\n\t\t\treturn 4;\n\n\t\tdefault:\n\t\t\treturn GetIHexByteCount(recStartPos, styler);\n\t}\n}\n\n// Get the value of the \"checksum\" field.\nstatic int GetIHexChecksum(Sci_PositionU recStartPos, Accessor &styler)\n{\n\tint byteCount;\n\n\tbyteCount = GetIHexByteCount(recStartPos, styler);\n\n\treturn GetHexaChar(recStartPos + 9 + byteCount * 2, styler);\n}\n\n// Calculate the checksum of the record.\nstatic int CalcIHexChecksum(Sci_PositionU recStartPos, Accessor &styler)\n{\n\tint byteCount;\n\n\tbyteCount = GetIHexByteCount(recStartPos, styler);\n\n\t// sum over \"byte count\", \"address\", \"type\" and \"data\" fields (8..518 digits)\n\treturn CalcChecksum(recStartPos + 1, 8 + byteCount * 2, true, styler);\n}\n\n\n// Get the value of the \"record length\" field, it counts the number of digits in\n// the record excluding the percent.\nstatic int GetTEHexDigitCount(Sci_PositionU recStartPos, Accessor &styler)\n{\n\tint val = GetHexaChar(recStartPos + 1, styler);\n\tif (val < 0)\n\t       val = 0;\n\n\treturn val;\n}\n\n// Count the number of digits in this record. Has to\n// be equal to the \"record length\" field value.\nstatic Sci_Position CountTEHexDigitCount(Sci_PositionU recStartPos, Accessor &styler)\n{\n\tSci_PositionU pos;\n\n\tpos = recStartPos+1;\n\n\twhile (!IsNewline(styler.SafeGetCharAt(pos, '\\n'))) {\n\t\tpos++;\n\t}\n\n\treturn static_cast<Sci_Position>(pos - (recStartPos+1));\n}\n\n// Get the type of the \"address\" field content.\nstatic int GetTEHexAddressFieldType(Sci_PositionU recStartPos, Accessor &styler)\n{\n\tswitch (styler.SafeGetCharAt(recStartPos + 3)) {\n\t\tcase '6':\n\t\t\treturn SCE_HEX_DATAADDRESS;\n\n\t\tcase '8':\n\t\t\treturn SCE_HEX_STARTADDRESS;\n\n\t\tdefault: // handle possible format extension in the future\n\t\t\treturn SCE_HEX_ADDRESSFIELD_UNKNOWN;\n\t}\n}\n\n// Get the value of the \"checksum\" field.\nstatic int GetTEHexChecksum(Sci_PositionU recStartPos, Accessor &styler)\n{\n\treturn GetHexaChar(recStartPos+4, styler);\n}\n\n// Calculate the checksum of the record (excluding the checksum field).\nstatic int CalcTEHexChecksum(Sci_PositionU recStartPos, Accessor &styler)\n{\n\tSci_PositionU pos = recStartPos +1;\n\tSci_PositionU length = GetTEHexDigitCount(recStartPos, styler);\n\n\tint cs = GetHexaNibble(styler.SafeGetCharAt(pos++));//length\n\tcs += GetHexaNibble(styler.SafeGetCharAt(pos++));//length\n\n\tcs += GetHexaNibble(styler.SafeGetCharAt(pos++));//type\n\n\tpos += 2;// jump over CS field\n\n\tfor (; pos <= recStartPos + length; ++pos) {\n\t\tint val = GetHexaNibble(styler.SafeGetCharAt(pos));\n\n\t\tif (val < 0) {\n\t\t\treturn val;\n\t\t}\n\n\t\t// overflow does not matter\n\t\tcs += val;\n\t}\n\n\t// low byte\n\treturn cs & 0xFF;\n\n}\n\nstatic void ColouriseSrecDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *[], Accessor &styler)\n{\n\tStyleContext sc(startPos, length, initStyle, styler);\n\n\twhile (sc.More()) {\n\t\tSci_PositionU recStartPos;\n\t\tSci_Position reqByteCount;\n\t\tSci_Position dataFieldSize;\n\t\tint byteCount, addrFieldSize, addrFieldType, dataFieldType;\n\t\tint cs1, cs2;\n\n\t\tswitch (sc.state) {\n\t\t\tcase SCE_HEX_DEFAULT:\n\t\t\t\tif (sc.atLineStart && sc.Match('S')) {\n\t\t\t\t\tsc.SetState(SCE_HEX_RECSTART);\n\t\t\t\t}\n\t\t\t\tForwardWithinLine(sc);\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_HEX_RECSTART:\n\t\t\t\trecStartPos = sc.currentPos - 1;\n\t\t\t\taddrFieldType = GetSrecAddressFieldType(recStartPos, styler);\n\n\t\t\t\tif (addrFieldType == SCE_HEX_ADDRESSFIELD_UNKNOWN) {\n\t\t\t\t\tsc.SetState(SCE_HEX_RECTYPE_UNKNOWN);\n\t\t\t\t} else {\n\t\t\t\t\tsc.SetState(SCE_HEX_RECTYPE);\n\t\t\t\t}\n\n\t\t\t\tForwardWithinLine(sc);\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_HEX_RECTYPE:\n\t\t\tcase SCE_HEX_RECTYPE_UNKNOWN:\n\t\t\t\trecStartPos = sc.currentPos - 2;\n\t\t\t\tbyteCount = GetSrecByteCount(recStartPos, styler);\n\t\t\t\treqByteCount = GetSrecAddressFieldSize(recStartPos, styler)\n\t\t\t\t\t\t+ GetSrecRequiredDataFieldSize(recStartPos, styler)\n\t\t\t\t\t\t+ 1; // +1 for checksum field\n\n\t\t\t\tif (byteCount == CountSrecByteCount(recStartPos, styler)\n\t\t\t\t\t\t&& byteCount == reqByteCount) {\n\t\t\t\t\tsc.SetState(SCE_HEX_BYTECOUNT);\n\t\t\t\t} else {\n\t\t\t\t\tsc.SetState(SCE_HEX_BYTECOUNT_WRONG);\n\t\t\t\t}\n\n\t\t\t\tForwardWithinLine(sc, 2);\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_HEX_BYTECOUNT:\n\t\t\tcase SCE_HEX_BYTECOUNT_WRONG:\n\t\t\t\trecStartPos = sc.currentPos - 4;\n\t\t\t\taddrFieldSize = GetSrecAddressFieldSize(recStartPos, styler);\n\t\t\t\taddrFieldType = GetSrecAddressFieldType(recStartPos, styler);\n\n\t\t\t\tsc.SetState(addrFieldType);\n\t\t\t\tForwardWithinLine(sc, addrFieldSize * 2);\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_HEX_NOADDRESS:\n\t\t\tcase SCE_HEX_DATAADDRESS:\n\t\t\tcase SCE_HEX_RECCOUNT:\n\t\t\tcase SCE_HEX_STARTADDRESS:\n\t\t\tcase SCE_HEX_ADDRESSFIELD_UNKNOWN:\n\t\t\t\trecStartPos = GetSrecRecStartPosition(sc.currentPos, styler);\n\t\t\t\tdataFieldType = GetSrecDataFieldType(recStartPos, styler);\n\n\t\t\t\t// Using the required size here if possible has the effect that the\n\t\t\t\t// checksum is highlighted at a fixed position after this field for\n\t\t\t\t// specific record types, independent on the \"byte count\" value.\n\t\t\t\tdataFieldSize = GetSrecRequiredDataFieldSize(recStartPos, styler);\n\n\t\t\t\tsc.SetState(dataFieldType);\n\n\t\t\t\tif (dataFieldType == SCE_HEX_DATA_ODD) {\n\t\t\t\t\tfor (int i = 0; i < dataFieldSize * 2; i++) {\n\t\t\t\t\t\tif ((i & 0x3) == 0) {\n\t\t\t\t\t\t\tsc.SetState(SCE_HEX_DATA_ODD);\n\t\t\t\t\t\t} else if ((i & 0x3) == 2) {\n\t\t\t\t\t\t\tsc.SetState(SCE_HEX_DATA_EVEN);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!ForwardWithinLine(sc)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tForwardWithinLine(sc, dataFieldSize * 2);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_HEX_DATA_ODD:\n\t\t\tcase SCE_HEX_DATA_EVEN:\n\t\t\tcase SCE_HEX_DATA_EMPTY:\n\t\t\tcase SCE_HEX_DATA_UNKNOWN:\n\t\t\t\trecStartPos = GetSrecRecStartPosition(sc.currentPos, styler);\n\t\t\t\tcs1 = CalcSrecChecksum(recStartPos, styler);\n\t\t\t\tcs2 = GetSrecChecksum(recStartPos, styler);\n\n\t\t\t\tif (cs1 != cs2 || cs1 < 0 || cs2 < 0) {\n\t\t\t\t\tsc.SetState(SCE_HEX_CHECKSUM_WRONG);\n\t\t\t\t} else {\n\t\t\t\t\tsc.SetState(SCE_HEX_CHECKSUM);\n\t\t\t\t}\n\n\t\t\t\tForwardWithinLine(sc, 2);\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_HEX_CHECKSUM:\n\t\t\tcase SCE_HEX_CHECKSUM_WRONG:\n\t\t\tcase SCE_HEX_GARBAGE:\n\t\t\t\t// record finished or line too long\n\t\t\t\tsc.SetState(SCE_HEX_GARBAGE);\n\t\t\t\tForwardWithinLine(sc);\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t// prevent endless loop in faulty state\n\t\t\t\tsc.SetState(SCE_HEX_DEFAULT);\n\t\t\t\tbreak;\n\t\t}\n\t}\n\tsc.Complete();\n}\n\nstatic void ColouriseIHexDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *[], Accessor &styler)\n{\n\tStyleContext sc(startPos, length, initStyle, styler);\n\n\twhile (sc.More()) {\n\t\tSci_PositionU recStartPos;\n\t\tint byteCount, addrFieldType, dataFieldSize, dataFieldType;\n\t\tint cs1, cs2;\n\n\t\tswitch (sc.state) {\n\t\t\tcase SCE_HEX_DEFAULT:\n\t\t\t\tif (sc.atLineStart && sc.Match(':')) {\n\t\t\t\t\tsc.SetState(SCE_HEX_RECSTART);\n\t\t\t\t}\n\t\t\t\tForwardWithinLine(sc);\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_HEX_RECSTART:\n\t\t\t\trecStartPos = sc.currentPos - 1;\n\t\t\t\tbyteCount = GetIHexByteCount(recStartPos, styler);\n\t\t\t\tdataFieldSize = GetIHexRequiredDataFieldSize(recStartPos, styler);\n\n\t\t\t\tif (byteCount == CountIHexByteCount(recStartPos, styler)\n\t\t\t\t\t\t&& byteCount == dataFieldSize) {\n\t\t\t\t\tsc.SetState(SCE_HEX_BYTECOUNT);\n\t\t\t\t} else {\n\t\t\t\t\tsc.SetState(SCE_HEX_BYTECOUNT_WRONG);\n\t\t\t\t}\n\n\t\t\t\tForwardWithinLine(sc, 2);\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_HEX_BYTECOUNT:\n\t\t\tcase SCE_HEX_BYTECOUNT_WRONG:\n\t\t\t\trecStartPos = sc.currentPos - 3;\n\t\t\t\taddrFieldType = GetIHexAddressFieldType(recStartPos, styler);\n\n\t\t\t\tsc.SetState(addrFieldType);\n\t\t\t\tForwardWithinLine(sc, 4);\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_HEX_NOADDRESS:\n\t\t\tcase SCE_HEX_DATAADDRESS:\n\t\t\tcase SCE_HEX_ADDRESSFIELD_UNKNOWN:\n\t\t\t\trecStartPos = sc.currentPos - 7;\n\t\t\t\taddrFieldType = GetIHexAddressFieldType(recStartPos, styler);\n\n\t\t\t\tif (addrFieldType == SCE_HEX_ADDRESSFIELD_UNKNOWN) {\n\t\t\t\t\tsc.SetState(SCE_HEX_RECTYPE_UNKNOWN);\n\t\t\t\t} else {\n\t\t\t\t\tsc.SetState(SCE_HEX_RECTYPE);\n\t\t\t\t}\n\n\t\t\t\tForwardWithinLine(sc, 2);\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_HEX_RECTYPE:\n\t\t\tcase SCE_HEX_RECTYPE_UNKNOWN:\n\t\t\t\trecStartPos = sc.currentPos - 9;\n\t\t\t\tdataFieldType = GetIHexDataFieldType(recStartPos, styler);\n\n\t\t\t\t// Using the required size here if possible has the effect that the\n\t\t\t\t// checksum is highlighted at a fixed position after this field for\n\t\t\t\t// specific record types, independent on the \"byte count\" value.\n\t\t\t\tdataFieldSize = GetIHexRequiredDataFieldSize(recStartPos, styler);\n\n\t\t\t\tsc.SetState(dataFieldType);\n\n\t\t\t\tif (dataFieldType == SCE_HEX_DATA_ODD) {\n\t\t\t\t\tfor (int i = 0; i < dataFieldSize * 2; i++) {\n\t\t\t\t\t\tif ((i & 0x3) == 0) {\n\t\t\t\t\t\t\tsc.SetState(SCE_HEX_DATA_ODD);\n\t\t\t\t\t\t} else if ((i & 0x3) == 2) {\n\t\t\t\t\t\t\tsc.SetState(SCE_HEX_DATA_EVEN);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!ForwardWithinLine(sc)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tForwardWithinLine(sc, dataFieldSize * 2);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_HEX_DATA_ODD:\n\t\t\tcase SCE_HEX_DATA_EVEN:\n\t\t\tcase SCE_HEX_DATA_EMPTY:\n\t\t\tcase SCE_HEX_EXTENDEDADDRESS:\n\t\t\tcase SCE_HEX_STARTADDRESS:\n\t\t\tcase SCE_HEX_DATA_UNKNOWN:\n\t\t\t\trecStartPos = GetIHexRecStartPosition(sc.currentPos, styler);\n\t\t\t\tcs1 = CalcIHexChecksum(recStartPos, styler);\n\t\t\t\tcs2 = GetIHexChecksum(recStartPos, styler);\n\n\t\t\t\tif (cs1 != cs2 || cs1 < 0 || cs2 < 0) {\n\t\t\t\t\tsc.SetState(SCE_HEX_CHECKSUM_WRONG);\n\t\t\t\t} else {\n\t\t\t\t\tsc.SetState(SCE_HEX_CHECKSUM);\n\t\t\t\t}\n\n\t\t\t\tForwardWithinLine(sc, 2);\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_HEX_CHECKSUM:\n\t\t\tcase SCE_HEX_CHECKSUM_WRONG:\n\t\t\tcase SCE_HEX_GARBAGE:\n\t\t\t\t// record finished or line too long\n\t\t\t\tsc.SetState(SCE_HEX_GARBAGE);\n\t\t\t\tForwardWithinLine(sc);\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t// prevent endless loop in faulty state\n\t\t\t\tsc.SetState(SCE_HEX_DEFAULT);\n\t\t\t\tbreak;\n\t\t}\n\t}\n\tsc.Complete();\n}\n\nstatic void FoldIHexDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[], Accessor &styler)\n{\n\tSci_PositionU endPos = startPos + length;\n\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tint levelCurrent = SC_FOLDLEVELBASE;\n\tif (lineCurrent > 0)\n\t\tlevelCurrent = styler.LevelAt(lineCurrent - 1);\n\n\tSci_PositionU lineStartNext = styler.LineStart(lineCurrent + 1);\n\tint levelNext = SC_FOLDLEVELBASE; // default if no specific line found\n\n\tfor (Sci_PositionU i = startPos; i < endPos; i++) {\n\t\tbool atEOL = i == (lineStartNext - 1);\n\t\tint style = styler.StyleAt(i);\n\n\t\t// search for specific lines\n\t\tif (style == SCE_HEX_EXTENDEDADDRESS) {\n\t\t\t// extended addres record\n\t\t\tlevelNext = SC_FOLDLEVELBASE | SC_FOLDLEVELHEADERFLAG;\n\t\t} else if (style == SCE_HEX_DATAADDRESS\n\t\t\t|| (style == SCE_HEX_DEFAULT\n\t\t\t\t&& i == (Sci_PositionU)styler.LineStart(lineCurrent))) {\n\t\t\t// data record or no record start code at all\n\t\t\tif (levelCurrent & SC_FOLDLEVELHEADERFLAG) {\n\t\t\t\tlevelNext = SC_FOLDLEVELBASE + 1;\n\t\t\t} else {\n\t\t\t\t// continue level 0 or 1, no fold point\n\t\t\t\tlevelNext = levelCurrent;\n\t\t\t}\n\t\t}\n\n\t\tif (atEOL || (i == endPos - 1)) {\n\t\t\tstyler.SetLevel(lineCurrent, levelNext);\n\n\t\t\tlineCurrent++;\n\t\t\tlineStartNext = styler.LineStart(lineCurrent + 1);\n\t\t\tlevelCurrent = levelNext;\n\t\t\tlevelNext = SC_FOLDLEVELBASE;\n\t\t}\n\t}\n}\n\nstatic void ColouriseTEHexDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *[], Accessor &styler)\n{\n\tStyleContext sc(startPos, length, initStyle, styler);\n\n\twhile (sc.More()) {\n\t\tSci_PositionU recStartPos;\n\t\tint digitCount, addrFieldType;\n\t\tint cs1, cs2;\n\n\t\tswitch (sc.state) {\n\t\t\tcase SCE_HEX_DEFAULT:\n\t\t\t\tif (sc.atLineStart && sc.Match('%')) {\n\t\t\t\t\tsc.SetState(SCE_HEX_RECSTART);\n\t\t\t\t}\n\t\t\t\tForwardWithinLine(sc);\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_HEX_RECSTART:\n\n\t\t\t\trecStartPos = sc.currentPos - 1;\n\n\t\t\t\tif (GetTEHexDigitCount(recStartPos, styler) == CountTEHexDigitCount(recStartPos, styler)) {\n\t\t\t\t\tsc.SetState(SCE_HEX_BYTECOUNT);\n\t\t\t\t} else {\n\t\t\t\t\tsc.SetState(SCE_HEX_BYTECOUNT_WRONG);\n\t\t\t\t}\n\n\t\t\t\tForwardWithinLine(sc, 2);\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_HEX_BYTECOUNT:\n\t\t\tcase SCE_HEX_BYTECOUNT_WRONG:\n\t\t\t\trecStartPos = sc.currentPos - 3;\n\t\t\t\taddrFieldType = GetTEHexAddressFieldType(recStartPos, styler);\n\n\t\t\t\tif (addrFieldType == SCE_HEX_ADDRESSFIELD_UNKNOWN) {\n\t\t\t\t\tsc.SetState(SCE_HEX_RECTYPE_UNKNOWN);\n\t\t\t\t} else {\n\t\t\t\t\tsc.SetState(SCE_HEX_RECTYPE);\n\t\t\t\t}\n\n\t\t\t\tForwardWithinLine(sc);\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_HEX_RECTYPE:\n\t\t\tcase SCE_HEX_RECTYPE_UNKNOWN:\n\t\t\t\trecStartPos = sc.currentPos - 4;\n\t\t\t\tcs1 = CalcTEHexChecksum(recStartPos, styler);\n\t\t\t\tcs2 = GetTEHexChecksum(recStartPos, styler);\n\n\t\t\t\tif (cs1 != cs2 || cs1 < 0 || cs2 < 0) {\n\t\t\t\t\tsc.SetState(SCE_HEX_CHECKSUM_WRONG);\n\t\t\t\t} else {\n\t\t\t\t\tsc.SetState(SCE_HEX_CHECKSUM);\n\t\t\t\t}\n\n\t\t\t\tForwardWithinLine(sc, 2);\n\t\t\t\tbreak;\n\n\n\t\t\tcase SCE_HEX_CHECKSUM:\n\t\t\tcase SCE_HEX_CHECKSUM_WRONG:\n\t\t\t\trecStartPos = sc.currentPos - 6;\n\t\t\t\taddrFieldType = GetTEHexAddressFieldType(recStartPos, styler);\n\n\t\t\t\tsc.SetState(addrFieldType);\n\t\t\t\tForwardWithinLine(sc, 9);\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_HEX_DATAADDRESS:\n\t\t\tcase SCE_HEX_STARTADDRESS:\n\t\t\tcase SCE_HEX_ADDRESSFIELD_UNKNOWN:\n\t\t\t\trecStartPos = sc.currentPos - 15;\n\t\t\t\tdigitCount = GetTEHexDigitCount(recStartPos, styler) - 14;\n\n\t\t\t\tsc.SetState(SCE_HEX_DATA_ODD);\n\n\t\t\t\tfor (int i = 0; i < digitCount; i++) {\n\t\t\t\t\tif ((i & 0x3) == 0) {\n\t\t\t\t\t\tsc.SetState(SCE_HEX_DATA_ODD);\n\t\t\t\t\t} else if ((i & 0x3) == 2) {\n\t\t\t\t\t\tsc.SetState(SCE_HEX_DATA_EVEN);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!ForwardWithinLine(sc)) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_HEX_DATA_ODD:\n\t\t\tcase SCE_HEX_DATA_EVEN:\n\t\t\tcase SCE_HEX_GARBAGE:\n\t\t\t\t// record finished or line too long\n\t\t\t\tsc.SetState(SCE_HEX_GARBAGE);\n\t\t\t\tForwardWithinLine(sc);\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t// prevent endless loop in faulty state\n\t\t\t\tsc.SetState(SCE_HEX_DEFAULT);\n\t\t\t\tbreak;\n\t\t}\n\t}\n\tsc.Complete();\n}\n\nLexerModule lmSrec(SCLEX_SREC, ColouriseSrecDoc, \"srec\", 0, NULL);\nLexerModule lmIHex(SCLEX_IHEX, ColouriseIHexDoc, \"ihex\", FoldIHexDoc, NULL);\nLexerModule lmTEHex(SCLEX_TEHEX, ColouriseTEHexDoc, \"tehex\", 0, NULL);\n"
  },
  {
    "path": "lexilla/lexers/LexHollywood.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexHollywood.cxx\n ** Lexer for Hollywood\n ** Written by Andreas Falkenhahn, based on the BlitzBasic/PureBasic/Lua lexers\n ** Thanks to Nicholai Benalal\n ** For more information on Hollywood, see http://www.hollywood-mal.com/\n ** Mail me (andreas <at> airsoftsoftwair <dot> de) for any bugs.\n ** This code is subject to the same license terms as the rest of the Scintilla project:\n ** The License.txt file describes the conditions under which this software may be distributed. \n **/\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n#include <map>\n#include <functional>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n#include \"OptionSet.h\"\n#include \"DefaultLexer.h\"\n\nusing namespace Scintilla;\nusing namespace Lexilla;\n\n/* Bits:\n * 1  - whitespace\n * 2  - operator\n * 4  - identifier\n * 8  - decimal digit\n * 16 - hex digit\n * 32 - bin digit\n * 64 - letter\n */\nstatic int character_classification[128] =\n{\n\t0, // NUL ($0)\n\t0, // SOH ($1)\n\t0, // STX ($2)\n\t0, // ETX ($3)\n\t0, // EOT ($4)\n\t0, // ENQ ($5)\n\t0, // ACK ($6)\n\t0, // BEL ($7)\n\t0, // BS ($8)\n\t1, // HT ($9)\n\t1, // LF ($A)\n\t0, // VT ($B)\n\t0, // FF ($C)\n\t1, // CR ($D)\n\t0, // SO ($E)\n\t0, // SI ($F)\n\t0, // DLE ($10)\n\t0, // DC1 ($11)\n\t0, // DC2 ($12)\n\t0, // DC3 ($13)\n\t0, // DC4 ($14)\n\t0, // NAK ($15)\n\t0, // SYN ($16)\n\t0, // ETB ($17)\n\t0, // CAN ($18)\n\t0, // EM ($19)\n\t0, // SUB ($1A)\n\t0, // ESC ($1B)\n\t0, // FS ($1C)\n\t0, // GS ($1D)\n\t0, // RS ($1E)\n\t0, // US ($1F)\n\t1, // space ($20)\n\t4, // ! ($21)\n\t0, // \" ($22)\n\t0, // # ($23)\n\t4, // $ ($24)\n\t2, // % ($25)\n\t2, // & ($26)\n\t2, // ' ($27)\n\t2, // ( ($28)\n\t2, // ) ($29)\n\t2, // * ($2A)\n\t2, // + ($2B)\n\t2, // , ($2C)\n\t2, // - ($2D)\n\t// NB: we treat \".\" as an identifier although it is also an operator and a decimal digit\n\t// the reason why we treat it as an identifier is to support syntax highlighting for\n\t// plugin commands which always use a \".\" in their names, e.g. pdf.OpenDocument();\n\t// we handle the decimal digit case manually below so that 3.1415 and .123 is styled correctly\n\t// the collateral damage of treating \".\" as an identifier is that \".\" is never styled\n\t// SCE_HOLLYWOOD_OPERATOR\n\t4, // . ($2E) \n\t2, // / ($2F)\n\t28, // 0 ($30)\n\t28, // 1 ($31)\n\t28, // 2 ($32)\n\t28, // 3 ($33)\n\t28, // 4 ($34)\n\t28, // 5 ($35)\n\t28, // 6 ($36)\n\t28, // 7 ($37)\n\t28, // 8 ($38)\n\t28, // 9 ($39)\n\t2, // : ($3A)\n\t2, // ; ($3B)\n\t2, // < ($3C)\n\t2, // = ($3D)\n\t2, // > ($3E)\n\t2, // ? ($3F)\n\t0, // @ ($40)\n\t84, // A ($41)\n\t84, // B ($42)\n\t84, // C ($43)\n\t84, // D ($44)\n\t84, // E ($45)\n\t84, // F ($46)\n\t68, // G ($47)\n\t68, // H ($48)\n\t68, // I ($49)\n\t68, // J ($4A)\n\t68, // K ($4B)\n\t68, // L ($4C)\n\t68, // M ($4D)\n\t68, // N ($4E)\n\t68, // O ($4F)\n\t68, // P ($50)\n\t68, // Q ($51)\n\t68, // R ($52)\n\t68, // S ($53)\n\t68, // T ($54)\n\t68, // U ($55)\n\t68, // V ($56)\n\t68, // W ($57)\n\t68, // X ($58)\n\t68, // Y ($59)\n\t68, // Z ($5A)\n\t2, // [ ($5B)\n\t2, // \\ ($5C)\n\t2, // ] ($5D)\n\t2, // ^ ($5E)\n\t68, // _ ($5F)\n\t2, // ` ($60)\n\t84, // a ($61)\n\t84, // b ($62)\n\t84, // c ($63)\n\t84, // d ($64)\n\t84, // e ($65)\n\t84, // f ($66)\n\t68, // g ($67)\n\t68, // h ($68)\n\t68, // i ($69)\n\t68, // j ($6A)\n\t68, // k ($6B)\n\t68, // l ($6C)\n\t68, // m ($6D)\n\t68, // n ($6E)\n\t68, // o ($6F)\n\t68, // p ($70)\n\t68, // q ($71)\n\t68, // r ($72)\n\t68, // s ($73)\n\t68, // t ($74)\n\t68, // u ($75)\n\t68, // v ($76)\n\t68, // w ($77)\n\t68, // x ($78)\n\t68, // y ($79)\n\t68, // z ($7A)\n\t2, // { ($7B)\n\t2, // | ($7C)\n\t2, // } ($7D)\n\t2, // ~ ($7E)\n\t0, // &#127; ($7F)\n};\n\nstatic bool IsSpace(int c) {\n\treturn c < 128 && (character_classification[c] & 1);\n}\n\nstatic bool IsOperator(int c) {\n\treturn c < 128 && (character_classification[c] & 2);\n}\n\nstatic bool IsIdentifier(int c) {\n\treturn c < 128 && (character_classification[c] & 4);\n}\n\nstatic bool IsDigit(int c) {\n\treturn c < 128 && (character_classification[c] & 8);\n}\n\nstatic bool IsHexDigit(int c) {\n\treturn c < 128 && (character_classification[c] & 16);\n}\n\nstatic int LowerCase(int c)\n{\n\tif (c >= 'A' && c <= 'Z')\n\t\treturn 'a' + c - 'A';\n\treturn c;\n}\n\nstatic int CheckHollywoodFoldPoint(char const *token) {\n\tif (!strcmp(token, \"function\")) {\n\t\treturn 1;\n\t}\n\tif (!strcmp(token, \"endfunction\")) {\n\t\treturn -1;\n\t}\n\treturn 0;\n}\n\n// An individual named option for use in an OptionSet\n\n// Options used for LexerHollywood\nstruct OptionsHollywood {\n\tbool fold;\n\tbool foldCompact;\n\tOptionsHollywood() {\n\t\tfold = false;\n\t\tfoldCompact = false;\n\t}\n};\n\nstatic const char * const hollywoodWordListDesc[] = {\n\t\"Hollywood keywords\",\n\t\"Hollywood standard API functions\",\n\t\"Hollywood plugin API functions\",\n\t\"Hollywood plugin methods\",\n\t0\n};\n\nstruct OptionSetHollywood : public OptionSet<OptionsHollywood> {\n\tOptionSetHollywood(const char * const wordListDescriptions[]) {\n\t\tDefineProperty(\"fold\", &OptionsHollywood::fold);\n\t\tDefineProperty(\"fold.compact\", &OptionsHollywood::foldCompact);\n\t\tDefineWordListSets(wordListDescriptions);\n\t}\n};\n\nclass LexerHollywood : public DefaultLexer {\n\tint (*CheckFoldPoint)(char const *);\n\tWordList keywordlists[4];\t\n\tOptionsHollywood options;\n\tOptionSetHollywood osHollywood;\npublic:\n\tLexerHollywood(int (*CheckFoldPoint_)(char const *), const char * const wordListDescriptions[]) :\n\t\t\t\t\t\t DefaultLexer(\"hollywood\", SCLEX_HOLLYWOOD),\n\t\t\t\t\t\t CheckFoldPoint(CheckFoldPoint_),\n\t\t\t\t\t\t osHollywood(wordListDescriptions) {\n\t}\n\tvirtual ~LexerHollywood() {\n\t}\n\tvoid SCI_METHOD Release() override {\n\t\tdelete this;\n\t}\n\tint SCI_METHOD Version() const override {\n\t\treturn lvRelease5;\n\t}\n\tconst char * SCI_METHOD PropertyNames() override {\n\t\treturn osHollywood.PropertyNames();\n\t}\n\tint SCI_METHOD PropertyType(const char *name) override {\n\t\treturn osHollywood.PropertyType(name);\n\t}\n\tconst char * SCI_METHOD DescribeProperty(const char *name) override {\n\t\treturn osHollywood.DescribeProperty(name);\n\t}\n\tSci_Position SCI_METHOD PropertySet(const char *key, const char *val) override;\n\tconst char * SCI_METHOD PropertyGet(const char* key) override {\n\t\treturn osHollywood.PropertyGet(key);\n\t}\n\tconst char * SCI_METHOD DescribeWordListSets() override {\n\t\treturn osHollywood.DescribeWordListSets();\n\t}\n\tSci_Position SCI_METHOD WordListSet(int n, const char *wl) override;\n\tvoid SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;\n\tvoid SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;\n\n\tvoid * SCI_METHOD PrivateCall(int, void *) override {\n\t\treturn 0;\n\t}\n\tstatic ILexer5 *LexerFactoryHollywood() {\n\t\treturn new LexerHollywood(CheckHollywoodFoldPoint, hollywoodWordListDesc);\n\t}\n};\n\nSci_Position SCI_METHOD LexerHollywood::PropertySet(const char *key, const char *val) {\n\tif (osHollywood.PropertySet(&options, key, val)) {\n\t\treturn 0;\n\t}\n\treturn -1;\n}\n\nSci_Position SCI_METHOD LexerHollywood::WordListSet(int n, const char *wl) {\n\tWordList *wordListN = 0;\n\tswitch (n) {\n\tcase 0:\n\t\twordListN = &keywordlists[0];\n\t\tbreak;\n\tcase 1:\n\t\twordListN = &keywordlists[1];\n\t\tbreak;\n\tcase 2:\n\t\twordListN = &keywordlists[2];\n\t\tbreak;\n\tcase 3:\n\t\twordListN = &keywordlists[3];\n\t\tbreak;\n\t}\n\tSci_Position firstModification = -1;\n\tif (wordListN) {\n\t\tWordList wlNew;\n\t\twlNew.Set(wl);\n\t\tif (*wordListN != wlNew) {\n\t\t\twordListN->Set(wl);\n\t\t\tfirstModification = 0;\n\t\t}\n\t}\n\treturn firstModification;\t\n}\n\nvoid SCI_METHOD LexerHollywood::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) {\n\tLexAccessor styler(pAccess);\n\n\tstyler.StartAt(startPos);\n\tbool inString = false;\n\t\n\tStyleContext sc(startPos, length, initStyle, styler);\n\n\t// Can't use sc.More() here else we miss the last character\n\tfor (; ; sc.Forward())\n\t {\n\t \tif (sc.atLineStart) inString = false;\n\t \t\t\n\t \tif (sc.ch == '\\\"' && sc.chPrev != '\\\\') inString = !inString;\n\t \t\t\n\t\tif (sc.state == SCE_HOLLYWOOD_IDENTIFIER) {\n\t\t\tif (!IsIdentifier(sc.ch)) {\t\t\t\t\n\t\t\t\tchar s[100];\n\t\t\t\tint kstates[4] = {\n\t\t\t\t\tSCE_HOLLYWOOD_KEYWORD,\n\t\t\t\t\tSCE_HOLLYWOOD_STDAPI,\n\t\t\t\t\tSCE_HOLLYWOOD_PLUGINAPI,\n\t\t\t\t\tSCE_HOLLYWOOD_PLUGINMETHOD,\n\t\t\t\t};\n\t\t\t\tsc.GetCurrentLowered(s, sizeof(s));\n\t\t\t\tfor (int i = 0; i < 4; i++) {\n\t\t\t\t\tif (keywordlists[i].InList(s)) {\n\t\t\t\t\t\tsc.ChangeState(kstates[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsc.SetState(SCE_HOLLYWOOD_DEFAULT);\t\t\t\t\n\t\t\t}\n\t\t} else if (sc.state == SCE_HOLLYWOOD_OPERATOR) {\n\t\t\t\n\t\t\t// always reset to default on operators because otherwise\n\t\t\t// comments won't be recognized in sequences like \"+/* Hello*/\"\n\t\t\t// --> \"+/*\" would be recognized as a sequence of operators\n\t\t\t\n\t\t\t// if (!IsOperator(sc.ch)) sc.SetState(SCE_HOLLYWOOD_DEFAULT);\n\t\t\tsc.SetState(SCE_HOLLYWOOD_DEFAULT);\n\t\t\t\n\t\t} else if (sc.state == SCE_HOLLYWOOD_PREPROCESSOR) {\n\t\t\tif (!IsIdentifier(sc.ch))\n\t\t\t\tsc.SetState(SCE_HOLLYWOOD_DEFAULT);\n\t\t} else if (sc.state == SCE_HOLLYWOOD_CONSTANT) {\n\t\t\tif (!IsIdentifier(sc.ch))\n\t\t\t\tsc.SetState(SCE_HOLLYWOOD_DEFAULT);\n\t\t} else if (sc.state == SCE_HOLLYWOOD_NUMBER) {\n\t\t\tif (!IsDigit(sc.ch) && sc.ch != '.')\n\t\t\t\tsc.SetState(SCE_HOLLYWOOD_DEFAULT);\n\t\t} else if (sc.state == SCE_HOLLYWOOD_HEXNUMBER) {\n\t\t\tif (!IsHexDigit(sc.ch))\n\t\t\t\tsc.SetState(SCE_HOLLYWOOD_DEFAULT);\n\t\t} else if (sc.state == SCE_HOLLYWOOD_STRING) {\n\t\t\tif (sc.ch == '\"') {\n\t\t\t\tsc.ForwardSetState(SCE_HOLLYWOOD_DEFAULT);\n\t\t\t}\n\t\t\tif (sc.atLineEnd) {\n\t\t\t\tsc.SetState(SCE_HOLLYWOOD_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_HOLLYWOOD_COMMENT) {\n\t\t\tif (sc.atLineEnd) {\n\t\t\t\tsc.SetState(SCE_HOLLYWOOD_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_HOLLYWOOD_COMMENTBLOCK) {\n\t\t\tif (sc.Match(\"*/\") && !inString) {\n\t\t\t\tsc.Forward();\n\t\t\t\tsc.ForwardSetState(SCE_HOLLYWOOD_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_HOLLYWOOD_STRINGBLOCK) {\n\t\t\tif (sc.Match(\"]]\") && !inString) {\n\t\t\t\tsc.Forward();\n\t\t\t\tsc.ForwardSetState(SCE_HOLLYWOOD_DEFAULT);\n\t\t\t}\t\t\t\n\t\t}\n\n\t\tif (sc.state == SCE_HOLLYWOOD_DEFAULT) {\n\t\t\tif (sc.Match(';')) {\n\t\t\t\tsc.SetState(SCE_HOLLYWOOD_COMMENT);\n\t\t\t} else if (sc.Match(\"/*\")) {\n\t\t\t\tsc.SetState(SCE_HOLLYWOOD_COMMENTBLOCK);\n\t\t\t\tsc.Forward();\n\t\t\t} else if (sc.Match(\"[[\")) {\n\t\t\t\tsc.SetState(SCE_HOLLYWOOD_STRINGBLOCK);\n\t\t\t\tsc.Forward();\t\t\t\t\n\t\t\t} else if (sc.Match('\"')) {\n\t\t\t\tsc.SetState(SCE_HOLLYWOOD_STRING);\n\t\t\t} else if (sc.Match('$')) { \n\t\t\t\tsc.SetState(SCE_HOLLYWOOD_HEXNUMBER);\n\t\t\t} else if (sc.Match(\"0x\") || sc.Match(\"0X\")) {  // must be before IsDigit() because of 0x\n\t\t\t\tsc.SetState(SCE_HOLLYWOOD_HEXNUMBER);\n\t\t\t\tsc.Forward();\n\t\t\t} else if (sc.ch == '.' && (sc.chNext >= '0' && sc.chNext <= '9')) {  // \".1234\" style numbers\n\t\t\t\tsc.SetState(SCE_HOLLYWOOD_NUMBER);\n\t\t\t\tsc.Forward();\t\n\t\t\t} else if (IsDigit(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_HOLLYWOOD_NUMBER);\n\t\t\t} else if (sc.Match('#')) {\n\t\t\t\tsc.SetState(SCE_HOLLYWOOD_CONSTANT);\n\t\t\t} else if (sc.Match('@')) {\n\t\t\t\tsc.SetState(SCE_HOLLYWOOD_PREPROCESSOR);\t\n\t\t\t} else if (IsOperator(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_HOLLYWOOD_OPERATOR);\n\t\t\t} else if (IsIdentifier(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_HOLLYWOOD_IDENTIFIER);\n\t\t\t}\n\t\t}\n\n\t\tif (!sc.More())\n\t\t\tbreak;\n\t}\n\tsc.Complete();\n}\n\nvoid SCI_METHOD LexerHollywood::Fold(Sci_PositionU startPos, Sci_Position length, int /* initStyle */, IDocument *pAccess) {\n\n\tif (!options.fold)\n\t\treturn;\n\n\tLexAccessor styler(pAccess);\n\t\n\tSci_PositionU lengthDoc = startPos + length;\n\tint visibleChars = 0;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tint levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK;\n\tint levelCurrent = levelPrev;\n\tchar chNext = styler[startPos];\n\tint styleNext = styler.StyleAt(startPos);\n\tint done = 0;\n\tchar word[256];\n\tint wordlen = 0;\n\t\t\n\tfor (Sci_PositionU i = startPos; i < lengthDoc; i++) {\n\t\tchar ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\tint style = styleNext;\n\t\tstyleNext = styler.StyleAt(i + 1);\n\t\tbool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n\t\tif (!done) {\n\t\t\tif (wordlen) { // are we scanning a token already?\n\t\t\t\tword[wordlen] = static_cast<char>(LowerCase(ch));\n\t\t\t\tif (!IsIdentifier(ch)) { // done with token\n\t\t\t\t\tword[wordlen] = '\\0';\n\t\t\t\t\tlevelCurrent += CheckFoldPoint(word);\n\t\t\t\t\tdone = 1;\n\t\t\t\t} else if (wordlen < 255) {\n\t\t\t\t\twordlen++;\n\t\t\t\t}\n\t\t\t} else { // start scanning at first non-whitespace character\n\t\t\t\tif (!IsSpace(ch)) {\n\t\t\t\t\tif (style != SCE_HOLLYWOOD_COMMENTBLOCK && IsIdentifier(ch)) {\n\t\t\t\t\t\tword[0] = static_cast<char>(LowerCase(ch));\n\t\t\t\t\t\twordlen = 1;\n\t\t\t\t\t} else // done with this line\n\t\t\t\t\t\tdone = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n\n\t\tif (atEOL) {\n\t\t\tint lev = levelPrev;\n\t\t\tif (visibleChars == 0 && options.foldCompact) {\n\t\t\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\t\t\t}\n\t\t\tif ((levelCurrent > levelPrev) && (visibleChars > 0)) {\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\t}\n\t\t\tif (lev != styler.LevelAt(lineCurrent)) {\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\t\t\t}\n\t\t\tlineCurrent++;\n\t\t\tlevelPrev = levelCurrent;\n\t\t\tvisibleChars = 0;\n\t\t\tdone = 0;\n\t\t\twordlen = 0;\t\t\t\n\t\t}\n\t\tif (!IsSpace(ch)) {\n\t\t\tvisibleChars++;\n\t\t}\n\t}\n\t// Fill in the real level of the next line, keeping the current flags as they will be filled in later\n\n\tint flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK;\n\tstyler.SetLevel(lineCurrent, levelPrev | flagsNext);\t\n}\n\nLexerModule lmHollywood(SCLEX_HOLLYWOOD, LexerHollywood::LexerFactoryHollywood, \"hollywood\", hollywoodWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexIndent.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexIndent.cxx\n ** Lexer for no language. Used for indentation-based folding of files.\n **/\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nstatic void ColouriseIndentDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[],\n                            Accessor &styler) {\n\t// Indent language means all style bytes are 0 so just mark the end - no need to fill in.\n\tif (length > 0) {\n\t\tstyler.StartAt(startPos + length - 1);\n\t\tstyler.StartSegment(startPos + length - 1);\n\t\tstyler.ColourTo(startPos + length - 1, 0);\n\t}\n}\n\nstatic void FoldIndentDoc(Sci_PositionU startPos, Sci_Position length, int /* initStyle */, WordList *[], Accessor &styler) {\n\tint visibleCharsCurrent, visibleCharsNext;\n\tint levelCurrent, levelNext;\n\tSci_PositionU i, lineEnd;\n\tSci_PositionU lengthDoc   = startPos + length;\n\tSci_Position  lineCurrent = styler.GetLine(startPos);\n\n\ti       = styler.LineStart(lineCurrent  );\n\tlineEnd = styler.LineStart(lineCurrent+1)-1;\n\tif(lineEnd>=lengthDoc) lineEnd = lengthDoc-1;\n\twhile(styler[lineEnd]=='\\n' || styler[lineEnd]=='\\r') lineEnd--;\n\tfor(visibleCharsCurrent=0, levelCurrent=SC_FOLDLEVELBASE; !visibleCharsCurrent && i<=lineEnd; i++){\n\t\tif(isspacechar(styler[i])) levelCurrent++;\n\t\telse                       visibleCharsCurrent=1;\n\t}\n\n\tfor(; i<lengthDoc; lineCurrent++) {\n\t\ti       = styler.LineStart(lineCurrent+1);\n\t\tlineEnd = styler.LineStart(lineCurrent+2)-1;\n\t\tif(lineEnd>=lengthDoc) lineEnd = lengthDoc-1;\n\t\twhile(styler[lineEnd]=='\\n' || styler[lineEnd]=='\\r') lineEnd--;\n\t\tfor(visibleCharsNext=0, levelNext=SC_FOLDLEVELBASE; !visibleCharsNext && i<=lineEnd; i++){\n\t\t\tif(isspacechar(styler[i])) levelNext++;\n\t\t\telse                       visibleCharsNext=1;\n\t\t}\n\t\tint lev = levelCurrent;\n\t\tif(!visibleCharsCurrent) lev |= SC_FOLDLEVELWHITEFLAG;\n\t\telse if(levelNext > levelCurrent) lev |= SC_FOLDLEVELHEADERFLAG;\n\t\tstyler.SetLevel(lineCurrent, lev);\n\t\tlevelCurrent = levelNext;\n\t\tvisibleCharsCurrent = visibleCharsNext;\n\t}\n}\n\nLexerModule lmIndent(SCLEX_INDENT, ColouriseIndentDoc, \"indent\", FoldIndentDoc);\n"
  },
  {
    "path": "lexilla/lexers/LexInno.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexInno.cxx\n ** Lexer for Inno Setup scripts.\n **/\n// Written by Friedrich Vedder <fvedd@t-online.de>, using code from LexOthers.cxx.\n// Modified by Michael Heath.\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nstatic bool innoIsBlank(int ch) {\n\treturn (ch == ' ') || (ch == '\\t');\n}\n\nstatic bool innoNextNotBlankIs(Sci_Position i, Accessor &styler, char needle) {\n\tchar ch;\n\n\twhile (i < styler.Length()) {\n\t\tch = styler.SafeGetCharAt(i);\n\n\t\tif (ch == needle)\n\t\t\treturn true;\n\n\t\tif (!innoIsBlank(ch))\n\t\t\treturn false;\n\n\t\ti++;\n\t}\n\treturn false;\n}\n\nstatic void ColouriseInnoDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *keywordLists[], Accessor &styler) {\n\tint state = SCE_INNO_DEFAULT;\n\tchar chPrev;\n\tchar ch = 0;\n\tchar chNext = styler[startPos];\n\tSci_Position lengthDoc = startPos + length;\n\tchar *buffer = new char[length + 1];\n\tSci_Position bufferCount = 0;\n\tbool isBOL, isEOL, isWS, isBOLWS = 0;\n\n\t// Save line state later with bitState and bitand with bit... to get line state\n\tint bitState = 0;\n\tint const bitCode = 1, bitMessages = 2, bitCommentCurly = 4, bitCommentRound = 8;\n\n\t// Get keyword lists\n\tWordList &sectionKeywords = *keywordLists[0];\n\tWordList &standardKeywords = *keywordLists[1];\n\tWordList &parameterKeywords = *keywordLists[2];\n\tWordList &preprocessorKeywords = *keywordLists[3];\n\tWordList &pascalKeywords = *keywordLists[4];\n\tWordList &userKeywords = *keywordLists[5];\n\n\t// Get line state\n\tSci_Position curLine = styler.GetLine(startPos);\n\tint curLineState = curLine > 0 ? styler.GetLineState(curLine - 1) : 0;\n\tbool isCode = (curLineState & bitCode);\n\tbool isMessages = (curLineState & bitMessages);\n\tbool isCommentCurly = (curLineState & bitCommentCurly);\n\tbool isCommentRound = (curLineState & bitCommentRound);\n\tbool isCommentSlash = false;\n\n\t// Continue Pascal multline comment state\n\tif (isCommentCurly || isCommentRound)\n\t\tstate = SCE_INNO_COMMENT_PASCAL;\n\n\t// Go through all provided text segment\n\t// using the hand-written state machine shown below\n\tstyler.StartAt(startPos);\n\tstyler.StartSegment(startPos);\n\n\tfor (Sci_Position i = startPos; i < lengthDoc; i++) {\n\t\tchPrev = ch;\n\t\tch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\n\t\tif (styler.IsLeadByte(ch)) {\n\t\t\tchNext = styler.SafeGetCharAt(i + 2);\n\t\t\ti++;\n\t\t\tcontinue;\n\t\t}\n\n\t\tisBOL = (chPrev == 0) || (chPrev == '\\n') || (chPrev == '\\r' && ch != '\\n');\n\t\tisBOLWS = (isBOL) ? 1 : (isBOLWS && (chPrev == ' ' || chPrev == '\\t'));\n\t\tisEOL = (ch == '\\n' || ch == '\\r');\n\t\tisWS = (ch == ' ' || ch == '\\t');\n\n\t\tif ((ch == '\\r' && chNext != '\\n') || (ch == '\\n')) {\n\t\t\t// Remember the line state for future incremental lexing\n\t\t\tcurLine = styler.GetLine(i);\n\t\t\tbitState = 0;\n\n\t\t\tif (isCode)\n\t\t\t\tbitState |= bitCode;\n\n\t\t\tif (isMessages)\n\t\t\t\tbitState |= bitMessages;\n\n\t\t\tif (isCommentCurly)\n\t\t\t\tbitState |= bitCommentCurly;\n\n\t\t\tif (isCommentRound)\n\t\t\t\tbitState |= bitCommentRound;\n\n\t\t\tstyler.SetLineState(curLine, bitState);\n\t\t}\n\n\t\tswitch(state) {\n\t\t\tcase SCE_INNO_DEFAULT:\n\t\t\t\tif (!isCode && ch == ';' && isBOLWS) {\n\t\t\t\t\t// Start of a comment\n\t\t\t\t\tstate = SCE_INNO_COMMENT;\n\t\t\t\t\tstyler.ColourTo(i, SCE_INNO_COMMENT);\n\t\t\t\t} else if (ch == '[' && isBOLWS) {\n\t\t\t\t\t// Start of a section name\n\t\t\t\t\tstate = SCE_INNO_SECTION;\n\t\t\t\t\tbufferCount = 0;\n\t\t\t\t} else if (ch == '#' && isBOLWS) {\n\t\t\t\t\t// Start of a preprocessor directive\n\t\t\t\t\tstate = SCE_INNO_PREPROC;\n\t\t\t\t} else if (!isCode && ch == '{' && chNext != '{' && chPrev != '{') {\n\t\t\t\t\t// Start of an inline expansion\n\t\t\t\t\tstate = SCE_INNO_INLINE_EXPANSION;\n\t\t\t\t} else if (isCode && ch == '{') {\n\t\t\t\t\t// Start of a Pascal comment\n\t\t\t\t\tstate = SCE_INNO_COMMENT_PASCAL;\n\t\t\t\t\tisCommentCurly = true;\n\t\t\t\t\tstyler.ColourTo(i, SCE_INNO_COMMENT_PASCAL);\n\t\t\t\t} else if (isCode && (ch == '(' && chNext == '*')) {\n\t\t\t\t\t// Start of a Pascal comment\n\t\t\t\t\tstate = SCE_INNO_COMMENT_PASCAL;\n\t\t\t\t\tisCommentRound = true;\n\t\t\t\t\tstyler.ColourTo(i + 1, SCE_INNO_COMMENT_PASCAL);\n\t\t\t\t} else if (isCode && ch == '/' && chNext == '/') {\n\t\t\t\t\t// Start of C-style comment\n\t\t\t\t\tstate = SCE_INNO_COMMENT_PASCAL;\n\t\t\t\t\tisCommentSlash = true;\n\t\t\t\t\tstyler.ColourTo(i + 1, SCE_INNO_COMMENT_PASCAL);\n\t\t\t\t} else if (!isMessages && ch == '\"') {\n\t\t\t\t\t// Start of a double-quote string\n\t\t\t\t\tstate = SCE_INNO_STRING_DOUBLE;\n\t\t\t\t\tstyler.ColourTo(i, SCE_INNO_STRING_DOUBLE);\n\t\t\t\t} else if (!isMessages && ch == '\\'') {\n\t\t\t\t\t// Start of a single-quote string\n\t\t\t\t\tstate = SCE_INNO_STRING_SINGLE;\n\t\t\t\t\tstyler.ColourTo(i, SCE_INNO_STRING_SINGLE);\n\t\t\t\t} else if (!isMessages && IsASCII(ch) && (isalpha(ch) || (ch == '_'))) {\n\t\t\t\t\t// Start of an identifier\n\t\t\t\t\tstate = SCE_INNO_IDENTIFIER;\n\t\t\t\t\tbufferCount = 0;\n\t\t\t\t\tbuffer[bufferCount++] = static_cast<char>(tolower(ch));\n\t\t\t\t} else {\n\t\t\t\t\t// Style it the default style\n\t\t\t\t\tstyler.ColourTo(i, SCE_INNO_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_INNO_COMMENT:\n\t\t\t\tif (isEOL) {\n\t\t\t\t\tstate = SCE_INNO_DEFAULT;\n\t\t\t\t\tstyler.ColourTo(i - 1, SCE_INNO_COMMENT);\n\t\t\t\t\tstyler.ColourTo(i, SCE_INNO_DEFAULT);\n\t\t\t\t} else {\n\t\t\t\t\tstyler.ColourTo(i, SCE_INNO_COMMENT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_INNO_IDENTIFIER:\n\t\t\t\tif (IsASCII(ch) && (isalnum(ch) || (ch == '_'))) {\n\t\t\t\t\tbuffer[bufferCount++] = static_cast<char>(tolower(ch));\n\t\t\t\t} else {\n\t\t\t\t\tstate = SCE_INNO_DEFAULT;\n\t\t\t\t\tbuffer[bufferCount] = '\\0';\n\n\t\t\t\t\t// Check if the buffer contains a keyword\n\t\t\t\t\tif (!isCode && standardKeywords.InList(buffer) && innoNextNotBlankIs(i, styler, '=')) {\n\t\t\t\t\t\tstyler.ColourTo(i - 1, SCE_INNO_KEYWORD);\n\t\t\t\t\t} else if (!isCode && parameterKeywords.InList(buffer) && innoNextNotBlankIs(i, styler, ':')) {\n\t\t\t\t\t\tstyler.ColourTo(i - 1, SCE_INNO_PARAMETER);\n\t\t\t\t\t} else if (isCode && pascalKeywords.InList(buffer)) {\n\t\t\t\t\t\tstyler.ColourTo(i - 1, SCE_INNO_KEYWORD_PASCAL);\n\t\t\t\t\t} else if (!isCode && userKeywords.InList(buffer)) {\n\t\t\t\t\t\tstyler.ColourTo(i - 1, SCE_INNO_KEYWORD_USER);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstyler.ColourTo(i - 1, SCE_INNO_DEFAULT);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Push back the faulty character\n\t\t\t\t\tchNext = styler[i--];\n\t\t\t\t\tch = chPrev;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_INNO_SECTION:\n\t\t\t\tif (ch == ']') {\n\t\t\t\t\tstate = SCE_INNO_DEFAULT;\n\t\t\t\t\tbuffer[bufferCount] = '\\0';\n\n\t\t\t\t\t// Check if the buffer contains a section name\n\t\t\t\t\tif (sectionKeywords.InList(buffer)) {\n\t\t\t\t\t\tstyler.ColourTo(i, SCE_INNO_SECTION);\n\t\t\t\t\t\tisCode = !CompareCaseInsensitive(buffer, \"code\");\n\n\t\t\t\t\t\tisMessages = isCode ? false : (\n\t\t\t\t\t\t\t\t\t!CompareCaseInsensitive(buffer, \"custommessages\")\n\t\t\t\t\t\t\t\t\t|| !CompareCaseInsensitive(buffer, \"messages\"));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstyler.ColourTo(i, SCE_INNO_DEFAULT);\n\t\t\t\t\t}\n\t\t\t\t} else if (IsASCII(ch) && (isalnum(ch) || (ch == '_'))) {\n\t\t\t\t\tbuffer[bufferCount++] = static_cast<char>(tolower(ch));\n\t\t\t\t} else {\n\t\t\t\t\tstate = SCE_INNO_DEFAULT;\n\t\t\t\t\tstyler.ColourTo(i, SCE_INNO_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_INNO_PREPROC:\n\t\t\t\tif (isWS || isEOL) {\n\t\t\t\t\tif (IsASCII(chPrev) && isalpha(chPrev)) {\n\t\t\t\t\t\tstate = SCE_INNO_DEFAULT;\n\t\t\t\t\t\tbuffer[bufferCount] = '\\0';\n\n\t\t\t\t\t\t// Check if the buffer contains a preprocessor directive\n\t\t\t\t\t\tif (preprocessorKeywords.InList(buffer)) {\n\t\t\t\t\t\t\tstyler.ColourTo(i - 1, SCE_INNO_PREPROC);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tstyler.ColourTo(i - 1, SCE_INNO_DEFAULT);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Push back the faulty character\n\t\t\t\t\t\tchNext = styler[i--];\n\t\t\t\t\t\tch = chPrev;\n\t\t\t\t\t}\n\t\t\t\t} else if (IsASCII(ch) && isalpha(ch)) {\n\t\t\t\t\tif (chPrev == '#' || chPrev == ' ' || chPrev == '\\t')\n\t\t\t\t\t\tbufferCount = 0;\n\t\t\t\t\tbuffer[bufferCount++] = static_cast<char>(tolower(ch));\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_INNO_STRING_DOUBLE:\n\t\t\t\tif (ch == '\"') {\n\t\t\t\t\tstate = SCE_INNO_DEFAULT;\n\t\t\t\t\tstyler.ColourTo(i, SCE_INNO_STRING_DOUBLE);\n\t\t\t\t} else if (isEOL) {\n\t\t\t\t\tstate = SCE_INNO_DEFAULT;\n\t\t\t\t\tstyler.ColourTo(i - 1, SCE_INNO_STRING_DOUBLE);\n\t\t\t\t\tstyler.ColourTo(i, SCE_INNO_DEFAULT);\n\t\t\t\t} else {\n\t\t\t\t\tstyler.ColourTo(i, SCE_INNO_STRING_DOUBLE);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_INNO_STRING_SINGLE:\n\t\t\t\tif (ch == '\\'') {\n\t\t\t\t\tstate = SCE_INNO_DEFAULT;\n\t\t\t\t\tstyler.ColourTo(i, SCE_INNO_STRING_SINGLE);\n\t\t\t\t} else if (isEOL) {\n\t\t\t\t\tstate = SCE_INNO_DEFAULT;\n\t\t\t\t\tstyler.ColourTo(i - 1, SCE_INNO_STRING_SINGLE);\n\t\t\t\t\tstyler.ColourTo(i, SCE_INNO_DEFAULT);\n\t\t\t\t} else {\n\t\t\t\t\tstyler.ColourTo(i, SCE_INNO_STRING_SINGLE);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_INNO_INLINE_EXPANSION:\n\t\t\t\tif (ch == '}') {\n\t\t\t\t\tstate = SCE_INNO_DEFAULT;\n\t\t\t\t\tstyler.ColourTo(i, SCE_INNO_INLINE_EXPANSION);\n\t\t\t\t} else if (isEOL) {\n\t\t\t\t\tstate = SCE_INNO_DEFAULT;\n\t\t\t\t\tstyler.ColourTo(i, SCE_INNO_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_INNO_COMMENT_PASCAL:\n\t\t\t\tif (isCommentSlash) {\n\t\t\t\t\tif (isEOL) {\n\t\t\t\t\t\tstate = SCE_INNO_DEFAULT;\n\t\t\t\t\t\tisCommentSlash = false;\n\t\t\t\t\t\tstyler.ColourTo(i - 1, SCE_INNO_COMMENT_PASCAL);\n\t\t\t\t\t\tstyler.ColourTo(i, SCE_INNO_DEFAULT);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstyler.ColourTo(i, SCE_INNO_COMMENT_PASCAL);\n\t\t\t\t\t}\n\t\t\t\t} else if (isCommentCurly) {\n\t\t\t\t\tif (ch == '}') {\n\t\t\t\t\t\tstate = SCE_INNO_DEFAULT;\n\t\t\t\t\t\tisCommentCurly = false;\n\t\t\t\t\t}\n\t\t\t\t\tstyler.ColourTo(i, SCE_INNO_COMMENT_PASCAL);\n\t\t\t\t} else if (isCommentRound) {\n\t\t\t\t\tif (ch == ')' && chPrev == '*') {\n\t\t\t\t\t\tstate = SCE_INNO_DEFAULT;\n\t\t\t\t\t\tisCommentRound = false;\n\t\t\t\t\t}\n\t\t\t\t\tstyler.ColourTo(i, SCE_INNO_COMMENT_PASCAL);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t}\n\t}\n\tdelete []buffer;\n}\n\nstatic const char * const innoWordListDesc[] = {\n\t\"Sections\",\n\t\"Keywords\",\n\t\"Parameters\",\n\t\"Preprocessor directives\",\n\t\"Pascal keywords\",\n\t\"User defined keywords\",\n\t0\n};\n\nstatic void FoldInnoDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[], Accessor &styler) {\n\tSci_PositionU endPos = startPos + length;\n\tchar chNext = styler[startPos];\n\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\n\tbool sectionFlag = false;\n\tint levelPrev = lineCurrent > 0 ? styler.LevelAt(lineCurrent - 1) : SC_FOLDLEVELBASE;\n\tint level;\n\n\tfor (Sci_PositionU i = startPos; i < endPos; i++) {\n\t\tchar ch = chNext;\n\t\tchNext = styler[i + 1];\n\t\tbool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n\t\tint style = styler.StyleAt(i);\n\n\t\tif (style == SCE_INNO_SECTION)\n\t\t\tsectionFlag = true;\n\n\t\tif (atEOL || i == endPos - 1) {\n\t\t\tif (sectionFlag) {\n\t\t\t\tlevel = SC_FOLDLEVELBASE | SC_FOLDLEVELHEADERFLAG;\n\t\t\t\tif (level == levelPrev)\n\t\t\t\t\tstyler.SetLevel(lineCurrent - 1, levelPrev & ~SC_FOLDLEVELHEADERFLAG);\n\t\t\t} else {\n\t\t\t\tlevel = levelPrev & SC_FOLDLEVELNUMBERMASK;\n\t\t\t\tif (levelPrev & SC_FOLDLEVELHEADERFLAG)\n\t\t\t\t\tlevel++;\n\t\t\t}\n\n\t\t\tstyler.SetLevel(lineCurrent, level);\n\n\t\t\tlevelPrev = level;\n\t\t\tlineCurrent++;\n\t\t\tsectionFlag = false;\n\t\t}\n\t}\n}\n\nLexerModule lmInno(SCLEX_INNOSETUP, ColouriseInnoDoc, \"inno\", FoldInnoDoc, innoWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexJSON.cxx",
    "content": "// Scintilla source code edit control\n/**\n * @file LexJSON.cxx\n * @date February 19, 2016\n * @brief Lexer for JSON and JSON-LD formats\n * @author nkmathew\n *\n * The License.txt file describes the conditions under which this software may\n * be distributed.\n *\n */\n\n#include <cstdlib>\n#include <cassert>\n#include <cctype>\n#include <cstdio>\n\n#include <string>\n#include <string_view>\n#include <vector>\n#include <map>\n#include <functional>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n#include \"OptionSet.h\"\n#include \"DefaultLexer.h\"\n\nusing namespace Scintilla;\nusing namespace Lexilla;\n\nstatic const char *const JSONWordListDesc[] = {\n\t\"JSON Keywords\",\n\t\"JSON-LD Keywords\",\n\t0\n};\n\n/**\n * Used to detect compact IRI/URLs in JSON-LD without first looking ahead for the\n * colon separating the prefix and suffix\n *\n * https://www.w3.org/TR/json-ld/#dfn-compact-iri\n */\nstruct CompactIRI {\n\tint colonCount;\n\tbool foundInvalidChar;\n\tCharacterSet setCompactIRI;\n\tCompactIRI() {\n\t\tcolonCount = 0;\n\t\tfoundInvalidChar = false;\n\t\tsetCompactIRI = CharacterSet(CharacterSet::setAlpha, \"$_-\");\n\t}\n\tvoid resetState() {\n\t\tcolonCount = 0;\n\t\tfoundInvalidChar = false;\n\t}\n\tvoid checkChar(int ch) {\n\t\tif (ch == ':') {\n\t\t\tcolonCount++;\n\t\t} else {\n\t\t\tfoundInvalidChar |= !setCompactIRI.Contains(ch);\n\t\t}\n\t}\n\tbool shouldHighlight() const {\n\t\treturn !foundInvalidChar && colonCount == 1;\n\t}\n};\n\n/**\n * Keeps track of escaped characters in strings as per:\n *\n * https://tools.ietf.org/html/rfc7159#section-7\n */\nstruct EscapeSequence {\n\tint digitsLeft;\n\tCharacterSet setHexDigits;\n\tCharacterSet setEscapeChars;\n\tEscapeSequence() {\n\t\tdigitsLeft = 0;\n\t\tsetHexDigits = CharacterSet(CharacterSet::setDigits, \"ABCDEFabcdef\");\n\t\tsetEscapeChars = CharacterSet(CharacterSet::setNone, \"\\\\\\\"tnbfru/\");\n\t}\n\t// Returns true if the following character is a valid escaped character\n\tbool newSequence(int nextChar) {\n\t\tdigitsLeft = 0;\n\t\tif (nextChar == 'u') {\n\t\t\tdigitsLeft = 5;\n\t\t} else if (!setEscapeChars.Contains(nextChar)) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}\n\tbool atEscapeEnd() const {\n\t\treturn digitsLeft <= 0;\n\t}\n\tbool isInvalidChar(int currChar) const {\n\t\treturn !setHexDigits.Contains(currChar);\n\t}\n};\n\nstruct OptionsJSON {\n\tbool foldCompact;\n\tbool fold;\n\tbool allowComments;\n\tbool escapeSequence;\n\tOptionsJSON() {\n\t\tfoldCompact = false;\n\t\tfold = false;\n\t\tallowComments = false;\n\t\tescapeSequence = false;\n\t}\n};\n\nstruct OptionSetJSON : public OptionSet<OptionsJSON> {\n\tOptionSetJSON() {\n\t\tDefineProperty(\"lexer.json.escape.sequence\", &OptionsJSON::escapeSequence,\n\t\t\t\t\t   \"Set to 1 to enable highlighting of escape sequences in strings\");\n\n\t\tDefineProperty(\"lexer.json.allow.comments\", &OptionsJSON::allowComments,\n\t\t\t\t\t   \"Set to 1 to enable highlighting of line/block comments in JSON\");\n\n\t\tDefineProperty(\"fold.compact\", &OptionsJSON::foldCompact);\n\t\tDefineProperty(\"fold\", &OptionsJSON::fold);\n\t\tDefineWordListSets(JSONWordListDesc);\n\t}\n};\n\nclass LexerJSON : public DefaultLexer {\n\tOptionsJSON options;\n\tOptionSetJSON optSetJSON;\n\tEscapeSequence escapeSeq;\n\tWordList keywordsJSON;\n\tWordList keywordsJSONLD;\n\tCharacterSet setOperators;\n\tCharacterSet setURL;\n\tCharacterSet setKeywordJSONLD;\n\tCharacterSet setKeywordJSON;\n\tCompactIRI compactIRI;\n\n\tstatic bool IsNextNonWhitespace(LexAccessor &styler, Sci_Position start, char ch) {\n\t\tSci_Position i = 0;\n\t\twhile (i < 50) {\n\t\t\ti++;\n\t\t\tchar curr = styler.SafeGetCharAt(start+i, '\\0');\n\t\t\tchar next = styler.SafeGetCharAt(start+i+1, '\\0');\n\t\t\tbool atEOL = (curr == '\\r' && next != '\\n') || (curr == '\\n');\n\t\t\tif (curr == ch) {\n\t\t\t\treturn true;\n\t\t\t} else if (!isspacechar(curr) || atEOL) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t * Looks for the colon following the end quote\n\t *\n\t * Assumes property names of lengths no longer than a 100 characters.\n\t * The colon is also expected to be less than 50 spaces after the end\n\t * quote for the string to be considered a property name\n\t */\n\tstatic bool AtPropertyName(LexAccessor &styler, Sci_Position start) {\n\t\tSci_Position i = 0;\n\t\tbool escaped = false;\n\t\twhile (i < 100) {\n\t\t\ti++;\n\t\t\tchar curr = styler.SafeGetCharAt(start+i, '\\0');\n\t\t\tif (escaped) {\n\t\t\t\tescaped = false;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tescaped = curr == '\\\\';\n\t\t\tif (curr == '\"') {\n\t\t\t\treturn IsNextNonWhitespace(styler, start+i, ':');\n\t\t\t} else if (!curr) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tstatic bool IsNextWordInList(WordList &keywordList, CharacterSet wordSet,\n\t\t\t\t\t\t\t\t StyleContext &context, LexAccessor &styler) {\n\t\tchar word[51];\n\t\tSci_Position currPos = (Sci_Position) context.currentPos;\n\t\tint i = 0;\n\t\twhile (i < 50) {\n\t\t\tchar ch = styler.SafeGetCharAt(currPos + i);\n\t\t\tif (!wordSet.Contains(ch)) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tword[i] = ch;\n\t\t\ti++;\n\t\t}\n\t\tword[i] = '\\0';\n\t\treturn keywordList.InList(word);\n\t}\n\n\tpublic:\n\tLexerJSON() :\n\t\tDefaultLexer(\"json\", SCLEX_JSON),\n\t\tsetOperators(CharacterSet::setNone, \"[{}]:,\"),\n\t\tsetURL(CharacterSet::setAlphaNum, \"-._~:/?#[]@!$&'()*+,),=\"),\n\t\tsetKeywordJSONLD(CharacterSet::setAlpha, \":@\"),\n\t\tsetKeywordJSON(CharacterSet::setAlpha, \"$_\") {\n\t}\n\tvirtual ~LexerJSON() {}\n\tint SCI_METHOD Version() const override {\n\t\treturn lvRelease5;\n\t}\n\tvoid SCI_METHOD Release() override {\n\t\tdelete this;\n\t}\n\tconst char *SCI_METHOD PropertyNames() override {\n\t\treturn optSetJSON.PropertyNames();\n\t}\n\tint SCI_METHOD PropertyType(const char *name) override {\n\t\treturn optSetJSON.PropertyType(name);\n\t}\n\tconst char *SCI_METHOD DescribeProperty(const char *name) override {\n\t\treturn optSetJSON.DescribeProperty(name);\n\t}\n\tSci_Position SCI_METHOD PropertySet(const char *key, const char *val) override {\n\t\tif (optSetJSON.PropertySet(&options, key, val)) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn -1;\n\t}\n\tconst char * SCI_METHOD PropertyGet(const char *key) override {\n\t\treturn optSetJSON.PropertyGet(key);\n\t}\n\tSci_Position SCI_METHOD WordListSet(int n, const char *wl) override {\n\t\tWordList *wordListN = 0;\n\t\tswitch (n) {\n\t\t\tcase 0:\n\t\t\t\twordListN = &keywordsJSON;\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\twordListN = &keywordsJSONLD;\n\t\t\t\tbreak;\n\t\t}\n\t\tSci_Position firstModification = -1;\n\t\tif (wordListN) {\n\t\t\tif (wordListN->Set(wl)) {\n\t\t\t\tfirstModification = 0;\n\t\t\t}\n\t\t}\n\t\treturn firstModification;\n\t}\n\tvoid *SCI_METHOD PrivateCall(int, void *) override {\n\t\treturn 0;\n\t}\n\tstatic ILexer5 *LexerFactoryJSON() {\n\t\treturn new LexerJSON;\n\t}\n\tconst char *SCI_METHOD DescribeWordListSets() override {\n\t\treturn optSetJSON.DescribeWordListSets();\n\t}\n\tvoid SCI_METHOD Lex(Sci_PositionU startPos,\n\t\t\t\t\t\t\t\tSci_Position length,\n\t\t\t\t\t\t\t\tint initStyle,\n\t\t\t\t\t\t\t\tIDocument *pAccess) override;\n\tvoid SCI_METHOD Fold(Sci_PositionU startPos,\n\t\t\t\t\t\t\t\t Sci_Position length,\n\t\t\t\t\t\t\t\t int initStyle,\n\t\t\t\t\t\t\t\t IDocument *pAccess) override;\n};\n\nvoid SCI_METHOD LexerJSON::Lex(Sci_PositionU startPos,\n\t\t\t\t\t\t\t   Sci_Position length,\n\t\t\t\t\t\t\t   int initStyle,\n\t\t\t\t\t\t\t   IDocument *pAccess) {\n\tLexAccessor styler(pAccess);\n\tStyleContext context(startPos, length, initStyle, styler);\n\tint stringStyleBefore = SCE_JSON_STRING;\n\twhile (context.More()) {\n\t\tswitch (context.state) {\n\t\t\tcase SCE_JSON_BLOCKCOMMENT:\n\t\t\t\tif (context.Match(\"*/\")) {\n\t\t\t\t\tcontext.Forward();\n\t\t\t\t\tcontext.ForwardSetState(SCE_JSON_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_JSON_LINECOMMENT:\n\t\t\t\tif (context.MatchLineEnd()) {\n\t\t\t\t\tcontext.SetState(SCE_JSON_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_JSON_STRINGEOL:\n\t\t\t\tif (context.atLineStart) {\n\t\t\t\t\tcontext.SetState(SCE_JSON_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_JSON_ESCAPESEQUENCE:\n\t\t\t\tescapeSeq.digitsLeft--;\n\t\t\t\tif (!escapeSeq.atEscapeEnd()) {\n\t\t\t\t\tif (escapeSeq.isInvalidChar(context.ch)) {\n\t\t\t\t\t\tcontext.SetState(SCE_JSON_ERROR);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (context.ch == '\"') {\n\t\t\t\t\tcontext.SetState(stringStyleBefore);\n\t\t\t\t\tcontext.ForwardSetState(SCE_JSON_DEFAULT);\n\t\t\t\t} else if (context.ch == '\\\\') {\n\t\t\t\t\tif (!escapeSeq.newSequence(context.chNext)) {\n\t\t\t\t\t\tcontext.SetState(SCE_JSON_ERROR);\n\t\t\t\t\t}\n\t\t\t\t\tcontext.Forward();\n\t\t\t\t} else {\n\t\t\t\t\tcontext.SetState(stringStyleBefore);\n\t\t\t\t\tif (context.atLineEnd) {\n\t\t\t\t\t\tcontext.ChangeState(SCE_JSON_STRINGEOL);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_JSON_PROPERTYNAME:\n\t\t\tcase SCE_JSON_STRING:\n\t\t\t\tif (context.ch == '\"') {\n\t\t\t\t\tif (compactIRI.shouldHighlight()) {\n\t\t\t\t\t\tcontext.ChangeState(SCE_JSON_COMPACTIRI);\n\t\t\t\t\t\tcontext.ForwardSetState(SCE_JSON_DEFAULT);\n\t\t\t\t\t\tcompactIRI.resetState();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcontext.ForwardSetState(SCE_JSON_DEFAULT);\n\t\t\t\t\t}\n\t\t\t\t} else if (context.atLineEnd) {\n\t\t\t\t\tcontext.ChangeState(SCE_JSON_STRINGEOL);\n\t\t\t\t} else if (context.ch == '\\\\') {\n\t\t\t\t\tstringStyleBefore = context.state;\n\t\t\t\t\tif (options.escapeSequence) {\n\t\t\t\t\t\tcontext.SetState(SCE_JSON_ESCAPESEQUENCE);\n\t\t\t\t\t\tif (!escapeSeq.newSequence(context.chNext)) {\n\t\t\t\t\t\t\tcontext.SetState(SCE_JSON_ERROR);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcontext.Forward();\n\t\t\t\t} else if (context.Match(\"https://\") ||\n\t\t\t\t\t\t   context.Match(\"http://\") ||\n\t\t\t\t\t\t   context.Match(\"ssh://\") ||\n\t\t\t\t\t\t   context.Match(\"git://\") ||\n\t\t\t\t\t\t   context.Match(\"svn://\") ||\n\t\t\t\t\t\t   context.Match(\"ftp://\") ||\n\t\t\t\t\t\t   context.Match(\"mailto:\")) {\n\t\t\t\t\t// Handle most common URI schemes only\n\t\t\t\t\tstringStyleBefore = context.state;\n\t\t\t\t\tcontext.SetState(SCE_JSON_URI);\n\t\t\t\t} else if (context.ch == '@') {\n\t\t\t\t\t// https://www.w3.org/TR/json-ld/#dfn-keyword\n\t\t\t\t\tif (IsNextWordInList(keywordsJSONLD, setKeywordJSONLD, context, styler)) {\n\t\t\t\t\t\tstringStyleBefore = context.state;\n\t\t\t\t\t\tcontext.SetState(SCE_JSON_LDKEYWORD);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tcompactIRI.checkChar(context.ch);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_JSON_LDKEYWORD:\n\t\t\tcase SCE_JSON_URI:\n\t\t\t\tif ((!setKeywordJSONLD.Contains(context.ch) &&\n\t\t\t\t\t (context.state == SCE_JSON_LDKEYWORD)) ||\n\t\t\t\t\t(!setURL.Contains(context.ch))) {\n\t\t\t\t\tcontext.SetState(stringStyleBefore);\n\t\t\t\t}\n\t\t\t\tif (context.ch == '\"') {\n\t\t\t\t\tcontext.ForwardSetState(SCE_JSON_DEFAULT);\n\t\t\t\t} else if (context.atLineEnd) {\n\t\t\t\t\tcontext.ChangeState(SCE_JSON_STRINGEOL);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_JSON_OPERATOR:\n\t\t\tcase SCE_JSON_NUMBER:\n\t\t\t\tcontext.SetState(SCE_JSON_DEFAULT);\n\t\t\t\tbreak;\n\t\t\tcase SCE_JSON_ERROR:\n\t\t\t\tif (context.MatchLineEnd()) {\n\t\t\t\t\tcontext.SetState(SCE_JSON_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_JSON_KEYWORD:\n\t\t\t\tif (!setKeywordJSON.Contains(context.ch)) {\n\t\t\t\t\tcontext.SetState(SCE_JSON_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\tif (context.state == SCE_JSON_DEFAULT) {\n\t\t\tif (context.ch == '\"') {\n\t\t\t\tcompactIRI.resetState();\n\t\t\t\tcontext.SetState(SCE_JSON_STRING);\n\t\t\t\tSci_Position currPos = static_cast<Sci_Position>(context.currentPos);\n\t\t\t\tif (AtPropertyName(styler, currPos)) {\n\t\t\t\t\tcontext.SetState(SCE_JSON_PROPERTYNAME);\n\t\t\t\t}\n\t\t\t} else if (setOperators.Contains(context.ch)) {\n\t\t\t\tcontext.SetState(SCE_JSON_OPERATOR);\n\t\t\t} else if (options.allowComments && context.Match(\"/*\")) {\n\t\t\t\tcontext.SetState(SCE_JSON_BLOCKCOMMENT);\n\t\t\t\tcontext.Forward();\n\t\t\t} else if (options.allowComments && context.Match(\"//\")) {\n\t\t\t\tcontext.SetState(SCE_JSON_LINECOMMENT);\n\t\t\t} else if (setKeywordJSON.Contains(context.ch)) {\n\t\t\t\tif (IsNextWordInList(keywordsJSON, setKeywordJSON, context, styler)) {\n\t\t\t\t\tcontext.SetState(SCE_JSON_KEYWORD);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbool numberStart =\n\t\t\t\tIsADigit(context.ch) && (context.chPrev == '+'||\n\t\t\t\t\t\t\t\t\t\t context.chPrev == '-' ||\n\t\t\t\t\t\t\t\t\t\t context.atLineStart ||\n\t\t\t\t\t\t\t\t\t\t IsASpace(context.chPrev) ||\n\t\t\t\t\t\t\t\t\t\t setOperators.Contains(context.chPrev));\n\t\t\tbool exponentPart =\n\t\t\t\ttolower(context.ch) == 'e' &&\n\t\t\t\tIsADigit(context.chPrev) &&\n\t\t\t\t(IsADigit(context.chNext) ||\n\t\t\t\t context.chNext == '+' ||\n\t\t\t\t context.chNext == '-');\n\t\t\tbool signPart =\n\t\t\t\t(context.ch == '-' || context.ch == '+') &&\n\t\t\t\t((tolower(context.chPrev) == 'e' && IsADigit(context.chNext)) ||\n\t\t\t\t ((IsASpace(context.chPrev) || setOperators.Contains(context.chPrev))\n\t\t\t\t  && IsADigit(context.chNext)));\n\t\t\tbool adjacentDigit =\n\t\t\t\tIsADigit(context.ch) && IsADigit(context.chPrev);\n\t\t\tbool afterExponent = IsADigit(context.ch) && tolower(context.chPrev) == 'e';\n\t\t\tbool dotPart = context.ch == '.' &&\n\t\t\t\tIsADigit(context.chPrev) &&\n\t\t\t\tIsADigit(context.chNext);\n\t\t\tbool afterDot = IsADigit(context.ch) && context.chPrev == '.';\n\t\t\tif (numberStart ||\n\t\t\t\texponentPart ||\n\t\t\t\tsignPart ||\n\t\t\t\tadjacentDigit ||\n\t\t\t\tdotPart ||\n\t\t\t\tafterExponent ||\n\t\t\t\tafterDot) {\n\t\t\t\tcontext.SetState(SCE_JSON_NUMBER);\n\t\t\t} else if (context.state == SCE_JSON_DEFAULT && !IsASpace(context.ch)) {\n\t\t\t\tcontext.SetState(SCE_JSON_ERROR);\n\t\t\t}\n\t\t}\n\t\tcontext.Forward();\n\t}\n\tcontext.Complete();\n}\n\nvoid SCI_METHOD LexerJSON::Fold(Sci_PositionU startPos,\n\t\t\t\t\t\t\t\tSci_Position length,\n\t\t\t\t\t\t\t\tint,\n\t\t\t\t\t\t\t\tIDocument *pAccess) {\n\tif (!options.fold) {\n\t\treturn;\n\t}\n\tLexAccessor styler(pAccess);\n\tSci_PositionU currLine = styler.GetLine(startPos);\n\tSci_PositionU endPos = startPos + length;\n\tint currLevel = SC_FOLDLEVELBASE;\n\tif (currLine > 0)\n\t\tcurrLevel = styler.LevelAt(currLine - 1) >> 16;\n\tint nextLevel = currLevel;\n\tint visibleChars = 0;\n\tfor (Sci_PositionU i = startPos; i < endPos; i++) {\n\t\tchar curr = styler.SafeGetCharAt(i);\n\t\tchar next = styler.SafeGetCharAt(i+1);\n\t\tbool atEOL = (curr == '\\r' && next != '\\n') || (curr == '\\n');\n\t\tif (styler.StyleAt(i) == SCE_JSON_OPERATOR) {\n\t\t\tif (curr == '{' || curr == '[') {\n\t\t\t\tnextLevel++;\n\t\t\t} else if (curr == '}' || curr == ']') {\n\t\t\t\tnextLevel--;\n\t\t\t}\n\t\t}\n\t\tif (atEOL || i == (endPos-1)) {\n\t\t\tint level = currLevel | nextLevel << 16;\n\t\t\tif (!visibleChars && options.foldCompact) {\n\t\t\t\tlevel |= SC_FOLDLEVELWHITEFLAG;\n\t\t\t} else if (nextLevel > currLevel) {\n\t\t\t\tlevel |= SC_FOLDLEVELHEADERFLAG;\n\t\t\t}\n\t\t\tif (level != styler.LevelAt(currLine)) {\n\t\t\t\tstyler.SetLevel(currLine, level);\n\t\t\t}\n\t\t\tcurrLine++;\n\t\t\tcurrLevel = nextLevel;\n\t\t\tvisibleChars = 0;\n\t\t}\n\t\tif (!isspacechar(curr)) {\n\t\t\tvisibleChars++;\n\t\t}\n\t}\n}\n\nLexerModule lmJSON(SCLEX_JSON,\n\t\t\t\t   LexerJSON::LexerFactoryJSON,\n\t\t\t\t   \"json\",\n\t\t\t\t   JSONWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexJulia.cxx",
    "content": "// Scintilla source code edit control\n// Encoding: UTF-8\n/** @file LexJulia.cxx\n ** Lexer for Julia.\n ** Reusing code from LexMatlab, LexPython and LexRust\n **\n ** Written by Bertrand Lacoste\n **\n **/\n// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <cstdlib>\n#include <cassert>\n#include <cstring>\n\n#include <string>\n#include <string_view>\n#include <vector>\n#include <map>\n#include <algorithm>\n#include <functional>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"StringCopy.h\"\n#include \"PropSetSimple.h\"\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"CharacterCategory.h\"\n#include \"LexerModule.h\"\n#include \"OptionSet.h\"\n#include \"DefaultLexer.h\"\n\nusing namespace Scintilla;\nusing namespace Lexilla;\n\nstatic const int MAX_JULIA_IDENT_CHARS = 1023;\n\n// Options used for LexerJulia\nstruct OptionsJulia {\n    bool fold;\n    bool foldComment;\n    bool foldCompact;\n    bool foldDocstring;\n    bool foldSyntaxBased;\n    bool highlightTypeannotation;\n    bool highlightLexerror;\n\tOptionsJulia() {\n        fold = true;\n        foldComment = true;\n        foldCompact = false;\n        foldDocstring = true;\n        foldSyntaxBased = true;\n        highlightTypeannotation = false;\n        highlightLexerror = false;\n\t}\n};\n\nconst char * const juliaWordLists[] = {\n    \"Primary keywords and identifiers\",\n    \"Built in types\",\n    \"Other keywords\",\n    \"Built in functions\",\n    0,\n};\n\nstruct OptionSetJulia : public OptionSet<OptionsJulia> {\n\tOptionSetJulia() {\n\t\tDefineProperty(\"fold\", &OptionsJulia::fold);\n\n\t\tDefineProperty(\"fold.compact\", &OptionsJulia::foldCompact);\n\n\t\tDefineProperty(\"fold.comment\", &OptionsJulia::foldComment);\n\n\t\tDefineProperty(\"fold.julia.docstring\", &OptionsJulia::foldDocstring,\n\t\t\t\"Fold multiline triple-doublequote strings, usually used to document a function or type above the definition.\");\n\n\t\tDefineProperty(\"fold.julia.syntax.based\", &OptionsJulia::foldSyntaxBased,\n\t\t\t\"Set this property to 0 to disable syntax based folding.\");\n\n\t\tDefineProperty(\"lexer.julia.highlight.typeannotation\", &OptionsJulia::highlightTypeannotation,\n\t\t\t\"This option enables highlighting of the type identifier after `::`.\");\n\n\t\tDefineProperty(\"lexer.julia.highlight.lexerror\", &OptionsJulia::highlightLexerror,\n\t\t\t\"This option enables highlighting of syntax error int character or number definition.\");\n\n\t\tDefineWordListSets(juliaWordLists);\n\t}\n};\n\nLexicalClass juliaLexicalClasses[] = {\n\t// Lexer Julia SCLEX_JULIA SCE_JULIA_:\n\t0,  \"SCE_JULIA_DEFAULT\", \"default\", \"White space\",\n\t1,  \"SCE_JULIA_COMMENT\", \"comment\", \"Comment\",\n\t2,  \"SCE_JULIA_NUMBER\", \"literal numeric\", \"Number\",\n\t3,  \"SCE_JULIA_KEYWORD1\", \"keyword\", \"Reserved keywords\",\n\t4,  \"SCE_JULIA_KEYWORD2\", \"identifier\", \"Builtin type names\",\n\t5,  \"SCE_JULIA_KEYWORD3\", \"identifier\", \"Constants\",\n\t6,  \"SCE_JULIA_CHAR\", \"literal string character\", \"Single quoted string\",\n\t7,  \"SCE_JULIA_OPERATOR\", \"operator\", \"Operator\",\n\t8,  \"SCE_JULIA_BRACKET\", \"bracket operator\", \"Bracket operator\",\n\t9,  \"SCE_JULIA_IDENTIFIER\", \"identifier\", \"Identifier\",\n\t10, \"SCE_JULIA_STRING\", \"literal string\", \"Double quoted String\",\n\t11, \"SCE_JULIA_SYMBOL\", \"literal string symbol\", \"Symbol\",\n\t12, \"SCE_JULIA_MACRO\", \"macro preprocessor\", \"Macro\",\n\t13, \"SCE_JULIA_STRINGINTERP\", \"literal string interpolated\", \"String interpolation\",\n\t14, \"SCE_JULIA_DOCSTRING\", \"literal string documentation\", \"Docstring\",\n\t15, \"SCE_JULIA_STRINGLITERAL\", \"literal string\", \"String literal prefix\",\n\t16, \"SCE_JULIA_COMMAND\", \"literal string command\", \"Command\",\n\t17, \"SCE_JULIA_COMMANDLITERAL\", \"literal string command\", \"Command literal prefix\",\n\t18, \"SCE_JULIA_TYPEANNOT\", \"identifier type\", \"Type annotation identifier\",\n\t19, \"SCE_JULIA_LEXERROR\", \"lexer error\", \"Lexing error\",\n\t20, \"SCE_JULIA_KEYWORD4\", \"identifier\", \"Builtin function names\",\n\t21, \"SCE_JULIA_TYPEOPERATOR\", \"operator type\", \"Type annotation operator\",\n};\n\nclass LexerJulia : public DefaultLexer {\n\tWordList keywords;\n\tWordList identifiers2;\n\tWordList identifiers3;\n\tWordList identifiers4;\n\tOptionsJulia options;\n\tOptionSetJulia osJulia;\npublic:\n\texplicit LexerJulia() :\n\t\tDefaultLexer(\"julia\", SCLEX_JULIA, juliaLexicalClasses, ELEMENTS(juliaLexicalClasses)) {\n\t}\n\tvirtual ~LexerJulia() {\n\t}\n\tvoid SCI_METHOD Release() override {\n\t\tdelete this;\n\t}\n\tint SCI_METHOD Version() const override {\n\t\treturn lvRelease5;\n\t}\n\tconst char * SCI_METHOD PropertyNames() override {\n\t\treturn osJulia.PropertyNames();\n\t}\n\tint SCI_METHOD PropertyType(const char *name) override {\n\t\treturn osJulia.PropertyType(name);\n\t}\n\tconst char * SCI_METHOD DescribeProperty(const char *name) override {\n\t\treturn osJulia.DescribeProperty(name);\n\t}\n\tSci_Position SCI_METHOD PropertySet(const char *key, const char *val) override;\n\tconst char * SCI_METHOD PropertyGet(const char *key) override {\n\t\treturn osJulia.PropertyGet(key);\n\t}\n\tconst char * SCI_METHOD DescribeWordListSets() override {\n\t\treturn osJulia.DescribeWordListSets();\n\t}\n\tSci_Position SCI_METHOD WordListSet(int n, const char *wl) override;\n\tvoid SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;\n\tvoid SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;\n\tvoid * SCI_METHOD PrivateCall(int, void *) override {\n\t\treturn 0;\n\t}\n\n\tstatic ILexer5 *LexerFactoryJulia() {\n\t\treturn new LexerJulia();\n\t}\n};\n\nSci_Position SCI_METHOD LexerJulia::PropertySet(const char *key, const char *val) {\n\tif (osJulia.PropertySet(&options, key, val)) {\n\t\treturn 0;\n\t}\n\treturn -1;\n}\n\nSci_Position SCI_METHOD LexerJulia::WordListSet(int n, const char *wl) {\n\tWordList *wordListN = nullptr;\n\tswitch (n) {\n\tcase 0:\n\t\twordListN = &keywords;\n\t\tbreak;\n\tcase 1:\n\t\twordListN = &identifiers2;\n\t\tbreak;\n\tcase 2:\n\t\twordListN = &identifiers3;\n\t\tbreak;\n\tcase 3:\n\t\twordListN = &identifiers4;\n\t\tbreak;\n\t}\n\tSci_Position firstModification = -1;\n\tif (wordListN) {\n\t\tif (wordListN->Set(wl)) {\n\t\t\tfirstModification = 0;\n\t\t}\n\t}\n\treturn firstModification;\n}\n\nstatic inline bool IsJuliaOperator(int ch) {\n    if (ch == '%' || ch == '^' || ch == '&' || ch == '*' ||\n        ch == '-' || ch == '+' || ch == '=' || ch == '|' ||\n        ch == '<' || ch == '>' || ch == '/' || ch == '~' ||\n        ch == '\\\\' ) {\n        return true;\n    }\n    return false;\n}\n\n// The list contains non-ascii unary operators\nstatic inline bool IsJuliaUnaryOperator (int ch) {\n    if (ch == 0x00ac || ch == 0x221a || ch == 0x221b ||\n        ch == 0x221c || ch == 0x22c6 || ch == 0x00b1 ||\n        ch == 0x2213 ) {\n        return true;\n    }\n    return false;\n}\n\nstatic inline bool IsJuliaParen (int ch) {\n    if (ch == '(' || ch == ')' || ch == '{' || ch == '}' ||\n        ch == '[' || ch == ']' ) {\n        return true;\n    }\n    return false;\n}\n\n// Unicode parsing from Julia source code:\n// https://github.com/JuliaLang/julia/blob/master/src/flisp/julia_extensions.c\n// keep the same function name to be easy to find again\nstatic int is_wc_cat_id_start(uint32_t wc) {\n    const CharacterCategory cat = CategoriseCharacter((int) wc);\n\n    return (cat == ccLu || cat == ccLl ||\n            cat == ccLt || cat == ccLm ||\n            cat == ccLo || cat == ccNl ||\n            cat == ccSc ||  // allow currency symbols\n            // other symbols, but not arrows or replacement characters\n            (cat == ccSo && !(wc >= 0x2190 && wc <= 0x21FF) &&\n             wc != 0xfffc && wc != 0xfffd &&\n             wc != 0x233f &&  // notslash\n             wc != 0x00a6) || // broken bar\n\n            // math symbol (category Sm) whitelist\n            (wc >= 0x2140 && wc <= 0x2a1c &&\n             ((wc >= 0x2140 && wc <= 0x2144) || // ⅀, ⅁, ⅂, ⅃, ⅄\n              wc == 0x223f || wc == 0x22be || wc == 0x22bf || // ∿, ⊾, ⊿\n              wc == 0x22a4 || wc == 0x22a5 ||   // ⊤ ⊥\n\n              (wc >= 0x2200 && wc <= 0x2233 &&\n               (wc == 0x2202 || wc == 0x2205 || wc == 0x2206 || // ∂, ∅, ∆\n                wc == 0x2207 || wc == 0x220e || wc == 0x220f || // ∇, ∎, ∏\n                wc == 0x2200 || wc == 0x2203 || wc == 0x2204 || // ∀, ∃, ∄\n                wc == 0x2210 || wc == 0x2211 || // ∐, ∑\n                wc == 0x221e || wc == 0x221f || // ∞, ∟\n                wc >= 0x222b)) || // ∫, ∬, ∭, ∮, ∯, ∰, ∱, ∲, ∳\n\n              (wc >= 0x22c0 && wc <= 0x22c3) ||  // N-ary big ops: ⋀, ⋁, ⋂, ⋃\n              (wc >= 0x25F8 && wc <= 0x25ff) ||  // ◸, ◹, ◺, ◻, ◼, ◽, ◾, ◿\n\n              (wc >= 0x266f &&\n               (wc == 0x266f || wc == 0x27d8 || wc == 0x27d9 || // ♯, ⟘, ⟙\n                (wc >= 0x27c0 && wc <= 0x27c1) ||  // ⟀, ⟁\n                (wc >= 0x29b0 && wc <= 0x29b4) ||  // ⦰, ⦱, ⦲, ⦳, ⦴\n                (wc >= 0x2a00 && wc <= 0x2a06) ||  // ⨀, ⨁, ⨂, ⨃, ⨄, ⨅, ⨆\n                (wc >= 0x2a09 && wc <= 0x2a16) ||  // ⨉, ⨊, ⨋, ⨌, ⨍, ⨎, ⨏, ⨐, ⨑, ⨒, ⨓, ⨔, ⨕, ⨖\n                wc == 0x2a1b || wc == 0x2a1c)))) || // ⨛, ⨜\n\n            (wc >= 0x1d6c1 && // variants of \\nabla and \\partial\n             (wc == 0x1d6c1 || wc == 0x1d6db ||\n              wc == 0x1d6fb || wc == 0x1d715 ||\n              wc == 0x1d735 || wc == 0x1d74f ||\n              wc == 0x1d76f || wc == 0x1d789 ||\n              wc == 0x1d7a9 || wc == 0x1d7c3)) ||\n\n            // super- and subscript +-=()\n            (wc >= 0x207a && wc <= 0x207e) ||\n            (wc >= 0x208a && wc <= 0x208e) ||\n\n            // angle symbols\n            (wc >= 0x2220 && wc <= 0x2222) || // ∠, ∡, ∢\n            (wc >= 0x299b && wc <= 0x29af) || // ⦛, ⦜, ⦝, ⦞, ⦟, ⦠, ⦡, ⦢, ⦣, ⦤, ⦥, ⦦, ⦧, ⦨, ⦩, ⦪, ⦫, ⦬, ⦭, ⦮, ⦯\n\n            // Other_ID_Start\n            wc == 0x2118 || wc == 0x212E || // ℘, ℮\n            (wc >= 0x309B && wc <= 0x309C) || // katakana-hiragana sound marks\n\n            // bold-digits and double-struck digits\n            (wc >= 0x1D7CE && wc <= 0x1D7E1)); // 𝟎 through 𝟗 (inclusive), 𝟘 through 𝟡 (inclusive)\n}\n\nstatic inline bool IsIdentifierFirstCharacter (int ch) {\n    if (IsASCII(ch)) {\n        return (bool) (isalpha(ch) || ch == '_');\n    }\n    if (ch < 0xA1 || ch > 0x10ffff) {\n        return false;\n    }\n\n    return is_wc_cat_id_start((uint32_t) ch);\n}\n\nstatic inline bool IsIdentifierCharacter (int ch) {\n    if (IsASCII(ch)) {\n        return (bool) (isalnum(ch) || ch == '_' || ch == '!');\n    }\n    if (ch < 0xA1 || ch > 0x10ffff) {\n        return false;\n    }\n\n    if (is_wc_cat_id_start((uint32_t) ch)) {\n        return true;\n    }\n\n    const CharacterCategory cat = CategoriseCharacter(ch);\n\n    if (cat == ccMn || cat == ccMc ||\n        cat == ccNd || cat == ccPc ||\n        cat == ccSk || cat == ccMe ||\n        cat == ccNo ||\n        // primes (single, double, triple, their reverses, and quadruple)\n        (ch >= 0x2032 && ch <= 0x2037) || (ch == 0x2057)) {\n        return true;\n    }\n    return false;\n}\n\n// keep the same function name to be easy to find again\nstatic const uint32_t opsuffs[] = {\n   0x00b2, // ²\n   0x00b3, // ³\n   0x00b9, // ¹\n   0x02b0, // ʰ\n   0x02b2, // ʲ\n   0x02b3, // ʳ\n   0x02b7, // ʷ\n   0x02b8, // ʸ\n   0x02e1, // ˡ\n   0x02e2, // ˢ\n   0x02e3, // ˣ\n   0x1d2c, // ᴬ\n   0x1d2e, // ᴮ\n   0x1d30, // ᴰ\n   0x1d31, // ᴱ\n   0x1d33, // ᴳ\n   0x1d34, // ᴴ\n   0x1d35, // ᴵ\n   0x1d36, // ᴶ\n   0x1d37, // ᴷ\n   0x1d38, // ᴸ\n   0x1d39, // ᴹ\n   0x1d3a, // ᴺ\n   0x1d3c, // ᴼ\n   0x1d3e, // ᴾ\n   0x1d3f, // ᴿ\n   0x1d40, // ᵀ\n   0x1d41, // ᵁ\n   0x1d42, // ᵂ\n   0x1d43, // ᵃ\n   0x1d47, // ᵇ\n   0x1d48, // ᵈ\n   0x1d49, // ᵉ\n   0x1d4d, // ᵍ\n   0x1d4f, // ᵏ\n   0x1d50, // ᵐ\n   0x1d52, // ᵒ\n   0x1d56, // ᵖ\n   0x1d57, // ᵗ\n   0x1d58, // ᵘ\n   0x1d5b, // ᵛ\n   0x1d5d, // ᵝ\n   0x1d5e, // ᵞ\n   0x1d5f, // ᵟ\n   0x1d60, // ᵠ\n   0x1d61, // ᵡ\n   0x1d62, // ᵢ\n   0x1d63, // ᵣ\n   0x1d64, // ᵤ\n   0x1d65, // ᵥ\n   0x1d66, // ᵦ\n   0x1d67, // ᵧ\n   0x1d68, // ᵨ\n   0x1d69, // ᵩ\n   0x1d6a, // ᵪ\n   0x1d9c, // ᶜ\n   0x1da0, // ᶠ\n   0x1da5, // ᶥ\n   0x1da6, // ᶦ\n   0x1dab, // ᶫ\n   0x1db0, // ᶰ\n   0x1db8, // ᶸ\n   0x1dbb, // ᶻ\n   0x1dbf, // ᶿ\n   0x2032, // ′\n   0x2033, // ″\n   0x2034, // ‴\n   0x2035, // ‵\n   0x2036, // ‶\n   0x2037, // ‷\n   0x2057, // ⁗\n   0x2070, // ⁰\n   0x2071, // ⁱ\n   0x2074, // ⁴\n   0x2075, // ⁵\n   0x2076, // ⁶\n   0x2077, // ⁷\n   0x2078, // ⁸\n   0x2079, // ⁹\n   0x207a, // ⁺\n   0x207b, // ⁻\n   0x207c, // ⁼\n   0x207d, // ⁽\n   0x207e, // ⁾\n   0x207f, // ⁿ\n   0x2080, // ₀\n   0x2081, // ₁\n   0x2082, // ₂\n   0x2083, // ₃\n   0x2084, // ₄\n   0x2085, // ₅\n   0x2086, // ₆\n   0x2087, // ₇\n   0x2088, // ₈\n   0x2089, // ₉\n   0x208a, // ₊\n   0x208b, // ₋\n   0x208c, // ₌\n   0x208d, // ₍\n   0x208e, // ₎\n   0x2090, // ₐ\n   0x2091, // ₑ\n   0x2092, // ₒ\n   0x2093, // ₓ\n   0x2095, // ₕ\n   0x2096, // ₖ\n   0x2097, // ₗ\n   0x2098, // ₘ\n   0x2099, // ₙ\n   0x209a, // ₚ\n   0x209b, // ₛ\n   0x209c, // ₜ\n   0x2c7c, // ⱼ\n   0x2c7d, // ⱽ\n   0xa71b, // ꜛ\n   0xa71c, // ꜜ\n   0xa71d  // ꜝ\n};\nstatic const size_t opsuffs_len = sizeof(opsuffs) / (sizeof(uint32_t));\n\n// keep the same function name to be easy to find again\nstatic bool jl_op_suffix_char(uint32_t wc) {\n    if (wc < 0xA1 || wc > 0x10ffff) {\n        return false;\n    }\n    const CharacterCategory cat = CategoriseCharacter((int) wc);\n    if (cat == ccMn || cat == ccMc ||\n        cat == ccMe) {\n        return true;\n    }\n\n    for (size_t i = 0; i < opsuffs_len; ++i) {\n        if (wc == opsuffs[i]) {\n            return true;\n        }\n    }\n    return false;\n}\n\n// keep the same function name to be easy to find again\nstatic bool never_id_char(uint32_t wc) {\n     const CharacterCategory cat = CategoriseCharacter((int) wc);\n     return (\n          // spaces and control characters:\n          (cat >= ccZs && cat <= ccCs) ||\n\n          // ASCII and Latin1 non-connector punctuation\n          (wc < 0xff &&\n           cat >= ccPd && cat <= ccPo) ||\n\n          wc == '`' ||\n\n          // mathematical brackets\n          (wc >= 0x27e6 && wc <= 0x27ef) ||\n          // angle, corner, and lenticular brackets\n          (wc >= 0x3008 && wc <= 0x3011) ||\n          // tortoise shell, square, and more lenticular brackets\n          (wc >= 0x3014 && wc <= 0x301b) ||\n          // fullwidth parens\n          (wc == 0xff08 || wc == 0xff09) ||\n          // fullwidth square brackets\n          (wc == 0xff3b || wc == 0xff3d));\n}\n\n\nstatic bool IsOperatorFirstCharacter (int ch) {\n    if (IsASCII(ch)) {\n        if (IsJuliaOperator(ch) ||\n            ch == '!' || ch == '?' ||\n            ch == ':' || ch == ';' ||\n            ch == ',' || ch == '.' ) {\n            return true;\n        }else {\n            return false;\n        }\n    } else if (is_wc_cat_id_start((uint32_t) ch)) {\n        return false;\n    } else if (IsJuliaUnaryOperator(ch) ||\n               ! never_id_char((uint32_t) ch)) {\n        return true;\n    }\n    return false;\n}\n\nstatic bool IsOperatorCharacter (int ch) {\n    if (IsOperatorFirstCharacter(ch) ||\n        (!IsASCII(ch) && jl_op_suffix_char((uint32_t) ch)) ) {\n        return true;\n    }\n    return false;\n}\n\nstatic bool CheckBoundsIndexing(char *str) {\n    if (strcmp(\"begin\", str) == 0 || strcmp(\"end\", str) == 0 ) {\n        return true;\n    }\n    return false;\n}\n\nstatic int CheckKeywordFoldPoint(char *str) {\n    if (strcmp (\"if\", str) == 0 ||\n        strcmp (\"for\", str) == 0 ||\n        strcmp (\"while\", str) == 0 ||\n        strcmp (\"try\", str) == 0 ||\n        strcmp (\"do\", str) == 0 ||\n        strcmp (\"begin\", str) == 0 ||\n        strcmp (\"let\", str) == 0 ||\n        strcmp (\"baremodule\", str) == 0 ||\n        strcmp (\"quote\", str) == 0 ||\n        strcmp (\"module\", str) == 0 ||\n        strcmp (\"struct\", str) == 0 ||\n        strcmp (\"type\", str) == 0 ||\n        strcmp (\"macro\", str) == 0 ||\n        strcmp (\"function\", str) == 0) {\n        return 1;\n    }\n    if (strcmp(\"end\", str) == 0) {\n        return -1;\n    }\n    return 0;\n}\n\nstatic bool IsNumberExpon(int ch, int base) {\n    if ((base == 10 && (ch == 'e' || ch == 'E' || ch == 'f')) ||\n        (base == 16 && (ch == 'p' || ch == 'P'))) {\n        return true;\n    }\n    return false;\n}\n\n/* Scans a sequence of digits, returning true if it found any. */\nstatic bool ScanDigits(StyleContext& sc, int base, bool allow_sep) {\n\tbool found = false;\n    for (;;) {\n\t\tif (IsADigit(sc.chNext, base) || (allow_sep && sc.chNext == '_')) {\n\t\t\tfound = true;\n            sc.Forward();\n\t\t} else {\n\t\t\tbreak;\n        }\n\t}\n\treturn found;\n}\n\nstatic inline bool ScanNHexas(StyleContext &sc, int max) {\n    int n = 0;\n    bool error = false;\n\n    sc.Forward();\n    if (!IsADigit(sc.ch, 16)) {\n        error = true;\n    } else {\n        while (IsADigit(sc.ch, 16) && n < max) {\n            sc.Forward();\n            n++;\n        }\n    }\n    return error;\n}\n\nstatic void resumeCharacter(StyleContext &sc, bool lexerror) {\n    bool error = false;\n\n    //  ''' case\n    if (sc.chPrev == '\\'' && sc.ch == '\\'' && sc.chNext == '\\'') {\n        sc.Forward();\n        sc.ForwardSetState(SCE_JULIA_DEFAULT);\n        return;\n    } else if (lexerror && sc.chPrev == '\\'' && sc.ch == '\\'') {\n        sc.ChangeState(SCE_JULIA_LEXERROR);\n        sc.ForwardSetState(SCE_JULIA_DEFAULT);\n\n    // Escape characters\n    } else if (sc.ch == '\\\\') {\n        sc.Forward();\n        if (sc.ch == '\\'' || sc.ch == '\\\\' ) {\n            sc.Forward();\n        } else if (sc.ch == 'n' || sc.ch == 't' || sc.ch == 'a' ||\n                   sc.ch == 'b' || sc.ch == 'e' || sc.ch == 'f' ||\n                   sc.ch == 'r' || sc.ch == 'v' ) {\n            sc.Forward();\n        } else if (sc.ch == 'x') {\n            error |= ScanNHexas(sc, 2);\n        } else if (sc.ch == 'u') {\n            error |= ScanNHexas(sc, 4);\n        } else if (sc.ch == 'U') {\n            error |= ScanNHexas(sc, 8);\n        } else if (IsADigit(sc.ch, 8)) {\n            int n = 1;\n            int max = 3;\n            sc.Forward();\n            while (IsADigit(sc.ch, 8) && n < max) {\n                sc.Forward();\n                n++;\n            }\n        }\n\n        if (lexerror) {\n            if (sc.ch != '\\'') {\n                error = true;\n                while (sc.ch != '\\'' &&\n                       sc.ch != '\\r' &&\n                       sc.ch != '\\n') {\n                    sc.Forward();\n                }\n            }\n\n            if (error) {\n                sc.ChangeState(SCE_JULIA_LEXERROR);\n                sc.ForwardSetState(SCE_JULIA_DEFAULT);\n            }\n        }\n    } else if (lexerror) {\n        if (sc.ch < 0x20 || sc.ch > 0x10ffff) {\n            error = true;\n        } else {\n            // single character\n            sc.Forward();\n\n            if (sc.ch != '\\'') {\n                error = true;\n                while (sc.ch != '\\'' &&\n                       sc.ch != '\\r' &&\n                       sc.ch != '\\n') {\n                    sc.Forward();\n                }\n            }\n        }\n\n        if (error) {\n            sc.ChangeState(SCE_JULIA_LEXERROR);\n            sc.ForwardSetState(SCE_JULIA_DEFAULT);\n        }\n    }\n\n    // closing quote\n    if (sc.ch == '\\'') {\n        if (sc.chNext == '\\'') {\n            sc.Forward();\n        } else {\n            sc.ForwardSetState(SCE_JULIA_DEFAULT);\n        }\n    }\n}\n\nstatic inline bool IsACharacter(StyleContext &sc) {\n    return (sc.chPrev == '\\'' && sc.chNext == '\\'');\n}\n\nstatic void ScanParenInterpolation(StyleContext &sc) {\n    // TODO: no syntax highlighting inside a string interpolation\n\n    // Level of nested parenthesis\n    int interp_level = 0;\n\n    // If true, it is inside a string and parenthesis are not counted.\n    bool allow_paren_string = false;\n\n\n    // check for end of states\n    for (; sc.More(); sc.Forward()) {\n        // TODO: check corner cases for nested string interpolation\n        // TODO: check corner cases with Command inside interpolation\n\n        if ( sc.ch == '\\\"' && sc.chPrev != '\\\\') {\n            // Toggle the string environment (parenthesis are not counted inside a string)\n            allow_paren_string = !allow_paren_string;\n        } else if ( !allow_paren_string ) {\n            if ( sc.ch == '(' && !IsACharacter(sc) ) {\n                interp_level ++;\n            } else if ( sc.ch == ')' && !IsACharacter(sc) && interp_level > 0 ) {\n                interp_level --;\n                if (interp_level == 0) {\n                    // Exit interpolation\n                    return;\n                }\n            }\n        }\n    }\n}\n/*\n * Start parsing a number, parse the base.\n */\nstatic void initNumber (StyleContext &sc, int &base, bool &with_dot) {\n    base = 10;\n    with_dot = false;\n    sc.SetState(SCE_JULIA_NUMBER);\n    if (sc.ch == '0') {\n        if (sc.chNext == 'x') {\n            sc.Forward();\n            base = 16;\n            if (sc.chNext == '.') {\n                sc.Forward();\n                with_dot = true;\n            }\n        } else if (sc.chNext == 'o') {\n            sc.Forward();\n            base = 8;\n        } else if (sc.chNext == 'b') {\n            sc.Forward();\n            base = 2;\n        }\n    } else if (sc.ch == '.') {\n        with_dot = true;\n    }\n}\n\n/*\n * Resume parsing a String or Command, bounded by the `quote` character (\\\" or \\`)\n * The `triple` argument specifies if it is a triple-quote String or Command.\n * Interpolation is detected (with `$`), and parsed if `allow_interp` is true.\n */\nstatic void resumeStringLike(StyleContext &sc, int quote, bool triple, bool allow_interp, bool full_highlight) {\n    int stylePrev = sc.state;\n    bool checkcurrent = false;\n\n    // Escape characters\n    if (sc.ch == '\\\\') {\n        if (sc.chNext == quote || sc.chNext == '\\\\' || sc.chNext == '$') {\n            sc.Forward();\n        }\n    } else if (allow_interp && sc.ch == '$') {\n        // If the interpolation is only of a variable, do not change state\n        if (sc.chNext == '(') {\n            if (full_highlight) {\n                sc.SetState(SCE_JULIA_STRINGINTERP);\n            } else {\n                sc.ForwardSetState(SCE_JULIA_STRINGINTERP);\n            }\n            ScanParenInterpolation(sc);\n            sc.ForwardSetState(stylePrev);\n\n            checkcurrent = true;\n\n        } else if (full_highlight && IsIdentifierFirstCharacter(sc.chNext)) {\n            sc.SetState(SCE_JULIA_STRINGINTERP);\n            sc.Forward();\n            sc.Forward();\n            for (; sc.More(); sc.Forward()) {\n                if (! IsIdentifierCharacter(sc.ch)) {\n                    break;\n                }\n            }\n            sc.SetState(stylePrev);\n\n            checkcurrent = true;\n        }\n\n        if (checkcurrent) {\n            // Check that the current character is not a special char,\n            // otherwise it will be skipped\n            resumeStringLike(sc, quote, triple, allow_interp, full_highlight);\n        }\n\n    } else if (sc.ch == quote) {\n        if (triple) {\n            if (sc.chNext == quote && sc.GetRelativeCharacter(2) == quote) {\n                // Move to the end of the triple quotes\n                Sci_PositionU nextIndex = sc.currentPos + 2;\n                while (nextIndex > sc.currentPos && sc.More()) {\n                    sc.Forward();\n                }\n                sc.ForwardSetState(SCE_JULIA_DEFAULT);\n            }\n        } else {\n            sc.ForwardSetState(SCE_JULIA_DEFAULT);\n        }\n    }\n}\n\nstatic void resumeCommand(StyleContext &sc, bool triple, bool allow_interp) {\n    return resumeStringLike(sc, '`', triple, allow_interp, true);\n}\n\nstatic void resumeString(StyleContext &sc, bool triple, bool allow_interp) {\n    return resumeStringLike(sc, '\"', triple, allow_interp, true);\n}\n\nstatic void resumeNumber (StyleContext &sc, int base, bool &with_dot, bool lexerror) {\n    if (IsNumberExpon(sc.ch, base)) {\n        if (IsADigit(sc.chNext) || sc.chNext == '+' || sc.chNext == '-') {\n            sc.Forward();\n            // Capture all digits\n            ScanDigits(sc, 10, false);\n            sc.Forward();\n        }\n        sc.SetState(SCE_JULIA_DEFAULT);\n    } else if (sc.ch == '.' && sc.chNext == '.') {\n        // Interval operator `..`\n        sc.SetState(SCE_JULIA_OPERATOR);\n        sc.Forward();\n        sc.ForwardSetState(SCE_JULIA_DEFAULT);\n    } else if (sc.ch == '.' && !with_dot) {\n        with_dot = true;\n        ScanDigits(sc, base, true);\n    } else if (IsADigit(sc.ch, base) || sc.ch == '_') {\n        ScanDigits(sc, base, true);\n    } else if (IsADigit(sc.ch) && !IsADigit(sc.ch, base)) {\n        if (lexerror) {\n            sc.ChangeState(SCE_JULIA_LEXERROR);\n        }\n        ScanDigits(sc, 10, false);\n        sc.ForwardSetState(SCE_JULIA_DEFAULT);\n    } else {\n        sc.SetState(SCE_JULIA_DEFAULT);\n    }\n}\n\nstatic void resumeOperator (StyleContext &sc) {\n    if (sc.chNext == ':' && (sc.ch == ':' || sc.ch == '<' ||\n                    (sc.ch == '>' && (sc.chPrev != '-' && sc.chPrev != '=')))) {\n        // Case `:a=>:b`\n        sc.Forward();\n        sc.ForwardSetState(SCE_JULIA_DEFAULT);\n    } else if (sc.ch == ':') {\n        // Case `foo(:baz,:baz)` or `:one+:two`\n        // Let the default case switch decide if it is a symbol\n        sc.SetState(SCE_JULIA_DEFAULT);\n    } else if (sc.ch == '\\'') {\n        sc.SetState(SCE_JULIA_DEFAULT);\n    } else if ((sc.ch == '.' && sc.chPrev != '.') || IsIdentifierFirstCharacter(sc.ch) ||\n               (! (sc.chPrev == '.' && IsOperatorFirstCharacter(sc.ch)) &&\n                ! IsOperatorCharacter(sc.ch)) ) {\n        sc.SetState(SCE_JULIA_DEFAULT);\n    }\n}\n\nvoid SCI_METHOD LexerJulia::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) {\n\tPropSetSimple props;\n\tAccessor styler(pAccess, &props);\n\n\tSci_Position pos = startPos;\n\tstyler.StartAt(pos);\n\tstyler.StartSegment(pos);\n\n    // use the line state of each line to store block/multiline states\n    Sci_Position curLine = styler.GetLine(startPos);\n    // Default is false for everything and 0 counters.\n\tint lineState = (curLine > 0) ? styler.GetLineState(curLine-1) : 0;\n\n    bool transpose = (lineState >> 0) & 0x01;                // 1 bit to know if ' is allowed to mean transpose\n    bool istripledocstring = (lineState >> 1) & 0x01;        // 1 bit to know if we are in a triple doublequotes string\n\tbool triple_backtick = (lineState >> 2) & 0x01;          // 1 bit to know if we are in a triple backtick command\n\tbool israwstring = (lineState >> 3) & 0x01;              // 1 bit to know if we are in a raw string\n    int indexing_level = (int)((lineState >> 4) & 0x0F);     // 4 bits of bracket nesting counter\n    int list_comprehension = (int)((lineState >> 8) & 0x0F); // 4 bits of parenthesis nesting counter\n    int commentDepth = (int)((lineState >> 12) & 0x0F);      // 4 bits of nested comment counter\n\n    // base for parsing number\n    int base = 10;\n    // number has a float dot ?\n    bool with_dot = false;\n\n    StyleContext sc(startPos, length, initStyle, styler);\n\n    for (; sc.More(); sc.Forward()) {\n\n        //// check for end of states\n        switch (sc.state) {\n            case SCE_JULIA_BRACKET:\n                sc.SetState(SCE_JULIA_DEFAULT);\n                break;\n            case SCE_JULIA_OPERATOR:\n                resumeOperator(sc);\n                break;\n            case SCE_JULIA_TYPEOPERATOR:\n                sc.SetState(SCE_JULIA_DEFAULT);\n                break;\n            case SCE_JULIA_TYPEANNOT:\n                if (! IsIdentifierCharacter(sc.ch)) {\n                    sc.SetState(SCE_JULIA_DEFAULT);\n                }\n                break;\n            case SCE_JULIA_IDENTIFIER:\n                // String literal\n                if (sc.ch == '\\\"') {\n                    // If the string literal has a prefix, interpolation is disabled\n                    israwstring = true;\n                    sc.ChangeState(SCE_JULIA_STRINGLITERAL);\n                    sc.SetState(SCE_JULIA_DEFAULT);\n\n                } else if (sc.ch == '`') {\n                    // If the string literal has a prefix, interpolation is disabled\n                    israwstring = true;\n                    sc.ChangeState(SCE_JULIA_COMMANDLITERAL);\n                    sc.SetState(SCE_JULIA_DEFAULT);\n\n                // Continue if the character is an identifier character\n                } else if (! IsIdentifierCharacter(sc.ch)) {\n                    char s[MAX_JULIA_IDENT_CHARS + 1];\n                    sc.GetCurrent(s, sizeof(s));\n\n                    // Treat the keywords differently if we are indexing or not\n                    if ( indexing_level > 0 && CheckBoundsIndexing(s)) {\n                        // Inside [], (), `begin` and `end` are numbers not block keywords\n                        sc.ChangeState(SCE_JULIA_NUMBER);\n                        transpose = false;\n\n                    } else {\n                        if (keywords.InList(s)) {\n                            sc.ChangeState(SCE_JULIA_KEYWORD1);\n                            transpose = false;\n                        } else if (identifiers2.InList(s)) {\n                            sc.ChangeState(SCE_JULIA_KEYWORD2);\n                            transpose = false;\n                        } else if (identifiers3.InList(s)) {\n                            sc.ChangeState(SCE_JULIA_KEYWORD3);\n                            transpose = false;\n                        } else if (identifiers4.InList(s)) {\n                            sc.ChangeState(SCE_JULIA_KEYWORD4);\n                            // These identifiers can be used for variable names also,\n                            // so transpose is not forbidden.\n                            //transpose = false;\n                        }\n                    }\n                    sc.SetState(SCE_JULIA_DEFAULT);\n\n                    // TODO: recognize begin-end blocks inside list comprehension\n                    // b = [(begin n%2; n*2 end) for n in 1:10]\n                    // TODO: recognize better comprehension for-if to avoid problem with code-folding\n                    // c = [(if isempty(a); missing else first(b) end) for (a, b) in zip(l1, l2)]\n                }\n                break;\n            case SCE_JULIA_NUMBER:\n                resumeNumber(sc, base, with_dot, options.highlightLexerror);\n                break;\n            case SCE_JULIA_CHAR:\n                resumeCharacter(sc, options.highlightLexerror);\n                break;\n            case SCE_JULIA_DOCSTRING:\n                resumeString(sc, true, !israwstring);\n                if (sc.state == SCE_JULIA_DEFAULT && israwstring) {\n                    israwstring = false;\n                }\n                break;\n            case SCE_JULIA_STRING:\n                resumeString(sc, false, !israwstring);\n                if (sc.state == SCE_JULIA_DEFAULT && israwstring) {\n                    israwstring = false;\n                }\n                break;\n            case SCE_JULIA_COMMAND:\n                resumeCommand(sc, triple_backtick, !israwstring);\n                break;\n            case SCE_JULIA_MACRO:\n                if (IsASpace(sc.ch) || ! IsIdentifierCharacter(sc.ch)) {\n                    sc.SetState(SCE_JULIA_DEFAULT);\n                }\n                break;\n            case SCE_JULIA_SYMBOL:\n                if (! IsIdentifierCharacter(sc.ch)) {\n                    sc.SetState(SCE_JULIA_DEFAULT);\n                }\n                break;\n            case SCE_JULIA_COMMENT:\n                if( commentDepth > 0 ) {\n                    // end or start of a nested a block comment\n                    if ( sc.ch == '=' && sc.chNext == '#') {\n                        commentDepth --;\n                        sc.Forward();\n\n                        if (commentDepth == 0) {\n                            sc.ForwardSetState(SCE_JULIA_DEFAULT);\n                        }\n                    } else if( sc.ch == '#' && sc.chNext == '=') {\n                        commentDepth ++;\n                        sc.Forward();\n                    }\n                } else {\n                    // single line comment\n                    if (sc.atLineEnd || sc.ch == '\\r' || sc.ch == '\\n') {\n                        sc.SetState(SCE_JULIA_DEFAULT);\n                        transpose = false;\n                    }\n                }\n                break;\n        }\n\n        // check start of a new state\n        if (sc.state == SCE_JULIA_DEFAULT) {\n            if (sc.ch == '#') {\n                sc.SetState(SCE_JULIA_COMMENT);\n                // increment depth if we are a block comment\n                if(sc.chNext == '=') {\n                    commentDepth ++;\n                    sc.Forward();\n                }\n            } else if (sc.ch == '!') {\n                sc.SetState(SCE_JULIA_OPERATOR);\n                transpose = false;\n            } else if (sc.ch == '\\'') {\n                if (transpose) {\n                    sc.SetState(SCE_JULIA_OPERATOR);\n                } else {\n                    sc.SetState(SCE_JULIA_CHAR);\n                }\n            } else if (sc.ch == '\\\"') {\n                istripledocstring = (sc.chNext == '\\\"' && sc.GetRelativeCharacter(2) == '\\\"');\n                if (istripledocstring) {\n                    sc.SetState(SCE_JULIA_DOCSTRING);\n                    // Move to the end of the triple quotes\n                    Sci_PositionU nextIndex = sc.currentPos + 2;\n                    while (nextIndex > sc.currentPos && sc.More()) {\n                        sc.Forward();\n                    }\n                } else {\n                    sc.SetState(SCE_JULIA_STRING);\n                }\n            } else if (sc.ch == '`') {\n                triple_backtick = (sc.chNext == '`' && sc.GetRelativeCharacter(2) == '`');\n                sc.SetState(SCE_JULIA_COMMAND);\n                if (triple_backtick) {\n                    // Move to the end of the triple backticks\n                    Sci_PositionU nextIndex = sc.currentPos + 2;\n                    while (nextIndex > sc.currentPos && sc.More()) {\n                        sc.Forward();\n                    }\n                }\n            } else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) {\n                initNumber(sc, base, with_dot);\n            } else if (IsIdentifierFirstCharacter(sc.ch)) {\n                sc.SetState(SCE_JULIA_IDENTIFIER);\n                transpose = true;\n            } else if (sc.ch == '@') {\n                sc.SetState(SCE_JULIA_MACRO);\n                transpose = false;\n\n            // Several parsing of operators, should keep the order of `if` blocks\n            } else if ((sc.ch == ':' || sc.ch == '<' || sc.ch == '>') && sc.chNext == ':') {\n                sc.SetState(SCE_JULIA_TYPEOPERATOR);\n                sc.Forward();\n                // Highlight the next identifier, if option is set\n                if (options.highlightTypeannotation &&\n                    IsIdentifierFirstCharacter(sc.chNext)) {\n                    sc.ForwardSetState(SCE_JULIA_TYPEANNOT);\n                }\n            } else if (sc.ch == ':') {\n                // TODO: improve detection of range\n                // should be solved with begin-end parsing\n                // `push!(arr, s1 :s2)` and `a[begin :end]\n                if (IsIdentifierFirstCharacter(sc.chNext) &&\n                    ! IsIdentifierCharacter(sc.chPrev) &&\n                    sc.chPrev != ')' && sc.chPrev != ']' ) {\n                    sc.SetState(SCE_JULIA_SYMBOL);\n                } else {\n                    sc.SetState(SCE_JULIA_OPERATOR);\n                }\n            } else if (IsJuliaParen(sc.ch)) {\n                if (sc.ch == '[') {\n                    list_comprehension ++;\n                    indexing_level ++;\n                } else if (sc.ch == ']' && (indexing_level > 0)) {\n                    list_comprehension --;\n                    indexing_level --;\n                } else if (sc.ch == '(') {\n                    list_comprehension ++;\n                } else if (sc.ch == ')' && (list_comprehension > 0)) {\n                    list_comprehension --;\n                }\n\n                if (sc.ch == ')' || sc.ch == ']' || sc.ch == '}') {\n                    transpose = true;\n                } else {\n                    transpose = false;\n                }\n                sc.SetState(SCE_JULIA_BRACKET);\n            } else if (IsOperatorFirstCharacter(sc.ch)) {\n                transpose = false;\n                sc.SetState(SCE_JULIA_OPERATOR);\n            } else {\n                transpose = false;\n            }\n        }\n\n        // update the line information (used for line-by-line lexing and folding)\n        if (sc.atLineEnd) {\n            // set the line state to the current state\n            curLine = styler.GetLine(sc.currentPos);\n\n            lineState = ((transpose ? 1 : 0) << 0) |\n                        ((istripledocstring ? 1 : 0) << 1) |\n                        ((triple_backtick ? 1 : 0) << 2) |\n                        ((israwstring ? 1 : 0) << 3) |\n                        ((indexing_level & 0x0F) << 4) |\n                        ((list_comprehension & 0x0F) << 8) |\n                        ((commentDepth & 0x0F) << 12);\n            styler.SetLineState(curLine, lineState);\n        }\n    }\n    sc.Complete();\n}\n\nvoid SCI_METHOD LexerJulia::Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) {\n\n\tif (!options.fold)\n\t\treturn;\n\n\tLexAccessor styler(pAccess);\n\n\tSci_PositionU endPos = startPos + length;\n\tint visibleChars = 0;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tint levelCurrent = SC_FOLDLEVELBASE;\n    int lineState = 0;\n\tif (lineCurrent > 0) {\n\t\tlevelCurrent = styler.LevelAt(lineCurrent-1) >> 16;\n        lineState = styler.GetLineState(lineCurrent-1);\n    }\n\n    // level of nested brackets\n    int indexing_level = (int)((lineState >> 4) & 0x0F);     // 4 bits of bracket nesting counter\n    // level of nested parenthesis or brackets\n    int list_comprehension = (int)((lineState >> 8) & 0x0F); // 4 bits of parenthesis nesting counter\n    //int commentDepth = (int)((lineState >> 12) & 0x0F);      // 4 bits of nested comment counter\n    \n\tSci_PositionU lineStartNext = styler.LineStart(lineCurrent+1);\n\tint levelNext = levelCurrent;\n\tchar chNext = styler[startPos];\n\tint stylePrev = styler.StyleAt(startPos - 1);\n\tint styleNext = styler.StyleAt(startPos);\n\tint style = initStyle;\n    char word[100];\n    int wordlen = 0;\n    for (Sci_PositionU i = startPos; i < endPos; i++) {\n\t\tchar ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\tstyle = styleNext;\n\t\tstyleNext = styler.StyleAt(i + 1);\n\t\tbool atEOL = i == (lineStartNext-1);\n\n        // a start/end of comment block\n        if (options.foldComment && style == SCE_JULIA_COMMENT) {\n            // start of block comment\n            if (ch == '#' && chNext == '=') {\n                levelNext ++;\n            }\n            // end of block comment\n            if (ch == '=' && chNext == '#' && levelNext > 0) {\n                levelNext --;\n            }\n        }\n\n        // Syntax based folding, accounts for list comprehension\n        if (options.foldSyntaxBased) {\n            // list comprehension allow `for`, `if` and `begin` without `end`\n            if (style == SCE_JULIA_BRACKET) {\n                if (ch == '[') {\n                    list_comprehension ++;\n                    indexing_level ++;\n                    levelNext ++;\n                } else if (ch == ']') {\n                    list_comprehension --;\n                    indexing_level --;\n                    levelNext --;\n                } else if (ch == '(') {\n                    list_comprehension ++;\n                    levelNext ++;\n                } else if (ch == ')') {\n                    list_comprehension --;\n                    levelNext --;\n                }\n                // check non-negative\n                if (indexing_level < 0) {\n                    indexing_level = 0;\n                }\n                if (list_comprehension < 0) {\n                    list_comprehension = 0;\n                }\n            }\n\n            // keyword\n            if (style == SCE_JULIA_KEYWORD1) {\n                word[wordlen++] = static_cast<char>(ch);\n                if (wordlen == 100) {  // prevent overflow\n                    word[0] = '\\0';\n                    wordlen = 1;\n                }\n                if (styleNext != SCE_JULIA_KEYWORD1) {\n                    word[wordlen] = '\\0';\n                    wordlen = 0;\n                    if (list_comprehension <= 0 && indexing_level <= 0) {\n                        levelNext += CheckKeywordFoldPoint(word);\n                    }\n                }\n            }\n        }\n\n        // Docstring\n        if (options.foldDocstring) {\n            if (stylePrev != SCE_JULIA_DOCSTRING && style == SCE_JULIA_DOCSTRING) {\n                levelNext ++;\n            } else if (style == SCE_JULIA_DOCSTRING && styleNext != SCE_JULIA_DOCSTRING) {\n                levelNext --;\n            }\n        }\n\n        // check non-negative level\n        if (levelNext < 0) {\n            levelNext = 0;\n        }\n\n        if (!IsASpace(ch)) {\n            visibleChars++;\n        }\n        stylePrev = style;\n\n        if (atEOL || (i == endPos-1)) {\n            int levelUse = levelCurrent;\n            int lev = levelUse | levelNext << 16;\n            if (visibleChars == 0 && options.foldCompact) {\n                lev |= SC_FOLDLEVELWHITEFLAG;\n            }\n            if (levelUse < levelNext) {\n                lev |= SC_FOLDLEVELHEADERFLAG;\n            }\n            if (lev != styler.LevelAt(lineCurrent)) {\n                styler.SetLevel(lineCurrent, lev);\n            }\n            lineCurrent++;\n            lineStartNext = styler.LineStart(lineCurrent+1);\n            levelCurrent = levelNext;\n            if (atEOL && (i == static_cast<Sci_PositionU>(styler.Length() - 1))) {\n                // There is an empty line at end of file so give it same level and empty\n                styler.SetLevel(lineCurrent, (levelCurrent | levelCurrent << 16) | SC_FOLDLEVELWHITEFLAG);\n            }\n            visibleChars = 0;\n        }\n    }\n}\n\nLexerModule lmJulia(SCLEX_JULIA, LexerJulia::LexerFactoryJulia, \"julia\", juliaWordLists);\n"
  },
  {
    "path": "lexilla/lexers/LexKVIrc.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexKVIrc.cxx\n ** Lexer for KVIrc script.\n **/\n// Copyright 2013 by OmegaPhil <OmegaPhil+scintilla@gmail.com>, based in\n// part from LexPython Copyright 1998-2002 by Neil Hodgson <neilh@scintilla.org>\n// and LexCmake Copyright 2007 by Cristian Adam <cristian [dot] adam [at] gmx [dot] net>\n\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\n\n/* KVIrc Script syntactic rules: http://www.kvirc.net/doc/doc_syntactic_rules.html */\n\n/* Utility functions */\nstatic inline bool IsAWordChar(int ch) {\n\n    /* Keyword list includes modules, i.e. words including '.', and\n     * alias namespaces include ':' */\n    return (ch < 0x80) && (isalnum(ch) || ch == '_' || ch == '.'\n            || ch == ':');\n}\nstatic inline bool IsAWordStart(int ch) {\n\n    /* Functions (start with '$') are treated separately to keywords */\n    return (ch < 0x80) && (isalnum(ch) || ch == '_' );\n}\n\n/* Interface function called by Scintilla to request some text to be\n syntax highlighted */\nstatic void ColouriseKVIrcDoc(Sci_PositionU startPos, Sci_Position length,\n                              int initStyle, WordList *keywordlists[],\n                              Accessor &styler)\n{\n    /* Fetching style context */\n    StyleContext sc(startPos, length, initStyle, styler);\n\n    /* Accessing keywords and function-marking keywords */\n    WordList &keywords = *keywordlists[0];\n    WordList &functionKeywords = *keywordlists[1];\n\n    /* Looping for all characters - only automatically moving forward\n     * when asked for (transitions leaving strings and keywords do this\n     * already) */\n    bool next = true;\n    for( ; sc.More(); next ? sc.Forward() : (void)0 )\n    {\n        /* Resetting next */\n        next = true;\n\n        /* Dealing with different states */\n        switch (sc.state)\n        {\n            case SCE_KVIRC_DEFAULT:\n\n                /* Detecting single-line comments\n                 * Unfortunately KVIrc script allows raw '#<channel\n                 * name>' to be used, and appending # to an array returns\n                 * its length...\n                 * Going for a compromise where single line comments not\n                 * starting on a newline are allowed in all cases except\n                 * when they are preceeded with an opening bracket or comma\n                 * (this will probably be the most common style a valid\n                 * string-less channel name will be used with), with the\n                 * array length case included\n                 */\n                if (\n                    (sc.ch == '#' && sc.atLineStart) ||\n                    (sc.ch == '#' && (\n                        sc.chPrev != '(' && sc.chPrev != ',' &&\n                        sc.chPrev != ']')\n                    )\n                )\n                {\n                    sc.SetState(SCE_KVIRC_COMMENT);\n                    break;\n                }\n\n                /* Detecting multi-line comments */\n                if (sc.Match('/', '*'))\n                {\n                    sc.SetState(SCE_KVIRC_COMMENTBLOCK);\n                    break;\n                }\n\n                /* Detecting strings */\n                if (sc.ch == '\"')\n                {\n                    sc.SetState(SCE_KVIRC_STRING);\n                    break;\n                }\n\n                /* Detecting functions */\n                if (sc.ch == '$')\n                {\n                    sc.SetState(SCE_KVIRC_FUNCTION);\n                    break;\n                }\n\n                /* Detecting variables */\n                if (sc.ch == '%')\n                {\n                    sc.SetState(SCE_KVIRC_VARIABLE);\n                    break;\n                }\n\n                /* Detecting numbers - isdigit is unsafe as it does not\n                 * validate, use CharacterSet.h functions */\n                if (IsADigit(sc.ch))\n                {\n                    sc.SetState(SCE_KVIRC_NUMBER);\n                    break;\n                }\n\n                /* Detecting words */\n                if (IsAWordStart(sc.ch) && IsAWordChar(sc.chNext))\n                {\n                    sc.SetState(SCE_KVIRC_WORD);\n                    sc.Forward();\n                    break;\n                }\n\n                /* Detecting operators */\n                if (isoperator(sc.ch))\n                {\n                    sc.SetState(SCE_KVIRC_OPERATOR);\n                    break;\n                }\n\n                break;\n\n            case SCE_KVIRC_COMMENT:\n\n                /* Breaking out of single line comment when a newline\n                 * is introduced */\n                if (sc.ch == '\\r' || sc.ch == '\\n')\n                {\n                    sc.SetState(SCE_KVIRC_DEFAULT);\n                    break;\n                }\n\n                break;\n\n            case SCE_KVIRC_COMMENTBLOCK:\n\n                /* Detecting end of multi-line comment */\n                if (sc.Match('*', '/'))\n                {\n                    // Moving the current position forward two characters\n                    // so that '*/' is included in the comment\n                    sc.Forward(2);\n                    sc.SetState(SCE_KVIRC_DEFAULT);\n\n                    /* Comment has been exited and the current position\n                     * moved forward, yet the new current character\n                     * has yet to be defined - loop without moving\n                     * forward again */\n                    next = false;\n                    break;\n                }\n\n                break;\n\n            case SCE_KVIRC_STRING:\n\n                /* Detecting end of string - closing speechmarks */\n                if (sc.ch == '\"')\n                {\n                    /* Allowing escaped speechmarks to pass */\n                    if (sc.chPrev == '\\\\')\n                        break;\n\n                    /* Moving the current position forward to capture the\n                     * terminating speechmarks, and ending string */\n                    sc.ForwardSetState(SCE_KVIRC_DEFAULT);\n\n                    /* String has been exited and the current position\n                     * moved forward, yet the new current character\n                     * has yet to be defined - loop without moving\n                     * forward again */\n                    next = false;\n                    break;\n                }\n\n                /* Functions and variables are now highlighted in strings\n                 * Detecting functions */\n                if (sc.ch == '$')\n                {\n                    /* Allowing escaped functions to pass */\n                    if (sc.chPrev == '\\\\')\n                        break;\n\n                    sc.SetState(SCE_KVIRC_STRING_FUNCTION);\n                    break;\n                }\n\n                /* Detecting variables */\n                if (sc.ch == '%')\n                {\n                    /* Allowing escaped variables to pass */\n                    if (sc.chPrev == '\\\\')\n                        break;\n\n                    sc.SetState(SCE_KVIRC_STRING_VARIABLE);\n                    break;\n                }\n\n                /* Breaking out of a string when a newline is introduced */\n                if (sc.ch == '\\r' || sc.ch == '\\n')\n                {\n                    /* Allowing escaped newlines */\n                    if (sc.chPrev == '\\\\')\n                        break;\n\n                    sc.SetState(SCE_KVIRC_DEFAULT);\n                    break;\n                }\n\n                break;\n\n            case SCE_KVIRC_FUNCTION:\n            case SCE_KVIRC_VARIABLE:\n\n                /* Detecting the end of a function/variable (word) */\n                if (!IsAWordChar(sc.ch))\n                {\n                    sc.SetState(SCE_KVIRC_DEFAULT);\n\n                    /* Word has been exited yet the current character\n                     * has yet to be defined - loop without moving\n                     * forward again */\n                    next = false;\n                    break;\n                }\n\n                break;\n\n            case SCE_KVIRC_STRING_FUNCTION:\n            case SCE_KVIRC_STRING_VARIABLE:\n\n                /* A function or variable in a string\n                 * Detecting the end of a function/variable (word) */\n                if (!IsAWordChar(sc.ch))\n                {\n                    sc.SetState(SCE_KVIRC_STRING);\n\n                    /* Word has been exited yet the current character\n                     * has yet to be defined - loop without moving\n                     * forward again */\n                    next = false;\n                    break;\n                }\n\n                break;\n\n            case SCE_KVIRC_NUMBER:\n\n                /* Detecting the end of a number */\n                if (!IsADigit(sc.ch))\n                {\n                    sc.SetState(SCE_KVIRC_DEFAULT);\n\n                    /* Number has been exited yet the current character\n                     * has yet to be defined - loop without moving\n                     * forward */\n                    next = false;\n                    break;\n                }\n\n                break;\n\n            case SCE_KVIRC_OPERATOR:\n\n                /* Because '%' is an operator but is also the marker for\n                 * a variable, I need to always treat operators as single\n                 * character strings and therefore redo their detection\n                 * after every character */\n                sc.SetState(SCE_KVIRC_DEFAULT);\n\n                /* Operator has been exited yet the current character\n                 * has yet to be defined - loop without moving\n                 * forward */\n                next = false;\n                break;\n\n            case SCE_KVIRC_WORD:\n\n                /* Detecting the end of a word */\n                if (!IsAWordChar(sc.ch))\n                {\n                    /* Checking if the word was actually a keyword -\n                     * fetching the current word, NULL-terminated like\n                     * the keyword list */\n                    char s[100];\n                    Sci_Position wordLen = sc.currentPos - styler.GetStartSegment();\n                    if (wordLen > 99)\n                        wordLen = 99;  /* Include '\\0' in buffer */\n                    Sci_Position i;\n                    for( i = 0; i < wordLen; ++i )\n                    {\n                        s[i] = styler.SafeGetCharAt( styler.GetStartSegment() + i );\n                    }\n                    s[wordLen] = '\\0';\n\n                    /* Actually detecting keywords and fixing the state */\n                    if (keywords.InList(s))\n                    {\n                        /* The SetState call actually commits the\n                         * previous keyword state */\n                        sc.ChangeState(SCE_KVIRC_KEYWORD);\n                    }\n                    else if (functionKeywords.InList(s))\n                    {\n                        // Detecting function keywords and fixing the state\n                        sc.ChangeState(SCE_KVIRC_FUNCTION_KEYWORD);\n                    }\n\n                    /* Transitioning to default and committing the previous\n                     * word state */\n                    sc.SetState(SCE_KVIRC_DEFAULT);\n\n                    /* Word has been exited yet the current character\n                     * has yet to be defined - loop without moving\n                     * forward again */\n                    next = false;\n                    break;\n                }\n\n                break;\n        }\n    }\n\n    /* Indicating processing is complete */\n    sc.Complete();\n}\n\nstatic void FoldKVIrcDoc(Sci_PositionU startPos, Sci_Position length, int /*initStyle - unused*/,\n                      WordList *[], Accessor &styler)\n{\n    /* Based on CMake's folder */\n\n    /* Exiting if folding isnt enabled */\n    if ( styler.GetPropertyInt(\"fold\") == 0 )\n        return;\n\n    /* Obtaining current line number*/\n    Sci_Position currentLine = styler.GetLine(startPos);\n\n    /* Obtaining starting character - indentation is done on a line basis,\n     * not character */\n    Sci_PositionU safeStartPos = styler.LineStart( currentLine );\n\n    /* Initialising current level - this is defined as indentation level\n     * in the low 12 bits, with flag bits in the upper four bits.\n     * It looks like two indentation states are maintained in the returned\n     * 32bit value - 'nextLevel' in the most-significant bits, 'currentLevel'\n     * in the least-significant bits. Since the next level is the most\n     * up to date, this must refer to the current state of indentation.\n     * So the code bitshifts the old current level out of existence to\n     * get at the actual current state of indentation\n     * Based on the LexerCPP.cxx line 958 comment */\n    int currentLevel = SC_FOLDLEVELBASE;\n    if (currentLine > 0)\n        currentLevel = styler.LevelAt(currentLine - 1) >> 16;\n    int nextLevel = currentLevel;\n\n    // Looping for characters in range\n    for (Sci_PositionU i = safeStartPos; i < startPos + length; ++i)\n    {\n        /* Folding occurs after syntax highlighting, meaning Scintilla\n         * already knows where the comments are\n         * Fetching the current state */\n        int state = styler.StyleAt(i) & 31;\n\n        switch( styler.SafeGetCharAt(i) )\n        {\n            case '{':\n\n                /* Indenting only when the braces are not contained in\n                 * a comment */\n                if (state != SCE_KVIRC_COMMENT &&\n                    state != SCE_KVIRC_COMMENTBLOCK)\n                    ++nextLevel;\n                break;\n\n            case '}':\n\n                /* Outdenting only when the braces are not contained in\n                 * a comment */\n                if (state != SCE_KVIRC_COMMENT &&\n                    state != SCE_KVIRC_COMMENTBLOCK)\n                    --nextLevel;\n                break;\n\n            case '\\n':\n            case '\\r':\n\n                /* Preparing indentation information to return - combining\n                 * current and next level data */\n                int lev = currentLevel | nextLevel << 16;\n\n                /* If the next level increases the indent level, mark the\n                 * current line as a fold point - current level data is\n                 * in the least significant bits */\n                if (nextLevel > currentLevel )\n                    lev |= SC_FOLDLEVELHEADERFLAG;\n\n                /* Updating indentation level if needed */\n                if (lev != styler.LevelAt(currentLine))\n                    styler.SetLevel(currentLine, lev);\n\n                /* Updating variables */\n                ++currentLine;\n                currentLevel = nextLevel;\n\n                /* Dealing with problematic Windows newlines -\n                 * incrementing to avoid the extra newline breaking the\n                 * fold point */\n                if (styler.SafeGetCharAt(i) == '\\r' &&\n                    styler.SafeGetCharAt(i + 1) == '\\n')\n                    ++i;\n                break;\n        }\n    }\n\n    /* At this point the data has ended, so presumably the end of the line?\n     * Preparing indentation information to return - combining current\n     * and next level data */\n    int lev = currentLevel | nextLevel << 16;\n\n    /* If the next level increases the indent level, mark the current\n     * line as a fold point - current level data is in the least\n     * significant bits */\n    if (nextLevel > currentLevel )\n        lev |= SC_FOLDLEVELHEADERFLAG;\n\n    /* Updating indentation level if needed */\n    if (lev != styler.LevelAt(currentLine))\n        styler.SetLevel(currentLine, lev);\n}\n\n/* Registering wordlists */\nstatic const char *const kvircWordListDesc[] = {\n\t\"primary\",\n\t\"function_keywords\",\n\t0\n};\n\n\n/* Registering functions and wordlists */\nLexerModule lmKVIrc(SCLEX_KVIRC, ColouriseKVIrcDoc, \"kvirc\", FoldKVIrcDoc,\n                    kvircWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexKix.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexKix.cxx\n ** Lexer for KIX-Scripts.\n **/\n// Copyright 2004 by Manfred Becker <manfred@becker-trdf.de>\n// The License.txt file describes the conditions under which this software may be distributed.\n// Edited by Lee Wilmott (24-Jun-2014) added support for block comments\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\n// Extended to accept accented characters\nstatic inline bool IsAWordChar(int ch) {\n\treturn ch >= 0x80 || isalnum(ch) || ch == '_';\n}\n\nstatic inline bool IsOperator(const int ch) {\n\treturn (ch == '+' || ch == '-' || ch == '*' || ch == '/' || ch == '&' || ch == '|' || ch == '<' || ch == '>' || ch == '=');\n}\n\nstatic void ColouriseKixDoc(Sci_PositionU startPos, Sci_Position length, int initStyle,\n                           WordList *keywordlists[], Accessor &styler) {\n\n\tWordList &keywords = *keywordlists[0];\n\tWordList &keywords2 = *keywordlists[1];\n\tWordList &keywords3 = *keywordlists[2];\n//\tWordList &keywords4 = *keywordlists[3];\n\n\tstyler.StartAt(startPos);\n\n\tStyleContext sc(startPos, length, initStyle, styler);\n\n\tfor (; sc.More(); sc.Forward()) {\n\n\t\tif (sc.state == SCE_KIX_COMMENT) {\n\t\t\tif (sc.atLineEnd) {\n\t\t\t\tsc.SetState(SCE_KIX_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_KIX_COMMENTSTREAM) {\n\t\t\tif (sc.ch == '/' && sc.chPrev == '*') {\n\t\t\t\tsc.ForwardSetState(SCE_KIX_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_KIX_STRING1) {\n\t\t\t// This is a doubles quotes string\n\t\t\tif (sc.ch == '\\\"') {\n\t\t\t\tsc.ForwardSetState(SCE_KIX_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_KIX_STRING2) {\n\t\t\t// This is a single quote string\n\t\t\tif (sc.ch == '\\'') {\n\t\t\t\tsc.ForwardSetState(SCE_KIX_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_KIX_NUMBER) {\n\t\t\tif (!IsADigit(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_KIX_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_KIX_VAR) {\n\t\t\tif (!IsAWordChar(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_KIX_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_KIX_MACRO) {\n\t\t\tif (!IsAWordChar(sc.ch) && !IsADigit(sc.ch)) {\n\t\t\t\tchar s[100];\n\t\t\t\tsc.GetCurrentLowered(s, sizeof(s));\n\n\t\t\t\tif (!keywords3.InList(&s[1])) {\n\t\t\t\t\tsc.ChangeState(SCE_KIX_DEFAULT);\n\t\t\t\t}\n\t\t\t\tsc.SetState(SCE_KIX_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_KIX_OPERATOR) {\n\t\t\tif (!IsOperator(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_KIX_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_KIX_IDENTIFIER) {\n\t\t\tif (!IsAWordChar(sc.ch)) {\n\t\t\t\tchar s[100];\n\t\t\t\tsc.GetCurrentLowered(s, sizeof(s));\n\n\t\t\t\tif (keywords.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_KIX_KEYWORD);\n\t\t\t\t} else if (keywords2.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_KIX_FUNCTIONS);\n\t\t\t\t}\n\t\t\t\tsc.SetState(SCE_KIX_DEFAULT);\n\t\t\t}\n\t\t}\n\n\t\t// Determine if a new state should be entered.\n\t\tif (sc.state == SCE_KIX_DEFAULT) {\n\t\t\tif (sc.ch == ';') {\n\t\t\t\tsc.SetState(SCE_KIX_COMMENT);\n\t\t\t} else if (sc.ch == '/' && sc.chNext == '*') {\n\t\t\t\tsc.SetState(SCE_KIX_COMMENTSTREAM);\n\t\t\t} else if (sc.ch == '\\\"') {\n\t\t\t\tsc.SetState(SCE_KIX_STRING1);\n\t\t\t} else if (sc.ch == '\\'') {\n\t\t\t\tsc.SetState(SCE_KIX_STRING2);\n\t\t\t} else if (sc.ch == '$') {\n\t\t\t\tsc.SetState(SCE_KIX_VAR);\n\t\t\t} else if (sc.ch == '@') {\n\t\t\t\tsc.SetState(SCE_KIX_MACRO);\n\t\t\t} else if (IsADigit(sc.ch) || ((sc.ch == '.' || sc.ch == '&') && IsADigit(sc.chNext))) {\n\t\t\t\tsc.SetState(SCE_KIX_NUMBER);\n\t\t\t} else if (IsOperator(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_KIX_OPERATOR);\n\t\t\t} else if (IsAWordChar(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_KIX_IDENTIFIER);\n\t\t\t}\n\t\t}\n\t}\n\tsc.Complete();\n}\n\n\nLexerModule lmKix(SCLEX_KIX, ColouriseKixDoc, \"kix\");\n\n"
  },
  {
    "path": "lexilla/lexers/LexLaTeX.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexLaTeX.cxx\n ** Lexer for LaTeX2e.\n  **/\n// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n// Modified by G. HU in 2013. Added folding, syntax highting inside math environments, and changed some minor behaviors.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n#include <vector>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"PropSetSimple.h\"\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n#include \"DefaultLexer.h\"\n#include \"LexerBase.h\"\n\nusing namespace Scintilla;\nusing namespace Lexilla;\n\nusing namespace std;\n\nstruct latexFoldSave {\n\tlatexFoldSave() : structLev(0) {\n\t\tfor (int i = 0; i < 8; ++i) openBegins[i] = 0;\n\t}\n\tlatexFoldSave(const latexFoldSave &save) : structLev(save.structLev) {\n\t\tfor (int i = 0; i < 8; ++i) openBegins[i] = save.openBegins[i];\n\t}\n\tlatexFoldSave &operator=(const latexFoldSave &save) {\n\t\tif (this != &save) {\n\t\t\tstructLev = save.structLev;\n\t\t\tfor (int i = 0; i < 8; ++i) openBegins[i] = save.openBegins[i];\n\t\t}\n\t\treturn *this;\n\t}\n\tint openBegins[8];\n\tSci_Position structLev;\n};\n\nclass LexerLaTeX : public LexerBase {\nprivate:\n\tvector<int> modes;\n\tvoid setMode(Sci_Position line, int mode) {\n\t\tif (line >= static_cast<Sci_Position>(modes.size())) modes.resize(line + 1, 0);\n\t\tmodes[line] = mode;\n\t}\n\tint getMode(Sci_Position line) {\n\t\tif (line >= 0 && line < static_cast<Sci_Position>(modes.size())) return modes[line];\n\t\treturn 0;\n\t}\n\tvoid truncModes(Sci_Position numLines) {\n\t\tif (static_cast<Sci_Position>(modes.size()) > numLines * 2 + 256)\n\t\t\tmodes.resize(numLines + 128);\n\t}\n\n\tvector<latexFoldSave> saves;\n\tvoid setSave(Sci_Position line, const latexFoldSave &save) {\n\t\tif (line >= static_cast<Sci_Position>(saves.size())) saves.resize(line + 1);\n\t\tsaves[line] = save;\n\t}\n\tvoid getSave(Sci_Position line, latexFoldSave &save) {\n\t\tif (line >= 0 && line < static_cast<Sci_Position>(saves.size())) save = saves[line];\n\t\telse {\n\t\t\tsave.structLev = 0;\n\t\t\tfor (int i = 0; i < 8; ++i) save.openBegins[i] = 0;\n\t\t}\n\t}\n\tvoid truncSaves(Sci_Position numLines) {\n\t\tif (static_cast<Sci_Position>(saves.size()) > numLines * 2 + 256)\n\t\t\tsaves.resize(numLines + 128);\n\t}\npublic:\n\tstatic ILexer5 *LexerFactoryLaTeX() {\n\t\treturn new LexerLaTeX();\n\t}\n\tvoid SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;\n\tvoid SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;\n\n\t// ILexer5 methods\n\tconst char * SCI_METHOD GetName() override {\n\t\treturn \"latex\";\n\t}\n\tint SCI_METHOD  GetIdentifier() override {\n\t\treturn SCLEX_LATEX;\n\t}\n};\n\nstatic bool latexIsSpecial(int ch) {\n\treturn (ch == '#') || (ch == '$') || (ch == '%') || (ch == '&') || (ch == '_') ||\n\t\t   (ch == '{') || (ch == '}') || (ch == ' ');\n}\n\nstatic bool latexIsBlank(int ch) {\n\treturn (ch == ' ') || (ch == '\\t');\n}\n\nstatic bool latexIsBlankAndNL(int ch) {\n\treturn (ch == ' ') || (ch == '\\t') || (ch == '\\r') || (ch == '\\n');\n}\n\nstatic bool latexIsLetter(int ch) {\n\treturn IsASCII(ch) && isalpha(ch);\n}\n\nstatic bool latexIsTagValid(Sci_Position &i, Sci_Position l, Accessor &styler) {\n\twhile (i < l) {\n\t\tif (styler.SafeGetCharAt(i) == '{') {\n\t\t\twhile (i < l) {\n\t\t\t\ti++;\n\t\t\t\tif (styler.SafeGetCharAt(i) == '}') {\n\t\t\t\t\treturn true;\n\t\t\t\t}\telse if (!latexIsLetter(styler.SafeGetCharAt(i)) &&\n                   styler.SafeGetCharAt(i)!='*') {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (!latexIsBlank(styler.SafeGetCharAt(i))) {\n\t\t\treturn false;\n\t\t}\n\t\ti++;\n\t}\n\treturn false;\n}\n\nstatic bool latexNextNotBlankIs(Sci_Position i, Accessor &styler, char needle) {\n  char ch;\n\twhile (i < styler.Length()) {\n    ch = styler.SafeGetCharAt(i);\n\t\tif (!latexIsBlankAndNL(ch) && ch != '*') {\n      if (ch == needle)\n        return true;\n      else\n        return false;\n\t\t}\n\t\ti++;\n\t}\n\treturn false;\n}\n\nstatic bool latexLastWordIs(Sci_Position start, Accessor &styler, const char *needle) {\n\tSci_PositionU i = 0;\n\tSci_PositionU l = static_cast<Sci_PositionU>(strlen(needle));\n\tSci_Position ini = start-l+1;\n\tchar s[32];\n\n\twhile (i < l && i < 31) {\n\t\ts[i] = styler.SafeGetCharAt(ini + i);\n\t\ti++;\n\t}\n\ts[i] = '\\0';\n\n\treturn (strcmp(s, needle) == 0);\n}\n\nstatic bool latexLastWordIsMathEnv(Sci_Position pos, Accessor &styler) {\n\tSci_Position i, j;\n\tchar s[32];\n\tconst char *mathEnvs[] = { \"align\", \"alignat\", \"flalign\", \"gather\",\n\t\t\"multiline\", \"displaymath\", \"eqnarray\", \"equation\" };\n\tif (styler.SafeGetCharAt(pos) != '}') return false;\n\tfor (i = pos - 1; i >= 0; --i) {\n\t\tif (styler.SafeGetCharAt(i) == '{') break;\n\t\tif (pos - i >= 20) return false;\n\t}\n\tif (i < 0 || i == pos - 1) return false;\n\t++i;\n\tfor (j = 0; i + j < pos; ++j)\n\t\ts[j] = styler.SafeGetCharAt(i + j);\n\ts[j] = '\\0';\n\tif (j == 0) return false;\n\tif (s[j - 1] == '*') s[--j] = '\\0';\n\tfor (i = 0; i < static_cast<int>(sizeof(mathEnvs) / sizeof(const char *)); ++i)\n\t\tif (strcmp(s, mathEnvs[i]) == 0) return true;\n\treturn false;\n}\n\nstatic inline void latexStateReset(int &mode, int &state) {\n\tswitch (mode) {\n\tcase 1:     state = SCE_L_MATH; break;\n\tcase 2:     state = SCE_L_MATH2; break;\n\tdefault:    state = SCE_L_DEFAULT; break;\n\t}\n}\n\n// There are cases not handled correctly, like $abcd\\textrm{what is $x+y$}z+w$.\n// But I think it's already good enough.\nvoid SCI_METHOD LexerLaTeX::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) {\n\t// startPos is assumed to be the first character of a line\n\tAccessor styler(pAccess, &props);\n\tstyler.StartAt(startPos);\n\tint mode = getMode(styler.GetLine(startPos) - 1);\n\tint state = initStyle;\n\tif (state == SCE_L_ERROR || state == SCE_L_SHORTCMD || state == SCE_L_SPECIAL)   // should not happen\n\t\tlatexStateReset(mode, state);\n\n\tchar chNext = styler.SafeGetCharAt(startPos);\n\tchar chVerbatimDelim = '\\0';\n\tstyler.StartSegment(startPos);\n\tSci_Position lengthDoc = startPos + length;\n\n\tfor (Sci_Position i = startPos; i < lengthDoc; i++) {\n\t\tchar ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\n\t\tif (styler.IsLeadByte(ch)) {\n\t\t\ti++;\n\t\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (ch == '\\r' || ch == '\\n')\n\t\t\tsetMode(styler.GetLine(i), mode);\n\n\t\tswitch (state) {\n\t\tcase SCE_L_DEFAULT :\n\t\t\tswitch (ch) {\n\t\t\tcase '\\\\' :\n\t\t\t\tstyler.ColourTo(i - 1, state);\n\t\t\t\tif (latexIsLetter(chNext)) {\n\t\t\t\t\tstate = SCE_L_COMMAND;\n\t\t\t\t} else if (latexIsSpecial(chNext)) {\n\t\t\t\t\tstyler.ColourTo(i + 1, SCE_L_SPECIAL);\n\t\t\t\t\ti++;\n\t\t\t\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\t\t\t} else if (chNext == '\\r' || chNext == '\\n') {\n\t\t\t\t\tstyler.ColourTo(i, SCE_L_ERROR);\n\t\t\t\t} else if (IsASCII(chNext)) {\n\t\t\t\t\tstyler.ColourTo(i + 1, SCE_L_SHORTCMD);\n\t\t\t\t\tif (chNext == '(') {\n\t\t\t\t\t\tmode = 1;\n\t\t\t\t\t\tstate = SCE_L_MATH;\n\t\t\t\t\t} else if (chNext == '[') {\n\t\t\t\t\t\tmode = 2;\n\t\t\t\t\t\tstate = SCE_L_MATH2;\n\t\t\t\t\t}\n\t\t\t\t\ti++;\n\t\t\t\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase '$' :\n\t\t\t\tstyler.ColourTo(i - 1, state);\n\t\t\t\tif (chNext == '$') {\n\t\t\t\t\tstyler.ColourTo(i + 1, SCE_L_SHORTCMD);\n\t\t\t\t\tmode = 2;\n\t\t\t\t\tstate = SCE_L_MATH2;\n\t\t\t\t\ti++;\n\t\t\t\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\t\t\t} else {\n\t\t\t\t\tstyler.ColourTo(i, SCE_L_SHORTCMD);\n\t\t\t\t\tmode = 1;\n\t\t\t\t\tstate = SCE_L_MATH;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase '%' :\n\t\t\t\tstyler.ColourTo(i - 1, state);\n\t\t\t\tstate = SCE_L_COMMENT;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbreak;\n\t\t// These 3 will never be reached.\n\t\tcase SCE_L_ERROR:\n\t\tcase SCE_L_SPECIAL:\n\t\tcase SCE_L_SHORTCMD:\n\t\t\tbreak;\n\t\tcase SCE_L_COMMAND :\n\t\t\tif (!latexIsLetter(chNext)) {\n\t\t\t\tstyler.ColourTo(i, state);\n\t\t\t\tif (latexNextNotBlankIs(i + 1, styler, '[' )) {\n\t\t\t\t\tstate = SCE_L_CMDOPT;\n\t\t\t\t} else if (latexLastWordIs(i, styler, \"\\\\begin\")) {\n\t\t\t\t\tstate = SCE_L_TAG;\n\t\t\t\t} else if (latexLastWordIs(i, styler, \"\\\\end\")) {\n\t\t\t\t\tstate = SCE_L_TAG2;\n\t\t\t\t} else if (latexLastWordIs(i, styler, \"\\\\verb\") && chNext != '*' && chNext != ' ') {\n\t\t\t\t\tchVerbatimDelim = chNext;\n\t\t\t\t\tstate = SCE_L_VERBATIM;\n\t\t\t\t} else {\n\t\t\t\t\tlatexStateReset(mode, state);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_L_CMDOPT :\n\t\t\tif (ch == ']') {\n\t\t\t\tstyler.ColourTo(i, state);\n\t\t\t\tlatexStateReset(mode, state);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_L_TAG :\n\t\t\tif (latexIsTagValid(i, lengthDoc, styler)) {\n\t\t\t\tstyler.ColourTo(i, state);\n\t\t\t\tlatexStateReset(mode, state);\n\t\t\t\tif (latexLastWordIs(i, styler, \"{verbatim}\")) {\n\t\t\t\t\tstate = SCE_L_VERBATIM;\n\t\t\t\t} else if (latexLastWordIs(i, styler, \"{lstlisting}\")) {\n\t\t\t\t\tstate = SCE_L_VERBATIM;\n\t\t\t\t} else if (latexLastWordIs(i, styler, \"{comment}\")) {\n\t\t\t\t\tstate = SCE_L_COMMENT2;\n\t\t\t\t} else if (latexLastWordIs(i, styler, \"{math}\") && mode == 0) {\n\t\t\t\t\tmode = 1;\n\t\t\t\t\tstate = SCE_L_MATH;\n\t\t\t\t} else if (latexLastWordIsMathEnv(i, styler) && mode == 0) {\n\t\t\t\t\tmode = 2;\n\t\t\t\t\tstate = SCE_L_MATH2;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tstyler.ColourTo(i, SCE_L_ERROR);\n\t\t\t\tlatexStateReset(mode, state);\n\t\t\t\tch = styler.SafeGetCharAt(i);\n\t\t\t\tif (ch == '\\r' || ch == '\\n') setMode(styler.GetLine(i), mode);\n\t\t\t}\n\t\t\tchNext = styler.SafeGetCharAt(i+1);\n\t\t\tbreak;\n\t\tcase SCE_L_TAG2 :\n\t\t\tif (latexIsTagValid(i, lengthDoc, styler)) {\n\t\t\t\tstyler.ColourTo(i, state);\n\t\t\t\tlatexStateReset(mode, state);\n\t\t\t} else {\n\t\t\t\tstyler.ColourTo(i, SCE_L_ERROR);\n\t\t\t\tlatexStateReset(mode, state);\n\t\t\t\tch = styler.SafeGetCharAt(i);\n\t\t\t\tif (ch == '\\r' || ch == '\\n') setMode(styler.GetLine(i), mode);\n\t\t\t}\n\t\t\tchNext = styler.SafeGetCharAt(i+1);\n\t\t\tbreak;\n\t\tcase SCE_L_MATH :\n\t\t\tswitch (ch) {\n\t\t\tcase '\\\\' :\n\t\t\t\tstyler.ColourTo(i - 1, state);\n\t\t\t\tif (latexIsLetter(chNext)) {\n\t\t\t\t\tSci_Position match = i + 3;\n\t\t\t\t\tif (latexLastWordIs(match, styler, \"\\\\end\")) {\n\t\t\t\t\t\tmatch++;\n\t\t\t\t\t\tif (latexIsTagValid(match, lengthDoc, styler)) {\n\t\t\t\t\t\t\tif (latexLastWordIs(match, styler, \"{math}\"))\n\t\t\t\t\t\t\t\tmode = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tstate = SCE_L_COMMAND;\n\t\t\t\t} else if (latexIsSpecial(chNext)) {\n\t\t\t\t\tstyler.ColourTo(i + 1, SCE_L_SPECIAL);\n\t\t\t\t\ti++;\n\t\t\t\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\t\t\t} else if (chNext == '\\r' || chNext == '\\n') {\n\t\t\t\t\tstyler.ColourTo(i, SCE_L_ERROR);\n\t\t\t\t} else if (IsASCII(chNext)) {\n\t\t\t\t\tif (chNext == ')') {\n\t\t\t\t\t\tmode = 0;\n\t\t\t\t\t\tstate = SCE_L_DEFAULT;\n\t\t\t\t\t}\n\t\t\t\t\tstyler.ColourTo(i + 1, SCE_L_SHORTCMD);\n\t\t\t\t\ti++;\n\t\t\t\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase '$' :\n\t\t\t\tstyler.ColourTo(i - 1, state);\n\t\t\t\tstyler.ColourTo(i, SCE_L_SHORTCMD);\n\t\t\t\tmode = 0;\n\t\t\t\tstate = SCE_L_DEFAULT;\n\t\t\t\tbreak;\n\t\t\tcase '%' :\n\t\t\t\tstyler.ColourTo(i - 1, state);\n\t\t\t\tstate = SCE_L_COMMENT;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_L_MATH2 :\n\t\t\tswitch (ch) {\n\t\t\tcase '\\\\' :\n\t\t\t\tstyler.ColourTo(i - 1, state);\n\t\t\t\tif (latexIsLetter(chNext)) {\n\t\t\t\t\tSci_Position match = i + 3;\n\t\t\t\t\tif (latexLastWordIs(match, styler, \"\\\\end\")) {\n\t\t\t\t\t\tmatch++;\n\t\t\t\t\t\tif (latexIsTagValid(match, lengthDoc, styler)) {\n\t\t\t\t\t\t\tif (latexLastWordIsMathEnv(match, styler))\n\t\t\t\t\t\t\t\tmode = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tstate = SCE_L_COMMAND;\n\t\t\t\t} else if (latexIsSpecial(chNext)) {\n\t\t\t\t\tstyler.ColourTo(i + 1, SCE_L_SPECIAL);\n\t\t\t\t\ti++;\n\t\t\t\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\t\t\t} else if (chNext == '\\r' || chNext == '\\n') {\n\t\t\t\t\tstyler.ColourTo(i, SCE_L_ERROR);\n\t\t\t\t} else if (IsASCII(chNext)) {\n\t\t\t\t\tif (chNext == ']') {\n\t\t\t\t\t\tmode = 0;\n\t\t\t\t\t\tstate = SCE_L_DEFAULT;\n\t\t\t\t\t}\n\t\t\t\t\tstyler.ColourTo(i + 1, SCE_L_SHORTCMD);\n\t\t\t\t\ti++;\n\t\t\t\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase '$' :\n\t\t\t\tstyler.ColourTo(i - 1, state);\n\t\t\t\tif (chNext == '$') {\n\t\t\t\t\tstyler.ColourTo(i + 1, SCE_L_SHORTCMD);\n\t\t\t\t\ti++;\n\t\t\t\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\t\t\t\tmode = 0;\n\t\t\t\t\tstate = SCE_L_DEFAULT;\n\t\t\t\t} else { // This may not be an error, e.g. \\begin{equation}\\text{$a$}\\end{equation}\n\t\t\t\t\tstyler.ColourTo(i, SCE_L_SHORTCMD);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase '%' :\n\t\t\t\tstyler.ColourTo(i - 1, state);\n\t\t\t\tstate = SCE_L_COMMENT;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_L_COMMENT :\n\t\t\tif (ch == '\\r' || ch == '\\n') {\n\t\t\t\tstyler.ColourTo(i - 1, state);\n\t\t\t\tlatexStateReset(mode, state);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_L_COMMENT2 :\n\t\t\tif (ch == '\\\\') {\n\t\t\t\tSci_Position match = i + 3;\n\t\t\t\tif (latexLastWordIs(match, styler, \"\\\\end\")) {\n\t\t\t\t\tmatch++;\n\t\t\t\t\tif (latexIsTagValid(match, lengthDoc, styler)) {\n\t\t\t\t\t\tif (latexLastWordIs(match, styler, \"{comment}\")) {\n\t\t\t\t\t\t\tstyler.ColourTo(i - 1, state);\n\t\t\t\t\t\t\tstate = SCE_L_COMMAND;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_L_VERBATIM :\n\t\t\tif (ch == '\\\\') {\n\t\t\t\tSci_Position match = i + 3;\n\t\t\t\tif (latexLastWordIs(match, styler, \"\\\\end\")) {\n\t\t\t\t\tmatch++;\n\t\t\t\t\tif (latexIsTagValid(match, lengthDoc, styler)) {\n\t\t\t\t\t\tif (latexLastWordIs(match, styler, \"{verbatim}\")) {\n\t\t\t\t\t\t\tstyler.ColourTo(i - 1, state);\n\t\t\t\t\t\t\tstate = SCE_L_COMMAND;\n\t\t\t\t\t\t} else if (latexLastWordIs(match, styler, \"{lstlisting}\")) {\n\t\t\t\t\t\t\tstyler.ColourTo(i - 1, state);\n\t\t\t\t\t\t\tstate = SCE_L_COMMAND;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (chNext == chVerbatimDelim) {\n\t\t\t\tstyler.ColourTo(i + 1, state);\n\t\t\t\tlatexStateReset(mode, state);\n\t\t\t\tchVerbatimDelim = '\\0';\n\t\t\t\ti++;\n\t\t\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\t\t} else if (chVerbatimDelim != '\\0' && (ch == '\\n' || ch == '\\r')) {\n\t\t\t\tstyler.ColourTo(i, SCE_L_ERROR);\n\t\t\t\tlatexStateReset(mode, state);\n\t\t\t\tchVerbatimDelim = '\\0';\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}\n\tif (lengthDoc == styler.Length()) truncModes(styler.GetLine(lengthDoc - 1));\n\tstyler.ColourTo(lengthDoc - 1, state);\n\tstyler.Flush();\n}\n\nstatic int latexFoldSaveToInt(const latexFoldSave &save) {\n\tint sum = 0;\n\tfor (int i = 0; i <= save.structLev; ++i)\n\t\tsum += save.openBegins[i];\n\treturn ((sum + save.structLev + SC_FOLDLEVELBASE) & SC_FOLDLEVELNUMBERMASK);\n}\n\n// Change folding state while processing a line\n// Return the level before the first relevant command\nvoid SCI_METHOD LexerLaTeX::Fold(Sci_PositionU startPos, Sci_Position length, int, IDocument *pAccess) {\n\tconst char *structWords[7] = {\"part\", \"chapter\", \"section\", \"subsection\",\n\t\t\"subsubsection\", \"paragraph\", \"subparagraph\"};\n\tAccessor styler(pAccess, &props);\n\tSci_PositionU endPos = startPos + length;\n\tSci_Position curLine = styler.GetLine(startPos);\n\tlatexFoldSave save;\n\tgetSave(curLine - 1, save);\n\tdo {\n\t\tchar ch, buf[16];\n\t\tSci_Position i, j;\n\t\tint lev = -1;\n\t\tbool needFold = false;\n\t\tfor (i = static_cast<Sci_Position>(startPos); i < static_cast<Sci_Position>(endPos); ++i) {\n\t\t\tch = styler.SafeGetCharAt(i);\n\t\t\tif (ch == '\\r' || ch == '\\n') break;\n\t\t\tif (ch != '\\\\' || styler.StyleAt(i) != SCE_L_COMMAND) continue;\n\t\t\tfor (j = 0; j < 15 && i + 1 < static_cast<Sci_Position>(endPos); ++j, ++i) {\n\t\t\t\tbuf[j] = styler.SafeGetCharAt(i + 1);\n\t\t\t\tif (!latexIsLetter(buf[j])) break;\n\t\t\t}\n\t\t\tbuf[j] = '\\0';\n\t\t\tif (strcmp(buf, \"begin\") == 0) {\n\t\t\t\tif (lev < 0) lev = latexFoldSaveToInt(save);\n\t\t\t\t++save.openBegins[save.structLev];\n\t\t\t\tneedFold = true;\n\t\t\t}\n\t\t\telse if (strcmp(buf, \"end\") == 0) {\n\t\t\t\twhile (save.structLev > 0 && save.openBegins[save.structLev] == 0)\n\t\t\t\t\t--save.structLev;\n\t\t\t\tif (lev < 0) lev = latexFoldSaveToInt(save);\n\t\t\t\tif (save.openBegins[save.structLev] > 0) --save.openBegins[save.structLev];\n\t\t\t}\n\t\t\telse {\n\t\t\t\tfor (j = 0; j < 7; ++j)\n\t\t\t\t\tif (strcmp(buf, structWords[j]) == 0) break;\n\t\t\t\tif (j >= 7) continue;\n\t\t\t\tsave.structLev = j;   // level before the command\n\t\t\t\tfor (j = save.structLev + 1; j < 8; ++j) {\n\t\t\t\t\tsave.openBegins[save.structLev] += save.openBegins[j];\n\t\t\t\t\tsave.openBegins[j] = 0;\n\t\t\t\t}\n\t\t\t\tif (lev < 0) lev = latexFoldSaveToInt(save);\n\t\t\t\t++save.structLev;   // level after the command\n\t\t\t\tneedFold = true;\n\t\t\t}\n\t\t}\n\t\tif (lev < 0) lev = latexFoldSaveToInt(save);\n\t\tif (needFold) lev |= SC_FOLDLEVELHEADERFLAG;\n\t\tstyler.SetLevel(curLine, lev);\n\t\tsetSave(curLine, save);\n\t\t++curLine;\n\t\tstartPos = styler.LineStart(curLine);\n\t\tif (static_cast<Sci_Position>(startPos) == styler.Length()) {\n\t\t\tlev = latexFoldSaveToInt(save);\n\t\t\tstyler.SetLevel(curLine, lev);\n\t\t\tsetSave(curLine, save);\n\t\t\ttruncSaves(curLine);\n\t\t}\n\t} while (startPos < endPos);\n\tstyler.Flush();\n}\n\nstatic const char *const emptyWordListDesc[] = {\n\t0\n};\n\nLexerModule lmLatex(SCLEX_LATEX, LexerLaTeX::LexerFactoryLaTeX, \"latex\", emptyWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexLisp.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexLisp.cxx\n ** Lexer for Lisp.\n ** Written by Alexey Yutkin.\n **/\n// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\n#define SCE_LISP_CHARACTER 29\n#define SCE_LISP_MACRO 30\n#define SCE_LISP_MACRO_DISPATCH 31\n\nstatic inline bool isLispoperator(char ch) {\n\tif (IsASCII(ch) && isalnum(ch))\n\t\treturn false;\n\tif (ch == '\\'' || ch == '`' || ch == '(' || ch == ')' || ch == '[' || ch == ']' || ch == '{' || ch == '}')\n\t\treturn true;\n\treturn false;\n}\n\nstatic inline bool isLispwordstart(char ch) {\n\treturn IsASCII(ch) && ch != ';'  && !isspacechar(ch) && !isLispoperator(ch) &&\n\t\tch != '\\n' && ch != '\\r' &&  ch != '\\\"';\n}\n\n\nstatic void classifyWordLisp(Sci_PositionU start, Sci_PositionU end, WordList &keywords, WordList &keywords_kw, Accessor &styler) {\n\tassert(end >= start);\n\tchar s[100];\n\tSci_PositionU i;\n\tbool digit_flag = true;\n\tfor (i = 0; (i < end - start + 1) && (i < 99); i++) {\n\t\ts[i] = styler[start + i];\n\t\ts[i + 1] = '\\0';\n\t\tif (!isdigit(s[i]) && (s[i] != '.')) digit_flag = false;\n\t}\n\tchar chAttr = SCE_LISP_IDENTIFIER;\n\n\tif(digit_flag) chAttr = SCE_LISP_NUMBER;\n\telse {\n\t\tif (keywords.InList(s)) {\n\t\t\tchAttr = SCE_LISP_KEYWORD;\n\t\t} else if (keywords_kw.InList(s)) {\n\t\t\tchAttr = SCE_LISP_KEYWORD_KW;\n\t\t} else if ((s[0] == '*' && s[i-1] == '*') ||\n\t\t\t   (s[0] == '+' && s[i-1] == '+')) {\n\t\t\tchAttr = SCE_LISP_SPECIAL;\n\t\t}\n\t}\n\tstyler.ColourTo(end, chAttr);\n\treturn;\n}\n\n\nstatic void ColouriseLispDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[],\n                            Accessor &styler) {\n\n\tWordList &keywords = *keywordlists[0];\n\tWordList &keywords_kw = *keywordlists[1];\n\n\tstyler.StartAt(startPos);\n\n\tint state = initStyle, radix = -1;\n\tchar chNext = styler[startPos];\n\tSci_PositionU lengthDoc = startPos + length;\n\tstyler.StartSegment(startPos);\n\tfor (Sci_PositionU i = startPos; i < lengthDoc; i++) {\n\t\tchar ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\n\t\tbool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n\n\t\tif (styler.IsLeadByte(ch)) {\n\t\t\tchNext = styler.SafeGetCharAt(i + 2);\n\t\t\ti += 1;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (state == SCE_LISP_DEFAULT) {\n\t\t\tif (ch == '#') {\n\t\t\t\tstyler.ColourTo(i - 1, state);\n\t\t\t\tradix = -1;\n\t\t\t\tstate = SCE_LISP_MACRO_DISPATCH;\n\t\t\t} else if (ch == ':' && isLispwordstart(chNext)) {\n\t\t\t\tstyler.ColourTo(i - 1, state);\n\t\t\t\tstate = SCE_LISP_SYMBOL;\n\t\t\t} else if (isLispwordstart(ch)) {\n\t\t\t\tstyler.ColourTo(i - 1, state);\n\t\t\t\tstate = SCE_LISP_IDENTIFIER;\n\t\t\t}\n\t\t\telse if (ch == ';') {\n\t\t\t\tstyler.ColourTo(i - 1, state);\n\t\t\t\tstate = SCE_LISP_COMMENT;\n\t\t\t}\n\t\t\telse if (isLispoperator(ch) || ch=='\\'') {\n\t\t\t\tstyler.ColourTo(i - 1, state);\n\t\t\t\tstyler.ColourTo(i, SCE_LISP_OPERATOR);\n\t\t\t\tif (ch=='\\'' && isLispwordstart(chNext)) {\n\t\t\t\t\tstate = SCE_LISP_SYMBOL;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (ch == '\\\"') {\n\t\t\t\tstyler.ColourTo(i - 1, state);\n\t\t\t\tstate = SCE_LISP_STRING;\n\t\t\t}\n\t\t} else if (state == SCE_LISP_IDENTIFIER || state == SCE_LISP_SYMBOL) {\n\t\t\tif (!isLispwordstart(ch)) {\n\t\t\t\tif (state == SCE_LISP_IDENTIFIER) {\n\t\t\t\t\tclassifyWordLisp(styler.GetStartSegment(), i - 1, keywords, keywords_kw, styler);\n\t\t\t\t} else {\n\t\t\t\t\tstyler.ColourTo(i - 1, state);\n\t\t\t\t}\n\t\t\t\tstate = SCE_LISP_DEFAULT;\n\t\t\t} /*else*/\n\t\t\tif (isLispoperator(ch) || ch=='\\'') {\n\t\t\t\tstyler.ColourTo(i - 1, state);\n\t\t\t\tstyler.ColourTo(i, SCE_LISP_OPERATOR);\n\t\t\t\tif (ch=='\\'' && isLispwordstart(chNext)) {\n\t\t\t\t\tstate = SCE_LISP_SYMBOL;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (state == SCE_LISP_MACRO_DISPATCH) {\n\t\t\tif (!(IsASCII(ch) && isdigit(ch))) {\n\t\t\t\tif (ch != 'r' && ch != 'R' && (i - styler.GetStartSegment()) > 1) {\n\t\t\t\t\tstate = SCE_LISP_DEFAULT;\n\t\t\t\t} else {\n\t\t\t\t\tswitch (ch) {\n\t\t\t\t\t\tcase '|': state = SCE_LISP_MULTI_COMMENT; break;\n\t\t\t\t\t\tcase 'o':\n\t\t\t\t\t\tcase 'O': radix = 8; state = SCE_LISP_MACRO; break;\n\t\t\t\t\t\tcase 'x':\n\t\t\t\t\t\tcase 'X': radix = 16; state = SCE_LISP_MACRO; break;\n\t\t\t\t\t\tcase 'b':\n\t\t\t\t\t\tcase 'B': radix = 2; state = SCE_LISP_MACRO; break;\n\t\t\t\t\t\tcase '\\\\': state = SCE_LISP_CHARACTER; break;\n\t\t\t\t\t\tcase ':':\n\t\t\t\t\t\tcase '-':\n\t\t\t\t\t\tcase '+': state = SCE_LISP_MACRO; break;\n\t\t\t\t\t\tcase '\\'': if (isLispwordstart(chNext)) {\n\t\t\t\t\t\t\t\t   state = SCE_LISP_SPECIAL;\n\t\t\t\t\t\t\t   } else {\n\t\t\t\t\t\t\t\t   styler.ColourTo(i - 1, SCE_LISP_DEFAULT);\n\t\t\t\t\t\t\t\t   styler.ColourTo(i, SCE_LISP_OPERATOR);\n\t\t\t\t\t\t\t\t   state = SCE_LISP_DEFAULT;\n\t\t\t\t\t\t\t   }\n\t\t\t\t\t\t\t   break;\n\t\t\t\t\t\tdefault: if (isLispoperator(ch)) {\n\t\t\t\t\t\t\t\t styler.ColourTo(i - 1, SCE_LISP_DEFAULT);\n\t\t\t\t\t\t\t\t styler.ColourTo(i, SCE_LISP_OPERATOR);\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t state = SCE_LISP_DEFAULT;\n\t\t\t\t\t\t\t break;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (state == SCE_LISP_MACRO) {\n\t\t\tif (isLispwordstart(ch) && (radix == -1 || IsADigit(ch, radix))) {\n\t\t\t\tstate = SCE_LISP_SPECIAL;\n\t\t\t} else {\n\t\t\t\tstate = SCE_LISP_DEFAULT;\n\t\t\t}\n\t\t} else if (state == SCE_LISP_CHARACTER) {\n\t\t\tif (isLispoperator(ch)) {\n\t\t\t\tstyler.ColourTo(i, SCE_LISP_SPECIAL);\n\t\t\t\tstate = SCE_LISP_DEFAULT;\n\t\t\t} else if (isLispwordstart(ch)) {\n\t\t\t\tstyler.ColourTo(i, SCE_LISP_SPECIAL);\n\t\t\t\tstate = SCE_LISP_SPECIAL;\n\t\t\t} else {\n\t\t\t\tstate = SCE_LISP_DEFAULT;\n\t\t\t}\n\t\t} else if (state == SCE_LISP_SPECIAL) {\n\t\t\tif (!isLispwordstart(ch) || (radix != -1 && !IsADigit(ch, radix))) {\n\t\t\t\tstyler.ColourTo(i - 1, state);\n\t\t\t\tstate = SCE_LISP_DEFAULT;\n\t\t\t}\n\t\t\tif (isLispoperator(ch) || ch=='\\'') {\n\t\t\t\tstyler.ColourTo(i - 1, state);\n\t\t\t\tstyler.ColourTo(i, SCE_LISP_OPERATOR);\n\t\t\t\tif (ch=='\\'' && isLispwordstart(chNext)) {\n\t\t\t\t\tstate = SCE_LISP_SYMBOL;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif (state == SCE_LISP_COMMENT) {\n\t\t\t\tif (atEOL) {\n\t\t\t\t\tstyler.ColourTo(i - 1, state);\n\t\t\t\t\tstate = SCE_LISP_DEFAULT;\n\t\t\t\t}\n\t\t\t} else if (state == SCE_LISP_MULTI_COMMENT) {\n\t\t\t\tif (ch == '|' && chNext == '#') {\n\t\t\t\t\ti++;\n\t\t\t\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\t\t\t\tstyler.ColourTo(i, state);\n\t\t\t\t\tstate = SCE_LISP_DEFAULT;\n\t\t\t\t}\n\t\t\t} else if (state == SCE_LISP_STRING) {\n\t\t\t\tif (ch == '\\\\') {\n\t\t\t\t\tif (chNext == '\\\"' || chNext == '\\'' || chNext == '\\\\') {\n\t\t\t\t\t\ti++;\n\t\t\t\t\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\t\t\t\t}\n\t\t\t\t} else if (ch == '\\\"') {\n\t\t\t\t\tstyler.ColourTo(i, state);\n\t\t\t\t\tstate = SCE_LISP_DEFAULT;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}\n\tstyler.ColourTo(lengthDoc - 1, state);\n}\n\nstatic void FoldLispDoc(Sci_PositionU startPos, Sci_Position length, int /* initStyle */, WordList *[],\n                            Accessor &styler) {\n\tSci_PositionU lengthDoc = startPos + length;\n\tint visibleChars = 0;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tint levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK;\n\tint levelCurrent = levelPrev;\n\tchar chNext = styler[startPos];\n\tint styleNext = styler.StyleAt(startPos);\n\tfor (Sci_PositionU i = startPos; i < lengthDoc; i++) {\n\t\tchar ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\tint style = styleNext;\n\t\tstyleNext = styler.StyleAt(i + 1);\n\t\tbool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n\t\tif (style == SCE_LISP_OPERATOR) {\n\t\t\tif (ch == '(' || ch == '[' || ch == '{') {\n\t\t\t\tlevelCurrent++;\n\t\t\t} else if (ch == ')' || ch == ']' || ch == '}') {\n\t\t\t\tlevelCurrent--;\n\t\t\t}\n\t\t}\n\t\tif (atEOL) {\n\t\t\tint lev = levelPrev;\n\t\t\tif (visibleChars == 0)\n\t\t\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\t\t\tif ((levelCurrent > levelPrev) && (visibleChars > 0))\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\tif (lev != styler.LevelAt(lineCurrent)) {\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\t\t\t}\n\t\t\tlineCurrent++;\n\t\t\tlevelPrev = levelCurrent;\n\t\t\tvisibleChars = 0;\n\t\t}\n\t\tif (!isspacechar(ch))\n\t\t\tvisibleChars++;\n\t}\n\t// Fill in the real level of the next line, keeping the current flags as they will be filled in later\n\tint flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK;\n\tstyler.SetLevel(lineCurrent, levelPrev | flagsNext);\n}\n\nstatic const char * const lispWordListDesc[] = {\n\t\"Functions and special operators\",\n\t\"Keywords\",\n\t0\n};\n\nLexerModule lmLISP(SCLEX_LISP, ColouriseLispDoc, \"lisp\", FoldLispDoc, lispWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexLout.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexLout.cxx\n ** Lexer for the Basser Lout (>= version 3) typesetting language\n **/\n// Copyright 2003 by Kein-Hong Man <mkh@pl.jaring.my>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nstatic inline bool IsAWordChar(const int ch) {\n\treturn (ch < 0x80) && (isalpha(ch) || ch == '@' || ch == '_');\n}\n\nstatic inline bool IsAnOther(const int ch) {\n\treturn (ch < 0x80) && (ch == '{' || ch == '}' ||\n\tch == '!' || ch == '$' || ch == '%' || ch == '&' || ch == '\\'' ||\n\tch == '(' || ch == ')' || ch == '*' || ch == '+' || ch == ',' ||\n\tch == '-' || ch == '.' || ch == '/' || ch == ':' || ch == ';' ||\n\tch == '<' || ch == '=' || ch == '>' || ch == '?' || ch == '[' ||\n\tch == ']' || ch == '^' || ch == '`' || ch == '|' || ch == '~');\n}\n\nstatic void ColouriseLoutDoc(Sci_PositionU startPos, Sci_Position length, int initStyle,\n\t\t\t     WordList *keywordlists[], Accessor &styler) {\n\n\tWordList &keywords = *keywordlists[0];\n\tWordList &keywords2 = *keywordlists[1];\n\tWordList &keywords3 = *keywordlists[2];\n\n\tint visibleChars = 0;\n\tint firstWordInLine = 0;\n\tint leadingAtSign = 0;\n\n\tStyleContext sc(startPos, length, initStyle, styler);\n\n\tfor (; sc.More(); sc.Forward()) {\n\n\t\tif (sc.atLineStart && (sc.state == SCE_LOUT_STRING)) {\n\t\t\t// Prevent SCE_LOUT_STRINGEOL from leaking back to previous line\n\t\t\tsc.SetState(SCE_LOUT_STRING);\n\t\t}\n\n\t\t// Determine if the current state should terminate.\n\t\tif (sc.state == SCE_LOUT_COMMENT) {\n\t\t\tif (sc.atLineEnd) {\n\t\t\t\tsc.SetState(SCE_LOUT_DEFAULT);\n\t\t\t\tvisibleChars = 0;\n\t\t\t}\n\t\t} else if (sc.state == SCE_LOUT_NUMBER) {\n\t\t\tif (!IsADigit(sc.ch) && sc.ch != '.') {\n\t\t\t\tsc.SetState(SCE_LOUT_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_LOUT_STRING) {\n\t\t\tif (sc.ch == '\\\\') {\n\t\t\t\tif (sc.chNext == '\\\"' || sc.chNext == '\\\\') {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t}\n\t\t\t} else if (sc.ch == '\\\"') {\n\t\t\t\tsc.ForwardSetState(SCE_LOUT_DEFAULT);\n\t\t\t} else if (sc.atLineEnd) {\n\t\t\t\tsc.ChangeState(SCE_LOUT_STRINGEOL);\n\t\t\t\tsc.ForwardSetState(SCE_LOUT_DEFAULT);\n\t\t\t\tvisibleChars = 0;\n\t\t\t}\n\t\t} else if (sc.state == SCE_LOUT_IDENTIFIER) {\n\t\t\tif (!IsAWordChar(sc.ch)) {\n\t\t\t\tchar s[100];\n\t\t\t\tsc.GetCurrent(s, sizeof(s));\n\n\t\t\t\tif (leadingAtSign) {\n\t\t\t\t\tif (keywords.InList(s)) {\n\t\t\t\t\t\tsc.ChangeState(SCE_LOUT_WORD);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsc.ChangeState(SCE_LOUT_WORD4);\n\t\t\t\t\t}\n\t\t\t\t} else if (firstWordInLine && keywords3.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_LOUT_WORD3);\n\t\t\t\t}\n\t\t\t\tsc.SetState(SCE_LOUT_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_LOUT_OPERATOR) {\n\t\t\tif (!IsAnOther(sc.ch)) {\n\t\t\t\tchar s[100];\n\t\t\t\tsc.GetCurrent(s, sizeof(s));\n\n\t\t\t\tif (keywords2.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_LOUT_WORD2);\n\t\t\t\t}\n\t\t\t\tsc.SetState(SCE_LOUT_DEFAULT);\n\t\t\t}\n\t\t}\n\n\t\t// Determine if a new state should be entered.\n\t\tif (sc.state == SCE_LOUT_DEFAULT) {\n\t\t\tif (sc.ch == '#') {\n\t\t\t\tsc.SetState(SCE_LOUT_COMMENT);\n\t\t\t} else if (sc.ch == '\\\"') {\n\t\t\t\tsc.SetState(SCE_LOUT_STRING);\n\t\t\t} else if (IsADigit(sc.ch) ||\n\t\t\t\t  (sc.ch == '.' && IsADigit(sc.chNext))) {\n\t\t\t\tsc.SetState(SCE_LOUT_NUMBER);\n\t\t\t} else if (IsAWordChar(sc.ch)) {\n\t\t\t\tfirstWordInLine = (visibleChars == 0);\n\t\t\t\tleadingAtSign = (sc.ch == '@');\n\t\t\t\tsc.SetState(SCE_LOUT_IDENTIFIER);\n\t\t\t} else if (IsAnOther(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_LOUT_OPERATOR);\n\t\t\t}\n\t\t}\n\n\t\tif (sc.atLineEnd) {\n\t\t\t// Reset states to begining of colourise so no surprises\n\t\t\t// if different sets of lines lexed.\n\t\t\tvisibleChars = 0;\n\t\t}\n\t\tif (!IsASpace(sc.ch)) {\n\t\t\tvisibleChars++;\n\t\t}\n\t}\n\tsc.Complete();\n}\n\nstatic void FoldLoutDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[],\n                        Accessor &styler) {\n\n\tSci_PositionU endPos = startPos + length;\n\tint visibleChars = 0;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tint levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK;\n\tint levelCurrent = levelPrev;\n\tchar chNext = styler[startPos];\n\tbool foldCompact = styler.GetPropertyInt(\"fold.compact\", 1) != 0;\n\tint styleNext = styler.StyleAt(startPos);\n\tchar s[10] = \"\";\n\n\tfor (Sci_PositionU i = startPos; i < endPos; i++) {\n\t\tchar ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\tint style = styleNext;\n\t\tstyleNext = styler.StyleAt(i + 1);\n\t\tbool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n\n\t\tif (style == SCE_LOUT_WORD) {\n\t\t\tif (ch == '@') {\n\t\t\t\tfor (Sci_PositionU j = 0; j < 8; j++) {\n\t\t\t\t\tif (!IsAWordChar(styler[i + j])) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\ts[j] = styler[i + j];\n\t\t\t\t\ts[j + 1] = '\\0';\n\t\t\t\t}\n\t\t\t\tif (strcmp(s, \"@Begin\") == 0) {\n\t\t\t\t\tlevelCurrent++;\n\t\t\t\t} else if (strcmp(s, \"@End\") == 0) {\n\t\t\t\t\tlevelCurrent--;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (style == SCE_LOUT_OPERATOR) {\n\t\t\tif (ch == '{') {\n\t\t\t\tlevelCurrent++;\n\t\t\t} else if (ch == '}') {\n\t\t\t\tlevelCurrent--;\n\t\t\t}\n\t\t}\n\t\tif (atEOL) {\n\t\t\tint lev = levelPrev;\n\t\t\tif (visibleChars == 0 && foldCompact) {\n\t\t\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\t\t\t}\n\t\t\tif ((levelCurrent > levelPrev) && (visibleChars > 0)) {\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\t}\n\t\t\tif (lev != styler.LevelAt(lineCurrent)) {\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\t\t\t}\n\t\t\tlineCurrent++;\n\t\t\tlevelPrev = levelCurrent;\n\t\t\tvisibleChars = 0;\n\t\t}\n\t\tif (!isspacechar(ch))\n\t\t\tvisibleChars++;\n\t}\n\t// Fill in the real level of the next line, keeping the current flags as they will be filled in later\n\tint flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK;\n\tstyler.SetLevel(lineCurrent, levelPrev | flagsNext);\n}\n\nstatic const char * const loutWordLists[] = {\n            \"Predefined identifiers\",\n            \"Predefined delimiters\",\n            \"Predefined keywords\",\n            0,\n        };\n\nLexerModule lmLout(SCLEX_LOUT, ColouriseLoutDoc, \"lout\", FoldLoutDoc, loutWordLists);\n"
  },
  {
    "path": "lexilla/lexers/LexLua.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexLua.cxx\n ** Lexer for Lua language.\n **\n ** Written by Paul Winwood.\n ** Folder by Alexey Yutkin.\n ** Modified by Marcos E. Wurzius & Philippe Lhoste\n **/\n\n#include <cstdlib>\n#include <cassert>\n#include <cstring>\n\n#include <string>\n#include <string_view>\n#include <vector>\n#include <map>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n#include \"OptionSet.h\"\n#include \"SubStyles.h\"\n#include \"DefaultLexer.h\"\n\nusing namespace Scintilla;\nusing namespace Lexilla;\n\nnamespace {\n\n// Test for [=[ ... ]=] delimiters, returns 0 if it's only a [ or ],\n// return 1 for [[ or ]], returns >=2 for [=[ or ]=] and so on.\n// The maximum number of '=' characters allowed is 254.\nint LongDelimCheck(StyleContext &sc) {\n\tint sep = 1;\n\twhile (sc.GetRelative(sep) == '=' && sep < 0xFF)\n\t\tsep++;\n\tif (sc.GetRelative(sep) == sc.ch)\n\t\treturn sep;\n\treturn 0;\n}\n\nconst char *const luaWordListDesc[] = {\n\t\"Keywords\",\n\t\"Basic functions\",\n\t\"String, (table) & math functions\",\n\t\"(coroutines), I/O & system facilities\",\n\t\"user1\",\n\t\"user2\",\n\t\"user3\",\n\t\"user4\",\n\tnullptr\n};\n\nconst char styleSubable[] = { SCE_LUA_IDENTIFIER, 0 };\n\nconst LexicalClass lexicalClasses[] = {\n\t// Lexer Lua SCLEX_LUA SCE_LUA_:\n\t0, \"SCE_LUA_DEFAULT\", \"default\", \"White space: Visible only in View Whitespace mode (or if it has a back colour)\",\n\t1, \"SCE_LUA_COMMENT\", \"comment\", \"Block comment (Lua 5.0)\",\n\t2, \"SCE_LUA_COMMENTLINE\", \"comment line\", \"Line comment\",\n\t3, \"SCE_LUA_COMMENTDOC\", \"comment documentation\", \"Doc comment\",\n\t4, \"SCE_LUA_NUMBER\", \"literal numeric\", \"Number\",\n\t5, \"SCE_LUA_WORD\", \"keyword\", \"Keyword\",\n\t6, \"SCE_LUA_STRING\", \"literal string\", \"(Double quoted) String\",\n\t7, \"SCE_LUA_CHARACTER\", \"literal string character\", \"Character (Single quoted string)\",\n\t8, \"SCE_LUA_LITERALSTRING\", \"literal string\", \"Literal string\",\n\t9, \"SCE_LUA_PREPROCESSOR\", \"preprocessor\", \"Preprocessor (obsolete in Lua 4.0 and up)\",\n\t10, \"SCE_LUA_OPERATOR\", \"operator\", \"Operators\",\n\t11, \"SCE_LUA_IDENTIFIER\", \"identifier\", \"Identifier (everything else...)\",\n\t12, \"SCE_LUA_STRINGEOL\", \"error literal string\", \"End of line where string is not closed\",\n\t13, \"SCE_LUA_WORD2\", \"identifier\", \"Other keywords\",\n\t14, \"SCE_LUA_WORD3\", \"identifier\", \"Other keywords\",\n\t15, \"SCE_LUA_WORD4\", \"identifier\", \"Other keywords\",\n\t16, \"SCE_LUA_WORD5\", \"identifier\", \"Other keywords\",\n\t17, \"SCE_LUA_WORD6\", \"identifier\", \"Other keywords\",\n\t18, \"SCE_LUA_WORD7\", \"identifier\", \"Other keywords\",\n\t19, \"SCE_LUA_WORD8\", \"identifier\", \"Other keywords\",\n\t20, \"SCE_LUA_LABEL\", \"label\", \"Labels\",\n};\n\n// Options used for LexerLua\nstruct OptionsLua {\n\tbool foldCompact = true;\n};\n\nstruct OptionSetLua : public OptionSet<OptionsLua> {\n\tOptionSetLua() {\n\t\tDefineProperty(\"fold.compact\", &OptionsLua::foldCompact);\n\n\t\tDefineWordListSets(luaWordListDesc);\n\t}\n};\n\nclass LexerLua : public DefaultLexer {\n\tWordList keywords;\n\tWordList keywords2;\n\tWordList keywords3;\n\tWordList keywords4;\n\tWordList keywords5;\n\tWordList keywords6;\n\tWordList keywords7;\n\tWordList keywords8;\n\tOptionsLua options;\n\tOptionSetLua osLua;\n\tSubStyles subStyles{styleSubable};\npublic:\n\texplicit LexerLua() :\n\t\tDefaultLexer(\"lua\", SCLEX_LUA, lexicalClasses, std::size(lexicalClasses)) {\n\t}\n\t~LexerLua() override = default;\n\tvoid SCI_METHOD Release() noexcept override {\n\t\tdelete this;\n\t}\n\tint SCI_METHOD Version() const noexcept override {\n\t\treturn lvRelease5;\n\t}\n\tconst char *SCI_METHOD PropertyNames() noexcept override {\n\t\treturn osLua.PropertyNames();\n\t}\n\tint SCI_METHOD PropertyType(const char *name) override {\n\t\treturn osLua.PropertyType(name);\n\t}\n\tconst char *SCI_METHOD DescribeProperty(const char *name) override {\n\t\treturn osLua.DescribeProperty(name);\n\t}\n\tSci_Position SCI_METHOD PropertySet(const char *key, const char *val) override;\n\tconst char *SCI_METHOD PropertyGet(const char *key) override {\n\t\treturn osLua.PropertyGet(key);\n\t}\n\tconst char *SCI_METHOD DescribeWordListSets() noexcept override {\n\t\treturn osLua.DescribeWordListSets();\n\t}\n\tSci_Position SCI_METHOD WordListSet(int n, const char *wl) override;\n\tvoid SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;\n\tvoid SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;\n\n\tint SCI_METHOD AllocateSubStyles(int styleBase, int numberStyles) override {\n\t\treturn subStyles.Allocate(styleBase, numberStyles);\n\t}\n\tint SCI_METHOD SubStylesStart(int styleBase) override {\n\t\treturn subStyles.Start(styleBase);\n\t}\n\tint SCI_METHOD SubStylesLength(int styleBase) override {\n\t\treturn subStyles.Length(styleBase);\n\t}\n\tint SCI_METHOD StyleFromSubStyle(int subStyle) override {\n\t\tconst int styleBase = subStyles.BaseStyle(subStyle);\n\t\treturn styleBase;\n\t}\n\tint SCI_METHOD PrimaryStyleFromStyle(int style) override {\n\t\treturn style;\n\t}\n\tvoid SCI_METHOD FreeSubStyles() override {\n\t\tsubStyles.Free();\n\t}\n\tvoid SCI_METHOD SetIdentifiers(int style, const char *identifiers) override {\n\t\tsubStyles.SetIdentifiers(style, identifiers);\n\t}\n\tint SCI_METHOD DistanceToSecondaryStyles() override {\n\t\treturn 0;\n\t}\n\tconst char *SCI_METHOD GetSubStyleBases() override {\n\t\treturn styleSubable;\n\t}\n\n\tstatic ILexer5 *LexerFactoryLua() {\n\t\treturn new LexerLua();\n\t}\n};\n\nSci_Position SCI_METHOD LexerLua::PropertySet(const char *key, const char *val) {\n\tif (osLua.PropertySet(&options, key, val)) {\n\t\treturn 0;\n\t}\n\treturn -1;\n}\n\nSci_Position SCI_METHOD LexerLua::WordListSet(int n, const char *wl) {\n\tWordList *wordListN = nullptr;\n\tswitch (n) {\n\tcase 0:\n\t\twordListN = &keywords;\n\t\tbreak;\n\tcase 1:\n\t\twordListN = &keywords2;\n\t\tbreak;\n\tcase 2:\n\t\twordListN = &keywords3;\n\t\tbreak;\n\tcase 3:\n\t\twordListN = &keywords4;\n\t\tbreak;\n\tcase 4:\n\t\twordListN = &keywords5;\n\t\tbreak;\n\tcase 5:\n\t\twordListN = &keywords6;\n\t\tbreak;\n\tcase 6:\n\t\twordListN = &keywords7;\n\t\tbreak;\n\tcase 7:\n\t\twordListN = &keywords8;\n\t\tbreak;\n\tdefault:\n\t\tbreak;\n\t}\n\tSci_Position firstModification = -1;\n\tif (wordListN) {\n\t\tif (wordListN->Set(wl)) {\n\t\t\tfirstModification = 0;\n\t\t}\n\t}\n\treturn firstModification;\n}\n\nconstexpr int maskSeparator = 0xFF;\nconstexpr int maskStringWs = 0x100;\nconstexpr int maskDocComment = 0x200;\n\nvoid LexerLua::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) {\n\tLexAccessor styler(pAccess);\n\n\t// Accepts accented characters\n\tconst CharacterSet setWordStart(CharacterSet::setAlpha, \"_\", true);\n\tconst CharacterSet setWord(CharacterSet::setAlphaNum, \"_\", true);\n\t// Not exactly following number definition (several dots are seen as OK, etc.)\n\t// but probably enough in most cases. [pP] is for hex floats.\n\tconst CharacterSet setNumber(CharacterSet::setDigits, \".-+abcdefpABCDEFP\");\n\tconst CharacterSet setExponent(\"eEpP\");\n\tconst CharacterSet setLuaOperator(\"*/-+()={}~[];<>,.^%:#&|\");\n\tconst CharacterSet setEscapeSkip(\"\\\"'\\\\\");\n\n\tconst WordClassifier &classifierIdentifiers = subStyles.Classifier(SCE_LUA_IDENTIFIER);\n\n\tSci_Position currentLine = styler.GetLine(startPos);\n\t// Initialize long string [[ ... ]] or block comment --[[ ... ]],\n\t// if we are inside such a string. Block comment was introduced in Lua 5.0,\n\t// blocks with separators [=[ ... ]=] in Lua 5.1.\n\t// Continuation of a string (\\z whitespace escaping) is controlled by stringWs.\n\tint sepCount = 0;\n\tint stringWs = 0;\n\tint lastLineDocComment = 0;\n\tif ((currentLine > 0) &&\n\t\tAnyOf(initStyle, SCE_LUA_DEFAULT, SCE_LUA_LITERALSTRING, SCE_LUA_COMMENT, SCE_LUA_COMMENTDOC, SCE_LUA_STRING, SCE_LUA_CHARACTER)) {\n\t\tconst int lineState = styler.GetLineState(currentLine - 1);\n\t\tsepCount = lineState & maskSeparator;\n\t\tstringWs = lineState & maskStringWs;\n\t\tlastLineDocComment = lineState & maskDocComment;\n\t}\n\n\t// results of identifier/keyword matching\n\tSci_Position idenPos = 0;\n\tSci_Position idenWordPos = 0;\n\tint idenStyle = SCE_LUA_IDENTIFIER;\n\tbool foundGoto = false;\n\n\t// Do not leak onto next line\n\tif (AnyOf(initStyle, SCE_LUA_STRINGEOL, SCE_LUA_COMMENTLINE, SCE_LUA_COMMENTDOC, SCE_LUA_PREPROCESSOR)) {\n\t\tinitStyle = SCE_LUA_DEFAULT;\n\t}\n\n\tStyleContext sc(startPos, length, initStyle, styler);\n\tif (startPos == 0 && sc.ch == '#' && sc.chNext == '!') {\n\t\t// shbang line: \"#!\" is a comment only if located at the start of the script\n\t\tsc.SetState(SCE_LUA_COMMENTLINE);\n\t}\n\tfor (; sc.More(); sc.Forward()) {\n\t\tif (sc.atLineEnd) {\n\t\t\t// Update the line state, so it can be seen by next line\n\t\t\tcurrentLine = styler.GetLine(sc.currentPos);\n\t\t\tswitch (sc.state) {\n\t\t\tcase SCE_LUA_DEFAULT:\n\t\t\tcase SCE_LUA_LITERALSTRING:\n\t\t\tcase SCE_LUA_COMMENT:\n\t\t\tcase SCE_LUA_COMMENTDOC:\n\t\t\tcase SCE_LUA_STRING:\n\t\t\tcase SCE_LUA_CHARACTER:\n\t\t\t\t// Inside a literal string, block comment or string, we set the line state\n\t\t\t\tstyler.SetLineState(currentLine, lastLineDocComment | stringWs | sepCount);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t// Reset the line state\n\t\t\t\tstyler.SetLineState(currentLine, 0);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (sc.atLineStart && (sc.state == SCE_LUA_STRING)) {\n\t\t\t// Prevent SCE_LUA_STRINGEOL from leaking back to previous line\n\t\t\tsc.SetState(SCE_LUA_STRING);\n\t\t}\n\n\t\t// Handle string line continuation\n\t\tif ((sc.state == SCE_LUA_STRING || sc.state == SCE_LUA_CHARACTER) &&\n\t\t\t\tsc.ch == '\\\\') {\n\t\t\tif (sc.chNext == '\\n' || sc.chNext == '\\r') {\n\t\t\t\tsc.Forward();\n\t\t\t\tif (sc.ch == '\\r' && sc.chNext == '\\n') {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\t// Determine if the current state should terminate.\n\t\tif (sc.state == SCE_LUA_OPERATOR) {\n\t\t\tif (sc.ch == ':' && sc.chPrev == ':') {\t// :: <label> :: forward scan\n\t\t\t\tsc.Forward();\n\t\t\t\tSci_Position ln = 0;\n\t\t\t\twhile (IsASpaceOrTab(sc.GetRelative(ln)))\t// skip over spaces/tabs\n\t\t\t\t\tln++;\n\t\t\t\tconst Sci_Position ws1 = ln;\n\t\t\t\tif (setWordStart.Contains(sc.GetRelative(ln))) {\n\t\t\t\t\tint c = 0;\n\t\t\t\t\tstd::string s;\n\t\t\t\t\twhile (setWord.Contains(c = sc.GetRelative(ln))) {\t// get potential label\n\t\t\t\t\t\ts.push_back(static_cast<char>(c));\n\t\t\t\t\t\tln++;\n\t\t\t\t\t}\n\t\t\t\t\tconst Sci_Position lbl = ln;\n\t\t\t\t\tif (!keywords.InList(s)) {\n\t\t\t\t\t\twhile (IsASpaceOrTab(sc.GetRelative(ln)))\t// skip over spaces/tabs\n\t\t\t\t\t\t\tln++;\n\t\t\t\t\t\tconst Sci_Position ws2 = ln - lbl;\n\t\t\t\t\t\tif (sc.GetRelative(ln) == ':' && sc.GetRelative(ln + 1) == ':') {\n\t\t\t\t\t\t\t// final :: found, complete valid label construct\n\t\t\t\t\t\t\tsc.ChangeState(SCE_LUA_LABEL);\n\t\t\t\t\t\t\tif (ws1) {\n\t\t\t\t\t\t\t\tsc.SetState(SCE_LUA_DEFAULT);\n\t\t\t\t\t\t\t\tsc.ForwardBytes(ws1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsc.SetState(SCE_LUA_LABEL);\n\t\t\t\t\t\t\tsc.ForwardBytes(lbl - ws1);\n\t\t\t\t\t\t\tif (ws2) {\n\t\t\t\t\t\t\t\tsc.SetState(SCE_LUA_DEFAULT);\n\t\t\t\t\t\t\t\tsc.ForwardBytes(ws2);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsc.SetState(SCE_LUA_LABEL);\n\t\t\t\t\t\t\tsc.ForwardBytes(2);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tsc.SetState(SCE_LUA_DEFAULT);\n\t\t} else if (sc.state == SCE_LUA_NUMBER) {\n\t\t\t// We stop the number definition on non-numerical non-dot non-eEpP non-sign non-hexdigit char\n\t\t\tif (!setNumber.Contains(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_LUA_DEFAULT);\n\t\t\t} else if (sc.ch == '-' || sc.ch == '+') {\n\t\t\t\tif (!setExponent.Contains(sc.chPrev))\n\t\t\t\t\tsc.SetState(SCE_LUA_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_LUA_IDENTIFIER) {\n\t\t\tidenPos--;\t\t\t// commit already-scanned identifier/word parts\n\t\t\tif (idenWordPos > 0) {\n\t\t\t\tidenWordPos--;\n\t\t\t\tsc.ChangeState(idenStyle);\n\t\t\t\tsc.ForwardBytes(idenWordPos);\n\t\t\t\tidenPos -= idenWordPos;\n\t\t\t\tif (idenPos > 0) {\n\t\t\t\t\tsc.SetState(SCE_LUA_IDENTIFIER);\n\t\t\t\t\tsc.ForwardBytes(idenPos);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tsc.ForwardBytes(idenPos);\n\t\t\t}\n\t\t\tsc.SetState(SCE_LUA_DEFAULT);\n\t\t\tif (foundGoto) {\t\t\t\t\t// goto <label> forward scan\n\t\t\t\twhile (IsASpaceOrTab(sc.ch) && !sc.atLineEnd)\n\t\t\t\t\tsc.Forward();\n\t\t\t\tif (setWordStart.Contains(sc.ch)) {\n\t\t\t\t\tsc.SetState(SCE_LUA_LABEL);\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\twhile (setWord.Contains(sc.ch))\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\tstd::string s;\n\t\t\t\t\tsc.GetCurrentString(s, StyleContext::Transform::none);\n\t\t\t\t\tif (keywords.InList(s))\t\t// labels cannot be keywords\n\t\t\t\t\t\tsc.ChangeState(SCE_LUA_WORD);\n\t\t\t\t}\n\t\t\t\tsc.SetState(SCE_LUA_DEFAULT);\n\t\t\t}\n\t\t} else if (AnyOf(sc.state, SCE_LUA_COMMENTLINE, SCE_LUA_COMMENTDOC, SCE_LUA_PREPROCESSOR)) {\n\t\t\tif (sc.atLineEnd) {\n\t\t\t\tsc.ForwardSetState(SCE_LUA_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_LUA_STRING) {\n\t\t\tif (stringWs) {\n\t\t\t\tif (!IsASpace(sc.ch))\n\t\t\t\t\tstringWs = 0;\n\t\t\t}\n\t\t\tif (sc.ch == '\\\\') {\n\t\t\t\tif (setEscapeSkip.Contains(sc.chNext)) {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t} else if (sc.chNext == 'z') {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\tstringWs = maskStringWs;\n\t\t\t\t}\n\t\t\t} else if (sc.ch == '\\\"') {\n\t\t\t\tsc.ForwardSetState(SCE_LUA_DEFAULT);\n\t\t\t} else if (stringWs == 0 && sc.atLineEnd) {\n\t\t\t\tsc.ChangeState(SCE_LUA_STRINGEOL);\n\t\t\t\tsc.ForwardSetState(SCE_LUA_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_LUA_CHARACTER) {\n\t\t\tif (stringWs) {\n\t\t\t\tif (!IsASpace(sc.ch))\n\t\t\t\t\tstringWs = 0;\n\t\t\t}\n\t\t\tif (sc.ch == '\\\\') {\n\t\t\t\tif (setEscapeSkip.Contains(sc.chNext)) {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t} else if (sc.chNext == 'z') {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\tstringWs = maskStringWs;\n\t\t\t\t}\n\t\t\t} else if (sc.ch == '\\'') {\n\t\t\t\tsc.ForwardSetState(SCE_LUA_DEFAULT);\n\t\t\t} else if (stringWs == 0 && sc.atLineEnd) {\n\t\t\t\tsc.ChangeState(SCE_LUA_STRINGEOL);\n\t\t\t\tsc.ForwardSetState(SCE_LUA_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.ch == ']' && (sc.state == SCE_LUA_LITERALSTRING || sc.state == SCE_LUA_COMMENT)) {\n\t\t\tconst int sep = LongDelimCheck(sc);\n\t\t\tif (sep == sepCount) {   // ]=]-style delim\n\t\t\t\tsc.Forward(sep);\n\t\t\t\tsc.ForwardSetState(SCE_LUA_DEFAULT);\n\t\t\t}\n\t\t}\n\n\t\t// Determine if a new state should be entered.\n\t\tif (sc.state == SCE_LUA_DEFAULT) {\n\t\t\tif (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) {\n\t\t\t\tsc.SetState(SCE_LUA_NUMBER);\n\t\t\t\tif (sc.ch == '0' && AnyOf(sc.chNext, 'x', 'X')) {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t}\n\t\t\t} else if (setWordStart.Contains(sc.ch)) {\n\t\t\t\t// For matching various identifiers with dots and colons, multiple\n\t\t\t\t// matches are done as identifier segments are added. Longest match is\n\t\t\t\t// set to a word style. The non-matched part is in identifier style.\n\t\t\t\tstd::string ident;\n\t\t\t\tidenPos = 0;\n\t\t\t\tidenWordPos = 0;\n\t\t\t\tidenStyle = SCE_LUA_IDENTIFIER;\n\t\t\t\tfoundGoto = false;\n\t\t\t\tint cNext = 0;\n\t\t\t\tdo {\n\t\t\t\t\tint c = 0;\n\t\t\t\t\tconst Sci_Position idenPosOld = idenPos;\n\t\t\t\t\tstd::string identSeg;\n\t\t\t\t\tidentSeg += static_cast<char>(sc.GetRelative(idenPos++));\n\t\t\t\t\twhile (setWord.Contains(c = sc.GetRelative(idenPos))) {\n\t\t\t\t\t\tidentSeg += static_cast<char>(c);\n\t\t\t\t\t\tidenPos++;\n\t\t\t\t\t}\n\t\t\t\t\tif (keywords.InList(identSeg) && (idenPosOld > 0)) {\n\t\t\t\t\t\tidenPos = idenPosOld - 1;\t// keywords cannot mix\n\t\t\t\t\t\tident.pop_back();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tident += identSeg;\n\t\t\t\t\tint newStyle = SCE_LUA_IDENTIFIER;\n\t\t\t\t\tif (keywords.InList(ident)) {\n\t\t\t\t\t\tnewStyle = SCE_LUA_WORD;\n\t\t\t\t\t} else if (keywords2.InList(ident)) {\n\t\t\t\t\t\tnewStyle = SCE_LUA_WORD2;\n\t\t\t\t\t} else if (keywords3.InList(ident)) {\n\t\t\t\t\t\tnewStyle = SCE_LUA_WORD3;\n\t\t\t\t\t} else if (keywords4.InList(ident)) {\n\t\t\t\t\t\tnewStyle = SCE_LUA_WORD4;\n\t\t\t\t\t} else if (keywords5.InList(ident)) {\n\t\t\t\t\t\tnewStyle = SCE_LUA_WORD5;\n\t\t\t\t\t} else if (keywords6.InList(ident)) {\n\t\t\t\t\t\tnewStyle = SCE_LUA_WORD6;\n\t\t\t\t\t} else if (keywords7.InList(ident)) {\n\t\t\t\t\t\tnewStyle = SCE_LUA_WORD7;\n\t\t\t\t\t} else if (keywords8.InList(ident)) {\n\t\t\t\t\t\tnewStyle = SCE_LUA_WORD8;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst int subStyle = classifierIdentifiers.ValueFor(ident);\n\t\t\t\t\t\tif (subStyle >= 0) {\n\t\t\t\t\t\t\tnewStyle = subStyle;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (newStyle != SCE_LUA_IDENTIFIER) {\n\t\t\t\t\t\tidenStyle = newStyle;\n\t\t\t\t\t\tidenWordPos = idenPos;\n\t\t\t\t\t}\n\t\t\t\t\tif (idenStyle == SCE_LUA_WORD)\t// keywords cannot mix\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcNext = sc.GetRelative(idenPos + 1);\n\t\t\t\t\tif ((c == '.' || c == ':') && setWordStart.Contains(cNext)) {\n\t\t\t\t\t\tident += static_cast<char>(c);\n\t\t\t\t\t\tidenPos++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcNext = 0;\n\t\t\t\t\t}\n\t\t\t\t} while (cNext);\n\t\t\t\tif ((idenStyle == SCE_LUA_WORD) && (ident == \"goto\")) {\n\t\t\t\t\tfoundGoto = true;\n\t\t\t\t}\n\t\t\t\tsc.SetState(SCE_LUA_IDENTIFIER);\n\t\t\t} else if (sc.ch == '\\\"') {\n\t\t\t\tsc.SetState(SCE_LUA_STRING);\n\t\t\t\tstringWs = 0;\n\t\t\t} else if (sc.ch == '\\'') {\n\t\t\t\tsc.SetState(SCE_LUA_CHARACTER);\n\t\t\t\tstringWs = 0;\n\t\t\t} else if (sc.ch == '[') {\n\t\t\t\tsepCount = LongDelimCheck(sc);\n\t\t\t\tif (sepCount == 0) {\n\t\t\t\t\tsc.SetState(SCE_LUA_OPERATOR);\n\t\t\t\t} else {\n\t\t\t\t\tsc.SetState(SCE_LUA_LITERALSTRING);\n\t\t\t\t\tsc.Forward(sepCount);\n\t\t\t\t}\n\t\t\t} else if (sc.Match('-', '-')) {\n\t\t\t\tsc.SetState(lastLineDocComment ? SCE_LUA_COMMENTDOC : SCE_LUA_COMMENTLINE);\n\t\t\t\tif (sc.Match(\"--[\")) {\n\t\t\t\t\tsc.Forward(2);\n\t\t\t\t\tsepCount = LongDelimCheck(sc);\n\t\t\t\t\tif (sepCount > 0) {\n\t\t\t\t\t\tsc.ChangeState(SCE_LUA_COMMENT);\n\t\t\t\t\t\tsc.Forward(sepCount);\n\t\t\t\t\t}\n\t\t\t\t} else if (sc.Match(\"---\")) {\n\t\t\t\t\tsc.SetState(SCE_LUA_COMMENTDOC);\n\t\t\t\t\tlastLineDocComment = maskDocComment;\n\t\t\t\t} else {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t}\n\t\t\t} else if (sc.atLineStart && sc.Match('$')) {\n\t\t\t\tsc.SetState(SCE_LUA_PREPROCESSOR);\t// Obsolete since Lua 4.0, but still in old code\n\t\t\t} else if (setLuaOperator.Contains(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_LUA_OPERATOR);\n\t\t\t}\n\t\t\tif (!AnyOf(sc.state, SCE_LUA_DEFAULT, SCE_LUA_COMMENTDOC)) {\n\t\t\t\tlastLineDocComment = 0;\n\t\t\t}\n\t\t}\n\t}\n\n\tsc.Complete();\n}\n\nvoid LexerLua::Fold(Sci_PositionU startPos_, Sci_Position length, int initStyle, IDocument *pAccess) {\n\tLexAccessor styler(pAccess);\n\tconst Sci_Position startPos = startPos_;\n\tconst Sci_Position lengthDoc = startPos + length;\n\tint visibleChars = 0;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tint levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK;\n\tint levelCurrent = levelPrev;\n\tchar chNext = styler[startPos];\n\tconst bool foldCompact = options.foldCompact;\n\tint style = initStyle;\n\tint styleNext = styler.StyleIndexAt(startPos);\n\n\tfor (Sci_Position i = startPos; i < lengthDoc; i++) {\n\t\tconst char ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\tconst int stylePrev = style;\n\t\tstyle = styleNext;\n\t\tstyleNext = styler.StyleIndexAt(i + 1);\n\t\tconst bool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n\t\tif (style == SCE_LUA_WORD) {\n\t\t\t// Fixed list of folding words: if, do, function, repeat, end, until\n\t\t\t// Must fix up next line with initial characters if any new words added.\n\t\t\tif ((style != stylePrev) && AnyOf(ch, 'i', 'd', 'f', 'e', 'r', 'u')) {\n\t\t\t\tstd::string s;\n\t\t\t\tfor (Sci_Position j = 0; j < 8; j++) {\t// 8 is length of longest: function\n\t\t\t\t\tif (!iswordchar(styler[i + j])) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\ts.push_back(styler[i + j]);\n\t\t\t\t}\n\n\t\t\t\tif (s == \"if\" || s == \"do\" || s == \"function\" || s == \"repeat\") {\n\t\t\t\t\tlevelCurrent++;\n\t\t\t\t}\n\t\t\t\tif (s == \"end\" || s == \"until\") {\n\t\t\t\t\tlevelCurrent--;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (style == SCE_LUA_OPERATOR) {\n\t\t\tif (ch == '{' || ch == '(') {\n\t\t\t\tlevelCurrent++;\n\t\t\t} else if (ch == '}' || ch == ')') {\n\t\t\t\tlevelCurrent--;\n\t\t\t}\n\t\t} else if (style == SCE_LUA_LITERALSTRING || style == SCE_LUA_COMMENT) {\n\t\t\tif (stylePrev != style) {\n\t\t\t\tlevelCurrent++;\n\t\t\t} else if (styleNext != style) {\n\t\t\t\tlevelCurrent--;\n\t\t\t}\n\t\t}\n\n\t\tif (atEOL) {\n\t\t\tint lev = levelPrev;\n\t\t\tif (visibleChars == 0 && foldCompact) {\n\t\t\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\t\t\t}\n\t\t\tif ((levelCurrent > levelPrev) && (visibleChars > 0)) {\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\t}\n\t\t\tif (lev != styler.LevelAt(lineCurrent)) {\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\t\t\t}\n\t\t\tlineCurrent++;\n\t\t\tlevelPrev = levelCurrent;\n\t\t\tvisibleChars = 0;\n\t\t}\n\t\tif (!isspacechar(ch)) {\n\t\t\tvisibleChars++;\n\t\t}\n\t}\n\t// Fill in the real level of the next line, keeping the current flags as they will be filled in later\n\n\tconst int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK;\n\tstyler.SetLevel(lineCurrent, levelPrev | flagsNext);\n}\n\n}\n\nLexerModule lmLua(SCLEX_LUA, LexerLua::LexerFactoryLua, \"lua\", luaWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexMMIXAL.cxx",
    "content": "// Scintilla source code edit control\n// Encoding: UTF-8\n/** @file LexMMIXAL.cxx\n ** Lexer for MMIX Assembler Language.\n ** Written by Christoph Hösler <christoph.hoesler@student.uni-tuebingen.de>\n ** For information about MMIX visit http://www-cs-faculty.stanford.edu/~knuth/mmix.html\n **/\n// Copyright 1998-2003 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\n\nstatic inline bool IsAWordChar(const int ch) {\n\treturn (ch < 0x80) && (isalnum(ch) || ch == ':' || ch == '_');\n}\n\nstatic inline bool isMMIXALOperator(char ch) {\n\tif (IsASCII(ch) && isalnum(ch))\n\t\treturn false;\n\tif (ch == '+' || ch == '-' || ch == '|' || ch == '^' ||\n\t\tch == '*' || ch == '/' ||\n\t\tch == '%' || ch == '<' || ch == '>' || ch == '&' ||\n\t\tch == '~' || ch == '$' ||\n\t\tch == ',' || ch == '(' || ch == ')' ||\n\t\tch == '[' || ch == ']')\n\t\treturn true;\n\treturn false;\n}\n\nstatic void ColouriseMMIXALDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[],\n                            Accessor &styler) {\n\n\tWordList &opcodes = *keywordlists[0];\n\tWordList &special_register = *keywordlists[1];\n\tWordList &predef_symbols = *keywordlists[2];\n\n\tStyleContext sc(startPos, length, initStyle, styler);\n\n\tfor (; sc.More(); sc.Forward())\n\t{\n\t\t// No EOL continuation\n\t\tif (sc.atLineStart) {\n\t\t\tif (sc.ch ==  '@' && sc.chNext == 'i') {\n\t\t\t\tsc.SetState(SCE_MMIXAL_INCLUDE);\n\t\t\t} else {\n\t\t\t\tsc.SetState(SCE_MMIXAL_LEADWS);\n\t\t\t}\n\t\t}\n\n\t\t// Check if first non whitespace character in line is alphanumeric\n\t\tif (sc.state == SCE_MMIXAL_LEADWS && !isspace(sc.ch)) {\t// LEADWS\n\t\t\tif(!IsAWordChar(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_MMIXAL_COMMENT);\n\t\t\t} else {\n\t\t\t\tif(sc.atLineStart) {\n\t\t\t\t\tsc.SetState(SCE_MMIXAL_LABEL);\n\t\t\t\t} else {\n\t\t\t\t\tsc.SetState(SCE_MMIXAL_OPCODE_PRE);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Determine if the current state should terminate.\n\t\tif (sc.state == SCE_MMIXAL_OPERATOR) {\t\t\t// OPERATOR\n\t\t\tsc.SetState(SCE_MMIXAL_OPERANDS);\n\t\t} else if (sc.state == SCE_MMIXAL_NUMBER) {\t\t// NUMBER\n\t\t\tif (!isdigit(sc.ch)) {\n\t\t\t\tif (IsAWordChar(sc.ch)) {\n\t\t\t\t\tsc.ChangeState(SCE_MMIXAL_REF);\n\t\t\t\t\tsc.SetState(SCE_MMIXAL_REF);\n\t\t\t\t} else {\n\t\t\t\t\tsc.SetState(SCE_MMIXAL_OPERANDS);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (sc.state == SCE_MMIXAL_LABEL) {\t\t\t// LABEL\n\t\t\tif (!IsAWordChar(sc.ch) ) {\n\t\t\t\tsc.SetState(SCE_MMIXAL_OPCODE_PRE);\n\t\t\t}\n\t\t} else if (sc.state == SCE_MMIXAL_REF) {\t\t\t// REF\n\t\t\tif (!IsAWordChar(sc.ch) ) {\n\t\t\t\tchar s0[100];\n\t\t\t\tsc.GetCurrent(s0, sizeof(s0));\n\t\t\t\tconst char *s = s0;\n\t\t\t\tif (*s == ':') {\t// ignore base prefix for match\n\t\t\t\t\t++s;\n\t\t\t\t}\n\t\t\t\tif (special_register.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_MMIXAL_REGISTER);\n\t\t\t\t} else if (predef_symbols.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_MMIXAL_SYMBOL);\n\t\t\t\t}\n\t\t\t\tsc.SetState(SCE_MMIXAL_OPERANDS);\n\t\t\t}\n\t\t} else if (sc.state == SCE_MMIXAL_OPCODE_PRE) {\t// OPCODE_PRE\n\t\t\t\tif (!isspace(sc.ch)) {\n\t\t\t\t\tsc.SetState(SCE_MMIXAL_OPCODE);\n\t\t\t\t}\n\t\t} else if (sc.state == SCE_MMIXAL_OPCODE) {\t\t// OPCODE\n\t\t\tif (!IsAWordChar(sc.ch) ) {\n\t\t\t\tchar s[100];\n\t\t\t\tsc.GetCurrent(s, sizeof(s));\n\t\t\t\tif (opcodes.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_MMIXAL_OPCODE_VALID);\n\t\t\t\t} else {\n\t\t\t\t\tsc.ChangeState(SCE_MMIXAL_OPCODE_UNKNOWN);\n\t\t\t\t}\n\t\t\t\tsc.SetState(SCE_MMIXAL_OPCODE_POST);\n\t\t\t}\n\t\t} else if (sc.state == SCE_MMIXAL_STRING) {\t\t// STRING\n\t\t\tif (sc.ch == '\\\"') {\n\t\t\t\tsc.ForwardSetState(SCE_MMIXAL_OPERANDS);\n\t\t\t} else if (sc.atLineEnd) {\n\t\t\t\tsc.ForwardSetState(SCE_MMIXAL_OPERANDS);\n\t\t\t}\n\t\t} else if (sc.state == SCE_MMIXAL_CHAR) {\t\t\t// CHAR\n\t\t\tif (sc.ch == '\\'') {\n\t\t\t\tsc.ForwardSetState(SCE_MMIXAL_OPERANDS);\n\t\t\t} else if (sc.atLineEnd) {\n\t\t\t\tsc.ForwardSetState(SCE_MMIXAL_OPERANDS);\n\t\t\t}\n\t\t} else if (sc.state == SCE_MMIXAL_REGISTER) {\t\t// REGISTER\n\t\t\tif (!isdigit(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_MMIXAL_OPERANDS);\n\t\t\t}\n\t\t} else if (sc.state == SCE_MMIXAL_HEX) {\t\t\t// HEX\n\t\t\tif (!isxdigit(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_MMIXAL_OPERANDS);\n\t\t\t}\n\t\t}\n\n\t\t// Determine if a new state should be entered.\n\t\tif (sc.state == SCE_MMIXAL_OPCODE_POST ||\t\t// OPCODE_POST\n\t\t\tsc.state == SCE_MMIXAL_OPERANDS) {\t\t\t// OPERANDS\n\t\t\tif (sc.state == SCE_MMIXAL_OPERANDS && isspace(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_MMIXAL_COMMENT);\n\t\t\t} else if (isdigit(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_MMIXAL_NUMBER);\n\t\t\t} else if (IsAWordChar(sc.ch) || sc.Match('@')) {\n\t\t\t\tsc.SetState(SCE_MMIXAL_REF);\n\t\t\t} else if (sc.Match('\\\"')) {\n\t\t\t\tsc.SetState(SCE_MMIXAL_STRING);\n\t\t\t} else if (sc.Match('\\'')) {\n\t\t\t\tsc.SetState(SCE_MMIXAL_CHAR);\n\t\t\t} else if (sc.Match('$')) {\n\t\t\t\tsc.SetState(SCE_MMIXAL_REGISTER);\n\t\t\t} else if (sc.Match('#')) {\n\t\t\t\tsc.SetState(SCE_MMIXAL_HEX);\n\t\t\t} else if (isMMIXALOperator(static_cast<char>(sc.ch))) {\n\t\t\t\tsc.SetState(SCE_MMIXAL_OPERATOR);\n\t\t\t}\n\t\t}\n\t}\n\tsc.Complete();\n}\n\nstatic const char * const MMIXALWordListDesc[] = {\n\t\"Operation Codes\",\n\t\"Special Register\",\n\t\"Predefined Symbols\",\n\t0\n};\n\nLexerModule lmMMIXAL(SCLEX_MMIXAL, ColouriseMMIXALDoc, \"mmixal\", 0, MMIXALWordListDesc);\n\n"
  },
  {
    "path": "lexilla/lexers/LexMPT.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexMPT.cxx\n ** Lexer for MPT specific files. Based on LexOthers.cxx\n ** LOT = the text log file created by the MPT application while running a test program\n ** Other MPT specific files to be added later.\n **/\n// Copyright 2003 by Marius Gheorghe <mgheorghe@cabletest.com>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nstatic int GetLotLineState(std::string &line) {\n\tif (line.length()) {\n\t\t// Most of the time the first non-blank character in line determines that line's type\n\t\t// Now finds the first non-blank character\n\t\tunsigned i; // Declares counter here to make it persistent after the for loop\n\t\tfor (i = 0; i < line.length(); ++i) {\n\t\t\tif (!(IsASCII(line[i]) && isspace(line[i])))\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// Checks if it was a blank line\n\t\tif (i == line.length())\n\t\t\treturn SCE_LOT_DEFAULT;\n\n\t\tswitch (line[i]) {\n\t\tcase '*': // Fail measurement\n\t\t\treturn SCE_LOT_FAIL;\n\n\t\tcase '+': // Header\n\t\tcase '|': // Header\n\t\t\treturn SCE_LOT_HEADER;\n\n\t\tcase ':': // Set test limits\n\t\t\treturn SCE_LOT_SET;\n\n\t\tcase '-': // Section break\n\t\t\treturn SCE_LOT_BREAK;\n\n\t\tdefault:  // Any other line\n\t\t\t// Checks for message at the end of lot file\n\t\t\tif (line.find(\"PASSED\") != std::string::npos) {\n\t\t\t\treturn SCE_LOT_PASS;\n\t\t\t}\n\t\t\telse if (line.find(\"FAILED\") != std::string::npos) {\n\t\t\t\treturn SCE_LOT_FAIL;\n\t\t\t}\n\t\t\telse if (line.find(\"ABORTED\") != std::string::npos) {\n\t\t\t\treturn SCE_LOT_ABORT;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn i ? SCE_LOT_PASS : SCE_LOT_DEFAULT;\n\t\t\t}\n\t\t}\n\t}\n\telse {\n\t\treturn SCE_LOT_DEFAULT;\n\t}\n}\n\nstatic void ColourizeLotDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[], Accessor &styler) {\n\tstyler.StartAt(startPos);\n\tstyler.StartSegment(startPos);\n\tbool atLineStart = true;// Arms the 'at line start' flag\n\tchar chNext = styler.SafeGetCharAt(startPos);\n\tstd::string line(\"\");\n\tline.reserve(256);\t// Lot lines are less than 256 chars long most of the time. This should avoid reallocations\n\n\t// Styles LOT document\n\tSci_PositionU i;\t\t\t// Declared here because it's used after the for loop\n\tfor (i = startPos; i < startPos + length; ++i) {\n\t\tchar ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\tline += ch;\n\t\tatLineStart = false;\n\n\t\t// LOT files are only used on the Win32 platform, thus EOL == CR+LF\n\t\t// Searches for the end of line\n\t\tif (ch == '\\r' && chNext == '\\n') {\n\t\t\tline += chNext; // Gets the '\\n'\n\t\t\t++i; // Advances past the '\\n'\n\t\t\tchNext = styler.SafeGetCharAt(i + 1); // Gets character of next line\n\t\t\tstyler.ColourTo(i, GetLotLineState(line));\n\t\t\tline = \"\";\n\t\t\tatLineStart = true; // Arms flag for next line\n\t\t}\n\t}\n\n\t// Last line may not have a line ending\n\tif (!atLineStart) {\n\t\tstyler.ColourTo(i - 1, GetLotLineState(line));\n\t}\n}\n\n// Folds an MPT LOT file: the blocks that can be folded are:\n// sections (headed by a set line)\n// passes (contiguous pass results within a section)\n// fails (contiguous fail results within a section)\nstatic void FoldLotDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[], Accessor &styler) {\n\tbool foldCompact = styler.GetPropertyInt(\"fold.compact\", 0) != 0;\n\tSci_PositionU endPos = startPos + length;\n\tint visibleChars = 0;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\n\tchar chNext = styler.SafeGetCharAt(startPos);\n\tint style = SCE_LOT_DEFAULT;\n\tint styleNext = styler.StyleAt(startPos);\n\tint lev = SC_FOLDLEVELBASE;\n\n\t// Gets style of previous line if not at the beginning of the document\n\tif (startPos > 1)\n\t\tstyle = styler.StyleAt(startPos - 2);\n\n\tfor (Sci_PositionU i = startPos; i < endPos; i++) {\n\t\tchar ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\n\t\tif (ch == '\\r' && chNext == '\\n') {\n\t\t\t// TO DO:\n\t\t\t// Should really get the state of the previous line from the styler\n\t\t\tint stylePrev = style;\n\t\t\tstyle = styleNext;\n\t\t\tstyleNext = styler.StyleAt(i + 2);\n\n\t\t\tswitch (style) {\n/*\n\t\t\tcase SCE_LOT_SET:\n\t\t\t\tlev = SC_FOLDLEVELBASE | SC_FOLDLEVELHEADERFLAG;\n\t\t\t\tbreak;\n*/\n\t\t\tcase SCE_LOT_FAIL:\n/*\n\t\t\t\tif (stylePrev != SCE_LOT_FAIL)\n\t\t\t\t\tlev = SC_FOLDLEVELBASE | SC_FOLDLEVELHEADERFLAG;\n\t\t\t\telse\n\t\t\t\t\tlev = SC_FOLDLEVELBASE + 1;\n*/\n\t\t\t\tlev = SC_FOLDLEVELBASE;\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tif (lineCurrent == 0 || stylePrev == SCE_LOT_FAIL)\n\t\t\t\t\tlev = SC_FOLDLEVELBASE | SC_FOLDLEVELHEADERFLAG;\n\t\t\t\telse\n\t\t\t\t\tlev = SC_FOLDLEVELBASE + 1;\n\n\t\t\t\tif (visibleChars == 0 && foldCompact)\n\t\t\t\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif (lev != styler.LevelAt(lineCurrent))\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\n\t\t\tlineCurrent++;\n\t\t\tvisibleChars = 0;\n\t\t}\n\n\t\tif (!isspacechar(ch))\n\t\t\tvisibleChars++;\n\t}\n\n\tint flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK;\n\tstyler.SetLevel(lineCurrent, lev | flagsNext);\n}\n\nstatic const char * const emptyWordListDesc[] = {\n\t0\n};\n\nLexerModule lmLot(SCLEX_LOT, ColourizeLotDoc, \"lot\", FoldLotDoc, emptyWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexMSSQL.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexMSSQL.cxx\n ** Lexer for MSSQL.\n **/\n// By Filip Yaghob <fyaghob@gmail.com>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\n#define KW_MSSQL_STATEMENTS         0\n#define KW_MSSQL_DATA_TYPES         1\n#define KW_MSSQL_SYSTEM_TABLES      2\n#define KW_MSSQL_GLOBAL_VARIABLES   3\n#define KW_MSSQL_FUNCTIONS          4\n#define KW_MSSQL_STORED_PROCEDURES  5\n#define KW_MSSQL_OPERATORS          6\n\nstatic char classifyWordSQL(Sci_PositionU start,\n                            Sci_PositionU end,\n                            WordList *keywordlists[],\n                            Accessor &styler,\n                            unsigned int actualState,\n\t\t\t\t\t\t\tunsigned int prevState) {\n\tchar s[256];\n\tbool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.');\n\n\tWordList &kwStatements          = *keywordlists[KW_MSSQL_STATEMENTS];\n    WordList &kwDataTypes           = *keywordlists[KW_MSSQL_DATA_TYPES];\n    WordList &kwSystemTables        = *keywordlists[KW_MSSQL_SYSTEM_TABLES];\n    WordList &kwGlobalVariables     = *keywordlists[KW_MSSQL_GLOBAL_VARIABLES];\n    WordList &kwFunctions           = *keywordlists[KW_MSSQL_FUNCTIONS];\n    WordList &kwStoredProcedures    = *keywordlists[KW_MSSQL_STORED_PROCEDURES];\n    WordList &kwOperators           = *keywordlists[KW_MSSQL_OPERATORS];\n\n\tfor (Sci_PositionU i = 0; i < end - start + 1 && i < 128; i++) {\n\t\ts[i] = static_cast<char>(tolower(styler[start + i]));\n\t\ts[i + 1] = '\\0';\n\t}\n\tchar chAttr = SCE_MSSQL_IDENTIFIER;\n\n\tif (actualState == SCE_MSSQL_GLOBAL_VARIABLE) {\n\n        if (kwGlobalVariables.InList(&s[2]))\n            chAttr = SCE_MSSQL_GLOBAL_VARIABLE;\n\n\t} else if (wordIsNumber) {\n\t\tchAttr = SCE_MSSQL_NUMBER;\n\n\t} else if (prevState == SCE_MSSQL_DEFAULT_PREF_DATATYPE) {\n\t\t// Look first in datatypes\n        if (kwDataTypes.InList(s))\n            chAttr = SCE_MSSQL_DATATYPE;\n\t\telse if (kwOperators.InList(s))\n\t\t\tchAttr = SCE_MSSQL_OPERATOR;\n\t\telse if (kwStatements.InList(s))\n\t\t\tchAttr = SCE_MSSQL_STATEMENT;\n\t\telse if (kwSystemTables.InList(s))\n\t\t\tchAttr = SCE_MSSQL_SYSTABLE;\n\t\telse if (kwFunctions.InList(s))\n            chAttr = SCE_MSSQL_FUNCTION;\n\t\telse if (kwStoredProcedures.InList(s))\n\t\t\tchAttr = SCE_MSSQL_STORED_PROCEDURE;\n\n\t} else {\n\t\tif (kwOperators.InList(s))\n\t\t\tchAttr = SCE_MSSQL_OPERATOR;\n\t\telse if (kwStatements.InList(s))\n\t\t\tchAttr = SCE_MSSQL_STATEMENT;\n\t\telse if (kwSystemTables.InList(s))\n\t\t\tchAttr = SCE_MSSQL_SYSTABLE;\n\t\telse if (kwFunctions.InList(s))\n\t\t\tchAttr = SCE_MSSQL_FUNCTION;\n\t\telse if (kwStoredProcedures.InList(s))\n\t\t\tchAttr = SCE_MSSQL_STORED_PROCEDURE;\n\t\telse if (kwDataTypes.InList(s))\n\t\t\tchAttr = SCE_MSSQL_DATATYPE;\n\t}\n\n\tstyler.ColourTo(end, chAttr);\n\n\treturn chAttr;\n}\n\nstatic void ColouriseMSSQLDoc(Sci_PositionU startPos, Sci_Position length,\n                              int initStyle, WordList *keywordlists[], Accessor &styler) {\n\n\n\tstyler.StartAt(startPos);\n\n\tbool fold = styler.GetPropertyInt(\"fold\") != 0;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tint spaceFlags = 0;\n\n\tint state = initStyle;\n\tint prevState = initStyle;\n\tchar chPrev = ' ';\n\tchar chNext = styler[startPos];\n\tint nesting = 0;\n\n\tif (lineCurrent >= 1) {\n\t\tnesting = styler.GetLineState(lineCurrent - 1);\n\t}\n\n\tstyler.StartSegment(startPos);\n\tSci_PositionU lengthDoc = startPos + length;\n\tfor (Sci_PositionU i = startPos; i < lengthDoc; i++) {\n\t\tconst Sci_Position lineStartNext = styler.LineStart(lineCurrent + 1);\n\t\tconst bool atEOL = (static_cast<Sci_Position>(i) == (lineStartNext - 1));\n\t\tchar ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\n\t\tif ((ch == '\\r' && chNext != '\\n') || (ch == '\\n')) {\n\t\t\tint indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags);\n\t\t\tint lev = indentCurrent;\n\t\t\tif (!(indentCurrent & SC_FOLDLEVELWHITEFLAG)) {\n\t\t\t\t// Only non whitespace lines can be headers\n\t\t\t\tint indentNext = styler.IndentAmount(lineCurrent + 1, &spaceFlags);\n\t\t\t\tif (indentCurrent < (indentNext & ~SC_FOLDLEVELWHITEFLAG)) {\n\t\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (fold) {\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\t\t\t}\n\t\t}\n\n\t\tif (styler.IsLeadByte(ch)) {\n\t\t\tchNext = styler.SafeGetCharAt(i + 2);\n\t\t\tchPrev = ' ';\n\t\t\ti += 1;\n\t\t\tcontinue;\n\t\t}\n\n\t\t// When the last char isn't part of the state (have to deal with it too)...\n\t\tif ( (state == SCE_MSSQL_IDENTIFIER) ||\n                    (state == SCE_MSSQL_STORED_PROCEDURE) ||\n                    (state == SCE_MSSQL_DATATYPE) ||\n                    //~ (state == SCE_MSSQL_COLUMN_NAME) ||\n                    (state == SCE_MSSQL_FUNCTION) ||\n                    //~ (state == SCE_MSSQL_GLOBAL_VARIABLE) ||\n                    (state == SCE_MSSQL_VARIABLE)) {\n\t\t\tif (!iswordchar(ch)) {\n\t\t\t\tint stateTmp;\n\n                if ((state == SCE_MSSQL_VARIABLE) || (state == SCE_MSSQL_COLUMN_NAME)) {\n                    styler.ColourTo(i - 1, state);\n\t\t\t\t\tstateTmp = state;\n                } else\n                    stateTmp = classifyWordSQL(styler.GetStartSegment(), i - 1, keywordlists, styler, state, prevState);\n\n\t\t\t\tprevState = state;\n\n\t\t\t\tif (stateTmp == SCE_MSSQL_IDENTIFIER || stateTmp == SCE_MSSQL_VARIABLE)\n\t\t\t\t\tstate = SCE_MSSQL_DEFAULT_PREF_DATATYPE;\n\t\t\t\telse\n\t\t\t\t\tstate = SCE_MSSQL_DEFAULT;\n\t\t\t}\n\t\t} else if (state == SCE_MSSQL_LINE_COMMENT) {\n\t\t\tif (ch == '\\r' || ch == '\\n') {\n\t\t\t\tstyler.ColourTo(i - 1, state);\n\t\t\t\tprevState = state;\n\t\t\t\tstate = SCE_MSSQL_DEFAULT;\n\t\t\t}\n\t\t} else if (state == SCE_MSSQL_GLOBAL_VARIABLE) {\n\t\t\tif ((ch != '@') && !iswordchar(ch)) {\n\t\t\t\tclassifyWordSQL(styler.GetStartSegment(), i - 1, keywordlists, styler, state, prevState);\n\t\t\t\tprevState = state;\n\t\t\t\tstate = SCE_MSSQL_DEFAULT;\n\t\t\t}\n\t\t}\n\n\t\t// If is the default or one of the above succeeded\n\t\tif (state == SCE_MSSQL_DEFAULT || state == SCE_MSSQL_DEFAULT_PREF_DATATYPE) {\n\t\t\tif (iswordstart(ch)) {\n\t\t\t\tstyler.ColourTo(i - 1, state);\n\t\t\t\tprevState = state;\n\t\t\t\tstate = SCE_MSSQL_IDENTIFIER;\n\t\t\t} else if (ch == '/' && chNext == '*') {\n\t\t\t\tstyler.ColourTo(i - 1, SCE_MSSQL_DEFAULT);\n\t\t\t\tprevState = state;\n\t\t\t\tstate = SCE_MSSQL_COMMENT;\n\t\t\t} else if (ch == '-' && chNext == '-') {\n\t\t\t\tstyler.ColourTo(i - 1, state);\n\t\t\t\tprevState = state;\n\t\t\t\tstate = SCE_MSSQL_LINE_COMMENT;\n\t\t\t} else if (ch == '\\'') {\n\t\t\t\tstyler.ColourTo(i - 1, SCE_MSSQL_DEFAULT);\n\t\t\t\tprevState = state;\n\t\t\t\tstate = SCE_MSSQL_STRING;\n\t\t\t} else if (ch == '\"') {\n\t\t\t\tstyler.ColourTo(i - 1, SCE_MSSQL_DEFAULT);\n\t\t\t\tprevState = state;\n\t\t\t\tstate = SCE_MSSQL_COLUMN_NAME;\n\t\t\t} else if (ch == '[') {\n\t\t\t\tstyler.ColourTo(i - 1, SCE_MSSQL_DEFAULT);\n\t\t\t\tprevState = state;\n\t\t\t\tstate = SCE_MSSQL_COLUMN_NAME_2;\n\t\t\t} else if (isoperator(ch)) {\n\t\t\t\tstyler.ColourTo(i - 1, state);\n\t\t\t\tstyler.ColourTo(i, SCE_MSSQL_OPERATOR);\n                //~ style = SCE_MSSQL_DEFAULT;\n\t\t\t\tprevState = state;\n\t\t\t\tstate = SCE_MSSQL_DEFAULT;\n\t\t\t} else if (ch == '@') {\n                styler.ColourTo(i - 1, SCE_MSSQL_DEFAULT);\n\t\t\t\tprevState = state;\n                if (chNext == '@') {\n                    state = SCE_MSSQL_GLOBAL_VARIABLE;\n//                    i += 2;\n                } else\n                    state = SCE_MSSQL_VARIABLE;\n            }\n\n\n\t\t// When the last char is part of the state...\n\t\t} else if (state == SCE_MSSQL_COMMENT) {\n\t\t\t\tif (ch == '/' && chNext == '*')\n\t\t\t\t\tnesting++;\n\t\t\t\telse if (ch == '/' && chPrev == '*') {\n\t\t\t\t\tif (nesting > 0)\n\t\t\t\t\t\tnesting--;\n\t\t\t\t\telse if (((i > (styler.GetStartSegment() + 2)) || ((initStyle == SCE_MSSQL_COMMENT) &&\n\t\t\t\t\t    (styler.GetStartSegment() == startPos)))) {\n\t\t\t\t\t\tstyler.ColourTo(i, state);\n\t\t\t\t\t\t//~ state = SCE_MSSQL_COMMENT;\n\t\t\t\t\tprevState = state;\n                        state = SCE_MSSQL_DEFAULT;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (state == SCE_MSSQL_STRING) {\n\t\t\t\tif (ch == '\\'') {\n\t\t\t\t\tif ( chNext == '\\'' ) {\n\t\t\t\t\t\ti++;\n\t\t\t\t\tch = chNext;\n\t\t\t\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstyler.ColourTo(i, state);\n\t\t\t\t\tprevState = state;\n\t\t\t\t\t\tstate = SCE_MSSQL_DEFAULT;\n\t\t\t\t\t//i++;\n\t\t\t\t\t}\n\t\t\t\t//ch = chNext;\n\t\t\t\t//chNext = styler.SafeGetCharAt(i + 1);\n\t\t\t\t}\n\t\t\t} else if (state == SCE_MSSQL_COLUMN_NAME) {\n\t\t\t\tif (ch == '\"') {\n\t\t\t\t\tif (chNext == '\"') {\n\t\t\t\t\t\ti++;\n\t\t\t\t\tch = chNext;\n\t\t\t\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\t\t\t} else {\n                    styler.ColourTo(i, state);\n\t\t\t\t\tprevState = state;\n\t\t\t\t\tstate = SCE_MSSQL_DEFAULT_PREF_DATATYPE;\n\t\t\t\t\t//i++;\n                }\n                }\n\t\t} else if (state == SCE_MSSQL_COLUMN_NAME_2) {\n\t\t\tif (ch == ']') {\n                styler.ColourTo(i, state);\n\t\t\t\tprevState = state;\n                state = SCE_MSSQL_DEFAULT_PREF_DATATYPE;\n                //i++;\n\t\t\t}\n\t\t}\n\n\t\tif (atEOL)\n\t\t\tstyler.SetLineState(lineCurrent++, (state == SCE_MSSQL_COMMENT) ? nesting : 0);\n\n\t\tchPrev = ch;\n\t}\n\tstyler.ColourTo(lengthDoc - 1, state);\n}\n\nstatic void FoldMSSQLDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[], Accessor &styler) {\n\tbool foldComment = styler.GetPropertyInt(\"fold.comment\") != 0;\n\tbool foldCompact = styler.GetPropertyInt(\"fold.compact\", 1) != 0;\n\tSci_PositionU endPos = startPos + length;\n\tint visibleChars = 0;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tint levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK;\n\tint levelCurrent = levelPrev;\n\tchar chNext = styler[startPos];\n\tbool inComment = (styler.StyleAt(startPos-1) == SCE_MSSQL_COMMENT);\n    char s[10] = \"\";\n\tfor (Sci_PositionU i = startPos; i < endPos; i++) {\n\t\tchar ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\tint style = styler.StyleAt(i);\n\t\tbool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n        // Comment folding\n\t\tif (foldComment) {\n\t\t\tif (!inComment && (style == SCE_MSSQL_COMMENT))\n\t\t\t\tlevelCurrent++;\n\t\t\telse if (inComment && (style != SCE_MSSQL_COMMENT))\n\t\t\t\tlevelCurrent--;\n\t\t\tinComment = (style == SCE_MSSQL_COMMENT);\n\t\t}\n        if (style == SCE_MSSQL_STATEMENT) {\n            // Folding between begin or case and end\n            if (ch == 'b' || ch == 'B' || ch == 'c' || ch == 'C' || ch == 'e' || ch == 'E') {\n                for (Sci_PositionU j = 0; j < 5; j++) {\n\t\t\t\t\tif (!iswordchar(styler[i + j])) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\ts[j] = static_cast<char>(tolower(styler[i + j]));\n\t\t\t\t\ts[j + 1] = '\\0';\n                }\n\t\t\t\tif ((strcmp(s, \"begin\") == 0) || (strcmp(s, \"case\") == 0)) {\n\t\t\t\t\tlevelCurrent++;\n\t\t\t\t}\n\t\t\t\tif (strcmp(s, \"end\") == 0) {\n\t\t\t\t\tlevelCurrent--;\n\t\t\t\t}\n            }\n        }\n\t\tif (atEOL) {\n\t\t\tint lev = levelPrev;\n\t\t\tif (visibleChars == 0 && foldCompact)\n\t\t\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\t\t\tif ((levelCurrent > levelPrev) && (visibleChars > 0))\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\tif (lev != styler.LevelAt(lineCurrent)) {\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\t\t\t}\n\t\t\tlineCurrent++;\n\t\t\tlevelPrev = levelCurrent;\n\t\t\tvisibleChars = 0;\n\t\t}\n\t\tif (!isspacechar(ch))\n\t\t\tvisibleChars++;\n\t}\n\t// Fill in the real level of the next line, keeping the current flags as they will be filled in later\n\tint flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK;\n\tstyler.SetLevel(lineCurrent, levelPrev | flagsNext);\n}\n\nstatic const char * const sqlWordListDesc[] = {\n\t\"Statements\",\n    \"Data Types\",\n    \"System tables\",\n    \"Global variables\",\n    \"Functions\",\n    \"System Stored Procedures\",\n    \"Operators\",\n\t0,\n};\n\nLexerModule lmMSSQL(SCLEX_MSSQL, ColouriseMSSQLDoc, \"mssql\", FoldMSSQLDoc, sqlWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexMagik.cxx",
    "content": "// Scintilla source code edit control\n/**\n * @file LexMagik.cxx\n * Lexer for GE(r) Smallworld(tm) MagikSF\n */\n// Copyright 1998-2005 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\n/**\n * Is it a core character (C isalpha(), exclamation and question mark)\n *\n * \\param  ch The character\n * \\return True if ch is a character, False otherwise\n */\nstatic inline bool IsAlphaCore(int ch) {\n    return (isalpha(ch) || ch == '!' || ch == '?');\n}\n\n/**\n * Is it a character (IsAlphaCore() and underscore)\n *\n * \\param  ch The character\n * \\return True if ch is a character, False otherwise\n */\nstatic inline bool IsAlpha(int ch) {\n    return (IsAlphaCore(ch) || ch == '_');\n}\n\n/**\n * Is it a symbolic character (IsAlpha() and colon)\n *\n * \\param  ch The character\n * \\return True if ch is a character, False otherwise\n */\nstatic inline bool IsAlphaSym(int ch) {\n    return (IsAlpha(ch) || ch == ':');\n}\n\n/**\n * Is it a numerical character (IsAlpha() and 0 - 9)\n *\n * \\param  ch The character\n * \\return True if ch is a character, False otherwise\n */\nstatic inline bool IsAlNum(int ch) {\n    return ((ch >= '0' && ch <= '9') || IsAlpha(ch));\n}\n\n/**\n * Is it a symbolic numerical character (IsAlNum() and colon)\n *\n * \\param  ch The character\n * \\return True if ch is a character, False otherwise\n */\nstatic inline bool IsAlNumSym(int ch) {\n    return (IsAlNum(ch) || ch == ':');\n}\n\n/**\n * The lexer function\n *\n * \\param  startPos Where to start scanning\n * \\param  length Where to scan to\n * \\param  initStyle The style at the initial point, not used in this folder\n * \\param  keywordlists The keywordslists, currently, number 5 is used\n * \\param  styler The styler\n */\nstatic void ColouriseMagikDoc(Sci_PositionU startPos, Sci_Position length, int initStyle,\n                           WordList *keywordlists[], Accessor &styler) {\n    styler.StartAt(startPos);\n\n    WordList &keywords = *keywordlists[0];\n    WordList &pragmatics = *keywordlists[1];\n    WordList &containers = *keywordlists[2];\n    WordList &flow = *keywordlists[3];\n    WordList &characters = *keywordlists[4];\n\n\tStyleContext sc(startPos, length, initStyle, styler);\n\n\n\tfor (; sc.More(); sc.Forward()) {\n\n    repeat:\n\n        if(sc.ch == '#') {\n            if (sc.chNext == '#') sc.SetState(SCE_MAGIK_HYPER_COMMENT);\n            else sc.SetState(SCE_MAGIK_COMMENT);\n            for(; sc.More() && !(sc.atLineEnd); sc.Forward());\n            sc.SetState(SCE_MAGIK_DEFAULT);\n            goto repeat;\n        }\n\n        if(sc.ch == '\"') {\n            sc.SetState(SCE_MAGIK_STRING);\n\n            if(sc.More())\n            {\n                sc.Forward();\n                for(; sc.More() && sc.ch != '\"'; sc.Forward());\n            }\n\n            sc.ForwardSetState(SCE_MAGIK_DEFAULT);\n            goto repeat;\n        }\n\n\t    // The default state\n\t    if(sc.state == SCE_MAGIK_DEFAULT) {\n\n\t        // A certain keyword has been detected\n\t        if (sc.ch == '_' && (\n                    sc.currentPos == 0 || !IsAlNum(sc.chPrev))) {\n\t            char keyword[50];\n\t            memset(keyword, '\\0', 50);\n\n\t            for(\n                    int scanPosition = 0;\n                    scanPosition < 50;\n                    scanPosition++) {\n\t                char keywordChar = static_cast<char>(\n                        tolower(styler.SafeGetCharAt(\n                            scanPosition +\n                                static_cast<Sci_Position>(sc.currentPos+1), ' ')));\n                    if(IsAlpha(keywordChar)) {\n                        keyword[scanPosition] = keywordChar;\n                    } else {\n                        break;\n                    }\n\t            }\n\n                // It is a pragma\n\t            if(pragmatics.InList(keyword)) {\n\t                sc.SetState(SCE_MAGIK_PRAGMA);\n\t            }\n\n\t            // it is a normal keyword like _local, _self, etc.\n\t            else if(keywords.InList(keyword)) {\n\t                sc.SetState(SCE_MAGIK_KEYWORD);\n\t            }\n\n                // It is a container keyword, such as _method, _proc, etc.\n\t            else if(containers.InList(keyword)) {\n\t                sc.SetState(SCE_MAGIK_CONTAINER);\n\t            }\n\n\t            // It is a flow keyword, such as _for, _if, _try, etc.\n\t            else if(flow.InList(keyword)) {\n\t                sc.SetState(SCE_MAGIK_FLOW);\n\t            }\n\n\t            // Interpret as unknown keyword\n\t            else {\n\t                sc.SetState(SCE_MAGIK_UNKNOWN_KEYWORD);\n\t            }\n\t        }\n\n            // Symbolic expression\n\t        else if(sc.ch == ':' && !IsAlNum(sc.chPrev)) {\n\t            sc.SetState(SCE_MAGIK_SYMBOL);\n\t            bool firstTrip = true;\n\t            for(sc.Forward(); sc.More(); sc.Forward()) {\n\t                if(firstTrip && IsAlphaSym(sc.ch));\n\t                else if(!firstTrip && IsAlNumSym(sc.ch));\n\t                else if(sc.ch == '|') {\n\t                    for(sc.Forward();\n                            sc.More() && sc.ch != '|';\n                            sc.Forward());\n\t                }\n\t                else break;\n\n\t                firstTrip = false;\n\t            }\n\t            sc.SetState(SCE_MAGIK_DEFAULT);\n\t            goto repeat;\n\t        }\n\n            // Identifier (label) expression\n\t        else if(sc.ch == '@') {\n\t            sc.SetState(SCE_MAGIK_IDENTIFIER);\n\t            bool firstTrip = true;\n\t            for(sc.Forward(); sc.More(); sc.Forward()) {\n\t                if(firstTrip && IsAlphaCore(sc.ch)) {\n\t                    firstTrip = false;\n\t                }\n\t                else if(!firstTrip && IsAlpha(sc.ch));\n\t                else break;\n\t            }\n\t            sc.SetState(SCE_MAGIK_DEFAULT);\n\t            goto repeat;\n\t        }\n\n\t        // Start of a character\n            else if(sc.ch == '%') {\n                sc.SetState(SCE_MAGIK_CHARACTER);\n                sc.Forward();\n                char keyword[50];\n\t            memset(keyword, '\\0', 50);\n\n\t            for(\n                    int scanPosition = 0;\n                    scanPosition < 50;\n                    scanPosition++) {\n\t                char keywordChar = static_cast<char>(\n                        tolower(styler.SafeGetCharAt(\n                            scanPosition +\n                                static_cast<int>(sc.currentPos), ' ')));\n                    if(IsAlpha(keywordChar)) {\n                        keyword[scanPosition] = keywordChar;\n                    } else {\n                        break;\n                    }\n\t            }\n\n\t            if(characters.InList(keyword)) {\n\t                sc.Forward(static_cast<int>(strlen(keyword)));\n\t            } else {\n\t                sc.Forward();\n\t            }\n\n                sc.SetState(SCE_MAGIK_DEFAULT);\n                goto repeat;\n            }\n\n            // Operators\n\t        else if(\n                sc.ch == '>' ||\n                sc.ch == '<' ||\n                sc.ch == '.' ||\n                sc.ch == ',' ||\n                sc.ch == '+' ||\n                sc.ch == '-' ||\n                sc.ch == '/' ||\n                sc.ch == '*' ||\n                sc.ch == '~' ||\n                sc.ch == '$' ||\n                sc.ch == '=') {\n                sc.SetState(SCE_MAGIK_OPERATOR);\n            }\n\n            // Braces\n            else if(sc.ch == '(' || sc.ch == ')') {\n                sc.SetState(SCE_MAGIK_BRACE_BLOCK);\n            }\n\n            // Brackets\n            else if(sc.ch == '{' || sc.ch == '}') {\n                sc.SetState(SCE_MAGIK_BRACKET_BLOCK);\n            }\n\n            // Square Brackets\n            else if(sc.ch == '[' || sc.ch == ']') {\n                sc.SetState(SCE_MAGIK_SQBRACKET_BLOCK);\n            }\n\n\n\t    }\n\n\t    // It is an operator\n\t    else if(\n            sc.state == SCE_MAGIK_OPERATOR ||\n            sc.state == SCE_MAGIK_BRACE_BLOCK ||\n            sc.state == SCE_MAGIK_BRACKET_BLOCK ||\n            sc.state == SCE_MAGIK_SQBRACKET_BLOCK) {\n\t        sc.SetState(SCE_MAGIK_DEFAULT);\n\t        goto repeat;\n\t    }\n\n\t    // It is the pragma state\n\t    else if(sc.state == SCE_MAGIK_PRAGMA) {\n\t        if(!IsAlpha(sc.ch)) {\n\t            sc.SetState(SCE_MAGIK_DEFAULT);\n                goto repeat;\n\t        }\n\t    }\n\n\t    // It is the keyword state\n\t    else if(\n            sc.state == SCE_MAGIK_KEYWORD ||\n            sc.state == SCE_MAGIK_CONTAINER ||\n            sc.state == SCE_MAGIK_FLOW ||\n            sc.state == SCE_MAGIK_UNKNOWN_KEYWORD) {\n\t        if(!IsAlpha(sc.ch)) {\n\t            sc.SetState(SCE_MAGIK_DEFAULT);\n\t            goto repeat;\n\t        }\n\t    }\n\t}\n\n\tsc.Complete();\n}\n\n/**\n * The word list description\n */\nstatic const char * const magikWordListDesc[] = {\n    \"Accessors (local, global, self, super, thisthread)\",\n    \"Pragmatic (pragma, private)\",\n    \"Containers (method, block, proc)\",\n    \"Flow (if, then, elif, else)\",\n    \"Characters (space, tab, newline, return)\",\n    \"Fold Containers (method, proc, block, if, loop)\",\n    0};\n\n/**\n * This function detects keywords which are able to have a body. Note that it\n * uses the Fold Containers word description, not the containers description. It\n * only works when the style at that particular position is set on Containers\n * or Flow (number 3 or 4).\n *\n * \\param  keywordslist The list of keywords that are scanned, they should only\n *         contain the start keywords, not the end keywords\n * \\param  keyword The actual keyword\n * \\return 1 if it is a folding start-keyword, -1 if it is a folding end-keyword\n *         0 otherwise\n */\nstatic inline int IsFoldingContainer(WordList &keywordslist, char * keyword) {\n    if(\n        strlen(keyword) > 3 &&\n        keyword[0] == 'e' && keyword[1] == 'n' && keyword[2] == 'd') {\n        if (keywordslist.InList(keyword + 3)) {\n            return -1;\n        }\n\n    } else {\n        if(keywordslist.InList(keyword)) {\n            return 1;\n        }\n    }\n\n    return 0;\n}\n\n/**\n * The folding function\n *\n * \\param  startPos Where to start scanning\n * \\param  length Where to scan to\n * \\param  keywordslists The keywordslists, currently, number 5 is used\n * \\param  styler The styler\n */\nstatic void FoldMagikDoc(Sci_PositionU startPos, Sci_Position length, int,\n    WordList *keywordslists[], Accessor &styler) {\n\n    bool compact = styler.GetPropertyInt(\"fold.compact\") != 0;\n\n    WordList &foldingElements = *keywordslists[5];\n    Sci_Position endPos = startPos + length;\n    Sci_Position line = styler.GetLine(startPos);\n    int level = styler.LevelAt(line) & SC_FOLDLEVELNUMBERMASK;\n    int flags = styler.LevelAt(line) & ~SC_FOLDLEVELNUMBERMASK;\n\n    for(\n        Sci_Position currentPos = startPos;\n        currentPos < endPos;\n        currentPos++) {\n            char currentState = styler.StyleAt(currentPos);\n            char c = styler.SafeGetCharAt(currentPos, ' ');\n            Sci_Position prevLine = styler.GetLine(currentPos - 1);\n            line = styler.GetLine(currentPos);\n\n            // Default situation\n            if(prevLine < line) {\n                styler.SetLevel(line, (level|flags) & ~SC_FOLDLEVELHEADERFLAG);\n                flags = styler.LevelAt(line) & ~SC_FOLDLEVELNUMBERMASK;\n            }\n\n            if(\n                (\n                    currentState == SCE_MAGIK_CONTAINER ||\n                    currentState == SCE_MAGIK_FLOW\n                ) &&\n                c == '_') {\n\n                char keyword[50];\n                memset(keyword, '\\0', 50);\n\n                for(\n                    int scanPosition = 0;\n                    scanPosition < 50;\n                    scanPosition++) {\n                    char keywordChar = static_cast<char>(\n                        tolower(styler.SafeGetCharAt(\n                            scanPosition +\n                                currentPos + 1, ' ')));\n                    if(IsAlpha(keywordChar)) {\n                        keyword[scanPosition] = keywordChar;\n                    } else {\n                        break;\n                    }\n                }\n\n                if(IsFoldingContainer(foldingElements, keyword) > 0) {\n                    styler.SetLevel(\n                        line,\n                        styler.LevelAt(line) | SC_FOLDLEVELHEADERFLAG);\n                    level++;\n                } else if(IsFoldingContainer(foldingElements, keyword) < 0) {\n                    styler.SetLevel(line, styler.LevelAt(line));\n                    level--;\n                }\n            }\n\n            if(\n                compact && (\n                    currentState == SCE_MAGIK_BRACE_BLOCK ||\n                    currentState == SCE_MAGIK_BRACKET_BLOCK ||\n                    currentState == SCE_MAGIK_SQBRACKET_BLOCK)) {\n                if(c == '{' || c == '[' || c == '(') {\n                    styler.SetLevel(\n                        line,\n                        styler.LevelAt(line) | SC_FOLDLEVELHEADERFLAG);\n                    level++;\n                } else if(c == '}' || c == ']' || c == ')') {\n                    styler.SetLevel(line, styler.LevelAt(line));\n                    level--;\n                }\n            }\n        }\n\n}\n\n/**\n * Injecting the module\n */\nLexerModule lmMagikSF(\n    SCLEX_MAGIK, ColouriseMagikDoc, \"magiksf\", FoldMagikDoc, magikWordListDesc);\n\n"
  },
  {
    "path": "lexilla/lexers/LexMake.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexMake.cxx\n ** Lexer for make files.\n **/\n// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <cstdlib>\n#include <cassert>\n#include <cstring>\n#include <cctype>\n#include <cstdio>\n#include <cstdarg>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nstatic inline bool AtEOL(Accessor &styler, Sci_PositionU i) {\n\treturn (styler[i] == '\\n') ||\n\t       ((styler[i] == '\\r') && (styler.SafeGetCharAt(i + 1) != '\\n'));\n}\n\nstatic void ColouriseMakeLine(\n\tconst std::string &lineBuffer,\n    Sci_PositionU startLine,\n    Sci_PositionU endPos,\n    Accessor &styler) {\n\n\tconst Sci_PositionU lengthLine = lineBuffer.length();\n\tSci_PositionU i = 0;\n\tSci_Position lastNonSpace = -1;\n\tunsigned int state = SCE_MAKE_DEFAULT;\n\tbool bSpecial = false;\n\n\t// check for a tab character in column 0 indicating a command\n\tbool bCommand = false;\n\tif ((lengthLine > 0) && (lineBuffer[0] == '\\t'))\n\t\tbCommand = true;\n\n\t// Skip initial spaces\n\twhile ((i < lengthLine) && isspacechar(lineBuffer[i])) {\n\t\ti++;\n\t}\n\tif (i < lengthLine) {\n\t\tif (lineBuffer[i] == '#') {\t// Comment\n\t\t\tstyler.ColourTo(endPos, SCE_MAKE_COMMENT);\n\t\t\treturn;\n\t\t}\n\t\tif (lineBuffer[i] == '!') {\t// Special directive\n\t\t\tstyler.ColourTo(endPos, SCE_MAKE_PREPROCESSOR);\n\t\t\treturn;\n\t\t}\n\t}\n\tint varCount = 0;\n\twhile (i < lengthLine) {\n\t\tif (((i + 1) < lengthLine) && (lineBuffer[i] == '$' && lineBuffer[i + 1] == '(')) {\n\t\t\tstyler.ColourTo(startLine + i - 1, state);\n\t\t\tstate = SCE_MAKE_IDENTIFIER;\n\t\t\tvarCount++;\n\t\t} else if (state == SCE_MAKE_IDENTIFIER && lineBuffer[i] == ')') {\n\t\t\tif (--varCount == 0) {\n\t\t\t\tstyler.ColourTo(startLine + i, state);\n\t\t\t\tstate = SCE_MAKE_DEFAULT;\n\t\t\t}\n\t\t}\n\n\t\t// skip identifier and target styling if this is a command line\n\t\tif (!bSpecial && !bCommand) {\n\t\t\tif (lineBuffer[i] == ':') {\n\t\t\t\tif (((i + 1) < lengthLine) && (lineBuffer[i + 1] == '=')) {\n\t\t\t\t\t// it's a ':=', so style as an identifier\n\t\t\t\t\tif (lastNonSpace >= 0)\n\t\t\t\t\t\tstyler.ColourTo(startLine + lastNonSpace, SCE_MAKE_IDENTIFIER);\n\t\t\t\t\tstyler.ColourTo(startLine + i - 1, SCE_MAKE_DEFAULT);\n\t\t\t\t\tstyler.ColourTo(startLine + i + 1, SCE_MAKE_OPERATOR);\n\t\t\t\t} else {\n\t\t\t\t\t// We should check that no colouring was made since the beginning of the line,\n\t\t\t\t\t// to avoid colouring stuff like /OUT:file\n\t\t\t\t\tif (lastNonSpace >= 0)\n\t\t\t\t\t\tstyler.ColourTo(startLine + lastNonSpace, SCE_MAKE_TARGET);\n\t\t\t\t\tstyler.ColourTo(startLine + i - 1, SCE_MAKE_DEFAULT);\n\t\t\t\t\tstyler.ColourTo(startLine + i, SCE_MAKE_OPERATOR);\n\t\t\t\t}\n\t\t\t\tbSpecial = true;\t// Only react to the first ':' of the line\n\t\t\t\tstate = SCE_MAKE_DEFAULT;\n\t\t\t} else if (lineBuffer[i] == '=') {\n\t\t\t\tif (lastNonSpace >= 0)\n\t\t\t\t\tstyler.ColourTo(startLine + lastNonSpace, SCE_MAKE_IDENTIFIER);\n\t\t\t\tstyler.ColourTo(startLine + i - 1, SCE_MAKE_DEFAULT);\n\t\t\t\tstyler.ColourTo(startLine + i, SCE_MAKE_OPERATOR);\n\t\t\t\tbSpecial = true;\t// Only react to the first '=' of the line\n\t\t\t\tstate = SCE_MAKE_DEFAULT;\n\t\t\t}\n\t\t}\n\t\tif (!isspacechar(lineBuffer[i])) {\n\t\t\tlastNonSpace = i;\n\t\t}\n\t\ti++;\n\t}\n\tif (state == SCE_MAKE_IDENTIFIER) {\n\t\tstyler.ColourTo(endPos, SCE_MAKE_IDEOL);\t// Error, variable reference not ended\n\t} else {\n\t\tstyler.ColourTo(endPos, SCE_MAKE_DEFAULT);\n\t}\n}\n\nstatic void ColouriseMakeDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[], Accessor &styler) {\n\tstd::string lineBuffer;\n\tstyler.StartAt(startPos);\n\tstyler.StartSegment(startPos);\n\tSci_PositionU startLine = startPos;\n\tfor (Sci_PositionU i = startPos; i < startPos + length; i++) {\n\t\tlineBuffer.push_back(styler[i]);\n\t\tif (AtEOL(styler, i)) {\n\t\t\t// End of line (or of line buffer) met, colourise it\n\t\t\tColouriseMakeLine(lineBuffer, startLine, i, styler);\n\t\t\tlineBuffer.clear();\n\t\t\tstartLine = i + 1;\n\t\t}\n\t}\n\tif (!lineBuffer.empty()) {\t// Last line does not have ending characters\n\t\tColouriseMakeLine(lineBuffer, startLine, startPos + length - 1, styler);\n\t}\n}\n\nstatic const char *const emptyWordListDesc[] = {\n\tnullptr\n};\n\nLexerModule lmMake(SCLEX_MAKEFILE, ColouriseMakeDoc, \"makefile\", nullptr, emptyWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexMarkdown.cxx",
    "content": "/******************************************************************\n *  LexMarkdown.cxx\n *\n *  A simple Markdown lexer for scintilla.\n *\n *  Includes highlighting for some extra features from the\n *  Pandoc implementation; strikeout, using '#.' as a default\n *  ordered list item marker, and delimited code blocks.\n *\n *  Limitations:\n *\n *  Standard indented code blocks are not highlighted at all,\n *  as it would conflict with other indentation schemes. Use\n *  delimited code blocks for blanket highlighting of an\n *  entire code block.  Embedded HTML is not highlighted either.\n *  Blanket HTML highlighting has issues, because some Markdown\n *  implementations allow Markdown markup inside of the HTML. Also,\n *  there is a following blank line issue that can't be ignored,\n *  explained in the next paragraph. Embedded HTML and code\n *  blocks would be better supported with language specific\n *  highlighting.\n *\n *  The highlighting aims to accurately reflect correct syntax,\n *  but a few restrictions are relaxed. Delimited code blocks are\n *  highlighted, even if the line following the code block is not blank.\n *  Requiring a blank line after a block, breaks the highlighting\n *  in certain cases, because of the way Scintilla ends up calling\n *  the lexer.\n *\n *  Written by Jon Strait - jstrait@moonloop.net\n *\n *  The License.txt file describes the conditions under which this\n *  software may be distributed.\n *\n *****************************************************************/\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nnamespace {\n\nconstexpr bool IsNewline(const int ch) {\n    // sc.GetRelative(i) returns '\\0' if out of range\n    return (ch == '\\n' || ch == '\\r' || ch == '\\0');\n}\n\n}\n\n// True if can follow ch down to the end with possibly trailing whitespace\n// Does not set the state SCE_MARKDOWN_LINE_BEGIN as to allow further processing\nstatic bool FollowToLineEnd(const int ch, const int state, const Sci_PositionU endPos, StyleContext &sc) {\n    Sci_Position i = 0;\n    while (sc.GetRelative(++i) == ch)\n        ;\n    // Skip over whitespace\n    while (IsASpaceOrTab(sc.GetRelative(i)) && sc.currentPos + i < endPos)\n        ++i;\n    if (IsNewline(sc.GetRelative(i)) || sc.currentPos + i == endPos) {\n        sc.SetState(state);\n        sc.Forward(i);\n        return true;\n    }\n    else return false;\n}\n\n// Set the state on text section from current to length characters,\n// then set the rest until the newline to default, except for any characters matching token\nstatic void SetStateAndZoom(const int state, const Sci_Position length, const int token, StyleContext &sc) {\n    sc.SetState(state);\n    sc.Forward(length);\n    sc.SetState(SCE_MARKDOWN_DEFAULT);\n    sc.Forward();\n    bool started = false;\n    while (sc.More() && !IsNewline(sc.ch)) {\n        if (sc.ch == token && !started) {\n            sc.SetState(state);\n            started = true;\n        }\n        else if (sc.ch != token) {\n            sc.SetState(SCE_MARKDOWN_DEFAULT);\n            started = false;\n        }\n        sc.Forward();\n    }\n    sc.SetState(SCE_MARKDOWN_LINE_BEGIN);\n}\n\n// Does the previous line have more than spaces and tabs?\nstatic bool HasPrevLineContent(StyleContext &sc) {\n    Sci_Position i = 0;\n    // Go back to the previous newline\n    while ((--i + (Sci_Position)sc.currentPos) >= 0 && !IsNewline(sc.GetRelative(i)))\n        ;\n    while ((--i + (Sci_Position)sc.currentPos) >= 0) {\n        const int ch = sc.GetRelative(i);\n        if (ch == '\\n')\n            break;\n        if (!((ch == '\\r' || IsASpaceOrTab(ch))))\n            return true;\n    }\n    return false;\n}\n\nstatic bool AtTermStart(StyleContext &sc) {\n    return sc.currentPos == 0 || sc.chPrev == 0 || isspacechar(sc.chPrev);\n}\n\nstatic bool IsCompleteStyleRegion(StyleContext &sc, const char *token) {\n    bool found = false;\n    const size_t start = strlen(token);\n    Sci_Position i = static_cast<Sci_Position>(start);\n    while (!IsNewline(sc.GetRelative(i))) {\n        // make sure an empty pair of single-char tokens doesn't match\n        // with a longer token: {*}{*} != {**}\n        if (sc.GetRelative(i) == *token && sc.GetRelative(i - 1) != *token) {\n            found = start > 1U ? sc.GetRelative(i + 1) == token[1] : true;\n            break;\n        }\n        i++;\n    }\n    return AtTermStart(sc) && found;\n}\n\nstatic bool IsValidHrule(const Sci_PositionU endPos, StyleContext &sc) {\n    int count = 1;\n    Sci_Position i = 0;\n    for (;;) {\n        ++i;\n        int c = sc.GetRelative(i);\n        if (c == sc.ch)\n            ++count;\n        // hit a terminating character\n        else if (!IsASpaceOrTab(c) || sc.currentPos + i == endPos) {\n            // Are we a valid HRULE\n            if ((IsNewline(c) || sc.currentPos + i == endPos) &&\n                    count >= 3 && !HasPrevLineContent(sc)) {\n                sc.SetState(SCE_MARKDOWN_HRULE);\n                sc.Forward(i);\n                sc.SetState(SCE_MARKDOWN_LINE_BEGIN);\n                return true;\n            }\n            else {\n                sc.SetState(SCE_MARKDOWN_DEFAULT);\n                return false;\n            }\n        }\n    }\n}\n\nstatic void ColorizeMarkdownDoc(Sci_PositionU startPos, Sci_Position length, int initStyle,\n                                WordList **, Accessor &styler) {\n    Sci_PositionU endPos = startPos + length;\n    int precharCount = 0;\n    bool isLinkNameDetecting = false;\n    // Don't advance on a new loop iteration and retry at the same position.\n    // Useful in the corner case of having to start at the beginning file position\n    // in the default state.\n    bool freezeCursor = false;\n\n    // property lexer.markdown.header.eolfill\n    //  Set to 1 to highlight all ATX header text.\n    bool headerEOLFill = styler.GetPropertyInt(\"lexer.markdown.header.eolfill\", 0) == 1;\n\n    StyleContext sc(startPos, static_cast<Sci_PositionU>(length), initStyle, styler);\n\n    while (sc.More()) {\n        // Skip past escaped characters\n        if (sc.ch == '\\\\') {\n            sc.Forward();\n            continue;\n        }\n\n        // A blockquotes resets the line semantics\n        if (sc.state == SCE_MARKDOWN_BLOCKQUOTE)\n            sc.SetState(SCE_MARKDOWN_LINE_BEGIN);\n\n        // Conditional state-based actions\n        if (sc.state == SCE_MARKDOWN_CODE2) {\n            if (sc.Match(\"``\")) {\n                const int closingSpan = (sc.GetRelative(2) == '`') ? 3 : 2;\n                sc.Forward(closingSpan);\n                sc.SetState(SCE_MARKDOWN_DEFAULT);\n            }\n        }\n        else if (sc.state == SCE_MARKDOWN_CODE) {\n            if (sc.ch == '`' && sc.chPrev != ' ')\n                sc.ForwardSetState(SCE_MARKDOWN_DEFAULT);\n        }\n        /* De-activated because it gets in the way of other valid indentation\n         * schemes, for example multiple paragraphs inside a list item.\n        // Code block\n        else if (sc.state == SCE_MARKDOWN_CODEBK) {\n            bool d = true;\n            if (IsNewline(sc.ch)) {\n                if (sc.chNext != '\\t') {\n                    for (int c = 1; c < 5; ++c) {\n                        if (sc.GetRelative(c) != ' ')\n                            d = false;\n                    }\n                }\n            }\n            else if (sc.atLineStart) {\n                if (sc.ch != '\\t' ) {\n                    for (int i = 0; i < 4; ++i) {\n                        if (sc.GetRelative(i) != ' ')\n                            d = false;\n                    }\n                }\n            }\n            if (!d)\n                sc.SetState(SCE_MARKDOWN_LINE_BEGIN);\n        }\n        */\n        // Strong\n        else if (sc.state == SCE_MARKDOWN_STRONG1) {\n            if ((sc.Match(\"**\") && sc.chPrev != ' ') || IsNewline(sc.GetRelative(2))) {\n                sc.Forward(2);\n                sc.SetState(SCE_MARKDOWN_DEFAULT);\n            }\n        }\n        else if (sc.state == SCE_MARKDOWN_STRONG2) {\n            if ((sc.Match(\"__\") && sc.chPrev != ' ') || IsNewline(sc.GetRelative(2))) {\n                sc.Forward(2);\n                sc.SetState(SCE_MARKDOWN_DEFAULT);\n            }\n        }\n        // Emphasis\n        else if (sc.state == SCE_MARKDOWN_EM1) {\n            if ((sc.ch == '*' && sc.chPrev != ' ') || IsNewline(sc.chNext))\n                sc.ForwardSetState(SCE_MARKDOWN_DEFAULT);\n        }\n        else if (sc.state == SCE_MARKDOWN_EM2) {\n            if ((sc.ch == '_' && sc.chPrev != ' ') || IsNewline(sc.chNext))\n                sc.ForwardSetState(SCE_MARKDOWN_DEFAULT);\n        }\n        else if (sc.state == SCE_MARKDOWN_CODEBK) {\n            if (sc.atLineStart && sc.Match(\"~~~\")) {\n                Sci_Position i = 1;\n                while (!IsNewline(sc.GetRelative(i)) && sc.currentPos + i < endPos)\n                    i++;\n                sc.Forward(i);\n                sc.SetState(SCE_MARKDOWN_DEFAULT);\n            }\n        }\n        else if (sc.state == SCE_MARKDOWN_STRIKEOUT) {\n            if ((sc.Match(\"~~\") && sc.chPrev != ' ') || IsNewline(sc.GetRelative(2))) {\n                sc.Forward(2);\n                sc.SetState(SCE_MARKDOWN_DEFAULT);\n            }\n        }\n        else if (sc.state == SCE_MARKDOWN_LINE_BEGIN) {\n            // Header\n            if (sc.Match(\"######\")) {\n                if (headerEOLFill)\n                    sc.SetState(SCE_MARKDOWN_HEADER6);\n                else\n                    SetStateAndZoom(SCE_MARKDOWN_HEADER6, 6, '#', sc);\n            }\n            else if (sc.Match(\"#####\")) {\n                if (headerEOLFill)\n                    sc.SetState(SCE_MARKDOWN_HEADER5);\n                else\n                    SetStateAndZoom(SCE_MARKDOWN_HEADER5, 5, '#', sc);\n            }\n            else if (sc.Match(\"####\")) {\n                if (headerEOLFill)\n                    sc.SetState(SCE_MARKDOWN_HEADER4);\n                else\n                    SetStateAndZoom(SCE_MARKDOWN_HEADER4, 4, '#', sc);\n            }\n            else if (sc.Match(\"###\")) {\n                if (headerEOLFill)\n                    sc.SetState(SCE_MARKDOWN_HEADER3);\n                else\n                    SetStateAndZoom(SCE_MARKDOWN_HEADER3, 3, '#', sc);\n            }\n            else if (sc.Match(\"##\")) {\n                if (headerEOLFill)\n                    sc.SetState(SCE_MARKDOWN_HEADER2);\n                else\n                    SetStateAndZoom(SCE_MARKDOWN_HEADER2, 2, '#', sc);\n            }\n            else if (sc.Match(\"#\")) {\n                // Catch the special case of an unordered list\n                if (sc.chNext == '.' && IsASpaceOrTab(sc.GetRelative(2))) {\n                    precharCount = 0;\n                    sc.SetState(SCE_MARKDOWN_PRECHAR);\n                }\n                else if (headerEOLFill) {\n                    sc.SetState(SCE_MARKDOWN_HEADER1);\n                }\n                else\n                    SetStateAndZoom(SCE_MARKDOWN_HEADER1, 1, '#', sc);\n            }\n            // Code block\n            else if (sc.Match(\"~~~\")) {\n                if (!HasPrevLineContent(sc))\n                    sc.SetState(SCE_MARKDOWN_CODEBK);\n                else\n                    sc.SetState(SCE_MARKDOWN_DEFAULT);\n            }\n            else if (sc.ch == '=') {\n                if (HasPrevLineContent(sc) && FollowToLineEnd('=', SCE_MARKDOWN_HEADER1, endPos, sc)) {\n                    if (!headerEOLFill)\n                        sc.SetState(SCE_MARKDOWN_LINE_BEGIN);\n                }\n                else\n                    sc.SetState(SCE_MARKDOWN_DEFAULT);\n            }\n            else if (sc.ch == '-') {\n                if (HasPrevLineContent(sc) && FollowToLineEnd('-', SCE_MARKDOWN_HEADER2, endPos, sc)) {\n                    if (!headerEOLFill)\n                        sc.SetState(SCE_MARKDOWN_LINE_BEGIN);\n                }\n                else {\n                    precharCount = 0;\n                    sc.SetState(SCE_MARKDOWN_PRECHAR);\n                }\n            }\n            else if (IsNewline(sc.ch))\n                sc.SetState(SCE_MARKDOWN_LINE_BEGIN);\n            else {\n                precharCount = 0;\n                sc.SetState(SCE_MARKDOWN_PRECHAR);\n            }\n        }\n\n        // The header lasts until the newline\n        else if (sc.state == SCE_MARKDOWN_HEADER1 || sc.state == SCE_MARKDOWN_HEADER2 ||\n                 sc.state == SCE_MARKDOWN_HEADER3 || sc.state == SCE_MARKDOWN_HEADER4 ||\n                 sc.state == SCE_MARKDOWN_HEADER5 || sc.state == SCE_MARKDOWN_HEADER6) {\n            if (headerEOLFill) {\n                if (sc.atLineStart) {\n                    sc.SetState(SCE_MARKDOWN_LINE_BEGIN);\n                    freezeCursor = true;\n                }\n            }\n            else if (IsNewline(sc.ch))\n                sc.SetState(SCE_MARKDOWN_LINE_BEGIN);\n        }\n\n        // New state only within the initial whitespace\n        if (sc.state == SCE_MARKDOWN_PRECHAR) {\n            // Blockquote\n            if (sc.ch == '>' && precharCount < 5)\n                sc.SetState(SCE_MARKDOWN_BLOCKQUOTE);\n            /*\n            // Begin of code block\n            else if (!HasPrevLineContent(sc) && (sc.chPrev == '\\t' || precharCount >= 4))\n                sc.SetState(SCE_MARKDOWN_CODEBK);\n            */\n            // HRule - Total of three or more hyphens, asterisks, or underscores\n            // on a line by themselves\n            else if ((sc.ch == '-' || sc.ch == '*' || sc.ch == '_') && IsValidHrule(endPos, sc))\n                ;\n            // Unordered list\n            else if ((sc.ch == '-' || sc.ch == '*' || sc.ch == '+') && IsASpaceOrTab(sc.chNext)) {\n                sc.SetState(SCE_MARKDOWN_ULIST_ITEM);\n                sc.ForwardSetState(SCE_MARKDOWN_DEFAULT);\n            }\n            // Ordered list\n            else if (IsADigit(sc.ch)) {\n                int digitCount = 0;\n                while (IsADigit(sc.GetRelative(++digitCount)))\n                    ;\n                if (sc.GetRelative(digitCount) == '.' &&\n                        IsASpaceOrTab(sc.GetRelative(digitCount + 1))) {\n                    sc.SetState(SCE_MARKDOWN_OLIST_ITEM);\n                    sc.Forward(digitCount + 1);\n                    sc.SetState(SCE_MARKDOWN_DEFAULT);\n                } else {\n                    // a textual number at the margin should be plain text\n                    sc.SetState(SCE_MARKDOWN_DEFAULT);\n                }\n            }\n            // Alternate Ordered list\n            else if (sc.ch == '#' && sc.chNext == '.' && IsASpaceOrTab(sc.GetRelative(2))) {\n                sc.SetState(SCE_MARKDOWN_OLIST_ITEM);\n                sc.Forward(2);\n                sc.SetState(SCE_MARKDOWN_DEFAULT);\n            }\n            else if (sc.ch != ' ' || precharCount > 2)\n                sc.SetState(SCE_MARKDOWN_DEFAULT);\n            else\n                ++precharCount;\n        }\n\n        // Any link\n        if (sc.state == SCE_MARKDOWN_LINK) {\n            if (sc.Match(\"](\") && sc.GetRelative(-1) != '\\\\') {\n                sc.Forward(2);\n                isLinkNameDetecting = true;\n            }\n            else if (sc.Match(\"]:\") && sc.GetRelative(-1) != '\\\\') {\n                sc.Forward(2);\n                sc.SetState(SCE_MARKDOWN_DEFAULT);\n            }\n            else if (!isLinkNameDetecting && sc.ch == ']' && sc.GetRelative(-1) != '\\\\') {\n                sc.Forward();\n                sc.SetState(SCE_MARKDOWN_DEFAULT);\n            }\n            else if (isLinkNameDetecting && sc.ch == ')' && sc.GetRelative(-1) != '\\\\') {\n                sc.Forward();\n                sc.SetState(SCE_MARKDOWN_DEFAULT);\n                isLinkNameDetecting = false;\n            }\n        }\n\n        // New state anywhere in doc\n        if (sc.state == SCE_MARKDOWN_DEFAULT) {\n            if (sc.atLineStart && sc.ch == '#') {\n                sc.SetState(SCE_MARKDOWN_LINE_BEGIN);\n                freezeCursor = true;\n            }\n            // Links and Images\n            if (sc.Match(\"![\")) {\n                sc.SetState(SCE_MARKDOWN_LINK);\n                sc.Forward(1);\n            }\n            else if (sc.ch == '[' && sc.GetRelative(-1) != '\\\\') {\n                sc.SetState(SCE_MARKDOWN_LINK);\n            }\n            // Code - also a special case for alternate inside spacing\n            else if (sc.Match(\"``\") && sc.GetRelative(3) != ' ' && AtTermStart(sc)) {\n                const int openingSpan = (sc.GetRelative(2) == '`') ? 2 : 1;\n                sc.SetState(SCE_MARKDOWN_CODE2);\n                sc.Forward(openingSpan);\n            }\n            else if (sc.ch == '`' && sc.chNext != ' ' && IsCompleteStyleRegion(sc, \"`\")) {\n                sc.SetState(SCE_MARKDOWN_CODE);\n            }\n            // Strong\n            else if (sc.Match(\"**\") && sc.GetRelative(2) != ' ' && IsCompleteStyleRegion(sc, \"**\")) {\n                sc.SetState(SCE_MARKDOWN_STRONG1);\n                sc.Forward();\n            }\n            else if (sc.Match(\"__\") && sc.GetRelative(2) != ' ' && IsCompleteStyleRegion(sc, \"__\")) {\n                sc.SetState(SCE_MARKDOWN_STRONG2);\n                sc.Forward();\n            }\n            // Emphasis\n            else if (sc.ch == '*' && sc.chNext != ' ' && IsCompleteStyleRegion(sc, \"*\")) {\n                sc.SetState(SCE_MARKDOWN_EM1);\n            }\n            else if (sc.ch == '_' && sc.chNext != ' ' && IsCompleteStyleRegion(sc, \"_\")) {\n                sc.SetState(SCE_MARKDOWN_EM2);\n            }\n            // Strikeout\n            else if (sc.Match(\"~~\") && !(sc.GetRelative(2) == '~' || sc.GetRelative(2) == ' ') &&\n                     IsCompleteStyleRegion(sc, \"~~\")) {\n                sc.SetState(SCE_MARKDOWN_STRIKEOUT);\n                sc.Forward();\n            }\n            // Beginning of line\n            else if (IsNewline(sc.ch)) {\n                sc.SetState(SCE_MARKDOWN_LINE_BEGIN);\n            }\n        }\n        // Advance if not holding back the cursor for this iteration.\n        if (!freezeCursor)\n            sc.Forward();\n        freezeCursor = false;\n    }\n    sc.Complete();\n}\n\nLexerModule lmMarkdown(SCLEX_MARKDOWN, ColorizeMarkdownDoc, \"markdown\");\n"
  },
  {
    "path": "lexilla/lexers/LexMatlab.cxx",
    "content": "// Scintilla source code edit control\n// Encoding: UTF-8\n/** @file LexMatlab.cxx\n ** Lexer for Matlab.\n ** Written by José Fonseca\n **\n ** Changes by Christoph Dalitz 2003/12/04:\n **   - added support for Octave\n **   - Strings can now be included both in single or double quotes\n **\n ** Changes by John Donoghue 2012/04/02\n **   - added block comment (and nested block comments)\n **   - added ... displayed as a comment\n **   - removed unused IsAWord functions\n **   - added some comments\n **\n ** Changes by John Donoghue 2014/08/01\n **   - fix allowed transpose ' after {} operator\n **\n ** Changes by John Donoghue 2016/11/15\n **   - update matlab code folding\n **\n ** Changes by John Donoghue 2017/01/18\n **   - update matlab block comment detection\n **\n ** Changes by Andrey Smolyakov 2022/04/15\n **   - add support for \"arguments\" block and class definition syntax\n **/\n// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nstatic bool IsMatlabCommentChar(int c) {\n\treturn (c == '%') ;\n}\n\nstatic bool IsOctaveCommentChar(int c) {\n\treturn (c == '%' || c == '#') ;\n}\n\nstatic inline int LowerCase(int c) {\n\tif (c >= 'A' && c <= 'Z')\n\t\treturn 'a' + c - 'A';\n\treturn c;\n}\n\nstatic int CheckKeywordFoldPoint(char *str) {\n\tif (strcmp (\"if\", str) == 0 ||\n\t\tstrcmp (\"for\", str) == 0 ||\n\t\tstrcmp (\"switch\", str) == 0 ||\n\t\tstrcmp (\"while\", str) == 0 ||\n\t\tstrcmp (\"try\", str) == 0 ||\n\t\tstrcmp (\"do\", str) == 0 ||\n\t\tstrcmp (\"parfor\", str) == 0 ||\n\t\tstrcmp (\"classdef\", str) == 0 ||\n\t\tstrcmp (\"spmd\", str) == 0 ||\n\t\tstrcmp (\"arguments\", str) == 0 ||\n\t\tstrcmp (\"methods\", str) == 0 ||\n\t\tstrcmp (\"properties\", str) == 0 ||\n\t\tstrcmp (\"events\", str) == 0 ||\n\t\tstrcmp (\"function\", str) == 0)\n\t\treturn 1;\n\tif (strncmp(\"end\", str, 3) == 0 ||\n\t\tstrcmp(\"until\", str) == 0)\n\t\treturn -1;\n\treturn 0;\n}\n\nstatic bool IsSpaceToEOL(Sci_Position startPos, Accessor &styler) {\n\tSci_Position line = styler.GetLine(startPos);\n\tSci_Position eol_pos = styler.LineStart(line + 1) - 1;\n\tfor (Sci_Position i = startPos; i < eol_pos; i++) {\n\t\tchar ch = styler[i];\n\t\tif(!IsASpace(ch)) return false;\n\t}\n\treturn true;\n}\n\n#define MATLAB_STATE_FOLD_LVL_OFFSET     8\n#define MATLAB_STATE_FOLD_LVL_MASK       (0xFF00)\n#define MATLAB_STATE_FLAGS_OFFSET        16\n#define MATLAB_STATE_COMM_DEPTH_OFFSET   0\n#define MATLAB_STATE_COMM_DEPTH_MASK     (0xFF)\n#define MATLAB_STATE_EXPECTING_ARG_BLOCK (1 << MATLAB_STATE_FLAGS_OFFSET)\n#define MATLAB_STATE_IN_CLASS_SCOPE      (1 <<(MATLAB_STATE_FLAGS_OFFSET+1))\n#define MATLAB_STATE_IN_ARGUMENTS_SCOPE  (1 <<(MATLAB_STATE_FLAGS_OFFSET+2))\n\nstatic int ComposeLineState(int commentDepth,\n\t\t\t\t\t\t\tint foldingLevel,\n\t\t\t\t\t\t\tint expectingArgumentsBlock,\n\t\t\t\t\t\t\tint inClassScope,\n\t\t\t\t\t\t\tint inArgumentsScope) {\n\n\treturn  ((commentDepth << MATLAB_STATE_COMM_DEPTH_OFFSET)\n\t\t\t\t& MATLAB_STATE_COMM_DEPTH_MASK)\t\t\t\t\t|\n\t\t\t((foldingLevel << MATLAB_STATE_FOLD_LVL_OFFSET)\n\t\t\t\t& MATLAB_STATE_FOLD_LVL_MASK)\t\t\t\t\t|\n\t\t\t(expectingArgumentsBlock\n\t\t\t\t& MATLAB_STATE_EXPECTING_ARG_BLOCK)\t\t\t\t|\n\t\t\t(inClassScope\n\t\t\t\t& MATLAB_STATE_IN_CLASS_SCOPE)\t\t\t\t\t|\n\t\t\t(inArgumentsScope\n\t\t\t\t& MATLAB_STATE_IN_ARGUMENTS_SCOPE);\n}\n\nstatic void ColouriseMatlabOctaveDoc(\n            Sci_PositionU startPos, Sci_Position length, int initStyle,\n            WordList *keywordlists[], Accessor &styler,\n            bool (*IsCommentChar)(int),\n            bool ismatlab) {\n\n\tWordList &keywords = *keywordlists[0];\n\n\tstyler.StartAt(startPos);\n\n\t// boolean for when the ' is allowed to be transpose vs the start/end\n\t// of a string\n\tbool transpose = false;\n\n\t// count of brackets as boolean for when end could be an operator not a keyword\n\tint allow_end_op = 0;\n\n\t// approximate position of first non space character in a line\n\tint nonSpaceColumn = -1;\n\t// approximate column position of the current character in a line\n\tint column = 0;\n\n\t// This line contains a function declaration\n\tbool funcDeclarationLine = false;\n\t// We've just seen \"function\" keyword, so now we may expect the \"arguments\"\n\t// keyword opening the corresponding code block\n\tint expectingArgumentsBlock = 0;\n    // We saw \"arguments\" keyword, but not the closing \"end\"\n    int inArgumentsScope = 0;\n\t// Current line's folding level\n\tint foldingLevel = 0;\n\t// Current line in in class scope\n\tint inClassScope = 0;\n\n\t// use the line state of each line to store the block comment depth\n\tSci_Position curLine = styler.GetLine(startPos);\n\tint commentDepth = 0;\n\t// Restore the previous line's state, if there was such a line\n\tif (curLine > 0) {\n\t\tint prevState = styler.GetLineState(curLine-1);\n\t\tcommentDepth = (prevState & MATLAB_STATE_COMM_DEPTH_MASK)\n\t\t\t\t\t\t\t>> MATLAB_STATE_COMM_DEPTH_OFFSET;\n\t\tfoldingLevel = (prevState & MATLAB_STATE_FOLD_LVL_MASK)\n\t\t\t\t\t\t\t>> MATLAB_STATE_FOLD_LVL_OFFSET;\n\t\texpectingArgumentsBlock = prevState & MATLAB_STATE_EXPECTING_ARG_BLOCK;\n\t\tinClassScope = prevState & MATLAB_STATE_IN_CLASS_SCOPE;\n\t\tinArgumentsScope = prevState & MATLAB_STATE_IN_ARGUMENTS_SCOPE;\n\t}\n\n\n\tStyleContext sc(startPos, length, initStyle, styler);\n\n\tfor (; sc.More(); sc.Forward(), column++) {\n\n\t\tif(sc.atLineStart) {\n\t\t\t// set the line state to the current commentDepth\n\t\t\tcurLine = styler.GetLine(sc.currentPos);\n\t\t\tstyler.SetLineState(curLine, ComposeLineState(\n\t\t\t\tcommentDepth, foldingLevel, expectingArgumentsBlock, inClassScope, inArgumentsScope));\n\n\t\t\t// reset the column to 0, nonSpace to -1 (not set)\n\t\t\tcolumn = 0;\n\t\t\tnonSpaceColumn = -1;\n\n\t\t\t// Reset the flag\n\t\t\tfuncDeclarationLine = false;\n\t\t}\n\n\t\t// Semicolon ends function declaration\n\t\t// This condition is for one line functions support\n\t\tif (sc.chPrev == ';') {\n\t\t\tfuncDeclarationLine = false;\n\t\t}\n\n\t\t// Only comments allowed between the function declaration and the\n\t\t// arguments code block\n\t\tif (expectingArgumentsBlock && !(funcDeclarationLine || inArgumentsScope)) {\n\t\t\tif ((sc.state != SCE_MATLAB_KEYWORD) &&\n\t\t\t\t\t(sc.state != SCE_MATLAB_COMMENT) &&\n\t\t\t\t\t(sc.state != SCE_MATLAB_DEFAULT) &&\n\t\t\t\t\t!(sc.state == SCE_MATLAB_OPERATOR && sc.chPrev == ';')) {\n\t\t\t\texpectingArgumentsBlock = 0;\n\t\t\t\tstyler.SetLineState(curLine, ComposeLineState(\n\t\t\t\t\tcommentDepth, foldingLevel, expectingArgumentsBlock, inClassScope, inArgumentsScope));\n\t\t\t}\n\t\t}\n\n\t\t// We've just left the class scope\n\t\tif ((foldingLevel ==0) && inClassScope) {\n\t\t\tinClassScope = 0;\n\t\t}\n\n\t\t// save the column position of first non space character in a line\n\t\tif((nonSpaceColumn == -1) && (! IsASpace(sc.ch))) {\n\t\t\tnonSpaceColumn = column;\n\t\t}\n\n\t\t// check for end of states\n\t\tif (sc.state == SCE_MATLAB_OPERATOR) {\n\t\t\tif (sc.chPrev == '.') {\n\t\t\t\tif (sc.ch == '*' || sc.ch == '/' || sc.ch == '\\\\' || sc.ch == '^') {\n\t\t\t\t\tsc.ForwardSetState(SCE_MATLAB_DEFAULT);\n\t\t\t\t\ttranspose = false;\n\t\t\t\t} else if (sc.ch == '\\'') {\n\t\t\t\t\tsc.ForwardSetState(SCE_MATLAB_DEFAULT);\n\t\t\t\t\ttranspose = true;\n\t\t\t\t} else if(sc.ch == '.' && sc.chNext == '.') {\n\t\t\t\t\t// we werent an operator, but a '...'\n\t\t\t\t\tsc.ChangeState(SCE_MATLAB_COMMENT);\n\t\t\t\t\ttranspose = false;\n\t\t\t\t} else {\n\t\t\t\t\tsc.SetState(SCE_MATLAB_DEFAULT);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tsc.SetState(SCE_MATLAB_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_MATLAB_KEYWORD) {\n\t\t\tif (!isalnum(sc.ch) && sc.ch != '_') {\n\t\t\t\tchar s[100];\n\t\t\t\tsc.GetCurrent(s, sizeof(s));\n\t\t\t\tbool notKeyword = false;\n\t\t\t\ttranspose = false;\n\n\t\t\t\tif (keywords.InList(s)) {\n\n\t\t\t\t\texpectingArgumentsBlock = (funcDeclarationLine || inArgumentsScope) ? expectingArgumentsBlock : 0;\n\n\t\t\t\t\tif (strcmp (\"end\", s) == 0 && allow_end_op) {\n\t\t\t\t\t\tsc.ChangeState(SCE_MATLAB_NUMBER);\n\t\t\t\t\t\tnotKeyword = true;\n\t\t\t\t\t} else if (strcmp(\"end\", s) == 0 && !allow_end_op) {\n\t\t\t\t\t\tinArgumentsScope = 0;\n\t\t\t\t\t} else if (strcmp(\"function\", s) == 0) {\n\t\t\t\t\t\t// Need this flag to handle \"arguments\" block correctly\n\t\t\t\t\t\tfuncDeclarationLine = true;\n\t\t\t\t\t\texpectingArgumentsBlock = ismatlab ? MATLAB_STATE_EXPECTING_ARG_BLOCK : 0;\n\t\t\t\t\t} else if (strcmp(\"classdef\", s) == 0) {\n\t\t\t\t\t\t// Need this flag to process \"events\", \"methods\" and \"properties\" blocks\n\t\t\t\t\t\tinClassScope = MATLAB_STATE_IN_CLASS_SCOPE;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// \"arguments\" is a keyword here, despite not being in the keywords list\n\t\t\t\t\tif (expectingArgumentsBlock && !(funcDeclarationLine || inArgumentsScope) && (strcmp(\"arguments\", s) == 0)) {\n\t\t\t\t\t\t// We've entered an \"arguments\" block\n\t\t\t\t\t\tinArgumentsScope = MATLAB_STATE_IN_ARGUMENTS_SCOPE;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Found an identifier or a keyword after the function declaration\n\t\t\t\t\t\t// No need to wait for the arguments block anymore\n\t\t\t\t\t\texpectingArgumentsBlock = (funcDeclarationLine || inArgumentsScope) ? expectingArgumentsBlock : 0;\n\n\t\t\t\t\t\t// \"properties\", \"methods\" and \"events\" are not keywords if they're declared\n\t\t\t\t\t\t// inside some function in methods block\n\t\t\t\t\t\t// To avoid tracking possible nested functions scopes, lexer considers everything\n\t\t\t\t\t\t// beyond level 2 of folding to be in a scope of some function declared in the\n\t\t\t\t\t\t// methods block. It is ok for the valid syntax: classes can only be declared in\n\t\t\t\t\t\t// a separate file, function - only in methods block. However, in case of the invalid\n\t\t\t\t\t\t// syntax lexer may erroneously ignore a keyword.\n\t\t\t\t\t\tif (!((inClassScope) && (foldingLevel <= 2) && (\n\t\t\t\t\t\t\t\tstrcmp(\"properties\", s) == 0 ||\n\t\t\t\t\t\t\t\tstrcmp(\"methods\",    s) == 0 ||\n\t\t\t\t\t\t\t\tstrcmp(\"events\",     s) == 0 ))) {\n\t\t\t\t\t\t\tsc.ChangeState(SCE_MATLAB_IDENTIFIER);\n\t\t\t\t\t\t\ttranspose = true;\n\t\t\t\t\t\t\tnotKeyword = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tsc.SetState(SCE_MATLAB_DEFAULT);\n\t\t\t\tif (!notKeyword) {\n\t\t\t\t\tfoldingLevel += CheckKeywordFoldPoint(s);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tstyler.SetLineState(curLine, ComposeLineState(\n\t\t\t\tcommentDepth, foldingLevel, expectingArgumentsBlock, inClassScope, inArgumentsScope));\n\t\t} else if (sc.state == SCE_MATLAB_NUMBER) {\n\t\t\tif (!isdigit(sc.ch) && sc.ch != '.'\n\t\t\t        && !(sc.ch == 'e' || sc.ch == 'E')\n\t\t\t        && !((sc.ch == '+' || sc.ch == '-') && (sc.chPrev == 'e' || sc.chPrev == 'E'))\n\t\t\t        && !(((sc.ch == 'x' || sc.ch == 'X') && sc.chPrev == '0') || (sc.ch >= 'a' && sc.ch <= 'f') || (sc.ch >= 'A' && sc.ch <= 'F'))\n\t\t\t        && !(sc.ch == 's' || sc.ch == 'S' || sc.ch == 'u' || sc.ch == 'U')\n\t\t\t        && !(sc.ch == 'i' || sc.ch == 'I' || sc.ch == 'j' || sc.ch == 'J')\n\t\t\t        && !(sc.ch == '_')) {\n\t\t\t\tsc.SetState(SCE_MATLAB_DEFAULT);\n\t\t\t\ttranspose = true;\n\t\t\t}\n\t\t} else if (sc.state == SCE_MATLAB_STRING) {\n\t\t\tif (sc.ch == '\\'') {\n\t\t\t\tif (sc.chNext == '\\'') {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t} else {\n\t\t\t\t\tsc.ForwardSetState(SCE_MATLAB_DEFAULT);\n\t\t\t\t}\n\t\t\t} else if (sc.MatchLineEnd()) {\n\t\t\t\tsc.SetState(SCE_MATLAB_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_MATLAB_DOUBLEQUOTESTRING) {\n\t\t\tif (sc.ch == '\\\\' && !ismatlab) {\n\t\t\t\tsc.Forward(); // skip escape sequence, new line and others after backlash\n\t\t\t} else if (sc.ch == '\\\"') {\n\t\t\t\tsc.ForwardSetState(SCE_MATLAB_DEFAULT);\n\t\t\t} else if (sc.MatchLineEnd()) {\n\t\t\t\tsc.SetState(SCE_MATLAB_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_MATLAB_COMMAND) {\n\t\t\tif (sc.atLineEnd) {\n\t\t\t\tsc.SetState(SCE_MATLAB_DEFAULT);\n\t\t\t\ttranspose = false;\n\t\t\t}\n\t\t} else if (sc.state == SCE_MATLAB_COMMENT) {\n\t\t\t// end or start of a nested a block comment?\n\t\t\tif( IsCommentChar(sc.ch) && sc.chNext == '}' && nonSpaceColumn == column && IsSpaceToEOL(sc.currentPos+2, styler)) {\n\t\t\t\tif(commentDepth > 0) commentDepth --;\n\n\t\t\t\tcurLine = styler.GetLine(sc.currentPos);\n\t\t\t\tstyler.SetLineState(curLine, ComposeLineState(\n\t\t\t\t\tcommentDepth, foldingLevel, expectingArgumentsBlock, inClassScope, inArgumentsScope));\n\t\t\t\tsc.Forward();\n\n\t\t\t\tif (commentDepth == 0) {\n\t\t\t\t\tsc.ForwardSetState(SCE_MATLAB_DEFAULT);\n\t\t\t\t\ttranspose = false;\n\t\t\t\t}\n\t\t\t} else if( IsCommentChar(sc.ch) && sc.chNext == '{' && nonSpaceColumn == column && IsSpaceToEOL(sc.currentPos+2, styler)) {\n\t\t\t\tcommentDepth ++;\n\n\t\t\t\tcurLine = styler.GetLine(sc.currentPos);\n\t\t\t\tstyler.SetLineState(curLine, ComposeLineState(\n\t\t\t\t\tcommentDepth, foldingLevel, expectingArgumentsBlock, inClassScope, inArgumentsScope));\n\t\t\t\tsc.Forward();\n\t\t\t\ttranspose = false;\n\n\t\t\t} else if(commentDepth == 0) {\n\t\t\t\t// single line comment\n\t\t\t\tif (sc.atLineEnd || sc.ch == '\\r' || sc.ch == '\\n') {\n\t\t\t\t\tsc.SetState(SCE_MATLAB_DEFAULT);\n\t\t\t\t\ttranspose = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// check start of a new state\n\t\tif (sc.state == SCE_MATLAB_DEFAULT) {\n\t\t\tif (IsCommentChar(sc.ch)) {\n\t\t\t\t// ncrement depth if we are a block comment\n\t\t\t\tif(sc.chNext == '{' && nonSpaceColumn == column) {\n\t\t\t\t\tif(IsSpaceToEOL(sc.currentPos+2, styler)) {\n\t\t\t\t\t\tcommentDepth ++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcurLine = styler.GetLine(sc.currentPos);\n\t\t\t\tstyler.SetLineState(curLine, ComposeLineState(\n\t\t\t\t\tcommentDepth, foldingLevel, expectingArgumentsBlock, inClassScope, inArgumentsScope));\n\t\t\t\tsc.SetState(SCE_MATLAB_COMMENT);\n\t\t\t} else if (sc.ch == '!' && sc.chNext != '=' ) {\n\t\t\t\tif(ismatlab) {\n\t\t\t\t\tsc.SetState(SCE_MATLAB_COMMAND);\n\t\t\t\t} else {\n\t\t\t\t\tsc.SetState(SCE_MATLAB_OPERATOR);\n\t\t\t\t}\n\t\t\t} else if (sc.ch == '\\'') {\n\t\t\t\tif (transpose) {\n\t\t\t\t\tsc.SetState(SCE_MATLAB_OPERATOR);\n\t\t\t\t} else {\n\t\t\t\t\tsc.SetState(SCE_MATLAB_STRING);\n\t\t\t\t}\n\t\t\t} else if (sc.ch == '\"') {\n\t\t\t\tsc.SetState(SCE_MATLAB_DOUBLEQUOTESTRING);\n\t\t\t} else if (isdigit(sc.ch) || (sc.ch == '.' && isdigit(sc.chNext))) {\n\t\t\t\tsc.SetState(SCE_MATLAB_NUMBER);\n\t\t\t} else if (isalpha(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_MATLAB_KEYWORD);\n\t\t\t} else if (isoperator(static_cast<char>(sc.ch)) || sc.ch == '@' || sc.ch == '\\\\') {\n\t\t\t\tif (sc.ch == '(' || sc.ch == '[' || sc.ch == '{') {\n\t\t\t\t\tallow_end_op ++;\n\t\t\t\t} else if ((sc.ch == ')' || sc.ch == ']' || sc.ch == '}') && (allow_end_op > 0)) {\n\t\t\t\t\tallow_end_op --;\n\t\t\t\t}\n\n\t\t\t\tif (sc.ch == ')' || sc.ch == ']' || sc.ch == '}') {\n\t\t\t\t\ttranspose = true;\n\t\t\t\t} else {\n\t\t\t\t\ttranspose = false;\n\t\t\t\t}\n\t\t\t\tsc.SetState(SCE_MATLAB_OPERATOR);\n\t\t\t} else {\n\t\t\t\ttranspose = false;\n\t\t\t}\n\t\t}\n\t}\n\tsc.Complete();\n}\n\nstatic void ColouriseMatlabDoc(Sci_PositionU startPos, Sci_Position length, int initStyle,\n                               WordList *keywordlists[], Accessor &styler) {\n\tColouriseMatlabOctaveDoc(startPos, length, initStyle, keywordlists, styler, IsMatlabCommentChar, true);\n}\n\nstatic void ColouriseOctaveDoc(Sci_PositionU startPos, Sci_Position length, int initStyle,\n                               WordList *keywordlists[], Accessor &styler) {\n\tColouriseMatlabOctaveDoc(startPos, length, initStyle, keywordlists, styler, IsOctaveCommentChar, false);\n}\n\nstatic void FoldMatlabOctaveDoc(Sci_PositionU startPos, Sci_Position length, int initStyle,\n                                WordList *[], Accessor &styler,\n                                bool (*IsComment)(int ch)) {\n\n\tif (styler.GetPropertyInt(\"fold\") == 0)\n\t\treturn;\n\n\tconst bool foldComment = styler.GetPropertyInt(\"fold.comment\") != 0;\n\tconst bool foldCompact = styler.GetPropertyInt(\"fold.compact\", 1) != 0;\n\n\tSci_PositionU endPos = startPos + length;\n\tint visibleChars = 0;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tint levelCurrent = SC_FOLDLEVELBASE;\n\tif (lineCurrent > 0)\n\t\tlevelCurrent = styler.LevelAt(lineCurrent-1) >> 16;\n\tint levelNext = levelCurrent;\n\tchar chNext = styler[startPos];\n\tint styleNext = styler.StyleAt(startPos);\n\tint style = initStyle;\n\tchar word[100];\n\tint wordlen = 0;\n\tfor (Sci_PositionU i = startPos; i < endPos; i++) {\n\t\tchar ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\tstyle = styleNext;\n\t\tstyleNext = styler.StyleAt(i + 1);\n\t\tbool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n\n\t\t// a line that starts with a comment\n\t\tif (foldComment && style == SCE_MATLAB_COMMENT && IsComment(ch) && visibleChars == 0) {\n\t\t\t// start/end of block comment\n\t\t\tif (chNext == '{' && IsSpaceToEOL(i+2, styler))\n\t\t\t\tlevelNext ++;\n\t\t\tif (chNext == '}' && IsSpaceToEOL(i+2, styler))\n\t\t\t\tlevelNext --;\n\t\t}\n\t\t// keyword\n\t\tif(style == SCE_MATLAB_KEYWORD) {\n\t\t\tword[wordlen++] = static_cast<char>(LowerCase(ch));\n\t\t\tif (wordlen == 100) {  // prevent overflow\n\t\t\t\tword[0] = '\\0';\n\t\t\t\twordlen = 1;\n\t\t\t}\n\t\t\tif (styleNext !=  SCE_MATLAB_KEYWORD) {\n\t\t\t\tword[wordlen] = '\\0';\n\t\t\t\twordlen = 0;\n\n\t\t\t\tlevelNext += CheckKeywordFoldPoint(word);\n\t\t\t}\n\t\t}\n\t\tif (!IsASpace(ch))\n\t\t\tvisibleChars++;\n\t\tif (atEOL || (i == endPos-1)) {\n\t\t\tint levelUse = levelCurrent;\n\t\t\tint lev = levelUse | levelNext << 16;\n\t\t\tif (visibleChars == 0 && foldCompact)\n\t\t\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\t\t\tif (levelUse < levelNext)\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\tif (lev != styler.LevelAt(lineCurrent)) {\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\t\t\t}\n\t\t\tlineCurrent++;\n\t\t\tlevelCurrent = levelNext;\n\t\t\tif (atEOL && (i == static_cast<Sci_PositionU>(styler.Length() - 1))) {\n\t\t\t\t// There is an empty line at end of file so give it same level and empty\n\t\t\t\tstyler.SetLevel(lineCurrent, (levelCurrent | levelCurrent << 16) | SC_FOLDLEVELWHITEFLAG);\n\t\t\t}\n\t\t\tvisibleChars = 0;\n\t\t}\n\t}\n}\n\nstatic void FoldMatlabDoc(Sci_PositionU startPos, Sci_Position length, int initStyle,\n                          WordList *keywordlists[], Accessor &styler) {\n\tFoldMatlabOctaveDoc(startPos, length, initStyle, keywordlists, styler, IsMatlabCommentChar);\n}\n\nstatic void FoldOctaveDoc(Sci_PositionU startPos, Sci_Position length, int initStyle,\n                          WordList *keywordlists[], Accessor &styler) {\n\tFoldMatlabOctaveDoc(startPos, length, initStyle, keywordlists, styler, IsOctaveCommentChar);\n}\n\nstatic const char * const matlabWordListDesc[] = {\n\t\"Keywords\",\n\t0\n};\n\nstatic const char * const octaveWordListDesc[] = {\n\t\"Keywords\",\n\t0\n};\n\nLexerModule lmMatlab(SCLEX_MATLAB, ColouriseMatlabDoc, \"matlab\", FoldMatlabDoc, matlabWordListDesc);\n\nLexerModule lmOctave(SCLEX_OCTAVE, ColouriseOctaveDoc, \"octave\", FoldOctaveDoc, octaveWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexMaxima.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexMaxima.cxx\n ** Lexer for Maxima (http://maxima.sourceforge.net).\n ** Written by Gunter Königsmann based on the lisp lexer by Alexey Yutkin and Neil Hodgson .\n **/\n// Copyright 2018 by Gunter Königsmann <wxMaxima@physikbuch.de>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\nusing namespace Lexilla;\n\nstatic inline bool isMaximaoperator(char ch) {\n  return (ch == '\\'' || ch == '`' || ch == '(' ||\n\t  ch == ')'  || ch == '[' || ch == ']' ||\n\t  ch == '{'  || ch == '}' || ch == '!' ||\n\t  ch == '*'  || ch == '/' || ch == '^' ||\n\t  ch == ','  || ch == ':' || ch == '+' ||\n\t  ch == '-');\n}\n\nstatic void ColouriseMaximaDoc(Sci_PositionU startPos, Sci_Position length, int lastStyle,\n\t\t\t       WordList *[],\n\t\t\t       Accessor &styler) {\n\n  styler.StartAt(startPos);\n\n  Sci_PositionU lengthDoc = startPos + length;\n  styler.StartSegment(startPos);\n\n  Sci_PositionU i = startPos;\n\n  // If we are in the middle of a comment we go back to its start before highlighting\n  if(lastStyle == SCE_MAXIMA_COMMENT)\n    {\n      while((i>0) &&\n\t    !((styler.SafeGetCharAt(i+1) == '*') && (styler.SafeGetCharAt(i) == '/')))\n\ti--;\n    }\n\n  for (; i < lengthDoc; i++) {\n    char ch = styler.SafeGetCharAt(i);\n    char chNext = styler.SafeGetCharAt(i + 1);\n\n    if (styler.IsLeadByte(ch))\n      continue;\n\n    // Handle comments.\n    // Comments start with /* and end with */\n    if((ch == '/') && (chNext == '*'))\n      {\n\ti++;i++;\n\n\tchNext = styler.SafeGetCharAt(i);\n\tfor (; i < lengthDoc; i++)\n\t  {\n\t    ch = chNext;\n\t    chNext = styler.SafeGetCharAt(i + 1);\n\t    if((ch == '*') && (chNext == '/'))\n\t      {\n\t\ti++;\n\t\ti++;\n\t\tbreak;\n\t      }\n\t  }\n\tif(i > lengthDoc)\n\t  i = lengthDoc;\n\ti--;\n\tstyler.ColourTo(i, SCE_MAXIMA_COMMENT);\n\tcontinue;\n      }\n\n    // Handle Operators\n    if(isMaximaoperator(ch))\n      {\n\tstyler.ColourTo(i, SCE_MAXIMA_OPERATOR);\n\tcontinue;\n      }\n\n    // Handle command endings.\n    if((ch == '$') || (ch == ';'))\n      {\n\tstyler.ColourTo(i, SCE_MAXIMA_COMMANDENDING);\n\tcontinue;\n      }\n\n    // Handle numbers. Numbers always begin with a digit.\n    if(IsASCII(ch) && isdigit(ch))\n      {\n\ti++;\n\tfor (; i < lengthDoc; i++)\n\t  {\n\t    ch = chNext;\n\t    chNext = styler.SafeGetCharAt(i + 1);\n\n\t    if(ch == '.')\n\t      continue;\n\n\t    // A \"e\" or similar can be followed by a \"+\" or a \"-\"\n\t    if(((ch == 'e') || (ch == 'b') || (ch == 'g') || (ch == 'f')) &&\n\t       ((chNext == '+') || (chNext == '-')))\n\t      {\n\t\ti++;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\tcontinue;\n\t      }\n\n\t    if(!IsASCII(ch) || !(isdigit(ch) || islower(ch) || isupper(ch)))\n\t      {\n\t\ti--;\n\t\tbreak;\n\t      }\n\t  }\n\tstyler.ColourTo(i, SCE_MAXIMA_NUMBER);\n\tcontinue;\n      }\n\n    // Handle strings\n    if(ch == '\\\"')\n      {\n\ti++;\n\tfor (; i < lengthDoc; i++)\n\t  {\n\t    ch = chNext;\n\t    chNext = styler.SafeGetCharAt(i + 1);\n\t    if(ch == '\\\\')\n\t      i++;\n\t    else\n\t      {\n\t\tif(ch == '\\\"')\n\t\t  break;\n\t      }\n\t  }\n\tstyler.ColourTo(i, SCE_MAXIMA_STRING);\n\tcontinue;\n      }\n\n    // Handle keywords. Maxima treats Non-ASCII chars as ordinary letters.\n    if(((!IsASCII(ch))) || isalpha(ch) || (ch == '_'))\n      {\n\tchar cmd[100];\n\tint cmdidx = 0;\n\tmemset(cmd,0,100);\n\tcmd[cmdidx++] = ch;\n\ti++;\n\tfor (; i < lengthDoc; i++)\n\t  {\n\t    ch = chNext;\n\t    chNext = styler.SafeGetCharAt(i + 1);\n\t    if(ch == '\\\\')\n\t      {\n\t\tif(cmdidx < 99)\n\t\t  cmd[cmdidx++] = ch;\n\t\ti++;\n\t\tif(cmdidx < 99)\n\t\t  cmd[cmdidx++] = ch;\n\t\tcontinue;\n\t      }\n\t    if(isMaximaoperator(ch) || ((IsASCII(ch) && !isalpha(ch) && !isdigit(ch) && (ch != '_'))))\n\t      {\n\t\ti--;\n\t\tbreak;\n\t      }\n\t    if(cmdidx < 99)\n\t      cmd[cmdidx++] = ch;\n\t  }\n\n\t// A few known keywords\n\tif(\n\t   (strncmp(cmd,\"if\",99) == 0) ||\n\t   (strncmp(cmd,\"then\",99) == 0) ||\n\t   (strncmp(cmd,\"else\",99) == 0) ||\n\t   (strncmp(cmd,\"thru\",99) == 0) ||\n\t   (strncmp(cmd,\"for\",99) == 0) ||\n\t   (strncmp(cmd,\"while\",99) == 0) ||\n\t   (strncmp(cmd,\"do\",99) == 0)\n\t   )\n\t  {\n\t    styler.ColourTo(i, SCE_MAXIMA_COMMAND);\n\t    continue;\n\t  }\n\n\t// All other keywords are functions if they are followed\n\t// by an opening parenthesis\n\tchar nextNonwhitespace = ' ';\n\tfor (Sci_PositionU o = i + 1; o < lengthDoc; o++)\n\t  {\n\t    nextNonwhitespace = styler.SafeGetCharAt(o);\n\t    if(!IsASCII(nextNonwhitespace) || !isspacechar(nextNonwhitespace))\n\t      break;\n\t  }\n\tif(nextNonwhitespace == '(')\n\t  {\n\t    styler.ColourTo(i, SCE_MAXIMA_COMMAND);\n\t  }\n\telse\n\t  {\n\t    styler.ColourTo(i, SCE_MAXIMA_VARIABLE);\n\t  }\n\tcontinue;\n      }\n\n    styler.ColourTo(i-1, SCE_MAXIMA_UNKNOWN);\n  }\n}\n\nLexerModule lmMaxima(SCLEX_MAXIMA, ColouriseMaximaDoc, \"maxima\", 0, 0);\n"
  },
  {
    "path": "lexilla/lexers/LexMetapost.cxx",
    "content": "// Scintilla source code edit control\n\n// @file LexMetapost.cxx - general context conformant metapost coloring scheme\n// Author: Hans Hagen - PRAGMA ADE - Hasselt NL - www.pragma-ade.com\n// Version: September 28, 2003\n// Modified by instanton: July 10, 2007\n// Folding based on keywordlists[]\n\n// Copyright: 1998-2003 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n// This lexer is derived from the one written for the texwork environment (1999++) which in\n// turn is inspired on texedit (1991++) which finds its roots in wdt (1986).\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\n// val SCE_METAPOST_DEFAULT = 0\n// val SCE_METAPOST_SPECIAL = 1\n// val SCE_METAPOST_GROUP = 2\n// val SCE_METAPOST_SYMBOL = 3\n// val SCE_METAPOST_COMMAND = 4\n// val SCE_METAPOST_TEXT = 5\n\n// Definitions in SciTEGlobal.properties:\n//\n// Metapost Highlighting\n//\n// # Default\n// style.metapost.0=fore:#7F7F00\n// # Special\n// style.metapost.1=fore:#007F7F\n// # Group\n// style.metapost.2=fore:#880000\n// # Symbol\n// style.metapost.3=fore:#7F7F00\n// # Command\n// style.metapost.4=fore:#008800\n// # Text\n// style.metapost.5=fore:#000000\n\n// lexer.tex.comment.process=0\n\n// Auxiliary functions:\n\nstatic inline bool endOfLine(Accessor &styler, Sci_PositionU i) {\n\treturn\n      (styler[i] == '\\n') || ((styler[i] == '\\r') && (styler.SafeGetCharAt(i + 1) != '\\n')) ;\n}\n\nstatic inline bool isMETAPOSTcomment(int ch) {\n\treturn\n      (ch == '%') ;\n}\n\nstatic inline bool isMETAPOSTone(int ch) {\n\treturn\n      (ch == '[') || (ch == ']') || (ch == '(') || (ch == ')') ||\n      (ch == ':') || (ch == '=') || (ch == '<') || (ch == '>') ||\n      (ch == '{') || (ch == '}') || (ch == '\\'') || (ch == '\\\"') ;\n}\n\nstatic inline bool isMETAPOSTtwo(int ch) {\n\treturn\n      (ch == ';') || (ch == '$') || (ch == '@') || (ch == '#');\n}\n\nstatic inline bool isMETAPOSTthree(int ch) {\n\treturn\n      (ch == '.') || (ch == '-') || (ch == '+') || (ch == '/') ||\n      (ch == '*') || (ch == ',') || (ch == '|') || (ch == '`') ||\n      (ch == '!') || (ch == '?') || (ch == '^') || (ch == '&') ||\n      (ch == '%') ;\n}\n\nstatic inline bool isMETAPOSTidentifier(int ch) {\n\treturn\n      ((ch >= 'a') && (ch <= 'z')) || ((ch >= 'A') && (ch <= 'Z')) ||\n      (ch == '_') ;\n}\n\nstatic inline bool isMETAPOSTnumber(int ch) {\n\treturn\n      (ch >= '0') && (ch <= '9') ;\n}\n\nstatic inline bool isMETAPOSTstring(int ch) {\n\treturn\n      (ch == '\\\"') ;\n}\n\nstatic inline bool isMETAPOSTcolon(int ch) {\n\treturn\n\t\t(ch == ':') ;\n}\n\nstatic inline bool isMETAPOSTequal(int ch) {\n\treturn\n\t\t(ch == '=') ;\n}\n\nstatic int CheckMETAPOSTInterface(\n    Sci_PositionU startPos,\n    Sci_Position length,\n    Accessor &styler,\n\tint defaultInterface) {\n\n    char lineBuffer[1024] ;\n\tSci_PositionU linePos = 0 ;\n\n\t// some day we can make something lexer.metapost.mapping=(none,0)(metapost,1)(mp,1)(metafun,2)...\n\n    if (styler.SafeGetCharAt(0) == '%') {\n        for (Sci_PositionU i = 0; i < startPos + length; i++) {\n            lineBuffer[linePos++] = styler.SafeGetCharAt(i) ;\n            if (endOfLine(styler, i) || (linePos >= sizeof(lineBuffer) - 1)) {\n                lineBuffer[linePos] = '\\0';\n\t\t\t\tif (strstr(lineBuffer, \"interface=none\")) {\n                    return 0 ;\n\t\t\t\t} else if (strstr(lineBuffer, \"interface=metapost\") || strstr(lineBuffer, \"interface=mp\")) {\n                    return 1 ;\n\t\t\t\t} else if (strstr(lineBuffer, \"interface=metafun\")) {\n                    return 2 ;\n\t\t\t\t} else if (styler.SafeGetCharAt(1) == 'D' && strstr(lineBuffer, \"%D \\\\module\")) {\n\t\t\t\t\t// better would be to limit the search to just one line\n\t\t\t\t\treturn 2 ;\n                } else {\n                    return defaultInterface ;\n                }\n            }\n\t\t}\n    }\n\n    return defaultInterface ;\n}\n\nstatic void ColouriseMETAPOSTDoc(\n    Sci_PositionU startPos,\n    Sci_Position length,\n    int,\n    WordList *keywordlists[],\n    Accessor &styler) {\n\n\tstyler.StartAt(startPos) ;\n\tstyler.StartSegment(startPos) ;\n\n\tbool processComment   = styler.GetPropertyInt(\"lexer.metapost.comment.process\",   0) == 1 ;\n    int  defaultInterface = styler.GetPropertyInt(\"lexer.metapost.interface.default\", 1) ;\n\n\tint currentInterface = CheckMETAPOSTInterface(startPos,length,styler,defaultInterface) ;\n\n\t// 0  no keyword highlighting\n\t// 1  metapost keyword hightlighting\n\t// 2+ metafun keyword hightlighting\n\n\tint extraInterface = 0 ;\n\n\tif (currentInterface != 0) {\n\t\textraInterface = currentInterface ;\n\t}\n\n\tWordList &keywords  = *keywordlists[0] ;\n\tWordList kwEmpty;\n\tWordList &keywords2 = (extraInterface > 0) ? *keywordlists[extraInterface - 1] : kwEmpty;\n\n\tStyleContext sc(startPos, length, SCE_METAPOST_TEXT, styler) ;\n\n\tchar key[100] ;\n\n    bool inTeX     = false ;\n\tbool inComment = false ;\n\tbool inString  = false ;\n\tbool inClause  = false ;\n\n\tbool going = sc.More() ; // needed because of a fuzzy end of file state\n\n\tfor (; going; sc.Forward()) {\n\n\t\tif (! sc.More()) { going = false ; } // we need to go one behind the end of text\n\n\t\tif (inClause) {\n\t\t\tsc.SetState(SCE_METAPOST_TEXT) ;\n\t\t\tinClause = false ;\n\t\t}\n\n\t\tif (inComment) {\n\t\t\tif (sc.atLineEnd) {\n\t\t\t\tsc.SetState(SCE_METAPOST_TEXT) ;\n\t\t\t\tinTeX = false ;\n\t\t\t\tinComment = false ;\n\t\t\t\tinClause = false ;\n\t\t\t\tinString = false ; // not correct but we want to stimulate one-lines\n\t\t\t}\n\t\t} else if (inString) {\n\t\t\tif (isMETAPOSTstring(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_METAPOST_SPECIAL) ;\n\t\t\t\tsc.ForwardSetState(SCE_METAPOST_TEXT) ;\n\t\t\t\tinString = false ;\n\t\t\t} else if (sc.atLineEnd) {\n\t\t\t\tsc.SetState(SCE_METAPOST_TEXT) ;\n\t\t\t\tinTeX = false ;\n\t\t\t\tinComment = false ;\n\t\t\t\tinClause = false ;\n\t\t\t\tinString = false ; // not correct but we want to stimulate one-lines\n\t\t\t}\n\t\t} else {\n\t\t\tif ((! isMETAPOSTidentifier(sc.ch)) && (sc.LengthCurrent() > 0)) {\n\t\t\t\tif (sc.state == SCE_METAPOST_COMMAND) {\n\t\t\t\t\tsc.GetCurrent(key, sizeof(key)) ;\n\t\t\t\t\tif ((strcmp(key,\"btex\") == 0) || (strcmp(key,\"verbatimtex\") == 0)) {\n    \t\t\t\t\tsc.ChangeState(SCE_METAPOST_GROUP) ;\n\t\t\t\t\t\tinTeX = true ;\n\t\t\t\t\t} else if (inTeX) {\n\t\t\t\t\t\tif (strcmp(key,\"etex\") == 0) {\n\t    \t\t\t\t\tsc.ChangeState(SCE_METAPOST_GROUP) ;\n\t\t\t\t\t\t\tinTeX = false ;\n\t\t\t\t\t\t} else {\n\t    \t\t\t\t\tsc.ChangeState(SCE_METAPOST_TEXT) ;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (keywords && keywords.InList(key)) {\n    \t\t\t\t\t\tsc.ChangeState(SCE_METAPOST_COMMAND) ;\n\t\t\t\t\t\t} else if (keywords2 && keywords2.InList(key)) {\n\t\t\t\t\t\t\tsc.ChangeState(SCE_METAPOST_EXTRA) ;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsc.ChangeState(SCE_METAPOST_TEXT) ;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isMETAPOSTcomment(sc.ch)) {\n\t\t\t\tif (! inTeX) {\n\t\t\t\t\tsc.SetState(SCE_METAPOST_SYMBOL) ;\n\t\t\t\t\tsc.ForwardSetState(SCE_METAPOST_DEFAULT) ;\n\t\t\t\t\tinComment = ! processComment ;\n\t\t\t\t} else {\n\t\t\t\t\tsc.SetState(SCE_METAPOST_TEXT) ;\n\t\t\t\t}\n\t\t\t} else if (isMETAPOSTstring(sc.ch)) {\n\t\t\t\tif (! inTeX) {\n\t\t\t\t\tsc.SetState(SCE_METAPOST_SPECIAL) ;\n\t\t\t\t\tif (! isMETAPOSTstring(sc.chNext)) {\n\t\t\t\t\t\tsc.ForwardSetState(SCE_METAPOST_TEXT) ;\n\t\t\t\t\t}\n\t\t\t\t\tinString = true ;\n\t\t\t\t} else {\n\t\t\t\t\tsc.SetState(SCE_METAPOST_TEXT) ;\n\t\t\t\t}\n\t\t\t} else if (isMETAPOSTcolon(sc.ch)) {\n\t\t\t\tif (! inTeX) {\n\t\t\t\t\tif (! isMETAPOSTequal(sc.chNext)) {\n\t\t\t\t\t\tsc.SetState(SCE_METAPOST_COMMAND) ;\n\t\t\t\t\t\tinClause = true ;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsc.SetState(SCE_METAPOST_SPECIAL) ;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tsc.SetState(SCE_METAPOST_TEXT) ;\n\t\t\t\t}\n\t\t\t} else if (isMETAPOSTone(sc.ch)) {\n\t\t\t\tif (! inTeX) {\n\t\t\t\t\tsc.SetState(SCE_METAPOST_SPECIAL) ;\n\t\t\t\t} else {\n\t\t\t\t\tsc.SetState(SCE_METAPOST_TEXT) ;\n\t\t\t\t}\n\t\t\t} else if (isMETAPOSTtwo(sc.ch)) {\n\t\t\t\tif (! inTeX) {\n\t\t\t\t\tsc.SetState(SCE_METAPOST_GROUP) ;\n\t\t\t\t} else {\n\t\t\t\t\tsc.SetState(SCE_METAPOST_TEXT) ;\n\t\t\t\t}\n\t\t\t} else if (isMETAPOSTthree(sc.ch)) {\n\t\t\t\tif (! inTeX) {\n\t\t\t\t\tsc.SetState(SCE_METAPOST_SYMBOL) ;\n\t\t\t\t} else {\n\t\t\t\t\tsc.SetState(SCE_METAPOST_TEXT) ;\n\t\t\t\t}\n\t\t\t} else if (isMETAPOSTidentifier(sc.ch)) {\n\t\t\t\tif (sc.state != SCE_METAPOST_COMMAND) {\n\t\t\t\t\tsc.SetState(SCE_METAPOST_TEXT) ;\n\t\t\t\t\tsc.ChangeState(SCE_METAPOST_COMMAND) ;\n\t\t\t\t}\n\t\t\t} else if (isMETAPOSTnumber(sc.ch)) {\n\t\t\t\t// rather redundant since for the moment we don't handle numbers\n\t\t\t\tsc.SetState(SCE_METAPOST_TEXT) ;\n\t\t\t} else if (sc.atLineEnd) {\n\t\t\t\tsc.SetState(SCE_METAPOST_TEXT) ;\n\t\t\t\tinTeX = false ;\n\t\t\t\tinComment = false ;\n\t\t\t\tinClause = false ;\n\t\t\t\tinString = false ;\n\t\t\t} else {\n\t\t\t\tsc.SetState(SCE_METAPOST_TEXT) ;\n\t\t\t}\n\t\t}\n\n\t}\n\n\tsc.Complete();\n\n}\n\n// Hooks info the system:\n\nstatic const char * const metapostWordListDesc[] = {\n\t\"MetaPost\",\n\t\"MetaFun\",\n\t0\n} ;\n\nstatic int classifyFoldPointMetapost(const char* s,WordList *keywordlists[]) {\n\tWordList& keywordsStart=*keywordlists[3];\n\tWordList& keywordsStop1=*keywordlists[4];\n\n\tif (keywordsStart.InList(s)) {return 1;}\n\telse if (keywordsStop1.InList(s)) {return -1;}\n\treturn 0;\n\n}\n\nstatic int ParseMetapostWord(Sci_PositionU pos, Accessor &styler, char *word)\n{\n  int length=0;\n  char ch=styler.SafeGetCharAt(pos);\n  *word=0;\n\n  while(isMETAPOSTidentifier(ch) && isalpha(ch) && length<100){\n          word[length]=ch;\n          length++;\n          ch=styler.SafeGetCharAt(pos+length);\n  }\n  word[length]=0;\n  return length;\n}\n\nstatic void FoldMetapostDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *keywordlists[], Accessor &styler)\n{\n\tbool foldCompact = styler.GetPropertyInt(\"fold.compact\", 1) != 0;\n\tSci_PositionU endPos = startPos+length;\n\tint visibleChars=0;\n\tSci_Position lineCurrent=styler.GetLine(startPos);\n\tint levelPrev=styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK;\n\tint levelCurrent=levelPrev;\n\tchar chNext=styler[startPos];\n\n\tchar buffer[100]=\"\";\n\n\tfor (Sci_PositionU i=startPos; i < endPos; i++) {\n\t\tchar ch=chNext;\n\t\tchNext=styler.SafeGetCharAt(i+1);\n\t\tchar chPrev=styler.SafeGetCharAt(i-1);\n\t\tbool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n\n\t\tif(i==0 || chPrev == '\\r' || chPrev=='\\n'|| chPrev==' '|| chPrev=='(' || chPrev=='$')\n\t\t{\n            ParseMetapostWord(i, styler, buffer);\n\t\t\tlevelCurrent += classifyFoldPointMetapost(buffer,keywordlists);\n\t\t}\n\n\t\tif (atEOL) {\n\t\t\tint lev = levelPrev;\n\t\t\tif (visibleChars == 0 && foldCompact)\n\t\t\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\t\t\tif ((levelCurrent > levelPrev) && (visibleChars > 0))\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\tif (lev != styler.LevelAt(lineCurrent)) {\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\t\t\t}\n\t\t\tlineCurrent++;\n\t\t\tlevelPrev = levelCurrent;\n\t\t\tvisibleChars = 0;\n\t\t}\n\n\t\tif (!isspacechar(ch))\n\t\t\tvisibleChars++;\n\t}\n\t// Fill in the real level of the next line, keeping the current flags as they will be filled in later\n\tint flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK;\n\tstyler.SetLevel(lineCurrent, levelPrev | flagsNext);\n\n}\n\n\nLexerModule lmMETAPOST(SCLEX_METAPOST, ColouriseMETAPOSTDoc, \"metapost\", FoldMetapostDoc, metapostWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexModula.cxx",
    "content": "//\t-*- coding: utf-8 -*-\n//\tScintilla source code edit control\n/**\n *\t@file LexModula.cxx\n *\t@author Dariusz \"DKnoto\" Knociński\n *\t@date 2011/02/03\n *\t@brief Lexer for Modula-2/3 documents.\n */\n//\tThe License.txt file describes the conditions under which this software may\n//\tbe distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"PropSetSimple.h\"\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\n#ifdef DEBUG_LEX_MODULA\n#define DEBUG_STATE( p, c )\\\n\t\tfprintf( stderr, \"Unknown state: currentPos = %u, char = '%c'\\n\", static_cast<unsigned int>(p), c );\n#else\n#define DEBUG_STATE( p, c )\n#endif\n\nstatic inline bool IsDigitOfBase( unsigned ch, unsigned base ) {\n\tif( ch < '0' || ch > 'f' ) return false;\n\tif( base <= 10 ) {\n\t\tif( ch >= ( '0' + base ) ) return false;\n\t} else {\n\t\tif( ch > '9' ) {\n\t\t\tunsigned nb = base - 10;\n\t\t\tif( ( ch < 'A' ) || ( ch >= ( 'A' + nb ) ) ) {\n\t\t\t\tif( ( ch < 'a' ) || ( ch >= ( 'a' + nb ) ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n\nstatic inline unsigned IsOperator( StyleContext & sc, WordList & op ) {\n\tint i;\n\tchar s[3];\n\n\ts[0] = sc.ch;\n\ts[1] = sc.chNext;\n\ts[2] = 0;\n\tfor( i = 0; i < op.Length(); i++ ) {\n\t\tif( ( strlen( op.WordAt(i) ) == 2 ) &&\n\t\t\t( s[0] == op.WordAt(i)[0] && s[1] == op.WordAt(i)[1] ) ) {\n\t\t\treturn 2;\n\t\t}\n\t}\n\ts[1] = 0;\n\tfor( i = 0; i < op.Length(); i++ ) {\n\t\tif( ( strlen( op.WordAt(i) ) == 1 ) &&\n\t\t\t( s[0] == op.WordAt(i)[0] ) ) {\n\t\t\treturn 1;\n\t\t}\n\t}\n\treturn 0;\n}\n\nstatic inline bool IsEOL( Accessor &styler, Sci_PositionU curPos ) {\n\tunsigned ch = styler.SafeGetCharAt( curPos );\n\tif( ( ch == '\\r' && styler.SafeGetCharAt( curPos + 1 ) == '\\n' ) ||\n\t\t( ch == '\\n' && styler.SafeGetCharAt( curPos - 1 ) != '\\r' ) ) {\n\t\treturn true;\n\t}\n\treturn false;\n}\n\nstatic inline bool checkStatement(\n\tAccessor &styler,\n\tSci_Position &curPos,\n\tconst char *stt, bool spaceAfter = true ) {\n\tint len = static_cast<int>(strlen( stt ));\n\tint i;\n\tfor( i = 0; i < len; i++ ) {\n\t\tif( styler.SafeGetCharAt( curPos + i ) != stt[i] ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\tif( spaceAfter ) {\n\t\tif( ! isspace( styler.SafeGetCharAt( curPos + i ) ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\tcurPos += ( len - 1 );\n\treturn true;\n}\n\nstatic inline bool checkEndSemicolon(\n\tAccessor &styler,\n\tSci_Position &curPos, Sci_Position endPos )\n{\n\tconst char *stt = \"END\";\n\tint len = static_cast<int>(strlen( stt ));\n\tint i;\n\tfor( i = 0; i < len; i++ ) {\n\t\tif( styler.SafeGetCharAt( curPos + i ) != stt[i] ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\twhile( isspace( styler.SafeGetCharAt( curPos + i ) ) ) {\n\t\ti++;\n\t\tif( ( curPos + i ) >= endPos ) return false;\n\t}\n\tif( styler.SafeGetCharAt( curPos + i ) != ';' ) {\n\t\treturn false;\n\t}\n\tcurPos += ( i - 1 );\n\treturn true;\n}\n\nstatic inline bool checkKeyIdentOper(\n\n\tAccessor &styler,\n\tSci_Position &curPos, Sci_Position endPos,\n\tconst char *stt, const char etk ) {\n\tSci_Position newPos = curPos;\n\tif( ! checkStatement( styler, newPos, stt ) )\n\t\treturn false;\n\tnewPos++;\n\tif( newPos >= endPos )\n\t\treturn false;\n\tif( ! isspace( styler.SafeGetCharAt( newPos ) ) )\n\t\treturn false;\n\tnewPos++;\n\tif( newPos >= endPos )\n\t\treturn false;\n\twhile( isspace( styler.SafeGetCharAt( newPos ) ) ) {\n\t\tnewPos++;\n\t\tif( newPos >= endPos )\n\t\t\treturn false;\n\t}\n\tif( ! isalpha( styler.SafeGetCharAt( newPos ) ) )\n\t\treturn false;\n\tnewPos++;\n\tif( newPos >= endPos )\n\t\treturn false;\n\tchar ch;\n\tch = styler.SafeGetCharAt( newPos );\n\twhile( isalpha( ch ) || isdigit( ch ) || ch == '_' ) {\n\t\tnewPos++;\n\t\tif( newPos >= endPos ) return false;\n\t\tch = styler.SafeGetCharAt( newPos );\n\t}\n\twhile( isspace( styler.SafeGetCharAt( newPos ) ) ) {\n\t\tnewPos++;\n\t\tif( newPos >= endPos ) return false;\n\t}\n\tif( styler.SafeGetCharAt( newPos ) != etk )\n\t\treturn false;\n\tcurPos = newPos;\n\treturn true;\n}\n\nstatic void FoldModulaDoc( Sci_PositionU startPos,\n\t\t\t\t\t\t Sci_Position length,\n\t\t\t\t\t\t int , WordList *[],\n\t\t\t\t\t\t Accessor &styler)\n{\n\tSci_Position curLine = styler.GetLine(startPos);\n\tint curLevel = SC_FOLDLEVELBASE;\n\tSci_Position endPos = startPos + length;\n\tif( curLine > 0 )\n\t\tcurLevel = styler.LevelAt( curLine - 1 ) >> 16;\n\tSci_Position curPos = startPos;\n\tint style = styler.StyleAt( curPos );\n\tint visChars = 0;\n\tint nextLevel = curLevel;\n\n\twhile( curPos < endPos ) {\n\t\tif( ! isspace( styler.SafeGetCharAt( curPos ) ) ) visChars++;\n\n\t\tswitch( style ) {\n\t\tcase SCE_MODULA_COMMENT:\n\t\t\tif( checkStatement( styler, curPos, \"(*\" ) )\n\t\t\t\tnextLevel++;\n\t\t\telse\n\t\t\tif( checkStatement( styler, curPos, \"*)\" ) )\n\t\t\t\tnextLevel--;\n\t\t\tbreak;\n\n\t\tcase SCE_MODULA_DOXYCOMM:\n\t\t\tif( checkStatement( styler, curPos, \"(**\", false ) )\n\t\t\t\tnextLevel++;\n\t\t\telse\n\t\t\tif( checkStatement( styler, curPos, \"*)\" ) )\n\t\t\t\tnextLevel--;\n\t\t\tbreak;\n\n\t\tcase SCE_MODULA_KEYWORD:\n\t\t\tif( checkStatement( styler, curPos, \"IF\" ) )\n\t\t\t\tnextLevel++;\n\t\t\telse\n\t\t\tif( checkStatement( styler, curPos, \"BEGIN\" ) )\n\t\t\t\tnextLevel++;\n\t\t\telse\n\t\t\tif( checkStatement( styler, curPos, \"TRY\" ) )\n\t\t\t\tnextLevel++;\n\t\t\telse\n\t\t\tif( checkStatement( styler, curPos, \"LOOP\" ) )\n\t\t\t\tnextLevel++;\n\t\t\telse\n\t\t\tif( checkStatement( styler, curPos, \"FOR\" ) )\n\t\t\t\tnextLevel++;\n\t\t\telse\n\t\t\tif( checkStatement( styler, curPos, \"WHILE\" ) )\n\t\t\t\tnextLevel++;\n\t\t\telse\n\t\t\tif( checkStatement( styler, curPos, \"REPEAT\" ) )\n\t\t\t\tnextLevel++;\n\t\t\telse\n\t\t\tif( checkStatement( styler, curPos, \"UNTIL\" ) )\n\t\t\t\tnextLevel--;\n\t\t\telse\n\t\t\tif( checkStatement( styler, curPos, \"WITH\" ) )\n\t\t\t\tnextLevel++;\n\t\t\telse\n\t\t\tif( checkStatement( styler, curPos, \"CASE\" ) )\n\t\t\t\tnextLevel++;\n\t\t\telse\n\t\t\tif( checkStatement( styler, curPos, \"TYPECASE\" ) )\n\t\t\t\tnextLevel++;\n\t\t\telse\n\t\t\tif( checkStatement( styler, curPos, \"LOCK\" ) )\n\t\t\t\tnextLevel++;\n\t\t\telse\n\t\t\tif( checkKeyIdentOper( styler, curPos, endPos, \"PROCEDURE\", '(' ) )\n\t\t\t\tnextLevel++;\n\t\t\telse\n\t\t\tif( checkKeyIdentOper( styler, curPos, endPos, \"END\", ';' ) ) {\n\t\t\t\tSci_Position cln = curLine;\n\t\t\t\tint clv_old = curLevel;\n\t\t\t\tSci_Position pos;\n\t\t\t\tchar ch;\n\t\t\t\tint clv_new;\n\t\t\t\twhile( cln > 0 ) {\n\t\t\t\t\tclv_new = styler.LevelAt( cln - 1 ) >> 16;\n\t\t\t\t\tif( clv_new < clv_old ) {\n\t\t\t\t\t\tnextLevel--;\n\t\t\t\t\t\tpos = styler.LineStart( cln );\n\t\t\t\t\t\twhile( ( ch = styler.SafeGetCharAt( pos, '\\n' )) != '\\n') {\n\t\t\t\t\t\t\tif( ch == 'P' ) {\n\t\t\t\t\t\t\t\tif( styler.StyleAt(pos) == SCE_MODULA_KEYWORD )\t{\n\t\t\t\t\t\t\t\t\tif( checkKeyIdentOper( styler, pos, endPos,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"PROCEDURE\", '(' ) ) {\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tpos++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tclv_old = clv_new;\n\t\t\t\t\t}\n\t\t\t\t\tcln--;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\tif( checkKeyIdentOper( styler, curPos, endPos, \"END\", '.' ) )\n\t\t\t\tnextLevel--;\n\t\t\telse\n\t\t\tif( checkEndSemicolon( styler, curPos, endPos ) )\n\t\t\t\tnextLevel--;\n\t\t\telse {\n\t\t\t\twhile( styler.StyleAt( curPos + 1 ) == SCE_MODULA_KEYWORD )\n\t\t\t\t\tcurPos++;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\n\t\tif( IsEOL( styler, curPos ) || ( curPos == endPos - 1 ) ) {\n\t\t\tint efectiveLevel = curLevel | nextLevel << 16;\n\t\t\tif( visChars == 0 )\n\t\t\t\tefectiveLevel |= SC_FOLDLEVELWHITEFLAG;\n\t\t\tif( curLevel < nextLevel )\n\t\t\t\tefectiveLevel |= SC_FOLDLEVELHEADERFLAG;\n\t\t\tif( efectiveLevel != styler.LevelAt(curLine) ) {\n\t\t\t\tstyler.SetLevel(curLine, efectiveLevel );\n\t\t\t}\n\t\t\tcurLine++;\n\t\t\tcurLevel = nextLevel;\n\t\t\tif( IsEOL( styler, curPos ) && ( curPos == endPos - 1 ) ) {\n\t\t\t\tstyler.SetLevel( curLine, ( curLevel | curLevel << 16)\n\t\t\t\t\t\t\t\t| SC_FOLDLEVELWHITEFLAG);\n\t\t\t}\n\t\t\tvisChars = 0;\n\t\t}\n\t\tcurPos++;\n\t\tstyle = styler.StyleAt( curPos );\n\t}\n}\n\nstatic inline bool skipWhiteSpaces( StyleContext & sc ) {\n\twhile( isspace( sc.ch ) ) {\n\t\tsc.SetState( SCE_MODULA_DEFAULT );\n\t\tif( sc.More() )\n\t\t\tsc.Forward();\n\t\telse\n\t\t\treturn false;\n\t}\n\treturn true;\n}\n\nstatic void ColouriseModulaDoc(\tSci_PositionU startPos,\n\t\t\t\t\t\t\t\t\tSci_Position length,\n\t\t\t\t\t\t\t\t\tint initStyle,\n\t\t\t\t\t\t\t\t\tWordList *wl[],\n\t\t\t\t\t\t\t\t\tAccessor &styler ) {\n\tWordList& keyWords\t\t= *wl[0];\n\tWordList& reservedWords\t= *wl[1];\n\tWordList& operators \t= *wl[2];\n\tWordList& pragmaWords \t= *wl[3];\n\tWordList& escapeCodes\t= *wl[4];\n\tWordList& doxyKeys\t\t= *wl[5];\n\n\tconst int BUFLEN = 128;\n\n\tchar\tbuf[BUFLEN];\n\tint\t\ti, kl;\n\n\tSci_Position  charPos = 0;\n\n\tStyleContext sc( startPos, length, initStyle, styler );\n\n\twhile( sc.More() ) \t{\n\t\tswitch( sc.state )\t{\n\t\tcase SCE_MODULA_DEFAULT:\n\t\t\tif( ! skipWhiteSpaces( sc ) ) break;\n\n\t\t\tif( sc.ch == '(' && sc.chNext == '*' ) {\n\t\t\t\tif( sc.GetRelative(2) == '*' ) {\n\t\t\t\t\tsc.SetState( SCE_MODULA_DOXYCOMM );\n\t\t\t\t\tsc.Forward();\n\t\t\t\t} else {\n\t\t\t\t\tsc.SetState( SCE_MODULA_COMMENT );\n\t\t\t\t}\n\t\t\t\tsc.Forward();\n\t\t\t}\n\t\t\telse\n\t\t\tif( isalpha( sc.ch ) ) {\n\t\t\t\tif( isupper( sc.ch ) && isupper( sc.chNext ) ) {\n\t\t\t\t\tfor( i = 0; i < BUFLEN - 1; i++ ) {\n\t\t\t\t\t\tbuf[i] = sc.GetRelative(i);\n\t\t\t\t\t\tif( !isalpha( buf[i] ) && !(buf[i] == '_') )\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tkl = i;\n\t\t\t\t\tbuf[kl] = 0;\n\n\t\t\t\t\tif( keyWords.InList( buf ) ) {\n\t\t\t\t\t\tsc.SetState( SCE_MODULA_KEYWORD );\n\t\t\t\t\t\tsc.Forward( kl );\n\t\t\t\t\t\tsc.SetState( SCE_MODULA_DEFAULT );\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\tif( reservedWords.InList( buf ) ) {\n\t\t\t\t\t\tsc.SetState( SCE_MODULA_RESERVED );\n\t\t\t\t\t\tsc.Forward( kl );\n\t\t\t\t\t\tsc.SetState( SCE_MODULA_DEFAULT );\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t/** check procedure identifier */\n\t\t\t\t\t\tsc.Forward( kl );\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tfor( i = 0; i < BUFLEN - 1; i++ ) {\n\t\t\t\t\t\tbuf[i] = sc.GetRelative(i);\n\t\t\t\t\t\tif( !isalpha( buf[i] ) &&\n\t\t\t\t\t\t\t!isdigit( buf[i] ) &&\n\t\t\t\t\t\t\t!(buf[i] == '_') )\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tkl = i;\n\t\t\t\t\tbuf[kl] = 0;\n\n\t\t\t\t\tsc.SetState( SCE_MODULA_DEFAULT );\n\t\t\t\t\tsc.Forward( kl );\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\tif( isdigit( sc.ch ) ) {\n\t\t\t\tsc.SetState( SCE_MODULA_NUMBER );\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse\n\t\t\tif( sc.ch == '\\\"' ) {\n\t\t\t\tsc.SetState( SCE_MODULA_STRING );\n\t\t\t}\n\t\t\telse\n\t\t\tif( sc.ch == '\\'' ) {\n\t\t\t\tcharPos = sc.currentPos;\n\t\t\t\tsc.SetState( SCE_MODULA_CHAR );\n\t\t\t}\n\t\t\telse\n\t\t\tif( sc.ch == '<' && sc.chNext == '*' ) {\n\t\t\t\tsc.SetState( SCE_MODULA_PRAGMA );\n\t\t\t\tsc.Forward();\n\t\t\t} else {\n\t\t\t\tunsigned len = IsOperator( sc, operators );\n\t\t\t\tif( len > 0 ) {\n\t\t\t\t\tsc.SetState( SCE_MODULA_OPERATOR );\n\t\t\t\t\tsc.Forward( len );\n\t\t\t\t\tsc.SetState( SCE_MODULA_DEFAULT );\n\t\t\t\t\tcontinue;\n\t\t\t\t} else {\n\t\t\t\t\tDEBUG_STATE( sc.currentPos, sc.ch );\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase SCE_MODULA_COMMENT:\n\t\t\tif( sc.ch == '*' && sc.chNext == ')' ) {\n\t\t\t\tsc.Forward( 2 );\n\t\t\t\tsc.SetState( SCE_MODULA_DEFAULT );\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase SCE_MODULA_DOXYCOMM:\n\t\t\tswitch( sc.ch ) {\n\t\t\tcase '*':\n\t\t\t\tif( sc.chNext == ')' ) {\n\t\t\t\t\tsc.Forward( 2 );\n\t\t\t\t\tsc.SetState( SCE_MODULA_DEFAULT );\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase '@':\n\t\t\t\tif( islower( sc.chNext ) ) {\n\t\t\t\t\tfor( i = 0; i < BUFLEN - 1; i++ ) {\n\t\t\t\t\t\tbuf[i] = sc.GetRelative(i+1);\n\t\t\t\t\t\tif( isspace( buf[i] ) ) break;\n\t\t\t\t\t}\n\t\t\t\t\tbuf[i] = 0;\n\t\t\t\t\tkl = i;\n\n\t\t\t\t\tif( doxyKeys.InList( buf ) ) {\n\t\t\t\t\t\tsc.SetState( SCE_MODULA_DOXYKEY );\n\t\t\t\t\t\tsc.Forward( kl + 1 );\n\t\t\t\t\t\tsc.SetState( SCE_MODULA_DOXYCOMM );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase SCE_MODULA_NUMBER:\n\t\t\t{\n\t\t\t\tbuf[0] = sc.ch;\n\t\t\t\tfor( i = 1; i < BUFLEN - 1; i++ ) {\n\t\t\t\t\tbuf[i] = sc.GetRelative(i);\n\t\t\t\t\tif( ! isdigit( buf[i] ) )\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tkl = i;\n\t\t\t\tbuf[kl] = 0;\n\n\t\t\t\tswitch( sc.GetRelative(kl) ) {\n\t\t\t\tcase '_':\n\t\t\t\t\t{\n\t\t\t\t\t\tint base = atoi( buf );\n\t\t\t\t\t\tif( base < 2 || base > 16 ) {\n\t\t\t\t\t\t\tsc.SetState( SCE_MODULA_BADSTR );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tint imax;\n\n\t\t\t\t\t\t\tkl++;\n\t\t\t\t\t\t\tfor( i = 0; i < BUFLEN - 1; i++ ) {\n\t\t\t\t\t\t\t\tbuf[i] = sc.GetRelative(kl+i);\n\t\t\t\t\t\t\t\tif( ! IsDigitOfBase( buf[i], 16 ) ) {\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\timax = i;\n\t\t\t\t\t\t\tfor( i = 0; i < imax; i++ ) {\n\t\t\t\t\t\t\t\tif( ! IsDigitOfBase( buf[i], base ) ) {\n\t\t\t\t\t\t\t\t\tsc.SetState( SCE_MODULA_BADSTR );\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tkl += imax;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsc.SetState( SCE_MODULA_BASENUM );\n\t\t\t\t\t\tfor( i = 0; i < kl; i++ ) {\n\t\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsc.SetState( SCE_MODULA_DEFAULT );\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase '.':\n\t\t\t\t\tif( sc.GetRelative(kl+1) == '.' ) {\n\t\t\t\t\t\tkl--;\n\t\t\t\t\t\tfor( i = 0; i < kl; i++ ) {\n\t\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t\tsc.SetState( SCE_MODULA_DEFAULT );\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbool doNext = false;\n\n\t\t\t\t\t\tkl++;\n\n\t\t\t\t\t\tbuf[0] = sc.GetRelative(kl);\n\t\t\t\t\t\tif( isdigit( buf[0] ) ) {\n\t\t\t\t\t\t\tfor( i = 0;; i++ ) {\n\t\t\t\t\t\t\t\tif( !isdigit(sc.GetRelative(kl+i)) )\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tkl += i;\n\t\t\t\t\t\t\tbuf[0] = sc.GetRelative(kl);\n\n\t\t\t\t\t\t\tswitch( buf[0] )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase 'E':\n\t\t\t\t\t\t\tcase 'e':\n\t\t\t\t\t\t\tcase 'D':\n\t\t\t\t\t\t\tcase 'd':\n\t\t\t\t\t\t\tcase 'X':\n\t\t\t\t\t\t\tcase 'x':\n\t\t\t\t\t\t\t\tkl++;\n\t\t\t\t\t\t\t\tbuf[0] = sc.GetRelative(kl);\n\t\t\t\t\t\t\t\tif( buf[0] == '-' || buf[0] == '+' ) {\n\t\t\t\t\t\t\t\t\tkl++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbuf[0] = sc.GetRelative(kl);\n\t\t\t\t\t\t\t\tif( isdigit( buf[0] ) ) {\n\t\t\t\t\t\t\t\t\tfor( i = 0;; i++ ) {\n\t\t\t\t\t\t\t\t\t\tif( !isdigit(sc.GetRelative(kl+i)) ) {\n\t\t\t\t\t\t\t\t\t\t\tbuf[0] = sc.GetRelative(kl+i);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tkl += i;\n\t\t\t\t\t\t\t\t\tdoNext = true;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tsc.SetState( SCE_MODULA_BADSTR );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tdoNext = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsc.SetState( SCE_MODULA_BADSTR );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif( doNext ) {\n\t\t\t\t\t\t\tif( ! isspace( buf[0] ) &&\n\t\t\t\t\t\t\t\tbuf[0] != ')' &&\n\t\t\t\t\t\t\t\tbuf[0] != '>' &&\n\t\t\t\t\t\t\t\tbuf[0] != '<' &&\n\t\t\t\t\t\t\t\tbuf[0] != '=' &&\n\t\t\t\t\t\t\t\tbuf[0] != '#' &&\n\t\t\t\t\t\t\t\tbuf[0] != '+' &&\n\t\t\t\t\t\t\t\tbuf[0] != '-' &&\n\t\t\t\t\t\t\t\tbuf[0] != '*' &&\n\t\t\t\t\t\t\t\tbuf[0] != '/' &&\n\t\t\t\t\t\t\t\tbuf[0] != ',' &&\n\t\t\t\t\t\t\t\tbuf[0] != ';'\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tsc.SetState( SCE_MODULA_BADSTR );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tkl--;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tsc.SetState( SCE_MODULA_FLOAT );\n\t\t\t\t\tfor( i = 0; i < kl; i++ ) {\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t}\n\t\t\t\t\tsc.SetState( SCE_MODULA_DEFAULT );\n\t\t\t\t\tcontinue;\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tfor( i = 0; i < kl; i++ ) {\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tsc.SetState( SCE_MODULA_DEFAULT );\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase SCE_MODULA_STRING:\n\t\t\tif( sc.ch == '\\\"' ) {\n\t\t\t\tsc.Forward();\n\t\t\t\tsc.SetState( SCE_MODULA_DEFAULT );\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\tif( sc.ch == '\\\\' ) {\n\t\t\t\t\ti = 1;\n\t\t\t\t\tif( IsDigitOfBase( sc.chNext, 8 ) ) {\n\t\t\t\t\t\tfor( i = 1; i < BUFLEN - 1; i++ ) {\n\t\t\t\t\t\t\tif( ! IsDigitOfBase(sc.GetRelative(i+1), 8 ) )\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif( i == 3 ) {\n\t\t\t\t\t\t\tsc.SetState( SCE_MODULA_STRSPEC );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsc.SetState( SCE_MODULA_BADSTR );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbuf[0] = sc.chNext;\n\t\t\t\t\t\tbuf[1] = 0;\n\n\t\t\t\t\t\tif( escapeCodes.InList( buf ) ) {\n\t\t\t\t\t\t\tsc.SetState( SCE_MODULA_STRSPEC );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsc.SetState( SCE_MODULA_BADSTR );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tsc.Forward(i+1);\n\t\t\t\t\tsc.SetState( SCE_MODULA_STRING );\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase SCE_MODULA_CHAR:\n\t\t\tif( sc.ch == '\\'' ) {\n\t\t\t\tsc.Forward();\n\t\t\t\tsc.SetState( SCE_MODULA_DEFAULT );\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse\n\t\t\tif( ( sc.currentPos - charPos ) == 1 ) {\n\t\t\t\tif( sc.ch == '\\\\' ) {\n\t\t\t\t\ti = 1;\n\t\t\t\t\tif( IsDigitOfBase( sc.chNext, 8 ) ) {\n\t\t\t\t\t\tfor( i = 1; i < BUFLEN - 1; i++ ) {\n\t\t\t\t\t\t\tif( ! IsDigitOfBase(sc.GetRelative(i+1), 8 ) )\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif( i == 3 ) {\n\t\t\t\t\t\t\tsc.SetState( SCE_MODULA_CHARSPEC );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsc.SetState( SCE_MODULA_BADSTR );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbuf[0] = sc.chNext;\n\t\t\t\t\t\tbuf[1] = 0;\n\n\t\t\t\t\t\tif( escapeCodes.InList( buf ) ) {\n\t\t\t\t\t\t\tsc.SetState( SCE_MODULA_CHARSPEC );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsc.SetState( SCE_MODULA_BADSTR );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tsc.Forward(i+1);\n\t\t\t\t\tsc.SetState( SCE_MODULA_CHAR );\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tsc.SetState( SCE_MODULA_BADSTR );\n\t\t\t\tsc.Forward();\n\t\t\t\tsc.SetState( SCE_MODULA_CHAR );\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase SCE_MODULA_PRAGMA:\n\t\t\tif( sc.ch == '*' && sc.chNext == '>' ) {\n\t\t\t\tsc.Forward();\n\t\t\t\tsc.Forward();\n\t\t\t\tsc.SetState( SCE_MODULA_DEFAULT );\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse\n\t\t\tif( isupper( sc.ch ) && isupper( sc.chNext ) ) {\n\t\t\t\tbuf[0] = sc.ch;\n\t\t\t\tbuf[1] = sc.chNext;\n\t\t\t\tfor( i = 2; i < BUFLEN - 1; i++ ) {\n\t\t\t\t\tbuf[i] = sc.GetRelative(i);\n\t\t\t\t\tif( !isupper( buf[i] ) )\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tkl = i;\n\t\t\t\tbuf[kl] = 0;\n\t\t\t\tif( pragmaWords.InList( buf ) ) {\n\t\t\t\t\tsc.SetState( SCE_MODULA_PRGKEY );\n\t\t\t\t\tsc.Forward( kl );\n\t\t\t\t\tsc.SetState( SCE_MODULA_PRAGMA );\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\tsc.Forward();\n\t}\n\tsc.Complete();\n}\n\nstatic const char *const modulaWordListDesc[] =\n{\n\t\"Keywords\",\n\t\"ReservedKeywords\",\n\t\"Operators\",\n\t\"PragmaKeyswords\",\n\t\"EscapeCodes\",\n\t\"DoxygeneKeywords\",\n\t0\n};\n\nLexerModule lmModula( SCLEX_MODULA, ColouriseModulaDoc, \"modula\", FoldModulaDoc,\n\t\t\t\t\t  modulaWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexMySQL.cxx",
    "content": "/**\n * Scintilla source code edit control\n * @file LexMySQL.cxx\n * Lexer for MySQL\n *\n * Improved by Mike Lischke <mike.lischke@oracle.com>\n * Adopted from LexSQL.cxx by Anders Karlsson <anders@mysql.com>\n * Original work by Neil Hodgson <neilh@scintilla.org>\n * Copyright 1998-2005 by Neil Hodgson <neilh@scintilla.org>\n * The License.txt file describes the conditions under which this software may be distributed.\n */\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nstatic inline bool IsAWordChar(int ch) {\n\treturn (ch < 0x80) && (isalnum(ch) || ch == '_');\n}\n\nstatic inline bool IsAWordStart(int ch) {\n\treturn (ch < 0x80) && (isalpha(ch) || ch == '_');\n}\n\nstatic inline bool IsANumberChar(int ch) {\n\t// Not exactly following number definition (several dots are seen as OK, etc.)\n\t// but probably enough in most cases.\n\treturn (ch < 0x80) &&\n\t        (isdigit(ch) || toupper(ch) == 'E' ||\n             ch == '.' || ch == '-' || ch == '+');\n}\n\n//--------------------------------------------------------------------------------------------------\n\n/**\n * Check if the current content context represent a keyword and set the context state if so.\n */\nstatic void CheckForKeyword(StyleContext& sc, WordList* keywordlists[], int activeState)\n{\n  Sci_Position length = sc.LengthCurrent() + 1; // +1 for the next char\n  char* s = new char[length];\n  sc.GetCurrentLowered(s, length);\n  if (keywordlists[0]->InList(s))\n    sc.ChangeState(SCE_MYSQL_MAJORKEYWORD | activeState);\n  else\n    if (keywordlists[1]->InList(s))\n      sc.ChangeState(SCE_MYSQL_KEYWORD | activeState);\n    else\n      if (keywordlists[2]->InList(s))\n        sc.ChangeState(SCE_MYSQL_DATABASEOBJECT | activeState);\n      else\n        if (keywordlists[3]->InList(s))\n          sc.ChangeState(SCE_MYSQL_FUNCTION | activeState);\n        else\n          if (keywordlists[5]->InList(s))\n            sc.ChangeState(SCE_MYSQL_PROCEDUREKEYWORD | activeState);\n          else\n            if (keywordlists[6]->InList(s))\n              sc.ChangeState(SCE_MYSQL_USER1 | activeState);\n            else\n              if (keywordlists[7]->InList(s))\n                sc.ChangeState(SCE_MYSQL_USER2 | activeState);\n              else\n                if (keywordlists[8]->InList(s))\n                  sc.ChangeState(SCE_MYSQL_USER3 | activeState);\n  delete [] s;\n}\n\n//--------------------------------------------------------------------------------------------------\n\n#define HIDDENCOMMAND_STATE 0x40 // Offset for states within a hidden command.\n#define MASKACTIVE(style) (style & ~HIDDENCOMMAND_STATE)\n\nstatic void SetDefaultState(StyleContext& sc, int activeState)\n{\n  if (activeState == 0)\n    sc.SetState(SCE_MYSQL_DEFAULT);\n  else\n    sc.SetState(SCE_MYSQL_HIDDENCOMMAND);\n}\n\nstatic void ForwardDefaultState(StyleContext& sc, int activeState)\n{\n  if (activeState == 0)\n    sc.ForwardSetState(SCE_MYSQL_DEFAULT);\n  else\n    sc.ForwardSetState(SCE_MYSQL_HIDDENCOMMAND);\n}\n\nstatic void ColouriseMySQLDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[],\n                            Accessor &styler)\n{\n\tStyleContext sc(startPos, length, initStyle, styler, 127);\n  int activeState = (initStyle == SCE_MYSQL_HIDDENCOMMAND) ? HIDDENCOMMAND_STATE : initStyle & HIDDENCOMMAND_STATE;\n\n\tfor (; sc.More(); sc.Forward())\n  {\n\t\t// Determine if the current state should terminate.\n\t\tswitch (MASKACTIVE(sc.state))\n    {\n      case SCE_MYSQL_OPERATOR:\n        SetDefaultState(sc, activeState);\n        break;\n      case SCE_MYSQL_NUMBER:\n        // We stop the number definition on non-numerical non-dot non-eE non-sign char.\n        if (!IsANumberChar(sc.ch))\n          SetDefaultState(sc, activeState);\n        break;\n      case SCE_MYSQL_IDENTIFIER:\n        // Switch from identifier to keyword state and open a new state for the new char.\n        if (!IsAWordChar(sc.ch))\n        {\n          CheckForKeyword(sc, keywordlists, activeState);\n\n          // Additional check for function keywords needed.\n          // A function name must be followed by an opening parenthesis.\n          if (MASKACTIVE(sc.state) == SCE_MYSQL_FUNCTION && sc.ch != '(')\n          {\n            if (activeState > 0)\n              sc.ChangeState(SCE_MYSQL_HIDDENCOMMAND);\n            else\n              sc.ChangeState(SCE_MYSQL_DEFAULT);\n          }\n\n          SetDefaultState(sc, activeState);\n        }\n        break;\n      case SCE_MYSQL_VARIABLE:\n        if (!IsAWordChar(sc.ch))\n          SetDefaultState(sc, activeState);\n        break;\n      case SCE_MYSQL_SYSTEMVARIABLE:\n        if (!IsAWordChar(sc.ch))\n        {\n          Sci_Position length = sc.LengthCurrent() + 1;\n          char* s = new char[length];\n          sc.GetCurrentLowered(s, length);\n\n          // Check for known system variables here.\n          if (keywordlists[4]->InList(&s[2]))\n            sc.ChangeState(SCE_MYSQL_KNOWNSYSTEMVARIABLE | activeState);\n          delete [] s;\n\n          SetDefaultState(sc, activeState);\n        }\n        break;\n      case SCE_MYSQL_QUOTEDIDENTIFIER:\n        if (sc.ch == '`')\n        {\n          if (sc.chNext == '`')\n            sc.Forward();\t// Ignore it\n          else\n            ForwardDefaultState(sc, activeState);\n\t\t\t\t}\n  \t\t\tbreak;\n      case SCE_MYSQL_COMMENT:\n        if (sc.Match('*', '/'))\n        {\n          sc.Forward();\n          ForwardDefaultState(sc, activeState);\n        }\n        break;\n      case SCE_MYSQL_COMMENTLINE:\n        if (sc.atLineStart)\n          SetDefaultState(sc, activeState);\n        break;\n      case SCE_MYSQL_SQSTRING:\n        if (sc.ch == '\\\\')\n          sc.Forward(); // Escape sequence\n        else\n          if (sc.ch == '\\'')\n          {\n            // End of single quoted string reached?\n            if (sc.chNext == '\\'')\n              sc.Forward();\n            else\n              ForwardDefaultState(sc, activeState);\n          }\n        break;\n      case SCE_MYSQL_DQSTRING:\n        if (sc.ch == '\\\\')\n          sc.Forward(); // Escape sequence\n        else\n          if (sc.ch == '\\\"')\n          {\n            // End of single quoted string reached?\n            if (sc.chNext == '\\\"')\n              sc.Forward();\n            else\n              ForwardDefaultState(sc, activeState);\n          }\n        break;\n      case SCE_MYSQL_PLACEHOLDER:\n        if (sc.Match('}', '>'))\n        {\n          sc.Forward();\n          ForwardDefaultState(sc, activeState);\n        }\n        break;\n    }\n\n    if (sc.state == SCE_MYSQL_HIDDENCOMMAND && sc.Match('*', '/'))\n    {\n      activeState = 0;\n      sc.Forward();\n      ForwardDefaultState(sc, activeState);\n    }\n\n    // Determine if a new state should be entered.\n    if (sc.state == SCE_MYSQL_DEFAULT || sc.state == SCE_MYSQL_HIDDENCOMMAND)\n    {\n      switch (sc.ch)\n      {\n        case '@':\n          if (sc.chNext == '@')\n          {\n            sc.SetState(SCE_MYSQL_SYSTEMVARIABLE | activeState);\n            sc.Forward(2); // Skip past @@.\n          }\n          else\n            if (IsAWordStart(sc.ch))\n            {\n              sc.SetState(SCE_MYSQL_VARIABLE | activeState);\n              sc.Forward(); // Skip past @.\n            }\n            else\n              sc.SetState(SCE_MYSQL_OPERATOR | activeState);\n          break;\n        case '`':\n          sc.SetState(SCE_MYSQL_QUOTEDIDENTIFIER | activeState);\n          break;\n        case '#':\n          sc.SetState(SCE_MYSQL_COMMENTLINE | activeState);\n          break;\n        case '\\'':\n          sc.SetState(SCE_MYSQL_SQSTRING | activeState);\n          break;\n        case '\\\"':\n          sc.SetState(SCE_MYSQL_DQSTRING | activeState);\n          break;\n        default:\n          if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext)))\n            sc.SetState(SCE_MYSQL_NUMBER | activeState);\n          else\n            if (IsAWordStart(sc.ch))\n              sc.SetState(SCE_MYSQL_IDENTIFIER | activeState);\n            else\n              if (sc.Match('/', '*'))\n              {\n                sc.SetState(SCE_MYSQL_COMMENT | activeState);\n\n                // Skip first char of comment introducer and check for hidden command.\n                // The second char is skipped by the outer loop.\n                sc.Forward();\n                if (sc.GetRelativeCharacter(1) == '!')\n                {\n                  // Version comment found. Skip * now.\n                  sc.Forward();\n                  activeState = HIDDENCOMMAND_STATE;\n                  sc.ChangeState(SCE_MYSQL_HIDDENCOMMAND);\n                }\n              }\n              else if (sc.Match('<', '{'))\n              {\n                sc.SetState(SCE_MYSQL_PLACEHOLDER | activeState);\n              }\n              else\n                if (sc.Match(\"--\"))\n                {\n                  // Special MySQL single line comment.\n                  sc.SetState(SCE_MYSQL_COMMENTLINE | activeState);\n                  sc.Forward(2);\n\n                  // Check the third character too. It must be a space or EOL.\n                  if (sc.ch != ' ' && sc.ch != '\\n' && sc.ch != '\\r')\n                    sc.ChangeState(SCE_MYSQL_OPERATOR | activeState);\n                }\n                else\n                  if (isoperator(static_cast<char>(sc.ch)))\n                    sc.SetState(SCE_MYSQL_OPERATOR | activeState);\n      }\n    }\n  }\n\n  // Do a final check for keywords if we currently have an identifier, to highlight them\n  // also at the end of a line.\n  if (sc.state == SCE_MYSQL_IDENTIFIER)\n  {\n    CheckForKeyword(sc, keywordlists, activeState);\n\n    // Additional check for function keywords needed.\n    // A function name must be followed by an opening parenthesis.\n    if (sc.state == SCE_MYSQL_FUNCTION && sc.ch != '(')\n      SetDefaultState(sc, activeState);\n  }\n\n  sc.Complete();\n}\n\n//--------------------------------------------------------------------------------------------------\n\n/**\n * Helper function to determine if we have a foldable comment currently.\n */\nstatic bool IsStreamCommentStyle(int style)\n{\n\treturn MASKACTIVE(style) == SCE_MYSQL_COMMENT;\n}\n\n//--------------------------------------------------------------------------------------------------\n\n/**\n * Code copied from StyleContext and modified to work here. Should go into Accessor as a\n * companion to Match()...\n */\nstatic bool MatchIgnoreCase(Accessor &styler, Sci_Position currentPos, const char *s)\n{\n  for (Sci_Position n = 0; *s; n++)\n  {\n    if (*s != tolower(styler.SafeGetCharAt(currentPos + n)))\n      return false;\n    s++;\n  }\n  return true;\n}\n\n//--------------------------------------------------------------------------------------------------\n\n// Store both the current line's fold level and the next lines in the\n// level store to make it easy to pick up with each increment.\nstatic void FoldMySQLDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *[], Accessor &styler)\n{\n\tbool foldComment = styler.GetPropertyInt(\"fold.comment\") != 0;\n\tbool foldCompact = styler.GetPropertyInt(\"fold.compact\", 1) != 0;\n\tbool foldOnlyBegin = styler.GetPropertyInt(\"fold.sql.only.begin\", 0) != 0;\n\n\tint visibleChars = 0;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tint levelCurrent = SC_FOLDLEVELBASE;\n\tif (lineCurrent > 0)\n\t\tlevelCurrent = styler.LevelAt(lineCurrent - 1) >> 16;\n\tint levelNext = levelCurrent;\n\n\tint styleNext = styler.StyleAt(startPos);\n\tint style = initStyle;\n  int activeState = (style == SCE_MYSQL_HIDDENCOMMAND) ? HIDDENCOMMAND_STATE : style & HIDDENCOMMAND_STATE;\n\n  bool endPending = false;\n\tbool whenPending = false;\n\tbool elseIfPending = false;\n\n  char nextChar = styler.SafeGetCharAt(startPos);\n  for (Sci_PositionU i = startPos; length > 0; i++, length--)\n  {\n\t\tint stylePrev = style;\n    int lastActiveState = activeState;\n\t\tstyle = styleNext;\n\t\tstyleNext = styler.StyleAt(i + 1);\n    activeState = (style == SCE_MYSQL_HIDDENCOMMAND) ? HIDDENCOMMAND_STATE : style & HIDDENCOMMAND_STATE;\n\n    char currentChar = nextChar;\n    nextChar = styler.SafeGetCharAt(i + 1);\n\t\tbool atEOL = (currentChar == '\\r' && nextChar != '\\n') || (currentChar == '\\n');\n\n    switch (MASKACTIVE(style))\n    {\n      case SCE_MYSQL_COMMENT:\n        if (foldComment)\n        {\n          // Multiline comment style /* .. */ just started or is still in progress.\n          if (IsStreamCommentStyle(style) && !IsStreamCommentStyle(stylePrev))\n            levelNext++;\n        }\n        break;\n      case SCE_MYSQL_COMMENTLINE:\n        if (foldComment)\n        {\n          // Not really a standard, but we add support for single line comments\n          // with special curly braces syntax as foldable comments too.\n          // MySQL needs -- comments to be followed by space or control char\n          if (styler.Match(i, \"--\"))\n          {\n            char chNext2 = styler.SafeGetCharAt(i + 2);\n            char chNext3 = styler.SafeGetCharAt(i + 3);\n            if (chNext2 == '{' || chNext3 == '{')\n              levelNext++;\n            else\n              if (chNext2 == '}' || chNext3 == '}')\n                levelNext--;\n          }\n        }\n        break;\n      case SCE_MYSQL_HIDDENCOMMAND:\n        /*\n        if (endPending)\n        {\n          // A conditional command is not a white space so it should end the current block\n          // before opening a new one.\n          endPending = false;\n          levelNext--;\n          if (levelNext < SC_FOLDLEVELBASE)\n            levelNext = SC_FOLDLEVELBASE;\n        }\n        }*/\n        if (activeState != lastActiveState)\n          levelNext++;\n        break;\n      case SCE_MYSQL_OPERATOR:\n        if (endPending)\n        {\n          endPending = false;\n          levelNext--;\n          if (levelNext < SC_FOLDLEVELBASE)\n            levelNext = SC_FOLDLEVELBASE;\n        }\n        if (currentChar == '(')\n          levelNext++;\n        else\n          if (currentChar == ')')\n          {\n            levelNext--;\n            if (levelNext < SC_FOLDLEVELBASE)\n              levelNext = SC_FOLDLEVELBASE;\n          }\n        break;\n      case SCE_MYSQL_MAJORKEYWORD:\n      case SCE_MYSQL_KEYWORD:\n      case SCE_MYSQL_FUNCTION:\n      case SCE_MYSQL_PROCEDUREKEYWORD:\n        // Reserved and other keywords.\n        if (style != stylePrev)\n        {\n          // END decreases the folding level, regardless which keyword follows.\n          bool endFound = MatchIgnoreCase(styler, i, \"end\");\n          if (endPending)\n          {\n            levelNext--;\n            if (levelNext < SC_FOLDLEVELBASE)\n              levelNext = SC_FOLDLEVELBASE;\n          }\n          else\n            if (!endFound)\n            {\n              if (MatchIgnoreCase(styler, i, \"begin\"))\n                levelNext++;\n              else\n              {\n                if (!foldOnlyBegin)\n                {\n                  bool whileFound = MatchIgnoreCase(styler, i, \"while\");\n                  bool loopFound = MatchIgnoreCase(styler, i, \"loop\");\n                  bool repeatFound = MatchIgnoreCase(styler, i, \"repeat\");\n                  bool caseFound = MatchIgnoreCase(styler, i, \"case\");\n\n                  if (whileFound || loopFound || repeatFound || caseFound)\n                    levelNext++;\n                  else\n                  {\n                    // IF alone does not increase the fold level as it is also used in non-block'ed\n                    // code like DROP PROCEDURE blah IF EXISTS.\n                    // Instead THEN opens the new level (if not part of an ELSEIF or WHEN (case) branch).\n                    if (MatchIgnoreCase(styler, i, \"then\"))\n                    {\n                      if (!elseIfPending && !whenPending)\n                        levelNext++;\n                      else\n                      {\n                        elseIfPending = false;\n                        whenPending = false;\n                      }\n                    }\n                    else\n                    {\n                      // Neither of if/then/while/loop/repeat/case, so check for\n                      // sub parts of IF and CASE.\n                      if (MatchIgnoreCase(styler, i, \"elseif\"))\n                        elseIfPending = true;\n                      if (MatchIgnoreCase(styler, i, \"when\"))\n                        whenPending = true;\n                    }\n                  }\n                }\n              }\n            }\n\n          // Keep the current end state for the next round.\n          endPending = endFound;\n        }\n        break;\n\n      default:\n        if (!isspacechar(currentChar) && endPending)\n        {\n          // END followed by a non-whitespace character (not covered by other cases like identifiers)\n          // also should end a folding block. Typical case: END followed by self defined delimiter.\n          levelNext--;\n          if (levelNext < SC_FOLDLEVELBASE)\n            levelNext = SC_FOLDLEVELBASE;\n        }\n        break;\n    }\n\n    // Go up one level if we just ended a multi line comment.\n    if (IsStreamCommentStyle(stylePrev) && !IsStreamCommentStyle(style))\n    {\n      levelNext--;\n      if (levelNext < SC_FOLDLEVELBASE)\n        levelNext = SC_FOLDLEVELBASE;\n    }\n\n    if (activeState == 0 && lastActiveState != 0)\n    {\n      // Decrease fold level when we left a hidden command.\n      levelNext--;\n      if (levelNext < SC_FOLDLEVELBASE)\n        levelNext = SC_FOLDLEVELBASE;\n    }\n\n    if (atEOL)\n    {\n      // Apply the new folding level to this line.\n      // Leave pending states as they are otherwise a line break will de-sync\n      // code folding and valid syntax.\n      int levelUse = levelCurrent;\n      int lev = levelUse | levelNext << 16;\n      if (visibleChars == 0 && foldCompact)\n        lev |= SC_FOLDLEVELWHITEFLAG;\n      if (levelUse < levelNext)\n        lev |= SC_FOLDLEVELHEADERFLAG;\n      if (lev != styler.LevelAt(lineCurrent))\n        styler.SetLevel(lineCurrent, lev);\n\n      lineCurrent++;\n      levelCurrent = levelNext;\n      visibleChars = 0;\n    }\n\n\t\tif (!isspacechar(currentChar))\n      visibleChars++;\n  }\n}\n\n//--------------------------------------------------------------------------------------------------\n\nstatic const char * const mysqlWordListDesc[] = {\n\t\"Major Keywords\",\n\t\"Keywords\",\n\t\"Database Objects\",\n\t\"Functions\",\n\t\"System Variables\",\n\t\"Procedure keywords\",\n\t\"User Keywords 1\",\n\t\"User Keywords 2\",\n\t\"User Keywords 3\",\n\t0\n};\n\nLexerModule lmMySQL(SCLEX_MYSQL, ColouriseMySQLDoc, \"mysql\", FoldMySQLDoc, mysqlWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexNim.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexNim.cxx\n** Lexer for Nim\n** Written by Jad Altahan (github.com/xv)\n** Nim manual: https://nim-lang.org/docs/manual.html\n**/\n// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n#include <map>\n#include <algorithm>\n#include <functional>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"StringCopy.h\"\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n#include \"OptionSet.h\"\n#include \"DefaultLexer.h\"\n\nusing namespace Scintilla;\nusing namespace Lexilla;\n\nnamespace {\n    // Use an unnamed namespace to protect the functions and classes from name conflicts\n\nenum NumType {\n    Binary,\n    Octal,\n    Exponent,\n    Hexadecimal,\n    Decimal,\n    FormatError\n};\n\nint GetNumStyle(const int numType) noexcept {\n    if (numType == NumType::FormatError) {\n        return SCE_NIM_NUMERROR;\n    }\n\n    return SCE_NIM_NUMBER;\n}\n\nconstexpr bool IsLetter(const int ch) noexcept {\n    // 97 to 122 || 65 to 90\n    return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z');\n}\n\nbool IsAWordChar(const int ch) noexcept {\n    return ch < 0x80 && (isalnum(ch) || ch == '_' || ch == '.');\n}\n\nint IsNumHex(const StyleContext &sc) noexcept {\n    return sc.chNext == 'x' || sc.chNext == 'X';\n}\n\nint IsNumBinary(const StyleContext &sc) noexcept {\n    return sc.chNext == 'b' || sc.chNext == 'B';\n}\n\nint IsNumOctal(const StyleContext &sc) {\n    return IsADigit(sc.chNext) || sc.chNext == 'o';\n}\n\nconstexpr bool IsNewline(const int ch) noexcept {\n    return (ch == '\\n' || ch == '\\r');\n}\n\nbool IsFuncName(const char *str) noexcept {\n    const char *identifiers[] = {\n        \"proc\",\n        \"func\",\n        \"macro\",\n        \"method\",\n        \"template\",\n        \"iterator\",\n        \"converter\"\n    };\n\n    for (const char *id : identifiers) {\n        if (strcmp(str, id) == 0) {\n            return true;\n        }\n    }\n\n    return false;\n}\n\nconstexpr bool IsTripleLiteral(const int style) noexcept {\n    return style == SCE_NIM_TRIPLE || style == SCE_NIM_TRIPLEDOUBLE;\n}\n\nconstexpr bool IsLineComment(const int style) noexcept {\n    return style == SCE_NIM_COMMENTLINE || style == SCE_NIM_COMMENTLINEDOC;\n}\n\nconstexpr bool IsStreamComment(const int style) noexcept {\n    return style == SCE_NIM_COMMENT || style == SCE_NIM_COMMENTDOC;\n}\n\n// Adopted from Accessor.cxx\nint GetIndent(const Sci_Position line, Accessor &styler) {\n    Sci_Position startPos = styler.LineStart(line);\n    const Sci_Position eolPos = styler.LineStart(line + 1) - 1;\n\n    char ch = styler[startPos];\n    int style = styler.StyleAt(startPos);\n\n    int indent = 0;\n    bool inPrevPrefix = line > 0;\n    Sci_Position posPrev = inPrevPrefix ? styler.LineStart(line - 1) : 0;\n\n    // No fold points inside triple literals\n    while ((IsASpaceOrTab(ch) || IsTripleLiteral(style)) && (startPos < eolPos)) {\n        if (inPrevPrefix) {\n            const char chPrev = styler[posPrev++];\n            if (chPrev != ' ' && chPrev != '\\t') {\n                inPrevPrefix = false;\n            }\n        }\n\n        if (ch == '\\t') {\n            indent = (indent / 8 + 1) * 8;\n        } else {\n            indent++;\n        }\n\n        startPos++;\n        ch = styler[startPos];\n        style = styler.StyleAt(startPos);\n    }\n\n    // Prevent creating fold lines for comments if indented\n    if (!(IsStreamComment(style) || IsLineComment(style)))\n        indent += SC_FOLDLEVELBASE;\n\n    if (styler.LineStart(line) == styler.Length() \n        || IsASpaceOrTab(ch) \n        || IsNewline(ch) \n        || IsStreamComment(style)\n        || IsLineComment(style)) {\n        return indent | SC_FOLDLEVELWHITEFLAG;\n    } else {\n        return indent;\n    }\n}\n\nint IndentAmount(const Sci_Position line, Accessor &styler) {\n    const int indent = GetIndent(line, styler);\n    const int indentLevel = indent & SC_FOLDLEVELNUMBERMASK;\n    return indentLevel <= SC_FOLDLEVELBASE ? indent : indentLevel | (indent & ~SC_FOLDLEVELNUMBERMASK);\n}\n\nstruct OptionsNim {\n    bool fold;\n    bool foldCompact;\n    bool highlightRawStrIdent;\n\n    OptionsNim() {\n        fold = true;\n        foldCompact = true;\n        highlightRawStrIdent = false;\n    }\n};\n\nstatic const char *const nimWordListDesc[] = {\n    \"Keywords\",\n    nullptr\n};\n\nstruct OptionSetNim : public OptionSet<OptionsNim> {\n    OptionSetNim() {\n        DefineProperty(\"lexer.nim.raw.strings.highlight.ident\", &OptionsNim::highlightRawStrIdent,\n            \"Set to 1 to enable highlighting generalized raw string identifiers. \"\n            \"Generalized raw string identifiers are anything other than r (or R).\");\n\n        DefineProperty(\"fold\", &OptionsNim::fold);\n        DefineProperty(\"fold.compact\", &OptionsNim::foldCompact);\n\n        DefineWordListSets(nimWordListDesc);\n    }\n};\n\nLexicalClass lexicalClasses[] = {\n    // Lexer Nim SCLEX_NIM SCE_NIM_:\n    0,  \"SCE_NIM_DEFAULT\",        \"default\",              \"White space\",\n    1,  \"SCE_NIM_COMMENT\",        \"comment block\",        \"Block comment\",\n    2,  \"SCE_NIM_COMMENTDOC\",     \"comment block doc\",    \"Block doc comment\",\n    3,  \"SCE_NIM_COMMENTLINE\",    \"comment line\",         \"Line comment\",\n    4,  \"SCE_NIM_COMMENTLINEDOC\", \"comment doc\",          \"Line doc comment\",\n    5,  \"SCE_NIM_NUMBER\",         \"literal numeric\",      \"Number\",\n    6,  \"SCE_NIM_STRING\",         \"literal string\",       \"String\",\n    7,  \"SCE_NIM_CHARACTER\",      \"literal string\",       \"Single quoted string\",\n    8,  \"SCE_NIM_WORD\",           \"keyword\",              \"Keyword\",\n    9,  \"SCE_NIM_TRIPLE\",         \"literal string\",       \"Triple quotes\",\n    10, \"SCE_NIM_TRIPLEDOUBLE\",   \"literal string\",       \"Triple double quotes\",\n    11, \"SCE_NIM_BACKTICKS\",      \"operator definition\",  \"Identifiers\",\n    12, \"SCE_NIM_FUNCNAME\",       \"identifier\",           \"Function name definition\",\n    13, \"SCE_NIM_STRINGEOL\",      \"error literal string\", \"String is not closed\",\n    14, \"SCE_NIM_NUMERROR\",       \"numeric error\",        \"Numeric format error\",\n    15, \"SCE_NIM_OPERATOR\",       \"operator\",             \"Operators\",\n    16, \"SCE_NIM_IDENTIFIER\",     \"identifier\",           \"Identifiers\",\n};\n\n}\n\nclass LexerNim : public DefaultLexer {\n    CharacterSet setWord;\n    WordList keywords;\n    OptionsNim options;\n    OptionSetNim osNim;\n\npublic:\n    LexerNim() :\n        DefaultLexer(\"nim\", SCLEX_NIM, lexicalClasses, ELEMENTS(lexicalClasses)),\n        setWord(CharacterSet::setAlphaNum, \"_\", 0x80, true) { }\n\n    virtual ~LexerNim() { }\n\n    void SCI_METHOD Release() noexcept override {\n        delete this;\n    }\n\n    int SCI_METHOD Version() const noexcept override {\n        return lvRelease5;\n    }\n\n    const char * SCI_METHOD PropertyNames() override {\n        return osNim.PropertyNames();\n    }\n\n    int SCI_METHOD PropertyType(const char *name) override {\n        return osNim.PropertyType(name);\n    }\n\n    const char * SCI_METHOD DescribeProperty(const char *name) override {\n        return osNim.DescribeProperty(name);\n    }\n\n    Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) override;\n\n\tconst char * SCI_METHOD PropertyGet(const char* key) override {\n\t\treturn osNim.PropertyGet(key);\n\t}\n\n    const char * SCI_METHOD DescribeWordListSets() override {\n        return osNim.DescribeWordListSets();\n    }\n\n    Sci_Position SCI_METHOD WordListSet(int n, const char *wl) override;\n\n    void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;\n    void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;\n\n    void * SCI_METHOD PrivateCall(int, void *) noexcept override {\n        return nullptr;\n    }\n\n    int SCI_METHOD LineEndTypesSupported() noexcept override {\n        return SC_LINE_END_TYPE_UNICODE;\n    }\n\n    int SCI_METHOD PrimaryStyleFromStyle(int style) noexcept override {\n        return style;\n    }\n\n    static ILexer5 *LexerFactoryNim() {\n        return new LexerNim();\n    }\n};\n\nSci_Position SCI_METHOD LexerNim::PropertySet(const char *key, const char *val) {\n    if (osNim.PropertySet(&options, key, val)) {\n        return 0;\n    }\n\n    return -1;\n}\n\nSci_Position SCI_METHOD LexerNim::WordListSet(int n, const char *wl) {\n    WordList *wordListN = nullptr;\n\n    switch (n) {\n        case 0:\n            wordListN = &keywords;\n            break;\n    }\n\n    Sci_Position firstModification = -1;\n\n    if (wordListN) {\n        WordList wlNew;\n        wlNew.Set(wl);\n\n        if (*wordListN != wlNew) {\n            wordListN->Set(wl);\n            firstModification = 0;\n        }\n    }\n\n    return firstModification;\n}\n\nvoid SCI_METHOD LexerNim::Lex(Sci_PositionU startPos, Sci_Position length,\n                              int initStyle, IDocument *pAccess) {\n    // No one likes a leaky string\n    if (initStyle == SCE_NIM_STRINGEOL) {\n        initStyle = SCE_NIM_DEFAULT;\n    }\n\n    Accessor styler(pAccess, nullptr);\n    StyleContext sc(startPos, length, initStyle, styler);\n\n    // Nim supports nested block comments!\n    Sci_Position lineCurrent = styler.GetLine(startPos);\n    int commentNestLevel = lineCurrent > 0 ? styler.GetLineState(lineCurrent - 1) : 0;\n\n    int numType = NumType::Decimal;\n    int decimalCount = 0;\n\n    bool funcNameExists = false;\n    bool isStylingRawString = false;\n    bool isStylingRawStringIdent = false;\n\n    for (; sc.More(); sc.Forward()) {\n        if (sc.atLineStart) {\n            if (sc.state == SCE_NIM_STRING) {\n                sc.SetState(SCE_NIM_STRING);\n            }\n\n            lineCurrent = styler.GetLine(sc.currentPos);\n            styler.SetLineState(lineCurrent, commentNestLevel);\n        }\n\n        // Handle string line continuation\n        if (sc.ch == '\\\\' && (sc.chNext == '\\n' || sc.chNext == '\\r') &&\n           (sc.state == SCE_NIM_STRING || sc.state == SCE_NIM_CHARACTER) && !isStylingRawString) {\n            sc.Forward();\n\n            if (sc.ch == '\\r' && sc.chNext == '\\n') {\n                sc.Forward();\n            }\n\n            continue;\n        }\n\n        switch (sc.state) {\n            case SCE_NIM_OPERATOR:\n                funcNameExists = false;\n                sc.SetState(SCE_NIM_DEFAULT);\n                break;\n            case SCE_NIM_NUMBER:\n                // For a type suffix, such as 0x80'u8\n                if (sc.ch == '\\'') {\n                    if (sc.chNext == 'i' || sc.chNext == 'I' || \n                        sc.chNext == 'u' || sc.chNext == 'U' ||\n                        sc.chNext == 'f' || sc.chNext == 'F' || \n                        sc.chNext == 'd' || sc.chNext == 'D') {\n                        sc.Forward(2);\n                    }\n                } else if (sc.ch == '.') {\n                    if (IsADigit(sc.chNext)) {\n                        sc.Forward();\n                    } else if (numType <= NumType::Exponent) {\n                        sc.SetState(SCE_NIM_OPERATOR);\n                        break;\n                    } else {\n                        decimalCount++;\n\n                        if (numType == NumType::Decimal) {\n                            if (decimalCount <= 1 && !IsAWordChar(sc.chNext)) {\n                                break;\n                            }\n                        } else if (numType == NumType::Hexadecimal) {\n                            if (decimalCount <= 1 && IsADigit(sc.chNext, 16)) {\n                                break;\n                            }\n\n                            sc.SetState(SCE_NIM_OPERATOR);\n                            break;\n                        }\n                    }\n                } else if (sc.ch == '_') {\n                    // Accept only one underscore between digits\n                    if (IsADigit(sc.chNext)) {\n                        sc.Forward();\n                    }\n                } else if (numType == NumType::Decimal) {\n                    if (sc.chPrev != '\\'' && (sc.ch == 'e' || sc.ch == 'E')) {\n                        numType = NumType::Exponent;\n\n                        if (sc.chNext == '-' || sc.chNext == '+') {\n                            sc.Forward();\n                        }\n\n                        break;\n                    }\n\n                    if (IsADigit(sc.ch)) {\n                        break;\n                    }\n                } else if (numType == NumType::Hexadecimal) {\n                    if (IsADigit(sc.ch, 16)) {\n                        break;\n                    }\n                } else if (IsADigit(sc.ch)) {\n                    if (numType == NumType::Exponent) {\n                        break;\n                    }\n\n                    if (numType == NumType::Octal) {\n                        // Accept only 0-7\n                        if (sc.ch <= '7') {\n                            break;\n                        }\n                    } else if (numType == NumType::Binary) {\n                        // Accept only 0 and 1\n                        if (sc.ch <= '1') {\n                            break;\n                        }\n                    }\n\n                    numType = NumType::FormatError;\n                    break;\n                }\n\n                sc.ChangeState(GetNumStyle(numType));\n                sc.SetState(SCE_NIM_DEFAULT);\n                break;\n            case SCE_NIM_IDENTIFIER:\n                if (sc.ch == '.' || !IsAWordChar(sc.ch)) {\n                    char s[100];\n                    sc.GetCurrent(s, sizeof(s));\n                    int style = SCE_NIM_IDENTIFIER;\n\n                    if (keywords.InList(s) && !funcNameExists) {\n                        // Prevent styling keywords if they are sub-identifiers\n                        const Sci_Position segStart = styler.GetStartSegment() - 1;\n                        if (segStart < 0 || styler.SafeGetCharAt(segStart, '\\0') != '.') {\n                            style = SCE_NIM_WORD;\n                        }\n                    } else if (funcNameExists) {\n                        style = SCE_NIM_FUNCNAME;\n                    }\n\n                    sc.ChangeState(style);\n                    sc.SetState(SCE_NIM_DEFAULT);\n\n                    if (style == SCE_NIM_WORD) {\n                        funcNameExists = IsFuncName(s);\n                    } else {\n                        funcNameExists = false;\n                    }\n                }\n\n                if (IsAlphaNumeric(sc.ch) && sc.chNext == '\\\"') {\n                    isStylingRawStringIdent = true;\n\n                    if (options.highlightRawStrIdent) {\n                        if (styler.SafeGetCharAt(sc.currentPos + 2) == '\\\"' &&\n                            styler.SafeGetCharAt(sc.currentPos + 3) == '\\\"') {\n                            sc.ChangeState(SCE_NIM_TRIPLEDOUBLE);\n                        } else {\n                            sc.ChangeState(SCE_NIM_STRING);\n                        }\n                    }\n\n                    sc.ForwardSetState(SCE_NIM_DEFAULT);\n                }\n                break;\n            case SCE_NIM_FUNCNAME:\n                if (sc.ch == '`') {\n                    funcNameExists = false;\n                    sc.ForwardSetState(SCE_NIM_DEFAULT);\n                } else if (sc.atLineEnd) {\n                    // Prevent leaking the style to the next line if not closed\n                    funcNameExists = false;\n\n                    sc.ChangeState(SCE_NIM_STRINGEOL);\n                    sc.ForwardSetState(SCE_NIM_DEFAULT);\n                }\n                break;\n            case SCE_NIM_COMMENT:\n                if (sc.Match(']', '#')) {\n                    if (commentNestLevel > 0) {\n                        commentNestLevel--;\n                    }\n\n                    lineCurrent = styler.GetLine(sc.currentPos);\n                    styler.SetLineState(lineCurrent, commentNestLevel);\n                    sc.Forward();\n\n                    if (commentNestLevel == 0) {\n                        sc.ForwardSetState(SCE_NIM_DEFAULT);\n                    }\n                } else if (sc.Match('#', '[')) {\n                    commentNestLevel++;\n                    lineCurrent = styler.GetLine(sc.currentPos);\n                    styler.SetLineState(lineCurrent, commentNestLevel);\n                }\n                break;\n            case SCE_NIM_COMMENTDOC:\n                if (sc.Match(\"]##\")) {\n                    if (commentNestLevel > 0) {\n                        commentNestLevel--;\n                    }\n\n                    lineCurrent = styler.GetLine(sc.currentPos);\n                    styler.SetLineState(lineCurrent, commentNestLevel);\n                    sc.Forward(2);\n\n                    if (commentNestLevel == 0) {\n                        sc.ForwardSetState(SCE_NIM_DEFAULT);\n                    }\n                } else if (sc.Match(\"##[\")) {\n                    commentNestLevel++;\n                    lineCurrent = styler.GetLine(sc.currentPos);\n                    styler.SetLineState(lineCurrent, commentNestLevel);\n                }\n                break;\n            case SCE_NIM_COMMENTLINE:\n            case SCE_NIM_COMMENTLINEDOC:\n                if (sc.atLineStart) {\n                    sc.SetState(SCE_NIM_DEFAULT);\n                }\n                break;\n            case SCE_NIM_STRING:\n                if (!isStylingRawStringIdent && !isStylingRawString && sc.ch == '\\\\') {\n                    if (sc.chNext == '\\\"' || sc.chNext == '\\'' || sc.chNext == '\\\\') {\n                        sc.Forward();\n                    }\n                } else if (isStylingRawString && sc.ch == '\\\"' && sc.chNext == '\\\"') {\n                    // Forward in situations such as r\"a\"\"bc\\\" so that \"bc\\\" wouldn't be\n                    // considered a string of its own\n                    sc.Forward();\n                } else if (sc.ch == '\\\"') {\n                    sc.ForwardSetState(SCE_NIM_DEFAULT);\n                } else if (sc.atLineEnd) {\n                    sc.ChangeState(SCE_NIM_STRINGEOL);\n                    sc.ForwardSetState(SCE_NIM_DEFAULT);\n                }\n                break;\n            case SCE_NIM_CHARACTER:\n                if (sc.ch == '\\\\') {\n                    if (sc.chNext == '\\\"' || sc.chNext == '\\'' || sc.chNext == '\\\\') {\n                        sc.Forward();\n                    }\n                } else if (sc.ch == '\\'') {\n                    sc.ForwardSetState(SCE_NIM_DEFAULT);\n                } else if (sc.atLineEnd) {\n                    sc.ChangeState(SCE_NIM_STRINGEOL);\n                    sc.ForwardSetState(SCE_NIM_DEFAULT);\n                }\n                break;\n            case SCE_NIM_BACKTICKS:\n                if (sc.ch == '`' ) {\n                    sc.ForwardSetState(SCE_NIM_DEFAULT);\n                } else if (sc.atLineEnd) {\n                    sc.ChangeState(SCE_NIM_STRINGEOL);\n                    sc.ForwardSetState(SCE_NIM_DEFAULT);\n                }\n                break;\n            case SCE_NIM_TRIPLEDOUBLE:\n                if (sc.Match(R\"(\"\"\")\")) {\n\n                    // Outright forward all \" after the closing \"\"\" as a triple double\n                    //\n                    // A valid example where this is needed is: \"\"\"8 double quotes->\"\"\"\"\"\"\"\"\n                    // You can have as many \"\"\" at the end as you wish, as long as the actual\n                    // closing literal is there\n                    while (sc.ch == '\"') {\n                        sc.Forward();\n                    }\n\n                    sc.SetState(SCE_NIM_DEFAULT);\n                }\n                break;\n            case SCE_NIM_TRIPLE:\n                if (sc.Match(\"'''\")) {\n                    sc.Forward(2);\n                    sc.ForwardSetState(SCE_NIM_DEFAULT);\n                }\n                break;\n        }\n\n        if (sc.state == SCE_NIM_DEFAULT) {\n            // Number\n            if (IsADigit(sc.ch)) {\n                sc.SetState(SCE_NIM_NUMBER);\n\n                numType = NumType::Decimal;\n                decimalCount = 0;\n\n                if (sc.ch == '0') {\n                    if (IsNumHex(sc)) {\n                        numType = NumType::Hexadecimal;\n                    } else if (IsNumBinary(sc)) {\n                        numType = NumType::Binary;\n                    } else if (IsNumOctal(sc)) {\n                        numType = NumType::Octal;\n                    }\n\n                    if (numType != NumType::Decimal) {\n                        sc.Forward();\n                    }\n                }\n            }\n            // Raw string\n            else if (IsAlphaNumeric(sc.ch) && sc.chNext == '\\\"') {\n                isStylingRawString = true;\n\n                // Triple doubles can be raw strings too. How sweet\n                if (styler.SafeGetCharAt(sc.currentPos + 2) == '\\\"' &&\n                    styler.SafeGetCharAt(sc.currentPos + 3) == '\\\"') {\n                    sc.SetState(SCE_NIM_TRIPLEDOUBLE);\n                } else {\n                    sc.SetState(SCE_NIM_STRING);\n                }\n\n                const int rawStrStyle = options.highlightRawStrIdent ? IsLetter(sc.ch) :\n                                        (sc.ch == 'r' || sc.ch == 'R');\n\n                if (rawStrStyle) {\n                    sc.Forward();\n\n                    if (sc.state == SCE_NIM_TRIPLEDOUBLE) {\n                        sc.Forward(2);\n                    }\n                } else {\n                    // Anything other than r/R is considered a general raw string identifier\n                    isStylingRawStringIdent = true;\n                    sc.SetState(SCE_NIM_IDENTIFIER);\n                }\n            }\n            // String and triple double literal\n            else if (sc.ch == '\\\"') {\n                isStylingRawString = false;\n\n                if (sc.Match(R\"(\"\"\")\")) {\n                    sc.SetState(SCE_NIM_TRIPLEDOUBLE);\n                    \n                    // Keep forwarding until the total opening literal count is 5\n                    // A valid example where this is needed is: \"\"\"\"\"<-5 double quotes\"\"\"\n                    while (sc.ch == '\"') {\n                        sc.Forward();\n\n                        if (sc.Match(R\"(\"\"\")\")) {\n                            sc.Forward();\n                            break;\n                        }\n                    }\n                } else {\n                    sc.SetState(SCE_NIM_STRING);\n                }\n            }\n            // Charecter and triple literal\n            else if (sc.ch == '\\'') {\n                if (sc.Match(\"'''\")) {\n                    sc.SetState(SCE_NIM_TRIPLE);\n                } else {\n                    sc.SetState(SCE_NIM_CHARACTER);\n                }\n            }\n            // Operator definition\n            else if (sc.ch == '`') {\n                if (funcNameExists) {\n                    sc.SetState(SCE_NIM_FUNCNAME);\n                } else {\n                    sc.SetState(SCE_NIM_BACKTICKS);\n                }\n            }\n            // Keyword\n            else if (iswordstart(sc.ch)) {\n                sc.SetState(SCE_NIM_IDENTIFIER);\n            }\n            // Comments\n            else if (sc.ch == '#') {\n                if (sc.Match(\"##[\") || sc.Match(\"#[\")) {\n                    commentNestLevel++;\n                    lineCurrent = styler.GetLine(sc.currentPos);\n                    styler.SetLineState(lineCurrent, commentNestLevel);\n                }\n\n                if (sc.Match(\"##[\")) {\n                    sc.SetState(SCE_NIM_COMMENTDOC);\n                    sc.Forward();\n                } else if (sc.Match(\"#[\")) {\n                    sc.SetState(SCE_NIM_COMMENT);\n                    sc.Forward();\n                } else if (sc.Match(\"##\")) {\n                    sc.SetState(SCE_NIM_COMMENTLINEDOC);\n                } else {\n                    sc.SetState(SCE_NIM_COMMENTLINE);\n                }\n            }\n            // Operators\n            else if (strchr(\"()[]{}:=;-\\\\/&%$!+<>|^?,.*~@\", sc.ch)) {\n                sc.SetState(SCE_NIM_OPERATOR);\n            }\n        }\n\n        if (sc.atLineEnd) {\n            funcNameExists = false;\n            isStylingRawString = false;\n            isStylingRawStringIdent = false;\n        }\n    }\n\n    sc.Complete();\n}\n\nvoid SCI_METHOD LexerNim::Fold(Sci_PositionU startPos, Sci_Position length, int, IDocument *pAccess) {\n    if (!options.fold) {\n        return;\n    }\n\n    Accessor styler(pAccess, nullptr);\n\n    const Sci_Position docLines = styler.GetLine(styler.Length());\n    const Sci_Position maxPos = startPos + length;\n    const Sci_Position maxLines = styler.GetLine(maxPos == styler.Length() ? maxPos : maxPos - 1);\n\n    Sci_Position lineCurrent = styler.GetLine(startPos);\n    int indentCurrent = IndentAmount(lineCurrent, styler);\n\n    while (lineCurrent > 0) {\n        lineCurrent--;\n        indentCurrent = IndentAmount(lineCurrent, styler);\n\n        if (!(indentCurrent & SC_FOLDLEVELWHITEFLAG)) {\n            break;\n        }\n    }\n\n    int indentCurrentLevel = indentCurrent & SC_FOLDLEVELNUMBERMASK;\n    indentCurrent = indentCurrentLevel | (indentCurrent & ~SC_FOLDLEVELNUMBERMASK);\n\n    while (lineCurrent <= docLines && lineCurrent <= maxLines) {\n        Sci_Position lineNext = lineCurrent + 1;\n        int indentNext = indentCurrent;\n        int lev = indentCurrent;\n\n        if (lineNext <= docLines) {\n            indentNext = IndentAmount(lineNext, styler);\n        }\n\n        if (indentNext & SC_FOLDLEVELWHITEFLAG) {\n            indentNext = SC_FOLDLEVELWHITEFLAG | indentCurrentLevel;\n        }\n\n        while (lineNext < docLines && (indentNext & SC_FOLDLEVELWHITEFLAG)) {\n            lineNext++;\n            indentNext = IndentAmount(lineNext, styler);\n        }\n\n        const int indentNextLevel = indentNext & SC_FOLDLEVELNUMBERMASK;\n        indentNext = indentNextLevel | (indentNext & ~SC_FOLDLEVELNUMBERMASK);\n\n        const int levelBeforeComments = std::max(indentCurrentLevel, indentNextLevel);\n\n        Sci_Position skipLine = lineNext;\n        int skipLevel = indentNextLevel;\n\n        while (--skipLine > lineCurrent) {\n            const int skipLineIndent = IndentAmount(skipLine, styler);\n\n            if (options.foldCompact) {\n                if ((skipLineIndent & SC_FOLDLEVELNUMBERMASK) > indentNextLevel) {\n                    skipLevel = levelBeforeComments;\n                }\n\n                const int whiteFlag = skipLineIndent & SC_FOLDLEVELWHITEFLAG;\n                styler.SetLevel(skipLine, skipLevel | whiteFlag);\n            } else {\n                if ((skipLineIndent & SC_FOLDLEVELNUMBERMASK) > indentNextLevel &&\n                   !(skipLineIndent & SC_FOLDLEVELWHITEFLAG)) {\n                    skipLevel = levelBeforeComments;\n                }\n\n                styler.SetLevel(skipLine, skipLevel);\n            }\n        }\n\n        if (!(indentCurrent & SC_FOLDLEVELWHITEFLAG)) {\n            if ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext & SC_FOLDLEVELNUMBERMASK)) {\n                lev |= SC_FOLDLEVELHEADERFLAG;\n            }\n        }\n\n        styler.SetLevel(lineCurrent, options.foldCompact ? lev : lev & ~SC_FOLDLEVELWHITEFLAG);\n\n        indentCurrent = indentNext;\n        indentCurrentLevel = indentNextLevel;\n        lineCurrent = lineNext;\n    }\n}\n\nLexerModule lmNim(SCLEX_NIM, LexerNim::LexerFactoryNim, \"nim\", nimWordListDesc);"
  },
  {
    "path": "lexilla/lexers/LexNimrod.cxx",
    "content": "// Scintilla source code edit control\n// Nimrod lexer\n// (c) 2009 Andreas Rumpf\n/** @file LexNimrod.cxx\n ** Lexer for Nimrod.\n ** This lexer has been superceded by the \"nim\" lexer in LexNim.cxx.\n **/\n// Copyright 1998-2002 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nstatic inline bool IsAWordChar(int ch) {\n\treturn (ch >= 0x80) || isalnum(ch) || ch == '_';\n}\n\nstatic Sci_Position tillEndOfTripleQuote(Accessor &styler, Sci_Position pos, Sci_Position max) {\n  /* search for \"\"\" */\n  for (;;) {\n    if (styler.SafeGetCharAt(pos, '\\0') == '\\0') return pos;\n    if (pos >= max) return pos;\n    if (styler.Match(pos, \"\\\"\\\"\\\"\")) {\n      return pos + 2;\n    }\n    pos++;\n  }\n}\n\n#define CR 13 /* use both because Scite allows changing the line ending */\n#define LF 10\n\nstatic bool inline isNewLine(int ch) {\n  return ch == CR || ch == LF;\n}\n\nstatic Sci_Position scanString(Accessor &styler, Sci_Position pos, Sci_Position max, bool rawMode) {\n  for (;;) {\n    if (pos >= max) return pos;\n    char ch = styler.SafeGetCharAt(pos, '\\0');\n    if (ch == CR || ch == LF || ch == '\\0') return pos;\n    if (ch == '\"') return pos;\n    if (ch == '\\\\' && !rawMode) {\n      pos += 2;\n    } else {\n      pos++;\n    }\n  }\n}\n\nstatic Sci_Position scanChar(Accessor &styler, Sci_Position pos, Sci_Position max) {\n  for (;;) {\n    if (pos >= max) return pos;\n    char ch = styler.SafeGetCharAt(pos, '\\0');\n    if (ch == CR || ch == LF || ch == '\\0') return pos;\n    if (ch == '\\'' && !isalnum(styler.SafeGetCharAt(pos+1, '\\0')) )\n      return pos;\n    if (ch == '\\\\') {\n      pos += 2;\n    } else {\n      pos++;\n    }\n  }\n}\n\nstatic Sci_Position scanIdent(Accessor &styler, Sci_Position pos, WordList &keywords) {\n  char buf[100]; /* copy to lowercase and ignore underscores */\n  Sci_Position i = 0;\n\n  for (;;) {\n    char ch = styler.SafeGetCharAt(pos, '\\0');\n    if (!IsAWordChar(ch)) break;\n    if (ch != '_' && i < ((int)sizeof(buf))-1) {\n      buf[i] = static_cast<char>(tolower(ch));\n      i++;\n    }\n    pos++;\n  }\n  buf[i] = '\\0';\n  /* look for keyword */\n  if (keywords.InList(buf)) {\n    styler.ColourTo(pos-1, SCE_P_WORD);\n  } else {\n    styler.ColourTo(pos-1, SCE_P_IDENTIFIER);\n  }\n  return pos;\n}\n\nstatic Sci_Position scanNumber(Accessor &styler, Sci_Position pos) {\n  char ch, ch2;\n  ch = styler.SafeGetCharAt(pos, '\\0');\n  ch2 = styler.SafeGetCharAt(pos+1, '\\0');\n  if (ch == '0' && (ch2 == 'b' || ch2 == 'B')) {\n    /* binary number: */\n    pos += 2;\n    for (;;) {\n      ch = styler.SafeGetCharAt(pos, '\\0');\n      if (ch == '_' || (ch >= '0' && ch <= '1')) ++pos;\n      else break;\n    }\n  } else if (ch == '0' &&\n            (ch2 == 'o' || ch2 == 'O' || ch2 == 'c' || ch2 == 'C')) {\n    /* octal number: */\n    pos += 2;\n    for (;;) {\n      ch = styler.SafeGetCharAt(pos, '\\0');\n      if (ch == '_' || (ch >= '0' && ch <= '7')) ++pos;\n      else break;\n    }\n  } else if (ch == '0' && (ch2 == 'x' || ch2 == 'X')) {\n    /* hexadecimal number: */\n    pos += 2;\n    for (;;) {\n      ch = styler.SafeGetCharAt(pos, '\\0');\n      if (ch == '_' || (ch >= '0' && ch <= '9')\n          || (ch >= 'a' && ch <= 'f')\n          || (ch >= 'A' && ch <= 'F')) ++pos;\n      else break;\n    }\n  } else {\n    // skip decimal part:\n    for (;;) {\n      ch = styler.SafeGetCharAt(pos, '\\0');\n      if (ch == '_' || (ch >= '0' && ch <= '9')) ++pos;\n      else break;\n    }\n    ch2 = styler.SafeGetCharAt(pos+1, '\\0');\n    if (ch == '.' && ch2 >= '0' && ch2 <= '9') {\n      ++pos; // skip '.'\n      for (;;) {\n        ch = styler.SafeGetCharAt(pos, '\\0');\n        if (ch == '_' || (ch >= '0' && ch <= '9')) ++pos;\n        else break;\n      }\n    }\n    if (ch == 'e' || ch == 'E') {\n      ++pos;\n      ch = styler.SafeGetCharAt(pos, '\\0');\n      if (ch == '-' || ch == '+') ++pos;\n      for (;;) {\n        ch = styler.SafeGetCharAt(pos, '\\0');\n        if (ch == '_' || (ch >= '0' && ch <= '9')) ++pos;\n        else break;\n      }\n    }\n  }\n  if (ch == '\\'') {\n    /* a type suffix: */\n    pos++;\n    for (;;) {\n      ch = styler.SafeGetCharAt(pos);\n      if ((ch >= '0' && ch <= '9') || (ch >= 'A' && ch <= 'Z')\n         || (ch >= 'a' && ch <= 'z') || ch == '_') ++pos;\n      else break;\n    }\n  }\n  styler.ColourTo(pos-1, SCE_P_NUMBER);\n  return pos;\n}\n\n/* rewritten from scratch, because I couldn't get rid of the bugs...\n   (A character based approach sucks!)\n*/\nstatic void ColouriseNimrodDoc(Sci_PositionU startPos, Sci_Position length, int initStyle,\n                                WordList *keywordlists[], Accessor &styler) {\n  Sci_Position pos = startPos;\n  Sci_Position max = startPos + length;\n  char ch;\n  WordList &keywords = *keywordlists[0];\n\n  styler.StartAt(startPos);\n  styler.StartSegment(startPos);\n\n  switch (initStyle) {\n    /* check where we are: */\n    case SCE_P_TRIPLEDOUBLE:\n      pos = tillEndOfTripleQuote(styler, pos, max);\n      styler.ColourTo(pos, SCE_P_TRIPLEDOUBLE);\n      pos++;\n    break;\n    default: /* nothing to do: */\n    break;\n  }\n  while (pos < max) {\n    ch = styler.SafeGetCharAt(pos, '\\0');\n    switch (ch) {\n      case '\\0': return;\n      case '#': {\n        bool doccomment = (styler.SafeGetCharAt(pos+1) == '#');\n        while (pos < max && !isNewLine(styler.SafeGetCharAt(pos, LF))) pos++;\n        if (doccomment)\n          styler.ColourTo(pos, SCE_C_COMMENTLINEDOC);\n        else\n          styler.ColourTo(pos, SCE_P_COMMENTLINE);\n      } break;\n      case 'r': case 'R': {\n        if (styler.SafeGetCharAt(pos+1) == '\"') {\n          pos = scanString(styler, pos+2, max, true);\n          styler.ColourTo(pos, SCE_P_STRING);\n          pos++;\n        } else {\n          pos = scanIdent(styler, pos, keywords);\n        }\n      } break;\n      case '\"':\n        if (styler.Match(pos+1, \"\\\"\\\"\")) {\n          pos = tillEndOfTripleQuote(styler, pos+3, max);\n          styler.ColourTo(pos, SCE_P_TRIPLEDOUBLE);\n        } else {\n          pos = scanString(styler, pos+1, max, false);\n          styler.ColourTo(pos, SCE_P_STRING);\n        }\n        pos++;\n      break;\n      case '\\'':\n        pos = scanChar(styler, pos+1, max);\n        styler.ColourTo(pos, SCE_P_CHARACTER);\n        pos++;\n      break;\n      default: // identifers, numbers, operators, whitespace\n        if (ch >= '0' && ch <= '9') {\n          pos = scanNumber(styler, pos);\n        } else if (IsAWordChar(ch)) {\n          pos = scanIdent(styler, pos, keywords);\n        } else if (ch == '`') {\n          pos++;\n          while (pos < max) {\n            ch = styler.SafeGetCharAt(pos, LF);\n            if (ch == '`') {\n              ++pos;\n              break;\n            }\n            if (ch == CR || ch == LF) break;\n            ++pos;\n          }\n          styler.ColourTo(pos, SCE_P_IDENTIFIER);\n        } else if (strchr(\"()[]{}:=;-\\\\/&%$!+<>|^?,.*~@\", ch)) {\n          styler.ColourTo(pos, SCE_P_OPERATOR);\n          pos++;\n        } else {\n          styler.ColourTo(pos, SCE_P_DEFAULT);\n          pos++;\n        }\n      break;\n    }\n  }\n}\n\nstatic bool IsCommentLine(Sci_Position line, Accessor &styler) {\n\tSci_Position pos = styler.LineStart(line);\n\tSci_Position eol_pos = styler.LineStart(line + 1) - 1;\n\tfor (Sci_Position i = pos; i < eol_pos; i++) {\n\t\tchar ch = styler[i];\n\t\tif (ch == '#')\n\t\t\treturn true;\n\t\telse if (ch != ' ' && ch != '\\t')\n\t\t\treturn false;\n\t}\n\treturn false;\n}\n\nstatic bool IsQuoteLine(Sci_Position line, Accessor &styler) {\n\tint style = styler.StyleAt(styler.LineStart(line)) & 31;\n\treturn ((style == SCE_P_TRIPLE) || (style == SCE_P_TRIPLEDOUBLE));\n}\n\n\nstatic void FoldNimrodDoc(Sci_PositionU startPos, Sci_Position length,\n                          int /*initStyle - unused*/,\n                          WordList *[], Accessor &styler) {\n\tconst Sci_Position maxPos = startPos + length;\n\tconst Sci_Position maxLines = styler.GetLine(maxPos - 1); // Requested last line\n\tconst Sci_Position docLines = styler.GetLine(styler.Length() - 1); // Available last line\n\tconst bool foldComment = styler.GetPropertyInt(\"fold.comment.nimrod\") != 0;\n\tconst bool foldQuotes = styler.GetPropertyInt(\"fold.quotes.nimrod\") != 0;\n\n\t// Backtrack to previous non-blank line so we can determine indent level\n\t// for any white space lines (needed esp. within triple quoted strings)\n\t// and so we can fix any preceding fold level (which is why we go back\n\t// at least one line in all cases)\n\tint spaceFlags = 0;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tint indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags, NULL);\n\twhile (lineCurrent > 0) {\n\t\tlineCurrent--;\n\t\tindentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags, NULL);\n\t\tif (!(indentCurrent & SC_FOLDLEVELWHITEFLAG) &&\n\t\t        (!IsCommentLine(lineCurrent, styler)) &&\n\t\t        (!IsQuoteLine(lineCurrent, styler)))\n\t\t\tbreak;\n\t}\n\tint indentCurrentLevel = indentCurrent & SC_FOLDLEVELNUMBERMASK;\n\n\t// Set up initial loop state\n\tstartPos = styler.LineStart(lineCurrent);\n\tint prev_state = SCE_P_DEFAULT & 31;\n\tif (lineCurrent >= 1)\n\t\tprev_state = styler.StyleAt(startPos - 1) & 31;\n\tint prevQuote = foldQuotes && ((prev_state == SCE_P_TRIPLE) ||\n\t                               (prev_state == SCE_P_TRIPLEDOUBLE));\n\tint prevComment = 0;\n\tif (lineCurrent >= 1)\n\t\tprevComment = foldComment && IsCommentLine(lineCurrent - 1, styler);\n\n\t// Process all characters to end of requested range or end of any triple quote\n\t// or comment that hangs over the end of the range.  Cap processing in all cases\n\t// to end of document (in case of unclosed quote or comment at end).\n\twhile ((lineCurrent <= docLines) && ((lineCurrent <= maxLines) ||\n\t                                      prevQuote || prevComment)) {\n\n\t\t// Gather info\n\t\tint lev = indentCurrent;\n\t\tSci_Position lineNext = lineCurrent + 1;\n\t\tint indentNext = indentCurrent;\n\t\tint quote = false;\n\t\tif (lineNext <= docLines) {\n\t\t\t// Information about next line is only available if not at end of document\n\t\t\tindentNext = styler.IndentAmount(lineNext, &spaceFlags, NULL);\n\t\t\tint style = styler.StyleAt(styler.LineStart(lineNext)) & 31;\n\t\t\tquote = foldQuotes && ((style == SCE_P_TRIPLE) || (style == SCE_P_TRIPLEDOUBLE));\n\t\t}\n\t\tconst int quote_start = (quote && !prevQuote);\n\t\tconst int quote_continue = (quote && prevQuote);\n\t\tconst int comment = foldComment && IsCommentLine(lineCurrent, styler);\n\t\tconst int comment_start = (comment && !prevComment && (lineNext <= docLines) &&\n\t\t                           IsCommentLine(lineNext, styler) &&\n\t\t                           (lev > SC_FOLDLEVELBASE));\n\t\tconst int comment_continue = (comment && prevComment);\n\t\tif ((!quote || !prevQuote) && !comment)\n\t\t\tindentCurrentLevel = indentCurrent & SC_FOLDLEVELNUMBERMASK;\n\t\tif (quote)\n\t\t\tindentNext = indentCurrentLevel;\n\t\tif (indentNext & SC_FOLDLEVELWHITEFLAG)\n\t\t\tindentNext = SC_FOLDLEVELWHITEFLAG | indentCurrentLevel;\n\n\t\tif (quote_start) {\n\t\t\t// Place fold point at start of triple quoted string\n\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t} else if (quote_continue || prevQuote) {\n\t\t\t// Add level to rest of lines in the string\n\t\t\tlev = lev + 1;\n\t\t} else if (comment_start) {\n\t\t\t// Place fold point at start of a block of comments\n\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t} else if (comment_continue) {\n\t\t\t// Add level to rest of lines in the block\n\t\t\tlev = lev + 1;\n\t\t}\n\n\t\t// Skip past any blank lines for next indent level info; we skip also\n\t\t// comments (all comments, not just those starting in column 0)\n\t\t// which effectively folds them into surrounding code rather\n\t\t// than screwing up folding.\n\n\t\twhile (!quote &&\n\t\t        (lineNext < docLines) &&\n\t\t        ((indentNext & SC_FOLDLEVELWHITEFLAG) ||\n\t\t         (lineNext <= docLines && IsCommentLine(lineNext, styler)))) {\n\n\t\t\tlineNext++;\n\t\t\tindentNext = styler.IndentAmount(lineNext, &spaceFlags, NULL);\n\t\t}\n\n\t\tconst int levelAfterComments = indentNext & SC_FOLDLEVELNUMBERMASK;\n\t\tconst int levelBeforeComments =\n\t\t    Maximum(indentCurrentLevel,levelAfterComments);\n\n\t\t// Now set all the indent levels on the lines we skipped\n\t\t// Do this from end to start.  Once we encounter one line\n\t\t// which is indented more than the line after the end of\n\t\t// the comment-block, use the level of the block before\n\n\t\tSci_Position skipLine = lineNext;\n\t\tint skipLevel = levelAfterComments;\n\n\t\twhile (--skipLine > lineCurrent) {\n\t\t\tint skipLineIndent = styler.IndentAmount(skipLine, &spaceFlags, NULL);\n\n\t\t\tif ((skipLineIndent & SC_FOLDLEVELNUMBERMASK) > levelAfterComments)\n\t\t\t\tskipLevel = levelBeforeComments;\n\n\t\t\tint whiteFlag = skipLineIndent & SC_FOLDLEVELWHITEFLAG;\n\n\t\t\tstyler.SetLevel(skipLine, skipLevel | whiteFlag);\n\t\t}\n\n\t\t// Set fold header on non-quote/non-comment line\n\t\tif (!quote && !comment && !(indentCurrent & SC_FOLDLEVELWHITEFLAG) ) {\n\t\t\tif ((indentCurrent & SC_FOLDLEVELNUMBERMASK) <\n\t\t\t     (indentNext & SC_FOLDLEVELNUMBERMASK))\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t}\n\n\t\t// Keep track of triple quote and block comment state of previous line\n\t\tprevQuote = quote;\n\t\tprevComment = comment_start || comment_continue;\n\n\t\t// Set fold level for this line and move to next line\n\t\tstyler.SetLevel(lineCurrent, lev);\n\t\tindentCurrent = indentNext;\n\t\tlineCurrent = lineNext;\n\t}\n\n\t// NOTE: Cannot set level of last line here because indentCurrent doesn't have\n\t// header flag set; the loop above is crafted to take care of this case!\n\t//styler.SetLevel(lineCurrent, indentCurrent);\n}\n\nstatic const char * const nimrodWordListDesc[] = {\n\t\"Keywords\",\n\t0\n};\n\nLexerModule lmNimrod(SCLEX_NIMROD, ColouriseNimrodDoc, \"nimrod\", FoldNimrodDoc,\n\t\t\t\t     nimrodWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexNsis.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexNsis.cxx\n ** Lexer for NSIS\n **/\n// Copyright 2003 - 2005 by Angelo Mandato <angelo [at] spaceblue [dot] com>\n// Last Updated: 03/13/2005\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\n/*\n// located in SciLexer.h\n#define SCLEX_NSIS 43\n\n#define SCE_NSIS_DEFAULT 0\n#define SCE_NSIS_COMMENT 1\n#define SCE_NSIS_STRINGDQ 2\n#define SCE_NSIS_STRINGLQ 3\n#define SCE_NSIS_STRINGRQ 4\n#define SCE_NSIS_FUNCTION 5\n#define SCE_NSIS_VARIABLE 6\n#define SCE_NSIS_LABEL 7\n#define SCE_NSIS_USERDEFINED 8\n#define SCE_NSIS_SECTIONDEF 9\n#define SCE_NSIS_SUBSECTIONDEF 10\n#define SCE_NSIS_IFDEFINEDEF 11\n#define SCE_NSIS_MACRODEF 12\n#define SCE_NSIS_STRINGVAR 13\n#define SCE_NSIS_NUMBER 14\n// ADDED for Scintilla v1.63\n#define SCE_NSIS_SECTIONGROUP 15\n#define SCE_NSIS_PAGEEX 16\n#define SCE_NSIS_FUNCTIONDEF 17\n#define SCE_NSIS_COMMENTBOX 18\n*/\n\nstatic bool isNsisNumber(char ch)\n{\n  return (ch >= '0' && ch <= '9');\n}\n\nstatic bool isNsisChar(char ch)\n{\n  return (ch == '.' ) || (ch == '_' ) || isNsisNumber(ch) || (ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z');\n}\n\nstatic bool isNsisLetter(char ch)\n{\n  return (ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z');\n}\n\nstatic bool NsisNextLineHasElse(Sci_PositionU start, Sci_PositionU end, Accessor &styler)\n{\n  Sci_Position nNextLine = -1;\n  for( Sci_PositionU i = start; i < end; i++ )\n  {\n    char cNext = styler.SafeGetCharAt( i );\n    if( cNext == '\\n' )\n    {\n      nNextLine = i+1;\n      break;\n    }\n  }\n\n  if( nNextLine == -1 ) // We never found the next line...\n    return false;\n\n  for( Sci_PositionU firstChar = nNextLine; firstChar < end; firstChar++ )\n  {\n    char cNext = styler.SafeGetCharAt( firstChar );\n    if( cNext == ' ' )\n      continue;\n    if( cNext == '\\t' )\n      continue;\n    if( cNext == '!' )\n    {\n      if( styler.Match(firstChar, \"!else\") )\n        return true;\n    }\n    break;\n  }\n\n  return false;\n}\n\nstatic int NsisCmp( const char *s1, const char *s2, bool bIgnoreCase )\n{\n  if( bIgnoreCase )\n     return CompareCaseInsensitive( s1, s2);\n\n  return strcmp( s1, s2 );\n}\n\nstatic int calculateFoldNsis(Sci_PositionU start, Sci_PositionU end, int foldlevel, Accessor &styler, bool bElse, bool foldUtilityCmd )\n{\n  int style = styler.StyleAt(end);\n\n  // If the word is too long, it is not what we are looking for\n  if( end - start > 20 )\n    return foldlevel;\n\n  if( foldUtilityCmd )\n  {\n    // Check the style at this point, if it is not valid, then return zero\n    if( style != SCE_NSIS_FUNCTIONDEF && style != SCE_NSIS_SECTIONDEF &&\n        style != SCE_NSIS_SUBSECTIONDEF && style != SCE_NSIS_IFDEFINEDEF &&\n        style != SCE_NSIS_MACRODEF && style != SCE_NSIS_SECTIONGROUP &&\n        style != SCE_NSIS_PAGEEX )\n          return foldlevel;\n  }\n  else\n  {\n    if( style != SCE_NSIS_FUNCTIONDEF && style != SCE_NSIS_SECTIONDEF &&\n        style != SCE_NSIS_SUBSECTIONDEF && style != SCE_NSIS_SECTIONGROUP &&\n        style != SCE_NSIS_PAGEEX )\n          return foldlevel;\n  }\n\n  int newFoldlevel = foldlevel;\n  bool bIgnoreCase = false;\n  // property nsis.ignorecase\n  // Set to 1 to ignore case for NSIS.\n  if( styler.GetPropertyInt(\"nsis.ignorecase\") == 1 )\n    bIgnoreCase = true;\n\n  char s[20]; // The key word we are looking for has atmost 13 characters\n  s[0] = '\\0';\n  for (Sci_PositionU i = 0; i < end - start + 1 && i < 19; i++)\n\t{\n\t\ts[i] = static_cast<char>( styler[ start + i ] );\n\t\ts[i + 1] = '\\0';\n\t}\n\n  if( s[0] == '!' )\n  {\n    if( NsisCmp(s, \"!ifndef\", bIgnoreCase) == 0 || NsisCmp(s, \"!ifdef\", bIgnoreCase ) == 0 || NsisCmp(s, \"!ifmacrodef\", bIgnoreCase ) == 0 || NsisCmp(s, \"!ifmacrondef\", bIgnoreCase ) == 0 || NsisCmp(s, \"!if\", bIgnoreCase ) == 0 || NsisCmp(s, \"!macro\", bIgnoreCase ) == 0 )\n      newFoldlevel++;\n    else if( NsisCmp(s, \"!endif\", bIgnoreCase) == 0 || NsisCmp(s, \"!macroend\", bIgnoreCase ) == 0 )\n      newFoldlevel--;\n    else if( bElse && NsisCmp(s, \"!else\", bIgnoreCase) == 0 )\n      newFoldlevel++;\n  }\n  else\n  {\n    if( NsisCmp(s, \"Section\", bIgnoreCase ) == 0 || NsisCmp(s, \"SectionGroup\", bIgnoreCase ) == 0 || NsisCmp(s, \"Function\", bIgnoreCase) == 0 || NsisCmp(s, \"SubSection\", bIgnoreCase ) == 0 || NsisCmp(s, \"PageEx\", bIgnoreCase ) == 0 )\n      newFoldlevel++;\n    else if( NsisCmp(s, \"SectionGroupEnd\", bIgnoreCase ) == 0 || NsisCmp(s, \"SubSectionEnd\", bIgnoreCase ) == 0 || NsisCmp(s, \"FunctionEnd\", bIgnoreCase) == 0 || NsisCmp(s, \"SectionEnd\", bIgnoreCase ) == 0 || NsisCmp(s, \"PageExEnd\", bIgnoreCase ) == 0 )\n      newFoldlevel--;\n  }\n\n  return newFoldlevel;\n}\n\nstatic int classifyWordNsis(Sci_PositionU start, Sci_PositionU end, WordList *keywordLists[], Accessor &styler )\n{\n  bool bIgnoreCase = false;\n  if( styler.GetPropertyInt(\"nsis.ignorecase\") == 1 )\n    bIgnoreCase = true;\n\n  bool bUserVars = false;\n  // property nsis.uservars\n  // Set to 1 to recognise user defined variables in NSIS.\n  if( styler.GetPropertyInt(\"nsis.uservars\") == 1 )\n    bUserVars = true;\n\n\tchar s[100];\n\ts[0] = '\\0';\n\ts[1] = '\\0';\n\n\tWordList &Functions = *keywordLists[0];\n\tWordList &Variables = *keywordLists[1];\n\tWordList &Lables = *keywordLists[2];\n\tWordList &UserDefined = *keywordLists[3];\n\n\tfor (Sci_PositionU i = 0; i < end - start + 1 && i < 99; i++)\n\t{\n    if( bIgnoreCase )\n      s[i] = static_cast<char>( tolower(styler[ start + i ] ) );\n    else\n\t\t  s[i] = static_cast<char>( styler[ start + i ] );\n\t\ts[i + 1] = '\\0';\n\t}\n\n\t// Check for special words...\n\tif( NsisCmp(s, \"!macro\", bIgnoreCase ) == 0 || NsisCmp(s, \"!macroend\", bIgnoreCase) == 0 ) // Covers !macro and !macroend\n\t\treturn SCE_NSIS_MACRODEF;\n\n\tif( NsisCmp(s, \"!ifdef\", bIgnoreCase ) == 0 ||  NsisCmp(s, \"!ifndef\", bIgnoreCase) == 0 ||  NsisCmp(s, \"!endif\", bIgnoreCase) == 0 ) // Covers !ifdef, !ifndef and !endif\n\t\treturn SCE_NSIS_IFDEFINEDEF;\n\n\tif( NsisCmp(s, \"!if\", bIgnoreCase ) == 0 || NsisCmp(s, \"!else\", bIgnoreCase )  == 0 ) // Covers !if and else\n\t\treturn SCE_NSIS_IFDEFINEDEF;\n\n\tif (NsisCmp(s, \"!ifmacrodef\", bIgnoreCase ) == 0 || NsisCmp(s, \"!ifmacrondef\", bIgnoreCase )  == 0 ) // Covers !ifmacrodef and !ifnmacrodef\n\t\treturn SCE_NSIS_IFDEFINEDEF;\n\n  if( NsisCmp(s, \"SectionGroup\", bIgnoreCase) == 0 || NsisCmp(s, \"SectionGroupEnd\", bIgnoreCase) == 0 ) // Covers SectionGroup and SectionGroupEnd\n    return SCE_NSIS_SECTIONGROUP;\n\n\tif( NsisCmp(s, \"Section\", bIgnoreCase ) == 0 || NsisCmp(s, \"SectionEnd\", bIgnoreCase) == 0 ) // Covers Section and SectionEnd\n\t\treturn SCE_NSIS_SECTIONDEF;\n\n\tif( NsisCmp(s, \"SubSection\", bIgnoreCase) == 0 || NsisCmp(s, \"SubSectionEnd\", bIgnoreCase) == 0 ) // Covers SubSection and SubSectionEnd\n\t\treturn SCE_NSIS_SUBSECTIONDEF;\n\n  if( NsisCmp(s, \"PageEx\", bIgnoreCase) == 0 || NsisCmp(s, \"PageExEnd\", bIgnoreCase) == 0 ) // Covers PageEx and PageExEnd\n    return SCE_NSIS_PAGEEX;\n\n\tif( NsisCmp(s, \"Function\", bIgnoreCase) == 0 || NsisCmp(s, \"FunctionEnd\", bIgnoreCase) == 0 ) // Covers Function and FunctionEnd\n\t\treturn SCE_NSIS_FUNCTIONDEF;\n\n\tif ( Functions.InList(s) )\n\t\treturn SCE_NSIS_FUNCTION;\n\n\tif ( Variables.InList(s) )\n\t\treturn SCE_NSIS_VARIABLE;\n\n\tif ( Lables.InList(s) )\n\t\treturn SCE_NSIS_LABEL;\n\n\tif( UserDefined.InList(s) )\n\t\treturn SCE_NSIS_USERDEFINED;\n\n\tif( strlen(s) > 3 )\n\t{\n\t\tif( s[1] == '{' && s[strlen(s)-1] == '}' )\n\t\t\treturn SCE_NSIS_VARIABLE;\n\t}\n\n  // See if the variable is a user defined variable\n  if( s[0] == '$' && bUserVars )\n  {\n    bool bHasSimpleNsisChars = true;\n    for (Sci_PositionU j = 1; j < end - start + 1 && j < 99; j++)\n\t  {\n      if( !isNsisChar( s[j] ) )\n      {\n        bHasSimpleNsisChars = false;\n        break;\n      }\n\t  }\n\n    if( bHasSimpleNsisChars )\n      return SCE_NSIS_VARIABLE;\n  }\n\n  // To check for numbers\n  if( isNsisNumber( s[0] ) )\n  {\n    bool bHasSimpleNsisNumber = true;\n    for (Sci_PositionU j = 1; j < end - start + 1 && j < 99; j++)\n\t  {\n      if( !isNsisNumber( s[j] ) )\n      {\n        bHasSimpleNsisNumber = false;\n        break;\n      }\n\t  }\n\n    if( bHasSimpleNsisNumber )\n      return SCE_NSIS_NUMBER;\n  }\n\n\treturn SCE_NSIS_DEFAULT;\n}\n\nstatic void ColouriseNsisDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *keywordLists[], Accessor &styler)\n{\n\tint state = SCE_NSIS_DEFAULT;\n  if( startPos > 0 )\n    state = styler.StyleAt(startPos-1); // Use the style from the previous line, usually default, but could be commentbox\n\n\tstyler.StartAt( startPos );\n\tstyler.GetLine( startPos );\n\n\tSci_PositionU nLengthDoc = startPos + length;\n\tstyler.StartSegment( startPos );\n\n\tchar cCurrChar;\n\tbool bVarInString = false;\n  bool bClassicVarInString = false;\n\n\tSci_PositionU i;\n\tfor( i = startPos; i < nLengthDoc; i++ )\n\t{\n\t\tcCurrChar = styler.SafeGetCharAt( i );\n\t\tchar cNextChar = styler.SafeGetCharAt(i+1);\n\n\t\tswitch(state)\n\t\t{\n\t\t\tcase SCE_NSIS_DEFAULT:\n\t\t\t\tif( cCurrChar == ';' || cCurrChar == '#' ) // we have a comment line\n\t\t\t\t{\n\t\t\t\t\tstyler.ColourTo(i-1, state );\n\t\t\t\t\tstate = SCE_NSIS_COMMENT;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif( cCurrChar == '\"' )\n\t\t\t\t{\n\t\t\t\t\tstyler.ColourTo(i-1, state );\n\t\t\t\t\tstate = SCE_NSIS_STRINGDQ;\n\t\t\t\t\tbVarInString = false;\n          bClassicVarInString = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif( cCurrChar == '\\'' )\n\t\t\t\t{\n\t\t\t\t\tstyler.ColourTo(i-1, state );\n\t\t\t\t\tstate = SCE_NSIS_STRINGRQ;\n\t\t\t\t\tbVarInString = false;\n          bClassicVarInString = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif( cCurrChar == '`' )\n\t\t\t\t{\n\t\t\t\t\tstyler.ColourTo(i-1, state );\n\t\t\t\t\tstate = SCE_NSIS_STRINGLQ;\n\t\t\t\t\tbVarInString = false;\n          bClassicVarInString = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// NSIS KeyWord,Function, Variable, UserDefined:\n\t\t\t\tif( cCurrChar == '$' || isNsisChar(cCurrChar) || cCurrChar == '!' )\n\t\t\t\t{\n\t\t\t\t\tstyler.ColourTo(i-1,state);\n\t\t\t\t  state = SCE_NSIS_FUNCTION;\n\n          // If it is a number, we must check and set style here first...\n          if( isNsisNumber(cCurrChar) && (cNextChar == '\\t' || cNextChar == ' ' || cNextChar == '\\r' || cNextChar == '\\n' ) )\n              styler.ColourTo( i, SCE_NSIS_NUMBER);\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n        if( cCurrChar == '/' && cNextChar == '*' )\n        {\n          styler.ColourTo(i-1,state);\n          state = SCE_NSIS_COMMENTBOX;\n          break;\n        }\n\n\t\t\t\tbreak;\n\t\t\tcase SCE_NSIS_COMMENT:\n\t\t\t\tif( cNextChar == '\\n' || cNextChar == '\\r' )\n        {\n          // Special case:\n          if( cCurrChar == '\\\\' )\n          {\n            styler.ColourTo(i-2,state);\n            styler.ColourTo(i,SCE_NSIS_DEFAULT);\n          }\n          else\n          {\n\t\t\t\t    styler.ColourTo(i,state);\n            state = SCE_NSIS_DEFAULT;\n          }\n        }\n\t\t\t\tbreak;\n\t\t\tcase SCE_NSIS_STRINGDQ:\n      case SCE_NSIS_STRINGLQ:\n      case SCE_NSIS_STRINGRQ:\n\n        if( styler.SafeGetCharAt(i-1) == '\\\\' && styler.SafeGetCharAt(i-2) == '$' )\n          break; // Ignore the next character, even if it is a quote of some sort\n\n        if( cCurrChar == '\"' && state == SCE_NSIS_STRINGDQ )\n\t\t\t\t{\n\t\t\t\t\tstyler.ColourTo(i,state);\n\t\t\t\t  state = SCE_NSIS_DEFAULT;\n          break;\n\t\t\t\t}\n\n        if( cCurrChar == '`' && state == SCE_NSIS_STRINGLQ )\n        {\n\t\t\t\t\tstyler.ColourTo(i,state);\n\t\t\t\t  state = SCE_NSIS_DEFAULT;\n          break;\n\t\t\t\t}\n\n        if( cCurrChar == '\\'' && state == SCE_NSIS_STRINGRQ )\n\t\t\t\t{\n\t\t\t\t\tstyler.ColourTo(i,state);\n\t\t\t\t  state = SCE_NSIS_DEFAULT;\n          break;\n\t\t\t\t}\n\n        if( cNextChar == '\\r' || cNextChar == '\\n' )\n        {\n          Sci_Position nCurLine = styler.GetLine(i+1);\n          Sci_Position nBack = i;\n          // We need to check if the previous line has a \\ in it...\n          bool bNextLine = false;\n\n          while( nBack > 0 )\n          {\n            if( styler.GetLine(nBack) != nCurLine )\n              break;\n\n            char cTemp = styler.SafeGetCharAt(nBack, 'a'); // Letter 'a' is safe here\n\n            if( cTemp == '\\\\' )\n            {\n              bNextLine = true;\n              break;\n            }\n            if( cTemp != '\\r' && cTemp != '\\n' && cTemp != '\\t' && cTemp != ' ' )\n              break;\n\n            nBack--;\n          }\n\n          if( bNextLine )\n          {\n            styler.ColourTo(i+1,state);\n          }\n          if( bNextLine == false )\n          {\n            styler.ColourTo(i,state);\n\t\t\t\t    state = SCE_NSIS_DEFAULT;\n          }\n        }\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_NSIS_FUNCTION:\n\n\t\t\t\t// NSIS KeyWord:\n        if( cCurrChar == '$' )\n          state = SCE_NSIS_DEFAULT;\n        else if( cCurrChar == '\\\\' && (cNextChar == 'n' || cNextChar == 'r' || cNextChar == 't' ) )\n          state = SCE_NSIS_DEFAULT;\n\t\t\t\telse if( (isNsisChar(cCurrChar) && !isNsisChar( cNextChar) && cNextChar != '}') || cCurrChar == '}' )\n\t\t\t\t{\n\t\t\t\t\tstate = classifyWordNsis( styler.GetStartSegment(), i, keywordLists, styler );\n\t\t\t\t\tstyler.ColourTo( i, state);\n\t\t\t\t\tstate = SCE_NSIS_DEFAULT;\n\t\t\t\t}\n\t\t\t\telse if( !isNsisChar( cCurrChar ) && cCurrChar != '{' && cCurrChar != '}' )\n\t\t\t\t{\n          if( classifyWordNsis( styler.GetStartSegment(), i-1, keywordLists, styler) == SCE_NSIS_NUMBER )\n             styler.ColourTo( i-1, SCE_NSIS_NUMBER );\n\n\t\t\t\t\tstate = SCE_NSIS_DEFAULT;\n\n\t\t\t\t\tif( cCurrChar == '\"' )\n\t\t\t\t\t{\n\t\t\t\t\t\tstate = SCE_NSIS_STRINGDQ;\n\t\t\t\t\t\tbVarInString = false;\n            bClassicVarInString = false;\n\t\t\t\t\t}\n\t\t\t\t\telse if( cCurrChar == '`' )\n\t\t\t\t\t{\n\t\t\t\t\t\tstate = SCE_NSIS_STRINGLQ;\n\t\t\t\t\t\tbVarInString = false;\n            bClassicVarInString = false;\n\t\t\t\t\t}\n\t\t\t\t\telse if( cCurrChar == '\\'' )\n\t\t\t\t\t{\n\t\t\t\t\t\tstate = SCE_NSIS_STRINGRQ;\n\t\t\t\t\t\tbVarInString = false;\n            bClassicVarInString = false;\n\t\t\t\t\t}\n\t\t\t\t\telse if( cCurrChar == '#' || cCurrChar == ';' )\n          {\n\t\t\t\t\t\tstate = SCE_NSIS_COMMENT;\n          }\n\t\t\t\t}\n\t\t\t\tbreak;\n      case SCE_NSIS_COMMENTBOX:\n\n        if( styler.SafeGetCharAt(i-1) == '*' && cCurrChar == '/' )\n        {\n          styler.ColourTo(i,state);\n          state = SCE_NSIS_DEFAULT;\n        }\n        break;\n\t\t}\n\n\t\tif( state == SCE_NSIS_COMMENT || state == SCE_NSIS_COMMENTBOX )\n\t\t{\n\t\t\tstyler.ColourTo(i,state);\n\t\t}\n\t\telse if( state == SCE_NSIS_STRINGDQ || state == SCE_NSIS_STRINGLQ || state == SCE_NSIS_STRINGRQ )\n\t\t{\n      bool bIngoreNextDollarSign = false;\n      bool bUserVars = false;\n      if( styler.GetPropertyInt(\"nsis.uservars\") == 1 )\n        bUserVars = true;\n\n      if( bVarInString && cCurrChar == '$' )\n      {\n        bVarInString = false;\n        bIngoreNextDollarSign = true;\n      }\n      else if( bVarInString && cCurrChar == '\\\\' && (cNextChar == 'n' || cNextChar == 'r' || cNextChar == 't' || cNextChar == '\"' || cNextChar == '`' || cNextChar == '\\'' ) )\n      {\n        styler.ColourTo( i+1, SCE_NSIS_STRINGVAR);\n        bVarInString = false;\n        bIngoreNextDollarSign = false;\n      }\n\n      // Covers \"$INSTDIR and user vars like $MYVAR\"\n      else if( bVarInString && !isNsisChar(cNextChar) )\n      {\n        int nWordState = classifyWordNsis( styler.GetStartSegment(), i, keywordLists, styler);\n\t\t\t\tif( nWordState == SCE_NSIS_VARIABLE )\n\t\t\t\t\tstyler.ColourTo( i, SCE_NSIS_STRINGVAR);\n        else if( bUserVars )\n          styler.ColourTo( i, SCE_NSIS_STRINGVAR);\n        bVarInString = false;\n      }\n      // Covers \"${TEST}...\"\n      else if( bClassicVarInString && cNextChar == '}' )\n      {\n        styler.ColourTo( i+1, SCE_NSIS_STRINGVAR);\n\t\t\t\tbClassicVarInString = false;\n      }\n\n      // Start of var in string\n\t\t\tif( !bIngoreNextDollarSign && cCurrChar == '$' && cNextChar == '{' )\n\t\t\t{\n\t\t\t\tstyler.ColourTo( i-1, state);\n\t\t\t\tbClassicVarInString = true;\n        bVarInString = false;\n\t\t\t}\n      else if( !bIngoreNextDollarSign && cCurrChar == '$' )\n      {\n        styler.ColourTo( i-1, state);\n        bVarInString = true;\n        bClassicVarInString = false;\n      }\n\t\t}\n\t}\n\n  // Colourise remaining document\n\tstyler.ColourTo(nLengthDoc-1,state);\n}\n\nstatic void FoldNsisDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[], Accessor &styler)\n{\n\t// No folding enabled, no reason to continue...\n\tif( styler.GetPropertyInt(\"fold\") == 0 )\n\t\treturn;\n\n  bool foldAtElse = styler.GetPropertyInt(\"fold.at.else\", 0) == 1;\n  bool foldUtilityCmd = styler.GetPropertyInt(\"nsis.foldutilcmd\", 1) == 1;\n  bool blockComment = false;\n\n  Sci_Position lineCurrent = styler.GetLine(startPos);\n  Sci_PositionU safeStartPos = styler.LineStart( lineCurrent );\n\n  bool bArg1 = true;\n  Sci_Position nWordStart = -1;\n\n  int levelCurrent = SC_FOLDLEVELBASE;\n\tif (lineCurrent > 0)\n\t\tlevelCurrent = styler.LevelAt(lineCurrent-1) >> 16;\n\tint levelNext = levelCurrent;\n  int style = styler.StyleAt(safeStartPos);\n  if( style == SCE_NSIS_COMMENTBOX )\n  {\n    if( styler.SafeGetCharAt(safeStartPos) == '/' && styler.SafeGetCharAt(safeStartPos+1) == '*' )\n      levelNext++;\n    blockComment = true;\n  }\n\n  for (Sci_PositionU i = safeStartPos; i < startPos + length; i++)\n\t{\n    char chCurr = styler.SafeGetCharAt(i);\n    style = styler.StyleAt(i);\n    if( blockComment && style != SCE_NSIS_COMMENTBOX )\n    {\n      levelNext--;\n      blockComment = false;\n    }\n    else if( !blockComment && style == SCE_NSIS_COMMENTBOX )\n    {\n      levelNext++;\n      blockComment = true;\n    }\n\n    if( bArg1 && !blockComment)\n    {\n      if( nWordStart == -1 && (isNsisLetter(chCurr) || chCurr == '!') )\n      {\n        nWordStart = i;\n      }\n      else if( isNsisLetter(chCurr) == false && nWordStart > -1 )\n      {\n        int newLevel = calculateFoldNsis( nWordStart, i-1, levelNext, styler, foldAtElse, foldUtilityCmd );\n\n        if( newLevel == levelNext )\n        {\n          if( foldAtElse && foldUtilityCmd )\n          {\n            if( NsisNextLineHasElse(i, startPos + length, styler) )\n              levelNext--;\n          }\n        }\n        else\n          levelNext = newLevel;\n        bArg1 = false;\n      }\n    }\n\n    if( chCurr == '\\n' )\n    {\n      if( bArg1 && foldAtElse && foldUtilityCmd && !blockComment )\n      {\n        if( NsisNextLineHasElse(i, startPos + length, styler) )\n          levelNext--;\n      }\n\n      // If we are on a new line...\n      int levelUse = levelCurrent;\n\t\t\tint lev = levelUse | levelNext << 16;\n      if (levelUse < levelNext )\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\tif (lev != styler.LevelAt(lineCurrent))\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\n\t\t\tlineCurrent++;\n\t\t\tlevelCurrent = levelNext;\n      bArg1 = true; // New line, lets look at first argument again\n      nWordStart = -1;\n    }\n  }\n\n\tint levelUse = levelCurrent;\n\tint lev = levelUse | levelNext << 16;\n\tif (levelUse < levelNext)\n\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\tif (lev != styler.LevelAt(lineCurrent))\n\t\tstyler.SetLevel(lineCurrent, lev);\n}\n\nstatic const char * const nsisWordLists[] = {\n\t\"Functions\",\n\t\"Variables\",\n\t\"Lables\",\n\t\"UserDefined\",\n\t0, };\n\n\nLexerModule lmNsis(SCLEX_NSIS, ColouriseNsisDoc, \"nsis\", FoldNsisDoc, nsisWordLists);\n\n"
  },
  {
    "path": "lexilla/lexers/LexNull.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexNull.cxx\n ** Lexer for no language. Used for plain text and unrecognized files.\n **/\n// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nstatic void ColouriseNullDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[],\n                            Accessor &styler) {\n\t// Null language means all style bytes are 0 so just mark the end - no need to fill in.\n\tif (length > 0) {\n\t\tstyler.StartAt(startPos + length - 1);\n\t\tstyler.StartSegment(startPos + length - 1);\n\t\tstyler.ColourTo(startPos + length - 1, 0);\n\t}\n}\n\nLexerModule lmNull(SCLEX_NULL, ColouriseNullDoc, \"null\");\n"
  },
  {
    "path": "lexilla/lexers/LexOScript.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexOScript.cxx\n ** Lexer for OScript sources; ocx files and/or OSpace dumps.\n ** OScript is a programming language used to develop applications for the\n ** Livelink server platform.\n **/\n// Written by Ferdinand Prantl <prantlf@gmail.com>, inspired by the code from\n// LexVB.cxx and LexPascal.cxx. The License.txt file describes the conditions\n// under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\n// -----------------------------------------\n// Functions classifying a single character.\n\n// This function is generic and should be probably moved to CharSet.h where\n// IsAlphaNumeric the others reside.\ninline bool IsAlpha(int ch) {\n\treturn (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z');\n}\n\nstatic inline bool IsIdentifierChar(int ch) {\n\t// Identifiers cannot contain non-ASCII letters; a word with non-English\n\t// language-specific characters cannot be an identifier.\n\treturn IsAlphaNumeric(ch) || ch == '_';\n}\n\nstatic inline bool IsIdentifierStart(int ch) {\n\t// Identifiers cannot contain non-ASCII letters; a word with non-English\n\t// language-specific characters cannot be an identifier.\n\treturn IsAlpha(ch) || ch == '_';\n}\n\nstatic inline bool IsNumberChar(int ch, int chNext) {\n\t// Numeric constructs are not checked for lexical correctness. They are\n\t// expected to look like +1.23-E9 but actually any bunch of the following\n\t// characters will be styled as number.\n\t// KNOWN PROBLEM: if you put + or - operators immediately after a number\n\t// and the next operand starts with the letter E, the operator will not be\n\t// recognized and it will be styled together with the preceding number.\n\t// This should not occur; at least not often. The coding style recommends\n\t// putting spaces around operators.\n\treturn IsADigit(ch) || toupper(ch) == 'E' || ch == '.' ||\n\t\t   ((ch == '-' || ch == '+') && toupper(chNext) == 'E');\n}\n\n// This function checks for the start or a natural number without any symbols\n// or operators as a prefix; the IsPrefixedNumberStart should be called\n// immediately after this one to cover all possible numeric constructs.\nstatic inline bool IsNaturalNumberStart(int ch) {\n\treturn IsADigit(ch) != 0;\n}\n\nstatic inline bool IsPrefixedNumberStart(int ch, int chNext) {\n\t// KNOWN PROBLEM: if you put + or - operators immediately before a number\n\t// the operator will not be recognized and it will be styled together with\n\t// the succeeding number. This should not occur; at least not often. The\n\t// coding style recommends putting spaces around operators.\n\treturn (ch == '.' || ch == '-' || ch == '+') && IsADigit(chNext);\n}\n\nstatic inline bool IsOperator(int ch) {\n\treturn strchr(\"%^&*()-+={}[]:;<>,/?!.~|\\\\\", ch) != NULL;\n}\n\n// ---------------------------------------------------------------\n// Functions classifying a token currently processed in the lexer.\n\n// Checks if the current line starts with the preprocessor directive used\n// usually to introduce documentation comments: #ifdef DOC. This method is\n// supposed to be called if the line has been recognized as a preprocessor\n// directive already.\nstatic bool IsDocCommentStart(StyleContext &sc) {\n\t// Check the line back to its start only if the end looks promising.\n\tif (sc.LengthCurrent() == 10 && !IsAlphaNumeric(sc.ch)) {\n\t\tchar s[11];\n\t\tsc.GetCurrentLowered(s, sizeof(s));\n\t\treturn strcmp(s, \"#ifdef doc\") == 0;\n\t}\n\treturn false;\n}\n\n// Checks if the current line starts with the preprocessor directive that\n// is complementary to the #ifdef DOC start: #endif. This method is supposed\n// to be called if the current state point to the documentation comment.\n// QUESTIONAL ASSUMPTION: The complete #endif directive is not checked; just\n// the starting #e. However, there is no other preprocessor directive with\n// the same starting letter and thus this optimization should always work.\nstatic bool IsDocCommentEnd(StyleContext &sc) {\n\treturn sc.ch == '#' && sc.chNext == 'e';\n}\n\nclass IdentifierClassifier {\n\tWordList &keywords;  // Passed from keywords property.\n\tWordList &constants; // Passed from keywords2 property.\n\tWordList &operators; // Passed from keywords3 property.\n\tWordList &types;     // Passed from keywords4 property.\n\tWordList &functions; // Passed from keywords5 property.\n\tWordList &objects;   // Passed from keywords6 property.\n\n\tIdentifierClassifier(IdentifierClassifier const&);\n\tIdentifierClassifier& operator=(IdentifierClassifier const&);\n\npublic:\n\tIdentifierClassifier(WordList *keywordlists[]) :\n\t\tkeywords(*keywordlists[0]), constants(*keywordlists[1]),\n\t\toperators(*keywordlists[2]), types(*keywordlists[3]),\n\t\tfunctions(*keywordlists[4]), objects(*keywordlists[5])\n\t{}\n\n\tvoid ClassifyIdentifier(StyleContext &sc) {\n\t\t// Opening parenthesis following an identifier makes it a possible\n\t\t// function call.\n\t\t// KNOWN PROBLEM: If some whitespace is inserted between the\n\t\t// identifier and the parenthesis they will not be able to be\n\t\t// recognized as a function call. This should not occur; at\n\t\t// least not often. Such coding style would be weird.\n\t\tif (sc.Match('(')) {\n\t\t\tchar s[100];\n\t\t\tsc.GetCurrentLowered(s, sizeof(s));\n\t\t\t// Before an opening brace can be control statements and\n\t\t\t// operators too; function call is the last option.\n\t\t\tif (keywords.InList(s)) {\n\t\t\t\tsc.ChangeState(SCE_OSCRIPT_KEYWORD);\n\t\t\t} else if (operators.InList(s)) {\n\t\t\t\tsc.ChangeState(SCE_OSCRIPT_OPERATOR);\n\t\t\t} else if (functions.InList(s)) {\n\t\t\t\tsc.ChangeState(SCE_OSCRIPT_FUNCTION);\n\t\t\t} else {\n\t\t\t\tsc.ChangeState(SCE_OSCRIPT_METHOD);\n\t\t\t}\n\t\t\tsc.SetState(SCE_OSCRIPT_OPERATOR);\n\t\t} else {\n\t\t\tchar s[100];\n\t\t\tsc.GetCurrentLowered(s, sizeof(s));\n\t\t\t// A dot following an identifier means an access to an object\n\t\t\t// member. The related object identifier can be special.\n\t\t\t// KNOWN PROBLEM: If there is whitespace between the identifier\n\t\t\t// and the following dot, the identifier will not be recognized\n\t\t\t// as an object in an object member access. If it is one of the\n\t\t\t// listed static objects it will not be styled.\n\t\t\tif (sc.Match('.') && objects.InList(s)) {\n\t\t\t\tsc.ChangeState(SCE_OSCRIPT_OBJECT);\n\t\t\t\tsc.SetState(SCE_OSCRIPT_OPERATOR);\n\t\t\t} else {\n\t\t\t\tif (keywords.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_OSCRIPT_KEYWORD);\n\t\t\t\t} else if (constants.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_OSCRIPT_CONSTANT);\n\t\t\t\t} else if (operators.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_OSCRIPT_OPERATOR);\n\t\t\t\t} else if (types.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_OSCRIPT_TYPE);\n\t\t\t\t} else if (functions.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_OSCRIPT_FUNCTION);\n\t\t\t\t}\n\t\t\t\tsc.SetState(SCE_OSCRIPT_DEFAULT);\n\t\t\t}\n\t\t}\n\t}\n};\n\n// ------------------------------------------------\n// Function colourising an excerpt of OScript code.\n\nstatic void ColouriseOScriptDoc(Sci_PositionU startPos, Sci_Position length,\n\t\t\t\t\t\t\t\tint initStyle, WordList *keywordlists[],\n\t\t\t\t\t\t\t\tAccessor &styler) {\n\t// I wonder how whole-line styles ended by EOLN can escape the resetting\n\t// code in the loop below and overflow to the next line. Let us make sure\n\t// that a new line does not start with them carried from the previous one.\n\t// NOTE: An overflowing string is intentionally not checked; it reminds\n\t// the developer that the string must be ended on the same line.\n\tif (initStyle == SCE_OSCRIPT_LINE_COMMENT ||\n\t\t\tinitStyle == SCE_OSCRIPT_PREPROCESSOR) {\n\t\tinitStyle = SCE_OSCRIPT_DEFAULT;\n\t}\n\n\tstyler.StartAt(startPos);\n\tStyleContext sc(startPos, length, initStyle, styler);\n\tIdentifierClassifier identifierClassifier(keywordlists);\n\n\t// It starts with true at the beginning of a line and changes to false as\n\t// soon as the first non-whitespace character has been processed.\n\tbool isFirstToken = true;\n\t// It starts with true at the beginning of a line and changes to false as\n\t// soon as the first identifier on the line is passed by.\n\tbool isFirstIdentifier = true;\n\t// It becomes false when #ifdef DOC (the preprocessor directive often\n\t// used to start a documentation comment) is encountered and remain false\n\t// until the end of the documentation block is not detected. This is done\n\t// by checking for the complementary #endif preprocessor directive.\n\tbool endDocComment = false;\n\n\tfor (; sc.More(); sc.Forward()) {\n\n\t\tif (sc.atLineStart) {\n\t\t\tisFirstToken = true;\n\t\t\tisFirstIdentifier = true;\n\t\t// Detect the current state is neither whitespace nor identifier. It\n\t\t// means that no next identifier can be the first token on the line.\n\t\t} else if (isFirstIdentifier && sc.state != SCE_OSCRIPT_DEFAULT &&\n\t\t\t\t   sc.state != SCE_OSCRIPT_IDENTIFIER) {\n\t\t\tisFirstIdentifier = false;\n\t\t}\n\n\t\t// Check if the current state should be changed.\n\t\tif (sc.state == SCE_OSCRIPT_OPERATOR) {\n\t\t\t// Multiple-symbol operators are marked by single characters.\n\t\t\tsc.SetState(SCE_OSCRIPT_DEFAULT);\n\t\t} else if (sc.state == SCE_OSCRIPT_IDENTIFIER) {\n\t\t\tif (!IsIdentifierChar(sc.ch)) {\n\t\t\t\t// Colon after an identifier makes it a label if it is the\n\t\t\t\t// first token on the line.\n\t\t\t\t// KNOWN PROBLEM: If some whitespace is inserted between the\n\t\t\t\t// identifier and the colon they will not be recognized as a\n\t\t\t\t// label. This should not occur; at least not often. It would\n\t\t\t\t// make the code structure less legible and examples in the\n\t\t\t\t// Livelink documentation do not show it.\n\t\t\t\tif (sc.Match(':') && isFirstIdentifier) {\n\t\t\t\t\tsc.ChangeState(SCE_OSCRIPT_LABEL);\n\t\t\t\t\tsc.ForwardSetState(SCE_OSCRIPT_DEFAULT);\n\t\t\t\t} else {\n\t\t\t\t\tidentifierClassifier.ClassifyIdentifier(sc);\n\t\t\t\t}\n\t\t\t\t// Avoid a sequence of two words be mistaken for a label. A\n\t\t\t\t// switch case would be an example.\n\t\t\t\tisFirstIdentifier = false;\n\t\t\t}\n\t\t} else if (sc.state == SCE_OSCRIPT_GLOBAL) {\n\t\t\tif (!IsIdentifierChar(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_OSCRIPT_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_OSCRIPT_PROPERTY) {\n\t\t\tif (!IsIdentifierChar(sc.ch)) {\n\t\t\t\t// Any member access introduced by the dot operator is\n\t\t\t\t// initially marked as a property access. If an opening\n\t\t\t\t// parenthesis is detected later it is changed to method call.\n\t\t\t\t// KNOWN PROBLEM: The same as at the function call recognition\n\t\t\t\t// for SCE_OSCRIPT_IDENTIFIER above.\n\t\t\t\tif (sc.Match('(')) {\n\t\t\t\t\tsc.ChangeState(SCE_OSCRIPT_METHOD);\n\t\t\t\t}\n\t\t\t\tsc.SetState(SCE_OSCRIPT_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_OSCRIPT_NUMBER) {\n\t\t\tif (!IsNumberChar(sc.ch, sc.chNext)) {\n\t\t\t\tsc.SetState(SCE_OSCRIPT_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_OSCRIPT_SINGLEQUOTE_STRING) {\n\t\t\tif (sc.ch == '\\'') {\n\t\t\t\t// Two consequential apostrophes convert to a single one.\n\t\t\t\tif (sc.chNext == '\\'') {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t} else {\n\t\t\t\t\tsc.ForwardSetState(SCE_OSCRIPT_DEFAULT);\n\t\t\t\t}\n\t\t\t} else if (sc.atLineEnd) {\n\t\t\t\tsc.ForwardSetState(SCE_OSCRIPT_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_OSCRIPT_DOUBLEQUOTE_STRING) {\n\t\t\tif (sc.ch == '\\\"') {\n\t\t\t\t// Two consequential quotation marks convert to a single one.\n\t\t\t\tif (sc.chNext == '\\\"') {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t} else {\n\t\t\t\t\tsc.ForwardSetState(SCE_OSCRIPT_DEFAULT);\n\t\t\t\t}\n\t\t\t} else if (sc.atLineEnd) {\n\t\t\t\tsc.ForwardSetState(SCE_OSCRIPT_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_OSCRIPT_BLOCK_COMMENT) {\n\t\t\tif (sc.Match('*', '/')) {\n\t\t\t\tsc.Forward();\n\t\t\t\tsc.ForwardSetState(SCE_OSCRIPT_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_OSCRIPT_LINE_COMMENT) {\n\t\t\tif (sc.atLineEnd) {\n\t\t\t\tsc.ForwardSetState(SCE_OSCRIPT_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_OSCRIPT_PREPROCESSOR) {\n\t\t\tif (IsDocCommentStart(sc)) {\n\t\t\t\tsc.ChangeState(SCE_OSCRIPT_DOC_COMMENT);\n\t\t\t\tendDocComment = false;\n\t\t\t} else if (sc.atLineEnd) {\n\t\t\t\tsc.ForwardSetState(SCE_OSCRIPT_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_OSCRIPT_DOC_COMMENT) {\n\t\t\t// KNOWN PROBLEM: The first line detected that would close a\n\t\t\t// conditional preprocessor block (#endif) the documentation\n\t\t\t// comment block will end. (Nested #if-#endif blocks are not\n\t\t\t// supported. Hopefully it will not occur often that a line\n\t\t\t// within the text block would stat with #endif.\n\t\t\tif (isFirstToken && IsDocCommentEnd(sc)) {\n\t\t\t\tendDocComment = true;\n\t\t\t} else if (sc.atLineEnd && endDocComment) {\n\t\t\t\tsc.ForwardSetState(SCE_OSCRIPT_DEFAULT);\n\t\t\t}\n\t\t}\n\n\t\t// Check what state starts with the current character.\n\t\tif (sc.state == SCE_OSCRIPT_DEFAULT) {\n\t\t\tif (sc.Match('\\'')) {\n\t\t\t\tsc.SetState(SCE_OSCRIPT_SINGLEQUOTE_STRING);\n\t\t\t} else if (sc.Match('\\\"')) {\n\t\t\t\tsc.SetState(SCE_OSCRIPT_DOUBLEQUOTE_STRING);\n\t\t\t} else if (sc.Match('/', '/')) {\n\t\t\t\tsc.SetState(SCE_OSCRIPT_LINE_COMMENT);\n\t\t\t\tsc.Forward();\n\t\t\t} else if (sc.Match('/', '*')) {\n\t\t\t\tsc.SetState(SCE_OSCRIPT_BLOCK_COMMENT);\n\t\t\t\tsc.Forward();\n\t\t\t} else if (isFirstToken && sc.Match('#')) {\n\t\t\t\tsc.SetState(SCE_OSCRIPT_PREPROCESSOR);\n\t\t\t} else if (sc.Match('$')) {\n\t\t\t\t// Both process-global ($xxx) and thread-global ($$xxx)\n\t\t\t\t// variables are handled as one global.\n\t\t\t\tsc.SetState(SCE_OSCRIPT_GLOBAL);\n\t\t\t} else if (IsNaturalNumberStart(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_OSCRIPT_NUMBER);\n\t\t\t} else if (IsPrefixedNumberStart(sc.ch, sc.chNext)) {\n\t\t\t\tsc.SetState(SCE_OSCRIPT_NUMBER);\n\t\t\t\tsc.Forward();\n\t\t\t} else if (sc.Match('.') && IsIdentifierStart(sc.chNext)) {\n\t\t\t\t// Every object member access is marked as a property access\n\t\t\t\t// initially. The decision between property and method is made\n\t\t\t\t// after parsing the identifier and looking what comes then.\n\t\t\t\t// KNOWN PROBLEM: If there is whitespace between the following\n\t\t\t\t// identifier and the dot, the dot will not be recognized\n\t\t\t\t// as a member accessing operator. In turn, the identifier\n\t\t\t\t// will not be recognizable as a property or a method too.\n\t\t\t\tsc.SetState(SCE_OSCRIPT_OPERATOR);\n\t\t\t\tsc.Forward();\n\t\t\t\tsc.SetState(SCE_OSCRIPT_PROPERTY);\n\t\t\t} else if (IsIdentifierStart(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_OSCRIPT_IDENTIFIER);\n\t\t\t} else if (IsOperator(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_OSCRIPT_OPERATOR);\n\t\t\t}\n\t\t}\n\n\t\tif (isFirstToken && !IsASpaceOrTab(sc.ch)) {\n\t\t\tisFirstToken = false;\n\t\t}\n\t}\n\n\tsc.Complete();\n}\n\n// ------------------------------------------\n// Functions supporting OScript code folding.\n\nstatic inline bool IsBlockComment(int style) {\n\treturn style == SCE_OSCRIPT_BLOCK_COMMENT;\n}\n\nstatic bool IsLineComment(Sci_Position line, Accessor &styler) {\n\tSci_Position pos = styler.LineStart(line);\n\tSci_Position eolPos = styler.LineStart(line + 1) - 1;\n\tfor (Sci_Position i = pos; i < eolPos; i++) {\n\t\tchar ch = styler[i];\n\t\tchar chNext = styler.SafeGetCharAt(i + 1);\n\t\tint style = styler.StyleAt(i);\n\t\tif (ch == '/' && chNext == '/' && style == SCE_OSCRIPT_LINE_COMMENT) {\n\t\t\treturn true;\n\t\t} else if (!IsASpaceOrTab(ch)) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn false;\n}\n\nstatic inline bool IsPreprocessor(int style) {\n\treturn style == SCE_OSCRIPT_PREPROCESSOR ||\n\t\t   style == SCE_OSCRIPT_DOC_COMMENT;\n}\n\nstatic void GetRangeLowered(Sci_PositionU start, Sci_PositionU end,\n\t\t\t\t\t\t\tAccessor &styler, char *s, Sci_PositionU len) {\n\tSci_PositionU i = 0;\n\twhile (i < end - start + 1 && i < len - 1) {\n\t\ts[i] = static_cast<char>(tolower(styler[start + i]));\n\t\ti++;\n\t}\n\ts[i] = '\\0';\n}\n\nstatic void GetForwardWordLowered(Sci_PositionU start, Accessor &styler,\n\t\t\t\t\t\t\t\t  char *s, Sci_PositionU len) {\n\tSci_PositionU i = 0;\n\twhile (i < len - 1 && IsAlpha(styler.SafeGetCharAt(start + i))) {\n\t\ts[i] = static_cast<char>(tolower(styler.SafeGetCharAt(start + i)));\n\t\ti++;\n\t}\n\ts[i] = '\\0';\n}\n\nstatic void UpdatePreprocessorFoldLevel(int &levelCurrent,\n\t\tSci_PositionU startPos, Accessor &styler) {\n\tchar s[7]; // Size of the longest possible keyword + null.\n\tGetForwardWordLowered(startPos, styler, s, sizeof(s));\n\n\tif (strcmp(s, \"ifdef\") == 0 ||\n\t\tstrcmp(s, \"ifndef\") == 0) {\n\t\tlevelCurrent++;\n\t} else if (strcmp(s, \"endif\") == 0) {\n\t\tlevelCurrent--;\n\t\tif (levelCurrent < SC_FOLDLEVELBASE) {\n\t\t\tlevelCurrent = SC_FOLDLEVELBASE;\n\t\t}\n\t}\n}\n\nstatic void UpdateKeywordFoldLevel(int &levelCurrent, Sci_PositionU lastStart,\n\t\tSci_PositionU currentPos, Accessor &styler) {\n\tchar s[9];\n\tGetRangeLowered(lastStart, currentPos, styler, s, sizeof(s));\n\n\tif (strcmp(s, \"if\") == 0 || strcmp(s, \"for\") == 0 ||\n\t\tstrcmp(s, \"switch\") == 0 || strcmp(s, \"function\") == 0 ||\n\t\tstrcmp(s, \"while\") == 0 || strcmp(s, \"repeat\") == 0) {\n\t\tlevelCurrent++;\n\t} else if (strcmp(s, \"end\") == 0 || strcmp(s, \"until\") == 0) {\n\t\tlevelCurrent--;\n\t\tif (levelCurrent < SC_FOLDLEVELBASE) {\n\t\t\tlevelCurrent = SC_FOLDLEVELBASE;\n\t\t}\n\t}\n}\n\n// ------------------------------\n// Function folding OScript code.\n\nstatic void FoldOScriptDoc(Sci_PositionU startPos, Sci_Position length, int initStyle,\n\t\t\t\t\t\t   WordList *[], Accessor &styler) {\n\tbool foldComment = styler.GetPropertyInt(\"fold.comment\") != 0;\n\tbool foldPreprocessor = styler.GetPropertyInt(\"fold.preprocessor\") != 0;\n\tbool foldCompact = styler.GetPropertyInt(\"fold.compact\", 1) != 0;\n\tSci_Position endPos = startPos + length;\n\tint visibleChars = 0;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tint levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK;\n\tint levelCurrent = levelPrev;\n\tchar chNext = styler[startPos];\n\tint styleNext = styler.StyleAt(startPos);\n\tint style = initStyle;\n\tSci_Position lastStart = 0;\n\n\tfor (Sci_Position i = startPos; i < endPos; i++) {\n\t\tchar ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\tint stylePrev = style;\n\t\tstyle = styleNext;\n\t\tstyleNext = styler.StyleAt(i + 1);\n\t\tbool atLineEnd = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n\n\t\tif (foldComment && IsBlockComment(style)) {\n\t\t\tif (!IsBlockComment(stylePrev)) {\n\t\t\t\tlevelCurrent++;\n\t\t\t} else if (!IsBlockComment(styleNext) && !atLineEnd) {\n\t\t\t\t// Comments do not end at end of line and the next character\n\t\t\t\t// may not be styled.\n\t\t\t\tlevelCurrent--;\n\t\t\t}\n\t\t}\n\t\tif (foldComment && atLineEnd && IsLineComment(lineCurrent, styler)) {\n\t\t\tif (!IsLineComment(lineCurrent - 1, styler) &&\n\t\t\t\tIsLineComment(lineCurrent + 1, styler))\n\t\t\t\tlevelCurrent++;\n\t\t\telse if (IsLineComment(lineCurrent - 1, styler) &&\n\t\t\t\t\t !IsLineComment(lineCurrent+1, styler))\n\t\t\t\tlevelCurrent--;\n\t\t}\n\t\tif (foldPreprocessor) {\n\t\t\tif (ch == '#' && IsPreprocessor(style)) {\n\t\t\t\tUpdatePreprocessorFoldLevel(levelCurrent, i + 1, styler);\n\t\t\t}\n\t\t}\n\n\t\tif (stylePrev != SCE_OSCRIPT_KEYWORD && style == SCE_OSCRIPT_KEYWORD) {\n\t\t\tlastStart = i;\n\t\t}\n\t\tif (stylePrev == SCE_OSCRIPT_KEYWORD) {\n\t\t\tif(IsIdentifierChar(ch) && !IsIdentifierChar(chNext)) {\n\t\t\t\tUpdateKeywordFoldLevel(levelCurrent, lastStart, i, styler);\n\t\t\t}\n\t\t}\n\n\t\tif (!IsASpace(ch))\n\t\t\tvisibleChars++;\n\n\t\tif (atLineEnd) {\n\t\t\tint level = levelPrev;\n\t\t\tif (visibleChars == 0 && foldCompact)\n\t\t\t\tlevel |= SC_FOLDLEVELWHITEFLAG;\n\t\t\tif ((levelCurrent > levelPrev) && (visibleChars > 0))\n\t\t\t\tlevel |= SC_FOLDLEVELHEADERFLAG;\n\t\t\tif (level != styler.LevelAt(lineCurrent)) {\n\t\t\t\tstyler.SetLevel(lineCurrent, level);\n\t\t\t}\n\t\t\tlineCurrent++;\n\t\t\tlevelPrev = levelCurrent;\n\t\t\tvisibleChars = 0;\n\t\t}\n\t}\n\n\t// If we did not reach EOLN in the previous loop, store the line level and\n\t// whitespace information. The rest will be filled in later.\n\tint lev = levelPrev;\n\tif (visibleChars == 0 && foldCompact)\n\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\tstyler.SetLevel(lineCurrent, lev);\n}\n\n// --------------------------------------------\n// Declaration of the OScript lexer descriptor.\n\nstatic const char * const oscriptWordListDesc[] = {\n\t\"Keywords and reserved words\",\n\t\"Literal constants\",\n\t\"Literal operators\",\n\t\"Built-in value and reference types\",\n\t\"Built-in global functions\",\n\t\"Built-in static objects\",\n\t0\n};\n\nLexerModule lmOScript(SCLEX_OSCRIPT, ColouriseOScriptDoc, \"oscript\", FoldOScriptDoc, oscriptWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexOpal.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexOpal.cxx\n ** Lexer for OPAL (functional language similar to Haskell)\n ** Written by Sebastian Pipping <webmaster@hartwork.org>\n **/\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\ninline static void getRange( Sci_PositionU start, Sci_PositionU end, Accessor & styler, char * s, Sci_PositionU len )\n{\n\tSci_PositionU i = 0;\n\twhile( ( i < end - start + 1 ) && ( i < len - 1 ) )\n\t{\n\t\ts[i] = static_cast<char>( styler[ start + i ] );\n\t\ti++;\n\t}\n\ts[ i ] = '\\0';\n}\n\ninline bool HandleString( Sci_PositionU & cur, Sci_PositionU one_too_much, Accessor & styler )\n{\n\tchar ch;\n\n\t// Wait for string to close\n\tbool even_backslash_count = true; // Without gaps in between\n\tcur++; // Skip initial quote\n\tfor( ; ; )\n\t{\n\t\tif( cur >= one_too_much )\n\t\t{\n\t\t\tstyler.ColourTo( cur - 1, SCE_OPAL_STRING );\n\t\t\treturn false; // STOP\n\t\t}\n\n\t\tch = styler.SafeGetCharAt( cur );\n\t\tif( ( ch == '\\015' ) || ( ch == '\\012' ) ) // Deny multi-line strings\n\t\t{\n\t\t\tstyler.ColourTo( cur - 1, SCE_OPAL_STRING );\n\t\t\tstyler.StartSegment( cur );\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif( even_backslash_count )\n\t\t\t{\n\t\t\t\tif( ch == '\"' )\n\t\t\t\t{\n\t\t\t\t\tstyler.ColourTo( cur, SCE_OPAL_STRING );\n\t\t\t\t\tcur++;\n\t\t\t\t\tif( cur >= one_too_much )\n\t\t\t\t\t{\n\t\t\t\t\t\treturn false; // STOP\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tstyler.StartSegment( cur );\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if( ch == '\\\\' )\n\t\t\t\t{\n\t\t\t\t\teven_backslash_count = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\teven_backslash_count = true;\n\t\t\t}\n\t\t}\n\n\t\tcur++;\n\t}\n}\n\ninline bool HandleCommentBlock( Sci_PositionU & cur, Sci_PositionU one_too_much, Accessor & styler, bool could_fail )\n{\n\tchar ch;\n\n\tif( could_fail )\n\t{\n\t\tcur++;\n\t\tif( cur >= one_too_much )\n\t\t{\n\t\t\tstyler.ColourTo( cur - 1, SCE_OPAL_DEFAULT );\n\t\t\treturn false; // STOP\n\t\t}\n\n\t\tch = styler.SafeGetCharAt( cur );\n\t\tif( ch != '*' )\n\t\t{\n\t\t\tstyler.ColourTo( cur - 1, SCE_OPAL_DEFAULT );\n\t\t\tstyler.StartSegment( cur );\n\t\t\treturn true;\n\t\t}\n\t}\n\n\t// Wait for comment close\n\tcur++;\n\tbool star_found = false;\n\tfor( ; ; )\n\t{\n\t\tif( cur >= one_too_much )\n\t\t{\n\t\t\tstyler.ColourTo( cur - 1, SCE_OPAL_COMMENT_BLOCK );\n\t\t\treturn false; // STOP\n\t\t}\n\n\t\tch = styler.SafeGetCharAt( cur );\n\t\tif( star_found )\n\t\t{\n\t\t\tif( ch == '/' )\n\t\t\t{\n\t\t\t\tstyler.ColourTo( cur, SCE_OPAL_COMMENT_BLOCK );\n\t\t\t\tcur++;\n\t\t\t\tif( cur >= one_too_much )\n\t\t\t\t{\n\t\t\t\t\treturn false; // STOP\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tstyler.StartSegment( cur );\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if( ch != '*' )\n\t\t\t{\n\t\t\t\tstar_found = false;\n\t\t\t}\n\t\t}\n\t\telse if( ch == '*' )\n\t\t{\n\t\t\tstar_found = true;\n\t\t}\n\t\tcur++;\n\t}\n}\n\ninline bool HandleCommentLine( Sci_PositionU & cur, Sci_PositionU one_too_much, Accessor & styler, bool could_fail )\n{\n\tchar ch;\n\n\tif( could_fail )\n\t{\n\t\tcur++;\n\t\tif( cur >= one_too_much )\n\t\t{\n\t\t\tstyler.ColourTo( cur - 1, SCE_OPAL_DEFAULT );\n\t\t\treturn false; // STOP\n\t\t}\n\n\t\tch = styler.SafeGetCharAt( cur );\n\t\tif( ch != '-' )\n\t\t{\n\t\t\tstyler.ColourTo( cur - 1, SCE_OPAL_DEFAULT );\n\t\t\tstyler.StartSegment( cur );\n\t\t\treturn true;\n\t\t}\n\n\t\tcur++;\n\t\tif( cur >= one_too_much )\n\t\t{\n\t\t\tstyler.ColourTo( cur - 1, SCE_OPAL_DEFAULT );\n\t\t\treturn false; // STOP\n\t\t}\n\n\t\tch = styler.SafeGetCharAt( cur );\n\t\tif( ( ch != ' ' ) && ( ch != '\\t' ) )\n\t\t{\n\t\t\tstyler.ColourTo( cur - 1, SCE_OPAL_DEFAULT );\n\t\t\tstyler.StartSegment( cur );\n\t\t\treturn true;\n\t\t}\n\t}\n\n\t// Wait for end of line\n\tbool fifteen_found = false;\n\n\tfor( ; ; )\n\t{\n\t\tcur++;\n\n\t\tif( cur >= one_too_much )\n\t\t{\n\t\t\tstyler.ColourTo( cur - 1, SCE_OPAL_COMMENT_LINE );\n\t\t\treturn false; // STOP\n\t\t}\n\n\t\tch = styler.SafeGetCharAt( cur );\n\t\tif( fifteen_found )\n\t\t{\n/*\n\t\t\tif( ch == '\\012' )\n\t\t\t{\n\t\t\t\t// One newline on Windows (015, 012)\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// One newline on MAC (015) and another char\n\t\t\t}\n*/\n\t\t\tcur--;\n\t\t\tstyler.ColourTo( cur - 1, SCE_OPAL_COMMENT_LINE );\n\t\t\tstyler.StartSegment( cur );\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif( ch == '\\015' )\n\t\t\t{\n\t\t\t\tfifteen_found = true;\n\t\t\t}\n\t\t\telse if( ch == '\\012' )\n\t\t\t{\n\t\t\t\t// One newline on Linux (012)\n\t\t\t\tstyler.ColourTo( cur - 1, SCE_OPAL_COMMENT_LINE );\n\t\t\t\tstyler.StartSegment( cur );\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n}\n\ninline bool HandlePar( Sci_PositionU & cur, Accessor & styler )\n{\n\tstyler.ColourTo( cur, SCE_OPAL_PAR );\n\n\tcur++;\n\n\tstyler.StartSegment( cur );\n\treturn true;\n}\n\ninline bool HandleSpace( Sci_PositionU & cur, Sci_PositionU one_too_much, Accessor & styler )\n{\n\tchar ch;\n\n\tcur++;\n\tfor( ; ; )\n\t{\n\t\tif( cur >= one_too_much )\n\t\t{\n\t\t\tstyler.ColourTo( cur - 1, SCE_OPAL_SPACE );\n\t\t\treturn false;\n\t\t}\n\n\t\tch = styler.SafeGetCharAt( cur );\n\t\tswitch( ch )\n\t\t{\n\t\tcase ' ':\n\t\tcase '\\t':\n\t\tcase '\\015':\n\t\tcase '\\012':\n\t\t\tcur++;\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tstyler.ColourTo( cur - 1, SCE_OPAL_SPACE );\n\t\t\tstyler.StartSegment( cur );\n\t\t\treturn true;\n\t\t}\n\t}\n}\n\ninline bool HandleInteger( Sci_PositionU & cur, Sci_PositionU one_too_much, Accessor & styler )\n{\n\tchar ch;\n\n\tfor( ; ; )\n\t{\n\t\tcur++;\n\t\tif( cur >= one_too_much )\n\t\t{\n\t\t\tstyler.ColourTo( cur - 1, SCE_OPAL_INTEGER );\n\t\t\treturn false; // STOP\n\t\t}\n\n\t\tch = styler.SafeGetCharAt( cur );\n\t\tif( !( IsASCII( ch ) && isdigit( ch ) ) )\n\t\t{\n\t\t\tstyler.ColourTo( cur - 1, SCE_OPAL_INTEGER );\n\t\t\tstyler.StartSegment( cur );\n\t\t\treturn true;\n\t\t}\n\t}\n}\n\ninline bool HandleWord( Sci_PositionU & cur, Sci_PositionU one_too_much, Accessor & styler, WordList * keywordlists[] )\n{\n\tchar ch;\n\tconst Sci_PositionU beg = cur;\n\n\tcur++;\n\tfor( ; ; )\n\t{\n\t\tch = styler.SafeGetCharAt( cur );\n\t\tif( ( ch != '_' ) && ( ch != '-' ) &&\n\t\t\t!( IsASCII( ch ) && ( islower( ch ) || isupper( ch ) || isdigit( ch ) ) ) ) break;\n\n\t\tcur++;\n\t\tif( cur >= one_too_much )\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tconst Sci_Position ide_len = cur - beg + 1;\n\tchar * ide = new char[ ide_len ];\n\tgetRange( beg, cur, styler, ide, ide_len );\n\n\tWordList & keywords    = *keywordlists[ 0 ];\n\tWordList & classwords  = *keywordlists[ 1 ];\n\n\tif( keywords.InList( ide ) ) // Keyword\n\t{\n\t\tdelete [] ide;\n\n\t\tstyler.ColourTo( cur - 1, SCE_OPAL_KEYWORD );\n\t\tif( cur >= one_too_much )\n\t\t{\n\t\t\treturn false; // STOP\n\t\t}\n\t\telse\n\t\t{\n\t\t\tstyler.StartSegment( cur );\n\t\t\treturn true;\n\t\t}\n\t}\n\telse if( classwords.InList( ide ) ) // Sort\n\t{\n\t\tdelete [] ide;\n\n\t\tstyler.ColourTo( cur - 1, SCE_OPAL_SORT );\n\t\tif( cur >= one_too_much )\n\t\t{\n\t\t\treturn false; // STOP\n\t\t}\n\t\telse\n\t\t{\n\t\t\tstyler.StartSegment( cur );\n\t\t\treturn true;\n\t\t}\n\t}\n\telse if( !strcmp( ide, \"true\" ) || !strcmp( ide, \"false\" ) ) // Bool const\n\t{\n\t\tdelete [] ide;\n\n\t\tstyler.ColourTo( cur - 1, SCE_OPAL_BOOL_CONST );\n\t\tif( cur >= one_too_much )\n\t\t{\n\t\t\treturn false; // STOP\n\t\t}\n\t\telse\n\t\t{\n\t\t\tstyler.StartSegment( cur );\n\t\t\treturn true;\n\t\t}\n\t}\n\telse // Unknown keyword\n\t{\n\t\tdelete [] ide;\n\n\t\tstyler.ColourTo( cur - 1, SCE_OPAL_DEFAULT );\n\t\tif( cur >= one_too_much )\n\t\t{\n\t\t\treturn false; // STOP\n\t\t}\n\t\telse\n\t\t{\n\t\t\tstyler.StartSegment( cur );\n\t\t\treturn true;\n\t\t}\n\t}\n\n}\n\ninline bool HandleSkip( Sci_PositionU & cur, Sci_PositionU one_too_much, Accessor & styler )\n{\n\tcur++;\n\tstyler.ColourTo( cur - 1, SCE_OPAL_DEFAULT );\n\tif( cur >= one_too_much )\n\t{\n\t\treturn false; // STOP\n\t}\n\telse\n\t{\n\t\tstyler.StartSegment( cur );\n\t\treturn true;\n\t}\n}\n\nstatic void ColouriseOpalDoc( Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[], Accessor & styler )\n{\n\tstyler.StartAt( startPos );\n\tstyler.StartSegment( startPos );\n\n\tSci_PositionU & cur = startPos;\n\tconst Sci_PositionU one_too_much = startPos + length;\n\n\tint state = initStyle;\n\n\tfor( ; ; )\n\t{\n\t\tswitch( state )\n\t\t{\n\t\tcase SCE_OPAL_KEYWORD:\n\t\tcase SCE_OPAL_SORT:\n\t\t\tif( !HandleWord( cur, one_too_much, styler, keywordlists ) ) return;\n\t\t\tstate = SCE_OPAL_DEFAULT;\n\t\t\tbreak;\n\n\t\tcase SCE_OPAL_INTEGER:\n\t\t\tif( !HandleInteger( cur, one_too_much, styler ) ) return;\n\t\t\tstate = SCE_OPAL_DEFAULT;\n\t\t\tbreak;\n\n\t\tcase SCE_OPAL_COMMENT_BLOCK:\n\t\t\tif( !HandleCommentBlock( cur, one_too_much, styler, false ) ) return;\n\t\t\tstate = SCE_OPAL_DEFAULT;\n\t\t\tbreak;\n\n\t\tcase SCE_OPAL_COMMENT_LINE:\n\t\t\tif( !HandleCommentLine( cur, one_too_much, styler, false ) ) return;\n\t\t\tstate = SCE_OPAL_DEFAULT;\n\t\t\tbreak;\n\n\t\tcase SCE_OPAL_STRING:\n\t\t\tif( !HandleString( cur, one_too_much, styler ) ) return;\n\t\t\tstate = SCE_OPAL_DEFAULT;\n\t\t\tbreak;\n\n\t\tdefault: // SCE_OPAL_DEFAULT:\n\t\t\t{\n\t\t\t\tchar ch = styler.SafeGetCharAt( cur );\n\n\t\t\t\tswitch( ch )\n\t\t\t\t{\n\t\t\t\t// String\n\t\t\t\tcase '\"':\n\t\t\t\t\tif( !HandleString( cur, one_too_much, styler ) ) return;\n\t\t\t\t\tbreak;\n\n\t\t\t\t// Comment block\n\t\t\t\tcase '/':\n\t\t\t\t\tif( !HandleCommentBlock( cur, one_too_much, styler, true ) ) return;\n\t\t\t\t\tbreak;\n\n\t\t\t\t// Comment line\n\t\t\t\tcase '-':\n\t\t\t\t\tif( !HandleCommentLine( cur, one_too_much, styler, true ) ) return;\n\t\t\t\t\tbreak;\n\n\t\t\t\t// Par\n\t\t\t\tcase '(':\n\t\t\t\tcase ')':\n\t\t\t\tcase '[':\n\t\t\t\tcase ']':\n\t\t\t\tcase '{':\n\t\t\t\tcase '}':\n\t\t\t\t\tif( !HandlePar( cur, styler ) ) return;\n\t\t\t\t\tbreak;\n\n\t\t\t\t// Whitespace\n\t\t\t\tcase ' ':\n\t\t\t\tcase '\\t':\n\t\t\t\tcase '\\015':\n\t\t\t\tcase '\\012':\n\t\t\t\t\tif( !HandleSpace( cur, one_too_much, styler ) ) return;\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\t{\n\t\t\t\t\t\t// Integer\n\t\t\t\t\t\tif( IsASCII( ch ) && isdigit( ch ) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif( !HandleInteger( cur, one_too_much, styler ) ) return;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Keyword\n\t\t\t\t\t\telse if( IsASCII( ch ) && ( islower( ch ) || isupper( ch ) ) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif( !HandleWord( cur, one_too_much, styler, keywordlists ) ) return;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Skip\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif( !HandleSkip( cur, one_too_much, styler ) ) return;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n}\n\nstatic const char * const opalWordListDesc[] = {\n\t\"Keywords\",\n\t\"Sorts\",\n\t0\n};\n\nLexerModule lmOpal(SCLEX_OPAL, ColouriseOpalDoc, \"opal\", NULL, opalWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexPB.cxx",
    "content": "// Scintilla source code edit control\n// @file LexPB.cxx\n// Lexer for PowerBasic by Roland Walter, roland@rowalt.de (for PowerBasic see www.powerbasic.com)\n//\n// Changes:\n// 17.10.2003: Toggling of subs/functions now until next sub/function - this gives better results\n// 29.10.2003: 1. Bug: Toggling didn't work for subs/functions added in editor\n//             2. Own colors for PB constants and Inline Assembler SCE_B_CONSTANT and SCE_B_ASM\n//             3. Several smaller syntax coloring improvements and speed optimizations\n// 12.07.2004: 1. Toggling for macros added\n//             2. Further folding speed optimitations (for people dealing with very large listings)\n//\n// Necessary changes for the PB lexer in Scintilla project:\n//  - In SciLexer.h and Scintilla.iface:\n//\n//    #define SCLEX_POWERBASIC 51       //ID for PowerBasic lexer\n//    (...)\n//    #define SCE_B_DEFAULT 0           //in both VB and PB lexer\n//    #define SCE_B_COMMENT 1           //in both VB and PB lexer\n//    #define SCE_B_NUMBER 2            //in both VB and PB lexer\n//    #define SCE_B_KEYWORD 3           //in both VB and PB lexer\n//    #define SCE_B_STRING 4            //in both VB and PB lexer\n//    #define SCE_B_PREPROCESSOR 5      //VB lexer only, not in PB lexer\n//    #define SCE_B_OPERATOR 6          //in both VB and PB lexer\n//    #define SCE_B_IDENTIFIER 7        //in both VB and PB lexer\n//    #define SCE_B_DATE 8              //VB lexer only, not in PB lexer\n//    #define SCE_B_CONSTANT 13         //PB lexer only, not in VB lexer\n//    #define SCE_B_ASM 14              //PB lexer only, not in VB lexer\n\n//  - Statement added to KeyWords.cxx:      'LINK_LEXER(lmPB);'\n//  - Statement added to scintilla_vc6.mak: '$(DIR_O)\\LexPB.obj: ...\\src\\LexPB.cxx $(LEX_HEADERS)'\n//\n// Copyright for Scintilla: 1998-2001 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nstatic inline bool IsTypeCharacter(const int ch)\n{\n    return ch == '%' || ch == '&' || ch == '@' || ch == '!' || ch == '#' || ch == '$' || ch == '?';\n}\n\nstatic inline bool IsAWordChar(const int ch)\n{\n    return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_');\n}\n\nstatic inline bool IsAWordStart(const int ch)\n{\n    return (ch < 0x80) && (isalnum(ch) || ch == '_');\n}\n\nstatic bool MatchUpperCase(Accessor &styler, Sci_Position pos, const char *s)   //Same as styler.Match() but uppercase comparison (a-z,A-Z and space only)\n{\n    char ch;\n    for (Sci_Position i=0; *s; i++)\n    {\n        ch=styler.SafeGetCharAt(pos+i);\n        if (ch > 0x60) ch -= '\\x20';\n        if (*s != ch) return false;\n        s++;\n    }\n    return true;\n}\n\nstatic void ColourisePBDoc(Sci_PositionU startPos, Sci_Position length, int initStyle,WordList *keywordlists[],Accessor &styler) {\n\n    WordList &keywords = *keywordlists[0];\n\n    styler.StartAt(startPos);\n\n    StyleContext sc(startPos, length, initStyle, styler);\n\n    for (; sc.More(); sc.Forward()) {\n        switch (sc.state)\n        {\n            case SCE_B_OPERATOR:\n            {\n                sc.SetState(SCE_B_DEFAULT);\n                break;\n            }\n            case SCE_B_KEYWORD:\n            {\n                if (!IsAWordChar(sc.ch))\n                {\n                    if (!IsTypeCharacter(sc.ch))\n                    {\n                        char s[100];\n                        sc.GetCurrentLowered(s, sizeof(s));\n                        if (keywords.InList(s))\n                        {\n                            if (strcmp(s, \"rem\") == 0)\n                            {\n                                sc.ChangeState(SCE_B_COMMENT);\n                                if (sc.atLineEnd) {sc.SetState(SCE_B_DEFAULT);}\n                            }\n                            else if (strcmp(s, \"asm\") == 0)\n                            {\n                                sc.ChangeState(SCE_B_ASM);\n                                if (sc.atLineEnd) {sc.SetState(SCE_B_DEFAULT);}\n                            }\n                            else\n                            {\n                                sc.SetState(SCE_B_DEFAULT);\n                            }\n                        }\n                        else\n                        {\n                            sc.ChangeState(SCE_B_IDENTIFIER);\n                            sc.SetState(SCE_B_DEFAULT);\n                        }\n                    }\n                }\n                break;\n            }\n            case SCE_B_NUMBER:\n            {\n                if (!IsAWordChar(sc.ch)) {sc.SetState(SCE_B_DEFAULT);}\n                break;\n            }\n            case SCE_B_STRING:\n            {\n                if (sc.ch == '\\\"'){sc.ForwardSetState(SCE_B_DEFAULT);}\n                break;\n            }\n            case SCE_B_CONSTANT:\n            {\n                if (!IsAWordChar(sc.ch)) {sc.SetState(SCE_B_DEFAULT);}\n                break;\n            }\n            case SCE_B_COMMENT:\n            {\n                if (sc.atLineEnd) {sc.SetState(SCE_B_DEFAULT);}\n                break;\n            }\n            case SCE_B_ASM:\n            {\n                if (sc.atLineEnd) {sc.SetState(SCE_B_DEFAULT);}\n                break;\n            }\n        }  //switch (sc.state)\n\n        // Determine if a new state should be entered:\n        if (sc.state == SCE_B_DEFAULT)\n        {\n            if (sc.ch == '\\'') {sc.SetState(SCE_B_COMMENT);}\n            else if (sc.ch == '\\\"') {sc.SetState(SCE_B_STRING);}\n            else if (sc.ch == '&' && tolower(sc.chNext) == 'h') {sc.SetState(SCE_B_NUMBER);}\n            else if (sc.ch == '&' && tolower(sc.chNext) == 'b') {sc.SetState(SCE_B_NUMBER);}\n            else if (sc.ch == '&' && tolower(sc.chNext) == 'o') {sc.SetState(SCE_B_NUMBER);}\n            else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) {sc.SetState(SCE_B_NUMBER);}\n            else if (IsAWordStart(sc.ch)) {sc.SetState(SCE_B_KEYWORD);}\n            else if (sc.ch == '%') {sc.SetState(SCE_B_CONSTANT);}\n            else if (sc.ch == '$') {sc.SetState(SCE_B_CONSTANT);}\n            else if (sc.ch == '#') {sc.SetState(SCE_B_KEYWORD);}\n            else if (sc.ch == '!') {sc.SetState(SCE_B_ASM);}\n            else if (isoperator(static_cast<char>(sc.ch)) || (sc.ch == '\\\\')) {sc.SetState(SCE_B_OPERATOR);}\n        }\n    }      //for (; sc.More(); sc.Forward())\n    sc.Complete();\n}\n\n//The folding routine for PowerBasic toggles SUBs and FUNCTIONs only. This was exactly what I wanted,\n//nothing more. I had worked with this kind of toggling for several years when I used the great good old\n//GFA Basic which is dead now. After testing the feature of toggling FOR-NEXT loops, WHILE-WEND loops\n//and so on too I found this is more disturbing then helping (for me). So if You think in another way\n//you can (or must) write Your own toggling routine ;-)\nstatic void FoldPBDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[], Accessor &styler)\n{\n    // No folding enabled, no reason to continue...\n    if( styler.GetPropertyInt(\"fold\") == 0 )\n        return;\n\n    Sci_PositionU endPos = startPos + length;\n    Sci_Position lineCurrent = styler.GetLine(startPos);\n    int levelCurrent = SC_FOLDLEVELBASE;\n    if (lineCurrent > 0)\n        levelCurrent = styler.LevelAt(lineCurrent-1) >> 16;\n    int levelNext = levelCurrent;\n    char chNext = styler[startPos];\n\n    bool fNewLine=true;\n    bool fMightBeMultiLineMacro=false;\n    bool fBeginOfCommentFound=false;\n    for (Sci_PositionU i = startPos; i < endPos; i++)\n    {\n        char ch = chNext;\n        chNext = styler.SafeGetCharAt(i + 1);\n\n        if (fNewLine)            //Begin of a new line (The Sub/Function/Macro keywords may occur at begin of line only)\n        {\n            fNewLine=false;\n            fBeginOfCommentFound=false;\n            switch (ch)\n            {\n            case ' ':      //Most lines start with space - so check this first, the code is the same as for 'default:'\n            case '\\t':     //Handle tab too\n                {\n                    int levelUse = levelCurrent;\n                    int lev = levelUse | levelNext << 16;\n                    styler.SetLevel(lineCurrent, lev);\n                    break;\n                }\n            case 'F':\n            case 'f':\n                {\n\t\t\t\t\tswitch (chNext)\n\t\t\t\t\t{\n                    case 'U':\n                    case 'u':\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif( MatchUpperCase(styler,i,\"FUNCTION\") )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tstyler.SetLevel(lineCurrent, (SC_FOLDLEVELBASE << 16) | SC_FOLDLEVELHEADERFLAG);\n\t\t\t\t\t\t\t\tlevelNext=SC_FOLDLEVELBASE+1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n                break;\n                }\n            case 'S':\n            case 's':\n                {\n\t\t\t\t\tswitch (chNext)\n\t\t\t\t\t{\n                    case 'U':\n                    case 'u':\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif( MatchUpperCase(styler,i,\"SUB\") )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tstyler.SetLevel(lineCurrent, (SC_FOLDLEVELBASE << 16) | SC_FOLDLEVELHEADERFLAG);\n\t\t\t\t\t\t\t\tlevelNext=SC_FOLDLEVELBASE+1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n                    case 'T':\n                    case 't':\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif( MatchUpperCase(styler,i,\"STATIC FUNCTION\") )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tstyler.SetLevel(lineCurrent, (SC_FOLDLEVELBASE << 16) | SC_FOLDLEVELHEADERFLAG);\n\t\t\t\t\t\t\t\tlevelNext=SC_FOLDLEVELBASE+1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if( MatchUpperCase(styler,i,\"STATIC SUB\") )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tstyler.SetLevel(lineCurrent, (SC_FOLDLEVELBASE << 16) | SC_FOLDLEVELHEADERFLAG);\n\t\t\t\t\t\t\t\tlevelNext=SC_FOLDLEVELBASE+1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n                break;\n                }\n            case 'C':\n            case 'c':\n                {\n\t\t\t\t\tswitch (chNext)\n\t\t\t\t\t{\n                    case 'A':\n                    case 'a':\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif( MatchUpperCase(styler,i,\"CALLBACK FUNCTION\") )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tstyler.SetLevel(lineCurrent, (SC_FOLDLEVELBASE << 16) | SC_FOLDLEVELHEADERFLAG);\n\t\t\t\t\t\t\t\tlevelNext=SC_FOLDLEVELBASE+1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n                break;\n                }\n            case 'M':\n            case 'm':\n                {\n\t\t\t\t\tswitch (chNext)\n\t\t\t\t\t{\n                    case 'A':\n                    case 'a':\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif( MatchUpperCase(styler,i,\"MACRO\") )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfMightBeMultiLineMacro=true;  //Set folder level at end of line, we have to check for single line macro\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n                break;\n                }\n            default:\n                {\n                    int levelUse = levelCurrent;\n                    int lev = levelUse | levelNext << 16;\n                    styler.SetLevel(lineCurrent, lev);\n                    break;\n                }\n            }  //switch (ch)\n        }  //if( fNewLine )\n\n        switch (ch)\n        {\n            case '=':                              //To test single line macros\n            {\n                if (fBeginOfCommentFound==false)\n                    fMightBeMultiLineMacro=false;  //The found macro is a single line macro only;\n                break;\n            }\n            case '\\'':                             //A comment starts\n            {\n                fBeginOfCommentFound=true;\n                break;\n            }\n            case '\\n':\n            {\n                if (fMightBeMultiLineMacro)        //The current line is the begin of a multi line macro\n                {\n                    fMightBeMultiLineMacro=false;\n                    styler.SetLevel(lineCurrent, (SC_FOLDLEVELBASE << 16) | SC_FOLDLEVELHEADERFLAG);\n                    levelNext=SC_FOLDLEVELBASE+1;\n                }\n                lineCurrent++;\n                levelCurrent = levelNext;\n                fNewLine=true;\n                break;\n            }\n            case '\\r':\n            {\n                if (chNext != '\\n')\n                {\n                    lineCurrent++;\n                    levelCurrent = levelNext;\n                    fNewLine=true;\n                }\n                break;\n            }\n        }  //switch (ch)\n    }  //for (Sci_PositionU i = startPos; i < endPos; i++)\n}\n\nstatic const char * const pbWordListDesc[] = {\n    \"Keywords\",\n    0\n};\n\nLexerModule lmPB(SCLEX_POWERBASIC, ColourisePBDoc, \"powerbasic\", FoldPBDoc, pbWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexPLM.cxx",
    "content": "// Copyright (c) 1990-2007, Scientific Toolworks, Inc.\n// @file LexPLM.cxx\n// Author: Jason Haslam\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nstatic void GetRange(Sci_PositionU start,\n                     Sci_PositionU end,\n                     Accessor &styler,\n                     char *s,\n                     Sci_PositionU len) {\n\tSci_PositionU i = 0;\n\twhile ((i < end - start + 1) && (i < len-1)) {\n\t\ts[i] = static_cast<char>(tolower(styler[start + i]));\n\t\ti++;\n\t}\n\ts[i] = '\\0';\n}\n\nstatic void ColourisePlmDoc(Sci_PositionU startPos,\n                            Sci_Position length,\n                            int initStyle,\n                            WordList *keywordlists[],\n                            Accessor &styler)\n{\n\tSci_PositionU endPos = startPos + length;\n\tint state = initStyle;\n\n\tstyler.StartAt(startPos);\n\tstyler.StartSegment(startPos);\n\n\tfor (Sci_PositionU i = startPos; i < endPos; i++) {\n\t\tchar ch = styler.SafeGetCharAt(i);\n\t\tchar chNext = styler.SafeGetCharAt(i + 1);\n\n\t\tif (state == SCE_PLM_DEFAULT) {\n\t\t\tif (ch == '/' && chNext == '*') {\n\t\t\t\tstyler.ColourTo(i - 1, state);\n\t\t\t\tstate = SCE_PLM_COMMENT;\n\t\t\t} else if (ch == '\\'') {\n\t\t\t\tstyler.ColourTo(i - 1, state);\n\t\t\t\tstate = SCE_PLM_STRING;\n\t\t\t} else if (isdigit(ch)) {\n\t\t\t\tstyler.ColourTo(i - 1, state);\n\t\t\t\tstate = SCE_PLM_NUMBER;\n\t\t\t} else if (isalpha(ch)) {\n\t\t\t\tstyler.ColourTo(i - 1, state);\n\t\t\t\tstate = SCE_PLM_IDENTIFIER;\n\t\t\t} else if (ch == '+' || ch == '-' || ch == '*' || ch == '/' ||\n\t\t\t           ch == '=' || ch == '<' || ch == '>' || ch == ':') {\n\t\t\t\tstyler.ColourTo(i - 1, state);\n\t\t\t\tstate = SCE_PLM_OPERATOR;\n\t\t\t} else if (ch == '$') {\n\t\t\t\tstyler.ColourTo(i - 1, state);\n\t\t\t\tstate = SCE_PLM_CONTROL;\n\t\t\t}\n\t\t} else if (state == SCE_PLM_COMMENT) {\n\t\t\tif (ch == '*' && chNext == '/') {\n\t\t\t\ti++;\n\t\t\t\tstyler.ColourTo(i, state);\n\t\t\t\tstate = SCE_PLM_DEFAULT;\n\t\t\t}\n\t\t} else if (state == SCE_PLM_STRING) {\n\t\t\tif (ch == '\\'') {\n\t\t\t\tif (chNext == '\\'') {\n\t\t\t\t\ti++;\n\t\t\t\t} else {\n\t\t\t\t\tstyler.ColourTo(i, state);\n\t\t\t\t\tstate = SCE_PLM_DEFAULT;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (state == SCE_PLM_NUMBER) {\n\t\t\tif (!isdigit(ch) && !isalpha(ch) && ch != '$') {\n\t\t\t\ti--;\n\t\t\t\tstyler.ColourTo(i, state);\n\t\t\t\tstate = SCE_PLM_DEFAULT;\n\t\t\t}\n\t\t} else if (state == SCE_PLM_IDENTIFIER) {\n\t\t\tif (!isdigit(ch) && !isalpha(ch) && ch != '$') {\n\t\t\t\t// Get the entire identifier.\n\t\t\t\tchar word[1024];\n\t\t\t\tSci_Position segmentStart = styler.GetStartSegment();\n\t\t\t\tGetRange(segmentStart, i - 1, styler, word, sizeof(word));\n\n\t\t\t\ti--;\n\t\t\t\tif (keywordlists[0]->InList(word))\n\t\t\t\t\tstyler.ColourTo(i, SCE_PLM_KEYWORD);\n\t\t\t\telse\n\t\t\t\t\tstyler.ColourTo(i, state);\n\t\t\t\tstate = SCE_PLM_DEFAULT;\n\t\t\t}\n\t\t} else if (state == SCE_PLM_OPERATOR) {\n\t\t\tif (ch != '=' && ch != '>') {\n\t\t\t\ti--;\n\t\t\t\tstyler.ColourTo(i, state);\n\t\t\t\tstate = SCE_PLM_DEFAULT;\n\t\t\t}\n\t\t} else if (state == SCE_PLM_CONTROL) {\n\t\t\tif (ch == '\\r' || ch == '\\n') {\n\t\t\t\tstyler.ColourTo(i - 1, state);\n\t\t\t\tstate = SCE_PLM_DEFAULT;\n\t\t\t}\n\t\t}\n\t}\n\tstyler.ColourTo(endPos - 1, state);\n}\n\nstatic void FoldPlmDoc(Sci_PositionU startPos,\n                       Sci_Position length,\n                       int initStyle,\n                       WordList *[],\n                       Accessor &styler)\n{\n\tbool foldComment = styler.GetPropertyInt(\"fold.comment\") != 0;\n\tbool foldCompact = styler.GetPropertyInt(\"fold.compact\", 1) != 0;\n\tSci_PositionU endPos = startPos + length;\n\tint visibleChars = 0;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tint levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK;\n\tint levelCurrent = levelPrev;\n\tchar chNext = styler[startPos];\n\tint styleNext = styler.StyleAt(startPos);\n\tint style = initStyle;\n\tSci_Position startKeyword = 0;\n\n\tfor (Sci_PositionU i = startPos; i < endPos; i++) {\n\t\tchar ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\tint stylePrev = style;\n\t\tstyle = styleNext;\n\t\tstyleNext = styler.StyleAt(i + 1);\n\t\tbool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n\n\t\tif (stylePrev != SCE_PLM_KEYWORD && style == SCE_PLM_KEYWORD)\n\t\t\tstartKeyword = i;\n\n\t\tif (style == SCE_PLM_KEYWORD && styleNext != SCE_PLM_KEYWORD) {\n\t\t\tchar word[1024];\n\t\t\tGetRange(startKeyword, i, styler, word, sizeof(word));\n\n\t\t\tif (strcmp(word, \"procedure\") == 0 || strcmp(word, \"do\") == 0)\n\t\t\t\tlevelCurrent++;\n\t\t\telse if (strcmp(word, \"end\") == 0)\n\t\t\t\tlevelCurrent--;\n\t\t}\n\n\t\tif (foldComment) {\n\t\t\tif (stylePrev != SCE_PLM_COMMENT && style == SCE_PLM_COMMENT)\n\t\t\t\tlevelCurrent++;\n\t\t\telse if (stylePrev == SCE_PLM_COMMENT && style != SCE_PLM_COMMENT)\n\t\t\t\tlevelCurrent--;\n\t\t}\n\n\t\tif (atEOL) {\n\t\t\tint lev = levelPrev;\n\t\t\tif (visibleChars == 0 && foldCompact)\n\t\t\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\t\t\tif ((levelCurrent > levelPrev) && (visibleChars > 0))\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\tif (lev != styler.LevelAt(lineCurrent)) {\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\t\t\t}\n\t\t\tlineCurrent++;\n\t\t\tlevelPrev = levelCurrent;\n\t\t\tvisibleChars = 0;\n\t\t}\n\n\t\tif (!isspacechar(ch))\n\t\t\tvisibleChars++;\n\t}\n\n\tint flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK;\n\tstyler.SetLevel(lineCurrent, levelPrev | flagsNext);\n}\n\nstatic const char *const plmWordListDesc[] = {\n\t\"Keywords\",\n\t0\n};\n\nLexerModule lmPLM(SCLEX_PLM, ColourisePlmDoc, \"PL/M\", FoldPlmDoc, plmWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexPO.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexPO.cxx\n ** Lexer for GetText Translation (PO) files.\n **/\n// Copyright 2012 by Colomban Wendling <ban@herbesfolles.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n// see https://www.gnu.org/software/gettext/manual/gettext.html#PO-Files for the syntax reference\n// some details are taken from the GNU msgfmt behavior (like that indent is allows in front of lines)\n\n// TODO:\n// * add keywords for flags (fuzzy, c-format, ...)\n// * highlight formats inside c-format strings (%s, %d, etc.)\n// * style for previous untranslated string? (\"#|\" comment)\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nstatic void ColourisePODoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *[], Accessor &styler) {\n\tStyleContext sc(startPos, length, initStyle, styler);\n\tbool escaped = false;\n\tSci_Position curLine = styler.GetLine(startPos);\n\t// the line state holds the last state on or before the line that isn't the default style\n\tint curLineState = curLine > 0 ? styler.GetLineState(curLine - 1) : SCE_PO_DEFAULT;\n\n\tfor (; sc.More(); sc.Forward()) {\n\t\t// whether we should leave a state\n\t\tswitch (sc.state) {\n\t\t\tcase SCE_PO_COMMENT:\n\t\t\tcase SCE_PO_PROGRAMMER_COMMENT:\n\t\t\tcase SCE_PO_REFERENCE:\n\t\t\tcase SCE_PO_FLAGS:\n\t\t\tcase SCE_PO_FUZZY:\n\t\t\t\tif (sc.atLineEnd)\n\t\t\t\t\tsc.SetState(SCE_PO_DEFAULT);\n\t\t\t\telse if (sc.state == SCE_PO_FLAGS && sc.Match(\"fuzzy\"))\n\t\t\t\t\t// here we behave like the previous parser, but this should probably be highlighted\n\t\t\t\t\t// on its own like a keyword rather than changing the whole flags style\n\t\t\t\t\tsc.ChangeState(SCE_PO_FUZZY);\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_PO_MSGCTXT:\n\t\t\tcase SCE_PO_MSGID:\n\t\t\tcase SCE_PO_MSGSTR:\n\t\t\t\tif (isspacechar(sc.ch))\n\t\t\t\t\tsc.SetState(SCE_PO_DEFAULT);\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_PO_ERROR:\n\t\t\t\tif (sc.atLineEnd)\n\t\t\t\t\tsc.SetState(SCE_PO_DEFAULT);\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_PO_MSGCTXT_TEXT:\n\t\t\tcase SCE_PO_MSGID_TEXT:\n\t\t\tcase SCE_PO_MSGSTR_TEXT:\n\t\t\t\tif (sc.atLineEnd) { // invalid inside a string\n\t\t\t\t\tif (sc.state == SCE_PO_MSGCTXT_TEXT)\n\t\t\t\t\t\tsc.ChangeState(SCE_PO_MSGCTXT_TEXT_EOL);\n\t\t\t\t\telse if (sc.state == SCE_PO_MSGID_TEXT)\n\t\t\t\t\t\tsc.ChangeState(SCE_PO_MSGID_TEXT_EOL);\n\t\t\t\t\telse if (sc.state == SCE_PO_MSGSTR_TEXT)\n\t\t\t\t\t\tsc.ChangeState(SCE_PO_MSGSTR_TEXT_EOL);\n\t\t\t\t\tsc.SetState(SCE_PO_DEFAULT);\n\t\t\t\t\tescaped = false;\n\t\t\t\t} else {\n\t\t\t\t\tif (escaped)\n\t\t\t\t\t\tescaped = false;\n\t\t\t\t\telse if (sc.ch == '\\\\')\n\t\t\t\t\t\tescaped = true;\n\t\t\t\t\telse if (sc.ch == '\"')\n\t\t\t\t\t\tsc.ForwardSetState(SCE_PO_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// whether we should enter a new state\n\t\tif (sc.state == SCE_PO_DEFAULT) {\n\t\t\t// forward to the first non-white character on the line\n\t\t\tbool atLineStart = sc.atLineStart;\n\t\t\tif (atLineStart) {\n\t\t\t\t// reset line state if it is set to comment state so empty lines don't get\n\t\t\t\t// comment line state, and the folding code folds comments separately,\n\t\t\t\t// and anyway the styling don't use line state for comments\n\t\t\t\tif (curLineState == SCE_PO_COMMENT)\n\t\t\t\t\tcurLineState = SCE_PO_DEFAULT;\n\n\t\t\t\twhile (sc.More() && ! sc.atLineEnd && isspacechar(sc.ch))\n\t\t\t\t\tsc.Forward();\n\t\t\t}\n\n\t\t\tif (atLineStart && sc.ch == '#') {\n\t\t\t\tif (sc.chNext == '.')\n\t\t\t\t\tsc.SetState(SCE_PO_PROGRAMMER_COMMENT);\n\t\t\t\telse if (sc.chNext == ':')\n\t\t\t\t\tsc.SetState(SCE_PO_REFERENCE);\n\t\t\t\telse if (sc.chNext == ',')\n\t\t\t\t\tsc.SetState(SCE_PO_FLAGS);\n\t\t\t\telse\n\t\t\t\t\tsc.SetState(SCE_PO_COMMENT);\n\t\t\t} else if (atLineStart && sc.Match(\"msgid\")) { // includes msgid_plural\n\t\t\t\tsc.SetState(SCE_PO_MSGID);\n\t\t\t} else if (atLineStart && sc.Match(\"msgstr\")) { // includes [] suffixes\n\t\t\t\tsc.SetState(SCE_PO_MSGSTR);\n\t\t\t} else if (atLineStart && sc.Match(\"msgctxt\")) {\n\t\t\t\tsc.SetState(SCE_PO_MSGCTXT);\n\t\t\t} else if (sc.ch == '\"') {\n\t\t\t\tif (curLineState == SCE_PO_MSGCTXT || curLineState == SCE_PO_MSGCTXT_TEXT)\n\t\t\t\t\tsc.SetState(SCE_PO_MSGCTXT_TEXT);\n\t\t\t\telse if (curLineState == SCE_PO_MSGID || curLineState == SCE_PO_MSGID_TEXT)\n\t\t\t\t\tsc.SetState(SCE_PO_MSGID_TEXT);\n\t\t\t\telse if (curLineState == SCE_PO_MSGSTR || curLineState == SCE_PO_MSGSTR_TEXT)\n\t\t\t\t\tsc.SetState(SCE_PO_MSGSTR_TEXT);\n\t\t\t\telse\n\t\t\t\t\tsc.SetState(SCE_PO_ERROR);\n\t\t\t} else if (! isspacechar(sc.ch))\n\t\t\t\tsc.SetState(SCE_PO_ERROR);\n\n\t\t\tif (sc.state != SCE_PO_DEFAULT)\n\t\t\t\tcurLineState = sc.state;\n\t\t}\n\n\t\tif (sc.atLineEnd) {\n\t\t\t// Update the line state, so it can be seen by next line\n\t\t\tcurLine = styler.GetLine(sc.currentPos);\n\t\t\tstyler.SetLineState(curLine, curLineState);\n\t\t}\n\t}\n\tsc.Complete();\n}\n\nstatic int FindNextNonEmptyLineState(Sci_PositionU startPos, Accessor &styler) {\n\tSci_PositionU length = styler.Length();\n\tfor (Sci_PositionU i = startPos; i < length; i++) {\n\t\tif (! isspacechar(styler[i])) {\n\t\t\treturn styler.GetLineState(styler.GetLine(i));\n\t\t}\n\t}\n\treturn 0;\n}\n\nstatic void FoldPODoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[], Accessor &styler) {\n\tif (! styler.GetPropertyInt(\"fold\"))\n\t\treturn;\n\tbool foldCompact = styler.GetPropertyInt(\"fold.compact\") != 0;\n\tbool foldComment = styler.GetPropertyInt(\"fold.comment\") != 0;\n\n\tSci_PositionU endPos = startPos + length;\n\tSci_Position curLine = styler.GetLine(startPos);\n\tint lineState = styler.GetLineState(curLine);\n\tint nextLineState;\n\tint level = styler.LevelAt(curLine) & SC_FOLDLEVELNUMBERMASK;\n\tint nextLevel;\n\tint visible = 0;\n\tint chNext = styler[startPos];\n\n\tfor (Sci_PositionU i = startPos; i < endPos; i++) {\n\t\tint ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i+1);\n\n\t\tif (! isspacechar(ch)) {\n\t\t\tvisible++;\n\t\t} else if ((ch == '\\r' && chNext != '\\n') || ch == '\\n' || i+1 >= endPos) {\n\t\t\tint lvl = level;\n\t\t\tSci_Position nextLine = curLine + 1;\n\n\t\t\tnextLineState = styler.GetLineState(nextLine);\n\t\t\tif ((lineState != SCE_PO_COMMENT || foldComment) &&\n\t\t\t\t\tnextLineState == lineState &&\n\t\t\t\t\tFindNextNonEmptyLineState(i, styler) == lineState)\n\t\t\t\tnextLevel = SC_FOLDLEVELBASE + 1;\n\t\t\telse\n\t\t\t\tnextLevel = SC_FOLDLEVELBASE;\n\n\t\t\tif (nextLevel > level)\n\t\t\t\tlvl |= SC_FOLDLEVELHEADERFLAG;\n\t\t\tif (visible == 0 && foldCompact)\n\t\t\t\tlvl |= SC_FOLDLEVELWHITEFLAG;\n\n\t\t\tstyler.SetLevel(curLine, lvl);\n\n\t\t\tlineState = nextLineState;\n\t\t\tcurLine = nextLine;\n\t\t\tlevel = nextLevel;\n\t\t\tvisible = 0;\n\t\t}\n\t}\n}\n\nstatic const char *const poWordListDesc[] = {\n\t0\n};\n\nLexerModule lmPO(SCLEX_PO, ColourisePODoc, \"po\", FoldPODoc, poWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexPOV.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexPOV.cxx\n ** Lexer for POV-Ray SDL (Persistance of Vision Raytracer, Scene Description Language).\n ** Written by Philippe Lhoste but this is mostly a derivative of LexCPP...\n **/\n// Copyright 1998-2005 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n// Some points that distinguish from a simple C lexer:\n// Identifiers start only by a character.\n// No line continuation character.\n// Strings are limited to 256 characters.\n// Directives are similar to preprocessor commands,\n// but we match directive keywords and colorize incorrect ones.\n// Block comments can be nested (code stolen from my code in LexLua).\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nstatic inline bool IsAWordChar(int ch) {\n\treturn ch < 0x80 && (isalnum(ch) || ch == '_');\n}\n\nstatic inline bool IsAWordStart(int ch) {\n\treturn ch < 0x80 && isalpha(ch);\n}\n\nstatic inline bool IsANumberChar(int ch) {\n\t// Not exactly following number definition (several dots are seen as OK, etc.)\n\t// but probably enough in most cases.\n\treturn (ch < 0x80) &&\n\t        (isdigit(ch) || toupper(ch) == 'E' ||\n             ch == '.' || ch == '-' || ch == '+');\n}\n\nstatic void ColourisePovDoc(\n\tSci_PositionU startPos,\n\tSci_Position length,\n\tint initStyle,\n\tWordList *keywordlists[],\n    Accessor &styler) {\n\n\tWordList &keywords1 = *keywordlists[0];\n\tWordList &keywords2 = *keywordlists[1];\n\tWordList &keywords3 = *keywordlists[2];\n\tWordList &keywords4 = *keywordlists[3];\n\tWordList &keywords5 = *keywordlists[4];\n\tWordList &keywords6 = *keywordlists[5];\n\tWordList &keywords7 = *keywordlists[6];\n\tWordList &keywords8 = *keywordlists[7];\n\n\tSci_Position currentLine = styler.GetLine(startPos);\n\t// Initialize the block comment /* */ nesting level, if we are inside such a comment.\n\tint blockCommentLevel = 0;\n\tif (initStyle == SCE_POV_COMMENT) {\n\t\tblockCommentLevel = styler.GetLineState(currentLine - 1);\n\t}\n\n\t// Do not leak onto next line\n\tif (initStyle == SCE_POV_STRINGEOL || initStyle == SCE_POV_COMMENTLINE) {\n\t\tinitStyle = SCE_POV_DEFAULT;\n\t}\n\n\tshort stringLen = 0;\n\n\tStyleContext sc(startPos, length, initStyle, styler);\n\n\tfor (; sc.More(); sc.Forward()) {\n\t\tif (sc.atLineEnd) {\n\t\t\t// Update the line state, so it can be seen by next line\n\t\t\tcurrentLine = styler.GetLine(sc.currentPos);\n\t\t\tif (sc.state == SCE_POV_COMMENT) {\n\t\t\t\t// Inside a block comment, we set the line state\n\t\t\t\tstyler.SetLineState(currentLine, blockCommentLevel);\n\t\t\t} else {\n\t\t\t\t// Reset the line state\n\t\t\t\tstyler.SetLineState(currentLine, 0);\n\t\t\t}\n\t\t}\n\n\t\tif (sc.atLineStart && (sc.state == SCE_POV_STRING)) {\n\t\t\t// Prevent SCE_POV_STRINGEOL from leaking back to previous line\n\t\t\tsc.SetState(SCE_POV_STRING);\n\t\t}\n\n\t\t// Determine if the current state should terminate.\n\t\tif (sc.state == SCE_POV_OPERATOR) {\n\t\t\tsc.SetState(SCE_POV_DEFAULT);\n\t\t} else if (sc.state == SCE_POV_NUMBER) {\n\t\t\t// We stop the number definition on non-numerical non-dot non-eE non-sign char\n\t\t\tif (!IsANumberChar(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_POV_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_POV_IDENTIFIER) {\n\t\t\tif (!IsAWordChar(sc.ch)) {\n\t\t\t\tchar s[100];\n\t\t\t\tsc.GetCurrent(s, sizeof(s));\n\t\t\t\tif (keywords2.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_POV_WORD2);\n\t\t\t\t} else if (keywords3.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_POV_WORD3);\n\t\t\t\t} else if (keywords4.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_POV_WORD4);\n\t\t\t\t} else if (keywords5.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_POV_WORD5);\n\t\t\t\t} else if (keywords6.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_POV_WORD6);\n\t\t\t\t} else if (keywords7.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_POV_WORD7);\n\t\t\t\t} else if (keywords8.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_POV_WORD8);\n\t\t\t\t}\n\t\t\t\tsc.SetState(SCE_POV_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_POV_DIRECTIVE) {\n\t\t\tif (!IsAWordChar(sc.ch)) {\n\t\t\t\tchar s[100];\n\t\t\t\tchar *p;\n\t\t\t\tsc.GetCurrent(s, sizeof(s));\n\t\t\t\tp = s;\n\t\t\t\t// Skip # and whitespace between # and directive word\n\t\t\t\tdo {\n\t\t\t\t\tp++;\n\t\t\t\t} while ((*p == ' ' || *p == '\\t') && *p != '\\0');\n\t\t\t\tif (!keywords1.InList(p)) {\n\t\t\t\t\tsc.ChangeState(SCE_POV_BADDIRECTIVE);\n\t\t\t\t}\n\t\t\t\tsc.SetState(SCE_POV_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_POV_COMMENT) {\n\t\t\tif (sc.Match('/', '*')) {\n\t\t\t\tblockCommentLevel++;\n\t\t\t\tsc.Forward();\n\t\t\t} else if (sc.Match('*', '/') && blockCommentLevel > 0) {\n\t\t\t\tblockCommentLevel--;\n\t\t\t\tsc.Forward();\n\t\t\t\tif (blockCommentLevel == 0) {\n\t\t\t\t\tsc.ForwardSetState(SCE_POV_DEFAULT);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (sc.state == SCE_POV_COMMENTLINE) {\n\t\t\tif (sc.atLineEnd) {\n\t\t\t\tsc.ForwardSetState(SCE_POV_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_POV_STRING) {\n\t\t\tif (sc.ch == '\\\\') {\n\t\t\t\tstringLen++;\n\t\t\t\tif (strchr(\"abfnrtuv0'\\\"\", sc.chNext)) {\n\t\t\t\t\t// Compound characters are counted as one.\n\t\t\t\t\t// Note: for Unicode chars \\u, we shouldn't count the next 4 digits...\n\t\t\t\t\tsc.Forward();\n\t\t\t\t}\n\t\t\t} else if (sc.ch == '\\\"') {\n\t\t\t\tsc.ForwardSetState(SCE_POV_DEFAULT);\n\t\t\t} else if (sc.atLineEnd) {\n\t\t\t\tsc.ChangeState(SCE_POV_STRINGEOL);\n\t\t\t\tsc.ForwardSetState(SCE_POV_DEFAULT);\n\t\t\t} else {\n\t\t\t\tstringLen++;\n\t\t\t}\n\t\t\tif (stringLen > 256) {\n\t\t\t\t// Strings are limited to 256 chars\n\t\t\t\tsc.SetState(SCE_POV_STRINGEOL);\n\t\t\t}\n\t\t} else if (sc.state == SCE_POV_STRINGEOL) {\n\t\t\tif (sc.ch == '\\\\') {\n\t\t\t\tif (sc.chNext == '\\\"' || sc.chNext == '\\\\') {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t}\n\t\t\t} else if (sc.ch == '\\\"') {\n\t\t\t\tsc.ForwardSetState(SCE_C_DEFAULT);\n\t\t\t} else if (sc.atLineEnd) {\n\t\t\t\tsc.ForwardSetState(SCE_POV_DEFAULT);\n\t\t\t}\n\t\t}\n\n\t\t// Determine if a new state should be entered.\n\t\tif (sc.state == SCE_POV_DEFAULT) {\n\t\t\tif (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) {\n\t\t\t\tsc.SetState(SCE_POV_NUMBER);\n\t\t\t} else if (IsAWordStart(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_POV_IDENTIFIER);\n\t\t\t} else if (sc.Match('/', '*')) {\n\t\t\t\tblockCommentLevel = 1;\n\t\t\t\tsc.SetState(SCE_POV_COMMENT);\n\t\t\t\tsc.Forward();\t// Eat the * so it isn't used for the end of the comment\n\t\t\t} else if (sc.Match('/', '/')) {\n\t\t\t\tsc.SetState(SCE_POV_COMMENTLINE);\n\t\t\t} else if (sc.ch == '\\\"') {\n\t\t\t\tsc.SetState(SCE_POV_STRING);\n\t\t\t\tstringLen = 0;\n\t\t\t} else if (sc.ch == '#') {\n\t\t\t\tsc.SetState(SCE_POV_DIRECTIVE);\n\t\t\t\t// Skip whitespace between # and directive word\n\t\t\t\tdo {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t} while ((sc.ch == ' ' || sc.ch == '\\t') && sc.More());\n\t\t\t\tif (sc.atLineEnd) {\n\t\t\t\t\tsc.SetState(SCE_POV_DEFAULT);\n\t\t\t\t}\n\t\t\t} else if (isoperator(static_cast<char>(sc.ch))) {\n\t\t\t\tsc.SetState(SCE_POV_OPERATOR);\n\t\t\t}\n\t\t}\n\t}\n\tsc.Complete();\n}\n\nstatic void FoldPovDoc(\n\tSci_PositionU startPos,\n\tSci_Position length,\n\tint initStyle,\n\tWordList *[],\n\tAccessor &styler) {\n\n\tbool foldComment = styler.GetPropertyInt(\"fold.comment\") != 0;\n\tbool foldDirective = styler.GetPropertyInt(\"fold.directive\") != 0;\n\tbool foldCompact = styler.GetPropertyInt(\"fold.compact\", 1) != 0;\n\tSci_PositionU endPos = startPos + length;\n\tint visibleChars = 0;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tint levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK;\n\tint levelCurrent = levelPrev;\n\tchar chNext = styler[startPos];\n\tint styleNext = styler.StyleAt(startPos);\n\tint style = initStyle;\n\tfor (Sci_PositionU i = startPos; i < endPos; i++) {\n\t\tchar ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\tint stylePrev = style;\n\t\tstyle = styleNext;\n\t\tstyleNext = styler.StyleAt(i + 1);\n\t\tbool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n\t\tif (foldComment && (style == SCE_POV_COMMENT)) {\n\t\t\tif (stylePrev != SCE_POV_COMMENT) {\n\t\t\t\tlevelCurrent++;\n\t\t\t} else if ((styleNext != SCE_POV_COMMENT) && !atEOL) {\n\t\t\t\t// Comments don't end at end of line and the next character may be unstyled.\n\t\t\t\tlevelCurrent--;\n\t\t\t}\n\t\t}\n\t\tif (foldComment && (style == SCE_POV_COMMENTLINE)) {\n\t\t\tif ((ch == '/') && (chNext == '/')) {\n\t\t\t\tchar chNext2 = styler.SafeGetCharAt(i + 2);\n\t\t\t\tif (chNext2 == '{') {\n\t\t\t\t\tlevelCurrent++;\n\t\t\t\t} else if (chNext2 == '}') {\n\t\t\t\t\tlevelCurrent--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (foldDirective && (style == SCE_POV_DIRECTIVE)) {\n\t\t\tif (ch == '#') {\n\t\t\t\tSci_PositionU j=i+1;\n\t\t\t\twhile ((j<endPos) && IsASpaceOrTab(styler.SafeGetCharAt(j))) {\n\t\t\t\t\tj++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (style == SCE_POV_OPERATOR) {\n\t\t\tif (ch == '{') {\n\t\t\t\tlevelCurrent++;\n\t\t\t} else if (ch == '}') {\n\t\t\t\tlevelCurrent--;\n\t\t\t}\n\t\t}\n\t\tif (atEOL) {\n\t\t\tint lev = levelPrev;\n\t\t\tif (visibleChars == 0 && foldCompact)\n\t\t\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\t\t\tif ((levelCurrent > levelPrev) && (visibleChars > 0))\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\tif (lev != styler.LevelAt(lineCurrent)) {\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\t\t\t}\n\t\t\tlineCurrent++;\n\t\t\tlevelPrev = levelCurrent;\n\t\t\tvisibleChars = 0;\n\t\t}\n\t\tif (!isspacechar(ch))\n\t\t\tvisibleChars++;\n\t}\n\t// Fill in the real level of the next line, keeping the current flags as they will be filled in later\n\tint flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK;\n\tstyler.SetLevel(lineCurrent, levelPrev | flagsNext);\n}\n\nstatic const char * const povWordLists[] = {\n\t\"Language directives\",\n\t\"Objects & CSG & Appearance\",\n\t\"Types & Modifiers & Items\",\n\t\"Predefined Identifiers\",\n\t\"Predefined Functions\",\n\t\"User defined 1\",\n\t\"User defined 2\",\n\t\"User defined 3\",\n\t0,\n};\n\nLexerModule lmPOV(SCLEX_POV, ColourisePovDoc, \"pov\", FoldPovDoc, povWordLists);\n"
  },
  {
    "path": "lexilla/lexers/LexPS.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexPS.cxx\n ** Lexer for PostScript\n **\n ** Written by Nigel Hathaway <nigel@bprj.co.uk>.\n ** The License.txt file describes the conditions under which this software may be distributed.\n **/\n\n// Previous releases of this lexer included support for marking token starts with\n// a style byte indicator. This was used by the wxGhostscript IDE/debugger.\n// Style byte indicators were removed in version 3.4.3.\n// Anyone wanting to restore this functionality for wxGhostscript using 'modern'\n// indicators can examine the earlier source in the Mercurial repository.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nstatic inline bool IsASelfDelimitingChar(const int ch) {\n    return (ch == '[' || ch == ']' || ch == '{' || ch == '}' ||\n            ch == '/' || ch == '<' || ch == '>' ||\n            ch == '(' || ch == ')' || ch == '%');\n}\n\nstatic inline bool IsAWhitespaceChar(const int ch) {\n    return (ch == ' '  || ch == '\\t' || ch == '\\r' ||\n            ch == '\\n' || ch == '\\f' || ch == '\\0');\n}\n\nstatic bool IsABaseNDigit(const int ch, const int base) {\n    int maxdig = '9';\n    int letterext = -1;\n\n    if (base <= 10)\n        maxdig = '0' + base - 1;\n    else\n        letterext = base - 11;\n\n    return ((ch >= '0' && ch <= maxdig) ||\n            (ch >= 'A' && ch <= ('A' + letterext)) ||\n            (ch >= 'a' && ch <= ('a' + letterext)));\n}\n\nstatic inline bool IsABase85Char(const int ch) {\n    return ((ch >= '!' && ch <= 'u') || ch == 'z');\n}\n\nstatic void ColourisePSDoc(\n    Sci_PositionU startPos,\n    Sci_Position length,\n    int initStyle,\n    WordList *keywordlists[],\n    Accessor &styler) {\n\n    WordList &keywords1 = *keywordlists[0];\n    WordList &keywords2 = *keywordlists[1];\n    WordList &keywords3 = *keywordlists[2];\n    WordList &keywords4 = *keywordlists[3];\n    WordList &keywords5 = *keywordlists[4];\n\n    StyleContext sc(startPos, length, initStyle, styler);\n\n    // property ps.level\n    // Define level (0..3) of PostScript handled and thus set of keywords. Default is 3.\n    int pslevel = styler.GetPropertyInt(\"ps.level\", 3);\n    Sci_Position lineCurrent = styler.GetLine(startPos);\n    int nestTextCurrent = 0;\n    if (lineCurrent > 0 && initStyle == SCE_PS_TEXT)\n        nestTextCurrent = styler.GetLineState(lineCurrent - 1);\n    int numRadix = 0;\n    bool numHasPoint = false;\n    bool numHasExponent = false;\n    bool numHasSign = false;\n\n    for (; sc.More(); sc.Forward()) {\n        if (sc.atLineStart)\n            lineCurrent = styler.GetLine(sc.currentPos);\n\n        // Determine if the current state should terminate.\n        if (sc.state == SCE_PS_COMMENT || sc.state == SCE_PS_DSC_VALUE) {\n            if (sc.atLineEnd) {\n                sc.SetState(SCE_C_DEFAULT);\n            }\n        } else if (sc.state == SCE_PS_DSC_COMMENT) {\n            if (sc.ch == ':') {\n                sc.Forward();\n                if (!sc.atLineEnd)\n                    sc.SetState(SCE_PS_DSC_VALUE);\n                else\n                    sc.SetState(SCE_C_DEFAULT);\n            } else if (sc.atLineEnd) {\n                sc.SetState(SCE_C_DEFAULT);\n            } else if (IsAWhitespaceChar(sc.ch) && sc.ch != '\\r') {\n                sc.ChangeState(SCE_PS_COMMENT);\n            }\n        } else if (sc.state == SCE_PS_NUMBER) {\n            if (IsASelfDelimitingChar(sc.ch) || IsAWhitespaceChar(sc.ch)) {\n                if ((sc.chPrev == '+' || sc.chPrev == '-' ||\n                     sc.chPrev == 'E' || sc.chPrev == 'e') && numRadix == 0)\n                    sc.ChangeState(SCE_PS_NAME);\n                sc.SetState(SCE_C_DEFAULT);\n            } else if (sc.ch == '#') {\n                if (numHasPoint || numHasExponent || numHasSign || numRadix != 0) {\n                    sc.ChangeState(SCE_PS_NAME);\n                } else {\n                    char szradix[5];\n                    sc.GetCurrent(szradix, 4);\n                    numRadix = atoi(szradix);\n                    if (numRadix < 2 || numRadix > 36)\n                        sc.ChangeState(SCE_PS_NAME);\n                }\n            } else if ((sc.ch == 'E' || sc.ch == 'e') && numRadix == 0) {\n                if (numHasExponent) {\n                    sc.ChangeState(SCE_PS_NAME);\n                } else {\n                    numHasExponent = true;\n                    if (sc.chNext == '+' || sc.chNext == '-')\n                        sc.Forward();\n                }\n            } else if (sc.ch == '.') {\n                if (numHasPoint || numHasExponent || numRadix != 0) {\n                    sc.ChangeState(SCE_PS_NAME);\n                } else {\n                    numHasPoint = true;\n                }\n            } else if (numRadix == 0) {\n                if (!IsABaseNDigit(sc.ch, 10))\n                    sc.ChangeState(SCE_PS_NAME);\n            } else {\n                if (!IsABaseNDigit(sc.ch, numRadix))\n                    sc.ChangeState(SCE_PS_NAME);\n            }\n        } else if (sc.state == SCE_PS_NAME || sc.state == SCE_PS_KEYWORD) {\n            if (IsASelfDelimitingChar(sc.ch) || IsAWhitespaceChar(sc.ch)) {\n                char s[100];\n                sc.GetCurrent(s, sizeof(s));\n                if ((pslevel >= 1 && keywords1.InList(s)) ||\n                    (pslevel >= 2 && keywords2.InList(s)) ||\n                    (pslevel >= 3 && keywords3.InList(s)) ||\n                    keywords4.InList(s) || keywords5.InList(s)) {\n                    sc.ChangeState(SCE_PS_KEYWORD);\n                }\n                sc.SetState(SCE_C_DEFAULT);\n            }\n        } else if (sc.state == SCE_PS_LITERAL || sc.state == SCE_PS_IMMEVAL) {\n            if (IsASelfDelimitingChar(sc.ch) || IsAWhitespaceChar(sc.ch))\n                sc.SetState(SCE_C_DEFAULT);\n        } else if (sc.state == SCE_PS_PAREN_ARRAY || sc.state == SCE_PS_PAREN_DICT ||\n                   sc.state == SCE_PS_PAREN_PROC) {\n            sc.SetState(SCE_C_DEFAULT);\n        } else if (sc.state == SCE_PS_TEXT) {\n            if (sc.ch == '(') {\n                nestTextCurrent++;\n            } else if (sc.ch == ')') {\n                if (--nestTextCurrent == 0)\n                   sc.ForwardSetState(SCE_PS_DEFAULT);\n            } else if (sc.ch == '\\\\') {\n                sc.Forward();\n            }\n        } else if (sc.state == SCE_PS_HEXSTRING) {\n            if (sc.ch == '>') {\n                sc.ForwardSetState(SCE_PS_DEFAULT);\n            } else if (!IsABaseNDigit(sc.ch, 16) && !IsAWhitespaceChar(sc.ch)) {\n                sc.SetState(SCE_PS_HEXSTRING);\n                styler.ColourTo(sc.currentPos, SCE_PS_BADSTRINGCHAR);\n            }\n        } else if (sc.state == SCE_PS_BASE85STRING) {\n            if (sc.Match('~', '>')) {\n                sc.Forward();\n                sc.ForwardSetState(SCE_PS_DEFAULT);\n            } else if (!IsABase85Char(sc.ch) && !IsAWhitespaceChar(sc.ch)) {\n                sc.SetState(SCE_PS_BASE85STRING);\n                styler.ColourTo(sc.currentPos, SCE_PS_BADSTRINGCHAR);\n            }\n        }\n\n        // Determine if a new state should be entered.\n        if (sc.state == SCE_C_DEFAULT) {\n\n            if (sc.ch == '[' || sc.ch == ']') {\n                sc.SetState(SCE_PS_PAREN_ARRAY);\n            } else if (sc.ch == '{' || sc.ch == '}') {\n                sc.SetState(SCE_PS_PAREN_PROC);\n            } else if (sc.ch == '/') {\n                if (sc.chNext == '/') {\n                    sc.SetState(SCE_PS_IMMEVAL);\n                    sc.Forward();\n                } else {\n                    sc.SetState(SCE_PS_LITERAL);\n                }\n            } else if (sc.ch == '<') {\n                if (sc.chNext == '<') {\n                    sc.SetState(SCE_PS_PAREN_DICT);\n                    sc.Forward();\n                } else if (sc.chNext == '~') {\n                    sc.SetState(SCE_PS_BASE85STRING);\n                    sc.Forward();\n                } else {\n                    sc.SetState(SCE_PS_HEXSTRING);\n                }\n            } else if (sc.ch == '>' && sc.chNext == '>') {\n                    sc.SetState(SCE_PS_PAREN_DICT);\n                    sc.Forward();\n            } else if (sc.ch == '>' || sc.ch == ')') {\n                sc.SetState(SCE_C_DEFAULT);\n                styler.ColourTo(sc.currentPos, SCE_PS_BADSTRINGCHAR);\n            } else if (sc.ch == '(') {\n                sc.SetState(SCE_PS_TEXT);\n                nestTextCurrent = 1;\n            } else if (sc.ch == '%') {\n                if (sc.chNext == '%' && sc.atLineStart) {\n                    sc.SetState(SCE_PS_DSC_COMMENT);\n                    sc.Forward();\n                    if (sc.chNext == '+') {\n                        sc.Forward();\n                        sc.ForwardSetState(SCE_PS_DSC_VALUE);\n                    }\n                } else {\n                    sc.SetState(SCE_PS_COMMENT);\n                }\n            } else if ((sc.ch == '+' || sc.ch == '-' || sc.ch == '.') &&\n                       IsABaseNDigit(sc.chNext, 10)) {\n                sc.SetState(SCE_PS_NUMBER);\n                numRadix = 0;\n                numHasPoint = (sc.ch == '.');\n                numHasExponent = false;\n                numHasSign = (sc.ch == '+' || sc.ch == '-');\n            } else if ((sc.ch == '+' || sc.ch == '-') && sc.chNext == '.' &&\n                       IsABaseNDigit(sc.GetRelative(2), 10)) {\n                sc.SetState(SCE_PS_NUMBER);\n                numRadix = 0;\n                numHasPoint = false;\n                numHasExponent = false;\n                numHasSign = true;\n            } else if (IsABaseNDigit(sc.ch, 10)) {\n                sc.SetState(SCE_PS_NUMBER);\n                numRadix = 0;\n                numHasPoint = false;\n                numHasExponent = false;\n                numHasSign = false;\n            } else if (!IsAWhitespaceChar(sc.ch)) {\n                sc.SetState(SCE_PS_NAME);\n            }\n        }\n\n        if (sc.atLineEnd)\n            styler.SetLineState(lineCurrent, nestTextCurrent);\n    }\n\n    sc.Complete();\n}\n\nstatic void FoldPSDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[],\n                       Accessor &styler) {\n    bool foldCompact = styler.GetPropertyInt(\"fold.compact\", 1) != 0;\n    bool foldAtElse = styler.GetPropertyInt(\"fold.at.else\", 0) != 0;\n    Sci_PositionU endPos = startPos + length;\n    int visibleChars = 0;\n    Sci_Position lineCurrent = styler.GetLine(startPos);\n    int levelCurrent = SC_FOLDLEVELBASE;\n    if (lineCurrent > 0)\n        levelCurrent = styler.LevelAt(lineCurrent-1) >> 16;\n    int levelMinCurrent = levelCurrent;\n    int levelNext = levelCurrent;\n    char chNext = styler[startPos];\n    int styleNext = styler.StyleAt(startPos);\n    for (Sci_PositionU i = startPos; i < endPos; i++) {\n        char ch = chNext;\n        chNext = styler.SafeGetCharAt(i + 1);\n        int style = styleNext;\n        styleNext = styler.StyleAt(i + 1);\n        bool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');  //mac??\n        if ((style & 31) == SCE_PS_PAREN_PROC) {\n            if (ch == '{') {\n                // Measure the minimum before a '{' to allow\n                // folding on \"} {\"\n                if (levelMinCurrent > levelNext) {\n                    levelMinCurrent = levelNext;\n                }\n                levelNext++;\n            } else if (ch == '}') {\n                levelNext--;\n            }\n        }\n        if (atEOL) {\n            int levelUse = levelCurrent;\n            if (foldAtElse) {\n                levelUse = levelMinCurrent;\n            }\n            int lev = levelUse | levelNext << 16;\n            if (visibleChars == 0 && foldCompact)\n                lev |= SC_FOLDLEVELWHITEFLAG;\n            if (levelUse < levelNext)\n                lev |= SC_FOLDLEVELHEADERFLAG;\n            if (lev != styler.LevelAt(lineCurrent)) {\n                styler.SetLevel(lineCurrent, lev);\n            }\n            lineCurrent++;\n            levelCurrent = levelNext;\n            levelMinCurrent = levelCurrent;\n            visibleChars = 0;\n        }\n        if (!isspacechar(ch))\n            visibleChars++;\n    }\n}\n\nstatic const char * const psWordListDesc[] = {\n    \"PS Level 1 operators\",\n    \"PS Level 2 operators\",\n    \"PS Level 3 operators\",\n    \"RIP-specific operators\",\n    \"User-defined operators\",\n    0\n};\n\nLexerModule lmPS(SCLEX_PS, ColourisePSDoc, \"ps\", FoldPSDoc, psWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexPascal.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexPascal.cxx\n ** Lexer for Pascal.\n ** Written by Laurent le Tynevez\n ** Updated by Simon Steele <s.steele@pnotepad.org> September 2002\n ** Updated by Mathias Rauen <scite@madshi.net> May 2003 (Delphi adjustments)\n ** Completely rewritten by Marko Njezic <sf@maxempire.com> October 2008\n **/\n\n/*\n\nA few words about features of the new completely rewritten LexPascal...\n\nGenerally speaking LexPascal tries to support all available Delphi features (up\nto Delphi XE4 at this time).\n\n~ HIGHLIGHTING:\n\nIf you enable \"lexer.pascal.smart.highlighting\" property, some keywords will\nonly be highlighted in appropriate context. As implemented those are keywords\nrelated to property and DLL exports declarations (similar to how Delphi IDE\nworks).\n\nFor example, keywords \"read\" and \"write\" will only be highlighted if they are in\nproperty declaration:\n\nproperty MyProperty: boolean read FMyProperty write FMyProperty;\n\n~ FOLDING:\n\nFolding is supported in the following cases:\n\n- Folding of stream-like comments\n- Folding of groups of consecutive line comments\n- Folding of preprocessor blocks (the following preprocessor blocks are\nsupported: IF / IFEND; IFDEF, IFNDEF, IFOPT / ENDIF and REGION / ENDREGION\nblocks), including nesting of preprocessor blocks up to 255 levels\n- Folding of code blocks on appropriate keywords (the following code blocks are\nsupported: \"begin, asm, record, try, case / end\" blocks, class & object\ndeclarations and interface declarations)\n\nRemarks:\n\n- Folding of code blocks tries to handle all special cases in which folding\nshould not occur. As implemented those are:\n\n1. Structure \"record case / end\" (there's only one \"end\" statement and \"case\" is\nignored as fold point)\n2. Forward class declarations (\"type TMyClass = class;\") and object method\ndeclarations (\"TNotifyEvent = procedure(Sender: TObject) of object;\") are\nignored as fold points\n3. Simplified complete class declarations (\"type TMyClass = class(TObject);\")\nare ignored as fold points\n4. Every other situation when class keyword doesn't actually start class\ndeclaration (\"class procedure\", \"class function\", \"class of\", \"class var\",\n\"class property\" and \"class operator\")\n5. Forward (disp)interface declarations (\"type IMyInterface = interface;\") are\nignored as fold points\n\n- Folding of code blocks inside preprocessor blocks is disabled (any comments\ninside them will be folded fine) because there is no guarantee that complete\ncode block will be contained inside folded preprocessor block in which case\nfolded code block could end prematurely at the end of preprocessor block if\nthere is no closing statement inside. This was done in order to properly process\ndocument that may contain something like this:\n\ntype\n{$IFDEF UNICODE}\n  TMyClass = class(UnicodeAncestor)\n{$ELSE}\n  TMyClass = class(AnsiAncestor)\n{$ENDIF}\n  private\n  ...\n  public\n  ...\n  published\n  ...\nend;\n\nIf class declarations were folded, then the second class declaration would end\nat \"$ENDIF\" statement, first class statement would end at \"end;\" statement and\npreprocessor \"$IFDEF\" block would go all the way to the end of document.\nHowever, having in mind all this, if you want to enable folding of code blocks\ninside preprocessor blocks, you can disable folding of preprocessor blocks by\nchanging \"fold.preprocessor\" property, in which case everything inside them\nwould be folded.\n\n~ KEYWORDS:\n\nThe list of keywords that can be used in pascal.properties file (up to Delphi\nXE4):\n\n- Keywords: absolute abstract and array as asm assembler automated begin case\ncdecl class const constructor delayed deprecated destructor dispid dispinterface\ndiv do downto dynamic else end except experimental export exports external far\nfile final finalization finally for forward function goto helper if\nimplementation in inherited initialization inline interface is label library\nmessage mod near nil not object of on operator or out overload override packed\npascal platform private procedure program property protected public published\nraise record reference register reintroduce repeat resourcestring safecall\nsealed set shl shr static stdcall strict string then threadvar to try type unit\nunsafe until uses var varargs virtual while winapi with xor\n\n- Keywords related to the \"smart highlithing\" feature: add default implements\nindex name nodefault read readonly remove stored write writeonly\n\n- Keywords related to Delphi packages (in addition to all above): package\ncontains requires\n\n*/\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nstatic void GetRangeLowered(Sci_PositionU start,\n\t\tSci_PositionU end,\n\t\tAccessor &styler,\n\t\tchar *s,\n\t\tSci_PositionU len) {\n\tSci_PositionU i = 0;\n\twhile ((i < end - start + 1) && (i < len-1)) {\n\t\ts[i] = static_cast<char>(tolower(styler[start + i]));\n\t\ti++;\n\t}\n\ts[i] = '\\0';\n}\n\nstatic void GetForwardRangeLowered(Sci_PositionU start,\n\t\tCharacterSet &charSet,\n\t\tAccessor &styler,\n\t\tchar *s,\n\t\tSci_PositionU len) {\n\tSci_PositionU i = 0;\n\twhile ((i < len-1) && charSet.Contains(styler.SafeGetCharAt(start + i))) {\n\t\ts[i] = static_cast<char>(tolower(styler.SafeGetCharAt(start + i)));\n\t\ti++;\n\t}\n\ts[i] = '\\0';\n\n}\n\nenum {\n\tstateInAsm = 0x1000,\n\tstateInProperty = 0x2000,\n\tstateInExport = 0x4000,\n\tstateFoldInPreprocessor = 0x0100,\n\tstateFoldInRecord = 0x0200,\n\tstateFoldInPreprocessorLevelMask = 0x00FF,\n\tstateFoldMaskAll = 0x0FFF\n};\n\nstatic void ClassifyPascalWord(WordList *keywordlists[], StyleContext &sc, int &curLineState, bool bSmartHighlighting) {\n\tWordList& keywords = *keywordlists[0];\n\n\tchar s[100];\n\tsc.GetCurrentLowered(s, sizeof(s));\n\tif (keywords.InList(s)) {\n\t\tif (curLineState & stateInAsm) {\n\t\t\tif (strcmp(s, \"end\") == 0 && sc.GetRelative(-4) != '@') {\n\t\t\t\tcurLineState &= ~stateInAsm;\n\t\t\t\tsc.ChangeState(SCE_PAS_WORD);\n\t\t\t} else {\n\t\t\t\tsc.ChangeState(SCE_PAS_ASM);\n\t\t\t}\n\t\t} else {\n\t\t\tbool ignoreKeyword = false;\n\t\t\tif (strcmp(s, \"asm\") == 0) {\n\t\t\t\tcurLineState |= stateInAsm;\n\t\t\t} else if (bSmartHighlighting) {\n\t\t\t\tif (strcmp(s, \"property\") == 0) {\n\t\t\t\t\tcurLineState |= stateInProperty;\n\t\t\t\t} else if (strcmp(s, \"exports\") == 0) {\n\t\t\t\t\tcurLineState |= stateInExport;\n\t\t\t\t} else if (!(curLineState & (stateInProperty | stateInExport)) && strcmp(s, \"index\") == 0) {\n\t\t\t\t\tignoreKeyword = true;\n\t\t\t\t} else if (!(curLineState & stateInExport) && strcmp(s, \"name\") == 0) {\n\t\t\t\t\tignoreKeyword = true;\n\t\t\t\t} else if (!(curLineState & stateInProperty) &&\n\t\t\t\t\t(strcmp(s, \"read\") == 0 || strcmp(s, \"write\") == 0 ||\n\t\t\t\t\t strcmp(s, \"default\") == 0 || strcmp(s, \"nodefault\") == 0 ||\n\t\t\t\t\t strcmp(s, \"stored\") == 0 || strcmp(s, \"implements\") == 0 ||\n\t\t\t\t\t strcmp(s, \"readonly\") == 0 || strcmp(s, \"writeonly\") == 0 ||\n\t\t\t\t\t strcmp(s, \"add\") == 0 || strcmp(s, \"remove\") == 0)) {\n\t\t\t\t\tignoreKeyword = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!ignoreKeyword) {\n\t\t\t\tsc.ChangeState(SCE_PAS_WORD);\n\t\t\t}\n\t\t}\n\t} else if (curLineState & stateInAsm) {\n\t\tsc.ChangeState(SCE_PAS_ASM);\n\t}\n\tsc.SetState(SCE_PAS_DEFAULT);\n}\n\nstatic void ColourisePascalDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[],\n\t\tAccessor &styler) {\n\tbool bSmartHighlighting = styler.GetPropertyInt(\"lexer.pascal.smart.highlighting\", 1) != 0;\n\n\tCharacterSet setWordStart(CharacterSet::setAlpha, \"_\", 0x80, true);\n\tCharacterSet setWord(CharacterSet::setAlphaNum, \"_\", 0x80, true);\n\tCharacterSet setNumber(CharacterSet::setDigits, \".-+eE\");\n\tCharacterSet setHexNumber(CharacterSet::setDigits, \"abcdefABCDEF\");\n\tCharacterSet setOperator(CharacterSet::setNone, \"#$&'()*+,-./:;<=>@[]^{}\");\n\n\tSci_Position curLine = styler.GetLine(startPos);\n\tint curLineState = curLine > 0 ? styler.GetLineState(curLine - 1) : 0;\n\n\tStyleContext sc(startPos, length, initStyle, styler);\n\n\tfor (; sc.More(); sc.Forward()) {\n\t\tif (sc.atLineEnd) {\n\t\t\t// Update the line state, so it can be seen by next line\n\t\t\tcurLine = styler.GetLine(sc.currentPos);\n\t\t\tstyler.SetLineState(curLine, curLineState);\n\t\t}\n\n\t\t// Determine if the current state should terminate.\n\t\tswitch (sc.state) {\n\t\t\tcase SCE_PAS_NUMBER:\n\t\t\t\tif (!setNumber.Contains(sc.ch) || (sc.ch == '.' && sc.chNext == '.')) {\n\t\t\t\t\tsc.SetState(SCE_PAS_DEFAULT);\n\t\t\t\t} else if (sc.ch == '-' || sc.ch == '+') {\n\t\t\t\t\tif (sc.chPrev != 'E' && sc.chPrev != 'e') {\n\t\t\t\t\t\tsc.SetState(SCE_PAS_DEFAULT);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_PAS_IDENTIFIER:\n\t\t\t\tif (!setWord.Contains(sc.ch)) {\n\t\t\t\t\tClassifyPascalWord(keywordlists, sc, curLineState, bSmartHighlighting);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_PAS_HEXNUMBER:\n\t\t\t\tif (!setHexNumber.Contains(sc.ch)) {\n\t\t\t\t\tsc.SetState(SCE_PAS_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_PAS_COMMENT:\n\t\t\tcase SCE_PAS_PREPROCESSOR:\n\t\t\t\tif (sc.ch == '}') {\n\t\t\t\t\tsc.ForwardSetState(SCE_PAS_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_PAS_COMMENT2:\n\t\t\tcase SCE_PAS_PREPROCESSOR2:\n\t\t\t\tif (sc.Match('*', ')')) {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\tsc.ForwardSetState(SCE_PAS_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_PAS_COMMENTLINE:\n\t\t\t\tif (sc.atLineStart) {\n\t\t\t\t\tsc.SetState(SCE_PAS_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_PAS_STRING:\n\t\t\t\tif (sc.atLineEnd) {\n\t\t\t\t\tsc.ChangeState(SCE_PAS_STRINGEOL);\n\t\t\t\t} else if (sc.ch == '\\'' && sc.chNext == '\\'') {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t} else if (sc.ch == '\\'') {\n\t\t\t\t\tsc.ForwardSetState(SCE_PAS_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_PAS_STRINGEOL:\n\t\t\t\tif (sc.atLineStart) {\n\t\t\t\t\tsc.SetState(SCE_PAS_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_PAS_CHARACTER:\n\t\t\t\tif (!setHexNumber.Contains(sc.ch) && sc.ch != '$') {\n\t\t\t\t\tsc.SetState(SCE_PAS_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_PAS_OPERATOR:\n\t\t\t\tif (bSmartHighlighting && sc.chPrev == ';') {\n\t\t\t\t\tcurLineState &= ~(stateInProperty | stateInExport);\n\t\t\t\t}\n\t\t\t\tsc.SetState(SCE_PAS_DEFAULT);\n\t\t\t\tbreak;\n\t\t\tcase SCE_PAS_ASM:\n\t\t\t\tsc.SetState(SCE_PAS_DEFAULT);\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// Determine if a new state should be entered.\n\t\tif (sc.state == SCE_PAS_DEFAULT) {\n\t\t\tif (IsADigit(sc.ch) && !(curLineState & stateInAsm)) {\n\t\t\t\tsc.SetState(SCE_PAS_NUMBER);\n\t\t\t} else if (setWordStart.Contains(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_PAS_IDENTIFIER);\n\t\t\t} else if (sc.ch == '$' && !(curLineState & stateInAsm)) {\n\t\t\t\tsc.SetState(SCE_PAS_HEXNUMBER);\n\t\t\t} else if (sc.Match('{', '$')) {\n\t\t\t\tsc.SetState(SCE_PAS_PREPROCESSOR);\n\t\t\t} else if (sc.ch == '{') {\n\t\t\t\tsc.SetState(SCE_PAS_COMMENT);\n\t\t\t} else if (sc.Match(\"(*$\")) {\n\t\t\t\tsc.SetState(SCE_PAS_PREPROCESSOR2);\n\t\t\t} else if (sc.Match('(', '*')) {\n\t\t\t\tsc.SetState(SCE_PAS_COMMENT2);\n\t\t\t\tsc.Forward();\t// Eat the * so it isn't used for the end of the comment\n\t\t\t} else if (sc.Match('/', '/')) {\n\t\t\t\tsc.SetState(SCE_PAS_COMMENTLINE);\n\t\t\t} else if (sc.ch == '\\'') {\n\t\t\t\tsc.SetState(SCE_PAS_STRING);\n\t\t\t} else if (sc.ch == '#') {\n\t\t\t\tsc.SetState(SCE_PAS_CHARACTER);\n\t\t\t} else if (setOperator.Contains(sc.ch) && !(curLineState & stateInAsm)) {\n\t\t\t\tsc.SetState(SCE_PAS_OPERATOR);\n\t\t\t} else if (curLineState & stateInAsm) {\n\t\t\t\tsc.SetState(SCE_PAS_ASM);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (sc.state == SCE_PAS_IDENTIFIER && setWord.Contains(sc.chPrev)) {\n\t\tClassifyPascalWord(keywordlists, sc, curLineState, bSmartHighlighting);\n\t}\n\n\tsc.Complete();\n}\n\nstatic bool IsStreamCommentStyle(int style) {\n\treturn style == SCE_PAS_COMMENT || style == SCE_PAS_COMMENT2;\n}\n\nstatic bool IsCommentLine(Sci_Position line, Accessor &styler) {\n\tSci_Position pos = styler.LineStart(line);\n\tSci_Position eolPos = styler.LineStart(line + 1) - 1;\n\tfor (Sci_Position i = pos; i < eolPos; i++) {\n\t\tchar ch = styler[i];\n\t\tchar chNext = styler.SafeGetCharAt(i + 1);\n\t\tint style = styler.StyleAt(i);\n\t\tif (ch == '/' && chNext == '/' && style == SCE_PAS_COMMENTLINE) {\n\t\t\treturn true;\n\t\t} else if (!IsASpaceOrTab(ch)) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn false;\n}\n\nstatic unsigned int GetFoldInPreprocessorLevelFlag(int lineFoldStateCurrent) {\n\treturn lineFoldStateCurrent & stateFoldInPreprocessorLevelMask;\n}\n\nstatic void SetFoldInPreprocessorLevelFlag(int &lineFoldStateCurrent, unsigned int nestLevel) {\n\tlineFoldStateCurrent &= ~stateFoldInPreprocessorLevelMask;\n\tlineFoldStateCurrent |= nestLevel & stateFoldInPreprocessorLevelMask;\n}\n\nstatic void ClassifyPascalPreprocessorFoldPoint(int &levelCurrent, int &lineFoldStateCurrent,\n\t\tSci_PositionU startPos, Accessor &styler) {\n\tCharacterSet setWord(CharacterSet::setAlpha);\n\n\tchar s[11];\t// Size of the longest possible keyword + one additional character + null\n\tGetForwardRangeLowered(startPos, setWord, styler, s, sizeof(s));\n\n\tunsigned int nestLevel = GetFoldInPreprocessorLevelFlag(lineFoldStateCurrent);\n\n\tif (strcmp(s, \"if\") == 0 ||\n\t\tstrcmp(s, \"ifdef\") == 0 ||\n\t\tstrcmp(s, \"ifndef\") == 0 ||\n\t\tstrcmp(s, \"ifopt\") == 0 ||\n\t\tstrcmp(s, \"region\") == 0) {\n\t\tnestLevel++;\n\t\tSetFoldInPreprocessorLevelFlag(lineFoldStateCurrent, nestLevel);\n\t\tlineFoldStateCurrent |= stateFoldInPreprocessor;\n\t\tlevelCurrent++;\n\t} else if (strcmp(s, \"endif\") == 0 ||\n\t\tstrcmp(s, \"ifend\") == 0 ||\n\t\tstrcmp(s, \"endregion\") == 0) {\n\t\tnestLevel--;\n\t\tSetFoldInPreprocessorLevelFlag(lineFoldStateCurrent, nestLevel);\n\t\tif (nestLevel == 0) {\n\t\t\tlineFoldStateCurrent &= ~stateFoldInPreprocessor;\n\t\t}\n\t\tlevelCurrent--;\n\t\tif (levelCurrent < SC_FOLDLEVELBASE) {\n\t\t\tlevelCurrent = SC_FOLDLEVELBASE;\n\t\t}\n\t}\n}\n\nstatic Sci_PositionU SkipWhiteSpace(Sci_PositionU currentPos, Sci_PositionU endPos,\n\t\tAccessor &styler, bool includeChars = false) {\n\tCharacterSet setWord(CharacterSet::setAlphaNum, \"_\");\n\tSci_PositionU j = currentPos + 1;\n\tchar ch = styler.SafeGetCharAt(j);\n\twhile ((j < endPos) && (IsASpaceOrTab(ch) || ch == '\\r' || ch == '\\n' ||\n\t\tIsStreamCommentStyle(styler.StyleAt(j)) || (includeChars && setWord.Contains(ch)))) {\n\t\tj++;\n\t\tch = styler.SafeGetCharAt(j);\n\t}\n\treturn j;\n}\n\nstatic void ClassifyPascalWordFoldPoint(int &levelCurrent, int &lineFoldStateCurrent,\n\t\tSci_Position startPos, Sci_PositionU endPos,\n\t\tSci_PositionU lastStart, Sci_PositionU currentPos, Accessor &styler) {\n\tchar s[100];\n\tGetRangeLowered(lastStart, currentPos, styler, s, sizeof(s));\n\n\tif (strcmp(s, \"record\") == 0) {\n\t\tlineFoldStateCurrent |= stateFoldInRecord;\n\t\tlevelCurrent++;\n\t} else if (strcmp(s, \"begin\") == 0 ||\n\t\tstrcmp(s, \"asm\") == 0 ||\n\t\tstrcmp(s, \"try\") == 0 ||\n\t\t(strcmp(s, \"case\") == 0 && !(lineFoldStateCurrent & stateFoldInRecord))) {\n\t\tlevelCurrent++;\n\t} else if (strcmp(s, \"class\") == 0 || strcmp(s, \"object\") == 0) {\n\t\t// \"class\" & \"object\" keywords require special handling...\n\t\tbool ignoreKeyword = false;\n\t\tSci_PositionU j = SkipWhiteSpace(currentPos, endPos, styler);\n\t\tif (j < endPos) {\n\t\t\tCharacterSet setWordStart(CharacterSet::setAlpha, \"_\");\n\t\t\tCharacterSet setWord(CharacterSet::setAlphaNum, \"_\");\n\n\t\t\tif (styler.SafeGetCharAt(j) == ';') {\n\t\t\t\t// Handle forward class declarations (\"type TMyClass = class;\")\n\t\t\t\t// and object method declarations (\"TNotifyEvent = procedure(Sender: TObject) of object;\")\n\t\t\t\tignoreKeyword = true;\n\t\t\t} else if (strcmp(s, \"class\") == 0) {\n\t\t\t\t// \"class\" keyword has a few more special cases...\n\t\t\t\tif (styler.SafeGetCharAt(j) == '(') {\n\t\t\t\t\t// Handle simplified complete class declarations (\"type TMyClass = class(TObject);\")\n\t\t\t\t\tj = SkipWhiteSpace(j, endPos, styler, true);\n\t\t\t\t\tif (j < endPos && styler.SafeGetCharAt(j) == ')') {\n\t\t\t\t\t\tj = SkipWhiteSpace(j, endPos, styler);\n\t\t\t\t\t\tif (j < endPos && styler.SafeGetCharAt(j) == ';') {\n\t\t\t\t\t\t\tignoreKeyword = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (setWordStart.Contains(styler.SafeGetCharAt(j))) {\n\t\t\t\t\tchar s2[11];\t// Size of the longest possible keyword + one additional character + null\n\t\t\t\t\tGetForwardRangeLowered(j, setWord, styler, s2, sizeof(s2));\n\n\t\t\t\t\tif (strcmp(s2, \"procedure\") == 0 ||\n\t\t\t\t\t\tstrcmp(s2, \"function\") == 0 ||\n\t\t\t\t\t\tstrcmp(s2, \"of\") == 0 ||\n\t\t\t\t\t\tstrcmp(s2, \"var\") == 0 ||\n\t\t\t\t\t\tstrcmp(s2, \"property\") == 0 ||\n\t\t\t\t\t\tstrcmp(s2, \"operator\") == 0) {\n\t\t\t\t\t\tignoreKeyword = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (!ignoreKeyword) {\n\t\t\tlevelCurrent++;\n\t\t}\n\t} else if (strcmp(s, \"interface\") == 0) {\n\t\t// \"interface\" keyword requires special handling...\n\t\tbool ignoreKeyword = true;\n\t\tSci_Position j = lastStart - 1;\n\t\tchar ch = styler.SafeGetCharAt(j);\n\t\twhile ((j >= startPos) && (IsASpaceOrTab(ch) || ch == '\\r' || ch == '\\n' ||\n\t\t\tIsStreamCommentStyle(styler.StyleAt(j)))) {\n\t\t\tj--;\n\t\t\tch = styler.SafeGetCharAt(j);\n\t\t}\n\t\tif (j >= startPos && styler.SafeGetCharAt(j) == '=') {\n\t\t\tignoreKeyword = false;\n\t\t}\n\t\tif (!ignoreKeyword) {\n\t\t\tSci_PositionU k = SkipWhiteSpace(currentPos, endPos, styler);\n\t\t\tif (k < endPos && styler.SafeGetCharAt(k) == ';') {\n\t\t\t\t// Handle forward interface declarations (\"type IMyInterface = interface;\")\n\t\t\t\tignoreKeyword = true;\n\t\t\t}\n\t\t}\n\t\tif (!ignoreKeyword) {\n\t\t\tlevelCurrent++;\n\t\t}\n\t} else if (strcmp(s, \"dispinterface\") == 0) {\n\t\t// \"dispinterface\" keyword requires special handling...\n\t\tbool ignoreKeyword = false;\n\t\tSci_PositionU j = SkipWhiteSpace(currentPos, endPos, styler);\n\t\tif (j < endPos && styler.SafeGetCharAt(j) == ';') {\n\t\t\t// Handle forward dispinterface declarations (\"type IMyInterface = dispinterface;\")\n\t\t\tignoreKeyword = true;\n\t\t}\n\t\tif (!ignoreKeyword) {\n\t\t\tlevelCurrent++;\n\t\t}\n\t} else if (strcmp(s, \"end\") == 0) {\n\t\tlineFoldStateCurrent &= ~stateFoldInRecord;\n\t\tlevelCurrent--;\n\t\tif (levelCurrent < SC_FOLDLEVELBASE) {\n\t\t\tlevelCurrent = SC_FOLDLEVELBASE;\n\t\t}\n\t}\n}\n\nstatic void FoldPascalDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *[],\n\t\tAccessor &styler) {\n\tbool foldComment = styler.GetPropertyInt(\"fold.comment\") != 0;\n\tbool foldPreprocessor = styler.GetPropertyInt(\"fold.preprocessor\") != 0;\n\tbool foldCompact = styler.GetPropertyInt(\"fold.compact\", 1) != 0;\n\tSci_PositionU endPos = startPos + length;\n\tint visibleChars = 0;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tint levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK;\n\tint levelCurrent = levelPrev;\n\tint lineFoldStateCurrent = lineCurrent > 0 ? styler.GetLineState(lineCurrent - 1) & stateFoldMaskAll : 0;\n\tchar chNext = styler[startPos];\n\tint styleNext = styler.StyleAt(startPos);\n\tint style = initStyle;\n\n\tSci_Position lastStart = 0;\n\tCharacterSet setWord(CharacterSet::setAlphaNum, \"_\", 0x80, true);\n\n\tfor (Sci_PositionU i = startPos; i < endPos; i++) {\n\t\tchar ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\tint stylePrev = style;\n\t\tstyle = styleNext;\n\t\tstyleNext = styler.StyleAt(i + 1);\n\t\tbool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n\n\t\tif (foldComment && IsStreamCommentStyle(style)) {\n\t\t\tif (!IsStreamCommentStyle(stylePrev)) {\n\t\t\t\tlevelCurrent++;\n\t\t\t} else if (!IsStreamCommentStyle(styleNext) && !atEOL) {\n\t\t\t\t// Comments don't end at end of line and the next character may be unstyled.\n\t\t\t\tlevelCurrent--;\n\t\t\t}\n\t\t}\n\t\tif (foldComment && atEOL && IsCommentLine(lineCurrent, styler))\n\t\t{\n\t\t\tif (!IsCommentLine(lineCurrent - 1, styler)\n\t\t\t    && IsCommentLine(lineCurrent + 1, styler))\n\t\t\t\tlevelCurrent++;\n\t\t\telse if (IsCommentLine(lineCurrent - 1, styler)\n\t\t\t         && !IsCommentLine(lineCurrent+1, styler))\n\t\t\t\tlevelCurrent--;\n\t\t}\n\t\tif (foldPreprocessor) {\n\t\t\tif (style == SCE_PAS_PREPROCESSOR && ch == '{' && chNext == '$') {\n\t\t\t\tClassifyPascalPreprocessorFoldPoint(levelCurrent, lineFoldStateCurrent, i + 2, styler);\n\t\t\t} else if (style == SCE_PAS_PREPROCESSOR2 && ch == '(' && chNext == '*'\n\t\t\t           && styler.SafeGetCharAt(i + 2) == '$') {\n\t\t\t\tClassifyPascalPreprocessorFoldPoint(levelCurrent, lineFoldStateCurrent, i + 3, styler);\n\t\t\t}\n\t\t}\n\n\t\tif (stylePrev != SCE_PAS_WORD && style == SCE_PAS_WORD)\n\t\t{\n\t\t\t// Store last word start point.\n\t\t\tlastStart = i;\n\t\t}\n\t\tif (stylePrev == SCE_PAS_WORD && !(lineFoldStateCurrent & stateFoldInPreprocessor)) {\n\t\t\tif(setWord.Contains(ch) && !setWord.Contains(chNext)) {\n\t\t\t\tClassifyPascalWordFoldPoint(levelCurrent, lineFoldStateCurrent, startPos, endPos, lastStart, i, styler);\n\t\t\t}\n\t\t}\n\n\t\tif (!IsASpace(ch))\n\t\t\tvisibleChars++;\n\n\t\tif (atEOL) {\n\t\t\tint lev = levelPrev;\n\t\t\tif (visibleChars == 0 && foldCompact)\n\t\t\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\t\t\tif ((levelCurrent > levelPrev) && (visibleChars > 0))\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\tif (lev != styler.LevelAt(lineCurrent)) {\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\t\t\t}\n\t\t\tint newLineState = (styler.GetLineState(lineCurrent) & ~stateFoldMaskAll) | lineFoldStateCurrent;\n\t\t\tstyler.SetLineState(lineCurrent, newLineState);\n\t\t\tlineCurrent++;\n\t\t\tlevelPrev = levelCurrent;\n\t\t\tvisibleChars = 0;\n\t\t}\n\t}\n\n\t// If we didn't reach the EOL in previous loop, store line level and whitespace information.\n\t// The rest will be filled in later...\n\tint lev = levelPrev;\n\tif (visibleChars == 0 && foldCompact)\n\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\tstyler.SetLevel(lineCurrent, lev);\n}\n\nstatic const char * const pascalWordListDesc[] = {\n\t\"Keywords\",\n\t0\n};\n\nLexerModule lmPascal(SCLEX_PASCAL, ColourisePascalDoc, \"pascal\", FoldPascalDoc, pascalWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexPerl.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexPerl.cxx\n ** Lexer for Perl.\n ** Converted to lexer object by \"Udo Lechner\" <dlchnr(at)gmx(dot)net>\n **/\n// Copyright 1998-2008 by Neil Hodgson <neilh@scintilla.org>\n// Lexical analysis fixes by Kein-Hong Man <mkh@pl.jaring.my>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n#include <map>\n#include <functional>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n#include \"OptionSet.h\"\n#include \"DefaultLexer.h\"\n\nusing namespace Scintilla;\nusing namespace Lexilla;\n\nnamespace {\n\n// Info for HERE document handling from perldata.pod (reformatted):\n// ----------------------------------------------------------------\n// A line-oriented form of quoting is based on the shell ``here-doc'' syntax.\n// Following a << you specify a string to terminate the quoted material, and\n// all lines following the current line down to the terminating string are\n// the value of the item.\n// Prefixing the terminating string with a \"~\" specifies that you want to\n// use \"Indented Here-docs\" (see below).\n// * The terminating string may be either an identifier (a word), or some\n//   quoted text.\n// * If quoted, the type of quotes you use determines the treatment of the\n//   text, just as in regular quoting.\n// * An unquoted identifier works like double quotes.\n// * There must be no space between the << and the identifier.\n//   (If you put a space it will be treated as a null identifier,\n//    which is valid, and matches the first empty line.)\n//   (This is deprecated, -w warns of this syntax)\n// * The terminating string must appear by itself (unquoted and\n//   with no surrounding whitespace) on the terminating line.\n//\n// Indented Here-docs\n// ------------------\n// The here-doc modifier \"~\" allows you to indent your here-docs to\n// make the code more readable.\n// The delimiter is used to determine the exact whitespace to remove\n// from the beginning of each line. All lines must have at least the\n// same starting whitespace (except lines only containing a newline)\n// or perl will croak. Tabs and spaces can be mixed, but are matched\n// exactly. One tab will not be equal to 8 spaces!\n// Additional beginning whitespace (beyond what preceded the\n// delimiter) will be preserved.\n\n#define HERE_DELIM_MAX 256\t\t// maximum length of HERE doc delimiter\n\n#define PERLNUM_BINARY\t\t1\t// order is significant: 1-3 cannot have a dot\n#define PERLNUM_OCTAL\t\t2\n#define PERLNUM_FLOAT_EXP\t3\t// exponent part only\n#define PERLNUM_HEX\t\t\t4\t// may be a hex float\n#define PERLNUM_DECIMAL\t\t5\t// 1-5 are numbers; 6-7 are strings\n#define PERLNUM_VECTOR\t\t6\n#define PERLNUM_V_VECTOR\t7\n#define PERLNUM_BAD\t\t\t8\n\n#define BACK_NONE\t\t0\t// lookback state for bareword disambiguation:\n#define BACK_OPERATOR\t1\t// whitespace/comments are insignificant\n#define BACK_KEYWORD\t2\t// operators/keywords are needed for disambiguation\n\n#define SUB_BEGIN\t\t0\t// states for subroutine prototype scan:\n#define SUB_HAS_PROTO\t1\t// only 'prototype' attribute allows prototypes\n#define SUB_HAS_ATTRIB\t2\t// other attributes can exist leftward\n#define SUB_HAS_MODULE\t3\t// sub name can have a ::identifier part\n#define SUB_HAS_SUB\t\t4\t// 'sub' keyword\n\n// all interpolated styles are different from their parent styles by a constant difference\n// we also assume SCE_PL_STRING_VAR is the interpolated style with the smallest value\n#define\tINTERPOLATE_SHIFT\t(SCE_PL_STRING_VAR - SCE_PL_STRING)\n\nbool isPerlKeyword(Sci_PositionU start, Sci_PositionU end, WordList &keywords, LexAccessor &styler) {\n\t// old-style keyword matcher; needed because GetCurrent() needs\n\t// current segment to be committed, but we may abandon early...\n\tchar s[100];\n\tSci_PositionU i, len = end - start;\n\tif (len > 30) { len = 30; }\n\tfor (i = 0; i < len; i++, start++) s[i] = styler[start];\n\ts[i] = '\\0';\n\treturn keywords.InList(s);\n}\n\nint disambiguateBareword(LexAccessor &styler, Sci_PositionU bk, Sci_PositionU fw,\n        int backFlag, Sci_PositionU backPos, Sci_PositionU endPos) {\n\t// identifiers are recognized by Perl as barewords under some\n\t// conditions, the following attempts to do the disambiguation\n\t// by looking backward and forward; result in 2 LSB\n\tint result = 0;\n\tbool moreback = false;\t\t// true if passed newline/comments\n\tbool brace = false;\t\t\t// true if opening brace found\n\t// if BACK_NONE, neither operator nor keyword, so skip test\n\tif (backFlag == BACK_NONE)\n\t\treturn result;\n\t// first look backwards past whitespace/comments to set EOL flag\n\t// (some disambiguation patterns must be on a single line)\n\tif (backPos <= static_cast<Sci_PositionU>(styler.LineStart(styler.GetLine(bk))))\n\t\tmoreback = true;\n\t// look backwards at last significant lexed item for disambiguation\n\tbk = backPos - 1;\n\tint ch = static_cast<unsigned char>(styler.SafeGetCharAt(bk));\n\tif (ch == '{' && !moreback) {\n\t\t// {bareword: possible variable spec\n\t\tbrace = true;\n\t} else if ((ch == '&' && styler.SafeGetCharAt(bk - 1) != '&')\n\t        // &bareword: subroutine call\n\t        || styler.Match(bk - 1, \"->\")\n\t        // ->bareword: part of variable spec\n\t        || styler.Match(bk - 1, \"::\")\n\t        // ::bareword: part of module spec\n\t        || styler.Match(bk - 2, \"sub\")) {\n\t        // sub bareword: subroutine declaration\n\t        // (implied BACK_KEYWORD, no keywords end in 'sub'!)\n\t\tresult |= 1;\n\t}\n\t// next, scan forward after word past tab/spaces only;\n\t// if ch isn't one of '[{(,' we can skip the test\n\tif ((ch == '{' || ch == '(' || ch == '['|| ch == ',')\n\t        && fw < endPos) {\n\t\twhile (IsASpaceOrTab(ch = static_cast<unsigned char>(styler.SafeGetCharAt(fw)))\n\t\t        && fw < endPos) {\n\t\t\tfw++;\n\t\t}\n\t\tif ((ch == '}' && brace)\n\t\t        // {bareword}: variable spec\n\t\t        || styler.Match(fw, \"=>\")) {\n\t\t        // [{(, bareword=>: hash literal\n\t\t\tresult |= 2;\n\t\t}\n\t}\n\treturn result;\n}\n\nvoid skipWhitespaceComment(LexAccessor &styler, Sci_PositionU &p) {\n\t// when backtracking, we need to skip whitespace and comments\n\twhile (p > 0) {\n\t\tconst int style = styler.StyleAt(p);\n\t\tif (style != SCE_PL_DEFAULT && style != SCE_PL_COMMENTLINE)\n\t\t\tbreak;\n\t\tp--;\n\t}\n}\n\nint findPrevLexeme(LexAccessor &styler, Sci_PositionU &bk, int &style) {\n\t// scan backward past whitespace and comments to find a lexeme\n\tskipWhitespaceComment(styler, bk);\n\tif (bk == 0)\n\t\treturn 0;\n\tint sz = 1;\n\tstyle = styler.StyleAt(bk);\n\twhile (bk > 0) {\t// find extent of lexeme\n\t\tif (styler.StyleAt(bk - 1) == style) {\n\t\t\tbk--; sz++;\n\t\t} else\n\t\t\tbreak;\n\t}\n\treturn sz;\n}\n\nint styleBeforeBracePair(LexAccessor &styler, Sci_PositionU bk) {\n\t// backtrack to find open '{' corresponding to a '}', balanced\n\t// return significant style to be tested for '/' disambiguation\n\tint braceCount = 1;\n\tif (bk == 0)\n\t\treturn SCE_PL_DEFAULT;\n\twhile (--bk > 0) {\n\t\tif (styler.StyleAt(bk) == SCE_PL_OPERATOR) {\n\t\t\tint bkch = static_cast<unsigned char>(styler.SafeGetCharAt(bk));\n\t\t\tif (bkch == ';') {\t// early out\n\t\t\t\tbreak;\n\t\t\t} else if (bkch == '}') {\n\t\t\t\tbraceCount++;\n\t\t\t} else if (bkch == '{') {\n\t\t\t\tif (--braceCount == 0) break;\n\t\t\t}\n\t\t}\n\t}\n\tif (bk > 0 && braceCount == 0) {\n\t\t// balanced { found, bk > 0, skip more whitespace/comments\n\t\tbk--;\n\t\tskipWhitespaceComment(styler, bk);\n\t\treturn styler.StyleAt(bk);\n\t}\n\treturn SCE_PL_DEFAULT;\n}\n\nint styleCheckIdentifier(LexAccessor &styler, Sci_PositionU bk) {\n\t// backtrack to classify sub-styles of identifier under test\n\t// return sub-style to be tested for '/' disambiguation\n\tif (styler.SafeGetCharAt(bk) == '>')\t// inputsymbol, like <foo>\n\t\treturn 1;\n\t// backtrack to check for possible \"->\" or \"::\" before identifier\n\twhile (bk > 0 && styler.StyleAt(bk) == SCE_PL_IDENTIFIER) {\n\t\tbk--;\n\t}\n\twhile (bk > 0) {\n\t\tint bkstyle = styler.StyleAt(bk);\n\t\tif (bkstyle == SCE_PL_DEFAULT\n\t\t        || bkstyle == SCE_PL_COMMENTLINE) {\n\t\t\t// skip whitespace, comments\n\t\t} else if (bkstyle == SCE_PL_OPERATOR) {\n\t\t\t// test for \"->\" and \"::\"\n\t\t\tif (styler.Match(bk - 1, \"->\") || styler.Match(bk - 1, \"::\"))\n\t\t\t\treturn 2;\n\t\t} else\n\t\t\treturn 3;\t// bare identifier\n\t\tbk--;\n\t}\n\treturn 0;\n}\n\nint podLineScan(LexAccessor &styler, Sci_PositionU &pos, Sci_PositionU endPos) {\n\t// forward scan the current line to classify line for POD style\n\tint state = -1;\n\twhile (pos < endPos) {\n\t\tint ch = static_cast<unsigned char>(styler.SafeGetCharAt(pos));\n\t\tif (ch == '\\n' || ch == '\\r') {\n\t\t\tif (ch == '\\r' && styler.SafeGetCharAt(pos + 1) == '\\n') pos++;\n\t\t\tbreak;\n\t\t}\n\t\tif (IsASpaceOrTab(ch)) {\t// whitespace, take note\n\t\t\tif (state == -1)\n\t\t\t\tstate = SCE_PL_DEFAULT;\n\t\t} else if (state == SCE_PL_DEFAULT) {\t// verbatim POD line\n\t\t\tstate = SCE_PL_POD_VERB;\n\t\t} else if (state != SCE_PL_POD_VERB) {\t// regular POD line\n\t\t\tstate = SCE_PL_POD;\n\t\t}\n\t\tpos++;\n\t}\n\tif (state == -1)\n\t\tstate = SCE_PL_DEFAULT;\n\treturn state;\n}\n\nbool styleCheckSubPrototype(LexAccessor &styler, Sci_PositionU bk) {\n\t// backtrack to identify if we're starting a subroutine prototype\n\t// we also need to ignore whitespace/comments, format is like:\n\t//     sub abc::pqr :const :prototype(...)\n\t// lexemes are tested in pairs, e.g. '::'+'pqr', ':'+'const', etc.\n\t// and a state machine generates legal subroutine syntax matches\n\tstyler.Flush();\n\tint state = SUB_BEGIN;\n\tdo {\n\t\t// find two lexemes, lexeme 2 follows lexeme 1\n\t\tint style2 = SCE_PL_DEFAULT;\n\t\tSci_PositionU pos2 = bk;\n\t\tint len2 = findPrevLexeme(styler, pos2, style2);\n\t\tint style1 = SCE_PL_DEFAULT;\n\t\tSci_PositionU pos1 = pos2;\n\t\tif (pos1 > 0) pos1--;\n\t\tint len1 = findPrevLexeme(styler, pos1, style1);\n\t\tif (len1 == 0 || len2 == 0)\t\t// lexeme pair must exist\n\t\t\tbreak;\n\n\t\t// match parts of syntax, if invalid subroutine syntax, break off\n\t\tif (style1 == SCE_PL_OPERATOR && len1 == 1 &&\n\t\t    styler.SafeGetCharAt(pos1) == ':') {\t// ':'\n\t\t\tif (style2 == SCE_PL_IDENTIFIER || style2 == SCE_PL_WORD) {\n\t\t\t\tif (len2 == 9 && styler.Match(pos2, \"prototype\")) {\t// ':' 'prototype'\n\t\t\t\t\tif (state == SUB_BEGIN) {\n\t\t\t\t\t\tstate = SUB_HAS_PROTO;\n\t\t\t\t\t} else\n\t\t\t\t\t\tbreak;\n\t\t\t\t} else {\t// ':' <attribute>\n\t\t\t\t\tif (state == SUB_HAS_PROTO || state == SUB_HAS_ATTRIB) {\n\t\t\t\t\t\tstate = SUB_HAS_ATTRIB;\n\t\t\t\t\t} else\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else\n\t\t\t\tbreak;\n\t\t} else if (style1 == SCE_PL_OPERATOR && len1 == 2 &&\n\t\t           styler.Match(pos1, \"::\")) {\t// '::'\n\t\t\tif (style2 == SCE_PL_IDENTIFIER) {\t// '::' <identifier>\n\t\t\t\tstate = SUB_HAS_MODULE;\n\t\t\t} else\n\t\t\t\tbreak;\n\t\t} else if (style1 == SCE_PL_WORD && len1 == 3 &&\n\t\t           styler.Match(pos1, \"sub\")) {\t// 'sub'\n\t\t\tif (style2 == SCE_PL_IDENTIFIER) {\t// 'sub' <identifier>\n\t\t\t\tstate = SUB_HAS_SUB;\n\t\t\t} else\n\t\t\t\tbreak;\n\t\t} else\n\t\t\tbreak;\n\t\tbk = pos1;\t\t\t// set position for finding next lexeme pair\n\t\tif (bk > 0) bk--;\n\t} while (state != SUB_HAS_SUB);\n\treturn (state == SUB_HAS_SUB);\n}\n\nint actualNumStyle(int numberStyle) {\n\tif (numberStyle == PERLNUM_VECTOR || numberStyle == PERLNUM_V_VECTOR) {\n\t\treturn SCE_PL_STRING;\n\t} else if (numberStyle == PERLNUM_BAD) {\n\t\treturn SCE_PL_ERROR;\n\t}\n\treturn SCE_PL_NUMBER;\n}\n\nint opposite(int ch) {\n\tif (ch == '(') return ')';\n\tif (ch == '[') return ']';\n\tif (ch == '{') return '}';\n\tif (ch == '<') return '>';\n\treturn ch;\n}\n\nbool IsCommentLine(Sci_Position line, LexAccessor &styler) {\n\tSci_Position pos = styler.LineStart(line);\n\tSci_Position eol_pos = styler.LineStart(line + 1) - 1;\n\tfor (Sci_Position i = pos; i < eol_pos; i++) {\n\t\tchar ch = styler[i];\n\t\tint style = styler.StyleAt(i);\n\t\tif (ch == '#' && style == SCE_PL_COMMENTLINE)\n\t\t\treturn true;\n\t\telse if (!IsASpaceOrTab(ch))\n\t\t\treturn false;\n\t}\n\treturn false;\n}\n\nbool IsPackageLine(Sci_Position line, LexAccessor &styler) {\n\tSci_Position pos = styler.LineStart(line);\n\tint style = styler.StyleAt(pos);\n\tif (style == SCE_PL_WORD && styler.Match(pos, \"package\")) {\n\t\treturn true;\n\t}\n\treturn false;\n}\n\nint PodHeadingLevel(Sci_Position pos, LexAccessor &styler) {\n\tint lvl = static_cast<unsigned char>(styler.SafeGetCharAt(pos + 5));\n\tif (lvl >= '1' && lvl <= '4') {\n\t\treturn lvl - '0';\n\t}\n\treturn 0;\n}\n\n// An individual named option for use in an OptionSet\n\n// Options used for LexerPerl\nstruct OptionsPerl {\n\tbool fold;\n\tbool foldComment;\n\tbool foldCompact;\n\t// Custom folding of POD and packages\n\tbool foldPOD;            // fold.perl.pod\n\t// Enable folding Pod blocks when using the Perl lexer.\n\tbool foldPackage;        // fold.perl.package\n\t// Enable folding packages when using the Perl lexer.\n\n\tbool foldCommentExplicit;\n\n\tbool foldAtElse;\n\n\tOptionsPerl() {\n\t\tfold = false;\n\t\tfoldComment = false;\n\t\tfoldCompact = true;\n\t\tfoldPOD = true;\n\t\tfoldPackage = true;\n\t\tfoldCommentExplicit = true;\n\t\tfoldAtElse = false;\n\t}\n};\n\nconst char *const perlWordListDesc[] = {\n\t\"Keywords\",\n\t0\n};\n\nstruct OptionSetPerl : public OptionSet<OptionsPerl> {\n\tOptionSetPerl() {\n\t\tDefineProperty(\"fold\", &OptionsPerl::fold);\n\n\t\tDefineProperty(\"fold.comment\", &OptionsPerl::foldComment);\n\n\t\tDefineProperty(\"fold.compact\", &OptionsPerl::foldCompact);\n\n\t\tDefineProperty(\"fold.perl.pod\", &OptionsPerl::foldPOD,\n\t\t        \"Set to 0 to disable folding Pod blocks when using the Perl lexer.\");\n\n\t\tDefineProperty(\"fold.perl.package\", &OptionsPerl::foldPackage,\n\t\t        \"Set to 0 to disable folding packages when using the Perl lexer.\");\n\n\t\tDefineProperty(\"fold.perl.comment.explicit\", &OptionsPerl::foldCommentExplicit,\n\t\t        \"Set to 0 to disable explicit folding.\");\n\n\t\tDefineProperty(\"fold.perl.at.else\", &OptionsPerl::foldAtElse,\n\t\t               \"This option enables Perl folding on a \\\"} else {\\\" line of an if statement.\");\n\n\t\tDefineWordListSets(perlWordListDesc);\n\t}\n};\n\nconst LexicalClass lexicalClasses[] = {\n\t// Lexer perl SCLEX_PERL SCE_PL_:\n\t0, \"SCE_PL_DEFAULT\", \"default\", \"white space\",\n\t1, \"SCE_PL_ERROR\", \"error\", \"error\",\n\t2, \"SCE_PL_COMMENTLINE\", \"comment line\", \"comment\",\n\t3, \"SCE_PL_POD\", \"data\", \"pod: = at beginning of line\",\n\t4, \"SCE_PL_NUMBER\", \"literal numeric\", \"number\",\n\t5, \"SCE_PL_WORD\", \"keyword\", \"keyword\",\n\t6, \"SCE_PL_STRING\", \"literal string interpolated\", \"double quoted string\",\n\t7, \"SCE_PL_CHARACTER\", \"literal string\", \"single quoted string\",\n\t8, \"SCE_PL_PUNCTUATION\", \"operator\", \"symbols / punctuation. currently not used\",\n\t9, \"SCE_PL_PREPROCESSOR\", \"preprocessor unused\", \"preprocessor. currently not used\",\n\t10, \"SCE_PL_OPERATOR\", \"operator\", \"operators\",\n\t11, \"SCE_PL_IDENTIFIER\", \"identifier\", \"identifiers (functions, etc.)\",\n\t12, \"SCE_PL_SCALAR\", \"identifier\", \"scalars: $var\",\n\t13, \"SCE_PL_ARRAY\", \"identifier\", \"array: @var\",\n\t14, \"SCE_PL_HASH\", \"identifier\", \"hash: %var\",\n\t15, \"SCE_PL_SYMBOLTABLE\", \"identifier\", \"symbol table: *var\",\n\t16, \"SCE_PL_VARIABLE_INDEXER\", \"identifier unused\", \"sce_pl_variable_indexer allocated but unused\",\n\t17, \"SCE_PL_REGEX\", \"literal regex\", \"regex: /re/ or m{re}\",\n\t18, \"SCE_PL_REGSUBST\", \"literal regex\", \"substitution: s/re/ore/\",\n\t19, \"SCE_PL_LONGQUOTE\", \"literal string\", \"long quote (qq, qr, qw, qx) -- obsolete: replaced by qq, qx, qr, qw\",\n\t20, \"SCE_PL_BACKTICKS\", \"literal string interpolated\", \"back ticks\",\n\t21, \"SCE_PL_DATASECTION\", \"data\", \"data section: __data__ or __end__ at beginning of line\",\n\t22, \"SCE_PL_HERE_DELIM\", \"here-doc literal string\", \"here-doc (delimiter)\",\n\t23, \"SCE_PL_HERE_Q\", \"here-doc literal string\", \"here-doc (single quoted, q)\",\n\t24, \"SCE_PL_HERE_QQ\", \"here-doc literal string interpolated\", \"here-doc (double quoted, qq)\",\n\t25, \"SCE_PL_HERE_QX\", \"here-doc literal interpolated\", \"here-doc (back ticks, qx)\",\n\t26, \"SCE_PL_STRING_Q\", \"literal string\", \"single quoted string, generic\",\n\t27, \"SCE_PL_STRING_QQ\", \"literal string interpolated\", \"qq = double quoted string\",\n\t28, \"SCE_PL_STRING_QX\", \"literal string interpolated\", \"qx = back ticks\",\n\t29, \"SCE_PL_STRING_QR\", \"literal regex\", \"qr = regex\",\n\t30, \"SCE_PL_STRING_QW\", \"literal string interpolated\", \"qw = array\",\n\t31, \"SCE_PL_POD_VERB\", \"data\", \"pod: verbatim paragraphs\",\n\t40, \"SCE_PL_SUB_PROTOTYPE\", \"identifier\", \"subroutine prototype\",\n\t41, \"SCE_PL_FORMAT_IDENT\", \"identifier\", \"format identifier\",\n\t42, \"SCE_PL_FORMAT\", \"literal string\", \"format body\",\n\t43, \"SCE_PL_STRING_VAR\", \"identifier interpolated\", \"double quoted string (interpolated variable)\",\n\t44, \"SCE_PL_XLAT\", \"literal string\", \"translation: tr{}{} y{}{}\",\n\t54, \"SCE_PL_REGEX_VAR\", \"identifier interpolated\", \"regex: /re/ or m{re} (interpolated variable)\",\n\t55, \"SCE_PL_REGSUBST_VAR\", \"identifier interpolated\", \"substitution: s/re/ore/ (interpolated variable)\",\n\t57, \"SCE_PL_BACKTICKS_VAR\", \"identifier interpolated\", \"back ticks (interpolated variable)\",\n\t61, \"SCE_PL_HERE_QQ_VAR\", \"identifier interpolated\", \"here-doc (double quoted, qq) (interpolated variable)\",\n\t62, \"SCE_PL_HERE_QX_VAR\", \"identifier interpolated\", \"here-doc (back ticks, qx) (interpolated variable)\",\n\t64, \"SCE_PL_STRING_QQ_VAR\", \"identifier interpolated\", \"qq = double quoted string (interpolated variable)\",\n\t65, \"SCE_PL_STRING_QX_VAR\", \"identifier interpolated\", \"qx = back ticks (interpolated variable)\",\n\t66, \"SCE_PL_STRING_QR_VAR\", \"identifier interpolated\", \"qr = regex (interpolated variable)\",\n};\n\nclass LexerPerl : public DefaultLexer {\n\tCharacterSet setWordStart;\n\tCharacterSet setWord;\n\tCharacterSet setSpecialVar;\n\tCharacterSet setControlVar;\n\tWordList keywords;\n\tOptionsPerl options;\n\tOptionSetPerl osPerl;\npublic:\n\tLexerPerl() :\n\t\tDefaultLexer(\"perl\", SCLEX_PERL, lexicalClasses, std::size(lexicalClasses)),\n\t\tsetWordStart(CharacterSet::setAlpha, \"_\", 0x80, true),\n\t\tsetWord(CharacterSet::setAlphaNum, \"_\", 0x80, true),\n\t\tsetSpecialVar(CharacterSet::setNone, \"\\\"$;<>&`'+,./\\\\%:=~!?@[]\"),\n\t\tsetControlVar(CharacterSet::setNone, \"ACDEFHILMNOPRSTVWX\") {\n\t}\n\tvirtual ~LexerPerl() {\n\t}\n\tvoid SCI_METHOD Release() override {\n\t\tdelete this;\n\t}\n\tint SCI_METHOD Version() const override {\n\t\treturn lvRelease5;\n\t}\n\tconst char *SCI_METHOD PropertyNames() override {\n\t\treturn osPerl.PropertyNames();\n\t}\n\tint SCI_METHOD PropertyType(const char *name) override {\n\t\treturn osPerl.PropertyType(name);\n\t}\n\tconst char *SCI_METHOD DescribeProperty(const char *name) override {\n\t\treturn osPerl.DescribeProperty(name);\n\t}\n\tSci_Position SCI_METHOD PropertySet(const char *key, const char *val) override;\n\tconst char * SCI_METHOD PropertyGet(const char *key) override {\n\t\treturn osPerl.PropertyGet(key);\n\t}\n\tconst char *SCI_METHOD DescribeWordListSets() override {\n\t\treturn osPerl.DescribeWordListSets();\n\t}\n\tSci_Position SCI_METHOD WordListSet(int n, const char *wl) override;\n\tvoid SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;\n\tvoid SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;\n\n\tvoid *SCI_METHOD PrivateCall(int, void *) override {\n\t\treturn 0;\n\t}\n\n\tstatic ILexer5 *LexerFactoryPerl() {\n\t\treturn new LexerPerl();\n\t}\n\tint InputSymbolScan(StyleContext &sc);\n\tvoid InterpolateSegment(StyleContext &sc, int maxSeg, bool isPattern=false);\n};\n\nSci_Position SCI_METHOD LexerPerl::PropertySet(const char *key, const char *val) {\n\tif (osPerl.PropertySet(&options, key, val)) {\n\t\treturn 0;\n\t}\n\treturn -1;\n}\n\nSci_Position SCI_METHOD LexerPerl::WordListSet(int n, const char *wl) {\n\tWordList *wordListN = 0;\n\tswitch (n) {\n\tcase 0:\n\t\twordListN = &keywords;\n\t\tbreak;\n\t}\n\tSci_Position firstModification = -1;\n\tif (wordListN) {\n\t\tif (wordListN->Set(wl)) {\n\t\t\tfirstModification = 0;\n\t\t}\n\t}\n\treturn firstModification;\n}\n\nint LexerPerl::InputSymbolScan(StyleContext &sc) {\n\t// forward scan for matching > on same line; file handles\n\tint c, sLen = 0;\n\twhile ((c = sc.GetRelativeCharacter(++sLen)) != 0) {\n\t\tif (c == '\\r' || c == '\\n') {\n\t\t\treturn 0;\n\t\t} else if (c == '>') {\n\t\t\tif (sc.Match(\"<=>\"))\t// '<=>' case\n\t\t\t\treturn 0;\n\t\t\treturn sLen;\n\t\t}\n\t}\n\treturn 0;\n}\n\nvoid LexerPerl::InterpolateSegment(StyleContext &sc, int maxSeg, bool isPattern) {\n\t// interpolate a segment (with no active backslashes or delimiters within)\n\t// switch in or out of an interpolation style or continue current style\n\t// commit variable patterns if found, trim segment, repeat until done\n\twhile (maxSeg > 0) {\n\t\tbool isVar = false;\n\t\tint sLen = 0;\n\t\tif ((maxSeg > 1) && (sc.ch == '$' || sc.ch == '@')) {\n\t\t\t// $#[$]*word [$@][$]*word (where word or {word} is always present)\n\t\t\tbool braces = false;\n\t\t\tsLen = 1;\n\t\t\tif (sc.ch == '$' && sc.chNext == '#') {\t// starts with $#\n\t\t\t\tsLen++;\n\t\t\t}\n\t\t\twhile ((maxSeg > sLen) && (sc.GetRelativeCharacter(sLen) == '$'))\t// >0 $ dereference within\n\t\t\t\tsLen++;\n\t\t\tif ((maxSeg > sLen) && (sc.GetRelativeCharacter(sLen) == '{')) {\t// { start for {word}\n\t\t\t\tsLen++;\n\t\t\t\tbraces = true;\n\t\t\t}\n\t\t\tif (maxSeg > sLen) {\n\t\t\t\tint c = sc.GetRelativeCharacter(sLen);\n\t\t\t\tif (setWordStart.Contains(c)) {\t// word (various)\n\t\t\t\t\tsLen++;\n\t\t\t\t\tisVar = true;\n\t\t\t\t\twhile (maxSeg > sLen) {\n\t\t\t\t\t\tif (!setWord.Contains(sc.GetRelativeCharacter(sLen)))\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tsLen++;\n\t\t\t\t\t}\n\t\t\t\t} else if (braces && IsADigit(c) && (sLen == 2)) {\t// digit for ${digit}\n\t\t\t\t\tsLen++;\n\t\t\t\t\tisVar = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (braces) {\n\t\t\t\tif ((maxSeg > sLen) && (sc.GetRelativeCharacter(sLen) == '}')) {\t// } end for {word}\n\t\t\t\t\tsLen++;\n\t\t\t\t} else\n\t\t\t\t\tisVar = false;\n\t\t\t}\n\t\t}\n\t\tif (!isVar && (maxSeg > 1)) {\t// $- or @-specific variable patterns\n\t\t\tint c = sc.chNext;\n\t\t\tif (sc.ch == '$') {\n\t\t\t\tsLen = 1;\n\t\t\t\tif (IsADigit(c)) {\t// $[0-9] and slurp trailing digits\n\t\t\t\t\tsLen++;\n\t\t\t\t\tisVar = true;\n\t\t\t\t\twhile ((maxSeg > sLen) && IsADigit(sc.GetRelativeCharacter(sLen)))\n\t\t\t\t\t\tsLen++;\n\t\t\t\t} else if (setSpecialVar.Contains(c)) {\t// $ special variables\n\t\t\t\t\tsLen++;\n\t\t\t\t\tisVar = true;\n\t\t\t\t} else if (!isPattern && ((c == '(') || (c == ')') || (c == '|'))) {\t// $ additional\n\t\t\t\t\tsLen++;\n\t\t\t\t\tisVar = true;\n\t\t\t\t} else if (c == '^') {\t// $^A control-char style\n\t\t\t\t\tsLen++;\n\t\t\t\t\tif ((maxSeg > sLen) && setControlVar.Contains(sc.GetRelativeCharacter(sLen))) {\n\t\t\t\t\t\tsLen++;\n\t\t\t\t\t\tisVar = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (sc.ch == '@') {\n\t\t\t\tsLen = 1;\n\t\t\t\tif (!isPattern && ((c == '+') || (c == '-'))) {\t// @ specials non-pattern\n\t\t\t\t\tsLen++;\n\t\t\t\t\tisVar = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isVar) {\t// commit as interpolated variable or normal character\n\t\t\tif (sc.state < SCE_PL_STRING_VAR)\n\t\t\t\tsc.SetState(sc.state + INTERPOLATE_SHIFT);\n\t\t\tsc.Forward(sLen);\n\t\t\tmaxSeg -= sLen;\n\t\t} else {\n\t\t\tif (sc.state >= SCE_PL_STRING_VAR)\n\t\t\t\tsc.SetState(sc.state - INTERPOLATE_SHIFT);\n\t\t\tsc.Forward();\n\t\t\tmaxSeg--;\n\t\t}\n\t}\n\tif (sc.state >= SCE_PL_STRING_VAR)\n\t\tsc.SetState(sc.state - INTERPOLATE_SHIFT);\n}\n\nvoid SCI_METHOD LexerPerl::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) {\n\tLexAccessor styler(pAccess);\n\n\t// keywords that forces /PATTERN/ at all times; should track vim's behaviour\n\tWordList reWords;\n\treWords.Set(\"elsif if split while\");\n\n\t// charset classes\n\tCharacterSet setSingleCharOp(CharacterSet::setNone, \"rwxoRWXOezsfdlpSbctugkTBMAC\");\n\t// lexing of \"%*</\" operators is non-trivial; these are missing in the set below\n\tCharacterSet setPerlOperator(CharacterSet::setNone, \"^&\\\\()-+=|{}[]:;>,?!.~\");\n\tCharacterSet setQDelim(CharacterSet::setNone, \"qrwx\");\n\tCharacterSet setModifiers(CharacterSet::setAlpha);\n\tCharacterSet setPreferRE(CharacterSet::setNone, \"*/<%\");\n\t// setArray and setHash also accepts chars for special vars like $_,\n\t// which are then truncated when the next char does not match setVar\n\tCharacterSet setVar(CharacterSet::setAlphaNum, \"#$_'\", 0x80, true);\n\tCharacterSet setArray(CharacterSet::setAlpha, \"#$_+-\", 0x80, true);\n\tCharacterSet setHash(CharacterSet::setAlpha, \"#$_!^+-\", 0x80, true);\n\tCharacterSet &setPOD = setModifiers;\n\tCharacterSet setNonHereDoc(CharacterSet::setDigits, \"=$@\");\n\tCharacterSet setHereDocDelim(CharacterSet::setAlphaNum, \"_\");\n\tCharacterSet setSubPrototype(CharacterSet::setNone, \"\\\\[$@%&*+];_ \\t\");\n\tCharacterSet setRepetition(CharacterSet::setDigits, \")\\\"'\");\n\t// for format identifiers\n\tCharacterSet setFormatStart(CharacterSet::setAlpha, \"_=\");\n\tCharacterSet &setFormat = setHereDocDelim;\n\n\t// Lexer for perl often has to backtrack to start of current style to determine\n\t// which characters are being used as quotes, how deeply nested is the\n\t// start position and what the termination string is for HERE documents.\n\n\tclass HereDocCls {\t// Class to manage HERE doc sequence\n\tpublic:\n\t\tint State;\n\t\t// 0: '<<' encountered\n\t\t// 1: collect the delimiter\n\t\t// 2: here doc text (lines after the delimiter)\n\t\tint Quote;\t\t// the char after '<<'\n\t\tbool Quoted;\t\t// true if Quote in ('\\'','\"','`')\n\t\tbool StripIndent;\t// true if '<<~' requested to strip leading whitespace\n\t\tint DelimiterLength;\t// strlen(Delimiter)\n\t\tchar Delimiter[HERE_DELIM_MAX];\t// the Delimiter\n\t\tHereDocCls() {\n\t\t\tState = 0;\n\t\t\tQuote = 0;\n\t\t\tQuoted = false;\n\t\t\tStripIndent = false;\n\t\t\tDelimiterLength = 0;\n\t\t\tDelimiter[0] = '\\0';\n\t\t}\n\t\tvoid Append(int ch) {\n\t\t\tDelimiter[DelimiterLength++] = static_cast<char>(ch);\n\t\t\tDelimiter[DelimiterLength] = '\\0';\n\t\t}\n\t\t~HereDocCls() {\n\t\t}\n\t};\n\tHereDocCls HereDoc;\t\t// TODO: FIFO for stacked here-docs\n\n\tclass QuoteCls {\t// Class to manage quote pairs\n\tpublic:\n\t\tint Rep;\n\t\tint Count;\n\t\tint Up, Down;\n\t\tQuoteCls() {\n\t\t\tNew(1);\n\t\t}\n\t\tvoid New(int r = 1) {\n\t\t\tRep   = r;\n\t\t\tCount = 0;\n\t\t\tUp    = '\\0';\n\t\t\tDown  = '\\0';\n\t\t}\n\t\tvoid Open(int u) {\n\t\t\tCount++;\n\t\t\tUp    = u;\n\t\t\tDown  = opposite(Up);\n\t\t}\n\t};\n\tQuoteCls Quote;\n\n\t// additional state for number lexing\n\tint numState = PERLNUM_DECIMAL;\n\tint dotCount = 0;\n\n\tSci_PositionU endPos = startPos + length;\n\n\t// Backtrack to beginning of style if required...\n\t// If in a long distance lexical state, backtrack to find quote characters.\n\t// Includes strings (may be multi-line), numbers (additional state), format\n\t// bodies, as well as POD sections.\n\tif (initStyle == SCE_PL_HERE_Q\n\t    || initStyle == SCE_PL_HERE_QQ\n\t    || initStyle == SCE_PL_HERE_QX\n\t    || initStyle == SCE_PL_FORMAT\n\t    || initStyle == SCE_PL_HERE_QQ_VAR\n\t    || initStyle == SCE_PL_HERE_QX_VAR\n\t   ) {\n\t\t// backtrack through multiple styles to reach the delimiter start\n\t\tint delim = (initStyle == SCE_PL_FORMAT) ? SCE_PL_FORMAT_IDENT:SCE_PL_HERE_DELIM;\n\t\twhile ((startPos > 1) && (styler.StyleAt(startPos) != delim)) {\n\t\t\tstartPos--;\n\t\t}\n\t\tstartPos = styler.LineStart(styler.GetLine(startPos));\n\t\tinitStyle = styler.StyleAt(startPos - 1);\n\t}\n\tif (initStyle == SCE_PL_STRING\n\t    || initStyle == SCE_PL_STRING_QQ\n\t    || initStyle == SCE_PL_BACKTICKS\n\t    || initStyle == SCE_PL_STRING_QX\n\t    || initStyle == SCE_PL_REGEX\n\t    || initStyle == SCE_PL_STRING_QR\n\t    || initStyle == SCE_PL_REGSUBST\n\t    || initStyle == SCE_PL_STRING_VAR\n\t    || initStyle == SCE_PL_STRING_QQ_VAR\n\t    || initStyle == SCE_PL_BACKTICKS_VAR\n\t    || initStyle == SCE_PL_STRING_QX_VAR\n\t    || initStyle == SCE_PL_REGEX_VAR\n\t    || initStyle == SCE_PL_STRING_QR_VAR\n\t    || initStyle == SCE_PL_REGSUBST_VAR\n\t   ) {\n\t\t// for interpolation, must backtrack through a mix of two different styles\n\t\tint otherStyle = (initStyle >= SCE_PL_STRING_VAR) ?\n\t\t\tinitStyle - INTERPOLATE_SHIFT : initStyle + INTERPOLATE_SHIFT;\n\t\twhile (startPos > 1) {\n\t\t\tint st = styler.StyleAt(startPos - 1);\n\t\t\tif ((st != initStyle) && (st != otherStyle))\n\t\t\t\tbreak;\n\t\t\tstartPos--;\n\t\t}\n\t\tinitStyle = SCE_PL_DEFAULT;\n\t} else if (initStyle == SCE_PL_STRING_Q\n\t        || initStyle == SCE_PL_STRING_QW\n\t        || initStyle == SCE_PL_XLAT\n\t        || initStyle == SCE_PL_CHARACTER\n\t        || initStyle == SCE_PL_NUMBER\n\t        || initStyle == SCE_PL_IDENTIFIER\n\t        || initStyle == SCE_PL_ERROR\n\t        || initStyle == SCE_PL_SUB_PROTOTYPE\n\t   ) {\n\t\twhile ((startPos > 1) && (styler.StyleAt(startPos - 1) == initStyle)) {\n\t\t\tstartPos--;\n\t\t}\n\t\tinitStyle = SCE_PL_DEFAULT;\n\t} else if (initStyle == SCE_PL_POD\n\t        || initStyle == SCE_PL_POD_VERB\n\t          ) {\n\t\t// POD backtracking finds preceding blank lines and goes back past them\n\t\tSci_Position ln = styler.GetLine(startPos);\n\t\tif (ln > 0) {\n\t\t\tinitStyle = styler.StyleAt(styler.LineStart(--ln));\n\t\t\tif (initStyle == SCE_PL_POD || initStyle == SCE_PL_POD_VERB) {\n\t\t\t\twhile (ln > 0 && styler.GetLineState(ln) == SCE_PL_DEFAULT)\n\t\t\t\t\tln--;\n\t\t\t}\n\t\t\tstartPos = styler.LineStart(++ln);\n\t\t\tinitStyle = styler.StyleAt(startPos - 1);\n\t\t} else {\n\t\t\tstartPos = 0;\n\t\t\tinitStyle = SCE_PL_DEFAULT;\n\t\t}\n\t}\n\n\t// backFlag, backPos are additional state to aid identifier corner cases.\n\t// Look backwards past whitespace and comments in order to detect either\n\t// operator or keyword. Later updated as we go along.\n\tint backFlag = BACK_NONE;\n\tSci_PositionU backPos = startPos;\n\tif (backPos > 0) {\n\t\tbackPos--;\n\t\tskipWhitespaceComment(styler, backPos);\n\t\tif (styler.StyleAt(backPos) == SCE_PL_OPERATOR)\n\t\t\tbackFlag = BACK_OPERATOR;\n\t\telse if (styler.StyleAt(backPos) == SCE_PL_WORD)\n\t\t\tbackFlag = BACK_KEYWORD;\n\t\tbackPos++;\n\t}\n\n\tStyleContext sc(startPos, endPos - startPos, initStyle, styler);\n\n\tfor (; sc.More(); sc.Forward()) {\n\n\t\t// Determine if the current state should terminate.\n\t\tswitch (sc.state) {\n\t\tcase SCE_PL_OPERATOR:\n\t\t\tsc.SetState(SCE_PL_DEFAULT);\n\t\t\tbackFlag = BACK_OPERATOR;\n\t\t\tbackPos = sc.currentPos;\n\t\t\tbreak;\n\t\tcase SCE_PL_IDENTIFIER:\t\t// identifier, bareword, inputsymbol\n\t\t\tif ((!setWord.Contains(sc.ch) && sc.ch != '\\'')\n\t\t\t        || sc.Match('.', '.')\n\t\t\t        || sc.chPrev == '>') {\t// end of inputsymbol\n\t\t\t\tsc.SetState(SCE_PL_DEFAULT);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_PL_WORD:\t\t// keyword, plus special cases\n\t\t\tif (!setWord.Contains(sc.ch)) {\n\t\t\t\tchar s[100];\n\t\t\t\tsc.GetCurrent(s, sizeof(s));\n\t\t\t\tif ((strcmp(s, \"__DATA__\") == 0) || (strcmp(s, \"__END__\") == 0)) {\n\t\t\t\t\tsc.ChangeState(SCE_PL_DATASECTION);\n\t\t\t\t} else {\n\t\t\t\t\tif ((strcmp(s, \"format\") == 0)) {\n\t\t\t\t\t\tsc.SetState(SCE_PL_FORMAT_IDENT);\n\t\t\t\t\t\tHereDoc.State = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsc.SetState(SCE_PL_DEFAULT);\n\t\t\t\t\t}\n\t\t\t\t\tbackFlag = BACK_KEYWORD;\n\t\t\t\t\tbackPos = sc.currentPos;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_PL_SCALAR:\n\t\tcase SCE_PL_ARRAY:\n\t\tcase SCE_PL_HASH:\n\t\tcase SCE_PL_SYMBOLTABLE:\n\t\t\tif (sc.Match(':', ':')) {\t// skip ::\n\t\t\t\tsc.Forward();\n\t\t\t} else if (!setVar.Contains(sc.ch)) {\n\t\t\t\tif (sc.LengthCurrent() == 1) {\n\t\t\t\t\t// Special variable: $(, $_ etc.\n\t\t\t\t\tsc.Forward();\n\t\t\t\t}\n\t\t\t\tsc.SetState(SCE_PL_DEFAULT);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_PL_NUMBER:\n\t\t\t// if no early break, number style is terminated at \"(go through)\"\n\t\t\tif (sc.ch == '.') {\n\t\t\t\tif (sc.chNext == '.') {\n\t\t\t\t\t// double dot is always an operator (go through)\n\t\t\t\t} else if (numState <= PERLNUM_FLOAT_EXP) {\n\t\t\t\t\t// non-decimal number or float exponent, consume next dot\n\t\t\t\t\tsc.SetState(SCE_PL_OPERATOR);\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\t// decimal or vectors allows dots\n\t\t\t\t\tdotCount++;\n\t\t\t\t\tif (numState == PERLNUM_DECIMAL) {\n\t\t\t\t\t\tif (dotCount <= 1)\t// number with one dot in it\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tif (IsADigit(sc.chNext)) {\t// really a vector\n\t\t\t\t\t\t\tnumState = PERLNUM_VECTOR;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// number then dot (go through)\n\t\t\t\t\t} else if (numState == PERLNUM_HEX) {\n\t\t\t\t\t\tif (dotCount <= 1 && IsADigit(sc.chNext, 16)) {\n\t\t\t\t\t\t\tbreak;\t// hex with one dot is a hex float\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsc.SetState(SCE_PL_OPERATOR);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// hex then dot (go through)\n\t\t\t\t\t} else if (IsADigit(sc.chNext))\t// vectors\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t// vector then dot (go through)\n\t\t\t\t}\n\t\t\t} else if (sc.ch == '_') {\n\t\t\t\t// permissive underscoring for number and vector literals\n\t\t\t\tbreak;\n\t\t\t} else if (numState == PERLNUM_DECIMAL) {\n\t\t\t\tif (sc.ch == 'E' || sc.ch == 'e') {\t// exponent, sign\n\t\t\t\t\tnumState = PERLNUM_FLOAT_EXP;\n\t\t\t\t\tif (sc.chNext == '+' || sc.chNext == '-') {\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t} else if (IsADigit(sc.ch))\n\t\t\t\t\tbreak;\n\t\t\t\t// number then word (go through)\n\t\t\t} else if (numState == PERLNUM_HEX) {\n\t\t\t\tif (sc.ch == 'P' || sc.ch == 'p') {\t// hex float exponent, sign\n\t\t\t\t\tnumState = PERLNUM_FLOAT_EXP;\n\t\t\t\t\tif (sc.chNext == '+' || sc.chNext == '-') {\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t} else if (IsADigit(sc.ch, 16))\n\t\t\t\t\tbreak;\n\t\t\t\t// hex or hex float then word (go through)\n\t\t\t} else if (numState == PERLNUM_VECTOR || numState == PERLNUM_V_VECTOR) {\n\t\t\t\tif (IsADigit(sc.ch))\t// vector\n\t\t\t\t\tbreak;\n\t\t\t\tif (setWord.Contains(sc.ch) && dotCount == 0) {\t// change to word\n\t\t\t\t\tsc.ChangeState(SCE_PL_IDENTIFIER);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t// vector then word (go through)\n\t\t\t} else if (IsADigit(sc.ch)) {\n\t\t\t\tif (numState == PERLNUM_FLOAT_EXP) {\n\t\t\t\t\tbreak;\n\t\t\t\t} else if (numState == PERLNUM_OCTAL) {\n\t\t\t\t\tif (sc.ch <= '7') break;\n\t\t\t\t} else if (numState == PERLNUM_BINARY) {\n\t\t\t\t\tif (sc.ch <= '1') break;\n\t\t\t\t}\n\t\t\t\t// mark invalid octal, binary numbers (go through)\n\t\t\t\tnumState = PERLNUM_BAD;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// complete current number or vector\n\t\t\tsc.ChangeState(actualNumStyle(numState));\n\t\t\tsc.SetState(SCE_PL_DEFAULT);\n\t\t\tbreak;\n\t\tcase SCE_PL_COMMENTLINE:\n\t\t\tif (sc.atLineStart) {\n\t\t\t\tsc.SetState(SCE_PL_DEFAULT);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_PL_HERE_DELIM:\n\t\t\tif (HereDoc.State == 0) { // '<<' encountered\n\t\t\t\tint delim_ch = sc.chNext;\n\t\t\t\tSci_Position ws_skip = 0;\n\t\t\t\tHereDoc.State = 1;\t// pre-init HERE doc class\n\t\t\t\tHereDoc.Quote = sc.chNext;\n\t\t\t\tHereDoc.Quoted = false;\n\t\t\t\tHereDoc.StripIndent = false;\n\t\t\t\tHereDoc.DelimiterLength = 0;\n\t\t\t\tHereDoc.Delimiter[HereDoc.DelimiterLength] = '\\0';\n\t\t\t\tif (delim_ch == '~') { // was actually '<<~'\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\tHereDoc.StripIndent = true;\n\t\t\t\t\tHereDoc.Quote = delim_ch = sc.chNext;\n\t\t\t\t}\n\t\t\t\tif (IsASpaceOrTab(delim_ch)) {\n\t\t\t\t\t// skip whitespace; legal only for quoted delimiters\n\t\t\t\t\tSci_PositionU i = sc.currentPos + 1;\n\t\t\t\t\twhile ((i < endPos) && IsASpaceOrTab(delim_ch)) {\n\t\t\t\t\t\ti++;\n\t\t\t\t\t\tdelim_ch = static_cast<unsigned char>(styler.SafeGetCharAt(i));\n\t\t\t\t\t}\n\t\t\t\t\tws_skip = i - sc.currentPos - 1;\n\t\t\t\t}\n\t\t\t\tif (delim_ch == '\\'' || delim_ch == '\"' || delim_ch == '`') {\n\t\t\t\t\t// a quoted here-doc delimiter; skip any whitespace\n\t\t\t\t\tsc.Forward(ws_skip + 1);\n\t\t\t\t\tHereDoc.Quote = delim_ch;\n\t\t\t\t\tHereDoc.Quoted = true;\n\t\t\t\t} else if ((ws_skip == 0 && setNonHereDoc.Contains(sc.chNext))\n\t\t\t\t        || ws_skip > 0) {\n\t\t\t\t\t// left shift << or <<= operator cases\n\t\t\t\t\t// restore position if operator\n\t\t\t\t\tsc.ChangeState(SCE_PL_OPERATOR);\n\t\t\t\t\tsc.ForwardSetState(SCE_PL_DEFAULT);\n\t\t\t\t\tbackFlag = BACK_OPERATOR;\n\t\t\t\t\tbackPos = sc.currentPos;\n\t\t\t\t\tHereDoc.State = 0;\n\t\t\t\t} else {\n\t\t\t\t\t// specially handle initial '\\' for identifier\n\t\t\t\t\tif (ws_skip == 0 && HereDoc.Quote == '\\\\')\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t// an unquoted here-doc delimiter, no special handling\n\t\t\t\t\t// (cannot be prefixed by spaces/tabs), or\n\t\t\t\t\t// symbols terminates; deprecated zero-length delimiter\n\t\t\t\t}\n\t\t\t} else if (HereDoc.State == 1) { // collect the delimiter\n\t\t\t\tbackFlag = BACK_NONE;\n\t\t\t\tif (HereDoc.Quoted) { // a quoted here-doc delimiter\n\t\t\t\t\tif (sc.ch == HereDoc.Quote) { // closing quote => end of delimiter\n\t\t\t\t\t\tsc.ForwardSetState(SCE_PL_DEFAULT);\n\t\t\t\t\t} else if (!sc.atLineEnd) {\n\t\t\t\t\t\tif (sc.Match('\\\\', static_cast<char>(HereDoc.Quote))) { // escaped quote\n\t\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (sc.ch != '\\r') {\t// skip CR if CRLF\n\t\t\t\t\t\t\tint i = 0;\t\t\t// else append char, possibly an extended char\n\t\t\t\t\t\t\twhile (i < sc.width) {\n\t\t\t\t\t\t\t\tHereDoc.Append(static_cast<unsigned char>(styler.SafeGetCharAt(sc.currentPos + i)));\n\t\t\t\t\t\t\t\ti++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else { // an unquoted here-doc delimiter, no extended charsets\n\t\t\t\t\tif (setHereDocDelim.Contains(sc.ch)) {\n\t\t\t\t\t\tHereDoc.Append(sc.ch);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsc.SetState(SCE_PL_DEFAULT);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (HereDoc.DelimiterLength >= HERE_DELIM_MAX - 1) {\n\t\t\t\t\tsc.SetState(SCE_PL_ERROR);\n\t\t\t\t\tHereDoc.State = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_PL_HERE_Q:\n\t\tcase SCE_PL_HERE_QQ:\n\t\tcase SCE_PL_HERE_QX:\n\t\t\t// also implies HereDoc.State == 2\n\t\t\tsc.Complete();\n\t\t\tif (HereDoc.StripIndent) {\n\t\t\t\t// skip whitespace\n\t\t\t\twhile (IsASpaceOrTab(sc.ch) && !sc.atLineEnd)\n\t\t\t\t\tsc.Forward();\n\t\t\t}\n\t\t\tif (HereDoc.DelimiterLength == 0 || sc.Match(HereDoc.Delimiter)) {\n\t\t\t\tint c = sc.GetRelative(HereDoc.DelimiterLength);\n\t\t\t\tif (c == '\\r' || c == '\\n') {\t// peek first, do not consume match\n\t\t\t\t\tsc.ForwardBytes(HereDoc.DelimiterLength);\n\t\t\t\t\tsc.SetState(SCE_PL_DEFAULT);\n\t\t\t\t\tbackFlag = BACK_NONE;\n\t\t\t\t\tHereDoc.State = 0;\n\t\t\t\t\tif (!sc.atLineEnd)\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (sc.state == SCE_PL_HERE_Q) {\t// \\EOF and 'EOF' non-interpolated\n\t\t\t\twhile (!sc.atLineEnd)\n\t\t\t\t\tsc.Forward();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\twhile (!sc.atLineEnd) {\t\t// \"EOF\" and `EOF` interpolated\n\t\t\t\tint c, sLen = 0, endType = 0;\n\t\t\t\twhile ((c = sc.GetRelativeCharacter(sLen)) != 0) {\n\t\t\t\t\t// scan to break string into segments\n\t\t\t\t\tif (c == '\\\\') {\n\t\t\t\t\t\tendType = 1; break;\n\t\t\t\t\t} else if (c == '\\r' || c == '\\n') {\n\t\t\t\t\t\tendType = 2; break;\n\t\t\t\t\t}\n\t\t\t\t\tsLen++;\n\t\t\t\t}\n\t\t\t\tif (sLen > 0)\t// process non-empty segments\n\t\t\t\t\tInterpolateSegment(sc, sLen);\n\t\t\t\tif (endType == 1) {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\t// \\ at end-of-line does not appear to have any effect, skip\n\t\t\t\t\tif (sc.ch != '\\r' && sc.ch != '\\n')\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t} else if (endType == 2) {\n\t\t\t\t\tif (!sc.atLineEnd)\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_PL_POD:\n\t\tcase SCE_PL_POD_VERB: {\n\t\t\t\tSci_PositionU fw = sc.currentPos;\n\t\t\t\tSci_Position ln = styler.GetLine(fw);\n\t\t\t\tif (sc.atLineStart && sc.Match(\"=cut\")) {\t// end of POD\n\t\t\t\t\tsc.SetState(SCE_PL_POD);\n\t\t\t\t\tsc.Forward(4);\n\t\t\t\t\tsc.SetState(SCE_PL_DEFAULT);\n\t\t\t\t\tstyler.SetLineState(ln, SCE_PL_POD);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tint pod = podLineScan(styler, fw, endPos);\t// classify POD line\n\t\t\t\tstyler.SetLineState(ln, pod);\n\t\t\t\tif (pod == SCE_PL_DEFAULT) {\n\t\t\t\t\tif (sc.state == SCE_PL_POD_VERB) {\n\t\t\t\t\t\tSci_PositionU fw2 = fw;\n\t\t\t\t\t\twhile (fw2 < (endPos - 1) && pod == SCE_PL_DEFAULT) {\n\t\t\t\t\t\t\tfw = fw2++;\t// penultimate line (last blank line)\n\t\t\t\t\t\t\tpod = podLineScan(styler, fw2, endPos);\n\t\t\t\t\t\t\tstyler.SetLineState(styler.GetLine(fw2), pod);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (pod == SCE_PL_POD) {\t// truncate verbatim POD early\n\t\t\t\t\t\t\tsc.SetState(SCE_PL_POD);\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\tfw = fw2;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (pod == SCE_PL_POD_VERB\t// still part of current paragraph\n\t\t\t\t\t        && (styler.GetLineState(ln - 1) == SCE_PL_POD)) {\n\t\t\t\t\t\tpod = SCE_PL_POD;\n\t\t\t\t\t\tstyler.SetLineState(ln, pod);\n\t\t\t\t\t} else if (pod == SCE_PL_POD\n\t\t\t\t\t        && (styler.GetLineState(ln - 1) == SCE_PL_POD_VERB)) {\n\t\t\t\t\t\tpod = SCE_PL_POD_VERB;\n\t\t\t\t\t\tstyler.SetLineState(ln, pod);\n\t\t\t\t\t}\n\t\t\t\t\tsc.SetState(pod);\n\t\t\t\t}\n\t\t\t\tsc.ForwardBytes(fw - sc.currentPos);\t// commit style\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_PL_REGEX:\n\t\tcase SCE_PL_STRING_QR:\n\t\t\tif (Quote.Rep <= 0) {\n\t\t\t\tif (!setModifiers.Contains(sc.ch))\n\t\t\t\t\tsc.SetState(SCE_PL_DEFAULT);\n\t\t\t} else if (!Quote.Up && !IsASpace(sc.ch)) {\n\t\t\t\tQuote.Open(sc.ch);\n\t\t\t} else {\n\t\t\t\tint c, sLen = 0, endType = 0;\n\t\t\t\twhile ((c = sc.GetRelativeCharacter(sLen)) != 0) {\n\t\t\t\t\t// scan to break string into segments\n\t\t\t\t\tif (IsASpace(c)) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else if (c == '\\\\' && Quote.Up != '\\\\') {\n\t\t\t\t\t\tendType = 1; break;\n\t\t\t\t\t} else if (c == Quote.Down) {\n\t\t\t\t\t\tQuote.Count--;\n\t\t\t\t\t\tif (Quote.Count == 0) {\n\t\t\t\t\t\t\tQuote.Rep--;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (c == Quote.Up)\n\t\t\t\t\t\tQuote.Count++;\n\t\t\t\t\tsLen++;\n\t\t\t\t}\n\t\t\t\tif (sLen > 0) {\t// process non-empty segments\n\t\t\t\t\tif (Quote.Up != '\\'') {\n\t\t\t\t\t\tInterpolateSegment(sc, sLen, true);\n\t\t\t\t\t} else\t\t// non-interpolated path\n\t\t\t\t\t\tsc.Forward(sLen);\n\t\t\t\t}\n\t\t\t\tif (endType == 1)\n\t\t\t\t\tsc.Forward();\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_PL_REGSUBST:\n\t\tcase SCE_PL_XLAT:\n\t\t\tif (Quote.Rep <= 0) {\n\t\t\t\tif (!setModifiers.Contains(sc.ch))\n\t\t\t\t\tsc.SetState(SCE_PL_DEFAULT);\n\t\t\t} else if (!Quote.Up && !IsASpace(sc.ch)) {\n\t\t\t\tQuote.Open(sc.ch);\n\t\t\t} else {\n\t\t\t\tint c, sLen = 0, endType = 0;\n\t\t\t\tbool isPattern = (Quote.Rep == 2);\n\t\t\t\twhile ((c = sc.GetRelativeCharacter(sLen)) != 0) {\n\t\t\t\t\t// scan to break string into segments\n\t\t\t\t\tif (c == '\\\\' && Quote.Up != '\\\\') {\n\t\t\t\t\t\tendType = 2; break;\n\t\t\t\t\t} else if (Quote.Count == 0 && Quote.Rep == 1) {\n\t\t\t\t\t\t// We matched something like s(...) or tr{...}, Perl 5.10\n\t\t\t\t\t\t// appears to allow almost any character for use as the\n\t\t\t\t\t\t// next delimiters. Whitespace and comments are accepted in\n\t\t\t\t\t\t// between, but we'll limit to whitespace here.\n\t\t\t\t\t\t// For '#', if no whitespace in between, it's a delimiter.\n\t\t\t\t\t\tif (IsASpace(c)) {\n\t\t\t\t\t\t\t// Keep going\n\t\t\t\t\t\t} else if (c == '#' && IsASpaceOrTab(sc.GetRelativeCharacter(sLen - 1))) {\n\t\t\t\t\t\t\tendType = 3;\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\tQuote.Open(c);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else if (c == Quote.Down) {\n\t\t\t\t\t\tQuote.Count--;\n\t\t\t\t\t\tif (Quote.Count == 0) {\n\t\t\t\t\t\t\tQuote.Rep--;\n\t\t\t\t\t\t\tendType = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (Quote.Up == Quote.Down)\n\t\t\t\t\t\t\tQuote.Count++;\n\t\t\t\t\t\tif (endType == 1)\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else if (c == Quote.Up) {\n\t\t\t\t\t\tQuote.Count++;\n\t\t\t\t\t} else if (IsASpace(c))\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tsLen++;\n\t\t\t\t}\n\t\t\t\tif (sLen > 0) {\t// process non-empty segments\n\t\t\t\t\tif (sc.state == SCE_PL_REGSUBST && Quote.Up != '\\'') {\n\t\t\t\t\t\tInterpolateSegment(sc, sLen, isPattern);\n\t\t\t\t\t} else\t\t// non-interpolated path\n\t\t\t\t\t\tsc.Forward(sLen);\n\t\t\t\t}\n\t\t\t\tif (endType == 2) {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t} else if (endType == 3)\n\t\t\t\t\tsc.SetState(SCE_PL_DEFAULT);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_PL_STRING_Q:\n\t\tcase SCE_PL_STRING_QQ:\n\t\tcase SCE_PL_STRING_QX:\n\t\tcase SCE_PL_STRING_QW:\n\t\tcase SCE_PL_STRING:\n\t\tcase SCE_PL_CHARACTER:\n\t\tcase SCE_PL_BACKTICKS:\n\t\t\tif (!Quote.Down && !IsASpace(sc.ch)) {\n\t\t\t\tQuote.Open(sc.ch);\n\t\t\t} else {\n\t\t\t\tint c, sLen = 0, endType = 0;\n\t\t\t\twhile ((c = sc.GetRelativeCharacter(sLen)) != 0) {\n\t\t\t\t\t// scan to break string into segments\n\t\t\t\t\tif (IsASpace(c)) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else if (c == '\\\\' && Quote.Up != '\\\\') {\n\t\t\t\t\t\tendType = 2; break;\n\t\t\t\t\t} else if (c == Quote.Down) {\n\t\t\t\t\t\tQuote.Count--;\n\t\t\t\t\t\tif (Quote.Count == 0) {\n\t\t\t\t\t\t\tendType = 3; break;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (c == Quote.Up)\n\t\t\t\t\t\tQuote.Count++;\n\t\t\t\t\tsLen++;\n\t\t\t\t}\n\t\t\t\tif (sLen > 0) {\t// process non-empty segments\n\t\t\t\t\tswitch (sc.state) {\n\t\t\t\t\tcase SCE_PL_STRING:\n\t\t\t\t\tcase SCE_PL_STRING_QQ:\n\t\t\t\t\tcase SCE_PL_BACKTICKS:\n\t\t\t\t\t\tInterpolateSegment(sc, sLen);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase SCE_PL_STRING_QX:\n\t\t\t\t\t\tif (Quote.Up != '\\'') {\n\t\t\t\t\t\t\tInterpolateSegment(sc, sLen);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// (continued for ' delim)\n\t\t\t\t\t\t// Falls through.\n\t\t\t\t\tdefault:\t// non-interpolated path\n\t\t\t\t\t\tsc.Forward(sLen);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (endType == 2) {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t} else if (endType == 3)\n\t\t\t\t\tsc.ForwardSetState(SCE_PL_DEFAULT);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_PL_SUB_PROTOTYPE: {\n\t\t\t\tint i = 0;\n\t\t\t\t// forward scan; must all be valid proto characters\n\t\t\t\twhile (setSubPrototype.Contains(sc.GetRelative(i)))\n\t\t\t\t\ti++;\n\t\t\t\tif (sc.GetRelative(i) == ')') {\t// valid sub prototype\n\t\t\t\t\tsc.ForwardBytes(i);\n\t\t\t\t\tsc.ForwardSetState(SCE_PL_DEFAULT);\n\t\t\t\t} else {\n\t\t\t\t\t// abandon prototype, restart from '('\n\t\t\t\t\tsc.ChangeState(SCE_PL_OPERATOR);\n\t\t\t\t\tsc.SetState(SCE_PL_DEFAULT);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_PL_FORMAT: {\n\t\t\t\tsc.Complete();\n\t\t\t\tif (sc.Match('.')) {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\tif (sc.atLineEnd || ((sc.ch == '\\r' && sc.chNext == '\\n')))\n\t\t\t\t\t\tsc.SetState(SCE_PL_DEFAULT);\n\t\t\t\t}\n\t\t\t\twhile (!sc.atLineEnd)\n\t\t\t\t\tsc.Forward();\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_PL_ERROR:\n\t\t\tbreak;\n\t\t}\n\t\t// Needed for specific continuation styles (one follows the other)\n\t\tswitch (sc.state) {\n\t\t\t// continued from SCE_PL_WORD\n\t\tcase SCE_PL_FORMAT_IDENT:\n\t\t\t// occupies HereDoc state 3 to avoid clashing with HERE docs\n\t\t\tif (IsASpaceOrTab(sc.ch)) {\t\t// skip whitespace\n\t\t\t\tsc.ChangeState(SCE_PL_DEFAULT);\n\t\t\t\twhile (IsASpaceOrTab(sc.ch) && !sc.atLineEnd)\n\t\t\t\t\tsc.Forward();\n\t\t\t\tsc.SetState(SCE_PL_FORMAT_IDENT);\n\t\t\t}\n\t\t\tif (setFormatStart.Contains(sc.ch)) {\t// identifier or '='\n\t\t\t\tif (sc.ch != '=') {\n\t\t\t\t\tdo {\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t} while (setFormat.Contains(sc.ch));\n\t\t\t\t}\n\t\t\t\twhile (IsASpaceOrTab(sc.ch) && !sc.atLineEnd)\n\t\t\t\t\tsc.Forward();\n\t\t\t\tif (sc.ch == '=') {\n\t\t\t\t\tsc.ForwardSetState(SCE_PL_DEFAULT);\n\t\t\t\t\tHereDoc.State = 3;\n\t\t\t\t} else {\n\t\t\t\t\t// invalid identifier; inexact fallback, but hey\n\t\t\t\t\tsc.ChangeState(SCE_PL_IDENTIFIER);\n\t\t\t\t\tsc.SetState(SCE_PL_DEFAULT);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tsc.ChangeState(SCE_PL_DEFAULT);\t// invalid identifier\n\t\t\t}\n\t\t\tbackFlag = BACK_NONE;\n\t\t\tbreak;\n\t\t}\n\n\t\t// Must check end of HereDoc states here before default state is handled\n\t\tif (HereDoc.State == 1 && sc.atLineEnd) {\n\t\t\t// Begin of here-doc (the line after the here-doc delimiter):\n\t\t\t// Lexically, the here-doc starts from the next line after the >>, but the\n\t\t\t// first line of here-doc seem to follow the style of the last EOL sequence\n\t\t\tint st_new = SCE_PL_HERE_QQ;\n\t\t\tHereDoc.State = 2;\n\t\t\tif (HereDoc.Quoted) {\n\t\t\t\tif (sc.state == SCE_PL_HERE_DELIM) {\n\t\t\t\t\t// Missing quote at end of string! We are stricter than perl.\n\t\t\t\t\t// Colour here-doc anyway while marking this bit as an error.\n\t\t\t\t\tsc.ChangeState(SCE_PL_ERROR);\n\t\t\t\t}\n\t\t\t\tswitch (HereDoc.Quote) {\n\t\t\t\tcase '\\'':\n\t\t\t\t\tst_new = SCE_PL_HERE_Q;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\"' :\n\t\t\t\t\tst_new = SCE_PL_HERE_QQ;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '`' :\n\t\t\t\t\tst_new = SCE_PL_HERE_QX;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (HereDoc.Quote == '\\\\')\n\t\t\t\t\tst_new = SCE_PL_HERE_Q;\n\t\t\t}\n\t\t\tsc.SetState(st_new);\n\t\t}\n\t\tif (HereDoc.State == 3 && sc.atLineEnd) {\n\t\t\t// Start of format body.\n\t\t\tHereDoc.State = 0;\n\t\t\tsc.SetState(SCE_PL_FORMAT);\n\t\t}\n\n\t\t// Determine if a new state should be entered.\n\t\tif (sc.state == SCE_PL_DEFAULT) {\n\t\t\tif (IsADigit(sc.ch) ||\n\t\t\t        (IsADigit(sc.chNext) && (sc.ch == '.' || sc.ch == 'v'))) {\n\t\t\t\tsc.SetState(SCE_PL_NUMBER);\n\t\t\t\tbackFlag = BACK_NONE;\n\t\t\t\tnumState = PERLNUM_DECIMAL;\n\t\t\t\tdotCount = 0;\n\t\t\t\tif (sc.ch == '0') {\t\t// hex,bin,octal\n\t\t\t\t\tif (sc.chNext == 'x' || sc.chNext == 'X') {\n\t\t\t\t\t\tnumState = PERLNUM_HEX;\n\t\t\t\t\t} else if (sc.chNext == 'b' || sc.chNext == 'B') {\n\t\t\t\t\t\tnumState = PERLNUM_BINARY;\n\t\t\t\t\t} else if (IsADigit(sc.chNext)) {\n\t\t\t\t\t\tnumState = PERLNUM_OCTAL;\n\t\t\t\t\t}\n\t\t\t\t\tif (numState != PERLNUM_DECIMAL) {\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t}\n\t\t\t\t} else if (sc.ch == 'v') {\t\t// vector\n\t\t\t\t\tnumState = PERLNUM_V_VECTOR;\n\t\t\t\t}\n\t\t\t} else if (setWord.Contains(sc.ch)) {\n\t\t\t\t// if immediately prefixed by '::', always a bareword\n\t\t\t\tsc.SetState(SCE_PL_WORD);\n\t\t\t\tif (sc.chPrev == ':' && sc.GetRelative(-2) == ':') {\n\t\t\t\t\tsc.ChangeState(SCE_PL_IDENTIFIER);\n\t\t\t\t}\n\t\t\t\tSci_PositionU bk = sc.currentPos;\n\t\t\t\tSci_PositionU fw = sc.currentPos + 1;\n\t\t\t\t// first check for possible quote-like delimiter\n\t\t\t\tif (sc.ch == 's' && !setWord.Contains(sc.chNext)) {\n\t\t\t\t\tsc.ChangeState(SCE_PL_REGSUBST);\n\t\t\t\t\tQuote.New(2);\n\t\t\t\t} else if (sc.ch == 'm' && !setWord.Contains(sc.chNext)) {\n\t\t\t\t\tsc.ChangeState(SCE_PL_REGEX);\n\t\t\t\t\tQuote.New();\n\t\t\t\t} else if (sc.ch == 'q' && !setWord.Contains(sc.chNext)) {\n\t\t\t\t\tsc.ChangeState(SCE_PL_STRING_Q);\n\t\t\t\t\tQuote.New();\n\t\t\t\t} else if (sc.ch == 'y' && !setWord.Contains(sc.chNext)) {\n\t\t\t\t\tsc.ChangeState(SCE_PL_XLAT);\n\t\t\t\t\tQuote.New(2);\n\t\t\t\t} else if (sc.Match('t', 'r') && !setWord.Contains(sc.GetRelative(2))) {\n\t\t\t\t\tsc.ChangeState(SCE_PL_XLAT);\n\t\t\t\t\tQuote.New(2);\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\tfw++;\n\t\t\t\t} else if (sc.ch == 'q' && setQDelim.Contains(sc.chNext)\n\t\t\t\t        && !setWord.Contains(sc.GetRelative(2))) {\n\t\t\t\t\tif (sc.chNext == 'q') sc.ChangeState(SCE_PL_STRING_QQ);\n\t\t\t\t\telse if (sc.chNext == 'x') sc.ChangeState(SCE_PL_STRING_QX);\n\t\t\t\t\telse if (sc.chNext == 'r') sc.ChangeState(SCE_PL_STRING_QR);\n\t\t\t\t\telse sc.ChangeState(SCE_PL_STRING_QW);\t// sc.chNext == 'w'\n\t\t\t\t\tQuote.New();\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\tfw++;\n\t\t\t\t} else if (sc.ch == 'x' && (sc.chNext == '=' ||\t// repetition\n\t\t\t\t        !setWord.Contains(sc.chNext) ||\n\t\t\t\t        (setRepetition.Contains(sc.chPrev) && IsADigit(sc.chNext)))) {\n\t\t\t\t\tsc.ChangeState(SCE_PL_OPERATOR);\n\t\t\t\t}\n\t\t\t\t// if potentially a keyword, scan forward and grab word, then check\n\t\t\t\t// if it's really one; if yes, disambiguation test is performed\n\t\t\t\t// otherwise it is always a bareword and we skip a lot of scanning\n\t\t\t\tif (sc.state == SCE_PL_WORD) {\n\t\t\t\t\twhile (setWord.Contains(static_cast<unsigned char>(styler.SafeGetCharAt(fw))))\n\t\t\t\t\t\tfw++;\n\t\t\t\t\tif (!isPerlKeyword(styler.GetStartSegment(), fw, keywords, styler)) {\n\t\t\t\t\t\tsc.ChangeState(SCE_PL_IDENTIFIER);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// if already SCE_PL_IDENTIFIER, then no ambiguity, skip this\n\t\t\t\t// for quote-like delimiters/keywords, attempt to disambiguate\n\t\t\t\t// to select for bareword, change state -> SCE_PL_IDENTIFIER\n\t\t\t\tif (sc.state != SCE_PL_IDENTIFIER && bk > 0) {\n\t\t\t\t\tif (disambiguateBareword(styler, bk, fw, backFlag, backPos, endPos))\n\t\t\t\t\t\tsc.ChangeState(SCE_PL_IDENTIFIER);\n\t\t\t\t}\n\t\t\t\tbackFlag = BACK_NONE;\n\t\t\t} else if (sc.ch == '#') {\n\t\t\t\tsc.SetState(SCE_PL_COMMENTLINE);\n\t\t\t} else if (sc.ch == '\\\"') {\n\t\t\t\tsc.SetState(SCE_PL_STRING);\n\t\t\t\tQuote.New();\n\t\t\t\tQuote.Open(sc.ch);\n\t\t\t\tbackFlag = BACK_NONE;\n\t\t\t} else if (sc.ch == '\\'') {\n\t\t\t\tif (sc.chPrev == '&' && setWordStart.Contains(sc.chNext)) {\n\t\t\t\t\t// Archaic call\n\t\t\t\t\tsc.SetState(SCE_PL_IDENTIFIER);\n\t\t\t\t} else {\n\t\t\t\t\tsc.SetState(SCE_PL_CHARACTER);\n\t\t\t\t\tQuote.New();\n\t\t\t\t\tQuote.Open(sc.ch);\n\t\t\t\t}\n\t\t\t\tbackFlag = BACK_NONE;\n\t\t\t} else if (sc.ch == '`') {\n\t\t\t\tsc.SetState(SCE_PL_BACKTICKS);\n\t\t\t\tQuote.New();\n\t\t\t\tQuote.Open(sc.ch);\n\t\t\t\tbackFlag = BACK_NONE;\n\t\t\t} else if (sc.ch == '$') {\n\t\t\t\tsc.SetState(SCE_PL_SCALAR);\n\t\t\t\tif (sc.chNext == '{') {\n\t\t\t\t\tsc.ForwardSetState(SCE_PL_OPERATOR);\n\t\t\t\t} else if (IsASpace(sc.chNext)) {\n\t\t\t\t\tsc.ForwardSetState(SCE_PL_DEFAULT);\n\t\t\t\t} else {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\tif (sc.Match('`', '`') || sc.Match(':', ':')) {\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbackFlag = BACK_NONE;\n\t\t\t} else if (sc.ch == '@') {\n\t\t\t\tsc.SetState(SCE_PL_ARRAY);\n\t\t\t\tif (setArray.Contains(sc.chNext)) {\n\t\t\t\t\t// no special treatment\n\t\t\t\t} else if (sc.chNext == ':' && sc.GetRelative(2) == ':') {\n\t\t\t\t\tsc.ForwardBytes(2);\n\t\t\t\t} else if (sc.chNext == '{' || sc.chNext == '[') {\n\t\t\t\t\tsc.ForwardSetState(SCE_PL_OPERATOR);\n\t\t\t\t} else {\n\t\t\t\t\tsc.ChangeState(SCE_PL_OPERATOR);\n\t\t\t\t}\n\t\t\t\tbackFlag = BACK_NONE;\n\t\t\t} else if (setPreferRE.Contains(sc.ch)) {\n\t\t\t\t// Explicit backward peeking to set a consistent preferRE for\n\t\t\t\t// any slash found, so no longer need to track preferRE state.\n\t\t\t\t// Find first previous significant lexed element and interpret.\n\t\t\t\t// A few symbols shares this code for disambiguation.\n\t\t\t\tbool preferRE = false;\n\t\t\t\tbool isHereDoc = sc.Match('<', '<');\n\t\t\t\tbool hereDocSpace = false;\t\t// for: SCALAR [whitespace] '<<'\n\t\t\t\tSci_PositionU bk = (sc.currentPos > 0) ? sc.currentPos - 1: 0;\n\t\t\t\tsc.Complete();\n\t\t\t\tstyler.Flush();\n\t\t\t\tif (styler.StyleAt(bk) == SCE_PL_DEFAULT)\n\t\t\t\t\thereDocSpace = true;\n\t\t\t\tskipWhitespaceComment(styler, bk);\n\t\t\t\tif (bk == 0) {\n\t\t\t\t\t// avoid backward scanning breakage\n\t\t\t\t\tpreferRE = true;\n\t\t\t\t} else {\n\t\t\t\t\tint bkstyle = styler.StyleAt(bk);\n\t\t\t\t\tint bkch = static_cast<unsigned char>(styler.SafeGetCharAt(bk));\n\t\t\t\t\tswitch (bkstyle) {\n\t\t\t\t\tcase SCE_PL_OPERATOR:\n\t\t\t\t\t\tpreferRE = true;\n\t\t\t\t\t\tif (bkch == ')' || bkch == ']') {\n\t\t\t\t\t\t\tpreferRE = false;\n\t\t\t\t\t\t} else if (bkch == '}') {\n\t\t\t\t\t\t\t// backtrack by counting balanced brace pairs\n\t\t\t\t\t\t\t// needed to test for variables like ${}, @{} etc.\n\t\t\t\t\t\t\tbkstyle = styleBeforeBracePair(styler, bk);\n\t\t\t\t\t\t\tif (bkstyle == SCE_PL_SCALAR\n\t\t\t\t\t\t\t        || bkstyle == SCE_PL_ARRAY\n\t\t\t\t\t\t\t        || bkstyle == SCE_PL_HASH\n\t\t\t\t\t\t\t        || bkstyle == SCE_PL_SYMBOLTABLE\n\t\t\t\t\t\t\t        || bkstyle == SCE_PL_OPERATOR) {\n\t\t\t\t\t\t\t\tpreferRE = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (bkch == '+' || bkch == '-') {\n\t\t\t\t\t\t\tif (bkch == static_cast<unsigned char>(styler.SafeGetCharAt(bk - 1))\n\t\t\t\t\t\t\t        && bkch != static_cast<unsigned char>(styler.SafeGetCharAt(bk - 2)))\n\t\t\t\t\t\t\t\t// exceptions for operators: unary suffixes ++, --\n\t\t\t\t\t\t\t\tpreferRE = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase SCE_PL_IDENTIFIER:\n\t\t\t\t\t\tpreferRE = true;\n\t\t\t\t\t\tbkstyle = styleCheckIdentifier(styler, bk);\n\t\t\t\t\t\tif ((bkstyle == 1) || (bkstyle == 2)) {\n\t\t\t\t\t\t\t// inputsymbol or var with \"->\" or \"::\" before identifier\n\t\t\t\t\t\t\tpreferRE = false;\n\t\t\t\t\t\t} else if (bkstyle == 3) {\n\t\t\t\t\t\t\t// bare identifier, test cases follows:\n\t\t\t\t\t\t\tif (sc.ch == '/') {\n\t\t\t\t\t\t\t\t// if '/', /PATTERN/ unless digit/space immediately after '/'\n\t\t\t\t\t\t\t\t// if '//', always expect defined-or operator to follow identifier\n\t\t\t\t\t\t\t\tif (IsASpace(sc.chNext) || IsADigit(sc.chNext) || sc.chNext == '/')\n\t\t\t\t\t\t\t\t\tpreferRE = false;\n\t\t\t\t\t\t\t} else if (sc.ch == '*' || sc.ch == '%') {\n\t\t\t\t\t\t\t\tif (IsASpace(sc.chNext) || IsADigit(sc.chNext) || sc.Match('*', '*'))\n\t\t\t\t\t\t\t\t\tpreferRE = false;\n\t\t\t\t\t\t\t} else if (sc.ch == '<') {\n\t\t\t\t\t\t\t\tif (IsASpace(sc.chNext) || sc.chNext == '=')\n\t\t\t\t\t\t\t\t\tpreferRE = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase SCE_PL_SCALAR:\t\t// for $var<< case:\n\t\t\t\t\t\tif (isHereDoc && hereDocSpace)\t// if SCALAR whitespace '<<', *always* a HERE doc\n\t\t\t\t\t\t\tpreferRE = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase SCE_PL_WORD:\n\t\t\t\t\t\tpreferRE = true;\n\t\t\t\t\t\t// for HERE docs, always true\n\t\t\t\t\t\tif (sc.ch == '/') {\n\t\t\t\t\t\t\t// adopt heuristics similar to vim-style rules:\n\t\t\t\t\t\t\t// keywords always forced as /PATTERN/: split, if, elsif, while\n\t\t\t\t\t\t\t// everything else /PATTERN/ unless digit/space immediately after '/'\n\t\t\t\t\t\t\t// for '//', defined-or favoured unless special keywords\n\t\t\t\t\t\t\tSci_PositionU bkend = bk + 1;\n\t\t\t\t\t\t\twhile (bk > 0 && styler.StyleAt(bk - 1) == SCE_PL_WORD) {\n\t\t\t\t\t\t\t\tbk--;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (isPerlKeyword(bk, bkend, reWords, styler))\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tif (IsASpace(sc.chNext) || IsADigit(sc.chNext) || sc.chNext == '/')\n\t\t\t\t\t\t\t\tpreferRE = false;\n\t\t\t\t\t\t} else if (sc.ch == '*' || sc.ch == '%') {\n\t\t\t\t\t\t\tif (IsASpace(sc.chNext) || IsADigit(sc.chNext) || sc.Match('*', '*'))\n\t\t\t\t\t\t\t\tpreferRE = false;\n\t\t\t\t\t\t} else if (sc.ch == '<') {\n\t\t\t\t\t\t\tif (IsASpace(sc.chNext) || sc.chNext == '=')\n\t\t\t\t\t\t\t\tpreferRE = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t// other styles uses the default, preferRE=false\n\t\t\t\t\tcase SCE_PL_POD:\n\t\t\t\t\tcase SCE_PL_HERE_Q:\n\t\t\t\t\tcase SCE_PL_HERE_QQ:\n\t\t\t\t\tcase SCE_PL_HERE_QX:\n\t\t\t\t\t\tpreferRE = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbackFlag = BACK_NONE;\n\t\t\t\tif (isHereDoc) {\t// handle '<<', HERE doc\n\t\t\t\t\tif (sc.Match(\"<<>>\")) {\t\t// double-diamond operator (5.22)\n\t\t\t\t\t\tsc.SetState(SCE_PL_OPERATOR);\n\t\t\t\t\t\tsc.Forward(3);\n\t\t\t\t\t} else if (preferRE) {\n\t\t\t\t\t\tsc.SetState(SCE_PL_HERE_DELIM);\n\t\t\t\t\t\tHereDoc.State = 0;\n\t\t\t\t\t} else {\t\t// << operator\n\t\t\t\t\t\tsc.SetState(SCE_PL_OPERATOR);\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t}\n\t\t\t\t} else if (sc.ch == '*') {\t// handle '*', typeglob\n\t\t\t\t\tif (preferRE) {\n\t\t\t\t\t\tsc.SetState(SCE_PL_SYMBOLTABLE);\n\t\t\t\t\t\tif (sc.chNext == ':' && sc.GetRelative(2) == ':') {\n\t\t\t\t\t\t\tsc.ForwardBytes(2);\n\t\t\t\t\t\t} else if (sc.chNext == '{') {\n\t\t\t\t\t\t\tsc.ForwardSetState(SCE_PL_OPERATOR);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsc.SetState(SCE_PL_OPERATOR);\n\t\t\t\t\t\tif (sc.chNext == '*') \t// exponentiation\n\t\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t}\n\t\t\t\t} else if (sc.ch == '%') {\t// handle '%', hash\n\t\t\t\t\tif (preferRE) {\n\t\t\t\t\t\tsc.SetState(SCE_PL_HASH);\n\t\t\t\t\t\tif (setHash.Contains(sc.chNext)) {\n\t\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t\t} else if (sc.chNext == ':' && sc.GetRelative(2) == ':') {\n\t\t\t\t\t\t\tsc.ForwardBytes(2);\n\t\t\t\t\t\t} else if (sc.chNext == '{') {\n\t\t\t\t\t\t\tsc.ForwardSetState(SCE_PL_OPERATOR);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsc.ChangeState(SCE_PL_OPERATOR);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsc.SetState(SCE_PL_OPERATOR);\n\t\t\t\t\t}\n\t\t\t\t} else if (sc.ch == '<') {\t// handle '<', inputsymbol\n\t\t\t\t\tif (preferRE) {\n\t\t\t\t\t\t// forward scan\n\t\t\t\t\t\tint i = InputSymbolScan(sc);\n\t\t\t\t\t\tif (i > 0) {\n\t\t\t\t\t\t\tsc.SetState(SCE_PL_IDENTIFIER);\n\t\t\t\t\t\t\tsc.Forward(i);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsc.SetState(SCE_PL_OPERATOR);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsc.SetState(SCE_PL_OPERATOR);\n\t\t\t\t\t}\n\t\t\t\t} else {\t\t\t// handle '/', regexp\n\t\t\t\t\tif (preferRE) {\n\t\t\t\t\t\tsc.SetState(SCE_PL_REGEX);\n\t\t\t\t\t\tQuote.New();\n\t\t\t\t\t\tQuote.Open(sc.ch);\n\t\t\t\t\t} else {\t\t// / and // operators\n\t\t\t\t\t\tsc.SetState(SCE_PL_OPERATOR);\n\t\t\t\t\t\tif (sc.chNext == '/') {\n\t\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (sc.ch == '='\t\t// POD\n\t\t\t        && setPOD.Contains(sc.chNext)\n\t\t\t        && sc.atLineStart) {\n\t\t\t\tsc.SetState(SCE_PL_POD);\n\t\t\t\tbackFlag = BACK_NONE;\n\t\t\t} else if (sc.ch == '-' && setWordStart.Contains(sc.chNext)) {\t// extended '-' cases\n\t\t\t\tSci_PositionU bk = sc.currentPos;\n\t\t\t\tSci_PositionU fw = 2;\n\t\t\t\tif (setSingleCharOp.Contains(sc.chNext) &&\t// file test operators\n\t\t\t\t        !setWord.Contains(sc.GetRelative(2))) {\n\t\t\t\t\tsc.SetState(SCE_PL_WORD);\n\t\t\t\t} else {\n\t\t\t\t\t// nominally a minus and bareword; find extent of bareword\n\t\t\t\t\twhile (setWord.Contains(sc.GetRelative(fw)))\n\t\t\t\t\t\tfw++;\n\t\t\t\t\tsc.SetState(SCE_PL_OPERATOR);\n\t\t\t\t}\n\t\t\t\t// force to bareword for hash key => or {variable literal} cases\n\t\t\t\tif (disambiguateBareword(styler, bk, bk + fw, backFlag, backPos, endPos) & 2) {\n\t\t\t\t\tsc.ChangeState(SCE_PL_IDENTIFIER);\n\t\t\t\t}\n\t\t\t\tbackFlag = BACK_NONE;\n\t\t\t} else if (sc.ch == '(' && sc.currentPos > 0) {\t// '(' or subroutine prototype\n\t\t\t\tsc.Complete();\n\t\t\t\tif (styleCheckSubPrototype(styler, sc.currentPos - 1)) {\n\t\t\t\t\tsc.SetState(SCE_PL_SUB_PROTOTYPE);\n\t\t\t\t\tbackFlag = BACK_NONE;\n\t\t\t\t} else {\n\t\t\t\t\tsc.SetState(SCE_PL_OPERATOR);\n\t\t\t\t}\n\t\t\t} else if (setPerlOperator.Contains(sc.ch)) {\t// operators\n\t\t\t\tsc.SetState(SCE_PL_OPERATOR);\n\t\t\t\tif (sc.Match('.', '.')) {\t// .. and ...\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\tif (sc.chNext == '.') sc.Forward();\n\t\t\t\t}\n\t\t\t} else if (sc.ch == 4 || sc.ch == 26) {\t\t// ^D and ^Z ends valid perl source\n\t\t\t\tsc.SetState(SCE_PL_DATASECTION);\n\t\t\t} else {\n\t\t\t\t// keep colouring defaults\n\t\t\t\tsc.Complete();\n\t\t\t}\n\t\t}\n\t}\n\tsc.Complete();\n\tif (sc.state == SCE_PL_HERE_Q\n\t        || sc.state == SCE_PL_HERE_QQ\n\t        || sc.state == SCE_PL_HERE_QX\n\t        || sc.state == SCE_PL_FORMAT) {\n\t\tstyler.ChangeLexerState(sc.currentPos, styler.Length());\n\t}\n\tsc.Complete();\n}\n\n#define PERL_HEADFOLD_SHIFT\t\t4\n#define PERL_HEADFOLD_MASK\t\t0xF0\n\nvoid SCI_METHOD LexerPerl::Fold(Sci_PositionU startPos, Sci_Position length, int /* initStyle */, IDocument *pAccess) {\n\n\tif (!options.fold)\n\t\treturn;\n\n\tLexAccessor styler(pAccess);\n\n\tSci_PositionU endPos = startPos + length;\n\tint visibleChars = 0;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\n\t// Backtrack to previous line in case need to fix its fold status\n\tif (startPos > 0) {\n\t\tif (lineCurrent > 0) {\n\t\t\tlineCurrent--;\n\t\t\tstartPos = styler.LineStart(lineCurrent);\n\t\t}\n\t}\n\n\tint levelPrev = SC_FOLDLEVELBASE;\n\tif (lineCurrent > 0)\n\t\tlevelPrev = styler.LevelAt(lineCurrent - 1) >> 16;\n\tint levelCurrent = levelPrev;\n\tchar chNext = styler[startPos];\n\tchar chPrev = styler.SafeGetCharAt(startPos - 1);\n\tint styleNext = styler.StyleAt(startPos);\n\t// Used at end of line to determine if the line was a package definition\n\tbool isPackageLine = false;\n\tint podHeading = 0;\n\tfor (Sci_PositionU i = startPos; i < endPos; i++) {\n\t\tchar ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\tint style = styleNext;\n\t\tstyleNext = styler.StyleAt(i + 1);\n\t\tint stylePrevCh = (i) ? styler.StyleAt(i - 1):SCE_PL_DEFAULT;\n\t\tbool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n\t\tbool atLineStart = ((chPrev == '\\r') || (chPrev == '\\n')) || i == 0;\n\t\t// Comment folding\n\t\tif (options.foldComment && atEOL && IsCommentLine(lineCurrent, styler)) {\n\t\t\tif (!IsCommentLine(lineCurrent - 1, styler)\n\t\t\t        && IsCommentLine(lineCurrent + 1, styler))\n\t\t\t\tlevelCurrent++;\n\t\t\telse if (IsCommentLine(lineCurrent - 1, styler)\n\t\t\t        && !IsCommentLine(lineCurrent + 1, styler))\n\t\t\t\tlevelCurrent--;\n\t\t}\n\t\t// {} [] block folding\n\t\tif (style == SCE_PL_OPERATOR) {\n\t\t\tif (ch == '{') {\n\t\t\t\tif (options.foldAtElse && levelCurrent < levelPrev)\n\t\t\t\t\t--levelPrev;\n\t\t\t\tlevelCurrent++;\n\t\t\t} else if (ch == '}') {\n\t\t\t\tlevelCurrent--;\n\t\t\t}\n\t\t\tif (ch == '[') {\n\t\t\t\tif (options.foldAtElse && levelCurrent < levelPrev)\n\t\t\t\t\t--levelPrev;\n\t\t\t\tlevelCurrent++;\n\t\t\t} else if (ch == ']') {\n\t\t\t\tlevelCurrent--;\n\t\t\t}\n\t\t} else if (style == SCE_PL_STRING_QW) {\n\t\t\t// qw\n\t\t\tif (stylePrevCh != style)\n\t\t\t\tlevelCurrent++;\n\t\t\telse if (styleNext != style)\n\t\t\t\tlevelCurrent--;\n\t\t}\n\t\t// POD folding\n\t\tif (options.foldPOD && atLineStart) {\n\t\t\tif (style == SCE_PL_POD) {\n\t\t\t\tif (stylePrevCh != SCE_PL_POD && stylePrevCh != SCE_PL_POD_VERB)\n\t\t\t\t\tlevelCurrent++;\n\t\t\t\telse if (styler.Match(i, \"=cut\"))\n\t\t\t\t\tlevelCurrent = (levelCurrent & ~PERL_HEADFOLD_MASK) - 1;\n\t\t\t\telse if (styler.Match(i, \"=head\"))\n\t\t\t\t\tpodHeading = PodHeadingLevel(i, styler);\n\t\t\t} else if (style == SCE_PL_DATASECTION) {\n\t\t\t\tif (ch == '=' && IsASCII(chNext) && isalpha(chNext) && levelCurrent == SC_FOLDLEVELBASE)\n\t\t\t\t\tlevelCurrent++;\n\t\t\t\telse if (styler.Match(i, \"=cut\") && levelCurrent > SC_FOLDLEVELBASE)\n\t\t\t\t\tlevelCurrent = (levelCurrent & ~PERL_HEADFOLD_MASK) - 1;\n\t\t\t\telse if (styler.Match(i, \"=head\"))\n\t\t\t\t\tpodHeading = PodHeadingLevel(i, styler);\n\t\t\t\t// if package used or unclosed brace, level > SC_FOLDLEVELBASE!\n\t\t\t\t// reset needed as level test is vs. SC_FOLDLEVELBASE\n\t\t\t\telse if (stylePrevCh != SCE_PL_DATASECTION)\n\t\t\t\t\tlevelCurrent = SC_FOLDLEVELBASE;\n\t\t\t}\n\t\t}\n\t\t// package folding\n\t\tif (options.foldPackage && atLineStart) {\n\t\t\tif (IsPackageLine(lineCurrent, styler)\n\t\t\t        && !IsPackageLine(lineCurrent + 1, styler))\n\t\t\t\tisPackageLine = true;\n\t\t}\n\n\t\t//heredoc folding\n\t\tswitch (style) {\n\t\tcase SCE_PL_HERE_QQ :\n\t\tcase SCE_PL_HERE_Q :\n\t\tcase SCE_PL_HERE_QX :\n\t\t\tswitch (stylePrevCh) {\n\t\t\tcase SCE_PL_HERE_QQ :\n\t\t\tcase SCE_PL_HERE_Q :\n\t\t\tcase SCE_PL_HERE_QX :\n\t\t\t\t//do nothing;\n\t\t\t\tbreak;\n\t\t\tdefault :\n\t\t\t\tlevelCurrent++;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tswitch (stylePrevCh) {\n\t\t\tcase SCE_PL_HERE_QQ :\n\t\t\tcase SCE_PL_HERE_Q :\n\t\t\tcase SCE_PL_HERE_QX :\n\t\t\t\tlevelCurrent--;\n\t\t\t\tbreak;\n\t\t\tdefault :\n\t\t\t\t//do nothing;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t\t//explicit folding\n\t\tif (options.foldCommentExplicit && style == SCE_PL_COMMENTLINE && ch == '#') {\n\t\t\tif (chNext == '{') {\n\t\t\t\tlevelCurrent++;\n\t\t\t} else if (levelCurrent > SC_FOLDLEVELBASE  && chNext == '}') {\n\t\t\t\tlevelCurrent--;\n\t\t\t}\n\t\t}\n\n\t\tif (atEOL) {\n\t\t\tint lev = levelPrev;\n\t\t\t// POD headings occupy bits 7-4, leaving some breathing room for\n\t\t\t// non-standard practice -- POD sections stuck in blocks, etc.\n\t\t\tif (podHeading > 0) {\n\t\t\t\tlevelCurrent = (lev & ~PERL_HEADFOLD_MASK) | (podHeading << PERL_HEADFOLD_SHIFT);\n\t\t\t\tlev = levelCurrent - 1;\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\t\tpodHeading = 0;\n\t\t\t}\n\t\t\t// Check if line was a package declaration\n\t\t\t// because packages need \"special\" treatment\n\t\t\tif (isPackageLine) {\n\t\t\t\tlev = SC_FOLDLEVELBASE | SC_FOLDLEVELHEADERFLAG;\n\t\t\t\tlevelCurrent = SC_FOLDLEVELBASE + 1;\n\t\t\t\tisPackageLine = false;\n\t\t\t}\n\t\t\tlev |= levelCurrent << 16;\n\t\t\tif (visibleChars == 0 && options.foldCompact)\n\t\t\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\t\t\tif ((levelCurrent > levelPrev) && (visibleChars > 0))\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\tif (lev != styler.LevelAt(lineCurrent)) {\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\t\t\t}\n\t\t\tlineCurrent++;\n\t\t\tlevelPrev = levelCurrent;\n\t\t\tvisibleChars = 0;\n\t\t}\n\t\tif (!isspacechar(ch))\n\t\t\tvisibleChars++;\n\t\tchPrev = ch;\n\t}\n\t// Fill in the real level of the next line, keeping the current flags as they will be filled in later\n\tint flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK;\n\tstyler.SetLevel(lineCurrent, levelPrev | flagsNext);\n}\n\n}\n\nLexerModule lmPerl(SCLEX_PERL, LexerPerl::LexerFactoryPerl, \"perl\", perlWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexPowerPro.cxx",
    "content": "// Scintilla source code edit control\n// @file LexPowerPro.cxx\n// PowerPro utility, written by Bruce Switzer, is available from http://powerpro.webeddie.com\n// PowerPro lexer is written by Christopher Bean (cbean@cb-software.net)\n//\n// Lexer code heavily borrowed from:\n//\tLexAU3.cxx by Jos van der Zande\n//\tLexCPP.cxx by Neil Hodgson\n//\tLexVB.cxx by Neil Hodgson\n//\n// Changes:\n// \t2008-10-25 - Initial release\n//\t2008-10-26 - Changed how <name> is hilighted in  'function <name>' so that\n//\t\t\t\t local isFunction = \"\" and local functions = \"\" don't get falsely highlighted\n//\t2008-12-14 - Added bounds checking for szFirstWord and szDo\n//\t\t\t   - Replaced SetOfCharacters with CharacterSet\n//\t\t\t   - Made sure that CharacterSet::Contains is passed only positive values\n//\t\t\t   - Made sure that the return value of Accessor::SafeGetCharAt is positive before\n//\t\t\t\t passing to functions that require positive values like isspacechar()\n//\t\t\t   - Removed unused visibleChars processing from ColourisePowerProDoc()\n//\t\t\t   - Fixed bug with folding logic where line continuations didn't end where\n//\t\t\t\t they were supposed to\n//\t\t\t   - Moved all helper functions to the top of the file\n//\t2010-06-03 - Added onlySpaces variable to allow the @function and ;comment styles to be indented\n//\t\t\t   - Modified HasFunction function to be a bit more robust\n//\t\t\t   - Renamed HasFunction function to IsFunction\n//\t\t\t   - Cleanup\n// Copyright 1998-2005 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <string.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nstatic inline bool IsStreamCommentStyle(int style) {\n\treturn style == SCE_POWERPRO_COMMENTBLOCK;\n}\n\nstatic inline bool IsLineEndChar(unsigned char ch) {\n\treturn \tch == 0x0a \t\t//LF\n\t\t\t|| ch == 0x0c\t//FF\n\t\t\t|| ch == 0x0d;\t//CR\n}\n\nstatic bool IsContinuationLine(Sci_PositionU szLine, Accessor &styler)\n{\n\tSci_Position startPos = styler.LineStart(szLine);\n\tSci_Position endPos = styler.LineStart(szLine + 1) - 2;\n\twhile (startPos < endPos)\n\t{\n\t\tchar stylech = styler.StyleAt(startPos);\n\t\tif (!(stylech == SCE_POWERPRO_COMMENTBLOCK)) {\n\t\t\tchar ch = styler.SafeGetCharAt(endPos);\n\t\t\tchar chPrev = styler.SafeGetCharAt(endPos - 1);\n\t\t\tchar chPrevPrev = styler.SafeGetCharAt(endPos - 2);\n\t\t\tif (ch > 0 && chPrev > 0 && chPrevPrev > 0 && !isspacechar(ch) && !isspacechar(chPrev) && !isspacechar(chPrevPrev) )\n\t\t\t\treturn (chPrevPrev == ';' && chPrev == ';' && ch == '+');\n\t\t\t}\n\t\tendPos--; // skip to next char\n\t}\n\treturn false;\n}\n\n// Routine to find first none space on the current line and return its Style\n// needed for comment lines not starting on pos 1\nstatic int GetStyleFirstWord(Sci_Position szLine, Accessor &styler)\n{\n\tSci_Position startPos = styler.LineStart(szLine);\n\tSci_Position endPos = styler.LineStart(szLine + 1) - 1;\n\tchar ch = styler.SafeGetCharAt(startPos);\n\n\twhile (ch > 0 && isspacechar(ch) && startPos < endPos)\n\t{\n\t\tstartPos++; // skip to next char\n\t\tch = styler.SafeGetCharAt(startPos);\n\t}\n\treturn styler.StyleAt(startPos);\n}\n\n//returns true if there is a function to highlight\n//used to highlight <name> in 'function <name>'\n//note:\n//\t\tsample line (without quotes): \"\\tfunction asdf()\n//\t\tcurrentPos will be the position of 'a'\nstatic bool IsFunction(Accessor &styler, Sci_PositionU currentPos) {\n\n\tconst char function[10] = \"function \"; //10 includes \\0\n\tunsigned int numberOfCharacters = sizeof(function) - 1;\n\tSci_PositionU position = currentPos - numberOfCharacters;\n\n\t//compare each character with the letters in the function array\n\t//return false if ALL don't match\n\tfor (Sci_PositionU i = 0; i < numberOfCharacters; i++) {\n\t\tchar c = styler.SafeGetCharAt(position++);\n\t\tif (c != function[i])\n\t\t\treturn false;\n\t}\n\n\t//make sure that there are only spaces (or tabs) between the beginning\n\t//of the line and the function declaration\n\tposition = currentPos - numberOfCharacters - 1; \t\t//-1 to move to char before 'function'\n\tfor (Sci_PositionU j = 0; j < 16; j++) {\t\t\t\t\t//check up to 16 preceeding characters\n\t\tchar c = styler.SafeGetCharAt(position--, '\\0');\t//if can't read char, return NUL (past beginning of document)\n\t\tif (c <= 0)\t//reached beginning of document\n\t\t\treturn true;\n\t\tif (c > 0 && IsLineEndChar(c))\n\t\t\treturn true;\n\t\telse if (c > 0 && !IsASpaceOrTab(c))\n\t\t\treturn false;\n\t}\n\n\t//fall-through\n\treturn false;\n}\n\nstatic void ColourisePowerProDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[],\n                            Accessor &styler, bool caseSensitive) {\n\n\tWordList &keywords  = *keywordlists[0];\n\tWordList &keywords2 = *keywordlists[1];\n\tWordList &keywords3 = *keywordlists[2];\n\tWordList &keywords4 = *keywordlists[3];\n\n\t//define the character sets\n\tCharacterSet setWordStart(CharacterSet::setAlpha, \"_@\", 0x80, true);\n\tCharacterSet setWord(CharacterSet::setAlphaNum, \"._\", 0x80, true);\n\n\tStyleContext sc(startPos, length, initStyle, styler);\n\tchar s_save[100]; //for last line highlighting\n\n\t//are there only spaces between the first letter of the line and the beginning of the line\n\tbool onlySpaces = true;\n\n\tfor (; sc.More(); sc.Forward()) {\n\n\t\t// save the total current word for eof processing\n\t\tchar s[100];\n\t\tsc.GetCurrentLowered(s, sizeof(s));\n\n\t\tif ((sc.ch > 0) && setWord.Contains(sc.ch))\n\t\t{\n\t\t\tstrcpy(s_save,s);\n\t\t\tint tp = static_cast<int>(strlen(s_save));\n\t\t\tif (tp < 99) {\n\t\t\t\ts_save[tp] = static_cast<char>(tolower(sc.ch));\n\t\t\t\ts_save[tp+1] = '\\0';\n\t\t\t}\n\t\t}\n\n\t\tif (sc.atLineStart) {\n\t\t\tif (sc.state == SCE_POWERPRO_DOUBLEQUOTEDSTRING) {\n\t\t\t\t// Prevent SCE_POWERPRO_STRINGEOL from leaking back to previous line which\n\t\t\t\t// ends with a line continuation by locking in the state upto this position.\n\t\t\t\tsc.SetState(SCE_POWERPRO_DOUBLEQUOTEDSTRING);\n\t\t\t}\n\t\t}\n\n\t\t// Determine if the current state should terminate.\n\t\tswitch (sc.state) {\n\t\t\tcase SCE_POWERPRO_OPERATOR:\n\t\t\t\tsc.SetState(SCE_POWERPRO_DEFAULT);\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_POWERPRO_NUMBER:\n\n\t\t\t\tif (!IsADigit(sc.ch))\n\t\t\t\t\tsc.SetState(SCE_POWERPRO_DEFAULT);\n\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_POWERPRO_IDENTIFIER:\n\t\t\t\t//if ((sc.ch > 0) && !setWord.Contains(sc.ch) || (sc.ch == '.')) { // use this line if don't want to match keywords with . in them. ie: win.debug will match both win and debug so win debug will also be colorized\n\t\t\t\tif ((sc.ch > 0) && !setWord.Contains(sc.ch)){  // || (sc.ch == '.')) { // use this line if you want to match keywords with a . ie: win.debug will only match win.debug neither win nor debug will be colorized separately\n\t\t\t\t\tchar s[1000];\n\t\t\t\t\tif (caseSensitive) {\n\t\t\t\t\t\tsc.GetCurrent(s, sizeof(s));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsc.GetCurrentLowered(s, sizeof(s));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (keywords.InList(s)) {\n\t\t\t\t\t\tsc.ChangeState(SCE_POWERPRO_WORD);\n\t\t\t\t\t} else if (keywords2.InList(s)) {\n\t\t\t\t\t\tsc.ChangeState(SCE_POWERPRO_WORD2);\n\t\t\t\t\t} else if (keywords3.InList(s)) {\n\t\t\t\t\t\tsc.ChangeState(SCE_POWERPRO_WORD3);\n\t\t\t\t\t} else if (keywords4.InList(s)) {\n\t\t\t\t\t\tsc.ChangeState(SCE_POWERPRO_WORD4);\n\t\t\t\t\t}\n\t\t\t\t\tsc.SetState(SCE_POWERPRO_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_POWERPRO_LINECONTINUE:\n\t\t\t\tif (sc.atLineStart) {\n\t\t\t\t\tsc.SetState(SCE_POWERPRO_DEFAULT);\n\t\t\t\t} else if (sc.Match('/', '*') || sc.Match('/', '/')) {\n\t\t\t\t\tsc.SetState(SCE_POWERPRO_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_POWERPRO_COMMENTBLOCK:\n\t\t\t\tif (sc.Match('*', '/')) {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\tsc.ForwardSetState(SCE_POWERPRO_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_POWERPRO_COMMENTLINE:\n\t\t\t\tif (sc.atLineStart) {\n\t\t\t\t\tsc.SetState(SCE_POWERPRO_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_POWERPRO_DOUBLEQUOTEDSTRING:\n\t\t\t\tif (sc.atLineEnd) {\n\t\t\t\t\tsc.ChangeState(SCE_POWERPRO_STRINGEOL);\n\t\t\t\t} else if (sc.ch == '\\\\') {\n\t\t\t\t\tif (sc.chNext == '\\\"' || sc.chNext == '\\'' || sc.chNext == '\\\\') {\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t}\n\t\t\t\t} else if (sc.ch == '\\\"') {\n\t\t\t\t\tsc.ForwardSetState(SCE_POWERPRO_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_POWERPRO_SINGLEQUOTEDSTRING:\n\t\t\t\tif (sc.atLineEnd) {\n\t\t\t\t\tsc.ChangeState(SCE_POWERPRO_STRINGEOL);\n\t\t\t\t} else if (sc.ch == '\\\\') {\n\t\t\t\t\tif (sc.chNext == '\\\"' || sc.chNext == '\\'' || sc.chNext == '\\\\') {\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t}\n\t\t\t\t} else if (sc.ch == '\\'') {\n\t\t\t\t\tsc.ForwardSetState(SCE_POWERPRO_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_POWERPRO_STRINGEOL:\n\t\t\t\tif (sc.atLineStart) {\n\t\t\t\t\tsc.SetState(SCE_POWERPRO_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_POWERPRO_VERBATIM:\n\t\t\t\tif (sc.ch == '\\\"') {\n\t\t\t\t\tif (sc.chNext == '\\\"') {\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsc.ForwardSetState(SCE_POWERPRO_DEFAULT);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_POWERPRO_ALTQUOTE:\n\t\t\t\tif (sc.ch == '#') {\n\t\t\t\t\tif (sc.chNext == '#') {\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsc.ForwardSetState(SCE_POWERPRO_DEFAULT);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase SCE_POWERPRO_FUNCTION:\n\t\t\t\tif (isspacechar(sc.ch) || sc.ch == '(') {\n\t\t\t\t\tsc.SetState(SCE_POWERPRO_DEFAULT);\n\t\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t\t// Determine if a new state should be entered.\n\t\tif (sc.state == SCE_POWERPRO_DEFAULT) {\n\t\t\tif (sc.Match('?', '\\\"')) {\n\t\t\t\tsc.SetState(SCE_POWERPRO_VERBATIM);\n\t\t\t\tsc.Forward();\n\t\t\t} else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) {\n\t\t\t\tsc.SetState(SCE_POWERPRO_NUMBER);\n\t\t\t}else if (sc.Match('?','#')) {\n\t\t\t\tif (sc.ch == '?' && sc.chNext == '#') {\n\t\t\t\t\tsc.SetState(SCE_POWERPRO_ALTQUOTE);\n\t\t\t\t\tsc.Forward();\n\t\t\t\t}\n\t\t\t} else if (IsFunction(styler, sc.currentPos)) {\t//highlight <name> in 'function <name>'\n\t\t\t\tsc.SetState(SCE_POWERPRO_FUNCTION);\n\t\t\t} else if (onlySpaces && sc.ch == '@') { \t\t//alternate function definition [label]\n\t\t\t\tsc.SetState(SCE_POWERPRO_FUNCTION);\n\t\t\t} else if ((sc.ch > 0) && (setWordStart.Contains(sc.ch) || (sc.ch == '?'))) {\n\t\t\t\tsc.SetState(SCE_POWERPRO_IDENTIFIER);\n\t\t\t} else if (sc.Match(\";;+\")) {\n\t\t\t\tsc.SetState(SCE_POWERPRO_LINECONTINUE);\n\t\t\t} else if (sc.Match('/', '*')) {\n\t\t\t\tsc.SetState(SCE_POWERPRO_COMMENTBLOCK);\n\t\t\t\tsc.Forward();\t// Eat the * so it isn't used for the end of the comment\n\t\t\t} else if (sc.Match('/', '/')) {\n\t\t\t\tsc.SetState(SCE_POWERPRO_COMMENTLINE);\n\t\t\t} else if (onlySpaces && sc.ch == ';') {\t\t//legacy comment that can only have blank space in front of it\n\t\t\t\tsc.SetState(SCE_POWERPRO_COMMENTLINE);\n\t\t\t} else if (sc.Match(\";;\")) {\n\t\t\t\tsc.SetState(SCE_POWERPRO_COMMENTLINE);\n\t\t\t} else if (sc.ch == '\\\"') {\n\t\t\t\tsc.SetState(SCE_POWERPRO_DOUBLEQUOTEDSTRING);\n\t\t\t} else if (sc.ch == '\\'') {\n\t\t\t\tsc.SetState(SCE_POWERPRO_SINGLEQUOTEDSTRING);\n\t\t\t} else if (isoperator(static_cast<char>(sc.ch))) {\n\t\t\t\tsc.SetState(SCE_POWERPRO_OPERATOR);\n\t\t\t}\n\t\t}\n\n\t\t//maintain a record of whether or not all the preceding characters on\n\t\t//a line are space characters\n\t\tif (onlySpaces && !IsASpaceOrTab(sc.ch))\n\t\t\tonlySpaces = false;\n\n\t\t//reset when starting a new line\n\t\tif (sc.atLineEnd)\n\t\t\tonlySpaces = true;\n\t}\n\n\t//*************************************\n\t// Colourize the last word correctly\n\t//*************************************\n\tif (sc.state == SCE_POWERPRO_IDENTIFIER)\n\t{\n\t\tif (keywords.InList(s_save)) {\n\t\t\tsc.ChangeState(SCE_POWERPRO_WORD);\n\t\t\tsc.SetState(SCE_POWERPRO_DEFAULT);\n\t\t}\n\t\telse if (keywords2.InList(s_save)) {\n\t\t\tsc.ChangeState(SCE_POWERPRO_WORD2);\n\t\t\tsc.SetState(SCE_POWERPRO_DEFAULT);\n\t\t}\n\t\telse if (keywords3.InList(s_save)) {\n\t\t\tsc.ChangeState(SCE_POWERPRO_WORD3);\n\t\t\tsc.SetState(SCE_POWERPRO_DEFAULT);\n\t\t}\n\t\telse if (keywords4.InList(s_save)) {\n\t\t\tsc.ChangeState(SCE_POWERPRO_WORD4);\n\t\t\tsc.SetState(SCE_POWERPRO_DEFAULT);\n\t\t}\n\t\telse {\n\t\t\tsc.SetState(SCE_POWERPRO_DEFAULT);\n\t\t}\n\t}\n\tsc.Complete();\n}\n\nstatic void FoldPowerProDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[], Accessor &styler)\n{\n\t//define the character sets\n\tCharacterSet setWordStart(CharacterSet::setAlpha, \"_@\", 0x80, true);\n\tCharacterSet setWord(CharacterSet::setAlphaNum, \"._\", 0x80, true);\n\n\t//used to tell if we're recursively folding the whole document, or just a small piece (ie: if statement or 1 function)\n\tbool isFoldingAll = true;\n\n\tSci_Position endPos = startPos + length;\n\tSci_Position lastLine = styler.GetLine(styler.Length()); //used to help fold the last line correctly\n\n\t// get settings from the config files for folding comments and preprocessor lines\n\tbool foldComment = styler.GetPropertyInt(\"fold.comment\") != 0;\n\tbool foldInComment = styler.GetPropertyInt(\"fold.comment\") == 2;\n\tbool foldCompact = true;\n\n\t// Backtrack to previous line in case need to fix its fold status\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tif (startPos > 0) {\n\t\tisFoldingAll = false;\n\t\tif (lineCurrent > 0) {\n\t\t\tlineCurrent--;\n\t\t\tstartPos = styler.LineStart(lineCurrent);\n\t\t}\n\t}\n\t// vars for style of previous/current/next lines\n\tint style = GetStyleFirstWord(lineCurrent,styler);\n\tint stylePrev = 0;\n\n\t// find the first previous line without continuation character at the end\n\twhile ((lineCurrent > 0 && IsContinuationLine(lineCurrent, styler))\n\t       || (lineCurrent > 1 && IsContinuationLine(lineCurrent - 1, styler))) {\n\t\tlineCurrent--;\n\t\tstartPos = styler.LineStart(lineCurrent);\n\t}\n\n\tif (lineCurrent > 0) {\n\t\tstylePrev = GetStyleFirstWord(lineCurrent-1,styler);\n\t}\n\n\t// vars for getting first word to check for keywords\n\tbool isFirstWordStarted = false;\n\tbool isFirstWordEnded = false;\n\n\tconst unsigned int FIRST_WORD_MAX_LEN = 10;\n\tchar szFirstWord[FIRST_WORD_MAX_LEN] = \"\";\n\tunsigned int firstWordLen = 0;\n\n\tchar szDo[3]=\"\";\n\tint\t szDolen = 0;\n\tbool isDoLastWord = false;\n\n\t// var for indentlevel\n\tint levelCurrent = SC_FOLDLEVELBASE;\n\tif (lineCurrent > 0)\n\t\tlevelCurrent = styler.LevelAt(lineCurrent-1) >> 16;\n\tint levelNext = levelCurrent;\n\n\tint\tvisibleChars = 0;\n\tint functionCount = 0;\n\n\tchar chNext = styler.SafeGetCharAt(startPos);\n\tchar chPrev = '\\0';\n\tchar chPrevPrev = '\\0';\n\tchar chPrevPrevPrev = '\\0';\n\n\tfor (Sci_Position i = startPos; i < endPos; i++) {\n\n\t\tchar ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\n\t\tif ((ch > 0) && setWord.Contains(ch))\n\t\t\tvisibleChars++;\n\n\t\t// get the syle for the current character neede to check in comment\n\t\tint stylech = styler.StyleAt(i);\n\n\t\t// start the capture of the first word\n\t\tif (!isFirstWordStarted && (ch > 0)) {\n\t\t\tif (setWord.Contains(ch) || setWordStart.Contains(ch) || ch == ';' || ch == '/') {\n\t\t\t\tisFirstWordStarted = true;\n\t\t\t\tif (firstWordLen < FIRST_WORD_MAX_LEN - 1) {\n\t\t\t\t\tszFirstWord[firstWordLen++] = static_cast<char>(tolower(ch));\n\t\t\t\t\tszFirstWord[firstWordLen] = '\\0';\n\t\t\t\t}\n\t\t\t}\n\t\t} // continue capture of the first word on the line\n\t\telse if (isFirstWordStarted && !isFirstWordEnded && (ch > 0)) {\n\t\t\tif (!setWord.Contains(ch)) {\n\t\t\t\tisFirstWordEnded = true;\n\t\t\t}\n\t\t\telse if (firstWordLen < (FIRST_WORD_MAX_LEN - 1)) {\n\t\t\t\tszFirstWord[firstWordLen++] = static_cast<char>(tolower(ch));\n\t\t\t\tszFirstWord[firstWordLen] = '\\0';\n\t\t\t}\n\t\t}\n\n\t\tif (stylech != SCE_POWERPRO_COMMENTLINE) {\n\n\t\t\t//reset isDoLastWord if we find a character(ignoring spaces) after 'do'\n\t\t\tif (isDoLastWord && (ch > 0) && setWord.Contains(ch))\n\t\t\t\tisDoLastWord = false;\n\n\t\t\t// --find out if the word \"do\" is the last on a \"if\" line--\n\t\t\t// collect each letter and put it into a buffer 2 chars long\n\t\t\t// if we end up with \"do\" in the buffer when we reach the end of\n\t\t\t// the line, \"do\" was the last word on the line\n\t\t\tif ((ch > 0) && isFirstWordEnded && strcmp(szFirstWord, \"if\") == 0) {\n\t\t\t\tif (szDolen == 2) {\n\t\t\t\t\tszDo[0] = szDo[1];\n\t\t\t\t\tszDo[1] = static_cast<char>(tolower(ch));\n\t\t\t\t\tszDo[2] = '\\0';\n\n\t\t\t\t\tif (strcmp(szDo, \"do\") == 0)\n\t\t\t\t\t\tisDoLastWord = true;\n\n\t\t\t\t} else if (szDolen < 2) {\n\t\t\t\t\tszDo[szDolen++] = static_cast<char>(tolower(ch));\n\t\t\t\t\tszDo[szDolen] = '\\0';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// End of Line found so process the information\n\t\t if ((ch == '\\r' && chNext != '\\n') // \\r\\n\n\t\t\t|| ch == '\\n' \t\t\t\t\t// \\n\n\t\t\t|| i == endPos) {\t\t\t\t// end of selection\n\n\t\t\t// **************************\n\t\t\t// Folding logic for Keywords\n\t\t\t// **************************\n\n\t\t\t// if a keyword is found on the current line and the line doesn't end with ;;+ (continuation)\n\t\t\t//    and we are not inside a commentblock.\n\t\t\tif (firstWordLen > 0\n\t\t\t\t&& chPrev != '+' && chPrevPrev != ';' && chPrevPrevPrev !=';'\n\t\t\t\t&& (!IsStreamCommentStyle(style) || foldInComment) ) {\n\n\t\t\t\t// only fold \"if\" last keyword is \"then\"  (else its a one line if)\n\t\t\t\tif (strcmp(szFirstWord, \"if\") == 0  && isDoLastWord)\n\t\t\t\t\t\tlevelNext++;\n\n\t\t\t\t// create new fold for these words\n\t\t\t\tif (strcmp(szFirstWord, \"for\") == 0)\n\t\t\t\t\tlevelNext++;\n\n\t\t\t\t//handle folding for functions/labels\n\t\t\t\t//Note: Functions and labels don't have an explicit end like [end function]\n\t\t\t\t//\t1. functions/labels end at the start of another function\n\t\t\t\t//\t2. functions/labels end at the end of the file\n\t\t\t\tif ((strcmp(szFirstWord, \"function\") == 0) || (firstWordLen > 0 && szFirstWord[0] == '@')) {\n\t\t\t\t\tif (isFoldingAll) { //if we're folding the whole document (recursivly by lua script)\n\n\t\t\t\t\t\tif (functionCount > 0) {\n\t\t\t\t\t\t\tlevelCurrent--;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tlevelNext++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfunctionCount++;\n\n\t\t\t\t\t} else { //if just folding a small piece (by clicking on the minus sign next to the word)\n\t\t\t\t\t\tlevelCurrent--;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// end the fold for these words before the current line\n\t\t\t\tif (strcmp(szFirstWord, \"endif\") == 0 || strcmp(szFirstWord, \"endfor\") == 0) {\n\t\t\t\t\t\tlevelNext--;\n\t\t\t\t\t\tlevelCurrent--;\n\t\t\t\t}\n\n\t\t\t\t// end the fold for these words before the current line and Start new fold\n\t\t\t\tif (strcmp(szFirstWord, \"else\") == 0 || strcmp(szFirstWord, \"elseif\") == 0 )\n\t\t\t\t\t\tlevelCurrent--;\n\n\t\t\t}\n\t\t\t// Preprocessor and Comment folding\n\t\t\tint styleNext = GetStyleFirstWord(lineCurrent + 1,styler);\n\n\t\t\t// *********************************\n\t\t\t// Folding logic for Comment blocks\n\t\t\t// *********************************\n\t\t\tif (foldComment && IsStreamCommentStyle(style)) {\n\n\t\t\t\t// Start of a comment block\n\t\t\t\tif (stylePrev != style && IsStreamCommentStyle(styleNext) && styleNext == style) {\n\t\t\t\t    levelNext++;\n\t\t\t\t} // fold till the last line for normal comment lines\n\t\t\t\telse if (IsStreamCommentStyle(stylePrev)\n\t\t\t\t\t\t&& styleNext != SCE_POWERPRO_COMMENTLINE\n\t\t\t\t\t\t&& stylePrev == SCE_POWERPRO_COMMENTLINE\n\t\t\t\t\t\t&& style == SCE_POWERPRO_COMMENTLINE) {\n\t\t\t\t\tlevelNext--;\n\t\t\t\t} // fold till the one but last line for Blockcomment lines\n\t\t\t\telse if (IsStreamCommentStyle(stylePrev)\n\t\t\t\t\t\t&& styleNext != SCE_POWERPRO_COMMENTBLOCK\n\t\t\t\t\t\t&& style == SCE_POWERPRO_COMMENTBLOCK) {\n\t\t\t\t\tlevelNext--;\n\t\t\t\t\tlevelCurrent--;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tint levelUse = levelCurrent;\n\t\t\tint lev = levelUse | levelNext << 16;\n\t\t\tif (visibleChars == 0 && foldCompact)\n\t\t\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\t\t\tif (levelUse < levelNext)\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\tif (lev != styler.LevelAt(lineCurrent))\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\n\t\t\t// reset values for the next line\n\t\t\tlineCurrent++;\n\t\t\tstylePrev = style;\n\t\t\tstyle = styleNext;\n\t\t\tlevelCurrent = levelNext;\n\t\t\tvisibleChars = 0;\n\n\t\t\t// if the last characters are ;;+ then don't reset since the line continues on the next line.\n\t\t\tif (chPrev != '+' && chPrevPrev != ';' && chPrevPrevPrev != ';') {\n\t\t\t\tfirstWordLen = 0;\n\t\t\t\tszDolen = 0;\n\t\t\t\tisFirstWordStarted = false;\n\t\t\t\tisFirstWordEnded = false;\n\t\t\t\tisDoLastWord = false;\n\n\t\t\t\t//blank out first word\n\t\t\t\tfor (unsigned int i = 0; i < FIRST_WORD_MAX_LEN; i++)\n\t\t\t\t\tszFirstWord[i] = '\\0';\n\t\t\t}\n\t\t}\n\n\t\t// save the last processed characters\n\t\tif ((ch > 0) && !isspacechar(ch)) {\n\t\t\tchPrevPrevPrev = chPrevPrev;\n\t\t\tchPrevPrev = chPrev;\n\t\t\tchPrev = ch;\n\t\t}\n\t}\n\n\t//close folds on the last line - without this a 'phantom'\n\t//fold can appear when an open fold is on the last line\n\t//this can occur because functions and labels don't have an explicit end\n\tif (lineCurrent >= lastLine) {\n\t\tint lev = 0;\n\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\t\tstyler.SetLevel(lineCurrent, lev);\n\t}\n\n}\n\nstatic const char * const powerProWordLists[] = {\n            \"Keyword list 1\",\n            \"Keyword list 2\",\n            \"Keyword list 3\",\n            \"Keyword list 4\",\n            0,\n        };\n\nstatic void ColourisePowerProDocWrapper(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[],\n                                       Accessor &styler) {\n\tColourisePowerProDoc(startPos, length, initStyle, keywordlists, styler, false);\n}\n\nLexerModule lmPowerPro(SCLEX_POWERPRO, ColourisePowerProDocWrapper, \"powerpro\", FoldPowerProDoc, powerProWordLists);\n\n\n"
  },
  {
    "path": "lexilla/lexers/LexPowerShell.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexPowerShell.cxx\n ** Lexer for PowerShell scripts.\n **/\n// Copyright 2008 by Tim Gerundt <tim@gerundt.de>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\n// Extended to accept accented characters\nstatic inline bool IsAWordChar(int ch) noexcept {\n\treturn ch >= 0x80 || isalnum(ch) || ch == '-' || ch == '_';\n}\n\nstatic bool IsNumericLiteral(int chPrev, int ch, int chNext) {\n\t// integers\n\tif (ch >= '0' && ch <= '9') {\n\t\treturn true;\n\t}\n\t// hex 0x or a-f\n\tif ((ch == 'x' && chPrev == '0') || (ch >= 'a' && ch <= 'f')) {\n\t\treturn true;\n\t}\n\t// decimal point\n\tif (ch == '.' && chNext != '.') {\n\t\treturn true;\n\t}\n\t// optional -/+ sign after exponent\n\tif ((ch == '+' || ch == '-') && chPrev == 'e') {\n\t\treturn true;\n\t}\n\t// suffix\n\tswitch (ch) {\n\t//case 'b': see hex\n\tcase 'g':\n\tcase 'k':\n\tcase 'l':\n\tcase 'm':\n\tcase 'n':\n\tcase 'p':\n\tcase 's':\n\tcase 't':\n\tcase 'u':\n\tcase 'y':\n\t\treturn true;\n\t}\n\treturn false;\n}\n\nstatic void ColourisePowerShellDoc(Sci_PositionU startPos, Sci_Position length, int initStyle,\n\t\t\t\t   WordList *keywordlists[], Accessor &styler) {\n\n\tconst WordList &keywords = *keywordlists[0];\n\tconst WordList &keywords2 = *keywordlists[1];\n\tconst WordList &keywords3 = *keywordlists[2];\n\tconst WordList &keywords4 = *keywordlists[3];\n\tconst WordList &keywords5 = *keywordlists[4];\n\tconst WordList &keywords6 = *keywordlists[5];\n\n\tstyler.StartAt(startPos);\n\n\tStyleContext sc(startPos, length, initStyle, styler);\n\n\tfor (; sc.More(); sc.Forward()) {\n\n\t\tif (sc.state == SCE_POWERSHELL_COMMENT) {\n\t\t\tif (sc.MatchLineEnd()) {\n\t\t\t\tsc.SetState(SCE_POWERSHELL_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_POWERSHELL_COMMENTSTREAM) {\n\t\t\tif (sc.atLineStart) {\n\t\t\t\twhile (IsASpaceOrTab(sc.ch)) {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t}\n\t\t\t\tif (sc.ch == '.' && IsAWordChar(sc.chNext)) {\n\t\t\t\t\tsc.SetState(SCE_POWERSHELL_COMMENTDOCKEYWORD);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (sc.ch == '>' && sc.chPrev == '#') {\n\t\t\t\tsc.ForwardSetState(SCE_POWERSHELL_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_POWERSHELL_COMMENTDOCKEYWORD) {\n\t\t\tif (!IsAWordChar(sc.ch)) {\n\t\t\t\tchar s[100];\n\t\t\t\tsc.GetCurrentLowered(s, sizeof(s));\n\t\t\t\tif (!keywords6.InList(s + 1)) {\n\t\t\t\t\tsc.ChangeState(SCE_POWERSHELL_COMMENTSTREAM);\n\t\t\t\t}\n\t\t\t\tsc.SetState(SCE_POWERSHELL_COMMENTSTREAM);\n\t\t\t}\n\t\t} else if (sc.state == SCE_POWERSHELL_STRING) {\n\t\t\t// This is a doubles quotes string\n\t\t\tif (sc.ch == '\\\"') {\n\t\t\t\tsc.ForwardSetState(SCE_POWERSHELL_DEFAULT);\n\t\t\t} else if (sc.ch == '`') {\n\t\t\t\tsc.Forward(); // skip next escaped character\n\t\t\t}\n\t\t} else if (sc.state == SCE_POWERSHELL_CHARACTER) {\n\t\t\t// This is a single quote string\n\t\t\tif (sc.ch == '\\'') {\n\t\t\t\tsc.ForwardSetState(SCE_POWERSHELL_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_POWERSHELL_HERE_STRING) {\n\t\t\t// This is a doubles quotes here-string\n\t\t\tif (sc.atLineStart && sc.ch == '\\\"' && sc.chNext == '@') {\n\t\t\t\tsc.Forward(2);\n\t\t\t\tsc.SetState(SCE_POWERSHELL_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_POWERSHELL_HERE_CHARACTER) {\n\t\t\t// This is a single quote here-string\n\t\t\tif (sc.atLineStart && sc.ch == '\\'' && sc.chNext == '@') {\n\t\t\t\tsc.Forward(2);\n\t\t\t\tsc.SetState(SCE_POWERSHELL_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_POWERSHELL_NUMBER) {\n\t\t\tif (!IsNumericLiteral(MakeLowerCase(sc.chPrev),\n\t\t\t\t\t      MakeLowerCase(sc.ch),\n\t\t\t\t\t      MakeLowerCase(sc.chNext))) {\n\t\t\t\tif (sc.MatchLineEnd() || IsASpaceOrTab(sc.ch) || isoperator(sc.ch)) {\n\t\t\t\t\tsc.SetState(SCE_POWERSHELL_DEFAULT);\n\t\t\t\t} else {\n\t\t\t\t\tsc.ChangeState(SCE_POWERSHELL_IDENTIFIER);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (sc.state == SCE_POWERSHELL_VARIABLE) {\n\t\t\tif (!IsAWordChar(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_POWERSHELL_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_POWERSHELL_OPERATOR) {\n\t\t\tif (!isoperator(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_POWERSHELL_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_POWERSHELL_IDENTIFIER) {\n\t\t\tif (!IsAWordChar(sc.ch)) {\n\t\t\t\tchar s[100];\n\t\t\t\tsc.GetCurrentLowered(s, sizeof(s));\n\n\t\t\t\tif (keywords.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_POWERSHELL_KEYWORD);\n\t\t\t\t} else if (keywords2.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_POWERSHELL_CMDLET);\n\t\t\t\t} else if (keywords3.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_POWERSHELL_ALIAS);\n\t\t\t\t} else if (keywords4.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_POWERSHELL_FUNCTION);\n\t\t\t\t} else if (keywords5.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_POWERSHELL_USER1);\n\t\t\t\t}\n\t\t\t\tsc.SetState(SCE_POWERSHELL_DEFAULT);\n\t\t\t}\n\t\t}\n\n\t\t// Determine if a new state should be entered.\n\t\tif (sc.state == SCE_POWERSHELL_DEFAULT) {\n\t\t\tif (sc.ch == '#') {\n\t\t\t\tsc.SetState(SCE_POWERSHELL_COMMENT);\n\t\t\t} else if (sc.ch == '<' && sc.chNext == '#') {\n\t\t\t\tsc.SetState(SCE_POWERSHELL_COMMENTSTREAM);\n\t\t\t} else if (sc.ch == '\\\"') {\n\t\t\t\tsc.SetState(SCE_POWERSHELL_STRING);\n\t\t\t} else if (sc.ch == '\\'') {\n\t\t\t\tsc.SetState(SCE_POWERSHELL_CHARACTER);\n\t\t\t} else if (sc.ch == '@' && sc.chNext == '\\\"') {\n\t\t\t\tsc.SetState(SCE_POWERSHELL_HERE_STRING);\n\t\t\t} else if (sc.ch == '@' && sc.chNext == '\\'') {\n\t\t\t\tsc.SetState(SCE_POWERSHELL_HERE_CHARACTER);\n\t\t\t} else if (sc.ch == '$') {\n\t\t\t\tsc.SetState(SCE_POWERSHELL_VARIABLE);\n\t\t\t} else if (IsADigit(sc.ch) || (sc.chPrev != '.' && sc.ch == '.' && IsADigit(sc.chNext))) {\n\t\t\t\tsc.SetState(SCE_POWERSHELL_NUMBER);\n\t\t\t} else if (isoperator(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_POWERSHELL_OPERATOR);\n\t\t\t} else if (IsAWordChar(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_POWERSHELL_IDENTIFIER);\n\t\t\t} else if (sc.ch == '`') {\n\t\t\t\tsc.Forward(); // skip next escaped character\n\t\t\t}\n\t\t}\n\t}\n\tsc.Complete();\n}\n\n// Store both the current line's fold level and the next lines in the\n// level store to make it easy to pick up with each increment\n// and to make it possible to fiddle the current level for \"} else {\".\nstatic void FoldPowerShellDoc(Sci_PositionU startPos, Sci_Position length, int initStyle,\n\t\t\t      WordList *[], Accessor &styler) {\n\tconst bool foldComment = styler.GetPropertyInt(\"fold.comment\") != 0;\n\tconst bool foldCompact = styler.GetPropertyInt(\"fold.compact\", 1) != 0;\n\tconst bool foldAtElse = styler.GetPropertyInt(\"fold.at.else\", 0) != 0;\n\tconst Sci_PositionU endPos = startPos + length;\n\tint visibleChars = 0;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tint levelCurrent = SC_FOLDLEVELBASE;\n\tif (lineCurrent > 0)\n\t\tlevelCurrent = styler.LevelAt(lineCurrent-1) >> 16;\n\tint levelMinCurrent = levelCurrent;\n\tint levelNext = levelCurrent;\n\tchar chNext = styler[startPos];\n\tint styleNext = styler.StyleAt(startPos);\n\tint style = initStyle;\n\tfor (Sci_PositionU i = startPos; i < endPos; i++) {\n\t\tconst char ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\tconst int stylePrev = style;\n\t\tstyle = styleNext;\n\t\tstyleNext = styler.StyleAt(i + 1);\n\t\tconst bool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n\t\tif (style == SCE_POWERSHELL_OPERATOR) {\n\t\t\tif (ch == '{') {\n\t\t\t\t// Measure the minimum before a '{' to allow\n\t\t\t\t// folding on \"} else {\"\n\t\t\t\tif (levelMinCurrent > levelNext) {\n\t\t\t\t\tlevelMinCurrent = levelNext;\n\t\t\t\t}\n\t\t\t\tlevelNext++;\n\t\t\t} else if (ch == '}') {\n\t\t\t\tlevelNext--;\n\t\t\t}\n\t\t} else if (foldComment && style == SCE_POWERSHELL_COMMENTSTREAM) {\n\t\t\tif (stylePrev != SCE_POWERSHELL_COMMENTSTREAM && stylePrev != SCE_POWERSHELL_COMMENTDOCKEYWORD) {\n\t\t\t\tlevelNext++;\n\t\t\t} else if (styleNext != SCE_POWERSHELL_COMMENTSTREAM && styleNext != SCE_POWERSHELL_COMMENTDOCKEYWORD) {\n\t\t\t\tlevelNext--;\n\t\t\t}\n\t\t} else if (foldComment && style == SCE_POWERSHELL_COMMENT) {\n\t\t\tif (ch == '#') {\n\t\t\t\tSci_PositionU j = i + 1;\n\t\t\t\twhile ((j < endPos) && IsASpaceOrTab(styler.SafeGetCharAt(j))) {\n\t\t\t\t\tj++;\n\t\t\t\t}\n\t\t\t\tif (styler.Match(j, \"region\")) {\n\t\t\t\t\tlevelNext++;\n\t\t\t\t} else if (styler.Match(j, \"endregion\")) {\n\t\t\t\t\tlevelNext--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (!IsASpace(ch))\n\t\t\tvisibleChars++;\n\t\tif (atEOL || (i == endPos-1)) {\n\t\t\tint levelUse = levelCurrent;\n\t\t\tif (foldAtElse) {\n\t\t\t\tlevelUse = levelMinCurrent;\n\t\t\t}\n\t\t\tint lev = levelUse | levelNext << 16;\n\t\t\tif (visibleChars == 0 && foldCompact)\n\t\t\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\t\t\tif (levelUse < levelNext)\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\tif (lev != styler.LevelAt(lineCurrent)) {\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\t\t\t}\n\t\t\tlineCurrent++;\n\t\t\tlevelCurrent = levelNext;\n\t\t\tlevelMinCurrent = levelCurrent;\n\t\t\tvisibleChars = 0;\n\t\t}\n\t}\n}\n\nstatic const char *const powershellWordLists[] = {\n\t\"Commands\",\n\t\"Cmdlets\",\n\t\"Aliases\",\n\t\"Functions\",\n\t\"User1\",\n\t\"DocComment\",\n\t0\n};\n\nLexerModule lmPowerShell(SCLEX_POWERSHELL, ColourisePowerShellDoc, \"powershell\", FoldPowerShellDoc, powershellWordLists);\n\n"
  },
  {
    "path": "lexilla/lexers/LexProgress.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexProgress.cxx\n **  Lexer for Progress 4GL.\n ** Based on LexCPP.cxx of Neil Hodgson <neilh@scintilla.org>\n  **/\n// Copyright 2006-2016 by Yuval Papish <Yuval@YuvCom.com>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n/** TODO:\n\nSpeedScript support in html lexer\nDifferentiate between labels and variables\n  Option 1: By symbols table\n  Option 2: As a single unidentified symbol in a sytactical line\n\n**/\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n#include <vector>\n#include <map>\n#include <algorithm>\n#include <functional>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n#include \"OptionSet.h\"\n#include \"SparseState.h\"\n#include \"DefaultLexer.h\"\n\nusing namespace Scintilla;\nusing namespace Lexilla;\n\nnamespace {\n   // Use an unnamed namespace to protect the functions and classes from name conflicts\n\n   bool IsSpaceEquiv(int state) {\n      return (state == SCE_ABL_COMMENT ||\n              state == SCE_ABL_LINECOMMENT ||\n              state == SCE_ABL_DEFAULT);\n   }\n\n   void highlightTaskMarker(StyleContext &sc, LexAccessor &styler, WordList &markerList){\n      if ((isoperator(sc.chPrev) || IsASpace(sc.chPrev)) && markerList.Length()) {\n         const int lengthMarker = 50;\n         char marker[lengthMarker+1];\n         Sci_Position currPos = (Sci_Position) sc.currentPos;\n         Sci_Position i = 0;\n         while (i < lengthMarker) {\n            char ch = styler.SafeGetCharAt(currPos + i);\n            if (IsASpace(ch) || isoperator(ch)) {\n               break;\n            }\n            marker[i] = ch;\n            i++;\n         }\n         marker[i] = '\\0';\n         if (markerList.InListAbbreviated (marker,'(')) {\n            sc.SetState(SCE_ABL_TASKMARKER);\n         }\n      }\n   }\n\n   bool IsStreamCommentStyle(int style) {\n      return style == SCE_ABL_COMMENT;\n             // style == SCE_ABL_LINECOMMENT;  Only block comments are used for folding\n   }\n\n   // Options used for LexerABL\n   struct OptionsABL {\n      bool fold;\n      bool foldSyntaxBased;\n      bool foldComment;\n      bool foldCommentMultiline;\n      bool foldCompact;\n      OptionsABL() {\n         fold = false;\n         foldSyntaxBased = true;\n         foldComment = true;\n         foldCommentMultiline = true;\n         foldCompact = false;\n      }\n   };\n\n   const char *const ablWordLists[] = {\n               \"Primary keywords and identifiers\",\n               \"Keywords that opens a block, only when used to begin a syntactic line\",\n               \"Keywords that opens a block anywhere in a syntactic line\",\n               \"Task Marker\", /* \"END MODIFY START TODO\" */\n               0,\n   };\n\n   struct OptionSetABL : public OptionSet<OptionsABL> {\n      OptionSetABL() {\n         DefineProperty(\"fold\", &OptionsABL::fold);\n\n         DefineProperty(\"fold.abl.syntax.based\", &OptionsABL::foldSyntaxBased,\n            \"Set this property to 0 to disable syntax based folding.\");\n\n         DefineProperty(\"fold.comment\", &OptionsABL::foldComment,\n            \"This option enables folding multi-line comments and explicit fold points when using the ABL lexer. \");\n\n         DefineProperty(\"fold.abl.comment.multiline\", &OptionsABL::foldCommentMultiline,\n            \"Set this property to 0 to disable folding multi-line comments when fold.comment=1.\");\n\n         DefineProperty(\"fold.compact\", &OptionsABL::foldCompact);\n\n         DefineWordListSets(ablWordLists);\n      }\n   };\n}\n\nclass LexerABL : public DefaultLexer {\n   CharacterSet setWord;\n   CharacterSet setNegationOp;\n   CharacterSet setArithmethicOp;\n   CharacterSet setRelOp;\n   CharacterSet setLogicalOp;\n   CharacterSet setWordStart;\n   WordList keywords1;      // regular keywords\n   WordList keywords2;      // block opening keywords, only when isSentenceStart\n   WordList keywords3;      // block opening keywords\n   WordList keywords4;      // Task Marker\n   OptionsABL options;\n   OptionSetABL osABL;\npublic:\n   LexerABL() :\n      DefaultLexer(\"abl\", SCLEX_PROGRESS),\n      setWord(CharacterSet::setAlphaNum, \"_\", 0x80, true),\n      setNegationOp(CharacterSet::setNone, \"!\"),\n      setArithmethicOp(CharacterSet::setNone, \"+-/*%\"),\n      setRelOp(CharacterSet::setNone, \"=!<>\"),\n      setLogicalOp(CharacterSet::setNone, \"|&\"){\n   }\n   virtual ~LexerABL() {\n   }\n   void SCI_METHOD Release() override {\n      delete this;\n   }\n   int SCI_METHOD Version() const override {\n      return lvRelease5;\n   }\n   const char * SCI_METHOD PropertyNames() override {\n      return osABL.PropertyNames();\n   }\n   int SCI_METHOD PropertyType(const char *name) override {\n      return osABL.PropertyType(name);\n   }\n   const char * SCI_METHOD DescribeProperty(const char *name) override {\n      return osABL.DescribeProperty(name);\n   }\n   Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) override ;\n   const char * SCI_METHOD PropertyGet(const char *key) override {\n\t   return osABL.PropertyGet(key);\n   }\n\n   const char * SCI_METHOD DescribeWordListSets() override {\n      return osABL.DescribeWordListSets();\n   }\n   Sci_Position SCI_METHOD WordListSet(int n, const char *wl) override;\n   void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;\n   void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;\n\n   void * SCI_METHOD PrivateCall(int, void *) override {\n      return 0;\n   }\n   int SCI_METHOD LineEndTypesSupported() override {\n      return SC_LINE_END_TYPE_DEFAULT;\n   }\n   static ILexer5 *LexerFactoryABL() {\n      return new LexerABL();\n   }\n};\n\nSci_Position SCI_METHOD LexerABL::PropertySet(const char *key, const char *val) {\n   if (osABL.PropertySet(&options, key, val)) {\n      return 0;\n   }\n   return -1;\n}\n\nSci_Position SCI_METHOD LexerABL::WordListSet(int n, const char *wl) {\n   WordList *wordListN = 0;\n   switch (n) {\n   case 0:\n      wordListN = &keywords1;\n      break;\n   case 1:\n      wordListN = &keywords2;\n      break;\n   case 2:\n      wordListN = &keywords3;\n      break;\n   case 3:\n      wordListN = &keywords4;\n      break;\n   }\n   Sci_Position firstModification = -1;\n   if (wordListN) {\n      WordList wlNew;\n      wlNew.Set(wl);\n      if (*wordListN != wlNew) {\n         wordListN->Set(wl);\n         firstModification = 0;\n      }\n   }\n   return firstModification;\n}\n\n#if defined(__clang__)\n#if __has_warning(\"-Wunused-but-set-variable\")\n// Disable warning for visibleChars\n#pragma clang diagnostic ignored \"-Wunused-but-set-variable\"\n#endif\n#endif\n\nvoid SCI_METHOD LexerABL::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) {\n   LexAccessor styler(pAccess);\n\n   setWordStart = CharacterSet(CharacterSet::setAlpha, \"_\", 0x80, true);\n\n   int visibleChars = 0;\n   int visibleChars1 = 0;\n   int styleBeforeTaskMarker = SCE_ABL_DEFAULT;\n   bool continuationLine = false;\n   int commentNestingLevel = 0;\n   bool isSentenceStart = true;\n   bool possibleOOLChange = false;\n\n   Sci_Position lineCurrent = styler.GetLine(startPos);\n   if (initStyle == SCE_ABL_PREPROCESSOR) {\n      // Set continuationLine if last character of previous line is '~'\n      if (lineCurrent > 0) {\n         Sci_Position endLinePrevious = styler.LineEnd(lineCurrent-1);\n         if (endLinePrevious > 0) {\n            continuationLine = styler.SafeGetCharAt(endLinePrevious-1) == '~';\n         }\n      }\n   }\n\n    // Look back to set variables that are actually invisible secondary states. The reason to avoid formal states is to cut down on state's bits\n   if (startPos > 0) {\n      Sci_Position back = startPos;\n      bool checkCommentNestingLevel = (initStyle == SCE_ABL_COMMENT);\n      bool checkIsSentenceStart = (initStyle == SCE_ABL_DEFAULT || initStyle == SCE_ABL_IDENTIFIER);\n      char ch;\n      char st;\n      char chPrev;\n      char chPrev_1;\n      char chPrev_2;\n      char chPrev_3;\n\n      while (back >= 0 && (checkCommentNestingLevel || checkIsSentenceStart)) {\n         ch = styler.SafeGetCharAt(back);\n         styler.Flush();  // looking at styles so need to flush\n         st = styler.StyleAt(back);\n\n         chPrev = styler.SafeGetCharAt(back-1);\n         // isSentenceStart is a non-visible state, used to identify where statements and preprocessor declerations can start\n         if (checkIsSentenceStart && st != SCE_ABL_COMMENT && st != SCE_ABL_LINECOMMENT && st != SCE_ABL_CHARACTER  && st != SCE_ABL_STRING ) {\n            chPrev_1 = styler.SafeGetCharAt(back-2);\n            chPrev_2 = styler.SafeGetCharAt(back-3);\n            chPrev_3 = styler.SafeGetCharAt(back-4);\n            if ((chPrev == '.' || chPrev == ':' || chPrev == '}' ||\n               (chPrev_3 == 'e' && chPrev_2 == 'l' && chPrev_1 == 's' &&  chPrev == 'e') ||\n               (chPrev_3 == 't' && chPrev_2 == 'h' && chPrev_1 == 'e' &&  chPrev == 'n')) &&\n               (IsASpace(ch) || (ch == '/' && styler.SafeGetCharAt(back+1) == '*'))\n               ) {\n                  checkIsSentenceStart = false;\n                  isSentenceStart = true;\n            }\n            else if (IsASpace(chPrev) && ch == '{') {\n               checkIsSentenceStart = false;\n               isSentenceStart = false;\n            }\n         }\n\n         // commentNestingLevel is a non-visible state, used to identify the nesting level of a comment\n         if (checkCommentNestingLevel) {\n            if (chPrev == '/' && ch == '*') {\n               commentNestingLevel++;\n               // eat the '/' so we don't miscount a */ if we see /*/*\n               --back;\n            }\n            if (chPrev == '*' && ch == '/') {\n               commentNestingLevel--;\n               // eat the '*' so we don't miscount a /* if we see */*/\n               --back;\n            }\n         }\n         --back;\n      }\n   }\n\n   StyleContext sc(startPos, length, initStyle, styler, static_cast<unsigned char>(0xff));\n   Sci_Position lineEndNext = styler.LineEnd(lineCurrent);\n\n   for (; sc.More();) {\n      if (sc.atLineStart) {\n         visibleChars = 0;\n         visibleChars1 = 0;\n      }\n      if (sc.atLineEnd) {\n         lineCurrent++;\n         lineEndNext = styler.LineEnd(lineCurrent);\n      }\n      // Handle line continuation generically.\n      if (sc.ch == '~') {\n         if (static_cast<Sci_Position>((sc.currentPos+1)) >= lineEndNext) {\n            lineCurrent++;\n            lineEndNext = styler.LineEnd(lineCurrent);\n            sc.Forward();\n            if (sc.ch == '\\r' && sc.chNext == '\\n') {\n               sc.Forward();\n            }\n            continuationLine = true;\n            sc.Forward();\n            continue;\n         }\n      }\n\n      const bool atLineEndBeforeSwitch = sc.atLineEnd;\n      // Determine if the current state should terminate.\n      switch (sc.state) {\n         case SCE_ABL_OPERATOR:\n            sc.SetState(SCE_ABL_DEFAULT);\n            break;\n         case SCE_ABL_NUMBER:\n            // We accept almost anything because of hex. and maybe number suffixes and scientific notations in the future\n            if (!(setWord.Contains(sc.ch)\n\t\t\t\t   || ((sc.ch == '+' || sc.ch == '-') && (sc.chPrev == 'e' || sc.chPrev == 'E' ||\n\t\t\t\t                                          sc.chPrev == 'p' || sc.chPrev == 'P')))) {\n               sc.SetState(SCE_ABL_DEFAULT);\n            }\n            break;\n         case SCE_ABL_IDENTIFIER:\n            if (sc.atLineStart || sc.atLineEnd || (!setWord.Contains(sc.ch) && sc.ch != '-')) {\n               char s[1000];\n               sc.GetCurrentLowered(s, sizeof(s));\n               bool isLastWordEnd = (s[0] == 'e' && s[1] =='n' && s[2] == 'd' && !IsAlphaNumeric(s[3]) && s[3] != '-');  // helps to identify \"end trigger\" phrase\n               if ((isSentenceStart && keywords2.InListAbbreviated (s,'(')) || (!isLastWordEnd && keywords3.InListAbbreviated (s,'('))) {\n                  sc.ChangeState(SCE_ABL_BLOCK);\n                  isSentenceStart = false;\n               }\n               else if (keywords1.InListAbbreviated (s,'(')) {\n                  if (isLastWordEnd ||\n                     (s[0] == 'f' && s[1] =='o' && s[2] == 'r' && s[3] == 'w' && s[4] =='a' && s[5] == 'r' && s[6] == 'd'&& !IsAlphaNumeric(s[7]))) {\n                     sc.ChangeState(SCE_ABL_END);\n                     isSentenceStart = false;\n                  }\n                  else if ((s[0] == 'e' && s[1] =='l' && s[2] == 's' && s[3] == 'e') ||\n                         (s[0] == 't' && s[1] =='h' && s[2] == 'e' && s[3] == 'n')) {\n                     sc.ChangeState(SCE_ABL_WORD);\n                     isSentenceStart = true;\n                  }\n                  else {\n                     sc.ChangeState(SCE_ABL_WORD);\n                     isSentenceStart = false;\n                  }\n               }\n               sc.SetState(SCE_ABL_DEFAULT);\n            }\n            break;\n         case SCE_ABL_PREPROCESSOR:\n            if (sc.atLineStart && !continuationLine) {\n               sc.SetState(SCE_ABL_DEFAULT);\n               // Force Scintilla to acknowledge changed stated even though this change might happen outside of the current line\n               possibleOOLChange = true;\n               isSentenceStart = true;\n            }\n            break;\n         case SCE_ABL_LINECOMMENT:\n            if (sc.atLineStart && !continuationLine) {\n               sc.SetState(SCE_ABL_DEFAULT);\n               isSentenceStart = true;\n            } else {\n               styleBeforeTaskMarker = SCE_ABL_LINECOMMENT;\n               highlightTaskMarker(sc, styler, keywords4);\n            }\n            break;\n         case SCE_ABL_TASKMARKER:\n            if (isoperator(sc.ch) || IsASpace(sc.ch)) {\n               sc.SetState(styleBeforeTaskMarker);\n               styleBeforeTaskMarker = SCE_ABL_DEFAULT;\n            }\n            // fall through\n         case SCE_ABL_COMMENT:\n            if (sc.Match('*', '/')) {\n               sc.Forward();\n               commentNestingLevel--;\n               if (commentNestingLevel == 0) {\n                  sc.ForwardSetState(SCE_ABL_DEFAULT);\n                  possibleOOLChange = true;\n               }\n            } else if (sc.Match('/', '*')) {\n               commentNestingLevel++;\n               sc.Forward();\n            }\n            if (commentNestingLevel > 0) {\n               styleBeforeTaskMarker = SCE_ABL_COMMENT;\n               possibleOOLChange = true;\n               highlightTaskMarker(sc, styler, keywords4);\n            }\n            break;\n         case SCE_ABL_STRING:\n            if (sc.ch == '~') {\n               sc.Forward(); // Skip a character after a tilde\n            } else if (sc.ch == '\\\"') {\n                  sc.ForwardSetState(SCE_ABL_DEFAULT);\n            }\n            break;\n         case SCE_ABL_CHARACTER:\n            if (sc.ch == '~') {\n               sc.Forward(); // Skip a character after a tilde\n            } else if (sc.ch == '\\'') {\n                  sc.ForwardSetState(SCE_ABL_DEFAULT);\n            }\n            break;\n      }\n\n      if (sc.atLineEnd && !atLineEndBeforeSwitch) {\n         // State exit processing consumed characters up to end of line.\n         lineCurrent++;\n         lineEndNext = styler.LineEnd(lineCurrent);\n      }\n\n      // Determine if a new state should be entered.\n      if (sc.state == SCE_ABL_DEFAULT) {\n         if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) {\n               sc.SetState(SCE_ABL_NUMBER);\n               isSentenceStart = false;\n         } else if (!sc.atLineEnd && (setWordStart.Contains(sc.ch)) && sc.chPrev != '&') {\n               sc.SetState(SCE_ABL_IDENTIFIER);\n         } else if (sc.Match('/', '*')) {\n            if (sc.chPrev == '.' || sc.chPrev == ':' || sc.chPrev == '}') {\n               isSentenceStart = true;\n            }\n            sc.SetState(SCE_ABL_COMMENT);\n            possibleOOLChange = true;\n            commentNestingLevel++;\n            sc.Forward();   // Eat the * so it isn't used for the end of the comment\n         } else if (sc.ch == '\\\"') {\n               sc.SetState(SCE_ABL_STRING);\n               isSentenceStart = false;\n         } else if (sc.ch == '\\'') {\n            sc.SetState(SCE_ABL_CHARACTER);\n            isSentenceStart = false;\n         } else if (sc.ch == '&' && visibleChars1 == 0 && isSentenceStart) {\n            // Preprocessor commands are alone on their line\n            sc.SetState(SCE_ABL_PREPROCESSOR);\n            // Force Scintilla to acknowledge changed stated even though this change might happen outside of the current line\n            possibleOOLChange = true;\n            // Skip whitespace between & and preprocessor word\n            do {\n               sc.Forward();\n            } while ((sc.ch == ' ' || sc.ch == '\\t') && sc.More());\n            if (sc.atLineEnd) {\n               sc.SetState(SCE_ABL_DEFAULT);\n            }\n         } else if (sc.Match('/','/') && (IsASpace(sc.chPrev) || isSentenceStart)) {\n            // Line comments are valid after a white space or EOL\n            sc.SetState(SCE_ABL_LINECOMMENT);\n            // Skip whitespace between // and preprocessor word\n            do {\n               sc.Forward();\n            } while ((sc.ch == ' ' || sc.ch == '\\t') && sc.More());\n            if (sc.atLineEnd) {\n               sc.SetState(SCE_ABL_DEFAULT);\n            }\n         } else if (isoperator(sc.ch)) {\n            sc.SetState(SCE_ABL_OPERATOR);\n            /*    This code allows highlight of handles. Alas, it would cause the phrase \"last-event:function\"\n               to be recognized as a BlockBegin */\n               isSentenceStart = false;\n         }\n         else if ((sc.chPrev == '.' || sc.chPrev == ':' || sc.chPrev == '}') && (IsASpace(sc.ch))) {\n            isSentenceStart = true;\n         }\n      }\n      if (!IsASpace(sc.ch)) {\n         visibleChars1++;\n      }\n      if (!IsASpace(sc.ch) && !IsSpaceEquiv(sc.state)) {\n         visibleChars++;\n      }\n      continuationLine = false;\n      sc.Forward();\n   }\n\tif (possibleOOLChange)\n\t\tstyler.ChangeLexerState(startPos, startPos + length);\n   sc.Complete();\n}\n\n\n// Store both the current line's fold level and the next lines in the\n// level store to make it easy to pick up with each increment\n// and to make it possible to fiddle the current level for \"} else {\".\n\nvoid SCI_METHOD LexerABL::Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) {\n\n   if (!options.fold)\n      return;\n\n   LexAccessor styler(pAccess);\n\n   Sci_PositionU endPos = startPos + length;\n   int visibleChars = 0;\n   Sci_Position lineCurrent = styler.GetLine(startPos);\n   int levelCurrent = SC_FOLDLEVELBASE;\n   if (lineCurrent > 0)\n      levelCurrent = styler.LevelAt(lineCurrent-1) >> 16;\n   Sci_PositionU lineStartNext = styler.LineStart(lineCurrent+1);\n   int levelNext = levelCurrent;\n   char chNext = styler[startPos];\n   int styleNext = styler.StyleAt(startPos);\n   int style = initStyle;\n   for (Sci_PositionU i = startPos; i < endPos; i++) {\n      chNext = static_cast<char>(tolower(chNext));  // check tolower\n      char ch = chNext;\n      chNext = styler.SafeGetCharAt(i+1);\n      int stylePrev = style;\n      style = styleNext;\n      styleNext = styler.StyleAt(i+1);\n      bool atEOL = i == (lineStartNext-1);\n      if (options.foldComment && options.foldCommentMultiline && IsStreamCommentStyle(style)) {\n         if (!IsStreamCommentStyle(stylePrev)) {\n            levelNext++;\n         } else if (!IsStreamCommentStyle(styleNext) && !atEOL) {\n            // Comments don't end at end of line and the next character may be unstyled.\n            levelNext--;\n         }\n      }\n      if (options.foldSyntaxBased) {\n         if (style == SCE_ABL_BLOCK && !IsAlphaNumeric(chNext)) {\n            levelNext++;\n         }\n         else if (style == SCE_ABL_END  && (ch == 'e' || ch == 'f')) {\n            levelNext--;\n         }\n      }\n      if (!IsASpace(ch))\n         visibleChars++;\n      if (atEOL || (i == endPos-1)) {\n         int lev = levelCurrent | levelNext << 16;\n         if (visibleChars == 0 && options.foldCompact)\n            lev |= SC_FOLDLEVELWHITEFLAG;\n         if (levelCurrent < levelNext)\n            lev |= SC_FOLDLEVELHEADERFLAG;\n         if (lev != styler.LevelAt(lineCurrent)) {\n            styler.SetLevel(lineCurrent, lev);\n         }\n         lineCurrent++;\n         lineStartNext = styler.LineStart(lineCurrent+1);\n         levelCurrent = levelNext;\n         if (atEOL && (i == static_cast<Sci_PositionU>(styler.Length()-1))) {\n            // There is an empty line at end of file so give it same level and empty\n            styler.SetLevel(lineCurrent, (levelCurrent | levelCurrent << 16) | SC_FOLDLEVELWHITEFLAG);\n         }\n         visibleChars = 0;\n      }\n   }\n}\n\nLexerModule lmProgress(SCLEX_PROGRESS, LexerABL::LexerFactoryABL, \"abl\", ablWordLists);\n"
  },
  {
    "path": "lexilla/lexers/LexProps.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexProps.cxx\n ** Lexer for properties files.\n **/\n// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <cstdlib>\n#include <cassert>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nnamespace {\n\nbool AtEOL(Accessor &styler, Sci_PositionU i) {\n\treturn (styler[i] == '\\n') ||\n\t       ((styler[i] == '\\r') && (styler.SafeGetCharAt(i + 1) != '\\n'));\n}\n\nconstexpr bool isAssignChar(char ch) noexcept {\n\treturn (ch == '=') || (ch == ':');\n}\n\nvoid ColourisePropsLine(\n\tconst char *lineBuffer,\n\tSci_PositionU lengthLine,\n\tSci_PositionU startLine,\n\tSci_PositionU endPos,\n\tAccessor &styler,\n\tbool allowInitialSpaces) {\n\n\tSci_PositionU i = 0;\n\tif (allowInitialSpaces) {\n\t\twhile ((i < lengthLine) && isspacechar(lineBuffer[i]))\t// Skip initial spaces\n\t\t\ti++;\n\t} else {\n\t\tif (isspacechar(lineBuffer[i])) // don't allow initial spaces\n\t\t\ti = lengthLine;\n\t}\n\n\tif (i < lengthLine) {\n\t\tif (lineBuffer[i] == '#' || lineBuffer[i] == '!' || lineBuffer[i] == ';') {\n\t\t\tstyler.ColourTo(endPos, SCE_PROPS_COMMENT);\n\t\t} else if (lineBuffer[i] == '[') {\n\t\t\tstyler.ColourTo(endPos, SCE_PROPS_SECTION);\n\t\t} else if (lineBuffer[i] == '@') {\n\t\t\tstyler.ColourTo(startLine + i, SCE_PROPS_DEFVAL);\n\t\t\tif (isAssignChar(lineBuffer[i++]))\n\t\t\t\tstyler.ColourTo(startLine + i, SCE_PROPS_ASSIGNMENT);\n\t\t\tstyler.ColourTo(endPos, SCE_PROPS_DEFAULT);\n\t\t} else {\n\t\t\t// Search for the '=' character\n\t\t\twhile ((i < lengthLine) && !isAssignChar(lineBuffer[i]))\n\t\t\t\ti++;\n\t\t\tif ((i < lengthLine) && isAssignChar(lineBuffer[i])) {\n\t\t\t\tstyler.ColourTo(startLine + i - 1, SCE_PROPS_KEY);\n\t\t\t\tstyler.ColourTo(startLine + i, SCE_PROPS_ASSIGNMENT);\n\t\t\t\tstyler.ColourTo(endPos, SCE_PROPS_DEFAULT);\n\t\t\t} else {\n\t\t\t\tstyler.ColourTo(endPos, SCE_PROPS_DEFAULT);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tstyler.ColourTo(endPos, SCE_PROPS_DEFAULT);\n\t}\n}\n\nvoid ColourisePropsDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[], Accessor &styler) {\n\tstd::string lineBuffer;\n\tstyler.StartAt(startPos);\n\tstyler.StartSegment(startPos);\n\tSci_PositionU startLine = startPos;\n\n\t// property lexer.props.allow.initial.spaces\n\t//\tFor properties files, set to 0 to style all lines that start with whitespace in the default style.\n\t//\tThis is not suitable for SciTE .properties files which use indentation for flow control but\n\t//\tcan be used for RFC2822 text where indentation is used for continuation lines.\n\tconst bool allowInitialSpaces = styler.GetPropertyInt(\"lexer.props.allow.initial.spaces\", 1) != 0;\n\n\tfor (Sci_PositionU i = startPos; i < startPos + length; i++) {\n\t\tlineBuffer.push_back(styler[i]);\n\t\tif (AtEOL(styler, i)) {\n\t\t\t// End of line (or of line buffer) met, colourise it\n\t\t\tColourisePropsLine(lineBuffer.c_str(), lineBuffer.length(), startLine, i, styler, allowInitialSpaces);\n\t\t\tlineBuffer.clear();\n\t\t\tstartLine = i + 1;\n\t\t}\n\t}\n\tif (lineBuffer.length() > 0) {\t// Last line does not have ending characters\n\t\tColourisePropsLine(lineBuffer.c_str(), lineBuffer.length(), startLine, startPos + length - 1, styler, allowInitialSpaces);\n\t}\n}\n\n// adaption by ksc, using the \"} else {\" trick of 1.53\n// 030721\nvoid FoldPropsDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[], Accessor &styler) {\n\tconst bool foldCompact = styler.GetPropertyInt(\"fold.compact\", 1) != 0;\n\n\tconst Sci_PositionU endPos = startPos + length;\n\tint visibleChars = 0;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\n\tchar chNext = styler[startPos];\n\tbool headerPoint = false;\n\tint levelPrevious = (lineCurrent > 0) ? styler.LevelAt(lineCurrent - 1) : SC_FOLDLEVELBASE;\n\n\tfor (Sci_PositionU i = startPos; i < endPos; i++) {\n\t\tconst char ch = chNext;\n\t\tchNext = styler[i+1];\n\n\t\tconst int style = styler.StyleIndexAt(i);\n\t\tconst bool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n\n\t\tif (style == SCE_PROPS_SECTION) {\n\t\t\theaderPoint = true;\n\t\t}\n\n\t\tif (atEOL) {\n\t\t\tint lev = levelPrevious & SC_FOLDLEVELNUMBERMASK;\n\t\t\tif (headerPoint) {\n\t\t\t\tlev = SC_FOLDLEVELBASE | SC_FOLDLEVELHEADERFLAG;\n\t\t\t\tif (levelPrevious & SC_FOLDLEVELHEADERFLAG) {\n\t\t\t\t\t// previous section is empty\n\t\t\t\t\tstyler.SetLevel(lineCurrent - 1, SC_FOLDLEVELBASE);\n\t\t\t\t}\n\t\t\t} else if (levelPrevious & SC_FOLDLEVELHEADERFLAG) {\n\t\t\t\tlev += 1;\n\t\t\t}\n\n\t\t\tif (visibleChars == 0 && foldCompact)\n\t\t\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\t\t\tif (lev != styler.LevelAt(lineCurrent)) {\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\t\t\t}\n\n\t\t\tlineCurrent++;\n\t\t\tvisibleChars = 0;\n\t\t\theaderPoint = false;\n\t\t\tlevelPrevious = lev;\n\t\t}\n\t\tif (!isspacechar(ch))\n\t\t\tvisibleChars++;\n\t}\n\n\tint level = levelPrevious & SC_FOLDLEVELNUMBERMASK;\n\tif (levelPrevious & SC_FOLDLEVELHEADERFLAG) {\n\t\tlevel += 1;\n\t}\n\tconst int flagsNext = styler.LevelAt(lineCurrent);\n\tstyler.SetLevel(lineCurrent, level | (flagsNext & ~SC_FOLDLEVELNUMBERMASK));\n}\n\nconst char *const emptyWordListDesc[] = {\n\tnullptr\n};\n\n}\n\nLexerModule lmProps(SCLEX_PROPERTIES, ColourisePropsDoc, \"props\", FoldPropsDoc, emptyWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexPython.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexPython.cxx\n ** Lexer for Python.\n **/\n// Copyright 1998-2002 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <cstdlib>\n#include <cassert>\n#include <cstring>\n\n#include <string>\n#include <string_view>\n#include <vector>\n#include <map>\n#include <algorithm>\n#include <functional>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"CharacterCategory.h\"\n#include \"LexerModule.h\"\n#include \"OptionSet.h\"\n#include \"SubStyles.h\"\n#include \"DefaultLexer.h\"\n\nusing namespace Scintilla;\nusing namespace Lexilla;\n\nnamespace {\n// Use an unnamed namespace to protect the functions and classes from name conflicts\n\n/* Notes on f-strings: f-strings are strings prefixed with f (e.g. f'') that may\n   have arbitrary expressions in {}.  The tokens in the expressions are lexed as if\n   they were outside of any string.  Expressions may contain { and } characters as\n   long as there is a closing } for every {, may be 2+ lines in a triple quoted\n   string, and may have a formatting specifier following a ! or :, but both !\n   and : are valid inside of a bracketed expression and != is a valid\n   expression token even outside of a bracketed expression.\n\n   When in an f-string expression, the lexer keeps track of the state value of\n   the f-string and the nesting count for the expression (# of [, (, { seen - # of\n   }, ), ] seen).  f-strings may be nested (e.g. f'{ a + f\"{1+2}\"') so a stack of\n   states and nesting counts is kept.  If a f-string expression continues beyond\n   the end of a line, this stack is saved in a std::map that maps a line number to\n   the stack at the end of that line.  std::vector is used for the stack.\n\n   The PEP for f-strings is at https://www.python.org/dev/peps/pep-0498/\n*/\nstruct SingleFStringExpState {\n\tint state;\n\tint nestingCount;\n};\n\n/* kwCDef, kwCTypeName only used for Cython */\nenum kwType { kwOther, kwClass, kwDef, kwImport, kwCDef, kwCTypeName, kwCPDef };\n\nenum literalsAllowed { litNone = 0, litU = 1, litB = 2, litF = 4 };\n\nconstexpr int indicatorWhitespace = 1;\n\nbool IsPyComment(Accessor &styler, Sci_Position pos, Sci_Position len) {\n\treturn len > 0 && styler[pos] == '#';\n}\n\nconstexpr bool IsPyStringTypeChar(int ch, literalsAllowed allowed) noexcept {\n\treturn\n\t\t((allowed & litB) && (ch == 'b' || ch == 'B')) ||\n\t\t((allowed & litU) && (ch == 'u' || ch == 'U')) ||\n\t\t((allowed & litF) && (ch == 'f' || ch == 'F'));\n}\n\nconstexpr bool IsQuote(int ch) {\n\treturn AnyOf(ch, '\"', '\\'');\n}\n\nconstexpr bool IsRawPrefix(int ch) {\n\treturn AnyOf(ch, 'r', 'R');\n}\n\nbool IsPyStringStart(int ch, int chNext, int chNext2, literalsAllowed allowed) noexcept {\n\t// To cover both python2 and python3 lex character prefixes as --\n\t// ur'' is a string, but ru'' is not\n\t// fr'', rf'', br'', rb'' are all strings\n\tif (IsQuote(ch))\n\t\treturn true;\n\tif (IsPyStringTypeChar(ch, allowed)) {\n\t\tif (IsQuote(chNext))\n\t\t\treturn true;\n\t\tif (IsRawPrefix(chNext) && IsQuote(chNext2))\n\t\t\treturn true;\n\t}\n\tif (IsRawPrefix(ch)) {\n\t\tif (IsQuote(chNext))\n\t\t\treturn true;\n\t\tif (IsPyStringTypeChar(chNext, allowed) && !AnyOf(chNext, 'u', 'U') && IsQuote(chNext2))\n\t\t\treturn true;\n\t}\n\n\treturn false;\n}\n\nconstexpr bool IsPyFStringState(int st) noexcept {\n\treturn AnyOf(st, SCE_P_FCHARACTER, SCE_P_FSTRING, SCE_P_FTRIPLE, SCE_P_FTRIPLEDOUBLE);\n}\n\nconstexpr bool IsPySingleQuoteStringState(int st) noexcept {\n\treturn AnyOf(st, SCE_P_CHARACTER, SCE_P_STRING, SCE_P_FCHARACTER, SCE_P_FSTRING);\n}\n\nconstexpr bool IsPyTripleQuoteStringState(int st) noexcept {\n\treturn AnyOf(st, SCE_P_TRIPLE, SCE_P_TRIPLEDOUBLE, SCE_P_FTRIPLE, SCE_P_FTRIPLEDOUBLE);\n}\n\nchar GetPyStringQuoteChar(int st) noexcept {\n\tif (AnyOf(st, SCE_P_CHARACTER, SCE_P_FCHARACTER, SCE_P_TRIPLE, SCE_P_FTRIPLE))\n\t\treturn '\\'';\n\tif (AnyOf(st, SCE_P_STRING, SCE_P_FSTRING, SCE_P_TRIPLEDOUBLE, SCE_P_FTRIPLEDOUBLE))\n\t\treturn '\"';\n\n\treturn '\\0';\n}\n\nvoid PushStateToStack(int state, std::vector<SingleFStringExpState> &stack, SingleFStringExpState *&currentFStringExp) {\n\tconst SingleFStringExpState single = {state, 0};\n\tstack.push_back(single);\n\n\tcurrentFStringExp = &stack.back();\n}\n\nint PopFromStateStack(std::vector<SingleFStringExpState> &stack, SingleFStringExpState *&currentFStringExp) noexcept {\n\tint state = 0;\n\n\tif (!stack.empty()) {\n\t\tstate = stack.back().state;\n\t\tstack.pop_back();\n\t}\n\n\tif (stack.empty()) {\n\t\tcurrentFStringExp = nullptr;\n\t} else {\n\t\tcurrentFStringExp = &stack.back();\n\t}\n\n\treturn state;\n}\n\n/* Return the state to use for the string starting at i; *nextIndex will be set to the first index following the quote(s) */\nint GetPyStringState(Accessor &styler, Sci_Position i, Sci_PositionU *nextIndex, literalsAllowed allowed) {\n\tchar ch = styler.SafeGetCharAt(i);\n\tchar chNext = styler.SafeGetCharAt(i + 1);\n\tbool isFString = false;\n\n\t// Advance beyond r, a type char, or both (in either order)\n\t// Note that this depends on IsPyStringStart to enforce ru'' not being a string\n\tif (IsRawPrefix(ch)) {\n\t\ti++;\n\t\tif (IsPyStringTypeChar(chNext, allowed)) {\n\t\t\tif (AnyOf(chNext, 'f', 'F'))\n\t\t\t\tisFString = true;\n\t\t\ti++;\n\t\t}\n\t\tch = styler.SafeGetCharAt(i);\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t} else if (IsPyStringTypeChar(ch, allowed)) {\n\t\tif (AnyOf(ch, 'f', 'F'))\n\t\t\tisFString = true;\n\t\tif (IsRawPrefix(chNext))\n\t\t\ti += 2;\n\t\telse\n\t\t\ti += 1;\n\t\tch = styler.SafeGetCharAt(i);\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t}\n\n\t// ch and i will be the first quote\n\tif (!IsQuote(ch)) {\n\t\t*nextIndex = i + 1;\n\t\treturn SCE_P_DEFAULT;\n\t}\n\n\tif (ch == chNext && ch == styler.SafeGetCharAt(i + 2)) {\n\t\t*nextIndex = i + 3;\n\n\t\tif (ch == '\"')\n\t\t\treturn (isFString ? SCE_P_FTRIPLEDOUBLE : SCE_P_TRIPLEDOUBLE);\n\t\telse\n\t\t\treturn (isFString ? SCE_P_FTRIPLE : SCE_P_TRIPLE);\n\t} else {\n\t\t*nextIndex = i + 1;\n\n\t\tif (ch == '\"')\n\t\t\treturn (isFString ? SCE_P_FSTRING : SCE_P_STRING);\n\t\telse\n\t\t\treturn (isFString ? SCE_P_FCHARACTER : SCE_P_CHARACTER);\n\t}\n}\n\nbool IsAWordChar(int ch, bool unicodeIdentifiers) noexcept {\n\tif (IsASCII(ch))\n\t\treturn (IsAlphaNumeric(ch) || ch == '.' || ch == '_');\n\n\tif (!unicodeIdentifiers)\n\t\treturn false;\n\n\t// Python uses the XID_Continue set from Unicode data\n\treturn IsXidContinue(ch);\n}\n\nbool IsAWordStart(int ch, bool unicodeIdentifiers) noexcept {\n\tif (IsASCII(ch))\n\t\treturn (IsUpperOrLowerCase(ch) || ch == '_');\n\n\tif (!unicodeIdentifiers)\n\t\treturn false;\n\n\t// Python uses the XID_Start set from Unicode data\n\treturn IsXidStart(ch);\n}\n\nbool IsFirstNonWhitespace(Sci_Position pos, Accessor &styler) {\n\tconst Sci_Position line = styler.GetLine(pos);\n\tconst Sci_Position start_pos = styler.LineStart(line);\n\tfor (Sci_Position i = start_pos; i < pos; i++) {\n\t\tconst char ch = styler[i];\n\t\tif (!IsASpaceOrTab(ch))\n\t\t\treturn false;\n\t}\n\treturn true;\n}\n\nunsigned char GetNextNonWhitespaceChar(Accessor &styler, Sci_PositionU pos, Sci_PositionU maxPos, Sci_PositionU *charPosPtr = nullptr) {\n\twhile (pos < maxPos) {\n\t\tconst unsigned char ch = styler.SafeGetCharAt(pos, '\\0');\n\t\tif (!AnyOf(ch, ' ', '\\t', '\\n', '\\r')) {\n\t\t\tif (charPosPtr != nullptr) {\n\t\t\t\t*charPosPtr = pos;\n\t\t\t}\n\t\t\treturn ch;\n\t\t}\n\t\tpos++;\n\t}\n\n\treturn '\\0';\n}\n\n// Returns whether symbol is \"match\" or \"case\" and it is an identifier &\n// not a keyword. Does not require the line to end with : so \"match\\n\"\n// and \"match (x)\\n\" return false because match could be a keyword once\n// more text is added\nbool IsMatchOrCaseIdentifier(const StyleContext &sc, Accessor &styler, const char *symbol) {\n\tif (strcmp(symbol, \"match\") != 0 && strcmp(symbol, \"case\") != 0) {\n\t\treturn false;\n\t}\n\n\tif (!IsFirstNonWhitespace(sc.currentPos - strlen(symbol), styler)) {\n\t\treturn true;\n\t}\n\n\t// The match keyword can be followed by an expression; the case keyword\n\t// is a bit more restrictive but not much. Here, we look for the next\n\t// char and return false if the char cannot start an expression; for '.'\n\t// we look at the following char to see if it's a digit because .1 is a\n\t// number\n\tSci_PositionU nextCharPos = 0;\n\tconst unsigned char nextChar = GetNextNonWhitespaceChar(styler, sc.currentPos, sc.lineEnd, &nextCharPos);\n\tif (nextChar == '=' || nextChar == '#') {\n\t\treturn true;\n\t}\n\tif (nextChar == '.' && nextCharPos >= sc.currentPos) {\n\t\tconst unsigned char followingChar = GetNextNonWhitespaceChar(styler, nextCharPos+1, sc.lineEnd);\n\t\tif (!IsADigit(followingChar)) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\n\n// Options used for LexerPython\nstruct OptionsPython {\n\tint whingeLevel = 0;\n\tbool base2or8Literals = true;\n\tbool stringsU = true;\n\tbool stringsB = true;\n\tbool stringsF = true;\n\tbool stringsOverNewline = false;\n\tbool keywords2NoSubIdentifiers = false;\n\tbool fold = false;\n\tbool foldQuotes = false;\n\tbool foldCompact = false;\n\tbool unicodeIdentifiers = true;\n\tint identifierAttributes = 0;\n\tint decoratorAttributes = 0;\n\tbool pep701StringsF = true;\n\n\t[[nodiscard]] literalsAllowed AllowedLiterals() const noexcept {\n\t\tliteralsAllowed allowedLiterals = stringsU ? litU : litNone;\n\t\tif (stringsB)\n\t\t\tallowedLiterals = static_cast<literalsAllowed>(allowedLiterals | litB);\n\t\tif (stringsF)\n\t\t\tallowedLiterals = static_cast<literalsAllowed>(allowedLiterals | litF);\n\t\treturn allowedLiterals;\n\t}\n};\n\nconst char *const pythonWordListDesc[] = {\n\t\"Keywords\",\n\t\"Highlighted identifiers\",\n\tnullptr\n};\n\nstruct OptionSetPython : public OptionSet<OptionsPython> {\n\tOptionSetPython() {\n\t\tDefineProperty(\"tab.timmy.whinge.level\", &OptionsPython::whingeLevel,\n\t\t\t       \"For Python code, checks whether indenting is consistent. \"\n\t\t\t       \"The default, 0 turns off indentation checking, \"\n\t\t\t       \"1 checks whether each line is potentially inconsistent with the previous line, \"\n\t\t\t       \"2 checks whether any space characters occur before a tab character in the indentation, \"\n\t\t\t       \"3 checks whether any spaces are in the indentation, and \"\n\t\t\t       \"4 checks for any tab characters in the indentation. \"\n\t\t\t       \"1 is a good level to use.\");\n\n\t\tDefineProperty(\"lexer.python.literals.binary\", &OptionsPython::base2or8Literals,\n\t\t\t       \"Set to 0 to not recognise Python 3 binary and octal literals: 0b1011 0o712.\");\n\n\t\tDefineProperty(\"lexer.python.strings.u\", &OptionsPython::stringsU,\n\t\t\t       \"Set to 0 to not recognise Python Unicode literals u\\\"x\\\" as used before Python 3.\");\n\n\t\tDefineProperty(\"lexer.python.strings.b\", &OptionsPython::stringsB,\n\t\t\t       \"Set to 0 to not recognise Python 3 bytes literals b\\\"x\\\".\");\n\n\t\tDefineProperty(\"lexer.python.strings.f\", &OptionsPython::stringsF,\n\t\t\t       \"Set to 0 to not recognise Python 3.6 f-string literals f\\\"var={var}\\\".\");\n\n\t\tDefineProperty(\"lexer.python.strings.f.pep.701\", &OptionsPython::pep701StringsF,\n\t\t\t       \"Set to 0 to use pre-PEP 701 / Python 3.12 f-string lexing.\");\n\n\t\tDefineProperty(\"lexer.python.strings.over.newline\", &OptionsPython::stringsOverNewline,\n\t\t\t       \"Set to 1 to allow strings to span newline characters.\");\n\n\t\tDefineProperty(\"lexer.python.keywords2.no.sub.identifiers\", &OptionsPython::keywords2NoSubIdentifiers,\n\t\t\t       \"When enabled, it will not style keywords2 items that are used as a sub-identifier. \"\n\t\t\t       \"Example: when set, will not highlight \\\"foo.open\\\" when \\\"open\\\" is a keywords2 item.\");\n\n\t\tDefineProperty(\"fold\", &OptionsPython::fold);\n\n\t\tDefineProperty(\"fold.quotes.python\", &OptionsPython::foldQuotes,\n\t\t\t       \"This option enables folding multi-line quoted strings when using the Python lexer.\");\n\n\t\tDefineProperty(\"fold.compact\", &OptionsPython::foldCompact);\n\n\t\tDefineProperty(\"lexer.python.unicode.identifiers\", &OptionsPython::unicodeIdentifiers,\n\t\t\t       \"Set to 0 to not recognise Python 3 Unicode identifiers.\");\n\n\t\tDefineProperty(\"lexer.python.identifier.attributes\", &OptionsPython::identifierAttributes,\n\t\t\t       \"Set to 1 to recognise Python identifier attributes.\");\n\n\t\tDefineProperty(\"lexer.python.decorator.attributes\", &OptionsPython::decoratorAttributes,\n\t\t\t       \"Set to 1 to recognise Python decorator attributes.\");\n\n\t\tDefineWordListSets(pythonWordListDesc);\n\t}\n};\n\nconst char styleSubable[] = { SCE_P_IDENTIFIER, 0 };\n\nconst LexicalClass lexicalClasses[] = {\n\t// Lexer Python SCLEX_PYTHON SCE_P_:\n\t0, \"SCE_P_DEFAULT\", \"default\", \"White space\",\n\t1, \"SCE_P_COMMENTLINE\", \"comment line\", \"Comment\",\n\t2, \"SCE_P_NUMBER\", \"literal numeric\", \"Number\",\n\t3, \"SCE_P_STRING\", \"literal string\", \"String\",\n\t4, \"SCE_P_CHARACTER\", \"literal string\", \"Single quoted string\",\n\t5, \"SCE_P_WORD\", \"keyword\", \"Keyword\",\n\t6, \"SCE_P_TRIPLE\", \"literal string\", \"Triple quotes\",\n\t7, \"SCE_P_TRIPLEDOUBLE\", \"literal string\", \"Triple double quotes\",\n\t8, \"SCE_P_CLASSNAME\", \"identifier\", \"Class name definition\",\n\t9, \"SCE_P_DEFNAME\", \"identifier\", \"Function or method name definition\",\n\t10, \"SCE_P_OPERATOR\", \"operator\", \"Operators\",\n\t11, \"SCE_P_IDENTIFIER\", \"identifier\", \"Identifiers\",\n\t12, \"SCE_P_COMMENTBLOCK\", \"comment\", \"Comment-blocks\",\n\t13, \"SCE_P_STRINGEOL\", \"error literal string\", \"End of line where string is not closed\",\n\t14, \"SCE_P_WORD2\", \"identifier\", \"Highlighted identifiers\",\n\t15, \"SCE_P_DECORATOR\", \"preprocessor\", \"Decorators\",\n\t16, \"SCE_P_FSTRING\", \"literal string interpolated\", \"F-String\",\n\t17, \"SCE_P_FCHARACTER\", \"literal string interpolated\", \"Single quoted f-string\",\n\t18, \"SCE_P_FTRIPLE\", \"literal string interpolated\", \"Triple quoted f-string\",\n\t19, \"SCE_P_FTRIPLEDOUBLE\", \"literal string interpolated\", \"Triple double quoted f-string\",\n\t20, \"SCE_P_ATTRIBUTE\", \"identifier\", \"Attribute of identifier\",\n};\n\nclass LexerPython : public DefaultLexer {\n\tWordList keywords;\n\tWordList keywords2;\n\tOptionsPython options;\n\tOptionSetPython osPython;\n\tenum { ssIdentifier };\n\tSubStyles subStyles{styleSubable};\n\tstd::map<Sci_Position, std::vector<SingleFStringExpState> > ftripleStateAtEol;\npublic:\n\texplicit LexerPython() :\n\t\tDefaultLexer(\"python\", SCLEX_PYTHON, lexicalClasses, std::size(lexicalClasses)) {\n\t}\n\t~LexerPython() override = default;\n\tvoid SCI_METHOD Release() override {\n\t\tdelete this;\n\t}\n\tint SCI_METHOD Version() const override {\n\t\treturn lvRelease5;\n\t}\n\tconst char *SCI_METHOD PropertyNames() override {\n\t\treturn osPython.PropertyNames();\n\t}\n\tint SCI_METHOD PropertyType(const char *name) override {\n\t\treturn osPython.PropertyType(name);\n\t}\n\tconst char *SCI_METHOD DescribeProperty(const char *name) override {\n\t\treturn osPython.DescribeProperty(name);\n\t}\n\tSci_Position SCI_METHOD PropertySet(const char *key, const char *val) override;\n\tconst char *SCI_METHOD PropertyGet(const char *key) override {\n\t\treturn osPython.PropertyGet(key);\n\t}\n\tconst char *SCI_METHOD DescribeWordListSets() override {\n\t\treturn osPython.DescribeWordListSets();\n\t}\n\tSci_Position SCI_METHOD WordListSet(int n, const char *wl) override;\n\tvoid SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;\n\tvoid SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;\n\n\tvoid *SCI_METHOD PrivateCall(int, void *) override {\n\t\treturn nullptr;\n\t}\n\n\tint SCI_METHOD LineEndTypesSupported() override {\n\t\treturn SC_LINE_END_TYPE_UNICODE;\n\t}\n\n\tint SCI_METHOD AllocateSubStyles(int styleBase, int numberStyles) override {\n\t\treturn subStyles.Allocate(styleBase, numberStyles);\n\t}\n\tint SCI_METHOD SubStylesStart(int styleBase) override {\n\t\treturn subStyles.Start(styleBase);\n\t}\n\tint SCI_METHOD SubStylesLength(int styleBase) override {\n\t\treturn subStyles.Length(styleBase);\n\t}\n\tint SCI_METHOD StyleFromSubStyle(int subStyle) override {\n\t\tconst int styleBase = subStyles.BaseStyle(subStyle);\n\t\treturn styleBase;\n\t}\n\tint SCI_METHOD PrimaryStyleFromStyle(int style) override {\n\t\treturn style;\n\t}\n\tvoid SCI_METHOD FreeSubStyles() override {\n\t\tsubStyles.Free();\n\t}\n\tvoid SCI_METHOD SetIdentifiers(int style, const char *identifiers) override {\n\t\tsubStyles.SetIdentifiers(style, identifiers);\n\t}\n\tint SCI_METHOD DistanceToSecondaryStyles() override {\n\t\treturn 0;\n\t}\n\tconst char *SCI_METHOD GetSubStyleBases() override {\n\t\treturn styleSubable;\n\t}\n\n\tstatic ILexer5 *LexerFactoryPython() {\n\t\treturn new LexerPython();\n\t}\n\nprivate:\n\tvoid ProcessLineEnd(StyleContext &sc, std::vector<SingleFStringExpState> &fstringStateStack, SingleFStringExpState *&currentFStringExp, bool &inContinuedString);\n};\n\nSci_Position SCI_METHOD LexerPython::PropertySet(const char *key, const char *val) {\n\tif (osPython.PropertySet(&options, key, val)) {\n\t\treturn 0;\n\t}\n\treturn -1;\n}\n\nSci_Position SCI_METHOD LexerPython::WordListSet(int n, const char *wl) {\n\tWordList *wordListN = nullptr;\n\tswitch (n) {\n\tcase 0:\n\t\twordListN = &keywords;\n\t\tbreak;\n\tcase 1:\n\t\twordListN = &keywords2;\n\t\tbreak;\n\tdefault:\n\t\tbreak;\n\t}\n\tSci_Position firstModification = -1;\n\tif (wordListN) {\n\t\tif (wordListN->Set(wl)) {\n\t\t\tfirstModification = 0;\n\t\t}\n\t}\n\treturn firstModification;\n}\n\nvoid LexerPython::ProcessLineEnd(StyleContext &sc, std::vector<SingleFStringExpState> &fstringStateStack, SingleFStringExpState *&currentFStringExp, bool &inContinuedString) {\n\t// Before pep 701 single quote f-string's could not continue to a 2nd+ line\n\t// Post pep 701, they can continue both with a trailing \\ and if a { field is\n\t// not ended with a }\n\tif (!options.pep701StringsF) {\n\t\tlong deepestSingleStateIndex = -1;\n\t\tunsigned long i;\n\n\t\t// Find the deepest single quote state because that string will end; no \\ continuation in f-string\n\t\tfor (i = 0; i < fstringStateStack.size(); i++) {\n\t\t\tif (IsPySingleQuoteStringState(fstringStateStack[i].state)) {\n\t\t\t\tdeepestSingleStateIndex = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (deepestSingleStateIndex != -1) {\n\t\t\tsc.SetState(fstringStateStack[deepestSingleStateIndex].state);\n\t\t\twhile (fstringStateStack.size() > static_cast<unsigned long>(deepestSingleStateIndex)) {\n\t\t\t\tPopFromStateStack(fstringStateStack, currentFStringExp);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (!fstringStateStack.empty()) {\n\t\tstd::pair<Sci_Position, std::vector<SingleFStringExpState> > val;\n\t\tval.first = sc.currentLine;\n\t\tval.second = fstringStateStack;\n\n\t\tftripleStateAtEol.insert(val);\n\t}\n\n\tif ((sc.state == SCE_P_DEFAULT)\n\t\t\t|| IsPyTripleQuoteStringState(sc.state)) {\n\t\t// Perform colourisation of white space and triple quoted strings at end of each line to allow\n\t\t// tab marking to work inside white space and triple quoted strings\n\t\tsc.SetState(sc.state);\n\t}\n\tif (IsPySingleQuoteStringState(sc.state)) {\n\t\tif (inContinuedString || options.stringsOverNewline) {\n\t\t\tinContinuedString = false;\n\t\t} else {\n\t\t\tsc.ChangeState(SCE_P_STRINGEOL);\n\t\t\tsc.ForwardSetState(SCE_P_DEFAULT);\n\t\t}\n\t}\n}\n\nvoid SCI_METHOD LexerPython::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) {\n\tAccessor styler(pAccess, nullptr);\n\n\t// Track whether in f-string expression; vector is used for a stack to\n\t// handle nested f-strings such as f\"\"\"{f'''{f\"{f'{1}'}\"}'''}\"\"\"\n\tstd::vector<SingleFStringExpState> fstringStateStack;\n\tSingleFStringExpState *currentFStringExp = nullptr;\n\n\tconst Sci_Position endPos = startPos + length;\n\n\t// Backtrack to previous line in case need to fix its tab whinging\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tif (startPos > 0) {\n\t\tif (lineCurrent > 0) {\n\t\t\tlineCurrent--;\n\t\t\t// Look for backslash-continued lines\n\t\t\twhile (lineCurrent > 0) {\n\t\t\t\tconst Sci_Position eolPos = styler.LineStart(lineCurrent) - 1;\n\t\t\t\tconst int eolStyle = styler.StyleIndexAt(eolPos);\n\t\t\t\tif (AnyOf(eolStyle, SCE_P_STRING, SCE_P_CHARACTER, SCE_P_STRINGEOL)) {\n\t\t\t\t\tlineCurrent -= 1;\n\t\t\t\t} else {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tstartPos = styler.LineStart(lineCurrent);\n\t\t}\n\t\tinitStyle = startPos == 0 ? SCE_P_DEFAULT : styler.StyleIndexAt(startPos - 1);\n\t}\n\n\tconst literalsAllowed allowedLiterals = options.AllowedLiterals();\n\n\tif (initStyle == SCE_P_STRINGEOL) {\n\t\tinitStyle = SCE_P_DEFAULT;\n\t}\n\n\t// Set up fstate stack from last line and remove any subsequent ftriple at eol states\n\tstd::map<Sci_Position, std::vector<SingleFStringExpState> >::iterator it;\n\tit = ftripleStateAtEol.find(lineCurrent - 1);\n\tif (it != ftripleStateAtEol.end() && !it->second.empty()) {\n\t\tfstringStateStack = it->second;\n\t\tcurrentFStringExp = &fstringStateStack.back();\n\t}\n\tit = ftripleStateAtEol.lower_bound(lineCurrent);\n\tif (it != ftripleStateAtEol.end()) {\n\t\tftripleStateAtEol.erase(it, ftripleStateAtEol.end());\n\t}\n\n\tkwType kwLast = kwOther;\n\tint spaceFlags = 0;\n\tstyler.IndentAmount(lineCurrent, &spaceFlags, IsPyComment);\n\tbool base_n_number = false;\n\n\tconst WordClassifier &classifierIdentifiers = subStyles.Classifier(SCE_P_IDENTIFIER);\n\n\tStyleContext sc(startPos, endPos - startPos, initStyle, styler);\n\n\tbool indentGood = true;\n\tSci_Position startIndicator = sc.currentPos;\n\tbool inContinuedString = false;\n\n\tfor (; sc.More(); sc.Forward()) {\n\n\t\tif (sc.atLineStart) {\n\t\t\tstyler.IndentAmount(lineCurrent, &spaceFlags, IsPyComment);\n\t\t\tindentGood = true;\n\t\t\tif (options.whingeLevel == 1) {\n\t\t\t\tindentGood = (spaceFlags & wsInconsistent) == 0;\n\t\t\t} else if (options.whingeLevel == 2) {\n\t\t\t\tindentGood = (spaceFlags & wsSpaceTab) == 0;\n\t\t\t} else if (options.whingeLevel == 3) {\n\t\t\t\tindentGood = (spaceFlags & wsSpace) == 0;\n\t\t\t} else if (options.whingeLevel == 4) {\n\t\t\t\tindentGood = (spaceFlags & wsTab) == 0;\n\t\t\t}\n\t\t\tif (!indentGood) {\n\t\t\t\tstyler.IndicatorFill(startIndicator, sc.currentPos, indicatorWhitespace, 0);\n\t\t\t\tstartIndicator = sc.currentPos;\n\t\t\t}\n\t\t}\n\n\t\tif (sc.atLineEnd) {\n\t\t\tProcessLineEnd(sc, fstringStateStack, currentFStringExp, inContinuedString);\n\t\t\tlineCurrent++;\n\t\t\tif (!sc.More())\n\t\t\t\tbreak;\n\t\t}\n\n\t\tbool needEOLCheck = false;\n\n\n\t\tif (sc.state == SCE_P_OPERATOR) {\n\t\t\tkwLast = kwOther;\n\t\t\tsc.SetState(SCE_P_DEFAULT);\n\t\t} else if (sc.state == SCE_P_NUMBER) {\n\t\t\tif (!IsAWordChar(sc.ch, false) &&\n\t\t\t\t\t!(!base_n_number && ((sc.ch == '+' || sc.ch == '-') && (sc.chPrev == 'e' || sc.chPrev == 'E')))) {\n\t\t\t\tsc.SetState(SCE_P_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_P_IDENTIFIER) {\n\t\t\tif ((sc.ch == '.') || (!IsAWordChar(sc.ch, options.unicodeIdentifiers))) {\n\t\t\t\tchar identifier[100];\n\t\t\t\tsc.GetCurrent(identifier, sizeof(identifier));\n\t\t\t\tint style = SCE_P_IDENTIFIER;\n\t\t\t\tif ((kwLast == kwImport) && (strcmp(identifier, \"as\") == 0)) {\n\t\t\t\t\tstyle = SCE_P_WORD;\n\t\t\t\t} else if (keywords.InList(identifier) && !IsMatchOrCaseIdentifier(sc, styler, identifier)) {\n\t\t\t\t\tstyle = SCE_P_WORD;\n\t\t\t\t} else if (kwLast == kwClass) {\n\t\t\t\t\tstyle = SCE_P_CLASSNAME;\n\t\t\t\t} else if (kwLast == kwDef) {\n\t\t\t\t\tstyle = SCE_P_DEFNAME;\n\t\t\t\t} else if (kwLast == kwCDef || kwLast == kwCPDef) {\n\t\t\t\t\tSci_Position pos = sc.currentPos;\n\t\t\t\t\tunsigned char ch = styler.SafeGetCharAt(pos, '\\0');\n\t\t\t\t\twhile (ch != '\\0') {\n\t\t\t\t\t\tif (ch == '(') {\n\t\t\t\t\t\t\tstyle = SCE_P_DEFNAME;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if (ch == ':') {\n\t\t\t\t\t\t\tstyle = SCE_P_CLASSNAME;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if (ch == ' ' || ch == '\\t' || ch == '\\n' || ch == '\\r') {\n\t\t\t\t\t\t\tpos++;\n\t\t\t\t\t\t\tch = styler.SafeGetCharAt(pos, '\\0');\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (keywords2.InList(identifier)) {\n\t\t\t\t\tif (options.keywords2NoSubIdentifiers) {\n\t\t\t\t\t\t// We don't want to highlight keywords2\n\t\t\t\t\t\t// that are used as a sub-identifier,\n\t\t\t\t\t\t// i.e. not open in \"foo.open\".\n\t\t\t\t\t\tconst Sci_Position pos = styler.GetStartSegment() - 1;\n\t\t\t\t\t\tif (pos < 0 || (styler.SafeGetCharAt(pos, '\\0') != '.'))\n\t\t\t\t\t\t\tstyle = SCE_P_WORD2;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstyle = SCE_P_WORD2;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tconst int subStyle = classifierIdentifiers.ValueFor(identifier);\n\t\t\t\t\tif (subStyle >= 0) {\n\t\t\t\t\t\tstyle = subStyle;\n\t\t\t\t\t}\n\t\t\t\t\tif (options.identifierAttributes > 0 || options.decoratorAttributes > 0) {\n\t\t\t\t\t\t// Does the user even want attributes styled?\n\t\t\t\t\t\tSci_Position pos = styler.GetStartSegment() - 1;\n\t\t\t\t\t\tunsigned char ch = styler.SafeGetCharAt(pos, '\\0');\n\t\t\t\t\t\twhile (ch != '\\0' && (ch == '.' || ch == ' ' || ch == '\\\\' || ch == '\\t' || ch == '\\n' || ch == '\\r')) {\n\t\t\t\t\t\t\t// Backwards search for a . while only allowing certain valid characters\n\t\t\t\t\t\t\tif (IsAWordChar(ch, options.unicodeIdentifiers)) {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tpos--;\n\t\t\t\t\t\t\tch = styler.SafeGetCharAt(pos, '\\0');\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (pos < 0 || ch == '.') {\n\t\t\t\t\t\t\t// Is this an attribute we could style? if it is, do as asked\n\t\t\t\t\t\t\tbool isComment = false;\n\t\t\t\t\t\t\tbool isDecoratorAttribute = false;\n\t\t\t\t\t\t\tconst Sci_Position attrLine = styler.GetLine(pos);\n\t\t\t\t\t\t\tfor (Sci_Position i = styler.LineStart(attrLine); i < pos; i++) {\n\t\t\t\t\t\t\t\tconst char attrCh = styler[i];\n\t\t\t\t\t\t\t\tif (attrCh == '@')\n\t\t\t\t\t\t\t\t\tisDecoratorAttribute = true;\n\t\t\t\t\t\t\t\tif (attrCh == '#')\n\t\t\t\t\t\t\t\t\tisComment = true;\n\t\t\t\t\t\t\t\t// Detect if this attribute belongs to a decorator\n\t\t\t\t\t\t\t\tif (!IsASpaceOrTab(ch))\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (((isDecoratorAttribute) && (!isComment)) && (((options.decoratorAttributes == 1)  && (style == SCE_P_IDENTIFIER)) || (options.decoratorAttributes == 2))) {\n\t\t\t\t\t\t\t\t// Style decorator attributes as decorators but respect already styled identifiers (unless requested to ignore already styled identifiers)\n\t\t\t\t\t\t\t\tstyle = SCE_P_DECORATOR;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (((!isDecoratorAttribute) && (!isComment)) && (((options.identifierAttributes == 1) && (style == SCE_P_IDENTIFIER)) || (options.identifierAttributes == 2))) {\n\t\t\t\t\t\t\t\t// Style attributes and ignore decorator attributes but respect already styled identifiers (unless requested to ignore already styled identifiers)\n\t\t\t\t\t\t\t\tstyle = SCE_P_ATTRIBUTE;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsc.ChangeState(style);\n\t\t\t\tsc.SetState(SCE_P_DEFAULT);\n\t\t\t\tif (style == SCE_P_WORD) {\n\t\t\t\t\tif (0 == strcmp(identifier, \"class\"))\n\t\t\t\t\t\tkwLast = kwClass;\n\t\t\t\t\telse if (0 == strcmp(identifier, \"def\"))\n\t\t\t\t\t\tkwLast = kwDef;\n\t\t\t\t\telse if (0 == strcmp(identifier, \"import\"))\n\t\t\t\t\t\tkwLast = kwImport;\n\t\t\t\t\telse if (0 == strcmp(identifier, \"cdef\"))\n\t\t\t\t\t\tkwLast = kwCDef;\n\t\t\t\t\telse if (0 == strcmp(identifier, \"cpdef\"))\n\t\t\t\t\t\tkwLast = kwCPDef;\n\t\t\t\t\telse if (0 == strcmp(identifier, \"cimport\"))\n\t\t\t\t\t\tkwLast = kwImport;\n\t\t\t\t\telse if (kwLast != kwCDef && kwLast != kwCPDef)\n\t\t\t\t\t\tkwLast = kwOther;\n\t\t\t\t} else if (kwLast != kwCDef && kwLast != kwCPDef) {\n\t\t\t\t\tkwLast = kwOther;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if ((sc.state == SCE_P_COMMENTLINE) || (sc.state == SCE_P_COMMENTBLOCK)) {\n\t\t\tif (sc.ch == '\\r' || sc.ch == '\\n') {\n\t\t\t\tsc.SetState(SCE_P_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_P_DECORATOR) {\n\t\t\tif (!IsAWordStart(sc.ch, options.unicodeIdentifiers)) {\n\t\t\t\tsc.SetState(SCE_P_DEFAULT);\n\t\t\t}\n\t\t} else if (IsPySingleQuoteStringState(sc.state)) {\n\t\t\tif (sc.ch == '\\\\') {\n\t\t\t\tif ((sc.chNext == '\\r') && (sc.GetRelative(2) == '\\n')) {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t}\n\t\t\t\tif (sc.chNext == '\\n' || sc.chNext == '\\r') {\n\t\t\t\t\tinContinuedString = true;\n\t\t\t\t} else {\n\t\t\t\t\t// Don't roll over the newline.\n\t\t\t\t\tsc.Forward();\n\t\t\t\t}\n\t\t\t} else if (sc.ch == GetPyStringQuoteChar(sc.state)) {\n\t\t\t\tsc.ForwardSetState(SCE_P_DEFAULT);\n\t\t\t\tneedEOLCheck = true;\n\t\t\t}\n\t\t} else if ((sc.state == SCE_P_TRIPLE) || (sc.state == SCE_P_FTRIPLE)) {\n\t\t\tif (sc.ch == '\\\\') {\n\t\t\t\tsc.Forward();\n\t\t\t} else if (sc.Match(R\"(''')\")) {\n\t\t\t\tsc.Forward();\n\t\t\t\tsc.Forward();\n\t\t\t\tsc.ForwardSetState(SCE_P_DEFAULT);\n\t\t\t\tneedEOLCheck = true;\n\t\t\t}\n\t\t} else if ((sc.state == SCE_P_TRIPLEDOUBLE) || (sc.state == SCE_P_FTRIPLEDOUBLE)) {\n\t\t\tif (sc.ch == '\\\\') {\n\t\t\t\tsc.Forward();\n\t\t\t} else if (sc.Match(R\"(\"\"\")\")) {\n\t\t\t\tsc.Forward();\n\t\t\t\tsc.Forward();\n\t\t\t\tsc.ForwardSetState(SCE_P_DEFAULT);\n\t\t\t\tneedEOLCheck = true;\n\t\t\t}\n\t\t}\n\n\t\t// Note if used and not if else because string states also match\n\t\t// some of the above clauses\n\t\tif (IsPyFStringState(sc.state) && sc.ch == '{') {\n\t\t\tif (sc.chNext == '{') {\n\t\t\t\tsc.Forward();\n\t\t\t} else {\n\t\t\t\tPushStateToStack(sc.state, fstringStateStack, currentFStringExp);\n\t\t\t\tsc.ForwardSetState(SCE_P_DEFAULT);\n\t\t\t}\n\t\t\tneedEOLCheck = true;\n\t\t}\n\n\t\t// If in an f-string expression and pre pep 701 lexing is used,\n\t\t// check for the ending quote(s) and end f-string to handle\n\t\t// syntactically incorrect cases like f'{' and f\"\"\"{\"\"\". Post\n\t\t// pep 701, a quote may appear in a { } field so cases like\n\t\t// f\"n = {\":\".join(seq)}\" is valid\n\t\tif (!options.pep701StringsF && !fstringStateStack.empty() && IsQuote(sc.ch)) {\n\t\t\tlong matching_stack_i = -1;\n\t\t\tfor (unsigned long stack_i = 0; stack_i < fstringStateStack.size() && matching_stack_i == -1; stack_i++) {\n\t\t\t\tconst int stack_state = fstringStateStack[stack_i].state;\n\t\t\t\tconst char quote = GetPyStringQuoteChar(stack_state);\n\t\t\t\tif (sc.ch == quote) {\n\t\t\t\t\tif (IsPySingleQuoteStringState(stack_state)) {\n\t\t\t\t\t\tmatching_stack_i = stack_i;\n\t\t\t\t\t} else if (quote == '\"' ? sc.Match(R\"(\"\"\")\") : sc.Match(\"'''\")) {\n\t\t\t\t\t\tmatching_stack_i = stack_i;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (matching_stack_i != -1) {\n\t\t\t\tsc.SetState(fstringStateStack[matching_stack_i].state);\n\t\t\t\tif (IsPyTripleQuoteStringState(fstringStateStack[matching_stack_i].state)) {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\tsc.Forward();\n\t\t\t\t}\n\t\t\t\tsc.ForwardSetState(SCE_P_DEFAULT);\n\t\t\t\tneedEOLCheck = true;\n\n\t\t\t\twhile (fstringStateStack.size() > static_cast<unsigned long>(matching_stack_i)) {\n\t\t\t\t\tPopFromStateStack(fstringStateStack, currentFStringExp);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// End of code to find the end of a state\n\n\t\tif (!indentGood && !IsASpaceOrTab(sc.ch)) {\n\t\t\tstyler.IndicatorFill(startIndicator, sc.currentPos, indicatorWhitespace, 1);\n\t\t\tstartIndicator = sc.currentPos;\n\t\t\tindentGood = true;\n\t\t}\n\n\t\t// One cdef or cpdef line, clear kwLast only at end of line\n\t\tif ((kwLast == kwCDef || kwLast == kwCPDef) && sc.atLineEnd) {\n\t\t\tkwLast = kwOther;\n\t\t}\n\n\t\t// State exit code may have moved on to end of line\n\t\tif (needEOLCheck && sc.atLineEnd) {\n\t\t\tProcessLineEnd(sc, fstringStateStack, currentFStringExp, inContinuedString);\n\t\t\tlineCurrent++;\n\t\t\tstyler.IndentAmount(lineCurrent, &spaceFlags, IsPyComment);\n\t\t\tif (!sc.More())\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// If in f-string expression, check for }, :, ! to resume f-string state or update nesting count\n\t\tif (currentFStringExp && !IsPySingleQuoteStringState(sc.state) && !IsPyTripleQuoteStringState(sc.state)) {\n\t\t\tif (currentFStringExp->nestingCount == 0 && (sc.ch == '}' || sc.ch == ':' || (sc.ch == '!' && sc.chNext != '='))) {\n\t\t\t\tsc.SetState(PopFromStateStack(fstringStateStack, currentFStringExp));\n\t\t\t} else {\n\t\t\t\tif (sc.ch == '{' || sc.ch == '[' || sc.ch == '(') {\n\t\t\t\t\tcurrentFStringExp->nestingCount++;\n\t\t\t\t} else if (sc.ch == '}' || sc.ch == ']' || sc.ch == ')') {\n\t\t\t\t\tcurrentFStringExp->nestingCount--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Check for a new state starting character\n\t\tif (sc.state == SCE_P_DEFAULT) {\n\t\t\tif (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) {\n\t\t\t\tif (sc.ch == '0' && (sc.chNext == 'x' || sc.chNext == 'X')) {\n\t\t\t\t\tbase_n_number = true;\n\t\t\t\t\tsc.SetState(SCE_P_NUMBER);\n\t\t\t\t} else if (sc.ch == '0' &&\n\t\t\t\t\t\t(sc.chNext == 'o' || sc.chNext == 'O' || sc.chNext == 'b' || sc.chNext == 'B')) {\n\t\t\t\t\tif (options.base2or8Literals) {\n\t\t\t\t\t\tbase_n_number = true;\n\t\t\t\t\t\tsc.SetState(SCE_P_NUMBER);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsc.SetState(SCE_P_NUMBER);\n\t\t\t\t\t\tsc.ForwardSetState(SCE_P_IDENTIFIER);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tbase_n_number = false;\n\t\t\t\t\tsc.SetState(SCE_P_NUMBER);\n\t\t\t\t}\n\t\t\t} else if (isoperator(sc.ch) || sc.ch == '`') {\n\t\t\t\tsc.SetState(SCE_P_OPERATOR);\n\t\t\t} else if (sc.ch == '#') {\n\t\t\t\tsc.SetState(sc.chNext == '#' ? SCE_P_COMMENTBLOCK : SCE_P_COMMENTLINE);\n\t\t\t} else if (sc.ch == '@') {\n\t\t\t\tif (IsFirstNonWhitespace(sc.currentPos, styler))\n\t\t\t\t\tsc.SetState(SCE_P_DECORATOR);\n\t\t\t\telse\n\t\t\t\t\tsc.SetState(SCE_P_OPERATOR);\n\t\t\t} else if (IsPyStringStart(sc.ch, sc.chNext, sc.GetRelative(2), allowedLiterals)) {\n\t\t\t\tSci_PositionU nextIndex = 0;\n\t\t\t\tsc.SetState(GetPyStringState(styler, sc.currentPos, &nextIndex, allowedLiterals));\n\t\t\t\twhile (nextIndex > (sc.currentPos + 1) && sc.More()) {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t}\n\t\t\t} else if (IsAWordStart(sc.ch, options.unicodeIdentifiers)) {\n\t\t\t\tsc.SetState(SCE_P_IDENTIFIER);\n\t\t\t}\n\t\t}\n\t}\n\tstyler.IndicatorFill(startIndicator, sc.currentPos, indicatorWhitespace, 0);\n\tsc.Complete();\n}\n\nbool IsCommentLine(Sci_Position line, Accessor &styler) {\n\tconst Sci_Position pos = styler.LineStart(line);\n\tconst Sci_Position eol_pos = styler.LineStart(line + 1) - 1;\n\tfor (Sci_Position i = pos; i < eol_pos; i++) {\n\t\tconst char ch = styler[i];\n\t\tif (ch == '#')\n\t\t\treturn true;\n\t\tif (!IsASpaceOrTab(ch))\n\t\t\treturn false;\n\t}\n\treturn false;\n}\n\nbool IsQuoteLine(Sci_Position line, const Accessor &styler) {\n\tconst int style = styler.StyleIndexAt(styler.LineStart(line));\n\treturn IsPyTripleQuoteStringState(style);\n}\n\n\nvoid SCI_METHOD LexerPython::Fold(Sci_PositionU startPos, Sci_Position length, int /*initStyle - unused*/, IDocument *pAccess) {\n\tif (!options.fold)\n\t\treturn;\n\n\tAccessor styler(pAccess, nullptr);\n\n\tconst Sci_Position maxPos = startPos + length;\n\tconst Sci_Position maxLines = (maxPos == styler.Length()) ? styler.GetLine(maxPos) : styler.GetLine(maxPos - 1);\t// Requested last line\n\tconst Sci_Position docLines = styler.GetLine(styler.Length());\t// Available last line\n\n\t// Backtrack to previous non-blank line so we can determine indent level\n\t// for any white space lines (needed esp. within triple quoted strings)\n\t// and so we can fix any preceding fold level (which is why we go back\n\t// at least one line in all cases)\n\tint spaceFlags = 0;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tint indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags, nullptr);\n\twhile (lineCurrent > 0) {\n\t\tlineCurrent--;\n\t\tindentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags, nullptr);\n\t\tif (!(indentCurrent & SC_FOLDLEVELWHITEFLAG) &&\n\t\t\t\t(!IsCommentLine(lineCurrent, styler)) &&\n\t\t\t\t(!IsQuoteLine(lineCurrent, styler)))\n\t\t\tbreak;\n\t}\n\tint indentCurrentLevel = indentCurrent & SC_FOLDLEVELNUMBERMASK;\n\n\t// Set up initial loop state\n\tstartPos = styler.LineStart(lineCurrent);\n\tint prev_state = SCE_P_DEFAULT;\n\tif (lineCurrent >= 1)\n\t\tprev_state = styler.StyleIndexAt(startPos - 1);\n\tint prevQuote = options.foldQuotes && IsPyTripleQuoteStringState(prev_state);\n\n\t// Process all characters to end of requested range or end of any triple quote\n\t//that hangs over the end of the range.  Cap processing in all cases\n\t// to end of document (in case of unclosed quote at end).\n\twhile ((lineCurrent <= docLines) && ((lineCurrent <= maxLines) || prevQuote)) {\n\n\t\t// Gather info\n\t\tint lev = indentCurrent;\n\t\tSci_Position lineNext = lineCurrent + 1;\n\t\tint indentNext = indentCurrent;\n\t\tint quote = false;\n\t\tif (lineNext <= docLines) {\n\t\t\t// Information about next line is only available if not at end of document\n\t\t\tindentNext = styler.IndentAmount(lineNext, &spaceFlags, nullptr);\n\t\t\tconst Sci_Position lookAtPos = (styler.LineStart(lineNext) == styler.Length()) ? styler.Length() - 1 : styler.LineStart(lineNext);\n\t\t\tconst int style = styler.StyleIndexAt(lookAtPos);\n\t\t\tquote = options.foldQuotes && IsPyTripleQuoteStringState(style);\n\t\t}\n\t\tconst bool quote_start = (quote && !prevQuote);\n\t\tconst bool quote_continue = (quote && prevQuote);\n\t\tif (!quote || !prevQuote)\n\t\t\tindentCurrentLevel = indentCurrent & SC_FOLDLEVELNUMBERMASK;\n\t\tif (quote)\n\t\t\tindentNext = indentCurrentLevel;\n\t\tif (indentNext & SC_FOLDLEVELWHITEFLAG)\n\t\t\tindentNext = SC_FOLDLEVELWHITEFLAG | indentCurrentLevel;\n\n\t\tif (quote_start) {\n\t\t\t// Place fold point at start of triple quoted string\n\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t} else if (quote_continue || prevQuote) {\n\t\t\t// Add level to rest of lines in the string\n\t\t\tlev = lev + 1;\n\t\t}\n\n\t\t// Skip past any blank lines for next indent level info; we skip also\n\t\t// comments (all comments, not just those starting in column 0)\n\t\t// which effectively folds them into surrounding code rather\n\t\t// than screwing up folding.  If comments end file, use the min\n\t\t// comment indent as the level after\n\n\t\tint minCommentLevel = indentCurrentLevel;\n\t\twhile (!quote &&\n\t\t\t\t(lineNext < docLines) &&\n\t\t\t\t((indentNext & SC_FOLDLEVELWHITEFLAG) || (IsCommentLine(lineNext, styler)))) {\n\n\t\t\tif (IsCommentLine(lineNext, styler) && indentNext < minCommentLevel) {\n\t\t\t\tminCommentLevel = indentNext;\n\t\t\t}\n\n\t\t\tlineNext++;\n\t\t\tindentNext = styler.IndentAmount(lineNext, &spaceFlags, nullptr);\n\t\t}\n\n\t\tconst int levelAfterComments = ((lineNext < docLines) ? indentNext & SC_FOLDLEVELNUMBERMASK : minCommentLevel);\n\t\tconst int levelBeforeComments = std::max(indentCurrentLevel, levelAfterComments);\n\n\t\t// Now set all the indent levels on the lines we skipped\n\t\t// Do this from end to start.  Once we encounter one line\n\t\t// which is indented more than the line after the end of\n\t\t// the comment-block, use the level of the block before\n\n\t\tSci_Position skipLine = lineNext;\n\t\tint skipLevel = levelAfterComments;\n\n\t\twhile (--skipLine > lineCurrent) {\n\t\t\tconst int skipLineIndent = styler.IndentAmount(skipLine, &spaceFlags, nullptr);\n\n\t\t\tif (options.foldCompact) {\n\t\t\t\tif ((skipLineIndent & SC_FOLDLEVELNUMBERMASK) > levelAfterComments)\n\t\t\t\t\tskipLevel = levelBeforeComments;\n\n\t\t\t\tconst int whiteFlag = skipLineIndent & SC_FOLDLEVELWHITEFLAG;\n\n\t\t\t\tstyler.SetLevel(skipLine, skipLevel | whiteFlag);\n\t\t\t} else {\n\t\t\t\tif ((skipLineIndent & SC_FOLDLEVELNUMBERMASK) > levelAfterComments &&\n\t\t\t\t\t\t!(skipLineIndent & SC_FOLDLEVELWHITEFLAG) &&\n\t\t\t\t\t\t!IsCommentLine(skipLine, styler))\n\t\t\t\t\tskipLevel = levelBeforeComments;\n\n\t\t\t\tstyler.SetLevel(skipLine, skipLevel);\n\t\t\t}\n\t\t}\n\n\t\t// Set fold header on non-quote line\n\t\tif (!quote && !(indentCurrent & SC_FOLDLEVELWHITEFLAG)) {\n\t\t\tif ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext & SC_FOLDLEVELNUMBERMASK))\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t}\n\n\t\t// Keep track of triple quote state of previous line\n\t\tprevQuote = quote;\n\n\t\t// Set fold level for this line and move to next line\n\t\tstyler.SetLevel(lineCurrent, options.foldCompact ? lev : lev & ~SC_FOLDLEVELWHITEFLAG);\n\t\tindentCurrent = indentNext;\n\t\tlineCurrent = lineNext;\n\t}\n\n\t// NOTE: Cannot set level of last line here because indentCurrent doesn't have\n\t// header flag set; the loop above is crafted to take care of this case!\n\t//styler.SetLevel(lineCurrent, indentCurrent);\n}\n\n}\n\nLexerModule lmPython(SCLEX_PYTHON, LexerPython::LexerFactoryPython, \"python\",\n\t\t     pythonWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexR.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexR.cxx\n ** Lexer for R, S, SPlus Statistics Program (Heavily derived from CPP Lexer).\n **\n **/\n// Copyright 1998-2002 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <cassert>\n#include <cctype>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nnamespace {\n\ninline bool IsAWordChar(int ch) noexcept {\n\treturn (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_');\n}\n\ninline bool IsAWordStart(int ch) noexcept {\n\treturn (ch < 0x80) && (isalnum(ch) || ch == '_');\n}\n\nconstexpr bool IsAnOperator(int ch) noexcept {\n\t// '.' left out as it is used to make up numbers\n\tif (ch == '-' || ch == '+' || ch == '!' || ch == '~' ||\n\t        ch == '?' || ch == ':' || ch == '*' || ch == '/' ||\n\t        ch == '^' || ch == '<' || ch == '>' || ch == '=' ||\n\t        ch == '&' || ch == '|' || ch == '$' || ch == '(' ||\n\t        ch == ')' || ch == '}' || ch == '{' || ch == '[' ||\n\t\tch == ']')\n\t\treturn true;\n\treturn false;\n}\n\nconstexpr bool IsOctalOrHex(int ch, bool hex) noexcept {\n\treturn IsAnOctalDigit(ch) || (hex && IsAHeXDigit(ch));\n}\n\n// https://search.r-project.org/R/refmans/base/html/Quotes.html\nstruct EscapeSequence {\n\tint outerState = SCE_R_DEFAULT;\n\tint digitsLeft = 0;\n\tbool hex = false;\n\tbool brace = false;\n\n\t// highlight any character as escape sequence, unrecognized escape sequence is syntax error.\n\tvoid resetEscapeState(int state, int chNext) noexcept {\n\t\touterState = state;\n\t\tdigitsLeft = 1;\n\t\thex = true;\n\t\tbrace = false;\n\t\tif (chNext == 'x') {\n\t\t\tdigitsLeft = 3;\n\t\t} else if (chNext == 'u') {\n\t\t\tdigitsLeft = 5;\n\t\t} else if (chNext == 'U') {\n\t\t\tdigitsLeft = 9;\n\t\t} else if (IsAnOctalDigit(chNext)) {\n\t\t\tdigitsLeft = 3;\n\t\t\thex = false;\n\t\t}\n\t}\n\tbool atEscapeEnd(int ch) noexcept {\n\t\t--digitsLeft;\n\t\treturn digitsLeft <= 0 || !IsOctalOrHex(ch, hex);\n\t}\n};\n\nint CheckRawString(LexAccessor &styler, Sci_Position pos, int &dashCount) {\n\tdashCount = 0;\n\twhile (true) {\n\t\tconst char ch = styler.SafeGetCharAt(pos++);\n\t\tswitch (ch) {\n\t\tcase '-':\n\t\t\t++dashCount;\n\t\t\tbreak;\n\t\tcase '(':\n\t\t\treturn ')';\n\t\tcase '[':\n\t\t\treturn ']';\n\t\tcase '{':\n\t\t\treturn '}';\n\t\tdefault:\n\t\t\tdashCount = 0;\n\t\t\treturn 0;\n\t\t}\n\t}\n}\n\nvoid ColouriseRDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[],\n                            Accessor &styler) {\n\n\tconst WordList &keywords   = *keywordlists[0];\n\tconst WordList &keywords2 = *keywordlists[1];\n\tconst WordList &keywords3 = *keywordlists[2];\n\t// state for raw string\n\tint matchingDelimiter = 0;\n\tint dashCount = 0;\n\n\t// property lexer.r.escape.sequence\n\t//\tSet to 1 to enable highlighting of escape sequences in strings.\n\tconst bool escapeSequence = styler.GetPropertyInt(\"lexer.r.escape.sequence\", 0) != 0;\n\tEscapeSequence escapeSeq;\n\n\tStyleContext sc(startPos, length, initStyle, styler);\n\tif (sc.currentLine > 0) {\n\t\tconst int lineState = styler.GetLineState(sc.currentLine - 1);\n\t\tmatchingDelimiter = lineState & 0xff;\n\t\tdashCount = lineState >> 8;\n\t}\n\n\twhile (sc.More()) {\n\t\t// Determine if the current state should terminate.\n\t\tswitch (sc.state) {\n\t\tcase SCE_R_OPERATOR:\n\t\t\tsc.SetState(SCE_R_DEFAULT);\n\t\t\tbreak;\n\n\t\tcase SCE_R_NUMBER:\n\t\t\t// https://cran.r-project.org/doc/manuals/r-release/R-lang.html#Literal-constants\n\t\t\tif (AnyOf(sc.ch, 'e', 'E', 'p', 'P') && (IsADigit(sc.chNext) || sc.chNext == '+' || sc.chNext == '-')) {\n\t\t\t\tsc.Forward(); // exponent part\n\t\t\t} else if (!(IsAHeXDigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext)))) {\n\t\t\t\tif (AnyOf(sc.ch, 'L', 'i')) {\n\t\t\t\t\tsc.Forward(); // integer and complex qualifier\n\t\t\t\t}\n\t\t\t\tsc.SetState(SCE_R_DEFAULT);\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase SCE_R_IDENTIFIER:\n\t\t\tif (!IsAWordChar(sc.ch)) {\n\t\t\t\tchar s[100];\n\t\t\t\tsc.GetCurrent(s, sizeof(s));\n\t\t\t\tif (keywords.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_R_KWORD);\n\t\t\t\t} else if  (keywords2.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_R_BASEKWORD);\n\t\t\t\t} else if  (keywords3.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_R_OTHERKWORD);\n\t\t\t\t}\n\t\t\t\tsc.SetState(SCE_R_DEFAULT);\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase SCE_R_COMMENT:\n\t\t\tif (sc.MatchLineEnd()) {\n\t\t\t\tsc.SetState(SCE_R_DEFAULT);\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase SCE_R_STRING:\n\t\tcase SCE_R_STRING2:\n\t\tcase SCE_R_BACKTICKS:\n\t\t\tif (sc.ch == '\\\\') {\n\t\t\t\tif (escapeSequence) {\n\t\t\t\t\tescapeSeq.resetEscapeState(sc.state, sc.chNext);\n\t\t\t\t\tsc.SetState(SCE_R_ESCAPESEQUENCE);\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\tif (sc.chNext == '{' && AnyOf(sc.ch, 'u', 'U')) {\n\t\t\t\t\t\tescapeSeq.brace = true;\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t} else if (sc.MatchLineEnd()) {\n\t\t\t\t\t\t// don't highlight line ending as escape sequence:\n\t\t\t\t\t\t// escapeSeq.outerState is lost when editing on next line.\n\t\t\t\t\t\tsc.SetState(escapeSeq.outerState);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tsc.Forward(); // Skip all characters after the backslash\n\t\t\t\t}\n\t\t\t} else if ((sc.state == SCE_R_STRING && sc.ch == '\\\"')\n\t\t\t\t|| (sc.state == SCE_R_STRING2 && sc.ch == '\\'')\n\t\t\t\t|| (sc.state == SCE_R_BACKTICKS && sc.ch == '`')) {\n\t\t\t\tsc.ForwardSetState(SCE_R_DEFAULT);\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase SCE_R_ESCAPESEQUENCE:\n\t\t\tif (escapeSeq.atEscapeEnd(sc.ch)) {\n\t\t\t\tif (escapeSeq.brace && sc.ch == '}') {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t}\n\t\t\t\tsc.SetState(escapeSeq.outerState);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase SCE_R_RAWSTRING:\n\t\tcase SCE_R_RAWSTRING2:\n\t\t\twhile (sc.ch == matchingDelimiter) {\n\t\t\t\tsc.Forward();\n\t\t\t\tint count = dashCount;\n\t\t\t\twhile (count != 0 && sc.ch == '-') {\n\t\t\t\t\t--count;\n\t\t\t\t\tsc.Forward();\n\t\t\t\t}\n\t\t\t\tif (count == 0 && sc.ch == ((sc.state == SCE_R_RAWSTRING) ? '\\\"' : '\\'')) {\n\t\t\t\t\tmatchingDelimiter = 0;\n\t\t\t\t\tdashCount = 0;\n\t\t\t\t\tsc.ForwardSetState(SCE_R_DEFAULT);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase SCE_R_INFIX:\n\t\t\tif (sc.ch == '%') {\n\t\t\t\tsc.ForwardSetState(SCE_R_DEFAULT);\n\t\t\t} else if (sc.atLineEnd) {\n\t\t\t\tsc.ChangeState(SCE_R_INFIXEOL);\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase SCE_R_INFIXEOL:\n\t\t\tif (sc.atLineStart) {\n\t\t\t\tsc.SetState(SCE_R_DEFAULT);\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t\t// Determine if a new state should be entered.\n\t\tif (sc.state == SCE_R_DEFAULT) {\n\t\t\tif (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) {\n\t\t\t\tsc.SetState(SCE_R_NUMBER);\n\t\t\t\tif (sc.ch == '0' && AnyOf(sc.chNext, 'x', 'X')) {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t}\n\t\t\t} else if (AnyOf(sc.ch, 'r', 'R') && AnyOf(sc.chNext, '\\\"', '\\'')) {\n\t\t\t\tconst int chNext = sc.chNext;\n\t\t\t\tmatchingDelimiter = CheckRawString(styler, sc.currentPos + 2, dashCount);\n\t\t\t\tif (matchingDelimiter) {\n\t\t\t\t\tsc.SetState((chNext == '\\\"') ? SCE_R_RAWSTRING : SCE_R_RAWSTRING2);\n\t\t\t\t\tsc.Forward(dashCount + 2);\n\t\t\t\t} else {\n\t\t\t\t\t// syntax error\n\t\t\t\t\tsc.SetState(SCE_R_IDENTIFIER);\n\t\t\t\t\tsc.ForwardSetState((chNext == '\\\"') ? SCE_R_STRING : SCE_R_STRING2);\n\t\t\t\t}\n\t\t\t} else if (IsAWordStart(sc.ch) ) {\n\t\t\t\tsc.SetState(SCE_R_IDENTIFIER);\n\t\t\t} else if (sc.Match('#')) {\n\t\t\t\tsc.SetState(SCE_R_COMMENT);\n\t\t\t} else if (sc.ch == '\\\"') {\n\t\t\t\tsc.SetState(SCE_R_STRING);\n\t\t\t} else if (sc.ch == '%') {\n\t\t\t\tsc.SetState(SCE_R_INFIX);\n\t\t\t} else if (sc.ch == '\\'') {\n\t\t\t\tsc.SetState(SCE_R_STRING2);\n\t\t\t} else if (sc.ch == '`') {\n\t\t\t\tsc.SetState(SCE_R_BACKTICKS);\n\t\t\t} else if (IsAnOperator(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_R_OPERATOR);\n\t\t\t}\n\t\t}\n\n\t\tif (sc.atLineEnd) {\n\t\t\tconst int lineState = matchingDelimiter | (dashCount << 8);\n\t\t\tstyler.SetLineState(sc.currentLine, lineState);\n\t\t}\n\t\tsc.Forward();\n\t}\n\tsc.Complete();\n}\n\n// Store both the current line's fold level and the next lines in the\n// level store to make it easy to pick up with each increment\n// and to make it possible to fiddle the current level for \"} else {\".\nvoid FoldRDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[],\n                       Accessor &styler) {\n\tconst bool foldCompact = styler.GetPropertyInt(\"fold.compact\", 1) != 0;\n\tconst bool foldAtElse = styler.GetPropertyInt(\"fold.at.else\", 0) != 0;\n\tconst Sci_PositionU endPos = startPos + length;\n\tint visibleChars = 0;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tint levelCurrent = SC_FOLDLEVELBASE;\n\tif (lineCurrent > 0)\n\t\tlevelCurrent = styler.LevelAt(lineCurrent-1) >> 16;\n\tint levelMinCurrent = levelCurrent;\n\tint levelNext = levelCurrent;\n\tchar chNext = styler[startPos];\n\tint styleNext = styler.StyleAt(startPos);\n\tfor (Sci_PositionU i = startPos; i < endPos; i++) {\n\t\tconst char ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\tconst int style = styleNext;\n\t\tstyleNext = styler.StyleAt(i + 1);\n\t\tconst bool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n\t\tif (style == SCE_R_OPERATOR) {\n\t\t\tif (ch == '{') {\n\t\t\t\t// Measure the minimum before a '{' to allow\n\t\t\t\t// folding on \"} else {\"\n\t\t\t\tif (levelMinCurrent > levelNext) {\n\t\t\t\t\tlevelMinCurrent = levelNext;\n\t\t\t\t}\n\t\t\t\tlevelNext++;\n\t\t\t} else if (ch == '}') {\n\t\t\t\tlevelNext--;\n\t\t\t}\n\t\t}\n\t\tif (atEOL) {\n\t\t\tint levelUse = levelCurrent;\n\t\t\tif (foldAtElse) {\n\t\t\t\tlevelUse = levelMinCurrent;\n\t\t\t}\n\t\t\tint lev = levelUse | levelNext << 16;\n\t\t\tif (visibleChars == 0 && foldCompact)\n\t\t\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\t\t\tif (levelUse < levelNext)\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\tif (lev != styler.LevelAt(lineCurrent)) {\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\t\t\t}\n\t\t\tlineCurrent++;\n\t\t\tlevelCurrent = levelNext;\n\t\t\tlevelMinCurrent = levelCurrent;\n\t\t\tvisibleChars = 0;\n\t\t}\n\t\tif (!isspacechar(ch))\n\t\t\tvisibleChars++;\n\t}\n}\n\n\nconst char * const RWordLists[] = {\n\t\t\"Language Keywords\",\n\t\t\"Base / Default package function\",\n\t\t\"Other Package Functions\",\n\t\t\"Unused\",\n\t\t\"Unused\",\n\t\tnullptr,\n};\n\n}\n\nLexerModule lmR(SCLEX_R, ColouriseRDoc, \"r\", FoldRDoc, RWordLists);\n"
  },
  {
    "path": "lexilla/lexers/LexRaku.cxx",
    "content": "/** @file LexRaku.cxx\n ** Lexer for Raku\n **\n ** Copyright (c) 2019 Mark Reay <mark@reay.net.au>\n **/\n// Copyright 1998-2005 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n/*\n * Raku (Perl6) Lexer for Scintilla\n * ---------------------------------\n * ---------------------------------\n * 06-Dec-2019: More Unicode support:\n *              - Added a full scope of allowed numbers and letters\n * 29-Nov-2019: More  highlighting / implemented basic folding:\n *              - Operators (blanket cover, no sequence checking)\n *              - Class / Grammar name highlighting\n *              - Folding:\n *                - Comments: line / multi-line\n *                - POD sections\n *                - Code blocks {}\n * 26-Nov-2019: Basic syntax highlighting covering the following:\n *              - Comments, both line and embedded (multi-line)\n *              - POD, no inline highlighting as yet...\n *              - Heredoc block string, with variable highlighting (with qq)\n *              - Strings, with variable highlighting (with \")\n *              - Q Language, including adverbs (also basic q and qq)\n *              - Regex, including adverbs\n *              - Numbers\n *              - Bareword / identifiers\n *              - Types\n *              - Variables: mu, positional, associative, callable\n * TODO:\n *       - POD inline\n *       - Better operator sequence coverage\n */\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n#include <vector>\n#include <map>\n#include <functional>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"CharacterCategory.h\"\n#include \"LexerModule.h\"\n#include \"OptionSet.h\"\n#include \"DefaultLexer.h\"\n\nusing namespace Scintilla;\nusing namespace Lexilla;\n\nnamespace { // anonymous namespace to isolate any name clashes\n/*----------------------------------------------------------------------------*\n * --- DEFINITIONS: OPTIONS / CONSTANTS ---\n *----------------------------------------------------------------------------*/\n\n// Number types\n#define RAKUNUM_BINARY\t\t1\t// order is significant: 1-3 cannot have a dot\n#define RAKUNUM_OCTAL\t\t2\n#define RAKUNUM_FLOAT_EXP\t3\t// exponent part only\n#define RAKUNUM_HEX\t\t\t4\t// may be a hex float\n#define RAKUNUM_DECIMAL\t\t5\t// 1-5 are numbers; 6-7 are strings\n#define RAKUNUM_VECTOR\t\t6\n#define RAKUNUM_V_VECTOR\t7\n#define RAKUNUM_VERSION\t\t8\t// can contain multiple '.'s\n#define RAKUNUM_BAD\t\t\t9\n\n// Regex / Q string types\n#define RAKUTYPE_REGEX_NORM\t\t0\t// 0 char ident\n#define RAKUTYPE_REGEX_S\t\t1\t// order is significant:\n#define RAKUTYPE_REGEX_M\t\t2\t// 1 char ident\n#define RAKUTYPE_REGEX_Y\t\t3\t// 1 char ident\n#define RAKUTYPE_REGEX\t\t\t4\t// > RAKUTYPE_REGEX == 2 char identifiers\n#define RAKUTYPE_REGEX_RX\t\t5\t// 2 char ident\n#define RAKUTYPE_REGEX_TR\t\t6\t// 2 char ident\n#define RAKUTYPE_QLANG\t\t\t7\t// < RAKUTYPE_QLANG == RAKUTYPE_REGEX_?\n#define RAKUTYPE_STR_WQ\t\t\t8\t// 0 char ident < word quote >\n#define RAKUTYPE_STR_Q\t\t\t9\t// 1 char ident\n#define RAKUTYPE_STR_QX\t\t\t10\t// 2 char ident\n#define RAKUTYPE_STR_QW\t\t\t11\t// 2 char ident\n#define RAKUTYPE_STR_QQ\t\t\t12\t// 2 char ident\n#define RAKUTYPE_STR_QQX\t\t13\t// 3 char ident\n#define RAKUTYPE_STR_QQW\t\t14\t// 3 char ident\n#define RAKUTYPE_STR_QQWW\t\t15\t// 4 char ident\n\n// Delimiter types\n#define RAKUDELIM_BRACKET\t\t0\t// bracket: regex, Q language\n#define RAKUDELIM_QUOTE\t\t\t1\t// quote: normal string\n\n// rakuWordLists: keywords as defined in config\nconst char *const rakuWordLists[] = {\n\t\"Keywords and identifiers\",\n\t\"Functions\",\n\t\"Types basic\",\n\t\"Types composite\",\n\t\"Types domain-specific\",\n\t\"Types exception\",\n\t\"Adverbs\",\n\tnullptr,\n};\n\n// Options and defaults\nstruct OptionsRaku {\n\tbool fold;\n\tbool foldCompact;\n\tbool foldComment;\n\tbool foldCommentMultiline;\n\tbool foldCommentPOD;\n\tOptionsRaku() {\n\t\tfold\t\t\t\t\t= true;\n\t\tfoldCompact\t\t\t\t= false;\n\t\tfoldComment\t\t\t\t= true;\n\t\tfoldCommentMultiline\t= true;\n\t\tfoldCommentPOD\t\t\t= true;\n\t}\n};\n\n// init options and words\nstruct OptionSetRaku : public OptionSet<OptionsRaku> {\n\tOptionSetRaku() {\n\t\tDefineProperty(\"fold\",\t\t\t&OptionsRaku::fold);\n\t\tDefineProperty(\"fold.comment\",\t&OptionsRaku::foldComment);\n\t\tDefineProperty(\"fold.compact\",\t&OptionsRaku::foldCompact);\n\n\t\tDefineProperty(\"fold.raku.comment.multiline\",\t&OptionsRaku::foldCommentMultiline,\n\t\t\t\"Set this property to 0 to disable folding multi-line comments when fold.comment=1.\");\n\t\tDefineProperty(\"fold.raku.comment.pod\",\t\t\t&OptionsRaku::foldCommentPOD,\n\t\t\t\"Set this property to 0 to disable folding POD comments when fold.comment=1.\");\n\n\t\t// init word lists\n\t\tDefineWordListSets(rakuWordLists);\n\t}\n};\n\n// Delimiter pair\nstruct DelimPair {\n\tint opener;\t\t// opener char\n\tint closer[2];\t// closer chars\n\tbool interpol;\t// can variables be interpolated?\n\tshort count;\t// delimiter char count\n\tDelimPair() {\n\t\topener = 0;\n\t\tcloser[0] = 0;\n\t\tcloser[1] = 0;\n\t\tinterpol = false;\n\t\tcount = 0;\n\t}\n\tbool isCloser(int ch) const {\n\t\treturn ch == closer[0] || ch == closer[1];\n\t}\n};\n\n/*----------------------------------------------------------------------------*\n * --- FUNCTIONS ---\n *----------------------------------------------------------------------------*/\n\n/*\n * IsANewLine\n * - returns true if this is a new line char\n */\nconstexpr bool IsANewLine(int ch) noexcept {\n\treturn ch == '\\r' || ch == '\\n';\n}\n\n/*\n * IsAWhitespace\n * - returns true if this is a whitespace (or newline) char\n */\nbool IsAWhitespace(int ch) noexcept {\n\treturn IsASpaceOrTab(ch) || IsANewLine(ch);\n}\n\n/*\n * IsAlphabet\n * - returns true if this is an alphabetical char\n */\nconstexpr bool IsAlphabet(int ch) noexcept {\n\treturn (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z');\n}\n\n/*\n * IsCommentLine\n * - returns true if this is a comment line\n *   - tests: SCE_RAKU_COMMENTLINE or SCE_RAKU_COMMENTEMBED\n * modified from: LexPerl.cxx\n */\nbool IsCommentLine(Sci_Position line, LexAccessor &styler, int type = SCE_RAKU_COMMENTLINE) {\n\tSci_Position pos = styler.LineStart(line);\n\tSci_Position eol_pos = styler.LineStart(line + 1) - 1;\n\tfor (Sci_Position i = pos; i < eol_pos; i++) {\n\t\tchar ch = styler[i];\n\t\tint style = styler.StyleAt(i);\n\t\tif (type == SCE_RAKU_COMMENTEMBED) {\n\t\t\tif (i == (eol_pos - 1) && style == type)\n\t\t\t\treturn true;\n\t\t} else { // make sure the line is NOT a SCE_RAKU_COMMENTEMBED\n\t\t\tif (ch == '#' && style == type && styler[i+1] != '`' )\n\t\t\t\treturn true;\n\t\t\telse if (!IsASpaceOrTab(ch))\n\t\t\t\treturn false;\n\t\t}\n\t}\n\treturn false;\n}\n\n/*\n * ContainsQTo\n * - returns true if this range contains \":to\" in style SCE_RAKU_ADVERB indicating the start\n * of a SCE_RAKU_HEREDOC_Q or SCE_RAKU_HEREDOC_QQ.\n */\nbool ContainsQTo(Sci_Position start, Sci_Position end, LexAccessor &styler) {\n\tstd::string adverb;\n\tfor (Sci_Position i = start; i < end; i++) {\n\t\tif (styler.StyleAt(i) == SCE_RAKU_ADVERB) {\n\t\t\tadverb.push_back(styler[i]);\n\t\t}\n\t}\n\treturn adverb.find(\":to\") != std::string::npos;\n}\n\n/*\n * GetBracketCloseChar\n * - returns the end bracket char: opposite of start\n *   - see: http://www.unicode.org/Public/5.1.0/ucd/BidiMirroring.txt (first section)\n * - Categories are general matches for valid BiDi types\n * - Most closer chars are opener + 1\n */\nint GetBracketCloseChar(const int ch) noexcept {\n\tconst CharacterCategory cc = CategoriseCharacter(ch);\n\tswitch (cc) {\n\t\tcase ccSm:\n\t\t\tswitch (ch) {\n\t\t\t\tcase 0x3C: return 0x3E; // LESS-THAN SIGN\n\t\t\t\tcase 0x2208: return 0x220B; // ELEMENT OF\n\t\t\t\tcase 0x2209: return 0x220C; // NOT AN ELEMENT OF\n\t\t\t\tcase 0x220A: return 0x220D; // SMALL ELEMENT OF\n\t\t\t\tcase 0x2215: return 0x29F5; // DIVISION SLASH\n\t\t\t\tcase 0x2243: return 0x22CD; // ASYMPTOTICALLY EQUAL TO\n\t\t\t\tcase 0x2298: return 0x29B8; // CIRCLED DIVISION SLASH\n\t\t\t\tcase 0x22A6: return 0x2ADE; // ASSERTION\n\t\t\t\tcase 0x22A8: return 0x2AE4; // TRUE\n\t\t\t\tcase 0x22A9: return 0x2AE3; // FORCES\n\t\t\t\tcase 0x22AB: return 0x2AE5; // DOUBLE VERTICAL BAR DOUBLE RIGHT TURNSTILE\n\t\t\t\tcase 0x22F2: return 0x22FA; // ELEMENT OF WITH LONG HORIZONTAL STROKE\n\t\t\t\tcase 0x22F3: return 0x22FB; // ELEMENT OF WITH VERTICAL BAR AT END OF HORIZONTAL STROKE\n\t\t\t\tcase 0x22F4: return 0x22FC; // SMALL ELEMENT OF WITH VERTICAL BAR AT END OF HORIZONTAL STROKE\n\t\t\t\tcase 0x22F6: return 0x22FD; // ELEMENT OF WITH OVERBAR\n\t\t\t\tcase 0x22F7: return 0x22FE; // SMALL ELEMENT OF WITH OVERBAR\n\t\t\t\tcase 0xFF1C: return 0xFF1E; // FULLWIDTH LESS-THAN SIGN\n\t\t\t}\n\t\t\tbreak;\n\t\tcase ccPs:\n\t\t\tswitch (ch) {\n\t\t\t\tcase 0x5B: return 0x5D; // LEFT SQUARE BRACKET\n\t\t\t\tcase 0x7B: return 0x7D; // LEFT CURLY BRACKET\n\t\t\t\tcase 0x298D: return 0x2990; // LEFT SQUARE BRACKET WITH TICK IN TOP CORNER\n\t\t\t\tcase 0x298F: return 0x298E; // LEFT SQUARE BRACKET WITH TICK IN BOTTOM CORNER\n\t\t\t\tcase 0xFF3B: return 0xFF3D; // FULLWIDTH LEFT SQUARE BRACKET\n\t\t\t\tcase 0xFF5B: return 0xFF5D; // FULLWIDTH LEFT CURLY BRACKET\n\t\t\t}\n\t\t\tbreak;\n\t\tcase ccPi:\n\t\t\tbreak;\n\t\tdefault: return 0;\n\t}\n\treturn ch + 1;\n}\n\n/*\n * IsValidQuoteOpener\n * -\n */\nbool IsValidQuoteOpener(const int ch, DelimPair &dp, int type = RAKUDELIM_BRACKET) noexcept {\n\tdp.closer[0] = 0;\n\tdp.closer[1] = 0;\n\tdp.interpol = true;\n\tif (type == RAKUDELIM_QUOTE) {\n\t\tswitch (ch) {\n\t\t\t//   Opener\t\tCloser\t\t\t\t\tDescription\n\t\t\tcase '\\'':\t\tdp.closer[0] = '\\'';\t// APOSTROPHE\n\t\t\t\tdp.interpol = false;\n\t\t\t\tbreak;\n\t\t\tcase '\"':\t\tdp.closer[0] = '\"';\t\t// QUOTATION MARK\n\t\t\t\tbreak;\n\t\t\tcase 0x2018:\tdp.closer[0] = 0x2019;\t// LEFT SINGLE QUOTATION MARK\n\t\t\t\tdp.interpol = false;\n\t\t\t\tbreak;\n\t\t\tcase 0x201C:\tdp.closer[0] = 0x201D;\t// LEFT DOUBLE QUOTATION MARK\n\t\t\t\tbreak;\n\t\t\tcase 0x201D:\tdp.closer[0] = 0x201C;\t// RIGHT DOUBLE QUOTATION MARK\n\t\t\t\tbreak;\n\t\t\tcase 0x201E:\tdp.closer[0] = 0x201C;\t// DOUBLE LOW-9 QUOTATION MARK\n\t\t\t\t\t\t\tdp.closer[1] = 0x201D;\n\t\t\t\tbreak;\n\t\t\tcase 0xFF62:\tdp.closer[0] = 0xFF63;\t// HALFWIDTH LEFT CORNER BRACKET\n\t\t\t\tdp.interpol = false;\n\t\t\t\tbreak;\n\t\t\tdefault:\t\treturn false;\n\t\t}\n\t} else if (type == RAKUDELIM_BRACKET) {\n\t\tdp.closer[0] = GetBracketCloseChar(ch);\n\t}\n\tdp.opener = ch;\n\tdp.count = 1;\n\treturn dp.closer[0] > 0;\n}\n\n/*\n * IsBracketOpenChar\n * - true if this is a valid start bracket character\n */\nbool IsBracketOpenChar(int ch) noexcept {\n\treturn GetBracketCloseChar(ch) > 0;\n}\n\n/*\n * IsValidRegOrQAdjacent\n * - returns true if ch is a valid character to put directly after Q / q\n *   * ref: Q Language: https://docs.raku.org/language/quoting\n */\nbool IsValidRegOrQAdjacent(int ch) noexcept {\n\treturn !(IsAlphaNumeric(ch) || ch == '_' || ch == '(' || ch == ')' || ch == '\\'' );\n}\n\n/*\n * IsValidRegOrQPrecede\n * - returns true if ch is a valid preceding character to put directly before Q / q\n *   * ref: Q Language: https://docs.raku.org/language/quoting\n */\nbool IsValidRegOrQPrecede(int ch) noexcept {\n\treturn !(IsAlphaNumeric(ch) || ch == '_');\n}\n\n/*\n * MatchCharInRange\n * - returns true if the mach character is found in range (of length)\n * - ignoreDelim (default false)\n */\nbool MatchCharInRange(StyleContext &sc, const Sci_Position length,\n\t\tconst int match, bool ignoreDelim = false) {\n\tSci_Position len = 0;\n\tint chPrev = sc.chPrev;\n\twhile (++len < length) {\n\t\tconst int ch = sc.GetRelativeCharacter(len);\n\t\tif (ch == match && (ignoreDelim || chPrev != '\\\\'))\n\t\t\treturn true;\n\t}\n\treturn false;\n}\n\n/*\n * PrevNonWhitespaceChar\n * - returns the last non-whitespace char\n */\nint PrevNonWhitespaceChar(StyleContext &sc) {\n\tSci_Position rel = 0;\n\tSci_Position max_back = 0 - sc.currentPos;\n\twhile (--rel > max_back) {\n\t\tconst int ch = sc.GetRelativeCharacter(rel);\n\t\tif (!IsAWhitespace(ch))\n\t\t\treturn ch;\n\t}\n\treturn 0; // no matching char\n}\n\n/*\n * IsQLangStartAtScPos\n * - returns true if this is a valid Q Language sc position\n *   - ref: https://docs.raku.org/language/quoting\n *   - Q :adverb :adverb //;\n *   - q,qx,qw,qq,qqx,qqw,qqww :adverb /:adverb /;\n */\nbool IsQLangStartAtScPos(StyleContext &sc, int &type, const Sci_Position length) {\n\tconst bool valid_adj = IsValidRegOrQAdjacent(sc.chNext);\n\tconst int chFw2 = sc.GetRelativeCharacter(2);\n\tconst int chFw3 = sc.GetRelativeCharacter(3);\n\ttype = -1;\n\tif (IsValidRegOrQPrecede(sc.chPrev)) {\n\t\tif (sc.ch == 'Q' && valid_adj) {\n\t\t\ttype = RAKUTYPE_QLANG;\n\t\t} else if (sc.ch == 'q') {\n\t\t\tswitch (sc.chNext) {\n\t\t\t\tcase 'x':\n\t\t\t\t\ttype = RAKUTYPE_STR_QX;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'w':\n\t\t\t\t\ttype = RAKUTYPE_STR_QW;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'q':\n\t\t\t\t\tif (chFw2 == 'x') {\n\t\t\t\t\t\ttype = RAKUTYPE_STR_QQX;\n\t\t\t\t\t} else if (chFw2 == 'w') {\n\t\t\t\t\t\tif (chFw3 == 'w') {\n\t\t\t\t\t\t\ttype = RAKUTYPE_STR_QQWW;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttype = RAKUTYPE_STR_QQW;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttype = RAKUTYPE_STR_QQ;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\ttype = RAKUTYPE_STR_Q;\n\t\t\t}\n\t\t} else if (sc.ch == '<' && MatchCharInRange(sc, length, '>')) {\n\t\t\ttype = RAKUTYPE_STR_WQ; // < word quote >\n\t\t}\n\t}\n\treturn type >= 0;\n}\n\n/*\n * IsRegexStartAtScPos\n * - returns true if this is a valid Regex sc position\n *   - ref: https://docs.raku.org/language/regexes\n *   - Regex: (rx/s/m/tr/y) :adverb /:adverb /;\n *   -              regex R :adverb //;\n *   -                     /:adverb /;\n */\nbool IsRegexStartAtScPos(StyleContext &sc, int &type, CharacterSet &set) {\n\tconst bool valid_adj = IsValidRegOrQAdjacent(sc.chNext);\n\ttype = -1;\n\tif (IsValidRegOrQPrecede(sc.chPrev)) {\n\t\tswitch (sc.ch) {\n\t\t\tcase 'r':\n\t\t\t\tif (sc.chNext == 'x')\n\t\t\t\t\ttype = RAKUTYPE_REGEX_RX;\n\t\t\t\tbreak;\n\t\t\tcase 't':\n\t\t\tcase 'T':\n\t\t\t\tif (sc.chNext == 'r' || sc.chNext == 'R')\n\t\t\t\t\ttype = RAKUTYPE_REGEX_TR;\n\t\t\t\tbreak;\n\t\t\tcase 'm':\n\t\t\t\tif (valid_adj)\n\t\t\t\t\ttype = RAKUTYPE_REGEX_M;\n\t\t\t\tbreak;\n\t\t\tcase 's':\n\t\t\tcase 'S':\n\t\t\t\tif (valid_adj)\n\t\t\t\t\ttype = RAKUTYPE_REGEX_S;\n\t\t\t\tbreak;\n\t\t\tcase 'y':\n\t\t\t\tif (valid_adj)\n\t\t\t\t\ttype = RAKUTYPE_REGEX_Y;\n\t\t\t\tbreak;\n\t\t\tcase '/':\n\t\t\t\tif (set.Contains(PrevNonWhitespaceChar(sc)))\n\t\t\t\t\ttype = RAKUTYPE_REGEX_NORM;\n\t\t}\n\t}\n\treturn type >= 0;\n}\n\n/*\n * IsValidIdentPrecede\n * - returns if ch is a valid preceding char to put directly before an identifier\n */\nbool IsValidIdentPrecede(int ch) noexcept {\n\treturn !(IsAlphaNumeric(ch) || ch == '_' || ch == '@' || ch == '$' || ch == '%');\n}\n\n/*\n * IsValidDelimiter\n * - returns if ch is a valid delimiter (most chars are valid)\n *   * ref: Q Language: https://docs.raku.org/language/quoting\n */\nbool IsValidDelimiter(int ch) noexcept {\n\treturn !(IsAlphaNumeric(ch) || ch == ':');\n}\n\n/*\n * GetDelimiterCloseChar\n * - returns the corresponding close char for a given delimiter (could be the same char)\n */\nint GetDelimiterCloseChar(int ch) noexcept {\n\tint ch_end = GetBracketCloseChar(ch);\n\tif (ch_end == 0 && IsValidDelimiter(ch)) {\n\t\tch_end = ch;\n\t}\n\treturn ch_end;\n}\n\n/*\n * GetRepeatCharCount\n * - returns the occurrence count of match\n */\nSci_Position GetRepeatCharCount(StyleContext &sc, int chMatch, Sci_Position length) {\n\tSci_Position cnt = 0;\n\twhile (cnt < length) {\n\t\tif (sc.GetRelativeCharacter(cnt) != chMatch) {\n\t\t\tbreak;\n\t\t}\n\t\tcnt++;\n\t}\n\treturn cnt;\n}\n\n/*\n * LengthToDelimiter\n * - returns the length until the end of a delimited string section\n *   - Ignores nested delimiters (if opener != closer)\n *   - no trailing char after last closer (default false)\n */\nSci_Position LengthToDelimiter(StyleContext &sc, const DelimPair &dp,\n\t\tSci_Position length, bool noTrailing = false) {\n\tshort cnt_open = 0;\t\t\t// count open bracket\n\tshort cnt_close = 0;\t\t// count close bracket\n\tbool is_escape = false;\t\t// has been escaped using '\\'?\n\tSci_Position len = 0;\t\t// count characters\n\tint chOpener = dp.opener;\t// look for nested opener / closer\n\tif (dp.opener == dp.closer[0])\n\t\tchOpener = 0;\t\t\t// no opening delimiter (no nesting possible)\n\n\twhile (len < length) {\n\t\tconst int chPrev = sc.GetRelativeCharacter(len - 1);\n\t\tconst int ch = sc.GetRelativeCharacter(len);\n\t\tconst int chNext = sc.GetRelativeCharacter(len+1);\n\n\t\tif (cnt_open == 0 && cnt_close == dp.count) {\n\t\t\treturn len;\t\t\t\t// end condition has been met\n\t\t} else if (is_escape) {\n\t\t\tis_escape = false;\n\t\t} else if (ch == '\\\\') {\n\t\t\tis_escape = true;\n\t\t} else {\n\t\t\tif (ch == chOpener) {\n\t\t\t\tcnt_open++;\t\t\t// open nested bracket\n\t\t\t} else if (dp.isCloser(ch)) {\n\t\t\t\tif ( cnt_open > 0 ) {\n\t\t\t\t\tcnt_open--;\t\t// close nested bracket\n\t\t\t\t} else if (dp.count > 1 && cnt_close < (dp.count - 1)) {\n\t\t\t\t\tif (cnt_close > 1) {\n\t\t\t\t\t\tif (dp.isCloser(chPrev)) {\n\t\t\t\t\t\t\tcnt_close++;\n\t\t\t\t\t\t} else {\t// reset if previous char was not close\n\t\t\t\t\t\t\tcnt_close = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcnt_close++;\n\t\t\t\t\t}\n\t\t\t\t} else if (!noTrailing || (IsAWhitespace(chNext))) {\n\t\t\t\t\tcnt_close++;\t\t// found last close\n\t\t\t\t\tif (cnt_close > 1 && !dp.isCloser(chPrev)) {\n\t\t\t\t\t\tcnt_close = 0;\t// reset if previous char was not close\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tcnt_close = 0;\t\t// non handled close: reset\n\t\t\t\t}\n\t\t\t} else if (IsANewLine(ch)) {\n\t\t\t\tcnt_open = 0;\t\t\t// reset after each line\n\t\t\t\tcnt_close = 0;\n\t\t\t}\n\t\t}\n\t\tlen++;\n\t}\n\treturn -1; // end condition has NOT been met\n}\n\n/*\n * LengthToEndHeredoc\n * - returns the length until the end of a heredoc section\n *   - delimiter string MUST begin on a new line\n */\nSci_Position LengthToEndHeredoc(const StyleContext &sc, LexAccessor &styler,\n\t\tconst Sci_Position length, const char *delim) {\n\tbool on_new_ln = false;\n\tint i = 0; // str index\n\tfor (int n = 0; n < length; n++) {\n\t\tconst char ch = styler.SafeGetCharAt(sc.currentPos + n, 0);\n\t\tif (on_new_ln) {\n\t\t\tif (delim[i] == '\\0')\n\t\t\t\treturn n;\t// at end of str, match found!\n\t\t\tif (ch != delim[i++])\n\t\t\t\ti = 0;\t\t// no char match, reset 'i'ndex\n\t\t}\n\t\tif (i == 0)\t\t\t// detect new line\n\t\t\ton_new_ln = IsANewLine(ch);\n\t}\n\treturn -1;\t\t\t\t// no match found\n}\n\n/*\n * LengthToNextChar\n * - returns the length until the next character\n */\nSci_Position LengthToNextChar(StyleContext &sc, const Sci_Position length) {\n\tSci_Position len = 0;\n\twhile (++len < length) {\n\t\tconst int ch = sc.GetRelativeCharacter(len);\n\t\tif (!IsASpaceOrTab(ch) && !IsANewLine(ch)) {\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn len;\n}\n\n/*\n * GetRelativeString\n * - gets a relative string and sets it in &str\n *   - resets string before setting\n */\nvoid GetRelativeString(StyleContext &sc, Sci_Position offset, Sci_Position length,\n\t\tstd::string &str) {\n\tSci_Position pos = offset;\n\tstr.clear();\n\twhile (pos < length) {\n\t\tstr += sc.GetRelativeCharacter(pos++);\n\t}\n}\n\n} // end anonymous namespace\n\n/*----------------------------------------------------------------------------*\n * --- class: LexerRaku ---\n *----------------------------------------------------------------------------*/\n//class LexerRaku : public ILexerWithMetaData {\nclass LexerRaku : public DefaultLexer {\n\tCharacterSet setWord;\n\tCharacterSet setSigil;\n\tCharacterSet setTwigil;\n\tCharacterSet setOperator;\n\tCharacterSet setSpecialVar;\n\tWordList regexIdent;\t\t\t// identifiers that specify a regex\n\tOptionsRaku options;\t\t\t// Options from config\n\tOptionSetRaku osRaku;\n\tWordList keywords;\t\t\t\t// Word Lists from config\n\tWordList functions;\n\tWordList typesBasic;\n\tWordList typesComposite;\n\tWordList typesDomainSpecific;\n\tWordList typesExceptions;\n\tWordList adverbs;\n\npublic:\n\t// Defined as explicit, so that constructor can not be copied\n\texplicit LexerRaku() :\n\t\tDefaultLexer(\"raku\", SCLEX_RAKU),\n\t\tsetWord(CharacterSet::setAlphaNum, \"-_\", 0x80),\n\t\tsetSigil(CharacterSet::setNone, \"$&%@\"),\n\t\tsetTwigil(CharacterSet::setNone, \"!*.:<=?^~\"),\n\t\tsetOperator(CharacterSet::setNone, \"^&\\\\()-+=|{}[]:;<>,?!.~\"),\n\t\tsetSpecialVar(CharacterSet::setNone, \"_/!\") {\n\t\tregexIdent.Set(\"regex rule token\");\n\t}\n\t// Deleted so LexerRaku objects can not be copied.\n\tLexerRaku(const LexerRaku &) = delete;\n\tLexerRaku(LexerRaku &&) = delete;\n\tvoid operator=(const LexerRaku &) = delete;\n\tvoid operator=(LexerRaku &&) = delete;\n\tvirtual ~LexerRaku() {\n\t}\n\tvoid SCI_METHOD Release() noexcept override {\n\t\tdelete this;\n\t}\n\tint SCI_METHOD Version() const noexcept override {\n\t\treturn lvRelease5;\n\t}\n\tconst char *SCI_METHOD PropertyNames() override {\n\t\treturn osRaku.PropertyNames();\n\t}\n\tint SCI_METHOD PropertyType(const char *name) override {\n\t\treturn osRaku.PropertyType(name);\n\t}\n\tconst char *SCI_METHOD DescribeProperty(const char *name) override {\n\t\treturn osRaku.DescribeProperty(name);\n\t}\n\tSci_Position SCI_METHOD PropertySet(const char *key, const char *val) override;\n\tconst char *SCI_METHOD PropertyGet(const char *key) override {\n\t\treturn osRaku.PropertyGet(key);\n\t}\n\tconst char *SCI_METHOD DescribeWordListSets() override {\n\t\treturn osRaku.DescribeWordListSets();\n\t}\n\tSci_Position SCI_METHOD WordListSet(int n, const char *wl) override;\n\tvoid SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;\n\tvoid SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;\n\n\tstatic ILexer5 *LexerFactoryRaku() {\n\t\treturn new LexerRaku();\n\t}\n\nprotected:\n\tbool IsOperatorChar(const int ch);\n\tbool IsWordChar(const int ch, bool allowNumber = true);\n\tbool IsWordStartChar(const int ch);\n\tbool IsNumberChar(const int ch, int base = 10);\n\tbool ProcessRegexTwinCapture(StyleContext &sc, const Sci_Position length,\n\t\tint &type, const DelimPair &dp);\n\tvoid ProcessStringVars(StyleContext &sc, const Sci_Position length, const int varState);\n\tbool ProcessValidRegQlangStart(StyleContext &sc, Sci_Position length, const int type,\n\t\tWordList &wordsAdverbs, DelimPair &dp);\n\tSci_Position LengthToNonWordChar(StyleContext &sc, Sci_Position length,\n\t\tchar *s, const int size, Sci_Position offset = 0);\n};\n\n/*----------------------------------------------------------------------------*\n * --- METHODS: LexerRaku ---\n *----------------------------------------------------------------------------*/\n\n/*\n * LexerRaku::IsOperatorChar\n * - Test for both ASCII and Unicode operators\n *   see: https://docs.raku.org/language/unicode_entry\n */\nbool LexerRaku::IsOperatorChar(const int ch) {\n\tif (ch > 0x7F) {\n\t\tswitch (ch) {\n\t\t\t//   Unicode\tASCII Equiv.\n\t\t\tcase 0x2208:\t// (elem)\n\t\t\tcase 0x2209:\t// !(elem)\n\t\t\tcase 0x220B:\t// (cont)\n\t\t\tcase 0x220C:\t// !(cont)\n\t\t\tcase 0x2216:\t// (-)\n\t\t\tcase 0x2229:\t// (&)\n\t\t\tcase 0x222A:\t// (|)\n\t\t\tcase 0x2282:\t// (<)\n\t\t\tcase 0x2283:\t// (>)\n\t\t\tcase 0x2284:\t// !(<)\n\t\t\tcase 0x2285:\t// !(>)\n\t\t\tcase 0x2286:\t// (<=)\n\t\t\tcase 0x2287:\t// (>=)\n\t\t\tcase 0x2288:\t// !(<=)\n\t\t\tcase 0x2289:\t// !(>=)\n\t\t\tcase 0x228D:\t// (.)\n\t\t\tcase 0x228E:\t// (+)\n\t\t\tcase 0x2296:\t// (^)\n\t\t\t\treturn true;\n\t\t}\n\t}\n\treturn setOperator.Contains(ch);\n}\n\n/*\n * LexerRaku::IsWordChar\n * - Test for both ASCII and Unicode identifier characters\n *   see: https://docs.raku.org/language/unicode_ascii\n *   also: ftp://ftp.unicode.org/Public/UCD/latest/ucd/UnicodeData.txt\n *   FIXME: *still* may not contain all valid characters\n */\nbool LexerRaku::IsWordChar(const int ch, bool allowNumber) {\n\t// Unicode numbers should not appear in word identifiers\n\tif (ch > 0x7F) {\n\t\tconst CharacterCategory cc = CategoriseCharacter(ch);\n\t\tswitch (cc) {\n\t\t\t// Letters\n\t\t\tcase ccLu:\n\t\t\tcase ccLl:\n\t\t\tcase ccLt:\n\t\t\tcase ccLm:\n\t\t\tcase ccLo:\n\t\t\t\treturn true;\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t}\n\t} else if (allowNumber && IsADigit(ch)) {\n\t\treturn true; // an ASCII number type\n\t}\n\treturn setWord.Contains(ch);\n}\n\n/*\n * LexerRaku::IsWordStartChar\n * - Test for both ASCII and Unicode identifier \"start / first\" characters\n */\nbool LexerRaku::IsWordStartChar(const int ch) {\n\treturn ch != '-' && IsWordChar(ch, false); // no numbers allowed\n}\n\n/*\n * LexerRaku::IsNumberChar\n * - Test for both ASCII and Unicode identifier number characters\n *   see: https://docs.raku.org/language/unicode_ascii\n *   also: ftp://ftp.unicode.org/Public/UCD/latest/ucd/UnicodeData.txt\n *   FILTERED by Unicode letters that are NUMBER\n *     and NOT PARENTHESIZED or CIRCLED\n *   FIXME: *still* may not contain all valid number characters\n */\nbool LexerRaku::IsNumberChar(const int ch, int base) {\n\tif (ch > 0x7F) {\n\t\tconst CharacterCategory cc = CategoriseCharacter(ch);\n\t\tswitch (cc) {\n\t\t\t// Numbers\n\t\t\tcase ccNd:\n\t\t\tcase ccNl:\n\t\t\tcase ccNo:\n\t\t\t\treturn true;\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t}\n\t}\n\treturn IsADigit(ch, base);\n}\n\n/*\n * LexerRaku::PropertySet\n * -\n */\nSci_Position SCI_METHOD LexerRaku::PropertySet(const char *key, const char *val) {\n\tif (osRaku.PropertySet(&options, key, val))\n\t\treturn 0;\n\treturn -1;\n}\n\n/*\n * LexerRaku::WordListSet\n * -\n */\nSci_Position SCI_METHOD LexerRaku::WordListSet(int n, const char *wl) {\n\tWordList *wordListN = nullptr;\n\tswitch (n) {\n\t\tcase 0:\n\t\t\twordListN = &keywords;\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\twordListN = &functions;\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\twordListN = &typesBasic;\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\twordListN = &typesComposite;\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\twordListN = &typesDomainSpecific;\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\twordListN = &typesExceptions;\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\twordListN = &adverbs;\n\t\t\tbreak;\n\t}\n\tSci_Position firstModification = -1;\n\tif (wordListN) {\n\t\tif (wordListN->Set(wl)) {\n\t\t\tfirstModification = 0;\n\t\t}\n\t}\n\treturn firstModification;\n}\n\n/*\n * LexerRaku::ProcessRegexTwinCapture\n * - processes the transition between a regex pair (two sets of delimiters)\n * - moves to first new delimiter, if a bracket\n * - returns true when valid delimiter start found (if bracket)\n */\nbool LexerRaku::ProcessRegexTwinCapture(StyleContext &sc, const Sci_Position length,\n\t\tint &type, const DelimPair &dp) {\n\n\tif (type == RAKUTYPE_REGEX_S || type == RAKUTYPE_REGEX_TR || type == RAKUTYPE_REGEX_Y) {\n\t\ttype = -1; // clear type\n\n\t\t// move past chRegQClose if it was the previous char\n\t\tif (dp.isCloser(sc.chPrev))\n\t\t\tsc.Forward();\n\n\t\t// no processing needed for non-bracket\n\t\tif (dp.isCloser(dp.opener))\n\t\t\treturn true;\n\n\t\t// move to next opening bracket\n\t\tconst Sci_Position len = LengthToNextChar(sc, length);\n\t\tif (sc.GetRelativeCharacter(len) == dp.opener) {\n\t\t\tsc.Forward(len);\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\n/*\n * LexerRaku::ProcessStringVars\n * - processes a string and highlights any valid variables\n */\nvoid LexerRaku::ProcessStringVars(StyleContext &sc, const Sci_Position length, const int varState) {\n\tconst int state = sc.state;\n\tfor (Sci_Position pos = 0; pos < length; pos++) {\n\t\tif (sc.state == varState && !IsWordChar(sc.ch)) {\n\t\t\tsc.SetState(state);\n\t\t} else if (sc.chPrev != '\\\\'\n\t\t\t\t&& (sc.ch == '$' || sc.ch == '@')\n\t\t\t\t&& IsWordStartChar(sc.chNext)) {\n\t\t\tsc.SetState(varState);\n\t\t}\n\t\tsc.Forward(); // Next character\n\t}\n}\n/*\n * LexerRaku::ProcessValidRegQlangStart\n * - processes a section of the document range from after a Regex / Q delimiter\n * - returns true on success\n *   - sets: adverbs, chOpen, chClose, chCount\n *  ref: https://docs.raku.org/language/regexes\n */\nbool LexerRaku::ProcessValidRegQlangStart(StyleContext &sc, Sci_Position length, const int type,\n\t\tWordList &wordsAdverbs, DelimPair &dp) {\n\tSci_Position startPos = sc.currentPos;\n\tSci_Position startLen = length;\n\tconst int target_state = sc.state;\n\tint state = SCE_RAKU_DEFAULT;\n\tstd::string str;\n\n\t// find our opening delimiter (and occurrences) / save any adverbs\n\tdp.opener = 0;\t\t\t\t\t// adverbs can be after the first delimiter\n\tbool got_all_adverbs = false;\t// in Regex statements\n\tbool got_ident = false;\t\t\t// regex can have an identifier: 'regex R'\n\tsc.SetState(state);\t\t\t\t// set state default to avoid pre-highlights\n\twhile ((dp.opener == 0 || !got_all_adverbs) && sc.More()) {\n\n\t\t// move to the next non-space character\n\t\tconst bool was_space = IsAWhitespace(sc.ch);\n\t\tif (!got_all_adverbs && was_space) {\n\t\t\tsc.Forward(LengthToNextChar(sc, length));\n\t\t}\n\t\tlength = startLen - (sc.currentPos - startPos); // update length remaining\n\n\t\t// parse / eat an identifier (if type == RAKUTYPE_REGEX)\n\t\tif (dp.opener == 0 && !got_ident && type == RAKUTYPE_REGEX && IsAlphabet(sc.ch)) {\n\n\t\t\t// eat identifier / account for special adverb :sym<name>\n\t\t\tbool got_sym = false;\n\t\t\twhile (sc.More()) {\n\t\t\t\tsc.SetState(SCE_RAKU_IDENTIFIER);\n\t\t\t\twhile (sc.More() && (IsAlphaNumeric(sc.chNext)\n\t\t\t\t\t\t|| sc.chNext == '_' || sc.chNext == '-')) {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t}\n\t\t\t\tsc.Forward();\n\t\t\t\tif (got_sym && sc.ch == '>') {\n\t\t\t\t\tsc.SetState(SCE_RAKU_OPERATOR);\t// '>'\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\tbreak;\n\t\t\t\t} else if (type == RAKUTYPE_REGEX && sc.Match(\":sym<\")) {\n\t\t\t\t\tsc.SetState(SCE_RAKU_ADVERB);\t// ':sym'\n\t\t\t\t\tsc.Forward(4);\n\t\t\t\t\tsc.SetState(SCE_RAKU_OPERATOR);\t// '<'\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\tgot_sym = true;\n\t\t\t\t} else {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tsc.SetState(state);\n\t\t\tgot_ident = true;\n\t\t}\n\n\t\t// parse / save an adverb: RAKUTYPE_REGEX only has adverbs after delim\n\t\t//                      >= RAKUTYPE_QLANG only has adverbs before delim\n\t\telse if (!got_all_adverbs && sc.ch == ':' && (!(dp.opener == 0 && got_ident)\n\t\t\t\t&& !(dp.opener > 0 && type >= RAKUTYPE_QLANG))) {\n\t\t\tsc.SetState(SCE_RAKU_ADVERB);\n\t\t\twhile (IsAlphaNumeric(sc.chNext) && sc.More()) {\n\t\t\t\tsc.Forward();\n\t\t\t\tstr += sc.ch;\n\t\t\t}\n\t\t\tstr += ' ';\n\t\t\tsc.Forward();\n\t\t\tsc.SetState(state);\n\t\t}\n\n\t\t// find starting delimiter\n\t\telse if (dp.opener == 0 && (was_space || IsValidRegOrQAdjacent(sc.ch))\n\t\t\t\t&& IsValidDelimiter(sc.ch)) {\t// make sure the delimiter is legal (most are)\n\t\t\tsc.SetState((state = target_state));// start state here...\n\t\t\tdp.opener = sc.ch;\t\t\t\t\t// this is our delimiter, get count\n\t\t\tif (type < RAKUTYPE_QLANG)\t\t\t// type is Regex\n\t\t\t\tdp.count = 1;\t\t\t\t\t// has only one delimiter\n\t\t\telse\n\t\t\t\tdp.count = GetRepeatCharCount(sc, dp.opener, length);\n\t\t\tsc.Forward(dp.count);\n\t\t}\n\n\t\t// we must have all the adverbs by now...\n\t\telse {\n\t\t\tif (got_all_adverbs)\n\t\t\t\tbreak; // prevent infinite loop: occurs on missing open char\n\t\t\tgot_all_adverbs = true;\n\t\t}\n\t}\n\n\t// set word list / find a valid closing delimiter (or bomb!)\n\twordsAdverbs.Set(str.c_str());\n\tdp.closer[0] = GetDelimiterCloseChar(dp.opener);\n\tdp.closer[1] = 0; // no other closer char\n\treturn dp.closer[0] > 0;\n}\n\n/*\n * LexerRaku::LengthToNonWordChar\n * - returns the length until the next non \"word\" character: AlphaNum + '_'\n *   - also sets all the parsed chars in 's'\n */\nSci_Position LexerRaku::LengthToNonWordChar(StyleContext &sc, Sci_Position length,\n\t\tchar *s, const int size, Sci_Position offset) {\n\tSci_Position len = 0;\n\tSci_Position max_length = size < length ? size : length;\n\twhile (len <= max_length) {\n\t\tconst int ch = sc.GetRelativeCharacter(len + offset);\n\t\tif (!IsWordChar(ch)) {\n\t\t\ts[len] = '\\0';\n\t\t\tbreak;\n\t\t}\n\t\ts[len] = ch;\n\t\tlen++;\n\t}\n\ts[len + 1] = '\\0';\n\treturn len;\n}\n\n/*\n * LexerRaku::Lex\n * - Main lexer method\n */\nvoid SCI_METHOD LexerRaku::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) {\n\tLexAccessor styler(pAccess);\n\tDelimPair dpEmbeded;\t\t\t// delimiter pair: embedded comments\n\tDelimPair dpString;\t\t\t\t// delimiter pair: string\n\tDelimPair dpRegQ;\t\t\t\t// delimiter pair: Regex / Q Lang\n\tstd::string hereDelim;\t\t\t// heredoc delimiter (if in heredoc)\n\tint hereState = 0;\t\t\t\t// heredoc state to use (Q / QQ)\n\tint numState = 0;\t\t\t\t// number state / type\n\tshort cntDecimal = 0;\t\t\t// number decimal count\n\tstd::string wordLast;\t\t\t// last word seen\n\tstd::string identLast;\t\t\t// last identifier seen\n\tstd::string adverbLast;\t\t\t// last (single) adverb seen\n\tWordList lastAdverbs;\t\t\t// last adverbs seen\n\tSci_Position len;\t\t\t\t// temp length value\n\tchar s[100];\t\t\t\t\t// temp char string\n\tint typeDetect = -1;\t\t\t// temp type detected (for regex and Q lang)\n\tSci_Position lengthToEnd;\t\t// length until the end of range\n\n\t// Backtrack to safe start position before complex quoted elements\n\n\tSci_PositionU newStartPos = startPos;\n\tif (initStyle != SCE_RAKU_DEFAULT) {\n\t\t// Backtrack to last SCE_RAKU_DEFAULT or 0\n\t\twhile (newStartPos > 0) {\n\t\t\tnewStartPos--;\n\t\t\tif (styler.StyleAt(newStartPos) == SCE_RAKU_DEFAULT)\n\t\t\t\tbreak;\n\t\t}\n\t\t// Backtrack to start of line before SCE_RAKU_HEREDOC_Q?\n\t\tif (initStyle == SCE_RAKU_HEREDOC_Q || initStyle == SCE_RAKU_HEREDOC_QQ) {\n\t\t\tif (newStartPos > 0) {\n\t\t\t\tnewStartPos = styler.LineStart(styler.GetLine(newStartPos));\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst Sci_Position line = styler.GetLine(newStartPos);\n\t\tif (line > 0) {\n\t\t\t// If the previous line is a start of a q or qq heredoc, backtrack to start of line\n\t\t\tconst Sci_Position startPreviousLine = styler.LineStart(line-1);\n\t\t\tif (ContainsQTo(startPreviousLine, newStartPos, styler)) {\n\t\t\t\tnewStartPos = startPreviousLine;\n\t\t\t}\n\t\t}\n\t}\n\n\n\t// Re-calculate (any) changed startPos, length and initStyle state\n\tif (newStartPos < startPos) {\n\t\tinitStyle = SCE_RAKU_DEFAULT;\n\t\tlength += startPos - newStartPos;\n\t\tstartPos = newStartPos;\n\t}\n\n\t// init StyleContext\n\tStyleContext sc(startPos, length, initStyle, styler);\n\n\t// StyleContext Loop\n\tfor (; sc.More(); sc.Forward()) {\n\t\tlengthToEnd = (length - (sc.currentPos - startPos)); // end of range\n\n\t\t/* *** Determine if the current state should terminate ************** *\n\t\t * Everything within the 'switch' statement processes characters up\n\t\t * until the end of a syntax highlight section / state.\n\t\t * ****************************************************************** */\n\t\tswitch (sc.state) {\n\t\t\tcase SCE_RAKU_OPERATOR:\n\t\t\t\tsc.SetState(SCE_RAKU_DEFAULT);\n\t\t\t\tbreak; // FIXME: better valid operator sequences needed?\n\t\t\tcase SCE_RAKU_COMMENTLINE:\n\t\t\t\tif (IsANewLine(sc.ch)) {\n\t\t\t\t\tsc.SetState(SCE_RAKU_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_RAKU_COMMENTEMBED:\n\t\t\t\tif ((len = LengthToDelimiter(sc, dpEmbeded, lengthToEnd)) >= 0) {\n\t\t\t\t\tsc.Forward(len);\t\t\t// Move to end delimiter\n\t\t\t\t\tsc.SetState(SCE_RAKU_DEFAULT);\n\t\t\t\t} else {\n\t\t\t\t\tsc.Forward(lengthToEnd);\t// no end delimiter found\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_RAKU_POD:\n\t\t\t\tif (sc.atLineStart && sc.Match(\"=end pod\")) {\n\t\t\t\t\tsc.Forward(8);\n\t\t\t\t\tsc.SetState(SCE_RAKU_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_RAKU_STRING:\n\n\t\t\t\t// Process the string for variables: move to end delimiter\n\t\t\t\tif ((len = LengthToDelimiter(sc, dpString, lengthToEnd)) >= 0) {\n\t\t\t\t\tif (dpString.interpol) {\n\t\t\t\t\t\tProcessStringVars(sc, len, SCE_RAKU_STRING_VAR);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsc.Forward(len);\n\t\t\t\t\t}\n\t\t\t\t\tsc.SetState(SCE_RAKU_DEFAULT);\n\t\t\t\t} else {\n\t\t\t\t\tsc.Forward(lengthToEnd);\t// no end delimiter found\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_RAKU_STRING_Q:\n\t\t\tcase SCE_RAKU_STRING_QQ:\n\t\t\tcase SCE_RAKU_STRING_Q_LANG:\n\n\t\t\t\t// No string: previous char was the delimiter\n\t\t\t\tif (dpRegQ.count == 1 && dpRegQ.isCloser(sc.chPrev)) {\n\t\t\t\t\tsc.SetState(SCE_RAKU_DEFAULT);\n\t\t\t\t}\n\n\t\t\t\t// Process the string for variables: move to end delimiter\n\t\t\t\telse if ((len = LengthToDelimiter(sc, dpRegQ, lengthToEnd)) >= 0) {\n\n\t\t\t\t\t// set (any) heredoc delimiter string\n\t\t\t\t\tif (lastAdverbs.InList(\"to\")) {\n\t\t\t\t\t\tGetRelativeString(sc, -1, len - dpRegQ.count, hereDelim);\n\t\t\t\t\t\thereState = SCE_RAKU_HEREDOC_Q; // default heredoc state\n\t\t\t\t\t}\n\n\t\t\t\t\t// select variable identifiers\n\t\t\t\t\tif (sc.state == SCE_RAKU_STRING_QQ || lastAdverbs.InList(\"qq\")) {\n\t\t\t\t\t\tProcessStringVars(sc, len, SCE_RAKU_STRING_VAR);\n\t\t\t\t\t\thereState = SCE_RAKU_HEREDOC_QQ; // potential heredoc state\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsc.Forward(len);\n\t\t\t\t\t}\n\t\t\t\t\tsc.SetState(SCE_RAKU_DEFAULT);\n\t\t\t\t} else {\n\t\t\t\t\tsc.Forward(lengthToEnd);\t// no end delimiter found\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_RAKU_HEREDOC_Q:\n\t\t\tcase SCE_RAKU_HEREDOC_QQ:\n\t\t\t\tif ((len = LengthToEndHeredoc(sc, styler, lengthToEnd, hereDelim.c_str())) >= 0) {\n\t\t\t\t\t// select variable identifiers\n\t\t\t\t\tif (sc.state == SCE_RAKU_HEREDOC_QQ) {\n\t\t\t\t\t\tProcessStringVars(sc, len, SCE_RAKU_STRING_VAR);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsc.Forward(len);\n\t\t\t\t\t}\n\t\t\t\t\tsc.SetState(SCE_RAKU_DEFAULT);\n\t\t\t\t} else {\n\t\t\t\t\tsc.Forward(lengthToEnd);\t// no end delimiter found\n\t\t\t\t}\n\t\t\t\thereDelim.clear();\t\t\t\t// clear heredoc delimiter\n\t\t\t\tbreak;\n\t\t\tcase SCE_RAKU_REGEX:\n\t\t\t\t// account for typeDetect = RAKUTYPE_REGEX_S/TR/Y\n\t\t\t\twhile (sc.state == SCE_RAKU_REGEX) {\n\n\t\t\t\t\t// No string: previous char was the delimiter\n\t\t\t\t\tif (dpRegQ.count == 1 && dpRegQ.isCloser(sc.chPrev)) {\n\t\t\t\t\t\tif (ProcessRegexTwinCapture(sc, lengthToEnd, typeDetect, dpRegQ))\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\tsc.SetState(SCE_RAKU_DEFAULT);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Process the string for variables: move to end delimiter\n\t\t\t\t\telse if ((len = LengthToDelimiter(sc, dpRegQ, lengthToEnd)) >= 0) {\n\t\t\t\t\t\tProcessStringVars(sc, len, SCE_RAKU_REGEX_VAR);\n\t\t\t\t\t\tif (ProcessRegexTwinCapture(sc, lengthToEnd, typeDetect, dpRegQ))\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\tsc.SetState(SCE_RAKU_DEFAULT);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsc.Forward(lengthToEnd); // no end delimiter found\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_RAKU_NUMBER:\n\t\t\t\tif (sc.ch == '.') {\n\t\t\t\t\tif (sc.chNext == '.') {\t\t// '..' is an operator\n\t\t\t\t\t\tsc.SetState(SCE_RAKU_OPERATOR);\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t\tif (sc.chNext == '.')\t// '...' is also an operator\n\t\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else if (numState > RAKUNUM_FLOAT_EXP\n\t\t\t\t\t\t\t&& (cntDecimal < 1 || numState == RAKUNUM_VERSION)) {\n\t\t\t\t\t\tcntDecimal++;\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsc.SetState(SCE_RAKU_DEFAULT);\n\t\t\t\t\t\tbreak; // too many decimal places\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tswitch (numState) {\n\t\t\t\t\tcase RAKUNUM_BINARY:\n\t\t\t\t\t\tif (!IsNumberChar(sc.ch, 2))\n\t\t\t\t\t\t\tsc.SetState(SCE_RAKU_DEFAULT);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase RAKUNUM_OCTAL:\n\t\t\t\t\t\tif (!IsNumberChar(sc.ch, 8))\n\t\t\t\t\t\t\tsc.SetState(SCE_RAKU_DEFAULT);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase RAKUNUM_HEX:\n\t\t\t\t\t\tif (!IsNumberChar(sc.ch, 16))\n\t\t\t\t\t\t\tsc.SetState(SCE_RAKU_DEFAULT);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase RAKUNUM_DECIMAL:\n\t\t\t\t\tcase RAKUNUM_VERSION:\n\t\t\t\t\t\tif (!IsNumberChar(sc.ch))\n\t\t\t\t\t\t\tsc.SetState(SCE_RAKU_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_RAKU_WORD:\n\t\t\tcase SCE_RAKU_FUNCTION:\n\t\t\tcase SCE_RAKU_TYPEDEF:\n\t\t\tcase SCE_RAKU_ADVERB:\n\t\t\t\tsc.SetState(SCE_RAKU_DEFAULT);\n\t\t\t\tbreak;\n\t\t\tcase SCE_RAKU_MU:\n\t\t\tcase SCE_RAKU_POSITIONAL:\n\t\t\tcase SCE_RAKU_ASSOCIATIVE:\n\t\t\tcase SCE_RAKU_CALLABLE:\n\t\t\tcase SCE_RAKU_IDENTIFIER:\n\t\t\tcase SCE_RAKU_GRAMMAR:\n\t\t\tcase SCE_RAKU_CLASS:\n\t\t\t\tsc.SetState(SCE_RAKU_DEFAULT);\n\t\t\t\tbreak;\n\t\t}\n\n\t\t/* *** Determine if a new state should be entered ******************* *\n\t\t * Everything below here identifies the beginning of a state, all or part\n\t\t * of the characters within this state are processed here, the rest are\n\t\t * completed above in the terminate state section.\n\t\t * ****************************************************************** */\n\t\tif (sc.state == SCE_RAKU_DEFAULT) {\n\n\t\t\t// --- Single line comment\n\t\t\tif (sc.ch == '#') {\n\t\t\t\tsc.SetState(SCE_RAKU_COMMENTLINE);\n\t\t\t}\n\n\t\t\t// --- POD block\n\t\t\telse if (sc.atLineStart && sc.Match(\"=begin pod\")) {\n\t\t\t\tsc.SetState(SCE_RAKU_POD);\n\t\t\t\tsc.Forward(10);\n\t\t\t}\n\n\t\t\t// --- String (normal)\n\t\t\telse if (sc.chPrev != '\\\\' && (IsValidQuoteOpener(sc.ch, dpString, RAKUDELIM_QUOTE))) {\n\t\t\t\tsc.SetState(SCE_RAKU_STRING);\n\t\t\t}\n\n\t\t\t// --- String (Q Language) ----------------------------------------\n\t\t\t//   - https://docs.raku.org/language/quoting\n\t\t\t//   - Q :adverb :adverb //;\n\t\t\t//   - q,qx,qw,qq,qqx,qqw,qqww :adverb :adverb //;\n\t\t\telse if (IsQLangStartAtScPos(sc, typeDetect, lengthToEnd)) {\n\t\t\t\tint state = SCE_RAKU_STRING_Q_LANG;\n\t\t\t\tSci_Position forward = 1;\t// single char ident (default)\n\t\t\t\tif (typeDetect > RAKUTYPE_QLANG) {\n\t\t\t\t\tstate = SCE_RAKU_STRING_Q;\n\t\t\t\t\tif (typeDetect == RAKUTYPE_STR_WQ)\n\t\t\t\t\t\tforward = 0;\t\t// no char ident\n\t\t\t\t}\n\t\t\t\tif (typeDetect > RAKUTYPE_STR_Q) {\n\t\t\t\t\tif (typeDetect == RAKUTYPE_STR_QQ)\n\t\t\t\t\t\tstate = SCE_RAKU_STRING_QQ;\n\t\t\t\t\tforward++;\t\t\t\t// two char ident\n\t\t\t\t}\n\t\t\t\tif (typeDetect > RAKUTYPE_STR_QQ)\n\t\t\t\t\tforward++;\t\t\t\t// three char ident\n\t\t\t\tif (typeDetect == RAKUTYPE_STR_QQWW)\n\t\t\t\t\tforward++;\t\t\t\t// four char ident\n\n\t\t\t\t// Proceed: check for a valid character after statement\n\t\t\t\tif (IsValidRegOrQAdjacent(sc.GetRelative(forward)) || typeDetect == RAKUTYPE_QLANG) {\n\t\t\t\t\tsc.SetState(state);\n\t\t\t\t\tsc.Forward(forward);\n\t\t\t\t\tlastAdverbs.Clear();\n\n\t\t\t\t\t// Process: adverbs / opening delimiter / adverbs after delim\n\t\t\t\t\tif (ProcessValidRegQlangStart(sc, lengthToEnd, typeDetect,\n\t\t\t\t\t\t\tlastAdverbs, dpRegQ))\n\t\t\t\t\t\tsc.SetState(state);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// --- Regex (rx/s/m/tr/y) ----------------------------------------\n\t\t\t//   - https://docs.raku.org/language/regexes\n\t\t\telse if ((IsRegexStartAtScPos(sc, typeDetect, setOperator) || regexIdent.InList(wordLast.c_str()))) {\n\t\t\t\tif (typeDetect == -1) { // must be a regex identifier word\n\t\t\t\t\twordLast.clear();\n\t\t\t\t\ttypeDetect = RAKUTYPE_REGEX;\n\t\t\t\t}\n\t\t\t\tSci_Position forward = 0;\t// no ident (RAKUTYPE_REGEX, RAKUTYPE_REGEX_NORM)\n\t\t\t\tif (typeDetect > 0 && typeDetect != RAKUTYPE_REGEX)\n\t\t\t\t\tforward++;\t\t\t\t// single char ident\n\t\t\t\tif (typeDetect > RAKUTYPE_REGEX)\n\t\t\t\t\tforward++;\t\t\t\t// two char ident\n\n\t\t\t\t// Proceed: check for a valid character after statement\n\t\t\t\tif (IsValidRegOrQAdjacent(sc.GetRelative(forward)) || typeDetect == RAKUTYPE_REGEX_NORM) {\n\t\t\t\t\tsc.SetState(SCE_RAKU_REGEX);\n\t\t\t\t\tsc.Forward(forward);\n\t\t\t\t\tlastAdverbs.Clear();\n\n\t\t\t\t\t// Process: adverbs / opening delimiter / adverbs after delim\n\t\t\t\t\tif (ProcessValidRegQlangStart(sc, lengthToEnd, typeDetect,\n\t\t\t\t\t\t\tlastAdverbs, dpRegQ))\n\t\t\t\t\t\tsc.SetState(SCE_RAKU_REGEX);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// --- Numbers ----------------------------------------------------\n\t\t\telse if (IsValidIdentPrecede(sc.chPrev) && (IsNumberChar(sc.ch)\n\t\t\t\t\t|| (sc.ch == 'v' && IsNumberChar(sc.chNext) && wordLast == \"use\"))) {\n\t\t\t\tnumState = RAKUNUM_DECIMAL;\t// default: decimal (base 10)\n\t\t\t\tcntDecimal = 0;\n\t\t\t\tsc.SetState(SCE_RAKU_NUMBER);\n\t\t\t\tif (sc.ch == 'v')\t\t\t// forward past 'v'\n\t\t\t\t\tsc.Forward();\n\t\t\t\tif (wordLast == \"use\") {\t// package version number\n\t\t\t\t\tnumState = RAKUNUM_VERSION;\n\t\t\t\t} else if (sc.ch == '0') {\t// other type of number\n\t\t\t\t\tswitch (sc.chNext) {\n\t\t\t\t\t\tcase 'b':\t// binary (base 2)\n\t\t\t\t\t\t\tnumState = RAKUNUM_BINARY;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'o':\t// octal (base 8)\n\t\t\t\t\t\t\tnumState = RAKUNUM_OCTAL;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'x':\t// hexadecimal (base 16)\n\t\t\t\t\t\t\tnumState = RAKUNUM_HEX;\n\t\t\t\t\t}\n\t\t\t\t\tif (numState != RAKUNUM_DECIMAL)\n\t\t\t\t\t\tsc.Forward();\t\t// forward to number type char\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// --- Keywords / functions / types / barewords -------------------\n\t\t\telse if ((sc.currentPos == 0 || sc.atLineStart || IsValidIdentPrecede(sc.chPrev))\n\t\t\t\t\t&& IsWordStartChar(sc.ch)) {\n\t\t\t\tlen = LengthToNonWordChar(sc, lengthToEnd, s, sizeof(s));\n\t\t\t\tif (keywords.InList(s)) {\n\t\t\t\t\tsc.SetState(SCE_RAKU_WORD);\t\t// Keywords\n\t\t\t\t} else if(functions.InList(s)) {\n\t\t\t\t\tsc.SetState(SCE_RAKU_FUNCTION);\t// Functions\n\t\t\t\t} else if(typesBasic.InList(s)) {\n\t\t\t\t\tsc.SetState(SCE_RAKU_TYPEDEF);\t// Types (basic)\n\t\t\t\t} else if(typesComposite.InList(s)) {\n\t\t\t\t\tsc.SetState(SCE_RAKU_TYPEDEF);\t// Types (composite)\n\t\t\t\t} else if(typesDomainSpecific.InList(s)) {\n\t\t\t\t\tsc.SetState(SCE_RAKU_TYPEDEF);\t// Types (domain-specific)\n\t\t\t\t} else if(typesExceptions.InList(s)) {\n\t\t\t\t\tsc.SetState(SCE_RAKU_TYPEDEF);\t// Types (exceptions)\n\t\t\t\t} else {\n\t\t\t\t\tif (wordLast == \"class\")\n\t\t\t\t\t\tsc.SetState(SCE_RAKU_CLASS);\t// a Class ident\n\t\t\t\t\telse if (wordLast == \"grammar\")\n\t\t\t\t\t\tsc.SetState(SCE_RAKU_GRAMMAR);\t// a Grammar ident\n\t\t\t\t\telse\n\t\t\t\t\t\tsc.SetState(SCE_RAKU_IDENTIFIER);\t// Bareword\n\t\t\t\t\tidentLast = s;\t\t\t\t\t\t// save identifier\n\t\t\t\t}\n\t\t\t\tif (adverbLast == \"sym\") {\t\t\t\t// special adverb \":sym\"\n\t\t\t\t\tsc.SetState(SCE_RAKU_IDENTIFIER);\t// treat as identifier\n\t\t\t\t\tidentLast = s;\t\t\t\t\t\t// save identifier\n\t\t\t\t}\n\t\t\t\tif (sc.state != SCE_RAKU_IDENTIFIER)\n\t\t\t\t\twordLast = s;\t\t\t\t\t// save word\n\t\t\t\tsc.Forward(len - 1);\t\t\t\t// ...forward past word\n\t\t\t}\n\n\t\t\t// --- Adverbs ----------------------------------------------------\n\t\t\telse if (sc.ch == ':' && IsWordStartChar(sc.chNext)) {\n\t\t\t\tlen = LengthToNonWordChar(sc, lengthToEnd, s, sizeof(s), 1);\n\t\t\t\tif (adverbs.InList(s)) {\n\t\t\t\t\tsc.SetState(SCE_RAKU_ADVERB);\t// Adverbs (begin with ':')\n\t\t\t\t\tadverbLast = s;\t\t\t\t\t// save word\n\t\t\t\t\tsc.Forward(len); // ...forward past word (less offset: 1)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// --- Identifiers: $mu / @positional / %associative / &callable --\n\t\t\t//     see: https://docs.raku.org/language/variables\n\t\t\telse if (setSigil.Contains(sc.ch) && (setTwigil.Contains(sc.chNext)\n\t\t\t\t\t|| setSpecialVar.Contains(sc.chNext)\n\t\t\t\t\t|| IsWordStartChar(sc.chNext))) {\n\n\t\t\t\t// State based on sigil\n\t\t\t\tswitch (sc.ch) {\n\t\t\t\t\tcase '$': sc.SetState(SCE_RAKU_MU);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '@': sc.SetState(SCE_RAKU_POSITIONAL);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '%': sc.SetState(SCE_RAKU_ASSOCIATIVE);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '&': sc.SetState(SCE_RAKU_CALLABLE);\n\t\t\t\t}\n\t\t\t\tconst int state = sc.state;\n\t\t\t\tsc.Forward();\n\t\t\t\tchar ch_delim = 0;\n\t\t\t\tif (setSpecialVar.Contains(sc.ch)\n\t\t\t\t\t\t&& !setWord.Contains(sc.chNext)) {\t// Process Special Var\n\t\t\t\t\tch_delim = -1;\n\t\t\t\t} else if (setTwigil.Contains(sc.ch)) {\t\t// Process Twigil\n\t\t\t\t\tsc.SetState(SCE_RAKU_OPERATOR);\n\t\t\t\t\tif (sc.ch == '<' && setWord.Contains(sc.chNext))\n\t\t\t\t\t\tch_delim = '>';\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\tsc.SetState(state);\n\t\t\t\t}\n\n\t\t\t\t// Process (any) identifier\n\t\t\t\tif (ch_delim >= 0) {\n\t\t\t\t\tsc.Forward(LengthToNonWordChar(sc, lengthToEnd, s, sizeof(s)) - 1);\n\t\t\t\t\tif (ch_delim > 0 && sc.chNext == ch_delim) {\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t\tsc.SetState(SCE_RAKU_OPERATOR);\n\t\t\t\t\t}\n\t\t\t\t\tidentLast = s;\t// save identifier\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// --- Operators --------------------------------------------------\n\t\t\telse if (IsOperatorChar(sc.ch)) {\n\t\t\t\t// FIXME: better valid operator sequences needed?\n\t\t\t\tsc.SetState(SCE_RAKU_OPERATOR);\n\t\t\t}\n\n\t\t\t// --- Heredoc: begin ---------------------------------------------\n\t\t\telse if (!hereDelim.empty() && sc.atLineEnd) {\n\t\t\t\tif (IsANewLine(sc.ch))\n\t\t\t\t\tsc.Forward(); // skip a possible CRLF situation\n\t\t\t\tsc.SetState(hereState);\n\t\t\t}\n\n\t\t\t// Reset words: on operator semi-colon OR '}' (end of statement)\n\t\t\tif (sc.state == SCE_RAKU_OPERATOR && (sc.ch == ';' || sc.ch == '}')) {\n\t\t\t\twordLast.clear();\n\t\t\t\tidentLast.clear();\n\t\t\t\tadverbLast.clear();\n\t\t\t}\n\t\t}\n\n\t\t/* *** Determine if an \"embedded comment\" is to be entered ********** *\n\t\t * This type of embedded comment section, or multi-line comment comes\n\t\t * after a normal comment has begun... e.g: #`[ ... ]\n\t\t * ****************************************************************** */\n\t\telse if (sc.state == SCE_RAKU_COMMENTLINE && sc.chPrev == '#' && sc.ch == '`') {\n\t\t\tif (IsBracketOpenChar(sc.chNext)) {\n\t\t\t\tsc.Forward(); // Condition met for \"embedded comment\"\n\t\t\t\tdpEmbeded.opener = sc.ch;\n\n\t\t\t\t// Find the opposite (termination) closing bracket (if any)\n\t\t\t\tdpEmbeded.closer[0] = GetBracketCloseChar(dpEmbeded.opener);\n\t\t\t\tif (dpEmbeded.closer[0] > 0) { // Enter \"embedded comment\"\n\n\t\t\t\t\t// Find multiple opening character occurrence\n\t\t\t\t\tdpEmbeded.count = GetRepeatCharCount(sc, dpEmbeded.opener, lengthToEnd);\n\t\t\t\t\tsc.SetState(SCE_RAKU_COMMENTEMBED);\n\t\t\t\t\tsc.Forward(dpEmbeded.count - 1); // incremented in the next loop\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// And we're done...\n\tsc.Complete();\n}\n\n/*\n * LexerRaku::Lex\n * - Main fold method\n *   NOTE: although Raku uses and supports UNICODE characters, we're only looking\n *         at normal chars here, using 'SafeGetCharAt' - for folding purposes\n *         that is all we need.\n */\n#define RAKU_HEADFOLD_SHIFT\t4\n#define RAKU_HEADFOLD_MASK\t0xF0\nvoid SCI_METHOD LexerRaku::Fold(Sci_PositionU startPos, Sci_Position length, int /* initStyle */, IDocument *pAccess) {\n\n\t// init LexAccessor / return if fold option is off\n\tif (!options.fold) return;\n\tLexAccessor styler(pAccess);\n\n\t// init char and line positions\n\tconst Sci_PositionU endPos = startPos + length;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\n\t// Backtrack to last SCE_RAKU_DEFAULT line\n\tif (startPos > 0 && lineCurrent > 0) {\n\t\twhile (lineCurrent > 0 && styler.StyleAt(startPos) != SCE_RAKU_DEFAULT) {\n\t\t\tlineCurrent--;\n\t\t\tstartPos = styler.LineStart(lineCurrent);\n\t\t}\n\t\tlineCurrent = styler.GetLine(startPos);\n\t}\n\tSci_PositionU lineStart = startPos;\n\tSci_PositionU lineStartNext = styler.LineStart(lineCurrent + 1);\n\n\t// init line folding level\n\tint levelPrev = SC_FOLDLEVELBASE;\n\tif (lineCurrent > 0)\n\t\tlevelPrev = styler.LevelAt(lineCurrent - 1) >> 16;\n\tint levelCurrent = levelPrev;\n\n\t// init char and style variables\n\tchar chNext = styler[startPos];\n\tint stylePrev = styler.StyleAt(startPos - 1);\n\tint styleNext = styler.StyleAt(startPos);\n\tint styleNextStartLine = styler.StyleAt(lineStartNext);\n\tint visibleChars = 0;\n\tbool wasCommentMulti = false;\n\n\t// main loop\n\tfor (Sci_PositionU i = startPos; i < endPos; i++) {\n\n\t\t// next char, style and flags\n\t\tconst char ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\tconst int style = styleNext;\n\t\tstyleNext = styler.StyleAt(i + 1);\n\t\tconst bool atEOL = i == (lineStartNext - 1);\n\t\tconst bool atLineStart = i == lineStart;\n\n\t\t// --- Comments / Multi-line / POD ------------------------------------\n\t\tif (options.foldComment) {\n\n\t\t\t// Multi-line\n\t\t\tif (options.foldCommentMultiline) {\n\t\t\t\tif (style == SCE_RAKU_COMMENTLINE && atLineStart && ch == '#' && chNext == '`'\n\t\t\t\t\t\t&& styleNextStartLine == SCE_RAKU_COMMENTEMBED) {\n\t\t\t\t\tlevelCurrent++;\n\t\t\t\t\twasCommentMulti = true; // don't confuse line comments\n\t\t\t\t} else if (style == SCE_RAKU_COMMENTEMBED && atLineStart\n\t\t\t\t\t\t&& styleNextStartLine != SCE_RAKU_COMMENTEMBED) {\n\t\t\t\t\tlevelCurrent--;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Line comments\n\t\t\tif (!wasCommentMulti && atEOL && stylePrev == SCE_RAKU_COMMENTLINE\n\t\t\t\t\t&& IsCommentLine(lineCurrent, styler)) {\n\t\t\t\tif (!IsCommentLine(lineCurrent - 1, styler)\n\t\t\t\t\t\t&& IsCommentLine(lineCurrent + 1, styler))\n\t\t\t\t\tlevelCurrent++;\n\t\t\t\telse if (IsCommentLine(lineCurrent - 1, styler)\n\t\t\t\t\t\t&& !IsCommentLine(lineCurrent + 1, styler))\n\t\t\t\t\tlevelCurrent--;\n\t\t\t}\n\n\t\t\t// POD\n\t\t\tif (options.foldCommentPOD && atLineStart && style == SCE_RAKU_POD) {\n\t\t\t\tif (styler.Match(i, \"=begin\"))\n\t\t\t\t\tlevelCurrent++;\n\t\t\t\telse if (styler.Match(i, \"=end\"))\n\t\t\t\t\tlevelCurrent--;\n\t\t\t}\n\t\t}\n\n\t\t// --- Code block -----------------------------------------------------\n\t\tif (style == SCE_RAKU_OPERATOR) {\n\t\t\tif (ch == '{') {\n\t\t\t\tif (levelCurrent < levelPrev) levelPrev--;\n\t\t\t\tlevelCurrent++;\n\t\t\t} else if (ch == '}') {\n\t\t\t\tlevelCurrent--;\n\t\t\t}\n\t\t}\n\n\t\t// --- at end of line / range / apply fold ----------------------------\n\t\tif (atEOL) {\n\t\t\tint level = levelPrev;\n\n\t\t\t// set level flags\n\t\t\tlevel |= levelCurrent << 16;\n\t\t\tif (visibleChars == 0 && options.foldCompact)\n\t\t\t\tlevel |= SC_FOLDLEVELWHITEFLAG;\n\t\t\tif ((levelCurrent > levelPrev) && (visibleChars > 0))\n\t\t\t\tlevel |= SC_FOLDLEVELHEADERFLAG;\n\t\t\tif (level != styler.LevelAt(lineCurrent)) {\n\t\t\t\tstyler.SetLevel(lineCurrent, level);\n\t\t\t}\n\t\t\tlineCurrent++;\n\t\t\tlineStart = lineStartNext;\n\t\t\tlineStartNext = styler.LineStart(lineCurrent + 1);\n\t\t\tstyleNextStartLine = styler.StyleAt(lineStartNext);\n\t\t\tlevelPrev = levelCurrent;\n\t\t\tvisibleChars = 0;\n\t\t\twasCommentMulti = false;\n\t\t}\n\n\t\t// increment visibleChars / set previous char\n\t\tif (!isspacechar(ch))\n\t\t\tvisibleChars++;\n\t\tstylePrev = style;\n\t}\n\n\t// Done: set real level of the next line\n\tint flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK;\n\tstyler.SetLevel(lineCurrent, levelPrev | flagsNext);\n}\n\n/*----------------------------------------------------------------------------*\n * --- Scintilla: LexerModule ---\n *----------------------------------------------------------------------------*/\n\nLexerModule lmRaku(SCLEX_RAKU, LexerRaku::LexerFactoryRaku, \"raku\", rakuWordLists);\n"
  },
  {
    "path": "lexilla/lexers/LexRebol.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexRebol.cxx\n ** Lexer for REBOL.\n ** Written by Pascal Hurni, inspired from LexLua by Paul Winwood & Marcos E. Wurzius & Philippe Lhoste\n **\n ** History:\n **\t\t2005-04-07\tFirst release.\n **\t\t2005-04-10\tClosing parens and brackets go now in default style\n **\t\t\t\t\tString and comment nesting should be more safe\n **/\n// Copyright 2005 by Pascal Hurni <pascal_hurni@fastmail.fm>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nstatic inline bool IsAWordChar(const int ch) {\n\treturn (isalnum(ch) || ch == '?' || ch == '!' || ch == '.' || ch == '\\'' || ch == '+' || ch == '-' || ch == '*' || ch == '&' || ch == '|' || ch == '=' || ch == '_' || ch == '~');\n}\n\nstatic inline bool IsAWordStart(const int ch, const int ch2) {\n\treturn ((ch == '+' || ch == '-' || ch == '.') && !isdigit(ch2)) ||\n\t\t(isalpha(ch) || ch == '?' || ch == '!' || ch == '\\'' || ch == '*' || ch == '&' || ch == '|' || ch == '=' || ch == '_' || ch == '~');\n}\n\nstatic inline bool IsAnOperator(const int ch, const int ch2, const int ch3) {\n\t// One char operators\n\tif (IsASpaceOrTab(ch2)) {\n\t\treturn ch == '+' || ch == '-' || ch == '*' || ch == '/' || ch == '<' || ch == '>' || ch == '=' || ch == '?';\n\t}\n\n\t// Two char operators\n\tif (IsASpaceOrTab(ch3)) {\n\t\treturn (ch == '*' && ch2 == '*') ||\n\t\t\t   (ch == '/' && ch2 == '/') ||\n\t\t\t   (ch == '<' && (ch2 == '=' || ch2 == '>')) ||\n\t\t\t   (ch == '>' && ch2 == '=') ||\n\t\t\t   (ch == '=' && (ch2 == '=' || ch2 == '?')) ||\n\t\t\t   (ch == '?' && ch2 == '?');\n\t}\n\n\treturn false;\n}\n\nstatic inline bool IsBinaryStart(const int ch, const int ch2, const int ch3, const int ch4) {\n\treturn (ch == '#' && ch2 == '{') ||\n\t\t   (IsADigit(ch) && ch2 == '#' && ch3 == '{' ) ||\n\t\t   (IsADigit(ch) && IsADigit(ch2) && ch3 == '#' && ch4 == '{' );\n}\n\n\nstatic void ColouriseRebolDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[], Accessor &styler) {\n\n\tWordList &keywords = *keywordlists[0];\n\tWordList &keywords2 = *keywordlists[1];\n\tWordList &keywords3 = *keywordlists[2];\n\tWordList &keywords4 = *keywordlists[3];\n\tWordList &keywords5 = *keywordlists[4];\n\tWordList &keywords6 = *keywordlists[5];\n\tWordList &keywords7 = *keywordlists[6];\n\tWordList &keywords8 = *keywordlists[7];\n\n\tSci_Position currentLine = styler.GetLine(startPos);\n\t// Initialize the braced string {.. { ... } ..} nesting level, if we are inside such a string.\n\tint stringLevel = 0;\n\tif (initStyle == SCE_REBOL_BRACEDSTRING || initStyle == SCE_REBOL_COMMENTBLOCK) {\n\t\tstringLevel = styler.GetLineState(currentLine - 1);\n\t}\n\n\tbool blockComment = initStyle == SCE_REBOL_COMMENTBLOCK;\n\tint dotCount = 0;\n\n\t// Do not leak onto next line\n\tif (initStyle == SCE_REBOL_COMMENTLINE) {\n\t\tinitStyle = SCE_REBOL_DEFAULT;\n\t}\n\n\tStyleContext sc(startPos, length, initStyle, styler);\n\tif (startPos == 0) {\n\t\tsc.SetState(SCE_REBOL_PREFACE);\n\t}\n\tfor (; sc.More(); sc.Forward()) {\n\n\t\t//--- What to do at line end ?\n\t\tif (sc.atLineEnd) {\n\t\t\t// Can be either inside a {} string or simply at eol\n\t\t\tif (sc.state != SCE_REBOL_BRACEDSTRING && sc.state != SCE_REBOL_COMMENTBLOCK &&\n\t\t\t\tsc.state != SCE_REBOL_BINARY && sc.state != SCE_REBOL_PREFACE)\n\t\t\t\tsc.SetState(SCE_REBOL_DEFAULT);\n\n\t\t\t// Update the line state, so it can be seen by next line\n\t\t\tcurrentLine = styler.GetLine(sc.currentPos);\n\t\t\tswitch (sc.state) {\n\t\t\tcase SCE_REBOL_BRACEDSTRING:\n\t\t\tcase SCE_REBOL_COMMENTBLOCK:\n\t\t\t\t// Inside a braced string, we set the line state\n\t\t\t\tstyler.SetLineState(currentLine, stringLevel);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t// Reset the line state\n\t\t\t\tstyler.SetLineState(currentLine, 0);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// continue with next char\n\t\t\tcontinue;\n\t\t}\n\n\t\t//--- What to do on white-space ?\n\t\tif (IsASpaceOrTab(sc.ch))\n\t\t{\n\t\t\t// Return to default if any of these states\n\t\t\tif (sc.state == SCE_REBOL_OPERATOR || sc.state == SCE_REBOL_CHARACTER ||\n\t\t\t\tsc.state == SCE_REBOL_NUMBER || sc.state == SCE_REBOL_PAIR ||\n\t\t\t\tsc.state == SCE_REBOL_TUPLE || sc.state == SCE_REBOL_FILE ||\n\t\t\t\tsc.state == SCE_REBOL_DATE || sc.state == SCE_REBOL_TIME ||\n\t\t\t\tsc.state == SCE_REBOL_MONEY || sc.state == SCE_REBOL_ISSUE ||\n\t\t\t\tsc.state == SCE_REBOL_URL || sc.state == SCE_REBOL_EMAIL) {\n\t\t\t\tsc.SetState(SCE_REBOL_DEFAULT);\n\t\t\t}\n\t\t}\n\n\t\t//--- Specialize state ?\n\t\t// URL, Email look like identifier\n\t\tif (sc.state == SCE_REBOL_IDENTIFIER)\n\t\t{\n\t\t\tif (sc.ch == ':' && !IsASpace(sc.chNext)) {\n\t\t\t\tsc.ChangeState(SCE_REBOL_URL);\n\t\t\t} else if (sc.ch == '@') {\n\t\t\t\tsc.ChangeState(SCE_REBOL_EMAIL);\n\t\t\t} else if (sc.ch == '$') {\n\t\t\t\tsc.ChangeState(SCE_REBOL_MONEY);\n\t\t\t}\n\t\t}\n\t\t// Words look like identifiers\n\t\tif (sc.state == SCE_REBOL_IDENTIFIER || (sc.state >= SCE_REBOL_WORD && sc.state <= SCE_REBOL_WORD8)) {\n\t\t\t// Keywords ?\n\t\t\tif (!IsAWordChar(sc.ch) || sc.Match('/')) {\n\t\t\t\tchar s[100];\n\t\t\t\tsc.GetCurrentLowered(s, sizeof(s));\n\t\t\t\tblockComment = strcmp(s, \"comment\") == 0;\n\t\t\t\tif (keywords8.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_REBOL_WORD8);\n\t\t\t\t} else if (keywords7.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_REBOL_WORD7);\n\t\t\t\t} else if (keywords6.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_REBOL_WORD6);\n\t\t\t\t} else if (keywords5.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_REBOL_WORD5);\n\t\t\t\t} else if (keywords4.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_REBOL_WORD4);\n\t\t\t\t} else if (keywords3.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_REBOL_WORD3);\n\t\t\t\t} else if (keywords2.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_REBOL_WORD2);\n\t\t\t\t} else if (keywords.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_REBOL_WORD);\n\t\t\t\t}\n\t\t\t\t// Keep same style if there are refinements\n\t\t\t\tif (!sc.Match('/')) {\n\t\t\t\t\tsc.SetState(SCE_REBOL_DEFAULT);\n\t\t\t\t}\n\t\t\t}\n\t\t// special numbers\n\t\t} else if (sc.state == SCE_REBOL_NUMBER) {\n\t\t\tswitch (sc.ch) {\n\t\t\tcase 'x':\tsc.ChangeState(SCE_REBOL_PAIR);\n\t\t\t\t\t\tbreak;\n\t\t\tcase ':':\tsc.ChangeState(SCE_REBOL_TIME);\n\t\t\t\t\t\tbreak;\n\t\t\tcase '-':\n\t\t\tcase '/':\tsc.ChangeState(SCE_REBOL_DATE);\n\t\t\t\t\t\tbreak;\n\t\t\tcase '.':\tif (++dotCount >= 2) sc.ChangeState(SCE_REBOL_TUPLE);\n\t\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t//--- Determine if the current state should terminate\n\t\tif (sc.state == SCE_REBOL_QUOTEDSTRING || sc.state == SCE_REBOL_CHARACTER) {\n\t\t\tif (sc.ch == '^' && sc.chNext == '\\\"') {\n\t\t\t\tsc.Forward();\n\t\t\t} else if (sc.ch == '\\\"') {\n\t\t\t\tsc.ForwardSetState(SCE_REBOL_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_REBOL_BRACEDSTRING || sc.state == SCE_REBOL_COMMENTBLOCK) {\n\t\t\tif (sc.ch == '}') {\n\t\t\t\tif (--stringLevel == 0) {\n\t\t\t\t\tsc.ForwardSetState(SCE_REBOL_DEFAULT);\n\t\t\t\t}\n\t\t\t} else if (sc.ch == '{') {\n\t\t\t\tstringLevel++;\n\t\t\t}\n\t\t} else if (sc.state == SCE_REBOL_BINARY) {\n\t\t\tif (sc.ch == '}') {\n\t\t\t\tsc.ForwardSetState(SCE_REBOL_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_REBOL_TAG) {\n\t\t\tif (sc.ch == '>') {\n\t\t\t\tsc.ForwardSetState(SCE_REBOL_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_REBOL_PREFACE) {\n\t\t\tif (sc.MatchIgnoreCase(\"rebol\"))\n\t\t\t{\n\t\t\t\tint i;\n\t\t\t\tfor (i=5; IsASpaceOrTab(styler.SafeGetCharAt(sc.currentPos+i, 0)); i++);\n\t\t\t\tif (sc.GetRelative(i) == '[')\n\t\t\t\t\tsc.SetState(SCE_REBOL_DEFAULT);\n\t\t\t}\n\t\t}\n\n\t\t//--- Parens and bracket changes to default style when the current is a number\n\t\tif (sc.state == SCE_REBOL_NUMBER || sc.state == SCE_REBOL_PAIR || sc.state == SCE_REBOL_TUPLE ||\n\t\t\tsc.state == SCE_REBOL_MONEY || sc.state == SCE_REBOL_ISSUE || sc.state == SCE_REBOL_EMAIL ||\n\t\t\tsc.state == SCE_REBOL_URL || sc.state == SCE_REBOL_DATE || sc.state == SCE_REBOL_TIME) {\n\t\t\tif (sc.ch == '(' || sc.ch == '[' || sc.ch == ')' || sc.ch == ']') {\n\t\t\t\tsc.SetState(SCE_REBOL_DEFAULT);\n\t\t\t}\n\t\t}\n\n\t\t//--- Determine if a new state should be entered.\n\t\tif (sc.state == SCE_REBOL_DEFAULT) {\n\t\t\tif (IsAnOperator(sc.ch, sc.chNext, sc.GetRelative(2))) {\n\t\t\t\tsc.SetState(SCE_REBOL_OPERATOR);\n\t\t\t} else if (IsBinaryStart(sc.ch, sc.chNext, sc.GetRelative(2), sc.GetRelative(3))) {\n\t\t\t\tsc.SetState(SCE_REBOL_BINARY);\n\t\t\t} else if (IsAWordStart(sc.ch, sc.chNext)) {\n\t\t\t\tsc.SetState(SCE_REBOL_IDENTIFIER);\n\t\t\t} else if (IsADigit(sc.ch) || sc.ch == '+' || sc.ch == '-' || /*Decimal*/ sc.ch == '.' || sc.ch == ',') {\n\t\t\t\tdotCount = 0;\n\t\t\t\tsc.SetState(SCE_REBOL_NUMBER);\n\t\t\t} else if (sc.ch == '\\\"') {\n\t\t\t\tsc.SetState(SCE_REBOL_QUOTEDSTRING);\n\t\t\t} else if (sc.ch == '{') {\n\t\t\t\tsc.SetState(blockComment ? SCE_REBOL_COMMENTBLOCK : SCE_REBOL_BRACEDSTRING);\n\t\t\t\t++stringLevel;\n\t\t\t} else if (sc.ch == ';') {\n\t\t\t\tsc.SetState(SCE_REBOL_COMMENTLINE);\n\t\t\t} else if (sc.ch == '$') {\n\t\t\t\tsc.SetState(SCE_REBOL_MONEY);\n\t\t\t} else if (sc.ch == '%') {\n\t\t\t\tsc.SetState(SCE_REBOL_FILE);\n\t\t\t} else if (sc.ch == '<') {\n\t\t\t\tsc.SetState(SCE_REBOL_TAG);\n\t\t\t} else if (sc.ch == '#' && sc.chNext == '\"') {\n\t\t\t\tsc.SetState(SCE_REBOL_CHARACTER);\n\t\t\t\tsc.Forward();\n\t\t\t} else if (sc.ch == '#' && sc.chNext != '\"' && sc.chNext != '{' ) {\n\t\t\t\tsc.SetState(SCE_REBOL_ISSUE);\n\t\t\t}\n\t\t}\n\t}\n\tsc.Complete();\n}\n\n\nstatic void FoldRebolDoc(Sci_PositionU startPos, Sci_Position length, int /* initStyle */, WordList *[],\n                            Accessor &styler) {\n\tSci_PositionU lengthDoc = startPos + length;\n\tint visibleChars = 0;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tint levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK;\n\tint levelCurrent = levelPrev;\n\tchar chNext = styler[startPos];\n\tint styleNext = styler.StyleAt(startPos);\n\tfor (Sci_PositionU i = startPos; i < lengthDoc; i++) {\n\t\tchar ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\tint style = styleNext;\n\t\tstyleNext = styler.StyleAt(i + 1);\n\t\tbool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n\t\tif (style == SCE_REBOL_DEFAULT) {\n\t\t\tif (ch == '[') {\n\t\t\t\tlevelCurrent++;\n\t\t\t} else if (ch == ']') {\n\t\t\t\tlevelCurrent--;\n\t\t\t}\n\t\t}\n\t\tif (atEOL) {\n\t\t\tint lev = levelPrev;\n\t\t\tif (visibleChars == 0)\n\t\t\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\t\t\tif ((levelCurrent > levelPrev) && (visibleChars > 0))\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\tif (lev != styler.LevelAt(lineCurrent)) {\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\t\t\t}\n\t\t\tlineCurrent++;\n\t\t\tlevelPrev = levelCurrent;\n\t\t\tvisibleChars = 0;\n\t\t}\n\t\tif (!isspacechar(ch))\n\t\t\tvisibleChars++;\n\t}\n\t// Fill in the real level of the next line, keeping the current flags as they will be filled in later\n\tint flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK;\n\tstyler.SetLevel(lineCurrent, levelPrev | flagsNext);\n}\n\nstatic const char * const rebolWordListDesc[] = {\n\t\"Keywords\",\n\t0\n};\n\nLexerModule lmREBOL(SCLEX_REBOL, ColouriseRebolDoc, \"rebol\", FoldRebolDoc, rebolWordListDesc);\n\n"
  },
  {
    "path": "lexilla/lexers/LexRegistry.cxx",
    "content": "// Scintilla source code edit control\n/**\n * @file LexRegistry.cxx\n * @date July 26 2014\n * @brief Lexer for Windows registration files(.reg)\n * @author nkmathew\n *\n * The License.txt file describes the conditions under which this software may be\n * distributed.\n *\n */\n\n#include <cstdlib>\n#include <cassert>\n#include <cctype>\n#include <cstdio>\n\n#include <string>\n#include <string_view>\n#include <vector>\n#include <map>\n#include <functional>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n#include \"OptionSet.h\"\n#include \"DefaultLexer.h\"\n\nusing namespace Scintilla;\nusing namespace Lexilla;\n\nstatic const char *const RegistryWordListDesc[] = {\n\t0\n};\n\nstruct OptionsRegistry {\n\tbool foldCompact = false;\n\tbool fold = false;\n};\n\nstruct OptionSetRegistry : public OptionSet<OptionsRegistry> {\n\tOptionSetRegistry() {\n\t\tDefineProperty(\"fold.compact\", &OptionsRegistry::foldCompact);\n\t\tDefineProperty(\"fold\", &OptionsRegistry::fold);\n\t\tDefineWordListSets(RegistryWordListDesc);\n\t}\n};\n\nclass LexerRegistry : public DefaultLexer {\n\tOptionsRegistry options;\n\tOptionSetRegistry optSetRegistry;\n\n\tstatic bool IsStringState(int state) {\n\t\treturn (state == SCE_REG_VALUENAME || state == SCE_REG_STRING);\n\t}\n\n\tstatic bool IsKeyPathState(int state) {\n\t\treturn (state == SCE_REG_ADDEDKEY || state == SCE_REG_DELETEDKEY);\n\t}\n\n\tstatic bool AtValueType(LexAccessor &styler, Sci_Position start) {\n\t\tSci_Position i = 0;\n\t\twhile (i < 10) {\n\t\t\ti++;\n\t\t\tchar curr = styler.SafeGetCharAt(start+i, '\\0');\n\t\t\tif (curr == ':') {\n\t\t\t\treturn true;\n\t\t\t} else if (!curr) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tstatic bool IsNextNonWhitespace(LexAccessor &styler, Sci_Position start, char ch) {\n\t\tSci_Position i = 0;\n\t\twhile (i < 100) {\n\t\t\ti++;\n\t\t\tchar curr = styler.SafeGetCharAt(start+i, '\\0');\n\t\t\tchar next = styler.SafeGetCharAt(start+i+1, '\\0');\n\t\t\tbool atEOL = (curr == '\\r' && next != '\\n') || (curr == '\\n');\n\t\t\tif (curr == ch) {\n\t\t\t\treturn true;\n\t\t\t} else if (!isspacechar(curr) || atEOL) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\t// Looks for the equal sign at the end of the string\n\tstatic bool AtValueName(LexAccessor &styler, Sci_Position start) {\n\t\tbool atEOL = false;\n\t\tSci_Position i = 0;\n\t\tbool escaped = false;\n\t\twhile (!atEOL) {\n\t\t\ti++;\n\t\t\tchar curr = styler.SafeGetCharAt(start+i, '\\0');\n\t\t\tchar next = styler.SafeGetCharAt(start+i+1, '\\0');\n\t\t\tatEOL = (curr == '\\r' && next != '\\n') || (curr == '\\n');\n\t\t\tif (escaped) {\n\t\t\t\tescaped = false;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tescaped = curr == '\\\\';\n\t\t\tif (curr == '\"') {\n\t\t\t\treturn IsNextNonWhitespace(styler, start+i, '=');\n\t\t\t} else if (!curr) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tstatic bool AtKeyPathEnd(LexAccessor &styler, Sci_Position start) {\n\t\tbool atEOL = false;\n\t\tSci_Position i = 0;\n\t\twhile (!atEOL) {\n\t\t\ti++;\n\t\t\tchar curr = styler.SafeGetCharAt(start+i, '\\0');\n\t\t\tchar next = styler.SafeGetCharAt(start+i+1, '\\0');\n\t\t\tatEOL = (curr == '\\r' && next != '\\n') || (curr == '\\n');\n\t\t\tif (curr == ']' || !curr) {\n\t\t\t\t// There's still at least one or more square brackets ahead\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\tstatic bool AtGUID(LexAccessor &styler, Sci_Position start) {\n\t\tint count = 8;\n\t\tint portion = 0;\n\t\tint offset = 1;\n\t\tchar digit = '\\0';\n\t\twhile (portion < 5) {\n\t\t\tint i = 0;\n\t\t\twhile (i < count) {\n\t\t\t\tdigit = styler.SafeGetCharAt(start+offset);\n\t\t\t\tif (!(isxdigit(digit) || digit == '-')) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\toffset++;\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tportion++;\n\t\t\tcount = (portion == 4) ? 13 : 5;\n\t\t}\n\t\tdigit = styler.SafeGetCharAt(start+offset);\n\t\tif (digit == '}') {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n\npublic:\n\tLexerRegistry() : DefaultLexer(\"registry\", SCLEX_REGISTRY) {}\n\tvirtual ~LexerRegistry() {}\n\tint SCI_METHOD Version() const override {\n\t\treturn lvRelease5;\n\t}\n\tvoid SCI_METHOD Release() override {\n\t\tdelete this;\n\t}\n\tconst char *SCI_METHOD PropertyNames() override {\n\t\treturn optSetRegistry.PropertyNames();\n\t}\n\tint SCI_METHOD PropertyType(const char *name) override {\n\t\treturn optSetRegistry.PropertyType(name);\n\t}\n\tconst char *SCI_METHOD DescribeProperty(const char *name) override {\n\t\treturn optSetRegistry.DescribeProperty(name);\n\t}\n\tSci_Position SCI_METHOD PropertySet(const char *key, const char *val) override {\n\t\tif (optSetRegistry.PropertySet(&options, key, val)) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn -1;\n\t}\n\tconst char * SCI_METHOD PropertyGet(const char *key) override {\n\t\treturn optSetRegistry.PropertyGet(key);\n\t}\n\n\tSci_Position SCI_METHOD WordListSet(int, const char *) override {\n\t\treturn -1;\n\t}\n\tvoid *SCI_METHOD PrivateCall(int, void *) override {\n\t\treturn 0;\n\t}\n\tstatic ILexer5 *LexerFactoryRegistry() {\n\t\treturn new LexerRegistry;\n\t}\n\tconst char *SCI_METHOD DescribeWordListSets() override {\n\t\treturn optSetRegistry.DescribeWordListSets();\n\t}\n\tvoid SCI_METHOD Lex(Sci_PositionU startPos,\n\t\t\t\t\t\t\t\tSci_Position length,\n\t\t\t\t\t\t\t\tint initStyle,\n\t\t\t\t\t\t\t\tIDocument *pAccess) override;\n\tvoid SCI_METHOD Fold(Sci_PositionU startPos,\n\t\t\t\t\t\t\t\t Sci_Position length,\n\t\t\t\t\t\t\t\t int initStyle,\n\t\t\t\t\t\t\t\t IDocument *pAccess) override;\n};\n\nvoid SCI_METHOD LexerRegistry::Lex(Sci_PositionU startPos,\n\t\t\t\t\t\t\t\t   Sci_Position length,\n\t\t\t\t\t\t\t\t   int initStyle,\n\t\t\t\t\t\t\t\t   IDocument *pAccess) {\n\tint beforeGUID = SCE_REG_DEFAULT;\n\tint beforeEscape = SCE_REG_DEFAULT;\n\tCharacterSet setOperators = CharacterSet(CharacterSet::setNone, \"-,.=:\\\\@()\");\n\tLexAccessor styler(pAccess);\n\tStyleContext context(startPos, length, initStyle, styler);\n\tbool highlight = true;\n\tbool afterEqualSign = false;\n\twhile (context.More()) {\n\t\tif (context.atLineStart) {\n\t\t\tSci_Position currPos = static_cast<Sci_Position>(context.currentPos);\n\t\t\tbool continued = styler[currPos-3] == '\\\\';\n\t\t\thighlight = continued ? true : false;\n\t\t}\n\t\tswitch (context.state) {\n\t\t\tcase SCE_REG_COMMENT:\n\t\t\t\tif (context.atLineEnd) {\n\t\t\t\t\tcontext.SetState(SCE_REG_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_REG_VALUENAME:\n\t\t\tcase SCE_REG_STRING: {\n\t\t\t\t\tSci_Position currPos = static_cast<Sci_Position>(context.currentPos);\n\t\t\t\t\tif (context.ch == '\"') {\n\t\t\t\t\t\tcontext.ForwardSetState(SCE_REG_DEFAULT);\n\t\t\t\t\t} else if (context.ch == '\\\\') {\n\t\t\t\t\t\tbeforeEscape = context.state;\n\t\t\t\t\t\tcontext.SetState(SCE_REG_ESCAPED);\n\t\t\t\t\t\tcontext.Forward();\n\t\t\t\t\t} else if (context.ch == '{') {\n\t\t\t\t\t\tif (AtGUID(styler, currPos)) {\n\t\t\t\t\t\t\tbeforeGUID = context.state;\n\t\t\t\t\t\t\tcontext.SetState(SCE_REG_STRING_GUID);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (context.state == SCE_REG_STRING &&\n\t\t\t\t\t\tcontext.ch == '%' &&\n\t\t\t\t\t\t(isdigit(context.chNext) || context.chNext == '*')) {\n\t\t\t\t\t\tcontext.SetState(SCE_REG_PARAMETER);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_REG_PARAMETER:\n\t\t\t\tcontext.ForwardSetState(SCE_REG_STRING);\n\t\t\t\tif (context.ch == '\"') {\n\t\t\t\t\tcontext.ForwardSetState(SCE_REG_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_REG_VALUETYPE:\n\t\t\t\tif (context.ch == ':') {\n\t\t\t\t\tcontext.SetState(SCE_REG_DEFAULT);\n\t\t\t\t\tafterEqualSign = false;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_REG_HEXDIGIT:\n\t\t\tcase SCE_REG_OPERATOR:\n\t\t\t\tcontext.SetState(SCE_REG_DEFAULT);\n\t\t\t\tbreak;\n\t\t\tcase SCE_REG_DELETEDKEY:\n\t\t\tcase SCE_REG_ADDEDKEY: {\n\t\t\t\t\tSci_Position currPos = static_cast<Sci_Position>(context.currentPos);\n\t\t\t\t\tif (context.ch == ']' && AtKeyPathEnd(styler, currPos)) {\n\t\t\t\t\t\tcontext.ForwardSetState(SCE_REG_DEFAULT);\n\t\t\t\t\t} else if (context.ch == '{') {\n\t\t\t\t\t\tif (AtGUID(styler, currPos)) {\n\t\t\t\t\t\t\tbeforeGUID = context.state;\n\t\t\t\t\t\t\tcontext.SetState(SCE_REG_KEYPATH_GUID);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_REG_ESCAPED:\n\t\t\t\tif (context.ch == '\"') {\n\t\t\t\t\tcontext.SetState(beforeEscape);\n\t\t\t\t\tcontext.ForwardSetState(SCE_REG_DEFAULT);\n\t\t\t\t} else if (context.ch == '\\\\') {\n\t\t\t\t\tcontext.Forward();\n\t\t\t\t} else {\n\t\t\t\t\tcontext.SetState(beforeEscape);\n\t\t\t\t\tbeforeEscape = SCE_REG_DEFAULT;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_REG_STRING_GUID:\n\t\t\tcase SCE_REG_KEYPATH_GUID: {\n\t\t\t\t\tif (context.ch == '}') {\n\t\t\t\t\t\tcontext.ForwardSetState(beforeGUID);\n\t\t\t\t\t\tbeforeGUID = SCE_REG_DEFAULT;\n\t\t\t\t\t}\n\t\t\t\t\tSci_Position currPos = static_cast<Sci_Position>(context.currentPos);\n\t\t\t\t\tif (context.ch == '\"' && IsStringState(context.state)) {\n\t\t\t\t\t\tcontext.ForwardSetState(SCE_REG_DEFAULT);\n\t\t\t\t\t} else if (context.ch == ']' &&\n\t\t\t\t\t\t\t   AtKeyPathEnd(styler, currPos) &&\n\t\t\t\t\t\t\t   IsKeyPathState(context.state)) {\n\t\t\t\t\t\tcontext.ForwardSetState(SCE_REG_DEFAULT);\n\t\t\t\t\t} else if (context.ch == '\\\\' && IsStringState(context.state)) {\n\t\t\t\t\t\tbeforeEscape = context.state;\n\t\t\t\t\t\tcontext.SetState(SCE_REG_ESCAPED);\n\t\t\t\t\t\tcontext.Forward();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\t// Determine if a new state should be entered.\n\t\tif (context.state == SCE_REG_DEFAULT) {\n\t\t\tSci_Position currPos = static_cast<Sci_Position>(context.currentPos);\n\t\t\tif (context.ch == ';') {\n\t\t\t\tcontext.SetState(SCE_REG_COMMENT);\n\t\t\t} else if (context.ch == '\"') {\n\t\t\t\tif (AtValueName(styler, currPos)) {\n\t\t\t\t\tcontext.SetState(SCE_REG_VALUENAME);\n\t\t\t\t} else {\n\t\t\t\t\tcontext.SetState(SCE_REG_STRING);\n\t\t\t\t}\n\t\t\t} else if (context.ch == '[') {\n\t\t\t\tif (IsNextNonWhitespace(styler, currPos, '-')) {\n\t\t\t\t\tcontext.SetState(SCE_REG_DELETEDKEY);\n\t\t\t\t} else {\n\t\t\t\t\tcontext.SetState(SCE_REG_ADDEDKEY);\n\t\t\t\t}\n\t\t\t} else if (context.ch == '=') {\n\t\t\t\tafterEqualSign = true;\n\t\t\t\thighlight = true;\n\t\t\t} else if (afterEqualSign) {\n\t\t\t\tbool wordStart = isalpha(context.ch) && !isalpha(context.chPrev);\n\t\t\t\tif (wordStart && AtValueType(styler, currPos)) {\n\t\t\t\t\tcontext.SetState(SCE_REG_VALUETYPE);\n\t\t\t\t}\n\t\t\t} else if (isxdigit(context.ch) && highlight) {\n\t\t\t\tcontext.SetState(SCE_REG_HEXDIGIT);\n\t\t\t}\n\t\t\thighlight = (context.ch == '@') ? true : highlight;\n\t\t\tif (setOperators.Contains(context.ch) && highlight) {\n\t\t\t\tcontext.SetState(SCE_REG_OPERATOR);\n\t\t\t}\n\t\t}\n\t\tcontext.Forward();\n\t}\n\tcontext.Complete();\n}\n\n// Folding similar to that of FoldPropsDoc in LexOthers\nvoid SCI_METHOD LexerRegistry::Fold(Sci_PositionU startPos,\n\t\t\t\t\t\t\t\t\tSci_Position length,\n\t\t\t\t\t\t\t\t\tint,\n\t\t\t\t\t\t\t\t\tIDocument *pAccess) {\n\tif (!options.fold) {\n\t\treturn;\n\t}\n\tLexAccessor styler(pAccess);\n\tSci_Position currLine = styler.GetLine(startPos);\n\tint visibleChars = 0;\n\tSci_PositionU endPos = startPos + length;\n\tbool atKeyPath = false;\n\tfor (Sci_PositionU i = startPos; i < endPos; i++) {\n\t\tatKeyPath = IsKeyPathState(styler.StyleAt(i)) ? true : atKeyPath;\n\t\tchar curr = styler.SafeGetCharAt(i);\n\t\tchar next = styler.SafeGetCharAt(i+1);\n\t\tbool atEOL = (curr == '\\r' && next != '\\n') || (curr == '\\n');\n\t\tif (atEOL || i == (endPos-1)) {\n\t\t\tint level = SC_FOLDLEVELBASE;\n\t\t\tif (currLine > 0) {\n\t\t\t\tint prevLevel = styler.LevelAt(currLine-1);\n\t\t\t\tif (prevLevel & SC_FOLDLEVELHEADERFLAG) {\n\t\t\t\t\tlevel += 1;\n\t\t\t\t} else {\n\t\t\t\t\tlevel = prevLevel;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!visibleChars && options.foldCompact) {\n\t\t\t\tlevel |= SC_FOLDLEVELWHITEFLAG;\n\t\t\t} else if (atKeyPath) {\n\t\t\t\tlevel = SC_FOLDLEVELBASE | SC_FOLDLEVELHEADERFLAG;\n\t\t\t}\n\t\t\tif (level != styler.LevelAt(currLine)) {\n\t\t\t\tstyler.SetLevel(currLine, level);\n\t\t\t}\n\t\t\tcurrLine++;\n\t\t\tvisibleChars = 0;\n\t\t\tatKeyPath = false;\n\t\t}\n\t\tif (!isspacechar(curr)) {\n\t\t\tvisibleChars++;\n\t\t}\n\t}\n\n\t// Make the folding reach the last line in the file\n\tint level = SC_FOLDLEVELBASE;\n\tif (currLine > 0) {\n\t\tint prevLevel = styler.LevelAt(currLine-1);\n\t\tif (prevLevel & SC_FOLDLEVELHEADERFLAG) {\n\t\t\tlevel += 1;\n\t\t} else {\n\t\t\tlevel = prevLevel;\n\t\t}\n\t}\n\tstyler.SetLevel(currLine, level);\n}\n\nLexerModule lmRegistry(SCLEX_REGISTRY,\n\t\t\t\t\t   LexerRegistry::LexerFactoryRegistry,\n\t\t\t\t\t   \"registry\",\n\t\t\t\t\t   RegistryWordListDesc);\n\n"
  },
  {
    "path": "lexilla/lexers/LexRuby.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexRuby.cxx\n ** Lexer for Ruby.\n **/\n// Copyright 2001- by Clemens Wyss <wys@helbling.ch>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <cstdlib>\n#include <cassert>\n#include <cstring>\n#include <cctype>\n#include <cstdio>\n#include <cstdarg>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nnamespace {\n\n//XXX Identical to Perl, put in common area\nconstexpr bool isEOLChar(char ch) noexcept {\n    return (ch == '\\r') || (ch == '\\n');\n}\n\nconstexpr bool isSafeASCII(char ch) noexcept {\n    return static_cast<unsigned char>(ch) <= 127;\n}\n\n// This one's redundant, but makes for more readable code\nconstexpr bool isHighBitChar(char ch) noexcept {\n    return static_cast<unsigned char>(ch) > 127;\n}\n\ninline bool isSafeAlpha(char ch) noexcept {\n    return (isSafeASCII(ch) && isalpha(ch)) || ch == '_';\n}\n\ninline bool isSafeAlphaOrHigh(char ch) noexcept {\n\treturn isHighBitChar(ch) || isalpha(ch) || ch == '_';\n}\n\ninline bool isSafeAlnum(char ch) noexcept {\n    return (isSafeASCII(ch) && isalnum(ch)) || ch == '_';\n}\n\ninline bool isSafeAlnumOrHigh(char ch) noexcept {\n    return isHighBitChar(ch) || isalnum(ch) || ch == '_';\n}\n\ninline bool isSafeDigit(char ch) noexcept {\n    return isSafeASCII(ch) && isdigit(ch);\n}\n\ninline bool isSafeWordcharOrHigh(char ch) noexcept {\n    // Error: scintilla's KeyWords.h includes '.' as a word-char\n    // we want to separate things that can take methods from the\n    // methods.\n    return isHighBitChar(ch) || isalnum(ch) || ch == '_';\n}\n\nconstexpr bool isWhiteSpace(char ch) noexcept {\n    return ch == ' ' || ch == '\\t' || ch == '\\r' || ch == '\\n';\n}\n\ninline bool isQestionMarkChar(char chNext, char chNext2) noexcept {\n    // followed by a single character or escape sequence that corresponds to a single codepoint\n    if (isSafeAlnum(chNext)) {\n        return !isSafeWordcharOrHigh(chNext2);\n    }\n    // multibyte character, escape sequence, punctuation\n    return !IsASpace(chNext);\n}\n\n#define MAX_KEYWORD_LENGTH 200\n\n#define STYLE_MASK 63\n#define actual_style(style) ((style) & STYLE_MASK)\n\nbool followsDot(Sci_PositionU pos, Accessor &styler) {\n    styler.Flush();\n    for (; pos >= 1; --pos) {\n        const int style = actual_style(styler.StyleAt(pos));\n        char ch;\n        switch (style) {\n        case SCE_RB_DEFAULT:\n            ch = styler[pos];\n            if (ch == ' ' || ch == '\\t') {\n                //continue\n            } else {\n                return false;\n            }\n            break;\n\n        case SCE_RB_OPERATOR:\n            return styler[pos] == '.';\n\n        default:\n            return false;\n        }\n    }\n    return false;\n}\n\n// Forward declarations\nbool keywordIsAmbiguous(const char *prevWord) noexcept;\nbool keywordDoStartsLoop(Sci_Position pos, Accessor &styler);\nbool keywordIsModifier(const char *word, Sci_Position pos, Accessor &styler);\n\n// pseudo style: prefer regex after identifier\n#define SCE_RB_IDENTIFIER_PREFERRE  SCE_RB_UPPER_BOUND\n\nint ClassifyWordRb(Sci_PositionU start, Sci_PositionU end, char ch, WordList &keywords, Accessor &styler, char *prevWord) {\n    char s[MAX_KEYWORD_LENGTH];\n    Sci_PositionU j = 0;\n    Sci_PositionU lim = end - start + 1; // num chars to copy\n    if (lim >= MAX_KEYWORD_LENGTH) {\n        lim = MAX_KEYWORD_LENGTH - 1;\n    }\n    for (Sci_PositionU i = start; j < lim; i++, j++) {\n        s[j] = styler[i];\n    }\n    s[j] = '\\0';\n    int chAttr = SCE_RB_IDENTIFIER;\n    int style = SCE_RB_DEFAULT;\n    if (0 == strcmp(prevWord, \"class\"))\n        chAttr = SCE_RB_CLASSNAME;\n    else if (0 == strcmp(prevWord, \"module\"))\n        chAttr = SCE_RB_MODULE_NAME;\n    else if (0 == strcmp(prevWord, \"def\")) {\n        chAttr = SCE_RB_DEFNAME;\n        if (ch == '.') {\n            if (strcmp(s, \"self\") == 0) {\n                style = SCE_RB_WORD_DEMOTED;\n            } else {\n                style = SCE_RB_IDENTIFIER;\n            }\n        }\n    } else if (keywords.InList(s) && ((start == 0) || !followsDot(start - 1, styler))) {\n        if (keywordIsAmbiguous(s)\n                && keywordIsModifier(s, start, styler)) {\n\n            // Demoted keywords are colored as keywords,\n            // but do not affect changes in indentation.\n            //\n            // Consider the word 'if':\n            // 1. <<if test ...>> : normal\n            // 2. <<stmt if test>> : demoted\n            // 3. <<lhs = if ...>> : normal: start a new indent level\n            // 4. <<obj.if = 10>> : color as identifier, since it follows '.'\n\n            chAttr = SCE_RB_WORD_DEMOTED;\n        } else {\n            chAttr = SCE_RB_WORD;\n            style = SCE_RB_WORD;\n            strcpy(prevWord, s);\n        }\n    }\n    if (style == SCE_RB_DEFAULT) {\n        style = chAttr;\n        prevWord[0] = 0;\n    }\n    styler.ColourTo(end, style);\n\n    if (chAttr == SCE_RB_IDENTIFIER) {\n        // find heredoc in lib/ruby folder: rg \"\\w+\\s+<<[\\w\\-~'\\\"`]\"\n        // Kernel methods\n        if (!strcmp(s, \"puts\") || !strcmp(s, \"print\") || !strcmp(s, \"warn\") || !strcmp(s, \"eval\")) {\n            chAttr = SCE_RB_IDENTIFIER_PREFERRE;\n        }\n    }\n    return chAttr;\n}\n\n\n//XXX Identical to Perl, put in common area\nbool isMatch(Accessor &styler, Sci_Position lengthDoc, Sci_Position pos, const char *val) {\n    if ((pos + static_cast<int>(strlen(val))) >= lengthDoc) {\n        return false;\n    }\n    while (*val) {\n        if (*val != styler[pos++]) {\n            return false;\n        }\n        val++;\n    }\n    return true;\n}\n\n// Do Ruby better -- find the end of the line, work back,\n// and then check for leading white space\n\n// Precondition: the here-doc target can be indented\nbool lookingAtHereDocDelim(Accessor &styler, Sci_Position pos, Sci_Position lengthDoc, const char *HereDocDelim) {\n    if (!isMatch(styler, lengthDoc, pos, HereDocDelim)) {\n        return false;\n    }\n    while (--pos > 0) {\n        const char ch = styler[pos];\n        if (isEOLChar(ch)) {\n            return true;\n        } else if (ch != ' ' && ch != '\\t') {\n            return false;\n        }\n    }\n    return false;\n}\n\n//XXX Identical to Perl, put in common area\nconstexpr char opposite(char ch) noexcept {\n    if (ch == '(')\n        return ')';\n    if (ch == '[')\n        return ']';\n    if (ch == '{')\n        return '}';\n    if (ch == '<')\n        return '>';\n    return ch;\n}\n\n// Null transitions when we see we've reached the end\n// and need to relex the curr char.\n\nvoid redo_char(Sci_Position &i, char &ch, char &chNext, char &chNext2, int &state) noexcept {\n    i--;\n    chNext2 = chNext;\n    chNext = ch;\n    state = SCE_RB_DEFAULT;\n}\n\nvoid advance_char(Sci_Position &i, char &ch, char &chNext, char &chNext2) noexcept {\n    i++;\n    ch = chNext;\n    chNext = chNext2;\n}\n\n// precondition: startPos points to one after the EOL char\nbool currLineContainsHereDelims(Sci_Position &startPos, Accessor &styler) {\n    if (startPos <= 1)\n        return false;\n\n    Sci_Position pos;\n    for (pos = startPos - 1; pos > 0; pos--) {\n        const char ch = styler.SafeGetCharAt(pos);\n        if (isEOLChar(ch)) {\n            // Leave the pointers where they are -- there are no\n            // here doc delims on the current line, even if\n            // the EOL isn't default style\n\n            return false;\n        } else {\n            styler.Flush();\n            if (actual_style(styler.StyleAt(pos)) == SCE_RB_HERE_DELIM) {\n                break;\n            }\n        }\n    }\n    if (pos == 0) {\n        return false;\n    }\n    // Update the pointers so we don't have to re-analyze the string\n    startPos = pos;\n    return true;\n}\n\n// This class is used by the enter and exit methods, so it needs\n// to be hoisted out of the function.\n\nclass QuoteCls {\npublic:\n    int  Count;\n    char Up;\n    char Down;\n    QuoteCls() noexcept {\n        New();\n    }\n    void New() noexcept {\n        Count = 0;\n        Up    = '\\0';\n        Down  = '\\0';\n    }\n    void Open(char u) noexcept {\n        Count++;\n        Up    = u;\n        Down  = opposite(Up);\n    }\n};\n\nconstexpr bool isPercentLiteral(int state) noexcept {\n    return state == SCE_RB_STRING_Q\n           || state == SCE_RB_STRING_QQ\n           // excluded SCE_RB_STRING_QR\n           || state == SCE_RB_STRING_W\n           || state == SCE_RB_STRING_QW\n           || state == SCE_RB_STRING_I\n           || state == SCE_RB_STRING_QI\n           || state == SCE_RB_STRING_QS\n           || state == SCE_RB_STRING_QX;\n}\n\nconstexpr bool isInterpolableLiteral(int state) noexcept {\n    return state != SCE_RB_STRING_Q\n           && state != SCE_RB_STRING_W\n           && state != SCE_RB_STRING_I\n           && state != SCE_RB_STRING_QS\n           && state != SCE_RB_CHARACTER;\n}\n\ninline bool isSingleSpecialVariable(char ch) noexcept {\n    // https://docs.ruby-lang.org/en/master/globals_rdoc.html\n    return strchr(\"~*$?!@/\\\\;,.=:<>\\\"&`'+\", ch) != nullptr;\n}\n\nvoid InterpolateVariable(LexAccessor &styler, int state, Sci_Position &i, char &ch, char &chNext, char chNext2) {\n    Sci_Position pos = i;\n    styler.ColourTo(pos - 1, state);\n    styler.ColourTo(pos, SCE_RB_OPERATOR);\n    state = SCE_RB_GLOBAL;\n    pos += 2;\n    unsigned len = 0;\n    if (chNext == '$') {\n        if (chNext2 == '-') {\n            ++pos;\n            len = 2;\n        } else if (isSingleSpecialVariable(chNext2)) {\n            ++pos;\n            len = 1;\n        }\n    } else {\n        state = SCE_RB_INSTANCE_VAR;\n        if (chNext2 == '@') {\n            state = SCE_RB_CLASS_VAR;\n            ++pos;\n        }\n    }\n    while (true) {\n        chNext2 = styler.SafeGetCharAt(pos);\n        --len;\n        if (len == 0 || !isSafeWordcharOrHigh(chNext2)) {\n            break;\n        }\n        ++pos;\n    }\n    --pos;\n    styler.ColourTo(pos, state);\n    i = pos;\n    ch = chNext;\n    chNext = chNext2;\n}\n\nbool isEmptyLine(Sci_Position pos, Accessor &styler) {\n    int spaceFlags = 0;\n    const Sci_Position lineCurrent = styler.GetLine(pos);\n    const int indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags, nullptr);\n    return (indentCurrent & SC_FOLDLEVELWHITEFLAG) != 0;\n}\n\nbool RE_CanFollowKeyword(const char *keyword) noexcept {\n    if (!strcmp(keyword, \"and\")\n            || !strcmp(keyword, \"begin\")\n            || !strcmp(keyword, \"break\")\n            || !strcmp(keyword, \"case\")\n            || !strcmp(keyword, \"do\")\n            || !strcmp(keyword, \"else\")\n            || !strcmp(keyword, \"elsif\")\n            || !strcmp(keyword, \"if\")\n            || !strcmp(keyword, \"next\")\n            || !strcmp(keyword, \"return\")\n            || !strcmp(keyword, \"when\")\n            || !strcmp(keyword, \"unless\")\n            || !strcmp(keyword, \"until\")\n            || !strcmp(keyword, \"not\")\n            || !strcmp(keyword, \"or\")) {\n        return true;\n    }\n    return false;\n}\n\n// Look at chars up to but not including endPos\n// Don't look at styles in case we're looking forward\n\nSci_Position skipWhitespace(Sci_Position startPos, Sci_Position endPos, Accessor &styler) {\n    for (Sci_Position i = startPos; i < endPos; i++) {\n        if (!IsASpaceOrTab(styler[i])) {\n            return i;\n        }\n    }\n    return endPos;\n}\n\n// This routine looks for false positives like\n// undef foo, <<\n// There aren't too many.\n//\n// iPrev points to the start of <<\n\nbool sureThisIsHeredoc(Sci_Position iPrev, Accessor &styler, char *prevWord) {\n\n    // Not so fast, since Ruby's so dynamic.  Check the context\n    // to make sure we're OK.\n    int prevStyle;\n    const Sci_Position lineStart = styler.GetLine(iPrev);\n    const Sci_Position lineStartPosn = styler.LineStart(lineStart);\n    styler.Flush();\n\n    // Find the first word after some whitespace\n    const Sci_Position firstWordPosn = skipWhitespace(lineStartPosn, iPrev, styler);\n    if (firstWordPosn >= iPrev) {\n        // Have something like {^     <<}\n        //XXX Look at the first previous non-comment non-white line\n        // to establish the context.  Not too likely though.\n        return true;\n    } else {\n        prevStyle = styler.StyleAt(firstWordPosn);\n        switch (prevStyle) {\n        case SCE_RB_WORD:\n        case SCE_RB_WORD_DEMOTED:\n        case SCE_RB_IDENTIFIER:\n            break;\n        default:\n            return true;\n        }\n    }\n    Sci_Position firstWordEndPosn = firstWordPosn;\n    char *dst = prevWord;\n    for (;;) {\n        if (firstWordEndPosn >= iPrev ||\n                styler.StyleAt(firstWordEndPosn) != prevStyle) {\n            *dst = 0;\n            break;\n        }\n        *dst++ = styler[firstWordEndPosn];\n        firstWordEndPosn += 1;\n    }\n    //XXX Write a style-aware thing to regex scintilla buffer objects\n    if (!strcmp(prevWord, \"undef\")\n            || !strcmp(prevWord, \"def\")\n            || !strcmp(prevWord, \"alias\")) {\n        // These keywords are what we were looking for\n        return false;\n    }\n    return true;\n}\n\n// Routine that saves us from allocating a buffer for the here-doc target\n// targetEndPos points one past the end of the current target\nbool haveTargetMatch(Sci_Position currPos, Sci_Position lengthDoc, Sci_Position targetStartPos, Sci_Position targetEndPos, Accessor &styler) {\n    if (lengthDoc - currPos < targetEndPos - targetStartPos) {\n        return false;\n    }\n    for (Sci_Position i = targetStartPos, j = currPos;\n            i < targetEndPos && j < lengthDoc;\n            i++, j++) {\n        if (styler[i] != styler[j]) {\n            return false;\n        }\n    }\n    return true;\n}\n\n// Finds the start position of the expression containing @p pos\n// @p min_pos should be a known expression start, e.g. the start of the line\nSci_Position findExpressionStart(Sci_Position pos, Sci_Position min_pos, Accessor &styler) {\n    int depth = 0;\n    for (; pos > min_pos; pos -= 1) {\n        const int style = styler.StyleAt(pos - 1);\n        if (style == SCE_RB_OPERATOR) {\n            const int ch = styler[pos - 1];\n            if (ch == '}' || ch == ')' || ch == ']') {\n                depth += 1;\n            } else if (ch == '{' || ch == '(' || ch == '[') {\n                if (depth == 0) {\n                    break;\n                } else {\n                    depth -= 1;\n                }\n            } else if (ch == ';' && depth == 0) {\n                break;\n            }\n        }\n    }\n    return pos;\n}\n\n// We need a check because the form\n// [identifier] <<[target]\n// is ambiguous.  The Ruby lexer/parser resolves it by\n// looking to see if [identifier] names a variable or a\n// function.  If it's the first, it's the start of a here-doc.\n// If it's a var, it's an operator.  This lexer doesn't\n// maintain a symbol table, so it looks ahead to see what's\n// going on, in cases where we have\n// ^[white-space]*[identifier([.|::]identifier)*][white-space]*<<[target]\n//\n// If there's no occurrence of [target] on a line, assume we don't.\n\n// return true == yes, we have no heredocs\n\nbool sureThisIsNotHeredoc(Sci_Position lt2StartPos, Accessor &styler) {\n    // Use full document, not just part we're styling\n    const Sci_Position lengthDoc = styler.Length();\n    const Sci_Position lineStart = styler.GetLine(lt2StartPos);\n    const Sci_Position lineStartPosn = styler.LineStart(lineStart);\n    styler.Flush();\n    constexpr bool definitely_not_a_here_doc = true;\n    constexpr bool looks_like_a_here_doc = false;\n\n    // find the expression start rather than the line start\n    const Sci_Position exprStartPosn = findExpressionStart(lt2StartPos, lineStartPosn, styler);\n\n    // Find the first word after some whitespace\n    Sci_Position firstWordPosn = skipWhitespace(exprStartPosn, lt2StartPos, styler);\n    if (firstWordPosn >= lt2StartPos) {\n        return definitely_not_a_here_doc;\n    }\n    int prevStyle = styler.StyleAt(firstWordPosn);\n    // If we have '<<' following a keyword, it's not a heredoc\n    if (prevStyle != SCE_RB_IDENTIFIER\n            && prevStyle != SCE_RB_GLOBAL       // $stdout and $stderr\n            && prevStyle != SCE_RB_SYMBOL\n            && prevStyle != SCE_RB_INSTANCE_VAR\n            && prevStyle != SCE_RB_CLASS_VAR) {\n        return definitely_not_a_here_doc;\n    }\n    int newStyle = prevStyle;\n    // Some compilers incorrectly warn about uninit newStyle\n    for (firstWordPosn += 1; firstWordPosn <= lt2StartPos; firstWordPosn += 1) {\n        // Inner loop looks at the name\n        for (; firstWordPosn <= lt2StartPos; firstWordPosn += 1) {\n            newStyle = styler.StyleAt(firstWordPosn);\n            if (newStyle != prevStyle) {\n                break;\n            }\n        }\n        // Do we have '::' or '.'?\n        if (firstWordPosn < lt2StartPos && newStyle == SCE_RB_OPERATOR) {\n            const char ch = styler[firstWordPosn];\n            if (ch == '.') {\n                // yes\n            } else if (ch == ':') {\n                if (styler.StyleAt(++firstWordPosn) != SCE_RB_OPERATOR) {\n                    return definitely_not_a_here_doc;\n                } else if (styler[firstWordPosn] != ':') {\n                    return definitely_not_a_here_doc;\n                }\n            } else {\n                break;\n            }\n        } else {\n            break;\n        }\n        // on second and next passes, only identifiers may appear since\n        // class and instance variable are private\n        prevStyle = SCE_RB_IDENTIFIER;\n    }\n    // Skip next batch of white-space\n    firstWordPosn = skipWhitespace(firstWordPosn, lt2StartPos, styler);\n    // possible symbol for an implicit hash argument\n    if (firstWordPosn < lt2StartPos && styler.StyleAt(firstWordPosn) == SCE_RB_SYMBOL) {\n        for (; firstWordPosn <= lt2StartPos; firstWordPosn += 1) {\n            if (styler.StyleAt(firstWordPosn) != SCE_RB_SYMBOL) {\n                break;\n            }\n        }\n        // Skip next batch of white-space\n        firstWordPosn = skipWhitespace(firstWordPosn, lt2StartPos, styler);\n    }\n    if (firstWordPosn != lt2StartPos) {\n        // Have [[^ws[identifier]ws[*something_else*]ws<<\n        return definitely_not_a_here_doc;\n    }\n    // OK, now 'j' will point to the current spot moving ahead\n    Sci_Position j = firstWordPosn + 1;\n    if (styler.StyleAt(j) != SCE_RB_OPERATOR || styler[j] != '<') {\n        // This shouldn't happen\n        return definitely_not_a_here_doc;\n    }\n    const Sci_Position nextLineStartPosn = styler.LineStart(lineStart + 1);\n    if (nextLineStartPosn >= lengthDoc) {\n        return definitely_not_a_here_doc;\n    }\n    j = skipWhitespace(j + 1, nextLineStartPosn, styler);\n    if (j >= lengthDoc) {\n        return definitely_not_a_here_doc;\n    }\n    bool allow_indent;\n    Sci_Position target_start;\n    Sci_Position target_end;\n    // From this point on no more styling, since we're looking ahead\n    if (styler[j] == '-' || styler[j] == '~') {\n        allow_indent = true;\n        j++;\n    } else {\n        allow_indent = false;\n    }\n\n    // Allow for quoted targets.\n    char target_quote = 0;\n    switch (styler[j]) {\n    case '\\'':\n    case '\"':\n    case '`':\n        target_quote = styler[j];\n        j += 1;\n    }\n\n    if (isSafeAlnumOrHigh(styler[j])) {\n        // Init target_end because some compilers think it won't\n        // be initialized by the time it's used\n        target_start = target_end = j;\n        j++;\n    } else {\n        return definitely_not_a_here_doc;\n    }\n    for (; j < lengthDoc; j++) {\n        if (!isSafeAlnumOrHigh(styler[j])) {\n            if (target_quote && styler[j] != target_quote) {\n                // unquoted end\n                return definitely_not_a_here_doc;\n            }\n\n            // And for now make sure that it's a newline\n            // don't handle arbitrary expressions yet\n\n            target_end = j;\n            if (target_quote) {\n                // Now we can move to the character after the string delimiter.\n                j += 1;\n            }\n            j = skipWhitespace(j, lengthDoc, styler);\n            if (j >= lengthDoc) {\n                return definitely_not_a_here_doc;\n            } else {\n                const char ch = styler[j];\n                if (ch == '#' || isEOLChar(ch) || ch == '.' || ch == ',' || IsLowerCase(ch)) {\n                    // This is OK, so break and continue;\n                    break;\n                } else {\n                    return definitely_not_a_here_doc;\n                }\n            }\n        }\n    }\n\n    // Just look at the start of each line\n    Sci_Position last_line = styler.GetLine(lengthDoc - 1);\n    // But don't go too far\n    if (last_line > lineStart + 50) {\n        last_line = lineStart + 50;\n    }\n    for (Sci_Position line_num = lineStart + 1; line_num <= last_line; line_num++) {\n        j = styler.LineStart(line_num);\n        if (allow_indent) {\n            j = skipWhitespace(j, lengthDoc, styler);\n        }\n        // target_end is one past the end\n        if (haveTargetMatch(j, lengthDoc, target_start, target_end, styler)) {\n            // We got it\n            return looks_like_a_here_doc;\n        }\n    }\n    return definitely_not_a_here_doc;\n}\n\n//todo: if we aren't looking at a stdio character,\n// move to the start of the first line that is not in a\n// multi-line construct\n\nvoid synchronizeDocStart(Sci_PositionU &startPos, Sci_Position &length, int &initStyle, Accessor &styler, bool skipWhiteSpace=false) {\n\n    styler.Flush();\n    const int style = actual_style(styler.StyleAt(startPos));\n    switch (style) {\n    case SCE_RB_STDIN:\n    case SCE_RB_STDOUT:\n    case SCE_RB_STDERR:\n        // Don't do anything else with these.\n        return;\n    }\n\n    Sci_Position pos = startPos;\n    // Quick way to characterize each line\n    Sci_Position lineStart;\n    for (lineStart = styler.GetLine(pos); lineStart > 0; lineStart--) {\n        // Now look at the style before the previous line's EOL\n        pos = styler.LineStart(lineStart) - 1;\n        if (pos <= 10) {\n            lineStart = 0;\n            break;\n        }\n        const char ch = styler.SafeGetCharAt(pos);\n        const char chPrev = styler.SafeGetCharAt(pos - 1);\n        if (ch == '\\n' && chPrev == '\\r') {\n            pos--;\n        }\n        if (styler.SafeGetCharAt(pos - 1) == '\\\\') {\n            // Continuation line -- keep going\n        } else if (actual_style(styler.StyleAt(pos)) != SCE_RB_DEFAULT) {\n            // Part of multi-line construct -- keep going\n        } else if (currLineContainsHereDelims(pos, styler)) {\n            // Keep going, with pos and length now pointing\n            // at the end of the here-doc delimiter\n        } else if (skipWhiteSpace && isEmptyLine(pos, styler)) {\n            // Keep going\n        } else {\n            break;\n        }\n    }\n    pos = styler.LineStart(lineStart);\n    length += (startPos - pos);\n    startPos = pos;\n    initStyle = SCE_RB_DEFAULT;\n}\n\nvoid ColouriseRbDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[], Accessor &styler) {\n\n    // Lexer for Ruby often has to backtrack to start of current style to determine\n    // which characters are being used as quotes, how deeply nested is the\n    // start position and what the termination string is for here documents\n\n    WordList &keywords = *keywordlists[0];\n\n    class HereDocCls {\n    public:\n        int State = 0;\n        // States\n        // 0: '<<' encountered\n        // 1: collect the delimiter\n        // 1b: text between the end of the delimiter and the EOL\n        // 2: here doc text (lines after the delimiter)\n        char Quote = 0;\t\t// the char after '<<'\n        bool Quoted = false;\t\t// true if Quote in ('\\'','\"','`')\n        int DelimiterLength = 0;\t// strlen(Delimiter)\n        char Delimiter[256] {};\t// the Delimiter, limit of 256: from Perl\n        bool CanBeIndented = false;\n    };\n    HereDocCls HereDoc;\n\n    QuoteCls Quote;\n\n    synchronizeDocStart(startPos, length, initStyle, styler, false);\n\n    bool preferRE = true;\n    bool afterDef = false;\n    int state = initStyle;\n    const Sci_Position lengthDoc = startPos + length;\n\n    char prevWord[MAX_KEYWORD_LENGTH + 1] = \"\"; // 1 byte for zero\n    if (length == 0)\n        return;\n\n    char chPrev = styler.SafeGetCharAt(startPos - 1);\n    char chNext = styler.SafeGetCharAt(startPos);\n    bool is_real_number = true;   // Differentiate between constants and ?-sequences.\n    styler.StartAt(startPos);\n    styler.StartSegment(startPos);\n\n    static constexpr int q_states[] = {\n        SCE_RB_STRING_Q,\n        SCE_RB_STRING_QQ,\n        SCE_RB_STRING_QR,\n        SCE_RB_STRING_W,\n        SCE_RB_STRING_QW,\n        SCE_RB_STRING_QX,\n        SCE_RB_STRING_I,\n        SCE_RB_STRING_QI,\n        SCE_RB_STRING_QS,\n    };\n    constexpr const char *q_chars = \"qQrwWxiIs\";\n\n    // In most cases a value of 2 should be ample for the code in the\n    // Ruby library, and the code the user is likely to enter.\n    // For example,\n    // fu_output_message \"mkdir #{options[:mode] ? ('-m %03o ' % options[:mode]) : ''}#{list.join ' '}\"\n    //     if options[:verbose]\n    // from fileutils.rb nests to a level of 2\n    // If the user actually hits a 6th occurrence of '#{' in a double-quoted\n    // string (including regex'es, %Q, %<sym>, %w, and other strings\n    // that interpolate), it will stay as a string.  The problem with this\n    // is that quotes might flip, a 7th '#{' will look like a comment,\n    // and code-folding might be wrong.\n\n    // If anyone runs into this problem, I recommend raising this\n    // value slightly higher to replacing the fixed array with a linked\n    // list.  Keep in mind this code will be called every time the lexer\n    // is invoked.\n\n#define INNER_STRINGS_MAX_COUNT 5\n    class InnerExpression {\n        // These vars track our instances of \"...#{,,,%Q<..#{,,,}...>,,,}...\"\n        int inner_string_types[INNER_STRINGS_MAX_COUNT] {};\n        // Track # braces when we push a new #{ thing\n        int inner_expn_brace_counts[INNER_STRINGS_MAX_COUNT] {};\n        QuoteCls inner_quotes[INNER_STRINGS_MAX_COUNT];\n        int inner_string_count = 0;\n\n    public:\n        int brace_counts = 0;   // Number of #{ ... } things within an expression\n\n        bool canEnter() const noexcept {\n            return inner_string_count < INNER_STRINGS_MAX_COUNT;\n        }\n        bool canExit() const noexcept {\n            return inner_string_count > 0;\n        }\n        void enter(int &state, const QuoteCls &curr_quote) noexcept {\n            inner_string_types[inner_string_count] = state;\n            state = SCE_RB_DEFAULT;\n            inner_expn_brace_counts[inner_string_count] = brace_counts;\n            brace_counts = 0;\n            inner_quotes[inner_string_count] = curr_quote;\n            ++inner_string_count;\n        }\n        void exit(int &state, QuoteCls &curr_quote) noexcept {\n            --inner_string_count;\n            state = inner_string_types[inner_string_count];\n            brace_counts = inner_expn_brace_counts[inner_string_count];\n            curr_quote = inner_quotes[inner_string_count];\n        }\n    };\n    InnerExpression innerExpr;\n\n    for (Sci_Position i = startPos; i < lengthDoc; i++) {\n        char ch = chNext;\n        chNext = styler.SafeGetCharAt(i + 1);\n        char chNext2 = styler.SafeGetCharAt(i + 2);\n\n        if (styler.IsLeadByte(ch)) {\n            chNext = chNext2;\n            chPrev = ' ';\n            i += 1;\n            continue;\n        }\n\n        // skip on DOS/Windows\n        //No, don't, because some things will get tagged on,\n        // so we won't recognize keywords, for example\n#if 0\n        if (ch == '\\r' && chNext == '\\n') {\n            continue;\n        }\n#endif\n\n        if (HereDoc.State == 1 && isEOLChar(ch)) {\n            // Begin of here-doc (the line after the here-doc delimiter):\n            HereDoc.State = 2;\n            if (state == SCE_RB_WORD) {\n                const Sci_Position wordStartPos = styler.GetStartSegment();\n                ClassifyWordRb(wordStartPos, i - 1, ch, keywords, styler, prevWord);\n            } else {\n                styler.ColourTo(i - 1, state);\n            }\n            // Don't check for a missing quote, just jump into\n            // the here-doc state\n            state = SCE_RB_HERE_QQ;\n            if (HereDoc.Quoted) {\n                if (HereDoc.Quote == '\\'') {\n                    state = SCE_RB_HERE_Q;\n                } else if (HereDoc.Quote == '`') {\n                    state = SCE_RB_HERE_QX;\n                }\n            }\n        }\n\n        // Regular transitions\n        if (state == SCE_RB_DEFAULT) {\n            if (isSafeDigit(ch)) {\n                styler.ColourTo(i - 1, state);\n                state = SCE_RB_NUMBER;\n                is_real_number = true;\n            } else if (isSafeAlphaOrHigh(ch)) {\n                styler.ColourTo(i - 1, state);\n                state = SCE_RB_WORD;\n            } else if (ch == '#') {\n                styler.ColourTo(i - 1, state);\n                state = SCE_RB_COMMENTLINE;\n            } else if (ch == '=') {\n                // =begin indicates the start of a comment (doc) block\n                if ((i == 0 || isEOLChar(chPrev))\n                        && chNext == 'b'\n                        && styler.SafeGetCharAt(i + 2) == 'e'\n                        && styler.SafeGetCharAt(i + 3) == 'g'\n                        && styler.SafeGetCharAt(i + 4) == 'i'\n                        && styler.SafeGetCharAt(i + 5) == 'n'\n                        && !isSafeWordcharOrHigh(styler.SafeGetCharAt(i + 6))) {\n                    styler.ColourTo(i - 1, state);\n                    state = SCE_RB_POD;\n                } else {\n                    styler.ColourTo(i - 1, state);\n                    styler.ColourTo(i, SCE_RB_OPERATOR);\n                    preferRE = true;\n                }\n            } else if (ch == '\"') {\n                styler.ColourTo(i - 1, state);\n                state = SCE_RB_STRING;\n                Quote.New();\n                Quote.Open(ch);\n            } else if (ch == '\\'') {\n                styler.ColourTo(i - 1, state);\n                state = SCE_RB_CHARACTER;\n                Quote.New();\n                Quote.Open(ch);\n            } else if (ch == '`') {\n                styler.ColourTo(i - 1, state);\n                state = SCE_RB_BACKTICKS;\n                Quote.New();\n                Quote.Open(ch);\n            } else if (ch == '@') {\n                // Instance or class var\n                styler.ColourTo(i - 1, state);\n                if (chNext == '@') {\n                    state = SCE_RB_CLASS_VAR;\n                    advance_char(i, ch, chNext, chNext2); // pass by ref\n                } else {\n                    state = SCE_RB_INSTANCE_VAR;\n                }\n            } else if (ch == '$') {\n                // Check for a builtin global\n                styler.ColourTo(i - 1, state);\n                // Recognize it bit by bit\n                state = SCE_RB_GLOBAL;\n            } else if (ch == '/' && preferRE) {\n                // Ambiguous operator\n                styler.ColourTo(i - 1, state);\n                state = SCE_RB_REGEX;\n                Quote.New();\n                Quote.Open(ch);\n            } else if (ch == '<' && chNext == '<' && chNext2 != '=') {\n                if (afterDef) {\n                    afterDef = false;\n                    prevWord[0] = 0;\n                }\n                // Recognise the '<<' symbol - either a here document or a binary op\n                styler.ColourTo(i - 1, state);\n                i++;\n                chNext = chNext2;\n                styler.ColourTo(i, SCE_RB_OPERATOR);\n\n                if (!(strchr(\"\\\"\\'`_-~\", chNext2) || isSafeAlphaOrHigh(chNext2))) {\n                    // It's definitely not a here-doc,\n                    // based on Ruby's lexer/parser in the\n                    // heredoc_identifier routine.\n                    // Nothing else to do.\n                } else if (preferRE) {\n                    if (sureThisIsHeredoc(i - 1, styler, prevWord)) {\n                        state = SCE_RB_HERE_DELIM;\n                        HereDoc.State = 0;\n                    }\n                    // else leave it in default state\n                } else {\n                    if (sureThisIsNotHeredoc(i - 1, styler)) {\n                        // leave state as default\n                        // We don't have all the heuristics Perl has for indications\n                        // of a here-doc, because '<<' is overloadable and used\n                        // for so many other classes.\n                    } else {\n                        state = SCE_RB_HERE_DELIM;\n                        HereDoc.State = 0;\n                    }\n                }\n                preferRE = (state != SCE_RB_HERE_DELIM);\n            } else if (ch == ':') {\n                afterDef = false;\n                styler.ColourTo(i - 1, state);\n                if (chNext == ':') {\n                    // Mark \"::\" as an operator, not symbol start\n                    styler.ColourTo(i + 1, SCE_RB_OPERATOR);\n                    advance_char(i, ch, chNext, chNext2); // pass by ref\n                    state = SCE_RB_DEFAULT;\n                    preferRE = false;\n                } else if (isSafeWordcharOrHigh(chNext)) {\n                    state = SCE_RB_SYMBOL;\n                } else if ((chNext == '@' || chNext == '$') &&\n                           isSafeWordcharOrHigh(chNext2)) {\n                    // instance and global variable followed by an identifier\n                    advance_char(i, ch, chNext, chNext2);\n                    state = SCE_RB_SYMBOL;\n                } else if (((chNext == '@' && chNext2 == '@')  ||\n                            (chNext == '$' && chNext2 == '-')) &&\n                           isSafeWordcharOrHigh(styler.SafeGetCharAt(i+3))) {\n                    // class variables and special global variable \"$-IDENTCHAR\"\n                    state = SCE_RB_SYMBOL;\n                    // $-IDENTCHAR doesn't continue past the IDENTCHAR\n                    if (chNext == '$') {\n                        styler.ColourTo(i+3, SCE_RB_SYMBOL);\n                        state = SCE_RB_DEFAULT;\n                    }\n                    i += 3;\n                    ch = styler.SafeGetCharAt(i);\n                    chNext = styler.SafeGetCharAt(i+1);\n                } else if (chNext == '$' && isSingleSpecialVariable(chNext2)) {\n                    // single-character special global variables\n                    i += 2;\n                    ch = chNext2;\n                    chNext = styler.SafeGetCharAt(i+1);\n                    styler.ColourTo(i, SCE_RB_SYMBOL);\n                    state = SCE_RB_DEFAULT;\n                } else if (strchr(\"[*!~+-*/%=<>&^|\", chNext)) {\n                    // Do the operator analysis in-line, looking ahead\n                    // Based on the table in pickaxe 2nd ed., page 339\n                    bool doColoring = true;\n                    switch (chNext) {\n                    case '[':\n                        if (chNext2 == ']') {\n                            const char ch_tmp = styler.SafeGetCharAt(i + 3);\n                            if (ch_tmp == '=') {\n                                i += 3;\n                                ch = ch_tmp;\n                                chNext = styler.SafeGetCharAt(i + 1);\n                            } else {\n                                i += 2;\n                                ch = chNext2;\n                                chNext = ch_tmp;\n                            }\n                        } else {\n                            doColoring = false;\n                        }\n                        break;\n\n                    case '*':\n                        if (chNext2 == '*') {\n                            i += 2;\n                            ch = chNext2;\n                            chNext = styler.SafeGetCharAt(i + 1);\n                        } else {\n                            advance_char(i, ch, chNext, chNext2);\n                        }\n                        break;\n\n                    case '!':\n                        if (chNext2 == '=' || chNext2 == '~') {\n                            i += 2;\n                            ch = chNext2;\n                            chNext = styler.SafeGetCharAt(i + 1);\n                        } else {\n                            advance_char(i, ch, chNext, chNext2);\n                        }\n                        break;\n\n                    case '<':\n                        if (chNext2 == '<') {\n                            i += 2;\n                            ch = chNext2;\n                            chNext = styler.SafeGetCharAt(i + 1);\n                        } else if (chNext2 == '=') {\n                            const char ch_tmp = styler.SafeGetCharAt(i + 3);\n                            if (ch_tmp == '>') {  // <=> operator\n                                i += 3;\n                                ch = ch_tmp;\n                                chNext = styler.SafeGetCharAt(i + 1);\n                            } else {\n                                i += 2;\n                                ch = chNext2;\n                                chNext = ch_tmp;\n                            }\n                        } else {\n                            advance_char(i, ch, chNext, chNext2);\n                        }\n                        break;\n\n                    default:\n                        // Simple one-character operators\n                        advance_char(i, ch, chNext, chNext2);\n                        break;\n                    }\n                    if (doColoring) {\n                        styler.ColourTo(i, SCE_RB_SYMBOL);\n                        state = SCE_RB_DEFAULT;\n                    }\n                } else if (!preferRE && !IsASpace(chNext)) {\n                    // Don't color symbol strings (yet)\n                    // Just color the \":\" and color rest as string\n                    styler.ColourTo(i, SCE_RB_SYMBOL);\n                    state = SCE_RB_DEFAULT;\n                } else {\n                    styler.ColourTo(i, SCE_RB_OPERATOR);\n                    state = SCE_RB_DEFAULT;\n                    preferRE = true;\n                }\n            } else if (ch == '%' && !afterDef) {\n                styler.ColourTo(i - 1, state);\n                bool have_string = false;\n                const char *hit = strchr(q_chars, chNext);\n                if (hit != nullptr && !isSafeWordcharOrHigh(chNext2)) {\n                    Quote.New();\n                    state = q_states[hit - q_chars];\n                    Quote.Open(chNext2);\n                    i += 2;\n                    ch = chNext2;\n                    chNext = styler.SafeGetCharAt(i + 1);\n                    have_string = true;\n                } else if ((preferRE || (!isWhiteSpace(chNext) && chNext != '=')) && !isSafeWordcharOrHigh(chNext)) {\n                    // Ruby doesn't allow high bit chars here,\n                    // but the editor host might\n                    Quote.New();\n                    state = SCE_RB_STRING_QQ;\n                    Quote.Open(chNext);\n                    advance_char(i, ch, chNext, chNext2); // pass by ref\n                    have_string = true;\n                }\n                if (!have_string) {\n                    styler.ColourTo(i, SCE_RB_OPERATOR);\n                    // stay in default\n                    preferRE = true;\n                }\n            } else if (ch == '?') {\n                afterDef = false;\n                styler.ColourTo(i - 1, state);\n                if (isHighBitChar(chNext)) {\n                    preferRE = false;\n                    Sci_Position width = 1;\n                    styler.MultiByteAccess()->GetCharacterAndWidth(i + 1, &width);\n                    chNext = styler.SafeGetCharAt(i + 1 + width);\n                    if (isSafeWordcharOrHigh(chNext)) {\n                        styler.ColourTo(i, SCE_RB_OPERATOR);\n                        i += width;\n                        state = SCE_RB_WORD;\n                    } else {\n                        i += width;\n                        styler.ColourTo(i, SCE_RB_NUMBER);\n                    }\n                } else if (!isQestionMarkChar(chNext, chNext2)) {\n                    styler.ColourTo(i, SCE_RB_OPERATOR);\n                    preferRE = chNext <= ' ';\n                } else {\n                    // It's the start of a character code escape sequence\n                    // Color it as a number.\n                    state = SCE_RB_NUMBER;\n                    is_real_number = false;\n                }\n            } else if (isoperator(ch) || ch == '.') {\n                styler.ColourTo(i - 1, state);\n                if (afterDef && ch != '.') {\n                    afterDef = false;\n                    prevWord[0] = 0;\n                    if (chNext == '@' && (ch == '+' || ch == '-' || ch == '!')) {\n                        // unary operator method\n                        ch = chNext;\n                        chNext = chNext2;\n                        i += 1;\n                    }\n                }\n                styler.ColourTo(i, SCE_RB_OPERATOR);\n                // If we're ending an expression or block,\n                // assume it ends an object, and the ambivalent\n                // constructs are binary operators\n                //\n                // So if we don't have one of these chars,\n                // we aren't ending an object exp'n, and ops\n                // like : << / are unary operators.\n\n                if (ch == '{') {\n                    ++innerExpr.brace_counts;\n                    preferRE = true;\n                } else if (ch == '}' && --innerExpr.brace_counts < 0\n                           && innerExpr.canExit()) {\n                    styler.ColourTo(i, SCE_RB_OPERATOR);\n                    innerExpr.exit(state, Quote);\n                } else {\n                    preferRE = !AnyOf(ch, ')', '}', ']', '.');\n                }\n                // Stay in default state\n            } else if (isEOLChar(ch)) {\n                afterDef = false;\n                // Make sure it's a true line-end, with no backslash\n                if ((ch == '\\r' || (ch == '\\n' && chPrev != '\\r'))\n                        && chPrev != '\\\\') {\n                    // Assume we've hit the end of the statement.\n                    preferRE = true;\n                }\n            }\n            if (afterDef && state != SCE_RB_DEFAULT) {\n                afterDef = false;\n            }\n        } else if (state == SCE_RB_WORD) {\n            if (ch == '.' || !isSafeWordcharOrHigh(ch)) {\n                // Words include x? in all contexts,\n                // and <letters>= after either 'def' or a dot\n                // Move along until a complete word is on our left\n\n                // Default accessor treats '.' as word-chars,\n                // but we don't for now.\n\n                if (ch == '='\n                        && isSafeWordcharOrHigh(chPrev)\n                        && (chNext == '('\n                            || isWhiteSpace(chNext))\n                        && (!strcmp(prevWord, \"def\")\n                            || followsDot(styler.GetStartSegment(), styler))) {\n                    // <name>= is a name only when being def'd -- Get it the next time\n                    // This means that <name>=<name> is always lexed as\n                    // <name>, (op, =), <name>\n                } else if (ch == ':'\n                           && isSafeWordcharOrHigh(chPrev)\n                           && isWhiteSpace(chNext)) {\n                    // keyword argument, symbol Hash key\n                    styler.ColourTo(i, SCE_RB_SYMBOL);\n                    state = SCE_RB_DEFAULT;\n                    preferRE = true;\n                } else if ((ch == '?' || ch == '!')\n                           && isSafeWordcharOrHigh(chPrev)\n                           && !isSafeWordcharOrHigh(chNext)) {\n                    // <name>? is a name -- Get it the next time\n                    // But <name>?<name> is always lexed as\n                    // <name>, (op, ?), <name>\n                    // Same with <name>! to indicate a method that\n                    // modifies its target\n                } else if (isEOLChar(ch)\n                           && isMatch(styler, lengthDoc, i - 7, \"__END__\")) {\n                    styler.ColourTo(i, SCE_RB_DATASECTION);\n                    state = SCE_RB_DATASECTION;\n                    // No need to handle this state -- we'll just move to the end\n                    preferRE = false;\n                } else {\n                    const Sci_Position wordStartPos = styler.GetStartSegment();\n                    const int word_style = ClassifyWordRb(wordStartPos, i - 1, ch, keywords, styler, prevWord);\n                    switch (word_style) {\n                    case SCE_RB_WORD:\n                        afterDef = strcmp(prevWord, \"def\") == 0;\n                        preferRE = RE_CanFollowKeyword(prevWord);\n                        break;\n\n                    case SCE_RB_WORD_DEMOTED:\n                    case SCE_RB_DEFNAME:\n                    case SCE_RB_IDENTIFIER_PREFERRE:\n                        preferRE = true;\n                        break;\n\n                    case SCE_RB_IDENTIFIER:\n                        preferRE = isEOLChar(ch);\n                        break;\n\n                    default:\n                        preferRE = false;\n                    }\n                    if (ch == '.') {\n                        // We might be redefining an operator-method\n                        afterDef = word_style == SCE_RB_DEFNAME;\n                    }\n                    // And if it's the first\n                    redo_char(i, ch, chNext, chNext2, state); // pass by ref\n                }\n            }\n        } else if (state == SCE_RB_NUMBER) {\n            if (!is_real_number) {\n                if (ch != '\\\\' || chPrev == '\\\\') {\n                    styler.ColourTo(i, state);\n                    state = SCE_RB_DEFAULT;\n                    preferRE = false;\n                } else if (strchr(\"\\\\ntrfvaebs\", chNext)) {\n                    // Terminal escape sequence -- handle it next time\n                    // Nothing more to do this time through the loop\n                } else if (chNext == 'C' || chNext == 'M') {\n                    if (chNext2 != '-') {\n                        // \\C or \\M ends the sequence -- handle it next time\n                    } else {\n                        // Move from abc?\\C-x\n                        //               ^\n                        // to\n                        //                 ^\n                        i += 2;\n                        ch = chNext2;\n                        chNext = styler.SafeGetCharAt(i + 1);\n                    }\n                } else if (chNext == 'c') {\n                    // Stay here, \\c is a combining sequence\n                    advance_char(i, ch, chNext, chNext2); // pass by ref\n                } else {\n                    // ?\\x, including ?\\\\ is final.\n                    styler.ColourTo(i + 1, state);\n                    state = SCE_RB_DEFAULT;\n                    preferRE = false;\n                    advance_char(i, ch, chNext, chNext2);\n                }\n            } else if (isSafeAlnumOrHigh(ch) || ch == '_' || (ch == '.' && isSafeDigit(chNext))) {\n                // Keep going\n            } else if (ch == '.' && chNext == '.') {\n                styler.ColourTo(i - 1, state);\n                redo_char(i, ch, chNext, chNext2, state); // pass by ref\n            } else {\n                styler.ColourTo(i - 1, state);\n                redo_char(i, ch, chNext, chNext2, state); // pass by ref\n                preferRE = false;\n            }\n        } else if (state == SCE_RB_COMMENTLINE) {\n            if (isEOLChar(ch)) {\n                styler.ColourTo(i - 1, state);\n                state = SCE_RB_DEFAULT;\n                // Use whatever setting we had going into the comment\n            }\n        } else if (state == SCE_RB_HERE_DELIM) {\n            // See the comment for SCE_RB_HERE_DELIM in LexPerl.cxx\n            // Slightly different: if we find an immediate '-',\n            // the target can appear indented.\n\n            if (HereDoc.State == 0) { // '<<' encountered\n                HereDoc.State = 1;\n                HereDoc.DelimiterLength = 0;\n                if (ch == '-' || ch == '~') {\n                    HereDoc.CanBeIndented = true;\n                    advance_char(i, ch, chNext, chNext2); // pass by ref\n                } else {\n                    HereDoc.CanBeIndented = false;\n                }\n                if (isEOLChar(ch)) {\n                    // Bail out of doing a here doc if there's no target\n                    state = SCE_RB_DEFAULT;\n                    preferRE = false;\n                } else {\n                    HereDoc.Quote = ch;\n\n                    if (ch == '\\'' || ch == '\"' || ch == '`') {\n                        HereDoc.Quoted = true;\n                        HereDoc.Delimiter[0] = '\\0';\n                    } else {\n                        HereDoc.Quoted = false;\n                        HereDoc.Delimiter[0] = ch;\n                        HereDoc.Delimiter[1] = '\\0';\n                        HereDoc.DelimiterLength = 1;\n                    }\n                }\n            } else if (HereDoc.State == 1) { // collect the delimiter\n                if (isEOLChar(ch)) {\n                    // End the quote now, and go back for more\n                    styler.ColourTo(i - 1, state);\n                    state = SCE_RB_DEFAULT;\n                    i--;\n                    chNext = ch;\n                    preferRE = false;\n                } else if (HereDoc.Quoted) {\n                    if (ch == HereDoc.Quote) { // closing quote => end of delimiter\n                        styler.ColourTo(i, state);\n                        state = SCE_RB_DEFAULT;\n                        preferRE = false;\n                    } else {\n                        if (ch == '\\\\' && !isEOLChar(chNext)) {\n                            advance_char(i, ch, chNext, chNext2);\n                        }\n                        HereDoc.Delimiter[HereDoc.DelimiterLength++] = ch;\n                        HereDoc.Delimiter[HereDoc.DelimiterLength] = '\\0';\n                    }\n                } else { // an unquoted here-doc delimiter\n                    if (isSafeAlnumOrHigh(ch) || ch == '_') {\n                        HereDoc.Delimiter[HereDoc.DelimiterLength++] = ch;\n                        HereDoc.Delimiter[HereDoc.DelimiterLength] = '\\0';\n                    } else {\n                        styler.ColourTo(i - 1, state);\n                        redo_char(i, ch, chNext, chNext2, state);\n                        preferRE = false;\n                    }\n                }\n                if (HereDoc.DelimiterLength >= static_cast<int>(sizeof(HereDoc.Delimiter)) - 1) {\n                    styler.ColourTo(i - 1, state);\n                    state = SCE_RB_ERROR;\n                    preferRE = false;\n                }\n            }\n        } else if (state == SCE_RB_HERE_Q || state == SCE_RB_HERE_QQ || state == SCE_RB_HERE_QX) {\n            if (ch == '\\\\' && !isEOLChar(chNext)) {\n                advance_char(i, ch, chNext, chNext2);\n            } else if (ch == '#' && state != SCE_RB_HERE_Q\n                       && (chNext == '{' || chNext == '@' || chNext == '$')) {\n                if (chNext == '{') {\n                    if (innerExpr.canEnter()) {\n                        // process #{ ... }\n                        styler.ColourTo(i - 1, state);\n                        styler.ColourTo(i + 1, SCE_RB_OPERATOR);\n                        innerExpr.enter(state, Quote);\n                        preferRE = true;\n                        // Skip one\n                        advance_char(i, ch, chNext, chNext2);\n                    }\n                } else {\n                    InterpolateVariable(styler, state, i, ch, chNext, chNext2);\n                }\n            }\n\n            // Not needed: HereDoc.State == 2\n            // Indentable here docs: look backwards\n            // Non-indentable: look forwards, like in Perl\n            //\n            // Why: so we can quickly resolve things like <<-\" abc\"\n\n            else if (!HereDoc.CanBeIndented) {\n                if (isEOLChar(chPrev)\n                        && isMatch(styler, lengthDoc, i, HereDoc.Delimiter)) {\n                    styler.ColourTo(i - 1, state);\n                    i += static_cast<Sci_Position>(HereDoc.DelimiterLength) - 1;\n                    chNext = styler.SafeGetCharAt(i + 1);\n                    if (isEOLChar(chNext)) {\n                        styler.ColourTo(i, SCE_RB_HERE_DELIM);\n                        state = SCE_RB_DEFAULT;\n                        HereDoc.State = 0;\n                        preferRE = false;\n                    }\n                    // Otherwise we skipped through the here doc faster.\n                }\n            } else if (isEOLChar(chNext)\n                       && lookingAtHereDocDelim(styler,\n                                                i - HereDoc.DelimiterLength + 1,\n                                                lengthDoc,\n                                                HereDoc.Delimiter)) {\n                styler.ColourTo(i - HereDoc.DelimiterLength, state);\n                styler.ColourTo(i, SCE_RB_HERE_DELIM);\n                state = SCE_RB_DEFAULT;\n                preferRE = false;\n                HereDoc.State = 0;\n            }\n        } else if (state == SCE_RB_CLASS_VAR\n                   || state == SCE_RB_INSTANCE_VAR\n                   || state == SCE_RB_SYMBOL) {\n            if (state == SCE_RB_SYMBOL &&\n                    // FIDs suffices '?' and '!'\n                    (((ch == '!' || ch == '?') && chNext != '=') ||\n                     // identifier suffix '='\n                     (ch == '=' && (chNext != '~' && chNext != '>' &&\n                                    (chNext != '=' || chNext2 == '>'))))) {\n                styler.ColourTo(i, state);\n                state = SCE_RB_DEFAULT;\n                preferRE = false;\n            } else if (!isSafeWordcharOrHigh(ch)) {\n                styler.ColourTo(i - 1, state);\n                redo_char(i, ch, chNext, chNext2, state); // pass by ref\n                preferRE = false;\n            }\n        } else if (state == SCE_RB_GLOBAL) {\n            if (!isSafeWordcharOrHigh(ch)) {\n                // handle special globals here as well\n                if (chPrev == '$') {\n                    if (ch == '-') {\n                        // Include the next char, like $-a\n                        advance_char(i, ch, chNext, chNext2);\n                    }\n                    styler.ColourTo(i, state);\n                    state = SCE_RB_DEFAULT;\n                } else {\n                    styler.ColourTo(i - 1, state);\n                    redo_char(i, ch, chNext, chNext2, state); // pass by ref\n                }\n                preferRE = false;\n            }\n        } else if (state == SCE_RB_POD) {\n            // PODs end with ^=end\\s, -- any whitespace can follow =end\n            if (isWhiteSpace(ch)\n                    && i > 5\n                    && isEOLChar(styler[i - 5])\n                    && isMatch(styler, lengthDoc, i - 4, \"=end\")) {\n                styler.ColourTo(i - 1, state);\n                state = SCE_RB_DEFAULT;\n                preferRE = false;\n            }\n        } else if (state == SCE_RB_REGEX || state == SCE_RB_STRING_QR) {\n            if (ch == '\\\\' && Quote.Up != '\\\\') {\n                // Skip one\n                advance_char(i, ch, chNext, chNext2);\n            } else if (ch == Quote.Down) {\n                Quote.Count--;\n                if (Quote.Count == 0) {\n                    // Include the options\n                    while (isSafeAlpha(chNext)) {\n                        i++;\n                        ch = chNext;\n                        chNext = styler.SafeGetCharAt(i + 1);\n                    }\n                    styler.ColourTo(i, state);\n                    state = SCE_RB_DEFAULT;\n                    preferRE = false;\n                }\n            } else if (ch == Quote.Up) {\n                // Only if close quoter != open quoter\n                Quote.Count++;\n\n            } else if (ch == '#') {\n                if (chNext == '{') {\n                    if (innerExpr.canEnter()) {\n                        // process #{ ... }\n                        styler.ColourTo(i - 1, state);\n                        styler.ColourTo(i + 1, SCE_RB_OPERATOR);\n                        innerExpr.enter(state, Quote);\n                        preferRE = true;\n                        // Skip one\n                        advance_char(i, ch, chNext, chNext2);\n                    }\n                } else if (chNext == '@' || chNext == '$') {\n                    InterpolateVariable(styler, state, i, ch, chNext, chNext2);\n                } else {\n                    //todo: distinguish comments from pound chars\n                    // for now, handle as comment\n                    styler.ColourTo(i - 1, state);\n                    bool inEscape = false;\n                    while (++i < lengthDoc) {\n                        ch = styler.SafeGetCharAt(i);\n                        if (ch == '\\\\') {\n                            inEscape = true;\n                        } else if (isEOLChar(ch)) {\n                            // Comment inside a regex\n                            styler.ColourTo(i - 1, SCE_RB_COMMENTLINE);\n                            break;\n                        } else if (inEscape) {\n                            inEscape = false;  // don't look at char\n                        } else if (ch == Quote.Down) {\n                            // Have the regular handler deal with this\n                            // to get trailing modifiers.\n                            i--;\n                            ch = styler[i];\n                            break;\n                        }\n                    }\n                    chNext = styler.SafeGetCharAt(i + 1);\n                }\n            }\n            // Quotes of all kinds...\n        } else if (isPercentLiteral(state) ||\n                   state == SCE_RB_STRING || state == SCE_RB_CHARACTER ||\n                   state == SCE_RB_BACKTICKS) {\n            if (!Quote.Down && !isspacechar(ch)) {\n                Quote.Open(ch);\n            } else if (ch == '\\\\' && Quote.Up != '\\\\') {\n                //Riddle me this: Is it safe to skip *every* escaped char?\n                advance_char(i, ch, chNext, chNext2);\n            } else if (ch == Quote.Down) {\n                Quote.Count--;\n                if (Quote.Count == 0) {\n                    styler.ColourTo(i, state);\n                    state = SCE_RB_DEFAULT;\n                    preferRE = false;\n                }\n            } else if (ch == Quote.Up) {\n                Quote.Count++;\n            } else if (ch == '#' && isInterpolableLiteral(state)) {\n                if (chNext == '{') {\n                    if (innerExpr.canEnter()) {\n                        // process #{ ... }\n                        styler.ColourTo(i - 1, state);\n                        styler.ColourTo(i + 1, SCE_RB_OPERATOR);\n                        innerExpr.enter(state, Quote);\n                        preferRE = true;\n                        // Skip one\n                        advance_char(i, ch, chNext, chNext2);\n                    }\n                } else if (chNext == '@' || chNext == '$') {\n                    InterpolateVariable(styler, state, i, ch, chNext, chNext2);\n                }\n            }\n        }\n\n        if (state == SCE_RB_ERROR) {\n            break;\n        }\n        chPrev = ch;\n    }\n    if (state == SCE_RB_WORD) {\n        // We've ended on a word, possibly at EOF, and need to\n        // classify it.\n        ClassifyWordRb(styler.GetStartSegment(), lengthDoc - 1, '\\0', keywords, styler, prevWord);\n    } else {\n        styler.ColourTo(lengthDoc - 1, state);\n    }\n}\n\n// Helper functions for folding, disambiguation keywords\n// Assert that there are no high-bit chars\n\nvoid getPrevWord(Sci_Position pos, char *prevWord, Accessor &styler, int word_state) {\n    Sci_Position i;\n    styler.Flush();\n    for (i = pos - 1; i > 0; i--) {\n        if (actual_style(styler.StyleAt(i)) != word_state) {\n            i++;\n            break;\n        }\n    }\n    if (i < pos - MAX_KEYWORD_LENGTH) // overflow\n        i = pos - MAX_KEYWORD_LENGTH;\n    char *dst = prevWord;\n    for (; i <= pos; i++) {\n        *dst++ = styler[i];\n    }\n    *dst = 0;\n}\n\nbool keywordIsAmbiguous(const char *prevWord) noexcept {\n    // Order from most likely used to least likely\n    // Lots of ways to do a loop in Ruby besides 'while/until'\n    if (!strcmp(prevWord, \"if\")\n            || !strcmp(prevWord, \"do\")\n            || !strcmp(prevWord, \"while\")\n            || !strcmp(prevWord, \"unless\")\n            || !strcmp(prevWord, \"until\")\n            || !strcmp(prevWord, \"for\")) {\n        return true;\n    } else {\n        return false;\n    }\n}\n\n// Demote keywords in the following conditions:\n// if, while, unless, until modify a statement\n// do after a while or until, as a noise word (like then after if)\n\nbool keywordIsModifier(const char *word, Sci_Position pos, Accessor &styler) {\n    if (word[0] == 'd' && word[1] == 'o' && !word[2]) {\n        return keywordDoStartsLoop(pos, styler);\n    }\n    char ch;\n    int style = SCE_RB_DEFAULT;\n    Sci_Position lineStart = styler.GetLine(pos);\n    Sci_Position lineStartPosn = styler.LineStart(lineStart);\n    // We want to step backwards until we don't care about the current\n    // position. But first move lineStartPosn back behind any\n    // continuations immediately above word.\n    while (lineStartPosn > 0) {\n        ch = styler[lineStartPosn-1];\n        if (ch == '\\n' || ch == '\\r') {\n            const char chPrev  = styler.SafeGetCharAt(lineStartPosn-2);\n            const char chPrev2 = styler.SafeGetCharAt(lineStartPosn-3);\n            lineStart = styler.GetLine(lineStartPosn-1);\n            // If we find a continuation line, include it in our analysis.\n            if (chPrev == '\\\\') {\n                lineStartPosn = styler.LineStart(lineStart);\n            } else if (ch == '\\n' && chPrev == '\\r' && chPrev2 == '\\\\') {\n                lineStartPosn = styler.LineStart(lineStart);\n            } else {\n                break;\n            }\n        } else {\n            break;\n        }\n    }\n\n    styler.Flush();\n    while (--pos >= lineStartPosn) {\n        style = actual_style(styler.StyleAt(pos));\n        if (style == SCE_RB_DEFAULT) {\n            ch = styler[pos];\n            if (IsASpaceOrTab(ch)) {\n                //continue\n            } else if (ch == '\\r' || ch == '\\n') {\n                // Scintilla's LineStart() and GetLine() routines aren't\n                // platform-independent, so if we have text prepared with\n                // a different system we can't rely on it.\n\n                // Also, lineStartPosn may have been moved to more than one\n                // line above word's line while pushing past continuations.\n                const char chPrev = styler.SafeGetCharAt(pos - 1);\n                const char chPrev2 = styler.SafeGetCharAt(pos - 2);\n                if (chPrev == '\\\\') {\n                    pos-=1;  // gloss over the \"\\\\\"\n                    //continue\n                } else if (ch == '\\n' && chPrev == '\\r' && chPrev2 == '\\\\') {\n                    pos-=2;  // gloss over the \"\\\\\\r\"\n                    //continue\n                } else {\n                    return false;\n                }\n            }\n        } else {\n            break;\n        }\n    }\n    if (pos < lineStartPosn) {\n        return false;\n    }\n    // First things where the action is unambiguous\n    switch (style) {\n    case SCE_RB_DEFAULT:\n    case SCE_RB_COMMENTLINE:\n    case SCE_RB_POD:\n    case SCE_RB_CLASSNAME:\n    case SCE_RB_DEFNAME:\n    case SCE_RB_MODULE_NAME:\n        return false;\n    case SCE_RB_OPERATOR:\n        break;\n    case SCE_RB_WORD:\n        // Watch out for uses of 'else if'\n        //XXX: Make a list of other keywords where 'if' isn't a modifier\n        //     and can appear legitimately\n        // Formulate this to avoid warnings from most compilers\n        if (strcmp(word, \"if\") == 0) {\n            char prevWord[MAX_KEYWORD_LENGTH + 1];\n            getPrevWord(pos, prevWord, styler, SCE_RB_WORD);\n            return strcmp(prevWord, \"else\") != 0;\n        }\n        return true;\n    default:\n        return true;\n    }\n    // Assume that if the keyword follows an operator,\n    // usually it's a block assignment, like\n    // a << if x then y else z\n\n    ch = styler[pos];\n    switch (ch) {\n    case ')':\n    case ']':\n    case '}':\n        return true;\n    default:\n        return false;\n    }\n}\n\n#define WHILE_BACKWARDS \"elihw\"\n#define UNTIL_BACKWARDS \"litnu\"\n#define FOR_BACKWARDS \"rof\"\n\n// Nothing fancy -- look to see if we follow a while/until somewhere\n// on the current line\n\nbool keywordDoStartsLoop(Sci_Position pos, Accessor &styler) {\n    const Sci_Position lineStart = styler.GetLine(pos);\n    const Sci_Position lineStartPosn = styler.LineStart(lineStart);\n    styler.Flush();\n    while (--pos >= lineStartPosn) {\n        const int style = actual_style(styler.StyleAt(pos));\n        if (style == SCE_RB_DEFAULT) {\n            const char ch = styler[pos];\n            if (ch == '\\r' || ch == '\\n') {\n                // Scintilla's LineStart() and GetLine() routines aren't\n                // platform-independent, so if we have text prepared with\n                // a different system we can't rely on it.\n                return false;\n            }\n        } else if (style == SCE_RB_WORD) {\n            // Check for while or until, but write the word in backwards\n            char prevWord[MAX_KEYWORD_LENGTH + 1]; // 1 byte for zero\n            char *dst = prevWord;\n            int wordLen = 0;\n            Sci_Position start_word;\n            for (start_word = pos;\n                    start_word >= lineStartPosn && actual_style(styler.StyleAt(start_word)) == SCE_RB_WORD;\n                    start_word--) {\n                if (++wordLen < MAX_KEYWORD_LENGTH) {\n                    *dst++ = styler[start_word];\n                }\n            }\n            *dst = 0;\n            // Did we see our keyword?\n            if (!strcmp(prevWord, WHILE_BACKWARDS)\n                    || !strcmp(prevWord, UNTIL_BACKWARDS)\n                    || !strcmp(prevWord, FOR_BACKWARDS)) {\n                return true;\n            }\n            // We can move pos to the beginning of the keyword, and then\n            // accept another decrement, as we can never have two contiguous\n            // keywords:\n            // word1 word2\n            //           ^\n            //        <-  move to start_word\n            //      ^\n            //      <- loop decrement\n            //     ^  # pointing to end of word1 is fine\n            pos = start_word;\n        }\n    }\n    return false;\n}\n\nbool IsCommentLine(Sci_Position line, Accessor &styler) {\n    const Sci_Position pos = styler.LineStart(line);\n    const Sci_Position eol_pos = styler.LineStart(line + 1) - 1;\n    for (Sci_Position i = pos; i < eol_pos; i++) {\n        const char ch = styler[i];\n        if (ch == '#')\n            return true;\n        else if (ch != ' ' && ch != '\\t')\n            return false;\n    }\n    return false;\n}\n\n/*\n *  Folding Ruby\n *\n *  The language is quite complex to analyze without a full parse.\n *  For example, this line shouldn't affect fold level:\n *\n *   print \"hello\" if feeling_friendly?\n *\n *  Neither should this:\n *\n *   print \"hello\" \\\n *      if feeling_friendly?\n *\n *\n *  But this should:\n *\n *   if feeling_friendly?  #++\n *     print \"hello\" \\\n *     print \"goodbye\"\n *   end                   #--\n *\n *  So we cheat, by actually looking at the existing indentation\n *  levels for each line, and just echoing it back.  Like Python.\n *  Then if we get better at it, we'll take braces into consideration,\n *  which always affect folding levels.\n\n *  How the keywords should work:\n *  No effect:\n *  __FILE__ __LINE__ BEGIN END alias and\n *  defined? false in nil not or self super then\n *  true undef\n\n *  Always increment:\n *  begin  class def do for module when {\n *\n *  Always decrement:\n *  end }\n *\n *  Increment if these start a statement\n *  if unless until while -- do nothing if they're modifiers\n\n *  These end a block if there's no modifier, but don't bother\n *  break next redo retry return yield\n *\n *  These temporarily de-indent, but re-indent\n *  case else elsif ensure rescue\n *\n *  This means that the folder reflects indentation rather\n *  than setting it.  The language-service updates indentation\n *  when users type return and finishes entering de-denters.\n *\n *  Later offer to fold POD, here-docs, strings, and blocks of comments\n */\n\nvoid FoldRbDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *[], Accessor &styler) {\n    const bool foldCompact = styler.GetPropertyInt(\"fold.compact\", 1) != 0;\n    const bool foldComment = styler.GetPropertyInt(\"fold.comment\") != 0;\n\n    synchronizeDocStart(startPos, length, initStyle, styler, false);\n    const Sci_PositionU endPos = startPos + length;\n    int visibleChars = 0;\n    Sci_Position lineCurrent = styler.GetLine(startPos);\n    int levelPrev = startPos == 0 ? 0 : (styler.LevelAt(lineCurrent)\n                                         & SC_FOLDLEVELNUMBERMASK\n                                         & ~SC_FOLDLEVELBASE);\n    int levelCurrent = levelPrev;\n    char chPrev = '\\0';\n    char chNext = styler[startPos];\n    int styleNext = styler.StyleAt(startPos);\n    int stylePrev = startPos <= 1 ? SCE_RB_DEFAULT : styler.StyleAt(startPos - 1);\n    // detect endless method definition to fix up code folding\n    enum class MethodDefinition {\n        None,\n        Define,\n        Operator,\n        Name,\n        Argument,\n    };\n    MethodDefinition method_definition = MethodDefinition::None;\n    int argument_paren_count = 0;\n    bool heredocOpen = false;\n\n    for (Sci_PositionU i = startPos; i < endPos; i++) {\n        const char ch = chNext;\n        chNext = styler.SafeGetCharAt(i + 1);\n        const int style = styleNext;\n        styleNext = styler.StyleAt(i + 1);\n        const bool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n\n        /*Mutiline comment patch*/\n        if (foldComment && atEOL && IsCommentLine(lineCurrent, styler)) {\n            if (!IsCommentLine(lineCurrent - 1, styler)\n                    && IsCommentLine(lineCurrent + 1, styler))\n                levelCurrent++;\n            else if (IsCommentLine(lineCurrent - 1, styler)\n                     && !IsCommentLine(lineCurrent + 1, styler))\n                levelCurrent--;\n        }\n\n        if (style == SCE_RB_COMMENTLINE) {\n            if (foldComment && stylePrev != SCE_RB_COMMENTLINE) {\n                if (chNext == '{') {\n                    levelCurrent++;\n                } else if (chNext == '}' && levelCurrent > 0) {\n                    levelCurrent--;\n                }\n            }\n        } else if (style == SCE_RB_OPERATOR) {\n            if (AnyOf(ch, '[', '{', '(')) {\n                levelCurrent++;\n            } else if (AnyOf(ch, ']', '}', ')')) {\n                // Don't decrement below 0\n                if (levelCurrent > 0)\n                    levelCurrent--;\n            }\n        } else if (style == SCE_RB_WORD && styleNext != SCE_RB_WORD) {\n            // Look at the keyword on the left and decide what to do\n            char prevWord[MAX_KEYWORD_LENGTH + 1]; // 1 byte for zero\n            prevWord[0] = 0;\n            getPrevWord(i, prevWord, styler, SCE_RB_WORD);\n            if (!strcmp(prevWord, \"end\")) {\n                // Don't decrement below 0\n                if (levelCurrent > 0)\n                    levelCurrent--;\n            } else if (!strcmp(prevWord, \"def\")) {\n                levelCurrent++;\n                method_definition = MethodDefinition::Define;\n            } else if (!strcmp(prevWord, \"if\")\n                       || !strcmp(prevWord, \"class\")\n                       || !strcmp(prevWord, \"module\")\n                       || !strcmp(prevWord, \"begin\")\n                       || !strcmp(prevWord, \"case\")\n                       || !strcmp(prevWord, \"do\")\n                       || !strcmp(prevWord, \"while\")\n                       || !strcmp(prevWord, \"unless\")\n                       || !strcmp(prevWord, \"until\")\n                       || !strcmp(prevWord, \"for\")\n                      ) {\n                levelCurrent++;\n            }\n        } else if (style == SCE_RB_HERE_DELIM && !heredocOpen) {\n            if (stylePrev == SCE_RB_OPERATOR && chPrev == '<' && styler.SafeGetCharAt(i - 2) == '<') {\n                levelCurrent++;\n                heredocOpen = true;\n            } else if (styleNext != SCE_RB_HERE_DELIM) {\n                levelCurrent--;\n            }\n        } else if (style == SCE_RB_STRING_QW || style == SCE_RB_STRING_W) {\n            if (stylePrev != style) {\n                levelCurrent++;\n            }\n            if (styleNext != style) {\n                levelCurrent--;\n            }\n        }\n        if (method_definition != MethodDefinition::None) {\n            switch (method_definition) {\n            case MethodDefinition::Define:\n                if (style == SCE_RB_OPERATOR) {\n                    method_definition = MethodDefinition::Operator;\n                } else if (style == SCE_RB_DEFNAME || style == SCE_RB_WORD_DEMOTED || style == SCE_RB_CLASSNAME || style == SCE_RB_IDENTIFIER) {\n                    method_definition = MethodDefinition::Name;\n                } else if (!(style == SCE_RB_WORD || IsASpaceOrTab(ch))) {\n                    method_definition = MethodDefinition::None;\n                }\n                if (method_definition <= MethodDefinition::Define) {\n                    break;\n                }\n                // fall through for unary operator or single letter name\n                [[fallthrough]];\n            case MethodDefinition::Operator:\n            case MethodDefinition::Name:\n                if (isEOLChar(chNext) || chNext == '#') {\n                    method_definition = MethodDefinition::None;\n                } else if (chNext == '(' || chNext <= ' ') {\n                    // setter method cannot be defined in an endless method definition.\n                    if (ch == '=' && (method_definition == MethodDefinition::Name || chPrev == ']')) {\n                        method_definition = MethodDefinition::None;\n                    } else {\n                        method_definition = MethodDefinition::Argument;\n                        argument_paren_count = 0;\n                    }\n                }\n                break;\n            case MethodDefinition::Argument:\n                if (style == SCE_RB_OPERATOR) {\n                    if (ch == '(') {\n                        ++argument_paren_count;\n                    } else if (ch == ')') {\n                        --argument_paren_count;\n                    } else if (argument_paren_count == 0) {\n                        method_definition = MethodDefinition::None;\n                        if (ch == '=' && levelCurrent > 0) {\n                            levelCurrent--;\n                        }\n                    }\n                } else if (argument_paren_count == 0 && !IsASpaceOrTab(ch)) {\n                    // '=' must be first character after method name or right parenthesis\n                    method_definition = MethodDefinition::None;\n                }\n                break;\n            default:\n                break;\n            }\n        }\n        if (atEOL || (i == endPos - 1)) {\n            int lev = levelPrev;\n            if (visibleChars == 0 && foldCompact)\n                lev |= SC_FOLDLEVELWHITEFLAG;\n            if ((levelCurrent > levelPrev) && (visibleChars > 0))\n                lev |= SC_FOLDLEVELHEADERFLAG;\n            styler.SetLevel(lineCurrent, lev|SC_FOLDLEVELBASE);\n            lineCurrent++;\n            levelPrev = levelCurrent;\n            visibleChars = 0;\n            method_definition = MethodDefinition::None;\n            argument_paren_count = 0;\n            heredocOpen = false;\n        } else if (!isspacechar(ch)) {\n            visibleChars++;\n        }\n        chPrev = ch;\n        stylePrev = style;\n    }\n}\n\nconst char *const rubyWordListDesc[] = {\n    \"Keywords\",\n    nullptr\n};\n\n}\n\nLexerModule lmRuby(SCLEX_RUBY, ColouriseRbDoc, \"ruby\", FoldRbDoc, rubyWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexRust.cxx",
    "content": "/** @file LexRust.cxx\n ** Lexer for Rust.\n **\n ** Copyright (c) 2013 by SiegeLord <slabode@aim.com>\n ** Converted to lexer object and added further folding features/properties by \"Udo Lechner\" <dlchnr(at)gmx(dot)net>\n **/\n// Copyright 1998-2005 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n#include <map>\n#include <functional>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"PropSetSimple.h\"\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n#include \"OptionSet.h\"\n#include \"DefaultLexer.h\"\n\nusing namespace Scintilla;\nusing namespace Lexilla;\n\nstatic const int NUM_RUST_KEYWORD_LISTS = 7;\nstatic const int MAX_RUST_IDENT_CHARS = 1023;\n\nstatic bool IsStreamCommentStyle(int style) {\n\treturn style == SCE_RUST_COMMENTBLOCK ||\n\t\t   style == SCE_RUST_COMMENTBLOCKDOC;\n}\n\n// Options used for LexerRust\nstruct OptionsRust {\n\tbool fold;\n\tbool foldSyntaxBased;\n\tbool foldComment;\n\tbool foldCommentMultiline;\n\tbool foldCommentExplicit;\n\tstd::string foldExplicitStart;\n\tstd::string foldExplicitEnd;\n\tbool foldExplicitAnywhere;\n\tbool foldCompact;\n\tint  foldAtElseInt;\t// This variable is not used\n\tbool foldAtElse;\n\tOptionsRust() {\n\t\tfold = false;\n\t\tfoldSyntaxBased = true;\n\t\tfoldComment = false;\n\t\tfoldCommentMultiline = true;\n\t\tfoldCommentExplicit = true;\n\t\tfoldExplicitStart = \"\";\n\t\tfoldExplicitEnd   = \"\";\n\t\tfoldExplicitAnywhere = false;\n\t\tfoldCompact = true;\n\t\tfoldAtElseInt = -1;\n\t\tfoldAtElse = false;\n\t}\n};\n\nstatic const char * const rustWordLists[NUM_RUST_KEYWORD_LISTS + 1] = {\n\t\t\t\"Primary keywords and identifiers\",\n\t\t\t\"Built in types\",\n\t\t\t\"Other keywords\",\n\t\t\t\"Keywords 4\",\n\t\t\t\"Keywords 5\",\n\t\t\t\"Keywords 6\",\n\t\t\t\"Keywords 7\",\n\t\t\t0,\n\t\t};\n\nstruct OptionSetRust : public OptionSet<OptionsRust> {\n\tOptionSetRust() {\n\t\tDefineProperty(\"fold\", &OptionsRust::fold);\n\n\t\tDefineProperty(\"fold.comment\", &OptionsRust::foldComment);\n\n\t\tDefineProperty(\"fold.compact\", &OptionsRust::foldCompact);\n\n\t\tDefineProperty(\"fold.at.else\", &OptionsRust::foldAtElse);\n\n\t\tDefineProperty(\"fold.rust.syntax.based\", &OptionsRust::foldSyntaxBased,\n\t\t\t\"Set this property to 0 to disable syntax based folding.\");\n\n\t\tDefineProperty(\"fold.rust.comment.multiline\", &OptionsRust::foldCommentMultiline,\n\t\t\t\"Set this property to 0 to disable folding multi-line comments when fold.comment=1.\");\n\n\t\tDefineProperty(\"fold.rust.comment.explicit\", &OptionsRust::foldCommentExplicit,\n\t\t\t\"Set this property to 0 to disable folding explicit fold points when fold.comment=1.\");\n\n\t\tDefineProperty(\"fold.rust.explicit.start\", &OptionsRust::foldExplicitStart,\n\t\t\t\"The string to use for explicit fold start points, replacing the standard //{.\");\n\n\t\tDefineProperty(\"fold.rust.explicit.end\", &OptionsRust::foldExplicitEnd,\n\t\t\t\"The string to use for explicit fold end points, replacing the standard //}.\");\n\n\t\tDefineProperty(\"fold.rust.explicit.anywhere\", &OptionsRust::foldExplicitAnywhere,\n\t\t\t\"Set this property to 1 to enable explicit fold points anywhere, not just in line comments.\");\n\n\t\tDefineProperty(\"lexer.rust.fold.at.else\", &OptionsRust::foldAtElseInt,\n\t\t\t\"This option enables Rust folding on a \\\"} else {\\\" line of an if statement.\");\n\n\t\tDefineWordListSets(rustWordLists);\n\t}\n};\n\nclass LexerRust : public DefaultLexer {\n\tWordList keywords[NUM_RUST_KEYWORD_LISTS];\n\tOptionsRust options;\n\tOptionSetRust osRust;\npublic:\n\tLexerRust() : DefaultLexer(\"rust\", SCLEX_RUST) {\n\t}\n\tvirtual ~LexerRust() {\n\t}\n\tvoid SCI_METHOD Release() override {\n\t\tdelete this;\n\t}\n\tint SCI_METHOD Version() const override {\n\t\treturn lvRelease5;\n\t}\n\tconst char * SCI_METHOD PropertyNames() override {\n\t\treturn osRust.PropertyNames();\n\t}\n\tint SCI_METHOD PropertyType(const char *name) override {\n\t\treturn osRust.PropertyType(name);\n\t}\n\tconst char * SCI_METHOD DescribeProperty(const char *name) override {\n\t\treturn osRust.DescribeProperty(name);\n\t}\n\tSci_Position SCI_METHOD PropertySet(const char *key, const char *val) override;\n\tconst char * SCI_METHOD PropertyGet(const char *key) override {\n\t\treturn osRust.PropertyGet(key);\n\t}\n\tconst char * SCI_METHOD DescribeWordListSets() override {\n\t\treturn osRust.DescribeWordListSets();\n\t}\n\tSci_Position SCI_METHOD WordListSet(int n, const char *wl) override;\n\tvoid SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;\n\tvoid SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;\n\tvoid * SCI_METHOD PrivateCall(int, void *) override {\n\t\treturn 0;\n\t}\n\tstatic ILexer5 *LexerFactoryRust() {\n\t\treturn new LexerRust();\n\t}\n};\n\nSci_Position SCI_METHOD LexerRust::PropertySet(const char *key, const char *val) {\n\tif (osRust.PropertySet(&options, key, val)) {\n\t\treturn 0;\n\t}\n\treturn -1;\n}\n\nSci_Position SCI_METHOD LexerRust::WordListSet(int n, const char *wl) {\n\tSci_Position firstModification = -1;\n\tif (n < NUM_RUST_KEYWORD_LISTS) {\n\t\tWordList *wordListN = &keywords[n];\n\t\tif (wordListN->Set(wl)) {\n\t\t\tfirstModification = 0;\n\t\t}\n\t}\n\treturn firstModification;\n}\n\nstatic bool IsWhitespace(int c) {\n    return c == ' ' || c == '\\t' || c == '\\r' || c == '\\n';\n}\n\n/* This isn't quite right for Unicode identifiers */\nstatic bool IsIdentifierStart(int ch) {\n\treturn (IsASCII(ch) && (isalpha(ch) || ch == '_')) || !IsASCII(ch);\n}\n\n/* This isn't quite right for Unicode identifiers */\nstatic bool IsIdentifierContinue(int ch) {\n\treturn (IsASCII(ch) && (isalnum(ch) || ch == '_')) || !IsASCII(ch);\n}\n\nstatic void ScanWhitespace(Accessor& styler, Sci_Position& pos, Sci_Position max) {\n\twhile (IsWhitespace(styler.SafeGetCharAt(pos, '\\0')) && pos < max) {\n\t\tif (pos == styler.LineEnd(styler.GetLine(pos)))\n\t\t\tstyler.SetLineState(styler.GetLine(pos), 0);\n\t\tpos++;\n\t}\n\tstyler.ColourTo(pos-1, SCE_RUST_DEFAULT);\n}\n\nstatic void GrabString(char* s, Accessor& styler, Sci_Position start, Sci_Position len) {\n\tfor (Sci_Position ii = 0; ii < len; ii++)\n\t\ts[ii] = styler[ii + start];\n\ts[len] = '\\0';\n}\n\nstatic void ScanRawIdentifier(Accessor& styler, Sci_Position& pos) {\n\tSci_Position start = pos;\n\twhile (IsIdentifierContinue(styler.SafeGetCharAt(pos, '\\0')))\n\t\tpos++;\n\n\tchar s[MAX_RUST_IDENT_CHARS + 1];\n\tSci_Position len = pos - start;\n\tlen = len > MAX_RUST_IDENT_CHARS ? MAX_RUST_IDENT_CHARS : len;\n\tGrabString(s, styler, start, len);\n\t// restricted values https://doc.rust-lang.org/reference/identifiers.html#raw-identifiers\n\tif (strcmp(s, \"crate\") != 0 && strcmp(s, \"self\") != 0 &&\n\t\tstrcmp(s, \"super\") != 0 && strcmp(s, \"Self\") != 0) {\n\t\tstyler.ColourTo(pos - 1, SCE_RUST_IDENTIFIER);\n\t} else {\n\t\tstyler.ColourTo(pos - 1, SCE_RUST_LEXERROR);\n\t}\n}\n\nstatic void ScanIdentifier(Accessor& styler, Sci_Position& pos, WordList *keywords) {\n\tSci_Position start = pos;\n\twhile (IsIdentifierContinue(styler.SafeGetCharAt(pos, '\\0')))\n\t\tpos++;\n\n\tif (styler.SafeGetCharAt(pos, '\\0') == '!') {\n\t\tpos++;\n\t\tstyler.ColourTo(pos - 1, SCE_RUST_MACRO);\n\t} else {\n\t\tchar s[MAX_RUST_IDENT_CHARS + 1];\n\t\tSci_Position len = pos - start;\n\t\tlen = len > MAX_RUST_IDENT_CHARS ? MAX_RUST_IDENT_CHARS : len;\n\t\tGrabString(s, styler, start, len);\n\t\tbool keyword = false;\n\t\tfor (int ii = 0; ii < NUM_RUST_KEYWORD_LISTS; ii++) {\n\t\t\tif (keywords[ii].InList(s)) {\n\t\t\t\tstyler.ColourTo(pos - 1, SCE_RUST_WORD + ii);\n\t\t\t\tkeyword = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (!keyword) {\n\t\t\tstyler.ColourTo(pos - 1, SCE_RUST_IDENTIFIER);\n\t\t}\n\t}\n}\n\n/* Scans a sequence of digits, returning true if it found any. */\nstatic bool ScanDigits(Accessor& styler, Sci_Position& pos, int base) {\n\tSci_Position old_pos = pos;\n\tfor (;;) {\n\t\tint c = styler.SafeGetCharAt(pos, '\\0');\n\t\tif (IsADigit(c, base) || c == '_')\n\t\t\tpos++;\n\t\telse\n\t\t\tbreak;\n\t}\n\treturn old_pos != pos;\n}\n\n/* Scans an integer and floating point literals. */\nstatic void ScanNumber(Accessor& styler, Sci_Position& pos) {\n\tint base = 10;\n\tint c = styler.SafeGetCharAt(pos, '\\0');\n\tint n = styler.SafeGetCharAt(pos + 1, '\\0');\n\tbool error = false;\n\t/* Scan the prefix, thus determining the base.\n\t * 10 is default if there's no prefix. */\n\tif (c == '0' && n == 'x') {\n\t\tpos += 2;\n\t\tbase = 16;\n\t} else if (c == '0' && n == 'b') {\n\t\tpos += 2;\n\t\tbase = 2;\n\t} else if (c == '0' && n == 'o') {\n\t\tpos += 2;\n\t\tbase = 8;\n\t}\n\n\t/* Scan initial digits. The literal is malformed if there are none. */\n\terror |= !ScanDigits(styler, pos, base);\n\t/* See if there's an integer suffix. We mimic the Rust's lexer\n\t * and munch it even if there was an error above. */\n\tc = styler.SafeGetCharAt(pos, '\\0');\n\tif (c == 'u' || c == 'i') {\n\t\tpos++;\n\t\tc = styler.SafeGetCharAt(pos, '\\0');\n\t\tn = styler.SafeGetCharAt(pos + 1, '\\0');\n\t\tif (c == '8') {\n\t\t\tpos++;\n\t\t} else if (c == '1' && n == '6') {\n\t\t\tpos += 2;\n\t\t} else if (c == '3' && n == '2') {\n\t\t\tpos += 2;\n\t\t} else if (c == '6' && n == '4') {\n\t\t\tpos += 2;\n\t\t} else if (styler.Match(pos, \"128\")) {\n\t\t\tpos += 3;\n\t\t} else if (styler.Match(pos, \"size\")) {\n\t\t\tpos += 4;\n\t\t} else {\n\t\t\terror = true;\n\t\t}\n\t/* See if it's a floating point literal. These literals have to be base 10.\n\t */\n\t} else if (!error) {\n\t\t/* If there's a period, it's a floating point literal unless it's\n\t\t * followed by an identifier (meaning this is a method call, e.g.\n\t\t * `1.foo()`) or another period, in which case it's a range (e.g. 1..2)\n\t\t */\n\t\tn = styler.SafeGetCharAt(pos + 1, '\\0');\n\t\tif (c == '.' && !(IsIdentifierStart(n) || n == '.')) {\n\t\t\terror |= base != 10;\n\t\t\tpos++;\n\t\t\t/* It's ok to have no digits after the period. */\n\t\t\tScanDigits(styler, pos, 10);\n\t\t}\n\n\t\t/* Look for the exponentiation. */\n\t\tc = styler.SafeGetCharAt(pos, '\\0');\n\t\tif (c == 'e' || c == 'E') {\n\t\t\terror |= base != 10;\n\t\t\tpos++;\n\t\t\tc = styler.SafeGetCharAt(pos, '\\0');\n\t\t\tif (c == '-' || c == '+')\n\t\t\t\tpos++;\n\t\t\t/* It is invalid to have no digits in the exponent. */\n\t\t\terror |= !ScanDigits(styler, pos, 10);\n\t\t}\n\n\t\t/* Scan the floating point suffix. */\n\t\tc = styler.SafeGetCharAt(pos, '\\0');\n\t\tif (c == 'f') {\n\t\t\terror |= base != 10;\n\t\t\tpos++;\n\t\t\tc = styler.SafeGetCharAt(pos, '\\0');\n\t\t\tn = styler.SafeGetCharAt(pos + 1, '\\0');\n\t\t\tif (c == '3' && n == '2') {\n\t\t\t\tpos += 2;\n\t\t\t} else if (c == '6' && n == '4') {\n\t\t\t\tpos += 2;\n\t\t\t} else {\n\t\t\t\terror = true;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (error)\n\t\tstyler.ColourTo(pos - 1, SCE_RUST_LEXERROR);\n\telse\n\t\tstyler.ColourTo(pos - 1, SCE_RUST_NUMBER);\n}\n\nstatic bool IsOneCharOperator(int c) {\n\treturn c == ';' || c == ',' || c == '(' || c == ')'\n\t    || c == '{' || c == '}' || c == '[' || c == ']'\n\t    || c == '@' || c == '#' || c == '~' || c == '+'\n\t    || c == '*' || c == '/' || c == '^' || c == '%'\n\t    || c == '.' || c == ':' || c == '!' || c == '<'\n\t    || c == '>' || c == '=' || c == '-' || c == '&'\n\t    || c == '|' || c == '$' || c == '?';\n}\n\nstatic bool IsTwoCharOperator(int c, int n) {\n\treturn (c == '.' && n == '.') || (c == ':' && n == ':')\n\t    || (c == '!' && n == '=') || (c == '<' && n == '<')\n\t    || (c == '<' && n == '=') || (c == '>' && n == '>')\n\t    || (c == '>' && n == '=') || (c == '=' && n == '=')\n\t    || (c == '=' && n == '>') || (c == '-' && n == '>')\n\t    || (c == '&' && n == '&') || (c == '|' && n == '|')\n\t    || (c == '-' && n == '=') || (c == '&' && n == '=')\n\t    || (c == '|' && n == '=') || (c == '+' && n == '=')\n\t    || (c == '*' && n == '=') || (c == '/' && n == '=')\n\t    || (c == '^' && n == '=') || (c == '%' && n == '=');\n}\n\nstatic bool IsThreeCharOperator(int c, int n, int n2) {\n\treturn (c == '<' && n == '<' && n2 == '=')\n\t    || (c == '>' && n == '>' && n2 == '=');\n}\n\nstatic bool IsValidCharacterEscape(int c) {\n\treturn c == 'n'  || c == 'r' || c == 't' || c == '\\\\'\n\t    || c == '\\'' || c == '\"' || c == '0';\n}\n\nstatic bool IsValidStringEscape(int c) {\n\treturn IsValidCharacterEscape(c) || c == '\\n' || c == '\\r';\n}\n\nstatic bool ScanNumericEscape(Accessor &styler, Sci_Position& pos, Sci_Position num_digits, bool stop_asap) {\n\tfor (;;) {\n\t\tint c = styler.SafeGetCharAt(pos, '\\0');\n\t\tif (!IsADigit(c, 16))\n\t\t\tbreak;\n\t\tnum_digits--;\n\t\tpos++;\n\t\tif (num_digits == 0 && stop_asap)\n\t\t\treturn true;\n\t}\n\tif (num_digits == 0) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}\n\n/* This is overly permissive for character literals in order to accept UTF-8 encoded\n * character literals. */\nstatic void ScanCharacterLiteralOrLifetime(Accessor &styler, Sci_Position& pos, bool ascii_only) {\n\tpos++;\n\tint c = styler.SafeGetCharAt(pos, '\\0');\n\tint n = styler.SafeGetCharAt(pos + 1, '\\0');\n\tbool done = false;\n\tbool valid_lifetime = !ascii_only && IsIdentifierStart(c);\n\tbool valid_char = true;\n\tbool first = true;\n\twhile (!done) {\n\t\tswitch (c) {\n\t\t\tcase '\\\\':\n\t\t\t\tdone = true;\n\t\t\t\tif (IsValidCharacterEscape(n)) {\n\t\t\t\t\tpos += 2;\n\t\t\t\t} else if (n == 'x') {\n\t\t\t\t\tpos += 2;\n\t\t\t\t\tvalid_char = ScanNumericEscape(styler, pos, 2, false);\n\t\t\t\t} else if (n == 'u' && !ascii_only) {\n\t\t\t\t\tpos += 2;\n\t\t\t\t\tif (styler.SafeGetCharAt(pos, '\\0') != '{') {\n\t\t\t\t\t\t// old-style\n\t\t\t\t\t\tvalid_char = ScanNumericEscape(styler, pos, 4, false);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tint n_digits = 0;\n\t\t\t\t\t\twhile (IsADigit(styler.SafeGetCharAt(++pos, '\\0'), 16) && n_digits++ < 6) {\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (n_digits > 0 && styler.SafeGetCharAt(pos, '\\0') == '}')\n\t\t\t\t\t\t\tpos++;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tvalid_char = false;\n\t\t\t\t\t}\n\t\t\t\t} else if (n == 'U' && !ascii_only) {\n\t\t\t\t\tpos += 2;\n\t\t\t\t\tvalid_char = ScanNumericEscape(styler, pos, 8, false);\n\t\t\t\t} else {\n\t\t\t\t\tvalid_char = false;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase '\\'':\n\t\t\t\tvalid_char = !first;\n\t\t\t\tdone = true;\n\t\t\t\tbreak;\n\t\t\tcase '\\t':\n\t\t\tcase '\\n':\n\t\t\tcase '\\r':\n\t\t\tcase '\\0':\n\t\t\t\tvalid_char = false;\n\t\t\t\tdone = true;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tif (ascii_only && !IsASCII((char)c)) {\n\t\t\t\t\tdone = true;\n\t\t\t\t\tvalid_char = false;\n\t\t\t\t} else if (!IsIdentifierContinue(c) && !first) {\n\t\t\t\t\tdone = true;\n\t\t\t\t} else {\n\t\t\t\t\tpos++;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\tc = styler.SafeGetCharAt(pos, '\\0');\n\t\tn = styler.SafeGetCharAt(pos + 1, '\\0');\n\n\t\tfirst = false;\n\t}\n\tif (styler.SafeGetCharAt(pos, '\\0') == '\\'') {\n\t\tvalid_lifetime = false;\n\t} else {\n\t\tvalid_char = false;\n\t}\n\tif (valid_lifetime) {\n\t\tstyler.ColourTo(pos - 1, SCE_RUST_LIFETIME);\n\t} else if (valid_char) {\n\t\tpos++;\n\t\tstyler.ColourTo(pos - 1, ascii_only ? SCE_RUST_BYTECHARACTER : SCE_RUST_CHARACTER);\n\t} else {\n\t\tstyler.ColourTo(pos - 1, SCE_RUST_LEXERROR);\n\t}\n}\n\nenum CommentState {\n\tUnknownComment,\n\tDocComment,\n\tNotDocComment\n};\n\n/*\n * The rule for block-doc comments is as follows: /xxN and /x! (where x is an asterisk, N is a non-asterisk) start doc comments.\n * Otherwise it's a regular comment.\n */\nstatic void ResumeBlockComment(Accessor &styler, Sci_Position& pos, Sci_Position max, CommentState state, int level) {\n\tint c = styler.SafeGetCharAt(pos, '\\0');\n\tbool maybe_doc_comment = false;\n\tif (c == '*') {\n\t\tint n = styler.SafeGetCharAt(pos + 1, '\\0');\n\t\tif (n != '*' && n != '/') {\n\t\t\tmaybe_doc_comment = true;\n\t\t}\n\t} else if (c == '!') {\n\t\tmaybe_doc_comment = true;\n\t}\n\n\tfor (;;) {\n\t\tint n = styler.SafeGetCharAt(pos + 1, '\\0');\n\t\tif (pos == styler.LineEnd(styler.GetLine(pos)))\n\t\t\tstyler.SetLineState(styler.GetLine(pos), level);\n\t\tif (c == '*') {\n\t\t\tpos++;\n\t\t\tif (n == '/') {\n\t\t\t\tpos++;\n\t\t\t\tlevel--;\n\t\t\t\tif (level == 0) {\n\t\t\t\t\tstyler.SetLineState(styler.GetLine(pos), 0);\n\t\t\t\t\tif (state == DocComment || (state == UnknownComment && maybe_doc_comment))\n\t\t\t\t\t\tstyler.ColourTo(pos - 1, SCE_RUST_COMMENTBLOCKDOC);\n\t\t\t\t\telse\n\t\t\t\t\t\tstyler.ColourTo(pos - 1, SCE_RUST_COMMENTBLOCK);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (c == '/') {\n\t\t\tpos++;\n\t\t\tif (n == '*') {\n\t\t\t\tpos++;\n\t\t\t\tlevel++;\n\t\t\t}\n\t\t}\n\t\telse if (pos < max) {\n\t\t\tpos++;\n\t\t}\n\t\tif (pos >= max) {\n\t\t\tif (state == DocComment || (state == UnknownComment && maybe_doc_comment))\n\t\t\t\tstyler.ColourTo(pos - 1, SCE_RUST_COMMENTBLOCKDOC);\n\t\t\telse\n\t\t\t\tstyler.ColourTo(pos - 1, SCE_RUST_COMMENTBLOCK);\n\t\t\tbreak;\n\t\t}\n\t\tc = styler.SafeGetCharAt(pos, '\\0');\n\t}\n}\n\n/*\n * The rule for line-doc comments is as follows... ///N and //! (where N is a non slash) start doc comments.\n * Otherwise it's a normal line comment.\n */\nstatic void ResumeLineComment(Accessor &styler, Sci_Position& pos, Sci_Position max, CommentState state) {\n\tbool maybe_doc_comment = false;\n\tint c = styler.SafeGetCharAt(pos, '\\0');\n\tif (c == '/') {\n\t\tif (pos < max) {\n\t\t\tpos++;\n\t\t\tc = styler.SafeGetCharAt(pos, '\\0');\n\t\t\tif (c != '/') {\n\t\t\t\tmaybe_doc_comment = true;\n\t\t\t}\n\t\t}\n\t} else if (c == '!') {\n\t\tmaybe_doc_comment = true;\n\t}\n\n\tpos = styler.LineEnd(styler.GetLine(pos));\n\tstyler.SetLineState(styler.GetLine(pos), SCE_RUST_DEFAULT);\n\n\tif (state == DocComment || (state == UnknownComment && maybe_doc_comment))\n\t\tstyler.ColourTo(pos - 1, SCE_RUST_COMMENTLINEDOC);\n\telse\n\t\tstyler.ColourTo(pos - 1, SCE_RUST_COMMENTLINE);\n}\n\nstatic void ScanComments(Accessor &styler, Sci_Position& pos, Sci_Position max) {\n\tpos++;\n\tint c = styler.SafeGetCharAt(pos, '\\0');\n\tpos++;\n\tif (c == '/')\n\t\tResumeLineComment(styler, pos, max, UnknownComment);\n\telse if (c == '*')\n\t\tResumeBlockComment(styler, pos, max, UnknownComment, 1);\n}\n\nstatic void ResumeString(Accessor &styler, Sci_Position& pos, Sci_Position max, bool ascii_only) {\n\tint c = styler.SafeGetCharAt(pos, '\\0');\n\tbool error = false;\n\twhile (c != '\"' && !error) {\n\t\tif (pos >= max) {\n\t\t\terror = true;\n\t\t\tbreak;\n\t\t}\n\t\tif (pos == styler.LineEnd(styler.GetLine(pos)))\n\t\t\tstyler.SetLineState(styler.GetLine(pos), 0);\n\t\tif (c == '\\\\') {\n\t\t\tint n = styler.SafeGetCharAt(pos + 1, '\\0');\n\t\t\tif (IsValidStringEscape(n)) {\n\t\t\t\tpos += 2;\n\t\t\t} else if (n == 'x') {\n\t\t\t\tpos += 2;\n\t\t\t\terror = !ScanNumericEscape(styler, pos, 2, true);\n\t\t\t} else if (n == 'u' && !ascii_only) {\n\t\t\t\tpos += 2;\n\t\t\t\tif (styler.SafeGetCharAt(pos, '\\0') != '{') {\n\t\t\t\t\t// old-style\n\t\t\t\t\terror = !ScanNumericEscape(styler, pos, 4, true);\n\t\t\t\t} else {\n\t\t\t\t\tint n_digits = 0;\n\t\t\t\t\twhile (IsADigit(styler.SafeGetCharAt(++pos, '\\0'), 16) && n_digits++ < 6) {\n\t\t\t\t\t}\n\t\t\t\t\tif (n_digits > 0 && styler.SafeGetCharAt(pos, '\\0') == '}')\n\t\t\t\t\t\tpos++;\n\t\t\t\t\telse\n\t\t\t\t\t\terror = true;\n\t\t\t\t}\n\t\t\t} else if (n == 'U' && !ascii_only) {\n\t\t\t\tpos += 2;\n\t\t\t\terror = !ScanNumericEscape(styler, pos, 8, true);\n\t\t\t} else {\n\t\t\t\tpos += 1;\n\t\t\t\terror = true;\n\t\t\t}\n\t\t} else {\n\t\t\tif (ascii_only && !IsASCII((char)c))\n\t\t\t\terror = true;\n\t\t\telse\n\t\t\t\tpos++;\n\t\t}\n\t\tc = styler.SafeGetCharAt(pos, '\\0');\n\t}\n\tif (!error)\n\t\tpos++;\n\tstyler.ColourTo(pos - 1, ascii_only ? SCE_RUST_BYTESTRING : SCE_RUST_STRING);\n}\n\nstatic void ResumeRawString(Accessor &styler, Sci_Position& pos, Sci_Position max, int num_hashes, bool ascii_only) {\n\tfor (;;) {\n\t\tif (pos == styler.LineEnd(styler.GetLine(pos)))\n\t\t\tstyler.SetLineState(styler.GetLine(pos), num_hashes);\n\n\t\tint c = styler.SafeGetCharAt(pos, '\\0');\n\t\tif (c == '\"') {\n\t\t\tpos++;\n\t\t\tint trailing_num_hashes = 0;\n\t\t\twhile (styler.SafeGetCharAt(pos, '\\0') == '#' && trailing_num_hashes < num_hashes) {\n\t\t\t\ttrailing_num_hashes++;\n\t\t\t\tpos++;\n\t\t\t}\n\t\t\tif (trailing_num_hashes == num_hashes) {\n\t\t\t\tstyler.SetLineState(styler.GetLine(pos), 0);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} else if (pos >= max) {\n\t\t\tbreak;\n\t\t} else {\n\t\t\tif (ascii_only && !IsASCII((char)c))\n\t\t\t\tbreak;\n\t\t\tpos++;\n\t\t}\n\t}\n\tstyler.ColourTo(pos - 1, ascii_only ? SCE_RUST_BYTESTRINGR : SCE_RUST_STRINGR);\n}\n\nstatic void ScanRawString(Accessor &styler, Sci_Position& pos, Sci_Position max, bool ascii_only) {\n\tpos++;\n\tint num_hashes = 0;\n\twhile (styler.SafeGetCharAt(pos, '\\0') == '#') {\n\t\tnum_hashes++;\n\t\tpos++;\n\t}\n\tif (styler.SafeGetCharAt(pos, '\\0') != '\"') {\n\t\tstyler.ColourTo(pos - 1, SCE_RUST_LEXERROR);\n\t} else {\n\t\tpos++;\n\t\tResumeRawString(styler, pos, max, num_hashes, ascii_only);\n\t}\n}\n\nvoid SCI_METHOD LexerRust::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) {\n\tPropSetSimple props;\n\tAccessor styler(pAccess, &props);\n\tSci_Position pos = startPos;\n\tSci_Position max = pos + length;\n\n\tstyler.StartAt(pos);\n\tstyler.StartSegment(pos);\n\n\tif (initStyle == SCE_RUST_COMMENTBLOCK || initStyle == SCE_RUST_COMMENTBLOCKDOC) {\n\t\tResumeBlockComment(styler, pos, max, initStyle == SCE_RUST_COMMENTBLOCKDOC ? DocComment : NotDocComment, styler.GetLineState(styler.GetLine(pos) - 1));\n\t} else if (initStyle == SCE_RUST_COMMENTLINE || initStyle == SCE_RUST_COMMENTLINEDOC) {\n\t\tResumeLineComment(styler, pos, max, initStyle == SCE_RUST_COMMENTLINEDOC ? DocComment : NotDocComment);\n\t} else if (initStyle == SCE_RUST_STRING) {\n\t\tResumeString(styler, pos, max, false);\n\t} else if (initStyle == SCE_RUST_BYTESTRING) {\n\t\tResumeString(styler, pos, max, true);\n\t} else if (initStyle == SCE_RUST_STRINGR) {\n\t\tResumeRawString(styler, pos, max, styler.GetLineState(styler.GetLine(pos) - 1), false);\n\t} else if (initStyle == SCE_RUST_BYTESTRINGR) {\n\t\tResumeRawString(styler, pos, max, styler.GetLineState(styler.GetLine(pos) - 1), true);\n\t}\n\n\twhile (pos < max) {\n\t\tint c = styler.SafeGetCharAt(pos, '\\0');\n\t\tint n = styler.SafeGetCharAt(pos + 1, '\\0');\n\t\tint n2 = styler.SafeGetCharAt(pos + 2, '\\0');\n\n\t\tif (pos == 0 && c == '#' && n == '!' && n2 != '[') {\n\t\t\tpos += 2;\n\t\t\tResumeLineComment(styler, pos, max, NotDocComment);\n\t\t} else if (IsWhitespace(c)) {\n\t\t\tScanWhitespace(styler, pos, max);\n\t\t} else if (c == '/' && (n == '/' || n == '*')) {\n\t\t\tScanComments(styler, pos, max);\n\t\t} else if (c == 'r' && (n == '#' && IsIdentifierStart(n2))) {\n\t\t\tpos += 2;\n\t\t\tScanRawIdentifier(styler, pos);\n\t\t} else if (c == 'r' && (n == '#' || n == '\"')) {\n\t\t\tScanRawString(styler, pos, max, false);\n\t\t} else if (c == 'b' && n == 'r' && (n2 == '#' || n2 == '\"')) {\n\t\t\tpos++;\n\t\t\tScanRawString(styler, pos, max, true);\n\t\t} else if (c == 'b' && n == '\"') {\n\t\t\tpos += 2;\n\t\t\tResumeString(styler, pos, max, true);\n\t\t} else if (c == 'b' && n == '\\'') {\n\t\t\tpos++;\n\t\t\tScanCharacterLiteralOrLifetime(styler, pos, true);\n\t\t} else if (IsIdentifierStart(c)) {\n\t\t\tScanIdentifier(styler, pos, keywords);\n\t\t} else if (IsADigit(c)) {\n\t\t\tScanNumber(styler, pos);\n\t\t} else if (IsThreeCharOperator(c, n, n2)) {\n\t\t\tpos += 3;\n\t\t\tstyler.ColourTo(pos - 1, SCE_RUST_OPERATOR);\n\t\t} else if (IsTwoCharOperator(c, n)) {\n\t\t\tpos += 2;\n\t\t\tstyler.ColourTo(pos - 1, SCE_RUST_OPERATOR);\n\t\t} else if (IsOneCharOperator(c)) {\n\t\t\tpos++;\n\t\t\tstyler.ColourTo(pos - 1, SCE_RUST_OPERATOR);\n\t\t} else if (c == '\\'') {\n\t\t\tScanCharacterLiteralOrLifetime(styler, pos, false);\n\t\t} else if (c == '\"') {\n\t\t\tpos++;\n\t\t\tResumeString(styler, pos, max, false);\n\t\t} else {\n\t\t\tpos++;\n\t\t\tstyler.ColourTo(pos - 1, SCE_RUST_LEXERROR);\n\t\t}\n\t}\n\tstyler.ColourTo(pos - 1, SCE_RUST_DEFAULT);\n\tstyler.Flush();\n}\n\nvoid SCI_METHOD LexerRust::Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) {\n\n\tif (!options.fold)\n\t\treturn;\n\n\tLexAccessor styler(pAccess);\n\n\tSci_PositionU endPos = startPos + length;\n\tint visibleChars = 0;\n\tbool inLineComment = false;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tint levelCurrent = SC_FOLDLEVELBASE;\n\tif (lineCurrent > 0)\n\t\tlevelCurrent = styler.LevelAt(lineCurrent-1) >> 16;\n\tSci_PositionU lineStartNext = styler.LineStart(lineCurrent+1);\n\tint levelMinCurrent = levelCurrent;\n\tint levelNext = levelCurrent;\n\tchar chNext = styler[startPos];\n\tint styleNext = styler.StyleAt(startPos);\n\tint style = initStyle;\n\tconst bool userDefinedFoldMarkers = !options.foldExplicitStart.empty() && !options.foldExplicitEnd.empty();\n\tfor (Sci_PositionU i = startPos; i < endPos; i++) {\n\t\tchar ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\tint stylePrev = style;\n\t\tstyle = styleNext;\n\t\tstyleNext = styler.StyleAt(i + 1);\n\t\tbool atEOL = i == (lineStartNext-1);\n\t\tif ((style == SCE_RUST_COMMENTLINE) || (style == SCE_RUST_COMMENTLINEDOC))\n\t\t\tinLineComment = true;\n\t\tif (options.foldComment && options.foldCommentMultiline && IsStreamCommentStyle(style) && !inLineComment) {\n\t\t\tif (!IsStreamCommentStyle(stylePrev)) {\n\t\t\t\tlevelNext++;\n\t\t\t} else if (!IsStreamCommentStyle(styleNext) && !atEOL) {\n\t\t\t\t// Comments don't end at end of line and the next character may be unstyled.\n\t\t\t\tlevelNext--;\n\t\t\t}\n\t\t}\n\t\tif (options.foldComment && options.foldCommentExplicit && ((style == SCE_RUST_COMMENTLINE) || options.foldExplicitAnywhere)) {\n\t\t\tif (userDefinedFoldMarkers) {\n\t\t\t\tif (styler.Match(i, options.foldExplicitStart.c_str())) {\n\t\t\t\t\tlevelNext++;\n\t\t\t\t} else if (styler.Match(i, options.foldExplicitEnd.c_str())) {\n\t\t\t\t\tlevelNext--;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ((ch == '/') && (chNext == '/')) {\n\t\t\t\t\tchar chNext2 = styler.SafeGetCharAt(i + 2);\n\t\t\t\t\tif (chNext2 == '{') {\n\t\t\t\t\t\tlevelNext++;\n\t\t\t\t\t} else if (chNext2 == '}') {\n\t\t\t\t\t\tlevelNext--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (options.foldSyntaxBased && (style == SCE_RUST_OPERATOR)) {\n\t\t\tif (ch == '{') {\n\t\t\t\t// Measure the minimum before a '{' to allow\n\t\t\t\t// folding on \"} else {\"\n\t\t\t\tif (levelMinCurrent > levelNext) {\n\t\t\t\t\tlevelMinCurrent = levelNext;\n\t\t\t\t}\n\t\t\t\tlevelNext++;\n\t\t\t} else if (ch == '}') {\n\t\t\t\tlevelNext--;\n\t\t\t}\n\t\t}\n\t\tif (!IsASpace(ch))\n\t\t\tvisibleChars++;\n\t\tif (atEOL || (i == endPos-1)) {\n\t\t\tint levelUse = levelCurrent;\n\t\t\tif (options.foldSyntaxBased && options.foldAtElse) {\n\t\t\t\tlevelUse = levelMinCurrent;\n\t\t\t}\n\t\t\tint lev = levelUse | levelNext << 16;\n\t\t\tif (visibleChars == 0 && options.foldCompact)\n\t\t\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\t\t\tif (levelUse < levelNext)\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\tif (lev != styler.LevelAt(lineCurrent)) {\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\t\t\t}\n\t\t\tlineCurrent++;\n\t\t\tlineStartNext = styler.LineStart(lineCurrent+1);\n\t\t\tlevelCurrent = levelNext;\n\t\t\tlevelMinCurrent = levelCurrent;\n\t\t\tif (atEOL && (i == static_cast<Sci_PositionU>(styler.Length()-1))) {\n\t\t\t\t// There is an empty line at end of file so give it same level and empty\n\t\t\t\tstyler.SetLevel(lineCurrent, (levelCurrent | levelCurrent << 16) | SC_FOLDLEVELWHITEFLAG);\n\t\t\t}\n\t\t\tvisibleChars = 0;\n\t\t\tinLineComment = false;\n\t\t}\n\t}\n}\n\nLexerModule lmRust(SCLEX_RUST, LexerRust::LexerFactoryRust, \"rust\", rustWordLists);\n"
  },
  {
    "path": "lexilla/lexers/LexSAS.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexSAS.cxx\n ** Lexer for SAS\n **/\n// Author: Luke Rasmussen (luke.rasmussen@gmail.com)\n//\n// The License.txt file describes the conditions under which this software may\n// be distributed.\n//\n// Developed as part of the StatTag project at Northwestern University Feinberg\n// School of Medicine with funding from Northwestern University Clinical and\n// Translational Sciences Institute through CTSA grant UL1TR001422.  This work\n// has not been reviewed or endorsed by NCATS or the NIH.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nstatic void ColouriseSASDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[],\n    Accessor &styler) {\n\n    WordList &keywords = *keywordlists[0];\n    WordList &blockKeywords = *keywordlists[1];\n    WordList &functionKeywords = *keywordlists[2];\n    WordList &statements = *keywordlists[3];\n\n    CharacterSet setCouldBePostOp(CharacterSet::setNone, \"+-\");\n    CharacterSet setMacroStart(CharacterSet::setNone, \"%\");\n    CharacterSet setWordStart(CharacterSet::setAlpha, \"_\", 0x80, true);\n    CharacterSet setWord(CharacterSet::setAlphaNum, \"._\", 0x80, true);\n\n    StyleContext sc(startPos, length, initStyle, styler);\n    bool lineHasNonCommentChar = false;\n    for (; sc.More(); sc.Forward()) {\n        if (sc.atLineStart) {\n            lineHasNonCommentChar = false;\n        }\n\n        // Determine if the current state should terminate.\n        switch (sc.state) {\n            case SCE_SAS_OPERATOR:\n                sc.SetState(SCE_SAS_DEFAULT);\n                break;\n            case SCE_SAS_NUMBER:\n                // We accept almost anything because of hex. and number suffixes\n                if (!setWord.Contains(sc.ch)) {\n                    sc.SetState(SCE_SAS_DEFAULT);\n                }\n                break;\n            case SCE_SAS_MACRO:\n              if (!setWord.Contains(sc.ch) || (sc.ch == '.')) {\n                char s[1000];\n                sc.GetCurrentLowered(s, sizeof(s));\n                if (keywords.InList(s)) {\n                  sc.ChangeState(SCE_SAS_MACRO_KEYWORD);\n                }\n                else if (blockKeywords.InList(s)) {\n                  sc.ChangeState(SCE_SAS_BLOCK_KEYWORD);\n                }\n                else if (functionKeywords.InList(s)) {\n                  sc.ChangeState(SCE_SAS_MACRO_FUNCTION);\n                }\n                sc.SetState(SCE_SAS_DEFAULT);\n              }\n              break;\n            case SCE_SAS_IDENTIFIER:\n                if (!setWord.Contains(sc.ch) || (sc.ch == '.')) {\n                    char s[1000];\n                    sc.GetCurrentLowered(s, sizeof(s));\n                    if (statements.InList(s)) {\n                      sc.ChangeState(SCE_SAS_STATEMENT);\n                    }\n                    else if(blockKeywords.InList(s)) {\n                      sc.ChangeState(SCE_SAS_BLOCK_KEYWORD);\n                    }\n                    sc.SetState(SCE_SAS_DEFAULT);\n                }\n                break;\n            case SCE_SAS_COMMENTBLOCK:\n                if (sc.Match('*', '/')) {\n                    sc.Forward();\n                    sc.ForwardSetState(SCE_SAS_DEFAULT);\n                }\n                break;\n            case SCE_SAS_COMMENT:\n            case SCE_SAS_COMMENTLINE:\n                if (sc.Match(';')) {\n                    sc.Forward();\n                    sc.SetState(SCE_SAS_DEFAULT);\n                }\n                break;\n            case SCE_SAS_STRING:\n                if (sc.ch == '\\\"') {\n                    sc.ForwardSetState(SCE_SAS_DEFAULT);\n                }\n                break;\n        }\n\n        // Determine if a new state should be entered.\n        if (sc.state == SCE_SAS_DEFAULT) {\n            if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) {\n                lineHasNonCommentChar = true;\n                sc.SetState(SCE_SAS_NUMBER);\n            }\n            else if (setWordStart.Contains(sc.ch)) {\n                lineHasNonCommentChar = true;\n                sc.SetState(SCE_SAS_IDENTIFIER);\n            }\n            else if (sc.Match('*') && !lineHasNonCommentChar) {\n                sc.SetState(SCE_SAS_COMMENT);\n            }\n            else if (sc.Match('/', '*')) {\n                sc.SetState(SCE_SAS_COMMENTBLOCK);\n                sc.Forward();\t// Eat the * so it isn't used for the end of the comment\n            }\n            else if (sc.Match('/', '/')) {\n                sc.SetState(SCE_SAS_COMMENTLINE);\n            }\n            else if (sc.ch == '\\\"') {\n                lineHasNonCommentChar = true;\n                sc.SetState(SCE_SAS_STRING);\n            }\n            else if (setMacroStart.Contains(sc.ch)) {\n              lineHasNonCommentChar = true;\n              sc.SetState(SCE_SAS_MACRO);\n            }\n            else if (isoperator(static_cast<char>(sc.ch))) {\n                lineHasNonCommentChar = true;\n                sc.SetState(SCE_SAS_OPERATOR);\n            }\n        }\n    }\n\n    sc.Complete();\n}\n\n// Store both the current line's fold level and the next lines in the\n// level store to make it easy to pick up with each increment\n// and to make it possible to fiddle the current level for \"} else {\".\nstatic void FoldSASDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[],\n    Accessor &styler) {\n    bool foldCompact = styler.GetPropertyInt(\"fold.compact\", 1) != 0;\n    bool foldAtElse = styler.GetPropertyInt(\"fold.at.else\", 0) != 0;\n    Sci_PositionU endPos = startPos + length;\n    int visibleChars = 0;\n    Sci_Position lineCurrent = styler.GetLine(startPos);\n    int levelCurrent = SC_FOLDLEVELBASE;\n    if (lineCurrent > 0)\n        levelCurrent = styler.LevelAt(lineCurrent - 1) >> 16;\n    int levelMinCurrent = levelCurrent;\n    int levelNext = levelCurrent;\n    char chNext = styler[startPos];\n    int styleNext = styler.StyleAt(startPos);\n    for (Sci_PositionU i = startPos; i < endPos; i++) {\n        char ch = chNext;\n        chNext = styler.SafeGetCharAt(i + 1);\n        int style = styleNext;\n        styleNext = styler.StyleAt(i + 1);\n        bool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n        if (style == SCE_R_OPERATOR) {\n            if (ch == '{') {\n                // Measure the minimum before a '{' to allow\n                // folding on \"} else {\"\n                if (levelMinCurrent > levelNext) {\n                    levelMinCurrent = levelNext;\n                }\n                levelNext++;\n            }\n            else if (ch == '}') {\n                levelNext--;\n            }\n        }\n        if (atEOL) {\n            int levelUse = levelCurrent;\n            if (foldAtElse) {\n                levelUse = levelMinCurrent;\n            }\n            int lev = levelUse | levelNext << 16;\n            if (visibleChars == 0 && foldCompact)\n                lev |= SC_FOLDLEVELWHITEFLAG;\n            if (levelUse < levelNext)\n                lev |= SC_FOLDLEVELHEADERFLAG;\n            if (lev != styler.LevelAt(lineCurrent)) {\n                styler.SetLevel(lineCurrent, lev);\n            }\n            lineCurrent++;\n            levelCurrent = levelNext;\n            levelMinCurrent = levelCurrent;\n            visibleChars = 0;\n        }\n        if (!isspacechar(ch))\n            visibleChars++;\n    }\n}\n\n\nstatic const char * const SASWordLists[] = {\n    \"Language Keywords\",\n\t  \"Macro Keywords\",\n    \"Types\",\n    0,\n};\n\nLexerModule lmSAS(SCLEX_SAS, ColouriseSASDoc, \"sas\", FoldSASDoc, SASWordLists);\n"
  },
  {
    "path": "lexilla/lexers/LexSML.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexSML.cxx\n ** Lexer for SML.\n **/\n// Copyright 2009 by James Moffatt and Yuzhou Xin\n// Modified from LexCaml.cxx by Robert Roessler <robertr@rftp.com> Copyright 2005\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\n#if defined(__clang__)\n#pragma clang diagnostic ignored \"-Wcomma\"\n#endif\n\ninline int  issml(int c) {return isalnum(c) || c == '_';}\ninline int issmlf(int c) {return isalpha(c) || c == '_';}\ninline int issmld(int c) {return isdigit(c) || c == '_';}\n\n\nusing namespace Lexilla;\n\nstatic void ColouriseSMLDoc(\n\tSci_PositionU startPos, Sci_Position length,\n\tint initStyle,\n\tWordList *keywordlists[],\n\tAccessor &styler)\n{\n\tStyleContext sc(startPos, length, initStyle, styler);\n\tint nesting = 0;\n\tif (sc.state < SCE_SML_STRING)\n\t\tsc.state = SCE_SML_DEFAULT;\n\tif (sc.state >= SCE_SML_COMMENT)\n\t\tnesting = (sc.state & 0x0f) - SCE_SML_COMMENT;\n\n\tSci_PositionU chToken = 0;\n\tint chBase = 0, chLit = 0;\n\tWordList& keywords  = *keywordlists[0];\n\tWordList& keywords2 = *keywordlists[1];\n\tWordList& keywords3 = *keywordlists[2];\n\tconst int useMagic = styler.GetPropertyInt(\"lexer.caml.magic\", 0);\n\n\twhile (sc.More()) {\n\t\tint state2 = -1;\n\t\tSci_Position chColor = sc.currentPos - 1;\n\t\tbool advance = true;\n\n\t\tswitch (sc.state & 0x0f) {\n\t\tcase SCE_SML_DEFAULT:\n\t\t\tchToken = sc.currentPos;\n\t\t\tif (issmlf(sc.ch))\n\t\t\t\tstate2 = SCE_SML_IDENTIFIER;\n\t\t\telse if (sc.Match('`') && issmlf(sc.chNext))\n\t\t\t\tstate2 = SCE_SML_TAGNAME;\n\t\t\telse if (sc.Match('#')&&isdigit(sc.chNext))\n\t\t\t\t\tstate2 = SCE_SML_LINENUM;\n\t\t\telse if (sc.Match('#','\\\"')){\n\t\t\t\t\tstate2 = SCE_SML_CHAR,chLit = 0;\n\t\t\t\t\tsc.Forward();\n\n\t\t\t\t}\n\t\t\telse if (isdigit(sc.ch)) {\n\t\t\t\tstate2 = SCE_SML_NUMBER, chBase = 10;\n\t\t\t\tif (sc.Match('0') && strchr(\"xX\", sc.chNext))\n\t\t\t\t\tchBase = 16, sc.Forward();}\n\t\t\telse if (sc.Match('\\\"')&&sc.chPrev!='#')\n\t\t\t\tstate2 = SCE_SML_STRING;\n\t\t\telse if (sc.Match('(', '*')){\n\t\t\t\tstate2 = SCE_SML_COMMENT,\n\t\t\t\t\tsc.ch = ' ',\n\t\t\t\t\tsc.Forward();}\n\t\t\telse if (strchr(\"!~\"\n\t\t\t\t\t\"=<>@^+-*/\"\n\t\t\t\t\t\"()[];,:.#\", sc.ch))\n\t\t\t\tstate2 = SCE_SML_OPERATOR;\n\t\t\tbreak;\n\n\t\tcase SCE_SML_IDENTIFIER:\n\t\t\tif (!(issml(sc.ch) || sc.Match('\\''))) {\n\t\t\t\tconst Sci_Position n = sc.currentPos - chToken;\n\t\t\t\tif (n < 24) {\n\t\t\t\t\tchar t[24];\n\t\t\t\t\tfor (Sci_Position i = -n; i < 0; i++)\n\t\t\t\t\t\tt[n + i] = static_cast<char>(sc.GetRelative(i));\n\t\t\t\t\tt[n] = '\\0';\n\t\t\t\t\tif ((n == 1 && sc.chPrev == '_') || keywords.InList(t))\n\t\t\t\t\t\tsc.ChangeState(SCE_SML_KEYWORD);\n\t\t\t\t\telse if (keywords2.InList(t))\n\t\t\t\t\t\tsc.ChangeState(SCE_SML_KEYWORD2);\n\t\t\t\t\telse if (keywords3.InList(t))\n\t\t\t\t\t\tsc.ChangeState(SCE_SML_KEYWORD3);\n\t\t\t\t}\n\t\t\t\tstate2 = SCE_SML_DEFAULT, advance = false;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase SCE_SML_TAGNAME:\n\t\t\tif (!(issml(sc.ch) || sc.Match('\\'')))\n\t\t\t\tstate2 = SCE_SML_DEFAULT, advance = false;\n\t\t\tbreak;\n\n\t\tcase SCE_SML_LINENUM:\n\t\t\tif (!isdigit(sc.ch))\n\t\t\t\tstate2 = SCE_SML_DEFAULT, advance = false;\n\t\t\tbreak;\n\n\t\tcase SCE_SML_OPERATOR: {\n\t\t\tconst char* o = 0;\n\t\t\tif (issml(sc.ch) || isspace(sc.ch)\n\t\t\t\t|| (o = strchr(\")]};,\\'\\\"`#\", sc.ch),o)\n\t\t\t\t|| !strchr(\"!$%&*+-./:<=>?@^|~\", sc.ch)) {\n\t\t\t\tif (o && strchr(\")]};,\", sc.ch)) {\n\t\t\t\t\tif ((sc.Match(')') && sc.chPrev == '(')\n\t\t\t\t\t\t|| (sc.Match(']') && sc.chPrev == '['))\n\t\t\t\t\t\tsc.ChangeState(SCE_SML_KEYWORD);\n\t\t\t\t\tchColor++;\n\t\t\t\t} else\n\t\t\t\t\tadvance = false;\n\t\t\t\tstate2 = SCE_SML_DEFAULT;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t\tcase SCE_SML_NUMBER:\n\t\t\tif (issmld(sc.ch) || IsADigit(sc.ch, chBase))\n\t\t\t\tbreak;\n\t\t\tif ((sc.Match('l') || sc.Match('L') || sc.Match('n'))\n\t\t\t\t&& (issmld(sc.chPrev) || IsADigit(sc.chPrev, chBase)))\n\t\t\t\tbreak;\n\t\t\tif (chBase == 10) {\n\t\t\t\tif (sc.Match('.') && issmld(sc.chPrev))\n\t\t\t\t\tbreak;\n\t\t\t\tif ((sc.Match('e') || sc.Match('E'))\n\t\t\t\t\t&& (issmld(sc.chPrev) || sc.chPrev == '.'))\n\t\t\t\t\tbreak;\n\t\t\t\tif ((sc.Match('+') || sc.Match('-'))\n\t\t\t\t\t&& (sc.chPrev == 'e' || sc.chPrev == 'E'))\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tstate2 = SCE_SML_DEFAULT, advance = false;\n\t\t\tbreak;\n\n\t\tcase SCE_SML_CHAR:\n\t\t\tif (sc.Match('\\\\')) {\n\t\t\t\tchLit = 1;\n\t\t\t\tif (sc.chPrev == '\\\\')\n\t\t\t\t\tsc.ch = ' ';\n\t\t\t} else if ((sc.Match('\\\"') && sc.chPrev != '\\\\') || sc.atLineEnd) {\n\t\t\t\tstate2 = SCE_SML_DEFAULT;\n\t\t\t\tchLit = 1;\n\t\t\t\tif (sc.Match('\\\"'))\n\t\t\t\t\tchColor++;\n\t\t\t\telse\n\t\t\t\t\tsc.ChangeState(SCE_SML_IDENTIFIER);\n\t\t\t} else if (chLit < 1 && sc.currentPos - chToken >= 3)\n\t\t\t\tsc.ChangeState(SCE_SML_IDENTIFIER), advance = false;\n\t\t\tbreak;\n\n\t\tcase SCE_SML_STRING:\n\t\t\tif (sc.Match('\\\\') && sc.chPrev == '\\\\')\n\t\t\t\tsc.ch = ' ';\n\t\t\telse if (sc.Match('\\\"') && sc.chPrev != '\\\\')\n\t\t\t\tstate2 = SCE_SML_DEFAULT, chColor++;\n\t\t\tbreak;\n\n\t\tcase SCE_SML_COMMENT:\n\t\tcase SCE_SML_COMMENT1:\n\t\tcase SCE_SML_COMMENT2:\n\t\tcase SCE_SML_COMMENT3:\n\t\t\tif (sc.Match('(', '*'))\n\t\t\t\tstate2 = sc.state + 1, chToken = sc.currentPos,\n\t\t\t\t\tsc.ch = ' ',\n\t\t\t\t\tsc.Forward(), nesting++;\n\t\t\telse if (sc.Match(')') && sc.chPrev == '*') {\n\t\t\t\tif (nesting)\n\t\t\t\t\tstate2 = (sc.state & 0x0f) - 1, chToken = 0, nesting--;\n\t\t\t\telse\n\t\t\t\t\tstate2 = SCE_SML_DEFAULT;\n\t\t\t\tchColor++;\n\t\t\t} else if (useMagic && sc.currentPos - chToken == 4\n\t\t\t\t&& sc.Match('c') && sc.chPrev == 'r' && sc.GetRelative(-2) == '@')\n\t\t\t\tsc.state |= 0x10;\n\t\t\tbreak;\n\t\t}\n\n\t\tif (state2 >= 0)\n\t\t\tstyler.ColourTo(chColor, sc.state), sc.ChangeState(state2);\n\t\tif (advance)\n\t\t\tsc.Forward();\n\t}\n\n\tsc.Complete();\n}\n\nstatic void FoldSMLDoc(\n\tSci_PositionU, Sci_Position,\n\tint,\n\tWordList *[],\n\tAccessor &)\n{\n}\n\nstatic const char * const SMLWordListDesc[] = {\n\t\"Keywords\",\n\t\"Keywords2\",\n\t\"Keywords3\",\n\t0\n};\n\nLexerModule lmSML(SCLEX_SML, ColouriseSMLDoc, \"SML\", FoldSMLDoc, SMLWordListDesc);\n\n"
  },
  {
    "path": "lexilla/lexers/LexSQL.cxx",
    "content": "//-*- coding: utf-8 -*-\n// Scintilla source code edit control\n/** @file LexSQL.cxx\n ** Lexer for SQL, including PL/SQL and SQL*Plus.\n ** Improved by Jérôme LAFORGE <jerome.laforge_AT_gmail_DOT_com> from 2010 to 2012.\n **/\n// Copyright 1998-2012 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <cstdlib>\n#include <cassert>\n#include <cstring>\n#include <cctype>\n\n#include <string>\n#include <string_view>\n#include <vector>\n#include <map>\n#include <algorithm>\n#include <functional>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n#include \"OptionSet.h\"\n#include \"SparseState.h\"\n#include \"DefaultLexer.h\"\n\nusing namespace Scintilla;\nusing namespace Lexilla;\n\nnamespace {\n\nbool IsAWordChar(int ch, bool sqlAllowDottedWord) noexcept {\n\tif (!sqlAllowDottedWord)\n\t\treturn (ch < 0x80) && (isalnum(ch) || ch == '_');\n\telse\n\t\treturn (ch < 0x80) && (isalnum(ch) || ch == '_' || ch == '.');\n}\n\nbool IsAWordStart(int ch) noexcept {\n\treturn (ch < 0x80) && (isalpha(ch) || ch == '_');\n}\n\nbool IsADoxygenChar(int ch) noexcept {\n\treturn (islower(ch) || ch == '$' || ch == '@' ||\n\t        ch == '\\\\' || ch == '&' || ch == '<' ||\n\t        ch == '>' || ch == '#' || ch == '{' ||\n\t        ch == '}' || ch == '[' || ch == ']');\n}\n\nbool IsANumberChar(int ch, int chPrev) noexcept {\n\t// Not exactly following number definition (several dots are seen as OK, etc.)\n\t// but probably enough in most cases.\n\treturn (ch < 0x80) &&\n\t       (isdigit(ch) || toupper(ch) == 'E' ||\n\t        ch == '.' || ((ch == '-' || ch == '+') && chPrev < 0x80 && toupper(chPrev) == 'E'));\n}\n\ntypedef unsigned int sql_state_t;\n\nclass SQLStates {\npublic :\n\tvoid Set(Sci_Position lineNumber, unsigned short int sqlStatesLine) {\n\t\tsqlStatement.Set(lineNumber, sqlStatesLine);\n\t}\n\n\tsql_state_t IgnoreWhen (sql_state_t sqlStatesLine, bool enable) {\n\t\tif (enable)\n\t\t\tsqlStatesLine |= MASK_IGNORE_WHEN;\n\t\telse\n\t\t\tsqlStatesLine &= ~MASK_IGNORE_WHEN;\n\n\t\treturn sqlStatesLine;\n\t}\n\n\tsql_state_t IntoCondition (sql_state_t sqlStatesLine, bool enable) {\n\t\tif (enable)\n\t\t\tsqlStatesLine |= MASK_INTO_CONDITION;\n\t\telse\n\t\t\tsqlStatesLine &= ~MASK_INTO_CONDITION;\n\n\t\treturn sqlStatesLine;\n\t}\n\n\tsql_state_t IntoExceptionBlock (sql_state_t sqlStatesLine, bool enable) {\n\t\tif (enable)\n\t\t\tsqlStatesLine |= MASK_INTO_EXCEPTION;\n\t\telse\n\t\t\tsqlStatesLine &= ~MASK_INTO_EXCEPTION;\n\n\t\treturn sqlStatesLine;\n\t}\n\n\tsql_state_t IntoDeclareBlock (sql_state_t sqlStatesLine, bool enable) {\n\t\tif (enable)\n\t\t\tsqlStatesLine |= MASK_INTO_DECLARE;\n\t\telse\n\t\t\tsqlStatesLine &= ~MASK_INTO_DECLARE;\n\n\t\treturn sqlStatesLine;\n\t}\n\n\tsql_state_t IntoMergeStatement (sql_state_t sqlStatesLine, bool enable) {\n\t\tif (enable)\n\t\t\tsqlStatesLine |= MASK_MERGE_STATEMENT;\n\t\telse\n\t\t\tsqlStatesLine &= ~MASK_MERGE_STATEMENT;\n\n\t\treturn sqlStatesLine;\n\t}\n\n\tsql_state_t CaseMergeWithoutWhenFound (sql_state_t sqlStatesLine, bool found) {\n\t\tif (found)\n\t\t\tsqlStatesLine |= MASK_CASE_MERGE_WITHOUT_WHEN_FOUND;\n\t\telse\n\t\t\tsqlStatesLine &= ~MASK_CASE_MERGE_WITHOUT_WHEN_FOUND;\n\n\t\treturn sqlStatesLine;\n\t}\n\tsql_state_t IntoSelectStatementOrAssignment (sql_state_t sqlStatesLine, bool found) {\n\t\tif (found)\n\t\t\tsqlStatesLine |= MASK_INTO_SELECT_STATEMENT_OR_ASSIGNEMENT;\n\t\telse\n\t\t\tsqlStatesLine &= ~MASK_INTO_SELECT_STATEMENT_OR_ASSIGNEMENT;\n\t\treturn sqlStatesLine;\n\t}\n\n\tsql_state_t BeginCaseBlock (sql_state_t sqlStatesLine) {\n\t\tif ((sqlStatesLine & MASK_NESTED_CASES) < MASK_NESTED_CASES) {\n\t\t\tsqlStatesLine++;\n\t\t}\n\t\treturn sqlStatesLine;\n\t}\n\n\tsql_state_t EndCaseBlock (sql_state_t sqlStatesLine) {\n\t\tif ((sqlStatesLine & MASK_NESTED_CASES) > 0) {\n\t\t\tsqlStatesLine--;\n\t\t}\n\t\treturn sqlStatesLine;\n\t}\n\n\tsql_state_t IntoCreateStatement (sql_state_t sqlStatesLine, bool enable) {\n\t\tif (enable)\n\t\t\tsqlStatesLine |= MASK_INTO_CREATE;\n\t\telse\n\t\t\tsqlStatesLine &= ~MASK_INTO_CREATE;\n\n\t\treturn sqlStatesLine;\n\t}\n\n\tsql_state_t IntoCreateViewStatement (sql_state_t sqlStatesLine, bool enable) {\n\t\tif (enable)\n\t\t\tsqlStatesLine |= MASK_INTO_CREATE_VIEW;\n\t\telse\n\t\t\tsqlStatesLine &= ~MASK_INTO_CREATE_VIEW;\n\n\t\treturn sqlStatesLine;\n\t}\n\n\tsql_state_t IntoCreateViewAsStatement (sql_state_t sqlStatesLine, bool enable) {\n\t\tif (enable)\n\t\t\tsqlStatesLine |= MASK_INTO_CREATE_VIEW_AS_STATEMENT;\n\t\telse\n\t\t\tsqlStatesLine &= ~MASK_INTO_CREATE_VIEW_AS_STATEMENT;\n\n\t\treturn sqlStatesLine;\n\t}\n\n\tbool IsIgnoreWhen (sql_state_t sqlStatesLine) {\n\t\treturn (sqlStatesLine & MASK_IGNORE_WHEN) != 0;\n\t}\n\n\tbool IsIntoCondition (sql_state_t sqlStatesLine) {\n\t\treturn (sqlStatesLine & MASK_INTO_CONDITION) != 0;\n\t}\n\n\tbool IsIntoCaseBlock (sql_state_t sqlStatesLine) {\n\t\treturn (sqlStatesLine & MASK_NESTED_CASES) != 0;\n\t}\n\n\tbool IsIntoExceptionBlock (sql_state_t sqlStatesLine) {\n\t\treturn (sqlStatesLine & MASK_INTO_EXCEPTION) != 0;\n\t}\n\tbool IsIntoSelectStatementOrAssignment (sql_state_t sqlStatesLine) {\n\t\treturn (sqlStatesLine & MASK_INTO_SELECT_STATEMENT_OR_ASSIGNEMENT) != 0;\n\t}\n\tbool IsCaseMergeWithoutWhenFound (sql_state_t sqlStatesLine) {\n\t\treturn (sqlStatesLine & MASK_CASE_MERGE_WITHOUT_WHEN_FOUND) != 0;\n\t}\n\n\tbool IsIntoDeclareBlock (sql_state_t sqlStatesLine) {\n\t\treturn (sqlStatesLine & MASK_INTO_DECLARE) != 0;\n\t}\n\n\tbool IsIntoMergeStatement (sql_state_t sqlStatesLine) {\n\t\treturn (sqlStatesLine & MASK_MERGE_STATEMENT) != 0;\n\t}\n\n\tbool IsIntoCreateStatement (sql_state_t sqlStatesLine) {\n\t\treturn (sqlStatesLine & MASK_INTO_CREATE) != 0;\n\t}\n\n\tbool IsIntoCreateViewStatement (sql_state_t sqlStatesLine) {\n\t\treturn (sqlStatesLine & MASK_INTO_CREATE_VIEW) != 0;\n\t}\n\n\tbool IsIntoCreateViewAsStatement (sql_state_t sqlStatesLine) {\n\t\treturn (sqlStatesLine & MASK_INTO_CREATE_VIEW_AS_STATEMENT) != 0;\n\t}\n\n\tsql_state_t ForLine(Sci_Position lineNumber) {\n\t\treturn sqlStatement.ValueAt(lineNumber);\n\t}\n\n\tSQLStates() {}\n\nprivate :\n\tSparseState <sql_state_t> sqlStatement;\n\tenum {\n\t\tMASK_NESTED_CASES                         = 0x0001FF,\n\t\tMASK_INTO_SELECT_STATEMENT_OR_ASSIGNEMENT = 0x000200,\n\t\tMASK_CASE_MERGE_WITHOUT_WHEN_FOUND        = 0x000400,\n\t\tMASK_MERGE_STATEMENT                      = 0x000800,\n\t\tMASK_INTO_DECLARE                         = 0x001000,\n\t\tMASK_INTO_EXCEPTION                       = 0x002000,\n\t\tMASK_INTO_CONDITION                       = 0x004000,\n\t\tMASK_IGNORE_WHEN                          = 0x008000,\n\t\tMASK_INTO_CREATE                          = 0x010000,\n\t\tMASK_INTO_CREATE_VIEW                     = 0x020000,\n\t\tMASK_INTO_CREATE_VIEW_AS_STATEMENT        = 0x040000\n\t};\n};\n\n// Options used for LexerSQL\nstruct OptionsSQL {\n\tbool fold;\n\tbool foldAtElse;\n\tbool foldComment;\n\tbool foldCompact;\n\tbool foldOnlyBegin;\n\tbool sqlBackticksIdentifier;\n\tbool sqlNumbersignComment;\n\tbool sqlBackslashEscapes;\n\tbool sqlAllowDottedWord;\n\tOptionsSQL() {\n\t\tfold = false;\n\t\tfoldAtElse = false;\n\t\tfoldComment = false;\n\t\tfoldCompact = false;\n\t\tfoldOnlyBegin = false;\n\t\tsqlBackticksIdentifier = false;\n\t\tsqlNumbersignComment = false;\n\t\tsqlBackslashEscapes = false;\n\t\tsqlAllowDottedWord = false;\n\t}\n};\n\nconst char * const sqlWordListDesc[] = {\n\t\"Keywords\",\n\t\"Database Objects\",\n\t\"PLDoc\",\n\t\"SQL*Plus\",\n\t\"User Keywords 1\",\n\t\"User Keywords 2\",\n\t\"User Keywords 3\",\n\t\"User Keywords 4\",\n\tnullptr\n};\n\nstruct OptionSetSQL : public OptionSet<OptionsSQL> {\n\tOptionSetSQL() {\n\t\tDefineProperty(\"fold\", &OptionsSQL::fold);\n\n\t\tDefineProperty(\"fold.sql.at.else\", &OptionsSQL::foldAtElse,\n\t\t               \"This option enables SQL folding on a \\\"ELSE\\\" and \\\"ELSIF\\\" line of an IF statement.\");\n\n\t\tDefineProperty(\"fold.comment\", &OptionsSQL::foldComment);\n\n\t\tDefineProperty(\"fold.compact\", &OptionsSQL::foldCompact);\n\n\t\tDefineProperty(\"fold.sql.only.begin\", &OptionsSQL::foldOnlyBegin,\n\t\t               \"Set to 1 to only fold on 'begin' but not other keywords.\");\n\n\t\tDefineProperty(\"lexer.sql.backticks.identifier\", &OptionsSQL::sqlBackticksIdentifier,\n\t\t               \"Recognise backtick quoting of identifiers.\");\n\n\t\tDefineProperty(\"lexer.sql.numbersign.comment\", &OptionsSQL::sqlNumbersignComment,\n\t\t               \"If \\\"lexer.sql.numbersign.comment\\\" property is set to 0 a line beginning with '#' will not be a comment.\");\n\n\t\tDefineProperty(\"sql.backslash.escapes\", &OptionsSQL::sqlBackslashEscapes,\n\t\t               \"Enables backslash as an escape character in SQL.\");\n\n\t\tDefineProperty(\"lexer.sql.allow.dotted.word\", &OptionsSQL::sqlAllowDottedWord,\n\t\t               \"Set to 1 to colourise recognized words with dots \"\n\t\t               \"(recommended for Oracle PL/SQL objects).\");\n\n\t\tDefineWordListSets(sqlWordListDesc);\n\t}\n};\n\nclass LexerSQL : public DefaultLexer {\npublic :\n\tLexerSQL() : DefaultLexer(\"sql\", SCLEX_SQL) {}\n\n\tvirtual ~LexerSQL() {}\n\n\tint SCI_METHOD Version () const override {\n\t\treturn lvRelease5;\n\t}\n\n\tvoid SCI_METHOD Release() override {\n\t\tdelete this;\n\t}\n\n\tconst char * SCI_METHOD PropertyNames() override {\n\t\treturn osSQL.PropertyNames();\n\t}\n\n\tint SCI_METHOD PropertyType(const char *name) override {\n\t\treturn osSQL.PropertyType(name);\n\t}\n\n\tconst char * SCI_METHOD DescribeProperty(const char *name) override {\n\t\treturn osSQL.DescribeProperty(name);\n\t}\n\n\tSci_Position SCI_METHOD PropertySet(const char *key, const char *val) override {\n\t\tif (osSQL.PropertySet(&options, key, val)) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn -1;\n\t}\n\n\tconst char * SCI_METHOD PropertyGet(const char *key) override {\n\t\treturn osSQL.PropertyGet(key);\n\t}\n\n\tconst char * SCI_METHOD DescribeWordListSets() override {\n\t\treturn osSQL.DescribeWordListSets();\n\t}\n\n\tSci_Position SCI_METHOD WordListSet(int n, const char *wl) override;\n\tvoid SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;\n\tvoid SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;\n\n\tvoid * SCI_METHOD PrivateCall(int, void *) override {\n\t\treturn 0;\n\t}\n\n\tstatic ILexer5 *LexerFactorySQL() {\n\t\treturn new LexerSQL();\n\t}\nprivate:\n\tbool IsStreamCommentStyle(int style) {\n\t\treturn style == SCE_SQL_COMMENT ||\n\t\t       style == SCE_SQL_COMMENTDOC ||\n\t\t       style == SCE_SQL_COMMENTDOCKEYWORD ||\n\t\t       style == SCE_SQL_COMMENTDOCKEYWORDERROR;\n\t}\n\n\tbool IsCommentStyle (int style) {\n\t\tswitch (style) {\n\t\tcase SCE_SQL_COMMENT :\n\t\tcase SCE_SQL_COMMENTDOC :\n\t\tcase SCE_SQL_COMMENTLINE :\n\t\tcase SCE_SQL_COMMENTLINEDOC :\n\t\tcase SCE_SQL_COMMENTDOCKEYWORD :\n\t\tcase SCE_SQL_COMMENTDOCKEYWORDERROR :\n\t\t\treturn true;\n\t\tdefault :\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tbool IsCommentLine (Sci_Position line, LexAccessor &styler) {\n\t\tconst Sci_Position pos = styler.LineStart(line);\n\t\tconst Sci_Position eol_pos = styler.LineStart(line + 1) - 1;\n\t\tfor (Sci_Position i = pos; i + 1 < eol_pos; i++) {\n\t\t\tconst int style = styler.StyleAt(i);\n\t\t\t// MySQL needs -- comments to be followed by space or control char\n\t\t\tif (style == SCE_SQL_COMMENTLINE && styler.Match(i, \"--\"))\n\t\t\t\treturn true;\n\t\t\telse if (!IsASpaceOrTab(styler[i]))\n\t\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}\n\n\tOptionsSQL options;\n\tOptionSetSQL osSQL;\n\tSQLStates sqlStates;\n\n\tWordList keywords1;\n\tWordList keywords2;\n\tWordList kw_pldoc;\n\tWordList kw_sqlplus;\n\tWordList kw_user1;\n\tWordList kw_user2;\n\tWordList kw_user3;\n\tWordList kw_user4;\n};\n\nSci_Position SCI_METHOD LexerSQL::WordListSet(int n, const char *wl) {\n\tWordList *wordListN = 0;\n\tswitch (n) {\n\tcase 0:\n\t\twordListN = &keywords1;\n\t\tbreak;\n\tcase 1:\n\t\twordListN = &keywords2;\n\t\tbreak;\n\tcase 2:\n\t\twordListN = &kw_pldoc;\n\t\tbreak;\n\tcase 3:\n\t\twordListN = &kw_sqlplus;\n\t\tbreak;\n\tcase 4:\n\t\twordListN = &kw_user1;\n\t\tbreak;\n\tcase 5:\n\t\twordListN = &kw_user2;\n\t\tbreak;\n\tcase 6:\n\t\twordListN = &kw_user3;\n\t\tbreak;\n\tcase 7:\n\t\twordListN = &kw_user4;\n\t}\n\tSci_Position firstModification = -1;\n\tif (wordListN) {\n\t\tif (wordListN->Set(wl)) {\n\t\t\tfirstModification = 0;\n\t\t}\n\t}\n\treturn firstModification;\n}\n\nvoid SCI_METHOD LexerSQL::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) {\n\tLexAccessor styler(pAccess);\n\tStyleContext sc(startPos, length, initStyle, styler);\n\tint styleBeforeDCKeyword = SCE_SQL_DEFAULT;\n\n\tfor (; sc.More(); sc.Forward()) {\n\t\t// Determine if the current state should terminate.\n\t\tswitch (sc.state) {\n\t\tcase SCE_SQL_OPERATOR:\n\t\t\tsc.SetState(SCE_SQL_DEFAULT);\n\t\t\tbreak;\n\t\tcase SCE_SQL_NUMBER:\n\t\t\t// We stop the number definition on non-numerical non-dot non-eE non-sign char\n\t\t\tif (!IsANumberChar(sc.ch, sc.chPrev)) {\n\t\t\t\tsc.SetState(SCE_SQL_DEFAULT);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_SQL_IDENTIFIER:\n\t\t\tif (!IsAWordChar(sc.ch, options.sqlAllowDottedWord)) {\n\t\t\t\tint nextState = SCE_SQL_DEFAULT;\n\t\t\t\tchar s[1000];\n\t\t\t\tsc.GetCurrentLowered(s, sizeof(s));\n\t\t\t\tif (keywords1.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_SQL_WORD);\n\t\t\t\t} else if (keywords2.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_SQL_WORD2);\n\t\t\t\t} else if (kw_sqlplus.InListAbbreviated(s, '~')) {\n\t\t\t\t\tsc.ChangeState(SCE_SQL_SQLPLUS);\n\t\t\t\t\tif (strncmp(s, \"rem\", 3) == 0) {\n\t\t\t\t\t\tnextState = SCE_SQL_SQLPLUS_COMMENT;\n\t\t\t\t\t} else if (strncmp(s, \"pro\", 3) == 0) {\n\t\t\t\t\t\tnextState = SCE_SQL_SQLPLUS_PROMPT;\n\t\t\t\t\t}\n\t\t\t\t} else if (kw_user1.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_SQL_USER1);\n\t\t\t\t} else if (kw_user2.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_SQL_USER2);\n\t\t\t\t} else if (kw_user3.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_SQL_USER3);\n\t\t\t\t} else if (kw_user4.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_SQL_USER4);\n\t\t\t\t}\n\t\t\t\tsc.SetState(nextState);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_SQL_QUOTEDIDENTIFIER:\n\t\t\tif (sc.ch == 0x60) {\n\t\t\t\tif (sc.chNext == 0x60) {\n\t\t\t\t\tsc.Forward();\t// Ignore it\n\t\t\t\t} else {\n\t\t\t\t\tsc.ForwardSetState(SCE_SQL_DEFAULT);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_SQL_COMMENT:\n\t\t\tif (sc.Match('*', '/')) {\n\t\t\t\tsc.Forward();\n\t\t\t\tsc.ForwardSetState(SCE_SQL_DEFAULT);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_SQL_COMMENTDOC:\n\t\t\tif (sc.Match('*', '/')) {\n\t\t\t\tsc.Forward();\n\t\t\t\tsc.ForwardSetState(SCE_SQL_DEFAULT);\n\t\t\t} else if (sc.ch == '@' || sc.ch == '\\\\') { // Doxygen support\n\t\t\t\t// Verify that we have the conditions to mark a comment-doc-keyword\n\t\t\t\tif ((IsASpace(sc.chPrev) || sc.chPrev == '*') && (!IsASpace(sc.chNext))) {\n\t\t\t\t\tstyleBeforeDCKeyword = SCE_SQL_COMMENTDOC;\n\t\t\t\t\tsc.SetState(SCE_SQL_COMMENTDOCKEYWORD);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_SQL_COMMENTLINE:\n\t\tcase SCE_SQL_COMMENTLINEDOC:\n\t\tcase SCE_SQL_SQLPLUS_COMMENT:\n\t\tcase SCE_SQL_SQLPLUS_PROMPT:\n\t\t\tif (sc.atLineStart) {\n\t\t\t\tsc.SetState(SCE_SQL_DEFAULT);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_SQL_COMMENTDOCKEYWORD:\n\t\t\tif ((styleBeforeDCKeyword == SCE_SQL_COMMENTDOC) && sc.Match('*', '/')) {\n\t\t\t\tsc.ChangeState(SCE_SQL_COMMENTDOCKEYWORDERROR);\n\t\t\t\tsc.Forward();\n\t\t\t\tsc.ForwardSetState(SCE_SQL_DEFAULT);\n\t\t\t} else if (!IsADoxygenChar(sc.ch)) {\n\t\t\t\tchar s[100];\n\t\t\t\tsc.GetCurrentLowered(s, sizeof(s));\n\t\t\t\tif (!isspace(sc.ch) || !kw_pldoc.InList(s + 1)) {\n\t\t\t\t\tsc.ChangeState(SCE_SQL_COMMENTDOCKEYWORDERROR);\n\t\t\t\t}\n\t\t\t\tsc.SetState(styleBeforeDCKeyword);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_SQL_CHARACTER:\n\t\t\tif (options.sqlBackslashEscapes && sc.ch == '\\\\') {\n\t\t\t\tsc.Forward();\n\t\t\t} else if (sc.ch == '\\'') {\n\t\t\t\tif (sc.chNext == '\\'') {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t} else {\n\t\t\t\t\tsc.ForwardSetState(SCE_SQL_DEFAULT);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_SQL_STRING:\n\t\t\tif (options.sqlBackslashEscapes && sc.ch == '\\\\') {\n\t\t\t\t// Escape sequence\n\t\t\t\tsc.Forward();\n\t\t\t} else if (sc.ch == '\\\"') {\n\t\t\t\tif (sc.chNext == '\\\"') {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t} else {\n\t\t\t\t\tsc.ForwardSetState(SCE_SQL_DEFAULT);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SCE_SQL_QOPERATOR:\n\t\t\t// Locate the unique Q operator character\n\t\t\tsc.Complete();\n\t\t\tchar qOperator = 0x00;\n\t\t\tfor (Sci_Position styleStartPos = sc.currentPos; styleStartPos > 0; --styleStartPos) {\n\t\t\t\tif (styler.StyleAt(styleStartPos - 1) != SCE_SQL_QOPERATOR) {\n\t\t\t\t\tqOperator = styler.SafeGetCharAt(styleStartPos + 2);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tchar qComplement = 0x00;\n\n\t\t\tif (qOperator == '<') {\n\t\t\t\tqComplement = '>';\n\t\t\t} else if (qOperator == '(') {\n\t\t\t\tqComplement = ')';\n\t\t\t} else if (qOperator == '{') {\n\t\t\t\tqComplement = '}';\n\t\t\t} else if (qOperator == '[') {\n\t\t\t\tqComplement = ']';\n\t\t\t} else {\n\t\t\t\tqComplement = qOperator;\n\t\t\t}\n\n\t\t\tif (sc.Match(qComplement, '\\'')) {\n\t\t\t\tsc.Forward();\n\t\t\t\tsc.ForwardSetState(SCE_SQL_DEFAULT);\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t\t// Determine if a new state should be entered.\n\t\tif (sc.state == SCE_SQL_DEFAULT) {\n\t\t\tif (sc.Match('q', '\\'') || sc.Match('Q', '\\'')) {\n\t\t\t\tsc.SetState(SCE_SQL_QOPERATOR);\n\t\t\t\tsc.Forward();\n\t\t\t} else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext)) ||\n\t\t\t          ((sc.ch == '-' || sc.ch == '+') && IsADigit(sc.chNext) && !IsADigit(sc.chPrev))) {\n\t\t\t\tsc.SetState(SCE_SQL_NUMBER);\n\t\t\t} else if (IsAWordStart(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_SQL_IDENTIFIER);\n\t\t\t} else if (sc.ch == 0x60 && options.sqlBackticksIdentifier) {\n\t\t\t\tsc.SetState(SCE_SQL_QUOTEDIDENTIFIER);\n\t\t\t} else if (sc.Match('/', '*')) {\n\t\t\t\tif (sc.Match(\"/**\") || sc.Match(\"/*!\")) {\t// Support of Doxygen doc. style\n\t\t\t\t\tsc.SetState(SCE_SQL_COMMENTDOC);\n\t\t\t\t} else {\n\t\t\t\t\tsc.SetState(SCE_SQL_COMMENT);\n\t\t\t\t}\n\t\t\t\tsc.Forward();\t// Eat the * so it isn't used for the end of the comment\n\t\t\t} else if (sc.Match('-', '-')) {\n\t\t\t\t// MySQL requires a space or control char after --\n\t\t\t\t// http://dev.mysql.com/doc/mysql/en/ansi-diff-comments.html\n\t\t\t\t// Perhaps we should enforce that with proper property:\n\t\t\t\t//~ \t\t\t} else if (sc.Match(\"-- \")) {\n\t\t\t\tsc.SetState(SCE_SQL_COMMENTLINE);\n\t\t\t} else if (sc.ch == '#' && options.sqlNumbersignComment) {\n\t\t\t\tsc.SetState(SCE_SQL_COMMENTLINEDOC);\n\t\t\t} else if (sc.ch == '\\'') {\n\t\t\t\tsc.SetState(SCE_SQL_CHARACTER);\n\t\t\t} else if (sc.ch == '\\\"') {\n\t\t\t\tsc.SetState(SCE_SQL_STRING);\n\t\t\t} else if (isoperator(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_SQL_OPERATOR);\n\t\t\t}\n\t\t}\n\t}\n\tsc.Complete();\n}\n\nvoid SCI_METHOD LexerSQL::Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) {\n\tif (!options.fold)\n\t\treturn;\n\tLexAccessor styler(pAccess);\n\tSci_PositionU endPos = startPos + length;\n\tint visibleChars = 0;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tint levelCurrent = SC_FOLDLEVELBASE;\n\n\tif (lineCurrent > 0) {\n\t\t// Backtrack to previous line in case need to fix its fold status for folding block of single-line comments (i.e. '--').\n\t\tSci_Position lastNLPos = -1;\n\t\t// And keep going back until we find an operator ';' followed\n\t\t// by white-space and/or comments. This will improve folding.\n\t\twhile (--startPos > 0) {\n\t\t\tconst char ch = styler[startPos];\n\t\t\tif (ch == '\\n' || (ch == '\\r' && styler[startPos + 1] != '\\n')) {\n\t\t\t\tlastNLPos = startPos;\n\t\t\t} else if (ch == ';' &&\n\t\t\t\t   styler.StyleAt(startPos) == SCE_SQL_OPERATOR) {\n\t\t\t\tbool isAllClear = true;\n\t\t\t\tfor (Sci_Position tempPos = startPos + 1;\n\t\t\t\t     tempPos < lastNLPos;\n\t\t\t\t     ++tempPos) {\n\t\t\t\t\tconst int tempStyle = styler.StyleAt(tempPos);\n\t\t\t\t\tif (!IsCommentStyle(tempStyle)\n\t\t\t\t\t    && tempStyle != SCE_SQL_DEFAULT) {\n\t\t\t\t\t\tisAllClear = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (isAllClear) {\n\t\t\t\t\tstartPos = lastNLPos + 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tlineCurrent = styler.GetLine(startPos);\n\t\tif (lineCurrent > 0)\n\t\t\tlevelCurrent = styler.LevelAt(lineCurrent - 1) >> 16;\n\t}\n\t// And because folding ends at ';', keep going until we find one\n\t// Otherwise if create ... view ... as is split over multiple\n\t// lines the folding won't always update immediately.\n\tconst Sci_PositionU docLength = styler.Length();\n\tfor (; endPos < docLength; ++endPos) {\n\t\tif (styler.SafeGetCharAt(endPos) == ';') {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tint levelNext = levelCurrent;\n\tchar chNext = styler[startPos];\n\tint styleNext = styler.StyleAt(startPos);\n\tint style = initStyle;\n\tbool endFound = false;\n\tbool isUnfoldingIgnored = false;\n\t// this statementFound flag avoids to fold when the statement is on only one line by ignoring ELSE or ELSIF\n\t// eg. \"IF condition1 THEN ... ELSIF condition2 THEN ... ELSE ... END IF;\"\n\tbool statementFound = false;\n\tsql_state_t sqlStatesCurrentLine = 0;\n\tif (!options.foldOnlyBegin) {\n\t\tsqlStatesCurrentLine = sqlStates.ForLine(lineCurrent);\n\t}\n\tfor (Sci_PositionU i = startPos; i < endPos; i++) {\n\t\tconst char ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\tconst int stylePrev = style;\n\t\tstyle = styleNext;\n\t\tstyleNext = styler.StyleAt(i + 1);\n\t\tconst bool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n\t\tif (atEOL || (!IsCommentStyle(style) && ch == ';')) {\n\t\t\tif (endFound) {\n\t\t\t\t//Maybe this is the end of \"EXCEPTION\" BLOCK (eg. \"BEGIN ... EXCEPTION ... END;\")\n\t\t\t\tsqlStatesCurrentLine = sqlStates.IntoExceptionBlock(sqlStatesCurrentLine, false);\n\t\t\t}\n\t\t\t// set endFound and isUnfoldingIgnored to false if EOL is reached or ';' is found\n\t\t\tendFound = false;\n\t\t\tisUnfoldingIgnored = false;\n\t\t}\n\t\tif ((!IsCommentStyle(style) && ch == ';')) {\n\t\t\tif (sqlStates.IsIntoMergeStatement(sqlStatesCurrentLine)) {\n\t\t\t\t// This is the end of \"MERGE\" statement.\n\t\t\t\tif (!sqlStates.IsCaseMergeWithoutWhenFound(sqlStatesCurrentLine))\n\t\t\t\t\tlevelNext--;\n\t\t\t\tsqlStatesCurrentLine = sqlStates.IntoMergeStatement(sqlStatesCurrentLine, false);\n\t\t\t\tlevelNext--;\n\t\t\t}\n\t\t\tif (sqlStates.IsIntoSelectStatementOrAssignment(sqlStatesCurrentLine))\n\t\t\t\tsqlStatesCurrentLine = sqlStates.IntoSelectStatementOrAssignment(sqlStatesCurrentLine, false);\n\t\t\tif (sqlStates.IsIntoCreateStatement(sqlStatesCurrentLine)) {\n\t\t\t\tif (sqlStates.IsIntoCreateViewStatement(sqlStatesCurrentLine)) {\n\t\t\t\t\tif (sqlStates.IsIntoCreateViewAsStatement(sqlStatesCurrentLine)) {\n\t\t\t\t\t\tlevelNext--;\n\t\t\t\t\t\tsqlStatesCurrentLine = sqlStates.IntoCreateViewAsStatement(sqlStatesCurrentLine, false);\n\t\t\t\t\t}\n\t\t\t\t\tsqlStatesCurrentLine = sqlStates.IntoCreateViewStatement(sqlStatesCurrentLine, false);\n\t\t\t\t}\n\t\t\t\tsqlStatesCurrentLine = sqlStates.IntoCreateStatement(sqlStatesCurrentLine, false);\n\t\t\t}\n\t\t}\n\t\tif (ch == ':' && chNext == '=' && !IsCommentStyle(style))\n\t\t\tsqlStatesCurrentLine = sqlStates.IntoSelectStatementOrAssignment(sqlStatesCurrentLine, true);\n\n\t\tif (options.foldComment && IsStreamCommentStyle(style)) {\n\t\t\tif (!IsStreamCommentStyle(stylePrev)) {\n\t\t\t\tlevelNext++;\n\t\t\t} else if (!IsStreamCommentStyle(styleNext) && !atEOL) {\n\t\t\t\t// Comments don't end at end of line and the next character may be unstyled.\n\t\t\t\tlevelNext--;\n\t\t\t}\n\t\t}\n\t\tif (options.foldComment && (style == SCE_SQL_COMMENTLINE)) {\n\t\t\t// MySQL needs -- comments to be followed by space or control char\n\t\t\tif ((ch == '-') && (chNext == '-')) {\n\t\t\t\tconst char chNext2 = styler.SafeGetCharAt(i + 2);\n\t\t\t\tconst char chNext3 = styler.SafeGetCharAt(i + 3);\n\t\t\t\tif (chNext2 == '{' || chNext3 == '{') {\n\t\t\t\t\tlevelNext++;\n\t\t\t\t} else if (chNext2 == '}' || chNext3 == '}') {\n\t\t\t\t\tlevelNext--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Fold block of single-line comments (i.e. '--').\n\t\tif (options.foldComment && atEOL && IsCommentLine(lineCurrent, styler)) {\n\t\t\tif (!IsCommentLine(lineCurrent - 1, styler) && IsCommentLine(lineCurrent + 1, styler))\n\t\t\t\tlevelNext++;\n\t\t\telse if (IsCommentLine(lineCurrent - 1, styler) && !IsCommentLine(lineCurrent + 1, styler))\n\t\t\t\tlevelNext--;\n\t\t}\n\t\tif (style == SCE_SQL_OPERATOR) {\n\t\t\tif (ch == '(') {\n\t\t\t\tif (levelCurrent > levelNext)\n\t\t\t\t\tlevelCurrent--;\n\t\t\t\tlevelNext++;\n\t\t\t} else if (ch == ')') {\n\t\t\t\tlevelNext--;\n\t\t\t} else if ((!options.foldOnlyBegin) && ch == ';') {\n\t\t\t\tsqlStatesCurrentLine = sqlStates.IgnoreWhen(sqlStatesCurrentLine, false);\n\t\t\t}\n\t\t}\n\t\t// If new keyword (cannot trigger on elseif or nullif, does less tests)\n\t\tif (style == SCE_SQL_WORD && stylePrev != SCE_SQL_WORD) {\n\t\t\tconstexpr int MAX_KW_LEN = 9;\t// Maximum length of folding keywords\n\t\t\tchar s[MAX_KW_LEN + 2];\n\t\t\tunsigned int j = 0;\n\t\t\tfor (; j < MAX_KW_LEN + 1; j++) {\n\t\t\t\tif (!iswordchar(styler[i + j])) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\ts[j] = static_cast<char>(tolower(styler[i + j]));\n\t\t\t}\n\t\t\tif (j == MAX_KW_LEN + 1) {\n\t\t\t\t// Keyword too long, don't test it\n\t\t\t\ts[0] = '\\0';\n\t\t\t} else {\n\t\t\t\ts[j] = '\\0';\n\t\t\t}\n\t\t\tif (!options.foldOnlyBegin &&\n\t\t\t        strcmp(s, \"select\") == 0) {\n\t\t\t\tsqlStatesCurrentLine = sqlStates.IntoSelectStatementOrAssignment(sqlStatesCurrentLine, true);\n\t\t\t} else if (strcmp(s, \"if\") == 0) {\n\t\t\t\tif (endFound) {\n\t\t\t\t\tendFound = false;\n\t\t\t\t\tif (options.foldOnlyBegin && !isUnfoldingIgnored) {\n\t\t\t\t\t\t// this end isn't for begin block, but for if block (\"end if;\")\n\t\t\t\t\t\t// so ignore previous \"end\" by increment levelNext.\n\t\t\t\t\t\tlevelNext++;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (!options.foldOnlyBegin)\n\t\t\t\t\t\tsqlStatesCurrentLine = sqlStates.IntoCondition(sqlStatesCurrentLine, true);\n\t\t\t\t\tif (levelCurrent > levelNext) {\n\t\t\t\t\t\t// doesn't include this line into the folding block\n\t\t\t\t\t\t// because doesn't hide IF (eg \"END; IF\")\n\t\t\t\t\t\tlevelCurrent = levelNext;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (!options.foldOnlyBegin &&\n\t\t\t           strcmp(s, \"then\") == 0 &&\n\t\t\t           sqlStates.IsIntoCondition(sqlStatesCurrentLine)) {\n\t\t\t\tsqlStatesCurrentLine = sqlStates.IntoCondition(sqlStatesCurrentLine, false);\n\t\t\t\tif (!options.foldOnlyBegin) {\n\t\t\t\t\tif (levelCurrent > levelNext) {\n\t\t\t\t\t\tlevelCurrent = levelNext;\n\t\t\t\t\t}\n\t\t\t\t\tif (!statementFound)\n\t\t\t\t\t\tlevelNext++;\n\n\t\t\t\t\tstatementFound = true;\n\t\t\t\t} else if (levelCurrent > levelNext) {\n\t\t\t\t\t// doesn't include this line into the folding block\n\t\t\t\t\t// because doesn't hide LOOP or CASE (eg \"END; LOOP\" or \"END; CASE\")\n\t\t\t\t\tlevelCurrent = levelNext;\n\t\t\t\t}\n\t\t\t} else if (strcmp(s, \"loop\") == 0 ||\n\t\t\t           strcmp(s, \"case\") == 0) {\n\t\t\t\tif (endFound) {\n\t\t\t\t\tendFound = false;\n\t\t\t\t\tif (options.foldOnlyBegin && !isUnfoldingIgnored) {\n\t\t\t\t\t\t// this end isn't for begin block, but for loop block (\"end loop;\") or case block (\"end case;\")\n\t\t\t\t\t\t// so ignore previous \"end\" by increment levelNext.\n\t\t\t\t\t\tlevelNext++;\n\t\t\t\t\t}\n\t\t\t\t\tif ((!options.foldOnlyBegin) && strcmp(s, \"case\") == 0) {\n\t\t\t\t\t\tsqlStatesCurrentLine = sqlStates.EndCaseBlock(sqlStatesCurrentLine);\n\t\t\t\t\t\tif (!sqlStates.IsCaseMergeWithoutWhenFound(sqlStatesCurrentLine))\n\t\t\t\t\t\t\tlevelNext--; //again for the \"end case;\" and block when\n\t\t\t\t\t}\n\t\t\t\t} else if (!options.foldOnlyBegin) {\n\t\t\t\t\tif (strcmp(s, \"case\") == 0) {\n\t\t\t\t\t\tsqlStatesCurrentLine = sqlStates.BeginCaseBlock(sqlStatesCurrentLine);\n\t\t\t\t\t\tsqlStatesCurrentLine = sqlStates.CaseMergeWithoutWhenFound(sqlStatesCurrentLine, true);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (levelCurrent > levelNext)\n\t\t\t\t\t\tlevelCurrent = levelNext;\n\n\t\t\t\t\tif (!statementFound)\n\t\t\t\t\t\tlevelNext++;\n\n\t\t\t\t\tstatementFound = true;\n\t\t\t\t} else if (levelCurrent > levelNext) {\n\t\t\t\t\t// doesn't include this line into the folding block\n\t\t\t\t\t// because doesn't hide LOOP or CASE (eg \"END; LOOP\" or \"END; CASE\")\n\t\t\t\t\tlevelCurrent = levelNext;\n\t\t\t\t}\n\t\t\t} else if ((!options.foldOnlyBegin) && (\n\t\t\t               // folding for ELSE and ELSIF block only if foldAtElse is set\n\t\t\t               // and IF or CASE aren't on only one line with ELSE or ELSIF (with flag statementFound)\n\t\t\t               options.foldAtElse && !statementFound) && strcmp(s, \"elsif\") == 0) {\n\t\t\t\tsqlStatesCurrentLine = sqlStates.IntoCondition(sqlStatesCurrentLine, true);\n\t\t\t\tlevelCurrent--;\n\t\t\t\tlevelNext--;\n\t\t\t} else if ((!options.foldOnlyBegin) && (\n\t\t\t               // folding for ELSE and ELSIF block only if foldAtElse is set\n\t\t\t               // and IF or CASE aren't on only one line with ELSE or ELSIF (with flag statementFound)\n\t\t\t               options.foldAtElse && !statementFound) && strcmp(s, \"else\") == 0) {\n\t\t\t\t// prevent also ELSE is on the same line (eg. \"ELSE ... END IF;\")\n\t\t\t\tstatementFound = true;\n\t\t\t\tif (sqlStates.IsIntoCaseBlock(sqlStatesCurrentLine) && sqlStates.IsCaseMergeWithoutWhenFound(sqlStatesCurrentLine)) {\n\t\t\t\t\tsqlStatesCurrentLine = sqlStates.CaseMergeWithoutWhenFound(sqlStatesCurrentLine, false);\n\t\t\t\t\tlevelNext++;\n\t\t\t\t} else {\n\t\t\t\t\t// we are in same case \"} ELSE {\" in C language\n\t\t\t\t\tlevelCurrent--;\n\t\t\t\t}\n\t\t\t} else if (strcmp(s, \"begin\") == 0) {\n\t\t\t\tlevelNext++;\n\t\t\t\tsqlStatesCurrentLine = sqlStates.IntoDeclareBlock(sqlStatesCurrentLine, false);\n\t\t\t} else if ((strcmp(s, \"end\") == 0) ||\n\t\t\t           // SQL Anywhere permits IF ... ELSE ... ENDIF\n\t\t\t           // will only be active if \"endif\" appears in the\n\t\t\t           // keyword list.\n\t\t\t           (strcmp(s, \"endif\") == 0)) {\n\t\t\t\tendFound = true;\n\t\t\t\tlevelNext--;\n\t\t\t\tif (sqlStates.IsIntoSelectStatementOrAssignment(sqlStatesCurrentLine) && !sqlStates.IsCaseMergeWithoutWhenFound(sqlStatesCurrentLine))\n\t\t\t\t\tlevelNext--;\n\t\t\t\tif (levelNext < SC_FOLDLEVELBASE) {\n\t\t\t\t\tlevelNext = SC_FOLDLEVELBASE;\n\t\t\t\t\tisUnfoldingIgnored = true;\n\t\t\t\t}\n\t\t\t} else if ((!options.foldOnlyBegin) &&\n\t\t\t           strcmp(s, \"when\") == 0 &&\n\t\t\t           !sqlStates.IsIgnoreWhen(sqlStatesCurrentLine) &&\n\t\t\t           !sqlStates.IsIntoExceptionBlock(sqlStatesCurrentLine) && (\n\t\t\t               sqlStates.IsIntoCaseBlock(sqlStatesCurrentLine) ||\n\t\t\t               sqlStates.IsIntoMergeStatement(sqlStatesCurrentLine)\n\t\t\t               )\n\t\t\t           ) {\n\t\t\t\tsqlStatesCurrentLine = sqlStates.IntoCondition(sqlStatesCurrentLine, true);\n\n\t\t\t\t// Don't foldind when CASE and WHEN are on the same line (with flag statementFound) (eg. \"CASE selector WHEN expression1 THEN sequence_of_statements1;\\n\")\n\t\t\t\t// and same way for MERGE statement.\n\t\t\t\tif (!statementFound) {\n\t\t\t\t\tif (!sqlStates.IsCaseMergeWithoutWhenFound(sqlStatesCurrentLine)) {\n\t\t\t\t\t\tlevelCurrent--;\n\t\t\t\t\t\tlevelNext--;\n\t\t\t\t\t}\n\t\t\t\t\tsqlStatesCurrentLine = sqlStates.CaseMergeWithoutWhenFound(sqlStatesCurrentLine, false);\n\t\t\t\t}\n\t\t\t} else if ((!options.foldOnlyBegin) && strcmp(s, \"exit\") == 0) {\n\t\t\t\tsqlStatesCurrentLine = sqlStates.IgnoreWhen(sqlStatesCurrentLine, true);\n\t\t\t} else if ((!options.foldOnlyBegin) && !sqlStates.IsIntoDeclareBlock(sqlStatesCurrentLine) && strcmp(s, \"exception\") == 0) {\n\t\t\t\tsqlStatesCurrentLine = sqlStates.IntoExceptionBlock(sqlStatesCurrentLine, true);\n\t\t\t} else if ((!options.foldOnlyBegin) &&\n\t\t\t           (strcmp(s, \"declare\") == 0 ||\n\t\t\t            strcmp(s, \"function\") == 0 ||\n\t\t\t            strcmp(s, \"procedure\") == 0 ||\n\t\t\t            strcmp(s, \"package\") == 0)) {\n\t\t\t\tsqlStatesCurrentLine = sqlStates.IntoDeclareBlock(sqlStatesCurrentLine, true);\n\t\t\t} else if ((!options.foldOnlyBegin) &&\n\t\t\t           strcmp(s, \"merge\") == 0) {\n\t\t\t\tsqlStatesCurrentLine = sqlStates.IntoMergeStatement(sqlStatesCurrentLine, true);\n\t\t\t\tsqlStatesCurrentLine = sqlStates.CaseMergeWithoutWhenFound(sqlStatesCurrentLine, true);\n\t\t\t\tlevelNext++;\n\t\t\t\tstatementFound = true;\n\t\t\t} else if ((!options.foldOnlyBegin) &&\n\t\t\t\t   strcmp(s, \"create\") == 0) {\n\t\t\t\tsqlStatesCurrentLine = sqlStates.IntoCreateStatement(sqlStatesCurrentLine, true);\n\t\t\t} else if ((!options.foldOnlyBegin) &&\n\t\t\t\t   strcmp(s, \"view\") == 0 &&\n\t\t\t\t   sqlStates.IsIntoCreateStatement(sqlStatesCurrentLine)) {\n\t\t\t\tsqlStatesCurrentLine = sqlStates.IntoCreateViewStatement(sqlStatesCurrentLine, true);\n\t\t\t} else if ((!options.foldOnlyBegin) &&\n\t\t\t\t   strcmp(s, \"as\") == 0 &&\n\t\t\t\t   sqlStates.IsIntoCreateViewStatement(sqlStatesCurrentLine) &&\n\t\t\t\t   ! sqlStates.IsIntoCreateViewAsStatement(sqlStatesCurrentLine)) {\n\t\t\t\tsqlStatesCurrentLine = sqlStates.IntoCreateViewAsStatement(sqlStatesCurrentLine, true);\n\t\t\t\tlevelNext++;\n\t\t\t}\n\t\t}\n\t\tif (atEOL) {\n\t\t\tconst int levelUse = levelCurrent;\n\t\t\tint lev = levelUse | levelNext << 16;\n\t\t\tif (visibleChars == 0 && options.foldCompact)\n\t\t\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\t\t\tif (levelUse < levelNext)\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\tif (lev != styler.LevelAt(lineCurrent)) {\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\t\t\t}\n\t\t\tlineCurrent++;\n\t\t\tlevelCurrent = levelNext;\n\t\t\tvisibleChars = 0;\n\t\t\tstatementFound = false;\n\t\t\tif (!options.foldOnlyBegin)\n\t\t\t\tsqlStates.Set(lineCurrent, sqlStatesCurrentLine);\n\t\t}\n\t\tif (!isspacechar(ch)) {\n\t\t\tvisibleChars++;\n\t\t}\n\t}\n}\n\n}\n\nLexerModule lmSQL(SCLEX_SQL, LexerSQL::LexerFactorySQL, \"sql\", sqlWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexSTTXT.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexSTTXT.cxx\n ** Lexer for Structured Text language.\n ** Written by Pavel Bulochkin\n **/\n// The License.txt file describes the conditions under which this software may be distributed.\n\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nstatic void ClassifySTTXTWord(WordList *keywordlists[], StyleContext &sc)\n{\n\tchar s[256] = { 0 };\n\tsc.GetCurrentLowered(s, sizeof(s));\n\n \tif ((*keywordlists[0]).InList(s)) {\n \t\tsc.ChangeState(SCE_STTXT_KEYWORD);\n \t}\n\n\telse if ((*keywordlists[1]).InList(s)) {\n\t\tsc.ChangeState(SCE_STTXT_TYPE);\n\t}\n\n\telse if ((*keywordlists[2]).InList(s)) {\n\t\tsc.ChangeState(SCE_STTXT_FUNCTION);\n\t}\n\n\telse if ((*keywordlists[3]).InList(s)) {\n\t\tsc.ChangeState(SCE_STTXT_FB);\n\t}\n\n\telse if ((*keywordlists[4]).InList(s)) {\n\t\tsc.ChangeState(SCE_STTXT_VARS);\n\t}\n\n\telse if ((*keywordlists[5]).InList(s)) {\n\t\tsc.ChangeState(SCE_STTXT_PRAGMAS);\n\t}\n\n\tsc.SetState(SCE_STTXT_DEFAULT);\n}\n\nstatic void ColouriseSTTXTDoc (Sci_PositionU startPos, Sci_Position length, int initStyle,\n\t\t\t\t\t\t\t  WordList *keywordlists[], Accessor &styler)\n{\n\tStyleContext sc(startPos, length, initStyle, styler);\n\n\tCharacterSet setWord(CharacterSet::setAlphaNum, \"_\", 0x80, true);\n\tCharacterSet setWordStart(CharacterSet::setAlpha, \"_\", 0x80, true);\n\tCharacterSet setNumber(CharacterSet::setDigits, \"_.eE\");\n\tCharacterSet setHexNumber(CharacterSet::setDigits, \"_abcdefABCDEF\");\n\tCharacterSet setOperator(CharacterSet::setNone,\",.+-*/:;<=>[]()%&\");\n\tCharacterSet setDataTime(CharacterSet::setDigits,\"_.-:dmshDMSH\");\n\n \tfor ( ; sc.More() ; sc.Forward())\n \t{\n\t\tif(sc.atLineStart && sc.state != SCE_STTXT_COMMENT)\n\t\t\tsc.SetState(SCE_STTXT_DEFAULT);\n\n\t\tswitch(sc.state)\n\t\t{\n\t\t\tcase SCE_STTXT_NUMBER: {\n\t\t\t\tif(!setNumber.Contains(sc.ch))\n\t\t\t\t\tsc.SetState(SCE_STTXT_DEFAULT);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase SCE_STTXT_HEXNUMBER: {\n\t\t\t\tif (setHexNumber.Contains(sc.ch))\n\t\t\t\t\tcontinue;\n\t\t\t\telse if(setDataTime.Contains(sc.ch))\n\t\t\t\t\tsc.ChangeState(SCE_STTXT_DATETIME);\n\t\t\t\telse if(setWord.Contains(sc.ch))\n\t\t\t\t\tsc.ChangeState(SCE_STTXT_DEFAULT);\n\t\t\t\telse\n\t\t\t\t\tsc.SetState(SCE_STTXT_DEFAULT);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase SCE_STTXT_DATETIME: {\n\t\t\t\tif (setDataTime.Contains(sc.ch))\n\t\t\t\t\tcontinue;\n\t\t\t\telse if(setWord.Contains(sc.ch))\n\t\t\t\t\tsc.ChangeState(SCE_STTXT_DEFAULT);\n\t\t\t\telse\n\t\t\t\t\tsc.SetState(SCE_STTXT_DEFAULT);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase SCE_STTXT_OPERATOR: {\n\t\t\t\tsc.SetState(SCE_STTXT_DEFAULT);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase SCE_STTXT_PRAGMA: {\n\t\t\t\tif (sc.ch == '}')\n\t\t\t\t\tsc.ForwardSetState(SCE_STTXT_DEFAULT);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase SCE_STTXT_COMMENTLINE: {\n\t\t\t\tif (sc.atLineStart)\n\t\t\t\t\tsc.SetState(SCE_STTXT_DEFAULT);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase SCE_STTXT_COMMENT: {\n\t\t\t\tif(sc.Match('*',')'))\n\t\t\t\t{\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\tsc.ForwardSetState(SCE_STTXT_DEFAULT);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase SCE_STTXT_STRING1: {\n\t\t\t\tif(sc.atLineEnd)\n\t\t\t\t\tsc.SetState(SCE_STTXT_STRINGEOL);\n\t\t\t\telse if(sc.ch == '\\'' && sc.chPrev != '$')\n\t\t\t\t\tsc.ForwardSetState(SCE_STTXT_DEFAULT);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase SCE_STTXT_STRING2: {\n\t\t\t\tif (sc.atLineEnd)\n\t\t\t\t\tsc.SetState(SCE_STTXT_STRINGEOL);\n\t\t\t\telse if(sc.ch == '\\\"' && sc.chPrev != '$')\n\t\t\t\t\tsc.ForwardSetState(SCE_STTXT_DEFAULT);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase SCE_STTXT_STRINGEOL: {\n\t\t\t\tif(sc.atLineStart)\n\t\t\t\t\tsc.SetState(SCE_STTXT_DEFAULT);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase SCE_STTXT_CHARACTER: {\n\t\t\t\tif(setHexNumber.Contains(sc.ch))\n\t\t\t\t\tsc.SetState(SCE_STTXT_HEXNUMBER);\n\t\t\t\telse if(setDataTime.Contains(sc.ch))\n\t\t\t\t\tsc.SetState(SCE_STTXT_DATETIME);\n\t\t\t\telse sc.SetState(SCE_STTXT_DEFAULT);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase SCE_STTXT_IDENTIFIER: {\n\t\t\t\tif(!setWord.Contains(sc.ch))\n\t\t\t\t\tClassifySTTXTWord(keywordlists, sc);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif(sc.state == SCE_STTXT_DEFAULT)\n\t\t{\n\t\t\tif(IsADigit(sc.ch))\n\t\t\t\tsc.SetState(SCE_STTXT_NUMBER);\n\t\t\telse if (setWordStart.Contains(sc.ch))\n\t\t\t\tsc.SetState(SCE_STTXT_IDENTIFIER);\n\t\t\telse if (sc.Match('/', '/'))\n\t\t\t\tsc.SetState(SCE_STTXT_COMMENTLINE);\n\t\t\telse if(sc.Match('(', '*'))\n\t\t\t\tsc.SetState(SCE_STTXT_COMMENT);\n\t\t\telse if (sc.ch == '{')\n\t\t\t\tsc.SetState(SCE_STTXT_PRAGMA);\n\t\t\telse if (sc.ch == '\\'')\n\t\t\t\tsc.SetState(SCE_STTXT_STRING1);\n\t\t\telse if (sc.ch == '\\\"')\n\t\t\t\tsc.SetState(SCE_STTXT_STRING2);\n\t\t\telse if(sc.ch == '#')\n\t\t\t\tsc.SetState(SCE_STTXT_CHARACTER);\n\t\t\telse if (setOperator.Contains(sc.ch))\n\t\t\t\tsc.SetState(SCE_STTXT_OPERATOR);\n\t\t}\n \t}\n\n\tif (sc.state == SCE_STTXT_IDENTIFIER && setWord.Contains(sc.chPrev))\n\t\tClassifySTTXTWord(keywordlists, sc);\n\n\tsc.Complete();\n}\n\nstatic const char * const STTXTWordListDesc[] = {\n\t\"Keywords\",\n\t\"Types\",\n\t\"Functions\",\n\t\"FB\",\n\t\"Local_Var\",\n\t\"Local_Pragma\",\n\t0\n};\n\nstatic bool IsCommentLine(Sci_Position line, Accessor &styler, bool type)\n{\n\tSci_Position pos = styler.LineStart(line);\n\tSci_Position eolPos = styler.LineStart(line + 1) - 1;\n\n\tfor (Sci_Position i = pos; i < eolPos; i++)\n\t{\n\t\tchar ch = styler[i];\n\t\tchar chNext = styler.SafeGetCharAt(i + 1);\n\t\tint style = styler.StyleAt(i);\n\n\t\tif(type) {\n\t\t\t if (ch == '/' && chNext == '/' && style == SCE_STTXT_COMMENTLINE)\n\t\t\t\treturn true;\n\t\t}\n\t\telse if (ch == '(' && chNext == '*' && style == SCE_STTXT_COMMENT)\n\t\t\tbreak;\n\n\t\tif (!IsASpaceOrTab(ch))\n\t\t\treturn false;\n\t}\n\n\tfor (Sci_Position i = eolPos-2; i>pos; i--)\n\t{\n\t\tchar ch = styler[i];\n\t\tchar chPrev = styler.SafeGetCharAt(i-1);\n\t\tint style = styler.StyleAt(i);\n\n\t\tif(ch == ')' && chPrev == '*' && style == SCE_STTXT_COMMENT)\n\t\t\treturn true;\n\t\tif(!IsASpaceOrTab(ch))\n\t\t\treturn false;\n\t}\n\n\treturn false;\n}\n\nstatic bool IsPragmaLine(Sci_Position line, Accessor &styler)\n{\n\tSci_Position pos = styler.LineStart(line);\n\tSci_Position eolPos = styler.LineStart(line+1) - 1;\n\n\tfor (Sci_Position i = pos ; i < eolPos ; i++)\n\t{\n\t\tchar ch = styler[i];\n\t\tint style = styler.StyleAt(i);\n\n\t\tif(ch == '{' && style == SCE_STTXT_PRAGMA)\n\t\t\treturn true;\n\t\telse if (!IsASpaceOrTab(ch))\n\t\t\treturn false;\n\t}\n\treturn false;\n}\n\nstatic void GetRangeUpper(Sci_PositionU start,Sci_PositionU end,Accessor &styler,char *s,Sci_PositionU len)\n{\n\tSci_PositionU i = 0;\n\twhile ((i < end - start + 1) && (i < len-1)) {\n\t\ts[i] = static_cast<char>(toupper(styler[start + i]));\n\t\ti++;\n\t}\n\ts[i] = '\\0';\n}\n\nstatic void ClassifySTTXTWordFoldPoint(int &levelCurrent,Sci_PositionU lastStart,\n\t\t\t\t\t\t\t\t\t Sci_PositionU currentPos, Accessor &styler)\n{\n\tchar s[256];\n\tGetRangeUpper(lastStart, currentPos, styler, s, sizeof(s));\n\n\t// See Table C.2 - Keywords\n\tif (!strcmp(s, \"ACTION\") ||\n\t\t!strcmp(s, \"CASE\") ||\n\t\t!strcmp(s, \"CONFIGURATION\") ||\n\t\t!strcmp(s, \"FOR\") ||\n\t\t!strcmp(s, \"FUNCTION\") ||\n\t\t!strcmp(s, \"FUNCTION_BLOCK\") ||\n\t\t!strcmp(s, \"IF\") ||\n\t\t!strcmp(s, \"INITIAL_STEP\") ||\n\t\t!strcmp(s, \"REPEAT\") ||\n\t\t!strcmp(s, \"RESOURCE\") ||\n\t\t!strcmp(s, \"STEP\") ||\n\t\t!strcmp(s, \"STRUCT\") ||\n\t\t!strcmp(s, \"TRANSITION\") ||\n\t\t!strcmp(s, \"TYPE\") ||\n\t\t!strcmp(s, \"VAR\") ||\n\t\t!strcmp(s, \"VAR_INPUT\") ||\n\t\t!strcmp(s, \"VAR_OUTPUT\") ||\n\t\t!strcmp(s, \"VAR_IN_OUT\") ||\n\t\t!strcmp(s, \"VAR_TEMP\") ||\n\t\t!strcmp(s, \"VAR_EXTERNAL\") ||\n\t\t!strcmp(s, \"VAR_ACCESS\") ||\n\t\t!strcmp(s, \"VAR_CONFIG\") ||\n\t\t!strcmp(s, \"VAR_GLOBAL\") ||\n\t\t!strcmp(s, \"WHILE\"))\n\t{\n\t\tlevelCurrent++;\n\t}\n\telse if (!strcmp(s, \"END_ACTION\") ||\n\t\t!strcmp(s, \"END_CASE\") ||\n\t\t!strcmp(s, \"END_CONFIGURATION\") ||\n\t\t!strcmp(s, \"END_FOR\") ||\n\t\t!strcmp(s, \"END_FUNCTION\") ||\n\t\t!strcmp(s, \"END_FUNCTION_BLOCK\") ||\n\t\t!strcmp(s, \"END_IF\") ||\n\t\t!strcmp(s, \"END_REPEAT\") ||\n\t\t!strcmp(s, \"END_RESOURCE\") ||\n\t\t!strcmp(s, \"END_STEP\") ||\n\t\t!strcmp(s, \"END_STRUCT\") ||\n\t\t!strcmp(s, \"END_TRANSITION\") ||\n\t\t!strcmp(s, \"END_TYPE\") ||\n\t\t!strcmp(s, \"END_VAR\") ||\n\t\t!strcmp(s, \"END_WHILE\"))\n\t{\n\t\tlevelCurrent--;\n\t\tif (levelCurrent < SC_FOLDLEVELBASE) {\n\t\t\tlevelCurrent = SC_FOLDLEVELBASE;\n\t\t}\n\t}\n}\n\nstatic void FoldSTTXTDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *[],Accessor &styler)\n{\n\tbool foldComment = styler.GetPropertyInt(\"fold.comment\") != 0;\n\tbool foldPreprocessor = styler.GetPropertyInt(\"fold.preprocessor\") != 0;\n\tbool foldCompact = styler.GetPropertyInt(\"fold.compact\", 1) != 0;\n\tSci_PositionU endPos = startPos + length;\n\tint visibleChars = 0;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tint levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK;\n\tint levelCurrent = levelPrev;\n\tchar chNext = styler[startPos];\n\tint styleNext = styler.StyleAt(startPos);\n\tint style = initStyle;\n\tSci_Position lastStart = 0;\n\n\tCharacterSet setWord(CharacterSet::setAlphaNum, \"_\", 0x80, true);\n\n\tfor (Sci_PositionU i = startPos; i < endPos; i++)\n\t{\n\t\tchar ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\tint stylePrev = style;\n\t\tstyle = styleNext;\n\t\tstyleNext = styler.StyleAt(i + 1);\n\t\tbool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n\n\t\tif (foldComment && style == SCE_STTXT_COMMENT) {\n\t\t\tif(stylePrev != SCE_STTXT_COMMENT)\n\t\t\t\tlevelCurrent++;\n\t\t\telse if(styleNext != SCE_STTXT_COMMENT && !atEOL)\n\t\t\t\tlevelCurrent--;\n\t\t}\n\t\tif ( foldComment && atEOL && ( IsCommentLine(lineCurrent, styler,false)\n\t\t\t|| IsCommentLine(lineCurrent,styler,true))) {\n \t\t\tif(!IsCommentLine(lineCurrent-1, styler,true) && IsCommentLine(lineCurrent+1, styler,true))\n\t\t\t\tlevelCurrent++;\n\t\t\tif (IsCommentLine(lineCurrent-1, styler,true) && !IsCommentLine(lineCurrent+1, styler,true))\n\t\t\t\tlevelCurrent--;\n\t\t\tif (!IsCommentLine(lineCurrent-1, styler,false) && IsCommentLine(lineCurrent+1, styler,false))\n\t\t\t\tlevelCurrent++;\n\t\t\tif (IsCommentLine(lineCurrent-1, styler,false) && !IsCommentLine(lineCurrent+1, styler,false))\n\t\t\t\tlevelCurrent--;\n\t\t}\n\t\tif(foldPreprocessor && atEOL && IsPragmaLine(lineCurrent, styler)) {\n\t\t\tif(!IsPragmaLine(lineCurrent-1, styler) && IsPragmaLine(lineCurrent+1, styler ))\n\t\t\t\tlevelCurrent++;\n\t\t\telse if(IsPragmaLine(lineCurrent-1, styler) && !IsPragmaLine(lineCurrent+1, styler))\n\t\t\t\tlevelCurrent--;\n\t\t}\n\t\tif (stylePrev != SCE_STTXT_KEYWORD && style == SCE_STTXT_KEYWORD) {\n\t\t\t\tlastStart = i;\n\t\t}\n\t\tif(stylePrev == SCE_STTXT_KEYWORD) {\n\t\t\tif(setWord.Contains(ch) && !setWord.Contains(chNext))\n\t\t\t\tClassifySTTXTWordFoldPoint(levelCurrent,lastStart, i, styler);\n\t\t}\n\t\tif (!IsASpace(ch)) {\n\t\t\tvisibleChars++;\n\t\t}\n\t\tif (atEOL) {\n\t\t\tint lev = levelPrev;\n\t\t\tif (visibleChars == 0 && foldCompact)\n\t\t\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\t\t\tif ((levelCurrent > levelPrev) && (visibleChars > 0))\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\tif (lev != styler.LevelAt(lineCurrent))\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\n\t\t\tlineCurrent++;\n\t\t\tlevelPrev = levelCurrent;\n\t\t\tvisibleChars = 0;\n\t\t}\n\n\t\t// If we didn't reach the EOL in previous loop, store line level and whitespace information.\n\t\t// The rest will be filled in later...\n\t\tint lev = levelPrev;\n\t\tif (visibleChars == 0 && foldCompact)\n\t\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\t\tstyler.SetLevel(lineCurrent, lev);\n\t}\n}\n\nLexerModule lmSTTXT(SCLEX_STTXT, ColouriseSTTXTDoc, \"fcST\", FoldSTTXTDoc, STTXTWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexScriptol.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexScriptol.cxx\n ** Lexer for Scriptol.\n **/\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nstatic void ClassifyWordSol(Sci_PositionU start, Sci_PositionU end, WordList &keywords, Accessor &styler, char *prevWord)\n{\n    char s[100] = \"\";\n    bool wordIsNumber = isdigit(styler[start]) != 0;\n    for (Sci_PositionU i = 0; i < end - start + 1 && i < 30; i++)\n     {\n           s[i] = styler[start + i];\n           s[i + 1] = '\\0';\n     }\n    char chAttr = SCE_SCRIPTOL_IDENTIFIER;\n    if (0 == strcmp(prevWord, \"class\"))       chAttr = SCE_SCRIPTOL_CLASSNAME;\n    else if (wordIsNumber)                    chAttr = SCE_SCRIPTOL_NUMBER;\n    else if (keywords.InList(s))              chAttr = SCE_SCRIPTOL_KEYWORD;\n    else for (Sci_PositionU i = 0; i < end - start + 1; i++)  // test dotted idents\n    {\n        if (styler[start + i] == '.')\n        {\n            styler.ColourTo(start + i - 1, chAttr);\n            styler.ColourTo(start + i, SCE_SCRIPTOL_OPERATOR);\n        }\n    }\n    styler.ColourTo(end, chAttr);\n    strcpy(prevWord, s);\n}\n\nstatic bool IsSolComment(Accessor &styler, Sci_Position pos, Sci_Position len)\n{\n   if(len > 0)\n   {\n     char c = styler[pos];\n     if(c == '`') return true;\n     if(len > 1)\n     {\n        if(c == '/')\n        {\n          c = styler[pos + 1];\n          if(c == '/') return true;\n          if(c == '*') return true;\n        }\n     }\n   }\n   return false;\n}\n\nstatic bool IsSolStringStart(char ch)\n{\n    if (ch == '\\'' || ch == '\"')  return true;\n    return false;\n}\n\nstatic bool IsSolWordStart(char ch)\n{\n    return (iswordchar(ch) && !IsSolStringStart(ch));\n}\n\n\nstatic int GetSolStringState(Accessor &styler, Sci_Position i, Sci_Position *nextIndex)\n{\n\tchar ch = styler.SafeGetCharAt(i);\n\tchar chNext = styler.SafeGetCharAt(i + 1);\n\n        if (ch != '\\\"' && ch != '\\'')\n        {\n            *nextIndex = i + 1;\n            return SCE_SCRIPTOL_DEFAULT;\n\t}\n        // ch is either single or double quotes in string\n        // code below seem non-sense but is here for future extensions\n\tif (ch == chNext && ch == styler.SafeGetCharAt(i + 2))\n        {\n          *nextIndex = i + 3;\n          if(ch == '\\\"') return SCE_SCRIPTOL_TRIPLE;\n          if(ch == '\\'') return SCE_SCRIPTOL_TRIPLE;\n          return SCE_SCRIPTOL_STRING;\n\t}\n        else\n        {\n          *nextIndex = i + 1;\n          if (ch == '\"') return SCE_SCRIPTOL_STRING;\n          else           return SCE_SCRIPTOL_STRING;\n\t}\n}\n\n\nstatic void ColouriseSolDoc(Sci_PositionU startPos, Sci_Position length, int initStyle,\n                            WordList *keywordlists[], Accessor &styler)\n {\n\n\tSci_Position lengthDoc = startPos + length;\n        char stringType = '\\\"';\n\n\tif (startPos > 0)\n        {\n            Sci_Position lineCurrent = styler.GetLine(startPos);\n            if (lineCurrent > 0)\n            {\n              startPos = styler.LineStart(lineCurrent-1);\n              if (startPos == 0) initStyle = SCE_SCRIPTOL_DEFAULT;\n              else               initStyle = styler.StyleAt(startPos-1);\n            }\n\t}\n\n\tstyler.StartAt(startPos);\n\n\tWordList &keywords = *keywordlists[0];\n\n\tchar prevWord[200];\n\tprevWord[0] = '\\0';\n        if (length == 0)  return;\n\n\tint state = initStyle & 31;\n\n\tSci_Position nextIndex = 0;\n        char chPrev  = ' ';\n        char chPrev2 = ' ';\n        char chNext  = styler[startPos];\n\tstyler.StartSegment(startPos);\n\tfor (Sci_Position i = startPos; i < lengthDoc; i++)\n        {\n\n       char ch = chNext;\n       chNext = styler.SafeGetCharAt(i + 1);\n\n       if ((ch == '\\r' && chNext != '\\n') || (ch == '\\n') || (i == lengthDoc))\n       {\n          if ((state == SCE_SCRIPTOL_DEFAULT) ||\n              (state == SCE_SCRIPTOL_TRIPLE) ||\n              (state == SCE_SCRIPTOL_COMMENTBLOCK))\n          {\n              styler.ColourTo(i, state);\n          }\n        }\n\n        if (styler.IsLeadByte(ch))\n         {\n             chNext = styler.SafeGetCharAt(i + 2);\n             chPrev  = ' ';\n             chPrev2 = ' ';\n             i += 1;\n             continue;\n         }\n\n        if (state == SCE_SCRIPTOL_STRINGEOL)\n         {\n             if (ch != '\\r' && ch != '\\n')\n             {\n                    styler.ColourTo(i - 1, state);\n                    state = SCE_SCRIPTOL_DEFAULT;\n             }\n         }\n\n        if (state == SCE_SCRIPTOL_DEFAULT)\n         {\n            if (IsSolWordStart(ch))\n            {\n                 styler.ColourTo(i - 1, state);\n                 state = SCE_SCRIPTOL_KEYWORD;\n            }\n            else if (ch == '`')\n            {\n                styler.ColourTo(i - 1, state);\n                state = SCE_SCRIPTOL_COMMENTLINE;\n            }\n            else if (ch == '/')\n            {\n                styler.ColourTo(i - 1, state);\n                if(chNext == '/') state = SCE_SCRIPTOL_CSTYLE;\n                if(chNext == '*') state = SCE_SCRIPTOL_COMMENTBLOCK;\n            }\n\n            else if (IsSolStringStart(ch))\n            {\n               styler.ColourTo(i - 1, state);\n               state = GetSolStringState(styler, i, &nextIndex);\n               if(state == SCE_SCRIPTOL_STRING)\n               {\n                 stringType = ch;\n               }\n               if (nextIndex != i + 1)\n               {\n                   i = nextIndex - 1;\n                   ch = ' ';\n                   chPrev = ' ';\n                   chNext = styler.SafeGetCharAt(i + 1);\n               }\n           }\n            else if (isoperator(ch))\n            {\n                 styler.ColourTo(i - 1, state);\n                 styler.ColourTo(i, SCE_SCRIPTOL_OPERATOR);\n            }\n          }\n          else if (state == SCE_SCRIPTOL_KEYWORD)\n          {\n              if (!iswordchar(ch))\n              {\n                 ClassifyWordSol(styler.GetStartSegment(), i - 1, keywords, styler, prevWord);\n                 state = SCE_SCRIPTOL_DEFAULT;\n                 if (ch == '`')\n                 {\n                     state = chNext == '`' ? SCE_SCRIPTOL_PERSISTENT : SCE_SCRIPTOL_COMMENTLINE;\n                 }\n                 else if (IsSolStringStart(ch))\n                 {\n                    styler.ColourTo(i - 1, state);\n                    state = GetSolStringState(styler, i, &nextIndex);\n                    if (nextIndex != i + 1)\n                    {\n                       i = nextIndex - 1;\n                       ch = ' ';\n                       chPrev = ' ';\n                       chNext = styler.SafeGetCharAt(i + 1);\n                     }\n                 }\n                 else if (isoperator(ch))\n                 {\n                     styler.ColourTo(i, SCE_SCRIPTOL_OPERATOR);\n                 }\n             }\n          }\n          else\n          {\n            if (state == SCE_SCRIPTOL_COMMENTLINE ||\n                state == SCE_SCRIPTOL_PERSISTENT ||\n                state == SCE_SCRIPTOL_CSTYLE)\n            {\n                 if (ch == '\\r' || ch == '\\n')\n                 {\n                     styler.ColourTo(i - 1, state);\n                     state = SCE_SCRIPTOL_DEFAULT;\n                 }\n            }\n            else if(state == SCE_SCRIPTOL_COMMENTBLOCK)\n            {\n              if(chPrev == '*' && ch == '/')\n              {\n                styler.ColourTo(i, state);\n                state = SCE_SCRIPTOL_DEFAULT;\n              }\n            }\n            else if ((state == SCE_SCRIPTOL_STRING) ||\n                     (state == SCE_SCRIPTOL_CHARACTER))\n            {\n               if ((ch == '\\r' || ch == '\\n') && (chPrev != '\\\\'))\n                {\n                    styler.ColourTo(i - 1, state);\n                    state = SCE_SCRIPTOL_STRINGEOL;\n                }\n                else if (ch == '\\\\')\n                {\n                   if (chNext == '\\\"' || chNext == '\\'' || chNext == '\\\\')\n                   {\n                        i++;\n                        ch = chNext;\n                        chNext = styler.SafeGetCharAt(i + 1);\n                   }\n                 }\n                else if ((ch == '\\\"') || (ch == '\\''))\n                {\n                    // must match the entered quote type\n                    if(ch == stringType)\n                    {\n                      styler.ColourTo(i, state);\n                      state = SCE_SCRIPTOL_DEFAULT;\n                    }\n                 }\n             }\n             else if (state == SCE_SCRIPTOL_TRIPLE)\n             {\n                if ((ch == '\\'' && chPrev == '\\'' && chPrev2 == '\\'') ||\n                    (ch == '\\\"' && chPrev == '\\\"' && chPrev2 == '\\\"'))\n                 {\n                    styler.ColourTo(i, state);\n                    state = SCE_SCRIPTOL_DEFAULT;\n                 }\n             }\n\n           }\n          chPrev2 = chPrev;\n          chPrev = ch;\n\t}\n        if (state == SCE_SCRIPTOL_KEYWORD)\n        {\n            ClassifyWordSol(styler.GetStartSegment(),\n                 lengthDoc-1, keywords, styler, prevWord);\n\t}\n        else\n        {\n            styler.ColourTo(lengthDoc-1, state);\n\t}\n}\n\nstatic void FoldSolDoc(Sci_PositionU startPos, Sci_Position length, int initStyle,\n\t\t\t\t\t\t   WordList *[], Accessor &styler)\n {\n\tSci_Position lengthDoc = startPos + length;\n\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tif (startPos > 0)\n        {\n          if (lineCurrent > 0)\n          {\n               lineCurrent--;\n               startPos = styler.LineStart(lineCurrent);\n               if (startPos == 0)\n                    initStyle = SCE_SCRIPTOL_DEFAULT;\n               else\n                    initStyle = styler.StyleAt(startPos-1);\n           }\n\t}\n\tint state = initStyle & 31;\n\tint spaceFlags = 0;\n        int indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags, IsSolComment);\n        if (state == SCE_SCRIPTOL_TRIPLE)\n             indentCurrent |= SC_FOLDLEVELWHITEFLAG;\n\tchar chNext = styler[startPos];\n\tfor (Sci_Position i = startPos; i < lengthDoc; i++)\n         {\n\t\tchar ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\tint style = styler.StyleAt(i) & 31;\n\n\t\tif ((ch == '\\r' && chNext != '\\n') || (ch == '\\n') || (i == lengthDoc))\n                {\n                   int lev = indentCurrent;\n                   int indentNext = styler.IndentAmount(lineCurrent + 1, &spaceFlags, IsSolComment);\n                   if (style == SCE_SCRIPTOL_TRIPLE)\n                        indentNext |= SC_FOLDLEVELWHITEFLAG;\n                   if (!(indentCurrent & SC_FOLDLEVELWHITEFLAG))\n                    {\n                        // Only non whitespace lines can be headers\n                        if ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext & SC_FOLDLEVELNUMBERMASK))\n                        {\n                              lev |= SC_FOLDLEVELHEADERFLAG;\n                        }\n                        else if (indentNext & SC_FOLDLEVELWHITEFLAG)\n                        {\n                             // Line after is blank so check the next - maybe should continue further?\n                             int spaceFlags2 = 0;\n                             int indentNext2 = styler.IndentAmount(lineCurrent + 2, &spaceFlags2, IsSolComment);\n                             if ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext2 & SC_FOLDLEVELNUMBERMASK))\n                             {\n                                   lev |= SC_FOLDLEVELHEADERFLAG;\n                              }\n                        }\n                    }\n                   indentCurrent = indentNext;\n                   styler.SetLevel(lineCurrent, lev);\n                   lineCurrent++;\n\t\t}\n\t}\n}\n\nLexerModule lmScriptol(SCLEX_SCRIPTOL, ColouriseSolDoc, \"scriptol\", FoldSolDoc);\n"
  },
  {
    "path": "lexilla/lexers/LexSmalltalk.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexSmalltalk.cxx\n ** Lexer for Smalltalk language.\n ** Written by Sergey Philippov, sphilippov-at-gmail-dot-com\n **/\n// Copyright 1998-2002 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\n/*\n| lexTable classificationBlock charClasses |\ncharClasses := #(#DecDigit #Letter #Special #Upper #BinSel).\nlexTable := ByteArray new: 128.\nclassificationBlock := [ :charClass :chars |\n    | flag |\n    flag := 1 bitShift: (charClasses indexOf: charClass) - 1.\n    chars do: [ :char | lexTable at: char codePoint + 1 put: ((lexTable at: char codePoint + 1) bitOr: flag)]].\n\nclassificationBlock\n    value: #DecDigit value: '0123456789';\n    value: #Letter value: '_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n    value: #Special value: '()[]{};.^:';\n    value: #BinSel value: '~@%&*-+=|\\/,<>?!';\n    value: #Upper value: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.\n\n((String new: 500) streamContents: [ :stream |\n    stream crLf; nextPutAll: 'static int ClassificationTable[256] = {'.\n    lexTable keysAndValuesDo: [ :index :value |\n        ((index - 1) rem: 16) == 0 ifTrue: [\n            stream crLf; tab]\n        ifFalse: [\n            stream space].\n        stream print: value.\n        index ~= 256 ifTrue: [\n            stream nextPut: $,]].\n    stream crLf; nextPutAll: '};'; crLf.\n\n    charClasses keysAndValuesDo: [ :index :name |\n        stream\n            crLf;\n            nextPutAll: (\n                ('static inline bool is<1s>(int ch) {return (ch > 0) && (ch %< 0x80) && ((ClassificationTable[ch] & <2p>) != 0);}')\n                    expandMacrosWith: name with: (1 bitShift: (index - 1)))\n    ]]) edit\n*/\n\n// autogenerated {{{{\n\nstatic int ClassificationTable[256] = {\n    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n    0, 16, 0, 0, 0, 16, 16, 0, 4, 4, 16, 16, 16, 16, 4, 16,\n    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 16, 16, 16, 16,\n    16, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,\n    10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 4, 16, 4, 4, 2,\n    0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\n    2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 16, 4, 16, 0,\n};\n\nstatic inline bool isDecDigit(int ch) {return (ch > 0) && (ch < 0x80) && ((ClassificationTable[ch] & 1) != 0);}\nstatic inline bool isLetter(int ch) {return (ch > 0) && (ch < 0x80) && ((ClassificationTable[ch] & 2) != 0);}\nstatic inline bool isSpecial(int ch) {return (ch > 0) && (ch < 0x80) && ((ClassificationTable[ch] & 4) != 0);}\nstatic inline bool isUpper(int ch) {return (ch > 0) && (ch < 0x80) && ((ClassificationTable[ch] & 8) != 0);}\nstatic inline bool isBinSel(int ch) {return (ch > 0) && (ch < 0x80) && ((ClassificationTable[ch] & 16) != 0);}\n// autogenerated }}}}\n\nstatic inline bool isAlphaNumeric(int ch) {\n    return isDecDigit(ch) || isLetter(ch);\n}\n\nstatic inline bool isDigitOfRadix(int ch, int radix)\n{\n    if (isDecDigit(ch))\n        return (ch - '0') < radix;\n    else if (!isUpper(ch))\n        return false;\n    else\n        return (ch - 'A' + 10) < radix;\n}\n\nstatic inline void skipComment(StyleContext& sc)\n{\n    while (sc.More() && sc.ch != '\\\"')\n        sc.Forward();\n}\n\nstatic inline void skipString(StyleContext& sc)\n{\n    while (sc.More()) {\n        if (sc.ch == '\\'') {\n            if (sc.chNext != '\\'')\n                return;\n            sc.Forward();\n        }\n        sc.Forward();\n    }\n}\n\nstatic void handleHash(StyleContext& sc)\n{\n    if (isSpecial(sc.chNext)) {\n        sc.SetState(SCE_ST_SPECIAL);\n        return;\n    }\n\n    sc.SetState(SCE_ST_SYMBOL);\n    sc.Forward();\n    if (sc.ch == '\\'') {\n        sc.Forward();\n        skipString(sc);\n    }\n    else {\n        if (isLetter(sc.ch)) {\n            while (isAlphaNumeric(sc.chNext) || sc.chNext == ':')\n                sc.Forward();\n        }\n        else if (isBinSel(sc.ch)) {\n            while (isBinSel(sc.chNext))\n                sc.Forward();\n        }\n    }\n}\n\nstatic inline void handleSpecial(StyleContext& sc)\n{\n    if (sc.ch == ':' && sc.chNext == '=') {\n        sc.SetState(SCE_ST_ASSIGN);\n        sc.Forward();\n    }\n    else {\n        if (sc.ch == '^')\n            sc.SetState(SCE_ST_RETURN);\n        else\n            sc.SetState(SCE_ST_SPECIAL);\n    }\n}\n\nstatic inline void skipInt(StyleContext& sc, int radix)\n{\n    while (isDigitOfRadix(sc.chNext, radix))\n        sc.Forward();\n}\n\nstatic void handleNumeric(StyleContext& sc)\n{\n    char num[256];\n    int nl;\n    int radix;\n\n    sc.SetState(SCE_ST_NUMBER);\n    num[0] = static_cast<char>(sc.ch);\n    nl = 1;\n    while (isDecDigit(sc.chNext)) {\n        num[nl++] = static_cast<char>(sc.chNext);\n        sc.Forward();\n        if (nl+1 == sizeof(num)/sizeof(num[0])) // overrun check\n            break;\n    }\n    if (sc.chNext == 'r') {\n        num[nl] = 0;\n        if (num[0] == '-')\n            radix = atoi(num + 1);\n        else\n            radix = atoi(num);\n        sc.Forward();\n        if (sc.chNext == '-')\n            sc.Forward();\n        skipInt(sc, radix);\n    }\n    else\n        radix = 10;\n    if (sc.chNext != '.' || !isDigitOfRadix(sc.GetRelative(2), radix))\n        return;\n    sc.Forward();\n    skipInt(sc, radix);\n    if (sc.chNext == 's') {\n        // ScaledDecimal\n        sc.Forward();\n        while (isDecDigit(sc.chNext))\n            sc.Forward();\n        return;\n    }\n    else if (sc.chNext != 'e' && sc.chNext != 'd' && sc.chNext != 'q')\n        return;\n    sc.Forward();\n    if (sc.chNext == '+' || sc.chNext == '-')\n        sc.Forward();\n    skipInt(sc, radix);\n}\n\nstatic inline void handleBinSel(StyleContext& sc)\n{\n    sc.SetState(SCE_ST_BINARY);\n    while (isBinSel(sc.chNext))\n        sc.Forward();\n}\n\nstatic void handleLetter(StyleContext& sc, WordList* specialSelectorList)\n{\n    char ident[256];\n    int il;\n    int state;\n    bool doubleColonPresent;\n\n    sc.SetState(SCE_ST_DEFAULT);\n\n    ident[0] = static_cast<char>(sc.ch);\n    il = 1;\n    while (isAlphaNumeric(sc.chNext)) {\n        ident[il++] = static_cast<char>(sc.chNext);\n        sc.Forward();\n        if (il+2 == sizeof(ident)/sizeof(ident[0])) // overrun check\n            break;\n    }\n\n    if (sc.chNext == ':') {\n        doubleColonPresent = true;\n        ident[il++] = ':';\n        sc.Forward();\n    }\n    else\n        doubleColonPresent = false;\n    ident[il] = 0;\n\n    if (specialSelectorList->InList(ident))\n            state = SCE_ST_SPEC_SEL;\n    else if (doubleColonPresent)\n            state = SCE_ST_KWSEND;\n    else if (isUpper(ident[0]))\n        state = SCE_ST_GLOBAL;\n    else {\n        if (!strcmp(ident, \"self\"))\n            state = SCE_ST_SELF;\n        else if (!strcmp(ident, \"super\"))\n            state = SCE_ST_SUPER;\n        else if (!strcmp(ident, \"nil\"))\n            state = SCE_ST_NIL;\n        else if (!strcmp(ident, \"true\") || !strcmp(ident, \"false\"))\n            state = SCE_ST_BOOL;\n        else\n            state = SCE_ST_DEFAULT;\n    }\n\n    sc.ChangeState(state);\n}\n\nstatic void colorizeSmalltalkDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *wordLists[], Accessor &styler)\n{\n    StyleContext sc(startPos, length, initStyle, styler);\n\n    if (initStyle == SCE_ST_COMMENT) {\n        skipComment(sc);\n        if (sc.More())\n            sc.Forward();\n    }\n    else if (initStyle == SCE_ST_STRING) {\n        skipString(sc);\n        if (sc.More())\n            sc.Forward();\n    }\n\n    for (; sc.More(); sc.Forward()) {\n        int ch;\n\n        ch = sc.ch;\n        if (ch == '\\\"') {\n            sc.SetState(SCE_ST_COMMENT);\n            sc.Forward();\n            skipComment(sc);\n        }\n        else if (ch == '\\'') {\n            sc.SetState(SCE_ST_STRING);\n            sc.Forward();\n            skipString(sc);\n        }\n        else if (ch == '#')\n            handleHash(sc);\n        else if (ch == '$') {\n            sc.SetState(SCE_ST_CHARACTER);\n            sc.Forward();\n        }\n        else if (isSpecial(ch))\n            handleSpecial(sc);\n        else if (isDecDigit(ch))\n            handleNumeric(sc);\n        else if (isLetter(ch))\n            handleLetter(sc, wordLists[0]);\n        else if (isBinSel(ch)) {\n            if (ch == '-' && isDecDigit(sc.chNext))\n                handleNumeric(sc);\n            else\n                handleBinSel(sc);\n        }\n        else\n            sc.SetState(SCE_ST_DEFAULT);\n    }\n    sc.Complete();\n}\n\nstatic const char* const smalltalkWordListDesc[] = {\n    \"Special selectors\",\n    0\n};\n\nLexerModule lmSmalltalk(SCLEX_SMALLTALK, colorizeSmalltalkDoc, \"smalltalk\", NULL, smalltalkWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexSorcus.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexSorcus.cxx\n** Lexer for SORCUS installation files\n** Written by Eugen Bitter and Christoph Baumann at SORCUS Computer, Heidelberg Germany\n** Based on the ASM Lexer by The Black Horus\n**/\n\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\n\n//each character a..z and A..Z + '_' can be part of a keyword\n//additionally numbers that follow 'M' can be contained in a keyword\nstatic inline bool IsSWordStart(const int ch, const int prev_ch)\n{\n    if (isalpha(ch) || (ch == '_') || ((isdigit(ch)) && (prev_ch == 'M')))\n        return true;\n\n    return false;\n}\n\n\n//only digits that are not preceded by 'M' count as a number\nstatic inline bool IsSorcusNumber(const int ch, const int prev_ch)\n{\n    if ((isdigit(ch)) && (prev_ch != 'M'))\n        return true;\n\n    return false;\n}\n\n\n//only = is a valid operator\nstatic inline bool IsSorcusOperator(const int ch)\n{\n    if (ch == '=')\n        return true;\n\n    return false;\n}\n\n\nstatic void ColouriseSorcusDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[],\n                               Accessor &styler)\n{\n\n    WordList &Command = *keywordlists[0];\n    WordList &Parameter = *keywordlists[1];\n    WordList &Constant = *keywordlists[2];\n\n    // Do not leak onto next line\n    if (initStyle == SCE_SORCUS_STRINGEOL)\n        initStyle = SCE_SORCUS_DEFAULT;\n\n    StyleContext sc(startPos, length, initStyle, styler);\n\n    for (; sc.More(); sc.Forward())\n    {\n\n        // Prevent SCE_SORCUS_STRINGEOL from leaking back to previous line\n        if (sc.atLineStart && (sc.state == SCE_SORCUS_STRING))\n        {\n            sc.SetState(SCE_SORCUS_STRING);\n        }\n\n        // Determine if the current state should terminate.\n        if (sc.state == SCE_SORCUS_OPERATOR)\n        {\n            if (!IsSorcusOperator(sc.ch))\n            {\n                sc.SetState(SCE_SORCUS_DEFAULT);\n            }\n        }\n        else if(sc.state == SCE_SORCUS_NUMBER)\n        {\n            if(!IsSorcusNumber(sc.ch, sc.chPrev))\n            {\n                sc.SetState(SCE_SORCUS_DEFAULT);\n            }\n        }\n        else if (sc.state == SCE_SORCUS_IDENTIFIER)\n        {\n            if (!IsSWordStart(sc.ch, sc.chPrev))\n            {\n                char s[100];\n\n                sc.GetCurrent(s, sizeof(s));\n\n                if (Command.InList(s))\n                {\n                    sc.ChangeState(SCE_SORCUS_COMMAND);\n                }\n                else if (Parameter.InList(s))\n                {\n                    sc.ChangeState(SCE_SORCUS_PARAMETER);\n                }\n                else if (Constant.InList(s))\n                {\n                    sc.ChangeState(SCE_SORCUS_CONSTANT);\n                }\n\n                sc.SetState(SCE_SORCUS_DEFAULT);\n            }\n        }\n        else if (sc.state == SCE_SORCUS_COMMENTLINE )\n        {\n            if (sc.atLineEnd)\n            {\n                sc.SetState(SCE_SORCUS_DEFAULT);\n            }\n        }\n        else if (sc.state == SCE_SORCUS_STRING)\n        {\n            if (sc.ch == '\\\"')\n            {\n                sc.ForwardSetState(SCE_SORCUS_DEFAULT);\n            }\n            else if (sc.atLineEnd)\n            {\n                sc.ChangeState(SCE_SORCUS_STRINGEOL);\n                sc.ForwardSetState(SCE_SORCUS_DEFAULT);\n            }\n        }\n\n        // Determine if a new state should be entered.\n        if (sc.state == SCE_SORCUS_DEFAULT)\n        {\n            if ((sc.ch == ';') || (sc.ch == '\\''))\n            {\n                sc.SetState(SCE_SORCUS_COMMENTLINE);\n            }\n            else if (IsSWordStart(sc.ch, sc.chPrev))\n            {\n                sc.SetState(SCE_SORCUS_IDENTIFIER);\n            }\n            else if (sc.ch == '\\\"')\n            {\n                sc.SetState(SCE_SORCUS_STRING);\n            }\n            else if (IsSorcusOperator(sc.ch))\n            {\n                sc.SetState(SCE_SORCUS_OPERATOR);\n            }\n            else if (IsSorcusNumber(sc.ch, sc.chPrev))\n            {\n                sc.SetState(SCE_SORCUS_NUMBER);\n            }\n        }\n\n    }\n    sc.Complete();\n}\n\n\nstatic const char* const SorcusWordListDesc[] = {\"Command\",\"Parameter\", \"Constant\", 0};\n\nLexerModule lmSorc(SCLEX_SORCUS, ColouriseSorcusDoc, \"sorcins\", 0, SorcusWordListDesc);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "lexilla/lexers/LexSpecman.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexSpecman.cxx\n ** Lexer for Specman E language.\n ** Written by Avi Yegudin, based on C++ lexer by Neil Hodgson\n **/\n// Copyright 1998-2002 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nstatic inline bool IsAWordChar(const int ch) {\n\treturn (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_' || ch == '\\'');\n}\n\nstatic inline bool IsANumberChar(const int ch) {\n\treturn (ch < 0x80) && (isalnum(ch) || ch == '_' || ch == '\\'');\n}\n\nstatic inline bool IsAWordStart(const int ch) {\n\treturn (ch < 0x80) && (isalnum(ch) || ch == '_' || ch == '`');\n}\n\nstatic void ColouriseSpecmanDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[],\n                            Accessor &styler, bool caseSensitive) {\n\n\tWordList &keywords = *keywordlists[0];\n\tWordList &keywords2 = *keywordlists[1];\n\tWordList &keywords3 = *keywordlists[2];\n\tWordList &keywords4 = *keywordlists[3];\n\n\t// Do not leak onto next line\n\tif (initStyle == SCE_SN_STRINGEOL)\n\t\tinitStyle = SCE_SN_CODE;\n\n\tint visibleChars = 0;\n\n\tStyleContext sc(startPos, length, initStyle, styler);\n\n\tfor (; sc.More(); sc.Forward()) {\n\n\t\tif (sc.atLineStart && (sc.state == SCE_SN_STRING)) {\n\t\t\t// Prevent SCE_SN_STRINGEOL from leaking back to previous line\n\t\t\tsc.SetState(SCE_SN_STRING);\n\t\t}\n\n\t\t// Handle line continuation generically.\n\t\tif (sc.ch == '\\\\') {\n\t\t\tif (sc.chNext == '\\n' || sc.chNext == '\\r') {\n\t\t\t\tsc.Forward();\n\t\t\t\tif (sc.ch == '\\r' && sc.chNext == '\\n') {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\t// Determine if the current state should terminate.\n\t\tif (sc.state == SCE_SN_OPERATOR) {\n\t\t\tsc.SetState(SCE_SN_CODE);\n\t\t} else if (sc.state == SCE_SN_NUMBER) {\n\t\t\tif (!IsANumberChar(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_SN_CODE);\n\t\t\t}\n\t\t} else if (sc.state == SCE_SN_IDENTIFIER) {\n\t\t\tif (!IsAWordChar(sc.ch) || (sc.ch == '.')) {\n\t\t\t\tchar s[100];\n\t\t\t\tif (caseSensitive) {\n\t\t\t\t\tsc.GetCurrent(s, sizeof(s));\n\t\t\t\t} else {\n\t\t\t\t\tsc.GetCurrentLowered(s, sizeof(s));\n\t\t\t\t}\n\t\t\t\tif (keywords.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_SN_WORD);\n\t\t\t\t} else if (keywords2.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_SN_WORD2);\n\t\t\t\t} else if (keywords3.InList(s)) {\n                                        sc.ChangeState(SCE_SN_WORD3);\n\t\t\t\t} else if (keywords4.InList(s)) {\n\t\t\t\t\tsc.ChangeState(SCE_SN_USER);\n\t\t\t\t}\n\t\t\t\tsc.SetState(SCE_SN_CODE);\n\t\t\t}\n\t\t} else if (sc.state == SCE_SN_PREPROCESSOR) {\n                        if (IsASpace(sc.ch)) {\n                                sc.SetState(SCE_SN_CODE);\n                        }\n\t\t} else if (sc.state == SCE_SN_DEFAULT) {\n\t\t\tif (sc.Match('<', '\\'')) {\n\t\t\t\tsc.Forward();\n\t\t\t\tsc.ForwardSetState(SCE_SN_CODE);\n\t\t\t}\n\t\t} else if (sc.state == SCE_SN_COMMENTLINE || sc.state == SCE_SN_COMMENTLINEBANG) {\n\t\t\tif (sc.atLineEnd) {\n\t\t\t\tsc.SetState(SCE_SN_CODE);\n\t\t\t\tvisibleChars = 0;\n\t\t\t}\n\t\t} else if (sc.state == SCE_SN_STRING) {\n\t\t\tif (sc.ch == '\\\\') {\n\t\t\t\tif (sc.chNext == '\\\"' || sc.chNext == '\\'' || sc.chNext == '\\\\') {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t}\n\t\t\t} else if (sc.ch == '\\\"') {\n\t\t\t\tsc.ForwardSetState(SCE_SN_CODE);\n\t\t\t} else if (sc.atLineEnd) {\n\t\t\t\tsc.ChangeState(SCE_SN_STRINGEOL);\n\t\t\t\tsc.ForwardSetState(SCE_SN_CODE);\n\t\t\t\tvisibleChars = 0;\n\t\t\t}\n\t\t} else if (sc.state == SCE_SN_SIGNAL) {\n\t\t\tif (sc.atLineEnd) {\n\t\t\t\tsc.ChangeState(SCE_SN_STRINGEOL);\n\t\t\t\tsc.ForwardSetState(SCE_SN_CODE);\n\t\t\t\tvisibleChars = 0;\n\t\t\t} else if (sc.ch == '\\\\') {\n\t\t\t\tif (sc.chNext == '\\\"' || sc.chNext == '\\'' || sc.chNext == '\\\\') {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t}\n\t\t\t} else if (sc.ch == '\\'') {\n\t\t\t\tsc.ForwardSetState(SCE_SN_CODE);\n\t\t\t}\n\t\t} else if (sc.state == SCE_SN_REGEXTAG) {\n\t\t\tif (!IsADigit(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_SN_CODE);\n\t\t\t}\n\t\t}\n\n\t\t// Determine if a new state should be entered.\n\t\tif (sc.state == SCE_SN_CODE) {\n\t\t\tif (sc.ch == '$' && IsADigit(sc.chNext)) {\n\t\t\t\tsc.SetState(SCE_SN_REGEXTAG);\n                                sc.Forward();\n\t\t\t} else if (IsADigit(sc.ch)) {\n                                sc.SetState(SCE_SN_NUMBER);\n\t\t\t} else if (IsAWordStart(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_SN_IDENTIFIER);\n\t\t\t} else if (sc.Match('\\'', '>')) {\n                                sc.SetState(SCE_SN_DEFAULT);\n\t\t\t\tsc.Forward();\t// Eat the * so it isn't used for the end of the comment\n\t\t\t} else if (sc.Match('/', '/')) {\n\t\t\t\tif (sc.Match(\"//!\"))\t// Nice to have a different comment style\n\t\t\t\t\tsc.SetState(SCE_SN_COMMENTLINEBANG);\n\t\t\t\telse\n\t\t\t\t\tsc.SetState(SCE_SN_COMMENTLINE);\n\t\t\t} else if (sc.Match('-', '-')) {\n\t\t\t\tif (sc.Match(\"--!\"))\t// Nice to have a different comment style\n\t\t\t\t\tsc.SetState(SCE_SN_COMMENTLINEBANG);\n\t\t\t\telse\n\t\t\t\t\tsc.SetState(SCE_SN_COMMENTLINE);\n\t\t\t} else if (sc.ch == '\\\"') {\n\t\t\t\tsc.SetState(SCE_SN_STRING);\n\t\t\t} else if (sc.ch == '\\'') {\n\t\t\t\tsc.SetState(SCE_SN_SIGNAL);\n\t\t\t} else if (sc.ch == '#' && visibleChars == 0) {\n\t\t\t\t// Preprocessor commands are alone on their line\n\t\t\t\tsc.SetState(SCE_SN_PREPROCESSOR);\n\t\t\t\t// Skip whitespace between # and preprocessor word\n\t\t\t\tdo {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t} while ((sc.ch == ' ' || sc.ch == '\\t') && sc.More());\n\t\t\t\tif (sc.atLineEnd) {\n\t\t\t\t\tsc.SetState(SCE_SN_CODE);\n\t\t\t\t}\n\t\t\t} else if (isoperator(static_cast<char>(sc.ch)) || sc.ch == '@') {\n\t\t\t\tsc.SetState(SCE_SN_OPERATOR);\n\t\t\t}\n\t\t}\n\n\t\tif (sc.atLineEnd) {\n\t\t\t// Reset states to begining of colourise so no surprises\n\t\t\t// if different sets of lines lexed.\n\t\t\tvisibleChars = 0;\n\t\t}\n\t\tif (!IsASpace(sc.ch)) {\n\t\t\tvisibleChars++;\n\t\t}\n\t}\n\tsc.Complete();\n}\n\n// Store both the current line's fold level and the next lines in the\n// level store to make it easy to pick up with each increment\n// and to make it possible to fiddle the current level for \"} else {\".\nstatic void FoldNoBoxSpecmanDoc(Sci_PositionU startPos, Sci_Position length, int,\n                            Accessor &styler) {\n\tbool foldComment = styler.GetPropertyInt(\"fold.comment\") != 0;\n\tbool foldCompact = styler.GetPropertyInt(\"fold.compact\", 1) != 0;\n\tbool foldAtElse = styler.GetPropertyInt(\"fold.at.else\", 0) != 0;\n\tSci_PositionU endPos = startPos + length;\n\tint visibleChars = 0;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tint levelCurrent = SC_FOLDLEVELBASE;\n\tif (lineCurrent > 0)\n\t\tlevelCurrent = styler.LevelAt(lineCurrent-1) >> 16;\n\tint levelMinCurrent = levelCurrent;\n\tint levelNext = levelCurrent;\n\tchar chNext = styler[startPos];\n\tint styleNext = styler.StyleAt(startPos);\n\tint style;\n\tfor (Sci_PositionU i = startPos; i < endPos; i++) {\n\t\tchar ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\t//int stylePrev = style;\n\t\tstyle = styleNext;\n\t\tstyleNext = styler.StyleAt(i + 1);\n\t\tbool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n\t\tif (foldComment && (style == SCE_SN_COMMENTLINE)) {\n\t\t\tif (((ch == '/') && (chNext == '/')) ||\n                            ((ch == '-') && (chNext == '-'))) {\n\t\t\t\tchar chNext2 = styler.SafeGetCharAt(i + 2);\n\t\t\t\tif (chNext2 == '{') {\n\t\t\t\t\tlevelNext++;\n\t\t\t\t} else if (chNext2 == '}') {\n\t\t\t\t\tlevelNext--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (style == SCE_SN_OPERATOR) {\n\t\t\tif (ch == '{') {\n\t\t\t\t// Measure the minimum before a '{' to allow\n\t\t\t\t// folding on \"} else {\"\n\t\t\t\tif (levelMinCurrent > levelNext) {\n\t\t\t\t\tlevelMinCurrent = levelNext;\n\t\t\t\t}\n\t\t\t\tlevelNext++;\n\t\t\t} else if (ch == '}') {\n\t\t\t\tlevelNext--;\n\t\t\t}\n\t\t}\n\t\tif (atEOL) {\n\t\t\tint levelUse = levelCurrent;\n\t\t\tif (foldAtElse) {\n\t\t\t\tlevelUse = levelMinCurrent;\n\t\t\t}\n\t\t\tint lev = levelUse | levelNext << 16;\n\t\t\tif (visibleChars == 0 && foldCompact)\n\t\t\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\t\t\tif (levelUse < levelNext)\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\tif (lev != styler.LevelAt(lineCurrent)) {\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\t\t\t}\n\t\t\tlineCurrent++;\n\t\t\tlevelCurrent = levelNext;\n\t\t\tlevelMinCurrent = levelCurrent;\n\t\t\tvisibleChars = 0;\n\t\t}\n\t\tif (!isspacechar(ch))\n\t\t\tvisibleChars++;\n\t}\n}\n\nstatic void FoldSpecmanDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *[],\n                       Accessor &styler) {\n\tFoldNoBoxSpecmanDoc(startPos, length, initStyle, styler);\n}\n\nstatic const char * const specmanWordLists[] = {\n            \"Primary keywords and identifiers\",\n            \"Secondary keywords and identifiers\",\n            \"Sequence keywords and identifiers\",\n            \"User defined keywords and identifiers\",\n            \"Unused\",\n            0,\n        };\n\nstatic void ColouriseSpecmanDocSensitive(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[],\n                                     Accessor &styler) {\n\tColouriseSpecmanDoc(startPos, length, initStyle, keywordlists, styler, true);\n}\n\n\nLexerModule lmSpecman(SCLEX_SPECMAN, ColouriseSpecmanDocSensitive, \"specman\", FoldSpecmanDoc, specmanWordLists);\n"
  },
  {
    "path": "lexilla/lexers/LexSpice.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexSpice.cxx\n ** Lexer for Spice\n **/\n// Copyright 2006 by Fabien Proriol\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\n/*\n * Interface\n */\n\nstatic void ColouriseDocument(\n    Sci_PositionU startPos,\n    Sci_Position length,\n    int initStyle,\n    WordList *keywordlists[],\n    Accessor &styler);\n\nstatic const char * const spiceWordListDesc[] = {\n    \"Keywords\",        // SPICE command\n    \"Keywords2\",    // SPICE functions\n    \"Keywords3\",    // SPICE params\n    0\n};\n\nLexerModule lmSpice(SCLEX_SPICE, ColouriseDocument, \"spice\", NULL, spiceWordListDesc);\n\n/*\n * Implementation\n */\n\nstatic void ColouriseComment(StyleContext& sc, bool& apostropheStartsAttribute);\nstatic void ColouriseDelimiter(StyleContext& sc, bool& apostropheStartsAttribute);\nstatic void ColouriseNumber(StyleContext& sc, bool& apostropheStartsAttribute);\nstatic void ColouriseWhiteSpace(StyleContext& sc, bool& apostropheStartsAttribute);\nstatic void ColouriseWord(StyleContext& sc, WordList& keywords, WordList& keywords2, WordList& keywords3, bool& apostropheStartsAttribute);\n\nstatic inline bool IsDelimiterCharacter(int ch);\nstatic inline bool IsSeparatorOrDelimiterCharacter(int ch);\n\nstatic void ColouriseComment(StyleContext& sc, bool&) {\n    sc.SetState(SCE_SPICE_COMMENTLINE);\n    while (!sc.atLineEnd) {\n        sc.Forward();\n    }\n}\n\nstatic void ColouriseDelimiter(StyleContext& sc, bool& apostropheStartsAttribute) {\n    apostropheStartsAttribute = sc.Match (')');\n    sc.SetState(SCE_SPICE_DELIMITER);\n    sc.ForwardSetState(SCE_SPICE_DEFAULT);\n}\n\nstatic void ColouriseNumber(StyleContext& sc, bool& apostropheStartsAttribute) {\n    apostropheStartsAttribute = true;\n    std::string number;\n    sc.SetState(SCE_SPICE_NUMBER);\n    // Get all characters up to a delimiter or a separator, including points, but excluding\n    // double points (ranges).\n    while (!IsSeparatorOrDelimiterCharacter(sc.ch) || (sc.ch == '.' && sc.chNext != '.')) {\n        number += static_cast<char>(sc.ch);\n        sc.Forward();\n    }\n    // Special case: exponent with sign\n    if ((sc.chPrev == 'e' || sc.chPrev == 'E') &&\n            (sc.ch == '+' || sc.ch == '-')) {\n        number += static_cast<char>(sc.ch);\n        sc.Forward ();\n        while (!IsSeparatorOrDelimiterCharacter(sc.ch)) {\n            number += static_cast<char>(sc.ch);\n            sc.Forward();\n        }\n    }\n    sc.SetState(SCE_SPICE_DEFAULT);\n}\n\nstatic void ColouriseWhiteSpace(StyleContext& sc, bool& ) {\n    sc.SetState(SCE_SPICE_DEFAULT);\n    sc.ForwardSetState(SCE_SPICE_DEFAULT);\n}\n\nstatic void ColouriseWord(StyleContext& sc, WordList& keywords, WordList& keywords2, WordList& keywords3, bool& apostropheStartsAttribute) {\n    apostropheStartsAttribute = true;\n    sc.SetState(SCE_SPICE_IDENTIFIER);\n    std::string word;\n    while (!sc.atLineEnd && !IsSeparatorOrDelimiterCharacter(sc.ch)) {\n        word += static_cast<char>(tolower(sc.ch));\n        sc.Forward();\n    }\n    if (keywords.InList(word.c_str())) {\n        sc.ChangeState(SCE_SPICE_KEYWORD);\n        if (word != \"all\") {\n            apostropheStartsAttribute = false;\n        }\n    }\n    else if (keywords2.InList(word.c_str())) {\n        sc.ChangeState(SCE_SPICE_KEYWORD2);\n        if (word != \"all\") {\n            apostropheStartsAttribute = false;\n        }\n    }\n    else if (keywords3.InList(word.c_str())) {\n        sc.ChangeState(SCE_SPICE_KEYWORD3);\n        if (word != \"all\") {\n            apostropheStartsAttribute = false;\n        }\n    }\n    sc.SetState(SCE_SPICE_DEFAULT);\n}\n\n//\n// ColouriseDocument\n//\nstatic void ColouriseDocument(\n    Sci_PositionU startPos,\n    Sci_Position length,\n    int initStyle,\n    WordList *keywordlists[],\n    Accessor &styler) {\n    WordList &keywords = *keywordlists[0];\n    WordList &keywords2 = *keywordlists[1];\n    WordList &keywords3 = *keywordlists[2];\n    StyleContext sc(startPos, length, initStyle, styler);\n    Sci_Position lineCurrent = styler.GetLine(startPos);\n    bool apostropheStartsAttribute = (styler.GetLineState(lineCurrent) & 1) != 0;\n    while (sc.More()) {\n        if (sc.atLineEnd) {\n            // Go to the next line\n            sc.Forward();\n            lineCurrent++;\n            // Remember the line state for future incremental lexing\n            styler.SetLineState(lineCurrent, apostropheStartsAttribute);\n            // Don't continue any styles on the next line\n            sc.SetState(SCE_SPICE_DEFAULT);\n        }\n        // Comments\n        if ((sc.Match('*') && sc.atLineStart) || sc.Match('*','~')) {\n            ColouriseComment(sc, apostropheStartsAttribute);\n        // Whitespace\n        } else if (IsASpace(sc.ch)) {\n            ColouriseWhiteSpace(sc, apostropheStartsAttribute);\n        // Delimiters\n        } else if (IsDelimiterCharacter(sc.ch)) {\n            ColouriseDelimiter(sc, apostropheStartsAttribute);\n        // Numbers\n        } else if (IsADigit(sc.ch) || sc.ch == '#') {\n            ColouriseNumber(sc, apostropheStartsAttribute);\n        // Keywords or identifiers\n        } else {\n            ColouriseWord(sc, keywords, keywords2, keywords3, apostropheStartsAttribute);\n        }\n    }\n    sc.Complete();\n}\n\nstatic inline bool IsDelimiterCharacter(int ch) {\n    switch (ch) {\n    case '&':\n    case '\\'':\n    case '(':\n    case ')':\n    case '*':\n    case '+':\n    case ',':\n    case '-':\n    case '.':\n    case '/':\n    case ':':\n    case ';':\n    case '<':\n    case '=':\n    case '>':\n    case '|':\n        return true;\n    default:\n        return false;\n    }\n}\n\nstatic inline bool IsSeparatorOrDelimiterCharacter(int ch) {\n    return IsASpace(ch) || IsDelimiterCharacter(ch);\n}\n"
  },
  {
    "path": "lexilla/lexers/LexStata.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexStata.cxx\n ** Lexer for Stata\n **/\n// Author: Luke Rasmussen (luke.rasmussen@gmail.com)\n//\n// The License.txt file describes the conditions under which this software may\n// be distributed.\n//\n// Developed as part of the StatTag project at Northwestern University Feinberg\n// School of Medicine with funding from Northwestern University Clinical and\n// Translational Sciences Institute through CTSA grant UL1TR001422.  This work\n// has not been reviewed or endorsed by NCATS or the NIH.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nstatic void ColouriseStataDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[],\n    Accessor &styler) {\n\n    WordList &keywords = *keywordlists[0];\n    WordList &types = *keywordlists[1];\n    \n    CharacterSet setCouldBePostOp(CharacterSet::setNone, \"+-\");\n    CharacterSet setWordStart(CharacterSet::setAlpha, \"_\", 0x80, true);\n    CharacterSet setWord(CharacterSet::setAlphaNum, \"._\", 0x80, true);\n\n    StyleContext sc(startPos, length, initStyle, styler);\n    bool lineHasNonCommentChar = false;\n    for (; sc.More(); sc.Forward()) {\n        if (sc.atLineStart) {\n          lineHasNonCommentChar = false;\n        }\n\n        // Determine if the current state should terminate.\n        switch (sc.state) {\n            case SCE_STATA_OPERATOR:\n                sc.SetState(SCE_STATA_DEFAULT);\n                break;\n            case SCE_STATA_NUMBER:\n                // We accept almost anything because of hex. and number suffixes\n                if (!setWord.Contains(sc.ch)) {\n                    sc.SetState(SCE_STATA_DEFAULT);\n                }\n                break;\n            case SCE_STATA_IDENTIFIER:\n                if (!setWord.Contains(sc.ch) || (sc.ch == '.')) {\n                    char s[1000];\n                    sc.GetCurrent(s, sizeof(s));\n                    if (keywords.InList(s)) {\n                        sc.ChangeState(SCE_STATA_WORD);\n                    }\n                    else if (types.InList(s)) {\n                        sc.ChangeState(SCE_STATA_TYPE);\n                    }\n                    sc.SetState(SCE_STATA_DEFAULT);\n                }\n                break;\n            case SCE_STATA_COMMENTBLOCK:\n                if (sc.Match('*', '/')) {\n                    sc.Forward();\n                    sc.ForwardSetState(SCE_STATA_DEFAULT);\n                }\n                break;\n            case SCE_STATA_COMMENT:\n            case SCE_STATA_COMMENTLINE:\n                if (sc.atLineStart) {\n                    sc.SetState(SCE_STATA_DEFAULT);\n                }\n                break;\n            case SCE_STATA_STRING:\n                if (sc.ch == '\\\\') {\n                    // Per Stata documentation, the following characters are the only ones that can\n                    // be escaped (not our typical set of quotes, etc.):\n                    // https://www.stata.com/support/faqs/programming/backslashes-and-macros/\n                    if (sc.chNext == '$' || sc.chNext == '`' || sc.chNext == '\\\\') {\n                        sc.Forward();\n                    }\n                }\n                else if (sc.ch == '\\\"') {\n                    sc.ForwardSetState(SCE_STATA_DEFAULT);\n                }\n                break;\n        }\n\n        // Determine if a new state should be entered.\n        if (sc.state == SCE_STATA_DEFAULT) {\n            if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) {\n                lineHasNonCommentChar = true;\n                sc.SetState(SCE_STATA_NUMBER);\n            }\n            else if (setWordStart.Contains(sc.ch)) {\n                lineHasNonCommentChar = true;\n                sc.SetState(SCE_STATA_IDENTIFIER);\n            }\n            else if (sc.Match('*') && !lineHasNonCommentChar) {\n                sc.SetState(SCE_STATA_COMMENT);\n            }\n            else if (sc.Match('/', '*')) {\n                sc.SetState(SCE_STATA_COMMENTBLOCK);\n                sc.Forward();\t// Eat the * so it isn't used for the end of the comment\n            }\n            else if (sc.Match('/', '/')) {\n                sc.SetState(SCE_STATA_COMMENTLINE);\n            }\n            else if (sc.ch == '\\\"') {\n                lineHasNonCommentChar = true;\n                sc.SetState(SCE_STATA_STRING);\n            }\n            else if (isoperator(sc.ch)) {\n                lineHasNonCommentChar = true;\n                sc.SetState(SCE_STATA_OPERATOR);\n            }\n        }\n    }\n\n    sc.Complete();\n}\n\n// Store both the current line's fold level and the next lines in the\n// level store to make it easy to pick up with each increment\n// and to make it possible to fiddle the current level for \"} else {\".\nstatic void FoldStataDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[],\n    Accessor &styler) {\n    bool foldCompact = styler.GetPropertyInt(\"fold.compact\", 1) != 0;\n    bool foldAtElse = styler.GetPropertyInt(\"fold.at.else\", 0) != 0;\n    Sci_PositionU endPos = startPos + length;\n    int visibleChars = 0;\n    Sci_Position lineCurrent = styler.GetLine(startPos);\n    int levelCurrent = SC_FOLDLEVELBASE;\n    if (lineCurrent > 0)\n        levelCurrent = styler.LevelAt(lineCurrent - 1) >> 16;\n    int levelMinCurrent = levelCurrent;\n    int levelNext = levelCurrent;\n    char chNext = styler[startPos];\n    int styleNext = styler.StyleAt(startPos);\n    for (Sci_PositionU i = startPos; i < endPos; i++) {\n        char ch = chNext;\n        chNext = styler.SafeGetCharAt(i + 1);\n        int style = styleNext;\n        styleNext = styler.StyleAt(i + 1);\n        bool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n        if (style == SCE_R_OPERATOR) {\n            if (ch == '{') {\n                // Measure the minimum before a '{' to allow\n                // folding on \"} else {\"\n                if (levelMinCurrent > levelNext) {\n                    levelMinCurrent = levelNext;\n                }\n                levelNext++;\n            }\n            else if (ch == '}') {\n                levelNext--;\n            }\n        }\n        if (atEOL) {\n            int levelUse = levelCurrent;\n            if (foldAtElse) {\n                levelUse = levelMinCurrent;\n            }\n            int lev = levelUse | levelNext << 16;\n            if (visibleChars == 0 && foldCompact)\n                lev |= SC_FOLDLEVELWHITEFLAG;\n            if (levelUse < levelNext)\n                lev |= SC_FOLDLEVELHEADERFLAG;\n            if (lev != styler.LevelAt(lineCurrent)) {\n                styler.SetLevel(lineCurrent, lev);\n            }\n            lineCurrent++;\n            levelCurrent = levelNext;\n            levelMinCurrent = levelCurrent;\n            visibleChars = 0;\n        }\n        if (!isspacechar(ch))\n            visibleChars++;\n    }\n}\n\n\nstatic const char * const StataWordLists[] = {\n    \"Language Keywords\",\n    \"Types\",\n    0,\n};\n\nLexerModule lmStata(SCLEX_STATA, ColouriseStataDoc, \"stata\", FoldStataDoc, StataWordLists);\n"
  },
  {
    "path": "lexilla/lexers/LexTACL.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexTACL.cxx\n ** Lexer for TACL\n ** Based on LexPascal.cxx\n ** Written by Laurent le Tynevez\n ** Updated by Simon Steele <s.steele@pnotepad.org> September 2002\n ** Updated by Mathias Rauen <scite@madshi.net> May 2003 (Delphi adjustments)\n ** Updated by Rod Falck, Aug 2006 Converted to TACL\n **/\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\ninline bool isTACLoperator(char ch)\n\t{\n\treturn ch == '\\'' || isoperator(ch);\n\t}\n\ninline bool isTACLwordchar(char ch)\n\t{\n\treturn ch == '#' || ch == '^' || ch == '|' || ch == '_' || iswordchar(ch);\n\t}\n\ninline bool isTACLwordstart(char ch)\n\t{\n\treturn ch == '#' || ch == '|' || ch == '_' || iswordstart(ch);\n\t}\n\nstatic void getRange(Sci_PositionU start,\n\t\tSci_PositionU end,\n\t\tAccessor &styler,\n\t\tchar *s,\n\t\tSci_PositionU len) {\n\tSci_PositionU i = 0;\n\twhile ((i < end - start + 1) && (i < len-1)) {\n\t\ts[i] = static_cast<char>(tolower(styler[start + i]));\n\t\ti++;\n\t}\n\ts[i] = '\\0';\n}\n\nstatic bool IsStreamCommentStyle(int style) {\n\treturn style == SCE_C_COMMENT ||\n\t\tstyle == SCE_C_COMMENTDOC ||\n\t\tstyle == SCE_C_COMMENTDOCKEYWORD ||\n\t\tstyle == SCE_C_COMMENTDOCKEYWORDERROR;\n}\n\nstatic void ColourTo(Accessor &styler, Sci_PositionU end, unsigned int attr, bool bInAsm) {\n\tif ((bInAsm) && (attr == SCE_C_OPERATOR || attr == SCE_C_NUMBER || attr == SCE_C_DEFAULT || attr == SCE_C_WORD || attr == SCE_C_IDENTIFIER)) {\n\t\tstyler.ColourTo(end, SCE_C_REGEX);\n\t} else\n\t\tstyler.ColourTo(end, attr);\n}\n\n// returns 1 if the item starts a class definition, and -1 if the word is \"end\", and 2 if the word is \"asm\"\nstatic int classifyWordTACL(Sci_PositionU start, Sci_PositionU end, /*WordList &keywords*/WordList *keywordlists[], Accessor &styler, bool bInAsm) {\n\tint ret = 0;\n\n\tWordList& keywords = *keywordlists[0];\n\tWordList& builtins = *keywordlists[1];\n\tWordList& commands = *keywordlists[2];\n\n\tchar s[100];\n\tgetRange(start, end, styler, s, sizeof(s));\n\n\tchar chAttr = SCE_C_IDENTIFIER;\n\tif (isdigit(s[0]) || (s[0] == '.')) {\n\t\tchAttr = SCE_C_NUMBER;\n\t}\n\telse {\n\t\tif (s[0] == '#' || keywords.InList(s)) {\n\t\t\tchAttr = SCE_C_WORD;\n\n\t\t\tif (strcmp(s, \"asm\") == 0) {\n\t\t\t\tret = 2;\n\t\t\t}\n\t\t\telse if (strcmp(s, \"end\") == 0) {\n\t\t\t\tret = -1;\n\t\t\t}\n\t\t}\n\t\telse if (s[0] == '|' || builtins.InList(s)) {\n\t\t\tchAttr = SCE_C_WORD2;\n\t\t}\n\t\telse if (commands.InList(s)) {\n\t\t\tchAttr = SCE_C_UUID;\n\t\t}\n\t\telse if (strcmp(s, \"comment\") == 0) {\n\t\t\tchAttr = SCE_C_COMMENTLINE;\n\t\t\tret = 3;\n\t\t}\n\t}\n\tColourTo(styler, end, chAttr, (bInAsm && ret != -1));\n\treturn ret;\n}\n\nstatic int classifyFoldPointTACL(const char* s) {\n\tint lev = 0;\n\tif (s[0] == '[')\n\t\tlev=1;\n\telse if (s[0] == ']')\n\t\tlev=-1;\n\treturn lev;\n}\n\nstatic void ColouriseTACLDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[],\n\tAccessor &styler) {\n\n\tstyler.StartAt(startPos);\n\n\tint state = initStyle;\n\tif (state == SCE_C_CHARACTER)\t// Does not leak onto next line\n\t\tstate = SCE_C_DEFAULT;\n\tchar chPrev = ' ';\n\tchar chNext = styler[startPos];\n\tSci_PositionU lengthDoc = startPos + length;\n\n\tbool bInClassDefinition;\n\n\tSci_Position currentLine = styler.GetLine(startPos);\n\tif (currentLine > 0) {\n\t\tstyler.SetLineState(currentLine, styler.GetLineState(currentLine-1));\n\t\tbInClassDefinition = (styler.GetLineState(currentLine) == 1);\n\t} else {\n\t\tstyler.SetLineState(currentLine, 0);\n\t\tbInClassDefinition = false;\n\t}\n\n\tbool bInAsm = (state == SCE_C_REGEX);\n\tif (bInAsm)\n\t\tstate = SCE_C_DEFAULT;\n\n\tstyler.StartSegment(startPos);\n\tint visibleChars = 0;\n\tSci_PositionU i;\n\tfor (i = startPos; i < lengthDoc; i++) {\n\t\tchar ch = chNext;\n\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\n\t\tif ((ch == '\\r' && chNext != '\\n') || (ch == '\\n')) {\n\t\t\t// Trigger on CR only (Mac style) or either on LF from CR+LF (Dos/Win) or on LF alone (Unix)\n\t\t\t// Avoid triggering two times on Dos/Win\n\t\t\t// End of line\n\t\t\tif (state == SCE_C_CHARACTER) {\n\t\t\t\tColourTo(styler, i, state, bInAsm);\n\t\t\t\tstate = SCE_C_DEFAULT;\n\t\t\t}\n\t\t\tvisibleChars = 0;\n\t\t\tcurrentLine++;\n\t\t\tstyler.SetLineState(currentLine, (bInClassDefinition ? 1 : 0));\n\t\t}\n\n\t\tif (styler.IsLeadByte(ch)) {\n\t\t\tchNext = styler.SafeGetCharAt(i + 2);\n\t\t\tchPrev = ' ';\n\t\t\ti += 1;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (state == SCE_C_DEFAULT) {\n\t\t\tif (isTACLwordstart(ch)) {\n\t\t\t\tColourTo(styler, i-1, state, bInAsm);\n\t\t\t\tstate = SCE_C_IDENTIFIER;\n\t\t\t} else if (ch == '{') {\n\t\t\t\tColourTo(styler, i-1, state, bInAsm);\n\t\t\t\tstate = SCE_C_COMMENT;\n\t\t\t} else if (ch == '{' && chNext == '*') {\n\t\t\t\tColourTo(styler, i-1, state, bInAsm);\n\t\t\t\tstate = SCE_C_COMMENTDOC;\n\t\t\t} else if (ch == '=' && chNext == '=') {\n\t\t\t\tColourTo(styler, i-1, state, bInAsm);\n\t\t\t\tstate = SCE_C_COMMENTLINE;\n\t\t\t} else if (ch == '\"') {\n\t\t\t\tColourTo(styler, i-1, state, bInAsm);\n\t\t\t\tstate = SCE_C_STRING;\n\t\t\t} else if (ch == '?' && visibleChars == 0) {\n\t\t\t\tColourTo(styler, i-1, state, bInAsm);\n\t\t\t\tstate = SCE_C_PREPROCESSOR;\n\t\t\t} else if (isTACLoperator(ch)) {\n\t\t\t\tColourTo(styler, i-1, state, bInAsm);\n\t\t\t\tColourTo(styler, i, SCE_C_OPERATOR, bInAsm);\n\t\t\t}\n\t\t} else if (state == SCE_C_IDENTIFIER) {\n\t\t\tif (!isTACLwordchar(ch)) {\n\t\t\t\tint lStateChange = classifyWordTACL(styler.GetStartSegment(), i - 1, keywordlists, styler, bInAsm);\n\n\t\t\t\tif(lStateChange == 1) {\n\t\t\t\t\tstyler.SetLineState(currentLine, 1);\n\t\t\t\t\tbInClassDefinition = true;\n\t\t\t\t} else if(lStateChange == 2) {\n\t\t\t\t\tbInAsm = true;\n\t\t\t\t} else if(lStateChange == -1) {\n\t\t\t\t\tstyler.SetLineState(currentLine, 0);\n\t\t\t\t\tbInClassDefinition = false;\n\t\t\t\t\tbInAsm = false;\n\t\t\t\t}\n\n\t\t\t\tif (lStateChange == 3) {\n\t\t\t\t\t state = SCE_C_COMMENTLINE;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tstate = SCE_C_DEFAULT;\n\t\t\t\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\t\t\t\tif (ch == '{') {\n\t\t\t\t\t\tstate = SCE_C_COMMENT;\n\t\t\t\t\t} else if (ch == '{' && chNext == '*') {\n\t\t\t\t\t\tColourTo(styler, i-1, state, bInAsm);\n\t\t\t\t\t\tstate = SCE_C_COMMENTDOC;\n\t\t\t\t\t} else if (ch == '=' && chNext == '=') {\n\t\t\t\t\t\tstate = SCE_C_COMMENTLINE;\n\t\t\t\t\t} else if (ch == '\"') {\n\t\t\t\t\t\tstate = SCE_C_STRING;\n\t\t\t\t\t} else if (isTACLoperator(ch)) {\n\t\t\t\t\t\tColourTo(styler, i, SCE_C_OPERATOR, bInAsm);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif (state == SCE_C_PREPROCESSOR) {\n\t\t\t\tif ((ch == '\\r' || ch == '\\n') && !(chPrev == '\\\\' || chPrev == '\\r')) {\n\t\t\t\t\tColourTo(styler, i-1, state, bInAsm);\n\t\t\t\t\tstate = SCE_C_DEFAULT;\n\t\t\t\t}\n\t\t\t} else if (state == SCE_C_COMMENT) {\n\t\t\t\tif (ch == '}' || (ch == '\\r' || ch == '\\n') ) {\n\t\t\t\t\tColourTo(styler, i, state, bInAsm);\n\t\t\t\t\tstate = SCE_C_DEFAULT;\n\t\t\t\t}\n\t\t\t} else if (state == SCE_C_COMMENTDOC) {\n\t\t\t\tif (ch == '}' || (ch == '\\r' || ch == '\\n')) {\n\t\t\t\t\tif (((i > styler.GetStartSegment() + 2) || (\n\t\t\t\t\t\t(initStyle == SCE_C_COMMENTDOC) &&\n\t\t\t\t\t\t(styler.GetStartSegment() == static_cast<Sci_PositionU>(startPos))))) {\n\t\t\t\t\t\t\tColourTo(styler, i, state, bInAsm);\n\t\t\t\t\t\t\tstate = SCE_C_DEFAULT;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (state == SCE_C_COMMENTLINE) {\n\t\t\t\tif (ch == '\\r' || ch == '\\n') {\n\t\t\t\t\tColourTo(styler, i-1, state, bInAsm);\n\t\t\t\t\tstate = SCE_C_DEFAULT;\n\t\t\t\t}\n\t\t\t} else if (state == SCE_C_STRING) {\n\t\t\t\tif (ch == '\"' || ch == '\\r' || ch == '\\n') {\n\t\t\t\t\tColourTo(styler, i, state, bInAsm);\n\t\t\t\t\tstate = SCE_C_DEFAULT;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n        if (!isspacechar(ch))\n            visibleChars++;\n\t\tchPrev = ch;\n\t}\n\n\t// Process to end of document\n\tif (state == SCE_C_IDENTIFIER) {\n\t\tclassifyWordTACL(styler.GetStartSegment(), i - 1, keywordlists, styler, bInAsm);\n\t\t}\n\telse\n\t\tColourTo(styler, lengthDoc - 1, state, bInAsm);\n}\n\nstatic void FoldTACLDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *[],\n                            Accessor &styler) {\n\tbool foldComment = styler.GetPropertyInt(\"fold.comment\") != 0;\n\tbool foldPreprocessor = styler.GetPropertyInt(\"fold.preprocessor\") != 0;\n\tbool foldCompact = styler.GetPropertyInt(\"fold.compact\", 1) != 0;\n\tSci_PositionU endPos = startPos + length;\n\tint visibleChars = 0;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tint levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK;\n\tint levelCurrent = levelPrev;\n\tchar chNext = styler[startPos];\n\tint styleNext = styler.StyleAt(startPos);\n\tint style = initStyle;\n\tbool section = false;\n\n\tSci_Position lastStart = 0;\n\n\tfor (Sci_PositionU i = startPos; i < endPos; i++) {\n\t\tchar ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\tint stylePrev = style;\n\t\tstyle = styleNext;\n\t\tstyleNext = styler.StyleAt(i + 1);\n\t\tbool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n\n\t\tif (stylePrev == SCE_C_DEFAULT && (style == SCE_C_WORD || style == SCE_C_PREPROCESSOR))\n\t\t{\n\t\t\t// Store last word start point.\n\t\t\tlastStart = i;\n\t\t}\n\n\t\tif (stylePrev == SCE_C_WORD || stylePrev == SCE_C_PREPROCESSOR) {\n\t\t\tif(isTACLwordchar(ch) && !isTACLwordchar(chNext)) {\n\t\t\t\tchar s[100];\n\t\t\t\tgetRange(lastStart, i, styler, s, sizeof(s));\n\t\t\t\tif (stylePrev == SCE_C_PREPROCESSOR && strcmp(s, \"?section\") == 0)\n\t\t\t\t\t{\n\t\t\t\t\tsection = true;\n\t\t\t\t\tlevelCurrent = 1;\n\t\t\t\t\tlevelPrev = 0;\n\t\t\t\t\t}\n\t\t\t\telse if (stylePrev == SCE_C_WORD)\n\t\t\t\t\tlevelCurrent += classifyFoldPointTACL(s);\n\t\t\t}\n\t\t}\n\n\t\tif (style == SCE_C_OPERATOR) {\n\t\t\tif (ch == '[') {\n\t\t\t\tlevelCurrent++;\n\t\t\t} else if (ch == ']') {\n\t\t\t\tlevelCurrent--;\n\t\t\t}\n\t\t}\n\t\tif (foldComment && (style == SCE_C_COMMENTLINE)) {\n\t\t\tif ((ch == '/') && (chNext == '/')) {\n\t\t\t\tchar chNext2 = styler.SafeGetCharAt(i + 2);\n\t\t\t\tif (chNext2 == '{') {\n\t\t\t\t\tlevelCurrent++;\n\t\t\t\t} else if (chNext2 == '}') {\n\t\t\t\t\tlevelCurrent--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (foldPreprocessor && (style == SCE_C_PREPROCESSOR)) {\n\t\t\tif (ch == '{' && chNext == '$') {\n\t\t\t\tSci_PositionU j=i+2; // skip {$\n\t\t\t\twhile ((j<endPos) && IsASpaceOrTab(styler.SafeGetCharAt(j))) {\n\t\t\t\t\tj++;\n\t\t\t\t}\n\t\t\t\tif (styler.Match(j, \"region\") || styler.Match(j, \"if\")) {\n\t\t\t\t\tlevelCurrent++;\n\t\t\t\t} else if (styler.Match(j, \"end\")) {\n\t\t\t\t\tlevelCurrent--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (foldComment && IsStreamCommentStyle(style)) {\n\t\t\tif (!IsStreamCommentStyle(stylePrev)) {\n\t\t\t\tlevelCurrent++;\n\t\t\t} else if (!IsStreamCommentStyle(styleNext) && !atEOL) {\n\t\t\t\t// Comments don't end at end of line and the next character may be unstyled.\n\t\t\t\tlevelCurrent--;\n\t\t\t}\n\t\t}\n\t\tif (atEOL) {\n\t\t\tint lev = levelPrev | SC_FOLDLEVELBASE;\n\t\t\tif (visibleChars == 0 && foldCompact)\n\t\t\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\t\t\tif ((levelCurrent > levelPrev || section) && (visibleChars > 0))\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\tif (lev != styler.LevelAt(lineCurrent)) {\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\t\t\t}\n\t\t\tlineCurrent++;\n\t\t\tlevelPrev = levelCurrent;\n\t\t\tvisibleChars = 0;\n\t\t\tsection = false;\n\t\t}\n\n\t\tif (!isspacechar(ch))\n\t\t\tvisibleChars++;\n\t}\n\n\t// Fill in the real level of the next line, keeping the current flags as they will be filled in later\n\tint flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK;\n\tstyler.SetLevel(lineCurrent, levelPrev | flagsNext);\n}\n\nstatic const char * const TACLWordListDesc[] = {\n\t\"Builtins\",\n\t\"Labels\",\n\t\"Commands\",\n\t0\n};\n\nLexerModule lmTACL(SCLEX_TACL, ColouriseTACLDoc, \"TACL\", FoldTACLDoc, TACLWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexTADS3.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexTADS3.cxx\n ** Lexer for TADS3.\n **/\n// Copyright 1998-2006 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n/*\n * TADS3 is a language designed by Michael J. Roberts for the writing of text\n * based games.  TADS comes from Text Adventure Development System.  It has good\n * support for the processing and outputting of formatted text and much of a\n * TADS program listing consists of strings.\n *\n * TADS has two types of strings, those enclosed in single quotes (') and those\n * enclosed in double quotes (\").  These strings have different symantics and\n * can be given different highlighting if desired.\n *\n * There can be embedded within both types of strings html tags\n * ( <tag key=value> ), library directives ( <.directive> ), and message\n * parameters ( {The doctor's/his} ).\n *\n * Double quoted strings can also contain interpolated expressions\n * ( << rug.moved ? ' and a hole in the floor. ' : nil >> ).  These expressions\n * may themselves contain single or double quoted strings, although the double\n * quoted strings may not contain interpolated expressions.\n *\n * These embedded constructs influence the output and formatting and are an\n * important part of a program and require highlighting.\n *\n * LINKS\n * http://www.tads.org/\n */\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nstatic const int T3_SINGLE_QUOTE = 1;\nstatic const int T3_INT_EXPRESSION = 2;\nstatic const int T3_INT_EXPRESSION_IN_TAG = 4;\nstatic const int T3_HTML_SQUOTE = 8;\n\nstatic inline bool IsEOL(const int ch, const int chNext) {\n        return (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n}\n\n/*\n *   Test the current character to see if it's the START of an EOL sequence;\n *   if so, skip ahead to the last character of the sequence and return true,\n *   and if not just return false.  There are a few places where we want to\n *   check to see if a newline sequence occurs at a particular point, but\n *   where a caller expects a subroutine to stop only upon reaching the END\n *   of a newline sequence (in particular, CR-LF on Windows).  That's why\n *   IsEOL() above only returns true on CR if the CR isn't followed by an LF\n *   - it doesn't want to admit that there's a newline until reaching the END\n *   of the sequence.  We meet both needs by saying that there's a newline\n *   when we see the CR in a CR-LF, but skipping the CR before returning so\n *   that the caller's caller will see that we've stopped at the LF.\n */\nstatic inline bool IsEOLSkip(StyleContext &sc)\n{\n    /* test for CR-LF */\n    if (sc.ch == '\\r' && sc.chNext == '\\n')\n    {\n        /* got CR-LF - skip the CR and indicate that we're at a newline */\n        sc.Forward();\n        return true;\n    }\n\n    /*\n     *   in other cases, we have at most a 1-character newline, so do the\n     *   normal IsEOL test\n     */\n    return IsEOL(sc.ch, sc.chNext);\n}\n\nstatic inline bool IsATADS3Operator(const int ch) {\n        return ch == '=' || ch == '{' || ch == '}' || ch == '(' || ch == ')'\n                || ch == '[' || ch == ']' || ch == ',' || ch == ':' || ch == ';'\n                || ch == '+' || ch == '-' || ch == '*' || ch == '/' || ch == '%'\n                || ch == '?' || ch == '!' || ch == '<' || ch == '>' || ch == '|'\n                || ch == '@' || ch == '&' || ch == '~';\n}\n\nstatic inline bool IsAWordChar(const int ch) {\n        return isalnum(ch) || ch == '_';\n}\n\nstatic inline bool IsAWordStart(const int ch) {\n        return isalpha(ch) || ch == '_';\n}\n\nstatic inline bool IsAHexDigit(const int ch) {\n        int lch = tolower(ch);\n        return isdigit(lch) || lch == 'a' || lch == 'b' || lch == 'c'\n                || lch == 'd' || lch == 'e' || lch == 'f';\n}\n\nstatic inline bool IsAnHTMLChar(int ch) {\n        return isalnum(ch) || ch == '-' || ch == '_' || ch == '.';\n}\n\nstatic inline bool IsADirectiveChar(int ch) {\n        return isalnum(ch) || isspace(ch) || ch == '-' || ch == '/';\n}\n\nstatic inline bool IsANumberStart(StyleContext &sc) {\n        return isdigit(sc.ch)\n                || (!isdigit(sc.chPrev) && sc.ch == '.' && isdigit(sc.chNext));\n}\n\ninline static void ColouriseTADS3Operator(StyleContext &sc) {\n        int initState = sc.state;\n        int c = sc.ch;\n        sc.SetState(c == '{' || c == '}' ? SCE_T3_BRACE : SCE_T3_OPERATOR);\n        sc.ForwardSetState(initState);\n}\n\nstatic void ColouriseTADSHTMLString(StyleContext &sc, int &lineState) {\n        int endState = sc.state;\n        int chQuote = sc.ch;\n        int chString = (lineState & T3_SINGLE_QUOTE) ? '\\'' : '\"';\n        if (endState == SCE_T3_HTML_STRING) {\n                if (lineState&T3_SINGLE_QUOTE) {\n                        endState = SCE_T3_S_STRING;\n                        chString = '\\'';\n                } else if (lineState&T3_INT_EXPRESSION) {\n                        endState = SCE_T3_X_STRING;\n                        chString = '\"';\n                } else {\n                        endState = SCE_T3_HTML_DEFAULT;\n                        chString = '\"';\n                }\n                chQuote = (lineState & T3_HTML_SQUOTE) ? '\\'' : '\"';\n        } else {\n                sc.SetState(SCE_T3_HTML_STRING);\n                sc.Forward();\n        }\n        if (chQuote == '\"')\n                lineState &= ~T3_HTML_SQUOTE;\n        else\n                lineState |= T3_HTML_SQUOTE;\n\n        while (sc.More()) {\n                if (IsEOL(sc.ch, sc.chNext)) {\n                        return;\n                }\n                if (sc.ch == chQuote) {\n                        sc.ForwardSetState(endState);\n                        return;\n                }\n                if (sc.Match('\\\\', static_cast<char>(chQuote))) {\n                        sc.Forward(2);\n                        sc.SetState(endState);\n                        return;\n                }\n                if (sc.ch == chString) {\n                        sc.SetState(SCE_T3_DEFAULT);\n                        return;\n                }\n\n                if (sc.Match('<', '<')) {\n                        lineState |= T3_INT_EXPRESSION | T3_INT_EXPRESSION_IN_TAG;\n                        sc.SetState(SCE_T3_X_DEFAULT);\n                        sc.Forward(2);\n                        return;\n                }\n\n                if (sc.Match('\\\\', static_cast<char>(chQuote))\n                        || sc.Match('\\\\', static_cast<char>(chString))\n                        || sc.Match('\\\\', '\\\\')) {\n                        sc.Forward(2);\n                } else {\n                        sc.Forward();\n                }\n        }\n}\n\nstatic void ColouriseTADS3HTMLTagStart(StyleContext &sc) {\n        sc.SetState(SCE_T3_HTML_TAG);\n        sc.Forward();\n        if (sc.ch == '/') {\n                sc.Forward();\n        }\n        while (IsAnHTMLChar(sc.ch)) {\n                sc.Forward();\n        }\n}\n\nstatic void ColouriseTADS3HTMLTag(StyleContext &sc, int &lineState) {\n        int endState = sc.state;\n        int chQuote = '\"';\n        int chString = '\\'';\n        switch (endState) {\n                case SCE_T3_S_STRING:\n                        ColouriseTADS3HTMLTagStart(sc);\n                        sc.SetState(SCE_T3_HTML_DEFAULT);\n                        chQuote = '\\'';\n                        chString = '\"';\n                        break;\n                case SCE_T3_D_STRING:\n                case SCE_T3_X_STRING:\n                        ColouriseTADS3HTMLTagStart(sc);\n                        sc.SetState(SCE_T3_HTML_DEFAULT);\n                        break;\n                case SCE_T3_HTML_DEFAULT:\n                        if (lineState&T3_SINGLE_QUOTE) {\n                                endState = SCE_T3_S_STRING;\n                                chQuote = '\\'';\n                                chString = '\"';\n                        } else if (lineState&T3_INT_EXPRESSION) {\n                                endState = SCE_T3_X_STRING;\n                        } else {\n                                endState = SCE_T3_D_STRING;\n                        }\n                        break;\n        }\n\n        while (sc.More()) {\n                if (IsEOL(sc.ch, sc.chNext)) {\n                        return;\n                }\n                if (sc.Match('/', '>')) {\n                        sc.SetState(SCE_T3_HTML_TAG);\n                        sc.Forward(2);\n                        sc.SetState(endState);\n                        return;\n                }\n                if (sc.ch == '>') {\n                        sc.SetState(SCE_T3_HTML_TAG);\n                        sc.ForwardSetState(endState);\n                        return;\n                }\n                if (sc.ch == chQuote) {\n                        sc.SetState(endState);\n                        return;\n                }\n                if (sc.Match('\\\\', static_cast<char>(chQuote))) {\n                        sc.Forward();\n                        ColouriseTADSHTMLString(sc, lineState);\n                        if (sc.state == SCE_T3_X_DEFAULT)\n                            break;\n                } else if (sc.ch == chString) {\n                        ColouriseTADSHTMLString(sc, lineState);\n                } else if (sc.ch == '=') {\n                        ColouriseTADS3Operator(sc);\n                } else {\n                        sc.Forward();\n                }\n        }\n}\n\nstatic void ColouriseTADS3Keyword(StyleContext &sc,\n                                                        WordList *keywordlists[],       Sci_PositionU endPos) {\n        char s[250];\n        WordList &keywords = *keywordlists[0];\n        WordList &userwords1 = *keywordlists[1];\n        WordList &userwords2 = *keywordlists[2];\n        WordList &userwords3 = *keywordlists[3];\n        int initState = sc.state;\n        sc.SetState(SCE_T3_IDENTIFIER);\n        while (sc.More() && (IsAWordChar(sc.ch))) {\n                sc.Forward();\n        }\n        sc.GetCurrent(s, sizeof(s));\n        if ( strcmp(s, \"is\") == 0 || strcmp(s, \"not\") == 0) {\n                // have to find if \"in\" is next\n                Sci_Position n = 1;\n                while (n + sc.currentPos < endPos && IsASpaceOrTab(sc.GetRelative(n)))\n                        n++;\n                if (sc.GetRelative(n) == 'i' && sc.GetRelative(n+1) == 'n') {\n                        sc.Forward(n+2);\n                        sc.ChangeState(SCE_T3_KEYWORD);\n                }\n        } else if (keywords.InList(s)) {\n                sc.ChangeState(SCE_T3_KEYWORD);\n        } else if (userwords3.InList(s)) {\n                sc.ChangeState(SCE_T3_USER3);\n        } else if (userwords2.InList(s)) {\n                sc.ChangeState(SCE_T3_USER2);\n        } else if (userwords1.InList(s)) {\n                sc.ChangeState(SCE_T3_USER1);\n        }\n        sc.SetState(initState);\n}\n\nstatic void ColouriseTADS3MsgParam(StyleContext &sc, int &lineState) {\n        int endState = sc.state;\n        int chQuote = '\"';\n        switch (endState) {\n                case SCE_T3_S_STRING:\n                        sc.SetState(SCE_T3_MSG_PARAM);\n                        sc.Forward();\n                        chQuote = '\\'';\n                        break;\n                case SCE_T3_D_STRING:\n                case SCE_T3_X_STRING:\n                        sc.SetState(SCE_T3_MSG_PARAM);\n                        sc.Forward();\n                        break;\n                case SCE_T3_MSG_PARAM:\n                        if (lineState&T3_SINGLE_QUOTE) {\n                                endState = SCE_T3_S_STRING;\n                                chQuote = '\\'';\n                        } else if (lineState&T3_INT_EXPRESSION) {\n                                endState = SCE_T3_X_STRING;\n                        } else {\n                                endState = SCE_T3_D_STRING;\n                        }\n                        break;\n        }\n        while (sc.More() && sc.ch != '}' && sc.ch != chQuote) {\n                if (IsEOL(sc.ch, sc.chNext)) {\n                        return;\n                }\n                if (sc.ch == '\\\\') {\n                        sc.Forward();\n                }\n                sc.Forward();\n        }\n        if (sc.ch == chQuote) {\n                sc.SetState(endState);\n        } else {\n                sc.ForwardSetState(endState);\n        }\n}\n\nstatic void ColouriseTADS3LibDirective(StyleContext &sc, int &lineState) {\n        int initState = sc.state;\n        int chQuote = '\"';\n        switch (initState) {\n                case SCE_T3_S_STRING:\n                        sc.SetState(SCE_T3_LIB_DIRECTIVE);\n                        sc.Forward(2);\n                        chQuote = '\\'';\n                        break;\n                case SCE_T3_D_STRING:\n                        sc.SetState(SCE_T3_LIB_DIRECTIVE);\n                        sc.Forward(2);\n                        break;\n                case SCE_T3_LIB_DIRECTIVE:\n                        if (lineState&T3_SINGLE_QUOTE) {\n                                initState = SCE_T3_S_STRING;\n                                chQuote = '\\'';\n                        } else {\n                                initState = SCE_T3_D_STRING;\n                        }\n                        break;\n        }\n        while (sc.More() && IsADirectiveChar(sc.ch)) {\n                if (IsEOL(sc.ch, sc.chNext)) {\n                        return;\n                }\n                sc.Forward();\n        };\n        if (sc.ch == '>' || !sc.More()) {\n                sc.ForwardSetState(initState);\n        } else if (sc.ch == chQuote) {\n                sc.SetState(initState);\n        } else {\n                sc.ChangeState(initState);\n                sc.Forward();\n        }\n}\n\nstatic void ColouriseTADS3String(StyleContext &sc, int &lineState) {\n        int chQuote = sc.ch;\n        int endState = sc.state;\n        switch (sc.state) {\n                case SCE_T3_DEFAULT:\n                case SCE_T3_X_DEFAULT:\n                        if (chQuote == '\"') {\n                                if (sc.state == SCE_T3_DEFAULT) {\n                                        sc.SetState(SCE_T3_D_STRING);\n                                } else {\n                                        sc.SetState(SCE_T3_X_STRING);\n                                }\n                                lineState &= ~T3_SINGLE_QUOTE;\n                        } else {\n                                sc.SetState(SCE_T3_S_STRING);\n                                lineState |= T3_SINGLE_QUOTE;\n                        }\n                        sc.Forward();\n                        break;\n                case SCE_T3_S_STRING:\n                        chQuote = '\\'';\n                        endState = lineState&T3_INT_EXPRESSION ?\n                                SCE_T3_X_DEFAULT : SCE_T3_DEFAULT;\n                        break;\n                case SCE_T3_D_STRING:\n                        chQuote = '\"';\n                        endState = SCE_T3_DEFAULT;\n                        break;\n                case SCE_T3_X_STRING:\n                        chQuote = '\"';\n                        endState = SCE_T3_X_DEFAULT;\n                        break;\n        }\n        while (sc.More()) {\n                if (IsEOL(sc.ch, sc.chNext)) {\n                        return;\n                }\n                if (sc.ch == chQuote) {\n                        sc.ForwardSetState(endState);\n                        return;\n                }\n                if (sc.state == SCE_T3_D_STRING && sc.Match('<', '<')) {\n                        lineState |= T3_INT_EXPRESSION;\n                        sc.SetState(SCE_T3_X_DEFAULT);\n                        sc.Forward(2);\n                        return;\n                }\n                if (sc.Match('\\\\', static_cast<char>(chQuote))\n                    || sc.Match('\\\\', '\\\\')) {\n                        sc.Forward(2);\n                } else if (sc.ch == '{') {\n                        ColouriseTADS3MsgParam(sc, lineState);\n                } else if (sc.Match('<', '.')) {\n                        ColouriseTADS3LibDirective(sc, lineState);\n                } else if (sc.ch == '<') {\n                        ColouriseTADS3HTMLTag(sc, lineState);\n                        if (sc.state == SCE_T3_X_DEFAULT)\n                                return;\n                } else {\n                        sc.Forward();\n                }\n        }\n}\n\nstatic void ColouriseTADS3Comment(StyleContext &sc, int endState) {\n        sc.SetState(SCE_T3_BLOCK_COMMENT);\n        while (sc.More()) {\n                if (IsEOL(sc.ch, sc.chNext)) {\n                        return;\n                }\n                if (sc.Match('*', '/')) {\n                        sc.Forward(2);\n                        sc.SetState(endState);\n                        return;\n                }\n                sc.Forward();\n        }\n}\n\nstatic void ColouriseToEndOfLine(StyleContext &sc, int initState, int endState) {\n        sc.SetState(initState);\n        while (sc.More()) {\n                if (sc.ch == '\\\\') {\n                        sc.Forward();\n                        if (IsEOLSkip(sc)) {\n                                        return;\n                        }\n                }\n                if (IsEOL(sc.ch, sc.chNext)) {\n                        sc.SetState(endState);\n                        return;\n                }\n                sc.Forward();\n        }\n}\n\nstatic void ColouriseTADS3Number(StyleContext &sc) {\n        int endState = sc.state;\n        bool inHexNumber = false;\n        bool seenE = false;\n        bool seenDot = sc.ch == '.';\n        sc.SetState(SCE_T3_NUMBER);\n        if (sc.More()) {\n                sc.Forward();\n        }\n        if (sc.chPrev == '0' && tolower(sc.ch) == 'x') {\n                inHexNumber = true;\n                sc.Forward();\n        }\n        while (sc.More()) {\n                if (inHexNumber) {\n                        if (!IsAHexDigit(sc.ch)) {\n                                break;\n                        }\n                } else if (!isdigit(sc.ch)) {\n                        if (!seenE && tolower(sc.ch) == 'e') {\n                                seenE = true;\n                                seenDot = true;\n                                if (sc.chNext == '+' || sc.chNext == '-') {\n                                        sc.Forward();\n                                }\n                        } else if (!seenDot && sc.ch == '.') {\n                                seenDot = true;\n                        } else {\n                                break;\n                        }\n                }\n                sc.Forward();\n        }\n        sc.SetState(endState);\n}\n\nstatic void ColouriseTADS3Doc(Sci_PositionU startPos, Sci_Position length, int initStyle,\n                                                           WordList *keywordlists[], Accessor &styler) {\n        int visibleChars = 0;\n        int bracketLevel = 0;\n        int lineState = 0;\n        Sci_PositionU endPos = startPos + length;\n        Sci_Position lineCurrent = styler.GetLine(startPos);\n        if (lineCurrent > 0) {\n                lineState = styler.GetLineState(lineCurrent-1);\n        }\n        StyleContext sc(startPos, length, initStyle, styler);\n\n        while (sc.More()) {\n\n                if (IsEOL(sc.ch, sc.chNext)) {\n                        styler.SetLineState(lineCurrent, lineState);\n                        lineCurrent++;\n                        visibleChars = 0;\n                        sc.Forward();\n                        if (sc.ch == '\\n') {\n                                sc.Forward();\n                        }\n                }\n\n                switch(sc.state) {\n                        case SCE_T3_PREPROCESSOR:\n                        case SCE_T3_LINE_COMMENT:\n                                ColouriseToEndOfLine(sc, sc.state, lineState&T3_INT_EXPRESSION ?\n                                        SCE_T3_X_DEFAULT : SCE_T3_DEFAULT);\n                                break;\n                        case SCE_T3_S_STRING:\n                        case SCE_T3_D_STRING:\n                        case SCE_T3_X_STRING:\n                                ColouriseTADS3String(sc, lineState);\n                                visibleChars++;\n                                break;\n                        case SCE_T3_MSG_PARAM:\n                                ColouriseTADS3MsgParam(sc, lineState);\n                                break;\n                        case SCE_T3_LIB_DIRECTIVE:\n                                ColouriseTADS3LibDirective(sc, lineState);\n                                break;\n                        case SCE_T3_HTML_DEFAULT:\n                                ColouriseTADS3HTMLTag(sc, lineState);\n                                break;\n                        case SCE_T3_HTML_STRING:\n                                ColouriseTADSHTMLString(sc, lineState);\n                                break;\n                        case SCE_T3_BLOCK_COMMENT:\n                                ColouriseTADS3Comment(sc, lineState&T3_INT_EXPRESSION ?\n                                        SCE_T3_X_DEFAULT : SCE_T3_DEFAULT);\n                                break;\n                        case SCE_T3_DEFAULT:\n                        case SCE_T3_X_DEFAULT:\n                                if (IsASpaceOrTab(sc.ch)) {\n                                        sc.Forward();\n                                } else if (sc.ch == '#' && visibleChars == 0) {\n                                        ColouriseToEndOfLine(sc, SCE_T3_PREPROCESSOR, sc.state);\n                                } else if (sc.Match('/', '*')) {\n                                        ColouriseTADS3Comment(sc, sc.state);\n                                        visibleChars++;\n                                } else if (sc.Match('/', '/')) {\n                                        ColouriseToEndOfLine(sc, SCE_T3_LINE_COMMENT, sc.state);\n                                } else if (sc.ch == '\"') {\n                                        bracketLevel = 0;\n                                        ColouriseTADS3String(sc, lineState);\n                                        visibleChars++;\n                                } else if (sc.ch == '\\'') {\n                                        ColouriseTADS3String(sc, lineState);\n                                        visibleChars++;\n                                } else if (sc.state == SCE_T3_X_DEFAULT && bracketLevel == 0\n                                                   && sc.Match('>', '>')) {\n                                        sc.Forward(2);\n                                        sc.SetState(SCE_T3_D_STRING);\n                                        if (lineState & T3_INT_EXPRESSION_IN_TAG)\n                                                sc.SetState(SCE_T3_HTML_STRING);\n                                        lineState &= ~(T3_SINGLE_QUOTE|T3_INT_EXPRESSION\n                                                       |T3_INT_EXPRESSION_IN_TAG);\n                                } else if (IsATADS3Operator(sc.ch)) {\n                                        if (sc.state == SCE_T3_X_DEFAULT) {\n                                                if (sc.ch == '(') {\n                                                        bracketLevel++;\n                                                } else if (sc.ch == ')' && bracketLevel > 0) {\n                                                        bracketLevel--;\n                                                }\n                                        }\n                                        ColouriseTADS3Operator(sc);\n                                        visibleChars++;\n                                } else if (IsANumberStart(sc)) {\n                                        ColouriseTADS3Number(sc);\n                                        visibleChars++;\n                                } else if (IsAWordStart(sc.ch)) {\n                                        ColouriseTADS3Keyword(sc, keywordlists, endPos);\n                                        visibleChars++;\n                                } else if (sc.Match(\"...\")) {\n                                        sc.SetState(SCE_T3_IDENTIFIER);\n                                        sc.Forward(3);\n                                        sc.SetState(SCE_T3_DEFAULT);\n                                } else {\n                                        sc.Forward();\n                                        visibleChars++;\n                                }\n                                break;\n                        default:\n                                sc.SetState(SCE_T3_DEFAULT);\n                                sc.Forward();\n                }\n        }\n        sc.Complete();\n}\n\n/*\n TADS3 has two styles of top level block (TLB). Eg\n\n // default style\n silverKey : Key 'small silver key' 'small silver key'\n        \"A small key glints in the sunlight. \"\n ;\n\n and\n\n silverKey : Key {\n        'small silver key'\n        'small silver key'\n        \"A small key glints in the sunlight. \"\n }\n\n Some constructs mandate one or the other, but usually the author has may choose\n either.\n\n T3_SEENSTART is used to indicate that a braceless TLB has been (potentially)\n seen and is also used to match the closing ';' of the default style.\n\n T3_EXPECTINGIDENTIFIER and T3_EXPECTINGPUNCTUATION are used to keep track of\n what characters may be seen without incrementing the block level.  The general\n pattern is identifier <punc> identifier, acceptable punctuation characters\n are ':', ',', '(' and ')'.  No attempt is made to ensure that punctuation\n characters are syntactically correct, eg parentheses match. A ')' always\n signifies the start of a block.  We just need to check if it is followed by a\n '{', in which case we let the brace handling code handle the folding level.\n\n expectingIdentifier == false && expectingIdentifier == false\n Before the start of a TLB.\n\n expectingIdentifier == true && expectingIdentifier == true\n Currently in an identifier.  Will accept identifier or punctuation.\n\n expectingIdentifier == true && expectingIdentifier == false\n Just seen a punctuation character & now waiting for an identifier to start.\n\n expectingIdentifier == false && expectingIdentifier == truee\n We were in an identifier and have seen space.  Now waiting to see a punctuation\n character\n\n Space, comments & preprocessor directives are always acceptable and are\n equivalent.\n*/\n\nstatic const int T3_SEENSTART = 1 << 12;\nstatic const int T3_EXPECTINGIDENTIFIER = 1 << 13;\nstatic const int T3_EXPECTINGPUNCTUATION = 1 << 14;\n\nstatic inline bool IsStringTransition(int s1, int s2) {\n        return s1 != s2\n                && (s1 == SCE_T3_S_STRING || s1 == SCE_T3_X_STRING\n                        || (s1 == SCE_T3_D_STRING && s2 != SCE_T3_X_DEFAULT))\n                && s2 != SCE_T3_LIB_DIRECTIVE\n                && s2 != SCE_T3_MSG_PARAM\n                && s2 != SCE_T3_HTML_TAG\n                && s2 != SCE_T3_HTML_STRING;\n}\n\nstatic inline bool IsATADS3Punctuation(const int ch) {\n        return ch == ':' || ch == ',' || ch == '(' || ch == ')';\n}\n\nstatic inline bool IsAnIdentifier(const int style) {\n        return style == SCE_T3_IDENTIFIER\n                || style == SCE_T3_USER1\n                || style == SCE_T3_USER2\n                || style == SCE_T3_USER3;\n}\n\nstatic inline bool IsAnOperator(const int style) {\n    return style == SCE_T3_OPERATOR || style == SCE_T3_BRACE;\n}\n\nstatic inline bool IsSpaceEquivalent(const int ch, const int style) {\n        return isspace(ch)\n                || style == SCE_T3_BLOCK_COMMENT\n                || style == SCE_T3_LINE_COMMENT\n                || style == SCE_T3_PREPROCESSOR;\n}\n\nstatic char peekAhead(Sci_PositionU startPos, Sci_PositionU endPos,\n                                          Accessor &styler) {\n        for (Sci_PositionU i = startPos; i < endPos; i++) {\n                int style = styler.StyleAt(i);\n                char ch = styler[i];\n                if (!IsSpaceEquivalent(ch, style)) {\n                        if (IsAnIdentifier(style)) {\n                                return 'a';\n                        }\n                        if (IsATADS3Punctuation(ch)) {\n                                return ':';\n                        }\n                        if (ch == '{') {\n                                return '{';\n                        }\n                        return '*';\n                }\n        }\n        return ' ';\n}\n\nstatic void FoldTADS3Doc(Sci_PositionU startPos, Sci_Position length, int initStyle,\n                            WordList *[], Accessor &styler) {\n        Sci_PositionU endPos = startPos + length;\n        Sci_Position lineCurrent = styler.GetLine(startPos);\n        int levelCurrent = SC_FOLDLEVELBASE;\n        if (lineCurrent > 0)\n                levelCurrent = styler.LevelAt(lineCurrent-1) >> 16;\n        int seenStart = levelCurrent & T3_SEENSTART;\n        int expectingIdentifier = levelCurrent & T3_EXPECTINGIDENTIFIER;\n        int expectingPunctuation = levelCurrent & T3_EXPECTINGPUNCTUATION;\n        levelCurrent &= SC_FOLDLEVELNUMBERMASK;\n        int levelMinCurrent = levelCurrent;\n        int levelNext = levelCurrent;\n        char chNext = styler[startPos];\n        int styleNext = styler.StyleAt(startPos);\n        int style = initStyle;\n        char ch = chNext;\n        int stylePrev = style;\n        bool redo = false;\n        for (Sci_PositionU i = startPos; i < endPos; i++) {\n                if (redo) {\n                        redo = false;\n                        i--;\n                } else {\n                        ch = chNext;\n                        chNext = styler.SafeGetCharAt(i + 1);\n                        stylePrev = style;\n                        style = styleNext;\n                        styleNext = styler.StyleAt(i + 1);\n                }\n                bool atEOL = IsEOL(ch, chNext);\n\n                if (levelNext == SC_FOLDLEVELBASE) {\n                        if (IsSpaceEquivalent(ch, style)) {\n                                if (expectingPunctuation) {\n                                        expectingIdentifier = 0;\n                                }\n                                if (style == SCE_T3_BLOCK_COMMENT) {\n                                        levelNext++;\n                                }\n                        } else if (ch == '{') {\n                                levelNext++;\n                                seenStart = 0;\n                        } else if (ch == '\\'' || ch == '\"' || ch == '[') {\n                                levelNext++;\n                                if (seenStart) {\n                                        redo = true;\n                                }\n                        } else if (ch == ';') {\n                                seenStart = 0;\n                                expectingIdentifier = 0;\n                                expectingPunctuation = 0;\n                        } else if (expectingIdentifier && expectingPunctuation) {\n                                if (IsATADS3Punctuation(ch)) {\n                                        if (ch == ')' && peekAhead(i+1, endPos, styler) != '{') {\n                                                levelNext++;\n                                        } else {\n                                                expectingPunctuation = 0;\n                                        }\n                                } else if (!IsAnIdentifier(style)) {\n                                        levelNext++;\n                                }\n                        } else if (expectingIdentifier && !expectingPunctuation) {\n                                if (!IsAnIdentifier(style)) {\n                                        levelNext++;\n                                } else {\n                                        expectingPunctuation = T3_EXPECTINGPUNCTUATION;\n                                }\n                        } else if (!expectingIdentifier && expectingPunctuation) {\n                                if (!IsATADS3Punctuation(ch)) {\n                                        levelNext++;\n                                } else {\n                                        if (ch == ')' && peekAhead(i+1, endPos, styler) != '{') {\n                                                levelNext++;\n                                        } else {\n                                                expectingIdentifier = T3_EXPECTINGIDENTIFIER;\n                                                expectingPunctuation = 0;\n                                        }\n                                }\n                        } else if (!expectingIdentifier && !expectingPunctuation) {\n                                if (IsAnIdentifier(style)) {\n                                        seenStart = T3_SEENSTART;\n                                        expectingIdentifier = T3_EXPECTINGIDENTIFIER;\n                                        expectingPunctuation = T3_EXPECTINGPUNCTUATION;\n                                }\n                        }\n\n                        if (levelNext != SC_FOLDLEVELBASE && style != SCE_T3_BLOCK_COMMENT) {\n                                expectingIdentifier = 0;\n                                expectingPunctuation = 0;\n                        }\n\n                } else if (levelNext == SC_FOLDLEVELBASE+1 && seenStart\n                                   && ch == ';' && IsAnOperator(style)) {\n                        levelNext--;\n                        seenStart = 0;\n                } else if (style == SCE_T3_BLOCK_COMMENT) {\n                        if (stylePrev != SCE_T3_BLOCK_COMMENT) {\n                                levelNext++;\n                        } else if (styleNext != SCE_T3_BLOCK_COMMENT && !atEOL) {\n                                // Comments don't end at end of line and the next character may be unstyled.\n                                levelNext--;\n                        }\n                } else if (ch == '\\'' || ch == '\"') {\n                        if (IsStringTransition(style, stylePrev)) {\n                                if (levelMinCurrent > levelNext) {\n                                        levelMinCurrent = levelNext;\n                                }\n                                levelNext++;\n                        } else if (IsStringTransition(style, styleNext)) {\n                                levelNext--;\n                        }\n                } else if (IsAnOperator(style)) {\n                        if (ch == '{' || ch == '[') {\n                                // Measure the minimum before a '{' to allow\n                                // folding on \"} else {\"\n                                if (levelMinCurrent > levelNext) {\n                                        levelMinCurrent = levelNext;\n                                }\n                                levelNext++;\n                        } else if (ch == '}' || ch == ']') {\n                                levelNext--;\n                        }\n                }\n\n                if (atEOL) {\n                        if (seenStart && levelNext == SC_FOLDLEVELBASE) {\n                                switch (peekAhead(i+1, endPos, styler)) {\n                                        case ' ':\n                                        case '{':\n                                                break;\n                                        case '*':\n                                                levelNext++;\n                                                break;\n                                        case 'a':\n                                                if (expectingPunctuation) {\n                                                        levelNext++;\n                                                }\n                                                break;\n                                        case ':':\n                                                if (expectingIdentifier) {\n                                                        levelNext++;\n                                                }\n                                                break;\n                                }\n                                if (levelNext != SC_FOLDLEVELBASE) {\n                                        expectingIdentifier = 0;\n                                        expectingPunctuation = 0;\n                                }\n                        }\n                        int lev = levelMinCurrent | (levelNext | expectingIdentifier\n                                | expectingPunctuation | seenStart) << 16;\n                        if (levelMinCurrent < levelNext)\n                                lev |= SC_FOLDLEVELHEADERFLAG;\n                        if (lev != styler.LevelAt(lineCurrent)) {\n                                styler.SetLevel(lineCurrent, lev);\n                        }\n                        lineCurrent++;\n                        levelCurrent = levelNext;\n                        levelMinCurrent = levelCurrent;\n                }\n        }\n}\n\nstatic const char * const tads3WordList[] = {\n        \"TADS3 Keywords\",\n        \"User defined 1\",\n        \"User defined 2\",\n        \"User defined 3\",\n        0\n};\n\nLexerModule lmTADS3(SCLEX_TADS3, ColouriseTADS3Doc, \"tads3\", FoldTADS3Doc, tads3WordList);\n"
  },
  {
    "path": "lexilla/lexers/LexTAL.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexTAL.cxx\n ** Lexer for TAL\n ** Based on LexPascal.cxx\n ** Written by Laurent le Tynevez\n ** Updated by Simon Steele <s.steele@pnotepad.org> September 2002\n ** Updated by Mathias Rauen <scite@madshi.net> May 2003 (Delphi adjustments)\n ** Updated by Rod Falck, Aug 2006 Converted to TAL\n **/\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\ninline bool isTALoperator(char ch)\n\t{\n\treturn ch == '\\'' || ch == '@' || ch == '#' || isoperator(ch);\n\t}\n\ninline bool isTALwordchar(char ch)\n\t{\n\treturn ch == '$' || ch == '^' || iswordchar(ch);\n\t}\n\ninline bool isTALwordstart(char ch)\n\t{\n\treturn ch == '$' || ch == '^' || iswordstart(ch);\n\t}\n\nstatic void getRange(Sci_PositionU start,\n\t\tSci_PositionU end,\n\t\tAccessor &styler,\n\t\tchar *s,\n\t\tSci_PositionU len) {\n\tSci_PositionU i = 0;\n\twhile ((i < end - start + 1) && (i < len-1)) {\n\t\ts[i] = static_cast<char>(tolower(styler[start + i]));\n\t\ti++;\n\t}\n\ts[i] = '\\0';\n}\n\nstatic bool IsStreamCommentStyle(int style) {\n\treturn style == SCE_C_COMMENT ||\n\t\tstyle == SCE_C_COMMENTDOC ||\n\t\tstyle == SCE_C_COMMENTDOCKEYWORD ||\n\t\tstyle == SCE_C_COMMENTDOCKEYWORDERROR;\n}\n\nstatic void ColourTo(Accessor &styler, Sci_PositionU end, unsigned int attr, bool bInAsm) {\n\tif ((bInAsm) && (attr == SCE_C_OPERATOR || attr == SCE_C_NUMBER || attr == SCE_C_DEFAULT || attr == SCE_C_WORD || attr == SCE_C_IDENTIFIER)) {\n\t\tstyler.ColourTo(end, SCE_C_REGEX);\n\t} else\n\t\tstyler.ColourTo(end, attr);\n}\n\n// returns 1 if the item starts a class definition, and -1 if the word is \"end\", and 2 if the word is \"asm\"\nstatic int classifyWordTAL(Sci_PositionU start, Sci_PositionU end, /*WordList &keywords*/WordList *keywordlists[], Accessor &styler, bool bInAsm) {\n\tint ret = 0;\n\n\tWordList& keywords = *keywordlists[0];\n\tWordList& builtins = *keywordlists[1];\n\tWordList& nonreserved_keywords = *keywordlists[2];\n\n\tchar s[100];\n\tgetRange(start, end, styler, s, sizeof(s));\n\n\tchar chAttr = SCE_C_IDENTIFIER;\n\tif (isdigit(s[0]) || (s[0] == '.')) {\n\t\tchAttr = SCE_C_NUMBER;\n\t}\n\telse {\n\t\tif (keywords.InList(s)) {\n\t\t\tchAttr = SCE_C_WORD;\n\n\t\t\tif (strcmp(s, \"asm\") == 0) {\n\t\t\t\tret = 2;\n\t\t\t}\n\t\t\telse if (strcmp(s, \"end\") == 0) {\n\t\t\t\tret = -1;\n\t\t\t}\n\t\t}\n\t\telse if (s[0] == '$' || builtins.InList(s)) {\n\t\t\tchAttr = SCE_C_WORD2;\n\t\t}\n\t\telse if (nonreserved_keywords.InList(s)) {\n\t\t\tchAttr = SCE_C_UUID;\n\t\t}\n\t}\n\tColourTo(styler, end, chAttr, (bInAsm && ret != -1));\n\treturn ret;\n}\n\nstatic int classifyFoldPointTAL(const char* s) {\n\tint lev = 0;\n\tif (!(isdigit(s[0]) || (s[0] == '.'))) {\n\t\tif (strcmp(s, \"begin\") == 0 ||\n\t\t\tstrcmp(s, \"block\") == 0) {\n\t\t\tlev=1;\n\t\t} else if (strcmp(s, \"end\") == 0) {\n\t\t\tlev=-1;\n\t\t}\n\t}\n\treturn lev;\n}\n\nstatic void ColouriseTALDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[],\n\tAccessor &styler) {\n\n\tstyler.StartAt(startPos);\n\n\tint state = initStyle;\n\tif (state == SCE_C_CHARACTER)\t// Does not leak onto next line\n\t\tstate = SCE_C_DEFAULT;\n\tchar chPrev = ' ';\n\tchar chNext = styler[startPos];\n\tSci_PositionU lengthDoc = startPos + length;\n\n\tbool bInClassDefinition;\n\n\tSci_Position currentLine = styler.GetLine(startPos);\n\tif (currentLine > 0) {\n\t\tstyler.SetLineState(currentLine, styler.GetLineState(currentLine-1));\n\t\tbInClassDefinition = (styler.GetLineState(currentLine) == 1);\n\t} else {\n\t\tstyler.SetLineState(currentLine, 0);\n\t\tbInClassDefinition = false;\n\t}\n\n\tbool bInAsm = (state == SCE_C_REGEX);\n\tif (bInAsm)\n\t\tstate = SCE_C_DEFAULT;\n\n\tstyler.StartSegment(startPos);\n\tint visibleChars = 0;\n\tfor (Sci_PositionU i = startPos; i < lengthDoc; i++) {\n\t\tchar ch = chNext;\n\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\n\t\tif ((ch == '\\r' && chNext != '\\n') || (ch == '\\n')) {\n\t\t\t// Trigger on CR only (Mac style) or either on LF from CR+LF (Dos/Win) or on LF alone (Unix)\n\t\t\t// Avoid triggering two times on Dos/Win\n\t\t\t// End of line\n\t\t\tif (state == SCE_C_CHARACTER) {\n\t\t\t\tColourTo(styler, i, state, bInAsm);\n\t\t\t\tstate = SCE_C_DEFAULT;\n\t\t\t}\n\t\t\tvisibleChars = 0;\n\t\t\tcurrentLine++;\n\t\t\tstyler.SetLineState(currentLine, (bInClassDefinition ? 1 : 0));\n\t\t}\n\n\t\tif (styler.IsLeadByte(ch)) {\n\t\t\tchNext = styler.SafeGetCharAt(i + 2);\n\t\t\tchPrev = ' ';\n\t\t\ti += 1;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (state == SCE_C_DEFAULT) {\n\t\t\tif (isTALwordstart(ch)) {\n\t\t\t\tColourTo(styler, i-1, state, bInAsm);\n\t\t\t\tstate = SCE_C_IDENTIFIER;\n\t\t\t} else if (ch == '!' && chNext != '*') {\n\t\t\t\tColourTo(styler, i-1, state, bInAsm);\n\t\t\t\tstate = SCE_C_COMMENT;\n\t\t\t} else if (ch == '!' && chNext == '*') {\n\t\t\t\tColourTo(styler, i-1, state, bInAsm);\n\t\t\t\tstate = SCE_C_COMMENTDOC;\n\t\t\t} else if (ch == '-' && chNext == '-') {\n\t\t\t\tColourTo(styler, i-1, state, bInAsm);\n\t\t\t\tstate = SCE_C_COMMENTLINE;\n\t\t\t} else if (ch == '\"') {\n\t\t\t\tColourTo(styler, i-1, state, bInAsm);\n\t\t\t\tstate = SCE_C_STRING;\n\t\t\t} else if (ch == '?' && visibleChars == 0) {\n\t\t\t\tColourTo(styler, i-1, state, bInAsm);\n\t\t\t\tstate = SCE_C_PREPROCESSOR;\n\t\t\t} else if (isTALoperator(ch)) {\n\t\t\t\tColourTo(styler, i-1, state, bInAsm);\n\t\t\t\tColourTo(styler, i, SCE_C_OPERATOR, bInAsm);\n\t\t\t}\n\t\t} else if (state == SCE_C_IDENTIFIER) {\n\t\t\tif (!isTALwordchar(ch)) {\n\t\t\t\tint lStateChange = classifyWordTAL(styler.GetStartSegment(), i - 1, keywordlists, styler, bInAsm);\n\n\t\t\t\tif(lStateChange == 1) {\n\t\t\t\t\tstyler.SetLineState(currentLine, 1);\n\t\t\t\t\tbInClassDefinition = true;\n\t\t\t\t} else if(lStateChange == 2) {\n\t\t\t\t\tbInAsm = true;\n\t\t\t\t} else if(lStateChange == -1) {\n\t\t\t\t\tstyler.SetLineState(currentLine, 0);\n\t\t\t\t\tbInClassDefinition = false;\n\t\t\t\t\tbInAsm = false;\n\t\t\t\t}\n\n\t\t\t\tstate = SCE_C_DEFAULT;\n\t\t\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\t\t\tif (ch == '!' && chNext != '*') {\n\t\t\t\t\tstate = SCE_C_COMMENT;\n\t\t\t\t} else if (ch == '!' && chNext == '*') {\n\t\t\t\t\tColourTo(styler, i-1, state, bInAsm);\n\t\t\t\t\tstate = SCE_C_COMMENTDOC;\n\t\t\t\t} else if (ch == '-' && chNext == '-') {\n\t\t\t\t\tstate = SCE_C_COMMENTLINE;\n\t\t\t\t} else if (ch == '\"') {\n\t\t\t\t\tstate = SCE_C_STRING;\n\t\t\t\t} else if (isTALoperator(ch)) {\n\t\t\t\t\tColourTo(styler, i, SCE_C_OPERATOR, bInAsm);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif (state == SCE_C_PREPROCESSOR) {\n\t\t\t\tif ((ch == '\\r' || ch == '\\n') && !(chPrev == '\\\\' || chPrev == '\\r')) {\n\t\t\t\t\tColourTo(styler, i-1, state, bInAsm);\n\t\t\t\t\tstate = SCE_C_DEFAULT;\n\t\t\t\t}\n\t\t\t} else if (state == SCE_C_COMMENT) {\n\t\t\t\tif (ch == '!' || (ch == '\\r' || ch == '\\n') ) {\n\t\t\t\t\tColourTo(styler, i, state, bInAsm);\n\t\t\t\t\tstate = SCE_C_DEFAULT;\n\t\t\t\t}\n\t\t\t} else if (state == SCE_C_COMMENTDOC) {\n\t\t\t\tif (ch == '!' || (ch == '\\r' || ch == '\\n')) {\n\t\t\t\t\tif (((i > styler.GetStartSegment() + 2) || (\n\t\t\t\t\t\t(initStyle == SCE_C_COMMENTDOC) &&\n\t\t\t\t\t\t(styler.GetStartSegment() == static_cast<Sci_PositionU>(startPos))))) {\n\t\t\t\t\t\t\tColourTo(styler, i, state, bInAsm);\n\t\t\t\t\t\t\tstate = SCE_C_DEFAULT;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (state == SCE_C_COMMENTLINE) {\n\t\t\t\tif (ch == '\\r' || ch == '\\n') {\n\t\t\t\t\tColourTo(styler, i-1, state, bInAsm);\n\t\t\t\t\tstate = SCE_C_DEFAULT;\n\t\t\t\t}\n\t\t\t} else if (state == SCE_C_STRING) {\n\t\t\t\tif (ch == '\"') {\n\t\t\t\t\tColourTo(styler, i, state, bInAsm);\n\t\t\t\t\tstate = SCE_C_DEFAULT;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n        if (!isspacechar(ch))\n            visibleChars++;\n\t\tchPrev = ch;\n\t}\n\tColourTo(styler, lengthDoc - 1, state, bInAsm);\n}\n\nstatic void FoldTALDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *[],\n                            Accessor &styler) {\n\tbool foldComment = styler.GetPropertyInt(\"fold.comment\") != 0;\n\tbool foldPreprocessor = styler.GetPropertyInt(\"fold.preprocessor\") != 0;\n\tbool foldCompact = styler.GetPropertyInt(\"fold.compact\", 1) != 0;\n\tSci_PositionU endPos = startPos + length;\n\tint visibleChars = 0;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tint levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK;\n\tint levelCurrent = levelPrev;\n\tchar chNext = styler[startPos];\n\tint styleNext = styler.StyleAt(startPos);\n\tint style = initStyle;\n\tbool was_end = false;\n\tbool section = false;\n\n\tSci_Position lastStart = 0;\n\n\tfor (Sci_PositionU i = startPos; i < endPos; i++) {\n\t\tchar ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\tint stylePrev = style;\n\t\tstyle = styleNext;\n\t\tstyleNext = styler.StyleAt(i + 1);\n\t\tbool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n\n\t\tif (stylePrev == SCE_C_DEFAULT && (style == SCE_C_WORD || style == SCE_C_UUID || style == SCE_C_PREPROCESSOR))\n\t\t{\n\t\t\t// Store last word start point.\n\t\t\tlastStart = i;\n\t\t}\n\n\t\tif (stylePrev == SCE_C_WORD || style == SCE_C_UUID || stylePrev == SCE_C_PREPROCESSOR) {\n\t\t\tif(isTALwordchar(ch) && !isTALwordchar(chNext)) {\n\t\t\t\tchar s[100];\n\t\t\t\tgetRange(lastStart, i, styler, s, sizeof(s));\n\t\t\t\tif (stylePrev == SCE_C_PREPROCESSOR && strcmp(s, \"?section\") == 0)\n\t\t\t\t\t{\n\t\t\t\t\tsection = true;\n\t\t\t\t\tlevelCurrent = 1;\n\t\t\t\t\tlevelPrev = 0;\n\t\t\t\t\t}\n\t\t\t\telse if (stylePrev == SCE_C_WORD || stylePrev == SCE_C_UUID)\n\t\t\t\t\t{\n\t\t\t\t\tif (strcmp(s, \"block\") == 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t// block keyword is ignored immediately after end keyword\n\t\t\t\t\t\tif (!was_end)\n\t\t\t\t\t\t\tlevelCurrent++;\n\t\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tlevelCurrent += classifyFoldPointTAL(s);\n\t\t\t\t\tif (strcmp(s, \"end\") == 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\twas_end = true;\n\t\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\twas_end = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (foldComment && (style == SCE_C_COMMENTLINE)) {\n\t\t\tif ((ch == '/') && (chNext == '/')) {\n\t\t\t\tchar chNext2 = styler.SafeGetCharAt(i + 2);\n\t\t\t\tif (chNext2 == '{') {\n\t\t\t\t\tlevelCurrent++;\n\t\t\t\t} else if (chNext2 == '}') {\n\t\t\t\t\tlevelCurrent--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (foldPreprocessor && (style == SCE_C_PREPROCESSOR)) {\n\t\t\tif (ch == '{' && chNext == '$') {\n\t\t\t\tSci_PositionU j=i+2; // skip {$\n\t\t\t\twhile ((j<endPos) && IsASpaceOrTab(styler.SafeGetCharAt(j))) {\n\t\t\t\t\tj++;\n\t\t\t\t}\n\t\t\t\tif (styler.Match(j, \"region\") || styler.Match(j, \"if\")) {\n\t\t\t\t\tlevelCurrent++;\n\t\t\t\t} else if (styler.Match(j, \"end\")) {\n\t\t\t\t\tlevelCurrent--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (foldComment && IsStreamCommentStyle(style)) {\n\t\t\tif (!IsStreamCommentStyle(stylePrev)) {\n\t\t\t\tlevelCurrent++;\n\t\t\t} else if (!IsStreamCommentStyle(styleNext) && !atEOL) {\n\t\t\t\t// Comments don't end at end of line and the next character may be unstyled.\n\t\t\t\tlevelCurrent--;\n\t\t\t}\n\t\t}\n\n\t\tif (atEOL) {\n\t\t\tint lev = levelPrev | SC_FOLDLEVELBASE;\n\t\t\tif (visibleChars == 0 && foldCompact)\n\t\t\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\t\t\tif ((levelCurrent > levelPrev || section) && (visibleChars > 0))\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\tif (lev != styler.LevelAt(lineCurrent)) {\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\t\t\t}\n\t\t\tlineCurrent++;\n\t\t\tlevelPrev = levelCurrent;\n\t\t\tvisibleChars = 0;\n\t\t\tsection = false;\n\t\t}\n\n\t\tif (!isspacechar(ch))\n\t\t\tvisibleChars++;\n\t}\n\n\t// Fill in the real level of the next line, keeping the current flags as they will be filled in later\n\tint flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK;\n\tstyler.SetLevel(lineCurrent, levelPrev | flagsNext);\n}\n\nstatic const char * const TALWordListDesc[] = {\n\t\"Keywords\",\n\t\"Builtins\",\n\t0\n};\n\nLexerModule lmTAL(SCLEX_TAL, ColouriseTALDoc, \"TAL\", FoldTALDoc, TALWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexTCL.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexTCL.cxx\n ** Lexer for TCL language.\n **/\n// Copyright 1998-2001 by Andre Arpin <arpin@kingston.net>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\n// Extended to accept accented characters\nstatic inline bool IsAWordChar(int ch) {\n\treturn ch >= 0x80 ||\n\t       (isalnum(ch) || ch == '_' || ch ==':' || ch=='.'); // : name space separator\n}\n\nstatic inline bool IsAWordStart(int ch) {\n\treturn ch >= 0x80 || (ch ==':' || isalpha(ch) || ch == '_');\n}\n\nstatic inline bool IsANumberChar(int ch) {\n\t// Not exactly following number definition (several dots are seen as OK, etc.)\n\t// but probably enough in most cases.\n\treturn (ch < 0x80) &&\n\t       (IsADigit(ch, 0x10) || toupper(ch) == 'E' ||\n\t        ch == '.' || ch == '-' || ch == '+');\n}\n\nstatic void ColouriseTCLDoc(Sci_PositionU startPos, Sci_Position length, int , WordList *keywordlists[], Accessor &styler) {\n#define  isComment(s) (s==SCE_TCL_COMMENT || s==SCE_TCL_COMMENTLINE || s==SCE_TCL_COMMENT_BOX || s==SCE_TCL_BLOCK_COMMENT)\n\tconst bool foldComment = styler.GetPropertyInt(\"fold.comment\") != 0;\n\tconst bool foldCompact = styler.GetPropertyInt(\"fold.compact\", 1) != 0;\n\tbool commentLevel = false;\n\tbool subBrace = false; // substitution begin with a brace ${.....}\n\tenum tLineState {LS_DEFAULT, LS_OPEN_COMMENT, LS_OPEN_DOUBLE_QUOTE, LS_COMMENT_BOX, LS_MASK_STATE = 0xf,\n\t                 LS_COMMAND_EXPECTED = 16, LS_BRACE_ONLY = 32\n\t                } lineState = LS_DEFAULT;\n\tbool prevSlash = false;\n\tint currentLevel = 0;\n\tbool expected = 0;\n\tbool subParen = 0;\n\n\tSci_Position currentLine = styler.GetLine(startPos);\n\tif (currentLine > 0)\n\t\tcurrentLine--;\n\tlength += startPos - styler.LineStart(currentLine);\n\t// make sure lines overlap\n\tstartPos = styler.LineStart(currentLine);\n\n\tWordList &keywords = *keywordlists[0];\n\tWordList &keywords2 = *keywordlists[1];\n\tWordList &keywords3 = *keywordlists[2];\n\tWordList &keywords4 = *keywordlists[3];\n\tWordList &keywords5 = *keywordlists[4];\n\tWordList &keywords6 = *keywordlists[5];\n\tWordList &keywords7 = *keywordlists[6];\n\tWordList &keywords8 = *keywordlists[7];\n\tWordList &keywords9 = *keywordlists[8];\n\n\tif (currentLine > 0) {\n\t\tint ls = styler.GetLineState(currentLine - 1);\n\t\tlineState = tLineState(ls & LS_MASK_STATE);\n\t\texpected = LS_COMMAND_EXPECTED == tLineState(ls & LS_COMMAND_EXPECTED);\n\t\tsubBrace = LS_BRACE_ONLY == tLineState(ls & LS_BRACE_ONLY);\n\t\tcurrentLevel = styler.LevelAt(currentLine - 1) >> 17;\n\t\tcommentLevel = (styler.LevelAt(currentLine - 1) >> 16) & 1;\n\t} else\n\t\tstyler.SetLevel(0, SC_FOLDLEVELBASE | SC_FOLDLEVELHEADERFLAG);\n\tbool visibleChars = false;\n\n\tint previousLevel = currentLevel;\n\tStyleContext sc(startPos, length, SCE_TCL_DEFAULT, styler);\n\tfor (; ; sc.Forward()) {\nnext:\n\t\tif (sc.ch=='\\r' && sc.chNext == '\\n') // only ignore \\r on PC process on the mac\n\t\t\tcontinue;\n\t\tbool atEnd = !sc.More();  // make sure we coloured the last word\n\t\tif (lineState != LS_DEFAULT) {\n\t\t\tsc.SetState(SCE_TCL_DEFAULT);\n\t\t\tif (lineState == LS_OPEN_COMMENT)\n\t\t\t\tsc.SetState(SCE_TCL_COMMENTLINE);\n\t\t\telse if (lineState == LS_OPEN_DOUBLE_QUOTE)\n\t\t\t\tsc.SetState(SCE_TCL_IN_QUOTE);\n\t\t\telse if (lineState == LS_COMMENT_BOX && (sc.ch == '#' || (sc.ch == ' ' && sc.chNext=='#')))\n\t\t\t\tsc.SetState(SCE_TCL_COMMENT_BOX);\n\t\t\tlineState = LS_DEFAULT;\n\t\t}\n\t\tif (subBrace) { // ${ overrides every thing even \\ except }\n\t\t\tif (sc.ch == '}') {\n\t\t\t\tsubBrace = false;\n\t\t\t\tsc.SetState(SCE_TCL_OPERATOR);\n\t\t\t\tsc.ForwardSetState(SCE_TCL_DEFAULT);\n\t\t\t\tgoto next;\n\t\t\t} else\n\t\t\t\tsc.SetState(SCE_TCL_SUB_BRACE);\n\t\t\tif (!sc.atLineEnd)\n\t\t\t\tcontinue;\n\t\t} else if (sc.state == SCE_TCL_DEFAULT || sc.state ==SCE_TCL_OPERATOR) {\n\t\t\texpected &= isspacechar(static_cast<unsigned char>(sc.ch)) || IsAWordStart(sc.ch) || sc.ch =='#';\n\t\t} else if (sc.state == SCE_TCL_SUBSTITUTION) {\n\t\t\tswitch (sc.ch) {\n\t\t\tcase '(':\n\t\t\t\tsubParen=true;\n\t\t\t\tsc.SetState(SCE_TCL_OPERATOR);\n\t\t\t\tsc.ForwardSetState(SCE_TCL_SUBSTITUTION);\n\t\t\t\tcontinue;\n\t\t\tcase ')':\n\t\t\t\tsc.SetState(SCE_TCL_OPERATOR);\n\t\t\t\tsubParen=false;\n\t\t\t\tcontinue;\n\t\t\tcase '$':\n\t\t\t\tcontinue;\n\t\t\tcase ',':\n\t\t\t\tsc.SetState(SCE_TCL_OPERATOR);\n\t\t\t\tif (subParen) {\n\t\t\t\t\tsc.ForwardSetState(SCE_TCL_SUBSTITUTION);\n\t\t\t\t\tgoto next;\t// Already forwarded so avoid loop's Forward()\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\tdefault :\n\t\t\t\t// maybe spaces should be allowed ???\n\t\t\t\tif (!IsAWordChar(sc.ch)) { // probably the code is wrong\n\t\t\t\t\tsc.SetState(SCE_TCL_DEFAULT);\n\t\t\t\t\tsubParen = 0;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} else if (isComment(sc.state)) {\n\t\t} else if (!IsAWordChar(sc.ch)) {\n\t\t\tif ((sc.state == SCE_TCL_IDENTIFIER && expected) ||  sc.state == SCE_TCL_MODIFIER) {\n\t\t\t\tchar w[100];\n\t\t\t\tsc.GetCurrent(w, sizeof(w));\n\t\t\t\tchar *s=w;\n\t\t\t\tif (w[strlen(w)-1]=='\\r')\n\t\t\t\t\tw[strlen(w)-1]=0;\n\t\t\t\twhile (*s == ':') // ignore leading : like in ::set a 10\n\t\t\t\t\t++s;\n\t\t\t\tbool quote = sc.state == SCE_TCL_IN_QUOTE;\n\t\t\t\tif (commentLevel  || expected) {\n\t\t\t\t\tif (keywords.InList(s)) {\n\t\t\t\t\t\tsc.ChangeState(quote ? SCE_TCL_WORD_IN_QUOTE : SCE_TCL_WORD);\n\t\t\t\t\t} else if (keywords2.InList(s)) {\n\t\t\t\t\t\tsc.ChangeState(quote ? SCE_TCL_WORD_IN_QUOTE : SCE_TCL_WORD2);\n\t\t\t\t\t} else if (keywords3.InList(s)) {\n\t\t\t\t\t\tsc.ChangeState(quote ? SCE_TCL_WORD_IN_QUOTE : SCE_TCL_WORD3);\n\t\t\t\t\t} else if (keywords4.InList(s)) {\n\t\t\t\t\t\tsc.ChangeState(quote ? SCE_TCL_WORD_IN_QUOTE : SCE_TCL_WORD4);\n\t\t\t\t\t} else if (sc.GetRelative(-static_cast<Sci_Position>(strlen(s))-1) == '{' &&\n\t\t\t\t\t           keywords5.InList(s) && sc.ch == '}') { // {keyword} exactly no spaces\n\t\t\t\t\t\tsc.ChangeState(SCE_TCL_EXPAND);\n\t\t\t\t\t}\n\t\t\t\t\tif (keywords6.InList(s)) {\n\t\t\t\t\t\tsc.ChangeState(SCE_TCL_WORD5);\n\t\t\t\t\t} else if (keywords7.InList(s)) {\n\t\t\t\t\t\tsc.ChangeState(SCE_TCL_WORD6);\n\t\t\t\t\t} else if (keywords8.InList(s)) {\n\t\t\t\t\t\tsc.ChangeState(SCE_TCL_WORD7);\n\t\t\t\t\t} else if (keywords9.InList(s)) {\n\t\t\t\t\t\tsc.ChangeState(SCE_TCL_WORD8);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\texpected = false;\n\t\t\t\tsc.SetState(quote ? SCE_TCL_IN_QUOTE : SCE_TCL_DEFAULT);\n\t\t\t} else if (sc.state == SCE_TCL_MODIFIER || sc.state == SCE_TCL_IDENTIFIER) {\n\t\t\t\tsc.SetState(SCE_TCL_DEFAULT);\n\t\t\t}\n\t\t}\n\t\tif (atEnd)\n\t\t\tbreak;\n\t\tif (sc.atLineEnd) {\n\t\t\tlineState = LS_DEFAULT;\n\t\t\tcurrentLine = styler.GetLine(sc.currentPos);\n\t\t\tif (foldComment && sc.state!=SCE_TCL_COMMENT && isComment(sc.state)) {\n\t\t\t\tif (currentLevel == 0) {\n\t\t\t\t\t++currentLevel;\n\t\t\t\t\tcommentLevel = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (visibleChars && commentLevel) {\n\t\t\t\t\t--currentLevel;\n\t\t\t\t\t--previousLevel;\n\t\t\t\t\tcommentLevel = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tint flag = 0;\n\t\t\tif (!visibleChars && foldCompact)\n\t\t\t\tflag = SC_FOLDLEVELWHITEFLAG;\n\t\t\tif (currentLevel > previousLevel)\n\t\t\t\tflag = SC_FOLDLEVELHEADERFLAG;\n\t\t\tstyler.SetLevel(currentLine, flag + previousLevel + SC_FOLDLEVELBASE + (currentLevel << 17) + (commentLevel << 16));\n\n\t\t\t// Update the line state, so it can be seen by next line\n\t\t\tif (sc.state == SCE_TCL_IN_QUOTE) {\n\t\t\t\tlineState = LS_OPEN_DOUBLE_QUOTE;\n\t\t\t} else {\n\t\t\t\tif (prevSlash) {\n\t\t\t\t\tif (isComment(sc.state))\n\t\t\t\t\t\tlineState = LS_OPEN_COMMENT;\n\t\t\t\t} else if (sc.state == SCE_TCL_COMMENT_BOX)\n\t\t\t\t\tlineState = LS_COMMENT_BOX;\n\t\t\t}\n\t\t\tstyler.SetLineState(currentLine,\n\t\t\t                    (subBrace ? LS_BRACE_ONLY : 0) |\n\t\t\t                    (expected ? LS_COMMAND_EXPECTED : 0)  | lineState);\n\t\t\tif (lineState == LS_COMMENT_BOX)\n\t\t\t\tsc.ForwardSetState(SCE_TCL_COMMENT_BOX);\n\t\t\telse if (lineState == LS_OPEN_DOUBLE_QUOTE)\n\t\t\t\tsc.ForwardSetState(SCE_TCL_IN_QUOTE);\n\t\t\telse\n\t\t\t\tsc.ForwardSetState(SCE_TCL_DEFAULT);\n\t\t\tprevSlash = false;\n\t\t\tpreviousLevel = currentLevel;\n\t\t\tvisibleChars = false;\n\t\t\tgoto next;\n\t\t}\n\n\t\tif (prevSlash) {\n\t\t\tprevSlash = false;\n\t\t\tif (sc.ch == '#' && IsANumberChar(sc.chNext))\n\t\t\t\tsc.ForwardSetState(SCE_TCL_NUMBER);\n\t\t\tcontinue;\n\t\t}\n\t\tprevSlash = sc.ch == '\\\\';\n\t\tif (isComment(sc.state))\n\t\t\tcontinue;\n\t\tif (sc.atLineStart) {\n\t\t\tvisibleChars = false;\n\t\t\tif (sc.state!=SCE_TCL_IN_QUOTE && !isComment(sc.state))\n\t\t\t{\n\t\t\t\tsc.SetState(SCE_TCL_DEFAULT);\n\t\t\t\texpected = IsAWordStart(sc.ch)|| isspacechar(static_cast<unsigned char>(sc.ch));\n\t\t\t}\n\t\t}\n\n\t\tswitch (sc.state) {\n\t\tcase SCE_TCL_NUMBER:\n\t\t\tif (!IsANumberChar(sc.ch))\n\t\t\t\tsc.SetState(SCE_TCL_DEFAULT);\n\t\t\tbreak;\n\t\tcase SCE_TCL_IN_QUOTE:\n\t\t\tif (sc.ch == '\"') {\n\t\t\t\tsc.ForwardSetState(SCE_TCL_DEFAULT);\n\t\t\t\tvisibleChars = true; // necessary if a \" is the first and only character on a line\n\t\t\t\tgoto next;\n\t\t\t} else if (sc.ch == '[' || sc.ch == ']' || sc.ch == '$') {\n\t\t\t\tsc.SetState(SCE_TCL_OPERATOR);\n\t\t\t\texpected = sc.ch == '[';\n\t\t\t\tsc.ForwardSetState(SCE_TCL_IN_QUOTE);\n\t\t\t\tgoto next;\n\t\t\t}\n\t\t\tcontinue;\n\t\tcase SCE_TCL_OPERATOR:\n\t\t\tsc.SetState(SCE_TCL_DEFAULT);\n\t\t\tbreak;\n\t\t}\n\n\t\tif (sc.ch == '#') {\n\t\t\tif (visibleChars) {\n\t\t\t\tif (sc.state != SCE_TCL_IN_QUOTE && expected)\n\t\t\t\t\tsc.SetState(SCE_TCL_COMMENT);\n\t\t\t} else {\n\t\t\t\tsc.SetState(SCE_TCL_COMMENTLINE);\n\t\t\t\tif (sc.chNext == '~')\n\t\t\t\t\tsc.SetState(SCE_TCL_BLOCK_COMMENT);\n\t\t\t\tif (sc.atLineStart && (sc.chNext == '#' || sc.chNext == '-'))\n\t\t\t\t\tsc.SetState(SCE_TCL_COMMENT_BOX);\n\t\t\t}\n\t\t}\n\n\t\tif (!isspacechar(static_cast<unsigned char>(sc.ch))) {\n\t\t\tvisibleChars = true;\n\t\t}\n\n\t\tif (sc.ch == '\\\\') {\n\t\t\tprevSlash = true;\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Determine if a new state should be entered.\n\t\tif (sc.state == SCE_TCL_DEFAULT) {\n\t\t\tif (IsAWordStart(sc.ch)) {\n\t\t\t\tsc.SetState(SCE_TCL_IDENTIFIER);\n\t\t\t} else if (IsADigit(sc.ch) && !IsAWordChar(sc.chPrev)) {\n\t\t\t\tsc.SetState(SCE_TCL_NUMBER);\n\t\t\t} else {\n\t\t\t\tswitch (sc.ch) {\n\t\t\t\tcase '\\\"':\n\t\t\t\t\tsc.SetState(SCE_TCL_IN_QUOTE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '{':\n\t\t\t\t\tsc.SetState(SCE_TCL_OPERATOR);\n\t\t\t\t\texpected = true;\n\t\t\t\t\t++currentLevel;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '}':\n\t\t\t\t\tsc.SetState(SCE_TCL_OPERATOR);\n\t\t\t\t\texpected = true;\n\t\t\t\t\t--currentLevel;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '[':\n\t\t\t\t\texpected = true;\n\t\t\t\t\t[[fallthrough]];\n\t\t\t\tcase ']':\n\t\t\t\tcase '(':\n\t\t\t\tcase ')':\n\t\t\t\t\tsc.SetState(SCE_TCL_OPERATOR);\n\t\t\t\t\tbreak;\n\t\t\t\tcase ';':\n\t\t\t\t\texpected = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '$':\n\t\t\t\t\tsubParen = 0;\n\t\t\t\t\tif (sc.chNext != '{') {\n\t\t\t\t\t\tsc.SetState(SCE_TCL_SUBSTITUTION);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsc.SetState(SCE_TCL_OPERATOR);  // $\n\t\t\t\t\t\tsc.Forward();  // {\n\t\t\t\t\t\tsc.ForwardSetState(SCE_TCL_SUB_BRACE);\n\t\t\t\t\t\tsubBrace = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase '#':\n\t\t\t\t\tif ((isspacechar(static_cast<unsigned char>(sc.chPrev))||\n\t\t\t\t\t        isoperator(static_cast<char>(sc.chPrev))) && IsADigit(sc.chNext,0x10))\n\t\t\t\t\t\tsc.SetState(SCE_TCL_NUMBER);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\tsc.SetState(IsADigit(sc.chNext)? SCE_TCL_NUMBER: SCE_TCL_MODIFIER);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tif (isoperator(static_cast<char>(sc.ch))) {\n\t\t\t\t\t\tsc.SetState(SCE_TCL_OPERATOR);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tsc.Complete();\n}\n\nstatic const char *const tclWordListDesc[] = {\n\t\"TCL Keywords\",\n\t\"TK Keywords\",\n\t\"iTCL Keywords\",\n\t\"tkCommands\",\n\t\"expand\",\n\t\"user1\",\n\t\"user2\",\n\t\"user3\",\n\t\"user4\",\n\t0\n};\n\n// this code supports folding in the colourizer\nLexerModule lmTCL(SCLEX_TCL, ColouriseTCLDoc, \"tcl\", 0, tclWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexTCMD.cxx",
    "content": "// Scintilla\\ source code edit control\n/** @file LexTCMD.cxx\n ** Lexer for Take Command / TCC batch scripts (.bat, .btm, .cmd).\n **/\n// Written by Rex Conn (rconn [at] jpsoft [dot] com)\n// based on the CMD lexer\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\n\nstatic bool IsAlphabetic(int ch) {\n\treturn IsASCII(ch) && isalpha(ch);\n}\n\nstatic inline bool AtEOL(Accessor &styler, Sci_PositionU i) {\n\treturn (styler[i] == '\\n') || ((styler[i] == '\\r') && (styler.SafeGetCharAt(i + 1) != '\\n'));\n}\n\n// Tests for BATCH Operators\nstatic bool IsBOperator(char ch) {\n\treturn (ch == '=') || (ch == '+') || (ch == '>') || (ch == '<') || (ch == '|') || (ch == '&') || (ch == '!') || (ch == '?') || (ch == '*') || (ch == '(') || (ch == ')');\n}\n\n// Tests for BATCH Separators\nstatic bool IsBSeparator(char ch) {\n\treturn (ch == '\\\\') || (ch == '.') || (ch == ';') || (ch == ' ') || (ch == '\\t') || (ch == '[') || (ch == ']') || (ch == '\\\"') || (ch == '\\'') || (ch == '/');\n}\n\n// Find length of CMD FOR variable with modifier (%~...) or return 0\nstatic unsigned int GetBatchVarLen( char *wordBuffer )\n{\n\tint nLength = 0;\n\tif ( wordBuffer[0] == '%' ) {\n\n\t\tif ( wordBuffer[1] == '~' )\n\t\t\tnLength = 2;\n\t\telse if (( wordBuffer[1] == '%' ) && ( wordBuffer[2] == '~' ))\n\t\t\tnLength++;\n\t\telse\n\t\t\treturn 0;\n\n\t\tfor ( ; ( wordBuffer[nLength] ); nLength++ ) {\n\n\t\t\tswitch ( toupper(wordBuffer[nLength]) ) {\n\t\t\tcase 'A':\n\t\t\t\t// file attributes\n\t\t\tcase 'D':\n\t\t\t\t// drive letter only\n\t\t\tcase 'F':\n\t\t\t\t// fully qualified path name\n\t\t\tcase 'N':\n\t\t\t\t// filename only\n\t\t\tcase 'P':\n\t\t\t\t// path only\n\t\t\tcase 'S':\n\t\t\t\t// short name\n\t\t\tcase 'T':\n\t\t\t\t// date / time of file\n\t\t\tcase 'X':\n\t\t\t\t// file extension only\n\t\t\tcase 'Z':\n\t\t\t\t// file size\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn nLength;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nLength;\n}\n\n\nstatic void ColouriseTCMDLine( char *lineBuffer, Sci_PositionU lengthLine, Sci_PositionU startLine, Sci_PositionU endPos, WordList *keywordlists[], Accessor &styler)\n{\n\tSci_PositionU offset = 0;\t// Line Buffer Offset\n\tchar wordBuffer[260];\t\t// Word Buffer - large to catch long paths\n\tSci_PositionU wbl;\t\t\t// Word Buffer Length\n\tSci_PositionU wbo;\t\t\t// Word Buffer Offset - also Special Keyword Buffer Length\n\tWordList &keywords = *keywordlists[0];      // Internal Commands\n//\tWordList &keywords2 = *keywordlists[1];     // Aliases (optional)\n\tbool isDelayedExpansion = 1;\t\t\t\t// !var!\n\n\tbool continueProcessing = true;\t// Used to toggle Regular Keyword Checking\n\t// Special Keywords are those that allow certain characters without whitespace after the command\n\t// Examples are: cd. cd\\ echo: echo. path=\n\tbool inString = false; // Used for processing while \"\"\n\t// Special Keyword Buffer used to determine if the first n characters is a Keyword\n\tchar sKeywordBuffer[260] = \"\";\t// Special Keyword Buffer\n\tbool sKeywordFound;\t\t// Exit Special Keyword for-loop if found\n\n\t// Skip leading whitespace\n\twhile ((offset < lengthLine) && (isspacechar(lineBuffer[offset]))) {\n\t\toffset++;\n\t}\n\t// Colorize Default Text\n\tstyler.ColourTo(startLine + offset - 1, SCE_TCMD_DEFAULT);\n\n\tif ( offset >= lengthLine )\n\t\treturn;\n\n\t// Check for Fake Label (Comment) or Real Label - return if found\n\tif (lineBuffer[offset] == ':') {\n\t\tif (lineBuffer[offset + 1] == ':') {\n\t\t\t// Colorize Fake Label (Comment) - :: is the same as REM\n\t\t\tstyler.ColourTo(endPos, SCE_TCMD_COMMENT);\n\t\t} else {\n\t\t\t// Colorize Real Label\n\t\t\tstyler.ColourTo(endPos, SCE_TCMD_LABEL);\n\t\t}\n\t\treturn;\n\n\t// Check for Comment - return if found\n\t} else if (( CompareNCaseInsensitive(lineBuffer+offset, \"rem\", 3) == 0 ) && (( lineBuffer[offset+3] == 0 ) || ( isspace(lineBuffer[offset+3] )))) {\n\t\t\tstyler.ColourTo(endPos, SCE_TCMD_COMMENT);\n\t\t\treturn;\n\n\t// Check for Drive Change (Drive Change is internal command) - return if found\n\t} else if ((IsAlphabetic(lineBuffer[offset])) &&\n\t\t(lineBuffer[offset + 1] == ':') &&\n\t\t((isspacechar(lineBuffer[offset + 2])) ||\n\t\t(((lineBuffer[offset + 2] == '\\\\')) &&\n\t\t(isspacechar(lineBuffer[offset + 3]))))) {\n\t\t// Colorize Regular Keyword\n\t\tstyler.ColourTo(endPos, SCE_TCMD_WORD);\n\t\treturn;\n\t}\n\n\t// Check for Hide Command (@ECHO OFF/ON)\n\tif (lineBuffer[offset] == '@') {\n\t\tstyler.ColourTo(startLine + offset, SCE_TCMD_HIDE);\n\t\toffset++;\n\t}\n\t// Skip whitespace\n\twhile ((offset < lengthLine) && (isspacechar(lineBuffer[offset]))) {\n\t\toffset++;\n\t}\n\n\t// Read remainder of line word-at-a-time or remainder-of-word-at-a-time\n\twhile (offset < lengthLine) {\n\t\tif (offset > startLine) {\n\t\t\t// Colorize Default Text\n\t\t\tstyler.ColourTo(startLine + offset - 1, SCE_TCMD_DEFAULT);\n\t\t}\n\t\t// Copy word from Line Buffer into Word Buffer\n\t\twbl = 0;\n\t\tfor (; offset < lengthLine && ( wbl < 260 ) && !isspacechar(lineBuffer[offset]); wbl++, offset++) {\n\t\t\twordBuffer[wbl] = static_cast<char>(tolower(lineBuffer[offset]));\n\t\t}\n\t\twordBuffer[wbl] = '\\0';\n\t\twbo = 0;\n\n\t\t// Check for Separator\n\t\tif (IsBSeparator(wordBuffer[0])) {\n\n\t\t\t// Reset Offset to re-process remainder of word\n\t\t\toffset -= (wbl - 1);\n\t\t\t// Colorize Default Text\n\t\t\tstyler.ColourTo(startLine + offset - 1, SCE_BAT_DEFAULT);\n\n\t\t\tif (wordBuffer[0] == '\"')\n\t\t\t\tinString = !inString;\n\n\t\t// Check for Regular expression\n\t\t} else if (( wordBuffer[0] == ':' ) && ( wordBuffer[1] == ':' ) && (continueProcessing)) {\n\n\t\t\t// Colorize Regular exoressuin\n\t\t\tstyler.ColourTo(startLine + offset - 1, SCE_TCMD_DEFAULT);\n\t\t\t// No need to Reset Offset\n\n\t\t// Check for Labels in text (... :label)\n\t\t} else if (wordBuffer[0] == ':' && isspacechar(lineBuffer[offset - wbl - 1])) {\n\t\t\t// Colorize Default Text\n\t\t\tstyler.ColourTo(startLine + offset - 1 - wbl, SCE_TCMD_DEFAULT);\n\t\t\t// Colorize Label\n\t\t\tstyler.ColourTo(startLine + offset - 1, SCE_TCMD_CLABEL);\n\t\t\t// No need to Reset Offset\n\t\t// Check for delayed expansion Variable (!x...!)\n\t\t} else if (isDelayedExpansion && wordBuffer[0] == '!') {\n\t\t\t// Colorize Default Text\n\t\t\tstyler.ColourTo(startLine + offset - 1 - wbl, SCE_TCMD_DEFAULT);\n\t\t\twbo++;\n\t\t\t// Search to end of word for second !\n\t\t\twhile ((wbo < wbl) && (wordBuffer[wbo] != '!') && (!IsBOperator(wordBuffer[wbo])) && (!IsBSeparator(wordBuffer[wbo]))) {\n\t\t\t\twbo++;\n\t\t\t}\n\t\t\tif (wordBuffer[wbo] == '!') {\n\t\t\t\twbo++;\n\t\t\t\t// Colorize Environment Variable\n\t\t\t\tstyler.ColourTo(startLine + offset - 1 - (wbl - wbo), SCE_TCMD_EXPANSION);\n\t\t\t} else {\n\t\t\t\twbo = 1;\n\t\t\t\t// Colorize Symbol\n\t\t\t\tstyler.ColourTo(startLine + offset - 1 - (wbl - 1), SCE_TCMD_DEFAULT);\n\t\t\t}\n\n\t\t\t// Reset Offset to re-process remainder of word\n\t\t\toffset -= (wbl - wbo);\n\n\t\t// Check for Regular Keyword in list\n\t\t} else if ((keywords.InList(wordBuffer)) &&\t(!inString) && (continueProcessing)) {\n\n\t\t\t// ECHO, PATH, and PROMPT require no further Regular Keyword Checking\n\t\t\tif ((CompareCaseInsensitive(wordBuffer, \"echo\") == 0) ||\n\t\t\t  (CompareCaseInsensitive(sKeywordBuffer, \"echos\") == 0) ||\n\t\t\t  (CompareCaseInsensitive(sKeywordBuffer, \"echoerr\") == 0) ||\n\t\t\t  (CompareCaseInsensitive(sKeywordBuffer, \"echoserr\") == 0) ||\n\t\t\t  (CompareCaseInsensitive(wordBuffer, \"path\") == 0) ||\n\t\t\t  (CompareCaseInsensitive(wordBuffer, \"prompt\") == 0)) {\n\t\t\t\tcontinueProcessing = false;\n\t\t\t}\n\n\t\t\t// Colorize Regular keyword\n\t\t\tstyler.ColourTo(startLine + offset - 1, SCE_TCMD_WORD);\n\t\t\t// No need to Reset Offset\n\n\t\t} else if ((wordBuffer[0] != '%') && (wordBuffer[0] != '!') && (!IsBOperator(wordBuffer[0])) &&\t(!inString) && (continueProcessing)) {\n\n\t\t\t// a few commands accept \"illegal\" syntax -- cd\\, echo., etc.\n\t\t\tsscanf( wordBuffer, \"%[^.<>|&=\\\\/]\", sKeywordBuffer );\n\t\t\tsKeywordFound = false;\n\n\t\t\tif ((CompareCaseInsensitive(sKeywordBuffer, \"echo\") == 0) ||\n\t\t\t  (CompareCaseInsensitive(sKeywordBuffer, \"echos\") == 0) ||\n\t\t\t  (CompareCaseInsensitive(sKeywordBuffer, \"echoerr\") == 0) ||\n\t\t\t  (CompareCaseInsensitive(sKeywordBuffer, \"echoserr\") == 0) ||\n\t\t\t  (CompareCaseInsensitive(sKeywordBuffer, \"cd\") == 0) ||\n\t\t\t  (CompareCaseInsensitive(sKeywordBuffer, \"path\") == 0) ||\n\t\t\t  (CompareCaseInsensitive(sKeywordBuffer, \"prompt\") == 0)) {\n\n\t\t\t\t// no further Regular Keyword Checking\n\t\t\t\tcontinueProcessing = false;\n\t\t\t\tsKeywordFound = true;\n\t\t\t\twbo = (Sci_PositionU)strlen( sKeywordBuffer );\n\n\t\t\t\t// Colorize Special Keyword as Regular Keyword\n\t\t\t\tstyler.ColourTo(startLine + offset - 1 - (wbl - wbo), SCE_TCMD_WORD);\n\t\t\t\t// Reset Offset to re-process remainder of word\n\t\t\t\toffset -= (wbl - wbo);\n\t\t\t}\n\n\t\t\t// Check for Default Text\n\t\t\tif (!sKeywordFound) {\n\t\t\t\twbo = 0;\n\t\t\t\t// Read up to %, Operator or Separator\n\t\t\t\twhile ((wbo < wbl) && (wordBuffer[wbo] != '%') && (!isDelayedExpansion || wordBuffer[wbo] != '!') && (!IsBOperator(wordBuffer[wbo])) &&\t(!IsBSeparator(wordBuffer[wbo]))) {\n\t\t\t\t\twbo++;\n\t\t\t\t}\n\t\t\t\t// Colorize Default Text\n\t\t\t\tstyler.ColourTo(startLine + offset - 1 - (wbl - wbo), SCE_TCMD_DEFAULT);\n\t\t\t\t// Reset Offset to re-process remainder of word\n\t\t\t\toffset -= (wbl - wbo);\n\t\t\t}\n\n\t\t// Check for Argument  (%n), Environment Variable (%x...%) or Local Variable (%%a)\n\t\t} else if (wordBuffer[0] == '%') {\n\t\t\tunsigned int varlen;\n\t\t\tunsigned int n = 1;\n\t\t\t// Colorize Default Text\n\t\t\tstyler.ColourTo(startLine + offset - 1 - wbl, SCE_TCMD_DEFAULT);\n\t\t\twbo++;\n\n\t\t\t// check for %[nn] syntax\n\t\t\tif ( wordBuffer[1] == '[' ) {\n\t\t\t\tn++;\n\t\t\t\twhile ((n < wbl) && (wordBuffer[n] != ']')) {\n\t\t\t\t\tn++;\n\t\t\t\t}\n\t\t\t\tif ( wordBuffer[n] == ']' )\n\t\t\t\t\tn++;\n\t\t\t\tgoto ColorizeArg;\n\t\t\t}\n\n\t\t\t// Search to end of word for second % or to the first terminator (can be a long path)\n\t\t\twhile ((wbo < wbl) && (wordBuffer[wbo] != '%') && (!IsBOperator(wordBuffer[wbo])) && (!IsBSeparator(wordBuffer[wbo]))) {\n\t\t\t\twbo++;\n\t\t\t}\n\n\t\t\t// Check for Argument (%n) or (%*)\n\t\t\tif (((isdigit(wordBuffer[1])) || (wordBuffer[1] == '*')) && (wordBuffer[wbo] != '%')) {\n\t\t\t\twhile (( wordBuffer[n] ) && ( strchr( \"%0123456789*#$\", wordBuffer[n] ) != NULL ))\n\t\t\t\t\tn++;\nColorizeArg:\n\t\t\t\t// Colorize Argument\n\t\t\t\tstyler.ColourTo(startLine + offset - 1 - (wbl - n), SCE_TCMD_IDENTIFIER);\n\t\t\t\t// Reset Offset to re-process remainder of word\n\t\t\t\toffset -= (wbl - n);\n\n\t\t\t// Check for Variable with modifiers (%~...)\n\t\t\t} else if ((varlen = GetBatchVarLen(wordBuffer)) != 0) {\n\n\t\t\t\t// Colorize Variable\n\t\t\t\tstyler.ColourTo(startLine + offset - 1 - (wbl - varlen), SCE_TCMD_IDENTIFIER);\n\t\t\t\t// Reset Offset to re-process remainder of word\n\t\t\t\toffset -= (wbl - varlen);\n\n\t\t\t// Check for Environment Variable (%x...%)\n\t\t\t} else if (( wordBuffer[1] ) && ( wordBuffer[1] != '%')) {\n\t\t\t\tif ( wordBuffer[wbo] == '%' )\n\t\t\t\t\twbo++;\n\n\t\t\t\t// Colorize Environment Variable\n\t\t\t\tstyler.ColourTo(startLine + offset - 1 - (wbl - wbo), SCE_TCMD_ENVIRONMENT);\n\t\t\t\t// Reset Offset to re-process remainder of word\n\t\t\t\toffset -= (wbl - wbo);\n\n\t\t\t// Check for Local Variable (%%a)\n\t\t\t} else if (\t(wbl > 2) && (wordBuffer[1] == '%') && (wordBuffer[2] != '%') && (!IsBOperator(wordBuffer[2])) && (!IsBSeparator(wordBuffer[2]))) {\n\n\t\t\t\tn = 2;\n\t\t\t\twhile (( wordBuffer[n] ) && (!IsBOperator(wordBuffer[n])) && (!IsBSeparator(wordBuffer[n])))\n\t\t\t\t\tn++;\n\n\t\t\t\t// Colorize Local Variable\n\t\t\t\tstyler.ColourTo(startLine + offset - 1 - (wbl - n), SCE_TCMD_IDENTIFIER);\n\t\t\t\t// Reset Offset to re-process remainder of word\n\t\t\t\toffset -= (wbl - n);\n\n\t\t\t// Check for %%\n\t\t\t} else if ((wbl > 1) && (wordBuffer[1] == '%')) {\n\n\t\t\t\t// Colorize Symbols\n\t\t\t\tstyler.ColourTo(startLine + offset - 1 - (wbl - 2), SCE_TCMD_DEFAULT);\n\t\t\t\t// Reset Offset to re-process remainder of word\n\t\t\t\toffset -= (wbl - 2);\n\t\t\t} else {\n\n\t\t\t\t// Colorize Symbol\n\t\t\t\tstyler.ColourTo(startLine + offset - 1 - (wbl - 1), SCE_TCMD_DEFAULT);\n\t\t\t\t// Reset Offset to re-process remainder of word\n\t\t\t\toffset -= (wbl - 1);\n\t\t\t}\n\n\t\t// Check for Operator\n\t\t} else if (IsBOperator(wordBuffer[0])) {\n\t\t\t// Colorize Default Text\n\t\t\tstyler.ColourTo(startLine + offset - 1 - wbl, SCE_TCMD_DEFAULT);\n\n\t\t\t// Check for Pipe, compound, or conditional Operator\n\t\t\tif ((wordBuffer[0] == '|') || (wordBuffer[0] == '&')) {\n\n\t\t\t\t// Colorize Pipe Operator\n\t\t\t\tstyler.ColourTo(startLine + offset - 1 - (wbl - 1), SCE_TCMD_OPERATOR);\n\t\t\t\t// Reset Offset to re-process remainder of word\n\t\t\t\toffset -= (wbl - 1);\n\t\t\t\tcontinueProcessing = true;\n\n\t\t\t// Check for Other Operator\n\t\t\t} else {\n\t\t\t\t// Check for > Operator\n\t\t\t\tif ((wordBuffer[0] == '>') || (wordBuffer[0] == '<')) {\n\t\t\t\t\t// Turn Keyword and External Command / Program checking back on\n\t\t\t\t\tcontinueProcessing = true;\n\t\t\t\t}\n\t\t\t\t// Colorize Other Operator\n\t\t\t\tif (!inString || !(wordBuffer[0] == '(' || wordBuffer[0] == ')'))\n\t\t\t\t\tstyler.ColourTo(startLine + offset - 1 - (wbl - 1), SCE_TCMD_OPERATOR);\n\t\t\t\t// Reset Offset to re-process remainder of word\n\t\t\t\toffset -= (wbl - 1);\n\t\t\t}\n\n\t\t// Check for Default Text\n\t\t} else {\n\t\t\t// Read up to %, Operator or Separator\n\t\t\twhile ((wbo < wbl) && (wordBuffer[wbo] != '%') && (!isDelayedExpansion || wordBuffer[wbo] != '!') && (!IsBOperator(wordBuffer[wbo])) &&\t(!IsBSeparator(wordBuffer[wbo]))) {\n\t\t\t\twbo++;\n\t\t\t}\n\t\t\t// Colorize Default Text\n\t\t\tstyler.ColourTo(startLine + offset - 1 - (wbl - wbo), SCE_TCMD_DEFAULT);\n\t\t\t// Reset Offset to re-process remainder of word\n\t\t\toffset -= (wbl - wbo);\n\t\t}\n\n\t\t// Skip whitespace - nothing happens if Offset was Reset\n\t\twhile ((offset < lengthLine) && (isspacechar(lineBuffer[offset]))) {\n\t\t\toffset++;\n\t\t}\n\t}\n\t// Colorize Default Text for remainder of line - currently not lexed\n\tstyler.ColourTo(endPos, SCE_TCMD_DEFAULT);\n}\n\nstatic void ColouriseTCMDDoc( Sci_PositionU startPos, Sci_Position length, int /*initStyle*/, WordList *keywordlists[], Accessor &styler )\n{\n\tchar lineBuffer[16384];\n\n\tstyler.StartAt(startPos);\n\tstyler.StartSegment(startPos);\n\tSci_PositionU linePos = 0;\n\tSci_PositionU startLine = startPos;\n\tfor (Sci_PositionU i = startPos; i < startPos + length; i++) {\n\t\tlineBuffer[linePos++] = styler[i];\n\t\tif (AtEOL(styler, i) || (linePos >= sizeof(lineBuffer) - 1)) {\n\t\t\t// End of line (or of line buffer) met, colourise it\n\t\t\tlineBuffer[linePos] = '\\0';\n\t\t\tColouriseTCMDLine(lineBuffer, linePos, startLine, i, keywordlists, styler);\n\t\t\tlinePos = 0;\n\t\t\tstartLine = i + 1;\n\t\t}\n\t}\n\tif (linePos > 0) {\t// Last line does not have ending characters\n\t\tlineBuffer[linePos] = '\\0';\n\t\tColouriseTCMDLine(lineBuffer, linePos, startLine, startPos + length - 1, keywordlists, styler);\n\t}\n}\n\n// Convert string to upper case\nstatic void StrUpr(char *s) {\n\twhile (*s) {\n\t\t*s = MakeUpperCase(*s);\n\t\ts++;\n\t}\n}\n\n// Folding support (for DO, IFF, SWITCH, TEXT, and command groups)\nstatic void FoldTCMDDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[], Accessor &styler)\n{\n\tSci_Position line = styler.GetLine(startPos);\n\tint level = styler.LevelAt(line);\n\tint levelIndent = 0;\n\tSci_PositionU endPos = startPos + length;\n\tchar s[16] = \"\";\n\n    char chPrev = styler.SafeGetCharAt(startPos - 1);\n\n\t// Scan for ( and )\n\tfor (Sci_PositionU i = startPos; i < endPos; i++) {\n\n\t\tint c = styler.SafeGetCharAt(i, '\\n');\n\t\tint style = styler.StyleAt(i);\n        bool bLineStart = ((chPrev == '\\r') || (chPrev == '\\n')) || i == 0;\n\n\t\tif (style == SCE_TCMD_OPERATOR) {\n\t\t\t// CheckFoldPoint\n\t\t\tif (c == '(') {\n\t\t\t\tlevelIndent += 1;\n\t\t\t} else if (c == ')') {\n\t\t\t\tlevelIndent -= 1;\n\t\t\t}\n\t\t}\n\n        if (( bLineStart ) && ( style == SCE_TCMD_WORD )) {\n            for (Sci_PositionU j = 0; j < 10; j++) {\n                if (!iswordchar(styler[i + j])) {\n                    break;\n                }\n                s[j] = styler[i + j];\n                s[j + 1] = '\\0';\n            }\n\n\t\t\tStrUpr( s );\n            if ((strcmp(s, \"DO\") == 0) || (strcmp(s, \"IFF\") == 0) || (strcmp(s, \"SWITCH\") == 0) || (strcmp(s, \"TEXT\") == 0)) {\n                levelIndent++;\n            } else if ((strcmp(s, \"ENDDO\") == 0) || (strcmp(s, \"ENDIFF\") == 0) || (strcmp(s, \"ENDSWITCH\") == 0) || (strcmp(s, \"ENDTEXT\") == 0)) {\n                levelIndent--;\n            }\n        }\n\n\t\tif (c == '\\n') { // line end\n\t\t\t\tif (levelIndent > 0) {\n\t\t\t\t\t\tlevel |= SC_FOLDLEVELHEADERFLAG;\n\t\t\t\t}\n\t\t\t\tif (level != styler.LevelAt(line))\n\t\t\t\t\t\tstyler.SetLevel(line, level);\n\t\t\t\tlevel += levelIndent;\n\t\t\t\tif ((level & SC_FOLDLEVELNUMBERMASK) < SC_FOLDLEVELBASE)\n\t\t\t\t\t\tlevel = SC_FOLDLEVELBASE;\n\t\t\t\tline++;\n\t\t\t\t// reset state\n\t\t\t\tlevelIndent = 0;\n\t\t\t\tlevel &= ~SC_FOLDLEVELHEADERFLAG;\n\t\t\t\tlevel &= ~SC_FOLDLEVELWHITEFLAG;\n\t\t}\n\n\t\tchPrev = c;\n\t}\n}\n\nstatic const char *const tcmdWordListDesc[] = {\n\t\"Internal Commands\",\n\t\"Aliases\",\n\t0\n};\n\nLexerModule lmTCMD(SCLEX_TCMD, ColouriseTCMDDoc, \"tcmd\", FoldTCMDDoc, tcmdWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexTeX.cxx",
    "content": "// Scintilla source code edit control\n\n// @file LexTeX.cxx - general context conformant tex coloring scheme\n// Author: Hans Hagen - PRAGMA ADE - Hasselt NL - www.pragma-ade.com\n// Version: September 28, 2003\n\n// Copyright: 1998-2003 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n// This lexer is derived from the one written for the texwork environment (1999++) which in\n// turn is inspired on texedit (1991++) which finds its roots in wdt (1986).\n\n// If you run into strange boundary cases, just tell me and I'll look into it.\n\n\n// TeX Folding code added by instanton (soft_share@126.com) with borrowed code from VisualTeX source by Alex Romanenko.\n// Version: June 22, 2007\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\n// val SCE_TEX_DEFAULT = 0\n// val SCE_TEX_SPECIAL = 1\n// val SCE_TEX_GROUP   = 2\n// val SCE_TEX_SYMBOL  = 3\n// val SCE_TEX_COMMAND = 4\n// val SCE_TEX_TEXT    = 5\n\n// Definitions in SciTEGlobal.properties:\n//\n// TeX Highlighting\n//\n// # Default\n// style.tex.0=fore:#7F7F00\n// # Special\n// style.tex.1=fore:#007F7F\n// # Group\n// style.tex.2=fore:#880000\n// # Symbol\n// style.tex.3=fore:#7F7F00\n// # Command\n// style.tex.4=fore:#008800\n// # Text\n// style.tex.5=fore:#000000\n\n// lexer.tex.interface.default=0\n// lexer.tex.comment.process=0\n\n// todo: lexer.tex.auto.if\n\n// Auxiliary functions:\n\nstatic inline bool endOfLine(Accessor &styler, Sci_PositionU i) {\n\treturn\n      (styler[i] == '\\n') || ((styler[i] == '\\r') && (styler.SafeGetCharAt(i + 1) != '\\n')) ;\n}\n\nstatic inline bool isTeXzero(int ch) {\n\treturn\n      (ch == '%') ;\n}\n\nstatic inline bool isTeXone(int ch) {\n\treturn\n      (ch == '[') || (ch == ']') || (ch == '=') || (ch == '#') ||\n      (ch == '(') || (ch == ')') || (ch == '<') || (ch == '>') ||\n      (ch == '\"') ;\n}\n\nstatic inline bool isTeXtwo(int ch) {\n\treturn\n      (ch == '{') || (ch == '}') || (ch == '$') ;\n}\n\nstatic inline bool isTeXthree(int ch) {\n\treturn\n      (ch == '~') || (ch == '^') || (ch == '_') || (ch == '&') ||\n      (ch == '-') || (ch == '+') || (ch == '\\\"') || (ch == '`') ||\n      (ch == '/') || (ch == '|') || (ch == '%') ;\n}\n\nstatic inline bool isTeXfour(int ch) {\n\treturn\n      (ch == '\\\\') ;\n}\n\nstatic inline bool isTeXfive(int ch) {\n\treturn\n      ((ch >= 'a') && (ch <= 'z')) || ((ch >= 'A') && (ch <= 'Z')) ||\n      (ch == '@') || (ch == '!') || (ch == '?') ;\n}\n\nstatic inline bool isTeXsix(int ch) {\n\treturn\n      (ch == ' ') ;\n}\n\nstatic inline bool isTeXseven(int ch) {\n\treturn\n      (ch == '^') ;\n}\n\n// Interface determination\n\nstatic int CheckTeXInterface(\n    Sci_PositionU startPos,\n    Sci_Position length,\n    Accessor &styler,\n\tint defaultInterface) {\n\n    char lineBuffer[1024] ;\n\tSci_PositionU linePos = 0 ;\n\n    // some day we can make something lexer.tex.mapping=(all,0)(nl,1)(en,2)...\n\n    if (styler.SafeGetCharAt(0) == '%') {\n        for (Sci_PositionU i = 0; i < startPos + length; i++) {\n            lineBuffer[linePos++] = styler.SafeGetCharAt(i) ;\n            if (endOfLine(styler, i) || (linePos >= sizeof(lineBuffer) - 1)) {\n                lineBuffer[linePos] = '\\0';\n                if (strstr(lineBuffer, \"interface=all\")) {\n                    return 0 ;\n\t\t\t\t} else if (strstr(lineBuffer, \"interface=tex\")) {\n                    return 1 ;\n                } else if (strstr(lineBuffer, \"interface=nl\")) {\n                    return 2 ;\n                } else if (strstr(lineBuffer, \"interface=en\")) {\n                    return 3 ;\n                } else if (strstr(lineBuffer, \"interface=de\")) {\n                    return 4 ;\n                } else if (strstr(lineBuffer, \"interface=cz\")) {\n                    return 5 ;\n                } else if (strstr(lineBuffer, \"interface=it\")) {\n                    return 6 ;\n                } else if (strstr(lineBuffer, \"interface=ro\")) {\n                    return 7 ;\n                } else if (strstr(lineBuffer, \"interface=latex\")) {\n\t\t\t\t\t// we will move latex cum suis up to 91+ when more keyword lists are supported\n                    return 8 ;\n\t\t\t\t} else if (styler.SafeGetCharAt(1) == 'D' && strstr(lineBuffer, \"%D \\\\module\")) {\n\t\t\t\t\t// better would be to limit the search to just one line\n\t\t\t\t\treturn 3 ;\n                } else {\n                    return defaultInterface ;\n                }\n            }\n\t\t}\n    }\n\n    return defaultInterface ;\n}\n\nstatic void ColouriseTeXDoc(\n    Sci_PositionU startPos,\n    Sci_Position length,\n    int,\n    WordList *keywordlists[],\n    Accessor &styler) {\n\n\tstyler.StartAt(startPos) ;\n\tstyler.StartSegment(startPos) ;\n\n\tbool processComment   = styler.GetPropertyInt(\"lexer.tex.comment.process\",   0) == 1 ;\n\tbool useKeywords      = styler.GetPropertyInt(\"lexer.tex.use.keywords\",      1) == 1 ;\n\tbool autoIf           = styler.GetPropertyInt(\"lexer.tex.auto.if\",           1) == 1 ;\n\tint  defaultInterface = styler.GetPropertyInt(\"lexer.tex.interface.default\", 1) ;\n\n\tchar key[100] ;\n\tint  k ;\n\tbool newifDone = false ;\n\tbool inComment = false ;\n\n\tint currentInterface = CheckTeXInterface(startPos,length,styler,defaultInterface) ;\n\n    if (currentInterface == 0) {\n        useKeywords = false ;\n        currentInterface = 1 ;\n    }\n\n    WordList &keywords = *keywordlists[currentInterface-1] ;\n\n\tStyleContext sc(startPos, length, SCE_TEX_TEXT, styler);\n\n\tbool going = sc.More() ; // needed because of a fuzzy end of file state\n\n\tfor (; going; sc.Forward()) {\n\n\t\tif (! sc.More()) { going = false ; } // we need to go one behind the end of text\n\n\t\tif (inComment) {\n\t\t\tif (sc.atLineEnd) {\n\t\t\t\tsc.SetState(SCE_TEX_TEXT) ;\n\t\t\t\tnewifDone = false ;\n\t\t\t\tinComment = false ;\n\t\t\t}\n\t\t} else {\n\t\t\tif (! isTeXfive(sc.ch)) {\n\t\t\t\tif (sc.state == SCE_TEX_COMMAND) {\n\t\t\t\t\tif (sc.LengthCurrent() == 1) { // \\<noncstoken>\n\t\t\t\t\t\tif (isTeXseven(sc.ch) && isTeXseven(sc.chNext)) {\n\t\t\t\t\t\t\tsc.Forward(2) ; // \\^^ and \\^^<token>\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsc.ForwardSetState(SCE_TEX_TEXT) ;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsc.GetCurrent(key, sizeof(key)-1) ;\n\t\t\t\t\t\tk = static_cast<int>(strlen(key)) ;\n\t\t\t\t\t\tmemmove(key,key+1,k) ; // shift left over escape token\n\t\t\t\t\t\tkey[k] = '\\0' ;\n\t\t\t\t\t\tk-- ;\n\t\t\t\t\t\tif (! keywords || ! useKeywords) {\n\t\t\t\t\t\t\tsc.SetState(SCE_TEX_COMMAND) ;\n\t\t\t\t\t\t\tnewifDone = false ;\n\t\t\t\t\t\t} else if (k == 1) { //\\<cstoken>\n\t\t\t\t\t\t\tsc.SetState(SCE_TEX_COMMAND) ;\n\t\t\t\t\t\t\tnewifDone = false ;\n\t\t\t\t\t\t} else if (keywords.InList(key)) {\n    \t\t\t\t\t\tsc.SetState(SCE_TEX_COMMAND) ;\n\t\t\t\t\t\t\tnewifDone = autoIf && (strcmp(key,\"newif\") == 0) ;\n\t\t\t\t\t\t} else if (autoIf && ! newifDone && (key[0] == 'i') && (key[1] == 'f') && keywords.InList(\"if\")) {\n\t    \t\t\t\t\tsc.SetState(SCE_TEX_COMMAND) ;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsc.ChangeState(SCE_TEX_TEXT) ;\n\t\t\t\t\t\t\tsc.SetState(SCE_TEX_TEXT) ;\n\t\t\t\t\t\t\tnewifDone = false ;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (isTeXzero(sc.ch)) {\n\t\t\t\t\tsc.SetState(SCE_TEX_SYMBOL);\n\n\t\t\t\t\tif (!endOfLine(styler,sc.currentPos + 1))\n\t\t\t\t\t\tsc.ForwardSetState(SCE_TEX_DEFAULT) ;\n\n\t\t\t\t\tinComment = ! processComment ;\n\t\t\t\t\tnewifDone = false ;\n\t\t\t\t} else if (isTeXseven(sc.ch) && isTeXseven(sc.chNext)) {\n\t\t\t\t\tsc.SetState(SCE_TEX_TEXT) ;\n\t\t\t\t\tsc.ForwardSetState(SCE_TEX_TEXT) ;\n\t\t\t\t} else if (isTeXone(sc.ch)) {\n\t\t\t\t\tsc.SetState(SCE_TEX_SPECIAL) ;\n\t\t\t\t\tnewifDone = false ;\n\t\t\t\t} else if (isTeXtwo(sc.ch)) {\n\t\t\t\t\tsc.SetState(SCE_TEX_GROUP) ;\n\t\t\t\t\tnewifDone = false ;\n\t\t\t\t} else if (isTeXthree(sc.ch)) {\n\t\t\t\t\tsc.SetState(SCE_TEX_SYMBOL) ;\n\t\t\t\t\tnewifDone = false ;\n\t\t\t\t} else if (isTeXfour(sc.ch)) {\n\t\t\t\t\tsc.SetState(SCE_TEX_COMMAND) ;\n\t\t\t\t} else if (isTeXsix(sc.ch)) {\n\t\t\t\t\tsc.SetState(SCE_TEX_TEXT) ;\n\t\t\t\t} else if (sc.atLineEnd) {\n\t\t\t\t\tsc.SetState(SCE_TEX_TEXT) ;\n\t\t\t\t\tnewifDone = false ;\n\t\t\t\t\tinComment = false ;\n\t\t\t\t} else {\n\t\t\t\t\tsc.SetState(SCE_TEX_TEXT) ;\n\t\t\t\t}\n\t\t\t} else if (sc.state != SCE_TEX_COMMAND) {\n\t\t\t\tsc.SetState(SCE_TEX_TEXT) ;\n\t\t\t}\n\t\t}\n\t}\n\tsc.ChangeState(SCE_TEX_TEXT) ;\n\tsc.Complete();\n\n}\n\n\nstatic inline bool isNumber(int ch) {\n\treturn\n      (ch == '0') || (ch == '1') || (ch == '2') ||\n      (ch == '3') || (ch == '4') || (ch == '5') ||\n      (ch == '6') || (ch == '7') || (ch == '8') || (ch == '9');\n}\n\nstatic inline bool isWordChar(int ch) {\n\treturn ((ch >= 'a') && (ch <= 'z')) || ((ch >= 'A') && (ch <= 'Z'));\n}\n\nstatic Sci_Position ParseTeXCommand(Sci_PositionU pos, Accessor &styler, char *command)\n{\n  Sci_Position length=0;\n  char ch=styler.SafeGetCharAt(pos+1);\n\n  if(ch==',' || ch==':' || ch==';' || ch=='%'){\n      command[0]=ch;\n      command[1]=0;\n\t  return 1;\n  }\n\n  // find end\n     while(isWordChar(ch) && !isNumber(ch) && ch!='_' && ch!='.' && length<100){\n          command[length]=ch;\n          length++;\n          ch=styler.SafeGetCharAt(pos+length+1);\n     }\n\n  command[length]='\\0';\n  if(!length) return 0;\n  return length+1;\n}\n\nstatic int classifyFoldPointTeXPaired(const char* s) {\n\tint lev=0;\n\tif (!(isdigit(s[0]) || (s[0] == '.'))){\n\t\tif (strcmp(s, \"begin\")==0||strcmp(s,\"FoldStart\")==0||\n\t\t\tstrcmp(s,\"abstract\")==0||strcmp(s,\"unprotect\")==0||\n\t\t\tstrcmp(s,\"title\")==0||strncmp(s,\"start\",5)==0||strncmp(s,\"Start\",5)==0||\n\t\t\tstrcmp(s,\"documentclass\")==0||strncmp(s,\"if\",2)==0\n\t\t\t)\n\t\t\tlev=1;\n\t\tif (strcmp(s, \"end\")==0||strcmp(s,\"FoldStop\")==0||\n\t\t\tstrcmp(s,\"maketitle\")==0||strcmp(s,\"protect\")==0||\n\t\t\tstrncmp(s,\"stop\",4)==0||strncmp(s,\"Stop\",4)==0||\n\t\t\tstrcmp(s,\"fi\")==0\n\t\t\t)\n\t\tlev=-1;\n\t}\n\treturn lev;\n}\n\nstatic int classifyFoldPointTeXUnpaired(const char* s) {\n\tint lev=0;\n\tif (!(isdigit(s[0]) || (s[0] == '.'))){\n\t\tif (strcmp(s,\"part\")==0||\n\t\t\tstrcmp(s,\"chapter\")==0||\n\t\t\tstrcmp(s,\"section\")==0||\n\t\t\tstrcmp(s,\"subsection\")==0||\n\t\t\tstrcmp(s,\"subsubsection\")==0||\n\t\t\tstrcmp(s,\"CJKfamily\")==0||\n\t\t\tstrcmp(s,\"appendix\")==0||\n\t\t\tstrcmp(s,\"Topic\")==0||strcmp(s,\"topic\")==0||\n\t\t\tstrcmp(s,\"subject\")==0||strcmp(s,\"subsubject\")==0||\n\t\t\tstrcmp(s,\"def\")==0||strcmp(s,\"gdef\")==0||strcmp(s,\"edef\")==0||\n\t\t\tstrcmp(s,\"xdef\")==0||strcmp(s,\"framed\")==0||\n\t\t\tstrcmp(s,\"frame\")==0||\n\t\t\tstrcmp(s,\"foilhead\")==0||strcmp(s,\"overlays\")==0||strcmp(s,\"slide\")==0\n\t\t\t){\n\t\t\t    lev=1;\n\t\t\t}\n\t}\n\treturn lev;\n}\n\nstatic bool IsTeXCommentLine(Sci_Position line, Accessor &styler) {\n\tSci_Position pos = styler.LineStart(line);\n\tSci_Position eol_pos = styler.LineStart(line + 1) - 1;\n\n\tSci_Position startpos = pos;\n\n\twhile (startpos<eol_pos){\n\t\tchar ch = styler[startpos];\n\t\tif (ch!='%' && ch!=' ') return false;\n\t\telse if (ch=='%') return true;\n\t\tstartpos++;\n\t}\n\n\treturn false;\n}\n\n// FoldTeXDoc: borrowed from VisualTeX with modifications\n\nstatic void FoldTexDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[], Accessor &styler)\n{\n\tbool foldCompact = styler.GetPropertyInt(\"fold.compact\", 1) != 0;\n\tSci_PositionU endPos = startPos+length;\n\tint visibleChars=0;\n\tSci_Position lineCurrent=styler.GetLine(startPos);\n\tint levelPrev=styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK;\n\tint levelCurrent=levelPrev;\n\tchar chNext=styler[startPos];\n\tchar buffer[100]=\"\";\n\n\tfor (Sci_PositionU i=startPos; i < endPos; i++) {\n\t\tchar ch=chNext;\n\t\tchNext=styler.SafeGetCharAt(i+1);\n\t\tbool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n\n        if(ch=='\\\\') {\n            ParseTeXCommand(i, styler, buffer);\n\t\t\tlevelCurrent += classifyFoldPointTeXPaired(buffer)+classifyFoldPointTeXUnpaired(buffer);\n\t\t}\n\n\t\tif (levelCurrent > SC_FOLDLEVELBASE && ((ch == '\\r' || ch=='\\n') && (chNext == '\\\\'))) {\n            ParseTeXCommand(i+1, styler, buffer);\n\t\t\tlevelCurrent -= classifyFoldPointTeXUnpaired(buffer);\n\t\t}\n\n\tchar chNext2;\n\tchar chNext3;\n\tchar chNext4;\n\tchar chNext5;\n\tchNext2=styler.SafeGetCharAt(i+2);\n\tchNext3=styler.SafeGetCharAt(i+3);\n\tchNext4=styler.SafeGetCharAt(i+4);\n\tchNext5=styler.SafeGetCharAt(i+5);\n\n\tbool atEOfold = (ch == '%') &&\n\t\t\t(chNext == '%') && (chNext2=='}') &&\n\t\t\t\t(chNext3=='}')&& (chNext4=='-')&& (chNext5=='-');\n\n\tbool atBOfold = (ch == '%') &&\n\t\t\t(chNext == '%') && (chNext2=='-') &&\n\t\t\t\t(chNext3=='-')&& (chNext4=='{')&& (chNext5=='{');\n\n\tif(atBOfold){\n\t\tlevelCurrent+=1;\n\t}\n\n\tif(atEOfold){\n\t\tlevelCurrent-=1;\n\t}\n\n\tif(ch=='\\\\' && chNext=='['){\n\t\tlevelCurrent+=1;\n\t}\n\n\tif(ch=='\\\\' && chNext==']'){\n\t\tlevelCurrent-=1;\n\t}\n\n\tbool foldComment = styler.GetPropertyInt(\"fold.comment\") != 0;\n\n\tif (foldComment && atEOL && IsTeXCommentLine(lineCurrent, styler))\n        {\n            if (lineCurrent==0 && IsTeXCommentLine(lineCurrent + 1, styler)\n\t\t\t\t)\n                levelCurrent++;\n            else if (lineCurrent!=0 && !IsTeXCommentLine(lineCurrent - 1, styler)\n               && IsTeXCommentLine(lineCurrent + 1, styler)\n\t\t\t\t)\n                levelCurrent++;\n            else if (lineCurrent!=0 && IsTeXCommentLine(lineCurrent - 1, styler) &&\n                     !IsTeXCommentLine(lineCurrent+1, styler))\n                levelCurrent--;\n        }\n\n//---------------------------------------------------------------------------------------------\n\n\t\tif (atEOL) {\n\t\t\tint lev = levelPrev;\n\t\t\tif (visibleChars == 0 && foldCompact)\n\t\t\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\t\t\tif ((levelCurrent > levelPrev) && (visibleChars > 0))\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\tif (lev != styler.LevelAt(lineCurrent)) {\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\t\t\t}\n\t\t\tlineCurrent++;\n\t\t\tlevelPrev = levelCurrent;\n\t\t\tvisibleChars = 0;\n\t\t}\n\n\t\tif (!isspacechar(ch))\n\t\t\tvisibleChars++;\n\t}\n\n\t// Fill in the real level of the next line, keeping the current flags as they will be filled in later\n\tint flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK;\n\tstyler.SetLevel(lineCurrent, levelPrev | flagsNext);\n}\n\n\n\n\nstatic const char * const texWordListDesc[] = {\n    \"TeX, eTeX, pdfTeX, Omega\",\n    \"ConTeXt Dutch\",\n    \"ConTeXt English\",\n    \"ConTeXt German\",\n    \"ConTeXt Czech\",\n    \"ConTeXt Italian\",\n    \"ConTeXt Romanian\",\n\t0,\n} ;\n\nLexerModule lmTeX(SCLEX_TEX,   ColouriseTeXDoc, \"tex\", FoldTexDoc, texWordListDesc);\n"
  },
  {
    "path": "lexilla/lexers/LexTxt2tags.cxx",
    "content": "/******************************************************************\n *  LexTxt2tags.cxx\n *\n *  A simple Txt2tags lexer for scintilla.\n *\n *\n *  Adapted by Eric Forgeot\n *  Based on the LexMarkdown.cxx by Jon Strait - jstrait@moonloop.net\n *\n *  What could be improved:\n *   - Verbatim lines could be like for raw lines : when there is no space between the ``` and the following text, the first letter should be colored so the user would understand there must be a space for a valid tag.\n *   - marks such as bold, italic, strikeout, underline should begin to be highlighted only when they are closed and valid.\n *   - verbatim and raw area should be highlighted too.\n *\n *  The License.txt file describes the conditions under which this\n *  software may be distributed.\n *\n *****************************************************************/\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\n\n\nstatic inline bool IsNewline(const int ch) {\n    return (ch == '\\n' || ch == '\\r');\n}\n\n// True if can follow ch down to the end with possibly trailing whitespace\nstatic bool FollowToLineEnd(const int ch, const int state, const Sci_PositionU endPos, StyleContext &sc) {\n    Sci_PositionU i = 0;\n    while (sc.GetRelative(++i) == ch)\n        ;\n    // Skip over whitespace\n    while (IsASpaceOrTab(sc.GetRelative(i)) && sc.currentPos + i < endPos)\n        ++i;\n    if (IsNewline(sc.GetRelative(i)) || sc.currentPos + i == endPos) {\n        sc.Forward(i);\n        sc.ChangeState(state);\n        sc.SetState(SCE_TXT2TAGS_LINE_BEGIN);\n        return true;\n    }\n    else return false;\n}\n\n// Does the previous line have more than spaces and tabs?\nstatic bool HasPrevLineContent(StyleContext &sc) {\n    Sci_Position i = 0;\n    // Go back to the previous newline\n    while ((--i + sc.currentPos) && !IsNewline(sc.GetRelative(i)))\n        ;\n    while (--i + sc.currentPos) {\n        if (IsNewline(sc.GetRelative(i)))\n            break;\n        if (!IsASpaceOrTab(sc.GetRelative(i)))\n            return true;\n    }\n    return false;\n}\n\n// Separator line\nstatic bool IsValidHrule(const Sci_PositionU endPos, StyleContext &sc) {\n    int count = 1;\n    Sci_PositionU i = 0;\n    for (;;) {\n        ++i;\n        int c = sc.GetRelative(i);\n        if (c == sc.ch)\n            ++count;\n        // hit a terminating character\n        else if (!IsASpaceOrTab(c) || sc.currentPos + i == endPos) {\n            // Are we a valid HRULE\n            if ((IsNewline(c) || sc.currentPos + i == endPos) &&\n                    count >= 20 && !HasPrevLineContent(sc)) {\n                sc.SetState(SCE_TXT2TAGS_HRULE);\n                sc.Forward(i);\n                sc.SetState(SCE_TXT2TAGS_LINE_BEGIN);\n                return true;\n            }\n            else {\n                sc.SetState(SCE_TXT2TAGS_DEFAULT);\n\t\treturn false;\n            }\n        }\n    }\n}\n\nstatic void ColorizeTxt2tagsDoc(Sci_PositionU startPos, Sci_Position length, int initStyle,\n                               WordList **, Accessor &styler) {\n    Sci_PositionU endPos = startPos + length;\n    int precharCount = 0;\n    // Don't advance on a new loop iteration and retry at the same position.\n    // Useful in the corner case of having to start at the beginning file position\n    // in the default state.\n    bool freezeCursor = false;\n\n    StyleContext sc(startPos, length, initStyle, styler);\n\n    while (sc.More()) {\n        // Skip past escaped characters\n        if (sc.ch == '\\\\') {\n            sc.Forward();\n            continue;\n        }\n\n        // A blockquotes resets the line semantics\n        if (sc.state == SCE_TXT2TAGS_BLOCKQUOTE){\n            sc.Forward(2);\n            sc.SetState(SCE_TXT2TAGS_LINE_BEGIN);\n        }\n        // An option colors the whole line\n        if (sc.state == SCE_TXT2TAGS_OPTION){\n            FollowToLineEnd('%', SCE_TXT2TAGS_OPTION, endPos, sc);\n        }\n        if (sc.state == SCE_TXT2TAGS_POSTPROC){\n            FollowToLineEnd('%', SCE_TXT2TAGS_POSTPROC, endPos, sc);\n        }\n        if (sc.state == SCE_TXT2TAGS_PREPROC){\n            FollowToLineEnd('%', SCE_TXT2TAGS_PREPROC, endPos, sc);\n        }\n        // A comment colors the whole line\n        if (sc.state == SCE_TXT2TAGS_COMMENT){\n            FollowToLineEnd('%', SCE_TXT2TAGS_COMMENT, endPos, sc);\n        }\n        // Conditional state-based actions\n        if (sc.state == SCE_TXT2TAGS_CODE2) {\n        if (IsNewline(sc.ch))\n                sc.SetState(SCE_TXT2TAGS_LINE_BEGIN);\n            if (sc.Match(\"``\") && sc.GetRelative(-2) != ' ') {\n                sc.Forward(2);\n                sc.SetState(SCE_TXT2TAGS_DEFAULT);\n            }\n        }\n        // Table\n        else if (sc.state == SCE_TXT2TAGS_CODE) {\n        if (IsNewline(sc.ch))\n                sc.SetState(SCE_TXT2TAGS_LINE_BEGIN);\n            if (sc.ch == '|' && sc.chPrev != ' ')\n                sc.ForwardSetState(SCE_TXT2TAGS_DEFAULT);\n        }\n        // Strong\n        else if (sc.state == SCE_TXT2TAGS_STRONG1) {\n        if (IsNewline(sc.ch))\n                sc.SetState(SCE_TXT2TAGS_LINE_BEGIN);\n            if (sc.Match(\"**\") && sc.chPrev != ' ') {\n                sc.Forward(2);\n                sc.SetState(SCE_TXT2TAGS_DEFAULT);\n            }\n        }\n        // Emphasis\n        else if (sc.state == SCE_TXT2TAGS_EM1) {\n        if (IsNewline(sc.ch))\n                sc.SetState(SCE_TXT2TAGS_LINE_BEGIN);\n            if (sc.Match(\"//\") && sc.chPrev != ' ') {\n                sc.Forward(2);\n                sc.ForwardSetState(SCE_TXT2TAGS_DEFAULT);\n           }\n        }\n        // Underline\n        else if (sc.state == SCE_TXT2TAGS_EM2) {\n        if (IsNewline(sc.ch))\n                sc.SetState(SCE_TXT2TAGS_LINE_BEGIN);\n            if (sc.Match(\"__\") && sc.chPrev != ' ') {\n                sc.Forward(2);\n                sc.ForwardSetState(SCE_TXT2TAGS_DEFAULT);\n           }\n        }\n        // codeblock\n        else if (sc.state == SCE_TXT2TAGS_CODEBK) {\n                if (IsNewline(sc.ch))\n                sc.SetState(SCE_TXT2TAGS_LINE_BEGIN);\n            if (sc.atLineStart && sc.Match(\"```\")) {\n                Sci_Position i = 1;\n                while (!IsNewline(sc.GetRelative(i)) && sc.currentPos + i < endPos)\n                    i++;\n                sc.Forward(i);\n                sc.SetState(SCE_TXT2TAGS_DEFAULT);\n            }\n        }\n        // strikeout\n        else if (sc.state == SCE_TXT2TAGS_STRIKEOUT) {\n        if (IsNewline(sc.ch))\n                sc.SetState(SCE_TXT2TAGS_LINE_BEGIN);\n            if (sc.Match(\"--\") && sc.chPrev != ' ') {\n                sc.Forward(2);\n                sc.SetState(SCE_TXT2TAGS_DEFAULT);\n            }\n        }\n        // Headers\n        else if (sc.state == SCE_TXT2TAGS_LINE_BEGIN) {\n            if (sc.Match(\"======\"))\n                {\n                sc.SetState(SCE_TXT2TAGS_HEADER6);\n                sc.Forward();\n                }\n            else if (sc.Match(\"=====\"))\n                {\n                sc.SetState(SCE_TXT2TAGS_HEADER5);\n                sc.Forward();\n                }\n            else if (sc.Match(\"====\"))\n                {\n                sc.SetState(SCE_TXT2TAGS_HEADER4);\n                sc.Forward();\n                }\n            else if (sc.Match(\"===\"))\n                {\n                sc.SetState(SCE_TXT2TAGS_HEADER3);\n                sc.Forward();\n                }\n                //SetStateAndZoom(SCE_TXT2TAGS_HEADER3, 3, '=', sc);\n            else if (sc.Match(\"==\")) {\n                sc.SetState(SCE_TXT2TAGS_HEADER2);\n                sc.Forward();\n                }\n                //SetStateAndZoom(SCE_TXT2TAGS_HEADER2, 2, '=', sc);\n            else if (sc.Match(\"=\")) {\n                // Catch the special case of an unordered list\n                if (sc.chNext == '.' && IsASpaceOrTab(sc.GetRelative(2))) {\n                    precharCount = 0;\n                    sc.SetState(SCE_TXT2TAGS_PRECHAR);\n                }\n                else\n                    {\n                    sc.SetState(SCE_TXT2TAGS_HEADER1);\n                    sc.Forward();\n                    }\n                    //SetStateAndZoom(SCE_TXT2TAGS_HEADER1, 1, '=', sc);\n            }\n\n            // Numbered title\n            else if (sc.Match(\"++++++\"))\n                {\n                sc.SetState(SCE_TXT2TAGS_HEADER6);\n                sc.Forward();\n                }\n            else if (sc.Match(\"+++++\"))\n                {\n                sc.SetState(SCE_TXT2TAGS_HEADER5);\n                sc.Forward();\n                }\n            else if (sc.Match(\"++++\"))\n                {\n                sc.SetState(SCE_TXT2TAGS_HEADER4);\n                sc.Forward();\n                }\n            else if (sc.Match(\"+++\"))\n                {\n                sc.SetState(SCE_TXT2TAGS_HEADER3);\n                sc.Forward();\n                }\n                //SetStateAndZoom(SCE_TXT2TAGS_HEADER3, 3, '+', sc);\n            else if (sc.Match(\"++\")) {\n                sc.SetState(SCE_TXT2TAGS_HEADER2);\n                sc.Forward();\n                }\n                //SetStateAndZoom(SCE_TXT2TAGS_HEADER2, 2, '+', sc);\n            else if (sc.Match(\"+\")) {\n                // Catch the special case of an unordered list\n                if (sc.chNext == ' ' && IsASpaceOrTab(sc.GetRelative(1))) {\n                 //    if (IsNewline(sc.ch)) {\n                     \t//precharCount = 0;\n                //\t\tsc.SetState(SCE_TXT2TAGS_LINE_BEGIN);\n                \t\t//sc.SetState(SCE_TXT2TAGS_PRECHAR);\n\t\t\t\t//\t}\n                //    else {\n                //    precharCount = 0;\n                    sc.SetState(SCE_TXT2TAGS_OLIST_ITEM);\n                    sc.Forward(2);\n                    sc.SetState(SCE_TXT2TAGS_DEFAULT);\n               //     sc.SetState(SCE_TXT2TAGS_PRECHAR);\n\t\t\t\t//\t}\n                }\n                else\n                    {\n                    sc.SetState(SCE_TXT2TAGS_HEADER1);\n                    sc.Forward();\n                    }\n            }\n\n\n            // Codeblock\n            else if (sc.Match(\"```\")) {\n                if (!HasPrevLineContent(sc))\n              //  if (!FollowToLineEnd(sc))\n                    sc.SetState(SCE_TXT2TAGS_CODEBK);\n                else\n                    sc.SetState(SCE_TXT2TAGS_DEFAULT);\n            }\n\n            // Preproc\n            else if (sc.Match(\"%!preproc\")) {\n                sc.SetState(SCE_TXT2TAGS_PREPROC);\n            }\n            // Postproc\n            else if (sc.Match(\"%!postproc\")) {\n                sc.SetState(SCE_TXT2TAGS_POSTPROC);\n            }\n            // Option\n            else if (sc.Match(\"%!\")) {\n                sc.SetState(SCE_TXT2TAGS_OPTION);\n            }\n\n             // Comment\n            else if (sc.ch == '%') {\n                sc.SetState(SCE_TXT2TAGS_COMMENT);\n            }\n            // list\n            else if (sc.ch == '-') {\n                    precharCount = 0;\n                    sc.SetState(SCE_TXT2TAGS_PRECHAR);\n            }\n            // def list\n            else if (sc.ch == ':') {\n                    precharCount = 0;\n                   sc.SetState(SCE_TXT2TAGS_OLIST_ITEM);\n                   sc.Forward(1);\n                   sc.SetState(SCE_TXT2TAGS_PRECHAR);\n            }\n            else if (IsNewline(sc.ch))\n                sc.SetState(SCE_TXT2TAGS_LINE_BEGIN);\n            else {\n                precharCount = 0;\n                sc.SetState(SCE_TXT2TAGS_PRECHAR);\n            }\n        }\n\n        // The header lasts until the newline\n        else if (sc.state == SCE_TXT2TAGS_HEADER1 || sc.state == SCE_TXT2TAGS_HEADER2 ||\n                sc.state == SCE_TXT2TAGS_HEADER3 || sc.state == SCE_TXT2TAGS_HEADER4 ||\n                sc.state == SCE_TXT2TAGS_HEADER5 || sc.state == SCE_TXT2TAGS_HEADER6) {\n            if (IsNewline(sc.ch))\n                sc.SetState(SCE_TXT2TAGS_LINE_BEGIN);\n        }\n\n        // New state only within the initial whitespace\n        if (sc.state == SCE_TXT2TAGS_PRECHAR) {\n            // Blockquote\n            if (sc.Match(\"\\\"\\\"\\\"\") && precharCount < 5){\n\n                sc.SetState(SCE_TXT2TAGS_BLOCKQUOTE);\n                sc.Forward(1);\n                }\n            /*\n            // Begin of code block\n            else if (!HasPrevLineContent(sc) && (sc.chPrev == '\\t' || precharCount >= 4))\n                sc.SetState(SCE_TXT2TAGS_CODEBK);\n            */\n            // HRule - Total of 20 or more hyphens, asterisks, or underscores\n            // on a line by themselves\n            else if ((sc.ch == '-' ) && IsValidHrule(endPos, sc))\n                ;\n            // Unordered list\n            else if ((sc.ch == '-') && IsASpaceOrTab(sc.chNext)) {\n                sc.SetState(SCE_TXT2TAGS_ULIST_ITEM);\n                sc.ForwardSetState(SCE_TXT2TAGS_DEFAULT);\n            }\n            // Ordered list\n            else if (IsADigit(sc.ch)) {\n                Sci_Position digitCount = 0;\n                while (IsADigit(sc.GetRelative(++digitCount)))\n                    ;\n                if (sc.GetRelative(digitCount) == '.' &&\n                        IsASpaceOrTab(sc.GetRelative(digitCount + 1))) {\n                    sc.SetState(SCE_TXT2TAGS_OLIST_ITEM);\n                    sc.Forward(digitCount + 1);\n                    sc.SetState(SCE_TXT2TAGS_DEFAULT);\n                }\n            }\n            // Alternate Ordered list\n            else if (sc.ch == '+' && sc.chNext == ' ' && IsASpaceOrTab(sc.GetRelative(2))) {\n            //    sc.SetState(SCE_TXT2TAGS_OLIST_ITEM);\n            //    sc.Forward(2);\n             //   sc.SetState(SCE_TXT2TAGS_DEFAULT);\n            }\n            else if (sc.ch != ' ' || precharCount > 2)\n                sc.SetState(SCE_TXT2TAGS_DEFAULT);\n            else\n                ++precharCount;\n        }\n\n        // New state anywhere in doc\n        if (sc.state == SCE_TXT2TAGS_DEFAULT) {\n         //   if (sc.atLineStart && sc.ch == '#') {\n         //       sc.SetState(SCE_TXT2TAGS_LINE_BEGIN);\n         //       freezeCursor = true;\n         //   }\n            // Links and Images\n            if (sc.Match(\"![\") || sc.ch == '[') {\n                Sci_Position i = 0, j = 0, k = 0;\n                Sci_Position len = endPos - sc.currentPos;\n                while (i < len && (sc.GetRelative(++i) != ']' || sc.GetRelative(i - 1) == '\\\\'))\n                    ;\n                if (sc.GetRelative(i) == ']') {\n                    j = i;\n                    if (sc.GetRelative(++i) == '(') {\n                        while (i < len && (sc.GetRelative(++i) != '(' || sc.GetRelative(i - 1) == '\\\\'))\n                            ;\n                        if (sc.GetRelative(i) == '(')\n                            k = i;\n                    }\n\n                    else if (sc.GetRelative(i) == '[' || sc.GetRelative(++i) == '[') {\n                        while (i < len && (sc.GetRelative(++i) != ']' || sc.GetRelative(i - 1) == '\\\\'))\n                            ;\n                        if (sc.GetRelative(i) == ']')\n                            k = i;\n                    }\n                }\n                // At least a link text\n                if (j) {\n                    sc.SetState(SCE_TXT2TAGS_LINK);\n                    sc.Forward(j);\n                    // Also has a URL or reference portion\n                    if (k)\n                        sc.Forward(k - j);\n                    sc.ForwardSetState(SCE_TXT2TAGS_DEFAULT);\n                }\n            }\n            // Code - also a special case for alternate inside spacing\n            if (sc.Match(\"``\") && sc.GetRelative(3) != ' ') {\n                sc.SetState(SCE_TXT2TAGS_CODE2);\n                sc.Forward();\n            }\n            else if (sc.ch == '|' && sc.GetRelative(3) != ' ') {\n                sc.SetState(SCE_TXT2TAGS_CODE);\n            }\n            // Strong\n            else if (sc.Match(\"**\") && sc.GetRelative(2) != ' ') {\n                sc.SetState(SCE_TXT2TAGS_STRONG1);\n                sc.Forward();\n           }\n            // Emphasis\n            else if (sc.Match(\"//\") && sc.GetRelative(2) != ' ') {\n                sc.SetState(SCE_TXT2TAGS_EM1);\n                sc.Forward();\n            }\n            else if (sc.Match(\"__\") && sc.GetRelative(2) != ' ') {\n                sc.SetState(SCE_TXT2TAGS_EM2);\n                sc.Forward();\n            }\n            // Strikeout\n            else if (sc.Match(\"--\") && sc.GetRelative(2) != ' ') {\n                sc.SetState(SCE_TXT2TAGS_STRIKEOUT);\n                sc.Forward();\n            }\n\n            // Beginning of line\n            else if (IsNewline(sc.ch))\n                sc.SetState(SCE_TXT2TAGS_LINE_BEGIN);\n        }\n        // Advance if not holding back the cursor for this iteration.\n        if (!freezeCursor)\n            sc.Forward();\n        freezeCursor = false;\n    }\n    sc.Complete();\n}\n\nLexerModule lmTxt2tags(SCLEX_TXT2TAGS, ColorizeTxt2tagsDoc, \"txt2tags\");\n\n\n"
  },
  {
    "path": "lexilla/lexers/LexVB.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexVB.cxx\n ** Lexer for Visual Basic and VBScript.\n **/\n// Copyright 1998-2005 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <cstdlib>\n#include <cassert>\n#include <cstring>\n#include <cctype>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nnamespace {\n\n// Internal state, highlighted as number\nconstexpr int SCE_B_FILENUMBER = SCE_B_DEFAULT + 100;\n\nbool IsVBComment(Accessor &styler, Sci_Position pos, Sci_Position len) {\n\treturn len > 0 && styler[pos] == '\\'';\n}\n\nconstexpr bool IsTypeCharacter(int ch) noexcept {\n\treturn ch == '%' || ch == '&' || ch == '@' || ch == '!' || ch == '#' || ch == '$';\n}\n\n// Extended to accept accented characters\nbool IsAWordChar(int ch) noexcept {\n\treturn ch >= 0x80 ||\n\t       (isalnum(ch) || ch == '.' || ch == '_');\n}\n\nbool IsAWordStart(int ch) noexcept {\n\treturn ch >= 0x80 ||\n\t       (isalpha(ch) || ch == '_');\n}\n\nbool IsANumberChar(int ch) noexcept {\n\t// Not exactly following number definition (several dots are seen as OK, etc.)\n\t// but probably enough in most cases.\n\treturn (ch < 0x80) &&\n\t        (isdigit(ch) || toupper(ch) == 'E' ||\n             ch == '.' || ch == '-' || ch == '+' || ch == '_');\n}\n\nvoid ColouriseVBDoc(Sci_PositionU startPos, Sci_Position length, int initStyle,\n                           WordList *keywordlists[], Accessor &styler, bool vbScriptSyntax) {\n\n\tconst WordList &keywords = *keywordlists[0];\n\tconst WordList &keywords2 = *keywordlists[1];\n\tconst WordList &keywords3 = *keywordlists[2];\n\tconst WordList &keywords4 = *keywordlists[3];\n\n\tstyler.StartAt(startPos);\n\n\tint visibleChars = 0;\n\tint fileNbDigits = 0;\n\n\t// property lexer.vb.strings.multiline\n\t//  Set to 1 to allow strings to continue over line ends.\n\tconst bool allowMultilineStr = styler.GetPropertyInt(\"lexer.vb.strings.multiline\", 0) != 0;\n\n\t// Do not leak onto next line\n\tif (initStyle == SCE_B_STRINGEOL || initStyle == SCE_B_COMMENT || initStyle == SCE_B_PREPROCESSOR) {\n\t\tinitStyle = SCE_B_DEFAULT;\n\t}\n\n\tStyleContext sc(startPos, length, initStyle, styler);\n\n\tfor (; sc.More(); sc.Forward()) {\n\n\t\tif (sc.state == SCE_B_OPERATOR) {\n\t\t\tsc.SetState(SCE_B_DEFAULT);\n\t\t} else if (sc.state == SCE_B_IDENTIFIER) {\n\t\t\tif (!IsAWordChar(sc.ch)) {\n\t\t\t\t// In Basic (except VBScript), a variable name or a function name\n\t\t\t\t// can end with a special character indicating the type of the value\n\t\t\t\t// held or returned.\n\t\t\t\tbool skipType = false;\n\t\t\t\tif (!vbScriptSyntax && IsTypeCharacter(sc.ch)) {\n\t\t\t\t\tsc.Forward();\t// Skip it\n\t\t\t\t\tskipType = true;\n\t\t\t\t}\n\t\t\t\tif (sc.ch == ']') {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t}\n\t\t\t\tchar s[100];\n\t\t\t\tsc.GetCurrentLowered(s, sizeof(s));\n\t\t\t\tif (skipType) {\n\t\t\t\t\ts[strlen(s) - 1] = '\\0';\n\t\t\t\t}\n\t\t\t\tif (strcmp(s, \"rem\") == 0) {\n\t\t\t\t\tsc.ChangeState(SCE_B_COMMENT);\n\t\t\t\t} else {\n\t\t\t\t\tif (keywords.InList(s)) {\n\t\t\t\t\t\tsc.ChangeState(SCE_B_KEYWORD);\n\t\t\t\t\t} else if (keywords2.InList(s)) {\n\t\t\t\t\t\tsc.ChangeState(SCE_B_KEYWORD2);\n\t\t\t\t\t} else if (keywords3.InList(s)) {\n\t\t\t\t\t\tsc.ChangeState(SCE_B_KEYWORD3);\n\t\t\t\t\t} else if (keywords4.InList(s)) {\n\t\t\t\t\t\tsc.ChangeState(SCE_B_KEYWORD4);\n\t\t\t\t\t}\t// Else, it is really an identifier...\n\t\t\t\t\tsc.SetState(SCE_B_DEFAULT);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (sc.state == SCE_B_NUMBER) {\n\t\t\t// We stop the number definition on non-numerical non-dot non-eE non-sign char\n\t\t\t// Also accepts A-F for hex. numbers\n\t\t\tif (!IsANumberChar(sc.ch) && !(tolower(sc.ch) >= 'a' && tolower(sc.ch) <= 'f')) {\n\t\t\t\tsc.SetState(SCE_B_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_B_STRING) {\n\t\t\t// VB doubles quotes to preserve them, so just end this string\n\t\t\t// state now as a following quote will start again\n\t\t\tif (sc.ch == '\\\"') {\n\t\t\t\tif (sc.chNext == '\\\"') {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t} else {\n\t\t\t\t\tif (tolower(sc.chNext) == 'c') {\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t}\n\t\t\t\t\tsc.ForwardSetState(SCE_B_DEFAULT);\n\t\t\t\t}\n\t\t\t} else if (sc.atLineEnd && !allowMultilineStr) {\n\t\t\t\tvisibleChars = 0;\n\t\t\t\tsc.ChangeState(SCE_B_STRINGEOL);\n\t\t\t\tsc.ForwardSetState(SCE_B_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_B_COMMENT) {\n\t\t\tif (sc.atLineEnd) {\n\t\t\t\tvisibleChars = 0;\n\t\t\t\tsc.ForwardSetState(SCE_B_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_B_PREPROCESSOR) {\n\t\t\tif (sc.atLineEnd) {\n\t\t\t\tvisibleChars = 0;\n\t\t\t\tsc.ForwardSetState(SCE_B_DEFAULT);\n\t\t\t}\n\t\t} else if (sc.state == SCE_B_FILENUMBER) {\n\t\t\tif (IsADigit(sc.ch)) {\n\t\t\t\tfileNbDigits++;\n\t\t\t\tif (fileNbDigits > 3) {\n\t\t\t\t\tsc.ChangeState(SCE_B_DATE);\n\t\t\t\t}\n\t\t\t} else if (sc.ch == '\\r' || sc.ch == '\\n' || sc.ch == ',') {\n\t\t\t\t// Regular uses: Close #1; Put #1, ...; Get #1, ... etc.\n\t\t\t\t// Too bad if date is format #27, Oct, 2003# or something like that...\n\t\t\t\t// Use regular number state\n\t\t\t\tsc.ChangeState(SCE_B_NUMBER);\n\t\t\t\tsc.SetState(SCE_B_DEFAULT);\n\t\t\t} else if (sc.ch == '#') {\n\t\t\t\tsc.ChangeState(SCE_B_DATE);\n\t\t\t\tsc.ForwardSetState(SCE_B_DEFAULT);\n\t\t\t} else {\n\t\t\t\tsc.ChangeState(SCE_B_DATE);\n\t\t\t}\n\t\t\tif (sc.state != SCE_B_FILENUMBER) {\n\t\t\t\tfileNbDigits = 0;\n\t\t\t}\n\t\t} else if (sc.state == SCE_B_DATE) {\n\t\t\tif (sc.atLineEnd) {\n\t\t\t\tvisibleChars = 0;\n\t\t\t\tsc.ChangeState(SCE_B_STRINGEOL);\n\t\t\t\tsc.ForwardSetState(SCE_B_DEFAULT);\n\t\t\t} else if (sc.ch == '#') {\n\t\t\t\tsc.ForwardSetState(SCE_B_DEFAULT);\n\t\t\t}\n\t\t}\n\n\t\tif (sc.state == SCE_B_DEFAULT) {\n\t\t\tif (sc.ch == '\\'') {\n\t\t\t\tsc.SetState(SCE_B_COMMENT);\n\t\t\t} else if (sc.ch == '\\\"') {\n\t\t\t\tsc.SetState(SCE_B_STRING);\n\t\t\t} else if (sc.ch == '#' && visibleChars == 0) {\n\t\t\t\t// Preprocessor commands are alone on their line\n\t\t\t\tsc.SetState(SCE_B_PREPROCESSOR);\n\t\t\t} else if (sc.ch == '#') {\n\t\t\t\t// It can be a date literal, ending with #, or a file number, from 1 to 511\n\t\t\t\t// The date literal depends on the locale, so anything can go between #'s.\n\t\t\t\t// Can be #January 1, 1993# or #1 Jan 93# or #05/11/2003#, etc.\n\t\t\t\t// So we set the FILENUMBER state, and switch to DATE if it isn't a file number\n\t\t\t\tsc.SetState(SCE_B_FILENUMBER);\n\t\t\t} else if (sc.ch == '&' && tolower(sc.chNext) == 'h') {\n\t\t\t\t// Hexadecimal number\n\t\t\t\tsc.SetState(SCE_B_NUMBER);\n\t\t\t\tsc.Forward();\n\t\t\t} else if (sc.ch == '&' && tolower(sc.chNext) == 'o') {\n\t\t\t\t// Octal number\n\t\t\t\tsc.SetState(SCE_B_NUMBER);\n\t\t\t\tsc.Forward();\n\t\t\t} else if (sc.ch == '&' && tolower(sc.chNext) == 'b') {\n\t\t\t\t// Binary number\n\t\t\t\tsc.SetState(SCE_B_NUMBER);\n\t\t\t\tsc.Forward();\n\t\t\t} else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) {\n\t\t\t\tsc.SetState(SCE_B_NUMBER);\n\t\t\t} else if (IsAWordStart(sc.ch) || (sc.ch == '[')) {\n\t\t\t\tsc.SetState(SCE_B_IDENTIFIER);\n\t\t\t} else if (isoperator(sc.ch) || (sc.ch == '\\\\')) {\t// Integer division\n\t\t\t\tsc.SetState(SCE_B_OPERATOR);\n\t\t\t}\n\t\t}\n\n\t\tif (sc.atLineEnd) {\n\t\t\tvisibleChars = 0;\n\t\t}\n\t\tif (!IsASpace(sc.ch)) {\n\t\t\tvisibleChars++;\n\t\t}\n\t}\n\n\tif (sc.state == SCE_B_IDENTIFIER && !IsAWordChar(sc.ch)) {\n\t\t// In Basic (except VBScript), a variable name or a function name\n\t\t// can end with a special character indicating the type of the value\n\t\t// held or returned.\n\t\tbool skipType = false;\n\t\tif (!vbScriptSyntax && IsTypeCharacter(sc.ch)) {\n\t\t\tsc.Forward();\t// Skip it\n\t\t\tskipType = true;\n\t\t}\n\t\tif (sc.ch == ']') {\n\t\t\tsc.Forward();\n\t\t}\n\t\tchar s[100];\n\t\tsc.GetCurrentLowered(s, sizeof(s));\n\t\tif (skipType) {\n\t\t\ts[strlen(s) - 1] = '\\0';\n\t\t}\n\t\tif (strcmp(s, \"rem\") == 0) {\n\t\t\tsc.ChangeState(SCE_B_COMMENT);\n\t\t} else {\n\t\t\tif (keywords.InList(s)) {\n\t\t\t\tsc.ChangeState(SCE_B_KEYWORD);\n\t\t\t} else if (keywords2.InList(s)) {\n\t\t\t\tsc.ChangeState(SCE_B_KEYWORD2);\n\t\t\t} else if (keywords3.InList(s)) {\n\t\t\t\tsc.ChangeState(SCE_B_KEYWORD3);\n\t\t\t} else if (keywords4.InList(s)) {\n\t\t\t\tsc.ChangeState(SCE_B_KEYWORD4);\n\t\t\t}\t// Else, it is really an identifier...\n\t\t\tsc.SetState(SCE_B_DEFAULT);\n\t\t}\n\t}\n\n\tsc.Complete();\n}\n\nvoid FoldVBDoc(Sci_PositionU startPos, Sci_Position length, int,\n\t\t\t\t\t\t   WordList *[], Accessor &styler) {\n\tconst Sci_Position endPos = startPos + length;\n\n\t// Backtrack to previous line in case need to fix its fold status\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tif (startPos > 0) {\n\t\tif (lineCurrent > 0) {\n\t\t\tlineCurrent--;\n\t\t\tstartPos = styler.LineStart(lineCurrent);\n\t\t}\n\t}\n\tint spaceFlags = 0;\n\tint indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags, IsVBComment);\n\tchar chNext = styler[startPos];\n\tfor (Sci_Position i = startPos; i < endPos; i++) {\n\t\tconst char ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\n\t\tif ((ch == '\\r' && chNext != '\\n') || (ch == '\\n') || (i == endPos)) {\n\t\t\tint lev = indentCurrent;\n\t\t\tconst int indentNext = styler.IndentAmount(lineCurrent + 1, &spaceFlags, IsVBComment);\n\t\t\tif (!(indentCurrent & SC_FOLDLEVELWHITEFLAG)) {\n\t\t\t\t// Only non whitespace lines can be headers\n\t\t\t\tif ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext & SC_FOLDLEVELNUMBERMASK)) {\n\t\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\t\t} else if (indentNext & SC_FOLDLEVELWHITEFLAG) {\n\t\t\t\t\t// Line after is blank so check the next - maybe should continue further?\n\t\t\t\t\tint spaceFlags2 = 0;\n\t\t\t\t\tconst int indentNext2 = styler.IndentAmount(lineCurrent + 2, &spaceFlags2, IsVBComment);\n\t\t\t\t\tif ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext2 & SC_FOLDLEVELNUMBERMASK)) {\n\t\t\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tindentCurrent = indentNext;\n\t\t\tstyler.SetLevel(lineCurrent, lev);\n\t\t\tlineCurrent++;\n\t\t}\n\t}\n}\n\nvoid ColouriseVBNetDoc(Sci_PositionU startPos, Sci_Position length, int initStyle,\n                           WordList *keywordlists[], Accessor &styler) {\n\tColouriseVBDoc(startPos, length, initStyle, keywordlists, styler, false);\n}\n\nvoid ColouriseVBScriptDoc(Sci_PositionU startPos, Sci_Position length, int initStyle,\n                           WordList *keywordlists[], Accessor &styler) {\n\tColouriseVBDoc(startPos, length, initStyle, keywordlists, styler, true);\n}\n\nconst char * const vbWordListDesc[] = {\n\t\"Keywords\",\n\t\"user1\",\n\t\"user2\",\n\t\"user3\",\n\tnullptr\n};\n\n}\n\nLexerModule lmVB(SCLEX_VB, ColouriseVBNetDoc, \"vb\", FoldVBDoc, vbWordListDesc);\nLexerModule lmVBScript(SCLEX_VBSCRIPT, ColouriseVBScriptDoc, \"vbscript\", FoldVBDoc, vbWordListDesc);\n\n"
  },
  {
    "path": "lexilla/lexers/LexVHDL.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexVHDL.cxx\n ** Lexer for VHDL\n ** Written by Phil Reid,\n ** Based on:\n **  - The Verilog Lexer by Avi Yegudin\n **  - The Fortran Lexer by Chuan-jian Shen\n **  - The C++ lexer by Neil Hodgson\n **/\n// Copyright 1998-2002 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nstatic void ColouriseVHDLDoc(\n  Sci_PositionU startPos,\n  Sci_Position length,\n  int initStyle,\n  WordList *keywordlists[],\n  Accessor &styler);\n\n\n/***************************************/\nstatic inline bool IsAWordChar(const int ch) {\n  return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_' );\n}\n\n/***************************************/\nstatic inline bool IsAWordStart(const int ch) {\n  return (ch < 0x80) && (isalnum(ch) || ch == '_');\n}\n\n/***************************************/\nstatic inline bool IsABlank(unsigned int ch) {\n  return (ch == ' ') || (ch == 0x09) || (ch == 0x0b) ;\n}\n\n/***************************************/\nstatic void ColouriseVHDLDoc(\n  Sci_PositionU startPos,\n  Sci_Position length,\n  int initStyle,\n  WordList *keywordlists[],\n  Accessor &styler)\n{\n  WordList &Keywords   = *keywordlists[0];\n  WordList &Operators  = *keywordlists[1];\n  WordList &Attributes = *keywordlists[2];\n  WordList &Functions  = *keywordlists[3];\n  WordList &Packages   = *keywordlists[4];\n  WordList &Types      = *keywordlists[5];\n  WordList &User       = *keywordlists[6];\n\n  StyleContext sc(startPos, length, initStyle, styler);\n  bool isExtendedId = false;    // true when parsing an extended identifier\n\n  while (sc.More())\n  {\n    bool advance = true;\n\n    // Determine if the current state should terminate.\n    if (sc.state == SCE_VHDL_OPERATOR) {\n      sc.SetState(SCE_VHDL_DEFAULT);\n    } else if (sc.state == SCE_VHDL_NUMBER) {\n      if (!IsAWordChar(sc.ch) && (sc.ch != '#')) {\n        sc.SetState(SCE_VHDL_DEFAULT);\n      }\n    } else if (sc.state == SCE_VHDL_IDENTIFIER) {\n      if (!isExtendedId && (!IsAWordChar(sc.ch) || (sc.ch == '.'))) {\n        char s[100];\n        sc.GetCurrentLowered(s, sizeof(s));\n        if (Keywords.InList(s)) {\n          sc.ChangeState(SCE_VHDL_KEYWORD);\n        } else if (Operators.InList(s)) {\n          sc.ChangeState(SCE_VHDL_STDOPERATOR);\n        } else if (Attributes.InList(s)) {\n          sc.ChangeState(SCE_VHDL_ATTRIBUTE);\n        } else if (Functions.InList(s)) {\n          sc.ChangeState(SCE_VHDL_STDFUNCTION);\n        } else if (Packages.InList(s)) {\n          sc.ChangeState(SCE_VHDL_STDPACKAGE);\n        } else if (Types.InList(s)) {\n          sc.ChangeState(SCE_VHDL_STDTYPE);\n        } else if (User.InList(s)) {\n          sc.ChangeState(SCE_VHDL_USERWORD);\n        }\n        sc.SetState(SCE_VHDL_DEFAULT);\n      } else if (isExtendedId && ((sc.ch == '\\\\') || sc.atLineEnd)) {\n        // extended identifiers are terminated by backslash, check for end of line in case we have invalid syntax\n        isExtendedId = false;\n        sc.ForwardSetState(SCE_VHDL_DEFAULT);\n        advance = false;\n      }\n    } else if (sc.state == SCE_VHDL_COMMENT || sc.state == SCE_VHDL_COMMENTLINEBANG) {\n      if (sc.atLineEnd) {\n        sc.SetState(SCE_VHDL_DEFAULT);\n      }\n    } else if (sc.state == SCE_VHDL_STRING) {\n      if (sc.ch == '\"') {\n        advance = false;\n        sc.Forward();\n        if (sc.ch == '\"')\n          sc.Forward();\n        else\n          sc.SetState(SCE_VHDL_DEFAULT);\n      } else if (sc.atLineEnd) {\n        advance = false;\n        sc.ChangeState(SCE_VHDL_STRINGEOL);\n        sc.ForwardSetState(SCE_VHDL_DEFAULT);\n      }\n    } else if (sc.state == SCE_VHDL_BLOCK_COMMENT){\n      if(sc.ch == '*' && sc.chNext == '/'){\n        advance = false;\n        sc.Forward();\n        sc.ForwardSetState(SCE_VHDL_DEFAULT);\n      }\n    }\n\n    // Determine if a new state should be entered.\n    if (sc.state == SCE_VHDL_DEFAULT) {\n      if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) {\n        sc.SetState(SCE_VHDL_NUMBER);\n      } else if (IsAWordStart(sc.ch)) {\n        sc.SetState(SCE_VHDL_IDENTIFIER);\n      } else if (sc.Match('-', '-')) {\n        if (sc.Match(\"--!\"))  // Nice to have a different comment style\n          sc.SetState(SCE_VHDL_COMMENTLINEBANG);\n        else\n          sc.SetState(SCE_VHDL_COMMENT);\n      } else if (sc.Match('/', '*')){\n        sc.SetState(SCE_VHDL_BLOCK_COMMENT);\n      } else if (sc.ch == '\"') {\n        sc.SetState(SCE_VHDL_STRING);\n      } else if (sc.ch == '\\'') {\n        if (sc.GetRelative(2) == '\\''){\n          if (sc.chNext != '(' || sc.GetRelative(4) != '\\''){\n            // Can only be a character literal\n            sc.SetState(SCE_VHDL_STRING);\n            sc.Forward();\n            sc.Forward();\n            sc.ForwardSetState(SCE_VHDL_DEFAULT);\n            advance = false;\n          } // else can be a tick or a character literal, need more context, eg.: identifier'('x')\n        } // else can only be a tick\n      } else if (sc.ch == '\\\\') {\n        isExtendedId = true;\n        sc.SetState(SCE_VHDL_IDENTIFIER);\n      } else if (isoperator(static_cast<char>(sc.ch))) {\n        sc.SetState(SCE_VHDL_OPERATOR);\n      }\n    }\n\n    if (advance)\n      sc.Forward();\n  }\n  sc.Complete();\n}\n//=============================================================================\nstatic bool IsCommentLine(Sci_Position line, Accessor &styler) {\n  Sci_Position pos = styler.LineStart(line);\n  Sci_Position eol_pos = styler.LineStart(line + 1) - 1;\n  for (Sci_Position i = pos; i < eol_pos; i++) {\n    char ch = styler[i];\n    char chNext = styler[i+1];\n    if ((ch == '-') && (chNext == '-'))\n      return true;\n    else if (ch != ' ' && ch != '\\t')\n      return false;\n  }\n  return false;\n}\nstatic bool IsCommentBlockStart(Sci_Position line, Accessor &styler)\n{\n  Sci_Position pos = styler.LineStart(line);\n  Sci_Position eol_pos = styler.LineStart(line + 1) - 1;\n  for (Sci_Position i = pos; i < eol_pos; i++) {\n    char ch = styler[i];\n    char chNext = styler[i+1];\n    char style = styler.StyleAt(i);\n    if ((style == SCE_VHDL_BLOCK_COMMENT) && (ch == '/') && (chNext == '*'))\n      return true;\n  }\n  return false;\n}\n\nstatic bool IsCommentBlockEnd(Sci_Position line, Accessor &styler)\n{\n  Sci_Position pos = styler.LineStart(line);\n  Sci_Position eol_pos = styler.LineStart(line + 1) - 1;\n\n  for (Sci_Position i = pos; i < eol_pos; i++) {\n    char ch = styler[i];\n    char chNext = styler[i+1];\n    char style = styler.StyleAt(i);\n    if ((style == SCE_VHDL_BLOCK_COMMENT) && (ch == '*') && (chNext == '/'))\n      return true;\n  }\n  return false;\n}\n\nstatic bool IsCommentStyle(char style)\n{\n  return style == SCE_VHDL_BLOCK_COMMENT || style == SCE_VHDL_COMMENT || style == SCE_VHDL_COMMENTLINEBANG;\n}\n\n//=============================================================================\n// Folding the code\nstatic void FoldNoBoxVHDLDoc(\n  Sci_PositionU startPos,\n  Sci_Position length,\n  int,\n  Accessor &styler)\n{\n  // Decided it would be smarter to have the lexer have all keywords included. Therefore I\n  // don't check if the style for the keywords that I use to adjust the levels.\n  char words[] =\n    \"architecture begin block case component else elsif end entity for generate loop package process record then \"\n    \"procedure protected function when units\";\n  WordList keywords;\n  keywords.Set(words);\n\n  bool foldComment      = styler.GetPropertyInt(\"fold.comment\", 1) != 0;\n  bool foldCompact      = styler.GetPropertyInt(\"fold.compact\", 1) != 0;\n  bool foldAtElse       = styler.GetPropertyInt(\"fold.at.else\", 1) != 0;\n  bool foldAtBegin      = styler.GetPropertyInt(\"fold.at.Begin\", 1) != 0;\n  bool foldAtParenthese = styler.GetPropertyInt(\"fold.at.Parenthese\", 1) != 0;\n  //bool foldAtWhen       = styler.GetPropertyInt(\"fold.at.When\", 1) != 0;  //< fold at when in case statements\n\n  int  visibleChars     = 0;\n  Sci_PositionU endPos   = startPos + length;\n\n  Sci_Position lineCurrent       = styler.GetLine(startPos);\n  int levelCurrent      = SC_FOLDLEVELBASE;\n  if(lineCurrent > 0)\n    levelCurrent        = styler.LevelAt(lineCurrent-1) >> 16;\n  //int levelMinCurrent   = levelCurrent;\n  int levelMinCurrentElse = levelCurrent;   ///< Used for folding at 'else'\n  int levelMinCurrentBegin = levelCurrent;  ///< Used for folding at 'begin'\n  int levelNext         = levelCurrent;\n\n  /***************************************/\n  Sci_Position lastStart         = 0;\n  char prevWord[32]     = \"\";\n\n  /***************************************/\n  // Find prev word\n  // The logic for going up or down a level depends on a the previous keyword\n  // This code could be cleaned up.\n  Sci_Position end = 0;\n  Sci_PositionU j;\n  for(j = startPos; j>0; j--)\n  {\n    char ch       = styler.SafeGetCharAt(j);\n    char chPrev   = styler.SafeGetCharAt(j-1);\n    int style     = styler.StyleAt(j);\n    int stylePrev = styler.StyleAt(j-1);\n    if ((!IsCommentStyle(style)) && (stylePrev != SCE_VHDL_STRING))\n    {\n      if(IsAWordChar(chPrev) && !IsAWordChar(ch))\n      {\n        end = j-1;\n      }\n    }\n    if ((!IsCommentStyle(style)) && (style != SCE_VHDL_STRING))\n    {\n      if(!IsAWordChar(chPrev) && IsAWordStart(ch) && (end != 0))\n      {\n        char s[32];\n        Sci_PositionU k;\n        for(k=0; (k<31 ) && (k<end-j+1 ); k++) {\n          s[k] = static_cast<char>(tolower(styler[j+k]));\n        }\n        s[k] = '\\0';\n\n        if(keywords.InList(s)) {\n          strcpy(prevWord, s);\n          break;\n        }\n      }\n    }\n  }\n  for(j=j+static_cast<Sci_PositionU>(strlen(prevWord)); j<endPos; j++)\n  {\n    char ch       = styler.SafeGetCharAt(j);\n    int style     = styler.StyleAt(j);\n    if ((!IsCommentStyle(style)) && (style != SCE_VHDL_STRING))\n    {\n      if((ch == ';') && (strcmp(prevWord, \"end\") == 0))\n      {\n        strcpy(prevWord, \";\");\n      }\n    }\n  }\n\n  char  chNext          = styler[startPos];\n  char  chPrev          = '\\0';\n  char  chNextNonBlank;\n  int   styleNext       = styler.StyleAt(startPos);\n  //Platform::DebugPrintf(\"Line[%04d] Prev[%20s] ************************* Level[%x]\\n\", lineCurrent+1, prevWord, levelCurrent);\n\n  /***************************************/\n  for (Sci_PositionU i = startPos; i < endPos; i++)\n  {\n    char ch         = chNext;\n    chNext          = styler.SafeGetCharAt(i + 1);\n    chPrev          = styler.SafeGetCharAt(i - 1);\n    chNextNonBlank  = chNext;\n    Sci_PositionU j  = i+1;\n    while(IsABlank(chNextNonBlank) && j<endPos)\n    {\n      j ++ ;\n      chNextNonBlank = styler.SafeGetCharAt(j);\n    }\n    int style           = styleNext;\n    styleNext       = styler.StyleAt(i + 1);\n    bool atEOL      = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n\n    if (foldComment && atEOL)\n    {\n      if(IsCommentLine(lineCurrent, styler))\n      {\n        if(!IsCommentLine(lineCurrent-1, styler) && IsCommentLine(lineCurrent+1, styler))\n        {\n          levelNext++;\n        }\n        else if(IsCommentLine(lineCurrent-1, styler) && !IsCommentLine(lineCurrent+1, styler))\n        {\n          levelNext--;\n        }\n      }\n      else\n      {\n        if (IsCommentBlockStart(lineCurrent, styler) && !IsCommentBlockEnd(lineCurrent, styler))\n        {\n          levelNext++;\n        }\n        else if (IsCommentBlockEnd(lineCurrent, styler) && !IsCommentBlockStart(lineCurrent, styler))\n        {\n          levelNext--;\n        }\n      }\n    }\n\n    if ((style == SCE_VHDL_OPERATOR) && foldAtParenthese)\n    {\n      if(ch == '(') {\n        levelNext++;\n      } else if (ch == ')') {\n        levelNext--;\n      }\n    }\n\n    if ((!IsCommentStyle(style)) && (style != SCE_VHDL_STRING))\n    {\n      if((ch == ';') && (strcmp(prevWord, \"end\") == 0))\n      {\n        strcpy(prevWord, \";\");\n      }\n\n      if(!IsAWordChar(chPrev) && IsAWordStart(ch))\n      {\n        lastStart = i;\n      }\n\n      if(IsAWordChar(ch) && !IsAWordChar(chNext)) {\n        char s[32];\n        Sci_PositionU k;\n        for(k=0; (k<31 ) && (k<i-lastStart+1 ); k++) {\n          s[k] = static_cast<char>(tolower(styler[lastStart+k]));\n        }\n        s[k] = '\\0';\n\n        if(keywords.InList(s))\n        {\n          if (\n            strcmp(s, \"architecture\") == 0  ||\n            strcmp(s, \"case\") == 0          ||\n            strcmp(s, \"block\") == 0         ||\n            strcmp(s, \"loop\") == 0          ||\n            strcmp(s, \"package\") ==0        ||\n            strcmp(s, \"process\") == 0       ||\n            strcmp(s, \"protected\") == 0     ||\n            strcmp(s, \"record\") == 0        ||\n            strcmp(s, \"then\") == 0          ||\n            strcmp(s, \"units\") == 0)\n          {\n            if (strcmp(prevWord, \"end\") != 0)\n            {\n              if (levelMinCurrentElse > levelNext) {\n                levelMinCurrentElse = levelNext;\n              }\n              levelNext++;\n            }\n          } else if (strcmp(s, \"generate\") == 0){\n            if (strcmp(prevWord, \"end\") != 0 &&\n                strcmp(prevWord, \"else\") != 0 && // vhdl08 else generate\n                strcmp(prevWord, \"case\") != 0)   // vhdl08 case generate\n            {\n              if (levelMinCurrentElse > levelNext) {\n                levelMinCurrentElse = levelNext;\n              }\n              levelNext++;\n            }\n          } else if (\n            strcmp(s, \"component\") == 0      ||\n            strcmp(s, \"entity\") == 0         ||\n            strcmp(s, \"configuration\") == 0 )\n          {\n            if (strcmp(prevWord, \"end\") != 0)\n            { // check for instantiated unit by backward searching for the colon.\n              Sci_PositionU pos = lastStart;\n              char chAtPos=0, styleAtPos;\n              do{// skip white spaces\n                if(!pos)\n                  break;\n                pos--;\n                styleAtPos = styler.StyleAt(pos);\n                chAtPos = styler.SafeGetCharAt(pos);\n              }while(pos &&\n                     (chAtPos == ' ' || chAtPos == '\\t' ||\n                      chAtPos == '\\n' || chAtPos == '\\r' ||\n                      IsCommentStyle(styleAtPos)));\n\n              // check for a colon (':') before the instantiated units \"entity\", \"component\" or \"configuration\". Don't fold thereafter.\n              if (chAtPos != ':')\n              {\n                if (levelMinCurrentElse > levelNext) {\n                  levelMinCurrentElse = levelNext;\n                }\n                levelNext++;\n              }\n            }\n          } else if (\n            strcmp(s, \"procedure\") == 0     ||\n            strcmp(s, \"function\") == 0)\n          {\n            if (strcmp(prevWord, \"end\") != 0) // check for \"end procedure\" etc.\n            { // This code checks to see if the procedure / function is a definition within a \"package\"\n              // rather than the actual code in the body.\n              int BracketLevel = 0;\n              for(Sci_Position pos=i+1; pos<styler.Length(); pos++)\n              {\n                int styleAtPos = styler.StyleAt(pos);\n                char chAtPos = styler.SafeGetCharAt(pos);\n                if(chAtPos == '(') BracketLevel++;\n                if(chAtPos == ')') BracketLevel--;\n                if(\n                  (BracketLevel == 0) &&\n                  (!IsCommentStyle(styleAtPos)) &&\n                  (styleAtPos != SCE_VHDL_STRING) &&\n                  !iswordchar(styler.SafeGetCharAt(pos-1)) &&\n                  (chAtPos|' ')=='i' && (styler.SafeGetCharAt(pos+1)|' ')=='s' &&\n                  !iswordchar(styler.SafeGetCharAt(pos+2)))\n                {\n                  if (levelMinCurrentElse > levelNext) {\n                    levelMinCurrentElse = levelNext;\n                  }\n                  levelNext++;\n                  break;\n                }\n                if((BracketLevel == 0) && (chAtPos == ';'))\n                {\n                  break;\n                }\n              }\n            }\n\n          } else if (strcmp(s, \"end\") == 0) {\n            levelNext--;\n          }  else if(strcmp(s, \"elsif\") == 0) { // elsif is followed by then or generate so folding occurs correctly\n            levelNext--;\n          } else if (strcmp(s, \"else\") == 0) {\n            if(strcmp(prevWord, \"when\") != 0)  // ignore a <= x when y else z;\n            {\n              levelMinCurrentElse = levelNext - 1;  // VHDL else is all on its own so just dec. the min level\n            }\n          } else if(\n            ((strcmp(s, \"begin\") == 0) && (strcmp(prevWord, \"architecture\") == 0)) ||\n            ((strcmp(s, \"begin\") == 0) && (strcmp(prevWord, \"function\") == 0)) ||\n            ((strcmp(s, \"begin\") == 0) && (strcmp(prevWord, \"procedure\") == 0)) ||\n            ((strcmp(s, \"begin\") == 0) && (strcmp(prevWord, \"generate\") == 0)))\n          {\n            levelMinCurrentBegin = levelNext - 1;\n          }\n          //Platform::DebugPrintf(\"Line[%04d] Prev[%20s] Cur[%20s] Level[%x]\\n\", lineCurrent+1, prevWord, s, levelCurrent);\n          strcpy(prevWord, s);\n        }\n      }\n    }\n    if (atEOL) {\n      int levelUse = levelCurrent;\n\n      if (foldAtElse && (levelMinCurrentElse < levelUse)) {\n        levelUse = levelMinCurrentElse;\n      }\n      if (foldAtBegin && (levelMinCurrentBegin < levelUse)) {\n        levelUse = levelMinCurrentBegin;\n      }\n      int lev = levelUse | levelNext << 16;\n      if (visibleChars == 0 && foldCompact)\n        lev |= SC_FOLDLEVELWHITEFLAG;\n\n      if (levelUse < levelNext)\n        lev |= SC_FOLDLEVELHEADERFLAG;\n      if (lev != styler.LevelAt(lineCurrent)) {\n        styler.SetLevel(lineCurrent, lev);\n      }\n      //Platform::DebugPrintf(\"Line[%04d] ---------------------------------------------------- Level[%x]\\n\", lineCurrent+1, levelCurrent);\n      lineCurrent++;\n      levelCurrent = levelNext;\n      //levelMinCurrent = levelCurrent;\n      levelMinCurrentElse = levelCurrent;\n      levelMinCurrentBegin = levelCurrent;\n      visibleChars = 0;\n    }\n    /***************************************/\n    if (!isspacechar(ch)) visibleChars++;\n  }\n\n  /***************************************/\n//  Platform::DebugPrintf(\"Line[%04d] ---------------------------------------------------- Level[%x]\\n\", lineCurrent+1, levelCurrent);\n}\n\n//=============================================================================\nstatic void FoldVHDLDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *[],\n                       Accessor &styler) {\n  FoldNoBoxVHDLDoc(startPos, length, initStyle, styler);\n}\n\n//=============================================================================\nstatic const char * const VHDLWordLists[] = {\n            \"Keywords\",\n            \"Operators\",\n            \"Attributes\",\n            \"Standard Functions\",\n            \"Standard Packages\",\n            \"Standard Types\",\n            \"User Words\",\n            0,\n        };\n\n\nLexerModule lmVHDL(SCLEX_VHDL, ColouriseVHDLDoc, \"vhdl\", FoldVHDLDoc, VHDLWordLists);\n\n\n// Keyword:\n//    access after alias all architecture array assert attribute begin block body buffer bus case component\n//    configuration constant disconnect downto else elsif end entity exit file for function generate generic\n//    group guarded if impure in inertial inout is label library linkage literal loop map new next null of\n//    on open others out package port postponed procedure process pure range record register reject report\n//    return select severity shared signal subtype then to transport type unaffected units until use variable\n//    wait when while with\n//\n// Operators:\n//    abs and mod nand nor not or rem rol ror sla sll sra srl xnor xor\n//\n// Attributes:\n//    left right low high ascending image value pos val succ pred leftof rightof base range reverse_range\n//    length delayed stable quiet transaction event active last_event last_active last_value driving\n//    driving_value simple_name path_name instance_name\n//\n// Std Functions:\n//    now readline read writeline write endfile resolved to_bit to_bitvector to_stdulogic to_stdlogicvector\n//    to_stdulogicvector to_x01 to_x01z to_UX01 rising_edge falling_edge is_x shift_left shift_right rotate_left\n//    rotate_right resize to_integer to_unsigned to_signed std_match to_01\n//\n// Std Packages:\n//    std ieee work standard textio std_logic_1164 std_logic_arith std_logic_misc std_logic_signed\n//    std_logic_textio std_logic_unsigned numeric_bit numeric_std math_complex math_real vital_primitives\n//    vital_timing\n//\n// Std Types:\n//    boolean bit character severity_level integer real time delay_length natural positive string bit_vector\n//    file_open_kind file_open_status line text side width std_ulogic std_ulogic_vector std_logic\n//    std_logic_vector X01 X01Z UX01 UX01Z unsigned signed\n//\n\n"
  },
  {
    "path": "lexilla/lexers/LexVerilog.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexVerilog.cxx\n ** Lexer for Verilog.\n ** Written by Avi Yegudin, based on C++ lexer by Neil Hodgson\n **/\n// Copyright 1998-2002 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#include <string>\n#include <string_view>\n#include <vector>\n#include <map>\n#include <algorithm>\n#include <functional>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\n#include \"OptionSet.h\"\n#include \"SubStyles.h\"\n#include \"DefaultLexer.h\"\n\nusing namespace Scintilla;\nusing namespace Lexilla;\n\nnamespace {\n\t// Use an unnamed namespace to protect the functions and classes from name conflicts\n\nstruct PPDefinition {\n\tSci_Position line;\n\tstd::string key;\n\tstd::string value;\n\tbool isUndef;\n\tstd::string arguments;\n\tPPDefinition(Sci_Position line_, const std::string &key_, const std::string &value_, bool isUndef_ = false, const std::string &arguments_ = \"\") :\n\t\tline(line_), key(key_), value(value_), isUndef(isUndef_), arguments(arguments_) {\n\t}\n};\n\nclass LinePPState {\n\tint state;\n\tint ifTaken;\n\tint level;\n\tbool ValidLevel() const {\n\t\treturn level >= 0 && level < 32;\n\t}\n\tint maskLevel() const {\n\t\tif (level >= 0) {\n\t\t\treturn 1 << level;\n\t\t} else {\n\t\t\treturn 1;\n\t\t}\n\t}\npublic:\n\tLinePPState() : state(0), ifTaken(0), level(-1) {\n\t}\n\tbool IsInactive() const {\n\t\treturn state != 0;\n\t}\n\tbool CurrentIfTaken() const {\n\t\treturn (ifTaken & maskLevel()) != 0;\n\t}\n\tvoid StartSection(bool on) {\n\t\tlevel++;\n\t\tif (ValidLevel()) {\n\t\t\tif (on) {\n\t\t\t\tstate &= ~maskLevel();\n\t\t\t\tifTaken |= maskLevel();\n\t\t\t} else {\n\t\t\t\tstate |= maskLevel();\n\t\t\t\tifTaken &= ~maskLevel();\n\t\t\t}\n\t\t}\n\t}\n\tvoid EndSection() {\n\t\tif (ValidLevel()) {\n\t\t\tstate &= ~maskLevel();\n\t\t\tifTaken &= ~maskLevel();\n\t\t}\n\t\tlevel--;\n\t}\n\tvoid InvertCurrentLevel() {\n\t\tif (ValidLevel()) {\n\t\t\tstate ^= maskLevel();\n\t\t\tifTaken |= maskLevel();\n\t\t}\n\t}\n};\n\n// Hold the preprocessor state for each line seen.\n// Currently one entry per line but could become sparse with just one entry per preprocessor line.\nclass PPStates {\n\tstd::vector<LinePPState> vlls;\npublic:\n\tLinePPState ForLine(Sci_Position line) const {\n\t\tif ((line > 0) && (vlls.size() > static_cast<size_t>(line))) {\n\t\t\treturn vlls[line];\n\t\t} else {\n\t\t\treturn LinePPState();\n\t\t}\n\t}\n\tvoid Add(Sci_Position line, LinePPState lls) {\n\t\tvlls.resize(line+1);\n\t\tvlls[line] = lls;\n\t}\n};\n\n// Options used for LexerVerilog\nstruct OptionsVerilog {\n\tbool foldComment;\n\tbool foldPreprocessor;\n\tbool foldPreprocessorElse;\n\tbool foldCompact;\n\tbool foldAtElse;\n\tbool foldAtModule;\n\tbool trackPreprocessor;\n\tbool updatePreprocessor;\n\tbool portStyling;\n\tbool allUppercaseDocKeyword;\n\tOptionsVerilog() {\n\t\tfoldComment = false;\n\t\tfoldPreprocessor = false;\n\t\tfoldPreprocessorElse = false;\n\t\tfoldCompact = false;\n\t\tfoldAtElse = false;\n\t\tfoldAtModule = false;\n\t\t// for backwards compatibility, preprocessor functionality is disabled by default\n\t\ttrackPreprocessor = false;\n\t\tupdatePreprocessor = false;\n\t\t// for backwards compatibility, treat input/output/inout as regular keywords\n\t\tportStyling = false;\n\t\t// for backwards compatibility, don't treat all uppercase identifiers as documentation keywords\n\t\tallUppercaseDocKeyword = false;\n\t}\n};\n\nstruct OptionSetVerilog : public OptionSet<OptionsVerilog> {\n\tOptionSetVerilog() {\n\t\tDefineProperty(\"fold.comment\", &OptionsVerilog::foldComment,\n\t\t\t\"This option enables folding multi-line comments when using the Verilog lexer.\");\n\t\tDefineProperty(\"fold.preprocessor\", &OptionsVerilog::foldPreprocessor,\n\t\t\t\"This option enables folding preprocessor directives when using the Verilog lexer.\");\n\t\tDefineProperty(\"fold.compact\", &OptionsVerilog::foldCompact);\n\t\tDefineProperty(\"fold.at.else\", &OptionsVerilog::foldAtElse,\n\t\t\t\"This option enables folding on the else line of an if statement.\");\n\t\tDefineProperty(\"fold.verilog.flags\", &OptionsVerilog::foldAtModule,\n\t\t\t\"This option enables folding module definitions. Typically source files \"\n\t\t\t\"contain only one module definition so this option is somewhat useless.\");\n\t\tDefineProperty(\"lexer.verilog.track.preprocessor\", &OptionsVerilog::trackPreprocessor,\n\t\t\t\"Set to 1 to interpret `if/`else/`endif to grey out code that is not active.\");\n\t\tDefineProperty(\"lexer.verilog.update.preprocessor\", &OptionsVerilog::updatePreprocessor,\n\t\t\t\"Set to 1 to update preprocessor definitions when `define, `undef, or `undefineall found.\");\n\t\tDefineProperty(\"lexer.verilog.portstyling\", &OptionsVerilog::portStyling,\n\t\t\t\"Set to 1 to style input, output, and inout ports differently from regular keywords.\");\n\t\tDefineProperty(\"lexer.verilog.allupperkeywords\", &OptionsVerilog::allUppercaseDocKeyword,\n\t\t\t\"Set to 1 to style identifiers that are all uppercase as documentation keyword.\");\n\t\tDefineProperty(\"lexer.verilog.fold.preprocessor.else\", &OptionsVerilog::foldPreprocessorElse,\n\t\t\t\"This option enables folding on `else and `elsif preprocessor directives.\");\n\t}\n};\n\nconst char styleSubable[] = {0};\n\n}\n\nclass LexerVerilog : public DefaultLexer {\n\tCharacterSet setWord;\n\tWordList keywords;\n\tWordList keywords2;\n\tWordList keywords3;\n\tWordList keywords4;\n\tWordList keywords5;\n\tWordList ppDefinitions;\n\tPPStates vlls;\n\tstd::vector<PPDefinition> ppDefineHistory;\n\tstruct SymbolValue {\n\t\tstd::string value;\n\t\tstd::string arguments;\n\t\tSymbolValue(const std::string &value_=\"\", const std::string &arguments_=\"\") : value(value_), arguments(arguments_) {\n\t\t}\n\t\tSymbolValue &operator = (const std::string &value_) {\n\t\t\tvalue = value_;\n\t\t\targuments.clear();\n\t\t\treturn *this;\n\t\t}\n\t\tbool IsMacro() const {\n\t\t\treturn !arguments.empty();\n\t\t}\n\t};\n\ttypedef std::map<std::string, SymbolValue> SymbolTable;\n\tSymbolTable preprocessorDefinitionsStart;\n\tOptionsVerilog options;\n\tOptionSetVerilog osVerilog;\n\tenum { activeFlag = 0x40 };\n\tSubStyles subStyles;\n\n\t// states at end of line (EOL) during fold operations:\n\t//\t\tfoldExternFlag: EOL while parsing an extern function/task declaration terminated by ';'\n\t//\t\tfoldWaitDisableFlag: EOL while parsing wait or disable statement, terminated by \"fork\" or '('\n\t//\t\ttypdefFlag: EOL while parsing typedef statement, terminated by ';'\n\tenum {foldExternFlag = 0x01, foldWaitDisableFlag = 0x02, typedefFlag = 0x04, protectedFlag = 0x08};\n\t// map using line number as key to store fold state information\n\tstd::map<Sci_Position, int> foldState;\n\npublic:\n\tLexerVerilog() :\n\t\tDefaultLexer(\"verilog\", SCLEX_VERILOG),\n\t\tsetWord(CharacterSet::setAlphaNum, \"._\", 0x80, true),\n\t\tsubStyles(styleSubable, 0x80, 0x40, activeFlag) {\n\t\t}\n\tvirtual ~LexerVerilog() {}\n\tint SCI_METHOD Version() const override {\n\t\treturn lvRelease5;\n\t}\n\tvoid SCI_METHOD Release() override {\n\t\tdelete this;\n\t}\n\tconst char* SCI_METHOD PropertyNames() override {\n\t\treturn osVerilog.PropertyNames();\n\t}\n\tint SCI_METHOD PropertyType(const char* name) override {\n\t\treturn osVerilog.PropertyType(name);\n\t}\n\tconst char* SCI_METHOD DescribeProperty(const char* name) override {\n\t\treturn osVerilog.DescribeProperty(name);\n\t}\n\tSci_Position SCI_METHOD PropertySet(const char* key, const char* val) override {\n\t    return osVerilog.PropertySet(&options, key, val);\n\t}\n\tconst char * SCI_METHOD PropertyGet(const char *key) override {\n\t\treturn osVerilog.PropertyGet(key);\n\t}\n\tconst char* SCI_METHOD DescribeWordListSets() override {\n\t\treturn osVerilog.DescribeWordListSets();\n\t}\n\tSci_Position SCI_METHOD WordListSet(int n, const char* wl) override;\n\tvoid SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;\n\tvoid SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;\n\tvoid* SCI_METHOD PrivateCall(int, void*) override {\n\t\treturn 0;\n\t}\n\tint SCI_METHOD LineEndTypesSupported() override {\n\t\treturn SC_LINE_END_TYPE_UNICODE;\n\t}\n\tint SCI_METHOD AllocateSubStyles(int styleBase, int numberStyles) override {\n\t\treturn subStyles.Allocate(styleBase, numberStyles);\n\t}\n\tint SCI_METHOD SubStylesStart(int styleBase) override {\n\t\treturn subStyles.Start(styleBase);\n\t}\n\tint SCI_METHOD SubStylesLength(int styleBase) override {\n\t\treturn subStyles.Length(styleBase);\n\t}\n\tint SCI_METHOD StyleFromSubStyle(int subStyle) override {\n\t\tint styleBase = subStyles.BaseStyle(MaskActive(subStyle));\n\t\tint active = subStyle & activeFlag;\n\t\treturn styleBase | active;\n\t}\n\tint SCI_METHOD PrimaryStyleFromStyle(int style) override {\n\t\treturn MaskActive(style);\n \t}\n\tvoid SCI_METHOD FreeSubStyles() override {\n\t\tsubStyles.Free();\n\t}\n\tvoid SCI_METHOD SetIdentifiers(int style, const char *identifiers) override {\n\t\tsubStyles.SetIdentifiers(style, identifiers);\n\t}\n\tint SCI_METHOD DistanceToSecondaryStyles() override {\n\t\treturn activeFlag;\n\t}\n\tconst char * SCI_METHOD GetSubStyleBases() override {\n\t\treturn styleSubable;\n\t}\n\tstatic ILexer5* LexerFactoryVerilog() {\n\t\treturn new LexerVerilog();\n\t}\n\tstatic int MaskActive(int style) {\n\t\treturn style & ~activeFlag;\n\t}\n\tstd::vector<std::string> Tokenize(const std::string &expr) const;\n};\n\nSci_Position SCI_METHOD LexerVerilog::WordListSet(int n, const char *wl) {\n\tWordList *wordListN = 0;\n\tswitch (n) {\n\tcase 0:\n\t\twordListN = &keywords;\n\t\tbreak;\n\tcase 1:\n\t\twordListN = &keywords2;\n\t\tbreak;\n\tcase 2:\n\t\twordListN = &keywords3;\n\t\tbreak;\n\tcase 3:\n\t\twordListN = &keywords4;\n\t\tbreak;\n\tcase 4:\n\t\twordListN = &keywords5;\n\t\tbreak;\n\tcase 5:\n\t\twordListN = &ppDefinitions;\n\t\tbreak;\n\t}\n\tSci_Position firstModification = -1;\n\tif (wordListN) {\n\t\tWordList wlNew;\n\t\twlNew.Set(wl);\n\t\tif (*wordListN != wlNew) {\n\t\t\twordListN->Set(wl);\n\t\t\tfirstModification = 0;\n\t\t\tif (n == 5) {\n\t\t\t\t// Rebuild preprocessorDefinitions\n\t\t\t\tpreprocessorDefinitionsStart.clear();\n\t\t\t\tfor (int nDefinition = 0; nDefinition < ppDefinitions.Length(); nDefinition++) {\n\t\t\t\t\tconst char *cpDefinition = ppDefinitions.WordAt(nDefinition);\n\t\t\t\t\tconst char *cpEquals = strchr(cpDefinition, '=');\n\t\t\t\t\tif (cpEquals) {\n\t\t\t\t\t\tstd::string name(cpDefinition, cpEquals - cpDefinition);\n\t\t\t\t\t\tstd::string val(cpEquals+1);\n\t\t\t\t\t\tsize_t bracket = name.find('(');\n\t\t\t\t\t\tsize_t bracketEnd = name.find(')');\n\t\t\t\t\t\tif ((bracket != std::string::npos) && (bracketEnd != std::string::npos)) {\n\t\t\t\t\t\t\t// Macro\n\t\t\t\t\t\t\tstd::string args = name.substr(bracket + 1, bracketEnd - bracket - 1);\n\t\t\t\t\t\t\tname = name.substr(0, bracket);\n\t\t\t\t\t\t\tpreprocessorDefinitionsStart[name] = SymbolValue(val, args);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpreprocessorDefinitionsStart[name] = val;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstd::string name(cpDefinition);\n\t\t\t\t\t\tstd::string val(\"1\");\n\t\t\t\t\t\tpreprocessorDefinitionsStart[name] = val;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn firstModification;\n}\n\nstatic inline bool IsAWordChar(const int ch) {\n\treturn (ch < 0x80) && (isalnum(ch) || ch == '_' || ch == '\\''|| ch == '$');\n}\n\nstatic inline bool IsAWordStart(const int ch) {\n\treturn (ch < 0x80) && (isalnum(ch) || ch == '_' || ch == '$');\n}\n\nstatic inline bool AllUpperCase(const char *a) {\n\twhile (*a) {\n\t\tif (*a >= 'a' && *a <= 'z') return false;\n\t\ta++;\n\t}\n\treturn true;\n}\n\n// Functor used to truncate history\nstruct After {\n\tSci_Position line;\n\texplicit After(Sci_Position line_) : line(line_) {}\n\tbool operator()(PPDefinition &p) const {\n\t\treturn p.line > line;\n\t}\n};\n\nstatic std::string GetRestOfLine(LexAccessor &styler, Sci_Position start, bool allowSpace) {\n\tstd::string restOfLine;\n\tSci_Position i =0;\n\tchar ch = styler.SafeGetCharAt(start, '\\n');\n\tSci_Position endLine = styler.LineEnd(styler.GetLine(start));\n\twhile (((start+i) < endLine) && (ch != '\\r')) {\n\t\tchar chNext = styler.SafeGetCharAt(start + i + 1, '\\n');\n\t\tif (ch == '/' && (chNext == '/' || chNext == '*'))\n\t\t\tbreak;\n\t\tif (allowSpace || (ch != ' '))\n\t\t\trestOfLine += ch;\n\t\ti++;\n\t\tch = chNext;\n\t}\n\treturn restOfLine;\n}\n\nstatic bool IsSpaceOrTab(int ch) {\n\treturn ch == ' ' || ch == '\\t';\n}\n\nvoid SCI_METHOD LexerVerilog::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess)\n{\n\tLexAccessor styler(pAccess);\n\n\tconst int kwOther=0, kwDot=0x100, kwInput=0x200, kwOutput=0x300, kwInout=0x400, kwProtected=0x800;\n\tint lineState = kwOther;\n\tbool continuationLine = false;\n\n\tSci_Position curLine = styler.GetLine(startPos);\n\tif (curLine > 0) lineState = styler.GetLineState(curLine - 1);\n\n\t// Do not leak onto next line\n\tif (initStyle == SCE_V_STRINGEOL)\n\t\tinitStyle = SCE_V_DEFAULT;\n\n\tif ((MaskActive(initStyle) == SCE_V_PREPROCESSOR) ||\n\t\t\t(MaskActive(initStyle) == SCE_V_COMMENTLINE) ||\n\t\t\t(MaskActive(initStyle) == SCE_V_COMMENTLINEBANG)) {\n\t\t// Set continuationLine if last character of previous line is '\\'\n\t\tif (curLine > 0) {\n\t\t\tSci_Position endLinePrevious = styler.LineEnd(curLine - 1);\n\t\t\tif (endLinePrevious > 0) {\n\t\t\t\tcontinuationLine = styler.SafeGetCharAt(endLinePrevious-1) == '\\\\';\n\t\t\t}\n\t\t}\n\t}\n\n\tStyleContext sc(startPos, length, initStyle, styler);\n\tLinePPState preproc = vlls.ForLine(curLine);\n\n\tbool definitionsChanged = false;\n\n\t// Truncate ppDefineHistory before current line\n\n\tif (!options.updatePreprocessor)\n\t\tppDefineHistory.clear();\n\n\tstd::vector<PPDefinition>::iterator itInvalid = std::find_if(ppDefineHistory.begin(), ppDefineHistory.end(), After(curLine-1));\n\tif (itInvalid != ppDefineHistory.end()) {\n\t\tppDefineHistory.erase(itInvalid, ppDefineHistory.end());\n\t\tdefinitionsChanged = true;\n\t}\n\n\tSymbolTable preprocessorDefinitions = preprocessorDefinitionsStart;\n\tfor (std::vector<PPDefinition>::iterator itDef = ppDefineHistory.begin(); itDef != ppDefineHistory.end(); ++itDef) {\n\t\tif (itDef->isUndef)\n\t\t\tpreprocessorDefinitions.erase(itDef->key);\n\t\telse\n\t\t\tpreprocessorDefinitions[itDef->key] = SymbolValue(itDef->value, itDef->arguments);\n\t}\n\n\tint activitySet = preproc.IsInactive() ? activeFlag : 0;\n\tSci_Position lineEndNext = styler.LineEnd(curLine);\n\tbool isEscapedId = false;    // true when parsing an escaped Identifier\n\tbool isProtected = (lineState&kwProtected) != 0;\t// true when parsing a protected region\n\n\tfor (; sc.More(); sc.Forward()) {\n\t\tif (sc.atLineStart) {\n\t\t\tif (sc.state == SCE_V_STRING) {\n\t\t\t\t// Prevent SCE_V_STRINGEOL from leaking back to previous line\n\t\t\t\tsc.SetState(SCE_V_STRING);\n\t\t\t}\n\t\t\tif ((MaskActive(sc.state) == SCE_V_PREPROCESSOR) && (!continuationLine)) {\n\t\t\t\tsc.SetState(SCE_V_DEFAULT|activitySet);\n\t\t\t}\n\t\t\tif (preproc.IsInactive()) {\n\t\t\t\tactivitySet = activeFlag;\n\t\t\t\tsc.SetState(sc.state | activitySet);\n\t\t\t}\n\t\t}\n\n\t\tif (sc.MatchLineEnd()) {\n\t\t\tcurLine++;\n\t\t\tlineEndNext = styler.LineEnd(curLine);\n\t\t\tvlls.Add(curLine, preproc);\n\t\t\t// Update the line state, so it can be seen by next line\n\t\t\tstyler.SetLineState(curLine, lineState);\n\t\t\tisEscapedId = false;    // EOL terminates an escaped Identifier\n\t\t}\n\n\t\t// Handle line continuation generically.\n\t\tif (sc.ch == '\\\\') {\n\t\t\tif (static_cast<Sci_Position>((sc.currentPos+1)) >= lineEndNext) {\n\t\t\t\tcurLine++;\n\t\t\t\tlineEndNext = styler.LineEnd(curLine);\n\t\t\t\tvlls.Add(curLine, preproc);\n\t\t\t\t// Update the line state, so it can be seen by next line\n\t\t\t\tstyler.SetLineState(curLine, lineState);\n\t\t\t\tsc.Forward();\n\t\t\t\tif (sc.ch == '\\r' && sc.chNext == '\\n') {\n\t\t\t\t\t// Even in UTF-8, \\r and \\n are separate\n\t\t\t\t\tsc.Forward();\n\t\t\t\t}\n\t\t\t\tcontinuationLine = true;\n\t\t\t\tsc.Forward();\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\t// for comment keyword\n\t\tif (MaskActive(sc.state) == SCE_V_COMMENT_WORD && !IsAWordChar(sc.ch)) {\n\t\t\tchar s[100];\n\t\t\tint state = lineState & 0xff;\n\t\t\tsc.GetCurrent(s, sizeof(s));\n\t\t\tif (keywords5.InList(s)) {\n\t\t\t\tsc.ChangeState(SCE_V_COMMENT_WORD|activitySet);\n\t\t\t} else {\n\t\t\t\tsc.ChangeState(state|activitySet);\n\t\t\t}\n\t\t\tsc.SetState(state|activitySet);\n\t\t}\n\n\t\tconst bool atLineEndBeforeSwitch = sc.MatchLineEnd();\n\n\t\t// Determine if the current state should terminate.\n\t\tswitch (MaskActive(sc.state)) {\n\t\t\tcase SCE_V_OPERATOR:\n\t\t\t\tsc.SetState(SCE_V_DEFAULT|activitySet);\n\t\t\t\tbreak;\n\t\t\tcase SCE_V_NUMBER:\n\t\t\t\tif (!(IsAWordChar(sc.ch) || (sc.ch == '?'))) {\n\t\t\t\t\tsc.SetState(SCE_V_DEFAULT|activitySet);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_V_IDENTIFIER:\n\t\t\t\tif (!isEscapedId &&(!IsAWordChar(sc.ch) || (sc.ch == '.'))) {\n\t\t\t\t\tchar s[100];\n\t\t\t\t\tlineState &= 0xff00;\n\t\t\t\t\tsc.GetCurrent(s, sizeof(s));\n\t\t\t\t\tif (options.portStyling && (strcmp(s, \"input\") == 0)) {\n\t\t\t\t\t\tlineState = kwInput;\n\t\t\t\t\t\tsc.ChangeState(SCE_V_INPUT|activitySet);\n\t\t\t\t\t} else if (options.portStyling && (strcmp(s, \"output\") == 0)) {\n\t\t\t\t\t\tlineState = kwOutput;\n\t\t\t\t\t\tsc.ChangeState(SCE_V_OUTPUT|activitySet);\n\t\t\t\t\t} else if (options.portStyling && (strcmp(s, \"inout\") == 0)) {\n\t\t\t\t\t\tlineState = kwInout;\n\t\t\t\t\t\tsc.ChangeState(SCE_V_INOUT|activitySet);\n\t\t\t\t\t} else if (lineState == kwInput) {\n\t\t\t\t\t\tsc.ChangeState(SCE_V_INPUT|activitySet);\n\t\t\t\t\t} else if (lineState == kwOutput) {\n\t\t\t\t\t\tsc.ChangeState(SCE_V_OUTPUT|activitySet);\n\t\t\t\t\t} else if (lineState == kwInout) {\n\t\t\t\t\t\tsc.ChangeState(SCE_V_INOUT|activitySet);\n\t\t\t\t\t} else if (lineState == kwDot) {\n\t\t\t\t\t\tlineState = kwOther;\n\t\t\t\t\t\tif (options.portStyling)\n\t\t\t\t\t\t\tsc.ChangeState(SCE_V_PORT_CONNECT|activitySet);\n\t\t\t\t\t} else if (keywords.InList(s)) {\n\t\t\t\t\t\tsc.ChangeState(SCE_V_WORD|activitySet);\n\t\t\t\t\t} else if (keywords2.InList(s)) {\n\t\t\t\t\t\tsc.ChangeState(SCE_V_WORD2|activitySet);\n\t\t\t\t\t} else if (keywords3.InList(s)) {\n\t\t\t\t\t\tsc.ChangeState(SCE_V_WORD3|activitySet);\n\t\t\t\t\t} else if (keywords4.InList(s)) {\n\t\t\t\t\t\tsc.ChangeState(SCE_V_USER|activitySet);\n\t\t\t\t\t} else if (options.allUppercaseDocKeyword && AllUpperCase(s)) {\n\t\t\t\t\t\tsc.ChangeState(SCE_V_USER|activitySet);\n\t\t\t\t\t}\n\t\t\t\t\tsc.SetState(SCE_V_DEFAULT|activitySet);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_V_PREPROCESSOR:\n\t\t\t\tif (!IsAWordChar(sc.ch) || sc.MatchLineEnd()) {\n\t\t\t\t\tsc.SetState(SCE_V_DEFAULT|activitySet);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_V_COMMENT:\n\t\t\t\tif (sc.Match('*', '/')) {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t\tsc.ForwardSetState(SCE_V_DEFAULT|activitySet);\n\t\t\t\t} else if (IsAWordStart(sc.ch)) {\n\t\t\t\t\tlineState = sc.state | (lineState & 0xff00);\n\t\t\t\t\tsc.SetState(SCE_V_COMMENT_WORD|activitySet);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_V_COMMENTLINE:\n\t\t\tcase SCE_V_COMMENTLINEBANG:\n\t\t\t\tif (sc.atLineStart) {\n\t\t\t\t\tsc.SetState(SCE_V_DEFAULT|activitySet);\n\t\t\t\t} else if (IsAWordStart(sc.ch)) {\n\t\t\t\t\tlineState = sc.state | (lineState & 0xff00);\n\t\t\t\t\tsc.SetState(SCE_V_COMMENT_WORD|activitySet);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase SCE_V_STRING:\n\t\t\t\tif (sc.ch == '\\\\') {\n\t\t\t\t\tif (sc.chNext == '\\\"' || sc.chNext == '\\'' || sc.chNext == '\\\\') {\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\t}\n\t\t\t\t} else if (sc.ch == '\\\"') {\n\t\t\t\t\tsc.ForwardSetState(SCE_V_DEFAULT|activitySet);\n\t\t\t\t} else if (sc.MatchLineEnd()) {\n\t\t\t\t\tsc.ChangeState(SCE_V_STRINGEOL|activitySet);\n\t\t\t\t\tif (sc.Match('\\r', '\\n'))\n\t\t\t\t\t\tsc.Forward();\n\t\t\t\t\tsc.ForwardSetState(SCE_V_DEFAULT|activitySet);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif (sc.MatchLineEnd() && !atLineEndBeforeSwitch) {\n\t\t\t// State exit processing consumed characters up to end of line.\n\t\t\tcurLine++;\n\t\t\tlineEndNext = styler.LineEnd(curLine);\n\t\t\tvlls.Add(curLine, preproc);\n\t\t\t// Update the line state, so it can be seen by next line\n\t\t\tstyler.SetLineState(curLine, lineState);\n\t\t\tisEscapedId = false;    // EOL terminates an escaped Identifier\n\t\t}\n\n\t\t// Determine if a new state should be entered.\n\t\tif (MaskActive(sc.state) == SCE_V_DEFAULT) {\n\t\t\tif (sc.ch == '`') {\n\t\t\t\tsc.SetState(SCE_V_PREPROCESSOR|activitySet);\n\t\t\t\t// Skip whitespace between ` and preprocessor word\n\t\t\t\tdo {\n\t\t\t\t\tsc.Forward();\n\t\t\t\t} while ((sc.ch == ' ' || sc.ch == '\\t') && sc.More());\n\t\t\t\tif (sc.MatchLineEnd()) {\n\t\t\t\t\tsc.SetState(SCE_V_DEFAULT|activitySet);\n\t\t\t\t\tstyler.SetLineState(curLine, lineState);\n\t\t\t\t} else {\n\t\t\t\t\tif (sc.Match(\"protected\")) {\n\t\t\t\t\t\tisProtected = true;\n\t\t\t\t\t\tlineState |= kwProtected;\n\t\t\t\t\t\tstyler.SetLineState(curLine, lineState);\n\t\t\t\t\t} else if (sc.Match(\"endprotected\")) {\n\t\t\t\t\t\tisProtected = false;\n\t\t\t\t\t\tlineState &= ~kwProtected;\n\t\t\t\t\t\tstyler.SetLineState(curLine, lineState);\n\t\t\t\t\t} else if (!isProtected && options.trackPreprocessor) {\n\t\t\t\t\t\tif (sc.Match(\"ifdef\") || sc.Match(\"ifndef\")) {\n\t\t\t\t\t\t\tbool isIfDef = sc.Match(\"ifdef\");\n\t\t\t\t\t\t\tint i = isIfDef ? 5 : 6;\n\t\t\t\t\t\t\tstd::string restOfLine = GetRestOfLine(styler, sc.currentPos + i + 1, false);\n\t\t\t\t\t\t\tbool foundDef = preprocessorDefinitions.find(restOfLine) != preprocessorDefinitions.end();\n\t\t\t\t\t\t\tpreproc.StartSection(isIfDef == foundDef);\n\t\t\t\t\t\t} else if (sc.Match(\"else\")) {\n\t\t\t\t\t\t\tif (!preproc.CurrentIfTaken()) {\n\t\t\t\t\t\t\t\tpreproc.InvertCurrentLevel();\n\t\t\t\t\t\t\t\tactivitySet = preproc.IsInactive() ? activeFlag : 0;\n\t\t\t\t\t\t\t\tif (!activitySet) {\n\t\t\t\t\t\t\t\t\tsc.ChangeState(SCE_V_PREPROCESSOR|activitySet);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if (!preproc.IsInactive()) {\n\t\t\t\t\t\t\t\tpreproc.InvertCurrentLevel();\n\t\t\t\t\t\t\t\tactivitySet = preproc.IsInactive() ? activeFlag : 0;\n\t\t\t\t\t\t\t\tif (!activitySet) {\n\t\t\t\t\t\t\t\t\tsc.ChangeState(SCE_V_PREPROCESSOR|activitySet);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (sc.Match(\"elsif\")) {\n\t\t\t\t\t\t\t// Ensure only one chosen out of `if .. `elsif .. `elsif .. `else .. `endif\n\t\t\t\t\t\t\tif (!preproc.CurrentIfTaken()) {\n\t\t\t\t\t\t\t\t// Similar to `ifdef\n\t\t\t\t\t\t\t\tstd::string restOfLine = GetRestOfLine(styler, sc.currentPos + 6, true);\n\t\t\t\t\t\t\t\tbool ifGood = preprocessorDefinitions.find(restOfLine) != preprocessorDefinitions.end();\n\t\t\t\t\t\t\t\tif (ifGood) {\n\t\t\t\t\t\t\t\t\tpreproc.InvertCurrentLevel();\n\t\t\t\t\t\t\t\t\tactivitySet = preproc.IsInactive() ? activeFlag : 0;\n\t\t\t\t\t\t\t\t\tif (!activitySet)\n\t\t\t\t\t\t\t\t\t\tsc.ChangeState(SCE_V_PREPROCESSOR|activitySet);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if (!preproc.IsInactive()) {\n\t\t\t\t\t\t\t\tpreproc.InvertCurrentLevel();\n\t\t\t\t\t\t\t\tactivitySet = preproc.IsInactive() ? activeFlag : 0;\n\t\t\t\t\t\t\t\tif (!activitySet)\n\t\t\t\t\t\t\t\t\tsc.ChangeState(SCE_V_PREPROCESSOR|activitySet);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (sc.Match(\"endif\")) {\n\t\t\t\t\t\t\tpreproc.EndSection();\n\t\t\t\t\t\t\tactivitySet = preproc.IsInactive() ? activeFlag : 0;\n\t\t\t\t\t\t\tsc.ChangeState(SCE_V_PREPROCESSOR|activitySet);\n\t\t\t\t\t\t} else if (sc.Match(\"define\")) {\n\t\t\t\t\t\t\tif (options.updatePreprocessor && !preproc.IsInactive()) {\n\t\t\t\t\t\t\t\tstd::string restOfLine = GetRestOfLine(styler, sc.currentPos + 6, true);\n\t\t\t\t\t\t\t\tsize_t startName = 0;\n\t\t\t\t\t\t\t\twhile ((startName < restOfLine.length()) && IsSpaceOrTab(restOfLine[startName]))\n\t\t\t\t\t\t\t\t\tstartName++;\n\t\t\t\t\t\t\t\tsize_t endName = startName;\n\t\t\t\t\t\t\t\twhile ((endName < restOfLine.length()) && setWord.Contains(static_cast<unsigned char>(restOfLine[endName])))\n\t\t\t\t\t\t\t\t\tendName++;\n\t\t\t\t\t\t\t\tstd::string key = restOfLine.substr(startName, endName-startName);\n\t\t\t\t\t\t\t\tif ((endName < restOfLine.length()) && (restOfLine.at(endName) == '(')) {\n\t\t\t\t\t\t\t\t\t// Macro\n\t\t\t\t\t\t\t\t\tsize_t endArgs = endName;\n\t\t\t\t\t\t\t\t\twhile ((endArgs < restOfLine.length()) && (restOfLine[endArgs] != ')'))\n\t\t\t\t\t\t\t\t\t\tendArgs++;\n\t\t\t\t\t\t\t\t\tstd::string args = restOfLine.substr(endName + 1, endArgs - endName - 1);\n\t\t\t\t\t\t\t\t\tsize_t startValue = endArgs+1;\n\t\t\t\t\t\t\t\t\twhile ((startValue < restOfLine.length()) && IsSpaceOrTab(restOfLine[startValue]))\n\t\t\t\t\t\t\t\t\t\tstartValue++;\n\t\t\t\t\t\t\t\t\tstd::string value;\n\t\t\t\t\t\t\t\t\tif (startValue < restOfLine.length())\n\t\t\t\t\t\t\t\t\t\tvalue = restOfLine.substr(startValue);\n\t\t\t\t\t\t\t\t\tpreprocessorDefinitions[key] = SymbolValue(value, args);\n\t\t\t\t\t\t\t\t\tppDefineHistory.push_back(PPDefinition(curLine, key, value, false, args));\n\t\t\t\t\t\t\t\t\tdefinitionsChanged = true;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t// Value\n\t\t\t\t\t\t\t\t\tsize_t startValue = endName;\n\t\t\t\t\t\t\t\t\twhile ((startValue < restOfLine.length()) && IsSpaceOrTab(restOfLine[startValue]))\n\t\t\t\t\t\t\t\t\t\tstartValue++;\n\t\t\t\t\t\t\t\t\tstd::string value = restOfLine.substr(startValue);\n\t\t\t\t\t\t\t\t\tpreprocessorDefinitions[key] = value;\n\t\t\t\t\t\t\t\t\tppDefineHistory.push_back(PPDefinition(curLine, key, value));\n\t\t\t\t\t\t\t\t\tdefinitionsChanged = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (sc.Match(\"undefineall\")) {\n\t\t\t\t\t\t\tif (options.updatePreprocessor && !preproc.IsInactive()) {\n\t\t\t\t\t\t\t\t// remove all preprocessor definitions\n\t\t\t\t\t\t\t\tstd::map<std::string, SymbolValue>::iterator itDef;\n\t\t\t\t\t\t\t\tfor(itDef = preprocessorDefinitions.begin(); itDef != preprocessorDefinitions.end(); ++itDef) {\n\t\t\t\t\t\t\t\t\tppDefineHistory.push_back(PPDefinition(curLine, itDef->first, \"\", true));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tpreprocessorDefinitions.clear();\n\t\t\t\t\t\t\t\tdefinitionsChanged = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (sc.Match(\"undef\")) {\n\t\t\t\t\t\t\tif (options.updatePreprocessor && !preproc.IsInactive()) {\n\t\t\t\t\t\t\t\tstd::string restOfLine = GetRestOfLine(styler, sc.currentPos + 5, true);\n\t\t\t\t\t\t\t\tstd::vector<std::string> tokens = Tokenize(restOfLine);\n\t\t\t\t\t\t\t\tstd::string key;\n\t\t\t\t\t\t\t\tif (tokens.size() >= 1) {\n\t\t\t\t\t\t\t\t\tkey = tokens[0];\n\t\t\t\t\t\t\t\t\tpreprocessorDefinitions.erase(key);\n\t\t\t\t\t\t\t\t\tppDefineHistory.push_back(PPDefinition(curLine, key, \"\", true));\n\t\t\t\t\t\t\t\t\tdefinitionsChanged = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (!isProtected) {\n\t\t\t\tif (IsADigit(sc.ch) || (sc.ch == '\\'') || (sc.ch == '.' && IsADigit(sc.chNext))) {\n\t\t\t\t\tsc.SetState(SCE_V_NUMBER|activitySet);\n\t\t\t\t} else if (IsAWordStart(sc.ch)) {\n\t\t\t\t\tsc.SetState(SCE_V_IDENTIFIER|activitySet);\n\t\t\t\t} else if (sc.Match('/', '*')) {\n\t\t\t\t\tsc.SetState(SCE_V_COMMENT|activitySet);\n\t\t\t\t\tsc.Forward();\t// Eat the * so it isn't used for the end of the comment\n\t\t\t\t} else if (sc.Match('/', '/')) {\n\t\t\t\t\tif (sc.Match(\"//!\"))\t// Nice to have a different comment style\n\t\t\t\t\t\tsc.SetState(SCE_V_COMMENTLINEBANG|activitySet);\n\t\t\t\t\telse\n\t\t\t\t\t\tsc.SetState(SCE_V_COMMENTLINE|activitySet);\n\t\t\t\t} else if (sc.ch == '\\\"') {\n\t\t\t\t\tsc.SetState(SCE_V_STRING|activitySet);\n\t\t\t\t} else if (sc.ch == '\\\\') {\n\t\t\t\t\t// escaped identifier, everything is ok up to whitespace\n\t\t\t\t\tisEscapedId = true;\n\t\t\t\t\tsc.SetState(SCE_V_IDENTIFIER|activitySet);\n\t\t\t\t} else if (isoperator(static_cast<char>(sc.ch)) || sc.ch == '@' || sc.ch == '#') {\n\t\t\t\t\tsc.SetState(SCE_V_OPERATOR|activitySet);\n\t\t\t\t\tif (sc.ch == '.') lineState = kwDot;\n\t\t\t\t\tif (sc.ch == ';') lineState = kwOther;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isEscapedId && isspacechar(sc.ch)) {\n\t\t\tisEscapedId = false;\n\t\t}\n\t}\n\tif (definitionsChanged) {\n\t\tstyler.ChangeLexerState(startPos, startPos + length);\n\t}\n\tsc.Complete();\n}\n\nstatic bool IsStreamCommentStyle(int style) {\n\treturn style == SCE_V_COMMENT;\n}\n\nstatic bool IsCommentLine(Sci_Position line, LexAccessor &styler) {\n\tSci_Position pos = styler.LineStart(line);\n\tSci_Position eolPos = styler.LineStart(line + 1) - 1;\n\tfor (Sci_Position i = pos; i < eolPos; i++) {\n\t\tchar ch = styler[i];\n\t\tchar chNext = styler.SafeGetCharAt(i + 1);\n\t\tint style = styler.StyleAt(i);\n\t\tif (ch == '/' && chNext == '/' &&\n\t\t   (style == SCE_V_COMMENTLINE || style == SCE_V_COMMENTLINEBANG)) {\n\t\t\treturn true;\n\t\t} else if (!IsASpaceOrTab(ch)) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn false;\n}\n\n// Store both the current line's fold level and the next lines in the\n// level store to make it easy to pick up with each increment\n// and to make it possible to fiddle the current level for \"} else {\".\nvoid SCI_METHOD LexerVerilog::Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess)\n{\n\tLexAccessor styler(pAccess);\n\tbool foldAtBrace  = 1;\n\tbool foldAtParenthese  = 1;\n\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\t// Move back one line to be compatible with LexerModule::Fold behavior, fixes problem with foldComment behavior\n\tif (lineCurrent > 0) {\n\t\tlineCurrent--;\n\t\tSci_Position newStartPos = styler.LineStart(lineCurrent);\n\t\tlength += startPos - newStartPos;\n\t\tstartPos = newStartPos;\n\t\tinitStyle = 0;\n\t\tif (startPos > 0) {\n\t\t\tinitStyle = styler.StyleAt(startPos - 1);\n\t\t}\n\t}\n\tSci_PositionU endPos = startPos + length;\n\tint visibleChars = 0;\n\tint levelCurrent = SC_FOLDLEVELBASE;\n\tif (lineCurrent > 0)\n\t\tlevelCurrent = styler.LevelAt(lineCurrent-1) >> 16;\n\tint levelMinCurrent = levelCurrent;\n\tint levelNext = levelCurrent;\n\tchar chNext = styler[startPos];\n\tint styleNext = MaskActive(styler.StyleAt(startPos));\n\tint style = MaskActive(initStyle);\n\n\t// restore fold state (if it exists) for prior line\n\tint stateCurrent = 0;\n\tstd::map<Sci_Position,int>::iterator foldStateIterator = foldState.find(lineCurrent-1);\n\tif (foldStateIterator != foldState.end()) {\n\t\tstateCurrent = foldStateIterator->second;\n\t}\n\n\t// remove all foldState entries after lineCurrent-1\n\tfoldStateIterator = foldState.upper_bound(lineCurrent-1);\n\tif (foldStateIterator != foldState.end()) {\n\t\tfoldState.erase(foldStateIterator, foldState.end());\n\t}\n\n\tfor (Sci_PositionU i = startPos; i < endPos; i++) {\n\t\tchar ch = chNext;\n\t\tchNext = styler.SafeGetCharAt(i + 1);\n\t\tint stylePrev = style;\n\t\tstyle = styleNext;\n\t\tstyleNext = MaskActive(styler.StyleAt(i + 1));\n\t\tbool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n\t\tif (!(stateCurrent & protectedFlag)) {\n\t\t\tif (options.foldComment && IsStreamCommentStyle(style)) {\n\t\t\t\tif (!IsStreamCommentStyle(stylePrev)) {\n\t\t\t\t\tlevelNext++;\n\t\t\t\t} else if (!IsStreamCommentStyle(styleNext) && !atEOL) {\n\t\t\t\t\t// Comments don't end at end of line and the next character may be unstyled.\n\t\t\t\t\tlevelNext--;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (options.foldComment && atEOL && IsCommentLine(lineCurrent, styler))\n\t\t\t{\n\t\t\t\tif (!IsCommentLine(lineCurrent - 1, styler)\n\t\t\t\t\t&& IsCommentLine(lineCurrent + 1, styler))\n\t\t\t\t\tlevelNext++;\n\t\t\t\telse if (IsCommentLine(lineCurrent - 1, styler)\n\t\t\t\t\t\t && !IsCommentLine(lineCurrent+1, styler))\n\t\t\t\t\tlevelNext--;\n\t\t\t}\n\t\t\tif (options.foldComment && (style == SCE_V_COMMENTLINE)) {\n\t\t\t\tif ((ch == '/') && (chNext == '/')) {\n\t\t\t\t\tchar chNext2 = styler.SafeGetCharAt(i + 2);\n\t\t\t\t\tif (chNext2 == '{') {\n\t\t\t\t\t\tlevelNext++;\n\t\t\t\t\t} else if (chNext2 == '}') {\n\t\t\t\t\t\tlevelNext--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (ch == '`') {\n\t\t\tSci_PositionU j = i + 1;\n\t\t\twhile ((j < endPos) && IsASpaceOrTab(styler.SafeGetCharAt(j))) {\n\t\t\t\tj++;\n\t\t\t}\n\t\t\tif (styler.Match(j, \"protected\")) {\n\t\t\t\tstateCurrent |= protectedFlag;\n\t\t\t\tlevelNext++;\n\t\t\t} else if (styler.Match(j, \"endprotected\")) {\n\t\t\t\tstateCurrent &= ~protectedFlag;\n\t\t\t\tlevelNext--;\n\t\t\t} else if (!(stateCurrent & protectedFlag) && options.foldPreprocessor && (style == SCE_V_PREPROCESSOR)) {\n\t\t\t\tif (styler.Match(j, \"if\")) {\n\t\t\t\t\tif (options.foldPreprocessorElse) {\n\t\t\t\t\t\t// Measure the minimum before a begin to allow\n\t\t\t\t\t\t// folding on \"end else begin\"\n\t\t\t\t\t\tif (levelMinCurrent > levelNext) {\n\t\t\t\t\t\t\tlevelMinCurrent = levelNext;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tlevelNext++;\n\t\t\t\t} else if (options.foldPreprocessorElse && styler.Match(j, \"else\")) {\n\t\t\t\t\tlevelNext--;\n\t\t\t\t\tif (levelMinCurrent > levelNext) {\n\t\t\t\t\t\tlevelMinCurrent = levelNext;\n\t\t\t\t\t}\n\t\t\t\t\tlevelNext++;\n\t\t\t\t} else if (options.foldPreprocessorElse && styler.Match(j, \"elsif\")) {\n\t\t\t\t\tlevelNext--;\n\t\t\t\t\t// Measure the minimum before a begin to allow\n\t\t\t\t\t// folding on \"end else begin\"\n\t\t\t\t\tif (levelMinCurrent > levelNext) {\n\t\t\t\t\t\tlevelMinCurrent = levelNext;\n\t\t\t\t\t}\n\t\t\t\t\tlevelNext++;\n\t\t\t\t} else if (styler.Match(j, \"endif\")) {\n\t\t\t\t\tlevelNext--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (style == SCE_V_OPERATOR) {\n\t\t\tif (foldAtParenthese) {\n\t\t\t\tif (ch == '(') {\n\t\t\t\t\tlevelNext++;\n\t\t\t\t} else if (ch == ')') {\n\t\t\t\t\tlevelNext--;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// semicolons terminate external declarations\n\t\t\tif (ch == ';') {\n\t\t\t\t// extern and pure virtual declarations terminated by semicolon\n\t\t\t\tif (stateCurrent & foldExternFlag) {\n\t\t\t\t\tlevelNext--;\n\t\t\t\t\tstateCurrent &= ~foldExternFlag;\n\t\t\t\t}\n\t\t\t\t// wait and disable statements terminated by semicolon\n\t\t\t\tif (stateCurrent & foldWaitDisableFlag) {\n\t\t\t\t\tstateCurrent &= ~foldWaitDisableFlag;\n\t\t\t\t}\n\t\t\t\t// typedef statements terminated by semicolon\n\t\t\t\tif (stateCurrent & typedefFlag) {\n\t\t\t\t\tstateCurrent &= ~typedefFlag;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// wait and disable statements containing '(' will not contain \"fork\" keyword, special processing is not needed\n\t\t\tif (ch == '(') {\n\t\t\t\tif (stateCurrent & foldWaitDisableFlag) {\n\t\t\t\t\tstateCurrent &= ~foldWaitDisableFlag;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (style == SCE_V_OPERATOR) {\n\t\t\tif (foldAtBrace) {\n\t\t\t\tif (ch == '{') {\n\t\t\t\t\tlevelNext++;\n\t\t\t\t} else if (ch == '}') {\n\t\t\t\t\tlevelNext--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (style == SCE_V_WORD && stylePrev != SCE_V_WORD) {\n\t\t\tSci_PositionU j = i;\n\t\t\tif (styler.Match(j, \"case\") ||\n\t\t\t\tstyler.Match(j, \"casex\") ||\n\t\t\t\tstyler.Match(j, \"casez\") ||\n\t\t\t\tstyler.Match(j, \"covergroup\") ||\n\t\t\t\tstyler.Match(j, \"function\") ||\n\t\t\t\tstyler.Match(j, \"generate\") ||\n\t\t\t\tstyler.Match(j, \"interface\") ||\n\t\t\t\tstyler.Match(j, \"package\") ||\n\t\t\t\tstyler.Match(j, \"primitive\") ||\n\t\t\t\tstyler.Match(j, \"program\") ||\n\t\t\t\tstyler.Match(j, \"sequence\") ||\n\t\t\t\tstyler.Match(j, \"specify\") ||\n\t\t\t\tstyler.Match(j, \"table\") ||\n\t\t\t\tstyler.Match(j, \"task\") ||\n\t\t\t\t(styler.Match(j, \"module\") && options.foldAtModule)) {\n\t\t\t\tlevelNext++;\n\t\t\t} else if (styler.Match(j, \"begin\")) {\n\t\t\t\t// Measure the minimum before a begin to allow\n\t\t\t\t// folding on \"end else begin\"\n\t\t\t\tif (levelMinCurrent > levelNext) {\n\t\t\t\t\tlevelMinCurrent = levelNext;\n\t\t\t\t}\n\t\t\t\tlevelNext++;\n\t\t\t} else if (styler.Match(j, \"class\")) {\n\t\t\t\t// class does not introduce a block when used in a typedef statement\n\t\t\t\tif (!(stateCurrent & typedefFlag))\n\t\t\t\t\tlevelNext++;\n\t\t\t} else if (styler.Match(j, \"fork\")) {\n\t\t\t\t// fork does not introduce a block when used in a wait or disable statement\n\t\t\t\tif (stateCurrent & foldWaitDisableFlag) {\n\t\t\t\t\tstateCurrent &= ~foldWaitDisableFlag;\n\t\t\t\t} else\n\t\t\t\t\tlevelNext++;\n\t\t\t} else if (styler.Match(j, \"endcase\") ||\n\t\t\t\tstyler.Match(j, \"endclass\") ||\n\t\t\t\tstyler.Match(j, \"endfunction\") ||\n\t\t\t\tstyler.Match(j, \"endgenerate\") ||\n\t\t\t\tstyler.Match(j, \"endgroup\") ||\n\t\t\t\tstyler.Match(j, \"endinterface\") ||\n\t\t\t\tstyler.Match(j, \"endpackage\") ||\n\t\t\t\tstyler.Match(j, \"endprimitive\") ||\n\t\t\t\tstyler.Match(j, \"endprogram\") ||\n\t\t\t\tstyler.Match(j, \"endsequence\") ||\n\t\t\t\tstyler.Match(j, \"endspecify\") ||\n\t\t\t\tstyler.Match(j, \"endtable\") ||\n\t\t\t\tstyler.Match(j, \"endtask\") ||\n\t\t\t\tstyler.Match(j, \"join\") ||\n\t\t\t\tstyler.Match(j, \"join_any\") ||\n\t\t\t\tstyler.Match(j, \"join_none\") ||\n\t\t\t\t(styler.Match(j, \"endmodule\") && options.foldAtModule) ||\n\t\t\t\t(styler.Match(j, \"end\") && !IsAWordChar(styler.SafeGetCharAt(j + 3)))) {\n\t\t\t\tlevelNext--;\n\t\t\t} else if (styler.Match(j, \"extern\") ||\n\t\t\t\tstyler.Match(j, \"pure\")) {\n\t\t\t\t// extern and pure virtual functions/tasks are terminated by ';' not endfunction/endtask\n\t\t\t\tstateCurrent |= foldExternFlag;\n\t\t\t} else if (styler.Match(j, \"disable\") ||\n\t\t\t\tstyler.Match(j, \"wait\")) {\n\t\t\t\t// fork does not introduce a block when used in a wait or disable statement\n\t\t\t\tstateCurrent |= foldWaitDisableFlag;\n\t\t\t} else if (styler.Match(j, \"typedef\")) {\n\t\t\t\tstateCurrent |= typedefFlag;\n\t\t\t}\n\t\t}\n\t\tif (atEOL) {\n\t\t\tint levelUse = levelCurrent;\n\t\t\tif (options.foldAtElse||options.foldPreprocessorElse) {\n\t\t\t\tlevelUse = levelMinCurrent;\n\t\t\t}\n\t\t\tint lev = levelUse | levelNext << 16;\n\t\t\tif (visibleChars == 0 && options.foldCompact)\n\t\t\t\tlev |= SC_FOLDLEVELWHITEFLAG;\n\t\t\tif (levelUse < levelNext)\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t\tif (stateCurrent) {\n\t\t\t\tfoldState[lineCurrent] = stateCurrent;\n\t\t\t}\n\t\t\tif (lev != styler.LevelAt(lineCurrent)) {\n\t\t\t\tstyler.SetLevel(lineCurrent, lev);\n\t\t\t}\n\t\t\tlineCurrent++;\n\t\t\tlevelCurrent = levelNext;\n\t\t\tlevelMinCurrent = levelCurrent;\n\t\t\tvisibleChars = 0;\n\t\t}\n\t\tif (!isspacechar(ch))\n\t\t\tvisibleChars++;\n\t}\n}\n\nstd::vector<std::string> LexerVerilog::Tokenize(const std::string &expr) const {\n\t// Break into tokens\n\tstd::vector<std::string> tokens;\n\tconst char *cp = expr.c_str();\n\twhile (*cp) {\n\t\tstd::string word;\n\t\tif (setWord.Contains(static_cast<unsigned char>(*cp))) {\n\t\t\t// Identifiers and numbers\n\t\t\twhile (setWord.Contains(static_cast<unsigned char>(*cp))) {\n\t\t\t\tword += *cp;\n\t\t\t\tcp++;\n\t\t\t}\n\t\t} else if (IsSpaceOrTab(*cp)) {\n\t\t\twhile (IsSpaceOrTab(*cp)) {\n\t\t\t\tcp++;\n\t\t\t}\n\t\t\tcontinue;\n\t\t} else {\n\t\t\t// Should handle strings, characters, and comments here\n\t\t\tword += *cp;\n\t\t\tcp++;\n\t\t}\n\t\ttokens.push_back(word);\n\t}\n\treturn tokens;\n}\n\nstatic const char * const verilogWordLists[] = {\n            \"Primary keywords and identifiers\",\n            \"Secondary keywords and identifiers\",\n            \"System Tasks\",\n            \"User defined tasks and identifiers\",\n            \"Documentation comment keywords\",\n            \"Preprocessor definitions\",\n            0,\n        };\n\nLexerModule lmVerilog(SCLEX_VERILOG, LexerVerilog::LexerFactoryVerilog, \"verilog\", verilogWordLists);\n"
  },
  {
    "path": "lexilla/lexers/LexVisualProlog.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexVisualProlog.cxx\n** Lexer for Visual Prolog.\n**/\n// Author Thomas Linder Puls, PDC A/S, http://www.visual-prolog.com\n// Based on Lexer for C++, C, Java, and JavaScript.\n// Copyright 1998-2005 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n// The line state contains:\n// In SCE_VISUALPROLOG_STRING: The closing quote and information about verbatim string.\n// and a stack of nesting kinds: comment, embedded (syntax) and (syntax) place holder\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n#ifdef _MSC_VER\n#pragma warning(disable: 4786)\n#endif\n\n#include <string>\n#include <string_view>\n#include <vector>\n#include <map>\n#include <algorithm>\n#include <functional>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"CharacterCategory.h\"\n#include \"LexerModule.h\"\n#include \"OptionSet.h\"\n#include \"DefaultLexer.h\"\n\nusing namespace Scintilla;\nusing namespace Lexilla;\n\nnamespace {\n// Options used for LexerVisualProlog\nstruct OptionsVisualProlog {\n    bool verbatimStrings;\n    bool backQuotedStrings;\n    OptionsVisualProlog() {\n        verbatimStrings = true;\n        backQuotedStrings = false;\n    }\n};\n\nstatic const char* const visualPrologWordLists[] = {\n    \"Major keywords (class, predicates, ...)\",\n    \"Minor keywords (if, then, try, ...)\",\n    \"Directive keywords without the '#' (include, requires, ...)\",\n    \"Documentation keywords without the '@' (short, detail, ...)\",\n    0,\n};\n\nstruct OptionSetVisualProlog : public OptionSet<OptionsVisualProlog> {\n    OptionSetVisualProlog() {\n        DefineProperty(\"lexer.visualprolog.verbatim.strings\", &OptionsVisualProlog::verbatimStrings,\n            \"Set to 0 to disable highlighting verbatim strings using '@'.\");\n        DefineProperty(\"lexer.visualprolog.backquoted.strings\", &OptionsVisualProlog::backQuotedStrings,\n            \"Set to 1 to enable using back quotes (``) to delimit strings.\");\n        DefineWordListSets(visualPrologWordLists);\n    }\n};\n\nLexicalClass lexicalClasses[] = {\n    SCE_VISUALPROLOG_DEFAULT, \"SCE_VISUALPROLOG_DEFAULT\", \"default\", \"Default style\",\n    SCE_VISUALPROLOG_KEY_MAJOR, \"SCE_VISUALPROLOG_KEY_MAJOR\", \"keyword major\", \"Major keyword\",\n    SCE_VISUALPROLOG_KEY_MINOR, \"SCE_VISUALPROLOG_KEY_MINOR\", \"keyword minor\", \"Minor keyword\",\n    SCE_VISUALPROLOG_KEY_DIRECTIVE, \"SCE_VISUALPROLOG_KEY_DIRECTIVE\", \"keyword preprocessor\", \"Directove keyword\",\n    SCE_VISUALPROLOG_COMMENT_BLOCK, \"SCE_VISUALPROLOG_COMMENT_BLOCK\", \"comment\", \"Multiline comment /* */\",\n    SCE_VISUALPROLOG_COMMENT_LINE, \"SCE_VISUALPROLOG_COMMENT_LINE\", \"comment line\", \"Line comment % ...\",\n    SCE_VISUALPROLOG_COMMENT_KEY, \"SCE_VISUALPROLOG_COMMENT_KEY\", \"comment documentation keyword\", \"Doc keyword in comment % @short ...\",\n    SCE_VISUALPROLOG_COMMENT_KEY_ERROR, \"SCE_VISUALPROLOG_COMMENT_KEY_ERROR\", \"comment\", \"A non recognized doc keyword % @qqq ...\",\n    SCE_VISUALPROLOG_IDENTIFIER, \"SCE_VISUALPROLOG_IDENTIFIER\", \"identifier\", \"Identifier (black)\",\n    SCE_VISUALPROLOG_VARIABLE, \"SCE_VISUALPROLOG_VARIABLE\", \"variable identifier\", \"Variable (green)\",\n    SCE_VISUALPROLOG_ANONYMOUS, \"SCE_VISUALPROLOG_ANONYMOUS\", \"variable anonymous identifier\", \"Anonymous Variable _XXX (dimmed green)\",\n    SCE_VISUALPROLOG_NUMBER, \"SCE_VISUALPROLOG_NUMBER\", \"numeric\", \"Number\",\n    SCE_VISUALPROLOG_OPERATOR, \"SCE_VISUALPROLOG_OPERATOR\", \"operator\", \"Operator\",\n    SCE_VISUALPROLOG_STRING, \"SCE_VISUALPROLOG_STRING\", \"literal string\", \"String literal\",\n    SCE_VISUALPROLOG_STRING_QUOTE, \"SCE_VISUALPROLOG_STRING_QUOTE\", \"literal string quote\", \"Quotes surrounding string literals\",\n    SCE_VISUALPROLOG_STRING_ESCAPE, \"SCE_VISUALPROLOG_STRING_ESCAPE\", \"literal string escapesequence\", \"Escape sequence in string literal\",\n    SCE_VISUALPROLOG_STRING_ESCAPE_ERROR, \"SCE_VISUALPROLOG_STRING_ESCAPE_ERROR\", \"error literal string escapesequence\", \"Error in escape sequence in string literal\",\n    SCE_VISUALPROLOG_STRING_EOL, \"SCE_VISUALPROLOG_STRING_EOL\", \"literal string multiline raw escapesequence\", \"Verbatim/multiline string literal EOL\",\n    SCE_VISUALPROLOG_EMBEDDED, \"SCE_VISUALPROLOG_EMBEDDED\", \"literal string embedded\", \"Embedded syntax [| ... |]\",\n    SCE_VISUALPROLOG_PLACEHOLDER, \"SCE_VISUALPROLOG_PLACEHOLDER\", \"operator embedded\", \"Syntax place holder {| ... |}:ident in embedded syntax\"\n};\n\nLexicalClass getLexicalClass(int style) {\n    for (auto lc : lexicalClasses) {\n        if (style == lc.value) {\n            return lc;\n        }\n    }\n    return {style, \"\", \"unused\", \"\"};\n}\n\n\nclass LexerVisualProlog : public DefaultLexer {\n    WordList majorKeywords;\n    WordList minorKeywords;\n    WordList directiveKeywords;\n    WordList docKeywords;\n    OptionsVisualProlog options;\n    OptionSetVisualProlog osVisualProlog;\npublic:\n    LexerVisualProlog() : DefaultLexer(\"visualprolog\", SCLEX_VISUALPROLOG) {\n    }\n    virtual ~LexerVisualProlog() {\n    }\n    void SCI_METHOD Release() override {\n        delete this;\n    }\n    int SCI_METHOD Version() const override {\n        return lvRelease5;\n    }\n    const char* SCI_METHOD PropertyNames() override {\n        return osVisualProlog.PropertyNames();\n    }\n    int SCI_METHOD PropertyType(const char* name) override {\n        return osVisualProlog.PropertyType(name);\n    }\n    const char* SCI_METHOD DescribeProperty(const char* name) override {\n        return osVisualProlog.DescribeProperty(name);\n    }\n    Sci_Position SCI_METHOD PropertySet(const char* key, const char* val) override;\n    const char* SCI_METHOD PropertyGet(const char* key) override {\n        return osVisualProlog.PropertyGet(key);\n    }\n    const char* SCI_METHOD DescribeWordListSets() override {\n        return osVisualProlog.DescribeWordListSets();\n    }\n    Sci_Position SCI_METHOD WordListSet(int n, const char* wl) override;\n    void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument* pAccess) override;\n    void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument* pAccess) override;\n\n    void* SCI_METHOD PrivateCall(int, void*) override {\n        return 0;\n    }\n\n    int SCI_METHOD NamedStyles() override {\n        int namedStyles = 0;\n        for (auto lc : lexicalClasses) {\n            if (namedStyles < lc.value) {\n                namedStyles = lc.value;\n            }\n        }\n        return namedStyles;\n    }\n    const char* SCI_METHOD NameOfStyle(int style) override {\n        return getLexicalClass(style).name;\n    }\n    const char* SCI_METHOD TagsOfStyle(int style) override {\n        return getLexicalClass(style).tags;\n    }\n    const char* SCI_METHOD DescriptionOfStyle(int style) override {\n        return getLexicalClass(style).description;\n    }\n\n    static ILexer5* LexerFactoryVisualProlog() {\n        return new LexerVisualProlog();\n    }\n};\n\nSci_Position SCI_METHOD LexerVisualProlog::PropertySet(const char* key, const char* val) {\n    if (osVisualProlog.PropertySet(&options, key, val)) {\n        return 0;\n    }\n    return -1;\n}\n\nSci_Position SCI_METHOD LexerVisualProlog::WordListSet(int n, const char* wl) {\n    WordList* wordListN = 0;\n    switch (n) {\n        case 0:\n            wordListN = &majorKeywords;\n            break;\n        case 1:\n            wordListN = &minorKeywords;\n            break;\n        case 2:\n            wordListN = &directiveKeywords;\n            break;\n        case 3:\n            wordListN = &docKeywords;\n            break;\n    }\n    Sci_Position firstModification = -1;\n    if (wordListN) {\n        WordList wlNew;\n        wlNew.Set(wl);\n        if (*wordListN != wlNew) {\n            wordListN->Set(wl);\n            firstModification = 0;\n        }\n    }\n    return firstModification;\n}\n\nstatic bool isLowerLetter(int ch) {\n    return ccLl == CategoriseCharacter(ch);\n}\n\nstatic bool isUpperLetter(int ch) {\n    return ccLu == CategoriseCharacter(ch);\n}\n\nstatic bool isAlphaNum(int ch) {\n    CharacterCategory cc = CategoriseCharacter(ch);\n    return (ccLu == cc || ccLl == cc || ccLt == cc || ccLm == cc || ccLo == cc || ccNd == cc || ccNl == cc || ccNo == cc);\n}\n\nstatic bool isStringVerbatimOpenClose(int ch) {\n    CharacterCategory cc = CategoriseCharacter(ch);\n    return (ccPc <= cc && cc <= ccSo);\n}\n\nstatic bool isIdChar(int ch) {\n    return ('_') == ch || isAlphaNum(ch);\n}\n\n// Look ahead to see which colour \"end\" should have (takes colour after the following keyword)\nstatic void endLookAhead(char s[], LexAccessor& styler, Sci_Position start) {\n    char ch = styler.SafeGetCharAt(start, '\\n');\n    while (' ' == ch) {\n        start++;\n        ch = styler.SafeGetCharAt(start, '\\n');\n    }\n    Sci_Position i = 0;\n    while (i < 100 && isLowerLetter(ch)) {\n        s[i] = ch;\n        i++;\n        ch = styler.SafeGetCharAt(start + i, '\\n');\n    }\n    s[i] = '\\0';\n}\n\n\nclass lineState {\npublic:\n    bool verbatim = false;\n    int closingQuote = 0;\n    int kindStack = 0;\n\n    bool isOpenStringVerbatim(int next) {\n        if (next > 0x7FFF) {\n            return false;\n        }\n        switch (next) {\n            case L'<':\n                closingQuote = L'>';\n                return true;\n            case L'>':\n                closingQuote = L'<';\n                return true;\n            case L'(':\n                closingQuote = L')';\n                return true;\n            case L')':\n                closingQuote = L'(';\n                return true;\n            case L'[':\n                closingQuote = L']';\n                return true;\n            case L']':\n                closingQuote = L'[';\n                return true;\n            case L'{':\n                closingQuote = L'}';\n                return true;\n            case L'}':\n                closingQuote = L'{';\n                return true;\n            case L'_':\n            case L'.':\n            case L',':\n            case L';':\n                return false;\n            default:\n                if (isStringVerbatimOpenClose(next)) {\n                    closingQuote = next;\n                    return true;\n                } else {\n                    return false;\n                }\n        }\n    }\n\n    enum kind {\n        none = 0,\n        comment = 1,\n        embedded = 2,\n        placeholder = 3\n    };\n\n    void setState(int state) {\n        verbatim = state >> 31;\n        closingQuote = state >> 16 & 0x7FFF;\n        kindStack = state & 0xFFFF;\n    }\n\n    int getState() {\n        return verbatim << 31 | closingQuote << 16 | (kindStack & 0xFFFF);\n    }\n\n    void enter(kind k) {\n        kindStack = kindStack << 2 | k;\n    }\n\n    void leave(kind k) {\n        if (k == currentKind()) {\n            kindStack = kindStack >> 2;\n        }\n    }\n    kind currentKind() {\n        return static_cast<kind>(kindStack & 0x3);\n    }\n    kind stateKind2(int ks) {\n        if (0 == ks) {\n            return none;\n        } else {\n            kind k1 = stateKind2(ks >> 2);\n            kind k2 = static_cast<kind>(ks & 0x3);\n            if (embedded == k1 && k2 == comment) {\n                return embedded;\n            } else {\n                return k2;\n            }\n        }\n    }\n    kind stateKind() {\n        return stateKind2(kindStack);\n    }\n};\n\nvoid SCI_METHOD LexerVisualProlog::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument* pAccess) {\n    LexAccessor styler(pAccess);\n    CharacterSet setDoxygen(CharacterSet::setAlpha, \"\");\n    CharacterSet setNumber(CharacterSet::setNone, \"0123456789abcdefABCDEFxoXO_\");\n\n    StyleContext sc(startPos, length, initStyle, styler, 0x7f);\n\n    int styleBeforeDocKeyword = SCE_VISUALPROLOG_DEFAULT;\n\n    lineState ls;\n    if (sc.currentLine >= 1) {\n        ls.setState(styler.GetLineState(sc.currentLine - 1));\n    }\n\n    bool newState = false;\n\n    for (; sc.More(); sc.Forward()) {\n\n        Sci_Position currentLineEntry = sc.currentLine;\n\n        if (newState) {\n            newState = false;\n            int state;\n            switch (ls.stateKind()) {\n                case lineState::comment:\n                    state = SCE_VISUALPROLOG_COMMENT_BLOCK;\n                    break;\n                case lineState::embedded:\n                    state = SCE_VISUALPROLOG_EMBEDDED;\n                    break;\n                case lineState::placeholder:\n                    state = SCE_VISUALPROLOG_PLACEHOLDER;\n                    break;\n                default:\n                    state = SCE_VISUALPROLOG_DEFAULT;\n                    break;\n            }\n            sc.SetState(state);\n        }\n\n        // Determine if the current state should terminate.\n        switch (sc.state) {\n            case SCE_VISUALPROLOG_OPERATOR:\n                sc.SetState(SCE_VISUALPROLOG_DEFAULT);\n                break;\n            case SCE_VISUALPROLOG_NUMBER:\n                // We accept almost anything because of hex, '.' and number suffixes\n                if (!(setNumber.Contains(sc.ch)) || (sc.Match('.') && IsADigit(sc.chNext))) {\n                    sc.SetState(SCE_VISUALPROLOG_DEFAULT);\n                }\n                break;\n            case SCE_VISUALPROLOG_IDENTIFIER:\n                if (!isIdChar(sc.ch)) {\n                    char s[1000];\n                    sc.GetCurrent(s, sizeof(s));\n                    if (0 == strcmp(s, \"end\")) {\n                        endLookAhead(s, styler, sc.currentPos);\n                    }\n                    if (majorKeywords.InList(s)) {\n                        sc.ChangeState(SCE_VISUALPROLOG_KEY_MAJOR);\n                    } else if (minorKeywords.InList(s)) {\n                        sc.ChangeState(SCE_VISUALPROLOG_KEY_MINOR);\n                    }\n                    sc.SetState(SCE_VISUALPROLOG_DEFAULT);\n                }\n                break;\n            case SCE_VISUALPROLOG_VARIABLE:\n            case SCE_VISUALPROLOG_ANONYMOUS:\n                if (!isIdChar(sc.ch)) {\n                    sc.SetState(SCE_VISUALPROLOG_DEFAULT);\n                }\n                break;\n            case SCE_VISUALPROLOG_KEY_DIRECTIVE:\n                if (!isLowerLetter(sc.ch)) {\n                    char s[1000];\n                    sc.GetCurrent(s, sizeof(s));\n                    if (!directiveKeywords.InList(s + 1)) {\n                        sc.ChangeState(SCE_VISUALPROLOG_IDENTIFIER);\n                    }\n                    sc.SetState(SCE_VISUALPROLOG_DEFAULT);\n                }\n                break;\n            case SCE_VISUALPROLOG_COMMENT_LINE:\n                if (sc.MatchLineEnd()) {\n                    int nextState = (lineState::comment == ls.currentKind()) ? SCE_VISUALPROLOG_COMMENT_BLOCK : SCE_VISUALPROLOG_DEFAULT;\n                    sc.SetState(nextState);\n                } else if (sc.Match('@')) {\n                    styleBeforeDocKeyword = SCE_VISUALPROLOG_COMMENT_LINE;\n                    sc.SetState(SCE_VISUALPROLOG_COMMENT_KEY_ERROR);\n                }\n                break;\n            case SCE_VISUALPROLOG_COMMENT_BLOCK:\n                if (sc.Match('*', '/')) {\n                    sc.Forward();\n                    ls.leave(lineState::comment);\n                    newState = true;\n                } else if (sc.Match('/', '*')) {\n                    sc.Forward();\n                    ls.enter(lineState::comment);\n                } else if (sc.Match('@')) {\n                    styleBeforeDocKeyword = SCE_VISUALPROLOG_COMMENT_BLOCK;\n                    sc.SetState(SCE_VISUALPROLOG_COMMENT_KEY_ERROR);\n                }\n                break;\n            case SCE_VISUALPROLOG_COMMENT_KEY_ERROR:\n                if (!setDoxygen.Contains(sc.ch) || sc.MatchLineEnd()) {\n                    char s[1000];\n                    sc.GetCurrent(s, sizeof(s));\n                    if (docKeywords.InList(s + 1)) {\n                        sc.ChangeState(SCE_VISUALPROLOG_COMMENT_KEY);\n                    }\n                    if (SCE_VISUALPROLOG_COMMENT_LINE == styleBeforeDocKeyword && sc.MatchLineEnd()) {\n                        // end line comment\n                        int nextState = (lineState::comment == ls.currentKind()) ? SCE_VISUALPROLOG_COMMENT_BLOCK : SCE_VISUALPROLOG_DEFAULT;\n                        sc.SetState(nextState);\n                    } else {\n                        sc.SetState(styleBeforeDocKeyword);\n                        if (SCE_VISUALPROLOG_COMMENT_BLOCK == styleBeforeDocKeyword && sc.Match('*', '/')) {\n                            // we have consumed the '*' if it comes immediately after the docKeyword\n                            sc.Forward();\n                            ls.leave(lineState::comment);\n                            newState = true;\n                        }\n                    }\n                }\n                break;\n            case SCE_VISUALPROLOG_STRING_ESCAPE_ERROR:\n                if (sc.atLineStart) {\n                    sc.SetState(SCE_VISUALPROLOG_DEFAULT);\n                    break;\n                }\n                [[fallthrough]];\n            case SCE_VISUALPROLOG_STRING_ESCAPE:\n            case SCE_VISUALPROLOG_STRING_QUOTE:\n            case SCE_VISUALPROLOG_STRING_EOL:\n                // return to SCE_VISUALPROLOG_STRING and treat as such (fallthrough)\n                sc.SetState(SCE_VISUALPROLOG_STRING);\n                [[fallthrough]];\n            case SCE_VISUALPROLOG_STRING:\n                if (sc.MatchLineEnd() | sc.atLineEnd) {\n                    if (ls.verbatim) {\n                        sc.SetState(SCE_VISUALPROLOG_STRING_EOL);\n                    } else {\n                        ls.closingQuote = 0;\n                        sc.SetState(SCE_VISUALPROLOG_STRING_ESCAPE_ERROR);\n                    }\n                } else if (sc.Match(ls.closingQuote)) {\n                    if (ls.verbatim && ls.closingQuote == sc.chNext) {\n                        sc.SetState(SCE_VISUALPROLOG_STRING_ESCAPE);\n                        sc.Forward();\n                    } else {\n                        ls.closingQuote = 0;\n                        sc.SetState(SCE_VISUALPROLOG_STRING_QUOTE);\n                        sc.ForwardSetState(SCE_VISUALPROLOG_DEFAULT);\n                    }\n                } else if (!ls.verbatim && sc.Match('\\\\')) {\n                    sc.SetState(SCE_VISUALPROLOG_STRING_ESCAPE_ERROR);\n                    sc.Forward();\n                    if (sc.MatchLineEnd()) {\n                        sc.ForwardSetState(SCE_VISUALPROLOG_DEFAULT);\n                    } else {\n                        if (sc.Match('\"') || sc.Match('\\'') || sc.Match('\\\\') || sc.Match('n') || sc.Match('l') || sc.Match('r') || sc.Match('t')) {\n                            sc.ChangeState(SCE_VISUALPROLOG_STRING_ESCAPE);\n                        } else if (sc.Match('u')) {\n                            if (IsADigit(sc.chNext, 16)) {\n                                sc.Forward();\n                                if (IsADigit(sc.chNext, 16)) {\n                                    sc.Forward();\n                                    if (IsADigit(sc.chNext, 16)) {\n                                        sc.Forward();\n                                        if (IsADigit(sc.chNext, 16)) {\n                                            sc.Forward();\n                                            sc.ChangeState(SCE_VISUALPROLOG_STRING_ESCAPE);\n                                        }\n                                    }\n                                }\n                            }\n                        }\n                    }\n                }\n                break;\n            case SCE_VISUALPROLOG_EMBEDDED:\n                if (sc.Match('|', ']')) {\n                    sc.Forward();\n                    ls.leave(lineState::embedded);\n                    newState = true;\n                } else if (sc.Match('[', '|')) {\n                    sc.Forward();\n                    ls.enter(lineState::embedded);\n                } else if (sc.Match('{', '|') && lineState::comment != ls.currentKind()) {\n                    sc.SetState(SCE_VISUALPROLOG_DEFAULT);\n                } else if (sc.Match('/', '*')) {\n                    sc.Forward();\n                    ls.enter(lineState::comment);\n                } else if (sc.Match('*', '/')) {\n                    sc.Forward();\n                    ls.leave(lineState::comment);\n                    newState = true;\n                }\n                break;\n            case SCE_VISUALPROLOG_PLACEHOLDER:\n                if (lineState::embedded == ls.currentKind()) {\n                    sc.SetState(SCE_VISUALPROLOG_EMBEDDED);\n                } else {\n                    sc.SetState(SCE_VISUALPROLOG_DEFAULT);\n                }\n                break;\n        }\n\n        if (currentLineEntry != sc.currentLine) {\n            styler.SetLineState(currentLineEntry, ls.getState());\n        }\n        if (sc.MatchLineEnd() | sc.atLineEnd) {\n            if (sc.More()) { // currentLine can be outside the document \n                styler.SetLineState(sc.currentLine, ls.getState());\n            }\n        }\n\n        // Determine if a new state should be entered.\n        if (sc.state == SCE_VISUALPROLOG_DEFAULT) {\n            if (options.verbatimStrings && sc.Match('@') && ls.isOpenStringVerbatim(sc.chNext)) {\n                ls.verbatim = true;\n                sc.SetState(SCE_VISUALPROLOG_STRING_QUOTE);\n                sc.Forward();\n            } else if (IsADigit(sc.ch) || (sc.Match('.') && IsADigit(sc.chNext))) {\n                sc.SetState(SCE_VISUALPROLOG_NUMBER);\n            } else if (isLowerLetter(sc.ch)) {\n                sc.SetState(SCE_VISUALPROLOG_IDENTIFIER);\n            } else if (isUpperLetter(sc.ch)) {\n                sc.SetState(SCE_VISUALPROLOG_VARIABLE);\n            } else if (sc.Match('_')) {\n                sc.SetState(SCE_VISUALPROLOG_ANONYMOUS);\n            } else if (sc.Match('/', '*')) {\n                sc.SetState(SCE_VISUALPROLOG_COMMENT_BLOCK);\n                ls.enter(lineState::comment);\n                sc.Forward();\n            } else if (sc.Match('%')) {\n                sc.SetState(SCE_VISUALPROLOG_COMMENT_LINE);\n            } else if (sc.Match('[', '|')) {\n                sc.SetState(SCE_VISUALPROLOG_EMBEDDED);\n                ls.enter(lineState::embedded);\n                sc.Forward();\n            } else if (sc.Match('{', '|')) {\n                sc.SetState(SCE_VISUALPROLOG_PLACEHOLDER);\n                ls.enter(lineState::placeholder);\n                sc.Forward();\n            } else if (sc.Match('|', '}')) {\n                sc.SetState(SCE_VISUALPROLOG_PLACEHOLDER);\n                sc.Forward();\n                if (':' == sc.chNext) {\n                    sc.Forward();\n                    for (; isIdChar(sc.chNext); sc.Forward()) {\n                    }\n                }\n                ls.leave(lineState::placeholder);\n                newState = true;\n            } else if (sc.Match('\\'')) {\n                ls.verbatim = false;\n                ls.closingQuote = '\\'';\n                sc.SetState(SCE_VISUALPROLOG_STRING_QUOTE);\n            } else if (sc.Match('\"')) {\n                ls.verbatim = false;\n                ls.closingQuote = '\"';\n                sc.SetState(SCE_VISUALPROLOG_STRING_QUOTE);\n            } else if (options.backQuotedStrings && sc.Match('`')) {\n                ls.verbatim = false;\n                ls.closingQuote = '`';\n                sc.SetState(SCE_VISUALPROLOG_STRING_QUOTE);\n            } else if (sc.Match('#')) {\n                sc.SetState(SCE_VISUALPROLOG_KEY_DIRECTIVE);\n            } else if (isoperator(static_cast<char>(sc.ch)) || sc.Match('\\\\') ||\n                (!options.verbatimStrings && sc.Match('@'))) {\n                sc.SetState(SCE_VISUALPROLOG_OPERATOR);\n            }\n        }\n    }\n    sc.Complete();\n    styler.Flush();\n}\n\n// Store both the current line's fold level and the next lines in the\n// level store to make it easy to pick up with each increment\n// and to make it possible to fiddle the current level for \"} else {\".\n\n#if defined(__clang__)\n#if __has_warning(\"-Wunused-but-set-variable\")\n// Disable warning for visibleChars\n#pragma clang diagnostic ignored \"-Wunused-but-set-variable\"\n#endif\n#endif\n\nvoid SCI_METHOD LexerVisualProlog::Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument* pAccess) {\n\n    LexAccessor styler(pAccess);\n\n    Sci_PositionU endPos = startPos + length;\n    int visibleChars = 0;\n    Sci_Position currentLine = styler.GetLine(startPos);\n    int levelCurrent = SC_FOLDLEVELBASE;\n    if (currentLine > 0)\n        levelCurrent = styler.LevelAt(currentLine - 1) >> 16;\n    int levelMinCurrent = levelCurrent;\n    int levelNext = levelCurrent;\n    char chNext = styler[startPos];\n    int styleNext = styler.StyleAt(startPos);\n    int style = initStyle;\n    for (Sci_PositionU i = startPos; i < endPos; i++) {\n        char ch = chNext;\n        chNext = styler.SafeGetCharAt(i + 1);\n        style = styleNext;\n        styleNext = styler.StyleAt(i + 1);\n        bool atEOL = (ch == '\\r' && chNext != '\\n') || (ch == '\\n');\n        if (style == SCE_VISUALPROLOG_OPERATOR) {\n            if (ch == '{') {\n                // Measure the minimum before a '{' to allow\n                // folding on \"} else {\"\n                if (levelMinCurrent > levelNext) {\n                    levelMinCurrent = levelNext;\n                }\n                levelNext++;\n            } else if (ch == '}') {\n                levelNext--;\n            }\n        }\n        if (!IsASpace(ch))\n            visibleChars++;\n        if (atEOL || (i == endPos - 1)) {\n            int levelUse = levelCurrent;\n            int lev = levelUse | levelNext << 16;\n            if (levelUse < levelNext)\n                lev |= SC_FOLDLEVELHEADERFLAG;\n            if (lev != styler.LevelAt(currentLine)) {\n                styler.SetLevel(currentLine, lev);\n            }\n            currentLine++;\n            levelCurrent = levelNext;\n            levelMinCurrent = levelCurrent;\n            if (atEOL && (i == static_cast<Sci_PositionU>(styler.Length() - 1))) {\n                // There is an empty line at end of file so give it same level and empty\n                styler.SetLevel(currentLine, (levelCurrent | levelCurrent << 16) | SC_FOLDLEVELWHITEFLAG);\n            }\n            visibleChars = 0;\n        }\n    }\n}\n}\n\nLexerModule lmVisualProlog(SCLEX_VISUALPROLOG, LexerVisualProlog::LexerFactoryVisualProlog, \"visualprolog\", visualPrologWordLists);\n"
  },
  {
    "path": "lexilla/lexers/LexX12.cxx",
    "content": "// Scintilla Lexer for X12\n// @file LexX12.cxx\n// Written by Iain Clarke, IMCSoft & Inobiz AB.\n// X12 official documentation is behind a paywall, but there's a description of the syntax here:\n// http://www.rawlinsecconsulting.com/x12tutorial/x12syn.html\n// This code is subject to the same license terms as the rest of the scintilla project:\n// The License.txt file describes the conditions under which this software may be distributed.\n//\n\n// Header order must match order in scripts/HeaderOrder.txt\n#include <cstdlib>\n#include <cassert>\n#include <cstring>\n#include <cctype>\n\n#include <string>\n#include <string_view>\n\n#include <vector>\n#include <algorithm>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n#include \"LexerModule.h\"\n#include \"DefaultLexer.h\"\n\nusing namespace Scintilla;\nusing namespace Lexilla;\n\nclass LexerX12 : public DefaultLexer\n{\npublic:\n\tLexerX12();\n\tvirtual ~LexerX12() {} // virtual destructor, as we inherit from ILexer\n\n\tstatic ILexer5 *Factory() {\n\t\treturn new LexerX12;\n\t}\n\n\tint SCI_METHOD Version() const override\n\t{\n\t\treturn lvRelease5;\n\t}\n\tvoid SCI_METHOD Release() override\n\t{\n\t\tdelete this;\n\t}\n\n\tconst char * SCI_METHOD PropertyNames() override\n\t{\n\t\treturn \"fold\";\n\t}\n\tint SCI_METHOD PropertyType(const char *) override\n\t{\n\t\treturn SC_TYPE_BOOLEAN; // Only one property!\n\t}\n\tconst char * SCI_METHOD DescribeProperty(const char *name) override\n\t{\n\t\tif (!strcmp(name, \"fold\"))\n\t\t\treturn \"Whether to apply folding to document or not\";\n\t\treturn \"\";\n\t}\n\n\tSci_Position SCI_METHOD PropertySet(const char *key, const char *val) override\n\t{\n\t\tif (!strcmp(key, \"fold\"))\n\t\t{\n\t\t\tm_bFold = strcmp(val, \"0\") ? true : false;\n\t\t\treturn 0;\n\t\t}\n\t\treturn -1;\n\t}\n\tconst char * SCI_METHOD PropertyGet(const char *) override {\n\t\treturn \"\";\n\t}\n\tconst char * SCI_METHOD DescribeWordListSets() override\n\t{\n\t\treturn \"\";\n\t}\n\tSci_Position SCI_METHOD WordListSet(int, const char *) override\n\t{\n\t\treturn -1;\n\t}\n\tvoid SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;\n\tvoid SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;\n\tvoid * SCI_METHOD PrivateCall(int, void *) override\n\t{\n\t\treturn NULL;\n\t}\n\nprotected:\n\tstruct Terminator\n\t{\n\t\tint Style = SCE_X12_BAD;\n\t\tSci_PositionU pos = 0;\n\t\tSci_PositionU length = 0;\n\t\tint FoldChange = 0;\n\t};\n\tTerminator InitialiseFromISA(IDocument *pAccess);\n\tSci_PositionU FindPreviousSegmentStart(IDocument *pAccess, Sci_Position startPos) const;\n\tTerminator DetectSegmentHeader(IDocument *pAccess, Sci_PositionU pos) const;\n\tTerminator FindNextTerminator(IDocument *pAccess, Sci_PositionU pos, bool bJustSegmentTerminator = false) const;\n\n\tbool m_bFold = false;\n\tchar m_SeparatorSubElement = 0;\n\tchar m_SeparatorElement = 0;\n\tstd::string m_SeparatorSegment; // might be multiple characters\n\tstd::string m_LineFeed;\n};\n\nLexerModule lmX12(SCLEX_X12, LexerX12::Factory, \"x12\");\n\n///////////////////////////////////////////////////////////////////////////////\n\n\n\n///////////////////////////////////////////////////////////////////////////////\n\nLexerX12::LexerX12() : DefaultLexer(\"x12\", SCLEX_X12)\n{\n}\n\nvoid LexerX12::Lex(Sci_PositionU startPos, Sci_Position length, int, IDocument *pAccess)\n{\n\tSci_PositionU posFinish = startPos + length;\n\n\tTerminator T = InitialiseFromISA(pAccess);\n\n\tif (T.Style == SCE_X12_BAD)\n\t{\n\t\tif (T.pos < startPos)\n\t\t\tT.pos = startPos; // we may be colouring in batches.\n\t\tpAccess->StartStyling(startPos);\n\t\tpAccess->SetStyleFor(T.pos - startPos, SCE_X12_ENVELOPE);\n\t\tpAccess->SetStyleFor(posFinish - T.pos, SCE_X12_BAD);\n\t\treturn;\n\t}\n\n\t// Look backwards for a segment start or a document beginning\n\tSci_PositionU posCurrent = FindPreviousSegmentStart (pAccess, startPos);\n\n\t// Style buffer, so we're not issuing loads of notifications\n\tpAccess->StartStyling(posCurrent);\n\n\twhile (posCurrent < posFinish)\n\t{\n\t\t// Look for first element marker, so we can denote segment\n\t\tT = DetectSegmentHeader(pAccess, posCurrent);\n\t\tif (T.Style == SCE_X12_BAD)\n\t\t\tbreak;\n\n\t\tpAccess->SetStyleFor(T.pos - posCurrent, T.Style);\n\t\tpAccess->SetStyleFor(T.length, SCE_X12_SEP_ELEMENT);\n\t\tposCurrent = T.pos + T.length;\n\n\t\twhile (T.Style != SCE_X12_BAD && T.Style != SCE_X12_SEGMENTEND) // Break on bad or segment ending\n\t\t{\n\t\t\tT = FindNextTerminator(pAccess, posCurrent, false);\n\t\t\tif (T.Style == SCE_X12_BAD)\n\t\t\t\tbreak;\n\n\t\t\tint Style = T.Style;\n\n\t\t\tpAccess->SetStyleFor(T.pos - posCurrent, SCE_X12_DEFAULT);\n\t\t\tpAccess->SetStyleFor(T.length, Style);\n\t\t\tposCurrent = T.pos + T.length;\n\t\t}\n\t\tif (T.Style == SCE_X12_BAD)\n\t\t\tbreak;\n\t}\n\n\tpAccess->SetStyleFor(posFinish - posCurrent, SCE_X12_BAD);\n}\n\nvoid LexerX12::Fold(Sci_PositionU startPos, Sci_Position length, int, IDocument *pAccess)\n{\n\tif (!m_bFold)\n\t\treturn;\n\n\t// Are we even foldable?\n\t// check for cr,lf,cr+lf.\n\tif (m_LineFeed.empty())\n\t\treturn;\n\n\tSci_PositionU posFinish = startPos + length;\n\n\t// Look backwards for a segment start or a document beginning\n\tstartPos = FindPreviousSegmentStart(pAccess, startPos);\n\tTerminator T;\n\n\tSci_PositionU currLine = pAccess->LineFromPosition(startPos);\n\tint levelCurrentStyle = SC_FOLDLEVELBASE;\n\tint indentCurrent = 0;\n\tif (currLine > 0)\n\t{\n\t\tlevelCurrentStyle = pAccess->GetLevel(currLine - 1); // bottom 12 bits are level\n\t\tindentCurrent = levelCurrentStyle & (SC_FOLDLEVELBASE - 1); // indent from previous line\n\t\tSci_PositionU posLine = pAccess->LineStart(currLine - 1);\n\t\tT = DetectSegmentHeader(pAccess, posLine);\n\t\tindentCurrent += T.FoldChange;\n\t}\n\n\twhile (startPos < posFinish)\n\t{\n\t\tT = DetectSegmentHeader(pAccess, startPos);\n\t\tint indentNext = indentCurrent + T.FoldChange;\n\t\tif (indentNext < 0)\n\t\t\tindentNext = 0;\n\n\t\tlevelCurrentStyle = (T.FoldChange > 0) ? (SC_FOLDLEVELBASE | SC_FOLDLEVELHEADERFLAG) : SC_FOLDLEVELBASE;\n\n\t\tcurrLine = pAccess->LineFromPosition(startPos);\n\t\tpAccess->SetLevel(currLine, levelCurrentStyle | indentCurrent);\n\n\t\tT = FindNextTerminator(pAccess, startPos, true);\n\n\t\tif (T.Style == SCE_X12_BAD)\n\t\t\tbreak;\n\n\t\tstartPos = T.pos + T.length;\n\t\tindentCurrent = indentNext;\n\t}\n}\n\nLexerX12::Terminator LexerX12::InitialiseFromISA(IDocument *pAccess)\n{\n\tSci_Position length = pAccess->Length();\n\tif (length <= 108)\n\t\treturn { SCE_X12_BAD, 0 };\n\n\tpAccess->GetCharRange(&m_SeparatorElement, 3, 1);\n\tpAccess->GetCharRange(&m_SeparatorSubElement, 104, 1);\n\n\t// Look for GS, as that's the next segment. Anything between 105 and GS/IEA is our segment separator.\n\tSci_Position posNextSegment;\n\tchar bufSegment[3] = { 0 };\n\tfor (posNextSegment = 105; posNextSegment < length - 3; posNextSegment++)\n\t{\n\t\tpAccess->GetCharRange(bufSegment, posNextSegment, 3);\n\t\tif (!memcmp (bufSegment, \"GS\", 2) || !memcmp(bufSegment, \"IEA\", 3))\n\t\t{\n\t\t\tm_SeparatorSegment.resize(posNextSegment - 105);\n\t\t\tpAccess->GetCharRange(&m_SeparatorSegment.at(0), 105, posNextSegment - 105);\n\n\t\t\t// Is some of that CR+LF?\n\t\t\tsize_t nPos = m_SeparatorSegment.find_last_not_of(\"\\r\\n\");\n\t\t\tm_LineFeed = m_SeparatorSegment.substr(nPos + 1);\n\t\t\tm_SeparatorSegment = m_SeparatorSegment.substr(0, nPos + 1);\n\t\t\tbreak;\n\t\t}\n\t}\n\tif (m_SeparatorSegment.empty() && m_LineFeed.empty())\n\t{\n\t\treturn { SCE_X12_BAD, 105 };\n\t}\n\n\t// Validate we have an element separator, and it's not silly!\n\tif (m_SeparatorElement == '\\0' || m_SeparatorElement == '\\n' || m_SeparatorElement == '\\r')\n\t\treturn { SCE_X12_BAD, 3 };\n\n\t// Validate we have an element separator, and it's not silly!\n\tif (m_SeparatorSubElement == '\\0' || m_SeparatorSubElement == '\\n' || m_SeparatorSubElement == '\\r')\n\t\treturn { SCE_X12_BAD, 103 };\n\tif (m_SeparatorElement == m_SeparatorSubElement)\n\t\treturn { SCE_X12_BAD, 104 };\n\tfor (auto& c : m_SeparatorSegment)\n\t{\n\t\tif (m_SeparatorElement == c)\n\t\t\treturn { SCE_X12_BAD, 105 };\n\t\tif (m_SeparatorSubElement == c)\n\t\t\treturn { SCE_X12_BAD, 105 };\n\t}\n\n\t// Check we have element markers at all the right places! ISA element has fixed entries.\n\tstd::vector<Sci_PositionU> ElementMarkers = { 3, 6, 17, 20, 31, 34, 50, 53, 69, 76, 81, 83, 89, 99, 101, 103 };\n\tfor (auto i : ElementMarkers)\n\t{\n\t\tchar c;\n\t\tpAccess->GetCharRange(&c, i, 1);\n\t\tif (c != m_SeparatorElement)\n\t\t\treturn { SCE_X12_BAD, i };\n\t}\n\t// Check we have no element markers anywhere else!\n\tfor (Sci_PositionU i = 0; i < 105; i++)\n\t{\n\t\tif (std::find(ElementMarkers.begin(), ElementMarkers.end(), i) != ElementMarkers.end())\n\t\t\tcontinue;\n\n\t\tchar c;\n\t\tpAccess->GetCharRange(&c, i, 1);\n\t\tif (c == m_SeparatorElement)\n\t\t\treturn { SCE_X12_BAD, i };\n\t}\n\n\treturn { SCE_X12_ENVELOPE };\n}\n\nSci_PositionU LexerX12::FindPreviousSegmentStart(IDocument *pAccess, Sci_Position startPos) const\n{\n\tSci_PositionU length = pAccess->Length();\n\tstd::string bufTest = m_SeparatorSegment + m_LineFeed; // quick way of making the lengths the same\n\tstd::string bufCompare = bufTest;\n\n\tfor (; startPos > 0; startPos--)\n\t{\n\t\tif (startPos + bufTest.size() > length)\n\t\t\tcontinue;\n\n\t\tpAccess->GetCharRange(&bufTest.at(0), startPos, bufTest.size());\n\t\tif (bufTest == bufCompare)\n\t\t{\n\t\t\treturn startPos + bufTest.size();\n\t\t}\n\t}\n\t// We didn't find a ', so just go with the beginning\n\treturn 0;\n}\n\nLexerX12::Terminator LexerX12::DetectSegmentHeader(IDocument *pAccess, Sci_PositionU pos) const\n{\n\tSci_PositionU Length = pAccess->Length();\n\tLength -= pos;\n\tchar c, Buf[4] = { 0 }; // max 3 + separator\n\tfor (Sci_PositionU posOffset = 0; posOffset < std::size(Buf) && posOffset < Length; posOffset++)\n\t{\n\t\tpAccess->GetCharRange(&c, pos + posOffset, 1);\n\t\tif (c != m_SeparatorElement)\n\t\t{\n\t\t\tBuf[posOffset] = c;\n\t\t\tcontinue;\n\t\t}\n\n\t\t// check for special segments, involved in folding start/stop.\n\t\tif (memcmp(Buf, \"ISA\", 3) == 0)\n\t\t\treturn { SCE_X12_ENVELOPE, pos + posOffset, 1, +1 };\n\t\tif (memcmp(Buf, \"IEA\", 3) == 0)\n\t\t\treturn { SCE_X12_ENVELOPE, pos + posOffset, 1, -1 };\n\t\tif (memcmp(Buf, \"GS\", 2) == 0)\n\t\t\treturn { SCE_X12_FUNCTIONGROUP, pos + posOffset, 1, +1 };\n\t\tif (memcmp(Buf, \"GE\", 2) == 0)\n\t\t\treturn { SCE_X12_FUNCTIONGROUP, pos + posOffset, 1, -1 };\n\t\tif (memcmp(Buf, \"ST\", 2) == 0)\n\t\t\treturn { SCE_X12_TRANSACTIONSET, pos + posOffset, 1, +1 };\n\t\tif (memcmp(Buf, \"SE\", 2) == 0)\n\t\t\treturn { SCE_X12_TRANSACTIONSET, pos + posOffset, 1, -1 };\n\t\treturn { SCE_X12_SEGMENTHEADER, pos + posOffset, 1, 0 };\n\t}\n\treturn { SCE_X12_BAD, pos, 0, 0 };\n}\n\nLexerX12::Terminator LexerX12::FindNextTerminator(IDocument *pAccess, Sci_PositionU pos, bool bJustSegmentTerminator) const\n{\n\tchar c;\n\tSci_PositionU length = pAccess->Length();\n\tstd::string bufTestSegment = m_SeparatorSegment; // quick way of making the lengths the same\n\tstd::string bufTestLineFeed = m_LineFeed; // quick way of making the lengths the same\n\n\n\twhile (pos < (Sci_PositionU)length)\n\t{\n\t\tpAccess->GetCharRange(&c, pos, 1);\n\t\tif (pos + m_SeparatorSegment.size() > length)\n\t\t\tbufTestSegment.clear(); // going up - so once we can't get this, we're done with the buffer.\n\t\telse if (!bufTestSegment.empty())\n\t\t\tpAccess->GetCharRange(&bufTestSegment.at(0), pos, bufTestSegment.size());\n\t\tif (pos + m_LineFeed.size() > length)\n\t\t\tbufTestLineFeed.clear(); // going up - so once we can't get this, we're done with the buffer.\n\t\telse if (!bufTestLineFeed.empty())\n\t\t\tpAccess->GetCharRange(&bufTestLineFeed.at(0), pos, bufTestLineFeed.size());\n\n\t\tif (!bJustSegmentTerminator && c == m_SeparatorElement)\n\t\t\treturn { SCE_X12_SEP_ELEMENT, pos, 1 };\n\t\telse if (!bJustSegmentTerminator && c == m_SeparatorSubElement)\n\t\t\treturn { SCE_X12_SEP_SUBELEMENT, pos, 1 };\n\t\telse if (!m_SeparatorSegment.empty() && bufTestSegment == m_SeparatorSegment)\n\t\t{\n\t\t\tif (m_LineFeed.empty())\n\t\t\t\treturn { SCE_X12_SEGMENTEND, pos, m_SeparatorSegment.size() };\n\t\t\t// is this the end?\n\t\t\tif (pos + m_SeparatorSegment.size() == length)\n\t\t\t\treturn { SCE_X12_SEGMENTEND, pos, m_SeparatorSegment.size() };\n\t\t\t// Check if we're followed by a linefeed.\n\t\t\tif (pos + m_SeparatorSegment.size() + m_LineFeed.size() > length)\n\t\t\t\treturn { SCE_X12_BAD, pos };\n\t\t\tbufTestSegment = m_LineFeed;\n\t\t\tpAccess->GetCharRange(&bufTestSegment.at(0), pos + m_SeparatorSegment.size(), bufTestSegment.size());\n\t\t\tif (bufTestSegment == m_LineFeed)\n\t\t\t\treturn { SCE_X12_SEGMENTEND, pos, m_SeparatorSegment.size() + m_LineFeed.size() };\n\t\t\tbreak;\n\t\t}\n\t\telse if (m_SeparatorSegment.empty() && bufTestLineFeed == m_LineFeed)\n\t\t{\n\t\t\treturn { SCE_X12_SEGMENTEND, pos, m_LineFeed.size() };\n\t\t}\n\t\tpos++;\n\t}\n\n\treturn { SCE_X12_BAD, pos };\n}\n"
  },
  {
    "path": "lexilla/lexers/LexYAML.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexYAML.cxx\n ** Lexer for YAML.\n **/\n// Copyright 2003- by Sean O'Dell <sean@celsoft.com>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <cstdlib>\n#include <cassert>\n#include <cstring>\n#include <cctype>\n#include <cstdio>\n#include <cstdarg>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"LexerModule.h\"\n\nusing namespace Lexilla;\n\nnamespace {\n\nconst char * const yamlWordListDesc[] = {\n\t\"Keywords\",\n\tnullptr\n};\n\ninline bool AtEOL(Accessor &styler, Sci_PositionU i) {\n\treturn (styler[i] == '\\n') ||\n\t\t((styler[i] == '\\r') && (styler.SafeGetCharAt(i + 1) != '\\n'));\n}\n\n/**\n * Check for space, tab, line feed, or carriage return.\n * See YAML 1.2 spec sections 5.4. Line Break Characters and 5.5. White Space Characters.\n */\nconstexpr bool IsWhiteSpaceOrEOL(char ch) noexcept {\n\treturn ch == ' ' || ch == '\\t' || ch == '\\n' || ch == '\\r';\n}\n\nunsigned int SpaceCount(char* lineBuffer) noexcept {\n\tif (lineBuffer == nullptr)\n\t\treturn 0;\n\n\tchar* headBuffer = lineBuffer;\n\n\twhile (*headBuffer == ' ')\n\t\theadBuffer++;\n\n\treturn static_cast<unsigned int>(headBuffer - lineBuffer);\n}\n\nbool KeywordAtChar(const char* lineBuffer, char* startComment, const WordList &keywords) noexcept {\n\tif (lineBuffer == nullptr || startComment <= lineBuffer)\n\t\treturn false;\n\tchar* endValue = startComment - 1;\n\twhile (endValue >= lineBuffer && *endValue == ' ')\n\t\tendValue--;\n\tSci_PositionU len = static_cast<Sci_PositionU>(endValue - lineBuffer) + 1;\n\tchar s[100];\n\tif (len > (sizeof(s) / sizeof(s[0]) - 1))\n\t\treturn false;\n\tstrncpy(s, lineBuffer, len);\n\ts[len] = '\\0';\n\treturn (keywords.InList(s));\n}\n\n#define YAML_STATE_BITSIZE\t\t16\n#define YAML_STATE_MASK\t\t\t(0xFFFF0000)\n#define YAML_STATE_DOCUMENT\t\t(1 << YAML_STATE_BITSIZE)\n#define YAML_STATE_VALUE\t\t(2 << YAML_STATE_BITSIZE)\n#define YAML_STATE_COMMENT\t\t(3 << YAML_STATE_BITSIZE)\n#define YAML_STATE_TEXT_PARENT\t(4 << YAML_STATE_BITSIZE)\n#define YAML_STATE_TEXT\t\t\t(5 << YAML_STATE_BITSIZE)\n\nvoid ColouriseYAMLLine(\n\tchar *lineBuffer,\n\tSci_PositionU currentLine,\n\tSci_PositionU lengthLine,\n\tSci_PositionU startLine,\n\tSci_PositionU endPos,\n\tconst WordList &keywords,\n\tAccessor &styler) {\n\n\tSci_PositionU i = 0;\n\tbool bInQuotes = false;\n\tconst unsigned int indentAmount = SpaceCount(lineBuffer);\n\n\tif (currentLine > 0) {\n\t\tconst int parentLineState = styler.GetLineState(currentLine - 1);\n\n\t\tif ((parentLineState&YAML_STATE_MASK) == YAML_STATE_TEXT || (parentLineState&YAML_STATE_MASK) == YAML_STATE_TEXT_PARENT) {\n\t\t\tconst unsigned int parentIndentAmount = parentLineState&(~YAML_STATE_MASK);\n\t\t\tif (indentAmount > parentIndentAmount) {\n\t\t\t\tstyler.SetLineState(currentLine, YAML_STATE_TEXT | parentIndentAmount);\n\t\t\t\tstyler.ColourTo(endPos, SCE_YAML_TEXT);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\tstyler.SetLineState(currentLine, 0);\n\tif (strncmp(lineBuffer, \"---\", 3) == 0 || strncmp(lineBuffer, \"...\", 3) == 0) {\t// Document marker\n\t\tstyler.SetLineState(currentLine, YAML_STATE_DOCUMENT);\n\t\tstyler.ColourTo(endPos, SCE_YAML_DOCUMENT);\n\t\treturn;\n\t}\n\t// Skip initial spaces\n\twhile ((i < lengthLine) && lineBuffer[i] == ' ') { // YAML always uses space, never TABS or anything else\n\t\ti++;\n\t}\n\tif (lineBuffer[i] == '\\t') { // if we skipped all spaces, and we are NOT inside a text block, this is wrong\n\t\tstyler.ColourTo(endPos, SCE_YAML_ERROR);\n\t\treturn;\n\t}\n\tif (lineBuffer[i] == '#') {\t// Comment\n\t\tstyler.SetLineState(currentLine, YAML_STATE_COMMENT);\n\t\tstyler.ColourTo(endPos, SCE_YAML_COMMENT);\n\t\treturn;\n\t}\n\twhile (i < lengthLine) {\n\t\tif (lineBuffer[i] == '\\'' || lineBuffer[i] == '\\\"') {\n\t\t\tbInQuotes = !bInQuotes;\n\t\t} else if (lineBuffer[i] == '#' && isspacechar(lineBuffer[i - 1]) && !bInQuotes) {\n\t\t\tstyler.ColourTo(startLine + i - 1, SCE_YAML_DEFAULT);\n\t\t\tstyler.ColourTo(endPos, SCE_YAML_COMMENT);\n\t\t\treturn;\n\t\t} else if (lineBuffer[i] == ':' && !bInQuotes && (IsWhiteSpaceOrEOL(lineBuffer[i + 1]) || i == lengthLine - 1)) {\n\t\t\tstyler.ColourTo(startLine + i - 1, SCE_YAML_IDENTIFIER);\n\t\t\tstyler.ColourTo(startLine + i, SCE_YAML_OPERATOR);\n\t\t\t// Non-folding scalar\n\t\t\ti++;\n\t\t\twhile ((i < lengthLine) && isspacechar(lineBuffer[i]))\n\t\t\t\ti++;\n\t\t\tSci_PositionU endValue = lengthLine - 1;\n\t\t\twhile ((endValue >= i) && isspacechar(lineBuffer[endValue]))\n\t\t\t\tendValue--;\n\t\t\tlineBuffer[endValue + 1] = '\\0';\n\t\t\tif (lineBuffer[i] == '|' || lineBuffer[i] == '>') {\n\t\t\t\ti++;\n\t\t\t\tif (lineBuffer[i] == '+' || lineBuffer[i] == '-')\n\t\t\t\t\ti++;\n\t\t\t\twhile ((i < lengthLine) && isspacechar(lineBuffer[i]))\n\t\t\t\t\ti++;\n\t\t\t\tif (lineBuffer[i] == '\\0') {\n\t\t\t\t\tstyler.SetLineState(currentLine, YAML_STATE_TEXT_PARENT | indentAmount);\n\t\t\t\t\tstyler.ColourTo(endPos, SCE_YAML_DEFAULT);\n\t\t\t\t\treturn;\n\t\t\t\t} else if (lineBuffer[i] == '#') {\n\t\t\t\t\tstyler.SetLineState(currentLine, YAML_STATE_TEXT_PARENT | indentAmount);\n\t\t\t\t\tstyler.ColourTo(startLine + i - 1, SCE_YAML_DEFAULT);\n\t\t\t\t\tstyler.ColourTo(endPos, SCE_YAML_COMMENT);\n\t\t\t\t\treturn;\n\t\t\t\t} else {\n\t\t\t\t\tstyler.ColourTo(endPos, SCE_YAML_ERROR);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else if (lineBuffer[i] == '#') {\n\t\t\t\tstyler.ColourTo(startLine + i - 1, SCE_YAML_DEFAULT);\n\t\t\t\tstyler.ColourTo(endPos, SCE_YAML_COMMENT);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tSci_PositionU startComment = i;\n\t\t\tbInQuotes = false;\n\t\t\twhile (startComment < lengthLine) { // Comment must be space padded\n\t\t\t\tif (lineBuffer[startComment] == '\\'' || lineBuffer[startComment] == '\\\"')\n\t\t\t\t\tbInQuotes = !bInQuotes;\n\t\t\t\tif (lineBuffer[startComment] == '#' && isspacechar(lineBuffer[startComment - 1]) && !bInQuotes)\n\t\t\t\t\tbreak;\n\t\t\t\tstartComment++;\n\t\t\t}\n\t\t\tstyler.SetLineState(currentLine, YAML_STATE_VALUE);\n\t\t\tif (lineBuffer[i] == '&' || lineBuffer[i] == '*') {\n\t\t\t\tstyler.ColourTo(startLine + startComment - 1, SCE_YAML_REFERENCE);\n\t\t\t\tif (startComment < lengthLine)\n\t\t\t\t\tstyler.ColourTo(endPos, SCE_YAML_COMMENT);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (KeywordAtChar(&lineBuffer[i], &lineBuffer[startComment], keywords)) { // Convertible value (true/false, etc.)\n\t\t\t\tstyler.ColourTo(startLine + startComment - 1, SCE_YAML_KEYWORD);\n\t\t\t\tif (startComment < lengthLine)\n\t\t\t\t\tstyler.ColourTo(endPos, SCE_YAML_COMMENT);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst Sci_PositionU i2 = i;\n\t\t\twhile ((i < startComment) && lineBuffer[i]) {\n\t\t\t\tif (!(IsASCII(lineBuffer[i]) && isdigit(lineBuffer[i])) && lineBuffer[i] != '-'\n\t\t\t\t        && lineBuffer[i] != '.' && lineBuffer[i] != ',' && lineBuffer[i] != ' ') {\n\t\t\t\t\tstyler.ColourTo(startLine + startComment - 1, SCE_YAML_DEFAULT);\n\t\t\t\t\tif (startComment < lengthLine)\n\t\t\t\t\t\tstyler.ColourTo(endPos, SCE_YAML_COMMENT);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tif (i > i2) {\n\t\t\t\tstyler.ColourTo(startLine + startComment - 1, SCE_YAML_NUMBER);\n\t\t\t\tif (startComment < lengthLine)\n\t\t\t\t\tstyler.ColourTo(endPos, SCE_YAML_COMMENT);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tbreak; // shouldn't get here, but just in case, the rest of the line is coloured the default\n\t\t}\n\t\ti++;\n\t}\n\tstyler.ColourTo(endPos, SCE_YAML_DEFAULT);\n}\n\nvoid ColouriseYAMLDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *keywordLists[], Accessor &styler) {\n\tstd::string lineBuffer;\n\tstyler.StartAt(startPos);\n\tstyler.StartSegment(startPos);\n\tSci_PositionU startLine = startPos;\n\tconst Sci_PositionU endPos = startPos + length;\n\tconst Sci_PositionU maxPos = styler.Length();\n\tSci_PositionU lineCurrent = styler.GetLine(startPos);\n\n\tfor (Sci_PositionU i = startPos; i < maxPos && i < endPos; i++) {\n\t\tlineBuffer.push_back(styler[i]);\n\t\tif (AtEOL(styler, i)) {\n\t\t\t// End of line (or of line buffer) met, colourise it\n\t\t\tColouriseYAMLLine(lineBuffer.data(), lineCurrent, lineBuffer.length(), startLine, i, *keywordLists[0], styler);\n\t\t\tlineBuffer.clear();\n\t\t\tstartLine = i + 1;\n\t\t\tlineCurrent++;\n\t\t}\n\t}\n\tif (!lineBuffer.empty()) {\t// Last line does not have ending characters\n\t\tColouriseYAMLLine(lineBuffer.data(), lineCurrent, lineBuffer.length(), startLine, startPos + length - 1, *keywordLists[0], styler);\n\t}\n}\n\nbool IsCommentLine(Sci_Position line, Accessor &styler) {\n\tconst Sci_Position pos = styler.LineStart(line);\n\tif (styler[pos] == '#')\n\t\treturn true;\n\treturn false;\n}\n\nvoid FoldYAMLDoc(Sci_PositionU startPos, Sci_Position length, int /*initStyle - unused*/,\n                      WordList *[], Accessor &styler) {\n\tconst Sci_Position maxPos = startPos + length;\n\tconst Sci_Position maxLines = styler.GetLine(maxPos - 1);             // Requested last line\n\tconst Sci_Position docLines = styler.GetLine(styler.Length() - 1);  // Available last line\n\n\t// property fold.comment.yaml\n\t// Set to 1 to allow folding of comment blocks in YAML.\n\tconst bool foldComment = styler.GetPropertyInt(\"fold.comment.yaml\") != 0;\n\n\t// Backtrack to previous non-blank line so we can determine indent level\n\t// for any white space lines\n\t// and so we can fix any preceding fold level (which is why we go back\n\t// at least one line in all cases)\n\tint spaceFlags = 0;\n\tSci_Position lineCurrent = styler.GetLine(startPos);\n\tint indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags, nullptr);\n\twhile (lineCurrent > 0) {\n\t\tlineCurrent--;\n\t\tindentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags, nullptr);\n\t\tif (!(indentCurrent & SC_FOLDLEVELWHITEFLAG) &&\n\t\t        (!IsCommentLine(lineCurrent, styler)))\n\t\t\tbreak;\n\t}\n\tint indentCurrentLevel = indentCurrent & SC_FOLDLEVELNUMBERMASK;\n\n\t// Set up initial loop state\n\tint prevComment = 0;\n\tif (lineCurrent >= 1)\n\t\tprevComment = foldComment && IsCommentLine(lineCurrent - 1, styler);\n\n\t// Process all characters to end of requested range\n\t// or comment that hangs over the end of the range.  Cap processing in all cases\n\t// to end of document (in case of unclosed comment at end).\n\twhile ((lineCurrent <= docLines) && ((lineCurrent <= maxLines) || prevComment)) {\n\n\t\t// Gather info\n\t\tint lev = indentCurrent;\n\t\tSci_Position lineNext = lineCurrent + 1;\n\t\tint indentNext = indentCurrent;\n\t\tif (lineNext <= docLines) {\n\t\t\t// Information about next line is only available if not at end of document\n\t\t\tindentNext = styler.IndentAmount(lineNext, &spaceFlags, nullptr);\n\t\t}\n\t\tconst int comment = foldComment && IsCommentLine(lineCurrent, styler);\n\t\tconst int comment_start = (comment && !prevComment && (lineNext <= docLines) &&\n\t\t                           IsCommentLine(lineNext, styler) && (lev > SC_FOLDLEVELBASE));\n\t\tconst int comment_continue = (comment && prevComment);\n\t\tif (!comment)\n\t\t\tindentCurrentLevel = indentCurrent & SC_FOLDLEVELNUMBERMASK;\n\t\tif (indentNext & SC_FOLDLEVELWHITEFLAG)\n\t\t\tindentNext = SC_FOLDLEVELWHITEFLAG | indentCurrentLevel;\n\n\t\tif (comment_start) {\n\t\t\t// Place fold point at start of a block of comments\n\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t} else if (comment_continue) {\n\t\t\t// Add level to rest of lines in the block\n\t\t\tlev = lev + 1;\n\t\t}\n\n\t\t// Skip past any blank lines for next indent level info; we skip also\n\t\t// comments (all comments, not just those starting in column 0)\n\t\t// which effectively folds them into surrounding code rather\n\t\t// than screwing up folding.\n\n\t\twhile ((lineNext < docLines) &&\n\t\t        ((indentNext & SC_FOLDLEVELWHITEFLAG) ||\n\t\t         (lineNext <= docLines && IsCommentLine(lineNext, styler)))) {\n\n\t\t\tlineNext++;\n\t\t\tindentNext = styler.IndentAmount(lineNext, &spaceFlags, nullptr);\n\t\t}\n\n\t\tconst int levelAfterComments = indentNext & SC_FOLDLEVELNUMBERMASK;\n\t\tconst int levelBeforeComments = Maximum(indentCurrentLevel,levelAfterComments);\n\n\t\t// Now set all the indent levels on the lines we skipped\n\t\t// Do this from end to start.  Once we encounter one line\n\t\t// which is indented more than the line after the end of\n\t\t// the comment-block, use the level of the block before\n\n\t\tSci_Position skipLine = lineNext;\n\t\tint skipLevel = levelAfterComments;\n\n\t\twhile (--skipLine > lineCurrent) {\n\t\t\tconst int skipLineIndent = styler.IndentAmount(skipLine, &spaceFlags, nullptr);\n\n\t\t\tif ((skipLineIndent & SC_FOLDLEVELNUMBERMASK) > levelAfterComments)\n\t\t\t\tskipLevel = levelBeforeComments;\n\n\t\t\tconst int whiteFlag = skipLineIndent & SC_FOLDLEVELWHITEFLAG;\n\n\t\t\tstyler.SetLevel(skipLine, skipLevel | whiteFlag);\n\t\t}\n\n\t\t// Set fold header on non-comment line\n\t\tif (!comment && !(indentCurrent & SC_FOLDLEVELWHITEFLAG) ) {\n\t\t\tif ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext & SC_FOLDLEVELNUMBERMASK))\n\t\t\t\tlev |= SC_FOLDLEVELHEADERFLAG;\n\t\t}\n\n\t\t// Keep track of block comment state of previous line\n\t\tprevComment = comment_start || comment_continue;\n\n\t\t// Set fold level for this line and move to next line\n\t\tstyler.SetLevel(lineCurrent, lev);\n\t\tindentCurrent = indentNext;\n\t\tlineCurrent = lineNext;\n\t}\n\n\t// NOTE: Cannot set level of last line here because indentCurrent doesn't have\n\t// header flag set; the loop above is crafted to take care of this case!\n\t//styler.SetLevel(lineCurrent, indentCurrent);\n}\n\n}\n\nLexerModule lmYAML(SCLEX_YAML, ColouriseYAMLDoc, \"yaml\", FoldYAMLDoc, yamlWordListDesc);\n"
  },
  {
    "path": "lexilla/lexlib/Accessor.cxx",
    "content": "// Scintilla source code edit control\n/** @file Accessor.cxx\n ** Interfaces between Scintilla and lexers.\n **/\n// Copyright 1998-2002 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <cstdlib>\n#include <cassert>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"PropSetSimple.h\"\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n\nusing namespace Lexilla;\n\nAccessor::Accessor(Scintilla::IDocument *pAccess_, PropSetSimple *pprops_) : LexAccessor(pAccess_), pprops(pprops_) {\n}\n\nint Accessor::GetPropertyInt(std::string_view key, int defaultValue) const {\n\treturn pprops->GetInt(key, defaultValue);\n}\n\nint Accessor::IndentAmount(Sci_Position line, int *flags, PFNIsCommentLeader pfnIsCommentLeader) {\n\tconst Sci_Position end = Length();\n\tint spaceFlags = 0;\n\n\t// Determines the indentation level of the current line and also checks for consistent\n\t// indentation compared to the previous line.\n\t// Indentation is judged consistent when the indentation whitespace of each line lines\n\t// the same or the indentation of one line is a prefix of the other.\n\n\tSci_Position pos = LineStart(line);\n\tchar ch = (*this)[pos];\n\tint indent = 0;\n\tbool inPrevPrefix = line > 0;\n\tSci_Position posPrev = inPrevPrefix ? LineStart(line-1) : 0;\n\twhile ((ch == ' ' || ch == '\\t') && (pos < end)) {\n\t\tif (inPrevPrefix) {\n\t\t\tconst char chPrev = (*this)[posPrev++];\n\t\t\tif (chPrev == ' ' || chPrev == '\\t') {\n\t\t\t\tif (chPrev != ch)\n\t\t\t\t\tspaceFlags |= wsInconsistent;\n\t\t\t} else {\n\t\t\t\tinPrevPrefix = false;\n\t\t\t}\n\t\t}\n\t\tif (ch == ' ') {\n\t\t\tspaceFlags |= wsSpace;\n\t\t\tindent++;\n\t\t} else {\t// Tab\n\t\t\tspaceFlags |= wsTab;\n\t\t\tif (spaceFlags & wsSpace)\n\t\t\t\tspaceFlags |= wsSpaceTab;\n\t\t\tindent = (indent / 8 + 1) * 8;\n\t\t}\n\t\tch = (*this)[++pos];\n\t}\n\n\t*flags = spaceFlags;\n\tindent += SC_FOLDLEVELBASE;\n\t// if completely empty line or the start of a comment...\n\tif ((LineStart(line) == Length()) || (ch == ' ' || ch == '\\t' || ch == '\\n' || ch == '\\r') ||\n\t\t\t(pfnIsCommentLeader && (*pfnIsCommentLeader)(*this, pos, end-pos)))\n\t\treturn indent | SC_FOLDLEVELWHITEFLAG;\n\telse\n\t\treturn indent;\n}\n"
  },
  {
    "path": "lexilla/lexlib/Accessor.h",
    "content": "// Scintilla source code edit control\n/** @file Accessor.h\n ** Interfaces between Scintilla and lexers.\n **/\n// Copyright 1998-2010 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#ifndef ACCESSOR_H\n#define ACCESSOR_H\n\nnamespace Lexilla {\n\nenum { wsSpace=1, wsTab=2, wsSpaceTab=4, wsInconsistent=8 };\n\nclass Accessor;\nclass WordList;\nclass PropSetSimple;\n\ntypedef bool (*PFNIsCommentLeader)(Accessor &styler, Sci_Position pos, Sci_Position len);\n\nclass Accessor : public LexAccessor {\npublic:\n\tPropSetSimple *pprops;\n\tAccessor(Scintilla::IDocument *pAccess_, PropSetSimple *pprops_);\n\tint GetPropertyInt(std::string_view key, int defaultValue=0) const;\n\tint IndentAmount(Sci_Position line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = nullptr);\n};\n\n}\n\n#endif\n"
  },
  {
    "path": "lexilla/lexlib/CatalogueModules.h",
    "content": "// Scintilla source code edit control\n/** @file CatalogueModules.h\n ** Lexer infrastructure.\n ** Contains a list of LexerModules which can be searched to find a module appropriate for a\n ** particular language.\n **/\n// Copyright 1998-2010 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#ifndef CATALOGUEMODULES_H\n#define CATALOGUEMODULES_H\n\nnamespace Lexilla {\n\nclass CatalogueModules {\n\tstd::vector<LexerModule *> lexerCatalogue;\npublic:\n\tconst LexerModule *Find(int language) const noexcept {\n\t\tfor (const LexerModule *lm : lexerCatalogue) {\n\t\t\tif (lm->GetLanguage() == language) {\n\t\t\t\treturn lm;\n\t\t\t}\n\t\t}\n\t\treturn nullptr;\n\t}\n\n\tconst LexerModule *Find(const char *languageName) const noexcept {\n\t\tif (languageName) {\n\t\t\tfor (const LexerModule *lm : lexerCatalogue) {\n\t\t\t\tif (lm->languageName && (0 == strcmp(lm->languageName, languageName))) {\n\t\t\t\t\treturn lm;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn nullptr;\n\t}\n\n\tvoid AddLexerModule(LexerModule *plm) {\n\t\tlexerCatalogue.push_back(plm);\n\t}\n\n\tvoid AddLexerModules(std::initializer_list<LexerModule *> modules) {\n\t\tlexerCatalogue.insert(lexerCatalogue.end(), modules);\n\t}\n\n\tsize_t Count() const noexcept {\n\t\treturn lexerCatalogue.size();\n\t}\n\n\tconst char *Name(size_t index) const noexcept {\n\t\tif (index < lexerCatalogue.size()) {\n\t\t\treturn lexerCatalogue[index]->languageName;\n\t\t}\n\t\treturn \"\";\n\t}\n\n\tLexerFactoryFunction Factory(size_t index) const noexcept {\n\t\t// Works for object lexers but not for function lexers\n\t\treturn lexerCatalogue[index]->fnFactory;\n\t}\n\n\tScintilla::ILexer5 *Create(size_t index) const {\n\t\tconst LexerModule *plm = lexerCatalogue[index];\n\t\tif (!plm) {\n\t\t\treturn nullptr;\n\t\t}\n\t\treturn plm->Create();\n\t}\n};\n\n}\n\n#endif\n"
  },
  {
    "path": "lexilla/lexlib/CharacterCategory.cxx",
    "content": "// Scintilla source code edit control\n/** @file CharacterCategory.cxx\n ** Returns the Unicode general category of a character.\n ** Table automatically regenerated by scripts/GenerateCharacterCategory.py\n ** Should only be rarely regenerated for new versions of Unicode.\n **/\n// Copyright 2013 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <vector>\n#include <algorithm>\n#include <iterator>\n\n#include \"CharacterCategory.h\"\n\nnamespace Lexilla {\n\nnamespace {\n\t// Use an unnamed namespace to protect the declarations from name conflicts\n\nconst int catRanges[] = {\n//++Autogenerated -- start of section automatically generated\n// Created with Python 3.12.0,  Unicode 15.0.0\n25,\n1046,\n1073,\n1171,\n1201,\n1293,\n1326,\n1361,\n1394,\n1425,\n1452,\n1489,\n1544,\n1873,\n1938,\n2033,\n2080,\n2925,\n2961,\n2990,\n3028,\n3051,\n3092,\n3105,\n3949,\n3986,\n4014,\n4050,\n4089,\n5142,\n5169,\n5203,\n5333,\n5361,\n5396,\n5429,\n5444,\n5487,\n5522,\n5562,\n5589,\n5620,\n5653,\n5682,\n5706,\n5780,\n5793,\n5841,\n5908,\n5930,\n5956,\n6000,\n6026,\n6129,\n6144,\n6898,\n6912,\n7137,\n7922,\n7937,\n8192,\n8225,\n8256,\n8289,\n8320,\n8353,\n8384,\n8417,\n8448,\n8481,\n8512,\n8545,\n8576,\n8609,\n8640,\n8673,\n8704,\n8737,\n8768,\n8801,\n8832,\n8865,\n8896,\n8929,\n8960,\n8993,\n9024,\n9057,\n9088,\n9121,\n9152,\n9185,\n9216,\n9249,\n9280,\n9313,\n9344,\n9377,\n9408,\n9441,\n9472,\n9505,\n9536,\n9569,\n9600,\n9633,\n9664,\n9697,\n9728,\n9761,\n9792,\n9825,\n9856,\n9889,\n9920,\n9953,\n10016,\n10049,\n10080,\n10113,\n10144,\n10177,\n10208,\n10241,\n10272,\n10305,\n10336,\n10369,\n10400,\n10433,\n10464,\n10497,\n10560,\n10593,\n10624,\n10657,\n10688,\n10721,\n10752,\n10785,\n10816,\n10849,\n10880,\n10913,\n10944,\n10977,\n11008,\n11041,\n11072,\n11105,\n11136,\n11169,\n11200,\n11233,\n11264,\n11297,\n11328,\n11361,\n11392,\n11425,\n11456,\n11489,\n11520,\n11553,\n11584,\n11617,\n11648,\n11681,\n11712,\n11745,\n11776,\n11809,\n11840,\n11873,\n11904,\n11937,\n11968,\n12001,\n12032,\n12097,\n12128,\n12161,\n12192,\n12225,\n12320,\n12385,\n12416,\n12449,\n12480,\n12545,\n12576,\n12673,\n12736,\n12865,\n12896,\n12961,\n12992,\n13089,\n13184,\n13249,\n13280,\n13345,\n13376,\n13409,\n13440,\n13473,\n13504,\n13569,\n13600,\n13633,\n13696,\n13729,\n13760,\n13825,\n13856,\n13953,\n13984,\n14017,\n14048,\n14113,\n14180,\n14208,\n14241,\n14340,\n14464,\n14498,\n14529,\n14560,\n14594,\n14625,\n14656,\n14690,\n14721,\n14752,\n14785,\n14816,\n14849,\n14880,\n14913,\n14944,\n14977,\n15008,\n15041,\n15072,\n15105,\n15136,\n15169,\n15200,\n15233,\n15296,\n15329,\n15360,\n15393,\n15424,\n15457,\n15488,\n15521,\n15552,\n15585,\n15616,\n15649,\n15680,\n15713,\n15744,\n15777,\n15808,\n15841,\n15904,\n15938,\n15969,\n16000,\n16033,\n16064,\n16161,\n16192,\n16225,\n16256,\n16289,\n16320,\n16353,\n16384,\n16417,\n16448,\n16481,\n16512,\n16545,\n16576,\n16609,\n16640,\n16673,\n16704,\n16737,\n16768,\n16801,\n16832,\n16865,\n16896,\n16929,\n16960,\n16993,\n17024,\n17057,\n17088,\n17121,\n17152,\n17185,\n17216,\n17249,\n17280,\n17313,\n17344,\n17377,\n17408,\n17441,\n17472,\n17505,\n17536,\n17569,\n17600,\n17633,\n17664,\n17697,\n17728,\n17761,\n17792,\n17825,\n17856,\n17889,\n17920,\n17953,\n17984,\n18017,\n18240,\n18305,\n18336,\n18401,\n18464,\n18497,\n18528,\n18657,\n18688,\n18721,\n18752,\n18785,\n18816,\n18849,\n18880,\n18913,\n21124,\n21153,\n22019,\n22612,\n22723,\n23124,\n23555,\n23732,\n23939,\n23988,\n24003,\n24052,\n24581,\n28160,\n28193,\n28224,\n28257,\n28291,\n28340,\n28352,\n28385,\n28445,\n28483,\n28513,\n28625,\n28640,\n28701,\n28820,\n28864,\n28913,\n28928,\n29053,\n29056,\n29117,\n29120,\n29185,\n29216,\n29789,\n29792,\n30081,\n31200,\n31233,\n31296,\n31393,\n31488,\n31521,\n31552,\n31585,\n31616,\n31649,\n31680,\n31713,\n31744,\n31777,\n31808,\n31841,\n31872,\n31905,\n31936,\n31969,\n32000,\n32033,\n32064,\n32097,\n32128,\n32161,\n32192,\n32225,\n32384,\n32417,\n32466,\n32480,\n32513,\n32544,\n32609,\n32672,\n34305,\n35840,\n35873,\n35904,\n35937,\n35968,\n36001,\n36032,\n36065,\n36096,\n36129,\n36160,\n36193,\n36224,\n36257,\n36288,\n36321,\n36352,\n36385,\n36416,\n36449,\n36480,\n36513,\n36544,\n36577,\n36608,\n36641,\n36672,\n36705,\n36736,\n36769,\n36800,\n36833,\n36864,\n36897,\n36949,\n36965,\n37127,\n37184,\n37217,\n37248,\n37281,\n37312,\n37345,\n37376,\n37409,\n37440,\n37473,\n37504,\n37537,\n37568,\n37601,\n37632,\n37665,\n37696,\n37729,\n37760,\n37793,\n37824,\n37857,\n37888,\n37921,\n37952,\n37985,\n38016,\n38049,\n38080,\n38113,\n38144,\n38177,\n38208,\n38241,\n38272,\n38305,\n38336,\n38369,\n38400,\n38433,\n38464,\n38497,\n38528,\n38561,\n38592,\n38625,\n38656,\n38689,\n38720,\n38753,\n38784,\n38817,\n38848,\n38881,\n38912,\n38977,\n39008,\n39041,\n39072,\n39105,\n39136,\n39169,\n39200,\n39233,\n39264,\n39297,\n39328,\n39361,\n39424,\n39457,\n39488,\n39521,\n39552,\n39585,\n39616,\n39649,\n39680,\n39713,\n39744,\n39777,\n39808,\n39841,\n39872,\n39905,\n39936,\n39969,\n40000,\n40033,\n40064,\n40097,\n40128,\n40161,\n40192,\n40225,\n40256,\n40289,\n40320,\n40353,\n40384,\n40417,\n40448,\n40481,\n40512,\n40545,\n40576,\n40609,\n40640,\n40673,\n40704,\n40737,\n40768,\n40801,\n40832,\n40865,\n40896,\n40929,\n40960,\n40993,\n41024,\n41057,\n41088,\n41121,\n41152,\n41185,\n41216,\n41249,\n41280,\n41313,\n41344,\n41377,\n41408,\n41441,\n41472,\n41505,\n41536,\n41569,\n41600,\n41633,\n41664,\n41697,\n41728,\n41761,\n41792,\n41825,\n41856,\n41889,\n41920,\n41953,\n41984,\n42017,\n42048,\n42081,\n42112,\n42145,\n42176,\n42209,\n42240,\n42273,\n42304,\n42337,\n42368,\n42401,\n42432,\n42465,\n42525,\n42528,\n43773,\n43811,\n43857,\n44033,\n45361,\n45388,\n45437,\n45493,\n45555,\n45597,\n45605,\n47052,\n47077,\n47121,\n47141,\n47217,\n47237,\n47313,\n47333,\n47389,\n47620,\n48509,\n48612,\n48753,\n48829,\n49178,\n49362,\n49457,\n49523,\n49553,\n49621,\n49669,\n50033,\n50074,\n50097,\n50180,\n51203,\n51236,\n51557,\n52232,\n52561,\n52676,\n52741,\n52772,\n55953,\n55972,\n56005,\n56250,\n56277,\n56293,\n56483,\n56549,\n56629,\n56645,\n56772,\n56840,\n57156,\n57269,\n57316,\n57361,\n57821,\n57850,\n57860,\n57893,\n57924,\n58885,\n59773,\n59812,\n62661,\n63012,\n63069,\n63496,\n63812,\n64869,\n65155,\n65237,\n65265,\n65347,\n65405,\n65445,\n65491,\n65540,\n66245,\n66371,\n66405,\n66691,\n66725,\n66819,\n66853,\n67037,\n67089,\n67581,\n67588,\n68389,\n68509,\n68561,\n68605,\n68612,\n68989,\n69124,\n69908,\n69924,\n70141,\n70170,\n70237,\n70405,\n70660,\n71971,\n72005,\n72794,\n72805,\n73830,\n73860,\n75589,\n75622,\n75653,\n75684,\n75718,\n75813,\n76070,\n76197,\n76230,\n76292,\n76325,\n76548,\n76869,\n76945,\n77000,\n77329,\n77347,\n77380,\n77861,\n77894,\n77981,\n77988,\n78269,\n78308,\n78397,\n78436,\n79165,\n79172,\n79421,\n79428,\n79485,\n79556,\n79709,\n79749,\n79780,\n79814,\n79909,\n80061,\n80102,\n80189,\n80230,\n80293,\n80324,\n80381,\n80614,\n80669,\n80772,\n80861,\n80868,\n80965,\n81053,\n81096,\n81412,\n81491,\n81546,\n81749,\n81779,\n81796,\n81841,\n81861,\n81917,\n81957,\n82022,\n82077,\n82084,\n82301,\n82404,\n82493,\n82532,\n83261,\n83268,\n83517,\n83524,\n83613,\n83620,\n83709,\n83716,\n83805,\n83845,\n83901,\n83910,\n84005,\n84093,\n84197,\n84285,\n84325,\n84445,\n84517,\n84573,\n84772,\n84925,\n84932,\n84989,\n85192,\n85509,\n85572,\n85669,\n85713,\n85757,\n86053,\n86118,\n86173,\n86180,\n86493,\n86500,\n86621,\n86628,\n87357,\n87364,\n87613,\n87620,\n87709,\n87716,\n87901,\n87941,\n87972,\n88006,\n88101,\n88285,\n88293,\n88358,\n88413,\n88422,\n88485,\n88541,\n88580,\n88637,\n89092,\n89157,\n89245,\n89288,\n89617,\n89651,\n89693,\n89892,\n89925,\n90141,\n90149,\n90182,\n90269,\n90276,\n90557,\n90596,\n90685,\n90724,\n91453,\n91460,\n91709,\n91716,\n91805,\n91812,\n91997,\n92037,\n92068,\n92102,\n92133,\n92166,\n92197,\n92349,\n92390,\n92477,\n92518,\n92581,\n92637,\n92837,\n92902,\n92957,\n93060,\n93149,\n93156,\n93253,\n93341,\n93384,\n93717,\n93732,\n93770,\n93981,\n94277,\n94308,\n94365,\n94372,\n94589,\n94660,\n94781,\n94788,\n94941,\n95012,\n95101,\n95108,\n95165,\n95172,\n95261,\n95332,\n95421,\n95492,\n95613,\n95684,\n96093,\n96198,\n96261,\n96294,\n96381,\n96454,\n96573,\n96582,\n96677,\n96733,\n96772,\n96829,\n96998,\n97053,\n97480,\n97802,\n97909,\n98099,\n98133,\n98173,\n98309,\n98342,\n98437,\n98468,\n98749,\n98756,\n98877,\n98884,\n99645,\n99652,\n100189,\n100229,\n100260,\n100293,\n100390,\n100541,\n100549,\n100669,\n100677,\n100829,\n101029,\n101117,\n101124,\n101245,\n101284,\n101341,\n101380,\n101445,\n101533,\n101576,\n101917,\n102129,\n102154,\n102389,\n102404,\n102437,\n102470,\n102545,\n102564,\n102845,\n102852,\n102973,\n102980,\n103741,\n103748,\n104093,\n104100,\n104285,\n104325,\n104356,\n104390,\n104421,\n104454,\n104637,\n104645,\n104678,\n104765,\n104774,\n104837,\n104925,\n105126,\n105213,\n105380,\n105469,\n105476,\n105541,\n105629,\n105672,\n106013,\n106020,\n106086,\n106141,\n106501,\n106566,\n106628,\n106941,\n106948,\n107069,\n107076,\n108389,\n108452,\n108486,\n108581,\n108733,\n108742,\n108861,\n108870,\n108965,\n108996,\n109045,\n109085,\n109188,\n109286,\n109322,\n109540,\n109637,\n109725,\n109768,\n110090,\n110389,\n110404,\n110621,\n110629,\n110662,\n110749,\n110756,\n111357,\n111428,\n112221,\n112228,\n112541,\n112548,\n112605,\n112644,\n112893,\n112965,\n113021,\n113126,\n113221,\n113341,\n113349,\n113405,\n113414,\n113693,\n113864,\n114205,\n114246,\n114321,\n114365,\n114724,\n116261,\n116292,\n116357,\n116605,\n116723,\n116740,\n116931,\n116965,\n117233,\n117256,\n117585,\n117661,\n118820,\n118909,\n118916,\n118973,\n118980,\n119165,\n119172,\n119965,\n119972,\n120029,\n120036,\n120357,\n120388,\n120453,\n120740,\n120797,\n120836,\n121021,\n121027,\n121085,\n121093,\n121341,\n121352,\n121693,\n121732,\n121885,\n122884,\n122933,\n123025,\n123509,\n123537,\n123573,\n123653,\n123733,\n123912,\n124234,\n124565,\n124581,\n124629,\n124645,\n124693,\n124709,\n124749,\n124782,\n124813,\n124846,\n124870,\n124932,\n125213,\n125220,\n126397,\n126501,\n126950,\n126981,\n127153,\n127173,\n127236,\n127397,\n127773,\n127781,\n128957,\n128981,\n129221,\n129269,\n129469,\n129493,\n129553,\n129717,\n129841,\n129917,\n131076,\n132454,\n132517,\n132646,\n132677,\n132870,\n132901,\n132966,\n133029,\n133092,\n133128,\n133457,\n133636,\n133830,\n133893,\n133956,\n134085,\n134180,\n134214,\n134308,\n134374,\n134596,\n134693,\n134820,\n135237,\n135270,\n135333,\n135398,\n135589,\n135620,\n135654,\n135688,\n136006,\n136101,\n136149,\n136192,\n137437,\n137440,\n137501,\n137632,\n137693,\n137729,\n139121,\n139139,\n139169,\n139268,\n149821,\n149828,\n149981,\n150020,\n150269,\n150276,\n150333,\n150340,\n150493,\n150532,\n151869,\n151876,\n152029,\n152068,\n153149,\n153156,\n153309,\n153348,\n153597,\n153604,\n153661,\n153668,\n153821,\n153860,\n154365,\n154372,\n156221,\n156228,\n156381,\n156420,\n158589,\n158629,\n158737,\n159018,\n159677,\n159748,\n160277,\n160605,\n160768,\n163549,\n163585,\n163805,\n163852,\n163876,\n183733,\n183761,\n183780,\n184342,\n184356,\n185197,\n185230,\n185277,\n185348,\n187761,\n187849,\n187940,\n188221,\n188420,\n188997,\n189094,\n189149,\n189412,\n190021,\n190086,\n190129,\n190205,\n190468,\n191045,\n191133,\n191492,\n191933,\n191940,\n192061,\n192069,\n192157,\n192516,\n194181,\n194246,\n194277,\n194502,\n194757,\n194790,\n194853,\n195217,\n195299,\n195345,\n195443,\n195460,\n195493,\n195549,\n195592,\n195933,\n196106,\n196445,\n196625,\n196812,\n196849,\n196965,\n197082,\n197093,\n197128,\n197469,\n197636,\n198755,\n198788,\n200509,\n200708,\n200869,\n200932,\n202021,\n202052,\n202109,\n202244,\n204509,\n204804,\n205821,\n205829,\n205926,\n206053,\n206118,\n206237,\n206342,\n206405,\n206438,\n206629,\n206749,\n206869,\n206909,\n206993,\n207048,\n207364,\n208349,\n208388,\n208573,\n208900,\n210333,\n210436,\n211293,\n211464,\n211786,\n211837,\n211925,\n212996,\n213733,\n213798,\n213861,\n213917,\n213969,\n214020,\n215718,\n215749,\n215782,\n215813,\n216061,\n216069,\n216102,\n216133,\n216166,\n216229,\n216486,\n216677,\n217021,\n217061,\n217096,\n217437,\n217608,\n217949,\n218129,\n218339,\n218385,\n218589,\n218629,\n219079,\n219109,\n219645,\n221189,\n221318,\n221348,\n222853,\n222886,\n222917,\n223078,\n223109,\n223142,\n223301,\n223334,\n223396,\n223677,\n223752,\n224081,\n224309,\n224613,\n224917,\n225201,\n225277,\n225285,\n225350,\n225380,\n226342,\n226373,\n226502,\n226565,\n226630,\n226661,\n226756,\n226824,\n227140,\n228549,\n228582,\n228613,\n228678,\n228773,\n228806,\n228837,\n228934,\n229021,\n229265,\n229380,\n230534,\n230789,\n231046,\n231109,\n231197,\n231281,\n231432,\n231773,\n231844,\n231944,\n232260,\n233219,\n233425,\n233473,\n233789,\n233984,\n235389,\n235424,\n235537,\n235805,\n236037,\n236145,\n236165,\n236582,\n236613,\n236836,\n236965,\n236996,\n237189,\n237220,\n237286,\n237317,\n237380,\n237437,\n237569,\n238979,\n240993,\n241411,\n241441,\n242531,\n243717,\n245760,\n245793,\n245824,\n245857,\n245888,\n245921,\n245952,\n245985,\n246016,\n246049,\n246080,\n246113,\n246144,\n246177,\n246208,\n246241,\n246272,\n246305,\n246336,\n246369,\n246400,\n246433,\n246464,\n246497,\n246528,\n246561,\n246592,\n246625,\n246656,\n246689,\n246720,\n246753,\n246784,\n246817,\n246848,\n246881,\n246912,\n246945,\n246976,\n247009,\n247040,\n247073,\n247104,\n247137,\n247168,\n247201,\n247232,\n247265,\n247296,\n247329,\n247360,\n247393,\n247424,\n247457,\n247488,\n247521,\n247552,\n247585,\n247616,\n247649,\n247680,\n247713,\n247744,\n247777,\n247808,\n247841,\n247872,\n247905,\n247936,\n247969,\n248000,\n248033,\n248064,\n248097,\n248128,\n248161,\n248192,\n248225,\n248256,\n248289,\n248320,\n248353,\n248384,\n248417,\n248448,\n248481,\n248512,\n248545,\n248576,\n248609,\n248640,\n248673,\n248704,\n248737,\n248768,\n248801,\n248832,\n248865,\n248896,\n248929,\n248960,\n248993,\n249024,\n249057,\n249088,\n249121,\n249152,\n249185,\n249216,\n249249,\n249280,\n249313,\n249344,\n249377,\n249408,\n249441,\n249472,\n249505,\n249536,\n249569,\n249600,\n249633,\n249664,\n249697,\n249728,\n249761,\n249792,\n249825,\n249856,\n249889,\n249920,\n249953,\n249984,\n250017,\n250048,\n250081,\n250112,\n250145,\n250176,\n250209,\n250240,\n250273,\n250304,\n250337,\n250368,\n250401,\n250432,\n250465,\n250496,\n250529,\n250816,\n250849,\n250880,\n250913,\n250944,\n250977,\n251008,\n251041,\n251072,\n251105,\n251136,\n251169,\n251200,\n251233,\n251264,\n251297,\n251328,\n251361,\n251392,\n251425,\n251456,\n251489,\n251520,\n251553,\n251584,\n251617,\n251648,\n251681,\n251712,\n251745,\n251776,\n251809,\n251840,\n251873,\n251904,\n251937,\n251968,\n252001,\n252032,\n252065,\n252096,\n252129,\n252160,\n252193,\n252224,\n252257,\n252288,\n252321,\n252352,\n252385,\n252416,\n252449,\n252480,\n252513,\n252544,\n252577,\n252608,\n252641,\n252672,\n252705,\n252736,\n252769,\n252800,\n252833,\n252864,\n252897,\n252928,\n252961,\n252992,\n253025,\n253056,\n253089,\n253120,\n253153,\n253184,\n253217,\n253248,\n253281,\n253312,\n253345,\n253376,\n253409,\n253440,\n253473,\n253504,\n253537,\n253568,\n253601,\n253632,\n253665,\n253696,\n253729,\n253760,\n253793,\n253824,\n253857,\n253888,\n253921,\n254208,\n254465,\n254685,\n254720,\n254941,\n254977,\n255232,\n255489,\n255744,\n256001,\n256221,\n256256,\n256477,\n256513,\n256797,\n256800,\n256861,\n256864,\n256925,\n256928,\n256989,\n256992,\n257025,\n257280,\n257537,\n258013,\n258049,\n258306,\n258561,\n258818,\n259073,\n259330,\n259585,\n259773,\n259777,\n259840,\n259970,\n260020,\n260033,\n260084,\n260161,\n260285,\n260289,\n260352,\n260482,\n260532,\n260609,\n260765,\n260801,\n260864,\n261021,\n261044,\n261121,\n261376,\n261556,\n261661,\n261697,\n261821,\n261825,\n261888,\n262018,\n262068,\n262141,\n262166,\n262522,\n262668,\n262865,\n262927,\n262960,\n262989,\n263023,\n263088,\n263117,\n263151,\n263185,\n263447,\n263480,\n263514,\n263670,\n263697,\n263983,\n264016,\n264049,\n264171,\n264241,\n264338,\n264365,\n264398,\n264433,\n264786,\n264817,\n264843,\n264881,\n265206,\n265242,\n265405,\n265434,\n265738,\n265763,\n265821,\n265866,\n266066,\n266157,\n266190,\n266211,\n266250,\n266578,\n266669,\n266702,\n266749,\n266755,\n267197,\n267283,\n268349,\n268805,\n269223,\n269349,\n269383,\n269477,\n269885,\n270357,\n270400,\n270453,\n270560,\n270613,\n270657,\n270688,\n270785,\n270848,\n270945,\n270997,\n271008,\n271061,\n271122,\n271136,\n271317,\n271488,\n271541,\n271552,\n271605,\n271616,\n271669,\n271680,\n271829,\n271841,\n271872,\n272001,\n272036,\n272161,\n272213,\n272257,\n272320,\n272402,\n272544,\n272577,\n272725,\n272754,\n272789,\n272833,\n272885,\n272906,\n273417,\n274528,\n274561,\n274601,\n274730,\n274773,\n274845,\n274962,\n275125,\n275282,\n275349,\n275474,\n275509,\n275570,\n275605,\n275666,\n275701,\n275922,\n275957,\n276946,\n277013,\n277074,\n277109,\n277138,\n277173,\n278162,\n286741,\n286989,\n287022,\n287053,\n287086,\n287125,\n287762,\n287829,\n288045,\n288078,\n288117,\n290706,\n290741,\n291698,\n292501,\n293778,\n293973,\n296189,\n296981,\n297341,\n297994,\n299925,\n302410,\n303125,\n308978,\n309013,\n309298,\n309333,\n311058,\n311317,\n314866,\n314901,\n322829,\n322862,\n322893,\n322926,\n322957,\n322990,\n323021,\n323054,\n323085,\n323118,\n323149,\n323182,\n323213,\n323246,\n323274,\n324245,\n325650,\n325805,\n325838,\n325874,\n326861,\n326894,\n326925,\n326958,\n326989,\n327022,\n327053,\n327086,\n327117,\n327150,\n327186,\n327701,\n335890,\n340077,\n340110,\n340141,\n340174,\n340205,\n340238,\n340269,\n340302,\n340333,\n340366,\n340397,\n340430,\n340461,\n340494,\n340525,\n340558,\n340589,\n340622,\n340653,\n340686,\n340717,\n340750,\n340786,\n342797,\n342830,\n342861,\n342894,\n342930,\n343949,\n343982,\n344018,\n352277,\n353810,\n354485,\n354546,\n354741,\n355997,\n356053,\n357085,\n357109,\n360448,\n361985,\n363520,\n363553,\n363584,\n363681,\n363744,\n363777,\n363808,\n363841,\n363872,\n363905,\n363936,\n364065,\n364096,\n364129,\n364192,\n364225,\n364419,\n364480,\n364577,\n364608,\n364641,\n364672,\n364705,\n364736,\n364769,\n364800,\n364833,\n364864,\n364897,\n364928,\n364961,\n364992,\n365025,\n365056,\n365089,\n365120,\n365153,\n365184,\n365217,\n365248,\n365281,\n365312,\n365345,\n365376,\n365409,\n365440,\n365473,\n365504,\n365537,\n365568,\n365601,\n365632,\n365665,\n365696,\n365729,\n365760,\n365793,\n365824,\n365857,\n365888,\n365921,\n365952,\n365985,\n366016,\n366049,\n366080,\n366113,\n366144,\n366177,\n366208,\n366241,\n366272,\n366305,\n366336,\n366369,\n366400,\n366433,\n366464,\n366497,\n366528,\n366561,\n366592,\n366625,\n366656,\n366689,\n366720,\n366753,\n366784,\n366817,\n366848,\n366881,\n366912,\n366945,\n366976,\n367009,\n367040,\n367073,\n367104,\n367137,\n367168,\n367201,\n367232,\n367265,\n367296,\n367329,\n367360,\n367393,\n367424,\n367457,\n367488,\n367521,\n367552,\n367585,\n367616,\n367649,\n367680,\n367713,\n367797,\n367968,\n368001,\n368032,\n368065,\n368101,\n368192,\n368225,\n368285,\n368433,\n368554,\n368593,\n368641,\n369885,\n369889,\n369949,\n370081,\n370141,\n370180,\n371997,\n372195,\n372241,\n372285,\n372709,\n372740,\n373501,\n373764,\n374013,\n374020,\n374269,\n374276,\n374525,\n374532,\n374781,\n374788,\n375037,\n375044,\n375293,\n375300,\n375549,\n375556,\n375805,\n375813,\n376849,\n376911,\n376944,\n376975,\n377008,\n377041,\n377135,\n377168,\n377201,\n377231,\n377264,\n377297,\n377580,\n377617,\n377676,\n377713,\n377743,\n377776,\n377809,\n377871,\n377904,\n377933,\n377966,\n377997,\n378030,\n378061,\n378094,\n378125,\n378158,\n378193,\n378339,\n378385,\n378700,\n378769,\n378892,\n378929,\n378957,\n378993,\n379413,\n379473,\n379565,\n379598,\n379629,\n379662,\n379693,\n379726,\n379757,\n379790,\n379820,\n379869,\n380949,\n381789,\n381813,\n384669,\n385045,\n391901,\n392725,\n393117,\n393238,\n393265,\n393365,\n393379,\n393412,\n393449,\n393485,\n393518,\n393549,\n393582,\n393613,\n393646,\n393677,\n393710,\n393741,\n393774,\n393813,\n393869,\n393902,\n393933,\n393966,\n393997,\n394030,\n394061,\n394094,\n394124,\n394157,\n394190,\n394261,\n394281,\n394565,\n394694,\n394764,\n394787,\n394965,\n395017,\n395107,\n395140,\n395185,\n395221,\n395293,\n395300,\n398077,\n398117,\n398196,\n398243,\n398308,\n398348,\n398372,\n401265,\n401283,\n401380,\n401437,\n401572,\n402973,\n402980,\n406013,\n406037,\n406090,\n406229,\n406532,\n407573,\n408733,\n409092,\n409621,\n410621,\n410634,\n410965,\n411914,\n412181,\n412202,\n412693,\n413706,\n414037,\n415274,\n415765,\n425988,\n636949,\n638980,\n1311395,\n1311428,\n1348029,\n1348117,\n1349885,\n1350148,\n1351427,\n1351633,\n1351684,\n1360259,\n1360305,\n1360388,\n1360904,\n1361220,\n1361309,\n1361920,\n1361953,\n1361984,\n1362017,\n1362048,\n1362081,\n1362112,\n1362145,\n1362176,\n1362209,\n1362240,\n1362273,\n1362304,\n1362337,\n1362368,\n1362401,\n1362432,\n1362465,\n1362496,\n1362529,\n1362560,\n1362593,\n1362624,\n1362657,\n1362688,\n1362721,\n1362752,\n1362785,\n1362816,\n1362849,\n1362880,\n1362913,\n1362944,\n1362977,\n1363008,\n1363041,\n1363072,\n1363105,\n1363136,\n1363169,\n1363200,\n1363233,\n1363264,\n1363297,\n1363328,\n1363361,\n1363396,\n1363429,\n1363463,\n1363569,\n1363589,\n1363921,\n1363939,\n1363968,\n1364001,\n1364032,\n1364065,\n1364096,\n1364129,\n1364160,\n1364193,\n1364224,\n1364257,\n1364288,\n1364321,\n1364352,\n1364385,\n1364416,\n1364449,\n1364480,\n1364513,\n1364544,\n1364577,\n1364608,\n1364641,\n1364672,\n1364705,\n1364736,\n1364769,\n1364800,\n1364833,\n1364867,\n1364933,\n1364996,\n1367241,\n1367557,\n1367633,\n1367837,\n1368084,\n1368803,\n1369108,\n1369152,\n1369185,\n1369216,\n1369249,\n1369280,\n1369313,\n1369344,\n1369377,\n1369408,\n1369441,\n1369472,\n1369505,\n1369536,\n1369569,\n1369664,\n1369697,\n1369728,\n1369761,\n1369792,\n1369825,\n1369856,\n1369889,\n1369920,\n1369953,\n1369984,\n1370017,\n1370048,\n1370081,\n1370112,\n1370145,\n1370176,\n1370209,\n1370240,\n1370273,\n1370304,\n1370337,\n1370368,\n1370401,\n1370432,\n1370465,\n1370496,\n1370529,\n1370560,\n1370593,\n1370624,\n1370657,\n1370688,\n1370721,\n1370752,\n1370785,\n1370816,\n1370849,\n1370880,\n1370913,\n1370944,\n1370977,\n1371008,\n1371041,\n1371072,\n1371105,\n1371136,\n1371169,\n1371200,\n1371233,\n1371264,\n1371297,\n1371328,\n1371361,\n1371392,\n1371425,\n1371456,\n1371489,\n1371520,\n1371553,\n1371584,\n1371617,\n1371651,\n1371681,\n1371936,\n1371969,\n1372000,\n1372033,\n1372064,\n1372129,\n1372160,\n1372193,\n1372224,\n1372257,\n1372288,\n1372321,\n1372352,\n1372385,\n1372419,\n1372468,\n1372512,\n1372545,\n1372576,\n1372609,\n1372644,\n1372672,\n1372705,\n1372736,\n1372769,\n1372864,\n1372897,\n1372928,\n1372961,\n1372992,\n1373025,\n1373056,\n1373089,\n1373120,\n1373153,\n1373184,\n1373217,\n1373248,\n1373281,\n1373312,\n1373345,\n1373376,\n1373409,\n1373440,\n1373473,\n1373504,\n1373665,\n1373696,\n1373857,\n1373888,\n1373921,\n1373952,\n1373985,\n1374016,\n1374049,\n1374080,\n1374113,\n1374144,\n1374177,\n1374208,\n1374241,\n1374272,\n1374305,\n1374336,\n1374465,\n1374496,\n1374529,\n1374589,\n1374720,\n1374753,\n1374813,\n1374817,\n1374877,\n1374881,\n1374912,\n1374945,\n1374976,\n1375009,\n1375069,\n1375811,\n1375904,\n1375937,\n1375972,\n1376003,\n1376065,\n1376100,\n1376325,\n1376356,\n1376453,\n1376484,\n1376613,\n1376644,\n1377382,\n1377445,\n1377510,\n1377557,\n1377669,\n1377725,\n1377802,\n1378005,\n1378067,\n1378101,\n1378141,\n1378308,\n1379985,\n1380125,\n1380358,\n1380420,\n1382022,\n1382533,\n1382621,\n1382865,\n1382920,\n1383261,\n1383429,\n1384004,\n1384209,\n1384292,\n1384337,\n1384356,\n1384421,\n1384456,\n1384772,\n1385669,\n1385937,\n1385988,\n1386725,\n1387078,\n1387165,\n1387505,\n1387524,\n1388477,\n1388549,\n1388646,\n1388676,\n1390181,\n1390214,\n1390277,\n1390406,\n1390469,\n1390534,\n1390641,\n1391069,\n1391075,\n1391112,\n1391453,\n1391569,\n1391620,\n1391781,\n1391811,\n1391844,\n1392136,\n1392452,\n1392637,\n1392644,\n1393957,\n1394150,\n1394213,\n1394278,\n1394341,\n1394429,\n1394692,\n1394789,\n1394820,\n1395077,\n1395110,\n1395165,\n1395208,\n1395549,\n1395601,\n1395716,\n1396227,\n1396260,\n1396469,\n1396548,\n1396582,\n1396613,\n1396646,\n1396676,\n1398277,\n1398308,\n1398341,\n1398436,\n1398501,\n1398564,\n1398725,\n1398788,\n1398821,\n1398852,\n1398909,\n1399652,\n1399715,\n1399761,\n1399812,\n1400166,\n1400197,\n1400262,\n1400337,\n1400388,\n1400419,\n1400486,\n1400517,\n1400573,\n1400868,\n1401085,\n1401124,\n1401341,\n1401380,\n1401597,\n1401860,\n1402109,\n1402116,\n1402365,\n1402369,\n1403764,\n1403779,\n1403905,\n1404195,\n1404244,\n1404317,\n1404417,\n1406980,\n1408102,\n1408165,\n1408198,\n1408261,\n1408294,\n1408369,\n1408390,\n1408421,\n1408477,\n1408520,\n1408861,\n1409028,\n1766557,\n1766916,\n1767677,\n1767780,\n1769373,\n1769499,\n1835036,\n2039812,\n2051549,\n2051588,\n2055005,\n2056193,\n2056445,\n2056801,\n2056989,\n2057124,\n2057157,\n2057188,\n2057522,\n2057540,\n2057981,\n2057988,\n2058173,\n2058180,\n2058237,\n2058244,\n2058333,\n2058340,\n2058429,\n2058436,\n2061908,\n2062461,\n2062948,\n2074574,\n2074605,\n2074645,\n2075140,\n2077213,\n2077252,\n2079005,\n2079221,\n2079261,\n2080260,\n2080659,\n2080693,\n2080773,\n2081297,\n2081517,\n2081550,\n2081585,\n2081629,\n2081797,\n2082321,\n2082348,\n2082411,\n2082477,\n2082510,\n2082541,\n2082574,\n2082605,\n2082638,\n2082669,\n2082702,\n2082733,\n2082766,\n2082797,\n2082830,\n2082861,\n2082894,\n2082925,\n2082958,\n2082993,\n2083053,\n2083086,\n2083121,\n2083243,\n2083345,\n2083453,\n2083473,\n2083596,\n2083629,\n2083662,\n2083693,\n2083726,\n2083757,\n2083790,\n2083825,\n2083922,\n2083948,\n2083986,\n2084093,\n2084113,\n2084147,\n2084177,\n2084253,\n2084356,\n2084541,\n2084548,\n2088893,\n2088954,\n2088989,\n2089009,\n2089107,\n2089137,\n2089229,\n2089262,\n2089297,\n2089330,\n2089361,\n2089388,\n2089425,\n2089480,\n2089809,\n2089874,\n2089969,\n2090016,\n2090861,\n2090897,\n2090926,\n2090964,\n2090987,\n2091028,\n2091041,\n2091885,\n2091922,\n2091950,\n2091986,\n2092013,\n2092046,\n2092081,\n2092109,\n2092142,\n2092177,\n2092228,\n2092547,\n2092580,\n2094019,\n2094084,\n2095101,\n2095172,\n2095389,\n2095428,\n2095645,\n2095684,\n2095901,\n2095940,\n2096061,\n2096147,\n2096210,\n2096244,\n2096277,\n2096307,\n2096381,\n2096405,\n2096434,\n2096565,\n2096637,\n2096954,\n2097045,\n2097117,\n2097156,\n2097565,\n2097572,\n2098429,\n2098436,\n2099069,\n2099076,\n2099165,\n2099172,\n2099677,\n2099716,\n2100189,\n2101252,\n2105213,\n2105361,\n2105469,\n2105578,\n2107037,\n2107125,\n2107401,\n2109098,\n2109237,\n2109770,\n2109845,\n2109949,\n2109973,\n2110397,\n2110485,\n2110525,\n2112021,\n2113445,\n2113501,\n2117636,\n2118589,\n2118660,\n2120253,\n2120709,\n2120746,\n2121629,\n2121732,\n2122762,\n2122909,\n2123172,\n2123817,\n2123844,\n2124105,\n2124157,\n2124292,\n2125509,\n2125693,\n2125828,\n2126813,\n2126833,\n2126852,\n2128029,\n2128132,\n2128401,\n2128425,\n2128605,\n2129920,\n2131201,\n2132484,\n2135005,\n2135048,\n2135389,\n2135552,\n2136733,\n2136833,\n2138013,\n2138116,\n2139421,\n2139652,\n2141341,\n2141681,\n2141696,\n2142077,\n2142080,\n2142589,\n2142592,\n2142845,\n2142848,\n2142941,\n2142945,\n2143325,\n2143329,\n2143837,\n2143841,\n2144093,\n2144097,\n2144189,\n2146308,\n2156285,\n2156548,\n2157277,\n2157572,\n2157853,\n2158595,\n2158813,\n2158819,\n2160189,\n2160195,\n2160509,\n2162692,\n2162909,\n2162948,\n2163005,\n2163012,\n2164445,\n2164452,\n2164541,\n2164612,\n2164669,\n2164708,\n2165469,\n2165489,\n2165514,\n2165764,\n2166517,\n2166570,\n2166788,\n2167805,\n2168042,\n2168349,\n2169860,\n2170493,\n2170500,\n2170589,\n2170730,\n2170884,\n2171594,\n2171805,\n2171889,\n2171908,\n2172765,\n2172913,\n2172957,\n2174980,\n2176797,\n2176906,\n2176964,\n2177034,\n2177565,\n2177610,\n2179076,\n2179109,\n2179229,\n2179237,\n2179325,\n2179461,\n2179588,\n2179741,\n2179748,\n2179869,\n2179876,\n2180829,\n2180869,\n2180989,\n2181093,\n2181130,\n2181437,\n2181649,\n2181949,\n2182148,\n2183082,\n2183153,\n2183172,\n2184106,\n2184221,\n2185220,\n2185493,\n2185508,\n2186405,\n2186493,\n2186602,\n2186769,\n2187005,\n2187268,\n2189021,\n2189105,\n2189316,\n2190045,\n2190090,\n2190340,\n2190973,\n2191114,\n2191364,\n2191965,\n2192177,\n2192317,\n2192682,\n2192925,\n2195460,\n2197821,\n2199552,\n2201213,\n2201601,\n2203261,\n2203466,\n2203652,\n2204805,\n2204957,\n2205192,\n2205533,\n2214922,\n2215933,\n2215940,\n2217309,\n2217317,\n2217388,\n2217437,\n2217476,\n2217565,\n2219941,\n2220036,\n2220970,\n2221284,\n2221341,\n2221572,\n2222277,\n2222634,\n2222769,\n2222941,\n2223620,\n2224197,\n2224337,\n2224477,\n2225668,\n2226346,\n2226589,\n2227204,\n2227965,\n2228230,\n2228261,\n2228294,\n2228324,\n2230021,\n2230513,\n2230749,\n2230858,\n2231496,\n2231813,\n2231844,\n2231909,\n2231972,\n2232029,\n2232293,\n2232390,\n2232420,\n2233862,\n2233957,\n2234086,\n2234149,\n2234225,\n2234298,\n2234321,\n2234437,\n2234493,\n2234810,\n2234845,\n2234884,\n2235709,\n2235912,\n2236253,\n2236421,\n2236516,\n2237669,\n2237830,\n2237861,\n2238141,\n2238152,\n2238481,\n2238596,\n2238630,\n2238692,\n2238749,\n2238980,\n2240101,\n2240145,\n2240196,\n2240253,\n2240517,\n2240582,\n2240612,\n2242150,\n2242245,\n2242534,\n2242596,\n2242737,\n2242853,\n2242993,\n2243014,\n2243045,\n2243080,\n2243396,\n2243441,\n2243460,\n2243505,\n2243613,\n2243626,\n2244285,\n2244612,\n2245213,\n2245220,\n2246022,\n2246117,\n2246214,\n2246277,\n2246310,\n2246341,\n2246417,\n2246597,\n2246628,\n2246693,\n2246749,\n2248708,\n2248957,\n2248964,\n2249021,\n2249028,\n2249181,\n2249188,\n2249693,\n2249700,\n2250033,\n2250077,\n2250244,\n2251749,\n2251782,\n2251877,\n2252157,\n2252296,\n2252637,\n2252805,\n2252870,\n2252957,\n2252964,\n2253245,\n2253284,\n2253373,\n2253412,\n2254141,\n2254148,\n2254397,\n2254404,\n2254493,\n2254500,\n2254685,\n2254693,\n2254756,\n2254790,\n2254853,\n2254886,\n2255037,\n2255078,\n2255165,\n2255206,\n2255325,\n2255364,\n2255421,\n2255590,\n2255645,\n2255780,\n2255942,\n2256029,\n2256069,\n2256317,\n2256389,\n2256573,\n2260996,\n2262694,\n2262789,\n2263046,\n2263109,\n2263206,\n2263237,\n2263268,\n2263409,\n2263560,\n2263889,\n2263965,\n2263985,\n2264005,\n2264036,\n2264157,\n2265092,\n2266630,\n2266725,\n2266918,\n2266949,\n2266982,\n2267109,\n2267174,\n2267205,\n2267268,\n2267345,\n2267364,\n2267421,\n2267656,\n2267997,\n2273284,\n2274790,\n2274885,\n2275037,\n2275078,\n2275205,\n2275270,\n2275301,\n2275377,\n2276100,\n2276229,\n2276317,\n2277380,\n2278918,\n2279013,\n2279270,\n2279333,\n2279366,\n2279397,\n2279473,\n2279556,\n2279613,\n2279944,\n2280285,\n2280465,\n2280893,\n2281476,\n2282853,\n2282886,\n2282917,\n2282950,\n2283013,\n2283206,\n2283237,\n2283268,\n2283313,\n2283357,\n2283528,\n2283869,\n2285572,\n2286461,\n2286501,\n2286598,\n2286661,\n2286790,\n2286821,\n2287005,\n2287112,\n2287434,\n2287505,\n2287605,\n2287620,\n2287869,\n2293764,\n2295174,\n2295269,\n2295558,\n2295589,\n2295665,\n2295709,\n2298880,\n2299905,\n2300936,\n2301258,\n2301565,\n2301924,\n2302205,\n2302244,\n2302301,\n2302340,\n2302621,\n2302628,\n2302717,\n2302724,\n2303494,\n2303709,\n2303718,\n2303805,\n2303845,\n2303910,\n2303941,\n2303972,\n2304006,\n2304036,\n2304070,\n2304101,\n2304145,\n2304253,\n2304520,\n2304861,\n2307076,\n2307357,\n2307396,\n2308646,\n2308741,\n2308893,\n2308933,\n2308998,\n2309125,\n2309156,\n2309201,\n2309220,\n2309254,\n2309309,\n2310148,\n2310181,\n2310500,\n2311781,\n2311974,\n2312004,\n2312037,\n2312177,\n2312421,\n2312477,\n2312708,\n2312741,\n2312934,\n2312997,\n2313092,\n2314565,\n2314982,\n2315013,\n2315089,\n2315172,\n2315217,\n2315389,\n2315780,\n2318141,\n2318353,\n2318685,\n2326532,\n2326845,\n2326852,\n2328038,\n2328069,\n2328317,\n2328325,\n2328518,\n2328549,\n2328580,\n2328625,\n2328797,\n2329096,\n2329418,\n2330045,\n2330129,\n2330180,\n2331165,\n2331205,\n2331933,\n2331942,\n2331973,\n2332198,\n2332229,\n2332294,\n2332325,\n2332413,\n2334724,\n2334973,\n2334980,\n2335069,\n2335076,\n2336293,\n2336509,\n2336581,\n2336637,\n2336645,\n2336733,\n2336741,\n2336964,\n2336997,\n2337053,\n2337288,\n2337629,\n2337796,\n2338013,\n2338020,\n2338109,\n2338116,\n2339142,\n2339325,\n2339333,\n2339421,\n2339430,\n2339493,\n2339526,\n2339557,\n2339588,\n2339645,\n2339848,\n2340189,\n2350084,\n2350693,\n2350758,\n2350833,\n2350909,\n2351109,\n2351172,\n2351206,\n2351236,\n2351677,\n2351684,\n2352774,\n2352837,\n2353021,\n2353094,\n2353157,\n2353190,\n2353221,\n2353265,\n2353672,\n2354013,\n2356740,\n2356797,\n2357258,\n2357941,\n2358195,\n2358325,\n2358877,\n2359281,\n2359300,\n2388829,\n2392073,\n2395645,\n2395665,\n2395837,\n2396164,\n2402461,\n2486788,\n2489905,\n2489981,\n2490372,\n2524698,\n2525189,\n2525220,\n2525413,\n2525917,\n2654212,\n2672893,\n2949124,\n2967357,\n2967556,\n2968573,\n2968584,\n2968925,\n2969041,\n2969092,\n2971645,\n2971656,\n2971997,\n2972164,\n2973149,\n2973189,\n2973361,\n2973405,\n2973700,\n2975237,\n2975473,\n2975637,\n2975747,\n2975889,\n2975925,\n2975965,\n2976264,\n2976605,\n2976618,\n2976861,\n2976868,\n2977565,\n2977700,\n2978333,\n3000320,\n3001345,\n3002378,\n3003121,\n3003261,\n3006468,\n3008893,\n3008997,\n3009028,\n3009062,\n3010845,\n3011045,\n3011171,\n3011613,\n3013635,\n3013713,\n3013731,\n3013765,\n3013821,\n3014150,\n3014237,\n3014660,\n3211037,\n3211268,\n3250909,\n3252228,\n3252541,\n3538435,\n3538589,\n3538595,\n3538845,\n3538851,\n3538941,\n3538948,\n3548285,\n3548740,\n3548797,\n3549700,\n3549821,\n3549860,\n3549917,\n3550340,\n3550493,\n3550724,\n3563421,\n3637252,\n3640701,\n3640836,\n3641277,\n3641348,\n3641661,\n3641860,\n3642205,\n3642261,\n3642277,\n3642353,\n3642394,\n3642525,\n3792901,\n3794397,\n3794437,\n3795197,\n3795477,\n3799197,\n3801109,\n3808989,\n3809301,\n3810557,\n3810613,\n3812518,\n3812581,\n3812693,\n3812774,\n3812986,\n3813221,\n3813493,\n3813541,\n3813781,\n3814725,\n3814869,\n3816829,\n3817493,\n3819589,\n3819701,\n3819741,\n3823626,\n3824285,\n3824650,\n3825309,\n3825685,\n3828477,\n3828746,\n3829565,\n3833856,\n3834689,\n3835520,\n3836353,\n3836605,\n3836609,\n3837184,\n3838017,\n3838848,\n3838909,\n3838912,\n3839005,\n3839040,\n3839101,\n3839136,\n3839229,\n3839264,\n3839421,\n3839424,\n3839681,\n3839837,\n3839841,\n3839901,\n3839905,\n3840157,\n3840161,\n3840512,\n3841345,\n3842176,\n3842269,\n3842272,\n3842429,\n3842464,\n3842749,\n3842752,\n3843005,\n3843009,\n3843840,\n3843933,\n3843936,\n3844093,\n3844096,\n3844285,\n3844288,\n3844349,\n3844416,\n3844669,\n3844673,\n3845504,\n3846337,\n3847168,\n3848001,\n3848832,\n3849665,\n3850496,\n3851329,\n3852160,\n3852993,\n3853824,\n3854657,\n3855581,\n3855616,\n3856434,\n3856449,\n3857266,\n3857281,\n3857472,\n3858290,\n3858305,\n3859122,\n3859137,\n3859328,\n3860146,\n3860161,\n3860978,\n3860993,\n3861184,\n3862002,\n3862017,\n3862834,\n3862849,\n3863040,\n3863858,\n3863873,\n3864690,\n3864705,\n3864896,\n3864929,\n3864989,\n3865032,\n3866645,\n3883013,\n3884789,\n3884901,\n3886517,\n3886757,\n3886805,\n3887237,\n3887285,\n3887345,\n3887517,\n3887973,\n3888157,\n3888165,\n3888669,\n3923969,\n3924292,\n3924321,\n3924989,\n3925153,\n3925373,\n3932165,\n3932413,\n3932421,\n3932989,\n3933029,\n3933277,\n3933285,\n3933373,\n3933381,\n3933565,\n3933699,\n3935709,\n3936741,\n3936797,\n3940356,\n3941821,\n3941893,\n3942115,\n3942365,\n3942408,\n3942749,\n3942852,\n3942901,\n3942941,\n3953156,\n3954117,\n3954173,\n3954692,\n3956101,\n3956232,\n3956573,\n3956723,\n3956765,\n3971588,\n3972451,\n3972485,\n3972616,\n3972957,\n3996676,\n3996925,\n3996932,\n3997085,\n3997092,\n3997181,\n3997188,\n3997693,\n3997700,\n4004029,\n4004074,\n4004357,\n4004605,\n4005888,\n4006977,\n4008069,\n4008291,\n4008349,\n4008456,\n4008797,\n4008913,\n4008989,\n4034090,\n4035989,\n4036010,\n4036115,\n4036138,\n4036285,\n4038698,\n4040149,\n4040170,\n4040669,\n4046852,\n4047005,\n4047012,\n4047901,\n4047908,\n4047997,\n4048004,\n4048061,\n4048100,\n4048157,\n4048164,\n4048509,\n4048516,\n4048669,\n4048676,\n4048733,\n4048740,\n4048797,\n4048964,\n4049021,\n4049124,\n4049181,\n4049188,\n4049245,\n4049252,\n4049309,\n4049316,\n4049437,\n4049444,\n4049533,\n4049540,\n4049597,\n4049636,\n4049693,\n4049700,\n4049757,\n4049764,\n4049821,\n4049828,\n4049885,\n4049892,\n4049949,\n4049956,\n4050045,\n4050052,\n4050109,\n4050148,\n4050301,\n4050308,\n4050557,\n4050564,\n4050717,\n4050724,\n4050877,\n4050884,\n4050941,\n4050948,\n4051293,\n4051300,\n4051869,\n4052004,\n4052125,\n4052132,\n4052317,\n4052324,\n4052893,\n4054546,\n4054621,\n4063253,\n4064669,\n4064789,\n4067997,\n4068373,\n4068861,\n4068917,\n4069405,\n4069429,\n4069917,\n4069941,\n4071133,\n4071434,\n4071861,\n4077021,\n4078805,\n4079741,\n4080149,\n4081565,\n4081685,\n4081981,\n4082197,\n4082269,\n4082709,\n4082909,\n4087829,\n4095860,\n4096021,\n4119325,\n4119445,\n4119997,\n4120085,\n4120509,\n4120597,\n4124413,\n4124533,\n4127581,\n4127765,\n4128157,\n4128277,\n4128317,\n4128789,\n4129181,\n4129301,\n4131101,\n4131349,\n4131677,\n4131861,\n4133149,\n4133397,\n4134365,\n4134421,\n4134493,\n4136981,\n4147869,\n4148245,\n4148701,\n4148757,\n4149181,\n4149269,\n4149565,\n4149781,\n4151261,\n4151285,\n4151517,\n4151765,\n4152221,\n4152341,\n4152637,\n4152853,\n4153149,\n4153365,\n4158077,\n4158101,\n4159869,\n4161032,\n4161373,\n4194308,\n5561373,\n5562372,\n5695325,\n5695492,\n5702621,\n5702660,\n5887069,\n5887492,\n6126653,\n6225924,\n6243293,\n6291460,\n6449533,\n6449668,\n6583837,\n29360186,\n29360221,\n29361178,\n29364253,\n29368325,\n29376029,\n31457308,\n33554397,\n33554460,\n35651549,\n35651613,\n//--Autogenerated -- end of section automatically generated\n};\n\nconstexpr int maxUnicode = 0x10ffff;\nconstexpr int maskCategory = 0x1F;\n\n}\n\n// Each element in catRanges is the start of a range of Unicode characters in\n// one general category.\n// The value is comprised of a 21-bit character value shifted 5 bits and a 5 bit\n// category matching the CharacterCategory enumeration.\n// Initial version has 3249 entries and adds about 13K to the executable.\n// The array is in ascending order so can be searched using binary search.\n// Therefore the average call takes log2(3249) = 12 comparisons.\n// For speed, it may be useful to make a linear table for the common values,\n// possibly for 0..0xff for most Western European text or 0..0xfff for most\n// alphabetic languages.\n\nCharacterCategory CategoriseCharacter(int character) noexcept {\n\tif (character < 0 || character > maxUnicode)\n\t\treturn ccCn;\n\tconst int baseValue = character * (maskCategory+1) + maskCategory;\n\ttry {\n\t\t// lower_bound will never throw with these args but its not marked noexcept so add catch to pretend.\n\t\tconst int *placeAfter = std::lower_bound(catRanges, std::end(catRanges), baseValue);\n\t\treturn static_cast<CharacterCategory>(*(placeAfter - 1) & maskCategory);\n\t} catch (...) {\n\t\treturn ccCn;\n\t}\n}\n\n// Implementation of character sets recommended for identifiers in Unicode Standard Annex #31.\n// http://unicode.org/reports/tr31/\n\nnamespace {\n\nenum class OtherID { oidNone, oidStart, oidContinue };\n\n// Some characters are treated as valid for identifiers even\n// though most characters from their category are not.\n// Values copied from http://www.unicode.org/Public/9.0.0/ucd/PropList.txt\nOtherID OtherIDOfCharacter(int character) noexcept {\n\tif (\n\t\t(character == 0x1885) ||\t// MONGOLIAN LETTER ALI GALI BALUDA\n\t\t(character == 0x1886) ||\t// MONGOLIAN LETTER ALI GALI THREE BALUDA\n\t\t(character == 0x2118) ||\t// SCRIPT CAPITAL P\n\t\t(character == 0x212E) ||\t// ESTIMATED SYMBOL\n\t\t(character == 0x309B) ||\t// KATAKANA-HIRAGANA VOICED SOUND MARK\n\t\t(character == 0x309C)) {\t// KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK\n\t\treturn OtherID::oidStart;\n\t} else if (\n\t\t(character == 0x00B7) ||\t// MIDDLE DOT\n\t\t(character == 0x0387) ||\t// GREEK ANO TELEIA\n\t\t((character >= 0x1369) && (character <= 0x1371)) ||\t// ETHIOPIC DIGIT ONE..ETHIOPIC DIGIT NINE\n\t\t(character == 0x19DA)) {\t// NEW TAI LUE THAM DIGIT ONE\n\t\treturn OtherID::oidContinue;\n\t} else {\n\t\treturn OtherID::oidNone;\n\t}\n}\n\n// Determine if a character is in  Ll|Lu|Lt|Lm|Lo|Nl|Mn|Mc|Nd|Pc and has\n// Pattern_Syntax|Pattern_White_Space.\n// As of Unicode 9, only VERTICAL TILDE which is in Lm and has Pattern_Syntax matches.\n// Should really generate from PropList.txt a list of Pattern_Syntax and Pattern_White_Space.\nconstexpr bool IsIdPattern(int character) noexcept {\n\treturn character == 0x2E2F;\n}\n\nbool OmitXidStart(int character) noexcept {\n\tswitch (character) {\n\tcase 0x037A:\t// GREEK YPOGEGRAMMENI\n\tcase 0x0E33:\t// THAI CHARACTER SARA AM\n\tcase 0x0EB3:\t// LAO VOWEL SIGN AM\n\tcase 0x309B:\t// KATAKANA-HIRAGANA VOICED SOUND MARK\n\tcase 0x309C:\t// KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK\n\tcase 0xFC5E:\t// ARABIC LIGATURE SHADDA WITH DAMMATAN ISOLATED FORM\n\tcase 0xFC5F:\t// ARABIC LIGATURE SHADDA WITH KASRATAN ISOLATED FORM\n\tcase 0xFC60:\t// ARABIC LIGATURE SHADDA WITH FATHA ISOLATED FORM\n\tcase 0xFC61:\t// ARABIC LIGATURE SHADDA WITH DAMMA ISOLATED FORM\n\tcase 0xFC62:\t// ARABIC LIGATURE SHADDA WITH KASRA ISOLATED FORM\n\tcase 0xFC63:\t// ARABIC LIGATURE SHADDA WITH SUPERSCRIPT ALEF ISOLATED FORM\n\tcase 0xFDFA:\t// ARABIC LIGATURE SALLALLAHOU ALAYHE WASALLAM\n\tcase 0xFDFB:\t// ARABIC LIGATURE JALLAJALALOUHOU\n\tcase 0xFE70:\t// ARABIC FATHATAN ISOLATED FORM\n\tcase 0xFE72:\t// ARABIC DAMMATAN ISOLATED FORM\n\tcase 0xFE74:\t// ARABIC KASRATAN ISOLATED FORM\n\tcase 0xFE76:\t// ARABIC FATHA ISOLATED FORM\n\tcase 0xFE78:\t// ARABIC DAMMA ISOLATED FORM\n\tcase 0xFE7A:\t// ARABIC KASRA ISOLATED FORM\n\tcase 0xFE7C:\t// ARABIC SHADDA ISOLATED FORM\n\tcase 0xFE7E:\t// ARABIC SUKUN ISOLATED FORM\n\tcase 0xFF9E:\t// HALFWIDTH KATAKANA VOICED SOUND MARK\n\tcase 0xFF9F:\t// HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK\n\t\treturn true;\n\tdefault:\n\t\treturn false;\n\t}\n}\n\nbool OmitXidContinue(int character) noexcept {\n\tswitch (character) {\n\tcase 0x037A:\t// GREEK YPOGEGRAMMENI\n\tcase 0x309B:\t// KATAKANA-HIRAGANA VOICED SOUND MARK\n\tcase 0x309C:\t// KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK\n\tcase 0xFC5E:\t// ARABIC LIGATURE SHADDA WITH DAMMATAN ISOLATED FORM\n\tcase 0xFC5F:\t// ARABIC LIGATURE SHADDA WITH KASRATAN ISOLATED FORM\n\tcase 0xFC60:\t// ARABIC LIGATURE SHADDA WITH FATHA ISOLATED FORM\n\tcase 0xFC61:\t// ARABIC LIGATURE SHADDA WITH DAMMA ISOLATED FORM\n\tcase 0xFC62:\t// ARABIC LIGATURE SHADDA WITH KASRA ISOLATED FORM\n\tcase 0xFC63:\t// ARABIC LIGATURE SHADDA WITH SUPERSCRIPT ALEF ISOLATED FORM\n\tcase 0xFDFA:\t// ARABIC LIGATURE SALLALLAHOU ALAYHE WASALLAM\n\tcase 0xFDFB:\t// ARABIC LIGATURE JALLAJALALOUHOU\n\tcase 0xFE70:\t// ARABIC FATHATAN ISOLATED FORM\n\tcase 0xFE72:\t// ARABIC DAMMATAN ISOLATED FORM\n\tcase 0xFE74:\t// ARABIC KASRATAN ISOLATED FORM\n\tcase 0xFE76:\t// ARABIC FATHA ISOLATED FORM\n\tcase 0xFE78:\t// ARABIC DAMMA ISOLATED FORM\n\tcase 0xFE7A:\t// ARABIC KASRA ISOLATED FORM\n\tcase 0xFE7C:\t// ARABIC SHADDA ISOLATED FORM\n\tcase 0xFE7E:\t// ARABIC SUKUN ISOLATED FORM\n\t\treturn true;\n\tdefault:\n\t\treturn false;\n\t}\n}\n\n}\n\n// UAX #31 defines ID_Start as\n// [[:L:][:Nl:][:Other_ID_Start:]--[:Pattern_Syntax:]--[:Pattern_White_Space:]]\nbool IsIdStart(int character) noexcept {\n\tif (IsIdPattern(character)) {\n\t\treturn false;\n\t}\n\tconst OtherID oid = OtherIDOfCharacter(character);\n\tif (oid == OtherID::oidStart) {\n\t\treturn true;\n\t}\n\tconst CharacterCategory c = CategoriseCharacter(character);\n\treturn (c == ccLl || c == ccLu || c == ccLt || c == ccLm || c == ccLo\n\t\t|| c == ccNl);\n}\n\n// UAX #31 defines ID_Continue as\n// [[:ID_Start:][:Mn:][:Mc:][:Nd:][:Pc:][:Other_ID_Continue:]--[:Pattern_Syntax:]--[:Pattern_White_Space:]]\nbool IsIdContinue(int character) noexcept {\n\tif (IsIdPattern(character)) {\n\t\treturn false;\n\t}\n\tconst OtherID oid = OtherIDOfCharacter(character);\n\tif (oid != OtherID::oidNone) {\n\t\treturn true;\n\t}\n\tconst CharacterCategory c = CategoriseCharacter(character);\n\treturn (c == ccLl || c == ccLu || c == ccLt || c == ccLm || c == ccLo\n\t\t|| c == ccNl || c == ccMn || c == ccMc || c == ccNd || c == ccPc);\n}\n\n// XID_Start is ID_Start modified for Normalization Form KC in UAX #31\nbool IsXidStart(int character) noexcept {\n\tif (OmitXidStart(character)) {\n\t\treturn false;\n\t} else {\n\t\treturn IsIdStart(character);\n\t}\n}\n\n// XID_Continue is ID_Continue modified for Normalization Form KC in UAX #31\nbool IsXidContinue(int character) noexcept {\n\tif (OmitXidContinue(character)) {\n\t\treturn false;\n\t} else {\n\t\treturn IsIdContinue(character);\n\t}\n}\n\nCharacterCategoryMap::CharacterCategoryMap() {\n\tOptimize(256);\n}\n\nint CharacterCategoryMap::Size() const noexcept {\n\treturn static_cast<int>(dense.size());\n}\n\nvoid CharacterCategoryMap::Optimize(int countCharacters) {\n\tconst int characters = std::clamp(countCharacters, 256, maxUnicode + 1);\n\tdense.resize(characters);\n\n\tint end = 0;\n\tint index = 0;\n\tint current = catRanges[index];\n\t++index;\n\tdo {\n\t\tconst int next = catRanges[index];\n\t\tconst unsigned char category = current & maskCategory;\n\t\tcurrent >>= 5;\n\t\tend = std::min(characters, next >> 5);\n\t\twhile (current < end) {\n\t\t\tdense[current++] = category;\n\t\t}\n\t\tcurrent = next;\n\t\t++index;\n\t} while (characters > end);\n}\n\n}\n"
  },
  {
    "path": "lexilla/lexlib/CharacterCategory.h",
    "content": "// Scintilla source code edit control\n/** @file CharacterCategory.h\n ** Returns the Unicode general category of a character.\n **/\n// Copyright 2013 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#ifndef CHARACTERCATEGORY_H\n#define CHARACTERCATEGORY_H\n\nnamespace Lexilla {\n\nenum CharacterCategory {\n\tccLu, ccLl, ccLt, ccLm, ccLo,\n\tccMn, ccMc, ccMe,\n\tccNd, ccNl, ccNo,\n\tccPc, ccPd, ccPs, ccPe, ccPi, ccPf, ccPo,\n\tccSm, ccSc, ccSk, ccSo,\n\tccZs, ccZl, ccZp,\n\tccCc, ccCf, ccCs, ccCo, ccCn\n};\n\nCharacterCategory CategoriseCharacter(int character) noexcept;\n\n// Common definitions of allowable characters in identifiers from UAX #31.\nbool IsIdStart(int character) noexcept;\nbool IsIdContinue(int character) noexcept;\nbool IsXidStart(int character) noexcept;\nbool IsXidContinue(int character) noexcept;\n\nclass CharacterCategoryMap {\nprivate:\n\tstd::vector<unsigned char> dense;\npublic:\n\tCharacterCategoryMap();\n\tCharacterCategory CategoryFor(int character) const noexcept {\n\t\tif (static_cast<size_t>(character) < dense.size()) {\n\t\t\treturn static_cast<CharacterCategory>(dense[character]);\n\t\t} else {\n\t\t\t// binary search through ranges\n\t\t\treturn CategoriseCharacter(character);\n\t\t}\n\t}\n\tint Size() const noexcept;\n\tvoid Optimize(int countCharacters);\n};\n\n}\n\n#endif\n"
  },
  {
    "path": "lexilla/lexlib/CharacterSet.cxx",
    "content": "// Scintilla source code edit control\n/** @file CharacterSet.cxx\n ** Simple case functions for ASCII.\n ** Lexer infrastructure.\n **/\n// Copyright 1998-2010 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <cstdlib>\n#include <cassert>\n\n#include <string_view>\n\n#include \"CharacterSet.h\"\n\nusing namespace Lexilla;\n\nnamespace Lexilla {\n\nint CompareCaseInsensitive(const char *a, const char *b) noexcept {\n\twhile (*a && *b) {\n\t\tif (*a != *b) {\n\t\t\tconst char upperA = MakeUpperCase(*a);\n\t\t\tconst char upperB = MakeUpperCase(*b);\n\t\t\tif (upperA != upperB)\n\t\t\t\treturn upperA - upperB;\n\t\t}\n\t\ta++;\n\t\tb++;\n\t}\n\t// Either *a or *b is nul\n\treturn *a - *b;\n}\n\nbool EqualCaseInsensitive(std::string_view a, std::string_view b) noexcept {\n\tif (a.length() != b.length()) {\n\t\treturn false;\n\t}\n\tfor (size_t i = 0; i < a.length(); i++) {\n\t\tif (MakeUpperCase(a[i]) != MakeUpperCase(b[i])) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n\nint CompareNCaseInsensitive(const char *a, const char *b, size_t len) noexcept {\n\twhile (*a && *b && len) {\n\t\tif (*a != *b) {\n\t\t\tconst char upperA = MakeUpperCase(*a);\n\t\t\tconst char upperB = MakeUpperCase(*b);\n\t\t\tif (upperA != upperB)\n\t\t\t\treturn upperA - upperB;\n\t\t}\n\t\ta++;\n\t\tb++;\n\t\tlen--;\n\t}\n\tif (len == 0)\n\t\treturn 0;\n\telse\n\t\t// Either *a or *b is nul\n\t\treturn *a - *b;\n}\n\n}\n"
  },
  {
    "path": "lexilla/lexlib/CharacterSet.h",
    "content": "// Scintilla source code edit control\n/** @file CharacterSet.h\n ** Encapsulates a set of characters. Used to test if a character is within a set.\n **/\n// Copyright 2007 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#ifndef CHARACTERSET_H\n#define CHARACTERSET_H\n\nnamespace Lexilla {\n\ntemplate<int N>\nclass CharacterSetArray {\n\tunsigned char bset[(N-1)/8 + 1] = {};\n\tbool valueAfter = false;\npublic:\n\tenum setBase {\n\t\tsetNone=0,\n\t\tsetLower=1,\n\t\tsetUpper=2,\n\t\tsetDigits=4,\n\t\tsetAlpha=setLower|setUpper,\n\t\tsetAlphaNum=setAlpha|setDigits\n\t};\n\tCharacterSetArray(setBase base=setNone, const char *initialSet=\"\", bool valueAfter_=false) noexcept {\n\t\tvalueAfter = valueAfter_;\n\t\tAddString(initialSet);\n\t\tif (base & setLower)\n\t\t\tAddString(\"abcdefghijklmnopqrstuvwxyz\");\n\t\tif (base & setUpper)\n\t\t\tAddString(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\");\n\t\tif (base & setDigits)\n\t\t\tAddString(\"0123456789\");\n\t}\n\tCharacterSetArray(const char *initialSet, bool valueAfter_=false) noexcept :\n\t\tCharacterSetArray(setNone, initialSet, valueAfter_) {\n\t}\n\t// For compatibility with previous version but should not be used in new code.\n\tCharacterSetArray(setBase base, const char *initialSet, [[maybe_unused]]int size_, bool valueAfter_=false) noexcept :\n\t\tCharacterSetArray(base, initialSet, valueAfter_) {\n\t\tassert(size_ == N);\n\t}\n\tvoid Add(int val) noexcept {\n\t\tassert(val >= 0);\n\t\tassert(val < N);\n\t\tbset[val >> 3] |= 1 << (val & 7);\n\t}\n\tvoid AddString(const char *setToAdd) noexcept {\n\t\tfor (const char *cp=setToAdd; *cp; cp++) {\n\t\t\tconst unsigned char uch = *cp;\n\t\t\tassert(uch < N);\n\t\t\tAdd(uch);\n\t\t}\n\t}\n\tbool Contains(int val) const noexcept {\n\t\tassert(val >= 0);\n\t\tif (val < 0) return false;\n\t\tif (val >= N) return valueAfter;\n\t\treturn bset[val >> 3] & (1 << (val & 7));\n\t}\n\tbool Contains(char ch) const noexcept {\n\t\t// Overload char as char may be signed\n\t\tconst unsigned char uch = ch;\n\t\treturn Contains(uch);\n\t}\n};\n\nusing CharacterSet = CharacterSetArray<0x80>;\n\n// Functions for classifying characters\n\ntemplate <typename T, typename... Args>\nconstexpr bool AnyOf(T t, Args... args) noexcept {\n#if defined(__clang__)\n\tstatic_assert(__is_integral(T) || __is_enum(T));\n#endif\n\treturn ((t == args) || ...);\n}\n\n// prevent pointer without <type_traits>\ntemplate <typename T, typename... Args>\nconstexpr void AnyOf([[maybe_unused]] T *t, [[maybe_unused]] Args... args) noexcept {}\ntemplate <typename T, typename... Args>\nconstexpr void AnyOf([[maybe_unused]] const T *t, [[maybe_unused]] Args... args) noexcept {}\n\nconstexpr bool IsASpace(int ch) noexcept {\n    return (ch == ' ') || ((ch >= 0x09) && (ch <= 0x0d));\n}\n\nconstexpr bool IsASpaceOrTab(int ch) noexcept {\n\treturn (ch == ' ') || (ch == '\\t');\n}\n\nconstexpr bool IsADigit(int ch) noexcept {\n\treturn (ch >= '0') && (ch <= '9');\n}\n\nconstexpr bool IsAHeXDigit(int ch) noexcept {\n\treturn (ch >= '0' && ch <= '9')\n\t\t|| (ch >= 'A' && ch <= 'F')\n\t\t|| (ch >= 'a' && ch <= 'f');\n}\n\nconstexpr bool IsAnOctalDigit(int ch) noexcept {\n\treturn ch >= '0' && ch <= '7';\n}\n\nconstexpr bool IsADigit(int ch, int base) noexcept {\n\tif (base <= 10) {\n\t\treturn (ch >= '0') && (ch < '0' + base);\n\t} else {\n\t\treturn ((ch >= '0') && (ch <= '9')) ||\n\t\t       ((ch >= 'A') && (ch < 'A' + base - 10)) ||\n\t\t       ((ch >= 'a') && (ch < 'a' + base - 10));\n\t}\n}\n\nconstexpr bool IsASCII(int ch) noexcept {\n\treturn (ch >= 0) && (ch < 0x80);\n}\n\nconstexpr bool IsLowerCase(int ch) noexcept {\n\treturn (ch >= 'a') && (ch <= 'z');\n}\n\nconstexpr bool IsUpperCase(int ch) noexcept {\n\treturn (ch >= 'A') && (ch <= 'Z');\n}\n\nconstexpr bool IsUpperOrLowerCase(int ch) noexcept {\n\treturn IsUpperCase(ch) || IsLowerCase(ch);\n}\n\nconstexpr bool IsAlphaNumeric(int ch) noexcept {\n\treturn\n\t\t((ch >= '0') && (ch <= '9')) ||\n\t\t((ch >= 'a') && (ch <= 'z')) ||\n\t\t((ch >= 'A') && (ch <= 'Z'));\n}\n\n/**\n * Check if a character is a space.\n * This is ASCII specific but is safe with chars >= 0x80.\n */\nconstexpr bool isspacechar(int ch) noexcept {\n    return (ch == ' ') || ((ch >= 0x09) && (ch <= 0x0d));\n}\n\nconstexpr bool iswordchar(int ch) noexcept {\n\treturn IsAlphaNumeric(ch) || ch == '.' || ch == '_';\n}\n\nconstexpr bool iswordstart(int ch) noexcept {\n\treturn IsAlphaNumeric(ch) || ch == '_';\n}\n\nconstexpr bool isoperator(int ch) noexcept {\n\tif (IsAlphaNumeric(ch))\n\t\treturn false;\n\tif (ch == '%' || ch == '^' || ch == '&' || ch == '*' ||\n\t        ch == '(' || ch == ')' || ch == '-' || ch == '+' ||\n\t        ch == '=' || ch == '|' || ch == '{' || ch == '}' ||\n\t        ch == '[' || ch == ']' || ch == ':' || ch == ';' ||\n\t        ch == '<' || ch == '>' || ch == ',' || ch == '/' ||\n\t        ch == '?' || ch == '!' || ch == '.' || ch == '~')\n\t\treturn true;\n\treturn false;\n}\n\n// Simple case functions for ASCII supersets.\n\ntemplate <typename T>\nconstexpr T MakeUpperCase(T ch) noexcept {\n\tif (ch < 'a' || ch > 'z')\n\t\treturn ch;\n\telse\n\t\treturn ch - 'a' + 'A';\n}\n\ntemplate <typename T>\nconstexpr T MakeLowerCase(T ch) noexcept {\n\tif (ch < 'A' || ch > 'Z')\n\t\treturn ch;\n\telse\n\t\treturn ch - 'A' + 'a';\n}\n\nint CompareCaseInsensitive(const char *a, const char *b) noexcept;\nbool EqualCaseInsensitive(std::string_view a, std::string_view b) noexcept;\nint CompareNCaseInsensitive(const char *a, const char *b, size_t len) noexcept;\n\n}\n\n#endif\n"
  },
  {
    "path": "lexilla/lexlib/DefaultLexer.cxx",
    "content": "// Scintilla source code edit control\n/** @file DefaultLexer.cxx\n ** A lexer base class that provides reasonable default behaviour.\n **/\n// Copyright 2017 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <cstdlib>\n#include <cassert>\n#include <cstring>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"PropSetSimple.h\"\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"LexerModule.h\"\n#include \"DefaultLexer.h\"\n\nusing namespace Lexilla;\n\nstatic const char styleSubable[] = { 0 };\n\nDefaultLexer::DefaultLexer(const char *languageName_, int language_,\n\tconst LexicalClass *lexClasses_, size_t nClasses_) :\n\tlanguageName(languageName_),\n\tlanguage(language_),\n\tlexClasses(lexClasses_),\n\tnClasses(nClasses_) {\n}\n\nDefaultLexer::~DefaultLexer() = default;\n\nvoid SCI_METHOD DefaultLexer::Release() {\n\tdelete this;\n}\n\nint SCI_METHOD DefaultLexer::Version() const {\n\treturn Scintilla::lvRelease5;\n}\n\nconst char * SCI_METHOD DefaultLexer::PropertyNames() {\n\treturn \"\";\n}\n\nint SCI_METHOD DefaultLexer::PropertyType(const char *) {\n\treturn SC_TYPE_BOOLEAN;\n}\n\nconst char * SCI_METHOD DefaultLexer::DescribeProperty(const char *) {\n\treturn \"\";\n}\n\nSci_Position SCI_METHOD DefaultLexer::PropertySet(const char *, const char *) {\n\treturn -1;\n}\n\nconst char * SCI_METHOD DefaultLexer::DescribeWordListSets() {\n\treturn \"\";\n}\n\nSci_Position SCI_METHOD DefaultLexer::WordListSet(int, const char *) {\n\treturn -1;\n}\n\nvoid SCI_METHOD DefaultLexer::Fold(Sci_PositionU, Sci_Position, int, Scintilla::IDocument *) {\n}\n\nvoid * SCI_METHOD DefaultLexer::PrivateCall(int, void *) {\n\treturn nullptr;\n}\n\nint SCI_METHOD DefaultLexer::LineEndTypesSupported() {\n\treturn SC_LINE_END_TYPE_DEFAULT;\n}\n\nint SCI_METHOD DefaultLexer::AllocateSubStyles(int, int) {\n\treturn -1;\n}\n\nint SCI_METHOD DefaultLexer::SubStylesStart(int) {\n\treturn -1;\n}\n\nint SCI_METHOD DefaultLexer::SubStylesLength(int) {\n\treturn 0;\n}\n\nint SCI_METHOD DefaultLexer::StyleFromSubStyle(int subStyle) {\n\treturn subStyle;\n}\n\nint SCI_METHOD DefaultLexer::PrimaryStyleFromStyle(int style) {\n\treturn style;\n}\n\nvoid SCI_METHOD DefaultLexer::FreeSubStyles() {\n}\n\nvoid SCI_METHOD DefaultLexer::SetIdentifiers(int, const char *) {\n}\n\nint SCI_METHOD DefaultLexer::DistanceToSecondaryStyles() {\n\treturn 0;\n}\n\nconst char * SCI_METHOD DefaultLexer::GetSubStyleBases() {\n\treturn styleSubable;\n}\n\nint SCI_METHOD DefaultLexer::NamedStyles() {\n\treturn static_cast<int>(nClasses);\n}\n\nconst char * SCI_METHOD DefaultLexer::NameOfStyle(int style) {\n\treturn (style < NamedStyles()) ? lexClasses[style].name : \"\";\n}\n\nconst char * SCI_METHOD DefaultLexer::TagsOfStyle(int style) {\n\treturn (style < NamedStyles()) ? lexClasses[style].tags : \"\";\n}\n\nconst char * SCI_METHOD DefaultLexer::DescriptionOfStyle(int style) {\n\treturn (style < NamedStyles()) ? lexClasses[style].description : \"\";\n}\n\n// ILexer5 methods\nconst char * SCI_METHOD DefaultLexer::GetName() {\n\treturn languageName;\n}\n\nint SCI_METHOD DefaultLexer::GetIdentifier() {\n\treturn language;\n}\n\n"
  },
  {
    "path": "lexilla/lexlib/DefaultLexer.h",
    "content": "// Scintilla source code edit control\n/** @file DefaultLexer.h\n ** A lexer base class with default empty implementations of methods.\n ** For lexers that do not support all features so do not need real implementations.\n ** Does have real implementation for style metadata.\n **/\n// Copyright 2017 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#ifndef DEFAULTLEXER_H\n#define DEFAULTLEXER_H\n\nnamespace Lexilla {\n\n// A simple lexer with no state\nclass DefaultLexer : public Scintilla::ILexer5 {\n\tconst char *languageName;\n\tint language;\n\tconst LexicalClass *lexClasses;\n\tsize_t nClasses;\npublic:\n\tDefaultLexer(const char *languageName_, int language_,\n\t\tconst LexicalClass *lexClasses_ = nullptr, size_t nClasses_ = 0);\n\tvirtual ~DefaultLexer();\n\tvoid SCI_METHOD Release() override;\n\tint SCI_METHOD Version() const override;\n\tconst char * SCI_METHOD PropertyNames() override;\n\tint SCI_METHOD PropertyType(const char *name) override;\n\tconst char * SCI_METHOD DescribeProperty(const char *name) override;\n\tSci_Position SCI_METHOD PropertySet(const char *key, const char *val) override;\n\tconst char * SCI_METHOD DescribeWordListSets() override;\n\tSci_Position SCI_METHOD WordListSet(int n, const char *wl) override;\n\tvoid SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, Scintilla::IDocument *pAccess) override = 0;\n\tvoid SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, Scintilla::IDocument *pAccess) override;\n\tvoid * SCI_METHOD PrivateCall(int operation, void *pointer) override;\n\tint SCI_METHOD LineEndTypesSupported() override;\n\tint SCI_METHOD AllocateSubStyles(int styleBase, int numberStyles) override;\n\tint SCI_METHOD SubStylesStart(int styleBase) override;\n\tint SCI_METHOD SubStylesLength(int styleBase) override;\n\tint SCI_METHOD StyleFromSubStyle(int subStyle) override;\n\tint SCI_METHOD PrimaryStyleFromStyle(int style) override;\n\tvoid SCI_METHOD FreeSubStyles() override;\n\tvoid SCI_METHOD SetIdentifiers(int style, const char *identifiers) override;\n\tint SCI_METHOD DistanceToSecondaryStyles() override;\n\tconst char * SCI_METHOD GetSubStyleBases() override;\n\tint SCI_METHOD NamedStyles() override;\n\tconst char * SCI_METHOD NameOfStyle(int style) override;\n\tconst char * SCI_METHOD TagsOfStyle(int style) override;\n\tconst char * SCI_METHOD DescriptionOfStyle(int style) override;\n\t// ILexer5 methods\n\tconst char * SCI_METHOD GetName() override;\n\tint SCI_METHOD GetIdentifier() override;\n};\n\n}\n\n#endif\n"
  },
  {
    "path": "lexilla/lexlib/InList.cxx",
    "content": "// Scintilla source code edit control\n/** @file InList.cxx\n ** Check if a string is in a list.\n **/\n// Copyright 2024 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <cassert>\n\n#include <string>\n#include <string_view>\n#include <initializer_list>\n\n#include \"InList.h\"\n#include \"CharacterSet.h\"\n\nnamespace Lexilla {\n\nbool InList(std::string_view value, std::initializer_list<std::string_view> list) noexcept {\n\tfor (const std::string_view element : list) {\n\t\tif (value == element) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\nbool InListCaseInsensitive(std::string_view value, std::initializer_list<std::string_view> list) noexcept {\n\tfor (const std::string_view element : list) {\n\t\tif (EqualCaseInsensitive(value, element)) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\n}\n"
  },
  {
    "path": "lexilla/lexlib/InList.h",
    "content": "// Scintilla source code edit control\n/** @file InList.h\n ** Check if a string is in a list.\n **/\n// Copyright 2024 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#ifndef INLIST_H\n#define INLIST_H\n\nnamespace Lexilla {\n\nbool InList(std::string_view value, std::initializer_list<std::string_view> list) noexcept;\nbool InListCaseInsensitive(std::string_view value, std::initializer_list<std::string_view> list) noexcept;\n\n}\n\n#endif\n"
  },
  {
    "path": "lexilla/lexlib/LexAccessor.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexAccessor.cxx\n ** Interfaces between Scintilla and lexers.\n **/\n// Copyright 1998-2010 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n#include <cassert>\n#include <cstring>\n\n#include <string>\n#include <algorithm>\n\n#include \"ILexer.h\"\n\n#include \"LexAccessor.h\"\n#include \"CharacterSet.h\"\n\nusing namespace Lexilla;\n\nnamespace Lexilla {\n\nbool LexAccessor::MatchIgnoreCase(Sci_Position pos, const char *s) {\n\tassert(s);\n\tfor (; *s; s++, pos++) {\n\t\tif (*s != MakeLowerCase(SafeGetCharAt(pos))) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n\nvoid LexAccessor::GetRange(Sci_PositionU startPos_, Sci_PositionU endPos_, char *s, Sci_PositionU len) {\n\tassert(s);\n\tassert(startPos_ <= endPos_ && len != 0);\n\tendPos_ = std::min(endPos_, startPos_ + len - 1);\n\tlen = endPos_ - startPos_;\n\tif (startPos_ >= static_cast<Sci_PositionU>(startPos) && endPos_ <= static_cast<Sci_PositionU>(endPos)) {\n\t\tconst char * const p = buf + (startPos_ - startPos);\n\t\tmemcpy(s, p, len);\n\t} else {\n\t\tpAccess->GetCharRange(s, startPos_, len);\n\t}\n\ts[len] = '\\0';\n}\n\nvoid LexAccessor::GetRangeLowered(Sci_PositionU startPos_, Sci_PositionU endPos_, char *s, Sci_PositionU len) {\n\tassert(s);\n\tGetRange(startPos_, endPos_, s, len);\n\twhile (*s) {\n\t\tif (*s >= 'A' && *s <= 'Z') {\n\t\t\t*s += 'a' - 'A';\n\t\t}\n\t\t++s;\n\t}\n}\n\nstd::string LexAccessor::GetRange(Sci_PositionU startPos_, Sci_PositionU endPos_) {\n\tassert(startPos_ < endPos_);\n\tconst Sci_PositionU len = endPos_ - startPos_;\n\tstd::string s(len, '\\0');\n\tGetRange(startPos_, endPos_, s.data(), len + 1);\n\treturn s;\n}\n\nstd::string LexAccessor::GetRangeLowered(Sci_PositionU startPos_, Sci_PositionU endPos_) {\n\tassert(startPos_ < endPos_);\n\tconst Sci_PositionU len = endPos_ - startPos_;\n\tstd::string s(len, '\\0');\n\tGetRangeLowered(startPos_, endPos_, s.data(), len + 1);\n\treturn s;\n}\n\n}\n"
  },
  {
    "path": "lexilla/lexlib/LexAccessor.h",
    "content": "// Scintilla source code edit control\n/** @file LexAccessor.h\n ** Interfaces between Scintilla and lexers.\n **/\n// Copyright 1998-2010 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#ifndef LEXACCESSOR_H\n#define LEXACCESSOR_H\n\nnamespace Lexilla {\n\nenum class EncodingType { eightBit, unicode, dbcs };\n\nclass LexAccessor {\nprivate:\n\tScintilla::IDocument *pAccess;\n\tenum {extremePosition=0x7FFFFFFF};\n\t/** @a bufferSize is a trade off between time taken to copy the characters\n\t * and retrieval overhead.\n\t * @a slopSize positions the buffer before the desired position\n\t * in case there is some backtracking. */\n\tenum {bufferSize=4000, slopSize=bufferSize/8};\n\tchar buf[bufferSize+1];\n\tSci_Position startPos;\n\tSci_Position endPos;\n\tint codePage;\n\tenum EncodingType encodingType;\n\tSci_Position lenDoc;\n\tchar styleBuf[bufferSize];\n\tSci_Position validLen;\n\tSci_PositionU startSeg;\n\tSci_Position startPosStyling;\n\tint documentVersion;\n\n\tvoid Fill(Sci_Position position) {\n\t\tstartPos = position - slopSize;\n\t\tif (startPos + bufferSize > lenDoc)\n\t\t\tstartPos = lenDoc - bufferSize;\n\t\tif (startPos < 0)\n\t\t\tstartPos = 0;\n\t\tendPos = startPos + bufferSize;\n\t\tif (endPos > lenDoc)\n\t\t\tendPos = lenDoc;\n\n\t\tpAccess->GetCharRange(buf, startPos, endPos-startPos);\n\t\tbuf[endPos-startPos] = '\\0';\n\t}\n\npublic:\n\texplicit LexAccessor(Scintilla::IDocument *pAccess_) :\n\t\tpAccess(pAccess_), startPos(extremePosition), endPos(0),\n\t\tcodePage(pAccess->CodePage()),\n\t\tencodingType(EncodingType::eightBit),\n\t\tlenDoc(pAccess->Length()),\n\t\tvalidLen(0),\n\t\tstartSeg(0), startPosStyling(0),\n\t\tdocumentVersion(pAccess->Version()) {\n\t\t// Prevent warnings by static analyzers about uninitialized buf and styleBuf.\n\t\tbuf[0] = 0;\n\t\tstyleBuf[0] = 0;\n\t\tswitch (codePage) {\n\t\tcase 65001:\n\t\t\tencodingType = EncodingType::unicode;\n\t\t\tbreak;\n\t\tcase 932:\n\t\tcase 936:\n\t\tcase 949:\n\t\tcase 950:\n\t\tcase 1361:\n\t\t\tencodingType = EncodingType::dbcs;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t}\n\tchar operator[](Sci_Position position) {\n\t\tif (position < startPos || position >= endPos) {\n\t\t\tFill(position);\n\t\t}\n\t\treturn buf[position - startPos];\n\t}\n\tScintilla::IDocument *MultiByteAccess() const noexcept {\n\t\treturn pAccess;\n\t}\n\t/** Safe version of operator[], returning a defined value for invalid position. */\n\tchar SafeGetCharAt(Sci_Position position, char chDefault=' ') {\n\t\tif (position < startPos || position >= endPos) {\n\t\t\tFill(position);\n\t\t\tif (position < startPos || position >= endPos) {\n\t\t\t\t// Position is outside range of document\n\t\t\t\treturn chDefault;\n\t\t\t}\n\t\t}\n\t\treturn buf[position - startPos];\n\t}\n\tbool IsLeadByte(char ch) const {\n\t\tconst unsigned char uch = ch;\n\t\treturn\n\t\t\t(uch >= 0x80) &&\t// non-ASCII\n\t\t\t(encodingType == EncodingType::dbcs) &&\t\t// IsDBCSLeadByte only for DBCS\n\t\t\tpAccess->IsDBCSLeadByte(ch);\n\t}\n\tEncodingType Encoding() const noexcept {\n\t\treturn encodingType;\n\t}\n\tbool Match(Sci_Position pos, const char *s) {\n\t\tassert(s);\n\t\tfor (int i=0; *s; i++) {\n\t\t\tif (*s != SafeGetCharAt(pos+i))\n\t\t\t\treturn false;\n\t\t\ts++;\n\t\t}\n\t\treturn true;\n\t}\n\tbool MatchIgnoreCase(Sci_Position pos, const char *s);\n\n\t// Get first len - 1 characters in range [startPos_, endPos_).\n\tvoid GetRange(Sci_PositionU startPos_, Sci_PositionU endPos_, char *s, Sci_PositionU len);\n\tvoid GetRangeLowered(Sci_PositionU startPos_, Sci_PositionU endPos_, char *s, Sci_PositionU len);\n\t// Get all characters in range [startPos_, endPos_).\n\tstd::string GetRange(Sci_PositionU startPos_, Sci_PositionU endPos_);\n\tstd::string GetRangeLowered(Sci_PositionU startPos_, Sci_PositionU endPos_);\n\n\tchar StyleAt(Sci_Position position) const {\n\t\treturn pAccess->StyleAt(position);\n\t}\n\tint StyleIndexAt(Sci_Position position) const {\n\t\tconst unsigned char style = pAccess->StyleAt(position);\n\t\treturn style;\n\t}\n\t// Return style value from buffer when in buffer, else retrieve from document.\n\t// This is faster and can avoid calls to Flush() as that may be expensive.\n\tint BufferStyleAt(Sci_Position position) const {\n\t\tconst Sci_Position index = position - startPosStyling;\n\t\tif (index >= 0 && index < validLen) {\n\t\t\tconst unsigned char style = styleBuf[index];\n\t\t\treturn style;\n\t\t}\n\t\tconst unsigned char style = pAccess->StyleAt(position);\n\t\treturn style;\n\t}\n\tSci_Position GetLine(Sci_Position position) const {\n\t\treturn pAccess->LineFromPosition(position);\n\t}\n\tSci_Position LineStart(Sci_Position line) const {\n\t\treturn pAccess->LineStart(line);\n\t}\n\tSci_Position LineEnd(Sci_Position line) const {\n\t\treturn pAccess->LineEnd(line);\n\t}\n\tint LevelAt(Sci_Position line) const {\n\t\treturn pAccess->GetLevel(line);\n\t}\n\tSci_Position Length() const noexcept {\n\t\treturn lenDoc;\n\t}\n\tvoid Flush() {\n\t\tif (validLen > 0) {\n\t\t\tpAccess->SetStyles(validLen, styleBuf);\n\t\t\tstartPosStyling += validLen;\n\t\t\tvalidLen = 0;\n\t\t}\n\t}\n\tint GetLineState(Sci_Position line) const {\n\t\treturn pAccess->GetLineState(line);\n\t}\n\tint SetLineState(Sci_Position line, int state) {\n\t\treturn pAccess->SetLineState(line, state);\n\t}\n\t// Style setting\n\tvoid StartAt(Sci_PositionU start) {\n\t\tpAccess->StartStyling(start);\n\t\tstartPosStyling = start;\n\t}\n\tSci_PositionU GetStartSegment() const noexcept {\n\t\treturn startSeg;\n\t}\n\tvoid StartSegment(Sci_PositionU pos) noexcept {\n\t\tstartSeg = pos;\n\t}\n\tvoid ColourTo(Sci_PositionU pos, int chAttr) {\n\t\t// Only perform styling if non empty range\n\t\tif (pos != startSeg - 1) {\n\t\t\tassert(pos >= startSeg);\n\t\t\tif (pos < startSeg) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (validLen + (pos - startSeg + 1) >= bufferSize)\n\t\t\t\tFlush();\n\t\t\tconst unsigned char attr = chAttr & 0xffU;\n\t\t\tif (validLen + (pos - startSeg + 1) >= bufferSize) {\n\t\t\t\t// Too big for buffer so send directly\n\t\t\t\tpAccess->SetStyleFor(pos - startSeg + 1, attr);\n\t\t\t} else {\n\t\t\t\tfor (Sci_PositionU i = startSeg; i <= pos; i++) {\n\t\t\t\t\tassert((startPosStyling + validLen) < Length());\n\t\t\t\t\tstyleBuf[validLen++] = attr;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tstartSeg = pos+1;\n\t}\n\tvoid SetLevel(Sci_Position line, int level) {\n\t\tpAccess->SetLevel(line, level);\n\t}\n\tvoid IndicatorFill(Sci_Position start, Sci_Position end, int indicator, int value) {\n\t\tpAccess->DecorationSetCurrentIndicator(indicator);\n\t\tpAccess->DecorationFillRange(start, value, end - start);\n\t}\n\n\tvoid ChangeLexerState(Sci_Position start, Sci_Position end) {\n\t\tpAccess->ChangeLexerState(start, end);\n\t}\n};\n\nstruct LexicalClass {\n\tint value;\n\tconst char *name;\n\tconst char *tags;\n\tconst char *description;\n};\n\n}\n\n#endif\n"
  },
  {
    "path": "lexilla/lexlib/LexerBase.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexerBase.cxx\n ** A simple lexer with no state.\n **/\n// Copyright 1998-2010 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <cstdlib>\n#include <cassert>\n#include <cstring>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"PropSetSimple.h\"\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"LexerModule.h\"\n#include \"LexerBase.h\"\n\nusing namespace Lexilla;\n\nstatic const char styleSubable[] = { 0 };\n\nLexerBase::LexerBase(const LexicalClass *lexClasses_, size_t nClasses_) :\n\tlexClasses(lexClasses_), nClasses(nClasses_) {\n\tfor (int wl = 0; wl < numWordLists; wl++)\n\t\tkeyWordLists[wl] = new WordList;\n\tkeyWordLists[numWordLists] = nullptr;\n}\n\nLexerBase::~LexerBase() {\n\tfor (int wl = 0; wl < numWordLists; wl++) {\n\t\tdelete keyWordLists[wl];\n\t\tkeyWordLists[wl] = nullptr;\n\t}\n\tkeyWordLists[numWordLists] = nullptr;\n}\n\nvoid SCI_METHOD LexerBase::Release() {\n\tdelete this;\n}\n\nint SCI_METHOD LexerBase::Version() const {\n\treturn Scintilla::lvRelease5;\n}\n\nconst char * SCI_METHOD LexerBase::PropertyNames() {\n\treturn \"\";\n}\n\nint SCI_METHOD LexerBase::PropertyType(const char *) {\n\treturn SC_TYPE_BOOLEAN;\n}\n\nconst char * SCI_METHOD LexerBase::DescribeProperty(const char *) {\n\treturn \"\";\n}\n\nSci_Position SCI_METHOD LexerBase::PropertySet(const char *key, const char *val) {\n\tif (props.Set(key, val)) {\n\t\treturn 0;\n\t} else {\n\t\treturn -1;\n\t}\n}\n\nconst char *SCI_METHOD LexerBase::PropertyGet(const char *key) {\n\treturn props.Get(key);\n}\n\nconst char * SCI_METHOD LexerBase::DescribeWordListSets() {\n\treturn \"\";\n}\n\nSci_Position SCI_METHOD LexerBase::WordListSet(int n, const char *wl) {\n\tif (n < numWordLists) {\n\t\tif (keyWordLists[n]->Set(wl)) {\n\t\t\treturn 0;\n\t\t}\n\t}\n\treturn -1;\n}\n\nvoid * SCI_METHOD LexerBase::PrivateCall(int, void *) {\n\treturn nullptr;\n}\n\nint SCI_METHOD LexerBase::LineEndTypesSupported() {\n\treturn SC_LINE_END_TYPE_DEFAULT;\n}\n\nint SCI_METHOD LexerBase::AllocateSubStyles(int, int) {\n\treturn -1;\n}\n\nint SCI_METHOD LexerBase::SubStylesStart(int) {\n\treturn -1;\n}\n\nint SCI_METHOD LexerBase::SubStylesLength(int) {\n\treturn 0;\n}\n\nint SCI_METHOD LexerBase::StyleFromSubStyle(int subStyle) {\n\treturn subStyle;\n}\n\nint SCI_METHOD LexerBase::PrimaryStyleFromStyle(int style) {\n\treturn style;\n}\n\nvoid SCI_METHOD LexerBase::FreeSubStyles() {\n}\n\nvoid SCI_METHOD LexerBase::SetIdentifiers(int, const char *) {\n}\n\nint SCI_METHOD LexerBase::DistanceToSecondaryStyles() {\n\treturn 0;\n}\n\nconst char * SCI_METHOD LexerBase::GetSubStyleBases() {\n\treturn styleSubable;\n}\n\nint SCI_METHOD LexerBase::NamedStyles() {\n\treturn static_cast<int>(nClasses);\n}\n\nconst char * SCI_METHOD LexerBase::NameOfStyle(int style) {\n\treturn (style < NamedStyles()) ? lexClasses[style].name : \"\";\n}\n\nconst char * SCI_METHOD LexerBase::TagsOfStyle(int style) {\n\treturn (style < NamedStyles()) ? lexClasses[style].tags : \"\";\n}\n\nconst char * SCI_METHOD LexerBase::DescriptionOfStyle(int style) {\n\treturn (style < NamedStyles()) ? lexClasses[style].description : \"\";\n}\n\n// ILexer5 methods\n\nconst char *SCI_METHOD LexerBase::GetName() {\n\treturn \"\";\n}\n\nint SCI_METHOD LexerBase::GetIdentifier() {\n\treturn SCLEX_AUTOMATIC;\n}\n"
  },
  {
    "path": "lexilla/lexlib/LexerBase.h",
    "content": "// Scintilla source code edit control\n/** @file LexerBase.h\n ** A simple lexer with no state.\n **/\n// Copyright 1998-2010 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#ifndef LEXERBASE_H\n#define LEXERBASE_H\n\nnamespace Lexilla {\n\n// A simple lexer with no state\nclass LexerBase : public Scintilla::ILexer5 {\nprotected:\n\tconst LexicalClass *lexClasses;\n\tsize_t nClasses;\n\tPropSetSimple props;\n\tenum {numWordLists=KEYWORDSET_MAX+1};\n\tWordList *keyWordLists[numWordLists+1];\npublic:\n\tLexerBase(const LexicalClass *lexClasses_=nullptr, size_t nClasses_=0);\n\tvirtual ~LexerBase();\n\tvoid SCI_METHOD Release() override;\n\tint SCI_METHOD Version() const override;\n\tconst char * SCI_METHOD PropertyNames() override;\n\tint SCI_METHOD PropertyType(const char *name) override;\n\tconst char * SCI_METHOD DescribeProperty(const char *name) override;\n\tSci_Position SCI_METHOD PropertySet(const char *key, const char *val) override;\n\tconst char * SCI_METHOD DescribeWordListSets() override;\n\tSci_Position SCI_METHOD WordListSet(int n, const char *wl) override;\n\tvoid SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, Scintilla::IDocument *pAccess) override = 0;\n\tvoid SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, Scintilla::IDocument *pAccess) override = 0;\n\tvoid * SCI_METHOD PrivateCall(int operation, void *pointer) override;\n\tint SCI_METHOD LineEndTypesSupported() override;\n\tint SCI_METHOD AllocateSubStyles(int styleBase, int numberStyles) override;\n\tint SCI_METHOD SubStylesStart(int styleBase) override;\n\tint SCI_METHOD SubStylesLength(int styleBase) override;\n\tint SCI_METHOD StyleFromSubStyle(int subStyle) override;\n\tint SCI_METHOD PrimaryStyleFromStyle(int style) override;\n\tvoid SCI_METHOD FreeSubStyles() override;\n\tvoid SCI_METHOD SetIdentifiers(int style, const char *identifiers) override;\n\tint SCI_METHOD DistanceToSecondaryStyles() override;\n\tconst char * SCI_METHOD GetSubStyleBases() override;\n\tint SCI_METHOD NamedStyles() override;\n\tconst char * SCI_METHOD NameOfStyle(int style) override;\n\tconst char * SCI_METHOD TagsOfStyle(int style) override;\n\tconst char * SCI_METHOD DescriptionOfStyle(int style) override;\n\t// ILexer5 methods\n\tconst char * SCI_METHOD GetName() override;\n\tint SCI_METHOD GetIdentifier() override;\n\tconst char *SCI_METHOD PropertyGet(const char *key) override;\n};\n\n}\n\n#endif\n"
  },
  {
    "path": "lexilla/lexlib/LexerModule.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexerModule.cxx\n ** Colourise for particular languages.\n **/\n// Copyright 1998-2010 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <cstdlib>\n#include <cassert>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"PropSetSimple.h\"\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"LexerModule.h\"\n#include \"LexerBase.h\"\n#include \"LexerSimple.h\"\n\nusing namespace Lexilla;\n\nLexerModule::LexerModule(int language_,\n\tLexerFunction fnLexer_,\n\tconst char *languageName_,\n\tLexerFunction fnFolder_,\n\tconst char *const wordListDescriptions_[],\n\tconst LexicalClass *lexClasses_,\n\tsize_t nClasses_) noexcept :\n\tlanguage(language_),\n\tfnLexer(fnLexer_),\n\tfnFolder(fnFolder_),\n\tfnFactory(nullptr),\n\twordListDescriptions(wordListDescriptions_),\n\tlexClasses(lexClasses_),\n\tnClasses(nClasses_),\n\tlanguageName(languageName_) {\n}\n\nLexerModule::LexerModule(int language_,\n\tLexerFactoryFunction fnFactory_,\n\tconst char *languageName_,\n\tconst char * const wordListDescriptions_[]) noexcept :\n\tlanguage(language_),\n\tfnLexer(nullptr),\n\tfnFolder(nullptr),\n\tfnFactory(fnFactory_),\n\twordListDescriptions(wordListDescriptions_),\n\tlexClasses(nullptr),\n\tnClasses(0),\n\tlanguageName(languageName_) {\n}\n\nint LexerModule::GetLanguage() const noexcept {\n\treturn language;\n}\n\nint LexerModule::GetNumWordLists() const noexcept {\n\tif (!wordListDescriptions) {\n\t\treturn -1;\n\t} else {\n\t\tint numWordLists = 0;\n\n\t\twhile (wordListDescriptions[numWordLists]) {\n\t\t\t++numWordLists;\n\t\t}\n\n\t\treturn numWordLists;\n\t}\n}\n\nconst char *LexerModule::GetWordListDescription(int index) const noexcept {\n\tassert(index < GetNumWordLists());\n\tif (!wordListDescriptions || (index >= GetNumWordLists())) {\n\t\treturn \"\";\n\t} else {\n\t\treturn wordListDescriptions[index];\n\t}\n}\n\nconst LexicalClass *LexerModule::LexClasses() const noexcept {\n\treturn lexClasses;\n}\n\nsize_t LexerModule::NamedStyles() const noexcept {\n\treturn nClasses;\n}\n\nScintilla::ILexer5 *LexerModule::Create() const {\n\tif (fnFactory)\n\t\treturn fnFactory();\n\telse\n\t\treturn new LexerSimple(this);\n}\n\nvoid LexerModule::Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle,\n\t  WordList *keywordlists[], Accessor &styler) const {\n\tif (fnLexer)\n\t\tfnLexer(startPos, lengthDoc, initStyle, keywordlists, styler);\n}\n\nvoid LexerModule::Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle,\n\t  WordList *keywordlists[], Accessor &styler) const {\n\tif (fnFolder) {\n\t\tSci_Position lineCurrent = styler.GetLine(startPos);\n\t\t// Move back one line in case deletion wrecked current line fold state\n\t\tif (lineCurrent > 0) {\n\t\t\tlineCurrent--;\n\t\t\tconst Sci_Position newStartPos = styler.LineStart(lineCurrent);\n\t\t\tlengthDoc += startPos - newStartPos;\n\t\t\tstartPos = newStartPos;\n\t\t\tinitStyle = 0;\n\t\t\tif (startPos > 0) {\n\t\t\t\tinitStyle = styler.StyleIndexAt(startPos - 1);\n\t\t\t}\n\t\t}\n\t\tfnFolder(startPos, lengthDoc, initStyle, keywordlists, styler);\n\t}\n}\n"
  },
  {
    "path": "lexilla/lexlib/LexerModule.h",
    "content": "// Scintilla source code edit control\n/** @file LexerModule.h\n ** Colourise for particular languages.\n **/\n// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#ifndef LEXERMODULE_H\n#define LEXERMODULE_H\n\nnamespace Lexilla {\n\nclass Accessor;\nclass WordList;\nstruct LexicalClass;\n\ntypedef void (*LexerFunction)(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle,\n                  WordList *keywordlists[], Accessor &styler);\ntypedef Scintilla::ILexer5 *(*LexerFactoryFunction)();\n\n/**\n * A LexerModule is responsible for lexing and folding a particular language.\n * The Catalogue class maintains a list of LexerModules which can be searched to find a\n * module appropriate to a particular language.\n * The ExternalLexerModule subclass holds lexers loaded from DLLs or shared libraries.\n */\nclass LexerModule {\nprotected:\n\tint language;\n\tLexerFunction fnLexer;\n\tLexerFunction fnFolder;\n\tLexerFactoryFunction fnFactory;\n\tconst char * const * wordListDescriptions;\n\tconst LexicalClass *lexClasses;\n\tsize_t nClasses;\n\npublic:\n\tconst char *languageName;\n\tLexerModule(\n\t\tint language_,\n\t\tLexerFunction fnLexer_,\n\t\tconst char *languageName_=nullptr,\n\t\tLexerFunction fnFolder_= nullptr,\n\t\tconst char * const wordListDescriptions_[]=nullptr,\n\t\tconst LexicalClass *lexClasses_=nullptr,\n\t\tsize_t nClasses_=0) noexcept;\n\tLexerModule(\n\t\tint language_,\n\t\tLexerFactoryFunction fnFactory_,\n\t\tconst char *languageName_,\n\t\tconst char * const wordListDescriptions_[]=nullptr) noexcept;\n\tint GetLanguage() const noexcept;\n\n\t// -1 is returned if no WordList information is available\n\tint GetNumWordLists() const noexcept;\n\tconst char *GetWordListDescription(int index) const noexcept;\n\tconst LexicalClass *LexClasses() const noexcept;\n\tsize_t NamedStyles() const noexcept;\n\n\tScintilla::ILexer5 *Create() const;\n\n\tvoid Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle,\n                  WordList *keywordlists[], Accessor &styler) const;\n\tvoid Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle,\n                  WordList *keywordlists[], Accessor &styler) const;\n\n\tfriend class CatalogueModules;\n};\n\nconstexpr int Maximum(int a, int b) noexcept {\n\treturn (a > b) ? a : b;\n}\n\n// Shut up annoying Visual C++ warnings:\n#if defined(_MSC_VER)\n#pragma warning(disable: 4244 4456 4457)\n#endif\n\n// Turn off shadow warnings for lexers as may be maintained by others\n#if defined(__GNUC__)\n#pragma GCC diagnostic ignored \"-Wshadow\"\n#endif\n\n// Clang doesn't like omitting braces in array initialization but they just add\n// noise to LexicalClass arrays in lexers\n#if defined(__clang__)\n#pragma clang diagnostic ignored \"-Wmissing-braces\"\n#endif\n\n}\n\n#endif\n"
  },
  {
    "path": "lexilla/lexlib/LexerNoExceptions.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexerNoExceptions.cxx\n ** A simple lexer with no state which does not throw exceptions so can be used in an external lexer.\n **/\n// Copyright 1998-2010 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <cstdlib>\n#include <cassert>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"PropSetSimple.h\"\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"LexerModule.h\"\n#include \"LexerBase.h\"\n#include \"LexerNoExceptions.h\"\n\nusing namespace Lexilla;\n\nSci_Position SCI_METHOD LexerNoExceptions::PropertySet(const char *key, const char *val) {\n\ttry {\n\t\treturn LexerBase::PropertySet(key, val);\n\t} catch (...) {\n\t\t// Should not throw into caller as may be compiled with different compiler or options\n\t}\n\treturn -1;\n}\n\nSci_Position SCI_METHOD LexerNoExceptions::WordListSet(int n, const char *wl) {\n\ttry {\n\t\treturn LexerBase::WordListSet(n, wl);\n\t} catch (...) {\n\t\t// Should not throw into caller as may be compiled with different compiler or options\n\t}\n\treturn -1;\n}\n\nvoid SCI_METHOD LexerNoExceptions::Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, Scintilla::IDocument *pAccess) {\n\ttry {\n\t\tAccessor astyler(pAccess, &props);\n\t\tLexer(startPos, lengthDoc, initStyle, pAccess, astyler);\n\t\tastyler.Flush();\n\t} catch (...) {\n\t\t// Should not throw into caller as may be compiled with different compiler or options\n\t\tpAccess->SetErrorStatus(SC_STATUS_FAILURE);\n\t}\n}\nvoid SCI_METHOD LexerNoExceptions::Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, Scintilla::IDocument *pAccess) {\n\ttry {\n\t\tAccessor astyler(pAccess, &props);\n\t\tFolder(startPos, lengthDoc, initStyle, pAccess, astyler);\n\t\tastyler.Flush();\n\t} catch (...) {\n\t\t// Should not throw into caller as may be compiled with different compiler or options\n\t\tpAccess->SetErrorStatus(SC_STATUS_FAILURE);\n\t}\n}\n"
  },
  {
    "path": "lexilla/lexlib/LexerNoExceptions.h",
    "content": "// Scintilla source code edit control\n/** @file LexerNoExceptions.h\n ** A simple lexer with no state.\n **/\n// Copyright 1998-2010 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#ifndef LEXERNOEXCEPTIONS_H\n#define LEXERNOEXCEPTIONS_H\n\nnamespace Lexilla {\n\n// A simple lexer with no state\nclass LexerNoExceptions : public LexerBase {\npublic:\n\t// TODO Also need to prevent exceptions in constructor and destructor\n\tSci_Position SCI_METHOD PropertySet(const char *key, const char *val) override;\n\tSci_Position SCI_METHOD WordListSet(int n, const char *wl) override;\n\tvoid SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, Scintilla::IDocument *pAccess) override;\n\tvoid SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, Scintilla::IDocument *) override;\n\n\tvirtual void Lexer(Sci_PositionU startPos, Sci_Position length, int initStyle, Scintilla::IDocument *pAccess, Accessor &styler) = 0;\n\tvirtual void Folder(Sci_PositionU startPos, Sci_Position length, int initStyle, Scintilla::IDocument *pAccess, Accessor &styler) = 0;\n};\n\n}\n\n#endif\n"
  },
  {
    "path": "lexilla/lexlib/LexerSimple.cxx",
    "content": "// Scintilla source code edit control\n/** @file LexerSimple.cxx\n ** A simple lexer with no state.\n **/\n// Copyright 1998-2010 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <cstdlib>\n#include <cassert>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n#include \"SciLexer.h\"\n\n#include \"PropSetSimple.h\"\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"LexerModule.h\"\n#include \"LexerBase.h\"\n#include \"LexerSimple.h\"\n\nusing namespace Lexilla;\n\nLexerSimple::LexerSimple(const LexerModule *module_) :\n\tLexerBase(module_->LexClasses(), module_->NamedStyles()),\n\tmodule(module_) {\n\tfor (int wl = 0; wl < module->GetNumWordLists(); wl++) {\n\t\tif (!wordLists.empty())\n\t\t\twordLists += \"\\n\";\n\t\twordLists += module->GetWordListDescription(wl);\n\t}\n}\n\nconst char * SCI_METHOD LexerSimple::DescribeWordListSets() {\n\treturn wordLists.c_str();\n}\n\nvoid SCI_METHOD LexerSimple::Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, Scintilla::IDocument *pAccess) {\n\tAccessor astyler(pAccess, &props);\n\tmodule->Lex(startPos, lengthDoc, initStyle, keyWordLists, astyler);\n\tastyler.Flush();\n}\n\nvoid SCI_METHOD LexerSimple::Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, Scintilla::IDocument *pAccess) {\n\tif (props.GetInt(\"fold\")) {\n\t\tAccessor astyler(pAccess, &props);\n\t\tmodule->Fold(startPos, lengthDoc, initStyle, keyWordLists, astyler);\n\t\tastyler.Flush();\n\t}\n}\n\nconst char * SCI_METHOD LexerSimple::GetName() {\n\treturn module->languageName;\n}\n\nint SCI_METHOD LexerSimple::GetIdentifier() {\n\treturn module->GetLanguage();\n}\n"
  },
  {
    "path": "lexilla/lexlib/LexerSimple.h",
    "content": "// Scintilla source code edit control\n/** @file LexerSimple.h\n ** A simple lexer with no state.\n **/\n// Copyright 1998-2010 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#ifndef LEXERSIMPLE_H\n#define LEXERSIMPLE_H\n\nnamespace Lexilla {\n\n// A simple lexer with no state\nclass LexerSimple : public LexerBase {\n\tconst LexerModule *module;\n\tstd::string wordLists;\npublic:\n\texplicit LexerSimple(const LexerModule *module_);\n\tconst char * SCI_METHOD DescribeWordListSets() override;\n\tvoid SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, Scintilla::IDocument *pAccess) override;\n\tvoid SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, Scintilla::IDocument *pAccess) override;\n\t// ILexer5 methods\n\tconst char * SCI_METHOD GetName() override;\n\tint SCI_METHOD  GetIdentifier() override;\n};\n\n}\n\n#endif\n"
  },
  {
    "path": "lexilla/lexlib/OptionSet.h",
    "content": "// Scintilla source code edit control\n/** @file OptionSet.h\n ** Manage descriptive information about an options struct for a lexer.\n ** Hold the names, positions, and descriptions of boolean, integer and string options and\n ** allow setting options and retrieving metadata about the options.\n **/\n// Copyright 2010 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#ifndef OPTIONSET_H\n#define OPTIONSET_H\n\nnamespace Lexilla {\n\ntemplate <typename T>\nclass OptionSet {\n\ttypedef T Target;\n\ttypedef bool T::*plcob;\n\ttypedef int T::*plcoi;\n\ttypedef std::string T::*plcos;\n\tstruct Option {\n\t\tint opType;\n\t\tunion {\n\t\t\tplcob pb;\n\t\t\tplcoi pi;\n\t\t\tplcos ps;\n\t\t};\n\t\tstd::string value;\n\t\tstd::string description;\n\t\tOption() :\n\t\t\topType(SC_TYPE_BOOLEAN), pb(nullptr) {\n\t\t}\n\t\tOption(plcob pb_, std::string_view description_=\"\") :\n\t\t\topType(SC_TYPE_BOOLEAN), pb(pb_), description(description_) {\n\t\t}\n\t\tOption(plcoi pi_, std::string_view description_) :\n\t\t\topType(SC_TYPE_INTEGER), pi(pi_), description(description_) {\n\t\t}\n\t\tOption(plcos ps_, std::string_view description_) :\n\t\t\topType(SC_TYPE_STRING), ps(ps_), description(description_) {\n\t\t}\n\t\tbool Set(T *base, const char *val) {\n\t\t\tvalue = val;\n\t\t\tswitch (opType) {\n\t\t\tcase SC_TYPE_BOOLEAN: {\n\t\t\t\t\tconst bool option = atoi(val) != 0;\n\t\t\t\t\tif ((*base).*pb != option) {\n\t\t\t\t\t\t(*base).*pb = option;\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tcase SC_TYPE_INTEGER: {\n\t\t\t\t\tconst int option = atoi(val);\n\t\t\t\t\tif ((*base).*pi != option) {\n\t\t\t\t\t\t(*base).*pi = option;\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tcase SC_TYPE_STRING: {\n\t\t\t\t\tif ((*base).*ps != val) {\n\t\t\t\t\t\t(*base).*ps = val;\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\tconst char *Get() const noexcept {\n\t\t\treturn value.c_str();\n\t\t}\n\t};\n\ttypedef std::map<std::string, Option, std::less<>> OptionMap;\n\tOptionMap nameToDef;\n\tstd::string names;\n\tstd::string wordLists;\n\n\tvoid AppendName(const char *name) {\n\t\tif (!names.empty())\n\t\t\tnames += \"\\n\";\n\t\tnames += name;\n\t}\npublic:\n\tvoid DefineProperty(const char *name, plcob pb, std::string_view description=\"\") {\n\t\tnameToDef[name] = Option(pb, description);\n\t\tAppendName(name);\n\t}\n\tvoid DefineProperty(const char *name, plcoi pi, std::string_view description=\"\") {\n\t\tnameToDef[name] = Option(pi, description);\n\t\tAppendName(name);\n\t}\n\tvoid DefineProperty(const char *name, plcos ps, std::string_view description=\"\") {\n\t\tnameToDef[name] = Option(ps, description);\n\t\tAppendName(name);\n\t}\n\ttemplate <typename E>\n\tvoid DefineProperty(const char *name, E T::*pe, std::string_view description=\"\") {\n\t\tstatic_assert(std::is_enum<E>::value);\n\t\tplcoi pi {};\n\t\tstatic_assert(sizeof(pe) == sizeof(pi));\n\t\tmemcpy(&pi, &pe, sizeof(pe));\n\t\tnameToDef[name] = Option(pi, description);\n\t\tAppendName(name);\n\t}\n\tconst char *PropertyNames() const noexcept {\n\t\treturn names.c_str();\n\t}\n\tint PropertyType(const char *name) const {\n\t\ttypename OptionMap::const_iterator const it = nameToDef.find(name);\n\t\tif (it != nameToDef.end()) {\n\t\t\treturn it->second.opType;\n\t\t}\n\t\treturn SC_TYPE_BOOLEAN;\n\t}\n\tconst char *DescribeProperty(const char *name) const {\n\t\ttypename OptionMap::const_iterator const it = nameToDef.find(name);\n\t\tif (it != nameToDef.end()) {\n\t\t\treturn it->second.description.c_str();\n\t\t}\n\t\treturn \"\";\n\t}\n\n\tbool PropertySet(T *base, const char *name, const char *val) {\n\t\ttypename OptionMap::iterator const it = nameToDef.find(name);\n\t\tif (it != nameToDef.end()) {\n\t\t\treturn it->second.Set(base, val);\n\t\t}\n\t\treturn false;\n\t}\n\n\tconst char *PropertyGet(const char *name) const {\n\t\ttypename OptionMap::const_iterator const it = nameToDef.find(name);\n\t\tif (it != nameToDef.end()) {\n\t\t\treturn it->second.Get();\n\t\t}\n\t\treturn nullptr;\n\t}\n\n\tvoid DefineWordListSets(const char * const wordListDescriptions[]) {\n\t\tif (wordListDescriptions) {\n\t\t\tfor (size_t wl = 0; wordListDescriptions[wl]; wl++) {\n\t\t\t\tif (wl > 0)\n\t\t\t\t\twordLists += \"\\n\";\n\t\t\t\twordLists += wordListDescriptions[wl];\n\t\t\t}\n\t\t}\n\t}\n\n\tconst char *DescribeWordListSets() const noexcept {\n\t\treturn wordLists.c_str();\n\t}\n};\n\n}\n\n#endif\n"
  },
  {
    "path": "lexilla/lexlib/PropSetSimple.cxx",
    "content": "// Scintilla source code edit control\n/** @file PropSetSimple.cxx\n ** A basic string to string map.\n **/\n// Copyright 1998-2010 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n// Maintain a dictionary of properties\n\n#include <cstdlib>\n#include <cassert>\n#include <cstring>\n\n#include <string>\n#include <string_view>\n#include <map>\n#include <functional>\n\n#include \"PropSetSimple.h\"\n\nusing namespace Lexilla;\n\nnamespace {\n\nusing mapss = std::map<std::string, std::string, std::less<>>;\n\nmapss *PropsFromPointer(void *impl) noexcept {\n\treturn static_cast<mapss *>(impl);\n}\n\n}\n\nPropSetSimple::PropSetSimple() {\n\tmapss *props = new mapss;\n\timpl = static_cast<void *>(props);\n}\n\nPropSetSimple::~PropSetSimple() {\n\tmapss *props = PropsFromPointer(impl);\n\tdelete props;\n\timpl = nullptr;\n}\n\nbool PropSetSimple::Set(std::string_view key, std::string_view val) {\n\tmapss *props = PropsFromPointer(impl);\n\tif (!props)\n\t\treturn false;\n\tmapss::iterator const it = props->find(key);\n\tif (it != props->end()) {\n\t\tif (val == it->second)\n\t\t\treturn false;\n\t\tit->second = val;\n\t} else {\n\t\tprops->emplace(key, val);\n\t}\n\treturn true;\n}\n\nconst char *PropSetSimple::Get(std::string_view key) const {\n\tmapss *props = PropsFromPointer(impl);\n\tif (props) {\n\t\tmapss::const_iterator const keyPos = props->find(key);\n\t\tif (keyPos != props->end()) {\n\t\t\treturn keyPos->second.c_str();\n\t\t}\n\t}\n\treturn \"\";\n}\n\nint PropSetSimple::GetInt(std::string_view key, int defaultValue) const {\n\tconst char *val = Get(key);\n\tassert(val);\n\tif (*val) {\n\t\treturn atoi(val);\n\t}\n\treturn defaultValue;\n}\n"
  },
  {
    "path": "lexilla/lexlib/PropSetSimple.h",
    "content": "// Scintilla source code edit control\n/** @file PropSetSimple.h\n ** A basic string to string map.\n **/\n// Copyright 1998-2009 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#ifndef PROPSETSIMPLE_H\n#define PROPSETSIMPLE_H\n\nnamespace Lexilla {\n\nclass PropSetSimple {\n\tvoid *impl;\npublic:\n\tPropSetSimple();\n\t// Deleted so PropSetSimple objects can not be copied.\n\tPropSetSimple(const PropSetSimple&) = delete;\n\tPropSetSimple(PropSetSimple&&) = delete;\n\tPropSetSimple &operator=(const PropSetSimple&) = delete;\n\tPropSetSimple &operator=(PropSetSimple&&) = delete;\n\tvirtual ~PropSetSimple();\n\n\tbool Set(std::string_view key, std::string_view val);\n\tconst char *Get(std::string_view key) const;\n\tint GetInt(std::string_view key, int defaultValue=0) const;\n};\n\n}\n\n#endif\n"
  },
  {
    "path": "lexilla/lexlib/SparseState.h",
    "content": "// Scintilla source code edit control\n/** @file SparseState.h\n ** Hold lexer state that may change rarely.\n ** This is often per-line state such as whether a particular type of section has been entered.\n ** A state continues until it is changed.\n **/\n// Copyright 2011 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#ifndef SPARSESTATE_H\n#define SPARSESTATE_H\n\nnamespace Lexilla {\n\ntemplate <typename T>\nclass SparseState {\n\tstruct State {\n\t\tSci_Position position;\n\t\tT value;\n\t\tconstexpr State(Sci_Position position_, T value_) noexcept :\n\t\t\tposition(position_), value(std::move(value_)) {\n\t\t}\n\t\tinline bool operator<(const State &other) const noexcept {\n\t\t\treturn position < other.position;\n\t\t}\n\t\tinline bool operator==(const State &other) const noexcept {\n\t\t\treturn (position == other.position) && (value == other.value);\n\t\t}\n\t};\n\tSci_Position positionFirst;\n\ttypedef std::vector<State> stateVector;\n\tstateVector states;\n\n\ttypename stateVector::iterator Find(Sci_Position position) {\n\t\tconst State searchValue(position, T());\n\t\treturn std::lower_bound(states.begin(), states.end(), searchValue);\n\t}\n\npublic:\n\texplicit SparseState(Sci_Position positionFirst_=-1) {\n\t\tpositionFirst = positionFirst_;\n\t}\n\tvoid Set(Sci_Position position, T value) {\n\t\tDelete(position);\n\t\tif (states.empty() || (value != states[states.size()-1].value)) {\n\t\t\tstates.push_back(State(position, value));\n\t\t}\n\t}\n\tT ValueAt(Sci_Position position) {\n\t\tif (states.empty())\n\t\t\treturn T();\n\t\tif (position < states[0].position)\n\t\t\treturn T();\n\t\ttypename stateVector::iterator low = Find(position);\n\t\tif (low == states.end()) {\n\t\t\treturn states[states.size()-1].value;\n\t\t} else {\n\t\t\tif (low->position > position) {\n\t\t\t\t--low;\n\t\t\t}\n\t\t\treturn low->value;\n\t\t}\n\t}\n\tbool Delete(Sci_Position position) {\n\t\ttypename stateVector::iterator low = Find(position);\n\t\tif (low != states.end()) {\n\t\t\tstates.erase(low, states.end());\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\tsize_t size() const {\n\t\treturn states.size();\n\t}\n\n\t// Returns true if Merge caused a significant change\n\tbool Merge(const SparseState<T> &other, Sci_Position ignoreAfter) {\n\t\t// Changes caused beyond ignoreAfter are not significant\n\t\tDelete(ignoreAfter+1);\n\n\t\tbool different = true;\n\t\tbool changed = false;\n\t\ttypename stateVector::iterator low = Find(other.positionFirst);\n\t\tif (static_cast<size_t>(states.end() - low) == other.states.size()) {\n\t\t\t// Same number in other as after positionFirst in this\n\t\t\tdifferent = !std::equal(low, states.end(), other.states.begin());\n\t\t}\n\t\tif (different) {\n\t\t\tif (low != states.end()) {\n\t\t\t\tstates.erase(low, states.end());\n\t\t\t\tchanged = true;\n\t\t\t}\n\t\t\ttypename stateVector::const_iterator startOther = other.states.begin();\n\t\t\tif (!states.empty() && !other.states.empty() && states.back().value == startOther->value)\n\t\t\t\t++startOther;\n\t\t\tif (startOther != other.states.end()) {\n\t\t\t\tstates.insert(states.end(), startOther, other.states.end());\n\t\t\t\tchanged = true;\n\t\t\t}\n\t\t}\n\t\treturn changed;\n\t}\n};\n\n}\n\n#endif\n"
  },
  {
    "path": "lexilla/lexlib/StringCopy.h",
    "content": "// Scintilla source code edit control\n/** @file StringCopy.h\n ** Safe string copy function which always NUL terminates.\n ** ELEMENTS macro for determining array sizes.\n **/\n// Copyright 2013 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#ifndef STRINGCOPY_H\n#define STRINGCOPY_H\n\nnamespace Lexilla {\n\n// Safer version of string copy functions like strcpy, wcsncpy, etc.\n// Instantiate over fixed length strings of both char and wchar_t.\n// May truncate if source doesn't fit into dest with room for NUL.\n\ntemplate <typename T, size_t count>\nvoid StringCopy(T (&dest)[count], const T* source) {\n\tfor (size_t i=0; i<count; i++) {\n\t\tdest[i] = source[i];\n\t\tif (!source[i])\n\t\t\tbreak;\n\t}\n\tdest[count-1] = 0;\n}\n\n#define ELEMENTS(a) (sizeof(a) / sizeof(a[0]))\n\n}\n\n#endif\n"
  },
  {
    "path": "lexilla/lexlib/StyleContext.cxx",
    "content": "// Scintilla source code edit control\n/** @file StyleContext.cxx\n ** Lexer infrastructure.\n **/\n// Copyright 1998-2004 by Neil Hodgson <neilh@scintilla.org>\n// This file is in the public domain.\n\n#include <cstdlib>\n#include <cstdint>\n#include <cassert>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n\nusing namespace Lexilla;\n\nStyleContext::StyleContext(Sci_PositionU startPos, Sci_PositionU length,\n\tint initStyle, LexAccessor &styler_, char chMask) :\n\tstyler(styler_),\n\tmultiByteAccess((styler.Encoding() == EncodingType::eightBit) ? nullptr : styler.MultiByteAccess()),\n\tlengthDocument(static_cast<Sci_PositionU>(styler.Length())),\n\tendPos(((startPos + length) < lengthDocument) ? (startPos + length) : (lengthDocument+1)),\n\tlineDocEnd(styler.GetLine(lengthDocument)),\n\tcurrentPosLastRelative(SIZE_MAX),\n\tcurrentPos(startPos),\n\tcurrentLine(styler.GetLine(startPos)),\n\tlineEnd(styler.LineEnd(currentLine)),\n\tlineStartNext(styler.LineStart(currentLine + 1)),\n\tatLineStart(static_cast<Sci_PositionU>(styler.LineStart(currentLine)) == startPos),\n\t// Mask off all bits which aren't in the chMask.\n\tstate(initStyle &chMask) {\n\n\tstyler.StartAt(startPos /*, chMask*/);\n\tstyler.StartSegment(startPos);\n\n\tchPrev = GetRelativeCharacter(-1);\n\n\t// Variable width is now 0 so GetNextChar gets the char at currentPos into chNext/widthNext\n\tGetNextChar();\n\tch = chNext;\n\twidth = widthNext;\n\n\tGetNextChar();\n}\n\nbool StyleContext::MatchIgnoreCase(const char *s) {\n\tif (MakeLowerCase(ch) != static_cast<unsigned char>(*s))\n\t\treturn false;\n\ts++;\n\tif (MakeLowerCase(chNext) != static_cast<unsigned char>(*s))\n\t\treturn false;\n\ts++;\n\tfor (int n = 2; *s; n++) {\n\t\tif (*s !=\n\t\t\tMakeLowerCase(styler.SafeGetCharAt(currentPos + n, 0)))\n\t\t\treturn false;\n\t\ts++;\n\t}\n\treturn true;\n}\n\nvoid StyleContext::GetCurrent(char *s, Sci_PositionU len) {\n\tstyler.GetRange(styler.GetStartSegment(), currentPos, s, len);\n}\n\nvoid StyleContext::GetCurrentLowered(char *s, Sci_PositionU len) {\n\tstyler.GetRangeLowered(styler.GetStartSegment(), currentPos, s, len);\n}\n\nvoid StyleContext::GetCurrentString(std::string &string, Transform transform) {\n\tconst Sci_PositionU startPos = styler.GetStartSegment();\n\tconst Sci_PositionU len = currentPos - styler.GetStartSegment();\n\tstring.resize(len);\n\tif (transform == Transform::lower) {\n\t\tstyler.GetRangeLowered(startPos, currentPos, string.data(), len + 1);\n\t} else {\n\t\tstyler.GetRange(startPos, currentPos, string.data(), len + 1);\n\t}\n}\n"
  },
  {
    "path": "lexilla/lexlib/StyleContext.h",
    "content": "// Scintilla source code edit control\n/** @file StyleContext.h\n ** Lexer infrastructure.\n **/\n// Copyright 1998-2004 by Neil Hodgson <neilh@scintilla.org>\n// This file is in the public domain.\n\n#ifndef STYLECONTEXT_H\n#define STYLECONTEXT_H\n\nnamespace Lexilla {\n\n// All languages handled so far can treat all characters >= 0x80 as one class\n// which just continues the current token or starts an identifier if in default.\n// DBCS treated specially as the second character can be < 0x80 and hence\n// syntactically significant. UTF-8 avoids this as all trail bytes are >= 0x80\nclass StyleContext {\n\tLexAccessor &styler;\n\tScintilla::IDocument * const multiByteAccess;\n\tconst Sci_PositionU lengthDocument;\n\tconst Sci_PositionU endPos;\n\tconst Sci_Position lineDocEnd;\n\n\t// Used for optimizing GetRelativeCharacter\n\tSci_PositionU posRelative = 0;\n\tSci_PositionU currentPosLastRelative;\n\tSci_Position offsetRelative = 0;\n\n\tvoid GetNextChar() {\n\t\tif (multiByteAccess) {\n\t\t\tchNext = multiByteAccess->GetCharacterAndWidth(currentPos+width, &widthNext);\n\t\t} else {\n\t\t\tconst unsigned char charNext = styler.SafeGetCharAt(currentPos + width, 0);\n\t\t\tchNext = charNext;\n\t\t}\n\t\t// End of line determined from line end position, allowing CR, LF,\n\t\t// CRLF and Unicode line ends as set by document.\n\t\tconst Sci_Position currentPosSigned = currentPos;\n\t\tif (currentLine < lineDocEnd)\n\t\t\tatLineEnd = currentPosSigned >= (lineStartNext-1);\n\t\telse // Last line\n\t\t\tatLineEnd = currentPosSigned >= lineStartNext;\n\t}\n\npublic:\n\tSci_PositionU currentPos;\n\tSci_Position currentLine;\n\tSci_Position lineEnd;\n\tSci_Position lineStartNext;\n\tbool atLineStart;\n\tbool atLineEnd = false;\n\tint state;\n\tint chPrev = 0;\n\tint ch = 0;\n\tSci_Position width = 0;\n\tint chNext = 0;\n\tSci_Position widthNext = 1;\n\n\tStyleContext(Sci_PositionU startPos, Sci_PositionU length,\n                        int initStyle, LexAccessor &styler_, char chMask = '\\377');\n\t// Deleted so StyleContext objects can not be copied.\n\tStyleContext(const StyleContext &) = delete;\n\tStyleContext &operator=(const StyleContext &) = delete;\n\tvoid Complete() {\n\t\tstyler.ColourTo(currentPos - ((currentPos > lengthDocument) ? 2 : 1), state);\n\t\tstyler.Flush();\n\t}\n\tbool More() const noexcept {\n\t\treturn currentPos < endPos;\n\t}\n\tvoid Forward() {\n\t\tif (currentPos < endPos) {\n\t\t\tatLineStart = atLineEnd;\n\t\t\tif (atLineStart) {\n\t\t\t\tcurrentLine++;\n\t\t\t\tlineEnd = styler.LineEnd(currentLine);\n\t\t\t\tlineStartNext = styler.LineStart(currentLine+1);\n\t\t\t}\n\t\t\tchPrev = ch;\n\t\t\tcurrentPos += width;\n\t\t\tch = chNext;\n\t\t\twidth = widthNext;\n\t\t\tGetNextChar();\n\t\t} else {\n\t\t\tatLineStart = false;\n\t\t\tchPrev = ' ';\n\t\t\tch = ' ';\n\t\t\tchNext = ' ';\n\t\t\tatLineEnd = true;\n\t\t}\n\t}\n\tvoid Forward(Sci_Position nb) {\n\t\tfor (Sci_Position i = 0; i < nb; i++) {\n\t\t\tForward();\n\t\t}\n\t}\n\tvoid ForwardBytes(Sci_Position nb) {\n\t\tconst Sci_PositionU forwardPos = currentPos + nb;\n\t\twhile (forwardPos > currentPos) {\n\t\t\tconst Sci_PositionU currentPosStart = currentPos;\n\t\t\tForward();\n\t\t\tif (currentPos == currentPosStart) {\n\t\t\t\t// Reached end\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\tvoid ChangeState(int state_) noexcept {\n\t\tstate = state_;\n\t}\n\tvoid SetState(int state_) {\n\t\tstyler.ColourTo(currentPos - ((currentPos > lengthDocument) ? 2 : 1), state);\n\t\tstate = state_;\n\t}\n\tvoid ForwardSetState(int state_) {\n\t\tForward();\n\t\tstyler.ColourTo(currentPos - ((currentPos > lengthDocument) ? 2 : 1), state);\n\t\tstate = state_;\n\t}\n\tSci_Position LengthCurrent() const noexcept {\n\t\treturn currentPos - styler.GetStartSegment();\n\t}\n\tint GetRelative(Sci_Position n, char chDefault='\\0') {\n\t\tconst unsigned char chRelative = styler.SafeGetCharAt(currentPos + n, chDefault);\n\t\treturn chRelative;\n\t}\n\tint GetRelativeCharacter(Sci_Position n) {\n\t\tif (n == 0)\n\t\t\treturn ch;\n\t\tif (multiByteAccess) {\n\t\t\tif ((currentPosLastRelative != currentPos) ||\n\t\t\t\t((n > 0) && ((offsetRelative < 0) || (n < offsetRelative))) ||\n\t\t\t\t((n < 0) && ((offsetRelative > 0) || (n > offsetRelative)))) {\n\t\t\t\tposRelative = currentPos;\n\t\t\t\toffsetRelative = 0;\n\t\t\t}\n\t\t\tconst Sci_Position diffRelative = n - offsetRelative;\n\t\t\tconst Sci_Position posNew = multiByteAccess->GetRelativePosition(posRelative, diffRelative);\n\t\t\tconst int chReturn = multiByteAccess->GetCharacterAndWidth(posNew, nullptr);\n\t\t\tposRelative = posNew;\n\t\t\tcurrentPosLastRelative = currentPos;\n\t\t\toffsetRelative = n;\n\t\t\treturn chReturn;\n\t\t} else {\n\t\t\t// fast version for single byte encodings\n\t\t\tconst unsigned char chRelative = styler.SafeGetCharAt(currentPos + n, 0);\n\t\t\treturn chRelative;\n\t\t}\n\t}\n\tbool MatchLineEnd() const noexcept {\n\t\tconst Sci_Position currentPosSigned = currentPos;\n\t\treturn currentPosSigned == lineEnd;\n\t}\n\tbool Match(char ch0) const noexcept {\n\t\tconst unsigned char uch0 = ch0;\n\t\treturn ch == uch0;\n\t}\n\tbool Match(char ch0, char ch1) const noexcept {\n\t\tconst unsigned char uch0 = ch0;\n\t\tconst unsigned char uch1 = ch1;\n\t\treturn (ch == uch0) && (chNext == uch1);\n\t}\n\tbool Match(const char *s) {\n\t\tconst unsigned char su = *s;\n\t\tif (ch != su)\n\t\t\treturn false;\n\t\ts++;\n\t\tif (!*s)\n\t\t\treturn true;\n\t\tconst unsigned char sNext = *s;\n\t\tif (chNext != sNext)\n\t\t\treturn false;\n\t\ts++;\n\t\tfor (int n=2; *s; n++) {\n\t\t\tif (*s != styler.SafeGetCharAt(currentPos+n, 0))\n\t\t\t\treturn false;\n\t\t\ts++;\n\t\t}\n\t\treturn true;\n\t}\n\t// Non-inline\n\tbool MatchIgnoreCase(const char *s);\n\tvoid GetCurrent(char *s, Sci_PositionU len);\n\tvoid GetCurrentLowered(char *s, Sci_PositionU len);\n\tenum class Transform { none, lower };\n\tvoid GetCurrentString(std::string &string, Transform transform);\n};\n\n}\n\n#endif\n"
  },
  {
    "path": "lexilla/lexlib/SubStyles.h",
    "content": "// Scintilla source code edit control\n/** @file SubStyles.h\n ** Manage substyles for a lexer.\n **/\n// Copyright 2012 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#ifndef SUBSTYLES_H\n#define SUBSTYLES_H\n\nnamespace Lexilla {\n\nclass WordClassifier {\n\tint baseStyle;\n\tint firstStyle;\n\tint lenStyles;\n\tusing WordStyleMap = std::map<std::string, int, std::less<>>;\n\tWordStyleMap wordToStyle;\n\npublic:\n\n\texplicit WordClassifier(int baseStyle_) : baseStyle(baseStyle_), firstStyle(0), lenStyles(0) {\n\t}\n\n\tvoid Allocate(int firstStyle_, int lenStyles_) noexcept {\n\t\tfirstStyle = firstStyle_;\n\t\tlenStyles = lenStyles_;\n\t\twordToStyle.clear();\n\t}\n\n\tint Base() const noexcept {\n\t\treturn baseStyle;\n\t}\n\n\tint Start() const noexcept {\n\t\treturn firstStyle;\n\t}\n\n\tint Last() const noexcept {\n\t\treturn firstStyle + lenStyles - 1;\n\t}\n\n\tint Length() const noexcept {\n\t\treturn lenStyles;\n\t}\n\n\tvoid Clear() noexcept {\n\t\tfirstStyle = 0;\n\t\tlenStyles = 0;\n\t\twordToStyle.clear();\n\t}\n\n\tint ValueFor(std::string_view s) const {\n\t\tWordStyleMap::const_iterator const it = wordToStyle.find(s);\n\t\tif (it != wordToStyle.end())\n\t\t\treturn it->second;\n\t\telse\n\t\t\treturn -1;\n\t}\n\n\tbool IncludesStyle(int style) const noexcept {\n\t\treturn (style >= firstStyle) && (style < (firstStyle + lenStyles));\n\t}\n\n\tvoid RemoveStyle(int style) noexcept {\n\t\tWordStyleMap::iterator it = wordToStyle.begin();\n\t\twhile (it != wordToStyle.end()) {\n\t\t\tif (it->second == style) {\n\t\t\t\tit = wordToStyle.erase(it);\n\t\t\t} else {\n\t\t\t\t++it;\n\t\t\t}\n\t\t}\n\t}\n\n\tvoid SetIdentifiers(int style, const char *identifiers) {\n\t\tRemoveStyle(style);\n\t\tif (!identifiers)\n\t\t\treturn;\n\t\twhile (*identifiers) {\n\t\t\tconst char *cpSpace = identifiers;\n\t\t\twhile (*cpSpace && !(*cpSpace == ' ' || *cpSpace == '\\t' || *cpSpace == '\\r' || *cpSpace == '\\n'))\n\t\t\t\tcpSpace++;\n\t\t\tif (cpSpace > identifiers) {\n\t\t\t\tconst std::string word(identifiers, cpSpace - identifiers);\n\t\t\t\twordToStyle[word] = style;\n\t\t\t}\n\t\t\tidentifiers = cpSpace;\n\t\t\tif (*identifiers)\n\t\t\t\tidentifiers++;\n\t\t}\n\t}\n};\n\n// This is the common configuration: 64 sub-styles allocated from 128 to 191\nconstexpr int SubStylesFirst = 0x80;\nconstexpr int SubStylesAvailable = 0x40;\n\nclass SubStyles {\n\tint classifications;\n\tconst char *baseStyles;\n\tint styleFirst;\n\tint stylesAvailable;\n\tint secondaryDistance;\n\tint allocated;\n\tstd::vector<WordClassifier> classifiers;\n\n\tint BlockFromBaseStyle(int baseStyle) const noexcept {\n\t\tfor (int b=0; b < classifications; b++) {\n\t\t\tif (baseStyle == baseStyles[b])\n\t\t\t\treturn b;\n\t\t}\n\t\treturn -1;\n\t}\n\n\tint BlockFromStyle(int style) const noexcept {\n\t\tint b = 0;\n\t\tfor (const WordClassifier &wc : classifiers) {\n\t\t\tif (wc.IncludesStyle(style))\n\t\t\t\treturn b;\n\t\t\tb++;\n\t\t}\n\t\treturn -1;\n\t}\n\npublic:\n\n\tSubStyles(const char *baseStyles_, int styleFirst_=SubStylesFirst, int stylesAvailable_=SubStylesAvailable, int secondaryDistance_=0) :\n\t\tclassifications(0),\n\t\tbaseStyles(baseStyles_),\n\t\tstyleFirst(styleFirst_),\n\t\tstylesAvailable(stylesAvailable_),\n\t\tsecondaryDistance(secondaryDistance_),\n\t\tallocated(0) {\n\t\twhile (baseStyles[classifications]) {\n\t\t\tclassifiers.push_back(WordClassifier(baseStyles[classifications]));\n\t\t\tclassifications++;\n\t\t}\n\t}\n\n\tint Allocate(int styleBase, int numberStyles) noexcept {\n\t\tconst int block = BlockFromBaseStyle(styleBase);\n\t\tif (block >= 0) {\n\t\t\tif ((allocated + numberStyles) > stylesAvailable)\n\t\t\t\treturn -1;\n\t\t\tconst int startBlock = styleFirst + allocated;\n\t\t\tallocated += numberStyles;\n\t\t\tclassifiers[block].Allocate(startBlock, numberStyles);\n\t\t\treturn startBlock;\n\t\t} else {\n\t\t\treturn -1;\n\t\t}\n\t}\n\n\tint Start(int styleBase) noexcept {\n\t\tconst int block = BlockFromBaseStyle(styleBase);\n\t\treturn (block >= 0) ? classifiers[block].Start() : -1;\n\t}\n\n\tint Length(int styleBase) noexcept {\n\t\tconst int block = BlockFromBaseStyle(styleBase);\n\t\treturn (block >= 0) ? classifiers[block].Length() : 0;\n\t}\n\n\tint BaseStyle(int subStyle) const noexcept {\n\t\tconst int block = BlockFromStyle(subStyle);\n\t\tif (block >= 0)\n\t\t\treturn classifiers[block].Base();\n\t\telse\n\t\t\treturn subStyle;\n\t}\n\n\tint DistanceToSecondaryStyles() const noexcept {\n\t\treturn secondaryDistance;\n\t}\n\n\tint FirstAllocated() const noexcept {\n\t\tint start = 257;\n\t\tfor (const WordClassifier &wc : classifiers) {\n\t\t\tif ((wc.Length() > 0) && (start > wc.Start()))\n\t\t\t\tstart = wc.Start();\n\t\t}\n\t\treturn (start < 256) ? start : -1;\n\t}\n\n\tint LastAllocated() const noexcept {\n\t\tint last = -1;\n\t\tfor (const WordClassifier &wc : classifiers) {\n\t\t\tif ((wc.Length() > 0) && (last < wc.Last()))\n\t\t\t\tlast = wc.Last();\n\t\t}\n\t\treturn last;\n\t}\n\n\tvoid SetIdentifiers(int style, const char *identifiers) {\n\t\tconst int block = BlockFromStyle(style);\n\t\tif (block >= 0)\n\t\t\tclassifiers[block].SetIdentifiers(style, identifiers);\n\t}\n\n\tvoid Free() noexcept {\n\t\tallocated = 0;\n\t\tfor (WordClassifier &wc : classifiers) {\n\t\t\twc.Clear();\n\t\t}\n\t}\n\n\tconst WordClassifier &Classifier(int baseStyle) const noexcept {\n\t\tconst int block = BlockFromBaseStyle(baseStyle);\n\t\treturn classifiers[block >= 0 ? block : 0];\n\t}\n};\n\n}\n\n#endif\n"
  },
  {
    "path": "lexilla/lexlib/WordList.cxx",
    "content": "// Scintilla source code edit control\n/** @file WordList.cxx\n ** Hold a list of words.\n **/\n// Copyright 1998-2002 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <cstdlib>\n#include <cassert>\n#include <cstring>\n\n#include <string>\n#include <algorithm>\n#include <iterator>\n#include <memory>\n\n#include \"WordList.h\"\n\nusing namespace Lexilla;\n\nnamespace {\n\n/**\n * Creates an array that points into each word in the string and puts \\0 terminators\n * after each word.\n */\nstd::unique_ptr<char *[]> ArrayFromWordList(char *wordlist, size_t slen, size_t *len, bool onlyLineEnds = false) {\n\tassert(wordlist);\n\tsize_t words = 0;\n\t// For rapid determination of whether a character is a separator, build\n\t// a look up table.\n\tbool wordSeparator[256] = {};\t// Initialise all to false.\n\twordSeparator[static_cast<unsigned int>('\\r')] = true;\n\twordSeparator[static_cast<unsigned int>('\\n')] = true;\n\tif (!onlyLineEnds) {\n\t\twordSeparator[static_cast<unsigned int>(' ')] = true;\n\t\twordSeparator[static_cast<unsigned int>('\\t')] = true;\n\t}\n\tunsigned char prev = '\\n';\n\tfor (int j = 0; wordlist[j]; j++) {\n\t\tconst unsigned char curr = wordlist[j];\n\t\tif (!wordSeparator[curr] && wordSeparator[prev])\n\t\t\twords++;\n\t\tprev = curr;\n\t}\n\tstd::unique_ptr<char *[]> keywords = std::make_unique<char *[]>(words + 1);\n\tsize_t wordsStore = 0;\n\tif (words) {\n\t\tunsigned char previous = '\\0';\n\t\tfor (size_t k = 0; k < slen; k++) {\n\t\t\tif (!wordSeparator[static_cast<unsigned char>(wordlist[k])]) {\n\t\t\t\tif (!previous) {\n\t\t\t\t\tkeywords[wordsStore] = &wordlist[k];\n\t\t\t\t\twordsStore++;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twordlist[k] = '\\0';\n\t\t\t}\n\t\t\tprevious = wordlist[k];\n\t\t}\n\t}\n\tassert(wordsStore < (words + 1));\n\tkeywords[wordsStore] = &wordlist[slen];\n\t*len = wordsStore;\n\treturn keywords;\n}\n\nbool cmpWords(const char *a, const char *b) noexcept {\n\treturn strcmp(a, b) < 0;\n}\n\n}\n\nWordList::WordList(bool onlyLineEnds_) noexcept :\n\twords(nullptr), list(nullptr), len(0), onlyLineEnds(onlyLineEnds_) {\n\t// Prevent warnings by static analyzers about uninitialized starts.\n\tstarts[0] = -1;\n}\n\nWordList::~WordList() {\n\tClear();\n}\n\nWordList::operator bool() const noexcept {\n\treturn len != 0;\n}\n\nbool WordList::operator!=(const WordList &other) const noexcept {\n\tif (len != other.len)\n\t\treturn true;\n\tfor (size_t i=0; i<len; i++) {\n\t\tif (strcmp(words[i], other.words[i]) != 0)\n\t\t\treturn true;\n\t}\n\treturn false;\n}\n\nint WordList::Length() const noexcept {\n\treturn static_cast<int>(len);\n}\n\nvoid WordList::Clear() noexcept {\n\tdelete []list;\n\tlist = nullptr;\n\tdelete []words;\n\twords = nullptr;\n\tlen = 0;\n}\n\nbool WordList::Set(const char *s) {\n\tconst size_t lenS = strlen(s) + 1;\n\tstd::unique_ptr<char[]> listTemp = std::make_unique<char[]>(lenS);\n\tmemcpy(listTemp.get(), s, lenS);\n\tsize_t lenTemp = 0;\n\tstd::unique_ptr<char *[]> wordsTemp = ArrayFromWordList(listTemp.get(), lenS - 1, &lenTemp, onlyLineEnds);\n\tstd::sort(wordsTemp.get(), wordsTemp.get() + lenTemp, cmpWords);\n\n\tif (lenTemp == len) {\n\t\tbool changed = false;\n\t\tfor (size_t i = 0; i < lenTemp; i++) {\n\t\t\tif (strcmp(words[i], wordsTemp[i]) != 0) {\n\t\t\t\tchanged = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (!changed) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tClear();\n\twords = wordsTemp.release();\n\tlist = listTemp.release();\n\tlen = lenTemp;\n\tstd::fill(starts, std::end(starts), -1);\n\tfor (int l = static_cast<int>(len - 1); l >= 0; l--) {\n\t\tunsigned char const indexChar = words[l][0];\n\t\tstarts[indexChar] = l;\n\t}\n\treturn true;\n}\n\n/** Check whether a string is in the list.\n * List elements are either exact matches or prefixes.\n * Prefix elements start with '^' and match all strings that start with the rest of the element\n * so '^GTK_' matches 'GTK_X', 'GTK_MAJOR_VERSION', and 'GTK_'.\n */\nbool WordList::InList(const char *s) const noexcept {\n\tif (!words)\n\t\treturn false;\n\tconst char first = s[0];\n\tconst unsigned char firstChar = first;\n\tint j = starts[firstChar];\n\tif (j >= 0) {\n\t\twhile (words[j][0] == first) {\n\t\t\tif (s[1] == words[j][1]) {\n\t\t\t\tconst char *a = words[j] + 1;\n\t\t\t\tconst char *b = s + 1;\n\t\t\t\twhile (*a && *a == *b) {\n\t\t\t\t\ta++;\n\t\t\t\t\tb++;\n\t\t\t\t}\n\t\t\t\tif (!*a && !*b)\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t\tj++;\n\t\t}\n\t}\n\tj = starts[static_cast<unsigned int>('^')];\n\tif (j >= 0) {\n\t\twhile (words[j][0] == '^') {\n\t\t\tconst char *a = words[j] + 1;\n\t\t\tconst char *b = s;\n\t\t\twhile (*a && *a == *b) {\n\t\t\t\ta++;\n\t\t\t\tb++;\n\t\t\t}\n\t\t\tif (!*a)\n\t\t\t\treturn true;\n\t\t\tj++;\n\t\t}\n\t}\n\treturn false;\n}\n\n/** convenience overload so can easily call with std::string.\n */\nbool WordList::InList(const std::string &s) const noexcept {\n\treturn InList(s.c_str());\n}\n\n/** similar to InList, but word s can be a substring of keyword.\n * eg. the keyword define is defined as def~ine. This means the word must start\n * with def to be a keyword, but also defi, defin and define are valid.\n * The marker is ~ in this case.\n */\nbool WordList::InListAbbreviated(const char *s, const char marker) const noexcept {\n\tif (!words)\n\t\treturn false;\n\tconst char first = s[0];\n\tconst unsigned char firstChar = first;\n\tint j = starts[firstChar];\n\tif (j >= 0) {\n\t\twhile (words[j][0] == first) {\n\t\t\tbool isSubword = false;\n\t\t\tint start = 1;\n\t\t\tif (words[j][1] == marker) {\n\t\t\t\tisSubword = true;\n\t\t\t\tstart++;\n\t\t\t}\n\t\t\tif (s[1] == words[j][start]) {\n\t\t\t\tconst char *a = words[j] + start;\n\t\t\t\tconst char *b = s + 1;\n\t\t\t\twhile (*a && *a == *b) {\n\t\t\t\t\ta++;\n\t\t\t\t\tif (*a == marker) {\n\t\t\t\t\t\tisSubword = true;\n\t\t\t\t\t\ta++;\n\t\t\t\t\t}\n\t\t\t\t\tb++;\n\t\t\t\t}\n\t\t\t\tif ((!*a || isSubword) && !*b)\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t\tj++;\n\t\t}\n\t}\n\tj = starts[static_cast<unsigned int>('^')];\n\tif (j >= 0) {\n\t\twhile (words[j][0] == '^') {\n\t\t\tconst char *a = words[j] + 1;\n\t\t\tconst char *b = s;\n\t\t\twhile (*a && *a == *b) {\n\t\t\t\ta++;\n\t\t\t\tb++;\n\t\t\t}\n\t\t\tif (!*a)\n\t\t\t\treturn true;\n\t\t\tj++;\n\t\t}\n\t}\n\treturn false;\n}\n\n/** similar to InListAbbreviated, but word s can be an abridged version of a keyword.\n* eg. the keyword is defined as \"after.~:\". This means the word must have a prefix (begins with) of\n* \"after.\" and suffix (ends with) of \":\" to be a keyword, Hence \"after.field:\" , \"after.form.item:\" are valid.\n* Similarly \"~.is.valid\" keyword is suffix only... hence \"field.is.valid\" , \"form.is.valid\" are valid.\n* The marker is ~ in this case.\n* No multiple markers check is done and wont work.\n*/\nbool WordList::InListAbridged(const char *s, const char marker) const noexcept {\n\tif (!words)\n\t\treturn false;\n\tconst char first = s[0];\n\tconst unsigned char firstChar = first;\n\tint j = starts[firstChar];\n\tif (j >= 0) {\n\t\twhile (words[j][0] == first) {\n\t\t\tconst char *a = words[j];\n\t\t\tconst char *b = s;\n\t\t\twhile (*a && *a == *b) {\n\t\t\t\ta++;\n\t\t\t\tif (*a == marker) {\n\t\t\t\t\ta++;\n\t\t\t\t\tconst size_t suffixLengthA = strlen(a);\n\t\t\t\t\tconst size_t suffixLengthB = strlen(b);\n\t\t\t\t\tif (suffixLengthA >= suffixLengthB)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tb = b + suffixLengthB - suffixLengthA - 1;\n\t\t\t\t}\n\t\t\t\tb++;\n\t\t\t}\n\t\t\tif (!*a  && !*b)\n\t\t\t\treturn true;\n\t\t\tj++;\n\t\t}\n\t}\n\n\tj = starts[static_cast<unsigned int>(marker)];\n\tif (j >= 0) {\n\t\twhile (words[j][0] == marker) {\n\t\t\tconst char *a = words[j] + 1;\n\t\t\tconst char *b = s;\n\t\t\tconst size_t suffixLengthA = strlen(a);\n\t\t\tconst size_t suffixLengthB = strlen(b);\n\t\t\tif (suffixLengthA > suffixLengthB) {\n\t\t\t\tj++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tb = b + suffixLengthB - suffixLengthA;\n\n\t\t\twhile (*a && *a == *b) {\n\t\t\t\ta++;\n\t\t\t\tb++;\n\t\t\t}\n\t\t\tif (!*a && !*b)\n\t\t\t\treturn true;\n\t\t\tj++;\n\t\t}\n\t}\n\n\treturn false;\n}\n\nconst char *WordList::WordAt(int n) const noexcept {\n\treturn words[n];\n}\n\n"
  },
  {
    "path": "lexilla/lexlib/WordList.h",
    "content": "// Scintilla source code edit control\n/** @file WordList.h\n ** Hold a list of words.\n **/\n// Copyright 1998-2010 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#ifndef WORDLIST_H\n#define WORDLIST_H\n\nnamespace Lexilla {\n\n/**\n */\nclass WordList {\n\t// Each word contains at least one character - an empty word acts as sentinel at the end.\n\tchar **words;\n\tchar *list;\n\tsize_t len;\n\tbool onlyLineEnds;\t///< Delimited by any white space or only line ends\n\tint starts[256];\npublic:\n\texplicit WordList(bool onlyLineEnds_ = false) noexcept;\n\t// Deleted so WordList objects can not be copied.\n\tWordList(const WordList &) = delete;\n\tWordList(WordList &&) = delete;\n\tWordList &operator=(const WordList &) = delete;\n\tWordList &operator=(WordList &&) = delete;\n\t~WordList();\n\toperator bool() const noexcept;\n\tbool operator!=(const WordList &other) const noexcept;\n\tint Length() const noexcept;\n\tvoid Clear() noexcept;\n\tbool Set(const char *s);\n\tbool InList(const char *s) const noexcept;\n\tbool InList(const std::string &s) const noexcept;\n\tbool InListAbbreviated(const char *s, const char marker) const noexcept;\n\tbool InListAbridged(const char *s, const char marker) const noexcept;\n\tconst char *WordAt(int n) const noexcept;\n};\n\n}\n\n#endif\n"
  },
  {
    "path": "lexilla/scripts/HeaderOrder.txt",
    "content": "// Define the standard order in which to include header files\n// All platform headers should be included before Scintilla headers\n// and each of these groups are then divided into directory groups.\n\n// Base of the repository relative to this file\n\n//base:..\n\n// File patterns to check:\n\n//source:include/*.h\n//source:src/*.cxx\n//source:lexlib/*.cxx\n//source:lexers/*.cxx\n//source:access/*.cxx\n//source:test/*.cxx\n//source:test/unit/*.cxx\n\n// C standard library\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <ctype.h>\n\n// C++ wrappers of C standard library\n#include <cstdlib>\n#include <cstdint>\n#include <cassert>\n#include <cstring>\n#include <cctype>\n#include <cstdio>\n#include <cstdarg>\n\n// C++ standard library\n#include <utility>\n#include <string>\n#include <string_view>\n#include <vector>\n#include <map>\n#include <set>\n#include <optional>\n#include <initializer_list>\n#include <algorithm>\n#include <iterator>\n#include <functional>\n#include <memory>\n#include <regex>\n#include <iostream>\n#include <sstream>\n#include <fstream>\n#include <iomanip>\n#include <filesystem>\n\n// POSIX\n#include <dlfcn.h>\n\n// Windows header needed for loading DLL\n#include <windows.h>\n\n// Scintilla/Lexilla headers\n\n// Non-platform-specific headers\n\n// Scintilla include\n\n#include \"Sci_Position.h\"\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n\n// Lexilla include\n\n#include \"SciLexer.h\"\n#include \"Lexilla.h\"\n\n// access\n\n#include \"LexillaAccess.h\"\n\n// lexlib\n#include \"StringCopy.h\"\n#include \"PropSetSimple.h\"\n#include \"InList.h\"\n#include \"WordList.h\"\n#include \"LexAccessor.h\"\n#include \"Accessor.h\"\n#include \"StyleContext.h\"\n#include \"CharacterSet.h\"\n#include \"CharacterCategory.h\"\n#include \"LexerModule.h\"\n#include \"CatalogueModules.h\"\n#include \"OptionSet.h\"\n#include \"SparseState.h\"\n#include \"SubStyles.h\"\n#include \"DefaultLexer.h\"\n#include \"LexerBase.h\"\n#include \"LexerSimple.h\"\n#include \"LexerNoExceptions.h\"\n\n// test\n\n#include \"TestDocument.h\"\n\n// Catch testing framework\n#include \"catch.hpp\"\n\n"
  },
  {
    "path": "lexilla/scripts/LexFacer.py",
    "content": "#!/usr/bin/env python3\n# LexFacer.py - regenerate the SciLexer.h files from the Scintilla.iface interface\n# definition file.\n# Implemented 2000 by Neil Hodgson neilh@scintilla.org\n# Requires Python 3.6 or later\n\nimport os, pathlib, sys\n\nsys.path.append(os.path.join(\"..\", \"..\", \"scintilla\", \"scripts\"))\n\nimport Face\nimport FileGenerator\n\ndef printLexHFile(f):\n\tout = []\n\tfor name in f.order:\n\t\tv = f.features[name]\n\t\tif v[\"FeatureType\"] in [\"val\"]:\n\t\t\tif \"SCE_\" in name or \"SCLEX_\" in name:\n\t\t\t\tout.append(\"#define \" + name + \" \" + v[\"Value\"])\n\treturn out\n\ndef RegenerateAll(root, _showMaxID):\n\tf = Face.Face()\n\tf.ReadFromFile(root / \"include/LexicalStyles.iface\")\n\tFileGenerator.Regenerate(root / \"include/SciLexer.h\", \"/* \", printLexHFile(f))\n\nif __name__ == \"__main__\":\n\tRegenerateAll(pathlib.Path(__file__).resolve().parent.parent, True)\n"
  },
  {
    "path": "lexilla/scripts/LexillaData.py",
    "content": "#!/usr/bin/env python3\n# LexillaData.py - implemented 2013 by Neil Hodgson neilh@scintilla.org\n# Released to the public domain.\n# Requires FileGenerator from Scintilla so scintilla must be a peer directory of lexilla.\n\n\"\"\"\nCommon code used by Lexilla and SciTE for source file regeneration.\n\"\"\"\n\n# The LexillaData object exposes information about Lexilla as properties:\n# Version properties\n#     version\n#     versionDotted\n#     versionCommad\n#\n# Date last modified\n#     dateModified\n#     yearModified\n#     mdyModified\n#     dmyModified\n#     myModified\n#\n# Information about lexers and properties defined in lexers\n#     lexFiles\n#         sorted list of lexer file stems like LexAbaqus\n#     lexerModules\n#         sorted list of module names like lmAbaqus\n#     lexerProperties\n#         sorted list of lexer properties like lexer.bash.command.substitution\n#     propertyDocuments\n#         dictionary of property documentation { name: document string }\n#         like lexer.bash.special.parameter: Set shell (default is Bash) special parameters.\n#     sclexFromName\n#         dictionary of SCLEX_* IDs { name: SCLEX_ID } like ave: SCLEX_AVE\n#     fileFromSclex\n#         dictionary of file names { SCLEX_ID: file name } like SCLEX_AU3: LexAU3.cxx\n#     lexersXcode\n#         dictionary of project file UUIDs { file name: [build UUID, file UUID] }\n#         like  LexTCL: [28BA733B24E34D9700272C2D,28BA72C924E34D9100272C2D]\n#     credits\n#         list of names of contributors like Atsuo Ishimoto\n\n# This file can be run to see the data it provides.\n# Requires Python 3.6 or later\n\nimport datetime, pathlib, sys, textwrap\n\nneutralEncoding = \"iso-8859-1\"\t# Each byte value is valid in iso-8859-1\n\ndef ReadFileAsList(path):\n    \"\"\"Read all the lnes in the file and return as a list of strings without line ends.\n    \"\"\"\n    with path.open(encoding=\"utf-8\") as f:\n        return [line.rstrip('\\n') for line in f]\n\ndef FindModules(lexFile):\n    \"\"\" Return a list of modules found within a lexer implementation file. \"\"\"\n    modules = []\n    partLine = \"\"\n    with lexFile.open(encoding=neutralEncoding) as f:\n        lineNum = 0\n        for line in f.readlines():\n            lineNum += 1\n            line = line.rstrip()\n            if partLine or line.startswith(\"LexerModule\"):\n                if \")\" in line:\n                    line = partLine + line\n                    original = line\n                    line = line.replace(\"(\", \" \")\n                    line = line.replace(\")\", \" \")\n                    line = line.replace(\",\", \" \")\n                    parts = line.split()\n                    lexerName = parts[4]\n                    if not (lexerName.startswith('\"') and lexerName.endswith('\"')):\n                        print(f\"{lexFile}:{lineNum}: Bad LexerModule statement:\\n{original}\")\n                        sys.exit(1)\n                    lexerName = lexerName.strip('\"')\n                    modules.append([parts[1], parts[2], lexerName])\n                    partLine = \"\"\n                else:\n                    partLine = partLine + line\n    return modules\n\ndef FindSectionInList(lines, markers):\n    \"\"\"Find a section defined by an initial start marker, an optional secondary\n    marker and an end marker.\n    The section is between the secondary/initial start and the end.\n    Report as a slice object so the section can be extracted or replaced.\n    Raises an exception if the markers can't be found.\n    Currently only used for Xcode project files.\n    \"\"\"\n    start = -1\n    end = -1\n    state = 0\n    for i, line in enumerate(lines):\n        if markers[0] in line:\n            if markers[1]:\n                state = 1\n            else:\n                start = i+1\n                state = 2\n        elif state == 1:\n            if markers[1] in line:\n                start = i+1\n                state = 2\n        elif state == 2:\n            if markers[2] in line:\n                end = i\n                state = 3\n    # Check that section was found\n    if start == -1:\n        raise ValueError(\"Could not find start marker(s) |\" + markers[0] + \"|\" + markers[1] + \"|\")\n    if end == -1:\n        raise ValueError(\"Could not find end marker \" + markers[2])\n    return slice(start, end)\n\ndef FindLexersInXcode(xCodeProject):\n    \"\"\" Return a dictionary { file name: [build UUID, file UUID] } of lexers in Xcode project. \"\"\"\n    lines = ReadFileAsList(xCodeProject)\n\n    # PBXBuildFile section is a list of all buildable files in the project so extract the file\n    # basename and its build and file IDs\n    uidsOfBuild = {}\n    markersPBXBuildFile = [\"Begin PBXBuildFile section\", \"\", \"End PBXBuildFile section\"]\n    for buildLine in lines[FindSectionInList(lines, markersPBXBuildFile)]:\n        # Occurs for each file in the build. Find the UIDs used for the file.\n        #\\t\\t[0-9A-F]+ /* [a-zA-Z]+.cxx in sources */ = {isa = PBXBuildFile; fileRef = [0-9A-F]+ /* [a-zA-Z]+ */; };\n        pieces = buildLine.split()\n        uid1 = pieces[0]\n        filename = pieces[2].split(\".\")[0]\n        uid2 = pieces[12]\n        uidsOfBuild[filename] = [uid1, uid2]\n\n    # PBXGroup section contains the folders (Lexilla, Lexers, LexLib, ...) so is used to find the lexers\n    lexers = {}\n    markersLexers = [\"/* Lexers */ =\", \"children\", \");\"]\n    for lexerLine in lines[FindSectionInList(lines, markersLexers)]:\n        #\\t\\t\\t\\t[0-9A-F]+ /* [a-zA-Z]+.cxx */,\n        uid, _, rest = lexerLine.partition(\"/* \")\n        uid = uid.strip()\n        lexer, _, _ = rest.partition(\".\")\n        lexers[lexer] = uidsOfBuild[lexer]\n\n    return lexers\n\n# Properties that start with lexer. or fold. are automatically found but there are some\n# older properties that don't follow this pattern so must be explicitly listed.\nknownIrregularProperties = [\n    \"fold\",\n    \"styling.within.preprocessor\",\n    \"tab.timmy.whinge.level\",\n    \"asp.default.language\",\n    \"html.tags.case.sensitive\",\n    \"ps.level\",\n    \"ps.tokenize\",\n    \"sql.backslash.escapes\",\n    \"nsis.uservars\",\n    \"nsis.ignorecase\"\n]\n\ndef FindProperties(lexFile):\n    \"\"\" Return a set of property names in a lexer implementation file. \"\"\"\n    properties = set()\n    with open(lexFile, encoding=neutralEncoding) as f:\n        for s in f.readlines():\n            if (\"GetProperty\" in s or \"DefineProperty\" in s) and \"\\\"\" in s:\n                s = s.strip()\n                if not s.startswith(\"//\"):\t# Drop comments\n                    propertyName = s.split(\"\\\"\")[1]\n                    if propertyName.lower() == propertyName:\n                        # Only allow lower case property names\n                        if propertyName in knownIrregularProperties or \\\n                            propertyName.startswith(\"fold.\") or \\\n                            propertyName.startswith(\"lexer.\"):\n                            properties.add(propertyName)\n    return properties\n\ndef FindPropertyDocumentation(lexFile):\n    \"\"\" Return a dictionary { name: document string } of property documentation in a lexer. \"\"\"\n    documents = {}\n    with lexFile.open(encoding=neutralEncoding) as f:\n        name = \"\"\n        for line in f.readlines():\n            line = line.strip()\n            if \"// property \" in line:\n                propertyName = line.split()[2]\n                if propertyName.lower() == propertyName:\n                    # Only allow lower case property names\n                    name = propertyName\n                    documents[name] = \"\"\n            elif \"DefineProperty\" in line and \"\\\"\" in line:\n                propertyName = line.split(\"\\\"\")[1]\n                if propertyName.lower() == propertyName:\n                    # Only allow lower case property names\n                    name = propertyName\n                    documents[name] = \"\"\n            elif name:\n                if line.startswith(\"//\"):\n                    if documents[name]:\n                        documents[name] += \" \"\n                    documents[name] += line[2:].strip()\n                elif line.startswith(\"\\\"\"):\n                    line = line[1:].strip()\n                    if line.endswith(\";\"):\n                        line = line[:-1].strip()\n                    if line.endswith(\")\"):\n                        line = line[:-1].strip()\n                    if line.endswith(\"\\\"\"):\n                        line = line[:-1]\n                    # Fix escaped double quotes\n                    line = line.replace(\"\\\\\\\"\", \"\\\"\")\n                    documents[name] += line\n                else:\n                    name = \"\"\n    for name in list(documents.keys()):\n        if documents[name] == \"\":\n            del documents[name]\n    return documents\n\ndef FindCredits(historyFile):\n    \"\"\" Return a list of contributors in a history file. \"\"\"\n    creditList = []\n    stage = 0\n    with historyFile.open(encoding=\"utf-8\") as f:\n        for line in f.readlines():\n            line = line.strip()\n            if stage == 0 and line == \"<table>\":\n                stage = 1\n            elif stage == 1 and line == \"</table>\":\n                stage = 2\n            if stage == 1 and line.startswith(\"<td>\"):\n                credit = line[4:-5]\n                if \"<a\" in line:\n                    title, dummy, rest = credit.partition(\"<a href=\")\n                    urlplus, _bracket, end = rest.partition(\">\")\n                    name = end.split(\"<\")[0]\n                    url = urlplus[1:-1]\n                    credit = title.strip()\n                    if credit:\n                        credit += \" \"\n                    credit += name + \" \" + url\n                creditList.append(credit)\n    return creditList\n\ndef ciKey(a):\n    \"\"\" Return a string lowered to be used when sorting. \"\"\"\n    return str(a).lower()\n\ndef SortListInsensitive(l):\n    \"\"\" Sort a list of strings case insensitively. \"\"\"\n    l.sort(key=ciKey)\n\nclass LexillaData:\n    \"\"\" Expose information about Lexilla as properties. \"\"\"\n\n    def __init__(self, scintillaRoot):\n        # Discover version information\n        self.version = (scintillaRoot / \"version.txt\").read_text().strip()\n        self.versionDotted = self.version[0:-2] + '.' + self.version[-2] + '.' + \\\n            self.version[-1]\n        self.versionCommad = self.versionDotted.replace(\".\", \", \") + ', 0'\n\n        with (scintillaRoot / \"doc\" / \"Lexilla.html\").open() as f:\n            self.dateModified = [d for d in f.readlines() if \"Date.Modified\" in d]\\\n                [0].split('\\\"')[3]\n            # 20130602\n            # Lexilla.html\n            dtModified = datetime.datetime.strptime(self.dateModified, \"%Y%m%d\")\n            self.yearModified = self.dateModified[0:4]\n            monthModified = dtModified.strftime(\"%B\")\n            dayModified = f\"{dtModified.day}\"\n            self.mdyModified = monthModified + \" \" + dayModified + \" \" + self.yearModified\n            # May 22 2013\n            # Lexilla.html, SciTE.html\n            self.dmyModified = dayModified + \" \" + monthModified + \" \" + self.yearModified\n            # 22 May 2013\n            # LexillaHistory.html -- only first should change\n            self.myModified = monthModified + \" \" + self.yearModified\n\n        # Find all the lexer source code files\n        lexFilePaths = list((scintillaRoot / \"lexers\").glob(\"Lex*.cxx\"))\n        SortListInsensitive(lexFilePaths)\n        self.lexFiles = [f.stem for f in lexFilePaths]\n        self.lexerModules = []\n        lexerProperties = set()\n        self.propertyDocuments = {}\n        self.sclexFromName = {}\n        self.fileFromSclex = {}\n        for lexFile in lexFilePaths:\n            modules = FindModules(lexFile)\n            for module in modules:\n                self.sclexFromName[module[2]] = module[1]\n                self.fileFromSclex[module[1]] = lexFile\n                self.lexerModules.append(module[0])\n            for prop in FindProperties(lexFile):\n                lexerProperties.add(prop)\n            documents = FindPropertyDocumentation(lexFile)\n            for prop, doc in documents.items():\n                if prop not in self.propertyDocuments:\n                    self.propertyDocuments[prop] = doc\n        SortListInsensitive(self.lexerModules)\n        self.lexerProperties = list(lexerProperties)\n        SortListInsensitive(self.lexerProperties)\n\n        self.lexersXcode = FindLexersInXcode(scintillaRoot /\n            \"src/Lexilla/Lexilla.xcodeproj/project.pbxproj\")\n        self.credits = FindCredits(scintillaRoot / \"doc\" / \"LexillaHistory.html\")\n\ndef printWrapped(text):\n    \"\"\" Print string wrapped with subsequent lines indented. \"\"\"\n    print(textwrap.fill(text, subsequent_indent=\"    \"))\n\nif __name__==\"__main__\":\n    sci = LexillaData(pathlib.Path(__file__).resolve().parent.parent)\n    print(f\"Version   {sci.version}   {sci.versionDotted}   {sci.versionCommad}\")\n    print(f\"Date last modified    {sci.dateModified}   {sci.yearModified}   {sci.mdyModified}\"\n        f\"   {sci.dmyModified}   {sci.myModified}\")\n    printWrapped(str(len(sci.lexFiles)) + \" lexer files: \" + \", \".join(sci.lexFiles))\n    printWrapped(str(len(sci.lexerModules)) + \" lexer modules: \" + \", \".join(sci.lexerModules))\n    #~ printWrapped(str(len(sci.lexersXcode)) + \" Xcode lexer references: \" + \", \".join(\n        #~ [lex+\":\"+uids[0]+\",\"+uids[1] for lex, uids in sci.lexersXcode.items()]))\n    print(\"Lexer name to ID:\")\n    lexNames = sorted(sci.sclexFromName.keys())\n    for lexName in lexNames:\n        sclex = sci.sclexFromName[lexName]\n        fileName = sci.fileFromSclex[sclex].name\n        print(\"    \" + lexName + \" -> \" + sclex + \" in \" + fileName)\n    printWrapped(\"Lexer properties: \" + \", \".join(sci.lexerProperties))\n    print(\"Lexer property documentation:\")\n    documentProperties = list(sci.propertyDocuments.keys())\n    SortListInsensitive(documentProperties)\n    for k in documentProperties:\n        print(\"    \" + k)\n        print(textwrap.fill(sci.propertyDocuments[k], initial_indent=\"        \",\n            subsequent_indent=\"        \"))\n    print(\"Credits:\")\n    for c in sci.credits:\n        sys.stdout.buffer.write(b\"    \" + c.encode(\"utf-8\") + b\"\\n\")\n"
  },
  {
    "path": "lexilla/scripts/LexillaGen.py",
    "content": "#!/usr/bin/env python3\n# LexillaGen.py - implemented 2019 by Neil Hodgson neilh@scintilla.org\n# Released to the public domain.\n\n\"\"\"\nRegenerate the Lexilla source files that list all the lexers.\n\"\"\"\n\n# Should be run whenever a new lexer is added or removed.\n# Requires Python 3.6 or later\n# Files are regenerated in place with templates stored in comments.\n# The format of generation comments is documented in FileGenerator.py.\n\nimport os, pathlib, sys, uuid\n\nthisPath = pathlib.Path(__file__).resolve()\n\nsys.path.append(str(thisPath.parent.parent.parent / \"scintilla\" / \"scripts\"))\n\nfrom FileGenerator import Regenerate, UpdateLineInFile, \\\n    ReplaceREInFile, UpdateLineInPlistFile, UpdateFileFromLines\nimport LexillaData\nimport LexFacer\n\nsys.path.append(str(thisPath.parent.parent / \"src\"))\nimport DepGen\n\n# RegenerateXcodeProject and associated functions are copied from scintilla/scripts/LexGen.py\n\ndef uid24():\n    \"\"\" Last 24 digits of UUID, used for item IDs in Xcode. \"\"\"\n    return str(uuid.uuid4()).replace(\"-\", \"\").upper()[-24:]\n\ndef ciLexerKey(a):\n    \"\"\" Return 3rd element of string lowered to be used when sorting. \"\"\"\n    return a.split()[2].lower()\n\n\n\"\"\"\n\t\t11F35FDB12AEFAF100F0236D /* LexA68k.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 11F35FDA12AEFAF100F0236D /* LexA68k.cxx */; };\n\t\t11F35FDA12AEFAF100F0236D /* LexA68k.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexA68k.cxx; path = ../../lexers/LexA68k.cxx; sourceTree = SOURCE_ROOT; };\n\t\t\t\t11F35FDA12AEFAF100F0236D /* LexA68k.cxx */,\n\t\t\t\t11F35FDB12AEFAF100F0236D /* LexA68k.cxx in Sources */,\n\"\"\"\ndef RegenerateXcodeProject(path, lexers, lexerReferences):\n    \"\"\" Regenerate project to include any new lexers. \"\"\"\n    # Build 4 blocks for insertion:\n    # Each markers contains a unique section start, an optional wait string, and a section end\n\n    markersPBXBuildFile = [\"Begin PBXBuildFile section\", \"\", \"End PBXBuildFile section\"]\n    sectionPBXBuildFile = []\n\n    markersPBXFileReference = [\"Begin PBXFileReference section\", \"\", \"End PBXFileReference section\"]\n    sectionPBXFileReference = []\n\n    markersLexers = [\"/* Lexers */ =\", \"children\", \");\"]\n    sectionLexers = []\n\n    markersPBXSourcesBuildPhase = [\"Begin PBXSourcesBuildPhase section\", \"files\", \");\"]\n    sectionPBXSourcesBuildPhase = []\n\n    for lexer in lexers:\n        if lexer not in lexerReferences:\n            uid1 = uid24()\n            uid2 = uid24()\n            print(\"Lexer\", lexer, \"is not in Xcode project. Use IDs\", uid1, uid2)\n            lexerReferences[lexer] = [uid1, uid2]\n            linePBXBuildFile = f\"\\t\\t{uid1} /* {lexer}.cxx in Sources */ = {{isa = PBXBuildFile; fileRef = {uid2} /* {lexer}.cxx */; }};\"\n            linePBXFileReference = f\"\\t\\t{uid2} /* {lexer}.cxx */ = {{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = {lexer}.cxx; path = ../../lexers/{lexer}.cxx; sourceTree = SOURCE_ROOT; }};\"\n            lineLexers = f\"\\t\\t\\t\\t{uid2} /* {lexer}.cxx */,\"\n            linePBXSourcesBuildPhase = f\"\\t\\t\\t\\t{uid1} /* {lexer}.cxx in Sources */,\"\n            sectionPBXBuildFile.append(linePBXBuildFile)\n            sectionPBXFileReference.append(linePBXFileReference)\n            sectionLexers.append(lineLexers)\n            sectionPBXSourcesBuildPhase.append(linePBXSourcesBuildPhase)\n\n    lines = LexillaData.ReadFileAsList(path)\n\n    sli = LexillaData.FindSectionInList(lines, markersPBXBuildFile)\n    lines[sli.stop:sli.stop] = sectionPBXBuildFile\n\n    sli = LexillaData.FindSectionInList(lines, markersPBXFileReference)\n    lines[sli.stop:sli.stop] = sectionPBXFileReference\n\n    sli = LexillaData.FindSectionInList(lines, markersLexers)\n    # This section is shown in the project outline so sort it to make it easier to navigate.\n    allLexers = sorted(lines[sli.start:sli.stop] + sectionLexers, key=ciLexerKey)\n    lines[sli] = allLexers\n\n    sli = LexillaData.FindSectionInList(lines, markersPBXSourcesBuildPhase)\n    lines[sli.stop:sli.stop] = sectionPBXSourcesBuildPhase\n\n    UpdateFileFromLines(path, lines, os.linesep)\n\ndef RegenerateAll(rootDirectory):\n    \"\"\" Regenerate all the files. \"\"\"\n\n    root = pathlib.Path(rootDirectory)\n\n    lexillaBase = root.resolve()\n\n    lex = LexillaData.LexillaData(lexillaBase)\n\n    lexillaDir = lexillaBase\n    srcDir = lexillaDir / \"src\"\n    docDir = lexillaDir / \"doc\"\n\n    Regenerate(srcDir / \"Lexilla.cxx\", \"//\", lex.lexerModules)\n    Regenerate(srcDir / \"lexilla.mak\", \"#\", lex.lexFiles)\n\n    # Discover version information\n    version = (lexillaDir / \"version.txt\").read_text().strip()\n    versionDotted = version[0:-2] + '.' + version[-2] + '.' + version[-1]\n    versionCommad = versionDotted.replace(\".\", \", \") + ', 0'\n\n    rcPath = srcDir / \"LexillaVersion.rc\"\n    UpdateLineInFile(rcPath, \"#define VERSION_LEXILLA\",\n        \"#define VERSION_LEXILLA \\\"\" + versionDotted + \"\\\"\")\n    UpdateLineInFile(rcPath, \"#define VERSION_WORDS\",\n        \"#define VERSION_WORDS \" + versionCommad)\n    UpdateLineInFile(docDir / \"LexillaDownload.html\", \"       Release\",\n        \"       Release \" + versionDotted)\n    ReplaceREInFile(docDir / \"LexillaDownload.html\",\n        r\"/www.scintilla.org/([a-zA-Z]+)\\d{3,5}\",\n        r\"/www.scintilla.org/\\g<1>\" +  version,\n        0)\n\n    pathMain = lexillaDir / \"doc\" / \"Lexilla.html\"\n    UpdateLineInFile(pathMain,\n        '          <font color=\"#FFCC99\" size=\"3\">Release version',\n        '          <font color=\"#FFCC99\" size=\"3\">Release version ' + \\\n        versionDotted + '<br />')\n    UpdateLineInFile(pathMain,\n        '           Site last modified',\n        '           Site last modified ' + lex.mdyModified + '</font>')\n    UpdateLineInFile(pathMain,\n        '    <meta name=\"Date.Modified\"',\n        '    <meta name=\"Date.Modified\" content=\"' + lex.dateModified + '\" />')\n    UpdateLineInFile(lexillaDir / \"doc\" / \"LexillaHistory.html\",\n        '\tReleased ',\n        '\tReleased ' + lex.dmyModified + '.')\n\n    lexillaXcode = lexillaDir / \"src\" / \"Lexilla\"\n    lexillaXcodeProject = lexillaXcode / \"Lexilla.xcodeproj\" / \"project.pbxproj\"\n\n    lexerReferences = LexillaData.FindLexersInXcode(lexillaXcodeProject)\n\n    UpdateLineInPlistFile(lexillaXcode / \"Info.plist\",\n        \"CFBundleShortVersionString\", versionDotted)\n\n    ReplaceREInFile(lexillaXcodeProject, \"CURRENT_PROJECT_VERSION = [0-9.]+;\",\n        f'CURRENT_PROJECT_VERSION = {versionDotted};',\n        0)\n\n    RegenerateXcodeProject(lexillaXcodeProject, lex.lexFiles, lexerReferences)\n\n    LexFacer.RegenerateAll(root, False)\n\n    currentDirectory = pathlib.Path.cwd()\n    os.chdir(srcDir)\n    DepGen.Generate()\n    os.chdir(currentDirectory)\n\nif __name__==\"__main__\":\n    RegenerateAll(pathlib.Path(__file__).resolve().parent.parent)\n"
  },
  {
    "path": "lexilla/scripts/LexillaLogo.py",
    "content": "﻿# LexillaLogo.py\n# Requires Python 3.6.\n# Requires Pillow https://python-pillow.org/, tested with 7.2.0 on Windows 10\n\nimport random\nfrom PIL import Image, ImageDraw, ImageFont\n\ncolours = [\n(136,0,21,255),\n(237,28,36,255),\n(255,127,39,255),\n(255,201,14,255),\n(185,122,87,255),\n(255,174,201,255),\n(181,230,29,255),\n(34,177,76,255),\n(153,217,234,255),\n(0,162,232,255),\n(112,146,190,255),\n(63,72,204,255),\n(200,191,231,255),\n]\n\nwidth = 1280\nheight = 150\n\ndef drawLines(dr):\n\tfor y in range(0,height, 2):\n\t\tx = 0\n\t\twhile x < width:\n\t\t\t#lexeme = random.randint(2, 20)\n\t\t\tlexeme = int(random.expovariate(0.3))\n\t\t\tcolour = random.choice(colours)\n\t\t\tstrokeRectangle = (x, y, x+lexeme, y)\n\t\t\tdr.rectangle(strokeRectangle, fill=colour)\n\t\t\tx += lexeme + 3\n\ndef drawGuide(dr):\n\tfor y in range(0,height, 2):\n\t\tx = 0\n\t\twhile x < width:\n\t\t\tlexeme = int(random.expovariate(0.3))\n\t\t\tcolour = (0x30, 0x30, 0x30)\n\t\t\tstrokeRectangle = (x, y, x+lexeme, y)\n\t\t\tdr.rectangle(strokeRectangle, fill=colour)\n\t\t\tx += lexeme + 3\n\ndef drawLogo():\n\t# Ensure same image each time\n\trandom.seed(1)\n\n\t# Georgia bold italic\n\tfont = ImageFont.truetype(font=\"georgiaz.ttf\", size=190)\n\n\timageMask = Image.new(\"L\", (width, height), color=(0xff))\n\tdrMask = ImageDraw.Draw(imageMask)\n\tdrMask.text((30, -29), \"Lexilla\", font=font, fill=(0))\n\n\timageBack = Image.new(\"RGB\", (width, height), color=(0,0,0))\n\tdrBack = ImageDraw.Draw(imageBack)\n\tdrawGuide(drBack)\n\n\timageLines = Image.new(\"RGB\", (width, height), color=(0,0,0))\n\tdr = ImageDraw.Draw(imageLines)\n\tdrawLines(dr)\n\n\timageOut = Image.composite(imageBack, imageLines, imageMask)\n\n\timageOut.save(\"../doc/LexillaLogo.png\", \"png\")\n\n\timageDoubled = imageOut.resize((width*2, height * 2), Image.NEAREST)\n\n\timageDoubled.save(\"../doc/LexillaLogo2x.png\", \"png\")\n\ndrawLogo()\n"
  },
  {
    "path": "lexilla/scripts/PromoteNew.bat",
    "content": "@echo off\nrem Promote new result files.\nrem Find all the *.new files under test\\examples and copy them to their expected name without \".new\".\nrem Run after RunTest.bat if \".new\" result files are correct.\npushd ..\\test\\examples\nfor /R %%f in (*.new) do (call :moveFile %%f)\npopd\ngoto :eof\n\n:moveFile\nset pathWithNew=%1\nset directory=%~dp1\nset fileWithNew=%~nx1\nset fileNoNew=%~n1\nset pathNoNew=%pathWithNew:~0,-4%\n\nif exist %pathNoNew% (\n   echo Move %fileWithNew% to %fileNoNew% in %directory%\n) else (\n   echo New %fileWithNew% to %fileNoNew% in %directory%\n)\nmove %pathWithNew% %pathNoNew%\ngoto :eof\n"
  },
  {
    "path": "lexilla/scripts/RunTest.bat",
    "content": "rem Test lexers\nrem build lexilla.dll and TestLexers.exe then run TestLexers.exe\ncd ../src\nmake --jobs=4 DEBUG=1\ncd ../test\nmake DEBUG=1\nmake test\n"
  },
  {
    "path": "lexilla/scripts/RunTest.sh",
    "content": "# Test lexers\n# build lexilla.so and TestLexers then run TestLexers\nJOBS=\"--jobs=$(getconf _NPROCESSORS_ONLN)\"\n(\ncd ../src\nmake \"$JOBS\" DEBUG=1\n)\n(\ncd ../test\nmake DEBUG=1\nmake test\n)\n"
  },
  {
    "path": "lexilla/src/DepGen.py",
    "content": "#!/usr/bin/env python3\n# DepGen.py - produce a make dependencies file for Scintilla\n# Copyright 2019 by Neil Hodgson <neilh@scintilla.org>\n# The License.txt file describes the conditions under which this software may be distributed.\n# Requires Python 3.6 or later\n\nimport os, sys\n\nscintilla = os.path.join(\"..\", \"..\", \"scintilla\")\nsys.path.append(scintilla)\n\nfrom scripts import Dependencies\n\ntopComment = \"# Created by DepGen.py. To recreate, run DepGen.py.\\n\"\n\ndef Generate():\n\tlexilla = os.path.join(\"..\")\n\tsources = [\n\t\tos.path.join(lexilla, \"src\", \"Lexilla.cxx\"),\n\t\tos.path.join(lexilla, \"lexlib\", \"*.cxx\"),\n\t\tos.path.join(lexilla, \"lexers\", \"*.cxx\")]\n\tincludes = [\n\t\tos.path.join(lexilla, \"include\"),\n\t\tos.path.join(scintilla, \"include\"),\n\t\tos.path.join(lexilla, \"lexlib\")]\n\n\t# Create the dependencies file for g++\n\tdeps = Dependencies.FindDependencies(sources,  includes, \".o\", \"../lexilla/\")\n\n\t# Place the objects in $(DIR_O)\n\tdeps = [[\"$(DIR_O)/\"+obj, headers] for obj, headers in deps]\n\n\tDependencies.UpdateDependencies(os.path.join(lexilla, \"src\", \"deps.mak\"), deps, topComment)\n\n\t# Create the dependencies file for MSVC\n\n\t# Place the objects in $(DIR_O) and change extension from \".o\" to \".obj\"\n\tdeps = [[\"$(DIR_O)/\"+Dependencies.PathStem(obj)+\".obj\", headers] for obj, headers in deps]\n\n\tDependencies.UpdateDependencies(os.path.join(lexilla, \"src\", \"nmdeps.mak\"), deps, topComment)\n\nif __name__ == \"__main__\":\n\tGenerate()"
  },
  {
    "path": "lexilla/src/Lexilla/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>$(DEVELOPMENT_LANGUAGE)</string>\n\t<key>CFBundleExecutable</key>\n\t<string>$(EXECUTABLE_NAME)</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>$(PRODUCT_NAME)</string>\n\t<key>CFBundlePackageType</key>\n\t<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>5.3.2</string>\n\t<key>CFBundleVersion</key>\n\t<string>$(CURRENT_PROJECT_VERSION)</string>\n\t<key>NSHumanReadableCopyright</key>\n\t<string>Copyright © 2020 Neil Hodgson. All rights reserved.</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "lexilla/src/Lexilla/Lexilla.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 54;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\t00D544CC992062D2E3CD4BF6 /* LexGDScript.cxx in Sources */ = {isa = PBXBuildFile; fileRef = A383409E9A994F461550FEC1 /* LexGDScript.cxx */; };\n\t\t283639BC268FD4EA009D58A1 /* LexAccessor.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 283639BB268FD4EA009D58A1 /* LexAccessor.cxx */; };\n\t\t283A17AE2B47E61100DF5C82 /* InList.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 283A17AC2B47E61100DF5C82 /* InList.cxx */; };\n\t\t283A17AF2B47E61100DF5C82 /* InList.h in Headers */ = {isa = PBXBuildFile; fileRef = 283A17AD2B47E61100DF5C82 /* InList.h */; };\n\t\t28BA72AB24E34D5B00272C2D /* LexerBase.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA728F24E34D5A00272C2D /* LexerBase.cxx */; };\n\t\t28BA72AC24E34D5B00272C2D /* LexAccessor.h in Headers */ = {isa = PBXBuildFile; fileRef = 28BA729024E34D5A00272C2D /* LexAccessor.h */; };\n\t\t28BA72AD24E34D5B00272C2D /* DefaultLexer.h in Headers */ = {isa = PBXBuildFile; fileRef = 28BA729124E34D5A00272C2D /* DefaultLexer.h */; };\n\t\t28BA72AE24E34D5B00272C2D /* SubStyles.h in Headers */ = {isa = PBXBuildFile; fileRef = 28BA729224E34D5A00272C2D /* SubStyles.h */; };\n\t\t28BA72AF24E34D5B00272C2D /* LexerNoExceptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 28BA729324E34D5A00272C2D /* LexerNoExceptions.h */; };\n\t\t28BA72B024E34D5B00272C2D /* LexerModule.h in Headers */ = {isa = PBXBuildFile; fileRef = 28BA729424E34D5A00272C2D /* LexerModule.h */; };\n\t\t28BA72B124E34D5B00272C2D /* CharacterCategory.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA729524E34D5A00272C2D /* CharacterCategory.cxx */; };\n\t\t28BA72B224E34D5B00272C2D /* LexerSimple.h in Headers */ = {isa = PBXBuildFile; fileRef = 28BA729624E34D5A00272C2D /* LexerSimple.h */; };\n\t\t28BA72B324E34D5B00272C2D /* Accessor.h in Headers */ = {isa = PBXBuildFile; fileRef = 28BA729724E34D5A00272C2D /* Accessor.h */; };\n\t\t28BA72B424E34D5B00272C2D /* PropSetSimple.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA729824E34D5A00272C2D /* PropSetSimple.cxx */; };\n\t\t28BA72B524E34D5B00272C2D /* CharacterSet.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA729924E34D5A00272C2D /* CharacterSet.cxx */; };\n\t\t28BA72B624E34D5B00272C2D /* SparseState.h in Headers */ = {isa = PBXBuildFile; fileRef = 28BA729A24E34D5A00272C2D /* SparseState.h */; };\n\t\t28BA72B724E34D5B00272C2D /* WordList.h in Headers */ = {isa = PBXBuildFile; fileRef = 28BA729B24E34D5A00272C2D /* WordList.h */; };\n\t\t28BA72B824E34D5B00272C2D /* DefaultLexer.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA729C24E34D5A00272C2D /* DefaultLexer.cxx */; };\n\t\t28BA72B924E34D5B00272C2D /* LexerNoExceptions.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA729D24E34D5A00272C2D /* LexerNoExceptions.cxx */; };\n\t\t28BA72BA24E34D5B00272C2D /* WordList.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA729E24E34D5A00272C2D /* WordList.cxx */; };\n\t\t28BA72BB24E34D5B00272C2D /* OptionSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 28BA729F24E34D5A00272C2D /* OptionSet.h */; };\n\t\t28BA72BC24E34D5B00272C2D /* CatalogueModules.h in Headers */ = {isa = PBXBuildFile; fileRef = 28BA72A024E34D5B00272C2D /* CatalogueModules.h */; };\n\t\t28BA72BD24E34D5B00272C2D /* CharacterSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 28BA72A124E34D5B00272C2D /* CharacterSet.h */; };\n\t\t28BA72BE24E34D5B00272C2D /* StyleContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 28BA72A224E34D5B00272C2D /* StyleContext.h */; };\n\t\t28BA72BF24E34D5B00272C2D /* PropSetSimple.h in Headers */ = {isa = PBXBuildFile; fileRef = 28BA72A324E34D5B00272C2D /* PropSetSimple.h */; };\n\t\t28BA72C024E34D5B00272C2D /* StringCopy.h in Headers */ = {isa = PBXBuildFile; fileRef = 28BA72A424E34D5B00272C2D /* StringCopy.h */; };\n\t\t28BA72C124E34D5B00272C2D /* LexerModule.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72A524E34D5B00272C2D /* LexerModule.cxx */; };\n\t\t28BA72C224E34D5B00272C2D /* LexerBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 28BA72A624E34D5B00272C2D /* LexerBase.h */; };\n\t\t28BA72C324E34D5B00272C2D /* LexerSimple.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72A724E34D5B00272C2D /* LexerSimple.cxx */; };\n\t\t28BA72C424E34D5B00272C2D /* StyleContext.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72A824E34D5B00272C2D /* StyleContext.cxx */; };\n\t\t28BA72C524E34D5B00272C2D /* CharacterCategory.h in Headers */ = {isa = PBXBuildFile; fileRef = 28BA72A924E34D5B00272C2D /* CharacterCategory.h */; };\n\t\t28BA72C624E34D5B00272C2D /* Accessor.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72AA24E34D5B00272C2D /* Accessor.cxx */; };\n\t\t28BA733924E34D9700272C2D /* LexBasic.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72C724E34D9100272C2D /* LexBasic.cxx */; };\n\t\t28BA733A24E34D9700272C2D /* LexCIL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72C824E34D9100272C2D /* LexCIL.cxx */; };\n\t\t28BA733B24E34D9700272C2D /* LexTCL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72C924E34D9100272C2D /* LexTCL.cxx */; };\n\t\t28BA733C24E34D9700272C2D /* LexMetapost.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72CA24E34D9100272C2D /* LexMetapost.cxx */; };\n\t\t28BA733D24E34D9700272C2D /* LexForth.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72CB24E34D9100272C2D /* LexForth.cxx */; };\n\t\t28BA733E24E34D9700272C2D /* LexSML.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72CC24E34D9100272C2D /* LexSML.cxx */; };\n\t\t28BA733F24E34D9700272C2D /* LexOScript.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72CD24E34D9100272C2D /* LexOScript.cxx */; };\n\t\t28BA734024E34D9700272C2D /* LexTACL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72CE24E34D9100272C2D /* LexTACL.cxx */; };\n\t\t28BA734124E34D9700272C2D /* LexGui4Cli.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72CF24E34D9100272C2D /* LexGui4Cli.cxx */; };\n\t\t28BA734224E34D9700272C2D /* LexCLW.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72D024E34D9200272C2D /* LexCLW.cxx */; };\n\t\t28BA734324E34D9700272C2D /* LexRebol.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72D124E34D9200272C2D /* LexRebol.cxx */; };\n\t\t28BA734424E34D9700272C2D /* LexSAS.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72D224E34D9200272C2D /* LexSAS.cxx */; };\n\t\t28BA734524E34D9700272C2D /* LexNim.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72D324E34D9200272C2D /* LexNim.cxx */; };\n\t\t28BA734624E34D9700272C2D /* LexSmalltalk.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72D424E34D9200272C2D /* LexSmalltalk.cxx */; };\n\t\t28BA734724E34D9700272C2D /* LexModula.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72D524E34D9200272C2D /* LexModula.cxx */; };\n\t\t28BA734824E34D9700272C2D /* LexBullant.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72D624E34D9200272C2D /* LexBullant.cxx */; };\n\t\t28BA734924E34D9700272C2D /* LexASY.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72D724E34D9200272C2D /* LexASY.cxx */; };\n\t\t28BA734A24E34D9700272C2D /* LexBash.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72D824E34D9200272C2D /* LexBash.cxx */; };\n\t\t28BA734B24E34D9700272C2D /* LexEiffel.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72D924E34D9200272C2D /* LexEiffel.cxx */; };\n\t\t28BA734C24E34D9700272C2D /* LexVHDL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72DA24E34D9200272C2D /* LexVHDL.cxx */; };\n\t\t28BA734D24E34D9700272C2D /* LexAsn1.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72DB24E34D9200272C2D /* LexAsn1.cxx */; };\n\t\t28BA734E24E34D9700272C2D /* LexCoffeeScript.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72DC24E34D9200272C2D /* LexCoffeeScript.cxx */; };\n\t\t28BA734F24E34D9700272C2D /* LexDiff.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72DD24E34D9200272C2D /* LexDiff.cxx */; };\n\t\t28BA735024E34D9700272C2D /* LexSorcus.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72DE24E34D9200272C2D /* LexSorcus.cxx */; };\n\t\t28BA735124E34D9700272C2D /* LexAPDL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72DF24E34D9200272C2D /* LexAPDL.cxx */; };\n\t\t28BA735224E34D9700272C2D /* LexD.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72E024E34D9200272C2D /* LexD.cxx */; };\n\t\t28BA735324E34D9700272C2D /* LexMySQL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72E124E34D9200272C2D /* LexMySQL.cxx */; };\n\t\t28BA735424E34D9700272C2D /* LexHollywood.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72E224E34D9200272C2D /* LexHollywood.cxx */; };\n\t\t28BA735524E34D9700272C2D /* LexProgress.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72E324E34D9200272C2D /* LexProgress.cxx */; };\n\t\t28BA735624E34D9700272C2D /* LexLisp.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72E424E34D9200272C2D /* LexLisp.cxx */; };\n\t\t28BA735724E34D9700272C2D /* LexPowerShell.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72E524E34D9200272C2D /* LexPowerShell.cxx */; };\n\t\t28BA735824E34D9700272C2D /* LexPS.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72E624E34D9200272C2D /* LexPS.cxx */; };\n\t\t28BA735924E34D9700272C2D /* LexYAML.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72E724E34D9200272C2D /* LexYAML.cxx */; };\n\t\t28BA735A24E34D9700272C2D /* LexErlang.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72E824E34D9200272C2D /* LexErlang.cxx */; };\n\t\t28BA735B24E34D9700272C2D /* LexRuby.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72E924E34D9300272C2D /* LexRuby.cxx */; };\n\t\t28BA735C24E34D9700272C2D /* LexIndent.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72EA24E34D9300272C2D /* LexIndent.cxx */; };\n\t\t28BA735D24E34D9700272C2D /* LexErrorList.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72EB24E34D9300272C2D /* LexErrorList.cxx */; };\n\t\t28BA735E24E34D9700272C2D /* LexFlagship.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72EC24E34D9300272C2D /* LexFlagship.cxx */; };\n\t\t28BA735F24E34D9700272C2D /* LexLaTeX.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72ED24E34D9300272C2D /* LexLaTeX.cxx */; };\n\t\t28BA736024E34D9700272C2D /* LexAbaqus.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72EE24E34D9300272C2D /* LexAbaqus.cxx */; };\n\t\t28BA736124E34D9700272C2D /* LexBatch.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72EF24E34D9300272C2D /* LexBatch.cxx */; };\n\t\t28BA736224E34D9700272C2D /* LexCPP.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72F024E34D9300272C2D /* LexCPP.cxx */; };\n\t\t28BA736324E34D9700272C2D /* LexRaku.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72F124E34D9300272C2D /* LexRaku.cxx */; };\n\t\t28BA736424E34D9700272C2D /* LexGAP.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72F224E34D9300272C2D /* LexGAP.cxx */; };\n\t\t28BA736524E34D9700272C2D /* LexSQL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72F324E34D9300272C2D /* LexSQL.cxx */; };\n\t\t28BA736624E34D9700272C2D /* LexNsis.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72F424E34D9300272C2D /* LexNsis.cxx */; };\n\t\t28BA736724E34D9700272C2D /* LexEDIFACT.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72F524E34D9300272C2D /* LexEDIFACT.cxx */; };\n\t\t28BA736824E34D9700272C2D /* LexEScript.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72F624E34D9300272C2D /* LexEScript.cxx */; };\n\t\t28BA736924E34D9700272C2D /* LexPOV.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72F724E34D9300272C2D /* LexPOV.cxx */; };\n\t\t28BA736A24E34D9700272C2D /* LexKVIrc.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72F824E34D9300272C2D /* LexKVIrc.cxx */; };\n\t\t28BA736B24E34D9700272C2D /* LexSpecman.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72F924E34D9300272C2D /* LexSpecman.cxx */; };\n\t\t28BA736C24E34D9700272C2D /* LexHTML.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72FA24E34D9300272C2D /* LexHTML.cxx */; };\n\t\t28BA736D24E34D9700272C2D /* LexFortran.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72FB24E34D9400272C2D /* LexFortran.cxx */; };\n\t\t28BA736E24E34D9700272C2D /* LexRegistry.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72FC24E34D9400272C2D /* LexRegistry.cxx */; };\n\t\t28BA736F24E34D9700272C2D /* LexPython.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72FD24E34D9400272C2D /* LexPython.cxx */; };\n\t\t28BA737024E34D9700272C2D /* LexCmake.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72FE24E34D9400272C2D /* LexCmake.cxx */; };\n\t\t28BA737124E34D9700272C2D /* LexAsm.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72FF24E34D9400272C2D /* LexAsm.cxx */; };\n\t\t28BA737224E34D9700272C2D /* LexAda.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA730024E34D9400272C2D /* LexAda.cxx */; };\n\t\t28BA737324E34D9700272C2D /* LexCrontab.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA730124E34D9400272C2D /* LexCrontab.cxx */; };\n\t\t28BA737424E34D9700272C2D /* LexDMIS.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA730224E34D9400272C2D /* LexDMIS.cxx */; };\n\t\t28BA737524E34D9700272C2D /* LexTCMD.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA730324E34D9400272C2D /* LexTCMD.cxx */; };\n\t\t28BA737624E34D9700272C2D /* LexConf.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA730424E34D9400272C2D /* LexConf.cxx */; };\n\t\t28BA737724E34D9700272C2D /* LexInno.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA730524E34D9400272C2D /* LexInno.cxx */; };\n\t\t28BA737824E34D9700272C2D /* LexA68k.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA730624E34D9400272C2D /* LexA68k.cxx */; };\n\t\t28BA737924E34D9700272C2D /* LexMake.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA730724E34D9400272C2D /* LexMake.cxx */; };\n\t\t28BA737A24E34D9700272C2D /* LexTeX.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA730824E34D9400272C2D /* LexTeX.cxx */; };\n\t\t28BA737B24E34D9700272C2D /* LexSpice.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA730924E34D9400272C2D /* LexSpice.cxx */; };\n\t\t28BA737C24E34D9700272C2D /* LexX12.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA730A24E34D9400272C2D /* LexX12.cxx */; };\n\t\t28BA737D24E34D9700272C2D /* LexAU3.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA730B24E34D9400272C2D /* LexAU3.cxx */; };\n\t\t28BA737E24E34D9700272C2D /* LexBaan.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA730C24E34D9400272C2D /* LexBaan.cxx */; };\n\t\t28BA737F24E34D9700272C2D /* LexMPT.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA730D24E34D9500272C2D /* LexMPT.cxx */; };\n\t\t28BA738024E34D9700272C2D /* LexTADS3.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA730E24E34D9500272C2D /* LexTADS3.cxx */; };\n\t\t28BA738124E34D9700272C2D /* LexTxt2tags.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA730F24E34D9500272C2D /* LexTxt2tags.cxx */; };\n\t\t28BA738224E34D9700272C2D /* LexMMIXAL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA731024E34D9500272C2D /* LexMMIXAL.cxx */; };\n\t\t28BA738324E34D9700272C2D /* LexKix.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA731124E34D9500272C2D /* LexKix.cxx */; };\n\t\t28BA738424E34D9700272C2D /* LexSTTXT.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA731224E34D9500272C2D /* LexSTTXT.cxx */; };\n\t\t28BA738524E34D9700272C2D /* LexMagik.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA731324E34D9500272C2D /* LexMagik.cxx */; };\n\t\t28BA738624E34D9700272C2D /* LexNull.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA731424E34D9500272C2D /* LexNull.cxx */; };\n\t\t28BA738724E34D9700272C2D /* LexCsound.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA731524E34D9500272C2D /* LexCsound.cxx */; };\n\t\t28BA738824E34D9700272C2D /* LexLua.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA731624E34D9500272C2D /* LexLua.cxx */; };\n\t\t28BA738924E34D9700272C2D /* LexStata.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA731724E34D9500272C2D /* LexStata.cxx */; };\n\t\t28BA738A24E34D9700272C2D /* LexOpal.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA731824E34D9500272C2D /* LexOpal.cxx */; };\n\t\t28BA738B24E34D9700272C2D /* LexHex.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA731924E34D9500272C2D /* LexHex.cxx */; };\n\t\t28BA738C24E34D9700272C2D /* LexVerilog.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA731A24E34D9500272C2D /* LexVerilog.cxx */; };\n\t\t28BA738D24E34D9700272C2D /* LexHaskell.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA731B24E34D9500272C2D /* LexHaskell.cxx */; };\n\t\t28BA738E24E34D9700272C2D /* LexR.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA731C24E34D9500272C2D /* LexR.cxx */; };\n\t\t28BA738F24E34D9700272C2D /* LexScriptol.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA731D24E34D9500272C2D /* LexScriptol.cxx */; };\n\t\t28BA739024E34D9700272C2D /* LexVisualProlog.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA731E24E34D9500272C2D /* LexVisualProlog.cxx */; };\n\t\t28BA739124E34D9700272C2D /* LexVB.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA731F24E34D9600272C2D /* LexVB.cxx */; };\n\t\t28BA739224E34D9700272C2D /* LexDMAP.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA732024E34D9600272C2D /* LexDMAP.cxx */; };\n\t\t28BA739324E34D9700272C2D /* LexAVS.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA732124E34D9600272C2D /* LexAVS.cxx */; };\n\t\t28BA739424E34D9700272C2D /* LexPB.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA732224E34D9600272C2D /* LexPB.cxx */; };\n\t\t28BA739524E34D9700272C2D /* LexPO.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA732324E34D9600272C2D /* LexPO.cxx */; };\n\t\t28BA739624E34D9700272C2D /* LexPowerPro.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA732424E34D9600272C2D /* LexPowerPro.cxx */; };\n\t\t28BA739724E34D9700272C2D /* LexProps.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA732524E34D9600272C2D /* LexProps.cxx */; };\n\t\t28BA739824E34D9700272C2D /* LexCOBOL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA732624E34D9600272C2D /* LexCOBOL.cxx */; };\n\t\t28BA739924E34D9700272C2D /* LexPLM.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA732724E34D9600272C2D /* LexPLM.cxx */; };\n\t\t28BA739A24E34D9700272C2D /* LexMSSQL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA732824E34D9600272C2D /* LexMSSQL.cxx */; };\n\t\t28BA739B24E34D9700272C2D /* LexCSS.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA732924E34D9600272C2D /* LexCSS.cxx */; };\n\t\t28BA739C24E34D9700272C2D /* LexMaxima.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA732A24E34D9600272C2D /* LexMaxima.cxx */; };\n\t\t28BA739D24E34D9700272C2D /* LexCaml.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA732B24E34D9600272C2D /* LexCaml.cxx */; };\n\t\t28BA739E24E34D9700272C2D /* LexDataflex.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA732C24E34D9600272C2D /* LexDataflex.cxx */; };\n\t\t28BA739F24E34D9700272C2D /* LexLout.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA732D24E34D9600272C2D /* LexLout.cxx */; };\n\t\t28BA73A024E34D9700272C2D /* LexTAL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA732E24E34D9600272C2D /* LexTAL.cxx */; };\n\t\t28BA73A124E34D9700272C2D /* LexMarkdown.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA732F24E34D9600272C2D /* LexMarkdown.cxx */; };\n\t\t28BA73A224E34D9700272C2D /* LexJSON.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA733024E34D9600272C2D /* LexJSON.cxx */; };\n\t\t28BA73A324E34D9700272C2D /* LexPascal.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA733124E34D9700272C2D /* LexPascal.cxx */; };\n\t\t28BA73A424E34D9700272C2D /* LexAVE.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA733224E34D9700272C2D /* LexAVE.cxx */; };\n\t\t28BA73A524E34D9700272C2D /* LexECL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA733324E34D9700272C2D /* LexECL.cxx */; };\n\t\t28BA73A624E34D9700272C2D /* LexMatlab.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA733424E34D9700272C2D /* LexMatlab.cxx */; };\n\t\t28BA73A724E34D9700272C2D /* LexBibTeX.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA733524E34D9700272C2D /* LexBibTeX.cxx */; };\n\t\t28BA73A824E34D9700272C2D /* LexNimrod.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA733624E34D9700272C2D /* LexNimrod.cxx */; };\n\t\t28BA73A924E34D9700272C2D /* LexPerl.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA733724E34D9700272C2D /* LexPerl.cxx */; };\n\t\t28BA73AA24E34D9700272C2D /* LexRust.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA733824E34D9700272C2D /* LexRust.cxx */; };\n\t\t28BA73AD24E34DBC00272C2D /* Lexilla.h in Headers */ = {isa = PBXBuildFile; fileRef = 28BA73AB24E34DBC00272C2D /* Lexilla.h */; };\n\t\t28BA73AE24E34DBC00272C2D /* Lexilla.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA73AC24E34DBC00272C2D /* Lexilla.cxx */; };\n\t\t510D44AFB91EE873E86ABDD4 /* LexAsciidoc.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 3AF14420BFC43876F16C5995 /* LexAsciidoc.cxx */; };\n\t\t70BF497C8D265026B77C97DA /* LexJulia.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 315E4E969868C52C125686B2 /* LexJulia.cxx */; };\n\t\tB32D4A2A9CEC222A5140E99F /* LexFSharp.cxx in Sources */ = {isa = PBXBuildFile; fileRef = F8E54626B22BD9493090F40B /* LexFSharp.cxx */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXFileReference section */\n\t\t280262A5246DF655000DF3B8 /* liblexilla.dylib */ = {isa = PBXFileReference; explicitFileType = \"compiled.mach-o.dylib\"; includeInIndex = 0; path = liblexilla.dylib; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t283639BB268FD4EA009D58A1 /* LexAccessor.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAccessor.cxx; path = ../../lexlib/LexAccessor.cxx; sourceTree = \"<group>\"; };\n\t\t283A17AC2B47E61100DF5C82 /* InList.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = InList.cxx; path = ../../lexlib/InList.cxx; sourceTree = \"<group>\"; };\n\t\t283A17AD2B47E61100DF5C82 /* InList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InList.h; path = ../../lexlib/InList.h; sourceTree = \"<group>\"; };\n\t\t28BA728F24E34D5A00272C2D /* LexerBase.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexerBase.cxx; path = ../../lexlib/LexerBase.cxx; sourceTree = \"<group>\"; };\n\t\t28BA729024E34D5A00272C2D /* LexAccessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LexAccessor.h; path = ../../lexlib/LexAccessor.h; sourceTree = \"<group>\"; };\n\t\t28BA729124E34D5A00272C2D /* DefaultLexer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DefaultLexer.h; path = ../../lexlib/DefaultLexer.h; sourceTree = \"<group>\"; };\n\t\t28BA729224E34D5A00272C2D /* SubStyles.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SubStyles.h; path = ../../lexlib/SubStyles.h; sourceTree = \"<group>\"; };\n\t\t28BA729324E34D5A00272C2D /* LexerNoExceptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LexerNoExceptions.h; path = ../../lexlib/LexerNoExceptions.h; sourceTree = \"<group>\"; };\n\t\t28BA729424E34D5A00272C2D /* LexerModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LexerModule.h; path = ../../lexlib/LexerModule.h; sourceTree = \"<group>\"; };\n\t\t28BA729524E34D5A00272C2D /* CharacterCategory.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CharacterCategory.cxx; path = ../../lexlib/CharacterCategory.cxx; sourceTree = \"<group>\"; };\n\t\t28BA729624E34D5A00272C2D /* LexerSimple.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LexerSimple.h; path = ../../lexlib/LexerSimple.h; sourceTree = \"<group>\"; };\n\t\t28BA729724E34D5A00272C2D /* Accessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Accessor.h; path = ../../lexlib/Accessor.h; sourceTree = \"<group>\"; };\n\t\t28BA729824E34D5A00272C2D /* PropSetSimple.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PropSetSimple.cxx; path = ../../lexlib/PropSetSimple.cxx; sourceTree = \"<group>\"; };\n\t\t28BA729924E34D5A00272C2D /* CharacterSet.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CharacterSet.cxx; path = ../../lexlib/CharacterSet.cxx; sourceTree = \"<group>\"; };\n\t\t28BA729A24E34D5A00272C2D /* SparseState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SparseState.h; path = ../../lexlib/SparseState.h; sourceTree = \"<group>\"; };\n\t\t28BA729B24E34D5A00272C2D /* WordList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WordList.h; path = ../../lexlib/WordList.h; sourceTree = \"<group>\"; };\n\t\t28BA729C24E34D5A00272C2D /* DefaultLexer.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DefaultLexer.cxx; path = ../../lexlib/DefaultLexer.cxx; sourceTree = \"<group>\"; };\n\t\t28BA729D24E34D5A00272C2D /* LexerNoExceptions.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexerNoExceptions.cxx; path = ../../lexlib/LexerNoExceptions.cxx; sourceTree = \"<group>\"; };\n\t\t28BA729E24E34D5A00272C2D /* WordList.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WordList.cxx; path = ../../lexlib/WordList.cxx; sourceTree = \"<group>\"; };\n\t\t28BA729F24E34D5A00272C2D /* OptionSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionSet.h; path = ../../lexlib/OptionSet.h; sourceTree = \"<group>\"; };\n\t\t28BA72A024E34D5B00272C2D /* CatalogueModules.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CatalogueModules.h; path = ../../lexlib/CatalogueModules.h; sourceTree = \"<group>\"; };\n\t\t28BA72A124E34D5B00272C2D /* CharacterSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CharacterSet.h; path = ../../lexlib/CharacterSet.h; sourceTree = \"<group>\"; };\n\t\t28BA72A224E34D5B00272C2D /* StyleContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StyleContext.h; path = ../../lexlib/StyleContext.h; sourceTree = \"<group>\"; };\n\t\t28BA72A324E34D5B00272C2D /* PropSetSimple.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PropSetSimple.h; path = ../../lexlib/PropSetSimple.h; sourceTree = \"<group>\"; };\n\t\t28BA72A424E34D5B00272C2D /* StringCopy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StringCopy.h; path = ../../lexlib/StringCopy.h; sourceTree = \"<group>\"; };\n\t\t28BA72A524E34D5B00272C2D /* LexerModule.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexerModule.cxx; path = ../../lexlib/LexerModule.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72A624E34D5B00272C2D /* LexerBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LexerBase.h; path = ../../lexlib/LexerBase.h; sourceTree = \"<group>\"; };\n\t\t28BA72A724E34D5B00272C2D /* LexerSimple.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexerSimple.cxx; path = ../../lexlib/LexerSimple.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72A824E34D5B00272C2D /* StyleContext.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StyleContext.cxx; path = ../../lexlib/StyleContext.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72A924E34D5B00272C2D /* CharacterCategory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CharacterCategory.h; path = ../../lexlib/CharacterCategory.h; sourceTree = \"<group>\"; };\n\t\t28BA72AA24E34D5B00272C2D /* Accessor.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Accessor.cxx; path = ../../lexlib/Accessor.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72C724E34D9100272C2D /* LexBasic.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexBasic.cxx; path = ../../lexers/LexBasic.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72C824E34D9100272C2D /* LexCIL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCIL.cxx; path = ../../lexers/LexCIL.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72C924E34D9100272C2D /* LexTCL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexTCL.cxx; path = ../../lexers/LexTCL.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72CA24E34D9100272C2D /* LexMetapost.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexMetapost.cxx; path = ../../lexers/LexMetapost.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72CB24E34D9100272C2D /* LexForth.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexForth.cxx; path = ../../lexers/LexForth.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72CC24E34D9100272C2D /* LexSML.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexSML.cxx; path = ../../lexers/LexSML.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72CD24E34D9100272C2D /* LexOScript.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexOScript.cxx; path = ../../lexers/LexOScript.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72CE24E34D9100272C2D /* LexTACL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexTACL.cxx; path = ../../lexers/LexTACL.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72CF24E34D9100272C2D /* LexGui4Cli.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexGui4Cli.cxx; path = ../../lexers/LexGui4Cli.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72D024E34D9200272C2D /* LexCLW.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCLW.cxx; path = ../../lexers/LexCLW.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72D124E34D9200272C2D /* LexRebol.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexRebol.cxx; path = ../../lexers/LexRebol.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72D224E34D9200272C2D /* LexSAS.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexSAS.cxx; path = ../../lexers/LexSAS.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72D324E34D9200272C2D /* LexNim.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexNim.cxx; path = ../../lexers/LexNim.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72D424E34D9200272C2D /* LexSmalltalk.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexSmalltalk.cxx; path = ../../lexers/LexSmalltalk.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72D524E34D9200272C2D /* LexModula.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexModula.cxx; path = ../../lexers/LexModula.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72D624E34D9200272C2D /* LexBullant.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexBullant.cxx; path = ../../lexers/LexBullant.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72D724E34D9200272C2D /* LexASY.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexASY.cxx; path = ../../lexers/LexASY.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72D824E34D9200272C2D /* LexBash.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexBash.cxx; path = ../../lexers/LexBash.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72D924E34D9200272C2D /* LexEiffel.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexEiffel.cxx; path = ../../lexers/LexEiffel.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72DA24E34D9200272C2D /* LexVHDL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexVHDL.cxx; path = ../../lexers/LexVHDL.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72DB24E34D9200272C2D /* LexAsn1.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAsn1.cxx; path = ../../lexers/LexAsn1.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72DC24E34D9200272C2D /* LexCoffeeScript.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCoffeeScript.cxx; path = ../../lexers/LexCoffeeScript.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72DD24E34D9200272C2D /* LexDiff.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexDiff.cxx; path = ../../lexers/LexDiff.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72DE24E34D9200272C2D /* LexSorcus.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexSorcus.cxx; path = ../../lexers/LexSorcus.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72DF24E34D9200272C2D /* LexAPDL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAPDL.cxx; path = ../../lexers/LexAPDL.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72E024E34D9200272C2D /* LexD.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexD.cxx; path = ../../lexers/LexD.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72E124E34D9200272C2D /* LexMySQL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexMySQL.cxx; path = ../../lexers/LexMySQL.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72E224E34D9200272C2D /* LexHollywood.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexHollywood.cxx; path = ../../lexers/LexHollywood.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72E324E34D9200272C2D /* LexProgress.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexProgress.cxx; path = ../../lexers/LexProgress.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72E424E34D9200272C2D /* LexLisp.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexLisp.cxx; path = ../../lexers/LexLisp.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72E524E34D9200272C2D /* LexPowerShell.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPowerShell.cxx; path = ../../lexers/LexPowerShell.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72E624E34D9200272C2D /* LexPS.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPS.cxx; path = ../../lexers/LexPS.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72E724E34D9200272C2D /* LexYAML.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexYAML.cxx; path = ../../lexers/LexYAML.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72E824E34D9200272C2D /* LexErlang.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexErlang.cxx; path = ../../lexers/LexErlang.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72E924E34D9300272C2D /* LexRuby.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexRuby.cxx; path = ../../lexers/LexRuby.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72EA24E34D9300272C2D /* LexIndent.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexIndent.cxx; path = ../../lexers/LexIndent.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72EB24E34D9300272C2D /* LexErrorList.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexErrorList.cxx; path = ../../lexers/LexErrorList.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72EC24E34D9300272C2D /* LexFlagship.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexFlagship.cxx; path = ../../lexers/LexFlagship.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72ED24E34D9300272C2D /* LexLaTeX.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexLaTeX.cxx; path = ../../lexers/LexLaTeX.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72EE24E34D9300272C2D /* LexAbaqus.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAbaqus.cxx; path = ../../lexers/LexAbaqus.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72EF24E34D9300272C2D /* LexBatch.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexBatch.cxx; path = ../../lexers/LexBatch.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72F024E34D9300272C2D /* LexCPP.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCPP.cxx; path = ../../lexers/LexCPP.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72F124E34D9300272C2D /* LexRaku.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexRaku.cxx; path = ../../lexers/LexRaku.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72F224E34D9300272C2D /* LexGAP.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexGAP.cxx; path = ../../lexers/LexGAP.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72F324E34D9300272C2D /* LexSQL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexSQL.cxx; path = ../../lexers/LexSQL.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72F424E34D9300272C2D /* LexNsis.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexNsis.cxx; path = ../../lexers/LexNsis.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72F524E34D9300272C2D /* LexEDIFACT.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexEDIFACT.cxx; path = ../../lexers/LexEDIFACT.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72F624E34D9300272C2D /* LexEScript.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexEScript.cxx; path = ../../lexers/LexEScript.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72F724E34D9300272C2D /* LexPOV.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPOV.cxx; path = ../../lexers/LexPOV.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72F824E34D9300272C2D /* LexKVIrc.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexKVIrc.cxx; path = ../../lexers/LexKVIrc.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72F924E34D9300272C2D /* LexSpecman.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexSpecman.cxx; path = ../../lexers/LexSpecman.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72FA24E34D9300272C2D /* LexHTML.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexHTML.cxx; path = ../../lexers/LexHTML.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72FB24E34D9400272C2D /* LexFortran.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexFortran.cxx; path = ../../lexers/LexFortran.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72FC24E34D9400272C2D /* LexRegistry.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexRegistry.cxx; path = ../../lexers/LexRegistry.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72FD24E34D9400272C2D /* LexPython.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPython.cxx; path = ../../lexers/LexPython.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72FE24E34D9400272C2D /* LexCmake.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCmake.cxx; path = ../../lexers/LexCmake.cxx; sourceTree = \"<group>\"; };\n\t\t28BA72FF24E34D9400272C2D /* LexAsm.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAsm.cxx; path = ../../lexers/LexAsm.cxx; sourceTree = \"<group>\"; };\n\t\t28BA730024E34D9400272C2D /* LexAda.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAda.cxx; path = ../../lexers/LexAda.cxx; sourceTree = \"<group>\"; };\n\t\t28BA730124E34D9400272C2D /* LexCrontab.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCrontab.cxx; path = ../../lexers/LexCrontab.cxx; sourceTree = \"<group>\"; };\n\t\t28BA730224E34D9400272C2D /* LexDMIS.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexDMIS.cxx; path = ../../lexers/LexDMIS.cxx; sourceTree = \"<group>\"; };\n\t\t28BA730324E34D9400272C2D /* LexTCMD.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexTCMD.cxx; path = ../../lexers/LexTCMD.cxx; sourceTree = \"<group>\"; };\n\t\t28BA730424E34D9400272C2D /* LexConf.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexConf.cxx; path = ../../lexers/LexConf.cxx; sourceTree = \"<group>\"; };\n\t\t28BA730524E34D9400272C2D /* LexInno.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexInno.cxx; path = ../../lexers/LexInno.cxx; sourceTree = \"<group>\"; };\n\t\t28BA730624E34D9400272C2D /* LexA68k.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexA68k.cxx; path = ../../lexers/LexA68k.cxx; sourceTree = \"<group>\"; };\n\t\t28BA730724E34D9400272C2D /* LexMake.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexMake.cxx; path = ../../lexers/LexMake.cxx; sourceTree = \"<group>\"; };\n\t\t28BA730824E34D9400272C2D /* LexTeX.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexTeX.cxx; path = ../../lexers/LexTeX.cxx; sourceTree = \"<group>\"; };\n\t\t28BA730924E34D9400272C2D /* LexSpice.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexSpice.cxx; path = ../../lexers/LexSpice.cxx; sourceTree = \"<group>\"; };\n\t\t28BA730A24E34D9400272C2D /* LexX12.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexX12.cxx; path = ../../lexers/LexX12.cxx; sourceTree = \"<group>\"; };\n\t\t28BA730B24E34D9400272C2D /* LexAU3.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAU3.cxx; path = ../../lexers/LexAU3.cxx; sourceTree = \"<group>\"; };\n\t\t28BA730C24E34D9400272C2D /* LexBaan.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexBaan.cxx; path = ../../lexers/LexBaan.cxx; sourceTree = \"<group>\"; };\n\t\t28BA730D24E34D9500272C2D /* LexMPT.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexMPT.cxx; path = ../../lexers/LexMPT.cxx; sourceTree = \"<group>\"; };\n\t\t28BA730E24E34D9500272C2D /* LexTADS3.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexTADS3.cxx; path = ../../lexers/LexTADS3.cxx; sourceTree = \"<group>\"; };\n\t\t28BA730F24E34D9500272C2D /* LexTxt2tags.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexTxt2tags.cxx; path = ../../lexers/LexTxt2tags.cxx; sourceTree = \"<group>\"; };\n\t\t28BA731024E34D9500272C2D /* LexMMIXAL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexMMIXAL.cxx; path = ../../lexers/LexMMIXAL.cxx; sourceTree = \"<group>\"; };\n\t\t28BA731124E34D9500272C2D /* LexKix.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexKix.cxx; path = ../../lexers/LexKix.cxx; sourceTree = \"<group>\"; };\n\t\t28BA731224E34D9500272C2D /* LexSTTXT.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexSTTXT.cxx; path = ../../lexers/LexSTTXT.cxx; sourceTree = \"<group>\"; };\n\t\t28BA731324E34D9500272C2D /* LexMagik.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexMagik.cxx; path = ../../lexers/LexMagik.cxx; sourceTree = \"<group>\"; };\n\t\t28BA731424E34D9500272C2D /* LexNull.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexNull.cxx; path = ../../lexers/LexNull.cxx; sourceTree = \"<group>\"; };\n\t\t28BA731524E34D9500272C2D /* LexCsound.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCsound.cxx; path = ../../lexers/LexCsound.cxx; sourceTree = \"<group>\"; };\n\t\t28BA731624E34D9500272C2D /* LexLua.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexLua.cxx; path = ../../lexers/LexLua.cxx; sourceTree = \"<group>\"; };\n\t\t28BA731724E34D9500272C2D /* LexStata.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexStata.cxx; path = ../../lexers/LexStata.cxx; sourceTree = \"<group>\"; };\n\t\t28BA731824E34D9500272C2D /* LexOpal.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexOpal.cxx; path = ../../lexers/LexOpal.cxx; sourceTree = \"<group>\"; };\n\t\t28BA731924E34D9500272C2D /* LexHex.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexHex.cxx; path = ../../lexers/LexHex.cxx; sourceTree = \"<group>\"; };\n\t\t28BA731A24E34D9500272C2D /* LexVerilog.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexVerilog.cxx; path = ../../lexers/LexVerilog.cxx; sourceTree = \"<group>\"; };\n\t\t28BA731B24E34D9500272C2D /* LexHaskell.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexHaskell.cxx; path = ../../lexers/LexHaskell.cxx; sourceTree = \"<group>\"; };\n\t\t28BA731C24E34D9500272C2D /* LexR.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexR.cxx; path = ../../lexers/LexR.cxx; sourceTree = \"<group>\"; };\n\t\t28BA731D24E34D9500272C2D /* LexScriptol.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexScriptol.cxx; path = ../../lexers/LexScriptol.cxx; sourceTree = \"<group>\"; };\n\t\t28BA731E24E34D9500272C2D /* LexVisualProlog.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexVisualProlog.cxx; path = ../../lexers/LexVisualProlog.cxx; sourceTree = \"<group>\"; };\n\t\t28BA731F24E34D9600272C2D /* LexVB.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexVB.cxx; path = ../../lexers/LexVB.cxx; sourceTree = \"<group>\"; };\n\t\t28BA732024E34D9600272C2D /* LexDMAP.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexDMAP.cxx; path = ../../lexers/LexDMAP.cxx; sourceTree = \"<group>\"; };\n\t\t28BA732124E34D9600272C2D /* LexAVS.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAVS.cxx; path = ../../lexers/LexAVS.cxx; sourceTree = \"<group>\"; };\n\t\t28BA732224E34D9600272C2D /* LexPB.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPB.cxx; path = ../../lexers/LexPB.cxx; sourceTree = \"<group>\"; };\n\t\t28BA732324E34D9600272C2D /* LexPO.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPO.cxx; path = ../../lexers/LexPO.cxx; sourceTree = \"<group>\"; };\n\t\t28BA732424E34D9600272C2D /* LexPowerPro.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPowerPro.cxx; path = ../../lexers/LexPowerPro.cxx; sourceTree = \"<group>\"; };\n\t\t28BA732524E34D9600272C2D /* LexProps.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexProps.cxx; path = ../../lexers/LexProps.cxx; sourceTree = \"<group>\"; };\n\t\t28BA732624E34D9600272C2D /* LexCOBOL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCOBOL.cxx; path = ../../lexers/LexCOBOL.cxx; sourceTree = \"<group>\"; };\n\t\t28BA732724E34D9600272C2D /* LexPLM.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPLM.cxx; path = ../../lexers/LexPLM.cxx; sourceTree = \"<group>\"; };\n\t\t28BA732824E34D9600272C2D /* LexMSSQL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexMSSQL.cxx; path = ../../lexers/LexMSSQL.cxx; sourceTree = \"<group>\"; };\n\t\t28BA732924E34D9600272C2D /* LexCSS.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCSS.cxx; path = ../../lexers/LexCSS.cxx; sourceTree = \"<group>\"; };\n\t\t28BA732A24E34D9600272C2D /* LexMaxima.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexMaxima.cxx; path = ../../lexers/LexMaxima.cxx; sourceTree = \"<group>\"; };\n\t\t28BA732B24E34D9600272C2D /* LexCaml.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCaml.cxx; path = ../../lexers/LexCaml.cxx; sourceTree = \"<group>\"; };\n\t\t28BA732C24E34D9600272C2D /* LexDataflex.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexDataflex.cxx; path = ../../lexers/LexDataflex.cxx; sourceTree = \"<group>\"; };\n\t\t28BA732D24E34D9600272C2D /* LexLout.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexLout.cxx; path = ../../lexers/LexLout.cxx; sourceTree = \"<group>\"; };\n\t\t28BA732E24E34D9600272C2D /* LexTAL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexTAL.cxx; path = ../../lexers/LexTAL.cxx; sourceTree = \"<group>\"; };\n\t\t28BA732F24E34D9600272C2D /* LexMarkdown.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexMarkdown.cxx; path = ../../lexers/LexMarkdown.cxx; sourceTree = \"<group>\"; };\n\t\t28BA733024E34D9600272C2D /* LexJSON.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexJSON.cxx; path = ../../lexers/LexJSON.cxx; sourceTree = \"<group>\"; };\n\t\t28BA733124E34D9700272C2D /* LexPascal.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPascal.cxx; path = ../../lexers/LexPascal.cxx; sourceTree = \"<group>\"; };\n\t\t28BA733224E34D9700272C2D /* LexAVE.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAVE.cxx; path = ../../lexers/LexAVE.cxx; sourceTree = \"<group>\"; };\n\t\t28BA733324E34D9700272C2D /* LexECL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexECL.cxx; path = ../../lexers/LexECL.cxx; sourceTree = \"<group>\"; };\n\t\t28BA733424E34D9700272C2D /* LexMatlab.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexMatlab.cxx; path = ../../lexers/LexMatlab.cxx; sourceTree = \"<group>\"; };\n\t\t28BA733524E34D9700272C2D /* LexBibTeX.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexBibTeX.cxx; path = ../../lexers/LexBibTeX.cxx; sourceTree = \"<group>\"; };\n\t\t28BA733624E34D9700272C2D /* LexNimrod.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexNimrod.cxx; path = ../../lexers/LexNimrod.cxx; sourceTree = \"<group>\"; };\n\t\t28BA733724E34D9700272C2D /* LexPerl.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPerl.cxx; path = ../../lexers/LexPerl.cxx; sourceTree = \"<group>\"; };\n\t\t28BA733824E34D9700272C2D /* LexRust.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexRust.cxx; path = ../../lexers/LexRust.cxx; sourceTree = \"<group>\"; };\n\t\t28BA73AB24E34DBC00272C2D /* Lexilla.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Lexilla.h; path = ../../include/Lexilla.h; sourceTree = \"<group>\"; };\n\t\t28BA73AC24E34DBC00272C2D /* Lexilla.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Lexilla.cxx; path = ../Lexilla.cxx; sourceTree = \"<group>\"; };\n\t\t28BA73B024E3510900272C2D /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = \"<group>\"; };\n\t\t315E4E969868C52C125686B2 /* LexJulia.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexJulia.cxx; path = ../../lexers/LexJulia.cxx; sourceTree = SOURCE_ROOT; };\n\t\t3AF14420BFC43876F16C5995 /* LexAsciidoc.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAsciidoc.cxx; path = ../../lexers/LexAsciidoc.cxx; sourceTree = SOURCE_ROOT; };\n\t\tA383409E9A994F461550FEC1 /* LexGDScript.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexGDScript.cxx; path = ../../lexers/LexGDScript.cxx; sourceTree = SOURCE_ROOT; };\n\t\tF8E54626B22BD9493090F40B /* LexFSharp.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexFSharp.cxx; path = ../../lexers/LexFSharp.cxx; sourceTree = SOURCE_ROOT; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t280262A3246DF655000DF3B8 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXFrameworksBuildPhase section */\n\n/* Begin PBXGroup section */\n\t\t2802629C246DF655000DF3B8 = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t28BA73B024E3510900272C2D /* Info.plist */,\n\t\t\t\t280262B8246DF776000DF3B8 /* LexLib */,\n\t\t\t\t280262B7246DF765000DF3B8 /* Lexers */,\n\t\t\t\t280262A7246DF655000DF3B8 /* Lexilla */,\n\t\t\t\t280262A6246DF655000DF3B8 /* Products */,\n\t\t\t);\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t280262A6246DF655000DF3B8 /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t280262A5246DF655000DF3B8 /* liblexilla.dylib */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t280262A7246DF655000DF3B8 /* Lexilla */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t28BA73AC24E34DBC00272C2D /* Lexilla.cxx */,\n\t\t\t\t28BA73AB24E34DBC00272C2D /* Lexilla.h */,\n\t\t\t);\n\t\t\tname = Lexilla;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t280262B7246DF765000DF3B8 /* Lexers */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t28BA730624E34D9400272C2D /* LexA68k.cxx */,\n\t\t\t\t28BA72EE24E34D9300272C2D /* LexAbaqus.cxx */,\n\t\t\t\t28BA730024E34D9400272C2D /* LexAda.cxx */,\n\t\t\t\t28BA72DF24E34D9200272C2D /* LexAPDL.cxx */,\n\t\t\t\t3AF14420BFC43876F16C5995 /* LexAsciidoc.cxx */,\n\t\t\t\t28BA72FF24E34D9400272C2D /* LexAsm.cxx */,\n\t\t\t\t28BA72DB24E34D9200272C2D /* LexAsn1.cxx */,\n\t\t\t\t28BA72D724E34D9200272C2D /* LexASY.cxx */,\n\t\t\t\t28BA730B24E34D9400272C2D /* LexAU3.cxx */,\n\t\t\t\t28BA733224E34D9700272C2D /* LexAVE.cxx */,\n\t\t\t\t28BA732124E34D9600272C2D /* LexAVS.cxx */,\n\t\t\t\t28BA730C24E34D9400272C2D /* LexBaan.cxx */,\n\t\t\t\t28BA72D824E34D9200272C2D /* LexBash.cxx */,\n\t\t\t\t28BA72C724E34D9100272C2D /* LexBasic.cxx */,\n\t\t\t\t28BA72EF24E34D9300272C2D /* LexBatch.cxx */,\n\t\t\t\t28BA733524E34D9700272C2D /* LexBibTeX.cxx */,\n\t\t\t\t28BA72D624E34D9200272C2D /* LexBullant.cxx */,\n\t\t\t\t28BA732B24E34D9600272C2D /* LexCaml.cxx */,\n\t\t\t\t28BA72C824E34D9100272C2D /* LexCIL.cxx */,\n\t\t\t\t28BA72D024E34D9200272C2D /* LexCLW.cxx */,\n\t\t\t\t28BA72FE24E34D9400272C2D /* LexCmake.cxx */,\n\t\t\t\t28BA732624E34D9600272C2D /* LexCOBOL.cxx */,\n\t\t\t\t28BA72DC24E34D9200272C2D /* LexCoffeeScript.cxx */,\n\t\t\t\t28BA730424E34D9400272C2D /* LexConf.cxx */,\n\t\t\t\t28BA72F024E34D9300272C2D /* LexCPP.cxx */,\n\t\t\t\t28BA730124E34D9400272C2D /* LexCrontab.cxx */,\n\t\t\t\t28BA731524E34D9500272C2D /* LexCsound.cxx */,\n\t\t\t\t28BA732924E34D9600272C2D /* LexCSS.cxx */,\n\t\t\t\t28BA72E024E34D9200272C2D /* LexD.cxx */,\n\t\t\t\t28BA732C24E34D9600272C2D /* LexDataflex.cxx */,\n\t\t\t\t28BA72DD24E34D9200272C2D /* LexDiff.cxx */,\n\t\t\t\t28BA732024E34D9600272C2D /* LexDMAP.cxx */,\n\t\t\t\t28BA730224E34D9400272C2D /* LexDMIS.cxx */,\n\t\t\t\t28BA733324E34D9700272C2D /* LexECL.cxx */,\n\t\t\t\t28BA72F524E34D9300272C2D /* LexEDIFACT.cxx */,\n\t\t\t\t28BA72D924E34D9200272C2D /* LexEiffel.cxx */,\n\t\t\t\t28BA72E824E34D9200272C2D /* LexErlang.cxx */,\n\t\t\t\t28BA72EB24E34D9300272C2D /* LexErrorList.cxx */,\n\t\t\t\t28BA72F624E34D9300272C2D /* LexEScript.cxx */,\n\t\t\t\t28BA72EC24E34D9300272C2D /* LexFlagship.cxx */,\n\t\t\t\t28BA72CB24E34D9100272C2D /* LexForth.cxx */,\n\t\t\t\t28BA72FB24E34D9400272C2D /* LexFortran.cxx */,\n\t\t\t\tF8E54626B22BD9493090F40B /* LexFSharp.cxx */,\n\t\t\t\t28BA72F224E34D9300272C2D /* LexGAP.cxx */,\n\t\t\t\tA383409E9A994F461550FEC1 /* LexGDScript.cxx */,\n\t\t\t\t28BA72CF24E34D9100272C2D /* LexGui4Cli.cxx */,\n\t\t\t\t28BA731B24E34D9500272C2D /* LexHaskell.cxx */,\n\t\t\t\t28BA731924E34D9500272C2D /* LexHex.cxx */,\n\t\t\t\t28BA72E224E34D9200272C2D /* LexHollywood.cxx */,\n\t\t\t\t28BA72FA24E34D9300272C2D /* LexHTML.cxx */,\n\t\t\t\t28BA72EA24E34D9300272C2D /* LexIndent.cxx */,\n\t\t\t\t28BA730524E34D9400272C2D /* LexInno.cxx */,\n\t\t\t\t28BA733024E34D9600272C2D /* LexJSON.cxx */,\n\t\t\t\t315E4E969868C52C125686B2 /* LexJulia.cxx */,\n\t\t\t\t28BA731124E34D9500272C2D /* LexKix.cxx */,\n\t\t\t\t28BA72F824E34D9300272C2D /* LexKVIrc.cxx */,\n\t\t\t\t28BA72ED24E34D9300272C2D /* LexLaTeX.cxx */,\n\t\t\t\t28BA72E424E34D9200272C2D /* LexLisp.cxx */,\n\t\t\t\t28BA732D24E34D9600272C2D /* LexLout.cxx */,\n\t\t\t\t28BA731624E34D9500272C2D /* LexLua.cxx */,\n\t\t\t\t28BA731324E34D9500272C2D /* LexMagik.cxx */,\n\t\t\t\t28BA730724E34D9400272C2D /* LexMake.cxx */,\n\t\t\t\t28BA732F24E34D9600272C2D /* LexMarkdown.cxx */,\n\t\t\t\t28BA733424E34D9700272C2D /* LexMatlab.cxx */,\n\t\t\t\t28BA732A24E34D9600272C2D /* LexMaxima.cxx */,\n\t\t\t\t28BA72CA24E34D9100272C2D /* LexMetapost.cxx */,\n\t\t\t\t28BA731024E34D9500272C2D /* LexMMIXAL.cxx */,\n\t\t\t\t28BA72D524E34D9200272C2D /* LexModula.cxx */,\n\t\t\t\t28BA730D24E34D9500272C2D /* LexMPT.cxx */,\n\t\t\t\t28BA732824E34D9600272C2D /* LexMSSQL.cxx */,\n\t\t\t\t28BA72E124E34D9200272C2D /* LexMySQL.cxx */,\n\t\t\t\t28BA72D324E34D9200272C2D /* LexNim.cxx */,\n\t\t\t\t28BA733624E34D9700272C2D /* LexNimrod.cxx */,\n\t\t\t\t28BA72F424E34D9300272C2D /* LexNsis.cxx */,\n\t\t\t\t28BA731424E34D9500272C2D /* LexNull.cxx */,\n\t\t\t\t28BA731824E34D9500272C2D /* LexOpal.cxx */,\n\t\t\t\t28BA72CD24E34D9100272C2D /* LexOScript.cxx */,\n\t\t\t\t28BA733124E34D9700272C2D /* LexPascal.cxx */,\n\t\t\t\t28BA732224E34D9600272C2D /* LexPB.cxx */,\n\t\t\t\t28BA733724E34D9700272C2D /* LexPerl.cxx */,\n\t\t\t\t28BA732724E34D9600272C2D /* LexPLM.cxx */,\n\t\t\t\t28BA732324E34D9600272C2D /* LexPO.cxx */,\n\t\t\t\t28BA72F724E34D9300272C2D /* LexPOV.cxx */,\n\t\t\t\t28BA732424E34D9600272C2D /* LexPowerPro.cxx */,\n\t\t\t\t28BA72E524E34D9200272C2D /* LexPowerShell.cxx */,\n\t\t\t\t28BA72E324E34D9200272C2D /* LexProgress.cxx */,\n\t\t\t\t28BA732524E34D9600272C2D /* LexProps.cxx */,\n\t\t\t\t28BA72E624E34D9200272C2D /* LexPS.cxx */,\n\t\t\t\t28BA72FD24E34D9400272C2D /* LexPython.cxx */,\n\t\t\t\t28BA731C24E34D9500272C2D /* LexR.cxx */,\n\t\t\t\t28BA72F124E34D9300272C2D /* LexRaku.cxx */,\n\t\t\t\t28BA72D124E34D9200272C2D /* LexRebol.cxx */,\n\t\t\t\t28BA72FC24E34D9400272C2D /* LexRegistry.cxx */,\n\t\t\t\t28BA72E924E34D9300272C2D /* LexRuby.cxx */,\n\t\t\t\t28BA733824E34D9700272C2D /* LexRust.cxx */,\n\t\t\t\t28BA72D224E34D9200272C2D /* LexSAS.cxx */,\n\t\t\t\t28BA731D24E34D9500272C2D /* LexScriptol.cxx */,\n\t\t\t\t28BA72D424E34D9200272C2D /* LexSmalltalk.cxx */,\n\t\t\t\t28BA72CC24E34D9100272C2D /* LexSML.cxx */,\n\t\t\t\t28BA72DE24E34D9200272C2D /* LexSorcus.cxx */,\n\t\t\t\t28BA72F924E34D9300272C2D /* LexSpecman.cxx */,\n\t\t\t\t28BA730924E34D9400272C2D /* LexSpice.cxx */,\n\t\t\t\t28BA72F324E34D9300272C2D /* LexSQL.cxx */,\n\t\t\t\t28BA731724E34D9500272C2D /* LexStata.cxx */,\n\t\t\t\t28BA731224E34D9500272C2D /* LexSTTXT.cxx */,\n\t\t\t\t28BA72CE24E34D9100272C2D /* LexTACL.cxx */,\n\t\t\t\t28BA730E24E34D9500272C2D /* LexTADS3.cxx */,\n\t\t\t\t28BA732E24E34D9600272C2D /* LexTAL.cxx */,\n\t\t\t\t28BA72C924E34D9100272C2D /* LexTCL.cxx */,\n\t\t\t\t28BA730324E34D9400272C2D /* LexTCMD.cxx */,\n\t\t\t\t28BA730824E34D9400272C2D /* LexTeX.cxx */,\n\t\t\t\t28BA730F24E34D9500272C2D /* LexTxt2tags.cxx */,\n\t\t\t\t28BA731F24E34D9600272C2D /* LexVB.cxx */,\n\t\t\t\t28BA731A24E34D9500272C2D /* LexVerilog.cxx */,\n\t\t\t\t28BA72DA24E34D9200272C2D /* LexVHDL.cxx */,\n\t\t\t\t28BA731E24E34D9500272C2D /* LexVisualProlog.cxx */,\n\t\t\t\t28BA730A24E34D9400272C2D /* LexX12.cxx */,\n\t\t\t\t28BA72E724E34D9200272C2D /* LexYAML.cxx */,\n\t\t\t);\n\t\t\tname = Lexers;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t280262B8246DF776000DF3B8 /* LexLib */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t28BA72AA24E34D5B00272C2D /* Accessor.cxx */,\n\t\t\t\t28BA729724E34D5A00272C2D /* Accessor.h */,\n\t\t\t\t28BA72A024E34D5B00272C2D /* CatalogueModules.h */,\n\t\t\t\t28BA729524E34D5A00272C2D /* CharacterCategory.cxx */,\n\t\t\t\t28BA72A924E34D5B00272C2D /* CharacterCategory.h */,\n\t\t\t\t28BA729924E34D5A00272C2D /* CharacterSet.cxx */,\n\t\t\t\t28BA72A124E34D5B00272C2D /* CharacterSet.h */,\n\t\t\t\t28BA729C24E34D5A00272C2D /* DefaultLexer.cxx */,\n\t\t\t\t28BA729124E34D5A00272C2D /* DefaultLexer.h */,\n\t\t\t\t283A17AC2B47E61100DF5C82 /* InList.cxx */,\n\t\t\t\t283A17AD2B47E61100DF5C82 /* InList.h */,\n\t\t\t\t283639BB268FD4EA009D58A1 /* LexAccessor.cxx */,\n\t\t\t\t28BA729024E34D5A00272C2D /* LexAccessor.h */,\n\t\t\t\t28BA728F24E34D5A00272C2D /* LexerBase.cxx */,\n\t\t\t\t28BA72A624E34D5B00272C2D /* LexerBase.h */,\n\t\t\t\t28BA72A524E34D5B00272C2D /* LexerModule.cxx */,\n\t\t\t\t28BA729424E34D5A00272C2D /* LexerModule.h */,\n\t\t\t\t28BA729D24E34D5A00272C2D /* LexerNoExceptions.cxx */,\n\t\t\t\t28BA729324E34D5A00272C2D /* LexerNoExceptions.h */,\n\t\t\t\t28BA72A724E34D5B00272C2D /* LexerSimple.cxx */,\n\t\t\t\t28BA729624E34D5A00272C2D /* LexerSimple.h */,\n\t\t\t\t28BA729F24E34D5A00272C2D /* OptionSet.h */,\n\t\t\t\t28BA729824E34D5A00272C2D /* PropSetSimple.cxx */,\n\t\t\t\t28BA72A324E34D5B00272C2D /* PropSetSimple.h */,\n\t\t\t\t28BA729A24E34D5A00272C2D /* SparseState.h */,\n\t\t\t\t28BA72A424E34D5B00272C2D /* StringCopy.h */,\n\t\t\t\t28BA72A824E34D5B00272C2D /* StyleContext.cxx */,\n\t\t\t\t28BA72A224E34D5B00272C2D /* StyleContext.h */,\n\t\t\t\t28BA729224E34D5A00272C2D /* SubStyles.h */,\n\t\t\t\t28BA729E24E34D5A00272C2D /* WordList.cxx */,\n\t\t\t\t28BA729B24E34D5A00272C2D /* WordList.h */,\n\t\t\t);\n\t\t\tname = LexLib;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXHeadersBuildPhase section */\n\t\t280262A1246DF655000DF3B8 /* Headers */ = {\n\t\t\tisa = PBXHeadersBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t28BA73AD24E34DBC00272C2D /* Lexilla.h in Headers */,\n\t\t\t\t28BA72BF24E34D5B00272C2D /* PropSetSimple.h in Headers */,\n\t\t\t\t28BA72B224E34D5B00272C2D /* LexerSimple.h in Headers */,\n\t\t\t\t28BA72AF24E34D5B00272C2D /* LexerNoExceptions.h in Headers */,\n\t\t\t\t28BA72B724E34D5B00272C2D /* WordList.h in Headers */,\n\t\t\t\t28BA72C024E34D5B00272C2D /* StringCopy.h in Headers */,\n\t\t\t\t28BA72AD24E34D5B00272C2D /* DefaultLexer.h in Headers */,\n\t\t\t\t28BA72B324E34D5B00272C2D /* Accessor.h in Headers */,\n\t\t\t\t28BA72BE24E34D5B00272C2D /* StyleContext.h in Headers */,\n\t\t\t\t28BA72BB24E34D5B00272C2D /* OptionSet.h in Headers */,\n\t\t\t\t283A17AF2B47E61100DF5C82 /* InList.h in Headers */,\n\t\t\t\t28BA72B024E34D5B00272C2D /* LexerModule.h in Headers */,\n\t\t\t\t28BA72AC24E34D5B00272C2D /* LexAccessor.h in Headers */,\n\t\t\t\t28BA72C524E34D5B00272C2D /* CharacterCategory.h in Headers */,\n\t\t\t\t28BA72BD24E34D5B00272C2D /* CharacterSet.h in Headers */,\n\t\t\t\t28BA72AE24E34D5B00272C2D /* SubStyles.h in Headers */,\n\t\t\t\t28BA72BC24E34D5B00272C2D /* CatalogueModules.h in Headers */,\n\t\t\t\t28BA72C224E34D5B00272C2D /* LexerBase.h in Headers */,\n\t\t\t\t28BA72B624E34D5B00272C2D /* SparseState.h in Headers */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXHeadersBuildPhase section */\n\n/* Begin PBXNativeTarget section */\n\t\t280262A4246DF655000DF3B8 /* lexilla */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 280262B0246DF655000DF3B8 /* Build configuration list for PBXNativeTarget \"lexilla\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t280262A1246DF655000DF3B8 /* Headers */,\n\t\t\t\t280262A2246DF655000DF3B8 /* Sources */,\n\t\t\t\t280262A3246DF655000DF3B8 /* Frameworks */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = lexilla;\n\t\t\tproductName = lexilla;\n\t\t\tproductReference = 280262A5246DF655000DF3B8 /* liblexilla.dylib */;\n\t\t\tproductType = \"com.apple.product-type.library.dynamic\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\t2802629D246DF655000DF3B8 /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tattributes = {\n\t\t\t\tBuildIndependentTargetsInParallel = YES;\n\t\t\t\tLastUpgradeCheck = 1500;\n\t\t\t\tORGANIZATIONNAME = \"Neil Hodgson\";\n\t\t\t\tTargetAttributes = {\n\t\t\t\t\t280262A4246DF655000DF3B8 = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 11.4.1;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tbuildConfigurationList = 280262A0246DF655000DF3B8 /* Build configuration list for PBXProject \"Lexilla\" */;\n\t\t\tcompatibilityVersion = \"Xcode 9.3\";\n\t\t\tdevelopmentRegion = en;\n\t\t\thasScannedForEncodings = 0;\n\t\t\tknownRegions = (\n\t\t\t\ten,\n\t\t\t\tBase,\n\t\t\t);\n\t\t\tmainGroup = 2802629C246DF655000DF3B8;\n\t\t\tproductRefGroup = 280262A6246DF655000DF3B8 /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\t280262A4246DF655000DF3B8 /* lexilla */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t280262A2246DF655000DF3B8 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t28BA739A24E34D9700272C2D /* LexMSSQL.cxx in Sources */,\n\t\t\t\t28BA735324E34D9700272C2D /* LexMySQL.cxx in Sources */,\n\t\t\t\t28BA738024E34D9700272C2D /* LexTADS3.cxx in Sources */,\n\t\t\t\t28BA73A924E34D9700272C2D /* LexPerl.cxx in Sources */,\n\t\t\t\t28BA733D24E34D9700272C2D /* LexForth.cxx in Sources */,\n\t\t\t\t28BA736824E34D9700272C2D /* LexEScript.cxx in Sources */,\n\t\t\t\t283639BC268FD4EA009D58A1 /* LexAccessor.cxx in Sources */,\n\t\t\t\t28BA737124E34D9700272C2D /* LexAsm.cxx in Sources */,\n\t\t\t\t28BA737B24E34D9700272C2D /* LexSpice.cxx in Sources */,\n\t\t\t\t28BA737024E34D9700272C2D /* LexCmake.cxx in Sources */,\n\t\t\t\t28BA734624E34D9700272C2D /* LexSmalltalk.cxx in Sources */,\n\t\t\t\t28BA72C424E34D5B00272C2D /* StyleContext.cxx in Sources */,\n\t\t\t\t28BA734C24E34D9700272C2D /* LexVHDL.cxx in Sources */,\n\t\t\t\t28BA737724E34D9700272C2D /* LexInno.cxx in Sources */,\n\t\t\t\t28BA739B24E34D9700272C2D /* LexCSS.cxx in Sources */,\n\t\t\t\t28BA734A24E34D9700272C2D /* LexBash.cxx in Sources */,\n\t\t\t\t28BA734224E34D9700272C2D /* LexCLW.cxx in Sources */,\n\t\t\t\t28BA734424E34D9700272C2D /* LexSAS.cxx in Sources */,\n\t\t\t\t28BA738E24E34D9700272C2D /* LexR.cxx in Sources */,\n\t\t\t\t28BA72C124E34D5B00272C2D /* LexerModule.cxx in Sources */,\n\t\t\t\t28BA735C24E34D9700272C2D /* LexIndent.cxx in Sources */,\n\t\t\t\t28BA736624E34D9700272C2D /* LexNsis.cxx in Sources */,\n\t\t\t\t28BA734724E34D9700272C2D /* LexModula.cxx in Sources */,\n\t\t\t\t28BA734924E34D9700272C2D /* LexASY.cxx in Sources */,\n\t\t\t\t28BA739024E34D9700272C2D /* LexVisualProlog.cxx in Sources */,\n\t\t\t\t28BA739524E34D9700272C2D /* LexPO.cxx in Sources */,\n\t\t\t\t28BA72BA24E34D5B00272C2D /* WordList.cxx in Sources */,\n\t\t\t\t28BA739624E34D9700272C2D /* LexPowerPro.cxx in Sources */,\n\t\t\t\t28BA733924E34D9700272C2D /* LexBasic.cxx in Sources */,\n\t\t\t\t28BA739D24E34D9700272C2D /* LexCaml.cxx in Sources */,\n\t\t\t\t28BA739724E34D9700272C2D /* LexProps.cxx in Sources */,\n\t\t\t\t28BA737424E34D9700272C2D /* LexDMIS.cxx in Sources */,\n\t\t\t\t28BA73A524E34D9700272C2D /* LexECL.cxx in Sources */,\n\t\t\t\t28BA736524E34D9700272C2D /* LexSQL.cxx in Sources */,\n\t\t\t\t28BA72AB24E34D5B00272C2D /* LexerBase.cxx in Sources */,\n\t\t\t\t28BA72B824E34D5B00272C2D /* DefaultLexer.cxx in Sources */,\n\t\t\t\t28BA73A024E34D9700272C2D /* LexTAL.cxx in Sources */,\n\t\t\t\t28BA733C24E34D9700272C2D /* LexMetapost.cxx in Sources */,\n\t\t\t\t28BA733A24E34D9700272C2D /* LexCIL.cxx in Sources */,\n\t\t\t\t28BA735D24E34D9700272C2D /* LexErrorList.cxx in Sources */,\n\t\t\t\t28BA737224E34D9700272C2D /* LexAda.cxx in Sources */,\n\t\t\t\t28BA737D24E34D9700272C2D /* LexAU3.cxx in Sources */,\n\t\t\t\t28BA734024E34D9700272C2D /* LexTACL.cxx in Sources */,\n\t\t\t\t28BA736724E34D9700272C2D /* LexEDIFACT.cxx in Sources */,\n\t\t\t\t28BA736024E34D9700272C2D /* LexAbaqus.cxx in Sources */,\n\t\t\t\t28BA734D24E34D9700272C2D /* LexAsn1.cxx in Sources */,\n\t\t\t\t28BA737A24E34D9700272C2D /* LexTeX.cxx in Sources */,\n\t\t\t\t28BA739124E34D9700272C2D /* LexVB.cxx in Sources */,\n\t\t\t\t28BA735E24E34D9700272C2D /* LexFlagship.cxx in Sources */,\n\t\t\t\t28BA735B24E34D9700272C2D /* LexRuby.cxx in Sources */,\n\t\t\t\t28BA735424E34D9700272C2D /* LexHollywood.cxx in Sources */,\n\t\t\t\t28BA72B924E34D5B00272C2D /* LexerNoExceptions.cxx in Sources */,\n\t\t\t\t28BA736D24E34D9700272C2D /* LexFortran.cxx in Sources */,\n\t\t\t\t28BA738924E34D9700272C2D /* LexStata.cxx in Sources */,\n\t\t\t\t28BA737524E34D9700272C2D /* LexTCMD.cxx in Sources */,\n\t\t\t\t28BA72C624E34D5B00272C2D /* Accessor.cxx in Sources */,\n\t\t\t\t28BA733B24E34D9700272C2D /* LexTCL.cxx in Sources */,\n\t\t\t\t28BA739C24E34D9700272C2D /* LexMaxima.cxx in Sources */,\n\t\t\t\t28BA73AA24E34D9700272C2D /* LexRust.cxx in Sources */,\n\t\t\t\t28BA733F24E34D9700272C2D /* LexOScript.cxx in Sources */,\n\t\t\t\t28BA737324E34D9700272C2D /* LexCrontab.cxx in Sources */,\n\t\t\t\t28BA734E24E34D9700272C2D /* LexCoffeeScript.cxx in Sources */,\n\t\t\t\t28BA735624E34D9700272C2D /* LexLisp.cxx in Sources */,\n\t\t\t\t28BA735824E34D9700272C2D /* LexPS.cxx in Sources */,\n\t\t\t\t28BA735F24E34D9700272C2D /* LexLaTeX.cxx in Sources */,\n\t\t\t\t28BA736B24E34D9700272C2D /* LexSpecman.cxx in Sources */,\n\t\t\t\t28BA73A724E34D9700272C2D /* LexBibTeX.cxx in Sources */,\n\t\t\t\t28BA737E24E34D9700272C2D /* LexBaan.cxx in Sources */,\n\t\t\t\t28BA738124E34D9700272C2D /* LexTxt2tags.cxx in Sources */,\n\t\t\t\t28BA737F24E34D9700272C2D /* LexMPT.cxx in Sources */,\n\t\t\t\t28BA738424E34D9700272C2D /* LexSTTXT.cxx in Sources */,\n\t\t\t\t28BA734F24E34D9700272C2D /* LexDiff.cxx in Sources */,\n\t\t\t\t28BA735924E34D9700272C2D /* LexYAML.cxx in Sources */,\n\t\t\t\t28BA735524E34D9700272C2D /* LexProgress.cxx in Sources */,\n\t\t\t\t28BA736F24E34D9700272C2D /* LexPython.cxx in Sources */,\n\t\t\t\t28BA72B524E34D5B00272C2D /* CharacterSet.cxx in Sources */,\n\t\t\t\t28BA739E24E34D9700272C2D /* LexDataflex.cxx in Sources */,\n\t\t\t\t28BA738F24E34D9700272C2D /* LexScriptol.cxx in Sources */,\n\t\t\t\t28BA736C24E34D9700272C2D /* LexHTML.cxx in Sources */,\n\t\t\t\t28BA737924E34D9700272C2D /* LexMake.cxx in Sources */,\n\t\t\t\t28BA738524E34D9700272C2D /* LexMagik.cxx in Sources */,\n\t\t\t\t28BA72B124E34D5B00272C2D /* CharacterCategory.cxx in Sources */,\n\t\t\t\t28BA739424E34D9700272C2D /* LexPB.cxx in Sources */,\n\t\t\t\t28BA73A624E34D9700272C2D /* LexMatlab.cxx in Sources */,\n\t\t\t\t28BA736324E34D9700272C2D /* LexRaku.cxx in Sources */,\n\t\t\t\t28BA736224E34D9700272C2D /* LexCPP.cxx in Sources */,\n\t\t\t\t283A17AE2B47E61100DF5C82 /* InList.cxx in Sources */,\n\t\t\t\t28BA738A24E34D9700272C2D /* LexOpal.cxx in Sources */,\n\t\t\t\t28BA736E24E34D9700272C2D /* LexRegistry.cxx in Sources */,\n\t\t\t\t28BA738224E34D9700272C2D /* LexMMIXAL.cxx in Sources */,\n\t\t\t\t28BA736A24E34D9700272C2D /* LexKVIrc.cxx in Sources */,\n\t\t\t\t28BA73A224E34D9700272C2D /* LexJSON.cxx in Sources */,\n\t\t\t\t28BA738724E34D9700272C2D /* LexCsound.cxx in Sources */,\n\t\t\t\t28BA738824E34D9700272C2D /* LexLua.cxx in Sources */,\n\t\t\t\t28BA739824E34D9700272C2D /* LexCOBOL.cxx in Sources */,\n\t\t\t\t28BA73A824E34D9700272C2D /* LexNimrod.cxx in Sources */,\n\t\t\t\t28BA739324E34D9700272C2D /* LexAVS.cxx in Sources */,\n\t\t\t\t28BA737624E34D9700272C2D /* LexConf.cxx in Sources */,\n\t\t\t\t28BA734524E34D9700272C2D /* LexNim.cxx in Sources */,\n\t\t\t\t28BA73AE24E34DBC00272C2D /* Lexilla.cxx in Sources */,\n\t\t\t\t28BA72C324E34D5B00272C2D /* LexerSimple.cxx in Sources */,\n\t\t\t\t28BA735124E34D9700272C2D /* LexAPDL.cxx in Sources */,\n\t\t\t\t28BA736424E34D9700272C2D /* LexGAP.cxx in Sources */,\n\t\t\t\t28BA734324E34D9700272C2D /* LexRebol.cxx in Sources */,\n\t\t\t\t28BA733E24E34D9700272C2D /* LexSML.cxx in Sources */,\n\t\t\t\t28BA738C24E34D9700272C2D /* LexVerilog.cxx in Sources */,\n\t\t\t\t28BA738624E34D9700272C2D /* LexNull.cxx in Sources */,\n\t\t\t\t28BA736124E34D9700272C2D /* LexBatch.cxx in Sources */,\n\t\t\t\t28BA736924E34D9700272C2D /* LexPOV.cxx in Sources */,\n\t\t\t\t28BA734124E34D9700272C2D /* LexGui4Cli.cxx in Sources */,\n\t\t\t\t28BA734824E34D9700272C2D /* LexBullant.cxx in Sources */,\n\t\t\t\t28BA734B24E34D9700272C2D /* LexEiffel.cxx in Sources */,\n\t\t\t\t28BA73A424E34D9700272C2D /* LexAVE.cxx in Sources */,\n\t\t\t\t28BA738D24E34D9700272C2D /* LexHaskell.cxx in Sources */,\n\t\t\t\t28BA735024E34D9700272C2D /* LexSorcus.cxx in Sources */,\n\t\t\t\t28BA739F24E34D9700272C2D /* LexLout.cxx in Sources */,\n\t\t\t\t28BA73A124E34D9700272C2D /* LexMarkdown.cxx in Sources */,\n\t\t\t\t28BA739224E34D9700272C2D /* LexDMAP.cxx in Sources */,\n\t\t\t\t28BA737824E34D9700272C2D /* LexA68k.cxx in Sources */,\n\t\t\t\t28BA735A24E34D9700272C2D /* LexErlang.cxx in Sources */,\n\t\t\t\t28BA738B24E34D9700272C2D /* LexHex.cxx in Sources */,\n\t\t\t\t28BA735224E34D9700272C2D /* LexD.cxx in Sources */,\n\t\t\t\t28BA73A324E34D9700272C2D /* LexPascal.cxx in Sources */,\n\t\t\t\t28BA739924E34D9700272C2D /* LexPLM.cxx in Sources */,\n\t\t\t\t28BA735724E34D9700272C2D /* LexPowerShell.cxx in Sources */,\n\t\t\t\t28BA738324E34D9700272C2D /* LexKix.cxx in Sources */,\n\t\t\t\t28BA72B424E34D5B00272C2D /* PropSetSimple.cxx in Sources */,\n\t\t\t\t28BA737C24E34D9700272C2D /* LexX12.cxx in Sources */,\n\t\t\t\tB32D4A2A9CEC222A5140E99F /* LexFSharp.cxx in Sources */,\n\t\t\t\t70BF497C8D265026B77C97DA /* LexJulia.cxx in Sources */,\n\t\t\t\t510D44AFB91EE873E86ABDD4 /* LexAsciidoc.cxx in Sources */,\n\t\t\t\t00D544CC992062D2E3CD4BF6 /* LexGDScript.cxx in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin XCBuildConfiguration section */\n\t\t280262AE246DF655000DF3B8 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++14\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_WEAK = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEAD_CODE_STRIPPING = YES;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = dwarf;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_TESTABILITY = YES;\n\t\t\t\tENABLE_USER_SCRIPT_SANDBOXING = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu11;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\tDEBUG,\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.13;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;\n\t\t\t\tMTL_FAST_MATH = YES;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\t\"OTHER_LDFLAGS[arch=*]\" = \"-Wl,-ld_classic\";\n\t\t\t\tSDKROOT = macosx;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t280262AF246DF655000DF3B8 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++14\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_WEAK = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEAD_CODE_STRIPPING = YES;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\n\t\t\t\tENABLE_NS_ASSERTIONS = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_USER_SCRIPT_SANDBOXING = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu11;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = NDEBUG;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.13;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = NO;\n\t\t\t\tMTL_FAST_MATH = YES;\n\t\t\t\t\"OTHER_LDFLAGS[arch=*]\" = \"-Wl,-ld_classic\";\n\t\t\t\tSDKROOT = macosx;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t280262B1246DF655000DF3B8 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++17\";\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tCURRENT_PROJECT_VERSION = 5.3.2;\n\t\t\t\tDEAD_CODE_STRIPPING = YES;\n\t\t\t\tDEVELOPMENT_TEAM = 4F446KW87E;\n\t\t\t\tDYLIB_COMPATIBILITY_VERSION = 1;\n\t\t\t\tDYLIB_CURRENT_VERSION = 1;\n\t\t\t\tEXECUTABLE_PREFIX = lib;\n\t\t\t\tGCC_ENABLE_CPP_EXCEPTIONS = YES;\n\t\t\t\tGCC_ENABLE_CPP_RTTI = YES;\n\t\t\t\tGCC_SYMBOLS_PRIVATE_EXTERN = YES;\n\t\t\t\tHEADER_SEARCH_PATHS = (\n\t\t\t\t\t../../include,\n\t\t\t\t\t../../../scintilla/include,\n\t\t\t\t\t../../lexlib,\n\t\t\t\t);\n\t\t\t\tINFOPLIST_FILE = \"$(SRCROOT)/Lexilla/Info.plist\";\n\t\t\t\tINSTALL_PATH = \"@rpath\";\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.13;\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = org.scintilla.Lexilla;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSKIP_INSTALL = YES;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t280262B2246DF655000DF3B8 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++17\";\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tCURRENT_PROJECT_VERSION = 5.3.2;\n\t\t\t\tDEAD_CODE_STRIPPING = YES;\n\t\t\t\tDEVELOPMENT_TEAM = 4F446KW87E;\n\t\t\t\tDYLIB_COMPATIBILITY_VERSION = 1;\n\t\t\t\tDYLIB_CURRENT_VERSION = 1;\n\t\t\t\tEXECUTABLE_PREFIX = lib;\n\t\t\t\tGCC_ENABLE_CPP_EXCEPTIONS = YES;\n\t\t\t\tGCC_ENABLE_CPP_RTTI = YES;\n\t\t\t\tGCC_SYMBOLS_PRIVATE_EXTERN = YES;\n\t\t\t\tHEADER_SEARCH_PATHS = (\n\t\t\t\t\t../../include,\n\t\t\t\t\t../../../scintilla/include,\n\t\t\t\t\t../../lexlib,\n\t\t\t\t);\n\t\t\t\tINFOPLIST_FILE = \"$(SRCROOT)/Lexilla/Info.plist\";\n\t\t\t\tINSTALL_PATH = \"@rpath\";\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.13;\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = org.scintilla.Lexilla;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSKIP_INSTALL = YES;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\t280262A0246DF655000DF3B8 /* Build configuration list for PBXProject \"Lexilla\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t280262AE246DF655000DF3B8 /* Debug */,\n\t\t\t\t280262AF246DF655000DF3B8 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t280262B0246DF655000DF3B8 /* Build configuration list for PBXNativeTarget \"lexilla\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t280262B1246DF655000DF3B8 /* Debug */,\n\t\t\t\t280262B2246DF655000DF3B8 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n/* End XCConfigurationList section */\n\t};\n\trootObject = 2802629D246DF655000DF3B8 /* Project object */;\n}\n"
  },
  {
    "path": "lexilla/src/Lexilla/Lexilla.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"self:Lexilla.xcodeproj\">\n   </FileRef>\n</Workspace>\n"
  },
  {
    "path": "lexilla/src/Lexilla.cxx",
    "content": "// Lexilla lexer library\n/** @file Lexilla.cxx\n ** Lexer infrastructure.\n ** Provides entry points to shared library.\n **/\n// Copyright 2019 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <cstring>\n\n#include <vector>\n#include <initializer_list>\n\n#if defined(_WIN32)\n#define EXPORT_FUNCTION __declspec(dllexport)\n#define CALLING_CONVENTION __stdcall\n#else\n#define EXPORT_FUNCTION __attribute__((visibility(\"default\")))\n#define CALLING_CONVENTION\n#endif\n\n#include \"ILexer.h\"\n\n#include \"LexerModule.h\"\n#include \"CatalogueModules.h\"\n\nusing namespace Lexilla;\n\n//++Autogenerated -- run lexilla/scripts/LexillaGen.py to regenerate\n//**\\(extern LexerModule \\*;\\n\\)\nextern LexerModule lmA68k;\nextern LexerModule lmAbaqus;\nextern LexerModule lmAda;\nextern LexerModule lmAPDL;\nextern LexerModule lmAs;\nextern LexerModule lmAsciidoc;\nextern LexerModule lmAsm;\nextern LexerModule lmAsn1;\nextern LexerModule lmASY;\nextern LexerModule lmAU3;\nextern LexerModule lmAVE;\nextern LexerModule lmAVS;\nextern LexerModule lmBaan;\nextern LexerModule lmBash;\nextern LexerModule lmBatch;\nextern LexerModule lmBibTeX;\nextern LexerModule lmBlitzBasic;\nextern LexerModule lmBullant;\nextern LexerModule lmCaml;\nextern LexerModule lmCIL;\nextern LexerModule lmClw;\nextern LexerModule lmClwNoCase;\nextern LexerModule lmCmake;\nextern LexerModule lmCOBOL;\nextern LexerModule lmCoffeeScript;\nextern LexerModule lmConf;\nextern LexerModule lmCPP;\nextern LexerModule lmCPPNoCase;\nextern LexerModule lmCsound;\nextern LexerModule lmCss;\nextern LexerModule lmD;\nextern LexerModule lmDataflex;\nextern LexerModule lmDiff;\nextern LexerModule lmDMAP;\nextern LexerModule lmDMIS;\nextern LexerModule lmECL;\nextern LexerModule lmEDIFACT;\nextern LexerModule lmEiffel;\nextern LexerModule lmEiffelkw;\nextern LexerModule lmErlang;\nextern LexerModule lmErrorList;\nextern LexerModule lmESCRIPT;\nextern LexerModule lmF77;\nextern LexerModule lmFlagShip;\nextern LexerModule lmForth;\nextern LexerModule lmFortran;\nextern LexerModule lmFreeBasic;\nextern LexerModule lmFSharp;\nextern LexerModule lmGAP;\nextern LexerModule lmGDScript;\nextern LexerModule lmGui4Cli;\nextern LexerModule lmHaskell;\nextern LexerModule lmHollywood;\nextern LexerModule lmHTML;\nextern LexerModule lmIHex;\nextern LexerModule lmIndent;\nextern LexerModule lmInno;\nextern LexerModule lmJSON;\nextern LexerModule lmJulia;\nextern LexerModule lmKix;\nextern LexerModule lmKVIrc;\nextern LexerModule lmLatex;\nextern LexerModule lmLISP;\nextern LexerModule lmLiterateHaskell;\nextern LexerModule lmLot;\nextern LexerModule lmLout;\nextern LexerModule lmLua;\nextern LexerModule lmMagikSF;\nextern LexerModule lmMake;\nextern LexerModule lmMarkdown;\nextern LexerModule lmMatlab;\nextern LexerModule lmMaxima;\nextern LexerModule lmMETAPOST;\nextern LexerModule lmMMIXAL;\nextern LexerModule lmModula;\nextern LexerModule lmMSSQL;\nextern LexerModule lmMySQL;\nextern LexerModule lmNim;\nextern LexerModule lmNimrod;\nextern LexerModule lmNncrontab;\nextern LexerModule lmNsis;\nextern LexerModule lmNull;\nextern LexerModule lmOctave;\nextern LexerModule lmOpal;\nextern LexerModule lmOScript;\nextern LexerModule lmPascal;\nextern LexerModule lmPB;\nextern LexerModule lmPerl;\nextern LexerModule lmPHPSCRIPT;\nextern LexerModule lmPLM;\nextern LexerModule lmPO;\nextern LexerModule lmPOV;\nextern LexerModule lmPowerPro;\nextern LexerModule lmPowerShell;\nextern LexerModule lmProgress;\nextern LexerModule lmProps;\nextern LexerModule lmPS;\nextern LexerModule lmPureBasic;\nextern LexerModule lmPython;\nextern LexerModule lmR;\nextern LexerModule lmRaku;\nextern LexerModule lmREBOL;\nextern LexerModule lmRegistry;\nextern LexerModule lmRuby;\nextern LexerModule lmRust;\nextern LexerModule lmSAS;\nextern LexerModule lmScriptol;\nextern LexerModule lmSmalltalk;\nextern LexerModule lmSML;\nextern LexerModule lmSorc;\nextern LexerModule lmSpecman;\nextern LexerModule lmSpice;\nextern LexerModule lmSQL;\nextern LexerModule lmSrec;\nextern LexerModule lmStata;\nextern LexerModule lmSTTXT;\nextern LexerModule lmTACL;\nextern LexerModule lmTADS3;\nextern LexerModule lmTAL;\nextern LexerModule lmTCL;\nextern LexerModule lmTCMD;\nextern LexerModule lmTEHex;\nextern LexerModule lmTeX;\nextern LexerModule lmTxt2tags;\nextern LexerModule lmVB;\nextern LexerModule lmVBScript;\nextern LexerModule lmVerilog;\nextern LexerModule lmVHDL;\nextern LexerModule lmVisualProlog;\nextern LexerModule lmX12;\nextern LexerModule lmXML;\nextern LexerModule lmYAML;\n\n//--Autogenerated -- end of automatically generated section\n\nnamespace {\n\nCatalogueModules catalogueLexilla;\n\nvoid AddEachLexer() {\n\n\tif (catalogueLexilla.Count() > 0) {\n\t\treturn;\n\t}\n\n\tcatalogueLexilla.AddLexerModules({\n//++Autogenerated -- run scripts/LexillaGen.py to regenerate\n//**\\(\\t\\t&\\*,\\n\\)\n\t\t/*&lmA68k,\n\t\t&lmAbaqus,\n\t\t&lmAda,\n\t\t&lmAPDL,\n\t\t&lmAs,\n\t\t&lmAsciidoc,\n\t\t&lmAsm,\n\t\t&lmAsn1,\n\t\t&lmASY,\n\t\t&lmAU3,\n\t\t&lmAVE,\n\t\t&lmAVS,\n\t\t&lmBaan,\n\t\t&lmBash,\n\t\t&lmBatch,\n\t\t&lmBibTeX,\n\t\t&lmBlitzBasic,\n\t\t&lmBullant,\n\t\t&lmCaml,\n\t\t&lmCIL,\n\t\t&lmClw,\n\t\t&lmClwNoCase,\n\t\t&lmCmake,\n\t\t&lmCOBOL,\n\t\t&lmCoffeeScript,\n\t\t&lmConf,*/\n\t\t&lmCPP,\n\t\t&lmCPPNoCase,/*\n\t\t&lmCsound,\n\t\t&lmCss,\n\t\t&lmD,\n\t\t&lmDataflex,\n\t\t&lmDiff,\n\t\t&lmDMAP,\n\t\t&lmDMIS,\n\t\t&lmECL,\n\t\t&lmEDIFACT,\n\t\t&lmEiffel,\n\t\t&lmEiffelkw,\n\t\t&lmErlang,\n\t\t&lmErrorList,\n\t\t&lmESCRIPT,\n\t\t&lmF77,\n\t\t&lmFlagShip,\n\t\t&lmForth,\n\t\t&lmFortran,\n\t\t&lmFreeBasic,\n\t\t&lmFSharp,\n\t\t&lmGAP,\n\t\t&lmGDScript,\n\t\t&lmGui4Cli,\n\t\t&lmHaskell,\n\t\t&lmHollywood,\n\t\t&lmHTML,\n\t\t&lmIHex,\n\t\t&lmIndent,\n\t\t&lmInno,\n\t\t&lmJSON,\n\t\t&lmJulia,\n\t\t&lmKix,\n\t\t&lmKVIrc,\n\t\t&lmLatex,\n\t\t&lmLISP,\n\t\t&lmLiterateHaskell,\n\t\t&lmLot,\n\t\t&lmLout,\n\t\t&lmLua,\n\t\t&lmMagikSF,\n\t\t&lmMake,\n\t\t&lmMarkdown,\n\t\t&lmMatlab,\n\t\t&lmMaxima,\n\t\t&lmMETAPOST,\n\t\t&lmMMIXAL,\n\t\t&lmModula,\n\t\t&lmMSSQL,\n\t\t&lmMySQL,\n\t\t&lmNim,\n\t\t&lmNimrod,\n\t\t&lmNncrontab,\n\t\t&lmNsis,\n\t\t&lmNull,\n\t\t&lmOctave,\n\t\t&lmOpal,\n\t\t&lmOScript,\n\t\t&lmPascal,\n\t\t&lmPB,\n\t\t&lmPerl,\n\t\t&lmPHPSCRIPT,\n\t\t&lmPLM,\n\t\t&lmPO,\n\t\t&lmPOV,\n\t\t&lmPowerPro,\n\t\t&lmPowerShell,\n\t\t&lmProgress,\n\t\t&lmProps,\n\t\t&lmPS,\n\t\t&lmPureBasic,*/\n\t\t&lmPython,/*\n\t\t&lmR,\n\t\t&lmRaku,\n\t\t&lmREBOL,\n\t\t&lmRegistry,*/\n\t\t&lmRuby,/*\n\t\t&lmRust,\n\t\t&lmSAS,\n\t\t&lmScriptol,\n\t\t&lmSmalltalk,\n\t\t&lmSML,\n\t\t&lmSorc,\n\t\t&lmSpecman,\n\t\t&lmSpice,\n\t\t&lmSQL,\n\t\t&lmSrec,\n\t\t&lmStata,\n\t\t&lmSTTXT,\n\t\t&lmTACL,\n\t\t&lmTADS3,\n\t\t&lmTAL,\n\t\t&lmTCL,\n\t\t&lmTCMD,\n\t\t&lmTEHex,\n\t\t&lmTeX,\n\t\t&lmTxt2tags,\n\t\t&lmVB,\n\t\t&lmVBScript,\n\t\t&lmVerilog,\n\t\t&lmVHDL,\n\t\t&lmVisualProlog,\n\t\t&lmX12,\n\t\t&lmXML,\n\t\t&lmYAML,*/\n\n//--Autogenerated -- end of automatically generated section\n\t\t});\n\n}\n\n}\n\nextern \"C\" {\n\nEXPORT_FUNCTION int CALLING_CONVENTION GetLexerCount() {\n\tAddEachLexer();\n\treturn static_cast<int>(catalogueLexilla.Count());\n}\n\nEXPORT_FUNCTION void CALLING_CONVENTION GetLexerName(unsigned int index, char *name, int buflength) {\n\tAddEachLexer();\n\t*name = 0;\n\tconst char *lexerName = catalogueLexilla.Name(index);\n\tif (static_cast<size_t>(buflength) > strlen(lexerName)) {\n\t\tstrcpy(name, lexerName);\n\t}\n}\n\nEXPORT_FUNCTION LexerFactoryFunction CALLING_CONVENTION GetLexerFactory(unsigned int index) {\n\tAddEachLexer();\n\treturn catalogueLexilla.Factory(index);\n}\n\nEXPORT_FUNCTION Scintilla::ILexer5 * CALLING_CONVENTION CreateLexer(const char *name) {\n\tAddEachLexer();\n\tfor (size_t i = 0; i < catalogueLexilla.Count(); i++) {\n\t\tconst char *lexerName = catalogueLexilla.Name(i);\n\t\tif (0 == strcmp(lexerName, name)) {\n\t\t\treturn catalogueLexilla.Create(i);\n\t\t}\n\t}\n\treturn nullptr;\n}\n\nEXPORT_FUNCTION const char * CALLING_CONVENTION LexerNameFromID(int identifier) {\n\tAddEachLexer();\n\tconst LexerModule *pModule = catalogueLexilla.Find(identifier);\n\tif (pModule) {\n\t\treturn pModule->languageName;\n\t}\n\treturn nullptr;\n}\n\nEXPORT_FUNCTION const char * CALLING_CONVENTION GetLibraryPropertyNames() {\n\treturn \"\";\n}\n\nEXPORT_FUNCTION void CALLING_CONVENTION SetLibraryProperty(const char *, const char *) {\n\t// Null implementation\n}\n\nEXPORT_FUNCTION const char * CALLING_CONVENTION GetNameSpace() {\n\treturn \"lexilla\";\n}\n\n}\n\n// Not exported from binary as LexerModule must be built exactly the same as\n// modules listed above\nvoid AddStaticLexerModule(LexerModule *plm) {\n\tAddEachLexer();\n\tcatalogueLexilla.AddLexerModule(plm);\n}\n"
  },
  {
    "path": "lexilla/src/Lexilla.def",
    "content": "EXPORTS\n\tGetLexerCount\n\tGetLexerName\n\tGetLexerFactory\n\tCreateLexer\n\tLexerNameFromID\n\tGetLibraryPropertyNames\n\tSetLibraryProperty\n\tGetNameSpace\n"
  },
  {
    "path": "lexilla/src/Lexilla.pro",
    "content": "# This Qt Creator project file is not meant for creating Lexilla libraries\n# but instead for easily running Clang-Tidy on lexers.\n\nQT       += core\n\nTARGET = Lexilla\nTEMPLATE = lib\nCONFIG += lib_bundle\nCONFIG += c++1z\n\nVERSION = 5.1.3\n\nSOURCES += \\\n    Lexilla.cxx \\\n    $$files(../lexlib/*.cxx, false) \\\n    $$files(../lexers/*.cxx, false)\n\nHEADERS  += \\\n    ../include/Lexilla.h \\\n    $$files(../lexlib/*.h, false) \\\n    $$files(../lexers/*.h, false)\n\nINCLUDEPATH += ../include ../lexlib ../../scintilla/include\n\nDEFINES += _CRT_SECURE_NO_DEPRECATE=1\nCONFIG(release, debug|release) {\n    DEFINES += NDEBUG=1\n}\n\nDESTDIR = ../bin\n\nmacx {\n\tQMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../Frameworks/\n}\n"
  },
  {
    "path": "lexilla/src/Lexilla.ruleset",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<RuleSet Name=\"Lexilla Rules\" Description=\"A set of rules for Lexilla. Don't check for owner, not_null, gsl::at, simple array access.\" ToolsVersion=\"17.0\">\r\n  <IncludeAll Action=\"Warning\" />\r\n  <Rules AnalyzerId=\"Microsoft.Analyzers.NativeCodeAnalysis\" RuleNamespace=\"Microsoft.Rules.Native\">\r\n    <Rule Id=\"C26400\" Action=\"None\" />\r\n    <Rule Id=\"C26429\" Action=\"None\" />\r\n    <Rule Id=\"C26446\" Action=\"None\" />\r\n    <Rule Id=\"C26455\" Action=\"None\" />\r\n    <Rule Id=\"C26481\" Action=\"None\" />\r\n    <Rule Id=\"C26482\" Action=\"None\" />\r\n    <Rule Id=\"C26485\" Action=\"None\" />\r\n  </Rules>\r\n</RuleSet>"
  },
  {
    "path": "lexilla/src/Lexilla.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project DefaultTargets=\"Build\" ToolsVersion=\"14.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <ItemGroup Label=\"ProjectConfigurations\">\r\n    <ProjectConfiguration Include=\"Debug|ARM64\">\r\n      <Configuration>Debug</Configuration>\r\n      <Platform>ARM64</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Debug|Win32\">\r\n      <Configuration>Debug</Configuration>\r\n      <Platform>Win32</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Debug|x64\">\r\n      <Configuration>Debug</Configuration>\r\n      <Platform>x64</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Release|ARM64\">\r\n      <Configuration>Release</Configuration>\r\n      <Platform>ARM64</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Release|Win32\">\r\n      <Configuration>Release</Configuration>\r\n      <Platform>Win32</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Release|x64\">\r\n      <Configuration>Release</Configuration>\r\n      <Platform>x64</Platform>\r\n    </ProjectConfiguration>\r\n  </ItemGroup>\r\n  <PropertyGroup Label=\"Globals\">\r\n    <ProjectGuid>{E541C9BE-13BC-4CE6-A0A4-31145F51A2C1}</ProjectGuid>\r\n    <Keyword>Win32Proj</Keyword>\r\n    <RootNamespace>Lexilla</RootNamespace>\r\n    <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\r\n  <PropertyGroup>\r\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\r\n    <CharacterSet>Unicode</CharacterSet>\r\n    <PlatformToolset>v143</PlatformToolset>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\r\n    <UseDebugLibraries>true</UseDebugLibraries>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"Configuration\">\r\n    <UseDebugLibraries>true</UseDebugLibraries>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\" Label=\"Configuration\">\r\n    <UseDebugLibraries>true</UseDebugLibraries>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\r\n    <UseDebugLibraries>false</UseDebugLibraries>\r\n    <WholeProgramOptimization>true</WholeProgramOptimization>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"Configuration\">\r\n    <UseDebugLibraries>false</UseDebugLibraries>\r\n    <WholeProgramOptimization>true</WholeProgramOptimization>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64'\" Label=\"Configuration\">\r\n    <UseDebugLibraries>false</UseDebugLibraries>\r\n    <WholeProgramOptimization>true</WholeProgramOptimization>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\r\n  <ImportGroup Label=\"ExtensionSettings\">\r\n  </ImportGroup>\r\n  <ImportGroup Label=\"PropertySheets\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n  </ImportGroup>\r\n  <PropertyGroup Label=\"UserMacros\" />\r\n  <PropertyGroup>\r\n    <LinkIncremental>false</LinkIncremental>\r\n    <EnableClangTidyCodeAnalysis>true</EnableClangTidyCodeAnalysis>\r\n    <CodeAnalysisRuleSet>Lexilla.ruleset</CodeAnalysisRuleSet>\r\n  </PropertyGroup>\r\n  <ItemDefinitionGroup>\r\n    <ClCompile>\r\n      <WarningLevel>Level4</WarningLevel>\r\n      <PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_DEPRECATE;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <AdditionalIncludeDirectories>..\\include;..\\..\\scintilla\\include;..\\lexlib;</AdditionalIncludeDirectories>\r\n      <BrowseInformation>true</BrowseInformation>\r\n      <MultiProcessorCompilation>true</MultiProcessorCompilation>\r\n      <MinimalRebuild>false</MinimalRebuild>\r\n      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r\n      <LanguageStandard>stdcpp17</LanguageStandard>\r\n      <AdditionalOptions>/source-charset:utf-8 %(AdditionalOptions)</AdditionalOptions>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Windows</SubSystem>\r\n      <GenerateDebugInformation>true</GenerateDebugInformation>\r\n      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r\n      <CETCompat>true</CETCompat>\r\n      <ModuleDefinitionFile>Lexilla.def</ModuleDefinitionFile>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n    <ClCompile>\r\n      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n    </ClCompile>\r\n    <Link>\r\n      <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\r\n    <ClCompile>\r\n      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n    </ClCompile>\r\n    <Link>\r\n      <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\">\r\n    <ClCompile>\r\n      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n    </ClCompile>\r\n    <Link>\r\n      <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>\r\n      <CETCompat>false</CETCompat>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n    <ClCompile>\r\n      <FunctionLevelLinking>true</FunctionLevelLinking>\r\n      <IntrinsicFunctions>true</IntrinsicFunctions>\r\n      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n    </ClCompile>\r\n    <Link>\r\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r\n      <OptimizeReferences>true</OptimizeReferences>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\r\n    <ClCompile>\r\n      <FunctionLevelLinking>true</FunctionLevelLinking>\r\n      <IntrinsicFunctions>true</IntrinsicFunctions>\r\n      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n    </ClCompile>\r\n    <Link>\r\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r\n      <OptimizeReferences>true</OptimizeReferences>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64'\">\r\n    <ClCompile>\r\n      <FunctionLevelLinking>true</FunctionLevelLinking>\r\n      <IntrinsicFunctions>true</IntrinsicFunctions>\r\n      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n    </ClCompile>\r\n    <Link>\r\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r\n      <OptimizeReferences>true</OptimizeReferences>\r\n      <CETCompat>false</CETCompat>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemGroup>\r\n    <ClCompile Include=\"..\\lexers\\*.cxx\" />\r\n    <ClCompile Include=\"..\\lexlib\\*.cxx\" />\r\n    <ClCompile Include=\"..\\src\\Lexilla.cxx\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ClInclude Include=\"..\\include\\SciLexer.h\" />\r\n    <ClInclude Include=\"..\\lexlib\\*.h\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ResourceCompile Include=\"..\\src\\LexillaVersion.rc\" />\r\n  </ItemGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\r\n  <ImportGroup Label=\"ExtensionTargets\">\r\n  </ImportGroup>\r\n</Project>"
  },
  {
    "path": "lexilla/src/LexillaVersion.rc",
    "content": "// Resource file for Lexilla - provides a version number\n// Copyright 2020 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#include <windows.h>\n\n#define VERSION_LEXILLA \"5.3.2\"\n#define VERSION_WORDS 5, 3, 2, 0\n\nVS_VERSION_INFO VERSIONINFO\nFILEVERSION\tVERSION_WORDS\nPRODUCTVERSION\tVERSION_WORDS\nFILEFLAGSMASK\t0x3fL\nFILEFLAGS 0\nFILEOS VOS_NT_WINDOWS32\nFILETYPE VFT_APP\nFILESUBTYPE VFT2_UNKNOWN\nBEGIN\n\tBLOCK\t\"VarFileInfo\"\n\tBEGIN\n\t\tVALUE\t\"Translation\",\t0x409,\t1200\n\tEND\n\tBLOCK\t\"StringFileInfo\"\n\tBEGIN\n\t\tBLOCK \"040904b0\"\n\t\tBEGIN\n\t\t\tVALUE\t\"CompanyName\",\t\"Neil Hodgson neilh@scintilla.org\\0\"\n\t\t\tVALUE\t\"FileDescription\",\t\"Lexilla.DLL - a Lexical Analysis Component\\0\"\n\t\t\tVALUE\t\"FileVersion\",\tVERSION_LEXILLA \"\\0\"\n\t\t\tVALUE\t\"InternalName\",\t\"Lexilla\\0\"\n\t\t\tVALUE\t\"LegalCopyright\",\t\"Copyright 2019 by Neil Hodgson\\0\"\n\t\t\tVALUE\t\"OriginalFilename\",\t\"Lexilla.DLL\\0\"\n\t\t\tVALUE\t\"ProductName\",\t\"Lexilla\\0\"\n\t\t\tVALUE\t\"ProductVersion\",\tVERSION_LEXILLA \"\\0\"\n\t\tEND\n\tEND\nEND\n"
  },
  {
    "path": "lexilla/src/deps.mak",
    "content": "# Created by DepGen.py. To recreate, run DepGen.py.\n$(DIR_O)/Lexilla.o: \\\n\t../src/Lexilla.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/CatalogueModules.h\n$(DIR_O)/Accessor.o: \\\n\t../lexlib/Accessor.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/PropSetSimple.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h\n$(DIR_O)/CharacterCategory.o: \\\n\t../lexlib/CharacterCategory.cxx \\\n\t../lexlib/CharacterCategory.h\n$(DIR_O)/CharacterSet.o: \\\n\t../lexlib/CharacterSet.cxx \\\n\t../lexlib/CharacterSet.h\n$(DIR_O)/DefaultLexer.o: \\\n\t../lexlib/DefaultLexer.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/PropSetSimple.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/InList.o: \\\n\t../lexlib/InList.cxx \\\n\t../lexlib/InList.h \\\n\t../lexlib/CharacterSet.h\n$(DIR_O)/LexAccessor.o: \\\n\t../lexlib/LexAccessor.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/CharacterSet.h\n$(DIR_O)/LexerBase.o: \\\n\t../lexlib/LexerBase.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/PropSetSimple.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/LexerBase.h\n$(DIR_O)/LexerModule.o: \\\n\t../lexlib/LexerModule.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/PropSetSimple.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/LexerBase.h \\\n\t../lexlib/LexerSimple.h\n$(DIR_O)/LexerNoExceptions.o: \\\n\t../lexlib/LexerNoExceptions.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/PropSetSimple.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/LexerBase.h \\\n\t../lexlib/LexerNoExceptions.h\n$(DIR_O)/LexerSimple.o: \\\n\t../lexlib/LexerSimple.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/PropSetSimple.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/LexerBase.h \\\n\t../lexlib/LexerSimple.h\n$(DIR_O)/PropSetSimple.o: \\\n\t../lexlib/PropSetSimple.cxx \\\n\t../lexlib/PropSetSimple.h\n$(DIR_O)/StyleContext.o: \\\n\t../lexlib/StyleContext.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h\n$(DIR_O)/WordList.o: \\\n\t../lexlib/WordList.cxx \\\n\t../lexlib/WordList.h\n$(DIR_O)/LexA68k.o: \\\n\t../lexers/LexA68k.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexAbaqus.o: \\\n\t../lexers/LexAbaqus.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexAda.o: \\\n\t../lexers/LexAda.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexAPDL.o: \\\n\t../lexers/LexAPDL.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexAsciidoc.o: \\\n\t../lexers/LexAsciidoc.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexAsm.o: \\\n\t../lexers/LexAsm.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexAsn1.o: \\\n\t../lexers/LexAsn1.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexASY.o: \\\n\t../lexers/LexASY.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexAU3.o: \\\n\t../lexers/LexAU3.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexAVE.o: \\\n\t../lexers/LexAVE.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexAVS.o: \\\n\t../lexers/LexAVS.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexBaan.o: \\\n\t../lexers/LexBaan.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexBash.o: \\\n\t../lexers/LexBash.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/StringCopy.h \\\n\t../lexlib/InList.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/SubStyles.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexBasic.o: \\\n\t../lexers/LexBasic.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexBatch.o: \\\n\t../lexers/LexBatch.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/InList.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexBibTeX.o: \\\n\t../lexers/LexBibTeX.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/PropSetSimple.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexBullant.o: \\\n\t../lexers/LexBullant.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexCaml.o: \\\n\t../lexers/LexCaml.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexCIL.o: \\\n\t../lexers/LexCIL.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/StringCopy.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexCLW.o: \\\n\t../lexers/LexCLW.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexCmake.o: \\\n\t../lexers/LexCmake.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexCOBOL.o: \\\n\t../lexers/LexCOBOL.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexCoffeeScript.o: \\\n\t../lexers/LexCoffeeScript.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexConf.o: \\\n\t../lexers/LexConf.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexCPP.o: \\\n\t../lexers/LexCPP.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/StringCopy.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/SparseState.h \\\n\t../lexlib/SubStyles.h\n$(DIR_O)/LexCrontab.o: \\\n\t../lexers/LexCrontab.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexCsound.o: \\\n\t../lexers/LexCsound.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexCSS.o: \\\n\t../lexers/LexCSS.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexD.o: \\\n\t../lexers/LexD.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexDataflex.o: \\\n\t../lexers/LexDataflex.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexDiff.o: \\\n\t../lexers/LexDiff.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexDMAP.o: \\\n\t../lexers/LexDMAP.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexDMIS.o: \\\n\t../lexers/LexDMIS.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexECL.o: \\\n\t../lexers/LexECL.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/PropSetSimple.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h\n$(DIR_O)/LexEDIFACT.o: \\\n\t../lexers/LexEDIFACT.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexEiffel.o: \\\n\t../lexers/LexEiffel.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexErlang.o: \\\n\t../lexers/LexErlang.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexErrorList.o: \\\n\t../lexers/LexErrorList.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/InList.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexEScript.o: \\\n\t../lexers/LexEScript.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexFlagship.o: \\\n\t../lexers/LexFlagship.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexForth.o: \\\n\t../lexers/LexForth.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexFortran.o: \\\n\t../lexers/LexFortran.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexFSharp.o: \\\n\t../lexers/LexFSharp.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexGAP.o: \\\n\t../lexers/LexGAP.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexGDScript.o: \\\n\t../lexers/LexGDScript.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/StringCopy.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/CharacterCategory.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/SubStyles.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexGui4Cli.o: \\\n\t../lexers/LexGui4Cli.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexHaskell.o: \\\n\t../lexers/LexHaskell.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/PropSetSimple.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/CharacterCategory.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexHex.o: \\\n\t../lexers/LexHex.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexHollywood.o: \\\n\t../lexers/LexHollywood.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexHTML.o: \\\n\t../lexers/LexHTML.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/InList.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/SubStyles.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexIndent.o: \\\n\t../lexers/LexIndent.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexInno.o: \\\n\t../lexers/LexInno.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexJSON.o: \\\n\t../lexers/LexJSON.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexJulia.o: \\\n\t../lexers/LexJulia.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/StringCopy.h \\\n\t../lexlib/PropSetSimple.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/CharacterCategory.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexKix.o: \\\n\t../lexers/LexKix.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexKVIrc.o: \\\n\t../lexers/LexKVIrc.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexLaTeX.o: \\\n\t../lexers/LexLaTeX.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/PropSetSimple.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/DefaultLexer.h \\\n\t../lexlib/LexerBase.h\n$(DIR_O)/LexLisp.o: \\\n\t../lexers/LexLisp.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexLout.o: \\\n\t../lexers/LexLout.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexLua.o: \\\n\t../lexers/LexLua.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/SubStyles.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexMagik.o: \\\n\t../lexers/LexMagik.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexMake.o: \\\n\t../lexers/LexMake.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexMarkdown.o: \\\n\t../lexers/LexMarkdown.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexMatlab.o: \\\n\t../lexers/LexMatlab.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexMaxima.o: \\\n\t../lexers/LexMaxima.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexMetapost.o: \\\n\t../lexers/LexMetapost.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexMMIXAL.o: \\\n\t../lexers/LexMMIXAL.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexModula.o: \\\n\t../lexers/LexModula.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/PropSetSimple.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexMPT.o: \\\n\t../lexers/LexMPT.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexMSSQL.o: \\\n\t../lexers/LexMSSQL.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexMySQL.o: \\\n\t../lexers/LexMySQL.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexNim.o: \\\n\t../lexers/LexNim.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/StringCopy.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexNimrod.o: \\\n\t../lexers/LexNimrod.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexNsis.o: \\\n\t../lexers/LexNsis.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexNull.o: \\\n\t../lexers/LexNull.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexOpal.o: \\\n\t../lexers/LexOpal.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexOScript.o: \\\n\t../lexers/LexOScript.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexPascal.o: \\\n\t../lexers/LexPascal.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexPB.o: \\\n\t../lexers/LexPB.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexPerl.o: \\\n\t../lexers/LexPerl.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexPLM.o: \\\n\t../lexers/LexPLM.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexPO.o: \\\n\t../lexers/LexPO.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexPOV.o: \\\n\t../lexers/LexPOV.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexPowerPro.o: \\\n\t../lexers/LexPowerPro.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexPowerShell.o: \\\n\t../lexers/LexPowerShell.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexProgress.o: \\\n\t../lexers/LexProgress.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/SparseState.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexProps.o: \\\n\t../lexers/LexProps.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexPS.o: \\\n\t../lexers/LexPS.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexPython.o: \\\n\t../lexers/LexPython.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/CharacterCategory.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/SubStyles.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexR.o: \\\n\t../lexers/LexR.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexRaku.o: \\\n\t../lexers/LexRaku.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/CharacterCategory.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexRebol.o: \\\n\t../lexers/LexRebol.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexRegistry.o: \\\n\t../lexers/LexRegistry.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexRuby.o: \\\n\t../lexers/LexRuby.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexRust.o: \\\n\t../lexers/LexRust.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/PropSetSimple.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexSAS.o: \\\n\t../lexers/LexSAS.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexScriptol.o: \\\n\t../lexers/LexScriptol.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexSmalltalk.o: \\\n\t../lexers/LexSmalltalk.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexSML.o: \\\n\t../lexers/LexSML.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexSorcus.o: \\\n\t../lexers/LexSorcus.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexSpecman.o: \\\n\t../lexers/LexSpecman.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexSpice.o: \\\n\t../lexers/LexSpice.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexSQL.o: \\\n\t../lexers/LexSQL.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/SparseState.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexStata.o: \\\n\t../lexers/LexStata.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexSTTXT.o: \\\n\t../lexers/LexSTTXT.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexTACL.o: \\\n\t../lexers/LexTACL.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexTADS3.o: \\\n\t../lexers/LexTADS3.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexTAL.o: \\\n\t../lexers/LexTAL.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexTCL.o: \\\n\t../lexers/LexTCL.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexTCMD.o: \\\n\t../lexers/LexTCMD.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexTeX.o: \\\n\t../lexers/LexTeX.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexTxt2tags.o: \\\n\t../lexers/LexTxt2tags.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexVB.o: \\\n\t../lexers/LexVB.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexVerilog.o: \\\n\t../lexers/LexVerilog.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/SubStyles.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexVHDL.o: \\\n\t../lexers/LexVHDL.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexVisualProlog.o: \\\n\t../lexers/LexVisualProlog.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/CharacterCategory.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexX12.o: \\\n\t../lexers/LexX12.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexYAML.o: \\\n\t../lexers/LexYAML.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n"
  },
  {
    "path": "lexilla/src/lexilla.mak",
    "content": "# Make file for Lexilla on Windows Visual C++ version\n# Copyright 2019 by Neil Hodgson <neilh@scintilla.org>\n# The License.txt file describes the conditions under which this software may be distributed.\n# This makefile is for using Visual C++ with nmake.\n# Usage for Microsoft:\n#     nmake -f lexilla.mak\n# For debug versions define DEBUG on the command line:\n#     nmake DEBUG=1 -f lexilla.mak\n# To build with GCC or Clang, run makefile\n\n.SUFFIXES: .cxx\n\nDIR_O=.\nDIR_BIN=..\\bin\n\nLEXILLA=$(DIR_BIN)\\lexilla.dll\nLIBLEXILLA=$(DIR_BIN)\\liblexilla.lib\n\nLD=link\n\n!IFDEF SUPPORT_XP\nADD_DEFINE=-D_USING_V110_SDK71_\n# Different subsystems for 32-bit and 64-bit Windows XP so detect based on Platform\n# environment vairable set by vcvars*.bat to be either x86 or x64\n!IF \"$(PLATFORM)\" == \"x64\"\nSUBSYSTEM=-SUBSYSTEM:WINDOWS,5.02\n!ELSE\nSUBSYSTEM=-SUBSYSTEM:WINDOWS,5.01\n!ENDIF\n!ELSE\nCETCOMPAT=-CETCOMPAT\n!IFDEF ARM64\nADD_DEFINE=-D_ARM64_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1\nSUBSYSTEM=-SUBSYSTEM:WINDOWS,10.00\n!ENDIF\n!ENDIF\n\nCRTFLAGS=-D_CRT_SECURE_NO_DEPRECATE=1 $(ADD_DEFINE)\nCXXFLAGS=-Zi -TP -MP -W4 -EHsc -std:c++17 -utf-8 $(CRTFLAGS)\nCXXDEBUG=-Od -MTd -DDEBUG\nCXXNDEBUG=-O2 -MT -DNDEBUG -GL\nNAME=-Fo\nLDFLAGS=-OPT:REF -LTCG -IGNORE:4197 -DEBUG $(SUBSYSTEM) $(CETCOMPAT)\nLDDEBUG=\nLIBS=\nNOLOGO=-nologo\n\n!IFDEF QUIET\nCXX=@$(CXX)\nCXXFLAGS=$(CXXFLAGS) $(NOLOGO)\nLDFLAGS=$(LDFLAGS) $(NOLOGO)\n!ENDIF\n\n!IFDEF DEBUG\nCXXFLAGS=$(CXXFLAGS) $(CXXDEBUG)\nLDFLAGS=$(LDDEBUG) $(LDFLAGS)\n!ELSE\nCXXFLAGS=$(CXXFLAGS) $(CXXNDEBUG)\n!ENDIF\n\nSCINTILLA_INCLUDE = ../../scintilla/include\n\nINCLUDEDIRS=-I../include -I$(SCINTILLA_INCLUDE) -I../lexlib\nCXXFLAGS=$(CXXFLAGS) $(INCLUDEDIRS)\n\nall:\t$(SCINTILLA_INCLUDE) $(LEXILLA) $(LIBLEXILLA)\n\nclean:\n\t-del /q $(DIR_O)\\*.obj $(DIR_O)\\*.o $(DIR_O)\\*.pdb \\\n\t$(DIR_O)\\*.res $(DIR_BIN)\\*.map $(DIR_BIN)\\*.exp $(DIR_BIN)\\*.pdb $(DIR_BIN)\\lexilla.lib \\\n\t$(LEXILLA) $(LIBLEXILLA)\n\ndepend:\n\tpyw DepGen.py\n\n$(SCINTILLA_INCLUDE):\n\t@echo Scintilla must be installed at ../../scintilla to provide access to Scintilla headers.\n\n#++Autogenerated -- run scripts/LexGen.py to regenerate\n#**LEX_OBJS=\\\\\\n\\(\\t$(DIR_O)\\\\\\*.obj \\\\\\n\\)\nLEX_OBJS=\\\n\t$(DIR_O)\\LexA68k.obj \\\n\t$(DIR_O)\\LexAbaqus.obj \\\n\t$(DIR_O)\\LexAda.obj \\\n\t$(DIR_O)\\LexAPDL.obj \\\n\t$(DIR_O)\\LexAsciidoc.obj \\\n\t$(DIR_O)\\LexAsm.obj \\\n\t$(DIR_O)\\LexAsn1.obj \\\n\t$(DIR_O)\\LexASY.obj \\\n\t$(DIR_O)\\LexAU3.obj \\\n\t$(DIR_O)\\LexAVE.obj \\\n\t$(DIR_O)\\LexAVS.obj \\\n\t$(DIR_O)\\LexBaan.obj \\\n\t$(DIR_O)\\LexBash.obj \\\n\t$(DIR_O)\\LexBasic.obj \\\n\t$(DIR_O)\\LexBatch.obj \\\n\t$(DIR_O)\\LexBibTeX.obj \\\n\t$(DIR_O)\\LexBullant.obj \\\n\t$(DIR_O)\\LexCaml.obj \\\n\t$(DIR_O)\\LexCIL.obj \\\n\t$(DIR_O)\\LexCLW.obj \\\n\t$(DIR_O)\\LexCmake.obj \\\n\t$(DIR_O)\\LexCOBOL.obj \\\n\t$(DIR_O)\\LexCoffeeScript.obj \\\n\t$(DIR_O)\\LexConf.obj \\\n\t$(DIR_O)\\LexCPP.obj \\\n\t$(DIR_O)\\LexCrontab.obj \\\n\t$(DIR_O)\\LexCsound.obj \\\n\t$(DIR_O)\\LexCSS.obj \\\n\t$(DIR_O)\\LexD.obj \\\n\t$(DIR_O)\\LexDataflex.obj \\\n\t$(DIR_O)\\LexDiff.obj \\\n\t$(DIR_O)\\LexDMAP.obj \\\n\t$(DIR_O)\\LexDMIS.obj \\\n\t$(DIR_O)\\LexECL.obj \\\n\t$(DIR_O)\\LexEDIFACT.obj \\\n\t$(DIR_O)\\LexEiffel.obj \\\n\t$(DIR_O)\\LexErlang.obj \\\n\t$(DIR_O)\\LexErrorList.obj \\\n\t$(DIR_O)\\LexEScript.obj \\\n\t$(DIR_O)\\LexFlagship.obj \\\n\t$(DIR_O)\\LexForth.obj \\\n\t$(DIR_O)\\LexFortran.obj \\\n\t$(DIR_O)\\LexFSharp.obj \\\n\t$(DIR_O)\\LexGAP.obj \\\n\t$(DIR_O)\\LexGDScript.obj \\\n\t$(DIR_O)\\LexGui4Cli.obj \\\n\t$(DIR_O)\\LexHaskell.obj \\\n\t$(DIR_O)\\LexHex.obj \\\n\t$(DIR_O)\\LexHollywood.obj \\\n\t$(DIR_O)\\LexHTML.obj \\\n\t$(DIR_O)\\LexIndent.obj \\\n\t$(DIR_O)\\LexInno.obj \\\n\t$(DIR_O)\\LexJSON.obj \\\n\t$(DIR_O)\\LexJulia.obj \\\n\t$(DIR_O)\\LexKix.obj \\\n\t$(DIR_O)\\LexKVIrc.obj \\\n\t$(DIR_O)\\LexLaTeX.obj \\\n\t$(DIR_O)\\LexLisp.obj \\\n\t$(DIR_O)\\LexLout.obj \\\n\t$(DIR_O)\\LexLua.obj \\\n\t$(DIR_O)\\LexMagik.obj \\\n\t$(DIR_O)\\LexMake.obj \\\n\t$(DIR_O)\\LexMarkdown.obj \\\n\t$(DIR_O)\\LexMatlab.obj \\\n\t$(DIR_O)\\LexMaxima.obj \\\n\t$(DIR_O)\\LexMetapost.obj \\\n\t$(DIR_O)\\LexMMIXAL.obj \\\n\t$(DIR_O)\\LexModula.obj \\\n\t$(DIR_O)\\LexMPT.obj \\\n\t$(DIR_O)\\LexMSSQL.obj \\\n\t$(DIR_O)\\LexMySQL.obj \\\n\t$(DIR_O)\\LexNim.obj \\\n\t$(DIR_O)\\LexNimrod.obj \\\n\t$(DIR_O)\\LexNsis.obj \\\n\t$(DIR_O)\\LexNull.obj \\\n\t$(DIR_O)\\LexOpal.obj \\\n\t$(DIR_O)\\LexOScript.obj \\\n\t$(DIR_O)\\LexPascal.obj \\\n\t$(DIR_O)\\LexPB.obj \\\n\t$(DIR_O)\\LexPerl.obj \\\n\t$(DIR_O)\\LexPLM.obj \\\n\t$(DIR_O)\\LexPO.obj \\\n\t$(DIR_O)\\LexPOV.obj \\\n\t$(DIR_O)\\LexPowerPro.obj \\\n\t$(DIR_O)\\LexPowerShell.obj \\\n\t$(DIR_O)\\LexProgress.obj \\\n\t$(DIR_O)\\LexProps.obj \\\n\t$(DIR_O)\\LexPS.obj \\\n\t$(DIR_O)\\LexPython.obj \\\n\t$(DIR_O)\\LexR.obj \\\n\t$(DIR_O)\\LexRaku.obj \\\n\t$(DIR_O)\\LexRebol.obj \\\n\t$(DIR_O)\\LexRegistry.obj \\\n\t$(DIR_O)\\LexRuby.obj \\\n\t$(DIR_O)\\LexRust.obj \\\n\t$(DIR_O)\\LexSAS.obj \\\n\t$(DIR_O)\\LexScriptol.obj \\\n\t$(DIR_O)\\LexSmalltalk.obj \\\n\t$(DIR_O)\\LexSML.obj \\\n\t$(DIR_O)\\LexSorcus.obj \\\n\t$(DIR_O)\\LexSpecman.obj \\\n\t$(DIR_O)\\LexSpice.obj \\\n\t$(DIR_O)\\LexSQL.obj \\\n\t$(DIR_O)\\LexStata.obj \\\n\t$(DIR_O)\\LexSTTXT.obj \\\n\t$(DIR_O)\\LexTACL.obj \\\n\t$(DIR_O)\\LexTADS3.obj \\\n\t$(DIR_O)\\LexTAL.obj \\\n\t$(DIR_O)\\LexTCL.obj \\\n\t$(DIR_O)\\LexTCMD.obj \\\n\t$(DIR_O)\\LexTeX.obj \\\n\t$(DIR_O)\\LexTxt2tags.obj \\\n\t$(DIR_O)\\LexVB.obj \\\n\t$(DIR_O)\\LexVerilog.obj \\\n\t$(DIR_O)\\LexVHDL.obj \\\n\t$(DIR_O)\\LexVisualProlog.obj \\\n\t$(DIR_O)\\LexX12.obj \\\n\t$(DIR_O)\\LexYAML.obj \\\n\n#--Autogenerated -- end of automatically generated section\n\n# Required by lexers\nLEXLIB_OBJS=\\\n\t$(DIR_O)\\Accessor.obj \\\n\t$(DIR_O)\\CharacterCategory.obj \\\n\t$(DIR_O)\\CharacterSet.obj \\\n\t$(DIR_O)\\DefaultLexer.obj \\\n\t$(DIR_O)\\InList.obj \\\n\t$(DIR_O)\\LexAccessor.obj \\\n\t$(DIR_O)\\LexerBase.obj \\\n\t$(DIR_O)\\LexerModule.obj \\\n\t$(DIR_O)\\LexerSimple.obj \\\n\t$(DIR_O)\\PropSetSimple.obj \\\n\t$(DIR_O)\\StyleContext.obj \\\n\t$(DIR_O)\\WordList.obj\n\n# Required by libraries and DLLs that include lexing\nLEXILLA_OBJS=\\\n\t$(DIR_O)\\Lexilla.obj \\\n\t$(LEXLIB_OBJS) \\\n\t$(LEX_OBJS)\n\n$(LEXILLA): $(LEXILLA_OBJS) LexillaVersion.res\n\t$(LD) $(LDFLAGS) -DEF:Lexilla.def -DLL -OUT:$@ $** $(LIBS)\n\n$(LIBLEXILLA): $(LEXILLA_OBJS)\n\tLIB -OUT:$@ $**\n\n# Define how to build all the objects and what they depend on\n\n{..\\lexlib}.cxx{$(DIR_O)}.obj::\n\t$(CXX) $(CXXFLAGS) -c $(NAME)$(DIR_O)\\ $<\n{..\\lexers}.cxx{$(DIR_O)}.obj::\n\t$(CXX) $(CXXFLAGS) -c $(NAME)$(DIR_O)\\ $<\n{.}.cxx{$(DIR_O)}.obj::\n\t$(CXX) $(CXXFLAGS) -c $(NAME)$(DIR_O)\\ $<\n\n.rc.res:\n\t$(RC) -fo$@ $**\n\n# Dependencies\n\n!IF EXISTS(nmdeps.mak)\n\n# Protect with !IF EXISTS to handle accidental deletion - just 'nmake -f lexilla.mak deps'\n\n!INCLUDE nmdeps.mak\n\n!ENDIF\n"
  },
  {
    "path": "lexilla/src/makefile",
    "content": "# Make file for Lexilla\n# @file makefile\n# Copyright 2019 by Neil Hodgson <neilh@scintilla.org>\n# The License.txt file describes the conditions under which this software may be distributed.\n# This works on Windows or Linux using GCC 9.0+\n# This works on Windows, Linux, or macOS using Clang 9.0+\n# On Windows, it is tested with Mingw-w64 GCC and Clang.\n# on macOS, it always uses Clang\n# For debug versions define DEBUG on the command line:\n#     make DEBUG=1\n# On Windows, to build with MSVC, run lexilla.mak\n\n.PHONY: all clean analyze depend\n\n.SUFFIXES: .cxx\n\nDIR_O=.\nDIR_BIN=../bin\n\nWARNINGS = -Wpedantic -Wall -Wextra\n\nifdef windir\n    SHARED_NAME = lexilla\n    SHAREDEXTENSION = dll\n    WINDRES ?= windres\n    VERSION_RESOURCE = $(DIR_O)/LexillaVersion.o\nelse\n    SHARED_NAME = liblexilla\n    ifeq ($(shell uname),Darwin)\n        CLANG := 1\n        LDFLAGS += -dynamiclib\n        SHAREDEXTENSION = dylib\n        BASE_FLAGS += -arch arm64 -arch x86_64\n        LDFLAGS += -arch arm64 -arch x86_64\n    else\n        SHAREDEXTENSION = so\n    endif\n    BASE_FLAGS += -fvisibility=hidden\nendif\n\nLEXILLA=$(DIR_BIN)/$(SHARED_NAME).$(SHAREDEXTENSION)\nLIBLEXILLA=$(DIR_BIN)/liblexilla.a\n\nBASE_FLAGS += --std=c++17\n\nifdef CLANG\nCXX = clang++\nifdef windir\n# Clang on Win32 uses MSVC headers so will complain about strcpy without this\nDEFINES += -D_CRT_SECURE_NO_DEPRECATE=1\nendif\nendif\n\nifdef windir\n    LDFLAGS += -mwindows\n\tifndef CLANG\n\t    LDFLAGS += -Wl,--kill-at\n\tendif\nelse\n    BASE_FLAGS += -fPIC\nendif\n\n# Take care of changing Unix style '/' directory separator to '\\' on Windows\nnormalize = $(if $(windir),$(subst /,\\,$1),$1)\n\nPYTHON = $(if $(windir),pyw,python3)\n\nifdef windir\n    DEL = $(if $(wildcard $(dir $(SHELL))rm.exe), $(dir $(SHELL))rm.exe -f, del /q)\nelse\n    DEL = rm -f\nendif\n\nRANLIB ?= ranlib\n\nSCINTILLA_INCLUDE = ../../scintilla/include\n\nvpath %.h ../include ../../scintilla/include ../lexlib\nvpath %.cxx ../src ../lexlib ../lexers\n\nDEFINES += -D$(if $(DEBUG),DEBUG,NDEBUG)\nBASE_FLAGS += $(if $(DEBUG),-g,-O3)\n\nINCLUDES = -I ../include -I $(SCINTILLA_INCLUDE) -I ../lexlib\nLDFLAGS += -shared\n\nBASE_FLAGS += $(WARNINGS)\n\nall:\t$(SCINTILLA_INCLUDE) $(LEXILLA) $(LIBLEXILLA)\n\nclean:\n\t$(DEL) $(call normalize, $(addprefix $(DIR_O)/, *.o *.obj *.a *.res *.map *.plist) $(LEXILLA) $(LIBLEXILLA))\n\n$(DIR_O)/%.o: %.cxx\n\t$(CXX) $(DEFINES) $(INCLUDES) $(BASE_FLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@\n\n$(DIR_O)/%.o: %.rc\n\t$(WINDRES) $< $@\n\nanalyze:\n\t$(CXX) --analyze $(DEFINES) $(INCLUDES) $(BASE_FLAGS) $(CXXFLAGS) *.cxx ../lexlib/*.cxx ../lexers/*.cxx\n\ndepend deps.mak:\n\t$(PYTHON) DepGen.py\n\n$(SCINTILLA_INCLUDE):\n\t@echo Scintilla must be installed at ../../scintilla to provide access to Scintilla headers.\n\nLEXERS:=$(sort $(notdir $(wildcard ../lexers/Lex*.cxx)))\n\nOBJS = Lexilla.o\n\n# Required by lexers\nLEXLIB_OBJS=\\\n\tAccessor.o \\\n\tCharacterCategory.o \\\n\tCharacterSet.o \\\n\tDefaultLexer.o \\\n\tInList.o \\\n\tLexAccessor.o \\\n\tLexerBase.o \\\n\tLexerModule.o \\\n\tLexerSimple.o \\\n\tPropSetSimple.o \\\n\tStyleContext.o \\\n\tWordList.o\n\n# Required by libraries and DLLs that include lexing\nLEXILLA_OBJS := $(addprefix $(DIR_O)/, $(OBJS) $(LEXLIB_OBJS) $(LEXERS:.cxx=.o))\n\n$(LEXILLA): $(LEXILLA_OBJS) $(VERSION_RESOURCE)\n\t$(CXX) $(CXXFLAGS) $(LDFLAGS) $^ -o $@\n\n$(LIBLEXILLA):  $(LEXILLA_OBJS)\nifeq ($(SHAREDEXTENSION),dylib)\n\tlibtool -static -o $@ $^\nelse\n\t$(AR) rc $@ $^\n\t$(RANLIB) $@\nendif\n\n# Automatically generate dependencies for most files with \"make deps\"\ninclude deps.mak\n"
  },
  {
    "path": "lexilla/src/nmdeps.mak",
    "content": "# Created by DepGen.py. To recreate, run DepGen.py.\n$(DIR_O)/Lexilla.obj: \\\n\t../src/Lexilla.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/CatalogueModules.h\n$(DIR_O)/Accessor.obj: \\\n\t../lexlib/Accessor.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/PropSetSimple.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h\n$(DIR_O)/CharacterCategory.obj: \\\n\t../lexlib/CharacterCategory.cxx \\\n\t../lexlib/CharacterCategory.h\n$(DIR_O)/CharacterSet.obj: \\\n\t../lexlib/CharacterSet.cxx \\\n\t../lexlib/CharacterSet.h\n$(DIR_O)/DefaultLexer.obj: \\\n\t../lexlib/DefaultLexer.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/PropSetSimple.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/InList.obj: \\\n\t../lexlib/InList.cxx \\\n\t../lexlib/InList.h \\\n\t../lexlib/CharacterSet.h\n$(DIR_O)/LexAccessor.obj: \\\n\t../lexlib/LexAccessor.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/CharacterSet.h\n$(DIR_O)/LexerBase.obj: \\\n\t../lexlib/LexerBase.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/PropSetSimple.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/LexerBase.h\n$(DIR_O)/LexerModule.obj: \\\n\t../lexlib/LexerModule.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/PropSetSimple.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/LexerBase.h \\\n\t../lexlib/LexerSimple.h\n$(DIR_O)/LexerNoExceptions.obj: \\\n\t../lexlib/LexerNoExceptions.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/PropSetSimple.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/LexerBase.h \\\n\t../lexlib/LexerNoExceptions.h\n$(DIR_O)/LexerSimple.obj: \\\n\t../lexlib/LexerSimple.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/PropSetSimple.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/LexerBase.h \\\n\t../lexlib/LexerSimple.h\n$(DIR_O)/PropSetSimple.obj: \\\n\t../lexlib/PropSetSimple.cxx \\\n\t../lexlib/PropSetSimple.h\n$(DIR_O)/StyleContext.obj: \\\n\t../lexlib/StyleContext.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h\n$(DIR_O)/WordList.obj: \\\n\t../lexlib/WordList.cxx \\\n\t../lexlib/WordList.h\n$(DIR_O)/LexA68k.obj: \\\n\t../lexers/LexA68k.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexAbaqus.obj: \\\n\t../lexers/LexAbaqus.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexAda.obj: \\\n\t../lexers/LexAda.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexAPDL.obj: \\\n\t../lexers/LexAPDL.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexAsciidoc.obj: \\\n\t../lexers/LexAsciidoc.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexAsm.obj: \\\n\t../lexers/LexAsm.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexAsn1.obj: \\\n\t../lexers/LexAsn1.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexASY.obj: \\\n\t../lexers/LexASY.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexAU3.obj: \\\n\t../lexers/LexAU3.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexAVE.obj: \\\n\t../lexers/LexAVE.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexAVS.obj: \\\n\t../lexers/LexAVS.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexBaan.obj: \\\n\t../lexers/LexBaan.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexBash.obj: \\\n\t../lexers/LexBash.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/StringCopy.h \\\n\t../lexlib/InList.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/SubStyles.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexBasic.obj: \\\n\t../lexers/LexBasic.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexBatch.obj: \\\n\t../lexers/LexBatch.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/InList.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexBibTeX.obj: \\\n\t../lexers/LexBibTeX.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/PropSetSimple.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexBullant.obj: \\\n\t../lexers/LexBullant.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexCaml.obj: \\\n\t../lexers/LexCaml.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexCIL.obj: \\\n\t../lexers/LexCIL.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/StringCopy.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexCLW.obj: \\\n\t../lexers/LexCLW.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexCmake.obj: \\\n\t../lexers/LexCmake.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexCOBOL.obj: \\\n\t../lexers/LexCOBOL.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexCoffeeScript.obj: \\\n\t../lexers/LexCoffeeScript.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexConf.obj: \\\n\t../lexers/LexConf.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexCPP.obj: \\\n\t../lexers/LexCPP.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/StringCopy.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/SparseState.h \\\n\t../lexlib/SubStyles.h\n$(DIR_O)/LexCrontab.obj: \\\n\t../lexers/LexCrontab.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexCsound.obj: \\\n\t../lexers/LexCsound.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexCSS.obj: \\\n\t../lexers/LexCSS.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexD.obj: \\\n\t../lexers/LexD.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexDataflex.obj: \\\n\t../lexers/LexDataflex.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexDiff.obj: \\\n\t../lexers/LexDiff.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexDMAP.obj: \\\n\t../lexers/LexDMAP.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexDMIS.obj: \\\n\t../lexers/LexDMIS.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexECL.obj: \\\n\t../lexers/LexECL.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/PropSetSimple.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h\n$(DIR_O)/LexEDIFACT.obj: \\\n\t../lexers/LexEDIFACT.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexEiffel.obj: \\\n\t../lexers/LexEiffel.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexErlang.obj: \\\n\t../lexers/LexErlang.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexErrorList.obj: \\\n\t../lexers/LexErrorList.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/InList.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexEScript.obj: \\\n\t../lexers/LexEScript.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexFlagship.obj: \\\n\t../lexers/LexFlagship.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexForth.obj: \\\n\t../lexers/LexForth.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexFortran.obj: \\\n\t../lexers/LexFortran.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexFSharp.obj: \\\n\t../lexers/LexFSharp.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexGAP.obj: \\\n\t../lexers/LexGAP.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexGDScript.obj: \\\n\t../lexers/LexGDScript.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/StringCopy.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/CharacterCategory.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/SubStyles.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexGui4Cli.obj: \\\n\t../lexers/LexGui4Cli.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexHaskell.obj: \\\n\t../lexers/LexHaskell.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/PropSetSimple.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/CharacterCategory.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexHex.obj: \\\n\t../lexers/LexHex.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexHollywood.obj: \\\n\t../lexers/LexHollywood.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexHTML.obj: \\\n\t../lexers/LexHTML.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/InList.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/SubStyles.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexIndent.obj: \\\n\t../lexers/LexIndent.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexInno.obj: \\\n\t../lexers/LexInno.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexJSON.obj: \\\n\t../lexers/LexJSON.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexJulia.obj: \\\n\t../lexers/LexJulia.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/StringCopy.h \\\n\t../lexlib/PropSetSimple.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/CharacterCategory.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexKix.obj: \\\n\t../lexers/LexKix.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexKVIrc.obj: \\\n\t../lexers/LexKVIrc.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexLaTeX.obj: \\\n\t../lexers/LexLaTeX.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/PropSetSimple.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/DefaultLexer.h \\\n\t../lexlib/LexerBase.h\n$(DIR_O)/LexLisp.obj: \\\n\t../lexers/LexLisp.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexLout.obj: \\\n\t../lexers/LexLout.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexLua.obj: \\\n\t../lexers/LexLua.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/SubStyles.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexMagik.obj: \\\n\t../lexers/LexMagik.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexMake.obj: \\\n\t../lexers/LexMake.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexMarkdown.obj: \\\n\t../lexers/LexMarkdown.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexMatlab.obj: \\\n\t../lexers/LexMatlab.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexMaxima.obj: \\\n\t../lexers/LexMaxima.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexMetapost.obj: \\\n\t../lexers/LexMetapost.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexMMIXAL.obj: \\\n\t../lexers/LexMMIXAL.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexModula.obj: \\\n\t../lexers/LexModula.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/PropSetSimple.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexMPT.obj: \\\n\t../lexers/LexMPT.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexMSSQL.obj: \\\n\t../lexers/LexMSSQL.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexMySQL.obj: \\\n\t../lexers/LexMySQL.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexNim.obj: \\\n\t../lexers/LexNim.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/StringCopy.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexNimrod.obj: \\\n\t../lexers/LexNimrod.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexNsis.obj: \\\n\t../lexers/LexNsis.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexNull.obj: \\\n\t../lexers/LexNull.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexOpal.obj: \\\n\t../lexers/LexOpal.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexOScript.obj: \\\n\t../lexers/LexOScript.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexPascal.obj: \\\n\t../lexers/LexPascal.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexPB.obj: \\\n\t../lexers/LexPB.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexPerl.obj: \\\n\t../lexers/LexPerl.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexPLM.obj: \\\n\t../lexers/LexPLM.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexPO.obj: \\\n\t../lexers/LexPO.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexPOV.obj: \\\n\t../lexers/LexPOV.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexPowerPro.obj: \\\n\t../lexers/LexPowerPro.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexPowerShell.obj: \\\n\t../lexers/LexPowerShell.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexProgress.obj: \\\n\t../lexers/LexProgress.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/SparseState.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexProps.obj: \\\n\t../lexers/LexProps.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexPS.obj: \\\n\t../lexers/LexPS.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexPython.obj: \\\n\t../lexers/LexPython.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/CharacterCategory.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/SubStyles.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexR.obj: \\\n\t../lexers/LexR.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexRaku.obj: \\\n\t../lexers/LexRaku.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/CharacterCategory.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexRebol.obj: \\\n\t../lexers/LexRebol.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexRegistry.obj: \\\n\t../lexers/LexRegistry.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexRuby.obj: \\\n\t../lexers/LexRuby.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexRust.obj: \\\n\t../lexers/LexRust.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/PropSetSimple.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexSAS.obj: \\\n\t../lexers/LexSAS.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexScriptol.obj: \\\n\t../lexers/LexScriptol.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexSmalltalk.obj: \\\n\t../lexers/LexSmalltalk.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexSML.obj: \\\n\t../lexers/LexSML.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexSorcus.obj: \\\n\t../lexers/LexSorcus.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexSpecman.obj: \\\n\t../lexers/LexSpecman.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexSpice.obj: \\\n\t../lexers/LexSpice.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexSQL.obj: \\\n\t../lexers/LexSQL.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/SparseState.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexStata.obj: \\\n\t../lexers/LexStata.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexSTTXT.obj: \\\n\t../lexers/LexSTTXT.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexTACL.obj: \\\n\t../lexers/LexTACL.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexTADS3.obj: \\\n\t../lexers/LexTADS3.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexTAL.obj: \\\n\t../lexers/LexTAL.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexTCL.obj: \\\n\t../lexers/LexTCL.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexTCMD.obj: \\\n\t../lexers/LexTCMD.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexTeX.obj: \\\n\t../lexers/LexTeX.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexTxt2tags.obj: \\\n\t../lexers/LexTxt2tags.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexVB.obj: \\\n\t../lexers/LexVB.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexVerilog.obj: \\\n\t../lexers/LexVerilog.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/SubStyles.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexVHDL.obj: \\\n\t../lexers/LexVHDL.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n$(DIR_O)/LexVisualProlog.obj: \\\n\t../lexers/LexVisualProlog.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/CharacterCategory.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/OptionSet.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexX12.obj: \\\n\t../lexers/LexX12.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/LexerModule.h \\\n\t../lexlib/DefaultLexer.h\n$(DIR_O)/LexYAML.obj: \\\n\t../lexers/LexYAML.cxx \\\n\t../../scintilla/include/ILexer.h \\\n\t../../scintilla/include/Sci_Position.h \\\n\t../../scintilla/include/Scintilla.h \\\n\t../include/SciLexer.h \\\n\t../lexlib/WordList.h \\\n\t../lexlib/LexAccessor.h \\\n\t../lexlib/Accessor.h \\\n\t../lexlib/StyleContext.h \\\n\t../lexlib/CharacterSet.h \\\n\t../lexlib/LexerModule.h\n"
  },
  {
    "path": "lexilla/test/README",
    "content": "README for testing lexers with lexilla/test.\r\n\r\nThe TestLexers application is run to test the lexing and folding of a set of example\r\nfiles and thus ensure that the lexers are working correctly.\r\n\r\nLexers are accessed through the Lexilla shared library which must be built first\r\nin the lexilla/src directory.\r\n\r\nTestLexers works on Windows, Linux, or macOS and requires a C++20 compiler.\r\nMSVC 2019.4, GCC 9.0, Clang 9.0, and Apple Clang 11.0 are known to work.\r\n\r\nMSVC is only available on Windows.\r\n\r\nGCC and Clang work on Windows and Linux.\r\n\r\nOn macOS, only Apple Clang is available.\r\n\r\nLexilla requires some headers from Scintilla to build and expects a directory named\r\n\"scintilla\" containing a copy of Scintilla 5+ to be a peer of the Lexilla top level\r\ndirectory conventionally called \"lexilla\".\r\n\r\nTo use GCC run lexilla/test/makefile:\r\n\tmake test\r\n\r\nTo use Clang run lexilla/test/makefile:\r\n\tmake CLANG=1 test\r\nOn macOS, CLANG is set automatically so this can just be\r\n\tmake test\r\n\r\nTo use MSVC:\r\n\tnmake -f testlexers.mak test\r\nThere is also a project file TestLexers.vcxproj that can be loaded into the Visual\r\nC++ IDE.\r\n\r\n\r\n\r\nAdding or Changing Tests\r\n\r\nThe lexilla/test/examples directory contains a set of tests located in a tree of\r\nsubdirectories.\r\n\r\nEach directory contains example files along with control files called\r\nSciTE.properties and expected result files with .styled and .folded suffixes.\r\nIf an unexpected result occurs then files with the additional suffix .new \r\n(that is .styled.new or .folded.new) may be created.\r\n\r\nEach file in the examples tree that does not have an extension of .properties, .styled,\r\n.folded or .new is an example file that will be lexed and folded according to settings\r\nfound in SciTE.properties.\r\n\r\nThe results of the lex will be compared to the corresponding .styled file and if different\r\nthe result will be saved to a .styled.new file for checking.\r\nSo, if x.cxx is the example, its lexed form will be checked against x.cxx.styled and a\r\nx.cxx.styled.new file may be created. The .styled.new and .styled files contain the text\r\nof the original file along with style number changes in {} like:\r\n\t{5}function{0} {11}first{10}(){0}\r\nAfter checking that the .styled.new file is correct, it can be promoted to .styled and\r\ncommitted to the repository.\r\n\r\nThe results of the fold will be compared to the corresponding .folded file and if different\r\nthe result will be saved to a .folded.new file for checking.\r\nSo, if x.cxx is the example, its folded form will be checked against x.cxx.folded and a\r\nx.cxx.folded.new file may be created. The folded.new and .folded files contain the text\r\nof the original file along with fold information to the left like:\r\n\r\n 2 400   0 + --[[ coding:UTF-8\r\n 0 402   0 | comment ]]\r\n\r\nThere are 4 columns before the file text representing the bits of the fold level:\r\n[flags (0xF000), level (0x0FFF), other (0xFFFF0000), picture].\r\nflags: may be 2 for header or 1 for whitespace.\r\nlevel: hexadecimal level number starting at 0x400. 'negative' level numbers like 0x3FF\r\nindicate errors in either the folder or in the input file, such as a C file that starts with #endif.\r\nother: can be used as the folder wants. Often used to hold the level of the next line.\r\npicture: gives a rough idea of the fold structure: '|' for level greater than 0x400,\r\n'+' for header, ' ' otherwise.\r\nAfter checking that the .folded.new file is correct, it can be promoted to .folded and\r\ncommitted to the repository.\r\n\r\nAn interactive file comparison program like WinMerge (https://winmerge.org/) on\r\nWindows or meld (https://meldmerge.org/) on Linux can help examine differences\r\nbetween the .styled and .styled.new files or .folded and .folded.new files.\r\n\r\nOn Windows, the scripts/PromoteNew.bat script can be run to promote all .new result\r\nfiles to their base names without .new.\r\n\r\nStyling and folding tests are first performed on the file as a whole, then the file is lexed\r\nand folded line-by-line. If there are differences between the whole file and line-by-line\r\nthen a message with 'per-line is different' for styling or 'per-line has different folds' will be\r\nprinted. Problems with line-by-line processing are often caused by local variables in the\r\nlexer or folder that are incorrectly initialised. Sometimes extra state can be inferred, but it\r\nmay have to be stored between runs (possibly with SetLineState) or the code may have to\r\nbacktrack to a previous safe line - often something like a line that starts with a character\r\nin the default style.\r\n\r\nThe SciTE.properties file is similar to properties files used for SciTE but are simpler.\r\nThe lexer to be run is defined with a lexer.{filepatterns} statement like:\r\n\tlexer.*.d=d\r\n\r\nKeywords may be defined with keywords settings like:\r\n\tkeywords.*.cxx;*.c=int char\r\n\tkeywords2.*.cxx=open\r\n\r\nSubstyles and substyle identifiers may be defined with settings like:\r\n\tsubstyles.cpp.11=1\r\n\tsubstylewords.11.1.*.cxx=map string vector\r\n\r\nOther settings are treated as lexer or folder properties and forwarded to the lexer/folder:\r\n\tlexer.cpp.track.preprocessor=1\r\n\tfold=1\r\n\r\nIt is often necessary to set 'fold' in SciTE.properties to cause folding.\r\n\r\nProperties can be set for a particular file with an \"if $(=\" or \"match\" expression like so:\r\nif $(= $(FileNameExt);HeaderEOLFill_1.md)\r\n    lexer.markdown.header.eolfill=1\r\nmatch Header*1.md\r\n    lexer.markdown.header.eolfill=1\r\n\r\nMore complex tests with additional configurations of keywords or properties can be performed\r\nby creating another subdirectory with the different settings in a new SciTE.properties.\r\n\r\nThere is some support for running benchmarks on lexers and folders. The properties\r\ntestlexers.repeat.lex and testlexers.repeat.fold specify the number of times example\r\ndocuments are lexed or folded. Set to a large number like testlexers.repeat.lex=10000\r\nthen run with a profiler.\r\n\r\nA list of styles used in a lex can be displayed with testlexers.list.styles=1.\r\n"
  },
  {
    "path": "lexilla/test/TestDocument.cxx",
    "content": "// Lexilla lexer library\n/** @file TestDocument.cxx\n ** Lexer testing.\n **/\n // Copyright 2019 by Neil Hodgson <neilh@scintilla.org>\n // The License.txt file describes the conditions under which this software may be distributed.\n\n#include <cassert>\n\n#include <string>\n#include <string_view>\n#include <vector>\n#include <algorithm>\n\n#include <iostream>\n\n#include \"ILexer.h\"\n\n#include \"TestDocument.h\"\n\nnamespace {\n\n\tconst unsigned char UTF8BytesOfLead[256] = {\n\t1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 00 - 0F\n\t1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 10 - 1F\n\t1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 20 - 2F\n\t1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 30 - 3F\n\t1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 40 - 4F\n\t1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 50 - 5F\n\t1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 60 - 6F\n\t1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 70 - 7F\n\t1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 80 - 8F\n\t1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 90 - 9F\n\t1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // A0 - AF\n\t1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // B0 - BF\n\t1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // C0 - CF\n\t2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // D0 - DF\n\t3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // E0 - EF\n\t4, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // F0 - FF\n\t};\n\n\tint UnicodeFromUTF8(const unsigned char *us) noexcept {\n\t\tassert(us);\n\t\tswitch (UTF8BytesOfLead[us[0]]) {\n\t\tcase 1:\n\t\t\treturn us[0];\n\t\tcase 2:\n\t\t\treturn ((us[0] & 0x1F) << 6) + (us[1] & 0x3F);\n\t\tcase 3:\n\t\t\treturn ((us[0] & 0xF) << 12) + ((us[1] & 0x3F) << 6) + (us[2] & 0x3F);\n\t\tdefault:\n\t\t\treturn ((us[0] & 0x7) << 18) + ((us[1] & 0x3F) << 12) + ((us[2] & 0x3F) << 6) + (us[3] & 0x3F);\n\t\t}\n\t}\n\n\tinline constexpr bool UTF8IsTrailByte(unsigned char ch) noexcept {\n\t\treturn (ch >= 0x80) && (ch < 0xc0);\n\t}\n\n\tconstexpr unsigned char TrailByteValue(unsigned char c) {\n\t\t// The top 2 bits are 0b10 to indicate a trail byte.\n\t\t// The lower 6 bits contain the value.\n\t\treturn c & 0b0011'1111;\n\t}\n}\n\nstd::u32string UTF32FromUTF8(std::string_view svu8) {\n\tstd::u32string ret;\n\tfor (size_t i = 0; i < svu8.length();) {\n\t\tunsigned char ch = svu8.at(i);\n\t\tconst unsigned int byteCount = UTF8BytesOfLead[ch];\n\t\tunsigned int value = 0;\n\n\t\tif (i + byteCount > svu8.length()) {\n\t\t\t// Trying to read past end\n\t\t\tret.push_back(ch);\n\t\t\tbreak;\n\t\t}\n\n\t\ti++;\n\t\tswitch (byteCount) {\n\t\tcase 1:\n\t\t\tvalue = ch;\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tvalue = (ch & 0x1F) << 6;\n\t\t\tch = svu8.at(i++);\n\t\t\tvalue += TrailByteValue(ch);\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tvalue = (ch & 0xF) << 12;\n\t\t\tch = svu8.at(i++);\n\t\t\tvalue += TrailByteValue(ch) << 6;\n\t\t\tch = svu8.at(i++);\n\t\t\tvalue += TrailByteValue(ch);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tvalue = (ch & 0x7) << 18;\n\t\t\tch = svu8.at(i++);\n\t\t\tvalue += TrailByteValue(ch) << 12;\n\t\t\tch = svu8.at(i++);\n\t\t\tvalue += TrailByteValue(ch) << 6;\n\t\t\tch = svu8.at(i++);\n\t\t\tvalue += TrailByteValue(ch);\n\t\t\tbreak;\n\t\t}\n\t\tret.push_back(value);\n\t}\n\treturn ret;\n}\n\nvoid TestDocument::Set(std::string_view sv) {\n\ttext = sv;\n\ttextStyles.resize(text.size() + 1);\n\tlineStarts.clear();\n\tendStyled = 0;\n\tlineStarts.push_back(0);\n\tfor (size_t pos = 0; pos < text.length(); pos++) {\n\t\tif (text.at(pos) == '\\n') {\n\t\t\tlineStarts.push_back(pos + 1);\n\t\t}\n\t}\n\tif (lineStarts.back() != Length()) {\n\t\tlineStarts.push_back(Length());\n\t}\n\tlineStates.resize(lineStarts.size() + 1);\n\tlineLevels.resize(lineStarts.size(), 0x400);\n}\n\n#if defined(_MSC_VER)\n// IDocument interface does not specify noexcept so best to not add it to implementation\n#pragma warning(disable: 26440)\n#endif\n\nSci_Position TestDocument::MaxLine() const noexcept {\n\treturn lineStarts.size() - 1;\n}\n\nint SCI_METHOD TestDocument::Version() const {\n\treturn Scintilla::dvRelease4;\n}\n\nvoid SCI_METHOD TestDocument::SetErrorStatus(int) {\n}\n\nSci_Position SCI_METHOD TestDocument::Length() const {\n\treturn text.length();\n}\n\nvoid SCI_METHOD TestDocument::GetCharRange(char *buffer, Sci_Position position, Sci_Position lengthRetrieve) const {\n\ttext.copy(buffer, lengthRetrieve, position);\n}\n\nchar SCI_METHOD TestDocument::StyleAt(Sci_Position position) const {\n\tif (position < 0) {\n\t\treturn 0;\n\t}\n\treturn textStyles.at(position);\n}\n\nSci_Position SCI_METHOD TestDocument::LineFromPosition(Sci_Position position) const {\n\tif (position >= Length()) {\n\t\treturn MaxLine();\n\t}\n\n\tconst std::vector<Sci_Position>::const_iterator it = std::lower_bound(lineStarts.begin(), lineStarts.end(), position);\n\tSci_Position line = it - lineStarts.begin();\n\tif (*it > position)\n\t\tline--;\n\treturn line;\n}\n\nSci_Position SCI_METHOD TestDocument::LineStart(Sci_Position line) const {\n\tif (line < 0) {\n\t\treturn 0;\n\t}\n\tif (line >= static_cast<Sci_Position>(lineStarts.size())) {\n\t\treturn Length();\n\t}\n\treturn lineStarts.at(line);\n}\n\nint SCI_METHOD TestDocument::GetLevel(Sci_Position line) const {\n\treturn lineLevels.at(line);\n}\n\nint SCI_METHOD TestDocument::SetLevel(Sci_Position line, int level) {\n\tif (line == static_cast<Sci_Position>(lineLevels.size())) {\n\t\treturn 0x400;\n\t}\n\treturn lineLevels.at(line) = level;\n}\n\nint SCI_METHOD TestDocument::GetLineState(Sci_Position line) const {\n\treturn lineStates.at(line);\n}\n\nint SCI_METHOD TestDocument::SetLineState(Sci_Position line, int state) {\n\treturn lineStates.at(line) = state;\n}\n\nvoid SCI_METHOD TestDocument::StartStyling(Sci_Position position) {\n\tendStyled = position;\n}\n\nbool SCI_METHOD TestDocument::SetStyleFor(Sci_Position length, char style) {\n\tfor (Sci_Position i = 0; i < length; i++) {\n\t\ttextStyles.at(endStyled) = style;\n\t\tendStyled++;\n\t}\n\treturn true;\n}\n\nbool SCI_METHOD TestDocument::SetStyles(Sci_Position length, const char *styles) {\n\tassert(styles);\n\tfor (Sci_Position i = 0; i < length; i++) {\n\t\ttextStyles.at(endStyled) = styles[i];\n\t\tendStyled++;\n\t}\n\treturn true;\n}\n\nvoid SCI_METHOD TestDocument::DecorationSetCurrentIndicator(int) {\n\t// Not implemented as no way to read decorations\n}\n\nvoid SCI_METHOD TestDocument::DecorationFillRange(Sci_Position, int, Sci_Position) {\n\t// Not implemented as no way to read decorations\n}\n\nvoid SCI_METHOD TestDocument::ChangeLexerState(Sci_Position, Sci_Position) {\n\t// Not implemented as no watcher to trigger\n}\n\nint SCI_METHOD TestDocument::CodePage() const {\n\t// Always UTF-8 for now\n\treturn 65001;\n}\n\nbool SCI_METHOD TestDocument::IsDBCSLeadByte(char) const {\n\t// Always UTF-8 for now\n\treturn false;\n}\n\nconst char *SCI_METHOD TestDocument::BufferPointer() {\n\treturn text.c_str();\n}\n\nint SCI_METHOD TestDocument::GetLineIndentation(Sci_Position) {\n\t// Never actually called - lexers use Accessor::IndentAmount\n\treturn 0;\n}\n\nSci_Position SCI_METHOD TestDocument::LineEnd(Sci_Position line) const {\n\tconst Sci_Position maxLine = MaxLine();\n\tif (line == maxLine || line == maxLine+1) {\n\t\treturn text.length();\n\t}\n\tassert(line < maxLine);\n\tSci_Position position = LineStart(line + 1);\n\tposition--; // Back over CR or LF\n\t// When line terminator is CR+LF, may need to go back one more\n\tif ((position > LineStart(line)) && (text.at(position - 1) == '\\r')) {\n\t\tposition--;\n\t}\n\treturn position;\n}\n\nSci_Position SCI_METHOD TestDocument::GetRelativePosition(Sci_Position positionStart, Sci_Position characterOffset) const {\n\tSci_Position pos = positionStart;\n\tif (characterOffset < 0) {\n\t\twhile (characterOffset < 0) {\n\t\t\tif (pos <= 0) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\tunsigned char previousByte = text.at(pos - 1);\n\t\t\tif (previousByte < 0x80) {\n\t\t\t\tpos--;\n\t\t\t\tcharacterOffset++;\n\t\t\t} else {\n\t\t\t\twhile ((pos > 1) && UTF8IsTrailByte(previousByte)) {\n\t\t\t\t\tpos--;\n\t\t\t\t\tpreviousByte = text.at(pos - 1);\n\t\t\t\t}\n\t\t\t\tpos--;\n\t\t\t\t// text[pos] is now a character start\n\t\t\t\tcharacterOffset++;\n\t\t\t}\n\t\t}\n\t\treturn pos;\n\t}\n\tassert(characterOffset >= 0);\n\t// TODO: invalid UTF-8\n\twhile (characterOffset > 0) {\n\t\tSci_Position width = 0;\n\t\tGetCharacterAndWidth(pos, &width);\n\t\tpos += width;\n\t\tcharacterOffset--;\n\t}\n\treturn pos;\n}\n\nint SCI_METHOD TestDocument::GetCharacterAndWidth(Sci_Position position, Sci_Position *pWidth) const {\n\t// TODO: invalid UTF-8\n\tif ((position < 0) || (position >= Length())) {\n\t\t// Return NULs before document start and after document end\n\t\tif (pWidth) {\n\t\t\t*pWidth = 1;\n\t\t}\n\t\treturn '\\0';\n\t}\n\tconst unsigned char leadByte = text.at(position);\n\tif (leadByte < 0x80) {\n\t\tif (pWidth) {\n\t\t\t*pWidth = 1;\n\t\t}\n\t\treturn leadByte;\n\t}\n\tconst int widthCharBytes = UTF8BytesOfLead[leadByte];\n\tunsigned char charBytes[] = { leadByte,0,0,0 };\n\tfor (int b = 1; b < widthCharBytes; b++) {\n\t\tcharBytes[b] = text.at(position + b);\n\t}\n\n\tif (pWidth) {\n\t\t*pWidth = widthCharBytes;\n\t}\n\treturn UnicodeFromUTF8(charBytes);\n}\n"
  },
  {
    "path": "lexilla/test/TestDocument.h",
    "content": "// Lexilla lexer library\n/** @file TestDocument.h\n ** Lexer testing.\n **/\n// Copyright 2019 by Neil Hodgson <neilh@scintilla.org>\n// The License.txt file describes the conditions under which this software may be distributed.\n\n#ifndef TESTDOCUMENT_H\n#define TESTDOCUMENT_H\n\nstd::u32string UTF32FromUTF8(std::string_view svu8);\n\nclass TestDocument : public Scintilla::IDocument {\n\tstd::string text;\n\tstd::string textStyles;\n\tstd::vector<Sci_Position> lineStarts;\n\tstd::vector<int> lineStates;\n\tstd::vector<int> lineLevels;\n\tSci_Position endStyled=0;\npublic:\n\tvoid Set(std::string_view sv);\n\tTestDocument() = default;\n\t// Deleted so TestDocument objects can not be copied.\n\tTestDocument(const TestDocument&) = delete;\n\tTestDocument(TestDocument&&) = delete;\n\tTestDocument &operator=(const TestDocument&) = delete;\n\tTestDocument &operator=(TestDocument&&) = delete;\n\tvirtual ~TestDocument() = default;\n\n\tSci_Position MaxLine() const noexcept;\n\n\tint SCI_METHOD Version() const override;\n\tvoid SCI_METHOD SetErrorStatus(int status) override;\n\tSci_Position SCI_METHOD Length() const override;\n\tvoid SCI_METHOD GetCharRange(char *buffer, Sci_Position position, Sci_Position lengthRetrieve) const override;\n\tchar SCI_METHOD StyleAt(Sci_Position position) const override;\n\tSci_Position SCI_METHOD LineFromPosition(Sci_Position position) const override;\n\tSci_Position SCI_METHOD LineStart(Sci_Position line) const override;\n\tint SCI_METHOD GetLevel(Sci_Position line) const override;\n\tint SCI_METHOD SetLevel(Sci_Position line, int level) override;\n\tint SCI_METHOD GetLineState(Sci_Position line) const override;\n\tint SCI_METHOD SetLineState(Sci_Position line, int state) override;\n\tvoid SCI_METHOD StartStyling(Sci_Position position) override;\n\tbool SCI_METHOD SetStyleFor(Sci_Position length, char style) override;\n\tbool SCI_METHOD SetStyles(Sci_Position length, const char *styles) override;\n\tvoid SCI_METHOD DecorationSetCurrentIndicator(int indicator) override;\n\tvoid SCI_METHOD DecorationFillRange(Sci_Position position, int value, Sci_Position fillLength) override;\n\tvoid SCI_METHOD ChangeLexerState(Sci_Position start, Sci_Position end) override;\n\tint SCI_METHOD CodePage() const override;\n\tbool SCI_METHOD IsDBCSLeadByte(char ch) const override;\n\tconst char *SCI_METHOD BufferPointer() override;\n\tint SCI_METHOD GetLineIndentation(Sci_Position line) override;\n\tSci_Position SCI_METHOD LineEnd(Sci_Position line) const override;\n\tSci_Position SCI_METHOD GetRelativePosition(Sci_Position positionStart, Sci_Position characterOffset) const override;\n\tint SCI_METHOD GetCharacterAndWidth(Sci_Position position, Sci_Position *pWidth) const override;\n};\n\n#endif\n"
  },
  {
    "path": "lexilla/test/TestLexers.cxx",
    "content": "// Lexilla lexer library\n/** @file TestLexers.cxx\n ** Test lexers through Lexilla.\n **/\n // Copyright 2019 by Neil Hodgson <neilh@scintilla.org>\n // The License.txt file describes the conditions under which this software may be distributed.\n\n#include <cassert>\n\n#include <string>\n#include <string_view>\n#include <vector>\n#include <map>\n#include <optional>\n#include <algorithm>\n\n#include <iostream>\n#include <sstream>\n#include <fstream>\n#include <iomanip>\n#include <filesystem>\n\n#include \"ILexer.h\"\n\n#include \"Lexilla.h\"\n#include \"LexillaAccess.h\"\n\n#include \"TestDocument.h\"\n\nnamespace {\n\nconstexpr char MakeLowerCase(char c) noexcept {\n\tif (c >= 'A' && c <= 'Z') {\n\t\treturn c - 'A' + 'a';\n\t} else {\n\t\treturn c;\n\t}\n}\n\n[[maybe_unused]] void LowerCaseAZ(std::string &s) {\n\tstd::transform(s.begin(), s.end(), s.begin(), MakeLowerCase);\n}\n\nint IntFromString(std::u32string_view s) noexcept {\n\tif (s.empty()) {\n\t\treturn 0;\n\t}\n\tconst bool negate = s.front() == '-';\n\tif (negate) {\n\t\ts.remove_prefix(1);\n\t}\n\tint value = 0;\n\twhile (!s.empty()) {\n\t\tvalue = value * 10 + s.front() - '0';\n\t\ts.remove_prefix(1);\n\t}\n\treturn negate ? -value : value;\n}\n\nbool PatternMatch(std::u32string_view pattern, std::u32string_view text) noexcept {\n\tif (pattern == text) {\n\t\treturn true;\n\t} else if (pattern.empty()) {\n\t\treturn false;\n\t} else if (pattern.front() == '\\\\') {\n\t\tpattern.remove_prefix(1);\n\t\tif (pattern.empty()) {\n\t\t\t// Escape with nothing being escaped\n\t\t\treturn false;\n\t\t}\n\t\tif (text.empty()) {\n\t\t\treturn false;\n\t\t}\n\t\tif (pattern.front() == text.front()) {\n\t\t\tpattern.remove_prefix(1);\n\t\t\ttext.remove_prefix(1);\n\t\t\treturn PatternMatch(pattern, text);\n\t\t}\n\t\treturn false;\n\t} else if (pattern.front() == '*') {\n\t\tpattern.remove_prefix(1);\n\t\tif (!pattern.empty() && pattern.front() == '*') {\n\t\t\tpattern.remove_prefix(1);\n\t\t\t// \"**\" matches anything including \"/\"\n\t\t\twhile (!text.empty()) {\n\t\t\t\tif (PatternMatch(pattern, text)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\ttext.remove_prefix(1);\n\t\t\t}\n\t\t} else {\n\t\t\twhile (!text.empty()) {\n\t\t\t\tif (PatternMatch(pattern, text)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif (text.front() == '/') {\n\t\t\t\t\t// \"/\" not matched by single \"*\"\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\ttext.remove_prefix(1);\n\t\t\t}\n\t\t}\n\t\tassert(text.empty());\n\t\t// Consumed whole text with wildcard so match if pattern consumed\n\t\treturn pattern.empty();\n\t} else if (text.empty()) {\n\t\treturn false;\n\t} else if (pattern.front() == '?') {\n\t\tif (text.front() == '/') {\n\t\t\treturn false;\n\t\t}\n\t\tpattern.remove_prefix(1);\n\t\ttext.remove_prefix(1);\n\t\treturn PatternMatch(pattern, text);\n\t} else if (pattern.front() == '[') {\n\t\tpattern.remove_prefix(1);\n\t\tif (pattern.empty()) {\n\t\t\treturn false;\n\t\t}\n\t\tconst bool positive = pattern.front() != '!';\n\t\tif (!positive) {\n\t\t\tpattern.remove_prefix(1);\n\t\t\tif (pattern.empty()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tbool inSet = false;\n\t\tif (!pattern.empty() && pattern.front() == ']') {\n\t\t\t// First is allowed to be ']'\n\t\t\tif (pattern.front() == text.front()) {\n\t\t\t\tinSet = true;\n\t\t\t}\n\t\t\tpattern.remove_prefix(1);\n\t\t}\n\t\tchar32_t start = 0;\n\t\twhile (!pattern.empty() && pattern.front() != ']') {\n\t\t\tif (pattern.front() == '-') {\n\t\t\t\tpattern.remove_prefix(1);\n\t\t\t\tif (!pattern.empty()) {\n\t\t\t\t\tconst char32_t end = pattern.front();\n\t\t\t\t\tif ((text.front() >= start) && (text.front() <= end)) {\n\t\t\t\t\t\tinSet = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (pattern.front() == text.front()) {\n\t\t\t\tinSet = true;\n\t\t\t}\n\t\t\tif (!pattern.empty()) {\n\t\t\t\tstart = pattern.front();\n\t\t\t\tpattern.remove_prefix(1);\n\t\t\t}\n\t\t}\n\t\tif (!pattern.empty()) {\n\t\t\tpattern.remove_prefix(1);\n\t\t}\n\t\tif (inSet != positive) {\n\t\t\treturn false;\n\t\t}\n\t\ttext.remove_prefix(1);\n\t\treturn PatternMatch(pattern, text);\n\t} else if (pattern.front() == '{') {\n\t\tif (pattern.length() < 2) {\n\t\t\treturn false;\n\t\t}\n\t\tconst size_t endParen = pattern.find('}');\n\t\tif (endParen == std::u32string_view::npos) {\n\t\t\t// Malformed {x} pattern\n\t\t\treturn false;\n\t\t}\n\t\tstd::u32string_view parenExpression = pattern.substr(1, endParen - 1);\n\t\tbool inSet = false;\n\t\tconst size_t dotdot = parenExpression.find(U\"..\");\n\t\tif (dotdot != std::u32string_view::npos) {\n\t\t\t// Numeric range: {10..20}\n\t\t\tconst std::u32string_view firstRange = parenExpression.substr(0, dotdot);\n\t\t\tconst std::u32string_view lastRange = parenExpression.substr(dotdot+2);\n\t\t\tif (firstRange.empty() || lastRange.empty()) {\n\t\t\t\t// Malformed {s..e} range pattern\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tconst size_t endInteger = text.find_last_of(U\"-0123456789\");\n\t\t\tif (endInteger == std::u32string_view::npos) {\n\t\t\t\t// No integer in text\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tconst std::u32string_view intPart = text.substr(0, endInteger+1);\n\t\t\tconst int first = IntFromString(firstRange);\n\t\t\tconst int last = IntFromString(lastRange);\n\t\t\tconst int value = IntFromString(intPart);\n\t\t\tif ((value >= first) && (value <= last)) {\n\t\t\t\tinSet = true;\n\t\t\t\ttext.remove_prefix(intPart.length());\n\t\t\t}\n\t\t} else {\n\t\t\t// Alternates: {a,b,cd}\n\t\t\tsize_t comma = parenExpression.find(',');\n\t\t\tfor (;;) {\n\t\t\t\tconst bool finalAlt = comma == std::u32string_view::npos;\n\t\t\t\tconst std::u32string_view oneAlt = finalAlt ? parenExpression :\n\t\t\t\t\tparenExpression.substr(0, comma);\n\t\t\t\tif (oneAlt == text.substr(0, oneAlt.length())) {\n\t\t\t\t\t// match\n\t\t\t\t\tinSet = true;\n\t\t\t\t\ttext.remove_prefix(oneAlt.length());\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (finalAlt) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tparenExpression.remove_prefix(oneAlt.length() + 1);\n\t\t\t\tcomma = parenExpression.find(',');\n\t\t\t}\n\t\t}\n\t\tif (!inSet) {\n\t\t\treturn false;\n\t\t}\n\t\tpattern.remove_prefix(endParen + 1);\n\t\treturn PatternMatch(pattern, text);\n\t} else if (pattern.front() == text.front()) {\n\t\tpattern.remove_prefix(1);\n\t\ttext.remove_prefix(1);\n\t\treturn PatternMatch(pattern, text);\n\t}\n\treturn false;\n}\n\nbool PathMatch(std::string pattern, std::string relPath) {\n#if defined(_WIN32)\n\t// Convert Windows path separators to Unix\n\tstd::replace(relPath.begin(), relPath.end(), '\\\\', '/');\n#endif\n#if defined(_WIN32) || defined(__APPLE__)\n\t// Case-insensitive, only does ASCII but fine for test example files\n\tLowerCaseAZ(pattern);\n\tLowerCaseAZ(relPath);\n#endif\n\tconst std::u32string patternU32 = UTF32FromUTF8(pattern);\n\tconst std::u32string relPathU32 = UTF32FromUTF8(relPath);\n\tif (PatternMatch(patternU32, relPathU32)) {\n\t\treturn true;\n\t}\n\tconst size_t lastSlash = relPathU32.rfind('/');\n\tif (lastSlash == std::string::npos) {\n\t\treturn false;\n\t}\n\t// Match against just filename\n\tconst std::u32string fileNameU32 = relPathU32.substr(lastSlash+1);\n\treturn PatternMatch(patternU32, fileNameU32);\n}\n\nconstexpr std::string_view suffixStyled = \".styled\";\nconstexpr std::string_view suffixFolded = \".folded\";\nconstexpr std::string_view lexerPrefix = \"lexer.*\";\nconstexpr std::string_view prefixIf = \"if \";\nconstexpr std::string_view prefixMatch = \"match \";\nconstexpr std::string_view prefixEqual = \"= \";\nconstexpr std::string_view prefixComment = \"#\";\n\nstd::string ReadFile(std::filesystem::path path) {\n\tstd::ifstream ifs(path, std::ios::binary);\n\tstd::string content((std::istreambuf_iterator<char>(ifs)),\n\t\t(std::istreambuf_iterator<char>()));\n\treturn content;\n}\n\nstd::string MarkedDocument(const Scintilla::IDocument *pdoc) {\n\tassert(pdoc);\n\tstd::ostringstream os(std::ios::binary);\n\tchar prevStyle = -1;\n\tfor (Sci_Position pos = 0; pos < pdoc->Length(); pos++) {\n\t\tconst char styleNow = pdoc->StyleAt(pos);\n\t\tif (styleNow != prevStyle) {\n\t\t\tconst unsigned char uStyleNow = styleNow;\n\t\t\tconst unsigned int uiStyleNow = uStyleNow;\n\t\t\tos << \"{\" << uiStyleNow << \"}\";\n\t\t\tprevStyle = styleNow;\n\t\t}\n\t\tchar ch = '\\0';\n\t\tpdoc->GetCharRange(&ch, pos, 1);\n\t\tos << ch;\n\t}\n\treturn os.str();\n}\n\nvoid PrintLevel(std::ostringstream &os, int level) {\n\tconst int levelNow = level & 0xFFF;\n\tconst int levelNext = level >> 16;\n\tconst int levelFlags = (level >> 12) & 0xF;\n\tchar foldSymbol = ' ';\n\tif (level & 0x2000)\n\t\tfoldSymbol = '+';\n\telse if (levelNow > 0x400)\n\t\tfoldSymbol = '|';\n\tos << std::hex << \" \" << levelFlags << \" \"\n\t\t<< std::setw(3) << levelNow << \" \"\n\t\t<< std::setw(3) << levelNext << \" \"\n\t\t<< foldSymbol << \" \";\n}\n\nstd::string FoldedDocument(const Scintilla::IDocument *pdoc) {\n\tassert(pdoc);\n\tstd::ostringstream os(std::ios::binary);\n\tSci_Position linePrev = -1;\n\tchar ch = '\\0';\n\tfor (Sci_Position pos = 0; pos < pdoc->Length(); pos++) {\n\t\tconst Sci_Position lineNow = pdoc->LineFromPosition(pos);\n\t\tif (linePrev < lineNow) {\n\t\t\tPrintLevel(os, pdoc->GetLevel(lineNow));\n\t\t\tlinePrev = lineNow;\n\t\t}\n\t\tpdoc->GetCharRange(&ch, pos, 1);\n\t\tos << ch;\n\t}\n\tif (ch == '\\n') {\n\t\t// Extra empty line\n\t\tPrintLevel(os, pdoc->GetLevel(linePrev + 1));\n\t}\n\treturn os.str();\n}\n\nstd::pair<std::string, std::string> MarkedAndFoldedDocument(const Scintilla::IDocument *pdoc) {\n\treturn { MarkedDocument(pdoc), FoldedDocument(pdoc) };\n}\n\nstd::vector<std::string> StringSplit(const std::string_view &text, int separator) {\n\tstd::vector<std::string> vs(text.empty() ? 0 : 1);\n\tfor (std::string_view::const_iterator it = text.begin(); it != text.end(); ++it) {\n\t\tif (*it == separator) {\n\t\t\tvs.push_back(std::string());\n\t\t} else {\n\t\t\tvs.back() += *it;\n\t\t}\n\t}\n\treturn vs;\n}\n\nconstexpr bool IsSpaceOrTab(char ch) noexcept {\n\treturn (ch == ' ') || (ch == '\\t');\n}\n\nvoid PrintRanges(const std::vector<bool> &v) {\n\tstd::cout << \"    \";\n\tstd::optional<size_t> startRange;\n\tfor (size_t style = 0; style <= v.size(); style++) {\n\t\t// Goes one past size so that final range is closed\n\t\tif ((style < v.size()) && v.at(style)) {\n\t\t\tif (!startRange) {\n\t\t\t\tstartRange = style;\n\t\t\t}\n\t\t} else if (startRange) {\n\t\t\tconst size_t endRange = style - 1;\n\t\t\tstd::cout << *startRange;\n\t\t\tif (*startRange != endRange) {\n\t\t\t\tstd::cout << \"-\" << endRange;\n\t\t\t}\n\t\t\tstd::cout << \" \";\n\t\t\tstartRange.reset();\n\t\t}\n\t}\n\tstd::cout << \"\\n\";\n}\n\nclass PropertyMap {\n\n\tstd::string Evaluate(std::string_view text) {\n\t\tif (text.find(' ') != std::string_view::npos) {\n\t\t\tif (text.starts_with(prefixEqual)) {\n\t\t\t\tconst std::string_view sExpressions = text.substr(prefixEqual.length());\n\t\t\t\tstd::vector<std::string> parts = StringSplit(sExpressions, ';');\n\t\t\t\tif (parts.size() > 1) {\n\t\t\t\t\tfor (size_t part = 1; part < parts.size(); part++) {\n\t\t\t\t\t\tif (parts.at(part) != parts.at(0)) {\n\t\t\t\t\t\t\treturn \"0\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn \"1\";\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn {};\n\t\t} else {\n\t\t\tstd::optional<std::string> value = GetProperty(text);\n\t\t\tif (value) {\n\t\t\t\treturn *value;\n\t\t\t}\n\t\t\treturn {};\n\t\t}\n\t}\n\n\tstd::string Expand(std::string withVars) {\n\t\tconstexpr size_t maxVars = 100;\n\t\tsize_t varStart = withVars.rfind(\"$(\");\n\t\tfor (size_t count = 0; (count < maxVars) && (varStart != std::string::npos); count++) {\n\t\t\tconst size_t varEnd = withVars.find(')', varStart + 2);\n\t\t\tif (varEnd == std::string::npos) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst std::string_view whole = withVars;\n\t\t\tconst std::string_view var = whole.substr(varStart + 2, varEnd - (varStart + 2));\n\t\t\tconst std::string val = Evaluate(var);\n\n\t\t\twithVars.erase(varStart, varEnd - varStart + 1);\n\t\t\twithVars.insert(varStart, val);\n\n\t\t\tvarStart = withVars.rfind(\"$(\");\n\t\t}\n\t\treturn withVars;\n\t}\n\n\tstd::vector<std::string> GetFilePatterns(const std::string &key) const {\n\t\tstd::vector<std::string> exts;\n\t\t// Malformed patterns are skipped if we require the whole prefix here;\n\t\t// a fuzzy search lets us collect and report them\n\t\tconst size_t patternStart = key.find('*');\n\t\tif (patternStart == std::string::npos)\n\t\t\treturn exts;\n\n\t\tconst std::string patterns = key.substr(patternStart);\n\t\tfor (const std::string &pat : StringSplit(patterns, ';')) {\n\t\t\t// Only accept patterns in the form *.xyz\n\t\t\tif (pat.starts_with(\"*.\") && pat.length() > 2) {\n\t\t\t\texts.push_back(pat.substr(1));\n\t\t\t} else {\n\t\t\t\tstd::cout << \"\\n\"\n\t\t\t\t\t  << \"Ignoring bad file pattern '\" << pat << \"' in list \" << patterns << \"\\n\";\n\t\t\t}\n\t\t}\n\t\treturn exts;\n\t}\n\n\tbool ProcessLine(std::string_view text, bool ifIsTrue) {\n\t\t// If clause ends with first non-indented line\n\t\tif (!ifIsTrue && (text.empty() || IsSpaceOrTab(text.at(0)))) {\n\t\t\treturn false;\n\t\t}\n\t\tifIsTrue = true;\n\t\tif (text.starts_with(prefixIf)) {\n\t\t\tconst std::string value = Expand(std::string(text.substr(prefixIf.length())));\n\t\t\tif (value == \"0\" || value == \"\") {\n\t\t\t\tifIsTrue = false;\n\t\t\t}\n\t\t} else if (text.starts_with(prefixMatch)) {\n\t\t\tstd::optional<std::string> fileNameExt = GetProperty(\"FileNameExt\");\n\t\t\tif (fileNameExt) {\n\t\t\t\tstd::string pattern(text.substr(prefixMatch.length()));\n\t\t\t\t// Remove trailing white space\n\t\t\t\twhile (!pattern.empty() && IsSpaceOrTab(pattern.back())) {\n\t\t\t\t\tpattern.pop_back();\n\t\t\t\t}\n\t\t\t\tifIsTrue = PathMatch(pattern, *fileNameExt);\n\t\t\t} else {\n\t\t\t\tifIsTrue = false;\n\t\t\t}\n\t\t} else {\n\t\t\twhile (!text.empty() && IsSpaceOrTab(text.at(0))) {\n\t\t\t\ttext.remove_prefix(1);\n\t\t\t}\n\t\t\tif (text.starts_with(prefixComment)) {\n\t\t\t\treturn ifIsTrue;\n\t\t\t}\n\t\t\tconst size_t positionEquals = text.find(\"=\");\n\t\t\tif (positionEquals != std::string::npos) {\n\t\t\t\tconst std::string key(text.substr(0, positionEquals));\n\t\t\t\tconst std::string_view value = text.substr(positionEquals + 1);\n\t\t\t\tproperties[key] = value;\n\t\t\t}\n\t\t}\n\t\treturn ifIsTrue;\n\t}\n\npublic:\n\tusing PropMap = std::map<std::string, std::string>;\n\tPropMap properties;\n\n\tvoid ReadFromFile(std::filesystem::path path) {\n\t\tbool ifIsTrue = true;\n\t\tstd::ifstream ifs(path);\n\t\tstd::string line;\n\t\tstd::string logicalLine;\n\t\twhile (std::getline(ifs, line)) {\n\t\t\tif (line.ends_with(\"\\r\")) {\n\t\t\t\t// Accidentally have \\r\\n line ends on Unix system\n\t\t\t\tline.pop_back();\n\t\t\t}\n\t\t\tlogicalLine += line;\n\t\t\tif (logicalLine.ends_with(\"\\\\\")) {\n\t\t\t\tlogicalLine.pop_back();\n\t\t\t} else {\n\t\t\t\tifIsTrue = ProcessLine(logicalLine, ifIsTrue);\n\t\t\t\tlogicalLine.clear();\n\t\t\t}\n\t\t}\n\t}\n\n\tstd::optional<std::string> GetProperty(std::string_view key) const {\n\t\tconst PropMap::const_iterator prop = properties.find(std::string(key));\n\t\tif (prop == properties.end())\n\t\t\treturn std::nullopt;\n\t\telse\n\t\t\treturn prop->second;\n\t}\n\n\tstd::optional<std::string> GetPropertyForFile(std::string_view keyPrefix, std::string_view fileName) const {\n\t\tfor (auto const &[key, val] : properties) {\n\t\t\tif (key.starts_with(keyPrefix)) {\n\t\t\t\tconst std::string keySuffix = key.substr(keyPrefix.length());\n\t\t\t\tif (fileName.ends_with(keySuffix)) {\n\t\t\t\t\treturn val;\n\t\t\t\t} else if (key.find(';') != std::string::npos) {\n\t\t\t\t\t// It may be the case that a suite of test files with various extensions are\n\t\t\t\t\t// meant to share a common configuration, so try to find a matching\n\t\t\t\t\t// extension in a delimited list, e.g., lexer.*.html;*.php;*.asp=hypertext\n\t\t\t\t\tfor (const std::string &ext : GetFilePatterns(key)) {\n\t\t\t\t\t\tif (fileName.ends_with(ext)) {\n\t\t\t\t\t\t\treturn val;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn std::nullopt;\n\t}\n\n\tstd::optional<int> GetPropertyValue(std::string_view key) const {\n\t\tstd::optional<std::string> value = GetProperty(key);\n\t\ttry {\n\t\t\tif (value)\n\t\t\t\treturn std::stoi(value->c_str());\n\t\t}\n\t\tcatch (std::invalid_argument &) {\n\t\t\t// Just return empty\n\t\t}\n\t\treturn {};\n\t}\n\n};\n\nsize_t FirstLineDifferent(std::string_view a, std::string_view b) {\n\tsize_t i = 0;\n\twhile (i < std::min(a.size(), b.size()) && a.at(i) == b.at(i)) {\n\t\ti++;\n\t}\n\treturn std::count(a.begin(), a.begin() + i, '\\n');\n}\n\nbool CheckSame(std::string_view augmentedText, std::string_view augmentedTextNew, std::string_view item, std::string_view suffix, const std::filesystem::path &path) {\n\tif (augmentedTextNew == augmentedText) {\n\t\treturn true;\n\t}\n\tconst size_t lineNumber = FirstLineDifferent(augmentedText, augmentedTextNew) + 1;\n\tstd::cout << \"\\n\" << path.string() << \":\" << lineNumber << \":\";\n\tconst std::string differenceType = augmentedText.empty() ? \"new\" : \"different\";\n\tstd::cout << \" has \" << differenceType << \" \" << item << \"\\n\\n\";\n\tstd::filesystem::path pathNew = path;\n\tpathNew += suffix;\n\tpathNew += \".new\";\n\tstd::ofstream ofs(pathNew, std::ios::binary);\n\tofs << augmentedTextNew;\n\treturn false;\n}\n\nint Substitute(std::string &s, const std::string &sFind, const std::string &sReplace) {\n\tint c = 0;\n\tconst size_t lenFind = sFind.size();\n\tconst size_t lenReplace = sReplace.size();\n\tsize_t posFound = s.find(sFind);\n\twhile (posFound != std::string::npos) {\n\t\ts.replace(posFound, lenFind, sReplace);\n\t\tposFound = s.find(sFind, posFound + lenReplace);\n\t\tc++;\n\t}\n\treturn c;\n}\n\nint WindowsToUnix(std::string &s) {\n\treturn Substitute(s, \"\\r\\n\", \"\\n\");\n}\n\nint UnixToWindows(std::string &s) {\n\treturn Substitute(s, \"\\n\", \"\\r\\n\");\n}\n\nconst std::string BOM = \"\\xEF\\xBB\\xBF\";\n\nvoid StyleLineByLine(TestDocument &doc, Scintilla::ILexer5 *plex) {\n\tassert(plex);\n\tScintilla::IDocument *pdoc = &doc;\n\tconst Sci_Position lines = doc.LineFromPosition(doc.Length());\n\tSci_Position startLine = 0;\n\tfor (Sci_Position line = 0; line <= lines; line++) {\n\t\tconst Sci_Position endLine = doc.LineStart(line + 1);\n\t\tint styleStart = 0;\n\t\tif (startLine > 0)\n\t\t\tstyleStart = doc.StyleAt(startLine - 1);\n\t\tplex->Lex(startLine, endLine - startLine, styleStart, pdoc);\n\t\tplex->Fold(startLine, endLine - startLine, styleStart, pdoc);\n\t\tstartLine = endLine;\n\t}\n}\n\nbool TestCRLF(std::filesystem::path path, const std::string s, Scintilla::ILexer5 *plex, bool disablePerLineTests) {\n\tassert(plex);\n\tbool success = true;\n\t// Convert all line ends to \\r\\n to check if styles change between \\r and \\n which makes\n\t// it difficult to test on different platforms when files may have line ends changed.\n\tstd::string text = s;\n\tWindowsToUnix(text);\n\tconst bool originalIsUnix = text == s;\n\tstd::string textUnix = text;\n\tUnixToWindows(text);\n\tTestDocument doc;\n\tdoc.Set(text);\n\tScintilla::IDocument *pdoc = &doc;\n\tassert(pdoc);\n\tplex->Lex(0, pdoc->Length(), 0, pdoc);\n\tplex->Fold(0, pdoc->Length(), 0, pdoc);\n\tconst auto [styledText, foldedText] = MarkedAndFoldedDocument(pdoc);\n\n\tint prevStyle = -1;\n\tSci_Position line = 1;\n\tfor (Sci_Position pos = 0; pos < pdoc->Length(); pos++) {\n\t\tconst int styleNow = pdoc->StyleAt(pos);\n\t\tchar ch = '\\0';\n\t\tpdoc->GetCharRange(&ch, pos, 1);\n\t\tif (ch == '\\n') {\n\t\t\tif (styleNow != prevStyle) {\n\t\t\t\tstd::cout << path.string() << \":\" << line << \":\" <<\n\t\t\t\t\t\" different styles between \\\\r and \\\\n at \" <<\n\t\t\t\t\tpos << \": \" << prevStyle << \", \" << styleNow << \"\\n\";\n\t\t\t\tsuccess = false;\n\t\t\t}\n\t\t\tline++;\n\t\t}\n\t\tprevStyle = styleNow;\n\t}\n\n\t// Lex and fold with \\n line ends then check result is same\n\n\tTestDocument docUnix;\n\tdocUnix.Set(textUnix);\n\tScintilla::IDocument *pdocUnix = &docUnix;\n\tassert(pdocUnix);\n\tplex->Lex(0, pdocUnix->Length(), 0, pdocUnix);\n\tplex->Fold(0, pdocUnix->Length(), 0, pdocUnix);\n\tauto [styledTextUnix, foldedTextUnix] = MarkedAndFoldedDocument(pdocUnix);\n\n\t// Convert results from \\n to \\r\\n run\n\tUnixToWindows(styledTextUnix);\n\tUnixToWindows(foldedTextUnix);\n\n\tif (styledText != styledTextUnix) {\n\t\tstd::cout << \"\\n\" << path.string() << \":1: has different styles with \\\\n versus \\\\r\\\\n line ends\\n\\n\";\n\t\tsuccess = false;\n\t}\n\tif (foldedText != foldedTextUnix) {\n\t\tstd::cout << \"\\n\" << path.string() << \":1: has different folds with \\\\n versus \\\\r\\\\n line ends\\n\\n\";\n\t\tsuccess = false;\n\t}\n\n\t// Test line by line lexing/folding with Unix \\n line ends\n\tif (!disablePerLineTests && !originalIsUnix) {\n\t\tStyleLineByLine(docUnix, plex);\n\t\tauto [styledTextNewPerLine, foldedTextNewPerLine] = MarkedAndFoldedDocument(pdocUnix);\n\t\t// Convert results from \\n to \\r\\n run\n\t\tUnixToWindows(styledTextNewPerLine);\n\t\tUnixToWindows(foldedTextNewPerLine);\n\t\tif (!CheckSame(styledTextUnix, styledTextNewPerLine, \"per-line styles \\\\n\", suffixStyled, path)) {\n\t\t\tsuccess = false;\n\t\t}\n\t\tif (!CheckSame(foldedTextUnix, foldedTextNewPerLine, \"per-line folds \\\\n\", suffixFolded, path)) {\n\t\t\tsuccess = false;\n\t\t}\n\t}\n\n\tplex->Release();\n\treturn success;\n}\n\nvoid TestILexer(Scintilla::ILexer5 *plex) {\n\tassert(plex);\n\n\t// Test each method of the ILexer interface.\n\t// Mostly ensures there are no crashes when calling methods.\n\t// Some methods are tested later (Release, Lex, Fold).\n\t// PrivateCall performs arbitrary actions so is not safe to call.\n\n\t[[maybe_unused]] const int version = plex->Version();\n\tassert(version == Scintilla::lvRelease5);\n\n\t[[maybe_unused]] const char *language = plex->GetName();\n\tassert(language);\n\n\t[[maybe_unused]] const int ident = plex->GetIdentifier();\n\tassert(ident >= 0);\n\n\t[[maybe_unused]] const char *propertyNames = plex->PropertyNames();\n\tassert(propertyNames);\n\n\t[[maybe_unused]] const int propertyType = plex->PropertyType(\"unknown\");\n\tassert(propertyType >= 0 && propertyType <= 2);\n\n\t[[maybe_unused]] const char *propertyDescription = plex->DescribeProperty(\"unknown\");\n\tassert(propertyDescription);\n\n\t[[maybe_unused]] const Sci_Position invalidation = plex->PropertySet(\"unknown\", \"unknown\");\n\tassert(invalidation == 0 || invalidation == -1);\n\n\t[[maybe_unused]] const char *wordListDescription = plex->DescribeWordListSets();\n\tassert(wordListDescription);\n\n\t[[maybe_unused]] const Sci_Position invalidationWordList = plex->WordListSet(9, \"unknown\");\n\tassert(invalidationWordList == 0 || invalidationWordList == -1);\n\n\t[[maybe_unused]] const int lineEndTypes = plex->LineEndTypesSupported();\n\tassert(lineEndTypes == 0 || lineEndTypes == 1);\n\n\tif (std::string_view bases = plex->GetSubStyleBases(); !bases.empty()) {\n\t\t// Allocate a substyle for each possible style\n\t\twhile (!bases.empty()) {\n\t\t\tconstexpr int newStyles = 3;\n\t\t\tconst int base = bases.front();\n\t\t\tconst int baseStyle = plex->AllocateSubStyles(base, newStyles);\n\t\t\t[[maybe_unused]] const int styleBack = plex->StyleFromSubStyle(baseStyle);\n\t\t\tassert(styleBack == base);\n\t\t\tplex->SetIdentifiers(baseStyle, \"int nullptr\");\n\t\t\t[[maybe_unused]] const int start = plex->SubStylesStart(base);\n\t\t\tassert(start == baseStyle);\n\t\t\t[[maybe_unused]] const int len = plex->SubStylesLength(base);\n\t\t\tassert(len == newStyles);\n\t\t\tbases.remove_prefix(1);\n\t\t}\n\t\tplex->FreeSubStyles();\n\t}\n\n\t[[maybe_unused]] const int primary = plex->PrimaryStyleFromStyle(2);\n\tassert(primary == 2);\n\n\t[[maybe_unused]] const int distance = plex->DistanceToSecondaryStyles();\n\tassert(distance >= 0);\n\n\t// Just see if crashes - nullptr is valid return to indicate not present.\n\t[[maybe_unused]] const char *propertyUnknownValue = plex->PropertyGet(\"unknown\");\n\n\tconst int styles = plex->NamedStyles();\n\tfor (int style = 0; style < styles; style++) {\n\t\t[[maybe_unused]] const char *name = plex->NameOfStyle(style);\n\t\tassert(name);\n\t\t[[maybe_unused]] const char *tags = plex->TagsOfStyle(style);\n\t\tassert(tags);\n\t\t[[maybe_unused]] const char *description = plex->DescriptionOfStyle(style);\n\t\tassert(description);\n\t}\n}\n\nbool SetProperties(Scintilla::ILexer5 *plex, const std::string &language, const PropertyMap &propertyMap, std::filesystem::path path) {\n\tassert(plex);\n\n\tconst std::string fileName = path.filename().string();\n\n\tif (std::string_view bases = plex->GetSubStyleBases(); !bases.empty()) {\n\t\t// Allocate a substyle for each possible style\n\t\twhile (!bases.empty()) {\n\t\t\tconst int baseStyle = bases.front();\n\t\t\t//\tsubstyles.cpp.11=2\n\t\t\tconst std::string base = std::to_string(baseStyle);\n\t\t\tconst std::string substylesForBase = \"substyles.\" + language + \".\" + base;\n\t\t\tstd::optional<std::string> substylesN = propertyMap.GetProperty(substylesForBase);\n\t\t\tif (substylesN) {\n\t\t\t\tconst int substyles = atoi(substylesN->c_str());\n\t\t\t\tconst int baseStyleNum = plex->AllocateSubStyles(baseStyle, substyles);\n\t\t\t\t//\tsubstylewords.11.1.$(file.patterns.cpp)=std map string vector\n\t\t\t\tfor (int kw = 0; kw < substyles; kw++) {\n\t\t\t\t\tconst std::string substyleWords = \"substylewords.\" + base + \".\" + std::to_string(kw + 1) + \".*\";\n\t\t\t\t\tconst std::optional<std::string> keywordN = propertyMap.GetPropertyForFile(substyleWords, fileName);\n\t\t\t\t\tif (keywordN) {\n\t\t\t\t\t\tplex->SetIdentifiers(baseStyleNum + kw, keywordN->c_str());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tbases.remove_prefix(1);\n\t\t}\n\t}\n\n\t// Set keywords, keywords2, ... keywords9, for this file\n\tfor (int kw = 0; kw < 10; kw++) {\n\t\tstd::string kwChoice(\"keywords\");\n\t\tif (kw > 0) {\n\t\t\tkwChoice.push_back(static_cast<char>('1' + kw));\n\t\t}\n\t\tkwChoice.append(\".*\");\n\t\tstd::optional<std::string> keywordN = propertyMap.GetPropertyForFile(kwChoice, fileName);\n\t\tif (keywordN) {\n\t\t\t// New lexer object has all word lists empty so check null effect from setting empty\n\t\t\tconst Sci_Position changedEmpty = plex->WordListSet(kw, \"\");\n\t\t\tif (changedEmpty != -1) {\n\t\t\t\tstd::cout << path.string() << \":1: does not return -1 for null WordListSet(\" << kw << \")\\n\";\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tconst Sci_Position changedAt = plex->WordListSet(kw, keywordN->c_str());\n\t\t\tif (keywordN->empty()) {\n\t\t\t\tif (changedAt != -1) {\n\t\t\t\t\tstd::cout << path.string() << \":1: does not return -1 for WordListSet(\" << kw << \") to same empty\" << \"\\n\";\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (changedAt == -1) {\n\t\t\t\t\tstd::cout << path.string() << \":1: returns -1 for WordListSet(\" << kw << \")\\n\";\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Set parameters of lexer\n\tfor (auto const &[key, val] : propertyMap.properties) {\n\t\tif (key.starts_with(\"lexer.*\")) {\n\t\t\t// Ignore as processed earlier\n\t\t} else if (key.starts_with(\"keywords\")) {\n\t\t\t// Ignore as processed earlier\n\t\t} else if (key.starts_with(\"substyle\")) {\n\t\t\t// Ignore as processed earlier\n\t\t} else {\n\t\t\tplex->PropertySet(key.c_str(), val.c_str());\n\t\t}\n\t}\n\n\treturn true;\n}\n\n\nbool TestFile(const std::filesystem::path &path, const PropertyMap &propertyMap) {\n\t// Find and create correct lexer\n\tstd::optional<std::string> language = propertyMap.GetPropertyForFile(lexerPrefix, path.filename().string());\n\tif (!language) {\n\t\tstd::cout << \"\\n\" << path.string() << \":1: has no language\\n\\n\";\n\t\treturn false;\n\t}\n\tScintilla::ILexer5 *plex = Lexilla::MakeLexer(*language);\n\tif (!plex) {\n\t\tstd::cout << \"\\n\" << path.string() << \":1: has no lexer for \" << *language << \"\\n\\n\";\n\t\treturn false;\n\t}\n\n\tTestILexer(plex);\n\n\tif (!SetProperties(plex, *language, propertyMap, path)) {\n\t\treturn false;\n\t}\n\n\tstd::string text = ReadFile(path);\n\tif (text.starts_with(BOM)) {\n\t\ttext.erase(0, BOM.length());\n\t}\n\n\tstd::filesystem::path pathStyled = path;\n\tpathStyled += suffixStyled;\n\tconst std::string styledText = ReadFile(pathStyled);\n\n\tstd::filesystem::path pathFolded = path;\n\tpathFolded += suffixFolded;\n\tconst std::string foldedText = ReadFile(pathFolded);\n\n\tconst int repeatLex = propertyMap.GetPropertyValue(\"testlexers.repeat.lex\").value_or(1);\n\tconst int repeatFold = propertyMap.GetPropertyValue(\"testlexers.repeat.fold\").value_or(1);\n\n\tTestDocument doc;\n\tdoc.Set(text);\n\tScintilla::IDocument *pdoc = &doc;\n\tassert(pdoc);\n\tfor (int i = 0; i < repeatLex; i++) {\n\t\tplex->Lex(0, pdoc->Length(), 0, pdoc);\n\t}\n\tfor (int i = 0; i < repeatFold; i++) {\n\t\tplex->Fold(0, pdoc->Length(), 0, pdoc);\n\t}\n\n\tbool success = true;\n\n\tconst auto [styledTextNew, foldedTextNew] = MarkedAndFoldedDocument(pdoc);\n\tif (!CheckSame(styledText, styledTextNew, \"styles\", suffixStyled, path)) {\n\t\tsuccess = false;\n\t}\n\tif (!CheckSame(foldedText, foldedTextNew, \"folds\", suffixFolded, path)) {\n\t\tsuccess = false;\n\t}\n\n\tif (propertyMap.GetPropertyValue(\"testlexers.list.styles\").value_or(0)) {\n\t\tstd::vector<bool> used(0x100);\n\t\tfor (Sci_Position pos = 0; pos < pdoc->Length(); pos++) {\n\t\t\tconst unsigned char uchStyle = pdoc->StyleAt(pos);\n\t\t\tconst unsigned style = uchStyle;\n\t\t\tused.at(style) = true;\n\t\t}\n\t\tPrintRanges(used);\n\t}\n\n\tconst std::optional<int> perLineDisable = propertyMap.GetPropertyValue(\"testlexers.per.line.disable\");\n\tconst bool disablePerLineTests = perLineDisable.value_or(false);\n\n\t// Test line by line lexing/folding\n\tif (success && !disablePerLineTests) {\n\t\tdoc.Set(text);\n\t\tStyleLineByLine(doc, plex);\n\t\tconst auto [styledTextNewPerLine, foldedTextNewPerLine] = MarkedAndFoldedDocument(pdoc);\n\t\tsuccess = success && CheckSame(styledText, styledTextNewPerLine, \"per-line styles\", suffixStyled, path);\n\t\tsuccess = success && CheckSame(foldedText, foldedTextNewPerLine, \"per-line folds\", suffixFolded, path);\n\t}\n\n\tplex->Release();\n\n\tif (success) {\n\t\tScintilla::ILexer5 *plexCRLF = Lexilla::MakeLexer(*language);\n\t\tSetProperties(plexCRLF, *language, propertyMap, path.filename().string());\n\t\tsuccess = TestCRLF(path, text, plexCRLF, disablePerLineTests);\n\t}\n\n\treturn success;\n}\n\nbool TestDirectory(std::filesystem::path directory, std::filesystem::path basePath) {\n\tbool success = true;\n\tfor (auto &p : std::filesystem::directory_iterator(directory)) {\n\t\tif (!p.is_directory()) {\n\t\t\tconst std::string extension = p.path().extension().string();\n\t\t\tif (extension != \".properties\" && extension != suffixStyled && extension != \".new\" &&\n\t\t\t\textension != suffixFolded) {\n\t\t\t\tconst std::filesystem::path relativePath = p.path().lexically_relative(basePath);\n\t\t\t\tstd::cout << \"Lexing \" << relativePath.string() << '\\n';\n\t\t\t\tPropertyMap properties;\n\t\t\t\tproperties.properties[\"FileNameExt\"] = p.path().filename().string();\n\t\t\t\tproperties.ReadFromFile(directory / \"SciTE.properties\");\n\t\t\t\tif (!TestFile(p, properties)) {\n\t\t\t\t\tsuccess = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn success;\n}\n\nbool AccessLexilla(std::filesystem::path basePath) {\n\tif (!std::filesystem::exists(basePath)) {\n\t\tstd::cout << \"No examples at \" << basePath.string() << \"\\n\";\n\t\treturn false;\n\t}\n\n\tbool success = true;\n\tfor (auto &p : std::filesystem::recursive_directory_iterator(basePath)) {\n\t\tif (p.is_directory()) {\n\t\t\t//std::cout << p.path().string() << '\\n';\n\t\t\tif (!TestDirectory(p, basePath)) {\n\t\t\t\tsuccess = false;\n\t\t\t}\n\t\t}\n\t}\n\treturn success;\n}\n\nstd::filesystem::path FindLexillaDirectory(std::filesystem::path startDirectory) {\n\t// Search up from startDirectory for a directory named \"lexilla\" or containing a \"bin\" subdirectory\n\tstd::filesystem::path directory = startDirectory;\n\twhile (!directory.empty()) {\n\t\t//std::cout << \"Searching \" << directory.string() << \"\\n\";\n\t\tconst std::filesystem::path parent = directory.parent_path();\n\t\tconst std::filesystem::path localLexilla = directory / \"lexilla\";\n\t\tconst std::filesystem::directory_entry entry(localLexilla);\n\t\tif (entry.is_directory()) {\n\t\t\tstd::cout << \"Found Lexilla at \" << entry.path().string() << \"\\n\";\n\t\t\treturn localLexilla;\n\t\t}\n\t\tconst std::filesystem::path localBin = directory / \"bin\";\n\t\tconst std::filesystem::directory_entry entryBin(localBin);\n\t\tif (entryBin.is_directory()) {\n\t\t\tstd::cout << \"Found Lexilla at \" << directory.string() << \"\\n\";\n\t\t\treturn directory;\n\t\t}\n\t\tif (parent == directory) {\n\t\t\tstd::cout << \"Reached root at \" << directory.string() << \"\\n\";\n\t\t\treturn std::filesystem::path();\n\t\t}\n\t\tdirectory = parent;\n\t}\n\treturn std::filesystem::path();\n}\n\n}\n\n\n\nint main(int argc, char **argv) {\n\tbool success = false;\n\tconst std::filesystem::path baseDirectory = FindLexillaDirectory(std::filesystem::current_path());\n\tif (!baseDirectory.empty()) {\n#if !defined(LEXILLA_STATIC)\n\t\tconst std::filesystem::path sharedLibrary = baseDirectory / \"bin\" / LEXILLA_LIB;\n\t\tif (!Lexilla::Load(sharedLibrary.string())) {\n\t\t\tstd::cout << \"Failed to load \" << sharedLibrary << \"\\n\";\n\t\t\treturn 1;\t// Indicate failure\n\t\t}\n#endif\n\t\tstd::filesystem::path examplesDirectory = baseDirectory / \"test\" / \"examples\";\n\t\tfor (int i = 1; i < argc; i++) {\n\t\t\tif (argv[i][0] != '-') {\n\t\t\t\texamplesDirectory = argv[i];\n\t\t\t}\n\t\t}\n\t\tsuccess = AccessLexilla(examplesDirectory);\n\t}\n\treturn success ? 0 : 1;\n}\n"
  },
  {
    "path": "lexilla/test/TestLexers.vcxproj",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <ItemGroup Label=\"ProjectConfigurations\">\r\n    <ProjectConfiguration Include=\"Debug|Win32\">\r\n      <Configuration>Debug</Configuration>\r\n      <Platform>Win32</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Release|Win32\">\r\n      <Configuration>Release</Configuration>\r\n      <Platform>Win32</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Debug|x64\">\r\n      <Configuration>Debug</Configuration>\r\n      <Platform>x64</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Release|x64\">\r\n      <Configuration>Release</Configuration>\r\n      <Platform>x64</Platform>\r\n    </ProjectConfiguration>\r\n  </ItemGroup>\r\n  <PropertyGroup Label=\"Globals\">\r\n    <VCProjectVersion>16.0</VCProjectVersion>\r\n    <ProjectGuid>{2E0BBD6B-4BC8-4A6C-9DDA-199C27899335}</ProjectGuid>\r\n    <Keyword>Win32Proj</Keyword>\r\n    <RootNamespace>lexillatest</RootNamespace>\r\n    <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\r\n    <ConfigurationType>Application</ConfigurationType>\r\n    <UseDebugLibraries>true</UseDebugLibraries>\r\n    <PlatformToolset>v142</PlatformToolset>\r\n    <CharacterSet>Unicode</CharacterSet>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\r\n    <ConfigurationType>Application</ConfigurationType>\r\n    <UseDebugLibraries>false</UseDebugLibraries>\r\n    <PlatformToolset>v142</PlatformToolset>\r\n    <WholeProgramOptimization>true</WholeProgramOptimization>\r\n    <CharacterSet>Unicode</CharacterSet>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"Configuration\">\r\n    <ConfigurationType>Application</ConfigurationType>\r\n    <UseDebugLibraries>true</UseDebugLibraries>\r\n    <PlatformToolset>v142</PlatformToolset>\r\n    <CharacterSet>Unicode</CharacterSet>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"Configuration\">\r\n    <ConfigurationType>Application</ConfigurationType>\r\n    <UseDebugLibraries>false</UseDebugLibraries>\r\n    <PlatformToolset>v142</PlatformToolset>\r\n    <WholeProgramOptimization>true</WholeProgramOptimization>\r\n    <CharacterSet>Unicode</CharacterSet>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\r\n  <ImportGroup Label=\"ExtensionSettings\">\r\n  </ImportGroup>\r\n  <ImportGroup Label=\"Shared\">\r\n  </ImportGroup>\r\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n  </ImportGroup>\r\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n  </ImportGroup>\r\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n  </ImportGroup>\r\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n  </ImportGroup>\r\n  <PropertyGroup Label=\"UserMacros\" />\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n    <LinkIncremental>true</LinkIncremental>\r\n    <CodeAnalysisRuleSet>..\\..\\..\\..\\..\\..\\..\\Users\\Neil\\NeilRules.ruleset</CodeAnalysisRuleSet>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\r\n    <LinkIncremental>true</LinkIncremental>\r\n    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>\r\n    <EnableClangTidyCodeAnalysis>true</EnableClangTidyCodeAnalysis>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n    <LinkIncremental>false</LinkIncremental>\r\n    <CodeAnalysisRuleSet>..\\..\\..\\..\\..\\..\\..\\Users\\Neil\\NeilRules.ruleset</CodeAnalysisRuleSet>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\r\n    <LinkIncremental>false</LinkIncremental>\r\n    <CodeAnalysisRuleSet>..\\..\\..\\..\\..\\..\\..\\Users\\Neil\\NeilRules.ruleset</CodeAnalysisRuleSet>\r\n  </PropertyGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n    <ClCompile>\r\n      <PrecompiledHeader>\r\n      </PrecompiledHeader>\r\n      <WarningLevel>Level4</WarningLevel>\r\n      <Optimization>Disabled</Optimization>\r\n      <SDLCheck>true</SDLCheck>\r\n      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <ConformanceMode>true</ConformanceMode>\r\n      <AdditionalIncludeDirectories>..\\..\\scintilla\\include;..\\include;..\\access;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r\n      <LanguageStandard>stdcpplatest</LanguageStandard>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <GenerateDebugInformation>true</GenerateDebugInformation>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\r\n    <ClCompile>\r\n      <PrecompiledHeader>\r\n      </PrecompiledHeader>\r\n      <WarningLevel>Level4</WarningLevel>\r\n      <Optimization>Disabled</Optimization>\r\n      <SDLCheck>true</SDLCheck>\r\n      <PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <ConformanceMode>true</ConformanceMode>\r\n      <AdditionalIncludeDirectories>..\\..\\scintilla\\include;..\\include;..\\access;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r\n      <LanguageStandard>stdcpplatest</LanguageStandard>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <GenerateDebugInformation>true</GenerateDebugInformation>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n    <ClCompile>\r\n      <PrecompiledHeader>\r\n      </PrecompiledHeader>\r\n      <WarningLevel>Level4</WarningLevel>\r\n      <Optimization>MaxSpeed</Optimization>\r\n      <FunctionLevelLinking>true</FunctionLevelLinking>\r\n      <IntrinsicFunctions>true</IntrinsicFunctions>\r\n      <SDLCheck>true</SDLCheck>\r\n      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <ConformanceMode>true</ConformanceMode>\r\n      <AdditionalIncludeDirectories>..\\..\\scintilla\\include;..\\include;..\\access;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r\n      <LanguageStandard>stdcpplatest</LanguageStandard>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r\n      <OptimizeReferences>true</OptimizeReferences>\r\n      <GenerateDebugInformation>true</GenerateDebugInformation>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\r\n    <ClCompile>\r\n      <PrecompiledHeader>\r\n      </PrecompiledHeader>\r\n      <WarningLevel>Level4</WarningLevel>\r\n      <Optimization>MaxSpeed</Optimization>\r\n      <FunctionLevelLinking>true</FunctionLevelLinking>\r\n      <IntrinsicFunctions>true</IntrinsicFunctions>\r\n      <SDLCheck>true</SDLCheck>\r\n      <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <ConformanceMode>true</ConformanceMode>\r\n      <AdditionalIncludeDirectories>..\\..\\scintilla\\include;..\\include;..\\access;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r\n      <LanguageStandard>stdcpplatest</LanguageStandard>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r\n      <OptimizeReferences>true</OptimizeReferences>\r\n      <GenerateDebugInformation>true</GenerateDebugInformation>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemGroup>\r\n    <ClCompile Include=\"TestLexers.cxx\" />\r\n    <ClCompile Include=\"TestDocument.cxx\" />\r\n    <ClCompile Include=\"..\\access\\LexillaAccess.cxx\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <None Include=\"..\\bin\\Lexilla.dll\" />\r\n  </ItemGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\r\n  <ImportGroup Label=\"ExtensionTargets\">\r\n  </ImportGroup>\r\n</Project>"
  },
  {
    "path": "lexilla/test/examples/asciidoc/AllStyles.adoc",
    "content": "Text=0\n*Strong Emphasis (bold) 1=1*\n**Strong Emphasis (bold) 2=2**\n_Emphasis (italic) 1=3_\n__Emphasis (italic) 2=4__\n= Heading level 1=5\n== Heading level 2=6\n=== Heading level 3=7\n==== Heading level 4=8\n===== Heading level 5=9\n====== Heading level 6=10\n* Unordered list item=11\n. Ordered list item=12\n> Block quote=13\nhttps://14.com[Link=14]\n----\nCode block=15\n----\n++++\nPassthrough block=16\n++++\n// Comment=17\n////\nComment Block=18\n////\n+Literal=19+\n....\nLiteral Block=20\n....\n:Attrib=21: Attrib Value=22\nifdef::Macro=23\nifeval::Macro=23\nifndef::Macro=23\nendif::Macro=23\naudio::Macro=23\ninclude::Macro=23\nimage::Macro=23\nvideo::Macro=23\nasciimath:Macro=23\nbtn:Macro=23\nimage:Macro=23\nkbd:Macro=23\nlatexmath:Macro=23\nlink:Macro=23\nmailto:Macro=23\nmenu:Macro=23\npass:Macro=23\nstem:Macro=23\nxref:Macro=23\nCAUTION:Macro=23\nIMPORTANT:Macro=23\nNOTE:Macro=23\nTIP:Macro=23\nWARNING:Macro=23\n"
  },
  {
    "path": "lexilla/test/examples/asciidoc/AllStyles.adoc.folded",
    "content": " 0 400   0   Text=0\n 0 400   0   *Strong Emphasis (bold) 1=1*\n 0 400   0   **Strong Emphasis (bold) 2=2**\n 0 400   0   _Emphasis (italic) 1=3_\n 0 400   0   __Emphasis (italic) 2=4__\n 0 400   0   = Heading level 1=5\n 0 400   0   == Heading level 2=6\n 0 400   0   === Heading level 3=7\n 0 400   0   ==== Heading level 4=8\n 0 400   0   ===== Heading level 5=9\n 0 400   0   ====== Heading level 6=10\n 0 400   0   * Unordered list item=11\n 0 400   0   . Ordered list item=12\n 0 400   0   > Block quote=13\n 0 400   0   https://14.com[Link=14]\n 0 400   0   ----\n 0 400   0   Code block=15\n 0 400   0   ----\n 0 400   0   ++++\n 0 400   0   Passthrough block=16\n 0 400   0   ++++\n 0 400   0   // Comment=17\n 0 400   0   ////\n 0 400   0   Comment Block=18\n 0 400   0   ////\n 0 400   0   +Literal=19+\n 0 400   0   ....\n 0 400   0   Literal Block=20\n 0 400   0   ....\n 0 400   0   :Attrib=21: Attrib Value=22\n 0 400   0   ifdef::Macro=23\n 0 400   0   ifeval::Macro=23\n 0 400   0   ifndef::Macro=23\n 0 400   0   endif::Macro=23\n 0 400   0   audio::Macro=23\n 0 400   0   include::Macro=23\n 0 400   0   image::Macro=23\n 0 400   0   video::Macro=23\n 0 400   0   asciimath:Macro=23\n 0 400   0   btn:Macro=23\n 0 400   0   image:Macro=23\n 0 400   0   kbd:Macro=23\n 0 400   0   latexmath:Macro=23\n 0 400   0   link:Macro=23\n 0 400   0   mailto:Macro=23\n 0 400   0   menu:Macro=23\n 0 400   0   pass:Macro=23\n 0 400   0   stem:Macro=23\n 0 400   0   xref:Macro=23\n 0 400   0   CAUTION:Macro=23\n 0 400   0   IMPORTANT:Macro=23\n 0 400   0   NOTE:Macro=23\n 0 400   0   TIP:Macro=23\n 0 400   0   WARNING:Macro=23\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/asciidoc/AllStyles.adoc.styled",
    "content": "{0}Text=0\n{1}*Strong Emphasis (bold) 1=1*{0}\n{2}**Strong Emphasis (bold) 2=2**{0}\n{3}_Emphasis (italic) 1=3_{0}\n{4}__Emphasis (italic) 2=4__{0}\n{5}= Heading level 1=5{0}\n{6}== Heading level 2=6{0}\n{7}=== Heading level 3=7{0}\n{8}==== Heading level 4=8{0}\n{9}===== Heading level 5=9{0}\n{10}====== Heading level 6=10{0}\n{11}*{0} Unordered list item=11\n{12}.{0} Ordered list item=12\n{13}> Block quote=13{0}\nhttps://14.com[{14}Link=14{0}]\n{15}----\nCode block=15\n----{0}\n{16}++++\nPassthrough block=16\n++++{0}\n{17}// Comment=17{0}\n{18}////\nComment Block=18\n////{0}\n+{19}Literal=19{0}+\n{20}....\nLiteral Block=20\n....{0}\n{21}:Attrib=21:{22} Attrib Value=22{0}\n{23}ifdef{0}::Macro=23\n{23}ifeval{0}::Macro=23\n{23}ifndef{0}::Macro=23\n{23}endif{0}::Macro=23\n{23}audio{0}::Macro=23\n{23}include{0}::Macro=23\n{23}image{0}::Macro=23\n{23}video{0}::Macro=23\n{23}asciimat{0}h:Macro=23\n{23}btn{0}:Macro=23\n{23}image{0}:Macro=23\n{23}kbd{0}:Macro=23\n{23}latexmath{0}:Macro=23\n{23}link{0}:Macro=23\n{23}mailto{0}:Macro=23\n{23}menu{0}:Macro=23\n{23}pass{0}:Macro=23\n{23}stem{0}:Macro=23\n{23}xref{0}:Macro=23\n{23}CAUTION{0}:Macro=23\n{23}IMPORTANT{0}:Macro=23\n{23}NOTE{0}:Macro=23\n{23}TIP{0}:Macro=23\n{23}WARNING{0}:Macro=23\n"
  },
  {
    "path": "lexilla/test/examples/asciidoc/SciTE.properties",
    "content": "code.page=65001\nlexer.*.adoc=asciidoc\nfold=1\n"
  },
  {
    "path": "lexilla/test/examples/asm/AllStyles.asm",
    "content": "; Enumerate all styles: 0 to 15 except for 11(comment block) which is not yet implemented.\n; This is not a viable source file, it just illustrates the different states in isolation.\n\n; comment=1\n; Comment\n\n; whitespace=0\n\t; w\n\n; number=2\n11\n\n; string=3\n\"String\"\n\n; operator=4\n+\n\n; identifier=5\nidentifier\n\n; CPU instruction=6\nadd\n\n; math Instruction=7\nfadd\n\n; register=8\nECX\n\n; directive=9\nsection\n\n; directive operand=10\nrel\n\n; comment block=11 is for future expansion\n\n; character=12\n'character'\n\n; string EOL=13\n\"no line end\n\n; extended instruction=14\nmovq\n\n; comment directive=15\n comment ~ A multiple-line\n comment directive~\n\n;end\n"
  },
  {
    "path": "lexilla/test/examples/asm/AllStyles.asm.folded",
    "content": " 0 400   0   ; Enumerate all styles: 0 to 15 except for 11(comment block) which is not yet implemented.\n 0 400   0   ; This is not a viable source file, it just illustrates the different states in isolation.\n 0 400   0   \n 0 400   0   ; comment=1\n 0 400   0   ; Comment\n 0 400   0   \n 0 400   0   ; whitespace=0\n 0 400   0   \t; w\n 0 400   0   \n 0 400   0   ; number=2\n 0 400   0   11\n 0 400   0   \n 0 400   0   ; string=3\n 0 400   0   \"String\"\n 0 400   0   \n 0 400   0   ; operator=4\n 0 400   0   +\n 0 400   0   \n 0 400   0   ; identifier=5\n 0 400   0   identifier\n 0 400   0   \n 0 400   0   ; CPU instruction=6\n 0 400   0   add\n 0 400   0   \n 0 400   0   ; math Instruction=7\n 0 400   0   fadd\n 0 400   0   \n 0 400   0   ; register=8\n 0 400   0   ECX\n 0 400   0   \n 0 400   0   ; directive=9\n 0 400   0   section\n 0 400   0   \n 0 400   0   ; directive operand=10\n 0 400   0   rel\n 0 400   0   \n 0 400   0   ; comment block=11 is for future expansion\n 0 400   0   \n 0 400   0   ; character=12\n 0 400   0   'character'\n 0 400   0   \n 0 400   0   ; string EOL=13\n 0 400   0   \"no line end\n 0 400   0   \n 0 400   0   ; extended instruction=14\n 0 400   0   movq\n 0 400   0   \n 0 400   0   ; comment directive=15\n 0 400   0    comment ~ A multiple-line\n 0 400   0    comment directive~\n 0 400   0   \n 0 400   0   ;end\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/asm/AllStyles.asm.styled",
    "content": "{1}; Enumerate all styles: 0 to 15 except for 11(comment block) which is not yet implemented.\n; This is not a viable source file, it just illustrates the different states in isolation.\n{0}\n{1}; comment=1\n; Comment\n{0}\n{1}; whitespace=0\n{0}\t{1}; w\n{0}\n{1}; number=2\n{2}11{0}\n\n{1}; string=3\n{3}\"String\"{0}\n\n{1}; operator=4\n{4}+{0}\n\n{1}; identifier=5\n{5}identifier{0}\n\n{1}; CPU instruction=6\n{6}add{0}\n\n{1}; math Instruction=7\n{7}fadd{0}\n\n{1}; register=8\n{8}ECX{0}\n\n{1}; directive=9\n{9}section{0}\n\n{1}; directive operand=10\n{10}rel{0}\n\n{1}; comment block=11 is for future expansion\n{0}\n{1}; character=12\n{12}'character'{0}\n\n{1}; string EOL=13\n{13}\"no line end\n{0}\n{1}; extended instruction=14\n{14}movq{0}\n\n{1}; comment directive=15\n{0} {9}comment{0} {15}~ A multiple-line\n comment directive~{0}\n\n{1};end\n"
  },
  {
    "path": "lexilla/test/examples/asm/SciTE.properties",
    "content": "lexer.*.asm=asm\n\nkeywords.*.asm=add sub xor mov lea call\nkeywords2.*.asm=fadd\nkeywords3.*.asm=rsp rax rcx rdx r8 r9 ecx\nkeywords4.*.asm=db section alignb resq resqdb global extern equ .bss .text .data start comment\nkeywords5.*.asm=qword rel\nkeywords6.*.asm=movd movq \n\n"
  },
  {
    "path": "lexilla/test/examples/bash/197ArithmeticOperator.bsh",
    "content": "hello=\"hello, \"\nhello+=word\necho $hello\n\nfor ((i = 2; i > 0; i--)); do\n   echo postfix dec $i\ndone\nfor ((i = 2; i > 0; --i)); do\n   echo prefix dec $i\ndone\nfor ((i = 0; i < 2; i++)); do\n   echo postfix inc $i\ndone\nfor ((i = 0; i < 2; ++i)); do\n   echo prefix inc $i\ndone\n\n# issue 215\nfor ((i = 0; i < 2; i++)); do\n  echo $((((1)) << i))\ndone\n"
  },
  {
    "path": "lexilla/test/examples/bash/197ArithmeticOperator.bsh.folded",
    "content": " 0 400   0   hello=\"hello, \"\n 0 400   0   hello+=word\n 0 400   0   echo $hello\n 1 400   0   \n 2 400   0 + for ((i = 2; i > 0; i--)); do\n 0 401   0 |    echo postfix dec $i\n 0 401   0 | done\n 2 400   0 + for ((i = 2; i > 0; --i)); do\n 0 401   0 |    echo prefix dec $i\n 0 401   0 | done\n 2 400   0 + for ((i = 0; i < 2; i++)); do\n 0 401   0 |    echo postfix inc $i\n 0 401   0 | done\n 2 400   0 + for ((i = 0; i < 2; ++i)); do\n 0 401   0 |    echo prefix inc $i\n 0 401   0 | done\n 1 400   0   \n 0 400   0   # issue 215\n 2 400   0 + for ((i = 0; i < 2; i++)); do\n 0 401   0 |   echo $((((1)) << i))\n 0 401   0 | done\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/bash/197ArithmeticOperator.bsh.styled",
    "content": "{8}hello{7}={5}\"hello, \"{0}\n{8}hello{7}+={8}word{0}\n{4}echo{0} {9}$hello{0}\n\n{4}for{0} {7}(({8}i{0} {7}={0} {3}2{7};{0} {8}i{0} {7}>{0} {3}0{7};{0} {8}i{7}--));{0} {4}do{0}\n   {4}echo{0} {8}postfix{0} {8}dec{0} {9}$i{0}\n{4}done{0}\n{4}for{0} {7}(({8}i{0} {7}={0} {3}2{7};{0} {8}i{0} {7}>{0} {3}0{7};{0} {7}--{8}i{7}));{0} {4}do{0}\n   {4}echo{0} {8}prefix{0} {8}dec{0} {9}$i{0}\n{4}done{0}\n{4}for{0} {7}(({8}i{0} {7}={0} {3}0{7};{0} {8}i{0} {7}<{0} {3}2{7};{0} {8}i{7}++));{0} {4}do{0}\n   {4}echo{0} {8}postfix{0} {8}inc{0} {9}$i{0}\n{4}done{0}\n{4}for{0} {7}(({8}i{0} {7}={0} {3}0{7};{0} {8}i{0} {7}<{0} {3}2{7};{0} {7}++{8}i{7}));{0} {4}do{0}\n   {4}echo{0} {8}prefix{0} {8}inc{0} {9}$i{0}\n{4}done{0}\n\n{2}# issue 215{0}\n{4}for{0} {7}(({8}i{0} {7}={0} {3}0{7};{0} {8}i{0} {7}<{0} {3}2{7};{0} {8}i{7}++));{0} {4}do{0}\n  {4}echo{0} {7}$(((({3}1{7})){0} {7}<<{0} {8}i{7})){0}\n{4}done{0}\n"
  },
  {
    "path": "lexilla/test/examples/bash/199Numbers.bsh",
    "content": "# Lexing numeric literals\n\n# From issue #199\n\n# UUIDs\n\nvirsh start 61a6a312-86d3-458c-824a-fa0adc2bd22c\nvirsh start 61969312-86d3-458c-8249-fa0adc2bd22c\nvirsh restore /opt/61a6a312-86d3-458c-824a-fa0adc2bd22c-suspend\n\n# Git items\n\ngit checkout 998d611b516b0e485803089ecd53fdf0ea707a8c\n\ngit log --no-walk 0e2ba9c\ngit log --no-walk rel-5-2-4-97-g7405d4e7\n\n# Arithmetic and character ranges\n\ndeclare -i a=1+1; echo $a\n[[ $a == [0-9] ]] && echo 1\n\n# Brace expansion\n\nfor i in {1..10..2}; do\n\techo $i\ndone\nfor a in {A..Z..2}; do\n\techo $a\ndone\n\n# From Kein-Hong Man\n\n#--------------------------------------------------------------------------\n# Bash number formats\n# (20070712)\n# Octal lexing relaxed to allow hex digits to avoid flagging unnecessary\n# and misleading number errors; radix-prefixed lexing behaviour is unchanged,\n# as those cases are uncommon (to get strict lexing, define PEDANTIC_OCTAL).\n\n# NOTE: Some people may want an entire non-number to be lexed in the normal\n# style and not as part-number part-normal. If the user thinks there is a\n# better case for the former, please lobby for it on the SF issue tracker.\n\n0123 0567\t# octal good\n08 0789 077ABC\t# octal bad (disabled 20070712, now lexed as numbers)\n066XYZ\t\t# octal bad\n0xDEAD 0X1234\t# hex good\n0xABCMNO 0XGHI\t# hex bad\n\n# extended \"[base#]n\" format where base is between 2-64\n# digits range are 0-9a-zA-Z@_\n# if base <= 36, then alphabets are case insensitive\n# this style isn't likely in non-number code, so the lexer currently\n# opts to colour the error in red -- send feedback if this is too\n# intrusive; 'invalid octals' (but valid text) in red proved annoying...\n\n2#10101\t\t# binary\n2#23456\t\t# error (in red)\n8#0123456789AB\t# error (in red)\n16#abcDEF123\n16#abcpqr\t# bad\n64#xyzXYZ@_789\t# full base-64\n99#xyzXYZ@_789\t# error (in red; invalid base)\n111#xyzXYZ@_789\t# error (in red; invalid base)\n\n567+0123*0xBCD\t# with operators\n(4#0123-3#012)\n\n# 20070712:\n# Octal lexing relaxed to avoid marking some number sequences as octal\n# errors. This is because the elements or apps controlled by bash may\n# have a different view of numbers, so we avoid flagging unnecessary\n# (and misleading) number errors. Radix-prefixed number lexing is\n# unchanged, as those cases are uncommon (no feedback on it yet.)\n\n# In the following, red-flagged 'octals' should now be lexed as normal\n# numbers, allowing hex digits.\n\n# flightgear missing.sh\nscriptversion=2004-09-07.08\n\n# git t/t0000/basic.sh\nP=087704a96baf1c2d1c869a8b084481e121c88b5b\n\n# openssh config.guess\n    *:procnto*:*:* | *:QNX:[0123456789]*:*)\n\n# with hex digits, the following will still be an invalid number\n066XYZ\n"
  },
  {
    "path": "lexilla/test/examples/bash/199Numbers.bsh.folded",
    "content": " 0 400   0   # Lexing numeric literals\n 1 400   0   \n 0 400   0   # From issue #199\n 1 400   0   \n 0 400   0   # UUIDs\n 1 400   0   \n 0 400   0   virsh start 61a6a312-86d3-458c-824a-fa0adc2bd22c\n 0 400   0   virsh start 61969312-86d3-458c-8249-fa0adc2bd22c\n 0 400   0   virsh restore /opt/61a6a312-86d3-458c-824a-fa0adc2bd22c-suspend\n 1 400   0   \n 0 400   0   # Git items\n 1 400   0   \n 0 400   0   git checkout 998d611b516b0e485803089ecd53fdf0ea707a8c\n 1 400   0   \n 0 400   0   git log --no-walk 0e2ba9c\n 0 400   0   git log --no-walk rel-5-2-4-97-g7405d4e7\n 1 400   0   \n 0 400   0   # Arithmetic and character ranges\n 1 400   0   \n 0 400   0   declare -i a=1+1; echo $a\n 0 400   0   [[ $a == [0-9] ]] && echo 1\n 1 400   0   \n 0 400   0   # Brace expansion\n 1 400   0   \n 2 400   0 + for i in {1..10..2}; do\n 0 401   0 | \techo $i\n 0 401   0 | done\n 2 400   0 + for a in {A..Z..2}; do\n 0 401   0 | \techo $a\n 0 401   0 | done\n 1 400   0   \n 0 400   0   # From Kein-Hong Man\n 1 400   0   \n 2 400   0 + #--------------------------------------------------------------------------\n 0 401   0 | # Bash number formats\n 0 401   0 | # (20070712)\n 0 401   0 | # Octal lexing relaxed to allow hex digits to avoid flagging unnecessary\n 0 401   0 | # and misleading number errors; radix-prefixed lexing behaviour is unchanged,\n 0 401   0 | # as those cases are uncommon (to get strict lexing, define PEDANTIC_OCTAL).\n 1 400   0   \n 2 400   0 + # NOTE: Some people may want an entire non-number to be lexed in the normal\n 0 401   0 | # style and not as part-number part-normal. If the user thinks there is a\n 0 401   0 | # better case for the former, please lobby for it on the SF issue tracker.\n 1 400   0   \n 0 400   0   0123 0567\t# octal good\n 0 400   0   08 0789 077ABC\t# octal bad (disabled 20070712, now lexed as numbers)\n 0 400   0   066XYZ\t\t# octal bad\n 0 400   0   0xDEAD 0X1234\t# hex good\n 0 400   0   0xABCMNO 0XGHI\t# hex bad\n 1 400   0   \n 2 400   0 + # extended \"[base#]n\" format where base is between 2-64\n 0 401   0 | # digits range are 0-9a-zA-Z@_\n 0 401   0 | # if base <= 36, then alphabets are case insensitive\n 0 401   0 | # this style isn't likely in non-number code, so the lexer currently\n 0 401   0 | # opts to colour the error in red -- send feedback if this is too\n 0 401   0 | # intrusive; 'invalid octals' (but valid text) in red proved annoying...\n 1 400   0   \n 0 400   0   2#10101\t\t# binary\n 0 400   0   2#23456\t\t# error (in red)\n 0 400   0   8#0123456789AB\t# error (in red)\n 0 400   0   16#abcDEF123\n 0 400   0   16#abcpqr\t# bad\n 0 400   0   64#xyzXYZ@_789\t# full base-64\n 0 400   0   99#xyzXYZ@_789\t# error (in red; invalid base)\n 0 400   0   111#xyzXYZ@_789\t# error (in red; invalid base)\n 1 400   0   \n 0 400   0   567+0123*0xBCD\t# with operators\n 0 400   0   (4#0123-3#012)\n 1 400   0   \n 2 400   0 + # 20070712:\n 0 401   0 | # Octal lexing relaxed to avoid marking some number sequences as octal\n 0 401   0 | # errors. This is because the elements or apps controlled by bash may\n 0 401   0 | # have a different view of numbers, so we avoid flagging unnecessary\n 0 401   0 | # (and misleading) number errors. Radix-prefixed number lexing is\n 0 401   0 | # unchanged, as those cases are uncommon (no feedback on it yet.)\n 1 400   0   \n 2 400   0 + # In the following, red-flagged 'octals' should now be lexed as normal\n 0 401   0 | # numbers, allowing hex digits.\n 1 400   0   \n 0 400   0   # flightgear missing.sh\n 0 400   0   scriptversion=2004-09-07.08\n 1 400   0   \n 0 400   0   # git t/t0000/basic.sh\n 0 400   0   P=087704a96baf1c2d1c869a8b084481e121c88b5b\n 1 400   0   \n 0 400   0   # openssh config.guess\n 0 400   0       *:procnto*:*:* | *:QNX:[0123456789]*:*)\n 1 400   0   \n 0 400   0   # with hex digits, the following will still be an invalid number\n 0 400   0   066XYZ\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/bash/199Numbers.bsh.styled",
    "content": "{2}# Lexing numeric literals{0}\n\n{2}# From issue #199{0}\n\n{2}# UUIDs{0}\n\n{8}virsh{0} {8}start{0} {8}61a6a312-86d3-458c-824a-fa0adc2bd22c{0}\n{8}virsh{0} {8}start{0} {8}61969312-86d3-458c-8249-fa0adc2bd22c{0}\n{8}virsh{0} {8}restore{0} {7}/{8}opt{7}/{8}61a6a312-86d3-458c-824a-fa0adc2bd22c-suspend{0}\n\n{2}# Git items{0}\n\n{8}git{0} {8}checkout{0} {8}998d611b516b0e485803089ecd53fdf0ea707a8c{0}\n\n{8}git{0} {8}log{0} {8}--no-walk{0} {8}0e2ba9c{0}\n{8}git{0} {8}log{0} {8}--no-walk{0} {8}rel-5-2-4-97-g7405d4e7{0}\n\n{2}# Arithmetic and character ranges{0}\n\n{8}declare{0} {8}-i{0} {8}a{7}={3}1{7}+{3}1{7};{0} {4}echo{0} {9}$a{0}\n{7}[[{0} {9}$a{0} {7}=={0} {7}[{8}0-9{7}]{0} {7}]]{0} {7}&&{0} {4}echo{0} {3}1{0}\n\n{2}# Brace expansion{0}\n\n{4}for{0} {8}i{0} {4}in{0} {7}{{3}1{7}..{3}10{7}..{3}2{7}};{0} {4}do{0}\n\t{4}echo{0} {9}$i{0}\n{4}done{0}\n{4}for{0} {8}a{0} {4}in{0} {7}{{8}A{7}..{8}Z{7}..{3}2{7}};{0} {4}do{0}\n\t{4}echo{0} {9}$a{0}\n{4}done{0}\n\n{2}# From Kein-Hong Man{0}\n\n{2}#--------------------------------------------------------------------------{0}\n{2}# Bash number formats{0}\n{2}# (20070712){0}\n{2}# Octal lexing relaxed to allow hex digits to avoid flagging unnecessary{0}\n{2}# and misleading number errors; radix-prefixed lexing behaviour is unchanged,{0}\n{2}# as those cases are uncommon (to get strict lexing, define PEDANTIC_OCTAL).{0}\n\n{2}# NOTE: Some people may want an entire non-number to be lexed in the normal{0}\n{2}# style and not as part-number part-normal. If the user thinks there is a{0}\n{2}# better case for the former, please lobby for it on the SF issue tracker.{0}\n\n{3}0123{0} {3}0567{0}\t{2}# octal good{0}\n{3}08{0} {3}0789{0} {8}077ABC{0}\t{2}# octal bad (disabled 20070712, now lexed as numbers){0}\n{8}066XYZ{0}\t\t{2}# octal bad{0}\n{3}0xDEAD{0} {3}0X1234{0}\t{2}# hex good{0}\n{8}0xABCMNO{0} {8}0XGHI{0}\t{2}# hex bad{0}\n\n{2}# extended \"[base#]n\" format where base is between 2-64{0}\n{2}# digits range are 0-9a-zA-Z@_{0}\n{2}# if base <= 36, then alphabets are case insensitive{0}\n{2}# this style isn't likely in non-number code, so the lexer currently{0}\n{2}# opts to colour the error in red -- send feedback if this is too{0}\n{2}# intrusive; 'invalid octals' (but valid text) in red proved annoying...{0}\n\n{3}2#10101{0}\t\t{2}# binary{0}\n{1}2#23456{0}\t\t{2}# error (in red){0}\n{1}8#0123456789{8}AB{0}\t{2}# error (in red){0}\n{3}16#abcDEF123{0}\n{8}16#abcpqr{0}\t{2}# bad{0}\n{3}64#xyzXYZ@_789{0}\t{2}# full base-64{0}\n{1}99{8}#xyzXYZ{7}@{8}_789{0}\t{2}# error (in red; invalid base){0}\n{1}111{8}#xyzXYZ{7}@{8}_789{0}\t{2}# error (in red; invalid base){0}\n\n{3}567{7}+{3}0123{7}*{3}0xBCD{0}\t{2}# with operators{0}\n{8}(4#0123-3#012){0}\n\n{2}# 20070712:{0}\n{2}# Octal lexing relaxed to avoid marking some number sequences as octal{0}\n{2}# errors. This is because the elements or apps controlled by bash may{0}\n{2}# have a different view of numbers, so we avoid flagging unnecessary{0}\n{2}# (and misleading) number errors. Radix-prefixed number lexing is{0}\n{2}# unchanged, as those cases are uncommon (no feedback on it yet.){0}\n\n{2}# In the following, red-flagged 'octals' should now be lexed as normal{0}\n{2}# numbers, allowing hex digits.{0}\n\n{2}# flightgear missing.sh{0}\n{8}scriptversion{7}={8}2004-09-07.08{0}\n\n{2}# git t/t0000/basic.sh{0}\n{8}P{7}={8}087704a96baf1c2d1c869a8b084481e121c88b5b{0}\n\n{2}# openssh config.guess{0}\n    {7}*:{8}procnto{7}*:*:*{0} {7}|{0} {7}*:{8}QNX{7}:[{3}0123456789{7}]*:*){0}\n\n{2}# with hex digits, the following will still be an invalid number{0}\n{8}066XYZ{0}\n"
  },
  {
    "path": "lexilla/test/examples/bash/202LineStartOption.bsh",
    "content": "-a\n#\n-b\n#\n\ndeclare -A optionSet=([--help]=0)\nfor option in {-h,--help,--version,--verbose,-,--}; do\ncase $option in\n\t-h|--help)\n\t\toptionSet[--help]=1\n\t\techo help: $option\n\t\t;;\n\t-*-version)\n\t\techo version: $option\n\t\t;;\n\t--)\n\t\techo stop\n\t\t;;\n\t-)\n\t\techo stdin\n\t\t;;\n\t-*[-a-zA-Z0-9])\n\t\techo other: $option\n\t\t;;\nesac\ndone\n\noption=--help\n[[ $option == *-h* ]] && echo $option=${optionSet[$option]}\n\nfor gcc in gcc{,-1{4..0..-1}}; do\n\techo $gcc\ndone\n\nfor gcc in gcc{,{-14..-10}}; do\n\techo $gcc\ndone\n\n# Tilde-refix ~\n~+/foo\n~-/foo\n"
  },
  {
    "path": "lexilla/test/examples/bash/202LineStartOption.bsh.folded",
    "content": " 0 400   0   -a\n 0 400   0   #\n 0 400   0   -b\n 0 400   0   #\n 1 400   0   \n 0 400   0   declare -A optionSet=([--help]=0)\n 2 400   0 + for option in {-h,--help,--version,--verbose,-,--}; do\n 2 401   0 + case $option in\n 0 402   0 | \t-h|--help)\n 0 402   0 | \t\toptionSet[--help]=1\n 0 402   0 | \t\techo help: $option\n 0 402   0 | \t\t;;\n 0 402   0 | \t-*-version)\n 0 402   0 | \t\techo version: $option\n 0 402   0 | \t\t;;\n 0 402   0 | \t--)\n 0 402   0 | \t\techo stop\n 0 402   0 | \t\t;;\n 0 402   0 | \t-)\n 0 402   0 | \t\techo stdin\n 0 402   0 | \t\t;;\n 0 402   0 | \t-*[-a-zA-Z0-9])\n 0 402   0 | \t\techo other: $option\n 0 402   0 | \t\t;;\n 0 402   0 | esac\n 0 401   0 | done\n 1 400   0   \n 0 400   0   option=--help\n 0 400   0   [[ $option == *-h* ]] && echo $option=${optionSet[$option]}\n 1 400   0   \n 2 400   0 + for gcc in gcc{,-1{4..0..-1}}; do\n 0 401   0 | \techo $gcc\n 0 401   0 | done\n 1 400   0   \n 2 400   0 + for gcc in gcc{,{-14..-10}}; do\n 0 401   0 | \techo $gcc\n 0 401   0 | done\n 1 400   0   \n 0 400   0   # Tilde-refix ~\n 0 400   0   ~+/foo\n 0 400   0   ~-/foo\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/bash/202LineStartOption.bsh.styled",
    "content": "{8}-a{0}\n{2}#{0}\n{8}-b{0}\n{2}#{0}\n\n{8}declare{0} {8}-A{0} {8}optionSet{7}=([{8}--help{7}]={3}0{7}){0}\n{4}for{0} {8}option{0} {4}in{0} {7}{{8}-h{7},{8}--help{7},{8}--version{7},{8}--verbose{7},{8}-{7},{8}--{7}};{0} {4}do{0}\n{4}case{0} {9}$option{0} {4}in{0}\n\t{8}-h{7}|{8}--help{7}){0}\n\t\t{8}optionSet{7}[{8}--help{7}]={3}1{0}\n\t\t{4}echo{0} {8}help{7}:{0} {9}$option{0}\n\t\t{7};;{0}\n\t{8}-{7}*{8}-version{7}){0}\n\t\t{4}echo{0} {8}version{7}:{0} {9}$option{0}\n\t\t{7};;{0}\n\t{8}--{7}){0}\n\t\t{4}echo{0} {8}stop{0}\n\t\t{7};;{0}\n\t{8}-{7}){0}\n\t\t{4}echo{0} {8}stdin{0}\n\t\t{7};;{0}\n\t{8}-{7}*[{8}-a-zA-Z0-9{7}]){0}\n\t\t{4}echo{0} {8}other{7}:{0} {9}$option{0}\n\t\t{7};;{0}\n{4}esac{0}\n{4}done{0}\n\n{8}option{7}={8}--help{0}\n{7}[[{0} {9}$option{0} {7}=={0} {7}*{8}-h{7}*{0} {7}]]{0} {7}&&{0} {4}echo{0} {9}$option{7}={10}${optionSet[$option]}{0}\n\n{4}for{0} {8}gcc{0} {4}in{0} {8}gcc{7}{,-{3}1{7}{{3}4{7}..{3}0{7}..-{3}1{7}}};{0} {4}do{0}\n\t{4}echo{0} {9}$gcc{0}\n{4}done{0}\n\n{4}for{0} {8}gcc{0} {4}in{0} {8}gcc{7}{,{-{3}14{7}..-{3}10{7}}};{0} {4}do{0}\n\t{4}echo{0} {9}$gcc{0}\n{4}done{0}\n\n{2}# Tilde-refix ~{0}\n{7}~+/{8}foo{0}\n{7}~-/{8}foo{0}\n"
  },
  {
    "path": "lexilla/test/examples/bash/203TestOption.bsh",
    "content": "[[ $1 == -e* ]] && echo e\n\nif [[ -d /usr/bin &&\n\t-e /usr/bin/bash ]]; then\n\techo find bash\nfi\n\nif [[ -d /usr/bin &&\t-e /usr/bin/bash ]]; then\n\techo find bash\nfi\n\nif [ -d /usr/bin && -e /usr/bin/bash ]; then\n\techo find bash\nfi\n\nif [ -d /usr/bin &&\n\t-e /usr/bin/bash ]; then\n\techo find bash\nfi\n\nif [ -d /usr/bin && \\\n\t-e /usr/bin/bash ]; then\n\techo find bash\nfi\n"
  },
  {
    "path": "lexilla/test/examples/bash/203TestOption.bsh.folded",
    "content": " 0 400   0   [[ $1 == -e* ]] && echo e\n 1 400   0   \n 2 400   0 + if [[ -d /usr/bin &&\n 0 401   0 | \t-e /usr/bin/bash ]]; then\n 0 401   0 | \techo find bash\n 0 401   0 | fi\n 1 400   0   \n 2 400   0 + if [[ -d /usr/bin &&\t-e /usr/bin/bash ]]; then\n 0 401   0 | \techo find bash\n 0 401   0 | fi\n 1 400   0   \n 2 400   0 + if [ -d /usr/bin && -e /usr/bin/bash ]; then\n 0 401   0 | \techo find bash\n 0 401   0 | fi\n 1 400   0   \n 2 400   0 + if [ -d /usr/bin &&\n 0 401   0 | \t-e /usr/bin/bash ]; then\n 0 401   0 | \techo find bash\n 0 401   0 | fi\n 1 400   0   \n 2 400   0 + if [ -d /usr/bin && \\\n 0 401   0 | \t-e /usr/bin/bash ]; then\n 0 401   0 | \techo find bash\n 0 401   0 | fi\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/bash/203TestOption.bsh.styled",
    "content": "{7}[[{0} {9}$1{0} {7}=={0} {8}-e{7}*{0} {7}]]{0} {7}&&{0} {4}echo{0} {8}e{0}\n\n{4}if{0} {7}[[{0} {4}-d{0} {7}/{8}usr{7}/{8}bin{0} {7}&&{0}\n\t{4}-e{0} {7}/{8}usr{7}/{8}bin{7}/{8}bash{0} {7}]];{0} {4}then{0}\n\t{4}echo{0} {8}find{0} {8}bash{0}\n{4}fi{0}\n\n{4}if{0} {7}[[{0} {4}-d{0} {7}/{8}usr{7}/{8}bin{0} {7}&&{0}\t{4}-e{0} {7}/{8}usr{7}/{8}bin{7}/{8}bash{0} {7}]];{0} {4}then{0}\n\t{4}echo{0} {8}find{0} {8}bash{0}\n{4}fi{0}\n\n{4}if{0} {7}[{0} {4}-d{0} {7}/{8}usr{7}/{8}bin{0} {7}&&{0} {8}-e{0} {7}/{8}usr{7}/{8}bin{7}/{8}bash{0} {7}];{0} {4}then{0}\n\t{4}echo{0} {8}find{0} {8}bash{0}\n{4}fi{0}\n\n{4}if{0} {7}[{0} {4}-d{0} {7}/{8}usr{7}/{8}bin{0} {7}&&{0}\n\t{8}-e{0} {7}/{8}usr{7}/{8}bin{7}/{8}bash{0} {7}];{0} {4}then{0}\n\t{4}echo{0} {8}find{0} {8}bash{0}\n{4}fi{0}\n\n{4}if{0} {7}[{0} {4}-d{0} {7}/{8}usr{7}/{8}bin{0} {7}&&{0} {7}\\{0}\n\t{8}-e{0} {7}/{8}usr{7}/{8}bin{7}/{8}bash{0} {7}];{0} {4}then{0}\n\t{4}echo{0} {8}find{0} {8}bash{0}\n{4}fi{0}\n"
  },
  {
    "path": "lexilla/test/examples/bash/AllStyles.bsh",
    "content": "# Enumerate all styles: 0 to 13\n\n# comment=2\n\n# whitespace=0\n\t# w\n\n# error=1\n0#0000\n\n# number=3\n123\n\n# keyword=4\nset\n\n# double-quoted-string=5\n\"string\"\n\n# single-quoted-string=6\n'str'\n\n# operator=7\n+\n\n# identifier=8\nidentifier\n\n# scalar=9\n$scalar\n$?Status\n\n# parameter-expansion=10\n${parameter}\n\n# back-ticks=11\n`ls`\n\n# here-doc-delimiter=12, here-doc=13\n<<EOF\n  Here-doc.\nEOF\n\n# other quoted types are mapped to current classes\n\n# double-quoted-string=5\n$\"string\"\n$'str'\n\n# back-ticks=11\n`ls`\n$`ls`\n$(ls)\n\n# Use substyles\n\n# Substyled identifier=128\nmap\n\n# Substyled scalar=129\n$CWD\n"
  },
  {
    "path": "lexilla/test/examples/bash/AllStyles.bsh.folded",
    "content": " 0 400   0   # Enumerate all styles: 0 to 13\n 1 400   0   \n 0 400   0   # comment=2\n 1 400   0   \n 2 400   0 + # whitespace=0\n 0 401   0 | \t# w\n 1 400   0   \n 0 400   0   # error=1\n 0 400   0   0#0000\n 1 400   0   \n 0 400   0   # number=3\n 0 400   0   123\n 1 400   0   \n 0 400   0   # keyword=4\n 0 400   0   set\n 1 400   0   \n 0 400   0   # double-quoted-string=5\n 0 400   0   \"string\"\n 1 400   0   \n 0 400   0   # single-quoted-string=6\n 0 400   0   'str'\n 1 400   0   \n 0 400   0   # operator=7\n 0 400   0   +\n 1 400   0   \n 0 400   0   # identifier=8\n 0 400   0   identifier\n 1 400   0   \n 0 400   0   # scalar=9\n 0 400   0   $scalar\n 0 400   0   $?Status\n 1 400   0   \n 0 400   0   # parameter-expansion=10\n 0 400   0   ${parameter}\n 1 400   0   \n 0 400   0   # back-ticks=11\n 0 400   0   `ls`\n 1 400   0   \n 0 400   0   # here-doc-delimiter=12, here-doc=13\n 2 400   0 + <<EOF\n 0 401   0 |   Here-doc.\n 0 401   0 | EOF\n 1 400   0   \n 0 400   0   # other quoted types are mapped to current classes\n 1 400   0   \n 0 400   0   # double-quoted-string=5\n 0 400   0   $\"string\"\n 0 400   0   $'str'\n 1 400   0   \n 0 400   0   # back-ticks=11\n 0 400   0   `ls`\n 0 400   0   $`ls`\n 0 400   0   $(ls)\n 1 400   0   \n 0 400   0   # Use substyles\n 1 400   0   \n 0 400   0   # Substyled identifier=128\n 0 400   0   map\n 1 400   0   \n 0 400   0   # Substyled scalar=129\n 0 400   0   $CWD\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/bash/AllStyles.bsh.styled",
    "content": "{2}# Enumerate all styles: 0 to 13{0}\n\n{2}# comment=2{0}\n\n{2}# whitespace=0{0}\n\t{2}# w{0}\n\n{2}# error=1{0}\n{1}0#0000{0}\n\n{2}# number=3{0}\n{3}123{0}\n\n{2}# keyword=4{0}\n{4}set{0}\n\n{2}# double-quoted-string=5{0}\n{5}\"string\"{0}\n\n{2}# single-quoted-string=6{0}\n{6}'str'{0}\n\n{2}# operator=7{0}\n{7}+{0}\n\n{2}# identifier=8{0}\n{8}identifier{0}\n\n{2}# scalar=9{0}\n{9}$scalar{0}\n{9}$?{8}Status{0}\n\n{2}# parameter-expansion=10{0}\n{10}${parameter}{0}\n\n{2}# back-ticks=11{0}\n{11}`ls`{0}\n\n{2}# here-doc-delimiter=12, here-doc=13{0}\n{12}<<EOF{13}\n  Here-doc.\n{12}EOF{0}\n\n{2}# other quoted types are mapped to current classes{0}\n\n{2}# double-quoted-string=5{0}\n{5}$\"string\"{0}\n{5}$'str'{0}\n\n{2}# back-ticks=11{0}\n{11}`ls`{0}\n${11}`ls`{0}\n{11}$(ls){0}\n\n{2}# Use substyles{0}\n\n{2}# Substyled identifier=128{0}\n{128}map{0}\n\n{2}# Substyled scalar=129{0}\n{129}$CWD{0}\n"
  },
  {
    "path": "lexilla/test/examples/bash/Issue180.bsh",
    "content": "echo '$'\necho \"$\"\necho \"$\"\necho \"$\"x\"\"\necho x$'\\t'y\necho \"x$'\\t'y\"\necho \"x\\ty\"\n"
  },
  {
    "path": "lexilla/test/examples/bash/Issue180.bsh.folded",
    "content": " 0 400   0   echo '$'\n 0 400   0   echo \"$\"\n 0 400   0   echo \"$\"\n 0 400   0   echo \"$\"x\"\"\n 0 400   0   echo x$'\\t'y\n 0 400   0   echo \"x$'\\t'y\"\n 0 400   0   echo \"x\\ty\"\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/bash/Issue180.bsh.styled",
    "content": "{4}echo{0} {6}'$'{0}\n{4}echo{0} {5}\"$\"{0}\n{4}echo{0} {5}\"$\"{0}\n{4}echo{0} {5}\"$\"{8}x{5}\"\"{0}\n{4}echo{0} {8}x{5}$'\\t'{8}y{0}\n{4}echo{0} {5}\"x$'\\t'y\"{0}\n{4}echo{0} {5}\"x\\ty\"{0}\n"
  },
  {
    "path": "lexilla/test/examples/bash/Issue182.bsh",
    "content": "if [ -n \"$eth\" -o -n \"$wlan\" ]; then\nfi\n\ntest $((1 + 1)) -eq 2 && echo yes\n[ $((1 + 1)) -eq 2 ] && echo yes\n\nls -a --directory\n"
  },
  {
    "path": "lexilla/test/examples/bash/Issue182.bsh.folded",
    "content": " 2 400   0 + if [ -n \"$eth\" -o -n \"$wlan\" ]; then\n 0 401   0 | fi\n 1 400   0   \n 0 400   0   test $((1 + 1)) -eq 2 && echo yes\n 0 400   0   [ $((1 + 1)) -eq 2 ] && echo yes\n 1 400   0   \n 0 400   0   ls -a --directory\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/bash/Issue182.bsh.styled",
    "content": "{4}if{0} {7}[{0} {4}-n{0} {5}\"{9}$eth{5}\"{0} {4}-o{0} {4}-n{0} {5}\"{9}$wlan{5}\"{0} {7}];{0} {4}then{0}\n{4}fi{0}\n\n{4}test{0} {7}$(({3}1{0} {7}+{0} {3}1{7})){0} {4}-eq{0} {3}2{0} {7}&&{0} {4}echo{0} {8}yes{0}\n{7}[{0} {7}$(({3}1{0} {7}+{0} {3}1{7})){0} {4}-eq{0} {3}2{0} {7}]{0} {7}&&{0} {4}echo{0} {8}yes{0}\n\n{8}ls{0} {8}-a{0} {8}--directory{0}\n"
  },
  {
    "path": "lexilla/test/examples/bash/Issue184.bsh",
    "content": "echo $*\necho $@\necho $?\necho $-\necho $$\necho $!\necho $_\necho $%\necho $<\n\nifeth=$(ls /sys/class/net | grep ^\"$intf\" | grep \"$intf\"$)\n"
  },
  {
    "path": "lexilla/test/examples/bash/Issue184.bsh.folded",
    "content": " 0 400   0   echo $*\n 0 400   0   echo $@\n 0 400   0   echo $?\n 0 400   0   echo $-\n 0 400   0   echo $$\n 0 400   0   echo $!\n 0 400   0   echo $_\n 0 400   0   echo $%\n 0 400   0   echo $<\n 1 400   0   \n 0 400   0   ifeth=$(ls /sys/class/net | grep ^\"$intf\" | grep \"$intf\"$)\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/bash/Issue184.bsh.styled",
    "content": "{4}echo{0} {9}$*{0}\n{4}echo{0} {9}$@{0}\n{4}echo{0} {9}$?{0}\n{4}echo{0} {9}$-{0}\n{4}echo{0} {9}$${0}\n{4}echo{0} {9}$!{0}\n{4}echo{0} {9}$_{0}\n{4}echo{0} ${7}%{0}\n{4}echo{0} ${7}<{0}\n\n{8}ifeth{7}=$({8}ls{0} {7}/{8}sys{7}/{8}class{7}/{8}net{0} {7}|{0} {8}grep{0} {7}^{5}\"{9}$intf{5}\"{0} {7}|{0} {8}grep{0} {5}\"{9}$intf{5}\"{0}${7}){0}\n"
  },
  {
    "path": "lexilla/test/examples/bash/Issue184Copy.bsh",
    "content": "echo $*\necho $@\necho $?\necho $-\necho $$\necho $!\necho $_\necho $%\necho $<\n\nifeth=$(ls /sys/class/net | grep ^\"$intf\" | grep \"$intf\"$)\n"
  },
  {
    "path": "lexilla/test/examples/bash/Issue184Copy.bsh.folded",
    "content": " 0 400   0   echo $*\n 0 400   0   echo $@\n 0 400   0   echo $?\n 0 400   0   echo $-\n 0 400   0   echo $$\n 0 400   0   echo $!\n 0 400   0   echo $_\n 0 400   0   echo $%\n 0 400   0   echo $<\n 1 400   0   \n 0 400   0   ifeth=$(ls /sys/class/net | grep ^\"$intf\" | grep \"$intf\"$)\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/bash/Issue184Copy.bsh.styled",
    "content": "{4}echo{0} {9}$*{0}\n{4}echo{0} {9}$@{0}\n{4}echo{0} {9}$?{0}\n{4}echo{0} {9}$-{0}\n{4}echo{0} {9}$${0}\n{4}echo{0} {9}$!{0}\n{4}echo{0} {9}$_{0}\n{4}echo{0} {9}$%{0}\n{4}echo{0} {9}$<{0}\n\n{8}ifeth{7}=$({8}ls{0} {7}/{8}sys{7}/{8}class{7}/{8}net{0} {7}|{0} {8}grep{0} {7}^{5}\"{9}$intf{5}\"{0} {7}|{0} {8}grep{0} {5}\"{9}$intf{5}\"{0}${7}){0}\n"
  },
  {
    "path": "lexilla/test/examples/bash/Nested.bsh",
    "content": "# Nested elements and other complex cases\n\n# String with backtick inclusion\n\"x`ls`\"\n# Nested string\n\"x`ls \"*.c\"`\"\n# Not terminated at first \"\n\"x`ls\" # \"`\" #\n\n# String with command inclusion\n\"x$(ls)\"\n\n# Nested command\n$(ls -la$(ls *.c))\n\n# Check strings and backticks in command\necho $('ls' \".\" `ls` $'.' $\".\")\n\n# $( not terminated by ) if contains unterminated string\n$('x) # ') #\n$(\"x) # \") #\n$(`x) # `) # Bash doesn't like this\n$($'x) # ') #\n$($\"x) # \") #\n\n# Parameter expansion\nvar=abcdef\nsub=abc\nrep='& '\necho ${var/$sub/\"${rep}}\"} #\n# issue 216\noption=\"no[foo]\"\noption=${option%%[<{().[]*}\necho $option\n\n# '$' in variable\necho $$PID\necho $var${var}\n\n# Here-doc with internal elements\ncat <<EOF\n\t$scalar\n\t${var}\n\t$((1+2))\n\t$(pwd)\n\t`pwd`\nEOF\n\n# Quoted delimiter treats here-doc as simple string\ncat <<\"EOF\"\n\t$scalar\n\t${var}\n\t$((1+2))\n\t$(pwd)\n\t`pwd`\nEOF\n\n# Escaped same as quoted\ncat <<\\EOF\n\t$scalar\nEOF\n\n# Nesting\necho \"$((1 + 2))\" #\necho \"$[1 + 2]\" #\n\n# Multiple nesting levels\n$(ls -la$(ls $(c) $'*.c' ` $(${s})`))\n\n# Multi-line\n$(ls |\nmore)\n\n$(\n`x`\n\"x\"\n`ls`\n$'x'\n$\"x\"\n)\n#end -- checks termination of previous\n"
  },
  {
    "path": "lexilla/test/examples/bash/Nested.bsh.folded",
    "content": " 0 400   0   # Nested elements and other complex cases\n 1 400   0   \n 0 400   0   # String with backtick inclusion\n 0 400   0   \"x`ls`\"\n 0 400   0   # Nested string\n 0 400   0   \"x`ls \"*.c\"`\"\n 0 400   0   # Not terminated at first \"\n 0 400   0   \"x`ls\" # \"`\" #\n 1 400   0   \n 0 400   0   # String with command inclusion\n 0 400   0   \"x$(ls)\"\n 1 400   0   \n 0 400   0   # Nested command\n 0 400   0   $(ls -la$(ls *.c))\n 1 400   0   \n 0 400   0   # Check strings and backticks in command\n 0 400   0   echo $('ls' \".\" `ls` $'.' $\".\")\n 1 400   0   \n 0 400   0   # $( not terminated by ) if contains unterminated string\n 0 400   0   $('x) # ') #\n 0 400   0   $(\"x) # \") #\n 0 400   0   $(`x) # `) # Bash doesn't like this\n 0 400   0   $($'x) # ') #\n 0 400   0   $($\"x) # \") #\n 1 400   0   \n 0 400   0   # Parameter expansion\n 0 400   0   var=abcdef\n 0 400   0   sub=abc\n 0 400   0   rep='& '\n 0 400   0   echo ${var/$sub/\"${rep}}\"} #\n 0 400   0   # issue 216\n 0 400   0   option=\"no[foo]\"\n 0 400   0   option=${option%%[<{().[]*}\n 0 400   0   echo $option\n 1 400   0   \n 0 400   0   # '$' in variable\n 0 400   0   echo $$PID\n 0 400   0   echo $var${var}\n 1 400   0   \n 0 400   0   # Here-doc with internal elements\n 2 400   0 + cat <<EOF\n 0 401   0 | \t$scalar\n 0 401   0 | \t${var}\n 0 401   0 | \t$((1+2))\n 0 401   0 | \t$(pwd)\n 0 401   0 | \t`pwd`\n 0 401   0 | EOF\n 1 400   0   \n 0 400   0   # Quoted delimiter treats here-doc as simple string\n 2 400   0 + cat <<\"EOF\"\n 0 401   0 | \t$scalar\n 0 401   0 | \t${var}\n 0 401   0 | \t$((1+2))\n 0 401   0 | \t$(pwd)\n 0 401   0 | \t`pwd`\n 0 401   0 | EOF\n 1 400   0   \n 0 400   0   # Escaped same as quoted\n 2 400   0 + cat <<\\EOF\n 0 401   0 | \t$scalar\n 0 401   0 | EOF\n 1 400   0   \n 0 400   0   # Nesting\n 0 400   0   echo \"$((1 + 2))\" #\n 0 400   0   echo \"$[1 + 2]\" #\n 1 400   0   \n 0 400   0   # Multiple nesting levels\n 0 400   0   $(ls -la$(ls $(c) $'*.c' ` $(${s})`))\n 1 400   0   \n 0 400   0   # Multi-line\n 0 400   0   $(ls |\n 0 400   0   more)\n 1 400   0   \n 0 400   0   $(\n 0 400   0   `x`\n 0 400   0   \"x\"\n 0 400   0   `ls`\n 0 400   0   $'x'\n 0 400   0   $\"x\"\n 0 400   0   )\n 0 400   0   #end -- checks termination of previous\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/bash/Nested.bsh.styled",
    "content": "{2}# Nested elements and other complex cases{0}\n\n{2}# String with backtick inclusion{0}\n{5}\"x`ls`\"{0}\n{2}# Nested string{0}\n{5}\"x`ls \"*.c\"`\"{0}\n{2}# Not terminated at first \"{0}\n{5}\"x`ls\" # \"`\"{0} {2}#{0}\n\n{2}# String with command inclusion{0}\n{5}\"x$(ls)\"{0}\n\n{2}# Nested command{0}\n{11}$(ls -la$(ls *.c)){0}\n\n{2}# Check strings and backticks in command{0}\n{4}echo{0} {11}$('ls' \".\" `ls` $'.' $\".\"){0}\n\n{2}# $( not terminated by ) if contains unterminated string{0}\n{11}$('x) # '){0} {2}#{0}\n{11}$(\"x) # \"){0} {2}#{0}\n{11}$(`x) # `){0} {2}# Bash doesn't like this{0}\n{11}$($'x) # '){0} {2}#{0}\n{11}$($\"x) # \"){0} {2}#{0}\n\n{2}# Parameter expansion{0}\n{8}var{7}={8}abcdef{0}\n{8}sub{7}={8}abc{0}\n{8}rep{7}={6}'& '{0}\n{4}echo{0} {10}${var/$sub/\"${rep}}\"}{0} {2}#{0}\n{2}# issue 216{0}\n{8}option{7}={5}\"no[foo]\"{0}\n{8}option{7}={10}${option%%[<{().[]*}{0}\n{4}echo{0} {9}$option{0}\n\n{2}# '$' in variable{0}\n{4}echo{0} {9}$${8}PID{0}\n{4}echo{0} {9}$var{10}${var}{0}\n\n{2}# Here-doc with internal elements{0}\n{4}cat{0} {12}<<EOF{13}\n\t$scalar\n\t${var}\n\t$((1+2))\n\t$(pwd)\n\t`pwd`\n{12}EOF{0}\n\n{2}# Quoted delimiter treats here-doc as simple string{0}\n{4}cat{0} {12}<<\"EOF\"{13}\n\t$scalar\n\t${var}\n\t$((1+2))\n\t$(pwd)\n\t`pwd`\n{12}EOF{0}\n\n{2}# Escaped same as quoted{0}\n{4}cat{0} {12}<<\\EOF{13}\n\t$scalar\n{12}EOF{0}\n\n{2}# Nesting{0}\n{4}echo{0} {5}\"$((1 + 2))\"{0} {2}#{0}\n{4}echo{0} {5}\"$[1 + 2]\"{0} {2}#{0}\n\n{2}# Multiple nesting levels{0}\n{11}$(ls -la$(ls $(c) $'*.c' ` $(${s})`)){0}\n\n{2}# Multi-line{0}\n{11}$(ls |\nmore){0}\n\n{11}$(\n`x`\n\"x\"\n`ls`\n$'x'\n$\"x\"\n){0}\n{2}#end -- checks termination of previous{0}\n"
  },
  {
    "path": "lexilla/test/examples/bash/NestedRich.bsh",
    "content": "# Use lexer.bash.command.substitution=2 to style command substitution\n# so that both the scope of the command and the internal structure are visible.\n\n# Nested command\n$(ls -la$(ls *.c))\n\n# Check strings and backticks in command\necho $('ls' \".\" `ls` $'.' $\".\")\n\nPROJECT_DIR=$(rlwrap -S \"Enter source path: \" -e '' -i -o cat)\n\n# Multiple nesting levels\n$(ls -la$(ls $(c) $'*.c' ` $(${s})`))\n\n# Multi-line\n$(ls |\nmore)\n\n$(\n`x`\n\"x\"\n`ls`\n$'x'\n$\"x\"\n)\n#end -- checks termination of previous\n"
  },
  {
    "path": "lexilla/test/examples/bash/NestedRich.bsh.folded",
    "content": " 2 400   0 + # Use lexer.bash.command.substitution=2 to style command substitution\n 0 401   0 | # so that both the scope of the command and the internal structure are visible.\n 1 400   0   \n 0 400   0   # Nested command\n 0 400   0   $(ls -la$(ls *.c))\n 1 400   0   \n 0 400   0   # Check strings and backticks in command\n 0 400   0   echo $('ls' \".\" `ls` $'.' $\".\")\n 1 400   0   \n 0 400   0   PROJECT_DIR=$(rlwrap -S \"Enter source path: \" -e '' -i -o cat)\n 1 400   0   \n 0 400   0   # Multiple nesting levels\n 0 400   0   $(ls -la$(ls $(c) $'*.c' ` $(${s})`))\n 1 400   0   \n 0 400   0   # Multi-line\n 0 400   0   $(ls |\n 0 400   0   more)\n 1 400   0   \n 0 400   0   $(\n 0 400   0   `x`\n 0 400   0   \"x\"\n 0 400   0   `ls`\n 0 400   0   $'x'\n 0 400   0   $\"x\"\n 0 400   0   )\n 0 400   0   #end -- checks termination of previous\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/bash/NestedRich.bsh.styled",
    "content": "{2}# Use lexer.bash.command.substitution=2 to style command substitution{0}\n{2}# so that both the scope of the command and the internal structure are visible.{0}\n\n{2}# Nested command{0}\n{71}$({72}ls{64} {72}-la{71}$({72}ls{64} {71}*.{72}c{71})){0}\n\n{2}# Check strings and backticks in command{0}\n{4}echo{0} {71}$({70}'ls'{64} {69}\".\"{64} {75}`ls`{64} {69}$'.'{64} {69}$\".\"{71}){0}\n\n{8}PROJECT_DIR{7}={71}$({72}rlwrap{64} {72}-S{64} {69}\"Enter source path: \"{64} {72}-e{64} {70}''{64} {72}-i{64} {72}-o{64} {72}cat{71}){0}\n\n{2}# Multiple nesting levels{0}\n{71}$({72}ls{64} {72}-la{71}$({72}ls{64} {71}$({72}c{71}){64} {69}$'*.c'{64} {75}` $(${s})`{71})){0}\n\n{2}# Multi-line{0}\n{71}$({72}ls{64} {71}|{64}\n{72}more{71}){0}\n\n{71}$({64}\n{75}`x`{64}\n{69}\"x\"{64}\n{75}`ls`{64}\n{69}$'x'{64}\n{69}$\"x\"{64}\n{71}){0}\n{2}#end -- checks termination of previous{0}\n"
  },
  {
    "path": "lexilla/test/examples/bash/NestedStyledInside.bsh",
    "content": "# Nested elements and other complex cases\n\n# String with backtick inclusion\n\"x`ls`\"\n# Nested string\n\"x`ls \"*.c\"`\"\n# Not terminated at first \"\n\"x`ls\" # \"`\" #\n\n# String with command inclusion\n\"x$(ls)\"\n\n# Nested command\n$(ls -la$(ls *.c))\n\n# Check strings and backticks in command\necho $('ls' \".\" `ls` $'.' $\".\")\n\n# $( not terminated by ) if contains unterminated string\n$('x) # ') #\n$(\"x) # \") #\n$(`x) # `) # Bash doesn't like this\n$($'x) # ') #\n$($\"x) # \") #\n\n# Parameter expansion\nvar=abcdef\nsub=abc\nrep='& '\necho ${var/$sub/\"${rep}}\"} #\n\n# '$' in variable\necho $$PID\necho $var${var}\n\n# Here-doc with internal elements\ncat <<EOF\n\t$scalar\n\t${var}\n\t$((1+2))\n\t$(pwd)\n\t`pwd`\nEOF\n\n# Quoted delimiter treats here-doc as simple string\ncat <<\"EOF\"\n\t$scalar\n\t${var}\n\t$((1+2))\n\t$(pwd)\n\t`pwd`\nEOF\n\n# Escaped same as quoted\ncat <<\\EOF\n\t$scalar\nEOF\n\n# Nesting\necho \"$((1 + 2))\" #\necho \"$[1 + 2]\" #\n\n# Multiple nesting levels\n$(ls -la$(ls $(c) $'*.c' ` $(${s})`))\n\n# Multi-line\n$(ls |\nmore)\n\n$(\n`x`\n\"x\"\n`ls`\n$'x'\n$\"x\"\n)\n#end -- checks termination of previous\n"
  },
  {
    "path": "lexilla/test/examples/bash/NestedStyledInside.bsh.folded",
    "content": " 0 400   0   # Nested elements and other complex cases\n 1 400   0   \n 0 400   0   # String with backtick inclusion\n 0 400   0   \"x`ls`\"\n 0 400   0   # Nested string\n 0 400   0   \"x`ls \"*.c\"`\"\n 0 400   0   # Not terminated at first \"\n 0 400   0   \"x`ls\" # \"`\" #\n 1 400   0   \n 0 400   0   # String with command inclusion\n 0 400   0   \"x$(ls)\"\n 1 400   0   \n 0 400   0   # Nested command\n 0 400   0   $(ls -la$(ls *.c))\n 1 400   0   \n 0 400   0   # Check strings and backticks in command\n 0 400   0   echo $('ls' \".\" `ls` $'.' $\".\")\n 1 400   0   \n 0 400   0   # $( not terminated by ) if contains unterminated string\n 0 400   0   $('x) # ') #\n 0 400   0   $(\"x) # \") #\n 0 400   0   $(`x) # `) # Bash doesn't like this\n 0 400   0   $($'x) # ') #\n 0 400   0   $($\"x) # \") #\n 1 400   0   \n 0 400   0   # Parameter expansion\n 0 400   0   var=abcdef\n 0 400   0   sub=abc\n 0 400   0   rep='& '\n 0 400   0   echo ${var/$sub/\"${rep}}\"} #\n 1 400   0   \n 0 400   0   # '$' in variable\n 0 400   0   echo $$PID\n 0 400   0   echo $var${var}\n 1 400   0   \n 0 400   0   # Here-doc with internal elements\n 2 400   0 + cat <<EOF\n 0 401   0 | \t$scalar\n 0 401   0 | \t${var}\n 0 401   0 | \t$((1+2))\n 0 401   0 | \t$(pwd)\n 0 401   0 | \t`pwd`\n 0 401   0 | EOF\n 1 400   0   \n 0 400   0   # Quoted delimiter treats here-doc as simple string\n 2 400   0 + cat <<\"EOF\"\n 0 401   0 | \t$scalar\n 0 401   0 | \t${var}\n 0 401   0 | \t$((1+2))\n 0 401   0 | \t$(pwd)\n 0 401   0 | \t`pwd`\n 0 401   0 | EOF\n 1 400   0   \n 0 400   0   # Escaped same as quoted\n 2 400   0 + cat <<\\EOF\n 0 401   0 | \t$scalar\n 0 401   0 | EOF\n 1 400   0   \n 0 400   0   # Nesting\n 0 400   0   echo \"$((1 + 2))\" #\n 0 400   0   echo \"$[1 + 2]\" #\n 1 400   0   \n 0 400   0   # Multiple nesting levels\n 0 400   0   $(ls -la$(ls $(c) $'*.c' ` $(${s})`))\n 1 400   0   \n 0 400   0   # Multi-line\n 0 400   0   $(ls |\n 0 400   0   more)\n 1 400   0   \n 0 400   0   $(\n 0 400   0   `x`\n 0 400   0   \"x\"\n 0 400   0   `ls`\n 0 400   0   $'x'\n 0 400   0   $\"x\"\n 0 400   0   )\n 0 400   0   #end -- checks termination of previous\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/bash/NestedStyledInside.bsh.styled",
    "content": "{2}# Nested elements and other complex cases{0}\n\n{2}# String with backtick inclusion{0}\n{5}\"x{11}`ls`{5}\"{0}\n{2}# Nested string{0}\n{5}\"x{11}`ls {5}\"*.c\"{11}`{5}\"{0}\n{2}# Not terminated at first \"{0}\n{5}\"x{11}`ls{5}\" # \"{11}`{5}\"{0} {2}#{0}\n\n{2}# String with command inclusion{0}\n{5}\"x{7}$({8}ls{7}){5}\"{0}\n\n{2}# Nested command{0}\n{7}$({8}ls{0} {8}-la{7}$({8}ls{0} {7}*.{8}c{7})){0}\n\n{2}# Check strings and backticks in command{0}\n{4}echo{0} {7}$({6}'ls'{0} {5}\".\"{0} {11}`ls`{0} {5}$'.'{0} {5}$\".\"{7}){0}\n\n{2}# $( not terminated by ) if contains unterminated string{0}\n{7}$({6}'x) # '{7}){0} {2}#{0}\n{7}$({5}\"x) # \"{7}){0} {2}#{0}\n{7}$({11}`x) # `{7}){0} {2}# Bash doesn't like this{0}\n{7}$({5}$'x) # '{7}){0} {2}#{0}\n{7}$({5}$\"x) # \"{7}){0} {2}#{0}\n\n{2}# Parameter expansion{0}\n{8}var{7}={8}abcdef{0}\n{8}sub{7}={8}abc{0}\n{8}rep{7}={6}'& '{0}\n{4}echo{0} {10}${var/{9}$sub{10}/{5}\"{10}${rep}{5}}\"{10}}{0} {2}#{0}\n\n{2}# '$' in variable{0}\n{4}echo{0} {9}$${8}PID{0}\n{4}echo{0} {9}$var{10}${var}{0}\n\n{2}# Here-doc with internal elements{0}\n{4}cat{0} {12}<<EOF{13}\n\t{9}$scalar{13}\n\t{10}${var}{13}\n\t{7}$(({3}1{7}+{3}2{7})){13}\n\t{7}$({4}pwd{7}){13}\n\t{11}`pwd`{13}\n{12}EOF{0}\n\n{2}# Quoted delimiter treats here-doc as simple string{0}\n{4}cat{0} {12}<<\"EOF\"{13}\n\t$scalar\n\t${var}\n\t$((1+2))\n\t$(pwd)\n\t`pwd`\n{12}EOF{0}\n\n{2}# Escaped same as quoted{0}\n{4}cat{0} {12}<<\\EOF{13}\n\t$scalar\n{12}EOF{0}\n\n{2}# Nesting{0}\n{4}echo{0} {5}\"{7}$(({3}1{0} {7}+{0} {3}2{7})){5}\"{0} {2}#{0}\n{4}echo{0} {5}\"{7}$[{3}1{0} {7}+{0} {3}2{7}]{5}\"{0} {2}#{0}\n\n{2}# Multiple nesting levels{0}\n{7}$({8}ls{0} {8}-la{7}$({8}ls{0} {7}$({8}c{7}){0} {5}$'*.c'{0} {11}` {7}$({10}${s}{7}){11}`{7})){0}\n\n{2}# Multi-line{0}\n{7}$({8}ls{0} {7}|{0}\n{8}more{7}){0}\n\n{7}$({0}\n{11}`x`{0}\n{5}\"x\"{0}\n{11}`ls`{0}\n{5}$'x'{0}\n{5}$\"x\"{0}\n{7}){0}\n{2}#end -- checks termination of previous{0}\n"
  },
  {
    "path": "lexilla/test/examples/bash/SciTE.properties",
    "content": "lexer.*.bsh;*.zsh=bash\nfold=1\nfold.comment=1\nkeywords.*.bsh;*.zsh=case cat do done echo else esac exit export fi find for if in print pwd set setopt then while\n\n# Can use substyles for identifiers and scalars\nsubstyles.bash.8=1\nsubstylewords.8.1.*.bsh=map\nsubstyles.bash.9=1\nsubstylewords.9.1.*.bsh=CWD\n\nlexer.bash.styling.inside.string=0\nlexer.bash.styling.inside.backticks=0\nlexer.bash.styling.inside.parameter=0\nlexer.bash.styling.inside.heredoc=0\nlexer.bash.command.substitution=0\n\nmatch Issue180.bsh\n\tlexer.bash.styling.inside.string=1\n\nmatch Issue182.bsh\n\tlexer.bash.styling.inside.string=1\n\nmatch Issue184.bsh\n\tlexer.bash.styling.inside.string=1\n\tlexer.bash.command.substitution=1\n\nmatch Issue184Copy.bsh\n\tlexer.bash.styling.inside.string=1\n\tlexer.bash.command.substitution=1\n\tlexer.bash.special.parameter=*@#?-$!%<\n\nmatch NestedStyledInside.bsh\n\tlexer.bash.styling.inside.string=1\n\tlexer.bash.styling.inside.backticks=1\n\tlexer.bash.styling.inside.parameter=1\n\tlexer.bash.styling.inside.heredoc=1\n\tlexer.bash.command.substitution=1\n\nmatch NestedRich.bsh\n\tlexer.bash.command.substitution=2\n"
  },
  {
    "path": "lexilla/test/examples/bash/continuation.bsh",
    "content": "# Tests for line continuation.\n# Issue #195.\n\n#backslash1\\\necho 1\n#backslash2\\\\\necho 2\n\nif [ 1 ]; then\n    backslash1=A\\\nfi\n    backslash2=B\\\\\nfi\n\necho $backslash1, $backslash2\n"
  },
  {
    "path": "lexilla/test/examples/bash/continuation.bsh.folded",
    "content": " 2 400   0 + # Tests for line continuation.\n 0 401   0 | # Issue #195.\n 1 400   0   \n 0 400   0   #backslash1\\\n 0 400   0   echo 1\n 0 400   0   #backslash2\\\\\n 0 400   0   echo 2\n 1 400   0   \n 2 400   0 + if [ 1 ]; then\n 0 401   0 |     backslash1=A\\\n 0 401   0 | fi\n 0 401   0 |     backslash2=B\\\\\n 0 401   0 | fi\n 1 400   0   \n 0 400   0   echo $backslash1, $backslash2\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/bash/continuation.bsh.styled",
    "content": "{2}# Tests for line continuation.{0}\n{2}# Issue #195.{0}\n\n{2}#backslash1\\{0}\n{4}echo{0} {3}1{0}\n{2}#backslash2\\\\{0}\n{4}echo{0} {3}2{0}\n\n{4}if{0} {7}[{0} {3}1{0} {7}];{0} {4}then{0}\n    {8}backslash1{7}={8}A{7}\\{0}\n{8}fi{0}\n    {8}backslash2{7}={8}B\\\\{0}\n{4}fi{0}\n\n{4}echo{0} {9}$backslash1{7},{0} {9}$backslash2{0}\n"
  },
  {
    "path": "lexilla/test/examples/bash/hash.zsh",
    "content": "#!/bin/zsh\n# Tests for zsh extensions\n# Can be executed by zsh with reasonable results\n# Some of these were implemented by commit [87286d] for Scintilla bug #1794\n# https://zsh.sourceforge.io/Doc/Release/Expansion.html\n\n# Where # does not start a comment\n\n\n## Formatting base\nprint $(( [#8] y = 33 ))\nprint $(( [##8] 32767 ))\n\n# Formatting base and grouping\nprint $(( [#16_4] 65536 ** 2 ))\n\n\n## Character values\nprint $(( ##T+0 ))\nprint $(( ##^G+0 ))\n# Failure: does not work when - included for bindkey syntax. \\M-\\C-x means Meta+Ctrl+x.\nprint $(( ##\\M-\\C-x+0 ))\n\n# Value of first character of variable in expression\nvar=Tree\nprint $(( #var+0 ))\n\n\n## Extended glob\nsetopt extended_glob\n\n# # is similar to *, ## similar to +\necho [A-Za-z]#.bsh\necho [A-Za-z]##.bsh\n\n# 13 character file names\necho **/[a-zA-Z.](#c13)\n# 13-15 character file names\necho **/[a-zA-Z.](#c13,15)\n\n\n## Glob flag\n\n# i=case-insensitive\necho (#i)a*\n\n# b=back-references\nfoo=\"a_string_with_a_message\"\nif [[ $foo = (a|an)_(#b)(*) ]]; then\n  print ${foo[$mbegin[1],$mend[1]]}\nfi\n"
  },
  {
    "path": "lexilla/test/examples/bash/hash.zsh.folded",
    "content": " 2 400   0 + #!/bin/zsh\n 0 401   0 | # Tests for zsh extensions\n 0 401   0 | # Can be executed by zsh with reasonable results\n 0 401   0 | # Some of these were implemented by commit [87286d] for Scintilla bug #1794\n 0 401   0 | # https://zsh.sourceforge.io/Doc/Release/Expansion.html\n 1 400   0   \n 0 400   0   # Where # does not start a comment\n 1 400   0   \n 1 400   0   \n 0 400   0   ## Formatting base\n 0 400   0   print $(( [#8] y = 33 ))\n 0 400   0   print $(( [##8] 32767 ))\n 1 400   0   \n 0 400   0   # Formatting base and grouping\n 0 400   0   print $(( [#16_4] 65536 ** 2 ))\n 1 400   0   \n 1 400   0   \n 0 400   0   ## Character values\n 0 400   0   print $(( ##T+0 ))\n 0 400   0   print $(( ##^G+0 ))\n 0 400   0   # Failure: does not work when - included for bindkey syntax. \\M-\\C-x means Meta+Ctrl+x.\n 0 400   0   print $(( ##\\M-\\C-x+0 ))\n 1 400   0   \n 0 400   0   # Value of first character of variable in expression\n 0 400   0   var=Tree\n 0 400   0   print $(( #var+0 ))\n 1 400   0   \n 1 400   0   \n 0 400   0   ## Extended glob\n 0 400   0   setopt extended_glob\n 1 400   0   \n 0 400   0   # # is similar to *, ## similar to +\n 0 400   0   echo [A-Za-z]#.bsh\n 0 400   0   echo [A-Za-z]##.bsh\n 1 400   0   \n 0 400   0   # 13 character file names\n 0 400   0   echo **/[a-zA-Z.](#c13)\n 0 400   0   # 13-15 character file names\n 0 400   0   echo **/[a-zA-Z.](#c13,15)\n 1 400   0   \n 1 400   0   \n 0 400   0   ## Glob flag\n 1 400   0   \n 0 400   0   # i=case-insensitive\n 0 400   0   echo (#i)a*\n 1 400   0   \n 0 400   0   # b=back-references\n 0 400   0   foo=\"a_string_with_a_message\"\n 2 400   0 + if [[ $foo = (a|an)_(#b)(*) ]]; then\n 0 401   0 |   print ${foo[$mbegin[1],$mend[1]]}\n 0 401   0 | fi\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/bash/hash.zsh.styled",
    "content": "{2}#!/bin/zsh{0}\n{2}# Tests for zsh extensions{0}\n{2}# Can be executed by zsh with reasonable results{0}\n{2}# Some of these were implemented by commit [87286d] for Scintilla bug #1794{0}\n{2}# https://zsh.sourceforge.io/Doc/Release/Expansion.html{0}\n\n{2}# Where # does not start a comment{0}\n\n\n{2}## Formatting base{0}\n{4}print{0} {7}$(({0} {7}[{8}#8{7}]{0} {8}y{0} {7}={0} {3}33{0} {7})){0}\n{4}print{0} {7}$(({0} {7}[{8}##8{7}]{0} {3}32767{0} {7})){0}\n\n{2}# Formatting base and grouping{0}\n{4}print{0} {7}$(({0} {7}[{8}#16_4{7}]{0} {3}65536{0} {7}**{0} {3}2{0} {7})){0}\n\n\n{2}## Character values{0}\n{4}print{0} {7}$(({0} {8}##T{7}+{3}0{0} {7})){0}\n{4}print{0} {7}$(({0} {8}##^G{7}+{3}0{0} {7})){0}\n{2}# Failure: does not work when - included for bindkey syntax. \\M-\\C-x means Meta+Ctrl+x.{0}\n{4}print{0} {7}$(({0} {8}##\\M{7}-{8}\\C{7}-{8}x{7}+{3}0{0} {7})){0}\n\n{2}# Value of first character of variable in expression{0}\n{8}var{7}={8}Tree{0}\n{4}print{0} {7}$(({0} {8}#var{7}+{3}0{0} {7})){0}\n\n\n{2}## Extended glob{0}\n{4}setopt{0} {8}extended_glob{0}\n\n{2}# # is similar to *, ## similar to +{0}\n{4}echo{0} {7}[{8}A-Za-z{7}]{8}#.bsh{0}\n{4}echo{0} {7}[{8}A-Za-z{7}]{8}##.bsh{0}\n\n{2}# 13 character file names{0}\n{4}echo{0} {7}**/[{8}a-zA-Z.{7}]{8}(#c13){0}\n{2}# 13-15 character file names{0}\n{4}echo{0} {7}**/[{8}a-zA-Z.{7}]{8}(#c13,15){0}\n\n\n{2}## Glob flag{0}\n\n{2}# i=case-insensitive{0}\n{4}echo{0} {8}(#i)a{7}*{0}\n\n{2}# b=back-references{0}\n{8}foo{7}={5}\"a_string_with_a_message\"{0}\n{4}if{0} {7}[[{0} {9}$foo{0} {7}={0} {7}({8}a{7}|{8}an{7}){8}_(#b){7}(*){0} {7}]];{0} {4}then{0}\n  {4}print{0} {10}${foo[$mbegin[1],$mend[1]]}{0}\n{4}fi{0}\n"
  },
  {
    "path": "lexilla/test/examples/bash/x.bsh",
    "content": "#!/usr/bin/env bash\nset -e\n# -----------------------------------------------------------------------------\n# Voluptatem dolore magnam eius quisquam eius dolor labore. Porro dolor amet ut.\n# Numquam labore amet modi. Dolorem velit numquam porro est quiquia ipsum quisquam.\n# Magnam consectetur est voluptatem aliquam adipisci. Sed dolorem quaerat quiquia.\n# -----------------------------------------------------------------------------\nexport PYTHONPATH=\"scripts:$PYTHONPATH\"\n\nif [[ -z \"$1\" ]]; then\n  PROJECT_DIR=$(rlwrap -S \"Enter source path: \" -e '' -i -o cat)\n  PROJECT_PATH=\"$(pwd)/$PROJECT_DIR\"\nelse\n  PROJECT_PATH=\"$(pwd)/${1}\"\nfi\n\nOUT_FILE=${PROJECT_PATH}/testing.txt\n\n(cat<<EOF\n  Last run $(date +'%Y-%m-%d') at $(date +'%H:%M:%S.%2N')\nEOF\n) > $OUT_FILE\n\n# Issue 188, keyword before redirection operator\npwd>>$OUT_FILE\n\nfind \"$PROJECT_PATH/src\" -maxdepth 1 -type f |\\\nwhile read -r f; do\n  {\n    python3 -c \"print();print('='*50)\";\\\n    echo `basename \"$f\"` | tr -d 'x';\\\n    python3 -c \"print('='*50)\";\\\n    python3 \"$f\";\\\n  } >> $OUT_FILE\ndone\n\n# Issue 137, should be shift but here-doc was detected\necho $(( x << END ))\npwd\nEND\n\n# Issue 194, failed to understand character escaping so string unterminated\necho \"foo `echo foo \\\\\" bar` bar\"\necho \"xinput set-prop bla \\\"blub\\\" `grep bla $WRITE_APPENDIX/var/lib/path.txt | cut -d \\\\\" -f 4`\" >/some_file.sh\n\n# Issue 194, $ before end of backticks is literal\necho `echo \\$`\necho `echo \\$bar\\$`\necho `echo $`\necho `echo $bar$`\n\nINVALID_NUMBER=0#0000\n"
  },
  {
    "path": "lexilla/test/examples/bash/x.bsh.folded",
    "content": " 0 400   0   #!/usr/bin/env bash\n 0 400   0   set -e\n 2 400   0 + # -----------------------------------------------------------------------------\n 0 401   0 | # Voluptatem dolore magnam eius quisquam eius dolor labore. Porro dolor amet ut.\n 0 401   0 | # Numquam labore amet modi. Dolorem velit numquam porro est quiquia ipsum quisquam.\n 0 401   0 | # Magnam consectetur est voluptatem aliquam adipisci. Sed dolorem quaerat quiquia.\n 0 401   0 | # -----------------------------------------------------------------------------\n 0 400   0   export PYTHONPATH=\"scripts:$PYTHONPATH\"\n 1 400   0   \n 2 400   0 + if [[ -z \"$1\" ]]; then\n 0 401   0 |   PROJECT_DIR=$(rlwrap -S \"Enter source path: \" -e '' -i -o cat)\n 0 401   0 |   PROJECT_PATH=\"$(pwd)/$PROJECT_DIR\"\n 0 401   0 | else\n 0 401   0 |   PROJECT_PATH=\"$(pwd)/${1}\"\n 0 401   0 | fi\n 1 400   0   \n 0 400   0   OUT_FILE=${PROJECT_PATH}/testing.txt\n 1 400   0   \n 2 400   0 + (cat<<EOF\n 0 401   0 |   Last run $(date +'%Y-%m-%d') at $(date +'%H:%M:%S.%2N')\n 0 401   0 | EOF\n 0 400   0   ) > $OUT_FILE\n 1 400   0   \n 0 400   0   # Issue 188, keyword before redirection operator\n 0 400   0   pwd>>$OUT_FILE\n 1 400   0   \n 0 400   0   find \"$PROJECT_PATH/src\" -maxdepth 1 -type f |\\\n 2 400   0 + while read -r f; do\n 2 401   0 +   {\n 0 402   0 |     python3 -c \"print();print('='*50)\";\\\n 0 402   0 |     echo `basename \"$f\"` | tr -d 'x';\\\n 0 402   0 |     python3 -c \"print('='*50)\";\\\n 0 402   0 |     python3 \"$f\";\\\n 0 402   0 |   } >> $OUT_FILE\n 0 401   0 | done\n 1 400   0   \n 0 400   0   # Issue 137, should be shift but here-doc was detected\n 0 400   0   echo $(( x << END ))\n 0 400   0   pwd\n 0 400   0   END\n 1 400   0   \n 0 400   0   # Issue 194, failed to understand character escaping so string unterminated\n 0 400   0   echo \"foo `echo foo \\\\\" bar` bar\"\n 0 400   0   echo \"xinput set-prop bla \\\"blub\\\" `grep bla $WRITE_APPENDIX/var/lib/path.txt | cut -d \\\\\" -f 4`\" >/some_file.sh\n 1 400   0   \n 0 400   0   # Issue 194, $ before end of backticks is literal\n 0 400   0   echo `echo \\$`\n 0 400   0   echo `echo \\$bar\\$`\n 0 400   0   echo `echo $`\n 0 400   0   echo `echo $bar$`\n 1 400   0   \n 0 400   0   INVALID_NUMBER=0#0000\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/bash/x.bsh.styled",
    "content": "{2}#!/usr/bin/env bash{0}\n{4}set{0} {8}-e{0}\n{2}# -----------------------------------------------------------------------------{0}\n{2}# Voluptatem dolore magnam eius quisquam eius dolor labore. Porro dolor amet ut.{0}\n{2}# Numquam labore amet modi. Dolorem velit numquam porro est quiquia ipsum quisquam.{0}\n{2}# Magnam consectetur est voluptatem aliquam adipisci. Sed dolorem quaerat quiquia.{0}\n{2}# -----------------------------------------------------------------------------{0}\n{4}export{0} {8}PYTHONPATH{7}={5}\"scripts:$PYTHONPATH\"{0}\n\n{4}if{0} {7}[[{0} {4}-z{0} {5}\"$1\"{0} {7}]];{0} {4}then{0}\n  {8}PROJECT_DIR{7}={11}$(rlwrap -S \"Enter source path: \" -e '' -i -o cat){0}\n  {8}PROJECT_PATH{7}={5}\"$(pwd)/$PROJECT_DIR\"{0}\n{4}else{0}\n  {8}PROJECT_PATH{7}={5}\"$(pwd)/${1}\"{0}\n{4}fi{0}\n\n{8}OUT_FILE{7}={10}${PROJECT_PATH}{7}/{8}testing.txt{0}\n\n{7}({4}cat{12}<<EOF{13}\n  Last run $(date +'%Y-%m-%d') at $(date +'%H:%M:%S.%2N')\n{12}EOF{0}\n{7}){0} {7}>{0} {9}$OUT_FILE{0}\n\n{2}# Issue 188, keyword before redirection operator{0}\n{4}pwd{7}>>{9}$OUT_FILE{0}\n\n{4}find{0} {5}\"$PROJECT_PATH/src\"{0} {8}-maxdepth{0} {3}1{0} {8}-type{0} {8}f{0} {7}|\\{0}\n{4}while{0} {8}read{0} {8}-r{0} {8}f{7};{0} {4}do{0}\n  {7}{{0}\n    {8}python3{0} {8}-c{0} {5}\"print();print('='*50)\"{7};\\{0}\n    {4}echo{0} {11}`basename \"$f\"`{0} {7}|{0} {8}tr{0} {8}-d{0} {6}'x'{7};\\{0}\n    {8}python3{0} {8}-c{0} {5}\"print('='*50)\"{7};\\{0}\n    {8}python3{0} {5}\"$f\"{7};\\{0}\n  {7}}{0} {7}>>{0} {9}$OUT_FILE{0}\n{4}done{0}\n\n{2}# Issue 137, should be shift but here-doc was detected{0}\n{4}echo{0} {7}$(({0} {8}x{0} {7}<<{0} {8}END{0} {7})){0}\n{4}pwd{0}\n{8}END{0}\n\n{2}# Issue 194, failed to understand character escaping so string unterminated{0}\n{4}echo{0} {5}\"foo `echo foo \\\\\" bar` bar\"{0}\n{4}echo{0} {5}\"xinput set-prop bla \\\"blub\\\" `grep bla $WRITE_APPENDIX/var/lib/path.txt | cut -d \\\\\" -f 4`\"{0} {7}>/{8}some_file.sh{0}\n\n{2}# Issue 194, $ before end of backticks is literal{0}\n{4}echo{0} {11}`echo \\$`{0}\n{4}echo{0} {11}`echo \\$bar\\$`{0}\n{4}echo{0} {11}`echo $`{0}\n{4}echo{0} {11}`echo $bar$`{0}\n\n{8}INVALID_NUMBER{7}={1}0#0000{0}\n"
  },
  {
    "path": "lexilla/test/examples/batch/Issue115.bat",
    "content": "rem remark and comment bug\n\nfindstr /c:\"rem this\" \"file\"\nfindstr /c:\":: this\" \"file\"\n\n:: SingleQuoted command string\nfor /f %%A in ('rem this') do echo %%A\n\n:: DoubleQuoted string\nfor /f %%A in (\"rem this\") do echo %%A\n\n:: BackQuote command string\nfor /f \"usebackq\" %%A in (`rem this`) do echo %%A\n\n:: Test the handling of quotes ' and \" and escape ^\n:: Comment\n\n:: With quotes\n\":: Text\n\"\":: Comment\n':: Text\n'':: Comment\n:: Mixing quotes - likely incorrect as lexer tries ' and \" separately, leaving an active quote\n\"'\":: Text\n\n:: With escapes\n^:: Text\n^\":: Comment\n^\"\":: Text\n^\"\"\":: Comment\n^^\":: Text\n^^\"\":: Comment\n^^\"\"\":: Text\n\n:: With preceding command\nmkdir archive \":: Text\nmkdir archive \"\":: Comment\nmkdir archive ^\":: Comment\nmkdir archive ^\"\":: Text\n"
  },
  {
    "path": "lexilla/test/examples/batch/Issue115.bat.folded",
    "content": " 0 400   0   rem remark and comment bug\n 0 400   0   \n 0 400   0   findstr /c:\"rem this\" \"file\"\n 0 400   0   findstr /c:\":: this\" \"file\"\n 0 400   0   \n 0 400   0   :: SingleQuoted command string\n 0 400   0   for /f %%A in ('rem this') do echo %%A\n 0 400   0   \n 0 400   0   :: DoubleQuoted string\n 0 400   0   for /f %%A in (\"rem this\") do echo %%A\n 0 400   0   \n 0 400   0   :: BackQuote command string\n 0 400   0   for /f \"usebackq\" %%A in (`rem this`) do echo %%A\n 0 400   0   \n 0 400   0   :: Test the handling of quotes ' and \" and escape ^\n 0 400   0   :: Comment\n 0 400   0   \n 0 400   0   :: With quotes\n 0 400   0   \":: Text\n 0 400   0   \"\":: Comment\n 0 400   0   ':: Text\n 0 400   0   '':: Comment\n 0 400   0   :: Mixing quotes - likely incorrect as lexer tries ' and \" separately, leaving an active quote\n 0 400   0   \"'\":: Text\n 0 400   0   \n 0 400   0   :: With escapes\n 0 400   0   ^:: Text\n 0 400   0   ^\":: Comment\n 0 400   0   ^\"\":: Text\n 0 400   0   ^\"\"\":: Comment\n 0 400   0   ^^\":: Text\n 0 400   0   ^^\"\":: Comment\n 0 400   0   ^^\"\"\":: Text\n 0 400   0   \n 0 400   0   :: With preceding command\n 0 400   0   mkdir archive \":: Text\n 0 400   0   mkdir archive \"\":: Comment\n 0 400   0   mkdir archive ^\":: Comment\n 0 400   0   mkdir archive ^\"\":: Text\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/batch/Issue115.bat.styled",
    "content": "{1}rem remark and comment bug\n{0}\n{5}findstr{0} /c:\"rem this\" \"file\"\n{5}findstr{0} /c:\":: this\" \"file\"\n\n{1}:: SingleQuoted command string\n{2}for{0} /f {6}%%A{2} in{0} ('rem this'){2} do echo{0} {6}%%A{0}\n\n{1}:: DoubleQuoted string\n{2}for{0} /f {6}%%A{2} in{0} (\"rem this\"){2} do echo{0} {6}%%A{0}\n\n{1}:: BackQuote command string\n{2}for{0} /f \"usebackq\" {6}%%A{2} in{0} (`rem this`){2} do echo{0} {6}%%A{0}\n\n{1}:: Test the handling of quotes ' and \" and escape ^\n:: Comment\n{0}\n{1}:: With quotes\n{0}\":: Text\n\"\"{1}:: Comment\n{0}':: Text\n''{1}:: Comment\n:: Mixing quotes - likely incorrect as lexer tries ' and \" separately, leaving an active quote\n{0}\"'\":: Text\n\n{1}:: With escapes\n{5}^::{0} Text\n{5}^{0}\"{1}:: Comment\n{5}^{0}\"\":: Text\n{5}^{0}\"\"\"{1}:: Comment\n{5}^^{0}\":: Text\n{5}^^{0}\"\"{1}:: Comment\n{5}^^{0}\"\"\":: Text\n\n{1}:: With preceding command\n{5}mkdir{0} archive \":: Text\n{5}mkdir{0} archive \"\"{1}:: Comment\n{5}mkdir{0} archive ^\"{1}:: Comment\n{5}mkdir{0} archive ^\"\":: Text\n"
  },
  {
    "path": "lexilla/test/examples/batch/Issue222.bat",
    "content": "rem Keywords with colon\n\nrem with spacing\ncall file.bat arg1\ncall \"file.bat\" arg1\ncall :label arg1\ngoto :label\ngoto :eof\ngoto label\necho: %var%\necho: text\necho text\n\nrem no spacing\ncall:label arg1\ngoto:label\ngoto:eof\necho:%var%\necho:text\n(call)\n(echo:)\n(goto)\n\nrem call internal commands\ncall echo text\ncall set \"a=b\"\n"
  },
  {
    "path": "lexilla/test/examples/batch/Issue222.bat.folded",
    "content": " 0 400   0   rem Keywords with colon\n 0 400   0   \n 0 400   0   rem with spacing\n 0 400   0   call file.bat arg1\n 0 400   0   call \"file.bat\" arg1\n 0 400   0   call :label arg1\n 0 400   0   goto :label\n 0 400   0   goto :eof\n 0 400   0   goto label\n 0 400   0   echo: %var%\n 0 400   0   echo: text\n 0 400   0   echo text\n 0 400   0   \n 0 400   0   rem no spacing\n 0 400   0   call:label arg1\n 0 400   0   goto:label\n 0 400   0   goto:eof\n 0 400   0   echo:%var%\n 0 400   0   echo:text\n 0 400   0   (call)\n 0 400   0   (echo:)\n 0 400   0   (goto)\n 0 400   0   \n 0 400   0   rem call internal commands\n 0 400   0   call echo text\n 0 400   0   call set \"a=b\"\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/batch/Issue222.bat.styled",
    "content": "{1}rem Keywords with colon\n{0}\n{1}rem with spacing\n{2}call{5} file.bat{0} arg1\n{2}call{0} \"file.bat\" arg1\n{2}call{0} :label arg1\n{2}goto{0} :label\n{2}goto{0} :eof\n{2}goto{0} label\n{2}echo{0}: {6}%var%{0}\n{2}echo{0}: text\n{2}echo{0} text\n\n{1}rem no spacing\n{2}call{0}:label arg1\n{2}goto{0}:label\n{2}goto{0}:eof\n{2}echo{0}:{6}%var%{0}\n{2}echo{0}:text\n({2}call{0})\n({2}echo{0}:)\n({2}goto{0})\n\n{1}rem call internal commands\n{2}call echo{0} text\n{2}call set{0} \"a=b\"\n"
  },
  {
    "path": "lexilla/test/examples/batch/SciTE.properties",
    "content": "lexer.*.bat=batch\nkeywords.*.bat=call defined do echo else errorlevel exist exit for goto if in not set\n\n"
  },
  {
    "path": "lexilla/test/examples/batch/x.bat",
    "content": "rem comment=1\nrem 'echo' is word=2, 'a' is default=0\necho a\nrem label=3\n:START\nrem '@' is hide=4\n@echo b\nrem 'gcc' is external command=5\ngcc --version\nrem '%PATH%' is variable=6\necho %PATH%\necho %ProgramFiles(x86)%\nrem operator=7 '='\n@set Q=A\n\n::comment=1\n\n:: Bug 1624: this construct produced inconsistent brackets in the past\nif ERRORLEVEL 2 goto END\n@if exist a (\necho exists\n) else (\necho not\n)\n\nFOR /L %%G IN (2,1,4) DO (echo %%G)\n\n:: Bug 1997: keywords not recognized when preceded by '('\nIF NOT DEFINED var (SET var=1)\n\n:: Bug 2065: keywords not recognized when followed by ')'\n@if exist a ( exit)\n\n:: Bug: with \\r or \\n, 'command' is seen as continuation\necho word ^\n1\ncommand\n\n:: Bug argument and variable expansion\necho %~dp0123\necho %%-~012\necho %%~%%~-abcd\nFOR /F %%I in (\"C:\\Test\\temp.txt\") do echo %%~dI\n\n:: Bug ending of argument and variable expansion\necho %~dp0\\123\necho \"%~dp0123\"\necho \"%%-~012\"\necho \"%%~%%~-abcd\"\nFOR /F %%I in (\"C:\\Test\\temp.txt\") do echo \"%%~dI\"\n\n:: Bug escaped %\necho %%0\necho %%%0\necho %%%%~-abcd\n\n:TEST that after label style works\n:: Bug 2304: \"::\" comments not recognised when second command on line\nSet /A xxx=%xxx%+1 & :: Increment\nSet /A xxx=%xxx%+1 & ::Increment\nSet /A xxx=%xxx%+1 & rem Increment\n\n:END\n"
  },
  {
    "path": "lexilla/test/examples/batch/x.bat.folded",
    "content": " 0 400   0   rem comment=1\n 0 400   0   rem 'echo' is word=2, 'a' is default=0\n 0 400   0   echo a\n 0 400   0   rem label=3\n 0 400   0   :START\n 0 400   0   rem '@' is hide=4\n 0 400   0   @echo b\n 0 400   0   rem 'gcc' is external command=5\n 0 400   0   gcc --version\n 0 400   0   rem '%PATH%' is variable=6\n 0 400   0   echo %PATH%\n 0 400   0   echo %ProgramFiles(x86)%\n 0 400   0   rem operator=7 '='\n 0 400   0   @set Q=A\n 0 400   0   \n 0 400   0   ::comment=1\n 0 400   0   \n 0 400   0   :: Bug 1624: this construct produced inconsistent brackets in the past\n 0 400   0   if ERRORLEVEL 2 goto END\n 0 400   0   @if exist a (\n 0 400   0   echo exists\n 0 400   0   ) else (\n 0 400   0   echo not\n 0 400   0   )\n 0 400   0   \n 0 400   0   FOR /L %%G IN (2,1,4) DO (echo %%G)\n 0 400   0   \n 0 400   0   :: Bug 1997: keywords not recognized when preceded by '('\n 0 400   0   IF NOT DEFINED var (SET var=1)\n 0 400   0   \n 0 400   0   :: Bug 2065: keywords not recognized when followed by ')'\n 0 400   0   @if exist a ( exit)\n 0 400   0   \n 0 400   0   :: Bug: with \\r or \\n, 'command' is seen as continuation\n 0 400   0   echo word ^\n 0 400   0   1\n 0 400   0   command\n 0 400   0   \n 0 400   0   :: Bug argument and variable expansion\n 0 400   0   echo %~dp0123\n 0 400   0   echo %%-~012\n 0 400   0   echo %%~%%~-abcd\n 0 400   0   FOR /F %%I in (\"C:\\Test\\temp.txt\") do echo %%~dI\n 0 400   0   \n 0 400   0   :: Bug ending of argument and variable expansion\n 0 400   0   echo %~dp0\\123\n 0 400   0   echo \"%~dp0123\"\n 0 400   0   echo \"%%-~012\"\n 0 400   0   echo \"%%~%%~-abcd\"\n 0 400   0   FOR /F %%I in (\"C:\\Test\\temp.txt\") do echo \"%%~dI\"\n 0 400   0   \n 0 400   0   :: Bug escaped %\n 0 400   0   echo %%0\n 0 400   0   echo %%%0\n 0 400   0   echo %%%%~-abcd\n 0 400   0   \n 0 400   0   :TEST that after label style works\n 0 400   0   :: Bug 2304: \"::\" comments not recognised when second command on line\n 0 400   0   Set /A xxx=%xxx%+1 & :: Increment\n 0 400   0   Set /A xxx=%xxx%+1 & ::Increment\n 0 400   0   Set /A xxx=%xxx%+1 & rem Increment\n 0 400   0   \n 0 400   0   :END\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/batch/x.bat.styled",
    "content": "{1}rem comment=1\nrem 'echo' is word=2, 'a' is default=0\n{2}echo{0} a\n{1}rem label=3\n{3}:START\n{1}rem '@' is hide=4\n{4}@{2}echo{0} b\n{1}rem 'gcc' is external command=5\n{5}gcc{0} --version\n{1}rem '%PATH%' is variable=6\n{2}echo{0} {6}%PATH%{0}\n{2}echo{0} {6}%ProgramFiles(x86)%{0}\n{1}rem operator=7 '='\n{4}@{2}set{0} Q{7}={0}A\n\n{1}::comment=1\n{0}\n{1}:: Bug 1624: this construct produced inconsistent brackets in the past\n{2}if ERRORLEVEL{0} 2{2} goto{0} END\n{4}@{2}if exist{0} a (\n{2}echo{0} exists\n){2} else{0} (\n{2}echo{0} not\n)\n\n{2}FOR{0} /L {6}%%G{2} IN{0} (2,1,4){2} DO{0} ({2}echo{0} {6}%%G{0})\n\n{1}:: Bug 1997: keywords not recognized when preceded by '('\n{2}IF NOT DEFINED{0} var ({2}SET{0} var{7}={0}1)\n\n{1}:: Bug 2065: keywords not recognized when followed by ')'\n{4}@{2}if exist{0} a ({2} exit{0})\n\n{1}:: Bug: with \\r or \\n, 'command' is seen as continuation\n{2}echo{0} word ^\n1\n{5}command{0}\n\n{1}:: Bug argument and variable expansion\n{2}echo{0} {6}%~dp0{0}123\n{2}echo{0} {6}%%-{0}~012\n{2}echo{0} %%~{6}%%~-abcd{0}\n{2}FOR{0} /F {6}%%I{2} in{0} (\"C:\\Test\\temp.txt\"){2} do echo{0} {6}%%~dI{0}\n\n{1}:: Bug ending of argument and variable expansion\n{2}echo{0} {6}%~dp0{0}\\123\n{2}echo{0} \"{6}%~dp0{0}123\"\n{2}echo{0} \"{6}%%-{0}~012\"\n{2}echo{0} \"%%~{6}%%~-abcd{0}\"\n{2}FOR{0} /F {6}%%I{2} in{0} (\"C:\\Test\\temp.txt\"){2} do echo{0} \"{6}%%~dI{0}\"\n\n{1}:: Bug escaped %\n{2}echo{0} {6}%%0{0}\n{2}echo{0} %%{6}%0{0}\n{2}echo{0} %%{6}%%~-abcd{0}\n\n{3}:TEST{8} that after label style works\n{1}:: Bug 2304: \"::\" comments not recognised when second command on line\n{2}Set{0} /A xxx{7}={6}%xxx%{7}+{0}1 {7}&{0} {1}:: Increment\n{2}Set{0} /A xxx{7}={6}%xxx%{7}+{0}1 {7}&{0} {1}::Increment\n{2}Set{0} /A xxx{7}={6}%xxx%{7}+{0}1 {7}&{0} {1}rem Increment\n{0}\n{3}:END\n"
  },
  {
    "path": "lexilla/test/examples/caml/AllStyles.ml",
    "content": "(* Enumerate all styles: 0 to 15 *)\n(* comment=12 *)\n\n(* whitespace=0 *)\n\t(* w *)\n\n(* identifier=1 *)\nident\n\n(* tagname=2 *)\n`ident\n\n(* keyword=3 *)\nand\n\n(* keyword2=4 *)\nNone\n\n(* keyword3=5 *)\nchar\n\n(* linenum=6 *)\n#12\n\n(* operator=7 *)\n*\n\n(* number=8 *)\n12\n\n(* char=9 *)\n'a'\n\n(* white=10 *)\n(* this state can not be reached in caml mode, only SML mode but that stops other states *)\n(* SML mode is triggered by \"andalso\" being in the keywords *)\n\"\\ \\x\"\n\n(* string=11 *)\n\"string\"\n\n(* comment1=13 *)\n(* (* comment 1 *) *)\n\n(* comment2=14 *)\n(* (* (* comment 2 *) *) *)\n\n(* comment3=15 *)\n(* (* (* (* comment 1 *) *) *)  *)\n"
  },
  {
    "path": "lexilla/test/examples/caml/AllStyles.ml.folded",
    "content": " 0 400   0   (* Enumerate all styles: 0 to 15 *)\n 0 400   0   (* comment=12 *)\n 0 400   0   \n 0 400   0   (* whitespace=0 *)\n 0 400   0   \t(* w *)\n 0 400   0   \n 0 400   0   (* identifier=1 *)\n 0 400   0   ident\n 0 400   0   \n 0 400   0   (* tagname=2 *)\n 0 400   0   `ident\n 0 400   0   \n 0 400   0   (* keyword=3 *)\n 0 400   0   and\n 0 400   0   \n 0 400   0   (* keyword2=4 *)\n 0 400   0   None\n 0 400   0   \n 0 400   0   (* keyword3=5 *)\n 0 400   0   char\n 0 400   0   \n 0 400   0   (* linenum=6 *)\n 0 400   0   #12\n 0 400   0   \n 0 400   0   (* operator=7 *)\n 0 400   0   *\n 0 400   0   \n 0 400   0   (* number=8 *)\n 0 400   0   12\n 0 400   0   \n 0 400   0   (* char=9 *)\n 0 400   0   'a'\n 0 400   0   \n 0 400   0   (* white=10 *)\n 0 400   0   (* this state can not be reached in caml mode, only SML mode but that stops other states *)\n 0 400   0   (* SML mode is triggered by \"andalso\" being in the keywords *)\n 0 400   0   \"\\ \\x\"\n 0 400   0   \n 0 400   0   (* string=11 *)\n 0 400   0   \"string\"\n 0 400   0   \n 0 400   0   (* comment1=13 *)\n 0 400   0   (* (* comment 1 *) *)\n 0 400   0   \n 0 400   0   (* comment2=14 *)\n 0 400   0   (* (* (* comment 2 *) *) *)\n 0 400   0   \n 0 400   0   (* comment3=15 *)\n 0 400   0   (* (* (* (* comment 1 *) *) *)  *)\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/caml/AllStyles.ml.styled",
    "content": "{12}(* Enumerate all styles: 0 to 15 *){0}\n{12}(* comment=12 *){0}\n\n{12}(* whitespace=0 *){0}\n\t{12}(* w *){0}\n\n{12}(* identifier=1 *){0}\n{1}ident{0}\n\n{12}(* tagname=2 *){0}\n{2}`ident{0}\n\n{12}(* keyword=3 *){0}\n{3}and{0}\n\n{12}(* keyword2=4 *){0}\n{4}None{0}\n\n{12}(* keyword3=5 *){0}\n{5}char{0}\n\n{12}(* linenum=6 *){0}\n{6}#12{0}\n\n{12}(* operator=7 *){0}\n{7}*{0}\n\n{12}(* number=8 *){0}\n{8}12{0}\n\n{12}(* char=9 *){0}\n{9}'a'{0}\n\n{12}(* white=10 *){0}\n{12}(* this state can not be reached in caml mode, only SML mode but that stops other states *){0}\n{12}(* SML mode is triggered by \"andalso\" being in the keywords *){0}\n{11}\"\\ \\x\"{0}\n\n{12}(* string=11 *){0}\n{11}\"string\"{0}\n\n{12}(* comment1=13 *){0}\n{12}(* {13}(* comment 1 *){12} *){0}\n\n{12}(* comment2=14 *){0}\n{12}(* {13}(* {14}(* comment 2 *){13} *){12} *){0}\n\n{12}(* comment3=15 *){0}\n{12}(* {13}(* {14}(* {15}(* comment 1 *){14} *){13} *){12}  *){0}\n"
  },
  {
    "path": "lexilla/test/examples/caml/SciTE.properties",
    "content": "lexer.*.ml=caml\nkeywords.*.ml=and xandalso\nkeywords2.*.ml=None\nkeywords3.*.ml=char\n"
  },
  {
    "path": "lexilla/test/examples/cmake/Bug77_0.cmake",
    "content": "if(MSVC80)\n  # 1\nelseif(MSVC90)\n  # 2\nelseif(APPLE)\n  # 3\nelse()\n  # 4\nendif()\n\nif(MSVC80)\n  # 1\nelseif(MSVC90)\n  # 2\nendif()\n\nif(MSVC80)\n  # 1\nelse()\n  # 2\nendif()\n\nif(MSVC80)\n  # 1\nendif()\n"
  },
  {
    "path": "lexilla/test/examples/cmake/Bug77_0.cmake.folded",
    "content": " 2 400 401 + if(MSVC80)\n 0 401 401 |   # 1\n 0 401 401 | elseif(MSVC90)\n 0 401 401 |   # 2\n 0 401 401 | elseif(APPLE)\n 0 401 401 |   # 3\n 0 401 401 | else()\n 0 401 401 |   # 4\n 0 401 400 | endif()\n 0 400 400   \n 2 400 401 + if(MSVC80)\n 0 401 401 |   # 1\n 0 401 401 | elseif(MSVC90)\n 0 401 401 |   # 2\n 0 401 400 | endif()\n 0 400 400   \n 2 400 401 + if(MSVC80)\n 0 401 401 |   # 1\n 0 401 401 | else()\n 0 401 401 |   # 2\n 0 401 400 | endif()\n 0 400 400   \n 2 400 401 + if(MSVC80)\n 0 401 401 |   # 1\n 0 401 400 | endif()\n 0 400 400   "
  },
  {
    "path": "lexilla/test/examples/cmake/Bug77_0.cmake.styled",
    "content": "{11}if{0}({6}MSVC80{0})\n  {1}# 1{0}\n{11}elseif{0}({6}MSVC90{0})\n  {1}# 2{0}\n{11}elseif{0}({6}APPLE{0})\n  {1}# 3{0}\n{11}else{0}()\n  {1}# 4{0}\n{11}endif{0}()\n\n{11}if{0}({6}MSVC80{0})\n  {1}# 1{0}\n{11}elseif{0}({6}MSVC90{0})\n  {1}# 2{0}\n{11}endif{0}()\n\n{11}if{0}({6}MSVC80{0})\n  {1}# 1{0}\n{11}else{0}()\n  {1}# 2{0}\n{11}endif{0}()\n\n{11}if{0}({6}MSVC80{0})\n  {1}# 1{0}\n{11}endif{0}()\n"
  },
  {
    "path": "lexilla/test/examples/cmake/Bug77_1.cmake",
    "content": "if(MSVC80)\n  # 1\nelseif(MSVC90)\n  # 2\nelseif(APPLE)\n  # 3\nelse()\n  # 4\nendif()\n\nif(MSVC80)\n  # 1\nelseif(MSVC90)\n  # 2\nendif()\n\nif(MSVC80)\n  # 1\nelse()\n  # 2\nendif()\n\nif(MSVC80)\n  # 1\nendif()\n"
  },
  {
    "path": "lexilla/test/examples/cmake/Bug77_1.cmake.folded",
    "content": " 2 400 401 + if(MSVC80)\n 0 401 400 |   # 1\n 2 400 401 + elseif(MSVC90)\n 0 401 400 |   # 2\n 2 400 401 + elseif(APPLE)\n 0 401 400 |   # 3\n 2 400 401 + else()\n 0 401 401 |   # 4\n 0 401 400 | endif()\n 0 400 400   \n 2 400 401 + if(MSVC80)\n 0 401 400 |   # 1\n 2 400 401 + elseif(MSVC90)\n 0 401 401 |   # 2\n 0 401 400 | endif()\n 0 400 400   \n 2 400 401 + if(MSVC80)\n 0 401 400 |   # 1\n 2 400 401 + else()\n 0 401 401 |   # 2\n 0 401 400 | endif()\n 0 400 400   \n 2 400 401 + if(MSVC80)\n 0 401 401 |   # 1\n 0 401 400 | endif()\n 0 400 400   "
  },
  {
    "path": "lexilla/test/examples/cmake/Bug77_1.cmake.styled",
    "content": "{11}if{0}({6}MSVC80{0})\n  {1}# 1{0}\n{11}elseif{0}({6}MSVC90{0})\n  {1}# 2{0}\n{11}elseif{0}({6}APPLE{0})\n  {1}# 3{0}\n{11}else{0}()\n  {1}# 4{0}\n{11}endif{0}()\n\n{11}if{0}({6}MSVC80{0})\n  {1}# 1{0}\n{11}elseif{0}({6}MSVC90{0})\n  {1}# 2{0}\n{11}endif{0}()\n\n{11}if{0}({6}MSVC80{0})\n  {1}# 1{0}\n{11}else{0}()\n  {1}# 2{0}\n{11}endif{0}()\n\n{11}if{0}({6}MSVC80{0})\n  {1}# 1{0}\n{11}endif{0}()\n"
  },
  {
    "path": "lexilla/test/examples/cmake/SciTE.properties",
    "content": "lexer.*.cmake=cmake\nkeywords2.*.cmake=MSVC80 MSVC90 APPLE\nfold=1\nfold.at.else=0\n\nmatch Bug77_1.cmake\n\tfold.at.else=1\n"
  },
  {
    "path": "lexilla/test/examples/cobol/229.cob",
    "content": "      * Fix string style to not continue to next line\n\n            DISPLAY MESSAGE BOX\n              \"The following process must be applied to Earnings, Deduct\n      -       \"ions and Company Contributions separately.\"\n\nLP61A            DISPLAY MESSAGE BOX \nlp61b            \"S*** strives to continually develop and improve its pr\nLP61B -          \"oducts and services to deliver more value to our custo\nLP61B -          \"mers.\" \n"
  },
  {
    "path": "lexilla/test/examples/cobol/229.cob.folded",
    "content": " 0 400   0         * Fix string style to not continue to next line\n 0 400   0   \n 0 400   0               DISPLAY MESSAGE BOX\n 0 400   0                 \"The following process must be applied to Earnings, Deduct\n 0 400   0         -       \"ions and Company Contributions separately.\"\n 0 400   0   \n 0 400   0   LP61A            DISPLAY MESSAGE BOX \n 0 400   0   lp61b            \"S*** strives to continually develop and improve its pr\n 0 400   0   LP61B -          \"oducts and services to deliver more value to our custo\n 0 400   0   LP61B -          \"mers.\" \n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/cobol/229.cob.styled",
    "content": "{0}      {2}* Fix string style to not continue to next line{0}\n\n            {11}DISPLAY{0} {11}MESSAGE{0} {11}BOX{0}\n              {6}\"The following process must be applied to Earnings, Deduct{0}\n      {10}-{0}       {6}\"ions and Company Contributions separately.\"{0}\n\n{11}LP61A{0}            {11}DISPLAY{0} {11}MESSAGE{0} {11}BOX{0} \n{11}lp61b{0}            {6}\"S*** strives to continually develop and improve its pr{0}\n{11}LP61B{0} {10}-{0}          {6}\"oducts and services to deliver more value to our custo{0}\n{11}LP61B{0} {10}-{0}          {6}\"mers.\"{0} \n"
  },
  {
    "path": "lexilla/test/examples/cobol/230.cob",
    "content": "      * Keywords starting with V to be identified and styled\n\n      * in list keywords2\n            VARIANCE\n\n      * in list keywords3\n            VARYING\n"
  },
  {
    "path": "lexilla/test/examples/cobol/230.cob.folded",
    "content": " 0 400   0         * Keywords starting with V to be identified and styled\n 0 400   0   \n 0 400   0         * in list keywords2\n 0 400   0               VARIANCE\n 0 400   0   \n 0 400   0         * in list keywords3\n 0 400   0               VARYING\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/cobol/230.cob.styled",
    "content": "{0}      {2}* Keywords starting with V to be identified and styled{0}\n\n      {2}* in list keywords2{0}\n            {16}VARIANCE{0}\n\n      {2}* in list keywords3{0}\n            {8}VARYING{0}\n"
  },
  {
    "path": "lexilla/test/examples/cobol/231.cob",
    "content": "      * Comment preceded by 6 characters to be styled\n      * Include / to be styled as a comment\n\n      * Comment colored in green\nABCDE * Comment colored in green\nABCDEF* Comment NOT colored in green\n      / Comment NOT colored in green\nABCDE / Comment NOT colored in green\nABCDEF/ Comment NOT colored in green\n"
  },
  {
    "path": "lexilla/test/examples/cobol/231.cob.folded",
    "content": " 0 400   0         * Comment preceded by 6 characters to be styled\n 0 400   0         * Include / to be styled as a comment\n 0 400   0   \n 0 400   0         * Comment colored in green\n 0 400   0   ABCDE * Comment colored in green\n 0 400   0   ABCDEF* Comment NOT colored in green\n 0 400   0         / Comment NOT colored in green\n 0 400   0   ABCDE / Comment NOT colored in green\n 0 400   0   ABCDEF/ Comment NOT colored in green\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/cobol/231.cob.styled",
    "content": "{0}      {2}* Comment preceded by 6 characters to be styled{0}\n      {2}* Include / to be styled as a comment{0}\n\n      {2}* Comment colored in green{0}\n{11}ABCDE{0} {2}* Comment colored in green{0}\n{11}ABCDEF{2}* Comment NOT colored in green{0}\n      {2}/ Comment NOT colored in green{0}\n{11}ABCDE{0} {2}/ Comment NOT colored in green{0}\n{11}ABCDEF{2}/ Comment NOT colored in green{0}\n"
  },
  {
    "path": "lexilla/test/examples/cobol/AllStyles.cob",
    "content": "      *     Enumerate all styles: 0, 2 to 11, 16\n      *     SCE_C_COMMENTLINE=2\n\n      *     SCE_C_DEFAULT=0\n             \n\n      *     SCE_C_IDENTIFIER=11\n            identifier\n\n      *     SCE_C_NUMBER=4\n            4\n\n      *     SCE_C_WORD=5\n            data\n\n      *     SCE_C_WORD2=16\n            cancel\n\n      *     SCE_C_UUID=8\n            remarks\n\n      *     SCE_C_COMMENTDOC=3 not implemented\n** at line start\n\n      *     SCE_C_STRING=6\n            \"string\"\n\n      *     SCE_C_CHARACTER=7\n            'c'\n\n      *     SCE_C_PREPROCESSOR=9\n?preprocessor\n\n      *     SCE_C_OPERATOR=10\n            +\n"
  },
  {
    "path": "lexilla/test/examples/cobol/AllStyles.cob.folded",
    "content": " 0 400   0         *     Enumerate all styles: 0, 2 to 11, 16\n 0 400   0         *     SCE_C_COMMENTLINE=2\n 0 400   0   \n 0 400   0         *     SCE_C_DEFAULT=0\n 0 400   0                \n 0 400   0   \n 0 400   0         *     SCE_C_IDENTIFIER=11\n 0 400   0               identifier\n 0 400   0   \n 0 400   0         *     SCE_C_NUMBER=4\n 0 400   0               4\n 0 400   0   \n 0 400   0         *     SCE_C_WORD=5\n 0 400   0               data\n 0 400   0   \n 0 400   0         *     SCE_C_WORD2=16\n 0 400   0               cancel\n 0 400   0   \n 0 400   0         *     SCE_C_UUID=8\n 0 400   0               remarks\n 0 400   0   \n 0 400   0         *     SCE_C_COMMENTDOC=3 not implemented\n 0 400   0   ** at line start\n 0 400   0   \n 0 400   0         *     SCE_C_STRING=6\n 0 400   0               \"string\"\n 0 400   0   \n 0 400   0         *     SCE_C_CHARACTER=7\n 0 400   0               'c'\n 0 400   0   \n 0 400   0         *     SCE_C_PREPROCESSOR=9\n 0 400   0   ?preprocessor\n 0 400   0   \n 0 400   0         *     SCE_C_OPERATOR=10\n 0 400   0               +\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/cobol/AllStyles.cob.styled",
    "content": "{0}      {2}*     Enumerate all styles: 0, 2 to 11, 16{0}\n      {2}*     SCE_C_COMMENTLINE=2{0}\n\n      {2}*     SCE_C_DEFAULT=0{0}\n             \n\n      {2}*     SCE_C_IDENTIFIER=11{0}\n            {11}identifier{0}\n\n      {2}*     SCE_C_NUMBER=4{0}\n            {4}4{0}\n\n      {2}*     SCE_C_WORD=5{0}\n            {5}data{0}\n\n      {2}*     SCE_C_WORD2=16{0}\n            {16}cancel{0}\n\n      {2}*     SCE_C_UUID=8{0}\n            {8}remarks{0}\n\n      {2}*     SCE_C_COMMENTDOC=3 not implemented{0}\n{3}** at line start{0}\n\n      {2}*     SCE_C_STRING=6{0}\n            {6}\"string\"{0}\n\n      {2}*     SCE_C_CHARACTER=7{0}\n            {7}'c'{0}\n\n      {2}*     SCE_C_PREPROCESSOR=9{0}\n{9}?preprocessor{0}\n\n      {2}*     SCE_C_OPERATOR=10{0}\n            {10}+{0}\n"
  },
  {
    "path": "lexilla/test/examples/cobol/SciTE.properties",
    "content": "lexer.*.cob=COBOL\nkeywords.*.cob=data\nkeywords2.*.cob=cancel variance\nkeywords3.*.cob=remarks varying\n"
  },
  {
    "path": "lexilla/test/examples/cpp/130NonAsciiKeyword.cxx",
    "content": "// coding: utf-8\n// All three following symbols should highlight as keywords\ncheese\nkäse\nсыр\n\n// Lookalikes with ASCII so should not highlight:\nсыp\ncыp\n"
  },
  {
    "path": "lexilla/test/examples/cpp/130NonAsciiKeyword.cxx.folded",
    "content": " 0 400 400   // coding: utf-8\n 0 400 400   // All three following symbols should highlight as keywords\n 0 400 400   cheese\n 0 400 400   käse\n 0 400 400   сыр\n 1 400 400   \n 0 400 400   // Lookalikes with ASCII so should not highlight:\n 0 400 400   сыp\n 0 400 400   cыp\n 1 400 400   "
  },
  {
    "path": "lexilla/test/examples/cpp/130NonAsciiKeyword.cxx.styled",
    "content": "{2}// coding: utf-8\n// All three following symbols should highlight as keywords\n{5}cheese{0}\n{5}käse{0}\n{5}сыр{0}\n\n{2}// Lookalikes with ASCII so should not highlight:\n{11}сыp{0}\n{11}cыp{0}\n"
  },
  {
    "path": "lexilla/test/examples/cpp/149KeywordCase.cxx",
    "content": "// SCE_C_WORD2 (16)\nsecond\n\n// SCE_C_IDENTIFIER (11)\nSecond\n\n// SCE_C_IDENTIFIER (11)\nupper\n\n// SCE_C_WORD2 (16)\nUpper\n"
  },
  {
    "path": "lexilla/test/examples/cpp/149KeywordCase.cxx.folded",
    "content": " 0 400 400   // SCE_C_WORD2 (16)\n 0 400 400   second\n 1 400 400   \n 0 400 400   // SCE_C_IDENTIFIER (11)\n 0 400 400   Second\n 1 400 400   \n 0 400 400   // SCE_C_IDENTIFIER (11)\n 0 400 400   upper\n 1 400 400   \n 0 400 400   // SCE_C_WORD2 (16)\n 0 400 400   Upper\n 1 400 400   "
  },
  {
    "path": "lexilla/test/examples/cpp/149KeywordCase.cxx.styled",
    "content": "{2}// SCE_C_WORD2 (16)\n{16}second{0}\n\n{2}// SCE_C_IDENTIFIER (11)\n{11}Second{0}\n\n{2}// SCE_C_IDENTIFIER (11)\n{11}upper{0}\n\n{2}// SCE_C_WORD2 (16)\n{16}Upper{0}\n"
  },
  {
    "path": "lexilla/test/examples/cpp/94Template.cxx",
    "content": "// Test JavaScript template expressions for issue 94\n\n// Basic\nvar basic = `${identifier}`;\n\n// Nested\nvar nested = ` ${ ` ${ 1 } ` } `;\n\n// With escapes\nvar xxx = {\n    '1': `\\`\\u0020\\${a${1 + 1}b}`,\n    '2': `\\${a${ `b${1 + 2}c`.charCodeAt(2) }d}`,\n    '3': `\\${a${ `b${ `c${ JSON.stringify({\n        '4': {},\n        }) }d` }e` }f}`,\n};\n\n// Original request\nfetchOptions.body = `\n{\n\t\"accountNumber\" : \"248796\",\n\t\"customerType\" : \"Shipper\",\n\t\"destinationCity\" : \"${order.destination.city}\",\n\t\"destinationState\" : \"${order.destination.stateProvince}\",\n\t\"destinationZip\" : ${order.destination.postalCode},\n\t\"paymentType\" : \"Prepaid\",\n\t\"shipmentInfo\" :\n\t{\n\t\t\"items\" : [ { \"shipmentClass\" : \"50\", \"shipmentWeight\" : \"${order.totalWeight.toString()}\" } ]\n\t}\n}`;\n"
  },
  {
    "path": "lexilla/test/examples/cpp/94Template.cxx.folded",
    "content": " 0 400 400   // Test JavaScript template expressions for issue 94\n 1 400 400   \n 0 400 400   // Basic\n 0 400 400   var basic = `${identifier}`;\n 1 400 400   \n 0 400 400   // Nested\n 0 400 400   var nested = ` ${ ` ${ 1 } ` } `;\n 1 400 400   \n 0 400 400   // With escapes\n 2 400 401 + var xxx = {\n 0 401 401 |     '1': `\\`\\u0020\\${a${1 + 1}b}`,\n 0 401 401 |     '2': `\\${a${ `b${1 + 2}c`.charCodeAt(2) }d}`,\n 2 401 406 +     '3': `\\${a${ `b${ `c${ JSON.stringify({\n 0 406 406 |         '4': {},\n 0 406 401 |         }) }d` }e` }f}`,\n 0 401 400 | };\n 1 400 400   \n 0 400 400   // Original request\n 0 400 400   fetchOptions.body = `\n 0 400 400   {\n 0 400 400   \t\"accountNumber\" : \"248796\",\n 0 400 400   \t\"customerType\" : \"Shipper\",\n 0 400 400   \t\"destinationCity\" : \"${order.destination.city}\",\n 0 400 400   \t\"destinationState\" : \"${order.destination.stateProvince}\",\n 0 400 400   \t\"destinationZip\" : ${order.destination.postalCode},\n 0 400 400   \t\"paymentType\" : \"Prepaid\",\n 0 400 400   \t\"shipmentInfo\" :\n 0 400 400   \t{\n 0 400 400   \t\t\"items\" : [ { \"shipmentClass\" : \"50\", \"shipmentWeight\" : \"${order.totalWeight.toString()}\" } ]\n 0 400 400   \t}\n 0 400 400   }`;\n 1 400 400   "
  },
  {
    "path": "lexilla/test/examples/cpp/94Template.cxx.styled",
    "content": "{2}// Test JavaScript template expressions for issue 94\n{0}\n{2}// Basic\n{5}var{0} {11}basic{0} {10}={0} {20}`{10}${{11}identifier{10}}{20}`{10};{0}\n\n{2}// Nested\n{5}var{0} {11}nested{0} {10}={0} {20}` {10}${{0} {20}` {10}${{0} {4}1{0} {10}}{20} `{0} {10}}{20} `{10};{0}\n\n{2}// With escapes\n{5}var{0} {11}xxx{0} {10}={0} {10}{{0}\n    {7}'1'{10}:{0} {20}`{27}\\`\\u0020\\${20}{a{10}${{4}1{0} {10}+{0} {4}1{10}}{20}b}`{10},{0}\n    {7}'2'{10}:{0} {20}`{27}\\${20}{a{10}${{0} {20}`b{10}${{4}1{0} {10}+{0} {4}2{10}}{20}c`{10}.{16}charCodeAt{10}({4}2{10}){0} {10}}{20}d}`{10},{0}\n    {7}'3'{10}:{0} {20}`{27}\\${20}{a{10}${{0} {20}`b{10}${{0} {20}`c{10}${{0} {19}JSON{10}.{16}stringify{10}({{0}\n        {7}'4'{10}:{0} {10}{},{0}\n        {10}}){0} {10}}{20}d`{0} {10}}{20}e`{0} {10}}{20}f}`{10},{0}\n{10}};{0}\n\n{2}// Original request\n{11}fetchOptions{10}.{11}body{0} {10}={0} {20}`\n{\n\t\"accountNumber\" : \"248796\",\n\t\"customerType\" : \"Shipper\",\n\t\"destinationCity\" : \"{10}${{11}order{10}.{11}destination{10}.{11}city{10}}{20}\",\n\t\"destinationState\" : \"{10}${{11}order{10}.{11}destination{10}.{11}stateProvince{10}}{20}\",\n\t\"destinationZip\" : {10}${{11}order{10}.{11}destination{10}.{11}postalCode{10}}{20},\n\t\"paymentType\" : \"Prepaid\",\n\t\"shipmentInfo\" :\n\t{\n\t\t\"items\" : [ { \"shipmentClass\" : \"50\", \"shipmentWeight\" : \"{10}${{11}order{10}.{11}totalWeight{10}.{11}toString{10}()}{20}\" } ]\n\t}\n}`{10};{0}\n"
  },
  {
    "path": "lexilla/test/examples/cpp/AllStyles.cxx",
    "content": "// Enumerate all primary styles: 0 to 27 and secondary styles 64 to 91\n\n// default=0\n   \n\n// comment=1\n/* */\n\n/* commentline=2 */\n// example line\n\n// commentdoc=3\n/** */\n\n// number=4\n123\n\n// word=5\nint\n\n// string=6\n\"string\"\n\n// character=7\n'c'\n\n// uuid=8\nuuid(3fd43029-1354-42f0-a5be-4a484c9c5250)\n\n// preprocessor=9\n#define xxx 1\n\n// operator=10\n{}\n\n// identifier=11\nidentifier\n\n// stringeol=12\n\"\n\n// verbatim=13\n@\"verbatim\"\n\n// regex=14\n(/regex/)\n\n// commentlinedoc=15\n/// example\n\n// word2=16\nsecond\n\n// commentdockeyword=17\n/** @file */\n\n// commentdockeyworderror=18\n/** @wrongkey */\n\n// globalclass=19\nglobal\n\n// stringraw=20\nR\"( )\"\n\n// tripleverbatim=21\n\"\"\" xx \"\"\"\n\n// hashquotedstring=22\n#\" xx \"\n\n// preprocessorcomment=23\n#define /* comment */\n\n// preprocessorcommentdoc=24\n#define /** comment */\n\n// userliteral=25\n1_date_\n\n// taskmarker=26\n/* TODO: sleep */\n\n// escapesequence=27\n\"\\001 \\b\"\n\n// identifier substyles.11.1=128\nvector\n\n// identifier substyles.11.2=129\nstd\n\n// commentdockeyword substyles.17.1=130\n/** @module */\n\n// Secondary styles inside preprocessor excluded section\n\n#if 0\n\n// default=0\n   \n\n// comment=1\n/* */\n\n/* commentline=2 */\n// example line\n\n// commentdoc=3\n/** */\n\n// number=4\n123\n\n// word=5\nint\n\n// string=6\n\"string\"\n\n// character=7\n'c'\n\n// uuid=8\nuuid(3fd43029-1354-42f0-a5be-4a484c9c5250)\n\n// preprocessor=9\n#define xxx 1\n\n// operator=10\n{}\n\n// identifier=11\nidentifier\n\n// stringeol=12\n\"\n\n// verbatim=13\n@\"verbatim\"\n\n// regex=14\n(/regex/)\n\n// commentlinedoc=15\n/// example\n\n// word2=16\nsecond\n\n// commentdockeyword=17\n/** @file */\n\n// commentdockeyworderror=18\n/** @wrongkey */\n\n// globalclass=19\nglobal\n\n// stringraw=20\nR\"( )\"\n\n// tripleverbatim=21\n\"\"\" xx \"\"\"\n\n// hashquotedstring=22\n#\" xx \"\n\n// preprocessorcomment=23\n#define /* comment */\n\n// preprocessorcommentdoc=24\n#define /** comment */\n\n// userliteral=25\n1_date_\n\n// taskmarker=26\n/* TODO: sleep */\n\n// escapesequence=27\n\"\\001 \\b\"\n\n// identifier substyles.75.1=192\nvector\n\n// identifier substyles.75.2=193\nstd\n\n// commentdockeyword substyles.81.1=194\n/** @module */\n\n#endif\n"
  },
  {
    "path": "lexilla/test/examples/cpp/AllStyles.cxx.folded",
    "content": " 0 400 400   // Enumerate all primary styles: 0 to 27 and secondary styles 64 to 91\n 1 400 400   \n 0 400 400   // default=0\n 1 400 400      \n 1 400 400   \n 0 400 400   // comment=1\n 0 400 400   /* */\n 1 400 400   \n 0 400 400   /* commentline=2 */\n 0 400 400   // example line\n 1 400 400   \n 0 400 400   // commentdoc=3\n 0 400 400   /** */\n 1 400 400   \n 0 400 400   // number=4\n 0 400 400   123\n 1 400 400   \n 0 400 400   // word=5\n 0 400 400   int\n 1 400 400   \n 0 400 400   // string=6\n 0 400 400   \"string\"\n 1 400 400   \n 0 400 400   // character=7\n 0 400 400   'c'\n 1 400 400   \n 0 400 400   // uuid=8\n 0 400 400   uuid(3fd43029-1354-42f0-a5be-4a484c9c5250)\n 1 400 400   \n 0 400 400   // preprocessor=9\n 0 400 400   #define xxx 1\n 1 400 400   \n 0 400 400   // operator=10\n 0 400 400   {}\n 1 400 400   \n 0 400 400   // identifier=11\n 0 400 400   identifier\n 1 400 400   \n 0 400 400   // stringeol=12\n 0 400 400   \"\n 1 400 400   \n 0 400 400   // verbatim=13\n 0 400 400   @\"verbatim\"\n 1 400 400   \n 0 400 400   // regex=14\n 0 400 400   (/regex/)\n 1 400 400   \n 0 400 400   // commentlinedoc=15\n 0 400 400   /// example\n 1 400 400   \n 0 400 400   // word2=16\n 0 400 400   second\n 1 400 400   \n 0 400 400   // commentdockeyword=17\n 0 400 400   /** @file */\n 1 400 400   \n 0 400 400   // commentdockeyworderror=18\n 0 400 400   /** @wrongkey */\n 1 400 400   \n 0 400 400   // globalclass=19\n 0 400 400   global\n 1 400 400   \n 0 400 400   // stringraw=20\n 0 400 400   R\"( )\"\n 1 400 400   \n 0 400 400   // tripleverbatim=21\n 0 400 400   \"\"\" xx \"\"\"\n 1 400 400   \n 0 400 400   // hashquotedstring=22\n 0 400 400   #\" xx \"\n 1 400 400   \n 0 400 400   // preprocessorcomment=23\n 0 400 400   #define /* comment */\n 1 400 400   \n 0 400 400   // preprocessorcommentdoc=24\n 0 400 400   #define /** comment */\n 1 400 400   \n 0 400 400   // userliteral=25\n 0 400 400   1_date_\n 1 400 400   \n 0 400 400   // taskmarker=26\n 0 400 400   /* TODO: sleep */\n 1 400 400   \n 0 400 400   // escapesequence=27\n 0 400 400   \"\\001 \\b\"\n 1 400 400   \n 0 400 400   // identifier substyles.11.1=128\n 0 400 400   vector\n 1 400 400   \n 0 400 400   // identifier substyles.11.2=129\n 0 400 400   std\n 1 400 400   \n 0 400 400   // commentdockeyword substyles.17.1=130\n 0 400 400   /** @module */\n 1 400 400   \n 0 400 400   // Secondary styles inside preprocessor excluded section\n 1 400 400   \n 2 400 401 + #if 0\n 1 401 401 | \n 0 401 401 | // default=0\n 1 401 401 |    \n 1 401 401 | \n 0 401 401 | // comment=1\n 0 401 401 | /* */\n 1 401 401 | \n 0 401 401 | /* commentline=2 */\n 0 401 401 | // example line\n 1 401 401 | \n 0 401 401 | // commentdoc=3\n 0 401 401 | /** */\n 1 401 401 | \n 0 401 401 | // number=4\n 0 401 401 | 123\n 1 401 401 | \n 0 401 401 | // word=5\n 0 401 401 | int\n 1 401 401 | \n 0 401 401 | // string=6\n 0 401 401 | \"string\"\n 1 401 401 | \n 0 401 401 | // character=7\n 0 401 401 | 'c'\n 1 401 401 | \n 0 401 401 | // uuid=8\n 0 401 401 | uuid(3fd43029-1354-42f0-a5be-4a484c9c5250)\n 1 401 401 | \n 0 401 401 | // preprocessor=9\n 0 401 401 | #define xxx 1\n 1 401 401 | \n 0 401 401 | // operator=10\n 0 401 401 | {}\n 1 401 401 | \n 0 401 401 | // identifier=11\n 0 401 401 | identifier\n 1 401 401 | \n 0 401 401 | // stringeol=12\n 0 401 401 | \"\n 1 401 401 | \n 0 401 401 | // verbatim=13\n 0 401 401 | @\"verbatim\"\n 1 401 401 | \n 0 401 401 | // regex=14\n 0 401 401 | (/regex/)\n 1 401 401 | \n 0 401 401 | // commentlinedoc=15\n 0 401 401 | /// example\n 1 401 401 | \n 0 401 401 | // word2=16\n 0 401 401 | second\n 1 401 401 | \n 0 401 401 | // commentdockeyword=17\n 0 401 401 | /** @file */\n 1 401 401 | \n 0 401 401 | // commentdockeyworderror=18\n 0 401 401 | /** @wrongkey */\n 1 401 401 | \n 0 401 401 | // globalclass=19\n 0 401 401 | global\n 1 401 401 | \n 0 401 401 | // stringraw=20\n 0 401 401 | R\"( )\"\n 1 401 401 | \n 0 401 401 | // tripleverbatim=21\n 0 401 401 | \"\"\" xx \"\"\"\n 1 401 401 | \n 0 401 401 | // hashquotedstring=22\n 0 401 401 | #\" xx \"\n 1 401 401 | \n 0 401 401 | // preprocessorcomment=23\n 0 401 401 | #define /* comment */\n 1 401 401 | \n 0 401 401 | // preprocessorcommentdoc=24\n 0 401 401 | #define /** comment */\n 1 401 401 | \n 0 401 401 | // userliteral=25\n 0 401 401 | 1_date_\n 1 401 401 | \n 0 401 401 | // taskmarker=26\n 0 401 401 | /* TODO: sleep */\n 1 401 401 | \n 0 401 401 | // escapesequence=27\n 0 401 401 | \"\\001 \\b\"\n 1 401 401 | \n 0 401 401 | // identifier substyles.75.1=192\n 0 401 401 | vector\n 1 401 401 | \n 0 401 401 | // identifier substyles.75.2=193\n 0 401 401 | std\n 1 401 401 | \n 0 401 401 | // commentdockeyword substyles.81.1=194\n 0 401 401 | /** @module */\n 1 401 401 | \n 0 401 400 | #endif\n 1 400 400   "
  },
  {
    "path": "lexilla/test/examples/cpp/AllStyles.cxx.styled",
    "content": "{2}// Enumerate all primary styles: 0 to 27 and secondary styles 64 to 91\n{0}\n{2}// default=0\n{0}   \n\n{2}// comment=1\n{1}/* */{0}\n\n{1}/* commentline=2 */{0}\n{2}// example line\n{0}\n{2}// commentdoc=3\n{3}/** */{0}\n\n{2}// number=4\n{4}123{0}\n\n{2}// word=5\n{5}int{0}\n\n{2}// string=6\n{6}\"string\"{0}\n\n{2}// character=7\n{7}'c'{0}\n\n{2}// uuid=8\n{5}uuid{10}({8}3fd43029-1354-42f0-a5be-4a484c9c5250{10}){0}\n\n{2}// preprocessor=9\n{9}#define xxx 1\n{0}\n{2}// operator=10\n{10}{}{0}\n\n{2}// identifier=11\n{11}identifier{0}\n\n{2}// stringeol=12\n{12}\"\n{0}\n{2}// verbatim=13\n{13}@\"verbatim\"{0}\n\n{2}// regex=14\n{10}({14}/regex/{10}){0}\n\n{2}// commentlinedoc=15\n{15}/// example\n{0}\n{2}// word2=16\n{16}second{0}\n\n{2}// commentdockeyword=17\n{3}/** {17}@file{3} */{0}\n\n{2}// commentdockeyworderror=18\n{3}/** {18}@wrongkey{3} */{0}\n\n{2}// globalclass=19\n{19}global{0}\n\n{2}// stringraw=20\n{20}R\"( )\"{0}\n\n{2}// tripleverbatim=21\n{21}\"\"\" xx \"\"\"{0}\n\n{2}// hashquotedstring=22\n{22}#\" xx \"{0}\n\n{2}// preprocessorcomment=23\n{9}#define {23}/* comment */{9}\n{0}\n{2}// preprocessorcommentdoc=24\n{9}#define {24}/** comment */{9}\n{0}\n{2}// userliteral=25\n{25}1_date_{0}\n\n{2}// taskmarker=26\n{1}/* {26}TODO{1}: sleep */{0}\n\n{2}// escapesequence=27\n{6}\"{27}\\001{6} {27}\\b{6}\"{0}\n\n{2}// identifier substyles.11.1=128\n{128}vector{0}\n\n{2}// identifier substyles.11.2=129\n{129}std{0}\n\n{2}// commentdockeyword substyles.17.1=130\n{3}/** {130}@module{3} */{0}\n\n{2}// Secondary styles inside preprocessor excluded section\n{0}\n{9}#if 0\n{64}\n{66}// default=0\n{64}   \n\n{66}// comment=1\n{65}/* */{64}\n\n{65}/* commentline=2 */{64}\n{66}// example line\n{64}\n{66}// commentdoc=3\n{67}/** */{64}\n\n{66}// number=4\n{68}123{64}\n\n{66}// word=5\n{69}int{64}\n\n{66}// string=6\n{70}\"string\"{64}\n\n{66}// character=7\n{71}'c'{64}\n\n{66}// uuid=8\n{69}uuid{74}({72}3fd43029-1354-42f0-a5be-4a484c9c5250{74}){64}\n\n{66}// preprocessor=9\n{73}#define xxx 1\n{64}\n{66}// operator=10\n{74}{}{64}\n\n{66}// identifier=11\n{75}identifier{64}\n\n{66}// stringeol=12\n{76}\"\n{64}\n{66}// verbatim=13\n{77}@\"verbatim\"{64}\n\n{66}// regex=14\n{74}({78}/regex/{74}){64}\n\n{66}// commentlinedoc=15\n{79}/// example\n{64}\n{66}// word2=16\n{80}second{64}\n\n{66}// commentdockeyword=17\n{67}/** {81}@file{67} */{64}\n\n{66}// commentdockeyworderror=18\n{67}/** {82}@wrongkey{67} */{64}\n\n{66}// globalclass=19\n{83}global{64}\n\n{66}// stringraw=20\n{84}R\"( )\"{64}\n\n{66}// tripleverbatim=21\n{85}\"\"\" xx \"\"\"{64}\n\n{66}// hashquotedstring=22\n{86}#\" xx \"{64}\n\n{66}// preprocessorcomment=23\n{73}#define {87}/* comment */{73}\n{64}\n{66}// preprocessorcommentdoc=24\n{73}#define {88}/** comment */{73}\n{64}\n{66}// userliteral=25\n{89}1_date_{64}\n\n{66}// taskmarker=26\n{65}/* {90}TODO{65}: sleep */{64}\n\n{66}// escapesequence=27\n{70}\"{91}\\001{70} {91}\\b{70}\"{64}\n\n{66}// identifier substyles.75.1=192\n{192}vector{64}\n\n{66}// identifier substyles.75.2=193\n{193}std{64}\n\n{66}// commentdockeyword substyles.81.1=194\n{67}/** {194}@module{67} */{64}\n\n{9}#endif\n"
  },
  {
    "path": "lexilla/test/examples/cpp/Bug2245.cxx",
    "content": "int i;\n#if 1\ni=1;\n#\ni=2;\n#else\ni=3;\n#endif\ni=4;\n#elif 1\ni=5;\n#else\ni=6;\n"
  },
  {
    "path": "lexilla/test/examples/cpp/Bug2245.cxx.folded",
    "content": " 0 400 400   int i;\n 2 400 401 + #if 1\n 0 401 401 | i=1;\n 0 401 401 | #\n 0 401 401 | i=2;\n 0 401 401 | #else\n 0 401 401 | i=3;\n 0 401 400 | #endif\n 0 400 400   i=4;\n 0 400 400   #elif 1\n 0 400 400   i=5;\n 0 400 400   #else\n 0 400 400   i=6;\n 1 400 400   "
  },
  {
    "path": "lexilla/test/examples/cpp/Bug2245.cxx.styled",
    "content": "{5}int{0} {11}i{10};{0}\n{9}#if 1\n{11}i{10}={4}1{10};{0}\n{9}#\n{11}i{10}={4}2{10};{0}\n{9}#else\n{75}i{74}={68}3{74};{64}\n{9}#endif\n{11}i{10}={4}4{10};{0}\n{9}#elif 1\n{11}i{10}={4}5{10};{0}\n{9}#else\n{11}i{10}={4}6{10};{0}\n"
  },
  {
    "path": "lexilla/test/examples/cpp/SciTE.properties",
    "content": "# coding: utf-8\nlexer.*.cxx=cpp\nkeywords.*.cxx=int let uuid var\nkeywords2.*.cxx=charCodeAt second stringify Upper\nkeywords3.*.cxx=file\nkeywords4.*.cxx=global JSON\nkeywords5.*.cxx=HAVE_COLOUR FEATURE=2 VERSION(a,b)=a+b\nkeywords6.*.cxx=TODO\n\nsubstyles.cpp.11=2\nsubstylewords.11.1.*.cxx=map string vector\nsubstylewords.11.2.*.cxx=std gsl\n\nsubstyles.cpp.17=1\nsubstylewords.17.1.*.cxx=module\n\nlexer.cpp.track.preprocessor=1\nlexer.cpp.escape.sequence=1\n# Set options so that AllStyles.cxx can show every style\nstyling.within.preprocessor=0\nlexer.cpp.triplequoted.strings=1\nlexer.cpp.hashquoted.strings=1\nlexer.cpp.backquoted.strings=2\n\nfold=1\nfold.preprocessor=1\nfold.comment=1\nfold.compact=1\n\nmatch 130NonAsciiKeyword.cxx\n\tkeywords.*.cxx=cheese käse сыр\n"
  },
  {
    "path": "lexilla/test/examples/cpp/x.cxx",
    "content": "// A demonstration program\n#include <stdio.h>\n#if 0 /* */\n#define DUMMY() \\\n\tif (1);\n#endif\n\n// Test preprocessor expressions with parentheses \n#if ((0))\na\n#elif ((1))\nb\n#endif\n\n/** @file LexCPP.cxx\n <file>\n <file >filename</file>\n LexCPP.cxx.\n </file>\n **/\n\n/** Unknown doc keywords so in SCE_C_COMMENTDOCKEYWORDERROR:\n @wrong LexCPP.cxx\n <wrong>filename</wrong>\n**/\n\n#define M\\\n\n\\\n \n\n// Test preprocessor active branches feature\n\n#if HAVE_COLOUR\n// Active\n#endif\n#if NOT_HAVE_COLOUR\n// Inactive\n#endif\n\n#if FEATURE==2\n// Active\n#endif\n#if FEATURE==3\n// Inactive\n#endif\n\n#if VERSION(1,2)==3\n// Active\n#endif\n#if VERSION(1,2)==4\n// Inactive\n#endif\n\n#undef HAVE_COLOUR\n#if HAVE_COLOUR\n// Inactive\n#endif\n\n#define MULTIPLY(a,b) a*b\n#if MULTIPLY(2,3)==6\n// Active\n#endif\n\nint main() {\n\tdouble x[] = {3.14159,6.02e23,1.6e-19,1.0+1};\n\tint y[] = {75,0113,0x4b};\n\tprintf(\"hello world %d %g\\n\", y[0], x[0]);\n\n\t// JavaScript regular expression (14) tests\n\tlet a = /a/;\n\tlet b = /[a-z]+/gi;\n\n\t// Escape sequence (27) tests\n\tprintf(\"\\'\\\"\\?\\\\\\a\\b\\f\\n\\r\\t\\v \\P\");\n\tprintf(\"\\0a \\013a \\019\");\n\tprintf(\"\\x013ac \\xdz\");\n\tprintf(\"\\ua34df \\uz\");\n\tprintf(\"\\Ua34df7833 \\Uz\");\n}\n"
  },
  {
    "path": "lexilla/test/examples/cpp/x.cxx.folded",
    "content": " 0 400 400   // A demonstration program\n 0 400 400   #include <stdio.h>\n 2 400 401 + #if 0 /* */\n 0 401 401 | #define DUMMY() \\\n 0 401 401 | \tif (1);\n 0 401 400 | #endif\n 1 400 400   \n 0 400 400   // Test preprocessor expressions with parentheses \n 2 400 401 + #if ((0))\n 0 401 401 | a\n 0 401 401 | #elif ((1))\n 0 401 401 | b\n 0 401 400 | #endif\n 1 400 400   \n 2 400 401 + /** @file LexCPP.cxx\n 0 401 401 |  <file>\n 0 401 401 |  <file >filename</file>\n 0 401 401 |  LexCPP.cxx.\n 0 401 401 |  </file>\n 0 401 400 |  **/\n 1 400 400   \n 2 400 401 + /** Unknown doc keywords so in SCE_C_COMMENTDOCKEYWORDERROR:\n 0 401 401 |  @wrong LexCPP.cxx\n 0 401 401 |  <wrong>filename</wrong>\n 0 401 400 | **/\n 1 400 400   \n 0 400 400   #define M\\\n 1 400 400   \n 0 400 400   \\\n 1 400 400    \n 1 400 400   \n 0 400 400   // Test preprocessor active branches feature\n 1 400 400   \n 2 400 401 + #if HAVE_COLOUR\n 0 401 401 | // Active\n 0 401 400 | #endif\n 2 400 401 + #if NOT_HAVE_COLOUR\n 0 401 401 | // Inactive\n 0 401 400 | #endif\n 1 400 400   \n 2 400 401 + #if FEATURE==2\n 0 401 401 | // Active\n 0 401 400 | #endif\n 2 400 401 + #if FEATURE==3\n 0 401 401 | // Inactive\n 0 401 400 | #endif\n 1 400 400   \n 2 400 401 + #if VERSION(1,2)==3\n 0 401 401 | // Active\n 0 401 400 | #endif\n 2 400 401 + #if VERSION(1,2)==4\n 0 401 401 | // Inactive\n 0 401 400 | #endif\n 1 400 400   \n 0 400 400   #undef HAVE_COLOUR\n 2 400 401 + #if HAVE_COLOUR\n 0 401 401 | // Inactive\n 0 401 400 | #endif\n 1 400 400   \n 0 400 400   #define MULTIPLY(a,b) a*b\n 2 400 401 + #if MULTIPLY(2,3)==6\n 0 401 401 | // Active\n 0 401 400 | #endif\n 1 400 400   \n 2 400 401 + int main() {\n 0 401 401 | \tdouble x[] = {3.14159,6.02e23,1.6e-19,1.0+1};\n 0 401 401 | \tint y[] = {75,0113,0x4b};\n 0 401 401 | \tprintf(\"hello world %d %g\\n\", y[0], x[0]);\n 1 401 401 | \n 0 401 401 | \t// JavaScript regular expression (14) tests\n 0 401 401 | \tlet a = /a/;\n 0 401 401 | \tlet b = /[a-z]+/gi;\n 1 401 401 | \n 0 401 401 | \t// Escape sequence (27) tests\n 0 401 401 | \tprintf(\"\\'\\\"\\?\\\\\\a\\b\\f\\n\\r\\t\\v \\P\");\n 0 401 401 | \tprintf(\"\\0a \\013a \\019\");\n 0 401 401 | \tprintf(\"\\x013ac \\xdz\");\n 0 401 401 | \tprintf(\"\\ua34df \\uz\");\n 0 401 401 | \tprintf(\"\\Ua34df7833 \\Uz\");\n 0 401 400 | }\n 1 400 400   "
  },
  {
    "path": "lexilla/test/examples/cpp/x.cxx.styled",
    "content": "{2}// A demonstration program\n{9}#include <stdio.h>\n#if 0 {23}/* */{9}\n{73}#define DUMMY() \\\n\tif (1);\n{9}#endif\n{0}\n{2}// Test preprocessor expressions with parentheses \n{9}#if ((0))\n{75}a{64}\n{9}#elif ((1))\n{11}b{0}\n{9}#endif\n{0}\n{3}/** {17}@file{3} LexCPP.cxx\n <{17}file{3}>\n <{17}file{3} >filename</{17}file{3}>\n LexCPP.cxx.\n </{17}file{3}>\n **/{0}\n\n{3}/** Unknown doc keywords so in SCE_C_COMMENTDOCKEYWORDERROR:\n {18}@wrong{3} LexCPP.cxx\n <{18}wrong{3}>filename</{18}wrong{3}>\n**/{0}\n\n{9}#define M\\\n\n{0}\\\n \n\n{2}// Test preprocessor active branches feature\n{0}\n{9}#if HAVE_COLOUR\n{2}// Active\n{9}#endif\n#if NOT_HAVE_COLOUR\n{66}// Inactive\n{9}#endif\n{0}\n{9}#if FEATURE==2\n{2}// Active\n{9}#endif\n#if FEATURE==3\n{66}// Inactive\n{9}#endif\n{0}\n{9}#if VERSION(1,2)==3\n{2}// Active\n{9}#endif\n#if VERSION(1,2)==4\n{66}// Inactive\n{9}#endif\n{0}\n{9}#undef HAVE_COLOUR\n#if HAVE_COLOUR\n{66}// Inactive\n{9}#endif\n{0}\n{9}#define MULTIPLY(a,b) a*b\n#if MULTIPLY(2,3)==6\n{2}// Active\n{9}#endif\n{0}\n{5}int{0} {11}main{10}(){0} {10}{{0}\n\t{11}double{0} {11}x{10}[]{0} {10}={0} {10}{{4}3.14159{10},{4}6.02e23{10},{4}1.6e-19{10},{4}1.0{10}+{4}1{10}};{0}\n\t{5}int{0} {11}y{10}[]{0} {10}={0} {10}{{4}75{10},{4}0113{10},{4}0x4b{10}};{0}\n\t{11}printf{10}({6}\"hello world %d %g{27}\\n{6}\"{10},{0} {11}y{10}[{4}0{10}],{0} {11}x{10}[{4}0{10}]);{0}\n\n\t{2}// JavaScript regular expression (14) tests\n{0}\t{5}let{0} {11}a{0} {10}={0} {14}/a/{10};{0}\n\t{5}let{0} {11}b{0} {10}={0} {14}/[a-z]+/gi{10};{0}\n\n\t{2}// Escape sequence (27) tests\n{0}\t{11}printf{10}({6}\"{27}\\'\\\"\\?\\\\\\a\\b\\f\\n\\r\\t\\v{6} {27}\\P{6}\"{10});{0}\n\t{11}printf{10}({6}\"{27}\\0{6}a {27}\\013{6}a {27}\\01{6}9\"{10});{0}\n\t{11}printf{10}({6}\"{27}\\x013a{6}c {27}\\xd{6}z\"{10});{0}\n\t{11}printf{10}({6}\"{27}\\ua34d{6}f {27}\\u{6}z\"{10});{0}\n\t{11}printf{10}({6}\"{27}\\Ua34df783{6}3 {27}\\U{6}z\"{10});{0}\n{10}}{0}\n"
  },
  {
    "path": "lexilla/test/examples/css/AllStyles.css",
    "content": "/* Enumerate all styles: 0 to 23 */\n\n/* comment=9 */\n\n/* whitespace=0 */\n\t/* */\n\n/* tag=1 */\nhtml/**/\n{}\n\n/* class=2 */\n.hidden\n{}\n\n/* pseudoclass=3 */\n:link\n{}\n\n/* unknown pseudoclass=4 */\n:unknown\n{}\n\n/* operator=5 */\n#\n{}\n\n/* identifier=6 */\n*{margin:}\n\n/* unknown identifier=7 */\n*{unknown:}\n\n/* value=8 */\n*{:88}\n\n/* identifier=10 */\n#identifier\n{}\n\n/* important=11 */\n* { margin: 0 ! important; }\n\n/* directive=12 */\n@directive\n{ }\n\n/* doublestring=13 */\n* { font-family: \"doublestring\"; }\n\n/* singlestring=14 */\n* { font-family: 'singlestring'; }\n\n/* identifier2=15 */\n* { identifier2: 0}\n\n/* attribute=16 */\n[attribute]\n{}\n\n/* identifier3=17 */\n* { identifier3: 0}\n\n/* pseudoelement=18 */\n::pseudoelement\n{}\n\n/* extended_identifier=19 */\n* { extended_identifier: 0}\n\n/* extended_pseudoclass=20 */\n:extended_pseudoclass\n{}\n\n/* extended_pseudoelement=21 */\n::extended_pseudo_element\n{}\n\n/* media=22 */\n@media (orientation: portrait)\n{ }\n\n/* group rule=22 */\n@supports ( display: flex ) {\n  body { display: flex; }\n}\n\n/* variable=23 */\n$variable:#428bca;\n"
  },
  {
    "path": "lexilla/test/examples/css/AllStyles.css.folded",
    "content": " 0 400   0   /* Enumerate all styles: 0 to 23 */\n 0 400   0   \n 0 400   0   /* comment=9 */\n 0 400   0   \n 0 400   0   /* whitespace=0 */\n 0 400   0   \t/* */\n 0 400   0   \n 0 400   0   /* tag=1 */\n 0 400   0   html/**/\n 0 400   0   {}\n 0 400   0   \n 0 400   0   /* class=2 */\n 0 400   0   .hidden\n 0 400   0   {}\n 0 400   0   \n 0 400   0   /* pseudoclass=3 */\n 0 400   0   :link\n 0 400   0   {}\n 0 400   0   \n 0 400   0   /* unknown pseudoclass=4 */\n 0 400   0   :unknown\n 0 400   0   {}\n 0 400   0   \n 0 400   0   /* operator=5 */\n 0 400   0   #\n 0 400   0   {}\n 0 400   0   \n 0 400   0   /* identifier=6 */\n 0 400   0   *{margin:}\n 0 400   0   \n 0 400   0   /* unknown identifier=7 */\n 0 400   0   *{unknown:}\n 0 400   0   \n 0 400   0   /* value=8 */\n 0 400   0   *{:88}\n 0 400   0   \n 0 400   0   /* identifier=10 */\n 0 400   0   #identifier\n 0 400   0   {}\n 0 400   0   \n 0 400   0   /* important=11 */\n 0 400   0   * { margin: 0 ! important; }\n 0 400   0   \n 0 400   0   /* directive=12 */\n 0 400   0   @directive\n 0 400   0   { }\n 0 400   0   \n 0 400   0   /* doublestring=13 */\n 0 400   0   * { font-family: \"doublestring\"; }\n 0 400   0   \n 0 400   0   /* singlestring=14 */\n 0 400   0   * { font-family: 'singlestring'; }\n 0 400   0   \n 0 400   0   /* identifier2=15 */\n 0 400   0   * { identifier2: 0}\n 0 400   0   \n 0 400   0   /* attribute=16 */\n 0 400   0   [attribute]\n 0 400   0   {}\n 0 400   0   \n 0 400   0   /* identifier3=17 */\n 0 400   0   * { identifier3: 0}\n 0 400   0   \n 0 400   0   /* pseudoelement=18 */\n 0 400   0   ::pseudoelement\n 0 400   0   {}\n 0 400   0   \n 0 400   0   /* extended_identifier=19 */\n 0 400   0   * { extended_identifier: 0}\n 0 400   0   \n 0 400   0   /* extended_pseudoclass=20 */\n 0 400   0   :extended_pseudoclass\n 0 400   0   {}\n 0 400   0   \n 0 400   0   /* extended_pseudoelement=21 */\n 0 400   0   ::extended_pseudo_element\n 0 400   0   {}\n 0 400   0   \n 0 400   0   /* media=22 */\n 0 400   0   @media (orientation: portrait)\n 0 400   0   { }\n 0 400   0   \n 0 400   0   /* group rule=22 */\n 0 400   0   @supports ( display: flex ) {\n 0 400   0     body { display: flex; }\n 0 400   0   }\n 0 400   0   \n 0 400   0   /* variable=23 */\n 0 400   0   $variable:#428bca;\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/css/AllStyles.css.styled",
    "content": "{9}/* Enumerate all styles: 0 to 23 */{0}\n\n{9}/* comment=9 */{0}\n\n{9}/* whitespace=0 */{0}\n\t{9}/* */{0}\n\n{9}/* tag=1 */{0}\n{1}html{9}/**/{1}\n{5}{}{0}\n\n{9}/* class=2 */{0}\n{5}.{2}hidden{1}\n{5}{}{0}\n\n{9}/* pseudoclass=3 */{0}\n{5}:{3}link{1}\n{5}{}{0}\n\n{9}/* unknown pseudoclass=4 */{0}\n{5}:{4}unknown{1}\n{5}{}{0}\n\n{9}/* operator=5 */{0}\n{5}#{1}\n{5}{}{0}\n\n{9}/* identifier=6 */{0}\n{1}*{5}{{6}margin{5}:}{0}\n\n{9}/* unknown identifier=7 */{0}\n{1}*{5}{{7}unknown{5}:}{0}\n\n{9}/* value=8 */{0}\n{1}*{5}{:{8}88{5}}{0}\n\n{9}/* identifier=10 */{0}\n{5}#{10}identifier{1}\n{5}{}{0}\n\n{9}/* important=11 */{0}\n{1}* {5}{{6} margin{5}:{8} 0 {5}!{11} important{5};{6} {5}}{0}\n\n{9}/* directive=12 */{0}\n{5}@{12}directive\n{5}{{6} {5}}{0}\n\n{9}/* doublestring=13 */{0}\n{1}* {5}{{7} font-family{5}:{8} {13}\"doublestring\"{5};{6} {5}}{0}\n\n{9}/* singlestring=14 */{0}\n{1}* {5}{{7} font-family{5}:{8} {14}'singlestring'{5};{6} {5}}{0}\n\n{9}/* identifier2=15 */{0}\n{1}* {5}{{15} identifier2{5}:{8} 0{5}}{0}\n\n{9}/* attribute=16 */{0}\n{5}[{16}attribute{5}]{1}\n{5}{}{0}\n\n{9}/* identifier3=17 */{0}\n{1}* {5}{{17} identifier3{5}:{8} 0{5}}{0}\n\n{9}/* pseudoelement=18 */{0}\n{5}::{18}pseudoelement{1}\n{5}{}{0}\n\n{9}/* extended_identifier=19 */{0}\n{1}* {5}{{19} extended_identifier{5}:{8} 0{5}}{0}\n\n{9}/* extended_pseudoclass=20 */{0}\n{5}:{20}extended_pseudoclass{1}\n{5}{}{0}\n\n{9}/* extended_pseudoelement=21 */{0}\n{5}::{21}extended_pseudo_element{1}\n{5}{}{0}\n\n{9}/* media=22 */{0}\n{5}@{22}media (orientation: portrait)\n{5}{{0} {5}}{0}\n\n{9}/* group rule=22 */{0}\n{5}@{22}supports ( display: flex ) {5}{{0}\n  {1}body {5}{{7} display{5}:{8} flex{5};{6} {5}}{6}\n{5}}{0}\n\n{9}/* variable=23 */{0}\n{23}$variable{5}:{8}#428bca{5};{0}\n"
  },
  {
    "path": "lexilla/test/examples/css/SciTE.properties",
    "content": "lexer.*.css=css\n\n# identifier\nkeywords.*.css=margin\n\n# pseudoclass\nkeywords2.*.css=link\n\n# identifier 2\nkeywords3.*.css=identifier2\n\n# identifier 3\nkeywords4.*.css=identifier3\n\n# pseudo elements\nkeywords5.*.css=pseudoelement\n\n# extended identifier\nkeywords6.*.css=extended_identifier\n\n# extended pseudoclass\nkeywords7.*.css=extended_pseudoclass\n\n# extended pseudo elements\nkeywords8.*.css=extended_pseudo_element\n\n# enable SCSS language so $variable is recognized\nlexer.css.scss.language=1\n"
  },
  {
    "path": "lexilla/test/examples/d/SciTE.properties",
    "content": "lexer.*.d=d\nkeywords.*.d=keyword1\nkeywords2.*.d=keyword2\nkeywords3.*.d=\nkeywords4.*.d=keyword4\nkeywords5.*.d=keyword5\nkeywords6.*.d=keyword6\nkeywords7.*.d=keyword7\n\nfold=1\n"
  },
  {
    "path": "lexilla/test/examples/d/x.d",
    "content": "﻿$\n// /++ +/ doccomments are not yet supported\n/* */\n/** */\n/// drdr\n/+ /+ +/ +/\n//keyword test\nkeyword1\nkeyword2\nkeyword4\nkeyword5\nkeyword6\nkeyword7\n//unicode identifier test\nвапёasdÓΘΣαԷԸՑהכ拉麺とひシマイ단결을\n//strings test\n's\n'\nw's'w\n\"multiline\n\t\t\tstring\"w\ne\"zz\"e\nr\"asd\\\"e\nr\"multiline\n\t\t\tstring\"c\nr`asd\\`e\n`multiline\n\t\t\tstring`d\nx\"023 abc\"e\nx\"023\n\tabc\"w\n//numbers test\na[3..4]=3\n2.stringof\n2.0.stringof\n2.\n2.2e+2\n2.2e-2\n.2e+2\n.2\n2e+2\n0x2e+2\n0x2ep+10\n,.2.stringof,\n\nend\n \t  \t \n"
  },
  {
    "path": "lexilla/test/examples/d/x.d.folded",
    "content": " 0 400 400   $\n 0 400 400   // /++ +/ doccomments are not yet supported\n 0 400 400   /* */\n 0 400 400   /** */\n 0 400 400   /// drdr\n 0 400 400   /+ /+ +/ +/\n 0 400 400   //keyword test\n 0 400 400   keyword1\n 0 400 400   keyword2\n 0 400 400   keyword4\n 0 400 400   keyword5\n 0 400 400   keyword6\n 0 400 400   keyword7\n 0 400 400   //unicode identifier test\n 0 400 400   вапёasdÓΘΣαԷԸՑהכ拉麺とひシマイ단결을\n 0 400 400   //strings test\n 0 400 400   's\n 0 400 400   '\n 0 400 400   w's'w\n 0 400 400   \"multiline\n 0 400 400   \t\t\tstring\"w\n 0 400 400   e\"zz\"e\n 0 400 400   r\"asd\\\"e\n 0 400 400   r\"multiline\n 0 400 400   \t\t\tstring\"c\n 0 400 400   r`asd\\`e\n 0 400 400   `multiline\n 0 400 400   \t\t\tstring`d\n 0 400 400   x\"023 abc\"e\n 0 400 400   x\"023\n 0 400 400   \tabc\"w\n 0 400 400   //numbers test\n 0 400 400   a[3..4]=3\n 0 400 400   2.stringof\n 0 400 400   2.0.stringof\n 0 400 400   2.\n 0 400 400   2.2e+2\n 0 400 400   2.2e-2\n 0 400 400   .2e+2\n 0 400 400   .2\n 0 400 400   2e+2\n 0 400 400   0x2e+2\n 0 400 400   0x2ep+10\n 0 400 400   ,.2.stringof,\n 1 400 400   \n 0 400 400   end\n 1 400 400    \t  \t \n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/d/x.d.styled",
    "content": "{14}${0}\n{2}// /++ +/ doccomments are not yet supported\n{1}/* */{0}\n{3}/** */{0}\n{15}/// drdr\n{4}/+ /+ +/ +/{0}\n{2}//keyword test\n{6}keyword1{0}\n{7}keyword2{0}\n{9}keyword4{0}\n{20}keyword5{0}\n{21}keyword6{0}\n{22}keyword7{0}\n{2}//unicode identifier test\n{14}вапёasdÓΘΣαԷԸՑהכ拉麺とひシマイ단결을{0}\n{2}//strings test\n{11}'s\n'\n{14}w{12}'s'{14}w{0}\n{10}\"multiline\n\t\t\tstring\"w{0}\n{14}e{10}\"zz\"{14}e{0}\n{19}r\"asd\\\"{14}e{0}\n{19}r\"multiline\n\t\t\tstring\"c{0}\n{14}r{18}`asd\\`{14}e{0}\n{18}`multiline\n\t\t\tstring`d{0}\n{19}x\"023 abc\"{14}e{0}\n{19}x\"023\n\tabc\"w{0}\n{2}//numbers test\n{14}a{13}[{5}3{13}..{5}4{13}]={5}3{0}\n{5}2.stringof{0}\n{5}2.0{13}.{14}stringof{0}\n{5}2.{0}\n{5}2.2e+2{0}\n{5}2.2e-2{0}\n{5}.2e+2{0}\n{5}.2{0}\n{5}2e+2{0}\n{5}0x2e{13}+{5}2{0}\n{5}0x2ep+10{0}\n{13},{5}.2{13}.{14}stringof{13},{0}\n\n{14}end{0}\n \t  \t \n"
  },
  {
    "path": "lexilla/test/examples/diff/AllStyles.diff",
    "content": "Default=0\n Default\n\nComment=1\nAnother comment\n\nCommand=2 diff\ndiff -u a/cocoa/ScintillaCocoa.mm b/cocoa/ScintillaCocoa.mm\n\nHeader=3 ---\n--- a/cocoa/ScintillaCocoa.mm\t2016-12-30 14:38:22.000000000 -0600\n\nHeader=3 +++\n+++ b/cocoa/ScintillaCocoa.mm\t2017-02-15 08:20:12.000000000 -0600\n\nPosition=4 @@\n@@ -388,7 +388,8 @@\n\n - (void) idleTriggered: (NSNotification*) notification\n {\n #pragma unused(notification)\n\nDeleted=5 -\n-  static_cast<ScintillaCocoa*>(mTarget)->IdleTimerFired();\n\nAdded=6 +\n+  if (mTarget)\n+    static_cast<ScintillaCocoa*>(mTarget)->IdleTimerFired();\n }\n \n @end\n\nChanged=7 !\n! \t\tGdkColor white = { 0, 0xFFFF, 0xFFFF, 0xFFFF};\n\nPatchAdd=8 ++\n++  styler.ColourTo(i - 1, StateToPrint);\n\nPatchDelete=9 +-\n+-  styler.ColourTo(i - 1, StateToPrint);\n\nRemovedPatchAdd=10 -+\n-+  styler.ColourTo(i - 1, StateToPrint);\n\nRemovedPatchDelete=11 --\n--  styler.ColourTo(i - 1, StateToPrint);\n\ndiff -u a/cocoa/ScintillaCocoa.h b/cocoa/ScintillaCocoa.h\n\n"
  },
  {
    "path": "lexilla/test/examples/diff/AllStyles.diff.folded",
    "content": " 0 400   0   Default=0\n 0 400   0    Default\n 0 400   0   \n 0 400   0   Comment=1\n 0 400   0   Another comment\n 0 400   0   \n 0 400   0   Command=2 diff\n 2 400   0 + diff -u a/cocoa/ScintillaCocoa.mm b/cocoa/ScintillaCocoa.mm\n 0 401   0 | \n 0 401   0 | Header=3 ---\n 2 401   0 + --- a/cocoa/ScintillaCocoa.mm\t2016-12-30 14:38:22.000000000 -0600\n 0 402   0 | \n 0 402   0 | Header=3 +++\n 2 401   0 + +++ b/cocoa/ScintillaCocoa.mm\t2017-02-15 08:20:12.000000000 -0600\n 0 402   0 | \n 0 402   0 | Position=4 @@\n 2 402   0 + @@ -388,7 +388,8 @@\n 0 403   0 | \n 0 403   0 |  - (void) idleTriggered: (NSNotification*) notification\n 0 403   0 |  {\n 0 403   0 |  #pragma unused(notification)\n 0 403   0 | \n 0 403   0 | Deleted=5 -\n 0 403   0 | -  static_cast<ScintillaCocoa*>(mTarget)->IdleTimerFired();\n 0 403   0 | \n 0 403   0 | Added=6 +\n 0 403   0 | +  if (mTarget)\n 0 403   0 | +    static_cast<ScintillaCocoa*>(mTarget)->IdleTimerFired();\n 0 403   0 |  }\n 0 403   0 |  \n 0 403   0 |  @end\n 0 403   0 | \n 0 403   0 | Changed=7 !\n 0 403   0 | ! \t\tGdkColor white = { 0, 0xFFFF, 0xFFFF, 0xFFFF};\n 0 403   0 | \n 0 403   0 | PatchAdd=8 ++\n 0 403   0 | ++  styler.ColourTo(i - 1, StateToPrint);\n 0 403   0 | \n 0 403   0 | PatchDelete=9 +-\n 0 403   0 | +-  styler.ColourTo(i - 1, StateToPrint);\n 0 403   0 | \n 0 403   0 | RemovedPatchAdd=10 -+\n 0 403   0 | -+  styler.ColourTo(i - 1, StateToPrint);\n 0 403   0 | \n 0 403   0 | RemovedPatchDelete=11 --\n 0 403   0 | --  styler.ColourTo(i - 1, StateToPrint);\n 0 403   0 | \n 2 400   0 + diff -u a/cocoa/ScintillaCocoa.h b/cocoa/ScintillaCocoa.h\n 0 401   0 | \n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/diff/AllStyles.diff.styled",
    "content": "{1}Default=0\n{0} Default\n{1}\nComment=1\nAnother comment\n\nCommand=2 diff\n{2}diff -u a/cocoa/ScintillaCocoa.mm b/cocoa/ScintillaCocoa.mm\n{1}\nHeader=3 ---\n{3}--- a/cocoa/ScintillaCocoa.mm\t2016-12-30 14:38:22.000000000 -0600\n{1}\nHeader=3 +++\n{3}+++ b/cocoa/ScintillaCocoa.mm\t2017-02-15 08:20:12.000000000 -0600\n{1}\nPosition=4 @@\n{4}@@ -388,7 +388,8 @@\n{1}\n{0} - (void) idleTriggered: (NSNotification*) notification\n {\n #pragma unused(notification)\n{1}\nDeleted=5 -\n{5}-  static_cast<ScintillaCocoa*>(mTarget)->IdleTimerFired();\n{1}\nAdded=6 +\n{6}+  if (mTarget)\n+    static_cast<ScintillaCocoa*>(mTarget)->IdleTimerFired();\n{0} }\n \n @end\n{1}\nChanged=7 !\n{7}! \t\tGdkColor white = { 0, 0xFFFF, 0xFFFF, 0xFFFF};\n{1}\nPatchAdd=8 ++\n{8}++  styler.ColourTo(i - 1, StateToPrint);\n{1}\nPatchDelete=9 +-\n{9}+-  styler.ColourTo(i - 1, StateToPrint);\n{1}\nRemovedPatchAdd=10 -+\n{10}-+  styler.ColourTo(i - 1, StateToPrint);\n{1}\nRemovedPatchDelete=11 --\n{11}--  styler.ColourTo(i - 1, StateToPrint);\n{1}\n{2}diff -u a/cocoa/ScintillaCocoa.h b/cocoa/ScintillaCocoa.h\n{1}\n"
  },
  {
    "path": "lexilla/test/examples/diff/LongLine.diff",
    "content": "+A 1026-byte line is longer than 1024-byte buffer but doesn't cause problems as diff state determine by short line prefix 3456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456\n\n"
  },
  {
    "path": "lexilla/test/examples/diff/LongLine.diff.folded",
    "content": " 0 400   0   +A 1026-byte line is longer than 1024-byte buffer but doesn't cause problems as diff state determine by short line prefix 3456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456\n 0 400   0   \n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/diff/LongLine.diff.styled",
    "content": "{6}+A 1026-byte line is longer than 1024-byte buffer but doesn't cause problems as diff state determine by short line prefix 3456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456\n{1}\n"
  },
  {
    "path": "lexilla/test/examples/diff/SciTE.properties",
    "content": "lexer.*.diff=diff\nfold=1\n"
  },
  {
    "path": "lexilla/test/examples/erlang/AllStyles.erl",
    "content": "% Enumerate all styles: 0..24 31\n\n% comment = 1\n\n% whitespace = 0\n    % 0\n\n% variable = 2\nA\n\n% number = 3\n3\n\n% keyword = 4\nlet\n\n% string = 5\n\"string\"\n\n% operator = 6\n*\n\n% atom = 7\natom\n\n% function_name = 8\nfunction()\n\n% character = 9\n$a\n\n% macro = 10\n?macro\n\n% record = 11\n#record\n\n% preproc = 12\n-define\n\n% node_name = 13\nnode@\n\n% comment_function = 14\n%% function\n\n% comment_module = 15\n%%% module\n\n% comment_doc = 16\n%% @todo\n \n% comment_doc_macro = 17\n%% {@module}\n\n% atom_quoted = 18 (fails)\n'fails'\n\n% macro_quoted = 19\n?'macro'\n\n% record_quoted = 20\n#'record'\n\n% node_name_quoted = 21\n'node@'\n\n% bifs = 22\natom_to_binary\n\n% modules = 23\nio:x\n\n% modules_att = 24\n-module().\n\n% unknown = 31 (this is an internal state and should not be output)\n\n"
  },
  {
    "path": "lexilla/test/examples/erlang/AllStyles.erl.folded",
    "content": " 0 400   0   % Enumerate all styles: 0..24 31\n 0 400   0   \n 0 400   0   % comment = 1\n 0 400   0   \n 0 400   0   % whitespace = 0\n 0 400   0       % 0\n 0 400   0   \n 0 400   0   % variable = 2\n 0 400   0   A\n 0 400   0   \n 0 400   0   % number = 3\n 0 400   0   3\n 0 400   0   \n 0 400   0   % keyword = 4\n 0 400   0   let\n 0 400   0   \n 0 400   0   % string = 5\n 0 400   0   \"string\"\n 0 400   0   \n 0 400   0   % operator = 6\n 0 400   0   *\n 0 400   0   \n 0 400   0   % atom = 7\n 0 400   0   atom\n 0 400   0   \n 0 400   0   % function_name = 8\n 0 400   0   function()\n 0 400   0   \n 0 400   0   % character = 9\n 0 400   0   $a\n 0 400   0   \n 0 400   0   % macro = 10\n 0 400   0   ?macro\n 0 400   0   \n 0 400   0   % record = 11\n 0 400   0   #record\n 0 400   0   \n 0 400   0   % preproc = 12\n 0 400   0   -define\n 0 400   0   \n 0 400   0   % node_name = 13\n 0 400   0   node@\n 0 400   0   \n 0 400   0   % comment_function = 14\n 0 400   0   %% function\n 0 400   0   \n 0 400   0   % comment_module = 15\n 0 400   0   %%% module\n 0 400   0   \n 0 400   0   % comment_doc = 16\n 0 400   0   %% @todo\n 0 400   0    \n 0 400   0   % comment_doc_macro = 17\n 0 400   0   %% {@module}\n 0 400   0   \n 0 400   0   % atom_quoted = 18 (fails)\n 0 400   0   'fails'\n 0 400   0   \n 0 400   0   % macro_quoted = 19\n 0 400   0   ?'macro'\n 0 400   0   \n 0 400   0   % record_quoted = 20\n 0 400   0   #'record'\n 0 400   0   \n 0 400   0   % node_name_quoted = 21\n 0 400   0   'node@'\n 0 400   0   \n 0 400   0   % bifs = 22\n 0 400   0   atom_to_binary\n 0 400   0   \n 0 400   0   % modules = 23\n 0 400   0   io:x\n 0 400   0   \n 0 400   0   % modules_att = 24\n 0 400   0   -module().\n 0 400   0   \n 0 400   0   % unknown = 31 (this is an internal state and should not be output)\n 0 400   0   \n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/erlang/AllStyles.erl.styled",
    "content": "{1}% Enumerate all styles: 0..24 31{0}\n\n{1}% comment = 1{0}\n\n{1}% whitespace = 0{0}\n    {1}% 0{0}\n\n{1}% variable = 2{0}\n{2}A{0}\n\n{1}% number = 3{0}\n{3}3{0}\n\n{1}% keyword = 4{0}\n{4}let{0}\n\n{1}% string = 5{0}\n{5}\"string\"{0}\n\n{1}% operator = 6{0}\n{6}*{0}\n\n{1}% atom = 7{0}\n{7}atom{0}\n\n{1}% function_name = 8{0}\n{8}function{6}(){0}\n\n{1}% character = 9{0}\n{9}$a{0}\n\n{1}% macro = 10{0}\n{10}?macro{0}\n\n{1}% record = 11{0}\n{11}#record{0}\n\n{1}% preproc = 12{0}\n{12}-define{0}\n\n{1}% node_name = 13{0}\n{13}node@{0}\n\n{1}% comment_function = 14{0}\n{14}%% function{0}\n\n{1}% comment_module = 15{0}\n{15}%%% module{0}\n\n{1}% comment_doc = 16{0}\n{14}%% {16}@todo{0}\n \n{1}% comment_doc_macro = 17{0}\n{14}%% {{17}@module{14}}{0}\n\n{1}% atom_quoted = 18 (fails){0}\n{18}'fails'{0}\n\n{1}% macro_quoted = 19{0}\n{19}?'macro'{0}\n\n{1}% record_quoted = 20{0}\n{20}#'record'{0}\n\n{1}% node_name_quoted = 21{0}\n{21}'node@'{0}\n\n{1}% bifs = 22{0}\n{22}atom_to_binary{0}\n\n{1}% modules = 23{0}\n{23}io:{7}x{0}\n\n{1}% modules_att = 24{0}\n{24}-module{6}().{0}\n\n{1}% unknown = 31 (this is an internal state and should not be output){0}\n\n"
  },
  {
    "path": "lexilla/test/examples/erlang/SciTE.properties",
    "content": "lexer.*.erl=erlang\nkeywords.*.erl=let\nkeywords2.*.erl=atom_to_binary\nkeywords3.*.erl=-define\nkeywords4.*.erl=-module\nkeywords5.*.erl=@todo\nkeywords6.*.erl=@module\n"
  },
  {
    "path": "lexilla/test/examples/errorlist/AllStyles.err",
    "content": "Default 0\nSome text in default\n\n\nPython Error 1\n  File \"x.err\", line 2\n\n\nGcc Error 2, Find In Files Match 21\nScintillaGTKAccessible.cxx:153:13: warning: Deprecated pre-processor symbol, replace with \n\n\nMicrosoft Error 3\nLexErrorList.cxx(15): fatal error C1083: Cannot open include file: 'ILexer.h': No such file or directory\n\nPlatQt.obj : error LNK2019: unresolved external symbol \"class Scintilla::PRectangle __cdecl Scintilla::PixelAlign(class Scintilla::PRectangle const &,int)\" (?PixelAlign@Scintilla@@YA?AVPRectangle@1@AEBV21@H@Z) referenced in function \"public: virtual void __cdecl Scintilla::SurfaceImpl::FillRectangleAligned(class Scintilla::PRectangle,class Scintilla::Fill)\" (?FillRectangleAligned@SurfaceImpl@Scintilla@@UEAAXVPRectangle@2@VFill@2@@Z)\n\nNMAKE : fatal error U1077: '\"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.28.29910\\bin\\HostX64\\x64\\link.EXE\"' : return code '0x460'\n\n\nCommand 4\n>pwd\n\n\nBorland Error 5\nError E2378 oddEven.c 16: For statement missing ; in function main()\n\n\nPerl Error 6\nBareword found where operator expected at LexMMIXAL.cxx line 1, near \"// Scintilla\"\n\n\nDotNET Traceback 7\n   at ExceptionTrace.Program.f4() in C:\\Ivan\\dev\\exp\\ExceptionTrace\\Program.cs:line 18\n\n\nLua Error 8\nlast token read: `result' at line 40 in file `Test.lua'\n\n\nCtags 9\nIsAWordChar\tLexMMIXAL.cxx\t/^static inline bool IsAWordChar(const int ch) {$/;\"\tf\tfile:\n\n\nDiff Changed ! 10\n! \t\tGdkColor white = { 0, 0xFFFF, 0xFFFF, 0xFFFF};\n\n\nDiff Addition + 11\n+    <PlatformToolset>v142</PlatformToolset>\n\n\nDiff Deletion - 12\n-    <PlatformToolset>v141</PlatformToolset>\n\n\nDiff Message --- 13\n--- a/win32/SciTE.vcxproj\tFri Jan 31 12:23:51 2020 +1100\n\n\nPHP error 14\nFatal error: Call to undefined function:  foo() in example.php on line 11\n\n\nEssential Lahey Fortran 90 Error 15\nLine 11, file c:\\fortran90\\codigo\\demo.f90\n\n\nIntel Fortran Compiler Error 16\nError 71 at (17:teste.f90) : The program unit has no name\n\n\nIntel Fortran Compiler v8.0 Error 17\nfortcom: Error: shf.f90, line 5602: This name does not have ...\n\n\nAbsoft Pro Fortran 90 Error 18\ncf90-113 f90fe: ERROR SHF3D, File = shf.f90, Line = 1101, Column = 19\n\n\nHTML Tidy 19\nline 8 column 1 - Error: unexpected </head> in <meta>\n\n\nJava Runtime Stack Trace 20\n\tat MethodName>(FileName.java:33)\n\n\nGCC Include Path 22\nIn file included from /usr/include/gtk-2.0/gtk/gtkobject.h:37,\n\n\nGCC Pointer 25\n  236 | void            gtk_type_init   (GTypeDebugFlags    debug_flags);\n      |                                                                ^\n\n\nBash Diagnostic 26\nechoer153.sh: line 22: [: missing `]'\n\n\nEscape Sequence 23\n\u001b[K\n\n\nEscape Sequence Unknown 24\n\u001b[1n\n\n\nEscape Sequence Colour 40\n\u001b[0mColour 0 is 40\n\n\nEscape Sequence Colour 41\n\u001b[31mColour 1 is 41\n"
  },
  {
    "path": "lexilla/test/examples/errorlist/AllStyles.err.folded",
    "content": " 0 400   0   Default 0\n 0 400   0   Some text in default\n 0 400   0   \n 0 400   0   \n 0 400   0   Python Error 1\n 0 400   0     File \"x.err\", line 2\n 0 400   0   \n 0 400   0   \n 0 400   0   Gcc Error 2, Find In Files Match 21\n 0 400   0   ScintillaGTKAccessible.cxx:153:13: warning: Deprecated pre-processor symbol, replace with \n 0 400   0   \n 0 400   0   \n 0 400   0   Microsoft Error 3\n 0 400   0   LexErrorList.cxx(15): fatal error C1083: Cannot open include file: 'ILexer.h': No such file or directory\n 0 400   0   \n 0 400   0   PlatQt.obj : error LNK2019: unresolved external symbol \"class Scintilla::PRectangle __cdecl Scintilla::PixelAlign(class Scintilla::PRectangle const &,int)\" (?PixelAlign@Scintilla@@YA?AVPRectangle@1@AEBV21@H@Z) referenced in function \"public: virtual void __cdecl Scintilla::SurfaceImpl::FillRectangleAligned(class Scintilla::PRectangle,class Scintilla::Fill)\" (?FillRectangleAligned@SurfaceImpl@Scintilla@@UEAAXVPRectangle@2@VFill@2@@Z)\n 0 400   0   \n 0 400   0   NMAKE : fatal error U1077: '\"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.28.29910\\bin\\HostX64\\x64\\link.EXE\"' : return code '0x460'\n 0 400   0   \n 0 400   0   \n 0 400   0   Command 4\n 0 400   0   >pwd\n 0 400   0   \n 0 400   0   \n 0 400   0   Borland Error 5\n 0 400   0   Error E2378 oddEven.c 16: For statement missing ; in function main()\n 0 400   0   \n 0 400   0   \n 0 400   0   Perl Error 6\n 0 400   0   Bareword found where operator expected at LexMMIXAL.cxx line 1, near \"// Scintilla\"\n 0 400   0   \n 0 400   0   \n 0 400   0   DotNET Traceback 7\n 0 400   0      at ExceptionTrace.Program.f4() in C:\\Ivan\\dev\\exp\\ExceptionTrace\\Program.cs:line 18\n 0 400   0   \n 0 400   0   \n 0 400   0   Lua Error 8\n 0 400   0   last token read: `result' at line 40 in file `Test.lua'\n 0 400   0   \n 0 400   0   \n 0 400   0   Ctags 9\n 0 400   0   IsAWordChar\tLexMMIXAL.cxx\t/^static inline bool IsAWordChar(const int ch) {$/;\"\tf\tfile:\n 0 400   0   \n 0 400   0   \n 0 400   0   Diff Changed ! 10\n 0 400   0   ! \t\tGdkColor white = { 0, 0xFFFF, 0xFFFF, 0xFFFF};\n 0 400   0   \n 0 400   0   \n 0 400   0   Diff Addition + 11\n 0 400   0   +    <PlatformToolset>v142</PlatformToolset>\n 0 400   0   \n 0 400   0   \n 0 400   0   Diff Deletion - 12\n 0 400   0   -    <PlatformToolset>v141</PlatformToolset>\n 0 400   0   \n 0 400   0   \n 0 400   0   Diff Message --- 13\n 0 400   0   --- a/win32/SciTE.vcxproj\tFri Jan 31 12:23:51 2020 +1100\n 0 400   0   \n 0 400   0   \n 0 400   0   PHP error 14\n 0 400   0   Fatal error: Call to undefined function:  foo() in example.php on line 11\n 0 400   0   \n 0 400   0   \n 0 400   0   Essential Lahey Fortran 90 Error 15\n 0 400   0   Line 11, file c:\\fortran90\\codigo\\demo.f90\n 0 400   0   \n 0 400   0   \n 0 400   0   Intel Fortran Compiler Error 16\n 0 400   0   Error 71 at (17:teste.f90) : The program unit has no name\n 0 400   0   \n 0 400   0   \n 0 400   0   Intel Fortran Compiler v8.0 Error 17\n 0 400   0   fortcom: Error: shf.f90, line 5602: This name does not have ...\n 0 400   0   \n 0 400   0   \n 0 400   0   Absoft Pro Fortran 90 Error 18\n 0 400   0   cf90-113 f90fe: ERROR SHF3D, File = shf.f90, Line = 1101, Column = 19\n 0 400   0   \n 0 400   0   \n 0 400   0   HTML Tidy 19\n 0 400   0   line 8 column 1 - Error: unexpected </head> in <meta>\n 0 400   0   \n 0 400   0   \n 0 400   0   Java Runtime Stack Trace 20\n 0 400   0   \tat MethodName>(FileName.java:33)\n 0 400   0   \n 0 400   0   \n 0 400   0   GCC Include Path 22\n 0 400   0   In file included from /usr/include/gtk-2.0/gtk/gtkobject.h:37,\n 0 400   0   \n 0 400   0   \n 0 400   0   GCC Pointer 25\n 0 400   0     236 | void            gtk_type_init   (GTypeDebugFlags    debug_flags);\n 0 400   0         |                                                                ^\n 0 400   0   \n 0 400   0   \n 0 400   0   Bash Diagnostic 26\n 0 400   0   echoer153.sh: line 22: [: missing `]'\n 0 400   0   \n 0 400   0   \n 0 400   0   Escape Sequence 23\n 0 400   0   \u001b[K\n 0 400   0   \n 0 400   0   \n 0 400   0   Escape Sequence Unknown 24\n 0 400   0   \u001b[1n\n 0 400   0   \n 0 400   0   \n 0 400   0   Escape Sequence Colour 40\n 0 400   0   \u001b[0mColour 0 is 40\n 0 400   0   \n 0 400   0   \n 0 400   0   Escape Sequence Colour 41\n 0 400   0   \u001b[31mColour 1 is 41\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/errorlist/AllStyles.err.styled",
    "content": "{0}Default 0\nSome text in default\n\n\nPython Error 1\n{1}  File \"x.err\", line 2\n{0}\n\nGcc Error 2, Find In Files Match 21\n{2}ScintillaGTKAccessible.cxx:153:13:{21} warning: Deprecated pre-processor symbol, replace with \n{0}\n\nMicrosoft Error 3\n{3}LexErrorList.cxx(15): fatal error C1083: Cannot open include file: 'ILexer.h': No such file or directory\n{0}\n{3}PlatQt.obj : error LNK2019: unresolved external symbol \"class Scintilla::PRectangle __cdecl Scintilla::PixelAlign(class Scintilla::PRectangle const &,int)\" (?PixelAlign@Scintilla@@YA?AVPRectangle@1@AEBV21@H@Z) referenced in function \"public: virtual void __cdecl Scintilla::SurfaceImpl::FillRectangleAligned(class Scintilla::PRectangle,class Scintilla::Fill)\" (?FillRectangleAligned@SurfaceImpl@Scintilla@@UEAAXVPRectangle@2@VFill@2@@Z)\n{0}\n{3}NMAKE : fatal error U1077: '\"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.28.29910\\bin\\HostX64\\x64\\link.EXE\"' : return code '0x460'\n{0}\n\nCommand 4\n{4}>pwd\n{0}\n\nBorland Error 5\n{5}Error E2378 oddEven.c 16: For statement missing ; in function main()\n{0}\n\nPerl Error 6\n{6}Bareword found where operator expected at LexMMIXAL.cxx line 1, near \"// Scintilla\"\n{0}\n\nDotNET Traceback 7\n{7}   at ExceptionTrace.Program.f4() in C:\\Ivan\\dev\\exp\\ExceptionTrace\\Program.cs:line 18\n{0}\n\nLua Error 8\n{8}last token read: `result' at line 40 in file `Test.lua'\n{0}\n\nCtags 9\n{9}IsAWordChar\tLexMMIXAL.cxx\t/^static inline bool IsAWordChar(const int ch) {$/;\"\tf\tfile:\n{0}\n\nDiff Changed ! 10\n{10}! \t\tGdkColor white = { 0, 0xFFFF, 0xFFFF, 0xFFFF};\n{0}\n\nDiff Addition + 11\n{11}+    <PlatformToolset>v142</PlatformToolset>\n{0}\n\nDiff Deletion - 12\n{12}-    <PlatformToolset>v141</PlatformToolset>\n{0}\n\nDiff Message --- 13\n{13}--- a/win32/SciTE.vcxproj\tFri Jan 31 12:23:51 2020 +1100\n{0}\n\nPHP error 14\n{14}Fatal error: Call to undefined function:  foo() in example.php on line 11\n{0}\n\nEssential Lahey Fortran 90 Error 15\n{15}Line 11, file c:\\fortran90\\codigo\\demo.f90\n{0}\n\nIntel Fortran Compiler Error 16\n{16}Error 71 at (17:teste.f90) : The program unit has no name\n{0}\n\nIntel Fortran Compiler v8.0 Error 17\n{17}fortcom: Error: shf.f90, line 5602: This name does not have ...\n{0}\n\nAbsoft Pro Fortran 90 Error 18\n{18}cf90-113 f90fe: ERROR SHF3D, File = shf.f90, Line = 1101, Column = 19\n{0}\n\nHTML Tidy 19\n{19}line 8 column 1 - Error: unexpected </head> in <meta>\n{0}\n\nJava Runtime Stack Trace 20\n{20}\tat MethodName>(FileName.java:33)\n{0}\n\nGCC Include Path 22\n{22}In file included from /usr/include/gtk-2.0/gtk/gtkobject.h:37,\n{0}\n\nGCC Pointer 25\n{25}  236 | void            gtk_type_init   (GTypeDebugFlags    debug_flags);\n      |                                                                ^\n{0}\n\nBash Diagnostic 26\n{26}echoer153.sh: line 22: [: missing `]'\n{0}\n\nEscape Sequence 23\n{23}\u001b[K{0}\n\n\nEscape Sequence Unknown 24\n{24}\u001b[1n{0}\n\n\nEscape Sequence Colour 40\n{23}\u001b[0m{40}Colour 0 is 40\n{0}\n\nEscape Sequence Colour 41\n{23}\u001b[31m{41}Colour 1 is 41\n"
  },
  {
    "path": "lexilla/test/examples/errorlist/SciTE.properties",
    "content": "lexer.*.err=errorlist\nlexer.errorlist.value.separate=1\nlexer.errorlist.escape.sequences=1\nstyle.errorlist.23=fore:#000000,back:#FFFFFF,$(error.background)\nstyle.errorlist.25=fore:#CF008F,$(font.monospace.small)\n"
  },
  {
    "path": "lexilla/test/examples/fortran/AllStyles.f",
    "content": "! Enumerate all styles: 0 to 14\n! This is not a viable source file, it just illustrates the different states in isolation.\n\n! comment=1\n! Comment\n\n! default=0\n\t! w\n\n! number=2\n.37\n\n! string1=3\n'string'\n\n! string2=4\n\"string\"\n\n! stringeol=5\n\" unclosed\n\n! operator=6\n+\n\n! identifier=7\nvariable\n\n! word=8\nprogram\n\n! word2=9\nsystem_clock\n\n! word3=10\ndoublecomplex\n\n! preprocessor=11\n!DEC$ ATTRIBUTES DLLEXPORT::sr1\n\n! operator2=12\n.lt.\n\n! label=13\n999\n\n! continuation=14\n&\n"
  },
  {
    "path": "lexilla/test/examples/fortran/AllStyles.f.folded",
    "content": " 0 400   0   ! Enumerate all styles: 0 to 14\n 0 400   0   ! This is not a viable source file, it just illustrates the different states in isolation.\n 1 400   0   \n 0 400   0   ! comment=1\n 0 400   0   ! Comment\n 1 400   0   \n 0 400   0   ! default=0\n 0 400   0   \t! w\n 1 400   0   \n 0 400   0   ! number=2\n 0 400   0   .37\n 1 400   0   \n 0 400   0   ! string1=3\n 0 400   0   'string'\n 1 400   0   \n 0 400   0   ! string2=4\n 0 400   0   \"string\"\n 1 400   0   \n 0 400   0   ! stringeol=5\n 0 400   0   \" unclosed\n 1 400   0   \n 0 400   0   ! operator=6\n 0 400   0   +\n 1 400   0   \n 0 400   0   ! identifier=7\n 0 400   0   variable\n 1 400   0   \n 0 400   0   ! word=8\n 2 400   0 + program\n 1 401   0 | \n 0 401   0 | ! word2=9\n 0 401   0 | system_clock\n 1 401   0 | \n 0 401   0 | ! word3=10\n 0 401   0 | doublecomplex\n 1 401   0 | \n 0 401   0 | ! preprocessor=11\n 0 401   0 | !DEC$ ATTRIBUTES DLLEXPORT::sr1\n 1 401   0 | \n 0 401   0 | ! operator2=12\n 0 401   0 | .lt.\n 1 401   0 | \n 0 401   0 | ! label=13\n 0 401   0 | 999\n 1 401   0 | \n 0 401   0 | ! continuation=14\n 0 401   0 | &\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/fortran/AllStyles.f.styled",
    "content": "{1}! Enumerate all styles: 0 to 14{0}\n{1}! This is not a viable source file, it just illustrates the different states in isolation.{0}\n\n{1}! comment=1{0}\n{1}! Comment{0}\n\n{1}! default=0{0}\n\t{1}! w{0}\n\n{1}! number=2{0}\n{2}.37{0}\n\n{1}! string1=3{0}\n{3}'string'{0}\n\n{1}! string2=4{0}\n{4}\"string\"{0}\n\n{1}! stringeol=5{0}\n{5}\" unclosed\n{0}\n{1}! operator=6{0}\n{6}+{0}\n\n{1}! identifier=7{0}\n{7}variable{0}\n\n{1}! word=8{0}\n{8}program{0}\n\n{1}! word2=9{0}\n{9}system_clock{0}\n\n{1}! word3=10{0}\n{10}doublecomplex{0}\n\n{1}! preprocessor=11{0}\n{11}!DEC$ ATTRIBUTES DLLEXPORT::sr1{0}\n\n{1}! operator2=12{0}\n{12}.lt.{0}\n\n{1}! label=13{0}\n{13}999{0}\n\n{1}! continuation=14{0}\n{14}&{0}\n"
  },
  {
    "path": "lexilla/test/examples/fortran/SciTE.properties",
    "content": "lexer.*.f=fortran\nkeywords.*.f=do end if program\nkeywords2.*.f=system_clock\nkeywords3.*.f=doublecomplex\nfold=1\nfold.compact=1\n"
  },
  {
    "path": "lexilla/test/examples/fsharp/FmtSpecs.fs",
    "content": "module FormatSpecifiersTest\n\nlet x = List.fold (*) 24.5 [ 1.; 2.; 3. ]\n\n// expect \"147.00\"\nprintfn \"Speed: %.2f m/s\" x\nprintfn $\"Speed: %.2f{x} m/s\"\nprintfn $\"Speed: {x:f2} m/s\"\nprintfn $@\"Speed: %.2f{x} m/s\"\nprintfn @$\"Speed: {x:f2} m/s\"\n\n// expect \" 147%\"\nprintfn \"\"\"%% increase:% .0F%% over last year\"\"\" x\nprintfn $\"\"\"%% increase:% .0F{x}%% over last year\"\"\"\nprintfn $\"\"\"%% increase:{x / 100.,5:P0} over last year\"\"\"\nprintfn $@\"\"\"%% increase:% .0F{x}%% over last year\"\"\"\nprintfn @$\"\"\"%% increase:{x / 100.,5:P0} over last year\"\"\"\n\n// expect \"1.5E+002\"\n// NB: units should look like text even without a space\nprintfn @\"Time: %-0.1Esecs\" x\nprintfn $\"Time: %-0.1E{x}secs\"\nprintfn $\"Time: {x:E1}secs\"\nprintfn $@\"Time: %-0.1E{x}secs\"\nprintfn @$\"Time: {x:E1}secs\"\n\n// expect \"\\\"         +147\\\"\"\nprintfn @\"\"\"Temp: %+12.3g K\"\"\" x\nprintfn $\"\"\"{'\"'}Temp: %+12.3g{x} K{'\"'}\"\"\"\nprintfn $\"\"\"{'\"'}Temp: {'+',9}{x:g3} K{'\"'}\"\"\"\nprintfn $@\"\"\"Temp: %+12.3g{x} K\"\"\"\nprintfn @$\"\"\"Temp: {'+',9}{x:g3} K\"\"\"\n\n// Since F# 6.0\nprintfn @\"%B\" 0b1_000_000\nprintfn \"%B\" \"\\x40\"B.[0]\nprintfn $\"\"\"%B{'\\064'B}\"\"\"\nprintfn $@\"\"\"%B{0b1_000_000}\"\"\"\nprintfn @$\"\"\"%B{'\\064'B}\"\"\"\n\n// These don't work\nprintfn ``%.2f`` x\nprintfn $\"%.2f\" x\nprintfn $@\"%.2f\" x\nprintfn @$\"%.2f\" x\nprintfn $\"%.2f {x}\"\nprintfn $@\"%.2f {x}\"\nprintfn @$\"%.2f {x}\"\nprintfn $\"\"\"%.2f {x}\"\"\"\nprintfn $@\"\"\"%.2f {x}\"\"\"\nprintfn @$\"\"\"%.2f {x}\"\"\"\n"
  },
  {
    "path": "lexilla/test/examples/fsharp/FmtSpecs.fs.folded",
    "content": " 0 400 400   module FormatSpecifiersTest\n 1 400 400   \n 0 400 400   let x = List.fold (*) 24.5 [ 1.; 2.; 3. ]\n 1 400 400   \n 0 400 400   // expect \"147.00\"\n 0 400 400   printfn \"Speed: %.2f m/s\" x\n 0 400 400   printfn $\"Speed: %.2f{x} m/s\"\n 0 400 400   printfn $\"Speed: {x:f2} m/s\"\n 0 400 400   printfn $@\"Speed: %.2f{x} m/s\"\n 0 400 400   printfn @$\"Speed: {x:f2} m/s\"\n 1 400 400   \n 0 400 400   // expect \" 147%\"\n 0 400 400   printfn \"\"\"%% increase:% .0F%% over last year\"\"\" x\n 0 400 400   printfn $\"\"\"%% increase:% .0F{x}%% over last year\"\"\"\n 0 400 400   printfn $\"\"\"%% increase:{x / 100.,5:P0} over last year\"\"\"\n 0 400 400   printfn $@\"\"\"%% increase:% .0F{x}%% over last year\"\"\"\n 0 400 400   printfn @$\"\"\"%% increase:{x / 100.,5:P0} over last year\"\"\"\n 1 400 400   \n 2 400 401 + // expect \"1.5E+002\"\n 0 401 400 | // NB: units should look like text even without a space\n 0 400 400   printfn @\"Time: %-0.1Esecs\" x\n 0 400 400   printfn $\"Time: %-0.1E{x}secs\"\n 0 400 400   printfn $\"Time: {x:E1}secs\"\n 0 400 400   printfn $@\"Time: %-0.1E{x}secs\"\n 0 400 400   printfn @$\"Time: {x:E1}secs\"\n 1 400 400   \n 0 400 400   // expect \"\\\"         +147\\\"\"\n 0 400 400   printfn @\"\"\"Temp: %+12.3g K\"\"\" x\n 0 400 400   printfn $\"\"\"{'\"'}Temp: %+12.3g{x} K{'\"'}\"\"\"\n 0 400 400   printfn $\"\"\"{'\"'}Temp: {'+',9}{x:g3} K{'\"'}\"\"\"\n 0 400 400   printfn $@\"\"\"Temp: %+12.3g{x} K\"\"\"\n 0 400 400   printfn @$\"\"\"Temp: {'+',9}{x:g3} K\"\"\"\n 1 400 400   \n 0 400 400   // Since F# 6.0\n 0 400 400   printfn @\"%B\" 0b1_000_000\n 0 400 400   printfn \"%B\" \"\\x40\"B.[0]\n 0 400 400   printfn $\"\"\"%B{'\\064'B}\"\"\"\n 0 400 400   printfn $@\"\"\"%B{0b1_000_000}\"\"\"\n 0 400 400   printfn @$\"\"\"%B{'\\064'B}\"\"\"\n 1 400 400   \n 0 400 400   // These don't work\n 0 400 400   printfn ``%.2f`` x\n 0 400 400   printfn $\"%.2f\" x\n 0 400 400   printfn $@\"%.2f\" x\n 0 400 400   printfn @$\"%.2f\" x\n 0 400 400   printfn $\"%.2f {x}\"\n 0 400 400   printfn $@\"%.2f {x}\"\n 0 400 400   printfn @$\"%.2f {x}\"\n 0 400 400   printfn $\"\"\"%.2f {x}\"\"\"\n 0 400 400   printfn $@\"\"\"%.2f {x}\"\"\"\n 0 400 400   printfn @$\"\"\"%.2f {x}\"\"\"\n 1 400 400   "
  },
  {
    "path": "lexilla/test/examples/fsharp/FmtSpecs.fs.styled",
    "content": "{1}module{0} {6}FormatSpecifiersTest{0}\n\n{1}let{0} {6}x{0} {12}={0} {3}List{0}.{2}fold{0} {12}(*){0} {13}24.5{0} {12}[{0} {13}1.{12};{0} {13}2.{12};{0} {13}3.{0} {12}]{0}\n\n{9}// expect \"147.00\"{0}\n{2}printfn{0} {15}\"Speed: {19}%.2f{15} m/s\"{0} {6}x{0}\n{2}printfn{0} {15}$\"Speed: {19}%.2f{15}{x} m/s\"{0}\n{2}printfn{0} {15}$\"Speed: {x{19}:f2{15}} m/s\"{0}\n{2}printfn{0} {16}$@\"Speed: {19}%.2f{16}{x} m/s\"{0}\n{2}printfn{0} {16}@$\"Speed: {x{19}:f2{16}} m/s\"{0}\n\n{9}// expect \" 147%\"{0}\n{2}printfn{0} {15}\"\"\"{19}%%{15} increase:{19}% .0F%%{15} over last year\"\"\"{0} {6}x{0}\n{2}printfn{0} {15}$\"\"\"{19}%%{15} increase:{19}% .0F{15}{x}{19}%%{15} over last year\"\"\"{0}\n{2}printfn{0} {15}$\"\"\"{19}%%{15} increase:{x / 100.{19},5:P0{15}} over last year\"\"\"{0}\n{2}printfn{0} {16}$@\"\"\"{19}%%{16} increase:{19}% .0F{16}{x}{19}%%{16} over last year\"\"\"{0}\n{2}printfn{0} {16}@$\"\"\"{19}%%{16} increase:{x / 100.{19},5:P0{16}} over last year\"\"\"{0}\n\n{9}// expect \"1.5E+002\"{0}\n{9}// NB: units should look like text even without a space{0}\n{2}printfn{0} {16}@\"Time: {19}%-0.1E{16}secs\"{0} {6}x{0}\n{2}printfn{0} {15}$\"Time: {19}%-0.1E{15}{x}secs\"{0}\n{2}printfn{0} {15}$\"Time: {x{19}:E1{15}}secs\"{0}\n{2}printfn{0} {16}$@\"Time: {19}%-0.1E{16}{x}secs\"{0}\n{2}printfn{0} {16}@$\"Time: {x{19}:E1{16}}secs\"{0}\n\n{9}// expect \"\\\"         +147\\\"\"{0}\n{2}printfn{0} {16}@\"\"\"Temp: {19}%+12.3g{16} K\"\"\"{0} {6}x{0}\n{2}printfn{0} {15}$\"\"\"{'\"'}Temp: {19}%+12.3g{15}{x} K{'\"'}\"\"\"{0}\n{2}printfn{0} {15}$\"\"\"{'\"'}Temp: {'+'{19},9{15}}{x{19}:g3{15}} K{'\"'}\"\"\"{0}\n{2}printfn{0} {16}$@\"\"\"Temp: {19}%+12.3g{16}{x} K\"\"\"{0}\n{2}printfn{0} {16}@$\"\"\"Temp: {'+'{19},9{16}}{x{19}:g3{16}} K\"\"\"{0}\n\n{9}// Since F# 6.0{0}\n{2}printfn{0} {16}@\"{19}%B{16}\"{0} {13}0b1_000_000{0}\n{2}printfn{0} {15}\"{19}%B{15}\"{0} {15}\"\\x40\"B{0}.{12}[{13}0{12}]{0}\n{2}printfn{0} {15}$\"\"\"{19}%B{15}{'\\064'B}\"\"\"{0}\n{2}printfn{0} {16}$@\"\"\"{19}%B{16}{0b1_000_000}\"\"\"{0}\n{2}printfn{0} {16}@$\"\"\"{19}%B{16}{'\\064'B}\"\"\"{0}\n\n{9}// These don't work{0}\n{2}printfn{0} {7}``%.2f``{0} {6}x{0}\n{2}printfn{0} {15}$\"%.2f\"{0} {6}x{0}\n{2}printfn{0} {16}$@\"%.2f\"{0} {6}x{0}\n{2}printfn{0} {16}@$\"%.2f\"{0} {6}x{0}\n{2}printfn{0} {15}$\"%.2f {x}\"{0}\n{2}printfn{0} {16}$@\"%.2f {x}\"{0}\n{2}printfn{0} {16}@$\"%.2f {x}\"{0}\n{2}printfn{0} {15}$\"\"\"%.2f {x}\"\"\"{0}\n{2}printfn{0} {16}$@\"\"\"%.2f {x}\"\"\"{0}\n{2}printfn{0} {16}@$\"\"\"%.2f {x}\"\"\"{0}\n"
  },
  {
    "path": "lexilla/test/examples/fsharp/Issue56.fs",
    "content": "// not folded\n\n// first line in comment fold\n// second . . .\n// third . . .\nnamespace Issue56\n\nopen System\n\nmodule LineBasedFoldingCheck =\n    open FSharp.Quotations\n    open FSharp.Reflection\n\n    () |> ignore\n"
  },
  {
    "path": "lexilla/test/examples/fsharp/Issue56.fs.folded",
    "content": " 0 400 400   // not folded\n 1 400 400   \n 2 400 401 + // first line in comment fold\n 0 401 401 | // second . . .\n 0 401 400 | // third . . .\n 0 400 400   namespace Issue56\n 1 400 400   \n 0 400 400   open System\n 1 400 400   \n 0 400 400   module LineBasedFoldingCheck =\n 2 400 401 +     open FSharp.Quotations\n 0 401 400 |     open FSharp.Reflection\n 1 400 400   \n 0 400 400       () |> ignore\n 1 400 400   "
  },
  {
    "path": "lexilla/test/examples/fsharp/Issue56.fs.styled",
    "content": "{9}// not folded{0}\n\n{9}// first line in comment fold{0}\n{9}// second . . .{0}\n{9}// third . . .{0}\n{1}namespace{0} {6}Issue56{0}\n\n{1}open{0} {3}System{0}\n\n{1}module{0} {6}LineBasedFoldingCheck{0} {12}={0}\n    {1}open{0} {3}FSharp{0}.{6}Quotations{0}\n    {1}open{0} {3}FSharp{0}.{6}Reflection{0}\n\n    {1}(){0} {12}|>{0} {2}ignore{0}\n"
  },
  {
    "path": "lexilla/test/examples/fsharp/Issue93.fs",
    "content": "(*\n    (**  nested comment 1 **)\n    (*\n        nested comment 2\n        (*\n            nested comment 3\n            (*\n                nested comment 4\n                (*\n                    nested comment 5\n                *)\n            *)\n        *)\n    *)\n*)\n// declare a namespace\n// for the module\nnamespace Issue93\n\nmodule NestedComments =\n    open FSharp.Quotations\n    open FSharp.Quotations.Patterns\n    // print the arguments\n    // of an evaluated expression\n    (* Example:\n        (*\n            printArgs <@ 1 + 2 @> ;;\n            // 1\n            // 2\n        *)\n    *)\n    let printArgs expr =\n        let getVal = function Value (v, _) -> downcast v | _ -> null\n        match expr with\n        | Call (_, _, args) ->\n            List.map getVal args |> List.iter (printfn \"%A\")\n        | _ ->\n            printfn \"not an evaluated expression\"\n    (* Example:\n        (*\n            let constExpr = <@ true @> ;;\n            printArgs constExpr ;;\n        *)\n    *)\n    // Prints:\n    // \"not an evaluated expression\"\n"
  },
  {
    "path": "lexilla/test/examples/fsharp/Issue93.fs.folded",
    "content": " 2 400 401 + (*\n 0 401 401 |     (**  nested comment 1 **)\n 2 401 402 +     (*\n 0 402 402 |         nested comment 2\n 2 402 403 +         (*\n 0 403 403 |             nested comment 3\n 2 403 404 +             (*\n 0 404 404 |                 nested comment 4\n 2 404 405 +                 (*\n 0 405 405 |                     nested comment 5\n 0 405 404 |                 *)\n 0 404 403 |             *)\n 0 403 402 |         *)\n 0 402 401 |     *)\n 0 401 400 | *)\n 2 400 401 + // declare a namespace\n 0 401 400 | // for the module\n 0 400 400   namespace Issue93\n 1 400 400   \n 0 400 400   module NestedComments =\n 2 400 401 +     open FSharp.Quotations\n 0 401 400 |     open FSharp.Quotations.Patterns\n 2 400 401 +     // print the arguments\n 0 401 400 |     // of an evaluated expression\n 2 400 401 +     (* Example:\n 2 401 402 +         (*\n 0 402 402 |             printArgs <@ 1 + 2 @> ;;\n 0 402 402 |             // 1\n 0 402 402 |             // 2\n 0 402 401 |         *)\n 0 401 400 |     *)\n 0 400 400       let printArgs expr =\n 0 400 400           let getVal = function Value (v, _) -> downcast v | _ -> null\n 0 400 400           match expr with\n 0 400 400           | Call (_, _, args) ->\n 0 400 400               List.map getVal args |> List.iter (printfn \"%A\")\n 0 400 400           | _ ->\n 0 400 400               printfn \"not an evaluated expression\"\n 2 400 401 +     (* Example:\n 2 401 402 +         (*\n 0 402 402 |             let constExpr = <@ true @> ;;\n 0 402 402 |             printArgs constExpr ;;\n 0 402 401 |         *)\n 0 401 400 |     *)\n 2 400 401 +     // Prints:\n 0 401 400 |     // \"not an evaluated expression\"\n 1 400 400   "
  },
  {
    "path": "lexilla/test/examples/fsharp/Issue93.fs.styled",
    "content": "{8}(*\n    (**  nested comment 1 **)\n    (*\n        nested comment 2\n        (*\n            nested comment 3\n            (*\n                nested comment 4\n                (*\n                    nested comment 5\n                *)\n            *)\n        *)\n    *)\n*){0}\n{9}// declare a namespace{0}\n{9}// for the module{0}\n{1}namespace{0} {6}Issue93{0}\n\n{1}module{0} {6}NestedComments{0} {12}={0}\n    {1}open{0} {3}FSharp{0}.{6}Quotations{0}\n    {1}open{0} {3}FSharp{0}.{6}Quotations{0}.{6}Patterns{0}\n    {9}// print the arguments{0}\n    {9}// of an evaluated expression{0}\n    {8}(* Example:\n        (*\n            printArgs <@ 1 + 2 @> ;;\n            // 1\n            // 2\n        *)\n    *){0}\n    {1}let{0} {6}printArgs{0} {6}expr{0} {12}={0}\n        {1}let{0} {6}getVal{0} {12}={0} {1}function{0} {6}Value{0} {12}({6}v{12},{0} {6}_{12}){0} {12}->{0} {1}downcast{0} {6}v{0} {12}|{0} {6}_{0} {12}->{0} {1}null{0}\n        {1}match{0} {6}expr{0} {1}with{0}\n        {12}|{0} {6}Call{0} {12}({6}_{12},{0} {6}_{12},{0} {6}args{12}){0} {12}->{0}\n            {3}List{0}.{2}map{0} {6}getVal{0} {6}args{0} {12}|>{0} {3}List{0}.{2}iter{0} {12}({2}printfn{0} {15}\"{19}%A{15}\"{12}){0}\n        {12}|{0} {6}_{0} {12}->{0}\n            {2}printfn{0} {15}\"not an evaluated expression\"{0}\n    {8}(* Example:\n        (*\n            let constExpr = <@ true @> ;;\n            printArgs constExpr ;;\n        *)\n    *){0}\n    {9}// Prints:{0}\n    {9}// \"not an evaluated expression\"{0}\n"
  },
  {
    "path": "lexilla/test/examples/fsharp/Literals.fs",
    "content": "namespace Literals\n\nmodule Issue110 =\n    let hexA = +0xA1B2C3D4\n    let hexB = -0xCC100000\n\n    // regression checks\n    let hexC = 0xCC100000\n    let binA = +0b0000_1010\n    let binB = -0b1010_0000\n    let binC = 0b1010_0000\n    let octA = +0o1237777700\n    let octB = -0o1237777700\n    let octC = 0o1237777700\n    let i8a = +0001y\n    let i8b = -0001y\n    let u8 = 0001uy\n    let f32a = +0.001e-003\n    let f32b = -0.001E+003\n    let f32c = 0.001e-003\n    let f128a = +0.001m\n    let f128b = -0.001m\n    let f128c = 0.001m\n\n    // invalid literals\n    let hexD = 0xa0bcde0o\n    let hexE = +0xa0bcd0o\n    let hexF = -0xa0bcd0o\n    let binD = 0b1010_1110xf000\n    let binE = +0b1010_1110xf000\n    let binF = -0b1010_1110xf000\n    let binG = 0b1010_1110o\n    let binH = +0b1010_1110o\n    let binI = -0b1010_1110o\n    let octD = 0o3330xaBcDeF\n    let octE = +0o3330xaBcDe\n    let octF = -0o3330xaBcDe\n    let octG = 0o3330b\n    let octH = 0o3330b\n    let octI = 0o3330b\n\nmodule Issue111 =\n    // invalid literals\n    let a = 0000_123abc\n    let b = +000_123abc\n    let c = -0001_23abc\n    let d = 00123_000b\n    let e = +0123_000o\n    let f = -0123_000xcd\n\nmodule Issue112 =\n    let i64 = 0001L\n    let u64 = 001UL\n    let f32a = 001.F\n    let f32b = +01.0F\n    let f32c = -01.00000F\n    let f32d = 0b0000_0010lf\n    let f32e = 0o000_010lf\n    let f32f = 0x0000000000000010lf\n    let f64a = 0b0000_0010LF\n    let f64b = 0o000_010LF\n    let f64c = 0x0000000000000010LF\n    let f128a = 001.M\n    let f128b = +01.0M\n    let f128c = -01.00000M\n\n    // regression checks\n    let i32 = -0001l\n    let u32 = +001ul\n    let i128 = 9999999999999999999999999999I\n    let f32g = 001.f\n    let f32h = +01.0f\n    let f32i = -01.00000f\n    let f64d = 010000e+009\n    let f64e = +001.0e-009\n    let f64f = -001.e+009\n    let f128d = 001.m\n    let f128e = +01.0m\n    let f128f = -01.00000m\n\n    // arithmetic expressions\n    let a = -001.f+01.0F\n    let b = +0b0111_111UL-0x100UL\n    let c = -01.0F + +001.f\n    let d = -0x100UL - +0b0111_111UL\n"
  },
  {
    "path": "lexilla/test/examples/fsharp/Literals.fs.folded",
    "content": " 0 400 400   namespace Literals\n 1 400 400   \n 0 400 400   module Issue110 =\n 0 400 400       let hexA = +0xA1B2C3D4\n 0 400 400       let hexB = -0xCC100000\n 1 400 400   \n 0 400 400       // regression checks\n 0 400 400       let hexC = 0xCC100000\n 0 400 400       let binA = +0b0000_1010\n 0 400 400       let binB = -0b1010_0000\n 0 400 400       let binC = 0b1010_0000\n 0 400 400       let octA = +0o1237777700\n 0 400 400       let octB = -0o1237777700\n 0 400 400       let octC = 0o1237777700\n 0 400 400       let i8a = +0001y\n 0 400 400       let i8b = -0001y\n 0 400 400       let u8 = 0001uy\n 0 400 400       let f32a = +0.001e-003\n 0 400 400       let f32b = -0.001E+003\n 0 400 400       let f32c = 0.001e-003\n 0 400 400       let f128a = +0.001m\n 0 400 400       let f128b = -0.001m\n 0 400 400       let f128c = 0.001m\n 1 400 400   \n 0 400 400       // invalid literals\n 0 400 400       let hexD = 0xa0bcde0o\n 0 400 400       let hexE = +0xa0bcd0o\n 0 400 400       let hexF = -0xa0bcd0o\n 0 400 400       let binD = 0b1010_1110xf000\n 0 400 400       let binE = +0b1010_1110xf000\n 0 400 400       let binF = -0b1010_1110xf000\n 0 400 400       let binG = 0b1010_1110o\n 0 400 400       let binH = +0b1010_1110o\n 0 400 400       let binI = -0b1010_1110o\n 0 400 400       let octD = 0o3330xaBcDeF\n 0 400 400       let octE = +0o3330xaBcDe\n 0 400 400       let octF = -0o3330xaBcDe\n 0 400 400       let octG = 0o3330b\n 0 400 400       let octH = 0o3330b\n 0 400 400       let octI = 0o3330b\n 1 400 400   \n 0 400 400   module Issue111 =\n 0 400 400       // invalid literals\n 0 400 400       let a = 0000_123abc\n 0 400 400       let b = +000_123abc\n 0 400 400       let c = -0001_23abc\n 0 400 400       let d = 00123_000b\n 0 400 400       let e = +0123_000o\n 0 400 400       let f = -0123_000xcd\n 1 400 400   \n 0 400 400   module Issue112 =\n 0 400 400       let i64 = 0001L\n 0 400 400       let u64 = 001UL\n 0 400 400       let f32a = 001.F\n 0 400 400       let f32b = +01.0F\n 0 400 400       let f32c = -01.00000F\n 0 400 400       let f32d = 0b0000_0010lf\n 0 400 400       let f32e = 0o000_010lf\n 0 400 400       let f32f = 0x0000000000000010lf\n 0 400 400       let f64a = 0b0000_0010LF\n 0 400 400       let f64b = 0o000_010LF\n 0 400 400       let f64c = 0x0000000000000010LF\n 0 400 400       let f128a = 001.M\n 0 400 400       let f128b = +01.0M\n 0 400 400       let f128c = -01.00000M\n 1 400 400   \n 0 400 400       // regression checks\n 0 400 400       let i32 = -0001l\n 0 400 400       let u32 = +001ul\n 0 400 400       let i128 = 9999999999999999999999999999I\n 0 400 400       let f32g = 001.f\n 0 400 400       let f32h = +01.0f\n 0 400 400       let f32i = -01.00000f\n 0 400 400       let f64d = 010000e+009\n 0 400 400       let f64e = +001.0e-009\n 0 400 400       let f64f = -001.e+009\n 0 400 400       let f128d = 001.m\n 0 400 400       let f128e = +01.0m\n 0 400 400       let f128f = -01.00000m\n 1 400 400   \n 0 400 400       // arithmetic expressions\n 0 400 400       let a = -001.f+01.0F\n 0 400 400       let b = +0b0111_111UL-0x100UL\n 0 400 400       let c = -01.0F + +001.f\n 0 400 400       let d = -0x100UL - +0b0111_111UL\n 1 400 400   "
  },
  {
    "path": "lexilla/test/examples/fsharp/Literals.fs.styled",
    "content": "{1}namespace{0} {6}Literals{0}\n\n{1}module{0} {6}Issue110{0} {12}={0}\n    {1}let{0} {6}hexA{0} {12}={0} {13}+0xA1B2C3D4{0}\n    {1}let{0} {6}hexB{0} {12}={0} {13}-0xCC100000{0}\n\n    {9}// regression checks{0}\n    {1}let{0} {6}hexC{0} {12}={0} {13}0xCC100000{0}\n    {1}let{0} {6}binA{0} {12}={0} {13}+0b0000_1010{0}\n    {1}let{0} {6}binB{0} {12}={0} {13}-0b1010_0000{0}\n    {1}let{0} {6}binC{0} {12}={0} {13}0b1010_0000{0}\n    {1}let{0} {6}octA{0} {12}={0} {13}+0o1237777700{0}\n    {1}let{0} {6}octB{0} {12}={0} {13}-0o1237777700{0}\n    {1}let{0} {6}octC{0} {12}={0} {13}0o1237777700{0}\n    {1}let{0} {6}i8a{0} {12}={0} {13}+0001y{0}\n    {1}let{0} {6}i8b{0} {12}={0} {13}-0001y{0}\n    {1}let{0} {6}u8{0} {12}={0} {13}0001uy{0}\n    {1}let{0} {6}f32a{0} {12}={0} {13}+0.001e-003{0}\n    {1}let{0} {6}f32b{0} {12}={0} {13}-0.001E+003{0}\n    {1}let{0} {6}f32c{0} {12}={0} {13}0.001e-003{0}\n    {1}let{0} {6}f128a{0} {12}={0} {13}+0.001m{0}\n    {1}let{0} {6}f128b{0} {12}={0} {13}-0.001m{0}\n    {1}let{0} {6}f128c{0} {12}={0} {13}0.001m{0}\n\n    {9}// invalid literals{0}\n    {1}let{0} {6}hexD{0} {12}={0} {13}0xa0bcde0{0}o\n    {1}let{0} {6}hexE{0} {12}={0} {13}+0xa0bcd0{0}o\n    {1}let{0} {6}hexF{0} {12}={0} {13}-0xa0bcd0{0}o\n    {1}let{0} {6}binD{0} {12}={0} {13}0b1010_1110{0}x{6}f000{0}\n    {1}let{0} {6}binE{0} {12}={0} {13}+0b1010_1110{0}x{6}f000{0}\n    {1}let{0} {6}binF{0} {12}={0} {13}-0b1010_1110{0}x{6}f000{0}\n    {1}let{0} {6}binG{0} {12}={0} {13}0b1010_1110{0}o\n    {1}let{0} {6}binH{0} {12}={0} {13}+0b1010_1110{0}o\n    {1}let{0} {6}binI{0} {12}={0} {13}-0b1010_1110{0}o\n    {1}let{0} {6}octD{0} {12}={0} {13}0o3330{0}x{6}aBcDeF{0}\n    {1}let{0} {6}octE{0} {12}={0} {13}+0o3330{0}x{6}aBcDe{0}\n    {1}let{0} {6}octF{0} {12}={0} {13}-0o3330{0}x{6}aBcDe{0}\n    {1}let{0} {6}octG{0} {12}={0} {13}0o3330{0}b\n    {1}let{0} {6}octH{0} {12}={0} {13}0o3330{0}b\n    {1}let{0} {6}octI{0} {12}={0} {13}0o3330{0}b\n\n{1}module{0} {6}Issue111{0} {12}={0}\n    {9}// invalid literals{0}\n    {1}let{0} {6}a{0} {12}={0} {13}0000_123{0}a{6}bc{0}\n    {1}let{0} {6}b{0} {12}={0} {13}+000_123{0}a{6}bc{0}\n    {1}let{0} {6}c{0} {12}={0} {13}-0001_23{0}a{6}bc{0}\n    {1}let{0} {6}d{0} {12}={0} {13}00123_000{0}b\n    {1}let{0} {6}e{0} {12}={0} {13}+0123_000{0}o\n    {1}let{0} {6}f{0} {12}={0} {13}-0123_000{0}x{6}cd{0}\n\n{1}module{0} {6}Issue112{0} {12}={0}\n    {1}let{0} {6}i64{0} {12}={0} {13}0001L{0}\n    {1}let{0} {6}u64{0} {12}={0} {13}001UL{0}\n    {1}let{0} {6}f32a{0} {12}={0} {13}001.F{0}\n    {1}let{0} {6}f32b{0} {12}={0} {13}+01.0F{0}\n    {1}let{0} {6}f32c{0} {12}={0} {13}-01.00000F{0}\n    {1}let{0} {6}f32d{0} {12}={0} {13}0b0000_0010lf{0}\n    {1}let{0} {6}f32e{0} {12}={0} {13}0o000_010lf{0}\n    {1}let{0} {6}f32f{0} {12}={0} {13}0x0000000000000010lf{0}\n    {1}let{0} {6}f64a{0} {12}={0} {13}0b0000_0010LF{0}\n    {1}let{0} {6}f64b{0} {12}={0} {13}0o000_010LF{0}\n    {1}let{0} {6}f64c{0} {12}={0} {13}0x0000000000000010LF{0}\n    {1}let{0} {6}f128a{0} {12}={0} {13}001.M{0}\n    {1}let{0} {6}f128b{0} {12}={0} {13}+01.0M{0}\n    {1}let{0} {6}f128c{0} {12}={0} {13}-01.00000M{0}\n\n    {9}// regression checks{0}\n    {1}let{0} {6}i32{0} {12}={0} {13}-0001l{0}\n    {1}let{0} {6}u32{0} {12}={0} {13}+001ul{0}\n    {1}let{0} {6}i128{0} {12}={0} {13}9999999999999999999999999999I{0}\n    {1}let{0} {6}f32g{0} {12}={0} {13}001.f{0}\n    {1}let{0} {6}f32h{0} {12}={0} {13}+01.0f{0}\n    {1}let{0} {6}f32i{0} {12}={0} {13}-01.00000f{0}\n    {1}let{0} {6}f64d{0} {12}={0} {13}010000e+009{0}\n    {1}let{0} {6}f64e{0} {12}={0} {13}+001.0e-009{0}\n    {1}let{0} {6}f64f{0} {12}={0} {13}-001.e+009{0}\n    {1}let{0} {6}f128d{0} {12}={0} {13}001.m{0}\n    {1}let{0} {6}f128e{0} {12}={0} {13}+01.0m{0}\n    {1}let{0} {6}f128f{0} {12}={0} {13}-01.00000m{0}\n\n    {9}// arithmetic expressions{0}\n    {1}let{0} {6}a{0} {12}={0} {13}-001.f{12}+{13}01.0F{0}\n    {1}let{0} {6}b{0} {12}={0} {13}+0b0111_111UL{12}-{13}0x100UL{0}\n    {1}let{0} {6}c{0} {12}={0} {13}-01.0F{0} {12}+{0} {13}+001.f{0}\n    {1}let{0} {6}d{0} {12}={0} {13}-0x100UL{0} {12}-{0} {13}+0b0111_111UL{0}\n"
  },
  {
    "path": "lexilla/test/examples/fsharp/SciTE.properties",
    "content": "lexer.*.fs=fsharp\n\nkeywords.*.fs= \\\nabstract and as assert base begin class default delegate do done downcast \\\ndownto elif else end exception extern false finally fixed for fun function \\\nglobal if in inherit inline interface internal lazy let let! match match! \\\nmember module mutable namespace new null of open or override private public \\\nrec return return! select static struct then to true try type upcast use use! \\\nval void when while with yield yield! atomic break checked component const \\\nconstraint constructor continue eager event external fixed functor global \\\ninclude method mixin object parallel process protected pure sealed tailcall \\\ntrait virtual volatile\n\nkeywords2.*.fs= \\\nasr land lor lsl lsr lxor mod sig abs acos add allPairs append asin atan atan2 \\\naverage averageBy base1 base2 blit cache cast ceil choose \\\nchunkBySize collect compareWith concat contains containsKey copy cos cosh count \\\ncountBy create createBased delay difference distinct distinctBy empty eprintf except \\\nexists exists2 exactlyOne failwith fill filter find findBack findIndex findIndexBack \\\nfindKey floor fold fold2 foldBack foldBack2 forall forall2 fprintf fst get groupBy head ignore indexed \\\ninit initBased initInfinite intersect intersectMany invalidArg isEmpty isProperSubset \\\nisProperSuperset isSubset isSuperset item iter iter2 iteri iteri2 last length \\\nlength1 length2 length3 length4 map map2 map3 mapFold mapFoldBack mapi mapi2 \\\nmax maxBy maxElement min minBy minElement nameof not ofArray ofList ofSeq pairwise partition \\\npermute pick pown printf printfn raise readonly rebase reduce reduceBack remove replicate rev round scan \\\nscanBack seq set sin sinh singleton skip skipWhile snd sort sortBy sortByDescending sortDescending \\\nsortInPlace sortInPlaceBy sortInPlaceWith sortWith splitAt splitInto sprintf sqrt sub sum \\\nsumBy tail take takeWhile tan tanh toArray toList toSeq transpose truncate \\\ntryExactlyOne tryFind tryFindBack tryFindIndex tryFindIndexBack tryHead \\\ntryItem tryFindKey tryLast tryPick typeof unfold union unionMany unzip unzip3 where \\\nwindowed zeroCreate zeroCreateBased zip zip3\n\nkeywords3.*.fs= \\\nArgumentException Array Array2D Array3D Array4D BigInteger Boolean Byte Char Collections Core CultureInfo DateTime Decimal Double \\\nEnvironment Expr Float FSharp Globalization Int16 Int32 Int64 IntPtr IO Linq List Map Math Microsoft NumberStyles \\\nObject Parallel Printf Random ResizeArray SByte Seq Set Single String System UInt16 UInt32 UInt64 UIntPtr \\\narray bigint bool byte byref char comparison decimal double enum equality Error Exception exn float float32 inref int int8 int16 \\\nint32 int64 list nativeint nativeptr None obj Ok option Option outref ref Result sbyte Some single string unmanaged unativeint \\\nuint uint8 uint16 uint32 uint64 unit void voidptr voption\n\nfold.fsharp.preprocessor=1\nfold.comment=1\n"
  },
  {
    "path": "lexilla/test/examples/fsharp/x.fs",
    "content": "// x.fs\n// Sample source file to test F# syntax highlighting\n\n[<AutoOpen>]\nmodule Example\n\n#line 7 \"A compiler directive\"\n#if DEBUG\n  open System\n  open System.IO\n  open System.Diagnostics\n#endif\n\n# 14 @\"See: https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/strings#remarks\"\n// verbatim string\nlet xmlFragment1 = @\"<book href=\"\"https://www.worldcat.org/title/paradise-lost/oclc/1083714070\"\" title=\"\"Paradise Lost\"\">\"\n\n// triple-quoted string\nlet xmlFragment2 = \"\"\"<book href=\"https://www.worldcat.org/title/paradise-lost/oclc/1083714070\" title=\"Paradise Lost\">\"\"\"\n\n(* you need .NET 5.0 to compile this:\n  https://docs.microsoft.com/en-us/dotnet/fsharp/whats-new/fsharp-50#string-interpolation\n*)\nlet interpolated = $\"\"\"C:\\{System.DateTime.Now.ToString(\"yyyy-MM-dd\")}\\\"\"\" + $\"{System.Random().Next(System.Int32.MaxValue)}.log\"\n\nlet ``a byte literal`` = '\\209'B\n\n// quoted expression\nlet expr =\n    <@@\n        let foo () = \"bar\"\n        foo ()\n    @@>\n\nlet bigNum (unused: 'a): float option =\n    Seq.init 10_000 (float >> (fun i -> i + 11.))\n    |> (List.ofSeq\n        >> List.take 5\n        >> List.fold (*) 1.0)\n    |> Some\n\nmatch bigNum () with\n| Some num -> sprintf \"%.2f > %u\" num ``a byte literal``\n| None -> sprintf \"%A\" \"Have a byte string!\"B\n|> printfn \"%s\"\n\n// GitHub Issue #38\nlet unescapeWinPath (path: string) =\n    path.Replace(\"\\\\\\\\\", \"\\\\\").Replace(\"\\\"\", \"\")\n\nunescapeWinPath \"\\\\\\\"Program Files (x86)\\\\Windows NT\\\\Accessories\\\\\\\"\"\n|> System.IO.Directory.GetFiles\n|> printfn \"%A\"\n"
  },
  {
    "path": "lexilla/test/examples/fsharp/x.fs.folded",
    "content": " 2 400 401 + // x.fs\n 0 401 400 | // Sample source file to test F# syntax highlighting\n 1 400 400   \n 0 400 400   [<AutoOpen>]\n 0 400 400   module Example\n 1 400 400   \n 0 400 400   #line 7 \"A compiler directive\"\n 2 400 401 + #if DEBUG\n 2 401 402 +   open System\n 0 402 402 |   open System.IO\n 0 402 401 |   open System.Diagnostics\n 0 401 400 | #endif\n 1 400 400   \n 0 400 400   # 14 @\"See: https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/strings#remarks\"\n 0 400 400   // verbatim string\n 0 400 400   let xmlFragment1 = @\"<book href=\"\"https://www.worldcat.org/title/paradise-lost/oclc/1083714070\"\" title=\"\"Paradise Lost\"\">\"\n 1 400 400   \n 0 400 400   // triple-quoted string\n 0 400 400   let xmlFragment2 = \"\"\"<book href=\"https://www.worldcat.org/title/paradise-lost/oclc/1083714070\" title=\"Paradise Lost\">\"\"\"\n 1 400 400   \n 2 400 401 + (* you need .NET 5.0 to compile this:\n 0 401 401 |   https://docs.microsoft.com/en-us/dotnet/fsharp/whats-new/fsharp-50#string-interpolation\n 0 401 400 | *)\n 0 400 400   let interpolated = $\"\"\"C:\\{System.DateTime.Now.ToString(\"yyyy-MM-dd\")}\\\"\"\" + $\"{System.Random().Next(System.Int32.MaxValue)}.log\"\n 1 400 400   \n 0 400 400   let ``a byte literal`` = '\\209'B\n 1 400 400   \n 0 400 400   // quoted expression\n 0 400 400   let expr =\n 0 400 400       <@@\n 0 400 400           let foo () = \"bar\"\n 0 400 400           foo ()\n 0 400 400       @@>\n 1 400 400   \n 0 400 400   let bigNum (unused: 'a): float option =\n 0 400 400       Seq.init 10_000 (float >> (fun i -> i + 11.))\n 0 400 400       |> (List.ofSeq\n 0 400 400           >> List.take 5\n 0 400 400           >> List.fold (*) 1.0)\n 0 400 400       |> Some\n 1 400 400   \n 0 400 400   match bigNum () with\n 0 400 400   | Some num -> sprintf \"%.2f > %u\" num ``a byte literal``\n 0 400 400   | None -> sprintf \"%A\" \"Have a byte string!\"B\n 0 400 400   |> printfn \"%s\"\n 1 400 400   \n 0 400 400   // GitHub Issue #38\n 0 400 400   let unescapeWinPath (path: string) =\n 0 400 400       path.Replace(\"\\\\\\\\\", \"\\\\\").Replace(\"\\\"\", \"\")\n 1 400 400   \n 0 400 400   unescapeWinPath \"\\\\\\\"Program Files (x86)\\\\Windows NT\\\\Accessories\\\\\\\"\"\n 0 400 400   |> System.IO.Directory.GetFiles\n 0 400 400   |> printfn \"%A\"\n 1 400 400   "
  },
  {
    "path": "lexilla/test/examples/fsharp/x.fs.styled",
    "content": "{9}// x.fs{0}\n{9}// Sample source file to test F# syntax highlighting{0}\n\n{18}[<AutoOpen>]{0}\n{1}module{0} {6}Example{0}\n\n{11}#line 7 \"A compiler directive\"{0}\n{10}#if DEBUG{0}\n  {1}open{0} {3}System{0}\n  {1}open{0} {3}System{0}.{3}IO{0}\n  {1}open{0} {3}System{0}.{6}Diagnostics{0}\n{10}#endif{0}\n\n{11}# 14 @\"See: https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/strings#remarks\"{0}\n{9}// verbatim string{0}\n{1}let{0} {6}xmlFragment1{0} {12}={0} {16}@\"<book href=\"\"https://www.worldcat.org/title/paradise-lost/oclc/1083714070\"\" title=\"\"Paradise Lost\"\">\"{0}\n\n{9}// triple-quoted string{0}\n{1}let{0} {6}xmlFragment2{0} {12}={0} {15}\"\"\"<book href=\"https://www.worldcat.org/title/paradise-lost/oclc/1083714070\" title=\"Paradise Lost\">\"\"\"{0}\n\n{8}(* you need .NET 5.0 to compile this:\n  https://docs.microsoft.com/en-us/dotnet/fsharp/whats-new/fsharp-50#string-interpolation\n*){0}\n{1}let{0} {6}interpolated{0} {12}={0} {15}$\"\"\"C:\\{System.DateTime.Now.ToString(\"yyyy-MM-dd\")}\\\"\"\"{0} {12}+{0} {15}$\"{System.Random().Next(System.Int32.MaxValue)}.log\"{0}\n\n{1}let{0} {7}``a byte literal``{0} {12}={0} {14}'\\209'B{0}\n\n{9}// quoted expression{0}\n{1}let{0} {6}expr{0} {12}={0}\n    {17}<@@\n        let foo () = \"bar\"\n        foo ()\n    @@>{0}\n\n{1}let{0} {6}bigNum{0} {12}({6}unused{12}:{0} {12}'{6}a{12}):{0} {3}float{0} {3}option{0} {12}={0}\n    {3}Seq{0}.{2}init{0} {13}10_000{0} {12}({3}float{0} {12}>>{0} {12}({1}fun{0} {6}i{0} {12}->{0} {6}i{0} {12}+{0} {13}11.{12})){0}\n    {12}|>{0} {12}({3}List{0}.{2}ofSeq{0}\n        {12}>>{0} {3}List{0}.{2}take{0} {13}5{0}\n        {12}>>{0} {3}List{0}.{2}fold{0} {12}(*){0} {13}1.0{12}){0}\n    {12}|>{0} {3}Some{0}\n\n{1}match{0} {6}bigNum{0} {1}(){0} {1}with{0}\n{12}|{0} {3}Some{0} {6}num{0} {12}->{0} {2}sprintf{0} {15}\"{19}%.2f{15} > {19}%u{15}\"{0} {6}num{0} {7}``a byte literal``{0}\n{12}|{0} {3}None{0} {12}->{0} {2}sprintf{0} {15}\"{19}%A{15}\"{0} {15}\"Have a byte string!\"B{0}\n{12}|>{0} {2}printfn{0} {15}\"{19}%s{15}\"{0}\n\n{9}// GitHub Issue #38{0}\n{1}let{0} {6}unescapeWinPath{0} {12}({6}path{12}:{0} {3}string{12}){0} {12}={0}\n    {6}path{0}.{6}Replace{12}({15}\"\\\\\\\\\"{12},{0} {15}\"\\\\\"{12}){0}.{6}Replace{12}({15}\"\\\"\"{12},{0} {15}\"\"{12}){0}\n\n{6}unescapeWinPath{0} {15}\"\\\\\\\"Program Files (x86)\\\\Windows NT\\\\Accessories\\\\\\\"\"{0}\n{12}|>{0} {3}System{0}.{3}IO{0}.{6}Directory{0}.{6}GetFiles{0}\n{12}|>{0} {2}printfn{0} {15}\"{19}%A{15}\"{0}\n"
  },
  {
    "path": "lexilla/test/examples/gdscript/AllStyles.gd",
    "content": "# Enumerate all styles: 0 to 15\n# comment=1\n\n# whitespace=0\n\t# w\n\n# number=2\n37\n\n# double-quoted-string=3\n\"str\"\n\n# single-quoted-string=4\n'str'\n\n# keyword=5\npass\n\n# triple-quoted-string=6\n'''str'''\n\n# triple-double-quoted-string=7\n\"\"\"str\"\"\"\n\n# class-name=8\nclass ClassName:\n\tpass\n\n# function-name=9\nfunc function_name():\n\tpass\n\n# operator=10\n1 + 3\n\n# identifier=11\nvar identifier = 2\n\n# comment-block=12\n## block\n\n# unclosed-string=13\n\" unclosed\n\n# highlighted-identifier=14\nvar hilight = 2\n\n# annotation=15\n@onready\nvar a = 3\n@onready var b = 3\n\n# node-identifier=16\n%node\n$node\n"
  },
  {
    "path": "lexilla/test/examples/gdscript/AllStyles.gd.folded",
    "content": " 0 400   0   # Enumerate all styles: 0 to 15\n 0 400   0   # comment=1\n 1 400   0   \n 0 400   0   # whitespace=0\n 0 400   0   \t# w\n 1 400   0   \n 0 400   0   # number=2\n 0 400   0   37\n 1 400   0   \n 0 400   0   # double-quoted-string=3\n 0 400   0   \"str\"\n 1 400   0   \n 0 400   0   # single-quoted-string=4\n 0 400   0   'str'\n 1 400   0   \n 0 400   0   # keyword=5\n 0 400   0   pass\n 1 400   0   \n 0 400   0   # triple-quoted-string=6\n 0 400   0   '''str'''\n 1 400   0   \n 0 400   0   # triple-double-quoted-string=7\n 0 400   0   \"\"\"str\"\"\"\n 1 400   0   \n 0 400   0   # class-name=8\n 2 400   0 + class ClassName:\n 0 408   0 | \tpass\n 1 400   0   \n 0 400   0   # function-name=9\n 2 400   0 + func function_name():\n 0 408   0 | \tpass\n 1 400   0   \n 0 400   0   # operator=10\n 0 400   0   1 + 3\n 1 400   0   \n 0 400   0   # identifier=11\n 0 400   0   var identifier = 2\n 1 400   0   \n 0 400   0   # comment-block=12\n 0 400   0   ## block\n 1 400   0   \n 0 400   0   # unclosed-string=13\n 0 400   0   \" unclosed\n 1 400   0   \n 0 400   0   # highlighted-identifier=14\n 0 400   0   var hilight = 2\n 1 400   0   \n 0 400   0   # annotation=15\n 0 400   0   @onready\n 0 400   0   var a = 3\n 0 400   0   @onready var b = 3\n 1 400   0   \n 0 400   0   # node-identifier=16\n 0 400   0   %node\n 0 400   0   $node\n 1 400   0   "
  },
  {
    "path": "lexilla/test/examples/gdscript/AllStyles.gd.styled",
    "content": "{1}# Enumerate all styles: 0 to 15{0}\n{1}# comment=1{0}\n\n{1}# whitespace=0{0}\n\t{1}# w{0}\n\n{1}# number=2{0}\n{2}37{0}\n\n{1}# double-quoted-string=3{0}\n{3}\"str\"{0}\n\n{1}# single-quoted-string=4{0}\n{4}'str'{0}\n\n{1}# keyword=5{0}\n{5}pass{0}\n\n{1}# triple-quoted-string=6{0}\n{6}'''str'''{0}\n\n{1}# triple-double-quoted-string=7{0}\n{7}\"\"\"str\"\"\"{0}\n\n{1}# class-name=8{0}\n{5}class{0} {8}ClassName{10}:{0}\n\t{5}pass{0}\n\n{1}# function-name=9{0}\n{5}func{0} {9}function_name{10}():{0}\n\t{5}pass{0}\n\n{1}# operator=10{0}\n{2}1{0} {10}+{0} {2}3{0}\n\n{1}# identifier=11{0}\n{5}var{0} {11}identifier{0} {10}={0} {2}2{0}\n\n{1}# comment-block=12{0}\n{12}## block{0}\n\n{1}# unclosed-string=13{0}\n{13}\" unclosed\n{0}\n{1}# highlighted-identifier=14{0}\n{5}var{0} {14}hilight{0} {10}={0} {2}2{0}\n\n{1}# annotation=15{0}\n{15}@onready{0}\n{5}var{0} {11}a{0} {10}={0} {2}3{0}\n{15}@onready{0} {5}var{0} {11}b{0} {10}={0} {2}3{0}\n\n{1}# node-identifier=16{0}\n{16}%node{0}\n{16}$node{0}\n"
  },
  {
    "path": "lexilla/test/examples/gdscript/NodePath.gd",
    "content": "# nodepath\n\n$Node\n\n%Node\n\n%node/\"n o d e\"/%'n o d e'\n\n%\"No de\"\n\n\n$/root/ThisNode/%Node % %test\n\n$MainMenuPanel/%Options % %test\n\n%Options % %test\n\n$Node % %test\n\n\nget_node(\"%Options\") % %test\n\n$\"Nod   se\" % %test\n\n$/test/\"No % de\"/test % %test\n\n%node/\"n o d e\"/'n o d e' % %\"No De\"\n\n\"%010d\" % 12345\n\n1 % 1\n\na % b\n"
  },
  {
    "path": "lexilla/test/examples/gdscript/NodePath.gd.folded",
    "content": " 0 400   0   # nodepath\n 1 400   0   \n 0 400   0   $Node\n 1 400   0   \n 0 400   0   %Node\n 1 400   0   \n 0 400   0   %node/\"n o d e\"/%'n o d e'\n 1 400   0   \n 0 400   0   %\"No de\"\n 1 400   0   \n 1 400   0   \n 0 400   0   $/root/ThisNode/%Node % %test\n 1 400   0   \n 0 400   0   $MainMenuPanel/%Options % %test\n 1 400   0   \n 0 400   0   %Options % %test\n 1 400   0   \n 0 400   0   $Node % %test\n 1 400   0   \n 1 400   0   \n 0 400   0   get_node(\"%Options\") % %test\n 1 400   0   \n 0 400   0   $\"Nod   se\" % %test\n 1 400   0   \n 0 400   0   $/test/\"No % de\"/test % %test\n 1 400   0   \n 0 400   0   %node/\"n o d e\"/'n o d e' % %\"No De\"\n 1 400   0   \n 0 400   0   \"%010d\" % 12345\n 1 400   0   \n 0 400   0   1 % 1\n 1 400   0   \n 0 400   0   a % b\n 1 400   0   "
  },
  {
    "path": "lexilla/test/examples/gdscript/NodePath.gd.styled",
    "content": "{1}# nodepath{0}\n\n{16}$Node{0}\n\n{16}%Node{0}\n\n{16}%node/\"n o d e\"/%'n o d e'{0}\n\n{16}%\"No de\"{0}\n\n\n{16}$/root/ThisNode/%Node{0} {10}%{0} {16}%test{0}\n\n{16}$MainMenuPanel/%Options{0} {10}%{0} {16}%test{0}\n\n{16}%Options{0} {10}%{0} {16}%test{0}\n\n{16}$Node{0} {10}%{0} {16}%test{0}\n\n\n{11}get_node{10}({3}\"%Options\"{10}){0} {10}%{0} {16}%test{0}\n\n{16}$\"Nod   se\"{0} {10}%{0} {16}%test{0}\n\n{16}$/test/\"No % de\"/test{0} {10}%{0} {16}%test{0}\n\n{16}%node/\"n o d e\"/'n o d e'{0} {10}%{0} {16}%\"No De\"{0}\n\n{3}\"%010d\"{0} {10}%{0} {2}12345{0}\n\n{2}1{0} {10}%{0} {2}1{0}\n\n{11}a{0} {10}%{0} {11}b{0}\n"
  },
  {
    "path": "lexilla/test/examples/gdscript/SciTE.properties",
    "content": "lexer.*.gd=gdscript\nkeywords.*.gd=class func else for if extends in pass print return while var\nkeywords2.*.gd=hilight\nfold=1\nfold.compact=1\n"
  },
  {
    "path": "lexilla/test/examples/gui4cli/AllStyles.gui",
    "content": "/* Comment (2), followed by Default (0) */\n\n/* File does not include Line Comment (1) as that causes \\r\\n failures in test runner */\n\n/* Global (3) 'G4C' */\nG4C MyGui\n\n/* String (8) */\nWindow 10 10 200 300 \"My window\"\n\n/* Event (4) */\nxOnLoad\n     /* Command (7) */\n     GuiOpen MyGui\n\nxButton 10 10 100 20 \"Double it!\"\n     /* Attribute (5) */\n     attr frame sunk\n     Input \"Enter a number\" var\n     /* Control (6) 'if', Operator (9) '$', '>', '=' */\n     if $var > 9999\n          var = 9999\n     endif\n     var2 = $($var * 2)\n     MsgBox \"$var times 2 equals $var2\" OK/INFO\n     GuiQuit #this\n"
  },
  {
    "path": "lexilla/test/examples/gui4cli/AllStyles.gui.folded",
    "content": " 0 401   0 | /* Comment (2), followed by Default (0) */\n 1 401   0 | \n 0 401   0 | /* File does not include Line Comment (1) as that causes \\r\\n failures in test runner */\n 1 401   0 | \n 0 401   0 | /* Global (3) 'G4C' */\n 2 400   0 + G4C MyGui\n 1 401   0 | \n 0 401   0 | /* String (8) */\n 2 400   0 + Window 10 10 200 300 \"My window\"\n 1 401   0 | \n 0 401   0 | /* Event (4) */\n 2 400   0 + xOnLoad\n 0 401   0 |      /* Command (7) */\n 0 401   0 |      GuiOpen MyGui\n 1 401   0 | \n 2 400   0 + xButton 10 10 100 20 \"Double it!\"\n 0 401   0 |      /* Attribute (5) */\n 0 401   0 |      attr frame sunk\n 0 401   0 |      Input \"Enter a number\" var\n 0 401   0 |      /* Control (6) 'if', Operator (9) '$', '>', '=' */\n 0 401   0 |      if $var > 9999\n 0 401   0 |           var = 9999\n 0 401   0 |      endif\n 0 401   0 |      var2 = $($var * 2)\n 0 401   0 |      MsgBox \"$var times 2 equals $var2\" OK/INFO\n 0 401   0 |      GuiQuit #this\n 0 401   0 | "
  },
  {
    "path": "lexilla/test/examples/gui4cli/AllStyles.gui.styled",
    "content": "{2}/* Comment (2), followed by Default (0) */{0}\n\n{2}/* File does not include Line Comment (1) as that causes \\r\\n failures in test runner */{0}\n\n{2}/* Global (3) 'G4C' */{0}\n{3}G4C{0} MyGui\n\n{2}/* String (8) */{0}\n{3}Window{0} 10 10 200 300 {8}\"My window\"{0}\n\n{2}/* Event (4) */{0}\n{4}xOnLoad{0}\n     {2}/* Command (7) */{0}\n     {7}GuiOpen{0} MyGui\n\n{3}xButton{0} 10 10 100 20 {8}\"Double it!\"{0}\n     {2}/* Attribute (5) */{0}\n     {5}attr{0} frame sunk\n     {7}Input{0} {8}\"Enter a number\"{0} var\n     {2}/* Control (6) 'if', Operator (9) '$', '>', '=' */{0}\n     {6}if{0} {9}${0}var {9}>{0} 9999\n          var {9}={0} 9999\n     {6}endif{0}\n     var2 {9}={0} {9}${0}({9}${0}var * 2)\n     {7}MsgBox{0} {8}\"$var times 2 equals $var2\"{0} OK/INFO\n     {7}GuiQuit{0} #this\n"
  },
  {
    "path": "lexilla/test/examples/gui4cli/SciTE.properties",
    "content": "lexer.*.gui=gui4cli\nfold=1\n\n#global\nkeywords.*.gui=G4C WINDOW XBUTTON\n#event\nkeywords2.*.gui=XONCLOSE XONLVDIR XONLOAD\n#attribute\nkeywords3.*.gui=ATTR\n#control\nkeywords4.*.gui=IF ELSE ENDIF GOSUB\n#command\nkeywords5.*.gui=GUIOPEN GUIQUIT INPUT MSGBOX SETWINTITLE\n"
  },
  {
    "path": "lexilla/test/examples/hypertext/Bug2207.html",
    "content": "<!DOCTYPE html>\n<html>\n<script>\n  var example = \"<!-- -->\";  // closing \"-->\" is string\n  var example2 = '<!-- -->';  // closing \"-->\" is string\n</script>\n</html>\n"
  },
  {
    "path": "lexilla/test/examples/hypertext/Bug2207.html.folded",
    "content": " 0 400   0   <!DOCTYPE html>\n 2 400   0 + <html>\n 2 401   0 + <script>\n 0 402   0 |   var example = \"<!-- -->\";  // closing \"-->\" is string\n 0 402   0 |   var example2 = '<!-- -->';  // closing \"-->\" is string\n 0 402   0 | </script>\n 0 401   0 | </html>\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/hypertext/Bug2207.html.styled",
    "content": "{21}<!{26}DOCTYPE html{21}>{0}\n{1}<html>{0}\n{1}<script>{40}\n{41}  {47}var{41} {46}example{41} {50}={41} {48}\"<!-- -->\"{50};{41}  {43}// closing \"-->\" is string{41}\n  {47}var{41} {46}example2{41} {50}={41} {49}'<!-- -->'{50};{41}  {43}// closing \"-->\" is string{41}\n{1}</script>{0}\n{1}</html>{0}\n"
  },
  {
    "path": "lexilla/test/examples/hypertext/Bug2219.html",
    "content": "<script>\n\n/**\n*/\n\n</script>\n"
  },
  {
    "path": "lexilla/test/examples/hypertext/Bug2219.html.folded",
    "content": " 2 400   0 + <script>\n 1 401   0 | \n 2 401   0 + /**\n 0 402   0 | */\n 1 401   0 | \n 0 401   0 | </script>\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/hypertext/Bug2219.html.styled",
    "content": "{1}<script>{40}\n\n{44}/**\n*/{41}\n\n{1}</script>{0}\n"
  },
  {
    "path": "lexilla/test/examples/hypertext/Issue19.php",
    "content": "<?php\n\n$number = 1_234;\n$var = 'variable value';\n$test = [\n\t<<<EOTEST\n\tstring $var string EOTEST\n\tEOTEST_NOT\n\tEOTEST,\n\t0b00_01,\n\t<<<\"EOTEST\"\n\t\"string\" \"$var\" \"string\" EOTEST\n\tEOTEST_NOT\n\tEOTEST,\n\t0x00_02,\n\t<<<'EOTEST'\n\t'string' '$var' 'string' EOTEST\n\tEOTEST_NOT\n\tEOTEST,\n\t0x00_03,\n];\nprint_r($test);\n\n# Attribute tests\n#[SingleLineAnnotation('string', 1, null)]\n#[\n\tMultiLineAnnotation('string', 1, null)\n]\n\n?>\n"
  },
  {
    "path": "lexilla/test/examples/hypertext/Issue19.php.folded",
    "content": " 2 400   0 + <?php\n 1 401   0 | \n 0 401   0 | $number = 1_234;\n 0 401   0 | $var = 'variable value';\n 0 401   0 | $test = [\n 0 401   0 | \t<<<EOTEST\n 0 401   0 | \tstring $var string EOTEST\n 0 401   0 | \tEOTEST_NOT\n 0 401   0 | \tEOTEST,\n 0 401   0 | \t0b00_01,\n 0 401   0 | \t<<<\"EOTEST\"\n 0 401   0 | \t\"string\" \"$var\" \"string\" EOTEST\n 0 401   0 | \tEOTEST_NOT\n 0 401   0 | \tEOTEST,\n 0 401   0 | \t0x00_02,\n 0 401   0 | \t<<<'EOTEST'\n 0 401   0 | \t'string' '$var' 'string' EOTEST\n 0 401   0 | \tEOTEST_NOT\n 0 401   0 | \tEOTEST,\n 0 401   0 | \t0x00_03,\n 0 401   0 | ];\n 0 401   0 | print_r($test);\n 1 401   0 | \n 0 401   0 | # Attribute tests\n 0 401   0 | #[SingleLineAnnotation('string', 1, null)]\n 0 401   0 | #[\n 0 401   0 | \tMultiLineAnnotation('string', 1, null)\n 0 401   0 | ]\n 1 401   0 | \n 0 401   0 | ?>\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/hypertext/Issue19.php.styled",
    "content": "{18}<?php{118}\n\n{123}$number{118} {127}={118} {122}1_234{127};{118}\n{123}$var{118} {127}={118} {120}'variable value'{127};{118}\n{123}$test{118} {127}={118} {127}[{118}\n\t{119}<<<EOTEST\n\tstring {126}$var{119} string EOTEST\n\tEOTEST_NOT\n\tEOTEST{127},{118}\n\t{122}0b00_01{127},{118}\n\t{119}<<<\"EOTEST\"\n\t\"string\" \"{126}$var{119}\" \"string\" EOTEST\n\tEOTEST_NOT\n\tEOTEST{127},{118}\n\t{122}0x00_02{127},{118}\n\t{120}<<<'EOTEST'\n\t'string' '$var' 'string' EOTEST\n\tEOTEST_NOT\n\tEOTEST{127},{118}\n\t{122}0x00_03{127},{118}\n{127}];{118}\nprint_r{127}({123}$test{127});{118}\n\n{125}# Attribute tests{118}\n#{127}[{118}SingleLineAnnotation{127}({120}'string'{127},{118} {122}1{127},{118} null{127})]{118}\n#{127}[{118}\n\tMultiLineAnnotation{127}({120}'string'{127},{118} {122}1{127},{118} null{127}){118}\n{127}]{118}\n\n{18}?>{0}\n"
  },
  {
    "path": "lexilla/test/examples/hypertext/Issue192.html",
    "content": "﻿&\n&1\n&A\n&中\n&amp<br />\n&1<br />\n&A<br />\n&中<br />\n&&amp;\n&#1;\n&#1;中\n&A;<br />\n&#1;<br />\n&#1;中<br />\n&amp\n&lt;\n&lt;<br />\n&b.eps;\n&b.eps!\n&—;\n"
  },
  {
    "path": "lexilla/test/examples/hypertext/Issue192.html.folded",
    "content": " 0 400   0   &\n 0 400   0   &1\n 0 400   0   &A\n 0 400   0   &中\n 0 400   0   &amp<br />\n 0 400   0   &1<br />\n 0 400   0   &A<br />\n 0 400   0   &中<br />\n 0 400   0   &&amp;\n 0 400   0   &#1;\n 0 400   0   &#1;中\n 0 400   0   &A;<br />\n 0 400   0   &#1;<br />\n 0 400   0   &#1;中<br />\n 0 400   0   &amp\n 0 400   0   &lt;\n 0 400   0   &lt;<br />\n 0 400   0   &b.eps;\n 0 400   0   &b.eps!\n 0 400   0   &—;\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/hypertext/Issue192.html.styled",
    "content": "{2}&{0}\n{2}&1{0}\n{2}&A{0}\n{2}&{0}中\n{2}&amp{1}<br{8} {11}/>{0}\n{2}&1{1}<br{8} {11}/>{0}\n{2}&A{1}<br{8} {11}/>{0}\n{2}&{0}中{1}<br{8} {11}/>{0}\n{2}&{10}&amp;{0}\n{10}&#1;{0}\n{10}&#1;{0}中\n{10}&A;{1}<br{8} {11}/>{0}\n{10}&#1;{1}<br{8} {11}/>{0}\n{10}&#1;{0}中{1}<br{8} {11}/>{0}\n{2}&amp{0}\n{10}&lt;{0}\n{10}&lt;{1}<br{8} {11}/>{0}\n{10}&b.eps;{0}\n{2}&b.eps{0}!\n{2}&{0}—;\n"
  },
  {
    "path": "lexilla/test/examples/hypertext/Issue20Numbers.php",
    "content": "<?php\n\n123456; 123_456; // +\n1234z6; 123456_; 123__456; // -\n\n0x89Ab; 0x89_aB; // +\n0x89zB; 0x89AB_; 0x_89AB; 0_x89AB; 0x89__AB; // -\n\n1234.; 1234.e-0; 1234e+0; 1234e0; 1234e0.PHP_EOL; // +\n1234._; 1234.e-; 1234e+; 1234e; // -\n\n.1234; .12e0; // +\n.12.0e0; .12e0.0; .12e0e0; // -\n\n1.234e-10; 1.2_34e-1_0; // +\n1.234e-_10; 1.234e_-10; 1.234_e-10; 1._234e-10; 1_.234e-10; // -\n1.234e-+10; 1.234e-_+10; // -\n\n01234567; 0_1234567; // +\n012345678; // -\n\n0...0; // 0. . .0\n.0..0; // .0 . .0\n0e+0+0e+0; // 0e+0 + 0e+0\n\n;0#comment\n;0//comment\n;0/*comment*/;\n\n?>\n"
  },
  {
    "path": "lexilla/test/examples/hypertext/Issue20Numbers.php.folded",
    "content": " 2 400   0 + <?php\n 1 401   0 | \n 0 401   0 | 123456; 123_456; // +\n 0 401   0 | 1234z6; 123456_; 123__456; // -\n 1 401   0 | \n 0 401   0 | 0x89Ab; 0x89_aB; // +\n 0 401   0 | 0x89zB; 0x89AB_; 0x_89AB; 0_x89AB; 0x89__AB; // -\n 1 401   0 | \n 0 401   0 | 1234.; 1234.e-0; 1234e+0; 1234e0; 1234e0.PHP_EOL; // +\n 0 401   0 | 1234._; 1234.e-; 1234e+; 1234e; // -\n 1 401   0 | \n 0 401   0 | .1234; .12e0; // +\n 0 401   0 | .12.0e0; .12e0.0; .12e0e0; // -\n 1 401   0 | \n 0 401   0 | 1.234e-10; 1.2_34e-1_0; // +\n 0 401   0 | 1.234e-_10; 1.234e_-10; 1.234_e-10; 1._234e-10; 1_.234e-10; // -\n 0 401   0 | 1.234e-+10; 1.234e-_+10; // -\n 1 401   0 | \n 0 401   0 | 01234567; 0_1234567; // +\n 0 401   0 | 012345678; // -\n 1 401   0 | \n 0 401   0 | 0...0; // 0. . .0\n 0 401   0 | .0..0; // .0 . .0\n 0 401   0 | 0e+0+0e+0; // 0e+0 + 0e+0\n 1 401   0 | \n 0 401   0 | ;0#comment\n 0 401   0 | ;0//comment\n 0 401   0 | ;0/*comment*/;\n 1 401   0 | \n 0 401   0 | ?>\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/hypertext/Issue20Numbers.php.styled",
    "content": "{18}<?php{118}\n\n{122}123456{127};{118} {122}123_456{127};{118} {125}// +{118}\n1234z6{127};{118} 123456_{127};{118} 123__456{127};{118} {125}// -{118}\n\n{122}0x89Ab{127};{118} {122}0x89_aB{127};{118} {125}// +{118}\n0x89zB{127};{118} 0x89AB_{127};{118} 0x_89AB{127};{118} 0_x89AB{127};{118} 0x89__AB{127};{118} {125}// -{118}\n\n{122}1234.{127};{118} {122}1234.e-0{127};{118} {122}1234e+0{127};{118} {122}1234e0{127};{118} {122}1234e0{127}.{118}PHP_EOL{127};{118} {125}// +{118}\n1234._{127};{118} 1234.e-{127};{118} 1234e+{127};{118} 1234e{127};{118} {125}// -{118}\n\n{122}.1234{127};{118} {122}.12e0{127};{118} {125}// +{118}\n.12.0e0{127};{118} .12e0.0{127};{118} .12e0e0{127};{118} {125}// -{118}\n\n{122}1.234e-10{127};{118} {122}1.2_34e-1_0{127};{118} {125}// +{118}\n1.234e-_10{127};{118} 1.234e_-10{127};{118} 1.234_e-10{127};{118} 1._234e-10{127};{118} 1_.234e-10{127};{118} {125}// -{118}\n1.234e-+10{127};{118} 1.234e-_+10{127};{118} {125}// -{118}\n\n{122}01234567{127};{118} {122}0_1234567{127};{118} {125}// +{118}\n012345678{127};{118} {125}// -{118}\n\n{122}0.{127}.{122}.0{127};{118} {125}// 0. . .0{118}\n{122}.0{127}.{122}.0{127};{118} {125}// .0 . .0{118}\n{122}0e+0{127}+{122}0e+0{127};{118} {125}// 0e+0 + 0e+0{118}\n\n{127};{122}0{125}#comment{118}\n{127};{122}0{125}//comment{118}\n{127};{122}0{124}/*comment*/{127};{118}\n\n{18}?>{0}\n"
  },
  {
    "path": "lexilla/test/examples/hypertext/Issue47.html",
    "content": "<script src=\"\">\n// comment\n</script>\n<script>\n{\n};\n</script>\n"
  },
  {
    "path": "lexilla/test/examples/hypertext/Issue47.html.folded",
    "content": " 2 400   0 + <script src=\"\">\n 0 401   0 | // comment\n 0 401   0 | </script>\n 2 400   0 + <script>\n 2 401   0 + {\n 0 402   0 | };\n 0 401   0 | </script>\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/hypertext/Issue47.html.styled",
    "content": "{1}<script{8} {3}src{8}={6}\"\"{1}>{40}\n{43}// comment{41}\n{1}</script>{0}\n{1}<script>{40}\n{50}{{41}\n{50}};{41}\n{1}</script>{0}\n"
  },
  {
    "path": "lexilla/test/examples/hypertext/Issue53.html",
    "content": "<script>\n{\n    /\\d{1}\\}/.test('{0}')\n}\n</script>\n"
  },
  {
    "path": "lexilla/test/examples/hypertext/Issue53.html.folded",
    "content": " 2 400   0 + <script>\n 2 401   0 + {\n 0 402   0 |     /\\d{1}\\}/.test('{0}')\n 0 402   0 | }\n 0 401   0 | </script>\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/hypertext/Issue53.html.styled",
    "content": "{1}<script>{40}\n{50}{{41}\n    {52}/\\d{1}\\}/{50}.{46}test{50}({49}'{0}'{50}){41}\n{50}}{41}\n{1}</script>{0}\n"
  },
  {
    "path": "lexilla/test/examples/hypertext/SciTE.properties",
    "content": "lexer.*=hypertext\n# Tags and attributes\nkeywords.*=b br body content encoding head href html img language li link meta \\\nname p rel runat script src strong title type ul version xml xmlns\n# JavaScript\nkeywords2.*=function var\n# Basic\nkeywords3.*=dim sub\n# Python\nkeywords4.*=import pass\n# PHP\nkeywords5.*=echo __file__ __line__\n# SGML\nkeywords6.*=ELEMENT\n\n# Tag\nsubstyles.hypertext.1=1\nsubstylewords.1.1.*=destination\n# Attribute\nsubstyles.hypertext.3=1\nsubstylewords.3.1.*=from img.height img.width\n# JavaScript\nsubstyles.hypertext.46=1\nsubstylewords.46.1.*=let\n# Server JavaScript\nsubstyles.hypertext.61=1\nsubstylewords.61.1.*=serve\n# Basic\nsubstyles.hypertext.74=1\nsubstylewords.74.1.*=peek\n# Python\nsubstyles.hypertext.96=1\nsubstylewords.96.1.*=parse\n# PHP\nsubstyles.hypertext.121=1\nsubstylewords.121.1.*=decrypt\n\nfold=1\nfold.html=1\nfold.html.preprocessor=1\nfold.hypertext.comment=1\n\nmatch mako.html\n  lexer.html.mako=1\n"
  },
  {
    "path": "lexilla/test/examples/hypertext/ServerBasic.aspx",
    "content": "<%@ register tagprefix=\"uc1\" \n    tagname=\"CalendarUserControl\" \n    src=\"~/CalendarUserControl.ascx\" %>\n<!DOCTYPE html>\n<html>\n<%@language=VBScript%>\n<%-- comment --%>\n<script type=\"text/vbscript\">\n'1%>2\n'1?>2\n'%>\n'?>\n</script>\n<script type=\"text/vbscript\">\ndim e=\"%>\"\ndim f=\"?>\"\n</script>\nStart\n<%response.write(\"1\")%>\n<% 'comment%>\n<%dim x=\"2\"'comment%>\n<%response.write(x)%>\nEnd\n</html>\n"
  },
  {
    "path": "lexilla/test/examples/hypertext/ServerBasic.aspx.folded",
    "content": " 2 400   0 + <%@ register tagprefix=\"uc1\" \n 0 401   0 |     tagname=\"CalendarUserControl\" \n 0 401   0 |     src=\"~/CalendarUserControl.ascx\" %>\n 0 400   0   <!DOCTYPE html>\n 2 400   0 + <html>\n 0 401   0 | <%@language=VBScript%>\n 0 401   0 | <%-- comment --%>\n 2 401   0 + <script type=\"text/vbscript\">\n 0 402   0 | '1%>2\n 0 402   0 | '1?>2\n 0 402   0 | '%>\n 0 402   0 | '?>\n 0 402   0 | </script>\n 2 401   0 + <script type=\"text/vbscript\">\n 0 402   0 | dim e=\"%>\"\n 0 402   0 | dim f=\"?>\"\n 0 402   0 | </script>\n 0 401   0 | Start\n 0 401   0 | <%response.write(\"1\")%>\n 0 401   0 | <% 'comment%>\n 0 401   0 | <%dim x=\"2\"'comment%>\n 0 401   0 | <%response.write(x)%>\n 0 401   0 | End\n 0 401   0 | </html>\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/hypertext/ServerBasic.aspx.styled",
    "content": "{15}<%@{16} register tagprefix=\"uc1\" \n    tagname=\"CalendarUserControl\" \n    src=\"~/CalendarUserControl.ascx\" {15}%>{0}\n{21}<!{26}DOCTYPE html{21}>{0}\n{1}<html>{0}\n{15}<%@{16}language=VBScript{15}%>{0}\n{15}<%--{20} comment --{15}%>{0}\n{1}<script{8} {3}type{8}={6}\"text/vbscript\"{1}>{70}\n{72}'1%>2{71}\n{72}'1?>2{71}\n{72}'%>{71}\n{72}'?>{71}\n{1}</script>{0}\n{1}<script{8} {3}type{8}={6}\"text/vbscript\"{1}>{70}\n{74}dim{71} {76}e{71}={75}\"%>\"{71}\n{74}dim{71} {76}f{71}={75}\"?>\"{71}\n{1}</script>{0}\nStart\n{15}<%{86}response.write{81}({85}\"1\"{81}){15}%>{0}\n{15}<%{81} {82}'comment{15}%>{0}\n{15}<%{84}dim{81} {86}x{81}={85}\"2\"{82}'comment{15}%>{0}\n{15}<%{86}response.write{81}({86}x{81}){15}%>{0}\nEnd\n{1}</html>{0}\n"
  },
  {
    "path": "lexilla/test/examples/hypertext/ServerJavaScript.aspx",
    "content": "<!DOCTYPE html>\n<html>\n<%@language=JScript%>\n<%-- comment --%>\n<script type=\"text/javascript\">\n//%>\n//?>\n</script>\n<script type=\"text/javascript\">\ne=\"%>\";\nf=\"?>\";\n</script>\nStart\n<%Response.Write(\"1\")%>\n<%var x=3;//comment%>\n<%x=3;//comment ?> %>\n<%Response.Write(x)%>\nEnd\n</html>\n"
  },
  {
    "path": "lexilla/test/examples/hypertext/ServerJavaScript.aspx.folded",
    "content": " 0 400   0   <!DOCTYPE html>\n 2 400   0 + <html>\n 0 401   0 | <%@language=JScript%>\n 0 401   0 | <%-- comment --%>\n 2 401   0 + <script type=\"text/javascript\">\n 0 402   0 | //%>\n 0 402   0 | //?>\n 0 402   0 | </script>\n 2 401   0 + <script type=\"text/javascript\">\n 0 402   0 | e=\"%>\";\n 0 402   0 | f=\"?>\";\n 0 402   0 | </script>\n 0 401   0 | Start\n 0 401   0 | <%Response.Write(\"1\")%>\n 0 401   0 | <%var x=3;//comment%>\n 0 401   0 | <%x=3;//comment ?> %>\n 0 401   0 | <%Response.Write(x)%>\n 0 401   0 | End\n 0 401   0 | </html>\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/hypertext/ServerJavaScript.aspx.styled",
    "content": "{21}<!{26}DOCTYPE html{21}>{0}\n{1}<html>{0}\n{15}<%@{16}language=JScript{15}%>{0}\n{15}<%--{20} comment --{15}%>{0}\n{1}<script{8} {3}type{8}={6}\"text/javascript\"{1}>{40}\n{43}//%>{41}\n{43}//?>{41}\n{1}</script>{0}\n{1}<script{8} {3}type{8}={6}\"text/javascript\"{1}>{40}\n{46}e{50}={48}\"%>\"{50};{41}\n{46}f{50}={48}\"?>\"{50};{41}\n{1}</script>{0}\nStart\n{15}<%{61}Response.Write{65}({63}\"1\"{65}){15}%>{0}\n{15}<%{62}var{56} {61}x{65}={60}3{65};{58}//comment{15}%>{0}\n{15}<%{61}x{65}={60}3{65};{58}//comment ?> {15}%>{0}\n{15}<%{61}Response.Write{65}({61}x{65}){15}%>{0}\nEnd\n{1}</html>{0}\n"
  },
  {
    "path": "lexilla/test/examples/hypertext/apostophe.php",
    "content": "<?php\n# Test that currently fails as comment style not started in a number.\n# line-comment\n// line-comment\n/* comment */\n$foo = 0#comment\n$foo = 0//comment\n$foo = 0/*'*/;\n?>\n\n<br />\n"
  },
  {
    "path": "lexilla/test/examples/hypertext/apostophe.php.folded",
    "content": " 2 400   0 + <?php\n 0 401   0 | # Test that currently fails as comment style not started in a number.\n 0 401   0 | # line-comment\n 0 401   0 | // line-comment\n 0 401   0 | /* comment */\n 0 401   0 | $foo = 0#comment\n 0 401   0 | $foo = 0//comment\n 0 401   0 | $foo = 0/*'*/;\n 0 401   0 | ?>\n 1 400   0   \n 0 400   0   <br />\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/hypertext/apostophe.php.styled",
    "content": "{18}<?php{118}\n{125}# Test that currently fails as comment style not started in a number.{118}\n{125}# line-comment{118}\n{125}// line-comment{118}\n{124}/* comment */{118}\n{123}$foo{118} {127}={118} {122}0{125}#comment{118}\n{123}$foo{118} {127}={118} {122}0{125}//comment{118}\n{123}$foo{118} {127}={118} {122}0{124}/*'*/{127};{118}\n{18}?>{0}\n\n{1}<br{8} {11}/>{0}\n"
  },
  {
    "path": "lexilla/test/examples/hypertext/comment.html",
    "content": "<!----><p>1 normal comment</p>\n<!-- > and <!--><p>2 valid comment</p>\n<!--><p>3 abrupt-closing-of-empty-comment</p>\n<!---><p>4 abrupt-closing-of-empty-comment</p>\n<!----!><p>5 incorrectly-closed-comment</p>\n<!--!> <h1 value=\"--!><p>6 incorrectly-closed-comment</p>\n<!--<!---><p>7 nested-comment</p>\n<!--<!---!><p>8 nested-comment</p>\n"
  },
  {
    "path": "lexilla/test/examples/hypertext/comment.html.folded",
    "content": " 0 400   0   <!----><p>1 normal comment</p>\n 0 400   0   <!-- > and <!--><p>2 valid comment</p>\n 0 400   0   <!--><p>3 abrupt-closing-of-empty-comment</p>\n 0 400   0   <!---><p>4 abrupt-closing-of-empty-comment</p>\n 0 400   0   <!----!><p>5 incorrectly-closed-comment</p>\n 0 400   0   <!--!> <h1 value=\"--!><p>6 incorrectly-closed-comment</p>\n 0 400   0   <!--<!---><p>7 nested-comment</p>\n 0 400   0   <!--<!---!><p>8 nested-comment</p>\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/hypertext/comment.html.styled",
    "content": "{9}<!---->{1}<p>{0}1 normal comment{1}</p>{0}\n{9}<!-- > and <!-->{1}<p>{0}2 valid comment{1}</p>{0}\n{9}<!-->{1}<p>{0}3 abrupt-closing-of-empty-comment{1}</p>{0}\n{9}<!--->{1}<p>{0}4 abrupt-closing-of-empty-comment{1}</p>{0}\n{9}<!----!>{1}<p>{0}5 incorrectly-closed-comment{1}</p>{0}\n{9}<!--!> <h1 value=\"--!>{1}<p>{0}6 incorrectly-closed-comment{1}</p>{0}\n{9}<!--<!--->{1}<p>{0}7 nested-comment{1}</p>{0}\n{9}<!--<!---!>{1}<p>{0}8 nested-comment{1}</p>{0}\n"
  },
  {
    "path": "lexilla/test/examples/hypertext/mako.html",
    "content": "Mako examples extracted from https://docs.makotemplates.org/en/latest/syntax.html\n\nExpression\n${x}\n${}\n${pow(x,2) + pow(y,2)}\n\nExpression Escaping\n${\"this is some text\" | u}\n\nControl Structures\n% if x==5:\n    this is some output\n% endif\n\n% for a in ['one', 'two', 'three', 'four', 'five']:\n    % if a[0] == 't':\n    its two or three\n    % elif a[0] == 'f':\n    four/five\n    % else:\n    one\n    % endif\n% endfor\n\nThe % sign can also be escaped, if you actually want to emit a percent sign as the first non whitespace character on a line, by escaping it as in %%:\n%% some text\n    %% some more text\n\nThe Loop Context\nThe loop context provides additional information about a loop while inside of a % for structure:\n\n<ul>\n% for a in (\"one\", \"two\", \"three\"):\n    <li>Item ${loop.index}: ${a}</li>\n% endfor\n</ul>\n\nA multiline version exists using <%doc> ...text... </%doc>:\n<%doc>\n    these are comments\n    more comments\n</%doc>\n\nPython Blocks\nAny arbitrary block of python can be dropped in using the <% %> tags:\nthis is a template\n\n<%\n    x = db.get_resource('foo')\n    y = [z.element for z in x if x.frobnizzle==5]\n%>\n% for elem in y:\n    element: ${elem}\n% endfor\nWithin <% %>, youre writing a regular block of Python code. While the code can appear with an arbitrary level of preceding whitespace, it has to be consistently formatted with itself. Makos compiler will adjust the block of Python to be consistent with the surrounding generated Python code.\n\nModule-level Blocks\nA variant on <% %> is the module-level code block, denoted by <%! %>. Code within these tags is executed at the module level of the template, and not within the rendering function of the template. Therefore, this code does not have access to the templates context and is only executed when the template is loaded into memory (which can be only once per application, or more, depending on the runtime environment). Use the <%! %> tags to declare your templates imports, as well as any pure-Python functions you might want to declare:\n\n<%!\n    import mylib\n    import re\n\n    def filter(text):\n        return re.sub(r'^@', '', text)\n%>\n\nTags\nThe rest of what Mako offers takes place in the form of tags. All tags use the same syntax, which is similar to an XML tag except that the first character of the tag name is a % character. The tag is closed either by a contained slash character, or an explicit closing tag:\n\n<%include file=\"foo.txt\"/>\n\n<%def name=\"foo\" buffered=\"True\">\n    this is a def\n</%def>\n"
  },
  {
    "path": "lexilla/test/examples/hypertext/mako.html.folded",
    "content": " 0 400   0   Mako examples extracted from https://docs.makotemplates.org/en/latest/syntax.html\n 1 400   0   \n 0 400   0   Expression\n 0 400   0   ${x}\n 0 400   0   ${}\n 0 400   0   ${pow(x,2) + pow(y,2)}\n 1 400   0   \n 0 400   0   Expression Escaping\n 0 400   0   ${\"this is some text\" | u}\n 1 400   0   \n 0 400   0   Control Structures\n 0 400   0   % if x==5:\n 0 400   0       this is some output\n 0 400   0   % endif\n 1 400   0   \n 0 400   0   % for a in ['one', 'two', 'three', 'four', 'five']:\n 0 400   0       % if a[0] == 't':\n 0 400   0       its two or three\n 0 400   0       % elif a[0] == 'f':\n 0 400   0       four/five\n 0 400   0       % else:\n 0 400   0       one\n 0 400   0       % endif\n 0 400   0   % endfor\n 1 400   0   \n 0 400   0   The % sign can also be escaped, if you actually want to emit a percent sign as the first non whitespace character on a line, by escaping it as in %%:\n 0 400   0   %% some text\n 0 400   0       %% some more text\n 1 400   0   \n 0 400   0   The Loop Context\n 0 400   0   The loop context provides additional information about a loop while inside of a % for structure:\n 1 400   0   \n 2 400   0 + <ul>\n 0 401   0 | % for a in (\"one\", \"two\", \"three\"):\n 0 401   0 |     <li>Item ${loop.index}: ${a}</li>\n 0 401   0 | % endfor\n 0 401   0 | </ul>\n 1 400   0   \n 0 400   0   A multiline version exists using <%doc> ...text... </%doc>:\n 0 400   0   <%doc>\n 0 400   0       these are comments\n 0 400   0       more comments\n 0 400   0   </%doc>\n 1 400   0   \n 0 400   0   Python Blocks\n 0 400   0   Any arbitrary block of python can be dropped in using the <% %> tags:\n 0 400   0   this is a template\n 1 400   0   \n 0 400   0   <%\n 0 400   0       x = db.get_resource('foo')\n 0 400   0       y = [z.element for z in x if x.frobnizzle==5]\n 0 400   0   %>\n 0 400   0   % for elem in y:\n 0 400   0       element: ${elem}\n 0 400   0   % endfor\n 0 400   0   Within <% %>, youre writing a regular block of Python code. While the code can appear with an arbitrary level of preceding whitespace, it has to be consistently formatted with itself. Makos compiler will adjust the block of Python to be consistent with the surrounding generated Python code.\n 1 400   0   \n 0 400   0   Module-level Blocks\n 0 400   0   A variant on <% %> is the module-level code block, denoted by <%! %>. Code within these tags is executed at the module level of the template, and not within the rendering function of the template. Therefore, this code does not have access to the templates context and is only executed when the template is loaded into memory (which can be only once per application, or more, depending on the runtime environment). Use the <%! %> tags to declare your templates imports, as well as any pure-Python functions you might want to declare:\n 1 400   0   \n 0 400   0   <%!\n 0 400   0       import mylib\n 0 400   0       import re\n 1 400   0   \n 0 400   0       def filter(text):\n 0 400   0           return re.sub(r'^@', '', text)\n 0 400   0   %>\n 1 400   0   \n 0 400   0   Tags\n 0 400   0   The rest of what Mako offers takes place in the form of tags. All tags use the same syntax, which is similar to an XML tag except that the first character of the tag name is a % character. The tag is closed either by a contained slash character, or an explicit closing tag:\n 1 400   0   \n 0 400   0   <%include file=\"foo.txt\"/>\n 1 400   0   \n 0 400   0   <%def name=\"foo\" buffered=\"True\">\n 0 400   0       this is a def\n 0 400   0   </%def>\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/hypertext/mako.html.styled",
    "content": "{0}Mako examples extracted from https://docs.makotemplates.org/en/latest/syntax.html\n\nExpression\n{15}${{117}x{15}}{0}\n{15}${}{0}\n{15}${{117}pow{116}({117}x{116},{108}2{116}){106} {116}+{106} {117}pow{116}({117}y{116},{108}2{116}){15}}{0}\n\nExpression Escaping\n{15}${{109}\"this is some text\"{106} {116}|{106} {117}u{15}}{0}\n\nControl Structures\n{15}%{106} {117}if{106} {117}x{116}=={108}5{116}:{0}\n    this is some output\n{15}%{106} {117}endif{0}\n\n{15}%{106} {117}for{106} {117}a{106} {117}in{106} {116}[{110}'one'{116},{106} {110}'two'{116},{106} {110}'three'{116},{106} {110}'four'{116},{106} {110}'five'{116}]:{0}\n    {15}%{106} {117}if{106} {117}a{116}[{108}0{116}]{106} {116}=={106} {110}'t'{116}:{0}\n    its two or three\n    {15}%{106} {117}elif{106} {117}a{116}[{108}0{116}]{106} {116}=={106} {110}'f'{116}:{0}\n    four/five\n    {15}%{106} {117}else{116}:{0}\n    one\n    {15}%{106} {117}endif{0}\n{15}%{106} {117}endfor{0}\n\nThe % sign can also be escaped, if you actually want to emit a percent sign as the first non whitespace character on a line, by escaping it as in %%:\n{15}%{116}%{106} {117}some{106} {117}text{0}\n    {15}%{116}%{106} {117}some{106} {117}more{106} {117}text{0}\n\nThe Loop Context\nThe loop context provides additional information about a loop while inside of a % for structure:\n\n{1}<ul>{0}\n{15}%{106} {117}for{106} {117}a{106} {117}in{106} {116}({109}\"one\"{116},{106} {109}\"two\"{116},{106} {109}\"three\"{116}):{0}\n    {1}<li>{0}Item {15}${{117}loop.index{15}}{0}: {15}${{117}a{15}}{1}</li>{0}\n{15}%{106} {117}endfor{0}\n{1}</ul>{0}\n\nA multiline version exists using {15}<%{2}doc{15}>{0} ...text... {15}</%{2}doc{15}>{0}:\n{15}<%{2}doc{15}>{0}\n    these are comments\n    more comments\n{15}</%{2}doc{15}>{0}\n\nPython Blocks\nAny arbitrary block of python can be dropped in using the {15}<%{106} {15}%>{0} tags:\nthis is a template\n\n{15}<%{105}\n{106}    {117}x{106} {116}={106} {117}db.get_resource{116}({110}'foo'{116}){106}\n    {117}y{106} {116}={106} {116}[{117}z.element{106} {117}for{106} {117}z{106} {117}in{106} {117}x{106} {117}if{106} {117}x.frobnizzle{116}=={108}5{116}]{106}\n{15}%>{0}\n{15}%{106} {117}for{106} {117}elem{106} {117}in{106} {117}y{116}:{0}\n    element: {15}${{117}elem{15}}{0}\n{15}%{106} {117}endfor{0}\nWithin {15}<%{106} {15}%>{0}, youre writing a regular block of Python code. While the code can appear with an arbitrary level of preceding whitespace, it has to be consistently formatted with itself. Makos compiler will adjust the block of Python to be consistent with the surrounding generated Python code.\n\nModule-level Blocks\nA variant on {15}<%{106} {15}%>{0} is the module-level code block, denoted by {15}<%{116}!{106} {15}%>{0}. Code within these tags is executed at the module level of the template, and not within the rendering function of the template. Therefore, this code does not have access to the templates context and is only executed when the template is loaded into memory (which can be only once per application, or more, depending on the runtime environment). Use the {15}<%{116}!{106} {15}%>{0} tags to declare your templates imports, as well as any pure-Python functions you might want to declare:\n\n{15}<%{116}!{105}\n{106}    {111}import{106} {117}mylib{106}\n    {111}import{106} {117}re{106}\n\n    {117}def{106} {115}filter{116}({117}text{116}):{106}\n        {117}return{106} {117}re.sub{116}({117}r{110}'^@'{116},{106} {110}''{116},{106} {117}text{116}){106}\n{15}%>{0}\n\nTags\nThe rest of what Mako offers takes place in the form of tags. All tags use the same syntax, which is similar to an XML tag except that the first character of the tag name is a % character. The tag is closed either by a contained slash character, or an explicit closing tag:\n\n{15}<%{2}include{106} {117}file{116}={109}\"foo.txt\"{15}/>{0}\n\n{15}<%{2}def{106} {117}name{116}={109}\"foo\"{106} {117}buffered{116}={109}\"True\"{15}>{0}\n    this is a def\n{15}</%{2}def{15}>{0}\n"
  },
  {
    "path": "lexilla/test/examples/hypertext/x.asp",
    "content": "<%@language=javas%>\n<% \n#include \nserve x;\nfunction x() {\n}\n%>\n<%@language=vbscript%>\n<% \nsub x 'comment \npeek 1024\n%>\n<!-- Folding for Python is incorrect. See #235. -->\n<%@language=python%>\n<% \nimport random\nx = 'comment'\nparse \"x=8\"\n%>\n<head>\n<body></body>\n"
  },
  {
    "path": "lexilla/test/examples/hypertext/x.asp.folded",
    "content": " 0 400   0   <%@language=javas%>\n 2 400   0 + <% \n 0 401   0 | #include \n 0 401   0 | serve x;\n 2 401   0 + function x() {\n 0 402   0 | }\n 0 401   0 | %>\n 0 400   0   <%@language=vbscript%>\n 2 400   0 + <% \n 0 401   0 | sub x 'comment \n 0 401   0 | peek 1024\n 0 401   0 | %>\n 0 400   0   <!-- Folding for Python is incorrect. See #235. -->\n 0 400   0   <%@language=python%>\n 0 400   0   <% \n 0 400   0   import random\n 0 400   0   x = 'comment'\n 0 400   0   parse \"x=8\"\n 0 400   0   %>\n 2 3ff   0 + <head>\n 0 400   0   <body></body>\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/hypertext/x.asp.styled",
    "content": "{15}<%@{16}language=javas{15}%>{0}\n{15}<%{56} \n#{61}include{56} \n{195}serve{56} {61}x{65};{56}\n{62}function{56} {61}x{65}(){56} {65}{{56}\n{65}}{56}\n{15}%>{0}\n{15}<%@{16}language=vbscript{15}%>{0}\n{15}<%{81} \n{84}sub{81} {86}x{81} {82}'comment {81}\n{196}peek{81} {83}1024{81}\n{15}%>{0}\n{9}<!-- Folding for Python is incorrect. See #235. -->{0}\n{15}<%@{16}language=python{15}%>{0}\n{15}<%{106} \n{111}import{106} {117}random{106}\n{117}x{106} {116}={106} {110}'comment'{106}\n{197}parse{106} {109}\"x=8\"{106}\n{15}%>{0}\n{1}<head>{0}\n{1}<body></body>{0}\n"
  },
  {
    "path": "lexilla/test/examples/hypertext/x.html",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<script type=\"text/javascript\">\nvar b = /abc/i.test('abc');\nlet b = 1;\n'x\\\n</t>'\n// issue 214 fix to behave same as single quote escaped eol\n\"x\\\n</t>\"\n</script>\n<head>\n    <meta name=\"Date.Modified\" content=\"20010515\" />\n    <title>SinkWorld - Portability</title>\n    §\n    <unknown>SinkWorld - Portability</unknown>\n    <img src=\"SciTEIco.png\" height=64 width=64 />\n    <link rel=\"stylesheet\" type=\"text/css\" from=\"SW.css\">\n    <destination href=\"SW.css\" height=64 width=64></destination>\n</head>\n</html>\n"
  },
  {
    "path": "lexilla/test/examples/hypertext/x.html.folded",
    "content": " 0 400   0   <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n 2 400   0 + <html xmlns=\"http://www.w3.org/1999/xhtml\">\n 2 401   0 + <script type=\"text/javascript\">\n 0 402   0 | var b = /abc/i.test('abc');\n 0 402   0 | let b = 1;\n 0 402   0 | 'x\\\n 0 402   0 | </t>'\n 0 402   0 | // issue 214 fix to behave same as single quote escaped eol\n 0 402   0 | \"x\\\n 0 402   0 | </t>\"\n 0 402   0 | </script>\n 2 401   0 + <head>\n 0 402   0 |     <meta name=\"Date.Modified\" content=\"20010515\" />\n 0 402   0 |     <title>SinkWorld - Portability</title>\n 0 402   0 |     §\n 0 402   0 |     <unknown>SinkWorld - Portability</unknown>\n 0 402   0 |     <img src=\"SciTEIco.png\" height=64 width=64 />\n 0 402   0 |     <link rel=\"stylesheet\" type=\"text/css\" from=\"SW.css\">\n 0 402   0 |     <destination href=\"SW.css\" height=64 width=64></destination>\n 0 402   0 | </head>\n 0 401   0 | </html>\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/hypertext/x.html.styled",
    "content": "{12}<?{1}xml{8} {3}version{8}={6}\"1.0\"{8} {3}encoding{8}={6}\"UTF-8\"{13}?>{0}\n{1}<html{8} {3}xmlns{8}={6}\"http://www.w3.org/1999/xhtml\"{1}>{0}\n{1}<script{8} {3}type{8}={6}\"text/javascript\"{1}>{40}\n{47}var{41} {46}b{41} {50}={41} {52}/abc/i{46}.test{50}({49}'abc'{50});{41}\n{194}let{41} {46}b{41} {50}={41} {45}1{50};{41}\n{49}'x\\\n</t>'{41}\n{43}// issue 214 fix to behave same as single quote escaped eol{41}\n{48}\"x\\\n</t>\"{41}\n{1}</script>{0}\n{1}<head>{0}\n    {1}<meta{8} {3}name{8}={6}\"Date.Modified\"{8} {3}content{8}={6}\"20010515\"{8} {11}/>{0}\n    {1}<title>{0}SinkWorld - Portability{1}</title>{0}\n    §\n    {2}<unknown>{0}SinkWorld - Portability{2}</unknown>{0}\n    {1}<img{8} {3}src{8}={6}\"SciTEIco.png\"{8} {193}height{8}={5}64{8} {193}width{8}={5}64{8} {11}/>{0}\n    {1}<link{8} {3}rel{8}={6}\"stylesheet\"{8} {3}type{8}={6}\"text/css\"{8} {193}from{8}={6}\"SW.css\"{1}>{0}\n    {192}<destination{8} {3}href{8}={6}\"SW.css\"{8} {4}height{8}={5}64{8} {4}width{8}={5}64{1}>{192}</destination>{0}\n{1}</head>{0}\n{1}</html>{0}\n"
  },
  {
    "path": "lexilla/test/examples/hypertext/x.php",
    "content": "<head> <!-- About to script -->\n<?php\ndecrypt \"xyzzy\";\necho __FILE__.__LINE__;\necho \"<!-- -->\\n\";\n/* ?> */\n?>\n<strong>for</strong><b>if</b>\n<script>\n\talert(\"<?php echo \"PHP\" . ' Code'; ?>\");\n\talert('<?= 'PHP' . \"Code\"; ?>');\n\tvar xml =\n\t'<?xml version=\"1.0\" encoding=\"iso-8859-1\"?><SO_GL>' +\n\t'<GLOBAL_LIST mode=\"complete\"><NAME>SO_SINGLE_MULTIPLE_COMMAND_BUILDER</NAME>' +\n\t'<LIST_ELEMENT><CODE>1</CODE><LIST_VALUE><![CDATA[RM QI WEB BOOKING]]></LIST_VALUE></LIST_ELEMENT>' +\n\t'<LIST_ELEMENT><CODE>1</CODE><LIST_VALUE><![CDATA[RM *PCC]]></LIST_VALUE></LIST_ELEMENT>' +\n\t'</GLOBAL_LIST></SO_GL>';\n</script>\n"
  },
  {
    "path": "lexilla/test/examples/hypertext/x.php.folded",
    "content": " 2 400   0 + <head> <!-- About to script -->\n 2 401   0 + <?php\n 0 402   0 | decrypt \"xyzzy\";\n 0 402   0 | echo __FILE__.__LINE__;\n 0 402   0 | echo \"<!-- -->\\n\";\n 0 402   0 | /* ?> */\n 0 402   0 | ?>\n 0 401   0 | <strong>for</strong><b>if</b>\n 2 401   0 + <script>\n 0 402   0 | \talert(\"<?php echo \"PHP\" . ' Code'; ?>\");\n 0 402   0 | \talert('<?= 'PHP' . \"Code\"; ?>');\n 0 402   0 | \tvar xml =\n 0 402   0 | \t'<?xml version=\"1.0\" encoding=\"iso-8859-1\"?><SO_GL>' +\n 0 402   0 | \t'<GLOBAL_LIST mode=\"complete\"><NAME>SO_SINGLE_MULTIPLE_COMMAND_BUILDER</NAME>' +\n 0 402   0 | \t'<LIST_ELEMENT><CODE>1</CODE><LIST_VALUE><![CDATA[RM QI WEB BOOKING]]></LIST_VALUE></LIST_ELEMENT>' +\n 0 402   0 | \t'<LIST_ELEMENT><CODE>1</CODE><LIST_VALUE><![CDATA[RM *PCC]]></LIST_VALUE></LIST_ELEMENT>' +\n 0 402   0 | \t'</GLOBAL_LIST></SO_GL>';\n 0 402   0 | </script>\n 0 401   0 | "
  },
  {
    "path": "lexilla/test/examples/hypertext/x.php.styled",
    "content": "{1}<head>{0} {9}<!-- About to script -->{0}\n{18}<?php{118}\n{198}decrypt{118} {119}\"xyzzy\"{127};{118}\n{121}echo{118} {121}__FILE__{127}.{121}__LINE__{127};{118}\n{121}echo{118} {119}\"<!-- -->\\n\"{127};{118}\n{124}/* ?> */{118}\n{18}?>{0}\n{1}<strong>{0}for{1}</strong><b>{0}if{1}</b>{0}\n{1}<script>{40}\n{41}\t{46}alert{50}({48}\"{18}<?php{118} {121}echo{118} {119}\"PHP\"{118} {127}.{118} {120}' Code'{127};{118} {18}?>{48}\"{50});{41}\n\t{46}alert{50}({49}'{18}<?{127}={118} {120}'PHP'{118} {127}.{118} {119}\"Code\"{127};{118} {18}?>{49}'{50});{41}\n\t{47}var{41} {46}xml{41} {50}={41}\n\t{49}'<?xml version=\"1.0\" encoding=\"iso-8859-1\"?><SO_GL>'{41} {50}+{41}\n\t{49}'<GLOBAL_LIST mode=\"complete\"><NAME>SO_SINGLE_MULTIPLE_COMMAND_BUILDER</NAME>'{41} {50}+{41}\n\t{49}'<LIST_ELEMENT><CODE>1</CODE><LIST_VALUE><![CDATA[RM QI WEB BOOKING]]></LIST_VALUE></LIST_ELEMENT>'{41} {50}+{41}\n\t{49}'<LIST_ELEMENT><CODE>1</CODE><LIST_VALUE><![CDATA[RM *PCC]]></LIST_VALUE></LIST_ELEMENT>'{41} {50}+{41}\n\t{49}'</GLOBAL_LIST></SO_GL>'{50};{41}\n{1}</script>{0}\n"
  },
  {
    "path": "lexilla/test/examples/inno/SciTE.properties",
    "content": "lexer.*.iss=inno\nfold=1\nkeywords.*.iss=code custommessages files ini messages registry setup\nkeywords2.*.iss=appname appcopyright onlybelowversion wizardsmallimagefile\nkeywords3.*.iss=destdir key onlybelowversion root source string valuetype\nkeywords4.*.iss=define\nkeywords5.*.iss=\\\nand begin break case const continue do downto else end except exit \\\nfalse finally for function if not of on or procedure repeat then to \\\ntrue try type until uses var while with\nkeywords6.*.iss=\n"
  },
  {
    "path": "lexilla/test/examples/inno/x.iss",
    "content": "#define app_copyright \"Copyright 1999, app corporation\"\n\n; comment\n\n[Setup]\nAppName=MyApp\nAppCopyright={#app_copyright}\nWizardSmallImageFile=WizardSmallImageFile.bmp\nOnlyBelowVersion=6.01\n\n[Files]\nSource: \"app.exe\"; DestDir: \"{tmp}\"; OnlyBelowVersion: 6.01\n\n[INI]\nKey: \"keyname1\"; String: \"unterminated\nKey: 'keyname2'; String: 'unterminated\n\n[Registry]\nRoot: HKLM; ValueType: string\n\n[CustomMessages]\nkeyname     =Other tasks:'not string\n\n[Messages]\nkeyname=\"{#app_copyright}\"not string\n\n[Code]\n\n// comment\n\n(* comment *)\n\n{ comment }\n\n{ *) comment }\n\n(* } comment *)\n\n(*\ncomment *)\n\n{\ncomment }\n\nfunction ShouldInstallComCtlUpdate: Boolean;\nbegin\n  Result := False;\n  Log('string');\n  IsEscaped('''good''', ''bad');\nend;\n"
  },
  {
    "path": "lexilla/test/examples/inno/x.iss.folded",
    "content": " 0 400   0   #define app_copyright \"Copyright 1999, app corporation\"\n 0 400   0   \n 0 400   0   ; comment\n 0 400   0   \n 2 400   0 + [Setup]\n 0 401   0 | AppName=MyApp\n 0 401   0 | AppCopyright={#app_copyright}\n 0 401   0 | WizardSmallImageFile=WizardSmallImageFile.bmp\n 0 401   0 | OnlyBelowVersion=6.01\n 0 401   0 | \n 2 400   0 + [Files]\n 0 401   0 | Source: \"app.exe\"; DestDir: \"{tmp}\"; OnlyBelowVersion: 6.01\n 0 401   0 | \n 2 400   0 + [INI]\n 0 401   0 | Key: \"keyname1\"; String: \"unterminated\n 0 401   0 | Key: 'keyname2'; String: 'unterminated\n 0 401   0 | \n 2 400   0 + [Registry]\n 0 401   0 | Root: HKLM; ValueType: string\n 0 401   0 | \n 2 400   0 + [CustomMessages]\n 0 401   0 | keyname     =Other tasks:'not string\n 0 401   0 | \n 2 400   0 + [Messages]\n 0 401   0 | keyname=\"{#app_copyright}\"not string\n 0 401   0 | \n 2 400   0 + [Code]\n 0 401   0 | \n 0 401   0 | // comment\n 0 401   0 | \n 0 401   0 | (* comment *)\n 0 401   0 | \n 0 401   0 | { comment }\n 0 401   0 | \n 0 401   0 | { *) comment }\n 0 401   0 | \n 0 401   0 | (* } comment *)\n 0 401   0 | \n 0 401   0 | (*\n 0 401   0 | comment *)\n 0 401   0 | \n 0 401   0 | {\n 0 401   0 | comment }\n 0 401   0 | \n 0 401   0 | function ShouldInstallComCtlUpdate: Boolean;\n 0 401   0 | begin\n 0 401   0 |   Result := False;\n 0 401   0 |   Log('string');\n 0 401   0 |   IsEscaped('''good''', ''bad');\n 0 401   0 | end;\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/inno/x.iss.styled",
    "content": "{5}#define{0} app_copyright {10}\"Copyright 1999, app corporation\"{0}\n\n{1}; comment{0}\n\n{4}[Setup]{0}\n{2}AppName{0}=MyApp\n{2}AppCopyright{0}={6}{#app_copyright}{0}\n{2}WizardSmallImageFile{0}=WizardSmallImageFile.bmp\n{2}OnlyBelowVersion{0}=6.01\n\n{4}[Files]{0}\n{3}Source{0}: {10}\"app.exe\"{0}; {3}DestDir{0}: {10}\"{tmp}\"{0}; {3}OnlyBelowVersion{0}: 6.01\n\n{4}[INI]{0}\n{3}Key{0}: {10}\"keyname1\"{0}; {3}String{0}: {10}\"unterminated{0}\n{3}Key{0}: {11}'keyname2'{0}; {3}String{0}: {11}'unterminated{0}\n\n{4}[Registry]{0}\n{3}Root{0}: HKLM; {3}ValueType{0}: string\n\n{4}[CustomMessages]{0}\nkeyname     =Other tasks:'not string\n\n{4}[Messages]{0}\nkeyname=\"{6}{#app_copyright}{0}\"not string\n\n{4}[Code]{0}\n\n{7}// comment{0}\n\n{7}(* comment *){0}\n\n{7}{ comment }{0}\n\n{7}{ *) comment }{0}\n\n{7}(* } comment *){0}\n\n{7}(*\ncomment *){0}\n\n{7}{\ncomment }{0}\n\n{8}function{0} ShouldInstallComCtlUpdate: Boolean;\n{8}begin{0}\n  Result := {8}False{0};\n  Log({11}'string'{0});\n  IsEscaped({11}'''good'''{0}, {11}''{0}bad{11}');{0}\n{8}end{0};\n"
  },
  {
    "path": "lexilla/test/examples/json/AllStyles.json",
    "content": "// Enumerate all styles: 0 to 13\n\n// default=0\n   \n\n// number=1\n1\n\n// string=2\n\"2\"\n\n// stringeol=3\n\"3\n\n// propertyname=4\n\"4\":\n\n// escapesequence=5\n\"\\n\"\n\n// linecomment=6\n// 6 Line Comment\n\n// blockcomment=7\n/* 7 Block Comment */\n\n// operator=8\n{}\n\n// uri=9\n\"http://9.org\"\n\n// compactiri=10\n\"x:y\"\n\n// keyword=11\ntrue\n\n// ldkeyword=12\n\"@id\"\n\n// error=13\n# 13 error\n"
  },
  {
    "path": "lexilla/test/examples/json/AllStyles.json.folded",
    "content": " 0 400 400   // Enumerate all styles: 0 to 13\n 1 400 400   \n 0 400 400   // default=0\n 1 400 400      \n 1 400 400   \n 0 400 400   // number=1\n 0 400 400   1\n 1 400 400   \n 0 400 400   // string=2\n 0 400 400   \"2\"\n 1 400 400   \n 0 400 400   // stringeol=3\n 0 400 400   \"3\n 1 400 400   \n 0 400 400   // propertyname=4\n 0 400 400   \"4\":\n 1 400 400   \n 0 400 400   // escapesequence=5\n 0 400 400   \"\\n\"\n 1 400 400   \n 0 400 400   // linecomment=6\n 0 400 400   // 6 Line Comment\n 1 400 400   \n 0 400 400   // blockcomment=7\n 0 400 400   /* 7 Block Comment */\n 1 400 400   \n 0 400 400   // operator=8\n 0 400 400   {}\n 1 400 400   \n 0 400 400   // uri=9\n 0 400 400   \"http://9.org\"\n 1 400 400   \n 0 400 400   // compactiri=10\n 0 400 400   \"x:y\"\n 1 400 400   \n 0 400 400   // keyword=11\n 0 400 400   true\n 1 400 400   \n 0 400 400   // ldkeyword=12\n 0 400 400   \"@id\"\n 1 400 400   \n 0 400 400   // error=13\n 0 400 400   # 13 error\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/json/AllStyles.json.styled",
    "content": "{6}// Enumerate all styles: 0 to 13{0}\n\n{6}// default=0{0}\n   \n\n{6}// number=1{0}\n{1}1{0}\n\n{6}// string=2{0}\n{2}\"2\"{0}\n\n{6}// stringeol=3{0}\n{3}\"3\n{0}\n{6}// propertyname=4{0}\n{4}\"4\"{8}:{0}\n\n{6}// escapesequence=5{0}\n{2}\"{5}\\n{2}\"{0}\n\n{6}// linecomment=6{0}\n{6}// 6 Line Comment{0}\n\n{6}// blockcomment=7{0}\n{7}/* 7 Block Comment */{0}\n\n{6}// operator=8{0}\n{8}{}{0}\n\n{6}// uri=9{0}\n{2}\"{9}http://9.org{2}\"{0}\n\n{6}// compactiri=10{0}\n{10}\"x:y\"{0}\n\n{6}// keyword=11{0}\n{11}true{0}\n\n{6}// ldkeyword=12{0}\n{2}\"{12}@id{2}\"{0}\n\n{6}// error=13{0}\n{13}# 13 error{0}\n"
  },
  {
    "path": "lexilla/test/examples/json/SciTE.properties",
    "content": "lexer.*.json=json\n\n# JSON keywords\nkeywords.*.json=false true null\n\n# JSON-LD keywords\nkeywords2.*.json=@id @context @type @value @language @container \\\n@list @set @reverse @index @base @vocab @graph\n\nlexer.json.escape.sequence=1\nlexer.json.allow.comments=1\nfold=1\nfold.compact=1\n\n"
  },
  {
    "path": "lexilla/test/examples/julia/SciTE.properties",
    "content": "lexer.*.jl=julia\nkeywords.*.jl=const end for function in where\nkeywords2.*.jl=Int Number\nkeywords3.*.jl=true\n"
  },
  {
    "path": "lexilla/test/examples/julia/x.jl",
    "content": "\n# Comment here\nconst bar = '\\n'\n\n\"\"\"\n    test_fun(a::Int)\nFor test only\n\"\"\"\nfunction test_fun(a::Int, b::T) where T <: Number\n    println(a)\n    println(\"foo $(bar)\")\nend\n\n@enum Unicode α=1 β=2\n\nres = [√i for i in 1:10]\n∀=1; ∃=2; ∄=3;\n\nt!'#'\nt!='#'\nt[]!='#'\n\n#= Dummy function =#\ntest_fun²(:sym, true, raw\"test\", `echo 1`)\n"
  },
  {
    "path": "lexilla/test/examples/julia/x.jl.folded",
    "content": " 0 400 400   \n 0 400 400   # Comment here\n 0 400 400   const bar = '\\n'\n 0 400 400   \n 2 400 401 + \"\"\"\n 0 401 401 |     test_fun(a::Int)\n 0 401 401 | For test only\n 0 401 400 | \"\"\"\n 2 400 401 + function test_fun(a::Int, b::T) where T <: Number\n 0 401 401 |     println(a)\n 0 401 401 |     println(\"foo $(bar)\")\n 0 401 400 | end\n 0 400 400   \n 0 400 400   @enum Unicode α=1 β=2\n 0 400 400   \n 0 400 400   res = [√i for i in 1:10]\n 0 400 400   ∀=1; ∃=2; ∄=3;\n 0 400 400   \n 0 400 400   t!'#'\n 0 400 400   t!='#'\n 0 400 400   t[]!='#'\n 0 400 400   \n 0 400 400   #= Dummy function =#\n 0 400 400   test_fun²(:sym, true, raw\"test\", `echo 1`)\n 1 400 400   "
  },
  {
    "path": "lexilla/test/examples/julia/x.jl.styled",
    "content": "{0}\n{1}# Comment here{0}\n{3}const{0} {9}bar{0} {7}={0} {6}'\\n'{0}\n\n{14}\"\"\"\n    test_fun(a::Int)\nFor test only\n\"\"\"{0}\n{3}function{0} {9}test_fun{8}({9}a{21}::{4}Int{7},{0} {9}b{21}::{9}T{8}){0} {3}where{0} {9}T{0} {21}<:{0} {4}Number{0}\n    {9}println{8}({9}a{8}){0}\n    {9}println{8}({10}\"foo {13}$(bar){10}\"{8}){0}\n{3}end{0}\n\n{12}@enum{0} {9}Unicode{0} {9}α{7}={2}1{0} {9}β{7}={2}2{0}\n\n{9}res{0} {7}={0} {8}[{7}√{9}i{0} {3}for{0} {9}i{0} {3}in{0} {2}1{7}:{2}10{8}]{0}\n{9}∀{7}={2}1{7};{0} {9}∃{7}={2}2{7};{0} {9}∄{7}={2}3{7};{0}\n\n{9}t!{7}'{1}#'{0}\n{9}t!{7}={6}'#'{0}\n{9}t{8}[]{7}!={6}'#'{0}\n\n{1}#= Dummy function =#{0}\n{9}test_fun²{8}({11}:sym{7},{0} {5}true{7},{0} {15}raw{10}\"test\"{7},{0} {16}`echo 1`{8}){0}\n"
  },
  {
    "path": "lexilla/test/examples/latex/AllStyles.tex",
    "content": "% Enumerate all styles: 0 to 12\n% Not a valid laTeX file as entities are unbalanced and not semantically correct\n% comment=4\n\n% whitespace=0\ntext\t%\n\n% command=1\n\\documentclass\n\n% tag=2\n\\begin{document}\n\n% tag closing=5\n\\end{document}\n\n% math=3\n\\begin{math}\nE &= mc^2\n\\end{math}\n\n% math block=6\n\\begin{align}\nE &= mc^2\n\\end{align}\n\n% comment block=7\n\\begin{comment}\nA block comment\n\\end{comment}\n\n% verbatim=8\n\\begin{verbatim}\nputs $foo\n\\end{verbatim}\n\n% short command=9\n\\(\\)\n\n% special=10\n\\#\n\n% command optional argument=11\n\\x[12pt]\n\n% error=12\n\\\n"
  },
  {
    "path": "lexilla/test/examples/latex/AllStyles.tex.folded",
    "content": " 0 400   0   % Enumerate all styles: 0 to 12\n 0 400   0   % Not a valid laTeX file as entities are unbalanced and not semantically correct\n 0 400   0   % comment=4\n 0 400   0   \n 0 400   0   % whitespace=0\n 0 400   0   text\t%\n 0 400   0   \n 0 400   0   % command=1\n 0 400   0   \\documentclass\n 0 400   0   \n 0 400   0   % tag=2\n 2 400   0 + \\begin{document}\n 0 401   0 | \n 0 401   0 | % tag closing=5\n 0 401   0 | \\end{document}\n 0 400   0   \n 0 400   0   % math=3\n 2 400   0 + \\begin{math}\n 0 401   0 | E &= mc^2\n 0 401   0 | \\end{math}\n 0 400   0   \n 0 400   0   % math block=6\n 2 400   0 + \\begin{align}\n 0 401   0 | E &= mc^2\n 0 401   0 | \\end{align}\n 0 400   0   \n 0 400   0   % comment block=7\n 2 400   0 + \\begin{comment}\n 0 401   0 | A block comment\n 0 401   0 | \\end{comment}\n 0 400   0   \n 0 400   0   % verbatim=8\n 2 400   0 + \\begin{verbatim}\n 0 401   0 | puts $foo\n 0 401   0 | \\end{verbatim}\n 0 400   0   \n 0 400   0   % short command=9\n 0 400   0   \\(\\)\n 0 400   0   \n 0 400   0   % special=10\n 0 400   0   \\#\n 0 400   0   \n 0 400   0   % command optional argument=11\n 0 400   0   \\x[12pt]\n 0 400   0   \n 0 400   0   % error=12\n 0 400   0   \\\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/latex/AllStyles.tex.styled",
    "content": "{4}% Enumerate all styles: 0 to 12{0}\n{4}% Not a valid laTeX file as entities are unbalanced and not semantically correct{0}\n{4}% comment=4{0}\n\n{4}% whitespace=0{0}\ntext\t{4}%{0}\n\n{4}% command=1{0}\n{1}\\documentclass{0}\n\n{4}% tag=2{0}\n{1}\\begin{2}{document}{0}\n\n{4}% tag closing=5{0}\n{1}\\end{5}{document}{0}\n\n{4}% math=3{0}\n{1}\\begin{2}{math}{3}\nE &= mc^2\n{1}\\end{5}{math}{0}\n\n{4}% math block=6{0}\n{1}\\begin{2}{align}{6}\nE &= mc^2\n{1}\\end{5}{align}{0}\n\n{4}% comment block=7{0}\n{1}\\begin{2}{comment}{7}\nA block comment\n{1}\\end{5}{comment}{0}\n\n{4}% verbatim=8{0}\n{1}\\begin{2}{verbatim}{8}\nputs $foo\n{1}\\end{5}{verbatim}{0}\n\n{4}% short command=9{0}\n{9}\\(\\){0}\n\n{4}% special=10{0}\n{10}\\#{0}\n\n{4}% command optional argument=11{0}\n{1}\\x{11}[12pt]{0}\n\n{4}% error=12{0}\n{12}\\{0}\n"
  },
  {
    "path": "lexilla/test/examples/latex/Feature1358.tex",
    "content": "\\begin{lstlisting}[language=make]\n# If no BOARD is found in the environment, use this default:\nBOARD ?= bluepill\n\n# To use chinese st-link v2 and ch340 dongle with bluepill\nifeq ($(BOARD),bluepill)\nSTLINK_VERSION=2\nPORT_LINUX=/dev/ttyUSB0\nendif\n\\end{lstlisting}\n"
  },
  {
    "path": "lexilla/test/examples/latex/Feature1358.tex.folded",
    "content": " 2 400   0 + \\begin{lstlisting}[language=make]\n 0 401   0 | # If no BOARD is found in the environment, use this default:\n 0 401   0 | BOARD ?= bluepill\n 0 401   0 | \n 0 401   0 | # To use chinese st-link v2 and ch340 dongle with bluepill\n 0 401   0 | ifeq ($(BOARD),bluepill)\n 0 401   0 | STLINK_VERSION=2\n 0 401   0 | PORT_LINUX=/dev/ttyUSB0\n 0 401   0 | endif\n 0 401   0 | \\end{lstlisting}\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/latex/Feature1358.tex.styled",
    "content": "{1}\\begin{2}{lstlisting}{8}[language=make]\n# If no BOARD is found in the environment, use this default:\nBOARD ?= bluepill\n\n# To use chinese st-link v2 and ch340 dongle with bluepill\nifeq ($(BOARD),bluepill)\nSTLINK_VERSION=2\nPORT_LINUX=/dev/ttyUSB0\nendif\n{1}\\end{5}{lstlisting}{0}\n"
  },
  {
    "path": "lexilla/test/examples/latex/SciTE.properties",
    "content": "lexer.*.tex=latex\n"
  },
  {
    "path": "lexilla/test/examples/lua/AllStyles.lua",
    "content": "-- Enumerate all styles: 0 to 20\n-- 3 (comment doc) is not currently produced by lexer\n\n--[[ comment=1 ]]\n\n--[[ whitespace=0 ]]\n\t-- w\n\n-- comment line=2\n\n--- comment doc=3\n-- still comment doc\n\n-- still comment doc\n3\t-- comment doc broken only by code\n\n-- number=4\n37\n\n-- keyword=5\nlocal a\n\n-- double-quoted-string=6\n\"str\"\n\n-- single-quoted-string=7\n'str'\n\n-- literal string=8\n[[ literal ]]\n\n-- unused preprocessor=9\n$if\n\n-- operator=10\n*\n\n-- identifier=11\nidentifier=1\n\n-- string EOL=12\n\"unclosed\n\n-- keyword 2=13\nprint\n\n-- keyword 3=14\nkeyword3\n\n-- keyword 4=15\nkeyword4\n\n-- keyword 5=16\nkeyword5\n\n-- keyword 6=17\nkeyword6\n\n-- keyword 7=18\nkeyword7\n\n-- keyword 8=19\nkeyword8\n\n-- label=20\n::label::\n\n-- identifier substyles.11.1=128\nmoon\n"
  },
  {
    "path": "lexilla/test/examples/lua/AllStyles.lua.folded",
    "content": " 0 400   0   -- Enumerate all styles: 0 to 20\n 0 400   0   -- 3 (comment doc) is not currently produced by lexer\n 1 400   0   \n 0 400   0   --[[ comment=1 ]]\n 1 400   0   \n 0 400   0   --[[ whitespace=0 ]]\n 0 400   0   \t-- w\n 1 400   0   \n 0 400   0   -- comment line=2\n 1 400   0   \n 0 400   0   --- comment doc=3\n 0 400   0   -- still comment doc\n 1 400   0   \n 0 400   0   -- still comment doc\n 0 400   0   3\t-- comment doc broken only by code\n 1 400   0   \n 0 400   0   -- number=4\n 0 400   0   37\n 1 400   0   \n 0 400   0   -- keyword=5\n 0 400   0   local a\n 1 400   0   \n 0 400   0   -- double-quoted-string=6\n 0 400   0   \"str\"\n 1 400   0   \n 0 400   0   -- single-quoted-string=7\n 0 400   0   'str'\n 1 400   0   \n 0 400   0   -- literal string=8\n 0 400   0   [[ literal ]]\n 1 400   0   \n 0 400   0   -- unused preprocessor=9\n 0 400   0   $if\n 1 400   0   \n 0 400   0   -- operator=10\n 0 400   0   *\n 1 400   0   \n 0 400   0   -- identifier=11\n 0 400   0   identifier=1\n 1 400   0   \n 0 400   0   -- string EOL=12\n 0 400   0   \"unclosed\n 1 400   0   \n 0 400   0   -- keyword 2=13\n 0 400   0   print\n 1 400   0   \n 0 400   0   -- keyword 3=14\n 0 400   0   keyword3\n 1 400   0   \n 0 400   0   -- keyword 4=15\n 0 400   0   keyword4\n 1 400   0   \n 0 400   0   -- keyword 5=16\n 0 400   0   keyword5\n 1 400   0   \n 0 400   0   -- keyword 6=17\n 0 400   0   keyword6\n 1 400   0   \n 0 400   0   -- keyword 7=18\n 0 400   0   keyword7\n 1 400   0   \n 0 400   0   -- keyword 8=19\n 0 400   0   keyword8\n 1 400   0   \n 0 400   0   -- label=20\n 0 400   0   ::label::\n 1 400   0   \n 0 400   0   -- identifier substyles.11.1=128\n 0 400   0   moon\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/lua/AllStyles.lua.styled",
    "content": "{2}-- Enumerate all styles: 0 to 20\n-- 3 (comment doc) is not currently produced by lexer\n{0}\n{1}--[[ comment=1 ]]{0}\n\n{1}--[[ whitespace=0 ]]{0}\n\t{2}-- w\n{0}\n{2}-- comment line=2\n{0}\n{3}--- comment doc=3\n-- still comment doc\n{0}\n{3}-- still comment doc\n{4}3{0}\t{2}-- comment doc broken only by code\n{0}\n{2}-- number=4\n{4}37{0}\n\n{2}-- keyword=5\n{5}local{0} {11}a{0}\n\n{2}-- double-quoted-string=6\n{6}\"str\"{0}\n\n{2}-- single-quoted-string=7\n{7}'str'{0}\n\n{2}-- literal string=8\n{8}[[ literal ]]{0}\n\n{2}-- unused preprocessor=9\n{9}$if\n{0}\n{2}-- operator=10\n{10}*{0}\n\n{2}-- identifier=11\n{11}identifier{10}={4}1{0}\n\n{2}-- string EOL=12\n{12}\"unclosed\n{0}\n{2}-- keyword 2=13\n{13}print{0}\n\n{2}-- keyword 3=14\n{14}keyword3{0}\n\n{2}-- keyword 4=15\n{15}keyword4{0}\n\n{2}-- keyword 5=16\n{16}keyword5{0}\n\n{2}-- keyword 6=17\n{17}keyword6{0}\n\n{2}-- keyword 7=18\n{18}keyword7{0}\n\n{2}-- keyword 8=19\n{19}keyword8{0}\n\n{2}-- label=20\n{20}::label::{0}\n\n{2}-- identifier substyles.11.1=128\n{128}moon{0}\n"
  },
  {
    "path": "lexilla/test/examples/lua/Bug2205.lua",
    "content": "print(\"First\")\n--[[ Block comment start\nprint(\"Second\")\n--[[ Another block comment ]]\nprint(\"Third. If run through an actual program, this will be executed.\")\n"
  },
  {
    "path": "lexilla/test/examples/lua/Bug2205.lua.folded",
    "content": " 0 400   0   print(\"First\")\n 2 400   0 + --[[ Block comment start\n 0 401   0 | print(\"Second\")\n 0 401   0 | --[[ Another block comment ]]\n 0 400   0   print(\"Third. If run through an actual program, this will be executed.\")\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/lua/Bug2205.lua.styled",
    "content": "{13}print{10}({6}\"First\"{10}){0}\n{1}--[[ Block comment start\nprint(\"Second\")\n--[[ Another block comment ]]{0}\n{13}print{10}({6}\"Third. If run through an actual program, this will be executed.\"{10}){0}\n"
  },
  {
    "path": "lexilla/test/examples/lua/SciTE.properties",
    "content": "lexer.*.lua=lua\nkeywords.*.lua=do else elseif end for function if local repeat then until while\nkeywords2.*.lua=print\nkeywords3.*.lua=keyword3\nkeywords4.*.lua=keyword4\nkeywords5.*.lua=keyword5\nkeywords6.*.lua=keyword6\nkeywords7.*.lua=keyword7\nkeywords8.*.lua=keyword8\n\nsubstyles.lua.11=1\nsubstylewords.11.1.*.lua=moon\n\nfold=1\n"
  },
  {
    "path": "lexilla/test/examples/lua/folding.lua",
    "content": "--[[ coding:UTF-8\nfolding structure examples ]]\n\n-- Use all the folding keywords:\n--    do end function if repeat until while\nfunction first()\n   -- Comment\n   if op == \"+\" then\n      r = a + b\n    elseif op == \"-\" then\n      r = a - b\n    elseif op == \"*\" then\n      r = a*b\n    elseif op == \"/\" then\n      r = a/b\n    else\n      error(\"invalid operation\")\n    end\n\n    for i=1,10 do\n      print(i)\n    end\n\n    while a[i] do\n      print(a[i])\n      i = i + 1\n    end\n\n    -- print the first non-empty line\n    repeat\n      line = io.read()\n    until line ~= \"\"\n    print(line)\n\nend\n\n-- { ... } folds\nmarkers = {\n     256,\n     128,\n}\n"
  },
  {
    "path": "lexilla/test/examples/lua/folding.lua.folded",
    "content": " 2 400   0 + --[[ coding:UTF-8\n 0 401   0 | folding structure examples ]]\n 1 400   0   \n 0 400   0   -- Use all the folding keywords:\n 0 400   0   --    do end function if repeat until while\n 2 400   0 + function first()\n 0 401   0 |    -- Comment\n 2 401   0 +    if op == \"+\" then\n 0 402   0 |       r = a + b\n 0 402   0 |     elseif op == \"-\" then\n 0 402   0 |       r = a - b\n 0 402   0 |     elseif op == \"*\" then\n 0 402   0 |       r = a*b\n 0 402   0 |     elseif op == \"/\" then\n 0 402   0 |       r = a/b\n 0 402   0 |     else\n 0 402   0 |       error(\"invalid operation\")\n 0 402   0 |     end\n 1 401   0 | \n 2 401   0 +     for i=1,10 do\n 0 402   0 |       print(i)\n 0 402   0 |     end\n 1 401   0 | \n 2 401   0 +     while a[i] do\n 0 402   0 |       print(a[i])\n 0 402   0 |       i = i + 1\n 0 402   0 |     end\n 1 401   0 | \n 0 401   0 |     -- print the first non-empty line\n 2 401   0 +     repeat\n 0 402   0 |       line = io.read()\n 0 402   0 |     until line ~= \"\"\n 0 401   0 |     print(line)\n 1 401   0 | \n 0 401   0 | end\n 1 400   0   \n 0 400   0   -- { ... } folds\n 2 400   0 + markers = {\n 0 401   0 |      256,\n 0 401   0 |      128,\n 0 401   0 | }\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/lua/folding.lua.styled",
    "content": "{1}--[[ coding:UTF-8\nfolding structure examples ]]{0}\n\n{2}-- Use all the folding keywords:\n--    do end function if repeat until while\n{5}function{0} {11}first{10}(){0}\n   {2}-- Comment\n{0}   {5}if{0} {11}op{0} {10}=={0} {6}\"+\"{0} {5}then{0}\n      {11}r{0} {10}={0} {11}a{0} {10}+{0} {11}b{0}\n    {5}elseif{0} {11}op{0} {10}=={0} {6}\"-\"{0} {5}then{0}\n      {11}r{0} {10}={0} {11}a{0} {10}-{0} {11}b{0}\n    {5}elseif{0} {11}op{0} {10}=={0} {6}\"*\"{0} {5}then{0}\n      {11}r{0} {10}={0} {11}a{10}*{11}b{0}\n    {5}elseif{0} {11}op{0} {10}=={0} {6}\"/\"{0} {5}then{0}\n      {11}r{0} {10}={0} {11}a{10}/{11}b{0}\n    {5}else{0}\n      {11}error{10}({6}\"invalid operation\"{10}){0}\n    {5}end{0}\n\n    {5}for{0} {11}i{10}={4}1{10},{4}10{0} {5}do{0}\n      {13}print{10}({11}i{10}){0}\n    {5}end{0}\n\n    {5}while{0} {11}a{10}[{11}i{10}]{0} {5}do{0}\n      {13}print{10}({11}a{10}[{11}i{10}]){0}\n      {11}i{0} {10}={0} {11}i{0} {10}+{0} {4}1{0}\n    {5}end{0}\n\n    {2}-- print the first non-empty line\n{0}    {5}repeat{0}\n      {11}line{0} {10}={0} {11}io.read{10}(){0}\n    {5}until{0} {11}line{0} {10}~={0} {6}\"\"{0}\n    {13}print{10}({11}line{10}){0}\n\n{5}end{0}\n\n{2}-- { ... } folds\n{11}markers{0} {10}={0} {10}{{0}\n     {4}256{10},{0}\n     {4}128{10},{0}\n{10}}{0}\n"
  },
  {
    "path": "lexilla/test/examples/lua/x.lua",
    "content": "--[[ coding:UTF-8\ncomment ]]\nfunction first()\n::開::\n   -- Comment\n   func(SCI_ANNOTATIONSETTEXT, 'a', 0, \"LINE1\")\nend\n"
  },
  {
    "path": "lexilla/test/examples/lua/x.lua.folded",
    "content": " 2 400   0 + --[[ coding:UTF-8\n 0 401   0 | comment ]]\n 2 400   0 + function first()\n 0 401   0 | ::開::\n 0 401   0 |    -- Comment\n 0 401   0 |    func(SCI_ANNOTATIONSETTEXT, 'a', 0, \"LINE1\")\n 0 401   0 | end\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/lua/x.lua.styled",
    "content": "{1}--[[ coding:UTF-8\ncomment ]]{0}\n{5}function{0} {11}first{10}(){0}\n{20}::開::{0}\n   {2}-- Comment\n{0}   {11}func{10}({11}SCI_ANNOTATIONSETTEXT{10},{0} {7}'a'{10},{0} {4}0{10},{0} {6}\"LINE1\"{10}){0}\n{5}end{0}\n"
  },
  {
    "path": "lexilla/test/examples/makefile/SciTE.properties",
    "content": "lexer.*.mak=makefile\n"
  },
  {
    "path": "lexilla/test/examples/makefile/longline.mak",
    "content": "# makefile lexer previously used fixed 1024-byte line buffer that would treat text after that as new line\n\n# Long line with 1025 bytes last 2 bytes colored as default 3456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 12345678912345678\n\n"
  },
  {
    "path": "lexilla/test/examples/makefile/longline.mak.folded",
    "content": " 0 400   0   # makefile lexer previously used fixed 1024-byte line buffer that would treat text after that as new line\n 0 400   0   \n 0 400   0   # Long line with 1025 bytes last 2 bytes colored as default 3456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 12345678912345678\n 0 400   0   \n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/makefile/longline.mak.styled",
    "content": "{1}# makefile lexer previously used fixed 1024-byte line buffer that would treat text after that as new line\n{0}\n{1}# Long line with 1025 bytes last 2 bytes colored as default 3456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 12345678912345678\n{0}\n"
  },
  {
    "path": "lexilla/test/examples/makefile/x.mak",
    "content": "# '# comment' comment=1\n# comment\n\n# '.SUFFIXES' target=5, ':' operator=4\n.SUFFIXES:\n\n# 'LD' identifier=3, '=' operator=4, 'link' default=0\nLD=link\n\n# '!IFDEF DEBUG' preprocessor=2\n!IFDEF DEBUG\n\n# '$(' ID EOL=9\nX=$(\n\n# End of file\n"
  },
  {
    "path": "lexilla/test/examples/makefile/x.mak.folded",
    "content": " 0 400   0   # '# comment' comment=1\n 0 400   0   # comment\n 0 400   0   \n 0 400   0   # '.SUFFIXES' target=5, ':' operator=4\n 0 400   0   .SUFFIXES:\n 0 400   0   \n 0 400   0   # 'LD' identifier=3, '=' operator=4, 'link' default=0\n 0 400   0   LD=link\n 0 400   0   \n 0 400   0   # '!IFDEF DEBUG' preprocessor=2\n 0 400   0   !IFDEF DEBUG\n 0 400   0   \n 0 400   0   # '$(' ID EOL=9\n 0 400   0   X=$(\n 0 400   0   \n 0 400   0   # End of file\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/makefile/x.mak.styled",
    "content": "{1}# '# comment' comment=1\n# comment\n{0}\n{1}# '.SUFFIXES' target=5, ':' operator=4\n{5}.SUFFIXES{4}:{0}\n\n{1}# 'LD' identifier=3, '=' operator=4, 'link' default=0\n{3}LD{4}={0}link\n\n{1}# '!IFDEF DEBUG' preprocessor=2\n{2}!IFDEF DEBUG\n{0}\n{1}# '$(' ID EOL=9\n{3}X{4}={9}$(\n{0}\n{1}# End of file\n"
  },
  {
    "path": "lexilla/test/examples/markdown/AllStyles.md",
    "content": "Text=0\nLine end characters=1\n**Strong Emphasis (bold) 1=2**\n__Strong Emphasis (bold) 2=3__\n*Emphasis (italic) 1=4*\n_Emphasis (italic) 2=5_\n# Heading level 1=6\n## Heading level 2=7\n### Heading level 3=8\n#### Heading level 4=9\n##### Heading level 5=10\n###### Heading level 6=11\n   PreChar=12\n* Unordered list item=13\n1. Ordered list item=14\n>Block Quote=15\n~~Strike-out=16~~\n\n***\nPrevious line was horizontal rule=17\n[Link=18](https://18.com)\n`Inline Code=19`\n``Inline Code=20``\n\n~~~\nBlock code=21\n~~~\n\n## Issue 23\n`"
  },
  {
    "path": "lexilla/test/examples/markdown/AllStyles.md.folded",
    "content": " 0 400   0   Text=0\n 0 400   0   Line end characters=1\n 0 400   0   **Strong Emphasis (bold) 1=2**\n 0 400   0   __Strong Emphasis (bold) 2=3__\n 0 400   0   *Emphasis (italic) 1=4*\n 0 400   0   _Emphasis (italic) 2=5_\n 0 400   0   # Heading level 1=6\n 0 400   0   ## Heading level 2=7\n 0 400   0   ### Heading level 3=8\n 0 400   0   #### Heading level 4=9\n 0 400   0   ##### Heading level 5=10\n 0 400   0   ###### Heading level 6=11\n 0 400   0      PreChar=12\n 0 400   0   * Unordered list item=13\n 0 400   0   1. Ordered list item=14\n 0 400   0   >Block Quote=15\n 0 400   0   ~~Strike-out=16~~\n 0 400   0   \n 0 400   0   ***\n 0 400   0   Previous line was horizontal rule=17\n 0 400   0   [Link=18](https://18.com)\n 0 400   0   `Inline Code=19`\n 0 400   0   ``Inline Code=20``\n 0 400   0   \n 0 400   0   ~~~\n 0 400   0   Block code=21\n 0 400   0   ~~~\n 0 400   0   \n 0 400   0   ## Issue 23\n 0 400   0   `"
  },
  {
    "path": "lexilla/test/examples/markdown/AllStyles.md.styled",
    "content": "{0}Text=0{1}\n{0}Line end characters=1{1}\n{2}**Strong Emphasis (bold) 1=2**{1}\n{3}__Strong Emphasis (bold) 2=3__{1}\n{4}*Emphasis (italic) 1=4*{1}\n{5}_Emphasis (italic) 2=5_{1}\n{6}#{0} Heading level 1=6{1}\n{7}##{0} Heading level 2=7{1}\n{8}###{0} Heading level 3=8{1}\n{9}####{0} Heading level 4=9{1}\n{10}#####{0} Heading level 5=10{1}\n{11}######{0} Heading level 6=11{1}\n{12}   {0}PreChar=12{1}\n{13}*{0} Unordered list item=13{1}\n{14}1.{0} Ordered list item=14{1}\n{15}>{0}Block Quote=15{1}\n{16}~~Strike-out=16~~{1}\n\n{17}***{1}\n{0}Previous line was horizontal rule=17{1}\n{18}[Link=18](https://18.com){1}\n{19}`Inline Code=19`{1}\n{20}``Inline Code=20``{1}\n\n{21}~~~\nBlock code=21\n~~~{1}\n\n{7}##{0} Issue 23{1}\n{0}`"
  },
  {
    "path": "lexilla/test/examples/markdown/Bug1216.md",
    "content": "# Checking resolution of bug 1216\n\n*This line is not emphasized\n\nThis is plain text with *inline emphasis*\n\n_This, too, is not emphasized\n\nAnd this is plain text with _inline emphasis_\n\n**This line is not in bold\n\nBut this is plain text with some words **in bold**\n\n__This line is also not in bold\n\nAnd this is plain text with __some words in bold__\n\n~~This line is not crossed out\n\nThis is plain text with ~~some words crossed out~~\n\n~~~\nthis is a code block\n~~~\n\nThis is a new paragraph\n"
  },
  {
    "path": "lexilla/test/examples/markdown/Bug1216.md.folded",
    "content": " 0 400   0   # Checking resolution of bug 1216\n 0 400   0   \n 0 400   0   *This line is not emphasized\n 0 400   0   \n 0 400   0   This is plain text with *inline emphasis*\n 0 400   0   \n 0 400   0   _This, too, is not emphasized\n 0 400   0   \n 0 400   0   And this is plain text with _inline emphasis_\n 0 400   0   \n 0 400   0   **This line is not in bold\n 0 400   0   \n 0 400   0   But this is plain text with some words **in bold**\n 0 400   0   \n 0 400   0   __This line is also not in bold\n 0 400   0   \n 0 400   0   And this is plain text with __some words in bold__\n 0 400   0   \n 0 400   0   ~~This line is not crossed out\n 0 400   0   \n 0 400   0   This is plain text with ~~some words crossed out~~\n 0 400   0   \n 0 400   0   ~~~\n 0 400   0   this is a code block\n 0 400   0   ~~~\n 0 400   0   \n 0 400   0   This is a new paragraph\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/markdown/Bug1216.md.styled",
    "content": "{6}#{0} Checking resolution of bug 1216{1}\n\n{0}*This line is not emphasized{1}\n\n{0}This is plain text with {4}*inline emphasis*{1}\n\n{0}_This, too, is not emphasized{1}\n\n{0}And this is plain text with {5}_inline emphasis_{1}\n\n{0}**This line is not in bold{1}\n\n{0}But this is plain text with some words {2}**in bold**{1}\n\n{0}__This line is also not in bold{1}\n\n{0}And this is plain text with {3}__some words in bold__{1}\n\n{0}~~This line is not crossed out{1}\n\n{0}This is plain text with {16}~~some words crossed out~~{1}\n\n{21}~~~\nthis is a code block\n~~~{1}\n\n{0}This is a new paragraph{1}\n"
  },
  {
    "path": "lexilla/test/examples/markdown/Bug2235.md",
    "content": "Po spuštění modulu je zobrazen hlavní dialog modulu:\n\n![](media\\image21.png)V tomto dialogu lze nastavit různé\nparametry vykreslení výsledného schématu. Doporučujeme pro většinu\npřípadů ponechat přednastavené hodnoty.\n\nZákladní parametry ne nacházejí v záložce *Obecné*:\n\n![SciTE224.png][]V tomto dialogu lze nastavit různé\nparametry vykreslení výsledného schématu. Doporučujeme pro většinu\npřípadů ponechat přednastavené hodnoty.\n\nZákladní parametry ne nacházejí v záložce _Obecné_\n\n[SciTE224.png]: https://www.scintilla.org/SciTE224.png\n"
  },
  {
    "path": "lexilla/test/examples/markdown/Bug2235.md.folded",
    "content": " 0 400   0   Po spuštění modulu je zobrazen hlavní dialog modulu:\n 0 400   0   \n 0 400   0   ![](media\\image21.png)V tomto dialogu lze nastavit různé\n 0 400   0   parametry vykreslení výsledného schématu. Doporučujeme pro většinu\n 0 400   0   případů ponechat přednastavené hodnoty.\n 0 400   0   \n 0 400   0   Základní parametry ne nacházejí v záložce *Obecné*:\n 0 400   0   \n 0 400   0   ![SciTE224.png][]V tomto dialogu lze nastavit různé\n 0 400   0   parametry vykreslení výsledného schématu. Doporučujeme pro většinu\n 0 400   0   případů ponechat přednastavené hodnoty.\n 0 400   0   \n 0 400   0   Základní parametry ne nacházejí v záložce _Obecné_\n 0 400   0   \n 0 400   0   [SciTE224.png]: https://www.scintilla.org/SciTE224.png\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/markdown/Bug2235.md.styled",
    "content": "{0}Po spuštění modulu je zobrazen hlavní dialog modulu:{1}\n\n{18}![](media\\image21.png){0}V tomto dialogu lze nastavit různé{1}\n{0}parametry vykreslení výsledného schématu. Doporučujeme pro většinu{1}\n{0}případů ponechat přednastavené hodnoty.{1}\n\n{0}Základní parametry ne nacházejí v záložce {4}*Obecné*{0}:{1}\n\n{18}![SciTE224.png][]{0}V tomto dialogu lze nastavit různé{1}\n{0}parametry vykreslení výsledného schématu. Doporučujeme pro většinu{1}\n{0}případů ponechat přednastavené hodnoty.{1}\n\n{0}Základní parametry ne nacházejí v záložce {5}_Obecné_{1}\n\n{18}[SciTE224.png]:{0} https://www.scintilla.org/SciTE224.png{1}\n"
  },
  {
    "path": "lexilla/test/examples/markdown/Bug2247.md",
    "content": "# Checking resolution of bug 2247\n\n~~~sql\nSELECT datetime() AS `date`;\n~~~\n\n```sql\nSELECT datetime() AS `date`;\n```\n\nList of examples:\n\n-   example *one*\n\n-   example _two_\n\n-   example `inline code without end\n\n    In case of **AAA**:\n    \n    ```sql\n    SELECT strftime('%Y-%m-%d %H:%M:%S', 'now') AS `date`;\n    ```\n    \n    or, in case of __BBB__:\n    . . .\n\n-   example *three*\n\nLast paragraph.\n"
  },
  {
    "path": "lexilla/test/examples/markdown/Bug2247.md.folded",
    "content": " 0 400   0   # Checking resolution of bug 2247\n 0 400   0   \n 0 400   0   ~~~sql\n 0 400   0   SELECT datetime() AS `date`;\n 0 400   0   ~~~\n 0 400   0   \n 0 400   0   ```sql\n 0 400   0   SELECT datetime() AS `date`;\n 0 400   0   ```\n 0 400   0   \n 0 400   0   List of examples:\n 0 400   0   \n 0 400   0   -   example *one*\n 0 400   0   \n 0 400   0   -   example _two_\n 0 400   0   \n 0 400   0   -   example `inline code without end\n 0 400   0   \n 0 400   0       In case of **AAA**:\n 0 400   0       \n 0 400   0       ```sql\n 0 400   0       SELECT strftime('%Y-%m-%d %H:%M:%S', 'now') AS `date`;\n 0 400   0       ```\n 0 400   0       \n 0 400   0       or, in case of __BBB__:\n 0 400   0       . . .\n 0 400   0   \n 0 400   0   -   example *three*\n 0 400   0   \n 0 400   0   Last paragraph.\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/markdown/Bug2247.md.styled",
    "content": "{6}#{0} Checking resolution of bug 2247{1}\n\n{21}~~~sql\nSELECT datetime() AS `date`;\n~~~{1}\n\n{20}```sql\nSELECT datetime() AS `date`;\n```{1}\n\n{0}List of examples:{1}\n\n{13}-{0}   example {4}*one*{1}\n\n{13}-{0}   example {5}_two_{1}\n\n{13}-{0}   example `inline code without end{1}\n\n{12}   {0} In case of {2}**AAA**{0}:{1}\n{12}   {0} {1}\n{12}   {0} {20}```sql\n    SELECT strftime('%Y-%m-%d %H:%M:%S', 'now') AS `date`;\n    ```{1}\n{12}   {0} {1}\n{12}   {0} or, in case of {3}__BBB__{0}:{1}\n{12}   {0} . . .{1}\n\n{13}-{0}   example {4}*three*{1}\n\n{0}Last paragraph.{1}\n"
  },
  {
    "path": "lexilla/test/examples/markdown/HeaderEOLFill_0.md",
    "content": "H1\n==\n\nH2\n--\n\n# H1\n\n## H2\n\nH1\n==\nH2\n--\n# H1\n## H2\n### H3\n#### H4\n##### H5\n###### H6\n"
  },
  {
    "path": "lexilla/test/examples/markdown/HeaderEOLFill_0.md.folded",
    "content": " 0 400   0   H1\n 0 400   0   ==\n 0 400   0   \n 0 400   0   H2\n 0 400   0   --\n 0 400   0   \n 0 400   0   # H1\n 0 400   0   \n 0 400   0   ## H2\n 0 400   0   \n 0 400   0   H1\n 0 400   0   ==\n 0 400   0   H2\n 0 400   0   --\n 0 400   0   # H1\n 0 400   0   ## H2\n 0 400   0   ### H3\n 0 400   0   #### H4\n 0 400   0   ##### H5\n 0 400   0   ###### H6\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/markdown/HeaderEOLFill_0.md.styled",
    "content": "{0}H1{1}\n{6}=={1}\n\n{0}H2{1}\n{7}--{1}\n\n{6}#{0} H1{1}\n\n{7}##{0} H2{1}\n\n{0}H1{1}\n{6}=={1}\n{0}H2{1}\n{7}--{1}\n{6}#{0} H1{1}\n{7}##{0} H2{1}\n{8}###{0} H3{1}\n{9}####{0} H4{1}\n{10}#####{0} H5{1}\n{11}######{0} H6{1}\n"
  },
  {
    "path": "lexilla/test/examples/markdown/HeaderEOLFill_1.md",
    "content": "H1\n==\n\nH2\n--\n\n# H1\n\n## H2\n\nH1\n==\nH2\n--\n# H1\n## H2\n### H3\n#### H4\n##### H5\n###### H6\n"
  },
  {
    "path": "lexilla/test/examples/markdown/HeaderEOLFill_1.md.folded",
    "content": " 0 400   0   H1\n 0 400   0   ==\n 0 400   0   \n 0 400   0   H2\n 0 400   0   --\n 0 400   0   \n 0 400   0   # H1\n 0 400   0   \n 0 400   0   ## H2\n 0 400   0   \n 0 400   0   H1\n 0 400   0   ==\n 0 400   0   H2\n 0 400   0   --\n 0 400   0   # H1\n 0 400   0   ## H2\n 0 400   0   ### H3\n 0 400   0   #### H4\n 0 400   0   ##### H5\n 0 400   0   ###### H6\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/markdown/HeaderEOLFill_1.md.styled",
    "content": "{0}H1{1}\n{6}==\n{1}\n{0}H2{1}\n{7}--\n{1}\n{6}# H1\n{1}\n{7}## H2\n{1}\n{0}H1{1}\n{6}==\n{0}H2{1}\n{7}--\n{6}# H1\n{7}## H2\n{8}### H3\n{9}#### H4\n{10}##### H5\n{11}###### H6\n"
  },
  {
    "path": "lexilla/test/examples/markdown/Issue117.md",
    "content": "The number:\n\n338269006135764734700913562171\n\nis prime. Therefore:\n\n  1. the only factors of 338269006135764734700913562171 are:\n\n    1\n    338269006135764734700913562171\n\n  2. 338269006135764734700913562171 is a natural number\n"
  },
  {
    "path": "lexilla/test/examples/markdown/Issue117.md.folded",
    "content": " 0 400   0   The number:\n 0 400   0   \n 0 400   0   338269006135764734700913562171\n 0 400   0   \n 0 400   0   is prime. Therefore:\n 0 400   0   \n 0 400   0     1. the only factors of 338269006135764734700913562171 are:\n 0 400   0   \n 0 400   0       1\n 0 400   0       338269006135764734700913562171\n 0 400   0   \n 0 400   0     2. 338269006135764734700913562171 is a natural number\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/markdown/Issue117.md.styled",
    "content": "{0}The number:{1}\n\n{0}338269006135764734700913562171{1}\n\n{0}is prime. Therefore:{1}\n\n{12}  {14}1.{0} the only factors of 338269006135764734700913562171 are:{1}\n\n{12}   {0} 1{1}\n{12}   {0} 338269006135764734700913562171{1}\n\n{12}  {14}2.{0} 338269006135764734700913562171 is a natural number{1}\n"
  },
  {
    "path": "lexilla/test/examples/markdown/SciTE.properties",
    "content": "code.page=65001\nlexer.*.md=markdown\nfold=1\n\n# Tests for the lexer.markdown.header.eolfill property, issue #62\nif $(= $(FileNameExt);HeaderEOLFill_0.md)\n    lexer.markdown.header.eolfill=0\nif $(= $(FileNameExt);HeaderEOLFill_1.md)\n    lexer.markdown.header.eolfill=1\n"
  },
  {
    "path": "lexilla/test/examples/matlab/AllStyles.m.matlab",
    "content": "% Examples of each style 0..8 except for SCE_MATLAB_COMMAND(2) which has a line ending bug\n\n% White space=0\n   %\n\n% Comment=1\n% Line comment\n\n% Next line is comment in Ocatve but not Matlab\n# Octave comment\n\n%{\nBlock comment.\n%}\n\n% Command=2\n\n%{\nOmitted as this places a style transiton between \\r and \\n\n!rmdir oldtests\n%}\n\n% Number=3\n33.3\n\n% Keyword=4\nglobal x\n\n% Single Quoted String=5\n'string'\n\n% Operator=6\n[X,Y] = meshgrid(-10:0.25:10,-10:0.25:10);\n\n% Identifier=7\nidentifier = 2\n\n% Double Quoted String=8\n\"string\"\n\n% This loop should fold\nfor i = 1:5\n    x(i) = 3 * i;\nend\n"
  },
  {
    "path": "lexilla/test/examples/matlab/AllStyles.m.matlab.folded",
    "content": " 0 400 400   % Examples of each style 0..8 except for SCE_MATLAB_COMMAND(2) which has a line ending bug\n 1 400 400   \n 0 400 400   % White space=0\n 0 400 400      %\n 1 400 400   \n 0 400 400   % Comment=1\n 0 400 400   % Line comment\n 1 400 400   \n 0 400 400   % Next line is comment in Ocatve but not Matlab\n 0 400 400   # Octave comment\n 1 400 400   \n 0 400 400   %{\n 0 400 400   Block comment.\n 0 400 400   %}\n 1 400 400   \n 0 400 400   % Command=2\n 1 400 400   \n 0 400 400   %{\n 0 400 400   Omitted as this places a style transiton between \\r and \\n\n 0 400 400   !rmdir oldtests\n 0 400 400   %}\n 1 400 400   \n 0 400 400   % Number=3\n 0 400 400   33.3\n 1 400 400   \n 0 400 400   % Keyword=4\n 0 400 400   global x\n 1 400 400   \n 0 400 400   % Single Quoted String=5\n 0 400 400   'string'\n 1 400 400   \n 0 400 400   % Operator=6\n 0 400 400   [X,Y] = meshgrid(-10:0.25:10,-10:0.25:10);\n 1 400 400   \n 0 400 400   % Identifier=7\n 0 400 400   identifier = 2\n 1 400 400   \n 0 400 400   % Double Quoted String=8\n 0 400 400   \"string\"\n 1 400 400   \n 0 400 400   % This loop should fold\n 2 400 401 + for i = 1:5\n 0 401 401 |     x(i) = 3 * i;\n 0 401 400 | end\n 1 400 400   "
  },
  {
    "path": "lexilla/test/examples/matlab/AllStyles.m.matlab.styled",
    "content": "{1}% Examples of each style 0..8 except for SCE_MATLAB_COMMAND(2) which has a line ending bug{0}\n\n{1}% White space=0{0}\n   {1}%{0}\n\n{1}% Comment=1{0}\n{1}% Line comment{0}\n\n{1}% Next line is comment in Ocatve but not Matlab{0}\n# {7}Octave{0} {7}comment{0}\n\n{1}%{\nBlock comment.\n%}{0}\n\n{1}% Command=2{0}\n\n{1}%{\nOmitted as this places a style transiton between \\r and \\n\n!rmdir oldtests\n%}{0}\n\n{1}% Number=3{0}\n{3}33.3{0}\n\n{1}% Keyword=4{0}\n{4}global{0} {7}x{0}\n\n{1}% Single Quoted String=5{0}\n{5}'string'{0}\n\n{1}% Operator=6{0}\n{6}[{7}X{6},{7}Y{6}]{0} {6}={0} {7}meshgrid{6}(-{3}10{6}:{3}0.25{6}:{3}10{6},-{3}10{6}:{3}0.25{6}:{3}10{6});{0}\n\n{1}% Identifier=7{0}\n{7}identifier{0} {6}={0} {3}2{0}\n\n{1}% Double Quoted String=8{0}\n{8}\"string\"{0}\n\n{1}% This loop should fold{0}\n{4}for{0} {7}i{0} {6}={0} {3}1{6}:{3}5{0}\n    {7}x{6}({7}i{6}){0} {6}={0} {3}3{0} {6}*{0} {7}i{6};{0}\n{4}end{0}\n"
  },
  {
    "path": "lexilla/test/examples/matlab/AllStyles.m.octave",
    "content": "% Examples of each style 0..8 except for SCE_MATLAB_COMMAND(2) which has a line ending bug\n\n% White space=0\n   %\n\n% Comment=1\n% Line comment\n\n% Next line is comment in Ocatve but not Matlab\n# Octave comment\n\n%{\nBlock comment.\n%}\n\n% Command=2\n\n%{\nOmitted as this places a style transiton between \\r and \\n\n!rmdir oldtests\n%}\n\n% Number=3\n33.3\n\n% Keyword=4\nglobal x\n\n% Single Quoted String=5\n'string'\n\n% Operator=6\n[X,Y] = meshgrid(-10:0.25:10,-10:0.25:10);\n\n% Identifier=7\nidentifier = 2\n\n% Double Quoted String=8\n\"string\"\n\n% This loop should fold\nfor i = 1:5\n    x(i) = 3 * i;\nend\n"
  },
  {
    "path": "lexilla/test/examples/matlab/AllStyles.m.octave.folded",
    "content": " 0 400 400   % Examples of each style 0..8 except for SCE_MATLAB_COMMAND(2) which has a line ending bug\n 1 400 400   \n 0 400 400   % White space=0\n 0 400 400      %\n 1 400 400   \n 0 400 400   % Comment=1\n 0 400 400   % Line comment\n 1 400 400   \n 0 400 400   % Next line is comment in Ocatve but not Matlab\n 0 400 400   # Octave comment\n 1 400 400   \n 0 400 400   %{\n 0 400 400   Block comment.\n 0 400 400   %}\n 1 400 400   \n 0 400 400   % Command=2\n 1 400 400   \n 0 400 400   %{\n 0 400 400   Omitted as this places a style transiton between \\r and \\n\n 0 400 400   !rmdir oldtests\n 0 400 400   %}\n 1 400 400   \n 0 400 400   % Number=3\n 0 400 400   33.3\n 1 400 400   \n 0 400 400   % Keyword=4\n 0 400 400   global x\n 1 400 400   \n 0 400 400   % Single Quoted String=5\n 0 400 400   'string'\n 1 400 400   \n 0 400 400   % Operator=6\n 0 400 400   [X,Y] = meshgrid(-10:0.25:10,-10:0.25:10);\n 1 400 400   \n 0 400 400   % Identifier=7\n 0 400 400   identifier = 2\n 1 400 400   \n 0 400 400   % Double Quoted String=8\n 0 400 400   \"string\"\n 1 400 400   \n 0 400 400   % This loop should fold\n 2 400 401 + for i = 1:5\n 0 401 401 |     x(i) = 3 * i;\n 0 401 400 | end\n 1 400 400   "
  },
  {
    "path": "lexilla/test/examples/matlab/AllStyles.m.octave.styled",
    "content": "{1}% Examples of each style 0..8 except for SCE_MATLAB_COMMAND(2) which has a line ending bug{0}\n\n{1}% White space=0{0}\n   {1}%{0}\n\n{1}% Comment=1{0}\n{1}% Line comment{0}\n\n{1}% Next line is comment in Ocatve but not Matlab{0}\n{1}# Octave comment{0}\n\n{1}%{\nBlock comment.\n%}{0}\n\n{1}% Command=2{0}\n\n{1}%{\nOmitted as this places a style transiton between \\r and \\n\n!rmdir oldtests\n%}{0}\n\n{1}% Number=3{0}\n{3}33.3{0}\n\n{1}% Keyword=4{0}\n{4}global{0} {7}x{0}\n\n{1}% Single Quoted String=5{0}\n{5}'string'{0}\n\n{1}% Operator=6{0}\n{6}[{7}X{6},{7}Y{6}]{0} {6}={0} {7}meshgrid{6}(-{3}10{6}:{3}0.25{6}:{3}10{6},-{3}10{6}:{3}0.25{6}:{3}10{6});{0}\n\n{1}% Identifier=7{0}\n{7}identifier{0} {6}={0} {3}2{0}\n\n{1}% Double Quoted String=8{0}\n{8}\"string\"{0}\n\n{1}% This loop should fold{0}\n{4}for{0} {7}i{0} {6}={0} {3}1{6}:{3}5{0}\n    {7}x{6}({7}i{6}){0} {6}={0} {3}3{0} {6}*{0} {7}i{6};{0}\n{4}end{0}\n"
  },
  {
    "path": "lexilla/test/examples/matlab/ArgumentsBlock.m.matlab",
    "content": "%% Correctly defined arguments block\nfunction y = foo (x)\n% Some comment here\n% And, maybe, here\n\narguments\n    x (1,2) {mustBeReal(x)}\nend\n\ny = x*2;\narguments = 1;\ny = y + arguments;\nend\n\n%% No arguments block, \"arguments\" is used \n%  as a variable name (identifier)\n% Prevent arguments from folding with an identifier\nfunction y = foo (x)\n% Some comment here\nx = x + 1;\narguments = 10;\ny = x + arguments;\nend\n\n% Prevent arguments from folding with a number\nfunction y = foo (x)\n4\narguments = 10;\ny = x + arguments;\nend\n\n% With a double quote string\nfunction y = foo (x)\n\"test\"\narguments = 10;\ny = x + arguments;\nend\n\n% With a string\nfunction y = foo (x)\n'test'\narguments = 10;\ny = x + arguments;\nend\n\n% With a keyword\nfunction y = foo (x)\nif x == 0;\n    return 0;\nend\narguments = 10;\ny = x + arguments;\nend\n\n% With an operator (illegal syntax)\nfunction y = foo (x)\n*\narguments = 10;\ny = x + arguments;\nend\n\n% Semicolon is equivalent to a comment\nfunction y = foo(x)\n;;;;;;;\narguments\n    x\nend\ny = x + 2;\nend\n\n% Arguments block is illegal in nested functions,\n% but lexer should process it anyway\nfunction y = foo (x)\narguments\n    x (1,2) {mustBeReal(x)}\nend\n\n    function y = foo (x)\n    arguments\n        x (1,2) {mustBeReal(x)}\n    end\n    var = 0;\n    arguments = 5;\n    y = arguments + x;\n    end\n\n% Use as a variable, just in case\narguments = 10;\nend\n\n% Erroneous use of arguments block\nfunction y = foo(x)\n% Some comment\nx = x + 1;\narguments\n    x\nend\ny = x;\nend\n\n% \"arguments\" is an argument name too\nfunction r = foo(x, arguments)\narguments\n    x\n    arguments\nend\nr = bar(x, arguments{:});\nend\n\n% Multiple arguments blocks\nfunction [a, b] = foo(x, y, varargin)\n\narguments(Input)\n    x (1,4) {mustBeReal}\n    y (1,:) {mustBeInteger} = x(2:end);\nend\n\narguments(Input, Repeating)\n    varargin\nend\n\narguments(Output)\n    a (1,1) {mustBeReal}\n    b (1,1) {mustBeNonNegative}\nend\n\nvar = 10;\narguments = {\"now\", \"it's\", \"variable\"};\n\n[a, b] = bar(x, y, arguments);\n\nend\n\n% One line function with arguments block.\n% This code style is rarely used (if at all), but the\n% lexer shouldn't break\nfunction y = foo(x); arguments; x; end; y = bar(x); end\n"
  },
  {
    "path": "lexilla/test/examples/matlab/ArgumentsBlock.m.matlab.folded",
    "content": " 0 400 400   %% Correctly defined arguments block\n 2 400 401 + function y = foo (x)\n 0 401 401 | % Some comment here\n 0 401 401 | % And, maybe, here\n 1 401 401 | \n 2 401 402 + arguments\n 0 402 402 |     x (1,2) {mustBeReal(x)}\n 0 402 401 | end\n 1 401 401 | \n 0 401 401 | y = x*2;\n 0 401 401 | arguments = 1;\n 0 401 401 | y = y + arguments;\n 0 401 400 | end\n 1 400 400   \n 0 400 400   %% No arguments block, \"arguments\" is used \n 0 400 400   %  as a variable name (identifier)\n 0 400 400   % Prevent arguments from folding with an identifier\n 2 400 401 + function y = foo (x)\n 0 401 401 | % Some comment here\n 0 401 401 | x = x + 1;\n 0 401 401 | arguments = 10;\n 0 401 401 | y = x + arguments;\n 0 401 400 | end\n 1 400 400   \n 0 400 400   % Prevent arguments from folding with a number\n 2 400 401 + function y = foo (x)\n 0 401 401 | 4\n 0 401 401 | arguments = 10;\n 0 401 401 | y = x + arguments;\n 0 401 400 | end\n 1 400 400   \n 0 400 400   % With a double quote string\n 2 400 401 + function y = foo (x)\n 0 401 401 | \"test\"\n 0 401 401 | arguments = 10;\n 0 401 401 | y = x + arguments;\n 0 401 400 | end\n 1 400 400   \n 0 400 400   % With a string\n 2 400 401 + function y = foo (x)\n 0 401 401 | 'test'\n 0 401 401 | arguments = 10;\n 0 401 401 | y = x + arguments;\n 0 401 400 | end\n 1 400 400   \n 0 400 400   % With a keyword\n 2 400 401 + function y = foo (x)\n 2 401 402 + if x == 0;\n 0 402 402 |     return 0;\n 0 402 401 | end\n 0 401 401 | arguments = 10;\n 0 401 401 | y = x + arguments;\n 0 401 400 | end\n 1 400 400   \n 0 400 400   % With an operator (illegal syntax)\n 2 400 401 + function y = foo (x)\n 0 401 401 | *\n 0 401 401 | arguments = 10;\n 0 401 401 | y = x + arguments;\n 0 401 400 | end\n 1 400 400   \n 0 400 400   % Semicolon is equivalent to a comment\n 2 400 401 + function y = foo(x)\n 0 401 401 | ;;;;;;;\n 2 401 402 + arguments\n 0 402 402 |     x\n 0 402 401 | end\n 0 401 401 | y = x + 2;\n 0 401 400 | end\n 1 400 400   \n 0 400 400   % Arguments block is illegal in nested functions,\n 0 400 400   % but lexer should process it anyway\n 2 400 401 + function y = foo (x)\n 2 401 402 + arguments\n 0 402 402 |     x (1,2) {mustBeReal(x)}\n 0 402 401 | end\n 1 401 401 | \n 2 401 402 +     function y = foo (x)\n 2 402 403 +     arguments\n 0 403 403 |         x (1,2) {mustBeReal(x)}\n 0 403 402 |     end\n 0 402 402 |     var = 0;\n 0 402 402 |     arguments = 5;\n 0 402 402 |     y = arguments + x;\n 0 402 401 |     end\n 1 401 401 | \n 0 401 401 | % Use as a variable, just in case\n 0 401 401 | arguments = 10;\n 0 401 400 | end\n 1 400 400   \n 0 400 400   % Erroneous use of arguments block\n 2 400 401 + function y = foo(x)\n 0 401 401 | % Some comment\n 0 401 401 | x = x + 1;\n 0 401 401 | arguments\n 0 401 401 |     x\n 0 401 400 | end\n 0 400 400   y = x;\n 0 400 3ff   end\n 1 3ff 3ff   \n 0 3ff 3ff   % \"arguments\" is an argument name too\n 2 3ff 400 + function r = foo(x, arguments)\n 2 400 401 + arguments\n 0 401 401 |     x\n 0 401 401 |     arguments\n 0 401 400 | end\n 0 400 400   r = bar(x, arguments{:});\n 0 400 3ff   end\n 1 3ff 3ff   \n 0 3ff 3ff   % Multiple arguments blocks\n 2 3ff 400 + function [a, b] = foo(x, y, varargin)\n 1 400 400   \n 2 400 401 + arguments(Input)\n 0 401 401 |     x (1,4) {mustBeReal}\n 0 401 401 |     y (1,:) {mustBeInteger} = x(2:end);\n 0 401 400 | end\n 1 400 400   \n 2 400 401 + arguments(Input, Repeating)\n 0 401 401 |     varargin\n 0 401 400 | end\n 1 400 400   \n 2 400 401 + arguments(Output)\n 0 401 401 |     a (1,1) {mustBeReal}\n 0 401 401 |     b (1,1) {mustBeNonNegative}\n 0 401 400 | end\n 1 400 400   \n 0 400 400   var = 10;\n 0 400 400   arguments = {\"now\", \"it's\", \"variable\"};\n 1 400 400   \n 0 400 400   [a, b] = bar(x, y, arguments);\n 1 400 400   \n 0 400 3ff   end\n 1 3ff 3ff   \n 0 3ff 3ff   % One line function with arguments block.\n 0 3ff 3ff   % This code style is rarely used (if at all), but the\n 0 3ff 3ff   % lexer shouldn't break\n 0 3ff 3ff   function y = foo(x); arguments; x; end; y = bar(x); end\n 1 3ff 3ff   "
  },
  {
    "path": "lexilla/test/examples/matlab/ArgumentsBlock.m.matlab.styled",
    "content": "{1}%% Correctly defined arguments block{0}\n{4}function{0} {7}y{0} {6}={0} {7}foo{0} {6}({7}x{6}){0}\n{1}% Some comment here{0}\n{1}% And, maybe, here{0}\n\n{4}arguments{0}\n    {7}x{0} {6}({3}1{6},{3}2{6}){0} {6}{{7}mustBeReal{6}({7}x{6})}{0}\n{4}end{0}\n\n{7}y{0} {6}={0} {7}x{6}*{3}2{6};{0}\n{7}arguments{0} {6}={0} {3}1{6};{0}\n{7}y{0} {6}={0} {7}y{0} {6}+{0} {7}arguments{6};{0}\n{4}end{0}\n\n{1}%% No arguments block, \"arguments\" is used {0}\n{1}%  as a variable name (identifier){0}\n{1}% Prevent arguments from folding with an identifier{0}\n{4}function{0} {7}y{0} {6}={0} {7}foo{0} {6}({7}x{6}){0}\n{1}% Some comment here{0}\n{7}x{0} {6}={0} {7}x{0} {6}+{0} {3}1{6};{0}\n{7}arguments{0} {6}={0} {3}10{6};{0}\n{7}y{0} {6}={0} {7}x{0} {6}+{0} {7}arguments{6};{0}\n{4}end{0}\n\n{1}% Prevent arguments from folding with a number{0}\n{4}function{0} {7}y{0} {6}={0} {7}foo{0} {6}({7}x{6}){0}\n{3}4{0}\n{7}arguments{0} {6}={0} {3}10{6};{0}\n{7}y{0} {6}={0} {7}x{0} {6}+{0} {7}arguments{6};{0}\n{4}end{0}\n\n{1}% With a double quote string{0}\n{4}function{0} {7}y{0} {6}={0} {7}foo{0} {6}({7}x{6}){0}\n{8}\"test\"{0}\n{7}arguments{0} {6}={0} {3}10{6};{0}\n{7}y{0} {6}={0} {7}x{0} {6}+{0} {7}arguments{6};{0}\n{4}end{0}\n\n{1}% With a string{0}\n{4}function{0} {7}y{0} {6}={0} {7}foo{0} {6}({7}x{6}){0}\n{5}'test'{0}\n{7}arguments{0} {6}={0} {3}10{6};{0}\n{7}y{0} {6}={0} {7}x{0} {6}+{0} {7}arguments{6};{0}\n{4}end{0}\n\n{1}% With a keyword{0}\n{4}function{0} {7}y{0} {6}={0} {7}foo{0} {6}({7}x{6}){0}\n{4}if{0} {7}x{0} {6}=={0} {3}0{6};{0}\n    {4}return{0} {3}0{6};{0}\n{4}end{0}\n{7}arguments{0} {6}={0} {3}10{6};{0}\n{7}y{0} {6}={0} {7}x{0} {6}+{0} {7}arguments{6};{0}\n{4}end{0}\n\n{1}% With an operator (illegal syntax){0}\n{4}function{0} {7}y{0} {6}={0} {7}foo{0} {6}({7}x{6}){0}\n{6}*{0}\n{7}arguments{0} {6}={0} {3}10{6};{0}\n{7}y{0} {6}={0} {7}x{0} {6}+{0} {7}arguments{6};{0}\n{4}end{0}\n\n{1}% Semicolon is equivalent to a comment{0}\n{4}function{0} {7}y{0} {6}={0} {7}foo{6}({7}x{6}){0}\n{6};;;;;;;{0}\n{4}arguments{0}\n    {7}x{0}\n{4}end{0}\n{7}y{0} {6}={0} {7}x{0} {6}+{0} {3}2{6};{0}\n{4}end{0}\n\n{1}% Arguments block is illegal in nested functions,{0}\n{1}% but lexer should process it anyway{0}\n{4}function{0} {7}y{0} {6}={0} {7}foo{0} {6}({7}x{6}){0}\n{4}arguments{0}\n    {7}x{0} {6}({3}1{6},{3}2{6}){0} {6}{{7}mustBeReal{6}({7}x{6})}{0}\n{4}end{0}\n\n    {4}function{0} {7}y{0} {6}={0} {7}foo{0} {6}({7}x{6}){0}\n    {4}arguments{0}\n        {7}x{0} {6}({3}1{6},{3}2{6}){0} {6}{{7}mustBeReal{6}({7}x{6})}{0}\n    {4}end{0}\n    {7}var{0} {6}={0} {3}0{6};{0}\n    {7}arguments{0} {6}={0} {3}5{6};{0}\n    {7}y{0} {6}={0} {7}arguments{0} {6}+{0} {7}x{6};{0}\n    {4}end{0}\n\n{1}% Use as a variable, just in case{0}\n{7}arguments{0} {6}={0} {3}10{6};{0}\n{4}end{0}\n\n{1}% Erroneous use of arguments block{0}\n{4}function{0} {7}y{0} {6}={0} {7}foo{6}({7}x{6}){0}\n{1}% Some comment{0}\n{7}x{0} {6}={0} {7}x{0} {6}+{0} {3}1{6};{0}\n{7}arguments{0}\n    {7}x{0}\n{4}end{0}\n{7}y{0} {6}={0} {7}x{6};{0}\n{4}end{0}\n\n{1}% \"arguments\" is an argument name too{0}\n{4}function{0} {7}r{0} {6}={0} {7}foo{6}({7}x{6},{0} {7}arguments{6}){0}\n{4}arguments{0}\n    {7}x{0}\n    {7}arguments{0}\n{4}end{0}\n{7}r{0} {6}={0} {7}bar{6}({7}x{6},{0} {7}arguments{6}{:});{0}\n{4}end{0}\n\n{1}% Multiple arguments blocks{0}\n{4}function{0} {6}[{7}a{6},{0} {7}b{6}]{0} {6}={0} {7}foo{6}({7}x{6},{0} {7}y{6},{0} {7}varargin{6}){0}\n\n{4}arguments{6}({7}Input{6}){0}\n    {7}x{0} {6}({3}1{6},{3}4{6}){0} {6}{{7}mustBeReal{6}}{0}\n    {7}y{0} {6}({3}1{6},:){0} {6}{{7}mustBeInteger{6}}{0} {6}={0} {7}x{6}({3}2{6}:{3}end{6});{0}\n{4}end{0}\n\n{4}arguments{6}({7}Input{6},{0} {7}Repeating{6}){0}\n    {7}varargin{0}\n{4}end{0}\n\n{4}arguments{6}({7}Output{6}){0}\n    {7}a{0} {6}({3}1{6},{3}1{6}){0} {6}{{7}mustBeReal{6}}{0}\n    {7}b{0} {6}({3}1{6},{3}1{6}){0} {6}{{7}mustBeNonNegative{6}}{0}\n{4}end{0}\n\n{7}var{0} {6}={0} {3}10{6};{0}\n{7}arguments{0} {6}={0} {6}{{8}\"now\"{6},{0} {8}\"it's\"{6},{0} {8}\"variable\"{6}};{0}\n\n{6}[{7}a{6},{0} {7}b{6}]{0} {6}={0} {7}bar{6}({7}x{6},{0} {7}y{6},{0} {7}arguments{6});{0}\n\n{4}end{0}\n\n{1}% One line function with arguments block.{0}\n{1}% This code style is rarely used (if at all), but the{0}\n{1}% lexer shouldn't break{0}\n{4}function{0} {7}y{0} {6}={0} {7}foo{6}({7}x{6});{0} {4}arguments{6};{0} {7}x{6};{0} {4}end{6};{0} {7}y{0} {6}={0} {7}bar{6}({7}x{6});{0} {4}end{0}\n"
  },
  {
    "path": "lexilla/test/examples/matlab/ClassDefinition.m.matlab",
    "content": "classdef Foo < handle\n\n    % A couple of properties blocks\n    properties (SetAccess = private)\n        Var1\n        Var2\n    end\n\n    properties\n        Var3\n        Var4\n    end\n\n    methods (Static)\n        function y = f1(x)\n            % events, properties and methods are the valid idenifiers\n            % in the function scope\n            events = 1;\n            properties = 2;\n            y = x + events * properties;\n        end\n\n        % Any of these words are also valid functions' names inside\n        % methods block\n        function y = events(x)\n            \n            arguments\n                x {mustBeNegative}\n            end\n\n            y = f2(x)*100;\n            function b = f2(a)\n                b = a + 5;\n            end\n        end\n    end\n\n    % Example events block\n    events\n        Event1\n        Event2\n    end\nend\n\n\n% Now, let's break some stuff\nclassdef Bar\n\n    properties\n        % Though MATLAB won't execute such a code, events, properties\n        % and methods are keywords here, because we're still in the class scope\n        events\n        end\n\n        methods\n        end        \n    end\n    \n    % Not allowed in MATLAB, but, technically, we're still in the class scope\n    if condition1\n        if condition2\n            % Though we're in the class scope, lexel will recognize no\n            % keywords here: to avoid the neccessaty to track nested scopes,\n            % it just considers everything beyond level 2 of folding to be\n            % a function scope\n            methods\n            events\n            properties\n        end\n    end\n\n\nend\n\n"
  },
  {
    "path": "lexilla/test/examples/matlab/ClassDefinition.m.matlab.folded",
    "content": " 2 400 401 + classdef Foo < handle\n 1 401 401 | \n 0 401 401 |     % A couple of properties blocks\n 2 401 402 +     properties (SetAccess = private)\n 0 402 402 |         Var1\n 0 402 402 |         Var2\n 0 402 401 |     end\n 1 401 401 | \n 2 401 402 +     properties\n 0 402 402 |         Var3\n 0 402 402 |         Var4\n 0 402 401 |     end\n 1 401 401 | \n 2 401 402 +     methods (Static)\n 2 402 403 +         function y = f1(x)\n 0 403 403 |             % events, properties and methods are the valid idenifiers\n 0 403 403 |             % in the function scope\n 0 403 403 |             events = 1;\n 0 403 403 |             properties = 2;\n 0 403 403 |             y = x + events * properties;\n 0 403 402 |         end\n 1 402 402 | \n 0 402 402 |         % Any of these words are also valid functions' names inside\n 0 402 402 |         % methods block\n 2 402 403 +         function y = events(x)\n 1 403 403 |             \n 2 403 404 +             arguments\n 0 404 404 |                 x {mustBeNegative}\n 0 404 403 |             end\n 1 403 403 | \n 0 403 403 |             y = f2(x)*100;\n 2 403 404 +             function b = f2(a)\n 0 404 404 |                 b = a + 5;\n 0 404 403 |             end\n 0 403 402 |         end\n 0 402 401 |     end\n 1 401 401 | \n 0 401 401 |     % Example events block\n 2 401 402 +     events\n 0 402 402 |         Event1\n 0 402 402 |         Event2\n 0 402 401 |     end\n 0 401 400 | end\n 1 400 400   \n 1 400 400   \n 0 400 400   % Now, let's break some stuff\n 2 400 401 + classdef Bar\n 1 401 401 | \n 2 401 402 +     properties\n 0 402 402 |         % Though MATLAB won't execute such a code, events, properties\n 0 402 402 |         % and methods are keywords here, because we're still in the class scope\n 2 402 403 +         events\n 0 403 402 |         end\n 1 402 402 | \n 2 402 403 +         methods\n 0 403 402 |         end        \n 0 402 401 |     end\n 1 401 401 |     \n 0 401 401 |     % Not allowed in MATLAB, but, technically, we're still in the class scope\n 2 401 402 +     if condition1\n 2 402 403 +         if condition2\n 0 403 403 |             % Though we're in the class scope, lexel will recognize no\n 0 403 403 |             % keywords here: to avoid the neccessaty to track nested scopes,\n 0 403 403 |             % it just considers everything beyond level 2 of folding to be\n 0 403 403 |             % a function scope\n 0 403 403 |             methods\n 0 403 403 |             events\n 0 403 403 |             properties\n 0 403 402 |         end\n 0 402 401 |     end\n 1 401 401 | \n 1 401 401 | \n 0 401 400 | end\n 1 400 400   \n 1 400 400   "
  },
  {
    "path": "lexilla/test/examples/matlab/ClassDefinition.m.matlab.styled",
    "content": "{4}classdef{0} {7}Foo{0} {6}<{0} {7}handle{0}\n\n    {1}% A couple of properties blocks{0}\n    {4}properties{0} {6}({7}SetAccess{0} {6}={0} {7}private{6}){0}\n        {7}Var1{0}\n        {7}Var2{0}\n    {4}end{0}\n\n    {4}properties{0}\n        {7}Var3{0}\n        {7}Var4{0}\n    {4}end{0}\n\n    {4}methods{0} {6}({7}Static{6}){0}\n        {4}function{0} {7}y{0} {6}={0} {7}f1{6}({7}x{6}){0}\n            {1}% events, properties and methods are the valid idenifiers{0}\n            {1}% in the function scope{0}\n            {7}events{0} {6}={0} {3}1{6};{0}\n            {7}properties{0} {6}={0} {3}2{6};{0}\n            {7}y{0} {6}={0} {7}x{0} {6}+{0} {7}events{0} {6}*{0} {7}properties{6};{0}\n        {4}end{0}\n\n        {1}% Any of these words are also valid functions' names inside{0}\n        {1}% methods block{0}\n        {4}function{0} {7}y{0} {6}={0} {7}events{6}({7}x{6}){0}\n            \n            {4}arguments{0}\n                {7}x{0} {6}{{7}mustBeNegative{6}}{0}\n            {4}end{0}\n\n            {7}y{0} {6}={0} {7}f2{6}({7}x{6})*{3}100{6};{0}\n            {4}function{0} {7}b{0} {6}={0} {7}f2{6}({7}a{6}){0}\n                {7}b{0} {6}={0} {7}a{0} {6}+{0} {3}5{6};{0}\n            {4}end{0}\n        {4}end{0}\n    {4}end{0}\n\n    {1}% Example events block{0}\n    {4}events{0}\n        {7}Event1{0}\n        {7}Event2{0}\n    {4}end{0}\n{4}end{0}\n\n\n{1}% Now, let's break some stuff{0}\n{4}classdef{0} {7}Bar{0}\n\n    {4}properties{0}\n        {1}% Though MATLAB won't execute such a code, events, properties{0}\n        {1}% and methods are keywords here, because we're still in the class scope{0}\n        {4}events{0}\n        {4}end{0}\n\n        {4}methods{0}\n        {4}end{0}        \n    {4}end{0}\n    \n    {1}% Not allowed in MATLAB, but, technically, we're still in the class scope{0}\n    {4}if{0} {7}condition1{0}\n        {4}if{0} {7}condition2{0}\n            {1}% Though we're in the class scope, lexel will recognize no{0}\n            {1}% keywords here: to avoid the neccessaty to track nested scopes,{0}\n            {1}% it just considers everything beyond level 2 of folding to be{0}\n            {1}% a function scope{0}\n            {7}methods{0}\n            {7}events{0}\n            {7}properties{0}\n        {4}end{0}\n    {4}end{0}\n\n\n{4}end{0}\n\n"
  },
  {
    "path": "lexilla/test/examples/matlab/FoldPoints.m.matlab",
    "content": "% All the examples here should yield folding\n\nclassdef\n    % Some code\nend\n\nfor\n    % Some code\nend\n\nfunction\n    % Some code\nend\n\nif\n    % Some code\nelseif\n    % Some code\nelse\n    % Some code\nend\n\nparfor\n    % Some code\nend\n\nspmd\n    % Some code\nend\n\nswitch\n    case\n        % Some code\n    case\n        % Some code\n    otherwise\n        % Some code\nend\n\ntry\n    % Some code\ncatch\n    % Some code\nend\n\nwhile\n    % Some code\nend\n"
  },
  {
    "path": "lexilla/test/examples/matlab/FoldPoints.m.matlab.folded",
    "content": " 0 400 400   % All the examples here should yield folding\n 1 400 400   \n 2 400 401 + classdef\n 0 401 401 |     % Some code\n 0 401 400 | end\n 1 400 400   \n 2 400 401 + for\n 0 401 401 |     % Some code\n 0 401 400 | end\n 1 400 400   \n 2 400 401 + function\n 0 401 401 |     % Some code\n 0 401 400 | end\n 1 400 400   \n 2 400 401 + if\n 0 401 401 |     % Some code\n 0 401 401 | elseif\n 0 401 401 |     % Some code\n 0 401 401 | else\n 0 401 401 |     % Some code\n 0 401 400 | end\n 1 400 400   \n 2 400 401 + parfor\n 0 401 401 |     % Some code\n 0 401 400 | end\n 1 400 400   \n 2 400 401 + spmd\n 0 401 401 |     % Some code\n 0 401 400 | end\n 1 400 400   \n 2 400 401 + switch\n 0 401 401 |     case\n 0 401 401 |         % Some code\n 0 401 401 |     case\n 0 401 401 |         % Some code\n 0 401 401 |     otherwise\n 0 401 401 |         % Some code\n 0 401 400 | end\n 1 400 400   \n 2 400 401 + try\n 0 401 401 |     % Some code\n 0 401 401 | catch\n 0 401 401 |     % Some code\n 0 401 400 | end\n 1 400 400   \n 2 400 401 + while\n 0 401 401 |     % Some code\n 0 401 400 | end\n 1 400 400   "
  },
  {
    "path": "lexilla/test/examples/matlab/FoldPoints.m.matlab.styled",
    "content": "{1}% All the examples here should yield folding{0}\n\n{4}classdef{0}\n    {1}% Some code{0}\n{4}end{0}\n\n{4}for{0}\n    {1}% Some code{0}\n{4}end{0}\n\n{4}function{0}\n    {1}% Some code{0}\n{4}end{0}\n\n{4}if{0}\n    {1}% Some code{0}\n{4}elseif{0}\n    {1}% Some code{0}\n{4}else{0}\n    {1}% Some code{0}\n{4}end{0}\n\n{4}parfor{0}\n    {1}% Some code{0}\n{4}end{0}\n\n{4}spmd{0}\n    {1}% Some code{0}\n{4}end{0}\n\n{4}switch{0}\n    {4}case{0}\n        {1}% Some code{0}\n    {4}case{0}\n        {1}% Some code{0}\n    {4}otherwise{0}\n        {1}% Some code{0}\n{4}end{0}\n\n{4}try{0}\n    {1}% Some code{0}\n{4}catch{0}\n    {1}% Some code{0}\n{4}end{0}\n\n{4}while{0}\n    {1}% Some code{0}\n{4}end{0}\n"
  },
  {
    "path": "lexilla/test/examples/matlab/Issue18_EscapeSequence.m.matlab",
    "content": "a=\"\"\"\";\nb=1;\nc='\\';\nd=2;\ne=\"\\\";\nf=3;\n%\" this should be a comment (colored as such), instead it closes the string\ng=\"\nh=123;\n%\" this is a syntax error in Matlab (about 'g'),\n% followed by a valid assignment (of 'h')\n% Instead, 'h' is colored as part of the string\n\n% Octave terminates string at 3rd \", Matlab at 4th\ni=\"\\\" \"; % \" %\n\n% Matlab (unlike Octave) does not allow string continuation with an escape\nb = \"multi\\\nline\"\n\n% end\n"
  },
  {
    "path": "lexilla/test/examples/matlab/Issue18_EscapeSequence.m.matlab.folded",
    "content": " 0 400 400   a=\"\"\"\";\n 0 400 400   b=1;\n 0 400 400   c='\\';\n 0 400 400   d=2;\n 0 400 400   e=\"\\\";\n 0 400 400   f=3;\n 0 400 400   %\" this should be a comment (colored as such), instead it closes the string\n 0 400 400   g=\"\n 0 400 400   h=123;\n 0 400 400   %\" this is a syntax error in Matlab (about 'g'),\n 0 400 400   % followed by a valid assignment (of 'h')\n 0 400 400   % Instead, 'h' is colored as part of the string\n 1 400 400   \n 0 400 400   % Octave terminates string at 3rd \", Matlab at 4th\n 0 400 400   i=\"\\\" \"; % \" %\n 1 400 400   \n 0 400 400   % Matlab (unlike Octave) does not allow string continuation with an escape\n 0 400 400   b = \"multi\\\n 0 400 400   line\"\n 1 400 400   \n 0 400 400   % end\n 1 400 400   "
  },
  {
    "path": "lexilla/test/examples/matlab/Issue18_EscapeSequence.m.matlab.styled",
    "content": "{7}a{6}={8}\"\"\"\"{6};{0}\n{7}b{6}={3}1{6};{0}\n{7}c{6}={5}'\\'{6};{0}\n{7}d{6}={3}2{6};{0}\n{7}e{6}={8}\"\\\"{6};{0}\n{7}f{6}={3}3{6};{0}\n{1}%\" this should be a comment (colored as such), instead it closes the string{0}\n{7}g{6}={8}\"{0}\n{7}h{6}={3}123{6};{0}\n{1}%\" this is a syntax error in Matlab (about 'g'),{0}\n{1}% followed by a valid assignment (of 'h'){0}\n{1}% Instead, 'h' is colored as part of the string{0}\n\n{1}% Octave terminates string at 3rd \", Matlab at 4th{0}\n{7}i{6}={8}\"\\\"{0} {8}\"; % \"{0} {1}%{0}\n\n{1}% Matlab (unlike Octave) does not allow string continuation with an escape{0}\n{7}b{0} {6}={0} {8}\"multi\\{0}\n{7}line{8}\"{0}\n\n{1}% end{0}\n"
  },
  {
    "path": "lexilla/test/examples/matlab/Issue18_EscapeSequence.m.octave",
    "content": "% Ensure escape sequences still work in octave\n% Octave terminates string at 3rd \", Matlab at 4th\ni=\"\\\" \"; % \" %\n\n\n% Octave allows string continuation with an escape\nb = \"multi\\\nline\"\n\n% No escape so string ends at line end \nc = \"multi\nline\"\n\n% end\n"
  },
  {
    "path": "lexilla/test/examples/matlab/Issue18_EscapeSequence.m.octave.folded",
    "content": " 0 400 400   % Ensure escape sequences still work in octave\n 0 400 400   % Octave terminates string at 3rd \", Matlab at 4th\n 0 400 400   i=\"\\\" \"; % \" %\n 1 400 400   \n 1 400 400   \n 0 400 400   % Octave allows string continuation with an escape\n 0 400 400   b = \"multi\\\n 0 400 400   line\"\n 1 400 400   \n 0 400 400   % No escape so string ends at line end \n 0 400 400   c = \"multi\n 0 400 400   line\"\n 1 400 400   \n 0 400 400   % end\n 1 400 400   "
  },
  {
    "path": "lexilla/test/examples/matlab/Issue18_EscapeSequence.m.octave.styled",
    "content": "{1}% Ensure escape sequences still work in octave{0}\n{1}% Octave terminates string at 3rd \", Matlab at 4th{0}\n{7}i{6}={8}\"\\\" \"{6};{0} {1}% \" %{0}\n\n\n{1}% Octave allows string continuation with an escape{0}\n{7}b{0} {6}={0} {8}\"multi\\\nline\"{0}\n\n{1}% No escape so string ends at line end {0}\n{7}c{0} {6}={0} {8}\"multi{0}\n{7}line{8}\"{0}\n\n{1}% end{0}\n"
  },
  {
    "path": "lexilla/test/examples/matlab/NumericLiterals.m.matlab",
    "content": "d    = 123;\nx    = 0x123ABC;\nb    = 0b010101;\nxs64 = 0x2As64;\nxs32 = 0x2As32;\nxs16 = 0x2As16;\nxs8  = 0x2As8;\nxu64 = 0x2Au64;\nxu32 = 0x2Au32;\nxu16 = 0x2Au16;\nxu8  = 0x2Au8;\nbs64 = 0b10s64;\nbs32 = 0b10s32;\nbs16 = 0b10s16;\nbs8  = 0b10s8;\nbu64 = 0b10u64;\nbu32 = 0b10u32;\nbu16 = 0b10u16;\nbu8  = 0b10u8;\nc = .1;\nc = 1.1;\nc = .1e1;\nc = 1.1e1;\nc = 1e1;\nc = 1i;\nc = 1j;\nc = .1e2j;\nc = 1e2j;\n"
  },
  {
    "path": "lexilla/test/examples/matlab/NumericLiterals.m.matlab.folded",
    "content": " 0 400 400   d    = 123;\n 0 400 400   x    = 0x123ABC;\n 0 400 400   b    = 0b010101;\n 0 400 400   xs64 = 0x2As64;\n 0 400 400   xs32 = 0x2As32;\n 0 400 400   xs16 = 0x2As16;\n 0 400 400   xs8  = 0x2As8;\n 0 400 400   xu64 = 0x2Au64;\n 0 400 400   xu32 = 0x2Au32;\n 0 400 400   xu16 = 0x2Au16;\n 0 400 400   xu8  = 0x2Au8;\n 0 400 400   bs64 = 0b10s64;\n 0 400 400   bs32 = 0b10s32;\n 0 400 400   bs16 = 0b10s16;\n 0 400 400   bs8  = 0b10s8;\n 0 400 400   bu64 = 0b10u64;\n 0 400 400   bu32 = 0b10u32;\n 0 400 400   bu16 = 0b10u16;\n 0 400 400   bu8  = 0b10u8;\n 0 400 400   c = .1;\n 0 400 400   c = 1.1;\n 0 400 400   c = .1e1;\n 0 400 400   c = 1.1e1;\n 0 400 400   c = 1e1;\n 0 400 400   c = 1i;\n 0 400 400   c = 1j;\n 0 400 400   c = .1e2j;\n 0 400 400   c = 1e2j;\n 1 400 400   "
  },
  {
    "path": "lexilla/test/examples/matlab/NumericLiterals.m.matlab.styled",
    "content": "{7}d{0}    {6}={0} {3}123{6};{0}\n{7}x{0}    {6}={0} {3}0x123ABC{6};{0}\n{7}b{0}    {6}={0} {3}0b010101{6};{0}\n{7}xs64{0} {6}={0} {3}0x2As64{6};{0}\n{7}xs32{0} {6}={0} {3}0x2As32{6};{0}\n{7}xs16{0} {6}={0} {3}0x2As16{6};{0}\n{7}xs8{0}  {6}={0} {3}0x2As8{6};{0}\n{7}xu64{0} {6}={0} {3}0x2Au64{6};{0}\n{7}xu32{0} {6}={0} {3}0x2Au32{6};{0}\n{7}xu16{0} {6}={0} {3}0x2Au16{6};{0}\n{7}xu8{0}  {6}={0} {3}0x2Au8{6};{0}\n{7}bs64{0} {6}={0} {3}0b10s64{6};{0}\n{7}bs32{0} {6}={0} {3}0b10s32{6};{0}\n{7}bs16{0} {6}={0} {3}0b10s16{6};{0}\n{7}bs8{0}  {6}={0} {3}0b10s8{6};{0}\n{7}bu64{0} {6}={0} {3}0b10u64{6};{0}\n{7}bu32{0} {6}={0} {3}0b10u32{6};{0}\n{7}bu16{0} {6}={0} {3}0b10u16{6};{0}\n{7}bu8{0}  {6}={0} {3}0b10u8{6};{0}\n{7}c{0} {6}={0} {3}.1{6};{0}\n{7}c{0} {6}={0} {3}1.1{6};{0}\n{7}c{0} {6}={0} {3}.1e1{6};{0}\n{7}c{0} {6}={0} {3}1.1e1{6};{0}\n{7}c{0} {6}={0} {3}1e1{6};{0}\n{7}c{0} {6}={0} {3}1i{6};{0}\n{7}c{0} {6}={0} {3}1j{6};{0}\n{7}c{0} {6}={0} {3}.1e2j{6};{0}\n{7}c{0} {6}={0} {3}1e2j{6};{0}\n"
  },
  {
    "path": "lexilla/test/examples/matlab/SciTE.properties",
    "content": "lexer.*.matlab=matlab\nkeywords.*.matlab=end for global if break case catch classdef continue else elseif function otherwise parfor persistent return spmd switch try while\n\nlexer.*.octave=octave\nkeywords.*.octave=end for global if\n\nfold=1\nfold.compact=1\n"
  },
  {
    "path": "lexilla/test/examples/mmixal/AllStyles.mms",
    "content": "% Demonstrate each possible style. Does not make sense as code.\n\n% A comment 1\n% Comment\n\n\n% Whitespace 0\n        \n\n\n% Label 2\nlabel\n\n\n% Not Validated Opcode 3 appears to always validate to either 5 or 6\n% so is never seen on screen.\n\n\n% Division between Label and Opcode 4\nla      \n\n\n% Valid Opcode 5\n        TRAP\n\n\n% Invalid Opcode 6\n        UNKNOWN\n\n\n% Division between Opcode and Operands 7\n        LOC   \n\n\n% Division of Operands 8\n        LOC   0.\n\n\n% Number 9\n        BYTE  0\n\n\n% Reference 10\n        JMP @label\n\n\n% Char 11\n        BYTE 'a'\n\n\n% String 12\n        BYTE \"Hello, world!\"\n\n\n% Register 13\n        BYTE rA\n\n\n% Hexadecimal Number 14\n        BYTE #FF\n\n\n% Operator 15\n        BYTE  +\n\n\n% Symbol 16\n        TRAP  Fputs\n\n\n% Preprocessor 17\n@include a.mms\n\n\n"
  },
  {
    "path": "lexilla/test/examples/mmixal/AllStyles.mms.folded",
    "content": " 0 400   0   % Demonstrate each possible style. Does not make sense as code.\n 0 400   0   \n 0 400   0   % A comment 1\n 0 400   0   % Comment\n 0 400   0   \n 0 400   0   \n 0 400   0   % Whitespace 0\n 0 400   0           \n 0 400   0   \n 0 400   0   \n 0 400   0   % Label 2\n 0 400   0   label\n 0 400   0   \n 0 400   0   \n 0 400   0   % Not Validated Opcode 3 appears to always validate to either 5 or 6\n 0 400   0   % so is never seen on screen.\n 0 400   0   \n 0 400   0   \n 0 400   0   % Division between Label and Opcode 4\n 0 400   0   la      \n 0 400   0   \n 0 400   0   \n 0 400   0   % Valid Opcode 5\n 0 400   0           TRAP\n 0 400   0   \n 0 400   0   \n 0 400   0   % Invalid Opcode 6\n 0 400   0           UNKNOWN\n 0 400   0   \n 0 400   0   \n 0 400   0   % Division between Opcode and Operands 7\n 0 400   0           LOC   \n 0 400   0   \n 0 400   0   \n 0 400   0   % Division of Operands 8\n 0 400   0           LOC   0.\n 0 400   0   \n 0 400   0   \n 0 400   0   % Number 9\n 0 400   0           BYTE  0\n 0 400   0   \n 0 400   0   \n 0 400   0   % Reference 10\n 0 400   0           JMP @label\n 0 400   0   \n 0 400   0   \n 0 400   0   % Char 11\n 0 400   0           BYTE 'a'\n 0 400   0   \n 0 400   0   \n 0 400   0   % String 12\n 0 400   0           BYTE \"Hello, world!\"\n 0 400   0   \n 0 400   0   \n 0 400   0   % Register 13\n 0 400   0           BYTE rA\n 0 400   0   \n 0 400   0   \n 0 400   0   % Hexadecimal Number 14\n 0 400   0           BYTE #FF\n 0 400   0   \n 0 400   0   \n 0 400   0   % Operator 15\n 0 400   0           BYTE  +\n 0 400   0   \n 0 400   0   \n 0 400   0   % Symbol 16\n 0 400   0           TRAP  Fputs\n 0 400   0   \n 0 400   0   \n 0 400   0   % Preprocessor 17\n 0 400   0   @include a.mms\n 0 400   0   \n 0 400   0   \n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/mmixal/AllStyles.mms.styled",
    "content": "{1}% Demonstrate each possible style. Does not make sense as code.\n{0}\n{1}% A comment 1\n% Comment\n{0}\n\n{1}% Whitespace 0\n{0}        \n\n\n{1}% Label 2\n{2}label{4}\n{0}\n\n{1}% Not Validated Opcode 3 appears to always validate to either 5 or 6\n% so is never seen on screen.\n{0}\n\n{1}% Division between Label and Opcode 4\n{2}la{4}      \n{0}\n\n{1}% Valid Opcode 5\n{0}        {5}TRAP{7}\n{0}\n\n{1}% Invalid Opcode 6\n{0}        {6}UNKNOWN{7}\n{0}\n\n{1}% Division between Opcode and Operands 7\n{0}        {5}LOC{7}   \n{0}\n\n{1}% Division of Operands 8\n{0}        {5}LOC{7}   {9}0{8}.{1}\n{0}\n\n{1}% Number 9\n{0}        {5}BYTE{7}  {9}0{1}\n{0}\n\n{1}% Reference 10\n{0}        {5}JMP{7} {10}@label{1}\n{0}\n\n{1}% Char 11\n{0}        {5}BYTE{7} {11}'a'{1}\n{0}\n\n{1}% String 12\n{0}        {5}BYTE{7} {12}\"Hello, world!\"{1}\n{0}\n\n{1}% Register 13\n{0}        {5}BYTE{7} {13}rA{1}\n{0}\n\n{1}% Hexadecimal Number 14\n{0}        {5}BYTE{7} {14}#FF{1}\n{0}\n\n{1}% Operator 15\n{0}        {5}BYTE{7}  {15}+{1}\n{0}\n\n{1}% Symbol 16\n{0}        {5}TRAP{7}  {16}Fputs{1}\n{0}\n\n{1}% Preprocessor 17\n{17}@include a.mms\n{0}\n\n"
  },
  {
    "path": "lexilla/test/examples/mmixal/SciTE.properties",
    "content": "lexer.*.mms=mmixal\nkeywords.*.mms=BYTE GETA JMP LOC PREFIX TRAP\nkeywords2.*.mms=rA\nkeywords3.*.mms=Fputs StdOut\n"
  },
  {
    "path": "lexilla/test/examples/mmixal/references.mms",
    "content": "# Bug #2019 Buffer over-read in MMIXAL lexer\nlabel\n        PREFIX  Foo:\n% Relative reference (uses PREFIX)\n        JMP label\n%\n        JMP @label\n% Absolute reference (does not use PREFIX)\n        JMP :label\n% In register list so treated as register\n        JMP :rA\n% Too long for buffer so truncated\n        JMP l1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890\n% Too long for buffer so truncated then treated as absolute\n        JMP :l1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890\n%\n"
  },
  {
    "path": "lexilla/test/examples/mmixal/references.mms.folded",
    "content": " 0 400   0   # Bug #2019 Buffer over-read in MMIXAL lexer\n 0 400   0   label\n 0 400   0           PREFIX  Foo:\n 0 400   0   % Relative reference (uses PREFIX)\n 0 400   0           JMP label\n 0 400   0   %\n 0 400   0           JMP @label\n 0 400   0   % Absolute reference (does not use PREFIX)\n 0 400   0           JMP :label\n 0 400   0   % In register list so treated as register\n 0 400   0           JMP :rA\n 0 400   0   % Too long for buffer so truncated\n 0 400   0           JMP l1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890\n 0 400   0   % Too long for buffer so truncated then treated as absolute\n 0 400   0           JMP :l1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890\n 0 400   0   %\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/mmixal/references.mms.styled",
    "content": "{1}# Bug #2019 Buffer over-read in MMIXAL lexer\n{2}label{4}\n{0}        {5}PREFIX{7}  {10}Foo:{1}\n% Relative reference (uses PREFIX)\n{0}        {5}JMP{7} {10}label{1}\n%\n{0}        {5}JMP{7} {10}@label{1}\n% Absolute reference (does not use PREFIX)\n{0}        {5}JMP{7} {10}:label{1}\n% In register list so treated as register\n{0}        {5}JMP{7} {13}:rA{1}\n% Too long for buffer so truncated\n{0}        {5}JMP{7} {10}l1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890{1}\n% Too long for buffer so truncated then treated as absolute\n{0}        {5}JMP{7} {10}:l1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890{1}\n%\n"
  },
  {
    "path": "lexilla/test/examples/mmixal/x.mms",
    "content": "% Some example code\n\n        % Set the address of the program initially to 0x100.\n        LOC   #100\n\nMain    GETA  $255,string\n\n        TRAP  0,Fputs,StdOut\n\n        TRAP  0,Halt,0\n\nstring  BYTE  \"Hello, world!\",#a,0\n"
  },
  {
    "path": "lexilla/test/examples/mmixal/x.mms.folded",
    "content": " 0 400   0   % Some example code\n 0 400   0   \n 0 400   0           % Set the address of the program initially to 0x100.\n 0 400   0           LOC   #100\n 0 400   0   \n 0 400   0   Main    GETA  $255,string\n 0 400   0   \n 0 400   0           TRAP  0,Fputs,StdOut\n 0 400   0   \n 0 400   0           TRAP  0,Halt,0\n 0 400   0   \n 0 400   0   string  BYTE  \"Hello, world!\",#a,0\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/mmixal/x.mms.styled",
    "content": "{1}% Some example code\n{0}\n        {1}% Set the address of the program initially to 0x100.\n{0}        {5}LOC{7}   {14}#100{1}\n{0}\n{2}Main{4}    {5}GETA{7}  {13}$255{15},{10}string{1}\n{0}\n        {5}TRAP{7}  {9}0{15},{16}Fputs{15},{16}StdOut{1}\n{0}\n        {5}TRAP{7}  {9}0{15},{10}Halt{15},{9}0{1}\n{0}\n{2}string{4}  {5}BYTE{7}  {12}\"Hello, world!\"{15},{14}#a{15},{9}0{1}\n"
  },
  {
    "path": "lexilla/test/examples/modula/128Endless.m3",
    "content": "(* This file caused an infinite loop in the folder before #128 was fixed.*)\nMODULE Form;\n  IMPORT  \n\n  PROCEDURE (bf: ButtonForm) InitializeComponent(), NEW;\n  BEGIN\n    bf.SuspendLayout();\n    REGISTER(bf.button1.Click, bf.button1_Click);\n    bf.get_Controls().Add(bf.button2);\n  END InitializeComponent;\n\nBEGIN\n    NEW(bf);\n    Wfm.Application.Run(bf);\nEND Form.\n"
  },
  {
    "path": "lexilla/test/examples/modula/128Endless.m3.folded",
    "content": " 0 400 400   (* This file caused an infinite loop in the folder before #128 was fixed.*)\n 0 400 400   MODULE Form;\n 0 400 400     IMPORT  \n 1 400 400   \n 0 400 400     PROCEDURE (bf: ButtonForm) InitializeComponent(), NEW;\n 2 400 401 +   BEGIN\n 0 401 401 |     bf.SuspendLayout();\n 0 401 401 |     REGISTER(bf.button1.Click, bf.button1_Click);\n 0 401 401 |     bf.get_Controls().Add(bf.button2);\n 0 401 400 |   END InitializeComponent;\n 1 400 400   \n 2 400 401 + BEGIN\n 0 401 401 |     NEW(bf);\n 0 401 401 |     Wfm.Application.Run(bf);\n 0 401 400 | END Form.\n 1 400 400   "
  },
  {
    "path": "lexilla/test/examples/modula/128Endless.m3.styled",
    "content": "{1}(* This file caused an infinite loop in the folder before #128 was fixed.*){0}\n{4}MODULE{0} Form{16};{0}\n  {4}IMPORT{0}  \n\n  {4}PROCEDURE{0} {16}({0}bf{16}:{0} ButtonForm{16}){0} InitializeComponent{16}(),{0} {5}NEW{16};{0}\n  {4}BEGIN{0}\n    bf{16}.{0}SuspendLayout{16}();{0}\n    REGISTER{16}({0}bf{16}.{0}button1{16}.{0}Click{16},{0} bf{16}.{0}button1_Click{16});{0}\n    bf{16}.{0}get_Controls{16}().{0}Add{16}({0}bf{16}.{0}button2{16});{0}\n  {4}END{0} InitializeComponent{16};{0}\n\n{4}BEGIN{0}\n    {5}NEW{16}({0}bf{16});{0}\n    Wfm{16}.{0}Application{16}.{0}Run{16}({0}bf{16});{0}\n{4}END{0} Form{16}.{0}\n"
  },
  {
    "path": "lexilla/test/examples/modula/Issue129.m3",
    "content": "INTERFACE Test;\n\nTYPE\n  (* Opaque types *)\n  HANDLE                  = ADDRESS;\n  HMOD(* Module handle *) = HANDLE;\n\nEND Test.\n"
  },
  {
    "path": "lexilla/test/examples/modula/Issue129.m3.folded",
    "content": " 0 400 400   INTERFACE Test;\n 1 400 400   \n 0 400 400   TYPE\n 0 400 400     (* Opaque types *)\n 0 400 400     HANDLE                  = ADDRESS;\n 0 400 400     HMOD(* Module handle *) = HANDLE;\n 1 400 400   \n 0 400 3ff   END Test.\n 1 3ff 3ff   "
  },
  {
    "path": "lexilla/test/examples/modula/Issue129.m3.styled",
    "content": "{4}INTERFACE{0} Test{16};{0}\n\n{4}TYPE{0}\n  {1}(* Opaque types *){0}\n  HANDLE                  {16}={0} {5}ADDRESS{16};{0}\n  HMOD{1}(* Module handle *){0} {16}={0} HANDLE{16};{0}\n\n{4}END{0} Test{16}.{0}\n"
  },
  {
    "path": "lexilla/test/examples/modula/SciTE.properties",
    "content": "lexer.*.m3=modula\n#\tKeywords\nkeywords.*.m3=AND ANY ARRAY AS BEGIN BITS BRANDED BY CASE CONST\\\n\tDIV DO ELSE ELSIF END EVAL EXCEPT EXCEPTION EXIT EXPORTS FINALLY FOR FROM\\\n\tGENERIC IF IMPORT IN INTERFACE LOCK LOOP METHODS MOD MODULE NOT OBJECT OF\\\n\tOR OVERRIDES PROCEDURE RAISE RAISES READONLY RECORD REF REPEAT RETURN\\\n\tREVEAL ROOT SET THEN TO TRY TYPE TYPECASE UNSAFE UNTIL UNTRACED VALUE VAR\\\n\tWHILE WITH\n#\tReserved identifiers\nkeywords2.*.m3=ABS ADDRESS ADR ADRSIZE BITSIZE BOOLEAN BYTESIZE\\\n\tCARDINAL CEILING CHAR DEC DISPOSE EXTENDED FALSE FIRST FLOAT FLOOR INC\\\n\tINTEGER ISTYPE LAST LONGINT LONGREAL LOOPHOLE MAX MIN MUTEX NARROW NEW NIL\\\n\tNULL NUMBER ORD REAL REFANY ROUND SUBARRAY TEXT TRUE TRUNC TYPECODE VAL\\\n\tWIDECHAR\n#\tOperators\nkeywords3.*.m3= + < # = ; .. : - > { } | := <: * <= ( ) ^ , =>\\\n\t/ >= [ ] . &\n#\tPragmas keywords\nkeywords4.*.m3= EXTERNAL INLINE ASSERT TRACE FATAL UNUSED\\\n\tOBSOLETE NOWARN LINE PRAGMA\n#\tEscape sequences\nkeywords5.*.m3= f n r t \\ \" '\n#\tDoxygene keywords\nkeywords6.*.m3= author authors file brief date proc param result\n\nfold=1\n"
  },
  {
    "path": "lexilla/test/examples/mssql/AllStyles.tsql",
    "content": "-- Enumerate all styles: 0 to 16\n\n/* block comment = 1*/\n\n-- whitespace = 0\n    -- spaces\n\n-- line comment = 2\n\n-- number = 3\n376\n\n-- string = 4\n'a string'\n\n-- operator = 5\n()\nINTERSECT\n\n-- identifier = 6\nProductID;\n\n-- variable = 7\n@Variable;\n\n-- column name = 8\n\"COLUMN\";\n\n-- statement = 9\nPRINT\n\n-- datatype = 10\nint\n\n-- systable = 11\nsysobjects\n\n-- global variable = 12\n@@ERROR\n\n-- function = 13\nobject_id\n\n-- stored procedure = 14\nsp_fulltext_database\n\n-- default (preferencing data type) = 15\nx --\n\n-- column name 2 = 16\n[COLUMN];\n\n"
  },
  {
    "path": "lexilla/test/examples/mssql/AllStyles.tsql.folded",
    "content": " 0 400   0   -- Enumerate all styles: 0 to 16\n 1 400   0   \n 0 400   0   /* block comment = 1*/\n 1 400   0   \n 0 400   0   -- whitespace = 0\n 0 400   0       -- spaces\n 1 400   0   \n 0 400   0   -- line comment = 2\n 1 400   0   \n 0 400   0   -- number = 3\n 0 400   0   376\n 1 400   0   \n 0 400   0   -- string = 4\n 0 400   0   'a string'\n 1 400   0   \n 0 400   0   -- operator = 5\n 0 400   0   ()\n 0 400   0   INTERSECT\n 1 400   0   \n 0 400   0   -- identifier = 6\n 0 400   0   ProductID;\n 1 400   0   \n 0 400   0   -- variable = 7\n 0 400   0   @Variable;\n 1 400   0   \n 0 400   0   -- column name = 8\n 0 400   0   \"COLUMN\";\n 1 400   0   \n 0 400   0   -- statement = 9\n 0 400   0   PRINT\n 1 400   0   \n 0 400   0   -- datatype = 10\n 0 400   0   int\n 1 400   0   \n 0 400   0   -- systable = 11\n 0 400   0   sysobjects\n 1 400   0   \n 0 400   0   -- global variable = 12\n 0 400   0   @@ERROR\n 1 400   0   \n 0 400   0   -- function = 13\n 0 400   0   object_id\n 1 400   0   \n 0 400   0   -- stored procedure = 14\n 0 400   0   sp_fulltext_database\n 1 400   0   \n 0 400   0   -- default (preferencing data type) = 15\n 0 400   0   x --\n 1 400   0   \n 0 400   0   -- column name 2 = 16\n 0 400   0   [COLUMN];\n 1 400   0   \n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/mssql/AllStyles.tsql.styled",
    "content": "{2}-- Enumerate all styles: 0 to 16{0}\n\n{1}/* block comment = 1*/{0}\n\n{2}-- whitespace = 0{0}\n    {2}-- spaces{0}\n\n{2}-- line comment = 2{0}\n\n{2}-- number = 3{0}\n{3}376{0}\n\n{2}-- string = 4{0}\n{4}'a string'{0}\n\n{2}-- operator = 5{0}\n{5}(){0}\n{5}INTERSECT{0}\n\n{2}-- identifier = 6{0}\n{6}ProductID{5};{0}\n\n{2}-- variable = 7{0}\n{7}@Variable{5};{0}\n\n{2}-- column name = 8{0}\n{8}\"COLUMN\"{5};{0}\n\n{2}-- statement = 9{0}\n{9}PRINT{0}\n\n{2}-- datatype = 10{0}\n{10}int{0}\n\n{2}-- systable = 11{0}\n{11}sysobjects{0}\n\n{2}-- global variable = 12{0}\n{12}@@ERROR{0}\n\n{2}-- function = 13{0}\n{13}object_id{0}\n\n{2}-- stored procedure = 14{0}\n{14}sp_fulltext_database{0}\n\n{2}-- default (preferencing data type) = 15{0}\n{6}x{15} {2}--{0}\n\n{2}-- column name 2 = 16{0}\n{16}[COLUMN]{5};{0}\n\n"
  },
  {
    "path": "lexilla/test/examples/mssql/Issue87.tsql",
    "content": "/**\n /*\n  GitHub Issue 87\n  /*\n    /****** Object:  Table [dbo].[Issue87]    Script Date: 04/06/2022 8:07:57 PM ******/\n   */\n  */\n */\n"
  },
  {
    "path": "lexilla/test/examples/mssql/Issue87.tsql.folded",
    "content": " 2 400   0 + /**\n 0 401   0 |  /*\n 0 401   0 |   GitHub Issue 87\n 0 401   0 |   /*\n 0 401   0 |     /****** Object:  Table [dbo].[Issue87]    Script Date: 04/06/2022 8:07:57 PM ******/\n 0 401   0 |    */\n 0 401   0 |   */\n 0 401   0 |  */\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/mssql/Issue87.tsql.styled",
    "content": "{1}/**\n /*\n  GitHub Issue 87\n  /*\n    /****** Object:  Table [dbo].[Issue87]    Script Date: 04/06/2022 8:07:57 PM ******/\n   */\n  */\n */{0}\n"
  },
  {
    "path": "lexilla/test/examples/mssql/Issue90.tsql",
    "content": "CREATE TABLE TestTable (\n    col\n    CHAR(3)\n);\n"
  },
  {
    "path": "lexilla/test/examples/mssql/Issue90.tsql.folded",
    "content": " 0 400   0   CREATE TABLE TestTable (\n 0 400   0       col\n 0 400   0       CHAR(3)\n 0 400   0   );\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/mssql/Issue90.tsql.styled",
    "content": "{9}CREATE{0} {9}TABLE{0} {6}TestTable{15} {5}({0}\n    {6}col{15}\n    {10}CHAR{5}({3}3{5}){0}\n{5});{0}\n"
  },
  {
    "path": "lexilla/test/examples/mssql/SciTE.properties",
    "content": "lexer.*.tsql=mssql\nfold=1\nfold.comment=1\n\n# statement\nkeywords.*.tsql=and as begin by create declare distinct drop else end exists from go if in insert into is inner \\\njoin like not null on order print procedure return select set table use values where while\n\n# data type\nkeywords2.*.tsql=char int\n\n# System table\nkeywords3.*.tsql=sysobjects\n\n# global variables\nkeywords4.*.tsql=error\n\n# functions\nkeywords5.*.tsql=ascii char object_id\n\n# System stored procedures\nkeywords6.*.tsql=sp_fulltext_database\n\n# operators\nkeywords7.*.tsql=intersect\n"
  },
  {
    "path": "lexilla/test/examples/mssql/Various.tsql",
    "content": "/* This file contains snippets of Transact-SQL that exercise various aspects of the language. */\n/**\n /*\n  AllStyles.tsql\n  /*\n    /****** Object:  Database [AllStyles]    Script Date: 06/16/2022 10:56:35 PM ******/\n   */\n  */\n */\nIF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))\nBEGIN\n    EXEC sp_fulltext_database @action = 'enable';\nEND\nUSE AllStyles;\nGO\nSELECT *\nFROM Production.Product\nORDER BY Name ASC;\n-- Alternate way.\nUSE AllStyles;\nGO\nSELECT p.*\nFROM Production.Product AS p\nORDER BY Name ASC;\nGO\n\nSELECT \"COLUMN\" FROM \"TABLE\"\nSELECT \"COLUMN\" int FROM \"TABLE\"\n\nSELECT schema_name\n    (tab.schema_id) AS schema_name\n    -- retrieve the name, too\n    ,tab.name\nFROM sys.tables AS tab;\n\nSELECT DISTINCT Name\nFROM Production.Product AS p\nWHERE EXISTS\n    (SELECT *\n     FROM Production.ProductModel AS pm\n     WHERE p.ProductModelID = pm.ProductModelID\n           AND pm.Name LIKE 'Long-Sleeve Logo Jersey%');\n\nSELECT DISTINCT p.LastName, p.FirstName\nFROM Person.Person AS p\nJOIN HumanResources.Employee AS e\n    ON e.BusinessEntityID = p.BusinessEntityID WHERE 5000.00 IN\n    (SELECT Bonus\n     FROM Sales.SalesPerson AS sp\n     WHERE e.BusinessEntityID = sp.BusinessEntityID);\n\nCREATE PROCEDURE findjobs @nm sysname = NULL\nAS\nIF @nm IS NULL\n    BEGIN\n        PRINT 'You must give a user name'\n        RETURN\n    END\nELSE\n    BEGIN\n        SELECT o.name, o.id, o.uid\n        FROM sysobjects o INNER JOIN master.syslogins l\n            ON o.uid = l.sid\n        WHERE l.name = @nm\n    END;\n\nCREATE TABLE TestTable (cola INT, colb CHAR(3));\n-- Declare the variable to be used.\nDECLARE @MyCounter INT;\n\n-- Initialize the variable.\nSET @MyCounter = 0;\nWHILE (@MyCounter < 26)\nBEGIN;\n   -- Insert a row into the table.\n   INSERT INTO TestTable VALUES\n       -- Use the variable to provide the integer value\n       -- for cola. Also use it to generate a unique letter\n       -- for each row. Use the ASCII function to get the\n       -- integer value of 'a'. Add @MyCounter. Use CHAR to\n       -- convert the sum back to the character @MyCounter\n       -- characters after 'a'.\n       (@MyCounter,\n        CHAR( ( @MyCounter + ASCII('a') ) )\n       );\n   -- Increment the variable to count this iteration\n   -- of the loop.\n   SET @MyCounter = @MyCounter + 1;\nEND;\n\nIF @@ERROR = 547\n    BEGIN\n    PRINT N'A check constraint violation occurred.';\n    END\nGO\n\nUSE [AllStyles].[dbo].[test]\nGO\n\nSELECT ProductID\nFROM Production.Product\nINTERSECT\nSELECT ProductID\nFROM Production.WorkOrder ;\n"
  },
  {
    "path": "lexilla/test/examples/mssql/Various.tsql.folded",
    "content": " 0 400   0   /* This file contains snippets of Transact-SQL that exercise various aspects of the language. */\n 2 400   0 + /**\n 0 401   0 |  /*\n 0 401   0 |   AllStyles.tsql\n 0 401   0 |   /*\n 0 401   0 |     /****** Object:  Database [AllStyles]    Script Date: 06/16/2022 10:56:35 PM ******/\n 0 401   0 |    */\n 0 401   0 |   */\n 0 401   0 |  */\n 0 400   0   IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))\n 2 400   0 + BEGIN\n 0 401   0 |     EXEC sp_fulltext_database @action = 'enable';\n 0 401   0 | END\n 0 400   0   USE AllStyles;\n 0 400   0   GO\n 0 400   0   SELECT *\n 0 400   0   FROM Production.Product\n 0 400   0   ORDER BY Name ASC;\n 0 400   0   -- Alternate way.\n 0 400   0   USE AllStyles;\n 0 400   0   GO\n 0 400   0   SELECT p.*\n 0 400   0   FROM Production.Product AS p\n 0 400   0   ORDER BY Name ASC;\n 0 400   0   GO\n 1 400   0   \n 0 400   0   SELECT \"COLUMN\" FROM \"TABLE\"\n 0 400   0   SELECT \"COLUMN\" int FROM \"TABLE\"\n 1 400   0   \n 0 400   0   SELECT schema_name\n 0 400   0       (tab.schema_id) AS schema_name\n 0 400   0       -- retrieve the name, too\n 0 400   0       ,tab.name\n 0 400   0   FROM sys.tables AS tab;\n 1 400   0   \n 0 400   0   SELECT DISTINCT Name\n 0 400   0   FROM Production.Product AS p\n 0 400   0   WHERE EXISTS\n 0 400   0       (SELECT *\n 0 400   0        FROM Production.ProductModel AS pm\n 0 400   0        WHERE p.ProductModelID = pm.ProductModelID\n 0 400   0              AND pm.Name LIKE 'Long-Sleeve Logo Jersey%');\n 1 400   0   \n 0 400   0   SELECT DISTINCT p.LastName, p.FirstName\n 0 400   0   FROM Person.Person AS p\n 0 400   0   JOIN HumanResources.Employee AS e\n 0 400   0       ON e.BusinessEntityID = p.BusinessEntityID WHERE 5000.00 IN\n 0 400   0       (SELECT Bonus\n 0 400   0        FROM Sales.SalesPerson AS sp\n 0 400   0        WHERE e.BusinessEntityID = sp.BusinessEntityID);\n 1 400   0   \n 0 400   0   CREATE PROCEDURE findjobs @nm sysname = NULL\n 0 400   0   AS\n 0 400   0   IF @nm IS NULL\n 2 400   0 +     BEGIN\n 0 401   0 |         PRINT 'You must give a user name'\n 0 401   0 |         RETURN\n 0 401   0 |     END\n 0 400   0   ELSE\n 2 400   0 +     BEGIN\n 0 401   0 |         SELECT o.name, o.id, o.uid\n 0 401   0 |         FROM sysobjects o INNER JOIN master.syslogins l\n 0 401   0 |             ON o.uid = l.sid\n 0 401   0 |         WHERE l.name = @nm\n 0 401   0 |     END;\n 1 400   0   \n 0 400   0   CREATE TABLE TestTable (cola INT, colb CHAR(3));\n 0 400   0   -- Declare the variable to be used.\n 0 400   0   DECLARE @MyCounter INT;\n 1 400   0   \n 0 400   0   -- Initialize the variable.\n 0 400   0   SET @MyCounter = 0;\n 0 400   0   WHILE (@MyCounter < 26)\n 2 400   0 + BEGIN;\n 0 401   0 |    -- Insert a row into the table.\n 0 401   0 |    INSERT INTO TestTable VALUES\n 0 401   0 |        -- Use the variable to provide the integer value\n 0 401   0 |        -- for cola. Also use it to generate a unique letter\n 0 401   0 |        -- for each row. Use the ASCII function to get the\n 0 401   0 |        -- integer value of 'a'. Add @MyCounter. Use CHAR to\n 0 401   0 |        -- convert the sum back to the character @MyCounter\n 0 401   0 |        -- characters after 'a'.\n 0 401   0 |        (@MyCounter,\n 0 401   0 |         CHAR( ( @MyCounter + ASCII('a') ) )\n 0 401   0 |        );\n 0 401   0 |    -- Increment the variable to count this iteration\n 0 401   0 |    -- of the loop.\n 0 401   0 |    SET @MyCounter = @MyCounter + 1;\n 0 401   0 | END;\n 1 400   0   \n 0 400   0   IF @@ERROR = 547\n 2 400   0 +     BEGIN\n 0 401   0 |     PRINT N'A check constraint violation occurred.';\n 0 401   0 |     END\n 0 400   0   GO\n 1 400   0   \n 0 400   0   USE [AllStyles].[dbo].[test]\n 0 400   0   GO\n 1 400   0   \n 0 400   0   SELECT ProductID\n 0 400   0   FROM Production.Product\n 0 400   0   INTERSECT\n 0 400   0   SELECT ProductID\n 0 400   0   FROM Production.WorkOrder ;\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/mssql/Various.tsql.styled",
    "content": "{1}/* This file contains snippets of Transact-SQL that exercise various aspects of the language. */{0}\n{1}/**\n /*\n  AllStyles.tsql\n  /*\n    /****** Object:  Database [AllStyles]    Script Date: 06/16/2022 10:56:35 PM ******/\n   */\n  */\n */{0}\n{9}IF{0} {5}({3}1{0} {5}={0} {6}FULLTEXTSERVICEPROPERTY{5}({4}'IsFullTextInstalled'{5})){0}\n{9}BEGIN{0}\n    {6}EXEC{15} {14}sp_fulltext_database{0} {7}@action{15} {5}={0} {4}'enable'{5};{0}\n{9}END{0}\n{9}USE{0} {6}AllStyles{5};{0}\n{9}GO{0}\n{9}SELECT{0} {5}*{0}\n{9}FROM{0} {6}Production.Product{15}\n{9}ORDER{0} {9}BY{0} {6}Name{15} {6}ASC{5};{0}\n{2}-- Alternate way.{0}\n{9}USE{0} {6}AllStyles{5};{0}\n{9}GO{0}\n{9}SELECT{0} {6}p.{5}*{0}\n{9}FROM{0} {6}Production.Product{15} {9}AS{0} {6}p{15}\n{9}ORDER{0} {9}BY{0} {6}Name{15} {6}ASC{5};{0}\n{9}GO{0}\n\n{9}SELECT{0} {8}\"COLUMN\"{15} {9}FROM{0} {8}\"TABLE\"{15}\n{9}SELECT{0} {8}\"COLUMN\"{15} {10}int{0} {9}FROM{0} {8}\"TABLE\"{15}\n\n{9}SELECT{0} {6}schema_name{15}\n    {5}({6}tab.schema_id{5}){0} {9}AS{0} {6}schema_name{15}\n    {2}-- retrieve the name, too{0}\n    {5},{6}tab.name{15}\n{9}FROM{0} {6}sys.tables{15} {9}AS{0} {6}tab{5};{0}\n\n{9}SELECT{0} {9}DISTINCT{0} {6}Name{15}\n{9}FROM{0} {6}Production.Product{15} {9}AS{0} {6}p{15}\n{9}WHERE{0} {9}EXISTS{0}\n    {5}({9}SELECT{0} {5}*{0}\n     {9}FROM{0} {6}Production.ProductModel{15} {9}AS{0} {6}pm{15}\n     {9}WHERE{0} {6}p.ProductModelID{15} {5}={0} {6}pm.ProductModelID{15}\n           {9}AND{0} {6}pm.Name{15} {9}LIKE{0} {4}'Long-Sleeve Logo Jersey%'{5});{0}\n\n{9}SELECT{0} {9}DISTINCT{0} {6}p.LastName{5},{0} {6}p.FirstName{15}\n{9}FROM{0} {6}Person.Person{15} {9}AS{0} {6}p{15}\n{9}JOIN{0} {6}HumanResources.Employee{15} {9}AS{0} {6}e{15}\n    {9}ON{0} {6}e.BusinessEntityID{15} {5}={0} {6}p.BusinessEntityID{15} {9}WHERE{0} {3}5000.00{0} {9}IN{0}\n    {5}({9}SELECT{0} {6}Bonus{15}\n     {9}FROM{0} {6}Sales.SalesPerson{15} {9}AS{0} {6}sp{15}\n     {9}WHERE{0} {6}e.BusinessEntityID{15} {5}={0} {6}sp.BusinessEntityID{5});{0}\n\n{9}CREATE{0} {9}PROCEDURE{0} {6}findjobs{0} {7}@nm{15} {6}sysname{15} {5}={0} {9}NULL{0}\n{9}AS{0}\n{9}IF{0} {7}@nm{15} {9}IS{0} {9}NULL{0}\n    {9}BEGIN{0}\n        {9}PRINT{0} {4}'You must give a user name'{0}\n        {9}RETURN{0}\n    {9}END{0}\n{9}ELSE{0}\n    {9}BEGIN{0}\n        {9}SELECT{0} {6}o.name{5},{0} {6}o.id{5},{0} {6}o.uid{15}\n        {9}FROM{0} {11}sysobjects{0} {6}o{15} {9}INNER{0} {9}JOIN{0} {6}master.syslogins{15} {6}l{15}\n            {9}ON{0} {6}o.uid{15} {5}={0} {6}l.sid{15}\n        {9}WHERE{0} {6}l.name{15} {5}={0} {7}@nm{15}\n    {9}END{5};{0}\n\n{9}CREATE{0} {9}TABLE{0} {6}TestTable{15} {5}({6}cola{15} {10}INT{5},{0} {6}colb{15} {10}CHAR{5}({3}3{5}));{0}\n{2}-- Declare the variable to be used.{0}\n{9}DECLARE{0} {7}@MyCounter{15} {10}INT{5};{0}\n\n{2}-- Initialize the variable.{0}\n{9}SET{0} {7}@MyCounter{15} {5}={0} {3}0{5};{0}\n{9}WHILE{0} {5}({7}@MyCounter{15} {5}<{0} {3}26{5}){0}\n{9}BEGIN{5};{0}\n   {2}-- Insert a row into the table.{0}\n   {9}INSERT{0} {9}INTO{0} {6}TestTable{15} {9}VALUES{0}\n       {2}-- Use the variable to provide the integer value{0}\n       {2}-- for cola. Also use it to generate a unique letter{0}\n       {2}-- for each row. Use the ASCII function to get the{0}\n       {2}-- integer value of 'a'. Add @MyCounter. Use CHAR to{0}\n       {2}-- convert the sum back to the character @MyCounter{0}\n       {2}-- characters after 'a'.{0}\n       {5}({7}@MyCounter{5},{0}\n        {13}CHAR{5}({0} {5}({0} {7}@MyCounter{15} {5}+{0} {13}ASCII{5}({4}'a'{5}){0} {5}){0} {5}){0}\n       {5});{0}\n   {2}-- Increment the variable to count this iteration{0}\n   {2}-- of the loop.{0}\n   {9}SET{0} {7}@MyCounter{15} {5}={0} {7}@MyCounter{15} {5}+{0} {3}1{5};{0}\n{9}END{5};{0}\n\n{9}IF{0} {12}@@ERROR{0} {5}={0} {3}547{0}\n    {9}BEGIN{0}\n    {9}PRINT{0} {6}N{4}'A check constraint violation occurred.'{5};{0}\n    {9}END{0}\n{9}GO{0}\n\n{9}USE{0} {16}[AllStyles]{5}.{16}[dbo]{5}.{16}[test]{15}\n{9}GO{0}\n\n{9}SELECT{0} {6}ProductID{15}\n{9}FROM{0} {6}Production.Product{15}\n{5}INTERSECT{0}\n{9}SELECT{0} {6}ProductID{15}\n{9}FROM{0} {6}Production.WorkOrder{15} {5};{0}\n"
  },
  {
    "path": "lexilla/test/examples/mysql/AllStyles.sql",
    "content": "-- Enumerate all styles: 0 to 22, except for 3 (variable) and 11 (string) which are not implemented\n-- Hidden commands with other states (ored with ox40) are also possible inside /*! ... */\n\n/* commentline=2 */\n# comment\n\n# default=0\n\t# w\n\n# comment=1\n/* comment */\n\n# variable=3 is not implemented\n@variable\n\n# systemvariable=4\n@@systemvariable\n\n# knownsystemvariable=5\n@@known\n\n# number=6\n6\n\n# majorkeyword=7\nselect\n\n# keyword=8\nin\n\n# databaseobject=9\nobject\n\n# procedurekeyword=10\nprocedure\n\n# string=11 is not implemented\n\n# sqstring=12\n'string'\n\n# dqstring=13\n\"string\"\n\n# operator=14\n+\n\n# function=15\nfunction()\n\n# identifier=16\nidentifier\n\n# quotedidentifier=17\n`quoted`\n\n# user1=18\nuser1\n\n# user2=19\nuser2\n\n# user3=20\nuser3\n\n# hiddencommand=21\n/*!*/\n\n# placeholder=22\n<{placeholder>}\n"
  },
  {
    "path": "lexilla/test/examples/mysql/AllStyles.sql.folded",
    "content": " 0 400 400   -- Enumerate all styles: 0 to 22, except for 3 (variable) and 11 (string) which are not implemented\n 0 400 400   -- Hidden commands with other states (ored with ox40) are also possible inside /*! ... */\n 1 400 400   \n 0 400 400   /* commentline=2 */\n 0 400 400   # comment\n 1 400 400   \n 0 400 400   # default=0\n 0 400 400   \t# w\n 1 400 400   \n 0 400 400   # comment=1\n 0 400 400   /* comment */\n 1 400 400   \n 0 400 400   # variable=3 is not implemented\n 0 400 400   @variable\n 1 400 400   \n 0 400 400   # systemvariable=4\n 0 400 400   @@systemvariable\n 1 400 400   \n 0 400 400   # knownsystemvariable=5\n 0 400 400   @@known\n 1 400 400   \n 0 400 400   # number=6\n 0 400 400   6\n 1 400 400   \n 0 400 400   # majorkeyword=7\n 0 400 400   select\n 1 400 400   \n 0 400 400   # keyword=8\n 0 400 400   in\n 1 400 400   \n 0 400 400   # databaseobject=9\n 0 400 400   object\n 1 400 400   \n 0 400 400   # procedurekeyword=10\n 0 400 400   procedure\n 1 400 400   \n 0 400 400   # string=11 is not implemented\n 1 400 400   \n 0 400 400   # sqstring=12\n 0 400 400   'string'\n 1 400 400   \n 0 400 400   # dqstring=13\n 0 400 400   \"string\"\n 1 400 400   \n 0 400 400   # operator=14\n 0 400 400   +\n 1 400 400   \n 0 400 400   # function=15\n 0 400 400   function()\n 1 400 400   \n 0 400 400   # identifier=16\n 0 400 400   identifier\n 1 400 400   \n 0 400 400   # quotedidentifier=17\n 0 400 400   `quoted`\n 1 400 400   \n 0 400 400   # user1=18\n 0 400 400   user1\n 1 400 400   \n 0 400 400   # user2=19\n 0 400 400   user2\n 1 400 400   \n 0 400 400   # user3=20\n 0 400 400   user3\n 1 400 400   \n 0 400 400   # hiddencommand=21\n 0 400 400   /*!*/\n 1 400 400   \n 0 400 400   # placeholder=22\n 0 400 400   <{placeholder>}\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/mysql/AllStyles.sql.styled",
    "content": "{2}-- Enumerate all styles: 0 to 22, except for 3 (variable) and 11 (string) which are not implemented\n-- Hidden commands with other states (ored with ox40) are also possible inside /*! ... */\n{0}\n{1}/* commentline=2 */{0}\n{2}# comment\n{0}\n{2}# default=0\n{0}\t{2}# w\n{0}\n{2}# comment=1\n{1}/* comment */{0}\n\n{2}# variable=3 is not implemented\n{14}@{16}variable{0}\n\n{2}# systemvariable=4\n{4}@@systemvariable{0}\n\n{2}# knownsystemvariable=5\n{5}@@known{0}\n\n{2}# number=6\n{6}6{0}\n\n{2}# majorkeyword=7\n{7}select{0}\n\n{2}# keyword=8\n{8}in{0}\n\n{2}# databaseobject=9\n{9}object{0}\n\n{2}# procedurekeyword=10\n{10}procedure{0}\n\n{2}# string=11 is not implemented\n{0}\n{2}# sqstring=12\n{12}'string'{0}\n\n{2}# dqstring=13\n{13}\"string\"{0}\n\n{2}# operator=14\n{14}+{0}\n\n{2}# function=15\n{15}function{14}(){0}\n\n{2}# identifier=16\n{16}identifier{0}\n\n{2}# quotedidentifier=17\n{17}`quoted`{0}\n\n{2}# user1=18\n{18}user1{0}\n\n{2}# user2=19\n{19}user2{0}\n\n{2}# user3=20\n{20}user3{0}\n\n{2}# hiddencommand=21\n{21}/*!*/{0}\n\n{2}# placeholder=22\n{22}<{placeholder>}\n"
  },
  {
    "path": "lexilla/test/examples/mysql/SciTE.properties",
    "content": "lexer.*.sql=mysql\n\nkeywords.*.sql=select\nkeywords2.*.sql=in\nkeywords3.*.sql=object\nkeywords4.*.sql=function\nkeywords5.*.sql=known\nkeywords6.*.sql=procedure\nkeywords7.*.sql=user1\nkeywords8.*.sql=user2\nkeywords9.*.sql=user3\n\nlexer.sql.backticks.identifier=1\nlexer.sql.numbersign.comment=1\nlexer.sql.allow.dotted.word=1\n\nfold=1\nfold.compact=1\n"
  },
  {
    "path": "lexilla/test/examples/nim/SciTE.properties",
    "content": "lexer.*.nim=nim\nkeywords.*.nim=else end if let proc\n"
  },
  {
    "path": "lexilla/test/examples/nim/x.nim",
    "content": "# Tests for Nim\nlet s = \"foobar\"\n\n# Feature #1260\n{.ident.}\nstdin.readLine.split.map(parseInt).max.`$`.echo(\" is the maximum!\")\n\n# Feature #1261\n# IsFuncName(\"proc\") so style ticks as SCE_NIM_FUNCNAME:\nproc `$` (x: myDataType): string = ...\n# Style ticks as SCE_NIM_BACKTICKS:\nif `==`( `+`(3,4),7): echo \"True\"\n\n# Feature #1262\n# Standard raw string identifier:\nlet standardDoubleLitRawStr = R\"A raw string\\\"\nlet standardTripleLitRawStr = R\"\"\"A triple-double raw string\\\"\"\"\"\n# Style of 'customIdent' is determined by lexer.nim.raw.strings.highlight.ident. 16 if false, 6 or 10 if true\nlet customDoubleLitRawStr = customIdent\"A string\\\"\nlet customTripleLitRawStr = customIdent\"\"\"A triple-double raw string\\\"\"\"\"\n\n# Feature #1268\n10_000\n10__000\n10_\n1....5\n1.ident\n1._ident\n"
  },
  {
    "path": "lexilla/test/examples/nim/x.nim.folded",
    "content": " 1   0   0   # Tests for Nim\n 0 400   0   let s = \"foobar\"\n 1 400   0   \n 1 400   0   # Feature #1260\n 0 400   0   {.ident.}\n 0 400   0   stdin.readLine.split.map(parseInt).max.`$`.echo(\" is the maximum!\")\n 1 400   0   \n 1 400   0   # Feature #1261\n 1 400   0   # IsFuncName(\"proc\") so style ticks as SCE_NIM_FUNCNAME:\n 0 400   0   proc `$` (x: myDataType): string = ...\n 1 400   0   # Style ticks as SCE_NIM_BACKTICKS:\n 0 400   0   if `==`( `+`(3,4),7): echo \"True\"\n 1 400   0   \n 1 400   0   # Feature #1262\n 1 400   0   # Standard raw string identifier:\n 0 400   0   let standardDoubleLitRawStr = R\"A raw string\\\"\n 0 400   0   let standardTripleLitRawStr = R\"\"\"A triple-double raw string\\\"\"\"\"\n 1 400   0   # Style of 'customIdent' is determined by lexer.nim.raw.strings.highlight.ident. 16 if false, 6 or 10 if true\n 0 400   0   let customDoubleLitRawStr = customIdent\"A string\\\"\n 0 400   0   let customTripleLitRawStr = customIdent\"\"\"A triple-double raw string\\\"\"\"\"\n 1 400   0   \n 1 400   0   # Feature #1268\n 0 400   0   10_000\n 0 400   0   10__000\n 0 400   0   10_\n 0 400   0   1....5\n 0 400   0   1.ident\n 0 400   0   1._ident\n 1 400   0   "
  },
  {
    "path": "lexilla/test/examples/nim/x.nim.styled",
    "content": "{3}# Tests for Nim\n{8}let{0} {16}s{0} {15}={0} {6}\"foobar\"{0}\n\n{3}# Feature #1260\n{15}{.{16}ident{15}.}{0}\n{16}stdin{15}.{16}readLine{15}.{16}split{15}.{16}map{15}({16}parseInt{15}).{16}max{15}.{11}`$`{15}.{16}echo{15}({6}\" is the maximum!\"{15}){0}\n\n{3}# Feature #1261\n# IsFuncName(\"proc\") so style ticks as SCE_NIM_FUNCNAME:\n{8}proc{0} {12}`$`{0} {15}({16}x{15}:{0} {16}myDataType{15}):{0} {16}string{0} {15}={0} {15}...{0}\n{3}# Style ticks as SCE_NIM_BACKTICKS:\n{8}if{0} {11}`==`{15}({0} {11}`+`{15}({5}3{15},{5}4{15}),{5}7{15}):{0} {16}echo{0} {6}\"True\"{0}\n\n{3}# Feature #1262\n# Standard raw string identifier:\n{8}let{0} {16}standardDoubleLitRawStr{0} {15}={0} {6}R\"A raw string\\\"{0}\n{8}let{0} {16}standardTripleLitRawStr{0} {15}={0} {10}R\"\"\"A triple-double raw string\\\"\"\"\"{0}\n{3}# Style of 'customIdent' is determined by lexer.nim.raw.strings.highlight.ident. 16 if false, 6 or 10 if true\n{8}let{0} {16}customDoubleLitRawStr{0} {15}={0} {16}customIdent{6}\"A string\\\"{0}\n{8}let{0} {16}customTripleLitRawStr{0} {15}={0} {16}customIdent{10}\"\"\"A triple-double raw string\\\"\"\"\"{0}\n\n{3}# Feature #1268\n{5}10_000{0}\n{5}10{16}__000{0}\n{5}10{16}_{0}\n{5}1{15}....{5}5{0}\n{5}1{15}.{16}ident{0}\n{5}1{15}.{16}_ident{0}\n"
  },
  {
    "path": "lexilla/test/examples/perl/SciTE.properties",
    "content": "lexer.*.pl=perl\nkeywords.*.pl=\\\nNULL __FILE__ __LINE__ __PACKAGE__ __DATA__ __END__ AUTOLOAD \\\nBEGIN CORE DESTROY END EQ GE GT INIT LE LT NE CHECK abs accept \\\nalarm and atan2 bind binmode bless caller chdir chmod chomp chop \\\nchown chr chroot close closedir cmp connect continue cos crypt \\\ndbmclose dbmopen defined delete die do dump each else elsif endgrent \\\nendhostent endnetent endprotoent endpwent endservent eof eq eval \\\nexec exists exit exp fcntl fileno flock for foreach fork format \\\nformline ge getc getgrent getgrgid getgrnam gethostbyaddr gethostbyname \\\ngethostent getlogin getnetbyaddr getnetbyname getnetent getpeername \\\ngetpgrp getppid getpriority getprotobyname getprotobynumber getprotoent \\\ngetpwent getpwnam getpwuid getservbyname getservbyport getservent \\\ngetsockname getsockopt glob gmtime goto grep gt hex if index \\\nint ioctl join keys kill last lc lcfirst le length link listen \\\nlocal localtime lock log lstat lt map mkdir msgctl msgget msgrcv \\\nmsgsnd my ne next no not oct open opendir or ord our pack package \\\npipe pop pos print printf prototype push quotemeta qu \\\nrand read readdir readline readlink readpipe recv redo \\\nref rename require reset return reverse rewinddir rindex rmdir \\\nscalar seek seekdir select semctl semget semop send setgrent \\\nsethostent setnetent setpgrp setpriority setprotoent setpwent \\\nsetservent setsockopt shift shmctl shmget shmread shmwrite shutdown \\\nsin sleep socket socketpair sort splice split sprintf sqrt srand \\\nstat study sub substr symlink syscall sysopen sysread sysseek \\\nsystem syswrite tell telldir tie tied time times truncate \\\nuc ucfirst umask undef unless unlink unpack unshift untie until \\\nuse utime values vec wait waitpid wantarray warn while write \\\nxor \\\ngiven when default break say state UNITCHECK __SUB__ fc\n\nfold=1\nfold.comment=1"
  },
  {
    "path": "lexilla/test/examples/perl/perl-test-5220delta.pl",
    "content": "# -*- coding: utf-8 -*-\n#--------------------------------------------------------------------------\n# perl-test-5220delta.pl\n#--------------------------------------------------------------------------\n# REF: https://metacpan.org/pod/distribution/perl/pod/perldelta.pod\n# maybe future ref: https://metacpan.org/pod/distribution/perl/pod/perl5220delta.pod\n# also: http://perltricks.com/article/165/2015/4/10/A-preview-of-Perl-5-22\n#\n#--------------------------------------------------------------------------\n# Kein-Hong Man <keinhong@gmail.com> Public Domain 20151217\n#--------------------------------------------------------------------------\n# 20151217\tinitial document\n# 20151218\tupdated tests and comments\n#--------------------------------------------------------------------------\n\nuse v5.22;\t\t\t# may be needed\n\n#--------------------------------------------------------------------------\n# New bitwise operators\n#--------------------------------------------------------------------------\n\nuse feature 'bitwise'\t\t# enable feature, warning enabled\nuse experimental \"bitwise\";\t# enable feature, warning disabled\n\n# numerical operands\n10&20  10|20   10^20 ~10\n$a&\"8\" $a|\"8\" $a^\"8\" ~$a ~\"8\"\n\n# string operands\n'0'&.\"8\" '0'|.\"8\" '0'^.\"8\" ~.'0' ~.\"8\"\n# the following is AMBIGUOUS, perl sees 10 and not .10 only when bitwise feature is enabled\n# so it's feature-setting-dependent, no plans to change current behaviour\n $a&.10   $a|.10   $a^.10  ~.$a  ~.10\n\n# assignment variants\n$a&=10;    $a|=10;    $a^=10;\n$b&.='20'; $b|.='20'; $b^.='20';\n$c&=\"30\";  $c|=\"30\";  $c^=\"30\";\n$d&.=$e;   $d|.=$e;   $d^.=$e;\n\n#--------------------------------------------------------------------------\n# New double-diamond operator\n#--------------------------------------------------------------------------\n# <<>> is like <> but each element of @ARGV will be treated as an actual file name\n\n# example snippet from brian d foy's blog post\nwhile( <<>> ) {  # new, safe line input operator\n\t...;\n\t}\n\n#--------------------------------------------------------------------------\n# New \\b boundaries in regular expressions\n#--------------------------------------------------------------------------\n\nqr/\\b{gcb}/\nqr/\\b{wb}/\nqr/\\b{sb}/\n\n#--------------------------------------------------------------------------\n# Non-Capturing Regular Expression Flag\n#--------------------------------------------------------------------------\n# disables capturing and filling in $1, $2, etc\n\n\"hello\" =~ /(hi|hello)/n; # $1 is not set\n\n#--------------------------------------------------------------------------\n# Aliasing via reference\n#--------------------------------------------------------------------------\n# Variables and subroutines can now be aliased by assigning to a reference\n\n\\$c = \\$d;\n\\&x = \\&y;\n\n# Aliasing can also be applied to foreach iterator variables\n\nforeach \\%hash (@array_of_hash_refs) { ... }\n\n# example snippet from brian d foy's blog post\n\nuse feature qw(refaliasing);\n\n\\%other_hash = \\%hash;\n\nuse v5.22;\nuse feature qw(refaliasing);\n\nforeach \\my %hash ( @array_of_hashes ) { # named hash control variable\n\tforeach my $key ( keys %hash ) { # named hash now!\n\t\t...;\n\t\t}\n\t}\n\n#--------------------------------------------------------------------------\n# New :const subroutine attribute\n#--------------------------------------------------------------------------\n\nmy $x = 54321;\n*INLINED = sub : const { $x };\n$x++;\n\n# more examples of attributes\n# (not 5.22 stuff, but some general examples for study, useful for\n#  handling subroutine signature and subroutine prototype highlighting)\n\nsub foo : lvalue ;\n\npackage X;\nsub Y::x : lvalue { 1 }\n\npackage X;\nsub foo { 1 }\npackage Y;\nBEGIN { *bar = \\&X::foo; }\npackage Z;\nsub Y::bar : lvalue ;\n\n# built-in attributes for subroutines:\nlvalue method prototype(..) locked const\n\n#--------------------------------------------------------------------------\n# Repetition in list assignment\n#--------------------------------------------------------------------------\n\n# example snippet from brian d foy's blog post\nuse v5.22;\nmy(undef, $card_num, (undef)x3, $count) = split /:/;\n\n(undef,undef,$foo) = that_function()\n# is equivalent to \n((undef)x2, $foo) = that_function()\n\n#--------------------------------------------------------------------------\n# Floating point parsing has been improved\n#--------------------------------------------------------------------------\n# Hexadecimal floating point literals\n\n# some hex floats from a program by Rick Regan\n# appropriated and extended from Lua 5.2.x test cases\n# tested on perl 5.22/cygwin\n\n0x1p-1074;\n0x3.3333333333334p-5;\n0xcc.ccccccccccdp-11;\n0x1p+1;\n0x1p-6;\n0x1.b7p-1;\n0x1.fffffffffffffp+1023;\n0x1p-1022;\n0X1.921FB4D12D84AP+1;\n0x1.999999999999ap-4;\n\n# additional test cases for characterization\n0x1p-1074.\t\t# dot is a string operator\n0x.ABCDEFp10\t\t# legal, dot immediately after 0x\n0x.p10\t\t\t# perl allows 0x as a zero, then concat with p10 bareword\n0x.p 0x0.p\t\t# dot then bareword\n0x_0_.A_BC___DEF_p1_0\t# legal hex float, underscores are mostly allowed\n0x0._ABCDEFp10\t\t# _ABCDEFp10 is a bareword, no underscore allowed after dot\n\n# illegal, but does not use error highlighting\n0x0p1ABC\t\t# illegal, highlighted as 0x0p1 abut with bareword ABC \n\n# allowed to FAIL for now\n0x0.ABCDEFp_10\t\t# ABCDEFp_10 is a bareword, '_10' exponent not allowed\n0xp 0xp1 0x0.0p\t\t# syntax errors\n0x41.65.65 \t\t# hex dot number, but lexer now fails with 0x41.65 left as a partial hex float\n\n#--------------------------------------------------------------------------\n# Support for ?PATTERN? without explicit operator has been removed\n#--------------------------------------------------------------------------\n# ?PATTERN? must now be written as m?PATTERN?\n\n?PATTERN?\t# does not work in current LexPerl anyway, NO ACTION NEEDED\nm?PATTERN?\n\n#--------------------------------------------------------------------------\n# end of test file\n#--------------------------------------------------------------------------\n"
  },
  {
    "path": "lexilla/test/examples/perl/perl-test-5220delta.pl.folded",
    "content": " 2 400 401 + # -*- coding: utf-8 -*-\n 0 401 401 | #--------------------------------------------------------------------------\n 0 401 401 | # perl-test-5220delta.pl\n 0 401 401 | #--------------------------------------------------------------------------\n 0 401 401 | # REF: https://metacpan.org/pod/distribution/perl/pod/perldelta.pod\n 0 401 401 | # maybe future ref: https://metacpan.org/pod/distribution/perl/pod/perl5220delta.pod\n 0 401 401 | # also: http://perltricks.com/article/165/2015/4/10/A-preview-of-Perl-5-22\n 0 401 401 | #\n 0 401 401 | #--------------------------------------------------------------------------\n 0 401 401 | # Kein-Hong Man <keinhong@gmail.com> Public Domain 20151217\n 0 401 401 | #--------------------------------------------------------------------------\n 0 401 401 | # 20151217\tinitial document\n 0 401 401 | # 20151218\tupdated tests and comments\n 0 401 400 | #--------------------------------------------------------------------------\n 1 400 400   \n 0 400 400   use v5.22;\t\t\t# may be needed\n 1 400 400   \n 2 400 401 + #--------------------------------------------------------------------------\n 0 401 401 | # New bitwise operators\n 0 401 400 | #--------------------------------------------------------------------------\n 1 400 400   \n 0 400 400   use feature 'bitwise'\t\t# enable feature, warning enabled\n 0 400 400   use experimental \"bitwise\";\t# enable feature, warning disabled\n 1 400 400   \n 0 400 400   # numerical operands\n 0 400 400   10&20  10|20   10^20 ~10\n 0 400 400   $a&\"8\" $a|\"8\" $a^\"8\" ~$a ~\"8\"\n 1 400 400   \n 0 400 400   # string operands\n 0 400 400   '0'&.\"8\" '0'|.\"8\" '0'^.\"8\" ~.'0' ~.\"8\"\n 2 400 401 + # the following is AMBIGUOUS, perl sees 10 and not .10 only when bitwise feature is enabled\n 0 401 400 | # so it's feature-setting-dependent, no plans to change current behaviour\n 0 400 400    $a&.10   $a|.10   $a^.10  ~.$a  ~.10\n 1 400 400   \n 0 400 400   # assignment variants\n 0 400 400   $a&=10;    $a|=10;    $a^=10;\n 0 400 400   $b&.='20'; $b|.='20'; $b^.='20';\n 0 400 400   $c&=\"30\";  $c|=\"30\";  $c^=\"30\";\n 0 400 400   $d&.=$e;   $d|.=$e;   $d^.=$e;\n 1 400 400   \n 2 400 401 + #--------------------------------------------------------------------------\n 0 401 401 | # New double-diamond operator\n 0 401 401 | #--------------------------------------------------------------------------\n 0 401 400 | # <<>> is like <> but each element of @ARGV will be treated as an actual file name\n 1 400 400   \n 0 400 400   # example snippet from brian d foy's blog post\n 2 400 401 + while( <<>> ) {  # new, safe line input operator\n 0 401 401 | \t...;\n 0 401 400 | \t}\n 1 400 400   \n 2 400 401 + #--------------------------------------------------------------------------\n 0 401 401 | # New \\b boundaries in regular expressions\n 0 401 400 | #--------------------------------------------------------------------------\n 1 400 400   \n 0 400 400   qr/\\b{gcb}/\n 0 400 400   qr/\\b{wb}/\n 0 400 400   qr/\\b{sb}/\n 1 400 400   \n 2 400 401 + #--------------------------------------------------------------------------\n 0 401 401 | # Non-Capturing Regular Expression Flag\n 0 401 401 | #--------------------------------------------------------------------------\n 0 401 400 | # disables capturing and filling in $1, $2, etc\n 1 400 400   \n 0 400 400   \"hello\" =~ /(hi|hello)/n; # $1 is not set\n 1 400 400   \n 2 400 401 + #--------------------------------------------------------------------------\n 0 401 401 | # Aliasing via reference\n 0 401 401 | #--------------------------------------------------------------------------\n 0 401 400 | # Variables and subroutines can now be aliased by assigning to a reference\n 1 400 400   \n 0 400 400   \\$c = \\$d;\n 0 400 400   \\&x = \\&y;\n 1 400 400   \n 0 400 400   # Aliasing can also be applied to foreach iterator variables\n 1 400 400   \n 0 400 400   foreach \\%hash (@array_of_hash_refs) { ... }\n 1 400 400   \n 0 400 400   # example snippet from brian d foy's blog post\n 1 400 400   \n 0 400 400   use feature qw(refaliasing);\n 1 400 400   \n 0 400 400   \\%other_hash = \\%hash;\n 1 400 400   \n 0 400 400   use v5.22;\n 0 400 400   use feature qw(refaliasing);\n 1 400 400   \n 2 400 401 + foreach \\my %hash ( @array_of_hashes ) { # named hash control variable\n 2 401 402 + \tforeach my $key ( keys %hash ) { # named hash now!\n 0 402 402 | \t\t...;\n 0 402 401 | \t\t}\n 0 401 400 | \t}\n 1 400 400   \n 2 400 401 + #--------------------------------------------------------------------------\n 0 401 401 | # New :const subroutine attribute\n 0 401 400 | #--------------------------------------------------------------------------\n 1 400 400   \n 0 400 400   my $x = 54321;\n 0 400 400   *INLINED = sub : const { $x };\n 0 400 400   $x++;\n 1 400 400   \n 2 400 401 + # more examples of attributes\n 0 401 401 | # (not 5.22 stuff, but some general examples for study, useful for\n 0 401 400 | #  handling subroutine signature and subroutine prototype highlighting)\n 1 400 400   \n 0 400 400   sub foo : lvalue ;\n 1 400 400   \n 2 400 401 + package X;\n 0 401 401 | sub Y::x : lvalue { 1 }\n 1 401 401 | \n 2 400 401 + package X;\n 0 401 401 | sub foo { 1 }\n 2 400 401 + package Y;\n 0 401 401 | BEGIN { *bar = \\&X::foo; }\n 2 400 401 + package Z;\n 0 401 401 | sub Y::bar : lvalue ;\n 1 401 401 | \n 0 401 401 | # built-in attributes for subroutines:\n 0 401 401 | lvalue method prototype(..) locked const\n 1 401 401 | \n 2 401 402 + #--------------------------------------------------------------------------\n 0 402 402 | # Repetition in list assignment\n 0 402 401 | #--------------------------------------------------------------------------\n 1 401 401 | \n 0 401 401 | # example snippet from brian d foy's blog post\n 0 401 401 | use v5.22;\n 0 401 401 | my(undef, $card_num, (undef)x3, $count) = split /:/;\n 1 401 401 | \n 0 401 401 | (undef,undef,$foo) = that_function()\n 0 401 401 | # is equivalent to \n 0 401 401 | ((undef)x2, $foo) = that_function()\n 1 401 401 | \n 2 401 402 + #--------------------------------------------------------------------------\n 0 402 402 | # Floating point parsing has been improved\n 0 402 402 | #--------------------------------------------------------------------------\n 0 402 401 | # Hexadecimal floating point literals\n 1 401 401 | \n 2 401 402 + # some hex floats from a program by Rick Regan\n 0 402 402 | # appropriated and extended from Lua 5.2.x test cases\n 0 402 401 | # tested on perl 5.22/cygwin\n 1 401 401 | \n 0 401 401 | 0x1p-1074;\n 0 401 401 | 0x3.3333333333334p-5;\n 0 401 401 | 0xcc.ccccccccccdp-11;\n 0 401 401 | 0x1p+1;\n 0 401 401 | 0x1p-6;\n 0 401 401 | 0x1.b7p-1;\n 0 401 401 | 0x1.fffffffffffffp+1023;\n 0 401 401 | 0x1p-1022;\n 0 401 401 | 0X1.921FB4D12D84AP+1;\n 0 401 401 | 0x1.999999999999ap-4;\n 1 401 401 | \n 0 401 401 | # additional test cases for characterization\n 0 401 401 | 0x1p-1074.\t\t# dot is a string operator\n 0 401 401 | 0x.ABCDEFp10\t\t# legal, dot immediately after 0x\n 0 401 401 | 0x.p10\t\t\t# perl allows 0x as a zero, then concat with p10 bareword\n 0 401 401 | 0x.p 0x0.p\t\t# dot then bareword\n 0 401 401 | 0x_0_.A_BC___DEF_p1_0\t# legal hex float, underscores are mostly allowed\n 0 401 401 | 0x0._ABCDEFp10\t\t# _ABCDEFp10 is a bareword, no underscore allowed after dot\n 1 401 401 | \n 0 401 401 | # illegal, but does not use error highlighting\n 0 401 401 | 0x0p1ABC\t\t# illegal, highlighted as 0x0p1 abut with bareword ABC \n 1 401 401 | \n 0 401 401 | # allowed to FAIL for now\n 0 401 401 | 0x0.ABCDEFp_10\t\t# ABCDEFp_10 is a bareword, '_10' exponent not allowed\n 0 401 401 | 0xp 0xp1 0x0.0p\t\t# syntax errors\n 0 401 401 | 0x41.65.65 \t\t# hex dot number, but lexer now fails with 0x41.65 left as a partial hex float\n 1 401 401 | \n 2 401 402 + #--------------------------------------------------------------------------\n 0 402 402 | # Support for ?PATTERN? without explicit operator has been removed\n 0 402 402 | #--------------------------------------------------------------------------\n 0 402 401 | # ?PATTERN? must now be written as m?PATTERN?\n 1 401 401 | \n 0 401 401 | ?PATTERN?\t# does not work in current LexPerl anyway, NO ACTION NEEDED\n 0 401 401 | m?PATTERN?\n 1 401 401 | \n 2 401 402 + #--------------------------------------------------------------------------\n 0 402 402 | # end of test file\n 0 402 401 | #--------------------------------------------------------------------------\n 0 401   0 | "
  },
  {
    "path": "lexilla/test/examples/perl/perl-test-5220delta.pl.styled",
    "content": "{2}# -*- coding: utf-8 -*-\n#--------------------------------------------------------------------------\n# perl-test-5220delta.pl\n#--------------------------------------------------------------------------\n# REF: https://metacpan.org/pod/distribution/perl/pod/perldelta.pod\n# maybe future ref: https://metacpan.org/pod/distribution/perl/pod/perl5220delta.pod\n# also: http://perltricks.com/article/165/2015/4/10/A-preview-of-Perl-5-22\n#\n#--------------------------------------------------------------------------\n# Kein-Hong Man <keinhong@gmail.com> Public Domain 20151217\n#--------------------------------------------------------------------------\n# 20151217\tinitial document\n# 20151218\tupdated tests and comments\n#--------------------------------------------------------------------------\n{0}\n{5}use{0} {6}v5.22{10};{0}\t\t\t{2}# may be needed\n{0}\n{2}#--------------------------------------------------------------------------\n# New bitwise operators\n#--------------------------------------------------------------------------\n{0}\n{5}use{0} {11}feature{0} {7}'bitwise'{0}\t\t{2}# enable feature, warning enabled\n{5}use{0} {11}experimental{0} {6}\"bitwise\"{10};{0}\t{2}# enable feature, warning disabled\n{0}\n{2}# numerical operands\n{4}10{10}&{4}20{0}  {4}10{10}|{4}20{0}   {4}10{10}^{4}20{0} {10}~{4}10{0}\n{12}$a{10}&{6}\"8\"{0} {12}$a{10}|{6}\"8\"{0} {12}$a{10}^{6}\"8\"{0} {10}~{12}$a{0} {10}~{6}\"8\"{0}\n\n{2}# string operands\n{7}'0'{10}&.{6}\"8\"{0} {7}'0'{10}|.{6}\"8\"{0} {7}'0'{10}^.{6}\"8\"{0} {10}~.{7}'0'{0} {10}~.{6}\"8\"{0}\n{2}# the following is AMBIGUOUS, perl sees 10 and not .10 only when bitwise feature is enabled\n# so it's feature-setting-dependent, no plans to change current behaviour\n{0} {12}$a{10}&{4}.10{0}   {12}$a{10}|{4}.10{0}   {12}$a{10}^{4}.10{0}  {10}~.{12}$a{0}  {10}~{4}.10{0}\n\n{2}# assignment variants\n{12}$a{10}&={4}10{10};{0}    {12}$a{10}|={4}10{10};{0}    {12}$a{10}^={4}10{10};{0}\n{12}$b{10}&.={7}'20'{10};{0} {12}$b{10}|.={7}'20'{10};{0} {12}$b{10}^.={7}'20'{10};{0}\n{12}$c{10}&={6}\"30\"{10};{0}  {12}$c{10}|={6}\"30\"{10};{0}  {12}$c{10}^={6}\"30\"{10};{0}\n{12}$d{10}&.={12}$e{10};{0}   {12}$d{10}|.={12}$e{10};{0}   {12}$d{10}^.={12}$e{10};{0}\n\n{2}#--------------------------------------------------------------------------\n# New double-diamond operator\n#--------------------------------------------------------------------------\n# <<>> is like <> but each element of @ARGV will be treated as an actual file name\n{0}\n{2}# example snippet from brian d foy's blog post\n{5}while{10}({0} {10}<<>>{0} {10}){0} {10}{{0}  {2}# new, safe line input operator\n{0}\t{10}...;{0}\n\t{10}}{0}\n\n{2}#--------------------------------------------------------------------------\n# New \\b boundaries in regular expressions\n#--------------------------------------------------------------------------\n{0}\n{29}qr/\\b{gcb}/{0}\n{29}qr/\\b{wb}/{0}\n{29}qr/\\b{sb}/{0}\n\n{2}#--------------------------------------------------------------------------\n# Non-Capturing Regular Expression Flag\n#--------------------------------------------------------------------------\n# disables capturing and filling in $1, $2, etc\n{0}\n{6}\"hello\"{0} {10}=~{0} {17}/(hi|hello)/n{10};{0} {2}# $1 is not set\n{0}\n{2}#--------------------------------------------------------------------------\n# Aliasing via reference\n#--------------------------------------------------------------------------\n# Variables and subroutines can now be aliased by assigning to a reference\n{0}\n{10}\\{12}$c{0} {10}={0} {10}\\{12}$d{10};{0}\n{10}\\&{11}x{0} {10}={0} {10}\\&{11}y{10};{0}\n\n{2}# Aliasing can also be applied to foreach iterator variables\n{0}\n{5}foreach{0} {10}\\{14}%hash{0} {10}({13}@array_of_hash_refs{10}){0} {10}{{0} {10}...{0} {10}}{0}\n\n{2}# example snippet from brian d foy's blog post\n{0}\n{5}use{0} {11}feature{0} {30}qw(refaliasing){10};{0}\n\n{10}\\{14}%other_hash{0} {10}={0} {10}\\{14}%hash{10};{0}\n\n{5}use{0} {6}v5.22{10};{0}\n{5}use{0} {11}feature{0} {30}qw(refaliasing){10};{0}\n\n{5}foreach{0} {10}\\{5}my{0} {14}%hash{0} {10}({0} {13}@array_of_hashes{0} {10}){0} {10}{{0} {2}# named hash control variable\n{0}\t{5}foreach{0} {5}my{0} {12}$key{0} {10}({0} {5}keys{0} {14}%hash{0} {10}){0} {10}{{0} {2}# named hash now!\n{0}\t\t{10}...;{0}\n\t\t{10}}{0}\n\t{10}}{0}\n\n{2}#--------------------------------------------------------------------------\n# New :const subroutine attribute\n#--------------------------------------------------------------------------\n{0}\n{5}my{0} {12}$x{0} {10}={0} {4}54321{10};{0}\n{15}*INLINED{0} {10}={0} {5}sub{0} {10}:{0} {11}const{0} {10}{{0} {12}$x{0} {10}};{0}\n{12}$x{10}++;{0}\n\n{2}# more examples of attributes\n# (not 5.22 stuff, but some general examples for study, useful for\n#  handling subroutine signature and subroutine prototype highlighting)\n{0}\n{5}sub{0} {11}foo{0} {10}:{0} {11}lvalue{0} {10};{0}\n\n{5}package{0} {11}X{10};{0}\n{5}sub{0} {11}Y{10}::{11}x{0} {10}:{0} {11}lvalue{0} {10}{{0} {4}1{0} {10}}{0}\n\n{5}package{0} {11}X{10};{0}\n{5}sub{0} {11}foo{0} {10}{{0} {4}1{0} {10}}{0}\n{5}package{0} {11}Y{10};{0}\n{5}BEGIN{0} {10}{{0} {15}*bar{0} {10}={0} {10}\\&{11}X{10}::{11}foo{10};{0} {10}}{0}\n{5}package{0} {11}Z{10};{0}\n{5}sub{0} {11}Y{10}::{11}bar{0} {10}:{0} {11}lvalue{0} {10};{0}\n\n{2}# built-in attributes for subroutines:\n{11}lvalue{0} {11}method{0} {5}prototype{10}(..){0} {11}locked{0} {11}const{0}\n\n{2}#--------------------------------------------------------------------------\n# Repetition in list assignment\n#--------------------------------------------------------------------------\n{0}\n{2}# example snippet from brian d foy's blog post\n{5}use{0} {6}v5.22{10};{0}\n{5}my{10}({5}undef{10},{0} {12}$card_num{10},{0} {10}({5}undef{10})x{4}3{10},{0} {12}$count{10}){0} {10}={0} {5}split{0} {17}/:/{10};{0}\n\n{10}({5}undef{10},{5}undef{10},{12}$foo{10}){0} {10}={0} {11}that_function{10}(){0}\n{2}# is equivalent to \n{10}(({5}undef{10})x{4}2{10},{0} {12}$foo{10}){0} {10}={0} {11}that_function{10}(){0}\n\n{2}#--------------------------------------------------------------------------\n# Floating point parsing has been improved\n#--------------------------------------------------------------------------\n# Hexadecimal floating point literals\n{0}\n{2}# some hex floats from a program by Rick Regan\n# appropriated and extended from Lua 5.2.x test cases\n# tested on perl 5.22/cygwin\n{0}\n{4}0x1p-1074{10};{0}\n{4}0x3.3333333333334p-5{10};{0}\n{4}0xcc.ccccccccccdp-11{10};{0}\n{4}0x1p+1{10};{0}\n{4}0x1p-6{10};{0}\n{4}0x1.b7p-1{10};{0}\n{4}0x1.fffffffffffffp+1023{10};{0}\n{4}0x1p-1022{10};{0}\n{4}0X1.921FB4D12D84AP+1{10};{0}\n{4}0x1.999999999999ap-4{10};{0}\n\n{2}# additional test cases for characterization\n{4}0x1p-1074{10}.{0}\t\t{2}# dot is a string operator\n{4}0x.ABCDEFp10{0}\t\t{2}# legal, dot immediately after 0x\n{4}0x{10}.{11}p10{0}\t\t\t{2}# perl allows 0x as a zero, then concat with p10 bareword\n{4}0x{10}.{11}p{0} {4}0x0{10}.{11}p{0}\t\t{2}# dot then bareword\n{4}0x_0_.A_BC___DEF_p1_0{0}\t{2}# legal hex float, underscores are mostly allowed\n{4}0x0{10}.{11}_ABCDEFp10{0}\t\t{2}# _ABCDEFp10 is a bareword, no underscore allowed after dot\n{0}\n{2}# illegal, but does not use error highlighting\n{4}0x0p1{11}ABC{0}\t\t{2}# illegal, highlighted as 0x0p1 abut with bareword ABC \n{0}\n{2}# allowed to FAIL for now\n{4}0x0.ABCDEFp_10{0}\t\t{2}# ABCDEFp_10 is a bareword, '_10' exponent not allowed\n{4}0xp{0} {4}0xp1{0} {4}0x0.0p{0}\t\t{2}# syntax errors\n{4}0x41.65{10}.{4}65{0} \t\t{2}# hex dot number, but lexer now fails with 0x41.65 left as a partial hex float\n{0}\n{2}#--------------------------------------------------------------------------\n# Support for ?PATTERN? without explicit operator has been removed\n#--------------------------------------------------------------------------\n# ?PATTERN? must now be written as m?PATTERN?\n{0}\n{10}?{11}PATTERN{10}?{0}\t{2}# does not work in current LexPerl anyway, NO ACTION NEEDED\n{17}m?PATTERN?{0}\n\n{2}#--------------------------------------------------------------------------\n# end of test file\n#--------------------------------------------------------------------------\n"
  },
  {
    "path": "lexilla/test/examples/perl/perl-test-sub-prototypes.pl",
    "content": "# -*- coding: utf-8 -*-\n#--------------------------------------------------------------------------\n# perl-test-sub-prototypes.pl\n#--------------------------------------------------------------------------\n# compiled all relevant subroutine prototype test cases\n#\n#--------------------------------------------------------------------------\n# Kein-Hong Man <keinhong@gmail.com> Public Domain\n#--------------------------------------------------------------------------\n# 20151227\tinitial document\n#--------------------------------------------------------------------------\n\n#--------------------------------------------------------------------------\n# test cases for sub syntax scanner\n#--------------------------------------------------------------------------\n# sub syntax: simple and with added module notation\n#--------------------------------------------------------------------------\n\nsub fish($) { 123; }\nsub fish::chips($) { 123; }\t\t\t# module syntax\nsub fish::chips::sauce($) { 123; }\t\t# multiple module syntax\n\nsub fish :: chips  ::\t\tsauce ($) { 123; }\t# added whitespace\n\nsub fish :: # embedded comment\nchips \t# embedded comment\n :: sauce ($) { 123; }\n\nsub fish :: ($) { 123; }\t# incomplete or bad syntax examples\nsub fish :: 123 ($) { 123; }\nsub fish :: chips 123 ($) { 123; }\nsub 123 ($) { 123; }\n\n#--------------------------------------------------------------------------\n# sub syntax: prototype attributes\n#--------------------------------------------------------------------------\n\nsub fish:prototype($) { 123; }\nsub fish : prototype\t($) { 123; }\t\t# added whitespace\n\nsub fish:salted($) { 123; }\t# wrong attribute example (must use 'prototype')\nsub fish :  123($) { 123; }\t# illegal attribute\nsub fish:prototype:salted($) { 123; }\t# wrong 'prototype' position\nsub fish:salted salt:prototype($) { 123; }\t# wrong attribute syntax\n\nsub fish:const:prototype($) { 123; }\t\t# extra attributes\nsub fish:const:lvalue:prototype($) { 123; }\nsub fish:const:prototype($):lvalue{ 123; }\t# might be legal too\nsub fish  :const\t:prototype($) { 123; }\t# extra whitespace\n\nsub fish  :const\t# embedded comment: a constant sub\n:prototype\t\t# embedded comment\n($) { 123; }\n\n#--------------------------------------------------------------------------\n# sub syntax: mixed\n#--------------------------------------------------------------------------\n\nsub fish::chips:prototype($) { 123; }\nsub fish::chips::sauce:prototype($) { 123; }\nsub fish  ::chips  ::sauce\t:prototype($) { 123; }\t# +whitespace\n\nsub fish::chips::sauce:const:prototype($) { 123; }\nsub fish::chips::sauce\t:const\t:prototype($) { 123; }\t# +whitespace\n\nsub fish\t\t# embedded comment\n::chips\t::sauce\t\t# embedded comment\n  : const\t\t# embedded comment\n\t: prototype ($) { 123; }\n\n# wrong syntax examples, parentheses must follow ':prototype'\nsub fish :prototype :const ($) { 123;}\nsub fish :prototype ::chips ($) { 123;}\n\n#--------------------------------------------------------------------------\n# perl-test-5200delta.pl\n#--------------------------------------------------------------------------\n# More consistent prototype parsing\n#--------------------------------------------------------------------------\n# - whitespace now allowed, lexer now allows spaces or tabs\n\nsub foo ( $ $ ) {}\nsub foo ( \t\t\t ) {}\t\t# spaces/tabs empty\nsub foo (  *  ) {}\nsub foo (@\t) {}\nsub foo (\t%) {}\n\n# untested, should probably be \\[ but scanner does not check this for now\nsub foo ( \\ [ $ @ % & * ] ) {}\n\n#--------------------------------------------------------------------------\n# perl-test-5140delta.pl\n#--------------------------------------------------------------------------\n# new + prototype character, acts like (\\[@%])\n#--------------------------------------------------------------------------\n\n# these samples work as before\nsub mylink ($$)          # mylink $old, $new\nsub myvec ($$$)          # myvec $var, $offset, 1\nsub myindex ($$;$)       # myindex &getstring, \"substr\"\nsub mysyswrite ($$$;$)   # mysyswrite $buf, 0, length($buf) - $off, $off\nsub myreverse (@)        # myreverse $a, $b, $c\nsub myjoin ($@)          # myjoin \":\", $a, $b, $c\nsub myopen (*;$)         # myopen HANDLE, $name\nsub mypipe (**)          # mypipe READHANDLE, WRITEHANDLE\nsub mygrep (&@)          # mygrep { /foo/ } $a, $b, $c\nsub myrand (;$)          # myrand 42\nsub mytime ()            # mytime\n\n# backslash group notation to specify more than one allowed argument type\nsub myref (\\[$@%&*]) {}\n\nsub mysub (_)            # underscore can be optionally used FIXED 20151211\n\n# these uses the new '+' prototype character\nsub mypop (+)            # mypop @array\nsub mysplice (+$$@)      # mysplice @array, 0, 2, @pushme\nsub mykeys (+)           # mykeys %{$hashref}\n\n#--------------------------------------------------------------------------\n# perl-test-5200delta.pl\n#--------------------------------------------------------------------------\n# Experimental Subroutine signatures (mostly works)\n#--------------------------------------------------------------------------\n# INCLUDED FOR COMPLETENESS ONLY\n# IMPORTANT NOTE the subroutine prototypes lexing implementation has\n# no effect on subroutine signature syntax highlighting\n\n# subroutine signatures mostly looks fine except for the @ and % slurpy\n# notation which are highlighted as operators (all other parameters are\n# highlighted as vars of some sort), a minor aesthetic issue\n\nuse feature 'signatures';\n\nsub foo ($left, $right) {\t\t# mandatory positional parameters\n    return $left + $right;\n}\nsub foo ($first, $, $third) {\t\t# ignore second argument\n    return \"first=$first, third=$third\";\n}\nsub foo ($left, $right = 0) {\t\t# optional parameter with default value\n    return $left + $right;\n}\nmy $auto_id = 0;\t\t\t# default value expression, evaluated if default used only\nsub foo ($thing, $id = $auto_id++) {\n    print \"$thing has ID $id\";\n}\nsub foo ($first_name, $surname, $nickname = $first_name) {\t# 3rd parm may depend on 1st parm\n    print \"$first_name $surname is known as \\\"$nickname\\\"\";\n}\nsub foo ($thing, $ = 1) {\t\t# nameless default parameter\n    print $thing;\n}\nsub foo ($thing, $=) {\t\t\t# (this does something, I'm not sure what...)\n    print $thing;\n}\nsub foo ($filter, @inputs) {\t\t# additional arguments (slurpy parameter)\n    print $filter->($_) foreach @inputs;\n}\nsub foo ($thing, @) {\t\t\t# nameless slurpy parameter FAILS for now\n    print $thing;\n}\nsub foo ($filter, %inputs) {\t\t# slurpy parameter, hash type\n    print $filter->($_, $inputs{$_}) foreach sort keys %inputs;\n}\nsub foo ($thing, %) {\t\t\t# nameless slurpy parm, hash type FAILS for now\n    print $thing;\n}\nsub foo () {\t\t\t\t# empty signature no arguments (styled as prototype)\n    return 123;\n}\n\n#--------------------------------------------------------------------------\n# perl-test-5200delta.pl\n#--------------------------------------------------------------------------\n# subs now take a prototype attribute\n#--------------------------------------------------------------------------\n\nsub foo :prototype($) { $_[0] }\n\nsub foo :prototype($$) ($left, $right) {\n    return $left + $right;\n}\n\nsub foo : prototype($$){}\t\t# whitespace allowed\n\n# additional samples from perl-test-cases.pl with ':prototype' added:\nsub mylink :prototype($$) {}\t\tsub myvec :prototype($$$) {}\nsub myindex :prototype($$;$) {}\t\tsub mysyswrite :prototype($$$;$) {}\nsub myreverse :prototype(@) {}\t\tsub myjoin :prototype($@) {}\nsub mypop :prototype(\\@) {}\t\tsub mysplice :prototype(\\@$$@) {}\nsub mykeys :prototype(\\%) {}\t\tsub myopen :prototype(*;$) {}\nsub mypipe :prototype(**) {}\t\tsub mygrep :prototype(&@) {}\nsub myrand :prototype($) {}\t\tsub mytime :prototype() {}\n# backslash group notation to specify more than one allowed argument type\nsub myref :prototype(\\[$@%&*]) {}\n\n# additional attributes may complicate scanning for prototype syntax,\n# for example (from https://metacpan.org/pod/perlsub):\n# Lvalue subroutines\n\nmy $val;\nsub canmod : lvalue {\n    $val;  # or:  return $val;\n}\ncanmod() = 5;   # assigns to $val\n\n#--------------------------------------------------------------------------\n# perl-test-5220delta.pl\n#--------------------------------------------------------------------------\n# New :const subroutine attribute\n#--------------------------------------------------------------------------\n\nmy $x = 54321;\n*INLINED = sub : const { $x };\n$x++;\n\n# more examples of attributes\n# (not 5.22 stuff, but some general examples for study, useful for\n#  handling subroutine signature and subroutine prototype highlighting)\n\nsub foo : lvalue ;\n\npackage X;\nsub Y::z : lvalue { 1 }\n\npackage X;\nsub foo { 1 }\npackage Y;\nBEGIN { *bar = \\&X::foo; }\npackage Z;\nsub Y::bar : lvalue ;\n\n# built-in attributes for subroutines:\nlvalue method prototype(..) locked const\n\n#--------------------------------------------------------------------------\n# end of test file\n#--------------------------------------------------------------------------\n"
  },
  {
    "path": "lexilla/test/examples/perl/perl-test-sub-prototypes.pl.folded",
    "content": " 2 400 401 + # -*- coding: utf-8 -*-\n 0 401 401 | #--------------------------------------------------------------------------\n 0 401 401 | # perl-test-sub-prototypes.pl\n 0 401 401 | #--------------------------------------------------------------------------\n 0 401 401 | # compiled all relevant subroutine prototype test cases\n 0 401 401 | #\n 0 401 401 | #--------------------------------------------------------------------------\n 0 401 401 | # Kein-Hong Man <keinhong@gmail.com> Public Domain\n 0 401 401 | #--------------------------------------------------------------------------\n 0 401 401 | # 20151227\tinitial document\n 0 401 400 | #--------------------------------------------------------------------------\n 1 400 400   \n 2 400 401 + #--------------------------------------------------------------------------\n 0 401 401 | # test cases for sub syntax scanner\n 0 401 401 | #--------------------------------------------------------------------------\n 0 401 401 | # sub syntax: simple and with added module notation\n 0 401 400 | #--------------------------------------------------------------------------\n 1 400 400   \n 0 400 400   sub fish($) { 123; }\n 0 400 400   sub fish::chips($) { 123; }\t\t\t# module syntax\n 0 400 400   sub fish::chips::sauce($) { 123; }\t\t# multiple module syntax\n 1 400 400   \n 0 400 400   sub fish :: chips  ::\t\tsauce ($) { 123; }\t# added whitespace\n 1 400 400   \n 0 400 400   sub fish :: # embedded comment\n 0 400 400   chips \t# embedded comment\n 0 400 400    :: sauce ($) { 123; }\n 1 400 400   \n 0 400 400   sub fish :: ($) { 123; }\t# incomplete or bad syntax examples\n 0 400 400   sub fish :: 123 ($) { 123; }\n 0 400 400   sub fish :: chips 123 ($) { 123; }\n 0 400 400   sub 123 ($) { 123; }\n 1 400 400   \n 2 400 401 + #--------------------------------------------------------------------------\n 0 401 401 | # sub syntax: prototype attributes\n 0 401 400 | #--------------------------------------------------------------------------\n 1 400 400   \n 0 400 400   sub fish:prototype($) { 123; }\n 0 400 400   sub fish : prototype\t($) { 123; }\t\t# added whitespace\n 1 400 400   \n 0 400 400   sub fish:salted($) { 123; }\t# wrong attribute example (must use 'prototype')\n 0 400 400   sub fish :  123($) { 123; }\t# illegal attribute\n 0 400 400   sub fish:prototype:salted($) { 123; }\t# wrong 'prototype' position\n 0 400 400   sub fish:salted salt:prototype($) { 123; }\t# wrong attribute syntax\n 1 400 400   \n 0 400 400   sub fish:const:prototype($) { 123; }\t\t# extra attributes\n 0 400 400   sub fish:const:lvalue:prototype($) { 123; }\n 0 400 400   sub fish:const:prototype($):lvalue{ 123; }\t# might be legal too\n 0 400 400   sub fish  :const\t:prototype($) { 123; }\t# extra whitespace\n 1 400 400   \n 0 400 400   sub fish  :const\t# embedded comment: a constant sub\n 0 400 400   :prototype\t\t# embedded comment\n 0 400 400   ($) { 123; }\n 1 400 400   \n 2 400 401 + #--------------------------------------------------------------------------\n 0 401 401 | # sub syntax: mixed\n 0 401 400 | #--------------------------------------------------------------------------\n 1 400 400   \n 0 400 400   sub fish::chips:prototype($) { 123; }\n 0 400 400   sub fish::chips::sauce:prototype($) { 123; }\n 0 400 400   sub fish  ::chips  ::sauce\t:prototype($) { 123; }\t# +whitespace\n 1 400 400   \n 0 400 400   sub fish::chips::sauce:const:prototype($) { 123; }\n 0 400 400   sub fish::chips::sauce\t:const\t:prototype($) { 123; }\t# +whitespace\n 1 400 400   \n 0 400 400   sub fish\t\t# embedded comment\n 0 400 400   ::chips\t::sauce\t\t# embedded comment\n 0 400 400     : const\t\t# embedded comment\n 0 400 400   \t: prototype ($) { 123; }\n 1 400 400   \n 0 400 400   # wrong syntax examples, parentheses must follow ':prototype'\n 0 400 400   sub fish :prototype :const ($) { 123;}\n 0 400 400   sub fish :prototype ::chips ($) { 123;}\n 1 400 400   \n 2 400 401 + #--------------------------------------------------------------------------\n 0 401 401 | # perl-test-5200delta.pl\n 0 401 401 | #--------------------------------------------------------------------------\n 0 401 401 | # More consistent prototype parsing\n 0 401 401 | #--------------------------------------------------------------------------\n 0 401 400 | # - whitespace now allowed, lexer now allows spaces or tabs\n 1 400 400   \n 0 400 400   sub foo ( $ $ ) {}\n 0 400 400   sub foo ( \t\t\t ) {}\t\t# spaces/tabs empty\n 0 400 400   sub foo (  *  ) {}\n 0 400 400   sub foo (@\t) {}\n 0 400 400   sub foo (\t%) {}\n 1 400 400   \n 0 400 400   # untested, should probably be \\[ but scanner does not check this for now\n 0 400 400   sub foo ( \\ [ $ @ % & * ] ) {}\n 1 400 400   \n 2 400 401 + #--------------------------------------------------------------------------\n 0 401 401 | # perl-test-5140delta.pl\n 0 401 401 | #--------------------------------------------------------------------------\n 0 401 401 | # new + prototype character, acts like (\\[@%])\n 0 401 400 | #--------------------------------------------------------------------------\n 1 400 400   \n 0 400 400   # these samples work as before\n 0 400 400   sub mylink ($$)          # mylink $old, $new\n 0 400 400   sub myvec ($$$)          # myvec $var, $offset, 1\n 0 400 400   sub myindex ($$;$)       # myindex &getstring, \"substr\"\n 0 400 400   sub mysyswrite ($$$;$)   # mysyswrite $buf, 0, length($buf) - $off, $off\n 0 400 400   sub myreverse (@)        # myreverse $a, $b, $c\n 0 400 400   sub myjoin ($@)          # myjoin \":\", $a, $b, $c\n 0 400 400   sub myopen (*;$)         # myopen HANDLE, $name\n 0 400 400   sub mypipe (**)          # mypipe READHANDLE, WRITEHANDLE\n 0 400 400   sub mygrep (&@)          # mygrep { /foo/ } $a, $b, $c\n 0 400 400   sub myrand (;$)          # myrand 42\n 0 400 400   sub mytime ()            # mytime\n 1 400 400   \n 0 400 400   # backslash group notation to specify more than one allowed argument type\n 0 400 400   sub myref (\\[$@%&*]) {}\n 1 400 400   \n 0 400 400   sub mysub (_)            # underscore can be optionally used FIXED 20151211\n 1 400 400   \n 0 400 400   # these uses the new '+' prototype character\n 0 400 400   sub mypop (+)            # mypop @array\n 0 400 400   sub mysplice (+$$@)      # mysplice @array, 0, 2, @pushme\n 0 400 400   sub mykeys (+)           # mykeys %{$hashref}\n 1 400 400   \n 2 400 401 + #--------------------------------------------------------------------------\n 0 401 401 | # perl-test-5200delta.pl\n 0 401 401 | #--------------------------------------------------------------------------\n 0 401 401 | # Experimental Subroutine signatures (mostly works)\n 0 401 401 | #--------------------------------------------------------------------------\n 0 401 401 | # INCLUDED FOR COMPLETENESS ONLY\n 0 401 401 | # IMPORTANT NOTE the subroutine prototypes lexing implementation has\n 0 401 400 | # no effect on subroutine signature syntax highlighting\n 1 400 400   \n 2 400 401 + # subroutine signatures mostly looks fine except for the @ and % slurpy\n 0 401 401 | # notation which are highlighted as operators (all other parameters are\n 0 401 400 | # highlighted as vars of some sort), a minor aesthetic issue\n 1 400 400   \n 0 400 400   use feature 'signatures';\n 1 400 400   \n 2 400 401 + sub foo ($left, $right) {\t\t# mandatory positional parameters\n 0 401 401 |     return $left + $right;\n 0 401 400 | }\n 2 400 401 + sub foo ($first, $, $third) {\t\t# ignore second argument\n 0 401 401 |     return \"first=$first, third=$third\";\n 0 401 400 | }\n 2 400 401 + sub foo ($left, $right = 0) {\t\t# optional parameter with default value\n 0 401 401 |     return $left + $right;\n 0 401 400 | }\n 0 400 400   my $auto_id = 0;\t\t\t# default value expression, evaluated if default used only\n 2 400 401 + sub foo ($thing, $id = $auto_id++) {\n 0 401 401 |     print \"$thing has ID $id\";\n 0 401 400 | }\n 2 400 401 + sub foo ($first_name, $surname, $nickname = $first_name) {\t# 3rd parm may depend on 1st parm\n 0 401 401 |     print \"$first_name $surname is known as \\\"$nickname\\\"\";\n 0 401 400 | }\n 2 400 401 + sub foo ($thing, $ = 1) {\t\t# nameless default parameter\n 0 401 401 |     print $thing;\n 0 401 400 | }\n 2 400 401 + sub foo ($thing, $=) {\t\t\t# (this does something, I'm not sure what...)\n 0 401 401 |     print $thing;\n 0 401 400 | }\n 2 400 401 + sub foo ($filter, @inputs) {\t\t# additional arguments (slurpy parameter)\n 0 401 401 |     print $filter->($_) foreach @inputs;\n 0 401 400 | }\n 2 400 401 + sub foo ($thing, @) {\t\t\t# nameless slurpy parameter FAILS for now\n 0 401 401 |     print $thing;\n 0 401 400 | }\n 2 400 401 + sub foo ($filter, %inputs) {\t\t# slurpy parameter, hash type\n 0 401 401 |     print $filter->($_, $inputs{$_}) foreach sort keys %inputs;\n 0 401 400 | }\n 2 400 401 + sub foo ($thing, %) {\t\t\t# nameless slurpy parm, hash type FAILS for now\n 0 401 401 |     print $thing;\n 0 401 400 | }\n 2 400 401 + sub foo () {\t\t\t\t# empty signature no arguments (styled as prototype)\n 0 401 401 |     return 123;\n 0 401 400 | }\n 1 400 400   \n 2 400 401 + #--------------------------------------------------------------------------\n 0 401 401 | # perl-test-5200delta.pl\n 0 401 401 | #--------------------------------------------------------------------------\n 0 401 401 | # subs now take a prototype attribute\n 0 401 400 | #--------------------------------------------------------------------------\n 1 400 400   \n 0 400 400   sub foo :prototype($) { $_[0] }\n 1 400 400   \n 2 400 401 + sub foo :prototype($$) ($left, $right) {\n 0 401 401 |     return $left + $right;\n 0 401 400 | }\n 1 400 400   \n 0 400 400   sub foo : prototype($$){}\t\t# whitespace allowed\n 1 400 400   \n 0 400 400   # additional samples from perl-test-cases.pl with ':prototype' added:\n 0 400 400   sub mylink :prototype($$) {}\t\tsub myvec :prototype($$$) {}\n 0 400 400   sub myindex :prototype($$;$) {}\t\tsub mysyswrite :prototype($$$;$) {}\n 0 400 400   sub myreverse :prototype(@) {}\t\tsub myjoin :prototype($@) {}\n 0 400 400   sub mypop :prototype(\\@) {}\t\tsub mysplice :prototype(\\@$$@) {}\n 0 400 400   sub mykeys :prototype(\\%) {}\t\tsub myopen :prototype(*;$) {}\n 0 400 400   sub mypipe :prototype(**) {}\t\tsub mygrep :prototype(&@) {}\n 0 400 400   sub myrand :prototype($) {}\t\tsub mytime :prototype() {}\n 0 400 400   # backslash group notation to specify more than one allowed argument type\n 0 400 400   sub myref :prototype(\\[$@%&*]) {}\n 1 400 400   \n 2 400 401 + # additional attributes may complicate scanning for prototype syntax,\n 0 401 401 | # for example (from https://metacpan.org/pod/perlsub):\n 0 401 400 | # Lvalue subroutines\n 1 400 400   \n 0 400 400   my $val;\n 2 400 401 + sub canmod : lvalue {\n 0 401 401 |     $val;  # or:  return $val;\n 0 401 400 | }\n 0 400 400   canmod() = 5;   # assigns to $val\n 1 400 400   \n 2 400 401 + #--------------------------------------------------------------------------\n 0 401 401 | # perl-test-5220delta.pl\n 0 401 401 | #--------------------------------------------------------------------------\n 0 401 401 | # New :const subroutine attribute\n 0 401 400 | #--------------------------------------------------------------------------\n 1 400 400   \n 0 400 400   my $x = 54321;\n 0 400 400   *INLINED = sub : const { $x };\n 0 400 400   $x++;\n 1 400 400   \n 2 400 401 + # more examples of attributes\n 0 401 401 | # (not 5.22 stuff, but some general examples for study, useful for\n 0 401 400 | #  handling subroutine signature and subroutine prototype highlighting)\n 1 400 400   \n 0 400 400   sub foo : lvalue ;\n 1 400 400   \n 2 400 401 + package X;\n 0 401 401 | sub Y::z : lvalue { 1 }\n 1 401 401 | \n 2 400 401 + package X;\n 0 401 401 | sub foo { 1 }\n 2 400 401 + package Y;\n 0 401 401 | BEGIN { *bar = \\&X::foo; }\n 2 400 401 + package Z;\n 0 401 401 | sub Y::bar : lvalue ;\n 1 401 401 | \n 0 401 401 | # built-in attributes for subroutines:\n 0 401 401 | lvalue method prototype(..) locked const\n 1 401 401 | \n 2 401 402 + #--------------------------------------------------------------------------\n 0 402 402 | # end of test file\n 0 402 401 | #--------------------------------------------------------------------------\n 0 401   0 | "
  },
  {
    "path": "lexilla/test/examples/perl/perl-test-sub-prototypes.pl.styled",
    "content": "{2}# -*- coding: utf-8 -*-\n#--------------------------------------------------------------------------\n# perl-test-sub-prototypes.pl\n#--------------------------------------------------------------------------\n# compiled all relevant subroutine prototype test cases\n#\n#--------------------------------------------------------------------------\n# Kein-Hong Man <keinhong@gmail.com> Public Domain\n#--------------------------------------------------------------------------\n# 20151227\tinitial document\n#--------------------------------------------------------------------------\n{0}\n{2}#--------------------------------------------------------------------------\n# test cases for sub syntax scanner\n#--------------------------------------------------------------------------\n# sub syntax: simple and with added module notation\n#--------------------------------------------------------------------------\n{0}\n{5}sub{0} {11}fish{40}($){0} {10}{{0} {4}123{10};{0} {10}}{0}\n{5}sub{0} {11}fish{10}::{11}chips{40}($){0} {10}{{0} {4}123{10};{0} {10}}{0}\t\t\t{2}# module syntax\n{5}sub{0} {11}fish{10}::{11}chips{10}::{11}sauce{40}($){0} {10}{{0} {4}123{10};{0} {10}}{0}\t\t{2}# multiple module syntax\n{0}\n{5}sub{0} {11}fish{0} {10}::{0} {11}chips{0}  {10}::{0}\t\t{11}sauce{0} {40}($){0} {10}{{0} {4}123{10};{0} {10}}{0}\t{2}# added whitespace\n{0}\n{5}sub{0} {11}fish{0} {10}::{0} {2}# embedded comment\n{11}chips{0} \t{2}# embedded comment\n{0} {10}::{0} {11}sauce{0} {40}($){0} {10}{{0} {4}123{10};{0} {10}}{0}\n\n{5}sub{0} {11}fish{0} {10}::{0} {10}({12}$){0} {10}{{0} {4}123{10};{0} {10}}{0}\t{2}# incomplete or bad syntax examples\n{5}sub{0} {11}fish{0} {10}::{0} {4}123{0} {10}({12}$){0} {10}{{0} {4}123{10};{0} {10}}{0}\n{5}sub{0} {11}fish{0} {10}::{0} {11}chips{0} {4}123{0} {10}({12}$){0} {10}{{0} {4}123{10};{0} {10}}{0}\n{5}sub{0} {4}123{0} {10}({12}$){0} {10}{{0} {4}123{10};{0} {10}}{0}\n\n{2}#--------------------------------------------------------------------------\n# sub syntax: prototype attributes\n#--------------------------------------------------------------------------\n{0}\n{5}sub{0} {11}fish{10}:{5}prototype{40}($){0} {10}{{0} {4}123{10};{0} {10}}{0}\n{5}sub{0} {11}fish{0} {10}:{0} {5}prototype{0}\t{40}($){0} {10}{{0} {4}123{10};{0} {10}}{0}\t\t{2}# added whitespace\n{0}\n{5}sub{0} {11}fish{10}:{11}salted{10}({12}$){0} {10}{{0} {4}123{10};{0} {10}}{0}\t{2}# wrong attribute example (must use 'prototype')\n{5}sub{0} {11}fish{0} {10}:{0}  {4}123{10}({12}$){0} {10}{{0} {4}123{10};{0} {10}}{0}\t{2}# illegal attribute\n{5}sub{0} {11}fish{10}:{5}prototype{10}:{11}salted{10}({12}$){0} {10}{{0} {4}123{10};{0} {10}}{0}\t{2}# wrong 'prototype' position\n{5}sub{0} {11}fish{10}:{11}salted{0} {11}salt{10}:{5}prototype{10}({12}$){0} {10}{{0} {4}123{10};{0} {10}}{0}\t{2}# wrong attribute syntax\n{0}\n{5}sub{0} {11}fish{10}:{11}const{10}:{5}prototype{40}($){0} {10}{{0} {4}123{10};{0} {10}}{0}\t\t{2}# extra attributes\n{5}sub{0} {11}fish{10}:{11}const{10}:{11}lvalue{10}:{5}prototype{40}($){0} {10}{{0} {4}123{10};{0} {10}}{0}\n{5}sub{0} {11}fish{10}:{11}const{10}:{5}prototype{40}($){10}:{11}lvalue{10}{{0} {4}123{10};{0} {10}}{0}\t{2}# might be legal too\n{5}sub{0} {11}fish{0}  {10}:{11}const{0}\t{10}:{5}prototype{40}($){0} {10}{{0} {4}123{10};{0} {10}}{0}\t{2}# extra whitespace\n{0}\n{5}sub{0} {11}fish{0}  {10}:{11}const{0}\t{2}# embedded comment: a constant sub\n{10}:{5}prototype{0}\t\t{2}# embedded comment\n{40}($){0} {10}{{0} {4}123{10};{0} {10}}{0}\n\n{2}#--------------------------------------------------------------------------\n# sub syntax: mixed\n#--------------------------------------------------------------------------\n{0}\n{5}sub{0} {11}fish{10}::{11}chips{10}:{5}prototype{40}($){0} {10}{{0} {4}123{10};{0} {10}}{0}\n{5}sub{0} {11}fish{10}::{11}chips{10}::{11}sauce{10}:{5}prototype{40}($){0} {10}{{0} {4}123{10};{0} {10}}{0}\n{5}sub{0} {11}fish{0}  {10}::{11}chips{0}  {10}::{11}sauce{0}\t{10}:{5}prototype{40}($){0} {10}{{0} {4}123{10};{0} {10}}{0}\t{2}# +whitespace\n{0}\n{5}sub{0} {11}fish{10}::{11}chips{10}::{11}sauce{10}:{11}const{10}:{5}prototype{40}($){0} {10}{{0} {4}123{10};{0} {10}}{0}\n{5}sub{0} {11}fish{10}::{11}chips{10}::{11}sauce{0}\t{10}:{11}const{0}\t{10}:{5}prototype{40}($){0} {10}{{0} {4}123{10};{0} {10}}{0}\t{2}# +whitespace\n{0}\n{5}sub{0} {11}fish{0}\t\t{2}# embedded comment\n{10}::{11}chips{0}\t{10}::{11}sauce{0}\t\t{2}# embedded comment\n{0}  {10}:{0} {11}const{0}\t\t{2}# embedded comment\n{0}\t{10}:{0} {5}prototype{0} {40}($){0} {10}{{0} {4}123{10};{0} {10}}{0}\n\n{2}# wrong syntax examples, parentheses must follow ':prototype'\n{5}sub{0} {11}fish{0} {10}:{5}prototype{0} {10}:{11}const{0} {10}({12}$){0} {10}{{0} {4}123{10};}{0}\n{5}sub{0} {11}fish{0} {10}:{5}prototype{0} {10}::{11}chips{0} {10}({12}$){0} {10}{{0} {4}123{10};}{0}\n\n{2}#--------------------------------------------------------------------------\n# perl-test-5200delta.pl\n#--------------------------------------------------------------------------\n# More consistent prototype parsing\n#--------------------------------------------------------------------------\n# - whitespace now allowed, lexer now allows spaces or tabs\n{0}\n{5}sub{0} {11}foo{0} {40}( $ $ ){0} {10}{}{0}\n{5}sub{0} {11}foo{0} {40}( \t\t\t ){0} {10}{}{0}\t\t{2}# spaces/tabs empty\n{5}sub{0} {11}foo{0} {40}(  *  ){0} {10}{}{0}\n{5}sub{0} {11}foo{0} {40}(@\t){0} {10}{}{0}\n{5}sub{0} {11}foo{0} {40}(\t%){0} {10}{}{0}\n\n{2}# untested, should probably be \\[ but scanner does not check this for now\n{5}sub{0} {11}foo{0} {40}( \\ [ $ @ % & * ] ){0} {10}{}{0}\n\n{2}#--------------------------------------------------------------------------\n# perl-test-5140delta.pl\n#--------------------------------------------------------------------------\n# new + prototype character, acts like (\\[@%])\n#--------------------------------------------------------------------------\n{0}\n{2}# these samples work as before\n{5}sub{0} {11}mylink{0} {40}($$){0}          {2}# mylink $old, $new\n{5}sub{0} {11}myvec{0} {40}($$$){0}          {2}# myvec $var, $offset, 1\n{5}sub{0} {11}myindex{0} {40}($$;$){0}       {2}# myindex &getstring, \"substr\"\n{5}sub{0} {11}mysyswrite{0} {40}($$$;$){0}   {2}# mysyswrite $buf, 0, length($buf) - $off, $off\n{5}sub{0} {11}myreverse{0} {40}(@){0}        {2}# myreverse $a, $b, $c\n{5}sub{0} {11}myjoin{0} {40}($@){0}          {2}# myjoin \":\", $a, $b, $c\n{5}sub{0} {11}myopen{0} {40}(*;$){0}         {2}# myopen HANDLE, $name\n{5}sub{0} {11}mypipe{0} {40}(**){0}          {2}# mypipe READHANDLE, WRITEHANDLE\n{5}sub{0} {11}mygrep{0} {40}(&@){0}          {2}# mygrep { /foo/ } $a, $b, $c\n{5}sub{0} {11}myrand{0} {40}(;$){0}          {2}# myrand 42\n{5}sub{0} {11}mytime{0} {40}(){0}            {2}# mytime\n{0}\n{2}# backslash group notation to specify more than one allowed argument type\n{5}sub{0} {11}myref{0} {40}(\\[$@%&*]){0} {10}{}{0}\n\n{5}sub{0} {11}mysub{0} {40}(_){0}            {2}# underscore can be optionally used FIXED 20151211\n{0}\n{2}# these uses the new '+' prototype character\n{5}sub{0} {11}mypop{0} {40}(+){0}            {2}# mypop @array\n{5}sub{0} {11}mysplice{0} {40}(+$$@){0}      {2}# mysplice @array, 0, 2, @pushme\n{5}sub{0} {11}mykeys{0} {40}(+){0}           {2}# mykeys %{$hashref}\n{0}\n{2}#--------------------------------------------------------------------------\n# perl-test-5200delta.pl\n#--------------------------------------------------------------------------\n# Experimental Subroutine signatures (mostly works)\n#--------------------------------------------------------------------------\n# INCLUDED FOR COMPLETENESS ONLY\n# IMPORTANT NOTE the subroutine prototypes lexing implementation has\n# no effect on subroutine signature syntax highlighting\n{0}\n{2}# subroutine signatures mostly looks fine except for the @ and % slurpy\n# notation which are highlighted as operators (all other parameters are\n# highlighted as vars of some sort), a minor aesthetic issue\n{0}\n{5}use{0} {11}feature{0} {7}'signatures'{10};{0}\n\n{5}sub{0} {11}foo{0} {10}({12}$left{10},{0} {12}$right{10}){0} {10}{{0}\t\t{2}# mandatory positional parameters\n{0}    {5}return{0} {12}$left{0} {10}+{0} {12}$right{10};{0}\n{10}}{0}\n{5}sub{0} {11}foo{0} {10}({12}$first{10},{0} {12}$,{0} {12}$third{10}){0} {10}{{0}\t\t{2}# ignore second argument\n{0}    {5}return{0} {6}\"first={43}$first{6}, third={43}$third{6}\"{10};{0}\n{10}}{0}\n{5}sub{0} {11}foo{0} {10}({12}$left{10},{0} {12}$right{0} {10}={0} {4}0{10}){0} {10}{{0}\t\t{2}# optional parameter with default value\n{0}    {5}return{0} {12}$left{0} {10}+{0} {12}$right{10};{0}\n{10}}{0}\n{5}my{0} {12}$auto_id{0} {10}={0} {4}0{10};{0}\t\t\t{2}# default value expression, evaluated if default used only\n{5}sub{0} {11}foo{0} {10}({12}$thing{10},{0} {12}$id{0} {10}={0} {12}$auto_id{10}++){0} {10}{{0}\n    {5}print{0} {6}\"{43}$thing{6} has ID {43}$id{6}\"{10};{0}\n{10}}{0}\n{5}sub{0} {11}foo{0} {10}({12}$first_name{10},{0} {12}$surname{10},{0} {12}$nickname{0} {10}={0} {12}$first_name{10}){0} {10}{{0}\t{2}# 3rd parm may depend on 1st parm\n{0}    {5}print{0} {6}\"{43}$first_name{6} {43}$surname{6} is known as \\\"{43}$nickname{6}\\\"\"{10};{0}\n{10}}{0}\n{5}sub{0} {11}foo{0} {10}({12}$thing{10},{0} {12}${0} {10}={0} {4}1{10}){0} {10}{{0}\t\t{2}# nameless default parameter\n{0}    {5}print{0} {12}$thing{10};{0}\n{10}}{0}\n{5}sub{0} {11}foo{0} {10}({12}$thing{10},{0} {12}$={10}){0} {10}{{0}\t\t\t{2}# (this does something, I'm not sure what...)\n{0}    {5}print{0} {12}$thing{10};{0}\n{10}}{0}\n{5}sub{0} {11}foo{0} {10}({12}$filter{10},{0} {13}@inputs{10}){0} {10}{{0}\t\t{2}# additional arguments (slurpy parameter)\n{0}    {5}print{0} {12}$filter{10}->({12}$_{10}){0} {5}foreach{0} {13}@inputs{10};{0}\n{10}}{0}\n{5}sub{0} {11}foo{0} {10}({12}$thing{10},{0} {10}@){0} {10}{{0}\t\t\t{2}# nameless slurpy parameter FAILS for now\n{0}    {5}print{0} {12}$thing{10};{0}\n{10}}{0}\n{5}sub{0} {11}foo{0} {10}({12}$filter{10},{0} {14}%inputs{10}){0} {10}{{0}\t\t{2}# slurpy parameter, hash type\n{0}    {5}print{0} {12}$filter{10}->({12}$_{10},{0} {12}$inputs{10}{{12}$_{10}}){0} {5}foreach{0} {5}sort{0} {5}keys{0} {14}%inputs{10};{0}\n{10}}{0}\n{5}sub{0} {11}foo{0} {10}({12}$thing{10},{0} {10}%){0} {10}{{0}\t\t\t{2}# nameless slurpy parm, hash type FAILS for now\n{0}    {5}print{0} {12}$thing{10};{0}\n{10}}{0}\n{5}sub{0} {11}foo{0} {40}(){0} {10}{{0}\t\t\t\t{2}# empty signature no arguments (styled as prototype)\n{0}    {5}return{0} {4}123{10};{0}\n{10}}{0}\n\n{2}#--------------------------------------------------------------------------\n# perl-test-5200delta.pl\n#--------------------------------------------------------------------------\n# subs now take a prototype attribute\n#--------------------------------------------------------------------------\n{0}\n{5}sub{0} {11}foo{0} {10}:{5}prototype{40}($){0} {10}{{0} {12}$_{10}[{4}0{10}]{0} {10}}{0}\n\n{5}sub{0} {11}foo{0} {10}:{5}prototype{40}($$){0} {10}({12}$left{10},{0} {12}$right{10}){0} {10}{{0}\n    {5}return{0} {12}$left{0} {10}+{0} {12}$right{10};{0}\n{10}}{0}\n\n{5}sub{0} {11}foo{0} {10}:{0} {5}prototype{40}($$){10}{}{0}\t\t{2}# whitespace allowed\n{0}\n{2}# additional samples from perl-test-cases.pl with ':prototype' added:\n{5}sub{0} {11}mylink{0} {10}:{5}prototype{40}($$){0} {10}{}{0}\t\t{5}sub{0} {11}myvec{0} {10}:{5}prototype{40}($$$){0} {10}{}{0}\n{5}sub{0} {11}myindex{0} {10}:{5}prototype{40}($$;$){0} {10}{}{0}\t\t{5}sub{0} {11}mysyswrite{0} {10}:{5}prototype{40}($$$;$){0} {10}{}{0}\n{5}sub{0} {11}myreverse{0} {10}:{5}prototype{40}(@){0} {10}{}{0}\t\t{5}sub{0} {11}myjoin{0} {10}:{5}prototype{40}($@){0} {10}{}{0}\n{5}sub{0} {11}mypop{0} {10}:{5}prototype{40}(\\@){0} {10}{}{0}\t\t{5}sub{0} {11}mysplice{0} {10}:{5}prototype{40}(\\@$$@){0} {10}{}{0}\n{5}sub{0} {11}mykeys{0} {10}:{5}prototype{40}(\\%){0} {10}{}{0}\t\t{5}sub{0} {11}myopen{0} {10}:{5}prototype{40}(*;$){0} {10}{}{0}\n{5}sub{0} {11}mypipe{0} {10}:{5}prototype{40}(**){0} {10}{}{0}\t\t{5}sub{0} {11}mygrep{0} {10}:{5}prototype{40}(&@){0} {10}{}{0}\n{5}sub{0} {11}myrand{0} {10}:{5}prototype{40}($){0} {10}{}{0}\t\t{5}sub{0} {11}mytime{0} {10}:{5}prototype{40}(){0} {10}{}{0}\n{2}# backslash group notation to specify more than one allowed argument type\n{5}sub{0} {11}myref{0} {10}:{5}prototype{40}(\\[$@%&*]){0} {10}{}{0}\n\n{2}# additional attributes may complicate scanning for prototype syntax,\n# for example (from https://metacpan.org/pod/perlsub):\n# Lvalue subroutines\n{0}\n{5}my{0} {12}$val{10};{0}\n{5}sub{0} {11}canmod{0} {10}:{0} {11}lvalue{0} {10}{{0}\n    {12}$val{10};{0}  {2}# or:  return $val;\n{10}}{0}\n{11}canmod{10}(){0} {10}={0} {4}5{10};{0}   {2}# assigns to $val\n{0}\n{2}#--------------------------------------------------------------------------\n# perl-test-5220delta.pl\n#--------------------------------------------------------------------------\n# New :const subroutine attribute\n#--------------------------------------------------------------------------\n{0}\n{5}my{0} {12}$x{0} {10}={0} {4}54321{10};{0}\n{15}*INLINED{0} {10}={0} {5}sub{0} {10}:{0} {11}const{0} {10}{{0} {12}$x{0} {10}};{0}\n{12}$x{10}++;{0}\n\n{2}# more examples of attributes\n# (not 5.22 stuff, but some general examples for study, useful for\n#  handling subroutine signature and subroutine prototype highlighting)\n{0}\n{5}sub{0} {11}foo{0} {10}:{0} {11}lvalue{0} {10};{0}\n\n{5}package{0} {11}X{10};{0}\n{5}sub{0} {11}Y{10}::{11}z{0} {10}:{0} {11}lvalue{0} {10}{{0} {4}1{0} {10}}{0}\n\n{5}package{0} {11}X{10};{0}\n{5}sub{0} {11}foo{0} {10}{{0} {4}1{0} {10}}{0}\n{5}package{0} {11}Y{10};{0}\n{5}BEGIN{0} {10}{{0} {15}*bar{0} {10}={0} {10}\\&{11}X{10}::{11}foo{10};{0} {10}}{0}\n{5}package{0} {11}Z{10};{0}\n{5}sub{0} {11}Y{10}::{11}bar{0} {10}:{0} {11}lvalue{0} {10};{0}\n\n{2}# built-in attributes for subroutines:\n{11}lvalue{0} {11}method{0} {5}prototype{10}(..){0} {11}locked{0} {11}const{0}\n\n{2}#--------------------------------------------------------------------------\n# end of test file\n#--------------------------------------------------------------------------\n"
  },
  {
    "path": "lexilla/test/examples/perl/x.pl",
    "content": "use strict;\nwhile ( $r ) {\n  printf ( \"Example text \\n\" );\n  sleep 1;\n}"
  },
  {
    "path": "lexilla/test/examples/perl/x.pl.folded",
    "content": " 0 400 400   use strict;\n 2 400 401 + while ( $r ) {\n 0 401 401 |   printf ( \"Example text \\n\" );\n 0 401 401 |   sleep 1;\n 0 401   0 | }"
  },
  {
    "path": "lexilla/test/examples/perl/x.pl.styled",
    "content": "{5}use{0} {11}strict{10};{0}\n{5}while{0} {10}({0} {12}$r{0} {10}){0} {10}{{0}\n  {5}printf{0} {10}({0} {6}\"Example text \\n\"{0} {10});{0}\n  {5}sleep{0} {4}1{10};{0}\n{10}}"
  },
  {
    "path": "lexilla/test/examples/powershell/AllStyles.ps1",
    "content": "# Enumerate all styles: 0 to 16\n\n# line comment = 1\n# more comment\n\n# whitespace = 0\n    # spaces\n\n# string = 2\n\"a string\"\n\n# character = 3\n'c'\n\n# number = 4\n123\n\n# variable = 5\n$variable\n\n# operator = 6\n();\n\n# identifier = 7\nidentifier\n\n# keyword = 8\nbreak\n;\n\n# cmdlet = 9\nWrite-Output \"test output\"\n\n# alias = 10\nchdir C:\\Temp\\\n\n# function = 11\nGet-Verb -Group Security\n\n# user-defined keyword = 12\nlexilla\n\n# multi-line comment = 13\n<#\nmulti-line comment\n#>\n\n# here string = 14\n@\"\nhere string double\n\"@\n\n# here string single quote = 15\n@'\nhere string single\n'@\n\n# comment keyword = 16\n<#\n.synopsis\nEnd of file.\n#>\n"
  },
  {
    "path": "lexilla/test/examples/powershell/AllStyles.ps1.folded",
    "content": " 0 400 400   # Enumerate all styles: 0 to 16\n 1 400 400   \n 0 400 400   # line comment = 1\n 0 400 400   # more comment\n 1 400 400   \n 0 400 400   # whitespace = 0\n 0 400 400       # spaces\n 1 400 400   \n 0 400 400   # string = 2\n 0 400 400   \"a string\"\n 1 400 400   \n 0 400 400   # character = 3\n 0 400 400   'c'\n 1 400 400   \n 0 400 400   # number = 4\n 0 400 400   123\n 1 400 400   \n 0 400 400   # variable = 5\n 0 400 400   $variable\n 1 400 400   \n 0 400 400   # operator = 6\n 0 400 400   ();\n 1 400 400   \n 0 400 400   # identifier = 7\n 0 400 400   identifier\n 1 400 400   \n 0 400 400   # keyword = 8\n 0 400 400   break\n 0 400 400   ;\n 1 400 400   \n 0 400 400   # cmdlet = 9\n 0 400 400   Write-Output \"test output\"\n 1 400 400   \n 0 400 400   # alias = 10\n 0 400 400   chdir C:\\Temp\\\n 1 400 400   \n 0 400 400   # function = 11\n 0 400 400   Get-Verb -Group Security\n 1 400 400   \n 0 400 400   # user-defined keyword = 12\n 0 400 400   lexilla\n 1 400 400   \n 0 400 400   # multi-line comment = 13\n 0 400 400   <#\n 0 400 400   multi-line comment\n 0 400 400   #>\n 1 400 400   \n 0 400 400   # here string = 14\n 0 400 400   @\"\n 0 400 400   here string double\n 0 400 400   \"@\n 1 400 400   \n 0 400 400   # here string single quote = 15\n 0 400 400   @'\n 0 400 400   here string single\n 0 400 400   '@\n 1 400 400   \n 0 400 400   # comment keyword = 16\n 0 400 400   <#\n 0 400 400   .synopsis\n 0 400 400   End of file.\n 0 400 400   #>\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/powershell/AllStyles.ps1.styled",
    "content": "{1}# Enumerate all styles: 0 to 16{0}\n\n{1}# line comment = 1{0}\n{1}# more comment{0}\n\n{1}# whitespace = 0{0}\n    {1}# spaces{0}\n\n{1}# string = 2{0}\n{2}\"a string\"{0}\n\n{1}# character = 3{0}\n{3}'c'{0}\n\n{1}# number = 4{0}\n{4}123{0}\n\n{1}# variable = 5{0}\n{5}$variable{0}\n\n{1}# operator = 6{0}\n{6}();{0}\n\n{1}# identifier = 7{0}\n{7}identifier{0}\n\n{1}# keyword = 8{0}\n{8}break{0}\n{6};{0}\n\n{1}# cmdlet = 9{0}\n{9}Write-Output{0} {2}\"test output\"{0}\n\n{1}# alias = 10{0}\n{10}chdir{0} {7}C{6}:{0}\\{7}Temp{0}\\\n\n{1}# function = 11{0}\n{11}Get-Verb{0} {6}-{7}Group{0} {7}Security{0}\n\n{1}# user-defined keyword = 12{0}\n{12}lexilla{0}\n\n{1}# multi-line comment = 13{0}\n{13}<#\nmulti-line comment\n#>{0}\n\n{1}# here string = 14{0}\n{14}@\"\nhere string double\n\"@{0}\n\n{1}# here string single quote = 15{0}\n{15}@'\nhere string single\n'@{0}\n\n{1}# comment keyword = 16{0}\n{13}<#\n{16}.synopsis{13}\nEnd of file.\n#>{0}\n"
  },
  {
    "path": "lexilla/test/examples/powershell/CharacterTruncation.ps1",
    "content": "# -*- coding: utf-8 -*-\n# Show problem with character value truncation causing U+0121 'ġ' (LATIN SMALL LETTER G WITH DOT ABOVE)\n# to be styled as an operator as static_cast<char>(0x121) = 0x21 == '!' which is an operator\n\n# Isolate\nġ\n\n# Continuing from operator\n(ġ)\n"
  },
  {
    "path": "lexilla/test/examples/powershell/CharacterTruncation.ps1.folded",
    "content": " 0 400 400   # -*- coding: utf-8 -*-\n 0 400 400   # Show problem with character value truncation causing U+0121 'ġ' (LATIN SMALL LETTER G WITH DOT ABOVE)\n 0 400 400   # to be styled as an operator as static_cast<char>(0x121) = 0x21 == '!' which is an operator\n 1 400 400   \n 0 400 400   # Isolate\n 0 400 400   ġ\n 1 400 400   \n 0 400 400   # Continuing from operator\n 0 400 400   (ġ)\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/powershell/CharacterTruncation.ps1.styled",
    "content": "{1}# -*- coding: utf-8 -*-{0}\n{1}# Show problem with character value truncation causing U+0121 'ġ' (LATIN SMALL LETTER G WITH DOT ABOVE){0}\n{1}# to be styled as an operator as static_cast<char>(0x121) = 0x21 == '!' which is an operator{0}\n\n{1}# Isolate{0}\n{7}ġ{0}\n\n{1}# Continuing from operator{0}\n{6}({7}ġ{6}){0}\n"
  },
  {
    "path": "lexilla/test/examples/powershell/NumericLiterals.ps1",
    "content": "# Treat any leading [-+] as default to reduce match complexity\n# https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_numeric_literals?view=powershell-7.3#examples\n100\n100u\n100D\n100l\n100uL\n100us\n100uy\n100y\n1e2\n1.e2\n0x1e2\n0x1e2L\n0x1e2D\n482D\n482gb\n482ngb\n0x1e2lgb\n0b1011011\n0xFFFFs\n0xFFFFFFFF\n-0xFFFFFFFF\n0xFFFFFFFFu\n\n# Float\n0.5\n.5\n\n# Range\n1..100\n\n# Issue118: 7d is numeric while 7z is user defined keyword\n7d\n7z\n"
  },
  {
    "path": "lexilla/test/examples/powershell/NumericLiterals.ps1.folded",
    "content": " 0 400 400   # Treat any leading [-+] as default to reduce match complexity\n 0 400 400   # https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_numeric_literals?view=powershell-7.3#examples\n 0 400 400   100\n 0 400 400   100u\n 0 400 400   100D\n 0 400 400   100l\n 0 400 400   100uL\n 0 400 400   100us\n 0 400 400   100uy\n 0 400 400   100y\n 0 400 400   1e2\n 0 400 400   1.e2\n 0 400 400   0x1e2\n 0 400 400   0x1e2L\n 0 400 400   0x1e2D\n 0 400 400   482D\n 0 400 400   482gb\n 0 400 400   482ngb\n 0 400 400   0x1e2lgb\n 0 400 400   0b1011011\n 0 400 400   0xFFFFs\n 0 400 400   0xFFFFFFFF\n 0 400 400   -0xFFFFFFFF\n 0 400 400   0xFFFFFFFFu\n 1 400 400   \n 0 400 400   # Float\n 0 400 400   0.5\n 0 400 400   .5\n 1 400 400   \n 0 400 400   # Range\n 0 400 400   1..100\n 1 400 400   \n 0 400 400   # Issue118: 7d is numeric while 7z is user defined keyword\n 0 400 400   7d\n 0 400 400   7z\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/powershell/NumericLiterals.ps1.styled",
    "content": "{1}# Treat any leading [-+] as default to reduce match complexity{0}\n{1}# https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_numeric_literals?view=powershell-7.3#examples{0}\n{4}100{0}\n{4}100u{0}\n{4}100D{0}\n{4}100l{0}\n{4}100uL{0}\n{4}100us{0}\n{4}100uy{0}\n{4}100y{0}\n{4}1e2{0}\n{4}1.e2{0}\n{4}0x1e2{0}\n{4}0x1e2L{0}\n{4}0x1e2D{0}\n{4}482D{0}\n{4}482gb{0}\n{4}482ngb{0}\n{4}0x1e2lgb{0}\n{4}0b1011011{0}\n{4}0xFFFFs{0}\n{4}0xFFFFFFFF{0}\n{6}-{4}0xFFFFFFFF{0}\n{4}0xFFFFFFFFu{0}\n\n{1}# Float{0}\n{4}0.5{0}\n{4}.5{0}\n\n{1}# Range{0}\n{4}1{6}..{4}100{0}\n\n{1}# Issue118: 7d is numeric while 7z is user defined keyword{0}\n{4}7d{0}\n{12}7z{0}\n"
  },
  {
    "path": "lexilla/test/examples/powershell/Pull92.ps1",
    "content": "<# Tests for PowerShell #>\n\n<# Backticks should escape in double quoted strings #>\n$double_quote_str_esc_1 = \"`\"XXX`\"\"\n$double_quote_str_esc_2 = \"This `\"string`\" `$useses `r`n Backticks '``'\"\n\n<# Backticks should be ignored in quoted strings #>\n$single_quote_str_esc_1 = 'XXX`'\n$single_quote_str_esc_2 = 'XXX```'\n"
  },
  {
    "path": "lexilla/test/examples/powershell/Pull92.ps1.folded",
    "content": " 0 400 400   <# Tests for PowerShell #>\n 1 400 400   \n 0 400 400   <# Backticks should escape in double quoted strings #>\n 0 400 400   $double_quote_str_esc_1 = \"`\"XXX`\"\"\n 0 400 400   $double_quote_str_esc_2 = \"This `\"string`\" `$useses `r`n Backticks '``'\"\n 1 400 400   \n 0 400 400   <# Backticks should be ignored in quoted strings #>\n 0 400 400   $single_quote_str_esc_1 = 'XXX`'\n 0 400 400   $single_quote_str_esc_2 = 'XXX```'\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/powershell/Pull92.ps1.styled",
    "content": "{13}<# Tests for PowerShell #>{0}\n\n{13}<# Backticks should escape in double quoted strings #>{0}\n{5}$double_quote_str_esc_1{0} {6}={0} {2}\"`\"XXX`\"\"{0}\n{5}$double_quote_str_esc_2{0} {6}={0} {2}\"This `\"string`\" `$useses `r`n Backticks '``'\"{0}\n\n{13}<# Backticks should be ignored in quoted strings #>{0}\n{5}$single_quote_str_esc_1{0} {6}={0} {3}'XXX`'{0}\n{5}$single_quote_str_esc_2{0} {6}={0} {3}'XXX```'{0}\n"
  },
  {
    "path": "lexilla/test/examples/powershell/Pull99Comment.ps1",
    "content": "# End comment before \\r carriage return.\n"
  },
  {
    "path": "lexilla/test/examples/powershell/Pull99Comment.ps1.folded",
    "content": " 0 400 400   # End comment before \\r carriage return.\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/powershell/Pull99Comment.ps1.styled",
    "content": "{1}# End comment before \\r carriage return.{0}\n"
  },
  {
    "path": "lexilla/test/examples/powershell/SciTE.properties",
    "content": "lexer.*.ps1=powershell\nfold=1\n\nkeywords.*.ps1=break if else in local\nkeywords2.*.ps1=write-host write-output\nkeywords3.*.ps1=cd chdir cat\nkeywords4.*.ps1=mkdir prompt get-verb\nkeywords5.*.ps1=lexilla 7z\nkeywords6.*.ps1=synopsis\n"
  },
  {
    "path": "lexilla/test/examples/props/Issue96Folding.props",
    "content": "; comment\n[empty section]\n[normal section]\n@=default\nkey=value\n"
  },
  {
    "path": "lexilla/test/examples/props/Issue96Folding.props.folded",
    "content": " 0 400   0   ; comment\n 0 400   0   [empty section]\n 2 400   0 + [normal section]\n 0 401   0 | @=default\n 0 401   0 | key=value\n 0 401   0 | "
  },
  {
    "path": "lexilla/test/examples/props/Issue96Folding.props.styled",
    "content": "{1}; comment\n{2}[empty section]\n[normal section]\n{4}@{0}=default\n{5}key{3}={0}value\n"
  },
  {
    "path": "lexilla/test/examples/props/SciTE.properties",
    "content": "lexer.*.session=props\nlexer.*.props=props\nfold=1\n"
  },
  {
    "path": "lexilla/test/examples/props/example.session",
    "content": "# Default=0\na\n\n# Comment=1\n\n\n# Heading=2\n[heading]\n\n\n# Assignment=3\n=\n\n# Default Value=4\n@\n\n# Key=5\nkey=\n\n"
  },
  {
    "path": "lexilla/test/examples/props/example.session.folded",
    "content": " 0 400   0   # Default=0\n 0 400   0   a\n 1 400   0   \n 0 400   0   # Comment=1\n 1 400   0   \n 1 400   0   \n 0 400   0   # Heading=2\n 2 400   0 + [heading]\n 1 401   0 | \n 1 401   0 | \n 0 401   0 | # Assignment=3\n 0 401   0 | =\n 1 401   0 | \n 0 401   0 | # Default Value=4\n 0 401   0 | @\n 1 401   0 | \n 0 401   0 | # Key=5\n 0 401   0 | key=\n 1 401   0 | \n 0 401   0 | "
  },
  {
    "path": "lexilla/test/examples/props/example.session.styled",
    "content": "{1}# Default=0\n{0}a\n\n{1}# Comment=1\n{0}\n\n{1}# Heading=2\n{2}[heading]\n{0}\n\n{1}# Assignment=3\n{3}={0}\n\n{1}# Default Value=4\n{4}@{0}\n\n{1}# Key=5\n{5}key{3}={0}\n\n"
  },
  {
    "path": "lexilla/test/examples/python/AllStyles.py",
    "content": "# Enumerate all styles: 0 to 19\n# comment=1\n\n# whitespace=0\n\t# w\n\n# number=2\n37\n\n# double-quoted-string=3\n\"str\"\n\n# single-quoted-string=4\n'str'\n\n# keyword=5\npass\n\n# triple-quoted-string=6\n'''str'''\n\n# triple-double-quoted-string=7\n\"\"\"str\"\"\"\n\n# class-name=8\nclass ClassName:\n\tpass\n\n# function-name=9\ndef function_name():\n\tpass\n\n# operator=10\n1 + 3\n\n# identifier=11\nidentifier = 2\n\n# comment-block=12\n## block\n\n# unclosed-string=13\n\" unclosed\n\n# highlighted-identifier=14\nhilight = 2\n\n# decorator=15\n@staticmethod\ndef fn(): pass\n\na = 1\n# double-quoted-f-string=16\nf\"{a}\"\n\n# single-quoted-f-string=17\nf'{a}'\n\n# triple-quoted-f-string=18\nf'''{a}'''\n\n# double-triple-quoted-f-string=19\nf\"\"\"{a}\"\"\"\n"
  },
  {
    "path": "lexilla/test/examples/python/AllStyles.py.folded",
    "content": " 0 400   0   # Enumerate all styles: 0 to 19\n 0 400   0   # comment=1\n 1 400   0   \n 0 400   0   # whitespace=0\n 0 400   0   \t# w\n 1 400   0   \n 0 400   0   # number=2\n 0 400   0   37\n 1 400   0   \n 0 400   0   # double-quoted-string=3\n 0 400   0   \"str\"\n 1 400   0   \n 0 400   0   # single-quoted-string=4\n 0 400   0   'str'\n 1 400   0   \n 0 400   0   # keyword=5\n 0 400   0   pass\n 1 400   0   \n 0 400   0   # triple-quoted-string=6\n 0 400   0   '''str'''\n 1 400   0   \n 0 400   0   # triple-double-quoted-string=7\n 0 400   0   \"\"\"str\"\"\"\n 1 400   0   \n 0 400   0   # class-name=8\n 2 400   0 + class ClassName:\n 0 408   0 | \tpass\n 1 400   0   \n 0 400   0   # function-name=9\n 2 400   0 + def function_name():\n 0 408   0 | \tpass\n 1 400   0   \n 0 400   0   # operator=10\n 0 400   0   1 + 3\n 1 400   0   \n 0 400   0   # identifier=11\n 0 400   0   identifier = 2\n 1 400   0   \n 0 400   0   # comment-block=12\n 0 400   0   ## block\n 1 400   0   \n 0 400   0   # unclosed-string=13\n 0 400   0   \" unclosed\n 1 400   0   \n 0 400   0   # highlighted-identifier=14\n 0 400   0   hilight = 2\n 1 400   0   \n 0 400   0   # decorator=15\n 0 400   0   @staticmethod\n 0 400   0   def fn(): pass\n 1 400   0   \n 0 400   0   a = 1\n 0 400   0   # double-quoted-f-string=16\n 0 400   0   f\"{a}\"\n 1 400   0   \n 0 400   0   # single-quoted-f-string=17\n 0 400   0   f'{a}'\n 1 400   0   \n 0 400   0   # triple-quoted-f-string=18\n 0 400   0   f'''{a}'''\n 1 400   0   \n 0 400   0   # double-triple-quoted-f-string=19\n 0 400   0   f\"\"\"{a}\"\"\"\n 1 400   0   "
  },
  {
    "path": "lexilla/test/examples/python/AllStyles.py.styled",
    "content": "{1}# Enumerate all styles: 0 to 19{0}\n{1}# comment=1{0}\n\n{1}# whitespace=0{0}\n\t{1}# w{0}\n\n{1}# number=2{0}\n{2}37{0}\n\n{1}# double-quoted-string=3{0}\n{3}\"str\"{0}\n\n{1}# single-quoted-string=4{0}\n{4}'str'{0}\n\n{1}# keyword=5{0}\n{5}pass{0}\n\n{1}# triple-quoted-string=6{0}\n{6}'''str'''{0}\n\n{1}# triple-double-quoted-string=7{0}\n{7}\"\"\"str\"\"\"{0}\n\n{1}# class-name=8{0}\n{5}class{0} {8}ClassName{10}:{0}\n\t{5}pass{0}\n\n{1}# function-name=9{0}\n{5}def{0} {9}function_name{10}():{0}\n\t{5}pass{0}\n\n{1}# operator=10{0}\n{2}1{0} {10}+{0} {2}3{0}\n\n{1}# identifier=11{0}\n{11}identifier{0} {10}={0} {2}2{0}\n\n{1}# comment-block=12{0}\n{12}## block{0}\n\n{1}# unclosed-string=13{0}\n{13}\" unclosed\n{0}\n{1}# highlighted-identifier=14{0}\n{14}hilight{0} {10}={0} {2}2{0}\n\n{1}# decorator=15{0}\n{15}@staticmethod{0}\n{5}def{0} {9}fn{10}():{0} {5}pass{0}\n\n{11}a{0} {10}={0} {2}1{0}\n{1}# double-quoted-f-string=16{0}\n{16}f\"{{11}a{16}}\"{0}\n\n{1}# single-quoted-f-string=17{0}\n{17}f'{{11}a{17}}'{0}\n\n{1}# triple-quoted-f-string=18{0}\n{18}f'''{{11}a{18}}'''{0}\n\n{1}# double-triple-quoted-f-string=19{0}\n{19}f\"\"\"{{11}a{19}}\"\"\"{0}\n"
  },
  {
    "path": "lexilla/test/examples/python/SciTE.properties",
    "content": "lexer.*.py=python\nkeywords.*.py=case class def else for if import in match pass print return while with yield\nkeywords2.*.py=hilight\nfold=1\nfold.compact=1\n"
  },
  {
    "path": "lexilla/test/examples/python/attributes/SciTE.properties",
    "content": "lexer.*.py=python\nkeywords.*.py=class def else for if import in pass print return while with yield\nkeywords2.*.py=hilight\nfold=1\nfold.compact=1\nlexer.python.identifier.attributes=1\nlexer.python.decorator.attributes=1\n\nsubstyles.python.11=3\nsubstylewords.11.3.$(file.patterns.py)=findall replace\nstyle.python.11.3=fore:#EEAA80,italics,bold\n"
  },
  {
    "path": "lexilla/test/examples/python/attributes/attributes.py",
    "content": "# attributes=20\ns = \"thing thing\".findall(\"thing\")\na.very.complicated.expression.findall(\"test\")\n# fake out.\nb.very.complicated.expression.\n    findall(\"test2\")\nc.very.complicated.expression. \\\n    findall(\"test3\")\nd.very.complicated.expression.\\\n    findall(\"test4\")\n@staticmethod.attrtest\n@staticmethod.\nattrtest\n@staticmethod. \\\nattrtest\n@staticmethod.\\\nattrtest\n"
  },
  {
    "path": "lexilla/test/examples/python/attributes/attributes.py.folded",
    "content": " 0 400   0   # attributes=20\n 0 400   0   s = \"thing thing\".findall(\"thing\")\n 0 400   0   a.very.complicated.expression.findall(\"test\")\n 0 400   0   # fake out.\n 2 400   0 + b.very.complicated.expression.\n 0 404   0 |     findall(\"test2\")\n 2 400   0 + c.very.complicated.expression. \\\n 0 404   0 |     findall(\"test3\")\n 2 400   0 + d.very.complicated.expression.\\\n 0 404   0 |     findall(\"test4\")\n 0 400   0   @staticmethod.attrtest\n 0 400   0   @staticmethod.\n 0 400   0   attrtest\n 0 400   0   @staticmethod. \\\n 0 400   0   attrtest\n 0 400   0   @staticmethod.\\\n 0 400   0   attrtest\n 1 400   0   "
  },
  {
    "path": "lexilla/test/examples/python/attributes/attributes.py.styled",
    "content": "{1}# attributes=20{0}\n{11}s{0} {10}={0} {3}\"thing thing\"{10}.{20}findall{10}({3}\"thing\"{10}){0}\n{11}a{10}.{20}very{10}.{20}complicated{10}.{20}expression{10}.{20}findall{10}({3}\"test\"{10}){0}\n{1}# fake out.{0}\n{11}b{10}.{20}very{10}.{20}complicated{10}.{20}expression{10}.{0}\n    {20}findall{10}({3}\"test2\"{10}){0}\n{11}c{10}.{20}very{10}.{20}complicated{10}.{20}expression{10}.{0} \\\n    {20}findall{10}({3}\"test3\"{10}){0}\n{11}d{10}.{20}very{10}.{20}complicated{10}.{20}expression{10}.{0}\\\n    {20}findall{10}({3}\"test4\"{10}){0}\n{15}@staticmethod{10}.{15}attrtest{0}\n{15}@staticmethod{10}.{0}\n{15}attrtest{0}\n{15}@staticmethod{10}.{0} \\\n{15}attrtest{0}\n{15}@staticmethod{10}.{0}\\\n{15}attrtest{0}\n"
  },
  {
    "path": "lexilla/test/examples/python/f-strings.py",
    "content": "# Simple nesting\nf\" { \"\" } \"\n\n# Multi-line field with comment\nf\" {\n\n\"\" # comment\n\n} \"\n\n# Single quoted continued with \\\nf\" \\\n\"\n\n# 4 nested f-strings\nf'Outer {f\"nested {1} {f\"nested {2} {f\"nested {3} {f\"nested {4}\"}\"}\"}\"}'\n"
  },
  {
    "path": "lexilla/test/examples/python/f-strings.py.folded",
    "content": " 0 400   0   # Simple nesting\n 0 400   0   f\" { \"\" } \"\n 1 400   0   \n 0 400   0   # Multi-line field with comment\n 0 400   0   f\" {\n 1 400   0   \n 0 400   0   \"\" # comment\n 1 400   0   \n 0 400   0   } \"\n 1 400   0   \n 0 400   0   # Single quoted continued with \\\n 0 400   0   f\" \\\n 0 400   0   \"\n 1 400   0   \n 0 400   0   # 4 nested f-strings\n 0 400   0   f'Outer {f\"nested {1} {f\"nested {2} {f\"nested {3} {f\"nested {4}\"}\"}\"}\"}'\n 1 400   0   "
  },
  {
    "path": "lexilla/test/examples/python/f-strings.py.styled",
    "content": "{1}# Simple nesting{0}\n{16}f\" {{0} {3}\"\"{0} {16}} \"{0}\n\n{1}# Multi-line field with comment{0}\n{16}f\" {{0}\n\n{3}\"\"{0} {1}# comment{0}\n\n{16}} \"{0}\n\n{1}# Single quoted continued with \\{0}\n{16}f\" \\\n\"{0}\n\n{1}# 4 nested f-strings{0}\n{17}f'Outer {{16}f\"nested {{2}1{16}} {f\"nested {{2}2{16}} {f\"nested {{2}3{16}} {f\"nested {{2}4{16}}\"}\"}\"}\"{17}}'{0}\n"
  },
  {
    "path": "lexilla/test/examples/python/matchcase.py",
    "content": "# Match and case as keywords\nmatch (x):\n    case +1:\n        pass\n    case -1:\n        pass\n    case []:\n        pass\n    \n# Match and case as identifiers\nmatch = 1\ndef match():\n    pass\nmatch.group()\n1 + match\ncase.attribute\n\n# Unfortunately wrong classifications; should be rare in real code because\n# non-call expressions usually don't begin lines, the exceptions are match(x)\n# and case(x)\nmatch(x)\ncase(x)\nmatch + 1\ncase + 1\ncase[1]\n"
  },
  {
    "path": "lexilla/test/examples/python/matchcase.py.folded",
    "content": " 0 400   0   # Match and case as keywords\n 2 400   0 + match (x):\n 2 404   0 +     case +1:\n 0 408   0 |         pass\n 2 404   0 +     case -1:\n 0 408   0 |         pass\n 2 404   0 +     case []:\n 0 408   0 |         pass\n 1 408   0 |     \n 0 400   0   # Match and case as identifiers\n 0 400   0   match = 1\n 2 400   0 + def match():\n 0 404   0 |     pass\n 0 400   0   match.group()\n 0 400   0   1 + match\n 0 400   0   case.attribute\n 1 400   0   \n 0 400   0   # Unfortunately wrong classifications; should be rare in real code because\n 0 400   0   # non-call expressions usually don't begin lines, the exceptions are match(x)\n 0 400   0   # and case(x)\n 0 400   0   match(x)\n 0 400   0   case(x)\n 0 400   0   match + 1\n 0 400   0   case + 1\n 0 400   0   case[1]\n 1 400   0   "
  },
  {
    "path": "lexilla/test/examples/python/matchcase.py.styled",
    "content": "{1}# Match and case as keywords{0}\n{5}match{0} {10}({11}x{10}):{0}\n    {5}case{0} {10}+{2}1{10}:{0}\n        {5}pass{0}\n    {5}case{0} {10}-{2}1{10}:{0}\n        {5}pass{0}\n    {5}case{0} {10}[]:{0}\n        {5}pass{0}\n    \n{1}# Match and case as identifiers{0}\n{11}match{0} {10}={0} {2}1{0}\n{5}def{0} {9}match{10}():{0}\n    {5}pass{0}\n{11}match{10}.{11}group{10}(){0}\n{2}1{0} {10}+{0} {11}match{0}\n{11}case{10}.{11}attribute{0}\n\n{1}# Unfortunately wrong classifications; should be rare in real code because{0}\n{1}# non-call expressions usually don't begin lines, the exceptions are match(x){0}\n{1}# and case(x){0}\n{5}match{10}({11}x{10}){0}\n{5}case{10}({11}x{10}){0}\n{5}match{0} {10}+{0} {2}1{0}\n{5}case{0} {10}+{0} {2}1{0}\n{5}case{10}[{2}1{10}]{0}\n"
  },
  {
    "path": "lexilla/test/examples/python/strings.py",
    "content": "# Simple raw string\nr''\n\n# Raw f-string\nrf''\nfr''\n\n# Raw byte string\nrb''\nbr''\n\n# Raw unicode strings: ur'' is valid in 2.7 (but not in 3) -- always lexed as\n# valid; ru'' is never valid\nru''\nur''\n\n"
  },
  {
    "path": "lexilla/test/examples/python/strings.py.folded",
    "content": " 0 400   0   # Simple raw string\n 0 400   0   r''\n 1 400   0   \n 0 400   0   # Raw f-string\n 0 400   0   rf''\n 0 400   0   fr''\n 1 400   0   \n 0 400   0   # Raw byte string\n 0 400   0   rb''\n 0 400   0   br''\n 1 400   0   \n 0 400   0   # Raw unicode strings: ur'' is valid in 2.7 (but not in 3) -- always lexed as\n 0 400   0   # valid; ru'' is never valid\n 0 400   0   ru''\n 0 400   0   ur''\n 1 400   0   \n 1 400   0   "
  },
  {
    "path": "lexilla/test/examples/python/strings.py.styled",
    "content": "{1}# Simple raw string{0}\n{4}r''{0}\n\n{1}# Raw f-string{0}\n{17}rf''{0}\n{17}fr''{0}\n\n{1}# Raw byte string{0}\n{4}rb''{0}\n{4}br''{0}\n\n{1}# Raw unicode strings: ur'' is valid in 2.7 (but not in 3) -- always lexed as{0}\n{1}# valid; ru'' is never valid{0}\n{11}ru{4}''{0}\n{4}ur''{0}\n\n"
  },
  {
    "path": "lexilla/test/examples/python/x.py",
    "content": "# Convert all punctuation characters except '_', '*', and '.' into spaces.\ndef depunctuate(s):\n\t'''A docstring'''\n\t\"\"\"Docstring 2\"\"\"\n\td = \"\"\n\tfor ch in s:\n\t\tif ch in 'abcde':\n\t\t\td = d + ch\n\t\telse:\n\t\t\td = d + \" \"\n\treturn d\n\nimport contextlib\n\n@contextlib.contextmanager\ndef singleuse():\n\tprint(\"Before\")\n\tyield\nwith singleuse(): pass\n"
  },
  {
    "path": "lexilla/test/examples/python/x.py.folded",
    "content": " 0 400   0   # Convert all punctuation characters except '_', '*', and '.' into spaces.\n 2 400   0 + def depunctuate(s):\n 0 408   0 | \t'''A docstring'''\n 0 408   0 | \t\"\"\"Docstring 2\"\"\"\n 0 408   0 | \td = \"\"\n 2 408   0 + \tfor ch in s:\n 2 410   0 + \t\tif ch in 'abcde':\n 0 418   0 | \t\t\td = d + ch\n 2 410   0 + \t\telse:\n 0 418   0 | \t\t\td = d + \" \"\n 0 408   0 | \treturn d\n 1 400   0   \n 0 400   0   import contextlib\n 1 400   0   \n 0 400   0   @contextlib.contextmanager\n 2 400   0 + def singleuse():\n 0 408   0 | \tprint(\"Before\")\n 0 408   0 | \tyield\n 0 400   0   with singleuse(): pass\n 1 400   0   "
  },
  {
    "path": "lexilla/test/examples/python/x.py.styled",
    "content": "{1}# Convert all punctuation characters except '_', '*', and '.' into spaces.{0}\n{5}def{0} {9}depunctuate{10}({11}s{10}):{0}\n\t{6}'''A docstring'''{0}\n\t{7}\"\"\"Docstring 2\"\"\"{0}\n\t{11}d{0} {10}={0} {3}\"\"{0}\n\t{5}for{0} {11}ch{0} {5}in{0} {11}s{10}:{0}\n\t\t{5}if{0} {11}ch{0} {5}in{0} {4}'abcde'{10}:{0}\n\t\t\t{11}d{0} {10}={0} {11}d{0} {10}+{0} {11}ch{0}\n\t\t{5}else{10}:{0}\n\t\t\t{11}d{0} {10}={0} {11}d{0} {10}+{0} {3}\" \"{0}\n\t{5}return{0} {11}d{0}\n\n{5}import{0} {11}contextlib{0}\n\n{15}@contextlib{10}.{11}contextmanager{0}\n{5}def{0} {9}singleuse{10}():{0}\n\t{5}print{10}({3}\"Before\"{10}){0}\n\t{5}yield{0}\n{5}with{0} {11}singleuse{10}():{0} {5}pass{0}\n"
  },
  {
    "path": "lexilla/test/examples/r/102Backticks.r",
    "content": "# ugly code to demonstrate multiline string.\n`Hello\nWorld` <- function(x, y, z) {\n\tprint(x);\n\tprint(y);\n\tprint(z);\n}\n`Hello\\nWorld`(\"Hello\\nMoon!\", \"Hello\nVenus\", 'Hello\\\nMars');\n"
  },
  {
    "path": "lexilla/test/examples/r/102Backticks.r.folded",
    "content": " 0 400 400   # ugly code to demonstrate multiline string.\n 0 400 400   `Hello\n 2 400 401 + World` <- function(x, y, z) {\n 0 401 401 | \tprint(x);\n 0 401 401 | \tprint(y);\n 0 401 401 | \tprint(z);\n 0 401 400 | }\n 0 400 400   `Hello\\nWorld`(\"Hello\\nMoon!\", \"Hello\n 0 400 400   Venus\", 'Hello\\\n 0 400 400   Mars');\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/r/102Backticks.r.styled",
    "content": "{1}# ugly code to demonstrate multiline string.{0}\n{12}`Hello\nWorld`{0} {8}<-{0} {9}function{8}({9}x{0}, {9}y{0}, {9}z{8}){0} {8}{{0}\n\t{9}print{8}({9}x{8}){0};\n\t{9}print{8}({9}y{8}){0};\n\t{9}print{8}({9}z{8}){0};\n{8}}{0}\n{12}`Hello\\nWorld`{8}({6}\"Hello\\nMoon!\"{0}, {6}\"Hello\nVenus\"{0}, {7}'Hello\\\nMars'{8}){0};\n"
  },
  {
    "path": "lexilla/test/examples/r/AllStyles.r",
    "content": "# https://cran.r-project.org/doc/manuals/r-release/R-lang.html#Reserved-words\nif\n\n# base keyword (3)\nabbreviate\n\n# other keyword (4)\nacme\n\n# infix operator\n# https://cran.r-project.org/doc/manuals/r-release/R-lang.html#Special-operators\n%x%\n\n# https://cran.r-project.org/doc/manuals/r-release/R-lang.html#Literal-constants\n# Valid integer constants\n1L, 0x10L, 1000000L, 1e6L\n\n# Valid numeric constants\n1 10 0.1 .2 1e-7 1.2e+7\n1.1L, 1e-3L, 0x1.1p-2\n\n# Valid complex constants\n2i 4.1i 1e-2i\n\n# https://search.r-project.org/R/refmans/base/html/Quotes.html\n# single quotes\n'\"It\\'s alive!\", he screamed.'\n\n# double quotes\n\"\\\"It's alive!\\\", he screamed.\"\n\n# escape sequence\n\"\\n0\\r1\\t2\\b3\\a4\\f5\\\\6\\'7\\\"8\\`9\"\n\"\\1230\\x121\\u12342\\U000123453\\u{1234}4\\U{00012345}5\\\n6\\ 7\"\n# issue #206\n\"\\n\"\n\"\\r\\n\"\n\n# Backticks\nd$`1st column`\n\n# double quoted raw string\nr\"---(\\1--)-)---\"\n\n# single quoted raw string\nR'---(\\1--)-)---'\n\n# infix EOL (11)\n%a\n#back to comment\n"
  },
  {
    "path": "lexilla/test/examples/r/AllStyles.r.folded",
    "content": " 0 400 400   # https://cran.r-project.org/doc/manuals/r-release/R-lang.html#Reserved-words\n 0 400 400   if\n 1 400 400   \n 0 400 400   # base keyword (3)\n 0 400 400   abbreviate\n 1 400 400   \n 0 400 400   # other keyword (4)\n 0 400 400   acme\n 1 400 400   \n 0 400 400   # infix operator\n 0 400 400   # https://cran.r-project.org/doc/manuals/r-release/R-lang.html#Special-operators\n 0 400 400   %x%\n 1 400 400   \n 0 400 400   # https://cran.r-project.org/doc/manuals/r-release/R-lang.html#Literal-constants\n 0 400 400   # Valid integer constants\n 0 400 400   1L, 0x10L, 1000000L, 1e6L\n 1 400 400   \n 0 400 400   # Valid numeric constants\n 0 400 400   1 10 0.1 .2 1e-7 1.2e+7\n 0 400 400   1.1L, 1e-3L, 0x1.1p-2\n 1 400 400   \n 0 400 400   # Valid complex constants\n 0 400 400   2i 4.1i 1e-2i\n 1 400 400   \n 0 400 400   # https://search.r-project.org/R/refmans/base/html/Quotes.html\n 0 400 400   # single quotes\n 0 400 400   '\"It\\'s alive!\", he screamed.'\n 1 400 400   \n 0 400 400   # double quotes\n 0 400 400   \"\\\"It's alive!\\\", he screamed.\"\n 1 400 400   \n 0 400 400   # escape sequence\n 0 400 400   \"\\n0\\r1\\t2\\b3\\a4\\f5\\\\6\\'7\\\"8\\`9\"\n 0 400 400   \"\\1230\\x121\\u12342\\U000123453\\u{1234}4\\U{00012345}5\\\n 0 400 400   6\\ 7\"\n 0 400 400   # issue #206\n 0 400 400   \"\\n\"\n 0 400 400   \"\\r\\n\"\n 1 400 400   \n 0 400 400   # Backticks\n 0 400 400   d$`1st column`\n 1 400 400   \n 0 400 400   # double quoted raw string\n 0 400 400   r\"---(\\1--)-)---\"\n 1 400 400   \n 0 400 400   # single quoted raw string\n 0 400 400   R'---(\\1--)-)---'\n 1 400 400   \n 0 400 400   # infix EOL (11)\n 0 400 400   %a\n 0 400 400   #back to comment\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/r/AllStyles.r.styled",
    "content": "{1}# https://cran.r-project.org/doc/manuals/r-release/R-lang.html#Reserved-words{0}\n{2}if{0}\n\n{1}# base keyword (3){0}\n{3}abbreviate{0}\n\n{1}# other keyword (4){0}\n{4}acme{0}\n\n{1}# infix operator{0}\n{1}# https://cran.r-project.org/doc/manuals/r-release/R-lang.html#Special-operators{0}\n{10}%x%{0}\n\n{1}# https://cran.r-project.org/doc/manuals/r-release/R-lang.html#Literal-constants{0}\n{1}# Valid integer constants{0}\n{5}1L{0}, {5}0x10L{0}, {5}1000000L{0}, {5}1e6L{0}\n\n{1}# Valid numeric constants{0}\n{5}1{0} {5}10{0} {5}0.1{0} {5}.2{0} {5}1e-7{0} {5}1.2e+7{0}\n{5}1.1L{0}, {5}1e-3L{0}, {5}0x1.1p-2{0}\n\n{1}# Valid complex constants{0}\n{5}2i{0} {5}4.1i{0} {5}1e-2i{0}\n\n{1}# https://search.r-project.org/R/refmans/base/html/Quotes.html{0}\n{1}# single quotes{0}\n{7}'\"It{15}\\'{7}s alive!\", he screamed.'{0}\n\n{1}# double quotes{0}\n{6}\"{15}\\\"{6}It's alive!{15}\\\"{6}, he screamed.\"{0}\n\n{1}# escape sequence{0}\n{6}\"{15}\\n{6}0{15}\\r{6}1{15}\\t{6}2{15}\\b{6}3{15}\\a{6}4{15}\\f{6}5{15}\\\\{6}6{15}\\'{6}7{15}\\\"{6}8{15}\\`{6}9\"{0}\n{6}\"{15}\\123{6}0{15}\\x12{6}1{15}\\u1234{6}2{15}\\U00012345{6}3{15}\\u{1234}{6}4{15}\\U{00012345}{6}5{15}\\{6}\n6{15}\\ {6}7\"{0}\n{1}# issue #206{0}\n{6}\"{15}\\n{6}\"{0}\n{6}\"{15}\\r\\n{6}\"{0}\n\n{1}# Backticks{0}\n{9}d{8}${12}`1st column`{0}\n\n{1}# double quoted raw string{0}\n{13}r\"---(\\1--)-)---\"{0}\n\n{1}# single quoted raw string{0}\n{14}R'---(\\1--)-)---'{0}\n\n{1}# infix EOL (11){0}\n{11}%a\n{1}#back to comment{0}\n"
  },
  {
    "path": "lexilla/test/examples/r/SciTE.properties",
    "content": "lexer.*.r=r\nkeywords.*.r=if\nkeywords2.*.r=abbreviate\nkeywords3.*.r=acme\nfold=1\nfold.compact=1\n\nmatch AllStyles.r\n\tlexer.r.escape.sequence=1\n"
  },
  {
    "path": "lexilla/test/examples/raku/SciTE.properties",
    "content": "lexer.*.p6=raku\n# Keywords (base)\nkeywords.*.p6=BEGIN CATCH CHECK CONTROL END ENTER EVAL FIRST \\\n INIT KEEP LAST LEAVE NEXT POST PRE START TEMP UNDO after also andthen as \\\n async augment bag before but category circumfix class cmp complex constant \\\n contend default defer div does dynamic else elsif enum eq eqv extra fail \\\n fatal ff fff for gather gcd ge given grammar gt handles has if infix is lcm \\\n le leave leg let lift loop lt macro make maybe method mix mod module multi \\\n ne not o only oo or orelse orwith postcircumfix postfix prefix proto regex \\\n repeat require return-rw returns role rule size_t slang start str submethod \\\n subset supersede take temp term token trusts try unit unless until when \\\n where while with without x xor xx\n# Keywords (functions)\nkeywords2.*.p6=ACCEPTS AT-KEY EVALFILE EXISTS-KEY Filetests \\\n IO STORE abs accept acos acosec acosech acosh acotan acotanh alarm and \\\n antipairs asec asech asin asinh atan atan2 atanh base bind binmode bless \\\n break caller ceiling chars chdir chmod chomp chop chr chroot chrs cis close \\\n closedir codes comb conj connect contains continue cos cosec cosech cosh \\\n cotan cotanh crypt dbm defined die do dump each elems eof exec exists exit \\\n exp expmod fc fcntl fileno flat flip flock floor fmt fork formats functions \\\n get getc getpeername getpgrp getppid getpriority getsock gist glob gmtime \\\n goto grep hyper import index int invert ioctl is-prime iterator join keyof \\\n keys kill kv last lazy lc lcfirst lines link list listen local localtime \\\n lock log log10 lsb lstat map match mkdir msb msg my narrow new next no of \\\n open ord ords our pack package pairs path pick pipe polymod pop pos pred \\\n print printf prototype push quoting race rand read readdir readline readlink \\\n readpipe recv redo ref rename requires reset return reverse rewinddir rindex \\\n rmdir roots round samecase say scalar sec sech seek seekdir select semctl \\\n semget semop send set setpgrp setpriority setsockopt shift shm shutdown sign \\\n sin sinh sleep sockets sort splice split sprintf sqrt srand stat state study \\\n sub subst substr substr-rw succ symlink sys syscall system syswrite tan tanh \\\n tc tclc tell telldir tie time times trans trim trim-leading trim-trailing \\\n truncate uc ucfirst unimatch uniname uninames uniprop uniprops unival unlink \\\n unpack unpolar unshift untie use utime values wait waitpid wantarray warn \\\n wordcase words write\n# Keywords (types)\nkeywords3.*.p6=AST Any Block Bool CallFrame Callable Code \\\n Collation Compiler Complex ComplexStr Cool CurrentThreadScheduler Date \\\n DateTime Dateish Distribution Distribution::Hash Distribution::Locally \\\n Distribution::Path Duration Encoding Encoding::Registry Endian FatRat \\\n ForeignCode HyperSeq HyperWhatever Instant Int IntStr Junction Label \\\n Lock::Async Macro Method Mu Nil Num NumStr Numeric ObjAt Parameter Perl \\\n PredictiveIterator Proxy RaceSeq Rat RatStr Rational Real Routine \\\n Routine::WrapHandle Scalar Sequence Signature Str StrDistance Stringy Sub \\\n Submethod Telemetry Telemetry::Instrument::Thread \\\n Telemetry::Instrument::ThreadPool Telemetry::Instrument::Usage \\\n Telemetry::Period Telemetry::Sampler UInt ValueObjAt Variable Version \\\n Whatever WhateverCode atomicint bit bool buf buf1 buf16 buf2 buf32 buf4 \\\n buf64 buf8 int int1 int16 int2 int32 int4 int64 int8 long longlong num \\\n num32 num64 rat rat1 rat16 rat2 rat32 rat4 rat64 rat8 uint uint1 uint16 \\\n uint2 uint32 uint4 uint64 uint8 utf16 utf32 utf8\n# Keywords (types composite)\nkeywords4.*.p6=Array Associative Bag BagHash Baggy Blob Buf \\\n Capture Enumeration Hash Iterable Iterator List Map Mix MixHash Mixy NFC NFD \\\n NFKC NFKD Pair Positional PositionalBindFailover PseudoStash QuantHash Range \\\n Seq Set SetHash Setty Slip Stash Uni utf8\n# Keywords (types domain specific)\nkeywords5.*.p6=Attribute Cancellation Channel CompUnit \\\n CompUnit::Repository CompUnit::Repository::FileSystem \\\n CompUnit::Repository::Installation Distro Grammar IO IO::ArgFiles \\\n IO::CatHandle IO::Handle IO::Notification IO::Path IO::Path::Cygwin \\\n IO::Path::QNX IO::Path::Unix IO::Path::Win32 IO::Pipe IO::Socket \\\n IO::Socket::Async IO::Socket::INET IO::Spec IO::Spec::Cygwin \\\n IO::Spec::QNX IO::Spec::Unix IO::Spec::Win32 IO::Special Kernel Lock \\\n Match Order Pod::Block Pod::Block::Code Pod::Block::Comment \\\n Pod::Block::Declarator Pod::Block::Named Pod::Block::Para Pod::Block::Table \\\n Pod::Defn Pod::FormattingCode Pod::Heading Pod::Item Proc Proc::Async \\\n Promise Regex Scheduler Semaphore Supplier Supplier::Preserving Supply \\\n Systemic Tap Thread ThreadPoolScheduler VM\n# Keywords (types domain exceptions)\nkeywords6.*.p6=Backtrace Backtrace::Frame CX::Done CX::Emit \\\n CX::Last CX::Next CX::Proceed CX::Redo CX::Return CX::Succeed CX::Take \\\n CX::Warn Exception Failure X::AdHoc X::Anon::Augment X::Anon::Multi \\\n X::Assignment::RO X::Attribute::NoPackage X::Attribute::Package \\\n X::Attribute::Required X::Attribute::Undeclared X::Augment::NoSuchType \\\n X::Bind X::Bind::NativeType X::Bind::Slice X::Caller::NotDynamic \\\n X::Channel::ReceiveOnClosed X::Channel::SendOnClosed X::Comp \\\n X::Composition::NotComposable X::Constructor::Positional X::Control \\\n X::ControlFlow X::ControlFlow::Return X::DateTime::TimezoneClash \\\n X::Declaration::Scope X::Declaration::Scope::Multi X::Does::TypeObject \\\n X::Dynamic::NotFound X::Eval::NoSuchLang X::Export::NameClash X::IO \\\n X::IO::Chdir X::IO::Chmod X::IO::Copy X::IO::Cwd X::IO::Dir X::IO::DoesNotExist \\\n X::IO::Link X::IO::Mkdir X::IO::Move X::IO::Rename X::IO::Rmdir \\\n X::IO::Symlink X::IO::Unlink X::Inheritance::NotComposed \\\n X::Inheritance::Unsupported X::Method::InvalidQualifier X::Method::NotFound \\\n X::Method::Private::Permission X::Method::Private::Unqualified \\\n X::Mixin::NotComposable X::NYI X::NoDispatcher X::Numeric::Real \\\n X::OS X::Obsolete X::OutOfRange X::Package::Stubbed X::Parameter::Default \\\n X::Parameter::MultipleTypeConstraints X::Parameter::Placeholder \\\n X::Parameter::Twigil X::Parameter::WrongOrder X::Phaser::Multiple \\\n X::Phaser::PrePost X::Placeholder::Block X::Placeholder::Mainline \\\n X::Pod X::Proc::Async X::Proc::Async::AlreadyStarted X::Proc::Async::BindOrUse \\\n X::Proc::Async::CharsOrBytes X::Proc::Async::MustBeStarted \\\n X::Proc::Async::OpenForWriting X::Proc::Async::TapBeforeSpawn \\\n X::Proc::Unsuccessful X::Promise::CauseOnlyValidOnBroken X::Promise::Vowed \\\n X::Redeclaration X::Role::Initialization X::Scheduler::CueInNaNSeconds \\\n X::Seq::Consumed X::Sequence::Deduction X::Signature::NameClash \\\n X::Signature::Placeholder X::Str::Numeric X::StubCode X::Syntax \\\n X::Syntax::Augment::WithoutMonkeyTyping X::Syntax::Comment::Embedded \\\n X::Syntax::Confused X::Syntax::InfixInTermPosition X::Syntax::Malformed \\\n X::Syntax::Missing X::Syntax::NegatedPair X::Syntax::NoSelf \\\n X::Syntax::Number::RadixOutOfRange X::Syntax::P5 X::Syntax::Perl5Var \\\n X::Syntax::Regex::Adverb X::Syntax::Regex::SolitaryQuantifier \\\n X::Syntax::Reserved X::Syntax::Self::WithoutObject \\\n X::Syntax::Signature::InvocantMarker X::Syntax::Term::MissingInitializer \\\n X::Syntax::UnlessElse X::Syntax::Variable::Match X::Syntax::Variable::Numeric \\\n X::Syntax::Variable::Twigil X::Temporal X::Temporal::InvalidFormat \\\n X::TypeCheck X::TypeCheck::Assignment X::TypeCheck::Binding \\\n X::TypeCheck::Return X::TypeCheck::Splice X::Undeclared\n# Keywords (adverbs)\nkeywords7.*.p6=D a array b backslash c closure delete double \\\n exec exists f function h hash heredoc k kv p q qq quotewords s scalar single \\\n sym to v val w words ww x\nfold.compact=1\n"
  },
  {
    "path": "lexilla/test/examples/raku/x.p6",
    "content": "use v6;\n\n# Normal single line comment\nmy Int $i = 0;\nmy Rat $r = 3.142;\nmy Str $backslash = \"\\\\\";\nmy Str $s = \"Hello, world! \\$i == $i and \\$r == $r\";\nsay $s;\n\n#`{{\n*** This is a multi-line comment ***\n}}\n\nmy @array = #`[[ inline comment ]] <f fo foo food>;\nmy %hash = ( AAA => 1, BBB => 2 );\n\nsay q[This back\\slash stays];\nsay q[This back\\\\slash stays]; # Identical output\nsay Q:q!Just a literal \"\\n\" here!;\n\n=begin pod\nPOD Documentation...\n=end pod\n\nsay qq:to/END/;\nA multi-line\nstring with interpolated vars: $i, $r\nEND\n\nsub function {\n\treturn q:to/END/;\nHere is\nsome multi-line\nstring\nEND\n}\n\nmy $func = &function;\nsay $func();\n\ngrammar Calculator {\n\ttoken TOP\t\t\t\t\t{ <calc-op> }\n\tproto rule calc-op\t\t\t{*}\n\t\t  rule calc-op:sym<add>\t{ <num> '+' <num> }\n\t\t  rule calc-op:sym<sub>\t{ <num> '-' <num> }\n    token num\t\t\t\t\t{ \\d+ }\n}\n\nclass Calculations {\n\tmethod TOP              ($/) { make $<calc-op>.made; }\n\tmethod calc-op:sym<add> ($/) { make [+] $<num>; }\n\tmethod calc-op:sym<sub> ($/) { make [-] $<num>; }\n}\n\nsay Calculator.parse('2 + 3', actions => Calculations).made;\n"
  },
  {
    "path": "lexilla/test/examples/raku/x.p6.folded",
    "content": " 0 400 400   use v6;\n 1 400 400   \n 0 400 400   # Normal single line comment\n 0 400 400   my Int $i = 0;\n 0 400 400   my Rat $r = 3.142;\n 0 400 400   my Str $backslash = \"\\\\\";\n 0 400 400   my Str $s = \"Hello, world! \\$i == $i and \\$r == $r\";\n 0 400 400   say $s;\n 1 400 400   \n 2 400 401 + #`{{\n 0 401 401 | *** This is a multi-line comment ***\n 0 401 400 | }}\n 1 400 400   \n 0 400 400   my @array = #`[[ inline comment ]] <f fo foo food>;\n 0 400 400   my %hash = ( AAA => 1, BBB => 2 );\n 1 400 400   \n 0 400 400   say q[This back\\slash stays];\n 0 400 400   say q[This back\\\\slash stays]; # Identical output\n 0 400 400   say Q:q!Just a literal \"\\n\" here!;\n 1 400 400   \n 2 400 401 + =begin pod\n 0 401 401 | POD Documentation...\n 0 401 400 | =end pod\n 1 400 400   \n 0 400 400   say qq:to/END/;\n 0 400 400   A multi-line\n 0 400 400   string with interpolated vars: $i, $r\n 0 400 400   END\n 1 400 400   \n 2 400 401 + sub function {\n 0 401 401 | \treturn q:to/END/;\n 0 401 401 | Here is\n 0 401 401 | some multi-line\n 0 401 401 | string\n 0 401 401 | END\n 0 401 400 | }\n 1 400 400   \n 0 400 400   my $func = &function;\n 0 400 400   say $func();\n 1 400 400   \n 2 400 401 + grammar Calculator {\n 0 401 401 | \ttoken TOP\t\t\t\t\t{ <calc-op> }\n 0 401 401 | \tproto rule calc-op\t\t\t{*}\n 0 401 401 | \t\t  rule calc-op:sym<add>\t{ <num> '+' <num> }\n 0 401 401 | \t\t  rule calc-op:sym<sub>\t{ <num> '-' <num> }\n 0 401 401 |     token num\t\t\t\t\t{ \\d+ }\n 0 401 400 | }\n 1 400 400   \n 2 400 401 + class Calculations {\n 0 401 401 | \tmethod TOP              ($/) { make $<calc-op>.made; }\n 0 401 401 | \tmethod calc-op:sym<add> ($/) { make [+] $<num>; }\n 0 401 401 | \tmethod calc-op:sym<sub> ($/) { make [-] $<num>; }\n 0 401 400 | }\n 1 400 400   \n 0 400 400   say Calculator.parse('2 + 3', actions => Calculations).made;\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/raku/x.p6.styled",
    "content": "{20}use{0} {16}v6{18};{0}\n\n{2}# Normal single line comment{0}\n{20}my{0} {22}Int{0} {23}$i{0} {18}={0} {16}0{18};{0}\n{20}my{0} {22}Rat{0} {23}$r{0} {18}={0} {16}3.142{18};{0}\n{20}my{0} {22}Str{0} {23}$backslash{0} {18}={0} {8}\"\\\\\"{18};{0}\n{20}my{0} {22}Str{0} {23}$s{0} {18}={0} {8}\"Hello, world! \\$i == {12}$i{8} and \\$r == {12}$r{8}\"{18};{0}\n{20}say{0} {23}$s{18};{0}\n\n{2}#`{3}{{\n*** This is a multi-line comment ***\n}}{0}\n\n{20}my{0} {24}@array{0} {18}={0} {2}#`{3}[[ inline comment ]]{0} {9}<f fo foo food>{18};{0}\n{20}my{0} {25}%hash{0} {18}={0} {18}({0} {21}AAA{0} {18}=>{0} {16}1{18},{0} {21}BBB{0} {18}=>{0} {16}2{0} {18});{0}\n\n{20}say{0} {9}q[This back\\slash stays]{18};{0}\n{20}say{0} {9}q[This back\\\\slash stays]{18};{0} {2}# Identical output{0}\n{20}say{0} {11}Q{15}:q{11}!Just a literal \"\\n\" here!{18};{0}\n\n{4}=begin pod\nPOD Documentation...\n=end pod{0}\n\n{20}say{0} {10}qq{15}:to{10}/END/{18};{0}\n{7}A multi-line\nstring with interpolated vars: {12}$i{7}, {12}$r{7}\nEND{0}\n\n{20}sub{0} {21}function{0} {18}{{0}\n\t{20}return{0} {9}q{15}:to{9}/END/{18};{0}\n{6}Here is\nsome multi-line\nstring\nEND{0}\n{18}}{0}\n\n{20}my{0} {23}$func{0} {18}={0} {26}&function{18};{0}\n{20}say{0} {23}$func{18}();{0}\n\n{19}grammar{0} {27}Calculator{0} {18}{{0}\n\t{19}token{0} {21}TOP{0}\t\t\t\t\t{13}{ <calc-op> }{0}\n\t{19}proto{0} {19}rule{0} {21}calc-op{0}\t\t\t{13}{*}{0}\n\t\t  {19}rule{0} {21}calc-op{15}:sym{18}<{21}add{18}>{0}\t{13}{ <num> '+' <num> }{0}\n\t\t  {19}rule{0} {21}calc-op{15}:sym{18}<{21}sub{18}>{0}\t{13}{ <num> '-' <num> }{0}\n    {19}token{0} {21}num{0}\t\t\t\t\t{13}{ \\d+ }{0}\n{18}}{0}\n\n{19}class{0} {28}Calculations{0} {18}{{0}\n\t{19}method{0} {21}TOP{0}              {18}({23}$/{18}){0} {18}{{0} {19}make{0} {23}${18}<{23}calc-op{18}>.{21}made{18};{0} {18}}{0}\n\t{19}method{0} {21}calc-op{15}:sym{18}<{21}add{18}>{0} {18}({23}$/{18}){0} {18}{{0} {21}make{0} {18}[+]{0} {23}${18}<{23}num{18}>;{0} {18}}{0}\n\t{19}method{0} {21}calc-op{15}:sym{18}<{21}sub{18}>{0} {18}({23}$/{18}){0} {18}{{0} {21}make{0} {18}[-]{0} {23}${18}<{23}num{18}>;{0} {18}}{0}\n{18}}{0}\n\n{20}say{0} {21}Calculator{18}.{21}parse{18}({8}'2 + 3'{18},{0} {21}actions{0} {18}=>{0} {21}Calculations{18}).{21}made{18};{0}\n"
  },
  {
    "path": "lexilla/test/examples/ruby/225NumberDotMethod.rb",
    "content": "# Float Literals\n12.34\n1234e-2\n1.234E1\n# Range Literals\n(1..2)\n(2.0..3)\n# Method on number\n1.5.ceil\n1ri.abs\n3.times {|i| puts i}\n3. times {|i| puts i}\n"
  },
  {
    "path": "lexilla/test/examples/ruby/225NumberDotMethod.rb.folded",
    "content": " 0 400   0   # Float Literals\n 0 400   0   12.34\n 0 400   0   1234e-2\n 0 400   0   1.234E1\n 0 400   0   # Range Literals\n 0 400   0   (1..2)\n 0 400   0   (2.0..3)\n 0 400   0   # Method on number\n 0 400   0   1.5.ceil\n 0 400   0   1ri.abs\n 0 400   0   3.times {|i| puts i}\n 0 400   0   3. times {|i| puts i}\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/ruby/225NumberDotMethod.rb.styled",
    "content": "{2}# Float Literals{0}\n{4}12.34{0}\n{4}1234e{10}-{4}2{0}\n{4}1.234E1{0}\n{2}# Range Literals{0}\n{10}({4}1{10}..{4}2{10}){0}\n{10}({4}2.0{10}..{4}3{10}){0}\n{2}# Method on number{0}\n{4}1.5{10}.{11}ceil{0}\n{4}1ri{10}.{11}abs{0}\n{4}3{10}.{11}times{0} {10}{|{11}i{10}|{0} {11}puts{0} {11}i{10}}{0}\n{4}3{10}.{0} {11}times{0} {10}{|{11}i{10}|{0} {11}puts{0} {11}i{10}}{0}\n"
  },
  {
    "path": "lexilla/test/examples/ruby/234HereDoc.rb",
    "content": "# encoding: utf-8\nputs <<A中\n#{1+2}\nA中\n\nputs <<中\n#{1+2}\n中\n"
  },
  {
    "path": "lexilla/test/examples/ruby/234HereDoc.rb.folded",
    "content": " 0 400   0   # encoding: utf-8\n 2 400   0 + puts <<A中\n 0 401   0 | #{1+2}\n 0 401   0 | A中\n 1 400   0   \n 2 400   0 + puts <<中\n 0 401   0 | #{1+2}\n 0 401   0 | 中\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/ruby/234HereDoc.rb.styled",
    "content": "{2}# encoding: utf-8{0}\n{11}puts{0} {10}<<{20}A中{22}\n{10}#{{4}1{10}+{4}2{10}}{22}\n{20}A中{0}\n\n{11}puts{0} {10}<<{20}中{22}\n{10}#{{4}1{10}+{4}2{10}}{22}\n{20}中{0}\n"
  },
  {
    "path": "lexilla/test/examples/ruby/AllStyles.rb",
    "content": "# Enumerate all styles where possible: 0..31,40..45\n# 30,31,40,45 are never set and 1 switches rest of file to error state\n\n#0 whitespace\n    #\n\t#\n\n#1:error, can be set with a heredoc delimiter >256 characters but that can't be recovered from\n#<<ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789\n\n#2:comment line\n\n#3:POD\n=begin\n3:POD\n=end\n\n#4:number\n4\n\n#5:word\nsuper\n\n#6:string\n\"6:double quotes\"\n\n#7:single quoted string\n'7:single quotes'\n\n#8:class name\nclass ClassName end\n\n#9:def name\ndef Function end\n\n#10:operator\n&\n\n#11:identifier\nidentifier\n\n#12:regex\n/[12a-z]/\n\n#13:global\n$global13\n\n#14:symbol\n:symbol14\n\n#15:module name\nmodule Module15 end\n\n#16:instance var\n@instance16\n\n#17:class var\n@@class17\n\n#18:back ticks\n`18`\n\n#19:data section at end of file\n\n#20:here delimiter\n<<DELIMITER20\nDELIMITER20\n\n#21:single quoted heredoc\n<<'D'\n21:here doc #{1 + 1}\nD\n\n#22:double quoted heredoc\n<<\"D\"\n22:here doc #{1 + 1}\nD\n\n#23:back tick quoted heredoc\n<<`D`\n23:here doc #{1 + 1}\nD\n\n#24:q quoted string\n%q!24:quotes's!\n\n#25:Q quoted string\n%Q!25:quotes\"s!\n\n#26:executed string\n%x(echo 26)\n\n#27:regex\n%r(27[a-z]/[A-Z]+)\n\n#28:interpolable string array\n%W(28 cgi.rb complex.rb date.rb #{1} )\n\n#29:demoted keyword do\nwhile 1 do end\n\n# 30,31,40,45 never set\n\n#41:non-interpolable string array\n%w(#{1 + 1})\n\n#42:non-interpolable symbol array\n%i(#{1 + 1})\n\n#43:interpolable symbol array\n%I(#{1 + 1})\n\n#44:symbol\n%s(#{1 + 1})\n\n#19:data section\n__END__\n\n"
  },
  {
    "path": "lexilla/test/examples/ruby/AllStyles.rb.folded",
    "content": " 0 400   0   # Enumerate all styles where possible: 0..31,40..45\n 0 400   0   # 30,31,40,45 are never set and 1 switches rest of file to error state\n 1 400   0   \n 0 400   0   #0 whitespace\n 0 400   0       #\n 0 400   0   \t#\n 1 400   0   \n 0 400   0   #1:error, can be set with a heredoc delimiter >256 characters but that can't be recovered from\n 0 400   0   #<<ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789\n 1 400   0   \n 0 400   0   #2:comment line\n 1 400   0   \n 0 400   0   #3:POD\n 0 400   0   =begin\n 0 400   0   3:POD\n 0 400   0   =end\n 1 400   0   \n 0 400   0   #4:number\n 0 400   0   4\n 1 400   0   \n 0 400   0   #5:word\n 0 400   0   super\n 1 400   0   \n 0 400   0   #6:string\n 0 400   0   \"6:double quotes\"\n 1 400   0   \n 0 400   0   #7:single quoted string\n 0 400   0   '7:single quotes'\n 1 400   0   \n 0 400   0   #8:class name\n 0 400   0   class ClassName end\n 1 400   0   \n 0 400   0   #9:def name\n 0 400   0   def Function end\n 1 400   0   \n 0 400   0   #10:operator\n 0 400   0   &\n 1 400   0   \n 0 400   0   #11:identifier\n 0 400   0   identifier\n 1 400   0   \n 0 400   0   #12:regex\n 0 400   0   /[12a-z]/\n 1 400   0   \n 0 400   0   #13:global\n 0 400   0   $global13\n 1 400   0   \n 0 400   0   #14:symbol\n 0 400   0   :symbol14\n 1 400   0   \n 0 400   0   #15:module name\n 0 400   0   module Module15 end\n 1 400   0   \n 0 400   0   #16:instance var\n 0 400   0   @instance16\n 1 400   0   \n 0 400   0   #17:class var\n 0 400   0   @@class17\n 1 400   0   \n 0 400   0   #18:back ticks\n 0 400   0   `18`\n 1 400   0   \n 0 400   0   #19:data section at end of file\n 1 400   0   \n 0 400   0   #20:here delimiter\n 2 400   0 + <<DELIMITER20\n 0 401   0 | DELIMITER20\n 1 400   0   \n 0 400   0   #21:single quoted heredoc\n 2 400   0 + <<'D'\n 0 401   0 | 21:here doc #{1 + 1}\n 0 401   0 | D\n 1 400   0   \n 0 400   0   #22:double quoted heredoc\n 2 400   0 + <<\"D\"\n 0 401   0 | 22:here doc #{1 + 1}\n 0 401   0 | D\n 1 400   0   \n 0 400   0   #23:back tick quoted heredoc\n 2 400   0 + <<`D`\n 0 401   0 | 23:here doc #{1 + 1}\n 0 401   0 | D\n 1 400   0   \n 0 400   0   #24:q quoted string\n 0 400   0   %q!24:quotes's!\n 1 400   0   \n 0 400   0   #25:Q quoted string\n 0 400   0   %Q!25:quotes\"s!\n 1 400   0   \n 0 400   0   #26:executed string\n 0 400   0   %x(echo 26)\n 1 400   0   \n 0 400   0   #27:regex\n 0 400   0   %r(27[a-z]/[A-Z]+)\n 1 400   0   \n 0 400   0   #28:interpolable string array\n 0 400   0   %W(28 cgi.rb complex.rb date.rb #{1} )\n 1 400   0   \n 0 400   0   #29:demoted keyword do\n 0 400   0   while 1 do end\n 1 400   0   \n 0 400   0   # 30,31,40,45 never set\n 1 400   0   \n 0 400   0   #41:non-interpolable string array\n 0 400   0   %w(#{1 + 1})\n 1 400   0   \n 0 400   0   #42:non-interpolable symbol array\n 0 400   0   %i(#{1 + 1})\n 1 400   0   \n 0 400   0   #43:interpolable symbol array\n 0 400   0   %I(#{1 + 1})\n 1 400   0   \n 0 400   0   #44:symbol\n 0 400   0   %s(#{1 + 1})\n 1 400   0   \n 0 400   0   #19:data section\n 0 400   0   __END__\n 1 400   0   \n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/ruby/AllStyles.rb.styled",
    "content": "{2}# Enumerate all styles where possible: 0..31,40..45{0}\n{2}# 30,31,40,45 are never set and 1 switches rest of file to error state{0}\n\n{2}#0 whitespace{0}\n    {2}#{0}\n\t{2}#{0}\n\n{2}#1:error, can be set with a heredoc delimiter >256 characters but that can't be recovered from{0}\n{2}#<<ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789{0}\n\n{2}#2:comment line{0}\n\n{2}#3:POD{0}\n{3}=begin\n3:POD\n=end{0}\n\n{2}#4:number{0}\n{4}4{0}\n\n{2}#5:word{0}\n{5}super{0}\n\n{2}#6:string{0}\n{6}\"6:double quotes\"{0}\n\n{2}#7:single quoted string{0}\n{7}'7:single quotes'{0}\n\n{2}#8:class name{0}\n{5}class{0} {8}ClassName{0} {5}end{0}\n\n{2}#9:def name{0}\n{5}def{0} {9}Function{0} {5}end{0}\n\n{2}#10:operator{0}\n{10}&{0}\n\n{2}#11:identifier{0}\n{11}identifier{0}\n\n{2}#12:regex{0}\n{12}/[12a-z]/{0}\n\n{2}#13:global{0}\n{13}$global13{0}\n\n{2}#14:symbol{0}\n{14}:symbol14{0}\n\n{2}#15:module name{0}\n{5}module{0} {15}Module15{0} {5}end{0}\n\n{2}#16:instance var{0}\n{16}@instance16{0}\n\n{2}#17:class var{0}\n{17}@@class17{0}\n\n{2}#18:back ticks{0}\n{18}`18`{0}\n\n{2}#19:data section at end of file{0}\n\n{2}#20:here delimiter{0}\n{10}<<{20}DELIMITER20{22}\n{20}DELIMITER20{0}\n\n{2}#21:single quoted heredoc{0}\n{10}<<{20}'D'{21}\n21:here doc #{1 + 1}\n{20}D{0}\n\n{2}#22:double quoted heredoc{0}\n{10}<<{20}\"D\"{22}\n22:here doc {10}#{{4}1{0} {10}+{0} {4}1{10}}{22}\n{20}D{0}\n\n{2}#23:back tick quoted heredoc{0}\n{10}<<{20}`D`{23}\n23:here doc {10}#{{4}1{0} {10}+{0} {4}1{10}}{23}\n{20}D{0}\n\n{2}#24:q quoted string{0}\n{24}%q!24:quotes's!{0}\n\n{2}#25:Q quoted string{0}\n{25}%Q!25:quotes\"s!{0}\n\n{2}#26:executed string{0}\n{26}%x(echo 26){0}\n\n{2}#27:regex{0}\n{27}%r(27[a-z]/[A-Z]+){0}\n\n{2}#28:interpolable string array{0}\n{28}%W(28 cgi.rb complex.rb date.rb {10}#{{4}1{10}}{28} ){0}\n\n{2}#29:demoted keyword do{0}\n{5}while{0} {4}1{0} {29}do{0} {5}end{0}\n\n{2}# 30,31,40,45 never set{0}\n\n{2}#41:non-interpolable string array{0}\n{41}%w(#{1 + 1}){0}\n\n{2}#42:non-interpolable symbol array{0}\n{42}%i(#{1 + 1}){0}\n\n{2}#43:interpolable symbol array{0}\n{43}%I({10}#{{4}1{0} {10}+{0} {4}1{10}}{43}){0}\n\n{2}#44:symbol{0}\n{44}%s(#{1 + 1}){0}\n\n{2}#19:data section{0}\n{19}__END__\n\n"
  },
  {
    "path": "lexilla/test/examples/ruby/Issue132.rb",
    "content": "# Bad folding when single character ')' in SCE_RB_STRING_QW #132\n%W(#{1 + 1})\n\n"
  },
  {
    "path": "lexilla/test/examples/ruby/Issue132.rb.folded",
    "content": " 0 400   0   # Bad folding when single character ')' in SCE_RB_STRING_QW #132\n 0 400   0   %W(#{1 + 1})\n 1 400   0   \n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/ruby/Issue132.rb.styled",
    "content": "{2}# Bad folding when single character ')' in SCE_RB_STRING_QW #132{0}\n{28}%W({10}#{{4}1{0} {10}+{0} {4}1{10}}{28}){0}\n\n"
  },
  {
    "path": "lexilla/test/examples/ruby/Issue135.rb",
    "content": "a = <<XXX # :nodoc:\nheredoc\nXXX\n\nputs(<<-ONE, <<-TWO)\ncontent for heredoc one\nONE\ncontent for heredoc two\nTWO\n"
  },
  {
    "path": "lexilla/test/examples/ruby/Issue135.rb.folded",
    "content": " 2 400   0 + a = <<XXX # :nodoc:\n 0 401   0 | heredoc\n 0 401   0 | XXX\n 1 400   0   \n 2 400   0 + puts(<<-ONE, <<-TWO)\n 0 401   0 | content for heredoc one\n 0 401   0 | ONE\n 0 401   0 | content for heredoc two\n 0 401   0 | TWO\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/ruby/Issue135.rb.styled",
    "content": "{11}a{0} {10}={0} {10}<<{20}XXX{0} {2}# :nodoc:{22}\nheredoc\n{20}XXX{0}\n\n{11}puts{10}(<<{20}-ONE{10},{0} {10}<<{20}-TWO{10}){22}\ncontent for heredoc one\nONE\ncontent for heredoc two\n{20}TWO{0}\n"
  },
  {
    "path": "lexilla/test/examples/ruby/Issue136.rb",
    "content": "a = {r: /\\w+/, h: <<EOF\nheredoc\nEOF\n}\n\nputs a\n\ndef b # :nodoc:\n<<EOF\nheredoc\nEOF\nend\n\ndef c # :nodoc:\n/\\w+/\nend\n\nputs b\nputs c\n\n$stdout . puts <<EOF\nheredoc\nEOF\n"
  },
  {
    "path": "lexilla/test/examples/ruby/Issue136.rb.folded",
    "content": " 2 400   0 + a = {r: /\\w+/, h: <<EOF\n 0 402   0 | heredoc\n 0 402   0 | EOF\n 0 401   0 | }\n 1 400   0   \n 0 400   0   puts a\n 1 400   0   \n 2 400   0 + def b # :nodoc:\n 2 401   0 + <<EOF\n 0 402   0 | heredoc\n 0 402   0 | EOF\n 0 401   0 | end\n 1 400   0   \n 2 400   0 + def c # :nodoc:\n 0 401   0 | /\\w+/\n 0 401   0 | end\n 1 400   0   \n 0 400   0   puts b\n 0 400   0   puts c\n 1 400   0   \n 2 400   0 + $stdout . puts <<EOF\n 0 401   0 | heredoc\n 0 401   0 | EOF\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/ruby/Issue136.rb.styled",
    "content": "{11}a{0} {10}={0} {10}{{14}r:{0} {12}/\\w+/{10},{0} {14}h:{0} {10}<<{20}EOF{22}\nheredoc\n{20}EOF{0}\n{10}}{0}\n\n{11}puts{0} {11}a{0}\n\n{5}def{0} {9}b{0} {2}# :nodoc:{0}\n{10}<<{20}EOF{22}\nheredoc\n{20}EOF{0}\n{5}end{0}\n\n{5}def{0} {9}c{0} {2}# :nodoc:{0}\n{12}/\\w+/{0}\n{5}end{0}\n\n{11}puts{0} {11}b{0}\n{11}puts{0} {11}c{0}\n\n{13}$stdout{0} {10}.{0} {11}puts{0} {10}<<{20}EOF{22}\nheredoc\n{20}EOF{0}\n"
  },
  {
    "path": "lexilla/test/examples/ruby/Issue140.rb",
    "content": "\"#{1}\"#\n\"#@a\"#\n\"#@@a\"#\n\"#$a\"#\n\"#$?\"#\n\"#$-a1\"#\n\"#$_a1\"#\n\"#$123\"#\n\"#$\\\"#\n\"#$\"\"#\na = /#$//#\n"
  },
  {
    "path": "lexilla/test/examples/ruby/Issue140.rb.folded",
    "content": " 0 400   0   \"#{1}\"#\n 0 400   0   \"#@a\"#\n 0 400   0   \"#@@a\"#\n 0 400   0   \"#$a\"#\n 0 400   0   \"#$?\"#\n 0 400   0   \"#$-a1\"#\n 0 400   0   \"#$_a1\"#\n 0 400   0   \"#$123\"#\n 0 400   0   \"#$\\\"#\n 0 400   0   \"#$\"\"#\n 0 400   0   a = /#$//#\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/ruby/Issue140.rb.styled",
    "content": "{6}\"{10}#{{4}1{10}}{6}\"{2}#{0}\n{6}\"{10}#{16}@a{6}\"{2}#{0}\n{6}\"{10}#{17}@@a{6}\"{2}#{0}\n{6}\"{10}#{13}$a{6}\"{2}#{0}\n{6}\"{10}#{13}$?{6}\"{2}#{0}\n{6}\"{10}#{13}$-a{6}1\"{2}#{0}\n{6}\"{10}#{13}$_a1{6}\"{2}#{0}\n{6}\"{10}#{13}$123{6}\"{2}#{0}\n{6}\"{10}#{13}$\\{6}\"{2}#{0}\n{6}\"{10}#{13}$\"{6}\"{2}#{0}\n{11}a{0} {10}={0} {12}/{10}#{13}$/{12}/{2}#{0}\n"
  },
  {
    "path": "lexilla/test/examples/ruby/Issue65.rb",
    "content": "def dbg_args(a, b=1, c:, d: 6, &block) = puts(\"Args passed: #{[a, b, c, d, block.call]}\")\ndbg_args(0, c: 5) { 7 }\n\nclass A\n\tdef attr = @attr\n\tdef attr=(value)\n\t\t@attr = value\n\tend\n\tdef attr? = !!@attr\n\tdef attr! = @attr = true\n\t# unary operator\n\tdef -@ = 1\n\tdef +@ = 1\n\tdef ! = 1\n\tdef !@ = 1\n\t# binary operator\n\tdef +(value) = 1 + value\n\tdef -(value) = 1 - value\n\tdef *(value) = 1 * value\n\tdef **(value) = 1 ** value\n\tdef /(value) = 1 / value\n\tdef %(value) = 1 % value\n\tdef &(value) = 1 & value\n\tdef ^(value) = 1 ^ value\n\tdef >>(value) = 1 >> value\n\tdef <<(value) = 1 << value\n\tdef ==(other) = true\n\tdef !=(other) = true\n\tdef ===(other) = true\n\tdef =~(other) = true\n\tdef <=>(other) = true\n\tdef <(other) = true\n\tdef <=(other) = true\n\tdef >(other) = true\n\tdef >=(other) = true\n\t# element reference and assignment\n\tdef [](a, b) = puts(a + b)\n\tdef []=(a, b, c)\n\t\tputs a + b + c\n\tend\n\t# array decomposition\n\tdef dec(((a, b), c)) = puts(a + b + c)\n\t# class method\n\tdef self.say(*s) = puts(s)\n\t# test short method name\n\tdef a = 1\n\tdef ab = 1\nend\n\n# class method\ndef String.hello\n  \"Hello, world!\"\nend\n# singleton method\ngreeting = \"Hello\"\ndef greeting.broaden\n  self + \", world!\"\nend\n# one line definition\ndef a(b, c) b; c end\n# parentheses omitted\ndef ab c\n\tputs c\nend\n\n# Test folding of multi-line SCE_RB_STRING_QW\nputs %W(\na\nb\nc\n)\n"
  },
  {
    "path": "lexilla/test/examples/ruby/Issue65.rb.folded",
    "content": " 0 400   0   def dbg_args(a, b=1, c:, d: 6, &block) = puts(\"Args passed: #{[a, b, c, d, block.call]}\")\n 0 400   0   dbg_args(0, c: 5) { 7 }\n 1 400   0   \n 2 400   0 + class A\n 0 401   0 | \tdef attr = @attr\n 2 401   0 + \tdef attr=(value)\n 0 402   0 | \t\t@attr = value\n 0 402   0 | \tend\n 0 401   0 | \tdef attr? = !!@attr\n 0 401   0 | \tdef attr! = @attr = true\n 0 401   0 | \t# unary operator\n 0 401   0 | \tdef -@ = 1\n 0 401   0 | \tdef +@ = 1\n 0 401   0 | \tdef ! = 1\n 0 401   0 | \tdef !@ = 1\n 0 401   0 | \t# binary operator\n 0 401   0 | \tdef +(value) = 1 + value\n 0 401   0 | \tdef -(value) = 1 - value\n 0 401   0 | \tdef *(value) = 1 * value\n 0 401   0 | \tdef **(value) = 1 ** value\n 0 401   0 | \tdef /(value) = 1 / value\n 0 401   0 | \tdef %(value) = 1 % value\n 0 401   0 | \tdef &(value) = 1 & value\n 0 401   0 | \tdef ^(value) = 1 ^ value\n 0 401   0 | \tdef >>(value) = 1 >> value\n 0 401   0 | \tdef <<(value) = 1 << value\n 0 401   0 | \tdef ==(other) = true\n 0 401   0 | \tdef !=(other) = true\n 0 401   0 | \tdef ===(other) = true\n 0 401   0 | \tdef =~(other) = true\n 0 401   0 | \tdef <=>(other) = true\n 0 401   0 | \tdef <(other) = true\n 0 401   0 | \tdef <=(other) = true\n 0 401   0 | \tdef >(other) = true\n 0 401   0 | \tdef >=(other) = true\n 0 401   0 | \t# element reference and assignment\n 0 401   0 | \tdef [](a, b) = puts(a + b)\n 2 401   0 + \tdef []=(a, b, c)\n 0 402   0 | \t\tputs a + b + c\n 0 402   0 | \tend\n 0 401   0 | \t# array decomposition\n 0 401   0 | \tdef dec(((a, b), c)) = puts(a + b + c)\n 0 401   0 | \t# class method\n 0 401   0 | \tdef self.say(*s) = puts(s)\n 0 401   0 | \t# test short method name\n 0 401   0 | \tdef a = 1\n 0 401   0 | \tdef ab = 1\n 0 401   0 | end\n 1 400   0   \n 0 400   0   # class method\n 2 400   0 + def String.hello\n 0 401   0 |   \"Hello, world!\"\n 0 401   0 | end\n 0 400   0   # singleton method\n 0 400   0   greeting = \"Hello\"\n 2 400   0 + def greeting.broaden\n 0 401   0 |   self + \", world!\"\n 0 401   0 | end\n 0 400   0   # one line definition\n 0 400   0   def a(b, c) b; c end\n 0 400   0   # parentheses omitted\n 2 400   0 + def ab c\n 0 401   0 | \tputs c\n 0 401   0 | end\n 1 400   0   \n 0 400   0   # Test folding of multi-line SCE_RB_STRING_QW\n 2 400   0 + puts %W(\n 0 401   0 | a\n 0 401   0 | b\n 0 401   0 | c\n 0 401   0 | )\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/ruby/Issue65.rb.styled",
    "content": "{5}def{0} {9}dbg_args{10}({11}a{10},{0} {11}b{10}={4}1{10},{0} {11}c{14}:{10},{0} {14}d:{0} {4}6{10},{0} {10}&{11}block{10}){0} {10}={0} {11}puts{10}({6}\"Args passed: {10}#{[{11}a{10},{0} {11}b{10},{0} {11}c{10},{0} {11}d{10},{0} {11}block{10}.{11}call{10}]}{6}\"{10}){0}\n{11}dbg_args{10}({4}0{10},{0} {14}c:{0} {4}5{10}){0} {10}{{0} {4}7{0} {10}}{0}\n\n{5}class{0} {8}A{0}\n\t{5}def{0} {9}attr{0} {10}={0} {16}@attr{0}\n\t{5}def{0} {9}attr={10}({11}value{10}){0}\n\t\t{16}@attr{0} {10}={0} {11}value{0}\n\t{5}end{0}\n\t{5}def{0} {9}attr?{0} {10}={0} {10}!!{16}@attr{0}\n\t{5}def{0} {9}attr!{0} {10}={0} {16}@attr{0} {10}={0} {5}true{0}\n\t{2}# unary operator{0}\n\t{5}def{0} {10}-@{0} {10}={0} {4}1{0}\n\t{5}def{0} {10}+@{0} {10}={0} {4}1{0}\n\t{5}def{0} {10}!{0} {10}={0} {4}1{0}\n\t{5}def{0} {10}!@{0} {10}={0} {4}1{0}\n\t{2}# binary operator{0}\n\t{5}def{0} {10}+({11}value{10}){0} {10}={0} {4}1{0} {10}+{0} {11}value{0}\n\t{5}def{0} {10}-({11}value{10}){0} {10}={0} {4}1{0} {10}-{0} {11}value{0}\n\t{5}def{0} {10}*({11}value{10}){0} {10}={0} {4}1{0} {10}*{0} {11}value{0}\n\t{5}def{0} {10}**({11}value{10}){0} {10}={0} {4}1{0} {10}**{0} {11}value{0}\n\t{5}def{0} {10}/({11}value{10}){0} {10}={0} {4}1{0} {10}/{0} {11}value{0}\n\t{5}def{0} {10}%({11}value{10}){0} {10}={0} {4}1{0} {10}%{0} {11}value{0}\n\t{5}def{0} {10}&({11}value{10}){0} {10}={0} {4}1{0} {10}&{0} {11}value{0}\n\t{5}def{0} {10}^({11}value{10}){0} {10}={0} {4}1{0} {10}^{0} {11}value{0}\n\t{5}def{0} {10}>>({11}value{10}){0} {10}={0} {4}1{0} {10}>>{0} {11}value{0}\n\t{5}def{0} {10}<<({11}value{10}){0} {10}={0} {4}1{0} {10}<<{0} {11}value{0}\n\t{5}def{0} {10}==({11}other{10}){0} {10}={0} {5}true{0}\n\t{5}def{0} {10}!=({11}other{10}){0} {10}={0} {5}true{0}\n\t{5}def{0} {10}===({11}other{10}){0} {10}={0} {5}true{0}\n\t{5}def{0} {10}=~({11}other{10}){0} {10}={0} {5}true{0}\n\t{5}def{0} {10}<=>({11}other{10}){0} {10}={0} {5}true{0}\n\t{5}def{0} {10}<({11}other{10}){0} {10}={0} {5}true{0}\n\t{5}def{0} {10}<=({11}other{10}){0} {10}={0} {5}true{0}\n\t{5}def{0} {10}>({11}other{10}){0} {10}={0} {5}true{0}\n\t{5}def{0} {10}>=({11}other{10}){0} {10}={0} {5}true{0}\n\t{2}# element reference and assignment{0}\n\t{5}def{0} {10}[]({11}a{10},{0} {11}b{10}){0} {10}={0} {11}puts{10}({11}a{0} {10}+{0} {11}b{10}){0}\n\t{5}def{0} {10}[]=({11}a{10},{0} {11}b{10},{0} {11}c{10}){0}\n\t\t{11}puts{0} {11}a{0} {10}+{0} {11}b{0} {10}+{0} {11}c{0}\n\t{5}end{0}\n\t{2}# array decomposition{0}\n\t{5}def{0} {9}dec{10}((({11}a{10},{0} {11}b{10}),{0} {11}c{10})){0} {10}={0} {11}puts{10}({11}a{0} {10}+{0} {11}b{0} {10}+{0} {11}c{10}){0}\n\t{2}# class method{0}\n\t{5}def{0} {29}self{10}.{9}say{10}(*{11}s{10}){0} {10}={0} {11}puts{10}({11}s{10}){0}\n\t{2}# test short method name{0}\n\t{5}def{0} {9}a{0} {10}={0} {4}1{0}\n\t{5}def{0} {9}ab{0} {10}={0} {4}1{0}\n{5}end{0}\n\n{2}# class method{0}\n{5}def{0} {11}String{10}.{9}hello{0}\n  {6}\"Hello, world!\"{0}\n{5}end{0}\n{2}# singleton method{0}\n{11}greeting{0} {10}={0} {6}\"Hello\"{0}\n{5}def{0} {11}greeting{10}.{9}broaden{0}\n  {5}self{0} {10}+{0} {6}\", world!\"{0}\n{5}end{0}\n{2}# one line definition{0}\n{5}def{0} {9}a{10}({11}b{10},{0} {11}c{10}){0} {11}b{10};{0} {11}c{0} {5}end{0}\n{2}# parentheses omitted{0}\n{5}def{0} {9}ab{0} {11}c{0}\n\t{11}puts{0} {11}c{0}\n{5}end{0}\n\n{2}# Test folding of multi-line SCE_RB_STRING_QW{0}\n{11}puts{0} {28}%W(\na\nb\nc\n){0}\n"
  },
  {
    "path": "lexilla/test/examples/ruby/Issue66.rb",
    "content": "# Test that final \\n in indented heredoc (2nd example) is styled as SCE_RB_HERE_Q not SCE_RB_HERE_DELIM\n<<T\nX\nT\n\n<<-T\nX\nT\n"
  },
  {
    "path": "lexilla/test/examples/ruby/Issue66.rb.folded",
    "content": " 0 400   0   # Test that final \\n in indented heredoc (2nd example) is styled as SCE_RB_HERE_Q not SCE_RB_HERE_DELIM\n 2 400   0 + <<T\n 0 401   0 | X\n 0 401   0 | T\n 1 400   0   \n 2 400   0 + <<-T\n 0 401   0 | X\n 0 401   0 | T\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/ruby/Issue66.rb.styled",
    "content": "{2}# Test that final \\n in indented heredoc (2nd example) is styled as SCE_RB_HERE_Q not SCE_RB_HERE_DELIM{0}\n{10}<<{20}T{22}\nX\n{20}T{0}\n\n{10}<<{20}-T{22}\nX\n{20}T{0}\n"
  },
  {
    "path": "lexilla/test/examples/ruby/Issue67.rb",
    "content": "# heredoc method call, other argument\nputs <<~EOT.chomp\n\tsquiggly heredoc\nEOT\n\nputs <<ONE, __FILE__, __LINE__\ncontent for heredoc one\nONE\n\n# heredoc prevStyle == SCE_RB_GLOBAL\n$stdout.puts <<~EOT.chomp\n\tsquiggly heredoc\nEOT\n\n# Issue #236: modifier if, unless, while and until\nalias error puts\n\nerror <<EOF if true\nheredoc if true\nEOF\n\nerror <<EOF unless false\nheredoc unless false\nEOF\n\nerror <<EOF while false\nheredoc while false\nEOF\n\nerror <<EOF until true\nheredoc until true\nEOF\n"
  },
  {
    "path": "lexilla/test/examples/ruby/Issue67.rb.folded",
    "content": " 0 400   0   # heredoc method call, other argument\n 2 400   0 + puts <<~EOT.chomp\n 0 401   0 | \tsquiggly heredoc\n 0 401   0 | EOT\n 1 400   0   \n 2 400   0 + puts <<ONE, __FILE__, __LINE__\n 0 401   0 | content for heredoc one\n 0 401   0 | ONE\n 1 400   0   \n 0 400   0   # heredoc prevStyle == SCE_RB_GLOBAL\n 2 400   0 + $stdout.puts <<~EOT.chomp\n 0 401   0 | \tsquiggly heredoc\n 0 401   0 | EOT\n 1 400   0   \n 0 400   0   # Issue #236: modifier if, unless, while and until\n 0 400   0   alias error puts\n 1 400   0   \n 2 400   0 + error <<EOF if true\n 0 401   0 | heredoc if true\n 0 401   0 | EOF\n 1 400   0   \n 2 400   0 + error <<EOF unless false\n 0 401   0 | heredoc unless false\n 0 401   0 | EOF\n 1 400   0   \n 2 400   0 + error <<EOF while false\n 0 401   0 | heredoc while false\n 0 401   0 | EOF\n 1 400   0   \n 2 400   0 + error <<EOF until true\n 0 401   0 | heredoc until true\n 0 401   0 | EOF\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/ruby/Issue67.rb.styled",
    "content": "{2}# heredoc method call, other argument{0}\n{11}puts{0} {10}<<{20}~EOT{10}.{11}chomp{22}\n\tsquiggly heredoc\n{20}EOT{0}\n\n{11}puts{0} {10}<<{20}ONE{10},{0} {5}__FILE__{10},{0} {5}__LINE__{22}\ncontent for heredoc one\n{20}ONE{0}\n\n{2}# heredoc prevStyle == SCE_RB_GLOBAL{0}\n{13}$stdout{10}.{11}puts{0} {10}<<{20}~EOT{10}.{11}chomp{22}\n\tsquiggly heredoc\n{20}EOT{0}\n\n{2}# Issue #236: modifier if, unless, while and until{0}\n{11}alias{0} {11}error{0} {11}puts{0}\n\n{11}error{0} {10}<<{20}EOF{0} {29}if{0} {5}true{22}\nheredoc if true\n{20}EOF{0}\n\n{11}error{0} {10}<<{20}EOF{0} {29}unless{0} {5}false{22}\nheredoc unless false\n{20}EOF{0}\n\n{11}error{0} {10}<<{20}EOF{0} {29}while{0} {5}false{22}\nheredoc while false\n{20}EOF{0}\n\n{11}error{0} {10}<<{20}EOF{0} {29}until{0} {5}true{22}\nheredoc until true\n{20}EOF{0}\n"
  },
  {
    "path": "lexilla/test/examples/ruby/Issue69.rb",
    "content": "# -*- coding: utf-8 -*-\n\n# single character strings\nputs ?a\nputs ?\\n\nputs ?\\s\nputs ?\\\\#\nputs ?\\u{41}\nputs ?\\C-a\nputs ?\\M-a\nputs ?\\M-\\C-a\nputs ?\\C-\\M-a\nputs ?あ\nputs ?\"\nputs ?/\nputs ?[[1, 2]\nputs ?/\\\n\n# symbol and ternary operator\nab = /\\d+/\ncd = /\\w+/\nputs :ab, :cd, :/, :[]\nputs :/\\\n\n# TODO: space after '?' and ':' is not needed\nputs true ?ab : cd\nputs true ? /\\d+/ : /\\w+/\nputs false ?ab : cd\nputs false ? /\\d+/ : /\\w+/\n"
  },
  {
    "path": "lexilla/test/examples/ruby/Issue69.rb.folded",
    "content": " 0 400   0   # -*- coding: utf-8 -*-\n 1 400   0   \n 0 400   0   # single character strings\n 0 400   0   puts ?a\n 0 400   0   puts ?\\n\n 0 400   0   puts ?\\s\n 0 400   0   puts ?\\\\#\n 0 400   0   puts ?\\u{41}\n 0 400   0   puts ?\\C-a\n 0 400   0   puts ?\\M-a\n 0 400   0   puts ?\\M-\\C-a\n 0 400   0   puts ?\\C-\\M-a\n 0 400   0   puts ?あ\n 0 400   0   puts ?\"\n 0 400   0   puts ?/\n 0 400   0   puts ?[[1, 2]\n 0 400   0   puts ?/\\\n 1 400   0   \n 0 400   0   # symbol and ternary operator\n 0 400   0   ab = /\\d+/\n 0 400   0   cd = /\\w+/\n 0 400   0   puts :ab, :cd, :/, :[]\n 0 400   0   puts :/\\\n 1 400   0   \n 0 400   0   # TODO: space after '?' and ':' is not needed\n 0 400   0   puts true ?ab : cd\n 0 400   0   puts true ? /\\d+/ : /\\w+/\n 0 400   0   puts false ?ab : cd\n 0 400   0   puts false ? /\\d+/ : /\\w+/\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/ruby/Issue69.rb.styled",
    "content": "{2}# -*- coding: utf-8 -*-{0}\n\n{2}# single character strings{0}\n{11}puts{0} {4}?a{0}\n{11}puts{0} {4}?\\n{0}\n{11}puts{0} {4}?\\s{0}\n{11}puts{0} {4}?\\\\{2}#{0}\n{11}puts{0} {4}?\\u{10}{{4}41{10}}{0}\n{11}puts{0} {4}?\\C-a{0}\n{11}puts{0} {4}?\\M-a{0}\n{11}puts{0} {4}?\\M-\\C-a{0}\n{11}puts{0} {4}?\\C-\\M-a{0}\n{11}puts{0} {4}?あ{0}\n{11}puts{0} {4}?\"{0}\n{11}puts{0} {4}?/{0}\n{11}puts{0} {4}?[{10}[{4}1{10},{0} {4}2{10}]{0}\n{11}puts{0} {4}?/{0}\\\n\n{2}# symbol and ternary operator{0}\n{11}ab{0} {10}={0} {12}/\\d+/{0}\n{11}cd{0} {10}={0} {12}/\\w+/{0}\n{11}puts{0} {14}:ab{10},{0} {14}:cd{10},{0} {14}:/{10},{0} {14}:[]{0}\n{11}puts{0} {14}:/{0}\\\n\n{2}# TODO: space after '?' and ':' is not needed{0}\n{11}puts{0} {5}true{0} {10}?{11}ab{0} {10}:{0} {11}cd{0}\n{11}puts{0} {5}true{0} {10}?{0} {12}/\\d+/{0} {10}:{0} {12}/\\w+/{0}\n{11}puts{0} {5}false{0} {10}?{11}ab{0} {10}:{0} {11}cd{0}\n{11}puts{0} {5}false{0} {10}?{0} {12}/\\d+/{0} {10}:{0} {12}/\\w+/{0}\n"
  },
  {
    "path": "lexilla/test/examples/ruby/PercentEquals124.rb",
    "content": "# Issue 124, disambiguating %= which may be a quote or modulo assignment\n# %-quoting with '=' as the quote\ns = %=3=\nputs s\nx = 7\n# Modulo assignment, equivalent to x = x % 2\nx %=2\nputs x\n"
  },
  {
    "path": "lexilla/test/examples/ruby/PercentEquals124.rb.folded",
    "content": " 0 400   0   # Issue 124, disambiguating %= which may be a quote or modulo assignment\n 0 400   0   # %-quoting with '=' as the quote\n 0 400   0   s = %=3=\n 0 400   0   puts s\n 0 400   0   x = 7\n 0 400   0   # Modulo assignment, equivalent to x = x % 2\n 0 400   0   x %=2\n 0 400   0   puts x\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/ruby/PercentEquals124.rb.styled",
    "content": "{2}# Issue 124, disambiguating %= which may be a quote or modulo assignment{0}\n{2}# %-quoting with '=' as the quote{0}\n{11}s{0} {10}={0} {25}%=3={0}\n{11}puts{0} {11}s{0}\n{11}x{0} {10}={0} {4}7{0}\n{2}# Modulo assignment, equivalent to x = x % 2{0}\n{11}x{0} {10}%={4}2{0}\n{11}puts{0} {11}x{0}\n"
  },
  {
    "path": "lexilla/test/examples/ruby/SciTE.properties",
    "content": "lexer.*.rb=ruby\nkeywords.*.rb=begin class def do end false if module return self super true unless until while \\\n__FILE__ __LINE__\nfold=1\n"
  },
  {
    "path": "lexilla/test/examples/ruby/x.rb",
    "content": "class Demo\n\tdef test # A test\n\t\ti = 1\n\t\tputs \"Example\"\n\tend\nend"
  },
  {
    "path": "lexilla/test/examples/ruby/x.rb.folded",
    "content": " 2 400   0 + class Demo\n 2 401   0 + \tdef test # A test\n 0 402   0 | \t\ti = 1\n 0 402   0 | \t\tputs \"Example\"\n 0 402   0 | \tend\n 0 401   0 | end"
  },
  {
    "path": "lexilla/test/examples/ruby/x.rb.styled",
    "content": "{5}class{0} {8}Demo{0}\n\t{5}def{0} {9}test{0} {2}# A test{0}\n\t\t{11}i{0} {10}={0} {4}1{0}\n\t\t{11}puts{0} {6}\"Example\"{0}\n\t{5}end{0}\n{5}end"
  },
  {
    "path": "lexilla/test/examples/rust/Issue239.rs",
    "content": "fn main() {\n    let r#true = false;\n    println!(\"{}\", r#true);\n}"
  },
  {
    "path": "lexilla/test/examples/rust/Issue239.rs.folded",
    "content": " 2 400 401 + fn main() {\n 0 401 401 |     let r#true = false;\n 0 401 401 |     println!(\"{}\", r#true);\n 0 401 400 | }"
  },
  {
    "path": "lexilla/test/examples/rust/Issue239.rs.styled",
    "content": "{6}fn{0} {17}main{16}(){0} {16}{{0}\n    {6}let{0} {17}r#true{0} {16}={0} {6}false{16};{0}\n    {19}println!{16}({13}\"{}\"{16},{0} {17}r#true{16});{0}\n{16}}"
  },
  {
    "path": "lexilla/test/examples/rust/Issue33.rs",
    "content": "fn main() {\n    let a: i128 = 42i128;\n    let b: u128 = 1337u128;\n    println!(\"{} + {} = {}\", a, b, (a as u128) + b);\n}\n"
  },
  {
    "path": "lexilla/test/examples/rust/Issue33.rs.folded",
    "content": " 2 400 401 + fn main() {\n 0 401 401 |     let a: i128 = 42i128;\n 0 401 401 |     let b: u128 = 1337u128;\n 0 401 401 |     println!(\"{} + {} = {}\", a, b, (a as u128) + b);\n 0 401 400 | }\n 1 400 400   "
  },
  {
    "path": "lexilla/test/examples/rust/Issue33.rs.styled",
    "content": "{6}fn{0} {17}main{16}(){0} {16}{{0}\n    {6}let{0} {17}a{16}:{0} {7}i128{0} {16}={0} {5}42i128{16};{0}\n    {6}let{0} {17}b{16}:{0} {7}u128{0} {16}={0} {5}1337u128{16};{0}\n    {19}println!{16}({13}\"{} + {} = {}\"{16},{0} {17}a{16},{0} {17}b{16},{0} {16}({17}a{0} {6}as{0} {7}u128{16}){0} {16}+{0} {17}b{16});{0}\n{16}}{0}\n"
  },
  {
    "path": "lexilla/test/examples/rust/Issue34.rs",
    "content": "/**\n * SCE_RUST_COMMENTBLOCKDOC\n */\nfn main() {\n    /// SCE_RUST_COMMENTLINEDOC\n    println!(\"Hello, World!\");\n}\n// SCE_RUST_COMMENTLINE\n/*\n * SCE_RUST_COMMENTBLOCK\n */\n"
  },
  {
    "path": "lexilla/test/examples/rust/Issue34.rs.folded",
    "content": " 2 400 401 + /**\n 0 401 401 |  * SCE_RUST_COMMENTBLOCKDOC\n 0 401 400 |  */\n 2 400 401 + fn main() {\n 0 401 401 |     /// SCE_RUST_COMMENTLINEDOC\n 0 401 401 |     println!(\"Hello, World!\");\n 0 401 400 | }\n 0 400 400   // SCE_RUST_COMMENTLINE\n 2 400 401 + /*\n 0 401 401 |  * SCE_RUST_COMMENTBLOCK\n 0 401 400 |  */\n 1 400 400   "
  },
  {
    "path": "lexilla/test/examples/rust/Issue34.rs.styled",
    "content": "{3}/**\n * SCE_RUST_COMMENTBLOCKDOC\n */{0}\n{6}fn{0} {17}main{16}(){0} {16}{{0}\n    {4}/// SCE_RUST_COMMENTLINEDOC{0}\n    {19}println!{16}({13}\"Hello, World!\"{16});{0}\n{16}}{0}\n{2}// SCE_RUST_COMMENTLINE{0}\n{1}/*\n * SCE_RUST_COMMENTBLOCK\n */{0}\n"
  },
  {
    "path": "lexilla/test/examples/rust/Issue35.rs",
    "content": "/// GitHub Issue #35\nfn main() {}\n/*"
  },
  {
    "path": "lexilla/test/examples/rust/Issue35.rs.folded",
    "content": " 0 400 400   /// GitHub Issue #35\n 0 400 400   fn main() {}\n 2 400 401 + /*"
  },
  {
    "path": "lexilla/test/examples/rust/Issue35.rs.styled",
    "content": "{4}/// GitHub Issue #35{0}\n{6}fn{0} {17}main{16}(){0} {16}{}{0}\n{1}/*"
  },
  {
    "path": "lexilla/test/examples/rust/SciTE.properties",
    "content": "lexer.*.rs=rust\n\nkeywords.*.rs= \\\nalignof as be box break const continue crate do else enum extern false fn for if impl in let loop match mod mut offsetof once priv proc pub pure ref return self sizeof static struct super trait true type typeof unsafe unsized use virtual while yield\n\nkeywords2.*.rs= \\\nbool char f32 f64 i16 i32 i64 i128 i8 int str u16 u32 u64 u128 u8 uint\n\nkeywords3.*.rs=Self\n\nfold=1\nfold.comment=1\n"
  },
  {
    "path": "lexilla/test/examples/sql/AllStyles.sql",
    "content": "-- Enumerate all styles: 0 to 24\n\n-- comment=1\n/* comment */\n\n-- whitespace=0\n\t-- w\n\n/* commentline=2 */\n-- commentline\n\n-- commentdoc=3\n/** commentdoc */\n\n-- number=4\n4\n\n-- word=5\nselect\n\n-- string=6\n\"string\"\n\n-- character=7\n'character'\n\n-- sqlplus=8\nappend\n\n-- sqlplus_prompt=9\nprompt SQL+Prompt\n\n-- operator=10\n+\n\n-- identifier=11\nidentifier\n\n-- sqlplus_comment=13\nremark sqlplus comment\n\n-- commentlinedoc=15\n# commentlinedoc\n\n-- word2=16\nobject\n\n-- commentdockeyword=17\n/** @return */\n\n-- commentdockeyworderror=18\n/** @error */\n\n-- user1=19\ndbms_output.disable\n\n-- user2=20\nanalyze\n\n-- user3=21\narray\n\n-- user4=22\nfalse\n\n-- quotedidentifier=23\n`quotedidentifier`\n\n-- qoperator=24\nq'{ today's }'\n"
  },
  {
    "path": "lexilla/test/examples/sql/AllStyles.sql.folded",
    "content": " 0 400 400   -- Enumerate all styles: 0 to 24\n 1 400 400   \n 0 400 400   -- comment=1\n 0 400 400   /* comment */\n 1 400 400   \n 0 400 400   -- whitespace=0\n 0 400 400   \t-- w\n 1 400 400   \n 0 400 400   /* commentline=2 */\n 0 400 400   -- commentline\n 1 400 400   \n 0 400 400   -- commentdoc=3\n 0 400 400   /** commentdoc */\n 1 400 400   \n 0 400 400   -- number=4\n 0 400 400   4\n 1 400 400   \n 0 400 400   -- word=5\n 0 400 400   select\n 1 400 400   \n 0 400 400   -- string=6\n 0 400 400   \"string\"\n 1 400 400   \n 0 400 400   -- character=7\n 0 400 400   'character'\n 1 400 400   \n 0 400 400   -- sqlplus=8\n 0 400 400   append\n 1 400 400   \n 0 400 400   -- sqlplus_prompt=9\n 0 400 400   prompt SQL+Prompt\n 1 400 400   \n 0 400 400   -- operator=10\n 0 400 400   +\n 1 400 400   \n 0 400 400   -- identifier=11\n 0 400 400   identifier\n 1 400 400   \n 0 400 400   -- sqlplus_comment=13\n 0 400 400   remark sqlplus comment\n 1 400 400   \n 0 400 400   -- commentlinedoc=15\n 0 400 400   # commentlinedoc\n 1 400 400   \n 0 400 400   -- word2=16\n 0 400 400   object\n 1 400 400   \n 0 400 400   -- commentdockeyword=17\n 0 400 400   /** @return */\n 1 400 400   \n 0 400 400   -- commentdockeyworderror=18\n 0 400 400   /** @error */\n 1 400 400   \n 0 400 400   -- user1=19\n 0 400 400   dbms_output.disable\n 1 400 400   \n 0 400 400   -- user2=20\n 0 400 400   analyze\n 1 400 400   \n 0 400 400   -- user3=21\n 0 400 400   array\n 1 400 400   \n 0 400 400   -- user4=22\n 0 400 400   false\n 1 400 400   \n 0 400 400   -- quotedidentifier=23\n 0 400 400   `quotedidentifier`\n 1 400 400   \n 0 400 400   -- qoperator=24\n 0 400 400   q'{ today's }'\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/sql/AllStyles.sql.styled",
    "content": "{2}-- Enumerate all styles: 0 to 24\n{0}\n{2}-- comment=1\n{1}/* comment */{0}\n\n{2}-- whitespace=0\n{0}\t{2}-- w\n{0}\n{1}/* commentline=2 */{0}\n{2}-- commentline\n{0}\n{2}-- commentdoc=3\n{3}/** commentdoc */{0}\n\n{2}-- number=4\n{4}4{0}\n\n{2}-- word=5\n{5}select{0}\n\n{2}-- string=6\n{6}\"string\"{0}\n\n{2}-- character=7\n{7}'character'{0}\n\n{2}-- sqlplus=8\n{8}append{0}\n\n{2}-- sqlplus_prompt=9\n{8}prompt{9} SQL+Prompt\n{0}\n{2}-- operator=10\n{10}+{0}\n\n{2}-- identifier=11\n{11}identifier{0}\n\n{2}-- sqlplus_comment=13\n{8}remark{13} sqlplus comment\n{0}\n{2}-- commentlinedoc=15\n{15}# commentlinedoc\n{0}\n{2}-- word2=16\n{16}object{0}\n\n{2}-- commentdockeyword=17\n{3}/** {17}@return{3} */{0}\n\n{2}-- commentdockeyworderror=18\n{3}/** {18}@error{3} */{0}\n\n{2}-- user1=19\n{19}dbms_output.disable{0}\n\n{2}-- user2=20\n{20}analyze{0}\n\n{2}-- user3=21\n{21}array{0}\n\n{2}-- user4=22\n{22}false{0}\n\n{2}-- quotedidentifier=23\n{23}`quotedidentifier`{0}\n\n{2}-- qoperator=24\n{24}q'{ today's }'{0}\n"
  },
  {
    "path": "lexilla/test/examples/sql/SciTE.properties",
    "content": "lexer.*.sql=sql\n\nkeywords.*.sql=select\nkeywords2.*.sql=object\nkeywords3.*.sql=return\nkeywords4.*.sql=a~ppend pro~mpt rem~ark\nkeywords5.*.sql=dbms_output.disable\nkeywords6.*.sql=analyze\nkeywords7.*.sql=array\nkeywords8.*.sql=false\n\nlexer.sql.backticks.identifier=1\nlexer.sql.numbersign.comment=1\nlexer.sql.allow.dotted.word=1\n\nfold=1\nfold.compact=1\n"
  },
  {
    "path": "lexilla/test/examples/tcl/SciTE.properties",
    "content": "lexer.*.tcl=tcl\nkeywords.*.tcl=proc set socket vwait\nfold.comment=1\nfold.compact=1\n"
  },
  {
    "path": "lexilla/test/examples/tcl/x.tcl",
    "content": "# tcl tests\n\n#simple example\n\nproc Echo_Server {port} {\n    set s [socket -server EchoAccept $port]\n    vwait forever;\n}\n\n# Bug #1947\n\n$s($i,\"n\")\nset n $showArray($i,\"neighbor\")\n"
  },
  {
    "path": "lexilla/test/examples/tcl/x.tcl.folded",
    "content": " 2 400   3 + # tcl tests\n 1 401   3 | \n 0 401   3 | #simple example\n 1 401   3 | \n 2 400   2 + proc Echo_Server {port} {\n 0 401   2 |     set s [socket -server EchoAccept $port]\n 0 401   2 |     vwait forever;\n 0 401   0 | }\n 1 400   0   \n 2 400   3 + # Bug #1947\n 1 401   3 | \n 0 400   0   $s($i,\"n\")\n 0 400   0   set n $showArray($i,\"neighbor\")\n 1 400   0   "
  },
  {
    "path": "lexilla/test/examples/tcl/x.tcl.styled",
    "content": "{2}# tcl tests\n{0}\n{2}#simple example\n{0}\n{12}proc{0} {7}Echo_Server{0} {6}{{7}port{6}}{0} {6}{\n{0}    {12}set{0} {7}s{0} {6}[{12}socket{0} {10}-server{0} {7}EchoAccept{0} {8}$port{6}]\n{0}    {12}vwait{0} {7}forever{0};\n{6}}\n{0}\n{2}# Bug #1947\n{0}\n{8}$s{6}({8}$i{6},{5}\"n\"{6})\n{12}set{0} {7}n{0} {8}$showArray{6}({8}$i{6},{5}\"neighbor\"{6})\n"
  },
  {
    "path": "lexilla/test/examples/vb/SciTE.properties",
    "content": "lexer.*.vb=vb\nlexer.vb.strings.multiline=1\nkeywords.*.vb=as dim or string\n"
  },
  {
    "path": "lexilla/test/examples/vb/x.vb",
    "content": "' String\"\nDim a As String = \"hello, world\"\nDim b As String = \"hello    world\"\nDim c As String = \"Joe said \"\"Hello\"\" to me\"\nDim d As String = \"\\\\\\\\server\\\\share\\\\file.txt\"\nDim e As String = \"The brown fox\njumps over\nthe lazy dog\"\n' Character\n\"\"C \"c\"C \"cc\"C\n' Date\nd = #5/31/1993# or # 01/01/0001 12:00:00AM #\n' Number\n123_456___789\n123_\n&b10101_01010\n"
  },
  {
    "path": "lexilla/test/examples/vb/x.vb.folded",
    "content": " 0 400   0   ' String\"\n 0 400   0   Dim a As String = \"hello, world\"\n 0 400   0   Dim b As String = \"hello    world\"\n 0 400   0   Dim c As String = \"Joe said \"\"Hello\"\" to me\"\n 0 400   0   Dim d As String = \"\\\\\\\\server\\\\share\\\\file.txt\"\n 0 400   0   Dim e As String = \"The brown fox\n 0 400   0   jumps over\n 0 400   0   the lazy dog\"\n 0 400   0   ' Character\n 0 400   0   \"\"C \"c\"C \"cc\"C\n 0 400   0   ' Date\n 0 400   0   d = #5/31/1993# or # 01/01/0001 12:00:00AM #\n 0 400   0   ' Number\n 0 400   0   123_456___789\n 0 400   0   123_\n 0 400   0   &b10101_01010\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/vb/x.vb.styled",
    "content": "{1}' String\"\n{3}Dim{0} {7}a{0} {3}As{0} {3}String{0} {6}={0} {4}\"hello, world\"{0}\n{3}Dim{0} {7}b{0} {3}As{0} {3}String{0} {6}={0} {4}\"hello    world\"{0}\n{3}Dim{0} {7}c{0} {3}As{0} {3}String{0} {6}={0} {4}\"Joe said \"\"Hello\"\" to me\"{0}\n{3}Dim{0} {7}d{0} {3}As{0} {3}String{0} {6}={0} {4}\"\\\\\\\\server\\\\share\\\\file.txt\"{0}\n{3}Dim{0} {7}e{0} {3}As{0} {3}String{0} {6}={0} {4}\"The brown fox\njumps over\nthe lazy dog\"{0}\n{1}' Character\n{4}\"\"C{0} {4}\"c\"C{0} {4}\"cc\"C{0}\n{1}' Date\n{7}d{0} {6}={0} {8}#5/31/1993#{0} {3}or{0} {8}# 01/01/0001 12:00:00AM #{0}\n{1}' Number\n{2}123_456___789{0}\n{2}123_{0}\n{2}&b10101_01010{0}\n"
  },
  {
    "path": "lexilla/test/examples/verilog/AllStyles.vh",
    "content": "// Examples drawn from https://verilogams.com/refman/basics/index.html\n\n// SCE_V_DEFAULT {0}\n\n/*\n * SCE_V_COMMENT {1}\n */\n\n// SCE_V_COMMENTLINE {2}\n// multiple\n// comment lines\n// are folded\n\n//{ explicit folds\n//  are folded,\n//} too\n\n//! SCE_V_COMMENTLINEBANG {3}\n//! multiple\n//! bang comments\n//! are folded\n\n// SCE_V_NUMBER {4}\n1'b0\n8'hx\n8'hfffx\n12'hfx\n64'o0\n0x7f\n0o23\n0b1011\n42_839\n0.1\n1.3u\n5.46K\n1.2E12\n1.30e-2\n236.123_763e-12\n\n// SCE_V_WORD {5}\nalways\n\n// SCE_V_STRING {6}\n\"\\tsome\\ttext\\r\\n\"\n\n// SCE_V_WORD2 {7}\nspecial\n\n// SCE_V_WORD3 {8}\n$async$and$array\n\n// SCE_V_PREPROCESSOR {9}\n`define __VAMS_ENABLE__\n`ifdef __VAMS_ENABLE__\n    parameter integer del = 1 from [1:100];\n`else\n    parameter del = 1;\n`endif\n\n// SCE_V_OPERATOR {10}\n+-/=!@#%^&*()[]{}<|>~\n\n// SCE_V_IDENTIFIER {11}\nq\nx$z\n\\my_var\n\\/x1/n1\n\\\\x1\\n1\n\\{a,b}\n\\V(p,n)\n\n// SCE_V_STRINGEOL {12}\n\"\\n\n\n// SCE_V_USER {19}\nmy_var\n\n// SCE_V_COMMENT_WORD {20}\n// TODO write a comment\n\nmodule mod(clk, q, reset) // folded when fold.verilog.flags=1\n// SCE_V_INPUT {21}\n  input clk;\n\n// SCE_V_OUTPUT {22}\n  output q;\n\n// SCE_V_INOUT {23}\n  inout reset;\nendmodule\n\n// SCE_V_PORT_CONNECT {24}\nmod m1(\n  .clk(clk),\n  .q(q),\n  .reset(reset)\n);\n"
  },
  {
    "path": "lexilla/test/examples/verilog/AllStyles.vh.folded",
    "content": " 0 400 400   // Examples drawn from https://verilogams.com/refman/basics/index.html\n 0 400 400   \n 0 400 400   // SCE_V_DEFAULT {0}\n 0 400 400   \n 2 400 401 + /*\n 0 401 401 |  * SCE_V_COMMENT {1}\n 0 401 400 |  */\n 0 400 400   \n 2 400 401 + // SCE_V_COMMENTLINE {2}\n 0 401 401 | // multiple\n 0 401 401 | // comment lines\n 0 401 400 | // are folded\n 0 400 400   \n 2 400 402 + //{ explicit folds\n 0 402 402 | //  are folded,\n 0 402 400 | //} too\n 0 400 400   \n 2 400 401 + //! SCE_V_COMMENTLINEBANG {3}\n 0 401 401 | //! multiple\n 0 401 401 | //! bang comments\n 0 401 400 | //! are folded\n 0 400 400   \n 0 400 400   // SCE_V_NUMBER {4}\n 0 400 400   1'b0\n 0 400 400   8'hx\n 0 400 400   8'hfffx\n 0 400 400   12'hfx\n 0 400 400   64'o0\n 0 400 400   0x7f\n 0 400 400   0o23\n 0 400 400   0b1011\n 0 400 400   42_839\n 0 400 400   0.1\n 0 400 400   1.3u\n 0 400 400   5.46K\n 0 400 400   1.2E12\n 0 400 400   1.30e-2\n 0 400 400   236.123_763e-12\n 0 400 400   \n 0 400 400   // SCE_V_WORD {5}\n 0 400 400   always\n 0 400 400   \n 0 400 400   // SCE_V_STRING {6}\n 0 400 400   \"\\tsome\\ttext\\r\\n\"\n 0 400 400   \n 0 400 400   // SCE_V_WORD2 {7}\n 0 400 400   special\n 0 400 400   \n 0 400 400   // SCE_V_WORD3 {8}\n 0 400 400   $async$and$array\n 0 400 400   \n 0 400 400   // SCE_V_PREPROCESSOR {9}\n 0 400 400   `define __VAMS_ENABLE__\n 2 400 401 + `ifdef __VAMS_ENABLE__\n 0 401 401 |     parameter integer del = 1 from [1:100];\n 2 400 401 + `else\n 0 401 401 |     parameter del = 1;\n 0 401 400 | `endif\n 0 400 400   \n 0 400 400   // SCE_V_OPERATOR {10}\n 0 400 400   +-/=!@#%^&*()[]{}<|>~\n 0 400 400   \n 0 400 400   // SCE_V_IDENTIFIER {11}\n 0 400 400   q\n 0 400 400   x$z\n 0 400 400   \\my_var\n 0 400 400   \\/x1/n1\n 0 400 400   \\\\x1\\n1\n 0 400 400   \\{a,b}\n 0 400 400   \\V(p,n)\n 0 400 400   \n 0 400 400   // SCE_V_STRINGEOL {12}\n 0 400 400   \"\\n\n 0 400 400   \n 0 400 400   // SCE_V_USER {19}\n 0 400 400   my_var\n 0 400 400   \n 2 400 401 + // SCE_V_COMMENT_WORD {20}\n 0 401 400 | // TODO write a comment\n 0 400 400   \n 2 400 401 + module mod(clk, q, reset) // folded when fold.verilog.flags=1\n 0 401 401 | // SCE_V_INPUT {21}\n 0 401 401 |   input clk;\n 0 401 401 | \n 0 401 401 | // SCE_V_OUTPUT {22}\n 0 401 401 |   output q;\n 0 401 401 | \n 0 401 401 | // SCE_V_INOUT {23}\n 0 401 401 |   inout reset;\n 0 401 400 | endmodule\n 0 400 400   \n 0 400 400   // SCE_V_PORT_CONNECT {24}\n 2 400 401 + mod m1(\n 0 401 401 |   .clk(clk),\n 0 401 401 |   .q(q),\n 0 401 401 |   .reset(reset)\n 0 401 400 | );\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/verilog/AllStyles.vh.styled",
    "content": "{2}// Examples drawn from https://verilogams.com/refman/basics/index.html\n{0}\n{2}// SCE_V_DEFAULT {0}\n{0}\n{1}/*\n * SCE_V_COMMENT {1}\n */{0}\n\n{2}// SCE_V_COMMENTLINE {2}\n// multiple\n// comment lines\n// are folded\n{0}\n{2}//{ explicit folds\n//  are folded,\n//} too\n{0}\n{3}//! SCE_V_COMMENTLINEBANG {3}\n//! multiple\n//! bang comments\n//! are folded\n{0}\n{2}// SCE_V_NUMBER {4}\n{4}1'b0{0}\n{4}8'hx{0}\n{4}8'hfffx{0}\n{4}12'hfx{0}\n{4}64'o0{0}\n{4}0x7f{0}\n{4}0o23{0}\n{4}0b1011{0}\n{4}42_839{0}\n{4}0.1{0}\n{4}1.3u{0}\n{4}5.46K{0}\n{4}1.2E12{0}\n{4}1.30e{10}-{4}2{0}\n{4}236.123_763e{10}-{4}12{0}\n\n{2}// SCE_V_WORD {5}\n{5}always{0}\n\n{2}// SCE_V_STRING {6}\n{6}\"\\tsome\\ttext\\r\\n\"{0}\n\n{2}// SCE_V_WORD2 {7}\n{7}special{0}\n\n{2}// SCE_V_WORD3 {8}\n{8}$async$and$array{0}\n\n{2}// SCE_V_PREPROCESSOR {9}\n{9}`define{0} {11}__VAMS_ENABLE__{0}\n{9}`ifdef{0} {11}__VAMS_ENABLE__{0}\n    {5}parameter{0} {5}integer{0} {11}del{0} {10}={0} {4}1{0} {11}from{0} {10}[{4}1{10}:{4}100{10}];{0}\n{9}`else{64}\n    {69}parameter{64} {75}del{64} {74}={64} {68}1{74};{64}\n{9}`endif{0}\n\n{2}// SCE_V_OPERATOR {10}\n{10}+-/=!@#%^&*()[]{}<|>~{0}\n\n{2}// SCE_V_IDENTIFIER {11}\n{11}q{0}\n{11}x$z{0}\n{11}\\my_var{0}\n{11}\\/x1/n1{0}\n{11}\\\\x1\\n1{0}\n{11}\\{a,b}{0}\n{11}\\V(p,n){0}\n\n{2}// SCE_V_STRINGEOL {12}\n{12}\"\\n\n{0}\n{2}// SCE_V_USER {19}\n{19}my_var{0}\n\n{2}// SCE_V_COMMENT_WORD {20}\n// {20}TODO{2} write a comment\n{0}\n{5}module{0} {11}mod{10}({11}clk{10},{0} {11}q{10},{0} {11}reset{10}){0} {2}// folded when fold.verilog.flags=1\n// SCE_V_INPUT {21}\n{0}  {21}input{0} {21}clk{10};{0}\n\n{2}// SCE_V_OUTPUT {22}\n{0}  {22}output{0} {22}q{10};{0}\n\n{2}// SCE_V_INOUT {23}\n{0}  {23}inout{0} {23}reset{10};{0}\n{5}endmodule{0}\n\n{2}// SCE_V_PORT_CONNECT {24}\n{11}mod{0} {11}m1{10}({0}\n  {10}.{24}clk{10}({11}clk{10}),{0}\n  {10}.{24}q{10}({11}q{10}),{0}\n  {10}.{24}reset{10}({11}reset{10}){0}\n{10});{0}\n"
  },
  {
    "path": "lexilla/test/examples/verilog/SciTE.properties",
    "content": "lexer.*.vh=verilog\n\nkeywords.*.vh= \\\nalways and assign automatic \\\nbegin buf bufif0 bufif1 \\\ncase casex casez cell cmos config \\\ndeassign default defparam design disable \\\nedge else end endcase endconfig endfunction endgenerate endmodule endprimitive endspecify endtable endtask event \\\nfor force forever fork function \\\ngenerate genvar \\\nhighz0 highz1 \\\nif ifnone incdir include initial inout input instance integer \\\njoin \\\nlarge liblist library localparam \\\nmacromodule medium module \\\nnand negedge nmos nor noshowcancelled not notif0 notif1 \\\nor output \\\nparameter pmos posedge primitive pull0 pull1 pulldown pullup pulsestyle_ondetect pulsestyle_onevent \\\nrcmos real realtime reg release repeat rnmos rpmos rtran rtranif0 rtranif1 \\\nscalared showcancelled signed small specify specparam strong0 strong1 supply0 supply1 \\\ntable task time tran tranif0 tranif1 tri tri0 tri1 triand trior trireg \\\nunsigned use uwire \\\nvectored \\\nwait wand weak0 weak1 while wire wor \\\nxnor xor\nkeywords2.*.vh=special\nkeywords3.*.vh= \\\n$async$and$array $async$and$plane $async$nand$array $async$nand$plane $async$nor$array $async$nor$plane $async$or$array $async$or$plane \\\n$bitstoreal \\\n$countdrivers \\\n$display $displayb $displayh $displayo \\\n$dist_chi_square $dist_erlang $dist_exponential $dist_normal $dist_poisson $dist_t $dist_uniform \\\n$dumpall $dumpfile $dumpflush $dumplimit $dumpoff $dumpon $dumpportsall $dumpportsflush $dumpportslimit $dumpportsoff $dumpportson $dumpvars \\\n$fclose $fdisplayh $fdisplay $fdisplayf $fdisplayb $feof $ferror $fflush $fgetc $fgets $finish $fmonitorb $fmonitor $fmonitorf $fmonitorh $fopen $fread $fscanf $fseek $fsscanf $fstrobe $fstrobebb $fstrobef $fstrobeh $ftel $fullskew $fwriteb $fwritef $fwriteh $fwrite \\\n$getpattern \\\n$history $hold \\\n$incsave $input $itor \\\n$key \\\n$list $log \\\n$monitorb $monitorh $monitoroff $monitoron $monitor $monitoro \\\n$nochange $nokey $nolog \\\n$period $printtimescale \\\n$q_add $q_exam $q_full $q_initialize $q_remove \\\n$random $readmemb $readmemh $readmemh $realtime $realtobits $recovery $recrem $removal $reset_count $reset $reset_value $restart $rewind $rtoi \\\n$save $scale $scope $sdf_annotate $setup $setuphold $sformat $showscopes $showvariables $showvars $signed $skew $sreadmemb $sreadmemh $stime $stop $strobeb $strobe $strobeh $strobeo $swriteb $swriteh $swriteo $swrite $sync$and$array $sync$and$plane $sync$nand$array $sync$nand$plane $sync$nor$array $sync$nor$plane $sync$or$array $sync$or$plane \\\n$test$plusargs $time $timeformat $timeskew \\\n$ungetc $unsigned \\\n$value$plusargs \\\n$width $writeb $writeh $write $writeo\nkeywords4.*.vh=my_var\nkeywords5.*.vh=synopsys parallel_case infer_mux TODO\n\nfold=1\nfold.compact=0\nfold.comment=1\nfold.preprocessor=1\nfold.at.else=1\nfold.verilog.flags=1  # fold module definitions\nlexer.verilog.track.preprocessor=1\nlexer.verilog.update.preprocessor=1\nlexer.verilog.portstyling=1\nlexer.verilog.fold.preprocessor.else=1\n"
  },
  {
    "path": "lexilla/test/examples/vhdl/SciTE.properties",
    "content": "lexer.*.vhd=vhdl\nfold=1\n\n"
  },
  {
    "path": "lexilla/test/examples/vhdl/x.vhd",
    "content": "library ieee;\nuse ieee.std_logic_1164.all;\nuse ieee.std_logic_arith.all;\n\nentity x is\n    port(\n        rst  : in  std_logic;\n        clk  : in  std_logic;\n        d    : in  std_logic;\n        q    : out std_logic_vector;\n        a, b : in  std_logic;\n        v    : out std_logic\n    );\nend x;\n\narchitecture behavioral of x is\n    signal q_i : std_logic_vector(q'range);\nbegin\n\n    v\t<= a when b = '1' else '0';\n\n    gen: for j in q'low to q'high generate\n        gen_first: if j = q'low generate\n            variable foo : boolean := false;\n        begin\n            stage1: process (rst, clk) begin\n                if rst = '1' then\n                    q_i(j) <= '0';\n                elsif rising_edge(clk) then\n                    q_i(j) <= d;\n                    case a is\n                    when 1 =>\n                    when 2 =>\n                    when others =>\n                    end case;\n                end if;\n            end process;\n        else generate\n            stages: process (rst, clk)\n            begin\n                if rst = '1' then\n                    q_i(j) <= '0';\n                elsif rising_edge(clk) then\n                    for u in 0 to 7 loop\n                        q_i(j) <= q_i(j - 1);\n                    end loop;\n                end if;\n            end process;\n        end generate;\n    end generate;\n\n    L: case expression generate\n    when choice1 =>\n    when choice2 =>\n    end generate L;\n\nend behavioral;\n"
  },
  {
    "path": "lexilla/test/examples/vhdl/x.vhd.folded",
    "content": " 0 400 400   library ieee;\n 0 400 400   use ieee.std_logic_1164.all;\n 0 400 400   use ieee.std_logic_arith.all;\n 1 400 400   \n 2 400 401 + entity x is\n 2 401 402 +     port(\n 0 402 402 |         rst  : in  std_logic;\n 0 402 402 |         clk  : in  std_logic;\n 0 402 402 |         d    : in  std_logic;\n 0 402 402 |         q    : out std_logic_vector;\n 0 402 402 |         a, b : in  std_logic;\n 0 402 402 |         v    : out std_logic\n 0 402 401 |     );\n 0 401 400 | end x;\n 1 400 400   \n 2 400 401 + architecture behavioral of x is\n 0 401 401 |     signal q_i : std_logic_vector(q'range);\n 2 400 401 + begin\n 1 401 401 | \n 0 401 401 |     v\t<= a when b = '1' else '0';\n 1 401 401 | \n 2 401 402 +     gen: for j in q'low to q'high generate\n 2 402 403 +         gen_first: if j = q'low generate\n 0 403 403 |             variable foo : boolean := false;\n 2 402 403 +         begin\n 2 403 404 +             stage1: process (rst, clk) begin\n 2 404 405 +                 if rst = '1' then\n 0 405 405 |                     q_i(j) <= '0';\n 2 404 405 +                 elsif rising_edge(clk) then\n 0 405 405 |                     q_i(j) <= d;\n 2 405 406 +                     case a is\n 0 406 406 |                     when 1 =>\n 0 406 406 |                     when 2 =>\n 0 406 406 |                     when others =>\n 0 406 405 |                     end case;\n 0 405 404 |                 end if;\n 0 404 403 |             end process;\n 2 402 403 +         else generate\n 2 403 404 +             stages: process (rst, clk)\n 0 404 404 |             begin\n 2 404 405 +                 if rst = '1' then\n 0 405 405 |                     q_i(j) <= '0';\n 2 404 405 +                 elsif rising_edge(clk) then\n 2 405 406 +                     for u in 0 to 7 loop\n 0 406 406 |                         q_i(j) <= q_i(j - 1);\n 0 406 405 |                     end loop;\n 0 405 404 |                 end if;\n 0 404 403 |             end process;\n 0 403 402 |         end generate;\n 0 402 401 |     end generate;\n 1 401 401 | \n 2 401 402 +     L: case expression generate\n 0 402 402 |     when choice1 =>\n 0 402 402 |     when choice2 =>\n 0 402 401 |     end generate L;\n 1 401 401 | \n 0 401 400 | end behavioral;\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/vhdl/x.vhd.styled",
    "content": "{6}library{0} {6}ieee{5};{0}\n{6}use{0} {6}ieee{5}.{6}std_logic_1164{5}.{6}all{5};{0}\n{6}use{0} {6}ieee{5}.{6}std_logic_arith{5}.{6}all{5};{0}\n\n{6}entity{0} {6}x{0} {6}is{0}\n    {6}port{5}({0}\n        {6}rst{0}  {5}:{0} {6}in{0}  {6}std_logic{5};{0}\n        {6}clk{0}  {5}:{0} {6}in{0}  {6}std_logic{5};{0}\n        {6}d{0}    {5}:{0} {6}in{0}  {6}std_logic{5};{0}\n        {6}q{0}    {5}:{0} {6}out{0} {6}std_logic_vector{5};{0}\n        {6}a{5},{0} {6}b{0} {5}:{0} {6}in{0}  {6}std_logic{5};{0}\n        {6}v{0}    {5}:{0} {6}out{0} {6}std_logic{0}\n    {5});{0}\n{6}end{0} {6}x{5};{0}\n\n{6}architecture{0} {6}behavioral{0} {6}of{0} {6}x{0} {6}is{0}\n    {6}signal{0} {6}q_i{0} {5}:{0} {6}std_logic_vector{5}({6}q{0}'{6}range{5});{0}\n{6}begin{0}\n\n    {6}v{0}\t{5}<={0} {6}a{0} {6}when{0} {6}b{0} {5}={0} {4}'1'{0} {6}else{0} {4}'0'{5};{0}\n\n    {6}gen{5}:{0} {6}for{0} {6}j{0} {6}in{0} {6}q{0}'{6}low{0} {6}to{0} {6}q{0}'{6}high{0} {6}generate{0}\n        {6}gen_first{5}:{0} {6}if{0} {6}j{0} {5}={0} {6}q{0}'{6}low{0} {6}generate{0}\n            {6}variable{0} {6}foo{0} {5}:{0} {6}boolean{0} {5}:={0} {6}false{5};{0}\n        {6}begin{0}\n            {6}stage1{5}:{0} {6}process{0} {5}({6}rst{5},{0} {6}clk{5}){0} {6}begin{0}\n                {6}if{0} {6}rst{0} {5}={0} {4}'1'{0} {6}then{0}\n                    {6}q_i{5}({6}j{5}){0} {5}<={0} {4}'0'{5};{0}\n                {6}elsif{0} {6}rising_edge{5}({6}clk{5}){0} {6}then{0}\n                    {6}q_i{5}({6}j{5}){0} {5}<={0} {6}d{5};{0}\n                    {6}case{0} {6}a{0} {6}is{0}\n                    {6}when{0} {3}1{0} {5}=>{0}\n                    {6}when{0} {3}2{0} {5}=>{0}\n                    {6}when{0} {6}others{0} {5}=>{0}\n                    {6}end{0} {6}case{5};{0}\n                {6}end{0} {6}if{5};{0}\n            {6}end{0} {6}process{5};{0}\n        {6}else{0} {6}generate{0}\n            {6}stages{5}:{0} {6}process{0} {5}({6}rst{5},{0} {6}clk{5}){0}\n            {6}begin{0}\n                {6}if{0} {6}rst{0} {5}={0} {4}'1'{0} {6}then{0}\n                    {6}q_i{5}({6}j{5}){0} {5}<={0} {4}'0'{5};{0}\n                {6}elsif{0} {6}rising_edge{5}({6}clk{5}){0} {6}then{0}\n                    {6}for{0} {6}u{0} {6}in{0} {3}0{0} {6}to{0} {3}7{0} {6}loop{0}\n                        {6}q_i{5}({6}j{5}){0} {5}<={0} {6}q_i{5}({6}j{0} {5}-{0} {3}1{5});{0}\n                    {6}end{0} {6}loop{5};{0}\n                {6}end{0} {6}if{5};{0}\n            {6}end{0} {6}process{5};{0}\n        {6}end{0} {6}generate{5};{0}\n    {6}end{0} {6}generate{5};{0}\n\n    {6}L{5}:{0} {6}case{0} {6}expression{0} {6}generate{0}\n    {6}when{0} {6}choice1{0} {5}=>{0}\n    {6}when{0} {6}choice2{0} {5}=>{0}\n    {6}end{0} {6}generate{0} {6}L{5};{0}\n\n{6}end{0} {6}behavioral{5};{0}\n"
  },
  {
    "path": "lexilla/test/examples/visualprolog/AllStyles.pl",
    "content": "% SCE_VISUALPROLOG_KEY_MAJOR (1)\n% No keywords in ISO/SWI-Prolog\ngoal\n\n% SCE_VISUALPROLOG_KEY_MINOR (2)\n% No minor keywords in ISO/SWI-Prolog\nprocedure\n\n% SCE_VISUALPROLOG_KEY_DIRECTIVE (3)\n% No directives in ISO/SWI-Prolog\n#include\n\n% SCE_VISUALPROLOG_COMMENT_BLOCK (4)\n/**\n   SCE_VISUALPROLOG_COMMENT_KEY (6)\n   @detail\n   SCE_VISUALPROLOG_COMMENT_KEY_ERROR (7)\n   @unknown\n /* SCE_VISUALPROLOG_IDENTIFIER (8)\n    SCE_VISUALPROLOG_VARIABLE (9)\n    SCE_VISUALPROLOG_ANONYMOUS (10)\n    SCE_VISUALPROLOG_NUMBER (11)\n    SCE_VISUALPROLOG_OPERATOR (12) */ */\nsingleton -->\n    [S],\n    {\n        string_lower(S, L),\n        atom_codes(L, Bytes),\n        sort(0, @=<, Bytes, [95, _discard])\n    }.\n\n% SCE_VISUALPROLOG_COMMENT_LINE (5)\n% comment line\n\n% SCE_VISUALPROLOG_STRING_QUOTE (16)\n\"\"\n\n% SCE_VISUALPROLOG_STRING (20)\n\"string\"\n'string'\n\n% ISO Prolog back-quoted string\n`string`\n\n% SCE_VISUALPROLOG_STRING_ESCAPE (17)\n\"\\n\"\n'\\uAB12'\n\n% SCE_VISUALPROLOG_STRING_ESCAPE_ERROR (18)\n\"\\ \"\n\"open string\n\n% Not implemented for ISO/SWI-Prolog:\n@\"verbatim string\"\n@[<div class=\"test\">]\n\n% SCE_VISUALPROLOG_STRING_EOL (22)\n@#multi-line\n  verbatim\n  string#\n\n% SCE_VISUALPROLOG_EMBEDDED (23)\n[| |]\n% SCE_VISUALPROLOG_PLACEHOLDER (24)\n{| |}:test\n"
  },
  {
    "path": "lexilla/test/examples/visualprolog/AllStyles.pl.folded",
    "content": " 0 400 400   % SCE_VISUALPROLOG_KEY_MAJOR (1)\n 0 400 400   % No keywords in ISO/SWI-Prolog\n 0 400 400   goal\n 0 400 400   \n 0 400 400   % SCE_VISUALPROLOG_KEY_MINOR (2)\n 0 400 400   % No minor keywords in ISO/SWI-Prolog\n 0 400 400   procedure\n 0 400 400   \n 0 400 400   % SCE_VISUALPROLOG_KEY_DIRECTIVE (3)\n 0 400 400   % No directives in ISO/SWI-Prolog\n 0 400 400   #include\n 0 400 400   \n 0 400 400   % SCE_VISUALPROLOG_COMMENT_BLOCK (4)\n 0 400 400   /**\n 0 400 400      SCE_VISUALPROLOG_COMMENT_KEY (6)\n 0 400 400      @detail\n 0 400 400      SCE_VISUALPROLOG_COMMENT_KEY_ERROR (7)\n 0 400 400      @unknown\n 0 400 400    /* SCE_VISUALPROLOG_IDENTIFIER (8)\n 0 400 400       SCE_VISUALPROLOG_VARIABLE (9)\n 0 400 400       SCE_VISUALPROLOG_ANONYMOUS (10)\n 0 400 400       SCE_VISUALPROLOG_NUMBER (11)\n 0 400 400       SCE_VISUALPROLOG_OPERATOR (12) */ */\n 0 400 400   singleton -->\n 0 400 400       [S],\n 2 400 401 +     {\n 0 401 401 |         string_lower(S, L),\n 0 401 401 |         atom_codes(L, Bytes),\n 0 401 401 |         sort(0, @=<, Bytes, [95, _discard])\n 0 401 400 |     }.\n 0 400 400   \n 0 400 400   % SCE_VISUALPROLOG_COMMENT_LINE (5)\n 0 400 400   % comment line\n 0 400 400   \n 0 400 400   % SCE_VISUALPROLOG_STRING_QUOTE (16)\n 0 400 400   \"\"\n 0 400 400   \n 0 400 400   % SCE_VISUALPROLOG_STRING (20)\n 0 400 400   \"string\"\n 0 400 400   'string'\n 0 400 400   \n 0 400 400   % ISO Prolog back-quoted string\n 0 400 400   `string`\n 0 400 400   \n 0 400 400   % SCE_VISUALPROLOG_STRING_ESCAPE (17)\n 0 400 400   \"\\n\"\n 0 400 400   '\\uAB12'\n 0 400 400   \n 0 400 400   % SCE_VISUALPROLOG_STRING_ESCAPE_ERROR (18)\n 0 400 400   \"\\ \"\n 0 400 400   \"open string\n 0 400 400   \n 0 400 400   % Not implemented for ISO/SWI-Prolog:\n 0 400 400   @\"verbatim string\"\n 0 400 400   @[<div class=\"test\">]\n 0 400 400   \n 0 400 400   % SCE_VISUALPROLOG_STRING_EOL (22)\n 0 400 400   @#multi-line\n 0 400 400     verbatim\n 0 400 400     string#\n 0 400 400   \n 0 400 400   % SCE_VISUALPROLOG_EMBEDDED (23)\n 0 400 400   [| |]\n 0 400 400   % SCE_VISUALPROLOG_PLACEHOLDER (24)\n 0 400 400   {| |}:test\n 1 400 400   "
  },
  {
    "path": "lexilla/test/examples/visualprolog/AllStyles.pl.styled",
    "content": "{5}% SCE_VISUALPROLOG_KEY_MAJOR (1){0}\n{5}% No keywords in ISO/SWI-Prolog{0}\n{1}goal{0}\n\n{5}% SCE_VISUALPROLOG_KEY_MINOR (2){0}\n{5}% No minor keywords in ISO/SWI-Prolog{0}\n{2}procedure{0}\n\n{5}% SCE_VISUALPROLOG_KEY_DIRECTIVE (3){0}\n{5}% No directives in ISO/SWI-Prolog{0}\n{3}#include{0}\n\n{5}% SCE_VISUALPROLOG_COMMENT_BLOCK (4){0}\n{4}/**\n   SCE_VISUALPROLOG_COMMENT_KEY (6)\n   {6}@detail{4}\n   SCE_VISUALPROLOG_COMMENT_KEY_ERROR (7)\n   {7}@unknown{4}\n /* SCE_VISUALPROLOG_IDENTIFIER (8)\n    SCE_VISUALPROLOG_VARIABLE (9)\n    SCE_VISUALPROLOG_ANONYMOUS (10)\n    SCE_VISUALPROLOG_NUMBER (11)\n    SCE_VISUALPROLOG_OPERATOR (12) */ */{0}\n{8}singleton{0} {12}-->{0}\n    {12}[{9}S{12}],{0}\n    {12}{{0}\n        {1}string_lower{12}({9}S{12},{0} {9}L{12}),{0}\n        {1}atom_codes{12}({9}L{12},{0} {9}Bytes{12}),{0}\n        {1}sort{12}({11}0{12},{0} {12}@=<,{0} {9}Bytes{12},{0} {12}[{11}95{12},{0} {10}_discard{12}]){0}\n    {12}}.{0}\n\n{5}% SCE_VISUALPROLOG_COMMENT_LINE (5){0}\n{5}% comment line{0}\n\n{5}% SCE_VISUALPROLOG_STRING_QUOTE (16){0}\n{16}\"\"{0}\n\n{5}% SCE_VISUALPROLOG_STRING (20){0}\n{16}\"{20}string{16}\"{0}\n{16}'{20}string{16}'{0}\n\n{5}% ISO Prolog back-quoted string{0}\n{16}`{20}string{16}`{0}\n\n{5}% SCE_VISUALPROLOG_STRING_ESCAPE (17){0}\n{16}\"{17}\\n{16}\"{0}\n{16}'{17}\\uAB12{16}'{0}\n\n{5}% SCE_VISUALPROLOG_STRING_ESCAPE_ERROR (18){0}\n{16}\"{18}\\ {16}\"{0}\n{16}\"{20}open string{18}\n{0}\n{5}% Not implemented for ISO/SWI-Prolog:{0}\n{12}@{16}\"{20}verbatim string{16}\"{0}\n{12}@[<{2}div{0} {1}class{12}={16}\"{20}test{16}\"{12}>]{0}\n\n{5}% SCE_VISUALPROLOG_STRING_EOL (22){0}\n{12}@{8}#multi{12}-{8}line{0}\n  {8}verbatim{0}\n  {8}string#{0}\n\n{5}% SCE_VISUALPROLOG_EMBEDDED (23){0}\n{23}[| |]{0}\n{5}% SCE_VISUALPROLOG_PLACEHOLDER (24){0}\n{24}{|{0} {24}|}:test{0}\n"
  },
  {
    "path": "lexilla/test/examples/visualprolog/AllStyles.pro",
    "content": "% SCE_VISUALPROLOG_KEY_MAJOR (1)\ngoal\n\n% SCE_VISUALPROLOG_KEY_MINOR (2)\nprocedure\n\n% SCE_VISUALPROLOG_KEY_DIRECTIVE (3)\n#include\n\n% SCE_VISUALPROLOG_COMMENT_BLOCK (4)\n/**\n   SCE_VISUALPROLOG_COMMENT_KEY (6)\n   @detail\n   SCE_VISUALPROLOG_COMMENT_KEY_ERROR (7)\n   @unknown\n /* SCE_VISUALPROLOG_IDENTIFIER (8)\n    SCE_VISUALPROLOG_VARIABLE (9)\n    SCE_VISUALPROLOG_ANONYMOUS (10)\n    SCE_VISUALPROLOG_NUMBER (11)\n    SCE_VISUALPROLOG_OPERATOR (12) */ */\nlambda = {\n  (A) = { (B, _discard) = A*B+1 }\n}.\n\n% SCE_VISUALPROLOG_COMMENT_LINE (5)\n% comment line\n\n% SCE_VISUALPROLOG_STRING_QUOTE (16)\n\"\"\n\n% SCE_VISUALPROLOG_STRING (20)\n\"string\"\n'string'\n@\"verbatim string\"\n@[<div class=\"test\">]\n\n% SCE_VISUALPROLOG_STRING_ESCAPE (17)\n\"\\n\"\n'\\uAB12'\n\n% SCE_VISUALPROLOG_STRING_ESCAPE_ERROR (18)\n\"\\ \"\n\"open string\n\n% SCE_VISUALPROLOG_STRING_EOL (22)\n@#multi-line\n  verbatim\n  string#\n\n% SCE_VISUALPROLOG_EMBEDDED (23)\n[| |]\n% SCE_VISUALPROLOG_PLACEHOLDER (24)\n{| |}:test\n% line state & nesting\n[|\n    {|\n        /*\n            % /* \n            */ \n        % */\n        [|\n            {|\n                @!string!\n                %\n                /*\n                */\n            |}\n        |]\n    |}\n|]\n"
  },
  {
    "path": "lexilla/test/examples/visualprolog/AllStyles.pro.folded",
    "content": " 0 400 400   % SCE_VISUALPROLOG_KEY_MAJOR (1)\n 0 400 400   goal\n 0 400 400   \n 0 400 400   % SCE_VISUALPROLOG_KEY_MINOR (2)\n 0 400 400   procedure\n 0 400 400   \n 0 400 400   % SCE_VISUALPROLOG_KEY_DIRECTIVE (3)\n 0 400 400   #include\n 0 400 400   \n 0 400 400   % SCE_VISUALPROLOG_COMMENT_BLOCK (4)\n 0 400 400   /**\n 0 400 400      SCE_VISUALPROLOG_COMMENT_KEY (6)\n 0 400 400      @detail\n 0 400 400      SCE_VISUALPROLOG_COMMENT_KEY_ERROR (7)\n 0 400 400      @unknown\n 0 400 400    /* SCE_VISUALPROLOG_IDENTIFIER (8)\n 0 400 400       SCE_VISUALPROLOG_VARIABLE (9)\n 0 400 400       SCE_VISUALPROLOG_ANONYMOUS (10)\n 0 400 400       SCE_VISUALPROLOG_NUMBER (11)\n 0 400 400       SCE_VISUALPROLOG_OPERATOR (12) */ */\n 2 400 401 + lambda = {\n 0 401 401 |   (A) = { (B, _discard) = A*B+1 }\n 0 401 400 | }.\n 0 400 400   \n 0 400 400   % SCE_VISUALPROLOG_COMMENT_LINE (5)\n 0 400 400   % comment line\n 0 400 400   \n 0 400 400   % SCE_VISUALPROLOG_STRING_QUOTE (16)\n 0 400 400   \"\"\n 0 400 400   \n 0 400 400   % SCE_VISUALPROLOG_STRING (20)\n 0 400 400   \"string\"\n 0 400 400   'string'\n 0 400 400   @\"verbatim string\"\n 0 400 400   @[<div class=\"test\">]\n 0 400 400   \n 0 400 400   % SCE_VISUALPROLOG_STRING_ESCAPE (17)\n 0 400 400   \"\\n\"\n 0 400 400   '\\uAB12'\n 0 400 400   \n 0 400 400   % SCE_VISUALPROLOG_STRING_ESCAPE_ERROR (18)\n 0 400 400   \"\\ \"\n 0 400 400   \"open string\n 0 400 400   \n 0 400 400   % SCE_VISUALPROLOG_STRING_EOL (22)\n 0 400 400   @#multi-line\n 0 400 400     verbatim\n 0 400 400     string#\n 0 400 400   \n 0 400 400   % SCE_VISUALPROLOG_EMBEDDED (23)\n 0 400 400   [| |]\n 0 400 400   % SCE_VISUALPROLOG_PLACEHOLDER (24)\n 0 400 400   {| |}:test\n 0 400 400   % line state & nesting\n 0 400 400   [|\n 0 400 400       {|\n 0 400 400           /*\n 0 400 400               % /* \n 0 400 400               */ \n 0 400 400           % */\n 0 400 400           [|\n 0 400 400               {|\n 0 400 400                   @!string!\n 0 400 400                   %\n 0 400 400                   /*\n 0 400 400                   */\n 0 400 400               |}\n 0 400 400           |]\n 0 400 400       |}\n 0 400 400   |]\n 1 400 400   "
  },
  {
    "path": "lexilla/test/examples/visualprolog/AllStyles.pro.styled",
    "content": "{5}% SCE_VISUALPROLOG_KEY_MAJOR (1){0}\n{1}goal{0}\n\n{5}% SCE_VISUALPROLOG_KEY_MINOR (2){0}\n{2}procedure{0}\n\n{5}% SCE_VISUALPROLOG_KEY_DIRECTIVE (3){0}\n{3}#include{0}\n\n{5}% SCE_VISUALPROLOG_COMMENT_BLOCK (4){0}\n{4}/**\n   SCE_VISUALPROLOG_COMMENT_KEY (6)\n   {6}@detail{4}\n   SCE_VISUALPROLOG_COMMENT_KEY_ERROR (7)\n   {7}@unknown{4}\n /* SCE_VISUALPROLOG_IDENTIFIER (8)\n    SCE_VISUALPROLOG_VARIABLE (9)\n    SCE_VISUALPROLOG_ANONYMOUS (10)\n    SCE_VISUALPROLOG_NUMBER (11)\n    SCE_VISUALPROLOG_OPERATOR (12) */ */{0}\n{8}lambda{0} {12}={0} {12}{{0}\n  {12}({9}A{12}){0} {12}={0} {12}{{0} {12}({9}B{12},{0} {10}_discard{12}){0} {12}={0} {9}A{12}*{9}B{12}+{11}1{0} {12}}{0}\n{12}}.{0}\n\n{5}% SCE_VISUALPROLOG_COMMENT_LINE (5){0}\n{5}% comment line{0}\n\n{5}% SCE_VISUALPROLOG_STRING_QUOTE (16){0}\n{16}\"\"{0}\n\n{5}% SCE_VISUALPROLOG_STRING (20){0}\n{16}\"{20}string{16}\"{0}\n{16}'{20}string{16}'{0}\n{16}@\"{20}verbatim string{16}\"{0}\n{16}@[{20}<div class=\"test\">{16}]{0}\n\n{5}% SCE_VISUALPROLOG_STRING_ESCAPE (17){0}\n{16}\"{17}\\n{16}\"{0}\n{16}'{17}\\uAB12{16}'{0}\n\n{5}% SCE_VISUALPROLOG_STRING_ESCAPE_ERROR (18){0}\n{16}\"{18}\\ {16}\"{0}\n{16}\"{20}open string{18}\n{0}\n{5}% SCE_VISUALPROLOG_STRING_EOL (22){0}\n{16}@#{20}multi-line{22}\n{20}  verbatim{22}\n{20}  string{16}#{0}\n\n{5}% SCE_VISUALPROLOG_EMBEDDED (23){0}\n{23}[| |]{0}\n{5}% SCE_VISUALPROLOG_PLACEHOLDER (24){0}\n{24}{|{0} {24}|}:test{0}\n{5}% line state & nesting{0}\n{23}[|\n    {24}{|{0}\n        {4}/*\n            % /* \n            */ \n        % */{0}\n        {23}[|\n            {24}{|{0}\n                {16}@!{20}string{16}!{0}\n                {5}%{0}\n                {4}/*\n                */{0}\n            {24}|}{23}\n        |]{0}\n    {24}|}{23}\n|]{0}\n"
  },
  {
    "path": "lexilla/test/examples/visualprolog/SciTE.properties",
    "content": "lexer.*.pro;*.pl=visualprolog\nfold=1\n\n# Visual Prolog properties\nmatch AllStyles.pro\n  lexer.visualprolog.verbatim.strings=1\n  lexer.visualprolog.backquoted.strings=0\n\n# ISO/SWI-Prolog properties\nmatch AllStyles.pl\n  lexer.visualprolog.verbatim.strings=0\n  lexer.visualprolog.backquoted.strings=1\n\n# major keywords\nkeywords.*.pro;*.pl=goal namespace interface class implement open inherits supports resolve delegate \\\nmonitor constants domains predicates constructors properties clauses facts string_lower atom_codes sort\n\n# minor keywords\nkeywords2.*.pro;*.pl=any binary binaryNonAtomic boolean char compareResult factDB guard handle integer64 \\\nintegerNative language null pointer real real32 stdcall string8 symbol apicall c thiscall prolog \\\ndigits if then elseif else endif foreach do try catch finally erroneous failure procedure determ multi \\\nnondeterm anyflow and or externally from div mod rem quot in orelse otherwise unsigned unsigned64 \\\nunsignedNative\n\n# directives\nkeywords3.*.pro;*.pl=include bininclude requires orrequires error message export externally options\n\n# documentation keywords\nkeywords4.*.pro;*.pl=short detail end exception withdomain\n"
  },
  {
    "path": "lexilla/test/examples/x12/SciTE.properties",
    "content": "lexer.*.x12=x12\nfold=1\n\n"
  },
  {
    "path": "lexilla/test/examples/x12/empty.x12",
    "content": "ISA*00*          *00*          *01*0011223456     *01*999999999      *950120*0147*U*00300*000000007*0*P*~\nIEA*2*000000007\n"
  },
  {
    "path": "lexilla/test/examples/x12/empty.x12.folded",
    "content": " 2 400   0 + ISA*00*          *00*          *01*0011223456     *01*999999999      *950120*0147*U*00300*000000007*0*P*~\n 0 401   0 | IEA*2*000000007\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/x12/empty.x12.styled",
    "content": "{2}ISA{7}*{0}00{7}*{0}          {7}*{0}00{7}*{0}          {7}*{0}01{7}*{0}0011223456     {7}*{0}01{7}*{0}999999999      {7}*{0}950120{7}*{0}0147{7}*{0}U{7}*{0}00300{7}*{0}000000007{7}*{0}0{7}*{0}P{7}*{8}~{6}\n{2}IEA{7}*{0}2{7}*{0}000000007{6}\n"
  },
  {
    "path": "lexilla/test/examples/x12/x.x12",
    "content": "ISA*00*          *00*          *01*0011223456     *01*999999999      *950120*0147*U*00300*000000007*0*P*~\nGS*PO*0011223456*999999999*950120*0147*5*X*003040\nST*850*000000001\nBEG*00*SA*95018017***950118\nN1*SE*UNIVERSAL WIDGETS\nN3*375 PLYMOUTH PARK*SUITE 205\nN4*IRVING*TX*75061\nPO1*001*4*EA*330*TE*IN*525*VN*X357-W2\nPID*F****HIGH PERFORMANCE WIDGET\nSCH*4*EA****002*950322\nCTT*1*1\nSE*10*000000001\nST*850*000000002\nBEG*00*SA*95018017***950118\nN1*SE*UNIVERSAL WIDGETS\nPID*F****HIGH PERFORMANCE WIDGET\nSCH*4*EA****002*950322\nCTT*1*1\nSE*7*000000002\nGE*2*5\nGS*PO*0011223456*999999999*950120*0147*6*X*003040\nST*850*000000003\nBEG*00*SA*95018017***950118\nN1*SE*UNIVERSAL WIDGETS\nN3*375 PLYMOUTH PARK*SUITE 205\nN4*IRVING*TX*75061\nPO1*001*4*EA*330*TE*IN*525*VN*X357-W2\nPID*F****HIGH PERFORMANCE WIDGET\nSCH*4*EA****002*950322\nCTT*1*1\nSE*10*000000003\nGE*1*6\nIEA*2*000000007\n"
  },
  {
    "path": "lexilla/test/examples/x12/x.x12.folded",
    "content": " 2 400   0 + ISA*00*          *00*          *01*0011223456     *01*999999999      *950120*0147*U*00300*000000007*0*P*~\n 2 401   0 + GS*PO*0011223456*999999999*950120*0147*5*X*003040\n 2 402   0 + ST*850*000000001\n 0 403   0 | BEG*00*SA*95018017***950118\n 0 403   0 | N1*SE*UNIVERSAL WIDGETS\n 0 403   0 | N3*375 PLYMOUTH PARK*SUITE 205\n 0 403   0 | N4*IRVING*TX*75061\n 0 403   0 | PO1*001*4*EA*330*TE*IN*525*VN*X357-W2\n 0 403   0 | PID*F****HIGH PERFORMANCE WIDGET\n 0 403   0 | SCH*4*EA****002*950322\n 0 403   0 | CTT*1*1\n 0 403   0 | SE*10*000000001\n 2 402   0 + ST*850*000000002\n 0 403   0 | BEG*00*SA*95018017***950118\n 0 403   0 | N1*SE*UNIVERSAL WIDGETS\n 0 403   0 | PID*F****HIGH PERFORMANCE WIDGET\n 0 403   0 | SCH*4*EA****002*950322\n 0 403   0 | CTT*1*1\n 0 403   0 | SE*7*000000002\n 0 402   0 | GE*2*5\n 2 401   0 + GS*PO*0011223456*999999999*950120*0147*6*X*003040\n 2 402   0 + ST*850*000000003\n 0 403   0 | BEG*00*SA*95018017***950118\n 0 403   0 | N1*SE*UNIVERSAL WIDGETS\n 0 403   0 | N3*375 PLYMOUTH PARK*SUITE 205\n 0 403   0 | N4*IRVING*TX*75061\n 0 403   0 | PO1*001*4*EA*330*TE*IN*525*VN*X357-W2\n 0 403   0 | PID*F****HIGH PERFORMANCE WIDGET\n 0 403   0 | SCH*4*EA****002*950322\n 0 403   0 | CTT*1*1\n 0 403   0 | SE*10*000000003\n 0 402   0 | GE*1*6\n 0 401   0 | IEA*2*000000007\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/x12/x.x12.styled",
    "content": "{2}ISA{7}*{0}00{7}*{0}          {7}*{0}00{7}*{0}          {7}*{0}01{7}*{0}0011223456     {7}*{0}01{7}*{0}999999999      {7}*{0}950120{7}*{0}0147{7}*{0}U{7}*{0}00300{7}*{0}000000007{7}*{0}0{7}*{0}P{7}*{8}~{6}\n{3}GS{7}*{0}PO{7}*{0}0011223456{7}*{0}999999999{7}*{0}950120{7}*{0}0147{7}*{0}5{7}*{0}X{7}*{0}003040{6}\n{4}ST{7}*{0}850{7}*{0}000000001{6}\n{5}BEG{7}*{0}00{7}*{0}SA{7}*{0}95018017{7}***{0}950118{6}\n{5}N1{7}*{0}SE{7}*{0}UNIVERSAL WIDGETS{6}\n{5}N3{7}*{0}375 PLYMOUTH PARK{7}*{0}SUITE 205{6}\n{5}N4{7}*{0}IRVING{7}*{0}TX{7}*{0}75061{6}\n{5}PO1{7}*{0}001{7}*{0}4{7}*{0}EA{7}*{0}330{7}*{0}TE{7}*{0}IN{7}*{0}525{7}*{0}VN{7}*{0}X357-W2{6}\n{5}PID{7}*{0}F{7}****{0}HIGH PERFORMANCE WIDGET{6}\n{5}SCH{7}*{0}4{7}*{0}EA{7}****{0}002{7}*{0}950322{6}\n{5}CTT{7}*{0}1{7}*{0}1{6}\n{4}SE{7}*{0}10{7}*{0}000000001{6}\n{4}ST{7}*{0}850{7}*{0}000000002{6}\n{5}BEG{7}*{0}00{7}*{0}SA{7}*{0}95018017{7}***{0}950118{6}\n{5}N1{7}*{0}SE{7}*{0}UNIVERSAL WIDGETS{6}\n{5}PID{7}*{0}F{7}****{0}HIGH PERFORMANCE WIDGET{6}\n{5}SCH{7}*{0}4{7}*{0}EA{7}****{0}002{7}*{0}950322{6}\n{5}CTT{7}*{0}1{7}*{0}1{6}\n{4}SE{7}*{0}7{7}*{0}000000002{6}\n{3}GE{7}*{0}2{7}*{0}5{6}\n{3}GS{7}*{0}PO{7}*{0}0011223456{7}*{0}999999999{7}*{0}950120{7}*{0}0147{7}*{0}6{7}*{0}X{7}*{0}003040{6}\n{4}ST{7}*{0}850{7}*{0}000000003{6}\n{5}BEG{7}*{0}00{7}*{0}SA{7}*{0}95018017{7}***{0}950118{6}\n{5}N1{7}*{0}SE{7}*{0}UNIVERSAL WIDGETS{6}\n{5}N3{7}*{0}375 PLYMOUTH PARK{7}*{0}SUITE 205{6}\n{5}N4{7}*{0}IRVING{7}*{0}TX{7}*{0}75061{6}\n{5}PO1{7}*{0}001{7}*{0}4{7}*{0}EA{7}*{0}330{7}*{0}TE{7}*{0}IN{7}*{0}525{7}*{0}VN{7}*{0}X357-W2{6}\n{5}PID{7}*{0}F{7}****{0}HIGH PERFORMANCE WIDGET{6}\n{5}SCH{7}*{0}4{7}*{0}EA{7}****{0}002{7}*{0}950322{6}\n{5}CTT{7}*{0}1{7}*{0}1{6}\n{4}SE{7}*{0}10{7}*{0}000000003{6}\n{3}GE{7}*{0}1{7}*{0}6{6}\n{2}IEA{7}*{0}2{7}*{0}000000007{6}\n"
  },
  {
    "path": "lexilla/test/examples/yaml/SciTE.properties",
    "content": "lexer.*.yaml=yaml\nkeywords.*.yaml=true false yes no\nfold=1\n"
  },
  {
    "path": "lexilla/test/examples/yaml/longline.yaml",
    "content": "# makefile lexer previously used fixed 1024-byte line buffer that would treat text after that as new line\n\n# Long line with 1025 bytes last 2 bytes colored as default 3456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 12345678912345678\n\n"
  },
  {
    "path": "lexilla/test/examples/yaml/longline.yaml.folded",
    "content": " 0 400   0   # makefile lexer previously used fixed 1024-byte line buffer that would treat text after that as new line\n 1 400   0   \n 0 400   0   # Long line with 1025 bytes last 2 bytes colored as default 3456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 12345678912345678\n 1 400   0   \n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/yaml/longline.yaml.styled",
    "content": "{1}# makefile lexer previously used fixed 1024-byte line buffer that would treat text after that as new line\n{0}\n{1}# Long line with 1025 bytes last 2 bytes colored as default 3456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 12345678912345678\n{0}\n"
  },
  {
    "path": "lexilla/test/examples/yaml/x.yaml",
    "content": "# comment\n\nkey: value # comment\n\ncolon:in:key: value\n\nhanging_value:\n  value\n\n1: 1\n\ntrue: true\n"
  },
  {
    "path": "lexilla/test/examples/yaml/x.yaml.folded",
    "content": " 0 400   0   # comment\n 1 400   0   \n 0 400   0   key: value # comment\n 1 400   0   \n 0 400   0   colon:in:key: value\n 1 400   0   \n 2 400   0 + hanging_value:\n 0 402   0 |   value\n 1 400   0   \n 0 400   0   1: 1\n 1 400   0   \n 0 400   0   true: true\n 0 400   0   "
  },
  {
    "path": "lexilla/test/examples/yaml/x.yaml.styled",
    "content": "{1}# comment\n{0}\n{2}key{9}:{0} value {1}# comment\n{0}\n{2}colon:in:key{9}:{0} value\n\n{2}hanging_value{9}:{0}\n  value\n\n{2}1{9}:{4} 1\n{0}\n{2}true{9}:{3} true\n"
  },
  {
    "path": "lexilla/test/makefile",
    "content": "# Build all the lexer tests using GNU make and either g++ or Clang\n# @file makefile\n# Copyright 2019 by Neil Hodgson <neilh@scintilla.org>\n# The License.txt file describes the conditions under which this software may be distributed.\n# Should be run using mingw32-make on Windows, not nmake\n# On Windows g++ is used, on macOS clang, and on Linux g++ is used by default\n# but clang can be used by defining CLANG when invoking make\n# clang works only with libc++, not libstdc++\n\n.PHONY: all test clean\n\n.SUFFIXES: .cxx\n\nWARNINGS = -Wpedantic -Wall -Wextra\n\nifndef windir\nLIBS += -ldl\nifeq ($(shell uname),Darwin)\n# On macOS always use Clang\nCLANG = 1\nendif\nendif\n\nEXE = $(if $(windir),TestLexers.exe,TestLexers)\n\nBASE_FLAGS += --std=c++2a\n\nifdef CLANG\n    CXX = clang++\n    BASE_FLAGS += -fsanitize=address\nendif\n\nifdef LEXILLA_STATIC\n    DEFINES += -D LEXILLA_STATIC\n    LIBS += ../bin/liblexilla.a\nendif\n\nifdef windir\n    DEL = $(if $(wildcard $(dir $(SHELL))rm.exe), $(dir $(SHELL))rm.exe -f, del /q)\nelse\n    DEL = rm -f\nendif\n\nvpath %.cxx ../access\n\nDEFINES += -D$(if $(DEBUG),DEBUG,NDEBUG)\nBASE_FLAGS += $(if $(DEBUG),-g,-O3)\n\nINCLUDES = -I ../../scintilla/include -I ../include -I ../access\nBASE_FLAGS += $(WARNINGS)\n\nall: $(EXE)\n\ntest: $(EXE)\n\t./$(EXE)\n\nclean:\n\t$(DEL) *.o *.obj $(EXE)\n\n%.o: %.cxx\n\t$(CXX) $(DEFINES) $(INCLUDES) $(BASE_FLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@\n\nOBJS = TestLexers.o TestDocument.o LexillaAccess.o\n\n$(EXE): $(OBJS)\n\t$(CXX) $(BASE_FLAGS) $(CPPFLAGS) $(CXXFLAGS) $^ $(LIBS) $(LDLIBS) -o $@\n\nTestLexers.o: TestLexers.cxx TestDocument.h\nTestDocument.o: TestDocument.cxx TestDocument.h\n"
  },
  {
    "path": "lexilla/test/testlexers.mak",
    "content": "# Build the lexers test with Microsoft Visual C++ using nmake\n# Tested with Visual C++ 2019\n\nDEL = del /q\nEXE = TestLexers.exe\n\nINCLUDEDIRS = -I ../../scintilla/include -I ../include -I ../access\n\n!IFDEF LEXILLA_STATIC\nSTATIC_FLAG = -D LEXILLA_STATIC\nLIBS = ../bin/liblexilla.lib\n!ENDIF\n\n!IFDEF DEBUG\nDEBUG_OPTIONS = -Zi -DEBUG -Od -MTd -DDEBUG $(STATIC_FLAG)\n!ELSE\nDEBUG_OPTIONS = -O2 -MT -DNDEBUG $(STATIC_FLAG) -GL\n!ENDIF\n\nCXXFLAGS = /EHsc /std:c++latest $(DEBUG_OPTIONS) $(INCLUDEDIRS)\n\nOBJS = TestLexers.obj TestDocument.obj LexillaAccess.obj\n\nall: $(EXE)\n\ntest: $(EXE)\n\t$(EXE)\n\nclean:\n\t$(DEL) *.o *.obj *.exe\n\n$(EXE): $(OBJS) $(LIBS)\n\t$(CXX) $(CXXFLAGS) $(LIBS) /Fe$@ $**\n\n.cxx.obj::\n\t$(CXX) $(CXXFLAGS) -c $<\n{..\\access}.cxx.obj::\n\t$(CXX) $(CXXFLAGS) -c $(NAME) $<\n\n.cxx.obj::\n\t$(CXX) $(CXXFLAGS) -c $<\n\nTestLexers.obj: $*.cxx TestDocument.h\nTestDocument.obj: $*.cxx $*.h\n"
  },
  {
    "path": "lexilla/test/unit/LICENSE_1_0.txt",
    "content": "Boost Software License - Version 1.0 - August 17th, 2003\n\nPermission is hereby granted, free of charge, to any person or organization\nobtaining a copy of the software and accompanying documentation covered by\nthis license (the \"Software\") to use, reproduce, display, distribute,\nexecute, and transmit the Software, and to prepare derivative works of the\nSoftware, and to permit third-parties to whom the Software is furnished to\ndo so, all subject to the following:\n\nThe copyright notices in the Software and this entire statement, including\nthe above license grant, this restriction and the following disclaimer,\nmust be included in all copies of the Software, in whole or in part, and\nall derivative works of the Software, unless such copies or derivative\nworks are solely in the form of machine-executable object code generated by\na source language processor.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT\nSHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE\nFOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,\nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n"
  },
  {
    "path": "lexilla/test/unit/README",
    "content": "The test/unit directory contains unit tests for Scintilla data structures.\r\n\r\nThe tests can be run on Windows, macOS, or Linux using g++ and GNU make.\r\nThe Catch test framework is used.\r\nhttps://github.com/philsquared/Catch\r\nThe file catch.hpp is under the Boost Software License which is contained in LICENSE_1_0.txt\r\n\r\n   To run the tests on macOS or Linux:\r\nmake test\r\n\r\n   To run the tests on Windows:\r\nmingw32-make test\r\n\r\n   Visual C++ (2010+) and nmake can also be used on Windows:\r\nnmake -f test.mak test\r\n"
  },
  {
    "path": "lexilla/test/unit/Sci.natvis",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<AutoVisualizer xmlns=\"http://schemas.microsoft.com/vstudio/debugger/natvis/2010\">\r\n  <Type Name=\"Scintilla::SplitVector&lt;*&gt;\">\r\n    <DisplayString>{{size = {lengthBody}}}</DisplayString>\r\n    <Expand>\r\n      <Item Name=\"[size]\">lengthBody</Item>\r\n      <Item Name=\"[part1Length]\">part1Length</Item>\r\n      <Item Name=\"[gap]\">gapLength</Item>\r\n      <IndexListItems>\r\n        <Size>lengthBody</Size>\r\n        <ValueNode>body[($i&lt;part1Length)?$i:$i+gapLength]</ValueNode>\r\n      </IndexListItems>\r\n    </Expand>\r\n  </Type>\r\n  <Type Name=\"Scintilla::Partitioning&lt;*&gt;\">\r\n    <DisplayString>{{size = {body->lengthBody}}}</DisplayString>\r\n    <Expand>\r\n      <IndexListItems>\r\n        <Size>body->lengthBody</Size>\r\n        <ValueNode>body->body[($i&lt;body->part1Length)?$i:$i+body->gapLength]+($i&gt;stepPartition?stepLength:0)</ValueNode>\r\n      </IndexListItems>\r\n    </Expand>\r\n  </Type>\r\n  <Type Name=\"std::unique_ptr&lt;*&gt;\">\r\n    <SmartPointer Usage=\"Minimal\">_Mypair._Myval2</SmartPointer>\r\n    <DisplayString Condition=\"_Mypair._Myval2 == 0\">empty</DisplayString>\r\n    <DisplayString Condition=\"_Mypair._Myval2 != 0\">unique_ptr {*_Mypair._Myval2}</DisplayString>\r\n    <Expand>\r\n      <ExpandedItem Condition=\"_Mypair._Myval2 != 0\">_Mypair._Myval2</ExpandedItem>\r\n      <ExpandedItem Condition=\"_Mypair._Myval2 != 0\">_Mypair</ExpandedItem>\r\n    </Expand>\r\n  </Type>\r\n</AutoVisualizer>\r\n"
  },
  {
    "path": "lexilla/test/unit/SciTE.properties",
    "content": "command.go.*.cxx=./unitTest\nif PLAT_WIN\n\tmake.command=mingw32-make\n\tcommand.go.*.cxx=unitTest\ncommand.go.needs.$(file.patterns.cplusplus)=$(make.command)\n"
  },
  {
    "path": "lexilla/test/unit/UnitTester.cxx",
    "content": "/** @file UnitTester.cxx\n ** UnitTester.cpp : Defines the entry point for the console application.\n **/\n\n// Catch uses std::uncaught_exception which is deprecated in C++17.\n// This define silences a warning from Visual C++.\n#define _SILENCE_CXX17_UNCAUGHT_EXCEPTION_DEPRECATION_WARNING\n\n#include <cstdio>\n#include <cstdarg>\n\n#include <string_view>\n#include <vector>\n#include <memory>\n\n#define CATCH_CONFIG_WINDOWS_CRTDBG\n#define CATCH_CONFIG_RUNNER\n#include \"catch.hpp\"\n\nint main(int argc, char* argv[]) {\n\tconst int result = Catch::Session().run(argc, argv);\n\n\treturn result;\n}\n"
  },
  {
    "path": "lexilla/test/unit/UnitTester.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project DefaultTargets=\"Build\" ToolsVersion=\"15.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <ItemGroup Label=\"ProjectConfigurations\">\r\n    <ProjectConfiguration Include=\"Debug|Win32\">\r\n      <Configuration>Debug</Configuration>\r\n      <Platform>Win32</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Release|Win32\">\r\n      <Configuration>Release</Configuration>\r\n      <Platform>Win32</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Debug|x64\">\r\n      <Configuration>Debug</Configuration>\r\n      <Platform>x64</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Release|x64\">\r\n      <Configuration>Release</Configuration>\r\n      <Platform>x64</Platform>\r\n    </ProjectConfiguration>\r\n  </ItemGroup>\r\n  <PropertyGroup Label=\"Globals\">\r\n    <ProjectGuid>{35688A27-D91B-453A-8A05-65A7F28DEFBF}</ProjectGuid>\r\n    <Keyword>Win32Proj</Keyword>\r\n    <RootNamespace>UnitTester</RootNamespace>\r\n    <WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\r\n    <ConfigurationType>Application</ConfigurationType>\r\n    <UseDebugLibraries>true</UseDebugLibraries>\r\n    <PlatformToolset>v141</PlatformToolset>\r\n    <CharacterSet>Unicode</CharacterSet>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\r\n    <ConfigurationType>Application</ConfigurationType>\r\n    <UseDebugLibraries>false</UseDebugLibraries>\r\n    <PlatformToolset>v141</PlatformToolset>\r\n    <WholeProgramOptimization>true</WholeProgramOptimization>\r\n    <CharacterSet>Unicode</CharacterSet>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"Configuration\">\r\n    <ConfigurationType>Application</ConfigurationType>\r\n    <UseDebugLibraries>true</UseDebugLibraries>\r\n    <PlatformToolset>v141</PlatformToolset>\r\n    <CharacterSet>Unicode</CharacterSet>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"Configuration\">\r\n    <ConfigurationType>Application</ConfigurationType>\r\n    <UseDebugLibraries>false</UseDebugLibraries>\r\n    <PlatformToolset>v141</PlatformToolset>\r\n    <WholeProgramOptimization>true</WholeProgramOptimization>\r\n    <CharacterSet>Unicode</CharacterSet>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\r\n  <ImportGroup Label=\"ExtensionSettings\">\r\n  </ImportGroup>\r\n  <ImportGroup Label=\"Shared\">\r\n  </ImportGroup>\r\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n  </ImportGroup>\r\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n  </ImportGroup>\r\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n  </ImportGroup>\r\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n  </ImportGroup>\r\n  <PropertyGroup Label=\"UserMacros\" />\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n    <LinkIncremental>true</LinkIncremental>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\r\n    <LinkIncremental>true</LinkIncremental>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n    <LinkIncremental>false</LinkIncremental>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\r\n    <LinkIncremental>false</LinkIncremental>\r\n  </PropertyGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n    <ClCompile>\r\n      <PrecompiledHeader>\r\n      </PrecompiledHeader>\r\n      <WarningLevel>Level3</WarningLevel>\r\n      <Optimization>Disabled</Optimization>\r\n      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS=1;_HAS_AUTO_PTR_ETC=1;_SCL_SECURE_NO_WARNINGS=1;CHECK_CORRECTNESS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <AdditionalIncludeDirectories>..\\..\\include\\;..\\..\\lexlib\\;..\\..\\..\\scintilla\\include\\</AdditionalIncludeDirectories>\r\n      <LanguageStandard>stdcpp17</LanguageStandard>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <GenerateDebugInformation>true</GenerateDebugInformation>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\r\n    <ClCompile>\r\n      <PrecompiledHeader>\r\n      </PrecompiledHeader>\r\n      <WarningLevel>Level3</WarningLevel>\r\n      <Optimization>Disabled</Optimization>\r\n      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS=1;_HAS_AUTO_PTR_ETC=1;_SCL_SECURE_NO_WARNINGS=1;CHECK_CORRECTNESS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <AdditionalIncludeDirectories>..\\..\\include\\;..\\..\\lexlib\\;..\\..\\..\\scintilla\\include\\</AdditionalIncludeDirectories>\r\n      <LanguageStandard>stdcpp17</LanguageStandard>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <GenerateDebugInformation>true</GenerateDebugInformation>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n    <ClCompile>\r\n      <WarningLevel>Level3</WarningLevel>\r\n      <PrecompiledHeader>\r\n      </PrecompiledHeader>\r\n      <Optimization>MaxSpeed</Optimization>\r\n      <FunctionLevelLinking>true</FunctionLevelLinking>\r\n      <IntrinsicFunctions>true</IntrinsicFunctions>\r\n      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS=1;_HAS_AUTO_PTR_ETC=1;_SCL_SECURE_NO_WARNINGS=1;CHECK_CORRECTNESS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <AdditionalIncludeDirectories>..\\..\\include\\;..\\..\\lexlib\\;..\\..\\..\\scintilla\\include\\</AdditionalIncludeDirectories>\r\n      <LanguageStandard>stdcpp17</LanguageStandard>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r\n      <OptimizeReferences>true</OptimizeReferences>\r\n      <GenerateDebugInformation>true</GenerateDebugInformation>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\r\n    <ClCompile>\r\n      <WarningLevel>Level3</WarningLevel>\r\n      <PrecompiledHeader>\r\n      </PrecompiledHeader>\r\n      <Optimization>MaxSpeed</Optimization>\r\n      <FunctionLevelLinking>true</FunctionLevelLinking>\r\n      <IntrinsicFunctions>true</IntrinsicFunctions>\r\n      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS=1;_HAS_AUTO_PTR_ETC=1;_SCL_SECURE_NO_WARNINGS=1;CHECK_CORRECTNESS;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <AdditionalIncludeDirectories>..\\..\\include\\;..\\..\\lexlib\\;..\\..\\..\\scintilla\\include\\</AdditionalIncludeDirectories>\r\n      <LanguageStandard>stdcpp17</LanguageStandard>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r\n      <OptimizeReferences>true</OptimizeReferences>\r\n      <GenerateDebugInformation>true</GenerateDebugInformation>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemGroup>\r\n    <ClCompile Include=\"..\\..\\lexlib\\Accessor.cxx\" />\r\n    <ClCompile Include=\"..\\..\\lexlib\\CharacterSet.cxx\" />\r\n    <ClCompile Include=\"..\\..\\lexlib\\InList.cxx\" />\r\n    <ClCompile Include=\"..\\..\\lexlib\\LexerBase.cxx\" />\r\n    <ClCompile Include=\"..\\..\\lexlib\\LexerModule.cxx\" />\r\n    <ClCompile Include=\"..\\..\\lexlib\\LexerSimple.cxx\" />\r\n    <ClCompile Include=\"..\\..\\lexlib\\PropSetSimple.cxx\" />\r\n    <ClCompile Include=\"..\\..\\lexlib\\WordList.cxx\" />\r\n    <ClCompile Include=\"test*.cxx\" />\r\n    <ClCompile Include=\"UnitTester.cxx\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Natvis Include=\"Sci.natvis\" />\r\n  </ItemGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\r\n  <ImportGroup Label=\"ExtensionTargets\">\r\n  </ImportGroup>\r\n</Project>"
  },
  {
    "path": "lexilla/test/unit/catch.hpp",
    "content": "/*\n *  Catch v2.13.10\n *  Generated: 2022-10-16 11:01:23.452308\n *  ----------------------------------------------------------\n *  This file has been merged from multiple headers. Please don't edit it directly\n *  Copyright (c) 2022 Two Blue Cubes Ltd. All rights reserved.\n *\n *  Distributed under the Boost Software License, Version 1.0. (See accompanying\n *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\n */\n#ifndef TWOBLUECUBES_SINGLE_INCLUDE_CATCH_HPP_INCLUDED\n#define TWOBLUECUBES_SINGLE_INCLUDE_CATCH_HPP_INCLUDED\n// start catch.hpp\n\n\n#define CATCH_VERSION_MAJOR 2\n#define CATCH_VERSION_MINOR 13\n#define CATCH_VERSION_PATCH 10\n\n#ifdef __clang__\n#    pragma clang system_header\n#elif defined __GNUC__\n#    pragma GCC system_header\n#endif\n\n// start catch_suppress_warnings.h\n\n#ifdef __clang__\n#   ifdef __ICC // icpc defines the __clang__ macro\n#       pragma warning(push)\n#       pragma warning(disable: 161 1682)\n#   else // __ICC\n#       pragma clang diagnostic push\n#       pragma clang diagnostic ignored \"-Wpadded\"\n#       pragma clang diagnostic ignored \"-Wswitch-enum\"\n#       pragma clang diagnostic ignored \"-Wcovered-switch-default\"\n#    endif\n#elif defined __GNUC__\n     // Because REQUIREs trigger GCC's -Wparentheses, and because still\n     // supported version of g++ have only buggy support for _Pragmas,\n     // Wparentheses have to be suppressed globally.\n#    pragma GCC diagnostic ignored \"-Wparentheses\" // See #674 for details\n\n#    pragma GCC diagnostic push\n#    pragma GCC diagnostic ignored \"-Wunused-variable\"\n#    pragma GCC diagnostic ignored \"-Wpadded\"\n#endif\n// end catch_suppress_warnings.h\n#if defined(CATCH_CONFIG_MAIN) || defined(CATCH_CONFIG_RUNNER)\n#  define CATCH_IMPL\n#  define CATCH_CONFIG_ALL_PARTS\n#endif\n\n// In the impl file, we want to have access to all parts of the headers\n// Can also be used to sanely support PCHs\n#if defined(CATCH_CONFIG_ALL_PARTS)\n#  define CATCH_CONFIG_EXTERNAL_INTERFACES\n#  if defined(CATCH_CONFIG_DISABLE_MATCHERS)\n#    undef CATCH_CONFIG_DISABLE_MATCHERS\n#  endif\n#  if !defined(CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER)\n#    define CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER\n#  endif\n#endif\n\n#if !defined(CATCH_CONFIG_IMPL_ONLY)\n// start catch_platform.h\n\n// See e.g.:\n// https://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/TargetConditionals.h.auto.html\n#ifdef __APPLE__\n#  include <TargetConditionals.h>\n#  if (defined(TARGET_OS_OSX) && TARGET_OS_OSX == 1) || \\\n      (defined(TARGET_OS_MAC) && TARGET_OS_MAC == 1)\n#    define CATCH_PLATFORM_MAC\n#  elif (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE == 1)\n#    define CATCH_PLATFORM_IPHONE\n#  endif\n\n#elif defined(linux) || defined(__linux) || defined(__linux__)\n#  define CATCH_PLATFORM_LINUX\n\n#elif defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(_MSC_VER) || defined(__MINGW32__)\n#  define CATCH_PLATFORM_WINDOWS\n#endif\n\n// end catch_platform.h\n\n#ifdef CATCH_IMPL\n#  ifndef CLARA_CONFIG_MAIN\n#    define CLARA_CONFIG_MAIN_NOT_DEFINED\n#    define CLARA_CONFIG_MAIN\n#  endif\n#endif\n\n// start catch_user_interfaces.h\n\nnamespace Catch {\n    unsigned int rngSeed();\n}\n\n// end catch_user_interfaces.h\n// start catch_tag_alias_autoregistrar.h\n\n// start catch_common.h\n\n// start catch_compiler_capabilities.h\n\n// Detect a number of compiler features - by compiler\n// The following features are defined:\n//\n// CATCH_CONFIG_COUNTER : is the __COUNTER__ macro supported?\n// CATCH_CONFIG_WINDOWS_SEH : is Windows SEH supported?\n// CATCH_CONFIG_POSIX_SIGNALS : are POSIX signals supported?\n// CATCH_CONFIG_DISABLE_EXCEPTIONS : Are exceptions enabled?\n// ****************\n// Note to maintainers: if new toggles are added please document them\n// in configuration.md, too\n// ****************\n\n// In general each macro has a _NO_<feature name> form\n// (e.g. CATCH_CONFIG_NO_POSIX_SIGNALS) which disables the feature.\n// Many features, at point of detection, define an _INTERNAL_ macro, so they\n// can be combined, en-mass, with the _NO_ forms later.\n\n#ifdef __cplusplus\n\n#  if (__cplusplus >= 201402L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201402L)\n#    define CATCH_CPP14_OR_GREATER\n#  endif\n\n#  if (__cplusplus >= 201703L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L)\n#    define CATCH_CPP17_OR_GREATER\n#  endif\n\n#endif\n\n// Only GCC compiler should be used in this block, so other compilers trying to\n// mask themselves as GCC should be ignored.\n#if defined(__GNUC__) && !defined(__clang__) && !defined(__ICC) && !defined(__CUDACC__) && !defined(__LCC__)\n#    define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( \"GCC diagnostic push\" )\n#    define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION  _Pragma( \"GCC diagnostic pop\" )\n\n#    define CATCH_INTERNAL_IGNORE_BUT_WARN(...) (void)__builtin_constant_p(__VA_ARGS__)\n\n#endif\n\n#if defined(__clang__)\n\n#    define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( \"clang diagnostic push\" )\n#    define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION  _Pragma( \"clang diagnostic pop\" )\n\n// As of this writing, IBM XL's implementation of __builtin_constant_p has a bug\n// which results in calls to destructors being emitted for each temporary,\n// without a matching initialization. In practice, this can result in something\n// like `std::string::~string` being called on an uninitialized value.\n//\n// For example, this code will likely segfault under IBM XL:\n// ```\n// REQUIRE(std::string(\"12\") + \"34\" == \"1234\")\n// ```\n//\n// Therefore, `CATCH_INTERNAL_IGNORE_BUT_WARN` is not implemented.\n#  if !defined(__ibmxl__) && !defined(__CUDACC__)\n#    define CATCH_INTERNAL_IGNORE_BUT_WARN(...) (void)__builtin_constant_p(__VA_ARGS__) /* NOLINT(cppcoreguidelines-pro-type-vararg, hicpp-vararg) */\n#  endif\n\n#    define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \\\n         _Pragma( \"clang diagnostic ignored \\\"-Wexit-time-destructors\\\"\" ) \\\n         _Pragma( \"clang diagnostic ignored \\\"-Wglobal-constructors\\\"\")\n\n#    define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS \\\n         _Pragma( \"clang diagnostic ignored \\\"-Wparentheses\\\"\" )\n\n#    define CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS \\\n         _Pragma( \"clang diagnostic ignored \\\"-Wunused-variable\\\"\" )\n\n#    define CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS \\\n         _Pragma( \"clang diagnostic ignored \\\"-Wgnu-zero-variadic-macro-arguments\\\"\" )\n\n#    define CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \\\n         _Pragma( \"clang diagnostic ignored \\\"-Wunused-template\\\"\" )\n\n#endif // __clang__\n\n////////////////////////////////////////////////////////////////////////////////\n// Assume that non-Windows platforms support posix signals by default\n#if !defined(CATCH_PLATFORM_WINDOWS)\n    #define CATCH_INTERNAL_CONFIG_POSIX_SIGNALS\n#endif\n\n////////////////////////////////////////////////////////////////////////////////\n// We know some environments not to support full POSIX signals\n#if defined(__CYGWIN__) || defined(__QNX__) || defined(__EMSCRIPTEN__) || defined(__DJGPP__)\n    #define CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS\n#endif\n\n#ifdef __OS400__\n#       define CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS\n#       define CATCH_CONFIG_COLOUR_NONE\n#endif\n\n////////////////////////////////////////////////////////////////////////////////\n// Android somehow still does not support std::to_string\n#if defined(__ANDROID__)\n#    define CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING\n#    define CATCH_INTERNAL_CONFIG_ANDROID_LOGWRITE\n#endif\n\n////////////////////////////////////////////////////////////////////////////////\n// Not all Windows environments support SEH properly\n#if defined(__MINGW32__)\n#    define CATCH_INTERNAL_CONFIG_NO_WINDOWS_SEH\n#endif\n\n////////////////////////////////////////////////////////////////////////////////\n// PS4\n#if defined(__ORBIS__)\n#    define CATCH_INTERNAL_CONFIG_NO_NEW_CAPTURE\n#endif\n\n////////////////////////////////////////////////////////////////////////////////\n// Cygwin\n#ifdef __CYGWIN__\n\n// Required for some versions of Cygwin to declare gettimeofday\n// see: http://stackoverflow.com/questions/36901803/gettimeofday-not-declared-in-this-scope-cygwin\n#   define _BSD_SOURCE\n// some versions of cygwin (most) do not support std::to_string. Use the libstd check.\n// https://gcc.gnu.org/onlinedocs/gcc-4.8.2/libstdc++/api/a01053_source.html line 2812-2813\n# if !((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99) \\\n           && !defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF))\n\n#    define CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING\n\n# endif\n#endif // __CYGWIN__\n\n////////////////////////////////////////////////////////////////////////////////\n// Visual C++\n#if defined(_MSC_VER)\n\n// Universal Windows platform does not support SEH\n// Or console colours (or console at all...)\n#  if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP)\n#    define CATCH_CONFIG_COLOUR_NONE\n#  else\n#    define CATCH_INTERNAL_CONFIG_WINDOWS_SEH\n#  endif\n\n#  if !defined(__clang__) // Handle Clang masquerading for msvc\n\n// MSVC traditional preprocessor needs some workaround for __VA_ARGS__\n// _MSVC_TRADITIONAL == 0 means new conformant preprocessor\n// _MSVC_TRADITIONAL == 1 means old traditional non-conformant preprocessor\n#    if !defined(_MSVC_TRADITIONAL) || (defined(_MSVC_TRADITIONAL) && _MSVC_TRADITIONAL)\n#      define CATCH_INTERNAL_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n#    endif // MSVC_TRADITIONAL\n\n// Only do this if we're not using clang on Windows, which uses `diagnostic push` & `diagnostic pop`\n#    define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION __pragma( warning(push) )\n#    define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION  __pragma( warning(pop) )\n#  endif // __clang__\n\n#endif // _MSC_VER\n\n#if defined(_REENTRANT) || defined(_MSC_VER)\n// Enable async processing, as -pthread is specified or no additional linking is required\n# define CATCH_INTERNAL_CONFIG_USE_ASYNC\n#endif // _MSC_VER\n\n////////////////////////////////////////////////////////////////////////////////\n// Check if we are compiled with -fno-exceptions or equivalent\n#if defined(__EXCEPTIONS) || defined(__cpp_exceptions) || defined(_CPPUNWIND)\n#  define CATCH_INTERNAL_CONFIG_EXCEPTIONS_ENABLED\n#endif\n\n////////////////////////////////////////////////////////////////////////////////\n// DJGPP\n#ifdef __DJGPP__\n#  define CATCH_INTERNAL_CONFIG_NO_WCHAR\n#endif // __DJGPP__\n\n////////////////////////////////////////////////////////////////////////////////\n// Embarcadero C++Build\n#if defined(__BORLANDC__)\n    #define CATCH_INTERNAL_CONFIG_POLYFILL_ISNAN\n#endif\n\n////////////////////////////////////////////////////////////////////////////////\n\n// Use of __COUNTER__ is suppressed during code analysis in\n// CLion/AppCode 2017.2.x and former, because __COUNTER__ is not properly\n// handled by it.\n// Otherwise all supported compilers support COUNTER macro,\n// but user still might want to turn it off\n#if ( !defined(__JETBRAINS_IDE__) || __JETBRAINS_IDE__ >= 20170300L )\n    #define CATCH_INTERNAL_CONFIG_COUNTER\n#endif\n\n////////////////////////////////////////////////////////////////////////////////\n\n// RTX is a special version of Windows that is real time.\n// This means that it is detected as Windows, but does not provide\n// the same set of capabilities as real Windows does.\n#if defined(UNDER_RTSS) || defined(RTX64_BUILD)\n    #define CATCH_INTERNAL_CONFIG_NO_WINDOWS_SEH\n    #define CATCH_INTERNAL_CONFIG_NO_ASYNC\n    #define CATCH_CONFIG_COLOUR_NONE\n#endif\n\n#if !defined(_GLIBCXX_USE_C99_MATH_TR1)\n#define CATCH_INTERNAL_CONFIG_GLOBAL_NEXTAFTER\n#endif\n\n// Various stdlib support checks that require __has_include\n#if defined(__has_include)\n  // Check if string_view is available and usable\n  #if __has_include(<string_view>) && defined(CATCH_CPP17_OR_GREATER)\n  #    define CATCH_INTERNAL_CONFIG_CPP17_STRING_VIEW\n  #endif\n\n  // Check if optional is available and usable\n  #  if __has_include(<optional>) && defined(CATCH_CPP17_OR_GREATER)\n  #    define CATCH_INTERNAL_CONFIG_CPP17_OPTIONAL\n  #  endif // __has_include(<optional>) && defined(CATCH_CPP17_OR_GREATER)\n\n  // Check if byte is available and usable\n  #  if __has_include(<cstddef>) && defined(CATCH_CPP17_OR_GREATER)\n  #    include <cstddef>\n  #    if defined(__cpp_lib_byte) && (__cpp_lib_byte > 0)\n  #      define CATCH_INTERNAL_CONFIG_CPP17_BYTE\n  #    endif\n  #  endif // __has_include(<cstddef>) && defined(CATCH_CPP17_OR_GREATER)\n\n  // Check if variant is available and usable\n  #  if __has_include(<variant>) && defined(CATCH_CPP17_OR_GREATER)\n  #    if defined(__clang__) && (__clang_major__ < 8)\n         // work around clang bug with libstdc++ https://bugs.llvm.org/show_bug.cgi?id=31852\n         // fix should be in clang 8, workaround in libstdc++ 8.2\n  #      include <ciso646>\n  #      if defined(__GLIBCXX__) && defined(_GLIBCXX_RELEASE) && (_GLIBCXX_RELEASE < 9)\n  #        define CATCH_CONFIG_NO_CPP17_VARIANT\n  #      else\n  #        define CATCH_INTERNAL_CONFIG_CPP17_VARIANT\n  #      endif // defined(__GLIBCXX__) && defined(_GLIBCXX_RELEASE) && (_GLIBCXX_RELEASE < 9)\n  #    else\n  #      define CATCH_INTERNAL_CONFIG_CPP17_VARIANT\n  #    endif // defined(__clang__) && (__clang_major__ < 8)\n  #  endif // __has_include(<variant>) && defined(CATCH_CPP17_OR_GREATER)\n#endif // defined(__has_include)\n\n#if defined(CATCH_INTERNAL_CONFIG_COUNTER) && !defined(CATCH_CONFIG_NO_COUNTER) && !defined(CATCH_CONFIG_COUNTER)\n#   define CATCH_CONFIG_COUNTER\n#endif\n#if defined(CATCH_INTERNAL_CONFIG_WINDOWS_SEH) && !defined(CATCH_CONFIG_NO_WINDOWS_SEH) && !defined(CATCH_CONFIG_WINDOWS_SEH) && !defined(CATCH_INTERNAL_CONFIG_NO_WINDOWS_SEH)\n#   define CATCH_CONFIG_WINDOWS_SEH\n#endif\n// This is set by default, because we assume that unix compilers are posix-signal-compatible by default.\n#if defined(CATCH_INTERNAL_CONFIG_POSIX_SIGNALS) && !defined(CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS) && !defined(CATCH_CONFIG_NO_POSIX_SIGNALS) && !defined(CATCH_CONFIG_POSIX_SIGNALS)\n#   define CATCH_CONFIG_POSIX_SIGNALS\n#endif\n// This is set by default, because we assume that compilers with no wchar_t support are just rare exceptions.\n#if !defined(CATCH_INTERNAL_CONFIG_NO_WCHAR) && !defined(CATCH_CONFIG_NO_WCHAR) && !defined(CATCH_CONFIG_WCHAR)\n#   define CATCH_CONFIG_WCHAR\n#endif\n\n#if !defined(CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING) && !defined(CATCH_CONFIG_NO_CPP11_TO_STRING) && !defined(CATCH_CONFIG_CPP11_TO_STRING)\n#    define CATCH_CONFIG_CPP11_TO_STRING\n#endif\n\n#if defined(CATCH_INTERNAL_CONFIG_CPP17_OPTIONAL) && !defined(CATCH_CONFIG_NO_CPP17_OPTIONAL) && !defined(CATCH_CONFIG_CPP17_OPTIONAL)\n#  define CATCH_CONFIG_CPP17_OPTIONAL\n#endif\n\n#if defined(CATCH_INTERNAL_CONFIG_CPP17_STRING_VIEW) && !defined(CATCH_CONFIG_NO_CPP17_STRING_VIEW) && !defined(CATCH_CONFIG_CPP17_STRING_VIEW)\n#  define CATCH_CONFIG_CPP17_STRING_VIEW\n#endif\n\n#if defined(CATCH_INTERNAL_CONFIG_CPP17_VARIANT) && !defined(CATCH_CONFIG_NO_CPP17_VARIANT) && !defined(CATCH_CONFIG_CPP17_VARIANT)\n#  define CATCH_CONFIG_CPP17_VARIANT\n#endif\n\n#if defined(CATCH_INTERNAL_CONFIG_CPP17_BYTE) && !defined(CATCH_CONFIG_NO_CPP17_BYTE) && !defined(CATCH_CONFIG_CPP17_BYTE)\n#  define CATCH_CONFIG_CPP17_BYTE\n#endif\n\n#if defined(CATCH_CONFIG_EXPERIMENTAL_REDIRECT)\n#  define CATCH_INTERNAL_CONFIG_NEW_CAPTURE\n#endif\n\n#if defined(CATCH_INTERNAL_CONFIG_NEW_CAPTURE) && !defined(CATCH_INTERNAL_CONFIG_NO_NEW_CAPTURE) && !defined(CATCH_CONFIG_NO_NEW_CAPTURE) && !defined(CATCH_CONFIG_NEW_CAPTURE)\n#  define CATCH_CONFIG_NEW_CAPTURE\n#endif\n\n#if !defined(CATCH_INTERNAL_CONFIG_EXCEPTIONS_ENABLED) && !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)\n#  define CATCH_CONFIG_DISABLE_EXCEPTIONS\n#endif\n\n#if defined(CATCH_INTERNAL_CONFIG_POLYFILL_ISNAN) && !defined(CATCH_CONFIG_NO_POLYFILL_ISNAN) && !defined(CATCH_CONFIG_POLYFILL_ISNAN)\n#  define CATCH_CONFIG_POLYFILL_ISNAN\n#endif\n\n#if defined(CATCH_INTERNAL_CONFIG_USE_ASYNC)  && !defined(CATCH_INTERNAL_CONFIG_NO_ASYNC) && !defined(CATCH_CONFIG_NO_USE_ASYNC) && !defined(CATCH_CONFIG_USE_ASYNC)\n#  define CATCH_CONFIG_USE_ASYNC\n#endif\n\n#if defined(CATCH_INTERNAL_CONFIG_ANDROID_LOGWRITE) && !defined(CATCH_CONFIG_NO_ANDROID_LOGWRITE) && !defined(CATCH_CONFIG_ANDROID_LOGWRITE)\n#  define CATCH_CONFIG_ANDROID_LOGWRITE\n#endif\n\n#if defined(CATCH_INTERNAL_CONFIG_GLOBAL_NEXTAFTER) && !defined(CATCH_CONFIG_NO_GLOBAL_NEXTAFTER) && !defined(CATCH_CONFIG_GLOBAL_NEXTAFTER)\n#  define CATCH_CONFIG_GLOBAL_NEXTAFTER\n#endif\n\n// Even if we do not think the compiler has that warning, we still have\n// to provide a macro that can be used by the code.\n#if !defined(CATCH_INTERNAL_START_WARNINGS_SUPPRESSION)\n#   define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION\n#endif\n#if !defined(CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION)\n#   define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION\n#endif\n#if !defined(CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS)\n#   define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS\n#endif\n#if !defined(CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS)\n#   define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS\n#endif\n#if !defined(CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS)\n#   define CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS\n#endif\n#if !defined(CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS)\n#   define CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS\n#endif\n\n// The goal of this macro is to avoid evaluation of the arguments, but\n// still have the compiler warn on problems inside...\n#if !defined(CATCH_INTERNAL_IGNORE_BUT_WARN)\n#   define CATCH_INTERNAL_IGNORE_BUT_WARN(...)\n#endif\n\n#if defined(__APPLE__) && defined(__apple_build_version__) && (__clang_major__ < 10)\n#   undef CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS\n#elif defined(__clang__) && (__clang_major__ < 5)\n#   undef CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS\n#endif\n\n#if !defined(CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS)\n#   define CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS\n#endif\n\n#if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)\n#define CATCH_TRY if ((true))\n#define CATCH_CATCH_ALL if ((false))\n#define CATCH_CATCH_ANON(type) if ((false))\n#else\n#define CATCH_TRY try\n#define CATCH_CATCH_ALL catch (...)\n#define CATCH_CATCH_ANON(type) catch (type)\n#endif\n\n#if defined(CATCH_INTERNAL_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR) && !defined(CATCH_CONFIG_NO_TRADITIONAL_MSVC_PREPROCESSOR) && !defined(CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR)\n#define CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n#endif\n\n// end catch_compiler_capabilities.h\n#define INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) name##line\n#define INTERNAL_CATCH_UNIQUE_NAME_LINE( name, line ) INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line )\n#ifdef CATCH_CONFIG_COUNTER\n#  define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __COUNTER__ )\n#else\n#  define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __LINE__ )\n#endif\n\n#include <iosfwd>\n#include <string>\n#include <cstdint>\n\n// We need a dummy global operator<< so we can bring it into Catch namespace later\nstruct Catch_global_namespace_dummy {};\nstd::ostream& operator<<(std::ostream&, Catch_global_namespace_dummy);\n\nnamespace Catch {\n\n    struct CaseSensitive { enum Choice {\n        Yes,\n        No\n    }; };\n\n    class NonCopyable {\n        NonCopyable( NonCopyable const& )              = delete;\n        NonCopyable( NonCopyable && )                  = delete;\n        NonCopyable& operator = ( NonCopyable const& ) = delete;\n        NonCopyable& operator = ( NonCopyable && )     = delete;\n\n    protected:\n        NonCopyable();\n        virtual ~NonCopyable();\n    };\n\n    struct SourceLineInfo {\n\n        SourceLineInfo() = delete;\n        SourceLineInfo( char const* _file, std::size_t _line ) noexcept\n        :   file( _file ),\n            line( _line )\n        {}\n\n        SourceLineInfo( SourceLineInfo const& other )            = default;\n        SourceLineInfo& operator = ( SourceLineInfo const& )     = default;\n        SourceLineInfo( SourceLineInfo&& )              noexcept = default;\n        SourceLineInfo& operator = ( SourceLineInfo&& ) noexcept = default;\n\n        bool empty() const noexcept { return file[0] == '\\0'; }\n        bool operator == ( SourceLineInfo const& other ) const noexcept;\n        bool operator < ( SourceLineInfo const& other ) const noexcept;\n\n        char const* file;\n        std::size_t line;\n    };\n\n    std::ostream& operator << ( std::ostream& os, SourceLineInfo const& info );\n\n    // Bring in operator<< from global namespace into Catch namespace\n    // This is necessary because the overload of operator<< above makes\n    // lookup stop at namespace Catch\n    using ::operator<<;\n\n    // Use this in variadic streaming macros to allow\n    //    >> +StreamEndStop\n    // as well as\n    //    >> stuff +StreamEndStop\n    struct StreamEndStop {\n        std::string operator+() const;\n    };\n    template<typename T>\n    T const& operator + ( T const& value, StreamEndStop ) {\n        return value;\n    }\n}\n\n#define CATCH_INTERNAL_LINEINFO \\\n    ::Catch::SourceLineInfo( __FILE__, static_cast<std::size_t>( __LINE__ ) )\n\n// end catch_common.h\nnamespace Catch {\n\n    struct RegistrarForTagAliases {\n        RegistrarForTagAliases( char const* alias, char const* tag, SourceLineInfo const& lineInfo );\n    };\n\n} // end namespace Catch\n\n#define CATCH_REGISTER_TAG_ALIAS( alias, spec ) \\\n    CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \\\n    CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \\\n    namespace{ Catch::RegistrarForTagAliases INTERNAL_CATCH_UNIQUE_NAME( AutoRegisterTagAlias )( alias, spec, CATCH_INTERNAL_LINEINFO ); } \\\n    CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION\n\n// end catch_tag_alias_autoregistrar.h\n// start catch_test_registry.h\n\n// start catch_interfaces_testcase.h\n\n#include <vector>\n\nnamespace Catch {\n\n    class TestSpec;\n\n    struct ITestInvoker {\n        virtual void invoke () const = 0;\n        virtual ~ITestInvoker();\n    };\n\n    class TestCase;\n    struct IConfig;\n\n    struct ITestCaseRegistry {\n        virtual ~ITestCaseRegistry();\n        virtual std::vector<TestCase> const& getAllTests() const = 0;\n        virtual std::vector<TestCase> const& getAllTestsSorted( IConfig const& config ) const = 0;\n    };\n\n    bool isThrowSafe( TestCase const& testCase, IConfig const& config );\n    bool matchTest( TestCase const& testCase, TestSpec const& testSpec, IConfig const& config );\n    std::vector<TestCase> filterTests( std::vector<TestCase> const& testCases, TestSpec const& testSpec, IConfig const& config );\n    std::vector<TestCase> const& getAllTestCasesSorted( IConfig const& config );\n\n}\n\n// end catch_interfaces_testcase.h\n// start catch_stringref.h\n\n#include <cstddef>\n#include <string>\n#include <iosfwd>\n#include <cassert>\n\nnamespace Catch {\n\n    /// A non-owning string class (similar to the forthcoming std::string_view)\n    /// Note that, because a StringRef may be a substring of another string,\n    /// it may not be null terminated.\n    class StringRef {\n    public:\n        using size_type = std::size_t;\n        using const_iterator = const char*;\n\n    private:\n        static constexpr char const* const s_empty = \"\";\n\n        char const* m_start = s_empty;\n        size_type m_size = 0;\n\n    public: // construction\n        constexpr StringRef() noexcept = default;\n\n        StringRef( char const* rawChars ) noexcept;\n\n        constexpr StringRef( char const* rawChars, size_type size ) noexcept\n        :   m_start( rawChars ),\n            m_size( size )\n        {}\n\n        StringRef( std::string const& stdString ) noexcept\n        :   m_start( stdString.c_str() ),\n            m_size( stdString.size() )\n        {}\n\n        explicit operator std::string() const {\n            return std::string(m_start, m_size);\n        }\n\n    public: // operators\n        auto operator == ( StringRef const& other ) const noexcept -> bool;\n        auto operator != (StringRef const& other) const noexcept -> bool {\n            return !(*this == other);\n        }\n\n        auto operator[] ( size_type index ) const noexcept -> char {\n            assert(index < m_size);\n            return m_start[index];\n        }\n\n    public: // named queries\n        constexpr auto empty() const noexcept -> bool {\n            return m_size == 0;\n        }\n        constexpr auto size() const noexcept -> size_type {\n            return m_size;\n        }\n\n        // Returns the current start pointer. If the StringRef is not\n        // null-terminated, throws std::domain_exception\n        auto c_str() const -> char const*;\n\n    public: // substrings and searches\n        // Returns a substring of [start, start + length).\n        // If start + length > size(), then the substring is [start, size()).\n        // If start > size(), then the substring is empty.\n        auto substr( size_type start, size_type length ) const noexcept -> StringRef;\n\n        // Returns the current start pointer. May not be null-terminated.\n        auto data() const noexcept -> char const*;\n\n        constexpr auto isNullTerminated() const noexcept -> bool {\n            return m_start[m_size] == '\\0';\n        }\n\n    public: // iterators\n        constexpr const_iterator begin() const { return m_start; }\n        constexpr const_iterator end() const { return m_start + m_size; }\n    };\n\n    auto operator += ( std::string& lhs, StringRef const& sr ) -> std::string&;\n    auto operator << ( std::ostream& os, StringRef const& sr ) -> std::ostream&;\n\n    constexpr auto operator \"\" _sr( char const* rawChars, std::size_t size ) noexcept -> StringRef {\n        return StringRef( rawChars, size );\n    }\n} // namespace Catch\n\nconstexpr auto operator \"\" _catch_sr( char const* rawChars, std::size_t size ) noexcept -> Catch::StringRef {\n    return Catch::StringRef( rawChars, size );\n}\n\n// end catch_stringref.h\n// start catch_preprocessor.hpp\n\n\n#define CATCH_RECURSION_LEVEL0(...) __VA_ARGS__\n#define CATCH_RECURSION_LEVEL1(...) CATCH_RECURSION_LEVEL0(CATCH_RECURSION_LEVEL0(CATCH_RECURSION_LEVEL0(__VA_ARGS__)))\n#define CATCH_RECURSION_LEVEL2(...) CATCH_RECURSION_LEVEL1(CATCH_RECURSION_LEVEL1(CATCH_RECURSION_LEVEL1(__VA_ARGS__)))\n#define CATCH_RECURSION_LEVEL3(...) CATCH_RECURSION_LEVEL2(CATCH_RECURSION_LEVEL2(CATCH_RECURSION_LEVEL2(__VA_ARGS__)))\n#define CATCH_RECURSION_LEVEL4(...) CATCH_RECURSION_LEVEL3(CATCH_RECURSION_LEVEL3(CATCH_RECURSION_LEVEL3(__VA_ARGS__)))\n#define CATCH_RECURSION_LEVEL5(...) CATCH_RECURSION_LEVEL4(CATCH_RECURSION_LEVEL4(CATCH_RECURSION_LEVEL4(__VA_ARGS__)))\n\n#ifdef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n#define INTERNAL_CATCH_EXPAND_VARGS(...) __VA_ARGS__\n// MSVC needs more evaluations\n#define CATCH_RECURSION_LEVEL6(...) CATCH_RECURSION_LEVEL5(CATCH_RECURSION_LEVEL5(CATCH_RECURSION_LEVEL5(__VA_ARGS__)))\n#define CATCH_RECURSE(...)  CATCH_RECURSION_LEVEL6(CATCH_RECURSION_LEVEL6(__VA_ARGS__))\n#else\n#define CATCH_RECURSE(...)  CATCH_RECURSION_LEVEL5(__VA_ARGS__)\n#endif\n\n#define CATCH_REC_END(...)\n#define CATCH_REC_OUT\n\n#define CATCH_EMPTY()\n#define CATCH_DEFER(id) id CATCH_EMPTY()\n\n#define CATCH_REC_GET_END2() 0, CATCH_REC_END\n#define CATCH_REC_GET_END1(...) CATCH_REC_GET_END2\n#define CATCH_REC_GET_END(...) CATCH_REC_GET_END1\n#define CATCH_REC_NEXT0(test, next, ...) next CATCH_REC_OUT\n#define CATCH_REC_NEXT1(test, next) CATCH_DEFER ( CATCH_REC_NEXT0 ) ( test, next, 0)\n#define CATCH_REC_NEXT(test, next)  CATCH_REC_NEXT1(CATCH_REC_GET_END test, next)\n\n#define CATCH_REC_LIST0(f, x, peek, ...) , f(x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1) ) ( f, peek, __VA_ARGS__ )\n#define CATCH_REC_LIST1(f, x, peek, ...) , f(x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST0) ) ( f, peek, __VA_ARGS__ )\n#define CATCH_REC_LIST2(f, x, peek, ...)   f(x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1) ) ( f, peek, __VA_ARGS__ )\n\n#define CATCH_REC_LIST0_UD(f, userdata, x, peek, ...) , f(userdata, x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1_UD) ) ( f, userdata, peek, __VA_ARGS__ )\n#define CATCH_REC_LIST1_UD(f, userdata, x, peek, ...) , f(userdata, x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST0_UD) ) ( f, userdata, peek, __VA_ARGS__ )\n#define CATCH_REC_LIST2_UD(f, userdata, x, peek, ...)   f(userdata, x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1_UD) ) ( f, userdata, peek, __VA_ARGS__ )\n\n// Applies the function macro `f` to each of the remaining parameters, inserts commas between the results,\n// and passes userdata as the first parameter to each invocation,\n// e.g. CATCH_REC_LIST_UD(f, x, a, b, c) evaluates to f(x, a), f(x, b), f(x, c)\n#define CATCH_REC_LIST_UD(f, userdata, ...) CATCH_RECURSE(CATCH_REC_LIST2_UD(f, userdata, __VA_ARGS__, ()()(), ()()(), ()()(), 0))\n\n#define CATCH_REC_LIST(f, ...) CATCH_RECURSE(CATCH_REC_LIST2(f, __VA_ARGS__, ()()(), ()()(), ()()(), 0))\n\n#define INTERNAL_CATCH_EXPAND1(param) INTERNAL_CATCH_EXPAND2(param)\n#define INTERNAL_CATCH_EXPAND2(...) INTERNAL_CATCH_NO## __VA_ARGS__\n#define INTERNAL_CATCH_DEF(...) INTERNAL_CATCH_DEF __VA_ARGS__\n#define INTERNAL_CATCH_NOINTERNAL_CATCH_DEF\n#define INTERNAL_CATCH_STRINGIZE(...) INTERNAL_CATCH_STRINGIZE2(__VA_ARGS__)\n#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n#define INTERNAL_CATCH_STRINGIZE2(...) #__VA_ARGS__\n#define INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS(param) INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_REMOVE_PARENS(param))\n#else\n// MSVC is adding extra space and needs another indirection to expand INTERNAL_CATCH_NOINTERNAL_CATCH_DEF\n#define INTERNAL_CATCH_STRINGIZE2(...) INTERNAL_CATCH_STRINGIZE3(__VA_ARGS__)\n#define INTERNAL_CATCH_STRINGIZE3(...) #__VA_ARGS__\n#define INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS(param) (INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_REMOVE_PARENS(param)) + 1)\n#endif\n\n#define INTERNAL_CATCH_MAKE_NAMESPACE2(...) ns_##__VA_ARGS__\n#define INTERNAL_CATCH_MAKE_NAMESPACE(name) INTERNAL_CATCH_MAKE_NAMESPACE2(name)\n\n#define INTERNAL_CATCH_REMOVE_PARENS(...) INTERNAL_CATCH_EXPAND1(INTERNAL_CATCH_DEF __VA_ARGS__)\n\n#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n#define INTERNAL_CATCH_MAKE_TYPE_LIST2(...) decltype(get_wrapper<INTERNAL_CATCH_REMOVE_PARENS_GEN(__VA_ARGS__)>())\n#define INTERNAL_CATCH_MAKE_TYPE_LIST(...) INTERNAL_CATCH_MAKE_TYPE_LIST2(INTERNAL_CATCH_REMOVE_PARENS(__VA_ARGS__))\n#else\n#define INTERNAL_CATCH_MAKE_TYPE_LIST2(...) INTERNAL_CATCH_EXPAND_VARGS(decltype(get_wrapper<INTERNAL_CATCH_REMOVE_PARENS_GEN(__VA_ARGS__)>()))\n#define INTERNAL_CATCH_MAKE_TYPE_LIST(...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_MAKE_TYPE_LIST2(INTERNAL_CATCH_REMOVE_PARENS(__VA_ARGS__)))\n#endif\n\n#define INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(...)\\\n    CATCH_REC_LIST(INTERNAL_CATCH_MAKE_TYPE_LIST,__VA_ARGS__)\n\n#define INTERNAL_CATCH_REMOVE_PARENS_1_ARG(_0) INTERNAL_CATCH_REMOVE_PARENS(_0)\n#define INTERNAL_CATCH_REMOVE_PARENS_2_ARG(_0, _1) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_1_ARG(_1)\n#define INTERNAL_CATCH_REMOVE_PARENS_3_ARG(_0, _1, _2) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_2_ARG(_1, _2)\n#define INTERNAL_CATCH_REMOVE_PARENS_4_ARG(_0, _1, _2, _3) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_3_ARG(_1, _2, _3)\n#define INTERNAL_CATCH_REMOVE_PARENS_5_ARG(_0, _1, _2, _3, _4) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_4_ARG(_1, _2, _3, _4)\n#define INTERNAL_CATCH_REMOVE_PARENS_6_ARG(_0, _1, _2, _3, _4, _5) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_5_ARG(_1, _2, _3, _4, _5)\n#define INTERNAL_CATCH_REMOVE_PARENS_7_ARG(_0, _1, _2, _3, _4, _5, _6) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_6_ARG(_1, _2, _3, _4, _5, _6)\n#define INTERNAL_CATCH_REMOVE_PARENS_8_ARG(_0, _1, _2, _3, _4, _5, _6, _7) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_7_ARG(_1, _2, _3, _4, _5, _6, _7)\n#define INTERNAL_CATCH_REMOVE_PARENS_9_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_8_ARG(_1, _2, _3, _4, _5, _6, _7, _8)\n#define INTERNAL_CATCH_REMOVE_PARENS_10_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_9_ARG(_1, _2, _3, _4, _5, _6, _7, _8, _9)\n#define INTERNAL_CATCH_REMOVE_PARENS_11_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_10_ARG(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10)\n\n#define INTERNAL_CATCH_VA_NARGS_IMPL(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, N, ...) N\n\n#define INTERNAL_CATCH_TYPE_GEN\\\n    template<typename...> struct TypeList {};\\\n    template<typename...Ts>\\\n    constexpr auto get_wrapper() noexcept -> TypeList<Ts...> { return {}; }\\\n    template<template<typename...> class...> struct TemplateTypeList{};\\\n    template<template<typename...> class...Cs>\\\n    constexpr auto get_wrapper() noexcept -> TemplateTypeList<Cs...> { return {}; }\\\n    template<typename...>\\\n    struct append;\\\n    template<typename...>\\\n    struct rewrap;\\\n    template<template<typename...> class, typename...>\\\n    struct create;\\\n    template<template<typename...> class, typename>\\\n    struct convert;\\\n    \\\n    template<typename T> \\\n    struct append<T> { using type = T; };\\\n    template< template<typename...> class L1, typename...E1, template<typename...> class L2, typename...E2, typename...Rest>\\\n    struct append<L1<E1...>, L2<E2...>, Rest...> { using type = typename append<L1<E1...,E2...>, Rest...>::type; };\\\n    template< template<typename...> class L1, typename...E1, typename...Rest>\\\n    struct append<L1<E1...>, TypeList<mpl_::na>, Rest...> { using type = L1<E1...>; };\\\n    \\\n    template< template<typename...> class Container, template<typename...> class List, typename...elems>\\\n    struct rewrap<TemplateTypeList<Container>, List<elems...>> { using type = TypeList<Container<elems...>>; };\\\n    template< template<typename...> class Container, template<typename...> class List, class...Elems, typename...Elements>\\\n    struct rewrap<TemplateTypeList<Container>, List<Elems...>, Elements...> { using type = typename append<TypeList<Container<Elems...>>, typename rewrap<TemplateTypeList<Container>, Elements...>::type>::type; };\\\n    \\\n    template<template <typename...> class Final, template< typename...> class...Containers, typename...Types>\\\n    struct create<Final, TemplateTypeList<Containers...>, TypeList<Types...>> { using type = typename append<Final<>, typename rewrap<TemplateTypeList<Containers>, Types...>::type...>::type; };\\\n    template<template <typename...> class Final, template <typename...> class List, typename...Ts>\\\n    struct convert<Final, List<Ts...>> { using type = typename append<Final<>,TypeList<Ts>...>::type; };\n\n#define INTERNAL_CATCH_NTTP_1(signature, ...)\\\n    template<INTERNAL_CATCH_REMOVE_PARENS(signature)> struct Nttp{};\\\n    template<INTERNAL_CATCH_REMOVE_PARENS(signature)>\\\n    constexpr auto get_wrapper() noexcept -> Nttp<__VA_ARGS__> { return {}; } \\\n    template<template<INTERNAL_CATCH_REMOVE_PARENS(signature)> class...> struct NttpTemplateTypeList{};\\\n    template<template<INTERNAL_CATCH_REMOVE_PARENS(signature)> class...Cs>\\\n    constexpr auto get_wrapper() noexcept -> NttpTemplateTypeList<Cs...> { return {}; } \\\n    \\\n    template< template<INTERNAL_CATCH_REMOVE_PARENS(signature)> class Container, template<INTERNAL_CATCH_REMOVE_PARENS(signature)> class List, INTERNAL_CATCH_REMOVE_PARENS(signature)>\\\n    struct rewrap<NttpTemplateTypeList<Container>, List<__VA_ARGS__>> { using type = TypeList<Container<__VA_ARGS__>>; };\\\n    template< template<INTERNAL_CATCH_REMOVE_PARENS(signature)> class Container, template<INTERNAL_CATCH_REMOVE_PARENS(signature)> class List, INTERNAL_CATCH_REMOVE_PARENS(signature), typename...Elements>\\\n    struct rewrap<NttpTemplateTypeList<Container>, List<__VA_ARGS__>, Elements...> { using type = typename append<TypeList<Container<__VA_ARGS__>>, typename rewrap<NttpTemplateTypeList<Container>, Elements...>::type>::type; };\\\n    template<template <typename...> class Final, template<INTERNAL_CATCH_REMOVE_PARENS(signature)> class...Containers, typename...Types>\\\n    struct create<Final, NttpTemplateTypeList<Containers...>, TypeList<Types...>> { using type = typename append<Final<>, typename rewrap<NttpTemplateTypeList<Containers>, Types...>::type...>::type; };\n\n#define INTERNAL_CATCH_DECLARE_SIG_TEST0(TestName)\n#define INTERNAL_CATCH_DECLARE_SIG_TEST1(TestName, signature)\\\n    template<INTERNAL_CATCH_REMOVE_PARENS(signature)>\\\n    static void TestName()\n#define INTERNAL_CATCH_DECLARE_SIG_TEST_X(TestName, signature, ...)\\\n    template<INTERNAL_CATCH_REMOVE_PARENS(signature)>\\\n    static void TestName()\n\n#define INTERNAL_CATCH_DEFINE_SIG_TEST0(TestName)\n#define INTERNAL_CATCH_DEFINE_SIG_TEST1(TestName, signature)\\\n    template<INTERNAL_CATCH_REMOVE_PARENS(signature)>\\\n    static void TestName()\n#define INTERNAL_CATCH_DEFINE_SIG_TEST_X(TestName, signature,...)\\\n    template<INTERNAL_CATCH_REMOVE_PARENS(signature)>\\\n    static void TestName()\n\n#define INTERNAL_CATCH_NTTP_REGISTER0(TestFunc, signature)\\\n    template<typename Type>\\\n    void reg_test(TypeList<Type>, Catch::NameAndTags nameAndTags)\\\n    {\\\n        Catch::AutoReg( Catch::makeTestInvoker(&TestFunc<Type>), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), nameAndTags);\\\n    }\n\n#define INTERNAL_CATCH_NTTP_REGISTER(TestFunc, signature, ...)\\\n    template<INTERNAL_CATCH_REMOVE_PARENS(signature)>\\\n    void reg_test(Nttp<__VA_ARGS__>, Catch::NameAndTags nameAndTags)\\\n    {\\\n        Catch::AutoReg( Catch::makeTestInvoker(&TestFunc<__VA_ARGS__>), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), nameAndTags);\\\n    }\n\n#define INTERNAL_CATCH_NTTP_REGISTER_METHOD0(TestName, signature, ...)\\\n    template<typename Type>\\\n    void reg_test(TypeList<Type>, Catch::StringRef className, Catch::NameAndTags nameAndTags)\\\n    {\\\n        Catch::AutoReg( Catch::makeTestInvoker(&TestName<Type>::test), CATCH_INTERNAL_LINEINFO, className, nameAndTags);\\\n    }\n\n#define INTERNAL_CATCH_NTTP_REGISTER_METHOD(TestName, signature, ...)\\\n    template<INTERNAL_CATCH_REMOVE_PARENS(signature)>\\\n    void reg_test(Nttp<__VA_ARGS__>, Catch::StringRef className, Catch::NameAndTags nameAndTags)\\\n    {\\\n        Catch::AutoReg( Catch::makeTestInvoker(&TestName<__VA_ARGS__>::test), CATCH_INTERNAL_LINEINFO, className, nameAndTags);\\\n    }\n\n#define INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD0(TestName, ClassName)\n#define INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD1(TestName, ClassName, signature)\\\n    template<typename TestType> \\\n    struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName)<TestType> { \\\n        void test();\\\n    }\n\n#define INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X(TestName, ClassName, signature, ...)\\\n    template<INTERNAL_CATCH_REMOVE_PARENS(signature)> \\\n    struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName)<__VA_ARGS__> { \\\n        void test();\\\n    }\n\n#define INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD0(TestName)\n#define INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD1(TestName, signature)\\\n    template<typename TestType> \\\n    void INTERNAL_CATCH_MAKE_NAMESPACE(TestName)::TestName<TestType>::test()\n#define INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X(TestName, signature, ...)\\\n    template<INTERNAL_CATCH_REMOVE_PARENS(signature)> \\\n    void INTERNAL_CATCH_MAKE_NAMESPACE(TestName)::TestName<__VA_ARGS__>::test()\n\n#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n#define INTERNAL_CATCH_NTTP_0\n#define INTERNAL_CATCH_NTTP_GEN(...) INTERNAL_CATCH_VA_NARGS_IMPL(__VA_ARGS__, INTERNAL_CATCH_NTTP_1(__VA_ARGS__), INTERNAL_CATCH_NTTP_1(__VA_ARGS__), INTERNAL_CATCH_NTTP_1(__VA_ARGS__), INTERNAL_CATCH_NTTP_1(__VA_ARGS__), INTERNAL_CATCH_NTTP_1(__VA_ARGS__), INTERNAL_CATCH_NTTP_1( __VA_ARGS__), INTERNAL_CATCH_NTTP_1( __VA_ARGS__), INTERNAL_CATCH_NTTP_1( __VA_ARGS__), INTERNAL_CATCH_NTTP_1( __VA_ARGS__),INTERNAL_CATCH_NTTP_1( __VA_ARGS__), INTERNAL_CATCH_NTTP_0)\n#define INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD(TestName, ...) INTERNAL_CATCH_VA_NARGS_IMPL( \"dummy\", __VA_ARGS__, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD1, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD0)(TestName, __VA_ARGS__)\n#define INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD(TestName, ClassName, ...) INTERNAL_CATCH_VA_NARGS_IMPL( \"dummy\", __VA_ARGS__, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD1, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD0)(TestName, ClassName, __VA_ARGS__)\n#define INTERNAL_CATCH_NTTP_REG_METHOD_GEN(TestName, ...) INTERNAL_CATCH_VA_NARGS_IMPL( \"dummy\", __VA_ARGS__, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD0, INTERNAL_CATCH_NTTP_REGISTER_METHOD0)(TestName, __VA_ARGS__)\n#define INTERNAL_CATCH_NTTP_REG_GEN(TestFunc, ...) INTERNAL_CATCH_VA_NARGS_IMPL( \"dummy\", __VA_ARGS__, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER0, INTERNAL_CATCH_NTTP_REGISTER0)(TestFunc, __VA_ARGS__)\n#define INTERNAL_CATCH_DEFINE_SIG_TEST(TestName, ...) INTERNAL_CATCH_VA_NARGS_IMPL( \"dummy\", __VA_ARGS__, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X,INTERNAL_CATCH_DEFINE_SIG_TEST_X,INTERNAL_CATCH_DEFINE_SIG_TEST1, INTERNAL_CATCH_DEFINE_SIG_TEST0)(TestName, __VA_ARGS__)\n#define INTERNAL_CATCH_DECLARE_SIG_TEST(TestName, ...) INTERNAL_CATCH_VA_NARGS_IMPL( \"dummy\", __VA_ARGS__, INTERNAL_CATCH_DECLARE_SIG_TEST_X,INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X,INTERNAL_CATCH_DECLARE_SIG_TEST_X,INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST1, INTERNAL_CATCH_DECLARE_SIG_TEST0)(TestName, __VA_ARGS__)\n#define INTERNAL_CATCH_REMOVE_PARENS_GEN(...) INTERNAL_CATCH_VA_NARGS_IMPL(__VA_ARGS__, INTERNAL_CATCH_REMOVE_PARENS_11_ARG,INTERNAL_CATCH_REMOVE_PARENS_10_ARG,INTERNAL_CATCH_REMOVE_PARENS_9_ARG,INTERNAL_CATCH_REMOVE_PARENS_8_ARG,INTERNAL_CATCH_REMOVE_PARENS_7_ARG,INTERNAL_CATCH_REMOVE_PARENS_6_ARG,INTERNAL_CATCH_REMOVE_PARENS_5_ARG,INTERNAL_CATCH_REMOVE_PARENS_4_ARG,INTERNAL_CATCH_REMOVE_PARENS_3_ARG,INTERNAL_CATCH_REMOVE_PARENS_2_ARG,INTERNAL_CATCH_REMOVE_PARENS_1_ARG)(__VA_ARGS__)\n#else\n#define INTERNAL_CATCH_NTTP_0(signature)\n#define INTERNAL_CATCH_NTTP_GEN(...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL(__VA_ARGS__, INTERNAL_CATCH_NTTP_1, INTERNAL_CATCH_NTTP_1, INTERNAL_CATCH_NTTP_1, INTERNAL_CATCH_NTTP_1, INTERNAL_CATCH_NTTP_1, INTERNAL_CATCH_NTTP_1, INTERNAL_CATCH_NTTP_1, INTERNAL_CATCH_NTTP_1, INTERNAL_CATCH_NTTP_1,INTERNAL_CATCH_NTTP_1, INTERNAL_CATCH_NTTP_0)( __VA_ARGS__))\n#define INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD(TestName, ...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL( \"dummy\", __VA_ARGS__, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD1, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD0)(TestName, __VA_ARGS__))\n#define INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD(TestName, ClassName, ...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL( \"dummy\", __VA_ARGS__, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD1, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD0)(TestName, ClassName, __VA_ARGS__))\n#define INTERNAL_CATCH_NTTP_REG_METHOD_GEN(TestName, ...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL( \"dummy\", __VA_ARGS__, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD0, INTERNAL_CATCH_NTTP_REGISTER_METHOD0)(TestName, __VA_ARGS__))\n#define INTERNAL_CATCH_NTTP_REG_GEN(TestFunc, ...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL( \"dummy\", __VA_ARGS__, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER0, INTERNAL_CATCH_NTTP_REGISTER0)(TestFunc, __VA_ARGS__))\n#define INTERNAL_CATCH_DEFINE_SIG_TEST(TestName, ...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL( \"dummy\", __VA_ARGS__, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X,INTERNAL_CATCH_DEFINE_SIG_TEST_X,INTERNAL_CATCH_DEFINE_SIG_TEST1, INTERNAL_CATCH_DEFINE_SIG_TEST0)(TestName, __VA_ARGS__))\n#define INTERNAL_CATCH_DECLARE_SIG_TEST(TestName, ...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL( \"dummy\", __VA_ARGS__, INTERNAL_CATCH_DECLARE_SIG_TEST_X,INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X,INTERNAL_CATCH_DECLARE_SIG_TEST_X,INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST1, INTERNAL_CATCH_DECLARE_SIG_TEST0)(TestName, __VA_ARGS__))\n#define INTERNAL_CATCH_REMOVE_PARENS_GEN(...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL(__VA_ARGS__, INTERNAL_CATCH_REMOVE_PARENS_11_ARG,INTERNAL_CATCH_REMOVE_PARENS_10_ARG,INTERNAL_CATCH_REMOVE_PARENS_9_ARG,INTERNAL_CATCH_REMOVE_PARENS_8_ARG,INTERNAL_CATCH_REMOVE_PARENS_7_ARG,INTERNAL_CATCH_REMOVE_PARENS_6_ARG,INTERNAL_CATCH_REMOVE_PARENS_5_ARG,INTERNAL_CATCH_REMOVE_PARENS_4_ARG,INTERNAL_CATCH_REMOVE_PARENS_3_ARG,INTERNAL_CATCH_REMOVE_PARENS_2_ARG,INTERNAL_CATCH_REMOVE_PARENS_1_ARG)(__VA_ARGS__))\n#endif\n\n// end catch_preprocessor.hpp\n// start catch_meta.hpp\n\n\n#include <type_traits>\n\nnamespace Catch {\n    template<typename T>\n    struct always_false : std::false_type {};\n\n    template <typename> struct true_given : std::true_type {};\n    struct is_callable_tester {\n        template <typename Fun, typename... Args>\n        true_given<decltype(std::declval<Fun>()(std::declval<Args>()...))> static test(int);\n        template <typename...>\n        std::false_type static test(...);\n    };\n\n    template <typename T>\n    struct is_callable;\n\n    template <typename Fun, typename... Args>\n    struct is_callable<Fun(Args...)> : decltype(is_callable_tester::test<Fun, Args...>(0)) {};\n\n#if defined(__cpp_lib_is_invocable) && __cpp_lib_is_invocable >= 201703\n    // std::result_of is deprecated in C++17 and removed in C++20. Hence, it is\n    // replaced with std::invoke_result here.\n    template <typename Func, typename... U>\n    using FunctionReturnType = std::remove_reference_t<std::remove_cv_t<std::invoke_result_t<Func, U...>>>;\n#else\n    // Keep ::type here because we still support C++11\n    template <typename Func, typename... U>\n    using FunctionReturnType = typename std::remove_reference<typename std::remove_cv<typename std::result_of<Func(U...)>::type>::type>::type;\n#endif\n\n} // namespace Catch\n\nnamespace mpl_{\n    struct na;\n}\n\n// end catch_meta.hpp\nnamespace Catch {\n\ntemplate<typename C>\nclass TestInvokerAsMethod : public ITestInvoker {\n    void (C::*m_testAsMethod)();\npublic:\n    TestInvokerAsMethod( void (C::*testAsMethod)() ) noexcept : m_testAsMethod( testAsMethod ) {}\n\n    void invoke() const override {\n        C obj;\n        (obj.*m_testAsMethod)();\n    }\n};\n\nauto makeTestInvoker( void(*testAsFunction)() ) noexcept -> ITestInvoker*;\n\ntemplate<typename C>\nauto makeTestInvoker( void (C::*testAsMethod)() ) noexcept -> ITestInvoker* {\n    return new(std::nothrow) TestInvokerAsMethod<C>( testAsMethod );\n}\n\nstruct NameAndTags {\n    NameAndTags( StringRef const& name_ = StringRef(), StringRef const& tags_ = StringRef() ) noexcept;\n    StringRef name;\n    StringRef tags;\n};\n\nstruct AutoReg : NonCopyable {\n    AutoReg( ITestInvoker* invoker, SourceLineInfo const& lineInfo, StringRef const& classOrMethod, NameAndTags const& nameAndTags ) noexcept;\n    ~AutoReg();\n};\n\n} // end namespace Catch\n\n#if defined(CATCH_CONFIG_DISABLE)\n    #define INTERNAL_CATCH_TESTCASE_NO_REGISTRATION( TestName, ... ) \\\n        static void TestName()\n    #define INTERNAL_CATCH_TESTCASE_METHOD_NO_REGISTRATION( TestName, ClassName, ... ) \\\n        namespace{                        \\\n            struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName) { \\\n                void test();              \\\n            };                            \\\n        }                                 \\\n        void TestName::test()\n    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION_2( TestName, TestFunc, Name, Tags, Signature, ... )  \\\n        INTERNAL_CATCH_DEFINE_SIG_TEST(TestFunc, INTERNAL_CATCH_REMOVE_PARENS(Signature))\n    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION_2( TestNameClass, TestName, ClassName, Name, Tags, Signature, ... )    \\\n        namespace{                                                                                  \\\n            namespace INTERNAL_CATCH_MAKE_NAMESPACE(TestName) {                                      \\\n            INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD(TestName, ClassName, INTERNAL_CATCH_REMOVE_PARENS(Signature));\\\n        }                                                                                           \\\n        }                                                                                           \\\n        INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD(TestName, INTERNAL_CATCH_REMOVE_PARENS(Signature))\n\n    #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n        #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(Name, Tags, ...) \\\n            INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, typename TestType, __VA_ARGS__ )\n    #else\n        #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(Name, Tags, ...) \\\n            INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, typename TestType, __VA_ARGS__ ) )\n    #endif\n\n    #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n        #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG_NO_REGISTRATION(Name, Tags, Signature, ...) \\\n            INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, Signature, __VA_ARGS__ )\n    #else\n        #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG_NO_REGISTRATION(Name, Tags, Signature, ...) \\\n            INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, Signature, __VA_ARGS__ ) )\n    #endif\n\n    #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n        #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION( ClassName, Name, Tags,... ) \\\n            INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_C_L_A_S_S_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ) , ClassName, Name, Tags, typename T, __VA_ARGS__ )\n    #else\n        #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION( ClassName, Name, Tags,... ) \\\n            INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_C_L_A_S_S_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ) , ClassName, Name, Tags, typename T, __VA_ARGS__ ) )\n    #endif\n\n    #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n        #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG_NO_REGISTRATION( ClassName, Name, Tags, Signature, ... ) \\\n            INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_C_L_A_S_S_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ) , ClassName, Name, Tags, Signature, __VA_ARGS__ )\n    #else\n        #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG_NO_REGISTRATION( ClassName, Name, Tags, Signature, ... ) \\\n            INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_C_L_A_S_S_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ) , ClassName, Name, Tags, Signature, __VA_ARGS__ ) )\n    #endif\n#endif\n\n    ///////////////////////////////////////////////////////////////////////////////\n    #define INTERNAL_CATCH_TESTCASE2( TestName, ... ) \\\n        static void TestName(); \\\n        CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \\\n        CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \\\n        namespace{ Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( &TestName ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ __VA_ARGS__ } ); } /* NOLINT */ \\\n        CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \\\n        static void TestName()\n    #define INTERNAL_CATCH_TESTCASE( ... ) \\\n        INTERNAL_CATCH_TESTCASE2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ ), __VA_ARGS__ )\n\n    ///////////////////////////////////////////////////////////////////////////////\n    #define INTERNAL_CATCH_METHOD_AS_TEST_CASE( QualifiedMethod, ... ) \\\n        CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \\\n        CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \\\n        namespace{ Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( &QualifiedMethod ), CATCH_INTERNAL_LINEINFO, \"&\" #QualifiedMethod, Catch::NameAndTags{ __VA_ARGS__ } ); } /* NOLINT */ \\\n        CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION\n\n    ///////////////////////////////////////////////////////////////////////////////\n    #define INTERNAL_CATCH_TEST_CASE_METHOD2( TestName, ClassName, ... )\\\n        CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \\\n        CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \\\n        namespace{ \\\n            struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName) { \\\n                void test(); \\\n            }; \\\n            Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar ) ( Catch::makeTestInvoker( &TestName::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndTags{ __VA_ARGS__ } ); /* NOLINT */ \\\n        } \\\n        CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \\\n        void TestName::test()\n    #define INTERNAL_CATCH_TEST_CASE_METHOD( ClassName, ... ) \\\n        INTERNAL_CATCH_TEST_CASE_METHOD2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ ), ClassName, __VA_ARGS__ )\n\n    ///////////////////////////////////////////////////////////////////////////////\n    #define INTERNAL_CATCH_REGISTER_TESTCASE( Function, ... ) \\\n        CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \\\n        CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \\\n        Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( Function ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ __VA_ARGS__ } ); /* NOLINT */ \\\n        CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION\n\n    ///////////////////////////////////////////////////////////////////////////////\n    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_2(TestName, TestFunc, Name, Tags, Signature, ... )\\\n        CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \\\n        CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \\\n        CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS \\\n        CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \\\n        INTERNAL_CATCH_DECLARE_SIG_TEST(TestFunc, INTERNAL_CATCH_REMOVE_PARENS(Signature));\\\n        namespace {\\\n        namespace INTERNAL_CATCH_MAKE_NAMESPACE(TestName){\\\n            INTERNAL_CATCH_TYPE_GEN\\\n            INTERNAL_CATCH_NTTP_GEN(INTERNAL_CATCH_REMOVE_PARENS(Signature))\\\n            INTERNAL_CATCH_NTTP_REG_GEN(TestFunc,INTERNAL_CATCH_REMOVE_PARENS(Signature))\\\n            template<typename...Types> \\\n            struct TestName{\\\n                TestName(){\\\n                    int index = 0;                                    \\\n                    constexpr char const* tmpl_types[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, __VA_ARGS__)};\\\n                    using expander = int[];\\\n                    (void)expander{(reg_test(Types{}, Catch::NameAndTags{ Name \" - \" + std::string(tmpl_types[index]), Tags } ), index++)... };/* NOLINT */ \\\n                }\\\n            };\\\n            static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\\\n            TestName<INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(__VA_ARGS__)>();\\\n            return 0;\\\n        }();\\\n        }\\\n        }\\\n        CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \\\n        INTERNAL_CATCH_DEFINE_SIG_TEST(TestFunc,INTERNAL_CATCH_REMOVE_PARENS(Signature))\n\n#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE(Name, Tags, ...) \\\n        INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, typename TestType, __VA_ARGS__ )\n#else\n    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE(Name, Tags, ...) \\\n        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, typename TestType, __VA_ARGS__ ) )\n#endif\n\n#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG(Name, Tags, Signature, ...) \\\n        INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, Signature, __VA_ARGS__ )\n#else\n    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG(Name, Tags, Signature, ...) \\\n        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, Signature, __VA_ARGS__ ) )\n#endif\n\n    #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2(TestName, TestFuncName, Name, Tags, Signature, TmplTypes, TypesList) \\\n        CATCH_INTERNAL_START_WARNINGS_SUPPRESSION                      \\\n        CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS                      \\\n        CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS                \\\n        CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS              \\\n        template<typename TestType> static void TestFuncName();       \\\n        namespace {\\\n        namespace INTERNAL_CATCH_MAKE_NAMESPACE(TestName) {                                     \\\n            INTERNAL_CATCH_TYPE_GEN                                                  \\\n            INTERNAL_CATCH_NTTP_GEN(INTERNAL_CATCH_REMOVE_PARENS(Signature))         \\\n            template<typename... Types>                               \\\n            struct TestName {                                         \\\n                void reg_tests() {                                          \\\n                    int index = 0;                                    \\\n                    using expander = int[];                           \\\n                    constexpr char const* tmpl_types[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TmplTypes))};\\\n                    constexpr char const* types_list[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TypesList))};\\\n                    constexpr auto num_types = sizeof(types_list) / sizeof(types_list[0]);\\\n                    (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestFuncName<Types> ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ Name \" - \" + std::string(tmpl_types[index / num_types]) + \"<\" + std::string(types_list[index % num_types]) + \">\", Tags } ), index++)... };/* NOLINT */\\\n                }                                                     \\\n            };                                                        \\\n            static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){ \\\n                using TestInit = typename create<TestName, decltype(get_wrapper<INTERNAL_CATCH_REMOVE_PARENS(TmplTypes)>()), TypeList<INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(INTERNAL_CATCH_REMOVE_PARENS(TypesList))>>::type; \\\n                TestInit t;                                           \\\n                t.reg_tests();                                        \\\n                return 0;                                             \\\n            }();                                                      \\\n        }                                                             \\\n        }                                                             \\\n        CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION                       \\\n        template<typename TestType>                                   \\\n        static void TestFuncName()\n\n#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n    #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE(Name, Tags, ...)\\\n        INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, typename T,__VA_ARGS__)\n#else\n    #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE(Name, Tags, ...)\\\n        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, typename T, __VA_ARGS__ ) )\n#endif\n\n#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n    #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG(Name, Tags, Signature, ...)\\\n        INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, Signature, __VA_ARGS__)\n#else\n    #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG(Name, Tags, Signature, ...)\\\n        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, Signature, __VA_ARGS__ ) )\n#endif\n\n    #define INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_2(TestName, TestFunc, Name, Tags, TmplList)\\\n        CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \\\n        CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \\\n        CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \\\n        template<typename TestType> static void TestFunc();       \\\n        namespace {\\\n        namespace INTERNAL_CATCH_MAKE_NAMESPACE(TestName){\\\n        INTERNAL_CATCH_TYPE_GEN\\\n        template<typename... Types>                               \\\n        struct TestName {                                         \\\n            void reg_tests() {                                          \\\n                int index = 0;                                    \\\n                using expander = int[];                           \\\n                (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestFunc<Types> ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ Name \" - \" + std::string(INTERNAL_CATCH_STRINGIZE(TmplList)) + \" - \" + std::to_string(index), Tags } ), index++)... };/* NOLINT */\\\n            }                                                     \\\n        };\\\n        static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){ \\\n                using TestInit = typename convert<TestName, TmplList>::type; \\\n                TestInit t;                                           \\\n                t.reg_tests();                                        \\\n                return 0;                                             \\\n            }();                                                      \\\n        }}\\\n        CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION                       \\\n        template<typename TestType>                                   \\\n        static void TestFunc()\n\n    #define INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE(Name, Tags, TmplList) \\\n        INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, TmplList )\n\n    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( TestNameClass, TestName, ClassName, Name, Tags, Signature, ... ) \\\n        CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \\\n        CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \\\n        CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS \\\n        CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \\\n        namespace {\\\n        namespace INTERNAL_CATCH_MAKE_NAMESPACE(TestName){ \\\n            INTERNAL_CATCH_TYPE_GEN\\\n            INTERNAL_CATCH_NTTP_GEN(INTERNAL_CATCH_REMOVE_PARENS(Signature))\\\n            INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD(TestName, ClassName, INTERNAL_CATCH_REMOVE_PARENS(Signature));\\\n            INTERNAL_CATCH_NTTP_REG_METHOD_GEN(TestName, INTERNAL_CATCH_REMOVE_PARENS(Signature))\\\n            template<typename...Types> \\\n            struct TestNameClass{\\\n                TestNameClass(){\\\n                    int index = 0;                                    \\\n                    constexpr char const* tmpl_types[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, __VA_ARGS__)};\\\n                    using expander = int[];\\\n                    (void)expander{(reg_test(Types{}, #ClassName, Catch::NameAndTags{ Name \" - \" + std::string(tmpl_types[index]), Tags } ), index++)... };/* NOLINT */ \\\n                }\\\n            };\\\n            static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\\\n                TestNameClass<INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(__VA_ARGS__)>();\\\n                return 0;\\\n        }();\\\n        }\\\n        }\\\n        CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \\\n        INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD(TestName, INTERNAL_CATCH_REMOVE_PARENS(Signature))\n\n#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD( ClassName, Name, Tags,... ) \\\n        INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_C_L_A_S_S_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ) , ClassName, Name, Tags, typename T, __VA_ARGS__ )\n#else\n    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD( ClassName, Name, Tags,... ) \\\n        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_C_L_A_S_S_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ) , ClassName, Name, Tags, typename T, __VA_ARGS__ ) )\n#endif\n\n#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( ClassName, Name, Tags, Signature, ... ) \\\n        INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_C_L_A_S_S_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ) , ClassName, Name, Tags, Signature, __VA_ARGS__ )\n#else\n    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( ClassName, Name, Tags, Signature, ... ) \\\n        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_C_L_A_S_S_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ) , ClassName, Name, Tags, Signature, __VA_ARGS__ ) )\n#endif\n\n    #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2(TestNameClass, TestName, ClassName, Name, Tags, Signature, TmplTypes, TypesList)\\\n        CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \\\n        CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \\\n        CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS \\\n        CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \\\n        template<typename TestType> \\\n            struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName <TestType>) { \\\n                void test();\\\n            };\\\n        namespace {\\\n        namespace INTERNAL_CATCH_MAKE_NAMESPACE(TestNameClass) {\\\n            INTERNAL_CATCH_TYPE_GEN                  \\\n            INTERNAL_CATCH_NTTP_GEN(INTERNAL_CATCH_REMOVE_PARENS(Signature))\\\n            template<typename...Types>\\\n            struct TestNameClass{\\\n                void reg_tests(){\\\n                    int index = 0;\\\n                    using expander = int[];\\\n                    constexpr char const* tmpl_types[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TmplTypes))};\\\n                    constexpr char const* types_list[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TypesList))};\\\n                    constexpr auto num_types = sizeof(types_list) / sizeof(types_list[0]);\\\n                    (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestName<Types>::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndTags{ Name \" - \" + std::string(tmpl_types[index / num_types]) + \"<\" + std::string(types_list[index % num_types]) + \">\", Tags } ), index++)... };/* NOLINT */ \\\n                }\\\n            };\\\n            static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\\\n                using TestInit = typename create<TestNameClass, decltype(get_wrapper<INTERNAL_CATCH_REMOVE_PARENS(TmplTypes)>()), TypeList<INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(INTERNAL_CATCH_REMOVE_PARENS(TypesList))>>::type;\\\n                TestInit t;\\\n                t.reg_tests();\\\n                return 0;\\\n            }(); \\\n        }\\\n        }\\\n        CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \\\n        template<typename TestType> \\\n        void TestName<TestType>::test()\n\n#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n    #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( ClassName, Name, Tags, ... )\\\n        INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), ClassName, Name, Tags, typename T, __VA_ARGS__ )\n#else\n    #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( ClassName, Name, Tags, ... )\\\n        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), ClassName, Name, Tags, typename T,__VA_ARGS__ ) )\n#endif\n\n#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n    #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( ClassName, Name, Tags, Signature, ... )\\\n        INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), ClassName, Name, Tags, Signature, __VA_ARGS__ )\n#else\n    #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( ClassName, Name, Tags, Signature, ... )\\\n        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), ClassName, Name, Tags, Signature,__VA_ARGS__ ) )\n#endif\n\n    #define INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_METHOD_2( TestNameClass, TestName, ClassName, Name, Tags, TmplList) \\\n        CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \\\n        CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \\\n        CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \\\n        template<typename TestType> \\\n        struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName <TestType>) { \\\n            void test();\\\n        };\\\n        namespace {\\\n        namespace INTERNAL_CATCH_MAKE_NAMESPACE(TestName){ \\\n            INTERNAL_CATCH_TYPE_GEN\\\n            template<typename...Types>\\\n            struct TestNameClass{\\\n                void reg_tests(){\\\n                    int index = 0;\\\n                    using expander = int[];\\\n                    (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestName<Types>::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndTags{ Name \" - \" + std::string(INTERNAL_CATCH_STRINGIZE(TmplList)) + \" - \" + std::to_string(index), Tags } ), index++)... };/* NOLINT */ \\\n                }\\\n            };\\\n            static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\\\n                using TestInit = typename convert<TestNameClass, TmplList>::type;\\\n                TestInit t;\\\n                t.reg_tests();\\\n                return 0;\\\n            }(); \\\n        }}\\\n        CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \\\n        template<typename TestType> \\\n        void TestName<TestType>::test()\n\n#define INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_METHOD(ClassName, Name, Tags, TmplList) \\\n        INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), ClassName, Name, Tags, TmplList )\n\n// end catch_test_registry.h\n// start catch_capture.hpp\n\n// start catch_assertionhandler.h\n\n// start catch_assertioninfo.h\n\n// start catch_result_type.h\n\nnamespace Catch {\n\n    // ResultWas::OfType enum\n    struct ResultWas { enum OfType {\n        Unknown = -1,\n        Ok = 0,\n        Info = 1,\n        Warning = 2,\n\n        FailureBit = 0x10,\n\n        ExpressionFailed = FailureBit | 1,\n        ExplicitFailure = FailureBit | 2,\n\n        Exception = 0x100 | FailureBit,\n\n        ThrewException = Exception | 1,\n        DidntThrowException = Exception | 2,\n\n        FatalErrorCondition = 0x200 | FailureBit\n\n    }; };\n\n    bool isOk( ResultWas::OfType resultType );\n    bool isJustInfo( int flags );\n\n    // ResultDisposition::Flags enum\n    struct ResultDisposition { enum Flags {\n        Normal = 0x01,\n\n        ContinueOnFailure = 0x02,   // Failures fail test, but execution continues\n        FalseTest = 0x04,           // Prefix expression with !\n        SuppressFail = 0x08         // Failures are reported but do not fail the test\n    }; };\n\n    ResultDisposition::Flags operator | ( ResultDisposition::Flags lhs, ResultDisposition::Flags rhs );\n\n    bool shouldContinueOnFailure( int flags );\n    inline bool isFalseTest( int flags ) { return ( flags & ResultDisposition::FalseTest ) != 0; }\n    bool shouldSuppressFailure( int flags );\n\n} // end namespace Catch\n\n// end catch_result_type.h\nnamespace Catch {\n\n    struct AssertionInfo\n    {\n        StringRef macroName;\n        SourceLineInfo lineInfo;\n        StringRef capturedExpression;\n        ResultDisposition::Flags resultDisposition;\n\n        // We want to delete this constructor but a compiler bug in 4.8 means\n        // the struct is then treated as non-aggregate\n        //AssertionInfo() = delete;\n    };\n\n} // end namespace Catch\n\n// end catch_assertioninfo.h\n// start catch_decomposer.h\n\n// start catch_tostring.h\n\n#include <vector>\n#include <cstddef>\n#include <type_traits>\n#include <string>\n// start catch_stream.h\n\n#include <iosfwd>\n#include <cstddef>\n#include <ostream>\n\nnamespace Catch {\n\n    std::ostream& cout();\n    std::ostream& cerr();\n    std::ostream& clog();\n\n    class StringRef;\n\n    struct IStream {\n        virtual ~IStream();\n        virtual std::ostream& stream() const = 0;\n    };\n\n    auto makeStream( StringRef const &filename ) -> IStream const*;\n\n    class ReusableStringStream : NonCopyable {\n        std::size_t m_index;\n        std::ostream* m_oss;\n    public:\n        ReusableStringStream();\n        ~ReusableStringStream();\n\n        auto str() const -> std::string;\n\n        template<typename T>\n        auto operator << ( T const& value ) -> ReusableStringStream& {\n            *m_oss << value;\n            return *this;\n        }\n        auto get() -> std::ostream& { return *m_oss; }\n    };\n}\n\n// end catch_stream.h\n// start catch_interfaces_enum_values_registry.h\n\n#include <vector>\n\nnamespace Catch {\n\n    namespace Detail {\n        struct EnumInfo {\n            StringRef m_name;\n            std::vector<std::pair<int, StringRef>> m_values;\n\n            ~EnumInfo();\n\n            StringRef lookup( int value ) const;\n        };\n    } // namespace Detail\n\n    struct IMutableEnumValuesRegistry {\n        virtual ~IMutableEnumValuesRegistry();\n\n        virtual Detail::EnumInfo const& registerEnum( StringRef enumName, StringRef allEnums, std::vector<int> const& values ) = 0;\n\n        template<typename E>\n        Detail::EnumInfo const& registerEnum( StringRef enumName, StringRef allEnums, std::initializer_list<E> values ) {\n            static_assert(sizeof(int) >= sizeof(E), \"Cannot serialize enum to int\");\n            std::vector<int> intValues;\n            intValues.reserve( values.size() );\n            for( auto enumValue : values )\n                intValues.push_back( static_cast<int>( enumValue ) );\n            return registerEnum( enumName, allEnums, intValues );\n        }\n    };\n\n} // Catch\n\n// end catch_interfaces_enum_values_registry.h\n\n#ifdef CATCH_CONFIG_CPP17_STRING_VIEW\n#include <string_view>\n#endif\n\n#ifdef __OBJC__\n// start catch_objc_arc.hpp\n\n#import <Foundation/Foundation.h>\n\n#ifdef __has_feature\n#define CATCH_ARC_ENABLED __has_feature(objc_arc)\n#else\n#define CATCH_ARC_ENABLED 0\n#endif\n\nvoid arcSafeRelease( NSObject* obj );\nid performOptionalSelector( id obj, SEL sel );\n\n#if !CATCH_ARC_ENABLED\ninline void arcSafeRelease( NSObject* obj ) {\n    [obj release];\n}\ninline id performOptionalSelector( id obj, SEL sel ) {\n    if( [obj respondsToSelector: sel] )\n        return [obj performSelector: sel];\n    return nil;\n}\n#define CATCH_UNSAFE_UNRETAINED\n#define CATCH_ARC_STRONG\n#else\ninline void arcSafeRelease( NSObject* ){}\ninline id performOptionalSelector( id obj, SEL sel ) {\n#ifdef __clang__\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Warc-performSelector-leaks\"\n#endif\n    if( [obj respondsToSelector: sel] )\n        return [obj performSelector: sel];\n#ifdef __clang__\n#pragma clang diagnostic pop\n#endif\n    return nil;\n}\n#define CATCH_UNSAFE_UNRETAINED __unsafe_unretained\n#define CATCH_ARC_STRONG __strong\n#endif\n\n// end catch_objc_arc.hpp\n#endif\n\n#ifdef _MSC_VER\n#pragma warning(push)\n#pragma warning(disable:4180) // We attempt to stream a function (address) by const&, which MSVC complains about but is harmless\n#endif\n\nnamespace Catch {\n    namespace Detail {\n\n        extern const std::string unprintableString;\n\n        std::string rawMemoryToString( const void *object, std::size_t size );\n\n        template<typename T>\n        std::string rawMemoryToString( const T& object ) {\n          return rawMemoryToString( &object, sizeof(object) );\n        }\n\n        template<typename T>\n        class IsStreamInsertable {\n            template<typename Stream, typename U>\n            static auto test(int)\n                -> decltype(std::declval<Stream&>() << std::declval<U>(), std::true_type());\n\n            template<typename, typename>\n            static auto test(...)->std::false_type;\n\n        public:\n            static const bool value = decltype(test<std::ostream, const T&>(0))::value;\n        };\n\n        template<typename E>\n        std::string convertUnknownEnumToString( E e );\n\n        template<typename T>\n        typename std::enable_if<\n            !std::is_enum<T>::value && !std::is_base_of<std::exception, T>::value,\n        std::string>::type convertUnstreamable( T const& ) {\n            return Detail::unprintableString;\n        }\n        template<typename T>\n        typename std::enable_if<\n            !std::is_enum<T>::value && std::is_base_of<std::exception, T>::value,\n         std::string>::type convertUnstreamable(T const& ex) {\n            return ex.what();\n        }\n\n        template<typename T>\n        typename std::enable_if<\n            std::is_enum<T>::value\n        , std::string>::type convertUnstreamable( T const& value ) {\n            return convertUnknownEnumToString( value );\n        }\n\n#if defined(_MANAGED)\n        //! Convert a CLR string to a utf8 std::string\n        template<typename T>\n        std::string clrReferenceToString( T^ ref ) {\n            if (ref == nullptr)\n                return std::string(\"null\");\n            auto bytes = System::Text::Encoding::UTF8->GetBytes(ref->ToString());\n            cli::pin_ptr<System::Byte> p = &bytes[0];\n            return std::string(reinterpret_cast<char const *>(p), bytes->Length);\n        }\n#endif\n\n    } // namespace Detail\n\n    // If we decide for C++14, change these to enable_if_ts\n    template <typename T, typename = void>\n    struct StringMaker {\n        template <typename Fake = T>\n        static\n        typename std::enable_if<::Catch::Detail::IsStreamInsertable<Fake>::value, std::string>::type\n            convert(const Fake& value) {\n                ReusableStringStream rss;\n                // NB: call using the function-like syntax to avoid ambiguity with\n                // user-defined templated operator<< under clang.\n                rss.operator<<(value);\n                return rss.str();\n        }\n\n        template <typename Fake = T>\n        static\n        typename std::enable_if<!::Catch::Detail::IsStreamInsertable<Fake>::value, std::string>::type\n            convert( const Fake& value ) {\n#if !defined(CATCH_CONFIG_FALLBACK_STRINGIFIER)\n            return Detail::convertUnstreamable(value);\n#else\n            return CATCH_CONFIG_FALLBACK_STRINGIFIER(value);\n#endif\n        }\n    };\n\n    namespace Detail {\n\n        // This function dispatches all stringification requests inside of Catch.\n        // Should be preferably called fully qualified, like ::Catch::Detail::stringify\n        template <typename T>\n        std::string stringify(const T& e) {\n            return ::Catch::StringMaker<typename std::remove_cv<typename std::remove_reference<T>::type>::type>::convert(e);\n        }\n\n        template<typename E>\n        std::string convertUnknownEnumToString( E e ) {\n            return ::Catch::Detail::stringify(static_cast<typename std::underlying_type<E>::type>(e));\n        }\n\n#if defined(_MANAGED)\n        template <typename T>\n        std::string stringify( T^ e ) {\n            return ::Catch::StringMaker<T^>::convert(e);\n        }\n#endif\n\n    } // namespace Detail\n\n    // Some predefined specializations\n\n    template<>\n    struct StringMaker<std::string> {\n        static std::string convert(const std::string& str);\n    };\n\n#ifdef CATCH_CONFIG_CPP17_STRING_VIEW\n    template<>\n    struct StringMaker<std::string_view> {\n        static std::string convert(std::string_view str);\n    };\n#endif\n\n    template<>\n    struct StringMaker<char const *> {\n        static std::string convert(char const * str);\n    };\n    template<>\n    struct StringMaker<char *> {\n        static std::string convert(char * str);\n    };\n\n#ifdef CATCH_CONFIG_WCHAR\n    template<>\n    struct StringMaker<std::wstring> {\n        static std::string convert(const std::wstring& wstr);\n    };\n\n# ifdef CATCH_CONFIG_CPP17_STRING_VIEW\n    template<>\n    struct StringMaker<std::wstring_view> {\n        static std::string convert(std::wstring_view str);\n    };\n# endif\n\n    template<>\n    struct StringMaker<wchar_t const *> {\n        static std::string convert(wchar_t const * str);\n    };\n    template<>\n    struct StringMaker<wchar_t *> {\n        static std::string convert(wchar_t * str);\n    };\n#endif\n\n    // TBD: Should we use `strnlen` to ensure that we don't go out of the buffer,\n    //      while keeping string semantics?\n    template<int SZ>\n    struct StringMaker<char[SZ]> {\n        static std::string convert(char const* str) {\n            return ::Catch::Detail::stringify(std::string{ str });\n        }\n    };\n    template<int SZ>\n    struct StringMaker<signed char[SZ]> {\n        static std::string convert(signed char const* str) {\n            return ::Catch::Detail::stringify(std::string{ reinterpret_cast<char const *>(str) });\n        }\n    };\n    template<int SZ>\n    struct StringMaker<unsigned char[SZ]> {\n        static std::string convert(unsigned char const* str) {\n            return ::Catch::Detail::stringify(std::string{ reinterpret_cast<char const *>(str) });\n        }\n    };\n\n#if defined(CATCH_CONFIG_CPP17_BYTE)\n    template<>\n    struct StringMaker<std::byte> {\n        static std::string convert(std::byte value);\n    };\n#endif // defined(CATCH_CONFIG_CPP17_BYTE)\n    template<>\n    struct StringMaker<int> {\n        static std::string convert(int value);\n    };\n    template<>\n    struct StringMaker<long> {\n        static std::string convert(long value);\n    };\n    template<>\n    struct StringMaker<long long> {\n        static std::string convert(long long value);\n    };\n    template<>\n    struct StringMaker<unsigned int> {\n        static std::string convert(unsigned int value);\n    };\n    template<>\n    struct StringMaker<unsigned long> {\n        static std::string convert(unsigned long value);\n    };\n    template<>\n    struct StringMaker<unsigned long long> {\n        static std::string convert(unsigned long long value);\n    };\n\n    template<>\n    struct StringMaker<bool> {\n        static std::string convert(bool b);\n    };\n\n    template<>\n    struct StringMaker<char> {\n        static std::string convert(char c);\n    };\n    template<>\n    struct StringMaker<signed char> {\n        static std::string convert(signed char c);\n    };\n    template<>\n    struct StringMaker<unsigned char> {\n        static std::string convert(unsigned char c);\n    };\n\n    template<>\n    struct StringMaker<std::nullptr_t> {\n        static std::string convert(std::nullptr_t);\n    };\n\n    template<>\n    struct StringMaker<float> {\n        static std::string convert(float value);\n        static int precision;\n    };\n\n    template<>\n    struct StringMaker<double> {\n        static std::string convert(double value);\n        static int precision;\n    };\n\n    template <typename T>\n    struct StringMaker<T*> {\n        template <typename U>\n        static std::string convert(U* p) {\n            if (p) {\n                return ::Catch::Detail::rawMemoryToString(p);\n            } else {\n                return \"nullptr\";\n            }\n        }\n    };\n\n    template <typename R, typename C>\n    struct StringMaker<R C::*> {\n        static std::string convert(R C::* p) {\n            if (p) {\n                return ::Catch::Detail::rawMemoryToString(p);\n            } else {\n                return \"nullptr\";\n            }\n        }\n    };\n\n#if defined(_MANAGED)\n    template <typename T>\n    struct StringMaker<T^> {\n        static std::string convert( T^ ref ) {\n            return ::Catch::Detail::clrReferenceToString(ref);\n        }\n    };\n#endif\n\n    namespace Detail {\n        template<typename InputIterator, typename Sentinel = InputIterator>\n        std::string rangeToString(InputIterator first, Sentinel last) {\n            ReusableStringStream rss;\n            rss << \"{ \";\n            if (first != last) {\n                rss << ::Catch::Detail::stringify(*first);\n                for (++first; first != last; ++first)\n                    rss << \", \" << ::Catch::Detail::stringify(*first);\n            }\n            rss << \" }\";\n            return rss.str();\n        }\n    }\n\n#ifdef __OBJC__\n    template<>\n    struct StringMaker<NSString*> {\n        static std::string convert(NSString * nsstring) {\n            if (!nsstring)\n                return \"nil\";\n            return std::string(\"@\") + [nsstring UTF8String];\n        }\n    };\n    template<>\n    struct StringMaker<NSObject*> {\n        static std::string convert(NSObject* nsObject) {\n            return ::Catch::Detail::stringify([nsObject description]);\n        }\n\n    };\n    namespace Detail {\n        inline std::string stringify( NSString* nsstring ) {\n            return StringMaker<NSString*>::convert( nsstring );\n        }\n\n    } // namespace Detail\n#endif // __OBJC__\n\n} // namespace Catch\n\n//////////////////////////////////////////////////////\n// Separate std-lib types stringification, so it can be selectively enabled\n// This means that we do not bring in\n\n#if defined(CATCH_CONFIG_ENABLE_ALL_STRINGMAKERS)\n#  define CATCH_CONFIG_ENABLE_PAIR_STRINGMAKER\n#  define CATCH_CONFIG_ENABLE_TUPLE_STRINGMAKER\n#  define CATCH_CONFIG_ENABLE_VARIANT_STRINGMAKER\n#  define CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER\n#  define CATCH_CONFIG_ENABLE_OPTIONAL_STRINGMAKER\n#endif\n\n// Separate std::pair specialization\n#if defined(CATCH_CONFIG_ENABLE_PAIR_STRINGMAKER)\n#include <utility>\nnamespace Catch {\n    template<typename T1, typename T2>\n    struct StringMaker<std::pair<T1, T2> > {\n        static std::string convert(const std::pair<T1, T2>& pair) {\n            ReusableStringStream rss;\n            rss << \"{ \"\n                << ::Catch::Detail::stringify(pair.first)\n                << \", \"\n                << ::Catch::Detail::stringify(pair.second)\n                << \" }\";\n            return rss.str();\n        }\n    };\n}\n#endif // CATCH_CONFIG_ENABLE_PAIR_STRINGMAKER\n\n#if defined(CATCH_CONFIG_ENABLE_OPTIONAL_STRINGMAKER) && defined(CATCH_CONFIG_CPP17_OPTIONAL)\n#include <optional>\nnamespace Catch {\n    template<typename T>\n    struct StringMaker<std::optional<T> > {\n        static std::string convert(const std::optional<T>& optional) {\n            ReusableStringStream rss;\n            if (optional.has_value()) {\n                rss << ::Catch::Detail::stringify(*optional);\n            } else {\n                rss << \"{ }\";\n            }\n            return rss.str();\n        }\n    };\n}\n#endif // CATCH_CONFIG_ENABLE_OPTIONAL_STRINGMAKER\n\n// Separate std::tuple specialization\n#if defined(CATCH_CONFIG_ENABLE_TUPLE_STRINGMAKER)\n#include <tuple>\nnamespace Catch {\n    namespace Detail {\n        template<\n            typename Tuple,\n            std::size_t N = 0,\n            bool = (N < std::tuple_size<Tuple>::value)\n            >\n            struct TupleElementPrinter {\n            static void print(const Tuple& tuple, std::ostream& os) {\n                os << (N ? \", \" : \" \")\n                    << ::Catch::Detail::stringify(std::get<N>(tuple));\n                TupleElementPrinter<Tuple, N + 1>::print(tuple, os);\n            }\n        };\n\n        template<\n            typename Tuple,\n            std::size_t N\n        >\n            struct TupleElementPrinter<Tuple, N, false> {\n            static void print(const Tuple&, std::ostream&) {}\n        };\n\n    }\n\n    template<typename ...Types>\n    struct StringMaker<std::tuple<Types...>> {\n        static std::string convert(const std::tuple<Types...>& tuple) {\n            ReusableStringStream rss;\n            rss << '{';\n            Detail::TupleElementPrinter<std::tuple<Types...>>::print(tuple, rss.get());\n            rss << \" }\";\n            return rss.str();\n        }\n    };\n}\n#endif // CATCH_CONFIG_ENABLE_TUPLE_STRINGMAKER\n\n#if defined(CATCH_CONFIG_ENABLE_VARIANT_STRINGMAKER) && defined(CATCH_CONFIG_CPP17_VARIANT)\n#include <variant>\nnamespace Catch {\n    template<>\n    struct StringMaker<std::monostate> {\n        static std::string convert(const std::monostate&) {\n            return \"{ }\";\n        }\n    };\n\n    template<typename... Elements>\n    struct StringMaker<std::variant<Elements...>> {\n        static std::string convert(const std::variant<Elements...>& variant) {\n            if (variant.valueless_by_exception()) {\n                return \"{valueless variant}\";\n            } else {\n                return std::visit(\n                    [](const auto& value) {\n                        return ::Catch::Detail::stringify(value);\n                    },\n                    variant\n                );\n            }\n        }\n    };\n}\n#endif // CATCH_CONFIG_ENABLE_VARIANT_STRINGMAKER\n\nnamespace Catch {\n    // Import begin/ end from std here\n    using std::begin;\n    using std::end;\n\n    namespace detail {\n        template <typename...>\n        struct void_type {\n            using type = void;\n        };\n\n        template <typename T, typename = void>\n        struct is_range_impl : std::false_type {\n        };\n\n        template <typename T>\n        struct is_range_impl<T, typename void_type<decltype(begin(std::declval<T>()))>::type> : std::true_type {\n        };\n    } // namespace detail\n\n    template <typename T>\n    struct is_range : detail::is_range_impl<T> {\n    };\n\n#if defined(_MANAGED) // Managed types are never ranges\n    template <typename T>\n    struct is_range<T^> {\n        static const bool value = false;\n    };\n#endif\n\n    template<typename Range>\n    std::string rangeToString( Range const& range ) {\n        return ::Catch::Detail::rangeToString( begin( range ), end( range ) );\n    }\n\n    // Handle vector<bool> specially\n    template<typename Allocator>\n    std::string rangeToString( std::vector<bool, Allocator> const& v ) {\n        ReusableStringStream rss;\n        rss << \"{ \";\n        bool first = true;\n        for( bool b : v ) {\n            if( first )\n                first = false;\n            else\n                rss << \", \";\n            rss << ::Catch::Detail::stringify( b );\n        }\n        rss << \" }\";\n        return rss.str();\n    }\n\n    template<typename R>\n    struct StringMaker<R, typename std::enable_if<is_range<R>::value && !::Catch::Detail::IsStreamInsertable<R>::value>::type> {\n        static std::string convert( R const& range ) {\n            return rangeToString( range );\n        }\n    };\n\n    template <typename T, int SZ>\n    struct StringMaker<T[SZ]> {\n        static std::string convert(T const(&arr)[SZ]) {\n            return rangeToString(arr);\n        }\n    };\n\n} // namespace Catch\n\n// Separate std::chrono::duration specialization\n#if defined(CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER)\n#include <ctime>\n#include <ratio>\n#include <chrono>\n\nnamespace Catch {\n\ntemplate <class Ratio>\nstruct ratio_string {\n    static std::string symbol();\n};\n\ntemplate <class Ratio>\nstd::string ratio_string<Ratio>::symbol() {\n    Catch::ReusableStringStream rss;\n    rss << '[' << Ratio::num << '/'\n        << Ratio::den << ']';\n    return rss.str();\n}\ntemplate <>\nstruct ratio_string<std::atto> {\n    static std::string symbol();\n};\ntemplate <>\nstruct ratio_string<std::femto> {\n    static std::string symbol();\n};\ntemplate <>\nstruct ratio_string<std::pico> {\n    static std::string symbol();\n};\ntemplate <>\nstruct ratio_string<std::nano> {\n    static std::string symbol();\n};\ntemplate <>\nstruct ratio_string<std::micro> {\n    static std::string symbol();\n};\ntemplate <>\nstruct ratio_string<std::milli> {\n    static std::string symbol();\n};\n\n    ////////////\n    // std::chrono::duration specializations\n    template<typename Value, typename Ratio>\n    struct StringMaker<std::chrono::duration<Value, Ratio>> {\n        static std::string convert(std::chrono::duration<Value, Ratio> const& duration) {\n            ReusableStringStream rss;\n            rss << duration.count() << ' ' << ratio_string<Ratio>::symbol() << 's';\n            return rss.str();\n        }\n    };\n    template<typename Value>\n    struct StringMaker<std::chrono::duration<Value, std::ratio<1>>> {\n        static std::string convert(std::chrono::duration<Value, std::ratio<1>> const& duration) {\n            ReusableStringStream rss;\n            rss << duration.count() << \" s\";\n            return rss.str();\n        }\n    };\n    template<typename Value>\n    struct StringMaker<std::chrono::duration<Value, std::ratio<60>>> {\n        static std::string convert(std::chrono::duration<Value, std::ratio<60>> const& duration) {\n            ReusableStringStream rss;\n            rss << duration.count() << \" m\";\n            return rss.str();\n        }\n    };\n    template<typename Value>\n    struct StringMaker<std::chrono::duration<Value, std::ratio<3600>>> {\n        static std::string convert(std::chrono::duration<Value, std::ratio<3600>> const& duration) {\n            ReusableStringStream rss;\n            rss << duration.count() << \" h\";\n            return rss.str();\n        }\n    };\n\n    ////////////\n    // std::chrono::time_point specialization\n    // Generic time_point cannot be specialized, only std::chrono::time_point<system_clock>\n    template<typename Clock, typename Duration>\n    struct StringMaker<std::chrono::time_point<Clock, Duration>> {\n        static std::string convert(std::chrono::time_point<Clock, Duration> const& time_point) {\n            return ::Catch::Detail::stringify(time_point.time_since_epoch()) + \" since epoch\";\n        }\n    };\n    // std::chrono::time_point<system_clock> specialization\n    template<typename Duration>\n    struct StringMaker<std::chrono::time_point<std::chrono::system_clock, Duration>> {\n        static std::string convert(std::chrono::time_point<std::chrono::system_clock, Duration> const& time_point) {\n            auto converted = std::chrono::system_clock::to_time_t(time_point);\n\n#ifdef _MSC_VER\n            std::tm timeInfo = {};\n            gmtime_s(&timeInfo, &converted);\n#else\n            std::tm* timeInfo = std::gmtime(&converted);\n#endif\n\n            auto const timeStampSize = sizeof(\"2017-01-16T17:06:45Z\");\n            char timeStamp[timeStampSize];\n            const char * const fmt = \"%Y-%m-%dT%H:%M:%SZ\";\n\n#ifdef _MSC_VER\n            std::strftime(timeStamp, timeStampSize, fmt, &timeInfo);\n#else\n            std::strftime(timeStamp, timeStampSize, fmt, timeInfo);\n#endif\n            return std::string(timeStamp);\n        }\n    };\n}\n#endif // CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER\n\n#define INTERNAL_CATCH_REGISTER_ENUM( enumName, ... ) \\\nnamespace Catch { \\\n    template<> struct StringMaker<enumName> { \\\n        static std::string convert( enumName value ) { \\\n            static const auto& enumInfo = ::Catch::getMutableRegistryHub().getMutableEnumValuesRegistry().registerEnum( #enumName, #__VA_ARGS__, { __VA_ARGS__ } ); \\\n            return static_cast<std::string>(enumInfo.lookup( static_cast<int>( value ) )); \\\n        } \\\n    }; \\\n}\n\n#define CATCH_REGISTER_ENUM( enumName, ... ) INTERNAL_CATCH_REGISTER_ENUM( enumName, __VA_ARGS__ )\n\n#ifdef _MSC_VER\n#pragma warning(pop)\n#endif\n\n// end catch_tostring.h\n#include <iosfwd>\n\n#ifdef _MSC_VER\n#pragma warning(push)\n#pragma warning(disable:4389) // '==' : signed/unsigned mismatch\n#pragma warning(disable:4018) // more \"signed/unsigned mismatch\"\n#pragma warning(disable:4312) // Converting int to T* using reinterpret_cast (issue on x64 platform)\n#pragma warning(disable:4180) // qualifier applied to function type has no meaning\n#pragma warning(disable:4800) // Forcing result to true or false\n#endif\n\nnamespace Catch {\n\n    struct ITransientExpression {\n        auto isBinaryExpression() const -> bool { return m_isBinaryExpression; }\n        auto getResult() const -> bool { return m_result; }\n        virtual void streamReconstructedExpression( std::ostream &os ) const = 0;\n\n        ITransientExpression( bool isBinaryExpression, bool result )\n        :   m_isBinaryExpression( isBinaryExpression ),\n            m_result( result )\n        {}\n\n        // We don't actually need a virtual destructor, but many static analysers\n        // complain if it's not here :-(\n        virtual ~ITransientExpression();\n\n        bool m_isBinaryExpression;\n        bool m_result;\n\n    };\n\n    void formatReconstructedExpression( std::ostream &os, std::string const& lhs, StringRef op, std::string const& rhs );\n\n    template<typename LhsT, typename RhsT>\n    class BinaryExpr  : public ITransientExpression {\n        LhsT m_lhs;\n        StringRef m_op;\n        RhsT m_rhs;\n\n        void streamReconstructedExpression( std::ostream &os ) const override {\n            formatReconstructedExpression\n                    ( os, Catch::Detail::stringify( m_lhs ), m_op, Catch::Detail::stringify( m_rhs ) );\n        }\n\n    public:\n        BinaryExpr( bool comparisonResult, LhsT lhs, StringRef op, RhsT rhs )\n        :   ITransientExpression{ true, comparisonResult },\n            m_lhs( lhs ),\n            m_op( op ),\n            m_rhs( rhs )\n        {}\n\n        template<typename T>\n        auto operator && ( T ) const -> BinaryExpr<LhsT, RhsT const&> const {\n            static_assert(always_false<T>::value,\n            \"chained comparisons are not supported inside assertions, \"\n            \"wrap the expression inside parentheses, or decompose it\");\n        }\n\n        template<typename T>\n        auto operator || ( T ) const -> BinaryExpr<LhsT, RhsT const&> const {\n            static_assert(always_false<T>::value,\n            \"chained comparisons are not supported inside assertions, \"\n            \"wrap the expression inside parentheses, or decompose it\");\n        }\n\n        template<typename T>\n        auto operator == ( T ) const -> BinaryExpr<LhsT, RhsT const&> const {\n            static_assert(always_false<T>::value,\n            \"chained comparisons are not supported inside assertions, \"\n            \"wrap the expression inside parentheses, or decompose it\");\n        }\n\n        template<typename T>\n        auto operator != ( T ) const -> BinaryExpr<LhsT, RhsT const&> const {\n            static_assert(always_false<T>::value,\n            \"chained comparisons are not supported inside assertions, \"\n            \"wrap the expression inside parentheses, or decompose it\");\n        }\n\n        template<typename T>\n        auto operator > ( T ) const -> BinaryExpr<LhsT, RhsT const&> const {\n            static_assert(always_false<T>::value,\n            \"chained comparisons are not supported inside assertions, \"\n            \"wrap the expression inside parentheses, or decompose it\");\n        }\n\n        template<typename T>\n        auto operator < ( T ) const -> BinaryExpr<LhsT, RhsT const&> const {\n            static_assert(always_false<T>::value,\n            \"chained comparisons are not supported inside assertions, \"\n            \"wrap the expression inside parentheses, or decompose it\");\n        }\n\n        template<typename T>\n        auto operator >= ( T ) const -> BinaryExpr<LhsT, RhsT const&> const {\n            static_assert(always_false<T>::value,\n            \"chained comparisons are not supported inside assertions, \"\n            \"wrap the expression inside parentheses, or decompose it\");\n        }\n\n        template<typename T>\n        auto operator <= ( T ) const -> BinaryExpr<LhsT, RhsT const&> const {\n            static_assert(always_false<T>::value,\n            \"chained comparisons are not supported inside assertions, \"\n            \"wrap the expression inside parentheses, or decompose it\");\n        }\n    };\n\n    template<typename LhsT>\n    class UnaryExpr : public ITransientExpression {\n        LhsT m_lhs;\n\n        void streamReconstructedExpression( std::ostream &os ) const override {\n            os << Catch::Detail::stringify( m_lhs );\n        }\n\n    public:\n        explicit UnaryExpr( LhsT lhs )\n        :   ITransientExpression{ false, static_cast<bool>(lhs) },\n            m_lhs( lhs )\n        {}\n    };\n\n    // Specialised comparison functions to handle equality comparisons between ints and pointers (NULL deduces as an int)\n    template<typename LhsT, typename RhsT>\n    auto compareEqual( LhsT const& lhs, RhsT const& rhs ) -> bool { return static_cast<bool>(lhs == rhs); }\n    template<typename T>\n    auto compareEqual( T* const& lhs, int rhs ) -> bool { return lhs == reinterpret_cast<void const*>( rhs ); }\n    template<typename T>\n    auto compareEqual( T* const& lhs, long rhs ) -> bool { return lhs == reinterpret_cast<void const*>( rhs ); }\n    template<typename T>\n    auto compareEqual( int lhs, T* const& rhs ) -> bool { return reinterpret_cast<void const*>( lhs ) == rhs; }\n    template<typename T>\n    auto compareEqual( long lhs, T* const& rhs ) -> bool { return reinterpret_cast<void const*>( lhs ) == rhs; }\n\n    template<typename LhsT, typename RhsT>\n    auto compareNotEqual( LhsT const& lhs, RhsT&& rhs ) -> bool { return static_cast<bool>(lhs != rhs); }\n    template<typename T>\n    auto compareNotEqual( T* const& lhs, int rhs ) -> bool { return lhs != reinterpret_cast<void const*>( rhs ); }\n    template<typename T>\n    auto compareNotEqual( T* const& lhs, long rhs ) -> bool { return lhs != reinterpret_cast<void const*>( rhs ); }\n    template<typename T>\n    auto compareNotEqual( int lhs, T* const& rhs ) -> bool { return reinterpret_cast<void const*>( lhs ) != rhs; }\n    template<typename T>\n    auto compareNotEqual( long lhs, T* const& rhs ) -> bool { return reinterpret_cast<void const*>( lhs ) != rhs; }\n\n    template<typename LhsT>\n    class ExprLhs {\n        LhsT m_lhs;\n    public:\n        explicit ExprLhs( LhsT lhs ) : m_lhs( lhs ) {}\n\n        template<typename RhsT>\n        auto operator == ( RhsT const& rhs ) -> BinaryExpr<LhsT, RhsT const&> const {\n            return { compareEqual( m_lhs, rhs ), m_lhs, \"==\", rhs };\n        }\n        auto operator == ( bool rhs ) -> BinaryExpr<LhsT, bool> const {\n            return { m_lhs == rhs, m_lhs, \"==\", rhs };\n        }\n\n        template<typename RhsT>\n        auto operator != ( RhsT const& rhs ) -> BinaryExpr<LhsT, RhsT const&> const {\n            return { compareNotEqual( m_lhs, rhs ), m_lhs, \"!=\", rhs };\n        }\n        auto operator != ( bool rhs ) -> BinaryExpr<LhsT, bool> const {\n            return { m_lhs != rhs, m_lhs, \"!=\", rhs };\n        }\n\n        template<typename RhsT>\n        auto operator > ( RhsT const& rhs ) -> BinaryExpr<LhsT, RhsT const&> const {\n            return { static_cast<bool>(m_lhs > rhs), m_lhs, \">\", rhs };\n        }\n        template<typename RhsT>\n        auto operator < ( RhsT const& rhs ) -> BinaryExpr<LhsT, RhsT const&> const {\n            return { static_cast<bool>(m_lhs < rhs), m_lhs, \"<\", rhs };\n        }\n        template<typename RhsT>\n        auto operator >= ( RhsT const& rhs ) -> BinaryExpr<LhsT, RhsT const&> const {\n            return { static_cast<bool>(m_lhs >= rhs), m_lhs, \">=\", rhs };\n        }\n        template<typename RhsT>\n        auto operator <= ( RhsT const& rhs ) -> BinaryExpr<LhsT, RhsT const&> const {\n            return { static_cast<bool>(m_lhs <= rhs), m_lhs, \"<=\", rhs };\n        }\n        template <typename RhsT>\n        auto operator | (RhsT const& rhs) -> BinaryExpr<LhsT, RhsT const&> const {\n            return { static_cast<bool>(m_lhs | rhs), m_lhs, \"|\", rhs };\n        }\n        template <typename RhsT>\n        auto operator & (RhsT const& rhs) -> BinaryExpr<LhsT, RhsT const&> const {\n            return { static_cast<bool>(m_lhs & rhs), m_lhs, \"&\", rhs };\n        }\n        template <typename RhsT>\n        auto operator ^ (RhsT const& rhs) -> BinaryExpr<LhsT, RhsT const&> const {\n            return { static_cast<bool>(m_lhs ^ rhs), m_lhs, \"^\", rhs };\n        }\n\n        template<typename RhsT>\n        auto operator && ( RhsT const& ) -> BinaryExpr<LhsT, RhsT const&> const {\n            static_assert(always_false<RhsT>::value,\n            \"operator&& is not supported inside assertions, \"\n            \"wrap the expression inside parentheses, or decompose it\");\n        }\n\n        template<typename RhsT>\n        auto operator || ( RhsT const& ) -> BinaryExpr<LhsT, RhsT const&> const {\n            static_assert(always_false<RhsT>::value,\n            \"operator|| is not supported inside assertions, \"\n            \"wrap the expression inside parentheses, or decompose it\");\n        }\n\n        auto makeUnaryExpr() const -> UnaryExpr<LhsT> {\n            return UnaryExpr<LhsT>{ m_lhs };\n        }\n    };\n\n    void handleExpression( ITransientExpression const& expr );\n\n    template<typename T>\n    void handleExpression( ExprLhs<T> const& expr ) {\n        handleExpression( expr.makeUnaryExpr() );\n    }\n\n    struct Decomposer {\n        template<typename T>\n        auto operator <= ( T const& lhs ) -> ExprLhs<T const&> {\n            return ExprLhs<T const&>{ lhs };\n        }\n\n        auto operator <=( bool value ) -> ExprLhs<bool> {\n            return ExprLhs<bool>{ value };\n        }\n    };\n\n} // end namespace Catch\n\n#ifdef _MSC_VER\n#pragma warning(pop)\n#endif\n\n// end catch_decomposer.h\n// start catch_interfaces_capture.h\n\n#include <string>\n#include <chrono>\n\nnamespace Catch {\n\n    class AssertionResult;\n    struct AssertionInfo;\n    struct SectionInfo;\n    struct SectionEndInfo;\n    struct MessageInfo;\n    struct MessageBuilder;\n    struct Counts;\n    struct AssertionReaction;\n    struct SourceLineInfo;\n\n    struct ITransientExpression;\n    struct IGeneratorTracker;\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n    struct BenchmarkInfo;\n    template <typename Duration = std::chrono::duration<double, std::nano>>\n    struct BenchmarkStats;\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n\n    struct IResultCapture {\n\n        virtual ~IResultCapture();\n\n        virtual bool sectionStarted(    SectionInfo const& sectionInfo,\n                                        Counts& assertions ) = 0;\n        virtual void sectionEnded( SectionEndInfo const& endInfo ) = 0;\n        virtual void sectionEndedEarly( SectionEndInfo const& endInfo ) = 0;\n\n        virtual auto acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker& = 0;\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n        virtual void benchmarkPreparing( std::string const& name ) = 0;\n        virtual void benchmarkStarting( BenchmarkInfo const& info ) = 0;\n        virtual void benchmarkEnded( BenchmarkStats<> const& stats ) = 0;\n        virtual void benchmarkFailed( std::string const& error ) = 0;\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n\n        virtual void pushScopedMessage( MessageInfo const& message ) = 0;\n        virtual void popScopedMessage( MessageInfo const& message ) = 0;\n\n        virtual void emplaceUnscopedMessage( MessageBuilder const& builder ) = 0;\n\n        virtual void handleFatalErrorCondition( StringRef message ) = 0;\n\n        virtual void handleExpr\n                (   AssertionInfo const& info,\n                    ITransientExpression const& expr,\n                    AssertionReaction& reaction ) = 0;\n        virtual void handleMessage\n                (   AssertionInfo const& info,\n                    ResultWas::OfType resultType,\n                    StringRef const& message,\n                    AssertionReaction& reaction ) = 0;\n        virtual void handleUnexpectedExceptionNotThrown\n                (   AssertionInfo const& info,\n                    AssertionReaction& reaction ) = 0;\n        virtual void handleUnexpectedInflightException\n                (   AssertionInfo const& info,\n                    std::string const& message,\n                    AssertionReaction& reaction ) = 0;\n        virtual void handleIncomplete\n                (   AssertionInfo const& info ) = 0;\n        virtual void handleNonExpr\n                (   AssertionInfo const &info,\n                    ResultWas::OfType resultType,\n                    AssertionReaction &reaction ) = 0;\n\n        virtual bool lastAssertionPassed() = 0;\n        virtual void assertionPassed() = 0;\n\n        // Deprecated, do not use:\n        virtual std::string getCurrentTestName() const = 0;\n        virtual const AssertionResult* getLastResult() const = 0;\n        virtual void exceptionEarlyReported() = 0;\n    };\n\n    IResultCapture& getResultCapture();\n}\n\n// end catch_interfaces_capture.h\nnamespace Catch {\n\n    struct TestFailureException{};\n    struct AssertionResultData;\n    struct IResultCapture;\n    class RunContext;\n\n    class LazyExpression {\n        friend class AssertionHandler;\n        friend struct AssertionStats;\n        friend class RunContext;\n\n        ITransientExpression const* m_transientExpression = nullptr;\n        bool m_isNegated;\n    public:\n        LazyExpression( bool isNegated );\n        LazyExpression( LazyExpression const& other );\n        LazyExpression& operator = ( LazyExpression const& ) = delete;\n\n        explicit operator bool() const;\n\n        friend auto operator << ( std::ostream& os, LazyExpression const& lazyExpr ) -> std::ostream&;\n    };\n\n    struct AssertionReaction {\n        bool shouldDebugBreak = false;\n        bool shouldThrow = false;\n    };\n\n    class AssertionHandler {\n        AssertionInfo m_assertionInfo;\n        AssertionReaction m_reaction;\n        bool m_completed = false;\n        IResultCapture& m_resultCapture;\n\n    public:\n        AssertionHandler\n            (   StringRef const& macroName,\n                SourceLineInfo const& lineInfo,\n                StringRef capturedExpression,\n                ResultDisposition::Flags resultDisposition );\n        ~AssertionHandler() {\n            if ( !m_completed ) {\n                m_resultCapture.handleIncomplete( m_assertionInfo );\n            }\n        }\n\n        template<typename T>\n        void handleExpr( ExprLhs<T> const& expr ) {\n            handleExpr( expr.makeUnaryExpr() );\n        }\n        void handleExpr( ITransientExpression const& expr );\n\n        void handleMessage(ResultWas::OfType resultType, StringRef const& message);\n\n        void handleExceptionThrownAsExpected();\n        void handleUnexpectedExceptionNotThrown();\n        void handleExceptionNotThrownAsExpected();\n        void handleThrowingCallSkipped();\n        void handleUnexpectedInflightException();\n\n        void complete();\n        void setCompleted();\n\n        // query\n        auto allowThrows() const -> bool;\n    };\n\n    void handleExceptionMatchExpr( AssertionHandler& handler, std::string const& str, StringRef const& matcherString );\n\n} // namespace Catch\n\n// end catch_assertionhandler.h\n// start catch_message.h\n\n#include <string>\n#include <vector>\n\nnamespace Catch {\n\n    struct MessageInfo {\n        MessageInfo(    StringRef const& _macroName,\n                        SourceLineInfo const& _lineInfo,\n                        ResultWas::OfType _type );\n\n        StringRef macroName;\n        std::string message;\n        SourceLineInfo lineInfo;\n        ResultWas::OfType type;\n        unsigned int sequence;\n\n        bool operator == ( MessageInfo const& other ) const;\n        bool operator < ( MessageInfo const& other ) const;\n    private:\n        static unsigned int globalCount;\n    };\n\n    struct MessageStream {\n\n        template<typename T>\n        MessageStream& operator << ( T const& value ) {\n            m_stream << value;\n            return *this;\n        }\n\n        ReusableStringStream m_stream;\n    };\n\n    struct MessageBuilder : MessageStream {\n        MessageBuilder( StringRef const& macroName,\n                        SourceLineInfo const& lineInfo,\n                        ResultWas::OfType type );\n\n        template<typename T>\n        MessageBuilder& operator << ( T const& value ) {\n            m_stream << value;\n            return *this;\n        }\n\n        MessageInfo m_info;\n    };\n\n    class ScopedMessage {\n    public:\n        explicit ScopedMessage( MessageBuilder const& builder );\n        ScopedMessage( ScopedMessage& duplicate ) = delete;\n        ScopedMessage( ScopedMessage&& old );\n        ~ScopedMessage();\n\n        MessageInfo m_info;\n        bool m_moved;\n    };\n\n    class Capturer {\n        std::vector<MessageInfo> m_messages;\n        IResultCapture& m_resultCapture = getResultCapture();\n        size_t m_captured = 0;\n    public:\n        Capturer( StringRef macroName, SourceLineInfo const& lineInfo, ResultWas::OfType resultType, StringRef names );\n        ~Capturer();\n\n        void captureValue( size_t index, std::string const& value );\n\n        template<typename T>\n        void captureValues( size_t index, T const& value ) {\n            captureValue( index, Catch::Detail::stringify( value ) );\n        }\n\n        template<typename T, typename... Ts>\n        void captureValues( size_t index, T const& value, Ts const&... values ) {\n            captureValue( index, Catch::Detail::stringify(value) );\n            captureValues( index+1, values... );\n        }\n    };\n\n} // end namespace Catch\n\n// end catch_message.h\n#if !defined(CATCH_CONFIG_DISABLE)\n\n#if !defined(CATCH_CONFIG_DISABLE_STRINGIFICATION)\n  #define CATCH_INTERNAL_STRINGIFY(...) #__VA_ARGS__\n#else\n  #define CATCH_INTERNAL_STRINGIFY(...) \"Disabled by CATCH_CONFIG_DISABLE_STRINGIFICATION\"\n#endif\n\n#if defined(CATCH_CONFIG_FAST_COMPILE) || defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)\n\n///////////////////////////////////////////////////////////////////////////////\n// Another way to speed-up compilation is to omit local try-catch for REQUIRE*\n// macros.\n#define INTERNAL_CATCH_TRY\n#define INTERNAL_CATCH_CATCH( capturer )\n\n#else // CATCH_CONFIG_FAST_COMPILE\n\n#define INTERNAL_CATCH_TRY try\n#define INTERNAL_CATCH_CATCH( handler ) catch(...) { handler.handleUnexpectedInflightException(); }\n\n#endif\n\n#define INTERNAL_CATCH_REACT( handler ) handler.complete();\n\n///////////////////////////////////////////////////////////////////////////////\n#define INTERNAL_CATCH_TEST( macroName, resultDisposition, ... ) \\\n    do { \\\n        CATCH_INTERNAL_IGNORE_BUT_WARN(__VA_ARGS__); \\\n        Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__), resultDisposition ); \\\n        INTERNAL_CATCH_TRY { \\\n            CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \\\n            CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS \\\n            catchAssertionHandler.handleExpr( Catch::Decomposer() <= __VA_ARGS__ ); \\\n            CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \\\n        } INTERNAL_CATCH_CATCH( catchAssertionHandler ) \\\n        INTERNAL_CATCH_REACT( catchAssertionHandler ) \\\n    } while( (void)0, (false) && static_cast<bool>( !!(__VA_ARGS__) ) )\n\n///////////////////////////////////////////////////////////////////////////////\n#define INTERNAL_CATCH_IF( macroName, resultDisposition, ... ) \\\n    INTERNAL_CATCH_TEST( macroName, resultDisposition, __VA_ARGS__ ); \\\n    if( Catch::getResultCapture().lastAssertionPassed() )\n\n///////////////////////////////////////////////////////////////////////////////\n#define INTERNAL_CATCH_ELSE( macroName, resultDisposition, ... ) \\\n    INTERNAL_CATCH_TEST( macroName, resultDisposition, __VA_ARGS__ ); \\\n    if( !Catch::getResultCapture().lastAssertionPassed() )\n\n///////////////////////////////////////////////////////////////////////////////\n#define INTERNAL_CATCH_NO_THROW( macroName, resultDisposition, ... ) \\\n    do { \\\n        Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__), resultDisposition ); \\\n        try { \\\n            static_cast<void>(__VA_ARGS__); \\\n            catchAssertionHandler.handleExceptionNotThrownAsExpected(); \\\n        } \\\n        catch( ... ) { \\\n            catchAssertionHandler.handleUnexpectedInflightException(); \\\n        } \\\n        INTERNAL_CATCH_REACT( catchAssertionHandler ) \\\n    } while( false )\n\n///////////////////////////////////////////////////////////////////////////////\n#define INTERNAL_CATCH_THROWS( macroName, resultDisposition, ... ) \\\n    do { \\\n        Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__), resultDisposition); \\\n        if( catchAssertionHandler.allowThrows() ) \\\n            try { \\\n                static_cast<void>(__VA_ARGS__); \\\n                catchAssertionHandler.handleUnexpectedExceptionNotThrown(); \\\n            } \\\n            catch( ... ) { \\\n                catchAssertionHandler.handleExceptionThrownAsExpected(); \\\n            } \\\n        else \\\n            catchAssertionHandler.handleThrowingCallSkipped(); \\\n        INTERNAL_CATCH_REACT( catchAssertionHandler ) \\\n    } while( false )\n\n///////////////////////////////////////////////////////////////////////////////\n#define INTERNAL_CATCH_THROWS_AS( macroName, exceptionType, resultDisposition, expr ) \\\n    do { \\\n        Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(expr) \", \" CATCH_INTERNAL_STRINGIFY(exceptionType), resultDisposition ); \\\n        if( catchAssertionHandler.allowThrows() ) \\\n            try { \\\n                static_cast<void>(expr); \\\n                catchAssertionHandler.handleUnexpectedExceptionNotThrown(); \\\n            } \\\n            catch( exceptionType const& ) { \\\n                catchAssertionHandler.handleExceptionThrownAsExpected(); \\\n            } \\\n            catch( ... ) { \\\n                catchAssertionHandler.handleUnexpectedInflightException(); \\\n            } \\\n        else \\\n            catchAssertionHandler.handleThrowingCallSkipped(); \\\n        INTERNAL_CATCH_REACT( catchAssertionHandler ) \\\n    } while( false )\n\n///////////////////////////////////////////////////////////////////////////////\n#define INTERNAL_CATCH_MSG( macroName, messageType, resultDisposition, ... ) \\\n    do { \\\n        Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, Catch::StringRef(), resultDisposition ); \\\n        catchAssertionHandler.handleMessage( messageType, ( Catch::MessageStream() << __VA_ARGS__ + ::Catch::StreamEndStop() ).m_stream.str() ); \\\n        INTERNAL_CATCH_REACT( catchAssertionHandler ) \\\n    } while( false )\n\n///////////////////////////////////////////////////////////////////////////////\n#define INTERNAL_CATCH_CAPTURE( varName, macroName, ... ) \\\n    auto varName = Catch::Capturer( macroName, CATCH_INTERNAL_LINEINFO, Catch::ResultWas::Info, #__VA_ARGS__ ); \\\n    varName.captureValues( 0, __VA_ARGS__ )\n\n///////////////////////////////////////////////////////////////////////////////\n#define INTERNAL_CATCH_INFO( macroName, log ) \\\n    Catch::ScopedMessage INTERNAL_CATCH_UNIQUE_NAME( scopedMessage )( Catch::MessageBuilder( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, Catch::ResultWas::Info ) << log );\n\n///////////////////////////////////////////////////////////////////////////////\n#define INTERNAL_CATCH_UNSCOPED_INFO( macroName, log ) \\\n    Catch::getResultCapture().emplaceUnscopedMessage( Catch::MessageBuilder( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, Catch::ResultWas::Info ) << log )\n\n///////////////////////////////////////////////////////////////////////////////\n// Although this is matcher-based, it can be used with just a string\n#define INTERNAL_CATCH_THROWS_STR_MATCHES( macroName, resultDisposition, matcher, ... ) \\\n    do { \\\n        Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__) \", \" CATCH_INTERNAL_STRINGIFY(matcher), resultDisposition ); \\\n        if( catchAssertionHandler.allowThrows() ) \\\n            try { \\\n                static_cast<void>(__VA_ARGS__); \\\n                catchAssertionHandler.handleUnexpectedExceptionNotThrown(); \\\n            } \\\n            catch( ... ) { \\\n                Catch::handleExceptionMatchExpr( catchAssertionHandler, matcher, #matcher##_catch_sr ); \\\n            } \\\n        else \\\n            catchAssertionHandler.handleThrowingCallSkipped(); \\\n        INTERNAL_CATCH_REACT( catchAssertionHandler ) \\\n    } while( false )\n\n#endif // CATCH_CONFIG_DISABLE\n\n// end catch_capture.hpp\n// start catch_section.h\n\n// start catch_section_info.h\n\n// start catch_totals.h\n\n#include <cstddef>\n\nnamespace Catch {\n\n    struct Counts {\n        Counts operator - ( Counts const& other ) const;\n        Counts& operator += ( Counts const& other );\n\n        std::size_t total() const;\n        bool allPassed() const;\n        bool allOk() const;\n\n        std::size_t passed = 0;\n        std::size_t failed = 0;\n        std::size_t failedButOk = 0;\n    };\n\n    struct Totals {\n\n        Totals operator - ( Totals const& other ) const;\n        Totals& operator += ( Totals const& other );\n\n        Totals delta( Totals const& prevTotals ) const;\n\n        int error = 0;\n        Counts assertions;\n        Counts testCases;\n    };\n}\n\n// end catch_totals.h\n#include <string>\n\nnamespace Catch {\n\n    struct SectionInfo {\n        SectionInfo\n            (   SourceLineInfo const& _lineInfo,\n                std::string const& _name );\n\n        // Deprecated\n        SectionInfo\n            (   SourceLineInfo const& _lineInfo,\n                std::string const& _name,\n                std::string const& ) : SectionInfo( _lineInfo, _name ) {}\n\n        std::string name;\n        std::string description; // !Deprecated: this will always be empty\n        SourceLineInfo lineInfo;\n    };\n\n    struct SectionEndInfo {\n        SectionInfo sectionInfo;\n        Counts prevAssertions;\n        double durationInSeconds;\n    };\n\n} // end namespace Catch\n\n// end catch_section_info.h\n// start catch_timer.h\n\n#include <cstdint>\n\nnamespace Catch {\n\n    auto getCurrentNanosecondsSinceEpoch() -> uint64_t;\n    auto getEstimatedClockResolution() -> uint64_t;\n\n    class Timer {\n        uint64_t m_nanoseconds = 0;\n    public:\n        void start();\n        auto getElapsedNanoseconds() const -> uint64_t;\n        auto getElapsedMicroseconds() const -> uint64_t;\n        auto getElapsedMilliseconds() const -> unsigned int;\n        auto getElapsedSeconds() const -> double;\n    };\n\n} // namespace Catch\n\n// end catch_timer.h\n#include <string>\n\nnamespace Catch {\n\n    class Section : NonCopyable {\n    public:\n        Section( SectionInfo const& info );\n        ~Section();\n\n        // This indicates whether the section should be executed or not\n        explicit operator bool() const;\n\n    private:\n        SectionInfo m_info;\n\n        std::string m_name;\n        Counts m_assertions;\n        bool m_sectionIncluded;\n        Timer m_timer;\n    };\n\n} // end namespace Catch\n\n#define INTERNAL_CATCH_SECTION( ... ) \\\n    CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \\\n    CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS \\\n    if( Catch::Section const& INTERNAL_CATCH_UNIQUE_NAME( catch_internal_Section ) = Catch::SectionInfo( CATCH_INTERNAL_LINEINFO, __VA_ARGS__ ) ) \\\n    CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION\n\n#define INTERNAL_CATCH_DYNAMIC_SECTION( ... ) \\\n    CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \\\n    CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS \\\n    if( Catch::Section const& INTERNAL_CATCH_UNIQUE_NAME( catch_internal_Section ) = Catch::SectionInfo( CATCH_INTERNAL_LINEINFO, (Catch::ReusableStringStream() << __VA_ARGS__).str() ) ) \\\n    CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION\n\n// end catch_section.h\n// start catch_interfaces_exception.h\n\n// start catch_interfaces_registry_hub.h\n\n#include <string>\n#include <memory>\n\nnamespace Catch {\n\n    class TestCase;\n    struct ITestCaseRegistry;\n    struct IExceptionTranslatorRegistry;\n    struct IExceptionTranslator;\n    struct IReporterRegistry;\n    struct IReporterFactory;\n    struct ITagAliasRegistry;\n    struct IMutableEnumValuesRegistry;\n\n    class StartupExceptionRegistry;\n\n    using IReporterFactoryPtr = std::shared_ptr<IReporterFactory>;\n\n    struct IRegistryHub {\n        virtual ~IRegistryHub();\n\n        virtual IReporterRegistry const& getReporterRegistry() const = 0;\n        virtual ITestCaseRegistry const& getTestCaseRegistry() const = 0;\n        virtual ITagAliasRegistry const& getTagAliasRegistry() const = 0;\n        virtual IExceptionTranslatorRegistry const& getExceptionTranslatorRegistry() const = 0;\n\n        virtual StartupExceptionRegistry const& getStartupExceptionRegistry() const = 0;\n    };\n\n    struct IMutableRegistryHub {\n        virtual ~IMutableRegistryHub();\n        virtual void registerReporter( std::string const& name, IReporterFactoryPtr const& factory ) = 0;\n        virtual void registerListener( IReporterFactoryPtr const& factory ) = 0;\n        virtual void registerTest( TestCase const& testInfo ) = 0;\n        virtual void registerTranslator( const IExceptionTranslator* translator ) = 0;\n        virtual void registerTagAlias( std::string const& alias, std::string const& tag, SourceLineInfo const& lineInfo ) = 0;\n        virtual void registerStartupException() noexcept = 0;\n        virtual IMutableEnumValuesRegistry& getMutableEnumValuesRegistry() = 0;\n    };\n\n    IRegistryHub const& getRegistryHub();\n    IMutableRegistryHub& getMutableRegistryHub();\n    void cleanUp();\n    std::string translateActiveException();\n\n}\n\n// end catch_interfaces_registry_hub.h\n#if defined(CATCH_CONFIG_DISABLE)\n    #define INTERNAL_CATCH_TRANSLATE_EXCEPTION_NO_REG( translatorName, signature) \\\n        static std::string translatorName( signature )\n#endif\n\n#include <exception>\n#include <string>\n#include <vector>\n\nnamespace Catch {\n    using exceptionTranslateFunction = std::string(*)();\n\n    struct IExceptionTranslator;\n    using ExceptionTranslators = std::vector<std::unique_ptr<IExceptionTranslator const>>;\n\n    struct IExceptionTranslator {\n        virtual ~IExceptionTranslator();\n        virtual std::string translate( ExceptionTranslators::const_iterator it, ExceptionTranslators::const_iterator itEnd ) const = 0;\n    };\n\n    struct IExceptionTranslatorRegistry {\n        virtual ~IExceptionTranslatorRegistry();\n\n        virtual std::string translateActiveException() const = 0;\n    };\n\n    class ExceptionTranslatorRegistrar {\n        template<typename T>\n        class ExceptionTranslator : public IExceptionTranslator {\n        public:\n\n            ExceptionTranslator( std::string(*translateFunction)( T& ) )\n            : m_translateFunction( translateFunction )\n            {}\n\n            std::string translate( ExceptionTranslators::const_iterator it, ExceptionTranslators::const_iterator itEnd ) const override {\n#if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)\n                return \"\";\n#else\n                try {\n                    if( it == itEnd )\n                        std::rethrow_exception(std::current_exception());\n                    else\n                        return (*it)->translate( it+1, itEnd );\n                }\n                catch( T& ex ) {\n                    return m_translateFunction( ex );\n                }\n#endif\n            }\n\n        protected:\n            std::string(*m_translateFunction)( T& );\n        };\n\n    public:\n        template<typename T>\n        ExceptionTranslatorRegistrar( std::string(*translateFunction)( T& ) ) {\n            getMutableRegistryHub().registerTranslator\n                ( new ExceptionTranslator<T>( translateFunction ) );\n        }\n    };\n}\n\n///////////////////////////////////////////////////////////////////////////////\n#define INTERNAL_CATCH_TRANSLATE_EXCEPTION2( translatorName, signature ) \\\n    static std::string translatorName( signature ); \\\n    CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \\\n    CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \\\n    namespace{ Catch::ExceptionTranslatorRegistrar INTERNAL_CATCH_UNIQUE_NAME( catch_internal_ExceptionRegistrar )( &translatorName ); } \\\n    CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \\\n    static std::string translatorName( signature )\n\n#define INTERNAL_CATCH_TRANSLATE_EXCEPTION( signature ) INTERNAL_CATCH_TRANSLATE_EXCEPTION2( INTERNAL_CATCH_UNIQUE_NAME( catch_internal_ExceptionTranslator ), signature )\n\n// end catch_interfaces_exception.h\n// start catch_approx.h\n\n#include <type_traits>\n\nnamespace Catch {\nnamespace Detail {\n\n    class Approx {\n    private:\n        bool equalityComparisonImpl(double other) const;\n        // Validates the new margin (margin >= 0)\n        // out-of-line to avoid including stdexcept in the header\n        void setMargin(double margin);\n        // Validates the new epsilon (0 < epsilon < 1)\n        // out-of-line to avoid including stdexcept in the header\n        void setEpsilon(double epsilon);\n\n    public:\n        explicit Approx ( double value );\n\n        static Approx custom();\n\n        Approx operator-() const;\n\n        template <typename T, typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n        Approx operator()( T const& value ) const {\n            Approx approx( static_cast<double>(value) );\n            approx.m_epsilon = m_epsilon;\n            approx.m_margin = m_margin;\n            approx.m_scale = m_scale;\n            return approx;\n        }\n\n        template <typename T, typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n        explicit Approx( T const& value ): Approx(static_cast<double>(value))\n        {}\n\n        template <typename T, typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n        friend bool operator == ( const T& lhs, Approx const& rhs ) {\n            auto lhs_v = static_cast<double>(lhs);\n            return rhs.equalityComparisonImpl(lhs_v);\n        }\n\n        template <typename T, typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n        friend bool operator == ( Approx const& lhs, const T& rhs ) {\n            return operator==( rhs, lhs );\n        }\n\n        template <typename T, typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n        friend bool operator != ( T const& lhs, Approx const& rhs ) {\n            return !operator==( lhs, rhs );\n        }\n\n        template <typename T, typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n        friend bool operator != ( Approx const& lhs, T const& rhs ) {\n            return !operator==( rhs, lhs );\n        }\n\n        template <typename T, typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n        friend bool operator <= ( T const& lhs, Approx const& rhs ) {\n            return static_cast<double>(lhs) < rhs.m_value || lhs == rhs;\n        }\n\n        template <typename T, typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n        friend bool operator <= ( Approx const& lhs, T const& rhs ) {\n            return lhs.m_value < static_cast<double>(rhs) || lhs == rhs;\n        }\n\n        template <typename T, typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n        friend bool operator >= ( T const& lhs, Approx const& rhs ) {\n            return static_cast<double>(lhs) > rhs.m_value || lhs == rhs;\n        }\n\n        template <typename T, typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n        friend bool operator >= ( Approx const& lhs, T const& rhs ) {\n            return lhs.m_value > static_cast<double>(rhs) || lhs == rhs;\n        }\n\n        template <typename T, typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n        Approx& epsilon( T const& newEpsilon ) {\n            double epsilonAsDouble = static_cast<double>(newEpsilon);\n            setEpsilon(epsilonAsDouble);\n            return *this;\n        }\n\n        template <typename T, typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n        Approx& margin( T const& newMargin ) {\n            double marginAsDouble = static_cast<double>(newMargin);\n            setMargin(marginAsDouble);\n            return *this;\n        }\n\n        template <typename T, typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n        Approx& scale( T const& newScale ) {\n            m_scale = static_cast<double>(newScale);\n            return *this;\n        }\n\n        std::string toString() const;\n\n    private:\n        double m_epsilon;\n        double m_margin;\n        double m_scale;\n        double m_value;\n    };\n} // end namespace Detail\n\nnamespace literals {\n    Detail::Approx operator \"\" _a(long double val);\n    Detail::Approx operator \"\" _a(unsigned long long val);\n} // end namespace literals\n\ntemplate<>\nstruct StringMaker<Catch::Detail::Approx> {\n    static std::string convert(Catch::Detail::Approx const& value);\n};\n\n} // end namespace Catch\n\n// end catch_approx.h\n// start catch_string_manip.h\n\n#include <string>\n#include <iosfwd>\n#include <vector>\n\nnamespace Catch {\n\n    bool startsWith( std::string const& s, std::string const& prefix );\n    bool startsWith( std::string const& s, char prefix );\n    bool endsWith( std::string const& s, std::string const& suffix );\n    bool endsWith( std::string const& s, char suffix );\n    bool contains( std::string const& s, std::string const& infix );\n    void toLowerInPlace( std::string& s );\n    std::string toLower( std::string const& s );\n    //! Returns a new string without whitespace at the start/end\n    std::string trim( std::string const& str );\n    //! Returns a substring of the original ref without whitespace. Beware lifetimes!\n    StringRef trim(StringRef ref);\n\n    // !!! Be aware, returns refs into original string - make sure original string outlives them\n    std::vector<StringRef> splitStringRef( StringRef str, char delimiter );\n    bool replaceInPlace( std::string& str, std::string const& replaceThis, std::string const& withThis );\n\n    struct pluralise {\n        pluralise( std::size_t count, std::string const& label );\n\n        friend std::ostream& operator << ( std::ostream& os, pluralise const& pluraliser );\n\n        std::size_t m_count;\n        std::string m_label;\n    };\n}\n\n// end catch_string_manip.h\n#ifndef CATCH_CONFIG_DISABLE_MATCHERS\n// start catch_capture_matchers.h\n\n// start catch_matchers.h\n\n#include <string>\n#include <vector>\n\nnamespace Catch {\nnamespace Matchers {\n    namespace Impl {\n\n        template<typename ArgT> struct MatchAllOf;\n        template<typename ArgT> struct MatchAnyOf;\n        template<typename ArgT> struct MatchNotOf;\n\n        class MatcherUntypedBase {\n        public:\n            MatcherUntypedBase() = default;\n            MatcherUntypedBase ( MatcherUntypedBase const& ) = default;\n            MatcherUntypedBase& operator = ( MatcherUntypedBase const& ) = delete;\n            std::string toString() const;\n\n        protected:\n            virtual ~MatcherUntypedBase();\n            virtual std::string describe() const = 0;\n            mutable std::string m_cachedToString;\n        };\n\n#ifdef __clang__\n#    pragma clang diagnostic push\n#    pragma clang diagnostic ignored \"-Wnon-virtual-dtor\"\n#endif\n\n        template<typename ObjectT>\n        struct MatcherMethod {\n            virtual bool match( ObjectT const& arg ) const = 0;\n        };\n\n#if defined(__OBJC__)\n        // Hack to fix Catch GH issue #1661. Could use id for generic Object support.\n        // use of const for Object pointers is very uncommon and under ARC it causes some kind of signature mismatch that breaks compilation\n        template<>\n        struct MatcherMethod<NSString*> {\n            virtual bool match( NSString* arg ) const = 0;\n        };\n#endif\n\n#ifdef __clang__\n#    pragma clang diagnostic pop\n#endif\n\n        template<typename T>\n        struct MatcherBase : MatcherUntypedBase, MatcherMethod<T> {\n\n            MatchAllOf<T> operator && ( MatcherBase const& other ) const;\n            MatchAnyOf<T> operator || ( MatcherBase const& other ) const;\n            MatchNotOf<T> operator ! () const;\n        };\n\n        template<typename ArgT>\n        struct MatchAllOf : MatcherBase<ArgT> {\n            bool match( ArgT const& arg ) const override {\n                for( auto matcher : m_matchers ) {\n                    if (!matcher->match(arg))\n                        return false;\n                }\n                return true;\n            }\n            std::string describe() const override {\n                std::string description;\n                description.reserve( 4 + m_matchers.size()*32 );\n                description += \"( \";\n                bool first = true;\n                for( auto matcher : m_matchers ) {\n                    if( first )\n                        first = false;\n                    else\n                        description += \" and \";\n                    description += matcher->toString();\n                }\n                description += \" )\";\n                return description;\n            }\n\n            MatchAllOf<ArgT> operator && ( MatcherBase<ArgT> const& other ) {\n                auto copy(*this);\n                copy.m_matchers.push_back( &other );\n                return copy;\n            }\n\n            std::vector<MatcherBase<ArgT> const*> m_matchers;\n        };\n        template<typename ArgT>\n        struct MatchAnyOf : MatcherBase<ArgT> {\n\n            bool match( ArgT const& arg ) const override {\n                for( auto matcher : m_matchers ) {\n                    if (matcher->match(arg))\n                        return true;\n                }\n                return false;\n            }\n            std::string describe() const override {\n                std::string description;\n                description.reserve( 4 + m_matchers.size()*32 );\n                description += \"( \";\n                bool first = true;\n                for( auto matcher : m_matchers ) {\n                    if( first )\n                        first = false;\n                    else\n                        description += \" or \";\n                    description += matcher->toString();\n                }\n                description += \" )\";\n                return description;\n            }\n\n            MatchAnyOf<ArgT> operator || ( MatcherBase<ArgT> const& other ) {\n                auto copy(*this);\n                copy.m_matchers.push_back( &other );\n                return copy;\n            }\n\n            std::vector<MatcherBase<ArgT> const*> m_matchers;\n        };\n\n        template<typename ArgT>\n        struct MatchNotOf : MatcherBase<ArgT> {\n\n            MatchNotOf( MatcherBase<ArgT> const& underlyingMatcher ) : m_underlyingMatcher( underlyingMatcher ) {}\n\n            bool match( ArgT const& arg ) const override {\n                return !m_underlyingMatcher.match( arg );\n            }\n\n            std::string describe() const override {\n                return \"not \" + m_underlyingMatcher.toString();\n            }\n            MatcherBase<ArgT> const& m_underlyingMatcher;\n        };\n\n        template<typename T>\n        MatchAllOf<T> MatcherBase<T>::operator && ( MatcherBase const& other ) const {\n            return MatchAllOf<T>() && *this && other;\n        }\n        template<typename T>\n        MatchAnyOf<T> MatcherBase<T>::operator || ( MatcherBase const& other ) const {\n            return MatchAnyOf<T>() || *this || other;\n        }\n        template<typename T>\n        MatchNotOf<T> MatcherBase<T>::operator ! () const {\n            return MatchNotOf<T>( *this );\n        }\n\n    } // namespace Impl\n\n} // namespace Matchers\n\nusing namespace Matchers;\nusing Matchers::Impl::MatcherBase;\n\n} // namespace Catch\n\n// end catch_matchers.h\n// start catch_matchers_exception.hpp\n\nnamespace Catch {\nnamespace Matchers {\nnamespace Exception {\n\nclass ExceptionMessageMatcher : public MatcherBase<std::exception> {\n    std::string m_message;\npublic:\n\n    ExceptionMessageMatcher(std::string const& message):\n        m_message(message)\n    {}\n\n    bool match(std::exception const& ex) const override;\n\n    std::string describe() const override;\n};\n\n} // namespace Exception\n\nException::ExceptionMessageMatcher Message(std::string const& message);\n\n} // namespace Matchers\n} // namespace Catch\n\n// end catch_matchers_exception.hpp\n// start catch_matchers_floating.h\n\nnamespace Catch {\nnamespace Matchers {\n\n    namespace Floating {\n\n        enum class FloatingPointKind : uint8_t;\n\n        struct WithinAbsMatcher : MatcherBase<double> {\n            WithinAbsMatcher(double target, double margin);\n            bool match(double const& matchee) const override;\n            std::string describe() const override;\n        private:\n            double m_target;\n            double m_margin;\n        };\n\n        struct WithinUlpsMatcher : MatcherBase<double> {\n            WithinUlpsMatcher(double target, uint64_t ulps, FloatingPointKind baseType);\n            bool match(double const& matchee) const override;\n            std::string describe() const override;\n        private:\n            double m_target;\n            uint64_t m_ulps;\n            FloatingPointKind m_type;\n        };\n\n        // Given IEEE-754 format for floats and doubles, we can assume\n        // that float -> double promotion is lossless. Given this, we can\n        // assume that if we do the standard relative comparison of\n        // |lhs - rhs| <= epsilon * max(fabs(lhs), fabs(rhs)), then we get\n        // the same result if we do this for floats, as if we do this for\n        // doubles that were promoted from floats.\n        struct WithinRelMatcher : MatcherBase<double> {\n            WithinRelMatcher(double target, double epsilon);\n            bool match(double const& matchee) const override;\n            std::string describe() const override;\n        private:\n            double m_target;\n            double m_epsilon;\n        };\n\n    } // namespace Floating\n\n    // The following functions create the actual matcher objects.\n    // This allows the types to be inferred\n    Floating::WithinUlpsMatcher WithinULP(double target, uint64_t maxUlpDiff);\n    Floating::WithinUlpsMatcher WithinULP(float target, uint64_t maxUlpDiff);\n    Floating::WithinAbsMatcher WithinAbs(double target, double margin);\n    Floating::WithinRelMatcher WithinRel(double target, double eps);\n    // defaults epsilon to 100*numeric_limits<double>::epsilon()\n    Floating::WithinRelMatcher WithinRel(double target);\n    Floating::WithinRelMatcher WithinRel(float target, float eps);\n    // defaults epsilon to 100*numeric_limits<float>::epsilon()\n    Floating::WithinRelMatcher WithinRel(float target);\n\n} // namespace Matchers\n} // namespace Catch\n\n// end catch_matchers_floating.h\n// start catch_matchers_generic.hpp\n\n#include <functional>\n#include <string>\n\nnamespace Catch {\nnamespace Matchers {\nnamespace Generic {\n\nnamespace Detail {\n    std::string finalizeDescription(const std::string& desc);\n}\n\ntemplate <typename T>\nclass PredicateMatcher : public MatcherBase<T> {\n    std::function<bool(T const&)> m_predicate;\n    std::string m_description;\npublic:\n\n    PredicateMatcher(std::function<bool(T const&)> const& elem, std::string const& descr)\n        :m_predicate(std::move(elem)),\n        m_description(Detail::finalizeDescription(descr))\n    {}\n\n    bool match( T const& item ) const override {\n        return m_predicate(item);\n    }\n\n    std::string describe() const override {\n        return m_description;\n    }\n};\n\n} // namespace Generic\n\n    // The following functions create the actual matcher objects.\n    // The user has to explicitly specify type to the function, because\n    // inferring std::function<bool(T const&)> is hard (but possible) and\n    // requires a lot of TMP.\n    template<typename T>\n    Generic::PredicateMatcher<T> Predicate(std::function<bool(T const&)> const& predicate, std::string const& description = \"\") {\n        return Generic::PredicateMatcher<T>(predicate, description);\n    }\n\n} // namespace Matchers\n} // namespace Catch\n\n// end catch_matchers_generic.hpp\n// start catch_matchers_string.h\n\n#include <string>\n\nnamespace Catch {\nnamespace Matchers {\n\n    namespace StdString {\n\n        struct CasedString\n        {\n            CasedString( std::string const& str, CaseSensitive::Choice caseSensitivity );\n            std::string adjustString( std::string const& str ) const;\n            std::string caseSensitivitySuffix() const;\n\n            CaseSensitive::Choice m_caseSensitivity;\n            std::string m_str;\n        };\n\n        struct StringMatcherBase : MatcherBase<std::string> {\n            StringMatcherBase( std::string const& operation, CasedString const& comparator );\n            std::string describe() const override;\n\n            CasedString m_comparator;\n            std::string m_operation;\n        };\n\n        struct EqualsMatcher : StringMatcherBase {\n            EqualsMatcher( CasedString const& comparator );\n            bool match( std::string const& source ) const override;\n        };\n        struct ContainsMatcher : StringMatcherBase {\n            ContainsMatcher( CasedString const& comparator );\n            bool match( std::string const& source ) const override;\n        };\n        struct StartsWithMatcher : StringMatcherBase {\n            StartsWithMatcher( CasedString const& comparator );\n            bool match( std::string const& source ) const override;\n        };\n        struct EndsWithMatcher : StringMatcherBase {\n            EndsWithMatcher( CasedString const& comparator );\n            bool match( std::string const& source ) const override;\n        };\n\n        struct RegexMatcher : MatcherBase<std::string> {\n            RegexMatcher( std::string regex, CaseSensitive::Choice caseSensitivity );\n            bool match( std::string const& matchee ) const override;\n            std::string describe() const override;\n\n        private:\n            std::string m_regex;\n            CaseSensitive::Choice m_caseSensitivity;\n        };\n\n    } // namespace StdString\n\n    // The following functions create the actual matcher objects.\n    // This allows the types to be inferred\n\n    StdString::EqualsMatcher Equals( std::string const& str, CaseSensitive::Choice caseSensitivity = CaseSensitive::Yes );\n    StdString::ContainsMatcher Contains( std::string const& str, CaseSensitive::Choice caseSensitivity = CaseSensitive::Yes );\n    StdString::EndsWithMatcher EndsWith( std::string const& str, CaseSensitive::Choice caseSensitivity = CaseSensitive::Yes );\n    StdString::StartsWithMatcher StartsWith( std::string const& str, CaseSensitive::Choice caseSensitivity = CaseSensitive::Yes );\n    StdString::RegexMatcher Matches( std::string const& regex, CaseSensitive::Choice caseSensitivity = CaseSensitive::Yes );\n\n} // namespace Matchers\n} // namespace Catch\n\n// end catch_matchers_string.h\n// start catch_matchers_vector.h\n\n#include <algorithm>\n\nnamespace Catch {\nnamespace Matchers {\n\n    namespace Vector {\n        template<typename T, typename Alloc>\n        struct ContainsElementMatcher : MatcherBase<std::vector<T, Alloc>> {\n\n            ContainsElementMatcher(T const &comparator) : m_comparator( comparator) {}\n\n            bool match(std::vector<T, Alloc> const &v) const override {\n                for (auto const& el : v) {\n                    if (el == m_comparator) {\n                        return true;\n                    }\n                }\n                return false;\n            }\n\n            std::string describe() const override {\n                return \"Contains: \" + ::Catch::Detail::stringify( m_comparator );\n            }\n\n            T const& m_comparator;\n        };\n\n        template<typename T, typename AllocComp, typename AllocMatch>\n        struct ContainsMatcher : MatcherBase<std::vector<T, AllocMatch>> {\n\n            ContainsMatcher(std::vector<T, AllocComp> const &comparator) : m_comparator( comparator ) {}\n\n            bool match(std::vector<T, AllocMatch> const &v) const override {\n                // !TBD: see note in EqualsMatcher\n                if (m_comparator.size() > v.size())\n                    return false;\n                for (auto const& comparator : m_comparator) {\n                    auto present = false;\n                    for (const auto& el : v) {\n                        if (el == comparator) {\n                            present = true;\n                            break;\n                        }\n                    }\n                    if (!present) {\n                        return false;\n                    }\n                }\n                return true;\n            }\n            std::string describe() const override {\n                return \"Contains: \" + ::Catch::Detail::stringify( m_comparator );\n            }\n\n            std::vector<T, AllocComp> const& m_comparator;\n        };\n\n        template<typename T, typename AllocComp, typename AllocMatch>\n        struct EqualsMatcher : MatcherBase<std::vector<T, AllocMatch>> {\n\n            EqualsMatcher(std::vector<T, AllocComp> const &comparator) : m_comparator( comparator ) {}\n\n            bool match(std::vector<T, AllocMatch> const &v) const override {\n                // !TBD: This currently works if all elements can be compared using !=\n                // - a more general approach would be via a compare template that defaults\n                // to using !=. but could be specialised for, e.g. std::vector<T, Alloc> etc\n                // - then just call that directly\n                if (m_comparator.size() != v.size())\n                    return false;\n                for (std::size_t i = 0; i < v.size(); ++i)\n                    if (m_comparator[i] != v[i])\n                        return false;\n                return true;\n            }\n            std::string describe() const override {\n                return \"Equals: \" + ::Catch::Detail::stringify( m_comparator );\n            }\n            std::vector<T, AllocComp> const& m_comparator;\n        };\n\n        template<typename T, typename AllocComp, typename AllocMatch>\n        struct ApproxMatcher : MatcherBase<std::vector<T, AllocMatch>> {\n\n            ApproxMatcher(std::vector<T, AllocComp> const& comparator) : m_comparator( comparator ) {}\n\n            bool match(std::vector<T, AllocMatch> const &v) const override {\n                if (m_comparator.size() != v.size())\n                    return false;\n                for (std::size_t i = 0; i < v.size(); ++i)\n                    if (m_comparator[i] != approx(v[i]))\n                        return false;\n                return true;\n            }\n            std::string describe() const override {\n                return \"is approx: \" + ::Catch::Detail::stringify( m_comparator );\n            }\n            template <typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n            ApproxMatcher& epsilon( T const& newEpsilon ) {\n                approx.epsilon(newEpsilon);\n                return *this;\n            }\n            template <typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n            ApproxMatcher& margin( T const& newMargin ) {\n                approx.margin(newMargin);\n                return *this;\n            }\n            template <typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n            ApproxMatcher& scale( T const& newScale ) {\n                approx.scale(newScale);\n                return *this;\n            }\n\n            std::vector<T, AllocComp> const& m_comparator;\n            mutable Catch::Detail::Approx approx = Catch::Detail::Approx::custom();\n        };\n\n        template<typename T, typename AllocComp, typename AllocMatch>\n        struct UnorderedEqualsMatcher : MatcherBase<std::vector<T, AllocMatch>> {\n            UnorderedEqualsMatcher(std::vector<T, AllocComp> const& target) : m_target(target) {}\n            bool match(std::vector<T, AllocMatch> const& vec) const override {\n                if (m_target.size() != vec.size()) {\n                    return false;\n                }\n                return std::is_permutation(m_target.begin(), m_target.end(), vec.begin());\n            }\n\n            std::string describe() const override {\n                return \"UnorderedEquals: \" + ::Catch::Detail::stringify(m_target);\n            }\n        private:\n            std::vector<T, AllocComp> const& m_target;\n        };\n\n    } // namespace Vector\n\n    // The following functions create the actual matcher objects.\n    // This allows the types to be inferred\n\n    template<typename T, typename AllocComp = std::allocator<T>, typename AllocMatch = AllocComp>\n    Vector::ContainsMatcher<T, AllocComp, AllocMatch> Contains( std::vector<T, AllocComp> const& comparator ) {\n        return Vector::ContainsMatcher<T, AllocComp, AllocMatch>( comparator );\n    }\n\n    template<typename T, typename Alloc = std::allocator<T>>\n    Vector::ContainsElementMatcher<T, Alloc> VectorContains( T const& comparator ) {\n        return Vector::ContainsElementMatcher<T, Alloc>( comparator );\n    }\n\n    template<typename T, typename AllocComp = std::allocator<T>, typename AllocMatch = AllocComp>\n    Vector::EqualsMatcher<T, AllocComp, AllocMatch> Equals( std::vector<T, AllocComp> const& comparator ) {\n        return Vector::EqualsMatcher<T, AllocComp, AllocMatch>( comparator );\n    }\n\n    template<typename T, typename AllocComp = std::allocator<T>, typename AllocMatch = AllocComp>\n    Vector::ApproxMatcher<T, AllocComp, AllocMatch> Approx( std::vector<T, AllocComp> const& comparator ) {\n        return Vector::ApproxMatcher<T, AllocComp, AllocMatch>( comparator );\n    }\n\n    template<typename T, typename AllocComp = std::allocator<T>, typename AllocMatch = AllocComp>\n    Vector::UnorderedEqualsMatcher<T, AllocComp, AllocMatch> UnorderedEquals(std::vector<T, AllocComp> const& target) {\n        return Vector::UnorderedEqualsMatcher<T, AllocComp, AllocMatch>( target );\n    }\n\n} // namespace Matchers\n} // namespace Catch\n\n// end catch_matchers_vector.h\nnamespace Catch {\n\n    template<typename ArgT, typename MatcherT>\n    class MatchExpr : public ITransientExpression {\n        ArgT const& m_arg;\n        MatcherT m_matcher;\n        StringRef m_matcherString;\n    public:\n        MatchExpr( ArgT const& arg, MatcherT const& matcher, StringRef const& matcherString )\n        :   ITransientExpression{ true, matcher.match( arg ) },\n            m_arg( arg ),\n            m_matcher( matcher ),\n            m_matcherString( matcherString )\n        {}\n\n        void streamReconstructedExpression( std::ostream &os ) const override {\n            auto matcherAsString = m_matcher.toString();\n            os << Catch::Detail::stringify( m_arg ) << ' ';\n            if( matcherAsString == Detail::unprintableString )\n                os << m_matcherString;\n            else\n                os << matcherAsString;\n        }\n    };\n\n    using StringMatcher = Matchers::Impl::MatcherBase<std::string>;\n\n    void handleExceptionMatchExpr( AssertionHandler& handler, StringMatcher const& matcher, StringRef const& matcherString  );\n\n    template<typename ArgT, typename MatcherT>\n    auto makeMatchExpr( ArgT const& arg, MatcherT const& matcher, StringRef const& matcherString  ) -> MatchExpr<ArgT, MatcherT> {\n        return MatchExpr<ArgT, MatcherT>( arg, matcher, matcherString );\n    }\n\n} // namespace Catch\n\n///////////////////////////////////////////////////////////////////////////////\n#define INTERNAL_CHECK_THAT( macroName, matcher, resultDisposition, arg ) \\\n    do { \\\n        Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(arg) \", \" CATCH_INTERNAL_STRINGIFY(matcher), resultDisposition ); \\\n        INTERNAL_CATCH_TRY { \\\n            catchAssertionHandler.handleExpr( Catch::makeMatchExpr( arg, matcher, #matcher##_catch_sr ) ); \\\n        } INTERNAL_CATCH_CATCH( catchAssertionHandler ) \\\n        INTERNAL_CATCH_REACT( catchAssertionHandler ) \\\n    } while( false )\n\n///////////////////////////////////////////////////////////////////////////////\n#define INTERNAL_CATCH_THROWS_MATCHES( macroName, exceptionType, resultDisposition, matcher, ... ) \\\n    do { \\\n        Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__) \", \" CATCH_INTERNAL_STRINGIFY(exceptionType) \", \" CATCH_INTERNAL_STRINGIFY(matcher), resultDisposition ); \\\n        if( catchAssertionHandler.allowThrows() ) \\\n            try { \\\n                static_cast<void>(__VA_ARGS__ ); \\\n                catchAssertionHandler.handleUnexpectedExceptionNotThrown(); \\\n            } \\\n            catch( exceptionType const& ex ) { \\\n                catchAssertionHandler.handleExpr( Catch::makeMatchExpr( ex, matcher, #matcher##_catch_sr ) ); \\\n            } \\\n            catch( ... ) { \\\n                catchAssertionHandler.handleUnexpectedInflightException(); \\\n            } \\\n        else \\\n            catchAssertionHandler.handleThrowingCallSkipped(); \\\n        INTERNAL_CATCH_REACT( catchAssertionHandler ) \\\n    } while( false )\n\n// end catch_capture_matchers.h\n#endif\n// start catch_generators.hpp\n\n// start catch_interfaces_generatortracker.h\n\n\n#include <memory>\n\nnamespace Catch {\n\n    namespace Generators {\n        class GeneratorUntypedBase {\n        public:\n            GeneratorUntypedBase() = default;\n            virtual ~GeneratorUntypedBase();\n            // Attempts to move the generator to the next element\n             //\n             // Returns true iff the move succeeded (and a valid element\n             // can be retrieved).\n            virtual bool next() = 0;\n        };\n        using GeneratorBasePtr = std::unique_ptr<GeneratorUntypedBase>;\n\n    } // namespace Generators\n\n    struct IGeneratorTracker {\n        virtual ~IGeneratorTracker();\n        virtual auto hasGenerator() const -> bool = 0;\n        virtual auto getGenerator() const -> Generators::GeneratorBasePtr const& = 0;\n        virtual void setGenerator( Generators::GeneratorBasePtr&& generator ) = 0;\n    };\n\n} // namespace Catch\n\n// end catch_interfaces_generatortracker.h\n// start catch_enforce.h\n\n#include <exception>\n\nnamespace Catch {\n#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)\n    template <typename Ex>\n    [[noreturn]]\n    void throw_exception(Ex const& e) {\n        throw e;\n    }\n#else // ^^ Exceptions are enabled //  Exceptions are disabled vv\n    [[noreturn]]\n    void throw_exception(std::exception const& e);\n#endif\n\n    [[noreturn]]\n    void throw_logic_error(std::string const& msg);\n    [[noreturn]]\n    void throw_domain_error(std::string const& msg);\n    [[noreturn]]\n    void throw_runtime_error(std::string const& msg);\n\n} // namespace Catch;\n\n#define CATCH_MAKE_MSG(...) \\\n    (Catch::ReusableStringStream() << __VA_ARGS__).str()\n\n#define CATCH_INTERNAL_ERROR(...) \\\n    Catch::throw_logic_error(CATCH_MAKE_MSG( CATCH_INTERNAL_LINEINFO << \": Internal Catch2 error: \" << __VA_ARGS__))\n\n#define CATCH_ERROR(...) \\\n    Catch::throw_domain_error(CATCH_MAKE_MSG( __VA_ARGS__ ))\n\n#define CATCH_RUNTIME_ERROR(...) \\\n    Catch::throw_runtime_error(CATCH_MAKE_MSG( __VA_ARGS__ ))\n\n#define CATCH_ENFORCE( condition, ... ) \\\n    do{ if( !(condition) ) CATCH_ERROR( __VA_ARGS__ ); } while(false)\n\n// end catch_enforce.h\n#include <memory>\n#include <vector>\n#include <cassert>\n\n#include <utility>\n#include <exception>\n\nnamespace Catch {\n\nclass GeneratorException : public std::exception {\n    const char* const m_msg = \"\";\n\npublic:\n    GeneratorException(const char* msg):\n        m_msg(msg)\n    {}\n\n    const char* what() const noexcept override final;\n};\n\nnamespace Generators {\n\n    // !TBD move this into its own location?\n    namespace pf{\n        template<typename T, typename... Args>\n        std::unique_ptr<T> make_unique( Args&&... args ) {\n            return std::unique_ptr<T>(new T(std::forward<Args>(args)...));\n        }\n    }\n\n    template<typename T>\n    struct IGenerator : GeneratorUntypedBase {\n        virtual ~IGenerator() = default;\n\n        // Returns the current element of the generator\n        //\n        // \\Precondition The generator is either freshly constructed,\n        // or the last call to `next()` returned true\n        virtual T const& get() const = 0;\n        using type = T;\n    };\n\n    template<typename T>\n    class SingleValueGenerator final : public IGenerator<T> {\n        T m_value;\n    public:\n        SingleValueGenerator(T&& value) : m_value(std::move(value)) {}\n\n        T const& get() const override {\n            return m_value;\n        }\n        bool next() override {\n            return false;\n        }\n    };\n\n    template<typename T>\n    class FixedValuesGenerator final : public IGenerator<T> {\n        static_assert(!std::is_same<T, bool>::value,\n            \"FixedValuesGenerator does not support bools because of std::vector<bool>\"\n            \"specialization, use SingleValue Generator instead.\");\n        std::vector<T> m_values;\n        size_t m_idx = 0;\n    public:\n        FixedValuesGenerator( std::initializer_list<T> values ) : m_values( values ) {}\n\n        T const& get() const override {\n            return m_values[m_idx];\n        }\n        bool next() override {\n            ++m_idx;\n            return m_idx < m_values.size();\n        }\n    };\n\n    template <typename T>\n    class GeneratorWrapper final {\n        std::unique_ptr<IGenerator<T>> m_generator;\n    public:\n        GeneratorWrapper(std::unique_ptr<IGenerator<T>> generator):\n            m_generator(std::move(generator))\n        {}\n        T const& get() const {\n            return m_generator->get();\n        }\n        bool next() {\n            return m_generator->next();\n        }\n    };\n\n    template <typename T>\n    GeneratorWrapper<T> value(T&& value) {\n        return GeneratorWrapper<T>(pf::make_unique<SingleValueGenerator<T>>(std::forward<T>(value)));\n    }\n    template <typename T>\n    GeneratorWrapper<T> values(std::initializer_list<T> values) {\n        return GeneratorWrapper<T>(pf::make_unique<FixedValuesGenerator<T>>(values));\n    }\n\n    template<typename T>\n    class Generators : public IGenerator<T> {\n        std::vector<GeneratorWrapper<T>> m_generators;\n        size_t m_current = 0;\n\n        void populate(GeneratorWrapper<T>&& generator) {\n            m_generators.emplace_back(std::move(generator));\n        }\n        void populate(T&& val) {\n            m_generators.emplace_back(value(std::forward<T>(val)));\n        }\n        template<typename U>\n        void populate(U&& val) {\n            populate(T(std::forward<U>(val)));\n        }\n        template<typename U, typename... Gs>\n        void populate(U&& valueOrGenerator, Gs &&... moreGenerators) {\n            populate(std::forward<U>(valueOrGenerator));\n            populate(std::forward<Gs>(moreGenerators)...);\n        }\n\n    public:\n        template <typename... Gs>\n        Generators(Gs &&... moreGenerators) {\n            m_generators.reserve(sizeof...(Gs));\n            populate(std::forward<Gs>(moreGenerators)...);\n        }\n\n        T const& get() const override {\n            return m_generators[m_current].get();\n        }\n\n        bool next() override {\n            if (m_current >= m_generators.size()) {\n                return false;\n            }\n            const bool current_status = m_generators[m_current].next();\n            if (!current_status) {\n                ++m_current;\n            }\n            return m_current < m_generators.size();\n        }\n    };\n\n    template<typename... Ts>\n    GeneratorWrapper<std::tuple<Ts...>> table( std::initializer_list<std::tuple<typename std::decay<Ts>::type...>> tuples ) {\n        return values<std::tuple<Ts...>>( tuples );\n    }\n\n    // Tag type to signal that a generator sequence should convert arguments to a specific type\n    template <typename T>\n    struct as {};\n\n    template<typename T, typename... Gs>\n    auto makeGenerators( GeneratorWrapper<T>&& generator, Gs &&... moreGenerators ) -> Generators<T> {\n        return Generators<T>(std::move(generator), std::forward<Gs>(moreGenerators)...);\n    }\n    template<typename T>\n    auto makeGenerators( GeneratorWrapper<T>&& generator ) -> Generators<T> {\n        return Generators<T>(std::move(generator));\n    }\n    template<typename T, typename... Gs>\n    auto makeGenerators( T&& val, Gs &&... moreGenerators ) -> Generators<T> {\n        return makeGenerators( value( std::forward<T>( val ) ), std::forward<Gs>( moreGenerators )... );\n    }\n    template<typename T, typename U, typename... Gs>\n    auto makeGenerators( as<T>, U&& val, Gs &&... moreGenerators ) -> Generators<T> {\n        return makeGenerators( value( T( std::forward<U>( val ) ) ), std::forward<Gs>( moreGenerators )... );\n    }\n\n    auto acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker&;\n\n    template<typename L>\n    // Note: The type after -> is weird, because VS2015 cannot parse\n    //       the expression used in the typedef inside, when it is in\n    //       return type. Yeah.\n    auto generate( StringRef generatorName, SourceLineInfo const& lineInfo, L const& generatorExpression ) -> decltype(std::declval<decltype(generatorExpression())>().get()) {\n        using UnderlyingType = typename decltype(generatorExpression())::type;\n\n        IGeneratorTracker& tracker = acquireGeneratorTracker( generatorName, lineInfo );\n        if (!tracker.hasGenerator()) {\n            tracker.setGenerator(pf::make_unique<Generators<UnderlyingType>>(generatorExpression()));\n        }\n\n        auto const& generator = static_cast<IGenerator<UnderlyingType> const&>( *tracker.getGenerator() );\n        return generator.get();\n    }\n\n} // namespace Generators\n} // namespace Catch\n\n#define GENERATE( ... ) \\\n    Catch::Generators::generate( INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_UNIQUE_NAME(generator)), \\\n                                 CATCH_INTERNAL_LINEINFO, \\\n                                 [ ]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } ) //NOLINT(google-build-using-namespace)\n#define GENERATE_COPY( ... ) \\\n    Catch::Generators::generate( INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_UNIQUE_NAME(generator)), \\\n                                 CATCH_INTERNAL_LINEINFO, \\\n                                 [=]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } ) //NOLINT(google-build-using-namespace)\n#define GENERATE_REF( ... ) \\\n    Catch::Generators::generate( INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_UNIQUE_NAME(generator)), \\\n                                 CATCH_INTERNAL_LINEINFO, \\\n                                 [&]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } ) //NOLINT(google-build-using-namespace)\n\n// end catch_generators.hpp\n// start catch_generators_generic.hpp\n\nnamespace Catch {\nnamespace Generators {\n\n    template <typename T>\n    class TakeGenerator : public IGenerator<T> {\n        GeneratorWrapper<T> m_generator;\n        size_t m_returned = 0;\n        size_t m_target;\n    public:\n        TakeGenerator(size_t target, GeneratorWrapper<T>&& generator):\n            m_generator(std::move(generator)),\n            m_target(target)\n        {\n            assert(target != 0 && \"Empty generators are not allowed\");\n        }\n        T const& get() const override {\n            return m_generator.get();\n        }\n        bool next() override {\n            ++m_returned;\n            if (m_returned >= m_target) {\n                return false;\n            }\n\n            const auto success = m_generator.next();\n            // If the underlying generator does not contain enough values\n            // then we cut short as well\n            if (!success) {\n                m_returned = m_target;\n            }\n            return success;\n        }\n    };\n\n    template <typename T>\n    GeneratorWrapper<T> take(size_t target, GeneratorWrapper<T>&& generator) {\n        return GeneratorWrapper<T>(pf::make_unique<TakeGenerator<T>>(target, std::move(generator)));\n    }\n\n    template <typename T, typename Predicate>\n    class FilterGenerator : public IGenerator<T> {\n        GeneratorWrapper<T> m_generator;\n        Predicate m_predicate;\n    public:\n        template <typename P = Predicate>\n        FilterGenerator(P&& pred, GeneratorWrapper<T>&& generator):\n            m_generator(std::move(generator)),\n            m_predicate(std::forward<P>(pred))\n        {\n            if (!m_predicate(m_generator.get())) {\n                // It might happen that there are no values that pass the\n                // filter. In that case we throw an exception.\n                auto has_initial_value = nextImpl();\n                if (!has_initial_value) {\n                    Catch::throw_exception(GeneratorException(\"No valid value found in filtered generator\"));\n                }\n            }\n        }\n\n        T const& get() const override {\n            return m_generator.get();\n        }\n\n        bool next() override {\n            return nextImpl();\n        }\n\n    private:\n        bool nextImpl() {\n            bool success = m_generator.next();\n            if (!success) {\n                return false;\n            }\n            while (!m_predicate(m_generator.get()) && (success = m_generator.next()) == true);\n            return success;\n        }\n    };\n\n    template <typename T, typename Predicate>\n    GeneratorWrapper<T> filter(Predicate&& pred, GeneratorWrapper<T>&& generator) {\n        return GeneratorWrapper<T>(std::unique_ptr<IGenerator<T>>(pf::make_unique<FilterGenerator<T, Predicate>>(std::forward<Predicate>(pred), std::move(generator))));\n    }\n\n    template <typename T>\n    class RepeatGenerator : public IGenerator<T> {\n        static_assert(!std::is_same<T, bool>::value,\n            \"RepeatGenerator currently does not support bools\"\n            \"because of std::vector<bool> specialization\");\n        GeneratorWrapper<T> m_generator;\n        mutable std::vector<T> m_returned;\n        size_t m_target_repeats;\n        size_t m_current_repeat = 0;\n        size_t m_repeat_index = 0;\n    public:\n        RepeatGenerator(size_t repeats, GeneratorWrapper<T>&& generator):\n            m_generator(std::move(generator)),\n            m_target_repeats(repeats)\n        {\n            assert(m_target_repeats > 0 && \"Repeat generator must repeat at least once\");\n        }\n\n        T const& get() const override {\n            if (m_current_repeat == 0) {\n                m_returned.push_back(m_generator.get());\n                return m_returned.back();\n            }\n            return m_returned[m_repeat_index];\n        }\n\n        bool next() override {\n            // There are 2 basic cases:\n            // 1) We are still reading the generator\n            // 2) We are reading our own cache\n\n            // In the first case, we need to poke the underlying generator.\n            // If it happily moves, we are left in that state, otherwise it is time to start reading from our cache\n            if (m_current_repeat == 0) {\n                const auto success = m_generator.next();\n                if (!success) {\n                    ++m_current_repeat;\n                }\n                return m_current_repeat < m_target_repeats;\n            }\n\n            // In the second case, we need to move indices forward and check that we haven't run up against the end\n            ++m_repeat_index;\n            if (m_repeat_index == m_returned.size()) {\n                m_repeat_index = 0;\n                ++m_current_repeat;\n            }\n            return m_current_repeat < m_target_repeats;\n        }\n    };\n\n    template <typename T>\n    GeneratorWrapper<T> repeat(size_t repeats, GeneratorWrapper<T>&& generator) {\n        return GeneratorWrapper<T>(pf::make_unique<RepeatGenerator<T>>(repeats, std::move(generator)));\n    }\n\n    template <typename T, typename U, typename Func>\n    class MapGenerator : public IGenerator<T> {\n        // TBD: provide static assert for mapping function, for friendly error message\n        GeneratorWrapper<U> m_generator;\n        Func m_function;\n        // To avoid returning dangling reference, we have to save the values\n        T m_cache;\n    public:\n        template <typename F2 = Func>\n        MapGenerator(F2&& function, GeneratorWrapper<U>&& generator) :\n            m_generator(std::move(generator)),\n            m_function(std::forward<F2>(function)),\n            m_cache(m_function(m_generator.get()))\n        {}\n\n        T const& get() const override {\n            return m_cache;\n        }\n        bool next() override {\n            const auto success = m_generator.next();\n            if (success) {\n                m_cache = m_function(m_generator.get());\n            }\n            return success;\n        }\n    };\n\n    template <typename Func, typename U, typename T = FunctionReturnType<Func, U>>\n    GeneratorWrapper<T> map(Func&& function, GeneratorWrapper<U>&& generator) {\n        return GeneratorWrapper<T>(\n            pf::make_unique<MapGenerator<T, U, Func>>(std::forward<Func>(function), std::move(generator))\n        );\n    }\n\n    template <typename T, typename U, typename Func>\n    GeneratorWrapper<T> map(Func&& function, GeneratorWrapper<U>&& generator) {\n        return GeneratorWrapper<T>(\n            pf::make_unique<MapGenerator<T, U, Func>>(std::forward<Func>(function), std::move(generator))\n        );\n    }\n\n    template <typename T>\n    class ChunkGenerator final : public IGenerator<std::vector<T>> {\n        std::vector<T> m_chunk;\n        size_t m_chunk_size;\n        GeneratorWrapper<T> m_generator;\n        bool m_used_up = false;\n    public:\n        ChunkGenerator(size_t size, GeneratorWrapper<T> generator) :\n            m_chunk_size(size), m_generator(std::move(generator))\n        {\n            m_chunk.reserve(m_chunk_size);\n            if (m_chunk_size != 0) {\n                m_chunk.push_back(m_generator.get());\n                for (size_t i = 1; i < m_chunk_size; ++i) {\n                    if (!m_generator.next()) {\n                        Catch::throw_exception(GeneratorException(\"Not enough values to initialize the first chunk\"));\n                    }\n                    m_chunk.push_back(m_generator.get());\n                }\n            }\n        }\n        std::vector<T> const& get() const override {\n            return m_chunk;\n        }\n        bool next() override {\n            m_chunk.clear();\n            for (size_t idx = 0; idx < m_chunk_size; ++idx) {\n                if (!m_generator.next()) {\n                    return false;\n                }\n                m_chunk.push_back(m_generator.get());\n            }\n            return true;\n        }\n    };\n\n    template <typename T>\n    GeneratorWrapper<std::vector<T>> chunk(size_t size, GeneratorWrapper<T>&& generator) {\n        return GeneratorWrapper<std::vector<T>>(\n            pf::make_unique<ChunkGenerator<T>>(size, std::move(generator))\n        );\n    }\n\n} // namespace Generators\n} // namespace Catch\n\n// end catch_generators_generic.hpp\n// start catch_generators_specific.hpp\n\n// start catch_context.h\n\n#include <memory>\n\nnamespace Catch {\n\n    struct IResultCapture;\n    struct IRunner;\n    struct IConfig;\n    struct IMutableContext;\n\n    using IConfigPtr = std::shared_ptr<IConfig const>;\n\n    struct IContext\n    {\n        virtual ~IContext();\n\n        virtual IResultCapture* getResultCapture() = 0;\n        virtual IRunner* getRunner() = 0;\n        virtual IConfigPtr const& getConfig() const = 0;\n    };\n\n    struct IMutableContext : IContext\n    {\n        virtual ~IMutableContext();\n        virtual void setResultCapture( IResultCapture* resultCapture ) = 0;\n        virtual void setRunner( IRunner* runner ) = 0;\n        virtual void setConfig( IConfigPtr const& config ) = 0;\n\n    private:\n        static IMutableContext *currentContext;\n        friend IMutableContext& getCurrentMutableContext();\n        friend void cleanUpContext();\n        static void createContext();\n    };\n\n    inline IMutableContext& getCurrentMutableContext()\n    {\n        if( !IMutableContext::currentContext )\n            IMutableContext::createContext();\n        // NOLINTNEXTLINE(clang-analyzer-core.uninitialized.UndefReturn)\n        return *IMutableContext::currentContext;\n    }\n\n    inline IContext& getCurrentContext()\n    {\n        return getCurrentMutableContext();\n    }\n\n    void cleanUpContext();\n\n    class SimplePcg32;\n    SimplePcg32& rng();\n}\n\n// end catch_context.h\n// start catch_interfaces_config.h\n\n// start catch_option.hpp\n\nnamespace Catch {\n\n    // An optional type\n    template<typename T>\n    class Option {\n    public:\n        Option() : nullableValue( nullptr ) {}\n        Option( T const& _value )\n        : nullableValue( new( storage ) T( _value ) )\n        {}\n        Option( Option const& _other )\n        : nullableValue( _other ? new( storage ) T( *_other ) : nullptr )\n        {}\n\n        ~Option() {\n            reset();\n        }\n\n        Option& operator= ( Option const& _other ) {\n            if( &_other != this ) {\n                reset();\n                if( _other )\n                    nullableValue = new( storage ) T( *_other );\n            }\n            return *this;\n        }\n        Option& operator = ( T const& _value ) {\n            reset();\n            nullableValue = new( storage ) T( _value );\n            return *this;\n        }\n\n        void reset() {\n            if( nullableValue )\n                nullableValue->~T();\n            nullableValue = nullptr;\n        }\n\n        T& operator*() { return *nullableValue; }\n        T const& operator*() const { return *nullableValue; }\n        T* operator->() { return nullableValue; }\n        const T* operator->() const { return nullableValue; }\n\n        T valueOr( T const& defaultValue ) const {\n            return nullableValue ? *nullableValue : defaultValue;\n        }\n\n        bool some() const { return nullableValue != nullptr; }\n        bool none() const { return nullableValue == nullptr; }\n\n        bool operator !() const { return nullableValue == nullptr; }\n        explicit operator bool() const {\n            return some();\n        }\n\n    private:\n        T *nullableValue;\n        alignas(alignof(T)) char storage[sizeof(T)];\n    };\n\n} // end namespace Catch\n\n// end catch_option.hpp\n#include <chrono>\n#include <iosfwd>\n#include <string>\n#include <vector>\n#include <memory>\n\nnamespace Catch {\n\n    enum class Verbosity {\n        Quiet = 0,\n        Normal,\n        High\n    };\n\n    struct WarnAbout { enum What {\n        Nothing = 0x00,\n        NoAssertions = 0x01,\n        NoTests = 0x02\n    }; };\n\n    struct ShowDurations { enum OrNot {\n        DefaultForReporter,\n        Always,\n        Never\n    }; };\n    struct RunTests { enum InWhatOrder {\n        InDeclarationOrder,\n        InLexicographicalOrder,\n        InRandomOrder\n    }; };\n    struct UseColour { enum YesOrNo {\n        Auto,\n        Yes,\n        No\n    }; };\n    struct WaitForKeypress { enum When {\n        Never,\n        BeforeStart = 1,\n        BeforeExit = 2,\n        BeforeStartAndExit = BeforeStart | BeforeExit\n    }; };\n\n    class TestSpec;\n\n    struct IConfig : NonCopyable {\n\n        virtual ~IConfig();\n\n        virtual bool allowThrows() const = 0;\n        virtual std::ostream& stream() const = 0;\n        virtual std::string name() const = 0;\n        virtual bool includeSuccessfulResults() const = 0;\n        virtual bool shouldDebugBreak() const = 0;\n        virtual bool warnAboutMissingAssertions() const = 0;\n        virtual bool warnAboutNoTests() const = 0;\n        virtual int abortAfter() const = 0;\n        virtual bool showInvisibles() const = 0;\n        virtual ShowDurations::OrNot showDurations() const = 0;\n        virtual double minDuration() const = 0;\n        virtual TestSpec const& testSpec() const = 0;\n        virtual bool hasTestFilters() const = 0;\n        virtual std::vector<std::string> const& getTestsOrTags() const = 0;\n        virtual RunTests::InWhatOrder runOrder() const = 0;\n        virtual unsigned int rngSeed() const = 0;\n        virtual UseColour::YesOrNo useColour() const = 0;\n        virtual std::vector<std::string> const& getSectionsToRun() const = 0;\n        virtual Verbosity verbosity() const = 0;\n\n        virtual bool benchmarkNoAnalysis() const = 0;\n        virtual int benchmarkSamples() const = 0;\n        virtual double benchmarkConfidenceInterval() const = 0;\n        virtual unsigned int benchmarkResamples() const = 0;\n        virtual std::chrono::milliseconds benchmarkWarmupTime() const = 0;\n    };\n\n    using IConfigPtr = std::shared_ptr<IConfig const>;\n}\n\n// end catch_interfaces_config.h\n// start catch_random_number_generator.h\n\n#include <cstdint>\n\nnamespace Catch {\n\n    // This is a simple implementation of C++11 Uniform Random Number\n    // Generator. It does not provide all operators, because Catch2\n    // does not use it, but it should behave as expected inside stdlib's\n    // distributions.\n    // The implementation is based on the PCG family (http://pcg-random.org)\n    class SimplePcg32 {\n        using state_type = std::uint64_t;\n    public:\n        using result_type = std::uint32_t;\n        static constexpr result_type (min)() {\n            return 0;\n        }\n        static constexpr result_type (max)() {\n            return static_cast<result_type>(-1);\n        }\n\n        // Provide some default initial state for the default constructor\n        SimplePcg32():SimplePcg32(0xed743cc4U) {}\n\n        explicit SimplePcg32(result_type seed_);\n\n        void seed(result_type seed_);\n        void discard(uint64_t skip);\n\n        result_type operator()();\n\n    private:\n        friend bool operator==(SimplePcg32 const& lhs, SimplePcg32 const& rhs);\n        friend bool operator!=(SimplePcg32 const& lhs, SimplePcg32 const& rhs);\n\n        // In theory we also need operator<< and operator>>\n        // In practice we do not use them, so we will skip them for now\n\n        std::uint64_t m_state;\n        // This part of the state determines which \"stream\" of the numbers\n        // is chosen -- we take it as a constant for Catch2, so we only\n        // need to deal with seeding the main state.\n        // Picked by reading 8 bytes from `/dev/random` :-)\n        static const std::uint64_t s_inc = (0x13ed0cc53f939476ULL << 1ULL) | 1ULL;\n    };\n\n} // end namespace Catch\n\n// end catch_random_number_generator.h\n#include <random>\n\nnamespace Catch {\nnamespace Generators {\n\ntemplate <typename Float>\nclass RandomFloatingGenerator final : public IGenerator<Float> {\n    Catch::SimplePcg32& m_rng;\n    std::uniform_real_distribution<Float> m_dist;\n    Float m_current_number;\npublic:\n\n    RandomFloatingGenerator(Float a, Float b):\n        m_rng(rng()),\n        m_dist(a, b) {\n        static_cast<void>(next());\n    }\n\n    Float const& get() const override {\n        return m_current_number;\n    }\n    bool next() override {\n        m_current_number = m_dist(m_rng);\n        return true;\n    }\n};\n\ntemplate <typename Integer>\nclass RandomIntegerGenerator final : public IGenerator<Integer> {\n    Catch::SimplePcg32& m_rng;\n    std::uniform_int_distribution<Integer> m_dist;\n    Integer m_current_number;\npublic:\n\n    RandomIntegerGenerator(Integer a, Integer b):\n        m_rng(rng()),\n        m_dist(a, b) {\n        static_cast<void>(next());\n    }\n\n    Integer const& get() const override {\n        return m_current_number;\n    }\n    bool next() override {\n        m_current_number = m_dist(m_rng);\n        return true;\n    }\n};\n\n// TODO: Ideally this would be also constrained against the various char types,\n//       but I don't expect users to run into that in practice.\ntemplate <typename T>\ntypename std::enable_if<std::is_integral<T>::value && !std::is_same<T, bool>::value,\nGeneratorWrapper<T>>::type\nrandom(T a, T b) {\n    return GeneratorWrapper<T>(\n        pf::make_unique<RandomIntegerGenerator<T>>(a, b)\n    );\n}\n\ntemplate <typename T>\ntypename std::enable_if<std::is_floating_point<T>::value,\nGeneratorWrapper<T>>::type\nrandom(T a, T b) {\n    return GeneratorWrapper<T>(\n        pf::make_unique<RandomFloatingGenerator<T>>(a, b)\n    );\n}\n\ntemplate <typename T>\nclass RangeGenerator final : public IGenerator<T> {\n    T m_current;\n    T m_end;\n    T m_step;\n    bool m_positive;\n\npublic:\n    RangeGenerator(T const& start, T const& end, T const& step):\n        m_current(start),\n        m_end(end),\n        m_step(step),\n        m_positive(m_step > T(0))\n    {\n        assert(m_current != m_end && \"Range start and end cannot be equal\");\n        assert(m_step != T(0) && \"Step size cannot be zero\");\n        assert(((m_positive && m_current <= m_end) || (!m_positive && m_current >= m_end)) && \"Step moves away from end\");\n    }\n\n    RangeGenerator(T const& start, T const& end):\n        RangeGenerator(start, end, (start < end) ? T(1) : T(-1))\n    {}\n\n    T const& get() const override {\n        return m_current;\n    }\n\n    bool next() override {\n        m_current += m_step;\n        return (m_positive) ? (m_current < m_end) : (m_current > m_end);\n    }\n};\n\ntemplate <typename T>\nGeneratorWrapper<T> range(T const& start, T const& end, T const& step) {\n    static_assert(std::is_arithmetic<T>::value && !std::is_same<T, bool>::value, \"Type must be numeric\");\n    return GeneratorWrapper<T>(pf::make_unique<RangeGenerator<T>>(start, end, step));\n}\n\ntemplate <typename T>\nGeneratorWrapper<T> range(T const& start, T const& end) {\n    static_assert(std::is_integral<T>::value && !std::is_same<T, bool>::value, \"Type must be an integer\");\n    return GeneratorWrapper<T>(pf::make_unique<RangeGenerator<T>>(start, end));\n}\n\ntemplate <typename T>\nclass IteratorGenerator final : public IGenerator<T> {\n    static_assert(!std::is_same<T, bool>::value,\n        \"IteratorGenerator currently does not support bools\"\n        \"because of std::vector<bool> specialization\");\n\n    std::vector<T> m_elems;\n    size_t m_current = 0;\npublic:\n    template <typename InputIterator, typename InputSentinel>\n    IteratorGenerator(InputIterator first, InputSentinel last):m_elems(first, last) {\n        if (m_elems.empty()) {\n            Catch::throw_exception(GeneratorException(\"IteratorGenerator received no valid values\"));\n        }\n    }\n\n    T const& get() const override {\n        return m_elems[m_current];\n    }\n\n    bool next() override {\n        ++m_current;\n        return m_current != m_elems.size();\n    }\n};\n\ntemplate <typename InputIterator,\n          typename InputSentinel,\n          typename ResultType = typename std::iterator_traits<InputIterator>::value_type>\nGeneratorWrapper<ResultType> from_range(InputIterator from, InputSentinel to) {\n    return GeneratorWrapper<ResultType>(pf::make_unique<IteratorGenerator<ResultType>>(from, to));\n}\n\ntemplate <typename Container,\n          typename ResultType = typename Container::value_type>\nGeneratorWrapper<ResultType> from_range(Container const& cnt) {\n    return GeneratorWrapper<ResultType>(pf::make_unique<IteratorGenerator<ResultType>>(cnt.begin(), cnt.end()));\n}\n\n} // namespace Generators\n} // namespace Catch\n\n// end catch_generators_specific.hpp\n\n// These files are included here so the single_include script doesn't put them\n// in the conditionally compiled sections\n// start catch_test_case_info.h\n\n#include <string>\n#include <vector>\n#include <memory>\n\n#ifdef __clang__\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wpadded\"\n#endif\n\nnamespace Catch {\n\n    struct ITestInvoker;\n\n    struct TestCaseInfo {\n        enum SpecialProperties{\n            None = 0,\n            IsHidden = 1 << 1,\n            ShouldFail = 1 << 2,\n            MayFail = 1 << 3,\n            Throws = 1 << 4,\n            NonPortable = 1 << 5,\n            Benchmark = 1 << 6\n        };\n\n        TestCaseInfo(   std::string const& _name,\n                        std::string const& _className,\n                        std::string const& _description,\n                        std::vector<std::string> const& _tags,\n                        SourceLineInfo const& _lineInfo );\n\n        friend void setTags( TestCaseInfo& testCaseInfo, std::vector<std::string> tags );\n\n        bool isHidden() const;\n        bool throws() const;\n        bool okToFail() const;\n        bool expectedToFail() const;\n\n        std::string tagsAsString() const;\n\n        std::string name;\n        std::string className;\n        std::string description;\n        std::vector<std::string> tags;\n        std::vector<std::string> lcaseTags;\n        SourceLineInfo lineInfo;\n        SpecialProperties properties;\n    };\n\n    class TestCase : public TestCaseInfo {\n    public:\n\n        TestCase( ITestInvoker* testCase, TestCaseInfo&& info );\n\n        TestCase withName( std::string const& _newName ) const;\n\n        void invoke() const;\n\n        TestCaseInfo const& getTestCaseInfo() const;\n\n        bool operator == ( TestCase const& other ) const;\n        bool operator < ( TestCase const& other ) const;\n\n    private:\n        std::shared_ptr<ITestInvoker> test;\n    };\n\n    TestCase makeTestCase(  ITestInvoker* testCase,\n                            std::string const& className,\n                            NameAndTags const& nameAndTags,\n                            SourceLineInfo const& lineInfo );\n}\n\n#ifdef __clang__\n#pragma clang diagnostic pop\n#endif\n\n// end catch_test_case_info.h\n// start catch_interfaces_runner.h\n\nnamespace Catch {\n\n    struct IRunner {\n        virtual ~IRunner();\n        virtual bool aborting() const = 0;\n    };\n}\n\n// end catch_interfaces_runner.h\n\n#ifdef __OBJC__\n// start catch_objc.hpp\n\n#import <objc/runtime.h>\n\n#include <string>\n\n// NB. Any general catch headers included here must be included\n// in catch.hpp first to make sure they are included by the single\n// header for non obj-usage\n\n///////////////////////////////////////////////////////////////////////////////\n// This protocol is really only here for (self) documenting purposes, since\n// all its methods are optional.\n@protocol OcFixture\n\n@optional\n\n-(void) setUp;\n-(void) tearDown;\n\n@end\n\nnamespace Catch {\n\n    class OcMethod : public ITestInvoker {\n\n    public:\n        OcMethod( Class cls, SEL sel ) : m_cls( cls ), m_sel( sel ) {}\n\n        virtual void invoke() const {\n            id obj = [[m_cls alloc] init];\n\n            performOptionalSelector( obj, @selector(setUp)  );\n            performOptionalSelector( obj, m_sel );\n            performOptionalSelector( obj, @selector(tearDown)  );\n\n            arcSafeRelease( obj );\n        }\n    private:\n        virtual ~OcMethod() {}\n\n        Class m_cls;\n        SEL m_sel;\n    };\n\n    namespace Detail{\n\n        inline std::string getAnnotation(   Class cls,\n                                            std::string const& annotationName,\n                                            std::string const& testCaseName ) {\n            NSString* selStr = [[NSString alloc] initWithFormat:@\"Catch_%s_%s\", annotationName.c_str(), testCaseName.c_str()];\n            SEL sel = NSSelectorFromString( selStr );\n            arcSafeRelease( selStr );\n            id value = performOptionalSelector( cls, sel );\n            if( value )\n                return [(NSString*)value UTF8String];\n            return \"\";\n        }\n    }\n\n    inline std::size_t registerTestMethods() {\n        std::size_t noTestMethods = 0;\n        int noClasses = objc_getClassList( nullptr, 0 );\n\n        Class* classes = (CATCH_UNSAFE_UNRETAINED Class *)malloc( sizeof(Class) * noClasses);\n        objc_getClassList( classes, noClasses );\n\n        for( int c = 0; c < noClasses; c++ ) {\n            Class cls = classes[c];\n            {\n                u_int count;\n                Method* methods = class_copyMethodList( cls, &count );\n                for( u_int m = 0; m < count ; m++ ) {\n                    SEL selector = method_getName(methods[m]);\n                    std::string methodName = sel_getName(selector);\n                    if( startsWith( methodName, \"Catch_TestCase_\" ) ) {\n                        std::string testCaseName = methodName.substr( 15 );\n                        std::string name = Detail::getAnnotation( cls, \"Name\", testCaseName );\n                        std::string desc = Detail::getAnnotation( cls, \"Description\", testCaseName );\n                        const char* className = class_getName( cls );\n\n                        getMutableRegistryHub().registerTest( makeTestCase( new OcMethod( cls, selector ), className, NameAndTags( name.c_str(), desc.c_str() ), SourceLineInfo(\"\",0) ) );\n                        noTestMethods++;\n                    }\n                }\n                free(methods);\n            }\n        }\n        return noTestMethods;\n    }\n\n#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)\n\n    namespace Matchers {\n        namespace Impl {\n        namespace NSStringMatchers {\n\n            struct StringHolder : MatcherBase<NSString*>{\n                StringHolder( NSString* substr ) : m_substr( [substr copy] ){}\n                StringHolder( StringHolder const& other ) : m_substr( [other.m_substr copy] ){}\n                StringHolder() {\n                    arcSafeRelease( m_substr );\n                }\n\n                bool match( NSString* str ) const override {\n                    return false;\n                }\n\n                NSString* CATCH_ARC_STRONG m_substr;\n            };\n\n            struct Equals : StringHolder {\n                Equals( NSString* substr ) : StringHolder( substr ){}\n\n                bool match( NSString* str ) const override {\n                    return  (str != nil || m_substr == nil ) &&\n                            [str isEqualToString:m_substr];\n                }\n\n                std::string describe() const override {\n                    return \"equals string: \" + Catch::Detail::stringify( m_substr );\n                }\n            };\n\n            struct Contains : StringHolder {\n                Contains( NSString* substr ) : StringHolder( substr ){}\n\n                bool match( NSString* str ) const override {\n                    return  (str != nil || m_substr == nil ) &&\n                            [str rangeOfString:m_substr].location != NSNotFound;\n                }\n\n                std::string describe() const override {\n                    return \"contains string: \" + Catch::Detail::stringify( m_substr );\n                }\n            };\n\n            struct StartsWith : StringHolder {\n                StartsWith( NSString* substr ) : StringHolder( substr ){}\n\n                bool match( NSString* str ) const override {\n                    return  (str != nil || m_substr == nil ) &&\n                            [str rangeOfString:m_substr].location == 0;\n                }\n\n                std::string describe() const override {\n                    return \"starts with: \" + Catch::Detail::stringify( m_substr );\n                }\n            };\n            struct EndsWith : StringHolder {\n                EndsWith( NSString* substr ) : StringHolder( substr ){}\n\n                bool match( NSString* str ) const override {\n                    return  (str != nil || m_substr == nil ) &&\n                            [str rangeOfString:m_substr].location == [str length] - [m_substr length];\n                }\n\n                std::string describe() const override {\n                    return \"ends with: \" + Catch::Detail::stringify( m_substr );\n                }\n            };\n\n        } // namespace NSStringMatchers\n        } // namespace Impl\n\n        inline Impl::NSStringMatchers::Equals\n            Equals( NSString* substr ){ return Impl::NSStringMatchers::Equals( substr ); }\n\n        inline Impl::NSStringMatchers::Contains\n            Contains( NSString* substr ){ return Impl::NSStringMatchers::Contains( substr ); }\n\n        inline Impl::NSStringMatchers::StartsWith\n            StartsWith( NSString* substr ){ return Impl::NSStringMatchers::StartsWith( substr ); }\n\n        inline Impl::NSStringMatchers::EndsWith\n            EndsWith( NSString* substr ){ return Impl::NSStringMatchers::EndsWith( substr ); }\n\n    } // namespace Matchers\n\n    using namespace Matchers;\n\n#endif // CATCH_CONFIG_DISABLE_MATCHERS\n\n} // namespace Catch\n\n///////////////////////////////////////////////////////////////////////////////\n#define OC_MAKE_UNIQUE_NAME( root, uniqueSuffix ) root##uniqueSuffix\n#define OC_TEST_CASE2( name, desc, uniqueSuffix ) \\\n+(NSString*) OC_MAKE_UNIQUE_NAME( Catch_Name_test_, uniqueSuffix ) \\\n{ \\\nreturn @ name; \\\n} \\\n+(NSString*) OC_MAKE_UNIQUE_NAME( Catch_Description_test_, uniqueSuffix ) \\\n{ \\\nreturn @ desc; \\\n} \\\n-(void) OC_MAKE_UNIQUE_NAME( Catch_TestCase_test_, uniqueSuffix )\n\n#define OC_TEST_CASE( name, desc ) OC_TEST_CASE2( name, desc, __LINE__ )\n\n// end catch_objc.hpp\n#endif\n\n// Benchmarking needs the externally-facing parts of reporters to work\n#if defined(CATCH_CONFIG_EXTERNAL_INTERFACES) || defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n// start catch_external_interfaces.h\n\n// start catch_reporter_bases.hpp\n\n// start catch_interfaces_reporter.h\n\n// start catch_config.hpp\n\n// start catch_test_spec_parser.h\n\n#ifdef __clang__\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wpadded\"\n#endif\n\n// start catch_test_spec.h\n\n#ifdef __clang__\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wpadded\"\n#endif\n\n// start catch_wildcard_pattern.h\n\nnamespace Catch\n{\n    class WildcardPattern {\n        enum WildcardPosition {\n            NoWildcard = 0,\n            WildcardAtStart = 1,\n            WildcardAtEnd = 2,\n            WildcardAtBothEnds = WildcardAtStart | WildcardAtEnd\n        };\n\n    public:\n\n        WildcardPattern( std::string const& pattern, CaseSensitive::Choice caseSensitivity );\n        virtual ~WildcardPattern() = default;\n        virtual bool matches( std::string const& str ) const;\n\n    private:\n        std::string normaliseString( std::string const& str ) const;\n        CaseSensitive::Choice m_caseSensitivity;\n        WildcardPosition m_wildcard = NoWildcard;\n        std::string m_pattern;\n    };\n}\n\n// end catch_wildcard_pattern.h\n#include <string>\n#include <vector>\n#include <memory>\n\nnamespace Catch {\n\n    struct IConfig;\n\n    class TestSpec {\n        class Pattern {\n        public:\n            explicit Pattern( std::string const& name );\n            virtual ~Pattern();\n            virtual bool matches( TestCaseInfo const& testCase ) const = 0;\n            std::string const& name() const;\n        private:\n            std::string const m_name;\n        };\n        using PatternPtr = std::shared_ptr<Pattern>;\n\n        class NamePattern : public Pattern {\n        public:\n            explicit NamePattern( std::string const& name, std::string const& filterString );\n            bool matches( TestCaseInfo const& testCase ) const override;\n        private:\n            WildcardPattern m_wildcardPattern;\n        };\n\n        class TagPattern : public Pattern {\n        public:\n            explicit TagPattern( std::string const& tag, std::string const& filterString );\n            bool matches( TestCaseInfo const& testCase ) const override;\n        private:\n            std::string m_tag;\n        };\n\n        class ExcludedPattern : public Pattern {\n        public:\n            explicit ExcludedPattern( PatternPtr const& underlyingPattern );\n            bool matches( TestCaseInfo const& testCase ) const override;\n        private:\n            PatternPtr m_underlyingPattern;\n        };\n\n        struct Filter {\n            std::vector<PatternPtr> m_patterns;\n\n            bool matches( TestCaseInfo const& testCase ) const;\n            std::string name() const;\n        };\n\n    public:\n        struct FilterMatch {\n            std::string name;\n            std::vector<TestCase const*> tests;\n        };\n        using Matches = std::vector<FilterMatch>;\n        using vectorStrings = std::vector<std::string>;\n\n        bool hasFilters() const;\n        bool matches( TestCaseInfo const& testCase ) const;\n        Matches matchesByFilter( std::vector<TestCase> const& testCases, IConfig const& config ) const;\n        const vectorStrings & getInvalidArgs() const;\n\n    private:\n        std::vector<Filter> m_filters;\n        std::vector<std::string> m_invalidArgs;\n        friend class TestSpecParser;\n    };\n}\n\n#ifdef __clang__\n#pragma clang diagnostic pop\n#endif\n\n// end catch_test_spec.h\n// start catch_interfaces_tag_alias_registry.h\n\n#include <string>\n\nnamespace Catch {\n\n    struct TagAlias;\n\n    struct ITagAliasRegistry {\n        virtual ~ITagAliasRegistry();\n        // Nullptr if not present\n        virtual TagAlias const* find( std::string const& alias ) const = 0;\n        virtual std::string expandAliases( std::string const& unexpandedTestSpec ) const = 0;\n\n        static ITagAliasRegistry const& get();\n    };\n\n} // end namespace Catch\n\n// end catch_interfaces_tag_alias_registry.h\nnamespace Catch {\n\n    class TestSpecParser {\n        enum Mode{ None, Name, QuotedName, Tag, EscapedName };\n        Mode m_mode = None;\n        Mode lastMode = None;\n        bool m_exclusion = false;\n        std::size_t m_pos = 0;\n        std::size_t m_realPatternPos = 0;\n        std::string m_arg;\n        std::string m_substring;\n        std::string m_patternName;\n        std::vector<std::size_t> m_escapeChars;\n        TestSpec::Filter m_currentFilter;\n        TestSpec m_testSpec;\n        ITagAliasRegistry const* m_tagAliases = nullptr;\n\n    public:\n        TestSpecParser( ITagAliasRegistry const& tagAliases );\n\n        TestSpecParser& parse( std::string const& arg );\n        TestSpec testSpec();\n\n    private:\n        bool visitChar( char c );\n        void startNewMode( Mode mode );\n        bool processNoneChar( char c );\n        void processNameChar( char c );\n        bool processOtherChar( char c );\n        void endMode();\n        void escape();\n        bool isControlChar( char c ) const;\n        void saveLastMode();\n        void revertBackToLastMode();\n        void addFilter();\n        bool separate();\n\n        // Handles common preprocessing of the pattern for name/tag patterns\n        std::string preprocessPattern();\n        // Adds the current pattern as a test name\n        void addNamePattern();\n        // Adds the current pattern as a tag\n        void addTagPattern();\n\n        inline void addCharToPattern(char c) {\n            m_substring += c;\n            m_patternName += c;\n            m_realPatternPos++;\n        }\n\n    };\n    TestSpec parseTestSpec( std::string const& arg );\n\n} // namespace Catch\n\n#ifdef __clang__\n#pragma clang diagnostic pop\n#endif\n\n// end catch_test_spec_parser.h\n// Libstdc++ doesn't like incomplete classes for unique_ptr\n\n#include <memory>\n#include <vector>\n#include <string>\n\n#ifndef CATCH_CONFIG_CONSOLE_WIDTH\n#define CATCH_CONFIG_CONSOLE_WIDTH 80\n#endif\n\nnamespace Catch {\n\n    struct IStream;\n\n    struct ConfigData {\n        bool listTests = false;\n        bool listTags = false;\n        bool listReporters = false;\n        bool listTestNamesOnly = false;\n\n        bool showSuccessfulTests = false;\n        bool shouldDebugBreak = false;\n        bool noThrow = false;\n        bool showHelp = false;\n        bool showInvisibles = false;\n        bool filenamesAsTags = false;\n        bool libIdentify = false;\n\n        int abortAfter = -1;\n        unsigned int rngSeed = 0;\n\n        bool benchmarkNoAnalysis = false;\n        unsigned int benchmarkSamples = 100;\n        double benchmarkConfidenceInterval = 0.95;\n        unsigned int benchmarkResamples = 100000;\n        std::chrono::milliseconds::rep benchmarkWarmupTime = 100;\n\n        Verbosity verbosity = Verbosity::Normal;\n        WarnAbout::What warnings = WarnAbout::Nothing;\n        ShowDurations::OrNot showDurations = ShowDurations::DefaultForReporter;\n        double minDuration = -1;\n        RunTests::InWhatOrder runOrder = RunTests::InDeclarationOrder;\n        UseColour::YesOrNo useColour = UseColour::Auto;\n        WaitForKeypress::When waitForKeypress = WaitForKeypress::Never;\n\n        std::string outputFilename;\n        std::string name;\n        std::string processName;\n#ifndef CATCH_CONFIG_DEFAULT_REPORTER\n#define CATCH_CONFIG_DEFAULT_REPORTER \"console\"\n#endif\n        std::string reporterName = CATCH_CONFIG_DEFAULT_REPORTER;\n#undef CATCH_CONFIG_DEFAULT_REPORTER\n\n        std::vector<std::string> testsOrTags;\n        std::vector<std::string> sectionsToRun;\n    };\n\n    class Config : public IConfig {\n    public:\n\n        Config() = default;\n        Config( ConfigData const& data );\n        virtual ~Config() = default;\n\n        std::string const& getFilename() const;\n\n        bool listTests() const;\n        bool listTestNamesOnly() const;\n        bool listTags() const;\n        bool listReporters() const;\n\n        std::string getProcessName() const;\n        std::string const& getReporterName() const;\n\n        std::vector<std::string> const& getTestsOrTags() const override;\n        std::vector<std::string> const& getSectionsToRun() const override;\n\n        TestSpec const& testSpec() const override;\n        bool hasTestFilters() const override;\n\n        bool showHelp() const;\n\n        // IConfig interface\n        bool allowThrows() const override;\n        std::ostream& stream() const override;\n        std::string name() const override;\n        bool includeSuccessfulResults() const override;\n        bool warnAboutMissingAssertions() const override;\n        bool warnAboutNoTests() const override;\n        ShowDurations::OrNot showDurations() const override;\n        double minDuration() const override;\n        RunTests::InWhatOrder runOrder() const override;\n        unsigned int rngSeed() const override;\n        UseColour::YesOrNo useColour() const override;\n        bool shouldDebugBreak() const override;\n        int abortAfter() const override;\n        bool showInvisibles() const override;\n        Verbosity verbosity() const override;\n        bool benchmarkNoAnalysis() const override;\n        int benchmarkSamples() const override;\n        double benchmarkConfidenceInterval() const override;\n        unsigned int benchmarkResamples() const override;\n        std::chrono::milliseconds benchmarkWarmupTime() const override;\n\n    private:\n\n        IStream const* openStream();\n        ConfigData m_data;\n\n        std::unique_ptr<IStream const> m_stream;\n        TestSpec m_testSpec;\n        bool m_hasTestFilters = false;\n    };\n\n} // end namespace Catch\n\n// end catch_config.hpp\n// start catch_assertionresult.h\n\n#include <string>\n\nnamespace Catch {\n\n    struct AssertionResultData\n    {\n        AssertionResultData() = delete;\n\n        AssertionResultData( ResultWas::OfType _resultType, LazyExpression const& _lazyExpression );\n\n        std::string message;\n        mutable std::string reconstructedExpression;\n        LazyExpression lazyExpression;\n        ResultWas::OfType resultType;\n\n        std::string reconstructExpression() const;\n    };\n\n    class AssertionResult {\n    public:\n        AssertionResult() = delete;\n        AssertionResult( AssertionInfo const& info, AssertionResultData const& data );\n\n        bool isOk() const;\n        bool succeeded() const;\n        ResultWas::OfType getResultType() const;\n        bool hasExpression() const;\n        bool hasMessage() const;\n        std::string getExpression() const;\n        std::string getExpressionInMacro() const;\n        bool hasExpandedExpression() const;\n        std::string getExpandedExpression() const;\n        std::string getMessage() const;\n        SourceLineInfo getSourceInfo() const;\n        StringRef getTestMacroName() const;\n\n    //protected:\n        AssertionInfo m_info;\n        AssertionResultData m_resultData;\n    };\n\n} // end namespace Catch\n\n// end catch_assertionresult.h\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n// start catch_estimate.hpp\n\n // Statistics estimates\n\n\nnamespace Catch {\n    namespace Benchmark {\n        template <typename Duration>\n        struct Estimate {\n            Duration point;\n            Duration lower_bound;\n            Duration upper_bound;\n            double confidence_interval;\n\n            template <typename Duration2>\n            operator Estimate<Duration2>() const {\n                return { point, lower_bound, upper_bound, confidence_interval };\n            }\n        };\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_estimate.hpp\n// start catch_outlier_classification.hpp\n\n// Outlier information\n\nnamespace Catch {\n    namespace Benchmark {\n        struct OutlierClassification {\n            int samples_seen = 0;\n            int low_severe = 0;     // more than 3 times IQR below Q1\n            int low_mild = 0;       // 1.5 to 3 times IQR below Q1\n            int high_mild = 0;      // 1.5 to 3 times IQR above Q3\n            int high_severe = 0;    // more than 3 times IQR above Q3\n\n            int total() const {\n                return low_severe + low_mild + high_mild + high_severe;\n            }\n        };\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_outlier_classification.hpp\n\n#include <iterator>\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n\n#include <string>\n#include <iosfwd>\n#include <map>\n#include <set>\n#include <memory>\n#include <algorithm>\n\nnamespace Catch {\n\n    struct ReporterConfig {\n        explicit ReporterConfig( IConfigPtr const& _fullConfig );\n\n        ReporterConfig( IConfigPtr const& _fullConfig, std::ostream& _stream );\n\n        std::ostream& stream() const;\n        IConfigPtr fullConfig() const;\n\n    private:\n        std::ostream* m_stream;\n        IConfigPtr m_fullConfig;\n    };\n\n    struct ReporterPreferences {\n        bool shouldRedirectStdOut = false;\n        bool shouldReportAllAssertions = false;\n    };\n\n    template<typename T>\n    struct LazyStat : Option<T> {\n        LazyStat& operator=( T const& _value ) {\n            Option<T>::operator=( _value );\n            used = false;\n            return *this;\n        }\n        void reset() {\n            Option<T>::reset();\n            used = false;\n        }\n        bool used = false;\n    };\n\n    struct TestRunInfo {\n        TestRunInfo( std::string const& _name );\n        std::string name;\n    };\n    struct GroupInfo {\n        GroupInfo(  std::string const& _name,\n                    std::size_t _groupIndex,\n                    std::size_t _groupsCount );\n\n        std::string name;\n        std::size_t groupIndex;\n        std::size_t groupsCounts;\n    };\n\n    struct AssertionStats {\n        AssertionStats( AssertionResult const& _assertionResult,\n                        std::vector<MessageInfo> const& _infoMessages,\n                        Totals const& _totals );\n\n        AssertionStats( AssertionStats const& )              = default;\n        AssertionStats( AssertionStats && )                  = default;\n        AssertionStats& operator = ( AssertionStats const& ) = delete;\n        AssertionStats& operator = ( AssertionStats && )     = delete;\n        virtual ~AssertionStats();\n\n        AssertionResult assertionResult;\n        std::vector<MessageInfo> infoMessages;\n        Totals totals;\n    };\n\n    struct SectionStats {\n        SectionStats(   SectionInfo const& _sectionInfo,\n                        Counts const& _assertions,\n                        double _durationInSeconds,\n                        bool _missingAssertions );\n        SectionStats( SectionStats const& )              = default;\n        SectionStats( SectionStats && )                  = default;\n        SectionStats& operator = ( SectionStats const& ) = default;\n        SectionStats& operator = ( SectionStats && )     = default;\n        virtual ~SectionStats();\n\n        SectionInfo sectionInfo;\n        Counts assertions;\n        double durationInSeconds;\n        bool missingAssertions;\n    };\n\n    struct TestCaseStats {\n        TestCaseStats(  TestCaseInfo const& _testInfo,\n                        Totals const& _totals,\n                        std::string const& _stdOut,\n                        std::string const& _stdErr,\n                        bool _aborting );\n\n        TestCaseStats( TestCaseStats const& )              = default;\n        TestCaseStats( TestCaseStats && )                  = default;\n        TestCaseStats& operator = ( TestCaseStats const& ) = default;\n        TestCaseStats& operator = ( TestCaseStats && )     = default;\n        virtual ~TestCaseStats();\n\n        TestCaseInfo testInfo;\n        Totals totals;\n        std::string stdOut;\n        std::string stdErr;\n        bool aborting;\n    };\n\n    struct TestGroupStats {\n        TestGroupStats( GroupInfo const& _groupInfo,\n                        Totals const& _totals,\n                        bool _aborting );\n        TestGroupStats( GroupInfo const& _groupInfo );\n\n        TestGroupStats( TestGroupStats const& )              = default;\n        TestGroupStats( TestGroupStats && )                  = default;\n        TestGroupStats& operator = ( TestGroupStats const& ) = default;\n        TestGroupStats& operator = ( TestGroupStats && )     = default;\n        virtual ~TestGroupStats();\n\n        GroupInfo groupInfo;\n        Totals totals;\n        bool aborting;\n    };\n\n    struct TestRunStats {\n        TestRunStats(   TestRunInfo const& _runInfo,\n                        Totals const& _totals,\n                        bool _aborting );\n\n        TestRunStats( TestRunStats const& )              = default;\n        TestRunStats( TestRunStats && )                  = default;\n        TestRunStats& operator = ( TestRunStats const& ) = default;\n        TestRunStats& operator = ( TestRunStats && )     = default;\n        virtual ~TestRunStats();\n\n        TestRunInfo runInfo;\n        Totals totals;\n        bool aborting;\n    };\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n    struct BenchmarkInfo {\n        std::string name;\n        double estimatedDuration;\n        int iterations;\n        int samples;\n        unsigned int resamples;\n        double clockResolution;\n        double clockCost;\n    };\n\n    template <class Duration>\n    struct BenchmarkStats {\n        BenchmarkInfo info;\n\n        std::vector<Duration> samples;\n        Benchmark::Estimate<Duration> mean;\n        Benchmark::Estimate<Duration> standardDeviation;\n        Benchmark::OutlierClassification outliers;\n        double outlierVariance;\n\n        template <typename Duration2>\n        operator BenchmarkStats<Duration2>() const {\n            std::vector<Duration2> samples2;\n            samples2.reserve(samples.size());\n            std::transform(samples.begin(), samples.end(), std::back_inserter(samples2), [](Duration d) { return Duration2(d); });\n            return {\n                info,\n                std::move(samples2),\n                mean,\n                standardDeviation,\n                outliers,\n                outlierVariance,\n            };\n        }\n    };\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n\n    struct IStreamingReporter {\n        virtual ~IStreamingReporter() = default;\n\n        // Implementing class must also provide the following static methods:\n        // static std::string getDescription();\n        // static std::set<Verbosity> getSupportedVerbosities()\n\n        virtual ReporterPreferences getPreferences() const = 0;\n\n        virtual void noMatchingTestCases( std::string const& spec ) = 0;\n\n        virtual void reportInvalidArguments(std::string const&) {}\n\n        virtual void testRunStarting( TestRunInfo const& testRunInfo ) = 0;\n        virtual void testGroupStarting( GroupInfo const& groupInfo ) = 0;\n\n        virtual void testCaseStarting( TestCaseInfo const& testInfo ) = 0;\n        virtual void sectionStarting( SectionInfo const& sectionInfo ) = 0;\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n        virtual void benchmarkPreparing( std::string const& ) {}\n        virtual void benchmarkStarting( BenchmarkInfo const& ) {}\n        virtual void benchmarkEnded( BenchmarkStats<> const& ) {}\n        virtual void benchmarkFailed( std::string const& ) {}\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n\n        virtual void assertionStarting( AssertionInfo const& assertionInfo ) = 0;\n\n        // The return value indicates if the messages buffer should be cleared:\n        virtual bool assertionEnded( AssertionStats const& assertionStats ) = 0;\n\n        virtual void sectionEnded( SectionStats const& sectionStats ) = 0;\n        virtual void testCaseEnded( TestCaseStats const& testCaseStats ) = 0;\n        virtual void testGroupEnded( TestGroupStats const& testGroupStats ) = 0;\n        virtual void testRunEnded( TestRunStats const& testRunStats ) = 0;\n\n        virtual void skipTest( TestCaseInfo const& testInfo ) = 0;\n\n        // Default empty implementation provided\n        virtual void fatalErrorEncountered( StringRef name );\n\n        virtual bool isMulti() const;\n    };\n    using IStreamingReporterPtr = std::unique_ptr<IStreamingReporter>;\n\n    struct IReporterFactory {\n        virtual ~IReporterFactory();\n        virtual IStreamingReporterPtr create( ReporterConfig const& config ) const = 0;\n        virtual std::string getDescription() const = 0;\n    };\n    using IReporterFactoryPtr = std::shared_ptr<IReporterFactory>;\n\n    struct IReporterRegistry {\n        using FactoryMap = std::map<std::string, IReporterFactoryPtr>;\n        using Listeners = std::vector<IReporterFactoryPtr>;\n\n        virtual ~IReporterRegistry();\n        virtual IStreamingReporterPtr create( std::string const& name, IConfigPtr const& config ) const = 0;\n        virtual FactoryMap const& getFactories() const = 0;\n        virtual Listeners const& getListeners() const = 0;\n    };\n\n} // end namespace Catch\n\n// end catch_interfaces_reporter.h\n#include <algorithm>\n#include <cstring>\n#include <cfloat>\n#include <cstdio>\n#include <cassert>\n#include <memory>\n#include <ostream>\n\nnamespace Catch {\n    void prepareExpandedExpression(AssertionResult& result);\n\n    // Returns double formatted as %.3f (format expected on output)\n    std::string getFormattedDuration( double duration );\n\n    //! Should the reporter show\n    bool shouldShowDuration( IConfig const& config, double duration );\n\n    std::string serializeFilters( std::vector<std::string> const& container );\n\n    template<typename DerivedT>\n    struct StreamingReporterBase : IStreamingReporter {\n\n        StreamingReporterBase( ReporterConfig const& _config )\n        :   m_config( _config.fullConfig() ),\n            stream( _config.stream() )\n        {\n            m_reporterPrefs.shouldRedirectStdOut = false;\n            if( !DerivedT::getSupportedVerbosities().count( m_config->verbosity() ) )\n                CATCH_ERROR( \"Verbosity level not supported by this reporter\" );\n        }\n\n        ReporterPreferences getPreferences() const override {\n            return m_reporterPrefs;\n        }\n\n        static std::set<Verbosity> getSupportedVerbosities() {\n            return { Verbosity::Normal };\n        }\n\n        ~StreamingReporterBase() override = default;\n\n        void noMatchingTestCases(std::string const&) override {}\n\n        void reportInvalidArguments(std::string const&) override {}\n\n        void testRunStarting(TestRunInfo const& _testRunInfo) override {\n            currentTestRunInfo = _testRunInfo;\n        }\n\n        void testGroupStarting(GroupInfo const& _groupInfo) override {\n            currentGroupInfo = _groupInfo;\n        }\n\n        void testCaseStarting(TestCaseInfo const& _testInfo) override  {\n            currentTestCaseInfo = _testInfo;\n        }\n        void sectionStarting(SectionInfo const& _sectionInfo) override {\n            m_sectionStack.push_back(_sectionInfo);\n        }\n\n        void sectionEnded(SectionStats const& /* _sectionStats */) override {\n            m_sectionStack.pop_back();\n        }\n        void testCaseEnded(TestCaseStats const& /* _testCaseStats */) override {\n            currentTestCaseInfo.reset();\n        }\n        void testGroupEnded(TestGroupStats const& /* _testGroupStats */) override {\n            currentGroupInfo.reset();\n        }\n        void testRunEnded(TestRunStats const& /* _testRunStats */) override {\n            currentTestCaseInfo.reset();\n            currentGroupInfo.reset();\n            currentTestRunInfo.reset();\n        }\n\n        void skipTest(TestCaseInfo const&) override {\n            // Don't do anything with this by default.\n            // It can optionally be overridden in the derived class.\n        }\n\n        IConfigPtr m_config;\n        std::ostream& stream;\n\n        LazyStat<TestRunInfo> currentTestRunInfo;\n        LazyStat<GroupInfo> currentGroupInfo;\n        LazyStat<TestCaseInfo> currentTestCaseInfo;\n\n        std::vector<SectionInfo> m_sectionStack;\n        ReporterPreferences m_reporterPrefs;\n    };\n\n    template<typename DerivedT>\n    struct CumulativeReporterBase : IStreamingReporter {\n        template<typename T, typename ChildNodeT>\n        struct Node {\n            explicit Node( T const& _value ) : value( _value ) {}\n            virtual ~Node() {}\n\n            using ChildNodes = std::vector<std::shared_ptr<ChildNodeT>>;\n            T value;\n            ChildNodes children;\n        };\n        struct SectionNode {\n            explicit SectionNode(SectionStats const& _stats) : stats(_stats) {}\n            virtual ~SectionNode() = default;\n\n            bool operator == (SectionNode const& other) const {\n                return stats.sectionInfo.lineInfo == other.stats.sectionInfo.lineInfo;\n            }\n            bool operator == (std::shared_ptr<SectionNode> const& other) const {\n                return operator==(*other);\n            }\n\n            SectionStats stats;\n            using ChildSections = std::vector<std::shared_ptr<SectionNode>>;\n            using Assertions = std::vector<AssertionStats>;\n            ChildSections childSections;\n            Assertions assertions;\n            std::string stdOut;\n            std::string stdErr;\n        };\n\n        struct BySectionInfo {\n            BySectionInfo( SectionInfo const& other ) : m_other( other ) {}\n            BySectionInfo( BySectionInfo const& other ) : m_other( other.m_other ) {}\n            bool operator() (std::shared_ptr<SectionNode> const& node) const {\n                return ((node->stats.sectionInfo.name == m_other.name) &&\n                        (node->stats.sectionInfo.lineInfo == m_other.lineInfo));\n            }\n            void operator=(BySectionInfo const&) = delete;\n\n        private:\n            SectionInfo const& m_other;\n        };\n\n        using TestCaseNode = Node<TestCaseStats, SectionNode>;\n        using TestGroupNode = Node<TestGroupStats, TestCaseNode>;\n        using TestRunNode = Node<TestRunStats, TestGroupNode>;\n\n        CumulativeReporterBase( ReporterConfig const& _config )\n        :   m_config( _config.fullConfig() ),\n            stream( _config.stream() )\n        {\n            m_reporterPrefs.shouldRedirectStdOut = false;\n            if( !DerivedT::getSupportedVerbosities().count( m_config->verbosity() ) )\n                CATCH_ERROR( \"Verbosity level not supported by this reporter\" );\n        }\n        ~CumulativeReporterBase() override = default;\n\n        ReporterPreferences getPreferences() const override {\n            return m_reporterPrefs;\n        }\n\n        static std::set<Verbosity> getSupportedVerbosities() {\n            return { Verbosity::Normal };\n        }\n\n        void testRunStarting( TestRunInfo const& ) override {}\n        void testGroupStarting( GroupInfo const& ) override {}\n\n        void testCaseStarting( TestCaseInfo const& ) override {}\n\n        void sectionStarting( SectionInfo const& sectionInfo ) override {\n            SectionStats incompleteStats( sectionInfo, Counts(), 0, false );\n            std::shared_ptr<SectionNode> node;\n            if( m_sectionStack.empty() ) {\n                if( !m_rootSection )\n                    m_rootSection = std::make_shared<SectionNode>( incompleteStats );\n                node = m_rootSection;\n            }\n            else {\n                SectionNode& parentNode = *m_sectionStack.back();\n                auto it =\n                    std::find_if(   parentNode.childSections.begin(),\n                                    parentNode.childSections.end(),\n                                    BySectionInfo( sectionInfo ) );\n                if( it == parentNode.childSections.end() ) {\n                    node = std::make_shared<SectionNode>( incompleteStats );\n                    parentNode.childSections.push_back( node );\n                }\n                else\n                    node = *it;\n            }\n            m_sectionStack.push_back( node );\n            m_deepestSection = std::move(node);\n        }\n\n        void assertionStarting(AssertionInfo const&) override {}\n\n        bool assertionEnded(AssertionStats const& assertionStats) override {\n            assert(!m_sectionStack.empty());\n            // AssertionResult holds a pointer to a temporary DecomposedExpression,\n            // which getExpandedExpression() calls to build the expression string.\n            // Our section stack copy of the assertionResult will likely outlive the\n            // temporary, so it must be expanded or discarded now to avoid calling\n            // a destroyed object later.\n            prepareExpandedExpression(const_cast<AssertionResult&>( assertionStats.assertionResult ) );\n            SectionNode& sectionNode = *m_sectionStack.back();\n            sectionNode.assertions.push_back(assertionStats);\n            return true;\n        }\n        void sectionEnded(SectionStats const& sectionStats) override {\n            assert(!m_sectionStack.empty());\n            SectionNode& node = *m_sectionStack.back();\n            node.stats = sectionStats;\n            m_sectionStack.pop_back();\n        }\n        void testCaseEnded(TestCaseStats const& testCaseStats) override {\n            auto node = std::make_shared<TestCaseNode>(testCaseStats);\n            assert(m_sectionStack.size() == 0);\n            node->children.push_back(m_rootSection);\n            m_testCases.push_back(node);\n            m_rootSection.reset();\n\n            assert(m_deepestSection);\n            m_deepestSection->stdOut = testCaseStats.stdOut;\n            m_deepestSection->stdErr = testCaseStats.stdErr;\n        }\n        void testGroupEnded(TestGroupStats const& testGroupStats) override {\n            auto node = std::make_shared<TestGroupNode>(testGroupStats);\n            node->children.swap(m_testCases);\n            m_testGroups.push_back(node);\n        }\n        void testRunEnded(TestRunStats const& testRunStats) override {\n            auto node = std::make_shared<TestRunNode>(testRunStats);\n            node->children.swap(m_testGroups);\n            m_testRuns.push_back(node);\n            testRunEndedCumulative();\n        }\n        virtual void testRunEndedCumulative() = 0;\n\n        void skipTest(TestCaseInfo const&) override {}\n\n        IConfigPtr m_config;\n        std::ostream& stream;\n        std::vector<AssertionStats> m_assertions;\n        std::vector<std::vector<std::shared_ptr<SectionNode>>> m_sections;\n        std::vector<std::shared_ptr<TestCaseNode>> m_testCases;\n        std::vector<std::shared_ptr<TestGroupNode>> m_testGroups;\n\n        std::vector<std::shared_ptr<TestRunNode>> m_testRuns;\n\n        std::shared_ptr<SectionNode> m_rootSection;\n        std::shared_ptr<SectionNode> m_deepestSection;\n        std::vector<std::shared_ptr<SectionNode>> m_sectionStack;\n        ReporterPreferences m_reporterPrefs;\n    };\n\n    template<char C>\n    char const* getLineOfChars() {\n        static char line[CATCH_CONFIG_CONSOLE_WIDTH] = {0};\n        if( !*line ) {\n            std::memset( line, C, CATCH_CONFIG_CONSOLE_WIDTH-1 );\n            line[CATCH_CONFIG_CONSOLE_WIDTH-1] = 0;\n        }\n        return line;\n    }\n\n    struct TestEventListenerBase : StreamingReporterBase<TestEventListenerBase> {\n        TestEventListenerBase( ReporterConfig const& _config );\n\n        static std::set<Verbosity> getSupportedVerbosities();\n\n        void assertionStarting(AssertionInfo const&) override;\n        bool assertionEnded(AssertionStats const&) override;\n    };\n\n} // end namespace Catch\n\n// end catch_reporter_bases.hpp\n// start catch_console_colour.h\n\nnamespace Catch {\n\n    struct Colour {\n        enum Code {\n            None = 0,\n\n            White,\n            Red,\n            Green,\n            Blue,\n            Cyan,\n            Yellow,\n            Grey,\n\n            Bright = 0x10,\n\n            BrightRed = Bright | Red,\n            BrightGreen = Bright | Green,\n            LightGrey = Bright | Grey,\n            BrightWhite = Bright | White,\n            BrightYellow = Bright | Yellow,\n\n            // By intention\n            FileName = LightGrey,\n            Warning = BrightYellow,\n            ResultError = BrightRed,\n            ResultSuccess = BrightGreen,\n            ResultExpectedFailure = Warning,\n\n            Error = BrightRed,\n            Success = Green,\n\n            OriginalExpression = Cyan,\n            ReconstructedExpression = BrightYellow,\n\n            SecondaryText = LightGrey,\n            Headers = White\n        };\n\n        // Use constructed object for RAII guard\n        Colour( Code _colourCode );\n        Colour( Colour&& other ) noexcept;\n        Colour& operator=( Colour&& other ) noexcept;\n        ~Colour();\n\n        // Use static method for one-shot changes\n        static void use( Code _colourCode );\n\n    private:\n        bool m_moved = false;\n    };\n\n    std::ostream& operator << ( std::ostream& os, Colour const& );\n\n} // end namespace Catch\n\n// end catch_console_colour.h\n// start catch_reporter_registrars.hpp\n\n\nnamespace Catch {\n\n    template<typename T>\n    class ReporterRegistrar {\n\n        class ReporterFactory : public IReporterFactory {\n\n            IStreamingReporterPtr create( ReporterConfig const& config ) const override {\n                return std::unique_ptr<T>( new T( config ) );\n            }\n\n            std::string getDescription() const override {\n                return T::getDescription();\n            }\n        };\n\n    public:\n\n        explicit ReporterRegistrar( std::string const& name ) {\n            getMutableRegistryHub().registerReporter( name, std::make_shared<ReporterFactory>() );\n        }\n    };\n\n    template<typename T>\n    class ListenerRegistrar {\n\n        class ListenerFactory : public IReporterFactory {\n\n            IStreamingReporterPtr create( ReporterConfig const& config ) const override {\n                return std::unique_ptr<T>( new T( config ) );\n            }\n            std::string getDescription() const override {\n                return std::string();\n            }\n        };\n\n    public:\n\n        ListenerRegistrar() {\n            getMutableRegistryHub().registerListener( std::make_shared<ListenerFactory>() );\n        }\n    };\n}\n\n#if !defined(CATCH_CONFIG_DISABLE)\n\n#define CATCH_REGISTER_REPORTER( name, reporterType ) \\\n    CATCH_INTERNAL_START_WARNINGS_SUPPRESSION         \\\n    CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS          \\\n    namespace{ Catch::ReporterRegistrar<reporterType> catch_internal_RegistrarFor##reporterType( name ); } \\\n    CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION\n\n#define CATCH_REGISTER_LISTENER( listenerType ) \\\n    CATCH_INTERNAL_START_WARNINGS_SUPPRESSION   \\\n    CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS    \\\n    namespace{ Catch::ListenerRegistrar<listenerType> catch_internal_RegistrarFor##listenerType; } \\\n    CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION\n#else // CATCH_CONFIG_DISABLE\n\n#define CATCH_REGISTER_REPORTER(name, reporterType)\n#define CATCH_REGISTER_LISTENER(listenerType)\n\n#endif // CATCH_CONFIG_DISABLE\n\n// end catch_reporter_registrars.hpp\n// Allow users to base their work off existing reporters\n// start catch_reporter_compact.h\n\nnamespace Catch {\n\n    struct CompactReporter : StreamingReporterBase<CompactReporter> {\n\n        using StreamingReporterBase::StreamingReporterBase;\n\n        ~CompactReporter() override;\n\n        static std::string getDescription();\n\n        void noMatchingTestCases(std::string const& spec) override;\n\n        void assertionStarting(AssertionInfo const&) override;\n\n        bool assertionEnded(AssertionStats const& _assertionStats) override;\n\n        void sectionEnded(SectionStats const& _sectionStats) override;\n\n        void testRunEnded(TestRunStats const& _testRunStats) override;\n\n    };\n\n} // end namespace Catch\n\n// end catch_reporter_compact.h\n// start catch_reporter_console.h\n\n#if defined(_MSC_VER)\n#pragma warning(push)\n#pragma warning(disable:4061) // Not all labels are EXPLICITLY handled in switch\n                              // Note that 4062 (not all labels are handled\n                              // and default is missing) is enabled\n#endif\n\nnamespace Catch {\n    // Fwd decls\n    struct SummaryColumn;\n    class TablePrinter;\n\n    struct ConsoleReporter : StreamingReporterBase<ConsoleReporter> {\n        std::unique_ptr<TablePrinter> m_tablePrinter;\n\n        ConsoleReporter(ReporterConfig const& config);\n        ~ConsoleReporter() override;\n        static std::string getDescription();\n\n        void noMatchingTestCases(std::string const& spec) override;\n\n        void reportInvalidArguments(std::string const&arg) override;\n\n        void assertionStarting(AssertionInfo const&) override;\n\n        bool assertionEnded(AssertionStats const& _assertionStats) override;\n\n        void sectionStarting(SectionInfo const& _sectionInfo) override;\n        void sectionEnded(SectionStats const& _sectionStats) override;\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n        void benchmarkPreparing(std::string const& name) override;\n        void benchmarkStarting(BenchmarkInfo const& info) override;\n        void benchmarkEnded(BenchmarkStats<> const& stats) override;\n        void benchmarkFailed(std::string const& error) override;\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n\n        void testCaseEnded(TestCaseStats const& _testCaseStats) override;\n        void testGroupEnded(TestGroupStats const& _testGroupStats) override;\n        void testRunEnded(TestRunStats const& _testRunStats) override;\n        void testRunStarting(TestRunInfo const& _testRunInfo) override;\n    private:\n\n        void lazyPrint();\n\n        void lazyPrintWithoutClosingBenchmarkTable();\n        void lazyPrintRunInfo();\n        void lazyPrintGroupInfo();\n        void printTestCaseAndSectionHeader();\n\n        void printClosedHeader(std::string const& _name);\n        void printOpenHeader(std::string const& _name);\n\n        // if string has a : in first line will set indent to follow it on\n        // subsequent lines\n        void printHeaderString(std::string const& _string, std::size_t indent = 0);\n\n        void printTotals(Totals const& totals);\n        void printSummaryRow(std::string const& label, std::vector<SummaryColumn> const& cols, std::size_t row);\n\n        void printTotalsDivider(Totals const& totals);\n        void printSummaryDivider();\n        void printTestFilters();\n\n    private:\n        bool m_headerPrinted = false;\n    };\n\n} // end namespace Catch\n\n#if defined(_MSC_VER)\n#pragma warning(pop)\n#endif\n\n// end catch_reporter_console.h\n// start catch_reporter_junit.h\n\n// start catch_xmlwriter.h\n\n#include <vector>\n\nnamespace Catch {\n    enum class XmlFormatting {\n        None = 0x00,\n        Indent = 0x01,\n        Newline = 0x02,\n    };\n\n    XmlFormatting operator | (XmlFormatting lhs, XmlFormatting rhs);\n    XmlFormatting operator & (XmlFormatting lhs, XmlFormatting rhs);\n\n    class XmlEncode {\n    public:\n        enum ForWhat { ForTextNodes, ForAttributes };\n\n        XmlEncode( std::string const& str, ForWhat forWhat = ForTextNodes );\n\n        void encodeTo( std::ostream& os ) const;\n\n        friend std::ostream& operator << ( std::ostream& os, XmlEncode const& xmlEncode );\n\n    private:\n        std::string m_str;\n        ForWhat m_forWhat;\n    };\n\n    class XmlWriter {\n    public:\n\n        class ScopedElement {\n        public:\n            ScopedElement( XmlWriter* writer, XmlFormatting fmt );\n\n            ScopedElement( ScopedElement&& other ) noexcept;\n            ScopedElement& operator=( ScopedElement&& other ) noexcept;\n\n            ~ScopedElement();\n\n            ScopedElement& writeText( std::string const& text, XmlFormatting fmt = XmlFormatting::Newline | XmlFormatting::Indent );\n\n            template<typename T>\n            ScopedElement& writeAttribute( std::string const& name, T const& attribute ) {\n                m_writer->writeAttribute( name, attribute );\n                return *this;\n            }\n\n        private:\n            mutable XmlWriter* m_writer = nullptr;\n            XmlFormatting m_fmt;\n        };\n\n        XmlWriter( std::ostream& os = Catch::cout() );\n        ~XmlWriter();\n\n        XmlWriter( XmlWriter const& ) = delete;\n        XmlWriter& operator=( XmlWriter const& ) = delete;\n\n        XmlWriter& startElement( std::string const& name, XmlFormatting fmt = XmlFormatting::Newline | XmlFormatting::Indent);\n\n        ScopedElement scopedElement( std::string const& name, XmlFormatting fmt = XmlFormatting::Newline | XmlFormatting::Indent);\n\n        XmlWriter& endElement(XmlFormatting fmt = XmlFormatting::Newline | XmlFormatting::Indent);\n\n        XmlWriter& writeAttribute( std::string const& name, std::string const& attribute );\n\n        XmlWriter& writeAttribute( std::string const& name, bool attribute );\n\n        template<typename T>\n        XmlWriter& writeAttribute( std::string const& name, T const& attribute ) {\n            ReusableStringStream rss;\n            rss << attribute;\n            return writeAttribute( name, rss.str() );\n        }\n\n        XmlWriter& writeText( std::string const& text, XmlFormatting fmt = XmlFormatting::Newline | XmlFormatting::Indent);\n\n        XmlWriter& writeComment(std::string const& text, XmlFormatting fmt = XmlFormatting::Newline | XmlFormatting::Indent);\n\n        void writeStylesheetRef( std::string const& url );\n\n        XmlWriter& writeBlankLine();\n\n        void ensureTagClosed();\n\n    private:\n\n        void applyFormatting(XmlFormatting fmt);\n\n        void writeDeclaration();\n\n        void newlineIfNecessary();\n\n        bool m_tagIsOpen = false;\n        bool m_needsNewline = false;\n        std::vector<std::string> m_tags;\n        std::string m_indent;\n        std::ostream& m_os;\n    };\n\n}\n\n// end catch_xmlwriter.h\nnamespace Catch {\n\n    class JunitReporter : public CumulativeReporterBase<JunitReporter> {\n    public:\n        JunitReporter(ReporterConfig const& _config);\n\n        ~JunitReporter() override;\n\n        static std::string getDescription();\n\n        void noMatchingTestCases(std::string const& /*spec*/) override;\n\n        void testRunStarting(TestRunInfo const& runInfo) override;\n\n        void testGroupStarting(GroupInfo const& groupInfo) override;\n\n        void testCaseStarting(TestCaseInfo const& testCaseInfo) override;\n        bool assertionEnded(AssertionStats const& assertionStats) override;\n\n        void testCaseEnded(TestCaseStats const& testCaseStats) override;\n\n        void testGroupEnded(TestGroupStats const& testGroupStats) override;\n\n        void testRunEndedCumulative() override;\n\n        void writeGroup(TestGroupNode const& groupNode, double suiteTime);\n\n        void writeTestCase(TestCaseNode const& testCaseNode);\n\n        void writeSection( std::string const& className,\n                           std::string const& rootName,\n                           SectionNode const& sectionNode,\n                           bool testOkToFail );\n\n        void writeAssertions(SectionNode const& sectionNode);\n        void writeAssertion(AssertionStats const& stats);\n\n        XmlWriter xml;\n        Timer suiteTimer;\n        std::string stdOutForSuite;\n        std::string stdErrForSuite;\n        unsigned int unexpectedExceptions = 0;\n        bool m_okToFail = false;\n    };\n\n} // end namespace Catch\n\n// end catch_reporter_junit.h\n// start catch_reporter_xml.h\n\nnamespace Catch {\n    class XmlReporter : public StreamingReporterBase<XmlReporter> {\n    public:\n        XmlReporter(ReporterConfig const& _config);\n\n        ~XmlReporter() override;\n\n        static std::string getDescription();\n\n        virtual std::string getStylesheetRef() const;\n\n        void writeSourceInfo(SourceLineInfo const& sourceInfo);\n\n    public: // StreamingReporterBase\n\n        void noMatchingTestCases(std::string const& s) override;\n\n        void testRunStarting(TestRunInfo const& testInfo) override;\n\n        void testGroupStarting(GroupInfo const& groupInfo) override;\n\n        void testCaseStarting(TestCaseInfo const& testInfo) override;\n\n        void sectionStarting(SectionInfo const& sectionInfo) override;\n\n        void assertionStarting(AssertionInfo const&) override;\n\n        bool assertionEnded(AssertionStats const& assertionStats) override;\n\n        void sectionEnded(SectionStats const& sectionStats) override;\n\n        void testCaseEnded(TestCaseStats const& testCaseStats) override;\n\n        void testGroupEnded(TestGroupStats const& testGroupStats) override;\n\n        void testRunEnded(TestRunStats const& testRunStats) override;\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n        void benchmarkPreparing(std::string const& name) override;\n        void benchmarkStarting(BenchmarkInfo const&) override;\n        void benchmarkEnded(BenchmarkStats<> const&) override;\n        void benchmarkFailed(std::string const&) override;\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n\n    private:\n        Timer m_testCaseTimer;\n        XmlWriter m_xml;\n        int m_sectionDepth = 0;\n    };\n\n} // end namespace Catch\n\n// end catch_reporter_xml.h\n\n// end catch_external_interfaces.h\n#endif\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n// start catch_benchmarking_all.hpp\n\n// A proxy header that includes all of the benchmarking headers to allow\n// concise include of the benchmarking features. You should prefer the\n// individual includes in standard use.\n\n// start catch_benchmark.hpp\n\n // Benchmark\n\n// start catch_chronometer.hpp\n\n// User-facing chronometer\n\n\n// start catch_clock.hpp\n\n// Clocks\n\n\n#include <chrono>\n#include <ratio>\n\nnamespace Catch {\n    namespace Benchmark {\n        template <typename Clock>\n        using ClockDuration = typename Clock::duration;\n        template <typename Clock>\n        using FloatDuration = std::chrono::duration<double, typename Clock::period>;\n\n        template <typename Clock>\n        using TimePoint = typename Clock::time_point;\n\n        using default_clock = std::chrono::steady_clock;\n\n        template <typename Clock>\n        struct now {\n            TimePoint<Clock> operator()() const {\n                return Clock::now();\n            }\n        };\n\n        using fp_seconds = std::chrono::duration<double, std::ratio<1>>;\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_clock.hpp\n// start catch_optimizer.hpp\n\n // Hinting the optimizer\n\n\n#if defined(_MSC_VER)\n#   include <atomic> // atomic_thread_fence\n#endif\n\nnamespace Catch {\n    namespace Benchmark {\n#if defined(__GNUC__) || defined(__clang__)\n        template <typename T>\n        inline void keep_memory(T* p) {\n            asm volatile(\"\" : : \"g\"(p) : \"memory\");\n        }\n        inline void keep_memory() {\n            asm volatile(\"\" : : : \"memory\");\n        }\n\n        namespace Detail {\n            inline void optimizer_barrier() { keep_memory(); }\n        } // namespace Detail\n#elif defined(_MSC_VER)\n\n#pragma optimize(\"\", off)\n        template <typename T>\n        inline void keep_memory(T* p) {\n            // thanks @milleniumbug\n            *reinterpret_cast<char volatile*>(p) = *reinterpret_cast<char const volatile*>(p);\n        }\n        // TODO equivalent keep_memory()\n#pragma optimize(\"\", on)\n\n        namespace Detail {\n            inline void optimizer_barrier() {\n                std::atomic_thread_fence(std::memory_order_seq_cst);\n            }\n        } // namespace Detail\n\n#endif\n\n        template <typename T>\n        inline void deoptimize_value(T&& x) {\n            keep_memory(&x);\n        }\n\n        template <typename Fn, typename... Args>\n        inline auto invoke_deoptimized(Fn&& fn, Args&&... args) -> typename std::enable_if<!std::is_same<void, decltype(fn(args...))>::value>::type {\n            deoptimize_value(std::forward<Fn>(fn) (std::forward<Args...>(args...)));\n        }\n\n        template <typename Fn, typename... Args>\n        inline auto invoke_deoptimized(Fn&& fn, Args&&... args) -> typename std::enable_if<std::is_same<void, decltype(fn(args...))>::value>::type {\n            std::forward<Fn>(fn) (std::forward<Args...>(args...));\n        }\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_optimizer.hpp\n// start catch_complete_invoke.hpp\n\n// Invoke with a special case for void\n\n\n#include <type_traits>\n#include <utility>\n\nnamespace Catch {\n    namespace Benchmark {\n        namespace Detail {\n            template <typename T>\n            struct CompleteType { using type = T; };\n            template <>\n            struct CompleteType<void> { struct type {}; };\n\n            template <typename T>\n            using CompleteType_t = typename CompleteType<T>::type;\n\n            template <typename Result>\n            struct CompleteInvoker {\n                template <typename Fun, typename... Args>\n                static Result invoke(Fun&& fun, Args&&... args) {\n                    return std::forward<Fun>(fun)(std::forward<Args>(args)...);\n                }\n            };\n            template <>\n            struct CompleteInvoker<void> {\n                template <typename Fun, typename... Args>\n                static CompleteType_t<void> invoke(Fun&& fun, Args&&... args) {\n                    std::forward<Fun>(fun)(std::forward<Args>(args)...);\n                    return {};\n                }\n            };\n\n            // invoke and not return void :(\n            template <typename Fun, typename... Args>\n            CompleteType_t<FunctionReturnType<Fun, Args...>> complete_invoke(Fun&& fun, Args&&... args) {\n                return CompleteInvoker<FunctionReturnType<Fun, Args...>>::invoke(std::forward<Fun>(fun), std::forward<Args>(args)...);\n            }\n\n            const std::string benchmarkErrorMsg = \"a benchmark failed to run successfully\";\n        } // namespace Detail\n\n        template <typename Fun>\n        Detail::CompleteType_t<FunctionReturnType<Fun>> user_code(Fun&& fun) {\n            CATCH_TRY{\n                return Detail::complete_invoke(std::forward<Fun>(fun));\n            } CATCH_CATCH_ALL{\n                getResultCapture().benchmarkFailed(translateActiveException());\n                CATCH_RUNTIME_ERROR(Detail::benchmarkErrorMsg);\n            }\n        }\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_complete_invoke.hpp\nnamespace Catch {\n    namespace Benchmark {\n        namespace Detail {\n            struct ChronometerConcept {\n                virtual void start() = 0;\n                virtual void finish() = 0;\n                virtual ~ChronometerConcept() = default;\n            };\n            template <typename Clock>\n            struct ChronometerModel final : public ChronometerConcept {\n                void start() override { started = Clock::now(); }\n                void finish() override { finished = Clock::now(); }\n\n                ClockDuration<Clock> elapsed() const { return finished - started; }\n\n                TimePoint<Clock> started;\n                TimePoint<Clock> finished;\n            };\n        } // namespace Detail\n\n        struct Chronometer {\n        public:\n            template <typename Fun>\n            void measure(Fun&& fun) { measure(std::forward<Fun>(fun), is_callable<Fun(int)>()); }\n\n            int runs() const { return k; }\n\n            Chronometer(Detail::ChronometerConcept& meter, int k)\n                : impl(&meter)\n                , k(k) {}\n\n        private:\n            template <typename Fun>\n            void measure(Fun&& fun, std::false_type) {\n                measure([&fun](int) { return fun(); }, std::true_type());\n            }\n\n            template <typename Fun>\n            void measure(Fun&& fun, std::true_type) {\n                Detail::optimizer_barrier();\n                impl->start();\n                for (int i = 0; i < k; ++i) invoke_deoptimized(fun, i);\n                impl->finish();\n                Detail::optimizer_barrier();\n            }\n\n            Detail::ChronometerConcept* impl;\n            int k;\n        };\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_chronometer.hpp\n// start catch_environment.hpp\n\n// Environment information\n\n\nnamespace Catch {\n    namespace Benchmark {\n        template <typename Duration>\n        struct EnvironmentEstimate {\n            Duration mean;\n            OutlierClassification outliers;\n\n            template <typename Duration2>\n            operator EnvironmentEstimate<Duration2>() const {\n                return { mean, outliers };\n            }\n        };\n        template <typename Clock>\n        struct Environment {\n            using clock_type = Clock;\n            EnvironmentEstimate<FloatDuration<Clock>> clock_resolution;\n            EnvironmentEstimate<FloatDuration<Clock>> clock_cost;\n        };\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_environment.hpp\n// start catch_execution_plan.hpp\n\n // Execution plan\n\n\n// start catch_benchmark_function.hpp\n\n // Dumb std::function implementation for consistent call overhead\n\n\n#include <cassert>\n#include <type_traits>\n#include <utility>\n#include <memory>\n\nnamespace Catch {\n    namespace Benchmark {\n        namespace Detail {\n            template <typename T>\n            using Decay = typename std::decay<T>::type;\n            template <typename T, typename U>\n            struct is_related\n                : std::is_same<Decay<T>, Decay<U>> {};\n\n            /// We need to reinvent std::function because every piece of code that might add overhead\n            /// in a measurement context needs to have consistent performance characteristics so that we\n            /// can account for it in the measurement.\n            /// Implementations of std::function with optimizations that aren't always applicable, like\n            /// small buffer optimizations, are not uncommon.\n            /// This is effectively an implementation of std::function without any such optimizations;\n            /// it may be slow, but it is consistently slow.\n            struct BenchmarkFunction {\n            private:\n                struct callable {\n                    virtual void call(Chronometer meter) const = 0;\n                    virtual callable* clone() const = 0;\n                    virtual ~callable() = default;\n                };\n                template <typename Fun>\n                struct model : public callable {\n                    model(Fun&& fun) : fun(std::move(fun)) {}\n                    model(Fun const& fun) : fun(fun) {}\n\n                    model<Fun>* clone() const override { return new model<Fun>(*this); }\n\n                    void call(Chronometer meter) const override {\n                        call(meter, is_callable<Fun(Chronometer)>());\n                    }\n                    void call(Chronometer meter, std::true_type) const {\n                        fun(meter);\n                    }\n                    void call(Chronometer meter, std::false_type) const {\n                        meter.measure(fun);\n                    }\n\n                    Fun fun;\n                };\n\n                struct do_nothing { void operator()() const {} };\n\n                template <typename T>\n                BenchmarkFunction(model<T>* c) : f(c) {}\n\n            public:\n                BenchmarkFunction()\n                    : f(new model<do_nothing>{ {} }) {}\n\n                template <typename Fun,\n                    typename std::enable_if<!is_related<Fun, BenchmarkFunction>::value, int>::type = 0>\n                    BenchmarkFunction(Fun&& fun)\n                    : f(new model<typename std::decay<Fun>::type>(std::forward<Fun>(fun))) {}\n\n                BenchmarkFunction(BenchmarkFunction&& that)\n                    : f(std::move(that.f)) {}\n\n                BenchmarkFunction(BenchmarkFunction const& that)\n                    : f(that.f->clone()) {}\n\n                BenchmarkFunction& operator=(BenchmarkFunction&& that) {\n                    f = std::move(that.f);\n                    return *this;\n                }\n\n                BenchmarkFunction& operator=(BenchmarkFunction const& that) {\n                    f.reset(that.f->clone());\n                    return *this;\n                }\n\n                void operator()(Chronometer meter) const { f->call(meter); }\n\n            private:\n                std::unique_ptr<callable> f;\n            };\n        } // namespace Detail\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_benchmark_function.hpp\n// start catch_repeat.hpp\n\n// repeat algorithm\n\n\n#include <type_traits>\n#include <utility>\n\nnamespace Catch {\n    namespace Benchmark {\n        namespace Detail {\n            template <typename Fun>\n            struct repeater {\n                void operator()(int k) const {\n                    for (int i = 0; i < k; ++i) {\n                        fun();\n                    }\n                }\n                Fun fun;\n            };\n            template <typename Fun>\n            repeater<typename std::decay<Fun>::type> repeat(Fun&& fun) {\n                return { std::forward<Fun>(fun) };\n            }\n        } // namespace Detail\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_repeat.hpp\n// start catch_run_for_at_least.hpp\n\n// Run a function for a minimum amount of time\n\n\n// start catch_measure.hpp\n\n// Measure\n\n\n// start catch_timing.hpp\n\n// Timing\n\n\n#include <tuple>\n#include <type_traits>\n\nnamespace Catch {\n    namespace Benchmark {\n        template <typename Duration, typename Result>\n        struct Timing {\n            Duration elapsed;\n            Result result;\n            int iterations;\n        };\n        template <typename Clock, typename Func, typename... Args>\n        using TimingOf = Timing<ClockDuration<Clock>, Detail::CompleteType_t<FunctionReturnType<Func, Args...>>>;\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_timing.hpp\n#include <utility>\n\nnamespace Catch {\n    namespace Benchmark {\n        namespace Detail {\n            template <typename Clock, typename Fun, typename... Args>\n            TimingOf<Clock, Fun, Args...> measure(Fun&& fun, Args&&... args) {\n                auto start = Clock::now();\n                auto&& r = Detail::complete_invoke(fun, std::forward<Args>(args)...);\n                auto end = Clock::now();\n                auto delta = end - start;\n                return { delta, std::forward<decltype(r)>(r), 1 };\n            }\n        } // namespace Detail\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_measure.hpp\n#include <utility>\n#include <type_traits>\n\nnamespace Catch {\n    namespace Benchmark {\n        namespace Detail {\n            template <typename Clock, typename Fun>\n            TimingOf<Clock, Fun, int> measure_one(Fun&& fun, int iters, std::false_type) {\n                return Detail::measure<Clock>(fun, iters);\n            }\n            template <typename Clock, typename Fun>\n            TimingOf<Clock, Fun, Chronometer> measure_one(Fun&& fun, int iters, std::true_type) {\n                Detail::ChronometerModel<Clock> meter;\n                auto&& result = Detail::complete_invoke(fun, Chronometer(meter, iters));\n\n                return { meter.elapsed(), std::move(result), iters };\n            }\n\n            template <typename Clock, typename Fun>\n            using run_for_at_least_argument_t = typename std::conditional<is_callable<Fun(Chronometer)>::value, Chronometer, int>::type;\n\n            struct optimized_away_error : std::exception {\n                const char* what() const noexcept override {\n                    return \"could not measure benchmark, maybe it was optimized away\";\n                }\n            };\n\n            template <typename Clock, typename Fun>\n            TimingOf<Clock, Fun, run_for_at_least_argument_t<Clock, Fun>> run_for_at_least(ClockDuration<Clock> how_long, int seed, Fun&& fun) {\n                auto iters = seed;\n                while (iters < (1 << 30)) {\n                    auto&& Timing = measure_one<Clock>(fun, iters, is_callable<Fun(Chronometer)>());\n\n                    if (Timing.elapsed >= how_long) {\n                        return { Timing.elapsed, std::move(Timing.result), iters };\n                    }\n                    iters *= 2;\n                }\n                Catch::throw_exception(optimized_away_error{});\n            }\n        } // namespace Detail\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_run_for_at_least.hpp\n#include <algorithm>\n#include <iterator>\n\nnamespace Catch {\n    namespace Benchmark {\n        template <typename Duration>\n        struct ExecutionPlan {\n            int iterations_per_sample;\n            Duration estimated_duration;\n            Detail::BenchmarkFunction benchmark;\n            Duration warmup_time;\n            int warmup_iterations;\n\n            template <typename Duration2>\n            operator ExecutionPlan<Duration2>() const {\n                return { iterations_per_sample, estimated_duration, benchmark, warmup_time, warmup_iterations };\n            }\n\n            template <typename Clock>\n            std::vector<FloatDuration<Clock>> run(const IConfig &cfg, Environment<FloatDuration<Clock>> env) const {\n                // warmup a bit\n                Detail::run_for_at_least<Clock>(std::chrono::duration_cast<ClockDuration<Clock>>(warmup_time), warmup_iterations, Detail::repeat(now<Clock>{}));\n\n                std::vector<FloatDuration<Clock>> times;\n                times.reserve(cfg.benchmarkSamples());\n                std::generate_n(std::back_inserter(times), cfg.benchmarkSamples(), [this, env] {\n                    Detail::ChronometerModel<Clock> model;\n                    this->benchmark(Chronometer(model, iterations_per_sample));\n                    auto sample_time = model.elapsed() - env.clock_cost.mean;\n                    if (sample_time < FloatDuration<Clock>::zero()) sample_time = FloatDuration<Clock>::zero();\n                    return sample_time / iterations_per_sample;\n                });\n                return times;\n            }\n        };\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_execution_plan.hpp\n// start catch_estimate_clock.hpp\n\n // Environment measurement\n\n\n// start catch_stats.hpp\n\n// Statistical analysis tools\n\n\n#include <algorithm>\n#include <functional>\n#include <vector>\n#include <iterator>\n#include <numeric>\n#include <tuple>\n#include <cmath>\n#include <utility>\n#include <cstddef>\n#include <random>\n\nnamespace Catch {\n    namespace Benchmark {\n        namespace Detail {\n            using sample = std::vector<double>;\n\n            double weighted_average_quantile(int k, int q, std::vector<double>::iterator first, std::vector<double>::iterator last);\n\n            template <typename Iterator>\n            OutlierClassification classify_outliers(Iterator first, Iterator last) {\n                std::vector<double> copy(first, last);\n\n                auto q1 = weighted_average_quantile(1, 4, copy.begin(), copy.end());\n                auto q3 = weighted_average_quantile(3, 4, copy.begin(), copy.end());\n                auto iqr = q3 - q1;\n                auto los = q1 - (iqr * 3.);\n                auto lom = q1 - (iqr * 1.5);\n                auto him = q3 + (iqr * 1.5);\n                auto his = q3 + (iqr * 3.);\n\n                OutlierClassification o;\n                for (; first != last; ++first) {\n                    auto&& t = *first;\n                    if (t < los) ++o.low_severe;\n                    else if (t < lom) ++o.low_mild;\n                    else if (t > his) ++o.high_severe;\n                    else if (t > him) ++o.high_mild;\n                    ++o.samples_seen;\n                }\n                return o;\n            }\n\n            template <typename Iterator>\n            double mean(Iterator first, Iterator last) {\n                auto count = last - first;\n                double sum = std::accumulate(first, last, 0.);\n                return sum / count;\n            }\n\n            template <typename URng, typename Iterator, typename Estimator>\n            sample resample(URng& rng, int resamples, Iterator first, Iterator last, Estimator& estimator) {\n                auto n = last - first;\n                std::uniform_int_distribution<decltype(n)> dist(0, n - 1);\n\n                sample out;\n                out.reserve(resamples);\n                std::generate_n(std::back_inserter(out), resamples, [n, first, &estimator, &dist, &rng] {\n                    std::vector<double> resampled;\n                    resampled.reserve(n);\n                    std::generate_n(std::back_inserter(resampled), n, [first, &dist, &rng] { return first[dist(rng)]; });\n                    return estimator(resampled.begin(), resampled.end());\n                });\n                std::sort(out.begin(), out.end());\n                return out;\n            }\n\n            template <typename Estimator, typename Iterator>\n            sample jackknife(Estimator&& estimator, Iterator first, Iterator last) {\n                auto n = last - first;\n                auto second = std::next(first);\n                sample results;\n                results.reserve(n);\n\n                for (auto it = first; it != last; ++it) {\n                    std::iter_swap(it, first);\n                    results.push_back(estimator(second, last));\n                }\n\n                return results;\n            }\n\n            inline double normal_cdf(double x) {\n                return std::erfc(-x / std::sqrt(2.0)) / 2.0;\n            }\n\n            double erfc_inv(double x);\n\n            double normal_quantile(double p);\n\n            template <typename Iterator, typename Estimator>\n            Estimate<double> bootstrap(double confidence_level, Iterator first, Iterator last, sample const& resample, Estimator&& estimator) {\n                auto n_samples = last - first;\n\n                double point = estimator(first, last);\n                // Degenerate case with a single sample\n                if (n_samples == 1) return { point, point, point, confidence_level };\n\n                sample jack = jackknife(estimator, first, last);\n                double jack_mean = mean(jack.begin(), jack.end());\n                double sum_squares, sum_cubes;\n                std::tie(sum_squares, sum_cubes) = std::accumulate(jack.begin(), jack.end(), std::make_pair(0., 0.), [jack_mean](std::pair<double, double> sqcb, double x) -> std::pair<double, double> {\n                    auto d = jack_mean - x;\n                    auto d2 = d * d;\n                    auto d3 = d2 * d;\n                    return { sqcb.first + d2, sqcb.second + d3 };\n                });\n\n                double accel = sum_cubes / (6 * std::pow(sum_squares, 1.5));\n                int n = static_cast<int>(resample.size());\n                double prob_n = std::count_if(resample.begin(), resample.end(), [point](double x) { return x < point; }) / (double)n;\n                // degenerate case with uniform samples\n                if (prob_n == 0) return { point, point, point, confidence_level };\n\n                double bias = normal_quantile(prob_n);\n                double z1 = normal_quantile((1. - confidence_level) / 2.);\n\n                auto cumn = [n](double x) -> int {\n                    return std::lround(normal_cdf(x) * n); };\n                auto a = [bias, accel](double b) { return bias + b / (1. - accel * b); };\n                double b1 = bias + z1;\n                double b2 = bias - z1;\n                double a1 = a(b1);\n                double a2 = a(b2);\n                auto lo = (std::max)(cumn(a1), 0);\n                auto hi = (std::min)(cumn(a2), n - 1);\n\n                return { point, resample[lo], resample[hi], confidence_level };\n            }\n\n            double outlier_variance(Estimate<double> mean, Estimate<double> stddev, int n);\n\n            struct bootstrap_analysis {\n                Estimate<double> mean;\n                Estimate<double> standard_deviation;\n                double outlier_variance;\n            };\n\n            bootstrap_analysis analyse_samples(double confidence_level, int n_resamples, std::vector<double>::iterator first, std::vector<double>::iterator last);\n        } // namespace Detail\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_stats.hpp\n#include <algorithm>\n#include <iterator>\n#include <tuple>\n#include <vector>\n#include <cmath>\n\nnamespace Catch {\n    namespace Benchmark {\n        namespace Detail {\n            template <typename Clock>\n            std::vector<double> resolution(int k) {\n                std::vector<TimePoint<Clock>> times;\n                times.reserve(k + 1);\n                std::generate_n(std::back_inserter(times), k + 1, now<Clock>{});\n\n                std::vector<double> deltas;\n                deltas.reserve(k);\n                std::transform(std::next(times.begin()), times.end(), times.begin(),\n                    std::back_inserter(deltas),\n                    [](TimePoint<Clock> a, TimePoint<Clock> b) { return static_cast<double>((a - b).count()); });\n\n                return deltas;\n            }\n\n            const auto warmup_iterations = 10000;\n            const auto warmup_time = std::chrono::milliseconds(100);\n            const auto minimum_ticks = 1000;\n            const auto warmup_seed = 10000;\n            const auto clock_resolution_estimation_time = std::chrono::milliseconds(500);\n            const auto clock_cost_estimation_time_limit = std::chrono::seconds(1);\n            const auto clock_cost_estimation_tick_limit = 100000;\n            const auto clock_cost_estimation_time = std::chrono::milliseconds(10);\n            const auto clock_cost_estimation_iterations = 10000;\n\n            template <typename Clock>\n            int warmup() {\n                return run_for_at_least<Clock>(std::chrono::duration_cast<ClockDuration<Clock>>(warmup_time), warmup_seed, &resolution<Clock>)\n                    .iterations;\n            }\n            template <typename Clock>\n            EnvironmentEstimate<FloatDuration<Clock>> estimate_clock_resolution(int iterations) {\n                auto r = run_for_at_least<Clock>(std::chrono::duration_cast<ClockDuration<Clock>>(clock_resolution_estimation_time), iterations, &resolution<Clock>)\n                    .result;\n                return {\n                    FloatDuration<Clock>(mean(r.begin(), r.end())),\n                    classify_outliers(r.begin(), r.end()),\n                };\n            }\n            template <typename Clock>\n            EnvironmentEstimate<FloatDuration<Clock>> estimate_clock_cost(FloatDuration<Clock> resolution) {\n                auto time_limit = (std::min)(\n                    resolution * clock_cost_estimation_tick_limit,\n                    FloatDuration<Clock>(clock_cost_estimation_time_limit));\n                auto time_clock = [](int k) {\n                    return Detail::measure<Clock>([k] {\n                        for (int i = 0; i < k; ++i) {\n                            volatile auto ignored = Clock::now();\n                            (void)ignored;\n                        }\n                    }).elapsed;\n                };\n                time_clock(1);\n                int iters = clock_cost_estimation_iterations;\n                auto&& r = run_for_at_least<Clock>(std::chrono::duration_cast<ClockDuration<Clock>>(clock_cost_estimation_time), iters, time_clock);\n                std::vector<double> times;\n                int nsamples = static_cast<int>(std::ceil(time_limit / r.elapsed));\n                times.reserve(nsamples);\n                std::generate_n(std::back_inserter(times), nsamples, [time_clock, &r] {\n                    return static_cast<double>((time_clock(r.iterations) / r.iterations).count());\n                });\n                return {\n                    FloatDuration<Clock>(mean(times.begin(), times.end())),\n                    classify_outliers(times.begin(), times.end()),\n                };\n            }\n\n            template <typename Clock>\n            Environment<FloatDuration<Clock>> measure_environment() {\n                static Environment<FloatDuration<Clock>>* env = nullptr;\n                if (env) {\n                    return *env;\n                }\n\n                auto iters = Detail::warmup<Clock>();\n                auto resolution = Detail::estimate_clock_resolution<Clock>(iters);\n                auto cost = Detail::estimate_clock_cost<Clock>(resolution.mean);\n\n                env = new Environment<FloatDuration<Clock>>{ resolution, cost };\n                return *env;\n            }\n        } // namespace Detail\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_estimate_clock.hpp\n// start catch_analyse.hpp\n\n // Run and analyse one benchmark\n\n\n// start catch_sample_analysis.hpp\n\n// Benchmark results\n\n\n#include <algorithm>\n#include <vector>\n#include <string>\n#include <iterator>\n\nnamespace Catch {\n    namespace Benchmark {\n        template <typename Duration>\n        struct SampleAnalysis {\n            std::vector<Duration> samples;\n            Estimate<Duration> mean;\n            Estimate<Duration> standard_deviation;\n            OutlierClassification outliers;\n            double outlier_variance;\n\n            template <typename Duration2>\n            operator SampleAnalysis<Duration2>() const {\n                std::vector<Duration2> samples2;\n                samples2.reserve(samples.size());\n                std::transform(samples.begin(), samples.end(), std::back_inserter(samples2), [](Duration d) { return Duration2(d); });\n                return {\n                    std::move(samples2),\n                    mean,\n                    standard_deviation,\n                    outliers,\n                    outlier_variance,\n                };\n            }\n        };\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_sample_analysis.hpp\n#include <algorithm>\n#include <iterator>\n#include <vector>\n\nnamespace Catch {\n    namespace Benchmark {\n        namespace Detail {\n            template <typename Duration, typename Iterator>\n            SampleAnalysis<Duration> analyse(const IConfig &cfg, Environment<Duration>, Iterator first, Iterator last) {\n                if (!cfg.benchmarkNoAnalysis()) {\n                    std::vector<double> samples;\n                    samples.reserve(last - first);\n                    std::transform(first, last, std::back_inserter(samples), [](Duration d) { return d.count(); });\n\n                    auto analysis = Catch::Benchmark::Detail::analyse_samples(cfg.benchmarkConfidenceInterval(), cfg.benchmarkResamples(), samples.begin(), samples.end());\n                    auto outliers = Catch::Benchmark::Detail::classify_outliers(samples.begin(), samples.end());\n\n                    auto wrap_estimate = [](Estimate<double> e) {\n                        return Estimate<Duration> {\n                            Duration(e.point),\n                                Duration(e.lower_bound),\n                                Duration(e.upper_bound),\n                                e.confidence_interval,\n                        };\n                    };\n                    std::vector<Duration> samples2;\n                    samples2.reserve(samples.size());\n                    std::transform(samples.begin(), samples.end(), std::back_inserter(samples2), [](double d) { return Duration(d); });\n                    return {\n                        std::move(samples2),\n                        wrap_estimate(analysis.mean),\n                        wrap_estimate(analysis.standard_deviation),\n                        outliers,\n                        analysis.outlier_variance,\n                    };\n                } else {\n                    std::vector<Duration> samples;\n                    samples.reserve(last - first);\n\n                    Duration mean = Duration(0);\n                    int i = 0;\n                    for (auto it = first; it < last; ++it, ++i) {\n                        samples.push_back(Duration(*it));\n                        mean += Duration(*it);\n                    }\n                    mean /= i;\n\n                    return {\n                        std::move(samples),\n                        Estimate<Duration>{mean, mean, mean, 0.0},\n                        Estimate<Duration>{Duration(0), Duration(0), Duration(0), 0.0},\n                        OutlierClassification{},\n                        0.0\n                    };\n                }\n            }\n        } // namespace Detail\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_analyse.hpp\n#include <algorithm>\n#include <functional>\n#include <string>\n#include <vector>\n#include <cmath>\n\nnamespace Catch {\n    namespace Benchmark {\n        struct Benchmark {\n            Benchmark(std::string &&name)\n                : name(std::move(name)) {}\n\n            template <class FUN>\n            Benchmark(std::string &&name, FUN &&func)\n                : fun(std::move(func)), name(std::move(name)) {}\n\n            template <typename Clock>\n            ExecutionPlan<FloatDuration<Clock>> prepare(const IConfig &cfg, Environment<FloatDuration<Clock>> env) const {\n                auto min_time = env.clock_resolution.mean * Detail::minimum_ticks;\n                auto run_time = std::max(min_time, std::chrono::duration_cast<decltype(min_time)>(cfg.benchmarkWarmupTime()));\n                auto&& test = Detail::run_for_at_least<Clock>(std::chrono::duration_cast<ClockDuration<Clock>>(run_time), 1, fun);\n                int new_iters = static_cast<int>(std::ceil(min_time * test.iterations / test.elapsed));\n                return { new_iters, test.elapsed / test.iterations * new_iters * cfg.benchmarkSamples(), fun, std::chrono::duration_cast<FloatDuration<Clock>>(cfg.benchmarkWarmupTime()), Detail::warmup_iterations };\n            }\n\n            template <typename Clock = default_clock>\n            void run() {\n                IConfigPtr cfg = getCurrentContext().getConfig();\n\n                auto env = Detail::measure_environment<Clock>();\n\n                getResultCapture().benchmarkPreparing(name);\n                CATCH_TRY{\n                    auto plan = user_code([&] {\n                        return prepare<Clock>(*cfg, env);\n                    });\n\n                    BenchmarkInfo info {\n                        name,\n                        plan.estimated_duration.count(),\n                        plan.iterations_per_sample,\n                        cfg->benchmarkSamples(),\n                        cfg->benchmarkResamples(),\n                        env.clock_resolution.mean.count(),\n                        env.clock_cost.mean.count()\n                    };\n\n                    getResultCapture().benchmarkStarting(info);\n\n                    auto samples = user_code([&] {\n                        return plan.template run<Clock>(*cfg, env);\n                    });\n\n                    auto analysis = Detail::analyse(*cfg, env, samples.begin(), samples.end());\n                    BenchmarkStats<FloatDuration<Clock>> stats{ info, analysis.samples, analysis.mean, analysis.standard_deviation, analysis.outliers, analysis.outlier_variance };\n                    getResultCapture().benchmarkEnded(stats);\n\n                } CATCH_CATCH_ALL{\n                    if (translateActiveException() != Detail::benchmarkErrorMsg) // benchmark errors have been reported, otherwise rethrow.\n                        std::rethrow_exception(std::current_exception());\n                }\n            }\n\n            // sets lambda to be used in fun *and* executes benchmark!\n            template <typename Fun,\n                typename std::enable_if<!Detail::is_related<Fun, Benchmark>::value, int>::type = 0>\n                Benchmark & operator=(Fun func) {\n                fun = Detail::BenchmarkFunction(func);\n                run();\n                return *this;\n            }\n\n            explicit operator bool() {\n                return true;\n            }\n\n        private:\n            Detail::BenchmarkFunction fun;\n            std::string name;\n        };\n    }\n} // namespace Catch\n\n#define INTERNAL_CATCH_GET_1_ARG(arg1, arg2, ...) arg1\n#define INTERNAL_CATCH_GET_2_ARG(arg1, arg2, ...) arg2\n\n#define INTERNAL_CATCH_BENCHMARK(BenchmarkName, name, benchmarkIndex)\\\n    if( Catch::Benchmark::Benchmark BenchmarkName{name} ) \\\n        BenchmarkName = [&](int benchmarkIndex)\n\n#define INTERNAL_CATCH_BENCHMARK_ADVANCED(BenchmarkName, name)\\\n    if( Catch::Benchmark::Benchmark BenchmarkName{name} ) \\\n        BenchmarkName = [&]\n\n// end catch_benchmark.hpp\n// start catch_constructor.hpp\n\n// Constructor and destructor helpers\n\n\n#include <type_traits>\n\nnamespace Catch {\n    namespace Benchmark {\n        namespace Detail {\n            template <typename T, bool Destruct>\n            struct ObjectStorage\n            {\n                ObjectStorage() : data() {}\n\n                ObjectStorage(const ObjectStorage& other)\n                {\n                    new(&data) T(other.stored_object());\n                }\n\n                ObjectStorage(ObjectStorage&& other)\n                {\n                    new(&data) T(std::move(other.stored_object()));\n                }\n\n                ~ObjectStorage() { destruct_on_exit<T>(); }\n\n                template <typename... Args>\n                void construct(Args&&... args)\n                {\n                    new (&data) T(std::forward<Args>(args)...);\n                }\n\n                template <bool AllowManualDestruction = !Destruct>\n                typename std::enable_if<AllowManualDestruction>::type destruct()\n                {\n                    stored_object().~T();\n                }\n\n            private:\n                // If this is a constructor benchmark, destruct the underlying object\n                template <typename U>\n                void destruct_on_exit(typename std::enable_if<Destruct, U>::type* = 0) { destruct<true>(); }\n                // Otherwise, don't\n                template <typename U>\n                void destruct_on_exit(typename std::enable_if<!Destruct, U>::type* = 0) { }\n\n                T& stored_object() {\n                    return *static_cast<T*>(static_cast<void*>(&data));\n                }\n\n                T const& stored_object() const {\n                    return *static_cast<T*>(static_cast<void*>(&data));\n                }\n\n                struct { alignas(T) unsigned char data[sizeof(T)]; }  data;\n            };\n        }\n\n        template <typename T>\n        using storage_for = Detail::ObjectStorage<T, true>;\n\n        template <typename T>\n        using destructable_object = Detail::ObjectStorage<T, false>;\n    }\n}\n\n// end catch_constructor.hpp\n// end catch_benchmarking_all.hpp\n#endif\n\n#endif // ! CATCH_CONFIG_IMPL_ONLY\n\n#ifdef CATCH_IMPL\n// start catch_impl.hpp\n\n#ifdef __clang__\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wweak-vtables\"\n#endif\n\n// Keep these here for external reporters\n// start catch_test_case_tracker.h\n\n#include <string>\n#include <vector>\n#include <memory>\n\nnamespace Catch {\nnamespace TestCaseTracking {\n\n    struct NameAndLocation {\n        std::string name;\n        SourceLineInfo location;\n\n        NameAndLocation( std::string const& _name, SourceLineInfo const& _location );\n        friend bool operator==(NameAndLocation const& lhs, NameAndLocation const& rhs) {\n            return lhs.name == rhs.name\n                && lhs.location == rhs.location;\n        }\n    };\n\n    class ITracker;\n\n    using ITrackerPtr = std::shared_ptr<ITracker>;\n\n    class  ITracker {\n        NameAndLocation m_nameAndLocation;\n\n    public:\n        ITracker(NameAndLocation const& nameAndLoc) :\n            m_nameAndLocation(nameAndLoc)\n        {}\n\n        // static queries\n        NameAndLocation const& nameAndLocation() const {\n            return m_nameAndLocation;\n        }\n\n        virtual ~ITracker();\n\n        // dynamic queries\n        virtual bool isComplete() const = 0; // Successfully completed or failed\n        virtual bool isSuccessfullyCompleted() const = 0;\n        virtual bool isOpen() const = 0; // Started but not complete\n        virtual bool hasChildren() const = 0;\n        virtual bool hasStarted() const = 0;\n\n        virtual ITracker& parent() = 0;\n\n        // actions\n        virtual void close() = 0; // Successfully complete\n        virtual void fail() = 0;\n        virtual void markAsNeedingAnotherRun() = 0;\n\n        virtual void addChild( ITrackerPtr const& child ) = 0;\n        virtual ITrackerPtr findChild( NameAndLocation const& nameAndLocation ) = 0;\n        virtual void openChild() = 0;\n\n        // Debug/ checking\n        virtual bool isSectionTracker() const = 0;\n        virtual bool isGeneratorTracker() const = 0;\n    };\n\n    class TrackerContext {\n\n        enum RunState {\n            NotStarted,\n            Executing,\n            CompletedCycle\n        };\n\n        ITrackerPtr m_rootTracker;\n        ITracker* m_currentTracker = nullptr;\n        RunState m_runState = NotStarted;\n\n    public:\n\n        ITracker& startRun();\n        void endRun();\n\n        void startCycle();\n        void completeCycle();\n\n        bool completedCycle() const;\n        ITracker& currentTracker();\n        void setCurrentTracker( ITracker* tracker );\n    };\n\n    class TrackerBase : public ITracker {\n    protected:\n        enum CycleState {\n            NotStarted,\n            Executing,\n            ExecutingChildren,\n            NeedsAnotherRun,\n            CompletedSuccessfully,\n            Failed\n        };\n\n        using Children = std::vector<ITrackerPtr>;\n        TrackerContext& m_ctx;\n        ITracker* m_parent;\n        Children m_children;\n        CycleState m_runState = NotStarted;\n\n    public:\n        TrackerBase( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent );\n\n        bool isComplete() const override;\n        bool isSuccessfullyCompleted() const override;\n        bool isOpen() const override;\n        bool hasChildren() const override;\n        bool hasStarted() const override {\n            return m_runState != NotStarted;\n        }\n\n        void addChild( ITrackerPtr const& child ) override;\n\n        ITrackerPtr findChild( NameAndLocation const& nameAndLocation ) override;\n        ITracker& parent() override;\n\n        void openChild() override;\n\n        bool isSectionTracker() const override;\n        bool isGeneratorTracker() const override;\n\n        void open();\n\n        void close() override;\n        void fail() override;\n        void markAsNeedingAnotherRun() override;\n\n    private:\n        void moveToParent();\n        void moveToThis();\n    };\n\n    class SectionTracker : public TrackerBase {\n        std::vector<std::string> m_filters;\n        std::string m_trimmed_name;\n    public:\n        SectionTracker( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent );\n\n        bool isSectionTracker() const override;\n\n        bool isComplete() const override;\n\n        static SectionTracker& acquire( TrackerContext& ctx, NameAndLocation const& nameAndLocation );\n\n        void tryOpen();\n\n        void addInitialFilters( std::vector<std::string> const& filters );\n        void addNextFilters( std::vector<std::string> const& filters );\n        //! Returns filters active in this tracker\n        std::vector<std::string> const& getFilters() const;\n        //! Returns whitespace-trimmed name of the tracked section\n        std::string const& trimmedName() const;\n    };\n\n} // namespace TestCaseTracking\n\nusing TestCaseTracking::ITracker;\nusing TestCaseTracking::TrackerContext;\nusing TestCaseTracking::SectionTracker;\n\n} // namespace Catch\n\n// end catch_test_case_tracker.h\n\n// start catch_leak_detector.h\n\nnamespace Catch {\n\n    struct LeakDetector {\n        LeakDetector();\n        ~LeakDetector();\n    };\n\n}\n// end catch_leak_detector.h\n// Cpp files will be included in the single-header file here\n// start catch_stats.cpp\n\n// Statistical analysis tools\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n\n#include <cassert>\n#include <random>\n\n#if defined(CATCH_CONFIG_USE_ASYNC)\n#include <future>\n#endif\n\nnamespace {\n    double erf_inv(double x) {\n        // Code accompanying the article \"Approximating the erfinv function\" in GPU Computing Gems, Volume 2\n        double w, p;\n\n        w = -log((1.0 - x) * (1.0 + x));\n\n        if (w < 6.250000) {\n            w = w - 3.125000;\n            p = -3.6444120640178196996e-21;\n            p = -1.685059138182016589e-19 + p * w;\n            p = 1.2858480715256400167e-18 + p * w;\n            p = 1.115787767802518096e-17 + p * w;\n            p = -1.333171662854620906e-16 + p * w;\n            p = 2.0972767875968561637e-17 + p * w;\n            p = 6.6376381343583238325e-15 + p * w;\n            p = -4.0545662729752068639e-14 + p * w;\n            p = -8.1519341976054721522e-14 + p * w;\n            p = 2.6335093153082322977e-12 + p * w;\n            p = -1.2975133253453532498e-11 + p * w;\n            p = -5.4154120542946279317e-11 + p * w;\n            p = 1.051212273321532285e-09 + p * w;\n            p = -4.1126339803469836976e-09 + p * w;\n            p = -2.9070369957882005086e-08 + p * w;\n            p = 4.2347877827932403518e-07 + p * w;\n            p = -1.3654692000834678645e-06 + p * w;\n            p = -1.3882523362786468719e-05 + p * w;\n            p = 0.0001867342080340571352 + p * w;\n            p = -0.00074070253416626697512 + p * w;\n            p = -0.0060336708714301490533 + p * w;\n            p = 0.24015818242558961693 + p * w;\n            p = 1.6536545626831027356 + p * w;\n        } else if (w < 16.000000) {\n            w = sqrt(w) - 3.250000;\n            p = 2.2137376921775787049e-09;\n            p = 9.0756561938885390979e-08 + p * w;\n            p = -2.7517406297064545428e-07 + p * w;\n            p = 1.8239629214389227755e-08 + p * w;\n            p = 1.5027403968909827627e-06 + p * w;\n            p = -4.013867526981545969e-06 + p * w;\n            p = 2.9234449089955446044e-06 + p * w;\n            p = 1.2475304481671778723e-05 + p * w;\n            p = -4.7318229009055733981e-05 + p * w;\n            p = 6.8284851459573175448e-05 + p * w;\n            p = 2.4031110387097893999e-05 + p * w;\n            p = -0.0003550375203628474796 + p * w;\n            p = 0.00095328937973738049703 + p * w;\n            p = -0.0016882755560235047313 + p * w;\n            p = 0.0024914420961078508066 + p * w;\n            p = -0.0037512085075692412107 + p * w;\n            p = 0.005370914553590063617 + p * w;\n            p = 1.0052589676941592334 + p * w;\n            p = 3.0838856104922207635 + p * w;\n        } else {\n            w = sqrt(w) - 5.000000;\n            p = -2.7109920616438573243e-11;\n            p = -2.5556418169965252055e-10 + p * w;\n            p = 1.5076572693500548083e-09 + p * w;\n            p = -3.7894654401267369937e-09 + p * w;\n            p = 7.6157012080783393804e-09 + p * w;\n            p = -1.4960026627149240478e-08 + p * w;\n            p = 2.9147953450901080826e-08 + p * w;\n            p = -6.7711997758452339498e-08 + p * w;\n            p = 2.2900482228026654717e-07 + p * w;\n            p = -9.9298272942317002539e-07 + p * w;\n            p = 4.5260625972231537039e-06 + p * w;\n            p = -1.9681778105531670567e-05 + p * w;\n            p = 7.5995277030017761139e-05 + p * w;\n            p = -0.00021503011930044477347 + p * w;\n            p = -0.00013871931833623122026 + p * w;\n            p = 1.0103004648645343977 + p * w;\n            p = 4.8499064014085844221 + p * w;\n        }\n        return p * x;\n    }\n\n    double standard_deviation(std::vector<double>::iterator first, std::vector<double>::iterator last) {\n        auto m = Catch::Benchmark::Detail::mean(first, last);\n        double variance = std::accumulate(first, last, 0., [m](double a, double b) {\n            double diff = b - m;\n            return a + diff * diff;\n            }) / (last - first);\n            return std::sqrt(variance);\n    }\n\n}\n\nnamespace Catch {\n    namespace Benchmark {\n        namespace Detail {\n\n            double weighted_average_quantile(int k, int q, std::vector<double>::iterator first, std::vector<double>::iterator last) {\n                auto count = last - first;\n                double idx = (count - 1) * k / static_cast<double>(q);\n                int j = static_cast<int>(idx);\n                double g = idx - j;\n                std::nth_element(first, first + j, last);\n                auto xj = first[j];\n                if (g == 0) return xj;\n\n                auto xj1 = *std::min_element(first + (j + 1), last);\n                return xj + g * (xj1 - xj);\n            }\n\n            double erfc_inv(double x) {\n                return erf_inv(1.0 - x);\n            }\n\n            double normal_quantile(double p) {\n                static const double ROOT_TWO = std::sqrt(2.0);\n\n                double result = 0.0;\n                assert(p >= 0 && p <= 1);\n                if (p < 0 || p > 1) {\n                    return result;\n                }\n\n                result = -erfc_inv(2.0 * p);\n                // result *= normal distribution standard deviation (1.0) * sqrt(2)\n                result *= /*sd * */ ROOT_TWO;\n                // result += normal disttribution mean (0)\n                return result;\n            }\n\n            double outlier_variance(Estimate<double> mean, Estimate<double> stddev, int n) {\n                double sb = stddev.point;\n                double mn = mean.point / n;\n                double mg_min = mn / 2.;\n                double sg = (std::min)(mg_min / 4., sb / std::sqrt(n));\n                double sg2 = sg * sg;\n                double sb2 = sb * sb;\n\n                auto c_max = [n, mn, sb2, sg2](double x) -> double {\n                    double k = mn - x;\n                    double d = k * k;\n                    double nd = n * d;\n                    double k0 = -n * nd;\n                    double k1 = sb2 - n * sg2 + nd;\n                    double det = k1 * k1 - 4 * sg2 * k0;\n                    return (int)(-2. * k0 / (k1 + std::sqrt(det)));\n                };\n\n                auto var_out = [n, sb2, sg2](double c) {\n                    double nc = n - c;\n                    return (nc / n) * (sb2 - nc * sg2);\n                };\n\n                return (std::min)(var_out(1), var_out((std::min)(c_max(0.), c_max(mg_min)))) / sb2;\n            }\n\n            bootstrap_analysis analyse_samples(double confidence_level, int n_resamples, std::vector<double>::iterator first, std::vector<double>::iterator last) {\n                CATCH_INTERNAL_START_WARNINGS_SUPPRESSION\n                CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS\n                static std::random_device entropy;\n                CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION\n\n                auto n = static_cast<int>(last - first); // seriously, one can't use integral types without hell in C++\n\n                auto mean = &Detail::mean<std::vector<double>::iterator>;\n                auto stddev = &standard_deviation;\n\n#if defined(CATCH_CONFIG_USE_ASYNC)\n                auto Estimate = [=](double(*f)(std::vector<double>::iterator, std::vector<double>::iterator)) {\n                    auto seed = entropy();\n                    return std::async(std::launch::async, [=] {\n                        std::mt19937 rng(seed);\n                        auto resampled = resample(rng, n_resamples, first, last, f);\n                        return bootstrap(confidence_level, first, last, resampled, f);\n                    });\n                };\n\n                auto mean_future = Estimate(mean);\n                auto stddev_future = Estimate(stddev);\n\n                auto mean_estimate = mean_future.get();\n                auto stddev_estimate = stddev_future.get();\n#else\n                auto Estimate = [=](double(*f)(std::vector<double>::iterator, std::vector<double>::iterator)) {\n                    auto seed = entropy();\n                    std::mt19937 rng(seed);\n                    auto resampled = resample(rng, n_resamples, first, last, f);\n                    return bootstrap(confidence_level, first, last, resampled, f);\n                };\n\n                auto mean_estimate = Estimate(mean);\n                auto stddev_estimate = Estimate(stddev);\n#endif // CATCH_USE_ASYNC\n\n                double outlier_variance = Detail::outlier_variance(mean_estimate, stddev_estimate, n);\n\n                return { mean_estimate, stddev_estimate, outlier_variance };\n            }\n        } // namespace Detail\n    } // namespace Benchmark\n} // namespace Catch\n\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n// end catch_stats.cpp\n// start catch_approx.cpp\n\n#include <cmath>\n#include <limits>\n\nnamespace {\n\n// Performs equivalent check of std::fabs(lhs - rhs) <= margin\n// But without the subtraction to allow for INFINITY in comparison\nbool marginComparison(double lhs, double rhs, double margin) {\n    return (lhs + margin >= rhs) && (rhs + margin >= lhs);\n}\n\n}\n\nnamespace Catch {\nnamespace Detail {\n\n    Approx::Approx ( double value )\n    :   m_epsilon( std::numeric_limits<float>::epsilon()*100 ),\n        m_margin( 0.0 ),\n        m_scale( 0.0 ),\n        m_value( value )\n    {}\n\n    Approx Approx::custom() {\n        return Approx( 0 );\n    }\n\n    Approx Approx::operator-() const {\n        auto temp(*this);\n        temp.m_value = -temp.m_value;\n        return temp;\n    }\n\n    std::string Approx::toString() const {\n        ReusableStringStream rss;\n        rss << \"Approx( \" << ::Catch::Detail::stringify( m_value ) << \" )\";\n        return rss.str();\n    }\n\n    bool Approx::equalityComparisonImpl(const double other) const {\n        // First try with fixed margin, then compute margin based on epsilon, scale and Approx's value\n        // Thanks to Richard Harris for his help refining the scaled margin value\n        return marginComparison(m_value, other, m_margin)\n            || marginComparison(m_value, other, m_epsilon * (m_scale + std::fabs(std::isinf(m_value)? 0 : m_value)));\n    }\n\n    void Approx::setMargin(double newMargin) {\n        CATCH_ENFORCE(newMargin >= 0,\n            \"Invalid Approx::margin: \" << newMargin << '.'\n            << \" Approx::Margin has to be non-negative.\");\n        m_margin = newMargin;\n    }\n\n    void Approx::setEpsilon(double newEpsilon) {\n        CATCH_ENFORCE(newEpsilon >= 0 && newEpsilon <= 1.0,\n            \"Invalid Approx::epsilon: \" << newEpsilon << '.'\n            << \" Approx::epsilon has to be in [0, 1]\");\n        m_epsilon = newEpsilon;\n    }\n\n} // end namespace Detail\n\nnamespace literals {\n    Detail::Approx operator \"\" _a(long double val) {\n        return Detail::Approx(val);\n    }\n    Detail::Approx operator \"\" _a(unsigned long long val) {\n        return Detail::Approx(val);\n    }\n} // end namespace literals\n\nstd::string StringMaker<Catch::Detail::Approx>::convert(Catch::Detail::Approx const& value) {\n    return value.toString();\n}\n\n} // end namespace Catch\n// end catch_approx.cpp\n// start catch_assertionhandler.cpp\n\n// start catch_debugger.h\n\nnamespace Catch {\n    bool isDebuggerActive();\n}\n\n#ifdef CATCH_PLATFORM_MAC\n\n    #if defined(__i386__) || defined(__x86_64__)\n        #define CATCH_TRAP() __asm__(\"int $3\\n\" : : ) /* NOLINT */\n    #elif defined(__aarch64__)\n        #define CATCH_TRAP()  __asm__(\".inst 0xd43e0000\")\n    #endif\n\n#elif defined(CATCH_PLATFORM_IPHONE)\n\n    // use inline assembler\n    #if defined(__i386__) || defined(__x86_64__)\n        #define CATCH_TRAP()  __asm__(\"int $3\")\n    #elif defined(__aarch64__)\n        #define CATCH_TRAP()  __asm__(\".inst 0xd4200000\")\n    #elif defined(__arm__) && !defined(__thumb__)\n        #define CATCH_TRAP()  __asm__(\".inst 0xe7f001f0\")\n    #elif defined(__arm__) &&  defined(__thumb__)\n        #define CATCH_TRAP()  __asm__(\".inst 0xde01\")\n    #endif\n\n#elif defined(CATCH_PLATFORM_LINUX)\n    // If we can use inline assembler, do it because this allows us to break\n    // directly at the location of the failing check instead of breaking inside\n    // raise() called from it, i.e. one stack frame below.\n    #if defined(__GNUC__) && (defined(__i386) || defined(__x86_64))\n        #define CATCH_TRAP() asm volatile (\"int $3\") /* NOLINT */\n    #else // Fall back to the generic way.\n        #include <signal.h>\n\n        #define CATCH_TRAP() raise(SIGTRAP)\n    #endif\n#elif defined(_MSC_VER)\n    #define CATCH_TRAP() __debugbreak()\n#elif defined(__MINGW32__)\n    extern \"C\" __declspec(dllimport) void __stdcall DebugBreak();\n    #define CATCH_TRAP() DebugBreak()\n#endif\n\n#ifndef CATCH_BREAK_INTO_DEBUGGER\n    #ifdef CATCH_TRAP\n        #define CATCH_BREAK_INTO_DEBUGGER() []{ if( Catch::isDebuggerActive() ) { CATCH_TRAP(); } }()\n    #else\n        #define CATCH_BREAK_INTO_DEBUGGER() []{}()\n    #endif\n#endif\n\n// end catch_debugger.h\n// start catch_run_context.h\n\n// start catch_fatal_condition.h\n\n#include <cassert>\n\nnamespace Catch {\n\n    // Wrapper for platform-specific fatal error (signals/SEH) handlers\n    //\n    // Tries to be cooperative with other handlers, and not step over\n    // other handlers. This means that unknown structured exceptions\n    // are passed on, previous signal handlers are called, and so on.\n    //\n    // Can only be instantiated once, and assumes that once a signal\n    // is caught, the binary will end up terminating. Thus, there\n    class FatalConditionHandler {\n        bool m_started = false;\n\n        // Install/disengage implementation for specific platform.\n        // Should be if-defed to work on current platform, can assume\n        // engage-disengage 1:1 pairing.\n        void engage_platform();\n        void disengage_platform();\n    public:\n        // Should also have platform-specific implementations as needed\n        FatalConditionHandler();\n        ~FatalConditionHandler();\n\n        void engage() {\n            assert(!m_started && \"Handler cannot be installed twice.\");\n            m_started = true;\n            engage_platform();\n        }\n\n        void disengage() {\n            assert(m_started && \"Handler cannot be uninstalled without being installed first\");\n            m_started = false;\n            disengage_platform();\n        }\n    };\n\n    //! Simple RAII guard for (dis)engaging the FatalConditionHandler\n    class FatalConditionHandlerGuard {\n        FatalConditionHandler* m_handler;\n    public:\n        FatalConditionHandlerGuard(FatalConditionHandler* handler):\n            m_handler(handler) {\n            m_handler->engage();\n        }\n        ~FatalConditionHandlerGuard() {\n            m_handler->disengage();\n        }\n    };\n\n} // end namespace Catch\n\n// end catch_fatal_condition.h\n#include <string>\n\nnamespace Catch {\n\n    struct IMutableContext;\n\n    ///////////////////////////////////////////////////////////////////////////\n\n    class RunContext : public IResultCapture, public IRunner {\n\n    public:\n        RunContext( RunContext const& ) = delete;\n        RunContext& operator =( RunContext const& ) = delete;\n\n        explicit RunContext( IConfigPtr const& _config, IStreamingReporterPtr&& reporter );\n\n        ~RunContext() override;\n\n        void testGroupStarting( std::string const& testSpec, std::size_t groupIndex, std::size_t groupsCount );\n        void testGroupEnded( std::string const& testSpec, Totals const& totals, std::size_t groupIndex, std::size_t groupsCount );\n\n        Totals runTest(TestCase const& testCase);\n\n        IConfigPtr config() const;\n        IStreamingReporter& reporter() const;\n\n    public: // IResultCapture\n\n        // Assertion handlers\n        void handleExpr\n                (   AssertionInfo const& info,\n                    ITransientExpression const& expr,\n                    AssertionReaction& reaction ) override;\n        void handleMessage\n                (   AssertionInfo const& info,\n                    ResultWas::OfType resultType,\n                    StringRef const& message,\n                    AssertionReaction& reaction ) override;\n        void handleUnexpectedExceptionNotThrown\n                (   AssertionInfo const& info,\n                    AssertionReaction& reaction ) override;\n        void handleUnexpectedInflightException\n                (   AssertionInfo const& info,\n                    std::string const& message,\n                    AssertionReaction& reaction ) override;\n        void handleIncomplete\n                (   AssertionInfo const& info ) override;\n        void handleNonExpr\n                (   AssertionInfo const &info,\n                    ResultWas::OfType resultType,\n                    AssertionReaction &reaction ) override;\n\n        bool sectionStarted( SectionInfo const& sectionInfo, Counts& assertions ) override;\n\n        void sectionEnded( SectionEndInfo const& endInfo ) override;\n        void sectionEndedEarly( SectionEndInfo const& endInfo ) override;\n\n        auto acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker& override;\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n        void benchmarkPreparing( std::string const& name ) override;\n        void benchmarkStarting( BenchmarkInfo const& info ) override;\n        void benchmarkEnded( BenchmarkStats<> const& stats ) override;\n        void benchmarkFailed( std::string const& error ) override;\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n\n        void pushScopedMessage( MessageInfo const& message ) override;\n        void popScopedMessage( MessageInfo const& message ) override;\n\n        void emplaceUnscopedMessage( MessageBuilder const& builder ) override;\n\n        std::string getCurrentTestName() const override;\n\n        const AssertionResult* getLastResult() const override;\n\n        void exceptionEarlyReported() override;\n\n        void handleFatalErrorCondition( StringRef message ) override;\n\n        bool lastAssertionPassed() override;\n\n        void assertionPassed() override;\n\n    public:\n        // !TBD We need to do this another way!\n        bool aborting() const final;\n\n    private:\n\n        void runCurrentTest( std::string& redirectedCout, std::string& redirectedCerr );\n        void invokeActiveTestCase();\n\n        void resetAssertionInfo();\n        bool testForMissingAssertions( Counts& assertions );\n\n        void assertionEnded( AssertionResult const& result );\n        void reportExpr\n                (   AssertionInfo const &info,\n                    ResultWas::OfType resultType,\n                    ITransientExpression const *expr,\n                    bool negated );\n\n        void populateReaction( AssertionReaction& reaction );\n\n    private:\n\n        void handleUnfinishedSections();\n\n        TestRunInfo m_runInfo;\n        IMutableContext& m_context;\n        TestCase const* m_activeTestCase = nullptr;\n        ITracker* m_testCaseTracker = nullptr;\n        Option<AssertionResult> m_lastResult;\n\n        IConfigPtr m_config;\n        Totals m_totals;\n        IStreamingReporterPtr m_reporter;\n        std::vector<MessageInfo> m_messages;\n        std::vector<ScopedMessage> m_messageScopes; /* Keeps owners of so-called unscoped messages. */\n        AssertionInfo m_lastAssertionInfo;\n        std::vector<SectionEndInfo> m_unfinishedSections;\n        std::vector<ITracker*> m_activeSections;\n        TrackerContext m_trackerContext;\n        FatalConditionHandler m_fatalConditionhandler;\n        bool m_lastAssertionPassed = false;\n        bool m_shouldReportUnexpected = true;\n        bool m_includeSuccessfulResults;\n    };\n\n    void seedRng(IConfig const& config);\n    unsigned int rngSeed();\n} // end namespace Catch\n\n// end catch_run_context.h\nnamespace Catch {\n\n    namespace {\n        auto operator <<( std::ostream& os, ITransientExpression const& expr ) -> std::ostream& {\n            expr.streamReconstructedExpression( os );\n            return os;\n        }\n    }\n\n    LazyExpression::LazyExpression( bool isNegated )\n    :   m_isNegated( isNegated )\n    {}\n\n    LazyExpression::LazyExpression( LazyExpression const& other ) : m_isNegated( other.m_isNegated ) {}\n\n    LazyExpression::operator bool() const {\n        return m_transientExpression != nullptr;\n    }\n\n    auto operator << ( std::ostream& os, LazyExpression const& lazyExpr ) -> std::ostream& {\n        if( lazyExpr.m_isNegated )\n            os << \"!\";\n\n        if( lazyExpr ) {\n            if( lazyExpr.m_isNegated && lazyExpr.m_transientExpression->isBinaryExpression() )\n                os << \"(\" << *lazyExpr.m_transientExpression << \")\";\n            else\n                os << *lazyExpr.m_transientExpression;\n        }\n        else {\n            os << \"{** error - unchecked empty expression requested **}\";\n        }\n        return os;\n    }\n\n    AssertionHandler::AssertionHandler\n        (   StringRef const& macroName,\n            SourceLineInfo const& lineInfo,\n            StringRef capturedExpression,\n            ResultDisposition::Flags resultDisposition )\n    :   m_assertionInfo{ macroName, lineInfo, capturedExpression, resultDisposition },\n        m_resultCapture( getResultCapture() )\n    {}\n\n    void AssertionHandler::handleExpr( ITransientExpression const& expr ) {\n        m_resultCapture.handleExpr( m_assertionInfo, expr, m_reaction );\n    }\n    void AssertionHandler::handleMessage(ResultWas::OfType resultType, StringRef const& message) {\n        m_resultCapture.handleMessage( m_assertionInfo, resultType, message, m_reaction );\n    }\n\n    auto AssertionHandler::allowThrows() const -> bool {\n        return getCurrentContext().getConfig()->allowThrows();\n    }\n\n    void AssertionHandler::complete() {\n        setCompleted();\n        if( m_reaction.shouldDebugBreak ) {\n\n            // If you find your debugger stopping you here then go one level up on the\n            // call-stack for the code that caused it (typically a failed assertion)\n\n            // (To go back to the test and change execution, jump over the throw, next)\n            CATCH_BREAK_INTO_DEBUGGER();\n        }\n        if (m_reaction.shouldThrow) {\n#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)\n            throw Catch::TestFailureException();\n#else\n            CATCH_ERROR( \"Test failure requires aborting test!\" );\n#endif\n        }\n    }\n    void AssertionHandler::setCompleted() {\n        m_completed = true;\n    }\n\n    void AssertionHandler::handleUnexpectedInflightException() {\n        m_resultCapture.handleUnexpectedInflightException( m_assertionInfo, Catch::translateActiveException(), m_reaction );\n    }\n\n    void AssertionHandler::handleExceptionThrownAsExpected() {\n        m_resultCapture.handleNonExpr(m_assertionInfo, ResultWas::Ok, m_reaction);\n    }\n    void AssertionHandler::handleExceptionNotThrownAsExpected() {\n        m_resultCapture.handleNonExpr(m_assertionInfo, ResultWas::Ok, m_reaction);\n    }\n\n    void AssertionHandler::handleUnexpectedExceptionNotThrown() {\n        m_resultCapture.handleUnexpectedExceptionNotThrown( m_assertionInfo, m_reaction );\n    }\n\n    void AssertionHandler::handleThrowingCallSkipped() {\n        m_resultCapture.handleNonExpr(m_assertionInfo, ResultWas::Ok, m_reaction);\n    }\n\n    // This is the overload that takes a string and infers the Equals matcher from it\n    // The more general overload, that takes any string matcher, is in catch_capture_matchers.cpp\n    void handleExceptionMatchExpr( AssertionHandler& handler, std::string const& str, StringRef const& matcherString  ) {\n        handleExceptionMatchExpr( handler, Matchers::Equals( str ), matcherString );\n    }\n\n} // namespace Catch\n// end catch_assertionhandler.cpp\n// start catch_assertionresult.cpp\n\nnamespace Catch {\n    AssertionResultData::AssertionResultData(ResultWas::OfType _resultType, LazyExpression const & _lazyExpression):\n        lazyExpression(_lazyExpression),\n        resultType(_resultType) {}\n\n    std::string AssertionResultData::reconstructExpression() const {\n\n        if( reconstructedExpression.empty() ) {\n            if( lazyExpression ) {\n                ReusableStringStream rss;\n                rss << lazyExpression;\n                reconstructedExpression = rss.str();\n            }\n        }\n        return reconstructedExpression;\n    }\n\n    AssertionResult::AssertionResult( AssertionInfo const& info, AssertionResultData const& data )\n    :   m_info( info ),\n        m_resultData( data )\n    {}\n\n    // Result was a success\n    bool AssertionResult::succeeded() const {\n        return Catch::isOk( m_resultData.resultType );\n    }\n\n    // Result was a success, or failure is suppressed\n    bool AssertionResult::isOk() const {\n        return Catch::isOk( m_resultData.resultType ) || shouldSuppressFailure( m_info.resultDisposition );\n    }\n\n    ResultWas::OfType AssertionResult::getResultType() const {\n        return m_resultData.resultType;\n    }\n\n    bool AssertionResult::hasExpression() const {\n        return !m_info.capturedExpression.empty();\n    }\n\n    bool AssertionResult::hasMessage() const {\n        return !m_resultData.message.empty();\n    }\n\n    std::string AssertionResult::getExpression() const {\n        // Possibly overallocating by 3 characters should be basically free\n        std::string expr; expr.reserve(m_info.capturedExpression.size() + 3);\n        if (isFalseTest(m_info.resultDisposition)) {\n            expr += \"!(\";\n        }\n        expr += m_info.capturedExpression;\n        if (isFalseTest(m_info.resultDisposition)) {\n            expr += ')';\n        }\n        return expr;\n    }\n\n    std::string AssertionResult::getExpressionInMacro() const {\n        std::string expr;\n        if( m_info.macroName.empty() )\n            expr = static_cast<std::string>(m_info.capturedExpression);\n        else {\n            expr.reserve( m_info.macroName.size() + m_info.capturedExpression.size() + 4 );\n            expr += m_info.macroName;\n            expr += \"( \";\n            expr += m_info.capturedExpression;\n            expr += \" )\";\n        }\n        return expr;\n    }\n\n    bool AssertionResult::hasExpandedExpression() const {\n        return hasExpression() && getExpandedExpression() != getExpression();\n    }\n\n    std::string AssertionResult::getExpandedExpression() const {\n        std::string expr = m_resultData.reconstructExpression();\n        return expr.empty()\n                ? getExpression()\n                : expr;\n    }\n\n    std::string AssertionResult::getMessage() const {\n        return m_resultData.message;\n    }\n    SourceLineInfo AssertionResult::getSourceInfo() const {\n        return m_info.lineInfo;\n    }\n\n    StringRef AssertionResult::getTestMacroName() const {\n        return m_info.macroName;\n    }\n\n} // end namespace Catch\n// end catch_assertionresult.cpp\n// start catch_capture_matchers.cpp\n\nnamespace Catch {\n\n    using StringMatcher = Matchers::Impl::MatcherBase<std::string>;\n\n    // This is the general overload that takes a any string matcher\n    // There is another overload, in catch_assertionhandler.h/.cpp, that only takes a string and infers\n    // the Equals matcher (so the header does not mention matchers)\n    void handleExceptionMatchExpr( AssertionHandler& handler, StringMatcher const& matcher, StringRef const& matcherString  ) {\n        std::string exceptionMessage = Catch::translateActiveException();\n        MatchExpr<std::string, StringMatcher const&> expr( exceptionMessage, matcher, matcherString );\n        handler.handleExpr( expr );\n    }\n\n} // namespace Catch\n// end catch_capture_matchers.cpp\n// start catch_commandline.cpp\n\n// start catch_commandline.h\n\n// start catch_clara.h\n\n// Use Catch's value for console width (store Clara's off to the side, if present)\n#ifdef CLARA_CONFIG_CONSOLE_WIDTH\n#define CATCH_TEMP_CLARA_CONFIG_CONSOLE_WIDTH CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH\n#undef CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH\n#endif\n#define CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH CATCH_CONFIG_CONSOLE_WIDTH-1\n\n#ifdef __clang__\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wweak-vtables\"\n#pragma clang diagnostic ignored \"-Wexit-time-destructors\"\n#pragma clang diagnostic ignored \"-Wshadow\"\n#endif\n\n// start clara.hpp\n// Copyright 2017 Two Blue Cubes Ltd. All rights reserved.\n//\n// Distributed under the Boost Software License, Version 1.0. (See accompanying\n// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\n//\n// See https://github.com/philsquared/Clara for more details\n\n// Clara v1.1.5\n\n\n#ifndef CATCH_CLARA_CONFIG_CONSOLE_WIDTH\n#define CATCH_CLARA_CONFIG_CONSOLE_WIDTH 80\n#endif\n\n#ifndef CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH\n#define CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH CATCH_CLARA_CONFIG_CONSOLE_WIDTH\n#endif\n\n#ifndef CLARA_CONFIG_OPTIONAL_TYPE\n#ifdef __has_include\n#if __has_include(<optional>) && __cplusplus >= 201703L\n#include <optional>\n#define CLARA_CONFIG_OPTIONAL_TYPE std::optional\n#endif\n#endif\n#endif\n\n// ----------- #included from clara_textflow.hpp -----------\n\n// TextFlowCpp\n//\n// A single-header library for wrapping and laying out basic text, by Phil Nash\n//\n// Distributed under the Boost Software License, Version 1.0. (See accompanying\n// file LICENSE.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\n//\n// This project is hosted at https://github.com/philsquared/textflowcpp\n\n\n#include <cassert>\n#include <ostream>\n#include <sstream>\n#include <vector>\n\n#ifndef CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH\n#define CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH 80\n#endif\n\nnamespace Catch {\nnamespace clara {\nnamespace TextFlow {\n\ninline auto isWhitespace(char c) -> bool {\n\tstatic std::string chars = \" \\t\\n\\r\";\n\treturn chars.find(c) != std::string::npos;\n}\ninline auto isBreakableBefore(char c) -> bool {\n\tstatic std::string chars = \"[({<|\";\n\treturn chars.find(c) != std::string::npos;\n}\ninline auto isBreakableAfter(char c) -> bool {\n\tstatic std::string chars = \"])}>.,:;*+-=&/\\\\\";\n\treturn chars.find(c) != std::string::npos;\n}\n\nclass Columns;\n\nclass Column {\n\tstd::vector<std::string> m_strings;\n\tsize_t m_width = CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH;\n\tsize_t m_indent = 0;\n\tsize_t m_initialIndent = std::string::npos;\n\npublic:\n\tclass iterator {\n\t\tfriend Column;\n\n\t\tColumn const& m_column;\n\t\tsize_t m_stringIndex = 0;\n\t\tsize_t m_pos = 0;\n\n\t\tsize_t m_len = 0;\n\t\tsize_t m_end = 0;\n\t\tbool m_suffix = false;\n\n\t\titerator(Column const& column, size_t stringIndex)\n\t\t\t: m_column(column),\n\t\t\tm_stringIndex(stringIndex) {}\n\n\t\tauto line() const -> std::string const& { return m_column.m_strings[m_stringIndex]; }\n\n\t\tauto isBoundary(size_t at) const -> bool {\n\t\t\tassert(at > 0);\n\t\t\tassert(at <= line().size());\n\n\t\t\treturn at == line().size() ||\n\t\t\t\t(isWhitespace(line()[at]) && !isWhitespace(line()[at - 1])) ||\n\t\t\t\tisBreakableBefore(line()[at]) ||\n\t\t\t\tisBreakableAfter(line()[at - 1]);\n\t\t}\n\n\t\tvoid calcLength() {\n\t\t\tassert(m_stringIndex < m_column.m_strings.size());\n\n\t\t\tm_suffix = false;\n\t\t\tauto width = m_column.m_width - indent();\n\t\t\tm_end = m_pos;\n\t\t\tif (line()[m_pos] == '\\n') {\n\t\t\t\t++m_end;\n\t\t\t}\n\t\t\twhile (m_end < line().size() && line()[m_end] != '\\n')\n\t\t\t\t++m_end;\n\n\t\t\tif (m_end < m_pos + width) {\n\t\t\t\tm_len = m_end - m_pos;\n\t\t\t} else {\n\t\t\t\tsize_t len = width;\n\t\t\t\twhile (len > 0 && !isBoundary(m_pos + len))\n\t\t\t\t\t--len;\n\t\t\t\twhile (len > 0 && isWhitespace(line()[m_pos + len - 1]))\n\t\t\t\t\t--len;\n\n\t\t\t\tif (len > 0) {\n\t\t\t\t\tm_len = len;\n\t\t\t\t} else {\n\t\t\t\t\tm_suffix = true;\n\t\t\t\t\tm_len = width - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tauto indent() const -> size_t {\n\t\t\tauto initial = m_pos == 0 && m_stringIndex == 0 ? m_column.m_initialIndent : std::string::npos;\n\t\t\treturn initial == std::string::npos ? m_column.m_indent : initial;\n\t\t}\n\n\t\tauto addIndentAndSuffix(std::string const &plain) const -> std::string {\n\t\t\treturn std::string(indent(), ' ') + (m_suffix ? plain + \"-\" : plain);\n\t\t}\n\n\tpublic:\n\t\tusing difference_type = std::ptrdiff_t;\n\t\tusing value_type = std::string;\n\t\tusing pointer = value_type * ;\n\t\tusing reference = value_type & ;\n\t\tusing iterator_category = std::forward_iterator_tag;\n\n\t\texplicit iterator(Column const& column) : m_column(column) {\n\t\t\tassert(m_column.m_width > m_column.m_indent);\n\t\t\tassert(m_column.m_initialIndent == std::string::npos || m_column.m_width > m_column.m_initialIndent);\n\t\t\tcalcLength();\n\t\t\tif (m_len == 0)\n\t\t\t\tm_stringIndex++; // Empty string\n\t\t}\n\n\t\tauto operator *() const -> std::string {\n\t\t\tassert(m_stringIndex < m_column.m_strings.size());\n\t\t\tassert(m_pos <= m_end);\n\t\t\treturn addIndentAndSuffix(line().substr(m_pos, m_len));\n\t\t}\n\n\t\tauto operator ++() -> iterator& {\n\t\t\tm_pos += m_len;\n\t\t\tif (m_pos < line().size() && line()[m_pos] == '\\n')\n\t\t\t\tm_pos += 1;\n\t\t\telse\n\t\t\t\twhile (m_pos < line().size() && isWhitespace(line()[m_pos]))\n\t\t\t\t\t++m_pos;\n\n\t\t\tif (m_pos == line().size()) {\n\t\t\t\tm_pos = 0;\n\t\t\t\t++m_stringIndex;\n\t\t\t}\n\t\t\tif (m_stringIndex < m_column.m_strings.size())\n\t\t\t\tcalcLength();\n\t\t\treturn *this;\n\t\t}\n\t\tauto operator ++(int) -> iterator {\n\t\t\titerator prev(*this);\n\t\t\toperator++();\n\t\t\treturn prev;\n\t\t}\n\n\t\tauto operator ==(iterator const& other) const -> bool {\n\t\t\treturn\n\t\t\t\tm_pos == other.m_pos &&\n\t\t\t\tm_stringIndex == other.m_stringIndex &&\n\t\t\t\t&m_column == &other.m_column;\n\t\t}\n\t\tauto operator !=(iterator const& other) const -> bool {\n\t\t\treturn !operator==(other);\n\t\t}\n\t};\n\tusing const_iterator = iterator;\n\n\texplicit Column(std::string const& text) { m_strings.push_back(text); }\n\n\tauto width(size_t newWidth) -> Column& {\n\t\tassert(newWidth > 0);\n\t\tm_width = newWidth;\n\t\treturn *this;\n\t}\n\tauto indent(size_t newIndent) -> Column& {\n\t\tm_indent = newIndent;\n\t\treturn *this;\n\t}\n\tauto initialIndent(size_t newIndent) -> Column& {\n\t\tm_initialIndent = newIndent;\n\t\treturn *this;\n\t}\n\n\tauto width() const -> size_t { return m_width; }\n\tauto begin() const -> iterator { return iterator(*this); }\n\tauto end() const -> iterator { return { *this, m_strings.size() }; }\n\n\tinline friend std::ostream& operator << (std::ostream& os, Column const& col) {\n\t\tbool first = true;\n\t\tfor (auto line : col) {\n\t\t\tif (first)\n\t\t\t\tfirst = false;\n\t\t\telse\n\t\t\t\tos << \"\\n\";\n\t\t\tos << line;\n\t\t}\n\t\treturn os;\n\t}\n\n\tauto operator + (Column const& other)->Columns;\n\n\tauto toString() const -> std::string {\n\t\tstd::ostringstream oss;\n\t\toss << *this;\n\t\treturn oss.str();\n\t}\n};\n\nclass Spacer : public Column {\n\npublic:\n\texplicit Spacer(size_t spaceWidth) : Column(\"\") {\n\t\twidth(spaceWidth);\n\t}\n};\n\nclass Columns {\n\tstd::vector<Column> m_columns;\n\npublic:\n\n\tclass iterator {\n\t\tfriend Columns;\n\t\tstruct EndTag {};\n\n\t\tstd::vector<Column> const& m_columns;\n\t\tstd::vector<Column::iterator> m_iterators;\n\t\tsize_t m_activeIterators;\n\n\t\titerator(Columns const& columns, EndTag)\n\t\t\t: m_columns(columns.m_columns),\n\t\t\tm_activeIterators(0) {\n\t\t\tm_iterators.reserve(m_columns.size());\n\n\t\t\tfor (auto const& col : m_columns)\n\t\t\t\tm_iterators.push_back(col.end());\n\t\t}\n\n\tpublic:\n\t\tusing difference_type = std::ptrdiff_t;\n\t\tusing value_type = std::string;\n\t\tusing pointer = value_type * ;\n\t\tusing reference = value_type & ;\n\t\tusing iterator_category = std::forward_iterator_tag;\n\n\t\texplicit iterator(Columns const& columns)\n\t\t\t: m_columns(columns.m_columns),\n\t\t\tm_activeIterators(m_columns.size()) {\n\t\t\tm_iterators.reserve(m_columns.size());\n\n\t\t\tfor (auto const& col : m_columns)\n\t\t\t\tm_iterators.push_back(col.begin());\n\t\t}\n\n\t\tauto operator ==(iterator const& other) const -> bool {\n\t\t\treturn m_iterators == other.m_iterators;\n\t\t}\n\t\tauto operator !=(iterator const& other) const -> bool {\n\t\t\treturn m_iterators != other.m_iterators;\n\t\t}\n\t\tauto operator *() const -> std::string {\n\t\t\tstd::string row, padding;\n\n\t\t\tfor (size_t i = 0; i < m_columns.size(); ++i) {\n\t\t\t\tauto width = m_columns[i].width();\n\t\t\t\tif (m_iterators[i] != m_columns[i].end()) {\n\t\t\t\t\tstd::string col = *m_iterators[i];\n\t\t\t\t\trow += padding + col;\n\t\t\t\t\tif (col.size() < width)\n\t\t\t\t\t\tpadding = std::string(width - col.size(), ' ');\n\t\t\t\t\telse\n\t\t\t\t\t\tpadding = \"\";\n\t\t\t\t} else {\n\t\t\t\t\tpadding += std::string(width, ' ');\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn row;\n\t\t}\n\t\tauto operator ++() -> iterator& {\n\t\t\tfor (size_t i = 0; i < m_columns.size(); ++i) {\n\t\t\t\tif (m_iterators[i] != m_columns[i].end())\n\t\t\t\t\t++m_iterators[i];\n\t\t\t}\n\t\t\treturn *this;\n\t\t}\n\t\tauto operator ++(int) -> iterator {\n\t\t\titerator prev(*this);\n\t\t\toperator++();\n\t\t\treturn prev;\n\t\t}\n\t};\n\tusing const_iterator = iterator;\n\n\tauto begin() const -> iterator { return iterator(*this); }\n\tauto end() const -> iterator { return { *this, iterator::EndTag() }; }\n\n\tauto operator += (Column const& col) -> Columns& {\n\t\tm_columns.push_back(col);\n\t\treturn *this;\n\t}\n\tauto operator + (Column const& col) -> Columns {\n\t\tColumns combined = *this;\n\t\tcombined += col;\n\t\treturn combined;\n\t}\n\n\tinline friend std::ostream& operator << (std::ostream& os, Columns const& cols) {\n\n\t\tbool first = true;\n\t\tfor (auto line : cols) {\n\t\t\tif (first)\n\t\t\t\tfirst = false;\n\t\t\telse\n\t\t\t\tos << \"\\n\";\n\t\t\tos << line;\n\t\t}\n\t\treturn os;\n\t}\n\n\tauto toString() const -> std::string {\n\t\tstd::ostringstream oss;\n\t\toss << *this;\n\t\treturn oss.str();\n\t}\n};\n\ninline auto Column::operator + (Column const& other) -> Columns {\n\tColumns cols;\n\tcols += *this;\n\tcols += other;\n\treturn cols;\n}\n}\n\n}\n}\n\n// ----------- end of #include from clara_textflow.hpp -----------\n// ........... back in clara.hpp\n\n#include <cctype>\n#include <string>\n#include <memory>\n#include <set>\n#include <algorithm>\n\n#if !defined(CATCH_PLATFORM_WINDOWS) && ( defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(_MSC_VER) )\n#define CATCH_PLATFORM_WINDOWS\n#endif\n\nnamespace Catch { namespace clara {\nnamespace detail {\n\n    // Traits for extracting arg and return type of lambdas (for single argument lambdas)\n    template<typename L>\n    struct UnaryLambdaTraits : UnaryLambdaTraits<decltype( &L::operator() )> {};\n\n    template<typename ClassT, typename ReturnT, typename... Args>\n    struct UnaryLambdaTraits<ReturnT( ClassT::* )( Args... ) const> {\n        static const bool isValid = false;\n    };\n\n    template<typename ClassT, typename ReturnT, typename ArgT>\n    struct UnaryLambdaTraits<ReturnT( ClassT::* )( ArgT ) const> {\n        static const bool isValid = true;\n        using ArgType = typename std::remove_const<typename std::remove_reference<ArgT>::type>::type;\n        using ReturnType = ReturnT;\n    };\n\n    class TokenStream;\n\n    // Transport for raw args (copied from main args, or supplied via init list for testing)\n    class Args {\n        friend TokenStream;\n        std::string m_exeName;\n        std::vector<std::string> m_args;\n\n    public:\n        Args( int argc, char const* const* argv )\n            : m_exeName(argv[0]),\n              m_args(argv + 1, argv + argc) {}\n\n        Args( std::initializer_list<std::string> args )\n        :   m_exeName( *args.begin() ),\n            m_args( args.begin()+1, args.end() )\n        {}\n\n        auto exeName() const -> std::string {\n            return m_exeName;\n        }\n    };\n\n    // Wraps a token coming from a token stream. These may not directly correspond to strings as a single string\n    // may encode an option + its argument if the : or = form is used\n    enum class TokenType {\n        Option, Argument\n    };\n    struct Token {\n        TokenType type;\n        std::string token;\n    };\n\n    inline auto isOptPrefix( char c ) -> bool {\n        return c == '-'\n#ifdef CATCH_PLATFORM_WINDOWS\n            || c == '/'\n#endif\n        ;\n    }\n\n    // Abstracts iterators into args as a stream of tokens, with option arguments uniformly handled\n    class TokenStream {\n        using Iterator = std::vector<std::string>::const_iterator;\n        Iterator it;\n        Iterator itEnd;\n        std::vector<Token> m_tokenBuffer;\n\n        void loadBuffer() {\n            m_tokenBuffer.resize( 0 );\n\n            // Skip any empty strings\n            while( it != itEnd && it->empty() )\n                ++it;\n\n            if( it != itEnd ) {\n                auto const &next = *it;\n                if( isOptPrefix( next[0] ) ) {\n                    auto delimiterPos = next.find_first_of( \" :=\" );\n                    if( delimiterPos != std::string::npos ) {\n                        m_tokenBuffer.push_back( { TokenType::Option, next.substr( 0, delimiterPos ) } );\n                        m_tokenBuffer.push_back( { TokenType::Argument, next.substr( delimiterPos + 1 ) } );\n                    } else {\n                        if( next[1] != '-' && next.size() > 2 ) {\n                            std::string opt = \"- \";\n                            for( size_t i = 1; i < next.size(); ++i ) {\n                                opt[1] = next[i];\n                                m_tokenBuffer.push_back( { TokenType::Option, opt } );\n                            }\n                        } else {\n                            m_tokenBuffer.push_back( { TokenType::Option, next } );\n                        }\n                    }\n                } else {\n                    m_tokenBuffer.push_back( { TokenType::Argument, next } );\n                }\n            }\n        }\n\n    public:\n        explicit TokenStream( Args const &args ) : TokenStream( args.m_args.begin(), args.m_args.end() ) {}\n\n        TokenStream( Iterator it, Iterator itEnd ) : it( it ), itEnd( itEnd ) {\n            loadBuffer();\n        }\n\n        explicit operator bool() const {\n            return !m_tokenBuffer.empty() || it != itEnd;\n        }\n\n        auto count() const -> size_t { return m_tokenBuffer.size() + (itEnd - it); }\n\n        auto operator*() const -> Token {\n            assert( !m_tokenBuffer.empty() );\n            return m_tokenBuffer.front();\n        }\n\n        auto operator->() const -> Token const * {\n            assert( !m_tokenBuffer.empty() );\n            return &m_tokenBuffer.front();\n        }\n\n        auto operator++() -> TokenStream & {\n            if( m_tokenBuffer.size() >= 2 ) {\n                m_tokenBuffer.erase( m_tokenBuffer.begin() );\n            } else {\n                if( it != itEnd )\n                    ++it;\n                loadBuffer();\n            }\n            return *this;\n        }\n    };\n\n    class ResultBase {\n    public:\n        enum Type {\n            Ok, LogicError, RuntimeError\n        };\n\n    protected:\n        ResultBase( Type type ) : m_type( type ) {}\n        virtual ~ResultBase() = default;\n\n        virtual void enforceOk() const = 0;\n\n        Type m_type;\n    };\n\n    template<typename T>\n    class ResultValueBase : public ResultBase {\n    public:\n        auto value() const -> T const & {\n            enforceOk();\n            return m_value;\n        }\n\n    protected:\n        ResultValueBase( Type type ) : ResultBase( type ) {}\n\n        ResultValueBase( ResultValueBase const &other ) : ResultBase( other ) {\n            if( m_type == ResultBase::Ok )\n                new( &m_value ) T( other.m_value );\n        }\n\n        ResultValueBase( Type, T const &value ) : ResultBase( Ok ) {\n            new( &m_value ) T( value );\n        }\n\n        auto operator=( ResultValueBase const &other ) -> ResultValueBase & {\n            if( m_type == ResultBase::Ok )\n                m_value.~T();\n            ResultBase::operator=(other);\n            if( m_type == ResultBase::Ok )\n                new( &m_value ) T( other.m_value );\n            return *this;\n        }\n\n        ~ResultValueBase() override {\n            if( m_type == Ok )\n                m_value.~T();\n        }\n\n        union {\n            T m_value;\n        };\n    };\n\n    template<>\n    class ResultValueBase<void> : public ResultBase {\n    protected:\n        using ResultBase::ResultBase;\n    };\n\n    template<typename T = void>\n    class BasicResult : public ResultValueBase<T> {\n    public:\n        template<typename U>\n        explicit BasicResult( BasicResult<U> const &other )\n        :   ResultValueBase<T>( other.type() ),\n            m_errorMessage( other.errorMessage() )\n        {\n            assert( type() != ResultBase::Ok );\n        }\n\n        template<typename U>\n        static auto ok( U const &value ) -> BasicResult { return { ResultBase::Ok, value }; }\n        static auto ok() -> BasicResult { return { ResultBase::Ok }; }\n        static auto logicError( std::string const &message ) -> BasicResult { return { ResultBase::LogicError, message }; }\n        static auto runtimeError( std::string const &message ) -> BasicResult { return { ResultBase::RuntimeError, message }; }\n\n        explicit operator bool() const { return m_type == ResultBase::Ok; }\n        auto type() const -> ResultBase::Type { return m_type; }\n        auto errorMessage() const -> std::string { return m_errorMessage; }\n\n    protected:\n        void enforceOk() const override {\n\n            // Errors shouldn't reach this point, but if they do\n            // the actual error message will be in m_errorMessage\n            assert( m_type != ResultBase::LogicError );\n            assert( m_type != ResultBase::RuntimeError );\n            if( m_type != ResultBase::Ok )\n                std::abort();\n        }\n\n        std::string m_errorMessage; // Only populated if resultType is an error\n\n        BasicResult( ResultBase::Type type, std::string const &message )\n        :   ResultValueBase<T>(type),\n            m_errorMessage(message)\n        {\n            assert( m_type != ResultBase::Ok );\n        }\n\n        using ResultValueBase<T>::ResultValueBase;\n        using ResultBase::m_type;\n    };\n\n    enum class ParseResultType {\n        Matched, NoMatch, ShortCircuitAll, ShortCircuitSame\n    };\n\n    class ParseState {\n    public:\n\n        ParseState( ParseResultType type, TokenStream const &remainingTokens )\n        : m_type(type),\n          m_remainingTokens( remainingTokens )\n        {}\n\n        auto type() const -> ParseResultType { return m_type; }\n        auto remainingTokens() const -> TokenStream { return m_remainingTokens; }\n\n    private:\n        ParseResultType m_type;\n        TokenStream m_remainingTokens;\n    };\n\n    using Result = BasicResult<void>;\n    using ParserResult = BasicResult<ParseResultType>;\n    using InternalParseResult = BasicResult<ParseState>;\n\n    struct HelpColumns {\n        std::string left;\n        std::string right;\n    };\n\n    template<typename T>\n    inline auto convertInto( std::string const &source, T& target ) -> ParserResult {\n        std::stringstream ss;\n        ss << source;\n        ss >> target;\n        if( ss.fail() )\n            return ParserResult::runtimeError( \"Unable to convert '\" + source + \"' to destination type\" );\n        else\n            return ParserResult::ok( ParseResultType::Matched );\n    }\n    inline auto convertInto( std::string const &source, std::string& target ) -> ParserResult {\n        target = source;\n        return ParserResult::ok( ParseResultType::Matched );\n    }\n    inline auto convertInto( std::string const &source, bool &target ) -> ParserResult {\n        std::string srcLC = source;\n        std::transform( srcLC.begin(), srcLC.end(), srcLC.begin(), []( unsigned char c ) { return static_cast<char>( std::tolower(c) ); } );\n        if (srcLC == \"y\" || srcLC == \"1\" || srcLC == \"true\" || srcLC == \"yes\" || srcLC == \"on\")\n            target = true;\n        else if (srcLC == \"n\" || srcLC == \"0\" || srcLC == \"false\" || srcLC == \"no\" || srcLC == \"off\")\n            target = false;\n        else\n            return ParserResult::runtimeError( \"Expected a boolean value but did not recognise: '\" + source + \"'\" );\n        return ParserResult::ok( ParseResultType::Matched );\n    }\n#ifdef CLARA_CONFIG_OPTIONAL_TYPE\n    template<typename T>\n    inline auto convertInto( std::string const &source, CLARA_CONFIG_OPTIONAL_TYPE<T>& target ) -> ParserResult {\n        T temp;\n        auto result = convertInto( source, temp );\n        if( result )\n            target = std::move(temp);\n        return result;\n    }\n#endif // CLARA_CONFIG_OPTIONAL_TYPE\n\n    struct NonCopyable {\n        NonCopyable() = default;\n        NonCopyable( NonCopyable const & ) = delete;\n        NonCopyable( NonCopyable && ) = delete;\n        NonCopyable &operator=( NonCopyable const & ) = delete;\n        NonCopyable &operator=( NonCopyable && ) = delete;\n    };\n\n    struct BoundRef : NonCopyable {\n        virtual ~BoundRef() = default;\n        virtual auto isContainer() const -> bool { return false; }\n        virtual auto isFlag() const -> bool { return false; }\n    };\n    struct BoundValueRefBase : BoundRef {\n        virtual auto setValue( std::string const &arg ) -> ParserResult = 0;\n    };\n    struct BoundFlagRefBase : BoundRef {\n        virtual auto setFlag( bool flag ) -> ParserResult = 0;\n        virtual auto isFlag() const -> bool { return true; }\n    };\n\n    template<typename T>\n    struct BoundValueRef : BoundValueRefBase {\n        T &m_ref;\n\n        explicit BoundValueRef( T &ref ) : m_ref( ref ) {}\n\n        auto setValue( std::string const &arg ) -> ParserResult override {\n            return convertInto( arg, m_ref );\n        }\n    };\n\n    template<typename T>\n    struct BoundValueRef<std::vector<T>> : BoundValueRefBase {\n        std::vector<T> &m_ref;\n\n        explicit BoundValueRef( std::vector<T> &ref ) : m_ref( ref ) {}\n\n        auto isContainer() const -> bool override { return true; }\n\n        auto setValue( std::string const &arg ) -> ParserResult override {\n            T temp;\n            auto result = convertInto( arg, temp );\n            if( result )\n                m_ref.push_back( temp );\n            return result;\n        }\n    };\n\n    struct BoundFlagRef : BoundFlagRefBase {\n        bool &m_ref;\n\n        explicit BoundFlagRef( bool &ref ) : m_ref( ref ) {}\n\n        auto setFlag( bool flag ) -> ParserResult override {\n            m_ref = flag;\n            return ParserResult::ok( ParseResultType::Matched );\n        }\n    };\n\n    template<typename ReturnType>\n    struct LambdaInvoker {\n        static_assert( std::is_same<ReturnType, ParserResult>::value, \"Lambda must return void or clara::ParserResult\" );\n\n        template<typename L, typename ArgType>\n        static auto invoke( L const &lambda, ArgType const &arg ) -> ParserResult {\n            return lambda( arg );\n        }\n    };\n\n    template<>\n    struct LambdaInvoker<void> {\n        template<typename L, typename ArgType>\n        static auto invoke( L const &lambda, ArgType const &arg ) -> ParserResult {\n            lambda( arg );\n            return ParserResult::ok( ParseResultType::Matched );\n        }\n    };\n\n    template<typename ArgType, typename L>\n    inline auto invokeLambda( L const &lambda, std::string const &arg ) -> ParserResult {\n        ArgType temp{};\n        auto result = convertInto( arg, temp );\n        return !result\n           ? result\n           : LambdaInvoker<typename UnaryLambdaTraits<L>::ReturnType>::invoke( lambda, temp );\n    }\n\n    template<typename L>\n    struct BoundLambda : BoundValueRefBase {\n        L m_lambda;\n\n        static_assert( UnaryLambdaTraits<L>::isValid, \"Supplied lambda must take exactly one argument\" );\n        explicit BoundLambda( L const &lambda ) : m_lambda( lambda ) {}\n\n        auto setValue( std::string const &arg ) -> ParserResult override {\n            return invokeLambda<typename UnaryLambdaTraits<L>::ArgType>( m_lambda, arg );\n        }\n    };\n\n    template<typename L>\n    struct BoundFlagLambda : BoundFlagRefBase {\n        L m_lambda;\n\n        static_assert( UnaryLambdaTraits<L>::isValid, \"Supplied lambda must take exactly one argument\" );\n        static_assert( std::is_same<typename UnaryLambdaTraits<L>::ArgType, bool>::value, \"flags must be boolean\" );\n\n        explicit BoundFlagLambda( L const &lambda ) : m_lambda( lambda ) {}\n\n        auto setFlag( bool flag ) -> ParserResult override {\n            return LambdaInvoker<typename UnaryLambdaTraits<L>::ReturnType>::invoke( m_lambda, flag );\n        }\n    };\n\n    enum class Optionality { Optional, Required };\n\n    struct Parser;\n\n    class ParserBase {\n    public:\n        virtual ~ParserBase() = default;\n        virtual auto validate() const -> Result { return Result::ok(); }\n        virtual auto parse( std::string const& exeName, TokenStream const &tokens) const -> InternalParseResult  = 0;\n        virtual auto cardinality() const -> size_t { return 1; }\n\n        auto parse( Args const &args ) const -> InternalParseResult {\n            return parse( args.exeName(), TokenStream( args ) );\n        }\n    };\n\n    template<typename DerivedT>\n    class ComposableParserImpl : public ParserBase {\n    public:\n        template<typename T>\n        auto operator|( T const &other ) const -> Parser;\n\n\t\ttemplate<typename T>\n        auto operator+( T const &other ) const -> Parser;\n    };\n\n    // Common code and state for Args and Opts\n    template<typename DerivedT>\n    class ParserRefImpl : public ComposableParserImpl<DerivedT> {\n    protected:\n        Optionality m_optionality = Optionality::Optional;\n        std::shared_ptr<BoundRef> m_ref;\n        std::string m_hint;\n        std::string m_description;\n\n        explicit ParserRefImpl( std::shared_ptr<BoundRef> const &ref ) : m_ref( ref ) {}\n\n    public:\n        template<typename T>\n        ParserRefImpl( T &ref, std::string const &hint )\n        :   m_ref( std::make_shared<BoundValueRef<T>>( ref ) ),\n            m_hint( hint )\n        {}\n\n        template<typename LambdaT>\n        ParserRefImpl( LambdaT const &ref, std::string const &hint )\n        :   m_ref( std::make_shared<BoundLambda<LambdaT>>( ref ) ),\n            m_hint(hint)\n        {}\n\n        auto operator()( std::string const &description ) -> DerivedT & {\n            m_description = description;\n            return static_cast<DerivedT &>( *this );\n        }\n\n        auto optional() -> DerivedT & {\n            m_optionality = Optionality::Optional;\n            return static_cast<DerivedT &>( *this );\n        };\n\n        auto required() -> DerivedT & {\n            m_optionality = Optionality::Required;\n            return static_cast<DerivedT &>( *this );\n        };\n\n        auto isOptional() const -> bool {\n            return m_optionality == Optionality::Optional;\n        }\n\n        auto cardinality() const -> size_t override {\n            if( m_ref->isContainer() )\n                return 0;\n            else\n                return 1;\n        }\n\n        auto hint() const -> std::string { return m_hint; }\n    };\n\n    class ExeName : public ComposableParserImpl<ExeName> {\n        std::shared_ptr<std::string> m_name;\n        std::shared_ptr<BoundValueRefBase> m_ref;\n\n        template<typename LambdaT>\n        static auto makeRef(LambdaT const &lambda) -> std::shared_ptr<BoundValueRefBase> {\n            return std::make_shared<BoundLambda<LambdaT>>( lambda) ;\n        }\n\n    public:\n        ExeName() : m_name( std::make_shared<std::string>( \"<executable>\" ) ) {}\n\n        explicit ExeName( std::string &ref ) : ExeName() {\n            m_ref = std::make_shared<BoundValueRef<std::string>>( ref );\n        }\n\n        template<typename LambdaT>\n        explicit ExeName( LambdaT const& lambda ) : ExeName() {\n            m_ref = std::make_shared<BoundLambda<LambdaT>>( lambda );\n        }\n\n        // The exe name is not parsed out of the normal tokens, but is handled specially\n        auto parse( std::string const&, TokenStream const &tokens ) const -> InternalParseResult override {\n            return InternalParseResult::ok( ParseState( ParseResultType::NoMatch, tokens ) );\n        }\n\n        auto name() const -> std::string { return *m_name; }\n        auto set( std::string const& newName ) -> ParserResult {\n\n            auto lastSlash = newName.find_last_of( \"\\\\/\" );\n            auto filename = ( lastSlash == std::string::npos )\n                    ? newName\n                    : newName.substr( lastSlash+1 );\n\n            *m_name = filename;\n            if( m_ref )\n                return m_ref->setValue( filename );\n            else\n                return ParserResult::ok( ParseResultType::Matched );\n        }\n    };\n\n    class Arg : public ParserRefImpl<Arg> {\n    public:\n        using ParserRefImpl::ParserRefImpl;\n\n        auto parse( std::string const &, TokenStream const &tokens ) const -> InternalParseResult override {\n            auto validationResult = validate();\n            if( !validationResult )\n                return InternalParseResult( validationResult );\n\n            auto remainingTokens = tokens;\n            auto const &token = *remainingTokens;\n            if( token.type != TokenType::Argument )\n                return InternalParseResult::ok( ParseState( ParseResultType::NoMatch, remainingTokens ) );\n\n            assert( !m_ref->isFlag() );\n            auto valueRef = static_cast<detail::BoundValueRefBase*>( m_ref.get() );\n\n            auto result = valueRef->setValue( remainingTokens->token );\n            if( !result )\n                return InternalParseResult( result );\n            else\n                return InternalParseResult::ok( ParseState( ParseResultType::Matched, ++remainingTokens ) );\n        }\n    };\n\n    inline auto normaliseOpt( std::string const &optName ) -> std::string {\n#ifdef CATCH_PLATFORM_WINDOWS\n        if( optName[0] == '/' )\n            return \"-\" + optName.substr( 1 );\n        else\n#endif\n            return optName;\n    }\n\n    class Opt : public ParserRefImpl<Opt> {\n    protected:\n        std::vector<std::string> m_optNames;\n\n    public:\n        template<typename LambdaT>\n        explicit Opt( LambdaT const &ref ) : ParserRefImpl( std::make_shared<BoundFlagLambda<LambdaT>>( ref ) ) {}\n\n        explicit Opt( bool &ref ) : ParserRefImpl( std::make_shared<BoundFlagRef>( ref ) ) {}\n\n        template<typename LambdaT>\n        Opt( LambdaT const &ref, std::string const &hint ) : ParserRefImpl( ref, hint ) {}\n\n        template<typename T>\n        Opt( T &ref, std::string const &hint ) : ParserRefImpl( ref, hint ) {}\n\n        auto operator[]( std::string const &optName ) -> Opt & {\n            m_optNames.push_back( optName );\n            return *this;\n        }\n\n        auto getHelpColumns() const -> std::vector<HelpColumns> {\n            std::ostringstream oss;\n            bool first = true;\n            for( auto const &opt : m_optNames ) {\n                if (first)\n                    first = false;\n                else\n                    oss << \", \";\n                oss << opt;\n            }\n            if( !m_hint.empty() )\n                oss << \" <\" << m_hint << \">\";\n            return { { oss.str(), m_description } };\n        }\n\n        auto isMatch( std::string const &optToken ) const -> bool {\n            auto normalisedToken = normaliseOpt( optToken );\n            for( auto const &name : m_optNames ) {\n                if( normaliseOpt( name ) == normalisedToken )\n                    return true;\n            }\n            return false;\n        }\n\n        using ParserBase::parse;\n\n        auto parse( std::string const&, TokenStream const &tokens ) const -> InternalParseResult override {\n            auto validationResult = validate();\n            if( !validationResult )\n                return InternalParseResult( validationResult );\n\n            auto remainingTokens = tokens;\n            if( remainingTokens && remainingTokens->type == TokenType::Option ) {\n                auto const &token = *remainingTokens;\n                if( isMatch(token.token ) ) {\n                    if( m_ref->isFlag() ) {\n                        auto flagRef = static_cast<detail::BoundFlagRefBase*>( m_ref.get() );\n                        auto result = flagRef->setFlag( true );\n                        if( !result )\n                            return InternalParseResult( result );\n                        if( result.value() == ParseResultType::ShortCircuitAll )\n                            return InternalParseResult::ok( ParseState( result.value(), remainingTokens ) );\n                    } else {\n                        auto valueRef = static_cast<detail::BoundValueRefBase*>( m_ref.get() );\n                        ++remainingTokens;\n                        if( !remainingTokens )\n                            return InternalParseResult::runtimeError( \"Expected argument following \" + token.token );\n                        auto const &argToken = *remainingTokens;\n                        if( argToken.type != TokenType::Argument )\n                            return InternalParseResult::runtimeError( \"Expected argument following \" + token.token );\n                        auto result = valueRef->setValue( argToken.token );\n                        if( !result )\n                            return InternalParseResult( result );\n                        if( result.value() == ParseResultType::ShortCircuitAll )\n                            return InternalParseResult::ok( ParseState( result.value(), remainingTokens ) );\n                    }\n                    return InternalParseResult::ok( ParseState( ParseResultType::Matched, ++remainingTokens ) );\n                }\n            }\n            return InternalParseResult::ok( ParseState( ParseResultType::NoMatch, remainingTokens ) );\n        }\n\n        auto validate() const -> Result override {\n            if( m_optNames.empty() )\n                return Result::logicError( \"No options supplied to Opt\" );\n            for( auto const &name : m_optNames ) {\n                if( name.empty() )\n                    return Result::logicError( \"Option name cannot be empty\" );\n#ifdef CATCH_PLATFORM_WINDOWS\n                if( name[0] != '-' && name[0] != '/' )\n                    return Result::logicError( \"Option name must begin with '-' or '/'\" );\n#else\n                if( name[0] != '-' )\n                    return Result::logicError( \"Option name must begin with '-'\" );\n#endif\n            }\n            return ParserRefImpl::validate();\n        }\n    };\n\n    struct Help : Opt {\n        Help( bool &showHelpFlag )\n        :   Opt([&]( bool flag ) {\n                showHelpFlag = flag;\n                return ParserResult::ok( ParseResultType::ShortCircuitAll );\n            })\n        {\n            static_cast<Opt &>( *this )\n                    (\"display usage information\")\n                    [\"-?\"][\"-h\"][\"--help\"]\n                    .optional();\n        }\n    };\n\n    struct Parser : ParserBase {\n\n        mutable ExeName m_exeName;\n        std::vector<Opt> m_options;\n        std::vector<Arg> m_args;\n\n        auto operator|=( ExeName const &exeName ) -> Parser & {\n            m_exeName = exeName;\n            return *this;\n        }\n\n        auto operator|=( Arg const &arg ) -> Parser & {\n            m_args.push_back(arg);\n            return *this;\n        }\n\n        auto operator|=( Opt const &opt ) -> Parser & {\n            m_options.push_back(opt);\n            return *this;\n        }\n\n        auto operator|=( Parser const &other ) -> Parser & {\n            m_options.insert(m_options.end(), other.m_options.begin(), other.m_options.end());\n            m_args.insert(m_args.end(), other.m_args.begin(), other.m_args.end());\n            return *this;\n        }\n\n        template<typename T>\n        auto operator|( T const &other ) const -> Parser {\n            return Parser( *this ) |= other;\n        }\n\n        // Forward deprecated interface with '+' instead of '|'\n        template<typename T>\n        auto operator+=( T const &other ) -> Parser & { return operator|=( other ); }\n        template<typename T>\n        auto operator+( T const &other ) const -> Parser { return operator|( other ); }\n\n        auto getHelpColumns() const -> std::vector<HelpColumns> {\n            std::vector<HelpColumns> cols;\n            for (auto const &o : m_options) {\n                auto childCols = o.getHelpColumns();\n                cols.insert( cols.end(), childCols.begin(), childCols.end() );\n            }\n            return cols;\n        }\n\n        void writeToStream( std::ostream &os ) const {\n            if (!m_exeName.name().empty()) {\n                os << \"usage:\\n\" << \"  \" << m_exeName.name() << \" \";\n                bool required = true, first = true;\n                for( auto const &arg : m_args ) {\n                    if (first)\n                        first = false;\n                    else\n                        os << \" \";\n                    if( arg.isOptional() && required ) {\n                        os << \"[\";\n                        required = false;\n                    }\n                    os << \"<\" << arg.hint() << \">\";\n                    if( arg.cardinality() == 0 )\n                        os << \" ... \";\n                }\n                if( !required )\n                    os << \"]\";\n                if( !m_options.empty() )\n                    os << \" options\";\n                os << \"\\n\\nwhere options are:\" << std::endl;\n            }\n\n            auto rows = getHelpColumns();\n            size_t consoleWidth = CATCH_CLARA_CONFIG_CONSOLE_WIDTH;\n            size_t optWidth = 0;\n            for( auto const &cols : rows )\n                optWidth = (std::max)(optWidth, cols.left.size() + 2);\n\n            optWidth = (std::min)(optWidth, consoleWidth/2);\n\n            for( auto const &cols : rows ) {\n                auto row =\n                        TextFlow::Column( cols.left ).width( optWidth ).indent( 2 ) +\n                        TextFlow::Spacer(4) +\n                        TextFlow::Column( cols.right ).width( consoleWidth - 7 - optWidth );\n                os << row << std::endl;\n            }\n        }\n\n        friend auto operator<<( std::ostream &os, Parser const &parser ) -> std::ostream& {\n            parser.writeToStream( os );\n            return os;\n        }\n\n        auto validate() const -> Result override {\n            for( auto const &opt : m_options ) {\n                auto result = opt.validate();\n                if( !result )\n                    return result;\n            }\n            for( auto const &arg : m_args ) {\n                auto result = arg.validate();\n                if( !result )\n                    return result;\n            }\n            return Result::ok();\n        }\n\n        using ParserBase::parse;\n\n        auto parse( std::string const& exeName, TokenStream const &tokens ) const -> InternalParseResult override {\n\n            struct ParserInfo {\n                ParserBase const* parser = nullptr;\n                size_t count = 0;\n            };\n            const size_t totalParsers = m_options.size() + m_args.size();\n            assert( totalParsers < 512 );\n            // ParserInfo parseInfos[totalParsers]; // <-- this is what we really want to do\n            ParserInfo parseInfos[512];\n\n            {\n                size_t i = 0;\n                for (auto const &opt : m_options) parseInfos[i++].parser = &opt;\n                for (auto const &arg : m_args) parseInfos[i++].parser = &arg;\n            }\n\n            m_exeName.set( exeName );\n\n            auto result = InternalParseResult::ok( ParseState( ParseResultType::NoMatch, tokens ) );\n            while( result.value().remainingTokens() ) {\n                bool tokenParsed = false;\n\n                for( size_t i = 0; i < totalParsers; ++i ) {\n                    auto&  parseInfo = parseInfos[i];\n                    if( parseInfo.parser->cardinality() == 0 || parseInfo.count < parseInfo.parser->cardinality() ) {\n                        result = parseInfo.parser->parse(exeName, result.value().remainingTokens());\n                        if (!result)\n                            return result;\n                        if (result.value().type() != ParseResultType::NoMatch) {\n                            tokenParsed = true;\n                            ++parseInfo.count;\n                            break;\n                        }\n                    }\n                }\n\n                if( result.value().type() == ParseResultType::ShortCircuitAll )\n                    return result;\n                if( !tokenParsed )\n                    return InternalParseResult::runtimeError( \"Unrecognised token: \" + result.value().remainingTokens()->token );\n            }\n            // !TBD Check missing required options\n            return result;\n        }\n    };\n\n    template<typename DerivedT>\n    template<typename T>\n    auto ComposableParserImpl<DerivedT>::operator|( T const &other ) const -> Parser {\n        return Parser() | static_cast<DerivedT const &>( *this ) | other;\n    }\n} // namespace detail\n\n// A Combined parser\nusing detail::Parser;\n\n// A parser for options\nusing detail::Opt;\n\n// A parser for arguments\nusing detail::Arg;\n\n// Wrapper for argc, argv from main()\nusing detail::Args;\n\n// Specifies the name of the executable\nusing detail::ExeName;\n\n// Convenience wrapper for option parser that specifies the help option\nusing detail::Help;\n\n// enum of result types from a parse\nusing detail::ParseResultType;\n\n// Result type for parser operation\nusing detail::ParserResult;\n\n}} // namespace Catch::clara\n\n// end clara.hpp\n#ifdef __clang__\n#pragma clang diagnostic pop\n#endif\n\n// Restore Clara's value for console width, if present\n#ifdef CATCH_TEMP_CLARA_CONFIG_CONSOLE_WIDTH\n#define CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH CATCH_TEMP_CLARA_CONFIG_CONSOLE_WIDTH\n#undef CATCH_TEMP_CLARA_CONFIG_CONSOLE_WIDTH\n#endif\n\n// end catch_clara.h\nnamespace Catch {\n\n    clara::Parser makeCommandLineParser( ConfigData& config );\n\n} // end namespace Catch\n\n// end catch_commandline.h\n#include <fstream>\n#include <ctime>\n\nnamespace Catch {\n\n    clara::Parser makeCommandLineParser( ConfigData& config ) {\n\n        using namespace clara;\n\n        auto const setWarning = [&]( std::string const& warning ) {\n                auto warningSet = [&]() {\n                    if( warning == \"NoAssertions\" )\n                        return WarnAbout::NoAssertions;\n\n                    if ( warning == \"NoTests\" )\n                        return WarnAbout::NoTests;\n\n                    return WarnAbout::Nothing;\n                }();\n\n                if (warningSet == WarnAbout::Nothing)\n                    return ParserResult::runtimeError( \"Unrecognised warning: '\" + warning + \"'\" );\n                config.warnings = static_cast<WarnAbout::What>( config.warnings | warningSet );\n                return ParserResult::ok( ParseResultType::Matched );\n            };\n        auto const loadTestNamesFromFile = [&]( std::string const& filename ) {\n                std::ifstream f( filename.c_str() );\n                if( !f.is_open() )\n                    return ParserResult::runtimeError( \"Unable to load input file: '\" + filename + \"'\" );\n\n                std::string line;\n                while( std::getline( f, line ) ) {\n                    line = trim(line);\n                    if( !line.empty() && !startsWith( line, '#' ) ) {\n                        if( !startsWith( line, '\"' ) )\n                            line = '\"' + line + '\"';\n                        config.testsOrTags.push_back( line );\n                        config.testsOrTags.emplace_back( \",\" );\n                    }\n                }\n                //Remove comma in the end\n                if(!config.testsOrTags.empty())\n                    config.testsOrTags.erase( config.testsOrTags.end()-1 );\n\n                return ParserResult::ok( ParseResultType::Matched );\n            };\n        auto const setTestOrder = [&]( std::string const& order ) {\n                if( startsWith( \"declared\", order ) )\n                    config.runOrder = RunTests::InDeclarationOrder;\n                else if( startsWith( \"lexical\", order ) )\n                    config.runOrder = RunTests::InLexicographicalOrder;\n                else if( startsWith( \"random\", order ) )\n                    config.runOrder = RunTests::InRandomOrder;\n                else\n                    return clara::ParserResult::runtimeError( \"Unrecognised ordering: '\" + order + \"'\" );\n                return ParserResult::ok( ParseResultType::Matched );\n            };\n        auto const setRngSeed = [&]( std::string const& seed ) {\n                if( seed != \"time\" )\n                    return clara::detail::convertInto( seed, config.rngSeed );\n                config.rngSeed = static_cast<unsigned int>( std::time(nullptr) );\n                return ParserResult::ok( ParseResultType::Matched );\n            };\n        auto const setColourUsage = [&]( std::string const& useColour ) {\n                    auto mode = toLower( useColour );\n\n                    if( mode == \"yes\" )\n                        config.useColour = UseColour::Yes;\n                    else if( mode == \"no\" )\n                        config.useColour = UseColour::No;\n                    else if( mode == \"auto\" )\n                        config.useColour = UseColour::Auto;\n                    else\n                        return ParserResult::runtimeError( \"colour mode must be one of: auto, yes or no. '\" + useColour + \"' not recognised\" );\n                return ParserResult::ok( ParseResultType::Matched );\n            };\n        auto const setWaitForKeypress = [&]( std::string const& keypress ) {\n                auto keypressLc = toLower( keypress );\n                if (keypressLc == \"never\")\n                    config.waitForKeypress = WaitForKeypress::Never;\n                else if( keypressLc == \"start\" )\n                    config.waitForKeypress = WaitForKeypress::BeforeStart;\n                else if( keypressLc == \"exit\" )\n                    config.waitForKeypress = WaitForKeypress::BeforeExit;\n                else if( keypressLc == \"both\" )\n                    config.waitForKeypress = WaitForKeypress::BeforeStartAndExit;\n                else\n                    return ParserResult::runtimeError( \"keypress argument must be one of: never, start, exit or both. '\" + keypress + \"' not recognised\" );\n            return ParserResult::ok( ParseResultType::Matched );\n            };\n        auto const setVerbosity = [&]( std::string const& verbosity ) {\n            auto lcVerbosity = toLower( verbosity );\n            if( lcVerbosity == \"quiet\" )\n                config.verbosity = Verbosity::Quiet;\n            else if( lcVerbosity == \"normal\" )\n                config.verbosity = Verbosity::Normal;\n            else if( lcVerbosity == \"high\" )\n                config.verbosity = Verbosity::High;\n            else\n                return ParserResult::runtimeError( \"Unrecognised verbosity, '\" + verbosity + \"'\" );\n            return ParserResult::ok( ParseResultType::Matched );\n        };\n        auto const setReporter = [&]( std::string const& reporter ) {\n            IReporterRegistry::FactoryMap const& factories = getRegistryHub().getReporterRegistry().getFactories();\n\n            auto lcReporter = toLower( reporter );\n            auto result = factories.find( lcReporter );\n\n            if( factories.end() != result )\n                config.reporterName = lcReporter;\n            else\n                return ParserResult::runtimeError( \"Unrecognized reporter, '\" + reporter + \"'. Check available with --list-reporters\" );\n            return ParserResult::ok( ParseResultType::Matched );\n        };\n\n        auto cli\n            = ExeName( config.processName )\n            | Help( config.showHelp )\n            | Opt( config.listTests )\n                [\"-l\"][\"--list-tests\"]\n                ( \"list all/matching test cases\" )\n            | Opt( config.listTags )\n                [\"-t\"][\"--list-tags\"]\n                ( \"list all/matching tags\" )\n            | Opt( config.showSuccessfulTests )\n                [\"-s\"][\"--success\"]\n                ( \"include successful tests in output\" )\n            | Opt( config.shouldDebugBreak )\n                [\"-b\"][\"--break\"]\n                ( \"break into debugger on failure\" )\n            | Opt( config.noThrow )\n                [\"-e\"][\"--nothrow\"]\n                ( \"skip exception tests\" )\n            | Opt( config.showInvisibles )\n                [\"-i\"][\"--invisibles\"]\n                ( \"show invisibles (tabs, newlines)\" )\n            | Opt( config.outputFilename, \"filename\" )\n                [\"-o\"][\"--out\"]\n                ( \"output filename\" )\n            | Opt( setReporter, \"name\" )\n                [\"-r\"][\"--reporter\"]\n                ( \"reporter to use (defaults to console)\" )\n            | Opt( config.name, \"name\" )\n                [\"-n\"][\"--name\"]\n                ( \"suite name\" )\n            | Opt( [&]( bool ){ config.abortAfter = 1; } )\n                [\"-a\"][\"--abort\"]\n                ( \"abort at first failure\" )\n            | Opt( [&]( int x ){ config.abortAfter = x; }, \"no. failures\" )\n                [\"-x\"][\"--abortx\"]\n                ( \"abort after x failures\" )\n            | Opt( setWarning, \"warning name\" )\n                [\"-w\"][\"--warn\"]\n                ( \"enable warnings\" )\n            | Opt( [&]( bool flag ) { config.showDurations = flag ? ShowDurations::Always : ShowDurations::Never; }, \"yes|no\" )\n                [\"-d\"][\"--durations\"]\n                ( \"show test durations\" )\n            | Opt( config.minDuration, \"seconds\" )\n                [\"-D\"][\"--min-duration\"]\n                ( \"show test durations for tests taking at least the given number of seconds\" )\n            | Opt( loadTestNamesFromFile, \"filename\" )\n                [\"-f\"][\"--input-file\"]\n                ( \"load test names to run from a file\" )\n            | Opt( config.filenamesAsTags )\n                [\"-#\"][\"--filenames-as-tags\"]\n                ( \"adds a tag for the filename\" )\n            | Opt( config.sectionsToRun, \"section name\" )\n                [\"-c\"][\"--section\"]\n                ( \"specify section to run\" )\n            | Opt( setVerbosity, \"quiet|normal|high\" )\n                [\"-v\"][\"--verbosity\"]\n                ( \"set output verbosity\" )\n            | Opt( config.listTestNamesOnly )\n                [\"--list-test-names-only\"]\n                ( \"list all/matching test cases names only\" )\n            | Opt( config.listReporters )\n                [\"--list-reporters\"]\n                ( \"list all reporters\" )\n            | Opt( setTestOrder, \"decl|lex|rand\" )\n                [\"--order\"]\n                ( \"test case order (defaults to decl)\" )\n            | Opt( setRngSeed, \"'time'|number\" )\n                [\"--rng-seed\"]\n                ( \"set a specific seed for random numbers\" )\n            | Opt( setColourUsage, \"yes|no\" )\n                [\"--use-colour\"]\n                ( \"should output be colourised\" )\n            | Opt( config.libIdentify )\n                [\"--libidentify\"]\n                ( \"report name and version according to libidentify standard\" )\n            | Opt( setWaitForKeypress, \"never|start|exit|both\" )\n                [\"--wait-for-keypress\"]\n                ( \"waits for a keypress before exiting\" )\n            | Opt( config.benchmarkSamples, \"samples\" )\n                [\"--benchmark-samples\"]\n                ( \"number of samples to collect (default: 100)\" )\n            | Opt( config.benchmarkResamples, \"resamples\" )\n                [\"--benchmark-resamples\"]\n                ( \"number of resamples for the bootstrap (default: 100000)\" )\n            | Opt( config.benchmarkConfidenceInterval, \"confidence interval\" )\n                [\"--benchmark-confidence-interval\"]\n                ( \"confidence interval for the bootstrap (between 0 and 1, default: 0.95)\" )\n            | Opt( config.benchmarkNoAnalysis )\n                [\"--benchmark-no-analysis\"]\n                ( \"perform only measurements; do not perform any analysis\" )\n            | Opt( config.benchmarkWarmupTime, \"benchmarkWarmupTime\" )\n                [\"--benchmark-warmup-time\"]\n                ( \"amount of time in milliseconds spent on warming up each test (default: 100)\" )\n            | Arg( config.testsOrTags, \"test name|pattern|tags\" )\n                ( \"which test or tests to use\" );\n\n        return cli;\n    }\n\n} // end namespace Catch\n// end catch_commandline.cpp\n// start catch_common.cpp\n\n#include <cstring>\n#include <ostream>\n\nnamespace Catch {\n\n    bool SourceLineInfo::operator == ( SourceLineInfo const& other ) const noexcept {\n        return line == other.line && (file == other.file || std::strcmp(file, other.file) == 0);\n    }\n    bool SourceLineInfo::operator < ( SourceLineInfo const& other ) const noexcept {\n        // We can assume that the same file will usually have the same pointer.\n        // Thus, if the pointers are the same, there is no point in calling the strcmp\n        return line < other.line || ( line == other.line && file != other.file && (std::strcmp(file, other.file) < 0));\n    }\n\n    std::ostream& operator << ( std::ostream& os, SourceLineInfo const& info ) {\n#ifndef __GNUG__\n        os << info.file << '(' << info.line << ')';\n#else\n        os << info.file << ':' << info.line;\n#endif\n        return os;\n    }\n\n    std::string StreamEndStop::operator+() const {\n        return std::string();\n    }\n\n    NonCopyable::NonCopyable() = default;\n    NonCopyable::~NonCopyable() = default;\n\n}\n// end catch_common.cpp\n// start catch_config.cpp\n\nnamespace Catch {\n\n    Config::Config( ConfigData const& data )\n    :   m_data( data ),\n        m_stream( openStream() )\n    {\n        // We need to trim filter specs to avoid trouble with superfluous\n        // whitespace (esp. important for bdd macros, as those are manually\n        // aligned with whitespace).\n\n        for (auto& elem : m_data.testsOrTags) {\n            elem = trim(elem);\n        }\n        for (auto& elem : m_data.sectionsToRun) {\n            elem = trim(elem);\n        }\n\n        TestSpecParser parser(ITagAliasRegistry::get());\n        if (!m_data.testsOrTags.empty()) {\n            m_hasTestFilters = true;\n            for (auto const& testOrTags : m_data.testsOrTags) {\n                parser.parse(testOrTags);\n            }\n        }\n        m_testSpec = parser.testSpec();\n    }\n\n    std::string const& Config::getFilename() const {\n        return m_data.outputFilename ;\n    }\n\n    bool Config::listTests() const          { return m_data.listTests; }\n    bool Config::listTestNamesOnly() const  { return m_data.listTestNamesOnly; }\n    bool Config::listTags() const           { return m_data.listTags; }\n    bool Config::listReporters() const      { return m_data.listReporters; }\n\n    std::string Config::getProcessName() const { return m_data.processName; }\n    std::string const& Config::getReporterName() const { return m_data.reporterName; }\n\n    std::vector<std::string> const& Config::getTestsOrTags() const { return m_data.testsOrTags; }\n    std::vector<std::string> const& Config::getSectionsToRun() const { return m_data.sectionsToRun; }\n\n    TestSpec const& Config::testSpec() const { return m_testSpec; }\n    bool Config::hasTestFilters() const { return m_hasTestFilters; }\n\n    bool Config::showHelp() const { return m_data.showHelp; }\n\n    // IConfig interface\n    bool Config::allowThrows() const                   { return !m_data.noThrow; }\n    std::ostream& Config::stream() const               { return m_stream->stream(); }\n    std::string Config::name() const                   { return m_data.name.empty() ? m_data.processName : m_data.name; }\n    bool Config::includeSuccessfulResults() const      { return m_data.showSuccessfulTests; }\n    bool Config::warnAboutMissingAssertions() const    { return !!(m_data.warnings & WarnAbout::NoAssertions); }\n    bool Config::warnAboutNoTests() const              { return !!(m_data.warnings & WarnAbout::NoTests); }\n    ShowDurations::OrNot Config::showDurations() const { return m_data.showDurations; }\n    double Config::minDuration() const                 { return m_data.minDuration; }\n    RunTests::InWhatOrder Config::runOrder() const     { return m_data.runOrder; }\n    unsigned int Config::rngSeed() const               { return m_data.rngSeed; }\n    UseColour::YesOrNo Config::useColour() const       { return m_data.useColour; }\n    bool Config::shouldDebugBreak() const              { return m_data.shouldDebugBreak; }\n    int Config::abortAfter() const                     { return m_data.abortAfter; }\n    bool Config::showInvisibles() const                { return m_data.showInvisibles; }\n    Verbosity Config::verbosity() const                { return m_data.verbosity; }\n\n    bool Config::benchmarkNoAnalysis() const                      { return m_data.benchmarkNoAnalysis; }\n    int Config::benchmarkSamples() const                          { return m_data.benchmarkSamples; }\n    double Config::benchmarkConfidenceInterval() const            { return m_data.benchmarkConfidenceInterval; }\n    unsigned int Config::benchmarkResamples() const               { return m_data.benchmarkResamples; }\n    std::chrono::milliseconds Config::benchmarkWarmupTime() const { return std::chrono::milliseconds(m_data.benchmarkWarmupTime); }\n\n    IStream const* Config::openStream() {\n        return Catch::makeStream(m_data.outputFilename);\n    }\n\n} // end namespace Catch\n// end catch_config.cpp\n// start catch_console_colour.cpp\n\n#if defined(__clang__)\n#    pragma clang diagnostic push\n#    pragma clang diagnostic ignored \"-Wexit-time-destructors\"\n#endif\n\n// start catch_errno_guard.h\n\nnamespace Catch {\n\n    class ErrnoGuard {\n    public:\n        ErrnoGuard();\n        ~ErrnoGuard();\n    private:\n        int m_oldErrno;\n    };\n\n}\n\n// end catch_errno_guard.h\n// start catch_windows_h_proxy.h\n\n\n#if defined(CATCH_PLATFORM_WINDOWS)\n\n#if !defined(NOMINMAX) && !defined(CATCH_CONFIG_NO_NOMINMAX)\n#  define CATCH_DEFINED_NOMINMAX\n#  define NOMINMAX\n#endif\n#if !defined(WIN32_LEAN_AND_MEAN) && !defined(CATCH_CONFIG_NO_WIN32_LEAN_AND_MEAN)\n#  define CATCH_DEFINED_WIN32_LEAN_AND_MEAN\n#  define WIN32_LEAN_AND_MEAN\n#endif\n\n#ifdef __AFXDLL\n#include <AfxWin.h>\n#else\n#include <windows.h>\n#endif\n\n#ifdef CATCH_DEFINED_NOMINMAX\n#  undef NOMINMAX\n#endif\n#ifdef CATCH_DEFINED_WIN32_LEAN_AND_MEAN\n#  undef WIN32_LEAN_AND_MEAN\n#endif\n\n#endif // defined(CATCH_PLATFORM_WINDOWS)\n\n// end catch_windows_h_proxy.h\n#include <sstream>\n\nnamespace Catch {\n    namespace {\n\n        struct IColourImpl {\n            virtual ~IColourImpl() = default;\n            virtual void use( Colour::Code _colourCode ) = 0;\n        };\n\n        struct NoColourImpl : IColourImpl {\n            void use( Colour::Code ) override {}\n\n            static IColourImpl* instance() {\n                static NoColourImpl s_instance;\n                return &s_instance;\n            }\n        };\n\n    } // anon namespace\n} // namespace Catch\n\n#if !defined( CATCH_CONFIG_COLOUR_NONE ) && !defined( CATCH_CONFIG_COLOUR_WINDOWS ) && !defined( CATCH_CONFIG_COLOUR_ANSI )\n#   ifdef CATCH_PLATFORM_WINDOWS\n#       define CATCH_CONFIG_COLOUR_WINDOWS\n#   else\n#       define CATCH_CONFIG_COLOUR_ANSI\n#   endif\n#endif\n\n#if defined ( CATCH_CONFIG_COLOUR_WINDOWS ) /////////////////////////////////////////\n\nnamespace Catch {\nnamespace {\n\n    class Win32ColourImpl : public IColourImpl {\n    public:\n        Win32ColourImpl() : stdoutHandle( GetStdHandle(STD_OUTPUT_HANDLE) )\n        {\n            CONSOLE_SCREEN_BUFFER_INFO csbiInfo;\n            GetConsoleScreenBufferInfo( stdoutHandle, &csbiInfo );\n            originalForegroundAttributes = csbiInfo.wAttributes & ~( BACKGROUND_GREEN | BACKGROUND_RED | BACKGROUND_BLUE | BACKGROUND_INTENSITY );\n            originalBackgroundAttributes = csbiInfo.wAttributes & ~( FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_INTENSITY );\n        }\n\n        void use( Colour::Code _colourCode ) override {\n            switch( _colourCode ) {\n                case Colour::None:      return setTextAttribute( originalForegroundAttributes );\n                case Colour::White:     return setTextAttribute( FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE );\n                case Colour::Red:       return setTextAttribute( FOREGROUND_RED );\n                case Colour::Green:     return setTextAttribute( FOREGROUND_GREEN );\n                case Colour::Blue:      return setTextAttribute( FOREGROUND_BLUE );\n                case Colour::Cyan:      return setTextAttribute( FOREGROUND_BLUE | FOREGROUND_GREEN );\n                case Colour::Yellow:    return setTextAttribute( FOREGROUND_RED | FOREGROUND_GREEN );\n                case Colour::Grey:      return setTextAttribute( 0 );\n\n                case Colour::LightGrey:     return setTextAttribute( FOREGROUND_INTENSITY );\n                case Colour::BrightRed:     return setTextAttribute( FOREGROUND_INTENSITY | FOREGROUND_RED );\n                case Colour::BrightGreen:   return setTextAttribute( FOREGROUND_INTENSITY | FOREGROUND_GREEN );\n                case Colour::BrightWhite:   return setTextAttribute( FOREGROUND_INTENSITY | FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE );\n                case Colour::BrightYellow:  return setTextAttribute( FOREGROUND_INTENSITY | FOREGROUND_RED | FOREGROUND_GREEN );\n\n                case Colour::Bright: CATCH_INTERNAL_ERROR( \"not a colour\" );\n\n                default:\n                    CATCH_ERROR( \"Unknown colour requested\" );\n            }\n        }\n\n    private:\n        void setTextAttribute( WORD _textAttribute ) {\n            SetConsoleTextAttribute( stdoutHandle, _textAttribute | originalBackgroundAttributes );\n        }\n        HANDLE stdoutHandle;\n        WORD originalForegroundAttributes;\n        WORD originalBackgroundAttributes;\n    };\n\n    IColourImpl* platformColourInstance() {\n        static Win32ColourImpl s_instance;\n\n        IConfigPtr config = getCurrentContext().getConfig();\n        UseColour::YesOrNo colourMode = config\n            ? config->useColour()\n            : UseColour::Auto;\n        if( colourMode == UseColour::Auto )\n            colourMode = UseColour::Yes;\n        return colourMode == UseColour::Yes\n            ? &s_instance\n            : NoColourImpl::instance();\n    }\n\n} // end anon namespace\n} // end namespace Catch\n\n#elif defined( CATCH_CONFIG_COLOUR_ANSI ) //////////////////////////////////////\n\n#include <unistd.h>\n\nnamespace Catch {\nnamespace {\n\n    // use POSIX/ ANSI console terminal codes\n    // Thanks to Adam Strzelecki for original contribution\n    // (http://github.com/nanoant)\n    // https://github.com/philsquared/Catch/pull/131\n    class PosixColourImpl : public IColourImpl {\n    public:\n        void use( Colour::Code _colourCode ) override {\n            switch( _colourCode ) {\n                case Colour::None:\n                case Colour::White:     return setColour( \"[0m\" );\n                case Colour::Red:       return setColour( \"[0;31m\" );\n                case Colour::Green:     return setColour( \"[0;32m\" );\n                case Colour::Blue:      return setColour( \"[0;34m\" );\n                case Colour::Cyan:      return setColour( \"[0;36m\" );\n                case Colour::Yellow:    return setColour( \"[0;33m\" );\n                case Colour::Grey:      return setColour( \"[1;30m\" );\n\n                case Colour::LightGrey:     return setColour( \"[0;37m\" );\n                case Colour::BrightRed:     return setColour( \"[1;31m\" );\n                case Colour::BrightGreen:   return setColour( \"[1;32m\" );\n                case Colour::BrightWhite:   return setColour( \"[1;37m\" );\n                case Colour::BrightYellow:  return setColour( \"[1;33m\" );\n\n                case Colour::Bright: CATCH_INTERNAL_ERROR( \"not a colour\" );\n                default: CATCH_INTERNAL_ERROR( \"Unknown colour requested\" );\n            }\n        }\n        static IColourImpl* instance() {\n            static PosixColourImpl s_instance;\n            return &s_instance;\n        }\n\n    private:\n        void setColour( const char* _escapeCode ) {\n            getCurrentContext().getConfig()->stream()\n                << '\\033' << _escapeCode;\n        }\n    };\n\n    bool useColourOnPlatform() {\n        return\n#if defined(CATCH_PLATFORM_MAC) || defined(CATCH_PLATFORM_IPHONE)\n            !isDebuggerActive() &&\n#endif\n#if !(defined(__DJGPP__) && defined(__STRICT_ANSI__))\n            isatty(STDOUT_FILENO)\n#else\n            false\n#endif\n            ;\n    }\n    IColourImpl* platformColourInstance() {\n        ErrnoGuard guard;\n        IConfigPtr config = getCurrentContext().getConfig();\n        UseColour::YesOrNo colourMode = config\n            ? config->useColour()\n            : UseColour::Auto;\n        if( colourMode == UseColour::Auto )\n            colourMode = useColourOnPlatform()\n                ? UseColour::Yes\n                : UseColour::No;\n        return colourMode == UseColour::Yes\n            ? PosixColourImpl::instance()\n            : NoColourImpl::instance();\n    }\n\n} // end anon namespace\n} // end namespace Catch\n\n#else  // not Windows or ANSI ///////////////////////////////////////////////\n\nnamespace Catch {\n\n    static IColourImpl* platformColourInstance() { return NoColourImpl::instance(); }\n\n} // end namespace Catch\n\n#endif // Windows/ ANSI/ None\n\nnamespace Catch {\n\n    Colour::Colour( Code _colourCode ) { use( _colourCode ); }\n    Colour::Colour( Colour&& other ) noexcept {\n        m_moved = other.m_moved;\n        other.m_moved = true;\n    }\n    Colour& Colour::operator=( Colour&& other ) noexcept {\n        m_moved = other.m_moved;\n        other.m_moved  = true;\n        return *this;\n    }\n\n    Colour::~Colour(){ if( !m_moved ) use( None ); }\n\n    void Colour::use( Code _colourCode ) {\n        static IColourImpl* impl = platformColourInstance();\n        // Strictly speaking, this cannot possibly happen.\n        // However, under some conditions it does happen (see #1626),\n        // and this change is small enough that we can let practicality\n        // triumph over purity in this case.\n        if (impl != nullptr) {\n            impl->use( _colourCode );\n        }\n    }\n\n    std::ostream& operator << ( std::ostream& os, Colour const& ) {\n        return os;\n    }\n\n} // end namespace Catch\n\n#if defined(__clang__)\n#    pragma clang diagnostic pop\n#endif\n\n// end catch_console_colour.cpp\n// start catch_context.cpp\n\nnamespace Catch {\n\n    class Context : public IMutableContext, NonCopyable {\n\n    public: // IContext\n        IResultCapture* getResultCapture() override {\n            return m_resultCapture;\n        }\n        IRunner* getRunner() override {\n            return m_runner;\n        }\n\n        IConfigPtr const& getConfig() const override {\n            return m_config;\n        }\n\n        ~Context() override;\n\n    public: // IMutableContext\n        void setResultCapture( IResultCapture* resultCapture ) override {\n            m_resultCapture = resultCapture;\n        }\n        void setRunner( IRunner* runner ) override {\n            m_runner = runner;\n        }\n        void setConfig( IConfigPtr const& config ) override {\n            m_config = config;\n        }\n\n        friend IMutableContext& getCurrentMutableContext();\n\n    private:\n        IConfigPtr m_config;\n        IRunner* m_runner = nullptr;\n        IResultCapture* m_resultCapture = nullptr;\n    };\n\n    IMutableContext *IMutableContext::currentContext = nullptr;\n\n    void IMutableContext::createContext()\n    {\n        currentContext = new Context();\n    }\n\n    void cleanUpContext() {\n        delete IMutableContext::currentContext;\n        IMutableContext::currentContext = nullptr;\n    }\n    IContext::~IContext() = default;\n    IMutableContext::~IMutableContext() = default;\n    Context::~Context() = default;\n\n    SimplePcg32& rng() {\n        static SimplePcg32 s_rng;\n        return s_rng;\n    }\n\n}\n// end catch_context.cpp\n// start catch_debug_console.cpp\n\n// start catch_debug_console.h\n\n#include <string>\n\nnamespace Catch {\n    void writeToDebugConsole( std::string const& text );\n}\n\n// end catch_debug_console.h\n#if defined(CATCH_CONFIG_ANDROID_LOGWRITE)\n#include <android/log.h>\n\n    namespace Catch {\n        void writeToDebugConsole( std::string const& text ) {\n            __android_log_write( ANDROID_LOG_DEBUG, \"Catch\", text.c_str() );\n        }\n    }\n\n#elif defined(CATCH_PLATFORM_WINDOWS)\n\n    namespace Catch {\n        void writeToDebugConsole( std::string const& text ) {\n            ::OutputDebugStringA( text.c_str() );\n        }\n    }\n\n#else\n\n    namespace Catch {\n        void writeToDebugConsole( std::string const& text ) {\n            // !TBD: Need a version for Mac/ XCode and other IDEs\n            Catch::cout() << text;\n        }\n    }\n\n#endif // Platform\n// end catch_debug_console.cpp\n// start catch_debugger.cpp\n\n#if defined(CATCH_PLATFORM_MAC) || defined(CATCH_PLATFORM_IPHONE)\n\n#  include <cassert>\n#  include <sys/types.h>\n#  include <unistd.h>\n#  include <cstddef>\n#  include <ostream>\n\n#ifdef __apple_build_version__\n    // These headers will only compile with AppleClang (XCode)\n    // For other compilers (Clang, GCC, ... ) we need to exclude them\n#  include <sys/sysctl.h>\n#endif\n\n    namespace Catch {\n        #ifdef __apple_build_version__\n        // The following function is taken directly from the following technical note:\n        // https://developer.apple.com/library/archive/qa/qa1361/_index.html\n\n        // Returns true if the current process is being debugged (either\n        // running under the debugger or has a debugger attached post facto).\n        bool isDebuggerActive(){\n            int                 mib[4];\n            struct kinfo_proc   info;\n            std::size_t         size;\n\n            // Initialize the flags so that, if sysctl fails for some bizarre\n            // reason, we get a predictable result.\n\n            info.kp_proc.p_flag = 0;\n\n            // Initialize mib, which tells sysctl the info we want, in this case\n            // we're looking for information about a specific process ID.\n\n            mib[0] = CTL_KERN;\n            mib[1] = KERN_PROC;\n            mib[2] = KERN_PROC_PID;\n            mib[3] = getpid();\n\n            // Call sysctl.\n\n            size = sizeof(info);\n            if( sysctl(mib, sizeof(mib) / sizeof(*mib), &info, &size, nullptr, 0) != 0 ) {\n                Catch::cerr() << \"\\n** Call to sysctl failed - unable to determine if debugger is active **\\n\" << std::endl;\n                return false;\n            }\n\n            // We're being debugged if the P_TRACED flag is set.\n\n            return ( (info.kp_proc.p_flag & P_TRACED) != 0 );\n        }\n        #else\n        bool isDebuggerActive() {\n            // We need to find another way to determine this for non-appleclang compilers on macOS\n            return false;\n        }\n        #endif\n    } // namespace Catch\n\n#elif defined(CATCH_PLATFORM_LINUX)\n    #include <fstream>\n    #include <string>\n\n    namespace Catch{\n        // The standard POSIX way of detecting a debugger is to attempt to\n        // ptrace() the process, but this needs to be done from a child and not\n        // this process itself to still allow attaching to this process later\n        // if wanted, so is rather heavy. Under Linux we have the PID of the\n        // \"debugger\" (which doesn't need to be gdb, of course, it could also\n        // be strace, for example) in /proc/$PID/status, so just get it from\n        // there instead.\n        bool isDebuggerActive(){\n            // Libstdc++ has a bug, where std::ifstream sets errno to 0\n            // This way our users can properly assert over errno values\n            ErrnoGuard guard;\n            std::ifstream in(\"/proc/self/status\");\n            for( std::string line; std::getline(in, line); ) {\n                static const int PREFIX_LEN = 11;\n                if( line.compare(0, PREFIX_LEN, \"TracerPid:\\t\") == 0 ) {\n                    // We're traced if the PID is not 0 and no other PID starts\n                    // with 0 digit, so it's enough to check for just a single\n                    // character.\n                    return line.length() > PREFIX_LEN && line[PREFIX_LEN] != '0';\n                }\n            }\n\n            return false;\n        }\n    } // namespace Catch\n#elif defined(_MSC_VER)\n    extern \"C\" __declspec(dllimport) int __stdcall IsDebuggerPresent();\n    namespace Catch {\n        bool isDebuggerActive() {\n            return IsDebuggerPresent() != 0;\n        }\n    }\n#elif defined(__MINGW32__)\n    extern \"C\" __declspec(dllimport) int __stdcall IsDebuggerPresent();\n    namespace Catch {\n        bool isDebuggerActive() {\n            return IsDebuggerPresent() != 0;\n        }\n    }\n#else\n    namespace Catch {\n       bool isDebuggerActive() { return false; }\n    }\n#endif // Platform\n// end catch_debugger.cpp\n// start catch_decomposer.cpp\n\nnamespace Catch {\n\n    ITransientExpression::~ITransientExpression() = default;\n\n    void formatReconstructedExpression( std::ostream &os, std::string const& lhs, StringRef op, std::string const& rhs ) {\n        if( lhs.size() + rhs.size() < 40 &&\n                lhs.find('\\n') == std::string::npos &&\n                rhs.find('\\n') == std::string::npos )\n            os << lhs << \" \" << op << \" \" << rhs;\n        else\n            os << lhs << \"\\n\" << op << \"\\n\" << rhs;\n    }\n}\n// end catch_decomposer.cpp\n// start catch_enforce.cpp\n\n#include <stdexcept>\n\nnamespace Catch {\n#if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) && !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS_CUSTOM_HANDLER)\n    [[noreturn]]\n    void throw_exception(std::exception const& e) {\n        Catch::cerr() << \"Catch will terminate because it needed to throw an exception.\\n\"\n                      << \"The message was: \" << e.what() << '\\n';\n        std::terminate();\n    }\n#endif\n\n    [[noreturn]]\n    void throw_logic_error(std::string const& msg) {\n        throw_exception(std::logic_error(msg));\n    }\n\n    [[noreturn]]\n    void throw_domain_error(std::string const& msg) {\n        throw_exception(std::domain_error(msg));\n    }\n\n    [[noreturn]]\n    void throw_runtime_error(std::string const& msg) {\n        throw_exception(std::runtime_error(msg));\n    }\n\n} // namespace Catch;\n// end catch_enforce.cpp\n// start catch_enum_values_registry.cpp\n// start catch_enum_values_registry.h\n\n#include <vector>\n#include <memory>\n\nnamespace Catch {\n\n    namespace Detail {\n\n        std::unique_ptr<EnumInfo> makeEnumInfo( StringRef enumName, StringRef allValueNames, std::vector<int> const& values );\n\n        class EnumValuesRegistry : public IMutableEnumValuesRegistry {\n\n            std::vector<std::unique_ptr<EnumInfo>> m_enumInfos;\n\n            EnumInfo const& registerEnum( StringRef enumName, StringRef allEnums, std::vector<int> const& values) override;\n        };\n\n        std::vector<StringRef> parseEnums( StringRef enums );\n\n    } // Detail\n\n} // Catch\n\n// end catch_enum_values_registry.h\n\n#include <map>\n#include <cassert>\n\nnamespace Catch {\n\n    IMutableEnumValuesRegistry::~IMutableEnumValuesRegistry() {}\n\n    namespace Detail {\n\n        namespace {\n            // Extracts the actual name part of an enum instance\n            // In other words, it returns the Blue part of Bikeshed::Colour::Blue\n            StringRef extractInstanceName(StringRef enumInstance) {\n                // Find last occurrence of \":\"\n                size_t name_start = enumInstance.size();\n                while (name_start > 0 && enumInstance[name_start - 1] != ':') {\n                    --name_start;\n                }\n                return enumInstance.substr(name_start, enumInstance.size() - name_start);\n            }\n        }\n\n        std::vector<StringRef> parseEnums( StringRef enums ) {\n            auto enumValues = splitStringRef( enums, ',' );\n            std::vector<StringRef> parsed;\n            parsed.reserve( enumValues.size() );\n            for( auto const& enumValue : enumValues ) {\n                parsed.push_back(trim(extractInstanceName(enumValue)));\n            }\n            return parsed;\n        }\n\n        EnumInfo::~EnumInfo() {}\n\n        StringRef EnumInfo::lookup( int value ) const {\n            for( auto const& valueToName : m_values ) {\n                if( valueToName.first == value )\n                    return valueToName.second;\n            }\n            return \"{** unexpected enum value **}\"_sr;\n        }\n\n        std::unique_ptr<EnumInfo> makeEnumInfo( StringRef enumName, StringRef allValueNames, std::vector<int> const& values ) {\n            std::unique_ptr<EnumInfo> enumInfo( new EnumInfo );\n            enumInfo->m_name = enumName;\n            enumInfo->m_values.reserve( values.size() );\n\n            const auto valueNames = Catch::Detail::parseEnums( allValueNames );\n            assert( valueNames.size() == values.size() );\n            std::size_t i = 0;\n            for( auto value : values )\n                enumInfo->m_values.emplace_back(value, valueNames[i++]);\n\n            return enumInfo;\n        }\n\n        EnumInfo const& EnumValuesRegistry::registerEnum( StringRef enumName, StringRef allValueNames, std::vector<int> const& values ) {\n            m_enumInfos.push_back(makeEnumInfo(enumName, allValueNames, values));\n            return *m_enumInfos.back();\n        }\n\n    } // Detail\n} // Catch\n\n// end catch_enum_values_registry.cpp\n// start catch_errno_guard.cpp\n\n#include <cerrno>\n\nnamespace Catch {\n        ErrnoGuard::ErrnoGuard():m_oldErrno(errno){}\n        ErrnoGuard::~ErrnoGuard() { errno = m_oldErrno; }\n}\n// end catch_errno_guard.cpp\n// start catch_exception_translator_registry.cpp\n\n// start catch_exception_translator_registry.h\n\n#include <vector>\n#include <string>\n#include <memory>\n\nnamespace Catch {\n\n    class ExceptionTranslatorRegistry : public IExceptionTranslatorRegistry {\n    public:\n        ~ExceptionTranslatorRegistry();\n        virtual void registerTranslator( const IExceptionTranslator* translator );\n        std::string translateActiveException() const override;\n        std::string tryTranslators() const;\n\n    private:\n        std::vector<std::unique_ptr<IExceptionTranslator const>> m_translators;\n    };\n}\n\n// end catch_exception_translator_registry.h\n#ifdef __OBJC__\n#import \"Foundation/Foundation.h\"\n#endif\n\nnamespace Catch {\n\n    ExceptionTranslatorRegistry::~ExceptionTranslatorRegistry() {\n    }\n\n    void ExceptionTranslatorRegistry::registerTranslator( const IExceptionTranslator* translator ) {\n        m_translators.push_back( std::unique_ptr<const IExceptionTranslator>( translator ) );\n    }\n\n#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)\n    std::string ExceptionTranslatorRegistry::translateActiveException() const {\n        try {\n#ifdef __OBJC__\n            // In Objective-C try objective-c exceptions first\n            @try {\n                return tryTranslators();\n            }\n            @catch (NSException *exception) {\n                return Catch::Detail::stringify( [exception description] );\n            }\n#else\n            // Compiling a mixed mode project with MSVC means that CLR\n            // exceptions will be caught in (...) as well. However, these\n            // do not fill-in std::current_exception and thus lead to crash\n            // when attempting rethrow.\n            // /EHa switch also causes structured exceptions to be caught\n            // here, but they fill-in current_exception properly, so\n            // at worst the output should be a little weird, instead of\n            // causing a crash.\n            if (std::current_exception() == nullptr) {\n                return \"Non C++ exception. Possibly a CLR exception.\";\n            }\n            return tryTranslators();\n#endif\n        }\n        catch( TestFailureException& ) {\n            std::rethrow_exception(std::current_exception());\n        }\n        catch( std::exception& ex ) {\n            return ex.what();\n        }\n        catch( std::string& msg ) {\n            return msg;\n        }\n        catch( const char* msg ) {\n            return msg;\n        }\n        catch(...) {\n            return \"Unknown exception\";\n        }\n    }\n\n    std::string ExceptionTranslatorRegistry::tryTranslators() const {\n        if (m_translators.empty()) {\n            std::rethrow_exception(std::current_exception());\n        } else {\n            return m_translators[0]->translate(m_translators.begin() + 1, m_translators.end());\n        }\n    }\n\n#else // ^^ Exceptions are enabled // Exceptions are disabled vv\n    std::string ExceptionTranslatorRegistry::translateActiveException() const {\n        CATCH_INTERNAL_ERROR(\"Attempted to translate active exception under CATCH_CONFIG_DISABLE_EXCEPTIONS!\");\n    }\n\n    std::string ExceptionTranslatorRegistry::tryTranslators() const {\n        CATCH_INTERNAL_ERROR(\"Attempted to use exception translators under CATCH_CONFIG_DISABLE_EXCEPTIONS!\");\n    }\n#endif\n\n}\n// end catch_exception_translator_registry.cpp\n// start catch_fatal_condition.cpp\n\n#include <algorithm>\n\n#if !defined( CATCH_CONFIG_WINDOWS_SEH ) && !defined( CATCH_CONFIG_POSIX_SIGNALS )\n\nnamespace Catch {\n\n    // If neither SEH nor signal handling is required, the handler impls\n    // do not have to do anything, and can be empty.\n    void FatalConditionHandler::engage_platform() {}\n    void FatalConditionHandler::disengage_platform() {}\n    FatalConditionHandler::FatalConditionHandler() = default;\n    FatalConditionHandler::~FatalConditionHandler() = default;\n\n} // end namespace Catch\n\n#endif // !CATCH_CONFIG_WINDOWS_SEH && !CATCH_CONFIG_POSIX_SIGNALS\n\n#if defined( CATCH_CONFIG_WINDOWS_SEH ) && defined( CATCH_CONFIG_POSIX_SIGNALS )\n#error \"Inconsistent configuration: Windows' SEH handling and POSIX signals cannot be enabled at the same time\"\n#endif // CATCH_CONFIG_WINDOWS_SEH && CATCH_CONFIG_POSIX_SIGNALS\n\n#if defined( CATCH_CONFIG_WINDOWS_SEH ) || defined( CATCH_CONFIG_POSIX_SIGNALS )\n\nnamespace {\n    //! Signals fatal error message to the run context\n    void reportFatal( char const * const message ) {\n        Catch::getCurrentContext().getResultCapture()->handleFatalErrorCondition( message );\n    }\n\n    //! Minimal size Catch2 needs for its own fatal error handling.\n    //! Picked anecdotally, so it might not be sufficient on all\n    //! platforms, and for all configurations.\n    constexpr std::size_t minStackSizeForErrors = 32 * 1024;\n} // end unnamed namespace\n\n#endif // CATCH_CONFIG_WINDOWS_SEH || CATCH_CONFIG_POSIX_SIGNALS\n\n#if defined( CATCH_CONFIG_WINDOWS_SEH )\n\nnamespace Catch {\n\n    struct SignalDefs { DWORD id; const char* name; };\n\n    // There is no 1-1 mapping between signals and windows exceptions.\n    // Windows can easily distinguish between SO and SigSegV,\n    // but SigInt, SigTerm, etc are handled differently.\n    static SignalDefs signalDefs[] = {\n        { static_cast<DWORD>(EXCEPTION_ILLEGAL_INSTRUCTION),  \"SIGILL - Illegal instruction signal\" },\n        { static_cast<DWORD>(EXCEPTION_STACK_OVERFLOW), \"SIGSEGV - Stack overflow\" },\n        { static_cast<DWORD>(EXCEPTION_ACCESS_VIOLATION), \"SIGSEGV - Segmentation violation signal\" },\n        { static_cast<DWORD>(EXCEPTION_INT_DIVIDE_BY_ZERO), \"Divide by zero error\" },\n    };\n\n    static LONG CALLBACK handleVectoredException(PEXCEPTION_POINTERS ExceptionInfo) {\n        for (auto const& def : signalDefs) {\n            if (ExceptionInfo->ExceptionRecord->ExceptionCode == def.id) {\n                reportFatal(def.name);\n            }\n        }\n        // If its not an exception we care about, pass it along.\n        // This stops us from eating debugger breaks etc.\n        return EXCEPTION_CONTINUE_SEARCH;\n    }\n\n    // Since we do not support multiple instantiations, we put these\n    // into global variables and rely on cleaning them up in outlined\n    // constructors/destructors\n    static PVOID exceptionHandlerHandle = nullptr;\n\n    // For MSVC, we reserve part of the stack memory for handling\n    // memory overflow structured exception.\n    FatalConditionHandler::FatalConditionHandler() {\n        ULONG guaranteeSize = static_cast<ULONG>(minStackSizeForErrors);\n        if (!SetThreadStackGuarantee(&guaranteeSize)) {\n            // We do not want to fully error out, because needing\n            // the stack reserve should be rare enough anyway.\n            Catch::cerr()\n                << \"Failed to reserve piece of stack.\"\n                << \" Stack overflows will not be reported successfully.\";\n        }\n    }\n\n    // We do not attempt to unset the stack guarantee, because\n    // Windows does not support lowering the stack size guarantee.\n    FatalConditionHandler::~FatalConditionHandler() = default;\n\n    void FatalConditionHandler::engage_platform() {\n        // Register as first handler in current chain\n        exceptionHandlerHandle = AddVectoredExceptionHandler(1, handleVectoredException);\n        if (!exceptionHandlerHandle) {\n            CATCH_RUNTIME_ERROR(\"Could not register vectored exception handler\");\n        }\n    }\n\n    void FatalConditionHandler::disengage_platform() {\n        if (!RemoveVectoredExceptionHandler(exceptionHandlerHandle)) {\n            CATCH_RUNTIME_ERROR(\"Could not unregister vectored exception handler\");\n        }\n        exceptionHandlerHandle = nullptr;\n    }\n\n} // end namespace Catch\n\n#endif // CATCH_CONFIG_WINDOWS_SEH\n\n#if defined( CATCH_CONFIG_POSIX_SIGNALS )\n\n#include <signal.h>\n\nnamespace Catch {\n\n    struct SignalDefs {\n        int id;\n        const char* name;\n    };\n\n    static SignalDefs signalDefs[] = {\n        { SIGINT,  \"SIGINT - Terminal interrupt signal\" },\n        { SIGILL,  \"SIGILL - Illegal instruction signal\" },\n        { SIGFPE,  \"SIGFPE - Floating point error signal\" },\n        { SIGSEGV, \"SIGSEGV - Segmentation violation signal\" },\n        { SIGTERM, \"SIGTERM - Termination request signal\" },\n        { SIGABRT, \"SIGABRT - Abort (abnormal termination) signal\" }\n    };\n\n// Older GCCs trigger -Wmissing-field-initializers for T foo = {}\n// which is zero initialization, but not explicit. We want to avoid\n// that.\n#if defined(__GNUC__)\n#    pragma GCC diagnostic push\n#    pragma GCC diagnostic ignored \"-Wmissing-field-initializers\"\n#endif\n\n    static char* altStackMem = nullptr;\n    static std::size_t altStackSize = 0;\n    static stack_t oldSigStack{};\n    static struct sigaction oldSigActions[sizeof(signalDefs) / sizeof(SignalDefs)]{};\n\n    static void restorePreviousSignalHandlers() {\n        // We set signal handlers back to the previous ones. Hopefully\n        // nobody overwrote them in the meantime, and doesn't expect\n        // their signal handlers to live past ours given that they\n        // installed them after ours..\n        for (std::size_t i = 0; i < sizeof(signalDefs) / sizeof(SignalDefs); ++i) {\n            sigaction(signalDefs[i].id, &oldSigActions[i], nullptr);\n        }\n        // Return the old stack\n        sigaltstack(&oldSigStack, nullptr);\n    }\n\n    static void handleSignal( int sig ) {\n        char const * name = \"<unknown signal>\";\n        for (auto const& def : signalDefs) {\n            if (sig == def.id) {\n                name = def.name;\n                break;\n            }\n        }\n        // We need to restore previous signal handlers and let them do\n        // their thing, so that the users can have the debugger break\n        // when a signal is raised, and so on.\n        restorePreviousSignalHandlers();\n        reportFatal( name );\n        raise( sig );\n    }\n\n    FatalConditionHandler::FatalConditionHandler() {\n        assert(!altStackMem && \"Cannot initialize POSIX signal handler when one already exists\");\n        if (altStackSize == 0) {\n            altStackSize = std::max(static_cast<size_t>(SIGSTKSZ), minStackSizeForErrors);\n        }\n        altStackMem = new char[altStackSize]();\n    }\n\n    FatalConditionHandler::~FatalConditionHandler() {\n        delete[] altStackMem;\n        // We signal that another instance can be constructed by zeroing\n        // out the pointer.\n        altStackMem = nullptr;\n    }\n\n    void FatalConditionHandler::engage_platform() {\n        stack_t sigStack;\n        sigStack.ss_sp = altStackMem;\n        sigStack.ss_size = altStackSize;\n        sigStack.ss_flags = 0;\n        sigaltstack(&sigStack, &oldSigStack);\n        struct sigaction sa = { };\n\n        sa.sa_handler = handleSignal;\n        sa.sa_flags = SA_ONSTACK;\n        for (std::size_t i = 0; i < sizeof(signalDefs)/sizeof(SignalDefs); ++i) {\n            sigaction(signalDefs[i].id, &sa, &oldSigActions[i]);\n        }\n    }\n\n#if defined(__GNUC__)\n#    pragma GCC diagnostic pop\n#endif\n\n    void FatalConditionHandler::disengage_platform() {\n        restorePreviousSignalHandlers();\n    }\n\n} // end namespace Catch\n\n#endif // CATCH_CONFIG_POSIX_SIGNALS\n// end catch_fatal_condition.cpp\n// start catch_generators.cpp\n\n#include <limits>\n#include <set>\n\nnamespace Catch {\n\nIGeneratorTracker::~IGeneratorTracker() {}\n\nconst char* GeneratorException::what() const noexcept {\n    return m_msg;\n}\n\nnamespace Generators {\n\n    GeneratorUntypedBase::~GeneratorUntypedBase() {}\n\n    auto acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker& {\n        return getResultCapture().acquireGeneratorTracker( generatorName, lineInfo );\n    }\n\n} // namespace Generators\n} // namespace Catch\n// end catch_generators.cpp\n// start catch_interfaces_capture.cpp\n\nnamespace Catch {\n    IResultCapture::~IResultCapture() = default;\n}\n// end catch_interfaces_capture.cpp\n// start catch_interfaces_config.cpp\n\nnamespace Catch {\n    IConfig::~IConfig() = default;\n}\n// end catch_interfaces_config.cpp\n// start catch_interfaces_exception.cpp\n\nnamespace Catch {\n    IExceptionTranslator::~IExceptionTranslator() = default;\n    IExceptionTranslatorRegistry::~IExceptionTranslatorRegistry() = default;\n}\n// end catch_interfaces_exception.cpp\n// start catch_interfaces_registry_hub.cpp\n\nnamespace Catch {\n    IRegistryHub::~IRegistryHub() = default;\n    IMutableRegistryHub::~IMutableRegistryHub() = default;\n}\n// end catch_interfaces_registry_hub.cpp\n// start catch_interfaces_reporter.cpp\n\n// start catch_reporter_listening.h\n\nnamespace Catch {\n\n    class ListeningReporter : public IStreamingReporter {\n        using Reporters = std::vector<IStreamingReporterPtr>;\n        Reporters m_listeners;\n        IStreamingReporterPtr m_reporter = nullptr;\n        ReporterPreferences m_preferences;\n\n    public:\n        ListeningReporter();\n\n        void addListener( IStreamingReporterPtr&& listener );\n        void addReporter( IStreamingReporterPtr&& reporter );\n\n    public: // IStreamingReporter\n\n        ReporterPreferences getPreferences() const override;\n\n        void noMatchingTestCases( std::string const& spec ) override;\n\n        void reportInvalidArguments(std::string const&arg) override;\n\n        static std::set<Verbosity> getSupportedVerbosities();\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n        void benchmarkPreparing(std::string const& name) override;\n        void benchmarkStarting( BenchmarkInfo const& benchmarkInfo ) override;\n        void benchmarkEnded( BenchmarkStats<> const& benchmarkStats ) override;\n        void benchmarkFailed(std::string const&) override;\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n\n        void testRunStarting( TestRunInfo const& testRunInfo ) override;\n        void testGroupStarting( GroupInfo const& groupInfo ) override;\n        void testCaseStarting( TestCaseInfo const& testInfo ) override;\n        void sectionStarting( SectionInfo const& sectionInfo ) override;\n        void assertionStarting( AssertionInfo const& assertionInfo ) override;\n\n        // The return value indicates if the messages buffer should be cleared:\n        bool assertionEnded( AssertionStats const& assertionStats ) override;\n        void sectionEnded( SectionStats const& sectionStats ) override;\n        void testCaseEnded( TestCaseStats const& testCaseStats ) override;\n        void testGroupEnded( TestGroupStats const& testGroupStats ) override;\n        void testRunEnded( TestRunStats const& testRunStats ) override;\n\n        void skipTest( TestCaseInfo const& testInfo ) override;\n        bool isMulti() const override;\n\n    };\n\n} // end namespace Catch\n\n// end catch_reporter_listening.h\nnamespace Catch {\n\n    ReporterConfig::ReporterConfig( IConfigPtr const& _fullConfig )\n    :   m_stream( &_fullConfig->stream() ), m_fullConfig( _fullConfig ) {}\n\n    ReporterConfig::ReporterConfig( IConfigPtr const& _fullConfig, std::ostream& _stream )\n    :   m_stream( &_stream ), m_fullConfig( _fullConfig ) {}\n\n    std::ostream& ReporterConfig::stream() const { return *m_stream; }\n    IConfigPtr ReporterConfig::fullConfig() const { return m_fullConfig; }\n\n    TestRunInfo::TestRunInfo( std::string const& _name ) : name( _name ) {}\n\n    GroupInfo::GroupInfo(  std::string const& _name,\n                           std::size_t _groupIndex,\n                           std::size_t _groupsCount )\n    :   name( _name ),\n        groupIndex( _groupIndex ),\n        groupsCounts( _groupsCount )\n    {}\n\n     AssertionStats::AssertionStats( AssertionResult const& _assertionResult,\n                                     std::vector<MessageInfo> const& _infoMessages,\n                                     Totals const& _totals )\n    :   assertionResult( _assertionResult ),\n        infoMessages( _infoMessages ),\n        totals( _totals )\n    {\n        assertionResult.m_resultData.lazyExpression.m_transientExpression = _assertionResult.m_resultData.lazyExpression.m_transientExpression;\n\n        if( assertionResult.hasMessage() ) {\n            // Copy message into messages list.\n            // !TBD This should have been done earlier, somewhere\n            MessageBuilder builder( assertionResult.getTestMacroName(), assertionResult.getSourceInfo(), assertionResult.getResultType() );\n            builder << assertionResult.getMessage();\n            builder.m_info.message = builder.m_stream.str();\n\n            infoMessages.push_back( builder.m_info );\n        }\n    }\n\n     AssertionStats::~AssertionStats() = default;\n\n    SectionStats::SectionStats(  SectionInfo const& _sectionInfo,\n                                 Counts const& _assertions,\n                                 double _durationInSeconds,\n                                 bool _missingAssertions )\n    :   sectionInfo( _sectionInfo ),\n        assertions( _assertions ),\n        durationInSeconds( _durationInSeconds ),\n        missingAssertions( _missingAssertions )\n    {}\n\n    SectionStats::~SectionStats() = default;\n\n    TestCaseStats::TestCaseStats(  TestCaseInfo const& _testInfo,\n                                   Totals const& _totals,\n                                   std::string const& _stdOut,\n                                   std::string const& _stdErr,\n                                   bool _aborting )\n    : testInfo( _testInfo ),\n        totals( _totals ),\n        stdOut( _stdOut ),\n        stdErr( _stdErr ),\n        aborting( _aborting )\n    {}\n\n    TestCaseStats::~TestCaseStats() = default;\n\n    TestGroupStats::TestGroupStats( GroupInfo const& _groupInfo,\n                                    Totals const& _totals,\n                                    bool _aborting )\n    :   groupInfo( _groupInfo ),\n        totals( _totals ),\n        aborting( _aborting )\n    {}\n\n    TestGroupStats::TestGroupStats( GroupInfo const& _groupInfo )\n    :   groupInfo( _groupInfo ),\n        aborting( false )\n    {}\n\n    TestGroupStats::~TestGroupStats() = default;\n\n    TestRunStats::TestRunStats(   TestRunInfo const& _runInfo,\n                    Totals const& _totals,\n                    bool _aborting )\n    :   runInfo( _runInfo ),\n        totals( _totals ),\n        aborting( _aborting )\n    {}\n\n    TestRunStats::~TestRunStats() = default;\n\n    void IStreamingReporter::fatalErrorEncountered( StringRef ) {}\n    bool IStreamingReporter::isMulti() const { return false; }\n\n    IReporterFactory::~IReporterFactory() = default;\n    IReporterRegistry::~IReporterRegistry() = default;\n\n} // end namespace Catch\n// end catch_interfaces_reporter.cpp\n// start catch_interfaces_runner.cpp\n\nnamespace Catch {\n    IRunner::~IRunner() = default;\n}\n// end catch_interfaces_runner.cpp\n// start catch_interfaces_testcase.cpp\n\nnamespace Catch {\n    ITestInvoker::~ITestInvoker() = default;\n    ITestCaseRegistry::~ITestCaseRegistry() = default;\n}\n// end catch_interfaces_testcase.cpp\n// start catch_leak_detector.cpp\n\n#ifdef CATCH_CONFIG_WINDOWS_CRTDBG\n#include <crtdbg.h>\n\nnamespace Catch {\n\n    LeakDetector::LeakDetector() {\n        int flag = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);\n        flag |= _CRTDBG_LEAK_CHECK_DF;\n        flag |= _CRTDBG_ALLOC_MEM_DF;\n        _CrtSetDbgFlag(flag);\n        _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);\n        _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR);\n        // Change this to leaking allocation's number to break there\n        _CrtSetBreakAlloc(-1);\n    }\n}\n\n#else\n\n    Catch::LeakDetector::LeakDetector() {}\n\n#endif\n\nCatch::LeakDetector::~LeakDetector() {\n    Catch::cleanUp();\n}\n// end catch_leak_detector.cpp\n// start catch_list.cpp\n\n// start catch_list.h\n\n#include <set>\n\nnamespace Catch {\n\n    std::size_t listTests( Config const& config );\n\n    std::size_t listTestsNamesOnly( Config const& config );\n\n    struct TagInfo {\n        void add( std::string const& spelling );\n        std::string all() const;\n\n        std::set<std::string> spellings;\n        std::size_t count = 0;\n    };\n\n    std::size_t listTags( Config const& config );\n\n    std::size_t listReporters();\n\n    Option<std::size_t> list( std::shared_ptr<Config> const& config );\n\n} // end namespace Catch\n\n// end catch_list.h\n// start catch_text.h\n\nnamespace Catch {\n    using namespace clara::TextFlow;\n}\n\n// end catch_text.h\n#include <limits>\n#include <algorithm>\n#include <iomanip>\n\nnamespace Catch {\n\n    std::size_t listTests( Config const& config ) {\n        TestSpec const& testSpec = config.testSpec();\n        if( config.hasTestFilters() )\n            Catch::cout() << \"Matching test cases:\\n\";\n        else {\n            Catch::cout() << \"All available test cases:\\n\";\n        }\n\n        auto matchedTestCases = filterTests( getAllTestCasesSorted( config ), testSpec, config );\n        for( auto const& testCaseInfo : matchedTestCases ) {\n            Colour::Code colour = testCaseInfo.isHidden()\n                ? Colour::SecondaryText\n                : Colour::None;\n            Colour colourGuard( colour );\n\n            Catch::cout() << Column( testCaseInfo.name ).initialIndent( 2 ).indent( 4 ) << \"\\n\";\n            if( config.verbosity() >= Verbosity::High ) {\n                Catch::cout() << Column( Catch::Detail::stringify( testCaseInfo.lineInfo ) ).indent(4) << std::endl;\n                std::string description = testCaseInfo.description;\n                if( description.empty() )\n                    description = \"(NO DESCRIPTION)\";\n                Catch::cout() << Column( description ).indent(4) << std::endl;\n            }\n            if( !testCaseInfo.tags.empty() )\n                Catch::cout() << Column( testCaseInfo.tagsAsString() ).indent( 6 ) << \"\\n\";\n        }\n\n        if( !config.hasTestFilters() )\n            Catch::cout() << pluralise( matchedTestCases.size(), \"test case\" ) << '\\n' << std::endl;\n        else\n            Catch::cout() << pluralise( matchedTestCases.size(), \"matching test case\" ) << '\\n' << std::endl;\n        return matchedTestCases.size();\n    }\n\n    std::size_t listTestsNamesOnly( Config const& config ) {\n        TestSpec const& testSpec = config.testSpec();\n        std::size_t matchedTests = 0;\n        std::vector<TestCase> matchedTestCases = filterTests( getAllTestCasesSorted( config ), testSpec, config );\n        for( auto const& testCaseInfo : matchedTestCases ) {\n            matchedTests++;\n            if( startsWith( testCaseInfo.name, '#' ) )\n               Catch::cout() << '\"' << testCaseInfo.name << '\"';\n            else\n               Catch::cout() << testCaseInfo.name;\n            if ( config.verbosity() >= Verbosity::High )\n                Catch::cout() << \"\\t@\" << testCaseInfo.lineInfo;\n            Catch::cout() << std::endl;\n        }\n        return matchedTests;\n    }\n\n    void TagInfo::add( std::string const& spelling ) {\n        ++count;\n        spellings.insert( spelling );\n    }\n\n    std::string TagInfo::all() const {\n        size_t size = 0;\n        for (auto const& spelling : spellings) {\n            // Add 2 for the brackes\n            size += spelling.size() + 2;\n        }\n\n        std::string out; out.reserve(size);\n        for (auto const& spelling : spellings) {\n            out += '[';\n            out += spelling;\n            out += ']';\n        }\n        return out;\n    }\n\n    std::size_t listTags( Config const& config ) {\n        TestSpec const& testSpec = config.testSpec();\n        if( config.hasTestFilters() )\n            Catch::cout() << \"Tags for matching test cases:\\n\";\n        else {\n            Catch::cout() << \"All available tags:\\n\";\n        }\n\n        std::map<std::string, TagInfo> tagCounts;\n\n        std::vector<TestCase> matchedTestCases = filterTests( getAllTestCasesSorted( config ), testSpec, config );\n        for( auto const& testCase : matchedTestCases ) {\n            for( auto const& tagName : testCase.getTestCaseInfo().tags ) {\n                std::string lcaseTagName = toLower( tagName );\n                auto countIt = tagCounts.find( lcaseTagName );\n                if( countIt == tagCounts.end() )\n                    countIt = tagCounts.insert( std::make_pair( lcaseTagName, TagInfo() ) ).first;\n                countIt->second.add( tagName );\n            }\n        }\n\n        for( auto const& tagCount : tagCounts ) {\n            ReusableStringStream rss;\n            rss << \"  \" << std::setw(2) << tagCount.second.count << \"  \";\n            auto str = rss.str();\n            auto wrapper = Column( tagCount.second.all() )\n                                                    .initialIndent( 0 )\n                                                    .indent( str.size() )\n                                                    .width( CATCH_CONFIG_CONSOLE_WIDTH-10 );\n            Catch::cout() << str << wrapper << '\\n';\n        }\n        Catch::cout() << pluralise( tagCounts.size(), \"tag\" ) << '\\n' << std::endl;\n        return tagCounts.size();\n    }\n\n    std::size_t listReporters() {\n        Catch::cout() << \"Available reporters:\\n\";\n        IReporterRegistry::FactoryMap const& factories = getRegistryHub().getReporterRegistry().getFactories();\n        std::size_t maxNameLen = 0;\n        for( auto const& factoryKvp : factories )\n            maxNameLen = (std::max)( maxNameLen, factoryKvp.first.size() );\n\n        for( auto const& factoryKvp : factories ) {\n            Catch::cout()\n                    << Column( factoryKvp.first + \":\" )\n                            .indent(2)\n                            .width( 5+maxNameLen )\n                    +  Column( factoryKvp.second->getDescription() )\n                            .initialIndent(0)\n                            .indent(2)\n                            .width( CATCH_CONFIG_CONSOLE_WIDTH - maxNameLen-8 )\n                    << \"\\n\";\n        }\n        Catch::cout() << std::endl;\n        return factories.size();\n    }\n\n    Option<std::size_t> list( std::shared_ptr<Config> const& config ) {\n        Option<std::size_t> listedCount;\n        getCurrentMutableContext().setConfig( config );\n        if( config->listTests() )\n            listedCount = listedCount.valueOr(0) + listTests( *config );\n        if( config->listTestNamesOnly() )\n            listedCount = listedCount.valueOr(0) + listTestsNamesOnly( *config );\n        if( config->listTags() )\n            listedCount = listedCount.valueOr(0) + listTags( *config );\n        if( config->listReporters() )\n            listedCount = listedCount.valueOr(0) + listReporters();\n        return listedCount;\n    }\n\n} // end namespace Catch\n// end catch_list.cpp\n// start catch_matchers.cpp\n\nnamespace Catch {\nnamespace Matchers {\n    namespace Impl {\n\n        std::string MatcherUntypedBase::toString() const {\n            if( m_cachedToString.empty() )\n                m_cachedToString = describe();\n            return m_cachedToString;\n        }\n\n        MatcherUntypedBase::~MatcherUntypedBase() = default;\n\n    } // namespace Impl\n} // namespace Matchers\n\nusing namespace Matchers;\nusing Matchers::Impl::MatcherBase;\n\n} // namespace Catch\n// end catch_matchers.cpp\n// start catch_matchers_exception.cpp\n\nnamespace Catch {\nnamespace Matchers {\nnamespace Exception {\n\nbool ExceptionMessageMatcher::match(std::exception const& ex) const {\n    return ex.what() == m_message;\n}\n\nstd::string ExceptionMessageMatcher::describe() const {\n    return \"exception message matches \\\"\" + m_message + \"\\\"\";\n}\n\n}\nException::ExceptionMessageMatcher Message(std::string const& message) {\n    return Exception::ExceptionMessageMatcher(message);\n}\n\n// namespace Exception\n} // namespace Matchers\n} // namespace Catch\n// end catch_matchers_exception.cpp\n// start catch_matchers_floating.cpp\n\n// start catch_polyfills.hpp\n\nnamespace Catch {\n    bool isnan(float f);\n    bool isnan(double d);\n}\n\n// end catch_polyfills.hpp\n// start catch_to_string.hpp\n\n#include <string>\n\nnamespace Catch {\n    template <typename T>\n    std::string to_string(T const& t) {\n#if defined(CATCH_CONFIG_CPP11_TO_STRING)\n        return std::to_string(t);\n#else\n        ReusableStringStream rss;\n        rss << t;\n        return rss.str();\n#endif\n    }\n} // end namespace Catch\n\n// end catch_to_string.hpp\n#include <algorithm>\n#include <cmath>\n#include <cstdlib>\n#include <cstdint>\n#include <cstring>\n#include <sstream>\n#include <type_traits>\n#include <iomanip>\n#include <limits>\n\nnamespace Catch {\nnamespace {\n\n    int32_t convert(float f) {\n        static_assert(sizeof(float) == sizeof(int32_t), \"Important ULP matcher assumption violated\");\n        int32_t i;\n        std::memcpy(&i, &f, sizeof(f));\n        return i;\n    }\n\n    int64_t convert(double d) {\n        static_assert(sizeof(double) == sizeof(int64_t), \"Important ULP matcher assumption violated\");\n        int64_t i;\n        std::memcpy(&i, &d, sizeof(d));\n        return i;\n    }\n\n    template <typename FP>\n    bool almostEqualUlps(FP lhs, FP rhs, uint64_t maxUlpDiff) {\n        // Comparison with NaN should always be false.\n        // This way we can rule it out before getting into the ugly details\n        if (Catch::isnan(lhs) || Catch::isnan(rhs)) {\n            return false;\n        }\n\n        auto lc = convert(lhs);\n        auto rc = convert(rhs);\n\n        if ((lc < 0) != (rc < 0)) {\n            // Potentially we can have +0 and -0\n            return lhs == rhs;\n        }\n\n        // static cast as a workaround for IBM XLC\n        auto ulpDiff = std::abs(static_cast<FP>(lc - rc));\n        return static_cast<uint64_t>(ulpDiff) <= maxUlpDiff;\n    }\n\n#if defined(CATCH_CONFIG_GLOBAL_NEXTAFTER)\n\n    float nextafter(float x, float y) {\n        return ::nextafterf(x, y);\n    }\n\n    double nextafter(double x, double y) {\n        return ::nextafter(x, y);\n    }\n\n#endif // ^^^ CATCH_CONFIG_GLOBAL_NEXTAFTER ^^^\n\ntemplate <typename FP>\nFP step(FP start, FP direction, uint64_t steps) {\n    for (uint64_t i = 0; i < steps; ++i) {\n#if defined(CATCH_CONFIG_GLOBAL_NEXTAFTER)\n        start = Catch::nextafter(start, direction);\n#else\n        start = std::nextafter(start, direction);\n#endif\n    }\n    return start;\n}\n\n// Performs equivalent check of std::fabs(lhs - rhs) <= margin\n// But without the subtraction to allow for INFINITY in comparison\nbool marginComparison(double lhs, double rhs, double margin) {\n    return (lhs + margin >= rhs) && (rhs + margin >= lhs);\n}\n\ntemplate <typename FloatingPoint>\nvoid write(std::ostream& out, FloatingPoint num) {\n    out << std::scientific\n        << std::setprecision(std::numeric_limits<FloatingPoint>::max_digits10 - 1)\n        << num;\n}\n\n} // end anonymous namespace\n\nnamespace Matchers {\nnamespace Floating {\n\n    enum class FloatingPointKind : uint8_t {\n        Float,\n        Double\n    };\n\n    WithinAbsMatcher::WithinAbsMatcher(double target, double margin)\n        :m_target{ target }, m_margin{ margin } {\n        CATCH_ENFORCE(margin >= 0, \"Invalid margin: \" << margin << '.'\n            << \" Margin has to be non-negative.\");\n    }\n\n    // Performs equivalent check of std::fabs(lhs - rhs) <= margin\n    // But without the subtraction to allow for INFINITY in comparison\n    bool WithinAbsMatcher::match(double const& matchee) const {\n        return (matchee + m_margin >= m_target) && (m_target + m_margin >= matchee);\n    }\n\n    std::string WithinAbsMatcher::describe() const {\n        return \"is within \" + ::Catch::Detail::stringify(m_margin) + \" of \" + ::Catch::Detail::stringify(m_target);\n    }\n\n    WithinUlpsMatcher::WithinUlpsMatcher(double target, uint64_t ulps, FloatingPointKind baseType)\n        :m_target{ target }, m_ulps{ ulps }, m_type{ baseType } {\n        CATCH_ENFORCE(m_type == FloatingPointKind::Double\n                   || m_ulps < (std::numeric_limits<uint32_t>::max)(),\n            \"Provided ULP is impossibly large for a float comparison.\");\n    }\n\n#if defined(__clang__)\n#pragma clang diagnostic push\n// Clang <3.5 reports on the default branch in the switch below\n#pragma clang diagnostic ignored \"-Wunreachable-code\"\n#endif\n\n    bool WithinUlpsMatcher::match(double const& matchee) const {\n        switch (m_type) {\n        case FloatingPointKind::Float:\n            return almostEqualUlps<float>(static_cast<float>(matchee), static_cast<float>(m_target), m_ulps);\n        case FloatingPointKind::Double:\n            return almostEqualUlps<double>(matchee, m_target, m_ulps);\n        default:\n            CATCH_INTERNAL_ERROR( \"Unknown FloatingPointKind value\" );\n        }\n    }\n\n#if defined(__clang__)\n#pragma clang diagnostic pop\n#endif\n\n    std::string WithinUlpsMatcher::describe() const {\n        std::stringstream ret;\n\n        ret << \"is within \" << m_ulps << \" ULPs of \";\n\n        if (m_type == FloatingPointKind::Float) {\n            write(ret, static_cast<float>(m_target));\n            ret << 'f';\n        } else {\n            write(ret, m_target);\n        }\n\n        ret << \" ([\";\n        if (m_type == FloatingPointKind::Double) {\n            write(ret, step(m_target, static_cast<double>(-INFINITY), m_ulps));\n            ret << \", \";\n            write(ret, step(m_target, static_cast<double>( INFINITY), m_ulps));\n        } else {\n            // We have to cast INFINITY to float because of MinGW, see #1782\n            write(ret, step(static_cast<float>(m_target), static_cast<float>(-INFINITY), m_ulps));\n            ret << \", \";\n            write(ret, step(static_cast<float>(m_target), static_cast<float>( INFINITY), m_ulps));\n        }\n        ret << \"])\";\n\n        return ret.str();\n    }\n\n    WithinRelMatcher::WithinRelMatcher(double target, double epsilon):\n        m_target(target),\n        m_epsilon(epsilon){\n        CATCH_ENFORCE(m_epsilon >= 0., \"Relative comparison with epsilon <  0 does not make sense.\");\n        CATCH_ENFORCE(m_epsilon  < 1., \"Relative comparison with epsilon >= 1 does not make sense.\");\n    }\n\n    bool WithinRelMatcher::match(double const& matchee) const {\n        const auto relMargin = m_epsilon * (std::max)(std::fabs(matchee), std::fabs(m_target));\n        return marginComparison(matchee, m_target,\n                                std::isinf(relMargin)? 0 : relMargin);\n    }\n\n    std::string WithinRelMatcher::describe() const {\n        Catch::ReusableStringStream sstr;\n        sstr << \"and \" << m_target << \" are within \" << m_epsilon * 100. << \"% of each other\";\n        return sstr.str();\n    }\n\n}// namespace Floating\n\nFloating::WithinUlpsMatcher WithinULP(double target, uint64_t maxUlpDiff) {\n    return Floating::WithinUlpsMatcher(target, maxUlpDiff, Floating::FloatingPointKind::Double);\n}\n\nFloating::WithinUlpsMatcher WithinULP(float target, uint64_t maxUlpDiff) {\n    return Floating::WithinUlpsMatcher(target, maxUlpDiff, Floating::FloatingPointKind::Float);\n}\n\nFloating::WithinAbsMatcher WithinAbs(double target, double margin) {\n    return Floating::WithinAbsMatcher(target, margin);\n}\n\nFloating::WithinRelMatcher WithinRel(double target, double eps) {\n    return Floating::WithinRelMatcher(target, eps);\n}\n\nFloating::WithinRelMatcher WithinRel(double target) {\n    return Floating::WithinRelMatcher(target, std::numeric_limits<double>::epsilon() * 100);\n}\n\nFloating::WithinRelMatcher WithinRel(float target, float eps) {\n    return Floating::WithinRelMatcher(target, eps);\n}\n\nFloating::WithinRelMatcher WithinRel(float target) {\n    return Floating::WithinRelMatcher(target, std::numeric_limits<float>::epsilon() * 100);\n}\n\n} // namespace Matchers\n} // namespace Catch\n// end catch_matchers_floating.cpp\n// start catch_matchers_generic.cpp\n\nstd::string Catch::Matchers::Generic::Detail::finalizeDescription(const std::string& desc) {\n    if (desc.empty()) {\n        return \"matches undescribed predicate\";\n    } else {\n        return \"matches predicate: \\\"\" + desc + '\"';\n    }\n}\n// end catch_matchers_generic.cpp\n// start catch_matchers_string.cpp\n\n#include <regex>\n\nnamespace Catch {\nnamespace Matchers {\n\n    namespace StdString {\n\n        CasedString::CasedString( std::string const& str, CaseSensitive::Choice caseSensitivity )\n        :   m_caseSensitivity( caseSensitivity ),\n            m_str( adjustString( str ) )\n        {}\n        std::string CasedString::adjustString( std::string const& str ) const {\n            return m_caseSensitivity == CaseSensitive::No\n                   ? toLower( str )\n                   : str;\n        }\n        std::string CasedString::caseSensitivitySuffix() const {\n            return m_caseSensitivity == CaseSensitive::No\n                   ? \" (case insensitive)\"\n                   : std::string();\n        }\n\n        StringMatcherBase::StringMatcherBase( std::string const& operation, CasedString const& comparator )\n        : m_comparator( comparator ),\n          m_operation( operation ) {\n        }\n\n        std::string StringMatcherBase::describe() const {\n            std::string description;\n            description.reserve(5 + m_operation.size() + m_comparator.m_str.size() +\n                                        m_comparator.caseSensitivitySuffix().size());\n            description += m_operation;\n            description += \": \\\"\";\n            description += m_comparator.m_str;\n            description += \"\\\"\";\n            description += m_comparator.caseSensitivitySuffix();\n            return description;\n        }\n\n        EqualsMatcher::EqualsMatcher( CasedString const& comparator ) : StringMatcherBase( \"equals\", comparator ) {}\n\n        bool EqualsMatcher::match( std::string const& source ) const {\n            return m_comparator.adjustString( source ) == m_comparator.m_str;\n        }\n\n        ContainsMatcher::ContainsMatcher( CasedString const& comparator ) : StringMatcherBase( \"contains\", comparator ) {}\n\n        bool ContainsMatcher::match( std::string const& source ) const {\n            return contains( m_comparator.adjustString( source ), m_comparator.m_str );\n        }\n\n        StartsWithMatcher::StartsWithMatcher( CasedString const& comparator ) : StringMatcherBase( \"starts with\", comparator ) {}\n\n        bool StartsWithMatcher::match( std::string const& source ) const {\n            return startsWith( m_comparator.adjustString( source ), m_comparator.m_str );\n        }\n\n        EndsWithMatcher::EndsWithMatcher( CasedString const& comparator ) : StringMatcherBase( \"ends with\", comparator ) {}\n\n        bool EndsWithMatcher::match( std::string const& source ) const {\n            return endsWith( m_comparator.adjustString( source ), m_comparator.m_str );\n        }\n\n        RegexMatcher::RegexMatcher(std::string regex, CaseSensitive::Choice caseSensitivity): m_regex(std::move(regex)), m_caseSensitivity(caseSensitivity) {}\n\n        bool RegexMatcher::match(std::string const& matchee) const {\n            auto flags = std::regex::ECMAScript; // ECMAScript is the default syntax option anyway\n            if (m_caseSensitivity == CaseSensitive::Choice::No) {\n                flags |= std::regex::icase;\n            }\n            auto reg = std::regex(m_regex, flags);\n            return std::regex_match(matchee, reg);\n        }\n\n        std::string RegexMatcher::describe() const {\n            return \"matches \" + ::Catch::Detail::stringify(m_regex) + ((m_caseSensitivity == CaseSensitive::Choice::Yes)? \" case sensitively\" : \" case insensitively\");\n        }\n\n    } // namespace StdString\n\n    StdString::EqualsMatcher Equals( std::string const& str, CaseSensitive::Choice caseSensitivity ) {\n        return StdString::EqualsMatcher( StdString::CasedString( str, caseSensitivity) );\n    }\n    StdString::ContainsMatcher Contains( std::string const& str, CaseSensitive::Choice caseSensitivity ) {\n        return StdString::ContainsMatcher( StdString::CasedString( str, caseSensitivity) );\n    }\n    StdString::EndsWithMatcher EndsWith( std::string const& str, CaseSensitive::Choice caseSensitivity ) {\n        return StdString::EndsWithMatcher( StdString::CasedString( str, caseSensitivity) );\n    }\n    StdString::StartsWithMatcher StartsWith( std::string const& str, CaseSensitive::Choice caseSensitivity ) {\n        return StdString::StartsWithMatcher( StdString::CasedString( str, caseSensitivity) );\n    }\n\n    StdString::RegexMatcher Matches(std::string const& regex, CaseSensitive::Choice caseSensitivity) {\n        return StdString::RegexMatcher(regex, caseSensitivity);\n    }\n\n} // namespace Matchers\n} // namespace Catch\n// end catch_matchers_string.cpp\n// start catch_message.cpp\n\n// start catch_uncaught_exceptions.h\n\nnamespace Catch {\n    bool uncaught_exceptions();\n} // end namespace Catch\n\n// end catch_uncaught_exceptions.h\n#include <cassert>\n#include <stack>\n\nnamespace Catch {\n\n    MessageInfo::MessageInfo(   StringRef const& _macroName,\n                                SourceLineInfo const& _lineInfo,\n                                ResultWas::OfType _type )\n    :   macroName( _macroName ),\n        lineInfo( _lineInfo ),\n        type( _type ),\n        sequence( ++globalCount )\n    {}\n\n    bool MessageInfo::operator==( MessageInfo const& other ) const {\n        return sequence == other.sequence;\n    }\n\n    bool MessageInfo::operator<( MessageInfo const& other ) const {\n        return sequence < other.sequence;\n    }\n\n    // This may need protecting if threading support is added\n    unsigned int MessageInfo::globalCount = 0;\n\n    ////////////////////////////////////////////////////////////////////////////\n\n    Catch::MessageBuilder::MessageBuilder( StringRef const& macroName,\n                                           SourceLineInfo const& lineInfo,\n                                           ResultWas::OfType type )\n        :m_info(macroName, lineInfo, type) {}\n\n    ////////////////////////////////////////////////////////////////////////////\n\n    ScopedMessage::ScopedMessage( MessageBuilder const& builder )\n    : m_info( builder.m_info ), m_moved()\n    {\n        m_info.message = builder.m_stream.str();\n        getResultCapture().pushScopedMessage( m_info );\n    }\n\n    ScopedMessage::ScopedMessage( ScopedMessage&& old )\n    : m_info( old.m_info ), m_moved()\n    {\n        old.m_moved = true;\n    }\n\n    ScopedMessage::~ScopedMessage() {\n        if ( !uncaught_exceptions() && !m_moved ){\n            getResultCapture().popScopedMessage(m_info);\n        }\n    }\n\n    Capturer::Capturer( StringRef macroName, SourceLineInfo const& lineInfo, ResultWas::OfType resultType, StringRef names ) {\n        auto trimmed = [&] (size_t start, size_t end) {\n            while (names[start] == ',' || isspace(static_cast<unsigned char>(names[start]))) {\n                ++start;\n            }\n            while (names[end] == ',' || isspace(static_cast<unsigned char>(names[end]))) {\n                --end;\n            }\n            return names.substr(start, end - start + 1);\n        };\n        auto skipq = [&] (size_t start, char quote) {\n            for (auto i = start + 1; i < names.size() ; ++i) {\n                if (names[i] == quote)\n                    return i;\n                if (names[i] == '\\\\')\n                    ++i;\n            }\n            CATCH_INTERNAL_ERROR(\"CAPTURE parsing encountered unmatched quote\");\n        };\n\n        size_t start = 0;\n        std::stack<char> openings;\n        for (size_t pos = 0; pos < names.size(); ++pos) {\n            char c = names[pos];\n            switch (c) {\n            case '[':\n            case '{':\n            case '(':\n            // It is basically impossible to disambiguate between\n            // comparison and start of template args in this context\n//            case '<':\n                openings.push(c);\n                break;\n            case ']':\n            case '}':\n            case ')':\n//           case '>':\n                openings.pop();\n                break;\n            case '\"':\n            case '\\'':\n                pos = skipq(pos, c);\n                break;\n            case ',':\n                if (start != pos && openings.empty()) {\n                    m_messages.emplace_back(macroName, lineInfo, resultType);\n                    m_messages.back().message = static_cast<std::string>(trimmed(start, pos));\n                    m_messages.back().message += \" := \";\n                    start = pos;\n                }\n            }\n        }\n        assert(openings.empty() && \"Mismatched openings\");\n        m_messages.emplace_back(macroName, lineInfo, resultType);\n        m_messages.back().message = static_cast<std::string>(trimmed(start, names.size() - 1));\n        m_messages.back().message += \" := \";\n    }\n    Capturer::~Capturer() {\n        if ( !uncaught_exceptions() ){\n            assert( m_captured == m_messages.size() );\n            for( size_t i = 0; i < m_captured; ++i  )\n                m_resultCapture.popScopedMessage( m_messages[i] );\n        }\n    }\n\n    void Capturer::captureValue( size_t index, std::string const& value ) {\n        assert( index < m_messages.size() );\n        m_messages[index].message += value;\n        m_resultCapture.pushScopedMessage( m_messages[index] );\n        m_captured++;\n    }\n\n} // end namespace Catch\n// end catch_message.cpp\n// start catch_output_redirect.cpp\n\n// start catch_output_redirect.h\n#ifndef TWOBLUECUBES_CATCH_OUTPUT_REDIRECT_H\n#define TWOBLUECUBES_CATCH_OUTPUT_REDIRECT_H\n\n#include <cstdio>\n#include <iosfwd>\n#include <string>\n\nnamespace Catch {\n\n    class RedirectedStream {\n        std::ostream& m_originalStream;\n        std::ostream& m_redirectionStream;\n        std::streambuf* m_prevBuf;\n\n    public:\n        RedirectedStream( std::ostream& originalStream, std::ostream& redirectionStream );\n        ~RedirectedStream();\n    };\n\n    class RedirectedStdOut {\n        ReusableStringStream m_rss;\n        RedirectedStream m_cout;\n    public:\n        RedirectedStdOut();\n        auto str() const -> std::string;\n    };\n\n    // StdErr has two constituent streams in C++, std::cerr and std::clog\n    // This means that we need to redirect 2 streams into 1 to keep proper\n    // order of writes\n    class RedirectedStdErr {\n        ReusableStringStream m_rss;\n        RedirectedStream m_cerr;\n        RedirectedStream m_clog;\n    public:\n        RedirectedStdErr();\n        auto str() const -> std::string;\n    };\n\n    class RedirectedStreams {\n    public:\n        RedirectedStreams(RedirectedStreams const&) = delete;\n        RedirectedStreams& operator=(RedirectedStreams const&) = delete;\n        RedirectedStreams(RedirectedStreams&&) = delete;\n        RedirectedStreams& operator=(RedirectedStreams&&) = delete;\n\n        RedirectedStreams(std::string& redirectedCout, std::string& redirectedCerr);\n        ~RedirectedStreams();\n    private:\n        std::string& m_redirectedCout;\n        std::string& m_redirectedCerr;\n        RedirectedStdOut m_redirectedStdOut;\n        RedirectedStdErr m_redirectedStdErr;\n    };\n\n#if defined(CATCH_CONFIG_NEW_CAPTURE)\n\n    // Windows's implementation of std::tmpfile is terrible (it tries\n    // to create a file inside system folder, thus requiring elevated\n    // privileges for the binary), so we have to use tmpnam(_s) and\n    // create the file ourselves there.\n    class TempFile {\n    public:\n        TempFile(TempFile const&) = delete;\n        TempFile& operator=(TempFile const&) = delete;\n        TempFile(TempFile&&) = delete;\n        TempFile& operator=(TempFile&&) = delete;\n\n        TempFile();\n        ~TempFile();\n\n        std::FILE* getFile();\n        std::string getContents();\n\n    private:\n        std::FILE* m_file = nullptr;\n    #if defined(_MSC_VER)\n        char m_buffer[L_tmpnam] = { 0 };\n    #endif\n    };\n\n    class OutputRedirect {\n    public:\n        OutputRedirect(OutputRedirect const&) = delete;\n        OutputRedirect& operator=(OutputRedirect const&) = delete;\n        OutputRedirect(OutputRedirect&&) = delete;\n        OutputRedirect& operator=(OutputRedirect&&) = delete;\n\n        OutputRedirect(std::string& stdout_dest, std::string& stderr_dest);\n        ~OutputRedirect();\n\n    private:\n        int m_originalStdout = -1;\n        int m_originalStderr = -1;\n        TempFile m_stdoutFile;\n        TempFile m_stderrFile;\n        std::string& m_stdoutDest;\n        std::string& m_stderrDest;\n    };\n\n#endif\n\n} // end namespace Catch\n\n#endif // TWOBLUECUBES_CATCH_OUTPUT_REDIRECT_H\n// end catch_output_redirect.h\n#include <cstdio>\n#include <cstring>\n#include <fstream>\n#include <sstream>\n#include <stdexcept>\n\n#if defined(CATCH_CONFIG_NEW_CAPTURE)\n    #if defined(_MSC_VER)\n    #include <io.h>      //_dup and _dup2\n    #define dup _dup\n    #define dup2 _dup2\n    #define fileno _fileno\n    #else\n    #include <unistd.h>  // dup and dup2\n    #endif\n#endif\n\nnamespace Catch {\n\n    RedirectedStream::RedirectedStream( std::ostream& originalStream, std::ostream& redirectionStream )\n    :   m_originalStream( originalStream ),\n        m_redirectionStream( redirectionStream ),\n        m_prevBuf( m_originalStream.rdbuf() )\n    {\n        m_originalStream.rdbuf( m_redirectionStream.rdbuf() );\n    }\n\n    RedirectedStream::~RedirectedStream() {\n        m_originalStream.rdbuf( m_prevBuf );\n    }\n\n    RedirectedStdOut::RedirectedStdOut() : m_cout( Catch::cout(), m_rss.get() ) {}\n    auto RedirectedStdOut::str() const -> std::string { return m_rss.str(); }\n\n    RedirectedStdErr::RedirectedStdErr()\n    :   m_cerr( Catch::cerr(), m_rss.get() ),\n        m_clog( Catch::clog(), m_rss.get() )\n    {}\n    auto RedirectedStdErr::str() const -> std::string { return m_rss.str(); }\n\n    RedirectedStreams::RedirectedStreams(std::string& redirectedCout, std::string& redirectedCerr)\n    :   m_redirectedCout(redirectedCout),\n        m_redirectedCerr(redirectedCerr)\n    {}\n\n    RedirectedStreams::~RedirectedStreams() {\n        m_redirectedCout += m_redirectedStdOut.str();\n        m_redirectedCerr += m_redirectedStdErr.str();\n    }\n\n#if defined(CATCH_CONFIG_NEW_CAPTURE)\n\n#if defined(_MSC_VER)\n    TempFile::TempFile() {\n        if (tmpnam_s(m_buffer)) {\n            CATCH_RUNTIME_ERROR(\"Could not get a temp filename\");\n        }\n        if (fopen_s(&m_file, m_buffer, \"w+\")) {\n            char buffer[100];\n            if (strerror_s(buffer, errno)) {\n                CATCH_RUNTIME_ERROR(\"Could not translate errno to a string\");\n            }\n            CATCH_RUNTIME_ERROR(\"Could not open the temp file: '\" << m_buffer << \"' because: \" << buffer);\n        }\n    }\n#else\n    TempFile::TempFile() {\n        m_file = std::tmpfile();\n        if (!m_file) {\n            CATCH_RUNTIME_ERROR(\"Could not create a temp file.\");\n        }\n    }\n\n#endif\n\n    TempFile::~TempFile() {\n         // TBD: What to do about errors here?\n         std::fclose(m_file);\n         // We manually create the file on Windows only, on Linux\n         // it will be autodeleted\n#if defined(_MSC_VER)\n         std::remove(m_buffer);\n#endif\n    }\n\n    FILE* TempFile::getFile() {\n        return m_file;\n    }\n\n    std::string TempFile::getContents() {\n        std::stringstream sstr;\n        char buffer[100] = {};\n        std::rewind(m_file);\n        while (std::fgets(buffer, sizeof(buffer), m_file)) {\n            sstr << buffer;\n        }\n        return sstr.str();\n    }\n\n    OutputRedirect::OutputRedirect(std::string& stdout_dest, std::string& stderr_dest) :\n        m_originalStdout(dup(1)),\n        m_originalStderr(dup(2)),\n        m_stdoutDest(stdout_dest),\n        m_stderrDest(stderr_dest) {\n        dup2(fileno(m_stdoutFile.getFile()), 1);\n        dup2(fileno(m_stderrFile.getFile()), 2);\n    }\n\n    OutputRedirect::~OutputRedirect() {\n        Catch::cout() << std::flush;\n        fflush(stdout);\n        // Since we support overriding these streams, we flush cerr\n        // even though std::cerr is unbuffered\n        Catch::cerr() << std::flush;\n        Catch::clog() << std::flush;\n        fflush(stderr);\n\n        dup2(m_originalStdout, 1);\n        dup2(m_originalStderr, 2);\n\n        m_stdoutDest += m_stdoutFile.getContents();\n        m_stderrDest += m_stderrFile.getContents();\n    }\n\n#endif // CATCH_CONFIG_NEW_CAPTURE\n\n} // namespace Catch\n\n#if defined(CATCH_CONFIG_NEW_CAPTURE)\n    #if defined(_MSC_VER)\n    #undef dup\n    #undef dup2\n    #undef fileno\n    #endif\n#endif\n// end catch_output_redirect.cpp\n// start catch_polyfills.cpp\n\n#include <cmath>\n\nnamespace Catch {\n\n#if !defined(CATCH_CONFIG_POLYFILL_ISNAN)\n    bool isnan(float f) {\n        return std::isnan(f);\n    }\n    bool isnan(double d) {\n        return std::isnan(d);\n    }\n#else\n    // For now we only use this for embarcadero\n    bool isnan(float f) {\n        return std::_isnan(f);\n    }\n    bool isnan(double d) {\n        return std::_isnan(d);\n    }\n#endif\n\n} // end namespace Catch\n// end catch_polyfills.cpp\n// start catch_random_number_generator.cpp\n\nnamespace Catch {\n\nnamespace {\n\n#if defined(_MSC_VER)\n#pragma warning(push)\n#pragma warning(disable:4146) // we negate uint32 during the rotate\n#endif\n        // Safe rotr implementation thanks to John Regehr\n        uint32_t rotate_right(uint32_t val, uint32_t count) {\n            const uint32_t mask = 31;\n            count &= mask;\n            return (val >> count) | (val << (-count & mask));\n        }\n\n#if defined(_MSC_VER)\n#pragma warning(pop)\n#endif\n\n}\n\n    SimplePcg32::SimplePcg32(result_type seed_) {\n        seed(seed_);\n    }\n\n    void SimplePcg32::seed(result_type seed_) {\n        m_state = 0;\n        (*this)();\n        m_state += seed_;\n        (*this)();\n    }\n\n    void SimplePcg32::discard(uint64_t skip) {\n        // We could implement this to run in O(log n) steps, but this\n        // should suffice for our use case.\n        for (uint64_t s = 0; s < skip; ++s) {\n            static_cast<void>((*this)());\n        }\n    }\n\n    SimplePcg32::result_type SimplePcg32::operator()() {\n        // prepare the output value\n        const uint32_t xorshifted = static_cast<uint32_t>(((m_state >> 18u) ^ m_state) >> 27u);\n        const auto output = rotate_right(xorshifted, m_state >> 59u);\n\n        // advance state\n        m_state = m_state * 6364136223846793005ULL + s_inc;\n\n        return output;\n    }\n\n    bool operator==(SimplePcg32 const& lhs, SimplePcg32 const& rhs) {\n        return lhs.m_state == rhs.m_state;\n    }\n\n    bool operator!=(SimplePcg32 const& lhs, SimplePcg32 const& rhs) {\n        return lhs.m_state != rhs.m_state;\n    }\n}\n// end catch_random_number_generator.cpp\n// start catch_registry_hub.cpp\n\n// start catch_test_case_registry_impl.h\n\n#include <vector>\n#include <set>\n#include <algorithm>\n#include <ios>\n\nnamespace Catch {\n\n    class TestCase;\n    struct IConfig;\n\n    std::vector<TestCase> sortTests( IConfig const& config, std::vector<TestCase> const& unsortedTestCases );\n\n    bool isThrowSafe( TestCase const& testCase, IConfig const& config );\n    bool matchTest( TestCase const& testCase, TestSpec const& testSpec, IConfig const& config );\n\n    void enforceNoDuplicateTestCases( std::vector<TestCase> const& functions );\n\n    std::vector<TestCase> filterTests( std::vector<TestCase> const& testCases, TestSpec const& testSpec, IConfig const& config );\n    std::vector<TestCase> const& getAllTestCasesSorted( IConfig const& config );\n\n    class TestRegistry : public ITestCaseRegistry {\n    public:\n        virtual ~TestRegistry() = default;\n\n        virtual void registerTest( TestCase const& testCase );\n\n        std::vector<TestCase> const& getAllTests() const override;\n        std::vector<TestCase> const& getAllTestsSorted( IConfig const& config ) const override;\n\n    private:\n        std::vector<TestCase> m_functions;\n        mutable RunTests::InWhatOrder m_currentSortOrder = RunTests::InDeclarationOrder;\n        mutable std::vector<TestCase> m_sortedFunctions;\n        std::size_t m_unnamedCount = 0;\n        std::ios_base::Init m_ostreamInit; // Forces cout/ cerr to be initialised\n    };\n\n    ///////////////////////////////////////////////////////////////////////////\n\n    class TestInvokerAsFunction : public ITestInvoker {\n        void(*m_testAsFunction)();\n    public:\n        TestInvokerAsFunction( void(*testAsFunction)() ) noexcept;\n\n        void invoke() const override;\n    };\n\n    std::string extractClassName( StringRef const& classOrQualifiedMethodName );\n\n    ///////////////////////////////////////////////////////////////////////////\n\n} // end namespace Catch\n\n// end catch_test_case_registry_impl.h\n// start catch_reporter_registry.h\n\n#include <map>\n\nnamespace Catch {\n\n    class ReporterRegistry : public IReporterRegistry {\n\n    public:\n\n        ~ReporterRegistry() override;\n\n        IStreamingReporterPtr create( std::string const& name, IConfigPtr const& config ) const override;\n\n        void registerReporter( std::string const& name, IReporterFactoryPtr const& factory );\n        void registerListener( IReporterFactoryPtr const& factory );\n\n        FactoryMap const& getFactories() const override;\n        Listeners const& getListeners() const override;\n\n    private:\n        FactoryMap m_factories;\n        Listeners m_listeners;\n    };\n}\n\n// end catch_reporter_registry.h\n// start catch_tag_alias_registry.h\n\n// start catch_tag_alias.h\n\n#include <string>\n\nnamespace Catch {\n\n    struct TagAlias {\n        TagAlias(std::string const& _tag, SourceLineInfo _lineInfo);\n\n        std::string tag;\n        SourceLineInfo lineInfo;\n    };\n\n} // end namespace Catch\n\n// end catch_tag_alias.h\n#include <map>\n\nnamespace Catch {\n\n    class TagAliasRegistry : public ITagAliasRegistry {\n    public:\n        ~TagAliasRegistry() override;\n        TagAlias const* find( std::string const& alias ) const override;\n        std::string expandAliases( std::string const& unexpandedTestSpec ) const override;\n        void add( std::string const& alias, std::string const& tag, SourceLineInfo const& lineInfo );\n\n    private:\n        std::map<std::string, TagAlias> m_registry;\n    };\n\n} // end namespace Catch\n\n// end catch_tag_alias_registry.h\n// start catch_startup_exception_registry.h\n\n#include <vector>\n#include <exception>\n\nnamespace Catch {\n\n    class StartupExceptionRegistry {\n#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)\n    public:\n        void add(std::exception_ptr const& exception) noexcept;\n        std::vector<std::exception_ptr> const& getExceptions() const noexcept;\n    private:\n        std::vector<std::exception_ptr> m_exceptions;\n#endif\n    };\n\n} // end namespace Catch\n\n// end catch_startup_exception_registry.h\n// start catch_singletons.hpp\n\nnamespace Catch {\n\n    struct ISingleton {\n        virtual ~ISingleton();\n    };\n\n    void addSingleton( ISingleton* singleton );\n    void cleanupSingletons();\n\n    template<typename SingletonImplT, typename InterfaceT = SingletonImplT, typename MutableInterfaceT = InterfaceT>\n    class Singleton : SingletonImplT, public ISingleton {\n\n        static auto getInternal() -> Singleton* {\n            static Singleton* s_instance = nullptr;\n            if( !s_instance ) {\n                s_instance = new Singleton;\n                addSingleton( s_instance );\n            }\n            return s_instance;\n        }\n\n    public:\n        static auto get() -> InterfaceT const& {\n            return *getInternal();\n        }\n        static auto getMutable() -> MutableInterfaceT& {\n            return *getInternal();\n        }\n    };\n\n} // namespace Catch\n\n// end catch_singletons.hpp\nnamespace Catch {\n\n    namespace {\n\n        class RegistryHub : public IRegistryHub, public IMutableRegistryHub,\n                            private NonCopyable {\n\n        public: // IRegistryHub\n            RegistryHub() = default;\n            IReporterRegistry const& getReporterRegistry() const override {\n                return m_reporterRegistry;\n            }\n            ITestCaseRegistry const& getTestCaseRegistry() const override {\n                return m_testCaseRegistry;\n            }\n            IExceptionTranslatorRegistry const& getExceptionTranslatorRegistry() const override {\n                return m_exceptionTranslatorRegistry;\n            }\n            ITagAliasRegistry const& getTagAliasRegistry() const override {\n                return m_tagAliasRegistry;\n            }\n            StartupExceptionRegistry const& getStartupExceptionRegistry() const override {\n                return m_exceptionRegistry;\n            }\n\n        public: // IMutableRegistryHub\n            void registerReporter( std::string const& name, IReporterFactoryPtr const& factory ) override {\n                m_reporterRegistry.registerReporter( name, factory );\n            }\n            void registerListener( IReporterFactoryPtr const& factory ) override {\n                m_reporterRegistry.registerListener( factory );\n            }\n            void registerTest( TestCase const& testInfo ) override {\n                m_testCaseRegistry.registerTest( testInfo );\n            }\n            void registerTranslator( const IExceptionTranslator* translator ) override {\n                m_exceptionTranslatorRegistry.registerTranslator( translator );\n            }\n            void registerTagAlias( std::string const& alias, std::string const& tag, SourceLineInfo const& lineInfo ) override {\n                m_tagAliasRegistry.add( alias, tag, lineInfo );\n            }\n            void registerStartupException() noexcept override {\n#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)\n                m_exceptionRegistry.add(std::current_exception());\n#else\n                CATCH_INTERNAL_ERROR(\"Attempted to register active exception under CATCH_CONFIG_DISABLE_EXCEPTIONS!\");\n#endif\n            }\n            IMutableEnumValuesRegistry& getMutableEnumValuesRegistry() override {\n                return m_enumValuesRegistry;\n            }\n\n        private:\n            TestRegistry m_testCaseRegistry;\n            ReporterRegistry m_reporterRegistry;\n            ExceptionTranslatorRegistry m_exceptionTranslatorRegistry;\n            TagAliasRegistry m_tagAliasRegistry;\n            StartupExceptionRegistry m_exceptionRegistry;\n            Detail::EnumValuesRegistry m_enumValuesRegistry;\n        };\n    }\n\n    using RegistryHubSingleton = Singleton<RegistryHub, IRegistryHub, IMutableRegistryHub>;\n\n    IRegistryHub const& getRegistryHub() {\n        return RegistryHubSingleton::get();\n    }\n    IMutableRegistryHub& getMutableRegistryHub() {\n        return RegistryHubSingleton::getMutable();\n    }\n    void cleanUp() {\n        cleanupSingletons();\n        cleanUpContext();\n    }\n    std::string translateActiveException() {\n        return getRegistryHub().getExceptionTranslatorRegistry().translateActiveException();\n    }\n\n} // end namespace Catch\n// end catch_registry_hub.cpp\n// start catch_reporter_registry.cpp\n\nnamespace Catch {\n\n    ReporterRegistry::~ReporterRegistry() = default;\n\n    IStreamingReporterPtr ReporterRegistry::create( std::string const& name, IConfigPtr const& config ) const {\n        auto it =  m_factories.find( name );\n        if( it == m_factories.end() )\n            return nullptr;\n        return it->second->create( ReporterConfig( config ) );\n    }\n\n    void ReporterRegistry::registerReporter( std::string const& name, IReporterFactoryPtr const& factory ) {\n        m_factories.emplace(name, factory);\n    }\n    void ReporterRegistry::registerListener( IReporterFactoryPtr const& factory ) {\n        m_listeners.push_back( factory );\n    }\n\n    IReporterRegistry::FactoryMap const& ReporterRegistry::getFactories() const {\n        return m_factories;\n    }\n    IReporterRegistry::Listeners const& ReporterRegistry::getListeners() const {\n        return m_listeners;\n    }\n\n}\n// end catch_reporter_registry.cpp\n// start catch_result_type.cpp\n\nnamespace Catch {\n\n    bool isOk( ResultWas::OfType resultType ) {\n        return ( resultType & ResultWas::FailureBit ) == 0;\n    }\n    bool isJustInfo( int flags ) {\n        return flags == ResultWas::Info;\n    }\n\n    ResultDisposition::Flags operator | ( ResultDisposition::Flags lhs, ResultDisposition::Flags rhs ) {\n        return static_cast<ResultDisposition::Flags>( static_cast<int>( lhs ) | static_cast<int>( rhs ) );\n    }\n\n    bool shouldContinueOnFailure( int flags )    { return ( flags & ResultDisposition::ContinueOnFailure ) != 0; }\n    bool shouldSuppressFailure( int flags )      { return ( flags & ResultDisposition::SuppressFail ) != 0; }\n\n} // end namespace Catch\n// end catch_result_type.cpp\n// start catch_run_context.cpp\n\n#include <cassert>\n#include <algorithm>\n#include <sstream>\n\nnamespace Catch {\n\n    namespace Generators {\n        struct GeneratorTracker : TestCaseTracking::TrackerBase, IGeneratorTracker {\n            GeneratorBasePtr m_generator;\n\n            GeneratorTracker( TestCaseTracking::NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent )\n            :   TrackerBase( nameAndLocation, ctx, parent )\n            {}\n            ~GeneratorTracker();\n\n            static GeneratorTracker& acquire( TrackerContext& ctx, TestCaseTracking::NameAndLocation const& nameAndLocation ) {\n                std::shared_ptr<GeneratorTracker> tracker;\n\n                ITracker& currentTracker = ctx.currentTracker();\n                // Under specific circumstances, the generator we want\n                // to acquire is also the current tracker. If this is\n                // the case, we have to avoid looking through current\n                // tracker's children, and instead return the current\n                // tracker.\n                // A case where this check is important is e.g.\n                //     for (int i = 0; i < 5; ++i) {\n                //         int n = GENERATE(1, 2);\n                //     }\n                //\n                // without it, the code above creates 5 nested generators.\n                if (currentTracker.nameAndLocation() == nameAndLocation) {\n                    auto thisTracker = currentTracker.parent().findChild(nameAndLocation);\n                    assert(thisTracker);\n                    assert(thisTracker->isGeneratorTracker());\n                    tracker = std::static_pointer_cast<GeneratorTracker>(thisTracker);\n                } else if ( TestCaseTracking::ITrackerPtr childTracker = currentTracker.findChild( nameAndLocation ) ) {\n                    assert( childTracker );\n                    assert( childTracker->isGeneratorTracker() );\n                    tracker = std::static_pointer_cast<GeneratorTracker>( childTracker );\n                } else {\n                    tracker = std::make_shared<GeneratorTracker>( nameAndLocation, ctx, &currentTracker );\n                    currentTracker.addChild( tracker );\n                }\n\n                if( !tracker->isComplete() ) {\n                    tracker->open();\n                }\n\n                return *tracker;\n            }\n\n            // TrackerBase interface\n            bool isGeneratorTracker() const override { return true; }\n            auto hasGenerator() const -> bool override {\n                return !!m_generator;\n            }\n            void close() override {\n                TrackerBase::close();\n                // If a generator has a child (it is followed by a section)\n                // and none of its children have started, then we must wait\n                // until later to start consuming its values.\n                // This catches cases where `GENERATE` is placed between two\n                // `SECTION`s.\n                // **The check for m_children.empty cannot be removed**.\n                // doing so would break `GENERATE` _not_ followed by `SECTION`s.\n                const bool should_wait_for_child = [&]() {\n                    // No children -> nobody to wait for\n                    if ( m_children.empty() ) {\n                        return false;\n                    }\n                    // If at least one child started executing, don't wait\n                    if ( std::find_if(\n                             m_children.begin(),\n                             m_children.end(),\n                             []( TestCaseTracking::ITrackerPtr tracker ) {\n                                 return tracker->hasStarted();\n                             } ) != m_children.end() ) {\n                        return false;\n                    }\n\n                    // No children have started. We need to check if they _can_\n                    // start, and thus we should wait for them, or they cannot\n                    // start (due to filters), and we shouldn't wait for them\n                    auto* parent = m_parent;\n                    // This is safe: there is always at least one section\n                    // tracker in a test case tracking tree\n                    while ( !parent->isSectionTracker() ) {\n                        parent = &( parent->parent() );\n                    }\n                    assert( parent &&\n                            \"Missing root (test case) level section\" );\n\n                    auto const& parentSection =\n                        static_cast<SectionTracker&>( *parent );\n                    auto const& filters = parentSection.getFilters();\n                    // No filters -> no restrictions on running sections\n                    if ( filters.empty() ) {\n                        return true;\n                    }\n\n                    for ( auto const& child : m_children ) {\n                        if ( child->isSectionTracker() &&\n                             std::find( filters.begin(),\n                                        filters.end(),\n                                        static_cast<SectionTracker&>( *child )\n                                            .trimmedName() ) !=\n                                 filters.end() ) {\n                            return true;\n                        }\n                    }\n                    return false;\n                }();\n\n                // This check is a bit tricky, because m_generator->next()\n                // has a side-effect, where it consumes generator's current\n                // value, but we do not want to invoke the side-effect if\n                // this generator is still waiting for any child to start.\n                if ( should_wait_for_child ||\n                     ( m_runState == CompletedSuccessfully &&\n                       m_generator->next() ) ) {\n                    m_children.clear();\n                    m_runState = Executing;\n                }\n            }\n\n            // IGeneratorTracker interface\n            auto getGenerator() const -> GeneratorBasePtr const& override {\n                return m_generator;\n            }\n            void setGenerator( GeneratorBasePtr&& generator ) override {\n                m_generator = std::move( generator );\n            }\n        };\n        GeneratorTracker::~GeneratorTracker() {}\n    }\n\n    RunContext::RunContext(IConfigPtr const& _config, IStreamingReporterPtr&& reporter)\n    :   m_runInfo(_config->name()),\n        m_context(getCurrentMutableContext()),\n        m_config(_config),\n        m_reporter(std::move(reporter)),\n        m_lastAssertionInfo{ StringRef(), SourceLineInfo(\"\",0), StringRef(), ResultDisposition::Normal },\n        m_includeSuccessfulResults( m_config->includeSuccessfulResults() || m_reporter->getPreferences().shouldReportAllAssertions )\n    {\n        m_context.setRunner(this);\n        m_context.setConfig(m_config);\n        m_context.setResultCapture(this);\n        m_reporter->testRunStarting(m_runInfo);\n    }\n\n    RunContext::~RunContext() {\n        m_reporter->testRunEnded(TestRunStats(m_runInfo, m_totals, aborting()));\n    }\n\n    void RunContext::testGroupStarting(std::string const& testSpec, std::size_t groupIndex, std::size_t groupsCount) {\n        m_reporter->testGroupStarting(GroupInfo(testSpec, groupIndex, groupsCount));\n    }\n\n    void RunContext::testGroupEnded(std::string const& testSpec, Totals const& totals, std::size_t groupIndex, std::size_t groupsCount) {\n        m_reporter->testGroupEnded(TestGroupStats(GroupInfo(testSpec, groupIndex, groupsCount), totals, aborting()));\n    }\n\n    Totals RunContext::runTest(TestCase const& testCase) {\n        Totals prevTotals = m_totals;\n\n        std::string redirectedCout;\n        std::string redirectedCerr;\n\n        auto const& testInfo = testCase.getTestCaseInfo();\n\n        m_reporter->testCaseStarting(testInfo);\n\n        m_activeTestCase = &testCase;\n\n        ITracker& rootTracker = m_trackerContext.startRun();\n        assert(rootTracker.isSectionTracker());\n        static_cast<SectionTracker&>(rootTracker).addInitialFilters(m_config->getSectionsToRun());\n        do {\n            m_trackerContext.startCycle();\n            m_testCaseTracker = &SectionTracker::acquire(m_trackerContext, TestCaseTracking::NameAndLocation(testInfo.name, testInfo.lineInfo));\n            runCurrentTest(redirectedCout, redirectedCerr);\n        } while (!m_testCaseTracker->isSuccessfullyCompleted() && !aborting());\n\n        Totals deltaTotals = m_totals.delta(prevTotals);\n        if (testInfo.expectedToFail() && deltaTotals.testCases.passed > 0) {\n            deltaTotals.assertions.failed++;\n            deltaTotals.testCases.passed--;\n            deltaTotals.testCases.failed++;\n        }\n        m_totals.testCases += deltaTotals.testCases;\n        m_reporter->testCaseEnded(TestCaseStats(testInfo,\n                                  deltaTotals,\n                                  redirectedCout,\n                                  redirectedCerr,\n                                  aborting()));\n\n        m_activeTestCase = nullptr;\n        m_testCaseTracker = nullptr;\n\n        return deltaTotals;\n    }\n\n    IConfigPtr RunContext::config() const {\n        return m_config;\n    }\n\n    IStreamingReporter& RunContext::reporter() const {\n        return *m_reporter;\n    }\n\n    void RunContext::assertionEnded(AssertionResult const & result) {\n        if (result.getResultType() == ResultWas::Ok) {\n            m_totals.assertions.passed++;\n            m_lastAssertionPassed = true;\n        } else if (!result.isOk()) {\n            m_lastAssertionPassed = false;\n            if( m_activeTestCase->getTestCaseInfo().okToFail() )\n                m_totals.assertions.failedButOk++;\n            else\n                m_totals.assertions.failed++;\n        }\n        else {\n            m_lastAssertionPassed = true;\n        }\n\n        // We have no use for the return value (whether messages should be cleared), because messages were made scoped\n        // and should be let to clear themselves out.\n        static_cast<void>(m_reporter->assertionEnded(AssertionStats(result, m_messages, m_totals)));\n\n        if (result.getResultType() != ResultWas::Warning)\n            m_messageScopes.clear();\n\n        // Reset working state\n        resetAssertionInfo();\n        m_lastResult = result;\n    }\n    void RunContext::resetAssertionInfo() {\n        m_lastAssertionInfo.macroName = StringRef();\n        m_lastAssertionInfo.capturedExpression = \"{Unknown expression after the reported line}\"_sr;\n    }\n\n    bool RunContext::sectionStarted(SectionInfo const & sectionInfo, Counts & assertions) {\n        ITracker& sectionTracker = SectionTracker::acquire(m_trackerContext, TestCaseTracking::NameAndLocation(sectionInfo.name, sectionInfo.lineInfo));\n        if (!sectionTracker.isOpen())\n            return false;\n        m_activeSections.push_back(&sectionTracker);\n\n        m_lastAssertionInfo.lineInfo = sectionInfo.lineInfo;\n\n        m_reporter->sectionStarting(sectionInfo);\n\n        assertions = m_totals.assertions;\n\n        return true;\n    }\n    auto RunContext::acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker& {\n        using namespace Generators;\n        GeneratorTracker& tracker = GeneratorTracker::acquire(m_trackerContext,\n                                                              TestCaseTracking::NameAndLocation( static_cast<std::string>(generatorName), lineInfo ) );\n        m_lastAssertionInfo.lineInfo = lineInfo;\n        return tracker;\n    }\n\n    bool RunContext::testForMissingAssertions(Counts& assertions) {\n        if (assertions.total() != 0)\n            return false;\n        if (!m_config->warnAboutMissingAssertions())\n            return false;\n        if (m_trackerContext.currentTracker().hasChildren())\n            return false;\n        m_totals.assertions.failed++;\n        assertions.failed++;\n        return true;\n    }\n\n    void RunContext::sectionEnded(SectionEndInfo const & endInfo) {\n        Counts assertions = m_totals.assertions - endInfo.prevAssertions;\n        bool missingAssertions = testForMissingAssertions(assertions);\n\n        if (!m_activeSections.empty()) {\n            m_activeSections.back()->close();\n            m_activeSections.pop_back();\n        }\n\n        m_reporter->sectionEnded(SectionStats(endInfo.sectionInfo, assertions, endInfo.durationInSeconds, missingAssertions));\n        m_messages.clear();\n        m_messageScopes.clear();\n    }\n\n    void RunContext::sectionEndedEarly(SectionEndInfo const & endInfo) {\n        if (m_unfinishedSections.empty())\n            m_activeSections.back()->fail();\n        else\n            m_activeSections.back()->close();\n        m_activeSections.pop_back();\n\n        m_unfinishedSections.push_back(endInfo);\n    }\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n    void RunContext::benchmarkPreparing(std::string const& name) {\n        m_reporter->benchmarkPreparing(name);\n    }\n    void RunContext::benchmarkStarting( BenchmarkInfo const& info ) {\n        m_reporter->benchmarkStarting( info );\n    }\n    void RunContext::benchmarkEnded( BenchmarkStats<> const& stats ) {\n        m_reporter->benchmarkEnded( stats );\n    }\n    void RunContext::benchmarkFailed(std::string const & error) {\n        m_reporter->benchmarkFailed(error);\n    }\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n\n    void RunContext::pushScopedMessage(MessageInfo const & message) {\n        m_messages.push_back(message);\n    }\n\n    void RunContext::popScopedMessage(MessageInfo const & message) {\n        m_messages.erase(std::remove(m_messages.begin(), m_messages.end(), message), m_messages.end());\n    }\n\n    void RunContext::emplaceUnscopedMessage( MessageBuilder const& builder ) {\n        m_messageScopes.emplace_back( builder );\n    }\n\n    std::string RunContext::getCurrentTestName() const {\n        return m_activeTestCase\n            ? m_activeTestCase->getTestCaseInfo().name\n            : std::string();\n    }\n\n    const AssertionResult * RunContext::getLastResult() const {\n        return &(*m_lastResult);\n    }\n\n    void RunContext::exceptionEarlyReported() {\n        m_shouldReportUnexpected = false;\n    }\n\n    void RunContext::handleFatalErrorCondition( StringRef message ) {\n        // First notify reporter that bad things happened\n        m_reporter->fatalErrorEncountered(message);\n\n        // Don't rebuild the result -- the stringification itself can cause more fatal errors\n        // Instead, fake a result data.\n        AssertionResultData tempResult( ResultWas::FatalErrorCondition, { false } );\n        tempResult.message = static_cast<std::string>(message);\n        AssertionResult result(m_lastAssertionInfo, tempResult);\n\n        assertionEnded(result);\n\n        handleUnfinishedSections();\n\n        // Recreate section for test case (as we will lose the one that was in scope)\n        auto const& testCaseInfo = m_activeTestCase->getTestCaseInfo();\n        SectionInfo testCaseSection(testCaseInfo.lineInfo, testCaseInfo.name);\n\n        Counts assertions;\n        assertions.failed = 1;\n        SectionStats testCaseSectionStats(testCaseSection, assertions, 0, false);\n        m_reporter->sectionEnded(testCaseSectionStats);\n\n        auto const& testInfo = m_activeTestCase->getTestCaseInfo();\n\n        Totals deltaTotals;\n        deltaTotals.testCases.failed = 1;\n        deltaTotals.assertions.failed = 1;\n        m_reporter->testCaseEnded(TestCaseStats(testInfo,\n                                  deltaTotals,\n                                  std::string(),\n                                  std::string(),\n                                  false));\n        m_totals.testCases.failed++;\n        testGroupEnded(std::string(), m_totals, 1, 1);\n        m_reporter->testRunEnded(TestRunStats(m_runInfo, m_totals, false));\n    }\n\n    bool RunContext::lastAssertionPassed() {\n         return m_lastAssertionPassed;\n    }\n\n    void RunContext::assertionPassed() {\n        m_lastAssertionPassed = true;\n        ++m_totals.assertions.passed;\n        resetAssertionInfo();\n        m_messageScopes.clear();\n    }\n\n    bool RunContext::aborting() const {\n        return m_totals.assertions.failed >= static_cast<std::size_t>(m_config->abortAfter());\n    }\n\n    void RunContext::runCurrentTest(std::string & redirectedCout, std::string & redirectedCerr) {\n        auto const& testCaseInfo = m_activeTestCase->getTestCaseInfo();\n        SectionInfo testCaseSection(testCaseInfo.lineInfo, testCaseInfo.name);\n        m_reporter->sectionStarting(testCaseSection);\n        Counts prevAssertions = m_totals.assertions;\n        double duration = 0;\n        m_shouldReportUnexpected = true;\n        m_lastAssertionInfo = { \"TEST_CASE\"_sr, testCaseInfo.lineInfo, StringRef(), ResultDisposition::Normal };\n\n        seedRng(*m_config);\n\n        Timer timer;\n        CATCH_TRY {\n            if (m_reporter->getPreferences().shouldRedirectStdOut) {\n#if !defined(CATCH_CONFIG_EXPERIMENTAL_REDIRECT)\n                RedirectedStreams redirectedStreams(redirectedCout, redirectedCerr);\n\n                timer.start();\n                invokeActiveTestCase();\n#else\n                OutputRedirect r(redirectedCout, redirectedCerr);\n                timer.start();\n                invokeActiveTestCase();\n#endif\n            } else {\n                timer.start();\n                invokeActiveTestCase();\n            }\n            duration = timer.getElapsedSeconds();\n        } CATCH_CATCH_ANON (TestFailureException&) {\n            // This just means the test was aborted due to failure\n        } CATCH_CATCH_ALL {\n            // Under CATCH_CONFIG_FAST_COMPILE, unexpected exceptions under REQUIRE assertions\n            // are reported without translation at the point of origin.\n            if( m_shouldReportUnexpected ) {\n                AssertionReaction dummyReaction;\n                handleUnexpectedInflightException( m_lastAssertionInfo, translateActiveException(), dummyReaction );\n            }\n        }\n        Counts assertions = m_totals.assertions - prevAssertions;\n        bool missingAssertions = testForMissingAssertions(assertions);\n\n        m_testCaseTracker->close();\n        handleUnfinishedSections();\n        m_messages.clear();\n        m_messageScopes.clear();\n\n        SectionStats testCaseSectionStats(testCaseSection, assertions, duration, missingAssertions);\n        m_reporter->sectionEnded(testCaseSectionStats);\n    }\n\n    void RunContext::invokeActiveTestCase() {\n        FatalConditionHandlerGuard _(&m_fatalConditionhandler);\n        m_activeTestCase->invoke();\n    }\n\n    void RunContext::handleUnfinishedSections() {\n        // If sections ended prematurely due to an exception we stored their\n        // infos here so we can tear them down outside the unwind process.\n        for (auto it = m_unfinishedSections.rbegin(),\n             itEnd = m_unfinishedSections.rend();\n             it != itEnd;\n             ++it)\n            sectionEnded(*it);\n        m_unfinishedSections.clear();\n    }\n\n    void RunContext::handleExpr(\n        AssertionInfo const& info,\n        ITransientExpression const& expr,\n        AssertionReaction& reaction\n    ) {\n        m_reporter->assertionStarting( info );\n\n        bool negated = isFalseTest( info.resultDisposition );\n        bool result = expr.getResult() != negated;\n\n        if( result ) {\n            if (!m_includeSuccessfulResults) {\n                assertionPassed();\n            }\n            else {\n                reportExpr(info, ResultWas::Ok, &expr, negated);\n            }\n        }\n        else {\n            reportExpr(info, ResultWas::ExpressionFailed, &expr, negated );\n            populateReaction( reaction );\n        }\n    }\n    void RunContext::reportExpr(\n            AssertionInfo const &info,\n            ResultWas::OfType resultType,\n            ITransientExpression const *expr,\n            bool negated ) {\n\n        m_lastAssertionInfo = info;\n        AssertionResultData data( resultType, LazyExpression( negated ) );\n\n        AssertionResult assertionResult{ info, data };\n        assertionResult.m_resultData.lazyExpression.m_transientExpression = expr;\n\n        assertionEnded( assertionResult );\n    }\n\n    void RunContext::handleMessage(\n            AssertionInfo const& info,\n            ResultWas::OfType resultType,\n            StringRef const& message,\n            AssertionReaction& reaction\n    ) {\n        m_reporter->assertionStarting( info );\n\n        m_lastAssertionInfo = info;\n\n        AssertionResultData data( resultType, LazyExpression( false ) );\n        data.message = static_cast<std::string>(message);\n        AssertionResult assertionResult{ m_lastAssertionInfo, data };\n        assertionEnded( assertionResult );\n        if( !assertionResult.isOk() )\n            populateReaction( reaction );\n    }\n    void RunContext::handleUnexpectedExceptionNotThrown(\n            AssertionInfo const& info,\n            AssertionReaction& reaction\n    ) {\n        handleNonExpr(info, Catch::ResultWas::DidntThrowException, reaction);\n    }\n\n    void RunContext::handleUnexpectedInflightException(\n            AssertionInfo const& info,\n            std::string const& message,\n            AssertionReaction& reaction\n    ) {\n        m_lastAssertionInfo = info;\n\n        AssertionResultData data( ResultWas::ThrewException, LazyExpression( false ) );\n        data.message = message;\n        AssertionResult assertionResult{ info, data };\n        assertionEnded( assertionResult );\n        populateReaction( reaction );\n    }\n\n    void RunContext::populateReaction( AssertionReaction& reaction ) {\n        reaction.shouldDebugBreak = m_config->shouldDebugBreak();\n        reaction.shouldThrow = aborting() || (m_lastAssertionInfo.resultDisposition & ResultDisposition::Normal);\n    }\n\n    void RunContext::handleIncomplete(\n            AssertionInfo const& info\n    ) {\n        m_lastAssertionInfo = info;\n\n        AssertionResultData data( ResultWas::ThrewException, LazyExpression( false ) );\n        data.message = \"Exception translation was disabled by CATCH_CONFIG_FAST_COMPILE\";\n        AssertionResult assertionResult{ info, data };\n        assertionEnded( assertionResult );\n    }\n    void RunContext::handleNonExpr(\n            AssertionInfo const &info,\n            ResultWas::OfType resultType,\n            AssertionReaction &reaction\n    ) {\n        m_lastAssertionInfo = info;\n\n        AssertionResultData data( resultType, LazyExpression( false ) );\n        AssertionResult assertionResult{ info, data };\n        assertionEnded( assertionResult );\n\n        if( !assertionResult.isOk() )\n            populateReaction( reaction );\n    }\n\n    IResultCapture& getResultCapture() {\n        if (auto* capture = getCurrentContext().getResultCapture())\n            return *capture;\n        else\n            CATCH_INTERNAL_ERROR(\"No result capture instance\");\n    }\n\n    void seedRng(IConfig const& config) {\n        if (config.rngSeed() != 0) {\n            std::srand(config.rngSeed());\n            rng().seed(config.rngSeed());\n        }\n    }\n\n    unsigned int rngSeed() {\n        return getCurrentContext().getConfig()->rngSeed();\n    }\n\n}\n// end catch_run_context.cpp\n// start catch_section.cpp\n\nnamespace Catch {\n\n    Section::Section( SectionInfo const& info )\n    :   m_info( info ),\n        m_sectionIncluded( getResultCapture().sectionStarted( m_info, m_assertions ) )\n    {\n        m_timer.start();\n    }\n\n    Section::~Section() {\n        if( m_sectionIncluded ) {\n            SectionEndInfo endInfo{ m_info, m_assertions, m_timer.getElapsedSeconds() };\n            if( uncaught_exceptions() )\n                getResultCapture().sectionEndedEarly( endInfo );\n            else\n                getResultCapture().sectionEnded( endInfo );\n        }\n    }\n\n    // This indicates whether the section should be executed or not\n    Section::operator bool() const {\n        return m_sectionIncluded;\n    }\n\n} // end namespace Catch\n// end catch_section.cpp\n// start catch_section_info.cpp\n\nnamespace Catch {\n\n    SectionInfo::SectionInfo\n        (   SourceLineInfo const& _lineInfo,\n            std::string const& _name )\n    :   name( _name ),\n        lineInfo( _lineInfo )\n    {}\n\n} // end namespace Catch\n// end catch_section_info.cpp\n// start catch_session.cpp\n\n// start catch_session.h\n\n#include <memory>\n\nnamespace Catch {\n\n    class Session : NonCopyable {\n    public:\n\n        Session();\n        ~Session() override;\n\n        void showHelp() const;\n        void libIdentify();\n\n        int applyCommandLine( int argc, char const * const * argv );\n    #if defined(CATCH_CONFIG_WCHAR) && defined(_WIN32) && defined(UNICODE)\n        int applyCommandLine( int argc, wchar_t const * const * argv );\n    #endif\n\n        void useConfigData( ConfigData const& configData );\n\n        template<typename CharT>\n        int run(int argc, CharT const * const argv[]) {\n            if (m_startupExceptions)\n                return 1;\n            int returnCode = applyCommandLine(argc, argv);\n            if (returnCode == 0)\n                returnCode = run();\n            return returnCode;\n        }\n\n        int run();\n\n        clara::Parser const& cli() const;\n        void cli( clara::Parser const& newParser );\n        ConfigData& configData();\n        Config& config();\n    private:\n        int runInternal();\n\n        clara::Parser m_cli;\n        ConfigData m_configData;\n        std::shared_ptr<Config> m_config;\n        bool m_startupExceptions = false;\n    };\n\n} // end namespace Catch\n\n// end catch_session.h\n// start catch_version.h\n\n#include <iosfwd>\n\nnamespace Catch {\n\n    // Versioning information\n    struct Version {\n        Version( Version const& ) = delete;\n        Version& operator=( Version const& ) = delete;\n        Version(    unsigned int _majorVersion,\n                    unsigned int _minorVersion,\n                    unsigned int _patchNumber,\n                    char const * const _branchName,\n                    unsigned int _buildNumber );\n\n        unsigned int const majorVersion;\n        unsigned int const minorVersion;\n        unsigned int const patchNumber;\n\n        // buildNumber is only used if branchName is not null\n        char const * const branchName;\n        unsigned int const buildNumber;\n\n        friend std::ostream& operator << ( std::ostream& os, Version const& version );\n    };\n\n    Version const& libraryVersion();\n}\n\n// end catch_version.h\n#include <cstdlib>\n#include <iomanip>\n#include <set>\n#include <iterator>\n\nnamespace Catch {\n\n    namespace {\n        const int MaxExitCode = 255;\n\n        IStreamingReporterPtr createReporter(std::string const& reporterName, IConfigPtr const& config) {\n            auto reporter = Catch::getRegistryHub().getReporterRegistry().create(reporterName, config);\n            CATCH_ENFORCE(reporter, \"No reporter registered with name: '\" << reporterName << \"'\");\n\n            return reporter;\n        }\n\n        IStreamingReporterPtr makeReporter(std::shared_ptr<Config> const& config) {\n            if (Catch::getRegistryHub().getReporterRegistry().getListeners().empty()) {\n                return createReporter(config->getReporterName(), config);\n            }\n\n            // On older platforms, returning std::unique_ptr<ListeningReporter>\n            // when the return type is std::unique_ptr<IStreamingReporter>\n            // doesn't compile without a std::move call. However, this causes\n            // a warning on newer platforms. Thus, we have to work around\n            // it a bit and downcast the pointer manually.\n            auto ret = std::unique_ptr<IStreamingReporter>(new ListeningReporter);\n            auto& multi = static_cast<ListeningReporter&>(*ret);\n            auto const& listeners = Catch::getRegistryHub().getReporterRegistry().getListeners();\n            for (auto const& listener : listeners) {\n                multi.addListener(listener->create(Catch::ReporterConfig(config)));\n            }\n            multi.addReporter(createReporter(config->getReporterName(), config));\n            return ret;\n        }\n\n        class TestGroup {\n        public:\n            explicit TestGroup(std::shared_ptr<Config> const& config)\n            : m_config{config}\n            , m_context{config, makeReporter(config)}\n            {\n                auto const& allTestCases = getAllTestCasesSorted(*m_config);\n                m_matches = m_config->testSpec().matchesByFilter(allTestCases, *m_config);\n                auto const& invalidArgs = m_config->testSpec().getInvalidArgs();\n\n                if (m_matches.empty() && invalidArgs.empty()) {\n                    for (auto const& test : allTestCases)\n                        if (!test.isHidden())\n                            m_tests.emplace(&test);\n                } else {\n                    for (auto const& match : m_matches)\n                        m_tests.insert(match.tests.begin(), match.tests.end());\n                }\n            }\n\n            Totals execute() {\n                auto const& invalidArgs = m_config->testSpec().getInvalidArgs();\n                Totals totals;\n                m_context.testGroupStarting(m_config->name(), 1, 1);\n                for (auto const& testCase : m_tests) {\n                    if (!m_context.aborting())\n                        totals += m_context.runTest(*testCase);\n                    else\n                        m_context.reporter().skipTest(*testCase);\n                }\n\n                for (auto const& match : m_matches) {\n                    if (match.tests.empty()) {\n                        m_context.reporter().noMatchingTestCases(match.name);\n                        totals.error = -1;\n                    }\n                }\n\n                if (!invalidArgs.empty()) {\n                    for (auto const& invalidArg: invalidArgs)\n                         m_context.reporter().reportInvalidArguments(invalidArg);\n                }\n\n                m_context.testGroupEnded(m_config->name(), totals, 1, 1);\n                return totals;\n            }\n\n        private:\n            using Tests = std::set<TestCase const*>;\n\n            std::shared_ptr<Config> m_config;\n            RunContext m_context;\n            Tests m_tests;\n            TestSpec::Matches m_matches;\n        };\n\n        void applyFilenamesAsTags(Catch::IConfig const& config) {\n            auto& tests = const_cast<std::vector<TestCase>&>(getAllTestCasesSorted(config));\n            for (auto& testCase : tests) {\n                auto tags = testCase.tags;\n\n                std::string filename = testCase.lineInfo.file;\n                auto lastSlash = filename.find_last_of(\"\\\\/\");\n                if (lastSlash != std::string::npos) {\n                    filename.erase(0, lastSlash);\n                    filename[0] = '#';\n                }\n                else\n                {\n                    filename.insert(0, \"#\");\n                }\n\n                auto lastDot = filename.find_last_of('.');\n                if (lastDot != std::string::npos) {\n                    filename.erase(lastDot);\n                }\n\n                tags.push_back(std::move(filename));\n                setTags(testCase, tags);\n            }\n        }\n\n    } // anon namespace\n\n    Session::Session() {\n        static bool alreadyInstantiated = false;\n        if( alreadyInstantiated ) {\n            CATCH_TRY { CATCH_INTERNAL_ERROR( \"Only one instance of Catch::Session can ever be used\" ); }\n            CATCH_CATCH_ALL { getMutableRegistryHub().registerStartupException(); }\n        }\n\n        // There cannot be exceptions at startup in no-exception mode.\n#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)\n        const auto& exceptions = getRegistryHub().getStartupExceptionRegistry().getExceptions();\n        if ( !exceptions.empty() ) {\n            config();\n            getCurrentMutableContext().setConfig(m_config);\n\n            m_startupExceptions = true;\n            Colour colourGuard( Colour::Red );\n            Catch::cerr() << \"Errors occurred during startup!\" << '\\n';\n            // iterate over all exceptions and notify user\n            for ( const auto& ex_ptr : exceptions ) {\n                try {\n                    std::rethrow_exception(ex_ptr);\n                } catch ( std::exception const& ex ) {\n                    Catch::cerr() << Column( ex.what() ).indent(2) << '\\n';\n                }\n            }\n        }\n#endif\n\n        alreadyInstantiated = true;\n        m_cli = makeCommandLineParser( m_configData );\n    }\n    Session::~Session() {\n        Catch::cleanUp();\n    }\n\n    void Session::showHelp() const {\n        Catch::cout()\n                << \"\\nCatch v\" << libraryVersion() << \"\\n\"\n                << m_cli << std::endl\n                << \"For more detailed usage please see the project docs\\n\" << std::endl;\n    }\n    void Session::libIdentify() {\n        Catch::cout()\n                << std::left << std::setw(16) << \"description: \" << \"A Catch2 test executable\\n\"\n                << std::left << std::setw(16) << \"category: \" << \"testframework\\n\"\n                << std::left << std::setw(16) << \"framework: \" << \"Catch Test\\n\"\n                << std::left << std::setw(16) << \"version: \" << libraryVersion() << std::endl;\n    }\n\n    int Session::applyCommandLine( int argc, char const * const * argv ) {\n        if( m_startupExceptions )\n            return 1;\n\n        auto result = m_cli.parse( clara::Args( argc, argv ) );\n        if( !result ) {\n            config();\n            getCurrentMutableContext().setConfig(m_config);\n            Catch::cerr()\n                << Colour( Colour::Red )\n                << \"\\nError(s) in input:\\n\"\n                << Column( result.errorMessage() ).indent( 2 )\n                << \"\\n\\n\";\n            Catch::cerr() << \"Run with -? for usage\\n\" << std::endl;\n            return MaxExitCode;\n        }\n\n        if( m_configData.showHelp )\n            showHelp();\n        if( m_configData.libIdentify )\n            libIdentify();\n        m_config.reset();\n        return 0;\n    }\n\n#if defined(CATCH_CONFIG_WCHAR) && defined(_WIN32) && defined(UNICODE)\n    int Session::applyCommandLine( int argc, wchar_t const * const * argv ) {\n\n        char **utf8Argv = new char *[ argc ];\n\n        for ( int i = 0; i < argc; ++i ) {\n            int bufSize = WideCharToMultiByte( CP_UTF8, 0, argv[i], -1, nullptr, 0, nullptr, nullptr );\n\n            utf8Argv[ i ] = new char[ bufSize ];\n\n            WideCharToMultiByte( CP_UTF8, 0, argv[i], -1, utf8Argv[i], bufSize, nullptr, nullptr );\n        }\n\n        int returnCode = applyCommandLine( argc, utf8Argv );\n\n        for ( int i = 0; i < argc; ++i )\n            delete [] utf8Argv[ i ];\n\n        delete [] utf8Argv;\n\n        return returnCode;\n    }\n#endif\n\n    void Session::useConfigData( ConfigData const& configData ) {\n        m_configData = configData;\n        m_config.reset();\n    }\n\n    int Session::run() {\n        if( ( m_configData.waitForKeypress & WaitForKeypress::BeforeStart ) != 0 ) {\n            Catch::cout() << \"...waiting for enter/ return before starting\" << std::endl;\n            static_cast<void>(std::getchar());\n        }\n        int exitCode = runInternal();\n        if( ( m_configData.waitForKeypress & WaitForKeypress::BeforeExit ) != 0 ) {\n            Catch::cout() << \"...waiting for enter/ return before exiting, with code: \" << exitCode << std::endl;\n            static_cast<void>(std::getchar());\n        }\n        return exitCode;\n    }\n\n    clara::Parser const& Session::cli() const {\n        return m_cli;\n    }\n    void Session::cli( clara::Parser const& newParser ) {\n        m_cli = newParser;\n    }\n    ConfigData& Session::configData() {\n        return m_configData;\n    }\n    Config& Session::config() {\n        if( !m_config )\n            m_config = std::make_shared<Config>( m_configData );\n        return *m_config;\n    }\n\n    int Session::runInternal() {\n        if( m_startupExceptions )\n            return 1;\n\n        if (m_configData.showHelp || m_configData.libIdentify) {\n            return 0;\n        }\n\n        CATCH_TRY {\n            config(); // Force config to be constructed\n\n            seedRng( *m_config );\n\n            if( m_configData.filenamesAsTags )\n                applyFilenamesAsTags( *m_config );\n\n            // Handle list request\n            if( Option<std::size_t> listed = list( m_config ) )\n                return (std::min) (MaxExitCode, static_cast<int>(*listed));\n\n            TestGroup tests { m_config };\n            auto const totals = tests.execute();\n\n            if( m_config->warnAboutNoTests() && totals.error == -1 )\n                return 2;\n\n            // Note that on unices only the lower 8 bits are usually used, clamping\n            // the return value to 255 prevents false negative when some multiple\n            // of 256 tests has failed\n            return (std::min) (MaxExitCode, (std::max) (totals.error, static_cast<int>(totals.assertions.failed)));\n        }\n#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)\n        catch( std::exception& ex ) {\n            Catch::cerr() << ex.what() << std::endl;\n            return MaxExitCode;\n        }\n#endif\n    }\n\n} // end namespace Catch\n// end catch_session.cpp\n// start catch_singletons.cpp\n\n#include <vector>\n\nnamespace Catch {\n\n    namespace {\n        static auto getSingletons() -> std::vector<ISingleton*>*& {\n            static std::vector<ISingleton*>* g_singletons = nullptr;\n            if( !g_singletons )\n                g_singletons = new std::vector<ISingleton*>();\n            return g_singletons;\n        }\n    }\n\n    ISingleton::~ISingleton() {}\n\n    void addSingleton(ISingleton* singleton ) {\n        getSingletons()->push_back( singleton );\n    }\n    void cleanupSingletons() {\n        auto& singletons = getSingletons();\n        for( auto singleton : *singletons )\n            delete singleton;\n        delete singletons;\n        singletons = nullptr;\n    }\n\n} // namespace Catch\n// end catch_singletons.cpp\n// start catch_startup_exception_registry.cpp\n\n#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)\nnamespace Catch {\nvoid StartupExceptionRegistry::add( std::exception_ptr const& exception ) noexcept {\n        CATCH_TRY {\n            m_exceptions.push_back(exception);\n        } CATCH_CATCH_ALL {\n            // If we run out of memory during start-up there's really not a lot more we can do about it\n            std::terminate();\n        }\n    }\n\n    std::vector<std::exception_ptr> const& StartupExceptionRegistry::getExceptions() const noexcept {\n        return m_exceptions;\n    }\n\n} // end namespace Catch\n#endif\n// end catch_startup_exception_registry.cpp\n// start catch_stream.cpp\n\n#include <cstdio>\n#include <iostream>\n#include <fstream>\n#include <sstream>\n#include <vector>\n#include <memory>\n\nnamespace Catch {\n\n    Catch::IStream::~IStream() = default;\n\n    namespace Detail { namespace {\n        template<typename WriterF, std::size_t bufferSize=256>\n        class StreamBufImpl : public std::streambuf {\n            char data[bufferSize];\n            WriterF m_writer;\n\n        public:\n            StreamBufImpl() {\n                setp( data, data + sizeof(data) );\n            }\n\n            ~StreamBufImpl() noexcept {\n                StreamBufImpl::sync();\n            }\n\n        private:\n            int overflow( int c ) override {\n                sync();\n\n                if( c != EOF ) {\n                    if( pbase() == epptr() )\n                        m_writer( std::string( 1, static_cast<char>( c ) ) );\n                    else\n                        sputc( static_cast<char>( c ) );\n                }\n                return 0;\n            }\n\n            int sync() override {\n                if( pbase() != pptr() ) {\n                    m_writer( std::string( pbase(), static_cast<std::string::size_type>( pptr() - pbase() ) ) );\n                    setp( pbase(), epptr() );\n                }\n                return 0;\n            }\n        };\n\n        ///////////////////////////////////////////////////////////////////////////\n\n        struct OutputDebugWriter {\n\n            void operator()( std::string const&str ) {\n                writeToDebugConsole( str );\n            }\n        };\n\n        ///////////////////////////////////////////////////////////////////////////\n\n        class FileStream : public IStream {\n            mutable std::ofstream m_ofs;\n        public:\n            FileStream( StringRef filename ) {\n                m_ofs.open( filename.c_str() );\n                CATCH_ENFORCE( !m_ofs.fail(), \"Unable to open file: '\" << filename << \"'\" );\n            }\n            ~FileStream() override = default;\n        public: // IStream\n            std::ostream& stream() const override {\n                return m_ofs;\n            }\n        };\n\n        ///////////////////////////////////////////////////////////////////////////\n\n        class CoutStream : public IStream {\n            mutable std::ostream m_os;\n        public:\n            // Store the streambuf from cout up-front because\n            // cout may get redirected when running tests\n            CoutStream() : m_os( Catch::cout().rdbuf() ) {}\n            ~CoutStream() override = default;\n\n        public: // IStream\n            std::ostream& stream() const override { return m_os; }\n        };\n\n        ///////////////////////////////////////////////////////////////////////////\n\n        class DebugOutStream : public IStream {\n            std::unique_ptr<StreamBufImpl<OutputDebugWriter>> m_streamBuf;\n            mutable std::ostream m_os;\n        public:\n            DebugOutStream()\n            :   m_streamBuf( new StreamBufImpl<OutputDebugWriter>() ),\n                m_os( m_streamBuf.get() )\n            {}\n\n            ~DebugOutStream() override = default;\n\n        public: // IStream\n            std::ostream& stream() const override { return m_os; }\n        };\n\n    }} // namespace anon::detail\n\n    ///////////////////////////////////////////////////////////////////////////\n\n    auto makeStream( StringRef const &filename ) -> IStream const* {\n        if( filename.empty() )\n            return new Detail::CoutStream();\n        else if( filename[0] == '%' ) {\n            if( filename == \"%debug\" )\n                return new Detail::DebugOutStream();\n            else\n                CATCH_ERROR( \"Unrecognised stream: '\" << filename << \"'\" );\n        }\n        else\n            return new Detail::FileStream( filename );\n    }\n\n    // This class encapsulates the idea of a pool of ostringstreams that can be reused.\n    struct StringStreams {\n        std::vector<std::unique_ptr<std::ostringstream>> m_streams;\n        std::vector<std::size_t> m_unused;\n        std::ostringstream m_referenceStream; // Used for copy state/ flags from\n\n        auto add() -> std::size_t {\n            if( m_unused.empty() ) {\n                m_streams.push_back( std::unique_ptr<std::ostringstream>( new std::ostringstream ) );\n                return m_streams.size()-1;\n            }\n            else {\n                auto index = m_unused.back();\n                m_unused.pop_back();\n                return index;\n            }\n        }\n\n        void release( std::size_t index ) {\n            m_streams[index]->copyfmt( m_referenceStream ); // Restore initial flags and other state\n            m_unused.push_back(index);\n        }\n    };\n\n    ReusableStringStream::ReusableStringStream()\n    :   m_index( Singleton<StringStreams>::getMutable().add() ),\n        m_oss( Singleton<StringStreams>::getMutable().m_streams[m_index].get() )\n    {}\n\n    ReusableStringStream::~ReusableStringStream() {\n        static_cast<std::ostringstream*>( m_oss )->str(\"\");\n        m_oss->clear();\n        Singleton<StringStreams>::getMutable().release( m_index );\n    }\n\n    auto ReusableStringStream::str() const -> std::string {\n        return static_cast<std::ostringstream*>( m_oss )->str();\n    }\n\n    ///////////////////////////////////////////////////////////////////////////\n\n#ifndef CATCH_CONFIG_NOSTDOUT // If you #define this you must implement these functions\n    std::ostream& cout() { return std::cout; }\n    std::ostream& cerr() { return std::cerr; }\n    std::ostream& clog() { return std::clog; }\n#endif\n}\n// end catch_stream.cpp\n// start catch_string_manip.cpp\n\n#include <algorithm>\n#include <ostream>\n#include <cstring>\n#include <cctype>\n#include <vector>\n\nnamespace Catch {\n\n    namespace {\n        char toLowerCh(char c) {\n            return static_cast<char>( std::tolower( static_cast<unsigned char>(c) ) );\n        }\n    }\n\n    bool startsWith( std::string const& s, std::string const& prefix ) {\n        return s.size() >= prefix.size() && std::equal(prefix.begin(), prefix.end(), s.begin());\n    }\n    bool startsWith( std::string const& s, char prefix ) {\n        return !s.empty() && s[0] == prefix;\n    }\n    bool endsWith( std::string const& s, std::string const& suffix ) {\n        return s.size() >= suffix.size() && std::equal(suffix.rbegin(), suffix.rend(), s.rbegin());\n    }\n    bool endsWith( std::string const& s, char suffix ) {\n        return !s.empty() && s[s.size()-1] == suffix;\n    }\n    bool contains( std::string const& s, std::string const& infix ) {\n        return s.find( infix ) != std::string::npos;\n    }\n    void toLowerInPlace( std::string& s ) {\n        std::transform( s.begin(), s.end(), s.begin(), toLowerCh );\n    }\n    std::string toLower( std::string const& s ) {\n        std::string lc = s;\n        toLowerInPlace( lc );\n        return lc;\n    }\n    std::string trim( std::string const& str ) {\n        static char const* whitespaceChars = \"\\n\\r\\t \";\n        std::string::size_type start = str.find_first_not_of( whitespaceChars );\n        std::string::size_type end = str.find_last_not_of( whitespaceChars );\n\n        return start != std::string::npos ? str.substr( start, 1+end-start ) : std::string();\n    }\n\n    StringRef trim(StringRef ref) {\n        const auto is_ws = [](char c) {\n            return c == ' ' || c == '\\t' || c == '\\n' || c == '\\r';\n        };\n        size_t real_begin = 0;\n        while (real_begin < ref.size() && is_ws(ref[real_begin])) { ++real_begin; }\n        size_t real_end = ref.size();\n        while (real_end > real_begin && is_ws(ref[real_end - 1])) { --real_end; }\n\n        return ref.substr(real_begin, real_end - real_begin);\n    }\n\n    bool replaceInPlace( std::string& str, std::string const& replaceThis, std::string const& withThis ) {\n        bool replaced = false;\n        std::size_t i = str.find( replaceThis );\n        while( i != std::string::npos ) {\n            replaced = true;\n            str = str.substr( 0, i ) + withThis + str.substr( i+replaceThis.size() );\n            if( i < str.size()-withThis.size() )\n                i = str.find( replaceThis, i+withThis.size() );\n            else\n                i = std::string::npos;\n        }\n        return replaced;\n    }\n\n    std::vector<StringRef> splitStringRef( StringRef str, char delimiter ) {\n        std::vector<StringRef> subStrings;\n        std::size_t start = 0;\n        for(std::size_t pos = 0; pos < str.size(); ++pos ) {\n            if( str[pos] == delimiter ) {\n                if( pos - start > 1 )\n                    subStrings.push_back( str.substr( start, pos-start ) );\n                start = pos+1;\n            }\n        }\n        if( start < str.size() )\n            subStrings.push_back( str.substr( start, str.size()-start ) );\n        return subStrings;\n    }\n\n    pluralise::pluralise( std::size_t count, std::string const& label )\n    :   m_count( count ),\n        m_label( label )\n    {}\n\n    std::ostream& operator << ( std::ostream& os, pluralise const& pluraliser ) {\n        os << pluraliser.m_count << ' ' << pluraliser.m_label;\n        if( pluraliser.m_count != 1 )\n            os << 's';\n        return os;\n    }\n\n}\n// end catch_string_manip.cpp\n// start catch_stringref.cpp\n\n#include <algorithm>\n#include <ostream>\n#include <cstring>\n#include <cstdint>\n\nnamespace Catch {\n    StringRef::StringRef( char const* rawChars ) noexcept\n    : StringRef( rawChars, static_cast<StringRef::size_type>(std::strlen(rawChars) ) )\n    {}\n\n    auto StringRef::c_str() const -> char const* {\n        CATCH_ENFORCE(isNullTerminated(), \"Called StringRef::c_str() on a non-null-terminated instance\");\n        return m_start;\n    }\n    auto StringRef::data() const noexcept -> char const* {\n        return m_start;\n    }\n\n    auto StringRef::substr( size_type start, size_type size ) const noexcept -> StringRef {\n        if (start < m_size) {\n            return StringRef(m_start + start, (std::min)(m_size - start, size));\n        } else {\n            return StringRef();\n        }\n    }\n    auto StringRef::operator == ( StringRef const& other ) const noexcept -> bool {\n        return m_size == other.m_size\n            && (std::memcmp( m_start, other.m_start, m_size ) == 0);\n    }\n\n    auto operator << ( std::ostream& os, StringRef const& str ) -> std::ostream& {\n        return os.write(str.data(), str.size());\n    }\n\n    auto operator+=( std::string& lhs, StringRef const& rhs ) -> std::string& {\n        lhs.append(rhs.data(), rhs.size());\n        return lhs;\n    }\n\n} // namespace Catch\n// end catch_stringref.cpp\n// start catch_tag_alias.cpp\n\nnamespace Catch {\n    TagAlias::TagAlias(std::string const & _tag, SourceLineInfo _lineInfo): tag(_tag), lineInfo(_lineInfo) {}\n}\n// end catch_tag_alias.cpp\n// start catch_tag_alias_autoregistrar.cpp\n\nnamespace Catch {\n\n    RegistrarForTagAliases::RegistrarForTagAliases(char const* alias, char const* tag, SourceLineInfo const& lineInfo) {\n        CATCH_TRY {\n            getMutableRegistryHub().registerTagAlias(alias, tag, lineInfo);\n        } CATCH_CATCH_ALL {\n            // Do not throw when constructing global objects, instead register the exception to be processed later\n            getMutableRegistryHub().registerStartupException();\n        }\n    }\n\n}\n// end catch_tag_alias_autoregistrar.cpp\n// start catch_tag_alias_registry.cpp\n\n#include <sstream>\n\nnamespace Catch {\n\n    TagAliasRegistry::~TagAliasRegistry() {}\n\n    TagAlias const* TagAliasRegistry::find( std::string const& alias ) const {\n        auto it = m_registry.find( alias );\n        if( it != m_registry.end() )\n            return &(it->second);\n        else\n            return nullptr;\n    }\n\n    std::string TagAliasRegistry::expandAliases( std::string const& unexpandedTestSpec ) const {\n        std::string expandedTestSpec = unexpandedTestSpec;\n        for( auto const& registryKvp : m_registry ) {\n            std::size_t pos = expandedTestSpec.find( registryKvp.first );\n            if( pos != std::string::npos ) {\n                expandedTestSpec =  expandedTestSpec.substr( 0, pos ) +\n                                    registryKvp.second.tag +\n                                    expandedTestSpec.substr( pos + registryKvp.first.size() );\n            }\n        }\n        return expandedTestSpec;\n    }\n\n    void TagAliasRegistry::add( std::string const& alias, std::string const& tag, SourceLineInfo const& lineInfo ) {\n        CATCH_ENFORCE( startsWith(alias, \"[@\") && endsWith(alias, ']'),\n                      \"error: tag alias, '\" << alias << \"' is not of the form [@alias name].\\n\" << lineInfo );\n\n        CATCH_ENFORCE( m_registry.insert(std::make_pair(alias, TagAlias(tag, lineInfo))).second,\n                      \"error: tag alias, '\" << alias << \"' already registered.\\n\"\n                      << \"\\tFirst seen at: \" << find(alias)->lineInfo << \"\\n\"\n                      << \"\\tRedefined at: \" << lineInfo );\n    }\n\n    ITagAliasRegistry::~ITagAliasRegistry() {}\n\n    ITagAliasRegistry const& ITagAliasRegistry::get() {\n        return getRegistryHub().getTagAliasRegistry();\n    }\n\n} // end namespace Catch\n// end catch_tag_alias_registry.cpp\n// start catch_test_case_info.cpp\n\n#include <cctype>\n#include <exception>\n#include <algorithm>\n#include <sstream>\n\nnamespace Catch {\n\n    namespace {\n        TestCaseInfo::SpecialProperties parseSpecialTag( std::string const& tag ) {\n            if( startsWith( tag, '.' ) ||\n                tag == \"!hide\" )\n                return TestCaseInfo::IsHidden;\n            else if( tag == \"!throws\" )\n                return TestCaseInfo::Throws;\n            else if( tag == \"!shouldfail\" )\n                return TestCaseInfo::ShouldFail;\n            else if( tag == \"!mayfail\" )\n                return TestCaseInfo::MayFail;\n            else if( tag == \"!nonportable\" )\n                return TestCaseInfo::NonPortable;\n            else if( tag == \"!benchmark\" )\n                return static_cast<TestCaseInfo::SpecialProperties>( TestCaseInfo::Benchmark | TestCaseInfo::IsHidden );\n            else\n                return TestCaseInfo::None;\n        }\n        bool isReservedTag( std::string const& tag ) {\n            return parseSpecialTag( tag ) == TestCaseInfo::None && tag.size() > 0 && !std::isalnum( static_cast<unsigned char>(tag[0]) );\n        }\n        void enforceNotReservedTag( std::string const& tag, SourceLineInfo const& _lineInfo ) {\n            CATCH_ENFORCE( !isReservedTag(tag),\n                          \"Tag name: [\" << tag << \"] is not allowed.\\n\"\n                          << \"Tag names starting with non alphanumeric characters are reserved\\n\"\n                          << _lineInfo );\n        }\n    }\n\n    TestCase makeTestCase(  ITestInvoker* _testCase,\n                            std::string const& _className,\n                            NameAndTags const& nameAndTags,\n                            SourceLineInfo const& _lineInfo )\n    {\n        bool isHidden = false;\n\n        // Parse out tags\n        std::vector<std::string> tags;\n        std::string desc, tag;\n        bool inTag = false;\n        for (char c : nameAndTags.tags) {\n            if( !inTag ) {\n                if( c == '[' )\n                    inTag = true;\n                else\n                    desc += c;\n            }\n            else {\n                if( c == ']' ) {\n                    TestCaseInfo::SpecialProperties prop = parseSpecialTag( tag );\n                    if( ( prop & TestCaseInfo::IsHidden ) != 0 )\n                        isHidden = true;\n                    else if( prop == TestCaseInfo::None )\n                        enforceNotReservedTag( tag, _lineInfo );\n\n                    // Merged hide tags like `[.approvals]` should be added as\n                    // `[.][approvals]`. The `[.]` is added at later point, so\n                    // we only strip the prefix\n                    if (startsWith(tag, '.') && tag.size() > 1) {\n                        tag.erase(0, 1);\n                    }\n                    tags.push_back( tag );\n                    tag.clear();\n                    inTag = false;\n                }\n                else\n                    tag += c;\n            }\n        }\n        if( isHidden ) {\n            // Add all \"hidden\" tags to make them behave identically\n            tags.insert( tags.end(), { \".\", \"!hide\" } );\n        }\n\n        TestCaseInfo info( static_cast<std::string>(nameAndTags.name), _className, desc, tags, _lineInfo );\n        return TestCase( _testCase, std::move(info) );\n    }\n\n    void setTags( TestCaseInfo& testCaseInfo, std::vector<std::string> tags ) {\n        std::sort(begin(tags), end(tags));\n        tags.erase(std::unique(begin(tags), end(tags)), end(tags));\n        testCaseInfo.lcaseTags.clear();\n\n        for( auto const& tag : tags ) {\n            std::string lcaseTag = toLower( tag );\n            testCaseInfo.properties = static_cast<TestCaseInfo::SpecialProperties>( testCaseInfo.properties | parseSpecialTag( lcaseTag ) );\n            testCaseInfo.lcaseTags.push_back( lcaseTag );\n        }\n        testCaseInfo.tags = std::move(tags);\n    }\n\n    TestCaseInfo::TestCaseInfo( std::string const& _name,\n                                std::string const& _className,\n                                std::string const& _description,\n                                std::vector<std::string> const& _tags,\n                                SourceLineInfo const& _lineInfo )\n    :   name( _name ),\n        className( _className ),\n        description( _description ),\n        lineInfo( _lineInfo ),\n        properties( None )\n    {\n        setTags( *this, _tags );\n    }\n\n    bool TestCaseInfo::isHidden() const {\n        return ( properties & IsHidden ) != 0;\n    }\n    bool TestCaseInfo::throws() const {\n        return ( properties & Throws ) != 0;\n    }\n    bool TestCaseInfo::okToFail() const {\n        return ( properties & (ShouldFail | MayFail ) ) != 0;\n    }\n    bool TestCaseInfo::expectedToFail() const {\n        return ( properties & (ShouldFail ) ) != 0;\n    }\n\n    std::string TestCaseInfo::tagsAsString() const {\n        std::string ret;\n        // '[' and ']' per tag\n        std::size_t full_size = 2 * tags.size();\n        for (const auto& tag : tags) {\n            full_size += tag.size();\n        }\n        ret.reserve(full_size);\n        for (const auto& tag : tags) {\n            ret.push_back('[');\n            ret.append(tag);\n            ret.push_back(']');\n        }\n\n        return ret;\n    }\n\n    TestCase::TestCase( ITestInvoker* testCase, TestCaseInfo&& info ) : TestCaseInfo( std::move(info) ), test( testCase ) {}\n\n    TestCase TestCase::withName( std::string const& _newName ) const {\n        TestCase other( *this );\n        other.name = _newName;\n        return other;\n    }\n\n    void TestCase::invoke() const {\n        test->invoke();\n    }\n\n    bool TestCase::operator == ( TestCase const& other ) const {\n        return  test.get() == other.test.get() &&\n                name == other.name &&\n                className == other.className;\n    }\n\n    bool TestCase::operator < ( TestCase const& other ) const {\n        return name < other.name;\n    }\n\n    TestCaseInfo const& TestCase::getTestCaseInfo() const\n    {\n        return *this;\n    }\n\n} // end namespace Catch\n// end catch_test_case_info.cpp\n// start catch_test_case_registry_impl.cpp\n\n#include <algorithm>\n#include <sstream>\n\nnamespace Catch {\n\n    namespace {\n        struct TestHasher {\n            using hash_t = uint64_t;\n\n            explicit TestHasher( hash_t hashSuffix ):\n                m_hashSuffix{ hashSuffix } {}\n\n            uint32_t operator()( TestCase const& t ) const {\n                // FNV-1a hash with multiplication fold.\n                const hash_t prime = 1099511628211u;\n                hash_t hash = 14695981039346656037u;\n                for ( const char c : t.name ) {\n                    hash ^= c;\n                    hash *= prime;\n                }\n                hash ^= m_hashSuffix;\n                hash *= prime;\n                const uint32_t low{ static_cast<uint32_t>( hash ) };\n                const uint32_t high{ static_cast<uint32_t>( hash >> 32 ) };\n                return low * high;\n            }\n\n        private:\n            hash_t m_hashSuffix;\n        };\n    } // end unnamed namespace\n\n    std::vector<TestCase> sortTests( IConfig const& config, std::vector<TestCase> const& unsortedTestCases ) {\n        switch( config.runOrder() ) {\n            case RunTests::InDeclarationOrder:\n                // already in declaration order\n                break;\n\n            case RunTests::InLexicographicalOrder: {\n                std::vector<TestCase> sorted = unsortedTestCases;\n                std::sort( sorted.begin(), sorted.end() );\n                return sorted;\n            }\n\n            case RunTests::InRandomOrder: {\n                seedRng( config );\n                TestHasher h{ config.rngSeed() };\n\n                using hashedTest = std::pair<TestHasher::hash_t, TestCase const*>;\n                std::vector<hashedTest> indexed_tests;\n                indexed_tests.reserve( unsortedTestCases.size() );\n\n                for (auto const& testCase : unsortedTestCases) {\n                    indexed_tests.emplace_back(h(testCase), &testCase);\n                }\n\n                std::sort(indexed_tests.begin(), indexed_tests.end(),\n                          [](hashedTest const& lhs, hashedTest const& rhs) {\n                          if (lhs.first == rhs.first) {\n                              return lhs.second->name < rhs.second->name;\n                          }\n                          return lhs.first < rhs.first;\n                });\n\n                std::vector<TestCase> sorted;\n                sorted.reserve( indexed_tests.size() );\n\n                for (auto const& hashed : indexed_tests) {\n                    sorted.emplace_back(*hashed.second);\n                }\n\n                return sorted;\n            }\n        }\n        return unsortedTestCases;\n    }\n\n    bool isThrowSafe( TestCase const& testCase, IConfig const& config ) {\n        return !testCase.throws() || config.allowThrows();\n    }\n\n    bool matchTest( TestCase const& testCase, TestSpec const& testSpec, IConfig const& config ) {\n        return testSpec.matches( testCase ) && isThrowSafe( testCase, config );\n    }\n\n    void enforceNoDuplicateTestCases( std::vector<TestCase> const& functions ) {\n        std::set<TestCase> seenFunctions;\n        for( auto const& function : functions ) {\n            auto prev = seenFunctions.insert( function );\n            CATCH_ENFORCE( prev.second,\n                    \"error: TEST_CASE( \\\"\" << function.name << \"\\\" ) already defined.\\n\"\n                    << \"\\tFirst seen at \" << prev.first->getTestCaseInfo().lineInfo << \"\\n\"\n                    << \"\\tRedefined at \" << function.getTestCaseInfo().lineInfo );\n        }\n    }\n\n    std::vector<TestCase> filterTests( std::vector<TestCase> const& testCases, TestSpec const& testSpec, IConfig const& config ) {\n        std::vector<TestCase> filtered;\n        filtered.reserve( testCases.size() );\n        for (auto const& testCase : testCases) {\n            if ((!testSpec.hasFilters() && !testCase.isHidden()) ||\n                (testSpec.hasFilters() && matchTest(testCase, testSpec, config))) {\n                filtered.push_back(testCase);\n            }\n        }\n        return filtered;\n    }\n    std::vector<TestCase> const& getAllTestCasesSorted( IConfig const& config ) {\n        return getRegistryHub().getTestCaseRegistry().getAllTestsSorted( config );\n    }\n\n    void TestRegistry::registerTest( TestCase const& testCase ) {\n        std::string name = testCase.getTestCaseInfo().name;\n        if( name.empty() ) {\n            ReusableStringStream rss;\n            rss << \"Anonymous test case \" << ++m_unnamedCount;\n            return registerTest( testCase.withName( rss.str() ) );\n        }\n        m_functions.push_back( testCase );\n    }\n\n    std::vector<TestCase> const& TestRegistry::getAllTests() const {\n        return m_functions;\n    }\n    std::vector<TestCase> const& TestRegistry::getAllTestsSorted( IConfig const& config ) const {\n        if( m_sortedFunctions.empty() )\n            enforceNoDuplicateTestCases( m_functions );\n\n        if(  m_currentSortOrder != config.runOrder() || m_sortedFunctions.empty() ) {\n            m_sortedFunctions = sortTests( config, m_functions );\n            m_currentSortOrder = config.runOrder();\n        }\n        return m_sortedFunctions;\n    }\n\n    ///////////////////////////////////////////////////////////////////////////\n    TestInvokerAsFunction::TestInvokerAsFunction( void(*testAsFunction)() ) noexcept : m_testAsFunction( testAsFunction ) {}\n\n    void TestInvokerAsFunction::invoke() const {\n        m_testAsFunction();\n    }\n\n    std::string extractClassName( StringRef const& classOrQualifiedMethodName ) {\n        std::string className(classOrQualifiedMethodName);\n        if( startsWith( className, '&' ) )\n        {\n            std::size_t lastColons = className.rfind( \"::\" );\n            std::size_t penultimateColons = className.rfind( \"::\", lastColons-1 );\n            if( penultimateColons == std::string::npos )\n                penultimateColons = 1;\n            className = className.substr( penultimateColons, lastColons-penultimateColons );\n        }\n        return className;\n    }\n\n} // end namespace Catch\n// end catch_test_case_registry_impl.cpp\n// start catch_test_case_tracker.cpp\n\n#include <algorithm>\n#include <cassert>\n#include <stdexcept>\n#include <memory>\n#include <sstream>\n\n#if defined(__clang__)\n#    pragma clang diagnostic push\n#    pragma clang diagnostic ignored \"-Wexit-time-destructors\"\n#endif\n\nnamespace Catch {\nnamespace TestCaseTracking {\n\n    NameAndLocation::NameAndLocation( std::string const& _name, SourceLineInfo const& _location )\n    :   name( _name ),\n        location( _location )\n    {}\n\n    ITracker::~ITracker() = default;\n\n    ITracker& TrackerContext::startRun() {\n        m_rootTracker = std::make_shared<SectionTracker>( NameAndLocation( \"{root}\", CATCH_INTERNAL_LINEINFO ), *this, nullptr );\n        m_currentTracker = nullptr;\n        m_runState = Executing;\n        return *m_rootTracker;\n    }\n\n    void TrackerContext::endRun() {\n        m_rootTracker.reset();\n        m_currentTracker = nullptr;\n        m_runState = NotStarted;\n    }\n\n    void TrackerContext::startCycle() {\n        m_currentTracker = m_rootTracker.get();\n        m_runState = Executing;\n    }\n    void TrackerContext::completeCycle() {\n        m_runState = CompletedCycle;\n    }\n\n    bool TrackerContext::completedCycle() const {\n        return m_runState == CompletedCycle;\n    }\n    ITracker& TrackerContext::currentTracker() {\n        return *m_currentTracker;\n    }\n    void TrackerContext::setCurrentTracker( ITracker* tracker ) {\n        m_currentTracker = tracker;\n    }\n\n    TrackerBase::TrackerBase( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent ):\n        ITracker(nameAndLocation),\n        m_ctx( ctx ),\n        m_parent( parent )\n    {}\n\n    bool TrackerBase::isComplete() const {\n        return m_runState == CompletedSuccessfully || m_runState == Failed;\n    }\n    bool TrackerBase::isSuccessfullyCompleted() const {\n        return m_runState == CompletedSuccessfully;\n    }\n    bool TrackerBase::isOpen() const {\n        return m_runState != NotStarted && !isComplete();\n    }\n    bool TrackerBase::hasChildren() const {\n        return !m_children.empty();\n    }\n\n    void TrackerBase::addChild( ITrackerPtr const& child ) {\n        m_children.push_back( child );\n    }\n\n    ITrackerPtr TrackerBase::findChild( NameAndLocation const& nameAndLocation ) {\n        auto it = std::find_if( m_children.begin(), m_children.end(),\n            [&nameAndLocation]( ITrackerPtr const& tracker ){\n                return\n                    tracker->nameAndLocation().location == nameAndLocation.location &&\n                    tracker->nameAndLocation().name == nameAndLocation.name;\n            } );\n        return( it != m_children.end() )\n            ? *it\n            : nullptr;\n    }\n    ITracker& TrackerBase::parent() {\n        assert( m_parent ); // Should always be non-null except for root\n        return *m_parent;\n    }\n\n    void TrackerBase::openChild() {\n        if( m_runState != ExecutingChildren ) {\n            m_runState = ExecutingChildren;\n            if( m_parent )\n                m_parent->openChild();\n        }\n    }\n\n    bool TrackerBase::isSectionTracker() const { return false; }\n    bool TrackerBase::isGeneratorTracker() const { return false; }\n\n    void TrackerBase::open() {\n        m_runState = Executing;\n        moveToThis();\n        if( m_parent )\n            m_parent->openChild();\n    }\n\n    void TrackerBase::close() {\n\n        // Close any still open children (e.g. generators)\n        while( &m_ctx.currentTracker() != this )\n            m_ctx.currentTracker().close();\n\n        switch( m_runState ) {\n            case NeedsAnotherRun:\n                break;\n\n            case Executing:\n                m_runState = CompletedSuccessfully;\n                break;\n            case ExecutingChildren:\n                if( std::all_of(m_children.begin(), m_children.end(), [](ITrackerPtr const& t){ return t->isComplete(); }) )\n                    m_runState = CompletedSuccessfully;\n                break;\n\n            case NotStarted:\n            case CompletedSuccessfully:\n            case Failed:\n                CATCH_INTERNAL_ERROR( \"Illogical state: \" << m_runState );\n\n            default:\n                CATCH_INTERNAL_ERROR( \"Unknown state: \" << m_runState );\n        }\n        moveToParent();\n        m_ctx.completeCycle();\n    }\n    void TrackerBase::fail() {\n        m_runState = Failed;\n        if( m_parent )\n            m_parent->markAsNeedingAnotherRun();\n        moveToParent();\n        m_ctx.completeCycle();\n    }\n    void TrackerBase::markAsNeedingAnotherRun() {\n        m_runState = NeedsAnotherRun;\n    }\n\n    void TrackerBase::moveToParent() {\n        assert( m_parent );\n        m_ctx.setCurrentTracker( m_parent );\n    }\n    void TrackerBase::moveToThis() {\n        m_ctx.setCurrentTracker( this );\n    }\n\n    SectionTracker::SectionTracker( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent )\n    :   TrackerBase( nameAndLocation, ctx, parent ),\n        m_trimmed_name(trim(nameAndLocation.name))\n    {\n        if( parent ) {\n            while( !parent->isSectionTracker() )\n                parent = &parent->parent();\n\n            SectionTracker& parentSection = static_cast<SectionTracker&>( *parent );\n            addNextFilters( parentSection.m_filters );\n        }\n    }\n\n    bool SectionTracker::isComplete() const {\n        bool complete = true;\n\n        if (m_filters.empty()\n            || m_filters[0] == \"\"\n            || std::find(m_filters.begin(), m_filters.end(), m_trimmed_name) != m_filters.end()) {\n            complete = TrackerBase::isComplete();\n        }\n        return complete;\n    }\n\n    bool SectionTracker::isSectionTracker() const { return true; }\n\n    SectionTracker& SectionTracker::acquire( TrackerContext& ctx, NameAndLocation const& nameAndLocation ) {\n        std::shared_ptr<SectionTracker> section;\n\n        ITracker& currentTracker = ctx.currentTracker();\n        if( ITrackerPtr childTracker = currentTracker.findChild( nameAndLocation ) ) {\n            assert( childTracker );\n            assert( childTracker->isSectionTracker() );\n            section = std::static_pointer_cast<SectionTracker>( childTracker );\n        }\n        else {\n            section = std::make_shared<SectionTracker>( nameAndLocation, ctx, &currentTracker );\n            currentTracker.addChild( section );\n        }\n        if( !ctx.completedCycle() )\n            section->tryOpen();\n        return *section;\n    }\n\n    void SectionTracker::tryOpen() {\n        if( !isComplete() )\n            open();\n    }\n\n    void SectionTracker::addInitialFilters( std::vector<std::string> const& filters ) {\n        if( !filters.empty() ) {\n            m_filters.reserve( m_filters.size() + filters.size() + 2 );\n            m_filters.emplace_back(\"\"); // Root - should never be consulted\n            m_filters.emplace_back(\"\"); // Test Case - not a section filter\n            m_filters.insert( m_filters.end(), filters.begin(), filters.end() );\n        }\n    }\n    void SectionTracker::addNextFilters( std::vector<std::string> const& filters ) {\n        if( filters.size() > 1 )\n            m_filters.insert( m_filters.end(), filters.begin()+1, filters.end() );\n    }\n\n    std::vector<std::string> const& SectionTracker::getFilters() const {\n        return m_filters;\n    }\n\n    std::string const& SectionTracker::trimmedName() const {\n        return m_trimmed_name;\n    }\n\n} // namespace TestCaseTracking\n\nusing TestCaseTracking::ITracker;\nusing TestCaseTracking::TrackerContext;\nusing TestCaseTracking::SectionTracker;\n\n} // namespace Catch\n\n#if defined(__clang__)\n#    pragma clang diagnostic pop\n#endif\n// end catch_test_case_tracker.cpp\n// start catch_test_registry.cpp\n\nnamespace Catch {\n\n    auto makeTestInvoker( void(*testAsFunction)() ) noexcept -> ITestInvoker* {\n        return new(std::nothrow) TestInvokerAsFunction( testAsFunction );\n    }\n\n    NameAndTags::NameAndTags( StringRef const& name_ , StringRef const& tags_ ) noexcept : name( name_ ), tags( tags_ ) {}\n\n    AutoReg::AutoReg( ITestInvoker* invoker, SourceLineInfo const& lineInfo, StringRef const& classOrMethod, NameAndTags const& nameAndTags ) noexcept {\n        CATCH_TRY {\n            getMutableRegistryHub()\n                    .registerTest(\n                        makeTestCase(\n                            invoker,\n                            extractClassName( classOrMethod ),\n                            nameAndTags,\n                            lineInfo));\n        } CATCH_CATCH_ALL {\n            // Do not throw when constructing global objects, instead register the exception to be processed later\n            getMutableRegistryHub().registerStartupException();\n        }\n    }\n\n    AutoReg::~AutoReg() = default;\n}\n// end catch_test_registry.cpp\n// start catch_test_spec.cpp\n\n#include <algorithm>\n#include <string>\n#include <vector>\n#include <memory>\n\nnamespace Catch {\n\n    TestSpec::Pattern::Pattern( std::string const& name )\n    : m_name( name )\n    {}\n\n    TestSpec::Pattern::~Pattern() = default;\n\n    std::string const& TestSpec::Pattern::name() const {\n        return m_name;\n    }\n\n    TestSpec::NamePattern::NamePattern( std::string const& name, std::string const& filterString )\n    : Pattern( filterString )\n    , m_wildcardPattern( toLower( name ), CaseSensitive::No )\n    {}\n\n    bool TestSpec::NamePattern::matches( TestCaseInfo const& testCase ) const {\n        return m_wildcardPattern.matches( testCase.name );\n    }\n\n    TestSpec::TagPattern::TagPattern( std::string const& tag, std::string const& filterString )\n    : Pattern( filterString )\n    , m_tag( toLower( tag ) )\n    {}\n\n    bool TestSpec::TagPattern::matches( TestCaseInfo const& testCase ) const {\n        return std::find(begin(testCase.lcaseTags),\n                         end(testCase.lcaseTags),\n                         m_tag) != end(testCase.lcaseTags);\n    }\n\n    TestSpec::ExcludedPattern::ExcludedPattern( PatternPtr const& underlyingPattern )\n    : Pattern( underlyingPattern->name() )\n    , m_underlyingPattern( underlyingPattern )\n    {}\n\n    bool TestSpec::ExcludedPattern::matches( TestCaseInfo const& testCase ) const {\n        return !m_underlyingPattern->matches( testCase );\n    }\n\n    bool TestSpec::Filter::matches( TestCaseInfo const& testCase ) const {\n        return std::all_of( m_patterns.begin(), m_patterns.end(), [&]( PatternPtr const& p ){ return p->matches( testCase ); } );\n    }\n\n    std::string TestSpec::Filter::name() const {\n        std::string name;\n        for( auto const& p : m_patterns )\n            name += p->name();\n        return name;\n    }\n\n    bool TestSpec::hasFilters() const {\n        return !m_filters.empty();\n    }\n\n    bool TestSpec::matches( TestCaseInfo const& testCase ) const {\n        return std::any_of( m_filters.begin(), m_filters.end(), [&]( Filter const& f ){ return f.matches( testCase ); } );\n    }\n\n    TestSpec::Matches TestSpec::matchesByFilter( std::vector<TestCase> const& testCases, IConfig const& config ) const\n    {\n        Matches matches( m_filters.size() );\n        std::transform( m_filters.begin(), m_filters.end(), matches.begin(), [&]( Filter const& filter ){\n            std::vector<TestCase const*> currentMatches;\n            for( auto const& test : testCases )\n                if( isThrowSafe( test, config ) && filter.matches( test ) )\n                    currentMatches.emplace_back( &test );\n            return FilterMatch{ filter.name(), currentMatches };\n        } );\n        return matches;\n    }\n\n    const TestSpec::vectorStrings& TestSpec::getInvalidArgs() const{\n        return  (m_invalidArgs);\n    }\n\n}\n// end catch_test_spec.cpp\n// start catch_test_spec_parser.cpp\n\nnamespace Catch {\n\n    TestSpecParser::TestSpecParser( ITagAliasRegistry const& tagAliases ) : m_tagAliases( &tagAliases ) {}\n\n    TestSpecParser& TestSpecParser::parse( std::string const& arg ) {\n        m_mode = None;\n        m_exclusion = false;\n        m_arg = m_tagAliases->expandAliases( arg );\n        m_escapeChars.clear();\n        m_substring.reserve(m_arg.size());\n        m_patternName.reserve(m_arg.size());\n        m_realPatternPos = 0;\n\n        for( m_pos = 0; m_pos < m_arg.size(); ++m_pos )\n          //if visitChar fails\n           if( !visitChar( m_arg[m_pos] ) ){\n               m_testSpec.m_invalidArgs.push_back(arg);\n               break;\n           }\n        endMode();\n        return *this;\n    }\n    TestSpec TestSpecParser::testSpec() {\n        addFilter();\n        return m_testSpec;\n    }\n    bool TestSpecParser::visitChar( char c ) {\n        if( (m_mode != EscapedName) && (c == '\\\\') ) {\n            escape();\n            addCharToPattern(c);\n            return true;\n        }else if((m_mode != EscapedName) && (c == ',') )  {\n            return separate();\n        }\n\n        switch( m_mode ) {\n        case None:\n            if( processNoneChar( c ) )\n                return true;\n            break;\n        case Name:\n            processNameChar( c );\n            break;\n        case EscapedName:\n            endMode();\n            addCharToPattern(c);\n            return true;\n        default:\n        case Tag:\n        case QuotedName:\n            if( processOtherChar( c ) )\n                return true;\n            break;\n        }\n\n        m_substring += c;\n        if( !isControlChar( c ) ) {\n            m_patternName += c;\n            m_realPatternPos++;\n        }\n        return true;\n    }\n    // Two of the processing methods return true to signal the caller to return\n    // without adding the given character to the current pattern strings\n    bool TestSpecParser::processNoneChar( char c ) {\n        switch( c ) {\n        case ' ':\n            return true;\n        case '~':\n            m_exclusion = true;\n            return false;\n        case '[':\n            startNewMode( Tag );\n            return false;\n        case '\"':\n            startNewMode( QuotedName );\n            return false;\n        default:\n            startNewMode( Name );\n            return false;\n        }\n    }\n    void TestSpecParser::processNameChar( char c ) {\n        if( c == '[' ) {\n            if( m_substring == \"exclude:\" )\n                m_exclusion = true;\n            else\n                endMode();\n            startNewMode( Tag );\n        }\n    }\n    bool TestSpecParser::processOtherChar( char c ) {\n        if( !isControlChar( c ) )\n            return false;\n        m_substring += c;\n        endMode();\n        return true;\n    }\n    void TestSpecParser::startNewMode( Mode mode ) {\n        m_mode = mode;\n    }\n    void TestSpecParser::endMode() {\n        switch( m_mode ) {\n        case Name:\n        case QuotedName:\n            return addNamePattern();\n        case Tag:\n            return addTagPattern();\n        case EscapedName:\n            revertBackToLastMode();\n            return;\n        case None:\n        default:\n            return startNewMode( None );\n        }\n    }\n    void TestSpecParser::escape() {\n        saveLastMode();\n        m_mode = EscapedName;\n        m_escapeChars.push_back(m_realPatternPos);\n    }\n    bool TestSpecParser::isControlChar( char c ) const {\n        switch( m_mode ) {\n            default:\n                return false;\n            case None:\n                return c == '~';\n            case Name:\n                return c == '[';\n            case EscapedName:\n                return true;\n            case QuotedName:\n                return c == '\"';\n            case Tag:\n                return c == '[' || c == ']';\n        }\n    }\n\n    void TestSpecParser::addFilter() {\n        if( !m_currentFilter.m_patterns.empty() ) {\n            m_testSpec.m_filters.push_back( m_currentFilter );\n            m_currentFilter = TestSpec::Filter();\n        }\n    }\n\n    void TestSpecParser::saveLastMode() {\n      lastMode = m_mode;\n    }\n\n    void TestSpecParser::revertBackToLastMode() {\n      m_mode = lastMode;\n    }\n\n    bool TestSpecParser::separate() {\n      if( (m_mode==QuotedName) || (m_mode==Tag) ){\n         //invalid argument, signal failure to previous scope.\n         m_mode = None;\n         m_pos = m_arg.size();\n         m_substring.clear();\n         m_patternName.clear();\n         m_realPatternPos = 0;\n         return false;\n      }\n      endMode();\n      addFilter();\n      return true; //success\n    }\n\n    std::string TestSpecParser::preprocessPattern() {\n        std::string token = m_patternName;\n        for (std::size_t i = 0; i < m_escapeChars.size(); ++i)\n            token = token.substr(0, m_escapeChars[i] - i) + token.substr(m_escapeChars[i] - i + 1);\n        m_escapeChars.clear();\n        if (startsWith(token, \"exclude:\")) {\n            m_exclusion = true;\n            token = token.substr(8);\n        }\n\n        m_patternName.clear();\n        m_realPatternPos = 0;\n\n        return token;\n    }\n\n    void TestSpecParser::addNamePattern() {\n        auto token = preprocessPattern();\n\n        if (!token.empty()) {\n            TestSpec::PatternPtr pattern = std::make_shared<TestSpec::NamePattern>(token, m_substring);\n            if (m_exclusion)\n                pattern = std::make_shared<TestSpec::ExcludedPattern>(pattern);\n            m_currentFilter.m_patterns.push_back(pattern);\n        }\n        m_substring.clear();\n        m_exclusion = false;\n        m_mode = None;\n    }\n\n    void TestSpecParser::addTagPattern() {\n        auto token = preprocessPattern();\n\n        if (!token.empty()) {\n            // If the tag pattern is the \"hide and tag\" shorthand (e.g. [.foo])\n            // we have to create a separate hide tag and shorten the real one\n            if (token.size() > 1 && token[0] == '.') {\n                token.erase(token.begin());\n                TestSpec::PatternPtr pattern = std::make_shared<TestSpec::TagPattern>(\".\", m_substring);\n                if (m_exclusion) {\n                    pattern = std::make_shared<TestSpec::ExcludedPattern>(pattern);\n                }\n                m_currentFilter.m_patterns.push_back(pattern);\n            }\n\n            TestSpec::PatternPtr pattern = std::make_shared<TestSpec::TagPattern>(token, m_substring);\n\n            if (m_exclusion) {\n                pattern = std::make_shared<TestSpec::ExcludedPattern>(pattern);\n            }\n            m_currentFilter.m_patterns.push_back(pattern);\n        }\n        m_substring.clear();\n        m_exclusion = false;\n        m_mode = None;\n    }\n\n    TestSpec parseTestSpec( std::string const& arg ) {\n        return TestSpecParser( ITagAliasRegistry::get() ).parse( arg ).testSpec();\n    }\n\n} // namespace Catch\n// end catch_test_spec_parser.cpp\n// start catch_timer.cpp\n\n#include <chrono>\n\nstatic const uint64_t nanosecondsInSecond = 1000000000;\n\nnamespace Catch {\n\n    auto getCurrentNanosecondsSinceEpoch() -> uint64_t {\n        return std::chrono::duration_cast<std::chrono::nanoseconds>( std::chrono::high_resolution_clock::now().time_since_epoch() ).count();\n    }\n\n    namespace {\n        auto estimateClockResolution() -> uint64_t {\n            uint64_t sum = 0;\n            static const uint64_t iterations = 1000000;\n\n            auto startTime = getCurrentNanosecondsSinceEpoch();\n\n            for( std::size_t i = 0; i < iterations; ++i ) {\n\n                uint64_t ticks;\n                uint64_t baseTicks = getCurrentNanosecondsSinceEpoch();\n                do {\n                    ticks = getCurrentNanosecondsSinceEpoch();\n                } while( ticks == baseTicks );\n\n                auto delta = ticks - baseTicks;\n                sum += delta;\n\n                // If we have been calibrating for over 3 seconds -- the clock\n                // is terrible and we should move on.\n                // TBD: How to signal that the measured resolution is probably wrong?\n                if (ticks > startTime + 3 * nanosecondsInSecond) {\n                    return sum / ( i + 1u );\n                }\n            }\n\n            // We're just taking the mean, here. To do better we could take the std. dev and exclude outliers\n            // - and potentially do more iterations if there's a high variance.\n            return sum/iterations;\n        }\n    }\n    auto getEstimatedClockResolution() -> uint64_t {\n        static auto s_resolution = estimateClockResolution();\n        return s_resolution;\n    }\n\n    void Timer::start() {\n       m_nanoseconds = getCurrentNanosecondsSinceEpoch();\n    }\n    auto Timer::getElapsedNanoseconds() const -> uint64_t {\n        return getCurrentNanosecondsSinceEpoch() - m_nanoseconds;\n    }\n    auto Timer::getElapsedMicroseconds() const -> uint64_t {\n        return getElapsedNanoseconds()/1000;\n    }\n    auto Timer::getElapsedMilliseconds() const -> unsigned int {\n        return static_cast<unsigned int>(getElapsedMicroseconds()/1000);\n    }\n    auto Timer::getElapsedSeconds() const -> double {\n        return getElapsedMicroseconds()/1000000.0;\n    }\n\n} // namespace Catch\n// end catch_timer.cpp\n// start catch_tostring.cpp\n\n#if defined(__clang__)\n#    pragma clang diagnostic push\n#    pragma clang diagnostic ignored \"-Wexit-time-destructors\"\n#    pragma clang diagnostic ignored \"-Wglobal-constructors\"\n#endif\n\n// Enable specific decls locally\n#if !defined(CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER)\n#define CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER\n#endif\n\n#include <cmath>\n#include <iomanip>\n\nnamespace Catch {\n\nnamespace Detail {\n\n    const std::string unprintableString = \"{?}\";\n\n    namespace {\n        const int hexThreshold = 255;\n\n        struct Endianness {\n            enum Arch { Big, Little };\n\n            static Arch which() {\n                int one = 1;\n                // If the lowest byte we read is non-zero, we can assume\n                // that little endian format is used.\n                auto value = *reinterpret_cast<char*>(&one);\n                return value ? Little : Big;\n            }\n        };\n    }\n\n    std::string rawMemoryToString( const void *object, std::size_t size ) {\n        // Reverse order for little endian architectures\n        int i = 0, end = static_cast<int>( size ), inc = 1;\n        if( Endianness::which() == Endianness::Little ) {\n            i = end-1;\n            end = inc = -1;\n        }\n\n        unsigned char const *bytes = static_cast<unsigned char const *>(object);\n        ReusableStringStream rss;\n        rss << \"0x\" << std::setfill('0') << std::hex;\n        for( ; i != end; i += inc )\n             rss << std::setw(2) << static_cast<unsigned>(bytes[i]);\n       return rss.str();\n    }\n}\n\ntemplate<typename T>\nstd::string fpToString( T value, int precision ) {\n    if (Catch::isnan(value)) {\n        return \"nan\";\n    }\n\n    ReusableStringStream rss;\n    rss << std::setprecision( precision )\n        << std::fixed\n        << value;\n    std::string d = rss.str();\n    std::size_t i = d.find_last_not_of( '0' );\n    if( i != std::string::npos && i != d.size()-1 ) {\n        if( d[i] == '.' )\n            i++;\n        d = d.substr( 0, i+1 );\n    }\n    return d;\n}\n\n//// ======================================================= ////\n//\n//   Out-of-line defs for full specialization of StringMaker\n//\n//// ======================================================= ////\n\nstd::string StringMaker<std::string>::convert(const std::string& str) {\n    if (!getCurrentContext().getConfig()->showInvisibles()) {\n        return '\"' + str + '\"';\n    }\n\n    std::string s(\"\\\"\");\n    for (char c : str) {\n        switch (c) {\n        case '\\n':\n            s.append(\"\\\\n\");\n            break;\n        case '\\t':\n            s.append(\"\\\\t\");\n            break;\n        default:\n            s.push_back(c);\n            break;\n        }\n    }\n    s.append(\"\\\"\");\n    return s;\n}\n\n#ifdef CATCH_CONFIG_CPP17_STRING_VIEW\nstd::string StringMaker<std::string_view>::convert(std::string_view str) {\n    return ::Catch::Detail::stringify(std::string{ str });\n}\n#endif\n\nstd::string StringMaker<char const*>::convert(char const* str) {\n    if (str) {\n        return ::Catch::Detail::stringify(std::string{ str });\n    } else {\n        return{ \"{null string}\" };\n    }\n}\nstd::string StringMaker<char*>::convert(char* str) {\n    if (str) {\n        return ::Catch::Detail::stringify(std::string{ str });\n    } else {\n        return{ \"{null string}\" };\n    }\n}\n\n#ifdef CATCH_CONFIG_WCHAR\nstd::string StringMaker<std::wstring>::convert(const std::wstring& wstr) {\n    std::string s;\n    s.reserve(wstr.size());\n    for (auto c : wstr) {\n        s += (c <= 0xff) ? static_cast<char>(c) : '?';\n    }\n    return ::Catch::Detail::stringify(s);\n}\n\n# ifdef CATCH_CONFIG_CPP17_STRING_VIEW\nstd::string StringMaker<std::wstring_view>::convert(std::wstring_view str) {\n    return StringMaker<std::wstring>::convert(std::wstring(str));\n}\n# endif\n\nstd::string StringMaker<wchar_t const*>::convert(wchar_t const * str) {\n    if (str) {\n        return ::Catch::Detail::stringify(std::wstring{ str });\n    } else {\n        return{ \"{null string}\" };\n    }\n}\nstd::string StringMaker<wchar_t *>::convert(wchar_t * str) {\n    if (str) {\n        return ::Catch::Detail::stringify(std::wstring{ str });\n    } else {\n        return{ \"{null string}\" };\n    }\n}\n#endif\n\n#if defined(CATCH_CONFIG_CPP17_BYTE)\n#include <cstddef>\nstd::string StringMaker<std::byte>::convert(std::byte value) {\n    return ::Catch::Detail::stringify(std::to_integer<unsigned long long>(value));\n}\n#endif // defined(CATCH_CONFIG_CPP17_BYTE)\n\nstd::string StringMaker<int>::convert(int value) {\n    return ::Catch::Detail::stringify(static_cast<long long>(value));\n}\nstd::string StringMaker<long>::convert(long value) {\n    return ::Catch::Detail::stringify(static_cast<long long>(value));\n}\nstd::string StringMaker<long long>::convert(long long value) {\n    ReusableStringStream rss;\n    rss << value;\n    if (value > Detail::hexThreshold) {\n        rss << \" (0x\" << std::hex << value << ')';\n    }\n    return rss.str();\n}\n\nstd::string StringMaker<unsigned int>::convert(unsigned int value) {\n    return ::Catch::Detail::stringify(static_cast<unsigned long long>(value));\n}\nstd::string StringMaker<unsigned long>::convert(unsigned long value) {\n    return ::Catch::Detail::stringify(static_cast<unsigned long long>(value));\n}\nstd::string StringMaker<unsigned long long>::convert(unsigned long long value) {\n    ReusableStringStream rss;\n    rss << value;\n    if (value > Detail::hexThreshold) {\n        rss << \" (0x\" << std::hex << value << ')';\n    }\n    return rss.str();\n}\n\nstd::string StringMaker<bool>::convert(bool b) {\n    return b ? \"true\" : \"false\";\n}\n\nstd::string StringMaker<signed char>::convert(signed char value) {\n    if (value == '\\r') {\n        return \"'\\\\r'\";\n    } else if (value == '\\f') {\n        return \"'\\\\f'\";\n    } else if (value == '\\n') {\n        return \"'\\\\n'\";\n    } else if (value == '\\t') {\n        return \"'\\\\t'\";\n    } else if ('\\0' <= value && value < ' ') {\n        return ::Catch::Detail::stringify(static_cast<unsigned int>(value));\n    } else {\n        char chstr[] = \"' '\";\n        chstr[1] = value;\n        return chstr;\n    }\n}\nstd::string StringMaker<char>::convert(char c) {\n    return ::Catch::Detail::stringify(static_cast<signed char>(c));\n}\nstd::string StringMaker<unsigned char>::convert(unsigned char c) {\n    return ::Catch::Detail::stringify(static_cast<char>(c));\n}\n\nstd::string StringMaker<std::nullptr_t>::convert(std::nullptr_t) {\n    return \"nullptr\";\n}\n\nint StringMaker<float>::precision = 5;\n\nstd::string StringMaker<float>::convert(float value) {\n    return fpToString(value, precision) + 'f';\n}\n\nint StringMaker<double>::precision = 10;\n\nstd::string StringMaker<double>::convert(double value) {\n    return fpToString(value, precision);\n}\n\nstd::string ratio_string<std::atto>::symbol() { return \"a\"; }\nstd::string ratio_string<std::femto>::symbol() { return \"f\"; }\nstd::string ratio_string<std::pico>::symbol() { return \"p\"; }\nstd::string ratio_string<std::nano>::symbol() { return \"n\"; }\nstd::string ratio_string<std::micro>::symbol() { return \"u\"; }\nstd::string ratio_string<std::milli>::symbol() { return \"m\"; }\n\n} // end namespace Catch\n\n#if defined(__clang__)\n#    pragma clang diagnostic pop\n#endif\n\n// end catch_tostring.cpp\n// start catch_totals.cpp\n\nnamespace Catch {\n\n    Counts Counts::operator - ( Counts const& other ) const {\n        Counts diff;\n        diff.passed = passed - other.passed;\n        diff.failed = failed - other.failed;\n        diff.failedButOk = failedButOk - other.failedButOk;\n        return diff;\n    }\n\n    Counts& Counts::operator += ( Counts const& other ) {\n        passed += other.passed;\n        failed += other.failed;\n        failedButOk += other.failedButOk;\n        return *this;\n    }\n\n    std::size_t Counts::total() const {\n        return passed + failed + failedButOk;\n    }\n    bool Counts::allPassed() const {\n        return failed == 0 && failedButOk == 0;\n    }\n    bool Counts::allOk() const {\n        return failed == 0;\n    }\n\n    Totals Totals::operator - ( Totals const& other ) const {\n        Totals diff;\n        diff.assertions = assertions - other.assertions;\n        diff.testCases = testCases - other.testCases;\n        return diff;\n    }\n\n    Totals& Totals::operator += ( Totals const& other ) {\n        assertions += other.assertions;\n        testCases += other.testCases;\n        return *this;\n    }\n\n    Totals Totals::delta( Totals const& prevTotals ) const {\n        Totals diff = *this - prevTotals;\n        if( diff.assertions.failed > 0 )\n            ++diff.testCases.failed;\n        else if( diff.assertions.failedButOk > 0 )\n            ++diff.testCases.failedButOk;\n        else\n            ++diff.testCases.passed;\n        return diff;\n    }\n\n}\n// end catch_totals.cpp\n// start catch_uncaught_exceptions.cpp\n\n// start catch_config_uncaught_exceptions.hpp\n\n//              Copyright Catch2 Authors\n// Distributed under the Boost Software License, Version 1.0.\n//   (See accompanying file LICENSE_1_0.txt or copy at\n//        https://www.boost.org/LICENSE_1_0.txt)\n\n// SPDX-License-Identifier: BSL-1.0\n\n#ifndef CATCH_CONFIG_UNCAUGHT_EXCEPTIONS_HPP\n#define CATCH_CONFIG_UNCAUGHT_EXCEPTIONS_HPP\n\n#if defined(_MSC_VER)\n#  if _MSC_VER >= 1900 // Visual Studio 2015 or newer\n#    define CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS\n#  endif\n#endif\n\n#include <exception>\n\n#if defined(__cpp_lib_uncaught_exceptions) \\\n    && !defined(CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS)\n\n#  define CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS\n#endif // __cpp_lib_uncaught_exceptions\n\n#if defined(CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS) \\\n    && !defined(CATCH_CONFIG_NO_CPP17_UNCAUGHT_EXCEPTIONS) \\\n    && !defined(CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS)\n\n#  define CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS\n#endif\n\n#endif // CATCH_CONFIG_UNCAUGHT_EXCEPTIONS_HPP\n// end catch_config_uncaught_exceptions.hpp\n#include <exception>\n\nnamespace Catch {\n    bool uncaught_exceptions() {\n#if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)\n        return false;\n#elif defined(CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS)\n        return std::uncaught_exceptions() > 0;\n#else\n        return std::uncaught_exception();\n#endif\n  }\n} // end namespace Catch\n// end catch_uncaught_exceptions.cpp\n// start catch_version.cpp\n\n#include <ostream>\n\nnamespace Catch {\n\n    Version::Version\n        (   unsigned int _majorVersion,\n            unsigned int _minorVersion,\n            unsigned int _patchNumber,\n            char const * const _branchName,\n            unsigned int _buildNumber )\n    :   majorVersion( _majorVersion ),\n        minorVersion( _minorVersion ),\n        patchNumber( _patchNumber ),\n        branchName( _branchName ),\n        buildNumber( _buildNumber )\n    {}\n\n    std::ostream& operator << ( std::ostream& os, Version const& version ) {\n        os  << version.majorVersion << '.'\n            << version.minorVersion << '.'\n            << version.patchNumber;\n        // branchName is never null -> 0th char is \\0 if it is empty\n        if (version.branchName[0]) {\n            os << '-' << version.branchName\n               << '.' << version.buildNumber;\n        }\n        return os;\n    }\n\n    Version const& libraryVersion() {\n        static Version version( 2, 13, 10, \"\", 0 );\n        return version;\n    }\n\n}\n// end catch_version.cpp\n// start catch_wildcard_pattern.cpp\n\nnamespace Catch {\n\n    WildcardPattern::WildcardPattern( std::string const& pattern,\n                                      CaseSensitive::Choice caseSensitivity )\n    :   m_caseSensitivity( caseSensitivity ),\n        m_pattern( normaliseString( pattern ) )\n    {\n        if( startsWith( m_pattern, '*' ) ) {\n            m_pattern = m_pattern.substr( 1 );\n            m_wildcard = WildcardAtStart;\n        }\n        if( endsWith( m_pattern, '*' ) ) {\n            m_pattern = m_pattern.substr( 0, m_pattern.size()-1 );\n            m_wildcard = static_cast<WildcardPosition>( m_wildcard | WildcardAtEnd );\n        }\n    }\n\n    bool WildcardPattern::matches( std::string const& str ) const {\n        switch( m_wildcard ) {\n            case NoWildcard:\n                return m_pattern == normaliseString( str );\n            case WildcardAtStart:\n                return endsWith( normaliseString( str ), m_pattern );\n            case WildcardAtEnd:\n                return startsWith( normaliseString( str ), m_pattern );\n            case WildcardAtBothEnds:\n                return contains( normaliseString( str ), m_pattern );\n            default:\n                CATCH_INTERNAL_ERROR( \"Unknown enum\" );\n        }\n    }\n\n    std::string WildcardPattern::normaliseString( std::string const& str ) const {\n        return trim( m_caseSensitivity == CaseSensitive::No ? toLower( str ) : str );\n    }\n}\n// end catch_wildcard_pattern.cpp\n// start catch_xmlwriter.cpp\n\n#include <iomanip>\n#include <type_traits>\n\nnamespace Catch {\n\nnamespace {\n\n    size_t trailingBytes(unsigned char c) {\n        if ((c & 0xE0) == 0xC0) {\n            return 2;\n        }\n        if ((c & 0xF0) == 0xE0) {\n            return 3;\n        }\n        if ((c & 0xF8) == 0xF0) {\n            return 4;\n        }\n        CATCH_INTERNAL_ERROR(\"Invalid multibyte utf-8 start byte encountered\");\n    }\n\n    uint32_t headerValue(unsigned char c) {\n        if ((c & 0xE0) == 0xC0) {\n            return c & 0x1F;\n        }\n        if ((c & 0xF0) == 0xE0) {\n            return c & 0x0F;\n        }\n        if ((c & 0xF8) == 0xF0) {\n            return c & 0x07;\n        }\n        CATCH_INTERNAL_ERROR(\"Invalid multibyte utf-8 start byte encountered\");\n    }\n\n    void hexEscapeChar(std::ostream& os, unsigned char c) {\n        std::ios_base::fmtflags f(os.flags());\n        os << \"\\\\x\"\n            << std::uppercase << std::hex << std::setfill('0') << std::setw(2)\n            << static_cast<int>(c);\n        os.flags(f);\n    }\n\n    bool shouldNewline(XmlFormatting fmt) {\n        return !!(static_cast<std::underlying_type<XmlFormatting>::type>(fmt & XmlFormatting::Newline));\n    }\n\n    bool shouldIndent(XmlFormatting fmt) {\n        return !!(static_cast<std::underlying_type<XmlFormatting>::type>(fmt & XmlFormatting::Indent));\n    }\n\n} // anonymous namespace\n\n    XmlFormatting operator | (XmlFormatting lhs, XmlFormatting rhs) {\n        return static_cast<XmlFormatting>(\n            static_cast<std::underlying_type<XmlFormatting>::type>(lhs) |\n            static_cast<std::underlying_type<XmlFormatting>::type>(rhs)\n        );\n    }\n\n    XmlFormatting operator & (XmlFormatting lhs, XmlFormatting rhs) {\n        return static_cast<XmlFormatting>(\n            static_cast<std::underlying_type<XmlFormatting>::type>(lhs) &\n            static_cast<std::underlying_type<XmlFormatting>::type>(rhs)\n        );\n    }\n\n    XmlEncode::XmlEncode( std::string const& str, ForWhat forWhat )\n    :   m_str( str ),\n        m_forWhat( forWhat )\n    {}\n\n    void XmlEncode::encodeTo( std::ostream& os ) const {\n        // Apostrophe escaping not necessary if we always use \" to write attributes\n        // (see: http://www.w3.org/TR/xml/#syntax)\n\n        for( std::size_t idx = 0; idx < m_str.size(); ++ idx ) {\n            unsigned char c = m_str[idx];\n            switch (c) {\n            case '<':   os << \"&lt;\"; break;\n            case '&':   os << \"&amp;\"; break;\n\n            case '>':\n                // See: http://www.w3.org/TR/xml/#syntax\n                if (idx > 2 && m_str[idx - 1] == ']' && m_str[idx - 2] == ']')\n                    os << \"&gt;\";\n                else\n                    os << c;\n                break;\n\n            case '\\\"':\n                if (m_forWhat == ForAttributes)\n                    os << \"&quot;\";\n                else\n                    os << c;\n                break;\n\n            default:\n                // Check for control characters and invalid utf-8\n\n                // Escape control characters in standard ascii\n                // see http://stackoverflow.com/questions/404107/why-are-control-characters-illegal-in-xml-1-0\n                if (c < 0x09 || (c > 0x0D && c < 0x20) || c == 0x7F) {\n                    hexEscapeChar(os, c);\n                    break;\n                }\n\n                // Plain ASCII: Write it to stream\n                if (c < 0x7F) {\n                    os << c;\n                    break;\n                }\n\n                // UTF-8 territory\n                // Check if the encoding is valid and if it is not, hex escape bytes.\n                // Important: We do not check the exact decoded values for validity, only the encoding format\n                // First check that this bytes is a valid lead byte:\n                // This means that it is not encoded as 1111 1XXX\n                // Or as 10XX XXXX\n                if (c <  0xC0 ||\n                    c >= 0xF8) {\n                    hexEscapeChar(os, c);\n                    break;\n                }\n\n                auto encBytes = trailingBytes(c);\n                // Are there enough bytes left to avoid accessing out-of-bounds memory?\n                if (idx + encBytes - 1 >= m_str.size()) {\n                    hexEscapeChar(os, c);\n                    break;\n                }\n                // The header is valid, check data\n                // The next encBytes bytes must together be a valid utf-8\n                // This means: bitpattern 10XX XXXX and the extracted value is sane (ish)\n                bool valid = true;\n                uint32_t value = headerValue(c);\n                for (std::size_t n = 1; n < encBytes; ++n) {\n                    unsigned char nc = m_str[idx + n];\n                    valid &= ((nc & 0xC0) == 0x80);\n                    value = (value << 6) | (nc & 0x3F);\n                }\n\n                if (\n                    // Wrong bit pattern of following bytes\n                    (!valid) ||\n                    // Overlong encodings\n                    (value < 0x80) ||\n                    (0x80 <= value && value < 0x800   && encBytes > 2) ||\n                    (0x800 < value && value < 0x10000 && encBytes > 3) ||\n                    // Encoded value out of range\n                    (value >= 0x110000)\n                    ) {\n                    hexEscapeChar(os, c);\n                    break;\n                }\n\n                // If we got here, this is in fact a valid(ish) utf-8 sequence\n                for (std::size_t n = 0; n < encBytes; ++n) {\n                    os << m_str[idx + n];\n                }\n                idx += encBytes - 1;\n                break;\n            }\n        }\n    }\n\n    std::ostream& operator << ( std::ostream& os, XmlEncode const& xmlEncode ) {\n        xmlEncode.encodeTo( os );\n        return os;\n    }\n\n    XmlWriter::ScopedElement::ScopedElement( XmlWriter* writer, XmlFormatting fmt )\n    :   m_writer( writer ),\n        m_fmt(fmt)\n    {}\n\n    XmlWriter::ScopedElement::ScopedElement( ScopedElement&& other ) noexcept\n    :   m_writer( other.m_writer ),\n        m_fmt(other.m_fmt)\n    {\n        other.m_writer = nullptr;\n        other.m_fmt = XmlFormatting::None;\n    }\n    XmlWriter::ScopedElement& XmlWriter::ScopedElement::operator=( ScopedElement&& other ) noexcept {\n        if ( m_writer ) {\n            m_writer->endElement();\n        }\n        m_writer = other.m_writer;\n        other.m_writer = nullptr;\n        m_fmt = other.m_fmt;\n        other.m_fmt = XmlFormatting::None;\n        return *this;\n    }\n\n    XmlWriter::ScopedElement::~ScopedElement() {\n        if (m_writer) {\n            m_writer->endElement(m_fmt);\n        }\n    }\n\n    XmlWriter::ScopedElement& XmlWriter::ScopedElement::writeText( std::string const& text, XmlFormatting fmt ) {\n        m_writer->writeText( text, fmt );\n        return *this;\n    }\n\n    XmlWriter::XmlWriter( std::ostream& os ) : m_os( os )\n    {\n        writeDeclaration();\n    }\n\n    XmlWriter::~XmlWriter() {\n        while (!m_tags.empty()) {\n            endElement();\n        }\n        newlineIfNecessary();\n    }\n\n    XmlWriter& XmlWriter::startElement( std::string const& name, XmlFormatting fmt ) {\n        ensureTagClosed();\n        newlineIfNecessary();\n        if (shouldIndent(fmt)) {\n            m_os << m_indent;\n            m_indent += \"  \";\n        }\n        m_os << '<' << name;\n        m_tags.push_back( name );\n        m_tagIsOpen = true;\n        applyFormatting(fmt);\n        return *this;\n    }\n\n    XmlWriter::ScopedElement XmlWriter::scopedElement( std::string const& name, XmlFormatting fmt ) {\n        ScopedElement scoped( this, fmt );\n        startElement( name, fmt );\n        return scoped;\n    }\n\n    XmlWriter& XmlWriter::endElement(XmlFormatting fmt) {\n        m_indent = m_indent.substr(0, m_indent.size() - 2);\n\n        if( m_tagIsOpen ) {\n            m_os << \"/>\";\n            m_tagIsOpen = false;\n        } else {\n            newlineIfNecessary();\n            if (shouldIndent(fmt)) {\n                m_os << m_indent;\n            }\n            m_os << \"</\" << m_tags.back() << \">\";\n        }\n        m_os << std::flush;\n        applyFormatting(fmt);\n        m_tags.pop_back();\n        return *this;\n    }\n\n    XmlWriter& XmlWriter::writeAttribute( std::string const& name, std::string const& attribute ) {\n        if( !name.empty() && !attribute.empty() )\n            m_os << ' ' << name << \"=\\\"\" << XmlEncode( attribute, XmlEncode::ForAttributes ) << '\"';\n        return *this;\n    }\n\n    XmlWriter& XmlWriter::writeAttribute( std::string const& name, bool attribute ) {\n        m_os << ' ' << name << \"=\\\"\" << ( attribute ? \"true\" : \"false\" ) << '\"';\n        return *this;\n    }\n\n    XmlWriter& XmlWriter::writeText( std::string const& text, XmlFormatting fmt) {\n        if( !text.empty() ){\n            bool tagWasOpen = m_tagIsOpen;\n            ensureTagClosed();\n            if (tagWasOpen && shouldIndent(fmt)) {\n                m_os << m_indent;\n            }\n            m_os << XmlEncode( text );\n            applyFormatting(fmt);\n        }\n        return *this;\n    }\n\n    XmlWriter& XmlWriter::writeComment( std::string const& text, XmlFormatting fmt) {\n        ensureTagClosed();\n        if (shouldIndent(fmt)) {\n            m_os << m_indent;\n        }\n        m_os << \"<!--\" << text << \"-->\";\n        applyFormatting(fmt);\n        return *this;\n    }\n\n    void XmlWriter::writeStylesheetRef( std::string const& url ) {\n        m_os << \"<?xml-stylesheet type=\\\"text/xsl\\\" href=\\\"\" << url << \"\\\"?>\\n\";\n    }\n\n    XmlWriter& XmlWriter::writeBlankLine() {\n        ensureTagClosed();\n        m_os << '\\n';\n        return *this;\n    }\n\n    void XmlWriter::ensureTagClosed() {\n        if( m_tagIsOpen ) {\n            m_os << '>' << std::flush;\n            newlineIfNecessary();\n            m_tagIsOpen = false;\n        }\n    }\n\n    void XmlWriter::applyFormatting(XmlFormatting fmt) {\n        m_needsNewline = shouldNewline(fmt);\n    }\n\n    void XmlWriter::writeDeclaration() {\n        m_os << \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\";\n    }\n\n    void XmlWriter::newlineIfNecessary() {\n        if( m_needsNewline ) {\n            m_os << std::endl;\n            m_needsNewline = false;\n        }\n    }\n}\n// end catch_xmlwriter.cpp\n// start catch_reporter_bases.cpp\n\n#include <cstring>\n#include <cfloat>\n#include <cstdio>\n#include <cassert>\n#include <memory>\n\nnamespace Catch {\n    void prepareExpandedExpression(AssertionResult& result) {\n        result.getExpandedExpression();\n    }\n\n    // Because formatting using c++ streams is stateful, drop down to C is required\n    // Alternatively we could use stringstream, but its performance is... not good.\n    std::string getFormattedDuration( double duration ) {\n        // Max exponent + 1 is required to represent the whole part\n        // + 1 for decimal point\n        // + 3 for the 3 decimal places\n        // + 1 for null terminator\n        const std::size_t maxDoubleSize = DBL_MAX_10_EXP + 1 + 1 + 3 + 1;\n        char buffer[maxDoubleSize];\n\n        // Save previous errno, to prevent sprintf from overwriting it\n        ErrnoGuard guard;\n#ifdef _MSC_VER\n        sprintf_s(buffer, \"%.3f\", duration);\n#else\n        std::sprintf(buffer, \"%.3f\", duration);\n#endif\n        return std::string(buffer);\n    }\n\n    bool shouldShowDuration( IConfig const& config, double duration ) {\n        if ( config.showDurations() == ShowDurations::Always ) {\n            return true;\n        }\n        if ( config.showDurations() == ShowDurations::Never ) {\n            return false;\n        }\n        const double min = config.minDuration();\n        return min >= 0 && duration >= min;\n    }\n\n    std::string serializeFilters( std::vector<std::string> const& container ) {\n        ReusableStringStream oss;\n        bool first = true;\n        for (auto&& filter : container)\n        {\n            if (!first)\n                oss << ' ';\n            else\n                first = false;\n\n            oss << filter;\n        }\n        return oss.str();\n    }\n\n    TestEventListenerBase::TestEventListenerBase(ReporterConfig const & _config)\n        :StreamingReporterBase(_config) {}\n\n    std::set<Verbosity> TestEventListenerBase::getSupportedVerbosities() {\n        return { Verbosity::Quiet, Verbosity::Normal, Verbosity::High };\n    }\n\n    void TestEventListenerBase::assertionStarting(AssertionInfo const &) {}\n\n    bool TestEventListenerBase::assertionEnded(AssertionStats const &) {\n        return false;\n    }\n\n} // end namespace Catch\n// end catch_reporter_bases.cpp\n// start catch_reporter_compact.cpp\n\nnamespace {\n\n#ifdef CATCH_PLATFORM_MAC\n    const char* failedString() { return \"FAILED\"; }\n    const char* passedString() { return \"PASSED\"; }\n#else\n    const char* failedString() { return \"failed\"; }\n    const char* passedString() { return \"passed\"; }\n#endif\n\n    // Colour::LightGrey\n    Catch::Colour::Code dimColour() { return Catch::Colour::FileName; }\n\n    std::string bothOrAll( std::size_t count ) {\n        return count == 1 ? std::string() :\n               count == 2 ? \"both \" : \"all \" ;\n    }\n\n} // anon namespace\n\nnamespace Catch {\nnamespace {\n// Colour, message variants:\n// - white: No tests ran.\n// -   red: Failed [both/all] N test cases, failed [both/all] M assertions.\n// - white: Passed [both/all] N test cases (no assertions).\n// -   red: Failed N tests cases, failed M assertions.\n// - green: Passed [both/all] N tests cases with M assertions.\nvoid printTotals(std::ostream& out, const Totals& totals) {\n    if (totals.testCases.total() == 0) {\n        out << \"No tests ran.\";\n    } else if (totals.testCases.failed == totals.testCases.total()) {\n        Colour colour(Colour::ResultError);\n        const std::string qualify_assertions_failed =\n            totals.assertions.failed == totals.assertions.total() ?\n            bothOrAll(totals.assertions.failed) : std::string();\n        out <<\n            \"Failed \" << bothOrAll(totals.testCases.failed)\n            << pluralise(totals.testCases.failed, \"test case\") << \", \"\n            \"failed \" << qualify_assertions_failed <<\n            pluralise(totals.assertions.failed, \"assertion\") << '.';\n    } else if (totals.assertions.total() == 0) {\n        out <<\n            \"Passed \" << bothOrAll(totals.testCases.total())\n            << pluralise(totals.testCases.total(), \"test case\")\n            << \" (no assertions).\";\n    } else if (totals.assertions.failed) {\n        Colour colour(Colour::ResultError);\n        out <<\n            \"Failed \" << pluralise(totals.testCases.failed, \"test case\") << \", \"\n            \"failed \" << pluralise(totals.assertions.failed, \"assertion\") << '.';\n    } else {\n        Colour colour(Colour::ResultSuccess);\n        out <<\n            \"Passed \" << bothOrAll(totals.testCases.passed)\n            << pluralise(totals.testCases.passed, \"test case\") <<\n            \" with \" << pluralise(totals.assertions.passed, \"assertion\") << '.';\n    }\n}\n\n// Implementation of CompactReporter formatting\nclass AssertionPrinter {\npublic:\n    AssertionPrinter& operator= (AssertionPrinter const&) = delete;\n    AssertionPrinter(AssertionPrinter const&) = delete;\n    AssertionPrinter(std::ostream& _stream, AssertionStats const& _stats, bool _printInfoMessages)\n        : stream(_stream)\n        , result(_stats.assertionResult)\n        , messages(_stats.infoMessages)\n        , itMessage(_stats.infoMessages.begin())\n        , printInfoMessages(_printInfoMessages) {}\n\n    void print() {\n        printSourceInfo();\n\n        itMessage = messages.begin();\n\n        switch (result.getResultType()) {\n        case ResultWas::Ok:\n            printResultType(Colour::ResultSuccess, passedString());\n            printOriginalExpression();\n            printReconstructedExpression();\n            if (!result.hasExpression())\n                printRemainingMessages(Colour::None);\n            else\n                printRemainingMessages();\n            break;\n        case ResultWas::ExpressionFailed:\n            if (result.isOk())\n                printResultType(Colour::ResultSuccess, failedString() + std::string(\" - but was ok\"));\n            else\n                printResultType(Colour::Error, failedString());\n            printOriginalExpression();\n            printReconstructedExpression();\n            printRemainingMessages();\n            break;\n        case ResultWas::ThrewException:\n            printResultType(Colour::Error, failedString());\n            printIssue(\"unexpected exception with message:\");\n            printMessage();\n            printExpressionWas();\n            printRemainingMessages();\n            break;\n        case ResultWas::FatalErrorCondition:\n            printResultType(Colour::Error, failedString());\n            printIssue(\"fatal error condition with message:\");\n            printMessage();\n            printExpressionWas();\n            printRemainingMessages();\n            break;\n        case ResultWas::DidntThrowException:\n            printResultType(Colour::Error, failedString());\n            printIssue(\"expected exception, got none\");\n            printExpressionWas();\n            printRemainingMessages();\n            break;\n        case ResultWas::Info:\n            printResultType(Colour::None, \"info\");\n            printMessage();\n            printRemainingMessages();\n            break;\n        case ResultWas::Warning:\n            printResultType(Colour::None, \"warning\");\n            printMessage();\n            printRemainingMessages();\n            break;\n        case ResultWas::ExplicitFailure:\n            printResultType(Colour::Error, failedString());\n            printIssue(\"explicitly\");\n            printRemainingMessages(Colour::None);\n            break;\n            // These cases are here to prevent compiler warnings\n        case ResultWas::Unknown:\n        case ResultWas::FailureBit:\n        case ResultWas::Exception:\n            printResultType(Colour::Error, \"** internal error **\");\n            break;\n        }\n    }\n\nprivate:\n    void printSourceInfo() const {\n        Colour colourGuard(Colour::FileName);\n        stream << result.getSourceInfo() << ':';\n    }\n\n    void printResultType(Colour::Code colour, std::string const& passOrFail) const {\n        if (!passOrFail.empty()) {\n            {\n                Colour colourGuard(colour);\n                stream << ' ' << passOrFail;\n            }\n            stream << ':';\n        }\n    }\n\n    void printIssue(std::string const& issue) const {\n        stream << ' ' << issue;\n    }\n\n    void printExpressionWas() {\n        if (result.hasExpression()) {\n            stream << ';';\n            {\n                Colour colour(dimColour());\n                stream << \" expression was:\";\n            }\n            printOriginalExpression();\n        }\n    }\n\n    void printOriginalExpression() const {\n        if (result.hasExpression()) {\n            stream << ' ' << result.getExpression();\n        }\n    }\n\n    void printReconstructedExpression() const {\n        if (result.hasExpandedExpression()) {\n            {\n                Colour colour(dimColour());\n                stream << \" for: \";\n            }\n            stream << result.getExpandedExpression();\n        }\n    }\n\n    void printMessage() {\n        if (itMessage != messages.end()) {\n            stream << \" '\" << itMessage->message << '\\'';\n            ++itMessage;\n        }\n    }\n\n    void printRemainingMessages(Colour::Code colour = dimColour()) {\n        if (itMessage == messages.end())\n            return;\n\n        const auto itEnd = messages.cend();\n        const auto N = static_cast<std::size_t>(std::distance(itMessage, itEnd));\n\n        {\n            Colour colourGuard(colour);\n            stream << \" with \" << pluralise(N, \"message\") << ':';\n        }\n\n        while (itMessage != itEnd) {\n            // If this assertion is a warning ignore any INFO messages\n            if (printInfoMessages || itMessage->type != ResultWas::Info) {\n                printMessage();\n                if (itMessage != itEnd) {\n                    Colour colourGuard(dimColour());\n                    stream << \" and\";\n                }\n                continue;\n            }\n            ++itMessage;\n        }\n    }\n\nprivate:\n    std::ostream& stream;\n    AssertionResult const& result;\n    std::vector<MessageInfo> messages;\n    std::vector<MessageInfo>::const_iterator itMessage;\n    bool printInfoMessages;\n};\n\n} // anon namespace\n\n        std::string CompactReporter::getDescription() {\n            return \"Reports test results on a single line, suitable for IDEs\";\n        }\n\n        void CompactReporter::noMatchingTestCases( std::string const& spec ) {\n            stream << \"No test cases matched '\" << spec << '\\'' << std::endl;\n        }\n\n        void CompactReporter::assertionStarting( AssertionInfo const& ) {}\n\n        bool CompactReporter::assertionEnded( AssertionStats const& _assertionStats ) {\n            AssertionResult const& result = _assertionStats.assertionResult;\n\n            bool printInfoMessages = true;\n\n            // Drop out if result was successful and we're not printing those\n            if( !m_config->includeSuccessfulResults() && result.isOk() ) {\n                if( result.getResultType() != ResultWas::Warning )\n                    return false;\n                printInfoMessages = false;\n            }\n\n            AssertionPrinter printer( stream, _assertionStats, printInfoMessages );\n            printer.print();\n\n            stream << std::endl;\n            return true;\n        }\n\n        void CompactReporter::sectionEnded(SectionStats const& _sectionStats) {\n            double dur = _sectionStats.durationInSeconds;\n            if ( shouldShowDuration( *m_config, dur ) ) {\n                stream << getFormattedDuration( dur ) << \" s: \" << _sectionStats.sectionInfo.name << std::endl;\n            }\n        }\n\n        void CompactReporter::testRunEnded( TestRunStats const& _testRunStats ) {\n            printTotals( stream, _testRunStats.totals );\n            stream << '\\n' << std::endl;\n            StreamingReporterBase::testRunEnded( _testRunStats );\n        }\n\n        CompactReporter::~CompactReporter() {}\n\n    CATCH_REGISTER_REPORTER( \"compact\", CompactReporter )\n\n} // end namespace Catch\n// end catch_reporter_compact.cpp\n// start catch_reporter_console.cpp\n\n#include <cfloat>\n#include <cstdio>\n\n#if defined(_MSC_VER)\n#pragma warning(push)\n#pragma warning(disable:4061) // Not all labels are EXPLICITLY handled in switch\n // Note that 4062 (not all labels are handled and default is missing) is enabled\n#endif\n\n#if defined(__clang__)\n#  pragma clang diagnostic push\n// For simplicity, benchmarking-only helpers are always enabled\n#  pragma clang diagnostic ignored \"-Wunused-function\"\n#endif\n\nnamespace Catch {\n\nnamespace {\n\n// Formatter impl for ConsoleReporter\nclass ConsoleAssertionPrinter {\npublic:\n    ConsoleAssertionPrinter& operator= (ConsoleAssertionPrinter const&) = delete;\n    ConsoleAssertionPrinter(ConsoleAssertionPrinter const&) = delete;\n    ConsoleAssertionPrinter(std::ostream& _stream, AssertionStats const& _stats, bool _printInfoMessages)\n        : stream(_stream),\n        stats(_stats),\n        result(_stats.assertionResult),\n        colour(Colour::None),\n        message(result.getMessage()),\n        messages(_stats.infoMessages),\n        printInfoMessages(_printInfoMessages) {\n        switch (result.getResultType()) {\n        case ResultWas::Ok:\n            colour = Colour::Success;\n            passOrFail = \"PASSED\";\n            //if( result.hasMessage() )\n            if (_stats.infoMessages.size() == 1)\n                messageLabel = \"with message\";\n            if (_stats.infoMessages.size() > 1)\n                messageLabel = \"with messages\";\n            break;\n        case ResultWas::ExpressionFailed:\n            if (result.isOk()) {\n                colour = Colour::Success;\n                passOrFail = \"FAILED - but was ok\";\n            } else {\n                colour = Colour::Error;\n                passOrFail = \"FAILED\";\n            }\n            if (_stats.infoMessages.size() == 1)\n                messageLabel = \"with message\";\n            if (_stats.infoMessages.size() > 1)\n                messageLabel = \"with messages\";\n            break;\n        case ResultWas::ThrewException:\n            colour = Colour::Error;\n            passOrFail = \"FAILED\";\n            messageLabel = \"due to unexpected exception with \";\n            if (_stats.infoMessages.size() == 1)\n                messageLabel += \"message\";\n            if (_stats.infoMessages.size() > 1)\n                messageLabel += \"messages\";\n            break;\n        case ResultWas::FatalErrorCondition:\n            colour = Colour::Error;\n            passOrFail = \"FAILED\";\n            messageLabel = \"due to a fatal error condition\";\n            break;\n        case ResultWas::DidntThrowException:\n            colour = Colour::Error;\n            passOrFail = \"FAILED\";\n            messageLabel = \"because no exception was thrown where one was expected\";\n            break;\n        case ResultWas::Info:\n            messageLabel = \"info\";\n            break;\n        case ResultWas::Warning:\n            messageLabel = \"warning\";\n            break;\n        case ResultWas::ExplicitFailure:\n            passOrFail = \"FAILED\";\n            colour = Colour::Error;\n            if (_stats.infoMessages.size() == 1)\n                messageLabel = \"explicitly with message\";\n            if (_stats.infoMessages.size() > 1)\n                messageLabel = \"explicitly with messages\";\n            break;\n            // These cases are here to prevent compiler warnings\n        case ResultWas::Unknown:\n        case ResultWas::FailureBit:\n        case ResultWas::Exception:\n            passOrFail = \"** internal error **\";\n            colour = Colour::Error;\n            break;\n        }\n    }\n\n    void print() const {\n        printSourceInfo();\n        if (stats.totals.assertions.total() > 0) {\n            printResultType();\n            printOriginalExpression();\n            printReconstructedExpression();\n        } else {\n            stream << '\\n';\n        }\n        printMessage();\n    }\n\nprivate:\n    void printResultType() const {\n        if (!passOrFail.empty()) {\n            Colour colourGuard(colour);\n            stream << passOrFail << \":\\n\";\n        }\n    }\n    void printOriginalExpression() const {\n        if (result.hasExpression()) {\n            Colour colourGuard(Colour::OriginalExpression);\n            stream << \"  \";\n            stream << result.getExpressionInMacro();\n            stream << '\\n';\n        }\n    }\n    void printReconstructedExpression() const {\n        if (result.hasExpandedExpression()) {\n            stream << \"with expansion:\\n\";\n            Colour colourGuard(Colour::ReconstructedExpression);\n            stream << Column(result.getExpandedExpression()).indent(2) << '\\n';\n        }\n    }\n    void printMessage() const {\n        if (!messageLabel.empty())\n            stream << messageLabel << ':' << '\\n';\n        for (auto const& msg : messages) {\n            // If this assertion is a warning ignore any INFO messages\n            if (printInfoMessages || msg.type != ResultWas::Info)\n                stream << Column(msg.message).indent(2) << '\\n';\n        }\n    }\n    void printSourceInfo() const {\n        Colour colourGuard(Colour::FileName);\n        stream << result.getSourceInfo() << \": \";\n    }\n\n    std::ostream& stream;\n    AssertionStats const& stats;\n    AssertionResult const& result;\n    Colour::Code colour;\n    std::string passOrFail;\n    std::string messageLabel;\n    std::string message;\n    std::vector<MessageInfo> messages;\n    bool printInfoMessages;\n};\n\nstd::size_t makeRatio(std::size_t number, std::size_t total) {\n    std::size_t ratio = total > 0 ? CATCH_CONFIG_CONSOLE_WIDTH * number / total : 0;\n    return (ratio == 0 && number > 0) ? 1 : ratio;\n}\n\nstd::size_t& findMax(std::size_t& i, std::size_t& j, std::size_t& k) {\n    if (i > j && i > k)\n        return i;\n    else if (j > k)\n        return j;\n    else\n        return k;\n}\n\nstruct ColumnInfo {\n    enum Justification { Left, Right };\n    std::string name;\n    int width;\n    Justification justification;\n};\nstruct ColumnBreak {};\nstruct RowBreak {};\n\nclass Duration {\n    enum class Unit {\n        Auto,\n        Nanoseconds,\n        Microseconds,\n        Milliseconds,\n        Seconds,\n        Minutes\n    };\n    static const uint64_t s_nanosecondsInAMicrosecond = 1000;\n    static const uint64_t s_nanosecondsInAMillisecond = 1000 * s_nanosecondsInAMicrosecond;\n    static const uint64_t s_nanosecondsInASecond = 1000 * s_nanosecondsInAMillisecond;\n    static const uint64_t s_nanosecondsInAMinute = 60 * s_nanosecondsInASecond;\n\n    double m_inNanoseconds;\n    Unit m_units;\n\npublic:\n    explicit Duration(double inNanoseconds, Unit units = Unit::Auto)\n        : m_inNanoseconds(inNanoseconds),\n        m_units(units) {\n        if (m_units == Unit::Auto) {\n            if (m_inNanoseconds < s_nanosecondsInAMicrosecond)\n                m_units = Unit::Nanoseconds;\n            else if (m_inNanoseconds < s_nanosecondsInAMillisecond)\n                m_units = Unit::Microseconds;\n            else if (m_inNanoseconds < s_nanosecondsInASecond)\n                m_units = Unit::Milliseconds;\n            else if (m_inNanoseconds < s_nanosecondsInAMinute)\n                m_units = Unit::Seconds;\n            else\n                m_units = Unit::Minutes;\n        }\n\n    }\n\n    auto value() const -> double {\n        switch (m_units) {\n        case Unit::Microseconds:\n            return m_inNanoseconds / static_cast<double>(s_nanosecondsInAMicrosecond);\n        case Unit::Milliseconds:\n            return m_inNanoseconds / static_cast<double>(s_nanosecondsInAMillisecond);\n        case Unit::Seconds:\n            return m_inNanoseconds / static_cast<double>(s_nanosecondsInASecond);\n        case Unit::Minutes:\n            return m_inNanoseconds / static_cast<double>(s_nanosecondsInAMinute);\n        default:\n            return m_inNanoseconds;\n        }\n    }\n    auto unitsAsString() const -> std::string {\n        switch (m_units) {\n        case Unit::Nanoseconds:\n            return \"ns\";\n        case Unit::Microseconds:\n            return \"us\";\n        case Unit::Milliseconds:\n            return \"ms\";\n        case Unit::Seconds:\n            return \"s\";\n        case Unit::Minutes:\n            return \"m\";\n        default:\n            return \"** internal error **\";\n        }\n\n    }\n    friend auto operator << (std::ostream& os, Duration const& duration) -> std::ostream& {\n        return os << duration.value() << ' ' << duration.unitsAsString();\n    }\n};\n} // end anon namespace\n\nclass TablePrinter {\n    std::ostream& m_os;\n    std::vector<ColumnInfo> m_columnInfos;\n    std::ostringstream m_oss;\n    int m_currentColumn = -1;\n    bool m_isOpen = false;\n\npublic:\n    TablePrinter( std::ostream& os, std::vector<ColumnInfo> columnInfos )\n    :   m_os( os ),\n        m_columnInfos( std::move( columnInfos ) ) {}\n\n    auto columnInfos() const -> std::vector<ColumnInfo> const& {\n        return m_columnInfos;\n    }\n\n    void open() {\n        if (!m_isOpen) {\n            m_isOpen = true;\n            *this << RowBreak();\n\n\t\t\tColumns headerCols;\n\t\t\tSpacer spacer(2);\n\t\t\tfor (auto const& info : m_columnInfos) {\n\t\t\t\theaderCols += Column(info.name).width(static_cast<std::size_t>(info.width - 2));\n\t\t\t\theaderCols += spacer;\n\t\t\t}\n\t\t\tm_os << headerCols << '\\n';\n\n            m_os << Catch::getLineOfChars<'-'>() << '\\n';\n        }\n    }\n    void close() {\n        if (m_isOpen) {\n            *this << RowBreak();\n            m_os << std::endl;\n            m_isOpen = false;\n        }\n    }\n\n    template<typename T>\n    friend TablePrinter& operator << (TablePrinter& tp, T const& value) {\n        tp.m_oss << value;\n        return tp;\n    }\n\n    friend TablePrinter& operator << (TablePrinter& tp, ColumnBreak) {\n        auto colStr = tp.m_oss.str();\n        const auto strSize = colStr.size();\n        tp.m_oss.str(\"\");\n        tp.open();\n        if (tp.m_currentColumn == static_cast<int>(tp.m_columnInfos.size() - 1)) {\n            tp.m_currentColumn = -1;\n            tp.m_os << '\\n';\n        }\n        tp.m_currentColumn++;\n\n        auto colInfo = tp.m_columnInfos[tp.m_currentColumn];\n        auto padding = (strSize + 1 < static_cast<std::size_t>(colInfo.width))\n            ? std::string(colInfo.width - (strSize + 1), ' ')\n            : std::string();\n        if (colInfo.justification == ColumnInfo::Left)\n            tp.m_os << colStr << padding << ' ';\n        else\n            tp.m_os << padding << colStr << ' ';\n        return tp;\n    }\n\n    friend TablePrinter& operator << (TablePrinter& tp, RowBreak) {\n        if (tp.m_currentColumn > 0) {\n            tp.m_os << '\\n';\n            tp.m_currentColumn = -1;\n        }\n        return tp;\n    }\n};\n\nConsoleReporter::ConsoleReporter(ReporterConfig const& config)\n    : StreamingReporterBase(config),\n    m_tablePrinter(new TablePrinter(config.stream(),\n        [&config]() -> std::vector<ColumnInfo> {\n        if (config.fullConfig()->benchmarkNoAnalysis())\n        {\n            return{\n                { \"benchmark name\", CATCH_CONFIG_CONSOLE_WIDTH - 43, ColumnInfo::Left },\n                { \"     samples\", 14, ColumnInfo::Right },\n                { \"  iterations\", 14, ColumnInfo::Right },\n                { \"        mean\", 14, ColumnInfo::Right }\n            };\n        }\n        else\n        {\n            return{\n                { \"benchmark name\", CATCH_CONFIG_CONSOLE_WIDTH - 43, ColumnInfo::Left },\n                { \"samples      mean       std dev\", 14, ColumnInfo::Right },\n                { \"iterations   low mean   low std dev\", 14, ColumnInfo::Right },\n                { \"estimated    high mean  high std dev\", 14, ColumnInfo::Right }\n            };\n        }\n    }())) {}\nConsoleReporter::~ConsoleReporter() = default;\n\nstd::string ConsoleReporter::getDescription() {\n    return \"Reports test results as plain lines of text\";\n}\n\nvoid ConsoleReporter::noMatchingTestCases(std::string const& spec) {\n    stream << \"No test cases matched '\" << spec << '\\'' << std::endl;\n}\n\nvoid ConsoleReporter::reportInvalidArguments(std::string const&arg){\n    stream << \"Invalid Filter: \" << arg << std::endl;\n}\n\nvoid ConsoleReporter::assertionStarting(AssertionInfo const&) {}\n\nbool ConsoleReporter::assertionEnded(AssertionStats const& _assertionStats) {\n    AssertionResult const& result = _assertionStats.assertionResult;\n\n    bool includeResults = m_config->includeSuccessfulResults() || !result.isOk();\n\n    // Drop out if result was successful but we're not printing them.\n    if (!includeResults && result.getResultType() != ResultWas::Warning)\n        return false;\n\n    lazyPrint();\n\n    ConsoleAssertionPrinter printer(stream, _assertionStats, includeResults);\n    printer.print();\n    stream << std::endl;\n    return true;\n}\n\nvoid ConsoleReporter::sectionStarting(SectionInfo const& _sectionInfo) {\n    m_tablePrinter->close();\n    m_headerPrinted = false;\n    StreamingReporterBase::sectionStarting(_sectionInfo);\n}\nvoid ConsoleReporter::sectionEnded(SectionStats const& _sectionStats) {\n    m_tablePrinter->close();\n    if (_sectionStats.missingAssertions) {\n        lazyPrint();\n        Colour colour(Colour::ResultError);\n        if (m_sectionStack.size() > 1)\n            stream << \"\\nNo assertions in section\";\n        else\n            stream << \"\\nNo assertions in test case\";\n        stream << \" '\" << _sectionStats.sectionInfo.name << \"'\\n\" << std::endl;\n    }\n    double dur = _sectionStats.durationInSeconds;\n    if (shouldShowDuration(*m_config, dur)) {\n        stream << getFormattedDuration(dur) << \" s: \" << _sectionStats.sectionInfo.name << std::endl;\n    }\n    if (m_headerPrinted) {\n        m_headerPrinted = false;\n    }\n    StreamingReporterBase::sectionEnded(_sectionStats);\n}\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\nvoid ConsoleReporter::benchmarkPreparing(std::string const& name) {\n\tlazyPrintWithoutClosingBenchmarkTable();\n\n\tauto nameCol = Column(name).width(static_cast<std::size_t>(m_tablePrinter->columnInfos()[0].width - 2));\n\n\tbool firstLine = true;\n\tfor (auto line : nameCol) {\n\t\tif (!firstLine)\n\t\t\t(*m_tablePrinter) << ColumnBreak() << ColumnBreak() << ColumnBreak();\n\t\telse\n\t\t\tfirstLine = false;\n\n\t\t(*m_tablePrinter) << line << ColumnBreak();\n\t}\n}\n\nvoid ConsoleReporter::benchmarkStarting(BenchmarkInfo const& info) {\n    (*m_tablePrinter) << info.samples << ColumnBreak()\n        << info.iterations << ColumnBreak();\n    if (!m_config->benchmarkNoAnalysis())\n        (*m_tablePrinter) << Duration(info.estimatedDuration) << ColumnBreak();\n}\nvoid ConsoleReporter::benchmarkEnded(BenchmarkStats<> const& stats) {\n    if (m_config->benchmarkNoAnalysis())\n    {\n        (*m_tablePrinter) << Duration(stats.mean.point.count()) << ColumnBreak();\n    }\n    else\n    {\n        (*m_tablePrinter) << ColumnBreak()\n            << Duration(stats.mean.point.count()) << ColumnBreak()\n            << Duration(stats.mean.lower_bound.count()) << ColumnBreak()\n            << Duration(stats.mean.upper_bound.count()) << ColumnBreak() << ColumnBreak()\n            << Duration(stats.standardDeviation.point.count()) << ColumnBreak()\n            << Duration(stats.standardDeviation.lower_bound.count()) << ColumnBreak()\n            << Duration(stats.standardDeviation.upper_bound.count()) << ColumnBreak() << ColumnBreak() << ColumnBreak() << ColumnBreak() << ColumnBreak();\n    }\n}\n\nvoid ConsoleReporter::benchmarkFailed(std::string const& error) {\n\tColour colour(Colour::Red);\n    (*m_tablePrinter)\n        << \"Benchmark failed (\" << error << ')'\n        << ColumnBreak() << RowBreak();\n}\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n\nvoid ConsoleReporter::testCaseEnded(TestCaseStats const& _testCaseStats) {\n    m_tablePrinter->close();\n    StreamingReporterBase::testCaseEnded(_testCaseStats);\n    m_headerPrinted = false;\n}\nvoid ConsoleReporter::testGroupEnded(TestGroupStats const& _testGroupStats) {\n    if (currentGroupInfo.used) {\n        printSummaryDivider();\n        stream << \"Summary for group '\" << _testGroupStats.groupInfo.name << \"':\\n\";\n        printTotals(_testGroupStats.totals);\n        stream << '\\n' << std::endl;\n    }\n    StreamingReporterBase::testGroupEnded(_testGroupStats);\n}\nvoid ConsoleReporter::testRunEnded(TestRunStats const& _testRunStats) {\n    printTotalsDivider(_testRunStats.totals);\n    printTotals(_testRunStats.totals);\n    stream << std::endl;\n    StreamingReporterBase::testRunEnded(_testRunStats);\n}\nvoid ConsoleReporter::testRunStarting(TestRunInfo const& _testInfo) {\n    StreamingReporterBase::testRunStarting(_testInfo);\n    printTestFilters();\n}\n\nvoid ConsoleReporter::lazyPrint() {\n\n    m_tablePrinter->close();\n    lazyPrintWithoutClosingBenchmarkTable();\n}\n\nvoid ConsoleReporter::lazyPrintWithoutClosingBenchmarkTable() {\n\n    if (!currentTestRunInfo.used)\n        lazyPrintRunInfo();\n    if (!currentGroupInfo.used)\n        lazyPrintGroupInfo();\n\n    if (!m_headerPrinted) {\n        printTestCaseAndSectionHeader();\n        m_headerPrinted = true;\n    }\n}\nvoid ConsoleReporter::lazyPrintRunInfo() {\n    stream << '\\n' << getLineOfChars<'~'>() << '\\n';\n    Colour colour(Colour::SecondaryText);\n    stream << currentTestRunInfo->name\n        << \" is a Catch v\" << libraryVersion() << \" host application.\\n\"\n        << \"Run with -? for options\\n\\n\";\n\n    if (m_config->rngSeed() != 0)\n        stream << \"Randomness seeded to: \" << m_config->rngSeed() << \"\\n\\n\";\n\n    currentTestRunInfo.used = true;\n}\nvoid ConsoleReporter::lazyPrintGroupInfo() {\n    if (!currentGroupInfo->name.empty() && currentGroupInfo->groupsCounts > 1) {\n        printClosedHeader(\"Group: \" + currentGroupInfo->name);\n        currentGroupInfo.used = true;\n    }\n}\nvoid ConsoleReporter::printTestCaseAndSectionHeader() {\n    assert(!m_sectionStack.empty());\n    printOpenHeader(currentTestCaseInfo->name);\n\n    if (m_sectionStack.size() > 1) {\n        Colour colourGuard(Colour::Headers);\n\n        auto\n            it = m_sectionStack.begin() + 1, // Skip first section (test case)\n            itEnd = m_sectionStack.end();\n        for (; it != itEnd; ++it)\n            printHeaderString(it->name, 2);\n    }\n\n    SourceLineInfo lineInfo = m_sectionStack.back().lineInfo;\n\n    stream << getLineOfChars<'-'>() << '\\n';\n    Colour colourGuard(Colour::FileName);\n    stream << lineInfo << '\\n';\n    stream << getLineOfChars<'.'>() << '\\n' << std::endl;\n}\n\nvoid ConsoleReporter::printClosedHeader(std::string const& _name) {\n    printOpenHeader(_name);\n    stream << getLineOfChars<'.'>() << '\\n';\n}\nvoid ConsoleReporter::printOpenHeader(std::string const& _name) {\n    stream << getLineOfChars<'-'>() << '\\n';\n    {\n        Colour colourGuard(Colour::Headers);\n        printHeaderString(_name);\n    }\n}\n\n// if string has a : in first line will set indent to follow it on\n// subsequent lines\nvoid ConsoleReporter::printHeaderString(std::string const& _string, std::size_t indent) {\n    std::size_t i = _string.find(\": \");\n    if (i != std::string::npos)\n        i += 2;\n    else\n        i = 0;\n    stream << Column(_string).indent(indent + i).initialIndent(indent) << '\\n';\n}\n\nstruct SummaryColumn {\n\n    SummaryColumn( std::string _label, Colour::Code _colour )\n    :   label( std::move( _label ) ),\n        colour( _colour ) {}\n    SummaryColumn addRow( std::size_t count ) {\n        ReusableStringStream rss;\n        rss << count;\n        std::string row = rss.str();\n        for (auto& oldRow : rows) {\n            while (oldRow.size() < row.size())\n                oldRow = ' ' + oldRow;\n            while (oldRow.size() > row.size())\n                row = ' ' + row;\n        }\n        rows.push_back(row);\n        return *this;\n    }\n\n    std::string label;\n    Colour::Code colour;\n    std::vector<std::string> rows;\n\n};\n\nvoid ConsoleReporter::printTotals( Totals const& totals ) {\n    if (totals.testCases.total() == 0) {\n        stream << Colour(Colour::Warning) << \"No tests ran\\n\";\n    } else if (totals.assertions.total() > 0 && totals.testCases.allPassed()) {\n        stream << Colour(Colour::ResultSuccess) << \"All tests passed\";\n        stream << \" (\"\n            << pluralise(totals.assertions.passed, \"assertion\") << \" in \"\n            << pluralise(totals.testCases.passed, \"test case\") << ')'\n            << '\\n';\n    } else {\n\n        std::vector<SummaryColumn> columns;\n        columns.push_back(SummaryColumn(\"\", Colour::None)\n                          .addRow(totals.testCases.total())\n                          .addRow(totals.assertions.total()));\n        columns.push_back(SummaryColumn(\"passed\", Colour::Success)\n                          .addRow(totals.testCases.passed)\n                          .addRow(totals.assertions.passed));\n        columns.push_back(SummaryColumn(\"failed\", Colour::ResultError)\n                          .addRow(totals.testCases.failed)\n                          .addRow(totals.assertions.failed));\n        columns.push_back(SummaryColumn(\"failed as expected\", Colour::ResultExpectedFailure)\n                          .addRow(totals.testCases.failedButOk)\n                          .addRow(totals.assertions.failedButOk));\n\n        printSummaryRow(\"test cases\", columns, 0);\n        printSummaryRow(\"assertions\", columns, 1);\n    }\n}\nvoid ConsoleReporter::printSummaryRow(std::string const& label, std::vector<SummaryColumn> const& cols, std::size_t row) {\n    for (auto col : cols) {\n        std::string value = col.rows[row];\n        if (col.label.empty()) {\n            stream << label << \": \";\n            if (value != \"0\")\n                stream << value;\n            else\n                stream << Colour(Colour::Warning) << \"- none -\";\n        } else if (value != \"0\") {\n            stream << Colour(Colour::LightGrey) << \" | \";\n            stream << Colour(col.colour)\n                << value << ' ' << col.label;\n        }\n    }\n    stream << '\\n';\n}\n\nvoid ConsoleReporter::printTotalsDivider(Totals const& totals) {\n    if (totals.testCases.total() > 0) {\n        std::size_t failedRatio = makeRatio(totals.testCases.failed, totals.testCases.total());\n        std::size_t failedButOkRatio = makeRatio(totals.testCases.failedButOk, totals.testCases.total());\n        std::size_t passedRatio = makeRatio(totals.testCases.passed, totals.testCases.total());\n        while (failedRatio + failedButOkRatio + passedRatio < CATCH_CONFIG_CONSOLE_WIDTH - 1)\n            findMax(failedRatio, failedButOkRatio, passedRatio)++;\n        while (failedRatio + failedButOkRatio + passedRatio > CATCH_CONFIG_CONSOLE_WIDTH - 1)\n            findMax(failedRatio, failedButOkRatio, passedRatio)--;\n\n        stream << Colour(Colour::Error) << std::string(failedRatio, '=');\n        stream << Colour(Colour::ResultExpectedFailure) << std::string(failedButOkRatio, '=');\n        if (totals.testCases.allPassed())\n            stream << Colour(Colour::ResultSuccess) << std::string(passedRatio, '=');\n        else\n            stream << Colour(Colour::Success) << std::string(passedRatio, '=');\n    } else {\n        stream << Colour(Colour::Warning) << std::string(CATCH_CONFIG_CONSOLE_WIDTH - 1, '=');\n    }\n    stream << '\\n';\n}\nvoid ConsoleReporter::printSummaryDivider() {\n    stream << getLineOfChars<'-'>() << '\\n';\n}\n\nvoid ConsoleReporter::printTestFilters() {\n    if (m_config->testSpec().hasFilters()) {\n        Colour guard(Colour::BrightYellow);\n        stream << \"Filters: \" << serializeFilters(m_config->getTestsOrTags()) << '\\n';\n    }\n}\n\nCATCH_REGISTER_REPORTER(\"console\", ConsoleReporter)\n\n} // end namespace Catch\n\n#if defined(_MSC_VER)\n#pragma warning(pop)\n#endif\n\n#if defined(__clang__)\n#  pragma clang diagnostic pop\n#endif\n// end catch_reporter_console.cpp\n// start catch_reporter_junit.cpp\n\n#include <cassert>\n#include <sstream>\n#include <ctime>\n#include <algorithm>\n#include <iomanip>\n\nnamespace Catch {\n\n    namespace {\n        std::string getCurrentTimestamp() {\n            // Beware, this is not reentrant because of backward compatibility issues\n            // Also, UTC only, again because of backward compatibility (%z is C++11)\n            time_t rawtime;\n            std::time(&rawtime);\n            auto const timeStampSize = sizeof(\"2017-01-16T17:06:45Z\");\n\n#ifdef _MSC_VER\n            std::tm timeInfo = {};\n            gmtime_s(&timeInfo, &rawtime);\n#else\n            std::tm* timeInfo;\n            timeInfo = std::gmtime(&rawtime);\n#endif\n\n            char timeStamp[timeStampSize];\n            const char * const fmt = \"%Y-%m-%dT%H:%M:%SZ\";\n\n#ifdef _MSC_VER\n            std::strftime(timeStamp, timeStampSize, fmt, &timeInfo);\n#else\n            std::strftime(timeStamp, timeStampSize, fmt, timeInfo);\n#endif\n            return std::string(timeStamp, timeStampSize-1);\n        }\n\n        std::string fileNameTag(const std::vector<std::string> &tags) {\n            auto it = std::find_if(begin(tags),\n                                   end(tags),\n                                   [] (std::string const& tag) {return tag.front() == '#'; });\n            if (it != tags.end())\n                return it->substr(1);\n            return std::string();\n        }\n\n        // Formats the duration in seconds to 3 decimal places.\n        // This is done because some genius defined Maven Surefire schema\n        // in a way that only accepts 3 decimal places, and tools like\n        // Jenkins use that schema for validation JUnit reporter output.\n        std::string formatDuration( double seconds ) {\n            ReusableStringStream rss;\n            rss << std::fixed << std::setprecision( 3 ) << seconds;\n            return rss.str();\n        }\n\n    } // anonymous namespace\n\n    JunitReporter::JunitReporter( ReporterConfig const& _config )\n        :   CumulativeReporterBase( _config ),\n            xml( _config.stream() )\n        {\n            m_reporterPrefs.shouldRedirectStdOut = true;\n            m_reporterPrefs.shouldReportAllAssertions = true;\n        }\n\n    JunitReporter::~JunitReporter() {}\n\n    std::string JunitReporter::getDescription() {\n        return \"Reports test results in an XML format that looks like Ant's junitreport target\";\n    }\n\n    void JunitReporter::noMatchingTestCases( std::string const& /*spec*/ ) {}\n\n    void JunitReporter::testRunStarting( TestRunInfo const& runInfo )  {\n        CumulativeReporterBase::testRunStarting( runInfo );\n        xml.startElement( \"testsuites\" );\n    }\n\n    void JunitReporter::testGroupStarting( GroupInfo const& groupInfo ) {\n        suiteTimer.start();\n        stdOutForSuite.clear();\n        stdErrForSuite.clear();\n        unexpectedExceptions = 0;\n        CumulativeReporterBase::testGroupStarting( groupInfo );\n    }\n\n    void JunitReporter::testCaseStarting( TestCaseInfo const& testCaseInfo ) {\n        m_okToFail = testCaseInfo.okToFail();\n    }\n\n    bool JunitReporter::assertionEnded( AssertionStats const& assertionStats ) {\n        if( assertionStats.assertionResult.getResultType() == ResultWas::ThrewException && !m_okToFail )\n            unexpectedExceptions++;\n        return CumulativeReporterBase::assertionEnded( assertionStats );\n    }\n\n    void JunitReporter::testCaseEnded( TestCaseStats const& testCaseStats ) {\n        stdOutForSuite += testCaseStats.stdOut;\n        stdErrForSuite += testCaseStats.stdErr;\n        CumulativeReporterBase::testCaseEnded( testCaseStats );\n    }\n\n    void JunitReporter::testGroupEnded( TestGroupStats const& testGroupStats ) {\n        double suiteTime = suiteTimer.getElapsedSeconds();\n        CumulativeReporterBase::testGroupEnded( testGroupStats );\n        writeGroup( *m_testGroups.back(), suiteTime );\n    }\n\n    void JunitReporter::testRunEndedCumulative() {\n        xml.endElement();\n    }\n\n    void JunitReporter::writeGroup( TestGroupNode const& groupNode, double suiteTime ) {\n        XmlWriter::ScopedElement e = xml.scopedElement( \"testsuite\" );\n\n        TestGroupStats const& stats = groupNode.value;\n        xml.writeAttribute( \"name\", stats.groupInfo.name );\n        xml.writeAttribute( \"errors\", unexpectedExceptions );\n        xml.writeAttribute( \"failures\", stats.totals.assertions.failed-unexpectedExceptions );\n        xml.writeAttribute( \"tests\", stats.totals.assertions.total() );\n        xml.writeAttribute( \"hostname\", \"tbd\" ); // !TBD\n        if( m_config->showDurations() == ShowDurations::Never )\n            xml.writeAttribute( \"time\", \"\" );\n        else\n            xml.writeAttribute( \"time\", formatDuration( suiteTime ) );\n        xml.writeAttribute( \"timestamp\", getCurrentTimestamp() );\n\n        // Write properties if there are any\n        if (m_config->hasTestFilters() || m_config->rngSeed() != 0) {\n            auto properties = xml.scopedElement(\"properties\");\n            if (m_config->hasTestFilters()) {\n                xml.scopedElement(\"property\")\n                    .writeAttribute(\"name\", \"filters\")\n                    .writeAttribute(\"value\", serializeFilters(m_config->getTestsOrTags()));\n            }\n            if (m_config->rngSeed() != 0) {\n                xml.scopedElement(\"property\")\n                    .writeAttribute(\"name\", \"random-seed\")\n                    .writeAttribute(\"value\", m_config->rngSeed());\n            }\n        }\n\n        // Write test cases\n        for( auto const& child : groupNode.children )\n            writeTestCase( *child );\n\n        xml.scopedElement( \"system-out\" ).writeText( trim( stdOutForSuite ), XmlFormatting::Newline );\n        xml.scopedElement( \"system-err\" ).writeText( trim( stdErrForSuite ), XmlFormatting::Newline );\n    }\n\n    void JunitReporter::writeTestCase( TestCaseNode const& testCaseNode ) {\n        TestCaseStats const& stats = testCaseNode.value;\n\n        // All test cases have exactly one section - which represents the\n        // test case itself. That section may have 0-n nested sections\n        assert( testCaseNode.children.size() == 1 );\n        SectionNode const& rootSection = *testCaseNode.children.front();\n\n        std::string className = stats.testInfo.className;\n\n        if( className.empty() ) {\n            className = fileNameTag(stats.testInfo.tags);\n            if ( className.empty() )\n                className = \"global\";\n        }\n\n        if ( !m_config->name().empty() )\n            className = m_config->name() + \".\" + className;\n\n        writeSection( className, \"\", rootSection, stats.testInfo.okToFail() );\n    }\n\n    void JunitReporter::writeSection( std::string const& className,\n                                      std::string const& rootName,\n                                      SectionNode const& sectionNode,\n                                      bool testOkToFail) {\n        std::string name = trim( sectionNode.stats.sectionInfo.name );\n        if( !rootName.empty() )\n            name = rootName + '/' + name;\n\n        if( !sectionNode.assertions.empty() ||\n            !sectionNode.stdOut.empty() ||\n            !sectionNode.stdErr.empty() ) {\n            XmlWriter::ScopedElement e = xml.scopedElement( \"testcase\" );\n            if( className.empty() ) {\n                xml.writeAttribute( \"classname\", name );\n                xml.writeAttribute( \"name\", \"root\" );\n            }\n            else {\n                xml.writeAttribute( \"classname\", className );\n                xml.writeAttribute( \"name\", name );\n            }\n            xml.writeAttribute( \"time\", formatDuration( sectionNode.stats.durationInSeconds ) );\n            // This is not ideal, but it should be enough to mimic gtest's\n            // junit output.\n            // Ideally the JUnit reporter would also handle `skipTest`\n            // events and write those out appropriately.\n            xml.writeAttribute( \"status\", \"run\" );\n\n            if (sectionNode.stats.assertions.failedButOk) {\n                xml.scopedElement(\"skipped\")\n                    .writeAttribute(\"message\", \"TEST_CASE tagged with !mayfail\");\n            }\n\n            writeAssertions( sectionNode );\n\n            if( !sectionNode.stdOut.empty() )\n                xml.scopedElement( \"system-out\" ).writeText( trim( sectionNode.stdOut ), XmlFormatting::Newline );\n            if( !sectionNode.stdErr.empty() )\n                xml.scopedElement( \"system-err\" ).writeText( trim( sectionNode.stdErr ), XmlFormatting::Newline );\n        }\n        for( auto const& childNode : sectionNode.childSections )\n            if( className.empty() )\n                writeSection( name, \"\", *childNode, testOkToFail );\n            else\n                writeSection( className, name, *childNode, testOkToFail );\n    }\n\n    void JunitReporter::writeAssertions( SectionNode const& sectionNode ) {\n        for( auto const& assertion : sectionNode.assertions )\n            writeAssertion( assertion );\n    }\n\n    void JunitReporter::writeAssertion( AssertionStats const& stats ) {\n        AssertionResult const& result = stats.assertionResult;\n        if( !result.isOk() ) {\n            std::string elementName;\n            switch( result.getResultType() ) {\n                case ResultWas::ThrewException:\n                case ResultWas::FatalErrorCondition:\n                    elementName = \"error\";\n                    break;\n                case ResultWas::ExplicitFailure:\n                case ResultWas::ExpressionFailed:\n                case ResultWas::DidntThrowException:\n                    elementName = \"failure\";\n                    break;\n\n                // We should never see these here:\n                case ResultWas::Info:\n                case ResultWas::Warning:\n                case ResultWas::Ok:\n                case ResultWas::Unknown:\n                case ResultWas::FailureBit:\n                case ResultWas::Exception:\n                    elementName = \"internalError\";\n                    break;\n            }\n\n            XmlWriter::ScopedElement e = xml.scopedElement( elementName );\n\n            xml.writeAttribute( \"message\", result.getExpression() );\n            xml.writeAttribute( \"type\", result.getTestMacroName() );\n\n            ReusableStringStream rss;\n            if (stats.totals.assertions.total() > 0) {\n                rss << \"FAILED\" << \":\\n\";\n                if (result.hasExpression()) {\n                    rss << \"  \";\n                    rss << result.getExpressionInMacro();\n                    rss << '\\n';\n                }\n                if (result.hasExpandedExpression()) {\n                    rss << \"with expansion:\\n\";\n                    rss << Column(result.getExpandedExpression()).indent(2) << '\\n';\n                }\n            } else {\n                rss << '\\n';\n            }\n\n            if( !result.getMessage().empty() )\n                rss << result.getMessage() << '\\n';\n            for( auto const& msg : stats.infoMessages )\n                if( msg.type == ResultWas::Info )\n                    rss << msg.message << '\\n';\n\n            rss << \"at \" << result.getSourceInfo();\n            xml.writeText( rss.str(), XmlFormatting::Newline );\n        }\n    }\n\n    CATCH_REGISTER_REPORTER( \"junit\", JunitReporter )\n\n} // end namespace Catch\n// end catch_reporter_junit.cpp\n// start catch_reporter_listening.cpp\n\n#include <cassert>\n\nnamespace Catch {\n\n    ListeningReporter::ListeningReporter() {\n        // We will assume that listeners will always want all assertions\n        m_preferences.shouldReportAllAssertions = true;\n    }\n\n    void ListeningReporter::addListener( IStreamingReporterPtr&& listener ) {\n        m_listeners.push_back( std::move( listener ) );\n    }\n\n    void ListeningReporter::addReporter(IStreamingReporterPtr&& reporter) {\n        assert(!m_reporter && \"Listening reporter can wrap only 1 real reporter\");\n        m_reporter = std::move( reporter );\n        m_preferences.shouldRedirectStdOut = m_reporter->getPreferences().shouldRedirectStdOut;\n    }\n\n    ReporterPreferences ListeningReporter::getPreferences() const {\n        return m_preferences;\n    }\n\n    std::set<Verbosity> ListeningReporter::getSupportedVerbosities() {\n        return std::set<Verbosity>{ };\n    }\n\n    void ListeningReporter::noMatchingTestCases( std::string const& spec ) {\n        for ( auto const& listener : m_listeners ) {\n            listener->noMatchingTestCases( spec );\n        }\n        m_reporter->noMatchingTestCases( spec );\n    }\n\n    void ListeningReporter::reportInvalidArguments(std::string const&arg){\n        for ( auto const& listener : m_listeners ) {\n            listener->reportInvalidArguments( arg );\n        }\n        m_reporter->reportInvalidArguments( arg );\n    }\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n    void ListeningReporter::benchmarkPreparing( std::string const& name ) {\n\t\tfor (auto const& listener : m_listeners) {\n\t\t\tlistener->benchmarkPreparing(name);\n\t\t}\n\t\tm_reporter->benchmarkPreparing(name);\n\t}\n    void ListeningReporter::benchmarkStarting( BenchmarkInfo const& benchmarkInfo ) {\n        for ( auto const& listener : m_listeners ) {\n            listener->benchmarkStarting( benchmarkInfo );\n        }\n        m_reporter->benchmarkStarting( benchmarkInfo );\n    }\n    void ListeningReporter::benchmarkEnded( BenchmarkStats<> const& benchmarkStats ) {\n        for ( auto const& listener : m_listeners ) {\n            listener->benchmarkEnded( benchmarkStats );\n        }\n        m_reporter->benchmarkEnded( benchmarkStats );\n    }\n\n\tvoid ListeningReporter::benchmarkFailed( std::string const& error ) {\n\t\tfor (auto const& listener : m_listeners) {\n\t\t\tlistener->benchmarkFailed(error);\n\t\t}\n\t\tm_reporter->benchmarkFailed(error);\n\t}\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n\n    void ListeningReporter::testRunStarting( TestRunInfo const& testRunInfo ) {\n        for ( auto const& listener : m_listeners ) {\n            listener->testRunStarting( testRunInfo );\n        }\n        m_reporter->testRunStarting( testRunInfo );\n    }\n\n    void ListeningReporter::testGroupStarting( GroupInfo const& groupInfo ) {\n        for ( auto const& listener : m_listeners ) {\n            listener->testGroupStarting( groupInfo );\n        }\n        m_reporter->testGroupStarting( groupInfo );\n    }\n\n    void ListeningReporter::testCaseStarting( TestCaseInfo const& testInfo ) {\n        for ( auto const& listener : m_listeners ) {\n            listener->testCaseStarting( testInfo );\n        }\n        m_reporter->testCaseStarting( testInfo );\n    }\n\n    void ListeningReporter::sectionStarting( SectionInfo const& sectionInfo ) {\n        for ( auto const& listener : m_listeners ) {\n            listener->sectionStarting( sectionInfo );\n        }\n        m_reporter->sectionStarting( sectionInfo );\n    }\n\n    void ListeningReporter::assertionStarting( AssertionInfo const& assertionInfo ) {\n        for ( auto const& listener : m_listeners ) {\n            listener->assertionStarting( assertionInfo );\n        }\n        m_reporter->assertionStarting( assertionInfo );\n    }\n\n    // The return value indicates if the messages buffer should be cleared:\n    bool ListeningReporter::assertionEnded( AssertionStats const& assertionStats ) {\n        for( auto const& listener : m_listeners ) {\n            static_cast<void>( listener->assertionEnded( assertionStats ) );\n        }\n        return m_reporter->assertionEnded( assertionStats );\n    }\n\n    void ListeningReporter::sectionEnded( SectionStats const& sectionStats ) {\n        for ( auto const& listener : m_listeners ) {\n            listener->sectionEnded( sectionStats );\n        }\n        m_reporter->sectionEnded( sectionStats );\n    }\n\n    void ListeningReporter::testCaseEnded( TestCaseStats const& testCaseStats ) {\n        for ( auto const& listener : m_listeners ) {\n            listener->testCaseEnded( testCaseStats );\n        }\n        m_reporter->testCaseEnded( testCaseStats );\n    }\n\n    void ListeningReporter::testGroupEnded( TestGroupStats const& testGroupStats ) {\n        for ( auto const& listener : m_listeners ) {\n            listener->testGroupEnded( testGroupStats );\n        }\n        m_reporter->testGroupEnded( testGroupStats );\n    }\n\n    void ListeningReporter::testRunEnded( TestRunStats const& testRunStats ) {\n        for ( auto const& listener : m_listeners ) {\n            listener->testRunEnded( testRunStats );\n        }\n        m_reporter->testRunEnded( testRunStats );\n    }\n\n    void ListeningReporter::skipTest( TestCaseInfo const& testInfo ) {\n        for ( auto const& listener : m_listeners ) {\n            listener->skipTest( testInfo );\n        }\n        m_reporter->skipTest( testInfo );\n    }\n\n    bool ListeningReporter::isMulti() const {\n        return true;\n    }\n\n} // end namespace Catch\n// end catch_reporter_listening.cpp\n// start catch_reporter_xml.cpp\n\n#if defined(_MSC_VER)\n#pragma warning(push)\n#pragma warning(disable:4061) // Not all labels are EXPLICITLY handled in switch\n                              // Note that 4062 (not all labels are handled\n                              // and default is missing) is enabled\n#endif\n\nnamespace Catch {\n    XmlReporter::XmlReporter( ReporterConfig const& _config )\n    :   StreamingReporterBase( _config ),\n        m_xml(_config.stream())\n    {\n        m_reporterPrefs.shouldRedirectStdOut = true;\n        m_reporterPrefs.shouldReportAllAssertions = true;\n    }\n\n    XmlReporter::~XmlReporter() = default;\n\n    std::string XmlReporter::getDescription() {\n        return \"Reports test results as an XML document\";\n    }\n\n    std::string XmlReporter::getStylesheetRef() const {\n        return std::string();\n    }\n\n    void XmlReporter::writeSourceInfo( SourceLineInfo const& sourceInfo ) {\n        m_xml\n            .writeAttribute( \"filename\", sourceInfo.file )\n            .writeAttribute( \"line\", sourceInfo.line );\n    }\n\n    void XmlReporter::noMatchingTestCases( std::string const& s ) {\n        StreamingReporterBase::noMatchingTestCases( s );\n    }\n\n    void XmlReporter::testRunStarting( TestRunInfo const& testInfo ) {\n        StreamingReporterBase::testRunStarting( testInfo );\n        std::string stylesheetRef = getStylesheetRef();\n        if( !stylesheetRef.empty() )\n            m_xml.writeStylesheetRef( stylesheetRef );\n        m_xml.startElement( \"Catch\" );\n        if( !m_config->name().empty() )\n            m_xml.writeAttribute( \"name\", m_config->name() );\n        if (m_config->testSpec().hasFilters())\n            m_xml.writeAttribute( \"filters\", serializeFilters( m_config->getTestsOrTags() ) );\n        if( m_config->rngSeed() != 0 )\n            m_xml.scopedElement( \"Randomness\" )\n                .writeAttribute( \"seed\", m_config->rngSeed() );\n    }\n\n    void XmlReporter::testGroupStarting( GroupInfo const& groupInfo ) {\n        StreamingReporterBase::testGroupStarting( groupInfo );\n        m_xml.startElement( \"Group\" )\n            .writeAttribute( \"name\", groupInfo.name );\n    }\n\n    void XmlReporter::testCaseStarting( TestCaseInfo const& testInfo ) {\n        StreamingReporterBase::testCaseStarting(testInfo);\n        m_xml.startElement( \"TestCase\" )\n            .writeAttribute( \"name\", trim( testInfo.name ) )\n            .writeAttribute( \"description\", testInfo.description )\n            .writeAttribute( \"tags\", testInfo.tagsAsString() );\n\n        writeSourceInfo( testInfo.lineInfo );\n\n        if ( m_config->showDurations() == ShowDurations::Always )\n            m_testCaseTimer.start();\n        m_xml.ensureTagClosed();\n    }\n\n    void XmlReporter::sectionStarting( SectionInfo const& sectionInfo ) {\n        StreamingReporterBase::sectionStarting( sectionInfo );\n        if( m_sectionDepth++ > 0 ) {\n            m_xml.startElement( \"Section\" )\n                .writeAttribute( \"name\", trim( sectionInfo.name ) );\n            writeSourceInfo( sectionInfo.lineInfo );\n            m_xml.ensureTagClosed();\n        }\n    }\n\n    void XmlReporter::assertionStarting( AssertionInfo const& ) { }\n\n    bool XmlReporter::assertionEnded( AssertionStats const& assertionStats ) {\n\n        AssertionResult const& result = assertionStats.assertionResult;\n\n        bool includeResults = m_config->includeSuccessfulResults() || !result.isOk();\n\n        if( includeResults || result.getResultType() == ResultWas::Warning ) {\n            // Print any info messages in <Info> tags.\n            for( auto const& msg : assertionStats.infoMessages ) {\n                if( msg.type == ResultWas::Info && includeResults ) {\n                    m_xml.scopedElement( \"Info\" )\n                            .writeText( msg.message );\n                } else if ( msg.type == ResultWas::Warning ) {\n                    m_xml.scopedElement( \"Warning\" )\n                            .writeText( msg.message );\n                }\n            }\n        }\n\n        // Drop out if result was successful but we're not printing them.\n        if( !includeResults && result.getResultType() != ResultWas::Warning )\n            return true;\n\n        // Print the expression if there is one.\n        if( result.hasExpression() ) {\n            m_xml.startElement( \"Expression\" )\n                .writeAttribute( \"success\", result.succeeded() )\n                .writeAttribute( \"type\", result.getTestMacroName() );\n\n            writeSourceInfo( result.getSourceInfo() );\n\n            m_xml.scopedElement( \"Original\" )\n                .writeText( result.getExpression() );\n            m_xml.scopedElement( \"Expanded\" )\n                .writeText( result.getExpandedExpression() );\n        }\n\n        // And... Print a result applicable to each result type.\n        switch( result.getResultType() ) {\n            case ResultWas::ThrewException:\n                m_xml.startElement( \"Exception\" );\n                writeSourceInfo( result.getSourceInfo() );\n                m_xml.writeText( result.getMessage() );\n                m_xml.endElement();\n                break;\n            case ResultWas::FatalErrorCondition:\n                m_xml.startElement( \"FatalErrorCondition\" );\n                writeSourceInfo( result.getSourceInfo() );\n                m_xml.writeText( result.getMessage() );\n                m_xml.endElement();\n                break;\n            case ResultWas::Info:\n                m_xml.scopedElement( \"Info\" )\n                    .writeText( result.getMessage() );\n                break;\n            case ResultWas::Warning:\n                // Warning will already have been written\n                break;\n            case ResultWas::ExplicitFailure:\n                m_xml.startElement( \"Failure\" );\n                writeSourceInfo( result.getSourceInfo() );\n                m_xml.writeText( result.getMessage() );\n                m_xml.endElement();\n                break;\n            default:\n                break;\n        }\n\n        if( result.hasExpression() )\n            m_xml.endElement();\n\n        return true;\n    }\n\n    void XmlReporter::sectionEnded( SectionStats const& sectionStats ) {\n        StreamingReporterBase::sectionEnded( sectionStats );\n        if( --m_sectionDepth > 0 ) {\n            XmlWriter::ScopedElement e = m_xml.scopedElement( \"OverallResults\" );\n            e.writeAttribute( \"successes\", sectionStats.assertions.passed );\n            e.writeAttribute( \"failures\", sectionStats.assertions.failed );\n            e.writeAttribute( \"expectedFailures\", sectionStats.assertions.failedButOk );\n\n            if ( m_config->showDurations() == ShowDurations::Always )\n                e.writeAttribute( \"durationInSeconds\", sectionStats.durationInSeconds );\n\n            m_xml.endElement();\n        }\n    }\n\n    void XmlReporter::testCaseEnded( TestCaseStats const& testCaseStats ) {\n        StreamingReporterBase::testCaseEnded( testCaseStats );\n        XmlWriter::ScopedElement e = m_xml.scopedElement( \"OverallResult\" );\n        e.writeAttribute( \"success\", testCaseStats.totals.assertions.allOk() );\n\n        if ( m_config->showDurations() == ShowDurations::Always )\n            e.writeAttribute( \"durationInSeconds\", m_testCaseTimer.getElapsedSeconds() );\n\n        if( !testCaseStats.stdOut.empty() )\n            m_xml.scopedElement( \"StdOut\" ).writeText( trim( testCaseStats.stdOut ), XmlFormatting::Newline );\n        if( !testCaseStats.stdErr.empty() )\n            m_xml.scopedElement( \"StdErr\" ).writeText( trim( testCaseStats.stdErr ), XmlFormatting::Newline );\n\n        m_xml.endElement();\n    }\n\n    void XmlReporter::testGroupEnded( TestGroupStats const& testGroupStats ) {\n        StreamingReporterBase::testGroupEnded( testGroupStats );\n        // TODO: Check testGroupStats.aborting and act accordingly.\n        m_xml.scopedElement( \"OverallResults\" )\n            .writeAttribute( \"successes\", testGroupStats.totals.assertions.passed )\n            .writeAttribute( \"failures\", testGroupStats.totals.assertions.failed )\n            .writeAttribute( \"expectedFailures\", testGroupStats.totals.assertions.failedButOk );\n        m_xml.scopedElement( \"OverallResultsCases\")\n            .writeAttribute( \"successes\", testGroupStats.totals.testCases.passed )\n            .writeAttribute( \"failures\", testGroupStats.totals.testCases.failed )\n            .writeAttribute( \"expectedFailures\", testGroupStats.totals.testCases.failedButOk );\n        m_xml.endElement();\n    }\n\n    void XmlReporter::testRunEnded( TestRunStats const& testRunStats ) {\n        StreamingReporterBase::testRunEnded( testRunStats );\n        m_xml.scopedElement( \"OverallResults\" )\n            .writeAttribute( \"successes\", testRunStats.totals.assertions.passed )\n            .writeAttribute( \"failures\", testRunStats.totals.assertions.failed )\n            .writeAttribute( \"expectedFailures\", testRunStats.totals.assertions.failedButOk );\n        m_xml.scopedElement( \"OverallResultsCases\")\n            .writeAttribute( \"successes\", testRunStats.totals.testCases.passed )\n            .writeAttribute( \"failures\", testRunStats.totals.testCases.failed )\n            .writeAttribute( \"expectedFailures\", testRunStats.totals.testCases.failedButOk );\n        m_xml.endElement();\n    }\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n    void XmlReporter::benchmarkPreparing(std::string const& name) {\n        m_xml.startElement(\"BenchmarkResults\")\n            .writeAttribute(\"name\", name);\n    }\n\n    void XmlReporter::benchmarkStarting(BenchmarkInfo const &info) {\n        m_xml.writeAttribute(\"samples\", info.samples)\n            .writeAttribute(\"resamples\", info.resamples)\n            .writeAttribute(\"iterations\", info.iterations)\n            .writeAttribute(\"clockResolution\", info.clockResolution)\n            .writeAttribute(\"estimatedDuration\", info.estimatedDuration)\n            .writeComment(\"All values in nano seconds\");\n    }\n\n    void XmlReporter::benchmarkEnded(BenchmarkStats<> const& benchmarkStats) {\n        m_xml.startElement(\"mean\")\n            .writeAttribute(\"value\", benchmarkStats.mean.point.count())\n            .writeAttribute(\"lowerBound\", benchmarkStats.mean.lower_bound.count())\n            .writeAttribute(\"upperBound\", benchmarkStats.mean.upper_bound.count())\n            .writeAttribute(\"ci\", benchmarkStats.mean.confidence_interval);\n        m_xml.endElement();\n        m_xml.startElement(\"standardDeviation\")\n            .writeAttribute(\"value\", benchmarkStats.standardDeviation.point.count())\n            .writeAttribute(\"lowerBound\", benchmarkStats.standardDeviation.lower_bound.count())\n            .writeAttribute(\"upperBound\", benchmarkStats.standardDeviation.upper_bound.count())\n            .writeAttribute(\"ci\", benchmarkStats.standardDeviation.confidence_interval);\n        m_xml.endElement();\n        m_xml.startElement(\"outliers\")\n            .writeAttribute(\"variance\", benchmarkStats.outlierVariance)\n            .writeAttribute(\"lowMild\", benchmarkStats.outliers.low_mild)\n            .writeAttribute(\"lowSevere\", benchmarkStats.outliers.low_severe)\n            .writeAttribute(\"highMild\", benchmarkStats.outliers.high_mild)\n            .writeAttribute(\"highSevere\", benchmarkStats.outliers.high_severe);\n        m_xml.endElement();\n        m_xml.endElement();\n    }\n\n    void XmlReporter::benchmarkFailed(std::string const &error) {\n        m_xml.scopedElement(\"failed\").\n            writeAttribute(\"message\", error);\n        m_xml.endElement();\n    }\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n\n    CATCH_REGISTER_REPORTER( \"xml\", XmlReporter )\n\n} // end namespace Catch\n\n#if defined(_MSC_VER)\n#pragma warning(pop)\n#endif\n// end catch_reporter_xml.cpp\n\nnamespace Catch {\n    LeakDetector leakDetector;\n}\n\n#ifdef __clang__\n#pragma clang diagnostic pop\n#endif\n\n// end catch_impl.hpp\n#endif\n\n#ifdef CATCH_CONFIG_MAIN\n// start catch_default_main.hpp\n\n#ifndef __OBJC__\n\n#ifndef CATCH_INTERNAL_CDECL\n#ifdef _MSC_VER\n#define CATCH_INTERNAL_CDECL __cdecl\n#else\n#define CATCH_INTERNAL_CDECL\n#endif\n#endif\n\n#if defined(CATCH_CONFIG_WCHAR) && defined(CATCH_PLATFORM_WINDOWS) && defined(_UNICODE) && !defined(DO_NOT_USE_WMAIN)\n// Standard C/C++ Win32 Unicode wmain entry point\nextern \"C\" int CATCH_INTERNAL_CDECL wmain (int argc, wchar_t * argv[], wchar_t * []) {\n#else\n// Standard C/C++ main entry point\nint CATCH_INTERNAL_CDECL main (int argc, char * argv[]) {\n#endif\n\n    return Catch::Session().run( argc, argv );\n}\n\n#else // __OBJC__\n\n// Objective-C entry point\nint main (int argc, char * const argv[]) {\n#if !CATCH_ARC_ENABLED\n    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];\n#endif\n\n    Catch::registerTestMethods();\n    int result = Catch::Session().run( argc, (char**)argv );\n\n#if !CATCH_ARC_ENABLED\n    [pool drain];\n#endif\n\n    return result;\n}\n\n#endif // __OBJC__\n\n// end catch_default_main.hpp\n#endif\n\n#if !defined(CATCH_CONFIG_IMPL_ONLY)\n\n#ifdef CLARA_CONFIG_MAIN_NOT_DEFINED\n#  undef CLARA_CONFIG_MAIN\n#endif\n\n#if !defined(CATCH_CONFIG_DISABLE)\n//////\n// If this config identifier is defined then all CATCH macros are prefixed with CATCH_\n#ifdef CATCH_CONFIG_PREFIX_ALL\n\n#define CATCH_REQUIRE( ... ) INTERNAL_CATCH_TEST( \"CATCH_REQUIRE\", Catch::ResultDisposition::Normal, __VA_ARGS__ )\n#define CATCH_REQUIRE_FALSE( ... ) INTERNAL_CATCH_TEST( \"CATCH_REQUIRE_FALSE\", Catch::ResultDisposition::Normal | Catch::ResultDisposition::FalseTest, __VA_ARGS__ )\n\n#define CATCH_REQUIRE_THROWS( ... ) INTERNAL_CATCH_THROWS( \"CATCH_REQUIRE_THROWS\", Catch::ResultDisposition::Normal, __VA_ARGS__ )\n#define CATCH_REQUIRE_THROWS_AS( expr, exceptionType ) INTERNAL_CATCH_THROWS_AS( \"CATCH_REQUIRE_THROWS_AS\", exceptionType, Catch::ResultDisposition::Normal, expr )\n#define CATCH_REQUIRE_THROWS_WITH( expr, matcher ) INTERNAL_CATCH_THROWS_STR_MATCHES( \"CATCH_REQUIRE_THROWS_WITH\", Catch::ResultDisposition::Normal, matcher, expr )\n#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)\n#define CATCH_REQUIRE_THROWS_MATCHES( expr, exceptionType, matcher ) INTERNAL_CATCH_THROWS_MATCHES( \"CATCH_REQUIRE_THROWS_MATCHES\", exceptionType, Catch::ResultDisposition::Normal, matcher, expr )\n#endif// CATCH_CONFIG_DISABLE_MATCHERS\n#define CATCH_REQUIRE_NOTHROW( ... ) INTERNAL_CATCH_NO_THROW( \"CATCH_REQUIRE_NOTHROW\", Catch::ResultDisposition::Normal, __VA_ARGS__ )\n\n#define CATCH_CHECK( ... ) INTERNAL_CATCH_TEST( \"CATCH_CHECK\", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )\n#define CATCH_CHECK_FALSE( ... ) INTERNAL_CATCH_TEST( \"CATCH_CHECK_FALSE\", Catch::ResultDisposition::ContinueOnFailure | Catch::ResultDisposition::FalseTest, __VA_ARGS__ )\n#define CATCH_CHECKED_IF( ... ) INTERNAL_CATCH_IF( \"CATCH_CHECKED_IF\", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )\n#define CATCH_CHECKED_ELSE( ... ) INTERNAL_CATCH_ELSE( \"CATCH_CHECKED_ELSE\", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )\n#define CATCH_CHECK_NOFAIL( ... ) INTERNAL_CATCH_TEST( \"CATCH_CHECK_NOFAIL\", Catch::ResultDisposition::ContinueOnFailure | Catch::ResultDisposition::SuppressFail, __VA_ARGS__ )\n\n#define CATCH_CHECK_THROWS( ... )  INTERNAL_CATCH_THROWS( \"CATCH_CHECK_THROWS\", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )\n#define CATCH_CHECK_THROWS_AS( expr, exceptionType ) INTERNAL_CATCH_THROWS_AS( \"CATCH_CHECK_THROWS_AS\", exceptionType, Catch::ResultDisposition::ContinueOnFailure, expr )\n#define CATCH_CHECK_THROWS_WITH( expr, matcher ) INTERNAL_CATCH_THROWS_STR_MATCHES( \"CATCH_CHECK_THROWS_WITH\", Catch::ResultDisposition::ContinueOnFailure, matcher, expr )\n#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)\n#define CATCH_CHECK_THROWS_MATCHES( expr, exceptionType, matcher ) INTERNAL_CATCH_THROWS_MATCHES( \"CATCH_CHECK_THROWS_MATCHES\", exceptionType, Catch::ResultDisposition::ContinueOnFailure, matcher, expr )\n#endif // CATCH_CONFIG_DISABLE_MATCHERS\n#define CATCH_CHECK_NOTHROW( ... ) INTERNAL_CATCH_NO_THROW( \"CATCH_CHECK_NOTHROW\", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )\n\n#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)\n#define CATCH_CHECK_THAT( arg, matcher ) INTERNAL_CHECK_THAT( \"CATCH_CHECK_THAT\", matcher, Catch::ResultDisposition::ContinueOnFailure, arg )\n\n#define CATCH_REQUIRE_THAT( arg, matcher ) INTERNAL_CHECK_THAT( \"CATCH_REQUIRE_THAT\", matcher, Catch::ResultDisposition::Normal, arg )\n#endif // CATCH_CONFIG_DISABLE_MATCHERS\n\n#define CATCH_INFO( msg ) INTERNAL_CATCH_INFO( \"CATCH_INFO\", msg )\n#define CATCH_UNSCOPED_INFO( msg ) INTERNAL_CATCH_UNSCOPED_INFO( \"CATCH_UNSCOPED_INFO\", msg )\n#define CATCH_WARN( msg ) INTERNAL_CATCH_MSG( \"CATCH_WARN\", Catch::ResultWas::Warning, Catch::ResultDisposition::ContinueOnFailure, msg )\n#define CATCH_CAPTURE( ... ) INTERNAL_CATCH_CAPTURE( INTERNAL_CATCH_UNIQUE_NAME(capturer), \"CATCH_CAPTURE\",__VA_ARGS__ )\n\n#define CATCH_TEST_CASE( ... ) INTERNAL_CATCH_TESTCASE( __VA_ARGS__ )\n#define CATCH_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEST_CASE_METHOD( className, __VA_ARGS__ )\n#define CATCH_METHOD_AS_TEST_CASE( method, ... ) INTERNAL_CATCH_METHOD_AS_TEST_CASE( method, __VA_ARGS__ )\n#define CATCH_REGISTER_TEST_CASE( Function, ... ) INTERNAL_CATCH_REGISTER_TESTCASE( Function, __VA_ARGS__ )\n#define CATCH_SECTION( ... ) INTERNAL_CATCH_SECTION( __VA_ARGS__ )\n#define CATCH_DYNAMIC_SECTION( ... ) INTERNAL_CATCH_DYNAMIC_SECTION( __VA_ARGS__ )\n#define CATCH_FAIL( ... ) INTERNAL_CATCH_MSG( \"CATCH_FAIL\", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::Normal, __VA_ARGS__ )\n#define CATCH_FAIL_CHECK( ... ) INTERNAL_CATCH_MSG( \"CATCH_FAIL_CHECK\", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )\n#define CATCH_SUCCEED( ... ) INTERNAL_CATCH_MSG( \"CATCH_SUCCEED\", Catch::ResultWas::Ok, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )\n\n#define CATCH_ANON_TEST_CASE() INTERNAL_CATCH_TESTCASE()\n\n#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n#define CATCH_TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ )\n#define CATCH_TEMPLATE_TEST_CASE_SIG( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG( __VA_ARGS__ )\n#define CATCH_TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )\n#define CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( className, __VA_ARGS__ )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE( __VA_ARGS__ )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG( ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG( __VA_ARGS__ )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, __VA_ARGS__ )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, __VA_ARGS__ )\n#else\n#define CATCH_TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ ) )\n#define CATCH_TEMPLATE_TEST_CASE_SIG( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG( __VA_ARGS__ ) )\n#define CATCH_TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ ) )\n#define CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( className, __VA_ARGS__ ) )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE( __VA_ARGS__ ) )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG( __VA_ARGS__ ) )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, __VA_ARGS__ ) )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, __VA_ARGS__ ) )\n#endif\n\n#if !defined(CATCH_CONFIG_RUNTIME_STATIC_REQUIRE)\n#define CATCH_STATIC_REQUIRE( ... )       static_assert(   __VA_ARGS__ ,      #__VA_ARGS__ );     CATCH_SUCCEED( #__VA_ARGS__ )\n#define CATCH_STATIC_REQUIRE_FALSE( ... ) static_assert( !(__VA_ARGS__), \"!(\" #__VA_ARGS__ \")\" ); CATCH_SUCCEED( #__VA_ARGS__ )\n#else\n#define CATCH_STATIC_REQUIRE( ... )       CATCH_REQUIRE( __VA_ARGS__ )\n#define CATCH_STATIC_REQUIRE_FALSE( ... ) CATCH_REQUIRE_FALSE( __VA_ARGS__ )\n#endif\n\n// \"BDD-style\" convenience wrappers\n#define CATCH_SCENARIO( ... ) CATCH_TEST_CASE( \"Scenario: \" __VA_ARGS__ )\n#define CATCH_SCENARIO_METHOD( className, ... ) INTERNAL_CATCH_TEST_CASE_METHOD( className, \"Scenario: \" __VA_ARGS__ )\n#define CATCH_GIVEN( desc )     INTERNAL_CATCH_DYNAMIC_SECTION( \"    Given: \" << desc )\n#define CATCH_AND_GIVEN( desc ) INTERNAL_CATCH_DYNAMIC_SECTION( \"And given: \" << desc )\n#define CATCH_WHEN( desc )      INTERNAL_CATCH_DYNAMIC_SECTION( \"     When: \" << desc )\n#define CATCH_AND_WHEN( desc )  INTERNAL_CATCH_DYNAMIC_SECTION( \" And when: \" << desc )\n#define CATCH_THEN( desc )      INTERNAL_CATCH_DYNAMIC_SECTION( \"     Then: \" << desc )\n#define CATCH_AND_THEN( desc )  INTERNAL_CATCH_DYNAMIC_SECTION( \"      And: \" << desc )\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n#define CATCH_BENCHMARK(...) \\\n    INTERNAL_CATCH_BENCHMARK(INTERNAL_CATCH_UNIQUE_NAME(C_A_T_C_H_B_E_N_C_H_), INTERNAL_CATCH_GET_1_ARG(__VA_ARGS__,,), INTERNAL_CATCH_GET_2_ARG(__VA_ARGS__,,))\n#define CATCH_BENCHMARK_ADVANCED(name) \\\n    INTERNAL_CATCH_BENCHMARK_ADVANCED(INTERNAL_CATCH_UNIQUE_NAME(C_A_T_C_H_B_E_N_C_H_), name)\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n\n// If CATCH_CONFIG_PREFIX_ALL is not defined then the CATCH_ prefix is not required\n#else\n\n#define REQUIRE( ... ) INTERNAL_CATCH_TEST( \"REQUIRE\", Catch::ResultDisposition::Normal, __VA_ARGS__  )\n#define REQUIRE_FALSE( ... ) INTERNAL_CATCH_TEST( \"REQUIRE_FALSE\", Catch::ResultDisposition::Normal | Catch::ResultDisposition::FalseTest, __VA_ARGS__ )\n\n#define REQUIRE_THROWS( ... ) INTERNAL_CATCH_THROWS( \"REQUIRE_THROWS\", Catch::ResultDisposition::Normal, __VA_ARGS__ )\n#define REQUIRE_THROWS_AS( expr, exceptionType ) INTERNAL_CATCH_THROWS_AS( \"REQUIRE_THROWS_AS\", exceptionType, Catch::ResultDisposition::Normal, expr )\n#define REQUIRE_THROWS_WITH( expr, matcher ) INTERNAL_CATCH_THROWS_STR_MATCHES( \"REQUIRE_THROWS_WITH\", Catch::ResultDisposition::Normal, matcher, expr )\n#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)\n#define REQUIRE_THROWS_MATCHES( expr, exceptionType, matcher ) INTERNAL_CATCH_THROWS_MATCHES( \"REQUIRE_THROWS_MATCHES\", exceptionType, Catch::ResultDisposition::Normal, matcher, expr )\n#endif // CATCH_CONFIG_DISABLE_MATCHERS\n#define REQUIRE_NOTHROW( ... ) INTERNAL_CATCH_NO_THROW( \"REQUIRE_NOTHROW\", Catch::ResultDisposition::Normal, __VA_ARGS__ )\n\n#define CHECK( ... ) INTERNAL_CATCH_TEST( \"CHECK\", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )\n#define CHECK_FALSE( ... ) INTERNAL_CATCH_TEST( \"CHECK_FALSE\", Catch::ResultDisposition::ContinueOnFailure | Catch::ResultDisposition::FalseTest, __VA_ARGS__ )\n#define CHECKED_IF( ... ) INTERNAL_CATCH_IF( \"CHECKED_IF\", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )\n#define CHECKED_ELSE( ... ) INTERNAL_CATCH_ELSE( \"CHECKED_ELSE\", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )\n#define CHECK_NOFAIL( ... ) INTERNAL_CATCH_TEST( \"CHECK_NOFAIL\", Catch::ResultDisposition::ContinueOnFailure | Catch::ResultDisposition::SuppressFail, __VA_ARGS__ )\n\n#define CHECK_THROWS( ... )  INTERNAL_CATCH_THROWS( \"CHECK_THROWS\", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )\n#define CHECK_THROWS_AS( expr, exceptionType ) INTERNAL_CATCH_THROWS_AS( \"CHECK_THROWS_AS\", exceptionType, Catch::ResultDisposition::ContinueOnFailure, expr )\n#define CHECK_THROWS_WITH( expr, matcher ) INTERNAL_CATCH_THROWS_STR_MATCHES( \"CHECK_THROWS_WITH\", Catch::ResultDisposition::ContinueOnFailure, matcher, expr )\n#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)\n#define CHECK_THROWS_MATCHES( expr, exceptionType, matcher ) INTERNAL_CATCH_THROWS_MATCHES( \"CHECK_THROWS_MATCHES\", exceptionType, Catch::ResultDisposition::ContinueOnFailure, matcher, expr )\n#endif // CATCH_CONFIG_DISABLE_MATCHERS\n#define CHECK_NOTHROW( ... ) INTERNAL_CATCH_NO_THROW( \"CHECK_NOTHROW\", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )\n\n#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)\n#define CHECK_THAT( arg, matcher ) INTERNAL_CHECK_THAT( \"CHECK_THAT\", matcher, Catch::ResultDisposition::ContinueOnFailure, arg )\n\n#define REQUIRE_THAT( arg, matcher ) INTERNAL_CHECK_THAT( \"REQUIRE_THAT\", matcher, Catch::ResultDisposition::Normal, arg )\n#endif // CATCH_CONFIG_DISABLE_MATCHERS\n\n#define INFO( msg ) INTERNAL_CATCH_INFO( \"INFO\", msg )\n#define UNSCOPED_INFO( msg ) INTERNAL_CATCH_UNSCOPED_INFO( \"UNSCOPED_INFO\", msg )\n#define WARN( msg ) INTERNAL_CATCH_MSG( \"WARN\", Catch::ResultWas::Warning, Catch::ResultDisposition::ContinueOnFailure, msg )\n#define CAPTURE( ... ) INTERNAL_CATCH_CAPTURE( INTERNAL_CATCH_UNIQUE_NAME(capturer), \"CAPTURE\",__VA_ARGS__ )\n\n#define TEST_CASE( ... ) INTERNAL_CATCH_TESTCASE( __VA_ARGS__ )\n#define TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEST_CASE_METHOD( className, __VA_ARGS__ )\n#define METHOD_AS_TEST_CASE( method, ... ) INTERNAL_CATCH_METHOD_AS_TEST_CASE( method, __VA_ARGS__ )\n#define REGISTER_TEST_CASE( Function, ... ) INTERNAL_CATCH_REGISTER_TESTCASE( Function, __VA_ARGS__ )\n#define SECTION( ... ) INTERNAL_CATCH_SECTION( __VA_ARGS__ )\n#define DYNAMIC_SECTION( ... ) INTERNAL_CATCH_DYNAMIC_SECTION( __VA_ARGS__ )\n#define FAIL( ... ) INTERNAL_CATCH_MSG( \"FAIL\", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::Normal, __VA_ARGS__ )\n#define FAIL_CHECK( ... ) INTERNAL_CATCH_MSG( \"FAIL_CHECK\", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )\n#define SUCCEED( ... ) INTERNAL_CATCH_MSG( \"SUCCEED\", Catch::ResultWas::Ok, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )\n#define ANON_TEST_CASE() INTERNAL_CATCH_TESTCASE()\n\n#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n#define TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ )\n#define TEMPLATE_TEST_CASE_SIG( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG( __VA_ARGS__ )\n#define TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )\n#define TEMPLATE_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( className, __VA_ARGS__ )\n#define TEMPLATE_PRODUCT_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE( __VA_ARGS__ )\n#define TEMPLATE_PRODUCT_TEST_CASE_SIG( ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG( __VA_ARGS__ )\n#define TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, __VA_ARGS__ )\n#define TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, __VA_ARGS__ )\n#define TEMPLATE_LIST_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE(__VA_ARGS__)\n#define TEMPLATE_LIST_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_METHOD( className, __VA_ARGS__ )\n#else\n#define TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ ) )\n#define TEMPLATE_TEST_CASE_SIG( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG( __VA_ARGS__ ) )\n#define TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ ) )\n#define TEMPLATE_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( className, __VA_ARGS__ ) )\n#define TEMPLATE_PRODUCT_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE( __VA_ARGS__ ) )\n#define TEMPLATE_PRODUCT_TEST_CASE_SIG( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG( __VA_ARGS__ ) )\n#define TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, __VA_ARGS__ ) )\n#define TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, __VA_ARGS__ ) )\n#define TEMPLATE_LIST_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE( __VA_ARGS__ ) )\n#define TEMPLATE_LIST_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_METHOD( className, __VA_ARGS__ ) )\n#endif\n\n#if !defined(CATCH_CONFIG_RUNTIME_STATIC_REQUIRE)\n#define STATIC_REQUIRE( ... )       static_assert(   __VA_ARGS__,  #__VA_ARGS__ ); SUCCEED( #__VA_ARGS__ )\n#define STATIC_REQUIRE_FALSE( ... ) static_assert( !(__VA_ARGS__), \"!(\" #__VA_ARGS__ \")\" ); SUCCEED( \"!(\" #__VA_ARGS__ \")\" )\n#else\n#define STATIC_REQUIRE( ... )       REQUIRE( __VA_ARGS__ )\n#define STATIC_REQUIRE_FALSE( ... ) REQUIRE_FALSE( __VA_ARGS__ )\n#endif\n\n#endif\n\n#define CATCH_TRANSLATE_EXCEPTION( signature ) INTERNAL_CATCH_TRANSLATE_EXCEPTION( signature )\n\n// \"BDD-style\" convenience wrappers\n#define SCENARIO( ... ) TEST_CASE( \"Scenario: \" __VA_ARGS__ )\n#define SCENARIO_METHOD( className, ... ) INTERNAL_CATCH_TEST_CASE_METHOD( className, \"Scenario: \" __VA_ARGS__ )\n\n#define GIVEN( desc )     INTERNAL_CATCH_DYNAMIC_SECTION( \"    Given: \" << desc )\n#define AND_GIVEN( desc ) INTERNAL_CATCH_DYNAMIC_SECTION( \"And given: \" << desc )\n#define WHEN( desc )      INTERNAL_CATCH_DYNAMIC_SECTION( \"     When: \" << desc )\n#define AND_WHEN( desc )  INTERNAL_CATCH_DYNAMIC_SECTION( \" And when: \" << desc )\n#define THEN( desc )      INTERNAL_CATCH_DYNAMIC_SECTION( \"     Then: \" << desc )\n#define AND_THEN( desc )  INTERNAL_CATCH_DYNAMIC_SECTION( \"      And: \" << desc )\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n#define BENCHMARK(...) \\\n    INTERNAL_CATCH_BENCHMARK(INTERNAL_CATCH_UNIQUE_NAME(C_A_T_C_H_B_E_N_C_H_), INTERNAL_CATCH_GET_1_ARG(__VA_ARGS__,,), INTERNAL_CATCH_GET_2_ARG(__VA_ARGS__,,))\n#define BENCHMARK_ADVANCED(name) \\\n    INTERNAL_CATCH_BENCHMARK_ADVANCED(INTERNAL_CATCH_UNIQUE_NAME(C_A_T_C_H_B_E_N_C_H_), name)\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n\nusing Catch::Detail::Approx;\n\n#else // CATCH_CONFIG_DISABLE\n\n//////\n// If this config identifier is defined then all CATCH macros are prefixed with CATCH_\n#ifdef CATCH_CONFIG_PREFIX_ALL\n\n#define CATCH_REQUIRE( ... )        (void)(0)\n#define CATCH_REQUIRE_FALSE( ... )  (void)(0)\n\n#define CATCH_REQUIRE_THROWS( ... ) (void)(0)\n#define CATCH_REQUIRE_THROWS_AS( expr, exceptionType ) (void)(0)\n#define CATCH_REQUIRE_THROWS_WITH( expr, matcher )     (void)(0)\n#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)\n#define CATCH_REQUIRE_THROWS_MATCHES( expr, exceptionType, matcher ) (void)(0)\n#endif// CATCH_CONFIG_DISABLE_MATCHERS\n#define CATCH_REQUIRE_NOTHROW( ... ) (void)(0)\n\n#define CATCH_CHECK( ... )         (void)(0)\n#define CATCH_CHECK_FALSE( ... )   (void)(0)\n#define CATCH_CHECKED_IF( ... )    if (__VA_ARGS__)\n#define CATCH_CHECKED_ELSE( ... )  if (!(__VA_ARGS__))\n#define CATCH_CHECK_NOFAIL( ... )  (void)(0)\n\n#define CATCH_CHECK_THROWS( ... )  (void)(0)\n#define CATCH_CHECK_THROWS_AS( expr, exceptionType ) (void)(0)\n#define CATCH_CHECK_THROWS_WITH( expr, matcher )     (void)(0)\n#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)\n#define CATCH_CHECK_THROWS_MATCHES( expr, exceptionType, matcher ) (void)(0)\n#endif // CATCH_CONFIG_DISABLE_MATCHERS\n#define CATCH_CHECK_NOTHROW( ... ) (void)(0)\n\n#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)\n#define CATCH_CHECK_THAT( arg, matcher )   (void)(0)\n\n#define CATCH_REQUIRE_THAT( arg, matcher ) (void)(0)\n#endif // CATCH_CONFIG_DISABLE_MATCHERS\n\n#define CATCH_INFO( msg )          (void)(0)\n#define CATCH_UNSCOPED_INFO( msg ) (void)(0)\n#define CATCH_WARN( msg )          (void)(0)\n#define CATCH_CAPTURE( msg )       (void)(0)\n\n#define CATCH_TEST_CASE( ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ ))\n#define CATCH_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ ))\n#define CATCH_METHOD_AS_TEST_CASE( method, ... )\n#define CATCH_REGISTER_TEST_CASE( Function, ... ) (void)(0)\n#define CATCH_SECTION( ... )\n#define CATCH_DYNAMIC_SECTION( ... )\n#define CATCH_FAIL( ... ) (void)(0)\n#define CATCH_FAIL_CHECK( ... ) (void)(0)\n#define CATCH_SUCCEED( ... ) (void)(0)\n\n#define CATCH_ANON_TEST_CASE() INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ ))\n\n#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n#define CATCH_TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(__VA_ARGS__)\n#define CATCH_TEMPLATE_TEST_CASE_SIG( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG_NO_REGISTRATION(__VA_ARGS__)\n#define CATCH_TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION(className, __VA_ARGS__)\n#define CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG_NO_REGISTRATION(className, __VA_ARGS__ )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE( ... ) CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG( ... ) CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) CATCH_TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, ... ) CATCH_TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )\n#else\n#define CATCH_TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(__VA_ARGS__) )\n#define CATCH_TEMPLATE_TEST_CASE_SIG( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG_NO_REGISTRATION(__VA_ARGS__) )\n#define CATCH_TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION(className, __VA_ARGS__ ) )\n#define CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG_NO_REGISTRATION(className, __VA_ARGS__ ) )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE( ... ) CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG( ... ) CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) CATCH_TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, ... ) CATCH_TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )\n#endif\n\n// \"BDD-style\" convenience wrappers\n#define CATCH_SCENARIO( ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ ))\n#define CATCH_SCENARIO_METHOD( className, ... ) INTERNAL_CATCH_TESTCASE_METHOD_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ ), className )\n#define CATCH_GIVEN( desc )\n#define CATCH_AND_GIVEN( desc )\n#define CATCH_WHEN( desc )\n#define CATCH_AND_WHEN( desc )\n#define CATCH_THEN( desc )\n#define CATCH_AND_THEN( desc )\n\n#define CATCH_STATIC_REQUIRE( ... )       (void)(0)\n#define CATCH_STATIC_REQUIRE_FALSE( ... ) (void)(0)\n\n// If CATCH_CONFIG_PREFIX_ALL is not defined then the CATCH_ prefix is not required\n#else\n\n#define REQUIRE( ... )       (void)(0)\n#define REQUIRE_FALSE( ... ) (void)(0)\n\n#define REQUIRE_THROWS( ... ) (void)(0)\n#define REQUIRE_THROWS_AS( expr, exceptionType ) (void)(0)\n#define REQUIRE_THROWS_WITH( expr, matcher ) (void)(0)\n#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)\n#define REQUIRE_THROWS_MATCHES( expr, exceptionType, matcher ) (void)(0)\n#endif // CATCH_CONFIG_DISABLE_MATCHERS\n#define REQUIRE_NOTHROW( ... ) (void)(0)\n\n#define CHECK( ... ) (void)(0)\n#define CHECK_FALSE( ... ) (void)(0)\n#define CHECKED_IF( ... ) if (__VA_ARGS__)\n#define CHECKED_ELSE( ... ) if (!(__VA_ARGS__))\n#define CHECK_NOFAIL( ... ) (void)(0)\n\n#define CHECK_THROWS( ... )  (void)(0)\n#define CHECK_THROWS_AS( expr, exceptionType ) (void)(0)\n#define CHECK_THROWS_WITH( expr, matcher ) (void)(0)\n#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)\n#define CHECK_THROWS_MATCHES( expr, exceptionType, matcher ) (void)(0)\n#endif // CATCH_CONFIG_DISABLE_MATCHERS\n#define CHECK_NOTHROW( ... ) (void)(0)\n\n#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)\n#define CHECK_THAT( arg, matcher ) (void)(0)\n\n#define REQUIRE_THAT( arg, matcher ) (void)(0)\n#endif // CATCH_CONFIG_DISABLE_MATCHERS\n\n#define INFO( msg ) (void)(0)\n#define UNSCOPED_INFO( msg ) (void)(0)\n#define WARN( msg ) (void)(0)\n#define CAPTURE( ... ) (void)(0)\n\n#define TEST_CASE( ... )  INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ ))\n#define TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ ))\n#define METHOD_AS_TEST_CASE( method, ... )\n#define REGISTER_TEST_CASE( Function, ... ) (void)(0)\n#define SECTION( ... )\n#define DYNAMIC_SECTION( ... )\n#define FAIL( ... ) (void)(0)\n#define FAIL_CHECK( ... ) (void)(0)\n#define SUCCEED( ... ) (void)(0)\n#define ANON_TEST_CASE() INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ ))\n\n#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n#define TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(__VA_ARGS__)\n#define TEMPLATE_TEST_CASE_SIG( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG_NO_REGISTRATION(__VA_ARGS__)\n#define TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION(className, __VA_ARGS__)\n#define TEMPLATE_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG_NO_REGISTRATION(className, __VA_ARGS__ )\n#define TEMPLATE_PRODUCT_TEST_CASE( ... ) TEMPLATE_TEST_CASE( __VA_ARGS__ )\n#define TEMPLATE_PRODUCT_TEST_CASE_SIG( ... ) TEMPLATE_TEST_CASE( __VA_ARGS__ )\n#define TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )\n#define TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, ... ) TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )\n#else\n#define TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(__VA_ARGS__) )\n#define TEMPLATE_TEST_CASE_SIG( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG_NO_REGISTRATION(__VA_ARGS__) )\n#define TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION(className, __VA_ARGS__ ) )\n#define TEMPLATE_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG_NO_REGISTRATION(className, __VA_ARGS__ ) )\n#define TEMPLATE_PRODUCT_TEST_CASE( ... ) TEMPLATE_TEST_CASE( __VA_ARGS__ )\n#define TEMPLATE_PRODUCT_TEST_CASE_SIG( ... ) TEMPLATE_TEST_CASE( __VA_ARGS__ )\n#define TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )\n#define TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, ... ) TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )\n#endif\n\n#define STATIC_REQUIRE( ... )       (void)(0)\n#define STATIC_REQUIRE_FALSE( ... ) (void)(0)\n\n#endif\n\n#define CATCH_TRANSLATE_EXCEPTION( signature ) INTERNAL_CATCH_TRANSLATE_EXCEPTION_NO_REG( INTERNAL_CATCH_UNIQUE_NAME( catch_internal_ExceptionTranslator ), signature )\n\n// \"BDD-style\" convenience wrappers\n#define SCENARIO( ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ ) )\n#define SCENARIO_METHOD( className, ... ) INTERNAL_CATCH_TESTCASE_METHOD_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ ), className )\n\n#define GIVEN( desc )\n#define AND_GIVEN( desc )\n#define WHEN( desc )\n#define AND_WHEN( desc )\n#define THEN( desc )\n#define AND_THEN( desc )\n\nusing Catch::Detail::Approx;\n\n#endif\n\n#endif // ! CATCH_CONFIG_IMPL_ONLY\n\n// start catch_reenable_warnings.h\n\n\n#ifdef __clang__\n#    ifdef __ICC // icpc defines the __clang__ macro\n#        pragma warning(pop)\n#    else\n#        pragma clang diagnostic pop\n#    endif\n#elif defined __GNUC__\n#    pragma GCC diagnostic pop\n#endif\n\n// end catch_reenable_warnings.h\n// end catch.hpp\n#endif // TWOBLUECUBES_SINGLE_INCLUDE_CATCH_HPP_INCLUDED\n\n"
  },
  {
    "path": "lexilla/test/unit/makefile",
    "content": "# Build all the unit tests using GNU make and either g++ or clang\n# Should be run using mingw32-make on Windows, not nmake\n# On Windows g++ is used, on macOS clang, and on Linux G++ is used by default\n# but clang can be used by defining CLANG when invoking make\n# clang works only with libc++, not libstdc++\n# Tested with clang 9 and g++ 9\n\nCXXSTD=c++17\n\nifndef windir\nifeq ($(shell uname),Darwin)\n# On macOS always use clang as g++ is old version\nCLANG = 1\nUSELIBCPP = 1\nendif\nendif\n\nCXXFLAGS += --std=$(CXXSTD)\n\nifdef CLANG\nCXX = clang++\nifdef USELIBCPP\n# macOS, use libc++ but don't have sanitizers\nCXXFLAGS += --stdlib=libc++\nelse\n# Linux, have sanitizers\nSANITIZE = -fsanitize=address,undefined\nCXXFLAGS += $(SANITIZE)\nendif\nelse\nCXX = g++\nendif\n\nifdef windir\nDEL = del /q\nEXE = unitTest.exe\nelse\nDEL = rm -f\nEXE = unitTest\nendif\n\nvpath %.cxx ../../lexlib\n\nINCLUDEDIRS = -I ../../include -I../../lexlib -I../../../scintilla/include\n\nCPPFLAGS += $(INCLUDEDIRS)\nCXXFLAGS += -Wall -Wextra\n\n# Files in this directory containing tests\nTESTSRC=$(wildcard test*.cxx)\nTESTOBJ=$(TESTSRC:.cxx=.o)\n\n# Files being tested from lexilla/lexlib directory\nTESTEDOBJ=\\\n Accessor.o \\\n CharacterSet.o \\\n InList.o \\\n LexerBase.o \\\n LexerModule.o \\\n LexerSimple.o \\\n PropSetSimple.o \\\n WordList.o\n\nTESTS=$(EXE)\n\nall: $(TESTS)\n\ntest: $(TESTS)\n\t./$(EXE)\n\nclean:\n\t$(DEL) $(TESTS) *.o *.obj *.exe\n\n%.o: %.cxx\n\t$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@\n\n$(EXE): $(TESTOBJ) $(TESTEDOBJ) unitTest.o\n\t$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LINKFLAGS) $^ -o $@\n"
  },
  {
    "path": "lexilla/test/unit/test.mak",
    "content": "# Build all the unit tests with Microsoft Visual C++ using nmake\n# Tested with Visual C++ 2019\n\nDEL = del /q\nEXE = unitTest.exe\n\nINCLUDEDIRS = /I../../include /I../../lexlib /I../../../scintilla/include\n\nCXXFLAGS = /EHsc /std:c++17 /D_HAS_AUTO_PTR_ETC=1 /wd 4805 $(INCLUDEDIRS)\n\n# Files in this directory containing tests\nTESTSRC=test*.cxx\n# Files being tested from scintilla/src directory\nTESTEDSRC=\\\n ../../lexlib/Accessor.cxx \\\n ../../lexlib/CharacterSet.cxx \\\n ../../lexlib/InList.cxx \\\n ../../lexlib/LexerBase.cxx \\\n ../../lexlib/LexerModule.cxx \\\n ../../lexlib/LexerSimple.cxx \\\n ../../lexlib/PropSetSimple.cxx \\\n ../../lexlib/WordList.cxx\n\nTESTS=$(EXE)\n\nall: $(TESTS)\n\ntest: $(TESTS)\n\t$(EXE)\n\nclean:\n\t$(DEL) $(TESTS) *.o *.obj *.exe\n\n$(EXE): $(TESTSRC) $(TESTEDSRC) $(@B).obj\n\t$(CXX) $(CXXFLAGS) /Fe$@ $**\n"
  },
  {
    "path": "lexilla/test/unit/testCharacterSet.cxx",
    "content": "/** @file testCharacterSet.cxx\n ** Unit Tests for Lexilla internal data structures\n **/\n\n#include <cstdlib>\n#include <cassert>\n\n#include <string_view>\n\n#include \"CharacterSet.h\"\n\n#include \"catch.hpp\"\n\nusing namespace Lexilla;\n\n// Test CharacterSet.\n\nTEST_CASE(\"CharacterSet\") {\n\n\tSECTION(\"IsEmptyInitially\") {\n\t\tCharacterSet cs;\n\t\tfor (int i=0; i<0x80; i++) {\n\t\t\tREQUIRE(!cs.Contains(i));\n\t\t}\n\t}\n\n\tSECTION(\"InitialSet\") {\n\t\tCharacterSet cs(CharacterSet::setDigits);\n\t\tfor (int i=0; i<0x80; i++) {\n\t\t\tif (i >= '0' && i <= '9')\n\t\t\t\tREQUIRE(cs.Contains(i));\n\t\t\telse\n\t\t\t\tREQUIRE(!cs.Contains(i));\n\t\t}\n\t}\n\n\tSECTION(\"Set\") {\n\t\tCharacterSet cs;\n\t\tcs.Add('a');\n\t\tfor (int i=0; i<0x80; i++) {\n\t\t\tif (i == 'a')\n\t\t\t\tREQUIRE(cs.Contains(i));\n\t\t\telse\n\t\t\t\tREQUIRE(!cs.Contains(i));\n\t\t}\n\t}\n\n\tSECTION(\"After\") {\n\t\tCharacterSet cs;\n\t\tREQUIRE(!cs.Contains(0x100));\n\t\tCharacterSet cs2(CharacterSet::setNone, \"\", 0x80, true);\n\t\tREQUIRE(cs2.Contains(0x100));\n\t}\n}\n\nTEST_CASE(\"Functions\") {\n\n\tSECTION(\"IsASpace\") {\n\t\tREQUIRE(IsASpace(' '));\n\t\tREQUIRE(!IsASpace('a'));\n\n\t\tREQUIRE(IsASpaceOrTab(' '));\n\t\tREQUIRE(!IsASpaceOrTab('a'));\n\t}\n\n\tSECTION(\"IsADigit\") {\n\t\tREQUIRE(!IsADigit(' '));\n\t\tREQUIRE(!IsADigit('a'));\n\t\tREQUIRE(IsADigit('7'));\n\n\t\tREQUIRE(IsADigit('7', 16));\n\t\tREQUIRE(IsADigit('A', 16));\n\t\tREQUIRE(IsADigit('a', 16));\n\t\tREQUIRE(!IsADigit('8', 8));\n\t}\n\n\tSECTION(\"IsASCII\") {\n\t\tREQUIRE(IsASCII(' '));\n\t\tREQUIRE(IsASCII('a'));\n\t\tREQUIRE(!IsASCII(-1));\n\t\tREQUIRE(!IsASCII(128));\n\t}\n\n\tSECTION(\"IsUpperOrLowerCase\") {\n\t\tREQUIRE(IsLowerCase('a'));\n\t\tREQUIRE(!IsLowerCase('A'));\n\n\t\tREQUIRE(!IsUpperCase('a'));\n\t\tREQUIRE(IsUpperCase('A'));\n\n\t\tREQUIRE(IsUpperOrLowerCase('a'));\n\t\tREQUIRE(IsUpperOrLowerCase('A'));\n\t\tREQUIRE(!IsUpperOrLowerCase('9'));\n\n\t\tREQUIRE(IsAlphaNumeric('9'));\n\t\tREQUIRE(IsAlphaNumeric('a'));\n\t\tREQUIRE(IsAlphaNumeric('A'));\n\t\tREQUIRE(!IsAlphaNumeric(' '));\n\t\tREQUIRE(!IsAlphaNumeric('+'));\n\t}\n\n\tSECTION(\"isoperator\") {\n\t\tREQUIRE(isspacechar(' '));\n\t\tREQUIRE(!isspacechar('a'));\n\n\t\tREQUIRE(!iswordchar(' '));\n\t\tREQUIRE(iswordchar('a'));\n\t\tREQUIRE(iswordchar('A'));\n\t\tREQUIRE(iswordchar('.'));\n\t\tREQUIRE(iswordchar('_'));\n\n\t\tREQUIRE(!iswordstart(' '));\n\t\tREQUIRE(iswordstart('a'));\n\t\tREQUIRE(iswordstart('A'));\n\t\tREQUIRE(iswordstart('_'));\n\n\t\tREQUIRE(!isoperator('a'));\n\t\tREQUIRE(isoperator('+'));\n\t}\n\n\tSECTION(\"MakeUpperCase\") {\n\t\tREQUIRE(MakeUpperCase(' ') == ' ');\n\t\tREQUIRE(MakeUpperCase('A') == 'A');\n\t\tREQUIRE(MakeUpperCase('a') == 'A');\n\n\t\tREQUIRE(MakeLowerCase(' ') == ' ');\n\t\tREQUIRE(MakeLowerCase('A') == 'a');\n\t\tREQUIRE(MakeLowerCase('a') == 'a');\n\t}\n\n\tSECTION(\"CompareCaseInsensitive\") {\n\t\tREQUIRE(CompareCaseInsensitive(\" \", \" \") == 0);\n\t\tREQUIRE(CompareCaseInsensitive(\"A\", \"A\") == 0);\n\t\tREQUIRE(CompareCaseInsensitive(\"a\", \"A\") == 0);\n\t\tREQUIRE(CompareCaseInsensitive(\"b\", \"A\") != 0);\n\t\tREQUIRE(CompareCaseInsensitive(\"aa\", \"A\") != 0);\n\n\t\tREQUIRE(CompareNCaseInsensitive(\" \", \" \", 1) == 0);\n\t\tREQUIRE(CompareNCaseInsensitive(\"b\", \"A\", 1) != 0);\n\t\tREQUIRE(CompareNCaseInsensitive(\"aa\", \"A\", 1) == 0);\n\t}\n\n\tSECTION(\"EqualCaseInsensitive\") {\n\t\tREQUIRE(EqualCaseInsensitive(\" \", \" \"));\n\t\tREQUIRE(EqualCaseInsensitive(\"A\", \"A\"));\n\t\tREQUIRE(EqualCaseInsensitive(\"a\", \"A\"));\n\t\tREQUIRE(!EqualCaseInsensitive(\"b\", \"A\"));\n\t\tREQUIRE(!EqualCaseInsensitive(\"aa\", \"A\"));\n\t\tREQUIRE(!EqualCaseInsensitive(\"a\", \"AA\"));\n\t}\n}\n"
  },
  {
    "path": "lexilla/test/unit/testInList.cxx",
    "content": "/** @file testInList.cxx\n ** Unit Tests for Lexilla internal data structures\n **/\n\n#include <cstdlib>\n#include <cassert>\n\n#include <string_view>\n#include <initializer_list>\n\n#include \"InList.h\"\n\n#include \"catch.hpp\"\n\nusing namespace Lexilla;\n\n// Test InList.\n\nTEST_CASE(\"InList\") {\n\n\tSECTION(\"Basic\") {\n\t\tREQUIRE(InList(\"dog\", {\"cat\", \"dog\", \"frog\"}));\n\t\tREQUIRE(!InList(\"fly\", {\"cat\", \"dog\", \"frog\"}));\n\n\t\tREQUIRE(InListCaseInsensitive(\"DOG\", {\"cat\", \"dog\", \"frog\"}));\n\t\tREQUIRE(!InListCaseInsensitive(\"fly\", {\"cat\", \"dog\", \"frog\"}));\n\t}\n}\n"
  },
  {
    "path": "lexilla/test/unit/testLexerSimple.cxx",
    "content": "/** @file testLexerSimple.cxx\n ** Unit Tests for Lexilla internal data structures\n **/\n\n#include <cassert>\n\n#include <string>\n#include <string_view>\n\n#include \"ILexer.h\"\n#include \"Scintilla.h\"\n\n#include \"PropSetSimple.h\"\n#include \"LexerModule.h\"\n#include \"LexerBase.h\"\n#include \"LexerSimple.h\"\n\n#include \"catch.hpp\"\n\nusing namespace Lexilla;\n\n// Test LexerSimple.\n\nnamespace {\n\nconstexpr const char *propertyName = \"lexer.tex.comment.process\";\nconstexpr const char *propertyValue = \"1\";\n\nvoid ColouriseDocument(Sci_PositionU, Sci_Position, int, WordList *[], Accessor &) {\n\t// Do no styling\n}\n\nLexerModule lmSimpleExample(123456, ColouriseDocument, \"simpleexample\");\n\n}\n\nTEST_CASE(\"LexerNoExceptions\") {\n\n\tSECTION(\"Identifier\") {\n\t\tLexerSimple lexSimple(&lmSimpleExample);\n\t\tREQUIRE(lexSimple.GetIdentifier() == 123456);\n\t}\n\n\tSECTION(\"Identifier\") {\n\t\tLexerSimple lexSimple(&lmSimpleExample);\n\t\tREQUIRE_THAT(lexSimple.GetName(), Catch::Matchers::Equals(\"simpleexample\"));\n\t}\n\n\tSECTION(\"SetAndGet\") {\n\t\tLexerSimple lexSimple(&lmSimpleExample);\n\n\t\t// New setting -> 0\n\t\tconst Sci_Position pos0 = lexSimple.PropertySet(propertyName, \"8\");\n\t\tREQUIRE(pos0 == 0);\n\t\t// Changed setting -> 0\n\t\tconst Sci_Position pos1 = lexSimple.PropertySet(propertyName, propertyValue);\n\t\tREQUIRE(pos1 == 0);\n\t\t// Same setting -> -1\n\t\tconst Sci_Position pos2 = lexSimple.PropertySet(propertyName, propertyValue);\n\t\tREQUIRE(pos2 == -1);\n\n\t\tconst char *value = lexSimple.PropertyGet(propertyName);\n\t\tREQUIRE_THAT(propertyValue, Catch::Matchers::Equals(value));\n\t}\n\n}\n"
  },
  {
    "path": "lexilla/test/unit/testOptionSet.cxx",
    "content": "/** @file testOptionSet.cxx\n ** Unit Tests for Lexilla internal data structures\n ** Tests OptionSet.\n **/\n\n#include <string>\n#include <string_view>\n#include <vector>\n#include <map>\n\n#include \"Scintilla.h\"\n\n#include \"OptionSet.h\"\n\n#include \"catch.hpp\"\n\nusing namespace Lexilla;\n\n// Test OptionSet.\n\nnamespace {\n\n// Simple example options structure with each type: string, bool, int\nstruct Options {\n\tstd::string so;\n\tbool bo = false;\n\tint io = 0;\n};\n\nconst char *const denseWordLists[] = {\n\t\"Keywords 1\",\n\t\"Keywords 2\",\n\t\"Keywords 3\",\n\t\"Keywords 4\",\n\tnullptr,\n};\n\nconst char *const sparseWordLists[] = {\n\t\"\",\n\t\"\",\n\t\"Keywords 1\",\n\t\"\",\n\t\"Keywords 2\",\n\tnullptr,\n};\n\n}\n\nusing Catch::Matchers::Equals;\n\nTEST_CASE(\"OptionSet\") {\n\n\tOptionSet<Options> os;\n\tOptions options;\n\n\tSECTION(\"IsEmptyInitially\") {\n\t\tREQUIRE_THAT(os.PropertyNames(), Equals(\"\"));\n\t}\n\n\tSECTION(\"MissingOption\") {\n\t\t// Check for not present option\n\t\tREQUIRE_FALSE(os.PropertyGet(\"missing\"));\n\t\tREQUIRE(SC_TYPE_BOOLEAN == os.PropertyType(\"missing\"));\n\t\tREQUIRE_FALSE(os.PropertySet(&options, \"missing\", \"1\"));\n\t}\n\n\tSECTION(\"Define\") {\n\t\tos.DefineProperty(\"string.option\", &Options::so, \"StringOption\");\n\t\tREQUIRE_THAT(os.PropertyGet(\"string.option\"), Equals(\"\"));\n\t\tREQUIRE(SC_TYPE_STRING == os.PropertyType(\"string.option\"));\n\t\tREQUIRE_THAT(os.DescribeProperty(\"string.option\"), Equals(\"StringOption\"));\n\n\t\tos.DefineProperty(\"bool.option\", &Options::bo, \"BoolOption\");\n\t\tREQUIRE_THAT(os.PropertyGet(\"bool.option\"), Equals(\"\"));\n\t\tREQUIRE(SC_TYPE_BOOLEAN == os.PropertyType(\"bool.option\"));\n\t\tREQUIRE_THAT(os.DescribeProperty(\"bool.option\"), Equals(\"BoolOption\"));\n\n\t\tos.DefineProperty(\"int.option\", &Options::io, \"IntOption\");\n\t\tREQUIRE_THAT(os.PropertyGet(\"int.option\"), Equals(\"\"));\n\t\tREQUIRE(SC_TYPE_INTEGER == os.PropertyType(\"int.option\"));\n\t\tREQUIRE_THAT(os.DescribeProperty(\"int.option\"), Equals(\"IntOption\"));\n\n\t\t// This is really a set and could be reordered but is currently in definition order\n\t\tREQUIRE_THAT(os.PropertyNames(), Equals(\"string.option\\nbool.option\\nint.option\"));\n\t}\n\n\tSECTION(\"Set\") {\n\t\tos.DefineProperty(\"string.option\", &Options::so, \"StringOption\");\n\t\tREQUIRE_THAT(os.PropertyGet(\"string.option\"), Equals(\"\"));\n\t\tREQUIRE(os.PropertySet(&options, \"string.option\", \"string\"));\n\t\tREQUIRE_THAT(os.PropertyGet(\"string.option\"), Equals(\"string\"));\n\t\t// Setting to same as before returns false\n\t\tREQUIRE_FALSE(os.PropertySet(&options, \"string.option\", \"string\"));\n\t\tREQUIRE(os.PropertySet(&options, \"string.option\", \"anotherString\"));\n\t\tREQUIRE_THAT(os.PropertyGet(\"string.option\"), Equals(\"anotherString\"));\n\n\t\tos.DefineProperty(\"bool.option\", &Options::so, \"BoolOption\");\n\t\tREQUIRE(os.PropertySet(&options, \"bool.option\", \"1\"));\n\t\tREQUIRE_THAT(os.PropertyGet(\"bool.option\"), Equals(\"1\"));\n\t\t// Setting to same as before returns false\n\t\tREQUIRE_FALSE(os.PropertySet(&options, \"bool.option\", \"1\"));\n\t\tREQUIRE(os.PropertySet(&options, \"bool.option\", \"0\"));\n\n\t\tos.DefineProperty(\"int.option\", &Options::so, \"IntOption\");\n\t\tREQUIRE(os.PropertySet(&options, \"int.option\", \"2\"));\n\t\tREQUIRE_THAT(os.PropertyGet(\"int.option\"), Equals(\"2\"));\n\t\t// Setting to same as before returns false\n\t\tREQUIRE_FALSE(os.PropertySet(&options, \"int.option\", \"2\"));\n\t\tREQUIRE(os.PropertySet(&options, \"int.option\", \"3\"));\n\t}\n\n\t// WordListSets feature is really completely separate from options\n\n\tSECTION(\"WordListSets\") {\n\t\tREQUIRE_THAT(os.DescribeWordListSets(), Equals(\"\"));\n\t\tos.DefineWordListSets(denseWordLists);\n\t\tREQUIRE_THAT(os.DescribeWordListSets(),\n\t\t\tEquals(\"Keywords 1\\nKeywords 2\\nKeywords 3\\nKeywords 4\"));\n\n\t\tOptionSet<Options> os2;\n\t\tREQUIRE_THAT(os2.DescribeWordListSets(), Equals(\"\"));\n\t\tos2.DefineWordListSets(sparseWordLists);\n\t\tREQUIRE_THAT(os2.DescribeWordListSets(),\n\t\t\tEquals(\"\\n\\nKeywords 1\\n\\nKeywords 2\"));\n\t}\n}\n"
  },
  {
    "path": "lexilla/test/unit/testPropSetSimple.cxx",
    "content": "/** @file testPropSetSimple.cxx\n ** Unit Tests for Lexilla internal data structures\n **/\n\n#include <string>\n#include <string_view>\n\n#include \"PropSetSimple.h\"\n\n#include \"catch.hpp\"\n\nusing namespace Lexilla;\n\n// Test PropSetSimple.\n\nnamespace {\n\nconstexpr const char *propertyName = \"lexer.tex.comment.process\";\nconstexpr const char *propertyValue = \"1\";\n\n}\n\nTEST_CASE(\"PropSetSimple\") {\n\n\tSECTION(\"IsEmptyInitially\") {\n\t\tPropSetSimple pss;\n\t\tconst char *value = pss.Get(propertyName);\n\t\tREQUIRE_THAT(value, Catch::Matchers::Equals(\"\"));\n\t}\n\n\tSECTION(\"SetAndGet\") {\n\t\tPropSetSimple pss;\n\t\tpss.Set(propertyName, propertyValue);\n\t\tconst char *value = pss.Get(propertyName);\n\t\tREQUIRE_THAT(value, Catch::Matchers::Equals(propertyValue));\n\t}\n\n\tSECTION(\"GetInt\") {\n\t\tPropSetSimple pss;\n\t\tconst int valueStart = pss.GetInt(propertyName);\n\t\tREQUIRE(0 == valueStart);\n\t\tconst int valueDefault = pss.GetInt(propertyName, 3);\n\t\tREQUIRE(3 == valueDefault);\n\t\tpss.Set(propertyName, propertyValue);\n\t\tconst int value = pss.GetInt(propertyName);\n\t\tREQUIRE(1 == value);\n\t}\n\n}\n"
  },
  {
    "path": "lexilla/test/unit/testSparseState.cxx",
    "content": "/** @file testSparseState.cxx\n ** Unit Tests for Lexilla internal data structures\n **/\n\n#include <string>\n#include <string_view>\n#include <vector>\n#include <algorithm>\n#include <memory>\n\n#include \"Sci_Position.h\"\n\n#include \"SparseState.h\"\n\n#include \"catch.hpp\"\n\nusing namespace Lexilla;\n\n// Test SparseState.\n\nTEST_CASE(\"SparseState\") {\n\n\tSparseState<int> ss;\n\n\tSECTION(\"IsEmptyInitially\") {\n\t\tREQUIRE(0u == ss.size());\n\t\tint val = ss.ValueAt(0);\n\t\tREQUIRE(0 == val);\n\t}\n\n\tSECTION(\"SimpleSetAndGet\") {\n\t\tss.Set(0, 22);\n\t\tss.Set(1, 23);\n\t\tREQUIRE(2u == ss.size());\n\t\tREQUIRE(0 == ss.ValueAt(-1));\n\t\tREQUIRE(22 == ss.ValueAt(0));\n\t\tREQUIRE(23 == ss.ValueAt(1));\n\t\tREQUIRE(23 == ss.ValueAt(2));\n\t}\n\n\tSECTION(\"RetrieveBetween\") {\n\t\tss.Set(0, 10);\n\t\tss.Set(2, 12);\n\t\tREQUIRE(2u == ss.size());\n\t\tREQUIRE(0 == ss.ValueAt(-1));\n\t\tREQUIRE(10 == ss.ValueAt(0));\n\t\tREQUIRE(10 == ss.ValueAt(1));\n\t\tREQUIRE(12 == ss.ValueAt(2));\n\t}\n\n\tSECTION(\"RetrieveBefore\") {\n\t\tss.Set(2, 12);\n\t\tREQUIRE(1u == ss.size());\n\t\tREQUIRE(0 == ss.ValueAt(-1));\n\t\tREQUIRE(0 == ss.ValueAt(0));\n\t\tREQUIRE(0 == ss.ValueAt(1));\n\t\tREQUIRE(12 == ss.ValueAt(2));\n\t}\n\n\tSECTION(\"Delete\") {\n\t\tss.Set(0, 30);\n\t\tss.Set(2, 32);\n\t\tss.Delete(2);\n\t\tREQUIRE(1u == ss.size());\n\t\tREQUIRE(0 == ss.ValueAt(-1));\n\t\tREQUIRE(30 == ss.ValueAt(0));\n\t\tREQUIRE(30 == ss.ValueAt(1));\n\t\tREQUIRE(30 == ss.ValueAt(2));\n\t}\n\n\tSECTION(\"DeleteBetween\") {\n\t\tss.Set(0, 30);\n\t\tss.Set(2, 32);\n\t\tss.Delete(1);\n\t\tREQUIRE(1u == ss.size());\n\t\tREQUIRE(0 == ss.ValueAt(-1));\n\t\tREQUIRE(30 == ss.ValueAt(0));\n\t\tREQUIRE(30 == ss.ValueAt(1));\n\t\tREQUIRE(30 == ss.ValueAt(2));\n\t}\n\n\tSECTION(\"ReplaceLast\") {\n\t\tss.Set(0, 30);\n\t\tss.Set(2, 31);\n\t\tss.Set(2, 32);\n\t\tREQUIRE(2u == ss.size());\n\t\tREQUIRE(0 == ss.ValueAt(-1));\n\t\tREQUIRE(30 == ss.ValueAt(0));\n\t\tREQUIRE(30 == ss.ValueAt(1));\n\t\tREQUIRE(32 == ss.ValueAt(2));\n\t\tREQUIRE(32 == ss.ValueAt(3));\n\t}\n\n\tSECTION(\"OnlyChangeAppended\") {\n\t\tss.Set(0, 30);\n\t\tss.Set(2, 31);\n\t\tss.Set(3, 31);\n\t\tREQUIRE(2u == ss.size());\n\t}\n\n\tSECTION(\"MergeBetween\") {\n\t\tss.Set(0, 30);\n\t\tss.Set(2, 32);\n\t\tss.Set(4, 34);\n\t\tREQUIRE(3u == ss.size());\n\n\t\tSparseState<int> ssAdditions(3);\n\t\tssAdditions.Set(4, 34);\n\t\tREQUIRE(1u == ssAdditions.size());\n\t\tbool mergeChanged = ss.Merge(ssAdditions,5);\n\t\tREQUIRE(false == mergeChanged);\n\n\t\tssAdditions.Set(4, 44);\n\t\tREQUIRE(1u == ssAdditions.size());\n\t\tmergeChanged = ss.Merge(ssAdditions,5);\n\t\tREQUIRE(true == mergeChanged);\n\t\tREQUIRE(3u == ss.size());\n\t\tREQUIRE(44 == ss.ValueAt(4));\n\t}\n\n\tSECTION(\"MergeAtExisting\") {\n\t\tss.Set(0, 30);\n\t\tss.Set(2, 32);\n\t\tss.Set(4, 34);\n\t\tREQUIRE(3u == ss.size());\n\n\t\tSparseState<int> ssAdditions(4);\n\t\tssAdditions.Set(4, 34);\n\t\tREQUIRE(1u == ssAdditions.size());\n\t\tbool mergeChanged = ss.Merge(ssAdditions,5);\n\t\tREQUIRE(false == mergeChanged);\n\n\t\tssAdditions.Set(4, 44);\n\t\tREQUIRE(1u == ssAdditions.size());\n\t\tmergeChanged = ss.Merge(ssAdditions,5);\n\t\tREQUIRE(true == mergeChanged);\n\t\tREQUIRE(3u == ss.size());\n\t\tREQUIRE(44 == ss.ValueAt(4));\n\t}\n\n\tSECTION(\"MergeWhichRemoves\") {\n\t\tss.Set(0, 30);\n\t\tss.Set(2, 32);\n\t\tss.Set(4, 34);\n\t\tREQUIRE(3u == ss.size());\n\n\t\tSparseState<int> ssAdditions(2);\n\t\tssAdditions.Set(2, 22);\n\t\tREQUIRE(1u == ssAdditions.size());\n\t\tREQUIRE(22 == ssAdditions.ValueAt(2));\n\t\tbool mergeChanged = ss.Merge(ssAdditions,5);\n\t\tREQUIRE(true == mergeChanged);\n\t\tREQUIRE(2u == ss.size());\n\t\tREQUIRE(22 == ss.ValueAt(2));\n\t}\n\n\tSECTION(\"MergeIgnoreSome\") {\n\t\tss.Set(0, 30);\n\t\tss.Set(2, 32);\n\t\tss.Set(4, 34);\n\n\t\tSparseState<int> ssAdditions(2);\n\t\tssAdditions.Set(2, 32);\n\t\tbool mergeChanged = ss.Merge(ssAdditions,3);\n\n\t\tREQUIRE(false == mergeChanged);\n\t\tREQUIRE(2u == ss.size());\n\t\tREQUIRE(32 == ss.ValueAt(2));\n\t}\n\n\tSECTION(\"MergeIgnoreSomeStart\") {\n\t\tss.Set(0, 30);\n\t\tss.Set(2, 32);\n\t\tss.Set(4, 34);\n\n\t\tSparseState<int> ssAdditions(2);\n\t\tssAdditions.Set(2, 32);\n\t\tbool mergeChanged = ss.Merge(ssAdditions,2);\n\n\t\tREQUIRE(false == mergeChanged);\n\t\tREQUIRE(2u == ss.size());\n\t\tREQUIRE(32 == ss.ValueAt(2));\n\t}\n\n\tSECTION(\"MergeIgnoreRepeat\") {\n\t\tss.Set(0, 30);\n\t\tss.Set(2, 32);\n\t\tss.Set(4, 34);\n\n\t\tSparseState<int> ssAdditions(5);\n\t\t// Appending same value as at end of pss.\n\t\tssAdditions.Set(5, 34);\n\t\tbool mergeChanged = ss.Merge(ssAdditions,6);\n\n\t\tREQUIRE(false == mergeChanged);\n\t\tREQUIRE(3u == ss.size());\n\t\tREQUIRE(34 == ss.ValueAt(4));\n\t}\n\n}\n\nTEST_CASE(\"SparseStateString\") {\n\n\tSparseState<std::string> ss;\n\n\tSECTION(\"IsEmptyInitially\") {\n\t\tREQUIRE(0u == ss.size());\n\t\tstd::string val = ss.ValueAt(0);\n\t\tREQUIRE(\"\" == val);\n\t}\n\n\tSECTION(\"SimpleSetAndGet\") {\n\t\tREQUIRE(0u == ss.size());\n\t\tss.Set(0, \"22\");\n\t\tss.Set(1, \"23\");\n\t\tREQUIRE(2u == ss.size());\n\t\tREQUIRE(\"\" == ss.ValueAt(-1));\n\t\tREQUIRE(\"22\" == ss.ValueAt(0));\n\t\tREQUIRE(\"23\" == ss.ValueAt(1));\n\t\tREQUIRE(\"23\" == ss.ValueAt(2));\n\t}\n\n\tSECTION(\"DeleteBetween\") {\n\t\tss.Set(0, \"30\");\n\t\tss.Set(2, \"32\");\n\t\tss.Delete(1);\n\t\tREQUIRE(1u == ss.size());\n\t\tREQUIRE(\"\" == ss.ValueAt(-1));\n\t\tREQUIRE(\"30\" == ss.ValueAt(0));\n\t\tREQUIRE(\"30\" == ss.ValueAt(1));\n\t\tREQUIRE(\"30\" == ss.ValueAt(2));\n\t}\n\n}\n"
  },
  {
    "path": "lexilla/test/unit/testWordList.cxx",
    "content": "/** @file testWordList.cxx\n ** Unit Tests for Lexilla internal data structures\n ** Tests WordList, WordClassifier, and SubStyles\n **/\n\n#include <string>\n#include <string_view>\n#include <vector>\n#include <map>\n\n#include \"WordList.h\"\n#include \"SubStyles.h\"\n\n#include \"catch.hpp\"\n\nusing namespace Lexilla;\n\n// Test WordList.\n\nTEST_CASE(\"WordList\") {\n\n\tWordList wl;\n\n\tSECTION(\"IsEmptyInitially\") {\n\t\tREQUIRE(0 == wl.Length());\n\t\tREQUIRE(!wl.InList(\"struct\"));\n\t}\n\n\tSECTION(\"InList\") {\n\t\twl.Set(\"else struct\");\n\t\tREQUIRE(2 == wl.Length());\n\t\tREQUIRE(wl.InList(\"struct\"));\n\t\tREQUIRE(!wl.InList(\"class\"));\n\t}\n\n\tSECTION(\"StringInList\") {\n\t\twl.Set(\"else struct\");\n\t\tstd::string sStruct = \"struct\";\n\t\tREQUIRE(wl.InList(sStruct));\n\t\tstd::string sClass = \"class\";\n\t\tREQUIRE(!wl.InList(sClass));\n\t}\n\n\tSECTION(\"InListUnicode\") {\n\t\t// \"cheese\" in English\n\t\t// \"kase\" ('k', 'a with diaeresis', 's', 'e') in German\n\t\t// \"syr\", ('CYRILLIC SMALL LETTER ES', 'CYRILLIC SMALL LETTER YERU', 'CYRILLIC SMALL LETTER ER') in Russian\n\t\twl.Set(\"cheese \\x6b\\xc3\\xa4\\x73\\x65 \\xd1\\x81\\xd1\\x8b\\xd1\\x80\");\n\t\tREQUIRE(3 == wl.Length());\n\t\tREQUIRE(wl.InList(\"cheese\"));\n\t\tREQUIRE(wl.InList(\"\\x6b\\xc3\\xa4\\x73\\x65\"));\n\t\tREQUIRE(wl.InList(\"\\xd1\\x81\\xd1\\x8b\\xd1\\x80\"));\n\t}\n\n\tSECTION(\"Set\") {\n\t\t// Check whether Set returns whether it has changed correctly\n\t\tconst bool changed = wl.Set(\"else struct\");\n\t\tREQUIRE(changed);\n\t\t// Changing to same thing\n\t\tconst bool changed2 = wl.Set(\"else struct\");\n\t\tREQUIRE(!changed2);\n\t\t// Changed order shouldn't be seen as a change\n\t\tconst bool changed3 = wl.Set(\"struct else\");\n\t\tREQUIRE(!changed3);\n\t\t// Removing word is a change\n\t\tconst bool changed4 = wl.Set(\"struct\");\n\t\tREQUIRE(changed4);\n\t}\n\n\tSECTION(\"WordAt\") {\n\t\twl.Set(\"else struct\");\n\t\tREQUIRE_THAT(wl.WordAt(0), Catch::Matchers::Equals(\"else\"));\n\t}\n\n\tSECTION(\"InListAbbreviated\") {\n\t\twl.Set(\"else stru~ct w~hile \\xd1\\x81~\\xd1\\x8b\\xd1\\x80\");\n\t\tREQUIRE(wl.InListAbbreviated(\"else\", '~'));\n\n\t\tREQUIRE(wl.InListAbbreviated(\"struct\", '~'));\n\t\tREQUIRE(wl.InListAbbreviated(\"stru\", '~'));\n\t\tREQUIRE(wl.InListAbbreviated(\"struc\", '~'));\n\t\tREQUIRE(!wl.InListAbbreviated(\"str\", '~'));\n\n\t\tREQUIRE(wl.InListAbbreviated(\"while\", '~'));\n\t\tREQUIRE(wl.InListAbbreviated(\"wh\", '~'));\n\t\t// TODO: Next line fails but should allow single character prefixes\n\t\t//REQUIRE(wl.InListAbbreviated(\"w\", '~'));\n\t\tREQUIRE(!wl.InListAbbreviated(\"\", '~'));\n\n\t\t// Russian syr\n\t\tREQUIRE(wl.InListAbbreviated(\"\\xd1\\x81\\xd1\\x8b\\xd1\\x80\", '~'));\n\t}\n\n\tSECTION(\"InListAbridged\") {\n\t\twl.Set(\"list w.~.active bo~k a~z ~_frozen \\xd1\\x81~\\xd1\\x80\");\n\t\tREQUIRE(wl.InListAbridged(\"list\", '~'));\n\n\t\tREQUIRE(wl.InListAbridged(\"w.front.active\", '~'));\n\t\tREQUIRE(wl.InListAbridged(\"w.x.active\", '~'));\n\t\tREQUIRE(wl.InListAbridged(\"w..active\", '~'));\n\t\tREQUIRE(!wl.InListAbridged(\"w.active\", '~'));\n\t\tREQUIRE(!wl.InListAbridged(\"w.x.closed\", '~'));\n\n\t\tREQUIRE(wl.InListAbridged(\"book\", '~'));\n\t\tREQUIRE(wl.InListAbridged(\"bok\", '~'));\n\t\tREQUIRE(!wl.InListAbridged(\"bk\", '~'));\n\n\t\tREQUIRE(wl.InListAbridged(\"a_frozen\", '~'));\n\t\tREQUIRE(wl.InListAbridged(\"_frozen\", '~'));\n\t\tREQUIRE(!wl.InListAbridged(\"frozen\", '~'));\n\n\t\tREQUIRE(wl.InListAbridged(\"abcz\", '~'));\n\t\tREQUIRE(wl.InListAbridged(\"abz\", '~'));\n\t\tREQUIRE(wl.InListAbridged(\"az\", '~'));\n\n\t\t// Russian syr\n\t\tREQUIRE(wl.InListAbridged(\"\\xd1\\x81\\xd1\\x8b\\xd1\\x80\", '~'));\n\t}\n}\n\n// Test WordClassifier.\n\nTEST_CASE(\"WordClassifier\") {\n\n\tconstexpr int base = 1;\n\tconstexpr int key = 10;\n\tconstexpr int type = 11;\n\tconstexpr int other = 40;\n\n\tWordClassifier wc(1);\n\n\tSECTION(\"Base\") {\n\t\tREQUIRE(wc.Base() == base);\n\t\twc.Allocate(key, 2);\n\t\tREQUIRE(wc.Start() == key);\n\t\tREQUIRE(wc.Last() == type);\n\t\tREQUIRE(wc.Length() == 2);\n\t\tREQUIRE(wc.IncludesStyle(key));\n\t\tREQUIRE(wc.IncludesStyle(type));\n\t\tREQUIRE(!wc.IncludesStyle(other));\n\n\t\twc.Clear();\n\t\tREQUIRE(wc.Base() == base);\n\t\tREQUIRE(wc.Start() == 0);\n\t\tREQUIRE(wc.Last() == -1);\n\t\tREQUIRE(wc.Length() == 0);\n\t}\n\n\tSECTION(\"ValueFor\") {\n\t\twc.Allocate(key, 2);\n\t\twc.SetIdentifiers(key, \"else if then\");\n\t\twc.SetIdentifiers(type, \"double float int long\");\n\t\tREQUIRE(wc.ValueFor(\"if\") == key);\n\t\tREQUIRE(wc.ValueFor(\"double\") == type);\n\t\tREQUIRE(wc.ValueFor(\"fish\") < 0);\n\t\twc.RemoveStyle(type);\n\t\tREQUIRE(wc.ValueFor(\"double\") < 0);\n\t}\n\n}\n\n// Test SubStyles.\n\nTEST_CASE(\"SubStyles\") {\n\n\tconstexpr char bases[] = \"\\002\\005\";\n\tconstexpr int base = 2;\n\tconstexpr int base2 = 5;\n\tconstexpr int styleFirst = 0x80;\n\tconstexpr int stylesAvailable = 0x40;\n\tconstexpr int distanceToSecondary = 0x40;\n\n\tSubStyles subStyles(bases, styleFirst, stylesAvailable, distanceToSecondary);\n\n\tSECTION(\"All\") {\n\t\tREQUIRE(subStyles.DistanceToSecondaryStyles() == distanceToSecondary);\n\t\t// Before allocation\n\t\tREQUIRE(subStyles.Start(base) == 0);\n\n\t\tconst int startSubStyles = subStyles.Allocate(base, 3);\n\t\tREQUIRE(startSubStyles == styleFirst);\n\t\tREQUIRE(subStyles.Start(base) == styleFirst);\n\t\tREQUIRE(subStyles.Length(base) == 3);\n\t\tREQUIRE(subStyles.BaseStyle(128) == 2);\n\n\t\t// Not a substyle so returns argument.\n\t\tREQUIRE(subStyles.BaseStyle(96) == 96);\n\n\t\tREQUIRE(subStyles.FirstAllocated() == styleFirst);\n\t\tREQUIRE(subStyles.LastAllocated() == styleFirst + 3 - 1);\n\t\tsubStyles.SetIdentifiers(styleFirst, \"int long size_t\");\n\t\tconst WordClassifier &wc = subStyles.Classifier(base);\n\t\tREQUIRE(wc.ValueFor(\"int\") == styleFirst);\n\t\tREQUIRE(wc.ValueFor(\"double\") < 0);\n\n\t\t// Add second set of substyles which shouldn't affect first\n\t\tconst int startSecondSet = subStyles.Allocate(base2, 2);\n\t\tconstexpr int expectedStylesSecond = styleFirst + 3;\n\t\tREQUIRE(startSecondSet == expectedStylesSecond);\n\t\tREQUIRE(subStyles.Start(base) == styleFirst);\n\t\tREQUIRE(subStyles.Start(base2) == expectedStylesSecond);\n\t\tREQUIRE(subStyles.LastAllocated() == styleFirst + 5 - 1);\n\n\t\t// Clear and check that earlier call no longer works\n\t\tsubStyles.Free();\n\t\tREQUIRE(subStyles.Start(base) == 0);\n\t}\n\n}\n"
  },
  {
    "path": "lexilla/test/unit/unitTest.cxx",
    "content": "/** @file unitTest.cxx\n ** Unit Tests for Lexilla internal data structures\n **/\n\n/*\n    Currently tested:\n        WordList\n        SparseState\n*/\n\n#include <cstdio>\n#include <cstdarg>\n\n#include <string_view>\n#include <vector>\n#include <memory>\n\n#if defined(__GNUC__)\n// Want to avoid misleading indentation warnings in catch.hpp but the pragma\n// may not be available so protect by turning off pragma warnings\n#pragma GCC diagnostic ignored \"-Wunknown-pragmas\"\n#pragma GCC diagnostic ignored \"-Wpragmas\"\n#if !defined(__clang__)\n#pragma GCC diagnostic ignored \"-Wmisleading-indentation\"\n#endif\n#endif\n\n#define CATCH_CONFIG_MAIN  // This tells Catch to provide a main() - only do this in one cpp file\n#include \"catch.hpp\"\n"
  },
  {
    "path": "lexilla/tgzsrc",
    "content": "cd ..\nrm -f lexilla.tgz\ntar --create --exclude \\*.o --exclude \\*.obj --exclude \\*.dll --exclude \\*.so --exclude \\*.exe --exclude \\*.a lexilla/* \\\n\t| gzip -c >lexilla.tgz\n"
  },
  {
    "path": "lexilla/version.txt",
    "content": "532"
  },
  {
    "path": "lexilla/zipsrc.bat",
    "content": "cd ..\ndel/q lexilla.zip\nzip lexilla.zip lexilla\\*.* lexilla\\*\\*.* lexilla\\*\\*\\*.* lexilla\\*\\*\\*\\*.* lexilla\\*\\*\\*\\*\\*.* ^\n -x *.bak *.o *.obj *.iobj *.dll *.exe *.a *.lib *.res *.exp *.sarif *.pdb *.ipdb *.idb *.sbr *.ilk *.tgz ^\n **/__pycache__/* **/Debug/* **/Release/* **/x64/* **/ARM64/* **/cov-int/* **/.vs/* **/.vscode/* @\ncd lexilla\n"
  },
  {
    "path": "makedb/CMakeLists.txt",
    "content": "#\n# CodeQuery\n# Copyright (C) 2013-2018 ruben2020 https://github.com/ruben2020/\n#\n# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not distributed with this\n# file, You can obtain one at http://mozilla.org/MPL/2.0/.\n#\n\ncmake_minimum_required(VERSION 3.16.0)\nproject(CodeQueryDBMaker)\n\n#add_definitions( -Wall )\n\nif(GHAWIN)\nfind_package(unofficial-sqlite3 CONFIG REQUIRED)\nset( SQLITE_LIBRARIES \"unofficial::sqlite3::sqlite3\" )\nelse(GHAWIN)\nfind_package(Sqlite REQUIRED)\ninclude_directories( \"${SQLITE_INCLUDE_DIR}\" )\nendif(GHAWIN)\n\ninclude_directories( \".\" )\ninclude_directories( \"../querylib\" )\n\nset( CQMAKEDB_SRCS\n     sqlbase.cpp\n     csdbheader.cpp\n     csdbparser.cpp\n     cs2sq.cpp\n     ctagread.cpp\n     main.cpp\n   )\n\nadd_executable( cqmakedb ${CQMAKEDB_SRCS} )\ntarget_link_libraries( cqmakedb ${SQLITE_LIBRARIES} small_lib )\n\ninstall(TARGETS cqmakedb RUNTIME DESTINATION bin)\n\n\n"
  },
  {
    "path": "makedb/cs2sq.cpp",
    "content": "\n/*\n * CodeQuery\n * Copyright (C) 2013-2017 ruben2020 https://github.com/ruben2020/\n * \n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n */\n\n\n#include \"cs2sq.h\"\n#include \"small_lib.h\"\n\ncs2sq::cs2sq()\n:m_csdbpLastErr(csdbparser::resOK)\n,m_buf(NULL)\n,m_filesstmt(NULL)\n,m_linesstmt(NULL)\n,m_callstmt(NULL)\n,m_symstmt(NULL)\n{\n\tm_buf = new char[1000];\n}\n\ncs2sq::~cs2sq()\n{\n\tclose_csdb();\n\tclose_db();\n\tdelete[] m_buf;\n}\n\ncsdbparser::enResult cs2sq::open_csdb(const char* csdbfn)\n{\n\treturn m_csdbp.open_file(csdbfn);\n}\n\nvoid cs2sq::close_csdb(void)\n{\n\tm_csdbp.close_file();\n}\n\ncsdbparser::enResult cs2sq::test_csdb(void)\n{\n\tcsdbparser::enResult res;\n\tif (isCSDBFileOpen() == false) return csdbparser::resFILE_NOT_OPEN;\n\t\n\tif (m_debug)\n\t{\n\t\tprintf(\"CSDB base path = %s\\nChecking source files...\\n\",\n\t\t\tm_csdbp.getBasePath());\n\t}\n\n\tres = m_csdbp.setup_srcfil_read();\n\tif (res != csdbparser::resOK) return res;\n\t\n\tlong int num = 0;\n\tstd::string s;\n\tdo\n\t\t{\n\t\t\tm_csdbp.get_next_srcfil(&s);\n\t\t\tif (s.length() == 0) break;\n\t\t\tnum++;\n\t\t}\n\twhile (s.length() > 0);\n\tif (m_debug)\n\t{\n\t\tprintf(\"Number of source files = %ld\\nReading symbols...\\n\", num);\n\t}\n\t\n\tres = m_csdbp.setup_symbol_read();\n\tif (res != csdbparser::resOK) return res;\n\n\tnum = 0;\n\tsymdata_pack sp;\n\tsp.valid = true;\n\twhile(sp.valid)\n\t{\n\t\tres = m_csdbp.get_next_symbol(&sp);\n\t\tif (res != csdbparser::resOK)\n\t\t{\n\t\t\tif (m_debug) {printf(\"Error at symbol %ld, retval=%d,\"\n\t\t\t\" file=%s:%ld\\n\", num, res, sp.filename.c_str(), sp.line_num);}\n\t\t\treturn res;\n\t\t}\n\t\tif (sp.line_num == -1) continue; // empty line\n\t\tif (sp.valid) num += sp.symbols.size();\n\t}\n\n\tif (m_debug)\n\t{\n\t\tprintf(\"Total number of symbols found = %ld\\nCSDB file OK!\\n\",num);\n\t}\n\n\tm_csdbp.setDebug(false);\n\treturn csdbparser::resOK;\n}\n\ncs2sq::enResult cs2sq::open_db(const char* sqldb)\n{\n\tint rc;\n\trc = sqlite3_open_v2(sqldb, &m_db, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);\n\tif (rc != SQLITE_OK)\n\t{\n\t\tsqlite3_close(m_db);\n\t\tm_db = 0;\n\t\treturn resFILE_ACCESS_ERR;\n\t}\n\treturn resOK;\n}\n\nvoid cs2sq::close_db(void)\n{\n\tsqlite3_reset(m_filesstmt);\n\tsqlite3_reset(m_linesstmt);\n\tsqlite3_reset(m_callstmt);\n\tsqlite3_reset(m_symstmt);\n\tsqlite3_finalize(m_filesstmt);\n\tsqlite3_finalize(m_linesstmt);\n\tsqlite3_finalize(m_callstmt);\n\tsqlite3_finalize(m_symstmt);\n\tsqlite3_close(m_db);\n\tm_db = 0;\n}\n\ncs2sq::enResult cs2sq::setup_tables(void)\n{\n\tstd::string s;\n\t//enResult res;\n\tint rc;\n\tif (m_db == NULL) return resOTHER_ERR;\n\tif (m_csdbp.isFileOpen() == false) return resOTHER_ERR;\n\ts = \"PRAGMA synchronous = OFF;\";\n\ts+= \"PRAGMA journal_mode = OFF;\";\n\ts+= \"PRAGMA locking_mode = EXCLUSIVE;\";\n\ts+= \"PRAGMA automatic_index = FALSE;\";\n\ts+= \"PRAGMA cache_size = 20000;\";\n\ts+= \"BEGIN;\";\n\ts+= \"DROP TABLE IF EXISTS symtbl;\";\n\ts+= \"DROP TABLE IF EXISTS filestbl;\";\n\ts+= \"DROP TABLE IF EXISTS linestbl;\";\n\ts+= \"DROP TABLE IF EXISTS calltbl;\";\n\ts+= \"DROP TABLE IF EXISTS inherittbl;\";\n\ts+= \"DROP TABLE IF EXISTS configtbl;\";\n\ts+= \"DROP TABLE IF EXISTS membertbl;\";\n\ts+= \"DROP INDEX IF EXISTS symNameIdx;\";\n\ts+= \"DROP INDEX IF EXISTS symName2Idx;\";\n\ts+= \"DROP INDEX IF EXISTS filePathIdx;\";\n\ts+= \"DROP INDEX IF EXISTS filePath2Idx;\";\n\ts+= \"DROP INDEX IF EXISTS callerIDIdx;\";\n\ts+= \"DROP INDEX IF EXISTS calledIDIdx;\";\n\ts+= \"DROP INDEX IF EXISTS memberIDIdx;\";\n\ts+= \"DROP INDEX IF EXISTS groupIDIdx;\";\n\ts+= \"DROP INDEX IF EXISTS parentIDIdx;\";\n\ts+= \"DROP INDEX IF EXISTS childIDIdx;\";\n\ts+= \"DROP INDEX IF EXISTS lines_fileIDIDx;\";\n\ts+= \"DROP INDEX IF EXISTS lines_linenumIDx;\";\n\ts+= \"CREATE TABLE configtbl(configKey TEXT, configVal TEXT);\";\n\ts+= \"CREATE TABLE filestbl(fileID INTEGER PRIMARY KEY ASC, filePath TEXT);\";\n\ts+= \"CREATE TABLE linestbl(lineID INTEGER PRIMARY KEY ASC, linenum INTEGER, fileID INTEGER, linetext TEXT);\";\n\ts+= \"CREATE TABLE calltbl(callerID INTEGER, calledID INTEGER);\";\n\ts+= \"CREATE TABLE inherittbl(parentID INTEGER, childID INTEGER);\";\n\ts+= \"CREATE TABLE symtbl(symID INTEGER PRIMARY KEY ASC, symName TEXT, symType TEXT, lineID INTEGER);\";\n\ts+= \"CREATE TABLE membertbl(groupID INTEGER, memberID INTEGER, memberType TEXT);\";\n\ts+= \"INSERT INTO configtbl VALUES (\\\"DB_MAJOR_VER\\\",\\\"0\\\");\";\n\ts+= \"INSERT INTO configtbl VALUES (\\\"DB_MINOR_VER\\\",\\\"1\\\");\";\n\ts+= \"INSERT INTO configtbl VALUES (\\\"DB_BASE_PATH\\\",\\\"\";\n\ts+= m_csdbp.getBasePath();\n\ts+= \"\\\");COMMIT;\";\n\trc=sqlite3_exec(m_db, s.c_str(), NULL, 0, NULL);\n\tif (rc != SQLITE_OK)\n\t{\n\t\tif (m_debug) printf(\"SQLErr1: %d, %s\\n\", rc, sqlite3_errmsg(m_db));\n\t\treturn resSQLError;\n\t}\n\treturn resOK;\n}\n\ncs2sq::enResult cs2sq::add_symbols(void)\n{\n\tenResult res;\n\tint rc;\n\tif (m_db == NULL) return resOTHER_ERR;\n\tif (m_csdbp.isFileOpen() == false) return resOTHER_ERR;\n\tm_csdbpLastErr = m_csdbp.setup_symbol_read();\n\tif (m_csdbpLastErr != csdbparser::resOK) return resCSDBPError;\n\trc = prepare_stmt(&m_filesstmt, \"INSERT INTO filestbl VALUES (?,?);\");\n\tif (rc!=0) return resSQLError;\n\trc = prepare_stmt(&m_linesstmt, \"INSERT INTO linestbl VALUES (?,?,?,?);\");\n\tif (rc!=0) return resSQLError;\n\trc = prepare_stmt(&m_callstmt, \"INSERT INTO calltbl VALUES (?,?);\");\n\tif (rc!=0) return resSQLError;\n\trc = prepare_stmt(&m_symstmt, \"INSERT INTO symtbl VALUES (?,?,?,?);\");\n\tif (rc!=0) return resSQLError;\n\trc=sqlite3_exec(m_db, \"BEGIN EXCLUSIVE;\", NULL, 0, NULL);\n\tif (rc != SQLITE_OK)\n\t{\n\t\tif (m_debug) printf(\"SQLErr13: %d, %s\\n\", rc, sqlite3_errmsg(m_db));\n\t\treturn resSQLError;\n\t}\n\t\n\tidxcounter fileidx;\n\tidxcounter symidx;\n\tidxcounter lineidx;\n\tstd::string current_file = \"\";\n\tstd::string s;\n\tsymdata_pack sp;\n\tsp.valid = true;\n\twhile(sp.valid)\n\t{\n\t\tm_csdbpLastErr = m_csdbp.get_next_symbol(&sp);\n\t\tif (m_csdbpLastErr != csdbparser::resOK) return resCSDBPError;\n\t\tif (sp.valid == false) break; //end of symbols\n\t\tif (sp.line_num == -1) continue; // empty line\n\t\t++lineidx;\n\t\tif (current_file.compare(sp.filename) != 0)\n\t\t{\n\t\t\t++fileidx;\n\t\t\tcurrent_file = sp.filename;\n\t\t\trc=execstmt(m_filesstmt, fileidx.getStr(), current_file.c_str());\n\t\t\tif (rc!=0) return resSQLError;\n\t\t}\n\t\trc=execstmt(m_linesstmt, lineidx.getStr(), sp.line_num_str().c_str(),\n\t\t\t\t\t\tfileidx.getStr(), sp.line_text_replacetab().c_str());\n\t\tif (rc!=0) return resSQLError;\n\t\tif (sp.symbols.empty() == false)\n\t\t\tres = add_symdata(sp.symbols, lineidx.getStr(), &symidx);\n\t\tif (res != resOK) return res;\n\t\t\n\t}\n\treturn resOK;\n}\n\ncs2sq::enResult cs2sq::add_symdata(symdatalist sdlist, const char* lineid, idxcounter* idx)\n{\n\t//enResult res;\n\tsymdatalist::iterator it;\n\tchar smallstr[2];\n\tint rc;\n\tsmallstr[1] = 0; // NULL-terminated\n\tfor (it = sdlist.begin(); it < sdlist.end(); it++)\n\t{\n\t\t++(*idx);\n\t\tsmallstr[0] = it->getTypeChar();\n\t\trc=execstmt(m_symstmt, idx->getStr(), it->symbname.c_str(),\n\t\t\t\t\t\t\tsmallstr, lineid);\n\t\tif (rc!=0) return resSQLError;\n\t\tif ((it->sym_type != sym_data::symMacroDef)&&\n\t\t\t(it->sym_type != sym_data::symFuncCall)&&\n\t\t\t(it->sym_type != sym_data::symFuncDef))\n\t\t\tcontinue;\n\t\tswitch (it->sym_type)\n\t\t{\n\t\t\tcase sym_data::symMacroDef:\n\t\t\t\tm_calling_macro.str = it->symbname;\n\t\t\t\tm_calling_macro.id = idx->getStr();\n\t\t\t\tbreak;\n\t\t\tcase sym_data::symFuncDef:\n\t\t\t\tm_calling_func.str = it->symbname;\n\t\t\t\tm_calling_func.id = idx->getStr();\n\t\t\t\tbreak;\n\t\t\tcase sym_data::symFuncCall:\n\t\t\t\tif ((it->calling_func.empty() == false)\n\t\t\t\t\t&&(m_calling_func.str.compare(it->calling_func) == 0))\n\t\t\t\t{\n\t\t\t\t\trc=execstmt(m_callstmt, m_calling_func.id.c_str(), idx->getStr());\n\t\t\t\t\tif (rc!=0) return resSQLError;\n\t\t\t\t}\n\t\t\t\tif ((it->calling_macro.empty() == false)\n\t\t\t\t\t&&(m_calling_macro.str.compare(it->calling_macro) == 0))\n\t\t\t\t{\n\t\t\t\t\trc=execstmt(m_callstmt, m_calling_macro.id.c_str(), idx->getStr());\n\t\t\t\t\tif (rc!=0) return resSQLError;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault: break;\n\t\t};\n\t}\n\treturn resOK;\n}\n\ncs2sq::enResult cs2sq::finalize(void)\n{\n\tint rc=sqlite3_exec(m_db, \"COMMIT;\", NULL, 0, NULL);\n\tif (rc != SQLITE_OK)\n\t{\n\t\tif (m_debug) printf(\"SQLErr14: %d, %s\\n\", rc, sqlite3_errmsg(m_db));\n\t\treturn resSQLError;\n\t}\n\tstd::string s;\n\ts  = \"BEGIN EXCLUSIVE;\";\n\ts += \"CREATE INDEX filePathIdx ON filestbl (filePath);\";\n\ts += \"CREATE INDEX filePath2Idx ON filestbl (filePath COLLATE NOCASE);\";\n\ts += \"CREATE INDEX callerIDIdx ON calltbl (callerID);\";\n\ts += \"CREATE INDEX calledIDIdx ON calltbl (calledID);\";\n\ts += \"CREATE INDEX lines_fileIDIDx ON linestbl (fileID);\";\n\ts += \"CREATE INDEX lines_linenumIDx ON linestbl (linenum);\";\n\ts += \"CREATE INDEX symNameIdx ON symtbl (symName, symType);\";\n\ts += \"CREATE INDEX symName2Idx ON symtbl (symName COLLATE NOCASE, symType COLLATE NOCASE);\";\n\t//s += \"VACUUM;\";\n\ts += \"COMMIT;\";\n\trc=sqlite3_exec(m_db, s.c_str(), NULL, 0, NULL);\n\tif (rc != SQLITE_OK)\n\t{\n\t\tif (m_debug) printf(\"SQLErr15: %d, %s\\n\", rc, sqlite3_errmsg(m_db));\n\t\treturn resSQLError;\n\t}\n\treturn resOK;\n}\n\n\n"
  },
  {
    "path": "makedb/cs2sq.h",
    "content": "\n/*\n * CodeQuery\n * Copyright (C) 2013-2017 ruben2020 https://github.com/ruben2020/\n * \n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n */\n\n\n#ifndef CS2SQ_H_CQ\n#define CS2SQ_H_CQ\n\n#include <stdio.h>\n#include <sqlite3.h>\n#include \"sqlbase.h\"\n#include \"csdbparser.h\"\n#include \"small_lib.h\"\n\ntypedef struct\n{\n\tstd::string str;\n\tstd::string id;\n} stStrID;\n\ntypedef std::vector<stStrID> strIDList;\n\nclass cs2sq : public sqlbase\n{\npublic:\n\nenum enResult\n{\n\tresOK = 0,\n\tresSQLError,\n\tresCSDBPFileNotOpen,\n\tresCSDBPError,\n\tresFilenameError,\n\tresFILE_ACCESS_ERR,\n\tresOTHER_ERR\n};\n\ncs2sq();\n~cs2sq();\n\ncsdbparser::enResult open_csdb(const char* csdbfn);\nvoid close_csdb(void);\ncsdbparser::enResult test_csdb(void);\nenResult open_db(const char* sqldb);\nvoid close_db(void);\n\nenResult setup_tables(void);\nenResult add_symbols(void);\nenResult finalize(void);\n\ncsdbparser::enResult get_csdbpError(void) {return m_csdbpLastErr;}\nbool isCSDBFileOpen(void)  {return m_csdbp.isFileOpen();}\n\nprivate:\nchar* m_buf;\ncsdbparser m_csdbp;\ncsdbparser::enResult m_csdbpLastErr;\nstStrID m_calling_func;\nstStrID m_calling_macro;\nsqlite3_stmt* m_filesstmt;\nsqlite3_stmt* m_linesstmt;\nsqlite3_stmt* m_callstmt;\nsqlite3_stmt* m_symstmt;\nenResult add_symdata(symdatalist sdlist, const char* lineid, idxcounter* idx);\n}; // class cs2sq\n\n#endif\n\n"
  },
  {
    "path": "makedb/cscommon.h",
    "content": "\n/*\n * CodeQuery\n * Copyright (C) 2013-2017 ruben2020 https://github.com/ruben2020/\n * \n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n */\n\n\n#ifndef CSCOMMON_H_CQ\n#define CSCOMMON_H_CQ\n\n#define CSFuncCall\t\t\t\t'`'\n#define CSDirectAssgnIncrDecr\t'='\n#define CSClass\t\t\t\t\t'c'\n#define CSEnum\t\t\t\t\t'e'\n#define CSOtherGlobal\t\t\t'g'\n#define CSLocalFuncBlockDef\t\t'l'\n#define CSGlobalEnumStructUnion\t'm'\n#define CSFuncParam\t\t\t\t'p'\n#define CSStruct\t\t\t\t's'\n#define CSTypeDef\t\t\t\t't'\n#define CSUnion\t\t\t\t\t'u'\n#define CSFuncDef\t\t\t\t'$'\n#define CSMacroDef\t\t\t\t'#'\n#define CSInclude\t\t\t\t'~'\n#define CSFile\t\t\t\t\t'@'\n#define CSNoType\t\t\t\t'X'\n\n\n#endif // CSCOMMON_H_CQ\n\n"
  },
  {
    "path": "makedb/csdbheader.cpp",
    "content": "\n/*\n * CodeQuery\n * Copyright (C) 2013-2017 ruben2020 https://github.com/ruben2020/\n * \n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n */\n\n\n// Cscope database header\n\n\n#include \"csdbheader.h\"\n#include <stdlib.h>\n\n\ncsdbheader::csdbheader()\n:m_csdbver(0)\n,m_trailer_start(0)\n{\n\n}\n\ncsdbheader::csdbheader(tStr hdr)\n:m_csdbver(0)\n,m_trailer_start(0)\n{\nm_header = hdr;\n}\n\nvoid csdbheader::set_header(tStr hdr)\n{\nm_header = hdr;\n}\n\nvoid csdbheader::set_header(const char* hdr)\n{\nm_header = hdr;\n}\n\nbool csdbheader::parse(void)\n{\n\nsize_t pos;\n\nm_param_list.clear();\nif (m_header.empty()) return false;\n\n// Header should be at least 19 bytes long and starts with \"cscope \"\nif ((m_header.length() <19)||(m_header.compare(0, strlen(\"cscope \"), \"cscope \") != 0))\n\t{return false;}\n\n// Get the cscope version used to build the database\n// Assuming it is 2 digits always\nm_csdbver = strtol(m_header.substr(7, 2).c_str(), NULL, 10);\n\n// Get the trailer start position\npos = m_header.find_last_of((char) ' ');\nm_trailer_start = strtol(m_header.substr(pos + 1).c_str(), NULL, 10);\n\n// Get rid of \"cscope nn \" and trailer start pos\nm_header = m_header.substr(10, pos - 10);\n\n// Get the first position of a param\npos = m_header.find((const char*) \" -\");\n\n// if no params, then whole string is db path\nif (pos == std::string::npos)\n{\n\tm_base_path = m_header.substr(0);\n\n\t// Trim db path\n\tpos = m_base_path.find_last_not_of((char) ' ') + 1;\n\tm_base_path = m_base_path.substr(0, pos);\n\n\t// If the last char of base path is \\\", remove it\n\t// Cannot remember why I needed to do this\n\tif (*(m_base_path.rbegin()) == '\\\"') m_base_path.erase(m_base_path.end() - 1);\n\treturn true;\n}\n\n// Get db path\nm_base_path = m_header.substr(0, pos);\n\n// Get rid of db path\nm_header = m_header.substr(pos);\n\n// Trim db path\npos = m_base_path.find_last_not_of((char) ' ') + 1;\nm_base_path = m_base_path.substr(0, pos);\n\n// If the last char of base path is \\\", remove it\n// Cannot remember why I needed to do this\nif (*(m_base_path.rbegin()) == '\\\"') m_base_path.erase(m_base_path.end() - 1);\n\n// Prepare a list of params\npos = 0;\ntStr s;\nwhile ((pos != std::string::npos) && (pos < m_header.length()))\n{\n\tpos = m_header.find((char) '-', pos);\n\tif (pos != std::string::npos)\n\t{\n\t\tpos++;\n\t\ts = m_header.at(pos);\n\t\tm_param_list.push_back(s);\n\t}\n}\n\nreturn true;\n\n}\n\nlong int csdbheader::get_version(void)\n{\nreturn m_csdbver;\n}\n\ntStr csdbheader::get_base_path(void)\n{\nreturn m_base_path;\n}\n\ntVecStr csdbheader::get_param_list(void)\n{\nreturn m_param_list;\n}\n\nlong int csdbheader::get_trailer_start(void)\n{\nreturn m_trailer_start;\n}\n\nvoid csdbheader::print_contents(void)\n{\n\tunsigned int i;\n\tprintf(\"Ver= %lu\\nPath= \\\"%s\\\"\\nTrailer start= %lu\\nParam list= \", m_csdbver, m_base_path.c_str(), m_trailer_start);\n\tfor (i=0; i< m_param_list.size(); i++)\n\t{\n\t\tprintf(\"\\\"%s\\\", \", m_param_list[i].c_str());\n\t}\n\tprintf(\"\\n\\n\");\n}\n\n\n\n\n"
  },
  {
    "path": "makedb/csdbheader.h",
    "content": "\n/*\n * CodeQuery\n * Copyright (C) 2013-2017 ruben2020 https://github.com/ruben2020/\n * \n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n */\n\n\n// Cscope database header\n\n#ifndef CSDBHEADER_H\n#define CSDBHEADER_H\n\n#include \"small_lib.h\"\n\nclass csdbheader\n{\n\npublic:\n\ncsdbheader();\ncsdbheader(tStr hdr);\n\nvoid set_header(tStr hdr);\nvoid set_header(const char* hdr);\nbool parse(void);\nlong int get_version(void);\ntStr get_base_path(void);\ntVecStr get_param_list(void);\nlong int get_trailer_start(void);\nvoid print_contents(void);\n\ntStr m_header;\nlong int m_csdbver;\ntStr m_base_path;\ntVecStr m_param_list;\nlong int m_trailer_start;\n\n\n}; // class csdbheader\n\n\n\n#endif // CSDBHEADER_H\n\n\n\n\n"
  },
  {
    "path": "makedb/csdbparser.cpp",
    "content": "\n/*\n * CodeQuery\n * Copyright (C) 2013-2017 ruben2020 https://github.com/ruben2020/\n * \n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n */\n\n\n// Cscope database parser\n\n#include <stdio.h>\n#include \"csdbparser.h\"\n#include \"csdbheader.h\"\n#include \"small_lib.h\"\n\n#define MAX_TEXT_LINE_LEN     (800)\n\n#define CSDBP_GENERAL_CHK()   if ((m_fp == NULL) || \\\n                                  (m_trailer_start <= 0) || \\\n                                  (m_buf == NULL)) \\\n                                  {return resOTHER_ERR;}\n\n\n\n////////////////////////////////////////////////////////////////////////////\n// This section comes from cscope\n\n/*===========================================================================\n Copyright (c) 1998-2000, The Santa Cruz Operation \n All rights reserved.\n \n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n *Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n *Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation\n and/or other materials provided with the distribution.\n\n *Neither name of The Santa Cruz Operation nor the names of its contributors\n may be used to endorse or promote products derived from this software\n without specific prior written permission. \n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS\n IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\n THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE\n LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n INTERRUPTION)\n HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH\n DAMAGE. \n =========================================================================*/\n\n// from cscope's global.h\nextern\tstruct\tkeystruct {\n\tconst char\t*text;\n\tconst char\tdelim;\n\tconst struct\tkeystruct *next;\n} keyword[];\n\n// from cscope's main.c\nconst char\tdichar1[] = \" teisaprnl(of)=c\";\t/* 16 most frequent first chars */\nconst char\tdichar2[] = \" tnerpla\";\t\t/* 8 most frequent second chars\n\t\t\t\t\t\t\t\t\t\t   using the above as first chars */\n\n// from cscope's lookup.c\n/* keyword text for fast testing of keywords in the scanner */\nchar\tenumtext[] = \"enum\";\nchar\texterntext[] = \"extern\";\nchar\tstructtext[] = \"struct\";\nchar\ttypedeftext[] = \"typedef\";\nchar\tuniontext[] = \"union\";\n\n/* This keyword table is also used for keyword text compression.  Keywords\n * with an index less than the numeric value of a space are replaced with the\n * control character corresponding to the index, so they cannot be moved\n * without changing the database file version and adding compatibility code\n * for old databases.\n */\nstruct\tkeystruct keyword[] = {\n\t{\"\",\t\t'\\0',\tNULL},\t/* dummy entry */\n\t{\"#define\",\t' ',\tNULL},\t/* must be table entry 1 */\n\t{\"#include\",\t' ',\tNULL},\t/* must be table entry 2 */\n\t{\"break\",\t'\\0',\tNULL},\t/* rarely in cross-reference */\n\t{\"case\",\t' ',\tNULL},\n\t{\"char\",\t' ',\tNULL},\n\t{\"continue\",\t'\\0',\tNULL},\t/* rarely in cross-reference */\n\t{\"default\",\t'\\0',\tNULL},\t/* rarely in cross-reference */\n\t{\"double\",\t' ',\tNULL},\n\t{\"\\t\",\t\t'\\0',\tNULL},\t/* must be the table entry 9 */\n\t{\"\\n\",\t\t'\\0',\tNULL},\t/* must be the table entry 10 */\n\t{\"else\",\t' ',\tNULL},\n\t{enumtext,\t' ',\tNULL},\n\t{externtext,\t' ',\tNULL},\n\t{\"float\",\t' ',\tNULL},\n\t{\"for\",\t\t'(',\tNULL},\n\t{\"goto\",\t' ',\tNULL},\n\t{\"if\",\t\t'(',\tNULL},\n\t{\"int\",\t\t' ',\tNULL},\n\t{\"long\",\t' ',\tNULL},\n\t{\"register\",\t' ',\tNULL},\n\t{\"return\",\t'\\0',\tNULL},\n\t{\"short\",\t' ',\tNULL},\n\t{\"sizeof\",\t'\\0',\tNULL},\n\t{\"static\",\t' ',\tNULL},\n\t{structtext,\t' ',\tNULL},\n\t{\"switch\",\t'(',\tNULL},\n\t{typedeftext,\t' ',\tNULL},\n\t{uniontext,\t' ',\tNULL},\n\t{\"unsigned\",\t' ',\tNULL},\n\t{\"void\",\t' ',\tNULL},\n\t{\"while\",\t'(',\tNULL},\n\t\n\t/* these keywords are not compressed */\n\t{\"do\",\t\t'\\0',\tNULL},\n\t{\"auto\",\t' ',\tNULL},\n\t{\"fortran\",\t' ',\tNULL},\n\t{\"const\",\t' ',\tNULL},\n\t{\"signed\",\t' ',\tNULL},\n\t{\"volatile\",\t' ',\tNULL},\n};\n#define KEYWORDS\t(sizeof(keyword) / sizeof(keyword[0]))\n////////////////////////////////////////////////////////////////////////////\n\ntypedef struct\n{\nint chr;\nsym_data::enSymType type;\nconst char* desc;\n} chr2enum;\n\nstatic const chr2enum symbtypetbl[] =\n{\n\t{'`', sym_data::symFuncCall, \"FuncCall\"},\n\t{'=', sym_data::symDrctAssgnIncrDecr, \"DirectAssgnIncrDecr\"},\n\t{'c', sym_data::symClass, \"Class\"},\n\t{'e', sym_data::symEnum, \"Enum\"},\n\t{'g', sym_data::symGlobal, \"OtherGlobal\"},\n\t{'l', sym_data::symLocalFuncBlockDef, \"LocalFuncBlockDef\"},\n\t{'m', sym_data::symGlobalEnumStructUnion, \"GlobalEnumStructUnion\"},\n\t{'p', sym_data::symFuncParam, \"FuncParam\"},\n\t{'s', sym_data::symStruct, \"Struct\"},\n\t{'t', sym_data::symTypeDef, \"TypeDef\"},\n\t{'u', sym_data::symUnion, \"Union\"},\n\t{'$', sym_data::symFuncDef, \"FuncDef\"},\n\t{'#', sym_data::symMacroDef, \"MacroDef\"},\n\t{'~', sym_data::symIncl, \"Include\"},\n\t{'@', sym_data::symFile, \"File\"},\n\t{'X', sym_data::symNone, \"NoType\"}\n};\n#define symbtypetbl_SIZE (sizeof(symbtypetbl)/sizeof(chr2enum))\n\n// sym_data ///////////////////////////////////////////////////\n\nsym_data::sym_data()\n:valid(false)\n,sym_type(symNone)\n{\n}\n\nsym_data::sym_data(const sym_data& copy)\n{\nvalid = copy.valid;\nsymbname = copy.symbname;\nsym_type = copy.sym_type;\ncalling_func = copy.calling_func;\ncalling_macro = copy.calling_macro;\n}\n\nsym_data& sym_data::operator= (const sym_data& copy)\n{\nif (this != &copy)\n\t{\t\n\t\tvalid = copy.valid;\n\t\tsymbname = copy.symbname;\n\t\tsym_type = copy.sym_type;\n\t\tcalling_func = copy.calling_func;\n\t\tcalling_macro = copy.calling_macro;\n\t}\nreturn *this;\n}\n\nvoid sym_data::clear(void)\n{\nvalid = false;\nsymbname.clear();\nsym_type = symNone;\ncalling_func.clear();\ncalling_macro.clear();\n}\n\nstd::string sym_data::symbname_escaped(void)\n{\n\treturn add_escape_char(symbname, '\"', '\"');\n}\n\nconst char* sym_data::getTypeDesc(void)\n{\n\tfor (unsigned long i=0; i<symbtypetbl_SIZE; i++)\n\t{\n\t\tif (sym_type == symbtypetbl[i].type)\n\t\t{\n\t\t\treturn symbtypetbl[i].desc;\n\t\t}\n\t}\n\treturn \"\";\n}\n\nconst char sym_data::getTypeChar(void)\n{\n\tfor (unsigned long i=0; i<symbtypetbl_SIZE; i++)\n\t{\n\t\tif (sym_type == symbtypetbl[i].type)\n\t\t{\n\t\t\treturn static_cast<const char>(symbtypetbl[i].chr);\n\t\t}\n\t}\n\treturn '\\0';\n}\n// symdata_pack ///////////////////////////////////////////////////\n\nsymdata_pack::symdata_pack()\n:valid(false)\n,line_num(0)\n{\n}\n\nsymdata_pack::symdata_pack(const symdata_pack& copy)\n{\nvalid = copy.valid;\nfilename = copy.filename;\nline_num = copy.line_num;\nline_text = copy.line_text;\nsymbols = copy.symbols;\n}\n\nsymdata_pack& symdata_pack::operator= (const symdata_pack& copy)\n{\nif (this != &copy)\n\t{\n\t\tvalid = copy.valid;\n\t\tfilename = copy.filename;\n\t\tline_num = copy.line_num;\n\t\tline_text = copy.line_text;\n\t\tsymbols = copy.symbols;\n\t}\nreturn *this;\n}\n\nvoid symdata_pack::clear(void)\n{\nvalid = false;\nfilename.clear();\nline_num = 0;\nline_text.clear();\nsymbols.clear();\n}\n\nstd::string symdata_pack::line_num_str(void)\n{\n\tchar str[30];\n\tsprintf(str, \"%ld\", line_num);\n\tstd::string s(str);\n\treturn s;\n}\n\nstd::string symdata_pack::line_text_escaped(void)\n{\n\treturn add_escape_char(line_text.substr(0, MAX_TEXT_LINE_LEN) , '\"', '\"');\n}\n\nstd::string symdata_pack::line_text_replacetab(void)\n{\n\tstd::string s;\n\tlong i;\n\tlong n = line_text.length();\n\tfor (i=0; i < n; i++)\n\t{\n\t\tif (line_text[i] == '\\t') s += ' ';\n\t\telse s += line_text[i];\n\t}\n\ts = s.substr(0, MAX_TEXT_LINE_LEN);\n\treturn s;\n}\n\nstd::string symdata_pack::line_text_blob(void)\n{\n\ttempbuf buf(20000);\n\tstrcpy(buf.get(), line_text.substr(0, MAX_TEXT_LINE_LEN).c_str());\n\t//packtext(buf.get(), true);\n\tstd::string s(buf.get());\n\treturn s;\n}\n\n// csdbparser ///////////////////////////////////////////////////\n\ncsdbparser::csdbparser()\n: m_fp(NULL)\n,m_buf(NULL)\n,m_buf2(NULL)\n,m_state(stIDLE)\n,m_trailer_start(0)\n,m_bufsize(0)\n,m_debug(false)\n,m_compress(false)\n{\n}\n\ncsdbparser::~csdbparser()\n{\nclose_file();\n}\n\nconst char* csdbparser::getBasePath(void)\n{\n\treturn m_base_path.c_str();\n}\n\nvoid csdbparser::setDebug(bool val)\n{\n\tm_debug = val;\n}\n\nvoid csdbparser::create_buf(long int size)\n{\n\tif (size >= CSDBP_MINIM_BUFSIZE)\n\t{\n\t\tdestroy_buf();\n\t\tm_buf   = new char[size];\n\t\tm_buf2  = new char[size+1000];\n\t\t*m_buf  = 0;\n\t\t*m_buf2 = 0;\n\t\tm_bufsize = size;\n\t}\n}\n\nvoid csdbparser::destroy_buf(void)\n{\n\tdelete[] m_buf;\n\tm_buf = NULL;\n\tdelete[] m_buf2;\n\tm_buf2 = NULL;\n\tm_bufsize = 0;\n}\n\ncsdbparser::enResult csdbparser::open_file(const char *fn)\n{\n\nenResult res = file_sanity_check(fn);\nif (res != resOK) {return res;}\n\nclose_file();\nm_fp = fopen(fn, \"rb\");\nres = parse_headers();\nif (res != resOK) {close_file();}\nreturn res;\n}\n\nvoid csdbparser::close_file(void)\n{\nif (m_fp != NULL)\n\t{\n\t\tfclose(m_fp);\n\t\tm_fp = NULL;\n\t}\nm_trailer_start = 0;\ndestroy_buf();\nm_base_path.clear();\nm_calling_func.clear();\nm_calling_macro.clear();\nm_current_srcfile.clear();\n}\n\ncsdbparser::enResult csdbparser::file_sanity_check(const char *fn)\n{\nsmartFILE fp;\ntempbuf buf(20000);\nlong i;\nstd::string s;\nbool chkok;\n\n// Does the file exist?\nif (check_fileExists(fn) == false) {return resFILE_NOT_FOUND;}\n\n// Try to open the file for reading\nfp = fopen(fn, \"r\");\nif (fp == NULL) {return resFILE_ACCESS_ERR;}\n\n// Read out the first line i.e. the header\nif (fgets(buf.get(), 20000, fp.get()) == NULL) {return resFILE_ACCESS_ERR;}\nchomp(buf.get());\n\ns = static_cast<const char*>(buf.get());\ncsdbheader hdr;\n\nhdr.set_header(s);\nif (hdr.parse() == false)\n     {return resUNRECOG_FORMAT;}\n\n// Compare the cscope version used to build the database\nif (hdr.get_version() != CSDBP_SUPPORTED_VER_NUM)\n     {return resINCORRECT_VER;}\n\n// Compare the parameters used to build the database with the supported one\n// We must have \"c\", we don't mind \"q\" and we cannot have any other\nchkok = true;\ntVecStr vs = hdr.get_param_list();\n\nfor(i=0; i< (long) vs.size(); i++)\n{\n\tif ((vs[i].compare(\"c\") != 0) && \n\t\t(vs[i].compare(\"q\") != 0)) chkok = false;\n}\nif (chkok == false) {return resUNSUPPORTED_PARAM;}\n\n// Trailer offset should be a positive number, normally > 20\nif (hdr.get_trailer_start() < 20) {return resUNRECOG_FORMAT;}\n\n// Header looks OK so far!\n\nreturn resOK;\n}\n\ncsdbparser::enResult csdbparser::parse_headers(void)\n{\n\nlong i;\n\nif (m_fp == NULL) {return resFILE_NOT_OPEN;}\ncreate_buf();\n\nm_base_path.clear();\nm_calling_func.clear();\nm_calling_macro.clear();\nm_current_srcfile.clear();\n\ncsdbheader hdr;\n\n// Read out the first line i.e. the header\nif (fgets(m_buf, CSDBP_MINIM_BUFSIZE, m_fp) == NULL) {return resFILE_ACCESS_ERR;}\n\nstd::string s(static_cast<const char*>(m_buf));\n\nhdr.set_header(s);\nif (hdr.parse() == false)\n\t{return resUNRECOG_FORMAT;}\n\ntVecStr vs = hdr.get_param_list();\nm_compress = true;\nfor(i=0; i< (long) vs.size(); i++)\n{\n\tif (vs[i].compare(\"c\") == 0) \n\t\tm_compress = false;\n}\nif (m_compress) printf(\"WARNING: Compression of cscope.out detected. This is experimental.\\n\");\n\nm_trailer_start = hdr.get_trailer_start();\nm_base_path = hdr.get_base_path();\n\nreturn resOK;\n}\n\nbool csdbparser::srcfil_trailer_check(void)\n{\nchar str[5];\nchar *s = nullptr;\nint ret=0x30;\nlong int i = 0-3;\n\nif (fseek(m_fp, m_trailer_start-3, SEEK_SET) != 0) return false;\ns = fgets(str, 4, m_fp);\nif (s == nullptr) return false;\nif ((str[0] == 0x09)&&(str[1] == 0x40)&&(str[2] == 0x0A)) return true;\n\nprintf(\"WARNING: Trailer start offset is wrong. Attempting to find right trailer start offset.\\n\");\nif (fseek(m_fp, m_trailer_start-3, SEEK_SET) != 0) return false;\nwhile(ret != EOF)\n\t{\n\t\tret = fgetc(m_fp); i++;\n\t\tif (ret != 0x09) continue;\n\t\tret = fgetc(m_fp); i++;\n\t\tif (ret != 0x40) continue;\n\t\tret = fgetc(m_fp); i++;\n\t\tif (ret == 0x0A)\n\t\t{\n\t\t\tprintf(\"Wrong trailer start offset = %ld, Corrected trailer start offset = %ld\\n\", m_trailer_start, m_trailer_start + i);\n\t\t\tm_trailer_start += i;\n\t\t\treturn true;\n\t\t}\n\t}\nreturn false;\n}\n\ncsdbparser::enResult csdbparser::setup_srcfil_read(void)\n{\nCSDBP_GENERAL_CHK();\n\nlong int num;\n\nif (srcfil_trailer_check() == false) {return resOTHER_ERR;}\nif (fseek(m_fp, m_trailer_start, SEEK_SET) != 0) {return resFILE_ACCESS_ERR;}\n\nfscanf(m_fp, \"%ld\\n\", &num); // number of source directories\nwhile (num-- > 0) {fgets(m_buf, CSDBP_MINIM_BUFSIZE, m_fp);}\nfscanf(m_fp, \"%ld\\n\", &num); // number of include directories\nwhile (num-- > 0) {fgets(m_buf, CSDBP_MINIM_BUFSIZE, m_fp);}\n\nfscanf(m_fp, \"%ld\\n\", &num); // number of files\nfscanf(m_fp, \"%ld\\n\", &num); // string size required\ncreate_buf(num);\n\nreturn resOK;\n}\n\ncsdbparser::enResult csdbparser::get_next_srcfil(std::string* srcfil)\n{\nCSDBP_GENERAL_CHK();\n\n\nif (ftell(m_fp) < m_trailer_start) setup_srcfil_read();\n\nif (fgets(m_buf, m_bufsize, m_fp) != NULL)\n     *srcfil = chomp(m_buf);\nelse srcfil->clear();\n\nreturn resOK;\n}\n\ncsdbparser::enResult csdbparser::setup_symbol_read(void)\n{\nCSDBP_GENERAL_CHK();\n\nrewind(m_fp);\nif (fgets(m_buf, m_bufsize, m_fp) == NULL) {return resFILE_ACCESS_ERR;}\nm_calling_func.clear();\nm_calling_macro.clear();\nm_current_srcfile.clear();\n//m_state = stSYMB_SETUP_DONE;\n\nreturn resOK;\n}\n\ncsdbparser::enResult csdbparser::get_next_symbol(symdata_pack* pack)\n{\nCSDBP_GENERAL_CHK();\nenResult res;\nbool endOfSymbData;\nbool foundSomething;\nint ch;\n\n//if (m_state != stSYMB_SETUP_DONE) return resUNKNOWN_ERR;\n\npack->clear();\nif (m_debug) printf(\"=====> get_next_symbol\\n\");\ndo\n{\n\tres = single_line_symbol(endOfSymbData, foundSomething);\n\tif (res != resOK) return res;\n\tif (endOfSymbData)\n\t\t{\n\t\t\tpack->valid = false;\n\t\t\tif (m_debug) printf(\"End of symbols data!\\n\");\n\t\t\treturn resOK;\n\t\t}\n} while (foundSomething);\npack->valid = true;\npack->filename = m_current_srcfile;\nif (m_debug) printf(\"=====> Back from get_next_symbol\\n\");\n\nch = fgetc(m_fp);\nif (ch == 0x0A)\n\t{\n\t\tpack->line_num = -1; // empty line\n\t\treturn resOK; //EOL\n\t}\nelse ungetc(ch, m_fp);\n\nif (fscanf(m_fp, \"%ld\", &(pack->line_num)) != 1)\n\t{\n\t\treturn resUNKNOWN_ERR;\n\t}\nch = fgetc(m_fp); // the space after the line number\nif (fgets(m_buf, m_bufsize, m_fp) == NULL) {return resFILE_ACCESS_ERR;}\n//pack->line_text = chomp(m_buf);\npack->line_text = decompress(m_buf2, m_buf);\nif (m_debug) {printf(\"fn = %s, lineno=%ld, firstline=%s\\n\",\n\t\tpack->filename.c_str(), pack->line_num, pack->line_text.c_str());}\n\nunsigned int loopcheck = 0; // prevent infinite loop\nsym_data sd;\nwhile(loopcheck++ < 65500)\n\t{\n\t\t// symbol line\n\t\tch = fgetc(m_fp);\n\t\tif ((ch == 0x0A)&&(loopcheck > 1))\n\t\t{\n\t\t\tbreak; //EOL\n\t\t}\n\t\telse if ((ch >= 0x30)&&(ch <= 0x39)&&(loopcheck > 1))\n\t\t{\n\t\t\tungetc(ch, m_fp);\n\t\t\tbreak; // symbol shouldn't start with line numbers\n\t\t}\n\t\telse \n\t\t{\n\t\t\tungetc(ch, m_fp);\n\t\t\tres = symbolread(&sd, pack);\n\t\t\tif (res != resOK) return res;\n\t\t\tpack->line_text += sd.symbname;\n\t\t\tif (sd.valid) {pack->symbols.push_back(sd);}\n\t\t}\n\t\t// no-symbol line\n\t\tch = fgetc(m_fp);\n\t\tif ((ch == 0x0A)&&(loopcheck > 1)) {;}\n\t\telse\n\t\t{\n\t\t\tungetc(ch, m_fp);\n\t\t\tif (fgets(m_buf, m_bufsize, m_fp) == NULL)\n\t\t\t{return resFILE_ACCESS_ERR;}\n\t\t\t//pack->line_text += chomp(m_buf);\n\t\t\tpack->line_text += decompress(m_buf2, m_buf);\n\t\t}\n\t}\nreturn resOK;\n}\n\ncsdbparser::enResult csdbparser::single_line_symbol(bool& endOfSymbData, bool& foundSomething)\n{\nif (m_debug) printf(\"=====> single_line_symbol\\n\");\nendOfSymbData = false;\nfoundSomething = false;\nint ch;\nch = fgetc(m_fp);\nif (m_debug) printf(\"check1!  %c\\n\", (char)ch);\nif (ch == 9) // TAB\n\t{\n\t\tch = fgetc(m_fp);\n\t\tfoundSomething = true;\n\t\tif (m_debug) printf(\"check2!  %c\\n\", (char)ch);\t\t\n\t\tswitch(ch)\n\t\t{\n\t\t\tcase '@': // start of a new file\n\t\t\t\tif (fgets(m_buf, m_bufsize, m_fp) == NULL)\n\t\t\t\t\treturn resFILE_ACCESS_ERR;\n\t\t\t\t//m_current_srcfile = chomp(m_buf);\n\t\t\t\tm_current_srcfile = decompress(m_buf2, m_buf);\n\t\t\t\tif (m_debug) printf(\"New file=%s\\n\", m_buf);\n\t\t\t\tendOfSymbData = m_current_srcfile.empty();\n\t\t\t\tbreak;\n\t\t\tcase ')': // end of a definition\n\t\t\t\tif (m_calling_macro.size() > 0)\n\t\t\t\t\tm_calling_macro.clear();\n\t\t\t\telse if (m_debug) printf(\"no macro to clear!\\n\");\n\t\t\t\tif (fgets(m_buf, m_bufsize, m_fp) == NULL)\n\t\t\t\t\t{return resFILE_ACCESS_ERR;}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn resUNKNOWN_ERR;\n\t\t};\n\t\tfgets(m_buf, m_bufsize, m_fp); // empty line\n\t}\nelse ungetc(ch, m_fp);\nreturn resOK;\n}\n\ncsdbparser::enResult csdbparser::symbolread(sym_data *data, symdata_pack* pack)\n{\nif (m_debug) printf(\"=====> symbolread\\n\");\nint ch, ch2;\ndata->clear();\ndata->valid = true;\ndata->sym_type = sym_data::symNone;\nch = fgetc(m_fp);\nif (m_debug) printf(\"check3!  %c\\n\", (char)ch);\nif (ch == 9) // TAB\n\t{\n\t\tch = fgetc(m_fp);\n\t\tif (m_debug) printf(\"check4!  %c\\n\", (char)ch);\n\t\tswitch(ch)\n\t\t{\n\t\t\tcase '}': // end of func\n\t\t\t\tif (m_calling_func.size() > 0)\n\t\t\t\t\tm_calling_func.clear();\n\t\t\t\telse if (m_debug) printf(\"no func to clear!\\n\");\n\t\t\t\tdata->valid = false;\n\t\t\t\tif (m_debug) printf(\"End of func found\\n\");\n\t\t\t\tbreak;\n\t\t\tcase ')': // end of macro\n\t\t\t\tif (m_calling_macro.size() > 0)\n\t\t\t\t\tm_calling_macro.clear();\n\t\t\t\telse if (m_debug) printf(\"no macro to clear!\\n\");\n\t\t\t\tdata->valid = false;\n\t\t\t\tif (m_debug) printf(\"End of macro found\\n\");\n\t\t\t\tbreak;\n\t\t\tcase '~': // include\n\t\t\t\tch2 = fgetc(m_fp);\n\t\t\t\tif ((ch2 == '\"')||(ch2 == '<'))\n\t\t\t\t{\n\t\t\t\t\tpack->line_text += (char) ch2;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tungetc(ch2, m_fp);\n\t\t\t\t}\n\t\t\t\tdata->sym_type = sym_data::symIncl;\n\t\t\t\tif (m_debug) printf(\"Incl found\\n\");\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tfor (int i=0; i< (long) symbtypetbl_SIZE; i++)\n\t\t\t\t\t{\n\t\t\t\t\tif (symbtypetbl[i].chr == ch)\n\t\t\t\t\t\t{\n\t\t\t\t\t\tdata->sym_type =\n\t\t\t\t\t\t\tsymbtypetbl[i].type;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\tif (data->sym_type == sym_data::symNone)\n\t\t\t\t\treturn resUNKNOWN_ERR;\n\t\t\t\tbreak;\n\t\t};\n\t}\nelse ungetc(ch, m_fp);\nif (fgets(m_buf, m_bufsize, m_fp) == NULL) {return resFILE_ACCESS_ERR;}\n//data->symbname = chomp(m_buf);\ndata->symbname = decompress(m_buf2, m_buf);\nif (data->valid) data->valid = (strlen(data->symbname.c_str()) > 0);\nif (m_debug) printf(\"sym name=%s, type = %s, valid=%d, ch=%c\\n\",\n\tdata->symbname.c_str(), data->getTypeDesc(), data->valid, ch);\nif      (ch == '$') {m_calling_func.assign(data->symbname);}\nelse if (ch == '#') {m_calling_macro.assign(data->symbname);}\nelse if (ch == '`')\n\t{\n\t\tdata->calling_func = m_calling_func;\n\t\tdata->calling_macro = m_calling_macro;\n\t}\nreturn resOK;\n}\n\n// some code reused from putline function in cscope's find.c\n// source and dest are null-terminated strings\nconst char* csdbparser::decompress(char* dest, char* source)\n{\n\tchomp(source);\n\tif (m_compress == false) return source;\n\n\tunsigned c;\n    unsigned long int i=0;\n\tchar decomp[3];\n\tchar k[2];\n\tbool compressed = false;\n\n\tdest[0] = 0; // null-terminated string\n\tdecomp[2] = 0; // null-terminated string\n\tk[1] = 0; // null-terminated string\n\n\tdo\n\t{\n\t\tc = (unsigned) source[i++];\n\t\tif (c == 0) break;\n\n\t\t/* check for a compressed digraph */\n\t\tif (c > '\\177')\n\t\t{\n\t\t\tc &= 0177;\n\t\t\tdecomp[0] = dichar1[c / 8];\n\t\t\tdecomp[1] = dichar2[c & 7];\n\t\t\tstrcat(dest, decomp);\n\t\t\tcompressed = true;\n\t\t}\n\t\t/* check for a compressed keyword */\n\t\telse if (c < ' ') \n\t\t{\n\t\t\tstrcat(dest, keyword[c].text);\n\t\t\tif (keyword[c].delim != '\\0') \n\t\t\t{\n\t\t\t\tk[0] = ' ';\n\t\t\t\tstrcat(dest, k);\n\t\t\t}\n\t\t\tif (keyword[c].delim == '(')\n\t\t\t{\n\t\t\t\tk[0] = '(';\n\t\t\t\tstrcat(dest, k);\n\t\t\t}\n\t\t\tcompressed = true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\tk[0] = (char) c;\n\t\t\t\tstrcat(dest, k);\n\t\t}\n\t} while (c != 0);\n\n\t//if (compressed) printf(\"Before: %s\\nAfter :%s\\n\\n\", source, dest);\n\n\treturn dest;\n}\n"
  },
  {
    "path": "makedb/csdbparser.h",
    "content": "\n/*\n * CodeQuery\n * Copyright (C) 2013-2017 ruben2020 https://github.com/ruben2020/\n * \n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n */\n\n\n// Cscope database parser\n\n#ifndef CSDBPARSER_H_CQ\n#define CSDBPARSER_H_CQ\n\n#include <string>\n#include <memory>\n#include <vector>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\n#define CSDBP_MINIM_BUFSIZE      (20000)\n#define CSDBP_SUPPORTED_VER      \"15\"\n#define CSDBP_SUPPORTED_VER_NUM  (15)\n#define CSDBP_SUP_PARAM          \" -c               \"\n#define CSDBP_SUP_PARAM2         \" -c \"\n\ntypedef std::vector<std::string> strvect;\n\n\n// sym_data ///////////////////////////////////////////////////\n\nclass sym_data\n{\npublic:\n\nenum enSymType\n  {\n   symNone = 0,\n   symFuncDef,\n   symFuncCall,\n   symMacroDef,\n   symIncl,\n   symDrctAssgnIncrDecr,\n   symClass,\n   symEnum,\n   symGlobal,\n   symLocalFuncBlockDef,\n   symGlobalEnumStructUnion,\n   symFuncParam,\n   symStruct,\n   symTypeDef,\n   symUnion,\n   symFile\n  };\n\nsym_data();\nsym_data(const sym_data& copy);\nsym_data& operator= (const sym_data& copy);\n~sym_data() { /* nothing to do */ }\nvoid clear(void);\nstd::string symbname_escaped(void);\nconst char* getTypeDesc(void);\nconst char getTypeChar(void);\n\nbool valid;\nstd::string symbname;\nenSymType sym_type;\nstd::string calling_func;\nstd::string calling_macro;\n}; // class sym_data\n\ntypedef std::vector<sym_data> symdatalist;\n\n\n// symdata_pack ///////////////////////////////////////////////////\n\nclass symdata_pack\n{\npublic:\nbool valid;\nstd::string filename;\nlong int line_num;\nstd::string line_text;\nsymdatalist symbols;\n\nsymdata_pack();\nsymdata_pack(const symdata_pack& copy);\nsymdata_pack& operator= (const symdata_pack& copy);\n~symdata_pack() { /* nothing to do */ }\nvoid clear(void);\nstd::string line_num_str(void);\nstd::string line_text_escaped(void);\nstd::string line_text_blob(void);\nstd::string line_text_replacetab(void);\n}; // class symdata_pack\n\n\n// csdbparser ///////////////////////////////////////////////////\n\nclass csdbparser\n{\n\npublic:\n\nenum enResult\n  {\n   resOK = 0,\n   resFILE_NOT_FOUND,\n   resFILE_ACCESS_ERR,\n   resUNRECOG_FORMAT,\n   resINCORRECT_VER,\n   resUNSUPPORTED_PARAM,\n   resOTHER_ERR,\n   resUNKNOWN_ERR,\n   resFILE_NOT_OPEN\n  };\n\nenum enState\n  {\n   stIDLE = 0,\n   stSYMB_SETUP_DONE\n  };\n\n\ncsdbparser();\n~csdbparser();\n\nenResult open_file(const char *fn);\nbool isFileOpen(void) {return (m_fp != NULL);}\nvoid close_file(void);\nstatic enResult file_sanity_check(const char *fn);\n\nenResult setup_srcfil_read(void);\nenResult get_next_srcfil(std::string* srcfil);\n\nenResult setup_symbol_read(void);\nenResult get_next_symbol(symdata_pack* pack);\n\nconst char* getBasePath(void);\nvoid setDebug(bool val);\n\nprivate:\nFILE *m_fp;\nchar *m_buf;\nchar *m_buf2;\nlong int m_bufsize;\nbool m_compress;\nenState m_state;\nlong int m_trailer_start;\nstd::string m_base_path;\nstd::string m_calling_func;\nstd::string m_calling_macro;\nstd::string m_current_srcfile;\nbool m_debug;\n\nvoid create_buf(long int size = CSDBP_MINIM_BUFSIZE);\nvoid destroy_buf(void);\nenResult parse_headers(void);\nenResult single_line_symbol(bool& endOfSymbData, bool& foundSomething);\nenResult symbolread(sym_data* data, symdata_pack* pack);\nbool srcfil_trailer_check(void);\nconst char* decompress(char* dest, char* source);\n\n}; // class csdbparser\n\n\n#endif //CSDBPARSER_H_CQ\n\n\n"
  },
  {
    "path": "makedb/ctagread.cpp",
    "content": "\n/*\n * CodeQuery\n * Copyright (C) 2013-2017 ruben2020 https://github.com/ruben2020/\n * \n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n */\n\n\n#include \"ctagread.h\"\n#include \"small_lib.h\"\n\nctagread::ctagread()\n:f_tags(NULL)\n,m_insertstmt(NULL)\n,m_insertinheritstmt(NULL)\n,m_readclassstmt(NULL)\n,m_readsymstmt(NULL)\n,m_writedeststmt(NULL)\n,m_writetypestmt(NULL)\n,m_readsymfstmt(NULL)\n{\n}\n\nctagread::~ctagread()\n{\n\tclose_files();\n}\n\nctagread::enResult ctagread::open_files(const char* sqldb, const char* tagsfn)\n{\n\tint rc;\n\tf_tags = fopen(tagsfn, \"r\");\n\tif (f_tags == NULL) return resFILE_ACCESS_ERR;\n\t\n\trc = sqlite3_open_v2(sqldb, &m_db, SQLITE_OPEN_READWRITE, NULL);\n\tif (rc != SQLITE_OK)\n\t{\n\t\tsqlite3_close(m_db);\n\t\treturn resFILE_ACCESS_ERR;\n\t}\n\trc=sqlite3_exec(m_db, \"PRAGMA synchronous = OFF;\"\n\t\t\"PRAGMA journal_mode = OFF;\"\n\t\t\"PRAGMA locking_mode = EXCLUSIVE;\"\n\t\t\"PRAGMA automatic_index = FALSE;\"\n\t\t\"PRAGMA cache_size = 20000;\", NULL, 0, NULL);\n\tif (rc != SQLITE_OK) return resSQLError;\n\treturn resOK;\n}\n\nvoid ctagread::close_files(void)\n{\n\tsqlite3_reset(m_insertstmt);\n\tsqlite3_reset(m_insertinheritstmt);\n\tsqlite3_reset(m_readclassstmt);\n\tsqlite3_reset(m_readsymstmt);\n\tsqlite3_reset(m_writedeststmt);\n\tsqlite3_reset(m_writetypestmt);\n\tsqlite3_reset(m_readsymfstmt);\n\tsqlite3_finalize(m_insertstmt);\n\tsqlite3_finalize(m_insertinheritstmt);\n\tsqlite3_finalize(m_readclassstmt);\n\tsqlite3_finalize(m_readsymstmt);\n\tsqlite3_finalize(m_writedeststmt);\n\tsqlite3_finalize(m_writetypestmt);\n\tsqlite3_finalize(m_readsymfstmt);\n\tm_insertstmt = NULL;\n\tm_readclassstmt = NULL;\n\tm_readsymstmt = NULL;\n\tm_writedeststmt = NULL;\n\tm_writetypestmt = NULL;\n\tm_readsymfstmt = NULL;\n\tfclose(f_tags);\n\tf_tags = NULL;\n\tsqlite3_close(m_db);\n\tm_db = 0;\n}\n\nctagread::enResult ctagread::prepare_cqdb(void)\n{\n\tint rc;\n\n\trc = prepare_stmt(&m_insertstmt, \"INSERT INTO membertbl VALUES (?,?,?);\");\n\tif (rc != SQLITE_OK) return resSQLError;\n\n\trc = prepare_stmt(&m_insertinheritstmt, \"INSERT INTO inherittbl VALUES (?,?);\");\n\tif (rc != SQLITE_OK) return resSQLError;\n\n\trc = prepare_stmt(&m_readclassstmt, \"SELECT symID FROM symtbl WHERE symName=? AND symType=\\\"c\\\";\");\n\tif (rc != SQLITE_OK) return resSQLError;\n\n\t//rc = prepare_stmt(&m_readsymstmt, \"SELECT symID FROM symtbl WHERE symName=? AND lineid IN (SELECT lineID FROM linestbl WHERE linenum=? AND fileid IN (SELECT fileID FROM filestbl WHERE filePath LIKE ?));\");\n\trc = prepare_stmt(&m_readsymstmt, \"SELECT symtbl.symID FROM symtbl INNER JOIN linestbl ON (symtbl.symName=? AND symtbl.lineID = linestbl.lineID AND linestbl.linenum=?) INNER JOIN filestbl ON (linestbl.fileID = filestbl.fileID AND filePath LIKE ?);\");\n\tif (rc != SQLITE_OK) return resSQLError;\n\n\trc = prepare_stmt(&m_writedeststmt, \"UPDATE symtbl SET symName=? WHERE symID=?;\");\n\tif (rc != SQLITE_OK) return resSQLError;\n\n\trc = prepare_stmt(&m_writetypestmt, \"UPDATE symtbl SET symType=? WHERE symID=?;\");\n\tif (rc != SQLITE_OK) return resSQLError;\n\n\t//rc = prepare_stmt(&m_readsymfstmt, \"SELECT symID FROM symtbl WHERE symName=? AND symType=\\\"$\\\" AND lineid IN (SELECT lineID FROM linestbl WHERE linenum=? AND fileid IN (SELECT fileID FROM filestbl WHERE filePath LIKE ?));\");\n\trc = prepare_stmt(&m_readsymfstmt, \"SELECT symtbl.symID FROM symtbl INNER JOIN linestbl ON (symtbl.symName=? AND symtbl.symType=\\\"$\\\" AND symtbl.lineID = linestbl.lineID AND linestbl.linenum=?) INNER JOIN filestbl ON (linestbl.fileID = filestbl.fileID AND filePath LIKE ?);\");\n\tif (rc != SQLITE_OK) return resSQLError;\n\n\trc=sqlite3_exec(m_db,   \"BEGIN EXCLUSIVE;\"\n\t\t\t\t\"DROP INDEX IF EXISTS memberIDIdx;\"\n\t\t\t\t\"DROP INDEX IF EXISTS groupIDIdx;\"\n\t\t\t\t\"DROP INDEX IF EXISTS parentIDIdx;\"\n\t\t\t\t\"DROP INDEX IF EXISTS childIDIdx;\"\n\t\t\t\t\"DELETE FROM membertbl;\"\n\t\t\t\t\"DELETE FROM inherittbl;\"\n\t\t\t\t\"COMMIT;\", NULL, 0, NULL);\n\tif (rc != SQLITE_OK)\n\t{\n\t\tif (m_debug) printf(\"SQLErr13: %d, %s\\n\", rc, sqlite3_errmsg(m_db));\n\t\treturn resSQLError;\n\t}\n\n\treturn resOK;\n}\n\nctagread::enResult ctagread::process_ctags(void)\n{\n\ttempbuf sym(65501), fil(65501), classname(65501), classname2(65501);\n\ttempbuf numtxt(500), linetxt(65501), fil2(65501), nmspace(65501);\n\tlong int num;\n\tlong int numOfLines=0;\n\tlong int numOfLines2=0;\n\tchar* retval;\n\tint scanretval = 0;\n\tint rc;\n\tchar c;\n\tchar smallstr[2];\n\tchar *cp;\n\tstrctagIDList classIDs, symIDs, parentClassIDs, parentClassIDs_temp;\n\tenResult res;\n\tstd::vector<stClsID> listClsHist;\n\tbool result;\n\n\t*(fil.get()) = '%'; // for SQL LIKE pattern recognition\n\tsmallstr[1] = 0;\n\tres = prepare_cqdb();\n\tif (res != resOK) return res;\n\t\n\tdo{\n\t\tretval = fgets(linetxt.get(), linetxt.size() - 1, f_tags);\n\t\tif (retval != NULL)\n\t\t{\n\t\t\tchomp(linetxt.get());\n\t\t\tscanretval = sscanf(linetxt.get(), \"%s\\t%s\\t%ld;\\\"\\t%c\\tclass:%s\\t\", sym.get(), fil2.get(), &num, &c, classname.get());\n\t\t}\n\t\tif ((retval != NULL)&&(scanretval == 5))\n\t\t{\n\t\t\tstrcpy(fil.get(), \"%\");\n\t\t\tstrcat(fil.get(), extract_filename(fil2.get()));\n\t\t\tres = getHListOfClassIDs(&classIDs, get_last_part(get_last_part(classname.get(), ':'), '.'), &listClsHist);\n\t\t\tif (res != resOK) return res;\n\t\t\tif (classIDs.empty()) continue;\n\t\t\tcp = sym.get();\n\t\t\tif (*(sym.get()) == '~')\n\t\t\t{\n\t\t\t\tcp = (sym.get()) + 1;   // include destructors\n\t\t\t\t\t\t\t// which cscope missed out\n\t\t\t}\n\t\t\tsprintf(numtxt.get(), \"%ld\", num);\n\t\t\tif (c == 'f')\n\t\t\t\tres = getListOfSymIDs(m_readsymfstmt, &symIDs, cp, numtxt.get(), fil.get());\n\t\t\telse\n\t\t\t\tres = getListOfSymIDs(m_readsymstmt, &symIDs, cp, numtxt.get(), fil.get());\n\t\t\tif (res != resOK) {return res;}\n\t\t\tif ((symIDs.empty() == true)&&(c == 'f'))\n\t\t\t{\n\t\t\t\tres = getListOfSymIDs(m_readsymstmt, &symIDs, cp, numtxt.get(), fil.get());\n\t\t\t\tif (res != resOK) {return res;}\n\t\t\t\tif (symIDs.empty() == false)\n\t\t\t\tfor (long i=0; i < symIDs.size(); i++)\n\t\t\t\t\t{\n\t\t\t\t\t\trc=execstmt(m_writetypestmt, \"$\", symIDs[i].c_str());\n\t\t\t\t\t\tif (rc!=0) return resSQLError;\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tif (symIDs.empty() == false)\n\t\t\t{\n\t\t\t\tfor (long i=0; i < symIDs.size(); i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tsmallstr[0] = c;\n\t\t\t\t\t\trc=execstmt(m_insertstmt, classIDs[0].c_str(), symIDs[i].c_str(), smallstr);\n\t\t\t\t\t\tif (rc!=0) return resSQLError;\t\t\t\t\t\t\n\t\t\t\t\t\tif (*(sym.get()) == '~')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\trc=execstmt(m_writedeststmt, sym.get(), symIDs[i].c_str());\n\t\t\t\t\t\t\tif (rc!=0) return resSQLError;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnumOfLines++;\n\t\t\t\t\t}\n\t\t\t}\n\t\t\t//else {if (m_debug) {printf(\"no match found for symbol: %s\\n\",sym.get());}}\n\t\t}\n\t\tif (retval != NULL)\n\t\t{\n\t\t\tscanretval = sscanf(linetxt.get(),\n\t\t\t\"%s\\t%s\\t%ld;\\\"\\t%c\\tinherits:%s\", sym.get(), fil2.get(), &num, &c, classname.get());\n\t\t\tresult = ((scanretval == 5)&&(c == 'c'));\n\t\t\tif (!result)\n\t\t\t{\n\t\t\t\tscanretval = sscanf(linetxt.get(),\n\t\t\t\t\"%s\\t%s\\t%ld;\\\"\\t%c\\tfile:\\tinherits:%s\", sym.get(), fil2.get(),\n\t\t\t\t\t&num, &c, classname.get());\n\t\t\t\tresult = ((scanretval == 5)&&(c == 'c'));\n\t\t\t}\n\t\t\tif (!result)\n\t\t\t{\n\t\t\t\tscanretval = sscanf(linetxt.get(),\n\t\t\t\t\"%s\\t%s\\t%ld;\\\"\\t%c\\tclass:%s\\tinherits:%s\", sym.get(), fil2.get(),\n\t\t\t\t\t&num, &c, classname2.get(), classname.get());\n\t\t\t\tresult = ((scanretval == 6)&&(c == 'c'));\n\t\t\t}\n\t\t\tif (!result)\n\t\t\t{\n\t\t\t\tscanretval = sscanf(linetxt.get(),\n\t\t\t\t\"%s\\t%s\\t%ld;\\\"\\t%c\\tnamespace:%s\\tinherits:%s\", sym.get(), fil2.get(),\n\t\t\t\t\t&num, &c, nmspace.get(), classname.get());\n\t\t\t\tresult = ((scanretval == 6)&&(c == 'c'));\n\t\t\t}\n\t\t\tif (!result)\n\t\t\t{\n\t\t\t\tscanretval = sscanf(linetxt.get(),\n\t\t\t\t\"%s\\t%s\\t%ld;\\\"\\t%c\\tnamespace:%s\\tfile:\\tinherits:%s\", sym.get(), fil2.get(),\n\t\t\t\t\t&num, &c, nmspace.get(), classname.get());\n\t\t\t\tresult = ((scanretval == 6)&&(c == 'c'));\n\t\t\t}\n\t\t\tif (result)\n\t\t\t{\n\t\t\t\tres = getHListOfClassIDs(&classIDs, sym.get(), &listClsHist);\n\t\t\t\tif (res != resOK) return res;\n\t\t\t\tif (classIDs.empty()) continue;\n\t\t\t\tparentClassIDs.clear();\n\t\t\t\tparentClassIDs_temp.clear();\n\t\t\t\tstd::vector<std::string> vecstr = splitstr(classname.get(), ',');\n\t\t\t\tfor (long i=0; i<vecstr.size(); i++)\n\t\t\t\t{\n\t\t\t\t\tres = getHListOfClassIDs(&parentClassIDs_temp, \n\t\t\t\t\t\tget_last_part(get_last_part((char*)vecstr[i].c_str(), ':'), '.'), &listClsHist);\n\t\t\t\t\tif (res != resOK) return res;\n\t\t\t\t\twhile (parentClassIDs_temp.empty() == false)\n\t\t\t\t\t{\n\t\t\t\t\t\tparentClassIDs.push_back(parentClassIDs_temp.back());\n\t\t\t\t\t\tparentClassIDs_temp.pop_back();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (long i=0; i<parentClassIDs.size(); i++)\n\t\t\t\t{\n\t\t\t\t\trc=execstmt(m_insertinheritstmt, parentClassIDs[i].c_str(), classIDs[0].c_str());\n\t\t\t\t\tif (rc!=0) return resSQLError;\n\t\t\t\t\tnumOfLines2++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} while (retval != NULL);\n\tif (m_debug) printf (\"Total membertbl records possible = %ld\\n\", numOfLines);\n\tif (m_debug) printf (\"Total inherittbl records possible = %ld\\n\", numOfLines2);\n\treturn resOK;\n}\n\nctagread::enResult ctagread::getHListOfClassIDs(strctagIDList* idlist, const char* v1, std::vector<stClsID> *listClsHist)\n{\n\tenResult res = resOK;\n\tidlist->clear();\n\tfor (long i=0; i<listClsHist->size(); i++)\n\t{\n\t\tif ((*listClsHist)[i].cls.compare(v1) == 0)\n\t\t{idlist->push_back((*listClsHist)[i].id); break;}\n\t}\n\tif (idlist->empty())\n\t{\n\t\tres = getListOfClassIDs(idlist, v1);\n\t\tif (res != resOK) {return res;}\n\t\tif (idlist->empty() == false)\n\t\t{\n\t\t\tstClsID tempClsID;\n\t\t\ttempClsID.cls = v1;\n\t\t\ttempClsID.id = (*idlist)[0];\n\t\t\t(*listClsHist).insert((*listClsHist).begin(), tempClsID);\n\t\t\tif ((*listClsHist).size() > 50) (*listClsHist).pop_back();\n\t\t}\n\t}\n\treturn resOK;\n}\n\nctagread::enResult ctagread::getListOfClassIDs(strctagIDList* idlist, const char* v1)\n{\n\nint rc;\nstd::string s;\n\nidlist->clear();\nrc = execstmt(m_readclassstmt, v1);\nwhile ((rc == SQLITE_ROW)||(rc == SQLITE_BUSY))\n\t{\n\t\tif (rc == SQLITE_ROW)\n\t\t{\n\t\t\ts = (const char*) sqlite3_column_text(m_readclassstmt, 0);\n\t\t\tidlist->push_back(s);\n\t\t}\n\t\trc = sqlite3_step(m_readclassstmt);\n\t}\nreturn resOK;\n}\n\nctagread::enResult ctagread::getListOfSymIDs(sqlite3_stmt* pstmt, strctagIDList* idlist, const char* v1, const char* v2, const char* v3)\n{\n\nint rc;\nstd::string s;\n\nidlist->clear();\nrc = execstmt(pstmt, v1, v2, v3);\nwhile ((rc == SQLITE_ROW)||(rc == SQLITE_BUSY))\n\t{\n\t\tif (rc == SQLITE_ROW)\n\t\t{\n\t\t\ts = (const char*) sqlite3_column_text(pstmt, 0);\n\t\t\tidlist->push_back(s);\n\t\t}\n\t\trc = sqlite3_step(pstmt);\n\t}\nreturn resOK;\n}\n\nctagread::enResult ctagread::finalize(void)\n{\n\tint rc;\n\tstd::string s;\n\ts  = \"BEGIN EXCLUSIVE;\";\n\ts += \"CREATE INDEX groupIDIdx ON membertbl (groupID);\";\n\ts += \"CREATE INDEX memberIDIdx ON membertbl (memberID);\";\n\ts += \"CREATE INDEX parentIDIdx ON inherittbl (parentID);\";\n\ts += \"CREATE INDEX childIDIdx ON inherittbl (childID);\";\n\ts += \"REINDEX symNameIdx;\";\n\ts += \"REINDEX symName2Idx;\";\n\ts += \"COMMIT;\";\n\trc=sqlite3_exec(m_db, s.c_str(), NULL, 0, NULL);\n\tif (rc != SQLITE_OK)\n\t{\n\t\tif (m_debug) printf(\"SQLErr15: %d, %s\\n\", rc, sqlite3_errmsg(m_db));\n\t\treturn resSQLError;\n\t}\n\treturn resOK;\n}\n\n"
  },
  {
    "path": "makedb/ctagread.h",
    "content": "\n/*\n * CodeQuery\n * Copyright (C) 2013-2017 ruben2020 https://github.com/ruben2020/\n * \n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n */\n\n\n#ifndef CTAGREAD_H_CQ\n#define CTAGREAD_H_CQ\n\n#include <string>\n#include <memory>\n#include <vector>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <sqlite3.h>\n#include \"sqlbase.h\"\n\ntypedef std::vector<std::string> strctagIDList;\n\ntypedef struct\n{\n\tstd::string cls;\n\tstd::string id;\n} stClsID;\n\nclass ctagread : public sqlbase\n{\n\npublic:\n\nenum enResult\n  {\n   resOK = 0,\n   resSQLError,\n   resFILE_NOT_FOUND,\n   resFILE_ACCESS_ERR,\n   resUNRECOG_FORMAT,\n   resINCORRECT_VER,\n   resUNSUPPORTED_PARAM,\n   resOTHER_ERR,\n   resUNKNOWN_ERR,\n   resFILE_NOT_OPEN\n  };\n\nctagread();\n~ctagread();\nenResult open_files(const char* sqldb, const char* tagsfn);\nvoid close_files(void);\nenResult process_ctags(void);\nenResult finalize(void);\n\nprivate:\nFILE* f_tags;\nsqlite3_stmt* m_insertstmt;\nsqlite3_stmt* m_insertinheritstmt;\nsqlite3_stmt* m_readclassstmt;\nsqlite3_stmt* m_readsymstmt;\nsqlite3_stmt* m_readsymfstmt;\nsqlite3_stmt* m_writedeststmt;\nsqlite3_stmt* m_writetypestmt;\nenResult getListOfClassIDs(strctagIDList* idlist, const char* v1);\nenResult getHListOfClassIDs(strctagIDList* idlist, const char* v1, std::vector<stClsID> *listClsHist);\nenResult getListOfSymIDs(sqlite3_stmt* pstmt, strctagIDList* idlist, const char* v1, const char* v2, const char* v3);\nenResult prepare_cqdb(void);\n\n};\n\n#endif\n\n"
  },
  {
    "path": "makedb/main.cpp",
    "content": "\n/*\n * CodeQuery\n * Copyright (C) 2013-2017 ruben2020 https://github.com/ruben2020/\n * \n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n */\n\n\n#include <string>\n#include \"getopt2.h\"\n#include \"csdbparser.h\"\n#include \"cs2sq.h\"\n#include \"ctagread.h\"\n#include \"small_lib.h\"\n#include \"swver.h\"\n\n#if 0 // test code for csdbparser - not needed\nint test_csdbparser (void)\n{\ncsdbparser csdbp;\nstd::string s;\nlong int num = 0;\ncsdbparser::enResult res;\n\n//csdbp.setDebug(true);\n\nint k = csdbparser::file_sanity_check(\"./cscope.out\");\nprintf(\"%d\\n\",k);\n\ncsdbp.open_file(\"./cscope.out\");\n//csdbp.setup_srcfil_read();\ndo\n\t{\n\t\tcsdbp.get_next_srcfil(&s);\n\t\tif (s.length() == 0) break;\n\t\tnum++;\n\t\t//printf(\"\\\"%s\\\"\\n\",s.data());\n\t}\nwhile (s.length() > 0);\n\nprintf(\"Total num of files = %ld\\nBase path = %s\\n\\n\", num, csdbp.getBasePath());\n\nnum = 0;\nres = csdbp.setup_symbol_read();\nif (res != csdbparser::resOK) printf(\"Error in setup_symbol_read: %d\\n\", res);\nsymdata_pack sp;\nsp.valid = true;\nwhile(sp.valid)\n\t{\n\t\tres = csdbp.get_next_symbol(&sp);\n\t\tif (res != csdbparser::resOK)\n\t\t{\n\t\t\tprintf(\"Error in get_next_symbol: %d\\n\", res);\n\t\t\tbreak;\n\t\t}\n\t\tif (sp.valid)\n\t\t{\n\t\tprintf(\"[[ %s, linenum=%ld, symbols=%d, \\\"%s\\\" ]]\\n\", sp.filename.c_str(), sp.line_num, sp.symbols.size(), sp.line_text.c_str());\n\t\tif (sp.symbols.size() > 0)\n\t\t\t{\n\t\t\tfor (int i=0; i < sp.symbols.size(); i++)\n\t\t\t\t{\n\t\t\t\t\tprintf(\"{%s, %s\",\n\t\t\t\t\tsp.symbols[i].symbname.c_str(), sp.symbols[i].getTypeDesc());\n\t\t\t\t\tif (sp.symbols[i].sym_type == sym_data::symFuncCall)\n\t\t\t\t\t\tprintf(\", func[%s], macro[%s]\",\n\t\t\t\t\tsp.symbols[i].calling_func.c_str(), sp.symbols[i].calling_macro.c_str());\n\t\t\t\t\tprintf(\"} \");\n\t\t\t\t}\n\t\t\tprintf(\"\\n\");\n\t\t\t}\n\t\tnum += sp.symbols.size();\n\t\t}\n\t}\nprintf(\"Total number of symbols found = %ld\\n\",num);\n}\n#endif\n\nint process_cscope(const char* cscopefn, const char* sqfn, bool debug)\n{\n\tcs2sq::enResult res;\n\tcs2sq dbmaker;\n\tdbmaker.setDebug(debug);\n\t\n\tint k = csdbparser::file_sanity_check(cscopefn);\n\tprintf(\"cscope.out sanity check %s\\n\",(k==csdbparser::resOK ? \"OK\" : \"Error\"));\n\tif (k == csdbparser::resUNSUPPORTED_PARAM) printf(\"Unsupported cscope parameters: -c is required. -q, -b and -R are optional. The rest should not be used.\\n\");\n\tif (k != csdbparser::resOK) return 1;\n\n\tdbmaker.open_csdb(cscopefn);\n\t\n\tk = dbmaker.test_csdb();\n\tprintf(\"cscope.out detailed check %s\\n\",(k==0 ? \"OK\" : \"Error\"));\n\tif (k != 0)\n\t{\n\t\tprintf(\"Please note that assembly code embedded in C/C++ files is unsupported.\\n\"\n\t\t\t\"This might be the cause for this error.\\n\"\n\t\t\t\"Please use the -d (for debug) argument to get more info.\\n\");\n\t\treturn 1;\n\t}\n\n\tremove(sqfn);\t\n\tres = dbmaker.open_db(sqfn);\n\tif (res != cs2sq::resOK) {printf(\"Error1! %d\\n\",res); return 1;}\n\n\tres = dbmaker.setup_tables();\n\tif (res != cs2sq::resOK) {printf(\"Error2! %d\\n\",res); return 1;}\n\n\tprintf(\"Adding symbols ...\\n\");\n\tres = dbmaker.add_symbols();\n\tif (res != cs2sq::resOK) {printf(\"Error3! %d\\n\",res); return 1;}\n\n\tprintf(\"Finalizing ...\\n\");\n\tres = dbmaker.finalize();\n\tif (res != cs2sq::resOK) {printf(\"Error4! %d\\n\",res); return 1;}\n\treturn 0;\n}\n\nint process_ctags(const char* ctagsfn, const char* sqfn, bool debug)\n{\n\tctagread tagreader;\n\tctagread::enResult restag;\n\ttagreader.setDebug(debug);\n\trestag = tagreader.open_files(sqfn, ctagsfn);\n\tif (restag != ctagread::resOK) {printf(\"Error!!!\\n\"); return 1;}\n\tprintf(\"Processing ctags file ...\\n\");\n\trestag = tagreader.process_ctags();\n\tif (restag != ctagread::resOK) {printf(\"Error!!!\\n\"); return 1;}\n\tprintf(\"Finalizing ...\\n\");\n\trestag = tagreader.finalize();\n\tif (restag != ctagread::resOK) {printf(\"Error!!!\\n\"); return 1;}\n\treturn 0;\n}\n\nvoid printhelp(const char* str)\n{\n\tprintf(\"Usage: %s [-s <sqdbfile> [-c <cscope.out>] [-t <ctags>]] [-p] [-d] [-v] [-h]\\n\\n\", str);\n\tprintf(\"options:\\n\");\n\tprintf(\"  -s : CodeQuery sqlite3 db file path\\n\");\n\tprintf(\"  -c : cscope.out file path\\n\");\n\tprintf(\"  -t : ctags tags file path\\n\");\n\tprintf(\"  -p : \\\"vacuum\\\", compact database (may take more time)\\n\");\n\tprintf(\"  -d : debug\\n\");\n\tprintf(\"  -v : version\\n\");\n\tprintf(\"  -h : help\\n\\n\");\n\tprintf(\"The combinations possible are -s -c, -s -t, -s -c -t\\n\");\n\tprintf(\"The additional optional arguments are -p and -d\\n\");\n\tprintf(\"if -c is present then sqdbfile need not exist. It will be created.\\n\");\n\tprintf(\"if -t is present but not -c, then sqdbfile has to exist. Ctags info will be added to it.\\n\\n\");\n}\n\nvoid printlicense(void)\n{\n\tprintf(CODEQUERY_SW_VERSION);\n\tprintf(\"\\n\");\n\tprintf(CODEQUERY_SW_LICENSE);\n}\n\nbool fileexists(const char* fn)\n{\n\tbool retval;\n\tFILE *fp;\n\tfp = fopen(fn, \"r\");\n\tretval = (fp != NULL);\n\tif (retval) fclose(fp);\n\treturn retval;\n}\n\nvoid process_argwithopt(char* thisOpt, int option, bool& err, std::string& fnstr, bool filemustexist)\n{\n\tif (thisOpt != NULL)\n\t{\n\t\tfnstr = thisOpt;\n\t\tif (filemustexist && (fileexists(fnstr.c_str()) == false))\n\t\t{\n\t\t\tprintf(\"Error: File %s doesn't exist.\\n\", fnstr.c_str());\n\t\t\terr = true;\n\t\t}\n\t}\n\telse\n\t{\n\t\tprintf(\"Error: -%c used without file option.\\n\", option);\n\t\terr = true;\n\t}\n}\n\nint main(int argc, char *argv[])\n{\n    int c;\n    bool bHelp, bSqlite, bCscope, bCtags, bDebug, bError, bVacuum, bVersion;\n\tbHelp = (argc <= 1);\n\tbVersion = false;\n\tbSqlite = false;\n\tbCscope = false;\n\tbCtags = false;\n\tbDebug = false;\n\tbError = false;\n\tbVacuum = false;\n\tstd::string sqfn, csfn, ctfn;\n\n    while ((c = getopt2(argc, argv, \"s:c:t:pdvh\")) != -1)\n    {\n\t\tswitch(c)\n\t\t{\n\t\t\tcase 'v':\n\t\t\t\tbVersion = true;\n\t\t\t\tbreak;\n\t\t\tcase 'h':\n\t\t\t\tbHelp = true;\n\t\t\t\tbreak;\n\t\t\tcase 's':\n\t\t\t\tbSqlite = true;\n\t\t\t\tprocess_argwithopt(optarg, c, bError, sqfn, false);\n\t\t\t\tbreak;\n\t\t\tcase 'c':\n\t\t\t\tbCscope = true;\n\t\t\t\tprocess_argwithopt(optarg, c, bError, csfn, true);\n\t\t\t\tbreak;\n\t\t\tcase 't':\n\t\t\t\tbCtags = true;\n\t\t\t\tprocess_argwithopt(optarg, c, bError, ctfn, true);\n\t\t\t\tbreak;\n\t\t\tcase 'd':\n\t\t\t\tbDebug = true;\n\t\t\t\tbreak;\n\t\t\tcase 'p':\n\t\t\t\tbVacuum = true;\n\t\t\t\tbreak;\n\t\t\tcase '?':\n\t\t\t\tbError = true;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n    }\n\n\tif (bVersion)\n\t{\n\t\tprintlicense();\n\t\treturn 0;\n\t}\n\tif (bHelp || bError)\n\t{\n\t\tprinthelp(extract_filename(argv[0]));\n\t\treturn (bError ? 1 : 0);\n\t}\n\tif (!bSqlite)\n\t{\n\t\tprintf(\"Error: -s is required.\\n\");\n\t\tbError = true;\n\t}\n\tif ((bCscope == false)&&(bCtags == false))\n\t{\n\t\tprintf(\"Error: Either -c or -t or both must be present. Both are missing.\\n\");\n\t\tbError = true;\n\t}\t\n\tif ((!bCscope) && (fileexists(sqfn.c_str()) == false))\n\t{\n\t\tprintf(\"Error: File %s doesn't exist.\\n\", sqfn.c_str());\n\t\tprintf(\"Error: Without -c, sqdbfile must exist.\\n\");\n\t\tbError = true;\n\t}\n\tif (bError)\n\t{\n\t\tprinthelp(extract_filename(argv[0]));\n\t\treturn 1;\n\t}\n\tif (bCscope)\n\t{\n\t\tif (process_cscope(csfn.c_str(), sqfn.c_str(), bDebug) == 1)\n\t\t\treturn 1;\n\t}\n\tif (bCtags)\n\t{\n\t\tif (process_ctags(ctfn.c_str(), sqfn.c_str(), bDebug) == 1)\n\t\t\treturn 1;\n\t}\n\tif (bVacuum)\n\t{\n\t\tprintf(\"Compacting database ...\\n\");\n\t\tif (sqlbase::vacuum(sqfn.c_str(), bDebug) != 0)\n\t\t\treturn 1;\n\t}\n\telse\n\t{\n\t\tif (sqlbase::analyze(sqfn.c_str(), bDebug) != 0)\n\t\t\treturn 1;\n\t}\n\treturn 0;\n}\n\n"
  },
  {
    "path": "makedb/sqlbase.cpp",
    "content": "\n/*\n * CodeQuery\n * Copyright (C) 2013-2017 ruben2020 https://github.com/ruben2020/\n * \n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n */\n\n\n#include \"sqlbase.h\"\n\nsqlbase::sqlbase()\n:m_db(NULL)\n,m_debug(false)\n{\n}\n\nsqlbase::~sqlbase()\n{\n\tif (m_db)\n\t\tsqlite3_close(m_db);\n\tm_db = 0;\n}\n\nvoid sqlbase::setDebug(bool val)\n{\n\tm_debug = val;\n}\n\nint sqlbase::vacuum(const char* fn, const bool& debug)\n{\n\tint rc;\n\tsqlite3 *sqdb;\n\trc = sqlite3_open_v2(fn, &sqdb, SQLITE_OPEN_READWRITE, NULL);\n\tif (rc != SQLITE_OK)\n\t{\n\t\tsqlite3_close(sqdb);\n\t\treturn rc;\n\t}\n\trc=sqlite3_exec(sqdb, \"PRAGMA synchronous = OFF;\"\n\t\t\"PRAGMA journal_mode = OFF;\"\n\t\t\"PRAGMA locking_mode = EXCLUSIVE;\"\n\t\t\"PRAGMA automatic_index = FALSE;\"\n\t\t\"PRAGMA cache_size = 20000;\"\n\t\t\"VACUUM;ANALYZE;\", NULL, 0, NULL);\n\tif (rc != SQLITE_OK)\n\t{\n\t\tif (debug) printf(\"SQLBaseErr099: %d, %s\\n\", rc, sqlite3_errmsg(sqdb));\n\t}\n\tsqlite3_close(sqdb);\n\treturn rc;\n}\n\nint sqlbase::analyze(const char* fn, const bool& debug)\n{\n\tint rc;\n\tsqlite3 *sqdb;\n\trc = sqlite3_open_v2(fn, &sqdb, SQLITE_OPEN_READWRITE, NULL);\n\tif (rc != SQLITE_OK)\n\t{\n\t\tsqlite3_close(sqdb);\n\t\treturn rc;\n\t}\n\trc=sqlite3_exec(sqdb, \"PRAGMA synchronous = OFF;\"\n\t\t\"PRAGMA journal_mode = OFF;\"\n\t\t\"PRAGMA locking_mode = EXCLUSIVE;\"\n\t\t\"PRAGMA automatic_index = FALSE;\"\n\t\t\"PRAGMA cache_size = 20000;\"\n\t\t\"ANALYZE;\", NULL, 0, NULL);\n\tif (rc != SQLITE_OK)\n\t{\n\t\tif (debug) printf(\"SQLBaseErr100: %d, %s\\n\", rc, sqlite3_errmsg(sqdb));\n\t}\n\tsqlite3_close(sqdb);\n\treturn rc;\n}\n\nint sqlbase::prepare_stmt(sqlite3_stmt** pStmt, const char* sqlquery)\n{\n\tint rc;\n\trc = sqlite3_prepare_v2(m_db, sqlquery, strlen(sqlquery), pStmt, NULL);\n\tif (rc != SQLITE_OK)\n\t{\n\t\tif (m_debug) printf(\"SQLBaseErr001: %d, %s, line=%s\\n\", rc, sqlite3_errmsg(m_db), sqlquery);\n\t\treturn SQLITE_ERROR;\n\t}\n\treturn SQLITE_OK;\n}\n\nint sqlbase::execstmt(sqlite3_stmt* pstmt)\n{\n    int rc;\n    rc = sqlite3_reset(pstmt);\n    if (rc != SQLITE_OK)\n    {\n        if (m_debug) printf(\"SQLBaseErr004: %d, %s\\n\", rc, sqlite3_errmsg(m_db));\n        return SQLITE_ERROR;\n    }\n    rc = sqlite3_step(pstmt);\n    if ((rc == SQLITE_OK) || (rc == SQLITE_ROW) || (rc == SQLITE_BUSY)) return rc;\n    else return SQLITE_ERROR;\n}\n\nint sqlbase::execstmt(sqlite3_stmt* pstmt, const char* v1)\n{\n\tint rc;\n\trc = sqlite3_reset(pstmt);\n\tif (rc != SQLITE_OK)\n\t{\n\t\tif (m_debug) printf(\"SQLBaseErr004: %d, %s\\n\", rc, sqlite3_errmsg(m_db));\n\t\treturn SQLITE_ERROR;\n\t}\n\trc = sqlite3_bind_text(pstmt, 1, v1, strlen(v1), SQLITE_STATIC);\n\tif (rc != SQLITE_OK)\n\t{\n\t\tif (m_debug) printf(\"SQLBaseErr002: %d, %s\\n\", rc, sqlite3_errmsg(m_db));\n\t\treturn SQLITE_ERROR;\n\t}\n\trc = sqlite3_step(pstmt);\n\tif ((rc == SQLITE_ROW)||(rc == SQLITE_BUSY)) return rc;\n\tif (rc != SQLITE_DONE)\n\t{\n\t\tif (m_debug) printf(\"SQLBaseErr003: %d, %s\\n\", rc, sqlite3_errmsg(m_db));\n\t\treturn SQLITE_ERROR;\n\t}\n\treturn SQLITE_OK;\n}\n\nint sqlbase::execstmt(sqlite3_stmt* pstmt, const char* v1, const char* v2)\n{\n\tint rc;\n\trc = sqlite3_reset(pstmt);\n\tif (rc != SQLITE_OK)\n\t{\n\t\tif (m_debug) printf(\"SQLBaseErr004: %d, %s\\n\", rc, sqlite3_errmsg(m_db));\n\t\treturn SQLITE_ERROR;\n\t}\n\trc = sqlite3_bind_text(pstmt, 1, v1, strlen(v1), SQLITE_STATIC);\n\tif (rc != SQLITE_OK)\n\t{\n\t\tif (m_debug) printf(\"SQLBaseErr005: %d, %s\\n\", rc, sqlite3_errmsg(m_db));\n\t\treturn SQLITE_ERROR;\n\t}\n\trc = sqlite3_bind_text(pstmt, 2, v2, strlen(v2), SQLITE_STATIC);\n\tif (rc != SQLITE_OK)\n\t{\n\t\tif (m_debug) printf(\"SQLBaseErr006: %d, %s\\n\", rc, sqlite3_errmsg(m_db));\n\t\treturn SQLITE_ERROR;\n\t}\n\trc = sqlite3_step(pstmt);\n\tif ((rc == SQLITE_ROW)||(rc == SQLITE_BUSY)) return rc;\n\tif (rc != SQLITE_DONE)\n\t{\n\t\tif (m_debug) printf(\"SQLBaseErr007: %d, %s\\n\", rc, sqlite3_errmsg(m_db));\n\t\treturn SQLITE_ERROR;\n\t}\n\treturn SQLITE_OK;\n}\n\nint sqlbase::execstmt(sqlite3_stmt* pstmt, const char* v1, const char* v2, const char* v3)\n{\n\tint rc;\n\trc = sqlite3_reset(pstmt);\n\tif (rc != SQLITE_OK)\n\t{\n\t\tif (m_debug) printf(\"SQLBaseErr004: %d, %s\\n\", rc, sqlite3_errmsg(m_db));\n\t\treturn SQLITE_ERROR;\n\t}\n\trc = sqlite3_bind_text(pstmt, 1, v1, strlen(v1), SQLITE_STATIC);\n\tif (rc != SQLITE_OK)\n\t{\n\t\tif (m_debug) printf(\"SQLBaseErr009: %d, %s\\n\", rc, sqlite3_errmsg(m_db));\n\t\treturn SQLITE_ERROR;\n\t}\n\trc = sqlite3_bind_text(pstmt, 2, v2, strlen(v2), SQLITE_STATIC);\n\tif (rc != SQLITE_OK)\n\t{\n\t\tif (m_debug) printf(\"SQLBaseErr010: %d, %s\\n\", rc, sqlite3_errmsg(m_db));\n\t\treturn SQLITE_ERROR;\n\t}\n\trc = sqlite3_bind_text(pstmt, 3, v3, strlen(v3), SQLITE_STATIC);\n\tif (rc != SQLITE_OK)\n\t{\n\t\tif (m_debug) printf(\"SQLBaseErr011: %d, %s\\n\", rc, sqlite3_errmsg(m_db));\n\t\treturn SQLITE_ERROR;\n\t}\n\trc = sqlite3_step(pstmt);\n\tif ((rc == SQLITE_ROW)||(rc == SQLITE_BUSY)) return rc;\n\tif (rc != SQLITE_DONE)\n\t{\n\t\tif (m_debug) printf(\"SQLBaseErr012: %d, %s\\n\", rc, sqlite3_errmsg(m_db));\n\t\treturn SQLITE_ERROR;\n\t}\n\treturn SQLITE_OK;\n}\n\nint sqlbase::execstmt(sqlite3_stmt* pstmt, const char* v1, const char* v2, const char* v3, const char* v4)\n{\n\tint rc;\n\trc = sqlite3_reset(pstmt);\n\tif (rc != SQLITE_OK)\n\t{\n\t\tif (m_debug) printf(\"SQLBaseErr004: %d, %s\\n\", rc, sqlite3_errmsg(m_db));\n\t\treturn SQLITE_ERROR;\n\t}\n\trc = sqlite3_bind_text(pstmt, 1, v1, strlen(v1), SQLITE_STATIC);\n\tif (rc != SQLITE_OK)\n\t{\n\t\tif (m_debug) printf(\"SQLBaseErr014: %d, %s\\n\", rc, sqlite3_errmsg(m_db));\n\t\treturn SQLITE_ERROR;\n\t}\n\trc = sqlite3_bind_text(pstmt, 2, v2, strlen(v2), SQLITE_STATIC);\n\tif (rc != SQLITE_OK)\n\t{\n\t\tif (m_debug) printf(\"SQLBaseErr015: %d, %s\\n\", rc, sqlite3_errmsg(m_db));\n\t\treturn SQLITE_ERROR;\n\t}\n\trc = sqlite3_bind_text(pstmt, 3, v3, strlen(v3), SQLITE_STATIC);\n\tif (rc != SQLITE_OK)\n\t{\n\t\tif (m_debug) printf(\"SQLBaseErr016: %d, %s\\n\", rc, sqlite3_errmsg(m_db));\n\t\treturn SQLITE_ERROR;\n\t}\n\trc = sqlite3_bind_text(pstmt, 4, v4, strlen(v4), SQLITE_STATIC);\n\tif (rc != SQLITE_OK)\n\t{\n\t\tif (m_debug) printf(\"SQLBaseErr017: %d, %s\\n\", rc, sqlite3_errmsg(m_db));\n\t\treturn SQLITE_ERROR;\n\t}\n\trc = sqlite3_step(pstmt);\n\tif ((rc == SQLITE_ROW)||(rc == SQLITE_BUSY)) return rc;\n\tif (rc != SQLITE_DONE)\n\t{\n\t\tif (m_debug) printf(\"SQLBaseErr018: %d, %s\\n\", rc, sqlite3_errmsg(m_db));\n\t\treturn SQLITE_ERROR;\n\t}\n\treturn SQLITE_OK;\n}\n\nint sqlbase::execstmt(sqlite3_stmt* pstmt, const char* v1, const char* v2, const char* v3, const char* v4, const char* v5)\n{\n\tint rc;\n\trc = sqlite3_reset(pstmt);\n\tif (rc != SQLITE_OK)\n\t{\n\t\tif (m_debug) printf(\"SQLBaseErr004: %d, %s\\n\", rc, sqlite3_errmsg(m_db));\n\t\treturn SQLITE_ERROR;\n\t}\n\trc = sqlite3_bind_text(pstmt, 1, v1, strlen(v1), SQLITE_STATIC);\n\tif (rc != SQLITE_OK)\n\t{\n\t\tif (m_debug) printf(\"SQLBaseErr020: %d, %s\\n\", rc, sqlite3_errmsg(m_db));\n\t\treturn SQLITE_ERROR;\n\t}\n\trc = sqlite3_bind_text(pstmt, 2, v2, strlen(v2), SQLITE_STATIC);\n\tif (rc != SQLITE_OK)\n\t{\n\t\tif (m_debug) printf(\"SQLBaseErr021: %d, %s\\n\", rc, sqlite3_errmsg(m_db));\n\t\treturn SQLITE_ERROR;\n\t}\n\trc = sqlite3_bind_text(pstmt, 3, v3, strlen(v3), SQLITE_STATIC);\n\tif (rc != SQLITE_OK)\n\t{\n\t\tif (m_debug) printf(\"SQLBaseErr022: %d, %s\\n\", rc, sqlite3_errmsg(m_db));\n\t\treturn SQLITE_ERROR;\n\t}\n\trc = sqlite3_bind_text(pstmt, 4, v4, strlen(v4), SQLITE_STATIC);\n\tif (rc != SQLITE_OK)\n\t{\n\t\tif (m_debug) printf(\"SQLBaseErr023: %d, %s\\n\", rc, sqlite3_errmsg(m_db));\n\t\treturn SQLITE_ERROR;\n\t}\n\trc = sqlite3_bind_text(pstmt, 5, v5, strlen(v5), SQLITE_STATIC);\n\tif (rc != SQLITE_OK)\n\t{\n\t\tif (m_debug) printf(\"SQLBaseErr024: %d, %s\\n\", rc, sqlite3_errmsg(m_db));\n\t\treturn SQLITE_ERROR;\n\t}\n\trc = sqlite3_step(pstmt);\n\tif ((rc == SQLITE_ROW)||(rc == SQLITE_BUSY)) return rc;\n\tif (rc != SQLITE_DONE)\n\t{\n\t\tif (m_debug) printf(\"SQLBaseErr025: %d, %s\\n\", rc, sqlite3_errmsg(m_db));\n\t\treturn SQLITE_ERROR;\n\t}\n\treturn SQLITE_OK;\n}\n\n"
  },
  {
    "path": "makedb/sqlbase.h",
    "content": "\n/*\n * CodeQuery\n * Copyright (C) 2013-2017 ruben2020 https://github.com/ruben2020/\n * \n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n */\n\n#ifndef SQLBASE_H_CQ\n#define SQLBASE_H_CQ\n\n#include <stdio.h>\n#include <string.h>\n#include <sqlite3.h>\n\n\nclass sqlbase\n{\n\npublic:\nsqlbase();\n~sqlbase();\nvoid setDebug(bool val);\nstatic int vacuum(const char* fn, const bool& debug);\nstatic int analyze(const char* fn, const bool& debug);\nint prepare_stmt(sqlite3_stmt** pStmt, const char* sqlquery);\nint execstmt(sqlite3_stmt* pstmt);\nint execstmt(sqlite3_stmt* pstmt, const char* v1);\nint execstmt(sqlite3_stmt* pstmt, const char* v1, const char* v2);\nint execstmt(sqlite3_stmt* pstmt, const char* v1, const char* v2,\n\t\t\t\t\t\t\t\t\tconst char* v3);\nint execstmt(sqlite3_stmt* pstmt, const char* v1, const char* v2,\n\t\t\t\t\t\t\tconst char* v3, const char* v4);\nint execstmt(sqlite3_stmt* pstmt, const char* v1, const char* v2,\n\t\t\t\t\tconst char* v3, const char* v4, const char* v5);\n\nprotected:\nbool m_debug;\nsqlite3 *m_db;\n\n};\n\n#endif\n\n"
  },
  {
    "path": "makedb/swver.h",
    "content": "\n/*\n * CodeQuery\n * Copyright (C) 2013-2017 ruben2020 https://github.com/ruben2020/\n * \n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://www.mozilla.org/en-US/MPL/2.0/.\n *\n */\n\n\n#ifndef SWVER_H_CQ\n#define SWVER_H_CQ\n\n#define CODEQUERY_SW_VERSION      \"CodeQuery 1.0.1\"\n#define CODEQUERY_SW_VERSION_WEBSITE      \"<p>\"\\\n\tCODEQUERY_SW_VERSION \\\n\t\"</p>\"\\\n\t\"<p><a href=\\\"http://ruben2020.github.io/codequery/\\\">Official Website</a></p>\"\\\n\t\"<p><a href=\\\"https://github.com/ruben2020/codequery\\\">GitHub Page</a></p>\"\n\n\n#define CODEQUERY_SW_LICENSE  \\\n\"Copyright (C) 2013-2025 ruben2020 https://github.com/ruben2020/\\n\\n\" \\\n\"Website: https://github.com/ruben2020/codequery\\n\\n\" \\\n\"The Source Code Form and the Executable Form of this software\\n\" \\\n\"are subject to the terms of the Mozilla Public License, v. 2.0.\\n\" \\\n\"If a copy of the MPL was not distributed with this software,\\n\" \\\n\"You can obtain one at https://www.mozilla.org/en-US/MPL/2.0/.\\n\\n\" \\\n\"The Source Code Form of this software can be obtained from:\\n\" \\\n\"https://github.com/ruben2020/codequery\\n\\n\" \\\n\"This software is distributed in the hope that it will be useful,\\n\" \\\n\"but WITHOUT ANY WARRANTY; without even the implied warranty of\\n\" \\\n\"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n\" \\\n\"Mozilla Public License, v. 2.0 for more details.\\n\\n\" \\\n\n#define CODEQUERY_SW_LICENSE_PARA  \\\n\"Copyright (C) 2013-2025 ruben2020 https://github.com/ruben2020/\\n\\n\" \\\n\"Website: https://github.com/ruben2020/codequery\\n\\n\" \\\n\"The Source Code Form and the Executable Form of this software \" \\\n\"are subject to the terms of the Mozilla Public License, v. 2.0. \" \\\n\"If a copy of the MPL was not distributed with this software, \" \\\n\"You can obtain one at https://www.mozilla.org/en-US/MPL/2.0/.\\n\\n\" \\\n\"The Source Code Form of this software can be obtained from: \" \\\n\"https://github.com/ruben2020/codequery\\n\\n\" \\\n\"This software is distributed in the hope that it will be useful, \" \\\n\"but WITHOUT ANY WARRANTY; without even the implied warranty of \" \\\n\"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the \" \\\n\"Mozilla Public License, v. 2.0 for more details.\\n\\n\" \\\n\n#define CODEQUERY_SW_LICENSE_PARA_LINK  \\\n\"<p>Copyright (C) 2013-2024 <a href=\\\"https://github.com/ruben2020/\\\">ruben2020</a></p>\\n\\n\" \\\n\"<p>The Source Code Form and the Executable Form of this software \" \\\n\"are subject to the terms of the Mozilla Public License, v. 2.0. \" \\\n\"If a copy of the MPL was not distributed with this software, \" \\\n\"You can obtain one at <a href=\\\"https://www.mozilla.org/en-US/MPL/2.0/\\\">https://www.mozilla.org/en-US/MPL/2.0/</a>.</p>\\n\\n\" \\\n\"<p>The Source Code Form of this software can be obtained from: \" \\\n\"<a href=\\\"https://github.com/ruben2020/codequery\\\">https://github.com/ruben2020/codequery</a></p>\\n\\n\" \\\n\"<p>This software is distributed in the hope that it will be useful, \" \\\n\"but WITHOUT ANY WARRANTY; without even the implied warranty of \" \\\n\"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the \" \\\n\"Mozilla Public License, v. 2.0 for more details.</p>\\n\\n\" \\\n\n\n/**\n * \\mainpage CodeQuery Documentation\n *\n * GitHub: https://github.com/ruben2020/codequery\n * \n * Downloads: http://sourceforge.net/projects/codequery/files/\n * \n * This is a tool to index, then query or search C, C++, Java, Python, Ruby, Go and Javascript source code.\n * It builds upon the databases of cscope and Exuberant ctags.\n * The databases of cscope and ctags would be processed by the cqmakedb tool to\n * generate the CodeQuery database file.\n * The CodeQuery database file can be viewed and queried using the codequery GUI tool.\n *\n */\n\n#endif // SWVER_H_CQ\n\n\n"
  },
  {
    "path": "querylib/CMakeLists.txt",
    "content": "#\n# This license header applies to only this file.\n# \n# Copyright (c) 2011 ruben2020 https://github.com/ruben2020/\n# \n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to\n# deal in the Software without restriction, including without limitation the\n# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n# sell copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n# \n# The above copyright notice and this permission notice shall be included in\n# all copies or substantial portions of the Software.\n# \n# THE SOTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n# \n\ncmake_minimum_required(VERSION 3.16.0)\nproject(CodeQueryLib)\n\nfind_package(Sqlite REQUIRED)\n\ninclude_directories( \".\" )\ninclude_directories( \"${SQLITE_INCLUDE_DIR}\" )\n\nset( SMALL_LIB_SRCS small_lib.cpp getopt2.cpp )\nadd_library( small_lib STATIC ${SMALL_LIB_SRCS} )\n\nset( QUERY_LIB_SRCS sqlquery.cpp )\nadd_library( sqlquery_lib STATIC ${QUERY_LIB_SRCS} )\ntarget_link_libraries( sqlquery_lib ${SQLITE_LIBRARIES} small_lib )\n\n\n"
  },
  {
    "path": "querylib/README.txt",
    "content": "\nLibrary to query CodeQuery database files\n\nThis library is MIT-licensed, so that it may be used to create plugins\nfor editors, IDEs and other software without license restrictions\n\n\nThis license applies only to this directory and below.\n\nCopyright (c) 2011-2020 ruben2020 https://github.com/ruben2020/\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to\ndeal in the Software without restriction, including without limitation the\nrights to use, copy, modify, merge, publish, distribute, sublicense, and/or\nsell copies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\nIN THE SOFTWARE.\n\n"
  },
  {
    "path": "querylib/getopt2.cpp",
    "content": "// This license applies only to this file:\n//\n// Copyright (c) 2011 ruben2020 https://github.com/ruben2020/\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n// IN THE SOFTWARE.\n//\n\n/* $Id: getopt.c 4022 2008-03-31 06:11:07Z rra $\n *\n * Replacement implementation of getopt.\n *\n * This is a replacement implementation for getopt based on the my_getopt\n * distribution by Benjamin Sittler.  Only the getopt interface is included,\n * since remctl doesn't use GNU long options, and the code has been rearranged\n * and reworked somewhat to fit with the remctl coding style.\n *\n * Copyright 1997, 2000, 2001, 2002 Benjamin Sittler\n * Copyright 2008 Russ Allbery <rra@stanford.edu>\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\"),\n * to deal in the Software without restriction, including without limitation\n * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following conditions:\n *  \n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *  \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL\n * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n * DEALINGS IN THE SOFTWARE.\n */\n\n#include <stdio.h>\n#include <string.h>\n#include \"getopt2.h\"\n\n/* Initialize global interface variables. */\nint optind = 1;\nint opterr = 1;\nint optopt = 0;\nchar *optarg = NULL;\n\n/*\n * This is the plain old UNIX getopt, with GNU-style extensions.  If you're\n * porting some piece of UNIX software, this is all you need.  It supports\n * GNU-style permutation and optional arguments, but does not support the GNU\n * -W extension.\n *\n * This function is not re-entrant or thread-safe, has static variables, and\n * generally isn't a great interface, but normally you only call it once.\n */\nint getopt2(int argc, char *argv[], const char *optstring)\n{\n    const char *p;\n    size_t offset = 0;\n    char mode = '\\0';\n    int colon_mode = 0;\n    int option = -1;\n\n    /* Holds the current position in the parameter being parsed. */\n    static int charind = 0;\n\n    /*\n     * By default, getopt permutes argv as it scans and leaves all non-options\n     * at the end.  This can be changed with the first character of optstring\n     * or the environment variable POSIXLY_CORRECT.  With a first character of\n     * '+' or when POSIXLY_CORRECT is set, option processing stops at the\n     * first non-option.  If the first character is '-', each non-option argv\n     * element is handled as if it were the argument of an option with\n     * character code 1.  mode holds this character.\n     *\n     * After the optional leading '+' and '-', optstring may contain ':'.  If\n     * present, missing arguments return ':' instead of '?'.  colon_mode holds\n     * this setting.\n     */\n/*\n    if (getenv(\"POSIXLY_CORRECT\") != NULL) {\n        mode = '+';\n        colon_mode = '+';\n    } else {\n*/\n        if (optstring[offset] == '+' || optstring[offset] == '-') {\n            mode = optstring[offset];\n            offset++;\n        }\n        if (optstring[offset] == ':') {\n            colon_mode = 1;\n            offset++;\n        }\n/*    }*/\n\n    /*\n     * charind holds where we left off.  If it's set, we were in the middle\n     * of an argv element; if not, we pick up with the next element of\n     * optind.\n     */\n    optarg = NULL;\n    if (charind == 0) {\n        if (optind >= argc)\n            option = -1;\n        else if (strcmp(argv[optind], \"--\") == 0) {\n            optind++;\n            option = -1;\n        } else if (argv[optind][0] != '-' || argv[optind][1] == '\\0') {\n            char *tmp;\n            int i, j, k, end;\n\n            if (mode == '+')\n                option = -1;\n            else if (mode == '-') {\n                optarg = argv[optind];\n                optind++;\n                option = 1;\n            } else {\n                for (i = optind + 1, j = optind; i < argc; i++)\n                    if ((argv[i][0] == '-') && (argv[i][1] != '\\0')) {\n                        optind = i;\n                        option = getopt2(argc, argv, optstring);\n                        while (i > j) {\n                            --i;\n                            tmp = argv[i];\n                            end = (charind == 0) ? optind - 1 : optind;\n                            for (k = i; k + 1 <= end; k++) {\n                                argv[k] = argv[k + 1];\n                            }\n                            argv[end] = tmp;\n                            --optind;\n                        }\n                        break;\n                    }\n                if (i == argc)\n                    option = -1;\n            }\n            return option;\n        } else {\n            charind = 1;\n        }\n    }\n    if (charind != 0) {\n        optopt = argv[optind][charind];\n        for (p = optstring + offset; *p != '\\0'; p++)\n            if (optopt == *p) {\n                p++;\n                if (*p == ':') {\n                    if (argv[optind][charind + 1] != '\\0') {\n                        optarg = &argv[optind][charind + 1];\n                        optind++;\n                        charind = 0;\n                    } else {\n                        p++;\n                        if (*p != ':') {\n                            charind = 0;\n                            optind++;\n                            if (optind >= argc) {\n                                if (opterr)\n                                    fprintf(stderr, \"%s: option requires\"\n                                            \" an argument -- %c\\n\", argv[0],\n                                            optopt);\n                                option = colon_mode ? ':' : '?';\n                                goto done;\n                            } else {\n                                optarg = argv[optind];\n                                optind++;\n                            }\n                        }\n                    }\n                }\n                option = optopt;\n            }\n        if (option == -1) {\n            if (opterr)\n                fprintf(stderr, \"%s: illegal option -- %c\\n\", argv[0], optopt);\n            option = '?';\n        }\n    }\n\ndone:\n    if (charind != 0) {\n        charind++;\n        if (argv[optind][charind] == '\\0') {\n            optind++;\n            charind = 0;\n        }\n    }\n    if (optind > argc)\n        optind = argc;\n    return option;\n}\n\n"
  },
  {
    "path": "querylib/getopt2.h",
    "content": "// This license applies only to this file:\n//\n// Copyright (c) 2011 ruben2020 https://github.com/ruben2020/\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n// IN THE SOFTWARE.\n//\n\n/* $Id: getopt.c 4022 2008-03-31 06:11:07Z rra $\n *\n * Replacement implementation of getopt.\n *\n * This is a replacement implementation for getopt based on the my_getopt\n * distribution by Benjamin Sittler.  Only the getopt interface is included,\n * since remctl doesn't use GNU long options, and the code has been rearranged\n * and reworked somewhat to fit with the remctl coding style.\n *\n * Copyright 1997, 2000, 2001, 2002 Benjamin Sittler\n * Copyright 2008 Russ Allbery <rra@stanford.edu>\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\"),\n * to deal in the Software without restriction, including without limitation\n * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following conditions:\n *  \n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *  \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL\n * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n * DEALINGS IN THE SOFTWARE.\n */\n\n#ifndef GETOPT2_H\n#define GETOPT2_H\n\nextern char *optarg;\n\nint getopt2(int argc, char *argv[], const char *optstring);\n\n#endif\n\n\n"
  },
  {
    "path": "querylib/small_lib.cpp",
    "content": "\n// Small library of useful classes and functions\n//\n// This license applies only to this file:\n//\n// Copyright (c) 2011 ruben2020 https://github.com/ruben2020/\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n// IN THE SOFTWARE.\n//\n\n#ifdef _WIN32\n#include <windows.h>\n#endif\n\n#ifndef _MSC_VER\n#include <unistd.h>\n#endif\n\n#include \"small_lib.h\"\n#include <new>\n\nbool check_fileExists(const char *fn)\n{\n#ifdef _MSC_VER\n\tDWORD dwAttrib = GetFileAttributes(fn);  \n\treturn ((dwAttrib != INVALID_FILE_ATTRIBUTES) && \n\t\t!(dwAttrib & FILE_ATTRIBUTE_DIRECTORY));\n#else\n\treturn (access(fn, F_OK) != -1);\n#endif\n}\n\n// is the file path given (fp), absolute or relative?\nbool isAbsolutePath(tStr fp)\n{\n\tbool result = false;\n\n\t// example: /usr/bin/local/file or \\temp\\file\n\tresult = (fp[0] == DIRSEP);\n\n#ifdef _WIN32\n\t// example: c:\\temp\\file\n\tresult = result || ((fp[1] == ':')&&(fp[2] == DIRSEP));\n#endif\n\n\treturn result;\n}\n\n// reverse string compare\nbool strrevcmp(tStr str, tStr cmpstr)\n{\n\tbool retval = (1 == 1);\n\tsize_t n = str.length();\n\tif (n != cmpstr.length()) {retval = (1 == 0);}\n\telse if (n > 0)\n\tfor (size_t i = (n - 1); ((i >= 0)&&(i < n)); i--)\n\t{\n\t\tif ((i < 0)||(i >= n))\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\t\tif (str.CHAR_AT(i) != cmpstr.CHAR_AT(i))\n\t\t{\n\t\t\tretval = (1 == 0);\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn retval;\n}\n\n// return pointer to the last part of the string,\n// after the last occurrence of delimiter c\nchar* get_last_part(char* str, int c)\n{\n\tchar* retval;\n\tretval = strrchr(str, c);\n\tif (retval == NULL)\n\t{\n\t\t// not found, just return whole string\n\t\tretval = str;\n\t}\n\telse\n\t{\n\t\tretval += 1;\n\t}\n\treturn retval;\n}\n\n// split string into an array based on a delimiter\nstd::vector<std::string> splitstr(const char* inpstr, const char delim)\n{\n\tsize_t pos = 0, retpos = 0;\n\tstd::vector<std::string> vecstr;\n\tstd::string str(inpstr);\n\tdo\n\t{\n\t\tretpos = str.find_first_of(delim, pos);\n\t\tif (retpos == std::string::npos)\n\t\t{\n\t\t\tvecstr.push_back(str.substr(pos));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvecstr.push_back(str.substr(pos, retpos - pos));\n\t\t\tpos = retpos + 1;\n\t\t}\n\t} while (retpos != std::string::npos);\n\treturn vecstr;\n}\n\n\n// remove EOL char\nconst char* chomp(char* str)\n{\n\tif ((str != NULL)&&(strlen(str) > 0))\n\t{\n\t\tchar* charr = strrchr(str, 0xA);\n\t\tif (charr != NULL)\n\t\t{\n\t\t\t*charr = 0; // Unix chomp, Windows half-chomp\n\t\t\tcharr--;\n\t\t\tif (*charr == 0xD) *charr = 0; // Windows chomp\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcharr = strrchr(str, 0xD);\n\t\t\tif (charr != NULL) *charr = 0; // MacOS chomp\n\t\t}\n\t}\n\treturn static_cast<const char*>(str);\n}\n\n// add an escape character in front of another predetermined character\nstd::string add_escape_char(std::string ori, char chr2escp, char escpchr)\n{\n\tstd::string s;\n\tlong num = 0;\n\tsize_t retval = -1; \n\ts = ori;\n\tdo {\n\t\tretval = ori.find(chr2escp, retval+1);\n\t\tif (retval != std::string::npos)\n\t\t{\n\t\t\ts.insert(retval + num, 1, escpchr);\n\t\t\tnum++;\n\t\t}\n\t} while (retval != std::string::npos);\n\treturn s;\n}\n\n// add an escape character in front of another predetermined character\nstd::string add_escape_char(const char* oristr, char chr2escp, char escpchr)\n{\n\tstd::string ori(oristr);\n\tstd::string s;\n\tlong num = 0;\n\tsize_t retval = -1; \n\ts = ori;\n\tdo {\n\t\tretval = ori.find(chr2escp, retval+1);\n\t\tif (retval != std::string::npos)\n\t\t{\n\t\t\ts.insert(retval + num, 1, escpchr);\n\t\t\tnum++;\n\t\t}\n\t} while (retval != std::string::npos);\n\treturn s;\n}\n\n// extract the filename.ext from a file path\nconst char* extract_filename(const char* filepath)\n{\n\tchar* str = (char*) filepath;\n\tchar* charr = NULL;\n\tchar pathdelim[] = {'/', '\\\\', ':'};\n\n\tif ((filepath != NULL)&&(strlen(filepath) > 0))\n\tfor (int i=0; i < sizeof(pathdelim); i++)\n\t{\n\t\tcharr = (char*) strrchr(filepath, pathdelim[i]);\n\t\tif (charr != NULL) {str = charr+1; break;}\n\t}\n\treturn static_cast<const char*>(str);\t\n}\n\nvoid smartFILE::setme(FILE *fptr) {close_file(); m_fp = fptr;}\nsmartFILE::smartFILE() :m_fp(NULL) {}\nsmartFILE::smartFILE(FILE *fptr) :m_fp(fptr) {}\nsmartFILE::smartFILE(const smartFILE& sfp) :m_fp(sfp.m_fp) {}\nsmartFILE::~smartFILE() {close_file();}\nFILE* smartFILE::operator() () {return m_fp;}\nbool smartFILE::operator ==(FILE* fptr) const {return (m_fp == fptr);}\nbool smartFILE::operator !=(FILE* fptr) const {return (m_fp != fptr);}\nbool smartFILE::operator ==(const smartFILE& sfp) const {return (m_fp == sfp.m_fp);}\nbool smartFILE::operator !=(const smartFILE& sfp) const {return (m_fp != sfp.m_fp);}\nsmartFILE& smartFILE::operator =(FILE *fptr) {setme(fptr); return *this;}\nsmartFILE& smartFILE::operator =(const smartFILE& sfp)\n\t{\n\t\tif (this != &sfp) {setme(sfp.m_fp);}\n\t\treturn *this;\n\t}\nvoid smartFILE::assign(FILE* fptr) {setme(fptr);}\nvoid smartFILE::assign(const smartFILE& sfp) {setme(sfp.m_fp);}\nFILE* smartFILE::get(void) {return m_fp;}\nvoid smartFILE::close_file(void)\n\t{\n\t\tif (m_fp != NULL)\n\t\t{\n\t\t\tfclose(m_fp);\n\t\t\tm_fp = NULL;\n\t\t}\n\t}\n\n\n\ntempbuf::tempbuf(long n)\n\t{\n\t\tif (n < 10) n = 10;\n\t\tm_buffer = new (std::nothrow) char[n];\n\t\tif (m_buffer != NULL)\n\t\t{\n\t\t\t*m_buffer = 0;\n\t\t}\n\t\tm_size = n;\n\t}\ntempbuf::~tempbuf()\n\t{\n\t\tdelete[] m_buffer;\n\t}\nchar* tempbuf::operator() () {return m_buffer;}\nchar* tempbuf::get(void) {return m_buffer;}\nchar  tempbuf::operator[] (long i)\n\t{\n\t\tchar chr;\n\t\tif (i < m_size) chr = *(m_buffer + i);\n\t\telse chr = 0;\n\t\treturn chr;\n\t}\nlong tempbuf::size(void) const {return m_size;}\nbool tempbuf::isempty(void) const {return (*m_buffer == 0);}\nvoid tempbuf::clear(void) {*m_buffer = 0;}\nchar* tempbuf::reinit(long n)\n\t{\n\t\tif (n < 10) n = 10;\n\t\tdelete[] m_buffer;\n\t\tm_buffer = new char[n];\n\t\t*m_buffer = 0;\n\t\tm_size = n;\n\t\treturn m_buffer;\n\t}\nconst char* tempbuf::constchar(void)\n\t{return static_cast<const char*>(m_buffer);}\n\n\n\n\nidxcounter::idxcounter():m_ctr(0) {}\nidxcounter::~idxcounter(){}\nidxcounter::idxcounter(const idxcounter& idxc)\n\t\t{\n\t\t\tm_ctr = idxc.m_ctr;\n\t\t}\nidxcounter& idxcounter::operator =(long unsigned int idx) {m_ctr = idx; return *this;}\nidxcounter& idxcounter::operator =(const idxcounter& idxc)\n\t\t{\n\t\t\tif (this != &idxc)\n\t\t\t{\n\t\t\t\tm_ctr = idxc.m_ctr;\n\t\t\t}\n\t\t\treturn *this;\n\t\t}\nvoid idxcounter::setCounterVal(long unsigned int i) {m_ctr = i;}\nvoid idxcounter::reset(void) {m_ctr = 0;}\nidxcounter& idxcounter::operator ++() {++m_ctr;sprintf(m_buf, \"%lu\", m_ctr); return *this;}\nidxcounter& idxcounter::operator --() {--m_ctr;sprintf(m_buf, \"%lu\", m_ctr); return *this;}\nlong unsigned int idxcounter::getInt(void) const {return m_ctr;}\nconst char* idxcounter::getStr(void) const {return m_buf;}\nint idxcounter::getStrSize(void) const {return strlen(m_buf);}\n\n\n"
  },
  {
    "path": "querylib/small_lib.h",
    "content": "\n// Small library of useful classes and functions\n//\n// This license applies only to this file:\n//\n// Copyright (c) 2011 ruben2020 https://github.com/ruben2020/\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n// IN THE SOFTWARE.\n//\n\n\n#ifndef SMALL_LIB_H_CQ\n#define SMALL_LIB_H_CQ\n\n#include <stdio.h>\n#include <string.h>\n#include <set>\n#include <vector>\n#include <memory>\n#include <string>\n#include <stdexcept>\n#if defined(USE_QT5)||defined(USE_QT6)\n#include <QString>\n#include <QStringList>\n#include <QSet>\n#endif\n\n\n#ifdef _WIN32\n#define DIRSEP '\\\\'\n#else\n#define DIRSEP '/'\n#endif\n\n// Get number of elements of a fixed-sized array\n#define DIM(x)   (sizeof( x ) / sizeof( x [0] ) )\n\n#if defined(USE_QT5)||defined(USE_QT6)\ntypedef QString tStr;\ntypedef QString::iterator tStrIter;\ntypedef QStringList tVecStr;\ntypedef QSet<QString> tSetStr;\n\n#else // only STL\ntypedef std::string tStr;\ntypedef std::string::iterator tStrIter;\ntypedef std::vector<std::string> tVecStr;\ntypedef std::set<std::string> tSetStr;\n#endif\n\n#if defined(USE_QT5)||defined(USE_QT6)\n#define C_STR(x) toLatin1(x).data(x)\n#define STRISEMPTY(x) isEmpty(x)\n#define STRTOLOWER(x,y) x = y.toLower()\n#define CHAR_AT(x) at(x).toLatin1()\n\n#else // use std::string\n#define C_STR(x) c_str(x)\n#define STRISEMPTY(x) empty(x)\n#define STRTOLOWER(x,y) x = y; \\\n                        std::transform(x.begin(), x.end(), x.begin(), ::tolower)\n#define CHAR_AT(x) at(x)\n#endif\n\n\nbool check_fileExists(const char *fn);\nbool isAbsolutePath(tStr fp);\nbool strrevcmp(tStr str, tStr cmpstr);\nchar* get_last_part(char* str, int c);\nstd::vector<std::string> splitstr(const char* inpstr, const char delim);\n\n// replace char o with char r for every part of the string\n// from iterator i1 to iterator i2, excluding i2\ntemplate<class T>\nlong replacechar(T i1, T i2, const char o, const char r)\n{\n\tlong count = 0;\n\tfor(T i = i1; i != i2; ++i)\n\t{\n\t\tif (*i == o)\n\t\t{\n\t\t\t*i = r;\n\t\t\tcount++;\n\t\t}\n\t}\n\treturn count;\n}\n\nconst char* chomp(char* str);\nstd::string add_escape_char(std::string ori, char chr2escp, char escpchr);\nstd::string add_escape_char(const char* oristr, char chr2escp, char escpchr);\nconst char* extract_filename(const char* filepath);\n\nclass smartFILE\n{\nprivate:\nFILE* m_fp;\ninline void setme(FILE *fptr);\n\npublic:\nsmartFILE();\nsmartFILE(FILE *fptr);\nsmartFILE(const smartFILE& sfp);\n~smartFILE(); // the reason why this class was written\nFILE* operator() ();\nbool operator ==(FILE* fptr) const;\nbool operator !=(FILE* fptr) const;\nbool operator ==(const smartFILE& sfp) const;\nbool operator !=(const smartFILE& sfp) const;\nsmartFILE& operator =(FILE *fptr);\nsmartFILE& operator =(const smartFILE& sfp);\nvoid assign(FILE* fptr);\nvoid assign(const smartFILE& sfp);\nFILE* get(void);\nvoid close_file(void);\n}; //class smartFILE\n\n\nclass tempbuf\n{\nprivate:\nchar* m_buffer;\nlong m_size;\n\npublic:\ntempbuf(long n);\n~tempbuf(); // the reason why this class was written\nchar* operator() ();\nchar* get(void);\nchar  operator[] (long i);\nlong size(void) const;\nbool isempty(void) const;\nvoid clear(void);\nchar* reinit(long n);\nconst char* constchar(void);\n}; //class tempbuf\n\nclass idxcounter\n{\nprivate:\n\tlong unsigned int m_ctr;\n\tchar m_buf[20];\n\npublic:\nidxcounter();\n~idxcounter();\nidxcounter(const idxcounter& idxc);\nidxcounter& operator =(long unsigned int idx);\nidxcounter& operator =(const idxcounter& idxc);\nvoid setCounterVal(long unsigned int i);\nvoid reset(void);\nidxcounter& operator ++();\nidxcounter& operator --();\nlong unsigned int getInt(void) const;\nconst char* getStr(void) const;\nint getStrSize(void) const;\n}; //class idxcounter\n\n/* From https://stackoverflow.com/a/26221725 */\ntemplate<typename ... Args>\nstd::string string_format( const std::string& format, Args ... args )\n{\n    size_t size = snprintf( nullptr, 0, format.c_str(), args ... ) + 1; // Extra space for '\\0'\n    if( size <= 0 ){ throw std::runtime_error( \"Error during formatting.\" ); }\n    std::unique_ptr<char[]> buf( new char[ size ] );\n    snprintf( buf.get(), size, format.c_str(), args ... );\n    return std::string( buf.get(), buf.get() + size - 1 ); // We don't want the '\\0' inside\n}\n\n#if defined(USE_QT5)||defined(USE_QT6)\ntemplate<typename ... Args>\nQString string_format( const QString& format, Args ... args )\n{\n    size_t size = snprintf( nullptr, 0, format.C_STR(), args ... ) + 1; // Extra space for '\\0'\n    if( size <= 0 ){ throw std::runtime_error( \"Error during formatting.\" ); }\n    std::unique_ptr<char[]> buf( new char[ size ] );\n    snprintf( buf.get(), size, format.C_STR(), args ... );\n    return QString::fromStdString(std::string( buf.get(), buf.get() + size - 1 )); // We don't want the '\\0' inside\n}\n#endif\n\n#endif //SMALL_LIB_H_CQ\n\n"
  },
  {
    "path": "querylib/sqlquery.cpp",
    "content": "\n// Library to query CodeQuery database files\n//\n// This library is MIT-licensed, so that it may be used to create plugins\n// for editors, IDEs and other software without license restrictions\n//\n// This license applies only to this file:\n//\n// Copyright (c) 2011 ruben2020 https://github.com/ruben2020/\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n// IN THE SOFTWARE.\n//\n\n#include <stdio.h>\n#include <stdlib.h>\n//#include <unistd.h>\n#include <algorithm>\n#include <sqlite3.h>\n#include \"small_lib.h\"\n#include \"sqlquery.h\"\n\n\n#define SQL_SYM \"SELECT symtbl.symName,symtbl.symType,filestbl.filePath,linestbl.linenum,linestbl.linetext,linestbl.fileID FROM symtbl INNER JOIN linestbl ON symtbl.lineID=linestbl.lineID AND symtbl.symID IN (SELECT symID FROM symtbl WHERE symName LIKE ? ESCAPE \\\";\\\") INNER JOIN filestbl ON (linestbl.fileID=filestbl.fileID AND filestbl.filePath LIKE ? ESCAPE \\\";\\\");\"\n#define SQL_FUNC_MACRO \"SELECT symtbl.symName,symtbl.symType,filestbl.filePath,linestbl.linenum,linestbl.linetext,linestbl.fileID FROM symtbl INNER JOIN linestbl ON symtbl.lineID=linestbl.lineID AND symtbl.symID IN (SELECT symID FROM symtbl WHERE symName LIKE ? ESCAPE \\\";\\\") AND (symtbl.symType=\\\"$\\\" OR symtbl.symType=\\\"#\\\") INNER JOIN filestbl ON (linestbl.fileID=filestbl.fileID AND filestbl.filePath LIKE ? ESCAPE \\\";\\\");\"\n#define SQL_CLASS_STRUCT \"SELECT symtbl.symName,symtbl.symType,filestbl.filePath,linestbl.linenum,linestbl.linetext,linestbl.fileID FROM symtbl INNER JOIN linestbl ON symtbl.lineID=linestbl.lineID AND symtbl.symID IN (SELECT symID FROM symtbl WHERE symName LIKE ? ESCAPE \\\";\\\") AND (symtbl.symType=\\\"c\\\" OR symtbl.symType=\\\"s\\\") INNER JOIN filestbl ON (linestbl.fileID=filestbl.fileID AND filestbl.filePath LIKE ? ESCAPE \\\";\\\");\"\n#define SQL_CALLINGFUNC \"SELECT symtbl.symName,symtbl.symType,filestbl.filePath,linestbl.linenum,linestbl.linetext,linestbl.fileID FROM symtbl INNER JOIN linestbl ON symtbl.lineID=linestbl.lineID AND symtbl.symID IN (SELECT callerID FROM calltbl WHERE calledID IN (SELECT symID FROM symtbl WHERE symName LIKE ? ESCAPE \\\";\\\")) INNER JOIN filestbl ON (linestbl.fileID=filestbl.fileID AND filestbl.filePath LIKE ? ESCAPE \\\";\\\");\"\n#define SQL_CALLEDFUNC \"SELECT symtbl.symName,symtbl.symType,filestbl.filePath,linestbl.linenum,linestbl.linetext,linestbl.fileID FROM symtbl INNER JOIN linestbl ON symtbl.lineID=linestbl.lineID AND symtbl.symID IN (SELECT calledID FROM calltbl WHERE callerID IN (SELECT symID FROM symtbl WHERE symName LIKE ? ESCAPE \\\";\\\")) INNER JOIN filestbl ON (linestbl.fileID=filestbl.fileID AND filestbl.filePath LIKE ? ESCAPE \\\";\\\");\"\n#define SQL_CALLS_OF_FUNC \"SELECT symtbl.symName,symtbl.symType,filestbl.filePath,linestbl.linenum,linestbl.linetext,linestbl.fileID FROM symtbl INNER JOIN linestbl ON symtbl.lineID=linestbl.lineID AND symtbl.symID IN (SELECT symID FROM symtbl WHERE symName LIKE ? ESCAPE \\\";\\\") AND (symtbl.symType=\\\"`\\\") INNER JOIN filestbl ON (linestbl.fileID=filestbl.fileID AND filestbl.filePath LIKE ? ESCAPE \\\";\\\");\"\n#define SQL_MEMBERS \"SELECT symtbl.symName,symtbl.symType,filestbl.filePath,linestbl.linenum,linestbl.linetext,linestbl.fileID FROM symtbl INNER JOIN linestbl ON symtbl.lineID=linestbl.lineID AND symtbl.symID IN (SELECT memberID FROM membertbl WHERE groupID IN (SELECT symID FROM symtbl WHERE symName LIKE ? ESCAPE \\\";\\\")) INNER JOIN filestbl ON (linestbl.fileID=filestbl.fileID AND filestbl.filePath LIKE ? ESCAPE \\\";\\\");\"\n#define SQL_OWNERCLASS \"SELECT symtbl.symName,symtbl.symType,filestbl.filePath,linestbl.linenum,linestbl.linetext,linestbl.fileID FROM symtbl INNER JOIN linestbl ON symtbl.lineID=linestbl.lineID AND symtbl.symID IN (SELECT groupID FROM membertbl WHERE memberID IN (SELECT symID FROM symtbl WHERE symName LIKE ? ESCAPE \\\";\\\")) INNER JOIN filestbl ON (linestbl.fileID=filestbl.fileID AND filestbl.filePath LIKE ? ESCAPE \\\";\\\");\"\n#define SQL_PARENTCLASS \"SELECT symtbl.symName,symtbl.symType,filestbl.filePath,linestbl.linenum,linestbl.linetext,linestbl.fileID FROM symtbl INNER JOIN linestbl ON symtbl.lineID=linestbl.lineID AND symtbl.symID IN (SELECT parentID FROM inherittbl WHERE childID IN (SELECT symID FROM symtbl WHERE symName LIKE ? ESCAPE \\\";\\\")) INNER JOIN filestbl ON (linestbl.fileID=filestbl.fileID AND filestbl.filePath LIKE ? ESCAPE \\\";\\\");\"\n#define SQL_CHILDCLASS \"SELECT symtbl.symName,symtbl.symType,filestbl.filePath,linestbl.linenum,linestbl.linetext,linestbl.fileID FROM symtbl INNER JOIN linestbl ON symtbl.lineID=linestbl.lineID AND symtbl.symID IN (SELECT childID FROM inherittbl WHERE parentID IN (SELECT symID FROM symtbl WHERE symName LIKE ? ESCAPE \\\";\\\")) INNER JOIN filestbl ON (linestbl.fileID=filestbl.fileID AND filestbl.filePath LIKE ? ESCAPE \\\";\\\");\"\n#define SQL_INCLUDE \"SELECT filestbl.filePath,linestbl.linenum,linestbl.linetext,linestbl.fileID FROM symtbl INNER JOIN linestbl ON symtbl.lineID=linestbl.lineID AND symtbl.symID IN (SELECT symID FROM symtbl WHERE symName LIKE ? ESCAPE \\\";\\\" AND symType=\\\"~\\\") INNER JOIN filestbl ON linestbl.fileID=filestbl.fileID;\"\n#define SQL_FILEPATH \"SELECT DISTINCT filePath, fileID FROM filestbl WHERE filePath LIKE ? ESCAPE \\\";\\\";\"\n#define SQL_FILESLIST \"SELECT DISTINCT filePath, fileID FROM filestbl WHERE filePath LIKE ? ESCAPE \\\";\\\" ORDER BY filePath ASC;\"\n#define SQL_AUTOCOMPLETE \"SELECT DISTINCT symName FROM symtbl WHERE symName LIKE ? ORDER BY symName LIMIT 20;\"\n#define SQL_FUNCSINFILE \"SELECT symtbl.symName,symtbl.symType,filestbl.filePath,linestbl.linenum,linestbl.linetext,linestbl.fileID FROM symtbl INNER JOIN linestbl ON symtbl.lineID=linestbl.lineID AND symtbl.symID IN (SELECT symID FROM symtbl WHERE (symtbl.symType=\\\"$\\\" OR symtbl.symType=\\\"#\\\")) INNER JOIN filestbl ON (linestbl.fileID=filestbl.fileID AND filestbl.filePath LIKE ? ESCAPE \\\";\\\");\"\n\n#define SQL_FUNCSINONEFILE \"SELECT symtbl.symName,filestbl.filePath,linestbl.linenum FROM symtbl INNER JOIN linestbl ON symtbl.lineID=linestbl.lineID AND symtbl.symID IN (SELECT symID FROM symtbl WHERE (symtbl.symType=\\\"$\\\")) INNER JOIN filestbl ON (linestbl.fileID=filestbl.fileID AND filestbl.filePath LIKE ? ESCAPE \\\";\\\");\"\n\n#define SQL_FUNCSINONEFILE2 \"SELECT symtbl.symName,filestbl.filePath,linestbl.linenum FROM symtbl INNER JOIN linestbl ON symtbl.lineID=linestbl.lineID AND symtbl.symID IN (SELECT symID FROM symtbl WHERE (symtbl.symType=\\\"$\\\")) INNER JOIN filestbl ON (linestbl.fileID=filestbl.fileID AND linestbl.fileID=?);\"\n\n#define SQL_EM_SYM \"SELECT symtbl.symName,symtbl.symType,filestbl.filePath,linestbl.linenum,linestbl.linetext,linestbl.fileID FROM symtbl INNER JOIN linestbl ON symtbl.lineID=linestbl.lineID AND symtbl.symID IN (SELECT symID FROM symtbl WHERE symName=?) INNER JOIN filestbl ON (linestbl.fileID=filestbl.fileID AND filestbl.filePath LIKE ? ESCAPE \\\";\\\");\"\n#define SQL_EM_FUNC_MACRO \"SELECT symtbl.symName,symtbl.symType,filestbl.filePath,linestbl.linenum,linestbl.linetext,linestbl.fileID FROM symtbl INNER JOIN linestbl ON symtbl.lineID=linestbl.lineID AND symtbl.symID IN (SELECT symID FROM symtbl WHERE symName=?) AND (symtbl.symType=\\\"$\\\" OR symtbl.symType=\\\"#\\\") INNER JOIN filestbl ON (linestbl.fileID=filestbl.fileID AND filestbl.filePath LIKE ? ESCAPE \\\";\\\");\"\n#define SQL_EM_CLASS_STRUCT \"SELECT symtbl.symName,symtbl.symType,filestbl.filePath,linestbl.linenum,linestbl.linetext,linestbl.fileID FROM symtbl INNER JOIN linestbl ON symtbl.lineID=linestbl.lineID AND symtbl.symID IN (SELECT symID FROM symtbl WHERE symName=?) AND (symtbl.symType=\\\"c\\\" OR symtbl.symType=\\\"s\\\") INNER JOIN filestbl ON (linestbl.fileID=filestbl.fileID AND filestbl.filePath LIKE ? ESCAPE \\\";\\\");\"\n#define SQL_EM_CALLINGFUNC \"SELECT symtbl.symName,symtbl.symType,filestbl.filePath,linestbl.linenum,linestbl.linetext,linestbl.fileID FROM symtbl INNER JOIN linestbl ON symtbl.lineID=linestbl.lineID AND symtbl.symID IN (SELECT callerID FROM calltbl WHERE calledID IN (SELECT symID FROM symtbl WHERE symName=?)) INNER JOIN filestbl ON (linestbl.fileID=filestbl.fileID AND filestbl.filePath LIKE ? ESCAPE \\\";\\\");\"\n#define SQL_EM_CALLEDFUNC \"SELECT symtbl.symName,symtbl.symType,filestbl.filePath,linestbl.linenum,linestbl.linetext,linestbl.fileID FROM symtbl INNER JOIN linestbl ON symtbl.lineID=linestbl.lineID AND symtbl.symID IN (SELECT calledID FROM calltbl WHERE callerID IN (SELECT symID FROM symtbl WHERE symName=?)) INNER JOIN filestbl ON (linestbl.fileID=filestbl.fileID AND filestbl.filePath LIKE ? ESCAPE \\\";\\\");\"\n#define SQL_EM_CALLS_OF_FUNC \"SELECT symtbl.symName,symtbl.symType,filestbl.filePath,linestbl.linenum,linestbl.linetext,linestbl.fileID FROM symtbl INNER JOIN linestbl ON symtbl.lineID=linestbl.lineID AND symtbl.symID IN (SELECT symID FROM symtbl WHERE symName=?) AND (symtbl.symType=\\\"`\\\") INNER JOIN filestbl ON (linestbl.fileID=filestbl.fileID AND filestbl.filePath LIKE ? ESCAPE \\\";\\\");\"\n#define SQL_EM_MEMBERS \"SELECT symtbl.symName,symtbl.symType,filestbl.filePath,linestbl.linenum,linestbl.linetext,linestbl.fileID FROM symtbl INNER JOIN linestbl ON symtbl.lineID=linestbl.lineID AND symtbl.symID IN (SELECT memberID FROM membertbl WHERE groupID IN (SELECT symID FROM symtbl WHERE symName=?)) INNER JOIN filestbl ON (linestbl.fileID=filestbl.fileID AND filestbl.filePath LIKE ? ESCAPE \\\";\\\");\"\n#define SQL_EM_OWNERCLASS \"SELECT symtbl.symName,symtbl.symType,filestbl.filePath,linestbl.linenum,linestbl.linetext,linestbl.fileID FROM symtbl INNER JOIN linestbl ON symtbl.lineID=linestbl.lineID AND symtbl.symID IN (SELECT groupID FROM membertbl WHERE memberID IN (SELECT symID FROM symtbl WHERE symName=?)) INNER JOIN filestbl ON (linestbl.fileID=filestbl.fileID AND filestbl.filePath LIKE ? ESCAPE \\\";\\\");\"\n#define SQL_EM_PARENTCLASS \"SELECT symtbl.symName,symtbl.symType,filestbl.filePath,linestbl.linenum,linestbl.linetext,linestbl.fileID FROM symtbl INNER JOIN linestbl ON symtbl.lineID=linestbl.lineID AND symtbl.symID IN (SELECT parentID FROM inherittbl WHERE childID IN (SELECT symID FROM symtbl WHERE symName=?)) INNER JOIN filestbl ON (linestbl.fileID=filestbl.fileID AND filestbl.filePath LIKE ? ESCAPE \\\";\\\");\"\n#define SQL_EM_CHILDCLASS \"SELECT symtbl.symName,symtbl.symType,filestbl.filePath,linestbl.linenum,linestbl.linetext,linestbl.fileID FROM symtbl INNER JOIN linestbl ON symtbl.lineID=linestbl.lineID AND symtbl.symID IN (SELECT childID FROM inherittbl WHERE parentID IN (SELECT symID FROM symtbl WHERE symName=?)) INNER JOIN filestbl ON (linestbl.fileID=filestbl.fileID AND filestbl.filePath LIKE ? ESCAPE \\\";\\\");\"\n#define SQL_EM_INCLUDE \"SELECT filestbl.filePath,linestbl.linenum,linestbl.linetext,linestbl.fileID FROM symtbl INNER JOIN linestbl ON symtbl.lineID=linestbl.lineID AND symtbl.symID IN (SELECT symID FROM symtbl WHERE symName=? AND symType=\\\"~\\\") INNER JOIN filestbl ON linestbl.fileID=filestbl.fileID;\"\n#define SQL_EM_FILEPATH \"SELECT DISTINCT filePath, fileid FROM filestbl WHERE filePath=?;\"\n#define SQL_EM_FILESLIST \"SELECT DISTINCT filePath, fileid FROM filestbl WHERE filePath=? ORDER BY filePath ASC;\"\n#define SQL_DECLARATION \"SELECT symtbl.symName,symtbl.symType,filestbl.filePath,linestbl.linenum,linestbl.linetext,linestbl.fileID FROM symtbl INNER JOIN linestbl ON symtbl.symID IN (SELECT symID FROM symtbl WHERE symName=?) AND (symtbl.symType=\\\"$\\\" OR symtbl.symType=\\\"#\\\" OR symtbl.symType=\\\"c\\\" OR symtbl.symType=\\\"s\\\") AND symtbl.lineID=linestbl.lineID INNER JOIN filestbl ON (linestbl.fileID=filestbl.fileID) LIMIT 1;\"\n\nstruct nameasc\n{\n    bool operator()( const sqlqueryresult& lx, const sqlqueryresult& rx ) const {\n    \treturn lx.symname2.compare(rx.symname2) < 0;\n    }\n};\n\nstruct numasc\n{\n    bool operator()( const sqlqueryresult& lx, const sqlqueryresult& rx ) const {\n    \treturn lx.intLinenum < rx.intLinenum;\n    }\n};\n\n\ntempstmt::tempstmt()\n:m_stmt(NULL)\n{\n}\n\ntempstmt::~tempstmt()\n{\n\tfinalize();\n}\n\nvoid tempstmt::finalize(void)\n{\n\tsqlite3_finalize(m_stmt);\n\tm_stmt = NULL;\n\tqry.clear();\n}\n\nsqlite3_stmt* tempstmt::get(void)\n{\n\treturn m_stmt;\n}\n\nsqlqueryresultlist::sqlqueryresultlist()\n:result_type(sqlresultERROR)\n,sqlerrmsg(\"empty\")\n{\n}\n\nsqlqueryresultlist::sqlqueryresultlist(const sqlqueryresultlist& copy)\n{\n\tresult_type = copy.result_type;\n\tsqlerrmsg = copy.sqlerrmsg;\n\tresultlist = copy.resultlist;\n}\n\nsqlqueryresultlist& sqlqueryresultlist::operator= (const sqlqueryresultlist& copy)\n{\n\tif (&copy != this)\n\t{\n\t\tresult_type = copy.result_type;\n\t\tsqlerrmsg = copy.sqlerrmsg;\n\t\tresultlist.clear();\n\t\tresultlist = copy.resultlist;\n\t}\n\treturn *this;\n}\n\nvoid sqlqueryresultlist::sort_by_name(void)\n{\n\tstd::sort(resultlist.begin(), resultlist.end(), nameasc());\n}\n\nvoid sqlqueryresultlist::sort_by_linenum(void)\n{\n\tstd::sort(resultlist.begin(), resultlist.end(), numasc());\n}\n\nsqlquery::sqlquery()\n:m_db(NULL)\n{\n}\n\nsqlquery::~sqlquery()\n{\n\tclose_dbfile();\n}\n\n\nsqlquery::en_filereadstatus sqlquery::open_dbfile(tStr dbfn)\n{\n\tif (dbfn.STRISEMPTY()) return sqlfileOPENERROR;\n\n\tsmartFILE fp;\n\t// Does the file exist?\n\tif (check_fileExists(dbfn.C_STR()) == false) {return sqlfileOPENERROR;}\n\t// Try to open the file for reading\n\tfp = fopen(dbfn.C_STR(), \"r\");\n\tif (fp == NULL) {return sqlfileOPENERROR;}\n\tfp.close_file();\n\n\tint rc = sqlite3_open_v2(dbfn.C_STR(),\n\t\t\t\t\t\t&m_db, SQLITE_OPEN_READONLY, NULL);\n\tif ((rc != SQLITE_OK)||(m_db == NULL)) \n\t{\n\t\tclose_dbfile();\n\t\treturn sqlfileOPENERROR;\n\t}\n\ttempstmt stmt;\n\n\tsqlite3_exec(m_db, /*\"PRAGMA synchronous = OFF;\"\n\t\t\"PRAGMA journal_mode = OFF;\"\n\t\t\"PRAGMA locking_mode = EXCLUSIVE;\"\n\t\t\"PRAGMA automatic_index = FALSE;\"*/\n\t\t\"PRAGMA cache_size = 20000;\", NULL, 0, NULL);\n\n\ttStr majorver = read_configtbl(\"DB_MAJOR_VER\", stmt.get());\n\ttStr minorver = read_configtbl(\"DB_MINOR_VER\", stmt.get());\n\tif ((majorver.STRISEMPTY())||(minorver.STRISEMPTY()))\n\t\t{return sqlfileNOTCORRECTDB;}\n\tif (majorver.compare(tStr(\"0\")) != 0) return sqlfileINCORRECTVER;\n\tif (minorver.compare(tStr(\"1\")) != 0) return sqlfileINCORRECTVER;\n\tm_basepath = read_configtbl(\"DB_BASE_PATH\", stmt.get());\n\tif (m_basepath.STRISEMPTY()) {return sqlfileNOTCORRECTDB;}\n\trc = sqlite3_prepare_v2(m_db, SQL_AUTOCOMPLETE, strlen(SQL_AUTOCOMPLETE),\n\t\t\t\t\t\t\t&(m_autocompstmt.m_stmt), NULL);\n\trc = sqlite3_prepare_v2(m_db, SQL_FUNCSINONEFILE, strlen(SQL_FUNCSINONEFILE),\n\t\t\t\t\t\t\t&(m_funclistfilenamestmt.m_stmt), NULL);\n\trc = sqlite3_prepare_v2(m_db, SQL_FUNCSINONEFILE2, strlen(SQL_FUNCSINONEFILE2),\n\t\t\t\t\t\t\t&(m_funclistfileidstmt.m_stmt), NULL);\n\trc = sqlite3_prepare_v2(m_db, SQL_DECLARATION, strlen(SQL_DECLARATION),\n\t\t\t\t\t\t\t&(m_declarationstmt.m_stmt), NULL);\n\tif (rc != SQLITE_OK) {return sqlfileNOTCORRECTDB;}\n\treturn sqlfileOK;\n}\n\nvoid sqlquery::close_dbfile(void)\n{\n\tm_declarationstmt.finalize();\n\tm_autocompstmt.finalize();\n\tm_funclistfilenamestmt.finalize();\n\tm_funclistfileidstmt.finalize();\n\tm_searchstmt.finalize();\n\tsqlite3_close(m_db);\n\tm_db = NULL;\n\tm_basepath.clear();\n}\n\ntStr sqlquery::read_configtbl(const char *key, sqlite3_stmt *stmt)\n{\n\ttStr result = \"\";\n\tif ((key == NULL)||(strlen(key) == 0)||(m_db == NULL)) return result;\n\tint rc;\n\tif (stmt == NULL)\n\t{\n\t\trc = sqlite3_prepare_v2(m_db, \"SELECT configVal FROM configtbl WHERE configKey=?;\",\n\t\t\t\t\t\t\tstrlen(\"SELECT configVal FROM configtbl WHERE configKey=?;\"),\n\t\t\t\t\t\t\t&stmt, NULL);\n\t\tif (rc != SQLITE_OK) {return result;}\n\t}\n\telse sqlite3_reset(stmt);\n\trc = sqlite3_bind_text(stmt, 1, key, strlen(key), SQLITE_STATIC);\n\tif (rc != SQLITE_OK) {return result;}\n\trc = sqlite3_step(stmt);\n\tif (rc != SQLITE_ROW) {return result;}\n\tresult = (const char*) sqlite3_column_text(stmt, 0);\n\treturn result;\n}\n\nsqlqueryresultlist sqlquery::search_funclist_filename(const char* searchstr)\n{\n\t//printf(\"search_funclist_filename %s\\n\", searchstr);\n\tsqlqueryresultlist result;\n\tif (searchstr == NULL) return result;\n\tresult.result_type = sqlqueryresultlist::sqlresultERROR;\n\ttStr srchterm(\"%\");\n\tsrchterm.append(searchstr);\n\tif ((searchstr == NULL)||(strlen(searchstr) < 1)||(m_db == NULL)) return result;\n\tsqlite3_reset(m_funclistfilenamestmt.get());\n\tint rc = sqlite3_bind_text(m_funclistfilenamestmt.get(), 1, srchterm.C_STR(), srchterm.size(), SQLITE_STATIC);\n\tif (rc != SQLITE_OK) {printf(\"Err: %s\\n\", sqlite3_errmsg(m_db)); return result;}\n\tresult = search_func_in_one_file(m_funclistfilenamestmt.get());\n\treturn result;\n}\n\nsqlqueryresultlist sqlquery::search_funclist_fileid(int& fileid)\n{\n\t//printf(\"search_funclist_fileid %d\\n\", fileid);\n\tsqlqueryresultlist result;\n\tresult.result_type = sqlqueryresultlist::sqlresultERROR;\n\tif ((fileid < 0)||(m_db == NULL)) return result;\n\tsqlite3_reset(m_funclistfileidstmt.get());\n\tint rc = sqlite3_bind_int(m_funclistfileidstmt.get(), 1, fileid);\n\tif (rc != SQLITE_OK) {printf(\"Err: %s\\n\", sqlite3_errmsg(m_db)); return result;}\n\tresult = search_func_in_one_file(m_funclistfileidstmt.get());\n\treturn result;\n}\n\ntVecStr sqlquery::search_autocomplete(const char* searchstr)\n{\n\ttVecStr result;\n\t//int ctr = 0;\n\tif ((searchstr == NULL)||(strlen(searchstr) < 1)||(m_db == NULL)) return result;\n\ttStr srchterm = process_searchterm_autocomplete(searchstr);\n\tsqlite3_reset(m_autocompstmt.get());\n\tint rc = sqlite3_bind_text(m_autocompstmt.get(), 1, srchterm.C_STR(), srchterm.size(), SQLITE_STATIC);\n\tif (rc != SQLITE_OK) {printf(\"Err: %s\\n\", sqlite3_errmsg(m_db)); return result;}\n\tdo\n\t{\n\t\trc = sqlite3_step(m_autocompstmt.get());\n\t\tif (rc == SQLITE_ROW)\n\t\t{\n\t\t\tresult.push_back(tStr((const char*) sqlite3_column_text(m_autocompstmt.get(), 0)));\n\t\t\t//if (ctr++ > 300) rc = SQLITE_DONE;\n\t\t}\n\t} while (rc == SQLITE_ROW);\n\tif (rc != SQLITE_DONE)\n\t{\n\t\tprintf(\"Err: %s\\n\", sqlite3_errmsg(m_db));\n\t}\n\treturn result;\n}\n\nsqlqueryresultlist sqlquery::search(\n\t\t\t\t\t\ttStr searchstr,\n\t\t\t\t\t\tsqlquery::en_queryType querytype,\n\t\t\t\t\t\tbool exactmatch,\n\t\t\t\t\t\ttStr filterstr)\n{\n\tsqlqueryresultlist result;\n\tint rc;\n\tbool twoTerms = true;\n\tresult.result_type = sqlqueryresultlist::sqlresultERROR;\n\tif ((m_db == NULL)||(searchstr.STRISEMPTY())||(m_basepath.STRISEMPTY())) return result;\n\ttStr sqlqry, srchterm, filterterm;\n\tsqlqueryresultlist::en_resultType resultType = sqlqueryresultlist::sqlresultFULL;\n\tif (exactmatch && (querytype == sqlresultFUNCSINFILE)) {searchstr.insert(0, \"%\");}\n\tsrchterm = process_searchterm(searchstr.C_STR(), exactmatch);\n\tif (filterstr.STRISEMPTY()) {filterterm = \"%\";}\n\telse {filterterm = process_searchterm(filterstr.C_STR(), false);}\n\tswitch (querytype)\n\t{\n\t\tcase sqlquerySYMBOL:\n\t\t\tsqlqry = exactmatch ? SQL_EM_SYM : SQL_SYM;\n\t\t\tbreak;\n\t\tcase sqlresultFUNC_MACRO:\n\t\t\tsqlqry = exactmatch ? SQL_EM_FUNC_MACRO : SQL_FUNC_MACRO;\n\t\t\tbreak;\n\t\tcase sqlresultCLASS_STRUCT:\n\t\t\tsqlqry = exactmatch ? SQL_EM_CLASS_STRUCT : SQL_CLASS_STRUCT;\n\t\t\tbreak;\n\t\tcase sqlresultINCLUDE:\n\t\t\tsqlqry = exactmatch ? SQL_EM_INCLUDE : SQL_INCLUDE;\n\t\t\tresultType = sqlqueryresultlist::sqlresultFILE_LINE;\n\t\t\ttwoTerms = false;\n\t\t\tbreak;\n\t\tcase sqlresultFILEPATH:\n\t\t\tsqlqry = exactmatch ? SQL_EM_FILEPATH : SQL_FILEPATH;\n\t\t\tresultType = sqlqueryresultlist::sqlresultFILE_ONLY;\n\t\t\ttwoTerms = false;\n\t\t\tbreak;\n\t\tcase sqlresultFILESLIST:\n\t\t\tsqlqry = exactmatch ? SQL_EM_FILESLIST : SQL_FILESLIST;\n\t\t\tresultType = sqlqueryresultlist::sqlresultFILE_ONLY;\n\t\t\ttwoTerms = false;\n\t\t\tbreak;\n\t\tcase sqlresultCALLINGFUNC:\n\t\t\tsqlqry = exactmatch ? SQL_EM_CALLINGFUNC : SQL_CALLINGFUNC;\n\t\t\tbreak;\n\t\tcase sqlresultCALLEDFUNC:\n\t\t\tsqlqry = exactmatch ? SQL_EM_CALLEDFUNC : SQL_CALLEDFUNC;\n\t\t\tbreak;\n\t\tcase sqlresultCALLSOFFUNC:\n\t\t\tsqlqry = exactmatch ? SQL_EM_CALLS_OF_FUNC : SQL_CALLS_OF_FUNC;\n\t\t\tbreak;\n\t\tcase sqlresultMEMBERS:\n\t\t\tsqlqry = exactmatch ? SQL_EM_MEMBERS : SQL_MEMBERS;\n\t\t\tbreak;\n\t\tcase sqlresultOWNERCLASS:\n\t\t\tsqlqry = exactmatch ? SQL_EM_OWNERCLASS : SQL_OWNERCLASS;\n\t\t\tbreak;\n\t\tcase sqlresultPARENTCLASS:\n\t\t\tsqlqry = exactmatch ? SQL_EM_PARENTCLASS : SQL_PARENTCLASS;\n\t\t\tbreak;\n\t\tcase sqlresultCHILDCLASS:\n\t\t\tsqlqry = exactmatch ? SQL_EM_CHILDCLASS : SQL_CHILDCLASS;\n\t\t\tbreak;\n\t\tcase sqlresultFUNCSINFILE:\n\t\t\tsqlqry = SQL_FUNCSINFILE;\n\t\t\ttwoTerms = false;\n\t\t\tbreak;\n\t\tcase sqlresultAUTOCOMPLETE:\n\t\t\tresultType = sqlqueryresultlist::sqlresultSYM_ONLY;\n\t\t\ttwoTerms = false;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tresult.sqlerrmsg = \"Unknown search type\";\n\t\t\treturn result;\n\t}\n\n\tif (m_searchstmt.qry.compare(sqlqry) != 0)\n\t{\n\t\tsqlite3_finalize(m_searchstmt.get());\n\t\trc = sqlite3_prepare_v2(m_db, sqlqry.C_STR(),\n\t\t\t\t\tsqlqry.size(),\n\t\t\t\t\t&(m_searchstmt.m_stmt), NULL);\n\t\tm_searchstmt.qry = (rc == SQLITE_OK) ? sqlqry : \"\";\n\t}\n\telse\n\t{\n\t\trc = sqlite3_reset(m_searchstmt.get());\n\t}\n\tif (rc != SQLITE_OK) {result.sqlerrmsg = sqlite3_errmsg(m_db); return result;}\n\trc = sqlite3_bind_text(m_searchstmt.get(), 1, srchterm.C_STR(), srchterm.size(), SQLITE_TRANSIENT);\n\tif (rc != SQLITE_OK) {result.sqlerrmsg = sqlite3_errmsg(m_db); return result;}\n\tif (twoTerms)\n\t{\n\t\trc = sqlite3_bind_text(m_searchstmt.get(), 2, filterterm.C_STR(), filterterm.size(), SQLITE_TRANSIENT);\n\t\tif (rc != SQLITE_OK) {result.sqlerrmsg = sqlite3_errmsg(m_db); return result;}\n\t}\n\tif (resultType == sqlqueryresultlist::sqlresultFULL) result = search_full(m_searchstmt.get());\n\telse if (resultType == sqlqueryresultlist::sqlresultFILE_LINE) result = search_file_line(m_searchstmt.get());\n\telse if (resultType == sqlqueryresultlist::sqlresultFILE_ONLY)\n\t{\n\t\tif (querytype == sqlresultFILESLIST)\n\t\t\tresult = search_filepath_only(m_searchstmt.get());\n\t\telse\n\t\t\tresult = search_file_only(m_searchstmt.get());\n\t}\n\treturn result;\n}\t\n\ntStr sqlquery::process_searchterm(const char* searchterm, const bool& exactmatch)\n{\n\tstd::string srchterm, srchterm2;\n\tif (!exactmatch)\n\t{\n\t\tsrchterm2 = add_escape_char(searchterm,        '%', ';').c_str();\n\t\tsrchterm2 = add_escape_char( srchterm2.c_str(), '_', ';').c_str();\n\t\tsrchterm = \"%\";\n\t\tsrchterm += srchterm2;\n\t\tsrchterm += \"%\";\n\t\treplacechar( srchterm.begin(), srchterm.end(), '*', '%');\n\t\treplacechar( srchterm.begin(), srchterm.end(), '?', '_');\n\t}\n\telse srchterm = searchterm;\n#ifdef QT_VERSION\n\treturn  QString::fromStdString(srchterm);\n#else\n\treturn srchterm;\n#endif\n}\n\ntStr sqlquery::process_searchterm_autocomplete(const char* searchterm)\n{\n\tstd::string srchterm(searchterm);\n\tsrchterm += \"%\";\n\treplacechar( srchterm.begin(), srchterm.end(), '*', '%');\n\treplacechar( srchterm.begin(), srchterm.end(), '?', '_');\n#ifdef QT_VERSION\n\treturn  QString::fromStdString(srchterm);\n#else\n\treturn srchterm;\n#endif\n}\n\nsqlqueryresultlist sqlquery::search_declaration(const char* searchstr)\n{\n\tint rc;\n\tsqlqueryresultlist result;\n\ttStr fp;\n\tsqlite3_stmt* stmt = m_declarationstmt.get();\n\tif ((searchstr == NULL)||(strlen(searchstr) < 1)||(m_db == NULL)) return result;\n\tresult.result_type = sqlqueryresultlist::sqlresultERROR;\n\tsqlqueryresult item;\n\tsqlite3_reset(stmt);\n\trc = sqlite3_bind_text(stmt, 1, searchstr, strlen(searchstr), SQLITE_STATIC);\n\tif (rc != SQLITE_OK) {printf(\"Err: %s\\n\", sqlite3_errmsg(m_db)); return result;}\n\tdo\n\t{\n\t\trc = sqlite3_step(stmt);\n\t\tif (rc == SQLITE_ROW)\n\t\t{\n\t\t\titem.symname  = (const char*) sqlite3_column_text(stmt, 0);\n\t\t\titem.symtype  = (const char*) sqlite3_column_text(stmt, 1);\n\t\t\tfp            = (const char*) sqlite3_column_text(stmt, 2);\n\t\t\titem.linenum  = (const char*) sqlite3_column_text(stmt, 3);\n\t\t\titem.linetext = (const char*) sqlite3_column_text(stmt, 4);\n\t\t\titem.filename = extract_filename(fp.C_STR());\n\t\t\tif (isAbsolutePath(fp) == false)\n\t\t\t{\n\t\t\t\titem.filepath = m_basepath;\n\t\t\t\titem.filepath += DIRSEP;\n\t\t\t\titem.filepath += fp;\n\t\t\t}\n\t\t\telse item.filepath = fp;\n\t\t\tresult.resultlist.push_back(item);\n\t\t}\n\t} while (rc == SQLITE_ROW);\n\tif (rc != SQLITE_DONE)\n\t{\n\t\tresult.result_type = sqlqueryresultlist::sqlresultERROR;\n\t\tresult.sqlerrmsg = sqlite3_errmsg(m_db);\n\t}\n\telse\n\t{\n\t\tresult.result_type = sqlqueryresultlist::sqlresultFULL;\n\t}\n\treturn result;\n}\n\n\nsqlqueryresultlist sqlquery::search_full(sqlite3_stmt* stmt)\n{\n\tint rc;\n\tsqlqueryresultlist result;\n\ttStr fp;\n\tresult.result_type = sqlqueryresultlist::sqlresultERROR;\n\tsqlqueryresult item;\n\tdo\n\t{\n\t\trc = sqlite3_step(stmt);\n\t\tif (rc == SQLITE_ROW)\n\t\t{\n\t\t\titem.symname  = (const char*) sqlite3_column_text(stmt, 0);\n\t\t\titem.symtype  = (const char*) sqlite3_column_text(stmt, 1);\n\t\t\tfp            = (const char*) sqlite3_column_text(stmt, 2);\n\t\t\titem.linenum  = (const char*) sqlite3_column_text(stmt, 3);\n\t\t\titem.linetext = (const char*) sqlite3_column_text(stmt, 4);\n\t\t\titem.fileid   =               sqlite3_column_int (stmt, 5);\n\t\t\titem.filename = extract_filename(fp.C_STR());\n\t\t\tif (isAbsolutePath(fp) == false)\n\t\t\t{\n\t\t\t\titem.filepath = m_basepath;\n\t\t\t\titem.filepath += DIRSEP;\n\t\t\t\titem.filepath += fp;\n\t\t\t}\n\t\t\telse item.filepath = fp;\n\t\t\tresult.resultlist.push_back(item);\n\t\t}\n\t} while (rc == SQLITE_ROW);\n\tif (rc != SQLITE_DONE)\n\t{\n\t\tresult.result_type = sqlqueryresultlist::sqlresultERROR;\n\t\tresult.sqlerrmsg = sqlite3_errmsg(m_db);\n\t}\n\telse\n\t{\n\t\tresult.result_type = sqlqueryresultlist::sqlresultFULL;\n\t}\n\treturn result;\n}\n\nsqlqueryresultlist sqlquery::search_func_in_one_file(sqlite3_stmt* stmt)\n{\n\tint rc;\n\tsqlqueryresultlist result;\n\ttStr fp;\n\tresult.result_type = sqlqueryresultlist::sqlresultERROR;\n\tsqlqueryresult item;\n\tdo\n\t{\n\t\trc = sqlite3_step(stmt);\n\t\tif (rc == SQLITE_ROW)\n\t\t{\n\t\t\titem.symname  = (const char*) sqlite3_column_text(stmt, 0);\n\t\t\tfp            = (const char*) sqlite3_column_text(stmt, 1);\n\t\t\titem.linenum  = (const char*) sqlite3_column_text(stmt, 2);\n\t\t\titem.filename = extract_filename(fp.C_STR());\n\t\t\titem.intLinenum = atoi(item.linenum.C_STR());\n\t\t\tSTRTOLOWER(item.symname2, item.symname);\n\t\t\tif (isAbsolutePath(fp) == false)\n\t\t\t{\n\t\t\t\titem.filepath = m_basepath;\n\t\t\t\titem.filepath += DIRSEP;\n\t\t\t\titem.filepath += fp;\n\t\t\t}\n\t\t\telse item.filepath = fp;\n\t\t\tresult.resultlist.push_back(item);\n\t\t}\n\t} while (rc == SQLITE_ROW);\n\tif (rc != SQLITE_DONE)\n\t{\n\t\tresult.result_type = sqlqueryresultlist::sqlresultERROR;\n\t\tresult.sqlerrmsg = sqlite3_errmsg(m_db);\n\t}\n\telse\n\t{\n\t\tresult.result_type = sqlqueryresultlist::sqlresultFUNC_IN_ONE_FILE;\n\t}\n\treturn result;\n}\n\nsqlqueryresultlist sqlquery::search_file_line(sqlite3_stmt* stmt)\n{\n\tint rc;\n\tsqlqueryresultlist result;\n\ttStr fp;\n\tresult.result_type = sqlqueryresultlist::sqlresultERROR;\n\tsqlqueryresult item;\n\tdo\n\t{\n\t\trc = sqlite3_step(stmt);\n\t\tif (rc == SQLITE_ROW)\n\t\t{\n\t\t\tfp            = (const char*) sqlite3_column_text(stmt, 0);\n\t\t\titem.linenum  = (const char*) sqlite3_column_text(stmt, 1);\n\t\t\titem.linetext = (const char*) sqlite3_column_text(stmt, 2);\n\t\t\titem.fileid   =               sqlite3_column_int (stmt, 3);\n\t\t\titem.filename = extract_filename(fp.C_STR());\n\t\t\tif (isAbsolutePath(fp) == false)\n\t\t\t{\n\t\t\t\titem.filepath = m_basepath;\n\t\t\t\titem.filepath += DIRSEP;\n\t\t\t\titem.filepath += fp;\n\t\t\t}\n\t\t\telse item.filepath = fp;\n\t\t\tresult.resultlist.push_back(item);\n\t\t}\n\t} while (rc == SQLITE_ROW);\n\tif (rc != SQLITE_DONE)\n\t{\n\t\tresult.result_type = sqlqueryresultlist::sqlresultERROR;\n\t\tresult.sqlerrmsg = sqlite3_errmsg(m_db);\n\t}\n\telse\n\t{\n\t\tresult.result_type = sqlqueryresultlist::sqlresultFILE_LINE;\n\t}\n\treturn result;\n}\n\nsqlqueryresultlist sqlquery::search_file_only(sqlite3_stmt* stmt)\n{\n\tint rc;\n\tsqlqueryresultlist result;\n\ttStr fp;\n\tresult.result_type = sqlqueryresultlist::sqlresultERROR;\n\tsqlqueryresult item;\n\tdo\n\t{\n\t\trc = sqlite3_step(stmt);\n\t\tif (rc == SQLITE_ROW)\n\t\t{\n\t\t\tfp            = (const char*) sqlite3_column_text(stmt, 0);\n\t\t\titem.linenum  = \"1\";\n\t\t\titem.filename = extract_filename(fp.C_STR());\n\t\t\titem.fileid   = sqlite3_column_int (stmt, 1);\n\t\t\tif (isAbsolutePath(fp) == false)\n\t\t\t{\n\t\t\t\titem.filepath = m_basepath;\n\t\t\t\titem.filepath += DIRSEP;\n\t\t\t\titem.filepath += fp;\n\t\t\t}\n\t\t\telse item.filepath = fp;\n\t\t\tresult.resultlist.push_back(item);\n\t\t}\n\t} while (rc == SQLITE_ROW);\n\tif (rc != SQLITE_DONE)\n\t{\n\t\tresult.result_type = sqlqueryresultlist::sqlresultERROR;\n\t\tresult.sqlerrmsg = sqlite3_errmsg(m_db);\n\t}\n\telse\n\t{\n\t\tresult.result_type = sqlqueryresultlist::sqlresultFILE_ONLY;\n\t}\n\treturn result;\n}\n\nsqlqueryresultlist sqlquery::search_filepath_only(sqlite3_stmt* stmt)\n{\n\tint rc;\n\tsqlqueryresultlist result;\n\ttStr fp;\n\tresult.result_type = sqlqueryresultlist::sqlresultERROR;\n\tsqlqueryresult item;\n\tdo\n\t{\n\t\trc = sqlite3_step(stmt);\n\t\tif (rc == SQLITE_ROW)\n\t\t{\n\t\t\tfp            = (const char*) sqlite3_column_text(stmt, 0);\n\t\t\titem.linenum  = \"1\";\n\t\t\titem.filename = fp;\n\t\t\titem.fileid   = sqlite3_column_int (stmt, 1);\n\t\t\tif (isAbsolutePath(fp) == false)\n\t\t\t{\n\t\t\t\titem.filepath = m_basepath;\n\t\t\t\titem.filepath += DIRSEP;\n\t\t\t\titem.filepath += fp;\n\t\t\t}\n\t\t\telse item.filepath = fp;\n\t\t\tresult.resultlist.push_back(item);\n\t\t}\n\t} while (rc == SQLITE_ROW);\n\tif (rc != SQLITE_DONE)\n\t{\n\t\tresult.result_type = sqlqueryresultlist::sqlresultERROR;\n\t\tresult.sqlerrmsg = sqlite3_errmsg(m_db);\n\t}\n\telse\n\t{\n\t\tresult.result_type = sqlqueryresultlist::sqlresultFILE_ONLY;\n\t}\n\treturn result;\n}\n\nbool sqlquery::search_funcgraph(tStr searchstr, bool exactmatch, tVecStr& xmlout, tVecStr& dotout, int levels, tStr* errstr)\n{\n\tunsigned int i, j;\n\tsqlqueryresultlist result1, result2, result;\n\ttStr xmltext = \"<graph>\";\n\ttStr dottext = \"digraph graphname {\\n\";\n\tunsigned int nodenum = 1, subrootnum;\n\n\tresult1 = search(searchstr, sqlresultCALLINGFUNC, exactmatch);\n\tresult2 = search(searchstr, sqlresultCALLEDFUNC, exactmatch);\n\tif (result1.result_type == sqlqueryresultlist::sqlresultERROR)\n\t{\n\t\tif (errstr) *errstr = result1.sqlerrmsg;\n\t\treturn false;\n\t}\n\telse if (result2.result_type == sqlqueryresultlist::sqlresultERROR)\n\t{\n\t\tif (errstr) *errstr = result2.sqlerrmsg;\n\t\treturn false;\n\t}\n\n\tunique_symnames(result1);\n\tunique_symnames(result2);\n\n\txmltext += string_format(tStr(\"<node fill=\\\"#e2ffff\\\" id=\\\"%d\\\" label=\\\"%s\\\"/>\"), nodenum, searchstr.C_STR());\n\tdottext += string_format(tStr(\"node%d [label=\\\"%s\\\" style=filled fillcolor=\\\"#e2ffff\\\" shape=\\\"box\\\" ];\\n\"), nodenum, searchstr.C_STR());\n\n\tnodenum++;\n\n\tfor (i=0; i < result1.resultlist.size(); i++)\n\t{\n\t\txmltext += string_format(tStr(\"<node fill=\\\"#ffffff\\\" id=\\\"%d\\\" label=\\\"%s\\\"/>\"), nodenum, result1.resultlist[i].symname.C_STR());\n\t\txmltext += string_format(tStr(\"<edge target=\\\"1\\\" source=\\\"%d\\\"/>\"), nodenum);\n\t\tdottext += string_format(tStr(\"node%d [label=\\\"%s\\\" style=filled fillcolor=\\\"#ffffff\\\" shape=\\\"box\\\" ];\\n\"),\n\t\t\tnodenum, result1.resultlist[i].symname.C_STR());\n\t\tdottext += string_format(tStr(\"node%d -> node1;\\n\"), nodenum);\n\t\tsubrootnum = nodenum;\n\t\tnodenum++;\n\t\tif (levels == 2)\n\t\t{\n\t\t\tresult = search(result1.resultlist[i].symname.C_STR(), sqlresultCALLINGFUNC, exactmatch);\n\t\t\tfor (j=0; j < result.resultlist.size(); j++)\n\t\t\t{\n\t\t\t\txmltext += string_format(tStr(\"<node fill=\\\"#ffffff\\\" id=\\\"%d\\\" label=\\\"%s\\\"/>\"),\n\t\t\t\t\tnodenum, result.resultlist[j].symname.C_STR());\n\t\t\t\txmltext += string_format(tStr(\"<edge target=\\\"%d\\\" source=\\\"%d\\\"/>\"), subrootnum, nodenum);\n\t\t\t\tdottext += string_format(tStr(\"node%d [label=\\\"%s\\\" style=filled fillcolor=\\\"#ffffff\\\" shape=\\\"box\\\" ];\\n\"),\n\t\t\t\t\tnodenum, result.resultlist[j].symname.C_STR());\n\t\t\t\tdottext += string_format(tStr(\"node%d -> node%d;\\n\"), nodenum, subrootnum);\n\t\t\t\tnodenum++;\n\t\t\t}\n\t\t}\n\t}\n\tfor (i=0; i < result2.resultlist.size(); i++)\n\t{\n\t\txmltext += string_format(tStr(\"<node fill=\\\"#ffffff\\\" id=\\\"%d\\\" label=\\\"%s\\\"/>\"),\n\t\t\tnodenum, result2.resultlist[i].symname.C_STR());\n\t\txmltext += string_format(tStr(\"<edge target=\\\"%d\\\" source=\\\"1\\\"/>\"), nodenum);\n\t\tdottext += string_format(tStr(\"node%d [label=\\\"%s\\\" style=filled fillcolor=\\\"#ffffff\\\" shape=\\\"box\\\" ];\\n\"),\n\t\t\tnodenum, result2.resultlist[i].symname.C_STR());\n\t\tdottext += string_format(tStr(\"node1 -> node%d;\\n\"), nodenum);\n\t\tsubrootnum = nodenum;\n\t\tnodenum++;\n\t\tif (levels == 2)\n\t\t{\n\t\t\tresult = search(result2.resultlist[i].symname.C_STR(), sqlresultCALLEDFUNC, exactmatch);\n\t\t\tfor (j=0; j < result.resultlist.size(); j++)\n\t\t\t{\n\t\t\t\txmltext += string_format(tStr(\"<node fill=\\\"#ffffff\\\" id=\\\"%d\\\" label=\\\"%s\\\"/>\"),\n\t\t\t\t\tnodenum, result.resultlist[j].symname.C_STR());\n\t\t\t\txmltext += string_format(tStr(\"<edge target=\\\"%d\\\" source=\\\"%d\\\"/>\"), nodenum, subrootnum);\n\t\t\t\tdottext += string_format(tStr(\"node%d [label=\\\"%s\\\" style=filled fillcolor=\\\"#ffffff\\\" shape=\\\"box\\\" ];\\n\"),\n\t\t\t\t\tnodenum, result.resultlist[j].symname.C_STR());\n\t\t\t\tdottext += string_format(tStr(\"node%d -> node%d;\\n\"), subrootnum, nodenum);\n\t\t\t\tnodenum++;\n\t\t\t}\n\t\t}\n\t}\n\txmltext += \"</graph>\";\n\tdottext += \"}\\n\";\n\txmlout.push_back(xmltext);\n\tdotout.push_back(dottext);\n\treturn true;\n}\n\nbool sqlquery::search_classinheritgraph(tStr searchstr, bool exactmatch, tVecStr& xmlout, tVecStr& dotout, tStr* errstr)\n{\n\n\tsqlqueryresultlist result_children, result_parent1, result_cousins1, result_parent2;\n\ttStr xmltext = \"<graph>\";\n\ttStr dottext = \"digraph graphname {\\n\";\n\tint nodenum = 1;\n\tint parent1 = 0;\n\n\txmltext += string_format(tStr(\"<node fill=\\\"#e2ffff\\\" id=\\\"%d\\\" label=\\\"%s\\\"/>\"), nodenum, searchstr.C_STR());\n\tdottext += string_format(tStr(\"node%d [label=\\\"%s\\\" style=filled fillcolor=\\\"#e2ffff\\\" shape=\\\"box\\\" ];\\n\"), nodenum, searchstr.C_STR());\n\tnodenum++;\n\n\tresult_children = search(searchstr, sqlresultCHILDCLASS, exactmatch);\n\tif (result_children.result_type == sqlqueryresultlist::sqlresultERROR)\n\t{\n\t\tif (errstr) *errstr = result_children.sqlerrmsg;\n\t\treturn false;\n\t}\n\tresult_parent1 = search(searchstr, sqlresultPARENTCLASS, exactmatch);\n\tif (result_parent1.result_type == sqlqueryresultlist::sqlresultERROR)\n\t{\n\t\tif (errstr) *errstr = result_parent1.sqlerrmsg;\n\t\treturn false;\n\t}\n\tif (result_parent1.resultlist.size() > 0)\n\t{\n\t\tresult_parent2 = search(result_parent1.resultlist[0].symname, sqlresultPARENTCLASS, exactmatch);\n\t\tif (result_parent2.result_type == sqlqueryresultlist::sqlresultERROR)\n\t\t{\n\t\t\tif (errstr) *errstr = result_parent2.sqlerrmsg;\n\t\t\treturn false;\n\t\t}\n\t\tresult_cousins1 = search(result_parent1.resultlist[0].symname, sqlresultCHILDCLASS, exactmatch);\n\t\tif (result_cousins1.result_type == sqlqueryresultlist::sqlresultERROR)\n\t\t{\n\t\t\tif (errstr) *errstr = result_cousins1.sqlerrmsg;\n\t\t\treturn false;\n\t\t}\n\t}\n\tunique_symnames(result_children);\n\tunique_symnames(result_parent1);\n\tunique_symnames(result_parent2);\n\tunique_symnames(result_cousins1);\n\tremove_symname(result_cousins1, searchstr); // I am not my own cousin\n\tfor (unsigned int i=0; i < result_children.resultlist.size(); i++)\n\t{\n\t\txmltext += string_format(tStr(\"<node fill=\\\"#ffffff\\\" id=\\\"%d\\\" label=\\\"%s\\\"/>\"),\n\t\t\tnodenum, result_children.resultlist[i].symname.C_STR());\n\t\txmltext += string_format(tStr(\"<edge target=\\\"1\\\" source=\\\"%d\\\"/>\"), nodenum);\n\t\tdottext += string_format(tStr(\"node%d [label=\\\"%s\\\" style=filled fillcolor=\\\"#ffffff\\\" shape=\\\"box\\\" ];\\n\"),\n\t\t\tnodenum, result_children.resultlist[i].symname.C_STR());\n\t\tdottext += string_format(tStr(\"node%d -> node1 [arrowhead=\\\"empty\\\"];\\n\"), nodenum);\n\t\tnodenum++;\n\t}\n\tfor (unsigned int i=0; i < result_parent1.resultlist.size(); i++)\n\t{\n\t\txmltext += string_format(tStr(\"<node fill=\\\"#ffffff\\\" id=\\\"%d\\\" label=\\\"%s\\\"/>\"),\n\t\t\tnodenum, result_parent1.resultlist[i].symname.C_STR());\n\t\txmltext += string_format(tStr(\"<edge target=\\\"%d\\\" source=\\\"1\\\"/>\"), nodenum);\n\t\tdottext += string_format(tStr(\"node%d [label=\\\"%s\\\" style=filled fillcolor=\\\"#ffffff\\\" shape=\\\"box\\\" ];\\n\"),\n\t\t\tnodenum, result_parent1.resultlist[i].symname.C_STR());\n\t\tdottext += string_format(tStr(\"node1 -> node%d [arrowhead=\\\"empty\\\"];\\n\"), nodenum);\n\t\tif (i == 0) parent1 = nodenum;\n\t\tnodenum++;\n\t}\n\tfor (unsigned int i=0; i < result_parent2.resultlist.size(); i++)\n\t{\n\t\txmltext += string_format(tStr(\"<node fill=\\\"#ffffff\\\" id=\\\"%d\\\" label=\\\"%s\\\"/>\"),\n\t\t\tnodenum, result_parent2.resultlist[i].symname.C_STR());\n\t\txmltext += string_format(tStr(\"<edge target=\\\"%d\\\" source=\\\"%d\\\"/>\"), nodenum, parent1);\n\t\tdottext += string_format(tStr(\"node%d [label=\\\"%s\\\" style=filled fillcolor=\\\"#ffffff\\\" shape=\\\"box\\\" ];\\n\"),\n\t\t\tnodenum, result_parent2.resultlist[i].symname.C_STR());\n\t\tdottext += string_format(tStr(\"node%d -> node%d [arrowhead=\\\"empty\\\"];\\n\"), parent1, nodenum);\n\t\tnodenum++;\n\t}\n\tfor (unsigned int i=0; i < result_cousins1.resultlist.size(); i++)\n\t{\n\t\txmltext += string_format(tStr(\"<node fill=\\\"#ffffff\\\" id=\\\"%d\\\" label=\\\"%s\\\"/>\"),\n\t\t\tnodenum, result_cousins1.resultlist[i].symname.C_STR());\n\t\txmltext += string_format(tStr(\"<edge target=\\\"%d\\\" source=\\\"%d\\\"/>\"), parent1, nodenum);\n\t\tdottext += string_format(tStr(\"node%d [label=\\\"%s\\\" style=filled fillcolor=\\\"#ffffff\\\" shape=\\\"box\\\" ];\\n\"),\n\t\t\tnodenum, result_cousins1.resultlist[i].symname.C_STR());\n\t\tdottext += string_format(tStr(\"node%d -> node%d [arrowhead=\\\"empty\\\"];\\n\"), nodenum, parent1);\n\t\tnodenum++;\n\t}\n\txmltext += \"</graph>\";\n\tdottext += \"}\\n\";\n\txmlout.push_back(xmltext);\n\tdotout.push_back(dottext);\n\treturn true;\n}\n\n// make the list of symnames unique, no elements repeated\nvoid sqlquery::unique_symnames(sqlqueryresultlist& res)\n{\n\ttSetStr setstr;\n\tsqlqueryresultlist out;\n\tsqlqueryresult item;\n\tfor(unsigned int i=0; i < res.resultlist.size(); i++)\n\t{\n\t\tsetstr.insert(res.resultlist[i].symname);\n\t}\n\tfor (auto it = setstr.begin(); it != setstr.end(); it++)\n\t{\n\t\titem.symname = *it;\n\t\tout.resultlist.push_back(item);\n\t}\n\tres = out;\n}\n\n// remove a symname from the list\nvoid sqlquery::remove_symname(sqlqueryresultlist& res, tStr name)\n{\n\tfor (auto it = res.resultlist.begin(); it != res.resultlist.end(); it++)\n\t{\n\t\tif (it->symname.compare(name) == 0)\n\t\t{\n\t\t\tres.resultlist.erase(it);\n\t\t\tbreak;\n\t\t}\n\t}\n}\n\n\n"
  },
  {
    "path": "querylib/sqlquery.h",
    "content": "\n// Library to query CodeQuery database files\n//\n// This library is MIT-licensed, so that it may be used to create plugins\n// for editors, IDEs and other software without license restrictions\n//\n// This license applies only to this file:\n//\n// Copyright (c) 2011 ruben2020 https://github.com/ruben2020/\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n// IN THE SOFTWARE.\n//\n\n\n#ifndef SQLQUERY_H_CQ\n#define SQLQUERY_H_CQ\n\n#include \"small_lib.h\"\n\n// forward declaration\nstruct sqlite3;\nstruct sqlite3_stmt;\n\nclass tempstmt\n{\npublic:\nsqlite3_stmt *m_stmt;\ntStr qry;\ntempstmt();\n~tempstmt();\nvoid finalize(void);\nsqlite3_stmt* get(void);\n};\n\nclass sqlqueryresult\n{\npublic:\n\ttStr symname;\n\ttStr symname2;\n\ttStr symtype;\n\ttStr linenum;\n\tunsigned int intLinenum;\n\ttStr filename;\n\ttStr filepath;\n\tint fileid;\n\ttStr linetext;\n\tsqlqueryresult() : linenum((const char*)\"1\"), fileid(-99), intLinenum(0){}\n};\n\nclass sqlqueryresultlist\n{\npublic:\nenum en_resultType\n\t{\n\t\tsqlresultFULL = 0,\n\t\tsqlresultFILE_LINE,\n\t\tsqlresultFILE_ONLY,\n\t\tsqlresultSYM_ONLY,\n\t\tsqlresultFUNC_IN_ONE_FILE,\n\t\tsqlresultERROR\n\t};\n\ten_resultType result_type;\n\tstd::vector<sqlqueryresult> resultlist;\n\tsqlqueryresultlist();\n\tsqlqueryresultlist(const sqlqueryresultlist& copy);\n\tsqlqueryresultlist& operator= (const sqlqueryresultlist& copy);\n\tvoid sort_by_name(void);\n\tvoid sort_by_linenum(void);\n\ttStr sqlerrmsg;\n};\n\n\nclass sqlquery\n{\npublic:\nenum en_queryType\n\t{\n\t\tsqlquerySYMBOL = 0,\n\t\tsqlresultFUNC_MACRO,\n\t\tsqlresultCLASS_STRUCT,\n\t\tsqlresultINCLUDE,\n\t\tsqlresultFILESLIST,\n\t\tsqlresultCALLINGFUNC,\n\t\tsqlresultCALLEDFUNC,\n\t\tsqlresultCALLSOFFUNC,\n\t\tsqlresultMEMBERS,\n\t\tsqlresultOWNERCLASS,\n\t\tsqlresultCHILDCLASS,\n\t\tsqlresultPARENTCLASS,\n\t\tsqlresultFUNCSINFILE,\n\t\tsqlresultGREP,\n\t\tsqlresultAUTOCOMPLETE,\n\t\tsqlresultFILEPATH,\n\t\tsqlresultDEFAULT = 100\n\t};\nenum en_filereadstatus\n\t{\n\t\tsqlfileOK = 0,\n\t\tsqlfileOPENERROR,\n\t\tsqlfileNOTCORRECTDB,\n\t\tsqlfileINCORRECTVER,\n\t\tsqlfileUNKNOWNERROR\n\t};\t\n\tsqlquery();\n\t~sqlquery();\n\tbool isDBOpen(void) {return (m_db != NULL);}\n\ten_filereadstatus open_dbfile(tStr dbfn);\n\tvoid close_dbfile(void);\n\tsqlqueryresultlist search(tStr searchstr,\n\t\t\t\ten_queryType querytype = sqlquerySYMBOL,\n\t\t\t\tbool exactmatch=false,\n\t\t\t\ttStr filterstr = \"\");\n\tsqlqueryresultlist search_funclist_filename(const char* searchstr);\n\tsqlqueryresultlist search_funclist_fileid(int& fileid);\n\ttVecStr search_autocomplete(const char* searchstr);\n\tsqlqueryresultlist search_declaration(const char* searchstr);\n\tbool search_funcgraph(tStr searchstr, bool exactmatch, tVecStr& xmlout, tVecStr& dotout, int levels = 1, tStr* errstr = nullptr);\n\tbool search_classinheritgraph(tStr searchstr, bool exactmatch, tVecStr& xmlout, tVecStr& dotout, tStr* errstr = nullptr);\n\nprivate:\n\tsqlite3 *m_db;\n\ttStr m_basepath;\n\ttempstmt m_declarationstmt;\n\ttempstmt m_autocompstmt;\n\ttempstmt m_funclistfilenamestmt;\n\ttempstmt m_funclistfileidstmt;\n\ttempstmt m_searchstmt;\n\tsqlqueryresultlist search_full(sqlite3_stmt* stmt);\n\tsqlqueryresultlist search_file_line(sqlite3_stmt* stmt);\n\tsqlqueryresultlist search_file_only(sqlite3_stmt* stmt);\n\tsqlqueryresultlist search_filepath_only(sqlite3_stmt* stmt);\n\tsqlqueryresultlist search_func_in_one_file(sqlite3_stmt* stmt);\n\ttStr read_configtbl(const char *key, sqlite3_stmt *stmt);\n\ttStr process_searchterm(const char* searchterm, const bool& exactmatch);\n\ttStr process_searchterm_autocomplete(const char* searchstr);\n\tvoid unique_symnames(sqlqueryresultlist& res);\n\tvoid remove_symname(sqlqueryresultlist& res, tStr name);\n};\n\n#endif\n\n"
  },
  {
    "path": "release.json",
    "content": "{\n    \"version\": \"1.0.1\",\n    \"state\": \"stable\",\n    \"scope\": \"minor feature\",\n    \"changes\": \"minor code changes\",\n    \"download\": \"https://sourceforge.net/projects/codequery/files/\"\n}\n\n"
  },
  {
    "path": "scintilla/.editorconfig",
    "content": "root = true\r\n\r\n[**]\r\nindent_style = tab\r\n"
  },
  {
    "path": "scintilla/.hg_archival.txt",
    "content": "repo: bdf8c3ef2fb01ea24578e726337888e706d10b92\nnode: 460ca6454f7f7f682198e2779f5c69fe577add25\nbranch: default\nlatesttag: rel-5-5-0\nlatesttagdistance: 1\nchangessincelatesttag: 1\n"
  },
  {
    "path": "scintilla/.hgeol",
    "content": "[patterns]\n**.cxx = native\n**.cpp = native\n**.c = native\n**.h = native\n**.m = native\n**.mm = native\n**.iface = native\n**.template = native\n**.mk = native\n**.py = native\n**.rc = native\n**.html = native\n**.bat = native\n**.mak = native\n**.def = native\n**.manifest = native\n**.properties = native\n**.styled = native\n**.asp = native\n**.php = native\n**.vb = native\n**.d = native\n**.lua = native\n**.nim = native\n**.pl = native\n**.p6 = native\n**.rb = native\n**.tcl = native\n**.err = native\n**.mms = native\n**.tex = native\n**.txt = native\n**.pch = native\n**.hgeol = native\n**.dsp = native\n**.sln = native\n**.vcproj = native\n**.pro = native\n**.gen = native\n**makefile = native\nREADME = native\n**.bmp = BIN\n**.cur = BIN\n**.ico = BIN\n**.jpg = BIN\n**.png = BIN\ntgzsrc = LF\n"
  },
  {
    "path": "scintilla/.hgignore",
    "content": "syntax: glob\n*.o\n*.a\n*.asm\n*.lib\n*.obj\n*.iobj\n__pycache__\n*.pyc\n*.dll\n*.so\n*.dylib\n*.framework\n*.pyd\n*.exe\n*.exp\n*.lib\n*.pdb\n*.ipdb\n*.res\n*.bak\n*.sbr\n*.suo\n*.aps\n*.sln\n*.vcxproj.*\n*.idb\n*.bsc\n*.intermediate.manifest\n*.lastbuildstate\n*.cache\n*.ilk\n*.ncb\n*.tlog\n*.sdf\ngtk/*.plist\nwin32/*.plist\n*.opt\n*.plg\n*.pbxbtree\n*.mode1v3\n*.pbxuser\n*.pbproj\n*.tgz\n*.log\n*.xcbkptlist\n*.xcuserstate\nxcuserdata/\n*.xcsettings\nxcschememanagement.plist\n.DS_Store\nRelease\nDebug\nx64\nARM64\ncocoa/build\ncocoa/ScintillaFramework/build\ncocoa/ScintillaTest/build\nmacosx/SciTest/build\n*.cppcheck\nMakefile.Debug\nMakefile.Release\n*_resource.rc\nmoc_*\n*.pro.user\n.qmake.stash\nScintillaEdit.cpp\nScintillaEdit.h\nScintillaConstants.py\nScintillaEditBase.intermediate.manifest\nScintillaEdit.intermediate.manifest\nqt/*/Makefile\ncov-int\n.vs\nmeson-private\nmeson-logs\nbuild.ninja\n.ninja*\ncompile_commands.json\n.vscode\nVTune Profiler Results\n"
  },
  {
    "path": "scintilla/.hgtags",
    "content": "01f406ccdce315e9870c44036e18ebf0fa74df22 rel-1-64\n038d4e745187fddd764fda49b12b878ece14c0bd rel-1-63\n03dff61592cf2abbabd9e383f1c8417af3e9d87b rel-1-34\n11a62bd24819d0044dcf4b8621f79924cab781bd rel-1-56\n1804bf43c2443fb8db7468a36e8022891dfc32c5 rel-1-73\n1c4055eaf77fb0e2730adcba2b04a9c40318bdf1 rel-1-74\n2abff14b87854b56df577a96d6d87e06bbb44251 rel-1-27\n3a80173ef6320433ac4ab05ff97774f186d878ba rel-1-75\n4107ec8a3a14b68b832dd12ce568d6517da063f1 rel-2-03\n4479fb32e7238069d4ed81d7e586b6bcbc2a94ce rel-1-39\n4af05ea4430505d34c9832313c1e5aaac7a54237 rel-1-61\n4b0ff01c39b7b9c7aa65d1965bd49daaffe05ea8 rel-1-40\n4ec090359e447b59d24c3e970fc9faede13ec187 rel-1-45\n4f3e52891003743da45d4464020f59849240d278 rel-1-37\n4f77dabcfbab1de33dc2ef89029a4536a1c6c697 rel-1-25\n4ff6778c456258929c6f9074bdc03d90c28968bf rel-2-00\n58c51367e4127167fe7be54681b788618732d65b rel-1-51\n668816d0fd5d75dee228bca98b183969c4b1de53 rel-1-52\n67a79ce06212780dc0592bbcf3a3172244cf18c8 rel-1-76\n67aaa980e972a75e9aa11e1fbfe66b4b9c1d78fe rel-1-48\n6a3e91c35d19e241621c10b2a37c6233e33c1c0a rel-1-66\n6a3e91c35d19e241621c10b2a37c6233e33c1c0a rel-1-66-carbon\n6aa816d746280a68821eb90efad0fb5f2d3b751e rel-1-35\n6b44857e410f45ad5c9e9b48a481fb902c20a2dc rel-1-26\n6b9c7f104c6160507212e5412ba79ecffc6f9057 initial\n7681410bf25abb8fa8f51552fd61ec83bdf1a8b0 rel-1-65\n7c87fe602c2c1fd973eb89675813192723f7f368 rel-1-30\n85fbbc9b421bdc97a34bead08cdd34cf4c6271f3 rel-1-58\n86d8875ed69c96026e9ec4b77fff3f9d369bfcb6 rel-1-60\n87f60a6fb558871ef85a781e5d03321f77e1d11a rel-1-38\n89b230d9f013855747841b3b3bc8b229259e0c81 rel-1-79\n8af30946bc0ad1196ddf51b51545929cab3fa2e6 rel-1-69\n8c2d64c399e5d823e2b2ef547a260357be0428c0 rel-1-54\n8d11fc4c543f6228d73fa385ec9fca5723f8c832 rel-2-11\n94801bf860900c9dde428db66c5e01a63e521c05 rel-1-44\n988c66dff88ed44913d8d6303f7e136c19f5d6ea rel-2-02\n9d268dfb34560f2aeb817148ca746814fd85115d rel-1-46\n9e813ff6f15778dd6c6d2f6ab20f9aa8e91b2e47 rel-1-47\n9eda4d6efdd657f2ce8ad1034bdd20998f573a40 rel-1-49\na313740fe8b8ee9df5cfc6f4bae7c665d160f4dd rel-1-78\na5905b21afdbee56912e039eeb2e2f7fdcf155df rel-1-42\nade751c9a7e7945e48428e32cdf41d6f7d189f08 rel-1-62\nae7bd57a9dcedb67467a4b43a27bdf802479bc9e rel-1-33\naf2def618260df6bde2fdb3fd1f22ad532b18270 rel-1-77\nb618c255982d76d4d554c456888cd705b1a52d33 rel-1-68\nb6b5e68dd21fa2f5015e1b45f5b1880aa1c9ecef rel-1-55\nbd0f312842328a1118c43ebd54899916f1009b86 rel-1-57\nc019d05d7131f21ccf7abedb979ca29f2ff5fe32 rel-1-71\nc2c0575d28f000d925d4c0ec689df9b1e572af2d rel-1-43\nc6733869c489c4e39aeb84ffe5d28378e9fb121d rel-1-31\ncc4d999c38f16be78e8ba54749bd4e3711b66882 rel-1-41\nd125f70deea4580ead7cb72814bdb17ad9c16258 rel-1-36\nd2316766e67ea2a10effe85e6e27ea7b520df409 rel-1-70\nd940969f5c6f78c252ac110884aa89014c7d1349 rel-2-10\ned67316cd7395abf840d8c9d10eb6a23f693d4fc rel-1-28\nee4e67b4a9fe76e85230216340dc7eff3978fbf8 rel-1-59\nf04248111a542b559402f0e08253b613d7dec849 rel-1-32\nf394f7465aa354dfdea57599f8c7d0e424313144 rel-1-53\nf4d4bb4d5fd70e9affe63460161cf2779f9dfdb3 rel-1-24\nf6af29ca9c6e9ffd457d9f6b9477d03f2d944f64 rel-1-67\nf99c7dfc2bffb16cd478633526b4cba883e266ab rel-2-12\nfd3e6bb269b1c38e003202dc5856cf120667ed88 rel-1-72\nfdf95390299493c05c0e11c3c2ef98293c552908 rel-1-50\nfe112bae056a00c5e0b7218dd3903b16e3d43d24 rel-1-23\nffde119d297ecdce968737c68f0e21410a0c36c4 rel-2-20\nbae0795bc8950108a5265dd3a1b231dbb1c0a92f rel-2-21\n91d53a344450102a73387dd591cecc4294574891 rel-2-22\n338e9c43eb8339b293aa5cb069aa84c60bbac6ba rel-2-23\n3a0d1edb7ae5478426346dab2219e10606238bd0 rel-2-24\n930e2f7d36165066fffd5cef6225c7774a2d7996 rel-2-25\n221dae018a0dd86d4adc91370dfc507ca078b452 rel-2-26\n02d0b25c22c3a4d672aca5fa37b3e5bffc30fa32 rel-2-27\n265b4ffceb4a356fd7917ce938051e8a206bac3e rel-2-28\n6f590a14726334be3256c55e8bab9119c71f3160 rel-2-29\n7a59b936e02452b66dff32264e5bc72c038ade19 rel-3-0-0\nad485b918c5a81dbf591eab1916afa3d600b0639 rel-3-0-1\n16f620503ab2e3ae463e39c36f897385fd73b9d1 rel-3-0-2\nd147d5b894708a5c7d3e7b81513fe02f0075e62c rel-3-0-3\n2faf55888eeb76e40d5b286cd45f4f40c331b1c2 rel-3-0-4\na9219577729080874f5f46e0a634d5d117cc2eed rel-3-1-0\nae4d2f897a8fd92294f61d4d56e90e7700a912df rel-3-2-0\n41bdec833d4a9bb108bd3e4890371b22d1132f1a rel-3-2-1\n183c117293e78c4264dca7afac9f66cb5d585ddc rel-3-2-2\n7d54d6d61ace06828cb0850b53a8008672d67f33 rel-3-2-3\n1092d3d2495955cfe1a227e360e14d5358b5136f rel-3-2-4\n74f6ed8c5737db179f791d6fe6cab2dc119f65fb rel-3-2-5\n04c9afc26342f4c1b9492c4b27efb33585d6a56d rel-3-3-0\n5f9c0934513bf8d9dfe64127ad19cb95800415e9 scitex-3-3-0\nd2022a5e4948379ab0aa89b510b850209d6cbb01 rel-3-3-1\nd887fce163757c50ec95ed204d50b02675db830c rel-3-3-2\n1cd0ebd585926933259e776ac380ef17a20e2d5d rel-3-3-3\ne1c3afb1c5d42c664558839b1d68ed4dcc50e5d1 rel-3-3-4\nc343e43079c4458fae69f82ff3b6569b7bba0821 rel-3-3-5\nda3cbb774e02f626fd9ee5446608f0f63665042a rel-3-3-6\n5693714a8b0b30e481ba4f089f2ecc93fc80c80d rel-3-3-7\n61cdae165698c4b904349094f596ae519c5be6a0 rel-3-3-8\nd086394244f486c3f628518db177c265d694b8e7 rel-3-3-9\neea0ac7e5c8ff58e3145ddbb8b271c51965780bf rel-3-4-0\ne73e34b23c598ab42e44e77141f6138555ed9d62 rel-3-4-1\na4286bbf7081a4eb570bc62a9e5f7beef51e83a1 rel-3-4-2\na3c10db89cc33783cf5a0c8d76d482bb1434af89 rel-3-4-3\n0df282b2c489231eb4fdc2cdaa6dfb7f6283a9c0 rel-3-4-4\na431f85e13c9499923b79d4890e8642604863a27 rel-3-5-0\n01c4696a39a913866f9852e06aff66d48ff39722 rel-3-5-1\na797ff255bdf2085f0475b9202527da6a16d507a rel-3-5-2\n8b21bf82adac0a3fe9923b7148d183b7a6792dde rel-3-5-3\n16ffc2a3ae1554d2c49513a44188224f8235f13c rel-3-5-4\n1916c3602692d06f410df15b100b55ee79ae46f9 rel-3-5-5\n1916c3602692d06f410df15b100b55ee79ae46f9 rel-3-5-5\n0000000000000000000000000000000000000000 rel-3-5-5\n0000000000000000000000000000000000000000 rel-3-5-5\ndea417bad80a9225d72b4f839ab04b1f7ffd936f rel-3-5-5\ne9bfc7a0cb83a972e8bfa5dbaa8aabd359549b57 rel-3-5-6\n49ce1d4c2dea737f1e4c92858921dd403a61cb20 rel-3-5-7\n87a4e0fa293ec1dc47d9d4d4288a139a5e240c6f rel-3-6-0\n59165fbb6b9d51efae82d13ce1c4471310b90bde rel-3-6-1\nd906ba5d62cbb79a3b25d29aa4dae3f3d1fdf22a rel-3-6-2\ne575024931f89fbc70e06d1faaf73a2e8721a2da rel-3-6-3\nd2d4928e3e6a3e79ed7dbfd949968d5fc9818424 rel-3-6-4\nafd67be6f0b141ba23be25ea1f472258bb4d976f rel-3-6-5\nbfdfb44eb77717778c7a3ac2c3726903e66c81b8 rel-3-6-6\nf9ff5b9b1a485d742fb7bfae14ba323a3f990663 rel-3-6-7\n13cdacbbe2515620b0f582c4c274b17cae06180c rel-3-7-0\na7dfda6c85859a9aa9f5c4ae43af005d3b7ce5fb rel-3-7-1\ne02540a3097449da69003d37c116c9b2104e3448 rel-3-7-2\ne99b1a2bfbf808a12ec988bcab2121b6c4cbb556 rel-3-7-3\n535c34f64993f3ef7367e773950e22a37d2475be rel-3-7-4\n535c34f64993f3ef7367e773950e22a37d2475be rel-3-7-4\n0000000000000000000000000000000000000000 rel-3-7-4\n0000000000000000000000000000000000000000 rel-3-7-4\nddcae5344fa5390b352c1075d01e95379e145b43 rel-3-7-4\n7c0d4e81e9388f87a648208b834f58516797be31 rel-3-7-5\nec8e68de4ddba09c062e427e774355a2f8c6e1c0 rel-4-0-0\nbd5c44cb0ab8518410475a9c0f48935e1b9f6c11 rel-4-0-1\n96becb885ce4f0e9c95286128713d503bf2644fd rel-4-0-2\n1bf8b7c5099584e8a267a96f1a361e59a48f62b7 rel-4-0-3\nd48bdae67b339304c76435aa4ba4d6fe9176848a rel-4-0-4\nb9ab83221b03910ae4c6871bf61cf3b138abae2c rel-4-0-5\n0dc20d87a4f93ea3d51469c7f0ae5afe136b8473 rel-4-1-0\n892c361b3969dcd7919db73dea54c40793218288 rel-4-1-1\n892c361b3969dcd7919db73dea54c40793218288 rel-4-1-1\n0000000000000000000000000000000000000000 rel-4-1-1\n0000000000000000000000000000000000000000 rel-4-1-1\nfcf47c3528327f7c29332bee7b06478e130b4c45 rel-4-1-1\n927e7d62e9177d09711bf9dce41f28842bbbdc5c rel-4-1-2\n1484a537b3803312278ace83c334b34178be3f76 rel-4-1-3\ncd35899fef5ea18e099c61577daf1133cd21bed4 rel-4-1-4\ncd35899fef5ea18e099c61577daf1133cd21bed4 rel-4-1-4\n45a4a9d10821af1f925727ed4c5725888752d233 rel-4-1-4\n72074cd809c599d30230126b9f07ec2ee752a4d8 rel-4-1-5\n72074cd809c599d30230126b9f07ec2ee752a4d8 rel-4-1-5\n0000000000000000000000000000000000000000 rel-4-1-5\n0000000000000000000000000000000000000000 rel-4-1-5\n6a6bf370ae9ff7771331e1cc2cc1a1adf5bc9e00 rel-4-1-5\n6ccb029fd955cc69c186acd5b3e677e01f4590e3 rel-4-1-6\n8fdc0159b0df23b8b1d5abc31c80b757aa206a44 rel-4-1-7\n70fe3bd38a3d8567acdb57a7d554f3c78aea6315 rel-4-2-0\n4f8c3b19095af4f0d333f1b6aa1ff1e3a69d9f4c rel-4-2-1\n1b8ce5991cb9e5c27fe2701e6d61c35e697e7207 rel-4-2-2\n01a9cbbef0f001bc38bead54c9e993e1f35c3977 rel-4-2-3\n7137777f9be8bbdd6eacf3b17b6778eb2e7fa4fe rel-4-3-0\n32e2c934bcc6d09c711958eab8e924851fd82bd3 rel-4-3-1\nc4e53c985ef6fdf0c4ef660a8c39d8976c42a921 rel-4-3-2\n4c6aee014e729256c92dc836a661c73eae0fc79a rel-4-3-3\n12e2a7acacecd22d7ec4b0d18f99452f77f7b5b0 rel-4-4-0\n41a534b0add8069329e3ccaf6d933fbfaf0078e5 rel-4-4-2\ne454eae1f1eb65e6a9676696540358cbcad47b25 rel-4-4-3\nf422793aa52f30e0ff6c9a9261303ce2b97be30b rel-4-4-4\n71b428eed36a7f52a07cbcbd31979c2340f8d925 rel-4-4-5\n64a5230d30ba2385450a3323d4e79b05ce261096 rel-4-4-6\n64a5230d30ba2385450a3323d4e79b05ce261096 rel-4-4-6\n0000000000000000000000000000000000000000 rel-4-4-6\n0000000000000000000000000000000000000000 rel-4-4-6\n1b54292f459098031062d16af79f0eef4e785cd0 rel-4-4-6\n70561ad12a873e641720cb8a60286a49b1a7c951 start-5\n8c2f906208a2f6de5b8d07e4a5e0033ac639a1f6 rel-5-0-0\n6b462b5bd706461acfd6b81c4484794710dd0299 start-platform-changes\n91a02e4309053a9fb6d05a3d1586d7217168ae95 rel-5-0-1\n91a02e4309053a9fb6d05a3d1586d7217168ae95 rel-5-0-1\n52d56f79dc0f38a401457d81ff61a5006142ba65 rel-5-0-1\n5b51130729ea2c0971d3d6ce608c08a64a44f8d1 rel-5-0-2\ne4a0d6eb9c84702e9e9ca6a79d079412a7e6d173 rel-5-0-3\nb152bb68c5843e368e217809fba5dd1b122367ce rel-5-1-0\n8075a4c6e184836186f0bc997dfa5d57d475bd20 rel-5-1-1\nb45f5b5ee3e3b4de00e47093a478c83b931ac534 rel-5-1-2\nbeeb51d2c64560c6db7554c0e291a322eea5c3bd rel-5-1-3\nae7f6a2ad9ad485d58845248987262c3a6962d8b rel-5-1-4\nc9556e17e892216db2a5734903fc6dbe57110a0c rel-5-1-5\nb6b3e7f6ef41ce8b3efe3c22d96adfc854763a81 rel-5-2-0\nc37b11edab223903183f0471c3463507dc9669d8 rel-5-2-1\n2d3ce0c81e64818c79e560da1e1bf7185e650880 rel-5-2-2\n03d65839fa48877340bdac4b40a4aca467ef06a7 rel-5-2-3\n7dd0480eccaa12ea7f8e799005a748f4b3aa3669 rel-5-2-4\ndddfab2f1d052afc677cb6e693d1d859877e45b7 rel-5-3-0\n072c537a8b358e670e57744b3b17d41feab35370 rel-5-3-1\ncd20da25b81f68b300143828ab94887448dac385 rel-5-3-2\nda729553c76b8769b7400a381b1785cee50216a1 rel-5-3-3\n10f4ff8763bc0b2c862bc1732fe940472e07cc5a rel-5-3-4\n1c5360ebe7b0c824c535d0d10a788be573b3adc3 rel-5-3-5\n57bcb62d635cc6bd2ef8c295fc2a53c5d86a433f rel-5-3-6\n540baa6ea9e0a08eadf952e6d944d04fa74b5d5c rel-5-3-7\n540baa6ea9e0a08eadf952e6d944d04fa74b5d5c rel-5-3-7\n0000000000000000000000000000000000000000 rel-5-3-7\n0000000000000000000000000000000000000000 rel-5-3-7\ncc94762d429e3e2b1cd25c1e4337200ff4acb676 rel-5-3-7\n14acdf9e85ac028eea63e8504b5af42f3462ffd3 rel-5-3-8\nd5477c63f5f60a2869a1b46cafb1687c020701f9 rel-5-4-0\n07bf3219bad2334df18cbc1c5e778d2e694331dc rel-5-4-1\n741427d54cd52799a697ee93fc13e406fd5d7d48 rel-5-4-2\nc171b756efc76359f0795ca0a1bfb7eb16d4c04b rel-5-4-3\n3a219b13a5d88a9e1bfe6ff76c91a07e08e59003 rel-5-5-0\n"
  },
  {
    "path": "scintilla/CONTRIBUTING",
    "content": "Fixes should be posted to the Bug Tracker\r\nhttp://sourceforge.net/p/scintilla/bugs/\r\n\r\nFeatures should be posted to the Feature Request Tracker\r\nhttp://sourceforge.net/p/scintilla/feature-requests/\r\n\r\nEither send unified diffs (or patch files) or zip archives with whole files.\r\nMercurial patch files are best as they include author information and commit\r\nmessages.\r\n\r\nQuestions should go to the scintilla-interest mailing list\r\nhttps://groups.google.com/forum/#!forum/scintilla-interest\r\n\r\nCode should follow the guidelines at\r\nhttp://www.scintilla.org/SciCoding.html\r\n\r\nDo not use SourceForge's Merge Request mechanism or message sending\r\nfeature as no one is monitoring these.\r\nThe neilh @ scintilla.org account receives much spam and is only checked\r\noccasionally. Almost all Scintilla mail should go to the mailing list."
  },
  {
    "path": "scintilla/License.txt",
    "content": "License for Lexilla, Scintilla, and SciTE\r\n\r\nCopyright 1998-2021 by Neil Hodgson <neilh@scintilla.org>\r\n\r\nAll Rights Reserved\r\n\r\nPermission to use, copy, modify, and distribute this software and its\r\ndocumentation for any purpose and without fee is hereby granted,\r\nprovided that the above copyright notice appear in all copies and that\r\nboth that copyright notice and this permission notice appear in\r\nsupporting documentation.\r\n\r\nNEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS\r\nSOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS, IN NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY\r\nSPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\r\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,\r\nWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER\r\nTORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE\r\nOR PERFORMANCE OF THIS SOFTWARE."
  },
  {
    "path": "scintilla/README",
    "content": "README for building of Scintilla, Lexilla, and SciTE\r\n\r\nScintilla and Lexilla can be built by themselves.\r\nTo build SciTE, Scintilla and Lexilla should first be built.\r\n\r\nSee lexilla/README for information on building Lexilla.\r\n\r\n*** GTK+/Linux version ***\r\n\r\nYou must first have GTK+ 2.24 or later and GCC (7.1 or better) installed.\r\nClang may be used by adding CLANG=1 to the make command line.\r\nOther C++ compilers may work but may require tweaking the make file.\r\nEither GTK+ 2.x or 3.x may be used with 2.x the default and 3.x\r\nchosen with the make argument GTK3=1.\r\n\r\nTo build Scintilla, use the makefile located in the scintilla/gtk directory\r\n\tcd scintilla/gtk\r\n\tmake\r\n\tcd ../..\r\n\r\nTo build and install SciTE, use the makefile located in the scite/gtk directory\r\n\tcd scite/gtk\r\n\tmake\r\n\tsudo make install\r\n\r\nThis installs SciTE into $prefix/bin. The value of $prefix is determined from\r\nthe location of Gnome if it is installed. This is usually /usr if installed\r\nwith Linux or /usr/local if built from source. If Gnome is not installed\r\n/usr/bin is used as the prefix. The prefix can be overridden on the command\r\nline like \"make prefix=/opt\" but the same value should be used for both make\r\nand make install as this location is compiled into the executable. The global\r\nproperties file is installed at $prefix/share/scite/SciTEGlobal.properties.\r\nThe language specific properties files are also installed into this directory.\r\n\r\nTo remove SciTE\r\n\tsudo make uninstall\r\n\r\nTo clean the object files which may be needed to change $prefix\r\n\tmake clean\r\n\r\nThe current make file supports static and dynamic linking between SciTE, Scintilla, and Lexilla.\r\n\r\n\r\n*** Windows version ***\r\n\r\nA C++ 17 compiler is required.\r\nVisual Studio 2019 is the development system used for most development\r\nalthough Mingw-w64 9.2 is also supported.\r\n\r\nTo build Scintilla, make in the scintilla/win32 directory\r\n\t\tcd scintilla\\win32\r\nGCC:\t\tmingw32-make\r\nVisual C++:\tnmake -f scintilla.mak\r\n\t\tcd ..\\..\r\n\r\nTo build SciTE, use the makefiles located in the scite/win32 directory\r\n\t\tcd scite\\win32\r\nGCC:\t\tmingw32-make\r\nVisual C++: \tnmake -f scite.mak\r\n\r\nAn executable SciTE will now be in scite/bin.\r\n\r\n*** GTK+/Windows version ***\r\n\r\nMingw-w64 is known to work. Other compilers will probably not work.\r\n\r\nOnly Scintilla will build with GTK+ on Windows. SciTE will not work.\r\n\r\nMake builds both a static library version of Scintilla with lexers (scintilla.a) and\r\na shared library without lexers (libscintilla.so or or libscintilla.dll).\r\n\r\nTo build Scintilla, make in the scintilla/gtk directory\r\n\tcd scintilla\\gtk\r\n\tmingw32-make\r\n\r\n*** macOS Cocoa version ***\r\n\r\nXcode 9.2 or later may be used to build Scintilla on macOS.\r\n\r\nThere is no open source version of SciTE for macOS but there is a commercial\r\nversion available through the App Store.\r\n\r\nTo build Scintilla, run xcodebuild in the scintilla/cocoa/ScintillaFramework or \r\nscintilla/cocoa/Scintilla directory\r\n\r\n        cd cocoa/Scintilla\r\n\r\n\txcodebuild\r\n\r\n*** Qt version ***\r\n\r\nSee the qt/README file to build Scintilla with Qt.\r\n"
  },
  {
    "path": "scintilla/call/ScintillaCall.cxx",
    "content": "// SciTE - Scintilla based Text Editor\r\n/** @file ScintillaCall.cxx\r\n ** Interface to calling a Scintilla instance.\r\n **/\r\n// Copyright 1998-2019 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n/* Most of this file is automatically generated from the Scintilla.iface interface definition\r\n * file which contains any comments about the definitions. APIFacer.py does the generation. */\r\n\r\n#include <cstdint>\r\n\r\n#include <string>\r\n#include <string_view>\r\n\r\n#include \"ScintillaTypes.h\"\r\n#include \"ScintillaMessages.h\"\r\n#include \"ScintillaCall.h\"\r\n#include \"ScintillaStructures.h\"\r\n\r\nnamespace Scintilla {\r\n\r\nScintillaCall::ScintillaCall() noexcept : fn(nullptr), ptr(0), statusLastCall(Status::Ok) {\r\n}\r\n\r\nvoid ScintillaCall::SetFnPtr(FunctionDirect fn_, intptr_t ptr_) noexcept {\r\n\tfn = fn_;\r\n\tptr = ptr_;\r\n}\r\n\r\nbool ScintillaCall::IsValid() const noexcept {\r\n\treturn fn && ptr;\r\n}\r\n\r\nintptr_t ScintillaCall::Call(Message msg, uintptr_t wParam, intptr_t lParam) {\r\n\tif (!fn)\r\n\t\tthrow Failure(Status::Failure);\r\n\tint status = 0;\r\n\tconst intptr_t retVal = fn(ptr, static_cast<unsigned int>(msg), wParam, lParam, &status);\r\n\tstatusLastCall = static_cast<Scintilla::Status>(status);\r\n\tif (statusLastCall > Status::Ok && statusLastCall < Status::WarnStart)\r\n\t\tthrow Failure(statusLastCall);\r\n\treturn retVal;\r\n}\r\n\r\nintptr_t ScintillaCall::CallPointer(Message msg, uintptr_t wParam, void *s) {\r\n\treturn Call(msg, wParam, reinterpret_cast<intptr_t>(s));\r\n}\r\n\r\nintptr_t ScintillaCall::CallString(Message msg, uintptr_t wParam, const char *s) {\r\n\treturn Call(msg, wParam, reinterpret_cast<intptr_t>(s));\r\n}\r\n\r\nstd::string ScintillaCall::CallReturnString(Message msg, uintptr_t wParam) {\r\n\tconst size_t len = CallPointer(msg, wParam, nullptr);\r\n\tif (len) {\r\n\t\tstd::string value(len, '\\0');\r\n\t\tCallPointer(msg, wParam, value.data());\r\n\t\treturn value;\r\n\t} else {\r\n\t\treturn std::string();\r\n\t}\r\n}\r\n\r\n// Common APIs made more structured and type-safe\r\n\r\nPosition ScintillaCall::LineStart(Line line) {\r\n\treturn Call(Message::PositionFromLine, line);\r\n}\r\n\r\nPosition ScintillaCall::LineEnd(Line line) {\r\n\treturn Call(Message::GetLineEndPosition, line);\r\n}\r\n\r\nSpan ScintillaCall::SelectionSpan() {\r\n\treturn Span(\r\n\t\t       Call(Message::GetSelectionStart),\r\n\t\t       Call(Message::GetSelectionEnd));\r\n}\r\n\r\nSpan ScintillaCall::TargetSpan() {\r\n\treturn Span(\r\n\t\t       Call(Message::GetTargetStart),\r\n\t\t       Call(Message::GetTargetEnd));\r\n}\r\n\r\nvoid ScintillaCall::SetTarget(Span span) {\r\n\tCall(Message::SetTargetRange, span.start, span.end);\r\n}\r\n\r\nvoid ScintillaCall::ColouriseAll() {\r\n\tColourise(0, -1);\r\n}\r\n\r\nchar ScintillaCall::CharacterAt(Position position) {\r\n\treturn static_cast<char>(Call(Message::GetCharAt, position));\r\n}\r\n\r\nint ScintillaCall::UnsignedStyleAt(Position position) {\r\n\treturn static_cast<int>(Call(Message::GetStyleIndexAt, position));\r\n}\r\n\r\nstd::string ScintillaCall::StringOfSpan(Span span) {\r\n\tif (span.Length() == 0) {\r\n\t\treturn std::string();\r\n\t} else {\r\n\t\tstd::string text(span.Length(), '\\0');\r\n\t\tSetTarget(span);\r\n\t\tTargetText(text.data());\r\n\t\treturn text;\r\n\t}\r\n}\r\n\r\nstd::string ScintillaCall::StringOfRange(Span span) {\r\n\tif (span.Length() == 0) {\r\n\t\treturn std::string();\r\n\t} else {\r\n\t\tstd::string text(span.Length(), '\\0');\r\n\t\tTextRangeFull tr{ {span.start, span.end}, text.data() };\r\n\t\tGetTextRangeFull(&tr);\r\n\t\treturn text;\r\n\t}\r\n}\r\n\r\nPosition ScintillaCall::ReplaceTarget(std::string_view text) {\r\n\treturn ScintillaCall::CallString(Message::ReplaceTarget, text.length(), text.data());\r\n}\r\n\r\nPosition ScintillaCall::ReplaceTargetRE(std::string_view text) {\r\n\treturn CallString(Message::ReplaceTargetRE, text.length(), text.data());\r\n}\r\n\r\nPosition ScintillaCall::ReplaceTargetMinimal(std::string_view text) {\r\n\treturn CallString(Message::ReplaceTargetMinimal, text.length(), text.data());\r\n}\r\n\r\nPosition ScintillaCall::SearchInTarget(std::string_view text) {\r\n\treturn CallString(Message::SearchInTarget, text.length(), text.data());\r\n}\r\n\r\nSpan ScintillaCall::SpanSearchInTarget(std::string_view text) {\r\n\tconst Position posFound = SearchInTarget(text);\r\n\tif (posFound >= 0)\r\n\t\treturn Span(posFound, TargetEnd());\r\n\telse\r\n\t\treturn Span(posFound, 0);\r\n}\r\n\r\n// Generated methods\r\n\r\n// ScintillaCall requires automatically generated casts as it is converting\r\n// specific types to/from generic arguments and return values of 'Call'.\r\n// Suppress Visual C++ Code Analysis warnings for these casts and pointer returns.\r\n// 26472 = Don't use a static_cast for arithmetic conversions.\r\n// 26487 = Don't return a pointer '*' that may be invalid (lifetime.4).\r\n// 26490 = Don't use reinterpret_cast.\r\n#if defined(_MSC_VER)\r\n#pragma warning(disable: 26472 26487 26490)\r\n#endif\r\n\r\n//++Autogenerated -- start of section automatically generated from Scintilla.iface\r\nvoid ScintillaCall::AddText(Position length, const char *text) {\r\n\tCallString(Message::AddText, length, text);\r\n}\r\n\r\nvoid ScintillaCall::AddStyledText(Position length, const char *c) {\r\n\tCallString(Message::AddStyledText, length, c);\r\n}\r\n\r\nvoid ScintillaCall::InsertText(Position pos, const char *text) {\r\n\tCallString(Message::InsertText, pos, text);\r\n}\r\n\r\nvoid ScintillaCall::ChangeInsertion(Position length, const char *text) {\r\n\tCallString(Message::ChangeInsertion, length, text);\r\n}\r\n\r\nvoid ScintillaCall::ClearAll() {\r\n\tCall(Message::ClearAll);\r\n}\r\n\r\nvoid ScintillaCall::DeleteRange(Position start, Position lengthDelete) {\r\n\tCall(Message::DeleteRange, start, lengthDelete);\r\n}\r\n\r\nvoid ScintillaCall::ClearDocumentStyle() {\r\n\tCall(Message::ClearDocumentStyle);\r\n}\r\n\r\nPosition ScintillaCall::Length() {\r\n\treturn Call(Message::GetLength);\r\n}\r\n\r\nint ScintillaCall::CharAt(Position pos) {\r\n\treturn static_cast<int>(Call(Message::GetCharAt, pos));\r\n}\r\n\r\nPosition ScintillaCall::CurrentPos() {\r\n\treturn Call(Message::GetCurrentPos);\r\n}\r\n\r\nPosition ScintillaCall::Anchor() {\r\n\treturn Call(Message::GetAnchor);\r\n}\r\n\r\nint ScintillaCall::StyleAt(Position pos) {\r\n\treturn static_cast<int>(Call(Message::GetStyleAt, pos));\r\n}\r\n\r\nint ScintillaCall::StyleIndexAt(Position pos) {\r\n\treturn static_cast<int>(Call(Message::GetStyleIndexAt, pos));\r\n}\r\n\r\nvoid ScintillaCall::Redo() {\r\n\tCall(Message::Redo);\r\n}\r\n\r\nvoid ScintillaCall::SetUndoCollection(bool collectUndo) {\r\n\tCall(Message::SetUndoCollection, collectUndo);\r\n}\r\n\r\nvoid ScintillaCall::SelectAll() {\r\n\tCall(Message::SelectAll);\r\n}\r\n\r\nvoid ScintillaCall::SetSavePoint() {\r\n\tCall(Message::SetSavePoint);\r\n}\r\n\r\nPosition ScintillaCall::GetStyledText(void *tr) {\r\n\treturn CallPointer(Message::GetStyledText, 0, tr);\r\n}\r\n\r\nPosition ScintillaCall::GetStyledTextFull(TextRangeFull *tr) {\r\n\treturn CallPointer(Message::GetStyledTextFull, 0, tr);\r\n}\r\n\r\nbool ScintillaCall::CanRedo() {\r\n\treturn Call(Message::CanRedo);\r\n}\r\n\r\nLine ScintillaCall::MarkerLineFromHandle(int markerHandle) {\r\n\treturn Call(Message::MarkerLineFromHandle, markerHandle);\r\n}\r\n\r\nvoid ScintillaCall::MarkerDeleteHandle(int markerHandle) {\r\n\tCall(Message::MarkerDeleteHandle, markerHandle);\r\n}\r\n\r\nint ScintillaCall::MarkerHandleFromLine(Line line, int which) {\r\n\treturn static_cast<int>(Call(Message::MarkerHandleFromLine, line, which));\r\n}\r\n\r\nint ScintillaCall::MarkerNumberFromLine(Line line, int which) {\r\n\treturn static_cast<int>(Call(Message::MarkerNumberFromLine, line, which));\r\n}\r\n\r\nbool ScintillaCall::UndoCollection() {\r\n\treturn Call(Message::GetUndoCollection);\r\n}\r\n\r\nWhiteSpace ScintillaCall::ViewWS() {\r\n\treturn static_cast<Scintilla::WhiteSpace>(Call(Message::GetViewWS));\r\n}\r\n\r\nvoid ScintillaCall::SetViewWS(Scintilla::WhiteSpace viewWS) {\r\n\tCall(Message::SetViewWS, static_cast<uintptr_t>(viewWS));\r\n}\r\n\r\nTabDrawMode ScintillaCall::TabDrawMode() {\r\n\treturn static_cast<Scintilla::TabDrawMode>(Call(Message::GetTabDrawMode));\r\n}\r\n\r\nvoid ScintillaCall::SetTabDrawMode(Scintilla::TabDrawMode tabDrawMode) {\r\n\tCall(Message::SetTabDrawMode, static_cast<uintptr_t>(tabDrawMode));\r\n}\r\n\r\nPosition ScintillaCall::PositionFromPoint(int x, int y) {\r\n\treturn Call(Message::PositionFromPoint, x, y);\r\n}\r\n\r\nPosition ScintillaCall::PositionFromPointClose(int x, int y) {\r\n\treturn Call(Message::PositionFromPointClose, x, y);\r\n}\r\n\r\nvoid ScintillaCall::GotoLine(Line line) {\r\n\tCall(Message::GotoLine, line);\r\n}\r\n\r\nvoid ScintillaCall::GotoPos(Position caret) {\r\n\tCall(Message::GotoPos, caret);\r\n}\r\n\r\nvoid ScintillaCall::SetAnchor(Position anchor) {\r\n\tCall(Message::SetAnchor, anchor);\r\n}\r\n\r\nPosition ScintillaCall::GetCurLine(Position length, char *text) {\r\n\treturn CallPointer(Message::GetCurLine, length, text);\r\n}\r\n\r\nstd::string ScintillaCall::GetCurLine(Position length) {\r\n\treturn CallReturnString(Message::GetCurLine, length);\r\n}\r\n\r\nPosition ScintillaCall::EndStyled() {\r\n\treturn Call(Message::GetEndStyled);\r\n}\r\n\r\nvoid ScintillaCall::ConvertEOLs(Scintilla::EndOfLine eolMode) {\r\n\tCall(Message::ConvertEOLs, static_cast<uintptr_t>(eolMode));\r\n}\r\n\r\nEndOfLine ScintillaCall::EOLMode() {\r\n\treturn static_cast<Scintilla::EndOfLine>(Call(Message::GetEOLMode));\r\n}\r\n\r\nvoid ScintillaCall::SetEOLMode(Scintilla::EndOfLine eolMode) {\r\n\tCall(Message::SetEOLMode, static_cast<uintptr_t>(eolMode));\r\n}\r\n\r\nvoid ScintillaCall::StartStyling(Position start, int unused) {\r\n\tCall(Message::StartStyling, start, unused);\r\n}\r\n\r\nvoid ScintillaCall::SetStyling(Position length, int style) {\r\n\tCall(Message::SetStyling, length, style);\r\n}\r\n\r\nbool ScintillaCall::BufferedDraw() {\r\n\treturn Call(Message::GetBufferedDraw);\r\n}\r\n\r\nvoid ScintillaCall::SetBufferedDraw(bool buffered) {\r\n\tCall(Message::SetBufferedDraw, buffered);\r\n}\r\n\r\nvoid ScintillaCall::SetTabWidth(int tabWidth) {\r\n\tCall(Message::SetTabWidth, tabWidth);\r\n}\r\n\r\nint ScintillaCall::TabWidth() {\r\n\treturn static_cast<int>(Call(Message::GetTabWidth));\r\n}\r\n\r\nvoid ScintillaCall::SetTabMinimumWidth(int pixels) {\r\n\tCall(Message::SetTabMinimumWidth, pixels);\r\n}\r\n\r\nint ScintillaCall::TabMinimumWidth() {\r\n\treturn static_cast<int>(Call(Message::GetTabMinimumWidth));\r\n}\r\n\r\nvoid ScintillaCall::ClearTabStops(Line line) {\r\n\tCall(Message::ClearTabStops, line);\r\n}\r\n\r\nvoid ScintillaCall::AddTabStop(Line line, int x) {\r\n\tCall(Message::AddTabStop, line, x);\r\n}\r\n\r\nint ScintillaCall::GetNextTabStop(Line line, int x) {\r\n\treturn static_cast<int>(Call(Message::GetNextTabStop, line, x));\r\n}\r\n\r\nvoid ScintillaCall::SetCodePage(int codePage) {\r\n\tCall(Message::SetCodePage, codePage);\r\n}\r\n\r\nvoid ScintillaCall::SetFontLocale(const char *localeName) {\r\n\tCallString(Message::SetFontLocale, 0, localeName);\r\n}\r\n\r\nint ScintillaCall::FontLocale(char *localeName) {\r\n\treturn static_cast<int>(CallPointer(Message::GetFontLocale, 0, localeName));\r\n}\r\n\r\nstd::string ScintillaCall::FontLocale() {\r\n\treturn CallReturnString(Message::GetFontLocale, 0);\r\n}\r\n\r\nIMEInteraction ScintillaCall::IMEInteraction() {\r\n\treturn static_cast<Scintilla::IMEInteraction>(Call(Message::GetIMEInteraction));\r\n}\r\n\r\nvoid ScintillaCall::SetIMEInteraction(Scintilla::IMEInteraction imeInteraction) {\r\n\tCall(Message::SetIMEInteraction, static_cast<uintptr_t>(imeInteraction));\r\n}\r\n\r\nvoid ScintillaCall::MarkerDefine(int markerNumber, Scintilla::MarkerSymbol markerSymbol) {\r\n\tCall(Message::MarkerDefine, markerNumber, static_cast<intptr_t>(markerSymbol));\r\n}\r\n\r\nvoid ScintillaCall::MarkerSetFore(int markerNumber, Colour fore) {\r\n\tCall(Message::MarkerSetFore, markerNumber, fore);\r\n}\r\n\r\nvoid ScintillaCall::MarkerSetBack(int markerNumber, Colour back) {\r\n\tCall(Message::MarkerSetBack, markerNumber, back);\r\n}\r\n\r\nvoid ScintillaCall::MarkerSetBackSelected(int markerNumber, Colour back) {\r\n\tCall(Message::MarkerSetBackSelected, markerNumber, back);\r\n}\r\n\r\nvoid ScintillaCall::MarkerSetForeTranslucent(int markerNumber, ColourAlpha fore) {\r\n\tCall(Message::MarkerSetForeTranslucent, markerNumber, fore);\r\n}\r\n\r\nvoid ScintillaCall::MarkerSetBackTranslucent(int markerNumber, ColourAlpha back) {\r\n\tCall(Message::MarkerSetBackTranslucent, markerNumber, back);\r\n}\r\n\r\nvoid ScintillaCall::MarkerSetBackSelectedTranslucent(int markerNumber, ColourAlpha back) {\r\n\tCall(Message::MarkerSetBackSelectedTranslucent, markerNumber, back);\r\n}\r\n\r\nvoid ScintillaCall::MarkerSetStrokeWidth(int markerNumber, int hundredths) {\r\n\tCall(Message::MarkerSetStrokeWidth, markerNumber, hundredths);\r\n}\r\n\r\nvoid ScintillaCall::MarkerEnableHighlight(bool enabled) {\r\n\tCall(Message::MarkerEnableHighlight, enabled);\r\n}\r\n\r\nint ScintillaCall::MarkerAdd(Line line, int markerNumber) {\r\n\treturn static_cast<int>(Call(Message::MarkerAdd, line, markerNumber));\r\n}\r\n\r\nvoid ScintillaCall::MarkerDelete(Line line, int markerNumber) {\r\n\tCall(Message::MarkerDelete, line, markerNumber);\r\n}\r\n\r\nvoid ScintillaCall::MarkerDeleteAll(int markerNumber) {\r\n\tCall(Message::MarkerDeleteAll, markerNumber);\r\n}\r\n\r\nint ScintillaCall::MarkerGet(Line line) {\r\n\treturn static_cast<int>(Call(Message::MarkerGet, line));\r\n}\r\n\r\nLine ScintillaCall::MarkerNext(Line lineStart, int markerMask) {\r\n\treturn Call(Message::MarkerNext, lineStart, markerMask);\r\n}\r\n\r\nLine ScintillaCall::MarkerPrevious(Line lineStart, int markerMask) {\r\n\treturn Call(Message::MarkerPrevious, lineStart, markerMask);\r\n}\r\n\r\nvoid ScintillaCall::MarkerDefinePixmap(int markerNumber, const char *pixmap) {\r\n\tCallString(Message::MarkerDefinePixmap, markerNumber, pixmap);\r\n}\r\n\r\nvoid ScintillaCall::MarkerAddSet(Line line, int markerSet) {\r\n\tCall(Message::MarkerAddSet, line, markerSet);\r\n}\r\n\r\nvoid ScintillaCall::MarkerSetAlpha(int markerNumber, Scintilla::Alpha alpha) {\r\n\tCall(Message::MarkerSetAlpha, markerNumber, static_cast<intptr_t>(alpha));\r\n}\r\n\r\nLayer ScintillaCall::MarkerGetLayer(int markerNumber) {\r\n\treturn static_cast<Scintilla::Layer>(Call(Message::MarkerGetLayer, markerNumber));\r\n}\r\n\r\nvoid ScintillaCall::MarkerSetLayer(int markerNumber, Scintilla::Layer layer) {\r\n\tCall(Message::MarkerSetLayer, markerNumber, static_cast<intptr_t>(layer));\r\n}\r\n\r\nvoid ScintillaCall::SetMarginTypeN(int margin, Scintilla::MarginType marginType) {\r\n\tCall(Message::SetMarginTypeN, margin, static_cast<intptr_t>(marginType));\r\n}\r\n\r\nMarginType ScintillaCall::MarginTypeN(int margin) {\r\n\treturn static_cast<Scintilla::MarginType>(Call(Message::GetMarginTypeN, margin));\r\n}\r\n\r\nvoid ScintillaCall::SetMarginWidthN(int margin, int pixelWidth) {\r\n\tCall(Message::SetMarginWidthN, margin, pixelWidth);\r\n}\r\n\r\nint ScintillaCall::MarginWidthN(int margin) {\r\n\treturn static_cast<int>(Call(Message::GetMarginWidthN, margin));\r\n}\r\n\r\nvoid ScintillaCall::SetMarginMaskN(int margin, int mask) {\r\n\tCall(Message::SetMarginMaskN, margin, mask);\r\n}\r\n\r\nint ScintillaCall::MarginMaskN(int margin) {\r\n\treturn static_cast<int>(Call(Message::GetMarginMaskN, margin));\r\n}\r\n\r\nvoid ScintillaCall::SetMarginSensitiveN(int margin, bool sensitive) {\r\n\tCall(Message::SetMarginSensitiveN, margin, sensitive);\r\n}\r\n\r\nbool ScintillaCall::MarginSensitiveN(int margin) {\r\n\treturn Call(Message::GetMarginSensitiveN, margin);\r\n}\r\n\r\nvoid ScintillaCall::SetMarginCursorN(int margin, Scintilla::CursorShape cursor) {\r\n\tCall(Message::SetMarginCursorN, margin, static_cast<intptr_t>(cursor));\r\n}\r\n\r\nCursorShape ScintillaCall::MarginCursorN(int margin) {\r\n\treturn static_cast<Scintilla::CursorShape>(Call(Message::GetMarginCursorN, margin));\r\n}\r\n\r\nvoid ScintillaCall::SetMarginBackN(int margin, Colour back) {\r\n\tCall(Message::SetMarginBackN, margin, back);\r\n}\r\n\r\nColour ScintillaCall::MarginBackN(int margin) {\r\n\treturn static_cast<Colour>(Call(Message::GetMarginBackN, margin));\r\n}\r\n\r\nvoid ScintillaCall::SetMargins(int margins) {\r\n\tCall(Message::SetMargins, margins);\r\n}\r\n\r\nint ScintillaCall::Margins() {\r\n\treturn static_cast<int>(Call(Message::GetMargins));\r\n}\r\n\r\nvoid ScintillaCall::StyleClearAll() {\r\n\tCall(Message::StyleClearAll);\r\n}\r\n\r\nvoid ScintillaCall::StyleSetFore(int style, Colour fore) {\r\n\tCall(Message::StyleSetFore, style, fore);\r\n}\r\n\r\nvoid ScintillaCall::StyleSetBack(int style, Colour back) {\r\n\tCall(Message::StyleSetBack, style, back);\r\n}\r\n\r\nvoid ScintillaCall::StyleSetBold(int style, bool bold) {\r\n\tCall(Message::StyleSetBold, style, bold);\r\n}\r\n\r\nvoid ScintillaCall::StyleSetItalic(int style, bool italic) {\r\n\tCall(Message::StyleSetItalic, style, italic);\r\n}\r\n\r\nvoid ScintillaCall::StyleSetSize(int style, int sizePoints) {\r\n\tCall(Message::StyleSetSize, style, sizePoints);\r\n}\r\n\r\nvoid ScintillaCall::StyleSetFont(int style, const char *fontName) {\r\n\tCallString(Message::StyleSetFont, style, fontName);\r\n}\r\n\r\nvoid ScintillaCall::StyleSetEOLFilled(int style, bool eolFilled) {\r\n\tCall(Message::StyleSetEOLFilled, style, eolFilled);\r\n}\r\n\r\nvoid ScintillaCall::StyleResetDefault() {\r\n\tCall(Message::StyleResetDefault);\r\n}\r\n\r\nvoid ScintillaCall::StyleSetUnderline(int style, bool underline) {\r\n\tCall(Message::StyleSetUnderline, style, underline);\r\n}\r\n\r\nColour ScintillaCall::StyleGetFore(int style) {\r\n\treturn static_cast<Colour>(Call(Message::StyleGetFore, style));\r\n}\r\n\r\nColour ScintillaCall::StyleGetBack(int style) {\r\n\treturn static_cast<Colour>(Call(Message::StyleGetBack, style));\r\n}\r\n\r\nbool ScintillaCall::StyleGetBold(int style) {\r\n\treturn Call(Message::StyleGetBold, style);\r\n}\r\n\r\nbool ScintillaCall::StyleGetItalic(int style) {\r\n\treturn Call(Message::StyleGetItalic, style);\r\n}\r\n\r\nint ScintillaCall::StyleGetSize(int style) {\r\n\treturn static_cast<int>(Call(Message::StyleGetSize, style));\r\n}\r\n\r\nint ScintillaCall::StyleGetFont(int style, char *fontName) {\r\n\treturn static_cast<int>(CallPointer(Message::StyleGetFont, style, fontName));\r\n}\r\n\r\nstd::string ScintillaCall::StyleGetFont(int style) {\r\n\treturn CallReturnString(Message::StyleGetFont, style);\r\n}\r\n\r\nbool ScintillaCall::StyleGetEOLFilled(int style) {\r\n\treturn Call(Message::StyleGetEOLFilled, style);\r\n}\r\n\r\nbool ScintillaCall::StyleGetUnderline(int style) {\r\n\treturn Call(Message::StyleGetUnderline, style);\r\n}\r\n\r\nCaseVisible ScintillaCall::StyleGetCase(int style) {\r\n\treturn static_cast<Scintilla::CaseVisible>(Call(Message::StyleGetCase, style));\r\n}\r\n\r\nCharacterSet ScintillaCall::StyleGetCharacterSet(int style) {\r\n\treturn static_cast<Scintilla::CharacterSet>(Call(Message::StyleGetCharacterSet, style));\r\n}\r\n\r\nbool ScintillaCall::StyleGetVisible(int style) {\r\n\treturn Call(Message::StyleGetVisible, style);\r\n}\r\n\r\nbool ScintillaCall::StyleGetChangeable(int style) {\r\n\treturn Call(Message::StyleGetChangeable, style);\r\n}\r\n\r\nbool ScintillaCall::StyleGetHotSpot(int style) {\r\n\treturn Call(Message::StyleGetHotSpot, style);\r\n}\r\n\r\nvoid ScintillaCall::StyleSetCase(int style, Scintilla::CaseVisible caseVisible) {\r\n\tCall(Message::StyleSetCase, style, static_cast<intptr_t>(caseVisible));\r\n}\r\n\r\nvoid ScintillaCall::StyleSetSizeFractional(int style, int sizeHundredthPoints) {\r\n\tCall(Message::StyleSetSizeFractional, style, sizeHundredthPoints);\r\n}\r\n\r\nint ScintillaCall::StyleGetSizeFractional(int style) {\r\n\treturn static_cast<int>(Call(Message::StyleGetSizeFractional, style));\r\n}\r\n\r\nvoid ScintillaCall::StyleSetWeight(int style, Scintilla::FontWeight weight) {\r\n\tCall(Message::StyleSetWeight, style, static_cast<intptr_t>(weight));\r\n}\r\n\r\nFontWeight ScintillaCall::StyleGetWeight(int style) {\r\n\treturn static_cast<Scintilla::FontWeight>(Call(Message::StyleGetWeight, style));\r\n}\r\n\r\nvoid ScintillaCall::StyleSetCharacterSet(int style, Scintilla::CharacterSet characterSet) {\r\n\tCall(Message::StyleSetCharacterSet, style, static_cast<intptr_t>(characterSet));\r\n}\r\n\r\nvoid ScintillaCall::StyleSetHotSpot(int style, bool hotspot) {\r\n\tCall(Message::StyleSetHotSpot, style, hotspot);\r\n}\r\n\r\nvoid ScintillaCall::StyleSetCheckMonospaced(int style, bool checkMonospaced) {\r\n\tCall(Message::StyleSetCheckMonospaced, style, checkMonospaced);\r\n}\r\n\r\nbool ScintillaCall::StyleGetCheckMonospaced(int style) {\r\n\treturn Call(Message::StyleGetCheckMonospaced, style);\r\n}\r\n\r\nvoid ScintillaCall::StyleSetInvisibleRepresentation(int style, const char *representation) {\r\n\tCallString(Message::StyleSetInvisibleRepresentation, style, representation);\r\n}\r\n\r\nint ScintillaCall::StyleGetInvisibleRepresentation(int style, char *representation) {\r\n\treturn static_cast<int>(CallPointer(Message::StyleGetInvisibleRepresentation, style, representation));\r\n}\r\n\r\nstd::string ScintillaCall::StyleGetInvisibleRepresentation(int style) {\r\n\treturn CallReturnString(Message::StyleGetInvisibleRepresentation, style);\r\n}\r\n\r\nvoid ScintillaCall::SetElementColour(Scintilla::Element element, ColourAlpha colourElement) {\r\n\tCall(Message::SetElementColour, static_cast<uintptr_t>(element), colourElement);\r\n}\r\n\r\nColourAlpha ScintillaCall::ElementColour(Scintilla::Element element) {\r\n\treturn static_cast<ColourAlpha>(Call(Message::GetElementColour, static_cast<uintptr_t>(element)));\r\n}\r\n\r\nvoid ScintillaCall::ResetElementColour(Scintilla::Element element) {\r\n\tCall(Message::ResetElementColour, static_cast<uintptr_t>(element));\r\n}\r\n\r\nbool ScintillaCall::ElementIsSet(Scintilla::Element element) {\r\n\treturn Call(Message::GetElementIsSet, static_cast<uintptr_t>(element));\r\n}\r\n\r\nbool ScintillaCall::ElementAllowsTranslucent(Scintilla::Element element) {\r\n\treturn Call(Message::GetElementAllowsTranslucent, static_cast<uintptr_t>(element));\r\n}\r\n\r\nColourAlpha ScintillaCall::ElementBaseColour(Scintilla::Element element) {\r\n\treturn static_cast<ColourAlpha>(Call(Message::GetElementBaseColour, static_cast<uintptr_t>(element)));\r\n}\r\n\r\nvoid ScintillaCall::SetSelFore(bool useSetting, Colour fore) {\r\n\tCall(Message::SetSelFore, useSetting, fore);\r\n}\r\n\r\nvoid ScintillaCall::SetSelBack(bool useSetting, Colour back) {\r\n\tCall(Message::SetSelBack, useSetting, back);\r\n}\r\n\r\nAlpha ScintillaCall::SelAlpha() {\r\n\treturn static_cast<Scintilla::Alpha>(Call(Message::GetSelAlpha));\r\n}\r\n\r\nvoid ScintillaCall::SetSelAlpha(Scintilla::Alpha alpha) {\r\n\tCall(Message::SetSelAlpha, static_cast<uintptr_t>(alpha));\r\n}\r\n\r\nbool ScintillaCall::SelEOLFilled() {\r\n\treturn Call(Message::GetSelEOLFilled);\r\n}\r\n\r\nvoid ScintillaCall::SetSelEOLFilled(bool filled) {\r\n\tCall(Message::SetSelEOLFilled, filled);\r\n}\r\n\r\nLayer ScintillaCall::SelectionLayer() {\r\n\treturn static_cast<Scintilla::Layer>(Call(Message::GetSelectionLayer));\r\n}\r\n\r\nvoid ScintillaCall::SetSelectionLayer(Scintilla::Layer layer) {\r\n\tCall(Message::SetSelectionLayer, static_cast<uintptr_t>(layer));\r\n}\r\n\r\nLayer ScintillaCall::CaretLineLayer() {\r\n\treturn static_cast<Scintilla::Layer>(Call(Message::GetCaretLineLayer));\r\n}\r\n\r\nvoid ScintillaCall::SetCaretLineLayer(Scintilla::Layer layer) {\r\n\tCall(Message::SetCaretLineLayer, static_cast<uintptr_t>(layer));\r\n}\r\n\r\nbool ScintillaCall::CaretLineHighlightSubLine() {\r\n\treturn Call(Message::GetCaretLineHighlightSubLine);\r\n}\r\n\r\nvoid ScintillaCall::SetCaretLineHighlightSubLine(bool subLine) {\r\n\tCall(Message::SetCaretLineHighlightSubLine, subLine);\r\n}\r\n\r\nvoid ScintillaCall::SetCaretFore(Colour fore) {\r\n\tCall(Message::SetCaretFore, fore);\r\n}\r\n\r\nvoid ScintillaCall::AssignCmdKey(int keyDefinition, int sciCommand) {\r\n\tCall(Message::AssignCmdKey, keyDefinition, sciCommand);\r\n}\r\n\r\nvoid ScintillaCall::ClearCmdKey(int keyDefinition) {\r\n\tCall(Message::ClearCmdKey, keyDefinition);\r\n}\r\n\r\nvoid ScintillaCall::ClearAllCmdKeys() {\r\n\tCall(Message::ClearAllCmdKeys);\r\n}\r\n\r\nvoid ScintillaCall::SetStylingEx(Position length, const char *styles) {\r\n\tCallString(Message::SetStylingEx, length, styles);\r\n}\r\n\r\nvoid ScintillaCall::StyleSetVisible(int style, bool visible) {\r\n\tCall(Message::StyleSetVisible, style, visible);\r\n}\r\n\r\nint ScintillaCall::CaretPeriod() {\r\n\treturn static_cast<int>(Call(Message::GetCaretPeriod));\r\n}\r\n\r\nvoid ScintillaCall::SetCaretPeriod(int periodMilliseconds) {\r\n\tCall(Message::SetCaretPeriod, periodMilliseconds);\r\n}\r\n\r\nvoid ScintillaCall::SetWordChars(const char *characters) {\r\n\tCallString(Message::SetWordChars, 0, characters);\r\n}\r\n\r\nint ScintillaCall::WordChars(char *characters) {\r\n\treturn static_cast<int>(CallPointer(Message::GetWordChars, 0, characters));\r\n}\r\n\r\nstd::string ScintillaCall::WordChars() {\r\n\treturn CallReturnString(Message::GetWordChars, 0);\r\n}\r\n\r\nvoid ScintillaCall::SetCharacterCategoryOptimization(int countCharacters) {\r\n\tCall(Message::SetCharacterCategoryOptimization, countCharacters);\r\n}\r\n\r\nint ScintillaCall::CharacterCategoryOptimization() {\r\n\treturn static_cast<int>(Call(Message::GetCharacterCategoryOptimization));\r\n}\r\n\r\nvoid ScintillaCall::BeginUndoAction() {\r\n\tCall(Message::BeginUndoAction);\r\n}\r\n\r\nvoid ScintillaCall::EndUndoAction() {\r\n\tCall(Message::EndUndoAction);\r\n}\r\n\r\nint ScintillaCall::UndoActions() {\r\n\treturn static_cast<int>(Call(Message::GetUndoActions));\r\n}\r\n\r\nvoid ScintillaCall::SetUndoSavePoint(int action) {\r\n\tCall(Message::SetUndoSavePoint, action);\r\n}\r\n\r\nint ScintillaCall::UndoSavePoint() {\r\n\treturn static_cast<int>(Call(Message::GetUndoSavePoint));\r\n}\r\n\r\nvoid ScintillaCall::SetUndoDetach(int action) {\r\n\tCall(Message::SetUndoDetach, action);\r\n}\r\n\r\nint ScintillaCall::UndoDetach() {\r\n\treturn static_cast<int>(Call(Message::GetUndoDetach));\r\n}\r\n\r\nvoid ScintillaCall::SetUndoTentative(int action) {\r\n\tCall(Message::SetUndoTentative, action);\r\n}\r\n\r\nint ScintillaCall::UndoTentative() {\r\n\treturn static_cast<int>(Call(Message::GetUndoTentative));\r\n}\r\n\r\nvoid ScintillaCall::SetUndoCurrent(int action) {\r\n\tCall(Message::SetUndoCurrent, action);\r\n}\r\n\r\nint ScintillaCall::UndoCurrent() {\r\n\treturn static_cast<int>(Call(Message::GetUndoCurrent));\r\n}\r\n\r\nvoid ScintillaCall::PushUndoActionType(int type, Position pos) {\r\n\tCall(Message::PushUndoActionType, type, pos);\r\n}\r\n\r\nvoid ScintillaCall::ChangeLastUndoActionText(Position length, const char *text) {\r\n\tCallString(Message::ChangeLastUndoActionText, length, text);\r\n}\r\n\r\nint ScintillaCall::UndoActionType(int action) {\r\n\treturn static_cast<int>(Call(Message::GetUndoActionType, action));\r\n}\r\n\r\nPosition ScintillaCall::UndoActionPosition(int action) {\r\n\treturn Call(Message::GetUndoActionPosition, action);\r\n}\r\n\r\nint ScintillaCall::UndoActionText(int action, char *text) {\r\n\treturn static_cast<int>(CallPointer(Message::GetUndoActionText, action, text));\r\n}\r\n\r\nstd::string ScintillaCall::UndoActionText(int action) {\r\n\treturn CallReturnString(Message::GetUndoActionText, action);\r\n}\r\n\r\nvoid ScintillaCall::IndicSetStyle(int indicator, Scintilla::IndicatorStyle indicatorStyle) {\r\n\tCall(Message::IndicSetStyle, indicator, static_cast<intptr_t>(indicatorStyle));\r\n}\r\n\r\nIndicatorStyle ScintillaCall::IndicGetStyle(int indicator) {\r\n\treturn static_cast<Scintilla::IndicatorStyle>(Call(Message::IndicGetStyle, indicator));\r\n}\r\n\r\nvoid ScintillaCall::IndicSetFore(int indicator, Colour fore) {\r\n\tCall(Message::IndicSetFore, indicator, fore);\r\n}\r\n\r\nColour ScintillaCall::IndicGetFore(int indicator) {\r\n\treturn static_cast<Colour>(Call(Message::IndicGetFore, indicator));\r\n}\r\n\r\nvoid ScintillaCall::IndicSetUnder(int indicator, bool under) {\r\n\tCall(Message::IndicSetUnder, indicator, under);\r\n}\r\n\r\nbool ScintillaCall::IndicGetUnder(int indicator) {\r\n\treturn Call(Message::IndicGetUnder, indicator);\r\n}\r\n\r\nvoid ScintillaCall::IndicSetHoverStyle(int indicator, Scintilla::IndicatorStyle indicatorStyle) {\r\n\tCall(Message::IndicSetHoverStyle, indicator, static_cast<intptr_t>(indicatorStyle));\r\n}\r\n\r\nIndicatorStyle ScintillaCall::IndicGetHoverStyle(int indicator) {\r\n\treturn static_cast<Scintilla::IndicatorStyle>(Call(Message::IndicGetHoverStyle, indicator));\r\n}\r\n\r\nvoid ScintillaCall::IndicSetHoverFore(int indicator, Colour fore) {\r\n\tCall(Message::IndicSetHoverFore, indicator, fore);\r\n}\r\n\r\nColour ScintillaCall::IndicGetHoverFore(int indicator) {\r\n\treturn static_cast<Colour>(Call(Message::IndicGetHoverFore, indicator));\r\n}\r\n\r\nvoid ScintillaCall::IndicSetFlags(int indicator, Scintilla::IndicFlag flags) {\r\n\tCall(Message::IndicSetFlags, indicator, static_cast<intptr_t>(flags));\r\n}\r\n\r\nIndicFlag ScintillaCall::IndicGetFlags(int indicator) {\r\n\treturn static_cast<Scintilla::IndicFlag>(Call(Message::IndicGetFlags, indicator));\r\n}\r\n\r\nvoid ScintillaCall::IndicSetStrokeWidth(int indicator, int hundredths) {\r\n\tCall(Message::IndicSetStrokeWidth, indicator, hundredths);\r\n}\r\n\r\nint ScintillaCall::IndicGetStrokeWidth(int indicator) {\r\n\treturn static_cast<int>(Call(Message::IndicGetStrokeWidth, indicator));\r\n}\r\n\r\nvoid ScintillaCall::SetWhitespaceFore(bool useSetting, Colour fore) {\r\n\tCall(Message::SetWhitespaceFore, useSetting, fore);\r\n}\r\n\r\nvoid ScintillaCall::SetWhitespaceBack(bool useSetting, Colour back) {\r\n\tCall(Message::SetWhitespaceBack, useSetting, back);\r\n}\r\n\r\nvoid ScintillaCall::SetWhitespaceSize(int size) {\r\n\tCall(Message::SetWhitespaceSize, size);\r\n}\r\n\r\nint ScintillaCall::WhitespaceSize() {\r\n\treturn static_cast<int>(Call(Message::GetWhitespaceSize));\r\n}\r\n\r\nvoid ScintillaCall::SetLineState(Line line, int state) {\r\n\tCall(Message::SetLineState, line, state);\r\n}\r\n\r\nint ScintillaCall::LineState(Line line) {\r\n\treturn static_cast<int>(Call(Message::GetLineState, line));\r\n}\r\n\r\nint ScintillaCall::MaxLineState() {\r\n\treturn static_cast<int>(Call(Message::GetMaxLineState));\r\n}\r\n\r\nbool ScintillaCall::CaretLineVisible() {\r\n\treturn Call(Message::GetCaretLineVisible);\r\n}\r\n\r\nvoid ScintillaCall::SetCaretLineVisible(bool show) {\r\n\tCall(Message::SetCaretLineVisible, show);\r\n}\r\n\r\nColour ScintillaCall::CaretLineBack() {\r\n\treturn static_cast<Colour>(Call(Message::GetCaretLineBack));\r\n}\r\n\r\nvoid ScintillaCall::SetCaretLineBack(Colour back) {\r\n\tCall(Message::SetCaretLineBack, back);\r\n}\r\n\r\nint ScintillaCall::CaretLineFrame() {\r\n\treturn static_cast<int>(Call(Message::GetCaretLineFrame));\r\n}\r\n\r\nvoid ScintillaCall::SetCaretLineFrame(int width) {\r\n\tCall(Message::SetCaretLineFrame, width);\r\n}\r\n\r\nvoid ScintillaCall::StyleSetChangeable(int style, bool changeable) {\r\n\tCall(Message::StyleSetChangeable, style, changeable);\r\n}\r\n\r\nvoid ScintillaCall::AutoCShow(Position lengthEntered, const char *itemList) {\r\n\tCallString(Message::AutoCShow, lengthEntered, itemList);\r\n}\r\n\r\nvoid ScintillaCall::AutoCCancel() {\r\n\tCall(Message::AutoCCancel);\r\n}\r\n\r\nbool ScintillaCall::AutoCActive() {\r\n\treturn Call(Message::AutoCActive);\r\n}\r\n\r\nPosition ScintillaCall::AutoCPosStart() {\r\n\treturn Call(Message::AutoCPosStart);\r\n}\r\n\r\nvoid ScintillaCall::AutoCComplete() {\r\n\tCall(Message::AutoCComplete);\r\n}\r\n\r\nvoid ScintillaCall::AutoCStops(const char *characterSet) {\r\n\tCallString(Message::AutoCStops, 0, characterSet);\r\n}\r\n\r\nvoid ScintillaCall::AutoCSetSeparator(int separatorCharacter) {\r\n\tCall(Message::AutoCSetSeparator, separatorCharacter);\r\n}\r\n\r\nint ScintillaCall::AutoCGetSeparator() {\r\n\treturn static_cast<int>(Call(Message::AutoCGetSeparator));\r\n}\r\n\r\nvoid ScintillaCall::AutoCSelect(const char *select) {\r\n\tCallString(Message::AutoCSelect, 0, select);\r\n}\r\n\r\nvoid ScintillaCall::AutoCSetCancelAtStart(bool cancel) {\r\n\tCall(Message::AutoCSetCancelAtStart, cancel);\r\n}\r\n\r\nbool ScintillaCall::AutoCGetCancelAtStart() {\r\n\treturn Call(Message::AutoCGetCancelAtStart);\r\n}\r\n\r\nvoid ScintillaCall::AutoCSetFillUps(const char *characterSet) {\r\n\tCallString(Message::AutoCSetFillUps, 0, characterSet);\r\n}\r\n\r\nvoid ScintillaCall::AutoCSetChooseSingle(bool chooseSingle) {\r\n\tCall(Message::AutoCSetChooseSingle, chooseSingle);\r\n}\r\n\r\nbool ScintillaCall::AutoCGetChooseSingle() {\r\n\treturn Call(Message::AutoCGetChooseSingle);\r\n}\r\n\r\nvoid ScintillaCall::AutoCSetIgnoreCase(bool ignoreCase) {\r\n\tCall(Message::AutoCSetIgnoreCase, ignoreCase);\r\n}\r\n\r\nbool ScintillaCall::AutoCGetIgnoreCase() {\r\n\treturn Call(Message::AutoCGetIgnoreCase);\r\n}\r\n\r\nvoid ScintillaCall::UserListShow(int listType, const char *itemList) {\r\n\tCallString(Message::UserListShow, listType, itemList);\r\n}\r\n\r\nvoid ScintillaCall::AutoCSetAutoHide(bool autoHide) {\r\n\tCall(Message::AutoCSetAutoHide, autoHide);\r\n}\r\n\r\nbool ScintillaCall::AutoCGetAutoHide() {\r\n\treturn Call(Message::AutoCGetAutoHide);\r\n}\r\n\r\nvoid ScintillaCall::AutoCSetOptions(Scintilla::AutoCompleteOption options) {\r\n\tCall(Message::AutoCSetOptions, static_cast<uintptr_t>(options));\r\n}\r\n\r\nAutoCompleteOption ScintillaCall::AutoCGetOptions() {\r\n\treturn static_cast<Scintilla::AutoCompleteOption>(Call(Message::AutoCGetOptions));\r\n}\r\n\r\nvoid ScintillaCall::AutoCSetDropRestOfWord(bool dropRestOfWord) {\r\n\tCall(Message::AutoCSetDropRestOfWord, dropRestOfWord);\r\n}\r\n\r\nbool ScintillaCall::AutoCGetDropRestOfWord() {\r\n\treturn Call(Message::AutoCGetDropRestOfWord);\r\n}\r\n\r\nvoid ScintillaCall::RegisterImage(int type, const char *xpmData) {\r\n\tCallString(Message::RegisterImage, type, xpmData);\r\n}\r\n\r\nvoid ScintillaCall::ClearRegisteredImages() {\r\n\tCall(Message::ClearRegisteredImages);\r\n}\r\n\r\nint ScintillaCall::AutoCGetTypeSeparator() {\r\n\treturn static_cast<int>(Call(Message::AutoCGetTypeSeparator));\r\n}\r\n\r\nvoid ScintillaCall::AutoCSetTypeSeparator(int separatorCharacter) {\r\n\tCall(Message::AutoCSetTypeSeparator, separatorCharacter);\r\n}\r\n\r\nvoid ScintillaCall::AutoCSetMaxWidth(int characterCount) {\r\n\tCall(Message::AutoCSetMaxWidth, characterCount);\r\n}\r\n\r\nint ScintillaCall::AutoCGetMaxWidth() {\r\n\treturn static_cast<int>(Call(Message::AutoCGetMaxWidth));\r\n}\r\n\r\nvoid ScintillaCall::AutoCSetMaxHeight(int rowCount) {\r\n\tCall(Message::AutoCSetMaxHeight, rowCount);\r\n}\r\n\r\nint ScintillaCall::AutoCGetMaxHeight() {\r\n\treturn static_cast<int>(Call(Message::AutoCGetMaxHeight));\r\n}\r\n\r\nvoid ScintillaCall::SetIndent(int indentSize) {\r\n\tCall(Message::SetIndent, indentSize);\r\n}\r\n\r\nint ScintillaCall::Indent() {\r\n\treturn static_cast<int>(Call(Message::GetIndent));\r\n}\r\n\r\nvoid ScintillaCall::SetUseTabs(bool useTabs) {\r\n\tCall(Message::SetUseTabs, useTabs);\r\n}\r\n\r\nbool ScintillaCall::UseTabs() {\r\n\treturn Call(Message::GetUseTabs);\r\n}\r\n\r\nvoid ScintillaCall::SetLineIndentation(Line line, int indentation) {\r\n\tCall(Message::SetLineIndentation, line, indentation);\r\n}\r\n\r\nint ScintillaCall::LineIndentation(Line line) {\r\n\treturn static_cast<int>(Call(Message::GetLineIndentation, line));\r\n}\r\n\r\nPosition ScintillaCall::LineIndentPosition(Line line) {\r\n\treturn Call(Message::GetLineIndentPosition, line);\r\n}\r\n\r\nPosition ScintillaCall::Column(Position pos) {\r\n\treturn Call(Message::GetColumn, pos);\r\n}\r\n\r\nPosition ScintillaCall::CountCharacters(Position start, Position end) {\r\n\treturn Call(Message::CountCharacters, start, end);\r\n}\r\n\r\nPosition ScintillaCall::CountCodeUnits(Position start, Position end) {\r\n\treturn Call(Message::CountCodeUnits, start, end);\r\n}\r\n\r\nvoid ScintillaCall::SetHScrollBar(bool visible) {\r\n\tCall(Message::SetHScrollBar, visible);\r\n}\r\n\r\nbool ScintillaCall::HScrollBar() {\r\n\treturn Call(Message::GetHScrollBar);\r\n}\r\n\r\nvoid ScintillaCall::SetIndentationGuides(Scintilla::IndentView indentView) {\r\n\tCall(Message::SetIndentationGuides, static_cast<uintptr_t>(indentView));\r\n}\r\n\r\nIndentView ScintillaCall::IndentationGuides() {\r\n\treturn static_cast<Scintilla::IndentView>(Call(Message::GetIndentationGuides));\r\n}\r\n\r\nvoid ScintillaCall::SetHighlightGuide(Position column) {\r\n\tCall(Message::SetHighlightGuide, column);\r\n}\r\n\r\nPosition ScintillaCall::HighlightGuide() {\r\n\treturn Call(Message::GetHighlightGuide);\r\n}\r\n\r\nPosition ScintillaCall::LineEndPosition(Line line) {\r\n\treturn Call(Message::GetLineEndPosition, line);\r\n}\r\n\r\nint ScintillaCall::CodePage() {\r\n\treturn static_cast<int>(Call(Message::GetCodePage));\r\n}\r\n\r\nColour ScintillaCall::CaretFore() {\r\n\treturn static_cast<Colour>(Call(Message::GetCaretFore));\r\n}\r\n\r\nbool ScintillaCall::ReadOnly() {\r\n\treturn Call(Message::GetReadOnly);\r\n}\r\n\r\nvoid ScintillaCall::SetCurrentPos(Position caret) {\r\n\tCall(Message::SetCurrentPos, caret);\r\n}\r\n\r\nvoid ScintillaCall::SetSelectionStart(Position anchor) {\r\n\tCall(Message::SetSelectionStart, anchor);\r\n}\r\n\r\nPosition ScintillaCall::SelectionStart() {\r\n\treturn Call(Message::GetSelectionStart);\r\n}\r\n\r\nvoid ScintillaCall::SetSelectionEnd(Position caret) {\r\n\tCall(Message::SetSelectionEnd, caret);\r\n}\r\n\r\nPosition ScintillaCall::SelectionEnd() {\r\n\treturn Call(Message::GetSelectionEnd);\r\n}\r\n\r\nvoid ScintillaCall::SetEmptySelection(Position caret) {\r\n\tCall(Message::SetEmptySelection, caret);\r\n}\r\n\r\nvoid ScintillaCall::SetPrintMagnification(int magnification) {\r\n\tCall(Message::SetPrintMagnification, magnification);\r\n}\r\n\r\nint ScintillaCall::PrintMagnification() {\r\n\treturn static_cast<int>(Call(Message::GetPrintMagnification));\r\n}\r\n\r\nvoid ScintillaCall::SetPrintColourMode(Scintilla::PrintOption mode) {\r\n\tCall(Message::SetPrintColourMode, static_cast<uintptr_t>(mode));\r\n}\r\n\r\nPrintOption ScintillaCall::PrintColourMode() {\r\n\treturn static_cast<Scintilla::PrintOption>(Call(Message::GetPrintColourMode));\r\n}\r\n\r\nPosition ScintillaCall::FindText(Scintilla::FindOption searchFlags, void *ft) {\r\n\treturn CallPointer(Message::FindText, static_cast<uintptr_t>(searchFlags), ft);\r\n}\r\n\r\nPosition ScintillaCall::FindTextFull(Scintilla::FindOption searchFlags, TextToFindFull *ft) {\r\n\treturn CallPointer(Message::FindTextFull, static_cast<uintptr_t>(searchFlags), ft);\r\n}\r\n\r\nPosition ScintillaCall::FormatRange(bool draw, void *fr) {\r\n\treturn CallPointer(Message::FormatRange, draw, fr);\r\n}\r\n\r\nPosition ScintillaCall::FormatRangeFull(bool draw, RangeToFormatFull *fr) {\r\n\treturn CallPointer(Message::FormatRangeFull, draw, fr);\r\n}\r\n\r\nvoid ScintillaCall::SetChangeHistory(Scintilla::ChangeHistoryOption changeHistory) {\r\n\tCall(Message::SetChangeHistory, static_cast<uintptr_t>(changeHistory));\r\n}\r\n\r\nChangeHistoryOption ScintillaCall::ChangeHistory() {\r\n\treturn static_cast<Scintilla::ChangeHistoryOption>(Call(Message::GetChangeHistory));\r\n}\r\n\r\nLine ScintillaCall::FirstVisibleLine() {\r\n\treturn Call(Message::GetFirstVisibleLine);\r\n}\r\n\r\nPosition ScintillaCall::GetLine(Line line, char *text) {\r\n\treturn CallPointer(Message::GetLine, line, text);\r\n}\r\n\r\nstd::string ScintillaCall::GetLine(Line line) {\r\n\treturn CallReturnString(Message::GetLine, line);\r\n}\r\n\r\nLine ScintillaCall::LineCount() {\r\n\treturn Call(Message::GetLineCount);\r\n}\r\n\r\nvoid ScintillaCall::AllocateLines(Line lines) {\r\n\tCall(Message::AllocateLines, lines);\r\n}\r\n\r\nvoid ScintillaCall::SetMarginLeft(int pixelWidth) {\r\n\tCall(Message::SetMarginLeft, 0, pixelWidth);\r\n}\r\n\r\nint ScintillaCall::MarginLeft() {\r\n\treturn static_cast<int>(Call(Message::GetMarginLeft));\r\n}\r\n\r\nvoid ScintillaCall::SetMarginRight(int pixelWidth) {\r\n\tCall(Message::SetMarginRight, 0, pixelWidth);\r\n}\r\n\r\nint ScintillaCall::MarginRight() {\r\n\treturn static_cast<int>(Call(Message::GetMarginRight));\r\n}\r\n\r\nbool ScintillaCall::Modify() {\r\n\treturn Call(Message::GetModify);\r\n}\r\n\r\nvoid ScintillaCall::SetSel(Position anchor, Position caret) {\r\n\tCall(Message::SetSel, anchor, caret);\r\n}\r\n\r\nPosition ScintillaCall::GetSelText(char *text) {\r\n\treturn CallPointer(Message::GetSelText, 0, text);\r\n}\r\n\r\nstd::string ScintillaCall::GetSelText() {\r\n\treturn CallReturnString(Message::GetSelText, 0);\r\n}\r\n\r\nPosition ScintillaCall::GetTextRange(void *tr) {\r\n\treturn CallPointer(Message::GetTextRange, 0, tr);\r\n}\r\n\r\nPosition ScintillaCall::GetTextRangeFull(TextRangeFull *tr) {\r\n\treturn CallPointer(Message::GetTextRangeFull, 0, tr);\r\n}\r\n\r\nvoid ScintillaCall::HideSelection(bool hide) {\r\n\tCall(Message::HideSelection, hide);\r\n}\r\n\r\nbool ScintillaCall::SelectionHidden() {\r\n\treturn Call(Message::GetSelectionHidden);\r\n}\r\n\r\nint ScintillaCall::PointXFromPosition(Position pos) {\r\n\treturn static_cast<int>(Call(Message::PointXFromPosition, 0, pos));\r\n}\r\n\r\nint ScintillaCall::PointYFromPosition(Position pos) {\r\n\treturn static_cast<int>(Call(Message::PointYFromPosition, 0, pos));\r\n}\r\n\r\nLine ScintillaCall::LineFromPosition(Position pos) {\r\n\treturn Call(Message::LineFromPosition, pos);\r\n}\r\n\r\nPosition ScintillaCall::PositionFromLine(Line line) {\r\n\treturn Call(Message::PositionFromLine, line);\r\n}\r\n\r\nvoid ScintillaCall::LineScroll(Position columns, Line lines) {\r\n\tCall(Message::LineScroll, columns, lines);\r\n}\r\n\r\nvoid ScintillaCall::ScrollCaret() {\r\n\tCall(Message::ScrollCaret);\r\n}\r\n\r\nvoid ScintillaCall::ScrollRange(Position secondary, Position primary) {\r\n\tCall(Message::ScrollRange, secondary, primary);\r\n}\r\n\r\nvoid ScintillaCall::ReplaceSel(const char *text) {\r\n\tCallString(Message::ReplaceSel, 0, text);\r\n}\r\n\r\nvoid ScintillaCall::SetReadOnly(bool readOnly) {\r\n\tCall(Message::SetReadOnly, readOnly);\r\n}\r\n\r\nvoid ScintillaCall::Null() {\r\n\tCall(Message::Null);\r\n}\r\n\r\nbool ScintillaCall::CanPaste() {\r\n\treturn Call(Message::CanPaste);\r\n}\r\n\r\nbool ScintillaCall::CanUndo() {\r\n\treturn Call(Message::CanUndo);\r\n}\r\n\r\nvoid ScintillaCall::EmptyUndoBuffer() {\r\n\tCall(Message::EmptyUndoBuffer);\r\n}\r\n\r\nvoid ScintillaCall::Undo() {\r\n\tCall(Message::Undo);\r\n}\r\n\r\nvoid ScintillaCall::Cut() {\r\n\tCall(Message::Cut);\r\n}\r\n\r\nvoid ScintillaCall::Copy() {\r\n\tCall(Message::Copy);\r\n}\r\n\r\nvoid ScintillaCall::Paste() {\r\n\tCall(Message::Paste);\r\n}\r\n\r\nvoid ScintillaCall::Clear() {\r\n\tCall(Message::Clear);\r\n}\r\n\r\nvoid ScintillaCall::SetText(const char *text) {\r\n\tCallString(Message::SetText, 0, text);\r\n}\r\n\r\nPosition ScintillaCall::GetText(Position length, char *text) {\r\n\treturn CallPointer(Message::GetText, length, text);\r\n}\r\n\r\nstd::string ScintillaCall::GetText(Position length) {\r\n\treturn CallReturnString(Message::GetText, length);\r\n}\r\n\r\nPosition ScintillaCall::TextLength() {\r\n\treturn Call(Message::GetTextLength);\r\n}\r\n\r\nvoid *ScintillaCall::DirectFunction() {\r\n\treturn reinterpret_cast<void *>(Call(Message::GetDirectFunction));\r\n}\r\n\r\nvoid *ScintillaCall::DirectStatusFunction() {\r\n\treturn reinterpret_cast<void *>(Call(Message::GetDirectStatusFunction));\r\n}\r\n\r\nvoid *ScintillaCall::DirectPointer() {\r\n\treturn reinterpret_cast<void *>(Call(Message::GetDirectPointer));\r\n}\r\n\r\nvoid ScintillaCall::SetOvertype(bool overType) {\r\n\tCall(Message::SetOvertype, overType);\r\n}\r\n\r\nbool ScintillaCall::Overtype() {\r\n\treturn Call(Message::GetOvertype);\r\n}\r\n\r\nvoid ScintillaCall::SetCaretWidth(int pixelWidth) {\r\n\tCall(Message::SetCaretWidth, pixelWidth);\r\n}\r\n\r\nint ScintillaCall::CaretWidth() {\r\n\treturn static_cast<int>(Call(Message::GetCaretWidth));\r\n}\r\n\r\nvoid ScintillaCall::SetTargetStart(Position start) {\r\n\tCall(Message::SetTargetStart, start);\r\n}\r\n\r\nPosition ScintillaCall::TargetStart() {\r\n\treturn Call(Message::GetTargetStart);\r\n}\r\n\r\nvoid ScintillaCall::SetTargetStartVirtualSpace(Position space) {\r\n\tCall(Message::SetTargetStartVirtualSpace, space);\r\n}\r\n\r\nPosition ScintillaCall::TargetStartVirtualSpace() {\r\n\treturn Call(Message::GetTargetStartVirtualSpace);\r\n}\r\n\r\nvoid ScintillaCall::SetTargetEnd(Position end) {\r\n\tCall(Message::SetTargetEnd, end);\r\n}\r\n\r\nPosition ScintillaCall::TargetEnd() {\r\n\treturn Call(Message::GetTargetEnd);\r\n}\r\n\r\nvoid ScintillaCall::SetTargetEndVirtualSpace(Position space) {\r\n\tCall(Message::SetTargetEndVirtualSpace, space);\r\n}\r\n\r\nPosition ScintillaCall::TargetEndVirtualSpace() {\r\n\treturn Call(Message::GetTargetEndVirtualSpace);\r\n}\r\n\r\nvoid ScintillaCall::SetTargetRange(Position start, Position end) {\r\n\tCall(Message::SetTargetRange, start, end);\r\n}\r\n\r\nPosition ScintillaCall::TargetText(char *text) {\r\n\treturn CallPointer(Message::GetTargetText, 0, text);\r\n}\r\n\r\nstd::string ScintillaCall::TargetText() {\r\n\treturn CallReturnString(Message::GetTargetText, 0);\r\n}\r\n\r\nvoid ScintillaCall::TargetFromSelection() {\r\n\tCall(Message::TargetFromSelection);\r\n}\r\n\r\nvoid ScintillaCall::TargetWholeDocument() {\r\n\tCall(Message::TargetWholeDocument);\r\n}\r\n\r\nPosition ScintillaCall::ReplaceTarget(Position length, const char *text) {\r\n\treturn CallString(Message::ReplaceTarget, length, text);\r\n}\r\n\r\nPosition ScintillaCall::ReplaceTargetRE(Position length, const char *text) {\r\n\treturn CallString(Message::ReplaceTargetRE, length, text);\r\n}\r\n\r\nPosition ScintillaCall::ReplaceTargetMinimal(Position length, const char *text) {\r\n\treturn CallString(Message::ReplaceTargetMinimal, length, text);\r\n}\r\n\r\nPosition ScintillaCall::SearchInTarget(Position length, const char *text) {\r\n\treturn CallString(Message::SearchInTarget, length, text);\r\n}\r\n\r\nvoid ScintillaCall::SetSearchFlags(Scintilla::FindOption searchFlags) {\r\n\tCall(Message::SetSearchFlags, static_cast<uintptr_t>(searchFlags));\r\n}\r\n\r\nFindOption ScintillaCall::SearchFlags() {\r\n\treturn static_cast<Scintilla::FindOption>(Call(Message::GetSearchFlags));\r\n}\r\n\r\nvoid ScintillaCall::CallTipShow(Position pos, const char *definition) {\r\n\tCallString(Message::CallTipShow, pos, definition);\r\n}\r\n\r\nvoid ScintillaCall::CallTipCancel() {\r\n\tCall(Message::CallTipCancel);\r\n}\r\n\r\nbool ScintillaCall::CallTipActive() {\r\n\treturn Call(Message::CallTipActive);\r\n}\r\n\r\nPosition ScintillaCall::CallTipPosStart() {\r\n\treturn Call(Message::CallTipPosStart);\r\n}\r\n\r\nvoid ScintillaCall::CallTipSetPosStart(Position posStart) {\r\n\tCall(Message::CallTipSetPosStart, posStart);\r\n}\r\n\r\nvoid ScintillaCall::CallTipSetHlt(Position highlightStart, Position highlightEnd) {\r\n\tCall(Message::CallTipSetHlt, highlightStart, highlightEnd);\r\n}\r\n\r\nvoid ScintillaCall::CallTipSetBack(Colour back) {\r\n\tCall(Message::CallTipSetBack, back);\r\n}\r\n\r\nvoid ScintillaCall::CallTipSetFore(Colour fore) {\r\n\tCall(Message::CallTipSetFore, fore);\r\n}\r\n\r\nvoid ScintillaCall::CallTipSetForeHlt(Colour fore) {\r\n\tCall(Message::CallTipSetForeHlt, fore);\r\n}\r\n\r\nvoid ScintillaCall::CallTipUseStyle(int tabSize) {\r\n\tCall(Message::CallTipUseStyle, tabSize);\r\n}\r\n\r\nvoid ScintillaCall::CallTipSetPosition(bool above) {\r\n\tCall(Message::CallTipSetPosition, above);\r\n}\r\n\r\nLine ScintillaCall::VisibleFromDocLine(Line docLine) {\r\n\treturn Call(Message::VisibleFromDocLine, docLine);\r\n}\r\n\r\nLine ScintillaCall::DocLineFromVisible(Line displayLine) {\r\n\treturn Call(Message::DocLineFromVisible, displayLine);\r\n}\r\n\r\nLine ScintillaCall::WrapCount(Line docLine) {\r\n\treturn Call(Message::WrapCount, docLine);\r\n}\r\n\r\nvoid ScintillaCall::SetFoldLevel(Line line, Scintilla::FoldLevel level) {\r\n\tCall(Message::SetFoldLevel, line, static_cast<intptr_t>(level));\r\n}\r\n\r\nFoldLevel ScintillaCall::FoldLevel(Line line) {\r\n\treturn static_cast<Scintilla::FoldLevel>(Call(Message::GetFoldLevel, line));\r\n}\r\n\r\nLine ScintillaCall::LastChild(Line line, Scintilla::FoldLevel level) {\r\n\treturn Call(Message::GetLastChild, line, static_cast<intptr_t>(level));\r\n}\r\n\r\nLine ScintillaCall::FoldParent(Line line) {\r\n\treturn Call(Message::GetFoldParent, line);\r\n}\r\n\r\nvoid ScintillaCall::ShowLines(Line lineStart, Line lineEnd) {\r\n\tCall(Message::ShowLines, lineStart, lineEnd);\r\n}\r\n\r\nvoid ScintillaCall::HideLines(Line lineStart, Line lineEnd) {\r\n\tCall(Message::HideLines, lineStart, lineEnd);\r\n}\r\n\r\nbool ScintillaCall::LineVisible(Line line) {\r\n\treturn Call(Message::GetLineVisible, line);\r\n}\r\n\r\nbool ScintillaCall::AllLinesVisible() {\r\n\treturn Call(Message::GetAllLinesVisible);\r\n}\r\n\r\nvoid ScintillaCall::SetFoldExpanded(Line line, bool expanded) {\r\n\tCall(Message::SetFoldExpanded, line, expanded);\r\n}\r\n\r\nbool ScintillaCall::FoldExpanded(Line line) {\r\n\treturn Call(Message::GetFoldExpanded, line);\r\n}\r\n\r\nvoid ScintillaCall::ToggleFold(Line line) {\r\n\tCall(Message::ToggleFold, line);\r\n}\r\n\r\nvoid ScintillaCall::ToggleFoldShowText(Line line, const char *text) {\r\n\tCallString(Message::ToggleFoldShowText, line, text);\r\n}\r\n\r\nvoid ScintillaCall::FoldDisplayTextSetStyle(Scintilla::FoldDisplayTextStyle style) {\r\n\tCall(Message::FoldDisplayTextSetStyle, static_cast<uintptr_t>(style));\r\n}\r\n\r\nFoldDisplayTextStyle ScintillaCall::FoldDisplayTextGetStyle() {\r\n\treturn static_cast<Scintilla::FoldDisplayTextStyle>(Call(Message::FoldDisplayTextGetStyle));\r\n}\r\n\r\nvoid ScintillaCall::SetDefaultFoldDisplayText(const char *text) {\r\n\tCallString(Message::SetDefaultFoldDisplayText, 0, text);\r\n}\r\n\r\nint ScintillaCall::GetDefaultFoldDisplayText(char *text) {\r\n\treturn static_cast<int>(CallPointer(Message::GetDefaultFoldDisplayText, 0, text));\r\n}\r\n\r\nstd::string ScintillaCall::GetDefaultFoldDisplayText() {\r\n\treturn CallReturnString(Message::GetDefaultFoldDisplayText, 0);\r\n}\r\n\r\nvoid ScintillaCall::FoldLine(Line line, Scintilla::FoldAction action) {\r\n\tCall(Message::FoldLine, line, static_cast<intptr_t>(action));\r\n}\r\n\r\nvoid ScintillaCall::FoldChildren(Line line, Scintilla::FoldAction action) {\r\n\tCall(Message::FoldChildren, line, static_cast<intptr_t>(action));\r\n}\r\n\r\nvoid ScintillaCall::ExpandChildren(Line line, Scintilla::FoldLevel level) {\r\n\tCall(Message::ExpandChildren, line, static_cast<intptr_t>(level));\r\n}\r\n\r\nvoid ScintillaCall::FoldAll(Scintilla::FoldAction action) {\r\n\tCall(Message::FoldAll, static_cast<uintptr_t>(action));\r\n}\r\n\r\nvoid ScintillaCall::EnsureVisible(Line line) {\r\n\tCall(Message::EnsureVisible, line);\r\n}\r\n\r\nvoid ScintillaCall::SetAutomaticFold(Scintilla::AutomaticFold automaticFold) {\r\n\tCall(Message::SetAutomaticFold, static_cast<uintptr_t>(automaticFold));\r\n}\r\n\r\nAutomaticFold ScintillaCall::AutomaticFold() {\r\n\treturn static_cast<Scintilla::AutomaticFold>(Call(Message::GetAutomaticFold));\r\n}\r\n\r\nvoid ScintillaCall::SetFoldFlags(Scintilla::FoldFlag flags) {\r\n\tCall(Message::SetFoldFlags, static_cast<uintptr_t>(flags));\r\n}\r\n\r\nvoid ScintillaCall::EnsureVisibleEnforcePolicy(Line line) {\r\n\tCall(Message::EnsureVisibleEnforcePolicy, line);\r\n}\r\n\r\nvoid ScintillaCall::SetTabIndents(bool tabIndents) {\r\n\tCall(Message::SetTabIndents, tabIndents);\r\n}\r\n\r\nbool ScintillaCall::TabIndents() {\r\n\treturn Call(Message::GetTabIndents);\r\n}\r\n\r\nvoid ScintillaCall::SetBackSpaceUnIndents(bool bsUnIndents) {\r\n\tCall(Message::SetBackSpaceUnIndents, bsUnIndents);\r\n}\r\n\r\nbool ScintillaCall::BackSpaceUnIndents() {\r\n\treturn Call(Message::GetBackSpaceUnIndents);\r\n}\r\n\r\nvoid ScintillaCall::SetMouseDwellTime(int periodMilliseconds) {\r\n\tCall(Message::SetMouseDwellTime, periodMilliseconds);\r\n}\r\n\r\nint ScintillaCall::MouseDwellTime() {\r\n\treturn static_cast<int>(Call(Message::GetMouseDwellTime));\r\n}\r\n\r\nPosition ScintillaCall::WordStartPosition(Position pos, bool onlyWordCharacters) {\r\n\treturn Call(Message::WordStartPosition, pos, onlyWordCharacters);\r\n}\r\n\r\nPosition ScintillaCall::WordEndPosition(Position pos, bool onlyWordCharacters) {\r\n\treturn Call(Message::WordEndPosition, pos, onlyWordCharacters);\r\n}\r\n\r\nbool ScintillaCall::IsRangeWord(Position start, Position end) {\r\n\treturn Call(Message::IsRangeWord, start, end);\r\n}\r\n\r\nvoid ScintillaCall::SetIdleStyling(Scintilla::IdleStyling idleStyling) {\r\n\tCall(Message::SetIdleStyling, static_cast<uintptr_t>(idleStyling));\r\n}\r\n\r\nIdleStyling ScintillaCall::IdleStyling() {\r\n\treturn static_cast<Scintilla::IdleStyling>(Call(Message::GetIdleStyling));\r\n}\r\n\r\nvoid ScintillaCall::SetWrapMode(Scintilla::Wrap wrapMode) {\r\n\tCall(Message::SetWrapMode, static_cast<uintptr_t>(wrapMode));\r\n}\r\n\r\nWrap ScintillaCall::WrapMode() {\r\n\treturn static_cast<Scintilla::Wrap>(Call(Message::GetWrapMode));\r\n}\r\n\r\nvoid ScintillaCall::SetWrapVisualFlags(Scintilla::WrapVisualFlag wrapVisualFlags) {\r\n\tCall(Message::SetWrapVisualFlags, static_cast<uintptr_t>(wrapVisualFlags));\r\n}\r\n\r\nWrapVisualFlag ScintillaCall::WrapVisualFlags() {\r\n\treturn static_cast<Scintilla::WrapVisualFlag>(Call(Message::GetWrapVisualFlags));\r\n}\r\n\r\nvoid ScintillaCall::SetWrapVisualFlagsLocation(Scintilla::WrapVisualLocation wrapVisualFlagsLocation) {\r\n\tCall(Message::SetWrapVisualFlagsLocation, static_cast<uintptr_t>(wrapVisualFlagsLocation));\r\n}\r\n\r\nWrapVisualLocation ScintillaCall::WrapVisualFlagsLocation() {\r\n\treturn static_cast<Scintilla::WrapVisualLocation>(Call(Message::GetWrapVisualFlagsLocation));\r\n}\r\n\r\nvoid ScintillaCall::SetWrapStartIndent(int indent) {\r\n\tCall(Message::SetWrapStartIndent, indent);\r\n}\r\n\r\nint ScintillaCall::WrapStartIndent() {\r\n\treturn static_cast<int>(Call(Message::GetWrapStartIndent));\r\n}\r\n\r\nvoid ScintillaCall::SetWrapIndentMode(Scintilla::WrapIndentMode wrapIndentMode) {\r\n\tCall(Message::SetWrapIndentMode, static_cast<uintptr_t>(wrapIndentMode));\r\n}\r\n\r\nWrapIndentMode ScintillaCall::WrapIndentMode() {\r\n\treturn static_cast<Scintilla::WrapIndentMode>(Call(Message::GetWrapIndentMode));\r\n}\r\n\r\nvoid ScintillaCall::SetLayoutCache(Scintilla::LineCache cacheMode) {\r\n\tCall(Message::SetLayoutCache, static_cast<uintptr_t>(cacheMode));\r\n}\r\n\r\nLineCache ScintillaCall::LayoutCache() {\r\n\treturn static_cast<Scintilla::LineCache>(Call(Message::GetLayoutCache));\r\n}\r\n\r\nvoid ScintillaCall::SetScrollWidth(int pixelWidth) {\r\n\tCall(Message::SetScrollWidth, pixelWidth);\r\n}\r\n\r\nint ScintillaCall::ScrollWidth() {\r\n\treturn static_cast<int>(Call(Message::GetScrollWidth));\r\n}\r\n\r\nvoid ScintillaCall::SetScrollWidthTracking(bool tracking) {\r\n\tCall(Message::SetScrollWidthTracking, tracking);\r\n}\r\n\r\nbool ScintillaCall::ScrollWidthTracking() {\r\n\treturn Call(Message::GetScrollWidthTracking);\r\n}\r\n\r\nint ScintillaCall::TextWidth(int style, const char *text) {\r\n\treturn static_cast<int>(CallString(Message::TextWidth, style, text));\r\n}\r\n\r\nvoid ScintillaCall::SetEndAtLastLine(bool endAtLastLine) {\r\n\tCall(Message::SetEndAtLastLine, endAtLastLine);\r\n}\r\n\r\nbool ScintillaCall::EndAtLastLine() {\r\n\treturn Call(Message::GetEndAtLastLine);\r\n}\r\n\r\nint ScintillaCall::TextHeight(Line line) {\r\n\treturn static_cast<int>(Call(Message::TextHeight, line));\r\n}\r\n\r\nvoid ScintillaCall::SetVScrollBar(bool visible) {\r\n\tCall(Message::SetVScrollBar, visible);\r\n}\r\n\r\nbool ScintillaCall::VScrollBar() {\r\n\treturn Call(Message::GetVScrollBar);\r\n}\r\n\r\nvoid ScintillaCall::AppendText(Position length, const char *text) {\r\n\tCallString(Message::AppendText, length, text);\r\n}\r\n\r\nPhasesDraw ScintillaCall::PhasesDraw() {\r\n\treturn static_cast<Scintilla::PhasesDraw>(Call(Message::GetPhasesDraw));\r\n}\r\n\r\nvoid ScintillaCall::SetPhasesDraw(Scintilla::PhasesDraw phases) {\r\n\tCall(Message::SetPhasesDraw, static_cast<uintptr_t>(phases));\r\n}\r\n\r\nvoid ScintillaCall::SetFontQuality(Scintilla::FontQuality fontQuality) {\r\n\tCall(Message::SetFontQuality, static_cast<uintptr_t>(fontQuality));\r\n}\r\n\r\nFontQuality ScintillaCall::FontQuality() {\r\n\treturn static_cast<Scintilla::FontQuality>(Call(Message::GetFontQuality));\r\n}\r\n\r\nvoid ScintillaCall::SetFirstVisibleLine(Line displayLine) {\r\n\tCall(Message::SetFirstVisibleLine, displayLine);\r\n}\r\n\r\nvoid ScintillaCall::SetMultiPaste(Scintilla::MultiPaste multiPaste) {\r\n\tCall(Message::SetMultiPaste, static_cast<uintptr_t>(multiPaste));\r\n}\r\n\r\nMultiPaste ScintillaCall::MultiPaste() {\r\n\treturn static_cast<Scintilla::MultiPaste>(Call(Message::GetMultiPaste));\r\n}\r\n\r\nint ScintillaCall::Tag(int tagNumber, char *tagValue) {\r\n\treturn static_cast<int>(CallPointer(Message::GetTag, tagNumber, tagValue));\r\n}\r\n\r\nstd::string ScintillaCall::Tag(int tagNumber) {\r\n\treturn CallReturnString(Message::GetTag, tagNumber);\r\n}\r\n\r\nvoid ScintillaCall::LinesJoin() {\r\n\tCall(Message::LinesJoin);\r\n}\r\n\r\nvoid ScintillaCall::LinesSplit(int pixelWidth) {\r\n\tCall(Message::LinesSplit, pixelWidth);\r\n}\r\n\r\nvoid ScintillaCall::SetFoldMarginColour(bool useSetting, Colour back) {\r\n\tCall(Message::SetFoldMarginColour, useSetting, back);\r\n}\r\n\r\nvoid ScintillaCall::SetFoldMarginHiColour(bool useSetting, Colour fore) {\r\n\tCall(Message::SetFoldMarginHiColour, useSetting, fore);\r\n}\r\n\r\nvoid ScintillaCall::SetAccessibility(Scintilla::Accessibility accessibility) {\r\n\tCall(Message::SetAccessibility, static_cast<uintptr_t>(accessibility));\r\n}\r\n\r\nAccessibility ScintillaCall::Accessibility() {\r\n\treturn static_cast<Scintilla::Accessibility>(Call(Message::GetAccessibility));\r\n}\r\n\r\nvoid ScintillaCall::LineDown() {\r\n\tCall(Message::LineDown);\r\n}\r\n\r\nvoid ScintillaCall::LineDownExtend() {\r\n\tCall(Message::LineDownExtend);\r\n}\r\n\r\nvoid ScintillaCall::LineUp() {\r\n\tCall(Message::LineUp);\r\n}\r\n\r\nvoid ScintillaCall::LineUpExtend() {\r\n\tCall(Message::LineUpExtend);\r\n}\r\n\r\nvoid ScintillaCall::CharLeft() {\r\n\tCall(Message::CharLeft);\r\n}\r\n\r\nvoid ScintillaCall::CharLeftExtend() {\r\n\tCall(Message::CharLeftExtend);\r\n}\r\n\r\nvoid ScintillaCall::CharRight() {\r\n\tCall(Message::CharRight);\r\n}\r\n\r\nvoid ScintillaCall::CharRightExtend() {\r\n\tCall(Message::CharRightExtend);\r\n}\r\n\r\nvoid ScintillaCall::WordLeft() {\r\n\tCall(Message::WordLeft);\r\n}\r\n\r\nvoid ScintillaCall::WordLeftExtend() {\r\n\tCall(Message::WordLeftExtend);\r\n}\r\n\r\nvoid ScintillaCall::WordRight() {\r\n\tCall(Message::WordRight);\r\n}\r\n\r\nvoid ScintillaCall::WordRightExtend() {\r\n\tCall(Message::WordRightExtend);\r\n}\r\n\r\nvoid ScintillaCall::Home() {\r\n\tCall(Message::Home);\r\n}\r\n\r\nvoid ScintillaCall::HomeExtend() {\r\n\tCall(Message::HomeExtend);\r\n}\r\n\r\nvoid ScintillaCall::LineEnd() {\r\n\tCall(Message::LineEnd);\r\n}\r\n\r\nvoid ScintillaCall::LineEndExtend() {\r\n\tCall(Message::LineEndExtend);\r\n}\r\n\r\nvoid ScintillaCall::DocumentStart() {\r\n\tCall(Message::DocumentStart);\r\n}\r\n\r\nvoid ScintillaCall::DocumentStartExtend() {\r\n\tCall(Message::DocumentStartExtend);\r\n}\r\n\r\nvoid ScintillaCall::DocumentEnd() {\r\n\tCall(Message::DocumentEnd);\r\n}\r\n\r\nvoid ScintillaCall::DocumentEndExtend() {\r\n\tCall(Message::DocumentEndExtend);\r\n}\r\n\r\nvoid ScintillaCall::PageUp() {\r\n\tCall(Message::PageUp);\r\n}\r\n\r\nvoid ScintillaCall::PageUpExtend() {\r\n\tCall(Message::PageUpExtend);\r\n}\r\n\r\nvoid ScintillaCall::PageDown() {\r\n\tCall(Message::PageDown);\r\n}\r\n\r\nvoid ScintillaCall::PageDownExtend() {\r\n\tCall(Message::PageDownExtend);\r\n}\r\n\r\nvoid ScintillaCall::EditToggleOvertype() {\r\n\tCall(Message::EditToggleOvertype);\r\n}\r\n\r\nvoid ScintillaCall::Cancel() {\r\n\tCall(Message::Cancel);\r\n}\r\n\r\nvoid ScintillaCall::DeleteBack() {\r\n\tCall(Message::DeleteBack);\r\n}\r\n\r\nvoid ScintillaCall::Tab() {\r\n\tCall(Message::Tab);\r\n}\r\n\r\nvoid ScintillaCall::BackTab() {\r\n\tCall(Message::BackTab);\r\n}\r\n\r\nvoid ScintillaCall::NewLine() {\r\n\tCall(Message::NewLine);\r\n}\r\n\r\nvoid ScintillaCall::FormFeed() {\r\n\tCall(Message::FormFeed);\r\n}\r\n\r\nvoid ScintillaCall::VCHome() {\r\n\tCall(Message::VCHome);\r\n}\r\n\r\nvoid ScintillaCall::VCHomeExtend() {\r\n\tCall(Message::VCHomeExtend);\r\n}\r\n\r\nvoid ScintillaCall::ZoomIn() {\r\n\tCall(Message::ZoomIn);\r\n}\r\n\r\nvoid ScintillaCall::ZoomOut() {\r\n\tCall(Message::ZoomOut);\r\n}\r\n\r\nvoid ScintillaCall::DelWordLeft() {\r\n\tCall(Message::DelWordLeft);\r\n}\r\n\r\nvoid ScintillaCall::DelWordRight() {\r\n\tCall(Message::DelWordRight);\r\n}\r\n\r\nvoid ScintillaCall::DelWordRightEnd() {\r\n\tCall(Message::DelWordRightEnd);\r\n}\r\n\r\nvoid ScintillaCall::LineCut() {\r\n\tCall(Message::LineCut);\r\n}\r\n\r\nvoid ScintillaCall::LineDelete() {\r\n\tCall(Message::LineDelete);\r\n}\r\n\r\nvoid ScintillaCall::LineTranspose() {\r\n\tCall(Message::LineTranspose);\r\n}\r\n\r\nvoid ScintillaCall::LineReverse() {\r\n\tCall(Message::LineReverse);\r\n}\r\n\r\nvoid ScintillaCall::LineDuplicate() {\r\n\tCall(Message::LineDuplicate);\r\n}\r\n\r\nvoid ScintillaCall::LowerCase() {\r\n\tCall(Message::LowerCase);\r\n}\r\n\r\nvoid ScintillaCall::UpperCase() {\r\n\tCall(Message::UpperCase);\r\n}\r\n\r\nvoid ScintillaCall::LineScrollDown() {\r\n\tCall(Message::LineScrollDown);\r\n}\r\n\r\nvoid ScintillaCall::LineScrollUp() {\r\n\tCall(Message::LineScrollUp);\r\n}\r\n\r\nvoid ScintillaCall::DeleteBackNotLine() {\r\n\tCall(Message::DeleteBackNotLine);\r\n}\r\n\r\nvoid ScintillaCall::HomeDisplay() {\r\n\tCall(Message::HomeDisplay);\r\n}\r\n\r\nvoid ScintillaCall::HomeDisplayExtend() {\r\n\tCall(Message::HomeDisplayExtend);\r\n}\r\n\r\nvoid ScintillaCall::LineEndDisplay() {\r\n\tCall(Message::LineEndDisplay);\r\n}\r\n\r\nvoid ScintillaCall::LineEndDisplayExtend() {\r\n\tCall(Message::LineEndDisplayExtend);\r\n}\r\n\r\nvoid ScintillaCall::HomeWrap() {\r\n\tCall(Message::HomeWrap);\r\n}\r\n\r\nvoid ScintillaCall::HomeWrapExtend() {\r\n\tCall(Message::HomeWrapExtend);\r\n}\r\n\r\nvoid ScintillaCall::LineEndWrap() {\r\n\tCall(Message::LineEndWrap);\r\n}\r\n\r\nvoid ScintillaCall::LineEndWrapExtend() {\r\n\tCall(Message::LineEndWrapExtend);\r\n}\r\n\r\nvoid ScintillaCall::VCHomeWrap() {\r\n\tCall(Message::VCHomeWrap);\r\n}\r\n\r\nvoid ScintillaCall::VCHomeWrapExtend() {\r\n\tCall(Message::VCHomeWrapExtend);\r\n}\r\n\r\nvoid ScintillaCall::LineCopy() {\r\n\tCall(Message::LineCopy);\r\n}\r\n\r\nvoid ScintillaCall::MoveCaretInsideView() {\r\n\tCall(Message::MoveCaretInsideView);\r\n}\r\n\r\nPosition ScintillaCall::LineLength(Line line) {\r\n\treturn Call(Message::LineLength, line);\r\n}\r\n\r\nvoid ScintillaCall::BraceHighlight(Position posA, Position posB) {\r\n\tCall(Message::BraceHighlight, posA, posB);\r\n}\r\n\r\nvoid ScintillaCall::BraceHighlightIndicator(bool useSetting, int indicator) {\r\n\tCall(Message::BraceHighlightIndicator, useSetting, indicator);\r\n}\r\n\r\nvoid ScintillaCall::BraceBadLight(Position pos) {\r\n\tCall(Message::BraceBadLight, pos);\r\n}\r\n\r\nvoid ScintillaCall::BraceBadLightIndicator(bool useSetting, int indicator) {\r\n\tCall(Message::BraceBadLightIndicator, useSetting, indicator);\r\n}\r\n\r\nPosition ScintillaCall::BraceMatch(Position pos, int maxReStyle) {\r\n\treturn Call(Message::BraceMatch, pos, maxReStyle);\r\n}\r\n\r\nPosition ScintillaCall::BraceMatchNext(Position pos, Position startPos) {\r\n\treturn Call(Message::BraceMatchNext, pos, startPos);\r\n}\r\n\r\nbool ScintillaCall::ViewEOL() {\r\n\treturn Call(Message::GetViewEOL);\r\n}\r\n\r\nvoid ScintillaCall::SetViewEOL(bool visible) {\r\n\tCall(Message::SetViewEOL, visible);\r\n}\r\n\r\nIDocumentEditable *ScintillaCall::DocPointer() {\r\n\treturn reinterpret_cast<IDocumentEditable *>(Call(Message::GetDocPointer));\r\n}\r\n\r\nvoid ScintillaCall::SetDocPointer(IDocumentEditable *doc) {\r\n\tCallPointer(Message::SetDocPointer, 0, doc);\r\n}\r\n\r\nvoid ScintillaCall::SetModEventMask(Scintilla::ModificationFlags eventMask) {\r\n\tCall(Message::SetModEventMask, static_cast<uintptr_t>(eventMask));\r\n}\r\n\r\nPosition ScintillaCall::EdgeColumn() {\r\n\treturn Call(Message::GetEdgeColumn);\r\n}\r\n\r\nvoid ScintillaCall::SetEdgeColumn(Position column) {\r\n\tCall(Message::SetEdgeColumn, column);\r\n}\r\n\r\nEdgeVisualStyle ScintillaCall::EdgeMode() {\r\n\treturn static_cast<Scintilla::EdgeVisualStyle>(Call(Message::GetEdgeMode));\r\n}\r\n\r\nvoid ScintillaCall::SetEdgeMode(Scintilla::EdgeVisualStyle edgeMode) {\r\n\tCall(Message::SetEdgeMode, static_cast<uintptr_t>(edgeMode));\r\n}\r\n\r\nColour ScintillaCall::EdgeColour() {\r\n\treturn static_cast<Colour>(Call(Message::GetEdgeColour));\r\n}\r\n\r\nvoid ScintillaCall::SetEdgeColour(Colour edgeColour) {\r\n\tCall(Message::SetEdgeColour, edgeColour);\r\n}\r\n\r\nvoid ScintillaCall::MultiEdgeAddLine(Position column, Colour edgeColour) {\r\n\tCall(Message::MultiEdgeAddLine, column, edgeColour);\r\n}\r\n\r\nvoid ScintillaCall::MultiEdgeClearAll() {\r\n\tCall(Message::MultiEdgeClearAll);\r\n}\r\n\r\nPosition ScintillaCall::MultiEdgeColumn(int which) {\r\n\treturn Call(Message::GetMultiEdgeColumn, which);\r\n}\r\n\r\nvoid ScintillaCall::SearchAnchor() {\r\n\tCall(Message::SearchAnchor);\r\n}\r\n\r\nPosition ScintillaCall::SearchNext(Scintilla::FindOption searchFlags, const char *text) {\r\n\treturn CallString(Message::SearchNext, static_cast<uintptr_t>(searchFlags), text);\r\n}\r\n\r\nPosition ScintillaCall::SearchPrev(Scintilla::FindOption searchFlags, const char *text) {\r\n\treturn CallString(Message::SearchPrev, static_cast<uintptr_t>(searchFlags), text);\r\n}\r\n\r\nLine ScintillaCall::LinesOnScreen() {\r\n\treturn Call(Message::LinesOnScreen);\r\n}\r\n\r\nvoid ScintillaCall::UsePopUp(Scintilla::PopUp popUpMode) {\r\n\tCall(Message::UsePopUp, static_cast<uintptr_t>(popUpMode));\r\n}\r\n\r\nbool ScintillaCall::SelectionIsRectangle() {\r\n\treturn Call(Message::SelectionIsRectangle);\r\n}\r\n\r\nvoid ScintillaCall::SetZoom(int zoomInPoints) {\r\n\tCall(Message::SetZoom, zoomInPoints);\r\n}\r\n\r\nint ScintillaCall::Zoom() {\r\n\treturn static_cast<int>(Call(Message::GetZoom));\r\n}\r\n\r\nIDocumentEditable *ScintillaCall::CreateDocument(Position bytes, Scintilla::DocumentOption documentOptions) {\r\n\treturn reinterpret_cast<IDocumentEditable *>(Call(Message::CreateDocument, bytes, static_cast<intptr_t>(documentOptions)));\r\n}\r\n\r\nvoid ScintillaCall::AddRefDocument(IDocumentEditable *doc) {\r\n\tCallPointer(Message::AddRefDocument, 0, doc);\r\n}\r\n\r\nvoid ScintillaCall::ReleaseDocument(IDocumentEditable *doc) {\r\n\tCallPointer(Message::ReleaseDocument, 0, doc);\r\n}\r\n\r\nDocumentOption ScintillaCall::DocumentOptions() {\r\n\treturn static_cast<Scintilla::DocumentOption>(Call(Message::GetDocumentOptions));\r\n}\r\n\r\nModificationFlags ScintillaCall::ModEventMask() {\r\n\treturn static_cast<Scintilla::ModificationFlags>(Call(Message::GetModEventMask));\r\n}\r\n\r\nvoid ScintillaCall::SetCommandEvents(bool commandEvents) {\r\n\tCall(Message::SetCommandEvents, commandEvents);\r\n}\r\n\r\nbool ScintillaCall::CommandEvents() {\r\n\treturn Call(Message::GetCommandEvents);\r\n}\r\n\r\nvoid ScintillaCall::SetFocus(bool focus) {\r\n\tCall(Message::SetFocus, focus);\r\n}\r\n\r\nbool ScintillaCall::Focus() {\r\n\treturn Call(Message::GetFocus);\r\n}\r\n\r\nvoid ScintillaCall::SetStatus(Scintilla::Status status) {\r\n\tCall(Message::SetStatus, static_cast<uintptr_t>(status));\r\n}\r\n\r\nStatus ScintillaCall::Status() {\r\n\treturn static_cast<Scintilla::Status>(Call(Message::GetStatus));\r\n}\r\n\r\nvoid ScintillaCall::SetMouseDownCaptures(bool captures) {\r\n\tCall(Message::SetMouseDownCaptures, captures);\r\n}\r\n\r\nbool ScintillaCall::MouseDownCaptures() {\r\n\treturn Call(Message::GetMouseDownCaptures);\r\n}\r\n\r\nvoid ScintillaCall::SetMouseWheelCaptures(bool captures) {\r\n\tCall(Message::SetMouseWheelCaptures, captures);\r\n}\r\n\r\nbool ScintillaCall::MouseWheelCaptures() {\r\n\treturn Call(Message::GetMouseWheelCaptures);\r\n}\r\n\r\nvoid ScintillaCall::SetCursor(Scintilla::CursorShape cursorType) {\r\n\tCall(Message::SetCursor, static_cast<uintptr_t>(cursorType));\r\n}\r\n\r\nCursorShape ScintillaCall::Cursor() {\r\n\treturn static_cast<Scintilla::CursorShape>(Call(Message::GetCursor));\r\n}\r\n\r\nvoid ScintillaCall::SetControlCharSymbol(int symbol) {\r\n\tCall(Message::SetControlCharSymbol, symbol);\r\n}\r\n\r\nint ScintillaCall::ControlCharSymbol() {\r\n\treturn static_cast<int>(Call(Message::GetControlCharSymbol));\r\n}\r\n\r\nvoid ScintillaCall::WordPartLeft() {\r\n\tCall(Message::WordPartLeft);\r\n}\r\n\r\nvoid ScintillaCall::WordPartLeftExtend() {\r\n\tCall(Message::WordPartLeftExtend);\r\n}\r\n\r\nvoid ScintillaCall::WordPartRight() {\r\n\tCall(Message::WordPartRight);\r\n}\r\n\r\nvoid ScintillaCall::WordPartRightExtend() {\r\n\tCall(Message::WordPartRightExtend);\r\n}\r\n\r\nvoid ScintillaCall::SetVisiblePolicy(Scintilla::VisiblePolicy visiblePolicy, int visibleSlop) {\r\n\tCall(Message::SetVisiblePolicy, static_cast<uintptr_t>(visiblePolicy), visibleSlop);\r\n}\r\n\r\nvoid ScintillaCall::DelLineLeft() {\r\n\tCall(Message::DelLineLeft);\r\n}\r\n\r\nvoid ScintillaCall::DelLineRight() {\r\n\tCall(Message::DelLineRight);\r\n}\r\n\r\nvoid ScintillaCall::SetXOffset(int xOffset) {\r\n\tCall(Message::SetXOffset, xOffset);\r\n}\r\n\r\nint ScintillaCall::XOffset() {\r\n\treturn static_cast<int>(Call(Message::GetXOffset));\r\n}\r\n\r\nvoid ScintillaCall::ChooseCaretX() {\r\n\tCall(Message::ChooseCaretX);\r\n}\r\n\r\nvoid ScintillaCall::GrabFocus() {\r\n\tCall(Message::GrabFocus);\r\n}\r\n\r\nvoid ScintillaCall::SetXCaretPolicy(Scintilla::CaretPolicy caretPolicy, int caretSlop) {\r\n\tCall(Message::SetXCaretPolicy, static_cast<uintptr_t>(caretPolicy), caretSlop);\r\n}\r\n\r\nvoid ScintillaCall::SetYCaretPolicy(Scintilla::CaretPolicy caretPolicy, int caretSlop) {\r\n\tCall(Message::SetYCaretPolicy, static_cast<uintptr_t>(caretPolicy), caretSlop);\r\n}\r\n\r\nvoid ScintillaCall::SetPrintWrapMode(Scintilla::Wrap wrapMode) {\r\n\tCall(Message::SetPrintWrapMode, static_cast<uintptr_t>(wrapMode));\r\n}\r\n\r\nWrap ScintillaCall::PrintWrapMode() {\r\n\treturn static_cast<Scintilla::Wrap>(Call(Message::GetPrintWrapMode));\r\n}\r\n\r\nvoid ScintillaCall::SetHotspotActiveFore(bool useSetting, Colour fore) {\r\n\tCall(Message::SetHotspotActiveFore, useSetting, fore);\r\n}\r\n\r\nColour ScintillaCall::HotspotActiveFore() {\r\n\treturn static_cast<Colour>(Call(Message::GetHotspotActiveFore));\r\n}\r\n\r\nvoid ScintillaCall::SetHotspotActiveBack(bool useSetting, Colour back) {\r\n\tCall(Message::SetHotspotActiveBack, useSetting, back);\r\n}\r\n\r\nColour ScintillaCall::HotspotActiveBack() {\r\n\treturn static_cast<Colour>(Call(Message::GetHotspotActiveBack));\r\n}\r\n\r\nvoid ScintillaCall::SetHotspotActiveUnderline(bool underline) {\r\n\tCall(Message::SetHotspotActiveUnderline, underline);\r\n}\r\n\r\nbool ScintillaCall::HotspotActiveUnderline() {\r\n\treturn Call(Message::GetHotspotActiveUnderline);\r\n}\r\n\r\nvoid ScintillaCall::SetHotspotSingleLine(bool singleLine) {\r\n\tCall(Message::SetHotspotSingleLine, singleLine);\r\n}\r\n\r\nbool ScintillaCall::HotspotSingleLine() {\r\n\treturn Call(Message::GetHotspotSingleLine);\r\n}\r\n\r\nvoid ScintillaCall::ParaDown() {\r\n\tCall(Message::ParaDown);\r\n}\r\n\r\nvoid ScintillaCall::ParaDownExtend() {\r\n\tCall(Message::ParaDownExtend);\r\n}\r\n\r\nvoid ScintillaCall::ParaUp() {\r\n\tCall(Message::ParaUp);\r\n}\r\n\r\nvoid ScintillaCall::ParaUpExtend() {\r\n\tCall(Message::ParaUpExtend);\r\n}\r\n\r\nPosition ScintillaCall::PositionBefore(Position pos) {\r\n\treturn Call(Message::PositionBefore, pos);\r\n}\r\n\r\nPosition ScintillaCall::PositionAfter(Position pos) {\r\n\treturn Call(Message::PositionAfter, pos);\r\n}\r\n\r\nPosition ScintillaCall::PositionRelative(Position pos, Position relative) {\r\n\treturn Call(Message::PositionRelative, pos, relative);\r\n}\r\n\r\nPosition ScintillaCall::PositionRelativeCodeUnits(Position pos, Position relative) {\r\n\treturn Call(Message::PositionRelativeCodeUnits, pos, relative);\r\n}\r\n\r\nvoid ScintillaCall::CopyRange(Position start, Position end) {\r\n\tCall(Message::CopyRange, start, end);\r\n}\r\n\r\nvoid ScintillaCall::CopyText(Position length, const char *text) {\r\n\tCallString(Message::CopyText, length, text);\r\n}\r\n\r\nvoid ScintillaCall::SetSelectionMode(Scintilla::SelectionMode selectionMode) {\r\n\tCall(Message::SetSelectionMode, static_cast<uintptr_t>(selectionMode));\r\n}\r\n\r\nvoid ScintillaCall::ChangeSelectionMode(Scintilla::SelectionMode selectionMode) {\r\n\tCall(Message::ChangeSelectionMode, static_cast<uintptr_t>(selectionMode));\r\n}\r\n\r\nSelectionMode ScintillaCall::SelectionMode() {\r\n\treturn static_cast<Scintilla::SelectionMode>(Call(Message::GetSelectionMode));\r\n}\r\n\r\nvoid ScintillaCall::SetMoveExtendsSelection(bool moveExtendsSelection) {\r\n\tCall(Message::SetMoveExtendsSelection, moveExtendsSelection);\r\n}\r\n\r\nbool ScintillaCall::MoveExtendsSelection() {\r\n\treturn Call(Message::GetMoveExtendsSelection);\r\n}\r\n\r\nPosition ScintillaCall::GetLineSelStartPosition(Line line) {\r\n\treturn Call(Message::GetLineSelStartPosition, line);\r\n}\r\n\r\nPosition ScintillaCall::GetLineSelEndPosition(Line line) {\r\n\treturn Call(Message::GetLineSelEndPosition, line);\r\n}\r\n\r\nvoid ScintillaCall::LineDownRectExtend() {\r\n\tCall(Message::LineDownRectExtend);\r\n}\r\n\r\nvoid ScintillaCall::LineUpRectExtend() {\r\n\tCall(Message::LineUpRectExtend);\r\n}\r\n\r\nvoid ScintillaCall::CharLeftRectExtend() {\r\n\tCall(Message::CharLeftRectExtend);\r\n}\r\n\r\nvoid ScintillaCall::CharRightRectExtend() {\r\n\tCall(Message::CharRightRectExtend);\r\n}\r\n\r\nvoid ScintillaCall::HomeRectExtend() {\r\n\tCall(Message::HomeRectExtend);\r\n}\r\n\r\nvoid ScintillaCall::VCHomeRectExtend() {\r\n\tCall(Message::VCHomeRectExtend);\r\n}\r\n\r\nvoid ScintillaCall::LineEndRectExtend() {\r\n\tCall(Message::LineEndRectExtend);\r\n}\r\n\r\nvoid ScintillaCall::PageUpRectExtend() {\r\n\tCall(Message::PageUpRectExtend);\r\n}\r\n\r\nvoid ScintillaCall::PageDownRectExtend() {\r\n\tCall(Message::PageDownRectExtend);\r\n}\r\n\r\nvoid ScintillaCall::StutteredPageUp() {\r\n\tCall(Message::StutteredPageUp);\r\n}\r\n\r\nvoid ScintillaCall::StutteredPageUpExtend() {\r\n\tCall(Message::StutteredPageUpExtend);\r\n}\r\n\r\nvoid ScintillaCall::StutteredPageDown() {\r\n\tCall(Message::StutteredPageDown);\r\n}\r\n\r\nvoid ScintillaCall::StutteredPageDownExtend() {\r\n\tCall(Message::StutteredPageDownExtend);\r\n}\r\n\r\nvoid ScintillaCall::WordLeftEnd() {\r\n\tCall(Message::WordLeftEnd);\r\n}\r\n\r\nvoid ScintillaCall::WordLeftEndExtend() {\r\n\tCall(Message::WordLeftEndExtend);\r\n}\r\n\r\nvoid ScintillaCall::WordRightEnd() {\r\n\tCall(Message::WordRightEnd);\r\n}\r\n\r\nvoid ScintillaCall::WordRightEndExtend() {\r\n\tCall(Message::WordRightEndExtend);\r\n}\r\n\r\nvoid ScintillaCall::SetWhitespaceChars(const char *characters) {\r\n\tCallString(Message::SetWhitespaceChars, 0, characters);\r\n}\r\n\r\nint ScintillaCall::WhitespaceChars(char *characters) {\r\n\treturn static_cast<int>(CallPointer(Message::GetWhitespaceChars, 0, characters));\r\n}\r\n\r\nstd::string ScintillaCall::WhitespaceChars() {\r\n\treturn CallReturnString(Message::GetWhitespaceChars, 0);\r\n}\r\n\r\nvoid ScintillaCall::SetPunctuationChars(const char *characters) {\r\n\tCallString(Message::SetPunctuationChars, 0, characters);\r\n}\r\n\r\nint ScintillaCall::PunctuationChars(char *characters) {\r\n\treturn static_cast<int>(CallPointer(Message::GetPunctuationChars, 0, characters));\r\n}\r\n\r\nstd::string ScintillaCall::PunctuationChars() {\r\n\treturn CallReturnString(Message::GetPunctuationChars, 0);\r\n}\r\n\r\nvoid ScintillaCall::SetCharsDefault() {\r\n\tCall(Message::SetCharsDefault);\r\n}\r\n\r\nint ScintillaCall::AutoCGetCurrent() {\r\n\treturn static_cast<int>(Call(Message::AutoCGetCurrent));\r\n}\r\n\r\nint ScintillaCall::AutoCGetCurrentText(char *text) {\r\n\treturn static_cast<int>(CallPointer(Message::AutoCGetCurrentText, 0, text));\r\n}\r\n\r\nstd::string ScintillaCall::AutoCGetCurrentText() {\r\n\treturn CallReturnString(Message::AutoCGetCurrentText, 0);\r\n}\r\n\r\nvoid ScintillaCall::AutoCSetCaseInsensitiveBehaviour(Scintilla::CaseInsensitiveBehaviour behaviour) {\r\n\tCall(Message::AutoCSetCaseInsensitiveBehaviour, static_cast<uintptr_t>(behaviour));\r\n}\r\n\r\nCaseInsensitiveBehaviour ScintillaCall::AutoCGetCaseInsensitiveBehaviour() {\r\n\treturn static_cast<Scintilla::CaseInsensitiveBehaviour>(Call(Message::AutoCGetCaseInsensitiveBehaviour));\r\n}\r\n\r\nvoid ScintillaCall::AutoCSetMulti(Scintilla::MultiAutoComplete multi) {\r\n\tCall(Message::AutoCSetMulti, static_cast<uintptr_t>(multi));\r\n}\r\n\r\nMultiAutoComplete ScintillaCall::AutoCGetMulti() {\r\n\treturn static_cast<Scintilla::MultiAutoComplete>(Call(Message::AutoCGetMulti));\r\n}\r\n\r\nvoid ScintillaCall::AutoCSetOrder(Scintilla::Ordering order) {\r\n\tCall(Message::AutoCSetOrder, static_cast<uintptr_t>(order));\r\n}\r\n\r\nOrdering ScintillaCall::AutoCGetOrder() {\r\n\treturn static_cast<Scintilla::Ordering>(Call(Message::AutoCGetOrder));\r\n}\r\n\r\nvoid ScintillaCall::Allocate(Position bytes) {\r\n\tCall(Message::Allocate, bytes);\r\n}\r\n\r\nPosition ScintillaCall::TargetAsUTF8(char *s) {\r\n\treturn CallPointer(Message::TargetAsUTF8, 0, s);\r\n}\r\n\r\nstd::string ScintillaCall::TargetAsUTF8() {\r\n\treturn CallReturnString(Message::TargetAsUTF8, 0);\r\n}\r\n\r\nvoid ScintillaCall::SetLengthForEncode(Position bytes) {\r\n\tCall(Message::SetLengthForEncode, bytes);\r\n}\r\n\r\nPosition ScintillaCall::EncodedFromUTF8(const char *utf8, char *encoded) {\r\n\treturn CallPointer(Message::EncodedFromUTF8, reinterpret_cast<uintptr_t>(utf8), encoded);\r\n}\r\n\r\nstd::string ScintillaCall::EncodedFromUTF8(const char *utf8) {\r\n\treturn CallReturnString(Message::EncodedFromUTF8, reinterpret_cast<uintptr_t>(utf8));\r\n}\r\n\r\nPosition ScintillaCall::FindColumn(Line line, Position column) {\r\n\treturn Call(Message::FindColumn, line, column);\r\n}\r\n\r\nCaretSticky ScintillaCall::CaretSticky() {\r\n\treturn static_cast<Scintilla::CaretSticky>(Call(Message::GetCaretSticky));\r\n}\r\n\r\nvoid ScintillaCall::SetCaretSticky(Scintilla::CaretSticky useCaretStickyBehaviour) {\r\n\tCall(Message::SetCaretSticky, static_cast<uintptr_t>(useCaretStickyBehaviour));\r\n}\r\n\r\nvoid ScintillaCall::ToggleCaretSticky() {\r\n\tCall(Message::ToggleCaretSticky);\r\n}\r\n\r\nvoid ScintillaCall::SetPasteConvertEndings(bool convert) {\r\n\tCall(Message::SetPasteConvertEndings, convert);\r\n}\r\n\r\nbool ScintillaCall::PasteConvertEndings() {\r\n\treturn Call(Message::GetPasteConvertEndings);\r\n}\r\n\r\nvoid ScintillaCall::ReplaceRectangular(Position length, const char *text) {\r\n\tCallString(Message::ReplaceRectangular, length, text);\r\n}\r\n\r\nvoid ScintillaCall::SelectionDuplicate() {\r\n\tCall(Message::SelectionDuplicate);\r\n}\r\n\r\nvoid ScintillaCall::SetCaretLineBackAlpha(Scintilla::Alpha alpha) {\r\n\tCall(Message::SetCaretLineBackAlpha, static_cast<uintptr_t>(alpha));\r\n}\r\n\r\nAlpha ScintillaCall::CaretLineBackAlpha() {\r\n\treturn static_cast<Scintilla::Alpha>(Call(Message::GetCaretLineBackAlpha));\r\n}\r\n\r\nvoid ScintillaCall::SetCaretStyle(Scintilla::CaretStyle caretStyle) {\r\n\tCall(Message::SetCaretStyle, static_cast<uintptr_t>(caretStyle));\r\n}\r\n\r\nCaretStyle ScintillaCall::CaretStyle() {\r\n\treturn static_cast<Scintilla::CaretStyle>(Call(Message::GetCaretStyle));\r\n}\r\n\r\nvoid ScintillaCall::SetIndicatorCurrent(int indicator) {\r\n\tCall(Message::SetIndicatorCurrent, indicator);\r\n}\r\n\r\nint ScintillaCall::IndicatorCurrent() {\r\n\treturn static_cast<int>(Call(Message::GetIndicatorCurrent));\r\n}\r\n\r\nvoid ScintillaCall::SetIndicatorValue(int value) {\r\n\tCall(Message::SetIndicatorValue, value);\r\n}\r\n\r\nint ScintillaCall::IndicatorValue() {\r\n\treturn static_cast<int>(Call(Message::GetIndicatorValue));\r\n}\r\n\r\nvoid ScintillaCall::IndicatorFillRange(Position start, Position lengthFill) {\r\n\tCall(Message::IndicatorFillRange, start, lengthFill);\r\n}\r\n\r\nvoid ScintillaCall::IndicatorClearRange(Position start, Position lengthClear) {\r\n\tCall(Message::IndicatorClearRange, start, lengthClear);\r\n}\r\n\r\nint ScintillaCall::IndicatorAllOnFor(Position pos) {\r\n\treturn static_cast<int>(Call(Message::IndicatorAllOnFor, pos));\r\n}\r\n\r\nint ScintillaCall::IndicatorValueAt(int indicator, Position pos) {\r\n\treturn static_cast<int>(Call(Message::IndicatorValueAt, indicator, pos));\r\n}\r\n\r\nPosition ScintillaCall::IndicatorStart(int indicator, Position pos) {\r\n\treturn Call(Message::IndicatorStart, indicator, pos);\r\n}\r\n\r\nPosition ScintillaCall::IndicatorEnd(int indicator, Position pos) {\r\n\treturn Call(Message::IndicatorEnd, indicator, pos);\r\n}\r\n\r\nvoid ScintillaCall::SetPositionCache(int size) {\r\n\tCall(Message::SetPositionCache, size);\r\n}\r\n\r\nint ScintillaCall::PositionCache() {\r\n\treturn static_cast<int>(Call(Message::GetPositionCache));\r\n}\r\n\r\nvoid ScintillaCall::SetLayoutThreads(int threads) {\r\n\tCall(Message::SetLayoutThreads, threads);\r\n}\r\n\r\nint ScintillaCall::LayoutThreads() {\r\n\treturn static_cast<int>(Call(Message::GetLayoutThreads));\r\n}\r\n\r\nvoid ScintillaCall::CopyAllowLine() {\r\n\tCall(Message::CopyAllowLine);\r\n}\r\n\r\nvoid *ScintillaCall::CharacterPointer() {\r\n\treturn reinterpret_cast<void *>(Call(Message::GetCharacterPointer));\r\n}\r\n\r\nvoid *ScintillaCall::RangePointer(Position start, Position lengthRange) {\r\n\treturn reinterpret_cast<void *>(Call(Message::GetRangePointer, start, lengthRange));\r\n}\r\n\r\nPosition ScintillaCall::GapPosition() {\r\n\treturn Call(Message::GetGapPosition);\r\n}\r\n\r\nvoid ScintillaCall::IndicSetAlpha(int indicator, Scintilla::Alpha alpha) {\r\n\tCall(Message::IndicSetAlpha, indicator, static_cast<intptr_t>(alpha));\r\n}\r\n\r\nAlpha ScintillaCall::IndicGetAlpha(int indicator) {\r\n\treturn static_cast<Scintilla::Alpha>(Call(Message::IndicGetAlpha, indicator));\r\n}\r\n\r\nvoid ScintillaCall::IndicSetOutlineAlpha(int indicator, Scintilla::Alpha alpha) {\r\n\tCall(Message::IndicSetOutlineAlpha, indicator, static_cast<intptr_t>(alpha));\r\n}\r\n\r\nAlpha ScintillaCall::IndicGetOutlineAlpha(int indicator) {\r\n\treturn static_cast<Scintilla::Alpha>(Call(Message::IndicGetOutlineAlpha, indicator));\r\n}\r\n\r\nvoid ScintillaCall::SetExtraAscent(int extraAscent) {\r\n\tCall(Message::SetExtraAscent, extraAscent);\r\n}\r\n\r\nint ScintillaCall::ExtraAscent() {\r\n\treturn static_cast<int>(Call(Message::GetExtraAscent));\r\n}\r\n\r\nvoid ScintillaCall::SetExtraDescent(int extraDescent) {\r\n\tCall(Message::SetExtraDescent, extraDescent);\r\n}\r\n\r\nint ScintillaCall::ExtraDescent() {\r\n\treturn static_cast<int>(Call(Message::GetExtraDescent));\r\n}\r\n\r\nint ScintillaCall::MarkerSymbolDefined(int markerNumber) {\r\n\treturn static_cast<int>(Call(Message::MarkerSymbolDefined, markerNumber));\r\n}\r\n\r\nvoid ScintillaCall::MarginSetText(Line line, const char *text) {\r\n\tCallString(Message::MarginSetText, line, text);\r\n}\r\n\r\nint ScintillaCall::MarginGetText(Line line, char *text) {\r\n\treturn static_cast<int>(CallPointer(Message::MarginGetText, line, text));\r\n}\r\n\r\nstd::string ScintillaCall::MarginGetText(Line line) {\r\n\treturn CallReturnString(Message::MarginGetText, line);\r\n}\r\n\r\nvoid ScintillaCall::MarginSetStyle(Line line, int style) {\r\n\tCall(Message::MarginSetStyle, line, style);\r\n}\r\n\r\nint ScintillaCall::MarginGetStyle(Line line) {\r\n\treturn static_cast<int>(Call(Message::MarginGetStyle, line));\r\n}\r\n\r\nvoid ScintillaCall::MarginSetStyles(Line line, const char *styles) {\r\n\tCallString(Message::MarginSetStyles, line, styles);\r\n}\r\n\r\nint ScintillaCall::MarginGetStyles(Line line, char *styles) {\r\n\treturn static_cast<int>(CallPointer(Message::MarginGetStyles, line, styles));\r\n}\r\n\r\nstd::string ScintillaCall::MarginGetStyles(Line line) {\r\n\treturn CallReturnString(Message::MarginGetStyles, line);\r\n}\r\n\r\nvoid ScintillaCall::MarginTextClearAll() {\r\n\tCall(Message::MarginTextClearAll);\r\n}\r\n\r\nvoid ScintillaCall::MarginSetStyleOffset(int style) {\r\n\tCall(Message::MarginSetStyleOffset, style);\r\n}\r\n\r\nint ScintillaCall::MarginGetStyleOffset() {\r\n\treturn static_cast<int>(Call(Message::MarginGetStyleOffset));\r\n}\r\n\r\nvoid ScintillaCall::SetMarginOptions(Scintilla::MarginOption marginOptions) {\r\n\tCall(Message::SetMarginOptions, static_cast<uintptr_t>(marginOptions));\r\n}\r\n\r\nMarginOption ScintillaCall::MarginOptions() {\r\n\treturn static_cast<Scintilla::MarginOption>(Call(Message::GetMarginOptions));\r\n}\r\n\r\nvoid ScintillaCall::AnnotationSetText(Line line, const char *text) {\r\n\tCallString(Message::AnnotationSetText, line, text);\r\n}\r\n\r\nint ScintillaCall::AnnotationGetText(Line line, char *text) {\r\n\treturn static_cast<int>(CallPointer(Message::AnnotationGetText, line, text));\r\n}\r\n\r\nstd::string ScintillaCall::AnnotationGetText(Line line) {\r\n\treturn CallReturnString(Message::AnnotationGetText, line);\r\n}\r\n\r\nvoid ScintillaCall::AnnotationSetStyle(Line line, int style) {\r\n\tCall(Message::AnnotationSetStyle, line, style);\r\n}\r\n\r\nint ScintillaCall::AnnotationGetStyle(Line line) {\r\n\treturn static_cast<int>(Call(Message::AnnotationGetStyle, line));\r\n}\r\n\r\nvoid ScintillaCall::AnnotationSetStyles(Line line, const char *styles) {\r\n\tCallString(Message::AnnotationSetStyles, line, styles);\r\n}\r\n\r\nint ScintillaCall::AnnotationGetStyles(Line line, char *styles) {\r\n\treturn static_cast<int>(CallPointer(Message::AnnotationGetStyles, line, styles));\r\n}\r\n\r\nstd::string ScintillaCall::AnnotationGetStyles(Line line) {\r\n\treturn CallReturnString(Message::AnnotationGetStyles, line);\r\n}\r\n\r\nint ScintillaCall::AnnotationGetLines(Line line) {\r\n\treturn static_cast<int>(Call(Message::AnnotationGetLines, line));\r\n}\r\n\r\nvoid ScintillaCall::AnnotationClearAll() {\r\n\tCall(Message::AnnotationClearAll);\r\n}\r\n\r\nvoid ScintillaCall::AnnotationSetVisible(Scintilla::AnnotationVisible visible) {\r\n\tCall(Message::AnnotationSetVisible, static_cast<uintptr_t>(visible));\r\n}\r\n\r\nAnnotationVisible ScintillaCall::AnnotationGetVisible() {\r\n\treturn static_cast<Scintilla::AnnotationVisible>(Call(Message::AnnotationGetVisible));\r\n}\r\n\r\nvoid ScintillaCall::AnnotationSetStyleOffset(int style) {\r\n\tCall(Message::AnnotationSetStyleOffset, style);\r\n}\r\n\r\nint ScintillaCall::AnnotationGetStyleOffset() {\r\n\treturn static_cast<int>(Call(Message::AnnotationGetStyleOffset));\r\n}\r\n\r\nvoid ScintillaCall::ReleaseAllExtendedStyles() {\r\n\tCall(Message::ReleaseAllExtendedStyles);\r\n}\r\n\r\nint ScintillaCall::AllocateExtendedStyles(int numberStyles) {\r\n\treturn static_cast<int>(Call(Message::AllocateExtendedStyles, numberStyles));\r\n}\r\n\r\nvoid ScintillaCall::AddUndoAction(int token, Scintilla::UndoFlags flags) {\r\n\tCall(Message::AddUndoAction, token, static_cast<intptr_t>(flags));\r\n}\r\n\r\nPosition ScintillaCall::CharPositionFromPoint(int x, int y) {\r\n\treturn Call(Message::CharPositionFromPoint, x, y);\r\n}\r\n\r\nPosition ScintillaCall::CharPositionFromPointClose(int x, int y) {\r\n\treturn Call(Message::CharPositionFromPointClose, x, y);\r\n}\r\n\r\nvoid ScintillaCall::SetMouseSelectionRectangularSwitch(bool mouseSelectionRectangularSwitch) {\r\n\tCall(Message::SetMouseSelectionRectangularSwitch, mouseSelectionRectangularSwitch);\r\n}\r\n\r\nbool ScintillaCall::MouseSelectionRectangularSwitch() {\r\n\treturn Call(Message::GetMouseSelectionRectangularSwitch);\r\n}\r\n\r\nvoid ScintillaCall::SetMultipleSelection(bool multipleSelection) {\r\n\tCall(Message::SetMultipleSelection, multipleSelection);\r\n}\r\n\r\nbool ScintillaCall::MultipleSelection() {\r\n\treturn Call(Message::GetMultipleSelection);\r\n}\r\n\r\nvoid ScintillaCall::SetAdditionalSelectionTyping(bool additionalSelectionTyping) {\r\n\tCall(Message::SetAdditionalSelectionTyping, additionalSelectionTyping);\r\n}\r\n\r\nbool ScintillaCall::AdditionalSelectionTyping() {\r\n\treturn Call(Message::GetAdditionalSelectionTyping);\r\n}\r\n\r\nvoid ScintillaCall::SetAdditionalCaretsBlink(bool additionalCaretsBlink) {\r\n\tCall(Message::SetAdditionalCaretsBlink, additionalCaretsBlink);\r\n}\r\n\r\nbool ScintillaCall::AdditionalCaretsBlink() {\r\n\treturn Call(Message::GetAdditionalCaretsBlink);\r\n}\r\n\r\nvoid ScintillaCall::SetAdditionalCaretsVisible(bool additionalCaretsVisible) {\r\n\tCall(Message::SetAdditionalCaretsVisible, additionalCaretsVisible);\r\n}\r\n\r\nbool ScintillaCall::AdditionalCaretsVisible() {\r\n\treturn Call(Message::GetAdditionalCaretsVisible);\r\n}\r\n\r\nint ScintillaCall::Selections() {\r\n\treturn static_cast<int>(Call(Message::GetSelections));\r\n}\r\n\r\nbool ScintillaCall::SelectionEmpty() {\r\n\treturn Call(Message::GetSelectionEmpty);\r\n}\r\n\r\nvoid ScintillaCall::ClearSelections() {\r\n\tCall(Message::ClearSelections);\r\n}\r\n\r\nvoid ScintillaCall::SetSelection(Position caret, Position anchor) {\r\n\tCall(Message::SetSelection, caret, anchor);\r\n}\r\n\r\nvoid ScintillaCall::AddSelection(Position caret, Position anchor) {\r\n\tCall(Message::AddSelection, caret, anchor);\r\n}\r\n\r\nint ScintillaCall::SelectionFromPoint(int x, int y) {\r\n\treturn static_cast<int>(Call(Message::SelectionFromPoint, x, y));\r\n}\r\n\r\nvoid ScintillaCall::DropSelectionN(int selection) {\r\n\tCall(Message::DropSelectionN, selection);\r\n}\r\n\r\nvoid ScintillaCall::SetMainSelection(int selection) {\r\n\tCall(Message::SetMainSelection, selection);\r\n}\r\n\r\nint ScintillaCall::MainSelection() {\r\n\treturn static_cast<int>(Call(Message::GetMainSelection));\r\n}\r\n\r\nvoid ScintillaCall::SetSelectionNCaret(int selection, Position caret) {\r\n\tCall(Message::SetSelectionNCaret, selection, caret);\r\n}\r\n\r\nPosition ScintillaCall::SelectionNCaret(int selection) {\r\n\treturn Call(Message::GetSelectionNCaret, selection);\r\n}\r\n\r\nvoid ScintillaCall::SetSelectionNAnchor(int selection, Position anchor) {\r\n\tCall(Message::SetSelectionNAnchor, selection, anchor);\r\n}\r\n\r\nPosition ScintillaCall::SelectionNAnchor(int selection) {\r\n\treturn Call(Message::GetSelectionNAnchor, selection);\r\n}\r\n\r\nvoid ScintillaCall::SetSelectionNCaretVirtualSpace(int selection, Position space) {\r\n\tCall(Message::SetSelectionNCaretVirtualSpace, selection, space);\r\n}\r\n\r\nPosition ScintillaCall::SelectionNCaretVirtualSpace(int selection) {\r\n\treturn Call(Message::GetSelectionNCaretVirtualSpace, selection);\r\n}\r\n\r\nvoid ScintillaCall::SetSelectionNAnchorVirtualSpace(int selection, Position space) {\r\n\tCall(Message::SetSelectionNAnchorVirtualSpace, selection, space);\r\n}\r\n\r\nPosition ScintillaCall::SelectionNAnchorVirtualSpace(int selection) {\r\n\treturn Call(Message::GetSelectionNAnchorVirtualSpace, selection);\r\n}\r\n\r\nvoid ScintillaCall::SetSelectionNStart(int selection, Position anchor) {\r\n\tCall(Message::SetSelectionNStart, selection, anchor);\r\n}\r\n\r\nPosition ScintillaCall::SelectionNStart(int selection) {\r\n\treturn Call(Message::GetSelectionNStart, selection);\r\n}\r\n\r\nPosition ScintillaCall::SelectionNStartVirtualSpace(int selection) {\r\n\treturn Call(Message::GetSelectionNStartVirtualSpace, selection);\r\n}\r\n\r\nvoid ScintillaCall::SetSelectionNEnd(int selection, Position caret) {\r\n\tCall(Message::SetSelectionNEnd, selection, caret);\r\n}\r\n\r\nPosition ScintillaCall::SelectionNEndVirtualSpace(int selection) {\r\n\treturn Call(Message::GetSelectionNEndVirtualSpace, selection);\r\n}\r\n\r\nPosition ScintillaCall::SelectionNEnd(int selection) {\r\n\treturn Call(Message::GetSelectionNEnd, selection);\r\n}\r\n\r\nvoid ScintillaCall::SetRectangularSelectionCaret(Position caret) {\r\n\tCall(Message::SetRectangularSelectionCaret, caret);\r\n}\r\n\r\nPosition ScintillaCall::RectangularSelectionCaret() {\r\n\treturn Call(Message::GetRectangularSelectionCaret);\r\n}\r\n\r\nvoid ScintillaCall::SetRectangularSelectionAnchor(Position anchor) {\r\n\tCall(Message::SetRectangularSelectionAnchor, anchor);\r\n}\r\n\r\nPosition ScintillaCall::RectangularSelectionAnchor() {\r\n\treturn Call(Message::GetRectangularSelectionAnchor);\r\n}\r\n\r\nvoid ScintillaCall::SetRectangularSelectionCaretVirtualSpace(Position space) {\r\n\tCall(Message::SetRectangularSelectionCaretVirtualSpace, space);\r\n}\r\n\r\nPosition ScintillaCall::RectangularSelectionCaretVirtualSpace() {\r\n\treturn Call(Message::GetRectangularSelectionCaretVirtualSpace);\r\n}\r\n\r\nvoid ScintillaCall::SetRectangularSelectionAnchorVirtualSpace(Position space) {\r\n\tCall(Message::SetRectangularSelectionAnchorVirtualSpace, space);\r\n}\r\n\r\nPosition ScintillaCall::RectangularSelectionAnchorVirtualSpace() {\r\n\treturn Call(Message::GetRectangularSelectionAnchorVirtualSpace);\r\n}\r\n\r\nvoid ScintillaCall::SetVirtualSpaceOptions(Scintilla::VirtualSpace virtualSpaceOptions) {\r\n\tCall(Message::SetVirtualSpaceOptions, static_cast<uintptr_t>(virtualSpaceOptions));\r\n}\r\n\r\nVirtualSpace ScintillaCall::VirtualSpaceOptions() {\r\n\treturn static_cast<Scintilla::VirtualSpace>(Call(Message::GetVirtualSpaceOptions));\r\n}\r\n\r\nvoid ScintillaCall::SetRectangularSelectionModifier(int modifier) {\r\n\tCall(Message::SetRectangularSelectionModifier, modifier);\r\n}\r\n\r\nint ScintillaCall::RectangularSelectionModifier() {\r\n\treturn static_cast<int>(Call(Message::GetRectangularSelectionModifier));\r\n}\r\n\r\nvoid ScintillaCall::SetAdditionalSelFore(Colour fore) {\r\n\tCall(Message::SetAdditionalSelFore, fore);\r\n}\r\n\r\nvoid ScintillaCall::SetAdditionalSelBack(Colour back) {\r\n\tCall(Message::SetAdditionalSelBack, back);\r\n}\r\n\r\nvoid ScintillaCall::SetAdditionalSelAlpha(Scintilla::Alpha alpha) {\r\n\tCall(Message::SetAdditionalSelAlpha, static_cast<uintptr_t>(alpha));\r\n}\r\n\r\nAlpha ScintillaCall::AdditionalSelAlpha() {\r\n\treturn static_cast<Scintilla::Alpha>(Call(Message::GetAdditionalSelAlpha));\r\n}\r\n\r\nvoid ScintillaCall::SetAdditionalCaretFore(Colour fore) {\r\n\tCall(Message::SetAdditionalCaretFore, fore);\r\n}\r\n\r\nColour ScintillaCall::AdditionalCaretFore() {\r\n\treturn static_cast<Colour>(Call(Message::GetAdditionalCaretFore));\r\n}\r\n\r\nvoid ScintillaCall::RotateSelection() {\r\n\tCall(Message::RotateSelection);\r\n}\r\n\r\nvoid ScintillaCall::SwapMainAnchorCaret() {\r\n\tCall(Message::SwapMainAnchorCaret);\r\n}\r\n\r\nvoid ScintillaCall::MultipleSelectAddNext() {\r\n\tCall(Message::MultipleSelectAddNext);\r\n}\r\n\r\nvoid ScintillaCall::MultipleSelectAddEach() {\r\n\tCall(Message::MultipleSelectAddEach);\r\n}\r\n\r\nint ScintillaCall::ChangeLexerState(Position start, Position end) {\r\n\treturn static_cast<int>(Call(Message::ChangeLexerState, start, end));\r\n}\r\n\r\nLine ScintillaCall::ContractedFoldNext(Line lineStart) {\r\n\treturn Call(Message::ContractedFoldNext, lineStart);\r\n}\r\n\r\nvoid ScintillaCall::VerticalCentreCaret() {\r\n\tCall(Message::VerticalCentreCaret);\r\n}\r\n\r\nvoid ScintillaCall::MoveSelectedLinesUp() {\r\n\tCall(Message::MoveSelectedLinesUp);\r\n}\r\n\r\nvoid ScintillaCall::MoveSelectedLinesDown() {\r\n\tCall(Message::MoveSelectedLinesDown);\r\n}\r\n\r\nvoid ScintillaCall::SetIdentifier(int identifier) {\r\n\tCall(Message::SetIdentifier, identifier);\r\n}\r\n\r\nint ScintillaCall::Identifier() {\r\n\treturn static_cast<int>(Call(Message::GetIdentifier));\r\n}\r\n\r\nvoid ScintillaCall::RGBAImageSetWidth(int width) {\r\n\tCall(Message::RGBAImageSetWidth, width);\r\n}\r\n\r\nvoid ScintillaCall::RGBAImageSetHeight(int height) {\r\n\tCall(Message::RGBAImageSetHeight, height);\r\n}\r\n\r\nvoid ScintillaCall::RGBAImageSetScale(int scalePercent) {\r\n\tCall(Message::RGBAImageSetScale, scalePercent);\r\n}\r\n\r\nvoid ScintillaCall::MarkerDefineRGBAImage(int markerNumber, const char *pixels) {\r\n\tCallString(Message::MarkerDefineRGBAImage, markerNumber, pixels);\r\n}\r\n\r\nvoid ScintillaCall::RegisterRGBAImage(int type, const char *pixels) {\r\n\tCallString(Message::RegisterRGBAImage, type, pixels);\r\n}\r\n\r\nvoid ScintillaCall::ScrollToStart() {\r\n\tCall(Message::ScrollToStart);\r\n}\r\n\r\nvoid ScintillaCall::ScrollToEnd() {\r\n\tCall(Message::ScrollToEnd);\r\n}\r\n\r\nvoid ScintillaCall::SetTechnology(Scintilla::Technology technology) {\r\n\tCall(Message::SetTechnology, static_cast<uintptr_t>(technology));\r\n}\r\n\r\nTechnology ScintillaCall::Technology() {\r\n\treturn static_cast<Scintilla::Technology>(Call(Message::GetTechnology));\r\n}\r\n\r\nvoid *ScintillaCall::CreateLoader(Position bytes, Scintilla::DocumentOption documentOptions) {\r\n\treturn reinterpret_cast<void *>(Call(Message::CreateLoader, bytes, static_cast<intptr_t>(documentOptions)));\r\n}\r\n\r\nvoid ScintillaCall::FindIndicatorShow(Position start, Position end) {\r\n\tCall(Message::FindIndicatorShow, start, end);\r\n}\r\n\r\nvoid ScintillaCall::FindIndicatorFlash(Position start, Position end) {\r\n\tCall(Message::FindIndicatorFlash, start, end);\r\n}\r\n\r\nvoid ScintillaCall::FindIndicatorHide() {\r\n\tCall(Message::FindIndicatorHide);\r\n}\r\n\r\nvoid ScintillaCall::VCHomeDisplay() {\r\n\tCall(Message::VCHomeDisplay);\r\n}\r\n\r\nvoid ScintillaCall::VCHomeDisplayExtend() {\r\n\tCall(Message::VCHomeDisplayExtend);\r\n}\r\n\r\nbool ScintillaCall::CaretLineVisibleAlways() {\r\n\treturn Call(Message::GetCaretLineVisibleAlways);\r\n}\r\n\r\nvoid ScintillaCall::SetCaretLineVisibleAlways(bool alwaysVisible) {\r\n\tCall(Message::SetCaretLineVisibleAlways, alwaysVisible);\r\n}\r\n\r\nvoid ScintillaCall::SetLineEndTypesAllowed(Scintilla::LineEndType lineEndBitSet) {\r\n\tCall(Message::SetLineEndTypesAllowed, static_cast<uintptr_t>(lineEndBitSet));\r\n}\r\n\r\nLineEndType ScintillaCall::LineEndTypesAllowed() {\r\n\treturn static_cast<Scintilla::LineEndType>(Call(Message::GetLineEndTypesAllowed));\r\n}\r\n\r\nLineEndType ScintillaCall::LineEndTypesActive() {\r\n\treturn static_cast<Scintilla::LineEndType>(Call(Message::GetLineEndTypesActive));\r\n}\r\n\r\nvoid ScintillaCall::SetRepresentation(const char *encodedCharacter, const char *representation) {\r\n\tCallString(Message::SetRepresentation, reinterpret_cast<uintptr_t>(encodedCharacter), representation);\r\n}\r\n\r\nint ScintillaCall::Representation(const char *encodedCharacter, char *representation) {\r\n\treturn static_cast<int>(CallPointer(Message::GetRepresentation, reinterpret_cast<uintptr_t>(encodedCharacter), representation));\r\n}\r\n\r\nstd::string ScintillaCall::Representation(const char *encodedCharacter) {\r\n\treturn CallReturnString(Message::GetRepresentation, reinterpret_cast<uintptr_t>(encodedCharacter));\r\n}\r\n\r\nvoid ScintillaCall::ClearRepresentation(const char *encodedCharacter) {\r\n\tCall(Message::ClearRepresentation, reinterpret_cast<uintptr_t>(encodedCharacter));\r\n}\r\n\r\nvoid ScintillaCall::ClearAllRepresentations() {\r\n\tCall(Message::ClearAllRepresentations);\r\n}\r\n\r\nvoid ScintillaCall::SetRepresentationAppearance(const char *encodedCharacter, Scintilla::RepresentationAppearance appearance) {\r\n\tCall(Message::SetRepresentationAppearance, reinterpret_cast<uintptr_t>(encodedCharacter), static_cast<intptr_t>(appearance));\r\n}\r\n\r\nRepresentationAppearance ScintillaCall::RepresentationAppearance(const char *encodedCharacter) {\r\n\treturn static_cast<Scintilla::RepresentationAppearance>(Call(Message::GetRepresentationAppearance, reinterpret_cast<uintptr_t>(encodedCharacter)));\r\n}\r\n\r\nvoid ScintillaCall::SetRepresentationColour(const char *encodedCharacter, ColourAlpha colour) {\r\n\tCall(Message::SetRepresentationColour, reinterpret_cast<uintptr_t>(encodedCharacter), colour);\r\n}\r\n\r\nColourAlpha ScintillaCall::RepresentationColour(const char *encodedCharacter) {\r\n\treturn static_cast<ColourAlpha>(Call(Message::GetRepresentationColour, reinterpret_cast<uintptr_t>(encodedCharacter)));\r\n}\r\n\r\nvoid ScintillaCall::EOLAnnotationSetText(Line line, const char *text) {\r\n\tCallString(Message::EOLAnnotationSetText, line, text);\r\n}\r\n\r\nint ScintillaCall::EOLAnnotationGetText(Line line, char *text) {\r\n\treturn static_cast<int>(CallPointer(Message::EOLAnnotationGetText, line, text));\r\n}\r\n\r\nstd::string ScintillaCall::EOLAnnotationGetText(Line line) {\r\n\treturn CallReturnString(Message::EOLAnnotationGetText, line);\r\n}\r\n\r\nvoid ScintillaCall::EOLAnnotationSetStyle(Line line, int style) {\r\n\tCall(Message::EOLAnnotationSetStyle, line, style);\r\n}\r\n\r\nint ScintillaCall::EOLAnnotationGetStyle(Line line) {\r\n\treturn static_cast<int>(Call(Message::EOLAnnotationGetStyle, line));\r\n}\r\n\r\nvoid ScintillaCall::EOLAnnotationClearAll() {\r\n\tCall(Message::EOLAnnotationClearAll);\r\n}\r\n\r\nvoid ScintillaCall::EOLAnnotationSetVisible(Scintilla::EOLAnnotationVisible visible) {\r\n\tCall(Message::EOLAnnotationSetVisible, static_cast<uintptr_t>(visible));\r\n}\r\n\r\nEOLAnnotationVisible ScintillaCall::EOLAnnotationGetVisible() {\r\n\treturn static_cast<Scintilla::EOLAnnotationVisible>(Call(Message::EOLAnnotationGetVisible));\r\n}\r\n\r\nvoid ScintillaCall::EOLAnnotationSetStyleOffset(int style) {\r\n\tCall(Message::EOLAnnotationSetStyleOffset, style);\r\n}\r\n\r\nint ScintillaCall::EOLAnnotationGetStyleOffset() {\r\n\treturn static_cast<int>(Call(Message::EOLAnnotationGetStyleOffset));\r\n}\r\n\r\nbool ScintillaCall::SupportsFeature(Scintilla::Supports feature) {\r\n\treturn Call(Message::SupportsFeature, static_cast<uintptr_t>(feature));\r\n}\r\n\r\nLineCharacterIndexType ScintillaCall::LineCharacterIndex() {\r\n\treturn static_cast<Scintilla::LineCharacterIndexType>(Call(Message::GetLineCharacterIndex));\r\n}\r\n\r\nvoid ScintillaCall::AllocateLineCharacterIndex(Scintilla::LineCharacterIndexType lineCharacterIndex) {\r\n\tCall(Message::AllocateLineCharacterIndex, static_cast<uintptr_t>(lineCharacterIndex));\r\n}\r\n\r\nvoid ScintillaCall::ReleaseLineCharacterIndex(Scintilla::LineCharacterIndexType lineCharacterIndex) {\r\n\tCall(Message::ReleaseLineCharacterIndex, static_cast<uintptr_t>(lineCharacterIndex));\r\n}\r\n\r\nLine ScintillaCall::LineFromIndexPosition(Position pos, Scintilla::LineCharacterIndexType lineCharacterIndex) {\r\n\treturn Call(Message::LineFromIndexPosition, pos, static_cast<intptr_t>(lineCharacterIndex));\r\n}\r\n\r\nPosition ScintillaCall::IndexPositionFromLine(Line line, Scintilla::LineCharacterIndexType lineCharacterIndex) {\r\n\treturn Call(Message::IndexPositionFromLine, line, static_cast<intptr_t>(lineCharacterIndex));\r\n}\r\n\r\nvoid ScintillaCall::StartRecord() {\r\n\tCall(Message::StartRecord);\r\n}\r\n\r\nvoid ScintillaCall::StopRecord() {\r\n\tCall(Message::StopRecord);\r\n}\r\n\r\nint ScintillaCall::Lexer() {\r\n\treturn static_cast<int>(Call(Message::GetLexer));\r\n}\r\n\r\nvoid ScintillaCall::Colourise(Position start, Position end) {\r\n\tCall(Message::Colourise, start, end);\r\n}\r\n\r\nvoid ScintillaCall::SetProperty(const char *key, const char *value) {\r\n\tCallString(Message::SetProperty, reinterpret_cast<uintptr_t>(key), value);\r\n}\r\n\r\nvoid ScintillaCall::SetKeyWords(int keyWordSet, const char *keyWords) {\r\n\tCallString(Message::SetKeyWords, keyWordSet, keyWords);\r\n}\r\n\r\nint ScintillaCall::Property(const char *key, char *value) {\r\n\treturn static_cast<int>(CallPointer(Message::GetProperty, reinterpret_cast<uintptr_t>(key), value));\r\n}\r\n\r\nstd::string ScintillaCall::Property(const char *key) {\r\n\treturn CallReturnString(Message::GetProperty, reinterpret_cast<uintptr_t>(key));\r\n}\r\n\r\nint ScintillaCall::PropertyExpanded(const char *key, char *value) {\r\n\treturn static_cast<int>(CallPointer(Message::GetPropertyExpanded, reinterpret_cast<uintptr_t>(key), value));\r\n}\r\n\r\nstd::string ScintillaCall::PropertyExpanded(const char *key) {\r\n\treturn CallReturnString(Message::GetPropertyExpanded, reinterpret_cast<uintptr_t>(key));\r\n}\r\n\r\nint ScintillaCall::PropertyInt(const char *key, int defaultValue) {\r\n\treturn static_cast<int>(Call(Message::GetPropertyInt, reinterpret_cast<uintptr_t>(key), defaultValue));\r\n}\r\n\r\nint ScintillaCall::LexerLanguage(char *language) {\r\n\treturn static_cast<int>(CallPointer(Message::GetLexerLanguage, 0, language));\r\n}\r\n\r\nstd::string ScintillaCall::LexerLanguage() {\r\n\treturn CallReturnString(Message::GetLexerLanguage, 0);\r\n}\r\n\r\nvoid *ScintillaCall::PrivateLexerCall(int operation, void *pointer) {\r\n\treturn reinterpret_cast<void *>(CallPointer(Message::PrivateLexerCall, operation, pointer));\r\n}\r\n\r\nint ScintillaCall::PropertyNames(char *names) {\r\n\treturn static_cast<int>(CallPointer(Message::PropertyNames, 0, names));\r\n}\r\n\r\nstd::string ScintillaCall::PropertyNames() {\r\n\treturn CallReturnString(Message::PropertyNames, 0);\r\n}\r\n\r\nTypeProperty ScintillaCall::PropertyType(const char *name) {\r\n\treturn static_cast<Scintilla::TypeProperty>(Call(Message::PropertyType, reinterpret_cast<uintptr_t>(name)));\r\n}\r\n\r\nint ScintillaCall::DescribeProperty(const char *name, char *description) {\r\n\treturn static_cast<int>(CallPointer(Message::DescribeProperty, reinterpret_cast<uintptr_t>(name), description));\r\n}\r\n\r\nstd::string ScintillaCall::DescribeProperty(const char *name) {\r\n\treturn CallReturnString(Message::DescribeProperty, reinterpret_cast<uintptr_t>(name));\r\n}\r\n\r\nint ScintillaCall::DescribeKeyWordSets(char *descriptions) {\r\n\treturn static_cast<int>(CallPointer(Message::DescribeKeyWordSets, 0, descriptions));\r\n}\r\n\r\nstd::string ScintillaCall::DescribeKeyWordSets() {\r\n\treturn CallReturnString(Message::DescribeKeyWordSets, 0);\r\n}\r\n\r\nLineEndType ScintillaCall::LineEndTypesSupported() {\r\n\treturn static_cast<Scintilla::LineEndType>(Call(Message::GetLineEndTypesSupported));\r\n}\r\n\r\nint ScintillaCall::AllocateSubStyles(int styleBase, int numberStyles) {\r\n\treturn static_cast<int>(Call(Message::AllocateSubStyles, styleBase, numberStyles));\r\n}\r\n\r\nint ScintillaCall::SubStylesStart(int styleBase) {\r\n\treturn static_cast<int>(Call(Message::GetSubStylesStart, styleBase));\r\n}\r\n\r\nint ScintillaCall::SubStylesLength(int styleBase) {\r\n\treturn static_cast<int>(Call(Message::GetSubStylesLength, styleBase));\r\n}\r\n\r\nint ScintillaCall::StyleFromSubStyle(int subStyle) {\r\n\treturn static_cast<int>(Call(Message::GetStyleFromSubStyle, subStyle));\r\n}\r\n\r\nint ScintillaCall::PrimaryStyleFromStyle(int style) {\r\n\treturn static_cast<int>(Call(Message::GetPrimaryStyleFromStyle, style));\r\n}\r\n\r\nvoid ScintillaCall::FreeSubStyles() {\r\n\tCall(Message::FreeSubStyles);\r\n}\r\n\r\nvoid ScintillaCall::SetIdentifiers(int style, const char *identifiers) {\r\n\tCallString(Message::SetIdentifiers, style, identifiers);\r\n}\r\n\r\nint ScintillaCall::DistanceToSecondaryStyles() {\r\n\treturn static_cast<int>(Call(Message::DistanceToSecondaryStyles));\r\n}\r\n\r\nint ScintillaCall::SubStyleBases(char *styles) {\r\n\treturn static_cast<int>(CallPointer(Message::GetSubStyleBases, 0, styles));\r\n}\r\n\r\nstd::string ScintillaCall::SubStyleBases() {\r\n\treturn CallReturnString(Message::GetSubStyleBases, 0);\r\n}\r\n\r\nint ScintillaCall::NamedStyles() {\r\n\treturn static_cast<int>(Call(Message::GetNamedStyles));\r\n}\r\n\r\nint ScintillaCall::NameOfStyle(int style, char *name) {\r\n\treturn static_cast<int>(CallPointer(Message::NameOfStyle, style, name));\r\n}\r\n\r\nstd::string ScintillaCall::NameOfStyle(int style) {\r\n\treturn CallReturnString(Message::NameOfStyle, style);\r\n}\r\n\r\nint ScintillaCall::TagsOfStyle(int style, char *tags) {\r\n\treturn static_cast<int>(CallPointer(Message::TagsOfStyle, style, tags));\r\n}\r\n\r\nstd::string ScintillaCall::TagsOfStyle(int style) {\r\n\treturn CallReturnString(Message::TagsOfStyle, style);\r\n}\r\n\r\nint ScintillaCall::DescriptionOfStyle(int style, char *description) {\r\n\treturn static_cast<int>(CallPointer(Message::DescriptionOfStyle, style, description));\r\n}\r\n\r\nstd::string ScintillaCall::DescriptionOfStyle(int style) {\r\n\treturn CallReturnString(Message::DescriptionOfStyle, style);\r\n}\r\n\r\nvoid ScintillaCall::SetILexer(void *ilexer) {\r\n\tCallPointer(Message::SetILexer, 0, ilexer);\r\n}\r\n\r\nBidirectional ScintillaCall::Bidirectional() {\r\n\treturn static_cast<Scintilla::Bidirectional>(Call(Message::GetBidirectional));\r\n}\r\n\r\nvoid ScintillaCall::SetBidirectional(Scintilla::Bidirectional bidirectional) {\r\n\tCall(Message::SetBidirectional, static_cast<uintptr_t>(bidirectional));\r\n}\r\n\r\n//--Autogenerated -- end of section automatically generated from Scintilla.iface */\r\n\r\n}\r\n"
  },
  {
    "path": "scintilla/cocoa/InfoBar.h",
    "content": "\r\n/**\r\n * Scintilla source code edit control\r\n * @file InfoBar.h - Implements special info bar with zoom info, caret position etc. to be used with\r\n *             ScintillaView.\r\n *\r\n * Mike Lischke <mlischke@sun.com>\r\n *\r\n * Copyright 2009 Sun Microsystems, Inc. All rights reserved.\r\n * This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).\r\n */\r\n\r\n#import <Cocoa/Cocoa.h>\r\n#import \"InfoBarCommunicator.h\"\r\n\r\n/**\r\n * Extended text cell for vertically aligned text.\r\n */\r\n@interface VerticallyCenteredTextFieldCell : NSTextFieldCell {\r\n\tBOOL mIsEditingOrSelecting;\r\n}\r\n\r\n@end\r\n\r\n@interface InfoBar : NSView <InfoBarCommunicator> {\r\n@private\r\n\tNSImage *mBackground;\r\n\tIBDisplay mDisplayMask;\r\n\r\n\tfloat mScaleFactor;\r\n\tNSPopUpButton *mZoomPopup;\r\n\r\n\tint mCurrentCaretX;\r\n\tint mCurrentCaretY;\r\n\tNSTextField *mCaretPositionLabel;\r\n\tNSTextField *mStatusTextLabel;\r\n\r\n\tid <InfoBarCommunicator> mCallback;\r\n}\r\n\r\n- (void) notify: (NotificationType) type message: (NSString *) message location: (NSPoint) location\r\n\t  value: (float) value;\r\n- (void) setCallback: (id <InfoBarCommunicator>) callback;\r\n\r\n- (void) createItems;\r\n- (void) positionSubViews;\r\n- (void) setDisplay: (IBDisplay) display;\r\n- (void) zoomItemAction: (id) sender;\r\n- (void) setScaleFactor: (float) newScaleFactor adjustPopup: (BOOL) flag;\r\n- (void) setCaretPosition: (NSPoint) position;\r\n- (void) sizeToFit;\r\n\r\n@end\r\n"
  },
  {
    "path": "scintilla/cocoa/InfoBar.mm",
    "content": "\r\n/**\r\n * Scintilla source code edit control\r\n * @file InfoBar.mm - Implements special info bar with zoom info, caret position etc. to be used with\r\n *              ScintillaView.\r\n *\r\n * Mike Lischke <mlischke@sun.com>\r\n *\r\n * Copyright 2009 Sun Microsystems, Inc. All rights reserved.\r\n * This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).\r\n */\r\n\r\n#include <cmath>\r\n\r\n#import \"InfoBar.h\"\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n@implementation VerticallyCenteredTextFieldCell\r\n\r\n// Inspired by code from Daniel Jalkut, Red Sweater Software.\r\n\r\n- (NSRect) drawingRectForBounds: (NSRect) theRect {\r\n\t// Get the parent's idea of where we should draw\r\n\tNSRect newRect = [super drawingRectForBounds: theRect];\r\n\r\n\t// When the text field is being edited or selected, we have to turn off the magic because it\r\n\t// screws up the configuration of the field editor. We sneak around this by intercepting\r\n\t// selectWithFrame and editWithFrame and sneaking a reduced, centered rect in at the last minute.\r\n\tif (mIsEditingOrSelecting == NO) {\r\n\t\t// Get our ideal size for current text\r\n\t\tNSSize textSize = [self cellSizeForBounds: theRect];\r\n\r\n\t\t// Center that in the proposed rect\r\n\t\tCGFloat heightDelta = newRect.size.height - textSize.height;\r\n\t\tif (heightDelta > 0) {\r\n\t\t\tnewRect.size.height -= heightDelta;\r\n\t\t\tnewRect.origin.y += std::ceil(heightDelta / 2);\r\n\t\t}\r\n\t}\r\n\r\n\treturn newRect;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n- (void) selectWithFrame: (NSRect) aRect inView: (NSView *) controlView editor: (NSText *) textObj\r\n\t\tdelegate: (id) anObject start: (NSInteger) selStart length: (NSInteger) selLength {\r\n\taRect = [self drawingRectForBounds: aRect];\r\n\tmIsEditingOrSelecting = YES;\r\n\t[super selectWithFrame: aRect\r\n\t\t\tinView: controlView\r\n\t\t\teditor: textObj\r\n\t\t      delegate: anObject\r\n\t\t\t start: selStart\r\n\t\t\tlength: selLength];\r\n\tmIsEditingOrSelecting = NO;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n- (void) editWithFrame: (NSRect) aRect inView: (NSView *) controlView editor: (NSText *) textObj\r\n\t      delegate: (id) anObject event: (NSEvent *) theEvent {\r\n\taRect = [self drawingRectForBounds: aRect];\r\n\tmIsEditingOrSelecting = YES;\r\n\t[super editWithFrame: aRect\r\n\t\t      inView: controlView\r\n\t\t      editor: textObj\r\n\t\t    delegate: anObject\r\n\t\t       event: theEvent];\r\n\tmIsEditingOrSelecting = NO;\r\n}\r\n\r\n@end\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n@implementation InfoBar\r\n\r\n- (instancetype) initWithFrame: (NSRect) frame {\r\n\tself = [super initWithFrame: frame];\r\n\tif (self) {\r\n\t\tNSBundle *bundle = [NSBundle bundleForClass: [InfoBar class]];\r\n\r\n\t\tNSString *path = [bundle pathForResource: @\"info_bar_bg\" ofType: @\"tiff\" inDirectory: nil];\r\n\t\t// macOS 10.13 introduced bug where pathForResource: fails on SMB share\r\n\t\tif (path == nil) {\r\n\t\t\tpath = [bundle.bundlePath stringByAppendingPathComponent: @\"Resources/info_bar_bg.tiff\"];\r\n\t\t}\r\n\t\tmBackground = [[NSImage alloc] initWithContentsOfFile: path];\r\n\t\tif (!mBackground.valid)\r\n\t\t\tNSLog(@\"Background image for info bar is invalid.\");\r\n\r\n\t\tmScaleFactor = 1.0;\r\n\t\tmCurrentCaretX = 0;\r\n\t\tmCurrentCaretY = 0;\r\n\t\t[self createItems];\r\n\t\tself.clipsToBounds = TRUE;\r\n\t}\r\n\treturn self;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Called by a connected component (usually the info bar) if something changed there.\r\n *\r\n * @param type The type of the notification.\r\n * @param message Carries the new status message if the type is a status message change.\r\n * @param location Carries the new location (e.g. caret) if the type is a caret change or similar type.\r\n * @param value Carries the new zoom value if the type is a zoom change.\r\n */\r\n- (void) notify: (NotificationType) type message: (NSString *) message location: (NSPoint) location\r\n\t  value: (float) value {\r\n\tswitch (type) {\r\n\tcase IBNZoomChanged:\r\n\t\t[self setScaleFactor: value adjustPopup: YES];\r\n\t\tbreak;\r\n\tcase IBNCaretChanged:\r\n\t\t[self setCaretPosition: location];\r\n\t\tbreak;\r\n\tcase IBNStatusChanged:\r\n\t\tmStatusTextLabel.stringValue = message;\r\n\t\tbreak;\r\n\t}\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Used to set a protocol object we can use to send change notifications to.\r\n */\r\n- (void) setCallback: (id <InfoBarCommunicator>) callback {\r\n\tmCallback = callback;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nstatic NSString *DefaultScaleMenuLabels[] = {\r\n\t@\"20%\", @\"30%\", @\"50%\", @\"75%\", @\"100%\", @\"130%\", @\"160%\", @\"200%\", @\"250%\", @\"300%\"\r\n};\r\nstatic float DefaultScaleMenuFactors[] = {\r\n\t0.2f, 0.3f, 0.5f, 0.75f, 1.0f, 1.3f, 1.6f, 2.0f, 2.5f, 3.0f\r\n};\r\nstatic unsigned DefaultScaleMenuSelectedItemIndex = 4;\r\nstatic float BarFontSize = 10.0;\r\n\r\n- (void) createItems {\r\n\t// 1) The zoom popup.\r\n\tunsigned numberOfDefaultItems = sizeof(DefaultScaleMenuLabels) / sizeof(NSString *);\r\n\r\n\t// Create the popup button.\r\n\tmZoomPopup = [[NSPopUpButton alloc] initWithFrame: NSMakeRect(0.0, 0.0, 1.0, 1.0) pullsDown: NO];\r\n\r\n\t// No border or background please.\r\n\t[mZoomPopup.cell setBordered: NO];\r\n\t[mZoomPopup.cell setArrowPosition: NSPopUpArrowAtBottom];\r\n\r\n\t// Fill it.\r\n\tfor (unsigned count = 0; count < numberOfDefaultItems; count++) {\r\n\t\t[mZoomPopup addItemWithTitle: NSLocalizedStringFromTable(DefaultScaleMenuLabels[count], @\"ZoomValues\", nil)];\r\n\t\tid currentItem = [mZoomPopup itemAtIndex: count];\r\n\t\tif (DefaultScaleMenuFactors[count] != 0.0)\r\n\t\t\t[currentItem setRepresentedObject: @(DefaultScaleMenuFactors[count])];\r\n\t}\r\n\t[mZoomPopup selectItemAtIndex: DefaultScaleMenuSelectedItemIndex];\r\n\r\n\t// Hook it up.\r\n\tmZoomPopup.target = self;\r\n\tmZoomPopup.action = @selector(zoomItemAction:);\r\n\r\n\t// Set a suitable font.\r\n\tmZoomPopup.font = [NSFont menuBarFontOfSize: BarFontSize];\r\n\r\n\t// Make sure the popup is big enough to fit the cells.\r\n\t[mZoomPopup sizeToFit];\r\n\r\n\t// Don't let it become first responder\r\n\t[mZoomPopup setRefusesFirstResponder: YES];\r\n\r\n\t// put it in the scrollview.\r\n\t[self addSubview: mZoomPopup];\r\n\r\n\t// 2) The caret position label.\r\n\tClass oldCellClass = [NSTextField cellClass];\r\n\t[NSTextField setCellClass: [VerticallyCenteredTextFieldCell class]];\r\n\r\n\tmCaretPositionLabel = [[NSTextField alloc] initWithFrame: NSMakeRect(0.0, 0.0, 50.0, 1.0)];\r\n\t[mCaretPositionLabel setBezeled: NO];\r\n\t[mCaretPositionLabel setBordered: NO];\r\n\t[mCaretPositionLabel setEditable: NO];\r\n\t[mCaretPositionLabel setSelectable: NO];\r\n\t[mCaretPositionLabel setDrawsBackground: NO];\r\n\tmCaretPositionLabel.font = [NSFont menuBarFontOfSize: BarFontSize];\r\n\r\n\tNSTextFieldCell *cell = mCaretPositionLabel.cell;\r\n\tcell.placeholderString = @\"0:0\";\r\n\tcell.alignment = NSTextAlignmentCenter;\r\n\r\n\t[self addSubview: mCaretPositionLabel];\r\n\r\n\t// 3) The status text.\r\n\tmStatusTextLabel = [[NSTextField alloc] initWithFrame: NSMakeRect(0.0, 0.0, 1.0, 1.0)];\r\n\t[mStatusTextLabel setBezeled: NO];\r\n\t[mStatusTextLabel setBordered: NO];\r\n\t[mStatusTextLabel setEditable: NO];\r\n\t[mStatusTextLabel setSelectable: NO];\r\n\t[mStatusTextLabel setDrawsBackground: NO];\r\n\tmStatusTextLabel.font = [NSFont menuBarFontOfSize: BarFontSize];\r\n\r\n\tcell = mStatusTextLabel.cell;\r\n\tcell.placeholderString = @\"\";\r\n\r\n\t[self addSubview: mStatusTextLabel];\r\n\r\n\t// Restore original cell class so that everything else doesn't get broken\r\n\t[NSTextField setCellClass: oldCellClass];\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Fill the background.\r\n */\r\n- (void) drawRect: (NSRect) rect {\r\n\t[[NSColor controlBackgroundColor] set];\r\n\t[NSBezierPath fillRect: rect];\r\n\r\n\t// Since the background is seamless, we don't need to take care for the proper offset.\r\n\t// Simply tile the background over the invalid rectangle.\r\n\tif (mBackground.size.width != 0) {\r\n\t\tNSPoint target = {rect.origin.x, 0};\r\n\t\twhile (target.x < rect.origin.x + rect.size.width) {\r\n\t\t\t[mBackground drawAtPoint: target fromRect: NSZeroRect operation: NSCompositingOperationSourceOver fraction: 1];\r\n\t\t\ttarget.x += mBackground.size.width;\r\n\t\t}\r\n\t}\r\n\r\n\t// Draw separator lines between items.\r\n\tNSRect verticalLineRect;\r\n\tCGFloat component = 190.0 / 255.0;\r\n\tNSColor *lineColor = [NSColor colorWithDeviceRed: component green: component blue: component alpha: 1];\r\n\r\n\tif (mDisplayMask & IBShowZoom) {\r\n\t\tverticalLineRect = mZoomPopup.frame;\r\n\t\tverticalLineRect.origin.x += verticalLineRect.size.width + 1.0;\r\n\t\tverticalLineRect.size.width = 1.0;\r\n\t\tif (NSIntersectsRect(rect, verticalLineRect)) {\r\n\t\t\t[lineColor set];\r\n\t\t\tNSRectFill(verticalLineRect);\r\n\t\t}\r\n\t}\r\n\r\n\tif (mDisplayMask & IBShowCaretPosition) {\r\n\t\tverticalLineRect = mCaretPositionLabel.frame;\r\n\t\tverticalLineRect.origin.x += verticalLineRect.size.width + 1.0;\r\n\t\tverticalLineRect.size.width = 1.0;\r\n\t\tif (NSIntersectsRect(rect, verticalLineRect)) {\r\n\t\t\t[lineColor set];\r\n\t\t\tNSRectFill(verticalLineRect);\r\n\t\t}\r\n\t}\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n- (BOOL) isOpaque {\r\n\treturn YES;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Used to reposition our content depending on the size of the view.\r\n */\r\n- (void) setFrame: (NSRect) newFrame {\r\n\tsuper.frame = newFrame;\r\n\t[self positionSubViews];\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n- (void) positionSubViews {\r\n\tNSRect currentBounds = {{0, 0}, {0, self.frame.size.height}};\r\n\tif (mDisplayMask & IBShowZoom) {\r\n\t\t[mZoomPopup setHidden: NO];\r\n\t\tcurrentBounds.size.width = mZoomPopup.frame.size.width;\r\n\t\tmZoomPopup.frame = currentBounds;\r\n\t\tcurrentBounds.origin.x += currentBounds.size.width + 1; // Add 1 for the separator.\r\n\t} else\r\n\t\t[mZoomPopup setHidden: YES];\r\n\r\n\tif (mDisplayMask & IBShowCaretPosition) {\r\n\t\t[mCaretPositionLabel setHidden: NO];\r\n\t\tcurrentBounds.size.width = mCaretPositionLabel.frame.size.width;\r\n\t\tmCaretPositionLabel.frame = currentBounds;\r\n\t\tcurrentBounds.origin.x += currentBounds.size.width + 1;\r\n\t} else\r\n\t\t[mCaretPositionLabel setHidden: YES];\r\n\r\n\tif (mDisplayMask & IBShowStatusText) {\r\n\t\t// The status text always takes the rest of the available space.\r\n\t\t[mStatusTextLabel setHidden: NO];\r\n\t\tcurrentBounds.size.width = self.frame.size.width - currentBounds.origin.x;\r\n\t\tmStatusTextLabel.frame = currentBounds;\r\n\t} else\r\n\t\t[mStatusTextLabel setHidden: YES];\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Used to switch the visible parts of the info bar.\r\n *\r\n * @param display Bitwise ORed IBDisplay values which determine what to show on the bar.\r\n */\r\n- (void) setDisplay: (IBDisplay) display {\r\n\tif (mDisplayMask != display) {\r\n\t\tmDisplayMask = display;\r\n\t\t[self positionSubViews];\r\n\t\tself.needsDisplay = YES;\r\n\t}\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Handler for selection changes in the zoom menu.\r\n */\r\n- (void) zoomItemAction: (id) sender {\r\n\tNSNumber *selectedFactorObject = [[sender selectedCell] representedObject];\r\n\r\n\tif (selectedFactorObject == nil) {\r\n\t\tNSLog(@\"Scale popup action: setting arbitrary zoom factors is not yet supported.\");\r\n\t\treturn;\r\n\t} else {\r\n\t\t[self setScaleFactor: selectedFactorObject.floatValue adjustPopup: NO];\r\n\t}\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n- (void) setScaleFactor: (float) newScaleFactor adjustPopup: (BOOL) flag {\r\n\tif (mScaleFactor != newScaleFactor) {\r\n\t\tmScaleFactor = newScaleFactor;\r\n\t\tif (flag) {\r\n\t\t\tunsigned count = 0;\r\n\t\t\tunsigned numberOfDefaultItems = sizeof(DefaultScaleMenuFactors) / sizeof(float);\r\n\r\n\t\t\t// We only work with some preset zoom values. If the given value does not correspond\r\n\t\t\t// to one then show no selection.\r\n\t\t\twhile (count < numberOfDefaultItems && (std::abs(newScaleFactor - DefaultScaleMenuFactors[count]) > 0.07))\r\n\t\t\t\tcount++;\r\n\t\t\tif (count == numberOfDefaultItems)\r\n\t\t\t\t[mZoomPopup selectItemAtIndex: -1];\r\n\t\t\telse {\r\n\t\t\t\t[mZoomPopup selectItemAtIndex: count];\r\n\r\n\t\t\t\t// Set scale factor to found preset value if it comes close.\r\n\t\t\t\tmScaleFactor = DefaultScaleMenuFactors[count];\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t// Internally set. Notify owner.\r\n\t\t\t[mCallback notify: IBNZoomChanged message: nil location: NSZeroPoint value: newScaleFactor];\r\n\t\t}\r\n\t}\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Called from the notification method to update the caret position display.\r\n */\r\n- (void) setCaretPosition: (NSPoint) position {\r\n\t// Make the position one-based.\r\n\tint newX = (int) position.x + 1;\r\n\tint newY = (int) position.y + 1;\r\n\r\n\tif (mCurrentCaretX != newX || mCurrentCaretY != newY) {\r\n\t\tmCurrentCaretX = newX;\r\n\t\tmCurrentCaretY = newY;\r\n\r\n\t\tmCaretPositionLabel.stringValue = [NSString stringWithFormat: @\"%d:%d\", newX, newY];\r\n\t}\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Makes the bar resize to the smallest width that can accommodate the currently enabled items.\r\n */\r\n- (void) sizeToFit {\r\n\tNSRect frame = self.frame;\r\n\tframe.size.width = 0;\r\n\tif (mDisplayMask & IBShowZoom)\r\n\t\tframe.size.width += mZoomPopup.frame.size.width;\r\n\r\n\tif (mDisplayMask & IBShowCaretPosition)\r\n\t\tframe.size.width += mCaretPositionLabel.frame.size.width;\r\n\r\n\tif (mDisplayMask & IBShowStatusText)\r\n\t\tframe.size.width += mStatusTextLabel.frame.size.width;\r\n\r\n\tself.frame = frame;\r\n}\r\n\r\n@end\r\n"
  },
  {
    "path": "scintilla/cocoa/InfoBarCommunicator.h",
    "content": "/*\r\n * InfoBarCommunicator.h - Definitions of a communication protocol and other data types used for\r\n *                         the info bar implementation.\r\n *\r\n * Mike Lischke <mlischke@sun.com>\r\n *\r\n * Copyright 2009 Sun Microsystems, Inc. All rights reserved.\r\n * This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).\r\n */\r\n\r\ntypedef NS_OPTIONS(NSUInteger, IBDisplay) {\r\n\tIBShowZoom          = 0x01,\r\n\tIBShowCaretPosition = 0x02,\r\n\tIBShowStatusText    = 0x04,\r\n\tIBShowAll           = 0xFF\r\n};\r\n\r\n/**\r\n * The info bar communicator protocol is used for communication between ScintillaView and its\r\n * information bar component. Using this protocol decouples any potential info target from the main\r\n * ScintillaView implementation. The protocol is used two-way.\r\n */\r\n\r\ntypedef NS_ENUM(NSInteger, NotificationType) {\r\n\tIBNZoomChanged,    // The user selected another zoom value.\r\n\tIBNCaretChanged,   // The caret in the editor changed.\r\n\tIBNStatusChanged,  // The application set a new status message.\r\n};\r\n\r\n@protocol InfoBarCommunicator\r\n- (void) notify: (NotificationType) type message: (NSString *) message location: (NSPoint) location\r\n\t  value: (float) value;\r\n- (void) setCallback: (id <InfoBarCommunicator>) callback;\r\n@end\r\n\r\n"
  },
  {
    "path": "scintilla/cocoa/PlatCocoa.h",
    "content": "\r\n/**\r\n * Copyright 2009 Sun Microsystems, Inc. All rights reserved.\r\n * This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).\r\n * @file PlatCocoa.h\r\n */\r\n\r\n#ifndef PLATCOCOA_H\r\n#define PLATCOCOA_H\r\n\r\n#include <cstdlib>\r\n#include <cassert>\r\n#include <cstring>\r\n#include <cstdio>\r\n\r\n#include <Cocoa/Cocoa.h>\r\n\r\n#include \"ScintillaTypes.h\"\r\n#include \"ScintillaMessages.h\"\r\n\r\n#include \"Debugging.h\"\r\n#include \"Geometry.h\"\r\n#include \"Platform.h\"\r\n\r\n#include \"QuartzTextLayout.h\"\r\n\r\nNSRect PRectangleToNSRect(const Scintilla::Internal::PRectangle &rc);\r\nScintilla::Internal::PRectangle NSRectToPRectangle(const NSRect &rc);\r\nCFStringEncoding EncodingFromCharacterSet(bool unicode, Scintilla::CharacterSet characterSet);\r\n\r\n@interface ScintillaContextMenu : NSMenu {\r\n\tScintilla::Internal::ScintillaCocoa *owner;\r\n}\r\n- (void) handleCommand: (NSMenuItem *) sender;\r\n- (void) setOwner: (Scintilla::Internal::ScintillaCocoa *) newOwner;\r\n\r\n@end\r\n\r\nnamespace Scintilla::Internal {\r\n\r\n// A class to do the actual text rendering for us using Quartz 2D.\r\nclass SurfaceImpl : public Surface {\r\nprivate:\r\n\tSurfaceMode mode;\r\n\r\n\tCGContextRef gc;\r\n\r\n\t/** If the surface is a bitmap context, contains a reference to the bitmap data. */\r\n\tstd::unique_ptr<uint8_t[]> bitmapData;\r\n\t/** If the surface is a bitmap context, stores the dimensions of the bitmap. */\r\n\tint bitmapWidth;\r\n\tint bitmapHeight;\r\n\r\n\t/** Set the CGContext's fill colour to the specified desired colour. */\r\n\tvoid FillColour(ColourRGBA fill);\r\n\r\n\tvoid PenColourAlpha(ColourRGBA fore);\r\n\r\n\tvoid SetFillStroke(FillStroke fillStroke);\r\n\r\n\t// 24-bit RGB+A bitmap data constants\r\n\tstatic const int BITS_PER_COMPONENT = 8;\r\n\tstatic const int BITS_PER_PIXEL = BITS_PER_COMPONENT * 4;\r\n\tstatic const int BYTES_PER_PIXEL = BITS_PER_PIXEL / 8;\r\n\r\n\tbool UnicodeMode() const noexcept;\r\n\tvoid Clear();\r\n\r\npublic:\r\n\tSurfaceImpl();\r\n\tSurfaceImpl(const SurfaceImpl *surface, int width, int height);\r\n\t~SurfaceImpl() override;\r\n\r\n\tvoid Init(WindowID wid) override;\r\n\tvoid Init(SurfaceID sid, WindowID wid) override;\r\n\tstd::unique_ptr<Surface> AllocatePixMap(int width, int height) override;\r\n\tstd::unique_ptr<SurfaceImpl> AllocatePixMapImplementation(int width, int height);\r\n\tCGContextRef GetContext() { return gc; }\r\n\r\n\tvoid SetMode(SurfaceMode mode) override;\r\n\r\n\tvoid Release() noexcept override;\r\n\tint SupportsFeature(Scintilla::Supports feature) noexcept override;\r\n\tbool Initialised() override;\r\n\r\n\t/** Returns a CGImageRef that represents the surface. Returns NULL if this is not possible. */\r\n\tCGImageRef CreateImage();\r\n\tvoid CopyImageRectangle(SurfaceImpl *source, PRectangle srcRect, PRectangle dstRect);\r\n\r\n\tint LogPixelsY() override;\r\n\tint PixelDivisions() override;\r\n\tint DeviceHeightFont(int points) override;\r\n\tvoid LineDraw(Point start, Point end, Stroke stroke) override;\r\n\tvoid PolyLine(const Point *pts, size_t npts, Stroke stroke) override;\r\n\tvoid Polygon(const Scintilla::Internal::Point *pts, size_t npts, FillStroke fillStroke) override;\r\n\tvoid RectangleDraw(PRectangle rc, FillStroke fillStroke) override;\r\n\tvoid RectangleFrame(PRectangle rc, Stroke stroke) override;\r\n\tvoid FillRectangle(PRectangle rc, Fill fill) override;\r\n\tvoid FillRectangleAligned(PRectangle rc, Fill fill) override;\r\n\tvoid FillRectangle(PRectangle rc, Surface &surfacePattern) override;\r\n\tvoid RoundedRectangle(PRectangle rc, FillStroke fillStroke) override;\r\n\tvoid AlphaRectangle(PRectangle rc, XYPOSITION cornerSize, FillStroke fillStroke) override;\r\n\tvoid GradientRectangle(PRectangle rc, const std::vector<ColourStop> &stops, GradientOptions options) override;\r\n\tvoid DrawRGBAImage(PRectangle rc, int width, int height, const unsigned char *pixelsImage) override;\r\n\tvoid Ellipse(PRectangle rc, FillStroke fillStroke) override;\r\n\tvoid Stadium(PRectangle rc, FillStroke fillStroke, Ends ends) override;\r\n\tvoid Copy(PRectangle rc, Scintilla::Internal::Point from, Surface &surfaceSource) override;\r\n\tstd::unique_ptr<IScreenLineLayout> Layout(const IScreenLine *screenLine) override;\r\n\r\n\tvoid DrawTextNoClip(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, ColourRGBA fore,\r\n\t\t\t    ColourRGBA back) override;\r\n\tvoid DrawTextClipped(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, ColourRGBA fore,\r\n\t\t\t     ColourRGBA back) override;\r\n\tvoid DrawTextTransparent(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, ColourRGBA fore) override;\r\n\tvoid MeasureWidths(const Font *font_, std::string_view text, XYPOSITION *positions) override;\r\n\tXYPOSITION WidthText(const Font *font_, std::string_view text) override;\r\n\r\n\tvoid DrawTextNoClipUTF8(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, ColourRGBA fore,\r\n\t\t\t    ColourRGBA back) override;\r\n\tvoid DrawTextClippedUTF8(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, ColourRGBA fore,\r\n\t\t\t     ColourRGBA back) override;\r\n\tvoid DrawTextTransparentUTF8(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, ColourRGBA fore) override;\r\n\tvoid MeasureWidthsUTF8(const Font *font_, std::string_view text, XYPOSITION *positions) override;\r\n\tXYPOSITION WidthTextUTF8(const Font *font_, std::string_view text) override;\r\n\r\n\tXYPOSITION Ascent(const Font *font_) override;\r\n\tXYPOSITION Descent(const Font *font_) override;\r\n\tXYPOSITION InternalLeading(const Font *font_) override;\r\n\tXYPOSITION Height(const Font *font_) override;\r\n\tXYPOSITION AverageCharWidth(const Font *font_) override;\r\n\r\n\tvoid SetClip(PRectangle rc) override;\r\n\tvoid PopClip() override;\r\n\tvoid FlushCachedState() override;\r\n\tvoid FlushDrawing() override;\r\n\r\n}; // SurfaceImpl class\r\n\r\n} // Scintilla namespace\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/cocoa/PlatCocoa.mm",
    "content": "/**\r\n * Scintilla source code edit control\r\n * @file PlatCocoa.mm - implementation of platform facilities on macOS/Cocoa\r\n *\r\n * Written by Mike Lischke\r\n * Based on PlatMacOSX.cxx\r\n * Based on work by Evan Jones (c) 2002 <ejones@uwaterloo.ca>\r\n * Based on PlatGTK.cxx Copyright 1998-2002 by Neil Hodgson <neilh@scintilla.org>\r\n * The License.txt file describes the conditions under which this software may be distributed.\r\n *\r\n * Copyright 2009 Sun Microsystems, Inc. All rights reserved.\r\n * This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).\r\n */\r\n\r\n#include <cstddef>\r\n#include <cstdlib>\r\n#include <cassert>\r\n#include <cstring>\r\n#include <cstdio>\r\n#include <cmath>\r\n\r\n#include <stdexcept>\r\n#include <string_view>\r\n#include <vector>\r\n#include <map>\r\n#include <optional>\r\n#include <functional>\r\n#include <memory>\r\n#include <numeric>\r\n\r\n#import <Foundation/NSGeometry.h>\r\n\r\n#import \"ScintillaTypes.h\"\r\n#import \"ScintillaMessages.h\"\r\n#import \"ScintillaStructures.h\"\r\n\r\n#import \"Debugging.h\"\r\n#import \"Geometry.h\"\r\n#import \"Platform.h\"\r\n\r\n#include \"XPM.h\"\r\n#include \"UniConversion.h\"\r\n\r\n#import \"ScintillaView.h\"\r\n#import \"ScintillaCocoa.h\"\r\n#import \"PlatCocoa.h\"\r\n\r\nusing namespace Scintilla;\r\nusing namespace Scintilla::Internal;\r\n\r\nextern sptr_t scintilla_send_message(void *sci, unsigned int iMessage, uptr_t wParam, sptr_t lParam);\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Converts a Point as used by Scintilla to a Quartz-style CGPoint.\r\n */\r\ninline CGPoint CGPointFromPoint(Scintilla::Internal::Point pt) {\r\n\treturn CGPointMake(pt.x, pt.y);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Converts a PRectangle as used by Scintilla to standard Obj-C NSRect structure .\r\n */\r\nNSRect PRectangleToNSRect(const PRectangle &rc) {\r\n\treturn NSMakeRect(rc.left, rc.top, rc.Width(), rc.Height());\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Converts an NSRect as used by the system to a native Scintilla rectangle.\r\n */\r\nPRectangle NSRectToPRectangle(const NSRect &rc) {\r\n\treturn PRectangle(rc.origin.x, rc.origin.y, NSMaxX(rc), NSMaxY(rc));\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Converts a PRectangle as used by Scintilla to a Quartz-style rectangle.\r\n */\r\ninline CGRect PRectangleToCGRect(PRectangle &rc) {\r\n\treturn CGRectMake(rc.left, rc.top, rc.Width(), rc.Height());\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Converts a PRectangle as used by Scintilla to a Quartz-style rectangle.\r\n * Result is inset by strokeWidth / 2 so stroking does not go outside the rectangle.\r\n */\r\ninline CGRect CGRectFromPRectangleInset(PRectangle rc, XYPOSITION strokeWidth) {\r\n\tconst XYPOSITION halfStroke = strokeWidth / 2.0f;\r\n\tconst CGRect rect = PRectangleToCGRect(rc);\r\n\treturn CGRectInset(rect, halfStroke, halfStroke);\r\n}\r\n\r\n//----------------- FontQuartz ---------------------------------------------------------------------\r\n\r\nclass FontQuartz : public Font {\r\npublic:\r\n\tstd::unique_ptr<QuartzTextStyle> style;\r\n\tFontQuartz(const FontParameters &fp) {\r\n\t\tstyle = std::make_unique<QuartzTextStyle>();\r\n\t\t// Create the font with attributes\r\n\t\tQuartzFont font(fp.faceName, strlen(fp.faceName), fp.size, fp.weight, fp.italic);\r\n\t\tCTFontRef fontRef = font.getFontID();\r\n\t\tstyle->setFontRef(fontRef, fp.characterSet);\r\n\t}\r\n\tFontQuartz(const QuartzTextStyle *style_) {\r\n\t\tstyle = std::make_unique<QuartzTextStyle>(style_);\r\n\t}\r\n};\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nstatic QuartzTextStyle *TextStyleFromFont(const Font *f) noexcept {\r\n\tif (f) {\r\n\t\tconst FontQuartz *pfq = dynamic_cast<const FontQuartz *>(f);\r\n\t\tif (pfq) {\r\n\t\t\treturn pfq->style.get();\r\n\t\t}\r\n\t}\r\n\treturn nullptr;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Creates a CTFontRef with the given properties.\r\n */\r\nstd::shared_ptr<Font> Font::Allocate(const FontParameters &fp) {\r\n\treturn std::make_shared<FontQuartz>(fp);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n// Bidirectional text support for Arabic and Hebrew.\r\n\r\nnamespace {\r\n\r\nCFIndex IndexFromPosition(std::string_view text, size_t position) {\r\n\tconst std::string_view textUptoPosition = text.substr(0, position);\r\n\treturn UTF16Length(textUptoPosition);\r\n}\r\n\r\n// Handling representations and tabs\r\n\r\nstruct Blob {\r\n\tXYPOSITION width;\r\n\tBlob(XYPOSITION width_) : width(width_) {\r\n\t}\r\n};\r\n\r\nstatic void BlobDealloc(void *refCon) {\r\n\tBlob *blob = static_cast<Blob *>(refCon);\r\n\tdelete blob;\r\n}\r\n\r\nstatic CGFloat BlobGetWidth(void *refCon) {\r\n\tBlob *blob = static_cast<Blob *>(refCon);\r\n\treturn blob->width;\r\n}\r\n\r\nclass ScreenLineLayout : public IScreenLineLayout {\r\n\tCTLineRef line = NULL;\r\n\tconst std::string text;\r\npublic:\r\n\tScreenLineLayout(const IScreenLine *screenLine);\r\n\t~ScreenLineLayout();\r\n\t// IScreenLineLayout implementation\r\n\tsize_t PositionFromX(XYPOSITION xDistance, bool charPosition) override;\r\n\tXYPOSITION XFromPosition(size_t caretPosition) override;\r\n\tstd::vector<Interval> FindRangeIntervals(size_t start, size_t end) override;\r\n};\r\n\r\nScreenLineLayout::ScreenLineLayout(const IScreenLine *screenLine) : text(screenLine->Text()) {\r\n\tconst UInt8 *puiBuffer = reinterpret_cast<const UInt8 *>(text.data());\r\n\tstd::string_view sv = text;\r\n\r\n\t// Start with an empty mutable attributed string and add each character to it.\r\n\tCFMutableAttributedStringRef mas = CFAttributedStringCreateMutable(NULL, 0);\r\n\r\n\tfor (size_t bp=0; bp<text.length();) {\r\n\t\tconst unsigned char uch = text[bp];\r\n\t\tconst int utf8Status = UTF8Classify(sv);\r\n\t\tconst unsigned int byteCount = utf8Status & UTF8MaskWidth;\r\n\t\tXYPOSITION repWidth = screenLine->RepresentationWidth(bp);\r\n\t\tif (uch == '\\t') {\r\n\t\t\t// Find the size up to the tab\r\n\t\t\tNSMutableAttributedString *nas = (__bridge NSMutableAttributedString *)mas;\r\n\t\t\tconst NSSize sizeUpTo = [nas size];\r\n\t\t\tconst XYPOSITION nextTab = screenLine->TabPositionAfter(sizeUpTo.width);\r\n\t\t\trepWidth = nextTab - sizeUpTo.width;\r\n\t\t}\r\n\t\tCFAttributedStringRef as = NULL;\r\n\t\tif (repWidth > 0.0f) {\r\n\t\t\tCTRunDelegateCallbacks callbacks = {\r\n\t\t\t\t.version = kCTRunDelegateVersion1,\r\n\t\t\t\t.dealloc = BlobDealloc,\r\n\t\t\t\t.getWidth = BlobGetWidth\r\n\t\t\t};\r\n\t\t\tCTRunDelegateRef runDelegate = CTRunDelegateCreate(&callbacks, new Blob(repWidth));\r\n\t\t\tNSMutableAttributedString *masBlob = [[NSMutableAttributedString alloc] initWithString:@\"X\"];\r\n\t\t\tNSRange rangeX = NSMakeRange(0, 1);\r\n\t\t\t[masBlob addAttribute: (NSString *)kCTRunDelegateAttributeName value: (__bridge id)runDelegate range:rangeX];\r\n\t\t\tCFRelease(runDelegate);\r\n\t\t\tas = (CFAttributedStringRef)CFBridgingRetain(masBlob);\r\n\t\t} else {\r\n\t\t\tCFStringRef piece = CFStringCreateWithBytes(NULL,\r\n\t\t\t\t\t\t\t\t    &puiBuffer[bp],\r\n\t\t\t\t\t\t\t\t    byteCount,\r\n\t\t\t\t\t\t\t\t    kCFStringEncodingUTF8,\r\n\t\t\t\t\t\t\t\t    false);\r\n\t\t\tconst QuartzTextStyle *qts = TextStyleFromFont(screenLine->FontOfPosition(bp));\r\n\t\t\tCFMutableDictionaryRef pieceAttributes = qts->getCTStyle();\r\n\t\t\tas = CFAttributedStringCreate(NULL, piece, pieceAttributes);\r\n\t\t\tCFRelease(piece);\r\n\t\t}\r\n\t\tCFAttributedStringReplaceAttributedString(mas,\r\n\t\t\t\t\t\t\t  CFRangeMake(CFAttributedStringGetLength(mas), 0),\r\n\t\t\t\t\t\t\t  as);\r\n\t\tbp += byteCount;\r\n\t\tsv.remove_prefix(byteCount);\r\n\t\tCFRelease(as);\r\n\t}\r\n\r\n\tline = CTLineCreateWithAttributedString(mas);\r\n\tCFRelease(mas);\r\n}\r\n\r\nScreenLineLayout::~ScreenLineLayout() {\r\n\tCFRelease(line);\r\n}\r\n\r\nsize_t ScreenLineLayout::PositionFromX(XYPOSITION xDistance, bool charPosition) {\r\n\tif (!line) {\r\n\t\treturn 0;\r\n\t}\r\n\tconst CGPoint ptDistance = CGPointMake(xDistance, 0);\r\n\tconst CFIndex offset = CTLineGetStringIndexForPosition(line, ptDistance);\r\n\tif (offset == kCFNotFound) {\r\n\t\treturn 0;\r\n\t}\r\n\t// Convert back to UTF-8 positions\r\n\treturn UTF8PositionFromUTF16Position(text, offset);\r\n}\r\n\r\nXYPOSITION ScreenLineLayout::XFromPosition(size_t caretPosition) {\r\n\tif (!line) {\r\n\t\treturn 0.0;\r\n\t}\r\n\t// Convert from UTF-8 position\r\n\tconst CFIndex caretIndex = IndexFromPosition(text, caretPosition);\r\n\r\n\tconst CGFloat distance = CTLineGetOffsetForStringIndex(line, caretIndex, nullptr);\r\n\treturn distance;\r\n}\r\n\r\nvoid AddToIntervalVector(std::vector<Interval> &vi, XYPOSITION left, XYPOSITION right) {\r\n\tconst Interval interval = {left, right};\r\n\tif (vi.empty()) {\r\n\t\tvi.push_back(interval);\r\n\t} else {\r\n\t\tInterval &last = vi.back();\r\n\t\tif (std::abs(last.right-interval.left) < 0.01) {\r\n\t\t\t// If new left is very close to previous right then extend last item\r\n\t\t\tlast.right = interval.right;\r\n\t\t} else {\r\n\t\t\tvi.push_back(interval);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nstd::vector<Interval> ScreenLineLayout::FindRangeIntervals(size_t start, size_t end) {\r\n\tif (!line) {\r\n\t\treturn {};\r\n\t}\r\n\r\n\tstd::vector<Interval> ret;\r\n\r\n\t// Convert from UTF-8 position\r\n\tconst CFIndex startIndex = IndexFromPosition(text, start);\r\n\tconst CFIndex endIndex = IndexFromPosition(text, end);\r\n\r\n\tCFArrayRef runs = CTLineGetGlyphRuns(line);\r\n\tconst CFIndex runCount = CFArrayGetCount(runs);\r\n\tfor (CFIndex run=0; run<runCount; run++) {\r\n\t\tCTRunRef aRun = static_cast<CTRunRef>(CFArrayGetValueAtIndex(runs, run));\r\n\t\tconst CFIndex glyphCount = CTRunGetGlyphCount(aRun);\r\n\t\tconst CFRange rangeAll = CFRangeMake(0, glyphCount);\r\n\t\tstd::vector<CFIndex> indices(glyphCount);\r\n\t\tCTRunGetStringIndices(aRun, rangeAll, indices.data());\r\n\t\tstd::vector<CGPoint> positions(glyphCount);\r\n\t\tCTRunGetPositions(aRun, rangeAll, positions.data());\r\n\t\tstd::vector<CGSize> advances(glyphCount);\r\n\t\tCTRunGetAdvances(aRun, rangeAll, advances.data());\r\n\t\tfor (CFIndex glyph=0; glyph<glyphCount; glyph++) {\r\n\t\t\tconst CFIndex glyphIndex = indices[glyph];\r\n\t\t\tconst XYPOSITION xPosition = positions[glyph].x;\r\n\t\t\tconst XYPOSITION width = advances[glyph].width;\r\n\t\t\tif ((glyphIndex >= startIndex) && (glyphIndex < endIndex)) {\r\n\t\t\t\tAddToIntervalVector(ret, xPosition, xPosition + width);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn ret;\r\n}\r\n\r\n// Helper for SurfaceImpl::MeasureWidths that examines the glyph runs in a layout\r\n\r\nvoid GetPositions(CTLineRef line, std::vector<CGFloat> &positions) {\r\n\r\n\t// Find the advances of the text\r\n\tstd::vector<CGFloat> lineAdvances(positions.size());\r\n\tCFArrayRef runs = CTLineGetGlyphRuns(line);\r\n\tconst CFIndex runCount = CFArrayGetCount(runs);\r\n\tfor (CFIndex run=0; run<runCount; run++) {\r\n\t\tCTRunRef aRun = static_cast<CTRunRef>(CFArrayGetValueAtIndex(runs, run));\r\n\t\tconst CFIndex glyphCount = CTRunGetGlyphCount(aRun);\r\n\t\tconst CFRange rangeAll = CFRangeMake(0, glyphCount);\r\n\t\tstd::vector<CFIndex> indices(glyphCount);\r\n\t\tCTRunGetStringIndices(aRun, rangeAll, indices.data());\r\n\t\tstd::vector<CGSize> advances(glyphCount);\r\n\t\tCTRunGetAdvances(aRun, rangeAll, advances.data());\r\n\t\tfor (CFIndex glyph=0; glyph<glyphCount; glyph++) {\r\n\t\t\tconst CFIndex glyphIndex = indices[glyph];\r\n\t\t\tif (glyphIndex >= positions.size()) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tlineAdvances[glyphIndex] = advances[glyph].width;\r\n\t\t}\r\n\t}\r\n\r\n\t// Accumulate advances into positions\r\n\tstd::partial_sum(lineAdvances.begin(), lineAdvances.end(),\r\n\t\t\t positions.begin(), std::plus<CGFloat>());\r\n}\r\n\r\nconst Supports SupportsCocoa[] = {\r\n\tSupports::LineDrawsFinal,\r\n\tSupports::PixelDivisions,\r\n\tSupports::FractionalStrokeWidth,\r\n\tSupports::TranslucentStroke,\r\n\tSupports::PixelModification,\r\n\tSupports::ThreadSafeMeasureWidths,\r\n};\r\n\r\n}\r\n\r\n//----------------- SurfaceImpl --------------------------------------------------------------------\r\n\r\nSurfaceImpl::SurfaceImpl() {\r\n\tgc = NULL;\r\n\r\n\tbitmapData.reset(); // Release will try and delete bitmapData if != nullptr\r\n\tbitmapWidth = 0;\r\n\tbitmapHeight = 0;\r\n\r\n\tRelease();\r\n}\r\n\r\nSurfaceImpl::SurfaceImpl(const SurfaceImpl *surface, int width, int height) {\r\n\r\n\t// Create a new bitmap context, along with the RAM for the bitmap itself\r\n\tbitmapWidth = width;\r\n\tbitmapHeight = height;\r\n\r\n\tconst int bitmapBytesPerRow = (width * BYTES_PER_PIXEL);\r\n\tconst int bitmapByteCount = (bitmapBytesPerRow * height);\r\n\r\n\t// Create an RGB color space.\r\n\tCGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();\r\n\tif (colorSpace == NULL)\r\n\t\treturn;\r\n\r\n\t// Create the bitmap.\r\n\tbitmapData.reset(new uint8_t[bitmapByteCount]);\r\n\t// create the context\r\n\tgc = CGBitmapContextCreate(bitmapData.get(),\r\n\t\t\t\t   width,\r\n\t\t\t\t   height,\r\n\t\t\t\t   BITS_PER_COMPONENT,\r\n\t\t\t\t   bitmapBytesPerRow,\r\n\t\t\t\t   colorSpace,\r\n\t\t\t\t   kCGImageAlphaPremultipliedLast);\r\n\r\n\tif (gc == NULL) {\r\n\t\t// the context couldn't be created for some reason,\r\n\t\t// and we have no use for the bitmap without the context\r\n\t\tbitmapData.reset();\r\n\t}\r\n\r\n\t// the context retains the color space, so we can release it\r\n\tCGColorSpaceRelease(colorSpace);\r\n\r\n\tif (gc && bitmapData) {\r\n\t\t// \"Erase\" to white.\r\n\t\tCGContextClearRect(gc, CGRectMake(0, 0, width, height));\r\n\t\tCGContextSetRGBFillColor(gc, 1.0, 1.0, 1.0, 1.0);\r\n\t\tCGContextFillRect(gc, CGRectMake(0, 0, width, height));\r\n\t}\r\n\r\n\tmode = surface->mode;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nSurfaceImpl::~SurfaceImpl() {\r\n\tClear();\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nbool SurfaceImpl::UnicodeMode() const noexcept {\r\n\treturn mode.codePage == SC_CP_UTF8;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid SurfaceImpl::Clear() {\r\n\tif (bitmapData) {\r\n\t\tbitmapData.reset();\r\n\t\t// We only \"own\" the graphics context if we are a bitmap context\r\n\t\tif (gc)\r\n\t\t\tCGContextRelease(gc);\r\n\t}\r\n\tgc = NULL;\r\n\r\n\tbitmapWidth = 0;\r\n\tbitmapHeight = 0;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid SurfaceImpl::Release() noexcept {\r\n\tClear();\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nbool SurfaceImpl::Initialised() {\r\n\t// We are initalised if the graphics context is not null\r\n\treturn gc != NULL;// || port != NULL;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid SurfaceImpl::Init(WindowID) {\r\n\t// To be able to draw, the surface must get a CGContext handle.  We save the graphics port,\r\n\t// then acquire/release the context on an as-need basis (see above).\r\n\t// XXX Docs on QDBeginCGContext are light, a better way to do this would be good.\r\n\t// AFAIK we should not hold onto a context retrieved this way, thus the need for\r\n\t// acquire/release of the context.\r\n\r\n\tRelease();\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid SurfaceImpl::Init(SurfaceID sid, WindowID) {\r\n\tRelease();\r\n\tgc = static_cast<CGContextRef>(sid);\r\n\tCGContextSetLineWidth(gc, 1.0);\r\n}\r\n\r\nstd::unique_ptr<Surface> SurfaceImpl::AllocatePixMap(int width, int height) {\r\n\treturn std::make_unique<SurfaceImpl>(this, width, height);\r\n}\r\n\r\nstd::unique_ptr<SurfaceImpl> SurfaceImpl::AllocatePixMapImplementation(int width, int height) {\r\n\treturn std::make_unique<SurfaceImpl>(this, width, height);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid SurfaceImpl::SetMode(SurfaceMode mode_) {\r\n\tmode = mode_;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nint SurfaceImpl::SupportsFeature(Supports feature) noexcept {\r\n\tfor (const Supports f : SupportsCocoa) {\r\n\t\tif (f == feature)\r\n\t\t\treturn 1;\r\n\t}\r\n\treturn 0;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid SurfaceImpl::FillColour(ColourRGBA fill) {\r\n\t// Set the Fill color to match\r\n\tCGContextSetRGBFillColor(gc,\r\n\t\t\t\t fill.GetRedComponent(),\r\n\t\t\t\t fill.GetGreenComponent(),\r\n\t\t\t\t fill.GetBlueComponent(),\r\n\t\t\t\t fill.GetAlphaComponent());\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid SurfaceImpl::PenColourAlpha(ColourRGBA fore) {\r\n\t// Set the Stroke color to match\r\n\tCGContextSetRGBStrokeColor(gc,\r\n\t\t\t\t   fore.GetRedComponent(),\r\n\t\t\t\t   fore.GetGreenComponent(),\r\n\t\t\t\t   fore.GetBlueComponent(),\r\n\t\t\t\t   fore.GetAlphaComponent());\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid SurfaceImpl::SetFillStroke(FillStroke fillStroke) {\r\n\tFillColour(fillStroke.fill.colour);\r\n\tPenColourAlpha(fillStroke.stroke.colour);\r\n\tCGContextSetLineWidth(gc, fillStroke.stroke.width);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nCGImageRef SurfaceImpl::CreateImage() {\r\n\t// For now, assume that CreateImage can only be called on PixMap surfaces.\r\n\tif (!bitmapData)\r\n\t\treturn NULL;\r\n\r\n\tCGContextFlush(gc);\r\n\r\n\t// Create an RGB color space.\r\n\tCGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();\r\n\tif (colorSpace == NULL)\r\n\t\treturn NULL;\r\n\r\n\tconst int bitmapBytesPerRow = bitmapWidth * BYTES_PER_PIXEL;\r\n\tconst int bitmapByteCount = bitmapBytesPerRow * bitmapHeight;\r\n\r\n\t// Make a copy of the bitmap data for the image creation and divorce it\r\n\t// From the SurfaceImpl lifetime\r\n\tCFDataRef dataRef = CFDataCreate(kCFAllocatorDefault, bitmapData.get(), bitmapByteCount);\r\n\r\n\t// Create a data provider.\r\n\tCGDataProviderRef dataProvider = CGDataProviderCreateWithCFData(dataRef);\r\n\r\n\tCGImageRef image = NULL;\r\n\tif (dataProvider != NULL) {\r\n\t\t// Create the CGImage.\r\n\t\timage = CGImageCreate(bitmapWidth,\r\n\t\t\t\t      bitmapHeight,\r\n\t\t\t\t      BITS_PER_COMPONENT,\r\n\t\t\t\t      BITS_PER_PIXEL,\r\n\t\t\t\t      bitmapBytesPerRow,\r\n\t\t\t\t      colorSpace,\r\n\t\t\t\t      kCGImageAlphaPremultipliedLast,\r\n\t\t\t\t      dataProvider,\r\n\t\t\t\t      NULL,\r\n\t\t\t\t      0,\r\n\t\t\t\t      kCGRenderingIntentDefault);\r\n\t}\r\n\r\n\t// The image retains the color space, so we can release it.\r\n\tCGColorSpaceRelease(colorSpace);\r\n\tcolorSpace = NULL;\r\n\r\n\t// Done with the data provider.\r\n\tCGDataProviderRelease(dataProvider);\r\n\tdataProvider = NULL;\r\n\r\n\t// Done with the data provider.\r\n\tCFRelease(dataRef);\r\n\r\n\treturn image;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Returns the vertical logical device resolution of the main monitor.\r\n * This is no longer called.\r\n * For Cocoa, all screens are treated as 72 DPI, even retina displays.\r\n */\r\nint SurfaceImpl::LogPixelsY() {\r\n\treturn 72;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Returns the number of device pixels per logical pixel.\r\n * 1 for older displays and 2 for retina displays. Potentially 3 for some phones.\r\n */\r\nint SurfaceImpl::PixelDivisions() {\r\n\tif (gc) {\r\n\t\tconst CGSize szDevice = CGContextConvertSizeToDeviceSpace(gc, CGSizeMake(1.0, 1.0));\r\n\t\tconst int devicePixels = std::round(szDevice.width);\r\n\t\tassert(devicePixels == 1 || devicePixels == 2);\r\n\t\treturn devicePixels;\r\n\t}\r\n\treturn 1;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Converts the logical font height in points into a device height.\r\n * For Cocoa, points are always used for the result even on retina displays.\r\n */\r\nint SurfaceImpl::DeviceHeightFont(int points) {\r\n\treturn points;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid SurfaceImpl::LineDraw(Point start, Point end, Stroke stroke) {\r\n\tPenColourAlpha(stroke.colour);\r\n\tCGContextSetLineWidth(gc, stroke.width);\r\n\r\n\tCGContextBeginPath(gc);\r\n\tCGContextMoveToPoint(gc, start.x, start.y);\r\n\tCGContextAddLineToPoint(gc, end.x, end.y);\r\n\tCGContextStrokePath(gc);\r\n\r\n\tCGContextSetLineWidth(gc, 1.0f);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid SurfaceImpl::PolyLine(const Point *pts, size_t npts, Stroke stroke) {\r\n\tPLATFORM_ASSERT(gc && (npts > 1));\r\n\tif (!gc || (npts <= 1)) {\r\n\t\treturn;\r\n\t}\r\n\tPenColourAlpha(stroke.colour);\r\n\tCGContextSetLineWidth(gc, stroke.width);\r\n\tCGContextBeginPath(gc);\r\n\tCGContextMoveToPoint(gc, pts[0].x, pts[0].y);\r\n\tfor (size_t i = 1; i < npts; i++) {\r\n\t\tCGContextAddLineToPoint(gc, pts[i].x, pts[i].y);\r\n\t}\r\n\tCGContextStrokePath(gc);\r\n\r\n\tCGContextSetLineWidth(gc, 1.0f);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid SurfaceImpl::Polygon(const Scintilla::Internal::Point *pts, size_t npts, FillStroke fillStroke) {\r\n\tstd::vector<CGPoint> points;\r\n\tstd::transform(pts, pts + npts, std::back_inserter(points), CGPointFromPoint);\r\n\r\n\tCGContextBeginPath(gc);\r\n\r\n\tSetFillStroke(fillStroke);\r\n\r\n\t// Draw the polygon\r\n\tCGContextAddLines(gc, points.data(), npts);\r\n\r\n\t// Explicitly close the path, so it is closed for stroking AND filling (implicit close = filling only)\r\n\tCGContextClosePath(gc);\r\n\tCGContextDrawPath(gc, kCGPathFillStroke);\r\n\r\n\t// Restore as not all paths set\r\n\tCGContextSetLineWidth(gc, 1.0f);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid SurfaceImpl::RectangleDraw(PRectangle rc, FillStroke fillStroke) {\r\n\tif (!gc)\r\n\t\treturn;\r\n\tCGContextBeginPath(gc);\r\n\tSetFillStroke(fillStroke);\r\n\r\n\tCGContextAddRect(gc, CGRectFromPRectangleInset(rc, fillStroke.stroke.width));\r\n\r\n\tCGContextDrawPath(gc, kCGPathFillStroke);\r\n\r\n\t// Restore as not all paths set\r\n\tCGContextSetLineWidth(gc, 1.0f);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid SurfaceImpl::RectangleFrame(PRectangle rc, Stroke stroke) {\r\n\tif (!gc)\r\n\t\treturn;\r\n\r\n\tCGContextBeginPath(gc);\r\n\tPenColourAlpha(stroke.colour);\r\n\tCGContextSetLineWidth(gc, stroke.width);\r\n\r\n\tCGContextAddRect(gc, CGRectFromPRectangleInset(rc, stroke.width));\r\n\r\n\tCGContextDrawPath(gc, kCGPathStroke);\r\n\r\n\t// Restore as not all paths set\r\n\tCGContextSetLineWidth(gc, 1.0f);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid SurfaceImpl::FillRectangle(PRectangle rc, Fill fill) {\r\n\tif (gc) {\r\n\t\tFillColour(fill.colour);\r\n\t\tCGRect rect = PRectangleToCGRect(rc);\r\n\t\tCGContextFillRect(gc, rect);\r\n\t}\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid SurfaceImpl::FillRectangleAligned(PRectangle rc, Fill fill) {\r\n\tFillRectangle(PixelAlign(rc, PixelDivisions()), fill);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nstatic void drawImageRefCallback(void *info, CGContextRef gc) {\r\n\tCGImageRef pattern = static_cast<CGImageRef>(info);\r\n\tCGContextDrawImage(gc, CGRectMake(0, 0, CGImageGetWidth(pattern), CGImageGetHeight(pattern)), pattern);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nstatic void releaseImageRefCallback(void *info) {\r\n\tCGImageRelease(static_cast<CGImageRef>(info));\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid SurfaceImpl::FillRectangle(PRectangle rc, Surface &surfacePattern) {\r\n\tSurfaceImpl &patternSurface = static_cast<SurfaceImpl &>(surfacePattern);\r\n\r\n\t// For now, assume that copy can only be called on PixMap surfaces. Shows up black.\r\n\tCGImageRef image = patternSurface.CreateImage();\r\n\tif (image == NULL) {\r\n\t\tFillRectangle(rc, ColourRGBA::FromRGB(0));\r\n\t\treturn;\r\n\t}\r\n\r\n\tconst CGPatternCallbacks drawImageCallbacks = { 0, drawImageRefCallback, releaseImageRefCallback };\r\n\r\n\tCGPatternRef pattern = CGPatternCreate(image,\r\n\t\t\t\t\t       CGRectMake(0, 0, patternSurface.bitmapWidth, patternSurface.bitmapHeight),\r\n\t\t\t\t\t       CGAffineTransformIdentity,\r\n\t\t\t\t\t       patternSurface.bitmapWidth,\r\n\t\t\t\t\t       patternSurface.bitmapHeight,\r\n\t\t\t\t\t       kCGPatternTilingNoDistortion,\r\n\t\t\t\t\t       true,\r\n\t\t\t\t\t       &drawImageCallbacks\r\n\t\t\t\t\t      );\r\n\tif (pattern != NULL) {\r\n\t\t// Create a pattern color space\r\n\t\tCGColorSpaceRef colorSpace = CGColorSpaceCreatePattern(NULL);\r\n\t\tif (colorSpace != NULL) {\r\n\r\n\t\t\tCGContextSaveGState(gc);\r\n\t\t\tCGContextSetFillColorSpace(gc, colorSpace);\r\n\r\n\t\t\t// Unlike the documentation, you MUST pass in a \"components\" parameter:\r\n\t\t\t// For coloured patterns it is the alpha value.\r\n\t\t\tconst CGFloat alpha = 1.0;\r\n\t\t\tCGContextSetFillPattern(gc, pattern, &alpha);\r\n\t\t\tCGContextFillRect(gc, PRectangleToCGRect(rc));\r\n\t\t\tCGContextRestoreGState(gc);\r\n\t\t\t// Free the color space, the pattern and image\r\n\t\t\tCGColorSpaceRelease(colorSpace);\r\n\t\t} /* colorSpace != NULL */\r\n\t\tcolorSpace = NULL;\r\n\t\tCGPatternRelease(pattern);\r\n\t\tpattern = NULL;\r\n\t} /* pattern != NULL */\r\n}\r\n\r\nvoid SurfaceImpl::RoundedRectangle(PRectangle rc, FillStroke fillStroke) {\r\n\t// This is only called from the margin marker drawing code for MarkerSymbol::RoundRect\r\n\t// The Win32 version does\r\n\t//  ::RoundRect(hdc, rc.left + 1, rc.top, rc.right - 1, rc.bottom, 8, 8 );\r\n\t// which is a rectangle with rounded corners each having a radius of 4 pixels.\r\n\t// It would be almost as good just cutting off the corners with lines at\r\n\t// 45 degrees as is done on GTK+.\r\n\r\n\t// Create a rectangle with semicircles at the corners\r\n\tconst int MAX_RADIUS = 4;\r\n\tconst int radius = std::min(MAX_RADIUS, static_cast<int>(std::min(rc.Height()/2, rc.Width()/2)));\r\n\r\n\t// Points go clockwise, starting from just below the top left\r\n\t// Corners are kept together, so we can easily create arcs to connect them\r\n\tCGPoint corners[4][3] = {\r\n\t\t{\r\n\t\t\t{ rc.left, rc.top + radius },\r\n\t\t\t{ rc.left, rc.top },\r\n\t\t\t{ rc.left + radius, rc.top },\r\n\t\t},\r\n\t\t{\r\n\t\t\t{ rc.right - radius - 1, rc.top },\r\n\t\t\t{ rc.right - 1, rc.top },\r\n\t\t\t{ rc.right - 1, rc.top + radius },\r\n\t\t},\r\n\t\t{\r\n\t\t\t{ rc.right - 1, rc.bottom - radius - 1 },\r\n\t\t\t{ rc.right - 1, rc.bottom - 1 },\r\n\t\t\t{ rc.right - radius - 1, rc.bottom - 1 },\r\n\t\t},\r\n\t\t{\r\n\t\t\t{ rc.left + radius, rc.bottom - 1 },\r\n\t\t\t{ rc.left, rc.bottom - 1 },\r\n\t\t\t{ rc.left, rc.bottom - radius - 1 },\r\n\t\t},\r\n\t};\r\n\r\n\t// Align the points in the middle of the pixels\r\n\tfor (int i = 0; i < 4; ++ i) {\r\n\t\tfor (int j = 0; j < 3; ++ j) {\r\n\t\t\tcorners[i][j].x += 0.5;\r\n\t\t\tcorners[i][j].y += 0.5;\r\n\t\t}\r\n\t}\r\n\r\n\tSetFillStroke(fillStroke);\r\n\r\n\t// Move to the last point to begin the path\r\n\tCGContextBeginPath(gc);\r\n\tCGContextMoveToPoint(gc, corners[3][2].x, corners[3][2].y);\r\n\r\n\tfor (int i = 0; i < 4; ++ i) {\r\n\t\tCGContextAddLineToPoint(gc, corners[i][0].x, corners[i][0].y);\r\n\t\tCGContextAddArcToPoint(gc, corners[i][1].x, corners[i][1].y, corners[i][2].x, corners[i][2].y, radius);\r\n\t}\r\n\r\n\t// Close the path to enclose it for stroking and for filling, then draw it\r\n\tCGContextClosePath(gc);\r\n\tCGContextDrawPath(gc, kCGPathFillStroke);\r\n\r\n\t// Restore as not all paths set\r\n\tCGContextSetLineWidth(gc, 1.0f);\r\n}\r\n\r\n// DrawChamferedRectangle is a helper function for AlphaRectangle that either fills or strokes a\r\n// rectangle with its corners chamfered at 45 degrees.\r\nstatic void DrawChamferedRectangle(CGContextRef gc, PRectangle rc, int cornerSize, CGPathDrawingMode mode) {\r\n\t// Points go clockwise, starting from just below the top left\r\n\tCGPoint corners[4][2] = {\r\n\t\t{\r\n\t\t\t{ rc.left, rc.top + cornerSize },\r\n\t\t\t{ rc.left + cornerSize, rc.top },\r\n\t\t},\r\n\t\t{\r\n\t\t\t{ rc.right - cornerSize - 1, rc.top },\r\n\t\t\t{ rc.right - 1, rc.top + cornerSize },\r\n\t\t},\r\n\t\t{\r\n\t\t\t{ rc.right - 1, rc.bottom - cornerSize - 1 },\r\n\t\t\t{ rc.right - cornerSize - 1, rc.bottom - 1 },\r\n\t\t},\r\n\t\t{\r\n\t\t\t{ rc.left + cornerSize, rc.bottom - 1 },\r\n\t\t\t{ rc.left, rc.bottom - cornerSize - 1 },\r\n\t\t},\r\n\t};\r\n\r\n\t// Align the points in the middle of the pixels\r\n\tfor (int i = 0; i < 4; ++ i) {\r\n\t\tfor (int j = 0; j < 2; ++ j) {\r\n\t\t\tcorners[i][j].x += 0.5;\r\n\t\t\tcorners[i][j].y += 0.5;\r\n\t\t}\r\n\t}\r\n\r\n\t// Move to the last point to begin the path\r\n\tCGContextBeginPath(gc);\r\n\tCGContextMoveToPoint(gc, corners[3][1].x, corners[3][1].y);\r\n\r\n\tfor (int i = 0; i < 4; ++ i) {\r\n\t\tCGContextAddLineToPoint(gc, corners[i][0].x, corners[i][0].y);\r\n\t\tCGContextAddLineToPoint(gc, corners[i][1].x, corners[i][1].y);\r\n\t}\r\n\r\n\t// Close the path to enclose it for stroking and for filling, then draw it\r\n\tCGContextClosePath(gc);\r\n\tCGContextDrawPath(gc, mode);\r\n}\r\n\r\nvoid Scintilla::Internal::SurfaceImpl::AlphaRectangle(PRectangle rc, XYPOSITION cornerSize, FillStroke fillStroke) {\r\n\tif (gc) {\r\n\t\tconst XYPOSITION halfStroke = fillStroke.stroke.width / 2.0f;\r\n\t\t// Set the Fill color to match\r\n\t\tFillColour(fillStroke.fill.colour);\r\n\t\tPenColourAlpha(fillStroke.stroke.colour);\r\n\t\tPRectangle rcFill = rc;\r\n\t\tif (cornerSize == 0) {\r\n\t\t\t// A simple rectangle, no rounded corners\r\n\t\t\tif (fillStroke.fill.colour == fillStroke.stroke.colour) {\r\n\t\t\t\t// Optimization for simple case\r\n\t\t\t\tCGRect rect = PRectangleToCGRect(rcFill);\r\n\t\t\t\tCGContextFillRect(gc, rect);\r\n\t\t\t} else {\r\n\t\t\t\trcFill.left += fillStroke.stroke.width;\r\n\t\t\t\trcFill.top += fillStroke.stroke.width;\r\n\t\t\t\trcFill.right -= fillStroke.stroke.width;\r\n\t\t\t\trcFill.bottom -= fillStroke.stroke.width;\r\n\t\t\t\tCGRect rect = PRectangleToCGRect(rcFill);\r\n\t\t\t\tCGContextFillRect(gc, rect);\r\n\t\t\t\tCGContextAddRect(gc, CGRectMake(rc.left + halfStroke, rc.top + halfStroke,\r\n\t\t\t\t\t\t\t\trc.Width() - fillStroke.stroke.width, rc.Height() - fillStroke.stroke.width));\r\n\t\t\t\tCGContextStrokeRectWithWidth(gc,\r\n\t\t\t\t\t\t\t     CGRectMake(rc.left + halfStroke, rc.top + halfStroke,\r\n\t\t\t\t\t\t\t\t\trc.Width() - fillStroke.stroke.width, rc.Height() - fillStroke.stroke.width),\r\n\t\t\t\t\t\t\t     fillStroke.stroke.width);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t// Approximate rounded corners with 45 degree chamfers.\r\n\t\t\t// Drawing real circular arcs often leaves some over- or under-drawn pixels.\r\n\t\t\tif (fillStroke.fill.colour == fillStroke.stroke.colour) {\r\n\t\t\t\t// Specializing this case avoids a few stray light/dark pixels in corners.\r\n\t\t\t\trcFill.left -= halfStroke;\r\n\t\t\t\trcFill.top -= halfStroke;\r\n\t\t\t\trcFill.right += halfStroke;\r\n\t\t\t\trcFill.bottom += halfStroke;\r\n\t\t\t\tDrawChamferedRectangle(gc, rcFill, cornerSize, kCGPathFill);\r\n\t\t\t} else {\r\n\t\t\t\trcFill.left += halfStroke;\r\n\t\t\t\trcFill.top += halfStroke;\r\n\t\t\t\trcFill.right -= halfStroke;\r\n\t\t\t\trcFill.bottom -= halfStroke;\r\n\t\t\t\tDrawChamferedRectangle(gc, rcFill, cornerSize-fillStroke.stroke.width, kCGPathFill);\r\n\t\t\t\tDrawChamferedRectangle(gc, rc, cornerSize, kCGPathStroke);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid Scintilla::Internal::SurfaceImpl::GradientRectangle(PRectangle rc, const std::vector<ColourStop> &stops, GradientOptions options) {\r\n\tif (!gc) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tCGPoint ptStart = CGPointMake(rc.left, rc.top);\r\n\tCGPoint ptEnd = CGPointMake(rc.left, rc.bottom);\r\n\tif (options == GradientOptions::leftToRight) {\r\n\t\tptEnd = CGPointMake(rc.right, rc.top);\r\n\t}\r\n\r\n\tstd::vector<CGFloat> components;\r\n\tstd::vector<CGFloat> locations;\r\n\tfor (const ColourStop &stop : stops) {\r\n\t\tlocations.push_back(stop.position);\r\n\t\tcomponents.push_back(stop.colour.GetRedComponent());\r\n\t\tcomponents.push_back(stop.colour.GetGreenComponent());\r\n\t\tcomponents.push_back(stop.colour.GetBlueComponent());\r\n\t\tcomponents.push_back(stop.colour.GetAlphaComponent());\r\n\t}\r\n\r\n\tCGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();\r\n\tif (!colorSpace) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tCGGradientRef gradiantRef = CGGradientCreateWithColorComponents(colorSpace,\r\n\t\t\t\t\t\t\t\t\tcomponents.data(),\r\n\t\t\t\t\t\t\t\t\tlocations.data(),\r\n\t\t\t\t\t\t\t\t\tlocations.size());\r\n\tif (gradiantRef) {\r\n\t\tCGContextSaveGState(gc);\r\n\t\tCGRect rect = PRectangleToCGRect(rc);\r\n\t\tCGContextClipToRect(gc, rect);\r\n\t\tCGContextBeginPath(gc);\r\n\t\tCGContextAddRect(gc, rect);\r\n\t\tCGContextClosePath(gc);\r\n\t\tCGContextDrawLinearGradient(gc, gradiantRef, ptStart, ptEnd, 0);\r\n\t\tCGGradientRelease(gradiantRef);\r\n\t\tCGContextRestoreGState(gc);\r\n\t}\r\n\tCGColorSpaceRelease(colorSpace);\r\n}\r\n\r\nstatic void ProviderReleaseData(void *, const void *data, size_t) {\r\n\tconst unsigned char *pixels = static_cast<const unsigned char *>(data);\r\n\tdelete []pixels;\r\n}\r\n\r\nstatic CGImageRef ImageCreateFromRGBA(int width, int height, const unsigned char *pixelsImage, bool invert) {\r\n\tCGImageRef image = 0;\r\n\r\n\t// Create an RGB color space.\r\n\tCGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();\r\n\tif (colorSpace) {\r\n\t\tconst int bitmapBytesPerRow = width * 4;\r\n\t\tconst int bitmapByteCount = bitmapBytesPerRow * height;\r\n\r\n\t\t// Create a data provider.\r\n\t\tCGDataProviderRef dataProvider = 0;\r\n\t\tif (invert) {\r\n\t\t\tunsigned char *pixelsUpsideDown = new unsigned char[bitmapByteCount];\r\n\r\n\t\t\tfor (int y=0; y<height; y++) {\r\n\t\t\t\tint yInverse = height - y - 1;\r\n\t\t\t\tmemcpy(pixelsUpsideDown + y * bitmapBytesPerRow,\r\n\t\t\t\t       pixelsImage + yInverse * bitmapBytesPerRow,\r\n\t\t\t\t       bitmapBytesPerRow);\r\n\t\t\t}\r\n\r\n\t\t\tdataProvider = CGDataProviderCreateWithData(\r\n\t\t\t\t\t       NULL, pixelsUpsideDown, bitmapByteCount, ProviderReleaseData);\r\n\t\t} else {\r\n\t\t\tdataProvider = CGDataProviderCreateWithData(\r\n\t\t\t\t\t       NULL, pixelsImage, bitmapByteCount, NULL);\r\n\r\n\t\t}\r\n\t\tif (dataProvider) {\r\n\t\t\t// Create the CGImage.\r\n\t\t\timage = CGImageCreate(width,\r\n\t\t\t\t\t      height,\r\n\t\t\t\t\t      8,\r\n\t\t\t\t\t      8 * 4,\r\n\t\t\t\t\t      bitmapBytesPerRow,\r\n\t\t\t\t\t      colorSpace,\r\n\t\t\t\t\t      kCGImageAlphaLast,\r\n\t\t\t\t\t      dataProvider,\r\n\t\t\t\t\t      NULL,\r\n\t\t\t\t\t      0,\r\n\t\t\t\t\t      kCGRenderingIntentDefault);\r\n\r\n\t\t\tCGDataProviderRelease(dataProvider);\r\n\t\t}\r\n\r\n\t\t// The image retains the color space, so we can release it.\r\n\t\tCGColorSpaceRelease(colorSpace);\r\n\t}\r\n\treturn image;\r\n}\r\n\r\nvoid SurfaceImpl::DrawRGBAImage(PRectangle rc, int width, int height, const unsigned char *pixelsImage) {\r\n\tCGImageRef image = ImageCreateFromRGBA(width, height, pixelsImage, true);\r\n\tif (image) {\r\n\t\tCGRect drawRect = CGRectMake(rc.left, rc.top, rc.Width(), rc.Height());\r\n\t\tCGContextDrawImage(gc, drawRect, image);\r\n\t\tCGImageRelease(image);\r\n\t}\r\n}\r\n\r\nvoid SurfaceImpl::Ellipse(PRectangle rc, FillStroke fillStroke) {\r\n\tconst CGRect ellipseRect = CGRectFromPRectangleInset(rc, fillStroke.stroke.width / 2.0f);\r\n\tSetFillStroke(fillStroke);\r\n\tCGContextBeginPath(gc);\r\n\tCGContextAddEllipseInRect(gc, ellipseRect);\r\n\tCGContextDrawPath(gc, kCGPathFillStroke);\r\n\t// Restore as not all paths set\r\n\tCGContextSetLineWidth(gc, 1.0f);\r\n}\r\n\r\nvoid SurfaceImpl::Stadium(PRectangle rc, FillStroke fillStroke, Ends ends) {\r\n\tconst CGFloat midLine = rc.Centre().y;\r\n\tconst CGFloat piOn2 = acos(0.0);\r\n\tconst XYPOSITION halfStroke = fillStroke.stroke.width / 2.0f;\r\n\tconst float radius = rc.Height() / 2.0f - halfStroke;\r\n\tPRectangle rcInner = rc;\r\n\trcInner.left += radius;\r\n\trcInner.right -= radius;\r\n\r\n\tSetFillStroke(fillStroke);\r\n\tCGContextBeginPath(gc);\r\n\r\n\tconst Ends leftSide = static_cast<Ends>(static_cast<int>(ends) & 0xf);\r\n\tconst Ends rightSide = static_cast<Ends>(static_cast<int>(ends) & 0xf0);\r\n\tswitch (leftSide) {\r\n\t\tcase Ends::leftFlat:\r\n\t\t\tCGContextMoveToPoint(gc, rc.left + halfStroke, rc.top + halfStroke);\r\n\t\t\tCGContextAddLineToPoint(gc, rc.left + halfStroke, rc.bottom - halfStroke);\r\n\t\t\tbreak;\r\n\t\tcase Ends::leftAngle:\r\n\t\t\tCGContextMoveToPoint(gc, rcInner.left + halfStroke, rc.top + halfStroke);\r\n\t\t\tCGContextAddLineToPoint(gc, rc.left + halfStroke, rc.Centre().y);\r\n\t\t\tCGContextAddLineToPoint(gc, rcInner.left + halfStroke, rc.bottom - halfStroke);\r\n\t\t\tbreak;\r\n\t\tcase Ends::semiCircles:\r\n\t\tdefault:\r\n\t\t\tCGContextMoveToPoint(gc, rcInner.left + halfStroke, rc.top + halfStroke);\r\n\t\t\tCGContextAddArc(gc, rcInner.left + halfStroke, midLine, radius, -piOn2, piOn2, 1);\r\n\t\t\tbreak;\r\n\t}\r\n\r\n\tswitch (rightSide) {\r\n\t\tcase Ends::rightFlat:\r\n\t\t\tCGContextAddLineToPoint(gc, rc.right - halfStroke, rc.bottom - halfStroke);\r\n\t\t\tCGContextAddLineToPoint(gc, rc.right - halfStroke, rc.top + halfStroke);\r\n\t\t\tbreak;\r\n\t\tcase Ends::rightAngle:\r\n\t\t\tCGContextAddLineToPoint(gc, rcInner.right - halfStroke, rc.bottom - halfStroke);\r\n\t\t\tCGContextAddLineToPoint(gc, rc.right - halfStroke, rc.Centre().y);\r\n\t\t\tCGContextAddLineToPoint(gc, rcInner.right - halfStroke, rc.top + halfStroke);\r\n\t\t\tbreak;\r\n\t\tcase Ends::semiCircles:\r\n\t\tdefault:\r\n\t\t\tCGContextAddLineToPoint(gc, rcInner.right - halfStroke, rc.bottom - halfStroke);\r\n\t\t\tCGContextAddArc(gc, rcInner.right - halfStroke, midLine, radius, piOn2, -piOn2, 1);\r\n\t\t\tbreak;\r\n\t}\r\n\r\n\t// Close the path to enclose it for stroking and for filling, then draw it\r\n\tCGContextClosePath(gc);\r\n\tCGContextDrawPath(gc, kCGPathFillStroke);\r\n\r\n\tCGContextSetLineWidth(gc, 1.0f);\r\n}\r\n\r\nvoid SurfaceImpl::CopyImageRectangle(SurfaceImpl *source, PRectangle srcRect, PRectangle dstRect) {\r\n\tCGImageRef image = source->CreateImage();\r\n\r\n\tCGRect src = PRectangleToCGRect(srcRect);\r\n\tCGRect dst = PRectangleToCGRect(dstRect);\r\n\r\n\t/* source from QuickDrawToQuartz2D.pdf on developer.apple.com */\r\n\tconst float w = static_cast<float>(CGImageGetWidth(image));\r\n\tconst float h = static_cast<float>(CGImageGetHeight(image));\r\n\tCGRect drawRect = CGRectMake(0, 0, w, h);\r\n\tif (!CGRectEqualToRect(src, dst)) {\r\n\t\tCGFloat sx = CGRectGetWidth(dst) / CGRectGetWidth(src);\r\n\t\tCGFloat sy = CGRectGetHeight(dst) / CGRectGetHeight(src);\r\n\t\tCGFloat dx = CGRectGetMinX(dst) - (CGRectGetMinX(src) * sx);\r\n\t\tCGFloat dy = CGRectGetMinY(dst) - (CGRectGetMinY(src) * sy);\r\n\t\tdrawRect = CGRectMake(dx, dy, w*sx, h*sy);\r\n\t}\r\n\tCGContextSaveGState(gc);\r\n\tCGContextClipToRect(gc, dst);\r\n\tCGContextDrawImage(gc, drawRect, image);\r\n\tCGContextRestoreGState(gc);\r\n\tCGImageRelease(image);\r\n}\r\n\r\nvoid SurfaceImpl::Copy(PRectangle rc, Scintilla::Internal::Point from, Surface &surfaceSource) {\r\n\t// Maybe we have to make the Surface two contexts:\r\n\t// a bitmap context which we do all the drawing on, and then a \"real\" context\r\n\t// which we copy the output to when we call \"Synchronize\". Ugh! Gross and slow!\r\n\r\n\t// For now, assume that copy can only be called on PixMap surfaces\r\n\tSurfaceImpl &source = static_cast<SurfaceImpl &>(surfaceSource);\r\n\r\n\t// Get the CGImageRef\r\n\tCGImageRef image = source.CreateImage();\r\n\t// If we could not get an image reference, fill the rectangle black\r\n\tif (image == NULL) {\r\n\t\tFillRectangle(rc, ColourRGBA::FromRGB(0));\r\n\t\treturn;\r\n\t}\r\n\r\n\t// Now draw the image on the surface\r\n\r\n\t// Some fancy clipping work is required here: draw only inside of rc\r\n\tCGContextSaveGState(gc);\r\n\tCGContextClipToRect(gc, PRectangleToCGRect(rc));\r\n\r\n\t//Platform::DebugPrintf(stderr, \"Copy: CGContextDrawImage: (%d, %d) - (%d X %d)\\n\", rc.left - from.x, rc.top - from.y, source.bitmapWidth, source.bitmapHeight );\r\n\tCGContextDrawImage(gc, CGRectMake(rc.left - from.x, rc.top - from.y, source.bitmapWidth, source.bitmapHeight), image);\r\n\r\n\t// Undo the clipping fun\r\n\tCGContextRestoreGState(gc);\r\n\r\n\t// Done with the image\r\n\tCGImageRelease(image);\r\n\timage = NULL;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n// Bidirectional text support for Arabic and Hebrew.\r\n\r\nstd::unique_ptr<IScreenLineLayout> SurfaceImpl::Layout(const IScreenLine *screenLine) {\r\n\treturn std::make_unique<ScreenLineLayout>(screenLine);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid SurfaceImpl::DrawTextNoClip(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text,\r\n\t\t\t\t ColourRGBA fore, ColourRGBA back) {\r\n\tFillRectangleAligned(rc, back);\r\n\tDrawTextTransparent(rc, font_, ybase, text, fore);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid SurfaceImpl::DrawTextClipped(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text,\r\n\t\t\t\t  ColourRGBA fore, ColourRGBA back) {\r\n\tCGContextSaveGState(gc);\r\n\tCGContextClipToRect(gc, PRectangleToCGRect(rc));\r\n\tDrawTextNoClip(rc, font_, ybase, text, fore, back);\r\n\tCGContextRestoreGState(gc);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nCFStringEncoding EncodingFromCharacterSet(bool unicode, CharacterSet characterSet) {\r\n\tif (unicode)\r\n\t\treturn kCFStringEncodingUTF8;\r\n\r\n\t// Unsupported -> Latin1 as reasonably safe\r\n\tenum { notSupported = kCFStringEncodingISOLatin1};\r\n\r\n\tswitch (characterSet) {\r\n\tcase CharacterSet::Ansi:\r\n\t\treturn kCFStringEncodingISOLatin1;\r\n\tcase CharacterSet::Default:\r\n\t\treturn kCFStringEncodingISOLatin1;\r\n\tcase CharacterSet::Baltic:\r\n\t\treturn kCFStringEncodingWindowsBalticRim;\r\n\tcase CharacterSet::ChineseBig5:\r\n\t\treturn kCFStringEncodingBig5;\r\n\tcase CharacterSet::EastEurope:\r\n\t\treturn kCFStringEncodingWindowsLatin2;\r\n\tcase CharacterSet::GB2312:\r\n\t\treturn kCFStringEncodingGB_18030_2000;\r\n\tcase CharacterSet::Greek:\r\n\t\treturn kCFStringEncodingWindowsGreek;\r\n\tcase CharacterSet::Hangul:\r\n\t\treturn kCFStringEncodingEUC_KR;\r\n\tcase CharacterSet::Mac:\r\n\t\treturn kCFStringEncodingMacRoman;\r\n\tcase CharacterSet::Oem:\r\n\t\treturn kCFStringEncodingISOLatin1;\r\n\tcase CharacterSet::Russian:\r\n\t\treturn kCFStringEncodingKOI8_R;\r\n\tcase CharacterSet::Cyrillic:\r\n\t\treturn kCFStringEncodingWindowsCyrillic;\r\n\tcase CharacterSet::ShiftJis:\r\n\t\treturn kCFStringEncodingShiftJIS;\r\n\tcase CharacterSet::Symbol:\r\n\t\treturn kCFStringEncodingMacSymbol;\r\n\tcase CharacterSet::Turkish:\r\n\t\treturn kCFStringEncodingWindowsLatin5;\r\n\tcase CharacterSet::Johab:\r\n\t\treturn kCFStringEncodingWindowsKoreanJohab;\r\n\tcase CharacterSet::Hebrew:\r\n\t\treturn kCFStringEncodingWindowsHebrew;\r\n\tcase CharacterSet::Arabic:\r\n\t\treturn kCFStringEncodingWindowsArabic;\r\n\tcase CharacterSet::Vietnamese:\r\n\t\treturn kCFStringEncodingWindowsVietnamese;\r\n\tcase CharacterSet::Thai:\r\n\t\treturn kCFStringEncodingISOLatinThai;\r\n\tcase CharacterSet::Iso8859_15:\r\n\t\treturn kCFStringEncodingISOLatin1;\r\n\tdefault:\r\n\t\treturn notSupported;\r\n\t}\r\n}\r\n\r\nvoid SurfaceImpl::DrawTextTransparent(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text,\r\n\t\t\t\t      ColourRGBA fore) {\r\n\tQuartzTextStyle *style = TextStyleFromFont(font_);\r\n\tif (!style) {\r\n\t\treturn;\r\n\t}\r\n\tCFStringEncoding encoding = EncodingFromCharacterSet(UnicodeMode(), style->getCharacterSet());\r\n\r\n\tCGColorRef color = CGColorCreateGenericRGB(fore.GetRedComponent(),\r\n\t\t\t\t\t\t   fore.GetGreenComponent(),\r\n\t\t\t\t\t\t   fore.GetBlueComponent(),\r\n\t\t\t\t\t\t   fore.GetAlphaComponent());\r\n\r\n\tstyle->setCTStyleColour(color);\r\n\r\n\tCGColorRelease(color);\r\n\r\n\tQuartzTextLayout layoutDraw(text, encoding, style);\r\n\tlayoutDraw.draw(gc, rc.left, ybase);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid SurfaceImpl::MeasureWidths(const Font *font_, std::string_view text, XYPOSITION *positions) {\r\n\tconst QuartzTextStyle *style = TextStyleFromFont(font_);\r\n\tif (!style) {\r\n\t\treturn;\r\n\t}\r\n\tCFStringEncoding encoding = EncodingFromCharacterSet(UnicodeMode(), style->getCharacterSet());\r\n\tQuartzTextLayout layoutMeasure(text, encoding, style);\r\n\tconst CFStringEncoding encodingUsed = layoutMeasure.getEncoding();\r\n\r\n\tCTLineRef mLine = layoutMeasure.getCTLine();\r\n\tassert(mLine);\r\n\r\n\tif (encodingUsed != encoding) {\r\n\t\t// Switched to MacRoman to make work so treat as single byte encoding.\r\n\t\tfor (int i=0; i<text.length(); i++) {\r\n\t\t\tCGFloat xPosition = CTLineGetOffsetForStringIndex(mLine, i+1, nullptr);\r\n\t\t\tpositions[i] = xPosition;\r\n\t\t}\r\n\t\treturn;\r\n\t}\r\n\r\n\tif (UnicodeMode()) {\r\n\t\t// Map the widths given for UTF-16 characters back onto the UTF-8 input string\r\n\t\tCFIndex fit = layoutMeasure.getStringLength();\r\n\t\tint ui=0;\r\n\t\tint i=0;\r\n\t\tstd::vector<CGFloat> linePositions(fit);\r\n\t\tGetPositions(mLine, linePositions);\r\n\t\twhile (ui<fit) {\r\n\t\t\tconst unsigned char uch = text[i];\r\n\t\t\tconst unsigned int byteCount = UTF8BytesOfLead[uch];\r\n\t\t\tconst int codeUnits = UTF16LengthFromUTF8ByteCount(byteCount);\r\n\t\t\tconst CGFloat xPosition = linePositions[ui];\r\n\t\t\tfor (unsigned int bytePos=0; (bytePos<byteCount) && (i<text.length()); bytePos++) {\r\n\t\t\t\tpositions[i++] = xPosition;\r\n\t\t\t}\r\n\t\t\tui += codeUnits;\r\n\t\t}\r\n\t\tXYPOSITION lastPos = 0.0f;\r\n\t\tif (i > 0)\r\n\t\t\tlastPos = positions[i-1];\r\n\t\twhile (i<text.length()) {\r\n\t\t\tpositions[i++] = lastPos;\r\n\t\t}\r\n\t} else if (mode.codePage) {\r\n\t\tint ui = 0;\r\n\t\tfor (int i=0; i<text.length();) {\r\n\t\t\tsize_t lenChar = DBCSIsLeadByte(mode.codePage, text[i]) ? 2 : 1;\r\n\t\t\tCGFloat xPosition = CTLineGetOffsetForStringIndex(mLine, ui+1, NULL);\r\n\t\t\tfor (unsigned int bytePos=0; (bytePos<lenChar) && (i<text.length()); bytePos++) {\r\n\t\t\t\tpositions[i++] = xPosition;\r\n\t\t\t}\r\n\t\t\tui++;\r\n\t\t}\r\n\t} else {\t// Single byte encoding\r\n\t\tfor (int i=0; i<text.length(); i++) {\r\n\t\t\tCGFloat xPosition = CTLineGetOffsetForStringIndex(mLine, i+1, NULL);\r\n\t\t\tpositions[i] = xPosition;\r\n\t\t}\r\n\t}\r\n\r\n}\r\n\r\nXYPOSITION SurfaceImpl::WidthText(const Font *font_, std::string_view text) {\r\n\tconst QuartzTextStyle *style = TextStyleFromFont(font_);\r\n\tif (!style) {\r\n\t\treturn 1;\r\n\t}\r\n\tCFStringEncoding encoding = EncodingFromCharacterSet(UnicodeMode(), style->getCharacterSet());\r\n\tQuartzTextLayout layoutMeasure(text, encoding, style);\r\n\r\n\treturn static_cast<XYPOSITION>(layoutMeasure.MeasureStringWidth());\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid SurfaceImpl::DrawTextNoClipUTF8(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text,\r\n\t\t\t\t ColourRGBA fore, ColourRGBA back) {\r\n\tFillRectangleAligned(rc, back);\r\n\tDrawTextTransparentUTF8(rc, font_, ybase, text, fore);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid SurfaceImpl::DrawTextClippedUTF8(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text,\r\n\t\t\t\t  ColourRGBA fore, ColourRGBA back) {\r\n\tCGContextSaveGState(gc);\r\n\tCGContextClipToRect(gc, PRectangleToCGRect(rc));\r\n\tDrawTextNoClipUTF8(rc, font_, ybase, text, fore, back);\r\n\tCGContextRestoreGState(gc);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid SurfaceImpl::DrawTextTransparentUTF8(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text,\r\n\t\t\t\t      ColourRGBA fore) {\r\n\tQuartzTextStyle *style = TextStyleFromFont(font_);\r\n\tif (!style) {\r\n\t\treturn;\r\n\t}\r\n\tconst CFStringEncoding encoding = kCFStringEncodingUTF8;\r\n\r\n\tCGColorRef color = CGColorCreateGenericRGB(fore.GetRedComponent(),\r\n\t\t\t\t\t\t   fore.GetGreenComponent(),\r\n\t\t\t\t\t\t   fore.GetBlueComponent(),\r\n\t\t\t\t\t\t   fore.GetAlphaComponent());\r\n\r\n\tstyle->setCTStyleColour(color);\r\n\r\n\tCGColorRelease(color);\r\n\r\n\tQuartzTextLayout layoutDraw(text, encoding, style);\r\n\tlayoutDraw.draw(gc, rc.left, ybase);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid SurfaceImpl::MeasureWidthsUTF8(const Font *font_, std::string_view text, XYPOSITION *positions) {\r\n\tconst QuartzTextStyle *style = TextStyleFromFont(font_);\r\n\tif (!style) {\r\n\t\treturn;\r\n\t}\r\n\tconstexpr CFStringEncoding encoding = kCFStringEncodingUTF8;\r\n\tQuartzTextLayout layoutMeasure(text, encoding, style);\r\n\tconst CFStringEncoding encodingUsed = layoutMeasure.getEncoding();\r\n\r\n\tCTLineRef mLine = layoutMeasure.getCTLine();\r\n\tassert(mLine);\r\n\r\n\tif (encodingUsed != encoding) {\r\n\t\t// Switched to MacRoman to make work so treat as single byte encoding.\r\n\t\tfor (int i=0; i<text.length(); i++) {\r\n\t\t\tCGFloat xPosition = CTLineGetOffsetForStringIndex(mLine, i+1, nullptr);\r\n\t\t\tpositions[i] = xPosition;\r\n\t\t}\r\n\t\treturn;\r\n\t}\r\n\r\n\t// Map the widths given for UTF-16 characters back onto the UTF-8 input string\r\n\tCFIndex fit = layoutMeasure.getStringLength();\r\n\tint ui=0;\r\n\tint i=0;\r\n\tstd::vector<CGFloat> linePositions(fit);\r\n\tGetPositions(mLine, linePositions);\r\n\twhile (ui<fit) {\r\n\t\tconst unsigned char uch = text[i];\r\n\t\tconst unsigned int byteCount = UTF8BytesOfLead[uch];\r\n\t\tconst int codeUnits = UTF16LengthFromUTF8ByteCount(byteCount);\r\n\t\tconst CGFloat xPosition = linePositions[ui];\r\n\t\tfor (unsigned int bytePos=0; (bytePos<byteCount) && (i<text.length()); bytePos++) {\r\n\t\t\tpositions[i++] = xPosition;\r\n\t\t}\r\n\t\tui += codeUnits;\r\n\t}\r\n\tXYPOSITION lastPos = 0.0f;\r\n\tif (i > 0)\r\n\t\tlastPos = positions[i-1];\r\n\twhile (i<text.length()) {\r\n\t\tpositions[i++] = lastPos;\r\n\t}\r\n}\r\n\r\nXYPOSITION SurfaceImpl::WidthTextUTF8(const Font *font_, std::string_view text) {\r\n\tconst QuartzTextStyle *style = TextStyleFromFont(font_);\r\n\tif (!style) {\r\n\t\treturn 1;\r\n\t}\r\n\tQuartzTextLayout layoutMeasure(text, kCFStringEncodingUTF8, style);\r\n\treturn static_cast<XYPOSITION>(layoutMeasure.MeasureStringWidth());\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n\r\n// This string contains a good range of characters to test for size.\r\nconst char sizeString[] = \"`~!@#$%^&*()-_=+\\\\|[]{};:\\\"\\'<,>.?/1234567890\"\r\n\t\t\t  \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\";\r\n\r\nXYPOSITION SurfaceImpl::Ascent(const Font *font_) {\r\n\tconst QuartzTextStyle *style = TextStyleFromFont(font_);\r\n\tif (!style) {\r\n\t\treturn 1;\r\n\t}\r\n\r\n\tfloat ascent = style->getAscent();\r\n\treturn ascent + 0.5f;\r\n\r\n}\r\n\r\nXYPOSITION SurfaceImpl::Descent(const Font *font_) {\r\n\tconst QuartzTextStyle *style = TextStyleFromFont(font_);\r\n\tif (!style) {\r\n\t\treturn 1;\r\n\t}\r\n\r\n\tfloat descent = style->getDescent();\r\n\treturn descent + 0.5f;\r\n\r\n}\r\n\r\nXYPOSITION SurfaceImpl::InternalLeading(const Font *) {\r\n\treturn 0;\r\n}\r\n\r\nXYPOSITION SurfaceImpl::Height(const Font *font_) {\r\n\r\n\treturn Ascent(font_) + Descent(font_);\r\n}\r\n\r\nXYPOSITION SurfaceImpl::AverageCharWidth(const Font *font_) {\r\n\r\n\tXYPOSITION width = WidthText(font_, sizeString);\r\n\r\n\treturn std::round(width / strlen(sizeString));\r\n}\r\n\r\nvoid SurfaceImpl::SetClip(PRectangle rc) {\r\n\tCGContextSaveGState(gc);\r\n\tCGContextClipToRect(gc, PRectangleToCGRect(rc));\r\n}\r\n\r\nvoid SurfaceImpl::PopClip() {\r\n\tCGContextRestoreGState(gc);\r\n}\r\n\r\nvoid SurfaceImpl::FlushCachedState() {\r\n\tCGContextSynchronize(gc);\r\n}\r\n\r\nvoid SurfaceImpl::FlushDrawing() {\r\n}\r\n\r\nstd::unique_ptr<Surface> Surface::Allocate(Technology) {\r\n\treturn std::make_unique<SurfaceImpl>();\r\n}\r\n\r\n//----------------- Window -------------------------------------------------------------------------\r\n\r\n// Cocoa uses different types for windows and views, so a Window may\r\n// be either an NSWindow or NSView and the code will check the type\r\n// before performing an action.\r\n\r\nWindow::~Window() noexcept {\r\n}\r\n\r\n// Window::Destroy needs to see definition of ListBoxImpl so is located after ListBoxImpl\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nstatic CGFloat ScreenMax() {\r\n\treturn NSMaxY([NSScreen mainScreen].frame);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nPRectangle Window::GetPosition() const {\r\n\tif (wid) {\r\n\t\tNSRect rect;\r\n\t\tid idWin = (__bridge id)(wid);\r\n\t\tNSWindow *win;\r\n\t\tif ([idWin isKindOfClass: [NSView class]]) {\r\n\t\t\t// NSView\r\n\t\t\tNSView *view = idWin;\r\n\t\t\twin = view.window;\r\n\t\t\trect = [view convertRect: view.bounds toView: nil];\r\n\t\t\trect = [win convertRectToScreen: rect];\r\n\t\t} else {\r\n\t\t\t// NSWindow\r\n\t\t\twin = idWin;\r\n\t\t\trect = win.frame;\r\n\t\t}\r\n\t\tCGFloat screenHeight = ScreenMax();\r\n\t\t// Invert screen positions to match Scintilla\r\n\t\treturn PRectangle(\r\n\t\t\t       NSMinX(rect), screenHeight - NSMaxY(rect),\r\n\t\t\t       NSMaxX(rect), screenHeight - NSMinY(rect));\r\n\t} else {\r\n\t\treturn PRectangle(0, 0, 1, 1);\r\n\t}\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid Window::SetPosition(PRectangle rc) {\r\n\tif (wid) {\r\n\t\tid idWin = (__bridge id)(wid);\r\n\t\tif ([idWin isKindOfClass: [NSView class]]) {\r\n\t\t\t// NSView\r\n\t\t\t// Moves this view inside the parent view\r\n\t\t\tNSRect nsrc = NSMakeRect(rc.left, rc.bottom, rc.Width(), rc.Height());\r\n\t\t\tNSView *view = idWin;\r\n\t\t\tnsrc = [view.window convertRectFromScreen: nsrc];\r\n\t\t\tview.frame = nsrc;\r\n\t\t} else {\r\n\t\t\t// NSWindow\r\n\t\t\tPLATFORM_ASSERT([idWin isKindOfClass: [NSWindow class]]);\r\n\t\t\tNSWindow *win = idWin;\r\n\t\t\tCGFloat screenHeight = ScreenMax();\r\n\t\t\tNSRect nsrc = NSMakeRect(rc.left, screenHeight - rc.bottom,\r\n\t\t\t\t\t\t rc.Width(), rc.Height());\r\n\t\t\t[win setFrame: nsrc display: YES];\r\n\t\t}\r\n\t}\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid Window::SetPositionRelative(PRectangle rc, const Window *window) {\r\n\tPRectangle rcOther = window->GetPosition();\r\n\trc.left += rcOther.left;\r\n\trc.right += rcOther.left;\r\n\trc.top += rcOther.top;\r\n\trc.bottom += rcOther.top;\r\n\tSetPosition(rc);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nPRectangle Window::GetClientPosition() const {\r\n\t// This means, in macOS terms, get the \"frame bounds\". Call GetPosition, just like on Win32.\r\n\treturn GetPosition();\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid Window::Show(bool show) {\r\n\tif (wid) {\r\n\t\tid idWin = (__bridge id)(wid);\r\n\t\tif ([idWin isKindOfClass: [NSWindow class]]) {\r\n\t\t\tNSWindow *win = idWin;\r\n\t\t\tif (show) {\r\n\t\t\t\t[win orderFront: nil];\r\n\t\t\t} else {\r\n\t\t\t\t[win orderOut: nil];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Invalidates the entire window or view so it is completely redrawn.\r\n */\r\nvoid Window::InvalidateAll() {\r\n\tif (wid) {\r\n\t\tid idWin = (__bridge id)(wid);\r\n\t\tNSView *container;\r\n\t\tif ([idWin isKindOfClass: [NSView class]]) {\r\n\t\t\tcontainer = idWin;\r\n\t\t} else {\r\n\t\t\t// NSWindow\r\n\t\t\tNSWindow *win = idWin;\r\n\t\t\tcontainer = win.contentView;\r\n\t\t\tcontainer.needsDisplay = YES;\r\n\t\t}\r\n\t\tcontainer.needsDisplay = YES;\r\n\t}\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Invalidates part of the window or view so only this part redrawn.\r\n */\r\nvoid Window::InvalidateRectangle(PRectangle rc) {\r\n\tif (wid) {\r\n\t\tid idWin = (__bridge id)(wid);\r\n\t\tNSView *container;\r\n\t\tif ([idWin isKindOfClass: [NSView class]]) {\r\n\t\t\tcontainer = idWin;\r\n\t\t} else {\r\n\t\t\t// NSWindow\r\n\t\t\tNSWindow *win = idWin;\r\n\t\t\tcontainer = win.contentView;\r\n\t\t}\r\n\t\t[container setNeedsDisplayInRect: PRectangleToNSRect(rc)];\r\n\t}\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Converts the Scintilla cursor enum into an NSCursor and stores it in the associated NSView,\r\n * which then will take care to set up a new mouse tracking rectangle.\r\n */\r\nvoid Window::SetCursor(Cursor curs) {\r\n\tif (wid) {\r\n\t\tid idWin = (__bridge id)(wid);\r\n\t\tif ([idWin isKindOfClass: [SCIContentView class]]) {\r\n\t\t\tSCIContentView *container = idWin;\r\n\t\t\t[container setCursor: static_cast<int>(curs)];\r\n\t\t}\r\n\t}\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nPRectangle Window::GetMonitorRect(Point) {\r\n\tif (wid) {\r\n\t\tid idWin = (__bridge id)(wid);\r\n\t\tif ([idWin isKindOfClass: [NSView class]]) {\r\n\t\t\tNSView *view = idWin;\r\n\t\t\tidWin = view.window;\r\n\t\t}\r\n\t\tif ([idWin isKindOfClass: [NSWindow class]]) {\r\n\t\t\tPRectangle rcPosition = GetPosition();\r\n\r\n\t\t\tNSWindow *win = idWin;\r\n\t\t\tNSScreen *screen = win.screen;\r\n\t\t\tNSRect rect = screen.visibleFrame;\r\n\t\t\tCGFloat screenHeight = rect.origin.y + rect.size.height;\r\n\t\t\t// Invert screen positions to match Scintilla\r\n\t\t\tPRectangle rcWork(\r\n\t\t\t\tNSMinX(rect), screenHeight - NSMaxY(rect),\r\n\t\t\t\tNSMaxX(rect), screenHeight - NSMinY(rect));\r\n\t\t\tPRectangle rcMonitor(rcWork.left - rcPosition.left,\r\n\t\t\t\t\t     rcWork.top - rcPosition.top,\r\n\t\t\t\t\t     rcWork.right - rcPosition.left,\r\n\t\t\t\t\t     rcWork.bottom - rcPosition.top);\r\n\t\t\treturn rcMonitor;\r\n\t\t}\r\n\t}\r\n\treturn PRectangle();\r\n}\r\n\r\n//----------------- ImageFromXPM -------------------------------------------------------------------\r\n\r\n// Convert an XPM image into an NSImage for use with Cocoa\r\n\r\nstatic NSImage *ImageFromXPM(XPM *pxpm) {\r\n\tNSImage *img = nil;\r\n\tif (pxpm) {\r\n\t\tconst int width = pxpm->GetWidth();\r\n\t\tconst int height = pxpm->GetHeight();\r\n\t\tPRectangle rcxpm(0, 0, width, height);\r\n\t\tstd::unique_ptr<Surface> surfaceBase(Surface::Allocate(Technology::Default));\r\n\t\tstd::unique_ptr<Surface> surfaceXPM = surfaceBase->AllocatePixMap(width, height);\r\n\t\tSurfaceImpl *surfaceIXPM = static_cast<SurfaceImpl *>(surfaceXPM.get());\r\n\t\tCGContextClearRect(surfaceIXPM->GetContext(), CGRectMake(0, 0, width, height));\r\n\t\tpxpm->Draw(surfaceXPM.get(), rcxpm);\r\n\t\tCGImageRef imageRef = surfaceIXPM->CreateImage();\r\n\t\timg = [[NSImage alloc] initWithCGImage: imageRef size: NSZeroSize];\r\n\t\tCGImageRelease(imageRef);\r\n\t}\r\n\treturn img;\r\n}\r\n\r\n//----------------- ListBox and related classes ----------------------------------------------------\r\n\r\n//----------------- IListBox -----------------------------------------------------------------------\r\n\r\nnamespace {\r\n\r\n// Unnamed namespace hides local IListBox interface.\r\n// IListBox is used to cross languages to send events from Objective C++\r\n// AutoCompletionDelegate and AutoCompletionDataSource to C++ ListBoxImpl.\r\n\r\nclass IListBox {\r\npublic:\r\n\tvirtual int Rows() = 0;\r\n\tvirtual NSImage *ImageForRow(NSInteger row) = 0;\r\n\tvirtual NSString *TextForRow(NSInteger row) = 0;\r\n\tvirtual void DoubleClick() = 0;\r\n\tvirtual void SelectionChange() = 0;\r\n};\r\n\r\n}\r\n\r\n//----------------- AutoCompletionDelegate ---------------------------------------------------------\r\n\r\n// AutoCompletionDelegate is an Objective C++ class so it can implement\r\n// NSTableViewDelegate and receive tableViewSelectionDidChange events.\r\n\r\n@interface AutoCompletionDelegate : NSObject <NSTableViewDelegate> {\r\n\tIListBox *box;\r\n}\r\n\r\n@property IListBox *box;\r\n\r\n@end\r\n\r\n@implementation AutoCompletionDelegate\r\n\r\n@synthesize box;\r\n\r\n- (void) tableViewSelectionDidChange: (NSNotification *) notification {\r\n#pragma unused(notification)\r\n\tif (box) {\r\n\t\tbox->SelectionChange();\r\n\t}\r\n}\r\n\r\n@end\r\n\r\n//----------------- AutoCompletionDataSource -------------------------------------------------------\r\n\r\n// AutoCompletionDataSource provides data to display in the list box.\r\n// It is also the target of the NSTableView so it receives double clicks.\r\n\r\n@interface AutoCompletionDataSource : NSObject <NSTableViewDataSource> {\r\n\tIListBox *box;\r\n}\r\n\r\n@property IListBox *box;\r\n\r\n@end\r\n\r\n@implementation AutoCompletionDataSource\r\n\r\n@synthesize box;\r\n\r\n- (void) doubleClick: (id) sender {\r\n#pragma unused(sender)\r\n\tif (box) {\r\n\t\tbox->DoubleClick();\r\n\t}\r\n}\r\n\r\n- (id) tableView: (NSTableView *) aTableView objectValueForTableColumn: (NSTableColumn *) aTableColumn row: (NSInteger) rowIndex {\r\n#pragma unused(aTableView)\r\n\tif (!box)\r\n\t\treturn nil;\r\n\tif ([(NSString *)aTableColumn.identifier isEqualToString: @\"icon\"]) {\r\n\t\treturn box->ImageForRow(rowIndex);\r\n\t} else {\r\n\t\treturn box->TextForRow(rowIndex);\r\n\t}\r\n}\r\n\r\n- (void) tableView: (NSTableView *) aTableView setObjectValue: anObject forTableColumn: (NSTableColumn *) aTableColumn row: (NSInteger) rowIndex {\r\n#pragma unused(aTableView)\r\n#pragma unused(anObject)\r\n#pragma unused(aTableColumn)\r\n#pragma unused(rowIndex)\r\n}\r\n\r\n- (NSInteger) numberOfRowsInTableView: (NSTableView *) aTableView {\r\n#pragma unused(aTableView)\r\n\tif (!box)\r\n\t\treturn 0;\r\n\treturn box->Rows();\r\n}\r\n\r\n@end\r\n\r\n//----------------- ListBoxImpl --------------------------------------------------------------------\r\n\r\nnamespace {\t// unnamed namespace hides ListBoxImpl and associated classes\r\n\r\nstruct RowData {\r\n\tint type;\r\n\tstd::string text;\r\n\tRowData(int type_, const char *text_) :\r\n\t\ttype(type_), text(text_) {\r\n\t}\r\n};\r\n\r\nclass LinesData {\r\n\tstd::vector<RowData> lines;\r\npublic:\r\n\tLinesData() {\r\n\t}\r\n\t~LinesData() {\r\n\t}\r\n\tint Length() const {\r\n\t\treturn static_cast<int>(lines.size());\r\n\t}\r\n\tvoid Clear() {\r\n\t\tlines.clear();\r\n\t}\r\n\tvoid Add(int /* index */, int type, char *str) {\r\n\t\tlines.push_back(RowData(type, str));\r\n\t}\r\n\tint GetType(size_t index) const {\r\n\t\tif (index < lines.size()) {\r\n\t\t\treturn lines[index].type;\r\n\t\t} else {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}\r\n\tconst char *GetString(size_t index) const {\r\n\t\tif (index < lines.size()) {\r\n\t\t\treturn lines[index].text.c_str();\r\n\t\t} else {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}\r\n};\r\n\r\nclass ListBoxImpl : public ListBox, IListBox {\r\nprivate:\r\n\tNSMutableDictionary *images;\r\n\tint lineHeight;\r\n\tbool unicodeMode;\r\n\tint desiredVisibleRows;\r\n\tXYPOSITION maxItemWidth;\r\n\tunsigned int aveCharWidth;\r\n\tXYPOSITION maxIconWidth;\r\n\tstd::unique_ptr<Font> font;\r\n\tint maxWidth;\r\n\r\n\tNSTableView *table;\r\n\tNSScrollView *scroller;\r\n\tNSTableColumn *colIcon;\r\n\tNSTableColumn *colText;\r\n\tAutoCompletionDataSource *ds;\r\n\tAutoCompletionDelegate *acd;\r\n\r\n\tLinesData ld;\r\n\tIListBoxDelegate *delegate;\r\n\r\npublic:\r\n\tListBoxImpl() :\r\n\t\timages(nil),\r\n\t\tlineHeight(10),\r\n\t\tunicodeMode(false),\r\n\t\tdesiredVisibleRows(5),\r\n\t\tmaxItemWidth(0),\r\n\t\taveCharWidth(8),\r\n\t\tmaxIconWidth(0),\r\n\t\tmaxWidth(2000),\r\n\t\ttable(nil),\r\n\t\tscroller(nil),\r\n\t\tcolIcon(nil),\r\n\t\tcolText(nil),\r\n\t\tds(nil),\r\n\t\tacd(nil),\r\n\t\tdelegate(nullptr) {\r\n\t\timages = [[NSMutableDictionary alloc] init];\r\n\t}\r\n\t~ListBoxImpl() override {\r\n\t}\r\n\r\n\t// ListBox methods\r\n\tvoid SetFont(const Font *font_) override;\r\n\tvoid Create(Window &parent, int ctrlID, Scintilla::Internal::Point pt, int lineHeight_, bool unicodeMode_, Technology technology_) override;\r\n\tvoid SetAverageCharWidth(int width) override;\r\n\tvoid SetVisibleRows(int rows) override;\r\n\tint GetVisibleRows() const override;\r\n\tPRectangle GetDesiredRect() override;\r\n\tint CaretFromEdge() override;\r\n\tvoid Clear() noexcept override;\r\n\tvoid Append(char *s, int type = -1) override;\r\n\tint Length() override;\r\n\tvoid Select(int n) override;\r\n\tint GetSelection() override;\r\n\tint Find(const char *prefix) override;\r\n\tstd::string GetValue(int n) override;\r\n\tvoid RegisterImage(int type, const char *xpm_data) override;\r\n\tvoid RegisterRGBAImage(int type, int width, int height, const unsigned char *pixelsImage) override;\r\n\tvoid ClearRegisteredImages() override;\r\n\tvoid SetDelegate(IListBoxDelegate *lbDelegate) override {\r\n\t\tdelegate = lbDelegate;\r\n\t}\r\n\tvoid SetList(const char *list, char separator, char typesep) override;\r\n\tvoid SetOptions(ListOptions options_) override;\r\n\r\n\t// To clean up when closed\r\n\tvoid ReleaseViews();\r\n\r\n\t// For access from AutoCompletionDataSource implement IListBox\r\n\tint Rows() override;\r\n\tNSImage *ImageForRow(NSInteger row) override;\r\n\tNSString *TextForRow(NSInteger row) override;\r\n\tvoid DoubleClick() override;\r\n\tvoid SelectionChange() override;\r\n};\r\n\r\nvoid ListBoxImpl::Create(Window & /*parent*/, int /*ctrlID*/, Scintilla::Internal::Point pt,\r\n\t\t\t int lineHeight_, bool unicodeMode_, Technology) {\r\n\tlineHeight = lineHeight_;\r\n\tunicodeMode = unicodeMode_;\r\n\tmaxWidth = 2000;\r\n\r\n\tNSRect lbRect = NSMakeRect(pt.x, pt.y, 120, lineHeight * desiredVisibleRows);\r\n\tNSWindow *winLB = [[NSWindow alloc] initWithContentRect: lbRect\r\n\t\t\t\t\t\t      styleMask: NSWindowStyleMaskBorderless\r\n\t\t\t\t\t\t\tbacking: NSBackingStoreBuffered\r\n\t\t\t\t\t\t\t  defer: NO];\r\n\t[winLB setLevel: NSModalPanelWindowLevel+1];\r\n\t[winLB setHasShadow: YES];\r\n\tNSRect scRect = NSMakeRect(0, 0, lbRect.size.width, lbRect.size.height);\r\n\tscroller = [[NSScrollView alloc] initWithFrame: scRect];\r\n\t[scroller setHasVerticalScroller: YES];\r\n\ttable = [[NSTableView alloc] initWithFrame: scRect];\r\n\t[table setHeaderView: nil];\r\n\tscroller.documentView = table;\r\n\tcolIcon = [[NSTableColumn alloc] initWithIdentifier: @\"icon\"];\r\n\tcolIcon.width = 20;\r\n\t[colIcon setEditable: NO];\r\n\t[colIcon setHidden: YES];\r\n\tNSImageCell *imCell = [[NSImageCell alloc] init];\r\n\tcolIcon.dataCell = imCell;\r\n\t[table addTableColumn: colIcon];\r\n\tcolText = [[NSTableColumn alloc] initWithIdentifier: @\"name\"];\r\n\tcolText.resizingMask = NSTableColumnAutoresizingMask;\r\n\t[colText setEditable: NO];\r\n\t[table addTableColumn: colText];\r\n\tds = [[AutoCompletionDataSource alloc] init];\r\n\tds.box = this;\r\n\ttable.dataSource = ds;\t// Weak reference\r\n\tacd = [[AutoCompletionDelegate alloc] init];\r\n\t[acd setBox: this];\r\n\ttable.delegate = acd;\r\n\tscroller.autoresizingMask = NSViewWidthSizable | NSViewHeightSizable;\r\n\t[winLB.contentView addSubview: scroller];\r\n\r\n\ttable.target = ds;\r\n\ttable.doubleAction = @selector(doubleClick:);\r\n\ttable.selectionHighlightStyle = NSTableViewSelectionHighlightStyleSourceList;\r\n\r\n\tif (@available(macOS 11.0, *)) {\r\n\t\t[table setStyle: NSTableViewStylePlain];\r\n\t}\r\n\r\n\twid = (__bridge_retained WindowID)winLB;\r\n}\r\n\r\nvoid ListBoxImpl::SetFont(const Font *font_) {\r\n\t// NSCell setFont takes an NSFont* rather than a CTFontRef but they\r\n\t// are the same thing toll-free bridged.\r\n\tQuartzTextStyle *style = TextStyleFromFont(font_);\r\n\tfont = std::make_unique<FontQuartz>(style);\r\n\tNSFont *pfont = (__bridge NSFont *)style->getFontRef();\r\n\t[colText.dataCell setFont: pfont];\r\n\tCGFloat itemHeight = std::ceil(pfont.boundingRectForFont.size.height);\r\n\ttable.rowHeight = itemHeight;\r\n}\r\n\r\nvoid ListBoxImpl::SetAverageCharWidth(int width) {\r\n\taveCharWidth = width;\r\n}\r\n\r\nvoid ListBoxImpl::SetVisibleRows(int rows) {\r\n\tdesiredVisibleRows = rows;\r\n}\r\n\r\nint ListBoxImpl::GetVisibleRows() const {\r\n\treturn desiredVisibleRows;\r\n}\r\n\r\nPRectangle ListBoxImpl::GetDesiredRect() {\r\n\tPRectangle rcDesired;\r\n\trcDesired = GetPosition();\r\n\r\n\tCGFloat itemHeight;\r\n\tif (@available(macOS 11.0, *)) {\r\n\t\titemHeight = table.rowHeight;\r\n\t} else {\r\n\t\t// There appears to be an extra pixel above and below the row contents\r\n\t\titemHeight = table.rowHeight + 2;\r\n\t}\r\n\r\n\tint rows = Length();\r\n\tif ((rows == 0) || (rows > desiredVisibleRows))\r\n\t\trows = desiredVisibleRows;\r\n\r\n\trcDesired.bottom = rcDesired.top + static_cast<XYPOSITION>(itemHeight * rows);\r\n\trcDesired.right = rcDesired.left + maxItemWidth + aveCharWidth;\r\n\trcDesired.right += 4; // Ensures no truncation of text\r\n\r\n\tif (Length() > rows) {\r\n\t\t[scroller setHasVerticalScroller: YES];\r\n\t\trcDesired.right += [NSScroller scrollerWidthForControlSize: NSControlSizeRegular\r\n\t\t\t\t\t\t\t     scrollerStyle: NSScrollerStyleLegacy];\r\n\t} else {\r\n\t\t[scroller setHasVerticalScroller: NO];\r\n\t}\r\n\trcDesired.right += maxIconWidth;\r\n\trcDesired.right += 6; // For icon space\r\n\r\n\treturn rcDesired;\r\n}\r\n\r\nint ListBoxImpl::CaretFromEdge() {\r\n\tif (colIcon.hidden)\r\n\t\treturn 3;\r\n\telse\r\n\t\treturn 6 + static_cast<int>(colIcon.width);\r\n}\r\n\r\nvoid ListBoxImpl::ReleaseViews() {\r\n\t[table setDataSource: nil];\r\n\ttable = nil;\r\n\tscroller = nil;\r\n\tcolIcon = nil;\r\n\tcolText = nil;\r\n\tacd = nil;\r\n\tds = nil;\r\n}\r\n\r\nvoid ListBoxImpl::Clear() noexcept {\r\n\tmaxItemWidth = 0;\r\n\tmaxIconWidth = 0;\r\n\tld.Clear();\r\n}\r\n\r\nvoid ListBoxImpl::Append(char *s, int type) {\r\n\tint count = Length();\r\n\tld.Add(count, type, s);\r\n\r\n\tScintilla::Internal::SurfaceImpl surface;\r\n\tXYPOSITION width = surface.WidthText(font.get(), s);\r\n\tif (width > maxItemWidth) {\r\n\t\tmaxItemWidth = width;\r\n\t\tcolText.width = maxItemWidth;\r\n\t}\r\n\tNSImage *img = images[@(type)];\r\n\tif (img) {\r\n\t\tXYPOSITION widthIcon = img.size.width;\r\n\t\tif (widthIcon > maxIconWidth) {\r\n\t\t\t[colIcon setHidden: NO];\r\n\t\t\tmaxIconWidth = widthIcon;\r\n\t\t\tcolIcon.width = maxIconWidth;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid ListBoxImpl::SetList(const char *list, char separator, char typesep) {\r\n\tClear();\r\n\tsize_t count = strlen(list) + 1;\r\n\tstd::vector<char> words(list, list+count);\r\n\tchar *startword = words.data();\r\n\tchar *numword = nullptr;\r\n\tint i = 0;\r\n\tfor (; words[i]; i++) {\r\n\t\tif (words[i] == separator) {\r\n\t\t\twords[i] = '\\0';\r\n\t\t\tif (numword)\r\n\t\t\t\t*numword = '\\0';\r\n\t\t\tAppend(startword, numword?atoi(numword + 1):-1);\r\n\t\t\tstartword = words.data() + i + 1;\r\n\t\t\tnumword = nullptr;\r\n\t\t} else if (words[i] == typesep) {\r\n\t\t\tnumword = words.data() + i;\r\n\t\t}\r\n\t}\r\n\tif (startword) {\r\n\t\tif (numword)\r\n\t\t\t*numword = '\\0';\r\n\t\tAppend(startword, numword?atoi(numword + 1):-1);\r\n\t}\r\n\t[table reloadData];\r\n}\r\n\r\nvoid ListBoxImpl::SetOptions(ListOptions) {\r\n}\r\n\r\nint ListBoxImpl::Length() {\r\n\treturn ld.Length();\r\n}\r\n\r\nvoid ListBoxImpl::Select(int n) {\r\n\t[table selectRowIndexes: [NSIndexSet indexSetWithIndex: n] byExtendingSelection: NO];\r\n\t[table scrollRowToVisible: n];\r\n}\r\n\r\nint ListBoxImpl::GetSelection() {\r\n\treturn static_cast<int>(table.selectedRow);\r\n}\r\n\r\nint ListBoxImpl::Find(const char *prefix) {\r\n\tint count = Length();\r\n\tfor (int i = 0; i < count; i++) {\r\n\t\tconst char *s = ld.GetString(i);\r\n\t\tif (s && (s[0] != '\\0') && (0 == strncmp(prefix, s, strlen(prefix)))) {\r\n\t\t\treturn i;\r\n\t\t}\r\n\t}\r\n\treturn - 1;\r\n}\r\n\r\nstd::string ListBoxImpl::GetValue(int n) {\r\n\tconst char *textString = ld.GetString(n);\r\n\tif (textString) {\r\n\t\treturn textString;\r\n\t}\r\n\treturn std::string();\r\n}\r\n\r\nvoid ListBoxImpl::RegisterImage(int type, const char *xpm_data) {\r\n\tXPM xpm(xpm_data);\r\n\tNSImage *img = ImageFromXPM(&xpm);\r\n\timages[@(type)] = img;\r\n}\r\n\r\nvoid ListBoxImpl::RegisterRGBAImage(int type, int width, int height, const unsigned char *pixelsImage) {\r\n\tCGImageRef imageRef = ImageCreateFromRGBA(width, height, pixelsImage, false);\r\n\tNSImage *img = [[NSImage alloc] initWithCGImage: imageRef size: NSZeroSize];\r\n\tCGImageRelease(imageRef);\r\n\timages[@(type)] = img;\r\n}\r\n\r\nvoid ListBoxImpl::ClearRegisteredImages() {\r\n\t[images removeAllObjects];\r\n}\r\n\r\nint ListBoxImpl::Rows() {\r\n\treturn ld.Length();\r\n}\r\n\r\nNSImage *ListBoxImpl::ImageForRow(NSInteger row) {\r\n\treturn images[@(ld.GetType(row))];\r\n}\r\n\r\nNSString *ListBoxImpl::TextForRow(NSInteger row) {\r\n\tconst char *textString = ld.GetString(row);\r\n\tNSString *sTitle;\r\n\tif (unicodeMode)\r\n\t\tsTitle = @(textString);\r\n\telse\r\n\t\tsTitle = [NSString stringWithCString: textString encoding: NSWindowsCP1252StringEncoding];\r\n\treturn sTitle;\r\n}\r\n\r\nvoid ListBoxImpl::DoubleClick() {\r\n\tif (delegate) {\r\n\t\tListBoxEvent event(ListBoxEvent::EventType::doubleClick);\r\n\t\tdelegate->ListNotify(&event);\r\n\t}\r\n}\r\n\r\nvoid ListBoxImpl::SelectionChange() {\r\n\tif (delegate) {\r\n\t\tListBoxEvent event(ListBoxEvent::EventType::selectionChange);\r\n\t\tdelegate->ListNotify(&event);\r\n\t}\r\n}\r\n\r\n} // unnamed namespace\r\n\r\n//----------------- ListBox ------------------------------------------------------------------------\r\n\r\n// ListBox is implemented by the ListBoxImpl class.\r\n\r\nListBox::ListBox() noexcept {\r\n}\r\n\r\nListBox::~ListBox() noexcept {\r\n}\r\n\r\nstd::unique_ptr<ListBox> ListBox::Allocate() {\r\n\treturn std::make_unique<ListBoxImpl>();\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid Window::Destroy() noexcept {\r\n\tListBoxImpl *listbox = dynamic_cast<ListBoxImpl *>(this);\r\n\tif (listbox) {\r\n\t\tlistbox->ReleaseViews();\r\n\t}\r\n\tif (wid) {\r\n\t\tid idWin = (__bridge id)(wid);\r\n\t\tif ([idWin isKindOfClass: [NSWindow class]]) {\r\n\t\t\t[idWin close];\r\n\t\t}\r\n\t}\r\n\twid = nullptr;\r\n}\r\n\r\n\r\n//----------------- ScintillaContextMenu -----------------------------------------------------------\r\n\r\n@implementation ScintillaContextMenu :\r\nNSMenu\r\n\r\n// This NSMenu subclass serves also as target for menu commands and forwards them as\r\n// notification messages to the front end.\r\n\r\n- (void) handleCommand: (NSMenuItem *) sender {\r\n\towner->HandleCommand(sender.tag);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n- (void) setOwner: (Scintilla::Internal::ScintillaCocoa *) newOwner {\r\n\towner = newOwner;\r\n}\r\n\r\n@end\r\n\r\n//----------------- Menu ---------------------------------------------------------------------------\r\n\r\nMenu::Menu() noexcept\r\n\t: mid(0) {\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid Menu::CreatePopUp() {\r\n\tDestroy();\r\n\tmid = (__bridge_retained MenuID)[[ScintillaContextMenu alloc] initWithTitle: @\"\"];\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid Menu::Destroy() noexcept {\r\n\tCFBridgingRelease(mid);\r\n\tmid = nullptr;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid Menu::Show(Point, const Window &) {\r\n\t// Cocoa menus are handled a bit differently. We only create the menu. The framework\r\n\t// takes care to show it properly.\r\n}\r\n\r\n//----------------- Platform -----------------------------------------------------------------------\r\n\r\nColourRGBA Platform::Chrome() {\r\n\treturn ColourRGBA(0xE0, 0xE0, 0xE0);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nColourRGBA Platform::ChromeHighlight() {\r\n\treturn ColourRGBA(0xFF, 0xFF, 0xFF);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Returns the currently set system font for the user.\r\n */\r\nconst char *Platform::DefaultFont() {\r\n\treturn \"Menlo-Regular\";\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Returns the currently set system font size for the user.\r\n */\r\nint Platform::DefaultFontSize() {\r\n\treturn 11;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Returns the time span in which two consecutive mouse clicks must occur to be considered as\r\n * double click.\r\n *\r\n * @return time span in milliseconds\r\n */\r\nunsigned int Platform::DoubleClickTime() {\r\n\tNSTimeInterval threshold = NSEvent.doubleClickInterval;\r\n\tif (threshold == 0)\r\n\t\tthreshold = 0.5;\r\n\treturn static_cast<unsigned int>(threshold * 1000.0);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n//#define TRACE\r\n#ifdef TRACE\r\n\r\nvoid Platform::DebugDisplay(const char *s) noexcept {\r\n\tfprintf(stderr, \"%s\", s);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid Platform::DebugPrintf(const char *format, ...) noexcept {\r\n\tconst int BUF_SIZE = 2000;\r\n\tchar buffer[BUF_SIZE];\r\n\r\n\tva_list pArguments;\r\n\tva_start(pArguments, format);\r\n\tvsnprintf(buffer, BUF_SIZE, format, pArguments);\r\n\tva_end(pArguments);\r\n\tPlatform::DebugDisplay(buffer);\r\n}\r\n\r\n#else\r\n\r\nvoid Platform::DebugDisplay(const char *) noexcept {}\r\n\r\nvoid Platform::DebugPrintf(const char *, ...) noexcept {}\r\n\r\n#endif\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nstatic bool assertionPopUps = true;\r\n\r\nbool Platform::ShowAssertionPopUps(bool assertionPopUps_) noexcept {\r\n\tbool ret = assertionPopUps;\r\n\tassertionPopUps = assertionPopUps_;\r\n\treturn ret;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid Platform::Assert(const char *c, const char *file, int line) noexcept {\r\n\tchar buffer[2000];\r\n\tsnprintf(buffer, sizeof(buffer), \"Assertion [%s] failed at %s %d\\r\\n\", c, file, line);\r\n\tPlatform::DebugDisplay(buffer);\r\n#ifdef DEBUG\r\n\t// Jump into debugger in assert on Mac\r\n\tpthread_kill(pthread_self(), SIGTRAP);\r\n#endif\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n"
  },
  {
    "path": "scintilla/cocoa/QuartzTextLayout.h",
    "content": "/*\r\n *  QuartzTextLayout.h\r\n *\r\n *  Original Code by Evan Jones on Wed Oct 02 2002.\r\n *  Contributors:\r\n *  Shane Caraveo, ActiveState\r\n *  Bernd Paradies, Adobe\r\n *\r\n */\r\n\r\n#ifndef QUARTZTEXTLAYOUT_H\r\n#define QUARTZTEXTLAYOUT_H\r\n\r\n#include <Cocoa/Cocoa.h>\r\n\r\n#include \"QuartzTextStyle.h\"\r\n\r\n\r\nclass QuartzTextLayout {\r\npublic:\r\n\t/** Create a text layout for drawing. */\r\n\tQuartzTextLayout(std::string_view sv, CFStringEncoding encoding, const QuartzTextStyle *r) {\r\n\t\tencodingUsed = encoding;\r\n\t\tconst UInt8 *puiBuffer = reinterpret_cast<const UInt8 *>(sv.data());\r\n\t\tCFStringRef str = CFStringCreateWithBytes(NULL, puiBuffer, sv.length(), encodingUsed, false);\r\n\t\tif (!str) {\r\n\t\t\t// Failed to decode bytes into string with given encoding so try\r\n\t\t\t// MacRoman which should accept any byte.\r\n\t\t\tencodingUsed = kCFStringEncodingMacRoman;\r\n\t\t\tstr = CFStringCreateWithBytes(NULL, puiBuffer, sv.length(), encodingUsed, false);\r\n\t\t}\r\n\t\tif (!str) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tstringLength = CFStringGetLength(str);\r\n\r\n\t\tCFMutableDictionaryRef stringAttribs = r->getCTStyle();\r\n\r\n\t\tmString = ::CFAttributedStringCreate(NULL, str, stringAttribs);\r\n\r\n\t\tmLine = ::CTLineCreateWithAttributedString(mString);\r\n\r\n\t\tCFRelease(str);\r\n\t}\r\n\r\n\t~QuartzTextLayout() {\r\n\t\tif (mString) {\r\n\t\t\tCFRelease(mString);\r\n\t\t\tmString = NULL;\r\n\t\t}\r\n\t\tif (mLine) {\r\n\t\t\tCFRelease(mLine);\r\n\t\t\tmLine = NULL;\r\n\t\t}\r\n\t}\r\n\r\n\t/** Draw the text layout into a CGContext at the specified position.\r\n\t* @param gc The CGContext in which to draw the text.\r\n\t* @param x The x axis position to draw the baseline in the current CGContext.\r\n\t* @param y The y axis position to draw the baseline in the current CGContext. */\r\n\tvoid draw(CGContextRef gc, double x, double y) {\r\n\t\tif (!mLine)\r\n\t\t\treturn;\r\n\r\n\t\t::CGContextSetTextMatrix(gc, CGAffineTransformMakeScale(1.0, -1.0));\r\n\r\n\t\t// Set the text drawing position.\r\n\t\t::CGContextSetTextPosition(gc, x, y);\r\n\r\n\t\t// And finally, draw!\r\n\t\t::CTLineDraw(mLine, gc);\r\n\t}\r\n\r\n\tfloat MeasureStringWidth() {\r\n\t\tif (mLine == NULL)\r\n\t\t\treturn 0.0f;\r\n\r\n\t\treturn static_cast<float>(::CTLineGetTypographicBounds(mLine, NULL, NULL, NULL));\r\n\t}\r\n\r\n\tCTLineRef getCTLine() {\r\n\t\treturn mLine;\r\n\t}\r\n\r\n\tCFIndex getStringLength() {\r\n\t\treturn stringLength;\r\n\t}\r\n\r\n\tCFStringEncoding getEncoding() {\r\n\t\treturn encodingUsed;\r\n\t}\r\n\r\nprivate:\r\n\tCFAttributedStringRef mString = NULL;\r\n\tCTLineRef mLine = NULL;\r\n\tCFIndex stringLength = 0;\r\n\tCFStringEncoding encodingUsed = kCFStringEncodingMacRoman;\r\n};\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/cocoa/QuartzTextStyle.h",
    "content": "/*\r\n *  QuartzTextStyle.h\r\n *\r\n *  Created by Evan Jones on Wed Oct 02 2002.\r\n *\r\n */\r\n\r\n#ifndef QUARTZTEXTSTYLE_H\r\n#define QUARTZTEXTSTYLE_H\r\n\r\n#include \"QuartzTextStyleAttribute.h\"\r\n\r\nclass QuartzTextStyle {\r\npublic:\r\n\tQuartzTextStyle() {\r\n\t\tfontRef = NULL;\r\n\t\tstyleDict = CFDictionaryCreateMutable(kCFAllocatorDefault, 2,\r\n\t\t\t\t\t\t      &kCFTypeDictionaryKeyCallBacks,\r\n\t\t\t\t\t\t      &kCFTypeDictionaryValueCallBacks);\r\n\r\n\t\tcharacterSet = Scintilla::CharacterSet::Ansi;\r\n\t}\r\n\r\n\tQuartzTextStyle(const QuartzTextStyle *other) {\r\n\t\t// Does not copy font colour attribute\r\n\t\tfontRef = static_cast<CTFontRef>(CFRetain(other->fontRef));\r\n\t\tstyleDict = CFDictionaryCreateMutable(kCFAllocatorDefault, 2,\r\n\t\t\t\t\t\t      &kCFTypeDictionaryKeyCallBacks,\r\n\t\t\t\t\t\t      &kCFTypeDictionaryValueCallBacks);\r\n\t\tCFDictionaryAddValue(styleDict, kCTFontAttributeName, fontRef);\r\n\t\tcharacterSet = other->characterSet;\r\n\t}\r\n\r\n\t~QuartzTextStyle() {\r\n\t\tif (styleDict != NULL) {\r\n\t\t\tCFRelease(styleDict);\r\n\t\t\tstyleDict = NULL;\r\n\t\t}\r\n\r\n\t\tif (fontRef) {\r\n\t\t\tCFRelease(fontRef);\r\n\t\t\tfontRef = NULL;\r\n\t\t}\r\n\t}\r\n\r\n\tCFMutableDictionaryRef getCTStyle() const {\r\n\t\treturn styleDict;\r\n\t}\r\n\r\n\tvoid setCTStyleColour(CGColor *inColour) {\r\n\t\tCFDictionarySetValue(styleDict, kCTForegroundColorAttributeName, inColour);\r\n\t}\r\n\r\n\tfloat getAscent() const {\r\n\t\treturn static_cast<float>(::CTFontGetAscent(fontRef));\r\n\t}\r\n\r\n\tfloat getDescent() const {\r\n\t\treturn static_cast<float>(::CTFontGetDescent(fontRef));\r\n\t}\r\n\r\n\tfloat getLeading() const {\r\n\t\treturn static_cast<float>(::CTFontGetLeading(fontRef));\r\n\t}\r\n\r\n\tvoid setFontRef(CTFontRef inRef, Scintilla::CharacterSet characterSet_) {\r\n\t\tfontRef = inRef;\r\n\t\tcharacterSet = characterSet_;\r\n\r\n\t\tif (styleDict != NULL)\r\n\t\t\tCFRelease(styleDict);\r\n\r\n\t\tstyleDict = CFDictionaryCreateMutable(kCFAllocatorDefault, 2,\r\n\t\t\t\t\t\t      &kCFTypeDictionaryKeyCallBacks,\r\n\t\t\t\t\t\t      &kCFTypeDictionaryValueCallBacks);\r\n\r\n\t\tCFDictionaryAddValue(styleDict, kCTFontAttributeName, fontRef);\r\n\t}\r\n\r\n\tCTFontRef getFontRef() const noexcept {\r\n\t\treturn fontRef;\r\n\t}\r\n\r\n\tScintilla::CharacterSet getCharacterSet() const noexcept {\r\n\t\treturn characterSet;\r\n\t}\r\n\r\nprivate:\r\n\tCFMutableDictionaryRef styleDict;\r\n\tCTFontRef fontRef;\r\n\tScintilla::CharacterSet characterSet;\r\n};\r\n\r\n#endif\r\n\r\n"
  },
  {
    "path": "scintilla/cocoa/QuartzTextStyleAttribute.h",
    "content": "/**\r\n *  QuartzTextStyleAttribute.h\r\n *\r\n *  Original Code by Evan Jones on Wed Oct 02 2002.\r\n *  Contributors:\r\n *  Shane Caraveo, ActiveState\r\n *  Bernd Paradies, Adobe\r\n *\r\n */\r\n\r\n\r\n#ifndef QUARTZTEXTSTYLEATTRIBUTE_H\r\n#define QUARTZTEXTSTYLEATTRIBUTE_H\r\n\r\nclass QuartzFont {\r\npublic:\r\n\t/** Create a font style from a name. */\r\n\tQuartzFont(const char *name, size_t length, float size, Scintilla::FontWeight weight, bool italic) {\r\n\t\tassert(name != NULL && length > 0 && name[length] == '\\0');\r\n\r\n\t\tCFStringRef fontName = CFStringCreateWithCString(kCFAllocatorDefault, name, kCFStringEncodingMacRoman);\r\n\t\tassert(fontName != NULL);\r\n\t\tbool bold = weight > Scintilla::FontWeight::Normal;\r\n\r\n\t\tif (bold || italic) {\r\n\t\t\tCTFontSymbolicTraits desiredTrait = 0;\r\n\t\t\tCTFontSymbolicTraits traitMask = 0;\r\n\r\n\t\t\t// if bold was specified, add the trait\r\n\t\t\tif (bold) {\r\n\t\t\t\tdesiredTrait |= kCTFontBoldTrait;\r\n\t\t\t\ttraitMask |= kCTFontBoldTrait;\r\n\t\t\t}\r\n\r\n\t\t\t// if italic was specified, add the trait\r\n\t\t\tif (italic) {\r\n\t\t\t\tdesiredTrait |= kCTFontItalicTrait;\r\n\t\t\t\ttraitMask |= kCTFontItalicTrait;\r\n\t\t\t}\r\n\r\n\t\t\t// create a font and then a copy of it with the sym traits\r\n\t\t\tCTFontRef iFont = ::CTFontCreateWithName(fontName, size, NULL);\r\n\t\t\tfontid = ::CTFontCreateCopyWithSymbolicTraits(iFont, size, NULL, desiredTrait, traitMask);\r\n\t\t\tif (fontid) {\r\n\t\t\t\tCFRelease(iFont);\r\n\t\t\t} else {\r\n\t\t\t\t// Traits failed so use base font\r\n\t\t\t\tfontid = iFont;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t// create the font, no traits\r\n\t\t\tfontid = ::CTFontCreateWithName(fontName, size, NULL);\r\n\t\t}\r\n\r\n\t\tif (!fontid) {\r\n\t\t\t// Failed to create requested font so use font always present\r\n\t\t\tfontid = ::CTFontCreateWithName((CFStringRef)@\"Monaco\", size, NULL);\r\n\t\t}\r\n\r\n\t\tCFRelease(fontName);\r\n\t}\r\n\r\n\tCTFontRef getFontID() {\r\n\t\treturn fontid;\r\n\t}\r\n\r\nprivate:\r\n\tCTFontRef fontid;\r\n};\r\n\r\n#endif\r\n\r\n"
  },
  {
    "path": "scintilla/cocoa/Scintilla/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>$(DEVELOPMENT_LANGUAGE)</string>\n\t<key>CFBundleExecutable</key>\n\t<string>$(EXECUTABLE_NAME)</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>$(PRODUCT_NAME)</string>\n\t<key>CFBundlePackageType</key>\n\t<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>5.5.0</string>\n\t<key>CFBundleVersion</key>\n\t<string>$(CURRENT_PROJECT_VERSION)</string>\n\t<key>NSHumanReadableCopyright</key>\n\t<string>Copyright © 2020 Neil Hodgson. All rights reserved.</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "scintilla/cocoa/Scintilla/Scintilla.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 54;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\t2807B4EA28964CA40063A31A /* ChangeHistory.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2807B4E828964CA40063A31A /* ChangeHistory.cxx */; };\n\t\t2807B4EB28964CA40063A31A /* ChangeHistory.h in Headers */ = {isa = PBXBuildFile; fileRef = 2807B4E928964CA40063A31A /* ChangeHistory.h */; };\n\t\t282936DF24E2D55D00C84BA2 /* QuartzTextLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936D324E2D55D00C84BA2 /* QuartzTextLayout.h */; };\n\t\t282936E024E2D55D00C84BA2 /* InfoBar.mm in Sources */ = {isa = PBXBuildFile; fileRef = 282936D424E2D55D00C84BA2 /* InfoBar.mm */; };\n\t\t282936E124E2D55D00C84BA2 /* QuartzTextStyleAttribute.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936D524E2D55D00C84BA2 /* QuartzTextStyleAttribute.h */; };\n\t\t282936E224E2D55D00C84BA2 /* ScintillaCocoa.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936D624E2D55D00C84BA2 /* ScintillaCocoa.h */; };\n\t\t282936E324E2D55D00C84BA2 /* PlatCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 282936D724E2D55D00C84BA2 /* PlatCocoa.mm */; };\n\t\t282936E424E2D55D00C84BA2 /* PlatCocoa.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936D824E2D55D00C84BA2 /* PlatCocoa.h */; };\n\t\t282936E524E2D55D00C84BA2 /* InfoBarCommunicator.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936D924E2D55D00C84BA2 /* InfoBarCommunicator.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t282936E624E2D55D00C84BA2 /* InfoBar.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936DA24E2D55D00C84BA2 /* InfoBar.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t282936E724E2D55D00C84BA2 /* QuartzTextStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936DB24E2D55D00C84BA2 /* QuartzTextStyle.h */; };\n\t\t282936E824E2D55D00C84BA2 /* ScintillaView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 282936DC24E2D55D00C84BA2 /* ScintillaView.mm */; };\n\t\t282936E924E2D55D00C84BA2 /* ScintillaCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 282936DD24E2D55D00C84BA2 /* ScintillaCocoa.mm */; };\n\t\t282936EA24E2D55D00C84BA2 /* ScintillaView.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936DE24E2D55D00C84BA2 /* ScintillaView.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t2829372E24E2D58800C84BA2 /* DBCS.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 282936EB24E2D58400C84BA2 /* DBCS.cxx */; };\n\t\t2829372F24E2D58800C84BA2 /* ElapsedPeriod.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936EC24E2D58400C84BA2 /* ElapsedPeriod.h */; };\n\t\t2829373024E2D58800C84BA2 /* CallTip.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936ED24E2D58400C84BA2 /* CallTip.h */; };\n\t\t2829373124E2D58800C84BA2 /* PositionCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936EE24E2D58400C84BA2 /* PositionCache.h */; };\n\t\t2829373224E2D58800C84BA2 /* KeyMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936EF24E2D58400C84BA2 /* KeyMap.h */; };\n\t\t2829373324E2D58800C84BA2 /* LineMarker.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 282936F024E2D58400C84BA2 /* LineMarker.cxx */; };\n\t\t2829373524E2D58800C84BA2 /* Style.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936F224E2D58400C84BA2 /* Style.h */; };\n\t\t2829373624E2D58800C84BA2 /* UniqueString.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 282936F324E2D58400C84BA2 /* UniqueString.cxx */; };\n\t\t2829373724E2D58800C84BA2 /* RunStyles.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936F424E2D58400C84BA2 /* RunStyles.h */; };\n\t\t2829373824E2D58800C84BA2 /* RESearch.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936F524E2D58400C84BA2 /* RESearch.h */; };\n\t\t2829373924E2D58800C84BA2 /* Indicator.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 282936F624E2D58400C84BA2 /* Indicator.cxx */; };\n\t\t2829373A24E2D58800C84BA2 /* MarginView.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936F724E2D58400C84BA2 /* MarginView.h */; };\n\t\t2829373B24E2D58800C84BA2 /* Position.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936F824E2D58400C84BA2 /* Position.h */; };\n\t\t2829373C24E2D58800C84BA2 /* CaseFolder.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 282936F924E2D58400C84BA2 /* CaseFolder.cxx */; };\n\t\t2829373D24E2D58800C84BA2 /* PerLine.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936FA24E2D58400C84BA2 /* PerLine.h */; };\n\t\t2829373E24E2D58800C84BA2 /* Indicator.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936FB24E2D58400C84BA2 /* Indicator.h */; };\n\t\t2829373F24E2D58800C84BA2 /* UniConversion.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936FC24E2D58400C84BA2 /* UniConversion.h */; };\n\t\t2829374024E2D58800C84BA2 /* XPM.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 282936FD24E2D58400C84BA2 /* XPM.cxx */; };\n\t\t2829374124E2D58800C84BA2 /* CharClassify.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936FE24E2D58400C84BA2 /* CharClassify.h */; };\n\t\t2829374224E2D58800C84BA2 /* Decoration.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936FF24E2D58400C84BA2 /* Decoration.h */; };\n\t\t2829374524E2D58800C84BA2 /* PositionCache.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829370224E2D58500C84BA2 /* PositionCache.cxx */; };\n\t\t2829374724E2D58800C84BA2 /* Style.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829370424E2D58500C84BA2 /* Style.cxx */; };\n\t\t2829374824E2D58800C84BA2 /* RESearch.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829370524E2D58500C84BA2 /* RESearch.cxx */; };\n\t\t2829374924E2D58800C84BA2 /* CallTip.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829370624E2D58500C84BA2 /* CallTip.cxx */; };\n\t\t2829374A24E2D58800C84BA2 /* ContractionState.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829370724E2D58500C84BA2 /* ContractionState.h */; };\n\t\t2829374B24E2D58800C84BA2 /* Decoration.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829370824E2D58500C84BA2 /* Decoration.cxx */; };\n\t\t2829374C24E2D58800C84BA2 /* DBCS.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829370924E2D58500C84BA2 /* DBCS.h */; };\n\t\t2829374D24E2D58800C84BA2 /* AutoComplete.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829370A24E2D58500C84BA2 /* AutoComplete.h */; };\n\t\t2829374E24E2D58800C84BA2 /* KeyMap.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829370B24E2D58500C84BA2 /* KeyMap.cxx */; };\n\t\t2829374F24E2D58800C84BA2 /* ViewStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829370C24E2D58500C84BA2 /* ViewStyle.h */; };\n\t\t2829375024E2D58800C84BA2 /* Selection.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829370D24E2D58500C84BA2 /* Selection.cxx */; };\n\t\t2829375124E2D58800C84BA2 /* ContractionState.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829370E24E2D58500C84BA2 /* ContractionState.cxx */; };\n\t\t2829375224E2D58800C84BA2 /* UniConversion.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829370F24E2D58500C84BA2 /* UniConversion.cxx */; };\n\t\t2829375324E2D58800C84BA2 /* PerLine.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829371024E2D58500C84BA2 /* PerLine.cxx */; };\n\t\t2829375424E2D58800C84BA2 /* SparseVector.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829371124E2D58500C84BA2 /* SparseVector.h */; };\n\t\t2829375524E2D58800C84BA2 /* EditModel.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829371224E2D58500C84BA2 /* EditModel.cxx */; };\n\t\t2829375624E2D58800C84BA2 /* EditView.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829371324E2D58600C84BA2 /* EditView.h */; };\n\t\t2829375724E2D58800C84BA2 /* CaseConvert.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829371424E2D58600C84BA2 /* CaseConvert.cxx */; };\n\t\t2829375824E2D58800C84BA2 /* CharClassify.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829371524E2D58600C84BA2 /* CharClassify.cxx */; };\n\t\t2829375924E2D58800C84BA2 /* AutoComplete.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829371624E2D58600C84BA2 /* AutoComplete.cxx */; };\n\t\t2829375A24E2D58800C84BA2 /* ViewStyle.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829371724E2D58600C84BA2 /* ViewStyle.cxx */; };\n\t\t2829375B24E2D58800C84BA2 /* MarginView.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829371824E2D58600C84BA2 /* MarginView.cxx */; };\n\t\t2829375C24E2D58800C84BA2 /* CellBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829371924E2D58600C84BA2 /* CellBuffer.h */; };\n\t\t2829375D24E2D58800C84BA2 /* Document.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829371A24E2D58600C84BA2 /* Document.cxx */; };\n\t\t2829375E24E2D58800C84BA2 /* LineMarker.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829371B24E2D58600C84BA2 /* LineMarker.h */; };\n\t\t2829375F24E2D58800C84BA2 /* Editor.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829371C24E2D58600C84BA2 /* Editor.h */; };\n\t\t2829376024E2D58800C84BA2 /* XPM.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829371D24E2D58600C84BA2 /* XPM.h */; };\n\t\t2829376124E2D58800C84BA2 /* ScintillaBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829371E24E2D58600C84BA2 /* ScintillaBase.h */; };\n\t\t2829376224E2D58800C84BA2 /* Partitioning.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829371F24E2D58700C84BA2 /* Partitioning.h */; };\n\t\t2829376424E2D58800C84BA2 /* SplitVector.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829372124E2D58700C84BA2 /* SplitVector.h */; };\n\t\t2829376524E2D58800C84BA2 /* UniqueString.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829372224E2D58700C84BA2 /* UniqueString.h */; };\n\t\t2829376624E2D58800C84BA2 /* CaseConvert.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829372324E2D58700C84BA2 /* CaseConvert.h */; };\n\t\t2829376724E2D58800C84BA2 /* ScintillaBase.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829372424E2D58700C84BA2 /* ScintillaBase.cxx */; };\n\t\t2829376824E2D58800C84BA2 /* CaseFolder.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829372524E2D58700C84BA2 /* CaseFolder.h */; };\n\t\t2829376924E2D58800C84BA2 /* CellBuffer.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829372624E2D58700C84BA2 /* CellBuffer.cxx */; };\n\t\t2829376A24E2D58800C84BA2 /* EditModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829372724E2D58700C84BA2 /* EditModel.h */; };\n\t\t2829376B24E2D58800C84BA2 /* Editor.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829372824E2D58700C84BA2 /* Editor.cxx */; };\n\t\t2829376C24E2D58800C84BA2 /* Selection.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829372924E2D58700C84BA2 /* Selection.h */; };\n\t\t2829376D24E2D58800C84BA2 /* RunStyles.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829372A24E2D58800C84BA2 /* RunStyles.cxx */; };\n\t\t2829376F24E2D58800C84BA2 /* Document.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829372C24E2D58800C84BA2 /* Document.h */; };\n\t\t2829377024E2D58800C84BA2 /* EditView.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829372D24E2D58800C84BA2 /* EditView.cxx */; };\n\t\t282937AA24E2D60E00C84BA2 /* res in Resources */ = {isa = PBXBuildFile; fileRef = 282937A924E2D60E00C84BA2 /* res */; };\n\t\t2867917C26BB448C007C2905 /* mac_cursor_busy.png in Resources */ = {isa = PBXBuildFile; fileRef = 2867917626BB448C007C2905 /* mac_cursor_busy.png */; };\n\t\t2867917D26BB448C007C2905 /* mac_cursor_flipped@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 2867917726BB448C007C2905 /* mac_cursor_flipped@2x.png */; };\n\t\t2867917E26BB448C007C2905 /* info_bar_bg.png in Resources */ = {isa = PBXBuildFile; fileRef = 2867917826BB448C007C2905 /* info_bar_bg.png */; };\n\t\t2867917F26BB448C007C2905 /* mac_cursor_busy@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 2867917926BB448C007C2905 /* mac_cursor_busy@2x.png */; };\n\t\t2867918026BB448C007C2905 /* mac_cursor_flipped.png in Resources */ = {isa = PBXBuildFile; fileRef = 2867917A26BB448C007C2905 /* mac_cursor_flipped.png */; };\n\t\t2867918126BB448C007C2905 /* info_bar_bg@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 2867917B26BB448C007C2905 /* info_bar_bg@2x.png */; };\n\t\t286F8E6325F84F7400EC8D60 /* Sci_Position.h in Headers */ = {isa = PBXBuildFile; fileRef = 286F8E5F25F84F7400EC8D60 /* Sci_Position.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t286F8E6425F84F7400EC8D60 /* ILexer.h in Headers */ = {isa = PBXBuildFile; fileRef = 286F8E6025F84F7400EC8D60 /* ILexer.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t286F8E6525F84F7400EC8D60 /* ILoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 286F8E6125F84F7400EC8D60 /* ILoader.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t286F8E6625F84F7400EC8D60 /* Scintilla.h in Headers */ = {isa = PBXBuildFile; fileRef = 286F8E6225F84F7400EC8D60 /* Scintilla.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t286F8EDE260448C300EC8D60 /* Platform.h in Headers */ = {isa = PBXBuildFile; fileRef = 286F8EDB260448C300EC8D60 /* Platform.h */; };\n\t\t286F8EDF260448C300EC8D60 /* Geometry.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 286F8EDC260448C300EC8D60 /* Geometry.cxx */; };\n\t\t286F8EE0260448C300EC8D60 /* Geometry.h in Headers */ = {isa = PBXBuildFile; fileRef = 286F8EDD260448C300EC8D60 /* Geometry.h */; };\n\t\t287F3C6A246F90240040E76F /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 287F3C69246F90240040E76F /* Cocoa.framework */; };\n\t\t287F3C6C246F90300040E76F /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 287F3C6B246F90300040E76F /* QuartzCore.framework */; };\n\t\t28B962A52B6AF44F00ACCD96 /* UndoHistory.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28B962A32B6AF44F00ACCD96 /* UndoHistory.cxx */; };\n\t\t28B962A62B6AF44F00ACCD96 /* UndoHistory.h in Headers */ = {isa = PBXBuildFile; fileRef = 28B962A42B6AF44F00ACCD96 /* UndoHistory.h */; };\n\t\t28EA9CAE255894B4007710C4 /* CharacterCategoryMap.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28EA9CAA255894B4007710C4 /* CharacterCategoryMap.cxx */; };\n\t\t28EA9CAF255894B4007710C4 /* CharacterType.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28EA9CAB255894B4007710C4 /* CharacterType.cxx */; };\n\t\t28EA9CB0255894B4007710C4 /* CharacterCategoryMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 28EA9CAC255894B4007710C4 /* CharacterCategoryMap.h */; };\n\t\t28EA9CB1255894B4007710C4 /* CharacterType.h in Headers */ = {isa = PBXBuildFile; fileRef = 28EA9CAD255894B4007710C4 /* CharacterType.h */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXFileReference section */\n\t\t2807B4E828964CA40063A31A /* ChangeHistory.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ChangeHistory.cxx; path = ../../src/ChangeHistory.cxx; sourceTree = \"<group>\"; };\n\t\t2807B4E928964CA40063A31A /* ChangeHistory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChangeHistory.h; path = ../../src/ChangeHistory.h; sourceTree = \"<group>\"; };\n\t\t282936D324E2D55D00C84BA2 /* QuartzTextLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QuartzTextLayout.h; path = ../QuartzTextLayout.h; sourceTree = \"<group>\"; };\n\t\t282936D424E2D55D00C84BA2 /* InfoBar.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = InfoBar.mm; path = ../InfoBar.mm; sourceTree = \"<group>\"; };\n\t\t282936D524E2D55D00C84BA2 /* QuartzTextStyleAttribute.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QuartzTextStyleAttribute.h; path = ../QuartzTextStyleAttribute.h; sourceTree = \"<group>\"; };\n\t\t282936D624E2D55D00C84BA2 /* ScintillaCocoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScintillaCocoa.h; path = ../ScintillaCocoa.h; sourceTree = \"<group>\"; };\n\t\t282936D724E2D55D00C84BA2 /* PlatCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = PlatCocoa.mm; path = ../PlatCocoa.mm; sourceTree = \"<group>\"; };\n\t\t282936D824E2D55D00C84BA2 /* PlatCocoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PlatCocoa.h; path = ../PlatCocoa.h; sourceTree = \"<group>\"; };\n\t\t282936D924E2D55D00C84BA2 /* InfoBarCommunicator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InfoBarCommunicator.h; path = ../InfoBarCommunicator.h; sourceTree = \"<group>\"; };\n\t\t282936DA24E2D55D00C84BA2 /* InfoBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InfoBar.h; path = ../InfoBar.h; sourceTree = \"<group>\"; };\n\t\t282936DB24E2D55D00C84BA2 /* QuartzTextStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QuartzTextStyle.h; path = ../QuartzTextStyle.h; sourceTree = \"<group>\"; };\n\t\t282936DC24E2D55D00C84BA2 /* ScintillaView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ScintillaView.mm; path = ../ScintillaView.mm; sourceTree = \"<group>\"; };\n\t\t282936DD24E2D55D00C84BA2 /* ScintillaCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ScintillaCocoa.mm; path = ../ScintillaCocoa.mm; sourceTree = \"<group>\"; };\n\t\t282936DE24E2D55D00C84BA2 /* ScintillaView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScintillaView.h; path = ../ScintillaView.h; sourceTree = \"<group>\"; };\n\t\t282936EB24E2D58400C84BA2 /* DBCS.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DBCS.cxx; path = ../../src/DBCS.cxx; sourceTree = \"<group>\"; };\n\t\t282936EC24E2D58400C84BA2 /* ElapsedPeriod.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ElapsedPeriod.h; path = ../../src/ElapsedPeriod.h; sourceTree = \"<group>\"; };\n\t\t282936ED24E2D58400C84BA2 /* CallTip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CallTip.h; path = ../../src/CallTip.h; sourceTree = \"<group>\"; };\n\t\t282936EE24E2D58400C84BA2 /* PositionCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PositionCache.h; path = ../../src/PositionCache.h; sourceTree = \"<group>\"; };\n\t\t282936EF24E2D58400C84BA2 /* KeyMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = KeyMap.h; path = ../../src/KeyMap.h; sourceTree = \"<group>\"; };\n\t\t282936F024E2D58400C84BA2 /* LineMarker.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LineMarker.cxx; path = ../../src/LineMarker.cxx; sourceTree = \"<group>\"; };\n\t\t282936F224E2D58400C84BA2 /* Style.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Style.h; path = ../../src/Style.h; sourceTree = \"<group>\"; };\n\t\t282936F324E2D58400C84BA2 /* UniqueString.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UniqueString.cxx; path = ../../src/UniqueString.cxx; sourceTree = \"<group>\"; };\n\t\t282936F424E2D58400C84BA2 /* RunStyles.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RunStyles.h; path = ../../src/RunStyles.h; sourceTree = \"<group>\"; };\n\t\t282936F524E2D58400C84BA2 /* RESearch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RESearch.h; path = ../../src/RESearch.h; sourceTree = \"<group>\"; };\n\t\t282936F624E2D58400C84BA2 /* Indicator.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Indicator.cxx; path = ../../src/Indicator.cxx; sourceTree = \"<group>\"; };\n\t\t282936F724E2D58400C84BA2 /* MarginView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MarginView.h; path = ../../src/MarginView.h; sourceTree = \"<group>\"; };\n\t\t282936F824E2D58400C84BA2 /* Position.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Position.h; path = ../../src/Position.h; sourceTree = \"<group>\"; };\n\t\t282936F924E2D58400C84BA2 /* CaseFolder.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CaseFolder.cxx; path = ../../src/CaseFolder.cxx; sourceTree = \"<group>\"; };\n\t\t282936FA24E2D58400C84BA2 /* PerLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PerLine.h; path = ../../src/PerLine.h; sourceTree = \"<group>\"; };\n\t\t282936FB24E2D58400C84BA2 /* Indicator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Indicator.h; path = ../../src/Indicator.h; sourceTree = \"<group>\"; };\n\t\t282936FC24E2D58400C84BA2 /* UniConversion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UniConversion.h; path = ../../src/UniConversion.h; sourceTree = \"<group>\"; };\n\t\t282936FD24E2D58400C84BA2 /* XPM.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = XPM.cxx; path = ../../src/XPM.cxx; sourceTree = \"<group>\"; };\n\t\t282936FE24E2D58400C84BA2 /* CharClassify.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CharClassify.h; path = ../../src/CharClassify.h; sourceTree = \"<group>\"; };\n\t\t282936FF24E2D58400C84BA2 /* Decoration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Decoration.h; path = ../../src/Decoration.h; sourceTree = \"<group>\"; };\n\t\t2829370224E2D58500C84BA2 /* PositionCache.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PositionCache.cxx; path = ../../src/PositionCache.cxx; sourceTree = \"<group>\"; };\n\t\t2829370424E2D58500C84BA2 /* Style.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Style.cxx; path = ../../src/Style.cxx; sourceTree = \"<group>\"; };\n\t\t2829370524E2D58500C84BA2 /* RESearch.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RESearch.cxx; path = ../../src/RESearch.cxx; sourceTree = \"<group>\"; };\n\t\t2829370624E2D58500C84BA2 /* CallTip.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CallTip.cxx; path = ../../src/CallTip.cxx; sourceTree = \"<group>\"; };\n\t\t2829370724E2D58500C84BA2 /* ContractionState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ContractionState.h; path = ../../src/ContractionState.h; sourceTree = \"<group>\"; };\n\t\t2829370824E2D58500C84BA2 /* Decoration.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Decoration.cxx; path = ../../src/Decoration.cxx; sourceTree = \"<group>\"; };\n\t\t2829370924E2D58500C84BA2 /* DBCS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DBCS.h; path = ../../src/DBCS.h; sourceTree = \"<group>\"; };\n\t\t2829370A24E2D58500C84BA2 /* AutoComplete.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AutoComplete.h; path = ../../src/AutoComplete.h; sourceTree = \"<group>\"; };\n\t\t2829370B24E2D58500C84BA2 /* KeyMap.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = KeyMap.cxx; path = ../../src/KeyMap.cxx; sourceTree = \"<group>\"; };\n\t\t2829370C24E2D58500C84BA2 /* ViewStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ViewStyle.h; path = ../../src/ViewStyle.h; sourceTree = \"<group>\"; };\n\t\t2829370D24E2D58500C84BA2 /* Selection.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Selection.cxx; path = ../../src/Selection.cxx; sourceTree = \"<group>\"; };\n\t\t2829370E24E2D58500C84BA2 /* ContractionState.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ContractionState.cxx; path = ../../src/ContractionState.cxx; sourceTree = \"<group>\"; };\n\t\t2829370F24E2D58500C84BA2 /* UniConversion.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UniConversion.cxx; path = ../../src/UniConversion.cxx; sourceTree = \"<group>\"; };\n\t\t2829371024E2D58500C84BA2 /* PerLine.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PerLine.cxx; path = ../../src/PerLine.cxx; sourceTree = \"<group>\"; };\n\t\t2829371124E2D58500C84BA2 /* SparseVector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SparseVector.h; path = ../../src/SparseVector.h; sourceTree = \"<group>\"; };\n\t\t2829371224E2D58500C84BA2 /* EditModel.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = EditModel.cxx; path = ../../src/EditModel.cxx; sourceTree = \"<group>\"; };\n\t\t2829371324E2D58600C84BA2 /* EditView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EditView.h; path = ../../src/EditView.h; sourceTree = \"<group>\"; };\n\t\t2829371424E2D58600C84BA2 /* CaseConvert.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CaseConvert.cxx; path = ../../src/CaseConvert.cxx; sourceTree = \"<group>\"; };\n\t\t2829371524E2D58600C84BA2 /* CharClassify.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CharClassify.cxx; path = ../../src/CharClassify.cxx; sourceTree = \"<group>\"; };\n\t\t2829371624E2D58600C84BA2 /* AutoComplete.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AutoComplete.cxx; path = ../../src/AutoComplete.cxx; sourceTree = \"<group>\"; };\n\t\t2829371724E2D58600C84BA2 /* ViewStyle.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ViewStyle.cxx; path = ../../src/ViewStyle.cxx; sourceTree = \"<group>\"; };\n\t\t2829371824E2D58600C84BA2 /* MarginView.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MarginView.cxx; path = ../../src/MarginView.cxx; sourceTree = \"<group>\"; };\n\t\t2829371924E2D58600C84BA2 /* CellBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CellBuffer.h; path = ../../src/CellBuffer.h; sourceTree = \"<group>\"; };\n\t\t2829371A24E2D58600C84BA2 /* Document.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Document.cxx; path = ../../src/Document.cxx; sourceTree = \"<group>\"; };\n\t\t2829371B24E2D58600C84BA2 /* LineMarker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LineMarker.h; path = ../../src/LineMarker.h; sourceTree = \"<group>\"; };\n\t\t2829371C24E2D58600C84BA2 /* Editor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Editor.h; path = ../../src/Editor.h; sourceTree = \"<group>\"; };\n\t\t2829371D24E2D58600C84BA2 /* XPM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = XPM.h; path = ../../src/XPM.h; sourceTree = \"<group>\"; };\n\t\t2829371E24E2D58600C84BA2 /* ScintillaBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScintillaBase.h; path = ../../src/ScintillaBase.h; sourceTree = \"<group>\"; };\n\t\t2829371F24E2D58700C84BA2 /* Partitioning.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Partitioning.h; path = ../../src/Partitioning.h; sourceTree = \"<group>\"; };\n\t\t2829372124E2D58700C84BA2 /* SplitVector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SplitVector.h; path = ../../src/SplitVector.h; sourceTree = \"<group>\"; };\n\t\t2829372224E2D58700C84BA2 /* UniqueString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UniqueString.h; path = ../../src/UniqueString.h; sourceTree = \"<group>\"; };\n\t\t2829372324E2D58700C84BA2 /* CaseConvert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CaseConvert.h; path = ../../src/CaseConvert.h; sourceTree = \"<group>\"; };\n\t\t2829372424E2D58700C84BA2 /* ScintillaBase.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ScintillaBase.cxx; path = ../../src/ScintillaBase.cxx; sourceTree = \"<group>\"; };\n\t\t2829372524E2D58700C84BA2 /* CaseFolder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CaseFolder.h; path = ../../src/CaseFolder.h; sourceTree = \"<group>\"; };\n\t\t2829372624E2D58700C84BA2 /* CellBuffer.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CellBuffer.cxx; path = ../../src/CellBuffer.cxx; sourceTree = \"<group>\"; };\n\t\t2829372724E2D58700C84BA2 /* EditModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EditModel.h; path = ../../src/EditModel.h; sourceTree = \"<group>\"; };\n\t\t2829372824E2D58700C84BA2 /* Editor.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Editor.cxx; path = ../../src/Editor.cxx; sourceTree = \"<group>\"; };\n\t\t2829372924E2D58700C84BA2 /* Selection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Selection.h; path = ../../src/Selection.h; sourceTree = \"<group>\"; };\n\t\t2829372A24E2D58800C84BA2 /* RunStyles.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RunStyles.cxx; path = ../../src/RunStyles.cxx; sourceTree = \"<group>\"; };\n\t\t2829372C24E2D58800C84BA2 /* Document.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Document.h; path = ../../src/Document.h; sourceTree = \"<group>\"; };\n\t\t2829372D24E2D58800C84BA2 /* EditView.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = EditView.cxx; path = ../../src/EditView.cxx; sourceTree = \"<group>\"; };\n\t\t282937A924E2D60E00C84BA2 /* res */ = {isa = PBXFileReference; lastKnownFileType = folder; name = res; path = ../res; sourceTree = \"<group>\"; };\n\t\t282937AF24E2D80E00C84BA2 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = \"<group>\"; };\n\t\t2867917626BB448C007C2905 /* mac_cursor_busy.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = mac_cursor_busy.png; path = ../res/mac_cursor_busy.png; sourceTree = \"<group>\"; };\n\t\t2867917726BB448C007C2905 /* mac_cursor_flipped@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = \"mac_cursor_flipped@2x.png\"; path = \"../res/mac_cursor_flipped@2x.png\"; sourceTree = \"<group>\"; };\n\t\t2867917826BB448C007C2905 /* info_bar_bg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = info_bar_bg.png; path = ../res/info_bar_bg.png; sourceTree = \"<group>\"; };\n\t\t2867917926BB448C007C2905 /* mac_cursor_busy@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = \"mac_cursor_busy@2x.png\"; path = \"../res/mac_cursor_busy@2x.png\"; sourceTree = \"<group>\"; };\n\t\t2867917A26BB448C007C2905 /* mac_cursor_flipped.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = mac_cursor_flipped.png; path = ../res/mac_cursor_flipped.png; sourceTree = \"<group>\"; };\n\t\t2867917B26BB448C007C2905 /* info_bar_bg@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = \"info_bar_bg@2x.png\"; path = \"../res/info_bar_bg@2x.png\"; sourceTree = \"<group>\"; };\n\t\t286F8E5F25F84F7400EC8D60 /* Sci_Position.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Sci_Position.h; path = ../../include/Sci_Position.h; sourceTree = \"<group>\"; };\n\t\t286F8E6025F84F7400EC8D60 /* ILexer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ILexer.h; path = ../../include/ILexer.h; sourceTree = \"<group>\"; };\n\t\t286F8E6125F84F7400EC8D60 /* ILoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ILoader.h; path = ../../include/ILoader.h; sourceTree = \"<group>\"; };\n\t\t286F8E6225F84F7400EC8D60 /* Scintilla.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Scintilla.h; path = ../../include/Scintilla.h; sourceTree = \"<group>\"; };\n\t\t286F8EDB260448C300EC8D60 /* Platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Platform.h; path = ../../src/Platform.h; sourceTree = \"<group>\"; };\n\t\t286F8EDC260448C300EC8D60 /* Geometry.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Geometry.cxx; path = ../../src/Geometry.cxx; sourceTree = \"<group>\"; };\n\t\t286F8EDD260448C300EC8D60 /* Geometry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Geometry.h; path = ../../src/Geometry.h; sourceTree = \"<group>\"; };\n\t\t287F3C41246F8DC70040E76F /* Scintilla.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Scintilla.framework; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t287F3C69246F90240040E76F /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };\n\t\t287F3C6B246F90300040E76F /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };\n\t\t287F3E0F246F9AE50040E76F /* module.modulemap */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = \"sourcecode.module-map\"; path = module.modulemap; sourceTree = SOURCE_ROOT; };\n\t\t28B962A32B6AF44F00ACCD96 /* UndoHistory.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UndoHistory.cxx; path = ../../src/UndoHistory.cxx; sourceTree = \"<group>\"; };\n\t\t28B962A42B6AF44F00ACCD96 /* UndoHistory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UndoHistory.h; path = ../../src/UndoHistory.h; sourceTree = \"<group>\"; };\n\t\t28EA9CAA255894B4007710C4 /* CharacterCategoryMap.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CharacterCategoryMap.cxx; path = ../../src/CharacterCategoryMap.cxx; sourceTree = \"<group>\"; };\n\t\t28EA9CAB255894B4007710C4 /* CharacterType.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CharacterType.cxx; path = ../../src/CharacterType.cxx; sourceTree = \"<group>\"; };\n\t\t28EA9CAC255894B4007710C4 /* CharacterCategoryMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CharacterCategoryMap.h; path = ../../src/CharacterCategoryMap.h; sourceTree = \"<group>\"; };\n\t\t28EA9CAD255894B4007710C4 /* CharacterType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CharacterType.h; path = ../../src/CharacterType.h; sourceTree = \"<group>\"; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t287F3C3E246F8DC70040E76F /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t287F3C6C246F90300040E76F /* QuartzCore.framework in Frameworks */,\n\t\t\t\t287F3C6A246F90240040E76F /* Cocoa.framework in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXFrameworksBuildPhase section */\n\n/* Begin PBXGroup section */\n\t\t287F3C37246F8DC70040E76F = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t287F3C4D246F8E4A0040E76F /* Backend */,\n\t\t\t\t287F3C4E246F8E560040E76F /* Classes */,\n\t\t\t\t287F3C4F246F8E6E0040E76F /* Resources */,\n\t\t\t\t287F3C42246F8DC70040E76F /* Products */,\n\t\t\t\t287F3C68246F90240040E76F /* Frameworks */,\n\t\t\t);\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t287F3C42246F8DC70040E76F /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t287F3C41246F8DC70040E76F /* Scintilla.framework */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t287F3C4D246F8E4A0040E76F /* Backend */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t2829371624E2D58600C84BA2 /* AutoComplete.cxx */,\n\t\t\t\t2829370A24E2D58500C84BA2 /* AutoComplete.h */,\n\t\t\t\t2829370624E2D58500C84BA2 /* CallTip.cxx */,\n\t\t\t\t282936ED24E2D58400C84BA2 /* CallTip.h */,\n\t\t\t\t2829371424E2D58600C84BA2 /* CaseConvert.cxx */,\n\t\t\t\t2829372324E2D58700C84BA2 /* CaseConvert.h */,\n\t\t\t\t282936F924E2D58400C84BA2 /* CaseFolder.cxx */,\n\t\t\t\t2829372524E2D58700C84BA2 /* CaseFolder.h */,\n\t\t\t\t2829372624E2D58700C84BA2 /* CellBuffer.cxx */,\n\t\t\t\t2829371924E2D58600C84BA2 /* CellBuffer.h */,\n\t\t\t\t2807B4E828964CA40063A31A /* ChangeHistory.cxx */,\n\t\t\t\t2807B4E928964CA40063A31A /* ChangeHistory.h */,\n\t\t\t\t28EA9CAA255894B4007710C4 /* CharacterCategoryMap.cxx */,\n\t\t\t\t28EA9CAC255894B4007710C4 /* CharacterCategoryMap.h */,\n\t\t\t\t28EA9CAB255894B4007710C4 /* CharacterType.cxx */,\n\t\t\t\t28EA9CAD255894B4007710C4 /* CharacterType.h */,\n\t\t\t\t2829371524E2D58600C84BA2 /* CharClassify.cxx */,\n\t\t\t\t282936FE24E2D58400C84BA2 /* CharClassify.h */,\n\t\t\t\t2829370E24E2D58500C84BA2 /* ContractionState.cxx */,\n\t\t\t\t2829370724E2D58500C84BA2 /* ContractionState.h */,\n\t\t\t\t282936EB24E2D58400C84BA2 /* DBCS.cxx */,\n\t\t\t\t2829370924E2D58500C84BA2 /* DBCS.h */,\n\t\t\t\t2829370824E2D58500C84BA2 /* Decoration.cxx */,\n\t\t\t\t282936FF24E2D58400C84BA2 /* Decoration.h */,\n\t\t\t\t2829371A24E2D58600C84BA2 /* Document.cxx */,\n\t\t\t\t2829372C24E2D58800C84BA2 /* Document.h */,\n\t\t\t\t2829371224E2D58500C84BA2 /* EditModel.cxx */,\n\t\t\t\t2829372724E2D58700C84BA2 /* EditModel.h */,\n\t\t\t\t2829372824E2D58700C84BA2 /* Editor.cxx */,\n\t\t\t\t2829371C24E2D58600C84BA2 /* Editor.h */,\n\t\t\t\t2829372D24E2D58800C84BA2 /* EditView.cxx */,\n\t\t\t\t2829371324E2D58600C84BA2 /* EditView.h */,\n\t\t\t\t282936EC24E2D58400C84BA2 /* ElapsedPeriod.h */,\n\t\t\t\t286F8EDC260448C300EC8D60 /* Geometry.cxx */,\n\t\t\t\t286F8EDD260448C300EC8D60 /* Geometry.h */,\n\t\t\t\t286F8E6025F84F7400EC8D60 /* ILexer.h */,\n\t\t\t\t286F8E6125F84F7400EC8D60 /* ILoader.h */,\n\t\t\t\t282936F624E2D58400C84BA2 /* Indicator.cxx */,\n\t\t\t\t282936FB24E2D58400C84BA2 /* Indicator.h */,\n\t\t\t\t2829370B24E2D58500C84BA2 /* KeyMap.cxx */,\n\t\t\t\t282936EF24E2D58400C84BA2 /* KeyMap.h */,\n\t\t\t\t282936F024E2D58400C84BA2 /* LineMarker.cxx */,\n\t\t\t\t2829371B24E2D58600C84BA2 /* LineMarker.h */,\n\t\t\t\t2829371824E2D58600C84BA2 /* MarginView.cxx */,\n\t\t\t\t282936F724E2D58400C84BA2 /* MarginView.h */,\n\t\t\t\t2829371F24E2D58700C84BA2 /* Partitioning.h */,\n\t\t\t\t2829371024E2D58500C84BA2 /* PerLine.cxx */,\n\t\t\t\t282936FA24E2D58400C84BA2 /* PerLine.h */,\n\t\t\t\t286F8EDB260448C300EC8D60 /* Platform.h */,\n\t\t\t\t282936F824E2D58400C84BA2 /* Position.h */,\n\t\t\t\t2829370224E2D58500C84BA2 /* PositionCache.cxx */,\n\t\t\t\t282936EE24E2D58400C84BA2 /* PositionCache.h */,\n\t\t\t\t2829370524E2D58500C84BA2 /* RESearch.cxx */,\n\t\t\t\t282936F524E2D58400C84BA2 /* RESearch.h */,\n\t\t\t\t2829372A24E2D58800C84BA2 /* RunStyles.cxx */,\n\t\t\t\t282936F424E2D58400C84BA2 /* RunStyles.h */,\n\t\t\t\t286F8E5F25F84F7400EC8D60 /* Sci_Position.h */,\n\t\t\t\t286F8E6225F84F7400EC8D60 /* Scintilla.h */,\n\t\t\t\t2829372424E2D58700C84BA2 /* ScintillaBase.cxx */,\n\t\t\t\t2829371E24E2D58600C84BA2 /* ScintillaBase.h */,\n\t\t\t\t2829370D24E2D58500C84BA2 /* Selection.cxx */,\n\t\t\t\t2829372924E2D58700C84BA2 /* Selection.h */,\n\t\t\t\t2829371124E2D58500C84BA2 /* SparseVector.h */,\n\t\t\t\t2829372124E2D58700C84BA2 /* SplitVector.h */,\n\t\t\t\t2829370424E2D58500C84BA2 /* Style.cxx */,\n\t\t\t\t282936F224E2D58400C84BA2 /* Style.h */,\n\t\t\t\t28B962A32B6AF44F00ACCD96 /* UndoHistory.cxx */,\n\t\t\t\t28B962A42B6AF44F00ACCD96 /* UndoHistory.h */,\n\t\t\t\t2829370F24E2D58500C84BA2 /* UniConversion.cxx */,\n\t\t\t\t282936FC24E2D58400C84BA2 /* UniConversion.h */,\n\t\t\t\t282936F324E2D58400C84BA2 /* UniqueString.cxx */,\n\t\t\t\t2829372224E2D58700C84BA2 /* UniqueString.h */,\n\t\t\t\t2829371724E2D58600C84BA2 /* ViewStyle.cxx */,\n\t\t\t\t2829370C24E2D58500C84BA2 /* ViewStyle.h */,\n\t\t\t\t282936FD24E2D58400C84BA2 /* XPM.cxx */,\n\t\t\t\t2829371D24E2D58600C84BA2 /* XPM.h */,\n\t\t\t);\n\t\t\tname = Backend;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t287F3C4E246F8E560040E76F /* Classes */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t282936DA24E2D55D00C84BA2 /* InfoBar.h */,\n\t\t\t\t282936D424E2D55D00C84BA2 /* InfoBar.mm */,\n\t\t\t\t282936D924E2D55D00C84BA2 /* InfoBarCommunicator.h */,\n\t\t\t\t287F3E0F246F9AE50040E76F /* module.modulemap */,\n\t\t\t\t282936D824E2D55D00C84BA2 /* PlatCocoa.h */,\n\t\t\t\t282936D724E2D55D00C84BA2 /* PlatCocoa.mm */,\n\t\t\t\t282936D324E2D55D00C84BA2 /* QuartzTextLayout.h */,\n\t\t\t\t282936DB24E2D55D00C84BA2 /* QuartzTextStyle.h */,\n\t\t\t\t282936D524E2D55D00C84BA2 /* QuartzTextStyleAttribute.h */,\n\t\t\t\t282936D624E2D55D00C84BA2 /* ScintillaCocoa.h */,\n\t\t\t\t282936DD24E2D55D00C84BA2 /* ScintillaCocoa.mm */,\n\t\t\t\t282936DE24E2D55D00C84BA2 /* ScintillaView.h */,\n\t\t\t\t282936DC24E2D55D00C84BA2 /* ScintillaView.mm */,\n\t\t\t);\n\t\t\tname = Classes;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t287F3C4F246F8E6E0040E76F /* Resources */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t282937AF24E2D80E00C84BA2 /* Info.plist */,\n\t\t\t\t2867917826BB448C007C2905 /* info_bar_bg.png */,\n\t\t\t\t2867917B26BB448C007C2905 /* info_bar_bg@2x.png */,\n\t\t\t\t2867917626BB448C007C2905 /* mac_cursor_busy.png */,\n\t\t\t\t2867917926BB448C007C2905 /* mac_cursor_busy@2x.png */,\n\t\t\t\t2867917A26BB448C007C2905 /* mac_cursor_flipped.png */,\n\t\t\t\t2867917726BB448C007C2905 /* mac_cursor_flipped@2x.png */,\n\t\t\t\t282937A924E2D60E00C84BA2 /* res */,\n\t\t\t);\n\t\t\tname = Resources;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t287F3C68246F90240040E76F /* Frameworks */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t287F3C6B246F90300040E76F /* QuartzCore.framework */,\n\t\t\t\t287F3C69246F90240040E76F /* Cocoa.framework */,\n\t\t\t);\n\t\t\tname = Frameworks;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXHeadersBuildPhase section */\n\t\t287F3C3C246F8DC70040E76F /* Headers */ = {\n\t\t\tisa = PBXHeadersBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t2829374C24E2D58800C84BA2 /* DBCS.h in Headers */,\n\t\t\t\t2829373024E2D58800C84BA2 /* CallTip.h in Headers */,\n\t\t\t\t2829374224E2D58800C84BA2 /* Decoration.h in Headers */,\n\t\t\t\t2829375624E2D58800C84BA2 /* EditView.h in Headers */,\n\t\t\t\t2829375424E2D58800C84BA2 /* SparseVector.h in Headers */,\n\t\t\t\t286F8E6325F84F7400EC8D60 /* Sci_Position.h in Headers */,\n\t\t\t\t2829373224E2D58800C84BA2 /* KeyMap.h in Headers */,\n\t\t\t\t2829373E24E2D58800C84BA2 /* Indicator.h in Headers */,\n\t\t\t\t286F8EDE260448C300EC8D60 /* Platform.h in Headers */,\n\t\t\t\t2829375C24E2D58800C84BA2 /* CellBuffer.h in Headers */,\n\t\t\t\t2829373F24E2D58800C84BA2 /* UniConversion.h in Headers */,\n\t\t\t\t2829373D24E2D58800C84BA2 /* PerLine.h in Headers */,\n\t\t\t\t2829373724E2D58800C84BA2 /* RunStyles.h in Headers */,\n\t\t\t\t28EA9CB0255894B4007710C4 /* CharacterCategoryMap.h in Headers */,\n\t\t\t\t282936E624E2D55D00C84BA2 /* InfoBar.h in Headers */,\n\t\t\t\t2829375E24E2D58800C84BA2 /* LineMarker.h in Headers */,\n\t\t\t\t2829376824E2D58800C84BA2 /* CaseFolder.h in Headers */,\n\t\t\t\t286F8E6425F84F7400EC8D60 /* ILexer.h in Headers */,\n\t\t\t\t2829376524E2D58800C84BA2 /* UniqueString.h in Headers */,\n\t\t\t\t2829375F24E2D58800C84BA2 /* Editor.h in Headers */,\n\t\t\t\t2829376624E2D58800C84BA2 /* CaseConvert.h in Headers */,\n\t\t\t\t2829374F24E2D58800C84BA2 /* ViewStyle.h in Headers */,\n\t\t\t\t282936DF24E2D55D00C84BA2 /* QuartzTextLayout.h in Headers */,\n\t\t\t\t2829376A24E2D58800C84BA2 /* EditModel.h in Headers */,\n\t\t\t\t282936E724E2D55D00C84BA2 /* QuartzTextStyle.h in Headers */,\n\t\t\t\t2829376F24E2D58800C84BA2 /* Document.h in Headers */,\n\t\t\t\t2829374A24E2D58800C84BA2 /* ContractionState.h in Headers */,\n\t\t\t\t2829376024E2D58800C84BA2 /* XPM.h in Headers */,\n\t\t\t\t28B962A62B6AF44F00ACCD96 /* UndoHistory.h in Headers */,\n\t\t\t\t2829372F24E2D58800C84BA2 /* ElapsedPeriod.h in Headers */,\n\t\t\t\t28EA9CB1255894B4007710C4 /* CharacterType.h in Headers */,\n\t\t\t\t2829373A24E2D58800C84BA2 /* MarginView.h in Headers */,\n\t\t\t\t286F8E6525F84F7400EC8D60 /* ILoader.h in Headers */,\n\t\t\t\t282936EA24E2D55D00C84BA2 /* ScintillaView.h in Headers */,\n\t\t\t\t282936E124E2D55D00C84BA2 /* QuartzTextStyleAttribute.h in Headers */,\n\t\t\t\t2829376224E2D58800C84BA2 /* Partitioning.h in Headers */,\n\t\t\t\t286F8E6625F84F7400EC8D60 /* Scintilla.h in Headers */,\n\t\t\t\t2829376424E2D58800C84BA2 /* SplitVector.h in Headers */,\n\t\t\t\t2829373B24E2D58800C84BA2 /* Position.h in Headers */,\n\t\t\t\t282936E224E2D55D00C84BA2 /* ScintillaCocoa.h in Headers */,\n\t\t\t\t2829373524E2D58800C84BA2 /* Style.h in Headers */,\n\t\t\t\t282936E424E2D55D00C84BA2 /* PlatCocoa.h in Headers */,\n\t\t\t\t2807B4EB28964CA40063A31A /* ChangeHistory.h in Headers */,\n\t\t\t\t2829376C24E2D58800C84BA2 /* Selection.h in Headers */,\n\t\t\t\t2829376124E2D58800C84BA2 /* ScintillaBase.h in Headers */,\n\t\t\t\t2829373824E2D58800C84BA2 /* RESearch.h in Headers */,\n\t\t\t\t282936E524E2D55D00C84BA2 /* InfoBarCommunicator.h in Headers */,\n\t\t\t\t2829374D24E2D58800C84BA2 /* AutoComplete.h in Headers */,\n\t\t\t\t2829374124E2D58800C84BA2 /* CharClassify.h in Headers */,\n\t\t\t\t2829373124E2D58800C84BA2 /* PositionCache.h in Headers */,\n\t\t\t\t286F8EE0260448C300EC8D60 /* Geometry.h in Headers */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXHeadersBuildPhase section */\n\n/* Begin PBXNativeTarget section */\n\t\t287F3C40246F8DC70040E76F /* Scintilla */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 287F3C49246F8DC70040E76F /* Build configuration list for PBXNativeTarget \"Scintilla\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t287F3C3C246F8DC70040E76F /* Headers */,\n\t\t\t\t287F3C3F246F8DC70040E76F /* Resources */,\n\t\t\t\t287F3C3D246F8DC70040E76F /* Sources */,\n\t\t\t\t287F3C3E246F8DC70040E76F /* Frameworks */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = Scintilla;\n\t\t\tproductName = Scintilla;\n\t\t\tproductReference = 287F3C41246F8DC70040E76F /* Scintilla.framework */;\n\t\t\tproductType = \"com.apple.product-type.framework\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\t287F3C38246F8DC70040E76F /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tattributes = {\n\t\t\t\tBuildIndependentTargetsInParallel = YES;\n\t\t\t\tLastUpgradeCheck = 1500;\n\t\t\t\tORGANIZATIONNAME = \"Neil Hodgson\";\n\t\t\t\tTargetAttributes = {\n\t\t\t\t\t287F3C40246F8DC70040E76F = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 11.4.1;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tbuildConfigurationList = 287F3C3B246F8DC70040E76F /* Build configuration list for PBXProject \"Scintilla\" */;\n\t\t\tcompatibilityVersion = \"Xcode 9.3\";\n\t\t\tdevelopmentRegion = en;\n\t\t\thasScannedForEncodings = 0;\n\t\t\tknownRegions = (\n\t\t\t\ten,\n\t\t\t\tBase,\n\t\t\t);\n\t\t\tmainGroup = 287F3C37246F8DC70040E76F;\n\t\t\tproductRefGroup = 287F3C42246F8DC70040E76F /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\t287F3C40246F8DC70040E76F /* Scintilla */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\t287F3C3F246F8DC70040E76F /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t2867917C26BB448C007C2905 /* mac_cursor_busy.png in Resources */,\n\t\t\t\t2867918126BB448C007C2905 /* info_bar_bg@2x.png in Resources */,\n\t\t\t\t282937AA24E2D60E00C84BA2 /* res in Resources */,\n\t\t\t\t2867917F26BB448C007C2905 /* mac_cursor_busy@2x.png in Resources */,\n\t\t\t\t2867917E26BB448C007C2905 /* info_bar_bg.png in Resources */,\n\t\t\t\t2867918026BB448C007C2905 /* mac_cursor_flipped.png in Resources */,\n\t\t\t\t2867917D26BB448C007C2905 /* mac_cursor_flipped@2x.png in Resources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXResourcesBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t287F3C3D246F8DC70040E76F /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t2829375024E2D58800C84BA2 /* Selection.cxx in Sources */,\n\t\t\t\t2829375224E2D58800C84BA2 /* UniConversion.cxx in Sources */,\n\t\t\t\t282936E324E2D55D00C84BA2 /* PlatCocoa.mm in Sources */,\n\t\t\t\t282936E924E2D55D00C84BA2 /* ScintillaCocoa.mm in Sources */,\n\t\t\t\t2829372E24E2D58800C84BA2 /* DBCS.cxx in Sources */,\n\t\t\t\t2829375924E2D58800C84BA2 /* AutoComplete.cxx in Sources */,\n\t\t\t\t2829375724E2D58800C84BA2 /* CaseConvert.cxx in Sources */,\n\t\t\t\t2829374524E2D58800C84BA2 /* PositionCache.cxx in Sources */,\n\t\t\t\t2829375B24E2D58800C84BA2 /* MarginView.cxx in Sources */,\n\t\t\t\t2829373924E2D58800C84BA2 /* Indicator.cxx in Sources */,\n\t\t\t\t2829375D24E2D58800C84BA2 /* Document.cxx in Sources */,\n\t\t\t\t2829375524E2D58800C84BA2 /* EditModel.cxx in Sources */,\n\t\t\t\t2829375124E2D58800C84BA2 /* ContractionState.cxx in Sources */,\n\t\t\t\t2829374924E2D58800C84BA2 /* CallTip.cxx in Sources */,\n\t\t\t\t2807B4EA28964CA40063A31A /* ChangeHistory.cxx in Sources */,\n\t\t\t\t2829375824E2D58800C84BA2 /* CharClassify.cxx in Sources */,\n\t\t\t\t2829373324E2D58800C84BA2 /* LineMarker.cxx in Sources */,\n\t\t\t\t2829374E24E2D58800C84BA2 /* KeyMap.cxx in Sources */,\n\t\t\t\t2829376D24E2D58800C84BA2 /* RunStyles.cxx in Sources */,\n\t\t\t\t28EA9CAF255894B4007710C4 /* CharacterType.cxx in Sources */,\n\t\t\t\t2829376B24E2D58800C84BA2 /* Editor.cxx in Sources */,\n\t\t\t\t2829373C24E2D58800C84BA2 /* CaseFolder.cxx in Sources */,\n\t\t\t\t2829374824E2D58800C84BA2 /* RESearch.cxx in Sources */,\n\t\t\t\t2829377024E2D58800C84BA2 /* EditView.cxx in Sources */,\n\t\t\t\t28B962A52B6AF44F00ACCD96 /* UndoHistory.cxx in Sources */,\n\t\t\t\t2829376724E2D58800C84BA2 /* ScintillaBase.cxx in Sources */,\n\t\t\t\t2829374724E2D58800C84BA2 /* Style.cxx in Sources */,\n\t\t\t\t2829375A24E2D58800C84BA2 /* ViewStyle.cxx in Sources */,\n\t\t\t\t282936E024E2D55D00C84BA2 /* InfoBar.mm in Sources */,\n\t\t\t\t28EA9CAE255894B4007710C4 /* CharacterCategoryMap.cxx in Sources */,\n\t\t\t\t2829374024E2D58800C84BA2 /* XPM.cxx in Sources */,\n\t\t\t\t2829374B24E2D58800C84BA2 /* Decoration.cxx in Sources */,\n\t\t\t\t286F8EDF260448C300EC8D60 /* Geometry.cxx in Sources */,\n\t\t\t\t2829373624E2D58800C84BA2 /* UniqueString.cxx in Sources */,\n\t\t\t\t282936E824E2D55D00C84BA2 /* ScintillaView.mm in Sources */,\n\t\t\t\t2829376924E2D58800C84BA2 /* CellBuffer.cxx in Sources */,\n\t\t\t\t2829375324E2D58800C84BA2 /* PerLine.cxx in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin XCBuildConfiguration section */\n\t\t287F3C47246F8DC70040E76F /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"c++17\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_WEAK = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tCURRENT_PROJECT_VERSION = 5.5.0;\n\t\t\t\tDEAD_CODE_STRIPPING = YES;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = dwarf;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_TESTABILITY = YES;\n\t\t\t\tENABLE_USER_SCRIPT_SANDBOXING = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu11;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\tDEBUG,\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.13;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;\n\t\t\t\tMTL_FAST_MATH = YES;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\t\"OTHER_LDFLAGS[arch=*]\" = \"-Wl,-ld_classic\";\n\t\t\t\tSDKROOT = macosx;\n\t\t\t\tVERSIONING_SYSTEM = \"apple-generic\";\n\t\t\t\tVERSION_INFO_PREFIX = \"\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t287F3C48246F8DC70040E76F /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"c++17\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_WEAK = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tCURRENT_PROJECT_VERSION = 5.5.0;\n\t\t\t\tDEAD_CODE_STRIPPING = YES;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\n\t\t\t\tENABLE_NS_ASSERTIONS = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_USER_SCRIPT_SANDBOXING = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu11;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = NDEBUG;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.13;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = NO;\n\t\t\t\tMTL_FAST_MATH = YES;\n\t\t\t\t\"OTHER_LDFLAGS[arch=*]\" = \"-Wl,-ld_classic\";\n\t\t\t\tSDKROOT = macosx;\n\t\t\t\tVERSIONING_SYSTEM = \"apple-generic\";\n\t\t\t\tVERSION_INFO_PREFIX = \"\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t287F3C4A246F8DC70040E76F /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"c++17\";\n\t\t\t\tCLANG_WARN_UNGUARDED_AVAILABILITY = YES;\n\t\t\t\tCODE_SIGN_IDENTITY = \"-\";\n\t\t\t\tCODE_SIGN_STYLE = Manual;\n\t\t\t\tCOMBINE_HIDPI_IMAGES = YES;\n\t\t\t\tCURRENT_PROJECT_VERSION = 5.5.0;\n\t\t\t\tDEAD_CODE_STRIPPING = YES;\n\t\t\t\tDEFINES_MODULE = YES;\n\t\t\t\tDEVELOPMENT_TEAM = \"\";\n\t\t\t\tDYLIB_COMPATIBILITY_VERSION = 1;\n\t\t\t\tDYLIB_CURRENT_VERSION = 1;\n\t\t\t\tDYLIB_INSTALL_NAME_BASE = \"@rpath\";\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = DEBUG;\n\t\t\t\tHEADER_SEARCH_PATHS = (\n\t\t\t\t\t../../include,\n\t\t\t\t\t../../src,\n\t\t\t\t);\n\t\t\t\tINFOPLIST_FILE = Info.plist;\n\t\t\t\tINSTALL_PATH = \"$(LOCAL_LIBRARY_DIR)/Frameworks\";\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"@executable_path/../Frameworks\",\n\t\t\t\t\t\"@loader_path/Frameworks\",\n\t\t\t\t);\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.13;\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = org.scintilla.Scintilla;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME:c99extidentifier)\";\n\t\t\t\tPROVISIONING_PROFILE_SPECIFIER = \"\";\n\t\t\t\tSKIP_INSTALL = YES;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t287F3C4B246F8DC70040E76F /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"c++17\";\n\t\t\t\tCLANG_WARN_UNGUARDED_AVAILABILITY = YES;\n\t\t\t\tCODE_SIGN_IDENTITY = \"-\";\n\t\t\t\tCODE_SIGN_STYLE = Manual;\n\t\t\t\tCOMBINE_HIDPI_IMAGES = YES;\n\t\t\t\tCURRENT_PROJECT_VERSION = 5.5.0;\n\t\t\t\tDEAD_CODE_STRIPPING = YES;\n\t\t\t\tDEFINES_MODULE = YES;\n\t\t\t\tDEVELOPMENT_TEAM = \"\";\n\t\t\t\tDYLIB_COMPATIBILITY_VERSION = 1;\n\t\t\t\tDYLIB_CURRENT_VERSION = 1;\n\t\t\t\tDYLIB_INSTALL_NAME_BASE = \"@rpath\";\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = NDEBUG;\n\t\t\t\tHEADER_SEARCH_PATHS = (\n\t\t\t\t\t../../include,\n\t\t\t\t\t../../src,\n\t\t\t\t);\n\t\t\t\tINFOPLIST_FILE = Info.plist;\n\t\t\t\tINSTALL_PATH = \"$(LOCAL_LIBRARY_DIR)/Frameworks\";\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"@executable_path/../Frameworks\",\n\t\t\t\t\t\"@loader_path/Frameworks\",\n\t\t\t\t);\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.13;\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = org.scintilla.Scintilla;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME:c99extidentifier)\";\n\t\t\t\tPROVISIONING_PROFILE_SPECIFIER = \"\";\n\t\t\t\tSKIP_INSTALL = YES;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\t287F3C3B246F8DC70040E76F /* Build configuration list for PBXProject \"Scintilla\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t287F3C47246F8DC70040E76F /* Debug */,\n\t\t\t\t287F3C48246F8DC70040E76F /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t287F3C49246F8DC70040E76F /* Build configuration list for PBXNativeTarget \"Scintilla\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t287F3C4A246F8DC70040E76F /* Debug */,\n\t\t\t\t287F3C4B246F8DC70040E76F /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n/* End XCConfigurationList section */\n\t};\n\trootObject = 287F3C38246F8DC70040E76F /* Project object */;\n}\n"
  },
  {
    "path": "scintilla/cocoa/Scintilla/Scintilla.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"self:Scintilla.xcodeproj\">\n   </FileRef>\n</Workspace>\n"
  },
  {
    "path": "scintilla/cocoa/Scintilla/Scintilla.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>IDEDidComputeMac32BitWarning</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "scintilla/cocoa/Scintilla/module.modulemap",
    "content": "framework module Scintilla {\n  umbrella header \"ScintillaView.h\"\n  module InfoBar {\n    header \"InfoBar.h\"\n  }\n  // ILexer.h is not included as Swift doesn't yet interoperate with C++\n  exclude header \"ILexer.h\"\n  export *\n  module * { export * }\n}\n"
  },
  {
    "path": "scintilla/cocoa/ScintillaCocoa.h",
    "content": "/*\r\n * ScintillaCocoa.h\r\n *\r\n * Mike Lischke <mlischke@sun.com>\r\n *\r\n * Based on ScintillaMacOSX.h\r\n * Original code by Evan Jones on Sun Sep 01 2002.\r\n *  Contributors:\r\n *  Shane Caraveo, ActiveState\r\n *  Bernd Paradies, Adobe\r\n *\r\n * Copyright 2009 Sun Microsystems, Inc. All rights reserved.\r\n * This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).\r\n */\r\n\r\n#include <cstddef>\r\n#include <cstdlib>\r\n#include <cstdint>\r\n#include <cstdio>\r\n#include <ctime>\r\n\r\n#include <stdexcept>\r\n#include <string>\r\n#include <vector>\r\n#include <map>\r\n#include <set>\r\n#include <memory>\r\n\r\n#include \"ILoader.h\"\r\n#include \"ILexer.h\"\r\n\r\n#include \"CharacterCategoryMap.h\"\r\n#include \"Position.h\"\r\n#include \"UniqueString.h\"\r\n#include \"SplitVector.h\"\r\n#include \"Partitioning.h\"\r\n#include \"RunStyles.h\"\r\n#include \"ContractionState.h\"\r\n#include \"CellBuffer.h\"\r\n#include \"CallTip.h\"\r\n#include \"KeyMap.h\"\r\n#include \"Indicator.h\"\r\n#include \"LineMarker.h\"\r\n#include \"Style.h\"\r\n#include \"ViewStyle.h\"\r\n#include \"CharClassify.h\"\r\n#include \"Decoration.h\"\r\n#include \"CaseFolder.h\"\r\n#include \"Document.h\"\r\n#include \"CaseConvert.h\"\r\n#include \"UniConversion.h\"\r\n#include \"DBCS.h\"\r\n#include \"Selection.h\"\r\n#include \"PositionCache.h\"\r\n#include \"EditModel.h\"\r\n#include \"MarginView.h\"\r\n#include \"EditView.h\"\r\n#include \"Editor.h\"\r\n\r\n#include \"AutoComplete.h\"\r\n#include \"ScintillaBase.h\"\r\n\r\nextern \"C\" NSString *ScintillaRecPboardType;\r\n\r\n@class SCIContentView;\r\n@class SCIMarginView;\r\n@class ScintillaView;\r\n\r\n@class FindHighlightLayer;\r\n\r\n/**\r\n * Helper class to be used as timer target (NSTimer).\r\n */\r\n@interface TimerTarget : NSObject {\r\n\tvoid *mTarget;\r\n\tNSNotificationQueue *notificationQueue;\r\n}\r\n- (id) init: (void *) target;\r\n- (void) timerFired: (NSTimer *) timer;\r\n- (void) idleTimerFired: (NSTimer *) timer;\r\n- (void) idleTriggered: (NSNotification *) notification;\r\n@end\r\n\r\nnamespace Scintilla::Internal {\r\n\r\nCGContextRef CGContextCurrent();\r\n\r\n/**\r\n * Main scintilla class, implemented for macOS (Cocoa).\r\n */\r\nclass ScintillaCocoa : public ScintillaBase {\r\nprivate:\r\n\t__weak ScintillaView *sciView;\r\n\tTimerTarget *timerTarget;\r\n\tNSEvent *lastMouseEvent;\r\n\r\n\t__weak id<ScintillaNotificationProtocol> delegate;\r\n\r\n\tSciNotifyFunc\tnotifyProc;\r\n\tintptr_t notifyObj;\r\n\r\n\tbool capturedMouse;\r\n\tbool isFirstResponder;\r\n\tbool isActive;\r\n\r\n\tPoint sizeClient;\r\n\r\n\tbool enteredSetScrollingSize;\r\n\r\n\tbool GetPasteboardData(NSPasteboard *board, SelectionText *selectedText);\r\n\tvoid SetPasteboardData(NSPasteboard *board, const SelectionText &selectedText);\r\n\tSci::Position TargetAsUTF8(char *text) const;\r\n\tSci::Position EncodedFromUTF8(const char *utf8, char *encoded) const;\r\n\r\n\tint scrollSpeed;\r\n\tint scrollTicks;\r\n\tCFRunLoopObserverRef observer;\r\n\r\n\tFindHighlightLayer *layerFindIndicator;\r\n\r\nprotected:\r\n\tPoint GetVisibleOriginInMain() const override;\r\n\tPoint ClientSize() const override;\r\n\tPRectangle GetClientRectangle() const override;\r\n\tPRectangle GetClientDrawingRectangle() override;\r\n\tPoint ConvertPoint(NSPoint point);\r\n\tvoid RedrawRect(PRectangle rc) override;\r\n\tvoid DiscardOverdraw() override;\r\n\tvoid Redraw() override;\r\n\r\n\tvoid Init();\r\n\tstd::unique_ptr<CaseFolder> CaseFolderForEncoding() override;\r\n\tstd::string CaseMapString(const std::string &s, CaseMapping caseMapping) override;\r\n\tvoid CancelModes() override;\r\n\r\npublic:\r\n\tScintillaCocoa(ScintillaView *sciView_, SCIContentView *viewContent, SCIMarginView *viewMargin);\r\n\t// Deleted so ScintillaCocoa objects can not be copied.\r\n\tScintillaCocoa(const ScintillaCocoa &) = delete;\r\n\tScintillaCocoa &operator=(const ScintillaCocoa &) = delete;\r\n\t~ScintillaCocoa() override;\r\n\tvoid Finalise() override;\r\n\r\n\tvoid SetDelegate(id<ScintillaNotificationProtocol> delegate_);\r\n\tvoid RegisterNotifyCallback(intptr_t windowid, SciNotifyFunc callback);\r\n\tsptr_t WndProc(Scintilla::Message iMessage, uptr_t wParam, sptr_t lParam) override;\r\n\r\n\tNSScrollView *ScrollContainer() const;\r\n\tSCIContentView *ContentView();\r\n\r\n\tbool SyncPaint(void *gc, PRectangle rc);\r\n\tbool Draw(NSRect rect, CGContextRef gc);\r\n\tvoid PaintMargin(NSRect aRect);\r\n\r\n\tsptr_t DefWndProc(Scintilla::Message iMessage, uptr_t wParam, sptr_t lParam) override;\r\n\tvoid TickFor(TickReason reason) override;\r\n\tbool FineTickerRunning(TickReason reason) override;\r\n\tvoid FineTickerStart(TickReason reason, int millis, int tolerance) override;\r\n\tvoid FineTickerCancel(TickReason reason) override;\r\n\tbool SetIdle(bool on) override;\r\n\tvoid SetMouseCapture(bool on) override;\r\n\tbool HaveMouseCapture() override;\r\n\tvoid WillDraw(NSRect rect);\r\n\tvoid ScrollText(Sci::Line linesToMove) override;\r\n\tvoid SetVerticalScrollPos() override;\r\n\tvoid SetHorizontalScrollPos() override;\r\n\tbool ModifyScrollBars(Sci::Line nMax, Sci::Line nPage) override;\r\n\tbool SetScrollingSize();\r\n\tvoid Resize();\r\n\tvoid UpdateForScroll();\r\n\r\n\t// Notifications for the owner.\r\n\tvoid NotifyChange() override;\r\n\tvoid NotifyFocus(bool focus) override;\r\n\tvoid NotifyParent(Scintilla::NotificationData scn) override;\r\n\tvoid NotifyURIDropped(const char *uri);\r\n\r\n\tbool HasSelection();\r\n\tbool CanUndo();\r\n\tbool CanRedo();\r\n\tvoid CopyToClipboard(const SelectionText &selectedText) override;\r\n\tvoid Copy() override;\r\n\tbool CanPaste() override;\r\n\tvoid Paste() override;\r\n\tvoid Paste(bool rectangular);\r\n\tvoid CTPaint(void *gc, NSRect rc);\r\n\tvoid CallTipMouseDown(NSPoint pt);\r\n\tvoid CreateCallTipWindow(PRectangle rc) override;\r\n\tvoid AddToPopUp(const char *label, int cmd = 0, bool enabled = true) override;\r\n\tvoid ClaimSelection() override;\r\n\r\n\tNSPoint GetCaretPosition();\r\n\r\n\tstd::string UTF8FromEncoded(std::string_view encoded) const override;\r\n\tstd::string EncodedFromUTF8(std::string_view utf8) const override;\r\n\r\n\tstatic sptr_t DirectFunction(sptr_t ptr, unsigned int iMessage, uptr_t wParam, sptr_t lParam);\r\n\tstatic sptr_t DirectStatusFunction(sptr_t ptr, unsigned int iMessage, uptr_t wParam, sptr_t lParam, int *pStatus);\r\n\r\n\tNSTimer *timers[static_cast<size_t>(TickReason::platform)+1];\r\n\tvoid TimerFired(NSTimer *timer);\r\n\tvoid IdleTimerFired();\r\n\tstatic void UpdateObserver(CFRunLoopObserverRef observer, CFRunLoopActivity activity, void *sci);\r\n\tvoid ObserverAdd();\r\n\tvoid ObserverRemove();\r\n\tvoid IdleWork() override;\r\n\tvoid QueueIdleWork(WorkItems items, Sci::Position upTo) override;\r\n\tptrdiff_t InsertText(NSString *input, Scintilla::CharacterSource charSource);\r\n\tNSRange PositionsFromCharacters(NSRange rangeCharacters) const;\r\n\tNSRange CharactersFromPositions(NSRange rangePositions) const;\r\n\tNSString *RangeTextAsString(NSRange rangePositions) const;\r\n\tNSInteger VisibleLineForIndex(NSInteger index);\r\n\tNSRange RangeForVisibleLine(NSInteger lineVisible);\r\n\tNSRect FrameForRange(NSRange rangeCharacters);\r\n\tNSRect GetBounds() const;\r\n\tvoid SelectOnlyMainSelection();\r\n\tvoid ConvertSelectionVirtualSpace();\r\n\tbool ClearAllSelections();\r\n\tvoid CompositionStart();\r\n\tvoid CompositionCommit();\r\n\tvoid CompositionUndo();\r\n\tvoid SetDocPointer(Document *document) override;\r\n\r\n\tbool KeyboardInput(NSEvent *event);\r\n\tvoid MouseDown(NSEvent *event);\r\n\tvoid RightMouseDown(NSEvent *event);\r\n\tvoid MouseMove(NSEvent *event);\r\n\tvoid MouseUp(NSEvent *event);\r\n\tvoid MouseEntered(NSEvent *event);\r\n\tvoid MouseExited(NSEvent *event);\r\n\tvoid MouseWheel(NSEvent *event);\r\n\r\n\t// Drag and drop\r\n\tvoid StartDrag() override;\r\n\tbool GetDragData(id <NSDraggingInfo> info, NSPasteboard &pasteBoard, SelectionText *selectedText);\r\n\tNSDragOperation DraggingEntered(id <NSDraggingInfo> info);\r\n\tNSDragOperation DraggingUpdated(id <NSDraggingInfo> info);\r\n\tvoid DraggingExited(id <NSDraggingInfo> info);\r\n\tbool PerformDragOperation(id <NSDraggingInfo> info);\r\n\tvoid DragScroll();\r\n\r\n\t// Promote some methods needed for NSResponder actions.\r\n\tvoid SelectAll() override;\r\n\tvoid DeleteBackward();\r\n\tvoid Cut() override;\r\n\tvoid Undo() override;\r\n\tvoid Redo() override;\r\n\r\n\tbool ShouldDisplayPopupOnMargin();\r\n\tbool ShouldDisplayPopupOnText();\r\n\tNSMenu *CreateContextMenu(NSEvent *event);\r\n\tvoid HandleCommand(NSInteger command);\r\n\r\n\tvoid SetFirstResponder(bool isFirstResponder_);\r\n\tvoid ActiveStateChanged(bool isActive_);\r\n\tvoid SetFocusActiveState();\r\n\tvoid UpdateBaseElements() override;\r\n\r\n\tvoid WindowWillMove();\r\n\r\n\t// Find indicator\r\n\tvoid ShowFindIndicatorForRange(NSRange charRange, BOOL retaining);\r\n\tvoid MoveFindIndicatorWithBounce(BOOL bounce);\r\n\tvoid HideFindIndicator();\r\n};\r\n\r\n\r\n}\r\n\r\n\r\n"
  },
  {
    "path": "scintilla/cocoa/ScintillaCocoa.mm",
    "content": "\r\n/**\r\n * Scintilla source code edit control\r\n * @file ScintillaCocoa.mm - Cocoa subclass of ScintillaBase\r\n *\r\n * Written by Mike Lischke <mlischke@sun.com>\r\n *\r\n * Loosely based on ScintillaMacOSX.cxx.\r\n * Copyright 2003 by Evan Jones <ejones@uwaterloo.ca>\r\n * Based on ScintillaGTK.cxx Copyright 1998-2002 by Neil Hodgson <neilh@scintilla.org>\r\n * The License.txt file describes the conditions under which this software may be distributed.\r\n  *\r\n * Copyright (c) 2009, 2010 Sun Microsystems, Inc. All rights reserved.\r\n * This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).\r\n */\r\n\r\n#include <cmath>\r\n\r\n#include <string_view>\r\n#include <vector>\r\n#include <optional>\r\n\r\n#import <Cocoa/Cocoa.h>\r\n#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5\r\n#import <QuartzCore/CAGradientLayer.h>\r\n#endif\r\n#import <QuartzCore/CAAnimation.h>\r\n#import <QuartzCore/CATransaction.h>\r\n\r\n#import \"ScintillaTypes.h\"\r\n#import \"ScintillaMessages.h\"\r\n#import \"ScintillaStructures.h\"\r\n\r\n#import \"Debugging.h\"\r\n#import \"Geometry.h\"\r\n#import \"Platform.h\"\r\n#import \"ScintillaView.h\"\r\n#import \"ScintillaCocoa.h\"\r\n#import \"PlatCocoa.h\"\r\n\r\nusing namespace Scintilla;\r\nusing namespace Scintilla::Internal;\r\n\r\nNSString *ScintillaRecPboardType = @\"com.scintilla.utf16-plain-text.rectangular\";\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n// Define keyboard shortcuts (equivalents) the Mac way.\r\n#define SCI_CMD ( SCI_CTRL)\r\n#define SCI_SCMD ( SCI_CMD | SCI_SHIFT)\r\n#define SCI_SMETA ( SCI_META | SCI_SHIFT)\r\n\r\nnamespace {\r\n\r\nconstexpr Keys Key(char ch) {\r\n    return static_cast<Keys>(ch);\r\n}\r\n\r\n}\r\n\r\nstatic const KeyToCommand macMapDefault[] = {\r\n\t// macOS specific\r\n\t{Keys::Down,      SCI_CTRL,   Message::DocumentEnd},\r\n\t{Keys::Down,      SCI_CSHIFT, Message::DocumentEndExtend},\r\n\t{Keys::Up,        SCI_CTRL,   Message::DocumentStart},\r\n\t{Keys::Up,        SCI_CSHIFT, Message::DocumentStartExtend},\r\n\t{Keys::Left,      SCI_CTRL,   Message::VCHome},\r\n\t{Keys::Left,      SCI_CSHIFT, Message::VCHomeExtend},\r\n\t{Keys::Right,     SCI_CTRL,   Message::LineEnd},\r\n\t{Keys::Right,     SCI_CSHIFT, Message::LineEndExtend},\r\n\r\n\t// Similar to Windows and GTK+\r\n\t// Where equivalent clashes with macOS standard, use Meta instead\r\n\t{Keys::Down,      SCI_NORM,   Message::LineDown},\r\n\t{Keys::Down,      SCI_SHIFT,  Message::LineDownExtend},\r\n\t{Keys::Down,      SCI_META,   Message::LineScrollDown},\r\n\t{Keys::Down,      SCI_ASHIFT, Message::LineDownRectExtend},\r\n\t{Keys::Up,        SCI_NORM,   Message::LineUp},\r\n\t{Keys::Up,        SCI_SHIFT,  Message::LineUpExtend},\r\n\t{Keys::Up,        SCI_META,   Message::LineScrollUp},\r\n\t{Keys::Up,        SCI_ASHIFT, Message::LineUpRectExtend},\r\n\t{Key('['),           SCI_CTRL,   Message::ParaUp},\r\n\t{Key('['),           SCI_CSHIFT, Message::ParaUpExtend},\r\n\t{Key(']'),           SCI_CTRL,   Message::ParaDown},\r\n\t{Key(']'),           SCI_CSHIFT, Message::ParaDownExtend},\r\n\t{Keys::Left,      SCI_NORM,   Message::CharLeft},\r\n\t{Keys::Left,      SCI_SHIFT,  Message::CharLeftExtend},\r\n\t{Keys::Left,      SCI_ALT,    Message::WordLeft},\r\n\t{Keys::Left,      SCI_META,   Message::WordLeft},\r\n\t{Keys::Left,      SCI_SMETA,  Message::WordLeftExtend},\r\n\t{Keys::Left,      SCI_ASHIFT, Message::CharLeftRectExtend},\r\n\t{Keys::Right,     SCI_NORM,   Message::CharRight},\r\n\t{Keys::Right,     SCI_SHIFT,  Message::CharRightExtend},\r\n\t{Keys::Right,     SCI_ALT,    Message::WordRight},\r\n\t{Keys::Right,     SCI_META,   Message::WordRight},\r\n\t{Keys::Right,     SCI_SMETA,  Message::WordRightExtend},\r\n\t{Keys::Right,     SCI_ASHIFT, Message::CharRightRectExtend},\r\n\t{Key('/'),           SCI_CTRL,   Message::WordPartLeft},\r\n\t{Key('/'),           SCI_CSHIFT, Message::WordPartLeftExtend},\r\n\t{Key('\\\\'),          SCI_CTRL,   Message::WordPartRight},\r\n\t{Key('\\\\'),          SCI_CSHIFT, Message::WordPartRightExtend},\r\n\t{Keys::Home,      SCI_NORM,   Message::VCHome},\r\n\t{Keys::Home,      SCI_SHIFT,  Message::VCHomeExtend},\r\n\t{Keys::Home,      SCI_CTRL,   Message::DocumentStart},\r\n\t{Keys::Home,      SCI_CSHIFT, Message::DocumentStartExtend},\r\n\t{Keys::Home,      SCI_ALT,    Message::HomeDisplay},\r\n\t{Keys::Home,      SCI_ASHIFT, Message::VCHomeRectExtend},\r\n\t{Keys::End,       SCI_NORM,   Message::LineEnd},\r\n\t{Keys::End,       SCI_SHIFT,  Message::LineEndExtend},\r\n\t{Keys::End,       SCI_CTRL,   Message::DocumentEnd},\r\n\t{Keys::End,       SCI_CSHIFT, Message::DocumentEndExtend},\r\n\t{Keys::End,       SCI_ALT,    Message::LineEndDisplay},\r\n\t{Keys::End,       SCI_ASHIFT, Message::LineEndRectExtend},\r\n\t{Keys::Prior,     SCI_NORM,   Message::PageUp},\r\n\t{Keys::Prior,     SCI_SHIFT,  Message::PageUpExtend},\r\n\t{Keys::Prior,     SCI_ASHIFT, Message::PageUpRectExtend},\r\n\t{Keys::Next,      SCI_NORM,   Message::PageDown},\r\n\t{Keys::Next,      SCI_SHIFT,  Message::PageDownExtend},\r\n\t{Keys::Next,      SCI_ASHIFT, Message::PageDownRectExtend},\r\n\t{Keys::Delete,    SCI_NORM,   Message::Clear},\r\n\t{Keys::Delete,    SCI_SHIFT,  Message::Cut},\r\n\t{Keys::Delete,    SCI_CTRL,   Message::DelWordRight},\r\n\t{Keys::Delete,    SCI_CSHIFT, Message::DelLineRight},\r\n\t{Keys::Insert,    SCI_NORM,   Message::EditToggleOvertype},\r\n\t{Keys::Insert,    SCI_SHIFT,  Message::Paste},\r\n\t{Keys::Insert,    SCI_CTRL,   Message::Copy},\r\n\t{Keys::Escape,    SCI_NORM,   Message::Cancel},\r\n\t{Keys::Back,      SCI_NORM,   Message::DeleteBack},\r\n\t{Keys::Back,      SCI_SHIFT,  Message::DeleteBack},\r\n\t{Keys::Back,      SCI_CTRL,   Message::DelWordLeft},\r\n\t{Keys::Back,      SCI_ALT,    Message::DelWordLeft},\r\n\t{Keys::Back,      SCI_CSHIFT, Message::DelLineLeft},\r\n\t{Key('z'),           SCI_CMD,    Message::Undo},\r\n\t{Key('z'),           SCI_SCMD,   Message::Redo},\r\n\t{Key('x'),           SCI_CMD,    Message::Cut},\r\n\t{Key('c'),           SCI_CMD,    Message::Copy},\r\n\t{Key('v'),           SCI_CMD,    Message::Paste},\r\n\t{Key('a'),           SCI_CMD,    Message::SelectAll},\r\n\t{Keys::Tab,       SCI_NORM,   Message::Tab},\r\n\t{Keys::Tab,       SCI_SHIFT,  Message::BackTab},\r\n\t{Keys::Return,    SCI_NORM,   Message::NewLine},\r\n\t{Keys::Return,    SCI_SHIFT,  Message::NewLine},\r\n\t{Keys::Add,       SCI_CMD,    Message::ZoomIn},\r\n\t{Keys::Subtract,  SCI_CMD,    Message::ZoomOut},\r\n\t{Keys::Divide,    SCI_CMD,    Message::SetZoom},\r\n\t{Key('l'),           SCI_CMD,    Message::LineCut},\r\n\t{Key('l'),           SCI_CSHIFT, Message::LineDelete},\r\n\t{Key('t'),           SCI_CSHIFT, Message::LineCopy},\r\n\t{Key('t'),           SCI_CTRL,   Message::LineTranspose},\r\n\t{Key('d'),           SCI_CTRL,   Message::SelectionDuplicate},\r\n\t{Key('u'),           SCI_CTRL,   Message::LowerCase},\r\n\t{Key('u'),           SCI_CSHIFT, Message::UpperCase},\r\n\t{Key(0), KeyMod::Norm, static_cast<Message>(0)},\r\n};\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5\r\n\r\n// Only implement FindHighlightLayer on macOS 10.6+\r\n\r\n/**\r\n * Class to display the animated gold roundrect used on macOS for matches.\r\n */\r\n@interface FindHighlightLayer : CAGradientLayer {\r\n@private\r\n\tNSString *sFind;\r\n\tlong positionFind;\r\n\tBOOL retaining;\r\n\tCGFloat widthText;\r\n\tCGFloat heightLine;\r\n\tNSString *sFont;\r\n\tCGFloat fontSize;\r\n}\r\n\r\n@property(copy) NSString *sFind;\r\n@property(assign) long positionFind;\r\n@property(assign) BOOL retaining;\r\n@property(assign) CGFloat widthText;\r\n@property(assign) CGFloat heightLine;\r\n@property(copy) NSString *sFont;\r\n@property(assign) CGFloat fontSize;\r\n\r\n- (void) animateMatch: (CGPoint) ptText bounce: (BOOL) bounce;\r\n- (void) hideMatch;\r\n\r\n@end\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n@implementation FindHighlightLayer\r\n\r\n@synthesize sFind, positionFind, retaining, widthText, heightLine, sFont, fontSize;\r\n\r\n- (id) init {\r\n\tif (self = [super init]) {\r\n\t\t[self setNeedsDisplayOnBoundsChange: YES];\r\n\t\t// A gold to slightly redder gradient to match other applications\r\n\t\tCGColorRef colGold = CGColorCreateGenericRGB(1.0, 1.0, 0, 1.0);\r\n\t\tCGColorRef colGoldRed = CGColorCreateGenericRGB(1.0, 0.8, 0, 1.0);\r\n\t\tself.colors = @[(__bridge id)colGoldRed, (__bridge id)colGold];\r\n\t\tCGColorRelease(colGoldRed);\r\n\t\tCGColorRelease(colGold);\r\n\r\n\t\tCGColorRef colGreyBorder = CGColorCreateGenericGray(0.756f, 0.5f);\r\n\t\tself.borderColor = colGreyBorder;\r\n\t\tCGColorRelease(colGreyBorder);\r\n\r\n\t\tself.borderWidth = 1.0;\r\n\t\tself.cornerRadius = 5.0f;\r\n\t\tself.shadowRadius = 1.0f;\r\n\t\tself.shadowOpacity = 0.9f;\r\n\t\tself.shadowOffset = CGSizeMake(0.0f, -2.0f);\r\n\t\tself.anchorPoint = CGPointMake(0.5, 0.5);\r\n\t}\r\n\treturn self;\r\n\r\n}\r\n\r\n\r\nconst CGFloat paddingHighlightX = 4;\r\nconst CGFloat paddingHighlightY = 2;\r\n\r\n- (void) drawInContext: (CGContextRef) context {\r\n\tif (!sFind || !sFont)\r\n\t\treturn;\r\n\r\n\tCFStringRef str = (__bridge CFStringRef)(sFind);\r\n\r\n\tCFMutableDictionaryRef styleDict = CFDictionaryCreateMutable(kCFAllocatorDefault, 2,\r\n\t\t\t\t\t   &kCFTypeDictionaryKeyCallBacks,\r\n\t\t\t\t\t   &kCFTypeDictionaryValueCallBacks);\r\n\tCGColorRef color = CGColorCreateGenericRGB(0.0, 0.0, 0.0, 1.0);\r\n\tCFDictionarySetValue(styleDict, kCTForegroundColorAttributeName, color);\r\n\tCTFontRef fontRef = ::CTFontCreateWithName((CFStringRef)sFont, fontSize, NULL);\r\n\tCFDictionaryAddValue(styleDict, kCTFontAttributeName, fontRef);\r\n\r\n\tCFAttributedStringRef attrString = ::CFAttributedStringCreate(NULL, str, styleDict);\r\n\tCTLineRef textLine = ::CTLineCreateWithAttributedString(attrString);\r\n\t// Indent from corner of bounds\r\n\tCGContextSetTextPosition(context, paddingHighlightX, 3 + paddingHighlightY);\r\n\tCTLineDraw(textLine, context);\r\n\r\n\tCFRelease(textLine);\r\n\tCFRelease(attrString);\r\n\tCFRelease(fontRef);\r\n\tCGColorRelease(color);\r\n\tCFRelease(styleDict);\r\n}\r\n\r\n- (void) animateMatch: (CGPoint) ptText bounce: (BOOL) bounce {\r\n\tif (!self.sFind || !(self.sFind).length) {\r\n\t\t[self hideMatch];\r\n\t\treturn;\r\n\t}\r\n\r\n\tCGFloat width = self.widthText + paddingHighlightX * 2;\r\n\tCGFloat height = self.heightLine + paddingHighlightY * 2;\r\n\r\n\tCGFloat flipper = self.geometryFlipped ? -1.0 : 1.0;\r\n\r\n\t// Adjust for padding\r\n\tptText.x -= paddingHighlightX;\r\n\tptText.y += flipper * paddingHighlightY;\r\n\r\n\t// Shift point to centre as expanding about centre\r\n\tptText.x += width / 2.0;\r\n\tptText.y -= flipper * height / 2.0;\r\n\r\n\t[CATransaction begin];\r\n\t[CATransaction setValue: @0.0f forKey: kCATransactionAnimationDuration];\r\n\tself.bounds = CGRectMake(0, 0, width, height);\r\n\tself.position = ptText;\r\n\tif (bounce) {\r\n\t\t// Do not reset visibility when just moving\r\n\t\tself.hidden = NO;\r\n\t\tself.opacity = 1.0;\r\n\t}\r\n\t[self setNeedsDisplay];\r\n\t[CATransaction commit];\r\n\r\n\tif (bounce) {\r\n\t\tCABasicAnimation *animBounce = [CABasicAnimation animationWithKeyPath: @\"transform.scale\"];\r\n\t\tanimBounce.duration = 0.15;\r\n\t\tanimBounce.autoreverses = YES;\r\n\t\tanimBounce.removedOnCompletion = NO;\r\n\t\tanimBounce.fromValue = @1.0f;\r\n\t\tanimBounce.toValue = @1.25f;\r\n\r\n\t\tif (self.retaining) {\r\n\r\n\t\t\t[self addAnimation: animBounce forKey: @\"animateFound\"];\r\n\r\n\t\t} else {\r\n\r\n\t\t\tCABasicAnimation *animFade = [CABasicAnimation animationWithKeyPath: @\"opacity\"];\r\n\t\t\tanimFade.duration = 0.1;\r\n\t\t\tanimFade.beginTime = 0.4;\r\n\t\t\tanimFade.removedOnCompletion = NO;\r\n\t\t\tanimFade.fromValue = @1.0f;\r\n\t\t\tanimFade.toValue = @0.0f;\r\n\r\n\t\t\tCAAnimationGroup *group = [CAAnimationGroup animation];\r\n\t\t\tgroup.duration = 0.5;\r\n\t\t\tgroup.removedOnCompletion = NO;\r\n\t\t\tgroup.fillMode = kCAFillModeForwards;\r\n\t\t\tgroup.animations = @[animBounce, animFade];\r\n\r\n\t\t\t[self addAnimation: group forKey: @\"animateFound\"];\r\n\t\t}\r\n\t}\r\n}\r\n\r\n- (void) hideMatch {\r\n\tself.sFind = @\"\";\r\n\tself.positionFind = Sci::invalidPosition;\r\n\tself.hidden = YES;\r\n}\r\n\r\n@end\r\n\r\n#endif\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n@implementation TimerTarget\r\n\r\n- (id) init: (void *) target {\r\n\tself = [super init];\r\n\tif (self != nil) {\r\n\t\tmTarget = target;\r\n\r\n\t\t// Get the default notification queue for the thread which created the instance (usually the\r\n\t\t// main thread). We need that later for idle event processing.\r\n\t\tNSNotificationCenter *center = [NSNotificationCenter defaultCenter];\r\n\t\tnotificationQueue = [[NSNotificationQueue alloc] initWithNotificationCenter: center];\r\n\t\t[center addObserver: self selector: @selector(idleTriggered:) name: @\"Idle\" object: self];\r\n\t}\r\n\treturn self;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n- (void) dealloc {\r\n\tNSNotificationCenter *center = [NSNotificationCenter defaultCenter];\r\n\t[center removeObserver: self];\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Method called by owning ScintillaCocoa object when it is destroyed.\r\n */\r\n- (void) ownerDestroyed {\r\n\tmTarget = NULL;\r\n\tnotificationQueue = nil;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Method called by a timer installed by ScintillaCocoa. This two step approach is needed because\r\n * a native Obj-C class is required as target for the timer.\r\n */\r\n- (void) timerFired: (NSTimer *) timer {\r\n\tif (mTarget)\r\n\t\tstatic_cast<ScintillaCocoa *>(mTarget)->TimerFired(timer);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Another timer callback for the idle timer.\r\n */\r\n- (void) idleTimerFired: (NSTimer *) timer {\r\n#pragma unused(timer)\r\n\t// Idle timer event.\r\n\t// Post a new idle notification, which gets executed when the run loop is idle.\r\n\t// Since we are coalescing on name and sender there will always be only one actual notification\r\n\t// even for multiple requests.\r\n\tNSNotification *notification = [NSNotification notificationWithName: @\"Idle\" object: self];\r\n\t[notificationQueue enqueueNotification: notification\r\n\t\t\t\t  postingStyle: NSPostWhenIdle\r\n\t\t\t\t  coalesceMask: (NSNotificationCoalescingOnName | NSNotificationCoalescingOnSender)\r\n\t\t\t\t      forModes: @[NSDefaultRunLoopMode, NSModalPanelRunLoopMode]];\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Another step for idle events. The timer (for idle events) simply requests a notification on\r\n * idle time. Only when this notification is send we actually call back the editor.\r\n */\r\n- (void) idleTriggered: (NSNotification *) notification {\r\n#pragma unused(notification)\r\n\tif (mTarget)\r\n\t\tstatic_cast<ScintillaCocoa *>(mTarget)->IdleTimerFired();\r\n}\r\n\r\n@end\r\n\r\n//----------------- CGContextCurrent ---------------------------------------------------------------\r\n\r\nCGContextRef Scintilla::Internal::CGContextCurrent() {\r\n\tif (@available(macOS 10.10, *)) {\r\n\t\treturn [NSGraphicsContext currentContext].CGContext;\r\n\t} else {\r\n\t\t// Use old deprecated API\r\n#pragma clang diagnostic push\r\n#pragma clang diagnostic ignored \"-Wdeprecated-declarations\"\r\n\t\treturn static_cast<CGContextRef>([NSGraphicsContext currentContext].graphicsPort);\r\n#pragma clang diagnostic pop\r\n\t}\r\n}\r\n\r\n//----------------- ScintillaCocoa -----------------------------------------------------------------\r\n\r\nScintillaCocoa::ScintillaCocoa(ScintillaView *sciView_, SCIContentView *viewContent, SCIMarginView *viewMargin) {\r\n\tvs.marginInside = false;\r\n\r\n\t// Don't retain since we're owned by view, which would cause a cycle\r\n\tsciView = sciView_;\r\n\twMain = (__bridge WindowID)viewContent;\r\n\twMargin = (__bridge WindowID)viewMargin;\r\n\r\n\ttimerTarget = [[TimerTarget alloc] init: this];\r\n\tlastMouseEvent = NULL;\r\n\tdelegate = NULL;\r\n\tnotifyObj = NULL;\r\n\tnotifyProc = NULL;\r\n\tcapturedMouse = false;\r\n\tisFirstResponder = false;\r\n\tisActive = NSApp.isActive;\r\n\tenteredSetScrollingSize = false;\r\n\tscrollSpeed = 1;\r\n\tscrollTicks = 2000;\r\n\tobserver = NULL;\r\n\tlayerFindIndicator = NULL;\r\n\timeInteraction = IMEInteraction::Inline;\r\n\tstd::fill(timers, std::end(timers), nil);\r\n\tInit();\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nScintillaCocoa::~ScintillaCocoa() {\r\n\t[timerTarget ownerDestroyed];\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Core initialization of the control. Everything that needs to be set up happens here.\r\n */\r\nvoid ScintillaCocoa::Init() {\r\n\r\n\t// Tell Scintilla not to buffer: Quartz buffers drawing for us.\r\n\tWndProc(Message::SetBufferedDraw, 0, 0);\r\n\r\n\t// We are working with Unicode exclusively.\r\n\tWndProc(Message::SetCodePage, SC_CP_UTF8, 0);\r\n\r\n\t// Add Mac specific key bindings.\r\n\tfor (int i = 0; static_cast<int>(macMapDefault[i].key); i++)\r\n\t\tkmap.AssignCmdKey(macMapDefault[i].key, macMapDefault[i].modifiers, macMapDefault[i].msg);\r\n\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * We need some clean up. Do it here.\r\n */\r\nvoid ScintillaCocoa::Finalise() {\r\n\tObserverRemove();\r\n\tfor (size_t tr=static_cast<size_t>(TickReason::caret); tr<=static_cast<size_t>(TickReason::platform); tr++) {\r\n\t\tFineTickerCancel(static_cast<TickReason>(tr));\r\n\t}\r\n\tScintillaBase::Finalise();\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid ScintillaCocoa::UpdateObserver(CFRunLoopObserverRef /* observer */, CFRunLoopActivity /* activity */, void *info) {\r\n\tScintillaCocoa *sci = static_cast<ScintillaCocoa *>(info);\r\n\tsci->IdleWork();\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Add an observer to the run loop to perform styling as high-priority idle task.\r\n */\r\n\r\nvoid ScintillaCocoa::ObserverAdd() {\r\n\tif (!observer) {\r\n\t\tCFRunLoopObserverContext context;\r\n\t\tcontext.version = 0;\r\n\t\tcontext.info = this;\r\n\t\tcontext.retain = NULL;\r\n\t\tcontext.release = NULL;\r\n\t\tcontext.copyDescription = NULL;\r\n\r\n\t\tCFRunLoopRef mainRunLoop = CFRunLoopGetMain();\r\n\t\tobserver = CFRunLoopObserverCreate(NULL, kCFRunLoopEntry | kCFRunLoopBeforeWaiting,\r\n\t\t\t\t\t\t   true, 0, UpdateObserver, &context);\r\n\t\tCFRunLoopAddObserver(mainRunLoop, observer, kCFRunLoopCommonModes);\r\n\t}\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Remove the run loop observer.\r\n */\r\nvoid ScintillaCocoa::ObserverRemove() {\r\n\tif (observer) {\r\n\t\tCFRunLoopRef mainRunLoop = CFRunLoopGetMain();\r\n\t\tCFRunLoopRemoveObserver(mainRunLoop, observer, kCFRunLoopCommonModes);\r\n\t\tCFRelease(observer);\r\n\t}\r\n\tobserver = NULL;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid ScintillaCocoa::IdleWork() {\r\n\tEditor::IdleWork();\r\n\tObserverRemove();\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid ScintillaCocoa::QueueIdleWork(WorkItems items, Sci::Position upTo) {\r\n\tEditor::QueueIdleWork(items, upTo);\r\n\tObserverAdd();\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Convert a Core Foundation string into a std::string in a particular encoding.\r\n */\r\n\r\nstatic std::string EncodedBytesString(CFStringRef cfsRef, CFStringEncoding encoding) {\r\n\tconst CFRange rangeAll = {0, CFStringGetLength(cfsRef)};\r\n\tCFIndex usedLen = 0;\r\n\tCFStringGetBytes(cfsRef, rangeAll, encoding, '?', false,\r\n\t\t\t NULL, 0, &usedLen);\r\n\r\n\tstd::string buffer(usedLen, '\\0');\r\n\tif (usedLen > 0) {\r\n\t\tCFStringGetBytes(cfsRef, rangeAll, encoding, '?', false,\r\n\t\t\t\t reinterpret_cast<UInt8 *>(&buffer[0]), usedLen, NULL);\r\n\t}\r\n\treturn buffer;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Create a Core Foundation string from a string.\r\n * This is a simple wrapper that specifies common arguments (the default allocator and\r\n * false for isExternalRepresentation) and avoids casting since strings in Scintilla\r\n * contain char, not UInt8 (unsigned char).\r\n */\r\n\r\nstatic CFStringRef CFStringFromString(const char *s, size_t len, CFStringEncoding encoding) {\r\n\treturn CFStringCreateWithBytes(kCFAllocatorDefault,\r\n\t\t\t\t       reinterpret_cast<const UInt8 *>(s),\r\n\t\t\t\t       len, encoding, false);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Case folders.\r\n */\r\n\r\nclass CaseFolderDBCS : public CaseFolderTable {\r\n\tCFStringEncoding encoding;\r\npublic:\r\n\texplicit CaseFolderDBCS(CFStringEncoding encoding_) : encoding(encoding_) {\r\n\t}\r\n\tsize_t Fold(char *folded, size_t sizeFolded, const char *mixed, size_t lenMixed) override {\r\n\t\tif ((lenMixed == 1) && (sizeFolded > 0)) {\r\n\t\t\tfolded[0] = mapping[static_cast<unsigned char>(mixed[0])];\r\n\t\t\treturn 1;\r\n\t\t} else {\r\n\t\t\tCFStringRef cfsVal = CFStringFromString(mixed, lenMixed, encoding);\r\n\t\t\tif (!cfsVal) {\r\n\t\t\t\tfolded[0] = '\\0';\r\n\t\t\t\treturn 1;\r\n\t\t\t}\r\n\r\n\t\t\tNSString *sMapped = [(__bridge NSString *)cfsVal stringByFoldingWithOptions: NSCaseInsensitiveSearch\r\n\t\t\t\t\t\t\t\t\t\t\t     locale: [NSLocale currentLocale]];\r\n\r\n\t\t\tstd::string encoded = EncodedBytesString((__bridge CFStringRef)sMapped, encoding);\r\n\r\n\t\t\tsize_t lenMapped = encoded.length();\r\n\t\t\tif (lenMapped < sizeFolded) {\r\n\t\t\t\tmemcpy(folded, encoded.c_str(), lenMapped);\r\n\t\t\t} else {\r\n\t\t\t\tfolded[0] = '\\0';\r\n\t\t\t\tlenMapped = 1;\r\n\t\t\t}\r\n\t\t\tCFRelease(cfsVal);\r\n\t\t\treturn lenMapped;\r\n\t\t}\r\n\t}\r\n};\r\n\r\nstd::unique_ptr<CaseFolder> ScintillaCocoa::CaseFolderForEncoding() {\r\n\tif (pdoc->dbcsCodePage == SC_CP_UTF8) {\r\n\t\treturn std::make_unique<CaseFolderUnicode>();\r\n\t} else {\r\n\t\tCFStringEncoding encoding = EncodingFromCharacterSet(IsUnicodeMode(),\r\n\t\t\t\t\t    vs.styles[StyleDefault].characterSet);\r\n\t\tif (pdoc->dbcsCodePage == 0) {\r\n\t\t\tstd::unique_ptr<CaseFolderTable> pcf = std::make_unique<CaseFolderTable>();\r\n\t\t\t// Only for single byte encodings\r\n\t\t\tfor (int i=0x80; i<0x100; i++) {\r\n\t\t\t\tchar sCharacter[2] = \"A\";\r\n\t\t\t\tsCharacter[0] = static_cast<char>(i);\r\n\t\t\t\tCFStringRef cfsVal = CFStringFromString(sCharacter, 1, encoding);\r\n\t\t\t\tif (!cfsVal)\r\n\t\t\t\t\tcontinue;\r\n\r\n\t\t\t\tNSString *sMapped = [(__bridge NSString *)cfsVal stringByFoldingWithOptions: NSCaseInsensitiveSearch\r\n\t\t\t\t\t\t\t\t\t\t\t\t     locale: [NSLocale currentLocale]];\r\n\r\n\t\t\t\tstd::string encoded = EncodedBytesString((__bridge CFStringRef)sMapped, encoding);\r\n\r\n\t\t\t\tif (encoded.length() == 1) {\r\n\t\t\t\t\tpcf->SetTranslation(sCharacter[0], encoded[0]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tCFRelease(cfsVal);\r\n\t\t\t}\r\n\t\t\treturn pcf;\r\n\t\t} else {\r\n\t\t\treturn std::make_unique<CaseFolderDBCS>(encoding);\r\n\t\t}\r\n\t}\r\n}\r\n\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Case-fold the given string depending on the specified case mapping type.\r\n */\r\nstd::string ScintillaCocoa::CaseMapString(const std::string &s, CaseMapping caseMapping) {\r\n\tif ((s.size() == 0) || (caseMapping == CaseMapping::same))\r\n\t\treturn s;\r\n\r\n\tif (IsUnicodeMode()) {\r\n\t\tstd::string retMapped(s.length() * maxExpansionCaseConversion, 0);\r\n\t\tsize_t lenMapped = CaseConvertString(&retMapped[0], retMapped.length(), s.c_str(), s.length(),\r\n\t\t\t\t\t\t     (caseMapping == CaseMapping::upper) ? CaseConversion::upper : CaseConversion::lower);\r\n\t\tretMapped.resize(lenMapped);\r\n\t\treturn retMapped;\r\n\t}\r\n\r\n\tCFStringEncoding encoding = EncodingFromCharacterSet(IsUnicodeMode(),\r\n\t\t\t\t    vs.styles[StyleDefault].characterSet);\r\n\r\n\tCFStringRef cfsVal = CFStringFromString(s.c_str(), s.length(), encoding);\r\n\tif (!cfsVal) {\r\n\t\treturn s;\r\n\t}\r\n\r\n\tNSString *sMapped;\r\n\tswitch (caseMapping) {\r\n\tcase CaseMapping::upper:\r\n\t\tsMapped = ((__bridge NSString *)cfsVal).uppercaseString;\r\n\t\tbreak;\r\n\tcase CaseMapping::lower:\r\n\t\tsMapped = ((__bridge NSString *)cfsVal).lowercaseString;\r\n\t\tbreak;\r\n\tdefault:\r\n\t\tsMapped = (__bridge NSString *)cfsVal;\r\n\t}\r\n\r\n\t// Back to encoding\r\n\tstd::string result = EncodedBytesString((__bridge CFStringRef)sMapped, encoding);\r\n\tCFRelease(cfsVal);\r\n\treturn result;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Cancel all modes, both for base class and any find indicator.\r\n */\r\nvoid ScintillaCocoa::CancelModes() {\r\n\tScintillaBase::CancelModes();\r\n\tHideFindIndicator();\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Helper function to get the scrolling view.\r\n */\r\nNSScrollView *ScintillaCocoa::ScrollContainer() const {\r\n\tNSView *container = (__bridge NSView *)(wMain.GetID());\r\n\treturn static_cast<NSScrollView *>(container.superview.superview);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Helper function to get the inner container which represents the actual \"canvas\" we work with.\r\n */\r\nSCIContentView *ScintillaCocoa::ContentView() {\r\n\treturn (__bridge SCIContentView *)(wMain.GetID());\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Return the top left visible point relative to the origin point of the whole document.\r\n */\r\nScintilla::Internal::Point ScintillaCocoa::GetVisibleOriginInMain() const {\r\n\tNSScrollView *scrollView = ScrollContainer();\r\n\tNSRect contentRect = scrollView.contentView.bounds;\r\n\treturn Point(contentRect.origin.x, contentRect.origin.y);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Return the size of the client area which has been cached.\r\n */\r\nScintilla::Internal::Point ScintillaCocoa::ClientSize() const {\r\n\treturn sizeClient;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Instead of returning the size of the inner view we have to return the visible part of it\r\n * in order to make scrolling working properly.\r\n * The returned value is in document coordinates.\r\n */\r\nPRectangle ScintillaCocoa::GetClientRectangle() const {\r\n\tNSScrollView *scrollView = ScrollContainer();\r\n\treturn NSRectToPRectangle(scrollView.contentView.bounds);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Allow for prepared rectangle\r\n */\r\nPRectangle ScintillaCocoa::GetClientDrawingRectangle() {\r\n#if MAC_OS_X_VERSION_MAX_ALLOWED > 1080\r\n\tNSView *content = ContentView();\r\n\tif ([content respondsToSelector: @selector(setPreparedContentRect:)]) {\r\n\t\tNSRect rcPrepared = content.preparedContentRect;\r\n\t\tif (!NSIsEmptyRect(rcPrepared))\r\n\t\t\treturn NSRectToPRectangle(rcPrepared);\r\n\t}\r\n#endif\r\n\treturn ScintillaCocoa::GetClientRectangle();\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Converts the given point from base coordinates to local coordinates and at the same time into\r\n * a native Point structure. Base coordinates are used for the top window used in the view hierarchy.\r\n * Returned value is in view coordinates.\r\n */\r\nScintilla::Internal::Point ScintillaCocoa::ConvertPoint(NSPoint point) {\r\n\tNSView *container = ContentView();\r\n\tNSPoint result = [container convertPoint: point fromView: nil];\r\n\tScintilla::Internal::Point ptOrigin = GetVisibleOriginInMain();\r\n\treturn Point(result.x - ptOrigin.x, result.y - ptOrigin.y);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Do not clip like superclass as Cocoa is not reporting all of prepared area.\r\n */\r\nvoid ScintillaCocoa::RedrawRect(PRectangle rc) {\r\n\tif (!rc.Empty())\r\n\t\twMain.InvalidateRectangle(rc);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid ScintillaCocoa::DiscardOverdraw() {\r\n#if MAC_OS_X_VERSION_MAX_ALLOWED > 1080\r\n\t// If running on 10.9, reset prepared area to visible area\r\n\tNSView *content = ContentView();\r\n\tif ([content respondsToSelector: @selector(setPreparedContentRect:)]) {\r\n\t\tcontent.preparedContentRect = content.visibleRect;\r\n\t}\r\n#endif\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Ensure all of prepared content is also redrawn.\r\n */\r\nvoid ScintillaCocoa::Redraw() {\r\n\twMargin.InvalidateAll();\r\n\tDiscardOverdraw();\r\n\twMain.InvalidateAll();\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * A function to directly execute code that would usually go the long way via window messages.\r\n * However this is a Windows metaphor and not used here, hence we just call our fake\r\n * window proc. The given parameters directly reflect the message parameters used on Windows.\r\n *\r\n * @param ptr The target which is to be called.\r\n * @param iMessage A code that indicates which message was sent.\r\n * @param wParam One of the two free parameters for the message. Traditionally a word sized parameter\r\n *               (hence the w prefix).\r\n * @param lParam The other of the two free parameters. A signed long.\r\n */\r\nsptr_t ScintillaCocoa::DirectFunction(sptr_t ptr, unsigned int iMessage, uptr_t wParam,\r\n\t\t\t\t      sptr_t lParam) {\r\n\tScintillaCocoa *sci = reinterpret_cast<ScintillaCocoa *>(ptr);\r\n\treturn sci->WndProc(static_cast<Message>(iMessage), wParam, lParam);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * A function to directly execute code that would usually go the long way via window messages.\r\n * Similar to DirectFunction but also returns the status.\r\n * However this is a Windows metaphor and not used here, hence we just call our fake\r\n * window proc. The given parameters directly reflect the message parameters used on Windows.\r\n *\r\n * @param ptr The target which is to be called.\r\n * @param iMessage A code that indicates which message was sent.\r\n * @param wParam One of the two free parameters for the message. Traditionally a word sized parameter\r\n *               (hence the w prefix).\r\n * @param lParam The other of the two free parameters. A signed long.\r\n * @param pStatus Return the status to the caller. A pointer to an int.\r\n */\r\nsptr_t ScintillaCocoa::DirectStatusFunction(sptr_t ptr, unsigned int iMessage, uptr_t wParam,\r\n\t\t\t\t      sptr_t lParam, int *pStatus) {\r\n\tScintillaCocoa *sci = reinterpret_cast<ScintillaCocoa *>(ptr);\r\n\tconst sptr_t returnValue = sci->WndProc(static_cast<Message>(iMessage), wParam, lParam);\r\n\t*pStatus = static_cast<int>(sci->errorStatus);\r\n\treturn returnValue;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * This method is very similar to DirectFunction. On Windows it sends a message (not in the Obj-C sense)\r\n * to the target window. Here we simply call our fake window proc.\r\n */\r\nsptr_t scintilla_send_message(void *sci, unsigned int iMessage, uptr_t wParam, sptr_t lParam) {\r\n\tScintillaView *control = (__bridge ScintillaView *)(sci);\r\n\treturn [control message: iMessage wParam: wParam lParam: lParam];\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nnamespace {\r\n\r\n/**\r\n * The animated find indicator fails with a \"bogus layer size\" message on macOS 10.13\r\n * and causes drawing failures on macOS 10.12.\r\n */\r\n\r\nbool SupportAnimatedFind() {\r\n\treturn std::floor(NSAppKitVersionNumber) < NSAppKitVersionNumber10_12;\r\n}\r\n\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * That's our fake window procedure. On Windows each window has a dedicated procedure to handle\r\n * commands (also used to synchronize UI and background threads), which is not the case in Cocoa.\r\n *\r\n * Messages handled here are almost solely for special commands of the backend. Everything which\r\n * would be system messages on Windows (e.g. for key down, mouse move etc.) are handled by\r\n * directly calling appropriate handlers.\r\n */\r\nsptr_t ScintillaCocoa::WndProc(Message iMessage, uptr_t wParam, sptr_t lParam) {\r\n\ttry {\r\n\t\tswitch (iMessage) {\r\n\t\tcase Message::GetDirectFunction:\r\n\t\t\treturn reinterpret_cast<sptr_t>(DirectFunction);\r\n\r\n\t\tcase Message::GetDirectStatusFunction:\r\n\t\t\treturn reinterpret_cast<sptr_t>(DirectStatusFunction);\r\n\r\n\t\tcase Message::GetDirectPointer:\r\n\t\t\treturn reinterpret_cast<sptr_t>(this);\r\n\r\n\t\tcase Message::SetBidirectional:\r\n\t\t\tbidirectional = static_cast<Bidirectional>(wParam);\r\n\t\t\t// Invalidate all cached information including layout.\r\n\t\t\tDropGraphics();\r\n\t\t\tInvalidateStyleRedraw();\r\n\t\t\treturn 0;\r\n\r\n\t\tcase Message::TargetAsUTF8:\r\n\t\t\treturn TargetAsUTF8(CharPtrFromSPtr(lParam));\r\n\r\n\t\tcase Message::EncodedFromUTF8:\r\n\t\t\treturn EncodedFromUTF8(ConstCharPtrFromUPtr(wParam),\r\n\t\t\t\t\t       CharPtrFromSPtr(lParam));\r\n\r\n\t\tcase Message::SetIMEInteraction:\r\n\t\t\t// Only inline IME supported on Cocoa\r\n\t\t\tbreak;\r\n\r\n\t\tcase Message::GrabFocus:\r\n\t\t\t[ContentView().window makeFirstResponder: ContentView()];\r\n\t\t\tbreak;\r\n\r\n\t\tcase Message::SetBufferedDraw:\r\n\t\t\t// Buffered drawing not supported on Cocoa\r\n\t\t\tview.bufferedDraw = false;\r\n\t\t\tbreak;\r\n\r\n\t\tcase Message::FindIndicatorShow:\r\n\t\t\tif (SupportAnimatedFind()) {\r\n\t\t\t\tShowFindIndicatorForRange(NSMakeRange(wParam, lParam-wParam), YES);\r\n\t\t\t}\r\n\t\t\treturn 0;\r\n\r\n\t\tcase Message::FindIndicatorFlash:\r\n\t\t\tif (SupportAnimatedFind()) {\r\n\t\t\t\tShowFindIndicatorForRange(NSMakeRange(wParam, lParam-wParam), NO);\r\n\t\t\t}\r\n\t\t\treturn 0;\r\n\r\n\t\tcase Message::FindIndicatorHide:\r\n\t\t\tHideFindIndicator();\r\n\t\t\treturn 0;\r\n\r\n\t\tcase Message::SetPhasesDraw: {\r\n\t\t\t\tsptr_t r = ScintillaBase::WndProc(iMessage, wParam, lParam);\r\n\t\t\t\t[sciView updateIndicatorIME];\r\n\t\t\t\treturn r;\r\n\t\t\t}\r\n\r\n\t\tcase Message::GetAccessibility:\r\n\t\t\treturn static_cast<sptr_t>(Accessibility::Enabled);\r\n\r\n\t\tdefault:\r\n\t\t\tsptr_t r = ScintillaBase::WndProc(iMessage, wParam, lParam);\r\n\r\n\t\t\treturn r;\r\n\t\t}\r\n\t} catch (std::bad_alloc &) {\r\n\t\terrorStatus = Status::BadAlloc;\r\n\t} catch (...) {\r\n\t\terrorStatus = Status::Failure;\r\n\t}\r\n\treturn 0;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * In Windows lingo this is the handler which handles anything that wasn't handled in the normal\r\n * window proc which would usually send the message back to generic window proc that Windows uses.\r\n */\r\nsptr_t ScintillaCocoa::DefWndProc(Message, uptr_t, sptr_t) {\r\n\treturn 0;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Handle any ScintillaCocoa-specific ticking or call superclass.\r\n */\r\nvoid ScintillaCocoa::TickFor(TickReason reason) {\r\n\tif (reason == TickReason::platform) {\r\n\t\tDragScroll();\r\n\t} else {\r\n\t\tEditor::TickFor(reason);\r\n\t}\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Is a particular timer currently running?\r\n */\r\nbool ScintillaCocoa::FineTickerRunning(TickReason reason) {\r\n\treturn timers[static_cast<size_t>(reason)] != nil;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Start a fine-grained timer.\r\n */\r\nvoid ScintillaCocoa::FineTickerStart(TickReason reason, int millis, int tolerance) {\r\n\tFineTickerCancel(reason);\r\n\tNSTimer *fineTimer = [NSTimer timerWithTimeInterval: millis / 1000.0\r\n\t\t\t\t\t\t     target: timerTarget\r\n\t\t\t\t\t\t   selector: @selector(timerFired:)\r\n\t\t\t\t\t\t   userInfo: nil\r\n\t\t\t\t\t\t    repeats: YES];\r\n\tif (tolerance && [fineTimer respondsToSelector: @selector(setTolerance:)]) {\r\n\t\tfineTimer.tolerance = tolerance / 1000.0;\r\n\t}\r\n\ttimers[static_cast<size_t>(reason)] = fineTimer;\r\n\t[NSRunLoop.currentRunLoop addTimer: fineTimer forMode: NSDefaultRunLoopMode];\r\n\t[NSRunLoop.currentRunLoop addTimer: fineTimer forMode: NSModalPanelRunLoopMode];\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Cancel a fine-grained timer.\r\n */\r\nvoid ScintillaCocoa::FineTickerCancel(TickReason reason) {\r\n\tconst size_t reasonIndex = static_cast<size_t>(reason);\r\n\tif (timers[reasonIndex]) {\r\n\t\t[timers[reasonIndex] invalidate];\r\n\t\ttimers[reasonIndex] = nil;\r\n\t}\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nbool ScintillaCocoa::SetIdle(bool on) {\r\n\tif (idler.state != on) {\r\n\t\tidler.state = on;\r\n\t\tif (idler.state) {\r\n\t\t\t// Scintilla ticks = milliseconds\r\n\t\t\tNSTimer *idleTimer = [NSTimer scheduledTimerWithTimeInterval: timer.tickSize / 1000.0\r\n\t\t\t\t\t\t\t\t\t      target: timerTarget\r\n\t\t\t\t\t\t\t\t\t    selector: @selector(idleTimerFired:)\r\n\t\t\t\t\t\t\t\t\t    userInfo: nil\r\n\t\t\t\t\t\t\t\t\t     repeats: YES];\r\n\t\t\t[NSRunLoop.currentRunLoop addTimer: idleTimer forMode: NSModalPanelRunLoopMode];\r\n\t\t\tidler.idlerID = (__bridge IdlerID)idleTimer;\r\n\t\t} else if (idler.idlerID != NULL) {\r\n\t\t\t[(__bridge NSTimer *)(idler.idlerID) invalidate];\r\n\t\t\tidler.idlerID = 0;\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid ScintillaCocoa::CopyToClipboard(const SelectionText &selectedText) {\r\n\tSetPasteboardData([NSPasteboard generalPasteboard], selectedText);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid ScintillaCocoa::Copy() {\r\n\tif (!sel.Empty()) {\r\n\t\tSelectionText selectedText;\r\n\t\tCopySelectionRange(&selectedText);\r\n\t\tCopyToClipboard(selectedText);\r\n\t}\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nbool ScintillaCocoa::CanPaste() {\r\n\tif (!Editor::CanPaste())\r\n\t\treturn false;\r\n\r\n\treturn GetPasteboardData([NSPasteboard generalPasteboard], NULL);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid ScintillaCocoa::Paste() {\r\n\tPaste(false);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Pastes data from the paste board into the editor.\r\n */\r\nvoid ScintillaCocoa::Paste(bool forceRectangular) {\r\n\tSelectionText selectedText;\r\n\tbool ok = GetPasteboardData([NSPasteboard generalPasteboard], &selectedText);\r\n\tif (forceRectangular)\r\n\t\tselectedText.rectangular = forceRectangular;\r\n\r\n\tif (!ok || selectedText.Empty())\r\n\t\t// No data or no flavor we support.\r\n\t\treturn;\r\n\r\n\tpdoc->BeginUndoAction();\r\n\tClearSelection(false);\r\n\tInsertPasteShape(selectedText.Data(), selectedText.Length(),\r\n\t\t\t selectedText.rectangular ? PasteShape::rectangular : PasteShape::stream);\r\n\tpdoc->EndUndoAction();\r\n\r\n\tRedraw();\r\n\tEnsureCaretVisible();\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid ScintillaCocoa::CTPaint(void *gc, NSRect rc) {\r\n#pragma unused(rc)\r\n\tstd::unique_ptr<Surface> surfaceWindow(Surface::Allocate(Technology::Default));\r\n\tsurfaceWindow->Init(gc, wMain.GetID());\r\n\tsurfaceWindow->SetMode(CurrentSurfaceMode());\r\n\tct.PaintCT(surfaceWindow.get());\r\n\tsurfaceWindow->Release();\r\n}\r\n\r\n@interface CallTipView : NSControl {\r\n\tScintillaCocoa *sci;\r\n}\r\n\r\n@end\r\n\r\n@implementation CallTipView\r\n\r\n- (NSView *) initWithFrame: (NSRect) frame {\r\n\tself = [super initWithFrame: frame];\r\n\r\n\tif (self) {\r\n\t\tsci = NULL;\r\n\t}\r\n\r\n\treturn self;\r\n}\r\n\r\n\r\n- (BOOL) isFlipped {\r\n\treturn YES;\r\n}\r\n\r\n- (void) setSci: (ScintillaCocoa *) sci_ {\r\n\tsci = sci_;\r\n}\r\n\r\n- (void) drawRect: (NSRect) needsDisplayInRect {\r\n\tif (sci) {\r\n\t\tCGContextRef context = CGContextCurrent();\r\n\t\tsci->CTPaint(context, needsDisplayInRect);\r\n\t}\r\n}\r\n\r\n- (void) mouseDown: (NSEvent *) event {\r\n\tif (sci) {\r\n\t\tsci->CallTipMouseDown(event.locationInWindow);\r\n\t}\r\n}\r\n\r\n// On macOS, only the key view should modify the cursor so the calltip can't.\r\n// This view does not become key so resetCursorRects never called.\r\n- (void) resetCursorRects {\r\n\t//[super resetCursorRects];\r\n\t//[self addCursorRect: [self bounds] cursor: [NSCursor arrowCursor]];\r\n}\r\n\r\n@end\r\n\r\nvoid ScintillaCocoa::CallTipMouseDown(NSPoint pt) {\r\n\tNSRect rectBounds = ((__bridge NSView *)(ct.wDraw.GetID())).bounds;\r\n\tPoint location(pt.x, rectBounds.size.height - pt.y);\r\n\tct.MouseClick(location);\r\n\tCallTipClick();\r\n}\r\n\r\nstatic bool HeightDifferent(WindowID wCallTip, PRectangle rc) {\r\n\tNSWindow *callTip = (__bridge NSWindow *)wCallTip;\r\n\tCGFloat height = NSHeight(callTip.frame);\r\n\treturn height != rc.Height();\r\n}\r\n\r\nvoid ScintillaCocoa::CreateCallTipWindow(PRectangle rc) {\r\n\tif (ct.wCallTip.Created() && HeightDifferent(ct.wCallTip.GetID(), rc)) {\r\n\t\tct.wCallTip.Destroy();\r\n\t}\r\n\tif (!ct.wCallTip.Created()) {\r\n\t\tNSRect ctRect = NSMakeRect(rc.top, rc.bottom, rc.Width(), rc.Height());\r\n\t\tNSWindow *callTip = [[NSWindow alloc] initWithContentRect: ctRect\r\n\t\t\t\t\t\t\t\tstyleMask: NSWindowStyleMaskBorderless\r\n\t\t\t\t\t\t\t\t  backing: NSBackingStoreBuffered\r\n\t\t\t\t\t\t\t\t    defer: NO];\r\n\t\t[callTip setLevel: NSModalPanelWindowLevel+1];\r\n\t\t[callTip setHasShadow: YES];\r\n\t\tNSRect ctContent = NSMakeRect(0, 0, rc.Width(), rc.Height());\r\n\t\tCallTipView *caption = [[CallTipView alloc] initWithFrame: ctContent];\r\n\t\tcaption.autoresizingMask = NSViewWidthSizable | NSViewMaxYMargin;\r\n\t\t[caption setSci: this];\r\n\t\t[callTip.contentView addSubview: caption];\r\n\t\t[callTip orderFront: caption];\r\n\t\tct.wCallTip = (__bridge_retained WindowID)callTip;\r\n\t\tct.wDraw = (__bridge WindowID)caption;\r\n\t}\r\n}\r\n\r\nvoid ScintillaCocoa::AddToPopUp(const char *label, int cmd, bool enabled) {\r\n\tNSMenuItem *item;\r\n\tScintillaContextMenu *menu = (__bridge ScintillaContextMenu *)(popup.GetID());\r\n\t[menu setOwner: this];\r\n\t[menu setAutoenablesItems: NO];\r\n\r\n\tif (cmd == 0) {\r\n\t\titem = [NSMenuItem separatorItem];\r\n\t} else {\r\n\t\titem = [[NSMenuItem alloc] init];\r\n\t\titem.title = @(label);\r\n\t}\r\n\titem.target = menu;\r\n\titem.action = @selector(handleCommand:);\r\n\titem.tag = cmd;\r\n\titem.enabled = enabled;\r\n\r\n\t[menu addItem: item];\r\n}\r\n\r\n// -------------------------------------------------------------------------------------------------\r\n\r\nvoid ScintillaCocoa::ClaimSelection() {\r\n\t// macOS does not have a primary selection.\r\n}\r\n\r\n// -------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Returns the current caret position (which is tracked as an offset into the entire text string)\r\n * as a row:column pair. The result is zero-based.\r\n */\r\nNSPoint ScintillaCocoa::GetCaretPosition() {\r\n\tconst Sci::Line line = static_cast<Sci::Line>(\r\n\t\tpdoc->LineFromPosition(sel.RangeMain().caret.Position()));\r\n\tNSPoint result;\r\n\r\n\tresult.y = line;\r\n\tresult.x = sel.RangeMain().caret.Position() - pdoc->LineStart(line);\r\n\treturn result;\r\n}\r\n\r\n// -------------------------------------------------------------------------------------------------\r\n\r\nstd::string ScintillaCocoa::UTF8FromEncoded(std::string_view encoded) const {\r\n\tif (IsUnicodeMode()) {\r\n\t\treturn std::string(encoded);\r\n\t} else {\r\n\t\tCFStringEncoding encoding = EncodingFromCharacterSet(IsUnicodeMode(),\r\n\t\t\t\t\t    vs.styles[StyleDefault].characterSet);\r\n\t\tCFStringRef cfsVal = CFStringFromString(encoded.data(), encoded.length(), encoding);\r\n\t\tstd::string utf = EncodedBytesString(cfsVal, kCFStringEncodingUTF8);\r\n\t\tif (cfsVal)\r\n\t\t\tCFRelease(cfsVal);\r\n\t\treturn utf;\r\n\t}\r\n}\r\n\r\n// -------------------------------------------------------------------------------------------------\r\n\r\nstd::string ScintillaCocoa::EncodedFromUTF8(std::string_view utf8) const {\r\n\tif (IsUnicodeMode()) {\r\n\t\treturn std::string(utf8);\r\n\t} else {\r\n\t\tCFStringEncoding encoding = EncodingFromCharacterSet(IsUnicodeMode(),\r\n\t\t\t\t\t    vs.styles[StyleDefault].characterSet);\r\n\t\tCFStringRef cfsVal = CFStringFromString(utf8.data(), utf8.length(), kCFStringEncodingUTF8);\r\n\t\tconst std::string sEncoded = EncodedBytesString(cfsVal, encoding);\r\n\t\tif (cfsVal)\r\n\t\t\tCFRelease(cfsVal);\r\n\t\treturn sEncoded;\r\n\t}\r\n}\r\n\r\n// -------------------------------------------------------------------------------------------------\r\n\r\n#pragma mark Drag\r\n\r\n/**\r\n * Triggered by the tick timer on a regular basis to scroll the content during a drag operation.\r\n */\r\nvoid ScintillaCocoa::DragScroll() {\r\n\tif (!posDrag.IsValid()) {\r\n\t\tscrollSpeed = 1;\r\n\t\tscrollTicks = 2000;\r\n\t\treturn;\r\n\t}\r\n\r\n\t// TODO: does not work for wrapped lines, fix it.\r\n\tSci::Line line = static_cast<Sci::Line>(pdoc->LineFromPosition(posDrag.Position()));\r\n\tSci::Line currentVisibleLine = pcs->DisplayFromDoc(line);\r\n\tSci::Line lastVisibleLine = std::min(topLine + LinesOnScreen(), pcs->LinesDisplayed()) - 2;\r\n\r\n\tif (currentVisibleLine <= topLine && topLine > 0)\r\n\t\tScrollTo(topLine - scrollSpeed);\r\n\telse if (currentVisibleLine >= lastVisibleLine)\r\n\t\tScrollTo(topLine + scrollSpeed);\r\n\telse {\r\n\t\tscrollSpeed = 1;\r\n\t\tscrollTicks = 2000;\r\n\t\treturn;\r\n\t}\r\n\r\n\t// TODO: also handle horizontal scrolling.\r\n\r\n\tif (scrollSpeed == 1) {\r\n\t\tscrollTicks -= timer.tickSize;\r\n\t\tif (scrollTicks <= 0) {\r\n\t\t\tscrollSpeed = 5;\r\n\t\t\tscrollTicks = 2000;\r\n\t\t}\r\n\t}\r\n\r\n}\r\n\r\n//----------------- DragProviderSource -------------------------------------------------------\r\n\r\n@interface DragProviderSource : NSObject <NSPasteboardItemDataProvider> {\r\n\tSelectionText selectedText;\r\n}\r\n\r\n@end\r\n\r\n@implementation DragProviderSource\r\n\r\n- (id) initWithSelectedText: (const SelectionText *) other {\r\n\tself = [super init];\r\n\r\n\tif (self) {\r\n\t\tselectedText.Copy(*other);\r\n\t}\r\n\r\n\treturn self;\r\n}\r\n\r\n- (void) pasteboard: (NSPasteboard *) pasteboard item: (NSPasteboardItem *) item provideDataForType: (NSString *) type {\r\n#pragma unused(item)\r\n\tif (selectedText.Length() == 0)\r\n\t\treturn;\r\n\r\n\tif (([type compare: NSPasteboardTypeString] != NSOrderedSame) &&\r\n\t\t\t([type compare: ScintillaRecPboardType] != NSOrderedSame))\r\n\t\treturn;\r\n\r\n\tCFStringEncoding encoding = EncodingFromCharacterSet(selectedText.codePage == SC_CP_UTF8,\r\n\t\t\t\t    selectedText.characterSet);\r\n\r\n\tCFStringRef cfsVal = CFStringFromString(selectedText.Data(), selectedText.Length(), encoding);\r\n\tif (!cfsVal)\r\n\t\treturn;\r\n\r\n\tif ([type compare: NSPasteboardTypeString] == NSOrderedSame) {\r\n\t\t[pasteboard setString: (__bridge NSString *)cfsVal forType: NSPasteboardTypeString];\r\n\t} else if ([type compare: ScintillaRecPboardType] == NSOrderedSame) {\r\n\t\t// This is specific to scintilla, allows us to drag rectangular selections around the document.\r\n\t\tif (selectedText.rectangular)\r\n\t\t\t[pasteboard setString: (__bridge NSString *)cfsVal forType: ScintillaRecPboardType];\r\n\t}\r\n\r\n\tif (cfsVal)\r\n\t\tCFRelease(cfsVal);\r\n}\r\n\r\n@end\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Called when a drag operation was initiated from within Scintilla.\r\n */\r\nvoid ScintillaCocoa::StartDrag() {\r\n\tif (sel.Empty())\r\n\t\treturn;\r\n\r\n\tinDragDrop = DragDrop::dragging;\r\n\r\n\tFineTickerStart(TickReason::platform, timer.tickSize, 0);\r\n\r\n\t// Put the data to be dragged on the drag pasteboard.\r\n\tSelectionText selectedText;\r\n\tNSPasteboard *pasteboard = nil;\r\n\tif (@available(macOS 10.13, *)) {\r\n\t\tpasteboard = [NSPasteboard pasteboardWithName: NSPasteboardNameDrag];\r\n\t} else {\r\n\t\t// Use old deprecated name\r\n#pragma clang diagnostic push\r\n#pragma clang diagnostic ignored \"-Wdeprecated-declarations\"\r\n\t\tpasteboard = [NSPasteboard pasteboardWithName: NSDragPboard];\r\n#pragma clang diagnostic pop\r\n\t}\r\n\tCopySelectionRange(&selectedText);\r\n\tSetPasteboardData(pasteboard, selectedText);\r\n\r\n\t// calculate the bounds of the selection\r\n\tPRectangle client = GetTextRectangle();\r\n\tSci::Position selStart = sel.RangeMain().Start().Position();\r\n\tSci::Position selEnd = sel.RangeMain().End().Position();\r\n\tSci::Line startLine = static_cast<Sci::Line>(pdoc->LineFromPosition(selStart));\r\n\tSci::Line endLine = static_cast<Sci::Line>(pdoc->LineFromPosition(selEnd));\r\n\tPoint pt;\r\n\tSci::Position startPos;\r\n\tSci::Position endPos;\r\n\tSci::Position ep;\r\n\tPRectangle rcSel;\r\n\r\n\tif (startLine==endLine && WndProc(Message::GetWrapMode, 0, 0) != static_cast<sptr_t>(Wrap::None)) {\r\n\t\t// Komodo bug http://bugs.activestate.com/show_bug.cgi?id=87571\r\n\t\t// Scintilla bug https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3040200&group_id=2439\r\n\t\t// If the width on a wrapped-line selection is negative,\r\n\t\t// find a better bounding rectangle.\r\n\r\n\t\tPoint ptStart, ptEnd;\r\n\t\tstartPos = WndProc(Message::GetLineSelStartPosition, startLine, 0);\r\n\t\tendPos =   WndProc(Message::GetLineSelEndPosition,   startLine, 0);\r\n\t\t// step back a position if we're counting the newline\r\n\t\tep =       WndProc(Message::GetLineEndPosition,      startLine, 0);\r\n\t\tif (endPos > ep) endPos = ep;\r\n\t\tptStart = LocationFromPosition(startPos);\r\n\t\tptEnd =   LocationFromPosition(endPos);\r\n\t\tif (ptStart.y == ptEnd.y) {\r\n\t\t\t// We're just selecting part of one visible line\r\n\t\t\trcSel.left = ptStart.x;\r\n\t\t\trcSel.right = ptEnd.x < client.right ? ptEnd.x : client.right;\r\n\t\t} else {\r\n\t\t\t// Find the bounding box.\r\n\t\t\tstartPos = WndProc(Message::PositionFromLine, startLine, 0);\r\n\t\t\trcSel.left = LocationFromPosition(startPos).x;\r\n\t\t\trcSel.right = client.right;\r\n\t\t}\r\n\t\trcSel.top = ptStart.y;\r\n\t\trcSel.bottom = ptEnd.y + vs.lineHeight;\r\n\t\tif (rcSel.bottom > client.bottom) {\r\n\t\t\trcSel.bottom = client.bottom;\r\n\t\t}\r\n\t} else {\r\n\t\trcSel.top = rcSel.bottom = rcSel.right = rcSel.left = -1;\r\n\t\tfor (Sci::Line l = startLine; l <= endLine; l++) {\r\n\t\t\tstartPos = WndProc(Message::GetLineSelStartPosition, l, 0);\r\n\t\t\tendPos = WndProc(Message::GetLineSelEndPosition, l, 0);\r\n\t\t\tif (endPos == startPos) continue;\r\n\t\t\t// step back a position if we're counting the newline\r\n\t\t\tep = WndProc(Message::GetLineEndPosition, l, 0);\r\n\t\t\tif (endPos > ep) endPos = ep;\r\n\t\t\tpt = LocationFromPosition(startPos); // top left of line selection\r\n\t\t\tif (pt.x < rcSel.left || rcSel.left < 0) rcSel.left = pt.x;\r\n\t\t\tif (pt.y < rcSel.top || rcSel.top < 0) rcSel.top = pt.y;\r\n\t\t\tpt = LocationFromPosition(endPos); // top right of line selection\r\n\t\t\tpt.y += vs.lineHeight; // get to the bottom of the line\r\n\t\t\tif (pt.x > rcSel.right || rcSel.right < 0) {\r\n\t\t\t\tif (pt.x > client.right)\r\n\t\t\t\t\trcSel.right = client.right;\r\n\t\t\t\telse\r\n\t\t\t\t\trcSel.right = pt.x;\r\n\t\t\t}\r\n\t\t\tif (pt.y > rcSel.bottom || rcSel.bottom < 0) {\r\n\t\t\t\tif (pt.y > client.bottom)\r\n\t\t\t\t\trcSel.bottom = client.bottom;\r\n\t\t\t\telse\r\n\t\t\t\t\trcSel.bottom = pt.y;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t// must convert to global coordinates for drag regions, but also save the\r\n\t// image rectangle for further calculations and copy operations\r\n\r\n\t// Prepare drag image.\r\n\tNSRect selectionRectangle = PRectangleToNSRect(rcSel);\r\n\tif (NSIsEmptyRect(selectionRectangle))\r\n\t\treturn;\r\n\r\n\tSCIContentView *content = ContentView();\r\n\r\n\t// To get a bitmap of the text we're dragging, we just use Paint on a pixmap surface.\r\n\tSurfaceImpl si;\r\n\tsi.SetMode(CurrentSurfaceMode());\r\n\tstd::unique_ptr<SurfaceImpl> sw = si.AllocatePixMapImplementation(static_cast<int>(client.Width()), static_cast<int>(client.Height()));\r\n\r\n\tconst bool lastSelectionVisible = vs.selection.visible;\r\n\tvs.selection.visible = false;\r\n\tPRectangle imageRect = rcSel;\r\n\tpaintState = PaintState::painting;\r\n\tpaintingAllText = true;\r\n\tCGContextRef gcsw = sw->GetContext();\r\n\tCGContextTranslateCTM(gcsw, -client.left, -client.top);\r\n\tPaint(sw.get(), client);\r\n\tpaintState = PaintState::notPainting;\r\n\tvs.selection.visible = lastSelectionVisible;\r\n\r\n\tstd::unique_ptr<SurfaceImpl> pixmap = si.AllocatePixMapImplementation(static_cast<int>(imageRect.Width()),\r\n\t\t\t\t\t\t\t\t  static_cast<int>(imageRect.Height()));\r\n\tCGContextRef gc = pixmap->GetContext();\r\n\t// To make Paint() work on a bitmap, we have to flip our coordinates and translate the origin\r\n\tCGContextTranslateCTM(gc, 0, imageRect.Height());\r\n\tCGContextScaleCTM(gc, 1.0, -1.0);\r\n\r\n\tpixmap->CopyImageRectangle(sw.get(), imageRect, PRectangle(0.0f, 0.0f, imageRect.Width(), imageRect.Height()));\r\n\t// XXX TODO: overwrite any part of the image that is not part of the\r\n\t//           selection to make it transparent.  right now we just use\r\n\t//           the full rectangle which may include non-selected text.\r\n\r\n\tNSBitmapImageRep *bitmap = NULL;\r\n\tCGImageRef imagePixmap = pixmap->CreateImage();\r\n\tif (imagePixmap)\r\n\t\tbitmap = [[NSBitmapImageRep alloc] initWithCGImage: imagePixmap];\r\n\tCGImageRelease(imagePixmap);\r\n\r\n\tNSImage *image = [[NSImage alloc] initWithSize: selectionRectangle.size];\r\n\t[image addRepresentation: bitmap];\r\n\r\n\tNSImage *dragImage = [[NSImage alloc] initWithSize: selectionRectangle.size];\r\n\tdragImage.backgroundColor = [NSColor clearColor];\r\n\t[dragImage lockFocus];\r\n\t[image drawAtPoint: NSZeroPoint fromRect: NSZeroRect operation: NSCompositingOperationSourceOver fraction: 0.5];\r\n\t[dragImage unlockFocus];\r\n\r\n\tNSPoint startPoint;\r\n\tstartPoint.x = selectionRectangle.origin.x + client.left;\r\n\tstartPoint.y = selectionRectangle.origin.y + selectionRectangle.size.height + client.top;\r\n\r\n\tNSPasteboardItem *pbItem = [NSPasteboardItem new];\r\n\tDragProviderSource *dps = [[DragProviderSource alloc] initWithSelectedText: &selectedText];\r\n\r\n\tNSArray *pbTypes = selectedText.rectangular ?\r\n\t\t\t   @[NSPasteboardTypeString, ScintillaRecPboardType] :\r\n\t\t\t   @[NSPasteboardTypeString];\r\n\t[pbItem setDataProvider: dps forTypes: pbTypes];\r\n\tNSDraggingItem *dragItem = [[NSDraggingItem alloc ]initWithPasteboardWriter: pbItem];\r\n\r\n\tNSScrollView *scrollContainer = ScrollContainer();\r\n\tNSRect contentRect = scrollContainer.contentView.bounds;\r\n\tNSRect draggingRect = NSOffsetRect(selectionRectangle, contentRect.origin.x, contentRect.origin.y);\r\n\t[dragItem setDraggingFrame: draggingRect contents: dragImage];\r\n\tNSDraggingSession *dragSession =\r\n\t\t[content beginDraggingSessionWithItems: @[dragItem]\r\n\t\t\t\t\t\t event: lastMouseEvent\r\n\t\t\t\t\t\tsource: content];\r\n\tdragSession.animatesToStartingPositionsOnCancelOrFail = YES;\r\n\tdragSession.draggingFormation = NSDraggingFormationNone;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Called when a drag operation reaches the control which was initiated outside.\r\n */\r\nNSDragOperation ScintillaCocoa::DraggingEntered(id <NSDraggingInfo> info) {\r\n\tFineTickerStart(TickReason::platform, timer.tickSize, 0);\r\n\treturn DraggingUpdated(info);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Called frequently during a drag operation if we are the target. Keep telling the caller\r\n * what drag operation we accept and update the drop caret position to indicate the\r\n * potential insertion point of the dragged data.\r\n */\r\nNSDragOperation ScintillaCocoa::DraggingUpdated(id <NSDraggingInfo> info) {\r\n\t// Convert the drag location from window coordinates to view coordinates and\r\n\t// from there to a text position to finally set the drag position.\r\n\tPoint location = ConvertPoint([info draggingLocation]);\r\n\tSetDragPosition(SPositionFromLocation(location));\r\n\r\n\tNSDragOperation sourceDragMask = [info draggingSourceOperationMask];\r\n\tif (sourceDragMask == NSDragOperationNone)\r\n\t\treturn sourceDragMask;\r\n\r\n\tNSPasteboard *pasteboard = [info draggingPasteboard];\r\n\r\n\t// Return what type of operation we will perform. Prefer move over copy.\r\n\tif ([pasteboard.types containsObject: NSPasteboardTypeString] ||\r\n\t\t\t[pasteboard.types containsObject: ScintillaRecPboardType])\r\n\t\treturn (sourceDragMask & NSDragOperationMove) ? NSDragOperationMove : NSDragOperationCopy;\r\n\r\n\tif (@available(macOS 10.13, *)) {\r\n\t\tif ([pasteboard.types containsObject: NSPasteboardTypeFileURL])\r\n\t\t\treturn (sourceDragMask & NSDragOperationGeneric);\r\n\t} else {\r\n#pragma clang diagnostic push\r\n#pragma clang diagnostic ignored \"-Wdeprecated-declarations\"\r\n\t\tif ([pasteboard.types containsObject: NSFilenamesPboardType])\r\n\t\t\treturn (sourceDragMask & NSDragOperationGeneric);\r\n#pragma clang diagnostic pop\r\n\t}\r\n\treturn NSDragOperationNone;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Resets the current drag position as we are no longer the drag target.\r\n */\r\nvoid ScintillaCocoa::DraggingExited(id <NSDraggingInfo> info) {\r\n#pragma unused(info)\r\n\tSetDragPosition(SelectionPosition(Sci::invalidPosition));\r\n\tFineTickerCancel(TickReason::platform);\r\n\tinDragDrop = DragDrop::none;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Here is where the real work is done. Insert the text from the pasteboard.\r\n */\r\nbool ScintillaCocoa::PerformDragOperation(id <NSDraggingInfo> info) {\r\n\tNSPasteboard *pasteboard = [info draggingPasteboard];\r\n\r\n\tif (@available(macOS 10.13, *)) {\r\n\t\t// NSPasteboardTypeFileURL is available for macOS 10.13+, provides NSURLs\r\n\t\tif ([pasteboard.types containsObject: NSPasteboardTypeFileURL]) {\r\n\t\t\tNSArray *files = [pasteboard readObjectsForClasses:@[NSURL.class] options:nil];\r\n\t\t\tfor (NSURL *uri in files) {\r\n\t\t\t\tNotifyURIDropped([uri path].UTF8String);\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t} else {\r\n\t\t// Use deprecated NSFilenamesPboardType, provides NSStrings\r\n#pragma clang diagnostic push\r\n#pragma clang diagnostic ignored \"-Wdeprecated-declarations\"\r\n\t\tif ([pasteboard.types containsObject: NSFilenamesPboardType]) {\r\n\t\t\tNSArray *files = [pasteboard propertyListForType: NSFilenamesPboardType];\r\n\t\t\tfor (NSString *uri in files) {\r\n\t\t\t\tNotifyURIDropped(uri.UTF8String);\r\n\t\t\t}\r\n\t\t}\r\n#pragma clang diagnostic pop\r\n\t}\r\n\r\n\tSelectionText text;\r\n\tGetPasteboardData(pasteboard, &text);\r\n\r\n\tif (text.Length() > 0) {\r\n\t\tNSDragOperation operation = [info draggingSourceOperationMask];\r\n\t\tbool moving = (operation & NSDragOperationMove) != 0;\r\n\r\n\t\tDropAt(posDrag, text.Data(), text.Length(), moving, text.rectangular);\r\n\t};\r\n\r\n\treturn true;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid ScintillaCocoa::SetPasteboardData(NSPasteboard *board, const SelectionText &selectedText) {\r\n\tif (selectedText.Length() == 0)\r\n\t\treturn;\r\n\r\n\tCFStringEncoding encoding = EncodingFromCharacterSet(selectedText.codePage == SC_CP_UTF8,\r\n\t\t\t\t    selectedText.characterSet);\r\n\r\n\tCFStringRef cfsVal = CFStringFromString(selectedText.Data(), selectedText.Length(), encoding);\r\n\tif (!cfsVal)\r\n\t\treturn;\r\n\r\n\tNSArray *pbTypes = selectedText.rectangular ?\r\n\t\t\t   @[NSPasteboardTypeString, ScintillaRecPboardType] :\r\n\t\t\t   @[NSPasteboardTypeString];\r\n\t[board declareTypes: pbTypes owner: nil];\r\n\r\n\tif (selectedText.rectangular) {\r\n\t\t// This is specific to scintilla, allows us to drag rectangular selections around the document.\r\n\t\t[board setString: (__bridge NSString *)cfsVal forType: ScintillaRecPboardType];\r\n\t}\r\n\r\n\t[board setString: (__bridge NSString *)cfsVal forType: NSPasteboardTypeString];\r\n\r\n\tif (cfsVal)\r\n\t\tCFRelease(cfsVal);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Helper method to retrieve the best fitting alternative from the general pasteboard.\r\n */\r\nbool ScintillaCocoa::GetPasteboardData(NSPasteboard *board, SelectionText *selectedText) {\r\n\tNSArray *supportedTypes = @[ScintillaRecPboardType,\r\n\t\t\t\t    NSPasteboardTypeString];\r\n\tNSString *bestType = [board availableTypeFromArray: supportedTypes];\r\n\tNSString *data = [board stringForType: bestType];\r\n\r\n\tif (data != nil) {\r\n\t\tif (selectedText != nil) {\r\n\t\t\tCFStringEncoding encoding = EncodingFromCharacterSet(IsUnicodeMode(),\r\n\t\t\t\t\t\t    vs.styles[StyleDefault].characterSet);\r\n\t\t\tCFRange rangeAll = {0, static_cast<CFIndex>(data.length)};\r\n\t\t\tCFIndex usedLen = 0;\r\n\t\t\tCFStringGetBytes((CFStringRef)data, rangeAll, encoding, '?',\r\n\t\t\t\t\t false, NULL, 0, &usedLen);\r\n\r\n\t\t\tstd::vector<UInt8> buffer(usedLen);\r\n\r\n\t\t\tCFStringGetBytes((CFStringRef)data, rangeAll, encoding, '?',\r\n\t\t\t\t\t false, buffer.data(), usedLen, NULL);\r\n\r\n\t\t\tbool rectangular = bestType == ScintillaRecPboardType;\r\n\r\n\t\t\tstd::string dest(reinterpret_cast<const char *>(buffer.data()), usedLen);\r\n\r\n\t\t\tselectedText->Copy(dest, pdoc->dbcsCodePage,\r\n\t\t\t\t\t   vs.styles[StyleDefault].characterSet, rectangular, false);\r\n\t\t}\r\n\t\treturn true;\r\n\t}\r\n\r\n\treturn false;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n// Returns the target converted to UTF8.\r\n// Return the length in bytes.\r\nSci::Position ScintillaCocoa::TargetAsUTF8(char *text) const {\r\n\tconst Sci::Position targetLength = targetRange.Length();\r\n\tif (IsUnicodeMode()) {\r\n\t\tif (text)\r\n\t\t\tpdoc->GetCharRange(text, targetRange.start.Position(), targetLength);\r\n\t} else {\r\n\t\t// Need to convert\r\n\t\tconst CFStringEncoding encoding = EncodingFromCharacterSet(IsUnicodeMode(),\r\n\t\t\t\t\t\t  vs.styles[StyleDefault].characterSet);\r\n\t\tconst std::string s = RangeText(targetRange.start.Position(), targetRange.end.Position());\r\n\t\tCFStringRef cfsVal = CFStringFromString(s.c_str(), s.length(), encoding);\r\n\t\tif (!cfsVal) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\tconst std::string tmputf = EncodedBytesString(cfsVal, kCFStringEncodingUTF8);\r\n\r\n\t\tif (text)\r\n\t\t\tmemcpy(text, tmputf.c_str(), tmputf.length());\r\n\t\tCFRelease(cfsVal);\r\n\t\treturn tmputf.length();\r\n\t}\r\n\treturn targetLength;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n// Returns the text in the range converted to an NSString.\r\nNSString *ScintillaCocoa::RangeTextAsString(NSRange rangePositions) const {\r\n\tconst std::string text = RangeText(rangePositions.location,\r\n\t\t\t\t\t   NSMaxRange(rangePositions));\r\n\tif (IsUnicodeMode()) {\r\n\t\treturn @(text.c_str());\r\n\t} else {\r\n\t\t// Need to convert\r\n\t\tconst CFStringEncoding encoding = EncodingFromCharacterSet(IsUnicodeMode(),\r\n\t\t\t\t\t\t  vs.styles[StyleDefault].characterSet);\r\n\t\tCFStringRef cfsVal = CFStringFromString(text.c_str(), text.length(), encoding);\r\n\r\n\t\treturn (__bridge NSString *)cfsVal;\r\n\t}\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n// Return character range of a line.\r\nNSRange ScintillaCocoa::RangeForVisibleLine(NSInteger lineVisible) {\r\n\tconst Range posRangeLine = RangeDisplayLine(static_cast<Sci::Line>(lineVisible));\r\n\treturn CharactersFromPositions(NSMakeRange(posRangeLine.First(),\r\n\t\t\t\t       posRangeLine.Last() - posRangeLine.First()));\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n// Returns visible line number of a text position in characters.\r\nNSInteger ScintillaCocoa::VisibleLineForIndex(NSInteger index) {\r\n\tconst NSRange rangePosition = PositionsFromCharacters(NSMakeRange(index, 0));\r\n\tconst Sci::Line lineVisible = DisplayFromPosition(rangePosition.location);\r\n\treturn lineVisible;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n// Returns a rectangle that frames the range for use by the VoiceOver cursor.\r\nNSRect ScintillaCocoa::FrameForRange(NSRange rangeCharacters) {\r\n\tconst NSRange posRange = PositionsFromCharacters(rangeCharacters);\r\n\r\n\tNSUInteger rangeEnd = NSMaxRange(posRange);\r\n\tconst bool endsWithLineEnd = rangeCharacters.length &&\r\n\t\t\t\t     (pdoc->GetColumn(rangeEnd) == 0);\r\n\r\n\tPoint ptStart = LocationFromPosition(posRange.location);\r\n\tPoint ptEnd = LocationFromPosition(rangeEnd, PointEnd::endEither);\r\n\r\n\tNSRect rect = NSMakeRect(ptStart.x, ptStart.y,\r\n\t\t\t\t ptEnd.x - ptStart.x,\r\n\t\t\t\t ptEnd.y - ptStart.y);\r\n\r\n\trect.size.width += 2;\t// Shows the last character better\r\n\tif (endsWithLineEnd) {\r\n\t\t// Add a block to the right to indicate a line end is selected\r\n\t\trect.size.width += 20;\r\n\t}\r\n\r\n\trect.size.height += vs.lineHeight;\r\n\r\n\t// Adjust for margin and scroll\r\n\trect.origin.x = rect.origin.x - vs.textStart + vs.fixedColumnWidth;\r\n\r\n\treturn rect;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n// Returns a rectangle that frames the range for use by the VoiceOver cursor.\r\nNSRect ScintillaCocoa::GetBounds() const {\r\n\treturn PRectangleToNSRect(GetClientRectangle());\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n// Translates a UTF8 string into the document encoding.\r\n// Return the length of the result in bytes.\r\nSci::Position ScintillaCocoa::EncodedFromUTF8(const char *utf8, char *encoded) const {\r\n\tconst size_t inputLength = (lengthForEncode >= 0) ? lengthForEncode : strlen(utf8);\r\n\tif (IsUnicodeMode()) {\r\n\t\tif (encoded)\r\n\t\t\tmemcpy(encoded, utf8, inputLength);\r\n\t\treturn inputLength;\r\n\t} else {\r\n\t\t// Need to convert\r\n\t\tconst CFStringEncoding encoding = EncodingFromCharacterSet(IsUnicodeMode(),\r\n\t\t\t\t\t\t  vs.styles[StyleDefault].characterSet);\r\n\r\n\t\tCFStringRef cfsVal = CFStringFromString(utf8, inputLength, kCFStringEncodingUTF8);\r\n\t\tconst std::string sEncoded = EncodedBytesString(cfsVal, encoding);\r\n\t\tif (encoded)\r\n\t\t\tmemcpy(encoded, sEncoded.c_str(), sEncoded.length());\r\n\t\tCFRelease(cfsVal);\r\n\t\treturn sEncoded.length();\r\n\t}\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid ScintillaCocoa::SetMouseCapture(bool on) {\r\n\tcapturedMouse = on;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nbool ScintillaCocoa::HaveMouseCapture() {\r\n\treturn capturedMouse;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Synchronously paint a rectangle of the window.\r\n */\r\nbool ScintillaCocoa::SyncPaint(void *gc, PRectangle rc) {\r\n\tpaintState = PaintState::painting;\r\n\trcPaint = rc;\r\n\tPRectangle rcText = GetTextRectangle();\r\n\tpaintingAllText = rcPaint.Contains(rcText);\r\n\tstd::unique_ptr<Surface> sw(Surface::Allocate(Technology::Default));\r\n\tCGContextSetAllowsAntialiasing((CGContextRef)gc,\r\n\t\t\t\t       vs.extraFontFlag != FontQuality::QualityNonAntialiased);\r\n\tCGContextSetAllowsFontSmoothing((CGContextRef)gc,\r\n\t\t\t\t\tvs.extraFontFlag == FontQuality::QualityLcdOptimized);\r\n\tCGContextSetAllowsFontSubpixelPositioning((CGContextRef)gc,\r\n\t\t\tvs.extraFontFlag == FontQuality::QualityDefault ||\r\n\t\t\tvs.extraFontFlag == FontQuality::QualityLcdOptimized);\r\n\tsw->Init(gc, wMain.GetID());\r\n\tPaint(sw.get(), rc);\r\n\tconst bool succeeded = paintState != PaintState::abandoned;\r\n\tsw->Release();\r\n\tpaintState = PaintState::notPainting;\r\n\tif (!succeeded) {\r\n\t\tNSView *marginView = (__bridge NSView *)(wMargin.GetID());\r\n\t\t[marginView setNeedsDisplay: YES];\r\n\t}\r\n\treturn succeeded;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Paint the margin into the SCIMarginView space.\r\n */\r\nvoid ScintillaCocoa::PaintMargin(NSRect aRect) {\r\n\tCGContextRef gc = CGContextCurrent();\r\n\r\n\tPRectangle rc = NSRectToPRectangle(aRect);\r\n\trcPaint = rc;\r\n\tstd::unique_ptr<Surface> sw(Surface::Allocate(Technology::Default));\r\n\tif (sw) {\r\n\t\tCGContextSetAllowsAntialiasing(gc,\r\n\t\t\t\t\t       vs.extraFontFlag != FontQuality::QualityNonAntialiased);\r\n\t\tCGContextSetAllowsFontSmoothing(gc,\r\n\t\t\t\t\t\tvs.extraFontFlag == FontQuality::QualityLcdOptimized);\r\n\t\tCGContextSetAllowsFontSubpixelPositioning(gc,\r\n\t\t\t\tvs.extraFontFlag == FontQuality::QualityDefault ||\r\n\t\t\t\tvs.extraFontFlag == FontQuality::QualityLcdOptimized);\r\n\t\tsw->Init(gc, wMargin.GetID());\r\n\t\tPaintSelMargin(sw.get(), rc);\r\n\t\tsw->Release();\r\n\t}\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Prepare for drawing.\r\n *\r\n * @param rect The area that will be drawn, given in the sender's coordinate system.\r\n */\r\nvoid ScintillaCocoa::WillDraw(NSRect rect) {\r\n\tRefreshStyleData();\r\n\tPRectangle rcWillDraw = NSRectToPRectangle(rect);\r\n\tconst Sci::Position posAfterArea = PositionAfterArea(rcWillDraw);\r\n\tconst Sci::Position posAfterMax = PositionAfterMaxStyling(posAfterArea, true);\r\n\tpdoc->StyleToAdjustingLineDuration(posAfterMax);\r\n\tStartIdleStyling(posAfterMax < posAfterArea);\r\n\tNotifyUpdateUI();\r\n\tif (WrapLines(WrapScope::wsVisible)) {\r\n\t\t// Wrap may have reduced number of lines so more lines may need to be styled\r\n\t\tconst Sci::Position posAfterAreaWrapped = PositionAfterArea(rcWillDraw);\r\n\t\tpdoc->EnsureStyledTo(posAfterAreaWrapped);\r\n\t\t// The wrapping process has changed the height of some lines so redraw all.\r\n\t\tRedraw();\r\n\t}\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * ScrollText is empty because scrolling is handled by the NSScrollView.\r\n */\r\nvoid ScintillaCocoa::ScrollText(Sci::Line) {\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Modifies the vertical scroll position to make the current top line show up as such.\r\n */\r\nvoid ScintillaCocoa::SetVerticalScrollPos() {\r\n\tNSScrollView *scrollView = ScrollContainer();\r\n\tif (scrollView) {\r\n\t\tNSClipView *clipView = scrollView.contentView;\r\n\t\tNSRect contentRect = clipView.bounds;\r\n\t\t[clipView scrollToPoint: NSMakePoint(contentRect.origin.x, topLine * vs.lineHeight)];\r\n\t\t[scrollView reflectScrolledClipView: clipView];\r\n\t}\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Modifies the horizontal scroll position to match xOffset.\r\n */\r\nvoid ScintillaCocoa::SetHorizontalScrollPos() {\r\n\tPRectangle textRect = GetTextRectangle();\r\n\r\n\tint maxXOffset = scrollWidth - static_cast<int>(textRect.Width());\r\n\tif (maxXOffset < 0)\r\n\t\tmaxXOffset = 0;\r\n\tif (xOffset > maxXOffset)\r\n\t\txOffset = maxXOffset;\r\n\tNSScrollView *scrollView = ScrollContainer();\r\n\tif (scrollView) {\r\n\t\tNSClipView *clipView = scrollView.contentView;\r\n\t\tNSRect contentRect = clipView.bounds;\r\n\t\t[clipView scrollToPoint: NSMakePoint(xOffset, contentRect.origin.y)];\r\n\t\t[scrollView reflectScrolledClipView: clipView];\r\n\t}\r\n\tMoveFindIndicatorWithBounce(NO);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Used to adjust both scrollers to reflect the current scroll range and position in the editor.\r\n * Arguments no longer used as NSScrollView handles details of scroll bar sizes.\r\n *\r\n * @param nMax Number of lines in the editor.\r\n * @param nPage Number of lines per scroll page.\r\n * @return True if there was a change, otherwise false.\r\n */\r\nbool ScintillaCocoa::ModifyScrollBars(Sci::Line nMax, Sci::Line nPage) {\r\n#pragma unused(nMax, nPage)\r\n\treturn SetScrollingSize();\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Adjust both scrollers to reflect the current scroll ranges and position in the editor.\r\n * Called when size changes or when scroll ranges change.\r\n */\r\n\r\nbool ScintillaCocoa::SetScrollingSize() {\r\n\tbool changes = false;\r\n\tSCIContentView *inner = ContentView();\r\n\tif (!enteredSetScrollingSize) {\r\n\t\tenteredSetScrollingSize = true;\r\n\t\tNSScrollView *scrollView = ScrollContainer();\r\n\t\tconst NSRect clipRect = scrollView.contentView.bounds;\r\n\t\tCGFloat docHeight = pcs->LinesDisplayed() * vs.lineHeight;\r\n\t\tif (!endAtLastLine)\r\n\t\t\tdocHeight += (int(scrollView.bounds.size.height / vs.lineHeight)-3) * vs.lineHeight;\r\n\t\t// Allow extra space so that last scroll position places whole line at top\r\n\t\tconst int clipExtra = int(clipRect.size.height) % vs.lineHeight;\r\n\t\tdocHeight += clipExtra;\r\n\t\t// Ensure all of clipRect covered by Scintilla drawing\r\n\t\tif (docHeight < clipRect.size.height)\r\n\t\t\tdocHeight = clipRect.size.height;\r\n\t\tconst bool showHorizontalScroll = horizontalScrollBarVisible &&\r\n\t\t\t\t\t    !Wrapping();\r\n\t\tconst CGFloat docWidth = Wrapping() ? clipRect.size.width : scrollWidth;\r\n\t\tconst NSRect contentRect = NSMakeRect(0, 0, docWidth, docHeight);\r\n\t\tchanges = !CGSizeEqualToSize(contentRect.size, inner.frame.size);\r\n\t\tif (changes) {\r\n\t\t\tinner.frame = contentRect;\r\n\t\t}\r\n\t\tscrollView.hasVerticalScroller = verticalScrollBarVisible;\r\n\t\tscrollView.hasHorizontalScroller = showHorizontalScroll;\r\n\t\tSetVerticalScrollPos();\r\n\t\tenteredSetScrollingSize = false;\r\n\t}\r\n\t[sciView setMarginWidth: vs.fixedColumnWidth];\r\n\treturn changes;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid ScintillaCocoa::Resize() {\r\n\tSetScrollingSize();\r\n\r\n\tconst PRectangle rcClient = GetClientRectangle();\r\n\tsizeClient = Point(rcClient.Width(), rcClient.Height());\r\n\r\n\tChangeSize();\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Update fields to match scroll position after receiving a notification that the user has scrolled.\r\n */\r\nvoid ScintillaCocoa::UpdateForScroll() {\r\n\tPoint ptOrigin = GetVisibleOriginInMain();\r\n\txOffset = static_cast<int>(ptOrigin.x);\r\n\tSci::Line newTop = std::min(static_cast<Sci::Line>(ptOrigin.y / vs.lineHeight), MaxScrollPos());\r\n\tSetTopLine(newTop);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Register a delegate that will be called for notifications and commands.\r\n * This provides similar functionality to RegisterNotifyCallback but in an\r\n * Objective C way.\r\n *\r\n * @param delegate_ A pointer to an object that implements ScintillaNotificationProtocol.\r\n */\r\n\r\nvoid ScintillaCocoa::SetDelegate(id<ScintillaNotificationProtocol> delegate_) {\r\n\tdelegate = delegate_;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Used to register a callback function for a given window. This is used to emulate the way\r\n * Windows notifies other controls (mainly up in the view hierarchy) about certain events.\r\n *\r\n * @param windowid A handle to a window. That value is generic and can be anything. It is passed\r\n *                 through to the callback.\r\n * @param callback The callback function to be used for future notifications. If NULL then no\r\n *                 notifications will be sent anymore.\r\n */\r\nvoid ScintillaCocoa::RegisterNotifyCallback(intptr_t windowid, SciNotifyFunc callback) {\r\n\tnotifyObj = windowid;\r\n\tnotifyProc = callback;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid ScintillaCocoa::NotifyChange() {\r\n\tif (notifyProc != NULL)\r\n\t\tnotifyProc(notifyObj, WM_COMMAND, Platform::LongFromTwoShorts(static_cast<short>(GetCtrlID()), static_cast<short>(FocusChange::Change)),\r\n\t\t\t   (uintptr_t) this);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid ScintillaCocoa::NotifyFocus(bool focus) {\r\n\tif (commandEvents && notifyProc)\r\n\t\tnotifyProc(notifyObj, WM_COMMAND, Platform::LongFromTwoShorts(static_cast<short>(GetCtrlID()),\r\n\t\t\t\tstatic_cast<short>((focus ? FocusChange::Setfocus : FocusChange::Killfocus))),\r\n\t\t\t   (uintptr_t) this);\r\n\r\n\tEditor::NotifyFocus(focus);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Used to send a notification (as WM_NOTIFY call) to the procedure, which has been set by the call\r\n * to RegisterNotifyCallback (so it is not necessarily the parent window).\r\n *\r\n * @param scn The notification to send.\r\n */\r\nvoid ScintillaCocoa::NotifyParent(NotificationData scn) {\r\n\tscn.nmhdr.hwndFrom = (void *) this;\r\n\tscn.nmhdr.idFrom = GetCtrlID();\r\n\tif (notifyProc != NULL)\r\n\t\tnotifyProc(notifyObj, WM_NOTIFY, GetCtrlID(), (uintptr_t) &scn);\r\n\tif (delegate)\r\n\t\t[delegate notification: reinterpret_cast<SCNotification *>(&scn)];\r\n\tif (scn.nmhdr.code == Notification::UpdateUI) {\r\n\t\tNSView *content = ContentView();\r\n\t\tif (FlagSet(scn.updated, Update::Content)) {\r\n\t\t\tNSAccessibilityPostNotification(content, NSAccessibilityValueChangedNotification);\r\n\t\t}\r\n\t\tif (FlagSet(scn.updated, Update::Selection)) {\r\n\t\t\tNSAccessibilityPostNotification(content, NSAccessibilitySelectedTextChangedNotification);\r\n\t\t}\r\n\t}\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid ScintillaCocoa::NotifyURIDropped(const char *uri) {\r\n\tNotificationData scn;\r\n\tscn.nmhdr.code = Notification::URIDropped;\r\n\tscn.text = uri;\r\n\r\n\tNotifyParent(scn);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nbool ScintillaCocoa::HasSelection() {\r\n\treturn !sel.Empty();\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nbool ScintillaCocoa::CanUndo() {\r\n\treturn pdoc->CanUndo();\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nbool ScintillaCocoa::CanRedo() {\r\n\treturn pdoc->CanRedo();\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid ScintillaCocoa::TimerFired(NSTimer *timer) {\r\n\tfor (size_t tr=static_cast<size_t>(TickReason::caret); tr<=static_cast<size_t>(TickReason::platform); tr++) {\r\n\t\tif (timers[tr] == timer) {\r\n\t\t\tTickFor(static_cast<TickReason>(tr));\r\n\t\t}\r\n\t}\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid ScintillaCocoa::IdleTimerFired() {\r\n\tbool more = Idle();\r\n\tif (!more)\r\n\t\tSetIdle(false);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Main entry point for drawing the control.\r\n *\r\n * @param rect The area to paint, given in the sender's coordinate system.\r\n * @param gc The context we can use to paint.\r\n */\r\nbool ScintillaCocoa::Draw(NSRect rect, CGContextRef gc) {\r\n\treturn SyncPaint(gc, NSRectToPRectangle(rect));\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Helper function to translate macOS key codes to Scintilla key codes.\r\n */\r\nstatic inline Keys KeyTranslate(UniChar unicodeChar, NSEventModifierFlags modifierFlags) {\r\n\tswitch (unicodeChar) {\r\n\tcase NSDownArrowFunctionKey:\r\n\t\treturn Keys::Down;\r\n\tcase NSUpArrowFunctionKey:\r\n\t\treturn Keys::Up;\r\n\tcase NSLeftArrowFunctionKey:\r\n\t\treturn Keys::Left;\r\n\tcase NSRightArrowFunctionKey:\r\n\t\treturn Keys::Right;\r\n\tcase NSHomeFunctionKey:\r\n\t\treturn Keys::Home;\r\n\tcase NSEndFunctionKey:\r\n\t\treturn Keys::End;\r\n\tcase NSPageUpFunctionKey:\r\n\t\treturn Keys::Prior;\r\n\tcase NSPageDownFunctionKey:\r\n\t\treturn Keys::Next;\r\n\tcase NSDeleteFunctionKey:\r\n\t\treturn Keys::Delete;\r\n\tcase NSInsertFunctionKey:\r\n\t\treturn Keys::Insert;\r\n\tcase '\\n':\r\n\tcase 3:\r\n\t\treturn Keys::Return;\r\n\tcase 27:\r\n\t\treturn Keys::Escape;\r\n\tcase '+':\r\n\t\tif (modifierFlags & NSEventModifierFlagNumericPad)\r\n\t\t\treturn Keys::Add;\r\n\t\telse\r\n\t\t\treturn static_cast<Keys>(unicodeChar);\r\n\tcase '-':\r\n\t\tif (modifierFlags & NSEventModifierFlagNumericPad)\r\n\t\t\treturn Keys::Subtract;\r\n\t\telse\r\n\t\t\treturn static_cast<Keys>(unicodeChar);\r\n\tcase '/':\r\n\t\tif (modifierFlags & NSEventModifierFlagNumericPad)\r\n\t\t\treturn Keys::Divide;\r\n\t\telse\r\n\t\t\treturn static_cast<Keys>(unicodeChar);\r\n\tcase 127:\r\n\t\treturn Keys::Back;\r\n\tcase '\\t':\r\n\tcase 25: // Shift tab, return to unmodified tab and handle that via modifiers.\r\n\t\treturn Keys::Tab;\r\n\tdefault:\r\n\t\treturn static_cast<Keys>(unicodeChar);\r\n\t}\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Translate NSEvent modifier flags into SCI_* modifier flags.\r\n *\r\n * @param modifiers An integer bit set of NSSEvent modifier flags.\r\n * @return A set of SCI_* modifier flags.\r\n */\r\nstatic KeyMod TranslateModifierFlags(NSUInteger modifiers) {\r\n\t// Signal Control as SCI_META\r\n\treturn\r\n\t\t(((modifiers & NSEventModifierFlagShift) != 0) ? KeyMod::Shift : KeyMod::Norm) |\r\n\t\t(((modifiers & NSEventModifierFlagCommand) != 0) ? KeyMod::Ctrl : KeyMod::Norm) |\r\n\t\t(((modifiers & NSEventModifierFlagOption) != 0) ? KeyMod::Alt : KeyMod::Norm) |\r\n\t\t(((modifiers & NSEventModifierFlagControl) != 0) ? KeyMod::Meta : KeyMod::Norm);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Main keyboard input handling method. It is called for any key down event, including function keys,\r\n * numeric keypad input and whatnot.\r\n *\r\n * @param event The event instance associated with the key down event.\r\n * @return True if the input was handled, false otherwise.\r\n */\r\nbool ScintillaCocoa::KeyboardInput(NSEvent *event) {\r\n\t// For now filter out function keys.\r\n\tNSString *input = event.charactersIgnoringModifiers;\r\n\r\n\tbool handled = false;\r\n\r\n\t// Handle each entry individually. Usually we only have one entry anyway.\r\n\tfor (size_t i = 0; i < input.length; i++) {\r\n\t\tconst UniChar originalKey = [input characterAtIndex: i];\r\n\t\t// Some Unicode extended Latin characters overlap the Keys enumeration so treat them\r\n\t\t// only as and not as command keys.\r\n\t\tif (originalKey >= static_cast<UniChar>(Keys::Down) && originalKey <= static_cast<UniChar>(Keys::Menu))\r\n\t\t\tcontinue;\r\n\t\tNSEventModifierFlags modifierFlags = event.modifierFlags;\r\n\r\n\t\tKeys key = KeyTranslate(originalKey, modifierFlags);\r\n\r\n\t\tbool consumed = false; // Consumed as command?\r\n\r\n\t\tif (KeyDownWithModifiers(key, TranslateModifierFlags(modifierFlags), &consumed))\r\n\t\t\thandled = true;\r\n\t\tif (consumed)\r\n\t\t\thandled = true;\r\n\t}\r\n\r\n\treturn handled;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Used to insert already processed text provided by the Cocoa text input system.\r\n */\r\nptrdiff_t ScintillaCocoa::InsertText(NSString *input, CharacterSource charSource) {\r\n\tif ([input length] == 0) {\r\n\t\treturn 0;\r\n\t}\r\n\r\n\t// There may be multiple characters in input so loop over them\r\n\tif (IsUnicodeMode()) {\r\n\t\t// There may be non-BMP characters as 2 elements in NSString so\r\n\t\t// convert to UTF-8 and use UTF8BytesOfLead.\r\n\t\tstd::string encoded = EncodedBytesString((__bridge CFStringRef)input,\r\n\t\t\t\t\t\t\t kCFStringEncodingUTF8);\r\n\t\tstd::string_view sv = encoded;\r\n\t\twhile (sv.length()) {\r\n\t\t\tconst unsigned char leadByte = sv[0];\r\n\t\t\tconst unsigned int bytesInCharacter = UTF8BytesOfLead[leadByte];\r\n\t\t\tInsertCharacter(sv.substr(0, bytesInCharacter), charSource);\r\n\t\t\tsv.remove_prefix(bytesInCharacter);\r\n\t\t}\r\n\t\treturn encoded.length();\r\n\t} else {\r\n\t\tconst CFStringEncoding encoding = EncodingFromCharacterSet(IsUnicodeMode(),\r\n\t\t\t\t\t\t\t\t\t   vs.styles[StyleDefault].characterSet);\r\n\t\tptrdiff_t lengthInserted = 0;\r\n\t\tfor (NSInteger i = 0; i < [input length]; i++) {\r\n\t\t\tNSString *character = [input substringWithRange:NSMakeRange(i, 1)];\r\n\t\t\tstd::string encoded = EncodedBytesString((__bridge CFStringRef)character,\r\n\t\t\t\t\t\t\t\t encoding);\r\n\t\t\tlengthInserted += encoded.length();\r\n\t\t\tInsertCharacter(encoded, charSource);\r\n\t\t}\r\n\r\n\t\treturn lengthInserted;\r\n\t}\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Convert from a range of characters to a range of bytes.\r\n */\r\nNSRange ScintillaCocoa::PositionsFromCharacters(NSRange rangeCharacters) const {\r\n\tSci::Position start = pdoc->GetRelativePositionUTF16(0, rangeCharacters.location);\r\n\tif (start == Sci::invalidPosition)\r\n\t\tstart = pdoc->Length();\r\n\tSci::Position end = pdoc->GetRelativePositionUTF16(start, rangeCharacters.length);\r\n\tif (end == Sci::invalidPosition)\r\n\t\tend = pdoc->Length();\r\n\treturn NSMakeRange(start, end - start);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Convert from a range of characters from a range of bytes.\r\n */\r\nNSRange ScintillaCocoa::CharactersFromPositions(NSRange rangePositions) const {\r\n\tconst Sci::Position start = pdoc->CountUTF16(0, rangePositions.location);\r\n\tconst Sci::Position len = pdoc->CountUTF16(rangePositions.location,\r\n\t\t\t\t\t  NSMaxRange(rangePositions));\r\n\treturn NSMakeRange(start, len);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Used to ensure that only one selection is active for input composition as composition\r\n * does not support multi-typing.\r\n */\r\nvoid ScintillaCocoa::SelectOnlyMainSelection() {\r\n\tsel.SetSelection(sel.RangeMain());\r\n\tRedraw();\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Convert virtual space before selection into real space.\r\n */\r\nvoid ScintillaCocoa::ConvertSelectionVirtualSpace() {\r\n\tClearBeforeTentativeStart();\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Erase all selected text and return whether the selection is now empty.\r\n * The selection may not be empty if the selection contained protected text.\r\n */\r\nbool ScintillaCocoa::ClearAllSelections() {\r\n\tClearSelection(true);\r\n\treturn sel.Empty();\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Start composing for IME.\r\n */\r\nvoid ScintillaCocoa::CompositionStart() {\r\n\tif (!sel.Empty()) {\r\n\t\tNSLog(@\"Selection not empty when starting composition\");\r\n\t}\r\n\tpdoc->TentativeStart();\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Commit the IME text.\r\n */\r\nvoid ScintillaCocoa::CompositionCommit() {\r\n\tpdoc->TentativeCommit();\r\n\tpdoc->DecorationSetCurrentIndicator(static_cast<int>(IndicatorNumbers::Ime));\r\n\tpdoc->DecorationFillRange(0, 0, pdoc->Length());\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Remove the IME text.\r\n */\r\nvoid ScintillaCocoa::CompositionUndo() {\r\n\tpdoc->TentativeUndo();\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n/**\r\n * When switching documents discard any incomplete character composition state as otherwise tries to\r\n * act on the new document.\r\n */\r\nvoid ScintillaCocoa::SetDocPointer(Document *document) {\r\n\t// Drop input composition.\r\n\tNSTextInputContext *inctxt = [NSTextInputContext currentInputContext];\r\n\t[inctxt discardMarkedText];\r\n\tSCIContentView *inner = ContentView();\r\n\t[inner unmarkText];\r\n\tEditor::SetDocPointer(document);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Convert NSEvent timestamp NSTimeInterval into unsigned int milliseconds wanted by Editor methods.\r\n */\r\n\r\nnamespace {\r\n\r\nunsigned int TimeOfEvent(NSEvent *event) {\r\n\treturn static_cast<unsigned int>(event.timestamp * 1000);\r\n}\r\n\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Called by the owning view when the mouse pointer enters the control.\r\n */\r\nvoid ScintillaCocoa::MouseEntered(NSEvent *event) {\r\n\tif (!HaveMouseCapture()) {\r\n\t\tWndProc(Message::SetCursor, (long int)CursorShape::Normal, 0);\r\n\r\n\t\t// Mouse location is given in screen coordinates and might also be outside of our bounds.\r\n\t\tPoint location = ConvertPoint(event.locationInWindow);\r\n\t\tButtonMoveWithModifiers(location,\r\n\t\t\t\t\tTimeOfEvent(event),\r\n\t\t\t\t\tTranslateModifierFlags(event.modifierFlags));\r\n\t}\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid ScintillaCocoa::MouseExited(NSEvent * /* event */) {\r\n\t// Nothing to do here.\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid ScintillaCocoa::MouseDown(NSEvent *event) {\r\n\tPoint location = ConvertPoint(event.locationInWindow);\r\n\tButtonDownWithModifiers(location,\r\n\t\t\t\tTimeOfEvent(event),\r\n\t\t\t\tTranslateModifierFlags(event.modifierFlags));\r\n}\r\n\r\nvoid ScintillaCocoa::RightMouseDown(NSEvent *event) {\r\n\tPoint location = ConvertPoint(event.locationInWindow);\r\n\tRightButtonDownWithModifiers(location,\r\n\t\t\t\t     TimeOfEvent(event),\r\n\t\t\t\t     TranslateModifierFlags(event.modifierFlags));\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid ScintillaCocoa::MouseMove(NSEvent *event) {\r\n\tlastMouseEvent = event;\r\n\r\n\tButtonMoveWithModifiers(ConvertPoint(event.locationInWindow),\r\n\t\t\t\tTimeOfEvent(event),\r\n\t\t\t\tTranslateModifierFlags(event.modifierFlags));\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid ScintillaCocoa::MouseUp(NSEvent *event) {\r\n\tButtonUpWithModifiers(ConvertPoint(event.locationInWindow),\r\n\t\t TimeOfEvent(event),\r\n\t\t TranslateModifierFlags(event.modifierFlags));\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid ScintillaCocoa::MouseWheel(NSEvent *event) {\r\n\tbool command = (event.modifierFlags & NSEventModifierFlagCommand) != 0;\r\n\tint dY = 0;\r\n\r\n\t// In order to make scrolling with larger offset smoother we scroll less lines the larger the\r\n\t// delta value is.\r\n\tif (event.deltaY < 0)\r\n\t\tdY = -static_cast<int>(sqrt(-10.0 * event.deltaY));\r\n\telse\r\n\t\tdY = static_cast<int>(sqrt(10.0 * event.deltaY));\r\n\r\n\tif (command) {\r\n\t\t// Zoom! We play with the font sizes in the styles.\r\n\t\t// Number of steps/line is ignored, we just care if sizing up or down.\r\n\t\tif (dY > 0.5)\r\n\t\t\tKeyCommand(Message::ZoomIn);\r\n\t\telse if (dY < -0.5)\r\n\t\t\tKeyCommand(Message::ZoomOut);\r\n\t} else {\r\n\t}\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n// Helper methods for NSResponder actions.\r\n\r\nvoid ScintillaCocoa::SelectAll() {\r\n\tEditor::SelectAll();\r\n}\r\n\r\nvoid ScintillaCocoa::DeleteBackward() {\r\n\tKeyDownWithModifiers(Keys::Back, KeyMod::Norm, nil);\r\n}\r\n\r\nvoid ScintillaCocoa::Cut() {\r\n\tEditor::Cut();\r\n}\r\n\r\nvoid ScintillaCocoa::Undo() {\r\n\tEditor::Undo();\r\n}\r\n\r\nvoid ScintillaCocoa::Redo() {\r\n\tEditor::Redo();\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nbool ScintillaCocoa::ShouldDisplayPopupOnMargin() {\r\n\treturn displayPopupMenu == PopUp::All;\r\n}\r\n\r\nbool ScintillaCocoa::ShouldDisplayPopupOnText() {\r\n\treturn displayPopupMenu == PopUp::All || displayPopupMenu == PopUp::Text;\r\n}\r\n\r\n/**\r\n * Creates and returns a popup menu, which is then displayed by the Cocoa framework.\r\n */\r\nNSMenu *ScintillaCocoa::CreateContextMenu(NSEvent * /* event */) {\r\n\t// Call ScintillaBase to create the context menu.\r\n\tContextMenu(Point(0, 0));\r\n\r\n\treturn (__bridge NSMenu *)(popup.GetID());\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * An intermediate function to forward context menu commands from the menu action handler to\r\n * scintilla.\r\n */\r\nvoid ScintillaCocoa::HandleCommand(NSInteger command) {\r\n\tCommand(static_cast<int>(command));\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Update 'isFirstResponder' and possibly change focus state.\r\n */\r\nvoid ScintillaCocoa::SetFirstResponder(bool isFirstResponder_) {\r\n\tisFirstResponder = isFirstResponder_;\r\n\tSetFocusActiveState();\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Update 'isActive' and possibly change focus state.\r\n */\r\nvoid ScintillaCocoa::ActiveStateChanged(bool isActive_) {\r\n\tisActive = isActive_;\r\n\tSetFocusActiveState();\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Update 'hasFocus' based on first responder and active status.\r\n */\r\nvoid ScintillaCocoa::SetFocusActiveState() {\r\n\tSetFocusState(isActive && isFirstResponder);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nnamespace {\r\n\r\n/**\r\n * Convert from an NSColor into a ColourRGBA\r\n */\r\nColourRGBA ColourFromNSColor(NSColor *value) {\r\n\treturn ColourRGBA(static_cast<unsigned int>(value.redComponent * componentMaximum),\r\n\t\t\t   static_cast<unsigned int>(value.greenComponent * componentMaximum),\r\n\t\t\t   static_cast<unsigned int>(value.blueComponent * componentMaximum),\r\n\t\t\t   static_cast<unsigned int>(value.alphaComponent * componentMaximum));\r\n}\r\n\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Update ViewStyle::elementBaseColours to match system preferences.\r\n */\r\nvoid ScintillaCocoa::UpdateBaseElements() {\r\n\tNSView *content = ContentView();\r\n\tNSAppearance *saved = [NSAppearance currentAppearance];\r\n\t[NSAppearance setCurrentAppearance:content.effectiveAppearance];\r\n\r\n\tbool changed = false;\r\n\tif (@available(macOS 10.14, *)) {\r\n\t\tNSColorSpace *colorSpace = [NSColorSpace genericRGBColorSpace];\r\n\t\tNSColor *textBack = [NSColor.textBackgroundColor colorUsingColorSpace: colorSpace];\r\n\t\tNSColor *noFocusBack = [NSColor.unemphasizedSelectedTextBackgroundColor colorUsingColorSpace: colorSpace];\r\n\t\tif (vs.selection.layer == Layer::Base) {\r\n\t\t\tNSColor *selBack = [NSColor.selectedTextBackgroundColor colorUsingColorSpace: colorSpace];\r\n\t\t\t// Additional selection: blend with text background to make weaker version.\r\n\t\t\tNSColor *modified = [selBack blendedColorWithFraction:0.5 ofColor:textBack];\r\n\t\t\tchanged = vs.SetElementBase(Element::SelectionBack, ColourFromNSColor(selBack));\r\n\t\t\tchanged = vs.SetElementBase(Element::SelectionAdditionalBack, ColourFromNSColor(modified)) || changed;\r\n\t\t\tchanged = vs.SetElementBase(Element::SelectionInactiveBack, ColourFromNSColor(noFocusBack)) || changed;\r\n\t\t} else {\r\n\t\t\t// Less translucent colour used in dark mode as otherwise less visible\r\n\t\t\tconst int alpha = textBack.brightnessComponent > 0.5 ? 0x40 : 0x60;\r\n\t\t\t// Make a translucent colour that approximates selectedTextBackgroundColor\r\n\t\t\tNSColor *accent = [NSColor.controlAccentColor colorUsingColorSpace: colorSpace];\r\n\t\t\tconst ColourRGBA colourAccent = ColourFromNSColor(accent);\r\n\t\t\tchanged = vs.SetElementBase(Element::SelectionBack, ColourRGBA(colourAccent, alpha));\r\n\t\t\tchanged = vs.SetElementBase(Element::SelectionAdditionalBack, ColourRGBA(colourAccent, alpha/2)) || changed;\r\n\t\t\tchanged = vs.SetElementBase(Element::SelectionInactiveBack, ColourRGBA(ColourFromNSColor(noFocusBack), alpha)) || changed;\r\n\r\n\t\t}\r\n\t}\r\n\tif (changed) {\r\n\t\tRedraw();\r\n\t}\r\n\r\n\t[NSAppearance setCurrentAppearance:saved];\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * When the window is about to move, the calltip and autcoimpletion stay in the same spot,\r\n * so cancel them.\r\n */\r\nvoid ScintillaCocoa::WindowWillMove() {\r\n\tAutoCompleteCancel();\r\n\tct.CallTipCancel();\r\n}\r\n\r\n// If building with old SDK, need to define version number for 10.8\r\n#ifndef NSAppKitVersionNumber10_8\r\n#define NSAppKitVersionNumber10_8 1187\r\n#endif\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\nvoid ScintillaCocoa::ShowFindIndicatorForRange(NSRange charRange, BOOL retaining) {\r\n#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5\r\n\tNSView *content = ContentView();\r\n\tif (!layerFindIndicator) {\r\n\t\tlayerFindIndicator = [[FindHighlightLayer alloc] init];\r\n\t\t[content setWantsLayer: YES];\r\n\t\tlayerFindIndicator.geometryFlipped = content.layer.geometryFlipped;\r\n\t\tif (std::floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_8) {\r\n\t\t\t// Content layer is unflipped on 10.9, but the indicator shows wrong unless flipped\r\n\t\t\tlayerFindIndicator.geometryFlipped = YES;\r\n\t\t}\r\n\t\t[content.layer addSublayer: layerFindIndicator];\r\n\t}\r\n\t[layerFindIndicator removeAnimationForKey: @\"animateFound\"];\r\n\r\n\tif (charRange.length) {\r\n\t\tCFStringEncoding encoding = EncodingFromCharacterSet(IsUnicodeMode(),\r\n\t\t\t\t\t    vs.styles[StyleDefault].characterSet);\r\n\t\tstd::vector<char> buffer(charRange.length);\r\n\t\tpdoc->GetCharRange(&buffer[0], charRange.location, charRange.length);\r\n\r\n\t\tCFStringRef cfsFind = CFStringFromString(&buffer[0], charRange.length, encoding);\r\n\t\tlayerFindIndicator.sFind = (__bridge NSString *)cfsFind;\r\n\t\tif (cfsFind)\r\n\t\t\tCFRelease(cfsFind);\r\n\t\tlayerFindIndicator.retaining = retaining;\r\n\t\tlayerFindIndicator.positionFind = charRange.location;\r\n\t\t// Message::GetStyleAt reports a signed byte but want an unsigned to index into styles\r\n\t\tconst char styleByte = static_cast<char>(WndProc(Message::GetStyleAt, charRange.location, 0));\r\n\t\tconst long style = static_cast<unsigned char>(styleByte);\r\n\t\tstd::vector<char> bufferFontName(WndProc(Message::StyleGetFont, style, 0) + 1);\r\n\t\tWndProc(Message::StyleGetFont, style, (sptr_t)&bufferFontName[0]);\r\n\t\tlayerFindIndicator.sFont = @(&bufferFontName[0]);\r\n\r\n\t\tlayerFindIndicator.fontSize = WndProc(Message::StyleGetSizeFractional, style, 0) /\r\n\t\t\t\t\t      (float)FontSizeMultiplier;\r\n\t\tlayerFindIndicator.widthText = WndProc(Message::PointXFromPosition, 0, charRange.location + charRange.length) -\r\n\t\t\t\t\t       WndProc(Message::PointXFromPosition, 0, charRange.location);\r\n\t\tlayerFindIndicator.heightLine = WndProc(Message::TextHeight, 0, 0);\r\n\t\tMoveFindIndicatorWithBounce(YES);\r\n\t} else {\r\n\t\t[layerFindIndicator hideMatch];\r\n\t}\r\n#endif\r\n}\r\n\r\nvoid ScintillaCocoa::MoveFindIndicatorWithBounce(BOOL bounce) {\r\n#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5\r\n\tif (layerFindIndicator) {\r\n\t\tCGPoint ptText = CGPointMake(\r\n\t\t\t\t\t WndProc(Message::PointXFromPosition, 0, layerFindIndicator.positionFind),\r\n\t\t\t\t\t WndProc(Message::PointYFromPosition, 0, layerFindIndicator.positionFind));\r\n\t\tptText.x = ptText.x - vs.fixedColumnWidth + xOffset;\r\n\t\tptText.y += topLine * vs.lineHeight;\r\n\t\tif (!layerFindIndicator.geometryFlipped) {\r\n\t\t\tNSView *content = ContentView();\r\n\t\t\tptText.y = content.bounds.size.height - ptText.y;\r\n\t\t}\r\n\t\t[layerFindIndicator animateMatch: ptText bounce: bounce];\r\n\t}\r\n#endif\r\n}\r\n\r\nvoid ScintillaCocoa::HideFindIndicator() {\r\n#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5\r\n\tif (layerFindIndicator) {\r\n\t\t[layerFindIndicator hideMatch];\r\n\t}\r\n#endif\r\n}\r\n\r\n\r\n"
  },
  {
    "path": "scintilla/cocoa/ScintillaTest/AppController.h",
    "content": "/**\r\n * AppController.h\r\n * SciTest\r\n *\r\n * Created by Mike Lischke on 01.04.09.\r\n * Copyright 2009 Sun Microsystems, Inc. All rights reserved.\r\n * This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).\r\n */\r\n\r\n#import <Cocoa/Cocoa.h>\r\n\r\n#include <dlfcn.h>\r\n\r\n#import \"Scintilla/ILexer.h\"\r\n#import \"Scintilla/ScintillaView.h\"\r\n#import \"Scintilla/InfoBar.h\"\r\n#include <SciLexer.h>\r\n#include <Lexilla.h>\r\n\r\n@interface AppController : NSObject {\r\n  IBOutlet NSBox *mEditHost;\r\n  ScintillaView* mEditor;\r\n  ScintillaView* sciExtra;\t// For testing Scintilla tear-down\r\n}\r\n\r\n- (void) awakeFromNib;\r\n- (void) setupEditor;\r\n- (IBAction) searchText: (id) sender;\r\n- (IBAction) addRemoveExtra: (id) sender;\r\n\r\n@end\r\n"
  },
  {
    "path": "scintilla/cocoa/ScintillaTest/AppController.mm",
    "content": "/**\r\n * AppController.mm\r\n * ScintillaTest\r\n *\r\n * Created by Mike Lischke on 01.04.09.\r\n * Copyright 2009 Sun Microsystems, Inc. All rights reserved.\r\n * This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).\r\n */\r\n\r\n#import \"AppController.h\"\r\n\r\nconst char major_keywords[] =\r\n  \"accessible add all alter analyze and as asc asensitive \"\r\n  \"before between bigint binary blob both by \"\r\n  \"call cascade case change char character check collate column condition connection constraint \"\r\n    \"continue convert create cross current_date current_time current_timestamp current_user cursor \"\r\n  \"database databases day_hour day_microsecond day_minute day_second dec decimal declare default \"\r\n    \"delayed delete desc describe deterministic distinct distinctrow div double drop dual \"\r\n  \"each else elseif enclosed escaped exists exit explain \"\r\n  \"false fetch float float4 float8 for force foreign from fulltext \"\r\n  \"goto grant group \"\r\n  \"having high_priority hour_microsecond hour_minute hour_second \"\r\n  \"if ignore in index infile inner inout insensitive insert int int1 int2 int3 int4 int8 integer \"\r\n    \"interval into is iterate \"\r\n  \"join \"\r\n  \"key keys kill \"\r\n  \"label leading leave left like limit linear lines load localtime localtimestamp lock long \"\r\n    \"longblob longtext loop low_priority \"\r\n  \"master_ssl_verify_server_cert match mediumblob mediumint mediumtext middleint minute_microsecond \"\r\n    \"minute_second mod modifies \"\r\n  \"natural not no_write_to_binlog null numeric \"\r\n  \"on optimize option optionally or order out outer outfile \"\r\n  \"precision primary procedure purge \"\r\n  \"range read reads read_only read_write real references regexp release rename repeat replace \"\r\n    \"require restrict return revoke right rlike \"\r\n  \"schema schemas second_microsecond select sensitive separator set show smallint spatial specific \"\r\n    \"sql sqlexception sqlstate sqlwarning sql_big_result sql_calc_found_rows sql_small_result ssl \"\r\n    \"starting straight_join \"\r\n  \"table terminated then tinyblob tinyint tinytext to trailing trigger true \"\r\n  \"undo union unique unlock unsigned update upgrade usage use using utc_date utc_time utc_timestamp \"\r\n  \"values varbinary varchar varcharacter varying \"\r\n  \"when where while with write \"\r\n  \"xor \"\r\n  \"year_month \"\r\n  \"zerofill\";\r\n\r\nconst char procedure_keywords[] = // Not reserved words but intrinsic part of procedure definitions.\r\n  \"begin comment end\";\r\n\r\nconst char client_keywords[] = // Definition of keywords only used by clients, not the server itself.\r\n  \"delimiter\";\r\n\r\nconst char user_keywords[] = // Definition of own keywords, not used by MySQL.\r\n  \"edit\";\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n@implementation AppController\r\n\r\n- (void) awakeFromNib\r\n{\r\n  // Manually set up the scintilla editor. Create an instance and dock it to our edit host.\r\n  // Leave some free space around the new view to avoid overlapping with the box borders.\r\n  NSRect newFrame = mEditHost.frame;\r\n  newFrame.size.width -= 2 * newFrame.origin.x;\r\n  newFrame.size.height -= 3 * newFrame.origin.y;\r\n\r\n  mEditor = [[[ScintillaView alloc] initWithFrame: newFrame] autorelease];\r\n\r\n  [mEditHost.contentView addSubview: mEditor];\r\n  [mEditor setAutoresizesSubviews: YES];\r\n  [mEditor setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable];\r\n\r\n  // Let's load some text for the editor, as initial content.\r\n  NSString *sql = [self exampleText];\r\n\r\n  [mEditor setString: sql];\r\n\r\n  [self setupEditor];\r\n\r\n  sciExtra = nil;\r\n}\r\n\r\n- (NSString *) exampleText\r\n{\r\n  NSError* error = nil;\r\n\r\n  NSString* path = [[NSBundle mainBundle] pathForResource: @\"TestData\"\r\n                                                   ofType: @\"sql\" inDirectory: nil];\r\n\r\n  NSString *sql = [NSString stringWithContentsOfFile: path\r\n                                            encoding: NSUTF8StringEncoding\r\n                                               error: &error];\r\n\r\n  if (error && [[error domain] isEqual: NSCocoaErrorDomain])\r\n    NSLog(@\"%@\", error);\r\n\r\n  return sql;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Initialize scintilla editor (styles, colors, markers, folding etc.].\r\n */\r\n- (void) setupEditor\r\n{\r\n  // Lexer type is MySQL.\r\n  void *lexillaDL = dlopen(LEXILLA_LIB LEXILLA_EXTENSION, RTLD_LAZY);\r\n  if (lexillaDL) {\r\n    Lexilla::CreateLexerFn createLexer =\r\n\t  reinterpret_cast<Lexilla::CreateLexerFn>(dlsym(lexillaDL, LEXILLA_CREATELEXER));\r\n    if (createLexer) {\r\n      Scintilla::ILexer5 *pLexer = createLexer(\"mysql\");\r\n      [mEditor setReferenceProperty: SCI_SETILEXER parameter: nil value: pLexer];\r\n    }\r\n  }\r\n\r\n  [mEditor suspendDrawing: TRUE];\r\n\r\n  // Keywords to highlight. Indices are:\r\n  // 0 - Major keywords (reserved keywords)\r\n  // 1 - Normal keywords (everything not reserved but integral part of the language)\r\n  // 2 - Database objects\r\n  // 3 - Function keywords\r\n  // 4 - System variable keywords\r\n  // 5 - Procedure keywords (keywords used in procedures like \"begin\" and \"end\")\r\n  // 6..8 - User keywords 1..3\r\n  [mEditor setReferenceProperty: SCI_SETKEYWORDS parameter: 0 value: major_keywords];\r\n  [mEditor setReferenceProperty: SCI_SETKEYWORDS parameter: 5 value: procedure_keywords];\r\n  [mEditor setReferenceProperty: SCI_SETKEYWORDS parameter: 6 value: client_keywords];\r\n  [mEditor setReferenceProperty: SCI_SETKEYWORDS parameter: 7 value: user_keywords];\r\n\r\n  // Colors and styles for various syntactic elements. First the default style.\r\n  [mEditor setStringProperty: SCI_STYLESETFONT parameter: STYLE_DEFAULT value: @\"Helvetica\"];\r\n  // [mEditor setStringProperty: SCI_STYLESETFONT parameter: STYLE_DEFAULT value: @\"Monospac821 BT\"]; // Very pleasing programmer's font.\r\n  [mEditor setGeneralProperty: SCI_STYLESETSIZE parameter: STYLE_DEFAULT value: 14];\r\n  [mEditor setColorProperty: SCI_STYLESETFORE parameter: STYLE_DEFAULT value: [NSColor blackColor]];\r\n\r\n  [mEditor setGeneralProperty: SCI_STYLECLEARALL parameter: 0 value: 0];\r\n\r\n  [mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_DEFAULT value: [NSColor blackColor]];\r\n  [mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_COMMENT fromHTML: @\"#097BF7\"];\r\n  [mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_COMMENTLINE fromHTML: @\"#097BF7\"];\r\n  [mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_HIDDENCOMMAND fromHTML: @\"#097BF7\"];\r\n  [mEditor setColorProperty: SCI_STYLESETBACK parameter: SCE_MYSQL_HIDDENCOMMAND fromHTML: @\"#F0F0F0\"];\r\n\r\n  [mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_VARIABLE fromHTML: @\"378EA5\"];\r\n  [mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_SYSTEMVARIABLE fromHTML: @\"378EA5\"];\r\n  [mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_KNOWNSYSTEMVARIABLE fromHTML: @\"#3A37A5\"];\r\n\r\n  [mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_NUMBER fromHTML: @\"#7F7F00\"];\r\n  [mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_SQSTRING fromHTML: @\"#FFAA3E\"];\r\n\r\n  // Note: if we were using ANSI quotes we would set the DQSTRING to the same color as the\r\n  //       the back tick string.\r\n  [mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_DQSTRING fromHTML: @\"#274A6D\"];\r\n\r\n  // Keyword highlighting.\r\n  [mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_MAJORKEYWORD fromHTML: @\"#007F00\"];\r\n  [mEditor setGeneralProperty: SCI_STYLESETBOLD parameter: SCE_MYSQL_MAJORKEYWORD value: 1];\r\n  [mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_KEYWORD fromHTML: @\"#007F00\"];\r\n  [mEditor setGeneralProperty: SCI_STYLESETBOLD parameter: SCE_MYSQL_KEYWORD value: 1];\r\n  [mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_PROCEDUREKEYWORD fromHTML: @\"#56007F\"];\r\n  [mEditor setGeneralProperty: SCI_STYLESETBOLD parameter: SCE_MYSQL_PROCEDUREKEYWORD value: 1];\r\n  [mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_USER1 fromHTML: @\"#808080\"];\r\n  [mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_USER2 fromHTML: @\"#808080\"];\r\n  [mEditor setColorProperty: SCI_STYLESETBACK parameter: SCE_MYSQL_USER2 fromHTML: @\"#F0E0E0\"];\r\n\r\n  // The following 3 styles have no impact as we did not set a keyword list for any of them.\r\n  [mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_DATABASEOBJECT value: [NSColor redColor]];\r\n  [mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_FUNCTION value: [NSColor redColor]];\r\n\r\n  [mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_IDENTIFIER value: [NSColor blackColor]];\r\n  [mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_QUOTEDIDENTIFIER fromHTML: @\"#274A6D\"];\r\n  [mEditor setGeneralProperty: SCI_STYLESETBOLD parameter: SCE_SQL_OPERATOR value: 1];\r\n\r\n  // Line number style.\r\n  [mEditor setColorProperty: SCI_STYLESETFORE parameter: STYLE_LINENUMBER fromHTML: @\"#F0F0F0\"];\r\n  [mEditor setColorProperty: SCI_STYLESETBACK parameter: STYLE_LINENUMBER fromHTML: @\"#808080\"];\r\n\r\n  [mEditor setGeneralProperty: SCI_SETMARGINTYPEN parameter: 0 value: SC_MARGIN_NUMBER];\r\n\t[mEditor setGeneralProperty: SCI_SETMARGINWIDTHN parameter: 0 value: 35];\r\n\r\n  // Markers.\r\n  [mEditor setGeneralProperty: SCI_SETMARGINWIDTHN parameter: 1 value: 16];\r\n\r\n  // Some special lexer properties.\r\n  [mEditor setLexerProperty: @\"fold\" value: @\"1\"];\r\n  [mEditor setLexerProperty: @\"fold.compact\" value: @\"0\"];\r\n  [mEditor setLexerProperty: @\"fold.comment\" value: @\"1\"];\r\n  [mEditor setLexerProperty: @\"fold.preprocessor\" value: @\"1\"];\r\n\r\n  // Folder setup.\r\n  [mEditor setGeneralProperty: SCI_SETMARGINWIDTHN parameter: 2 value: 16];\r\n  [mEditor setGeneralProperty: SCI_SETMARGINMASKN parameter: 2 value: SC_MASK_FOLDERS];\r\n  [mEditor setGeneralProperty: SCI_SETMARGINSENSITIVEN parameter: 2 value: 1];\r\n  [mEditor setGeneralProperty: SCI_MARKERDEFINE parameter: SC_MARKNUM_FOLDEROPEN value: SC_MARK_BOXMINUS];\r\n  [mEditor setGeneralProperty: SCI_MARKERDEFINE parameter: SC_MARKNUM_FOLDER value: SC_MARK_BOXPLUS];\r\n  [mEditor setGeneralProperty: SCI_MARKERDEFINE parameter: SC_MARKNUM_FOLDERSUB value: SC_MARK_VLINE];\r\n  [mEditor setGeneralProperty: SCI_MARKERDEFINE parameter: SC_MARKNUM_FOLDERTAIL value: SC_MARK_LCORNER];\r\n  [mEditor setGeneralProperty: SCI_MARKERDEFINE parameter: SC_MARKNUM_FOLDEREND value: SC_MARK_BOXPLUSCONNECTED];\r\n  [mEditor setGeneralProperty: SCI_MARKERDEFINE parameter: SC_MARKNUM_FOLDEROPENMID value: SC_MARK_BOXMINUSCONNECTED];\r\n  [mEditor setGeneralProperty\r\n   : SCI_MARKERDEFINE parameter: SC_MARKNUM_FOLDERMIDTAIL value: SC_MARK_TCORNER];\r\n  for (int n= 25; n < 32; ++n) // Markers 25..31 are reserved for folding.\r\n  {\r\n    [mEditor setColorProperty: SCI_MARKERSETFORE parameter: n value: [NSColor whiteColor]];\r\n    [mEditor setColorProperty: SCI_MARKERSETBACK parameter: n value: [NSColor blackColor]];\r\n  }\r\n\r\n  // Init markers & indicators for highlighting of syntax errors.\r\n  [mEditor setColorProperty: SCI_INDICSETFORE parameter: 0 value: [NSColor redColor]];\r\n  [mEditor setGeneralProperty: SCI_INDICSETUNDER parameter: 0 value: 1];\r\n  [mEditor setGeneralProperty: SCI_INDICSETSTYLE parameter: 0 value: INDIC_SQUIGGLE];\r\n\r\n  [mEditor setColorProperty: SCI_MARKERSETBACK parameter: 0 fromHTML: @\"#B1151C\"];\r\n\r\n  [mEditor setColorProperty: SCI_SETSELBACK parameter: 1 value: [NSColor selectedTextBackgroundColor]];\r\n  [mEditor setGeneralProperty: SCI_SETMULTIPLESELECTION parameter: 1 value: 0];\r\n\r\n  // Uncomment if you wanna see auto wrapping in action.\r\n  //[mEditor setGeneralProperty: SCI_SETWRAPMODE parameter: SC_WRAP_WORD value: 0];\r\n\r\n  [mEditor suspendDrawing: FALSE];\r\n\r\n  InfoBar* infoBar = [[[InfoBar alloc] initWithFrame: NSMakeRect(0, 0, 400, 0)] autorelease];\r\n  [infoBar setDisplay: IBShowAll];\r\n  [mEditor setInfoBar: infoBar top: NO];\r\n  [mEditor setStatusText: @\"Operation complete\"];\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/* XPM */\r\nstatic const char * box_xpm[] = {\r\n\t\"12 12 2 1\",\r\n\t\" \tc None\",\r\n\t\".\tc #800000\",\r\n\t\"   .........\",\r\n\t\"  .   .   ..\",\r\n\t\" .   .   . .\",\r\n\t\".........  .\",\r\n\t\".   .   .  .\",\r\n\t\".   .   . ..\",\r\n\t\".   .   .. .\",\r\n\t\".........  .\",\r\n\t\".   .   .  .\",\r\n\t\".   .   . . \",\r\n\t\".   .   ..  \",\r\n\t\".........   \"};\r\n\r\n\r\n- (void) showAutocompletion\r\n{\r\n\tconst char *words = \"Babylon-5?1 Battlestar-Galactica Millennium-Falcon?2 Moya?2 Serenity Voyager\";\r\n\t[mEditor setGeneralProperty: SCI_AUTOCSETIGNORECASE parameter: 1 value:0];\r\n\t[mEditor setGeneralProperty: SCI_REGISTERIMAGE parameter: 1 value:(sptr_t)box_xpm];\r\n\tconst int imSize = 12;\r\n\t[mEditor setGeneralProperty: SCI_RGBAIMAGESETWIDTH parameter: imSize value:0];\r\n\t[mEditor setGeneralProperty: SCI_RGBAIMAGESETHEIGHT parameter: imSize value:0];\r\n\tchar image[imSize * imSize * 4];\r\n\tfor (size_t y = 0; y < imSize; y++) {\r\n\t\tfor (size_t x = 0; x < imSize; x++) {\r\n\t\t\tchar *p = image + (y * imSize + x) * 4;\r\n\t\t\tp[0] = 0xFF;\r\n\t\t\tp[1] = 0xA0;\r\n\t\t\tp[2] = 0;\r\n\t\t\tp[3] = x * 23;\r\n\t\t}\r\n\t}\r\n\t[mEditor setGeneralProperty: SCI_REGISTERRGBAIMAGE parameter: 2 value:(sptr_t)image];\r\n\t[mEditor setGeneralProperty: SCI_AUTOCSHOW parameter: 0 value:(sptr_t)words];\r\n}\r\n\r\n- (IBAction) searchText: (id) sender\r\n{\r\n  NSSearchField* searchField = (NSSearchField*) sender;\r\n  [mEditor findAndHighlightText: [searchField stringValue]\r\n                      matchCase: NO\r\n                      wholeWord: NO\r\n                       scrollTo: YES\r\n                           wrap: YES];\r\n\r\n  long matchStart = [mEditor getGeneralProperty: SCI_GETSELECTIONSTART parameter: 0];\r\n  long matchEnd = [mEditor getGeneralProperty: SCI_GETSELECTIONEND parameter: 0];\r\n  [mEditor setGeneralProperty: SCI_FINDINDICATORFLASH parameter: matchStart value:matchEnd];\r\n\r\n  if ([[searchField stringValue] isEqualToString: @\"XX\"])\r\n    [self showAutocompletion];\r\n}\r\n\r\n- (IBAction) addRemoveExtra: (id) sender\r\n{\r\n\tif (sciExtra) {\r\n\t\t[sciExtra removeFromSuperview];\r\n\t\tsciExtra = nil;\r\n\t} else {\r\n\t\tNSRect newFrame = mEditHost.frame;\r\n\t\tnewFrame.origin.x += newFrame.size.width + 5;\r\n\t\tnewFrame.origin.y += 46;\r\n\t\tnewFrame.size.width = 96;\r\n\t\tnewFrame.size.height -= 60;\r\n\r\n\t\tsciExtra = [[[ScintillaView alloc] initWithFrame: newFrame] autorelease];\r\n\t\t[[[mEditHost window]contentView] addSubview: sciExtra];\r\n\t\t[sciExtra setGeneralProperty: SCI_SETWRAPMODE parameter: SC_WRAP_WORD value: 1];\r\n\t\tNSString *sql = [self exampleText];\r\n\t\t[sciExtra setString: sql];\r\n\t}\r\n}\r\n\r\n-(IBAction) setFontQuality: (id) sender\r\n{\r\n    [ScintillaView directCall:mEditor message:SCI_SETFONTQUALITY wParam:[sender tag] lParam:0];\r\n}\r\n\r\n@end\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n"
  },
  {
    "path": "scintilla/cocoa/ScintillaTest/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>English</string>\n\t<key>CFBundleExecutable</key>\n\t<string>${EXECUTABLE_NAME}</string>\n\t<key>CFBundleIconFile</key>\n\t<string></string>\n\t<key>CFBundleIdentifier</key>\n\t<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>${PRODUCT_NAME}</string>\n\t<key>CFBundlePackageType</key>\n\t<string>APPL</string>\n\t<key>CFBundleSignature</key>\n\t<string>????</string>\n\t<key>CFBundleVersion</key>\n\t<string>1.0</string>\n\t<key>NSMainNibFile</key>\n\t<string>MainMenu</string>\n\t<key>NSPrincipalClass</key>\n\t<string>NSApplication</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "scintilla/cocoa/ScintillaTest/Scintilla-Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>English</string>\n\t<key>CFBundleExecutable</key>\n\t<string>${EXECUTABLE_NAME}</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>com.sun.${PRODUCT_NAME:identifier}</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundlePackageType</key>\n\t<string>FMWK</string>\n\t<key>CFBundleSignature</key>\n\t<string>????</string>\n\t<key>CFBundleVersion</key>\n\t<string>1.0</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "scintilla/cocoa/ScintillaTest/ScintillaTest.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 54;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\t1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD58140DA1D0A300B32029 /* MainMenu.xib */; };\n\t\t271FA52C0F850BE20033D021 /* AppController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 271FA52B0F850BE20033D021 /* AppController.mm */; };\n\t\t2791F4490FC1A8E9009DBCF9 /* TestData.sql in Resources */ = {isa = PBXBuildFile; fileRef = 2791F4480FC1A8E9009DBCF9 /* TestData.sql */; };\n\t\t286F8E5125F8474400EC8D60 /* Scintilla.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 286F8E4E25F845B000EC8D60 /* Scintilla.framework */; };\n\t\t286F8E5225F8474400EC8D60 /* Scintilla.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 286F8E4E25F845B000EC8D60 /* Scintilla.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };\n\t\t286F8E7525F8506B00EC8D60 /* liblexilla.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 286F8E7325F8504800EC8D60 /* liblexilla.dylib */; };\n\t\t286F8E7625F8506B00EC8D60 /* liblexilla.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = 286F8E7325F8504800EC8D60 /* liblexilla.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };\n\t\t8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };\n\t\t8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };\n\t\t8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXContainerItemProxy section */\n\t\t286F8E4D25F845B000EC8D60 /* PBXContainerItemProxy */ = {\n\t\t\tisa = PBXContainerItemProxy;\n\t\t\tcontainerPortal = 286F8E4925F845B000EC8D60 /* Scintilla.xcodeproj */;\n\t\t\tproxyType = 2;\n\t\t\tremoteGlobalIDString = 287F3C41246F8DC70040E76F;\n\t\t\tremoteInfo = Scintilla;\n\t\t};\n\t\t286F8E7225F8504800EC8D60 /* PBXContainerItemProxy */ = {\n\t\t\tisa = PBXContainerItemProxy;\n\t\t\tcontainerPortal = 286F8E6E25F8504800EC8D60 /* Lexilla.xcodeproj */;\n\t\t\tproxyType = 2;\n\t\t\tremoteGlobalIDString = 280262A5246DF655000DF3B8;\n\t\t\tremoteInfo = lexilla;\n\t\t};\n/* End PBXContainerItemProxy section */\n\n/* Begin PBXCopyFilesBuildPhase section */\n\t\t272133C20F973596006BE49A /* CopyFiles */ = {\n\t\t\tisa = PBXCopyFilesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tdstPath = \"\";\n\t\t\tdstSubfolderSpec = 10;\n\t\t\tfiles = (\n\t\t\t\t286F8E7625F8506B00EC8D60 /* liblexilla.dylib in CopyFiles */,\n\t\t\t\t286F8E5225F8474400EC8D60 /* Scintilla.framework in CopyFiles */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXCopyFilesBuildPhase section */\n\n/* Begin PBXFileReference section */\n\t\t1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = \"<absolute>\"; };\n\t\t13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = \"<absolute>\"; };\n\t\t271FA52A0F850BE20033D021 /* AppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppController.h; sourceTree = \"<group>\"; };\n\t\t271FA52B0F850BE20033D021 /* AppController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AppController.mm; sourceTree = \"<group>\"; wrapsLines = 0; };\n\t\t2791F4480FC1A8E9009DBCF9 /* TestData.sql */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TestData.sql; sourceTree = \"<group>\"; };\n\t\t286F8E4925F845B000EC8D60 /* Scintilla.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = \"wrapper.pb-project\"; name = Scintilla.xcodeproj; path = ../Scintilla/Scintilla.xcodeproj; sourceTree = \"<group>\"; };\n\t\t286F8E6E25F8504800EC8D60 /* Lexilla.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = \"wrapper.pb-project\"; name = Lexilla.xcodeproj; path = ../../../lexilla/src/Lexilla/Lexilla.xcodeproj; sourceTree = \"<group>\"; };\n\t\t28E78A40224C33FE00456881 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = \"<group>\"; };\n\t\t28E78A41224C33FE00456881 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = \"<group>\"; };\n\t\t29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = \"<group>\"; };\n\t\t29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = \"<absolute>\"; };\n\t\t29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = \"<absolute>\"; };\n\t\t32CA4F630368D1EE00C91783 /* ScintillaTest_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScintillaTest_Prefix.pch; sourceTree = \"<group>\"; };\n\t\t8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = \"<group>\"; };\n\t\t8D1107320486CEB800E47090 /* ScintillaTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ScintillaTest.app; sourceTree = BUILT_PRODUCTS_DIR; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t8D11072E0486CEB800E47090 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t286F8E5125F8474400EC8D60 /* Scintilla.framework in Frameworks */,\n\t\t\t\t286F8E7525F8506B00EC8D60 /* liblexilla.dylib in Frameworks */,\n\t\t\t\t8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXFrameworksBuildPhase section */\n\n/* Begin PBXGroup section */\n\t\t080E96DDFE201D6D7F000001 /* Classes */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t271FA52A0F850BE20033D021 /* AppController.h */,\n\t\t\t\t271FA52B0F850BE20033D021 /* AppController.mm */,\n\t\t\t);\n\t\t\tname = Classes;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,\n\t\t\t);\n\t\t\tname = \"Linked Frameworks\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t29B97324FDCFA39411CA2CEA /* AppKit.framework */,\n\t\t\t\t13E42FB307B3F0F600E4EEF1 /* CoreData.framework */,\n\t\t\t\t29B97325FDCFA39411CA2CEA /* Foundation.framework */,\n\t\t\t);\n\t\t\tname = \"Other Frameworks\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t19C28FACFE9D520D11CA2CBB /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t8D1107320486CEB800E47090 /* ScintillaTest.app */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t286F8E4A25F845B000EC8D60 /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t286F8E4E25F845B000EC8D60 /* Scintilla.framework */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t286F8E6F25F8504800EC8D60 /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t286F8E7325F8504800EC8D60 /* liblexilla.dylib */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t29B97314FDCFA39411CA2CEA /* ScintillaTest */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t286F8E6E25F8504800EC8D60 /* Lexilla.xcodeproj */,\n\t\t\t\t286F8E4925F845B000EC8D60 /* Scintilla.xcodeproj */,\n\t\t\t\t080E96DDFE201D6D7F000001 /* Classes */,\n\t\t\t\t29B97315FDCFA39411CA2CEA /* Other Sources */,\n\t\t\t\t29B97317FDCFA39411CA2CEA /* Resources */,\n\t\t\t\t29B97323FDCFA39411CA2CEA /* Frameworks */,\n\t\t\t\t19C28FACFE9D520D11CA2CBB /* Products */,\n\t\t\t);\n\t\t\tname = ScintillaTest;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t29B97315FDCFA39411CA2CEA /* Other Sources */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t32CA4F630368D1EE00C91783 /* ScintillaTest_Prefix.pch */,\n\t\t\t\t29B97316FDCFA39411CA2CEA /* main.m */,\n\t\t\t);\n\t\t\tname = \"Other Sources\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t29B97317FDCFA39411CA2CEA /* Resources */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t2791F4480FC1A8E9009DBCF9 /* TestData.sql */,\n\t\t\t\t8D1107310486CEB800E47090 /* Info.plist */,\n\t\t\t\t089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,\n\t\t\t\t1DDD58140DA1D0A300B32029 /* MainMenu.xib */,\n\t\t\t);\n\t\t\tname = Resources;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t29B97323FDCFA39411CA2CEA /* Frameworks */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,\n\t\t\t\t1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,\n\t\t\t);\n\t\t\tname = Frameworks;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXNativeTarget section */\n\t\t8D1107260486CEB800E47090 /* ScintillaTest */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget \"ScintillaTest\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t8D1107290486CEB800E47090 /* Resources */,\n\t\t\t\t8D11072C0486CEB800E47090 /* Sources */,\n\t\t\t\t8D11072E0486CEB800E47090 /* Frameworks */,\n\t\t\t\t272133C20F973596006BE49A /* CopyFiles */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = ScintillaTest;\n\t\t\tproductInstallPath = \"$(HOME)/Applications\";\n\t\t\tproductName = ScintillaTest;\n\t\t\tproductReference = 8D1107320486CEB800E47090 /* ScintillaTest.app */;\n\t\t\tproductType = \"com.apple.product-type.application\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\t29B97313FDCFA39411CA2CEA /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tattributes = {\n\t\t\t\tBuildIndependentTargetsInParallel = YES;\n\t\t\t\tLastUpgradeCheck = 1500;\n\t\t\t};\n\t\t\tbuildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject \"ScintillaTest\" */;\n\t\t\tcompatibilityVersion = \"Xcode 3.2\";\n\t\t\tdevelopmentRegion = en;\n\t\t\thasScannedForEncodings = 1;\n\t\t\tknownRegions = (\n\t\t\t\tBase,\n\t\t\t\ten,\n\t\t\t);\n\t\t\tmainGroup = 29B97314FDCFA39411CA2CEA /* ScintillaTest */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectReferences = (\n\t\t\t\t{\n\t\t\t\t\tProductGroup = 286F8E6F25F8504800EC8D60 /* Products */;\n\t\t\t\t\tProjectRef = 286F8E6E25F8504800EC8D60 /* Lexilla.xcodeproj */;\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tProductGroup = 286F8E4A25F845B000EC8D60 /* Products */;\n\t\t\t\t\tProjectRef = 286F8E4925F845B000EC8D60 /* Scintilla.xcodeproj */;\n\t\t\t\t},\n\t\t\t);\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\t8D1107260486CEB800E47090 /* ScintillaTest */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXReferenceProxy section */\n\t\t286F8E4E25F845B000EC8D60 /* Scintilla.framework */ = {\n\t\t\tisa = PBXReferenceProxy;\n\t\t\tfileType = wrapper.framework;\n\t\t\tpath = Scintilla.framework;\n\t\t\tremoteRef = 286F8E4D25F845B000EC8D60 /* PBXContainerItemProxy */;\n\t\t\tsourceTree = BUILT_PRODUCTS_DIR;\n\t\t};\n\t\t286F8E7325F8504800EC8D60 /* liblexilla.dylib */ = {\n\t\t\tisa = PBXReferenceProxy;\n\t\t\tfileType = \"compiled.mach-o.dylib\";\n\t\t\tpath = liblexilla.dylib;\n\t\t\tremoteRef = 286F8E7225F8504800EC8D60 /* PBXContainerItemProxy */;\n\t\t\tsourceTree = BUILT_PRODUCTS_DIR;\n\t\t};\n/* End PBXReferenceProxy section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\t8D1107290486CEB800E47090 /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,\n\t\t\t\t1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */,\n\t\t\t\t2791F4490FC1A8E9009DBCF9 /* TestData.sql in Resources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXResourcesBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t8D11072C0486CEB800E47090 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t8D11072D0486CEB800E47090 /* main.m in Sources */,\n\t\t\t\t271FA52C0F850BE20033D021 /* AppController.mm in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin PBXVariantGroup section */\n\t\t089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\t28E78A40224C33FE00456881 /* en */,\n\t\t\t);\n\t\t\tname = InfoPlist.strings;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t1DDD58140DA1D0A300B32029 /* MainMenu.xib */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\t28E78A41224C33FE00456881 /* en */,\n\t\t\t);\n\t\t\tname = MainMenu.xib;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXVariantGroup section */\n\n/* Begin XCBuildConfiguration section */\n\t\tC01FCF4B08A954540054247B /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ENABLE_OBJC_WEAK = YES;\n\t\t\t\tCLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO;\n\t\t\t\tCODE_SIGN_IDENTITY = \"-\";\n\t\t\t\tCOMBINE_HIDPI_IMAGES = YES;\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEAD_CODE_STRIPPING = YES;\n\t\t\t\tFRAMEWORK_SEARCH_PATHS = \"$(inherited)\";\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_MODEL_TUNING = G5;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tGCC_PRECOMPILE_PREFIX_HEADER = YES;\n\t\t\t\tGCC_PREFIX_HEADER = ScintillaTest_Prefix.pch;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = SCI_LEXER;\n\t\t\t\tHEADER_SEARCH_PATHS = \"\";\n\t\t\t\tINFOPLIST_FILE = Info.plist;\n\t\t\t\tINSTALL_PATH = \"$(HOME)/Applications\";\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t\"$(LD_RUNPATH_SEARCH_PATHS_$(IS_MACCATALYST))\",\n\t\t\t\t\t\"@executable_path/../Frameworks\",\n\t\t\t\t);\n\t\t\t\tLIBRARY_SEARCH_PATHS = \"$(inherited)\";\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.13;\n\t\t\t\tOTHER_LDFLAGS = \"\";\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = \"com.sun.${PRODUCT_NAME:identifier}\";\n\t\t\t\tPRODUCT_NAME = ScintillaTest;\n\t\t\t\tSDKROOT = macosx;\n\t\t\t\tUSER_HEADER_SEARCH_PATHS = \"\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\tC01FCF4C08A954540054247B /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ENABLE_OBJC_WEAK = YES;\n\t\t\t\tCLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO;\n\t\t\t\tCODE_SIGN_IDENTITY = \"-\";\n\t\t\t\tCOMBINE_HIDPI_IMAGES = YES;\n\t\t\t\tDEAD_CODE_STRIPPING = YES;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\n\t\t\t\tFRAMEWORK_SEARCH_PATHS = \"$(inherited)\";\n\t\t\t\tGCC_MODEL_TUNING = G5;\n\t\t\t\tGCC_PRECOMPILE_PREFIX_HEADER = YES;\n\t\t\t\tGCC_PREFIX_HEADER = ScintillaTest_Prefix.pch;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = SCI_LEXER;\n\t\t\t\tHEADER_SEARCH_PATHS = \"\";\n\t\t\t\tINFOPLIST_FILE = Info.plist;\n\t\t\t\tINSTALL_PATH = \"$(HOME)/Applications\";\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t\"$(LD_RUNPATH_SEARCH_PATHS_$(IS_MACCATALYST))\",\n\t\t\t\t\t\"@executable_path/../Frameworks\",\n\t\t\t\t);\n\t\t\t\tLIBRARY_SEARCH_PATHS = \"$(inherited)\";\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.13;\n\t\t\t\tOTHER_LDFLAGS = \"\";\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = \"com.sun.${PRODUCT_NAME:identifier}\";\n\t\t\t\tPRODUCT_NAME = ScintillaTest;\n\t\t\t\tSDKROOT = macosx;\n\t\t\t\tUSER_HEADER_SEARCH_PATHS = \"\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\tC01FCF4F08A954540054247B /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tCLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tDEAD_CODE_STRIPPING = YES;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_TESTABILITY = YES;\n\t\t\t\tENABLE_USER_SCRIPT_SANDBOXING = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = c99;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tGCC_VERSION = com.apple.compilers.llvm.clang.1_0;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.13;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tOTHER_LDFLAGS = \"\";\n\t\t\t\tSDKROOT = macosx;\n\t\t\t\tSYSTEM_HEADER_SEARCH_PATHS = \"../../../lexilla/**\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\tC01FCF5008A954540054247B /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tCLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tDEAD_CODE_STRIPPING = YES;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_USER_SCRIPT_SANDBOXING = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = c99;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_VERSION = com.apple.compilers.llvm.clang.1_0;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.13;\n\t\t\t\tOTHER_LDFLAGS = \"\";\n\t\t\t\tSDKROOT = macosx;\n\t\t\t\tSYSTEM_HEADER_SEARCH_PATHS = \"../../../lexilla/**\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\tC01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget \"ScintillaTest\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\tC01FCF4B08A954540054247B /* Debug */,\n\t\t\t\tC01FCF4C08A954540054247B /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\tC01FCF4E08A954540054247B /* Build configuration list for PBXProject \"ScintillaTest\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\tC01FCF4F08A954540054247B /* Debug */,\n\t\t\t\tC01FCF5008A954540054247B /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n/* End XCConfigurationList section */\n\t};\n\trootObject = 29B97313FDCFA39411CA2CEA /* Project object */;\n}\n"
  },
  {
    "path": "scintilla/cocoa/ScintillaTest/ScintillaTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"self:ScintillaTest.xcodeproj\">\n   </FileRef>\n</Workspace>\n"
  },
  {
    "path": "scintilla/cocoa/ScintillaTest/ScintillaTest.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>IDEDidComputeMac32BitWarning</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "scintilla/cocoa/ScintillaTest/ScintillaTest_Prefix.pch",
    "content": "//\r\n// Prefix header for all source files of the 'ScintillaTest' target in the 'ScintillaTest' project\r\n//\r\n\r\n#ifdef __OBJC__\r\n    #import <Cocoa/Cocoa.h>\r\n#endif\r\n"
  },
  {
    "path": "scintilla/cocoa/ScintillaTest/TestData.sql",
    "content": "-- MySQL Administrator dump 1.4\n--\n-- ------------------------------------------------------\n-- Server version\t5.0.45\n\n\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n/*!40101 SET NAMES utf8 */;\n\n/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,ANSI_QUOTES' */;\n\n/**\n * Foldable multiline comment.\n */\n\n-- {\n-- Create schema sakila\n-- }\n\nCREATE DATABASE IF NOT EXISTS sakila;\nUSE sakila;\nDROP TABLE IF EXISTS \"sakila\".\"actor_info\";\nDROP VIEW IF EXISTS \"sakila\".\"actor_info\";\nCREATE TABLE \"sakila\".\"actor_info\" (\n  \"actor_id\" smallint(5) unsigned,\n  \"first_name\" varchar(45),\n  \"last_name\" varchar(45),\n  \"film_info\" varchar(341)\n);\nDROP TABLE IF EXISTS \"sakila\".\"actor\";\nCREATE TABLE  \"sakila\".\"actor\" (\n  \"actor_id\" smallint(5) unsigned NOT NULL auto_increment,\n  \"first_name\" varchar(45) NOT NULL,\n  \"last_name\" varchar(45) NOT NULL,\n  \"last_update\" timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,\n  PRIMARY KEY  (\"actor_id\"),\n  KEY \"idx_actor_last_name\" (\"last_name\")\n) ENGINE=InnoDB AUTO_INCREMENT=201 DEFAULT CHARSET=utf8;\nINSERT INTO \"sakila\".\"actor\" VALUES  (1,'PENELOPE','GUINESS','2006-02-15 04:34:33'),\n (2,'NICK','WAHLBERG','2006-02-15 04:34:33'),\n (3,'ED','CHASE','2006-02-15 04:34:33'),\n (4,'JENNIFER','DAVIS','2006-02-15 04:34:33'),\n (149,'RUSSELL','TEMPLE','2006-02-15 04:34:33'),\n (150,'JAYNE','NOLTE','2006-02-15 04:34:33'),\n (151,'GEOFFREY','HESTON','2006-02-15 04:34:33'),\n (152,'BEN','HARRIS','2006-02-15 04:34:33'),\n (153,'MINNIE','KILMER','2006-02-15 04:34:33'),\n (154,'MERYL','GIBSON','2006-02-15 04:34:33'),\n (155,'IAN','TANDY','2006-02-15 04:34:33'),\n (156,'FAY','WOOD','2006-02-15 04:34:33'),\n (157,'GRETA','MALDEN','2006-02-15 04:34:33'),\n (158,'VIVIEN','BASINGER','2006-02-15 04:34:33'),\n (159,'LAURA','BRODY','2006-02-15 04:34:33'),\n (160,'CHRIS','DEPP','2006-02-15 04:34:33'),\n (161,'HARVEY','HOPE','2006-02-15 04:34:33'),\n (162,'OPRAH','KILMER','2006-02-15 04:34:33'),\n (163,'CHRISTOPHER','WEST','2006-02-15 04:34:33'),\n (164,'HUMPHREY','WILLIS','2006-02-15 04:34:33'),\n (165,'AL','GARLAND','2006-02-15 04:34:33'),\n (166,'NICK','DEGENERES','2006-02-15 04:34:33'),\n (167,'LAURENCE','BULLOCK','2006-02-15 04:34:33'),\n (168,'WILL','WILSON','2006-02-15 04:34:33'),\n (169,'KENNETH','HOFFMAN','2006-02-15 04:34:33'),\n (170,'MENA','HOPPER','2006-02-15 04:34:33'),\n (171,'OLYMPIA','PFEIFFER','2006-02-15 04:34:33'),\n (190,'AUDREY','BAILEY','2006-02-15 04:34:33'),\n (191,'GREGORY','GOODING','2006-02-15 04:34:33'),\n (192,'JOHN','SUVARI','2006-02-15 04:34:33'),\n (193,'BURT','TEMPLE','2006-02-15 04:34:33'),\n (194,'MERYL','ALLEN','2006-02-15 04:34:33'),\n (195,'JAYNE','SILVERSTONE','2006-02-15 04:34:33'),\n (196,'BELA','WALKEN','2006-02-15 04:34:33'),\n (197,'REESE','WEST','2006-02-15 04:34:33'),\n (198,'MARY','KEITEL','2006-02-15 04:34:33'),\n (199,'JULIA','FAWCETT','2006-02-15 04:34:33'),\n (200,'THORA','TEMPLE','2006-02-15 04:34:33');\n\nDROP TRIGGER /*!50030 IF EXISTS */ \"sakila\".\"payment_date\";\n\nDELIMITER $$\n\nCREATE DEFINER = \"root\"@\"localhost\" TRIGGER  \"sakila\".\"payment_date\" BEFORE INSERT ON \"payment\" FOR EACH ROW SET NEW.payment_date = NOW() $$\n\nDELIMITER ;\n\n\nDROP TABLE IF EXISTS \"sakila\".\"sales_by_store\";\nDROP VIEW IF EXISTS \"sakila\".\"sales_by_store\";\nCREATE ALGORITHM=UNDEFINED DEFINER=\"root\"@\"localhost\" SQL SECURITY DEFINER VIEW \"sakila\".\"sales_by_store\" AS select concat(\"c\".\"city\",_utf8',',\"cy\".\"country\") AS \"store\",concat(\"m\".\"first_name\",_utf8' ',\"m\".\"last_name\") AS \"manager\",sum(\"p\".\"amount\") AS \"total_sales\" from (((((((\"sakila\".\"payment\" \"p\" join \"sakila\".\"rental\" \"r\" on((\"p\".\"rental_id\" = \"r\".\"rental_id\"))) join \"sakila\".\"inventory\" \"i\" on((\"r\".\"inventory_id\" = \"i\".\"inventory_id\"))) join \"sakila\".\"store\" \"s\" on((\"i\".\"store_id\" = \"s\".\"store_id\"))) join \"sakila\".\"address\" \"a\" on((\"s\".\"address_id\" = \"a\".\"address_id\"))) join \"sakila\".\"city\" \"c\" on((\"a\".\"city_id\" = \"c\".\"city_id\"))) join \"sakila\".\"country\" \"cy\" on((\"c\".\"country_id\" = \"cy\".\"country_id\"))) join \"sakila\".\"staff\" \"m\" on((\"s\".\"manager_staff_id\" = \"m\".\"staff_id\"))) group by \"s\".\"store_id\" order by \"cy\".\"country\",\"c\".\"city\";\n\n--\n-- View structure for view `staff_list`\n--\n\nCREATE VIEW staff_list \nAS \nSELECT s.staff_id AS ID, CONCAT(s.first_name, _utf8' ', s.last_name) AS name, a.address AS address, a.postal_code AS `zip code`, a.phone AS phone,\n\tcity.city AS city, country.country AS country, s.store_id AS SID \nFROM staff AS s JOIN address AS a ON s.address_id = a.address_id JOIN city ON a.city_id = city.city_id \n\tJOIN country ON city.country_id = country.country_id;\n\n--\n-- View structure for view `actor_info`\n--\n\nCREATE DEFINER=CURRENT_USER SQL SECURITY INVOKER VIEW actor_info \nAS\nSELECT      \na.actor_id,\na.first_name,\na.last_name,\nGROUP_CONCAT(DISTINCT CONCAT(c.name, ': ',\n\t\t(SELECT GROUP_CONCAT(f.title ORDER BY f.title SEPARATOR ', ')\n                    FROM sakila.film f\n                    INNER JOIN sakila.film_category fc\n                      ON f.film_id = fc.film_id\n                    INNER JOIN sakila.film_actor fa\n                      ON f.film_id = fa.film_id\n                    WHERE fc.category_id = c.category_id\n                    AND fa.actor_id = a.actor_id\n                 )\n             )\n             ORDER BY c.name SEPARATOR '; ')\nAS film_info\nFROM sakila.actor a\nLEFT JOIN sakila.film_actor fa\n  ON a.actor_id = fa.actor_id\nLEFT JOIN sakila.film_category fc\n  ON fa.film_id = fc.film_id\nLEFT JOIN sakila.category c\n  ON fc.category_id = c.category_id\nGROUP BY a.actor_id, a.first_name, a.last_name;\n\nDELIMITER $$\n\nCREATE FUNCTION get_customer_balance(p_customer_id INT, p_effective_date DATETIME) RETURNS DECIMAL(5,2)\n    DETERMINISTIC\n    READS SQL DATA\nBEGIN\n\n       #OK, WE NEED TO CALCULATE THE CURRENT BALANCE GIVEN A CUSTOMER_ID AND A DATE\n       #THAT WE WANT THE BALANCE TO BE EFFECTIVE FOR. THE BALANCE IS:\n       #   1) RENTAL FEES FOR ALL PREVIOUS RENTALS\n       #   2) ONE DOLLAR FOR EVERY DAY THE PREVIOUS RENTALS ARE OVERDUE\n       #   3) IF A FILM IS MORE THAN RENTAL_DURATION * 2 OVERDUE, CHARGE THE REPLACEMENT_COST\n       #   4) SUBTRACT ALL PAYMENTS MADE BEFORE THE DATE SPECIFIED\n\n  DECLARE v_rentfees DECIMAL(5,2); #FEES PAID TO RENT THE VIDEOS INITIALLY\n  DECLARE v_overfees INTEGER;      #LATE FEES FOR PRIOR RENTALS\n  DECLARE v_payments DECIMAL(5,2); #SUM OF PAYMENTS MADE PREVIOUSLY\n\n  SELECT IFNULL(SUM(film.rental_rate),0) INTO v_rentfees\n    FROM film, inventory, rental\n    WHERE film.film_id = inventory.film_id\n      AND inventory.inventory_id = rental.inventory_id\n      AND rental.rental_date <= p_effective_date\n      AND rental.customer_id = p_customer_id;\n\n  SELECT IFNULL(SUM(IF((TO_DAYS(rental.return_date) - TO_DAYS(rental.rental_date)) > film.rental_duration,\n        ((TO_DAYS(rental.return_date) - TO_DAYS(rental.rental_date)) - film.rental_duration),0)),0) INTO v_overfees\n    FROM rental, inventory, film\n    WHERE film.film_id = inventory.film_id\n      AND inventory.inventory_id = rental.inventory_id\n      AND rental.rental_date <= p_effective_date\n      AND rental.customer_id = p_customer_id;\n\n\n  SELECT IFNULL(SUM(payment.amount),0) INTO v_payments\n    FROM payment\n\n    WHERE payment.payment_date <= p_effective_date\n    AND payment.customer_id = p_customer_id;\n\n  RETURN v_rentfees + v_overfees - v_payments;\nEND $$\n\nDELIMITER ;\n\nDELIMITER $$\n\nCREATE FUNCTION inventory_in_stock(p_inventory_id INT) RETURNS BOOLEAN\nREADS SQL DATA\nBEGIN\n    DECLARE v_rentals INT;\n    DECLARE v_out     INT;\n\n    #AN ITEM IS IN-STOCK IF THERE ARE EITHER NO ROWS IN THE rental TABLE\n    #FOR THE ITEM OR ALL ROWS HAVE return_date POPULATED\n\n    SELECT COUNT(*) INTO v_rentals\n    FROM rental\n    WHERE inventory_id = p_inventory_id;\n\n    IF v_rentals = 0 THEN\n      RETURN TRUE;\n    END IF;\n\n    SELECT COUNT(rental_id) INTO v_out\n    FROM inventory LEFT JOIN rental USING(inventory_id)\n    WHERE inventory.inventory_id = p_inventory_id\n    AND rental.return_date IS NULL;\n\n    IF v_out > 0 THEN\n      RETURN FALSE;\n    ELSE\n      RETURN TRUE;\n    END IF;\nEND $$\n\nDELIMITER ;\n\n"
  },
  {
    "path": "scintilla/cocoa/ScintillaTest/en.lproj/MainMenu.xib",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.Cocoa.XIB\" version=\"3.0\" toolsVersion=\"12120\" systemVersion=\"16E195\" targetRuntime=\"MacOSX.Cocoa\" propertyAccessControl=\"none\">\n    <dependencies>\n        <deployment identifier=\"macosx\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.CocoaPlugin\" version=\"12120\"/>\n        <capability name=\"box content view\" minToolsVersion=\"7.0\"/>\n        <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n    </dependencies>\n    <objects>\n        <customObject id=\"-2\" userLabel=\"File's Owner\" customClass=\"NSApplication\"/>\n        <customObject id=\"-1\" userLabel=\"First Responder\" customClass=\"FirstResponder\"/>\n        <customObject id=\"-3\" userLabel=\"Application\" customClass=\"NSObject\"/>\n        <menu title=\"AMainMenu\" systemMenu=\"main\" id=\"29\" userLabel=\"MainMenu\">\n            <items>\n                <menuItem title=\"NewApplication\" id=\"56\">\n                    <menu key=\"submenu\" title=\"NewApplication\" systemMenu=\"apple\" id=\"57\">\n                        <items>\n                            <menuItem title=\"About NewApplication\" id=\"58\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <connections>\n                                    <action selector=\"orderFrontStandardAboutPanel:\" target=\"-2\" id=\"142\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem isSeparatorItem=\"YES\" id=\"236\">\n                                <modifierMask key=\"keyEquivalentModifierMask\" command=\"YES\"/>\n                            </menuItem>\n                            <menuItem title=\"Preferences…\" keyEquivalent=\",\" id=\"129\" userLabel=\"121\"/>\n                            <menuItem isSeparatorItem=\"YES\" id=\"143\">\n                                <modifierMask key=\"keyEquivalentModifierMask\" command=\"YES\"/>\n                            </menuItem>\n                            <menuItem title=\"Services\" id=\"131\">\n                                <menu key=\"submenu\" title=\"Services\" systemMenu=\"services\" id=\"130\"/>\n                            </menuItem>\n                            <menuItem isSeparatorItem=\"YES\" id=\"144\">\n                                <modifierMask key=\"keyEquivalentModifierMask\" command=\"YES\"/>\n                            </menuItem>\n                            <menuItem title=\"Hide NewApplication\" keyEquivalent=\"h\" id=\"134\">\n                                <connections>\n                                    <action selector=\"hide:\" target=\"-1\" id=\"367\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Hide Others\" keyEquivalent=\"h\" id=\"145\">\n                                <modifierMask key=\"keyEquivalentModifierMask\" option=\"YES\" command=\"YES\"/>\n                                <connections>\n                                    <action selector=\"hideOtherApplications:\" target=\"-1\" id=\"368\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Show All\" id=\"150\">\n                                <connections>\n                                    <action selector=\"unhideAllApplications:\" target=\"-1\" id=\"370\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem isSeparatorItem=\"YES\" id=\"149\">\n                                <modifierMask key=\"keyEquivalentModifierMask\" command=\"YES\"/>\n                            </menuItem>\n                            <menuItem title=\"Quit NewApplication\" keyEquivalent=\"q\" id=\"136\" userLabel=\"1111\">\n                                <connections>\n                                    <action selector=\"terminate:\" target=\"-3\" id=\"449\"/>\n                                </connections>\n                            </menuItem>\n                        </items>\n                    </menu>\n                </menuItem>\n                <menuItem title=\"File\" id=\"83\">\n                    <menu key=\"submenu\" title=\"File\" id=\"81\">\n                        <items>\n                            <menuItem title=\"New\" keyEquivalent=\"n\" id=\"82\" userLabel=\"9\">\n                                <connections>\n                                    <action selector=\"newDocument:\" target=\"-1\" id=\"373\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Open…\" keyEquivalent=\"o\" id=\"72\">\n                                <connections>\n                                    <action selector=\"openDocument:\" target=\"-1\" id=\"374\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Open Recent\" id=\"124\">\n                                <menu key=\"submenu\" title=\"Open Recent\" systemMenu=\"recentDocuments\" id=\"125\">\n                                    <items>\n                                        <menuItem title=\"Clear Menu\" id=\"126\">\n                                            <connections>\n                                                <action selector=\"clearRecentDocuments:\" target=\"-1\" id=\"127\"/>\n                                            </connections>\n                                        </menuItem>\n                                    </items>\n                                </menu>\n                            </menuItem>\n                            <menuItem isSeparatorItem=\"YES\" id=\"79\" userLabel=\"7\">\n                                <modifierMask key=\"keyEquivalentModifierMask\" command=\"YES\"/>\n                            </menuItem>\n                            <menuItem title=\"Close\" keyEquivalent=\"w\" id=\"73\" userLabel=\"1\">\n                                <connections>\n                                    <action selector=\"performClose:\" target=\"-1\" id=\"193\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Save\" keyEquivalent=\"s\" id=\"75\" userLabel=\"3\">\n                                <connections>\n                                    <action selector=\"saveDocument:\" target=\"-1\" id=\"362\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Save As…\" keyEquivalent=\"S\" id=\"80\" userLabel=\"8\">\n                                <modifierMask key=\"keyEquivalentModifierMask\" shift=\"YES\" command=\"YES\"/>\n                                <connections>\n                                    <action selector=\"saveDocumentAs:\" target=\"-1\" id=\"363\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Revert to Saved\" id=\"112\" userLabel=\"10\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <connections>\n                                    <action selector=\"revertDocumentToSaved:\" target=\"-1\" id=\"364\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem isSeparatorItem=\"YES\" id=\"74\" userLabel=\"2\">\n                                <modifierMask key=\"keyEquivalentModifierMask\" command=\"YES\"/>\n                            </menuItem>\n                            <menuItem title=\"Page Setup...\" keyEquivalent=\"P\" id=\"77\" userLabel=\"5\">\n                                <modifierMask key=\"keyEquivalentModifierMask\" shift=\"YES\" command=\"YES\"/>\n                                <connections>\n                                    <action selector=\"runPageLayout:\" target=\"-1\" id=\"87\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Print…\" keyEquivalent=\"p\" id=\"78\" userLabel=\"6\">\n                                <connections>\n                                    <action selector=\"print:\" target=\"-1\" id=\"86\"/>\n                                </connections>\n                            </menuItem>\n                        </items>\n                    </menu>\n                </menuItem>\n                <menuItem title=\"Edit\" id=\"217\">\n                    <menu key=\"submenu\" title=\"Edit\" id=\"205\">\n                        <items>\n                            <menuItem title=\"Undo\" keyEquivalent=\"z\" id=\"207\">\n                                <connections>\n                                    <action selector=\"undo:\" target=\"-1\" id=\"223\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Redo\" keyEquivalent=\"Z\" id=\"215\">\n                                <modifierMask key=\"keyEquivalentModifierMask\" shift=\"YES\" command=\"YES\"/>\n                                <connections>\n                                    <action selector=\"redo:\" target=\"-1\" id=\"231\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem isSeparatorItem=\"YES\" id=\"206\">\n                                <modifierMask key=\"keyEquivalentModifierMask\" command=\"YES\"/>\n                            </menuItem>\n                            <menuItem title=\"Cut\" keyEquivalent=\"x\" id=\"199\">\n                                <connections>\n                                    <action selector=\"cut:\" target=\"-1\" id=\"228\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Copy\" keyEquivalent=\"c\" id=\"197\">\n                                <connections>\n                                    <action selector=\"copy:\" target=\"-1\" id=\"224\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Paste\" keyEquivalent=\"v\" id=\"203\">\n                                <connections>\n                                    <action selector=\"paste:\" target=\"-1\" id=\"226\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Delete\" id=\"202\">\n                                <connections>\n                                    <action selector=\"delete:\" target=\"-1\" id=\"235\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Select All\" keyEquivalent=\"a\" id=\"198\">\n                                <connections>\n                                    <action selector=\"selectAll:\" target=\"-1\" id=\"232\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem isSeparatorItem=\"YES\" id=\"214\">\n                                <modifierMask key=\"keyEquivalentModifierMask\" command=\"YES\"/>\n                            </menuItem>\n                            <menuItem title=\"Find\" id=\"218\">\n                                <menu key=\"submenu\" title=\"Find\" id=\"220\">\n                                    <items>\n                                        <menuItem title=\"Find…\" tag=\"1\" keyEquivalent=\"f\" id=\"209\">\n                                            <connections>\n                                                <action selector=\"performFindPanelAction:\" target=\"-1\" id=\"241\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Find Next\" tag=\"2\" keyEquivalent=\"g\" id=\"208\"/>\n                                        <menuItem title=\"Find Previous\" tag=\"3\" keyEquivalent=\"G\" id=\"213\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\" shift=\"YES\" command=\"YES\"/>\n                                        </menuItem>\n                                        <menuItem title=\"Use Selection for Find\" tag=\"7\" keyEquivalent=\"e\" id=\"221\"/>\n                                        <menuItem title=\"Jump to Selection\" keyEquivalent=\"j\" id=\"210\">\n                                            <connections>\n                                                <action selector=\"centerSelectionInVisibleArea:\" target=\"-1\" id=\"245\"/>\n                                            </connections>\n                                        </menuItem>\n                                    </items>\n                                </menu>\n                            </menuItem>\n                            <menuItem title=\"Spelling and Grammar\" id=\"216\">\n                                <menu key=\"submenu\" title=\"Spelling and Grammar\" id=\"200\">\n                                    <items>\n                                        <menuItem title=\"Show Spelling…\" keyEquivalent=\":\" id=\"204\">\n                                            <connections>\n                                                <action selector=\"showGuessPanel:\" target=\"-1\" id=\"230\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Check Spelling\" keyEquivalent=\";\" id=\"201\">\n                                            <connections>\n                                                <action selector=\"checkSpelling:\" target=\"-1\" id=\"225\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Check Spelling While Typing\" id=\"219\">\n                                            <connections>\n                                                <action selector=\"toggleContinuousSpellChecking:\" target=\"-1\" id=\"222\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Check Grammar With Spelling\" id=\"346\">\n                                            <connections>\n                                                <action selector=\"toggleGrammarChecking:\" target=\"-1\" id=\"347\"/>\n                                            </connections>\n                                        </menuItem>\n                                    </items>\n                                </menu>\n                            </menuItem>\n                            <menuItem title=\"Substitutions\" id=\"348\">\n                                <menu key=\"submenu\" title=\"Substitutions\" id=\"349\">\n                                    <items>\n                                        <menuItem title=\"Smart Copy/Paste\" tag=\"1\" keyEquivalent=\"f\" id=\"350\">\n                                            <connections>\n                                                <action selector=\"toggleSmartInsertDelete:\" target=\"-1\" id=\"355\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Smart Quotes\" tag=\"2\" keyEquivalent=\"g\" id=\"351\">\n                                            <connections>\n                                                <action selector=\"toggleAutomaticQuoteSubstitution:\" target=\"-1\" id=\"356\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Smart Links\" tag=\"3\" keyEquivalent=\"G\" id=\"354\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\" shift=\"YES\" command=\"YES\"/>\n                                            <connections>\n                                                <action selector=\"toggleAutomaticLinkDetection:\" target=\"-1\" id=\"357\"/>\n                                            </connections>\n                                        </menuItem>\n                                    </items>\n                                </menu>\n                            </menuItem>\n                            <menuItem title=\"Speech\" id=\"211\">\n                                <menu key=\"submenu\" title=\"Speech\" id=\"212\">\n                                    <items>\n                                        <menuItem title=\"Start Speaking\" id=\"196\">\n                                            <connections>\n                                                <action selector=\"startSpeaking:\" target=\"-1\" id=\"233\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Stop Speaking\" id=\"195\">\n                                            <connections>\n                                                <action selector=\"stopSpeaking:\" target=\"-1\" id=\"227\"/>\n                                            </connections>\n                                        </menuItem>\n                                    </items>\n                                </menu>\n                            </menuItem>\n                        </items>\n                    </menu>\n                </menuItem>\n                <menuItem title=\"Format\" id=\"375\">\n                    <modifierMask key=\"keyEquivalentModifierMask\"/>\n                    <menu key=\"submenu\" title=\"Format\" id=\"376\">\n                        <items>\n                            <menuItem title=\"Font\" id=\"377\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <menu key=\"submenu\" title=\"Font\" systemMenu=\"font\" id=\"388\">\n                                    <items>\n                                        <menuItem title=\"Show Fonts\" keyEquivalent=\"t\" id=\"389\">\n                                            <connections>\n                                                <action selector=\"orderFrontFontPanel:\" target=\"420\" id=\"424\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Bold\" tag=\"2\" keyEquivalent=\"b\" id=\"390\">\n                                            <connections>\n                                                <action selector=\"addFontTrait:\" target=\"420\" id=\"421\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Italic\" tag=\"1\" keyEquivalent=\"i\" id=\"391\">\n                                            <connections>\n                                                <action selector=\"addFontTrait:\" target=\"420\" id=\"422\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Underline\" keyEquivalent=\"u\" id=\"392\">\n                                            <connections>\n                                                <action selector=\"underline:\" target=\"-1\" id=\"432\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem isSeparatorItem=\"YES\" id=\"393\"/>\n                                        <menuItem title=\"Bigger\" tag=\"3\" keyEquivalent=\"+\" id=\"394\">\n                                            <connections>\n                                                <action selector=\"modifyFont:\" target=\"420\" id=\"425\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Smaller\" tag=\"4\" keyEquivalent=\"-\" id=\"395\">\n                                            <connections>\n                                                <action selector=\"modifyFont:\" target=\"420\" id=\"423\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem isSeparatorItem=\"YES\" id=\"396\"/>\n                                        <menuItem title=\"Kern\" id=\"397\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <menu key=\"submenu\" title=\"Kern\" id=\"415\">\n                                                <items>\n                                                    <menuItem title=\"Use Default\" id=\"416\">\n                                                        <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                                        <connections>\n                                                            <action selector=\"useStandardKerning:\" target=\"-1\" id=\"438\"/>\n                                                        </connections>\n                                                    </menuItem>\n                                                    <menuItem title=\"Use None\" id=\"417\">\n                                                        <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                                        <connections>\n                                                            <action selector=\"turnOffKerning:\" target=\"-1\" id=\"441\"/>\n                                                        </connections>\n                                                    </menuItem>\n                                                    <menuItem title=\"Tighten\" id=\"418\">\n                                                        <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                                        <connections>\n                                                            <action selector=\"tightenKerning:\" target=\"-1\" id=\"431\"/>\n                                                        </connections>\n                                                    </menuItem>\n                                                    <menuItem title=\"Loosen\" id=\"419\">\n                                                        <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                                        <connections>\n                                                            <action selector=\"loosenKerning:\" target=\"-1\" id=\"435\"/>\n                                                        </connections>\n                                                    </menuItem>\n                                                </items>\n                                            </menu>\n                                        </menuItem>\n                                        <menuItem title=\"Ligature\" id=\"398\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <menu key=\"submenu\" title=\"Ligature\" id=\"411\">\n                                                <items>\n                                                    <menuItem title=\"Use Default\" id=\"412\">\n                                                        <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                                        <connections>\n                                                            <action selector=\"useStandardLigatures:\" target=\"-1\" id=\"439\"/>\n                                                        </connections>\n                                                    </menuItem>\n                                                    <menuItem title=\"Use None\" id=\"413\">\n                                                        <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                                        <connections>\n                                                            <action selector=\"turnOffLigatures:\" target=\"-1\" id=\"440\"/>\n                                                        </connections>\n                                                    </menuItem>\n                                                    <menuItem title=\"Use All\" id=\"414\">\n                                                        <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                                        <connections>\n                                                            <action selector=\"useAllLigatures:\" target=\"-1\" id=\"434\"/>\n                                                        </connections>\n                                                    </menuItem>\n                                                </items>\n                                            </menu>\n                                        </menuItem>\n                                        <menuItem title=\"Baseline\" id=\"399\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <menu key=\"submenu\" title=\"Baseline\" id=\"405\">\n                                                <items>\n                                                    <menuItem title=\"Use Default\" id=\"406\">\n                                                        <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                                        <connections>\n                                                            <action selector=\"unscript:\" target=\"-1\" id=\"437\"/>\n                                                        </connections>\n                                                    </menuItem>\n                                                    <menuItem title=\"Superscript\" id=\"407\">\n                                                        <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                                        <connections>\n                                                            <action selector=\"superscript:\" target=\"-1\" id=\"430\"/>\n                                                        </connections>\n                                                    </menuItem>\n                                                    <menuItem title=\"Subscript\" id=\"408\">\n                                                        <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                                        <connections>\n                                                            <action selector=\"subscript:\" target=\"-1\" id=\"429\"/>\n                                                        </connections>\n                                                    </menuItem>\n                                                    <menuItem title=\"Raise\" id=\"409\">\n                                                        <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                                        <connections>\n                                                            <action selector=\"raiseBaseline:\" target=\"-1\" id=\"426\"/>\n                                                        </connections>\n                                                    </menuItem>\n                                                    <menuItem title=\"Lower\" id=\"410\">\n                                                        <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                                        <connections>\n                                                            <action selector=\"lowerBaseline:\" target=\"-1\" id=\"427\"/>\n                                                        </connections>\n                                                    </menuItem>\n                                                </items>\n                                            </menu>\n                                        </menuItem>\n                                        <menuItem title=\"Font Quality\" id=\"469\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <menu key=\"submenu\" title=\"Font Quality\" id=\"470\">\n                                                <items>\n                                                    <menuItem title=\"Default\" id=\"471\">\n                                                        <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                                        <connections>\n                                                            <action selector=\"setFontQuality:\" target=\"450\" id=\"475\"/>\n                                                        </connections>\n                                                    </menuItem>\n                                                    <menuItem title=\"Non-antialiased\" tag=\"1\" id=\"472\">\n                                                        <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                                        <connections>\n                                                            <action selector=\"setFontQuality:\" target=\"450\" id=\"476\"/>\n                                                        </connections>\n                                                    </menuItem>\n                                                    <menuItem title=\"Antialiased\" tag=\"2\" id=\"473\">\n                                                        <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                                        <connections>\n                                                            <action selector=\"setFontQuality:\" target=\"450\" id=\"477\"/>\n                                                        </connections>\n                                                    </menuItem>\n                                                    <menuItem title=\"LCD Optimized\" tag=\"3\" id=\"474\">\n                                                        <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                                        <connections>\n                                                            <action selector=\"setFontQuality:\" target=\"450\" id=\"478\"/>\n                                                        </connections>\n                                                    </menuItem>\n                                                </items>\n                                            </menu>\n                                        </menuItem>\n                                        <menuItem isSeparatorItem=\"YES\" id=\"400\"/>\n                                        <menuItem title=\"Show Colors\" keyEquivalent=\"C\" id=\"401\">\n                                            <connections>\n                                                <action selector=\"orderFrontColorPanel:\" target=\"-1\" id=\"433\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem isSeparatorItem=\"YES\" id=\"402\"/>\n                                        <menuItem title=\"Copy Style\" keyEquivalent=\"c\" id=\"403\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\" option=\"YES\" command=\"YES\"/>\n                                            <connections>\n                                                <action selector=\"copyFont:\" target=\"-1\" id=\"428\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Paste Style\" keyEquivalent=\"v\" id=\"404\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\" option=\"YES\" command=\"YES\"/>\n                                            <connections>\n                                                <action selector=\"pasteFont:\" target=\"-1\" id=\"436\"/>\n                                            </connections>\n                                        </menuItem>\n                                    </items>\n                                </menu>\n                            </menuItem>\n                            <menuItem title=\"Text\" id=\"378\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <menu key=\"submenu\" title=\"Text\" id=\"379\">\n                                    <items>\n                                        <menuItem title=\"Align Left\" keyEquivalent=\"{\" id=\"380\">\n                                            <connections>\n                                                <action selector=\"alignLeft:\" target=\"-1\" id=\"442\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Center\" keyEquivalent=\"|\" id=\"381\">\n                                            <connections>\n                                                <action selector=\"alignCenter:\" target=\"-1\" id=\"445\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Justify\" id=\"382\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"alignJustified:\" target=\"-1\" id=\"443\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Align Right\" keyEquivalent=\"}\" id=\"383\">\n                                            <connections>\n                                                <action selector=\"alignRight:\" target=\"-1\" id=\"447\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem isSeparatorItem=\"YES\" id=\"384\"/>\n                                        <menuItem title=\"Show Ruler\" id=\"385\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"toggleRuler:\" target=\"-1\" id=\"446\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Copy Ruler\" keyEquivalent=\"c\" id=\"386\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\" control=\"YES\" command=\"YES\"/>\n                                            <connections>\n                                                <action selector=\"copyRuler:\" target=\"-1\" id=\"444\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Paste Ruler\" keyEquivalent=\"v\" id=\"387\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\" control=\"YES\" command=\"YES\"/>\n                                            <connections>\n                                                <action selector=\"pasteRuler:\" target=\"-1\" id=\"448\"/>\n                                            </connections>\n                                        </menuItem>\n                                    </items>\n                                </menu>\n                            </menuItem>\n                        </items>\n                    </menu>\n                </menuItem>\n                <menuItem title=\"View\" id=\"295\">\n                    <menu key=\"submenu\" title=\"View\" id=\"296\">\n                        <items>\n                            <menuItem title=\"Show Toolbar\" keyEquivalent=\"t\" id=\"297\">\n                                <modifierMask key=\"keyEquivalentModifierMask\" option=\"YES\" command=\"YES\"/>\n                                <connections>\n                                    <action selector=\"toggleToolbarShown:\" target=\"-1\" id=\"366\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Customize Toolbar…\" id=\"298\">\n                                <connections>\n                                    <action selector=\"runToolbarCustomizationPalette:\" target=\"-1\" id=\"365\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem isSeparatorItem=\"YES\" id=\"K3d-cY-vZn\"/>\n                            <menuItem title=\"Add or Remove Extra Scintilla\" keyEquivalent=\"d\" id=\"zQU-z1-l5t\">\n                                <connections>\n                                    <action selector=\"addRemoveExtra:\" target=\"450\" id=\"9HG-Le-GbA\"/>\n                                </connections>\n                            </menuItem>\n                        </items>\n                    </menu>\n                </menuItem>\n                <menuItem title=\"Window\" id=\"19\">\n                    <menu key=\"submenu\" title=\"Window\" systemMenu=\"window\" id=\"24\">\n                        <items>\n                            <menuItem title=\"Minimize\" keyEquivalent=\"m\" id=\"23\">\n                                <connections>\n                                    <action selector=\"performMiniaturize:\" target=\"-1\" id=\"37\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Zoom\" id=\"239\">\n                                <connections>\n                                    <action selector=\"performZoom:\" target=\"-1\" id=\"240\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem isSeparatorItem=\"YES\" id=\"92\">\n                                <modifierMask key=\"keyEquivalentModifierMask\" command=\"YES\"/>\n                            </menuItem>\n                            <menuItem title=\"Bring All to Front\" id=\"5\">\n                                <connections>\n                                    <action selector=\"arrangeInFront:\" target=\"-1\" id=\"39\"/>\n                                </connections>\n                            </menuItem>\n                        </items>\n                    </menu>\n                </menuItem>\n                <menuItem title=\"Help\" id=\"103\" userLabel=\"1\">\n                    <menu key=\"submenu\" title=\"Help\" id=\"106\" userLabel=\"2\">\n                        <items>\n                            <menuItem title=\"NewApplication Help\" keyEquivalent=\"?\" id=\"111\">\n                                <connections>\n                                    <action selector=\"showHelp:\" target=\"-1\" id=\"360\"/>\n                                </connections>\n                            </menuItem>\n                        </items>\n                    </menu>\n                </menuItem>\n            </items>\n        </menu>\n        <window title=\"Window\" allowsToolTipsWhenApplicationIsInactive=\"NO\" autorecalculatesKeyViewLoop=\"NO\" releasedWhenClosed=\"NO\" animationBehavior=\"default\" id=\"371\">\n            <windowStyleMask key=\"styleMask\" titled=\"YES\" closable=\"YES\" miniaturizable=\"YES\" resizable=\"YES\"/>\n            <windowPositionMask key=\"initialPositionMask\" leftStrut=\"YES\" bottomStrut=\"YES\"/>\n            <rect key=\"contentRect\" x=\"335\" y=\"58\" width=\"982\" height=\"692\"/>\n            <rect key=\"screenRect\" x=\"0.0\" y=\"0.0\" width=\"1440\" height=\"878\"/>\n            <view key=\"contentView\" id=\"372\">\n                <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"982\" height=\"692\"/>\n                <autoresizingMask key=\"autoresizingMask\" flexibleMinX=\"YES\" widthSizable=\"YES\" flexibleMaxX=\"YES\" flexibleMinY=\"YES\" heightSizable=\"YES\" flexibleMaxY=\"YES\"/>\n                <subviews>\n                    <box autoresizesSubviews=\"NO\" borderType=\"line\" title=\"Scintilla Editor\" id=\"451\">\n                        <rect key=\"frame\" x=\"17\" y=\"16\" width=\"844\" height=\"606\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <view key=\"contentView\" id=\"e8h-ir-tqU\">\n                            <rect key=\"frame\" x=\"1\" y=\"1\" width=\"842\" height=\"590\"/>\n                            <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        </view>\n                    </box>\n                    <button verticalHuggingPriority=\"750\" id=\"452\">\n                        <rect key=\"frame\" x=\"872\" y=\"12\" width=\"96\" height=\"32\"/>\n                        <autoresizingMask key=\"autoresizingMask\" flexibleMinX=\"YES\" flexibleMaxY=\"YES\"/>\n                        <buttonCell key=\"cell\" type=\"push\" title=\"Quit\" bezelStyle=\"rounded\" alignment=\"center\" borderStyle=\"border\" imageScaling=\"proportionallyDown\" inset=\"2\" id=\"453\">\n                            <behavior key=\"behavior\" pushIn=\"YES\" lightByBackground=\"YES\" lightByGray=\"YES\"/>\n                            <font key=\"font\" metaFont=\"system\"/>\n                        </buttonCell>\n                        <connections>\n                            <action selector=\"terminate:\" target=\"-3\" id=\"455\"/>\n                        </connections>\n                    </button>\n                    <searchField wantsLayer=\"YES\" verticalHuggingPriority=\"750\" allowsCharacterPickerTouchBarItem=\"NO\" id=\"466\">\n                        <rect key=\"frame\" x=\"20\" y=\"630\" width=\"287\" height=\"22\"/>\n                        <autoresizingMask key=\"autoresizingMask\" flexibleMaxX=\"YES\" flexibleMinY=\"YES\"/>\n                        <searchFieldCell key=\"cell\" scrollable=\"YES\" lineBreakMode=\"clipping\" selectable=\"YES\" editable=\"YES\" borderStyle=\"bezel\" bezelStyle=\"round\" id=\"467\">\n                            <font key=\"font\" metaFont=\"system\"/>\n                            <color key=\"textColor\" name=\"controlTextColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                            <color key=\"backgroundColor\" name=\"textBackgroundColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                        </searchFieldCell>\n                        <connections>\n                            <action selector=\"searchText:\" target=\"450\" id=\"468\"/>\n                        </connections>\n                    </searchField>\n                </subviews>\n            </view>\n        </window>\n        <customObject id=\"420\" customClass=\"NSFontManager\"/>\n        <customObject id=\"450\" customClass=\"AppController\">\n            <connections>\n                <outlet property=\"mEditHost\" destination=\"451\" id=\"454\"/>\n            </connections>\n        </customObject>\n    </objects>\n</document>\n"
  },
  {
    "path": "scintilla/cocoa/ScintillaTest/main.m",
    "content": "/**\r\n * main.m\r\n * ScintillaTest\r\n *\r\n * Created by Mike Lischke on 02.04.09.\r\n * Copyright Sun Microsystems, Inc 2009. All rights reserved.\r\n * This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).\r\n */\r\n\r\n#import <Cocoa/Cocoa.h>\r\n\r\nint main(int argc, char *argv[])\r\n{\r\n    return NSApplicationMain(argc,  (const char **) argv);\r\n}\r\n"
  },
  {
    "path": "scintilla/cocoa/ScintillaView.h",
    "content": "\r\n/**\r\n * Declaration of the native Cocoa View that serves as container for the scintilla parts.\r\n * @file ScintillaView.h\r\n *\r\n * Created by Mike Lischke.\r\n *\r\n * Copyright 2011, 2013, Oracle and/or its affiliates. All rights reserved.\r\n * Copyright 2009, 2011 Sun Microsystems, Inc. All rights reserved.\r\n * This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).\r\n */\r\n\r\n#import <Cocoa/Cocoa.h>\r\n\r\n#import \"Scintilla.h\"\r\n\r\n#import \"InfoBarCommunicator.h\"\r\n\r\n/**\r\n * Scintilla sends these two messages to the notify handler. Please refer\r\n * to the Windows API doc for details about the message format.\r\n */\r\n#define WM_COMMAND 1001\r\n#define WM_NOTIFY 1002\r\n\r\n/**\r\n * On the Mac, there is no WM_COMMAND or WM_NOTIFY message that can be sent\r\n * back to the parent. Therefore, there must be a callback handler that acts\r\n * like a Windows WndProc, where Scintilla can send notifications to. Use\r\n * ScintillaView registerNotifyCallback() to register such a handler.\r\n * Message format is:\r\n * <br>\r\n * WM_COMMAND: HIWORD (wParam) = notification code, LOWORD (wParam) = control ID, lParam = ScintillaCocoa*\r\n * <br>\r\n * WM_NOTIFY: wParam = control ID, lParam = ptr to SCNotification structure, with hwndFrom set to ScintillaCocoa*\r\n */\r\ntypedef void(*SciNotifyFunc)(intptr_t windowid, unsigned int iMessage, uintptr_t wParam, uintptr_t lParam);\r\n\r\nextern NSString *const SCIUpdateUINotification;\r\n\r\n@protocol ScintillaNotificationProtocol\r\n- (void) notification: (SCNotification *) notification;\r\n@end\r\n\r\n/**\r\n * SCIScrollView provides pre-macOS 10.14 tiling behavior.\r\n */\r\n@interface SCIScrollView : NSScrollView;\r\n\r\n@end\r\n\r\n/**\r\n * SCIMarginView draws line numbers and other margins next to the text view.\r\n */\r\n@interface SCIMarginView : NSRulerView;\r\n\r\n@end\r\n\r\n/**\r\n * SCIContentView is the Cocoa interface to the Scintilla backend. It handles text input and\r\n * provides a canvas for painting the output.\r\n */\r\n@interface SCIContentView : NSView <\r\n\tNSTextInputClient,\r\n\tNSUserInterfaceValidations,\r\n\tNSDraggingSource,\r\n\tNSDraggingDestination,\r\n\tNSAccessibilityStaticText>;\r\n\r\n- (void) setCursor: (int) cursor; // Needed by ScintillaCocoa\r\n\r\n@end\r\n\r\n/**\r\n * ScintillaView is the class instantiated by client code.\r\n * It contains an NSScrollView which contains a SCIMarginView and a SCIContentView.\r\n * It is responsible for providing an API and communicating to a delegate.\r\n */\r\n@interface ScintillaView : NSView <InfoBarCommunicator, ScintillaNotificationProtocol>;\r\n\r\n@property(nonatomic, unsafe_unretained) id<ScintillaNotificationProtocol> delegate;\r\n@property(nonatomic, readonly) NSScrollView *scrollView;\r\n\r\n+ (Class) contentViewClass;\r\n\r\n- (void) notify: (NotificationType) type message: (NSString *) message location: (NSPoint) location\r\n\t  value: (float) value;\r\n- (void) setCallback: (id <InfoBarCommunicator>) callback;\r\n\r\n- (void) suspendDrawing: (BOOL) suspend;\r\n- (void) notification: (SCNotification *) notification;\r\n\r\n- (void) updateIndicatorIME;\r\n\r\n// Scroller handling\r\n- (void) setMarginWidth: (int) width;\r\n- (SCIContentView *) content;\r\n- (void) updateMarginCursors;\r\n\r\n// NSTextView compatibility layer.\r\n- (NSString *) string;\r\n- (void) setString: (NSString *) aString;\r\n- (void) insertText: (id) aString;\r\n- (void) setEditable: (BOOL) editable;\r\n- (BOOL) isEditable;\r\n- (NSRange) selectedRange;\r\n- (NSRange) selectedRangePositions;\r\n\r\n- (NSString *) selectedString;\r\n\r\n- (void) deleteRange: (NSRange) range;\r\n\r\n- (void) setFontName: (NSString *) font\r\n\t\tsize: (int) size\r\n\t\tbold: (BOOL) bold\r\n\t      italic: (BOOL) italic;\r\n\r\n// Native call through to the backend.\r\n+ (sptr_t) directCall: (ScintillaView *) sender message: (unsigned int) message wParam: (uptr_t) wParam\r\n\t       lParam: (sptr_t) lParam;\r\n- (sptr_t) message: (unsigned int) message wParam: (uptr_t) wParam lParam: (sptr_t) lParam;\r\n- (sptr_t) message: (unsigned int) message wParam: (uptr_t) wParam;\r\n- (sptr_t) message: (unsigned int) message;\r\n\r\n// Back end properties getters and setters.\r\n- (void) setGeneralProperty: (int) property parameter: (long) parameter value: (long) value;\r\n- (void) setGeneralProperty: (int) property value: (long) value;\r\n\r\n- (long) getGeneralProperty: (int) property;\r\n- (long) getGeneralProperty: (int) property parameter: (long) parameter;\r\n- (long) getGeneralProperty: (int) property parameter: (long) parameter extra: (long) extra;\r\n- (long) getGeneralProperty: (int) property ref: (const void *) ref;\r\n- (void) setColorProperty: (int) property parameter: (long) parameter value: (NSColor *) value;\r\n- (void) setColorProperty: (int) property parameter: (long) parameter fromHTML: (NSString *) fromHTML;\r\n- (NSColor *) getColorProperty: (int) property parameter: (long) parameter;\r\n- (void) setReferenceProperty: (int) property parameter: (long) parameter value: (const void *) value;\r\n- (const void *) getReferenceProperty: (int) property parameter: (long) parameter;\r\n- (void) setStringProperty: (int) property parameter: (long) parameter value: (NSString *) value;\r\n- (NSString *) getStringProperty: (int) property parameter: (long) parameter;\r\n- (void) setLexerProperty: (NSString *) name value: (NSString *) value;\r\n- (NSString *) getLexerProperty: (NSString *) name;\r\n\r\n// The delegate property should be used instead of registerNotifyCallback which is deprecated.\r\n- (void) registerNotifyCallback: (intptr_t) windowid value: (SciNotifyFunc) callback __attribute__ ( (deprecated)) ;\r\n\r\n- (void) setInfoBar: (NSView <InfoBarCommunicator> *) aView top: (BOOL) top;\r\n- (void) setStatusText: (NSString *) text;\r\n\r\n- (BOOL) findAndHighlightText: (NSString *) searchText\r\n\t\t    matchCase: (BOOL) matchCase\r\n\t\t    wholeWord: (BOOL) wholeWord\r\n\t\t     scrollTo: (BOOL) scrollTo\r\n\t\t\t wrap: (BOOL) wrap;\r\n\r\n- (BOOL) findAndHighlightText: (NSString *) searchText\r\n\t\t    matchCase: (BOOL) matchCase\r\n\t\t    wholeWord: (BOOL) wholeWord\r\n\t\t     scrollTo: (BOOL) scrollTo\r\n\t\t\t wrap: (BOOL) wrap\r\n\t\t    backwards: (BOOL) backwards;\r\n\r\n- (int) findAndReplaceText: (NSString *) searchText\r\n\t\t    byText: (NSString *) newText\r\n\t\t matchCase: (BOOL) matchCase\r\n\t\t wholeWord: (BOOL) wholeWord\r\n\t\t     doAll: (BOOL) doAll;\r\n\r\n@end\r\n"
  },
  {
    "path": "scintilla/cocoa/ScintillaView.mm",
    "content": "\r\n/**\r\n * Implementation of the native Cocoa View that serves as container for the scintilla parts.\r\n * @file ScintillaView.mm\r\n *\r\n * Created by Mike Lischke.\r\n *\r\n * Copyright 2011, 2013, Oracle and/or its affiliates. All rights reserved.\r\n * Copyright 2009, 2011 Sun Microsystems, Inc. All rights reserved.\r\n * This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).\r\n */\r\n\r\n#include <cmath>\r\n\r\n#include <string_view>\r\n#include <vector>\r\n#include <optional>\r\n\r\n#import \"ScintillaTypes.h\"\r\n#import \"ScintillaMessages.h\"\r\n#import \"ScintillaStructures.h\"\r\n\r\n#import \"Debugging.h\"\r\n#import \"Geometry.h\"\r\n#import \"Platform.h\"\r\n#import \"ScintillaView.h\"\r\n#import \"ScintillaCocoa.h\"\r\n\r\n#if !__has_feature(objc_arc)\r\n#error ARC must be enabled\r\n#endif\r\n\r\nusing namespace Scintilla;\r\nusing namespace Scintilla::Internal;\r\n\r\n// Add backend property to ScintillaView as a private category.\r\n// Specified here as backend accessed by SCIMarginView and SCIContentView.\r\n@interface ScintillaView()\r\n@property(nonatomic, readonly) Scintilla::Internal::ScintillaCocoa *backend;\r\n@end\r\n\r\n// Two additional cursors we need, which aren't provided by Cocoa.\r\nstatic NSCursor *reverseArrowCursor;\r\nstatic NSCursor *waitCursor;\r\n\r\nNSString *const SCIUpdateUINotification = @\"SCIUpdateUI\";\r\n\r\n/**\r\n * Provide an NSCursor object that matches the Window::Cursor enumeration.\r\n */\r\nstatic NSCursor *cursorFromEnum(Window::Cursor cursor) {\r\n\tswitch (cursor) {\r\n\tcase Window::Cursor::text:\r\n\t\treturn [NSCursor IBeamCursor];\r\n\tcase Window::Cursor::arrow:\r\n\t\treturn [NSCursor arrowCursor];\r\n\tcase Window::Cursor::wait:\r\n\t\treturn waitCursor;\r\n\tcase Window::Cursor::horizontal:\r\n\t\treturn [NSCursor resizeLeftRightCursor];\r\n\tcase Window::Cursor::vertical:\r\n\t\treturn [NSCursor resizeUpDownCursor];\r\n\tcase Window::Cursor::reverseArrow:\r\n\t\treturn reverseArrowCursor;\r\n\tcase Window::Cursor::up:\r\n\tdefault:\r\n\t\treturn [NSCursor arrowCursor];\r\n\t}\r\n}\r\n\r\n@implementation SCIScrollView\r\n- (void) tile {\r\n\t[super tile];\r\n\r\n#if defined(MAC_OS_X_VERSION_10_14)\r\n\tif (std::floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_13) {\r\n\t\tNSRect frame = self.contentView.frame;\r\n\t\tframe.origin.x = self.verticalRulerView.requiredThickness;\r\n\t\tframe.size.width -= frame.origin.x;\r\n\t\tself.contentView.frame = frame;\r\n\t}\r\n#endif\r\n}\r\n@end\r\n\r\n// Add marginWidth and owner properties as a private category.\r\n@interface SCIMarginView()\r\n@property(assign) int marginWidth;\r\n@property(nonatomic, weak) ScintillaView *owner;\r\n@end\r\n\r\n@implementation SCIMarginView {\r\n\tint marginWidth;\r\n\tScintillaView *__weak owner;\r\n\tNSMutableArray *currentCursors;\r\n}\r\n\r\n@synthesize marginWidth, owner;\r\n\r\n- (instancetype) initWithScrollView: (NSScrollView *) aScrollView {\r\n\tself = [super initWithScrollView: aScrollView orientation: NSVerticalRuler];\r\n\tif (self != nil) {\r\n\t\towner = nil;\r\n\t\tmarginWidth = 20;\r\n\t\tcurrentCursors = [NSMutableArray arrayWithCapacity: 0];\r\n\t\tfor (size_t i=0; i<=SC_MAX_MARGIN; i++) {\r\n\t\t\t[currentCursors addObject: reverseArrowCursor];\r\n\t\t}\r\n\t\tself.clientView = aScrollView.documentView;\r\n\t\tif ([self respondsToSelector: @selector(setAccessibilityLabel:)])\r\n\t\t\tself.accessibilityLabel = @\"Scintilla Margin\";\r\n\t}\r\n\treturn self;\r\n}\r\n\r\n\r\n- (void) setFrame: (NSRect) frame {\r\n\tsuper.frame = frame;\r\n\r\n\t[self.window invalidateCursorRectsForView: self];\r\n}\r\n\r\n- (CGFloat) requiredThickness {\r\n\treturn marginWidth;\r\n}\r\n\r\n- (void) drawHashMarksAndLabelsInRect: (NSRect) aRect {\r\n\tif (owner) {\r\n\t\tNSRect contentRect = self.scrollView.contentView.bounds;\r\n\t\tNSRect marginRect = self.bounds;\r\n\t\t// Ensure paint to bottom of view to avoid glitches\r\n\t\tif (marginRect.size.height > contentRect.size.height) {\r\n\t\t\t// Legacy scroll bar mode leaves a poorly painted corner\r\n\t\t\taRect = marginRect;\r\n\t\t}\r\n\t\towner.backend->PaintMargin(aRect);\r\n\t}\r\n}\r\n\r\n/**\r\n * Called by the framework if it wants to show a context menu for the margin.\r\n */\r\n- (NSMenu *) menuForEvent: (NSEvent *) theEvent {\r\n\tNSMenu *menu = [owner menuForEvent: theEvent];\r\n\tif (menu) {\r\n\t\treturn menu;\r\n\t} else if (owner.backend->ShouldDisplayPopupOnMargin()) {\r\n\t\treturn owner.backend->CreateContextMenu(theEvent);\r\n\t} else {\r\n\t\treturn nil;\r\n\t}\r\n}\r\n\r\n- (void) mouseDown: (NSEvent *) theEvent {\r\n\tNSClipView *textView = self.scrollView.contentView;\r\n\t[textView.window makeFirstResponder: textView];\r\n\towner.backend->MouseDown(theEvent);\r\n}\r\n\r\n- (void) rightMouseDown: (NSEvent *) theEvent {\r\n\t[NSMenu popUpContextMenu: [self menuForEvent: theEvent] withEvent: theEvent forView: self];\r\n\r\n\towner.backend->RightMouseDown(theEvent);\r\n}\r\n\r\n- (void) mouseDragged: (NSEvent *) theEvent {\r\n\towner.backend->MouseMove(theEvent);\r\n}\r\n\r\n- (void) mouseMoved: (NSEvent *) theEvent {\r\n\towner.backend->MouseMove(theEvent);\r\n}\r\n\r\n- (void) mouseUp: (NSEvent *) theEvent {\r\n\towner.backend->MouseUp(theEvent);\r\n}\r\n\r\n// Not a simple button so return failure\r\n- (BOOL) accessibilityPerformPress {\r\n\treturn NO;\r\n}\r\n\r\n/**\r\n * This method is called to give us the opportunity to define our mouse sensitive rectangle.\r\n */\r\n- (void) resetCursorRects {\r\n\t[super resetCursorRects];\r\n\r\n\tint x = 0;\r\n\tNSRect marginRect = self.bounds;\r\n\tsize_t co = currentCursors.count;\r\n\tfor (size_t i=0; i<co; i++) {\r\n\t\tlong cursType = owner.backend->WndProc(Message::GetMarginCursorN, i, 0);\r\n\t\tlong width =owner.backend->WndProc(Message::GetMarginWidthN, i, 0);\r\n\t\tNSCursor *cc = cursorFromEnum(static_cast<Window::Cursor>(cursType));\r\n\t\tcurrentCursors[i] = cc;\r\n\t\tmarginRect.origin.x = x;\r\n\t\tmarginRect.size.width = width;\r\n\t\t[self addCursorRect: marginRect cursor: cc];\r\n\t\tx += width;\r\n\t}\r\n}\r\n\r\n- (void) drawRect: (NSRect) rect {\r\n\tif (!NSContainsRect(self.bounds, rect)) {\r\n\t    rect = self.bounds;\r\n\t}\r\n\t[super drawRect:rect];\r\n}\r\n\r\n@end\r\n\r\n// Add owner property as a private category.\r\n@interface SCIContentView()\r\n@property(nonatomic, weak) ScintillaView *owner;\r\n@end\r\n\r\n@implementation SCIContentView {\r\n\tScintillaView *__weak mOwner;\r\n\tNSCursor *mCurrentCursor;\r\n\tNSTrackingArea *trackingArea;\r\n\r\n\t// Set when we are in composition mode and partial input is displayed.\r\n\tNSRange mMarkedTextRange;\r\n}\r\n\r\n@synthesize owner = mOwner;\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n- (NSView *) initWithFrame: (NSRect) frame {\r\n\tself = [super initWithFrame: frame];\r\n\r\n\tif (self != nil) {\r\n\t\t// Some initialization for our view.\r\n\t\tmCurrentCursor = [NSCursor arrowCursor];\r\n\t\ttrackingArea = nil;\r\n\t\tmMarkedTextRange = NSMakeRange(NSNotFound, 0);\r\n\r\n\t\tif (@available(macOS 10.13, *)) {\r\n\t\t\t[self registerForDraggedTypes: @[NSPasteboardTypeString, ScintillaRecPboardType, NSPasteboardTypeFileURL]];\r\n\t\t} else {\r\n\t\t\t// Use old deprecated type\r\n#pragma clang diagnostic push\r\n#pragma clang diagnostic ignored \"-Wdeprecated-declarations\"\r\n\t\t\t[self registerForDraggedTypes: @[NSPasteboardTypeString, ScintillaRecPboardType, NSFilenamesPboardType]];\r\n#pragma clang diagnostic pop\r\n\t\t}\r\n\r\n\t\t// Set up accessibility in the text role\r\n\t\tif ([self respondsToSelector: @selector(setAccessibilityElement:)]) {\r\n\t\t\tself.accessibilityElement = TRUE;\r\n\t\t\tself.accessibilityEnabled = TRUE;\r\n\t\t\tself.accessibilityLabel = NSLocalizedString(@\"Scintilla\", nil);\t// No real localization\r\n\t\t\tself.accessibilityRoleDescription = @\"source code editor\";\r\n\t\t\tself.accessibilityRole = NSAccessibilityTextAreaRole;\r\n\t\t\tself.accessibilityIdentifier = @\"Scintilla\";\r\n\t\t}\r\n\t}\r\n\r\n\treturn self;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * When the view is resized or scrolled we need to update our tracking area.\r\n */\r\n- (void) updateTrackingAreas {\r\n\tif (trackingArea) {\r\n\t\t[self removeTrackingArea: trackingArea];\r\n\t}\r\n\r\n\tint opts = (NSTrackingActiveAlways | NSTrackingInVisibleRect | NSTrackingMouseEnteredAndExited | NSTrackingMouseMoved);\r\n\ttrackingArea = [[NSTrackingArea alloc] initWithRect: self.bounds\r\n\t\t\t\t\t\t    options: opts\r\n\t\t\t\t\t\t      owner: self\r\n\t\t\t\t\t\t   userInfo: nil];\r\n\t[self addTrackingArea: trackingArea];\r\n\t[super updateTrackingAreas];\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * When the view is resized we need to let the backend know.\r\n */\r\n- (void) setFrame: (NSRect) frame {\r\n\tsuper.frame = frame;\r\n\r\n\tmOwner.backend->Resize();\r\n\r\n\t[super prepareContentInRect: [self visibleRect]];\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Called by the backend if a new cursor must be set for the view.\r\n */\r\n- (void) setCursor: (int) cursor {\r\n\tWindow::Cursor eCursor = (Window::Cursor)cursor;\r\n\tmCurrentCursor = cursorFromEnum(eCursor);\r\n\r\n\t// Trigger recreation of the cursor rectangle(s).\r\n\t[self.window invalidateCursorRectsForView: self];\r\n\t[mOwner updateMarginCursors];\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * This method is called to give us the opportunity to define our mouse sensitive rectangle.\r\n */\r\n- (void) resetCursorRects {\r\n\t[super resetCursorRects];\r\n\r\n\t// We only have one cursor rect: our bounds.\r\n\tconst NSRect visibleBounds = mOwner.backend->GetBounds();\r\n\t[self addCursorRect: visibleBounds cursor: mCurrentCursor];\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Called before repainting.\r\n */\r\n- (void) viewWillDraw {\r\n\tif (!mOwner) {\r\n\t\t[super viewWillDraw];\r\n\t\treturn;\r\n\t}\r\n\r\n\tconst NSRect *rects;\r\n\tNSInteger nRects = 0;\r\n\t[self getRectsBeingDrawn: &rects count: &nRects];\r\n\tif (nRects > 0) {\r\n\t\tNSRect rectUnion = rects[0];\r\n\t\tfor (int i=0; i<nRects; i++) {\r\n\t\t\trectUnion = NSUnionRect(rectUnion, rects[i]);\r\n\t\t}\r\n\t\tmOwner.backend->WillDraw(rectUnion);\r\n\t}\r\n\t[super viewWillDraw];\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Called before responsive scrolling overdraw.\r\n */\r\n- (void) prepareContentInRect: (NSRect) rect {\r\n\tif (mOwner)\r\n\t\tmOwner.backend->WillDraw(rect);\r\n#if MAC_OS_X_VERSION_MAX_ALLOWED > 1080\r\n\t[super prepareContentInRect: rect];\r\n#endif\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Gets called by the runtime when the effective appearance changes.\r\n */\r\n- (void) viewDidChangeEffectiveAppearance {\r\n\tif (mOwner.backend) {\r\n\t\tmOwner.backend->UpdateBaseElements();\r\n\t}\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Gets called by the runtime when the view needs repainting.\r\n */\r\n- (void) drawRect: (NSRect) rect {\r\n\tCGContextRef context = CGContextCurrent();\r\n\r\n\tif (!mOwner.backend->Draw(rect, context)) {\r\n\t\tdispatch_async(dispatch_get_main_queue(), ^ {\r\n\t\t\t[self setNeedsDisplay: YES];\r\n\t\t});\r\n\t}\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Windows uses a client coordinate system where the upper left corner is the origin in a window\r\n * (and so does Scintilla). We have to adjust for that. However by returning YES here, we are\r\n * already done with that.\r\n * Note that because of returning YES here most coordinates we use now (e.g. for painting,\r\n * invalidating rectangles etc.) are given with +Y pointing down!\r\n */\r\n- (BOOL) isFlipped {\r\n\treturn YES;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n- (BOOL) isOpaque {\r\n\treturn YES;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Implement the \"click through\" behavior by telling the caller we accept the first mouse event too.\r\n */\r\n- (BOOL) acceptsFirstMouse: (NSEvent *) theEvent {\r\n#pragma unused(theEvent)\r\n\treturn YES;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Make this view accepting events as first responder.\r\n */\r\n- (BOOL) acceptsFirstResponder {\r\n\treturn YES;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Called by the framework if it wants to show a context menu for the editor.\r\n */\r\n- (NSMenu *) menuForEvent: (NSEvent *) theEvent {\r\n\tNSMenu *menu = [mOwner menuForEvent: theEvent];\r\n\tif (menu) {\r\n\t\treturn menu;\r\n\t} else if (mOwner.backend->ShouldDisplayPopupOnText()) {\r\n\t\treturn mOwner.backend->CreateContextMenu(theEvent);\r\n\t} else {\r\n\t\treturn nil;\r\n\t}\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n// Adoption of NSTextInputClient protocol.\r\n\r\n- (NSAttributedString *) attributedSubstringForProposedRange: (NSRange) aRange actualRange: (NSRangePointer) actualRange {\r\n\tconst NSInteger lengthCharacters = self.accessibilityNumberOfCharacters;\r\n\tif (aRange.location > lengthCharacters) {\r\n\t\treturn nil;\r\n\t}\r\n\tconst NSRange posRange = mOwner.backend->PositionsFromCharacters(aRange);\r\n\t// The backend validated aRange and may have removed characters beyond the end of the document.\r\n\tconst NSRange charRange = mOwner.backend->CharactersFromPositions(posRange);\r\n\tif (!NSEqualRanges(aRange, charRange)) {\r\n\t\t*actualRange = charRange;\r\n\t}\r\n\r\n\t[mOwner message: SCI_SETTARGETRANGE wParam: posRange.location lParam: NSMaxRange(posRange)];\r\n\tstd::string text([mOwner message: SCI_TARGETASUTF8], 0);\r\n\t[mOwner message: SCI_TARGETASUTF8 wParam: 0 lParam: reinterpret_cast<sptr_t>(&text[0])];\r\n\ttext = FixInvalidUTF8(text);\r\n\tNSString *result = @(text.c_str());\r\n\tNSMutableAttributedString *asResult = [[NSMutableAttributedString alloc] initWithString: result];\r\n\r\n\tconst NSRange rangeAS = NSMakeRange(0, asResult.length);\r\n\t// SCI_GETSTYLEAT reports a signed byte but want an unsigned to index into styles\r\n\tconst char styleByte = static_cast<char>([mOwner message: SCI_GETSTYLEAT wParam: posRange.location]);\r\n\tconst long style = static_cast<unsigned char>(styleByte);\r\n\tstd::string fontName([mOwner message: SCI_STYLEGETFONT wParam: style lParam: 0], 0);\r\n\t[mOwner message: SCI_STYLEGETFONT wParam: style lParam: (sptr_t)&fontName[0]];\r\n\tconst CGFloat fontSize = [mOwner message: SCI_STYLEGETSIZEFRACTIONAL wParam: style] / 100.0f;\r\n\tNSString *sFontName = @(fontName.c_str());\r\n\tNSFont *font = [NSFont fontWithName: sFontName size: fontSize];\r\n\tif (font) {\r\n\t\t[asResult addAttribute: NSFontAttributeName value: font range: rangeAS];\r\n\t}\r\n\r\n\treturn asResult;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n- (NSUInteger) characterIndexForPoint: (NSPoint) point {\r\n\tconst NSRect rectPoint = {point, NSZeroSize};\r\n\tconst NSRect rectInWindow = [self.window convertRectFromScreen: rectPoint];\r\n\tconst NSRect rectLocal = [self.superview.superview convertRect: rectInWindow fromView: nil];\r\n\r\n\tconst long position = [mOwner message: SCI_CHARPOSITIONFROMPOINT\r\n\t\t\t\t       wParam: rectLocal.origin.x\r\n\t\t\t\t       lParam: rectLocal.origin.y];\r\n\tif (position == Sci::invalidPosition) {\r\n\t\treturn NSNotFound;\r\n\t} else {\r\n\t\tconst NSRange index = mOwner.backend->CharactersFromPositions(NSMakeRange(position, 0));\r\n\t\treturn index.location;\r\n\t}\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n- (void) doCommandBySelector: (SEL) selector {\r\n#pragma clang diagnostic push\r\n#pragma clang diagnostic ignored \"-Warc-performSelector-leaks\"\r\n\tif ([self respondsToSelector: selector])\r\n\t\t[self performSelector: selector withObject: nil];\r\n#pragma clang diagnostic pop\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n- (NSRect) firstRectForCharacterRange: (NSRange) aRange actualRange: (NSRangePointer) actualRange {\r\n#pragma unused(actualRange)\r\n\tconst NSRange posRange = mOwner.backend->PositionsFromCharacters(aRange);\r\n\r\n\tNSRect rect;\r\n\trect.origin.x = [mOwner message: SCI_POINTXFROMPOSITION wParam: 0 lParam: posRange.location];\r\n\trect.origin.y = [mOwner message: SCI_POINTYFROMPOSITION wParam: 0 lParam: posRange.location];\r\n\tconst NSUInteger rangeEnd = NSMaxRange(posRange);\r\n\trect.size.width = [mOwner message: SCI_POINTXFROMPOSITION wParam: 0 lParam: rangeEnd] - rect.origin.x;\r\n\trect.size.height = [mOwner message: SCI_POINTYFROMPOSITION wParam: 0 lParam: rangeEnd] - rect.origin.y;\r\n\trect.size.height += [mOwner message: SCI_TEXTHEIGHT wParam: 0 lParam: 0];\r\n\tconst NSRect rectInWindow = [self.superview.superview convertRect: rect toView: nil];\r\n\tconst NSRect rectScreen = [self.window convertRectToScreen: rectInWindow];\r\n\r\n\treturn rectScreen;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n- (BOOL) hasMarkedText {\r\n\treturn mMarkedTextRange.length > 0;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * General text input. Used to insert new text at the current input position, replacing the current\r\n * selection if there is any.\r\n * First removes the replacementRange.\r\n */\r\n- (void) insertText: (id) aString replacementRange: (NSRange) replacementRange {\r\n\tif ((mMarkedTextRange.location != NSNotFound) && (replacementRange.location != NSNotFound)) {\r\n\t\tNSLog(@\"Trying to insertText when there is both a marked range and a replacement range\");\r\n\t}\r\n\r\n\t// Remove any previously marked text first.\r\n\tmOwner.backend->CompositionUndo();\r\n\tif (mMarkedTextRange.location != NSNotFound) {\r\n\t\tconst NSRange posRangeMark = mOwner.backend->PositionsFromCharacters(mMarkedTextRange);\r\n\t\t[mOwner message: SCI_SETEMPTYSELECTION wParam: posRangeMark.location];\r\n\t}\r\n\tmMarkedTextRange = NSMakeRange(NSNotFound, 0);\r\n\r\n\tif (replacementRange.location == (NSNotFound-1))\r\n\t\t// This occurs when the accent popup is visible and menu selected.\r\n\t\t// Its replacing a non-existent position so do nothing.\r\n\t\treturn;\r\n\r\n\tif (replacementRange.location != NSNotFound) {\r\n\t\tconst NSRange posRangeReplacement = mOwner.backend->PositionsFromCharacters(replacementRange);\r\n\t\t[mOwner message: SCI_DELETERANGE\r\n\t\t\t wParam: posRangeReplacement.location\r\n\t\t\t lParam: posRangeReplacement.length];\r\n\t\t[mOwner message: SCI_SETEMPTYSELECTION wParam: posRangeReplacement.location];\r\n\t}\r\n\r\n\tNSString *newText = @\"\";\r\n\tif ([aString isKindOfClass: [NSString class]])\r\n\t\tnewText = (NSString *) aString;\r\n\telse if ([aString isKindOfClass: [NSAttributedString class]])\r\n\t\tnewText = (NSString *) [aString string];\r\n\r\n\tmOwner.backend->InsertText(newText, CharacterSource::DirectInput);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n- (NSRange) markedRange {\r\n\treturn mMarkedTextRange;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n- (NSRange) selectedRange {\r\n\tconst NSRange posRangeSel = [mOwner selectedRangePositions];\r\n\tif (posRangeSel.length == 0) {\r\n\t\tNSTextInputContext *tic = [NSTextInputContext currentInputContext];\r\n\t\t// Chinese input causes malloc crash when empty selection returned with actual\r\n\t\t// position so return NSNotFound.\r\n\t\t// If this is applied to European input, it stops the accented character\r\n\t\t// chooser from appearing.\r\n\t\t// May need to add more input source names.\r\n\t\tif ([tic.selectedKeyboardInputSource\r\n\t\t\t\tisEqualToString: @\"com.apple.inputmethod.TCIM.Cangjie\"]) {\r\n\t\t\treturn NSMakeRange(NSNotFound, 0);\r\n\t\t}\r\n\t}\r\n\treturn mOwner.backend->CharactersFromPositions(posRangeSel);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Called by the input manager to set text which might be combined with further input to form\r\n * the final text (e.g. composition of ^ and a to â).\r\n *\r\n * @param aString The text to insert, either what has been marked already or what is selected already\r\n *                or simply added at the current insertion point. Depending on what is available.\r\n * @param range The range of the new text to select (given relative to the insertion point of the new text).\r\n * @param replacementRange The range to remove before insertion.\r\n */\r\n- (void) setMarkedText: (id) aString selectedRange: (NSRange) range replacementRange: (NSRange) replacementRange {\r\n\tNSString *newText = @\"\";\r\n\tif ([aString isKindOfClass: [NSString class]])\r\n\t\tnewText = (NSString *) aString;\r\n\telse if ([aString isKindOfClass: [NSAttributedString class]])\r\n\t\tnewText = (NSString *) [aString string];\r\n\r\n\t// Replace marked text if there is one.\r\n\tif (mMarkedTextRange.length > 0) {\r\n\t\tmOwner.backend->CompositionUndo();\r\n\t\tif (replacementRange.location != NSNotFound) {\r\n\t\t\t// This situation makes no sense and has not occurred in practice.\r\n\t\t\tNSLog(@\"Can not handle a replacement range when there is also a marked range\");\r\n\t\t} else {\r\n\t\t\treplacementRange = mMarkedTextRange;\r\n\t\t\tconst NSRange posRangeMark = mOwner.backend->PositionsFromCharacters(mMarkedTextRange);\r\n\t\t\t[mOwner message: SCI_SETEMPTYSELECTION wParam: posRangeMark.location];\r\n\t\t}\r\n\t} else {\r\n\t\t// Must perform deletion before entering composition mode or else\r\n\t\t// both document and undo history will not contain the deleted text\r\n\t\t// leading to an inaccurate and unusable undo history.\r\n\r\n\t\t// Convert selection virtual space into real space\r\n\t\tmOwner.backend->ConvertSelectionVirtualSpace();\r\n\r\n\t\tif (replacementRange.location != NSNotFound) {\r\n\t\t\tconst NSRange posRangeReplacement = mOwner.backend->PositionsFromCharacters(replacementRange);\r\n\t\t\t[mOwner message: SCI_DELETERANGE\r\n\t\t\t\t wParam: posRangeReplacement.location\r\n\t\t\t\t lParam: posRangeReplacement.length];\r\n\t\t} else { // No marked or replacement range, so replace selection\r\n\t\t\tif (!mOwner.backend->ScintillaCocoa::ClearAllSelections()) {\r\n\t\t\t\t// Some of the selection is protected so can not perform composition here\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t// Ensure only a single selection.\r\n\t\t\tmOwner.backend->SelectOnlyMainSelection();\r\n\t\t\tconst NSRange posRangeSel = [mOwner selectedRangePositions];\r\n\t\t\treplacementRange = mOwner.backend->CharactersFromPositions(posRangeSel);\r\n\t\t}\r\n\t}\r\n\r\n\t// To support IME input to multiple selections, the following code would\r\n\t// need to insert newText at each selection, mark each piece of new text and then\r\n\t// select range relative to each insertion.\r\n\r\n\tif (newText.length) {\r\n\t\t// Switching into composition.\r\n\t\tmOwner.backend->CompositionStart();\r\n\r\n\t\tNSRange posRangeCurrent = mOwner.backend->PositionsFromCharacters(NSMakeRange(replacementRange.location, 0));\r\n\t\t// Note: Scintilla internally works almost always with bytes instead chars, so we need to take\r\n\t\t//       this into account when determining selection ranges and such.\r\n\t\tptrdiff_t lengthInserted = mOwner.backend->InsertText(newText, CharacterSource::TentativeInput);\r\n\t\tposRangeCurrent.length = lengthInserted;\r\n\t\tmMarkedTextRange = mOwner.backend->CharactersFromPositions(posRangeCurrent);\r\n\t\t// Mark the just inserted text. Keep the marked range for later reset.\r\n\t\t[mOwner setGeneralProperty: SCI_SETINDICATORCURRENT value: INDICATOR_IME];\r\n\t\t[mOwner setGeneralProperty: SCI_INDICATORFILLRANGE\r\n\t\t\t\t parameter: posRangeCurrent.location\r\n\t\t\t\t     value: posRangeCurrent.length];\r\n\t} else {\r\n\t\tmMarkedTextRange = NSMakeRange(NSNotFound, 0);\r\n\t\t// Re-enable undo action collection if composition ended (indicated by an empty mark string).\r\n\t\tmOwner.backend->CompositionCommit();\r\n\t}\r\n\r\n\t// Select the part which is indicated in the given range. It does not scroll the caret into view.\r\n\tif (range.length > 0) {\r\n\t\t// range is in characters so convert to bytes for selection.\r\n\t\trange.location += replacementRange.location;\r\n\t\tNSRange posRangeSelect = mOwner.backend->PositionsFromCharacters(range);\r\n\t\t[mOwner setGeneralProperty: SCI_SETSELECTION parameter: NSMaxRange(posRangeSelect) value: posRangeSelect.location];\r\n\t}\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n- (void) unmarkText {\r\n\tif (mMarkedTextRange.length > 0) {\r\n\t\tmOwner.backend->CompositionCommit();\r\n\t\tmMarkedTextRange = NSMakeRange(NSNotFound, 0);\r\n\t}\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n- (NSArray *) validAttributesForMarkedText {\r\n\treturn @[];\r\n}\r\n\r\n// End of the NSTextInputClient protocol adoption.\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Generic input method. It is used to pass on keyboard input to Scintilla. The control itself only\r\n * handles shortcuts. The input is then forwarded to the Cocoa text input system, which in turn does\r\n * its own input handling (character composition via NSTextInputClient protocol):\r\n */\r\n- (void) keyDown: (NSEvent *) theEvent {\r\n\tbool handled = false;\r\n\tif (mMarkedTextRange.length == 0)\r\n\t\thandled = mOwner.backend->KeyboardInput(theEvent);\r\n\tif (!handled) {\r\n\t\tNSArray *events = @[theEvent];\r\n\t\t[self interpretKeyEvents: events];\r\n\t}\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n- (void) mouseDown: (NSEvent *) theEvent {\r\n\tmOwner.backend->MouseDown(theEvent);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n- (void) mouseDragged: (NSEvent *) theEvent {\r\n\tmOwner.backend->MouseMove(theEvent);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n- (void) mouseUp: (NSEvent *) theEvent {\r\n\tmOwner.backend->MouseUp(theEvent);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n- (void) mouseMoved: (NSEvent *) theEvent {\r\n\tmOwner.backend->MouseMove(theEvent);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n- (void) mouseEntered: (NSEvent *) theEvent {\r\n\tmOwner.backend->MouseEntered(theEvent);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n- (void) mouseExited: (NSEvent *) theEvent {\r\n\tmOwner.backend->MouseExited(theEvent);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Implementing scrollWheel makes scrolling work better even if just\r\n * calling super.\r\n * Mouse wheel with command key may magnify text if enabled.\r\n * Pinch gestures and key commands can also be used for magnification.\r\n */\r\n- (void) scrollWheel: (NSEvent *) theEvent {\r\n#ifdef SCROLL_WHEEL_MAGNIFICATION\r\n\tif (([theEvent modifierFlags] & NSEventModifierFlagCommand) != 0) {\r\n\t\tmOwner.backend->MouseWheel(theEvent);\r\n\t\treturn;\r\n\t}\r\n#endif\r\n\t[super scrollWheel: theEvent];\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Ensure scrolling is aligned to whole lines instead of starting part-way through a line\r\n */\r\n- (NSRect) adjustScroll: (NSRect) proposedVisibleRect {\r\n\tif (!mOwner)\r\n\t\treturn proposedVisibleRect;\r\n\tNSRect rc = proposedVisibleRect;\r\n\t// Snap to lines\r\n\tNSRect contentRect = self.bounds;\r\n\tif ((rc.origin.y > 0) && (NSMaxY(rc) < contentRect.size.height)) {\r\n\t\t// Only snap for positions inside the document - allow outside\r\n\t\t// for overshoot.\r\n\t\tlong lineHeight = mOwner.backend->WndProc(Message::TextHeight, 0, 0);\r\n\t\trc.origin.y = std::round(rc.origin.y / lineHeight) * lineHeight;\r\n\t}\r\n\t// Snap to whole points - on retina displays this avoids visual debris\r\n\t// when scrolling horizontally.\r\n\tif ((rc.origin.x > 0) && (NSMaxX(rc) < contentRect.size.width)) {\r\n\t\t// Only snap for positions inside the document - allow outside\r\n\t\t// for overshoot.\r\n\t\trc.origin.x = std::round(rc.origin.x);\r\n\t}\r\n\treturn rc;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * The editor is getting the foreground control (the one getting the input focus).\r\n */\r\n- (BOOL) becomeFirstResponder {\r\n\tmOwner.backend->SetFirstResponder(true);\r\n\treturn YES;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * The editor is losing the input focus.\r\n */\r\n- (BOOL) resignFirstResponder {\r\n\tmOwner.backend->SetFirstResponder(false);\r\n\treturn YES;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Implement NSDraggingSource.\r\n */\r\n\r\n- (NSDragOperation) draggingSession: (NSDraggingSession *) session\r\n\tsourceOperationMaskForDraggingContext: (NSDraggingContext) context {\r\n#pragma unused(session)\r\n\tswitch (context) {\r\n\tcase NSDraggingContextOutsideApplication:\r\n\t\treturn NSDragOperationCopy | NSDragOperationMove | NSDragOperationDelete;\r\n\r\n\tcase NSDraggingContextWithinApplication:\r\n\tdefault:\r\n\t\treturn NSDragOperationCopy | NSDragOperationMove | NSDragOperationDelete;\r\n\t}\r\n}\r\n\r\n- (void) draggingSession: (NSDraggingSession *) session\r\n\t    movedToPoint: (NSPoint) screenPoint {\r\n#pragma unused(session, screenPoint)\r\n}\r\n\r\n- (void) draggingSession: (NSDraggingSession *) session\r\n\t    endedAtPoint: (NSPoint) screenPoint\r\n\t       operation: (NSDragOperation) operation {\r\n#pragma unused(session, screenPoint)\r\n\tif (operation == NSDragOperationDelete) {\r\n\t\tmOwner.backend->WndProc(Message::Clear, 0, 0);\r\n\t}\r\n}\r\n\r\n/**\r\n * Implement NSDraggingDestination.\r\n */\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Called when an external drag operation enters the view.\r\n */\r\n- (NSDragOperation) draggingEntered: (id <NSDraggingInfo>) sender {\r\n\treturn mOwner.backend->DraggingEntered(sender);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Called frequently during an external drag operation if we are the target.\r\n */\r\n- (NSDragOperation) draggingUpdated: (id <NSDraggingInfo>) sender {\r\n\treturn mOwner.backend->DraggingUpdated(sender);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Drag image left the view. Clean up if necessary.\r\n */\r\n- (void) draggingExited: (id <NSDraggingInfo>) sender {\r\n\tmOwner.backend->DraggingExited(sender);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n- (BOOL) prepareForDragOperation: (id <NSDraggingInfo>) sender {\r\n#pragma unused(sender)\r\n\treturn YES;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n- (BOOL) performDragOperation: (id <NSDraggingInfo>) sender {\r\n\treturn mOwner.backend->PerformDragOperation(sender);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Drag operation is done. Notify editor.\r\n */\r\n- (void) concludeDragOperation: (id <NSDraggingInfo>) sender {\r\n\t// Clean up is the same as if we are no longer the drag target.\r\n\tmOwner.backend->DraggingExited(sender);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n// NSResponder actions.\r\n\r\n- (void) selectAll: (id) sender {\r\n#pragma unused(sender)\r\n\tmOwner.backend->SelectAll();\r\n}\r\n\r\n- (void) deleteBackward: (id) sender {\r\n#pragma unused(sender)\r\n\tmOwner.backend->DeleteBackward();\r\n}\r\n\r\n- (void) cut: (id) sender {\r\n#pragma unused(sender)\r\n\tmOwner.backend->Cut();\r\n}\r\n\r\n- (void) copy: (id) sender {\r\n#pragma unused(sender)\r\n\tmOwner.backend->Copy();\r\n}\r\n\r\n- (void) paste: (id) sender {\r\n#pragma unused(sender)\r\n\tif (mMarkedTextRange.location != NSNotFound) {\r\n\t\t[[NSTextInputContext currentInputContext] discardMarkedText];\r\n\t\tmOwner.backend->CompositionCommit();\r\n\t\tmMarkedTextRange = NSMakeRange(NSNotFound, 0);\r\n\t}\r\n\tmOwner.backend->Paste();\r\n}\r\n\r\n- (void) undo: (id) sender {\r\n#pragma unused(sender)\r\n\tif (mMarkedTextRange.location != NSNotFound) {\r\n\t\t[[NSTextInputContext currentInputContext] discardMarkedText];\r\n\t\tmOwner.backend->CompositionCommit();\r\n\t\tmMarkedTextRange = NSMakeRange(NSNotFound, 0);\r\n\t}\r\n\tmOwner.backend->Undo();\r\n}\r\n\r\n- (void) redo: (id) sender {\r\n#pragma unused(sender)\r\n\tmOwner.backend->Redo();\r\n}\r\n\r\n- (BOOL) canUndo {\r\n\treturn mOwner.backend->CanUndo() && (mMarkedTextRange.location == NSNotFound);\r\n}\r\n\r\n- (BOOL) canRedo {\r\n\treturn mOwner.backend->CanRedo();\r\n}\r\n\r\n- (BOOL) validateUserInterfaceItem: (id <NSValidatedUserInterfaceItem>) anItem {\r\n\tSEL action = anItem.action;\r\n\tif (action==@selector(undo:)) {\r\n\t\treturn [self canUndo];\r\n\t} else if (action==@selector(redo:)) {\r\n\t\treturn [self canRedo];\r\n\t} else if (action==@selector(cut:) || action==@selector(copy:) || action==@selector(clear:)) {\r\n\t\treturn mOwner.backend->HasSelection();\r\n\t} else if (action==@selector(paste:)) {\r\n\t\treturn mOwner.backend->CanPaste();\r\n\t}\r\n\treturn YES;\r\n}\r\n\r\n- (void) clear: (id) sender {\r\n\t[self deleteBackward: sender];\r\n}\r\n\r\n- (BOOL) isEditable {\r\n\treturn mOwner.backend->WndProc(Message::GetReadOnly, 0, 0) == 0;\r\n}\r\n\r\n#pragma mark - NSAccessibility\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n// Adoption of NSAccessibility protocol.\r\n// NSAccessibility wants to pass ranges in UTF-16 code units, not bytes (like Scintilla)\r\n// or characters.\r\n// Needs more testing with non-ASCII and non-BMP text.\r\n// Needs to take account of folding and wraping.\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * NSAccessibility : Text of the whole document as a string.\r\n */\r\n- (id) accessibilityValue {\r\n\tconst sptr_t length = [mOwner message: SCI_GETLENGTH];\r\n\treturn mOwner.backend->RangeTextAsString(NSMakeRange(0, length));\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * NSAccessibility : Line of the caret.\r\n */\r\n- (NSInteger) accessibilityInsertionPointLineNumber {\r\n\tconst Sci::Position caret = [mOwner message: SCI_GETCURRENTPOS];\r\n\tconst NSRange rangeCharactersCaret = mOwner.backend->CharactersFromPositions(NSMakeRange(caret, 0));\r\n\treturn mOwner.backend->VisibleLineForIndex(rangeCharactersCaret.location);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * NSAccessibility : Not implemented and not called by VoiceOver.\r\n */\r\n- (NSRange) accessibilityRangeForPosition: (NSPoint) point {\r\n\treturn NSMakeRange(0, 0);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * NSAccessibility : Number of characters in the whole document.\r\n */\r\n- (NSInteger) accessibilityNumberOfCharacters {\r\n\tsptr_t length = [mOwner message: SCI_GETLENGTH];\r\n\tconst NSRange posRange = mOwner.backend->CharactersFromPositions(NSMakeRange(length, 0));\r\n\treturn posRange.location;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * NSAccessibility : The selection text as a string.\r\n */\r\n- (NSString *) accessibilitySelectedText {\r\n\tconst sptr_t positionBegin = [mOwner message: SCI_GETSELECTIONSTART];\r\n\tconst sptr_t positionEnd = [mOwner message: SCI_GETSELECTIONEND];\r\n\tconst NSRange posRangeSel = NSMakeRange(positionBegin, positionEnd-positionBegin);\r\n\treturn mOwner.backend->RangeTextAsString(posRangeSel);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * NSAccessibility : The character range of the main selection.\r\n */\r\n- (NSRange) accessibilitySelectedTextRange {\r\n\tconst sptr_t positionBegin = [mOwner message: SCI_GETSELECTIONSTART];\r\n\tconst sptr_t positionEnd = [mOwner message: SCI_GETSELECTIONEND];\r\n\tconst NSRange posRangeSel = NSMakeRange(positionBegin, positionEnd-positionBegin);\r\n\treturn mOwner.backend->CharactersFromPositions(posRangeSel);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * NSAccessibility : The setter for accessibilitySelectedTextRange.\r\n * This method is the only setter required for reasonable VoiceOver behaviour.\r\n */\r\n- (void) setAccessibilitySelectedTextRange: (NSRange) range {\r\n\tNSRange rangePositions = mOwner.backend->PositionsFromCharacters(range);\r\n\t[mOwner message: SCI_SETSELECTION wParam: rangePositions.location lParam: NSMaxRange(rangePositions)];\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * NSAccessibility : Range of the glyph at a character index.\r\n * Currently doesn't try to handle composite characters.\r\n */\r\n- (NSRange) accessibilityRangeForIndex: (NSInteger) index {\r\n\tsptr_t length = [mOwner message: SCI_GETLENGTH];\r\n\tconst NSRange rangeLength = mOwner.backend->CharactersFromPositions(NSMakeRange(length, 0));\r\n\tNSRange rangePositions = NSMakeRange(length, 0);\r\n\tif (index < rangeLength.location) {\r\n\t\trangePositions = mOwner.backend->PositionsFromCharacters(NSMakeRange(index, 1));\r\n\t}\r\n\treturn mOwner.backend->CharactersFromPositions(rangePositions);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * NSAccessibility : All the text ranges.\r\n * Currently only returns the main selection.\r\n */\r\n- (NSArray<NSValue *> *) accessibilitySelectedTextRanges {\r\n\tconst sptr_t positionBegin = [mOwner message: SCI_GETSELECTIONSTART];\r\n\tconst sptr_t positionEnd = [mOwner message: SCI_GETSELECTIONEND];\r\n\tconst NSRange posRangeSel = NSMakeRange(positionBegin, positionEnd-positionBegin);\r\n\tNSRange rangeCharacters = mOwner.backend->CharactersFromPositions(posRangeSel);\r\n\tNSValue *valueRange = [NSValue valueWithRange: (NSRange)rangeCharacters];\r\n\treturn @[valueRange];\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * NSAccessibility : Character range currently visible.\r\n */\r\n- (NSRange) accessibilityVisibleCharacterRange {\r\n\tconst sptr_t lineTopVisible = [mOwner message: SCI_GETFIRSTVISIBLELINE];\r\n\tconst sptr_t lineTop = [mOwner message: SCI_DOCLINEFROMVISIBLE wParam: lineTopVisible];\r\n\tconst sptr_t lineEndVisible = lineTopVisible + [mOwner message: SCI_LINESONSCREEN] - 1;\r\n\tconst sptr_t lineEnd = [mOwner message: SCI_DOCLINEFROMVISIBLE wParam: lineEndVisible];\r\n\tconst sptr_t posStartView = [mOwner message: SCI_POSITIONFROMLINE wParam: lineTop];\r\n\tconst sptr_t posEndView = [mOwner message: SCI_GETLINEENDPOSITION wParam: lineEnd];\r\n\tconst NSRange posRangeSel = NSMakeRange(posStartView, posEndView-posStartView);\r\n\treturn mOwner.backend->CharactersFromPositions(posRangeSel);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * NSAccessibility : Character range of a line.\r\n */\r\n- (NSRange) accessibilityRangeForLine: (NSInteger) line {\r\n\treturn mOwner.backend->RangeForVisibleLine(line);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * NSAccessibility : Line number of a text position in characters.\r\n */\r\n- (NSInteger) accessibilityLineForIndex: (NSInteger) index {\r\n\treturn mOwner.backend->VisibleLineForIndex(index);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * NSAccessibility : A rectangle that covers a range which will be shown as the\r\n * VoiceOver cursor.\r\n * Producing a nice rectangle is a little tricky particularly when including new\r\n * lines. Needs to improve the case where parts of two lines are included.\r\n */\r\n- (NSRect) accessibilityFrameForRange: (NSRange) range {\r\n\tconst NSRect rectInView = mOwner.backend->FrameForRange(range);\r\n\tconst NSRect rectInWindow = [self.superview.superview convertRect: rectInView toView: nil];\r\n\treturn [self.window convertRectToScreen: rectInWindow];\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * NSAccessibility : A range of text as a string.\r\n */\r\n- (NSString *) accessibilityStringForRange: (NSRange) range {\r\n\tconst NSRange posRange = mOwner.backend->PositionsFromCharacters(range);\r\n\treturn mOwner.backend->RangeTextAsString(posRange);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * NSAccessibility : A range of text as an attributed string.\r\n * Currently no attributes are set.\r\n */\r\n- (NSAttributedString *) accessibilityAttributedStringForRange: (NSRange) range {\r\n\tconst NSRange posRange = mOwner.backend->PositionsFromCharacters(range);\r\n\tNSString *result = mOwner.backend->RangeTextAsString(posRange);\r\n\treturn [[NSMutableAttributedString alloc] initWithString: result];\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * NSAccessibility : Show the context menu at the caret.\r\n */\r\n- (BOOL) accessibilityPerformShowMenu {\r\n\tconst sptr_t caret = [mOwner message: SCI_GETCURRENTPOS];\r\n\tNSRect rect;\r\n\trect.origin.x = [mOwner message: SCI_POINTXFROMPOSITION wParam: 0 lParam: caret];\r\n\trect.origin.y = [mOwner message: SCI_POINTYFROMPOSITION wParam: 0 lParam: caret];\r\n\trect.origin.y += [mOwner message: SCI_TEXTHEIGHT wParam: 0 lParam: 0];\r\n\trect.size.width = 1.0;\r\n\trect.size.height = 1.0;\r\n\tNSRect rectInWindow = [self.superview.superview convertRect: rect toView: nil];\r\n\tNSPoint pt = rectInWindow.origin;\r\n\tNSEvent *event = [NSEvent mouseEventWithType: NSEventTypeRightMouseDown\r\n\t\t\t\t\t    location: pt\r\n\t\t\t\t       modifierFlags: 0\r\n\t\t\t\t\t   timestamp: 0\r\n\t\t\t\t\twindowNumber: self.window.windowNumber\r\n\t\t\t\t\t     context: nil\r\n\t\t\t\t\t eventNumber: 0\r\n\t\t\t\t\t  clickCount: 1\r\n\t\t\t\t\t    pressure: 0.0];\r\n\tNSMenu *menu = mOwner.backend->CreateContextMenu(event);\r\n\t[NSMenu popUpContextMenu: menu withEvent: event forView: self];\r\n\treturn YES;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n\r\n@end\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n@implementation ScintillaView {\r\n\t// The back end is kind of a controller and model in one.\r\n\t// It uses the content view for display.\r\n\tScintilla::Internal::ScintillaCocoa *mBackend;\r\n\r\n\t// This is the actual content to which the backend renders itself.\r\n\tSCIContentView *mContent;\r\n\r\n\tNSScrollView *scrollView;\r\n\tSCIMarginView *marginView;\r\n\r\n\tCGFloat zoomDelta;\r\n\r\n\t// Area to display additional controls (e.g. zoom info, caret position, status info).\r\n\tNSView <InfoBarCommunicator> *mInfoBar;\r\n\tBOOL mInfoBarAtTop;\r\n\r\n\tid<ScintillaNotificationProtocol> __unsafe_unretained mDelegate;\r\n}\r\n\r\n@synthesize backend = mBackend;\r\n@synthesize delegate = mDelegate;\r\n@synthesize scrollView;\r\n\r\n/**\r\n * ScintillaView is a composite control made from an NSView and an embedded NSView that is\r\n * used as canvas for the output (by the backend, using its CGContext), plus other elements\r\n * (scrollers, info bar).\r\n */\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Initialize custom cursor.\r\n */\r\n+ (void) initialize {\r\n\tif (self == [ScintillaView class]) {\r\n\t\tNSBundle *bundle = [NSBundle bundleForClass: [ScintillaView class]];\r\n\r\n\t\tNSString *path = [bundle pathForResource: @\"mac_cursor_busy\" ofType: @\"tiff\" inDirectory: nil];\r\n\t\tNSImage *image = [[NSImage alloc] initWithContentsOfFile: path];\r\n\t\tif (image) {\r\n\t\t\twaitCursor = [[NSCursor alloc] initWithImage: image hotSpot: NSMakePoint(2, 2)];\r\n\t\t} else {\r\n\t\t\tNSLog(@\"Wait cursor is invalid.\");\r\n\t\t\twaitCursor = [NSCursor arrowCursor];\r\n\t\t}\r\n\r\n\t\tpath = [bundle pathForResource: @\"mac_cursor_flipped\" ofType: @\"tiff\" inDirectory: nil];\r\n\t\timage = [[NSImage alloc] initWithContentsOfFile: path];\r\n\t\tif (image) {\r\n\t\t\treverseArrowCursor = [[NSCursor alloc] initWithImage: image hotSpot: NSMakePoint(15, 2)];\r\n\t\t} else {\r\n\t\t\tNSLog(@\"Reverse arrow cursor is invalid.\");\r\n\t\t\treverseArrowCursor = [NSCursor arrowCursor];\r\n\t\t}\r\n\t}\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Specify the SCIContentView class. Can be overridden in a subclass to provide an SCIContentView subclass.\r\n */\r\n\r\n+ (Class) contentViewClass {\r\n\treturn [SCIContentView class];\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Receives zoom messages, for example when a \"pinch zoom\" is performed on the trackpad.\r\n */\r\n- (void) magnifyWithEvent: (NSEvent *) event {\r\n#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5\r\n\tzoomDelta += event.magnification * 10.0;\r\n\r\n\tif (std::abs(zoomDelta)>=1.0) {\r\n\t\tlong zoomFactor = static_cast<long>([self getGeneralProperty: SCI_GETZOOM] + zoomDelta);\r\n\t\t[self setGeneralProperty: SCI_SETZOOM parameter: zoomFactor value: 0];\r\n\t\tzoomDelta = 0.0;\r\n\t}\r\n#endif\r\n}\r\n\r\n- (void) beginGestureWithEvent: (NSEvent *) event {\r\n// Scintilla is only interested in this event as the starft of a zoom\r\n#pragma unused(event)\r\n\tzoomDelta = 0.0;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Sends a new notification of the given type to the default notification center.\r\n */\r\n- (void) sendNotification: (NSString *) notificationName {\r\n\tNSNotificationCenter *center = [NSNotificationCenter defaultCenter];\r\n\t[center postNotificationName: notificationName object: self];\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Called by a connected component (usually the info bar) if something changed there.\r\n *\r\n * @param type The type of the notification.\r\n * @param message Carries the new status message if the type is a status message change.\r\n * @param location Carries the new location (e.g. caret) if the type is a caret change or similar type.\r\n * @param value Carries the new zoom value if the type is a zoom change.\r\n */\r\n- (void) notify: (NotificationType) type message: (NSString *) message location: (NSPoint) location\r\n\t  value: (float) value {\r\n// These parameters are just to conform to the protocol\r\n#pragma unused(message)\r\n#pragma unused(location)\r\n\tswitch (type) {\r\n\tcase IBNZoomChanged: {\r\n\t\t\t// Compute point increase/decrease based on default font size.\r\n\t\t\tlong fontSize = [self getGeneralProperty: SCI_STYLEGETSIZE parameter: STYLE_DEFAULT];\r\n\t\t\tint zoom = (int)(fontSize * (value - 1));\r\n\t\t\t[self setGeneralProperty: SCI_SETZOOM value: zoom];\r\n\t\t\tbreak;\r\n\t\t}\r\n\tdefault:\r\n\t\tbreak;\r\n\t};\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n- (void) setCallback: (id <InfoBarCommunicator>) callback {\r\n// Not used. Only here to satisfy protocol.\r\n#pragma unused(callback)\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Prevents drawing of the inner view to avoid flickering when doing many visual updates\r\n * (like clearing all marks and setting new ones etc.).\r\n */\r\n- (void) suspendDrawing: (BOOL) suspend {\r\n\tif (@available(macOS 10.14, *)) {\r\n\t\t// Don't try where deprecated\r\n\t} else {\r\n#pragma GCC diagnostic push\r\n#pragma GCC diagnostic ignored \"-Wdeprecated-declarations\"\r\n\t\tif (suspend)\r\n\t\t\t[self.window disableFlushWindow];\r\n\t\telse\r\n\t\t\t[self.window enableFlushWindow];\r\n#pragma GCC diagnostic pop\r\n\t}\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Method receives notifications from Scintilla (e.g. for handling clicks on the\r\n * folder margin or changes in the editor).\r\n * A delegate can be set to receive all notifications. If set no handling takes place here, except\r\n * for action pertaining to internal stuff (like the info bar).\r\n */\r\n- (void) notification: (SCNotification *) scn {\r\n\t// Parent notification. Details are passed as SCNotification structure.\r\n\r\n\tif (mDelegate != nil) {\r\n\t\t[mDelegate notification: scn];\r\n\t\tif (scn->nmhdr.code != static_cast<unsigned int>(Notification::Zoom) &&\r\n\t\t    scn->nmhdr.code != static_cast<unsigned int>(Notification::UpdateUI))\r\n\t\t\treturn;\r\n\t}\r\n\r\n\tswitch (static_cast<Notification>(scn->nmhdr.code)) {\r\n\tcase Notification::MarginClick: {\r\n\t\t\tif (scn->margin == 2) {\r\n\t\t\t\t// Click on the folder margin. Toggle the current line if possible.\r\n\t\t\t\tlong line = [self getGeneralProperty: SCI_LINEFROMPOSITION parameter: scn->position];\r\n\t\t\t\t[self setGeneralProperty: SCI_TOGGLEFOLD value: line];\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t};\r\n\tcase Notification::Modified: {\r\n\t\t\t// Decide depending on the modification type what to do.\r\n\t\t\t// There can be more than one modification carried by one notification.\r\n\t\t\tif (scn->modificationType &\r\n\t\t\t\tstatic_cast<int>((ModificationFlags::InsertText | ModificationFlags::DeleteText)))\r\n\t\t\t\t[self sendNotification: NSTextDidChangeNotification];\r\n\t\t\tbreak;\r\n\t\t}\r\n\tcase Notification::Zoom: {\r\n\t\t\t// A zoom change happened. Notify info bar if there is one.\r\n\t\t\tfloat zoom = [self getGeneralProperty: SCI_GETZOOM parameter: 0];\r\n\t\t\tlong fontSize = [self getGeneralProperty: SCI_STYLEGETSIZE parameter: STYLE_DEFAULT];\r\n\t\t\tfloat factor = (zoom / fontSize) + 1;\r\n\t\t\t[mInfoBar notify: IBNZoomChanged message: nil location: NSZeroPoint value: factor];\r\n\t\t\tbreak;\r\n\t\t}\r\n\tcase Notification::UpdateUI: {\r\n\t\t\t// Triggered whenever changes in the UI state need to be reflected.\r\n\t\t\t// These can be: caret changes, selection changes etc.\r\n\t\t\tNSPoint caretPosition = mBackend->GetCaretPosition();\r\n\t\t\t[mInfoBar notify: IBNCaretChanged message: nil location: caretPosition value: 0];\r\n\t\t\t[self sendNotification: SCIUpdateUINotification];\r\n\t\t\tif (scn->updated & static_cast<int>((Update::Selection | Update::Content))) {\r\n\t\t\t\t[self sendNotification: NSTextViewDidChangeSelectionNotification];\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\tcase Notification::FocusOut:\r\n\t\t[self sendNotification: NSTextDidEndEditingNotification];\r\n\t\tbreak;\r\n\tcase Notification::FocusIn: // Nothing to do for now.\r\n\t\tbreak;\r\n\tdefault:\r\n\t\tbreak;\r\n\t}\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Setup a special indicator used in the editor to provide visual feedback for\r\n * input composition, depending on language, keyboard etc.\r\n */\r\n- (void) updateIndicatorIME {\r\n\t[self setColorProperty: SCI_INDICSETFORE parameter: INDICATOR_IME fromHTML: @\"#FF0000\"];\r\n\tconst bool drawInBackground = [self message: SCI_GETPHASESDRAW] != 0;\r\n\t[self setGeneralProperty: SCI_INDICSETUNDER parameter: INDICATOR_IME value: drawInBackground];\r\n\t[self setGeneralProperty: SCI_INDICSETSTYLE parameter: INDICATOR_IME value: INDIC_PLAIN];\r\n\t[self setGeneralProperty: SCI_INDICSETALPHA parameter: INDICATOR_IME value: 100];\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Initialization of the view. Used to setup a few other things we need.\r\n */\r\n- (instancetype) initWithFrame: (NSRect) frame {\r\n\tself = [super initWithFrame: frame];\r\n\tif (self) {\r\n\t\tmContent = [[[[self class] contentViewClass] alloc] initWithFrame: NSZeroRect];\r\n\t\tmContent.owner = self;\r\n\r\n\t\t// Initialize the scrollers but don't show them yet.\r\n\t\t// Pick an arbitrary size, just to make NSScroller selecting the proper scroller direction\r\n\t\t// (horizontal or vertical).\r\n\t\tNSRect scrollerRect = NSMakeRect(0, 0, 100, 10);\r\n\t\tscrollView = (NSScrollView *)[[SCIScrollView alloc] initWithFrame: scrollerRect];\r\n#if defined(MAC_OS_X_VERSION_10_14)\r\n\t\t// Let SCIScrollView account for other subviews such as vertical ruler by turning off\r\n\t\t// automaticallyAdjustsContentInsets.\r\n\t\tif (std::floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_13) {\r\n\t\t\tscrollView.contentView.automaticallyAdjustsContentInsets = NO;\r\n\t\t\tscrollView.contentView.contentInsets = NSEdgeInsetsMake(0., 0., 0., 0.);\r\n\t\t}\r\n#endif\r\n\t\tscrollView.documentView = mContent;\r\n\t\t[scrollView setHasVerticalScroller: YES];\r\n\t\t[scrollView setHasHorizontalScroller: YES];\r\n\t\tscrollView.autoresizingMask = NSViewWidthSizable|NSViewHeightSizable;\r\n\t\t//[scrollView setScrollerStyle:NSScrollerStyleLegacy];\r\n\t\t//[scrollView setScrollerKnobStyle:NSScrollerKnobStyleDark];\r\n\t\t//[scrollView setHorizontalScrollElasticity:NSScrollElasticityNone];\r\n\t\t[self addSubview: scrollView];\r\n\r\n\t\tmarginView = [[SCIMarginView alloc] initWithScrollView: scrollView];\r\n\t\tmarginView.owner = self;\r\n\t\tmarginView.ruleThickness = marginView.requiredThickness;\r\n\t\tscrollView.verticalRulerView = marginView;\r\n\t\t[scrollView setHasHorizontalRuler: NO];\r\n\t\t[scrollView setHasVerticalRuler: YES];\r\n\t\t[scrollView setRulersVisible: YES];\r\n\r\n\t\tmBackend = new ScintillaCocoa(self, mContent, marginView);\r\n\r\n\t\t// Establish a connection from the back end to this container so we can handle situations\r\n\t\t// which require our attention.\r\n\t\tmBackend->SetDelegate(self);\r\n\r\n\t\t[self updateIndicatorIME];\r\n\r\n\t\tNSNotificationCenter *center = [NSNotificationCenter defaultCenter];\r\n\t\t[center addObserver: self\r\n\t\t\t   selector: @selector(applicationDidResignActive:)\r\n\t\t\t       name: NSApplicationDidResignActiveNotification\r\n\t\t\t     object: nil];\r\n\r\n\t\t[center addObserver: self\r\n\t\t\t   selector: @selector(applicationDidBecomeActive:)\r\n\t\t\t       name: NSApplicationDidBecomeActiveNotification\r\n\t\t\t     object: nil];\r\n\r\n\t\t[center addObserver: self\r\n\t\t\t   selector: @selector(windowWillMove:)\r\n\t\t\t       name: NSWindowWillMoveNotification\r\n\t\t\t     object: self.window];\r\n\r\n\t\t[center addObserver: self\r\n\t\t\t   selector: @selector(defaultsDidChange:)\r\n\t\t\t       name: NSSystemColorsDidChangeNotification\r\n\t\t\t     object: self.window];\r\n\r\n\t\t[scrollView.contentView setPostsBoundsChangedNotifications: YES];\r\n\t\t[center addObserver: self\r\n\t\t\t   selector: @selector(scrollerAction:)\r\n\t\t\t       name: NSViewBoundsDidChangeNotification\r\n\t\t\t     object: scrollView.contentView];\r\n\r\n\t\tmBackend->UpdateBaseElements();\r\n\t}\r\n\treturn self;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n- (void) dealloc {\r\n\t[[NSNotificationCenter defaultCenter] removeObserver: self];\r\n\tmBackend->Finalise();\r\n\tdelete mBackend;\r\n\tmBackend = NULL;\r\n\tmContent.owner = nil;\r\n\t[marginView setClientView: nil];\r\n\t[scrollView removeFromSuperview];\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n- (void) applicationDidResignActive: (NSNotification *) note {\r\n#pragma unused(note)\r\n\tmBackend->ActiveStateChanged(false);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n- (void) applicationDidBecomeActive: (NSNotification *) note {\r\n#pragma unused(note)\r\n\tmBackend->ActiveStateChanged(true);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n- (void) windowWillMove: (NSNotification *) note {\r\n#pragma unused(note)\r\n\tmBackend->WindowWillMove();\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n- (void) defaultsDidChange: (NSNotification *) note {\r\n#pragma unused(note)\r\n\tmBackend->UpdateBaseElements();\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n- (void) viewDidMoveToWindow {\r\n\t[super viewDidMoveToWindow];\r\n\r\n\t[self positionSubViews];\r\n\r\n\t// Enable also mouse move events for our window (and so this view).\r\n\t[self.window setAcceptsMouseMovedEvents: YES];\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Used to position and size the parts of the editor (content, scrollers, info bar).\r\n */\r\n- (void) positionSubViews {\r\n\tCGFloat scrollerWidth = [NSScroller scrollerWidthForControlSize: NSControlSizeRegular\r\n\t\t\t\t\t\t\t  scrollerStyle: NSScrollerStyleLegacy];\r\n\r\n\tNSSize size = self.frame.size;\r\n\tNSRect barFrame = {{0, size.height - scrollerWidth}, {size.width, scrollerWidth}};\r\n\tBOOL infoBarVisible = mInfoBar != nil && !mInfoBar.hidden;\r\n\r\n\t// Horizontal offset of the content. Almost always 0 unless the vertical scroller\r\n\t// is on the left side.\r\n\tCGFloat contentX = 0;\r\n\tNSRect scrollRect = {{contentX, 0}, {size.width, size.height}};\r\n\r\n\t// Info bar frame.\r\n\tif (infoBarVisible) {\r\n\t\tscrollRect.size.height -= scrollerWidth;\r\n\t\t// Initial value already is as if the bar is at top.\r\n\t\tif (!mInfoBarAtTop) {\r\n\t\t\tscrollRect.origin.y += scrollerWidth;\r\n\t\t\tbarFrame.origin.y = 0;\r\n\t\t}\r\n\t}\r\n\r\n\tif (!NSEqualRects(scrollView.frame, scrollRect)) {\r\n\t\tscrollView.frame = scrollRect;\r\n\t}\r\n\r\n\tif (infoBarVisible)\r\n\t\tmInfoBar.frame = barFrame;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Set the width of the margin.\r\n */\r\n- (void) setMarginWidth: (int) width {\r\n\tif (marginView.ruleThickness != width) {\r\n\t\tmarginView.marginWidth = width;\r\n\t\tmarginView.ruleThickness = marginView.requiredThickness;\r\n\t}\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Triggered by one of the scrollers when it gets manipulated by the user. Notify the backend\r\n * about the change.\r\n */\r\n- (void) scrollerAction: (id) sender {\r\n#pragma unused(sender)\r\n\tmBackend->UpdateForScroll();\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Used to reposition our content depending on the size of the view.\r\n */\r\n- (void) setFrame: (NSRect) newFrame {\r\n\tNSRect previousFrame = self.frame;\r\n\tsuper.frame = newFrame;\r\n\t[self positionSubViews];\r\n\tif (!NSEqualRects(previousFrame, newFrame)) {\r\n\t\tmBackend->Resize();\r\n\t}\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Getter for the currently selected text in raw form (no formatting information included).\r\n * If there is no text available an empty string is returned.\r\n */\r\n- (NSString *) selectedString {\r\n\tNSString *result = @\"\";\r\n\r\n\tconst long length = mBackend->WndProc(Message::GetSelText, 0, 0);\r\n\tif (length > 0) {\r\n\t\tstd::string buffer(length + 1, '\\0');\r\n\t\ttry {\r\n\t\t\tmBackend->WndProc(Message::GetSelText, length + 1, (sptr_t) &buffer[0]);\r\n\r\n\t\t\tresult = @(buffer.c_str());\r\n\t\t} catch (...) {\r\n\t\t}\r\n\t}\r\n\r\n\treturn result;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Delete a range from the document.\r\n */\r\n- (void) deleteRange: (NSRange) aRange {\r\n\tif (aRange.length > 0) {\r\n\t\tNSRange posRange = mBackend->PositionsFromCharacters(aRange);\r\n\t\t[self message: SCI_DELETERANGE wParam: posRange.location lParam: posRange.length];\r\n\t}\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Getter for the current text in raw form (no formatting information included).\r\n * If there is no text available an empty string is returned.\r\n */\r\n- (NSString *) string {\r\n\tNSString *result = @\"\";\r\n\r\n\tconst long length = mBackend->WndProc(Message::GetLength, 0, 0);\r\n\tif (length > 0) {\r\n\t\tstd::string buffer(length + 1, '\\0');\r\n\t\ttry {\r\n\t\t\tmBackend->WndProc(Message::GetText, length + 1, (sptr_t) &buffer[0]);\r\n\r\n\t\t\tresult = @(buffer.c_str());\r\n\t\t} catch (...) {\r\n\t\t}\r\n\t}\r\n\r\n\treturn result;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Setter for the current text (no formatting included).\r\n */\r\n- (void) setString: (NSString *) aString {\r\n\tconst char *text = aString.UTF8String;\r\n\tmBackend->WndProc(Message::SetText, 0, (long) text);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n- (void) insertString: (NSString *) aString atOffset: (int) offset {\r\n\tconst char *text = aString.UTF8String;\r\n\tmBackend->WndProc(Message::AddText, offset, (long) text);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n- (void) setEditable: (BOOL) editable {\r\n\tmBackend->WndProc(Message::SetReadOnly, editable ? 0 : 1, 0);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n- (BOOL) isEditable {\r\n\treturn mBackend->WndProc(Message::GetReadOnly, 0, 0) == 0;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n- (SCIContentView *) content {\r\n\treturn mContent;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n- (void) updateMarginCursors {\r\n\t[self.window invalidateCursorRectsForView: marginView];\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Direct call into the backend to allow uninterpreted access to it. The values to be passed in and\r\n * the result heavily depend on the message that is used for the call. Refer to the Scintilla\r\n * documentation to learn what can be used here.\r\n */\r\n+ (sptr_t) directCall: (ScintillaView *) sender message: (unsigned int) message wParam: (uptr_t) wParam\r\n\t       lParam: (sptr_t) lParam {\r\n\treturn ScintillaCocoa::DirectFunction(\r\n\t\t       reinterpret_cast<sptr_t>(sender->mBackend), message, wParam, lParam);\r\n}\r\n\r\n- (sptr_t) message: (unsigned int) message wParam: (uptr_t) wParam lParam: (sptr_t) lParam {\r\n\treturn mBackend->WndProc(static_cast<Message>(message), wParam, lParam);\r\n}\r\n\r\n- (sptr_t) message: (unsigned int) message wParam: (uptr_t) wParam {\r\n\treturn mBackend->WndProc(static_cast<Message>(message), wParam, 0);\r\n}\r\n\r\n- (sptr_t) message: (unsigned int) message {\r\n\treturn mBackend->WndProc(static_cast<Message>(message), 0, 0);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * This is a helper method to set properties in the backend, with native parameters.\r\n *\r\n * @param property Main property like SCI_STYLESETFORE for which a value is to be set.\r\n * @param parameter Additional info for this property like a parameter or index.\r\n * @param value The actual value. It depends on the property what this parameter means.\r\n */\r\n- (void) setGeneralProperty: (int) property parameter: (long) parameter value: (long) value {\r\n\tmBackend->WndProc(static_cast<Message>(property), parameter, value);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * A simplified version for setting properties which only require one parameter.\r\n *\r\n * @param property Main property like SCI_STYLESETFORE for which a value is to be set.\r\n * @param value The actual value. It depends on the property what this parameter means.\r\n */\r\n- (void) setGeneralProperty: (int) property value: (long) value {\r\n\tmBackend->WndProc(static_cast<Message>(property), value, 0);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * This is a helper method to get a property in the backend, with native parameters.\r\n *\r\n * @param property Main property like SCI_STYLESETFORE for which a value is to get.\r\n * @param parameter Additional info for this property like a parameter or index.\r\n * @param extra Yet another parameter if needed.\r\n * @result A generic value which must be interpreted depending on the property queried.\r\n */\r\n- (long) getGeneralProperty: (int) property parameter: (long) parameter extra: (long) extra {\r\n\treturn mBackend->WndProc(static_cast<Message>(property), parameter, extra);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Convenience function to avoid unneeded extra parameter.\r\n */\r\n- (long) getGeneralProperty: (int) property parameter: (long) parameter {\r\n\treturn mBackend->WndProc(static_cast<Message>(property), parameter, 0);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Convenience function to avoid unneeded parameters.\r\n */\r\n- (long) getGeneralProperty: (int) property {\r\n\treturn mBackend->WndProc(static_cast<Message>(property), 0, 0);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Use this variant if you have to pass in a reference to something (e.g. a text range).\r\n */\r\n- (long) getGeneralProperty: (int) property ref: (const void *) ref {\r\n\treturn mBackend->WndProc(static_cast<Message>(property), 0, (sptr_t) ref);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Specialized property setter for colors.\r\n */\r\n- (void) setColorProperty: (int) property parameter: (long) parameter value: (NSColor *) value {\r\n\tNSColor *deviceColor = [value colorUsingColorSpace: [NSColorSpace deviceRGBColorSpace]];\r\n\tlong red = static_cast<long>(deviceColor.redComponent * 255);\r\n\tlong green = static_cast<long>(deviceColor.greenComponent * 255);\r\n\tlong blue = static_cast<long>(deviceColor.blueComponent * 255);\r\n\r\n\tlong color = (blue << 16) + (green << 8) + red;\r\n\tmBackend->WndProc(static_cast<Message>(property), parameter, color);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Another color property setting, which allows to specify the color as string like in HTML\r\n * documents (i.e. with leading # and either 3 hex digits or 6).\r\n */\r\n- (void) setColorProperty: (int) property parameter: (long) parameter fromHTML: (NSString *) fromHTML {\r\n\tif (fromHTML.length > 3 && [fromHTML characterAtIndex: 0] == '#') {\r\n\t\tbool longVersion = fromHTML.length > 6;\r\n\t\tint index = 1;\r\n\r\n\t\tchar value[3] = {0, 0, 0};\r\n\t\tvalue[0] = static_cast<char>([fromHTML characterAtIndex: index++]);\r\n\t\tif (longVersion)\r\n\t\t\tvalue[1] = static_cast<char>([fromHTML characterAtIndex: index++]);\r\n\t\telse\r\n\t\t\tvalue[1] = value[0];\r\n\r\n\t\tunsigned rawRed;\r\n\t\t[[NSScanner scannerWithString: @(value)] scanHexInt: &rawRed];\r\n\r\n\t\tvalue[0] = static_cast<char>([fromHTML characterAtIndex: index++]);\r\n\t\tif (longVersion)\r\n\t\t\tvalue[1] = static_cast<char>([fromHTML characterAtIndex: index++]);\r\n\t\telse\r\n\t\t\tvalue[1] = value[0];\r\n\r\n\t\tunsigned rawGreen;\r\n\t\t[[NSScanner scannerWithString: @(value)] scanHexInt: &rawGreen];\r\n\r\n\t\tvalue[0] = static_cast<char>([fromHTML characterAtIndex: index++]);\r\n\t\tif (longVersion)\r\n\t\t\tvalue[1] = static_cast<char>([fromHTML characterAtIndex: index++]);\r\n\t\telse\r\n\t\t\tvalue[1] = value[0];\r\n\r\n\t\tunsigned rawBlue;\r\n\t\t[[NSScanner scannerWithString: @(value)] scanHexInt: &rawBlue];\r\n\r\n\t\tlong color = (rawBlue << 16) + (rawGreen << 8) + rawRed;\r\n\t\tmBackend->WndProc(static_cast<Message>(property), parameter, color);\r\n\t}\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Specialized property getter for colors.\r\n */\r\n- (NSColor *) getColorProperty: (int) property parameter: (long) parameter {\r\n\tlong color = mBackend->WndProc(static_cast<Message>(property), parameter, 0);\r\n\tCGFloat red = (color & 0xFF) / 255.0;\r\n\tCGFloat green = ((color >> 8) & 0xFF) / 255.0;\r\n\tCGFloat blue = ((color >> 16) & 0xFF) / 255.0;\r\n\tNSColor *result = [NSColor colorWithDeviceRed: red green: green blue: blue alpha: 1];\r\n\treturn result;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Specialized property setter for references (pointers, addresses).\r\n */\r\n- (void) setReferenceProperty: (int) property parameter: (long) parameter value: (const void *) value {\r\n\tmBackend->WndProc(static_cast<Message>(property), parameter, (sptr_t) value);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Specialized property getter for references (pointers, addresses).\r\n */\r\n- (const void *) getReferenceProperty: (int) property parameter: (long) parameter {\r\n\treturn (const void *) mBackend->WndProc(static_cast<Message>(property), parameter, 0);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Specialized property setter for string values.\r\n */\r\n- (void) setStringProperty: (int) property parameter: (long) parameter value: (NSString *) value {\r\n\tconst char *rawValue = value.UTF8String;\r\n\tmBackend->WndProc(static_cast<Message>(property), parameter, (sptr_t) rawValue);\r\n}\r\n\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Specialized property getter for string values.\r\n */\r\n- (NSString *) getStringProperty: (int) property parameter: (long) parameter {\r\n\tconst char *rawValue = (const char *) mBackend->WndProc(static_cast<Message>(property), parameter, 0);\r\n\treturn @(rawValue);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Specialized property setter for lexer properties, which are commonly passed as strings.\r\n */\r\n- (void) setLexerProperty: (NSString *) name value: (NSString *) value {\r\n\tconst char *rawName = name.UTF8String;\r\n\tconst char *rawValue = value.UTF8String;\r\n\tmBackend->WndProc(Message::SetProperty, (sptr_t) rawName, (sptr_t) rawValue);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Specialized property getter for references (pointers, addresses).\r\n */\r\n- (NSString *) getLexerProperty: (NSString *) name {\r\n\tconst char *rawName = name.UTF8String;\r\n\tconst char *result = (const char *) mBackend->WndProc(Message::SetProperty, (sptr_t) rawName, 0);\r\n\treturn @(result);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Sets the notification callback\r\n */\r\n- (void) registerNotifyCallback: (intptr_t) windowid value: (SciNotifyFunc) callback {\r\n\tmBackend->RegisterNotifyCallback(windowid, callback);\r\n}\r\n\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Sets the new control which is displayed as info bar at the top or bottom of the editor.\r\n * Set newBar to nil if you want to hide the bar again.\r\n * The info bar's height is set to the height of the scrollbar.\r\n */\r\n- (void) setInfoBar: (NSView <InfoBarCommunicator> *) newBar top: (BOOL) top {\r\n\tif (mInfoBar != newBar) {\r\n\t\t[mInfoBar removeFromSuperview];\r\n\r\n\t\tmInfoBar = newBar;\r\n\t\tmInfoBarAtTop = top;\r\n\t\tif (mInfoBar != nil) {\r\n\t\t\t[self addSubview: mInfoBar];\r\n\t\t\t[mInfoBar setCallback: self];\r\n\t\t}\r\n\r\n\t\t[self positionSubViews];\r\n\t}\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Sets the edit's info bar status message. This call only has an effect if there is an info bar.\r\n */\r\n- (void) setStatusText: (NSString *) text {\r\n\tif (mInfoBar != nil)\r\n\t\t[mInfoBar notify: IBNStatusChanged message: text location: NSZeroPoint value: 0];\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n- (NSRange) selectedRange {\r\n\treturn [mContent selectedRange];\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Return the main selection as an NSRange of positions (not characters).\r\n * Unlike selectedRange, this can return empty ranges inside the document.\r\n */\r\n\r\n- (NSRange) selectedRangePositions {\r\n\tconst sptr_t positionBegin = [self message: SCI_GETSELECTIONSTART];\r\n\tconst sptr_t positionEnd = [self message: SCI_GETSELECTIONEND];\r\n\treturn NSMakeRange(positionBegin, positionEnd-positionBegin);\r\n}\r\n\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n- (void) insertText: (id) aString {\r\n\tif ([aString isKindOfClass: [NSString class]])\r\n\t\tmBackend->InsertText(aString, CharacterSource::DirectInput);\r\n\telse if ([aString isKindOfClass: [NSAttributedString class]])\r\n\t\tmBackend->InsertText([aString string], CharacterSource::DirectInput);\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * For backwards compatibility.\r\n */\r\n- (BOOL) findAndHighlightText: (NSString *) searchText\r\n\t\t    matchCase: (BOOL) matchCase\r\n\t\t    wholeWord: (BOOL) wholeWord\r\n\t\t     scrollTo: (BOOL) scrollTo\r\n\t\t\t wrap: (BOOL) wrap {\r\n\treturn [self findAndHighlightText: searchText\r\n\t\t\t\tmatchCase: matchCase\r\n\t\t\t\twholeWord: wholeWord\r\n\t\t\t\t scrollTo: scrollTo\r\n\t\t\t\t     wrap: wrap\r\n\t\t\t\tbackwards: NO];\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Searches and marks the first occurrence of the given text and optionally scrolls it into view.\r\n *\r\n * @result YES if something was found, NO otherwise.\r\n */\r\n- (BOOL) findAndHighlightText: (NSString *) searchText\r\n\t\t    matchCase: (BOOL) matchCase\r\n\t\t    wholeWord: (BOOL) wholeWord\r\n\t\t     scrollTo: (BOOL) scrollTo\r\n\t\t\t wrap: (BOOL) wrap\r\n\t\t    backwards: (BOOL) backwards {\r\n\tFindOption searchFlags = FindOption::None;\r\n\tif (matchCase)\r\n\t\tsearchFlags = searchFlags | FindOption::MatchCase;\r\n\tif (wholeWord)\r\n\t\tsearchFlags = searchFlags | FindOption::WholeWord;\r\n\r\n\tlong selectionStart = [self getGeneralProperty: SCI_GETSELECTIONSTART parameter: 0];\r\n\tlong selectionEnd = [self getGeneralProperty: SCI_GETSELECTIONEND parameter: 0];\r\n\r\n\t// Sets the start point for the coming search to the beginning of the current selection.\r\n\t// For forward searches we have therefore to set the selection start to the current selection end\r\n\t// for proper incremental search. This does not harm as we either get a new selection if something\r\n\t// is found or the previous selection is restored.\r\n\tif (!backwards)\r\n\t\t[self getGeneralProperty: SCI_SETSELECTIONSTART parameter: selectionEnd];\r\n\t[self setGeneralProperty: SCI_SEARCHANCHOR value: 0];\r\n\tsptr_t result;\r\n\tconst char *textToSearch = searchText.UTF8String;\r\n\r\n\t// The following call will also set the selection if something was found.\r\n\tif (backwards) {\r\n\t\tresult = [ScintillaView directCall: self\r\n\t\t\t\t\t   message: SCI_SEARCHPREV\r\n\t\t\t\t\t    wParam: (uptr_t) searchFlags\r\n\t\t\t\t\t    lParam: (sptr_t) textToSearch];\r\n\t\tif (result < 0 && wrap) {\r\n\t\t\t// Try again from the end of the document if nothing could be found so far and\r\n\t\t\t// wrapped search is set.\r\n\t\t\t[self getGeneralProperty: SCI_SETSELECTIONSTART parameter: [self getGeneralProperty: SCI_GETTEXTLENGTH parameter: 0]];\r\n\t\t\t[self setGeneralProperty: SCI_SEARCHANCHOR value: 0];\r\n\t\t\tresult = [ScintillaView directCall: self\r\n\t\t\t\t\t\t   message: SCI_SEARCHNEXT\r\n\t\t\t\t\t\t    wParam: (uptr_t) searchFlags\r\n\t\t\t\t\t\t    lParam: (sptr_t) textToSearch];\r\n\t\t}\r\n\t} else {\r\n\t\tresult = [ScintillaView directCall: self\r\n\t\t\t\t\t   message: SCI_SEARCHNEXT\r\n\t\t\t\t\t    wParam: (uptr_t) searchFlags\r\n\t\t\t\t\t    lParam: (sptr_t) textToSearch];\r\n\t\tif (result < 0 && wrap) {\r\n\t\t\t// Try again from the start of the document if nothing could be found so far and\r\n\t\t\t// wrapped search is set.\r\n\t\t\t[self getGeneralProperty: SCI_SETSELECTIONSTART parameter: 0];\r\n\t\t\t[self setGeneralProperty: SCI_SEARCHANCHOR value: 0];\r\n\t\t\tresult = [ScintillaView directCall: self\r\n\t\t\t\t\t\t   message: SCI_SEARCHNEXT\r\n\t\t\t\t\t\t    wParam: (uptr_t) searchFlags\r\n\t\t\t\t\t\t    lParam: (sptr_t) textToSearch];\r\n\t\t}\r\n\t}\r\n\r\n\tif (result >= 0) {\r\n\t\tif (scrollTo)\r\n\t\t\t[self setGeneralProperty: SCI_SCROLLCARET value: 0];\r\n\t} else {\r\n\t\t// Restore the former selection if we did not find anything.\r\n\t\t[self setGeneralProperty: SCI_SETSELECTIONSTART value: selectionStart];\r\n\t\t[self setGeneralProperty: SCI_SETSELECTIONEND value: selectionEnd];\r\n\t}\r\n\treturn (result >= 0) ? YES : NO;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Searches the given text and replaces\r\n *\r\n * @result Number of entries replaced, 0 if none.\r\n */\r\n- (int) findAndReplaceText: (NSString *) searchText\r\n\t\t    byText: (NSString *) newText\r\n\t\t matchCase: (BOOL) matchCase\r\n\t\t wholeWord: (BOOL) wholeWord\r\n\t\t     doAll: (BOOL) doAll {\r\n\t// The current position is where we start searching for single occurrences. Otherwise we start at\r\n\t// the beginning of the document.\r\n\tlong startPosition;\r\n\tif (doAll)\r\n\t\tstartPosition = 0; // Start at the beginning of the text if we replace all occurrences.\r\n\telse\r\n\t\t// For a single replacement we start at the current caret position.\r\n\t\tstartPosition = [self getGeneralProperty: SCI_GETCURRENTPOS];\r\n\tlong endPosition = [self getGeneralProperty: SCI_GETTEXTLENGTH];\r\n\r\n\tFindOption searchFlags = FindOption::None;\r\n\tif (matchCase)\r\n\t\tsearchFlags = searchFlags | FindOption::MatchCase;\r\n\tif (wholeWord)\r\n\t\tsearchFlags = searchFlags | FindOption::WholeWord;\r\n\t[self setGeneralProperty: SCI_SETSEARCHFLAGS value: (long)searchFlags];\r\n\t[self setGeneralProperty: SCI_SETTARGETSTART value: startPosition];\r\n\t[self setGeneralProperty: SCI_SETTARGETEND value: endPosition];\r\n\r\n\tconst char *textToSearch = searchText.UTF8String;\r\n\tlong sourceLength = strlen(textToSearch); // Length in bytes.\r\n\tconst char *replacement = newText.UTF8String;\r\n\tlong targetLength = strlen(replacement);  // Length in bytes.\r\n\tsptr_t result;\r\n\r\n\tint replaceCount = 0;\r\n\tif (doAll) {\r\n\t\twhile (true) {\r\n\t\t\tresult = [ScintillaView directCall: self\r\n\t\t\t\t\t\t   message: SCI_SEARCHINTARGET\r\n\t\t\t\t\t\t    wParam: sourceLength\r\n\t\t\t\t\t\t    lParam: (sptr_t) textToSearch];\r\n\t\t\tif (result < 0)\r\n\t\t\t\tbreak;\r\n\r\n\t\t\treplaceCount++;\r\n\t\t\t[ScintillaView directCall: self\r\n\t\t\t\t\t  message: SCI_REPLACETARGET\r\n\t\t\t\t\t   wParam: targetLength\r\n\t\t\t\t\t   lParam: (sptr_t) replacement];\r\n\r\n\t\t\t// The replacement changes the target range to the replaced text. Continue after that till the end.\r\n\t\t\t// The text length might be changed by the replacement so make sure the target end is the actual\r\n\t\t\t// text end.\r\n\t\t\t[self setGeneralProperty: SCI_SETTARGETSTART value: [self getGeneralProperty: SCI_GETTARGETEND]];\r\n\t\t\t[self setGeneralProperty: SCI_SETTARGETEND value: [self getGeneralProperty: SCI_GETTEXTLENGTH]];\r\n\t\t}\r\n\t} else {\r\n\t\tresult = [ScintillaView directCall: self\r\n\t\t\t\t\t   message: SCI_SEARCHINTARGET\r\n\t\t\t\t\t    wParam: sourceLength\r\n\t\t\t\t\t    lParam: (sptr_t) textToSearch];\r\n\t\treplaceCount = (result < 0) ? 0 : 1;\r\n\r\n\t\tif (replaceCount > 0) {\r\n\t\t\t[ScintillaView directCall: self\r\n\t\t\t\t\t  message: SCI_REPLACETARGET\r\n\t\t\t\t\t   wParam: targetLength\r\n\t\t\t\t\t   lParam: (sptr_t) replacement];\r\n\r\n\t\t\t// For a single replace we set the new selection to the replaced text.\r\n\t\t\t[self setGeneralProperty: SCI_SETSELECTIONSTART value: [self getGeneralProperty: SCI_GETTARGETSTART]];\r\n\t\t\t[self setGeneralProperty: SCI_SETSELECTIONEND value: [self getGeneralProperty: SCI_GETTARGETEND]];\r\n\t\t}\r\n\t}\r\n\r\n\treturn replaceCount;\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n- (void) setFontName: (NSString *) font\r\n\t\tsize: (int) size\r\n\t\tbold: (BOOL) bold\r\n\t      italic: (BOOL) italic {\r\n\tfor (int i = 0; i < 128; i++) {\r\n\t\t[self setGeneralProperty: SCI_STYLESETFONT\r\n\t\t\t       parameter: i\r\n\t\t\t\t   value: (sptr_t)font.UTF8String];\r\n\t\t[self setGeneralProperty: SCI_STYLESETSIZE\r\n\t\t\t       parameter: i\r\n\t\t\t\t   value: size];\r\n\t\t[self setGeneralProperty: SCI_STYLESETBOLD\r\n\t\t\t       parameter: i\r\n\t\t\t\t   value: bold];\r\n\t\t[self setGeneralProperty: SCI_STYLESETITALIC\r\n\t\t\t       parameter: i\r\n\t\t\t\t   value: italic];\r\n\t}\r\n}\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n\r\n@end\r\n\r\n"
  },
  {
    "path": "scintilla/cocoa/checkbuildosx.sh",
    "content": "# Script to build Scintilla for macOS with most supported build files.\n# Current directory should be scintilla/cocoa before running.\n\ncd ../..\n\n# ************************************************************\n# Target 1: Unit tests\n\necho Unit tests\n\ncd scintilla/test/unit\nmake clean\nmake test\ncd ../../..\n\n# ************************************************************\n# Target 2: build framework and test app with Xcode targeting macOS 10.n with n from 9 to 5\n# Only SDK versions that are installed will be built\n# Clean both then build both -- if perform clean in ScintillaTest, also cleans ScintillaFramework\n# which can cause double build\n\necho Building Cocoa-native ScintillaFramework and ScintillaTest\nfor sdk in macosx10.15 macosx10.14\ndo\n    xcodebuild -showsdks | grep $sdk\n    if [ \"$(xcodebuild -showsdks | grep $sdk)\" != \"\" ]\n    then\n        echo Building with $sdk\n        cd scintilla/cocoa/ScintillaFramework\n        xcodebuild clean\n        cd ../ScintillaTest\n        xcodebuild clean\n        cd ../ScintillaFramework\n        xcodebuild -sdk $sdk\n        cd ../ScintillaTest\n        xcodebuild -sdk $sdk\n        cd ../../..\n    else\n        echo Warning $sdk not available\n    fi\ndone\n\n# ************************************************************\n# Target 3: Qt builds\n# Requires Qt development libraries and qmake to be installed\n\necho Building Qt and PySide\n\ncd scintilla/qt\ncd ScintillaEditBase\nqmake -spec macx-xcode\nxcodebuild clean\nxcodebuild\ncd ..\n\ncd ScintillaEdit\npython3 WidgetGen.py\nqmake -spec macx-xcode\nxcodebuild clean\nxcodebuild\ncd ..\n\ncd ScintillaEditPy\npython2 sepbuild.py\ncd ..\ncd ../..\n"
  },
  {
    "path": "scintilla/cppcheck.suppress",
    "content": "// File to suppress cppcheck warnings for files that will not be fixed.\r\n// Does not suppress warnings where an additional occurrence of the warning may be of interest.\r\n// Configured for cppcheck 2.11\r\n\r\n// Coding style is to use assignments in constructor when there are many\r\n// members to initialize or the initialization is complex or has comments.\r\nuseInitializationList\r\n\r\n// These may be interesting but its not clear without examining each instance closely\r\n// Would have to ensure that any_of/all_of has same early/late exits as current code and\r\n// produces same result on empty collections\r\nuseStlAlgorithm\r\n\r\n// Written with variable for consistency\r\nknownArgument:scintilla/src/SparseVector.h\r\n\r\n// cppcheck 2.11 can't find system headers on Win32.\r\nmissingIncludeSystem\r\n\r\n// cppcheck 2.11 limits checking of complex functions unless --check-level=exhaustive\r\ncheckLevelNormal:scintilla/src/Editor.cxx\r\n\r\n// The cast converts from 'unsigned char ' to 'char' so isn't unused.\r\n// Redundant code: Found unused cast of expression 'leadByte'\r\nconstStatement:scintilla/src/Document.cxx\r\n\r\n// ILexer5* is not pointing at logically const\r\nconstParameterPointer:scintilla/src/Document.cxx\r\n\r\n// Doesn't seem to understand that values change in loops\r\nknownConditionTrueFalse:scintilla/src/Document.cxx\r\n\r\n// Some non-explicit constructors are used for conversions or are private to lexers\r\nnoExplicitConstructor\r\n\r\n// MarginView access to all bits is safe and is better defined in later versions of C++\r\nshiftTooManyBitsSigned:scintilla/src/MarginView.cxx\r\n\r\n// DLL entry points are unused inside Scintilla\r\nunusedFunction:scintilla/win32/ScintillaDLL.cxx\r\n\r\n// ScintillaDocument is providing an API and there are no consumers of the API inside Scintilla\r\nunusedFunction:scintilla/qt/ScintillaEdit/ScintillaDocument.cpp\r\n\r\n// Doesn't understand changing dropWentOutside in Editor\r\nknownConditionTrueFalse:scintilla/win32/ScintillaWin.cxx\r\n\r\n// GetData is implementing interface so shouldn't add const\r\nconstParameterPointer:scintilla/win32/ScintillaWin.cxx\r\n\r\n// Doesn't handle intptr_t (long long) being signed\r\nknownConditionTrueFalse:scintilla/src/Editor.cxx\r\nknownConditionTrueFalse:scintilla/src/EditView.cxx\r\n\r\n// cppcheck seems to believe that unique_ptr<T *[]>::get returns void* instead of T**\r\narithOperationsOnVoidPointer:scintilla/src/PerLine.cxx\r\narithOperationsOnVoidPointer:scintilla/src/PositionCache.cxx\r\n\r\n// G_DEFINE_TYPE is too complex to pass to cppcheck\r\nunknownMacro:scintilla/gtk/PlatGTK.cxx\r\n\r\n// maskSmooth set depending on preprocessor allowing Wayland definition\r\nbadBitmaskCheck:scintilla/gtk/ScintillaGTK.cxx\r\n\r\n// Changing events to const pointers changes signature and would require casts when hooking up\r\nconstParameterPointer:scintilla/gtk/ScintillaGTK.cxx\r\nconstParameterCallback:scintilla/gtk/ScintillaGTK.cxx\r\n\r\n// Difficult to test accessibility so don't change\r\nconstParameterPointer:scintilla/gtk/ScintillaGTKAccessible.cxx\r\nconstVariableReference:scintilla/gtk/ScintillaGTKAccessible.cxx\r\nconstVariablePointer:scintilla/gtk/ScintillaGTKAccessible.cxx\r\n\r\n// moc_ files show #error as they are not built with standard context\r\npreprocessorErrorDirective:scintilla/qt/*.cpp\r\n\r\n// Doesn't understand Qt slots macro\r\nunknownMacro:scintilla/qt/ScintillaEditBase/*.h\r\n\r\n// The performance cost of by-value passing is often small and using a reference decreases\r\n// code legibility.\r\npassedByValue\r\n\r\n// Suppress everything in catch.hpp as won't be changing\r\n*:scintilla/test/unit/catch.hpp\r\n\r\n// Checks for moves move to variables that are not read but the moved from is checked\r\nunreadVariable:scintilla/test/unit/*.cxx\r\naccessMoved:scintilla/test/unit/*.cxx\r\n\r\n// cppcheck fails REQUIRE from Catch\r\ncomparisonOfFuncReturningBoolError:scintilla/test/unit/*.cxx\r\n"
  },
  {
    "path": "scintilla/delbin.bat",
    "content": "@del /S /Q *.a *.aps *.bsc *.dll *.dsw *.exe *.idb *.ilc *.ild *.ilf *.ilk *.ils *.lib *.map *.ncb *.obj *.o *.opt *.ipdb *.pdb *.plg *.res *.sbr *.tds *.exp *.tlog *.lastbuildstate >NUL:\r\n"
  },
  {
    "path": "scintilla/doc/AddSource.txt",
    "content": "Some of the build files adapt to adding and removing source code files but most\r\nmust be modified by hand. Here is a list of directories and the build files that\r\nmust be modified or possibly need to be modified.\r\nThe Cocoa project.pbxproj file is complex and should be modified with Xcode.\r\nThe other build files can be edited manually.\r\n\r\nsrc:\r\n\tcocoa/ScintillaFramework/ScintillaFramework.xcodeproj/project.pbxproj\r\n\tgtk/makefile\r\n\tqt/ScintillaEdit/ScintillaEdit.pro\r\n\tqt/ScintillaEditBase/ScintillaEditBase.pro\r\n\twin32/makefile\r\n\twin32/scintilla.mak\r\n\t-- possibly:\r\n\ttest/unit/makefile\r\n\ttest/unit/test.mak\r\n\r\ncocoa:\r\n\tcocoa/ScintillaFramework/ScintillaFramework.xcodeproj/project.pbxproj\r\n\r\ngtk:\r\n\tgtk/makefile\r\n\r\nqt:\r\n\tqt/ScintillaEdit/ScintillaEdit.pro\r\n\tqt/ScintillaEditBase/ScintillaEditBase.pro\r\n\r\nwin32:\r\n\twin32/makefile\r\n\twin32/scintilla.mak\r\n"
  },
  {
    "path": "scintilla/doc/Design.html",
    "content": "<?xml version=\"1.0\"?>\r\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\r\n    \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n  <head>\r\n    <meta name=\"generator\" content=\"HTML Tidy, see www.w3.org\" />\r\n    <meta name=\"generator\" content=\"SciTE\" />\r\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\r\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\r\n    <title>\r\n      Scintilla and SciTE\r\n    </title>\r\n  </head>\r\n  <body bgcolor=\"#FFFFFF\" text=\"#000000\">\r\n    <table bgcolor=\"#000000\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\r\n      <tr>\r\n        <td>\r\n          <img src=\"SciTEIco.png\" border=\"3\" height=\"64\" width=\"64\" alt=\"Scintilla icon\" />\r\n        </td>\r\n        <td>\r\n          <a href=\"index.html\" style=\"color:white;text-decoration:none\"><font size=\"5\">Scintilla\r\n          Component Design</font></a>\r\n        </td>\r\n      </tr>\r\n    </table>\r\n    <h2>\r\n       Top level structure\r\n    </h2>\r\n    <p>\r\n       Scintilla consists of three major layers of C++ code\r\n    </p>\r\n    <ul>\r\n      <li>\r\n        Portability Library\r\n      </li>\r\n      <li>\r\n        Core Code\r\n      </li>\r\n      <li>\r\n        Platform Events and API\r\n      </li>\r\n    </ul>\r\n    <p>\r\n       The primary purpose of this structure is to separate the platform dependent code from the\r\n      platform independent core code. This makes it easier to port Scintilla to a new platform and\r\n      ensures that most readers of the code do not have to deal with platform details. To minimise\r\n      portability problems and avoid code bloat, a conservative subset of C++ is used in Scintilla\r\n      with no exception handling, run time type information or use of the standard C++\r\n      library and with limited use of templates.\r\n    </p>\r\n    <p>\r\n       The currently supported platforms, Windows, GTK/Linux, Cocoa, Qt, and wxWidgets are fairly similar in\r\n      many ways.\r\n      Each has windows, menus and bitmaps. These features generally work in similar ways so each\r\n      has a way to move a window or draw a red line. Sometimes one platform requires a sequence of\r\n      calls rather than a single call. At other times, the differences are more profound. Reading\r\n      the Windows clipboard occurs synchronously but reading the GTK clipboard requires a request\r\n      call that will be asynchronously answered with a message containing the clipboard data.\r\n      The wxWidgets platform is available from the <a href=\"http://wxwidgets.org/\">wxWidgets site</a>\r\n    </p>\r\n    <br />\r\n    <h3>\r\n       Portability Library\r\n    </h3>\r\n    <p>\r\n       This is a fairly small and thin layer over the platform's native capabilities.\r\n    </p>\r\n    <p>\r\n       The portability library is defined in Geometry.h and Platform.h and is implemented once for each platform.\r\n      PlatWin.cxx defines the Windows variants of the methods and PlatGTK.cxx the GTK variants.\r\n    </p>\r\n    <p>\r\n       Several of the classes here hold platform specific object identifiers and act as proxies to\r\n      these platform objects. Most client code can thus manipulate the platform objects without\r\n      caring which is the current platform. Sometimes client code needs access to the underlying\r\n      object identifiers and this is provided by the GetID method. The underlying types of the\r\n      platform specific identifiers are typedefed to common names to allow them to be transferred\r\n      around in client code where needed.\r\n    </p>\r\n    <h4>\r\n       Point, PRectangle\r\n    </h4>\r\n    <p>\r\n       These are simple classes provided to hold the commonly used geometric primitives. A\r\n      PRectangle follows the Mac / Windows convention of not including its bottom and right sides\r\n      instead of including all its sides as is normal in GTK. It is not called Rectangle as this may be\r\n      the name of a macro on Windows.\r\n    </p>\r\n    <h4>\r\n       ColourDesired\r\n    </h4>\r\n    <p>\r\n       This is a simple class holding an expected colour. It is internally represented as a single\r\n      32 bit integer in BGR format with 8 bits per colour, but also provides a convenient API to fetch\r\n      each component separately.\r\n       As a platform might not be able to represent the exact desired colour if it doesn't have 24 bit\r\n      depth available, it might not actually represent the exact desired colour but select a best fit\r\n      that it can actually render.\r\n    </p>\r\n    <h4>\r\n       Font\r\n    </h4>\r\n    <p>\r\n       Font holds a platform specific font identifier - HFONT for Windows, PangoFontDescription* for GTK. It\r\n      does not own the identifier and so will not delete the platform font object in its\r\n      destructor. Client code should call Destroy at appropriate times.\r\n    </p>\r\n    <h4>\r\n       Surface\r\n    </h4>\r\n    <p>\r\n       Surface is an abstraction over each platform's concept of somewhere that graphical drawing\r\n      operations can be done. It may wrap an already created drawing place such as a window or be\r\n      used to create a bitmap that can be drawn into and later copied onto another surface. On\r\n      Windows it wraps a HDC and possibly a HBITMAP. On GTK it wraps a cairo_surface_t*.\r\n      Other platform specific objects are created (and correctly destroyed) whenever\r\n      required to perform drawing actions.\r\n    </p>\r\n    <p>\r\n       Drawing operations provided include drawing filled and unfilled polygons, lines, rectangles,\r\n      ellipses and text. The height and width of text as well as other details can be measured.\r\n      Operations can be clipped to a rectangle. Most of the calls are stateless with all parameters\r\n      being passed at each call. The exception to this is line drawing which is performed by\r\n      calling MoveTo and then LineTo.\r\n    </p>\r\n    <h4>\r\n       Window\r\n    </h4>\r\n    <p>\r\n       Window acts as a proxy to a platform window allowing operations such as showing, moving,\r\n      redrawing, and destroying to be performed. It contains a platform specific window identifier\r\n      - HWND for Windows, GtkWidget* for GTK.\r\n    </p>\r\n    <h4>\r\n       ListBox\r\n    </h4>\r\n    <p>\r\n       ListBox is a subclass of Window and acts as a proxy to a platform listbox adding methods for\r\n      operations such as adding, retrieving, and selecting items.\r\n    </p>\r\n    <h4>\r\n       Menu\r\n    </h4>\r\n    <p>\r\n       Menu is a small helper class for constructing popup menus. It contains the platform specific\r\n      menu identifier - HMENU for Windows, GtkMenu* for GTK. Most of the work in\r\n      constructing menus requires access to platform events and so is done in the Platform Events\r\n      and API layer.\r\n    </p>\r\n    <h4>\r\n       Platform\r\n    </h4>\r\n    <p>\r\n       The Platform class is used to access the facilities of the platform. System wide parameters\r\n      such as double click speed and chrome colour are available from Platform. Utility functions\r\n      such as DebugPrintf are also available from Platform.\r\n    </p>\r\n    <h3>\r\n       Core Code\r\n    </h3>\r\n    <p>\r\n       The bulk of Scintilla's code is platform independent. This is made up of the CellBuffer,\r\n      ContractionState, Document, Editor, Indicator, LineMarker, Style, ViewStyle, KeyMap,\r\n      ScintillaBase, CallTip,\r\n      and AutoComplete primary classes.\r\n    </p>\r\n    <h4>\r\n       CellBuffer\r\n    </h4>\r\n    <p>\r\n       A CellBuffer holds text and styling information, the undo stack, the assignment of line\r\n      markers to lines, and the fold structure.\r\n    </p>\r\n    <p>\r\n       A cell contains a character byte and its associated style byte. The current state of the\r\n      cell buffer is the sequence of cells that make up the text and a sequence of line information\r\n      containing the starting position of each line and any markers assigned to each line.\r\n    </p>\r\n    <p>\r\n       The undo stack holds a sequence of actions on the cell buffer. Each action is one of a text\r\n      insertion, a text deletion or an undo start action. The start actions are used to group\r\n      sequences of text insertions and deletions together so they can be undone together. To\r\n      perform an undo operation, each insertion or deletion is undone in reverse sequence.\r\n      Similarly, redo reapplies each action to the buffer in sequence. Whenever a character is\r\n      inserted in the buffer either directly through a call such as InsertString or through undo or\r\n      redo, its styling byte is initially set to zero. Client code is responsible for styling each\r\n      character whenever convenient. Styling information is not stored in undo actions.\r\n    </p>\r\n    <h4>\r\n       Document\r\n    </h4>\r\n    <p>\r\n       A document contains a CellBuffer and deals with some higher level abstractions such as\r\n      words, DBCS character sequences and line end character sequences. It is responsible for\r\n      managing the styling process and for notifying other objects when changes occur to the\r\n      document.\r\n    </p>\r\n    <h4>\r\n       Editor\r\n    </h4>\r\n    <p>\r\n       The Editor object is central to Scintilla. It is responsible for displaying a document and\r\n      responding to user actions and requests from the container. It uses ContractionState, Indicator,\r\n      LineMarker, Style, and ViewStyle objects to display the document and a KeyMap class to\r\n      map key presses to functions.\r\n      The visibility of each line is kept in the ContractionState which is also responsible for mapping\r\n      from display lines to documents lines and vice versa.\r\n    </p>\r\n    <p>\r\n       There may be multiple Editor objects attached to one Document object. Changes to a\r\n       document are broadcast to the editors through the DocWatcher mechanism.\r\n    </p>\r\n    <h4>\r\n       ScintillaBase\r\n    </h4>\r\n    <p>\r\n       ScintillaBase is a subclass of Editor and adds extra windowing features including display of\r\n      calltips, autocompletion lists and context menus. These features use CallTip and AutoComplete\r\n      objects. This class is optional so a lightweight implementation of Scintilla may bypass it if\r\n      the added functionality is not required.\r\n    </p>\r\n    <h3>\r\n       Platform Events and API\r\n    </h3>\r\n    <p>\r\n       Each platform uses different mechanisms for receiving events. On Windows, events are\r\n      received through messages and COM. On GTK, callback functions are used.\r\n    </p>\r\n    <p>\r\n       For each platform, a class is derived from ScintillaBase (and thus from Editor). This is\r\n      ScintillaWin on Windows and ScintillaGTK on GTK. These classes are responsible for\r\n      connecting to the platforms event mechanism and also to implement some virtual methods in\r\n      Editor and ScintillaBase which are different on the platforms. For example, this layer has to\r\n      support this difference between the synchronous Windows clipboard and the asynchronous GTK\r\n      clipboard.\r\n    </p>\r\n    <p>\r\n       The external API is defined in this layer as each platform has different preferred styles of\r\n      API - messages on Windows and function calls on GTK. This also allows multiple APIs to be\r\n      defined on a platform. The currently available API on GTK is similar to the Windows API and\r\n      does not follow platform conventions well. A second API could be implemented here that did\r\n      follow platform conventions.\r\n    </p>\r\n  </body>\r\n</html>\r\n\r\n"
  },
  {
    "path": "scintilla/doc/Icons.html",
    "content": "<?xml version=\"1.0\"?>\r\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\r\n    \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n  <head>\r\n    <meta name=\"generator\" content=\"HTML Tidy, see www.w3.org\" />\r\n    <meta name=\"generator\" content=\"SciTE\" />\r\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\r\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\r\n    <title>\r\n      Scintilla icons\r\n    </title>\r\n  </head>\r\n  <body bgcolor=\"#FFFFFF\" text=\"#000000\">\r\n    <table bgcolor=\"#000000\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\r\n      <tr>\r\n        <td>\r\n          <img src=\"SciTEIco.png\" border=\"3\" height=\"64\" width=\"64\" alt=\"Scintilla icon\" />\r\n        </td>\r\n        <td>\r\n          <a href=\"index.html\" style=\"color:white;text-decoration:none\"><font size=\"5\">Scintilla\r\n          and SciTE</font></a>\r\n        </td>\r\n      </tr>\r\n    </table>\r\n    <h2>\r\n       Icons\r\n    </h2>\r\n    <p>\r\n       These images may be used under the same license as Scintilla.\r\n    </p>\r\n    <p>\r\n       Drawn by Iago Rubio, Philippe Lhoste, and Neil Hodgson.\r\n    </p>\r\n    <p>\r\n       <a href=\"http://prdownloads.sourceforge.net/scintilla/icons1.zip?download\">zip format</a> (70K)\r\n    </p>\r\n    <table>\r\n    <tr>\r\n    <td>For autocompletion lists</td>\r\n    <td colspan=\"3\">For margin markers</td>\r\n    </tr>\r\n    <tr>\r\n    <td>12x12</td>\r\n    <td>16x16</td>\r\n    <td>24x24</td>\r\n    <td>32x32</td>\r\n    </tr>\r\n    <tr>\r\n    <td valign=\"top\"><img src=\"12.png\" /></td>\r\n    <td valign=\"top\"><img src=\"16.png\" /></td>\r\n    <td valign=\"top\"><img src=\"24.png\" /></td>\r\n    <td valign=\"top\"><img src=\"32.png\" /></td>\r\n    </tr>\r\n    </table>\r\n  </body>\r\n</html>\r\n"
  },
  {
    "path": "scintilla/doc/Lexer.txt",
    "content": "How to write a scintilla lexer\r\n\r\nA lexer for a particular language determines how a specified range of\r\ntext shall be colored.  Writing a lexer is relatively straightforward\r\nbecause the lexer need only color given text.  The harder job of\r\ndetermining how much text actually needs to be colored is handled by\r\nScintilla itself, that is, the lexer's caller.\r\n\r\n\r\nParameters\r\n\r\nThe lexer for language LLL has the following prototype:\r\n\r\n    static void ColouriseLLLDoc (\r\n        unsigned int startPos, int length,\r\n        int initStyle,\r\n        WordList *keywordlists[],\r\n        Accessor &styler);\r\n\r\nThe styler parameter is an Accessor object.  The lexer must use this\r\nobject to access the text to be colored.  The lexer gets the character\r\nat position i using styler.SafeGetCharAt(i);\r\n\r\nThe startPos and length parameters indicate the range of text to be\r\nrecolored; the lexer must determine the proper color for all characters\r\nin positions startPos through startPos+length.\r\n\r\nThe initStyle parameter indicates the initial state, that is, the state\r\nat the character before startPos. States also indicate the coloring to\r\nbe used for a particular range of text.\r\n\r\nNote:  the character at StartPos is assumed to start a line, so if a\r\nnewline terminates the initStyle state the lexer should enter its\r\ndefault state (or whatever state should follow initStyle).\r\n\r\nThe keywordlists parameter specifies the keywords that the lexer must\r\nrecognize.  A WordList class object contains methods that simplify\r\nthe recognition of keywords.  Present lexers use a helper function\r\ncalled classifyWordLLL to recognize keywords.  These functions show how\r\nto use the keywordlists parameter to recognize keywords.  This\r\ndocumentation will not discuss keywords further.\r\n\r\n\r\nThe lexer code\r\n\r\nThe task of a lexer can be summarized briefly: for each range r of\r\ncharacters that are to be colored the same, the lexer should call\r\n\r\n    styler.ColourTo(i, state)\r\n\r\nwhere i is the position of the last character of the range r.  The lexer\r\nshould set the state variable to the coloring state of the character at\r\nposition i and continue until the entire text has been colored.\r\n\r\nNote 1:  the styler (Accessor) object remembers the i parameter in the\r\nprevious calls to styler.ColourTo, so the single i parameter suffices to\r\nindicate a range of characters.\r\n\r\nNote 2: As a side effect of calling styler.ColourTo(i,state), the\r\ncoloring states of all characters in the range are remembered so that\r\nScintilla may set the initStyle parameter correctly on future calls to\r\nthe\r\nlexer.\r\n\r\n\r\nLexer organization\r\n\r\nThere are at least two ways to organize the code of each lexer.  Present\r\nlexers use what might be called a \"character-based\" approach: the outer\r\nloop iterates over characters, like this:\r\n\r\n  lengthDoc = startPos + length ;\r\n  for (unsigned int i = startPos; i < lengthDoc; i++) {\r\n    chNext = styler.SafeGetCharAt(i + 1);\r\n    << handle special cases >>\r\n    switch(state) {\r\n      // Handlers examine only ch and chNext.\r\n      // Handlers call styler.ColorTo(i,state) if the state changes.\r\n      case state_1: << handle ch in state 1 >>\r\n      case state_2: << handle ch in state 2 >>\r\n      ...\r\n      case state_n: << handle ch in state n >>\r\n    }\r\n    chPrev = ch;\r\n  }\r\n  styler.ColourTo(lengthDoc - 1, state);\r\n\r\n\r\nAn alternative would be to use a \"state-based\" approach.  The outer loop\r\nwould iterate over states, like this:\r\n\r\n  lengthDoc = startPos+lenth ;\r\n  for ( unsigned int i = startPos ;; ) {\r\n    char ch = styler.SafeGetCharAt(i);\r\n    int new_state = 0 ;\r\n    switch ( state ) {\r\n      // scanners set new_state if they set the next state.\r\n      case state_1: << scan to the end of state 1 >> break ;\r\n      case state_2: << scan to the end of state 2 >> break ;\r\n      case default_state:\r\n        << scan to the next non-default state and set new_state >>\r\n    }\r\n    styler.ColourTo(i, state);\r\n    if ( i >= lengthDoc ) break ;\r\n    if ( ! new_state ) {\r\n      ch = styler.SafeGetCharAt(i);\r\n      << set state based on ch in the default state >>\r\n    }\r\n  }\r\n  styler.ColourTo(lengthDoc - 1, state);\r\n\r\nThis approach might seem to be more natural.  State scanners are simpler\r\nthan character scanners because less needs to be done.  For example,\r\nthere is no need to test for the start of a C string inside the scanner\r\nfor a C comment.  Also this way makes it natural to define routines that\r\ncould be used by more than one scanner; for example, a scanToEndOfLine\r\nroutine.\r\n\r\nHowever, the special cases handled in the main loop in the\r\ncharacter-based approach would have to be handled by each state scanner,\r\nso both approaches have advantages.  These special cases are discussed\r\nbelow.\r\n\r\nSpecial case: Lead characters\r\n\r\nLead bytes are part of DBCS processing for languages such as Japanese\r\nusing an encoding such as Shift-JIS. In these encodings, extended\r\n(16-bit) characters are encoded as a lead byte followed by a trail byte.\r\n\r\nLead bytes are rarely of any lexical significance, normally only being\r\nallowed within strings and comments. In such contexts, lexers should\r\nignore ch if styler.IsLeadByte(ch) returns TRUE.\r\n\r\nNote: UTF-8 is simpler than Shift-JIS, so no special handling is\r\napplied for it. All UTF-8 extended characters are >= 128 and none are\r\nlexically significant in programming languages which, so far, use only\r\ncharacters in ASCII for operators, comment markers, etc.\r\n\r\n\r\nSpecial case: Folding\r\n\r\nFolding may be performed in the lexer function. It is better to use a\r\nseparate folder function as that avoids some troublesome interaction\r\nbetween styling and folding. The folder function will be run after the\r\nlexer function if folding is enabled. The rest of this section explains\r\nhow to perform folding within the lexer function.\r\n\r\nDuring initialization, lexers that support folding set\r\n\r\n    bool fold = styler.GetPropertyInt(\"fold\");\r\n\r\nIf folding is enabled in the editor, fold will be TRUE and the lexer\r\nshould call:\r\n\r\n    styler.SetLevel(line, level);\r\n\r\nat the end of each line and just before exiting.\r\n\r\nThe line parameter is simply the count of the number of newlines seen.\r\nIt's initial value is styler.GetLine(startPos) and it is incremented\r\n(after calling styler.SetLevel) whenever a newline is seen.\r\n\r\nThe level parameter is the desired indentation level in the low 12 bits,\r\nalong with flag bits in the upper four bits. The indentation level\r\ndepends on the language.  For C++, it is incremented when the lexer sees\r\na '{' and decremented when the lexer sees a '}' (outside of strings and\r\ncomments, of course).\r\n\r\nThe following flag bits, defined in Scintilla.h, may be set or cleared\r\nin the flags parameter. The SC_FOLDLEVELWHITEFLAG flag is set if the\r\nlexer considers that the line contains nothing but whitespace.  The\r\nSC_FOLDLEVELHEADERFLAG flag indicates that the line is a fold point.\r\nThis normally means that the next line has a greater level than present\r\nline.  However, the lexer may have some other basis for determining a\r\nfold point.  For example, a lexer might create a header line for the\r\nfirst line of a function definition rather than the last.\r\n\r\nThe SC_FOLDLEVELNUMBERMASK mask denotes the level number in the low 12\r\nbits of the level param. This mask may be used to isolate either flags\r\nor level numbers.\r\n\r\nFor example, the C++ lexer contains the following code when a newline is\r\nseen:\r\n\r\n  if (fold) {\r\n    int lev = levelPrev;\r\n\r\n    // Set the \"all whitespace\" bit if the line is blank.\r\n    if (visChars == 0)\r\n      lev |= SC_FOLDLEVELWHITEFLAG;\r\n\r\n    // Set the \"header\" bit if needed.\r\n    if ((levelCurrent > levelPrev) && (visChars > 0))\r\n      lev |= SC_FOLDLEVELHEADERFLAG;\r\n      styler.SetLevel(lineCurrent, lev);\r\n\r\n    // reinitialize the folding vars describing the present line.\r\n    lineCurrent++;\r\n    visChars = 0;  // Number of non-whitespace characters on the line.\r\n    levelPrev = levelCurrent;\r\n  }\r\n\r\nThe following code appears in the C++ lexer just before exit:\r\n\r\n  // Fill in the real level of the next line, keeping the current flags\r\n  // as they will be filled in later.\r\n  if (fold) {\r\n    // Mask off the level number, leaving only the previous flags.\r\n    int flagsNext = styler.LevelAt(lineCurrent);\r\n    flagsNext &= ~SC_FOLDLEVELNUMBERMASK;\r\n    styler.SetLevel(lineCurrent, levelPrev | flagsNext);\r\n  }\r\n\r\n\r\nDon't worry about performance\r\n\r\nThe writer of a lexer may safely ignore performance considerations: the\r\ncost of redrawing the screen is several orders of magnitude greater than\r\nthe cost of function calls, etc.  Moreover, Scintilla performs all the\r\nimportant optimizations; Scintilla ensures that a lexer will be called\r\nonly to recolor text that actually needs to be recolored.  Finally, it\r\nis not necessary to avoid extra calls to styler.ColourTo: the sytler\r\nobject buffers calls to ColourTo to avoid multiple updates of the\r\nscreen.\r\n\r\nPage contributed by Edward K. Ream"
  },
  {
    "path": "scintilla/doc/Privacy.html",
    "content": "<?xml version=\"1.0\"?>\r\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\r\n    \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n  <head>\r\n    <meta name=\"generator\" content=\"SciTE\" />\r\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\r\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\r\n    <title>\r\n      Privacy Policy\r\n    </title>\r\n  </head>\r\n  <body bgcolor=\"#FFFFFF\" text=\"#000000\">\r\n    <table bgcolor=\"#000000\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\r\n      <tr>\r\n        <td>\r\n          <img src=\"SciTEIco.png\" border=\"3\" height=\"64\" width=\"64\" alt=\"Scintilla icon\" />\r\n        </td>\r\n        <td>\r\n          <a href=\"index.html\" style=\"color:white;text-decoration:none\"><font size=\"5\">Scintilla\r\n          and SciTE</font></a>\r\n        </td>\r\n      </tr>\r\n    </table>\r\n    <h2>\r\n       Privacy Policy for scintilla.org\r\n    </h2>\r\n    <h3>\r\n       Information Collected\r\n    </h3>\r\n    <p>\r\n      Logs are collected to allow analysis of which pages are viewed.\r\n      The advertisements collect viewing information through Google Analytics which is\r\n      used by Google and advertisers.\r\n      No personally identifiable information is collected by scintilla.org.\r\n    </p>\r\n    <h3>\r\n       External Links\r\n    </h3>\r\n    <p>\r\n       Other web sites are linked to from this site.\r\n       These web sites have their own privacy policies which may differ significantly to those of scintilla.org.\r\n    </p>\r\n    <h3>\r\n       Cookies\r\n    </h3>\r\n    <p>\r\n       A cookie is a text file placed on the hard drive of a computer by some web pages which is used to remember\r\n       when a particular user returns to that site.\r\n       The advertisements shown on the main pages may use cookies.\r\n    </p>\r\n    <h3>\r\n       Contact\r\n    </h3>\r\n    <p>\r\n       This web site is the responsibility of Neil Hodgson.\r\n       Most queries about the site contents should go to one of the mailing lists mentioned on the main pages.\r\n       Queries about the privacy policy may be sent to neilh @ scintilla.org.\r\n    </p>\r\n    <h3>\r\n       Changes to this Policy\r\n    </h3>\r\n    <p>\r\n       This policy may change. If it does then this page will be updated and the date at the bottom will change.\r\n    </p>\r\n    <p>\r\n       This policy was last updated 2 June 2015.\r\n    </p>\r\n  </body>\r\n</html>\r\n"
  },
  {
    "path": "scintilla/doc/SciCoding.html",
    "content": "<?xml version=\"1.0\"?>\r\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\r\n    \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n  <head>\r\n    <meta name=\"generator\" content=\"SciTE\" />\r\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\r\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\r\n    <title>\r\n      Scintilla and SciTE Code Style Preferences\r\n    </title>\r\n\t<style>\r\n\t.S0 {\r\n\t\tcolor: #808080;\r\n\t}\r\n\t.S1 {\r\n\t\tfont-family: Comic Sans MS;\r\n\t\tcolor: #007F00;\r\n\t\tfont-size: 9pt;\r\n\t}\r\n\t.S2 {\r\n\t\tfont-family: Comic Sans MS;\r\n\t\tcolor: #007F00;\r\n\t\tfont-size: 9pt;\r\n\t}\r\n\t.S3 {\r\n\t\tfont-family: Comic Sans MS;\r\n\t\tcolor: #3F703F;\r\n\t\tfont-size: 9pt;\r\n\t}\r\n\t.S4 {\r\n\t\tcolor: #007F7F;\r\n\t}\r\n\t.S5 {\r\n\t\tfont-weight: bold;\r\n\t\tcolor: #00007F;\r\n\t}\r\n\t.S6 {\r\n\t\tcolor: #7F007F;\r\n\t}\r\n\t.S7 {\r\n\t\tcolor: #7F007F;\r\n\t}\r\n\t.S8 {\r\n\t\tcolor: #804080;\r\n\t}\r\n\t.S9 {\r\n\t\tcolor: #7F7F00;\r\n\t}\r\n\t.S10 {\r\n\t\tfont-weight: bold;\r\n\t\tcolor: #000000;\r\n\t}\r\n\t.S12 {\r\n\t\tfont-family: Courier New;\r\n\t\tcolor: #000000;\r\n\t\tbackground: #E0C0E0;\r\n\t\tfont-size: 10pt;\r\n\t}\r\n\t.S13 {\r\n\t\tfont-family: Courier New;\r\n\t\tcolor: #007F00;\r\n\t\tbackground: #E0FFE0;\r\n\t\tfont-size: 10pt;\r\n\t}\r\n\t.S14 {\r\n\t\tfont-family: Courier New;\r\n\t\tcolor: #3F7F3F;\r\n\t\tbackground: #E0F0FF;\r\n\t\tfont-size: 10pt;\r\n\t}\r\n\t.S15 {\r\n\t\tfont-family: Comic Sans MS;\r\n\t\tcolor: #3F703F;\r\n\t\tfont-size: 9pt;\r\n\t}\r\n\tSPAN {\r\n\t\tfont-family: Verdana;\r\n\t\tfont-size: 10pt;\r\n\t}\r\n\t</style>\r\n  </head>\r\n  <body bgcolor=\"#FFFFFF\" text=\"#000000\">\r\n    <table bgcolor=\"#000000\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\r\n      <tr>\r\n        <td>\r\n          <img src=\"SciTEIco.png\" border=\"3\" height=\"64\" width=\"64\" alt=\"Scintilla icon\" />\r\n        </td>\r\n        <td>\r\n          <a href=\"index.html\" style=\"color:white;text-decoration:none\"><font size=\"5\">Scintilla\r\n          and SciTE</font></a>\r\n        </td>\r\n      </tr>\r\n    </table>\r\n    <h2>\r\n       Code Style\r\n    </h2>\r\n    <h3>\r\n       Introduction\r\n    </h3>\r\n\t<p>\r\n\tThe source code of Scintilla and SciTE follow my preferences.\r\n\tSome of these decisions are arbitrary and based on my sense of aesthetics\r\n\tbut its good to have all the code look the same even if its not exactly how\r\n\teveryone would prefer.\r\n\t</p>\r\n\t<p>\r\n\tCode that does not follow these conventions will be accepted, but will be modified\r\n\tas time goes by to fit the conventions. Scintilla code follows the conventions more\r\n\tclosely than SciTE except for lexers which are relatively independent modules.\r\n\tLexers that are maintained by others are left as they are submitted except that\r\n\twarnings will be fixed so the whole project can compile cleanly.\r\n\t</p>\r\n\t<p>\r\n\tThe <a href=\"http://astyle.sourceforge.net/\">AStyle</a> formatting\r\n\tprogram with '--style=attach --indent=force-tab=8 --keep-one-line-blocks\r\n--pad-header --unpad-paren --pad-comma --indent-cases --align-pointer=name --pad-method-prefix\r\n--pad-return-type --pad-param-type --align-method-colon --pad-method-colon=after' arguments formats code in much the right way although\r\n\tthere are a few bugs in AStyle.\r\n\t</p>\r\n    <h3>\r\n       Language features\r\n    </h3>\r\n\t<p>\r\n\tDesign goals for Scintilla and SciTE include portability to currently available C++\r\n\tcompilers on diverse platforms with high performance and low resource usage.\r\n\tScintilla has stricter portability requirements to SciTE as it may be ported to\r\n\tlow capability platforms.\r\n\tScintilla code must build with C++17 which can be checked with \"g++ --std=c++17\".\r\n\tSciTE can use C++17 features that are widely available from g++ 7.1, MSVC 2017.6 and Clang 5.0 compilers.\r\n\t</p>\r\n\t<p>\r\n\tTo achieve portability, only a subset of C++ features are used.\r\n\tExceptions and templates may be used but, since Scintilla can be used from C as well as\r\n\tC++, exceptions may not be thrown out of Scintilla and all exceptions should be caught\r\n\tbefore returning from Scintilla.\r\n\tA 'Scintilla' name space is used. This helps with name clashes on macOS.\r\n\t</p>\r\n\t<p>\r\n\tThe goto statement is not used because of bad memories from my first job\r\n\tmaintaining FORTRAN programs. The union feature is not used as it can lead to\r\n\tnon-type-safe value access.\r\n\t</p>\r\n\t<p>\r\n\tThe SCI_METHOD preprocessor definition should be used when implementing\r\n\tinterfaces which include it like ILexer and only there.\r\n\t</p>\r\n\t<p>\r\n\tHeaders should always be included in the same order as given by the\r\n\tscripts/HeaderOrder.txt file.\r\n\t</p>\r\n    <h3>\r\n       Casting\r\n    </h3>\r\n\t<p>\r\n\tDo not use old C style casts like (char *)s. Instead use the most strict form of C++\r\n\tcast possible like const_cast&lt;char *&gt;(s). Use static_cast and const_cast\r\n\twhere possible rather than reinterpret_cast.\r\n\t</p>\r\n\t<p>\r\n\tThe benefit to using the new style casts is that they explicitly detail what evil is\r\n\toccurring and act as signals that something potentially unsafe is being done.\r\n\t</p>\r\n\t<p>\r\n\tCode that treats const seriously is easier to reason about both for humans\r\n\tand compilers, so use const parameters and avoid const_cast.\r\n\t</p>\r\n    <h3>\r\n       Warnings\r\n    </h3>\r\n\t<p>\r\n\tTo help ensure code is well written and portable, it is compiled with almost all\r\n\twarnings turned on. This sometimes results in warnings about code that is\r\n\tcompletely good (false positives) but changing the code to avoid the warnings\r\n\tis generally fast and has little impact on readability.\r\n\t</p>\r\n\t<p>\r\n\tInitialise all variables and minimise the scope of variables. If a variable is defined\r\n\tjust before its use then it can't be misused by code before that point.\r\n\tUse loop declarations that are compatible with both the C++ standard and currently\r\n\tavailable compilers.\r\n\t</p>\r\n    <h3>\r\n       Allocation\r\n    </h3>\r\n\t<p>\r\n\tMemory exhaustion can occur in many Scintilla methods.\r\n\tThis should be checked for and handled but once it has happened, it is very difficult to do\r\n\tanything as Scintilla's data structures may be in an inconsistent state.\r\n\tFixed length buffers are often used as these are simple and avoid the need to\r\n\tworry about memory exhaustion but then require that buffer lengths are\r\n\trespected.\r\n\t</p>\r\n\t<p>\r\n\tThe C++ new and delete operators are preferred over C's malloc and free\r\n\tas new and delete are type safe.\r\n\t</p>\r\n    <h3>\r\n       Bracketing\r\n    </h3>\r\n\t<p>\r\n\tStart brackets, '{', should be located on the line of the control structure they\r\n\tstart and end brackets, '}', should be at the indented start of a line. When there is\r\n\tan else clause, this occurs on the same line as the '}'.\r\n\tThis format uses less lines than alternatives, allowing more code to be seen on screen.\r\n\tFully bracketed control\r\n\tstructures are preferred because this makes it more likely that modifications will\r\n\tbe correct and it allows Scintilla's folder to work. No braces on returned\r\n\texpressions as return is a keyword, not a function call.\r\n\t</p>\r\n<SPAN class=S0></SPAN><SPAN class=S5>bool</SPAN><SPAN class=S0>&nbsp;</SPAN><SPAN class=S11>fn</SPAN><SPAN class=S10>(</SPAN><SPAN class=S5>int</SPAN><SPAN class=S0>&nbsp;</SPAN><SPAN class=S11>a</SPAN><SPAN class=S10>)</SPAN><SPAN class=S0>&nbsp;</SPAN><SPAN class=S10>{</SPAN><SPAN class=S0><BR>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN class=S5>if</SPAN><SPAN class=S0>&nbsp;</SPAN><SPAN class=S10>(</SPAN><SPAN class=S11>a</SPAN><SPAN class=S10>)</SPAN><SPAN class=S0>&nbsp;</SPAN><SPAN class=S10>{</SPAN><SPAN class=S0><BR>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN class=S11>s</SPAN><SPAN class=S10>();</SPAN><SPAN class=S0><BR>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN class=S11>t</SPAN><SPAN class=S10>();</SPAN><SPAN class=S0><BR>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN class=S10>}</SPAN><SPAN class=S0>&nbsp;</SPAN><SPAN class=S5>else</SPAN><SPAN class=S0>&nbsp;</SPAN><SPAN class=S10>{</SPAN><SPAN class=S0><BR>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN class=S11>u</SPAN><SPAN class=S10>();</SPAN><SPAN class=S0><BR>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN class=S10>}</SPAN><SPAN class=S0><BR>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN class=S5>return</SPAN><SPAN class=S0>&nbsp;</SPAN><SPAN class=S10>!</SPAN><SPAN class=S11>a</SPAN><SPAN class=S10>;</SPAN><SPAN class=S0><BR>\r\n</SPAN><SPAN class=S10>}</SPAN><SPAN class=S0><BR>\r\n</SPAN>    <h3>\r\n       Spacing\r\n    </h3>\r\n\t<p>\r\n\tSpaces on both sides of '=' and comparison operators and no attempt to line up '='.\r\n\tNo space before or after '(', when used in calls, but a space after every ','.\r\n\tNo spaces between tokens in short expressions but may be present in\r\n\tlonger expressions. Space before '{'. No space before ';'.\r\n\tNo space after '*' when used to mean pointer and no space after '[' or ']'.\r\n\tOne space between keywords and '('.\r\n\t</p>\r\n<SPAN class=S0></SPAN><SPAN class=S5>void</SPAN><SPAN class=S0>&nbsp;</SPAN><SPAN class=S11>StoreConditionally</SPAN><SPAN class=S10>(</SPAN><SPAN class=S5>int</SPAN><SPAN class=S0>&nbsp;</SPAN><SPAN class=S11>c</SPAN><SPAN class=S10>,</SPAN><SPAN class=S0>&nbsp;</SPAN><SPAN class=S5>const</SPAN><SPAN class=S0>&nbsp;</SPAN><SPAN class=S5>char</SPAN><SPAN class=S0>&nbsp;</SPAN><SPAN class=S10>*</SPAN><SPAN class=S11>s</SPAN><SPAN class=S10>)</SPAN><SPAN class=S0>&nbsp;</SPAN><SPAN class=S10>{</SPAN><SPAN class=S0><BR>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN class=S5>if</SPAN><SPAN class=S0>&nbsp;</SPAN><SPAN class=S10>(</SPAN><SPAN class=S11>c</SPAN><SPAN class=S0>&nbsp;</SPAN><SPAN class=S10>&amp;&amp;</SPAN><SPAN class=S0>&nbsp;</SPAN><SPAN class=S10>(</SPAN><SPAN class=S11>baseSegment</SPAN><SPAN class=S0>&nbsp;</SPAN><SPAN class=S10>==</SPAN><SPAN class=S0>&nbsp;</SPAN><SPAN class=S11>trustSegment</SPAN><SPAN class=S10>[</SPAN><SPAN class=S6>\"html\"</SPAN><SPAN class=S10>]))</SPAN><SPAN class=S0>&nbsp;</SPAN><SPAN class=S10>{</SPAN><SPAN class=S0><BR>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN class=S11>baseSegment</SPAN><SPAN class=S0>&nbsp;</SPAN><SPAN class=S10>=</SPAN><SPAN class=S0>&nbsp;</SPAN><SPAN class=S11>s</SPAN><SPAN class=S10>+</SPAN><SPAN class=S4>1</SPAN><SPAN class=S10>;</SPAN><SPAN class=S0><BR>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN class=S11>Store</SPAN><SPAN class=S10>(</SPAN><SPAN class=S11>s</SPAN><SPAN class=S10>,</SPAN><SPAN class=S0>&nbsp;</SPAN><SPAN class=S11>baseSegment</SPAN><SPAN class=S10>,</SPAN><SPAN class=S0>&nbsp;</SPAN><SPAN class=S6>\"html\"</SPAN><SPAN class=S10>);</SPAN><SPAN class=S0><BR>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN class=S10>}</SPAN><SPAN class=S0><BR>\r\n</SPAN><SPAN class=S10>}</SPAN>\r\n    <h3>\r\n       Names\r\n    </h3>\r\n\t<p>\r\n\tIdentifiers use mixed case and no underscores.\r\n\tClass, function and method names start with an uppercase letter and use\r\n\tfurther upper case letters to distinguish words. Variables start with a lower\r\n\tcase letter and use upper case letters to distinguish words.\r\n\tLoop counters and similar variables can have simple names like 'i'.\r\n\tFunction calls should be differentiated from method calls with an initial '::'\r\n\tglobal scope modifier.\r\n\t</p>\r\n<SPAN class=S0></SPAN><SPAN class=S5>class</SPAN><SPAN class=S0>&nbsp;</SPAN><SPAN class=S11>StorageZone</SPAN><SPAN class=S0>&nbsp;</SPAN><SPAN class=S10>{</SPAN><SPAN class=S0><BR>\r\n</SPAN><SPAN class=S5>public</SPAN><SPAN class=S10>:</SPAN><SPAN class=S0><BR>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN class=S5>void</SPAN><SPAN class=S0>&nbsp;</SPAN><SPAN class=S11>Store</SPAN><SPAN class=S10>(</SPAN><SPAN class=S5>const</SPAN><SPAN class=S0>&nbsp;</SPAN><SPAN class=S5>char</SPAN><SPAN class=S0>&nbsp;</SPAN><SPAN class=S10>*</SPAN><SPAN class=S11>s</SPAN><SPAN class=S10>)</SPAN><SPAN class=S0>&nbsp;</SPAN><SPAN class=S10>{</SPAN><SPAN class=S0><BR>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN class=S11>Media</SPAN><SPAN class=S0>&nbsp;</SPAN><SPAN class=S10>*</SPAN><SPAN class=S11>mediaStore</SPAN><SPAN class=S0>&nbsp;</SPAN><SPAN class=S10>=</SPAN><SPAN class=S0>&nbsp;</SPAN><SPAN class=S10>::</SPAN><SPAN class=S11>GetBaseMedia</SPAN><SPAN class=S10>(</SPAN><SPAN class=S11>zoneDefault</SPAN><SPAN class=S10>);</SPAN><SPAN class=S0><BR>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN class=S5>for</SPAN><SPAN class=S0>&nbsp;</SPAN><SPAN class=S10>(</SPAN><SPAN class=S5>int</SPAN><SPAN class=S0>&nbsp;</SPAN><SPAN class=S11>i</SPAN><SPAN class=S10>=</SPAN><SPAN class=S11>mediaStore</SPAN><SPAN class=S10>-&gt;</SPAN><SPAN class=S11>cursor</SPAN><SPAN class=S10>;</SPAN><SPAN class=S0>&nbsp;</SPAN><SPAN class=S11>mediaStore</SPAN><SPAN class=S10>[</SPAN><SPAN class=S11>i</SPAN><SPAN class=S10>],</SPAN><SPAN class=S0>&nbsp;</SPAN><SPAN class=S11>i</SPAN><SPAN class=S10>++)</SPAN><SPAN class=S0>&nbsp;</SPAN><SPAN class=S10>{</SPAN><SPAN class=S0><BR>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN class=S11>mediaStore</SPAN><SPAN class=S10>-&gt;</SPAN><SPAN class=S11>Persist</SPAN><SPAN class=S10>(</SPAN><SPAN class=S11>s</SPAN><SPAN class=S10>[</SPAN><SPAN class=S11>i</SPAN><SPAN class=S10>]);</SPAN><SPAN class=S0><BR>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN class=S10>}</SPAN><SPAN class=S0><BR>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN class=S10>}</SPAN><SPAN class=S0><BR>\r\n</SPAN><SPAN class=S10>};</SPAN>\r\n    <h3>\r\n       Submitting a lexer\r\n    </h3>\r\n\r\n\t<p>Lexers have been moved to the separate <a href=\"https://www.scintilla.org/Lexilla.html\">Lexilla</a> project\r\n\twhich is on GitHub which may have updated instructions.</p>\r\n\t<p>Add an issue or pull request on the <a href=\"https://github.com/ScintillaOrg/lexilla\">Lexilla project page</a>.</p>\r\n\t<p>Define all of the lexical states in a modified LexicalStyles.iface.</p>\r\n\t<p>Ensure there are no warnings under the compiler you use. Warnings from other compilers\r\n\twill be noted on the feature request.</p>\r\n\t<p>sc.ch is an int: do not pass this around as a char.</p>\r\n\t<p>The ctype functions like isalnum and isdigit only work on ASCII (0..127) and may cause\r\n\tundefined behaviour including crashes if used on other values. Check with IsASCII before calling is*.</p>\r\n\t<p>Functions, structs and classes in lexers should be in an unnamed namespace (see LexCPP)\r\n\tor be marked \"static\" so they will not leak into other lexers.</p>\r\n\t<p>If you copy from an existing lexer, remove any code that is not needed since it makes it\r\n\tmore difficult to maintain and review.</p>\r\n\t<p>When modifying an existing lexer, try to maintain as much compatibility as possible.\r\n\tDo not renumber lexical styles as current client code may be built against the earlier values.</p>\r\n    <h4>\r\n       Properties\r\n    </h4>\r\n\t<p>\r\n\tProperties provided by a new lexer should follow the naming conventions\r\n\tand should include a comment suitable for showing to end users.\r\n\tThe convention is for properties that control styling to be named\r\n\tlexer.&lt;lexername&gt;.* and those that control folding to be named\r\n\tfold.&lt;lexername&gt;.*.\r\n\tExamples are \"lexer.python.literals.binary\" and \"fold.haskell.imports\".\r\n\t</p>\r\n\t<p>\r\n\tThe properties \"fold\" and \"fold.comment\" are generic and can be used by\r\n\tany lexer.\r\n\t</p>\r\n\t<p>\r\n\tSee LexPython for examples of properties in an object lexer and LexHTML for a functional lexer.\r\n\t</p>\r\n  </body>\r\n</html>\r\n"
  },
  {
    "path": "scintilla/doc/Scintilla5Migration.html",
    "content": "<?xml version=\"1.0\"?>\r\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\r\n    \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n  <head>\r\n    <meta name=\"generator\"\r\n    content=\"HTML Tidy for Windows (vers 1st August 2002), see www.w3.org\" />\r\n    <meta name=\"generator\" content=\"SciTE\" />\r\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\r\n\r\n    <title>Migration to Scintilla 5.x.</title>\r\n\r\n    <style type=\"text/css\">\r\n<!--\r\n/*<![CDATA[*/\r\n\tCODE { font-weight: bold; font-family: Menlo,Consolas,Bitstream Vera Sans Mono,Courier New,monospace; }\r\n\tCODE.example { background: #EBFFF7;}\r\n\tCODE.windows { background: #E7F0FF;}\r\n\tCODE.unix { background: #FFFFD7;}\r\n\tA:visited { color: blue; }\r\n\tA:hover { text-decoration: underline ! important; }\r\n\tA.message { text-decoration: none; font-weight: bold; font-family: Menlo,Consolas,Bitstream Vera Sans Mono,Courier New,monospace; }\r\n\tA.seealso { text-decoration: none; font-weight: bold; font-family: Menlo,Consolas,Bitstream Vera Sans Mono,Courier New,monospace; }\r\n\tA.toc { text-decoration: none; }\r\n\tA.jump { text-decoration: none; }\r\n\tLI.message { text-decoration: none; font-weight: bold; font-family: Menlo,Consolas,Bitstream Vera Sans Mono,Courier New,monospace; }\r\n\tH2 { background: #E0EAFF; }\r\n\r\n\ttable {\r\n\t\tborder: 0px;\r\n\t\tborder-collapse: collapse;\r\n\t}\r\n\r\n        div.console {\r\n            font-family: Menlo,Consolas,Bitstream Vera Sans Mono,Courier New,monospace;\r\n            color: #008000;\r\n            font-weight: bold;\r\n            background: #F7FCF7;\r\n            border: 1px solid #C0D7C0;\r\n            margin: 0.3em 3em;\r\n            padding: 0.3em 0.6em;\r\n        }\r\n        span.console {\r\n            font-family: Menlo,Consolas,Bitstream Vera Sans Mono,Courier New,monospace;\r\n            color: #008000;\r\n            font-weight: bold;\r\n            background: #F7FCF7;\r\n            border: 1px solid #C0D7C0;\r\n            margin: 0.1em 0em;\r\n            padding: 0.1em 0.3em;\r\n        }\r\n\r\n        .name {\r\n\t\tcolor: #B08000;\r\n        }\r\n/*]]>*/\r\n-->\r\n    </style>\r\n  </head>\r\n\r\n  <body bgcolor=\"#FFFFFF\" text=\"#000000\">\r\n    <table bgcolor=\"#000000\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\"\r\n    summary=\"Banner\">\r\n      <tr>\r\n        <td><img src=\"SciTEIco.png\" border=\"3\" height=\"64\" width=\"64\" alt=\"Lexilla icon\" /></td>\r\n\r\n        <td><a href=\"index.html\"\r\n        style=\"color:white;text-decoration:none;font-size:200%\">Scintilla</a></td>\r\n      </tr>\r\n    </table>\r\n\r\n    <h1>Migrating Applications to Scintilla 5 with Lexilla.</h1>\r\n\r\n    <h2>Introduction</h2>\r\n\r\n    <p>With Scintilla 5.0, all lexers were moved from Scintilla into the Lexilla library\r\n    which is a <a href=\"https://www.scintilla.org/Lexilla.html\">separate project</a>.\r\n    Lexilla may be either a static library\r\n    that is linked into an application or a shared library that is loaded at runtime.</p>\r\n\r\n    <p>Lexilla has its own <a href=\"LexillaDoc.html\">documentation</a>.</p>\r\n\r\n    <h2>Basics</h2>\r\n\r\n    <p>With Scintilla 4.x, it was most common for applications to set a lexer either by lexer name or lexer ID (<span class=\"name\">SCLEX_...</span>) by calling\r\n    <code>SCI_SETLEXERLANGUAGE(\"&lt;name&gt;\")</code> or <code>SCI_SETLEXER(SCLEX_*)</code>.</p>\r\n\r\n    <p>With Scintilla 5, the normal technique is to call Lexilla's <span class=\"name\">CreateLexer</span> function\r\n    with a lexer name, then apply the result with\r\n    Scintilla's <span class=\"name\">SCI_SETILEXER</span> method:<br />\r\n    <code>ILexer5 *pLexer = CreateLexer(\"&lt;name&gt;\")<br />\r\n    SCI_SETILEXER(pLexer)</code></p>\r\n\r\n    <p>Lexer names are now strongly preferred to lexer IDs and applications should switch where possible.\r\n    Some lexers will not have lexer IDs but all will have names.</p>\r\n\r\n    <p>Applications may be written in C++ or C; may contain a statically linked Lexilla library or load a Lexilla\r\n    shared library; and may use the raw Lexilla API or the LexillaAccess C++ helper module.</p>\r\n\r\n    <h2>From C++: LexillaAccess</h2>\r\n\r\n    <p>The easiest technique is to implement in C++ using LexillaAccess and load a Lexilla shared library.</p>\r\n\r\n    <p>LexillaAccess simplifies use of Lexilla, hides operating system differences, and allows loading\r\n    multiple libraries that support the Lexilla protocol.\r\n    It is defined in lexilla/access/LexillaAccess.h and the source code is in lexilla/access/LexillaAccess.cxx.\r\n    Add these to the build dependencies of the project or build file.</p>\r\n\r\n    <p>Both SciTE and TestLexers (used to test Lexilla) in lexilla/test use LexillaAccess.\r\n    TestLexers is much simpler than SciTE so can be a good example to examine.</p>\r\n\r\n    <h3>Building</h3>\r\n\r\n    <p>Header files for lexers and for using Lexilla will be included so build files will need to reference these new locations.\r\n    LexillaAccess.cxx should be added to the set of source files.\r\n    In make, for example, this may appear similar to:</p>\r\n\r\n    <code class=\"example\">\r\n    LEXILLA_DIR ?= $(srcdir)/../../lexilla<br />\r\n    INCLUDES += -I $(LEXILLA_DIR)/include  -I $(LEXILLA_DIR)/access<br />\r\n    SOURCES += $(LEXILLA_DIR)/access/LexillaAccess.cxx<br />\r\n    </code>\r\n\r\n    <h3>Steps in code</h3>\r\n\r\n    <p>Set the directory to search for Lexilla when full paths aren't provided.\r\n    This may be a known good system or user directory or the directory of the application\r\n    depending on the operating system conventions.</p>\r\n    <code class=\"example\">\r\n    std::string homeDirectory = \"/Users/Me/bin\";<br />\r\n    Lexilla::SetDefaultDirectory(homeDirectory);<br />\r\n    </code>\r\n    <p>Load Lexilla or another library that implements the Lexilla protocol.\r\n    The name \".\" means the standard name and extension (liblexilla.so / liblexilla.dylib / lexilla.dll)\r\n    in the default directory so is often a good choice. Names without extensions have the operating system's preferred\r\n    shared library extension added.\r\n    A full path can also be used.\r\n    Multiple libraries can be loaded at once by listing them separated by ';'.\r\n    Something like one of these lines:</p>\r\n    <code class=\"example\">\r\n    Lexilla::Load(\".\");<br />\r\n    Lexilla::Load(\"lexilla;lexpeg;XMLexers\");<br />\r\n    Lexilla::Load(\"/usr/lib/liblexilla.so;/home/aardvark/bin/libpeg.so\");<br />\r\n    </code>\r\n    <p>Choose the name of the lexer to use. This may be determined from the file extension or some other mechanism.</p>\r\n    <code class=\"example\">\r\n    std::string lexerName = \"cpp\";<br />\r\n    </code>\r\n    <p>Create a lexer and apply it to a Scintilla instance.</p>\r\n    <code class=\"example\">\r\n    Scintilla::ILexer5 *pLexer = Lexilla::MakeLexer(lexerName);<br />\r\n    CallScintilla(scintilla, SCI_SETILEXER, 0, pLexer);<br />\r\n    </code>\r\n    <p>Some applications may use integer lexer IDs from SciLexer.h with an \"SCLEX_\" prefix like\r\n    <span class=\"name\">SCLEX_CPP</span>.\r\n    These can be converted to a name with NameFromID before passing to MakeLexer.</p>\r\n    <code class=\"example\">\r\n    Scintilla::ILexer5 *pLexer = Lexilla::MakeLexer(Lexilla::NameFromID(SCLEX_CPP));<br />\r\n    </code>\r\n\r\n    <h2>From C: Lexilla.h and system APIs</h2>\r\n\r\n    <p>Applications written in C or C++ can use the raw Lexilla API which is defined in lexilla/include/Lexilla.h.\r\n    Since the ILexer interface is difficult to define for C, C applications should treat the result of CreateLexer as a\r\n    <code>void*</code> that is simply passed through to Scintilla.\r\n    If there is a need to call methods on the lexer\r\n    before passing it to Scintilla then it would be best to use some C++ code although it may be possible\r\n    for a sufficiently motivated developer to call methods on the lexer from C.</p>\r\n\r\n    <p>There is an example for using Lexilla from C in examples/CheckLexilla.</p>\r\n\r\n    <h3>Steps in code</h3>\r\n\r\n    <p>Include the system header for loading shared objects.\r\n    This depends on the operating system: &lt;windows.h&gt; for <code class=\"windows\">Windows</code> or\r\n    &lt;dlfcn.h&gt; for <code class=\"unix\">Unix</code>.</p>\r\n    <code class=\"windows\">#include &lt;windows.h&gt;<br /></code>\r\n    <code class=\"unix\">#include &lt;dlfcn.h&gt;<br /></code>\r\n    <p>Define a path to the Lexilla shared library.\r\n    This may be a known good system or user directory or the directory of the application\r\n    depending on the operating system conventions.</p>\r\n    <code class=\"example\">\r\n    #include \"Lexilla.h\"<br />\r\n    char szLexillaPath[] = \"../../bin/\" LEXILLA_LIB LEXILLA_EXTENSION;<br />\r\n    </code>\r\n    <p>Load Lexilla using the appropriate operating system function: either LoadLibrary on Windows or\r\n    dlopen on Unix.</p>\r\n    <code class=\"windows\">HMODULE lexillaLibrary = LoadLibrary(szLexillaPath);<br /></code>\r\n    <code class=\"unix\">void *lexillaLibrary = dlopen(szLexillaPath, RTLD_LAZY);<br /></code>\r\n    <p>Find the CreateLexer function inside the shared library using either GetProcAddress on Windows or\r\n    dlsym on Unix.</p>\r\n    <code class=\"windows\">FARPROC fun = GetProcAddress(lexillaLibrary, LEXILLA_CREATELEXER);<br /></code>\r\n    <code class=\"unix\">void *fun = dlsym(lexillaLibrary, LEXILLA_CREATELEXER);<br /></code>\r\n    <p>Cast this to the correct type.</p>\r\n    <code class=\"example\">CreateLexerFn lexerCreate = (CreateLexerFn)(fun);<br /></code>\r\n    <p>Choose the name of the lexer to use. This may be determined from the file extension or some other mechanism.</p>\r\n    <code class=\"example\">char lexerName[] = \"cpp\";<br /></code>\r\n    <p>Create a lexer and apply it to a Scintilla instance.</p>\r\n    <code class=\"example\">\r\n    void *pLexer = lexerCreate(lexerName);<br />\r\n    CallScintilla(scintilla, SCI_SETILEXER, 0, pLexer);<br />\r\n    </code>\r\n\r\n    <p>If the application uses integer lexer IDs then find the <span class=\"name\">LEXILLA_LEXERNAMEFROMID</span>\r\n    function, cast to <span class=\"name\">LexerNameFromIDFn</span> then call with the ID before using the result to call\r\n    <span class=\"name\">CreateLexer</span>.</p>\r\n    <code class=\"windows\">FARPROC funName = GetProcAddress(lexillaLibrary, LEXILLA_LEXERNAMEFROMID);<br /></code>\r\n    <code class=\"unix\">void *funName = dlsym(lexillaLibrary, LEXILLA_LEXERNAMEFROMID);<br /></code>\r\n    <code class=\"example\">LexerNameFromIDFn lexerNameFromID = (LexerNameFromIDFn)(funName);<br /></code>\r\n    <code class=\"example\">const char *name = lexerNameFromID(lexerID);<br /></code>\r\n\r\n    <h2>Static linking</h2>\r\n\r\n    <p>Lexilla may be linked directly into an application or built into a static library that is then\r\n    linked into the application, then there is no need to load a shared library and\r\n    <span class=\"name\">CreateLexer</span> can be directly called.</p>\r\n\r\n    <p>It is possible to link Lexilla into an application and then dynamically load other\r\n    shared libraries that implement the Lexilla protocol.\r\n    SciTE on Windows implements this as an option when built with STATIC_BUILD defined.</p>\r\n\r\n  </body>\r\n</html>\r\n\r\n"
  },
  {
    "path": "scintilla/doc/ScintillaDoc.html",
    "content": "<?xml version=\"1.0\"?>\r\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\r\n    \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n  <head>\r\n    <meta name=\"generator\"\r\n    content=\"HTML Tidy for Windows (vers 1st August 2002), see www.w3.org\" />\r\n    <meta name=\"generator\" content=\"SciTE\" />\r\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\r\n\r\n    <title>Scintilla Documentation</title>\r\n\r\n    <style type=\"text/css\">\r\n<!--\r\n/*<![CDATA[*/\r\n\tCODE { font-weight: bold; font-family: Menlo,Consolas,Bitstream Vera Sans Mono,Courier New,monospace; }\r\n\tA:visited { color: blue; }\r\n\tA:hover { text-decoration: underline ! important; }\r\n\tA.message { text-decoration: none; font-weight: bold; font-family: Menlo,Consolas,Bitstream Vera Sans Mono,Courier New,monospace; }\r\n\tA.element { text-decoration: none; font-weight: bold; font-family: Menlo,Consolas,Bitstream Vera Sans Mono,Courier New,monospace; }\r\n\tA.seealso { text-decoration: none; font-weight: bold; font-family: Menlo,Consolas,Bitstream Vera Sans Mono,Courier New,monospace; }\r\n\tA.toc { text-decoration: none; }\r\n\tA.jump { text-decoration: none; }\r\n\tLI.message { text-decoration: none; font-weight: bold; font-family: Menlo,Consolas,Bitstream Vera Sans Mono,Courier New,monospace; }\r\n\tH2 { background: #E0EAFF; }\r\n\r\n\ttable {\r\n\t\tborder: 0px;\r\n\t\tborder-collapse: collapse;\r\n\t}\r\n\r\n\ttable.categories {\r\n\t\tborder: 0px;\r\n\t\tborder-collapse: collapse;\r\n\t}\r\n\ttable.categories td {\r\n\t\tpadding: 4px 12px;\r\n\t}\r\n\r\n\ttable.standard {\r\n\t\tborder-collapse: collapse;\r\n\t}\r\n\ttable.standard th {\r\n\t\tbackground: #404040;\r\n\t\tcolor: #FFFFFF;\r\n\t\tpadding: 1px 5px 1px 5px;\r\n\t}\r\n\ttable.standard tr:nth-child(odd) {background: #D7D7D7}\r\n\ttable.standard tr:nth-child(even) {background: #F0F0F0}\r\n\ttable.standard td {\r\n\t\tpadding: 1px 5px 1px 5px;\r\n\t\tvertical-align:top;\r\n\t}\r\n\ttr.section {\r\n\t\tborder-top:1px solid #808080;\r\n\t}\r\n\t.S0 {\r\n\t\tcolor: #808080;\r\n\t}\r\n\t.S2 {\r\n\t\tfont-family: Georgia, 'DejaVu Serif';\r\n\t\tcolor: #007F00;\r\n\t\tfont-size: 9pt;\r\n\t}\r\n\t.S3 {\r\n\t\tfont-family: Georgia, 'DejaVu Serif';\r\n\t\tcolor: #3F703F;\r\n\t\tfont-size: 9pt;\r\n\t}\r\n\t.S4 {\r\n\t\tcolor: #007F7F;\r\n\t}\r\n\t.S5 {\r\n\t\tfont-weight: bold;\r\n\t\tcolor: #00007F;\r\n\t}\r\n\t.S9 {\r\n\t\tcolor: #7F7F00;\r\n\t}\r\n\t.S10 {\r\n\t\tfont-weight: bold;\r\n\t\tcolor: #000000;\r\n\t}\r\n\t.S17 {\r\n\t\tfont-family: Georgia, 'DejaVu Serif';\r\n\t\tcolor: #3060A0;\r\n\t\tfont-size: 9pt;\r\n\t}\r\n\tDIV.highlighted {\r\n\t\tbackground: #F7FCF7;\r\n\t\tborder: 1px solid #C0D7C0;\r\n\t\tmargin: 0.3em 3em;\r\n\t\tpadding: 0.3em 0.6em;\r\n\t\tfont-family: 'Verdana';\r\n\t\tcolor: #000000;\r\n\t\tfont-size: 10pt;\r\n\t}\r\n\t.provisional {\r\n\t\tbackground: #FFB000;\r\n        }\r\n\t.deprecated {\r\n\t\ttext-decoration: line-through red;\r\n        }\r\n\tA.discouraged {\r\n\t\ttext-decoration: line-through #FFB000;\r\n        }\r\n\t.discouraged {\r\n\t\ttext-decoration: line-through #FFB000;\r\n        }\r\n\t.parameter {\r\n\t\tfont-style:italic;\r\n        }\r\n/*]]>*/\r\n-->\r\n    </style>\r\n  </head>\r\n\r\n  <body bgcolor=\"#FFFFFF\" text=\"#000000\">\r\n    <table bgcolor=\"#000000\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\"\r\n    summary=\"Banner\">\r\n      <tr>\r\n        <td><img src=\"SciTEIco.png\" border=\"3\" height=\"64\" width=\"64\" alt=\"Scintilla icon\" /></td>\r\n\r\n        <td><a href=\"index.html\"\r\n        style=\"color:white;text-decoration:none;font-size:200%\">Scintilla</a></td>\r\n      </tr>\r\n    </table>\r\n\r\n    <h1>Scintilla Documentation</h1>\r\n\r\n    <p>Last edited 22 March 2024 NH</p>\r\n\r\n    <p style=\"background:#90F0C0\">Scintilla 5 has moved the lexers from Scintilla into a new\r\n    <a href=\"Lexilla.html\">Lexilla</a> project.<br />\r\n    There is <a class=\"jump\" href=\"Scintilla5Migration.html\">a guide to migrating to Lexilla</a>.</p>\r\n    <p>There is <a class=\"jump\" href=\"Design.html\">an overview of the internal design of\r\n    Scintilla</a>.<br />\r\n     <a class=\"jump\" href=\"ScintillaUsage.html\">Some notes on using Scintilla</a>.<br />\r\n     <a class=\"jump\" href=\"Steps.html\">How to use the Scintilla Edit Control on Windows</a>.<br />\r\n     <a class=\"jump\" href=\"https://www.scintilla.org/dmapp.zip\">A simple sample using Scintilla from\r\n    C++ on Windows</a>.<br />\r\n     <a class=\"jump\" href=\"https://www.scintilla.org/SciTry.vb\">A simple sample using Scintilla from\r\n    Visual Basic</a>.<br />\r\n     <a class=\"jump\" href=\"https://www.scintilla.org/bait.zip\">Bait is a tiny sample using Scintilla\r\n     on GTK</a>.<br />\r\n     <a class=\"jump\" href=\"https://www.scintilla.org/ScintillaTest.zip\">ScintillaTest is a more complete\r\n     GTK sample which can be used to find bugs or prototype new features.</a><br />\r\n     <a class=\"jump\" href=\"Lexer.txt\">A detailed description of how to write a lexer, including a\r\n    discussion of folding</a>.<br />\r\n     <a class=\"jump\" href=\"https://github.com/geany/geany/files/5204338/Scintilla-var.aq-Tutorial.pdf\">\r\n     Beginner's Guide to lexing and folding</a>.<br />\r\n     The <a class=\"jump\" href=\"SciCoding.html\">coding style</a> used in Scintilla and SciTE is\r\n    worth following if you want to contribute code to Scintilla but is not compulsory.</p>\r\n\r\n    <h2>Introduction</h2>\r\n\r\n    <p>The Windows version of Scintilla is a Windows Control. As such, its primary programming\r\n    interface is through Windows messages. Early versions of Scintilla emulated much of the API\r\n    defined by the standard Windows Edit and RichEdit controls but those APIs are now deprecated in\r\n    favour of Scintilla's own, more consistent API. In addition to messages performing the actions\r\n    of a normal Edit control, Scintilla allows control of syntax styling, folding, markers, autocompletion\r\n    and call tips.</p>\r\n\r\n    <p>The GTK version also uses messages in a similar way to the Windows version. This is\r\n    different to normal GTK practice but made it easier to implement rapidly.</p>\r\n\r\n    <p>Scintilla also builds with Cocoa on macOS and with Qt, and follows the conventions of\r\n    those platforms.</p>\r\n\r\n    <p>Scintilla provides only limited experimental support on Windows for right-to-left languages\r\n    like Arabic and Hebrew.\r\n    While text in these languages may appear correct, interaction with this text may not work\r\n    correctly as occurs with other editors.</p>\r\n\r\n    <p>This documentation describes the individual messages and notifications used by Scintilla. It\r\n    does not describe how to link them together to form a useful editor. For now, the best way to\r\n    work out how to develop using Scintilla is to see how SciTE uses it. SciTE exercises most of\r\n    Scintilla's facilities.</p>\r\n\r\n    <p>There is a more type-safe binding of this API that can be used from C++.\r\n    It is implemented in the ScintillaTypes.h, ScintillaMessages.h, ScintillaStructures.h, and ScintillaCall.h headers\r\n    and call/ScintillaCall.cxx.\r\n    The ScintillaTypes.h, ScintillaMessages.h, and ScintillaStructures.h headers can be used without ScintillaCall\r\n    but ScintillaCall makes it easier to use the other headers by wrapping the messages in methods\r\n    which also avoids much type casting.\r\n    ScintillaCall throws Scintilla::Failure exceptions when a call fails.\r\n    </p>\r\n\r\n    <p>In the descriptions that follow, the messages are described as function calls with zero, one\r\n    or two arguments. These two arguments are the standard <code>wParam</code> and\r\n    <code>lParam</code> familiar to Windows programmers. These parameters are integers that\r\n    are large enough to hold pointers, and the return value is also an integer large enough to contain a\r\n    pointer.\r\n    Although the commands only use the\r\n    arguments described, because all messages have two arguments whether Scintilla uses them or\r\n    not, it is strongly recommended that any unused arguments are set to 0. This allows future\r\n    enhancement of messages without the risk of breaking existing code. Common argument types\r\n    are:</p>\r\n\r\n    <table class=\"standard\" summary=\"Common argument types\">\r\n      <tbody valign=\"top\">\r\n        <tr>\r\n          <th align=\"left\"><code>bool</code></th>\r\n\r\n          <td>Arguments expect the values 0 for <code>false</code> and 1 for\r\n          <code>true</code>.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>int</code></th>\r\n\r\n          <td>Arguments are 32-bit or 64-bit signed integers depending on the platform.\r\n          Equivalent to <code>intptr_t</code>.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>position</code></th>\r\n\r\n          <td>Positions and lengths in document.\r\n          Equivalent to <code>intptr_t</code>.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>line</code></th>\r\n\r\n          <td>A line number in the document.\r\n          Equivalent to <code>intptr_t</code>.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>const&nbsp;char&nbsp;*</code></th>\r\n\r\n          <td>Arguments point at text that is being passed to Scintilla but not modified. The text\r\n          may be zero terminated or another argument may specify the character count, the\r\n          description will make this clear.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>char *</code></th>\r\n\r\n          <td>Arguments point at text buffers that Scintilla will fill with text. In some cases,\r\n          another argument will tell Scintilla the buffer size. In others, you must make sure that\r\n          the buffer is big enough to hold the requested text. If a NULL pointer (0) is passed\r\n          then, for SCI_* calls, the length that should be allocated, not including any terminating\r\n          NUL, is returned. Some calls (marked \"NUL-terminated\") add a NUL character to the result but other calls do\r\n          not: to generically handle both types, allocate one more byte than indicated and set it to NUL.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>pointer</code></th>\r\n\r\n          <td>A memory address.\r\n          In some cases this is a pointer to a sequence of char inside Scintilla that will only be available for a limited period.\r\n          Equivalent to void *.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\" id=\"colour\"><code>colour</code></th>\r\n\r\n          <td>Colours are set using the RGB format (Red, Green, Blue). The intensity of each colour\r\n          is set in the range 0 to 255. If you have three such intensities, they are combined as:\r\n          red | (green &lt;&lt; 8) | (blue &lt;&lt; 16). If you set all intensities to 255, the\r\n          colour is white. If you set all intensities to 0, the colour is black. When you set a\r\n          colour, you are making a request. What you will get depends on the capabilities of the\r\n          system and the current screen mode.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\" id=\"colouralpha\"><code>colouralpha</code></th>\r\n\r\n          <td>Colours are set using the RGBA format (Red, Green, Blue, Alpha).\r\n          This is similar to <a class=\"seealso\" href=\"#colour\">colour</a> but with a byte\r\n          of <a class=\"seealso\" href=\"#alpha\">alpha</a> added. They are combined as:\r\n          red | (green &lt;&lt; 8) | (blue &lt;&lt; 16) | (alpha &lt;&lt; 24).\r\n          Fully opaque uses an alpha of 255.\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\" id=\"alpha\"><code>alpha</code></th>\r\n\r\n          <td>Translucency is set using an alpha value.\r\n\t\tAlpha ranges from 0 (<code>SC_ALPHA_TRANSPARENT</code>) which is completely transparent to\r\n                   255 (<code>SC_ALPHA_OPAQUE</code>) which is opaque.\r\n\t\tPrevious versions used the value 256 (<code>SC_ALPHA_NOALPHA</code>) to indicate that drawing was to be\r\n\t\tperformed opaquely on the base layer. This is now discouraged and code should use the <code>&hellip;LAYER&hellip;</code>\r\n\t\tmethods to choose the layer.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>&lt;unused&gt;</code></th>\r\n\r\n          <td>This is an unused argument. Setting it to 0 will ensure compatibility with future\r\n          enhancements.</td>\r\n        </tr>\r\n      </tbody>\r\n    </table>\r\n\r\n    <h2>Lexilla</h2>\r\n\r\n    <p>For Scintilla 5.0, lexers have been split off into a separate <a href=\"Lexilla.html\">Lexilla</a> library.\r\n    Scintilla is responsible for the GUI and calling lexers with Lexilla providing the lexers.</p>\r\n\r\n    <p>Lexilla is built as both a shared library and static library and applications may choose to\r\n    link to one or the other.</p>\r\n\r\n    <p>See the <a href=\"LexillaDoc.html\">Lexilla documentation</a> for instructions on building and using Lexilla.</p>\r\n\r\n    <p>Lexilla follows the external lexer protocol so can be loaded by applications that support this.\r\n    As the protocol only supports object lexers, an additional function <code>CreateLexer(const char *name)</code>\r\n    is exposed which will create a lexer object (ILexer5 *) for any object lexer or function lexer.\r\n    </p>\r\n\r\n    <p>Lexer libraries that provide the same functions as Lexilla may provide lexers for use by Scintilla,\r\n    augmenting or replacing those provided by Lexilla.</p>\r\n\r\n    <p>A lexer created by Lexilla may be used in Scintilla by calling\r\n    <a class=\"seealso\" href=\"#SCI_SETILEXER\">SCI_SETILEXER</a>.</p>\r\n\r\n    <h2 id=\"MessageCategories\">Contents</h2>\r\n\r\n    <table class=\"categories\" summary=\"Message categories\">\r\n      <tbody>\r\n        <tr>\r\n          <td>&cir; <a class=\"toc\" href=\"#TextRetrievalAndModification\">Text retrieval and modification</a></td>\r\n          <td>&cir; <a class=\"toc\" href=\"#Information\">Information</a></td>\r\n          <td>&cir; <a class=\"toc\" href=\"#ByCharacterOrCodeUnit\">By character or UTF-16 code unit</a></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td>&cir; <a class=\"toc\" href=\"#ErrorHandling\">Error handling</a></td>\r\n          <td>&cir; <a class=\"toc\" href=\"#Selection\">Selection</a></td>\r\n          <td>&cir; <a class=\"toc\" href=\"#MultipleSelectionAndVirtualSpace\">Multiple Selection and Virtual Space</a></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td>&cir; <a class=\"toc\" href=\"#Overtype\">Overtype</a></td>\r\n          <td>&cir; <a class=\"toc\" href=\"#Searching\">Searching and replacing</a></td>\r\n          <td>&cir; <a class=\"toc\" href=\"#CutCopyAndPaste\">Cut, copy and paste</a></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td>&cir; <a class=\"toc\" href=\"#UndoAndRedo\">Undo and Redo</a></td>\r\n          <td>&cir; <a class=\"toc\" href=\"#UndoSaveRestore\">Undo save and restore</a></td>\r\n          <td>&cir; <a class=\"toc\" href=\"#ChangeHistory\">Change history</a></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td>&cir; <a class=\"toc\" href=\"#ScrollingAndAutomaticScrolling\">Scrolling and automatic scrolling</a></td>\r\n          <td>&cir; <a class=\"toc\" href=\"#WhiteSpace\">White space</a></td>\r\n          <td>&cir; <a class=\"toc\" href=\"#Cursor\">Cursor</a></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td>&cir; <a class=\"toc\" href=\"#MouseCapture\">Mouse capture</a></td>\r\n          <td>&cir; <a class=\"toc\" href=\"#LineEndings\">Line endings</a></td>\r\n          <td>&cir; <a class=\"toc\" href=\"#Words\">Words</a></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td>&cir; <a class=\"toc\" href=\"#Styling\">Styling</a></td>\r\n          <td>&cir; <a class=\"toc\" href=\"#StyleDefinition\">Style definition</a></td>\r\n          <td>&cir; <a class=\"toc\" href=\"#ElementColours\">Element colours</a></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td>&cir; <a class=\"toc\" href=\"#CaretAndSelectionStyles\">Selection, caret, and hotspot styles</a></td>\r\n          <td>&cir; <a class=\"toc\" href=\"#CharacterRepresentations\">Character representations</a></td>\r\n          <td>&cir; <a class=\"toc\" href=\"#Margins\">Margins</a></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td>&cir; <a class=\"toc\" href=\"#Annotations\">Annotations</a></td>\r\n          <td>&cir; <a class=\"toc\" href=\"#EndOfLineAnnotations\">End of Line Annotations</a></td>\r\n          <td>&cir; <a class=\"toc\" href=\"#OtherSettings\">Other settings</a></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td>&cir; <a class=\"toc\" href=\"#BraceHighlighting\">Brace highlighting</a></td>\r\n          <td>&cir; <a class=\"toc\" href=\"#TabsAndIndentationGuides\">Tabs and Indentation Guides</a></td>\r\n          <td>&cir; <a class=\"toc\" href=\"#Markers\">Markers</a></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td>&cir; <a class=\"toc\" href=\"#Indicators\">Indicators</a></td>\r\n          <td>&cir; <a class=\"toc\" href=\"#Autocompletion\">Autocompletion</a></td>\r\n          <td>&cir; <a class=\"toc\" href=\"#UserLists\">User lists</a></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td>&cir; <a class=\"toc\" href=\"#CallTips\">Call tips</a></td>\r\n          <td>&cir; <a class=\"toc\" href=\"#KeyboardCommands\">Keyboard commands</a></td>\r\n          <td>&cir; <a class=\"toc\" href=\"#KeyBindings\">Key bindings</a></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td>&cir; <a class=\"toc\" href=\"#PopupEditMenu\">Popup edit menu</a></td>\r\n          <td>&cir; <a class=\"toc\" href=\"#MacroRecording\">Macro recording</a></td>\r\n          <td>&cir; <a class=\"toc\" href=\"#Printing\">Printing</a></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td>&cir; <a class=\"toc\" href=\"#DirectAccess\">Direct access</a></td>\r\n          <td>&cir; <a class=\"toc\" href=\"#MultipleViews\">Multiple views</a></td>\r\n          <td>&cir; <a class=\"toc\" href=\"#BackgroundLoadSave\">Background loading and saving</a></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td>&cir; <a class=\"toc\" href=\"#DocumentInterface\">Document interface</a></td>\r\n          <td>&cir; <a class=\"toc\" href=\"#Folding\">Folding</a></td>\r\n          <td>&cir; <a class=\"toc\" href=\"#LineWrapping\">Line wrapping</a></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td>&cir; <a class=\"toc\" href=\"#Zooming\">Zooming</a></td>\r\n          <td>&cir; <a class=\"toc\" href=\"#LongLines\">Long lines</a></td>\r\n          <td>&cir; <a class=\"toc\" href=\"#Accessibility\">Accessibility</a></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td>&cir; <a class=\"toc\" href=\"#Lexer\">Lexer</a></td>\r\n          <td>&cir; <a class=\"toc\" href=\"#LexerObjects\">Lexer objects</a></td>\r\n          <td>&cir; <a class=\"toc\" href=\"#Notifications\">Notifications</a></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td>&cir; <a class=\"toc\" href=\"#Images\">Images</a></td>\r\n          <td>&cir; <a class=\"toc\" href=\"#GTK\">GTK</a></td>\r\n          <td>&cir; <a class=\"toc\" href=\"#ProvisionalMessages\"><span class=\"provisional\">Provisional messages</span></a></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td>&cir; <a class=\"toc\" href=\"#DeprecatedMessages\">Deprecated messages</a></td>\r\n          <td>&cir; <a class=\"toc\" href=\"#EditMessagesNeverSupportedByScintilla\">Edit messages never supported by Scintilla</a></td>\r\n          <td>&cir; <a class=\"toc\" href=\"#RemovedFeatures\">Removed features</a></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td>&cir; <a class=\"toc\" href=\"#BuildingScintilla\">Building Scintilla</a></td>\r\n        </tr>\r\n      </tbody>\r\n    </table>\r\n\r\n    <p>Messages with names of the form <code>SCI_SETxxxxx</code> often have a companion\r\n    <code>SCI_GETxxxxx</code>. To save tedious repetition, if the <code>SCI_GETxxxxx</code> message\r\n    returns the value set by the <code>SCI_SETxxxxx</code> message, the <code>SET</code> routine is\r\n    described and the <code>GET</code> routine is left to your imagination.</p>\r\n\r\n    <h2 id=\"TextRetrievalAndModification\">Text retrieval and modification</h2>\r\n\r\n    <p>Each byte in a Scintilla document is associated with a byte of styling\r\n    information. The combination of a character byte and a style byte is called a cell. Style bytes\r\n    are interpreted an index into an array of styles.</p>\r\n\r\n    <p>In this document, 'character' normally refers to a byte even when multi-byte characters are used.\r\n    Lengths measure the numbers of bytes, not the amount of characters in those bytes.</p>\r\n\r\n    <p>Positions within the Scintilla document refer to a character or the gap before that\r\n    character. The first character in a document is 0, the second 1 and so on. If a document\r\n    contains <code>nLen</code> characters, the last character is numbered <code>nLen</code>-1.\r\n    The caret exists between character positions and can be located from before the first character (0)\r\n    to after the last character (<code>nLen</code>).</p>\r\n\r\n    <p>There are places where the caret can not go where two character bytes make up one character.\r\n    This occurs when a DBCS character from a language like Japanese is included in the document or\r\n    when line ends are marked with the CP/M standard of a carriage return followed by a line feed.\r\n    The <code>INVALID_POSITION</code> constant (-1) represents an invalid position within the\r\n    document.</p>\r\n\r\n    <p>All lines of text in Scintilla are the same height, and this height is calculated from the\r\n    largest font in any current style. This restriction is for performance; if lines differed in\r\n    height then calculations involving positioning of text would require the text to be styled\r\n    first.</p>\r\n    <code><a class=\"message\" href=\"#SCI_GETTEXT\">SCI_GETTEXT(position length, char *text) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETTEXT\">SCI_SETTEXT(&lt;unused&gt;, const char *text)</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETSAVEPOINT\">SCI_SETSAVEPOINT</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETLINE\">SCI_GETLINE(line line, char *text) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_REPLACESEL\">SCI_REPLACESEL(&lt;unused&gt;, const char\r\n    *text)</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETREADONLY\">SCI_SETREADONLY(bool readOnly)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETREADONLY\">SCI_GETREADONLY &rarr; bool</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETTEXTRANGE\">SCI_GETTEXTRANGE(&lt;unused&gt;, Sci_TextRange *tr) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETTEXTRANGEFULL\">SCI_GETTEXTRANGEFULL(&lt;unused&gt;, Sci_TextRangeFull *tr) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_ALLOCATE\">SCI_ALLOCATE(position bytes)</a><br />\r\n     <a class=\"message\" href=\"#SCI_ALLOCATELINES\">SCI_ALLOCATELINES(line lines)</a><br />\r\n     <a class=\"message\" href=\"#SCI_ADDTEXT\">SCI_ADDTEXT(position length, const char *text)</a><br />\r\n     <a class=\"message\" href=\"#SCI_ADDSTYLEDTEXT\">SCI_ADDSTYLEDTEXT(position length, cell *c)</a><br />\r\n     <a class=\"message\" href=\"#SCI_APPENDTEXT\">SCI_APPENDTEXT(position length, const char *text)</a><br />\r\n     <a class=\"message\" href=\"#SCI_INSERTTEXT\">SCI_INSERTTEXT(position pos, const char *text)</a><br />\r\n     <a class=\"message\" href=\"#SCI_CHANGEINSERTION\">SCI_CHANGEINSERTION(position length, const char *text)</a><br />\r\n     <a class=\"message\" href=\"#SCI_CLEARALL\">SCI_CLEARALL</a><br />\r\n     <a class=\"message\" href=\"#SCI_DELETERANGE\">SCI_DELETERANGE(position start, position lengthDelete)</a><br />\r\n     <a class=\"message\" href=\"#SCI_CLEARDOCUMENTSTYLE\">SCI_CLEARDOCUMENTSTYLE</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETCHARAT\">SCI_GETCHARAT(position pos) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETSTYLEAT\">SCI_GETSTYLEAT(position pos) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETSTYLEINDEXAT\">SCI_GETSTYLEINDEXAT(position pos) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETSTYLEDTEXT\">SCI_GETSTYLEDTEXT(&lt;unused&gt;, Sci_TextRange *tr) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETSTYLEDTEXTFULL\">SCI_GETSTYLEDTEXTFULL(&lt;unused&gt;, Sci_TextRangeFull *tr) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_RELEASEALLEXTENDEDSTYLES\">SCI_RELEASEALLEXTENDEDSTYLES</a><br />\r\n     <a class=\"message\" href=\"#SCI_ALLOCATEEXTENDEDSTYLES\">SCI_ALLOCATEEXTENDEDSTYLES(int numberStyles) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_TARGETASUTF8\">SCI_TARGETASUTF8(&lt;unused&gt;, char *s) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_ENCODEDFROMUTF8\">SCI_ENCODEDFROMUTF8(const char *utf8, char *encoded) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETLENGTHFORENCODE\">SCI_SETLENGTHFORENCODE(position bytes)</a><br />\r\n    </code>\r\n\r\n    <p><b id=\"SCI_GETTEXT\">SCI_GETTEXT(position length, char *text NUL-terminated) &rarr; position</b><br />\r\n     This returns at most <code class=\"parameter\">length</code> characters of text from the start of the document plus one\r\n    terminating 0 character. When <code class=\"parameter\">length</code> is beyond document length, it returns document length.\r\n    To collect all the text in a document, use <code>SCI_GETLENGTH</code>\r\n    to get the number of characters in the document (<code>nLen</code>), allocate a character\r\n    buffer of length <code>nLen+1</code> bytes, then call <code>SCI_GETTEXT(nLen, char\r\n    *text)</code>. If the text argument is NULL(0) then the length that should be allocated to store the\r\n    entire document is returned.\r\n    If you then save the text, you should use <code>SCI_SETSAVEPOINT</code> to mark\r\n    the text as unmodified.</p>\r\n\r\n    <p>See also: <code><a class=\"seealso\" href=\"#SCI_GETSELTEXT\">SCI_GETSELTEXT</a>,\r\n    <a class=\"seealso\" href=\"#SCI_GETCURLINE\">SCI_GETCURLINE</a>,\r\n    <a class=\"seealso\" href=\"#SCI_GETLINE\">SCI_GETLINE</a>,\r\n    <a class=\"seealso \"href=\"#SCI_GETSTYLEDTEXT\">SCI_GETSTYLEDTEXT</a>,\r\n    <a class=\"seealso\" href=\"#SCI_GETTEXTRANGE\">SCI_GETTEXTRANGE</a></code></p>\r\n\r\n    <p><b id=\"SCI_SETTEXT\">SCI_SETTEXT(&lt;unused&gt;, const char *text)</b><br />\r\n     This replaces all the text in the document with the zero terminated text string you pass\r\n    in.</p>\r\n\r\n    <p><b id=\"SCI_SETSAVEPOINT\">SCI_SETSAVEPOINT</b><br />\r\n     This message tells Scintilla that the current state of the document is unmodified. This is\r\n    usually done when the file is saved or loaded, hence the name \"save point\". As Scintilla\r\n    performs undo and redo operations, it notifies the container that it has entered or left the\r\n    save point with <code><a class=\"message\"\r\n    href=\"#SCN_SAVEPOINTREACHED\">SCN_SAVEPOINTREACHED</a></code> and <code><a class=\"message\"\r\n    href=\"#SCN_SAVEPOINTLEFT\">SCN_SAVEPOINTLEFT</a></code> <a class=\"jump\"\r\n    href=\"#Notifications\">notification messages</a>, allowing the container to know if the file\r\n    should be considered dirty or not.</p>\r\n\r\n    <p>See also: <code><a class=\"message\" href=\"#SCI_EMPTYUNDOBUFFER\">SCI_EMPTYUNDOBUFFER</a>, <a\r\n    class=\"message\" href=\"#SCI_GETMODIFY\">SCI_GETMODIFY</a></code></p>\r\n\r\n    <p><b id=\"SCI_GETLINE\">SCI_GETLINE(line line, char *text) &rarr; position</b><br />\r\n     This fills the buffer defined by text with the contents of the nominated line (lines start at\r\n    0). The buffer is not terminated by a NUL(0) character. It is up to you to make sure that the buffer\r\n    is long enough for the text, use <a class=\"message\"\r\n    href=\"#SCI_LINELENGTH\"><code>SCI_LINELENGTH(line line)</code></a>. The returned value is the\r\n    number of characters copied to the buffer. The returned text includes any end of line\r\n    characters. If you ask for a line number outside the range of lines in the document, 0\r\n    characters are copied. If the text argument is 0 then the length that should be allocated\r\n    to store the entire line is returned.</p>\r\n\r\n    <p>See also: <code><a class=\"seealso\" href=\"#SCI_GETCURLINE\">SCI_GETCURLINE</a>,\r\n    <a class=\"seealso\" href=\"#SCI_GETSELTEXT\">SCI_GETSELTEXT</a>,\r\n    <a class=\"seealso\" href=\"#SCI_GETTEXTRANGE\">SCI_GETTEXTRANGE</a>,\r\n    <a class=\"seealso\" href=\"#SCI_GETSTYLEDTEXT\">SCI_GETSTYLEDTEXT</a>,\r\n    <a class=\"seealso\" href=\"#SCI_GETTEXT\">SCI_GETTEXT</a></code></p>\r\n\r\n    <p><b id=\"SCI_REPLACESEL\">SCI_REPLACESEL(&lt;unused&gt;, const char *text)</b><br />\r\n     The currently selected text between the <a class=\"jump\" href=\"#Selection\">anchor\r\n    and the current position</a> is replaced by the 0 terminated text string. If the anchor and\r\n    current position are the same, the text is inserted at the caret position. The caret is\r\n    positioned after the inserted text and the caret is scrolled into view.</p>\r\n\r\n    <p><b id=\"SCI_SETREADONLY\">SCI_SETREADONLY(bool readOnly)</b><br />\r\n     <b id=\"SCI_GETREADONLY\">SCI_GETREADONLY &rarr; bool</b><br />\r\n     These messages set and get the read-only flag for the document. If you mark a document as read\r\n    only, attempts to modify the text cause the <a class=\"message\"\r\n    href=\"#SCN_MODIFYATTEMPTRO\"><code>SCN_MODIFYATTEMPTRO</code></a> notification.</p>\r\n\r\n    <p>\r\n    <b id=\"SCI_GETTEXTRANGE\">SCI_GETTEXTRANGE(&lt;unused&gt;, <a class=\"jump\" href=\"#Sci_TextRange\">Sci_TextRange</a> *tr) &rarr; position</b><br />\r\n    <b id=\"SCI_GETTEXTRANGEFULL\">SCI_GETTEXTRANGEFULL(&lt;unused&gt;, <a class=\"jump\" href=\"#Sci_TextRangeFull\">Sci_TextRangeFull</a> *tr) &rarr; position</b><br />\r\n     This collects the text between the positions <code>cpMin</code> and <code>cpMax</code> and\r\n    copies it to <code>lpstrText</code> (see <code>struct Sci_TextRange</code> in\r\n    <code>Scintilla.h</code>). If <code>cpMax</code> is -1, text is returned to the end of the\r\n    document. The text is 0 terminated, so you must supply a buffer that is at least 1 character\r\n    longer than the number of characters you wish to read. The return value is the length of the\r\n    returned text not including the terminating 0.</p>\r\n    <p><code>SCI_GETTEXTRANGEFULL</code> uses 64-bit positions on all platforms so is safe for documents larger than 2GB.\r\n    It should always be used in preference to <code>SCI_GETTEXTRANGE</code> which will be deprecated in a future release.</p>\r\n\r\n    <p>See also: <code><a class=\"seealso\" href=\"#SCI_GETSELTEXT\">SCI_GETSELTEXT</a>,\r\n    <a class=\"seealso\" href=\"#SCI_GETLINE\">SCI_GETLINE</a>,\r\n    <a class=\"seealso\" href=\"#SCI_GETCURLINE\">SCI_GETCURLINE</a>,\r\n    <a class=\"seealso\" href=\"#SCI_GETSTYLEDTEXT\">SCI_GETSTYLEDTEXT</a>,\r\n    <a class=\"seealso\" href=\"#SCI_GETTEXT\">SCI_GETTEXT</a></code></p>\r\n\r\n    <p>\r\n    <b id=\"SCI_GETSTYLEDTEXT\">SCI_GETSTYLEDTEXT(&lt;unused&gt;, <a class=\"jump\" href=\"#Sci_TextRange\">Sci_TextRange</a> *tr) &rarr; position</b><br />\r\n    <b id=\"SCI_GETSTYLEDTEXTFULL\">SCI_GETSTYLEDTEXTFULL(&lt;unused&gt;, <a class=\"jump\" href=\"#Sci_TextRangeFull\">Sci_TextRangeFull</a> *tr) &rarr; position</b><br />\r\n     This collects styled text into a buffer using two bytes for each cell, with the character at\r\n    the lower address of each pair and the style byte at the upper address. Characters between the\r\n    positions <code>cpMin</code> and <code>cpMax</code> are copied to <code>lpstrText</code> (see\r\n    <code>struct Sci_TextRange</code> and <code>struct Sci_TextRangeFull</code> in <code>Scintilla.h</code>). Two 0 bytes are added to the end of\r\n    the text, so the buffer that <code>lpstrText</code> points at must be at least\r\n    <code>2*(cpMax-cpMin)+2</code> bytes long. No check is made for sensible values of\r\n    <code>cpMin</code> or <code>cpMax</code>. Positions outside the document return character codes\r\n    and style bytes of 0.</p>\r\n    <p><code>SCI_GETSTYLEDTEXTFULL</code> uses 64-bit positions on all platforms so is safe for documents larger than 2GB.\r\n    It should always be used in preference to <code>SCI_GETSTYLEDTEXT</code> which will be deprecated in a future release.</p>\r\n\r\n    <p>See also: <code><a class=\"seealso\" href=\"#SCI_GETSELTEXT\">SCI_GETSELTEXT</a>,\r\n    <a class=\"seealso\" href=\"#SCI_GETLINE\">SCI_GETLINE</a>,\r\n    <a class=\"seealso\" href=\"#SCI_GETCURLINE\">SCI_GETCURLINE</a>,\r\n    <a class=\"seealso\" href=\"#SCI_GETTEXTRANGE\">SCI_GETTEXTRANGE</a>,\r\n    <a class=\"seealso\" href=\"#SCI_GETTEXT\">SCI_GETTEXT</a></code></p>\r\n\r\n    <p><b id=\"SCI_ALLOCATE\">SCI_ALLOCATE(position bytes)</b><br />\r\n     Allocate a document buffer large enough to store a given number of bytes.\r\n     The document will not be made smaller than its current contents.</p>\r\n\r\n    <p><b id=\"SCI_ALLOCATELINES\">SCI_ALLOCATELINES(line lines)</b><br />\r\n     Allocate line indices to match the <code class=\"parameter\">lines</code> argument.\r\n     This is an optimization that can prevent multiple reallocations of the indices as text is inserted\r\n     if the application can estimate the number of lines in the document.\r\n     The number of lines will not be reduced by this call.</p>\r\n\r\n    <p><b id=\"SCI_ADDTEXT\">SCI_ADDTEXT(position length, const char *text)</b><br />\r\n     This inserts the first <code class=\"parameter\">length</code> characters from the string\r\n     <code class=\"parameter\">text</code>\r\n    at the current position. This will include any 0's in the string that you might have expected\r\n    to stop the insert operation. The current position is set at the end of the inserted text,\r\n    but it is not scrolled into view.</p>\r\n\r\n    <p><b id=\"SCI_ADDSTYLEDTEXT\">SCI_ADDSTYLEDTEXT(position length, cell *c)</b><br />\r\n     This behaves just like <code>SCI_ADDTEXT</code>, but inserts styled text.</p>\r\n\r\n    <p><b id=\"SCI_APPENDTEXT\">SCI_APPENDTEXT(position length, const char *text)</b><br />\r\n     This adds the first <code class=\"parameter\">length</code> characters from the string\r\n     <code class=\"parameter\">text</code> to the end\r\n    of the document. This will include any 0's in the string that you might have expected to stop\r\n    the operation. The current selection is not changed and the new text is not scrolled into\r\n    view.</p>\r\n\r\n    <p><b id=\"SCI_INSERTTEXT\">SCI_INSERTTEXT(position pos, const char *text)</b><br />\r\n     This inserts the zero terminated <code class=\"parameter\">text</code> string at position <code class=\"parameter\">pos</code> or at\r\n    the current position if <code class=\"parameter\">pos</code> is -1. If the current position is after the insertion point\r\n    then it is moved along with its surrounding text but no scrolling is performed.</p>\r\n\r\n    <p><b id=\"SCI_CHANGEINSERTION\">SCI_CHANGEINSERTION(position length, const char *text)</b><br />\r\n     This may only be called from a <a class=\"message\" href=\"#SC_MOD_INSERTCHECK\">SC_MOD_INSERTCHECK</a>\r\n     notification handler and will change the text being inserted to that provided.</p>\r\n\r\n    <p><b id=\"SCI_CLEARALL\">SCI_CLEARALL</b><br />\r\n     Unless the document is read-only, this deletes all the text.</p>\r\n\r\n    <p><b id=\"SCI_DELETERANGE\">SCI_DELETERANGE(position start, position lengthDelete)</b><br />\r\n     Deletes a range of text in the document.</p>\r\n\r\n    <p><b id=\"SCI_CLEARDOCUMENTSTYLE\">SCI_CLEARDOCUMENTSTYLE</b><br />\r\n     When wanting to completely restyle the document, for example after choosing a lexer, the\r\n    <code>SCI_CLEARDOCUMENTSTYLE</code> can be used to clear all styling information and reset the\r\n    folding state.</p>\r\n\r\n    <p><b id=\"SCI_GETCHARAT\">SCI_GETCHARAT(position pos) &rarr; int</b><br />\r\n     This returns the character at <code class=\"parameter\">pos</code> in the document or 0 if <code class=\"parameter\">pos</code> is\r\n    negative or past the end of the document.</p>\r\n\r\n    <p>\r\n    <b id=\"SCI_GETSTYLEAT\">SCI_GETSTYLEAT(position pos) &rarr; int</b><br />\r\n    <b id=\"SCI_GETSTYLEINDEXAT\">SCI_GETSTYLEINDEXAT(position pos) &rarr; int</b><br />\r\n     This returns the style at <code class=\"parameter\">pos</code> in the document, or 0 if <code class=\"parameter\">pos</code> is\r\n    negative or past the end of the document.\r\n    <code>SCI_GETSTYLEAT</code> may return a negative number for styles over 127 whereas <code>SCI_GETSTYLEINDEXAT</code>\r\n    will only return positive numbers.\r\n    <code>SCI_GETSTYLEINDEXAT</code> should be preferred as it handles styles more consistently and may avoid problems\r\n    with lexers that define more than 128 styles.</p>\r\n\r\n    <p><b id=\"SCI_RELEASEALLEXTENDEDSTYLES\">SCI_RELEASEALLEXTENDEDSTYLES</b><br />\r\n    <b id=\"SCI_ALLOCATEEXTENDEDSTYLES\">SCI_ALLOCATEEXTENDEDSTYLES(int numberStyles) &rarr; int</b><br />\r\n     Extended styles are used for features like textual margins and annotations as well as internally by Scintilla.\r\n     They are outside the range 0..255 used for the styles bytes associated with document bytes.\r\n     These functions manage the use of extended styles to ensures that components cooperate in defining styles.\r\n     <code>SCI_RELEASEALLEXTENDEDSTYLES</code> releases any extended styles allocated by the container.\r\n     <code>SCI_ALLOCATEEXTENDEDSTYLES</code> allocates a range of style numbers after the byte style values and returns\r\n     the number of the first allocated style.\r\n     Ranges for margin and annotation styles should be allocated before calling\r\n     <a class=\"seealso\" href=\"#SCI_MARGINSETSTYLEOFFSET\">SCI_MARGINSETSTYLEOFFSET</a> or\r\n     <a class=\"seealso\" href=\"#SCI_ANNOTATIONSETSTYLEOFFSET\">SCI_ANNOTATIONSETSTYLEOFFSET</a>.</p>\r\n\r\n    <p><b id=\"Sci_TextRange\">Sci_TextRange</b> and <b id=\"Sci_CharacterRange\">Sci_CharacterRange</b><br />\r\n     These structures are defined to be exactly the same shape as the Win32 <code>TEXTRANGE</code>\r\n    and <code>CHARRANGE</code>, so that older code that treats Scintilla as a RichEdit will\r\n    work.</p>\r\n    <p>In a future release, these types will be deprecated.\r\n    <a class=\"seealso\" href=\"#SCI_GETTEXTRANGEFULL\">SCI_GETTEXTRANGEFULL</a>, <code>Sci_TextRangeFull</code>\r\n    and <code>Sci_CharacterRangeFull</code> should be used instead.</p>\r\n<pre>\r\ntypedef long Sci_PositionCR;\r\n\r\nstruct Sci_CharacterRange {\r\n    Sci_PositionCR cpMin;\r\n    Sci_PositionCR cpMax;\r\n};\r\n\r\nstruct Sci_TextRange {\r\n    struct Sci_CharacterRange chrg;\r\n    char *lpstrText;\r\n};\r\n</pre>\r\n\r\n    <p><b id=\"Sci_TextRangeFull\">Sci_TextRangeFull</b> and <b id=\"Sci_CharacterRangeFull\">Sci_CharacterRangeFull</b><br />\r\n     These structures are the same as <code>Sci_TextRange</code> and <code>Sci_CharacterRange</code> except that positions are\r\n     always 64-bit in 64-bit builds so will work on documents larger than 2GB.</p>\r\n<pre>\r\ntypedef ptrdiff_t Sci_Position;\r\n\r\nstruct Sci_CharacterRangeFull {\r\n\tSci_Position cpMin;\r\n\tSci_Position cpMax;\r\n};\r\n\r\nstruct Sci_TextRangeFull {\r\n\tstruct Sci_CharacterRangeFull chrg;\r\n\tchar *lpstrText;\r\n};\r\n</pre>\r\n\r\n    <h3 id=\"EncodedAccess\">Specific to GTK, Cocoa and Windows only: Access to encoded text</h3>\r\n\r\n    <p><b id=\"SCI_TARGETASUTF8\">SCI_TARGETASUTF8(&lt;unused&gt;, char *s) &rarr; position</b><br />\r\n     This method retrieves the value of the target encoded as UTF-8 which is the default\r\n     encoding of GTK so is useful for retrieving text for use in other parts of the user interface,\r\n     such as find and replace dialogs. The length of the encoded text in bytes is returned.\r\n     Cocoa uses UTF-16 which is easily converted from UTF-8 so this method can be used to perform the\r\n     more complex work of transcoding from the various encodings supported.\r\n    </p>\r\n\r\n    <p><b id=\"SCI_ENCODEDFROMUTF8\">SCI_ENCODEDFROMUTF8(const char *utf8, char *encoded) &rarr; position</b><br />\r\n     <b id=\"SCI_SETLENGTHFORENCODE\">SCI_SETLENGTHFORENCODE(position bytes)</b><br />\r\n     <code>SCI_ENCODEDFROMUTF8</code> converts a UTF-8 string into the document's\r\n     encoding which is useful for taking the results of a find dialog, for example, and receiving\r\n     a string of bytes that can be searched for in the document. Since the text can contain nul bytes,\r\n     the <code>SCI_SETLENGTHFORENCODE</code> method can be used to set the\r\n     length that will be converted. If set to -1, the length is determined by finding a nul byte.\r\n     The length of the converted string is returned.\r\n    </p>\r\n\r\n    <h2 id=\"Information\">Information</h2>\r\n\r\n     <a class=\"message\" href=\"#SCI_GETTEXTLENGTH\">SCI_GETTEXTLENGTH &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETLENGTH\">SCI_GETLENGTH &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETLINECOUNT\">SCI_GETLINECOUNT &rarr; line</a><br />\r\n     <a class=\"message\" href=\"#SCI_LINESONSCREEN\">SCI_LINESONSCREEN &rarr; line</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETMODIFY\">SCI_GETMODIFY &rarr; bool</a><br />\r\n     <a class=\"message\" href=\"#SCI_LINEFROMPOSITION\">SCI_LINEFROMPOSITION(position pos) &rarr; line</a><br />\r\n     <a class=\"message\" href=\"#SCI_POSITIONFROMLINE\">SCI_POSITIONFROMLINE(line line) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETLINEENDPOSITION\">SCI_GETLINEENDPOSITION(line line) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_LINELENGTH\">SCI_LINELENGTH(line line) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETCOLUMN\">SCI_GETCOLUMN(position pos) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_FINDCOLUMN\">SCI_FINDCOLUMN(line line, position column) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_POSITIONBEFORE\">SCI_POSITIONBEFORE(position pos) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_POSITIONAFTER\">SCI_POSITIONAFTER(position pos) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_TEXTWIDTH\">SCI_TEXTWIDTH(int style, const char *text) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_TEXTHEIGHT\">SCI_TEXTHEIGHT(line line) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_POSITIONFROMPOINT\">SCI_POSITIONFROMPOINT(int x, int y) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_POSITIONFROMPOINTCLOSE\">SCI_POSITIONFROMPOINTCLOSE(int x, int y) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_CHARPOSITIONFROMPOINT\">SCI_CHARPOSITIONFROMPOINT(int x, int y) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_CHARPOSITIONFROMPOINTCLOSE\">SCI_CHARPOSITIONFROMPOINTCLOSE(int x, int y) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_POINTXFROMPOSITION\">SCI_POINTXFROMPOSITION(&lt;unused&gt;, position pos) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_POINTYFROMPOSITION\">SCI_POINTYFROMPOSITION(&lt;unused&gt;, position pos) &rarr; int</a><br />\r\n\r\n    <p>\r\n     <b id=\"SCI_GETTEXTLENGTH\">SCI_GETTEXTLENGTH &rarr; position</b><br />\r\n     <b id=\"SCI_GETLENGTH\">SCI_GETLENGTH &rarr; position</b><br />\r\n     Both these messages return the length of the document in bytes.</p>\r\n\r\n    <p><b id=\"SCI_GETLINECOUNT\">SCI_GETLINECOUNT &rarr; line</b><br />\r\n     This returns the number of lines in the document. An empty document contains 1 line. A\r\n    document holding only an end of line sequence has 2 lines.</p>\r\n\r\n    <p><b id=\"SCI_LINESONSCREEN\">SCI_LINESONSCREEN &rarr; line</b><br />\r\n     This returns the number of complete lines visible on the screen. With a constant line height,\r\n    this is the vertical space available divided by the line separation. Unless you arrange to size\r\n    your window to an integral number of lines, there may be a partial line visible at the bottom\r\n    of the view.</p>\r\n\r\n    <p><b id=\"SCI_GETMODIFY\">SCI_GETMODIFY &rarr; bool</b><br />\r\n     This returns non-zero if the document is modified and 0 if it is unmodified. The modified\r\n    status of a document is determined by the undo position relative to the save point. The save\r\n    point is set by <a class=\"message\" href=\"#SCI_SETSAVEPOINT\"><code>SCI_SETSAVEPOINT</code></a>,\r\n    usually when you have saved data to a file.</p>\r\n\r\n    <p>If you need to be notified when the document becomes modified, Scintilla notifies the\r\n    container that it has entered or left the save point with the <a class=\"message\"\r\n    href=\"#SCN_SAVEPOINTREACHED\"><code>SCN_SAVEPOINTREACHED</code></a> and <a class=\"message\"\r\n    href=\"#SCN_SAVEPOINTLEFT\"><code>SCN_SAVEPOINTLEFT</code></a> <a class=\"jump\"\r\n    href=\"#Notifications\">notification messages</a>.</p>\r\n    \r\n    <p><b id=\"SCI_LINEFROMPOSITION\">SCI_LINEFROMPOSITION(position pos) &rarr; line</b><br />\r\n     This message returns the line that contains the position <code class=\"parameter\">pos</code> in the document. The\r\n    return value is 0 if <code class=\"parameter\">pos</code> &lt;= 0. The return value is the last line if\r\n    <code class=\"parameter\">pos</code> is beyond the end of the document.</p>\r\n\r\n    <p><b id=\"SCI_POSITIONFROMLINE\">SCI_POSITIONFROMLINE(line line) &rarr; position</b><br />\r\n     This returns the document position that corresponds with the start of the line. If\r\n    <code class=\"parameter\">line</code> is negative, the position of the line holding the start of the selection is\r\n    returned. If <code class=\"parameter\">line</code> is greater than the lines in the document, the return value is\r\n    -1. If <code class=\"parameter\">line</code> is equal to the number of lines in the document (i.e. 1 line past the\r\n    last line), the return value is the end of the document.</p>\r\n\r\n    <p><b id=\"SCI_GETLINEENDPOSITION\">SCI_GETLINEENDPOSITION(line line) &rarr; position</b><br />\r\n     This returns the position at the end of the line, before any line end characters. If <code class=\"parameter\">line</code>\r\n    is the last line in the document (which does not have any end of line characters) or greater,\r\n    the result is the size of the document.\r\n    If <code class=\"parameter\">line</code> is negative the result is undefined.</p>\r\n\r\n    <p><b id=\"SCI_LINELENGTH\">SCI_LINELENGTH(line line) &rarr; position</b><br />\r\n     This returns the length of the line, including any line end characters. If <code class=\"parameter\">line</code>\r\n    is negative or beyond the last line in the document, the result is 0. If you want the length of\r\n    the line not including any end of line characters, use <a class=\"message\"\r\n    href=\"#SCI_GETLINEENDPOSITION\"><code>SCI_GETLINEENDPOSITION(line)</code></a> - <a class=\"message\"\r\n    href=\"#SCI_POSITIONFROMLINE\"><code>SCI_POSITIONFROMLINE(line)</code></a>.</p>\r\n\r\n    <p><b id=\"SCI_GETCOLUMN\">SCI_GETCOLUMN(position pos) &rarr; position</b><br />\r\n     This message returns the column number of a position <code class=\"parameter\">pos</code> within the document\r\n    taking the width of tabs into account. This returns the column number of the last tab on the\r\n    line before <code class=\"parameter\">pos</code>, plus the number of characters between the last tab and\r\n    <code class=\"parameter\">pos</code>. If there are no tab characters on the line, the return value is the number of\r\n    characters up to the position on the line. In both cases, double byte characters count as a\r\n    single character. This is probably only useful with monospaced fonts.</p>\r\n\r\n    <p><b id=\"SCI_FINDCOLUMN\">SCI_FINDCOLUMN(line line, position column) &rarr; position</b><br />\r\n     This message returns the position of a <code class=\"parameter\">column</code> on a <code class=\"parameter\">line</code>\r\n    taking the width of tabs into account. It treats a multi-byte character as a single column.\r\n    Column numbers, like lines start at 0.</p>\r\n\r\n    <p><b id=\"SCI_POSITIONBEFORE\">SCI_POSITIONBEFORE(position pos) &rarr; position</b><br />\r\n     <b id=\"SCI_POSITIONAFTER\">SCI_POSITIONAFTER(position pos) &rarr; position</b><br />\r\n     These messages return the position before and after another position\r\n     in the document taking into account the current code page. The minimum\r\n     position returned is 0 and the maximum is the last position in the document.\r\n     If called with a position within a multi byte character will return the position\r\n     of the start/end of that character.</p>\r\n\r\n    <p><b id=\"SCI_TEXTWIDTH\">SCI_TEXTWIDTH(int style, const char *text) &rarr; int</b><br />\r\n     This returns the pixel width of a string drawn in the given <code class=\"parameter\">style</code> which can\r\n    be used, for example, to decide how wide to make the line number margin in order to display a\r\n    given number of numerals.</p>\r\n\r\n    <p><b id=\"SCI_TEXTHEIGHT\">SCI_TEXTHEIGHT(line line) &rarr; int</b><br />\r\n     This returns the height in pixels of a particular line. Currently all lines are the same\r\n    height.</p>\r\n\r\n    <p><b id=\"SCI_POSITIONFROMPOINT\">SCI_POSITIONFROMPOINT(int x, int y) &rarr; position</b><br />\r\n     <b id=\"SCI_POSITIONFROMPOINTCLOSE\">SCI_POSITIONFROMPOINTCLOSE(int x, int y) &rarr; position</b><br />\r\n     <code>SCI_POSITIONFROMPOINT</code> finds the closest character position to a point and\r\n    <code>SCI_POSITIONFROMPOINTCLOSE</code> is similar but returns -1 if the point is outside the\r\n    window or not close to any characters.</p>\r\n\r\n    <p><b id=\"SCI_CHARPOSITIONFROMPOINT\">SCI_CHARPOSITIONFROMPOINT(int x, int y) &rarr; position</b><br />\r\n     <b id=\"SCI_CHARPOSITIONFROMPOINTCLOSE\">SCI_CHARPOSITIONFROMPOINTCLOSE(int x, int y) &rarr; position</b><br />\r\n     <code>SCI_CHARPOSITIONFROMPOINT</code> finds the closest character to a point and\r\n    <code>SCI_CHARPOSITIONFROMPOINTCLOSE</code> is similar but returns -1 if the point is outside the\r\n    window or not close to any characters. This is similar to the previous methods but finds characters rather than\r\n    inter-character positions.</p>\r\n\r\n    <p><b id=\"SCI_POINTXFROMPOSITION\">SCI_POINTXFROMPOSITION(&lt;unused&gt;, position pos) &rarr; int</b><br />\r\n     <b id=\"SCI_POINTYFROMPOSITION\">SCI_POINTYFROMPOSITION(&lt;unused&gt;, position pos) &rarr; int</b><br />\r\n     These messages return the x and y display pixel location of text at position <code class=\"parameter\">pos</code>\r\n    in the document.</p>\r\n\r\n    <h2 id=\"ByCharacterOrCodeUnit\">By character or UTF-16 code unit</h2>\r\n\r\n    <p>Most Scintilla APIs use byte positions but some applications want to use positions based on counting\r\n    (UTF-32) characters or (UTF-16) code units\r\n    or need to communicate with other code written in terms of characters or code units.\r\n    With only byte positions, this may require examining many bytes to count characters or code units in the document\r\n    but this may be sped up in some cases by indexing the line starts by character or code unit.</p>\r\n\r\n     <a class=\"message\" href=\"#SCI_POSITIONRELATIVE\">SCI_POSITIONRELATIVE(position pos, position relative) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_POSITIONRELATIVECODEUNITS\">SCI_POSITIONRELATIVECODEUNITS(position pos, position relative) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_COUNTCHARACTERS\">SCI_COUNTCHARACTERS(position start, position end) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_COUNTCODEUNITS\">SCI_COUNTCODEUNITS(position start, position end) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETLINECHARACTERINDEX\">SCI_GETLINECHARACTERINDEX &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_ALLOCATELINECHARACTERINDEX\">SCI_ALLOCATELINECHARACTERINDEX(int lineCharacterIndex)</a><br />\r\n     <a class=\"message\" href=\"#SCI_RELEASELINECHARACTERINDEX\">SCI_RELEASELINECHARACTERINDEX(int lineCharacterIndex)</a><br />\r\n     <a class=\"message\" href=\"#SCI_LINEFROMINDEXPOSITION\">SCI_LINEFROMINDEXPOSITION(position pos, int lineCharacterIndex) &rarr; line</a><br />\r\n     <a class=\"message\" href=\"#SCI_INDEXPOSITIONFROMLINE\">SCI_INDEXPOSITIONFROMLINE(line line, int lineCharacterIndex) &rarr; position</a><br />\r\n\r\n    <p><b id=\"SCI_POSITIONRELATIVE\">SCI_POSITIONRELATIVE(position pos, position relative) &rarr; position</b><br />\r\n     Count a number of whole characters before or after the argument position and return that position.\r\n     The minimum position returned is 0 and the maximum is the last position in the document.\r\n     If the position goes past the document end then 0 is returned.\r\n     </p>\r\n\r\n    <p><b id=\"SCI_COUNTCHARACTERS\">SCI_COUNTCHARACTERS(position start, position end) &rarr; position</b><br />\r\n     Returns the number of whole characters between two positions.</p>\r\n\r\n    <p><b id=\"SCI_POSITIONRELATIVECODEUNITS\">SCI_POSITIONRELATIVECODEUNITS(position pos, position relative) &rarr; position</b><br />\r\n    <b id=\"SCI_COUNTCODEUNITS\">SCI_COUNTCODEUNITS(position start, position end) &rarr; position</b><br />\r\n     These are the UTF-16 versions of <code>SCI_POSITIONRELATIVE</code> and <code>SCI_COUNTCHARACTERS</code>\r\n     working in terms of UTF-16 code units.</p>\r\n\r\n    <p><b id=\"SCI_GETLINECHARACTERINDEX\">SCI_GETLINECHARACTERINDEX &rarr; int</b><br />\r\n     Returns which if any indexes are active. It may be <code>SC_LINECHARACTERINDEX_NONE</code> (0) or one or more\r\n     of <code>SC_LINECHARACTERINDEX_UTF32</code> (1) if whole characters are indexed or\r\n     <code>SC_LINECHARACTERINDEX_UTF16</code> (2) if UTF-16 code units are indexed.\r\n     Character indexes are currently only supported for UTF-8 documents.</p>\r\n\r\n    <p><b id=\"SCI_ALLOCATELINECHARACTERINDEX\">SCI_ALLOCATELINECHARACTERINDEX(int lineCharacterIndex)</b><br />\r\n    <b id=\"SCI_RELEASELINECHARACTERINDEX\">SCI_RELEASELINECHARACTERINDEX(int lineCharacterIndex)</b><br />\r\n     Allocate or release one or more indexes using same enumeration as <code>SCI_GETLINECHARACTERINDEX</code>.\r\n     Different aspects of an application may need indexes for different periods and should allocate for those periods.\r\n     Indexes use additional memory so releasing them can help minimize memory but they also take time to recalculate.\r\n     Scintilla may also allocate indexes to support features like accessibility or input method editors.\r\n     Only one index of each type is created for a document at a time.</p>\r\n\r\n    <p><b id=\"SCI_LINEFROMINDEXPOSITION\">SCI_LINEFROMINDEXPOSITION(position pos, int lineCharacterIndex) &rarr; line</b><br />\r\n    <b id=\"SCI_INDEXPOSITIONFROMLINE\">SCI_INDEXPOSITIONFROMLINE(line line, int lineCharacterIndex) &rarr; position</b><br />\r\n     The document line of a particular character or code unit may be found by calling <code>SCI_LINEFROMINDEXPOSITION</code> with one of\r\n     <code>SC_LINECHARACTERINDEX_UTF32</code> (1) or <code>SC_LINECHARACTERINDEX_UTF16</code> (2).\r\n     The inverse action, finds the starting position of a document line either in characters or code units from the document start by calling\r\n     <code>SCI_INDEXPOSITIONFROMLINE</code> with the same <code class=\"parameter\">lineCharacterIndex</code> argument.</p>\r\n\r\n    <h2 id=\"ErrorHandling\">Error handling</h2>\r\n\r\n    <code><a class=\"message\" href=\"#SCI_SETSTATUS\">SCI_SETSTATUS(int status)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETSTATUS\">SCI_GETSTATUS &rarr; int</a><br />\r\n    </code>\r\n\r\n    <p><b id=\"SCI_SETSTATUS\">SCI_SETSTATUS(int status)</b><br />\r\n     <b id=\"SCI_GETSTATUS\">SCI_GETSTATUS &rarr; int</b><br />\r\n     If an error occurs, Scintilla may set an internal error number that can be retrieved with\r\n    <code>SCI_GETSTATUS</code>.\r\n    To clear the error status call <code>SCI_SETSTATUS(0)</code>.\r\n    Status values from 1 to 999 are errors and status <code>SC_STATUS_WARN_START</code> (1000)\r\n    and above are warnings.\r\n    The currently defined statuses are:\r\n    </p>\r\n\r\n    <table class=\"standard\" summary=\"Status values\">\r\n      <tbody valign=\"top\">\r\n        <tr>\r\n          <th align=\"left\"><code>SC_STATUS_OK</code></th>\r\n          <td>0</td>\r\n          <td>No failures</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>SC_STATUS_FAILURE</code></th>\r\n          <td>1</td>\r\n          <td>Generic failure</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>SC_STATUS_BADALLOC</code></th>\r\n          <td>2</td>\r\n          <td>Memory is exhausted</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>SC_STATUS_WARN_REGEX</code></th>\r\n          <td>1001</td>\r\n          <td>Regular expression is invalid</td>\r\n        </tr>\r\n\r\n      </tbody>\r\n    </table>\r\n\r\n    <h2 id=\"Selection\">Selection</h2>\r\n\r\n    <p>Scintilla maintains a selection that stretches between two points, the anchor and the\r\n    current position. If the anchor and the current position are the same, there is no selected\r\n    text. Positions in the document range from 0 (before the first character), to the document size\r\n    (after the last character). If you use messages, there is nothing to stop you setting a\r\n    position that is in the middle of a CRLF pair, or in the middle of a 2 byte character. However,\r\n    keyboard commands will not move the caret into such positions.</p>\r\n    <code>\r\n     <a class=\"message\" href=\"#SCI_SETSEL\">SCI_SETSEL(position anchor, position caret)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GOTOPOS\">SCI_GOTOPOS(position caret)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GOTOLINE\">SCI_GOTOLINE(line line)</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETCURRENTPOS\">SCI_SETCURRENTPOS(position caret)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETCURRENTPOS\">SCI_GETCURRENTPOS &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETANCHOR\">SCI_SETANCHOR(position anchor)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETANCHOR\">SCI_GETANCHOR &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETSELECTIONSTART\">SCI_SETSELECTIONSTART(position anchor)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETSELECTIONSTART\">SCI_GETSELECTIONSTART &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETSELECTIONEND\">SCI_SETSELECTIONEND(position caret)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETSELECTIONEND\">SCI_GETSELECTIONEND &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETEMPTYSELECTION\">SCI_SETEMPTYSELECTION(position caret)</a><br />\r\n     <a class=\"message\" href=\"#SCI_SELECTALL\">SCI_SELECTALL</a><br />\r\n     <a class=\"message\" href=\"#SCI_HIDESELECTION\">SCI_HIDESELECTION(bool hide)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETSELECTIONHIDDEN\">SCI_GETSELECTIONHIDDEN &rarr; bool</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETSELTEXT\">SCI_GETSELTEXT(&lt;unused&gt;, char *text) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETCURLINE\">SCI_GETCURLINE(position length, char *text) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_SELECTIONISRECTANGLE\">SCI_SELECTIONISRECTANGLE &rarr; bool</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETSELECTIONMODE\">SCI_SETSELECTIONMODE(int selectionMode)</a><br />\r\n     <a class=\"message\" href=\"#SCI_CHANGESELECTIONMODE\">SCI_CHANGESELECTIONMODE(int selectionMode)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETSELECTIONMODE\">SCI_GETSELECTIONMODE &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETMOVEEXTENDSSELECTION\">SCI_SETMOVEEXTENDSSELECTION(bool moveExtendsSelection)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETMOVEEXTENDSSELECTION\">SCI_GETMOVEEXTENDSSELECTION &rarr; bool</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETLINESELSTARTPOSITION\">SCI_GETLINESELSTARTPOSITION(line line) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETLINESELENDPOSITION\">SCI_GETLINESELENDPOSITION(line line) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_MOVECARETINSIDEVIEW\">SCI_MOVECARETINSIDEVIEW</a><br />\r\n     <a class=\"message\" href=\"#SCI_CHOOSECARETX\">SCI_CHOOSECARETX</a><br />\r\n     <a class=\"message\" href=\"#SCI_MOVESELECTEDLINESUP\">SCI_MOVESELECTEDLINESUP</a><br />\r\n     <a class=\"message\" href=\"#SCI_MOVESELECTEDLINESDOWN\">SCI_MOVESELECTEDLINESDOWN</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETMOUSESELECTIONRECTANGULARSWITCH\">SCI_SETMOUSESELECTIONRECTANGULARSWITCH(bool mouseSelectionRectangularSwitch)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETMOUSESELECTIONRECTANGULARSWITCH\">SCI_GETMOUSESELECTIONRECTANGULARSWITCH &rarr; bool</a><br />\r\n    </code>\r\n\r\n    <p><b id=\"SCI_SETSEL\">SCI_SETSEL(position anchor, position caret)</b><br />\r\n     This message sets both the anchor and the current position. If <code class=\"parameter\">caret</code> is\r\n    negative, it means the end of the document. If <code class=\"parameter\">anchor</code> is negative, it means\r\n    remove any selection (i.e. set the anchor to the same position as <code class=\"parameter\">caret</code>). The\r\n    caret is scrolled into view after this operation.</p>\r\n\r\n    <p><b id=\"SCI_GOTOPOS\">SCI_GOTOPOS(position caret)</b><br />\r\n     This removes any selection, sets the caret at <code class=\"parameter\">caret</code> and scrolls the view to make\r\n    the caret visible, if necessary. It is equivalent to\r\n    <code>SCI_SETSEL(caret, caret)</code>. The anchor position is set the same as the current\r\n    position.</p>\r\n\r\n    <p><b id=\"SCI_GOTOLINE\">SCI_GOTOLINE(line line)</b><br />\r\n     This removes any selection and sets the caret at the start of line number <code class=\"parameter\">line</code>\r\n    and scrolls the view (if needed) to make it visible. The anchor position is set the same as the\r\n    current position. If <code class=\"parameter\">line</code> is outside the lines in the document (first line is 0),\r\n    the line set is the first or last.</p>\r\n\r\n    <p><b id=\"SCI_SETCURRENTPOS\">SCI_SETCURRENTPOS(position caret)</b><br />\r\n     This sets the current position and creates a selection between the anchor and the current\r\n    position. The caret is not scrolled into view.</p>\r\n\r\n    <p>See also: <a class=\"message\" href=\"#SCI_SCROLLCARET\"><code>SCI_SCROLLCARET</code></a></p>\r\n\r\n    <p><b id=\"SCI_GETCURRENTPOS\">SCI_GETCURRENTPOS &rarr; position</b><br />\r\n     This returns the current position.</p>\r\n\r\n    <p><b id=\"SCI_SETANCHOR\">SCI_SETANCHOR(position anchor)</b><br />\r\n     This sets the anchor position and creates a selection between the anchor position and the\r\n    current position. The caret is not scrolled into view.</p>\r\n\r\n    <p>See also: <a class=\"message\" href=\"#SCI_SCROLLCARET\"><code>SCI_SCROLLCARET</code></a></p>\r\n\r\n    <p><b id=\"SCI_GETANCHOR\">SCI_GETANCHOR &rarr; position</b><br />\r\n     This returns the current anchor position.</p>\r\n\r\n    <p><b id=\"SCI_SETSELECTIONSTART\">SCI_SETSELECTIONSTART(position anchor)</b><br />\r\n     <b id=\"SCI_SETSELECTIONEND\">SCI_SETSELECTIONEND(position caret)</b><br />\r\n     These set the selection based on the assumption that the anchor position is less than the\r\n    current position. They do not make the caret visible. The table shows the positions of the\r\n    anchor and the current position after using these messages.</p>\r\n\r\n    <table class=\"standard\" summary=\"SetSelection caret positioning\">\r\n      <thead align=\"center\">\r\n        <tr>\r\n          <th>\r\n\t  New value for\r\n          </th>\r\n\r\n          <th>anchor</th>\r\n\r\n          <th>caret</th>\r\n        </tr>\r\n      </thead>\r\n\r\n      <tbody align=\"center\">\r\n        <tr>\r\n          <th><code>SCI_SETSELECTIONSTART</code></th>\r\n\r\n          <td><code class=\"parameter\">anchor</code></td>\r\n\r\n          <td><code>Max(</code><code class=\"parameter\">anchor</code><code>, current)</code></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th><code>SCI_SETSELECTIONEND</code></th>\r\n\r\n          <td><code>Min(anchor, </code><code class=\"parameter\">caret</code><code>)</code></td>\r\n\r\n          <td><code class=\"parameter\">caret</code></td>\r\n        </tr>\r\n      </tbody>\r\n    </table>\r\n\r\n    <p>See also: <a class=\"message\" href=\"#SCI_SCROLLCARET\"><code>SCI_SCROLLCARET</code></a></p>\r\n\r\n    <p><b id=\"SCI_GETSELECTIONSTART\">SCI_GETSELECTIONSTART &rarr; position</b><br />\r\n     <b id=\"SCI_GETSELECTIONEND\">SCI_GETSELECTIONEND &rarr; position</b><br />\r\n     These return the start and end of the selection without regard to which end is the current\r\n    position and which is the anchor. <code>SCI_GETSELECTIONSTART</code> returns the smaller of the\r\n    current position or the anchor position. <code>SCI_GETSELECTIONEND</code> returns the larger of\r\n    the two values.</p>\r\n\r\n    <p><b id=\"SCI_SETEMPTYSELECTION\">SCI_SETEMPTYSELECTION(position caret)</b><br />\r\n     This removes any selection and sets the caret at <code class=\"parameter\">caret</code>. The caret is not scrolled into view.</p>\r\n\r\n    <p><b id=\"SCI_SELECTALL\">SCI_SELECTALL</b><br />\r\n     This selects all the text in the document. The current position is not scrolled into view.</p>\r\n\r\n    <p><b id=\"SCI_HIDESELECTION\">SCI_HIDESELECTION(bool hide)</b><br />\r\n     <b id=\"SCI_GETSELECTIONHIDDEN\">SCI_GETSELECTIONHIDDEN &rarr; bool</b><br />\r\n     The normal state is to make the selection visible by drawing it as set by <a class=\"message\"\r\n    href=\"#SCI_SETSELFORE\"><code>SCI_SETSELFORE</code></a>, <a class=\"message\"\r\n    href=\"#SCI_SETSELBACK\"><code>SCI_SETSELBACK</code></a>, and related calls.\r\n    However, if you hide the selection, it is drawn as normal text.</p>\r\n\r\n    <p><b id=\"SCI_GETSELTEXT\">SCI_GETSELTEXT(&lt;unused&gt;, char *text NUL-terminated) &rarr; position</b><br />\r\n     This copies the currently selected text and a terminating NUL(0) byte to the <code class=\"parameter\">text</code>\r\n    buffer. The buffer size should be determined by calling with a NULL pointer for the <code class=\"parameter\">text</code> argument:\r\n    <code>1 + SCI_GETSELTEXT(0, NULL)</code>.\r\n    This allows for rectangular and discontiguous selections as well as simple selections.\r\n    See <a class=\"toc\" href=\"#MultipleSelectionAndVirtualSpace\">Multiple Selection</a> for information on\r\n    how multiple and rectangular selections and virtual space are copied.</p>\r\n\r\n    <p>See also: <code><a class=\"seealso\" href=\"#SCI_GETCURLINE\">SCI_GETCURLINE</a>,\r\n    <a class=\"seealso\" href=\"#SCI_GETLINE\">SCI_GETLINE</a>,\r\n    <a class=\"seealso\" href=\"#SCI_GETTEXT\">SCI_GETTEXT</a>,\r\n    <a class=\"seealso\" href=\"#SCI_GETSTYLEDTEXT\">SCI_GETSTYLEDTEXT</a>,\r\n    <a class=\"seealso\" href=\"#SCI_GETTEXTRANGE\">SCI_GETTEXTRANGE</a>\r\n    </code></p>\r\n\r\n    <p><b id=\"SCI_GETCURLINE\">SCI_GETCURLINE(position length, char *text NUL-terminated) &rarr; position</b><br />\r\n     This retrieves the text of the line containing the caret and returns the position within the\r\n    line of the caret. Pass in <code>char* text</code> pointing at a buffer large enough to hold\r\n    the text you wish to retrieve and a terminating NUL(0) character.\r\n    Set <code class=\"parameter\">length</code> to the\r\n    length of the buffer not including the terminating NUL character.\r\n    If the text argument is NULL(0) then the length that should be allocated\r\n    to store the entire current line is returned.</p>\r\n\r\n    <p>See also: <code\r\n    <a class=\"seealso\" href=\"#SCI_GETSELTEXT\">SCI_GETSELTEXT</a>,\r\n    <a class=\"seealso\" href=\"#SCI_GETLINE\">SCI_GETLINE</a>,\r\n    <a class=\"seealso\" href=\"#SCI_GETTEXT\">SCI_GETTEXT</a>,\r\n    <a class=\"seealso\" href=\"#SCI_GETSTYLEDTEXT\">SCI_GETSTYLEDTEXT</a>,\r\n    <a class=\"seealso\" href=\"#SCI_GETTEXTRANGE\">SCI_GETTEXTRANGE</a></code></p>\r\n\r\n    <p><b id=\"SCI_SELECTIONISRECTANGLE\">SCI_SELECTIONISRECTANGLE &rarr; bool</b><br />\r\n     This returns 1 if the current selection is in rectangle mode, 0 if not.</p>\r\n\r\n    <p>\r\n    <b id=\"SCI_SETSELECTIONMODE\">SCI_SETSELECTIONMODE(int selectionMode)</b><br />\r\n    <b id=\"SCI_CHANGESELECTIONMODE\">SCI_CHANGESELECTIONMODE(int selectionMode)</b><br />\r\n    <b id=\"SCI_GETSELECTIONMODE\">SCI_GETSELECTIONMODE &rarr; int</b><br />\r\n    The functions set, change, and get the selection mode, which can be\r\n     stream (<code>SC_SEL_STREAM</code>=0) or\r\n     rectangular (<code>SC_SEL_RECTANGLE</code>=1) or\r\n     by lines (<code>SC_SEL_LINES</code>=2)\r\n     or thin rectangular (<code>SC_SEL_THIN</code>=3).\r\n     When <code>SCI_SETSELECTIONMODE</code> sets these modes, regular caret moves will extend or reduce the selection,\r\n     until the mode is cancelled by a call with same value, or with <code>SCI_CANCEL</code>, or with <code>SCI_SETMOVEEXTENDSSELECTION</code>.\r\n     <code>SCI_CHANGESELECTIONMODE</code> sets the mode but does not make regular caret moves extend or reduce the selection.</p>\r\n     <p>The get function returns the current mode even if the selection was made by mouse or with regular extended moves.\r\n     <code>SC_SEL_THIN</code> is the mode after a rectangular selection has been typed into and ensures\r\n     that no characters are selected.</p>\r\n\r\n    <p>\r\n    <b id=\"SCI_SETMOVEEXTENDSSELECTION\">SCI_SETMOVEEXTENDSSELECTION(bool moveExtendsSelection)</b><br />\r\n    <b id=\"SCI_GETMOVEEXTENDSSELECTION\">SCI_GETMOVEEXTENDSSELECTION &rarr; bool</b><br />\r\n     This controls whether regular caret moves extends the selection leaving the anchor unchanged.\r\n     It is 1 if regular caret moves will extend or reduce the selection, 0 if not.\r\n     <code>SCI_SETSELECTIONMODE</code> toggles this setting between on and off.</p>\r\n\r\n    <p><b id=\"SCI_GETLINESELSTARTPOSITION\">SCI_GETLINESELSTARTPOSITION(line line) &rarr; position</b><br />\r\n    <b id=\"SCI_GETLINESELENDPOSITION\">SCI_GETLINESELENDPOSITION(line line) &rarr; position</b><br />\r\n    Retrieve the position of the start and end of the selection at the given line with\r\n    <code>INVALID_POSITION</code> returned if no selection on this line.</p>\r\n\r\n    <p><b id=\"SCI_MOVECARETINSIDEVIEW\">SCI_MOVECARETINSIDEVIEW</b><br />\r\n     If the caret is off the top or bottom of the view, it is moved to the nearest line that is\r\n    visible to its current position. Any selection is lost.</p>\r\n\r\n    <p><b id=\"SCI_CHOOSECARETX\">SCI_CHOOSECARETX</b><br />\r\n     Scintilla remembers the x value of the last position horizontally moved to explicitly by the\r\n    user and this value is then used when moving vertically such as by using the up and down keys.\r\n    This message sets the current x position of the caret as the remembered value.</p>\r\n\r\n    <p><b id=\"SCI_MOVESELECTEDLINESUP\">SCI_MOVESELECTEDLINESUP</b><br />\r\n     Move the selected lines up one line, shifting the line above after the selection.\r\n     The selection will be automatically extended to the beginning of the selection's first line and the end of the selection's last line.\r\n     If nothing was selected, the line the cursor is currently at will be selected.</p>\r\n\r\n    <p><b id=\"SCI_MOVESELECTEDLINESDOWN\">SCI_MOVESELECTEDLINESDOWN</b><br />\r\n     Move the selected lines down one line, shifting the line below before the selection.\r\n     The selection will be automatically extended to the beginning of the selection's first line and the end of the selection's last line.\r\n     If nothing was selected, the line the cursor is currently at will be selected.</p>\r\n\r\n    <p><b id=\"SCI_SETMOUSESELECTIONRECTANGULARSWITCH\">SCI_SETMOUSESELECTIONRECTANGULARSWITCH(bool\r\n     mouseSelectionRectangularSwitch)</b><br />\r\n    <b id=\"SCI_GETMOUSESELECTIONRECTANGULARSWITCH\">SCI_GETMOUSESELECTIONRECTANGULARSWITCH &rarr; bool</b><br />\r\n     Enable or disable the ability to switch to rectangular selection mode while making a selection with the mouse.\r\n     When this option is turned on, mouse selections in stream mode can be switched to rectangular mode by pressing\r\n     the corresponding modifier key. They then stick to rectangular mode even when the modifier key is released again.\r\n     When this option is turned off, mouse selections will always stick to the mode the selection was started in. It\r\n     is off by default.</p>\r\n\r\n    <h2 id=\"MultipleSelectionAndVirtualSpace\">Multiple Selection and Virtual Space</h2>\r\n\r\n    <code>\r\n     <a class=\"message\" href=\"#SCI_SETMULTIPLESELECTION\">SCI_SETMULTIPLESELECTION(bool multipleSelection)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETMULTIPLESELECTION\">SCI_GETMULTIPLESELECTION &rarr; bool</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETADDITIONALSELECTIONTYPING\">SCI_SETADDITIONALSELECTIONTYPING(bool additionalSelectionTyping)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETADDITIONALSELECTIONTYPING\">SCI_GETADDITIONALSELECTIONTYPING &rarr; bool</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETMULTIPASTE\">SCI_SETMULTIPASTE(int multiPaste)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETMULTIPASTE\">SCI_GETMULTIPASTE &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETVIRTUALSPACEOPTIONS\">SCI_SETVIRTUALSPACEOPTIONS(int virtualSpaceOptions)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETVIRTUALSPACEOPTIONS\">SCI_GETVIRTUALSPACEOPTIONS &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETRECTANGULARSELECTIONMODIFIER\">SCI_SETRECTANGULARSELECTIONMODIFIER(int modifier)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETRECTANGULARSELECTIONMODIFIER\">SCI_GETRECTANGULARSELECTIONMODIFIER &rarr; int</a><br />\r\n     <br />\r\n\r\n     <a class=\"message\" href=\"#SCI_GETSELECTIONS\">SCI_GETSELECTIONS &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETSELECTIONEMPTY\">SCI_GETSELECTIONEMPTY &rarr; bool</a><br />\r\n     <a class=\"message\" href=\"#SCI_CLEARSELECTIONS\">SCI_CLEARSELECTIONS</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETSELECTION\">SCI_SETSELECTION(position caret, position anchor)</a><br />\r\n     <a class=\"message\" href=\"#SCI_ADDSELECTION\">SCI_ADDSELECTION(position caret, position anchor)</a><br />\r\n     <a class=\"message\" href=\"#SCI_SELECTIONFROMPOINT\">SCI_SELECTIONFROMPOINT(int x, int y) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_DROPSELECTIONN\">SCI_DROPSELECTIONN(int selection)</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETMAINSELECTION\">SCI_SETMAINSELECTION(int selection)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETMAINSELECTION\">SCI_GETMAINSELECTION &rarr; int</a><br />\r\n     <br />\r\n\r\n     <a class=\"message\" href=\"#SCI_SETSELECTIONNCARET\">SCI_SETSELECTIONNCARET(int selection, position caret)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETSELECTIONNCARET\">SCI_GETSELECTIONNCARET(int selection) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETSELECTIONNCARETVIRTUALSPACE\">SCI_SETSELECTIONNCARETVIRTUALSPACE(int selection, position space)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETSELECTIONNCARETVIRTUALSPACE\">SCI_GETSELECTIONNCARETVIRTUALSPACE(int selection) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETSELECTIONNANCHOR\">SCI_SETSELECTIONNANCHOR(int selection, position anchor)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETSELECTIONNANCHOR\">SCI_GETSELECTIONNANCHOR(int selection) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETSELECTIONNANCHORVIRTUALSPACE\">SCI_SETSELECTIONNANCHORVIRTUALSPACE(int selection, position space)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETSELECTIONNANCHORVIRTUALSPACE\">SCI_GETSELECTIONNANCHORVIRTUALSPACE(int selection) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETSELECTIONNSTART\">SCI_SETSELECTIONNSTART(int selection, position anchor)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETSELECTIONNSTART\">SCI_GETSELECTIONNSTART(int selection) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETSELECTIONNSTARTVIRTUALSPACE\">SCI_GETSELECTIONNSTARTVIRTUALSPACE(int selection) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETSELECTIONNEND\">SCI_SETSELECTIONNEND(int selection, position caret)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETSELECTIONNEND\">SCI_GETSELECTIONNEND(int selection) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETSELECTIONNENDVIRTUALSPACE\">SCI_GETSELECTIONNENDVIRTUALSPACE(int selection) &rarr; position</a><br />\r\n     <br />\r\n\r\n     <a class=\"message\" href=\"#SCI_SETRECTANGULARSELECTIONCARET\">SCI_SETRECTANGULARSELECTIONCARET(position caret)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETRECTANGULARSELECTIONCARET\">SCI_GETRECTANGULARSELECTIONCARET &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETRECTANGULARSELECTIONCARETVIRTUALSPACE\">SCI_SETRECTANGULARSELECTIONCARETVIRTUALSPACE(position space)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETRECTANGULARSELECTIONCARETVIRTUALSPACE\">SCI_GETRECTANGULARSELECTIONCARETVIRTUALSPACE &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETRECTANGULARSELECTIONANCHOR\">SCI_SETRECTANGULARSELECTIONANCHOR(position anchor)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETRECTANGULARSELECTIONANCHOR\">SCI_GETRECTANGULARSELECTIONANCHOR &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETRECTANGULARSELECTIONANCHORVIRTUALSPACE\">SCI_SETRECTANGULARSELECTIONANCHORVIRTUALSPACE(position space)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETRECTANGULARSELECTIONANCHORVIRTUALSPACE\">SCI_GETRECTANGULARSELECTIONANCHORVIRTUALSPACE &rarr; position</a><br />\r\n     <br />\r\n\r\n     <a class=\"element\" href=\"#SC_ELEMENT_SELECTION_ADDITIONAL_TEXT\">SC_ELEMENT_SELECTION_ADDITIONAL_TEXT : colouralpha</a><br />\r\n     <a class=\"element\" href=\"#SC_ELEMENT_SELECTION_ADDITIONAL_BACK\">SC_ELEMENT_SELECTION_ADDITIONAL_BACK : colouralpha</a><br />\r\n     <a class=\"discouraged message\" href=\"#SCI_SETADDITIONALSELALPHA\">SCI_SETADDITIONALSELALPHA(alpha alpha)</a><br />\r\n     <a class=\"discouraged message\" href=\"#SCI_GETADDITIONALSELALPHA\">SCI_GETADDITIONALSELALPHA &rarr; int</a><br />\r\n     <a class=\"discouraged message\" href=\"#SCI_SETADDITIONALSELFORE\">SCI_SETADDITIONALSELFORE(colour fore)</a><br />\r\n     <a class=\"discouraged message\" href=\"#SCI_SETADDITIONALSELBACK\">SCI_SETADDITIONALSELBACK(colour back)</a><br />\r\n     <a class=\"element\" href=\"#SC_ELEMENT_CARET_ADDITIONAL\">SC_ELEMENT_CARET_ADDITIONAL : colouralpha</a><br />\r\n     <a class=\"discouraged message\" href=\"#SCI_SETADDITIONALCARETFORE\">SCI_SETADDITIONALCARETFORE(colour fore)</a><br />\r\n     <a class=\"discouraged message\" href=\"#SCI_GETADDITIONALCARETFORE\">SCI_GETADDITIONALCARETFORE &rarr; colour</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETADDITIONALCARETSBLINK\">SCI_SETADDITIONALCARETSBLINK(bool additionalCaretsBlink)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETADDITIONALCARETSBLINK\">SCI_GETADDITIONALCARETSBLINK &rarr; bool</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETADDITIONALCARETSVISIBLE\">SCI_SETADDITIONALCARETSVISIBLE(bool additionalCaretsVisible)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETADDITIONALCARETSVISIBLE\">SCI_GETADDITIONALCARETSVISIBLE &rarr; bool</a><br />\r\n     <br />\r\n\r\n     <a class=\"message\" href=\"#SCI_SWAPMAINANCHORCARET\">SCI_SWAPMAINANCHORCARET</a><br />\r\n     <a class=\"message\" href=\"#SCI_ROTATESELECTION\">SCI_ROTATESELECTION</a><br />\r\n     <a class=\"message\" href=\"#SCI_MULTIPLESELECTADDNEXT\">SCI_MULTIPLESELECTADDNEXT</a><br />\r\n     <a class=\"message\" href=\"#SCI_MULTIPLESELECTADDEACH\">SCI_MULTIPLESELECTADDEACH</a><br />\r\n    </code>\r\n\r\n    <p>\r\n    There may be multiple selections active at one time.\r\n    More selections are made by holding down the Ctrl key while dragging with the mouse.\r\n    The most recent selection is the main selection and determines which part of the document is shown automatically.\r\n    Any selection apart from the main selection is called an additional selection.\r\n    The calls in the previous section operate on the main selection.\r\n    There is always at least one selection.\r\n    The selection can be simplified down to just the main selection by\r\n    <a class=\"message\" href=\"#SCI_CANCEL\"><code>SCI_CANCEL</code></a>\r\n    which is normally mapped to the Esc key.\r\n    </p>\r\n\r\n    <p>\r\n    Rectangular selections are handled as multiple selections although the original rectangular range is remembered so that\r\n    subsequent operations may be handled differently for rectangular selections. For example, pasting a rectangular selection\r\n    places each piece in a vertical column.\r\n    </p>\r\n\r\n    <p>\r\n    Virtual space is space beyond the end of each line. The caret may be moved into virtual space but no real space will be\r\n    added to the document until there is some text typed or some other text insertion command is used.\r\n    </p>\r\n\r\n    <p>When discontiguous selections are copied to the clipboard, each selection is added to the clipboard text\r\n    in order with no delimiting characters.\r\n    For rectangular selections the document's line end is added after each line's text. Rectangular selections\r\n    are always copied from top line to bottom, not in the in order of selection.Virtual space is not copied.</p>\r\n\r\n    <p>\r\n    <b id=\"SCI_SETMULTIPLESELECTION\">SCI_SETMULTIPLESELECTION(bool multipleSelection)</b><br />\r\n    <b id=\"SCI_GETMULTIPLESELECTION\">SCI_GETMULTIPLESELECTION &rarr; bool</b><br />\r\n     Enable or disable multiple selection. When multiple selection is disabled, it is not possible to select\r\n     multiple ranges by holding down the Ctrl key while dragging with the mouse.</p>\r\n\r\n    <p>\r\n    <b id=\"SCI_SETADDITIONALSELECTIONTYPING\">SCI_SETADDITIONALSELECTIONTYPING(bool additionalSelectionTyping)</b><br />\r\n    <b id=\"SCI_GETADDITIONALSELECTIONTYPING\">SCI_GETADDITIONALSELECTIONTYPING &rarr; bool</b><br />\r\n     Whether typing, new line, cursor left/right/up/down, backspace, delete, home, and end work\r\n     with multiple selections simultaneously.\r\n     Also allows selection and word and line deletion commands.</p>\r\n\r\n    <p>\r\n    <b id=\"SCI_SETMULTIPASTE\">SCI_SETMULTIPASTE(int multiPaste)</b><br />\r\n    <b id=\"SCI_GETMULTIPASTE\">SCI_GETMULTIPASTE &rarr; int</b><br />\r\n     When pasting into multiple selections, the pasted text can go into just the main selection with <code>SC_MULTIPASTE_ONCE</code>=0\r\n     or into each selection with <code>SC_MULTIPASTE_EACH</code>=1. <code>SC_MULTIPASTE_ONCE</code> is the default.</p>\r\n\r\n    <p>\r\n    <b id=\"SCI_SETVIRTUALSPACEOPTIONS\">SCI_SETVIRTUALSPACEOPTIONS(int virtualSpaceOptions)</b><br />\r\n    <b id=\"SCI_GETVIRTUALSPACEOPTIONS\">SCI_GETVIRTUALSPACEOPTIONS &rarr; int</b><br />\r\n     Virtual space can be enabled or disabled for rectangular selections or in other circumstances or in both.\r\n     There are three bit flags <code>SCVS_RECTANGULARSELECTION</code>=1,\r\n     <code>SCVS_USERACCESSIBLE</code>=2, and\r\n     <code>SCVS_NOWRAPLINESTART</code>=4 which can be set independently.\r\n     <code>SCVS_NONE</code>=0, the default, disables all use of virtual space.</p>\r\n     <p><code>SCVS_NOWRAPLINESTART</code> prevents left arrow movement and selection\r\n     from wrapping to the previous line.\r\n     This is most commonly desired in conjunction with virtual space but is an independent\r\n     setting so works without virtual space.</p>\r\n\r\n    <p>\r\n    <b id=\"SCI_SETRECTANGULARSELECTIONMODIFIER\">SCI_SETRECTANGULARSELECTIONMODIFIER(int modifier)</b><br />\r\n    <b id=\"SCI_GETRECTANGULARSELECTIONMODIFIER\">SCI_GETRECTANGULARSELECTIONMODIFIER &rarr; int</b><br />\r\n     On GTK and Qt, the key used to indicate that a rectangular selection should be created when combined with a mouse drag can be set.\r\n     The three possible values are <code>SCMOD_CTRL</code>=2, <code>SCMOD_ALT</code>=4 (default) or <code>SCMOD_SUPER</code>=8.\r\n     Since <code>SCMOD_ALT</code> may already be used by a window manager, the window manager may need configuring to allow this choice.\r\n     <code>SCMOD_SUPER</code> is often a system dependent modifier key such as the Left Windows key on a Windows keyboard or the\r\n     Command key on a Mac.</p>\r\n\r\n    <p>\r\n    <b id=\"SCI_GETSELECTIONS\">SCI_GETSELECTIONS &rarr; int</b><br />\r\n     Return the number of selections currently active. There is always at least one selection.</p>\r\n\r\n    <p>\r\n    <b id=\"SCI_GETSELECTIONEMPTY\">SCI_GETSELECTIONEMPTY &rarr; bool</b><br />\r\n     Return 1 if every selected range is empty else 0.</p>\r\n\r\n    <p>\r\n    <b id=\"SCI_CLEARSELECTIONS\">SCI_CLEARSELECTIONS</b><br />\r\n     Set a single empty selection at 0 as the only selection.</p>\r\n\r\n    <p>\r\n    <b id=\"SCI_SETSELECTION\">SCI_SETSELECTION(position caret, position anchor)</b><br />\r\n     Set a single selection from <code class=\"parameter\">anchor</code> to <code class=\"parameter\">caret</code> as the only selection.</p>\r\n\r\n    <p>\r\n    <b id=\"SCI_ADDSELECTION\">SCI_ADDSELECTION(position caret, position anchor)</b><br />\r\n     Add a new selection from <code class=\"parameter\">anchor</code> to <code class=\"parameter\">caret</code> as the main selection retaining all other\r\n     selections as additional selections.\r\n     Since there is always at least one selection, to set a list of selections, the first selection should be\r\n     added with <code>SCI_SETSELECTION</code> and later selections added with <code>SCI_ADDSELECTION</code></p>\r\n\r\n    <p>\r\n    <b id=\"SCI_SELECTIONFROMPOINT\">SCI_SELECTIONFROMPOINT(int x, int y) &rarr; int</b><br />\r\n     Return the index of the selection at the point. If there is no selection at the point, return -1.\r\n     This can be used to drop a selection or make it the main selection.</p>\r\n\r\n    <p>\r\n    <b id=\"SCI_DROPSELECTIONN\">SCI_DROPSELECTIONN(int selection)</b><br />\r\n     If there are multiple selections, remove the indicated selection.\r\n     If this was the main selection then make the previous selection the main and if it was the first then the last selection becomes main.\r\n     If there is only one selection, or there is no selection <code class=\"parameter\">selection</code>, then there is no effect.</p>\r\n\r\n    <p>\r\n    <b id=\"SCI_SETMAINSELECTION\">SCI_SETMAINSELECTION(int selection)</b><br />\r\n    <b id=\"SCI_GETMAINSELECTION\">SCI_GETMAINSELECTION &rarr; int</b><br />\r\n     One of the selections is the main selection which is used to determine what range of text is automatically visible.\r\n     The main selection may be displayed in different colours or with a differently styled caret.\r\n     Only an already existing selection can be made main.</p>\r\n\r\n    <p>\r\n     <b id=\"SCI_SETSELECTIONNCARET\">SCI_SETSELECTIONNCARET(int selection, position caret)</b><br />\r\n     <b id=\"SCI_GETSELECTIONNCARET\">SCI_GETSELECTIONNCARET(int selection) &rarr; position</b><br />\r\n     <b id=\"SCI_SETSELECTIONNCARETVIRTUALSPACE\">SCI_SETSELECTIONNCARETVIRTUALSPACE(int selection, position space)</b><br />\r\n     <b id=\"SCI_GETSELECTIONNCARETVIRTUALSPACE\">SCI_GETSELECTIONNCARETVIRTUALSPACE(int selection) &rarr; position</b><br />\r\n     <b id=\"SCI_SETSELECTIONNANCHOR\">SCI_SETSELECTIONNANCHOR(int selection, position anchor)</b><br />\r\n     <b id=\"SCI_GETSELECTIONNANCHOR\">SCI_GETSELECTIONNANCHOR(int selection) &rarr; position</b><br />\r\n     <b id=\"SCI_SETSELECTIONNANCHORVIRTUALSPACE\">SCI_SETSELECTIONNANCHORVIRTUALSPACE(int selection, position space)</b><br />\r\n     <b id=\"SCI_GETSELECTIONNANCHORVIRTUALSPACE\">SCI_GETSELECTIONNANCHORVIRTUALSPACE(int selection) &rarr; position</b><br />\r\n     Set or query the position and amount of virtual space for the caret and anchor of each already existing selection.</p>\r\n\r\n    <p>\r\n     <b id=\"SCI_SETSELECTIONNSTART\">SCI_SETSELECTIONNSTART(int selection, position anchor)</b><br />\r\n     <b id=\"SCI_GETSELECTIONNSTART\">SCI_GETSELECTIONNSTART(int selection) &rarr; position</b><br />\r\n     <b id=\"SCI_GETSELECTIONNSTARTVIRTUALSPACE\">SCI_GETSELECTIONNSTARTVIRTUALSPACE(int selection) &rarr; position</b><br />\r\n     <b id=\"SCI_SETSELECTIONNEND\">SCI_SETSELECTIONNEND(int selection, position caret)</b><br />\r\n     <b id=\"SCI_GETSELECTIONNEND\">SCI_GETSELECTIONNEND(int selection) &rarr; position</b><br />\r\n     <b id=\"SCI_GETSELECTIONNENDVIRTUALSPACE\">SCI_GETSELECTIONNENDVIRTUALSPACE(int selection) &rarr; position</b><br />\r\n     Set or query the start and end position of each already existing selection.\r\n     Query the virtual space at start and end of each selection.\r\n     Mostly of use to query each range for its text. The <code class=\"parameter\">selection</code> parameter is zero-based. </p>\r\n\r\n    <p>\r\n     <b id=\"SCI_SETRECTANGULARSELECTIONCARET\">SCI_SETRECTANGULARSELECTIONCARET(position caret)</b><br />\r\n     <b id=\"SCI_GETRECTANGULARSELECTIONCARET\">SCI_GETRECTANGULARSELECTIONCARET &rarr; position</b><br />\r\n     <b id=\"SCI_SETRECTANGULARSELECTIONCARETVIRTUALSPACE\">SCI_SETRECTANGULARSELECTIONCARETVIRTUALSPACE(position space)</b><br />\r\n     <b id=\"SCI_GETRECTANGULARSELECTIONCARETVIRTUALSPACE\">SCI_GETRECTANGULARSELECTIONCARETVIRTUALSPACE &rarr; position</b><br />\r\n     <b id=\"SCI_SETRECTANGULARSELECTIONANCHOR\">SCI_SETRECTANGULARSELECTIONANCHOR(position anchor)</b><br />\r\n     <b id=\"SCI_GETRECTANGULARSELECTIONANCHOR\">SCI_GETRECTANGULARSELECTIONANCHOR &rarr; position</b><br />\r\n     <b id=\"SCI_SETRECTANGULARSELECTIONANCHORVIRTUALSPACE\">SCI_SETRECTANGULARSELECTIONANCHORVIRTUALSPACE(position space)</b><br />\r\n     <b id=\"SCI_GETRECTANGULARSELECTIONANCHORVIRTUALSPACE\">SCI_GETRECTANGULARSELECTIONANCHORVIRTUALSPACE &rarr; position</b><br />\r\n     Set or query the position and amount of virtual space for the caret and anchor of the rectangular selection.\r\n     After setting the rectangular selection, this is broken down into multiple selections, one for each line.</p>\r\n\r\n    <p>\r\n     <b id=\"SC_ELEMENT_SELECTION_ADDITIONAL_TEXT\">SC_ELEMENT_SELECTION_ADDITIONAL_TEXT : colouralpha</b><br />\r\n     <b id=\"SC_ELEMENT_SELECTION_ADDITIONAL_BACK\">SC_ELEMENT_SELECTION_ADDITIONAL_BACK : colouralpha</b><br />\r\n     <b id=\"SCI_SETADDITIONALSELALPHA\">SCI_SETADDITIONALSELALPHA(<a class=\"jump\" href=\"#alpha\">alpha</a> alpha)</b><br />\r\n     <b id=\"SCI_GETADDITIONALSELALPHA\">SCI_GETADDITIONALSELALPHA &rarr; int</b><br />\r\n     <b id=\"SCI_SETADDITIONALSELFORE\">SCI_SETADDITIONALSELFORE(<a class=\"jump\" href=\"#colour\">colour</a> fore)</b><br />\r\n     <b id=\"SCI_SETADDITIONALSELBACK\">SCI_SETADDITIONALSELBACK(<a class=\"jump\" href=\"#colour\">colour</a> back)</b><br />\r\n     Modify the appearance of additional selections so that they can be differentiated from the main selection which has its appearance set with\r\n     <a class=\"element\" href=\"#SC_ELEMENT_SELECTION_TEXT\"><code>SC_ELEMENT_SELECTION_TEXT</code></a>,\r\n     <a class=\"element\" href=\"#SC_ELEMENT_SELECTION_BACK\"><code>SC_ELEMENT_SELECTION_BACK</code></a>,\r\n     <a class=\"message\" href=\"#SCI_SETSELALPHA\"><code>SCI_SETSELALPHA</code></a>,\r\n     <a class=\"message\" href=\"#SCI_GETSELALPHA\"><code>SCI_GETSELALPHA</code></a>,\r\n     <a class=\"message\" href=\"#SCI_SETSELFORE\"><code>SCI_SETSELFORE</code></a>, and\r\n     <a class=\"message\" href=\"#SCI_SETSELBACK\"><code>SCI_SETSELBACK</code></a>.\r\n     The element APIs are preferred and the following messages discouraged.\r\n     The additional selection background is drawn on the layer defined for all selection backgrounds by\r\n     <a class=\"message\" href=\"#SCI_SETSELECTIONLAYER\"><code>SCI_SETSELECTIONLAYER</code></a>.\r\n     <code>SCI_SETADDITIONALSELFORE</code> and\r\n     <code>SCI_SETADDITIONALSELBACK</code> calls have no\r\n     effect until <a class=\"message\" href=\"#SCI_SETSELFORE\"><code>SCI_SETSELFORE</code></a>\r\n     and <a class=\"message\" href=\"#SCI_SETSELBACK\"><code>SCI_SETSELBACK</code></a> are\r\n     called with <code class=\"parameter\">useSetting</code> value set to true. Subsequent calls to\r\n     <a class=\"message\" href=\"#SCI_SETSELFORE\"><code>SCI_SETSELFORE</code></a>,\r\n     and <a class=\"message\" href=\"#SCI_SETSELBACK\"><code>SCI_SETSELBACK</code></a> will\r\n     overwrite the values set by <code>SCI_SETADDITIONALSEL*</code> functions.</p>\r\n\r\n    <p>\r\n     <b id=\"SC_ELEMENT_CARET_ADDITIONAL\">SC_ELEMENT_CARET_ADDITIONAL : colouralpha</b><br />\r\n     <b id=\"SCI_SETADDITIONALCARETFORE\">SCI_SETADDITIONALCARETFORE(<a class=\"jump\" href=\"#colour\">colour</a> fore)</b><br />\r\n     <b id=\"SCI_GETADDITIONALCARETFORE\">SCI_GETADDITIONALCARETFORE &rarr; colour</b><br />\r\n     <b id=\"SCI_SETADDITIONALCARETSBLINK\">SCI_SETADDITIONALCARETSBLINK(bool additionalCaretsBlink)</b><br />\r\n     <b id=\"SCI_GETADDITIONALCARETSBLINK\">SCI_GETADDITIONALCARETSBLINK &rarr; bool</b><br />\r\n     Modify the appearance of additional carets so that they can be differentiated from the main caret which has its appearance set with\r\n     <a class=\"element\" href=\"#SC_ELEMENT_CARET\"><code>SC_ELEMENT_CARET</code></a>,\r\n     <a class=\"message\" href=\"#SCI_SETCARETFORE\"><code>SCI_SETCARETFORE</code></a>,\r\n     <a class=\"message\" href=\"#SCI_GETCARETFORE\"><code>SCI_GETCARETFORE</code></a>,\r\n     <a class=\"message\" href=\"#SCI_SETCARETPERIOD\"><code>SCI_SETCARETPERIOD</code></a>, and\r\n     <a class=\"message\" href=\"#SCI_GETCARETPERIOD\"><code>SCI_GETCARETPERIOD</code></a>.</p>\r\n\r\n    <p>\r\n     <b id=\"SCI_SETADDITIONALCARETSVISIBLE\">SCI_SETADDITIONALCARETSVISIBLE(bool additionalCaretsVisible)</b><br />\r\n     <b id=\"SCI_GETADDITIONALCARETSVISIBLE\">SCI_GETADDITIONALCARETSVISIBLE &rarr; bool</b><br />\r\n     Determine whether to show additional carets (defaults to <code>true</code>).</p>\r\n\r\n    <p>\r\n     <b id=\"SCI_SWAPMAINANCHORCARET\">SCI_SWAPMAINANCHORCARET</b><br />\r\n     <b id=\"SCI_ROTATESELECTION\">SCI_ROTATESELECTION</b><br />\r\n     <b id=\"SCI_MULTIPLESELECTADDNEXT\">SCI_MULTIPLESELECTADDNEXT</b><br />\r\n     <b id=\"SCI_MULTIPLESELECTADDEACH\">SCI_MULTIPLESELECTADDEACH</b><br />\r\n     These commands may be assigned to keys to make it possible to manipulate multiple selections.\r\n     <code>SCI_SWAPMAINANCHORCARET</code> moves the caret to the opposite end of the main selection.\r\n     <code>SCI_ROTATESELECTION</code> makes the next selection be the main selection.<br />\r\n     <code>SCI_MULTIPLESELECTADDNEXT</code> adds the next occurrence of the main selection\r\n     within the target to the set of selections as main. If the current selection is empty then select word around caret.\r\n      The current <a class=\"jump\" href=\"#searchFlags\"><code>searchFlags</code></a>\r\n      are used so the application may choose case sensitivity and word search options.<br />\r\n     <code>SCI_MULTIPLESELECTADDEACH</code> is similar to\r\n     <code>SCI_MULTIPLESELECTADDNEXT</code> but adds multiple occurrences instead of just one.\r\n     </p>\r\n\r\n    <h2 id=\"Overtype\">Overtype</h2>\r\n\r\n    <code><a class=\"message\" href=\"#SCI_SETOVERTYPE\">SCI_SETOVERTYPE(bool overType)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETOVERTYPE\">SCI_GETOVERTYPE &rarr; bool</a><br />\r\n    </code>\r\n\r\n    <p><b id=\"SCI_SETOVERTYPE\">SCI_SETOVERTYPE(bool overType)</b><br />\r\n     <b id=\"SCI_GETOVERTYPE\">SCI_GETOVERTYPE &rarr; bool</b><br />\r\n     When overtype is enabled, each typed character replaces the character to the right of the text\r\n    caret. When overtype is disabled, characters are inserted at the caret.\r\n    <code>SCI_GETOVERTYPE</code> returns <code>true</code> (1) if overtyping is active, otherwise\r\n    <code>false</code> (0) will be returned. Use <code>SCI_SETOVERTYPE</code> to set the overtype\r\n    mode.</p>\r\n\r\n    <h2 id=\"Searching\">Searching</h2>\r\n    <p>\r\n    There are methods to search for text and for regular expressions.\r\n    Most applications should use\r\n    <a class=\"seealso\" href=\"#SCI_SEARCHINTARGET\">SCI_SEARCHINTARGET</a>\r\n    as the basis for their search implementations.\r\n    Other calls augment this or were implemented before <code>SCI_SEARCHINTARGET</code>.\r\n    </p>\r\n    <p>\r\n    The base regular expression support\r\n    is limited and should only be used for simple cases and initial development.\r\n    The C++ runtime &lt;regex&gt; library may be used by setting the <code>SCFIND_CXX11REGEX</code> search flag.\r\n    The C++11 &lt;regex&gt; support may be disabled by\r\n    compiling Scintilla with <code>NO_CXX11_REGEX</code> defined.\r\n    A different regular expression\r\n    library can be <a class=\"jump\" href=\"#AlternativeRegEx\">integrated into Scintilla</a>\r\n    or can be called from the container using direct access to the buffer contents through\r\n    <a class=\"seealso\" href=\"#SCI_GETCHARACTERPOINTER\">SCI_GETCHARACTERPOINTER</a>.\r\n    </p>\r\n\r\n    <h3 id=\"SearchAndReplaceUsingTheTarget\">Search and replace using the target</h3>\r\n\r\n    <p>Searching can be performed within the target range with <code>SCI_SEARCHINTARGET</code>,\r\n    which uses a counted string to allow searching for null characters. It returns the\r\n    position of the start of the matching text range or -1 for failure, in which case the target is not moved. The flags used by\r\n    <code>SCI_SEARCHINTARGET</code> such as <code>SCFIND_MATCHCASE</code>,\r\n    <code>SCFIND_WHOLEWORD</code>, <code>SCFIND_WORDSTART</code>, and <code>SCFIND_REGEXP</code>\r\n    can be set with <code>SCI_SETSEARCHFLAGS</code>.</p>\r\n    <code>\r\n     <a class=\"message\" href=\"#SCI_SETTARGETSTART\">SCI_SETTARGETSTART(position start)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETTARGETSTART\">SCI_GETTARGETSTART &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETTARGETSTARTVIRTUALSPACE\">SCI_SETTARGETSTARTVIRTUALSPACE(position space)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETTARGETSTARTVIRTUALSPACE\">SCI_GETTARGETSTARTVIRTUALSPACE &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETTARGETEND\">SCI_SETTARGETEND(position end)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETTARGETEND\">SCI_GETTARGETEND &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETTARGETENDVIRTUALSPACE\">SCI_SETTARGETENDVIRTUALSPACE(position space)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETTARGETENDVIRTUALSPACE\">SCI_GETTARGETENDVIRTUALSPACE &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETTARGETRANGE\">SCI_SETTARGETRANGE(position start, position end)</a><br />\r\n     <a class=\"message\" href=\"#SCI_TARGETFROMSELECTION\">SCI_TARGETFROMSELECTION</a><br />\r\n     <a class=\"message\" href=\"#SCI_TARGETWHOLEDOCUMENT\">SCI_TARGETWHOLEDOCUMENT</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETSEARCHFLAGS\">SCI_SETSEARCHFLAGS(int searchFlags)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETSEARCHFLAGS\">SCI_GETSEARCHFLAGS &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SEARCHINTARGET\">SCI_SEARCHINTARGET(position length, const char *text) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETTARGETTEXT\">SCI_GETTARGETTEXT(&lt;unused&gt;, char *text) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_REPLACETARGET\">SCI_REPLACETARGET(position length, const char *text) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_REPLACETARGETMINIMAL\">SCI_REPLACETARGETMINIMAL(position length, const char *text) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_REPLACETARGETRE\">SCI_REPLACETARGETRE(position length, const char *text) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETTAG\">SCI_GETTAG(int tagNumber, char *tagValue) &rarr; int</a><br />\r\n    </code>\r\n\r\n    <p><b id=\"SCI_SETTARGETSTART\">SCI_SETTARGETSTART(position start)</b><br />\r\n     <b id=\"SCI_GETTARGETSTART\">SCI_GETTARGETSTART &rarr; position</b><br />\r\n     <b id=\"SCI_SETTARGETSTARTVIRTUALSPACE\">SCI_SETTARGETSTARTVIRTUALSPACE(position space)</b><br />\r\n     <b id=\"SCI_GETTARGETSTARTVIRTUALSPACE\">SCI_GETTARGETSTARTVIRTUALSPACE &rarr; position</b><br />\r\n     <b id=\"SCI_SETTARGETEND\">SCI_SETTARGETEND(position end)</b><br />\r\n     <b id=\"SCI_GETTARGETEND\">SCI_GETTARGETEND &rarr; position</b><br />\r\n     <b id=\"SCI_SETTARGETENDVIRTUALSPACE\">SCI_SETTARGETENDVIRTUALSPACE(position space)</b><br />\r\n     <b id=\"SCI_GETTARGETENDVIRTUALSPACE\">SCI_GETTARGETENDVIRTUALSPACE &rarr; position</b><br />\r\n     <b id=\"SCI_SETTARGETRANGE\">SCI_SETTARGETRANGE(position start, position end)</b><br />\r\n     These functions set and return the start and end of the target. When searching\r\n     you can set start greater than end to find the last matching text in the\r\n    target rather than the first matching text.\r\n    Setting a target position with <code>SCI_SETTARGETSTART</code>, <code>SCI_SETTARGETEND</code>, or <code>SCI_SETTARGETRANGE</code>\r\n    sets the virtual space to 0.\r\n    The target is also set by a successful\r\n    <code>SCI_SEARCHINTARGET</code>.</p>\r\n    <p>The virtual space of the target range can be set and retrieved with the corresponding <code>...VIRTUALSPACE</code>\r\n    methods. This allows text to be inserted in virtual space more easily.</p>\r\n\r\n     <p><b id=\"SCI_TARGETFROMSELECTION\">SCI_TARGETFROMSELECTION</b><br />\r\n     Set the target start and end to the start and end positions of the selection.</p>\r\n\r\n     <p><b id=\"SCI_TARGETWHOLEDOCUMENT\">SCI_TARGETWHOLEDOCUMENT</b><br />\r\n     Set the target start to the start of the document and target end to the end of the document.</p>\r\n\r\n    <p><b id=\"SCI_SETSEARCHFLAGS\">SCI_SETSEARCHFLAGS(int searchFlags)</b><br />\r\n     <b id=\"SCI_GETSEARCHFLAGS\">SCI_GETSEARCHFLAGS &rarr; int</b><br />\r\n     These get and set the <a class=\"jump\" href=\"#searchFlags\"><code class=\"parameter\">searchFlags</code></a> used by\r\n    <code>SCI_SEARCHINTARGET</code>. There are several option flags including a simple regular\r\n    expression search.</p>\r\n\r\n    <p><b id=\"SCI_SEARCHINTARGET\">SCI_SEARCHINTARGET(position length, const char *text) &rarr; position</b><br />\r\n     This searches for the first occurrence of a text string in the target defined by\r\n    <code>SCI_SETTARGETSTART</code> and <code>SCI_SETTARGETEND</code>. The text string is not zero\r\n    terminated; the size is set by <code class=\"parameter\">length</code>. The search is modified by the search flags\r\n    set by <code>SCI_SETSEARCHFLAGS</code>. If the search succeeds, the target is set to the found\r\n    text and the return value is the position of the start of the matching text. If the search\r\n    fails, the result is -1.</p>\r\n\r\n    <p><b id=\"SCI_GETTARGETTEXT\">SCI_GETTARGETTEXT(&lt;unused&gt;, char *text) &rarr; position</b><br />\r\n     Retrieve the value in the target.</p>\r\n\r\n    <p><b id=\"SCI_REPLACETARGET\">SCI_REPLACETARGET(position length, const char *text) &rarr; position</b><br />\r\n     If <code class=\"parameter\">length</code> is -1, <code class=\"parameter\">text</code> is a zero terminated string, otherwise\r\n    <code class=\"parameter\">length</code> sets the number of character to replace the target with.\r\n    After replacement, the target range refers to the replacement text.\r\n    The return value is the length of the replacement string.<br />\r\n    Note that the recommended way to delete text in the document is to set the target to the text to be removed,\r\n    and to perform a replace target with an empty string.</p>\r\n\r\n    <p><b id=\"SCI_REPLACETARGETMINIMAL\">SCI_REPLACETARGETMINIMAL(position length, const char *text) &rarr; position</b><br />\r\n    This is similar to <a class=\"message\" href=\"#SCI_REPLACETARGET\"><code>SCI_REPLACETARGET</code></a>\r\n    but tries to minimize change history when the current target text shares a common prefix or suffix with the replacement.\r\n    Only the text that is actually different is marked as changed.\r\n    This might be used when automatically reformatting some text\r\n    so that the whole area formatted doesn't show change marks.\r\n     If <code class=\"parameter\">length</code> is -1, <code class=\"parameter\">text</code> is a zero terminated string, otherwise\r\n    <code class=\"parameter\">length</code> sets the number of character to replace the target with.\r\n    After replacement, the target range refers to the replacement text.\r\n    The return value is the length of the replacement string.<br />\r\n    Note that the recommended way to delete text in the document is to set the target to the text to be removed,\r\n    and to perform a replace target with an empty string.</p>\r\n\r\n    <p><b id=\"SCI_REPLACETARGETRE\">SCI_REPLACETARGETRE(position length, const char *text) &rarr; position</b><br />\r\n     This replaces the target using regular expressions. If <code class=\"parameter\">length</code> is -1,\r\n    <code class=\"parameter\">text</code> is a zero terminated string, otherwise <code class=\"parameter\">length</code> is the number of\r\n    characters to use. The replacement string is formed from the text string with any sequences of\r\n    <code>\\1</code> through <code>\\9</code> replaced by tagged matches from the most recent regular\r\n    expression search. <code>\\0</code> is replaced with all the matched text from the most recent search.\r\n    After replacement, the target range refers to the replacement text.\r\n    The return value is the length of the replacement string.</p>\r\n\r\n    <p><b id=\"SCI_GETTAG\">SCI_GETTAG(int tagNumber, char *tagValue NUL-terminated) &rarr; int</b><br />\r\n     Discover what text was matched by tagged expressions in a regular expression search.\r\n     This is useful if the application wants to interpret the replacement string itself.</p>\r\n\r\n    <p>See also: <a class=\"message\" href=\"#SCI_FINDTEXT\"><code>SCI_FINDTEXT</code></a></p>\r\n\r\n    <p><b id=\"searchFlags\"><code class=\"parameter\">searchFlags</code></b><br />\r\n     Several of the search routines use flag options, which include a simple regular expression\r\n    search. Combine the flag options by adding them:</p>\r\n\r\n    <table class=\"standard\" summary=\"Search flags\">\r\n      <tbody>\r\n        <tr>\r\n          <td><code>SCFIND_NONE</code></td>\r\n\r\n          <td>Default setting is case-insensitive literal match.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>SCFIND_MATCHCASE</code></td>\r\n\r\n          <td>A match only occurs with text that matches the case of the search string.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>SCFIND_WHOLEWORD</code></td>\r\n\r\n          <td>A match only occurs if the characters before and after are not word characters as defined\r\n\t  by <a class=\"message\" href=\"#SCI_SETWORDCHARS\"><code>SCI_SETWORDCHARS</code></a>.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>SCFIND_WORDSTART</code></td>\r\n\r\n          <td>A match only occurs if the character before is not a word character as defined\r\n\t  by <a class=\"message\" href=\"#SCI_SETWORDCHARS\"><code>SCI_SETWORDCHARS</code></a>.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>SCFIND_REGEXP</code></td>\r\n\r\n          <td>The search string should be interpreted as a regular expression.\r\n            Uses Scintilla's base implementation unless combined with <code>SCFIND_CXX11REGEX</code>.</td>\r\n        </tr>\r\n        <tr>\r\n          <td><code>SCFIND_POSIX</code></td>\r\n\r\n          <td>Treat regular expression in a more POSIX compatible manner\r\n            by interpreting bare ( and ) for tagged sections rather than \\( and \\).\r\n            Has no effect when <code>SCFIND_CXX11REGEX</code> is set.</td>\r\n        </tr>\r\n        <tr>\r\n          <td><code>SCFIND_CXX11REGEX</code></td>\r\n\r\n          <td>This flag may be set to use C++11 &lt;regex&gt; instead of Scintilla's basic regular expressions.\r\n            If the regular expression is invalid then -1 is returned and status is set to\r\n            <code>SC_STATUS_WARN_REGEX</code>.\r\n            The ECMAScript flag is set on the regex object and UTF-8 documents will exhibit Unicode-compliant\r\n            behaviour. For MSVC, where wchar_t is 16-bits, the regular expression \"..\" will match a single\r\n            astral-plane character. There may be other differences between compilers.\r\n            Must also have <code>SCFIND_REGEXP</code> set.</td>\r\n        </tr>\r\n      </tbody>\r\n    </table>\r\n\r\n    <p>In a regular expression, using Scintilla's base implementation,\r\n    special characters interpreted are:</p>\r\n\r\n    <table class=\"standard\" summary=\"Regular expression synopsis\">\r\n      <tbody>\r\n        <tr>\r\n          <td><code>.</code></td>\r\n\r\n          <td>Matches any character</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>\\(</code></td>\r\n\r\n          <td>This marks the start of a region for tagging a match.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>\\)</code></td>\r\n\r\n          <td>This marks the end of a tagged region.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>\\n</code></td>\r\n\r\n          <td>Where <code>n</code> is 1 through 9 refers to the first through ninth tagged region\r\n          when replacing. For example, if the search string was <code>Fred\\([1-9]\\)XXX</code> and\r\n          the replace string was <code>Sam\\1YYY</code>, when applied to <code>Fred2XXX</code> this\r\n          would generate <code>Sam2YYY</code>.\r\n\t  <code>\\0</code> refers to all of the matching text.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>\\&lt;</code></td>\r\n\r\n          <td>This matches the start of a word using Scintilla's definitions of words.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>\\&gt;</code></td>\r\n\r\n          <td>This matches the end of a word using Scintilla's definition of words.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>\\x</code></td>\r\n\r\n          <td>This allows you to use a character x that would otherwise have a special meaning. For\r\n          example, \\[ would be interpreted as [ and not as the start of a character set.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>[...]</code></td>\r\n\r\n          <td>This indicates a set of characters, for example, [abc] means any of the characters a,\r\n          b or c. You can also use ranges, for example [a-z] for any lower case character.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>[^...]</code></td>\r\n\r\n          <td>The complement of the characters in the set. For example, [^A-Za-z] means any\r\n          character except an alphabetic character.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>^</code></td>\r\n\r\n          <td>This matches the start of a line (unless used inside a set, see above).</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>$</code></td>\r\n\r\n          <td>This matches the end of a line.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>*</code></td>\r\n\r\n          <td>This matches 0 or more times. For example, <code>Sa*m</code> matches <code>Sm</code>,\r\n          <code>Sam</code>, <code>Saam</code>, <code>Saaam</code> and so on.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>+</code></td>\r\n\r\n          <td>This matches 1 or more times. For example, <code>Sa+m</code> matches\r\n          <code>Sam</code>, <code>Saam</code>, <code>Saaam</code> and so on.</td>\r\n        </tr>\r\n      </tbody>\r\n    </table>\r\n\r\n    <p>Regular expressions will only match ranges within a single line, never matching over multiple lines.</p>\r\n\r\n    <p>When using <code>SCFIND_CXX11REGEX</code> more features are available,\r\n    generally similar to regular expression support in JavaScript.\r\n    See the documentation of your C++ runtime for details on what is supported.</p>\r\n\r\n    <code><a class=\"message\" href=\"#SCI_FINDTEXT\">SCI_FINDTEXT(int searchFlags, Sci_TextToFind *ft) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_FINDTEXTFULL\">SCI_FINDTEXTFULL(int searchFlags, Sci_TextToFindFull *ft) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_SEARCHANCHOR\">SCI_SEARCHANCHOR</a><br />\r\n     <a class=\"message\" href=\"#SCI_SEARCHNEXT\">SCI_SEARCHNEXT(int searchFlags, const char *text) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_SEARCHPREV\">SCI_SEARCHPREV(int searchFlags, const char *text) &rarr; position</a><br />\r\n    </code>\r\n\r\n    <p><b id=\"SCI_FINDTEXT\">SCI_FINDTEXT(int searchFlags, <a class=\"jump\" href=\"#Sci_TextToFind\">Sci_TextToFind</a> *ft) &rarr; position</b><br />\r\n     <b id=\"SCI_FINDTEXTFULL\">SCI_FINDTEXTFULL(int searchFlags, <a class=\"jump\" href=\"#Sci_TextToFindFull\">Sci_TextToFindFull</a> *ft) &rarr; position</b><br />\r\n     These messages search for text in the document. They do not use or move the current selection.\r\n    The <a class=\"jump\" href=\"#searchFlags\"><code class=\"parameter\">searchFlags</code></a> argument controls the\r\n    search type, which includes regular expression searches.</p>\r\n\r\n    <p>You can\r\n    search backwards to find the previous occurrence of a search string by setting the end of the\r\n    search range before the start.</p>\r\n\r\n    <p>The <code>Sci_TextToFind</code> and <code>Sci_TextToFindFull</code> structures are defined in <code>Scintilla.h</code>; set\r\n    <code>chrg.cpMin</code> and <code>chrg.cpMax</code> with the range of positions in the document\r\n    to search. You can search backwards by\r\n    setting <code>chrg.cpMax</code> less than <code>chrg.cpMin</code>.\r\n    Set the <code>lpstrText</code> member of <code>Sci_TextToFind</code> to point at a zero terminated\r\n    text string holding the search pattern. If your language makes the use of <code>Sci_TextToFind</code>\r\n    difficult, you should consider using <code>SCI_SEARCHINTARGET</code> instead.\r\n    On 64-bit Win32, <code>SCI_FINDTEXT</code> is limited to the first 2G of text and <code>SCI_FINDTEXTFULL</code> removes this limitation.</p>\r\n\r\n    <p>The return value is -1 if the search fails or the position of the start of the found text if\r\n    it succeeds. The <code>chrgText.cpMin</code> and <code>chrgText.cpMax</code> members of\r\n    <code>Sci_TextToFind</code> are filled in with the start and end positions of the found text.</p>\r\n\r\n    <p>See also: <code><a class=\"message\"\r\n    href=\"#SCI_SEARCHINTARGET\">SCI_SEARCHINTARGET</a></code></p>\r\n\r\n    <p><b id=\"Sci_TextToFind\">Sci_TextToFind</b><br />\r\n     This structure is defined to have exactly the same shape as the Win32 structure\r\n    <code>FINDTEXTEX</code> for old code that treated Scintilla as a RichEdit control.</p>\r\n<pre>\r\nstruct Sci_TextToFind {\r\n    struct <a class=\"jump\" href=\"#Sci_CharacterRange\">Sci_CharacterRange</a> chrg;     // range to search\r\n    const char *lpstrText;                // the search pattern (zero terminated)\r\n    struct Sci_CharacterRange chrgText; // returned as position of matching text\r\n};\r\n</pre>\r\n\r\n    <p><b id=\"Sci_TextToFindFull\">Sci_TextToFindFull</b><br />\r\n     This structure extends <code>Sci_TextToFind</code> to support huge documents on Win32.</p>\r\n<pre>\r\nstruct Sci_TextToFindFull {\r\n    struct <a class=\"jump\" href=\"#Sci_CharacterRangeFull\">Sci_CharacterRangeFull</a> chrg;     // range to search\r\n    const char *lpstrText;                // the search pattern (zero terminated)\r\n    struct Sci_CharacterRangeFull chrgText; // returned as position of matching text\r\n};\r\n</pre>\r\n\r\n    <p><b id=\"SCI_SEARCHANCHOR\">SCI_SEARCHANCHOR</b><br />\r\n     <b id=\"SCI_SEARCHNEXT\">SCI_SEARCHNEXT(int searchFlags, const char *text) &rarr; position</b><br />\r\n     <b id=\"SCI_SEARCHPREV\">SCI_SEARCHPREV(int searchFlags, const char *text) &rarr; position</b><br />\r\n     These messages provide relocatable search support. This allows multiple incremental\r\n    interactive searches to be macro recorded while still setting the selection to found text so\r\n    the find/select operation is self-contained. These three messages send <a class=\"message\"\r\n    href=\"#SCN_MACRORECORD\"><code>SCN_MACRORECORD</code></a> <a class=\"jump\"\r\n    href=\"#Notifications\">notifications</a> if macro recording is enabled.</p>\r\n\r\n    <p><code>SCI_SEARCHANCHOR</code> sets the search start point used by\r\n    <code>SCI_SEARCHNEXT</code> and <code>SCI_SEARCHPREV</code> to the start of the current\r\n    selection, that is, the end of the selection that is nearer to the start of the document. You\r\n    should always call this before calling either of <code>SCI_SEARCHNEXT</code> or\r\n    <code>SCI_SEARCHPREV</code>.</p>\r\n\r\n    <p><code>SCI_SEARCHNEXT</code> and <code>SCI_SEARCHPREV</code> search for the next and previous\r\n    occurrence of the zero terminated search string pointed at by text. The search is modified by\r\n    the <a class=\"jump\" href=\"#searchFlags\"><code class=\"parameter\">searchFlags</code></a>. </p>\r\n\r\n    <p>The return value is -1 if nothing is found, otherwise the return value is the start position\r\n    of the matching text. The selection is updated to show the matched text, but is not scrolled\r\n    into view.</p>\r\n\r\n    <p>See also: <a class=\"message\" href=\"#SCI_SEARCHINTARGET\"><code>SCI_SEARCHINTARGET</code></a>,\r\n    <a class=\"message\" href=\"#SCI_FINDTEXT\"><code>SCI_FINDTEXT</code></a></p>\r\n\r\n    <h2 id=\"CutCopyAndPaste\">Cut, copy and paste</h2>\r\n\r\n    <code><a class=\"message\" href=\"#SCI_CUT\">SCI_CUT</a><br />\r\n     <a class=\"message\" href=\"#SCI_COPY\">SCI_COPY</a><br />\r\n     <a class=\"message\" href=\"#SCI_PASTE\">SCI_PASTE</a><br />\r\n     <a class=\"message\" href=\"#SCI_CLEAR\">SCI_CLEAR</a><br />\r\n     <a class=\"message\" href=\"#SCI_CANPASTE\">SCI_CANPASTE &rarr; bool</a><br />\r\n     <a class=\"message\" href=\"#SCI_COPYRANGE\">SCI_COPYRANGE(position start, position end)</a><br />\r\n     <a class=\"message\" href=\"#SCI_COPYTEXT\">SCI_COPYTEXT(position length, const char *text)</a><br />\r\n     <a class=\"message\" href=\"#SCI_COPYALLOWLINE\">SCI_COPYALLOWLINE</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETPASTECONVERTENDINGS\">SCI_SETPASTECONVERTENDINGS(bool convert)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETPASTECONVERTENDINGS\">SCI_GETPASTECONVERTENDINGS &rarr; bool</a><br />\r\n     <a class=\"message\" href=\"#SCI_REPLACERECTANGULAR\">SCI_REPLACERECTANGULAR(position length, const char *text)</a><br />\r\n    </code>\r\n\r\n    <p><b id=\"SCI_CUT\">SCI_CUT</b><br />\r\n     <b id=\"SCI_COPY\">SCI_COPY</b><br />\r\n     <b id=\"SCI_PASTE\">SCI_PASTE</b><br />\r\n     <b id=\"SCI_CLEAR\">SCI_CLEAR</b><br />\r\n     <b id=\"SCI_CANPASTE\">SCI_CANPASTE &rarr; bool</b><br />\r\n     <b id=\"SCI_COPYALLOWLINE\">SCI_COPYALLOWLINE</b><br />\r\n     These commands perform the standard tasks of cutting and copying data to the clipboard,\r\n    pasting from the clipboard into the document, and clearing the document.\r\n    <code>SCI_CANPASTE</code> returns non-zero if the document isn't read-only and if the selection\r\n    doesn't contain protected text. If you need a \"can copy\" or \"can cut\", use\r\n    <code>SCI_GETSELECTIONEMPTY()</code>, which will be zero if there are any non-empty\r\n    selection ranges implying that a copy or cut to the clipboard should work.</p>\r\n\r\n    <p>GTK does not really support <code>SCI_CANPASTE</code> and always returns <code>true</code>\r\n    unless the document is read-only.</p>\r\n\r\n    <p>On X, the clipboard is asynchronous and may require several messages between\r\n    the destination and source applications. Data from SCI_PASTE will not arrive in the\r\n    document immediately.</p>\r\n\r\n    <p><code>SCI_COPYALLOWLINE</code> works the same as SCI_COPY except that if the\r\n    selection is empty then the current line is copied. On Windows, an extra \"MSDEVLineSelect\" marker\r\n    is added to the clipboard which is then used in <code>SCI_PASTE</code> to paste\r\n    the whole line before the current line.</p>\r\n\r\n     <b id=\"SCI_COPYRANGE\">SCI_COPYRANGE(position start, position end)</b><br />\r\n     <b id=\"SCI_COPYTEXT\">SCI_COPYTEXT(position length, const char *text)</b><br />\r\n    <p><code>SCI_COPYRANGE</code> copies a range of text from the document to\r\n    the system clipboard and <code>SCI_COPYTEXT</code> copies a supplied piece of\r\n    text to the system clipboard.</p>\r\n\r\n    <p><b id=\"SCI_SETPASTECONVERTENDINGS\">SCI_SETPASTECONVERTENDINGS(bool convert)</b><br />\r\n     <b id=\"SCI_GETPASTECONVERTENDINGS\">SCI_GETPASTECONVERTENDINGS &rarr; bool</b><br />\r\n     If this property is set then when text is pasted any line ends are converted to match the document's\r\n     end of line mode as set with\r\n     <a class=\"seealso\" href=\"#SCI_SETEOLMODE\">SCI_SETEOLMODE</a>.\r\n     Defaults to true.</p>\r\n\r\n    <p><b id=\"SCI_REPLACERECTANGULAR\">SCI_REPLACERECTANGULAR(position length, const char *text)</b><br/>\r\n      Replaces the selected text or empty selection with the given text.\r\n      The insertion is performed similarly to rectangular pastes: new lines in the given text are interpreted as\r\n      moving to the next line without inserting new lines unless at the end of the document.</p>\r\n\r\n    <h2 id=\"UndoAndRedo\">Undo and Redo</h2>\r\n\r\n    <p>Scintilla has multiple level undo and redo. It will continue to collect undoable actions\r\n    until memory runs out. Scintilla saves actions that change the document. Scintilla does not\r\n    save caret and selection movements, view scrolling and the like. Sequences of typing or\r\n    deleting are compressed into single transactions to make it easier to undo and redo at a sensible\r\n    level of detail. Sequences of actions can be combined into transactions that are undone as a unit.\r\n    These sequences occur between <code>SCI_BEGINUNDOACTION</code> and\r\n    <code>SCI_ENDUNDOACTION</code> messages. These transactions can be nested and only the top-level\r\n    sequences are undone as units.</p>\r\n    <code><a class=\"message\" href=\"#SCI_UNDO\">SCI_UNDO</a><br />\r\n     <a class=\"message\" href=\"#SCI_CANUNDO\">SCI_CANUNDO &rarr; bool</a><br />\r\n     <a class=\"message\" href=\"#SCI_EMPTYUNDOBUFFER\">SCI_EMPTYUNDOBUFFER</a><br />\r\n     <a class=\"message\" href=\"#SCI_REDO\">SCI_REDO</a><br />\r\n     <a class=\"message\" href=\"#SCI_CANREDO\">SCI_CANREDO &rarr; bool</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETUNDOCOLLECTION\">SCI_SETUNDOCOLLECTION(bool collectUndo)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETUNDOCOLLECTION\">SCI_GETUNDOCOLLECTION &rarr; bool</a><br />\r\n     <a class=\"message\" href=\"#SCI_BEGINUNDOACTION\">SCI_BEGINUNDOACTION</a><br />\r\n     <a class=\"message\" href=\"#SCI_ENDUNDOACTION\">SCI_ENDUNDOACTION</a><br />\r\n     <a class=\"message\" href=\"#SCI_ADDUNDOACTION\">SCI_ADDUNDOACTION(int token, int flags)</a><br />\r\n    </code>\r\n\r\n    <p><b id=\"SCI_UNDO\">SCI_UNDO</b><br />\r\n     <b id=\"SCI_CANUNDO\">SCI_CANUNDO &rarr; bool</b><br />\r\n     <code>SCI_UNDO</code> undoes one action, or if the undo buffer has reached a\r\n    <code>SCI_ENDUNDOACTION</code> point, all the actions back to the corresponding\r\n    <code>SCI_BEGINUNDOACTION</code>.</p>\r\n\r\n    <p><code>SCI_CANUNDO</code> returns 0 if there is nothing to undo, and 1 if there is. You would\r\n    typically use the result of this message to enable/disable the Edit menu Undo command.</p>\r\n\r\n    <p><b id=\"SCI_REDO\">SCI_REDO</b><br />\r\n     <b id=\"SCI_CANREDO\">SCI_CANREDO &rarr; bool</b><br />\r\n     <code>SCI_REDO</code> undoes the effect of the last <code>SCI_UNDO</code> operation.</p>\r\n\r\n    <p><code>SCI_CANREDO</code> returns 0 if there is no action to redo and 1 if there are undo\r\n    actions to redo. You could typically use the result of this message to enable/disable the Edit\r\n    menu Redo command.</p>\r\n\r\n    <p><b id=\"SCI_EMPTYUNDOBUFFER\">SCI_EMPTYUNDOBUFFER</b><br />\r\n     This command tells Scintilla to forget any saved undo or redo history. It also sets the save\r\n    point to the start of the undo buffer, so the document will appear to be unmodified. This does\r\n    not cause the <code><a class=\"message\"\r\n    href=\"#SCN_SAVEPOINTREACHED\">SCN_SAVEPOINTREACHED</a></code> notification to be sent to the\r\n    container.</p>\r\n\r\n    <p>See also: <a class=\"message\" href=\"#SCI_SETSAVEPOINT\"><code>SCI_SETSAVEPOINT</code></a></p>\r\n\r\n    <p><b id=\"SCI_SETUNDOCOLLECTION\">SCI_SETUNDOCOLLECTION(bool collectUndo)</b><br />\r\n     <b id=\"SCI_GETUNDOCOLLECTION\">SCI_GETUNDOCOLLECTION &rarr; bool</b><br />\r\n     You can control whether Scintilla collects undo information with\r\n    <code>SCI_SETUNDOCOLLECTION</code>. Pass in <code>true</code> (1) to collect information and\r\n    <code>false</code> (0) to stop collecting. If you stop collection, you should also use\r\n    <code>SCI_EMPTYUNDOBUFFER</code> to avoid the undo buffer being unsynchronized with the data in\r\n    the buffer.</p>\r\n\r\n    <p>You might wish to turn off saving undo information if you use the Scintilla to store text\r\n    generated by a program (a Log view) or in a display window where text is often deleted and\r\n    regenerated.</p>\r\n\r\n    <p><b id=\"SCI_BEGINUNDOACTION\">SCI_BEGINUNDOACTION</b><br />\r\n     <b id=\"SCI_ENDUNDOACTION\">SCI_ENDUNDOACTION</b><br />\r\n     Send these two messages to Scintilla to mark the beginning and end of a set of operations that\r\n    you want to undo all as one operation but that you have to generate as several operations.\r\n    Alternatively, you can use these to mark a set of operations that you do not want to have\r\n    combined with the preceding or following operations if they are undone.</p>\r\n\r\n    <p><b id=\"SCI_ADDUNDOACTION\">SCI_ADDUNDOACTION(int token, int flags)</b><br />\r\n     The container can add its own actions into the undo stack by calling\r\n     <code>SCI_ADDUNDOACTION</code> and an <code>SCN_MODIFIED</code>\r\n     notification will be sent to the container with the\r\n     <a class=\"message\" href=\"#SC_MOD_CONTAINER\"><code>SC_MOD_CONTAINER</code></a>\r\n     flag when it is time to undo (<code>SC_PERFORMED_UNDO</code>) or\r\n     redo (<code>SC_PERFORMED_REDO</code>) the action. The token argument supplied is\r\n     returned in the <code>token</code> field of the notification.</p>\r\n     <p>For example, if the container wanted to allow undo and redo of a 'toggle bookmark' command then\r\n     it could call <code>SCI_ADDUNDOACTION(line, 0)</code> each time the command is performed.\r\n     Then when it receives a notification to undo or redo it toggles a bookmark on the line given by\r\n     the token field. If there are different types of commands or parameters that need to be stored into the undo\r\n     stack then the container should maintain a stack of its own for the document and use the current\r\n     position in that stack as the argument to <code>SCI_ADDUNDOACTION(line)</code>.\r\n     <code>SCI_ADDUNDOACTION</code> commands are not combined together\r\n     into a single undo transaction unless grouped with <code>SCI_BEGINUNDOACTION</code>\r\n     and <code>SCI_ENDUNDOACTION</code>.</p>\r\n\r\n     <p>The flags argument can be <code>UNDO_MAY_COALESCE</code> (1) if the container action may be\r\n     coalesced along with any insertion and deletion actions into a single compound action, otherwise\r\n     <code>UNDO_NONE</code> (0).\r\n     Coalescing treats coalescible container actions as transparent so will still only group together insertions that\r\n     look like typing or deletions that look like multiple uses of the Backspace or Delete keys.\r\n     </p>\r\n\r\n    <h2 id=\"UndoSaveRestore\">Undo Save and Restore</h2>\r\n\r\n    <p>This feature is unfinished and has limitations.\r\n    When change history is active, it may show different changes than the previous session as undo actions\r\n    performed in that session are discarded in some circumstances such as when detaching from a save point.\r\n    A future version may add an API for archiving change history alongside undo history.\r\n    The operation sequences discussed here are a 'golden path' that has been tested to some extent and calling\r\n    the APIs in other circumstances or with out-of-bounds values may fail.</p>\r\n\r\n    <p>The behaviour of tentative actions in save and restore is uncertain as these are meant to be short-term states in language input\r\n    and which need to synchronize with a language IME (input method editor).\r\n    For now, restore the tentative point to -1 as it seems safest to regard the tentative change as committed.</p>\r\n\r\n    <p>Scintilla stores each change in an undo stack.\r\n    Various inter-action points play roles in undo behaviour: actions count, save point, detach point,\r\n    tentative point, and current action. Just like positions in documents, these points are between actions in the \r\n    undo stack. Thus the current action specifies the number of actions that led to the current document state and\r\n    actions after this are for redo.\r\n    The save point specifies that the actions before this point are in the most recent save and actions after this are not yet saved.</p>\r\n    <p>When the user undoes from a save point and then performs a new change, the save point can no longer be reached and is -1.\r\n    The detach point is the point at which the undo stack branched away from the saved state and is used by\r\n    change history.</p>\r\n\r\n    <p>It is possible to retrieve the undo stack from Scintilla and subsequently restore the state of the stack.</p>\r\n\r\n    <p>An application may save both the document and its save stack between sessions to enable the user to return\r\n    to the same state the next time they edit.\r\n    For this to work, the loaded file must be exactly the same as when the undo stack was saved.\r\n    If the file was changed, even in minor ways like converting line ends from Windows to Unix style then\r\n    the undo actions will not line up so undo may fail completely and will produce unexpected results.</p>\r\n\r\n    <code><a class=\"message\" href=\"#SCI_GETUNDOACTIONS\">SCI_GETUNDOACTIONS &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETUNDOSAVEPOINT\">SCI_SETUNDOSAVEPOINT(int action)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETUNDOSAVEPOINT\">SCI_GETUNDOSAVEPOINT &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETUNDODETACH\">SCI_SETUNDODETACH(int action)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETUNDODETACH\">SCI_GETUNDODETACH &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETUNDOTENTATIVE\">SCI_SETUNDOTENTATIVE(int action)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETUNDOTENTATIVE\">SCI_GETUNDOTENTATIVE &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETUNDOCURRENT\">SCI_SETUNDOCURRENT(int action)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETUNDOCURRENT\">SCI_GETUNDOCURRENT &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_PUSHUNDOACTIONTYPE\">SCI_PUSHUNDOACTIONTYPE(int type, position pos)</a><br />\r\n     <a class=\"message\" href=\"#SCI_CHANGELASTUNDOACTIONTEXT\">SCI_CHANGELASTUNDOACTIONTEXT(position length, const char *text)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETUNDOACTIONTYPE\">SCI_GETUNDOACTIONTYPE(int action) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETUNDOACTIONPOSITION\">SCI_GETUNDOACTIONPOSITION(int action) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETUNDOACTIONTEXT \">SCI_GETUNDOACTIONTEXT(int action, char *text) &rarr; int</a><br />\r\n    </code>\r\n\r\n    <h3 id=\"UndoSave\">Save</h3>\r\n\r\n    <p>The retrieval APIs are the 'GET*' ones:\r\n    <code>SCI_GETUNDOACTIONS</code>,\r\n    <code>SCI_GETUNDOSAVEPOINT</code>,\r\n    <code>SCI_GETUNDODETACH</code>,\r\n    <code>SCI_GETUNDOTENTATIVE</code>,\r\n    <code>SCI_GETUNDOCURRENT</code>,\r\n    <code>SCI_GETUNDOACTIONTYPE</code>,\r\n    <code>SCI_GETUNDOACTIONPOSITION</code>, and\r\n    <code>SCI_GETUNDOACTIONTEXT</code>.\r\n    </p>\r\n\r\n    <p>The <code>SCI_GETUNDOACTIONS</code>,\r\n    <code>SCI_GETUNDOSAVEPOINT</code>, <code>SCI_GETUNDODETACH</code>,\r\n    <code>SCI_GETUNDOTENTATIVE</code>, and <code>SCI_GETUNDOCURRENT</code>\r\n     APIs each return a single value and may be called in any order.\r\n    </p>\r\n\r\n    <p>The <code>SCI_GETUNDOACTIONTYPE</code>,\r\n    <code>SCI_GETUNDOACTIONPOSITION</code>, and <code>SCI_GETUNDOACTIONTEXT</code>\r\n    APIs take an action index and should be called with indices from 0 to one less than the result of\r\n    <code>SCI_GETUNDOACTIONS</code>.\r\n    The actions should only be iterated in the positive direction and should start from 0.\r\n    That is because undo stack data is not all randomly accessible and iterating in other orders may take O(n^2) time.\r\n    Data may also be inaccurate if a cursor is not initialised first with 0 index calls.\r\n    </p>\r\n\r\n    <h3 id=\"UndoRestore\">Restore</h3>\r\n\r\n    <p>Restoration is only possible when the undo state is empty so <code>SCI_EMPTYUNDOBUFFER</code>\r\n    should be called first if there may already be some undo actions.</p>\r\n\r\n    <p>The restore APIs are the 'SET*' and others:\r\n    <code>SCI_SETUNDOSAVEPOINT</code>,\r\n    <code>SCI_SETUNDODETACH</code>,\r\n    <code>SCI_SETUNDOTENTATIVE</code>,\r\n    <code>SCI_SETUNDOCURRENT</code>,\r\n    <code>SCI_PUSHUNDOACTIONTYPE</code>, and\r\n    <code>SCI_CHANGELASTUNDOACTIONTEXT</code>.\r\n    </p>\r\n\r\n    <p>The history should first be set up with <code>SCI_PUSHUNDOACTIONTYPE</code> and\r\n    <code>SCI_CHANGELASTUNDOACTIONTEXT</code> then the save, detach, tentative, and current points set\r\n    with <code>SCI_SETUNDOSAVEPOINT</code>, <code>SCI_SETUNDODETACH</code>, <code>SCI_SETUNDOTENTATIVE</code>, and\r\n    <code>SCI_SETUNDOCURRENT</code>.\r\n    </p>\r\n\r\n    <p><code>SCI_PUSHUNDOACTIONTYPE(int type, position pos)</code> appends an action to the undo stack\r\n    with a particular type and position then the text and length of that action are set with\r\n    <code>SCI_CHANGELASTUNDOACTIONTEXT(position length, const char *text)</code>.\r\n    </p>\r\n\r\n    <p>\r\n    The last restoration API called should be <code>SCI_SETUNDOCURRENT</code> as this validates\r\n    the restored history and values against the document. For example, an undo history that could cause a negative\r\n    document length or insert / remove text outside the document is invalid.\r\n    If the restored undo state is invalid then a failure status is set and the undo history cleared.\r\n    Check for failure with <a class=\"seealso\" href=\"#SCI_GETSTATUS\">SCI_GETSTATUS</a>.\r\n    </p>\r\n\r\n    <p>The current implementation may only work when there is no tentative point.\r\n    </p>\r\n\r\n    <h2 id=\"ChangeHistory\">Change history</h2>\r\n\r\n    <p>Scintilla can display document changes (modified, saved, ...) in the margin or in the text.</p>\r\n\r\n    <p>The main states are original text that has not been modified, modified, and modified then saved.\r\n    As it is possible to undo to before the save point, there are additional states for reverted from save and\r\n    reverted back to original from save.\r\n    The reverted states are different to the saved document on disk so some applications may want to\r\n    display these states just like the main modified state.</p>\r\n\r\n    <p><img src=\"ChangeHistory.png\" alt=\"Change history markers and indicators.\" /></p>\r\n\r\n    <p>The image shows the default visuals which can be altered by the application.\r\n    In the text, inserted characters appear with coloured underlines and points where characters were deleted are shown with small triangles.\r\n    The margin shows a block indicating the overall state of the line, prioritizing the more consequential modified states.\r\n    The states are\r\n    modified (<span style=\"color:#FF8000\">orange</span>),\r\n    saved (<span style=\"color:#00A000\">green</span>),\r\n    saved then reverted to modified (<span style=\"color:#A0C000\">green-yellow</span>),\r\n    and saved then reverted to original (<span style=\"color:#40A0BF\">cyan</span>).\r\n    </p>\r\n\r\n    <p>This feature uses a moderate amount of memory proportional to the amount of modifications made.\r\n    On huge documents, this could be significant so could be disabled when it would cause excessive memory use.</p>\r\n\r\n    <p>If the applications wants to display a simplified set of visuals without differentiating between modifications\r\n    that have been reverted then assign the same attributes to multiple markers and indicators.</p>\r\n\r\n    <code><a class=\"message\" href=\"#SCI_SETCHANGEHISTORY\">SCI_SETCHANGEHISTORY(int changeHistory)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETCHANGEHISTORY\">SCI_GETCHANGEHISTORY &rarr; int</a><br />\r\n    </code>\r\n\r\n    <p><b id=\"SCI_SETCHANGEHISTORY\">SCI_SETCHANGEHISTORY(int changeHistory)</b><br />\r\n     <b id=\"SCI_GETCHANGEHISTORY\">SCI_GETCHANGEHISTORY &rarr; int</b><br />\r\n     <code>SCI_SETCHANGEHISTORY</code> turns this feature on and off and determines whether changes are visible in\r\n     the margin or text or both.</p>\r\n     <p>Change history depends on the undo history and can only be enabled when undo history is enabled and empty.\r\n     It should be enabled once when a file is loaded after calling\r\n     <a class=\"seealso\" href=\"#SCI_SETUNDOCOLLECTION\">SCI_SETUNDOCOLLECTION(true)</a> and\r\n     <a class=\"seealso\" href=\"#SCI_SETSAVEPOINT\">SCI_SETSAVEPOINT</a>.</p>\r\n     <p>The <code class=\"parameter\">changeHistory</code> argument can be a combination of:</p>\r\n\r\n    <table class=\"standard\" summary=\"Change history state\">\r\n      <tbody valign=\"top\">\r\n        <tr>\r\n          <th align=\"left\"><code>SC_CHANGE_HISTORY_DISABLED</code></th>\r\n\r\n          <td>0</td>\r\n\r\n          <td>The default: change history turned off.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>SC_CHANGE_HISTORY_ENABLED</code></th>\r\n\r\n          <td>1</td>\r\n\r\n          <td>Track changes to the document.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>SC_CHANGE_HISTORY_MARKERS</code></th>\r\n\r\n          <td>2</td>\r\n\r\n          <td>Display changes in the margin using the <code>SC_MARKNUM_HISTORY</code> markers.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>SC_CHANGE_HISTORY_INDICATORS</code></th>\r\n\r\n          <td>4</td>\r\n\r\n          <td>Display changes in the text using the <code>INDICATOR_HISTORY</code> indicators.</td>\r\n        </tr>\r\n      </tbody>\r\n    </table>\r\n\r\n    <p>There are default visuals assigned to each history marker and indicator but these may be overridden by the application.</p>\r\n\r\n    <p>Markers:</p>\r\n\r\n    <table class=\"standard\" summary=\"Change history markers\">\r\n      <tbody valign=\"top\">\r\n        <tr>\r\n          <th align=\"left\"><code>SC_MARKNUM_HISTORY_REVERTED_TO_ORIGIN</code></th>\r\n\r\n          <td>21</td>\r\n\r\n          <td>A change was made to this line and saved but then reverted to its original state.</td>\r\n          <td>This line is different to its state on disk.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>SC_MARKNUM_HISTORY_SAVED</code></th>\r\n\r\n          <td>22</td>\r\n\r\n          <td>This line was modified and saved.</td>\r\n          <td>This line is the same as its state on disk.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>SC_MARKNUM_HISTORY_MODIFIED</code></th>\r\n\r\n          <td>23</td>\r\n\r\n          <td>This line was modified but not yet saved.</td>\r\n          <td>This line is different to its state on disk.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>SC_MARKNUM_HISTORY_REVERTED_TO_MODIFIED</code></th>\r\n\r\n          <td>24</td>\r\n\r\n          <td>A change was made to this line and saved but then reverted but not to its original state.</td>\r\n          <td>This line is different to its state on disk.</td>\r\n        </tr>\r\n      </tbody>\r\n    </table>\r\n\r\n    <p>Indicators:</p>\r\n\r\n    <table class=\"standard\" summary=\"Change history indicators\">\r\n      <tbody valign=\"top\">\r\n        <tr>\r\n          <th align=\"left\"><code>INDICATOR_HISTORY_REVERTED_TO_ORIGIN_INSERTION</code></th>\r\n          <td>36</td>\r\n          <td>Text was deleted and saved but then reverted to its original state.</td>\r\n          <td>This text has not been saved to disk.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>INDICATOR_HISTORY_REVERTED_TO_ORIGIN_DELETION</code></th>\r\n          <td>37</td>\r\n          <td>Text was inserted and saved but then reverted to its original state.</td>\r\n          <td>There is text on disk that is missing.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>INDICATOR_HISTORY_SAVED_INSERTION</code></th>\r\n          <td>38</td>\r\n          <td>Text was inserted and saved.</td>\r\n          <td>This text is the same as on disk.</td>\r\n        </tr>\r\n        <tr>\r\n          <th align=\"left\"><code>INDICATOR_HISTORY_SAVED_DELETION</code></th>\r\n          <td>39</td>\r\n          <td>Text was deleted and saved.</td>\r\n          <td>This range is the same as on disk.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>INDICATOR_HISTORY_MODIFIED_INSERTION</code></th>\r\n          <td>40</td>\r\n          <td>Text was inserted but not yet saved.</td>\r\n          <td>This text has not been saved to disk.</td>\r\n        </tr>\r\n        <tr>\r\n          <th align=\"left\"><code>INDICATOR_HISTORY_MODIFIED_DELETION</code></th>\r\n          <td>41</td>\r\n          <td>Text was deleted but not yet saved.</td>\r\n          <td>There is text on disk that is missing.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>INDICATOR_HISTORY_REVERTED_TO_MODIFIED_INSERTION</code></th>\r\n          <td>42</td>\r\n          <td>Text was deleted and saved but then reverted but not to its original state.</td>\r\n          <td>This text has not been saved to disk.</td>\r\n        </tr>\r\n        <tr>\r\n          <th align=\"left\"><code>INDICATOR_HISTORY_REVERTED_TO_MODIFIED_DELETION</code></th>\r\n          <td>43</td>\r\n          <td>Text was inserted and saved but then reverted but not to its original state.</td>\r\n          <td>There is text on disk that is missing.</td>\r\n        </tr>\r\n      </tbody>\r\n    </table>\r\n\r\n    <h2 id=\"ScrollingAndAutomaticScrolling\">Scrolling and automatic scrolling</h2>\r\n    <code>\r\n     <a class=\"message\" href=\"#SCI_SETFIRSTVISIBLELINE\">SCI_SETFIRSTVISIBLELINE(line displayLine)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETFIRSTVISIBLELINE\">SCI_GETFIRSTVISIBLELINE &rarr; line</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETXOFFSET\">SCI_SETXOFFSET(int xOffset)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETXOFFSET\">SCI_GETXOFFSET &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_LINESCROLL\">SCI_LINESCROLL(position columns, line lines)</a><br />\r\n     <a class=\"message\" href=\"#SCI_SCROLLCARET\">SCI_SCROLLCARET</a><br />\r\n     <a class=\"message\" href=\"#SCI_SCROLLRANGE\">SCI_SCROLLRANGE(position secondary, position primary)</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETXCARETPOLICY\">SCI_SETXCARETPOLICY(int caretPolicy, int\r\n    caretSlop)</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETYCARETPOLICY\">SCI_SETYCARETPOLICY(int caretPolicy, int\r\n    caretSlop)</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETVISIBLEPOLICY\">SCI_SETVISIBLEPOLICY(int visiblePolicy, int\r\n    visibleSlop)</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETHSCROLLBAR\">SCI_SETHSCROLLBAR(bool visible)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETHSCROLLBAR\">SCI_GETHSCROLLBAR &rarr; bool</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETVSCROLLBAR\">SCI_SETVSCROLLBAR(bool visible)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETVSCROLLBAR\">SCI_GETVSCROLLBAR &rarr; bool</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETSCROLLWIDTH\">SCI_SETSCROLLWIDTH(int pixelWidth)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETSCROLLWIDTH\">SCI_GETSCROLLWIDTH &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETSCROLLWIDTHTRACKING\">SCI_SETSCROLLWIDTHTRACKING(bool tracking)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETSCROLLWIDTHTRACKING\">SCI_GETSCROLLWIDTHTRACKING &rarr; bool</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETENDATLASTLINE\">SCI_SETENDATLASTLINE(bool\r\n    endAtLastLine)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETENDATLASTLINE\">SCI_GETENDATLASTLINE &rarr; bool</a><br />\r\n    </code>\r\n\r\n    <p><b id=\"SCI_SETFIRSTVISIBLELINE\">SCI_SETFIRSTVISIBLELINE(line displayLine)</b><br />\r\n     <b id=\"SCI_GETFIRSTVISIBLELINE\">SCI_GETFIRSTVISIBLELINE &rarr; line</b><br />\r\n     These messages retrieve and set the line number of the first visible line in the Scintilla view. The first line\r\n    in the document is numbered 0. The value is a visible line rather than a document line.</p>\r\n\r\n    <p><b id=\"SCI_SETXOFFSET\">SCI_SETXOFFSET(int xOffset)</b><br />\r\n     <b id=\"SCI_GETXOFFSET\">SCI_GETXOFFSET &rarr; int</b><br />\r\n     The <code class=\"parameter\">xOffset</code> is the horizontal scroll position in pixels of the start of the text\r\n    view. A value of 0 is the normal position with the first text column visible at the left of the\r\n    view.</p>\r\n\r\n    <p><b id=\"SCI_LINESCROLL\">SCI_LINESCROLL(position columns, line lines)</b><br />\r\n     This will attempt to scroll the display by the number of columns and lines that you specify.\r\n    Positive line values increase the line number at the top of the screen (i.e. they move the text\r\n    upwards as far as the user is concerned), Negative line values do the reverse.</p>\r\n\r\n    <p>The column measure is the width of a space in the default style. Positive values increase\r\n    the column at the left edge of the view (i.e. they move the text leftwards as far as the user\r\n    is concerned). Negative values do the reverse.</p>\r\n\r\n    <p>See also: <a class=\"message\" href=\"#SCI_SETXOFFSET\"><code>SCI_SETXOFFSET</code></a></p>\r\n\r\n    <p><b id=\"SCI_SCROLLCARET\">SCI_SCROLLCARET</b><br />\r\n     If the current position (this is the caret if there is no selection) is not visible, the view\r\n    is scrolled to make it visible according to the current caret policy.</p>\r\n\r\n    <p><b id=\"SCI_SCROLLRANGE\">SCI_SCROLLRANGE(position secondary, position primary)</b><br />\r\n     Scroll the argument positions and the range between them into view giving\r\n     priority to the primary position then the secondary position.\r\n     The behaviour is similar to <a class=\"message\" href=\"#SCI_SCROLLCARET\"><code>SCI_SCROLLCARET</code></a>\r\n     with the primary position used instead of the caret. An effort is then made to ensure that the secondary\r\n     position and range between are also visible.\r\n     This may be used to make a search match visible.</p>\r\n\r\n    <p><b id=\"SCI_SETXCARETPOLICY\">SCI_SETXCARETPOLICY(int caretPolicy, int caretSlop)</b><br />\r\n     <b id=\"SCI_SETYCARETPOLICY\">SCI_SETYCARETPOLICY(int caretPolicy, int caretSlop)</b><br />\r\n     These set the caret policy. The value of <code class=\"parameter\">caretPolicy</code> is a combination of\r\n    <code>CARET_SLOP</code>, <code>CARET_STRICT</code>, <code>CARET_JUMPS</code> and\r\n    <code>CARET_EVEN</code>.</p>\r\n\r\n    <table class=\"standard\" summary=\"Caret policy\">\r\n      <tbody valign=\"top\">\r\n        <tr>\r\n          <th align=\"left\"><code>CARET_SLOP</code></th>\r\n\r\n          <td>If set, we can define a slop value: <code class=\"parameter\">caretSlop</code>. This value defines an\r\n          unwanted zone (UZ) where the caret is... unwanted. This zone is defined as a number of\r\n          pixels near the vertical margins, and as a number of lines near the horizontal margins.\r\n          By keeping the caret away from the edges, it is seen within its context. This makes it\r\n          likely that the identifier that the caret is on can be completely seen, and that the\r\n          current line is seen with some of the lines following it, which are often dependent on\r\n          that line.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>CARET_STRICT</code></th>\r\n\r\n          <td>If set, the policy set by <code>CARET_SLOP</code> is enforced... strictly. The caret\r\n          is centred on the display if <code class=\"parameter\">caretSlop</code> is not set, and cannot go in the UZ\r\n          if <code class=\"parameter\">caretSlop</code> is set.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>CARET_JUMPS</code></th>\r\n\r\n          <td>If set, the display is moved more energetically so the caret can move in the same\r\n          direction longer before the policy is applied again. '3UZ' notation is used to indicate\r\n          three time the size of the UZ as a distance to the margin.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>CARET_EVEN</code></th>\r\n\r\n          <td>If not set, instead of having symmetrical UZs, the left and bottom UZs are extended\r\n          up to right and top UZs respectively. This way, we favour the displaying of useful\r\n          information: the beginning of lines, where most code reside, and the lines after the\r\n          caret, for example, the body of a function.</td>\r\n        </tr>\r\n      </tbody>\r\n    </table>\r\n    <br />\r\n\r\n    <table class=\"standard\" summary=\"Caret positioning\">\r\n      <thead align=\"center\">\r\n        <tr>\r\n          <th>slop</th>\r\n\r\n          <th>strict</th>\r\n\r\n          <th>jumps</th>\r\n\r\n          <th>even</th>\r\n\r\n          <th>Caret can go to the margin</th>\r\n\r\n          <th>On reaching limit (going out of visibility<br />\r\n           or going into the UZ) display is...</th>\r\n        </tr>\r\n      </thead>\r\n\r\n      <tbody align=\"center\">\r\n        <tr>\r\n          <td>0</td>\r\n\r\n          <td>0</td>\r\n\r\n          <td>0</td>\r\n\r\n          <td>0</td>\r\n\r\n          <td>Yes</td>\r\n\r\n          <td>moved to put caret on top/on right</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td>0</td>\r\n\r\n          <td>0</td>\r\n\r\n          <td>0</td>\r\n\r\n          <td>1</td>\r\n\r\n          <td>Yes</td>\r\n\r\n          <td>moved by one position</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td>0</td>\r\n\r\n          <td>0</td>\r\n\r\n          <td>1</td>\r\n\r\n          <td>0</td>\r\n\r\n          <td>Yes</td>\r\n\r\n          <td>moved to put caret on top/on right</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td>0</td>\r\n\r\n          <td>0</td>\r\n\r\n          <td>1</td>\r\n\r\n          <td>1</td>\r\n\r\n          <td>Yes</td>\r\n\r\n          <td>centred on the caret</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td>0</td>\r\n\r\n          <td>1</td>\r\n\r\n          <td>-</td>\r\n\r\n          <td>0</td>\r\n\r\n          <td>Caret is always on top/on right of display</td>\r\n\r\n          <td>-</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td>0</td>\r\n\r\n          <td>1</td>\r\n\r\n          <td>-</td>\r\n\r\n          <td>1</td>\r\n\r\n          <td>No, caret is always centred</td>\r\n\r\n          <td>-</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td>1</td>\r\n\r\n          <td>0</td>\r\n\r\n          <td>0</td>\r\n\r\n          <td>0</td>\r\n\r\n          <td>Yes</td>\r\n\r\n          <td>moved to put caret out of the asymmetrical UZ</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td>1</td>\r\n\r\n          <td>0</td>\r\n\r\n          <td>0</td>\r\n\r\n          <td>1</td>\r\n\r\n          <td>Yes</td>\r\n\r\n          <td>moved to put caret out of the UZ</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td>1</td>\r\n\r\n          <td>0</td>\r\n\r\n          <td>1</td>\r\n\r\n          <td>0</td>\r\n\r\n          <td>Yes</td>\r\n\r\n          <td>moved to put caret at 3UZ of the top or right margin</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td>1</td>\r\n\r\n          <td>0</td>\r\n\r\n          <td>1</td>\r\n\r\n          <td>1</td>\r\n\r\n          <td>Yes</td>\r\n\r\n          <td>moved to put caret at 3UZ of the margin</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td>1</td>\r\n\r\n          <td>1</td>\r\n\r\n          <td>-</td>\r\n\r\n          <td>0</td>\r\n\r\n          <td>Caret is always at UZ of top/right margin</td>\r\n\r\n          <td>-</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td>1</td>\r\n\r\n          <td>1</td>\r\n\r\n          <td>0</td>\r\n\r\n          <td>1</td>\r\n\r\n          <td>No, kept out of UZ</td>\r\n\r\n          <td>moved by one position</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td>1</td>\r\n\r\n          <td>1</td>\r\n\r\n          <td>1</td>\r\n\r\n          <td>0</td>\r\n\r\n          <td>No, kept out of UZ</td>\r\n\r\n          <td>moved to put caret at 3UZ of the margin</td>\r\n        </tr>\r\n      </tbody>\r\n    </table>\r\n\r\n    <p><b id=\"SCI_SETVISIBLEPOLICY\">SCI_SETVISIBLEPOLICY(int visiblePolicy, int visibleSlop)</b><br />\r\n     This determines how the vertical positioning is determined when <a class=\"message\"\r\n    href=\"#SCI_ENSUREVISIBLEENFORCEPOLICY\"><code>SCI_ENSUREVISIBLEENFORCEPOLICY</code></a> is\r\n    called. It takes <code>VISIBLE_SLOP</code> and <code>VISIBLE_STRICT</code> flags for the <code class=\"parameter\">visiblePolicy</code>\r\n    parameter. It is similar in operation to <a class=\"message\"\r\n    href=\"#SCI_SETYCARETPOLICY\"><code>SCI_SETYCARETPOLICY(int caretPolicy, int\r\n    caretSlop)</code></a>.</p>\r\n\r\n    <p><b id=\"SCI_SETHSCROLLBAR\">SCI_SETHSCROLLBAR(bool visible)</b><br />\r\n     <b id=\"SCI_GETHSCROLLBAR\">SCI_GETHSCROLLBAR &rarr; bool</b><br />\r\n     The horizontal scroll bar is only displayed if it is needed for the assumed width.\r\n     If you never wish to see it, call\r\n    <code>SCI_SETHSCROLLBAR(0)</code>. Use <code>SCI_SETHSCROLLBAR(1)</code> to enable it again.\r\n    <code>SCI_GETHSCROLLBAR</code> returns the current state. The default state is to display it\r\n    when needed.</p>\r\n    <p>See also: <a class=\"seealso\" href=\"#SCI_SETSCROLLWIDTH\">SCI_SETSCROLLWIDTH</a>.</p>\r\n\r\n    <p><b id=\"SCI_SETVSCROLLBAR\">SCI_SETVSCROLLBAR(bool visible)</b><br />\r\n     <b id=\"SCI_GETVSCROLLBAR\">SCI_GETVSCROLLBAR &rarr; bool</b><br />\r\n     By default, the vertical scroll bar is always displayed when required. You can choose to hide\r\n    or show it with <code>SCI_SETVSCROLLBAR</code> and get the current state with\r\n    <code>SCI_GETVSCROLLBAR</code>.</p>\r\n\r\n    <p>See also: <a class=\"message\" href=\"#SCI_LINESCROLL\"><code>SCI_LINESCROLL</code></a></p>\r\n\r\n    <p><b id=\"SCI_SETSCROLLWIDTH\">SCI_SETSCROLLWIDTH(int pixelWidth)</b><br />\r\n     <b id=\"SCI_GETSCROLLWIDTH\">SCI_GETSCROLLWIDTH &rarr; int</b><br />\r\n     For performance, Scintilla does not measure the display width of the document to determine\r\n     the properties of the horizontal scroll bar. Instead, an assumed width is used.\r\n     These messages set and get the document width in pixels assumed by Scintilla.\r\n     The default value is 2000.\r\n     To ensure the width of the currently visible lines can be scrolled use\r\n     <a class=\"message\" href=\"#SCI_SETSCROLLWIDTHTRACKING\"><code>SCI_SETSCROLLWIDTHTRACKING</code></a></p>\r\n\r\n    <p><b id=\"SCI_SETSCROLLWIDTHTRACKING\">SCI_SETSCROLLWIDTHTRACKING(bool tracking)</b><br />\r\n     <b id=\"SCI_GETSCROLLWIDTHTRACKING\">SCI_GETSCROLLWIDTHTRACKING &rarr; bool</b><br />\r\n     If scroll width tracking is enabled then the scroll width is adjusted to ensure that all of the lines currently\r\n     displayed can be completely scrolled. This mode never adjusts the scroll width to be narrower.</p>\r\n\r\n    <p><b id=\"SCI_SETENDATLASTLINE\">SCI_SETENDATLASTLINE(bool endAtLastLine)</b><br />\r\n     <b id=\"SCI_GETENDATLASTLINE\">SCI_GETENDATLASTLINE &rarr; bool</b><br />\r\n     <code>SCI_SETENDATLASTLINE</code> sets the scroll range so that maximum scroll position has\r\n    the last line at the bottom of the view (default). Setting this to <code>false</code> allows\r\n    scrolling one page below the last line.</p>\r\n\r\n    <h2 id=\"WhiteSpace\">White space</h2>\r\n    <code><a class=\"message\" href=\"#SCI_SETVIEWWS\">SCI_SETVIEWWS(int viewWS)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETVIEWWS\">SCI_GETVIEWWS &rarr; int</a><br />\r\n     <a class=\"element\" href=\"#SC_ELEMENT_WHITE_SPACE\">SC_ELEMENT_WHITE_SPACE : colouralpha</a><br />\r\n     <a class=\"discouraged message\" href=\"#SCI_SETWHITESPACEFORE\">SCI_SETWHITESPACEFORE(bool\r\n    useSetting, colour fore)</a><br />\r\n     <a class=\"element\" href=\"#SC_ELEMENT_WHITE_SPACE_BACK\">SC_ELEMENT_WHITE_SPACE_BACK : colouralpha</a><br />\r\n     <a class=\"discouraged message\" href=\"#SCI_SETWHITESPACEBACK\">SCI_SETWHITESPACEBACK(bool\r\n    useSetting, colour back)</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETWHITESPACESIZE\">SCI_SETWHITESPACESIZE(int\r\n    size)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETWHITESPACESIZE\">SCI_GETWHITESPACESIZE &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETTABDRAWMODE\">SCI_SETTABDRAWMODE(int tabDrawMode)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETTABDRAWMODE\">SCI_GETTABDRAWMODE &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETEXTRAASCENT\">SCI_SETEXTRAASCENT(int extraAscent)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETEXTRAASCENT\">SCI_GETEXTRAASCENT &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETEXTRADESCENT\">SCI_SETEXTRADESCENT(int extraDescent)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETEXTRADESCENT\">SCI_GETEXTRADESCENT &rarr; int</a><br />\r\n    </code>\r\n\r\n    <p><b id=\"SCI_SETVIEWWS\">SCI_SETVIEWWS(int viewWS)</b><br />\r\n     <b id=\"SCI_GETVIEWWS\">SCI_GETVIEWWS &rarr; int</b><br />\r\n     White space can be made visible which may be useful for languages in which white space is\r\n    significant, such as Python. Space characters appear as small centred dots and tab characters\r\n    as light arrows pointing to the right. There are also ways to control the display of <a\r\n    class=\"jump\" href=\"#LineEndings\">end of line characters</a>. The two messages set and get the\r\n    white space display mode. The <code class=\"parameter\">viewWS</code> argument can be one of:</p>\r\n\r\n    <table class=\"standard\" summary=\"White space policy\">\r\n      <tbody valign=\"top\">\r\n        <tr>\r\n          <th align=\"left\"><code>SCWS_INVISIBLE</code></th>\r\n\r\n          <td>0</td>\r\n\r\n          <td>The normal display mode with white space displayed as an empty background\r\n          colour.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>SCWS_VISIBLEALWAYS</code></th>\r\n\r\n          <td>1</td>\r\n\r\n          <td>White space characters are drawn as dots and arrows,</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>SCWS_VISIBLEAFTERINDENT</code></th>\r\n\r\n          <td>2</td>\r\n\r\n          <td>White space used for indentation is displayed normally but after the first visible\r\n          character, it is shown as dots and arrows.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>SCWS_VISIBLEONLYININDENT</code></th>\r\n\r\n          <td>3</td>\r\n\r\n          <td>White space used for indentation is displayed as dots and arrows.</td>\r\n        </tr>\r\n      </tbody>\r\n    </table>\r\n\r\n    <p>The effect of using any other <code class=\"parameter\">viewWS</code> value is undefined.</p>\r\n\r\n    <p>\r\n     <b id=\"SC_ELEMENT_WHITE_SPACE\">SC_ELEMENT_WHITE_SPACE : colouralpha</b><br />\r\n     <b id=\"SCI_SETWHITESPACEFORE\">SCI_SETWHITESPACEFORE(bool useSetting, <a class=\"jump\" href=\"#colour\">colour</a> fore)</b><br />\r\n     <b id=\"SC_ELEMENT_WHITE_SPACE_BACK\">SC_ELEMENT_WHITE_SPACE_BACK : colouralpha</b><br />\r\n     <b id=\"SCI_SETWHITESPACEBACK\">SCI_SETWHITESPACEBACK(bool useSetting, <a class=\"jump\" href=\"#colour\">colour</a> back)</b><br />\r\n     By default, the colour of visible white space is determined by the lexer in use. The\r\n    foreground and/or background colour of all visible white space can be set globally, overriding\r\n    the lexer's colours with <a class=\"element\" href=\"#SCI_SETELEMENTCOLOUR\"><code>SC_ELEMENT_WHITE_SPACE</code></a>\r\n    and <a class=\"element\" href=\"#SCI_SETELEMENTCOLOUR\"><code>SC_ELEMENT_WHITE_SPACE_BACK</code></a>.\r\n    .<br />\r\n    <code>SCI_SETWHITESPACEFORE</code> and <code>SCI_SETWHITESPACEBACK</code> also\r\n    change the white space colours but the element APIs are preferred with <code>SC_ELEMENT_WHITE_SPACE</code>\r\n    allowing translucency.</p>\r\n\r\n     <p><b id=\"SCI_SETWHITESPACESIZE\">SCI_SETWHITESPACESIZE(int size)</b><br />\r\n     <b id=\"SCI_GETWHITESPACESIZE\">SCI_GETWHITESPACESIZE &rarr; int</b><br />\r\n     <code>SCI_SETWHITESPACESIZE</code> sets the size of the dots used for mark space characters.\r\n     The <code>SCI_GETWHITESPACESIZE</code> message retrieves the current size.\r\n     The value 0 is valid and makes the dots invisible.\r\n    </p>\r\n\r\n    <p><b id=\"SCI_SETTABDRAWMODE\">SCI_SETTABDRAWMODE(int tabDrawMode)</b><br />\r\n     <b id=\"SCI_GETTABDRAWMODE\">SCI_GETTABDRAWMODE &rarr; int</b><br />\r\n    These two messages get and set how tab characters are drawn when white space is visible.\r\n    The <code class=\"parameter\">tabDrawMode</code> argument can be one of:</p>\r\n\r\n    <table class=\"standard\" summary=\"White space policy\">\r\n      <tbody valign=\"top\">\r\n        <tr>\r\n          <th align=\"left\"><code>SCTD_LONGARROW</code></th>\r\n\r\n          <td>0</td>\r\n\r\n          <td>The default mode of an arrow stretching until the tabstop.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>SCTD_STRIKEOUT</code></th>\r\n\r\n          <td>1</td>\r\n\r\n          <td>A horizontal line stretching until the tabstop.</td>\r\n        </tr>\r\n      </tbody>\r\n    </table>\r\n\r\n    <p>The effect of using any other <code class=\"parameter\">tabDrawMode</code> value is undefined.</p>\r\n\r\n    <p>\r\n     <b id=\"SCI_SETEXTRAASCENT\">SCI_SETEXTRAASCENT(int extraAscent)</b><br />\r\n     <b id=\"SCI_GETEXTRAASCENT\">SCI_GETEXTRAASCENT &rarr; int</b><br />\r\n     <b id=\"SCI_SETEXTRADESCENT\">SCI_SETEXTRADESCENT(int extraDescent)</b><br />\r\n     <b id=\"SCI_GETEXTRADESCENT\">SCI_GETEXTRADESCENT &rarr; int</b><br />\r\n     Text is drawn with the base of each character on a 'baseline'. The height of a line is found from the maximum\r\n     that any style extends above the baseline (its 'ascent'), added to the maximum that any style extends below the\r\n     baseline (its 'descent').\r\n     Space may be added to the maximum ascent (<code>SCI_SETEXTRAASCENT</code>) and the\r\n     maximum descent (<code>SCI_SETEXTRADESCENT</code>) to allow for more space between lines.\r\n     This may done to make the text easier to read or to accommodate underlines or highlights.\r\n    </p>\r\n    <p>\r\n    The extra ascent and descent values can be negative but that should be done with care as it\r\n    may lead to unexpected interference when lines share space.\r\n    </p>\r\n\r\n    <h2 id=\"Cursor\">Cursor</h2>\r\n    <a class=\"message\" href=\"#SCI_SETCURSOR\">SCI_SETCURSOR(int cursorType)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETCURSOR\">SCI_GETCURSOR &rarr; int</a><br />\r\n\r\n    <p><b id=\"SCI_SETCURSOR\">SCI_SETCURSOR(int cursorType)</b><br />\r\n     <b id=\"SCI_GETCURSOR\">SCI_GETCURSOR &rarr; int</b><br />\r\n     The cursor is normally chosen in a context sensitive way, so it will be different over the\r\n    margin than when over the text. When performing a slow action, you may wish to change to a wait\r\n    cursor. You set the cursor type with <code>SCI_SETCURSOR</code>. The <code class=\"parameter\">cursorType</code>\r\n    argument can be:</p>\r\n\r\n    <table class=\"standard\" summary=\"Mouse cursors\">\r\n      <tbody valign=\"top\">\r\n        <tr>\r\n          <th align=\"left\"><code>SC_CURSORNORMAL</code></th>\r\n\r\n          <td>-1</td>\r\n\r\n          <td>The normal cursor is displayed.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>SC_CURSORWAIT</code></th>\r\n\r\n          <td>&nbsp;4</td>\r\n\r\n          <td>The wait cursor is displayed when the mouse is over or owned by the Scintilla\r\n          window.</td>\r\n        </tr>\r\n      </tbody>\r\n    </table>\r\n\r\n    <p>Cursor values 1 through 7 have defined cursors, but only <code>SC_CURSORWAIT</code> is\r\n    usefully controllable. Other values of <code class=\"parameter\">cursorType</code> cause a pointer to be displayed.\r\n    The <code>SCI_GETCURSOR</code> message returns the last cursor type you set, or\r\n    <code>SC_CURSORNORMAL</code> (-1) if you have not set a cursor type.</p>\r\n\r\n    <h2 id=\"MouseCapture\">Mouse capture</h2>\r\n    <a class=\"message\" href=\"#SCI_SETMOUSEDOWNCAPTURES\">SCI_SETMOUSEDOWNCAPTURES(bool captures)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETMOUSEDOWNCAPTURES\">SCI_GETMOUSEDOWNCAPTURES &rarr; bool</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETMOUSEWHEELCAPTURES\">SCI_SETMOUSEWHEELCAPTURES(bool captures)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETMOUSEWHEELCAPTURES\">SCI_GETMOUSEWHEELCAPTURES &rarr; bool</a><br />\r\n\r\n    <p><b id=\"SCI_SETMOUSEDOWNCAPTURES\">SCI_SETMOUSEDOWNCAPTURES(bool captures)</b><br />\r\n     <b id=\"SCI_GETMOUSEDOWNCAPTURES\">SCI_GETMOUSEDOWNCAPTURES &rarr; bool</b><br />\r\n     When the mouse is pressed inside Scintilla, it is captured so future mouse movement events are\r\n    sent to Scintilla. This behaviour may be turned off with\r\n    <code>SCI_SETMOUSEDOWNCAPTURES(0)</code>.</p>\r\n\r\n    <p><b id=\"SCI_SETMOUSEWHEELCAPTURES\">SCI_SETMOUSEWHEELCAPTURES(bool captures)</b><br />\r\n     <b id=\"SCI_GETMOUSEWHEELCAPTURES\">SCI_GETMOUSEWHEELCAPTURES &rarr; bool</b><br />\r\n     On Windows, Scintilla captures all <code>WM_MOUSEWHEEL</code> messages if it has the\r\n     focus, even if the mouse pointer is nowhere near the Scintilla editor window. This\r\n     behaviour can be changed with <code>SCI_SETMOUSEWHEELCAPTURES(0)</code> so that\r\n     Scintilla passes the <code>WM_MOUSEWHEEL</code> messages to its parent window.\r\n     Scintilla will still react to the mouse wheel if the mouse pointer is over\r\n     the editor window.</p>\r\n\r\n    <h2 id=\"LineEndings\">Line endings</h2>\r\n\r\n    <p>Scintilla can handle the major line end conventions and, depending on settings and\r\n    the current lexer also support additional Unicode line ends.</p>\r\n\r\n    <p>Scintilla can interpret any of the Macintosh (\\r), Unix (\\n) and Windows (\\r\\n)\r\n    line ends.\r\n    When the user presses the Enter key, one of these line\r\n    end strings is inserted into the buffer. The default is \\r\\n in Windows and \\n in Unix, but\r\n    this can be changed with the <code>SCI_SETEOLMODE</code> message. You can also convert the\r\n    entire document to one of these line endings with <code>SCI_CONVERTEOLS</code>. Finally, you\r\n    can choose to display the line endings with <code>SCI_SETVIEWEOL</code>.</p>\r\n\r\n    <p>For the UTF-8 encoding, three additional Unicode line ends,\r\n    Next Line (<code>NEL=U+0085</code>), Line Separator (<code>LS=U+2028</code>), and Paragraph Separator (<code>PS=U+2029</code>)\r\n    may optionally be interpreted when Unicode line ends is turned on and the current lexer also supports\r\n    Unicode line ends.</p>\r\n\r\n    <a class=\"message\" href=\"#SCI_SETEOLMODE\">SCI_SETEOLMODE(int eolMode)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETEOLMODE\">SCI_GETEOLMODE &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_CONVERTEOLS\">SCI_CONVERTEOLS(int eolMode)</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETVIEWEOL\">SCI_SETVIEWEOL(bool visible)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETVIEWEOL\">SCI_GETVIEWEOL &rarr; bool</a><br />\r\n\r\n     <a class=\"message\" href=\"#SCI_GETLINEENDTYPESSUPPORTED\">SCI_GETLINEENDTYPESSUPPORTED &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETLINEENDTYPESALLOWED\">SCI_SETLINEENDTYPESALLOWED(int lineEndBitSet)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETLINEENDTYPESALLOWED\">SCI_GETLINEENDTYPESALLOWED &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETLINEENDTYPESACTIVE\">SCI_GETLINEENDTYPESACTIVE &rarr; int</a><br />\r\n\r\n    <p><b id=\"SCI_SETEOLMODE\">SCI_SETEOLMODE(int eolMode)</b><br />\r\n     <b id=\"SCI_GETEOLMODE\">SCI_GETEOLMODE &rarr; int</b><br />\r\n     <code>SCI_SETEOLMODE</code> sets the characters that are added into the document when the user\r\n    presses the Enter key. You can set <code class=\"parameter\">eolMode</code> to one of <code>SC_EOL_CRLF</code> (0),\r\n    <code>SC_EOL_CR</code> (1), or <code>SC_EOL_LF</code> (2). The <code>SCI_GETEOLMODE</code>\r\n    message retrieves the current state.</p>\r\n\r\n    <p><b id=\"SCI_CONVERTEOLS\">SCI_CONVERTEOLS(int eolMode)</b><br />\r\n     This message changes all the end of line characters in the document to match\r\n    <code class=\"parameter\">eolMode</code>. Valid values are: <code>SC_EOL_CRLF</code> (0), <code>SC_EOL_CR</code>\r\n    (1), or <code>SC_EOL_LF</code> (2).</p>\r\n\r\n    <p><b id=\"SCI_SETVIEWEOL\">SCI_SETVIEWEOL(bool visible)</b><br />\r\n     <b id=\"SCI_GETVIEWEOL\">SCI_GETVIEWEOL &rarr; bool</b><br />\r\n     Normally, the end of line characters are hidden, but <code>SCI_SETVIEWEOL</code> allows you to\r\n    display (or hide) them by setting <code class=\"parameter\">visible</code> <code>true</code> (or\r\n    <code>false</code>). The visible rendering of the end of line characters is similar to\r\n    <code>(CR)</code>, <code>(LF)</code>, or <code>(CR)(LF)</code>. <code>SCI_GETVIEWEOL</code>\r\n    returns the current state.</p>\r\n\r\n    <p><b id=\"SCI_GETLINEENDTYPESSUPPORTED\">SCI_GETLINEENDTYPESSUPPORTED &rarr; int</b><br />\r\n     <code>SCI_GETLINEENDTYPESSUPPORTED</code> reports the different types of line ends supported\r\n     by the current lexer. This is a bit set although there is currently only a single choice\r\n     with either <code>SC_LINE_END_TYPE_DEFAULT</code> (0) or <code>SC_LINE_END_TYPE_UNICODE</code> (1).\r\n     These values are also used by the other messages concerned with Unicode line ends.</p>\r\n\r\n    <p><b id=\"SCI_SETLINEENDTYPESALLOWED\">SCI_SETLINEENDTYPESALLOWED(int lineEndBitSet)</b><br />\r\n     <b id=\"SCI_GETLINEENDTYPESALLOWED\">SCI_GETLINEENDTYPESALLOWED &rarr; int</b><br />\r\n     By default, only the ASCII line ends are interpreted. Unicode line ends may be requested with\r\n     <code>SCI_SETLINEENDTYPESALLOWED(SC_LINE_END_TYPE_UNICODE)</code>\r\n     but this will be ineffective unless the lexer also allows you Unicode line ends.\r\n    <code>SCI_GETLINEENDTYPESALLOWED</code> returns the current state.</p>\r\n\r\n    <p><b id=\"SCI_GETLINEENDTYPESACTIVE\">SCI_GETLINEENDTYPESACTIVE &rarr; int</b><br />\r\n     <code>SCI_GETLINEENDTYPESACTIVE</code> reports the set of line ends currently interpreted\r\n     by Scintilla. It is <code>SCI_GETLINEENDTYPESSUPPORTED &amp; SCI_GETLINEENDTYPESALLOWED</code>.</p>\r\n\r\n    <h2 id=\"Words\">Words</h2>\r\n\r\n    <p>There is support for selecting, navigating by, and searching for words.</p>\r\n\r\n    <p>\r\n    Words are contiguous sequences of characters from a particular set of characters.\r\n    4 categories define words: word, whitespace, punctuation, and line ends with each category\r\n    having a role in word functions.\r\n    Double clicking selects the word at that point, which may be a sequence of word, punctuation,\r\n    or whitespace bytes.\r\n    Line ends are not selected by double clicking but do act as word separators.\r\n    </p>\r\n\r\n    <p>Words are defined in terms of characters and the sets of characters in each category can be customised to an extent.\r\n    The NUL character (0) is always a space as the APIs to set categories use NUL-terminated strings.\r\n    For single-byte encodings a category may be assigned to any character (1 to 0xFF).\r\n    For multi-byte encodings a category may be assigned to characters from 1 to 0x7F with static behaviour from 0x80.\r\n    For UTF-8, characters from 0x80 will use a category based on their Unicode general category.\r\n    For Asian encodings, code pages 932, 936, 949, 950, and 1361, characters from 0x80 are treated as word characters.\r\n    </p>\r\n\r\n    <p>Identifiers in programming languages are often sequences of words with capitalisation\r\n     (aCamelCaseIdentifier) or underscores (an_under_bar_ident) used to mark word boundaries.\r\n     The <code>SCI_WORDPART*</code> commands are used for moving between word parts:\r\n     <a class=\"message\" href=\"#SCI_WORDPARTLEFT\"><code>SCI_WORDPARTLEFT</code></a>,\r\n     <a class=\"message\" href=\"#SCI_WORDPARTLEFTEXTEND\"><code>SCI_WORDPARTLEFTEXTEND</code></a>,\r\n     <a class=\"message\" href=\"#SCI_WORDPARTRIGHT\"><code>SCI_WORDPARTRIGHT</code></a>, and\r\n     <a class=\"message\" href=\"#SCI_WORDPARTRIGHTEXTEND\"><code>SCI_WORDPARTRIGHTEXTEND</code></a>.\r\n     </p>\r\n\r\n     <a class=\"message\" href=\"#SCI_WORDENDPOSITION\">SCI_WORDENDPOSITION(position pos, bool onlyWordCharacters) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_WORDSTARTPOSITION\">SCI_WORDSTARTPOSITION(position pos, bool onlyWordCharacters) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_ISRANGEWORD\">SCI_ISRANGEWORD(position start, position end) &rarr; bool</a><br />\r\n\r\n     <a class=\"message\" href=\"#SCI_SETWORDCHARS\">SCI_SETWORDCHARS(&lt;unused&gt;, const char *characters)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETWORDCHARS\">SCI_GETWORDCHARS(&lt;unused&gt;, char *characters) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETWHITESPACECHARS\">SCI_SETWHITESPACECHARS(&lt;unused&gt;, const char *characters)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETWHITESPACECHARS\">SCI_GETWHITESPACECHARS(&lt;unused&gt;, char *characters) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETPUNCTUATIONCHARS\">SCI_SETPUNCTUATIONCHARS(&lt;unused&gt;, const char *characters)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETPUNCTUATIONCHARS\">SCI_GETPUNCTUATIONCHARS(&lt;unused&gt;, char *characters) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETCHARSDEFAULT\">SCI_SETCHARSDEFAULT</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETCHARACTERCATEGORYOPTIMIZATION\">SCI_SETCHARACTERCATEGORYOPTIMIZATION(int countCharacters)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETCHARACTERCATEGORYOPTIMIZATION\">SCI_GETCHARACTERCATEGORYOPTIMIZATION &rarr; int</a><br />\r\n\r\n    <p><b id=\"SCI_WORDENDPOSITION\">SCI_WORDENDPOSITION(position pos, bool onlyWordCharacters) &rarr; position</b><br />\r\n     <b id=\"SCI_WORDSTARTPOSITION\">SCI_WORDSTARTPOSITION(position pos, bool onlyWordCharacters) &rarr; position</b><br />\r\n     These messages return the start and end of words using the same definition of words as used\r\n    internally within Scintilla. You can set your own list of characters that count as words with\r\n    <a class=\"message\" href=\"#SCI_SETWORDCHARS\"><code>SCI_SETWORDCHARS</code></a>. The position\r\n    sets the start or the search, which is forwards when searching for the end and backwards when\r\n    searching for the start.</p>\r\n\r\n    <p><b id=\"SCI_ISRANGEWORD\">SCI_ISRANGEWORD(position start, position end) &rarr; bool</b><br />\r\n     Is the range start..end a word or set of words? This message checks that start is at a word start transition and that\r\n     end is at a word end transition. It does not check whether there are any spaces inside the range.</p>\r\n\r\n     <a class=\"message\" href=\"#SCI_ISRANGEWORD\">SCI_ISRANGEWORD(position start, position end) &rarr; bool</a><br />\r\n\r\n    <p>Set <code class=\"parameter\">onlyWordCharacters</code> to <code>true</code> (1) to stop searching at the first\r\n    non-word character in the search direction. If <code class=\"parameter\">onlyWordCharacters</code> is\r\n    <code>false</code> (0), the first character in the search direction sets the type of the search\r\n    as word or non-word and the search stops at the first non-matching character. Searches are also\r\n    terminated by the start or end of the document.</p>\r\n\r\n    <p>If \"w\" represents word characters and \".\" represents non-word characters and \"|\" represents\r\n    the position and <code>true</code> or <code>false</code> is the state of\r\n    <code class=\"parameter\">onlyWordCharacters</code>:</p>\r\n\r\n    <table class=\"standard\" summary=\"Word start and end positions\">\r\n      <thead align=\"center\">\r\n        <tr>\r\n          <th>Initial state</th>\r\n\r\n          <th>end, true</th>\r\n\r\n          <th>end, false</th>\r\n\r\n          <th>start, true</th>\r\n\r\n          <th>start, false</th>\r\n        </tr>\r\n      </thead>\r\n\r\n      <tbody align=\"center\">\r\n        <tr>\r\n          <td>..ww..|..ww..</td>\r\n\r\n          <td>..ww..|..ww..</td>\r\n\r\n          <td>..ww....|ww..</td>\r\n\r\n          <td>..ww..|..ww..</td>\r\n\r\n          <td>..ww|....ww..</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td>....ww|ww....</td>\r\n\r\n          <td>....wwww|....</td>\r\n\r\n          <td>....wwww|....</td>\r\n\r\n          <td>....|wwww....</td>\r\n\r\n          <td>....|wwww....</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td>..ww|....ww..</td>\r\n\r\n          <td>..ww|....ww..</td>\r\n\r\n          <td>..ww....|ww..</td>\r\n\r\n          <td>..|ww....ww..</td>\r\n\r\n          <td>..|ww....ww..</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td>..ww....|ww..</td>\r\n\r\n          <td>..ww....ww|..</td>\r\n\r\n          <td>..ww....ww|..</td>\r\n\r\n          <td>..ww....|ww..</td>\r\n\r\n          <td>..ww|....ww..</td>\r\n        </tr>\r\n      </tbody>\r\n    </table>\r\n\r\n    <p><b id=\"SCI_SETWORDCHARS\">SCI_SETWORDCHARS(&lt;unused&gt;, const char *characters)</b><br />\r\n     This message defines which characters are members of the word category.\r\n     The character categories are set to default values before processing this function.\r\n    For example, if you don't allow '_' in your set of characters\r\n    use:<br />\r\n     <code>SCI_SETWORDCHARS(0, \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\")</code>;</p>\r\n\r\n    <p><b id=\"SCI_GETWORDCHARS\">SCI_GETWORDCHARS(&lt;unused&gt;, char *characters) &rarr; int</b><br />\r\n     This fills the <code class=\"parameter\">characters</code> parameter with all the characters included in words.\r\n     The <code class=\"parameter\">characters</code> parameter must be large enough to hold all of the characters.\r\n     If the <code class=\"parameter\">characters</code> parameter is 0 then the length that should be allocated\r\n     to store the entire set is returned.</p>\r\n\r\n    <p>For multi-byte encodings, this API will not return meaningful values for 0x80 and above.</p>\r\n\r\n    <p><b id=\"SCI_SETWHITESPACECHARS\">SCI_SETWHITESPACECHARS(&lt;unused&gt;, const char *characters)</b><br />\r\n    <b id=\"SCI_GETWHITESPACECHARS\">SCI_GETWHITESPACECHARS(&lt;unused&gt;, char *characters) &rarr; int</b><br />\r\n     Similar to <code>SCI_SETWORDCHARS</code>, this message allows the user to define which chars Scintilla considers\r\n          as whitespace.  Setting the whitespace chars allows the user to fine-tune Scintilla's behaviour doing\r\n          such things as moving the cursor to the start or end of a word; for example, by defining punctuation chars\r\n          as whitespace, they will be skipped over when the user presses ctrl+left or ctrl+right.\r\n          This function should be called after <code>SCI_SETWORDCHARS</code> as it will\r\n          reset the whitespace characters to the default set.\r\n\t  <code>SCI_GETWHITESPACECHARS</code> behaves similarly to <code>SCI_GETWORDCHARS</code>.</p>\r\n\r\n    <p><b id=\"SCI_SETPUNCTUATIONCHARS\">SCI_SETPUNCTUATIONCHARS(&lt;unused&gt;, const char *characters)</b><br />\r\n    <b id=\"SCI_GETPUNCTUATIONCHARS\">SCI_GETPUNCTUATIONCHARS(&lt;unused&gt;, char *characters) &rarr; int</b><br />\r\n     Similar to <code>SCI_SETWORDCHARS</code> and <code>SCI_SETWHITESPACECHARS</code>, this message\r\n     allows the user to define which chars Scintilla considers as punctuation.\r\n\t  <code>SCI_GETPUNCTUATIONCHARS</code> behaves similarly to <code>SCI_GETWORDCHARS</code>.</p>\r\n\r\n    <p><b id=\"SCI_SETCHARSDEFAULT\">SCI_SETCHARSDEFAULT</b><br />\r\n     Use the default sets of word and whitespace characters. This sets whitespace to space, tab and other\r\n     characters with codes less than 0x20, with word characters set to alphanumeric and '_'.\r\n    </p>\r\n\r\n    <p><b id=\"SCI_SETCHARACTERCATEGORYOPTIMIZATION\">SCI_SETCHARACTERCATEGORYOPTIMIZATION(int countCharacters)</b><br />\r\n    <b id=\"SCI_GETCHARACTERCATEGORYOPTIMIZATION\">SCI_GETCHARACTERCATEGORYOPTIMIZATION &rarr; int</b><br />\r\n      Optimize speed of character category features like determining whether a character is a space or number at the expense of memory.\r\n      Mostly used for Unicode documents.\r\n      The <code class=\"parameter\">countCharacters</code> parameter determines how many character starting from 0 are added to a look-up table with one byte used for each character.\r\n      It is reasonable to cover the set of characters likely to be used in a document so 0x100 for simple Roman text,\r\n      0x1000 to cover most simple alphabets, 0x10000 to cover most of East Asian languages, and 0x110000 to cover all possible characters.\r\n    </p>\r\n\r\n    <p>Word keyboard commands are:</p>\r\n    <ul>\r\n    <li class=\"message\" id=\"SCI_WORDLEFT\">SCI_WORDLEFT</li>\r\n    <li class=\"message\" id=\"SCI_WORDLEFTEXTEND\">SCI_WORDLEFTEXTEND</li>\r\n    <li class=\"message\" id=\"SCI_WORDRIGHT\">SCI_WORDRIGHT</li>\r\n    <li class=\"message\" id=\"SCI_WORDRIGHTEXTEND\">SCI_WORDRIGHTEXTEND</li>\r\n    <li class=\"message\" id=\"SCI_WORDLEFTEND\">SCI_WORDLEFTEND</li>\r\n    <li class=\"message\" id=\"SCI_WORDLEFTENDEXTEND\">SCI_WORDLEFTENDEXTEND</li>\r\n    <li class=\"message\" id=\"SCI_WORDRIGHTEND\">SCI_WORDRIGHTEND</li>\r\n    <li class=\"message\" id=\"SCI_WORDRIGHTENDEXTEND\">SCI_WORDRIGHTENDEXTEND</li>\r\n    <li class=\"message\" id=\"SCI_WORDPARTLEFT\">SCI_WORDPARTLEFT</li>\r\n    <li class=\"message\" id=\"SCI_WORDPARTLEFTEXTEND\">SCI_WORDPARTLEFTEXTEND</li>\r\n    <li class=\"message\" id=\"SCI_WORDPARTRIGHT\">SCI_WORDPARTRIGHT</li>\r\n    <li class=\"message\" id=\"SCI_WORDPARTRIGHTEXTEND\">SCI_WORDPARTRIGHTEXTEND</li>\r\n    <li class=\"message\" id=\"SCI_DELWORDLEFT\">SCI_DELWORDLEFT</li>\r\n    <li class=\"message\" id=\"SCI_DELWORDRIGHT\">SCI_DELWORDRIGHT</li>\r\n    <li class=\"message\" id=\"SCI_DELWORDRIGHTEND\">SCI_DELWORDRIGHTEND</li>\r\n    </ul>\r\n\r\n    <h2 id=\"Styling\">Styling</h2>\r\n\r\n    <p>The styling messages allow you to assign styles to text. If your styling needs can be met by\r\n    one of the standard lexers, or if you can write your own, then a lexer is probably the easiest\r\n    way to style your document. If you choose to use the container to do the styling you can use\r\n    the <a class=\"message\" href=\"#SCI_SETILEXER\"><code>SCI_SETILEXER</code></a> command to select\r\n    <code>NULL</code>, in which case the container is sent a <a class=\"message\"\r\n    href=\"#SCN_STYLENEEDED\"><code>SCN_STYLENEEDED</code></a> <a class=\"jump\"\r\n    href=\"#Notifications\">notification</a> each time text needs styling for display. As another\r\n    alternative, you might use idle time to style the document. Even if you use a lexer, you might\r\n    use the styling commands to mark errors detected by a compiler. The following commands can be\r\n    used.</p>\r\n    <code><a class=\"message\" href=\"#SCI_GETENDSTYLED\">SCI_GETENDSTYLED &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_STARTSTYLING\">SCI_STARTSTYLING(position start, int unused)</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETSTYLING\">SCI_SETSTYLING(position length, int style)</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETSTYLINGEX\">SCI_SETSTYLINGEX(position length, const char\r\n    *styles)</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETIDLESTYLING\">SCI_SETIDLESTYLING(int idleStyling)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETIDLESTYLING\">SCI_GETIDLESTYLING &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETLINESTATE\">SCI_SETLINESTATE(line line, int state)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETLINESTATE\">SCI_GETLINESTATE(line line) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETMAXLINESTATE\">SCI_GETMAXLINESTATE &rarr; int</a><br />\r\n    </code>\r\n\r\n    <p><b id=\"SCI_GETENDSTYLED\">SCI_GETENDSTYLED &rarr; position</b><br />\r\n     Scintilla keeps a record of the last character that is likely to be styled correctly. This is\r\n    moved forwards when characters after it are styled and moved backwards if changes are made to\r\n    the text of the document before it. Before drawing text, this position is checked to see if any\r\n    styling is needed and, if so, a <code><a class=\"message\"\r\n    href=\"#SCN_STYLENEEDED\">SCN_STYLENEEDED</a></code> notification message is sent to the\r\n    container. The container can send <code>SCI_GETENDSTYLED</code> to work out where it needs to\r\n    start styling. Scintilla will always ask to style whole lines.</p>\r\n\r\n    <p><b id=\"SCI_STARTSTYLING\">SCI_STARTSTYLING(position start, int unused)</b><br />\r\n     This prepares for styling by setting the styling position <code class=\"parameter\">start</code> to start at.\r\n     The unused argument was used in earlier versions but is now ignored.\r\n     After\r\n    <code>SCI_STARTSTYLING</code>, send multiple <code>SCI_SETSTYLING</code> messages for each\r\n    lexical entity to style or send <code>SCI_SETSTYLINGEX</code> to style in blocks.</p>\r\n\r\n    <p><b id=\"SCI_SETSTYLING\">SCI_SETSTYLING(position length, int style)</b><br />\r\n     This message sets the style of <code class=\"parameter\">length</code> characters starting at the styling position\r\n    and then increases the styling position by <code class=\"parameter\">length</code>, ready for the next call.\r\n    <code>SCI_STARTSTYLING</code> should be called before the first call to this.\r\n    </p>\r\n\r\n    <p><b id=\"SCI_SETSTYLINGEX\">SCI_SETSTYLINGEX(position length, const char *styles)</b><br />\r\n     As an alternative to <code>SCI_SETSTYLING</code>, which applies the same style to each byte,\r\n    you can use this message which specifies the styles for each of <code class=\"parameter\">length</code> bytes from\r\n    the styling position and then increases the styling position by <code class=\"parameter\">length</code>, ready for\r\n    the next call.\r\n    <code>SCI_STARTSTYLING</code> should be called before the first call to this.\r\n    </p>\r\n\r\n    <p><b id=\"SCI_SETIDLESTYLING\">SCI_SETIDLESTYLING(int idleStyling)</b><br />\r\n     <b id=\"SCI_GETIDLESTYLING\">SCI_GETIDLESTYLING &rarr; int</b><br />\r\n     By default, <code>SC_IDLESTYLING_NONE</code> (0),\r\n     syntax styling is performed for all the currently visible text before displaying it.\r\n     On very large files, this may make scrolling down slow.\r\n     With <code>SC_IDLESTYLING_TOVISIBLE</code> (1),\r\n     a small amount of styling is performed before display and then\r\n     further styling is performed incrementally in the background as an idle-time task.\r\n     This may result in the text initially appearing uncoloured and then, some time later, it is coloured.\r\n     Text after the currently visible portion may be styled in the background with <code>SC_IDLESTYLING_AFTERVISIBLE</code> (2).\r\n     To style both before and after the visible text in the background use <code>SC_IDLESTYLING_ALL</code> (3).\r\n    </p>\r\n    <p>\r\n     Since wrapping also needs to perform styling and also uses idle time, this setting has no effect when\r\n     the document is displayed wrapped.\r\n    </p>\r\n\r\n    <p><b id=\"SCI_SETLINESTATE\">SCI_SETLINESTATE(line line, int state)</b><br />\r\n     <b id=\"SCI_GETLINESTATE\">SCI_GETLINESTATE(line line) &rarr; int</b><br />\r\n     As well as the 8 bits of lexical state stored for each character there is also an integer\r\n    stored for each line. This can be used for longer lived parse states such as what the current\r\n    scripting language is in an ASP page. Use <code>SCI_SETLINESTATE</code> to set the integer\r\n    value and <code>SCI_GETLINESTATE</code> to get the value.\r\n    Changing the value produces a <a class=\"message\" href=\"#SC_MOD_CHANGELINESTATE\">SC_MOD_CHANGELINESTATE</a> notification.\r\n    </p>\r\n\r\n    <p><b id=\"SCI_GETMAXLINESTATE\">SCI_GETMAXLINESTATE &rarr; int</b><br />\r\n     This returns the last line that has any line state.\r\n     This has been made less useful by an optimization that always allocates for all lines if any line's state was set.\r\n     It can still distinguish cases where line state was never set for any lines.</p>\r\n\r\n    <h2 id=\"StyleDefinition\">Style definition</h2>\r\n\r\n    <p>While the style setting messages mentioned above change the style numbers associated with\r\n    text, these messages define how those style numbers are interpreted visually. There are 256\r\n    lexer styles that can be set, numbered 0 to <code>STYLE_MAX</code> (255).\r\n    There are also some\r\n    predefined numbered styles starting at 32, The following <code>STYLE_</code>* constants are\r\n    defined.</p>\r\n\r\n    <table class=\"standard\" summary=\"Preset styles\">\r\n      <tbody valign=\"top\">\r\n        <tr>\r\n          <th align=\"left\"><code>STYLE_DEFAULT</code></th>\r\n\r\n          <td>32</td>\r\n\r\n          <td>This style defines the attributes that all styles receive when the\r\n          <code>SCI_STYLECLEARALL</code> message is used.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>STYLE_LINENUMBER</code></th>\r\n\r\n          <td>33</td>\r\n\r\n          <td>This style sets the attributes of the text used to display line numbers in a line\r\n          number margin. The background colour set for this style also sets the background colour\r\n          for all margins that do not have any folding mask bits set. That is, any margin for which\r\n          <code>mask &amp; SC_MASK_FOLDERS</code> is 0. See <a class=\"message\"\r\n          href=\"#SCI_SETMARGINMASKN\"><code>SCI_SETMARGINMASKN</code></a> for more about masks.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>STYLE_BRACELIGHT</code></th>\r\n\r\n          <td>34</td>\r\n\r\n          <td>This style sets the attributes used when highlighting braces with the <a\r\n          class=\"message\" href=\"#BraceHighlighting\"><code>SCI_BRACEHIGHLIGHT</code></a> message and\r\n          when highlighting the corresponding indentation with <a class=\"message\"\r\n          href=\"#SCI_SETHIGHLIGHTGUIDE\"><code>SCI_SETHIGHLIGHTGUIDE</code></a>.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>STYLE_BRACEBAD</code></th>\r\n\r\n          <td>35</td>\r\n\r\n          <td>This style sets the display attributes used when marking an unmatched brace with the\r\n          <a class=\"message\" href=\"#BraceHighlighting\"><code>SCI_BRACEBADLIGHT</code></a>\r\n          message.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>STYLE_CONTROLCHAR</code></th>\r\n\r\n          <td>36</td>\r\n\r\n          <td>This style sets the font used when drawing control characters.\r\n            Only the font, size, bold, italics, and character set attributes are used and not\r\n            the colour attributes. See\r\n          also: <a class=\"message\"\r\n          href=\"#SCI_SETCONTROLCHARSYMBOL\"><code>SCI_SETCONTROLCHARSYMBOL</code></a>.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>STYLE_INDENTGUIDE</code></th>\r\n\r\n          <td>37</td>\r\n\r\n          <td>This style sets the foreground and background colours used when drawing the\r\n          indentation guides.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>STYLE_CALLTIP</code></th>\r\n\r\n          <td>38</td>\r\n\r\n          <td> Call tips normally use the font attributes defined by <code>STYLE_DEFAULT</code>.\r\n          Use of <a class=\"seealso\" href=\"#SCI_CALLTIPUSESTYLE\"><code>SCI_CALLTIPUSESTYLE</code></a>\r\n            causes call tips to use this style instead. Only the font face name, font size,\r\n          foreground and background colours and character set attributes are used.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>STYLE_FOLDDISPLAYTEXT</code></th>\r\n\r\n          <td>39</td>\r\n\r\n          <td>This is the style used for drawing text tags attached to folded text.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>STYLE_LASTPREDEFINED</code></th>\r\n\r\n          <td>39</td>\r\n\r\n          <td>To make it easier for client code to discover the range of styles that are\r\n          predefined, this is set to the style number of the last predefined style.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>STYLE_MAX</code></th>\r\n\r\n          <td>255</td>\r\n\r\n          <td>This is not a style but is the number of the maximum style that can be set. Styles\r\n          between <code>STYLE_LASTPREDEFINED</code> and <code>STYLE_MAX</code> may be used.</td>\r\n        </tr>\r\n      </tbody>\r\n    </table>\r\n\r\n    <p>For each style you can set the font name, size and use of bold, italic and underline,\r\n    foreground and background colour and the character set. You can also choose to hide text with a\r\n    given style, display all characters as upper or lower case and fill from the last character on\r\n    a line to the end of the line (for embedded languages). There is also an experimental attribute\r\n    to make text read-only.</p>\r\n\r\n    <p>It is entirely up to you how you use styles. If you want to use syntax colouring you might\r\n    use style 0 for white space, style 1 for numbers, style 2 for keywords, style 3 for strings,\r\n    style 4 for preprocessor, style 5 for operators, and so on.</p>\r\n    <code><a class=\"message\" href=\"#SCI_STYLERESETDEFAULT\">SCI_STYLERESETDEFAULT</a><br />\r\n    <a class=\"message\" href=\"#SCI_STYLECLEARALL\">SCI_STYLECLEARALL</a><br />\r\n    <a class=\"message\" href=\"#SCI_STYLESETFONT\">SCI_STYLESETFONT(int style, const char\r\n    *fontName)</a><br />\r\n    <a class=\"message\" href=\"#SCI_STYLEGETFONT\">SCI_STYLEGETFONT(int style, char *fontName) &rarr; int</a><br />\r\n    <a class=\"message\" href=\"#SCI_STYLESETSIZE\">SCI_STYLESETSIZE(int style, int\r\n    sizePoints)</a><br />\r\n    <a class=\"message\" href=\"#SCI_STYLEGETSIZE\">SCI_STYLEGETSIZE(int style) &rarr; int</a><br />\r\n    <a class=\"message\" href=\"#SCI_STYLESETSIZEFRACTIONAL\">SCI_STYLESETSIZEFRACTIONAL(int style, int\r\n    sizeHundredthPoints)</a><br />\r\n    <a class=\"message\" href=\"#SCI_STYLEGETSIZEFRACTIONAL\">SCI_STYLEGETSIZEFRACTIONAL(int style) &rarr; int</a><br />\r\n    <a class=\"message\" href=\"#SCI_STYLESETBOLD\">SCI_STYLESETBOLD(int style, bool\r\n    bold)</a><br />\r\n    <a class=\"message\" href=\"#SCI_STYLEGETBOLD\">SCI_STYLEGETBOLD(int style) &rarr; bool</a><br />\r\n    <a class=\"message\" href=\"#SCI_STYLESETWEIGHT\">SCI_STYLESETWEIGHT(int style, int\r\n    weight)</a><br />\r\n    <a class=\"message\" href=\"#SCI_STYLEGETWEIGHT\">SCI_STYLEGETWEIGHT(int style) &rarr; int</a><br />\r\n    <a class=\"message\" href=\"#SCI_STYLESETITALIC\">SCI_STYLESETITALIC(int style, bool\r\n    italic)</a><br />\r\n    <a class=\"message\" href=\"#SCI_STYLEGETITALIC\">SCI_STYLEGETITALIC(int style) &rarr; bool</a><br />\r\n    <a class=\"message\" href=\"#SCI_STYLESETUNDERLINE\">SCI_STYLESETUNDERLINE(int style, bool\r\n    underline)</a><br />\r\n    <a class=\"message\" href=\"#SCI_STYLEGETUNDERLINE\">SCI_STYLEGETUNDERLINE(int style) &rarr; bool</a><br />\r\n    <a class=\"message\" href=\"#SCI_STYLESETFORE\">SCI_STYLESETFORE(int style, colour fore)</a><br />\r\n    <a class=\"message\" href=\"#SCI_STYLEGETFORE\">SCI_STYLEGETFORE(int style) &rarr; colour</a><br />\r\n    <a class=\"message\" href=\"#SCI_STYLESETBACK\">SCI_STYLESETBACK(int style, colour back)</a><br />\r\n    <a class=\"message\" href=\"#SCI_STYLEGETBACK\">SCI_STYLEGETBACK(int style) &rarr; colour</a><br />\r\n    <a class=\"message\" href=\"#SCI_STYLESETEOLFILLED\">SCI_STYLESETEOLFILLED(int style, bool\r\n    eolFilled)</a><br />\r\n    <a class=\"message\" href=\"#SCI_STYLEGETEOLFILLED\">SCI_STYLEGETEOLFILLED(int style) &rarr; bool</a><br />\r\n    <a class=\"message\" href=\"#SCI_STYLESETCHARACTERSET\">SCI_STYLESETCHARACTERSET(int style,\r\n    int characterSet)</a><br />\r\n    <a class=\"message\" href=\"#SCI_STYLEGETCHARACTERSET\">SCI_STYLEGETCHARACTERSET(int style) &rarr; int</a><br />\r\n    <a class=\"message\" href=\"#SCI_STYLESETCASE\">SCI_STYLESETCASE(int style, int\r\n    caseVisible)</a><br />\r\n    <a class=\"message\" href=\"#SCI_STYLEGETCASE\">SCI_STYLEGETCASE(int style) &rarr; int</a><br />\r\n    <a class=\"message\" href=\"#SCI_STYLESETVISIBLE\">SCI_STYLESETVISIBLE(int style, bool\r\n    visible)</a><br />\r\n    <a class=\"message\" href=\"#SCI_STYLEGETVISIBLE\">SCI_STYLEGETVISIBLE(int style) &rarr; bool</a><br />\r\n    <a class=\"message\" href=\"#SCI_STYLESETCHANGEABLE\">SCI_STYLESETCHANGEABLE(int style, bool\r\n    changeable)</a><br />\r\n    <a class=\"message\" href=\"#SCI_STYLEGETCHANGEABLE\">SCI_STYLEGETCHANGEABLE(int style) &rarr; bool</a><br />\r\n     <a class=\"message\" href=\"#SCI_STYLESETHOTSPOT\">SCI_STYLESETHOTSPOT(int style, bool\r\n    hotspot)</a><br />\r\n    <a class=\"message\" href=\"#SCI_STYLEGETHOTSPOT\">SCI_STYLEGETHOTSPOT(int style) &rarr; bool</a><br />\r\n     <a class=\"message\" href=\"#SCI_STYLESETCHECKMONOSPACED\">SCI_STYLESETCHECKMONOSPACED(int style, bool\r\n    checkMonospaced)</a><br />\r\n    <a class=\"message\" href=\"#SCI_STYLEGETCHECKMONOSPACED\">SCI_STYLEGETCHECKMONOSPACED(int style) &rarr; bool</a><br />\r\n    <a class=\"message\" href=\"#SCI_STYLESETINVISIBLEREPRESENTATION\">SCI_STYLESETINVISIBLEREPRESENTATION(int style, const char *representation)</a><br />\r\n    <a class=\"message\" href=\"#SCI_STYLEGETINVISIBLEREPRESENTATION\">SCI_STYLEGETINVISIBLEREPRESENTATION(int style, char *representation NUL-terminated) &rarr; int</a><br />\r\n    <a class=\"message\" href=\"#SCI_SETFONTLOCALE\">SCI_SETFONTLOCALE(&lt;unused&gt;, const char *localeName)</a><br />\r\n    <a class=\"message\" href=\"#SCI_GETFONTLOCALE\">SCI_GETFONTLOCALE(&lt;unused&gt;, char *localeName) &rarr; int</a><br />\r\n    </code>\r\n\r\n    <p><b id=\"SCI_STYLERESETDEFAULT\">SCI_STYLERESETDEFAULT</b><br />\r\n     This message resets <code>STYLE_DEFAULT</code> to its state when Scintilla was\r\n    initialised.</p>\r\n\r\n    <p><b id=\"SCI_STYLECLEARALL\">SCI_STYLECLEARALL</b><br />\r\n     This message sets all styles to have the same attributes as <code>STYLE_DEFAULT</code>. If you\r\n    are setting up Scintilla for syntax colouring, it is likely that the lexical styles you set\r\n    will be very similar. One way to set the styles is to:<br />\r\n     1. Set <code>STYLE_DEFAULT</code> to the common features of all styles.<br />\r\n     2. Use <code>SCI_STYLECLEARALL</code> to copy this to all styles.<br />\r\n     3. Set the style attributes that make your lexical styles different.</p>\r\n\r\n    <p><b id=\"SCI_STYLESETFONT\">SCI_STYLESETFONT(int style, const char *fontName)</b><br />\r\n    <b id=\"SCI_STYLEGETFONT\">SCI_STYLEGETFONT(int style, char *fontName NUL-terminated) &rarr; int</b><br />\r\n    <b id=\"SCI_STYLESETSIZE\">SCI_STYLESETSIZE(int style, int sizePoints)</b><br />\r\n    <b id=\"SCI_STYLEGETSIZE\">SCI_STYLEGETSIZE(int style) &rarr; int</b><br />\r\n    <b id=\"SCI_STYLESETSIZEFRACTIONAL\">SCI_STYLESETSIZEFRACTIONAL(int style, int sizeHundredthPoints)</b><br />\r\n    <b id=\"SCI_STYLEGETSIZEFRACTIONAL\">SCI_STYLEGETSIZEFRACTIONAL(int style) &rarr; int</b><br />\r\n    <b id=\"SCI_STYLESETBOLD\">SCI_STYLESETBOLD(int style, bool bold)</b><br />\r\n    <b id=\"SCI_STYLEGETBOLD\">SCI_STYLEGETBOLD(int style) &rarr; bool</b><br />\r\n    <b id=\"SCI_STYLESETWEIGHT\">SCI_STYLESETWEIGHT(int style, int weight)</b><br />\r\n    <b id=\"SCI_STYLEGETWEIGHT\">SCI_STYLEGETWEIGHT(int style) &rarr; int</b><br />\r\n    <b id=\"SCI_STYLESETITALIC\">SCI_STYLESETITALIC(int style, bool italic)</b><br />\r\n    <b id=\"SCI_STYLEGETITALIC\">SCI_STYLEGETITALIC(int style) &rarr; bool</b><br />\r\n     These messages (plus <a class=\"message\"\r\n    href=\"#SCI_STYLESETCHARACTERSET\"><code>SCI_STYLESETCHARACTERSET</code></a>) set the font\r\n    attributes that are used to match the fonts you request to those available.</p>\r\n    <p>The\r\n    <code class=\"parameter\">fontName</code> is a zero terminated string holding the name of a font. Under Windows,\r\n    only the first 32 characters of the name are used, the name is decoded as UTF-8, and the name is not case sensitive. For\r\n    internal caching, Scintilla tracks fonts by name and does care about the casing of font names,\r\n    so please be consistent.\r\n    On GTK, Pango is used to display text and the name is sent directly to Pango without transformation.\r\n    On Qt, the name is decoded as UTF-8.\r\n    On Cocoa, the name is decoded as MacRoman.</p>\r\n    <p>Sizes can be set to a whole number of points with <code>SCI_STYLESETSIZE</code>\r\n    or to a fractional point size in hundredths of a point with <code>SCI_STYLESETSIZEFRACTIONAL</code>\r\n    by multiplying the size by 100 (<code>SC_FONT_SIZE_MULTIPLIER</code>).\r\n    For example, a text size of 9.4 points is set with <code>SCI_STYLESETSIZEFRACTIONAL(&lt;style&gt;, 940)</code>.\r\n    </p>\r\n    <p>The weight or boldness of a font can be set with <code>SCI_STYLESETBOLD</code>\r\n    or <code>SCI_STYLESETWEIGHT</code>. The weight is a number between 1 and 999 with 1 being very light\r\n    and 999 very heavy. While any value can be used, fonts often only support between 2 and 4 weights with three weights\r\n    being common enough to have symbolic names:\r\n    <code>SC_WEIGHT_NORMAL</code> (400),\r\n    <code>SC_WEIGHT_SEMIBOLD</code> (600), and\r\n    <code>SC_WEIGHT_BOLD</code> (700).\r\n    The <code>SCI_STYLESETBOLD</code> message takes a boolean argument with 0 choosing <code>SC_WEIGHT_NORMAL</code>\r\n    and 1 <code>SC_WEIGHT_BOLD</code>.\r\n    </p>\r\n\r\n    <p><b id=\"SCI_STYLESETUNDERLINE\">SCI_STYLESETUNDERLINE(int style, bool\r\n    underline)</b><br />\r\n    <b id=\"SCI_STYLEGETUNDERLINE\">SCI_STYLEGETUNDERLINE(int style) &rarr; bool</b><br />\r\n    You can set a style to be underlined. The underline is drawn in the foreground colour. All\r\n    characters with a style that includes the underline attribute are underlined, even if they are\r\n    white space.</p>\r\n\r\n    <p><b id=\"SCI_STYLESETFORE\">SCI_STYLESETFORE(int style, <a class=\"jump\" href=\"#colour\">colour</a> fore)</b><br />\r\n    <b id=\"SCI_STYLEGETFORE\">SCI_STYLEGETFORE(int style) &rarr; colour</b><br />\r\n    <b id=\"SCI_STYLESETBACK\">SCI_STYLESETBACK(int style, <a class=\"jump\" href=\"#colour\">colour</a> back)</b><br />\r\n    <b id=\"SCI_STYLEGETBACK\">SCI_STYLEGETBACK(int style) &rarr; colour</b><br />\r\n    Text is drawn in the foreground colour. The space in each character cell that is not occupied\r\n    by the character is drawn in the background colour.</p>\r\n\r\n    <p><b id=\"SCI_STYLESETEOLFILLED\">SCI_STYLESETEOLFILLED(int style, bool\r\n    eolFilled)</b><br />\r\n    <b id=\"SCI_STYLEGETEOLFILLED\">SCI_STYLEGETEOLFILLED(int style) &rarr; bool</b><br />\r\n    If the last character in the line has a style with this attribute set, the remainder of the\r\n    line up to the right edge of the window is filled with the background colour set for the last\r\n    character. This is useful when a document contains embedded sections in another language such\r\n    as HTML pages with embedded JavaScript. By setting <code class=\"parameter\">eolFilled</code> to <code>true</code>\r\n    and a consistent background colour (different from the background colour set for the HTML\r\n    styles) to all JavaScript styles then JavaScript sections will be easily distinguished from\r\n    HTML.</p>\r\n\r\n    <p><b id=\"SCI_STYLESETCHARACTERSET\">SCI_STYLESETCHARACTERSET(int style, int\r\n    characterSet)</b><br />\r\n    <b id=\"SCI_STYLEGETCHARACTERSET\">SCI_STYLEGETCHARACTERSET(int style) &rarr; int</b><br />\r\n    You can set a style to use a different character set than the default. The places where such\r\n    characters sets are likely to be useful are comments and literal strings. For example,\r\n    <code>SCI_STYLESETCHARACTERSET(SCE_C_STRING, SC_CHARSET_RUSSIAN)</code> would ensure that\r\n    strings in Russian would display correctly in C and C++ (<code>SCE_C_STRING</code> is the style\r\n    number used by the C and C++ lexer to display literal strings; it has the value 6). This\r\n    feature works differently on Windows and GTK.<br />\r\n    The default character set is <code>SC_CHARSET_DEFAULT</code>.</p>\r\n    <p><code>SC_CHARSET_ANSI</code> and <code>SC_CHARSET_DEFAULT</code> specify European Windows code page 1252 unless the code page is set.</p>\r\n\r\n<table class=\"standard\" summary=\"Character Sets supported\"><tbody>\r\n  <tr>\r\n    <th>Character Set</th>\r\n    <th>Windows</th>\r\n    <th>GTK</th>\r\n    <th>Cocoa</th></tr></tbody>\r\n  <tbody>\r\n  <tr>\r\n    <td><code>SC_CHARSET_ANSI</code></td>\r\n    <td>&check;</td>\r\n    <td>&check;</td>\r\n    <td>&check; (8859-1)</td></tr>\r\n   <tr>\r\n    <td><code>SC_CHARSET_ARABIC</code></td>\r\n    <td>&check;</td>\r\n    <td></td>\r\n    <td>&check;</td></tr>\r\n   <tr>\r\n    <td><code>SC_CHARSET_BALTIC</code></td>\r\n    <td>&check;</td>\r\n    <td></td>\r\n    <td>&check;</td></tr>\r\n   <tr>\r\n    <td><code>SC_CHARSET_CHINESEBIG5</code></td>\r\n    <td>&check;</td>\r\n    <td></td>\r\n    <td>&check;</td></tr>\r\n   <tr>\r\n    <td><code>SC_CHARSET_DEFAULT</code></td>\r\n    <td>&check;</td>\r\n    <td>&check; (8859-1)</td>\r\n    <td>&check; (8859-1)</td></tr>\r\n   <tr>\r\n    <td><code>SC_CHARSET_EASTEUROPE</code></td>\r\n    <td>&check;</td>\r\n    <td>&check;</td>\r\n    <td>&check;</td></tr>\r\n   <tr>\r\n    <td><code>SC_CHARSET_GB2312</code></td>\r\n    <td>&check;</td>\r\n    <td>&check;</td>\r\n    <td>&check;</td></tr>\r\n   <tr>\r\n    <td><code>SC_CHARSET_GREEK</code></td>\r\n    <td>&check;</td>\r\n    <td></td>\r\n    <td>&check;</td></tr>\r\n   <tr>\r\n    <td><code>SC_CHARSET_HANGUL</code></td>\r\n    <td>&check;</td>\r\n    <td>&check;</td>\r\n    <td>&check;</td></tr>\r\n   <tr>\r\n    <td><code>SC_CHARSET_HEBREW</code></td>\r\n    <td>&check;</td>\r\n    <td></td>\r\n    <td>&check;</td></tr>\r\n   <tr>\r\n    <td><code>SC_CHARSET_JOHAB</code></td>\r\n    <td>&check;</td>\r\n    <td></td>\r\n    <td>&check;</td></tr>\r\n   <tr>\r\n    <td><code>SC_CHARSET_MAC</code></td>\r\n    <td>&check;</td>\r\n    <td></td>\r\n    <td>&check;</td></tr>\r\n   <tr>\r\n    <td><code>SC_CHARSET_OEM</code></td>\r\n    <td>&check;</td>\r\n    <td></td>\r\n    <td>&check;</td></tr>\r\n   <tr>\r\n    <td><code>SC_CHARSET_RUSSIAN</code></td>\r\n    <td>&check; (cp1251)</td>\r\n    <td>&check; (koi8-r)</td>\r\n    <td>&check; (cp1251)</td></tr>\r\n   <tr>\r\n    <td><code>SC_CHARSET_SHIFTJIS</code></td>\r\n    <td>&check;</td>\r\n    <td>&check;</td>\r\n    <td>&check;</td></tr>\r\n   <tr>\r\n    <td><code>SC_CHARSET_SYMBOL</code></td>\r\n    <td>&check;</td>\r\n    <td></td>\r\n    <td>&check;</td></tr>\r\n   <tr>\r\n    <td><code>SC_CHARSET_THAI</code></td>\r\n    <td>&check;</td>\r\n    <td></td>\r\n    <td>&check;</td></tr>\r\n   <tr>\r\n    <td><code>SC_CHARSET_TURKISH</code></td>\r\n    <td>&check;</td>\r\n    <td></td>\r\n    <td>&check;</td></tr>\r\n   <tr>\r\n    <td><code>SC_CHARSET_VIETNAMESE</code></td>\r\n    <td>&check;</td>\r\n    <td></td>\r\n    <td>&check;</td></tr>\r\n   <tr>\r\n    <td><code>SC_CHARSET_OEM866</code></td>\r\n    <td></td>\r\n    <td>&check; (cp866)</td>\r\n    <td></td></tr>\r\n   <tr>\r\n    <td><code>SC_CHARSET_CYRILLIC</code></td>\r\n    <td></td>\r\n    <td>&check; (cp1251)</td>\r\n    <td>&check; (cp1251)</td></tr>\r\n   <tr>\r\n    <td><code>SC_CHARSET_8859_15</code></td>\r\n    <td></td>\r\n    <td>&check;</td>\r\n    <td>&check;</td></tr>\r\n</tbody></table>\r\n\r\n    <p><b id=\"SCI_STYLESETCASE\">SCI_STYLESETCASE(int style, int caseVisible)</b><br />\r\n    <b id=\"SCI_STYLEGETCASE\">SCI_STYLEGETCASE(int style) &rarr; int</b><br />\r\n    The value of <code>caseVisible</code> determines how text is displayed. You can set upper case\r\n    (<code>SC_CASE_UPPER</code>, 1) or lower case (<code>SC_CASE_LOWER</code>, 2) or camel case (<code>SC_CASE_CAMEL</code>, 3)\r\n    or display normally (<code>SC_CASE_MIXED</code>, 0). This does not change the stored text, only how it is\r\n    displayed.</p>\r\n\r\n    <p><b id=\"SCI_STYLESETVISIBLE\">SCI_STYLESETVISIBLE(int style, bool visible)</b><br />\r\n    <b id=\"SCI_STYLEGETVISIBLE\">SCI_STYLEGETVISIBLE(int style) &rarr; bool</b><br />\r\n    Text is normally visible. However, you can completely hide it by giving it a style with the\r\n    <code class=\"parameter\">visible</code> set to 0. This could be used to hide embedded formatting instructions or\r\n    hypertext keywords in HTML or XML.\r\n    Invisible text may not be deleted by user actions but the application may delete invisible text by calling\r\n    <a class=\"seealso\" href=\"#SCI_DELETERANGE\">SCI_DELETERANGE</a>.</p>\r\n\r\n    <p><b id=\"SCI_STYLESETCHANGEABLE\">SCI_STYLESETCHANGEABLE(int style, bool\r\n    changeable)</b><br />\r\n    <b id=\"SCI_STYLEGETCHANGEABLE\">SCI_STYLEGETCHANGEABLE(int style) &rarr; bool</b><br />\r\n    This is an experimental and incompletely implemented style attribute. The default setting is\r\n    <code class=\"parameter\">changeable</code> set <code>true</code> but when set <code>false</code> it makes text\r\n    read-only. The user can not move the caret within not-changeable text and not-changeable\r\n    text may not be deleted by the user.\r\n    The application may delete not-changeable text by calling\r\n    <a class=\"seealso\" href=\"#SCI_DELETERANGE\">SCI_DELETERANGE</a>.</p>\r\n\r\n    <p><b id=\"SCI_STYLESETHOTSPOT\">SCI_STYLESETHOTSPOT(int style, bool\r\n    hotspot)</b><br />\r\n    <b id=\"SCI_STYLEGETHOTSPOT\">SCI_STYLEGETHOTSPOT(int style) &rarr; bool</b><br />\r\n    This style is used to mark ranges of text that can detect mouse clicks.\r\n    The cursor changes to a hand over hotspots, and the foreground, and background colours\r\n    may change and an underline appear to indicate that these areas are sensitive to clicking.\r\n    This may be used to allow hyperlinks to other documents.</p>\r\n\r\n    <p><b id=\"SCI_STYLESETCHECKMONOSPACED\">SCI_STYLESETCHECKMONOSPACED(int style, bool\r\n    checkMonospaced)</b><br />\r\n    <b id=\"SCI_STYLEGETCHECKMONOSPACED\">SCI_STYLEGETCHECKMONOSPACED(int style) &rarr; bool</b><br />\r\n    This attribute indicates that the font may be monospaced over the ASCII graphics characters (' ' &hellip; '~',\r\n    including letters ('a'&hellip;'z', 'A'&hellip;'Z') and numbers ('0'&hellip;'9')).\r\n    This allows optimizing speed and memory use for some common scenarios where documents are mostly composed from ASCII\r\n    characters.</p>\r\n    <p>\r\n    Fonts are rarely monospaced over all possible characters.\r\n    Emoji '&#x1F603;', Arabic characters '&#x0634;' and Chinese ideographs '&#x6F22;' are often different widths to Roman letters.\r\n    Even when a font is designed as monospaced, not all characters may be present\r\n    and platforms may substitute other fonts for any missing characters with the substitute characters taking more or less space.\r\n    However, fonts are often reliably monospaced over ASCII text (disregarding control characters) and many documents contain\r\n    mostly ASCII characters.\r\n    This setting allows simplified position calculations for text runs that are purely ASCII graphics characters.\r\n    </p>\r\n    <p>\r\n    Before treating the font as monospaced, it is first checked over the ' ' &hellip; '~' range and for some known combinations of characters\r\n    that may have different spacings because of kerning or ligatures.\r\n    Applications may apply the 'check monospaced' attribute just to fonts known to be monospaced or on all fonts, leaving it to Scintilla to\r\n    reject fonts that are proportional.</p>\r\n\r\n    <p><b id=\"SCI_STYLESETINVISIBLEREPRESENTATION\">SCI_STYLESETINVISIBLEREPRESENTATION(int style, const char *representation)</b><br />\r\n    <b id=\"SCI_STYLEGETINVISIBLEREPRESENTATION\">SCI_STYLEGETINVISIBLEREPRESENTATION(int style, char *representation NUL-terminated) &rarr; int</b><br />\r\n     When a style is made invisible with <a class=\"seealso\" href=\"#SCI_STYLESETVISIBLE\">SCI_STYLESETVISIBLE</a>, text is difficult to edit as\r\n     the cursor can be at both sides of the invisible text segment. With these messages invisible text segements can be made visible with a single\r\n     UTF8 characater giving the user an indication if the cursor is left or right of the invisible text. The character is displayed using the current style.</p>\r\n\r\n    <p>The <code>representation</code> parameter is a zero terminated string holding the one character used to represent the invisible text segment. Only the first character\r\n    is used, the character is decoded as UTF-8.</p>\r\n\r\n    <p><b id=\"SCI_SETFONTLOCALE\">SCI_SETFONTLOCALE(&lt;unused&gt;, const char *localeName)</b><br />\r\n    <b id=\"SCI_GETFONTLOCALE\">SCI_GETFONTLOCALE(&lt;unused&gt;, char *localeName NUL-terminated) &rarr; int</b><br />\r\n     These messages set the locale used for font selection with language-dependent glyphs.\r\n     It may, depending on platform and other circumstances influence the display of text, so setting \"zh-Hant\" may result in traditional\r\n     Chinese display and \"zh-Hans\" may result in simplified Chinese display.\r\n     It is currently only implemented for Win32 using DirectWrite where the value is passed as the localeName argument to CreateTextFormat.\r\n     The default value is US English \"en-us\".\r\n    </p>\r\n\r\n    <h2 id=\"ElementColours\">Element colours</h2>\r\n\r\n    <p>The colours of some visual elements can be changed with these methods.\r\n    The available elements often have a defined default colour, sometimes from the system but also from Scintilla.\r\n    There may be a range of colours and setting an element colour overrides these colours.</p>\r\n\r\n    <code>\r\n    <a class=\"message\" href=\"#SCI_SETELEMENTCOLOUR\">SCI_SETELEMENTCOLOUR(int element, colouralpha colourElement)</a><br />\r\n    <a class=\"message\" href=\"#SCI_GETELEMENTCOLOUR\">SCI_GETELEMENTCOLOUR(int element) &rarr; colouralpha</a><br />\r\n    <a class=\"message\" href=\"#SCI_RESETELEMENTCOLOUR\">SCI_RESETELEMENTCOLOUR(int element)</a><br />\r\n    <a class=\"message\" href=\"#SCI_GETELEMENTISSET\">SCI_GETELEMENTISSET(int element) &rarr; bool</a><br />\r\n    <a class=\"message\" href=\"#SCI_GETELEMENTALLOWSTRANSLUCENT\">SCI_GETELEMENTALLOWSTRANSLUCENT(int element) &rarr; bool</a><br />\r\n    <a class=\"message\" href=\"#SCI_GETELEMENTBASECOLOUR\">SCI_GETELEMENTBASECOLOUR(int element) &rarr; colouralpha</a><br />\r\n    </code>\r\n\r\n    <p>\r\n    <b id=\"SCI_SETELEMENTCOLOUR\">SCI_SETELEMENTCOLOUR(int element, <a class=\"jump\" href=\"#colouralpha\">colouralpha</a> colourElement)</b><br />\r\n    <b id=\"SCI_GETELEMENTCOLOUR\">SCI_GETELEMENTCOLOUR(int element) &rarr; colouralpha</b><br />\r\n     This changes the colour of the indicated visual element overriding any current colour.\r\n     If the element supports translucency, then the alpha portion of the value is used.\r\n     An opaque alpha value (0xff) should always be included when an opaque colour is desired as the value 0\r\n     is completely transparent and thus invisible.\r\n     </p>\r\n\r\n    <p>\r\n    <b id=\"SCI_RESETELEMENTCOLOUR\">SCI_RESETELEMENTCOLOUR(int element)</b><br />\r\n     This removes the element colour returning to the default colour or set of colours.\r\n     </p>\r\n\r\n    <p>\r\n    <b id=\"SCI_GETELEMENTISSET\">SCI_GETELEMENTISSET(int element) &rarr; bool</b><br />\r\n     Returns true when an element colour has been set. When false indicates that a default colour or set of colours is displayed.\r\n     </p>\r\n\r\n    <p>\r\n    <b id=\"SCI_GETELEMENTALLOWSTRANSLUCENT\">SCI_GETELEMENTALLOWSTRANSLUCENT(int element) &rarr; bool</b><br />\r\n     Returns true when the element currently allows translucent drawing when an alpha component is included.\r\n     This may change based on circumstances - different platforms or graphics technologies may implement translucency\r\n     and newer versions of Scintilla may implement translucency for elements that did not previously support it.\r\n     </p>\r\n\r\n    <p>\r\n    <b id=\"SCI_GETELEMENTBASECOLOUR\">SCI_GETELEMENTBASECOLOUR(int element) &rarr; colouralpha</b><br />\r\n     Returns the default colour of an element.\r\n     This may be a value defined by Scintilla or it may be derived from the operating system or platform.\r\n     Which values are set from the operating system may differ between operating systems and operating system versions.\r\n     When undefined the return value is 0 which is equivalent to completely transparent black.\r\n     These colours may be useful when defining styles with similarities such as synthesizing dark\r\n     mode styles that use the same colours as the system</p>\r\n     <p>On Win32, autocompletion list colours like <code>SC_ELEMENT_LIST</code> are currently provided by the platform layer and\r\n     on Cocoa, selection background colours like <code>SC_ELEMENT_SELECTION_BACK</code> are provided.\r\n     </p>\r\n\r\n     <table class=\"standard\" summary=\"Elements\">\r\n      <thead align=\"left\">\r\n        <tr>\r\n          <th><code>SC_ELEMENT_</code>*</th>\r\n\r\n          <th>Value</th>\r\n\r\n          <th>Translucent?</th>\r\n\r\n          <th>Active</th>\r\n\r\n          <th>Base</th>\r\n\r\n          <th>Description</th>\r\n        </tr>\r\n      </thead>\r\n       <tbody valign=\"top\">\r\n         <tr class=\"section\">\r\n           <th align=\"left\"><code>SC_ELEMENT_LIST</code></th>\r\n           <td>0</td>\r\n           <td>Opaque</td>\r\n           <td>Win32</td>\r\n           <td>Win32</td>\r\n           <td>Text colour in autocompletion lists</td>\r\n         </tr>\r\n         <tr>\r\n           <th align=\"left\"><code>SC_ELEMENT_LIST_BACK</code></th>\r\n           <td>1</td>\r\n           <td>Opaque</td>\r\n           <td>Win32</td>\r\n           <td>Win32</td>\r\n           <td>Background colour of autocompletion lists</td>\r\n         </tr>\r\n         <tr>\r\n           <th align=\"left\"><code>SC_ELEMENT_LIST_SELECTED</code></th>\r\n           <td>2</td>\r\n           <td>Opaque</td>\r\n           <td>Win32</td>\r\n           <td>Win32</td>\r\n           <td>Text colour of selected item in autocompletion lists</td>\r\n         </tr>\r\n         <tr>\r\n           <th align=\"left\"><code>SC_ELEMENT_LIST_SELECTED_BACK</code></th>\r\n           <td>3</td>\r\n           <td>Opaque</td>\r\n           <td>Win32</td>\r\n           <td>Win32</td>\r\n           <td>Background colour of selected item in autocompletion lists</td>\r\n         </tr>\r\n         <tr class=\"section\">\r\n           <th align=\"left\"><code>SC_ELEMENT_SELECTION_TEXT</code></th>\r\n           <td>10</td>\r\n           <td>Translucent</td>\r\n           <td>All</td>\r\n           <td></td>\r\n           <td>Text colour of main selection</td>\r\n         </tr>\r\n         <tr>\r\n           <th align=\"left\"><code>SC_ELEMENT_SELECTION_BACK</code></th>\r\n           <td>11</td>\r\n           <td>Translucent</td>\r\n           <td>All</td>\r\n           <td>Cocoa</td>\r\n           <td>Background colour of main selection</td>\r\n         </tr>\r\n         <tr>\r\n           <th align=\"left\"><code>SC_ELEMENT_SELECTION_ADDITIONAL_TEXT</code></th>\r\n           <td>12</td>\r\n           <td>Translucent</td>\r\n           <td>All</td>\r\n           <td></td>\r\n           <td>Text colour of additional selections</td>\r\n         </tr>\r\n         <tr>\r\n           <th align=\"left\"><code>SC_ELEMENT_SELECTION_ADDITIONAL_BACK</code></th>\r\n           <td>13</td>\r\n           <td>Translucent</td>\r\n           <td>All</td>\r\n           <td>Cocoa</td>\r\n           <td>Background colour of additional selections</td>\r\n         </tr>\r\n         <tr>\r\n           <th align=\"left\"><code>SC_ELEMENT_SELECTION_SECONDARY_TEXT</code></th>\r\n           <td>14</td>\r\n           <td>Translucent</td>\r\n           <td>All</td>\r\n           <td></td>\r\n           <td>Text colour of selections when another window contains the primary selection</td>\r\n         </tr>\r\n         <tr>\r\n           <th align=\"left\"><code>SC_ELEMENT_SELECTION_SECONDARY_BACK</code></th>\r\n           <td>15</td>\r\n           <td>Translucent</td>\r\n           <td>All</td>\r\n           <td></td>\r\n           <td>Background colour of selections when another window contains the primary selection</td>\r\n         </tr>\r\n         <tr>\r\n           <th align=\"left\"><code>SC_ELEMENT_SELECTION_INACTIVE_TEXT</code></th>\r\n           <td>16</td>\r\n           <td>Translucent</td>\r\n           <td>All</td>\r\n           <td></td>\r\n           <td>Text colour of selections when another window has focus</td>\r\n         </tr>\r\n         <tr>\r\n           <th align=\"left\"><code>SC_ELEMENT_SELECTION_INACTIVE_BACK</code></th>\r\n           <td>17</td>\r\n           <td>Translucent</td>\r\n           <td>All</td>\r\n           <td>Cocoa</td>\r\n           <td>Background colour of selections when another window has focus</td>\r\n         </tr>\r\n         <tr>\r\n           <th align=\"left\"><code>SC_ELEMENT_SELECTION_INACTIVE_ADDITIONAL_TEXT</code></th>\r\n           <td>18</td>\r\n           <td>Translucent</td>\r\n           <td>All</td>\r\n           <td></td>\r\n           <td>Text colour of additional selections when another window has focus</td>\r\n         </tr>\r\n         <tr>\r\n           <th align=\"left\"><code>SC_ELEMENT_SELECTION_INACTIVE_ADDITIONAL_BACK</code></th>\r\n           <td>19</td>\r\n           <td>Translucent</td>\r\n           <td>All</td>\r\n           <td></td>\r\n           <td>Background colour of additional selections when another window has focus</td>\r\n         </tr>\r\n         <tr class=\"section\">\r\n           <th align=\"left\"><code>SC_ELEMENT_CARET</code></th>\r\n           <td>40</td>\r\n           <td>Translucent</td>\r\n           <td>All</td>\r\n           <td></td>\r\n           <td>Colour of caret for main selection</td>\r\n         </tr>\r\n         <tr>\r\n           <th align=\"left\"><code>SC_ELEMENT_CARET_ADDITIONAL</code></th>\r\n           <td>41</td>\r\n           <td>Translucent</td>\r\n           <td>All</td>\r\n           <td></td>\r\n           <td>Colour of caret for additional selections</td>\r\n         </tr>\r\n         <tr class=\"section\">\r\n           <th align=\"left\"><code>SC_ELEMENT_CARET_LINE_BACK</code></th>\r\n           <td>50</td>\r\n           <td>Translucent</td>\r\n           <td>All</td>\r\n           <td></td>\r\n           <td>Colour of caret line background</td>\r\n         </tr>\r\n         <tr class=\"section\">\r\n           <th align=\"left\"><code>SC_ELEMENT_WHITE_SPACE</code></th>\r\n           <td>60</td>\r\n           <td>Translucent</td>\r\n           <td>All</td>\r\n           <td></td>\r\n           <td>Colour of visible white space</td>\r\n         </tr>\r\n         <tr>\r\n           <th align=\"left\"><code>SC_ELEMENT_WHITE_SPACE_BACK</code></th>\r\n           <td>61</td>\r\n           <td>Opaque</td>\r\n           <td>All</td>\r\n           <td></td>\r\n           <td>Colour of visible white space background</td>\r\n         </tr>\r\n         <tr class=\"section\">\r\n           <th align=\"left\"><code>SC_ELEMENT_HOT_SPOT_ACTIVE</code></th>\r\n           <td>70</td>\r\n           <td>Translucent</td>\r\n           <td>All</td>\r\n           <td></td>\r\n           <td>Text colour of active hot spot</td>\r\n         </tr>\r\n         <tr>\r\n           <th align=\"left\"><code>SC_ELEMENT_HOT_SPOT_ACTIVE_BACK</code></th>\r\n           <td>71</td>\r\n           <td>Opaque</td>\r\n           <td>All</td>\r\n           <td></td>\r\n           <td>Background colour of active hot spot</td>\r\n         </tr>\r\n         <tr class=\"section\">\r\n           <th align=\"left\"><code>SC_ELEMENT_FOLD_LINE</code></th>\r\n           <td>80</td>\r\n           <td>Translucent</td>\r\n           <td>All</td>\r\n           <td></td>\r\n           <td>Colour of fold lines</td>\r\n         </tr>\r\n         <tr>\r\n           <th align=\"left\"><code>SC_ELEMENT_HIDDEN_LINE</code></th>\r\n           <td>81</td>\r\n           <td>Translucent</td>\r\n           <td>All</td>\r\n           <td></td>\r\n           <td>Colour of line drawn to show there are lines hidden at that point</td>\r\n         </tr>\r\n       </tbody>\r\n     </table>\r\n\r\n    <h2 id=\"CaretAndSelectionStyles\">Selection, caret, and hotspot styles</h2>\r\n\r\n    <p>The selection is shown by changing the text and/or background colours.\r\n    If the selected text colour is not set then that attribute is not changed for the selection.\r\n    The default is to show the\r\n    selection by changing the background and leaving the foreground the same as when\r\n    it was not selected. When there is no selection, the current insertion point is marked by the\r\n    text caret. This is a vertical line that is normally blinking on and off to attract the users\r\n    attention.</p>\r\n    <p>On most platforms, a default grey selection background is used but, on macOS, the system-defined\r\n    selection background is used. The application can call APIs to change the colours used.</p>\r\n    <code>\r\n    <a class=\"element\" href=\"#SC_ELEMENT_SELECTION_TEXT\">SC_ELEMENT_SELECTION_TEXT : colouralpha</a><br />\r\n    <a class=\"discouraged message\" href=\"#SCI_SETSELFORE\">SCI_SETSELFORE(bool useSetting, colour fore)</a><br />\r\n    <a class=\"element\" href=\"#SC_ELEMENT_SELECTION_BACK\">SC_ELEMENT_SELECTION_BACK : colouralpha</a><br />\r\n    <a class=\"discouraged message\" href=\"#SCI_SETSELBACK\">SCI_SETSELBACK(bool useSetting, colour back)</a><br />\r\n    <a class=\"message\" href=\"#SCI_SETSELECTIONLAYER\">SCI_SETSELECTIONLAYER(int layer)</a><br />\r\n    <a class=\"message\" href=\"#SCI_GETSELECTIONLAYER\">SCI_GETSELECTIONLAYER &rarr; int</a><br />\r\n    <a class=\"discouraged message\" href=\"#SCI_SETSELALPHA\">SCI_SETSELALPHA(alpha alpha)</a><br />\r\n    <a class=\"discouraged message\" href=\"#SCI_GETSELALPHA\">SCI_GETSELALPHA &rarr; int</a><br />\r\n    <a class=\"message\" href=\"#SCI_SETSELEOLFILLED\">SCI_SETSELEOLFILLED(bool filled)</a><br />\r\n    <a class=\"message\" href=\"#SCI_GETSELEOLFILLED\">SCI_GETSELEOLFILLED &rarr; bool</a><br />\r\n    <br />\r\n    <a class=\"element\" href=\"#SC_ELEMENT_CARET\">SC_ELEMENT_CARET : colouralpha</a><br />\r\n    <a class=\"discouraged message\" href=\"#SCI_SETCARETFORE\">SCI_SETCARETFORE(colour fore)</a><br />\r\n    <a class=\"discouraged message\" href=\"#SCI_GETCARETFORE\">SCI_GETCARETFORE &rarr; colour</a><br />\r\n    <br />\r\n    <a class=\"element\" href=\"#SC_ELEMENT_SELECTION_SECONDARY_TEXT\">SC_ELEMENT_SELECTION_SECONDARY_TEXT : colouralpha</a><br />\r\n    <a class=\"element\" href=\"#SC_ELEMENT_SELECTION_SECONDARY_BACK\">SC_ELEMENT_SELECTION_SECONDARY_BACK : colouralpha</a><br />\r\n    <br />\r\n    <a class=\"element\" href=\"#SC_ELEMENT_SELECTION_INACTIVE_TEXT\">SC_ELEMENT_SELECTION_INACTIVE_TEXT : colouralpha</a><br />\r\n    <a class=\"element\" href=\"#SC_ELEMENT_SELECTION_INACTIVE_BACK\">SC_ELEMENT_SELECTION_INACTIVE_BACK : colouralpha</a><br />\r\n    <a class=\"element\" href=\"#SC_ELEMENT_SELECTION_INACTIVE_TEXT\">SC_ELEMENT_SELECTION_INACTIVE_ADDITIONAL_TEXT : colouralpha</a><br />\r\n    <a class=\"element\" href=\"#SC_ELEMENT_SELECTION_INACTIVE_BACK\">SC_ELEMENT_SELECTION_INACTIVE_ADDITIONAL_BACK : colouralpha</a><br />\r\n    <br />\r\n    <a class=\"element\" href=\"#SC_ELEMENT_CARET_LINE_BACK\">SC_ELEMENT_CARET_LINE_BACK : colouralpha</a><br />\r\n    <a class=\"message\" href=\"#SCI_SETCARETLINELAYER\">SCI_SETCARETLINELAYER(int layer)</a><br />\r\n    <a class=\"message\" href=\"#SCI_GETCARETLINELAYER\">SCI_GETCARETLINELAYER &rarr; int</a><br />\r\n    <a class=\"discouraged message\" href=\"#SCI_SETCARETLINEVISIBLE\">SCI_SETCARETLINEVISIBLE(bool show)</a><br />\r\n    <a class=\"discouraged message\" href=\"#SCI_GETCARETLINEVISIBLE\">SCI_GETCARETLINEVISIBLE &rarr; bool</a><br />\r\n    <a class=\"discouraged message\" href=\"#SCI_SETCARETLINEBACK\">SCI_SETCARETLINEBACK(colour back)</a><br />\r\n    <a class=\"discouraged message\" href=\"#SCI_GETCARETLINEBACK\">SCI_GETCARETLINEBACK &rarr; colour</a><br />\r\n    <a class=\"discouraged message\" href=\"#SCI_SETCARETLINEBACKALPHA\">SCI_SETCARETLINEBACKALPHA(alpha alpha)</a><br />\r\n    <a class=\"discouraged message\" href=\"#SCI_GETCARETLINEBACKALPHA\">SCI_GETCARETLINEBACKALPHA &rarr; int</a><br />\r\n    <a class=\"message\" href=\"#SCI_SETCARETLINEFRAME\">SCI_SETCARETLINEFRAME(int width)</a><br />\r\n    <a class=\"message\" href=\"#SCI_GETCARETLINEFRAME\">SCI_GETCARETLINEFRAME &rarr; int</a><br />\r\n    <a class=\"message\" href=\"#SCI_SETCARETLINEVISIBLEALWAYS\">SCI_SETCARETLINEVISIBLEALWAYS(bool alwaysVisible)</a><br />\r\n    <a class=\"message\" href=\"#SCI_GETCARETLINEVISIBLEALWAYS\">SCI_GETCARETLINEVISIBLEALWAYS &rarr; bool</a><br />\r\n    <a class=\"message\" href=\"#SCI_SETCARETLINEHIGHLIGHTSUBLINE\">SCI_SETCARETLINEHIGHLIGHTSUBLINE(bool subLine)</a><br />\r\n    <a class=\"message\" href=\"#SCI_GETCARETLINEHIGHLIGHTSUBLINE\">SCI_GETCARETLINEHIGHLIGHTSUBLINE &rarr; bool</a><br />\r\n    <br />\r\n    <a class=\"message\" href=\"#SCI_SETCARETPERIOD\">SCI_SETCARETPERIOD(int periodMilliseconds)</a><br />\r\n    <a class=\"message\" href=\"#SCI_GETCARETPERIOD\">SCI_GETCARETPERIOD &rarr; int</a><br />\r\n    <a class=\"message\" href=\"#SCI_SETCARETSTYLE\">SCI_SETCARETSTYLE(int caretStyle)</a><br />\r\n    <a class=\"message\" href=\"#SCI_GETCARETSTYLE\">SCI_GETCARETSTYLE &rarr; int</a><br />\r\n    <a class=\"message\" href=\"#SCI_SETCARETWIDTH\">SCI_SETCARETWIDTH(int pixelWidth)</a><br />\r\n    <a class=\"message\" href=\"#SCI_GETCARETWIDTH\">SCI_GETCARETWIDTH &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETCARETSTICKY\">SCI_SETCARETSTICKY(int useCaretStickyBehaviour)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETCARETSTICKY\">SCI_GETCARETSTICKY &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_TOGGLECARETSTICKY\">SCI_TOGGLECARETSTICKY</a><br />\r\n    <br />\r\n    <a class=\"element\" href=\"#SC_ELEMENT_HOT_SPOT_ACTIVE\">SC_ELEMENT_HOT_SPOT_ACTIVE : colouralpha</a><br />\r\n    <a class=\"discouraged message\" href=\"#SCI_SETHOTSPOTACTIVEFORE\">SCI_SETHOTSPOTACTIVEFORE(bool useSetting, colour fore)</a><br />\r\n    <a class=\"discouraged message\" href=\"#SCI_GETHOTSPOTACTIVEFORE\">SCI_GETHOTSPOTACTIVEFORE &rarr; colour</a><br />\r\n    <a class=\"element\" href=\"#SC_ELEMENT_HOT_SPOT_ACTIVE_BACK\">SC_ELEMENT_HOT_SPOT_ACTIVE_BACK : colouralpha</a><br />\r\n    <a class=\"discouraged message\" href=\"#SCI_SETHOTSPOTACTIVEBACK\">SCI_SETHOTSPOTACTIVEBACK(bool useSetting, colour back)</a><br />\r\n    <a class=\"discouraged message\" href=\"#SCI_GETHOTSPOTACTIVEBACK\">SCI_GETHOTSPOTACTIVEBACK &rarr; colour</a><br />\r\n    <a class=\"message\" href=\"#SCI_SETHOTSPOTACTIVEUNDERLINE\">SCI_SETHOTSPOTACTIVEUNDERLINE(bool underline)</a><br />\r\n    <a class=\"message\" href=\"#SCI_GETHOTSPOTACTIVEUNDERLINE\">SCI_GETHOTSPOTACTIVEUNDERLINE &rarr; bool</a><br />\r\n    <a class=\"message\" href=\"#SCI_SETHOTSPOTSINGLELINE\">SCI_SETHOTSPOTSINGLELINE(bool singleLine)</a><br />\r\n    <a class=\"message\" href=\"#SCI_GETHOTSPOTSINGLELINE\">SCI_GETHOTSPOTSINGLELINE &rarr; bool</a><br />\r\n    </code>\r\n\r\n    <p>\r\n     <b id=\"SC_ELEMENT_SELECTION_TEXT\">SC_ELEMENT_SELECTION_TEXT : colouralpha</b><br />\r\n     <b id=\"SCI_SETSELFORE\">SCI_SETSELFORE(bool useSetting, <a class=\"jump\" href=\"#colour\">colour</a> fore)</b><br />\r\n     <b id=\"SC_ELEMENT_SELECTION_BACK\">SC_ELEMENT_SELECTION_BACK : colouralpha</b><br />\r\n     <b id=\"SCI_SETSELBACK\">SCI_SETSELBACK(bool useSetting, <a class=\"jump\" href=\"#colour\">colour</a> back)</b><br />\r\n     You can choose to override the default selection colouring with these elements and messages.\r\n     The <a href=\"#ElementColours\">element APIs</a> are now preferred as they handle translucency + layering and\r\n     cooperation with defaults better.\r\n     With the messages, the colour\r\n    you provide is used if you set <code class=\"parameter\">useSetting</code> to <code>true</code>. If it is\r\n    set to <code>false</code>, the default styled colouring is used and the\r\n    <code class=\"parameter\">fore</code> or <code class=\"parameter\">back</code>\r\n    argument has no effect.</p>\r\n\r\n     <p><b id=\"SCI_SETSELECTIONLAYER\">SCI_SETSELECTIONLAYER(int layer)</b><br />\r\n     <b id=\"SCI_GETSELECTIONLAYER\">SCI_GETSELECTIONLAYER &rarr; int</b><br />\r\n     The selection background can be drawn translucently over the text\r\n     or opaquely on the base layer.\r\n     The <code class=\"parameter\">layer</code> argument can be one of:</p>\r\n\r\n    <table class=\"standard\" summary=\"Layer\">\r\n      <tbody valign=\"top\">\r\n        <tr>\r\n          <th align=\"left\"><code>SC_LAYER_BASE</code></th>\r\n\r\n          <td>0</td>\r\n\r\n          <td>Draw the selection background opaquely on the base layer</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>SC_LAYER_UNDER_TEXT</code></th>\r\n\r\n          <td>1</td>\r\n\r\n          <td>Draw the selection background translucently under the text.<br />\r\n\t  This will not work in single phase drawing mode (<code class=\"deprecated\">SC_PHASES_ONE</code>)\r\n\t  as there is no under-text phase.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>SC_LAYER_OVER_TEXT</code></th>\r\n\r\n          <td>2</td>\r\n\r\n          <td>Draw the selection background translucently over the text.</td>\r\n        </tr>\r\n\r\n      </tbody>\r\n    </table>\r\n\r\n     <p><b id=\"SCI_SETSELALPHA\">SCI_SETSELALPHA(<a class=\"jump\" href=\"#alpha\">alpha</a> alpha)</b><br />\r\n     <b id=\"SCI_GETSELALPHA\">SCI_GETSELALPHA &rarr; int</b><br />\r\n     These APIs are now discouraged and should be replaced with\r\n     a combination of setting the layer with SCI_SETSELECTIONLAYER and\r\n     setting translucency through the SC_ELEMENT_SELECTION_BACK element.</p>\r\n\r\n     <p><b id=\"SCI_SETSELEOLFILLED\">SCI_SETSELEOLFILLED(bool filled)</b><br />\r\n     <b id=\"SCI_GETSELEOLFILLED\">SCI_GETSELEOLFILLED &rarr; bool</b><br />\r\n     The selection can be drawn up to the right hand border by setting this property.</p>\r\n\r\n    <p>\r\n     <b id=\"SC_ELEMENT_CARET\">SC_ELEMENT_CARET : colouralpha</b><br />\r\n     <b id=\"SCI_SETCARETFORE\">SCI_SETCARETFORE(<a class=\"jump\" href=\"#colour\">colour</a> fore)</b><br />\r\n     <b id=\"SCI_GETCARETFORE\">SCI_GETCARETFORE &rarr; colour</b><br />\r\n     The colour of the caret can be set with\r\n     <a class=\"message\" href=\"#SCI_SETELEMENTCOLOUR\"><code>SCI_SETELEMENTCOLOUR(SC_ELEMENT_CARET)</code></a> or\r\n     <code>SCI_SETCARETFORE</code> and retrieved with\r\n     <a class=\"message\" href=\"#SCI_GETELEMENTCOLOUR\"><code>SCI_GETELEMENTCOLOUR(SC_ELEMENT_CARET)</code></a> or\r\n     <code>SCI_GETCARETFORE</code>.\r\n     The element APIs are preferred and allow setting the translucency of carets.</p>\r\n\r\n    <p>\r\n     <b id=\"SC_ELEMENT_SELECTION_SECONDARY_TEXT\">SC_ELEMENT_SELECTION_SECONDARY_TEXT : colouralpha</b><br />\r\n     <b id=\"SC_ELEMENT_SELECTION_SECONDARY_BACK\">SC_ELEMENT_SELECTION_SECONDARY_BACK : colouralpha</b><br />\r\n     On Unix systems running with the X window system or Wayland there is a 'primary selection' which is the text most recently\r\n     selected in any application and which can be pasted by a middle button click.\r\n     When working with a selection, it is commonly the primary selection so Scintilla draws the primary selection with the main and additional\r\n     colours defined earlier. When another application takes over the primary selection, these <code>_SECONDARY</code> colours are used.\r\n     They are commonly defined as grey to highlight that it is the selection in the other application that is now available as primary.\r\n     </p>\r\n\r\n    <p>\r\n     <b id=\"SC_ELEMENT_SELECTION_INACTIVE_TEXT\">SC_ELEMENT_SELECTION_INACTIVE_TEXT : colouralpha</b><br />\r\n     <b id=\"SC_ELEMENT_SELECTION_INACTIVE_BACK\">SC_ELEMENT_SELECTION_INACTIVE_BACK : colouralpha</b><br />\r\n     <b id=\"SC_ELEMENT_SELECTION_INACTIVE_ADDITIONAL_TEXT\">SC_ELEMENT_SELECTION_INACTIVE_ADDITIONAL_TEXT : colouralpha</b><br />\r\n     <b id=\"SC_ELEMENT_SELECTION_INACTIVE_ADDITIONAL_BACK\">SC_ELEMENT_SELECTION_INACTIVE_ADDITIONAL_BACK : colouralpha</b><br />\r\n     When a window no longer has the keyboard focus, it is customary to make its selection less noticeable by colouring it grey.\r\n     These elements define the colours to be used for selections without focus. When the <code>ADDITIONAL</code> elements are not set then\r\n     the standard values are used:\r\n     <code>SC_ELEMENT_SELECTION_INACTIVE_ADDITIONAL_TEXT</code>&rarr;<code>SC_ELEMENT_SELECTION_INACTIVE_TEXT</code> and\r\n     <code>SC_ELEMENT_SELECTION_INACTIVE_ADDITIONAL_BACK</code>&rarr;<code>SC_ELEMENT_SELECTION_INACTIVE_BACK</code>.\r\n     </p>\r\n\r\n    <p>\r\n    <b id=\"SC_ELEMENT_CARET_LINE_BACK\">SC_ELEMENT_CARET_LINE_BACK : colouralpha</b><br />\r\n    <b id=\"SCI_SETCARETLINELAYER\">SCI_SETCARETLINELAYER(int layer)</b><br />\r\n    <b id=\"SCI_GETCARETLINELAYER\">SCI_GETCARETLINELAYER &rarr; int</b><br />\r\n     You can choose to make the background colour of the line containing the caret different by setting the\r\n     <code>SC_ELEMENT_CARET_LINE_BACK</code> element with\r\n     <a class=\"message\" href=\"#SCI_SETELEMENTCOLOUR\"><code>SCI_SETELEMENTCOLOUR(SC_ELEMENT_CARET_LINE_BACK)</code></a>.\r\n    This effect may be drawn translucently over the text or opaquely on the base layer with <code>SCI_SETCARETLINELAYER</code>.\r\n    Background colouring has highest priority when a line has markers that would otherwise change\r\n    the background colour. When drawn translucently other background colours can show through.\r\n    The <code class=\"parameter\">layer</code> argument can be one of:</p>\r\n\r\n    <table class=\"standard\" summary=\"Layer\">\r\n      <tbody valign=\"top\">\r\n        <tr>\r\n          <th align=\"left\"><code>SC_LAYER_BASE</code></th>\r\n\r\n          <td>0</td>\r\n\r\n          <td>Draw the selection background opaquely on the base layer</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>SC_LAYER_UNDER_TEXT</code></th>\r\n\r\n          <td>1</td>\r\n\r\n          <td>Draw the selection background translucently under the text.<br />\r\n\t  This will not work in single phase drawing mode (<code class=\"deprecated\">SC_PHASES_ONE</code>)\r\n\t  as there is no under-text phase.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>SC_LAYER_OVER_TEXT</code></th>\r\n\r\n          <td>2</td>\r\n\r\n          <td>Draw the selection background translucently over the text.</td>\r\n        </tr>\r\n\r\n      </tbody>\r\n    </table>\r\n\r\n    <p><b id=\"SCI_SETCARETLINEVISIBLE\">SCI_SETCARETLINEVISIBLE(bool show)</b><br />\r\n     <b id=\"SCI_GETCARETLINEVISIBLE\">SCI_GETCARETLINEVISIBLE &rarr; bool</b><br />\r\n     <b id=\"SCI_SETCARETLINEBACK\">SCI_SETCARETLINEBACK(<a class=\"jump\" href=\"#colour\">colour</a> back)</b><br />\r\n     <b id=\"SCI_GETCARETLINEBACK\">SCI_GETCARETLINEBACK &rarr; colour</b><br />\r\n     <b id=\"SCI_SETCARETLINEBACKALPHA\">SCI_SETCARETLINEBACKALPHA(<a class=\"jump\" href=\"#alpha\">alpha</a> alpha)</b><br />\r\n     <b id=\"SCI_GETCARETLINEBACKALPHA\">SCI_GETCARETLINEBACKALPHA &rarr; int</b><br />\r\n     These APIs are discouraged. It is better to use the <code>SC_ELEMENT_CARET_LINE_BACK</code>\r\n     element mentioned in the previous section.<br />\r\n     You can choose to make the background colour of the line containing the caret different with\r\n    these messages. To do this, set the desired background colour with\r\n    <code>SCI_SETCARETLINEBACK</code>, then use <code>SCI_SETCARETLINEVISIBLE(true)</code> to\r\n    enable the effect. You can cancel the effect with <code>SCI_SETCARETLINEVISIBLE(false)</code>.\r\n    The two <code>SCI_GETCARET*</code> functions return the state and the colour. This form of\r\n    background colouring has highest priority when a line has markers that would otherwise change\r\n    the background colour.\r\n           The caret line may also be drawn translucently which allows other background colours to show\r\n           through. This is done by setting the alpha (translucency) value by calling\r\n           SCI_SETCARETLINEBACKALPHA. When the alpha is not SC_ALPHA_NOALPHA,\r\n           the caret line is drawn after all other features so will affect the colour of all other features.\r\n          </p>\r\n\r\n     <p>\r\n     <b id=\"SCI_SETCARETLINEFRAME\">SCI_SETCARETLINEFRAME(int width)</b><br />\r\n     <b id=\"SCI_GETCARETLINEFRAME\">SCI_GETCARETLINEFRAME &rarr; int</b><br />\r\n           <code>SCI_SETCARETLINEFRAME</code> can be used to display the caret line framed\r\n           instead of filling the whole background. Set width != 0 to enable this option and width = 0 to disable it.\r\n     </p>\r\n\r\n    <p><b id=\"SCI_SETCARETLINEVISIBLEALWAYS\">SCI_SETCARETLINEVISIBLEALWAYS(bool alwaysVisible)</b><br />\r\n     <b id=\"SCI_GETCARETLINEVISIBLEALWAYS\">SCI_GETCARETLINEVISIBLEALWAYS &rarr; bool</b><br />\r\n     Choose to make the caret line always visible even when the window is not in focus.\r\n     Default behaviour <code>SCI_SETCARETLINEVISIBLEALWAYS(false)</code> the caret line is only visible when the window is in focus.\r\n          </p>\r\n\r\n    <p><b id=\"SCI_SETCARETLINEHIGHLIGHTSUBLINE\">SCI_SETCARETLINEHIGHLIGHTSUBLINE(bool subLine)</b><br />\r\n     <b id=\"SCI_GETCARETLINEHIGHLIGHTSUBLINE\">SCI_GETCARETLINEHIGHLIGHTSUBLINE &rarr; bool</b><br />\r\n     Choose to highlight only the subline containing the caret instead of the whole line.\r\n     Default behaviour <code>SCI_SETCARETLINEHIGHLIGHTSUBLINE(false)</code> the whole caret line is highlighted.\r\n          </p>\r\n\r\n    <p><b id=\"SCI_SETCARETPERIOD\">SCI_SETCARETPERIOD(int periodMilliseconds)</b><br />\r\n     <b id=\"SCI_GETCARETPERIOD\">SCI_GETCARETPERIOD &rarr; int</b><br />\r\n     The rate at which the caret blinks can be set with <code>SCI_SETCARETPERIOD</code> which\r\n    determines the time in milliseconds that the caret is visible or invisible before changing\r\n    state. Setting the period to 0 stops the caret blinking. The default value is 500 milliseconds.\r\n    <code>SCI_GETCARETPERIOD</code> returns the current setting.</p>\r\n\r\n    <p><b id=\"SCI_SETCARETSTYLE\">SCI_SETCARETSTYLE(int caretStyle)</b><br />\r\n     <b id=\"SCI_GETCARETSTYLE\">SCI_GETCARETSTYLE &rarr; int</b><br />\r\n     The style of the caret can be set with <code>SCI_SETCARETSTYLE</code>.\r\n     There are separate styles for insert mode (lower 4-bits, <code>CARETSTYLE_INS_MASK</code>),\r\n     overtype mode (bit 4), and curses mode (bit 5).\r\n\r\n     <table class=\"standard\" summary=\"Caret Styles\">\r\n       <tbody valign=\"top\">\r\n         <tr>\r\n           <th align=\"left\"><code>CARETSTYLE_INVISIBLE</code></th>\r\n           <td>0</td>\r\n           <td>Carets are not drawn at all.</td>\r\n         </tr>\r\n         <tr>\r\n           <th align=\"left\"><code>CARETSTYLE_LINE</code></th>\r\n           <td>1</td>\r\n           <td>Draws insertion carets as lines. This is the default.</td>\r\n         </tr>\r\n         <tr>\r\n           <th align=\"left\"><code>CARETSTYLE_BLOCK</code></th>\r\n           <td>2</td>\r\n           <td>Draws insertion carets as blocks.</td>\r\n         </tr>\r\n         <tr>\r\n           <th align=\"left\"><code>CARETSTYLE_OVERSTRIKE_BAR</code></th>\r\n           <td>0</td>\r\n           <td>Draws an overstrike caret as a bar. This is the default.</td>\r\n         </tr>\r\n         <tr>\r\n           <th align=\"left\"><code>CARETSTYLE_OVERSTRIKE_BLOCK</code></th>\r\n           <td>16</td>\r\n           <td>Draws an overstrike caret as a block. This should be ored with one of the first three styles.</td>\r\n         </tr>\r\n         <tr>\r\n           <th align=\"left\"><code>CARETSTYLE_CURSES</code></th>\r\n           <td>32</td>\r\n           <td>Draws carets that cannot be drawn in a curses (terminal) environment (such as additional carets),\r\n           and draws them as blocks. The main caret is left to be drawn by the terminal itself. This setting is\r\n           typically a standalone setting.</td>\r\n         </tr>\r\n         <tr>\r\n           <th align=\"left\"><code>CARETSTYLE_BLOCK_AFTER</code></th>\r\n           <td>256</td>\r\n           <td>When the caret end of a range is at the end and a block caret style is chosen, draws the block\r\n           outside the selection instead of inside. This can be ored with <code>CARETSTYLE_BLOCK</code> or <code>CARETSTYLE_CURSES</code>.</td>\r\n         </tr>\r\n       </tbody>\r\n     </table>\r\n\r\n    <p>The block caret draws most combining and multibyte character sequences successfully,\r\n    though some fonts like Thai Fonts (and possibly others) can sometimes appear strange when\r\n    the cursor is positioned at these characters, which may result in only drawing a part of the\r\n    cursor character sequence. This is most notable on Windows platforms.</p>\r\n\r\n    <p><b id=\"SCI_SETCARETWIDTH\">SCI_SETCARETWIDTH(int pixelWidth)</b><br />\r\n     <b id=\"SCI_GETCARETWIDTH\">SCI_GETCARETWIDTH &rarr; int</b><br />\r\n     The width of the line caret can be set with <code>SCI_SETCARETWIDTH</code> to a value of\r\n    between 0 and 20 pixels. The default width is 1 pixel. You can read back the current width with\r\n    <code>SCI_GETCARETWIDTH</code>. A width of 0 makes the caret invisible,\r\n    similar to setting the caret style to CARETSTYLE_INVISIBLE (though not interchangeable).\r\n    This setting only affects the width of the cursor when the cursor style is set to line caret\r\n    mode, it does not affect the width for a block caret.</p>\r\n\r\n    <p><b id=\"SCI_SETCARETSTICKY\">SCI_SETCARETSTICKY(int useCaretStickyBehaviour)</b><br />\r\n    <b id=\"SCI_GETCARETSTICKY\">SCI_GETCARETSTICKY &rarr; int</b><br />\r\n    <b id=\"SCI_TOGGLECARETSTICKY\">SCI_TOGGLECARETSTICKY</b><br />\r\n    These messages set, get or toggle the caretSticky setting which controls when the last position\r\n    of the caret on the line is saved.</p>\r\n\r\n    <p>When set to <code>SC_CARETSTICKY_OFF</code> (0), the sticky flag is off; all text changes\r\n    (and all caret position changes) will remember the\r\n    caret's new horizontal position when moving to different lines. This is the default.</p>\r\n\r\n    <p>When set to <code>SC_CARETSTICKY_ON</code> (1), the sticky flag is on, and the only thing which will cause the editor to remember the\r\n    horizontal caret position is moving the caret with mouse or keyboard (left/right arrow keys, home/end keys, etc). </p>\r\n\r\n    <p>When set to <code>SC_CARETSTICKY_WHITESPACE</code> (2), the caret acts like mode 0 (sticky off) except under one\r\n    special case; when space or tab characters are inserted. (Including pasting <b>only space/tabs</b> -- undo, redo,\r\n    etc. do not exhibit this behaviour..).</p>\r\n\r\n    <p><code>SCI_TOGGLECARETSTICKY</code> switches from <code>SC_CARETSTICKY_ON</code> and <code>SC_CARETSTICKY_WHITESPACE</code>\r\n    to <code>SC_CARETSTICKY_OFF</code> and from <code>SC_CARETSTICKY_OFF</code> to <code>SC_CARETSTICKY_ON</code>.</p>\r\n\r\n    <p>\r\n    <b id=\"SC_ELEMENT_HOT_SPOT_ACTIVE\">SC_ELEMENT_HOT_SPOT_ACTIVE : colouralpha</b><br />\r\n    <b id=\"SCI_SETHOTSPOTACTIVEFORE\">SCI_SETHOTSPOTACTIVEFORE(bool useSetting, <a class=\"jump\" href=\"#colour\">colour</a> fore)</b><br />\r\n    <b id=\"SCI_GETHOTSPOTACTIVEFORE\">SCI_GETHOTSPOTACTIVEFORE &rarr; colour</b><br />\r\n    <b id=\"SC_ELEMENT_HOT_SPOT_ACTIVE_BACK\">SC_ELEMENT_HOT_SPOT_ACTIVE_BACK : colouralpha</b><br />\r\n    <b id=\"SCI_SETHOTSPOTACTIVEBACK\">SCI_SETHOTSPOTACTIVEBACK(bool useSetting,\r\n    <a class=\"jump\" href=\"#colour\">colour</a> back)</b><br />\r\n    <b id=\"SCI_GETHOTSPOTACTIVEBACK\">SCI_GETHOTSPOTACTIVEBACK &rarr; colour</b><br />\r\n    <b id=\"SCI_SETHOTSPOTACTIVEUNDERLINE\">SCI_SETHOTSPOTACTIVEUNDERLINE(bool underline)</b><br />\r\n     <b id=\"SCI_GETHOTSPOTACTIVEUNDERLINE\">SCI_GETHOTSPOTACTIVEUNDERLINE &rarr; bool</b><br />\r\n    <b id=\"SCI_SETHOTSPOTSINGLELINE\">SCI_SETHOTSPOTSINGLELINE(bool singleLine)</b><br />\r\n     <b id=\"SCI_GETHOTSPOTSINGLELINE\">SCI_GETHOTSPOTSINGLELINE &rarr; bool</b><br />\r\n    While the cursor hovers over text in a style with the hotspot attribute set,\r\n    the default colouring can be modified and an underline drawn with these settings.\r\n    Single line mode stops a hotspot from wrapping onto next line.</p>\r\n\r\n    <h2 id=\"CharacterRepresentations\">Character representations</h2>\r\n\r\n    <p>Some characters, such as control characters and invalid bytes, do not have a visual glyph or use a glyph that is hard to distinguish.</p>\r\n\r\n    <p>Control characters (characters with codes less than 32, or between 128 and 159 in some encodings)\r\n    are displayed by Scintilla using their mnemonics inverted in a rounded rectangle. These mnemonics come from the\r\n    early days of signalling, though some are still used (LF = Line Feed, BS = Back Space, CR =\r\n    Carriage Return, for example).</p>\r\n\r\n    <p>For the low 'C0' values: \"NUL\", \"SOH\", \"STX\", \"ETX\", \"EOT\", \"ENQ\", \"ACK\", \"BEL\",\r\n    \"BS\", \"HT\", \"LF\", \"VT\", \"FF\", \"CR\", \"SO\", \"SI\", \"DLE\", \"DC1\", \"DC2\", \"DC3\", \"DC4\", \"NAK\",\r\n    \"SYN\", \"ETB\", \"CAN\", \"EM\", \"SUB\", \"ESC\", \"FS\", \"GS\", \"RS\", \"US\".</p>\r\n\r\n    <p>For the high 'C1' values:\r\n       \"PAD\", \"HOP\", \"BPH\", \"NBH\", \"IND\", \"NEL\", \"SSA\", \"ESA\",\r\n       \"HTS\", \"HTJ\", \"VTS\", \"PLD\", \"PLU\", \"RI\", \"SS2\", \"SS3\",\r\n       \"DCS\", \"PU1\", \"PU2\", \"STS\", \"CCH\", \"MW\", \"SPA\", \"EPA\",\r\n       \"SOS\", \"SGCI\", \"SCI\", \"CSI\", \"ST\", \"OSC\", \"PM\", \"APC\".</p>\r\n\r\n    <p>Invalid bytes are shown in a similar way with an 'x' followed by their value in hexadecimal, like \"xFE\".</p>\r\n\r\n    <code>\r\n     <a class=\"message\" href=\"#SCI_SETREPRESENTATION\">SCI_SETREPRESENTATION(const char *encodedCharacter, const char *representation)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETREPRESENTATION\">SCI_GETREPRESENTATION(const char *encodedCharacter, char *representation) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_CLEARREPRESENTATION\">SCI_CLEARREPRESENTATION(const char *encodedCharacter)</a><br />\r\n     <a class=\"message\" href=\"#SCI_CLEARALLREPRESENTATIONS\">SCI_CLEARALLREPRESENTATIONS</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETREPRESENTATIONAPPEARANCE\">SCI_SETREPRESENTATIONAPPEARANCE(const char *encodedCharacter, int appearance)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETREPRESENTATIONAPPEARANCE\">SCI_GETREPRESENTATIONAPPEARANCE(const char *encodedCharacter) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETREPRESENTATIONCOLOUR\">SCI_SETREPRESENTATIONCOLOUR(const char *encodedCharacter, colouralpha colour)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETREPRESENTATIONCOLOUR\">SCI_GETREPRESENTATIONCOLOUR(const char *encodedCharacter) &rarr; colouralpha</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETCONTROLCHARSYMBOL\">SCI_SETCONTROLCHARSYMBOL(int symbol)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETCONTROLCHARSYMBOL\">SCI_GETCONTROLCHARSYMBOL &rarr; int</a><br />\r\n    </code>\r\n\r\n    <p><b id=\"SCI_SETREPRESENTATION\">SCI_SETREPRESENTATION(const char *encodedCharacter, const char *representation)</b><br />\r\n     <b id=\"SCI_GETREPRESENTATION\">SCI_GETREPRESENTATION(const char *encodedCharacter, char *representation NUL-terminated) &rarr; int</b><br />\r\n     <b id=\"SCI_CLEARREPRESENTATION\">SCI_CLEARREPRESENTATION(const char *encodedCharacter)</b><br />\r\n    Any character, including those normally displayed  as mnemonics may be represented by a\r\n    Unicode string inverted in a rounded rectangle.</p>\r\n\r\n    <p>For example, the Ohm sign &#x2126; U+2126 looks very similar to the Greek Omega character &#x3a9; U+03C9 so,\r\n    for the UTF-8 encoding, to distinguish the Ohm sign as \"U+2126 &#x2126;\" this call could be made:\r\n    <code>SCI_SETREPRESENTATION(\"\\xe2\\x84\\xa6\", \"U+2126 \\xe2\\x84\\xa6\")</code></p>\r\n\r\n    <p>The <code class=\"parameter\">encodedCharacter</code> parameter is a NUL-terminated string of the bytes for one character in the\r\n    current encoding. This can not be used to set a representation for multiple-character strings. </p>\r\n\r\n    <p>The <code class=\"parameter\">representation</code> parameter is a NUL-terminated UTF-8 string with a maximum length of 200 bytes.</p>\r\n\r\n    <p>One exception to the single character restriction is that the two character sequence \"\\r\\n\" (Carriage Return + Line Feed)\r\n    can have a representation that is visible in line end viewing (<a class=\"seealso\" href=\"#SCI_SETVIEWEOL\">SCI_SETVIEWEOL</a>) mode.\r\n    If there is no representation for \"\\r\\n\" then the individual '\\r' and '\\n' representations will be seen.</p>\r\n\r\n    <p>The NUL (0) character is a special case since the <code class=\"parameter\">encodedCharacter</code> parameter is NUL terminated, the NUL\r\n    character is specified as an empty string.</p>\r\n\r\n    <p>For UTF-8 and DBCS code pages, clear representation for single byte &ge; 128 may cause unexpected behaviour.</p>\r\n\r\n    <p><b id=\"SCI_CLEARALLREPRESENTATIONS\">SCI_CLEARALLREPRESENTATIONS</b><br />\r\n    Reset representations to defaults with <code>SCI_CLEARALLREPRESENTATIONS</code>.</p>\r\n\r\n    <p><b id=\"SCI_SETREPRESENTATIONAPPEARANCE\">SCI_SETREPRESENTATIONAPPEARANCE(const char *encodedCharacter, int appearance)</b><br />\r\n     <b id=\"SCI_GETREPRESENTATIONAPPEARANCE\">SCI_GETREPRESENTATIONAPPEARANCE(const char *encodedCharacter) &rarr; int</b><br />\r\n    The appearance may be changed using these flags. If a colour is set and the appearance is set without\r\n    <code>SC_REPRESENTATION_COLOUR</code> then the representation will show in the colour of the underlying text.</p>\r\n\r\n    <table class=\"standard\" summary=\"Layer\">\r\n      <tbody valign=\"top\">\r\n        <tr>\r\n          <th align=\"left\"><code>SC_REPRESENTATION_PLAIN</code></th>\r\n\r\n          <td>0</td>\r\n\r\n          <td>Draw the representation text with no decorations.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>SC_REPRESENTATION_BLOB</code></th>\r\n\r\n          <td>1</td>\r\n\r\n          <td>Draw the representation text inverted in a rounded rectangle. This is the default appearance.</td>\r\n        </tr>\r\n\r\n        <tr class=\"section\">\r\n          <th align=\"left\"><code>SC_REPRESENTATION_COLOUR</code></th>\r\n\r\n          <td>0x10</td>\r\n\r\n          <td>Draw the representation in the colour set with <a class=\"seealso\" href=\"#SCI_SETREPRESENTATIONCOLOUR\">SCI_SETREPRESENTATIONCOLOUR</a>\r\n\t  instead of in the colour of the style of the text being represented.</td>\r\n        </tr>\r\n\r\n      </tbody>\r\n    </table>\r\n\r\n\r\n    <p><b id=\"SCI_SETREPRESENTATIONCOLOUR\">SCI_SETREPRESENTATIONCOLOUR(const char *encodedCharacter, colouralpha colour)</b><br />\r\n     <b id=\"SCI_GETREPRESENTATIONCOLOUR\">SCI_GETREPRESENTATIONCOLOUR(const char *encodedCharacter) &rarr; colouralpha</b><br />\r\n    The colour and translucency of a representation may be set.</p>\r\n\r\n    <p><b id=\"SCI_SETCONTROLCHARSYMBOL\">SCI_SETCONTROLCHARSYMBOL(int symbol)</b><br />\r\n     <b id=\"SCI_GETCONTROLCHARSYMBOL\">SCI_GETCONTROLCHARSYMBOL &rarr; int</b><br />\r\n    The mnemonics may be replaced by a nominated symbol with an ASCII code in the\r\n    range 32 to 255. If you set a symbol value less than 32, all control characters are displayed\r\n    as mnemonics. The symbol you set is rendered in the font of the style set for the character.\r\n    You can read back the current symbol with the <code>SCI_GETCONTROLCHARSYMBOL</code> message.\r\n    The default symbol value is 0.</p>\r\n\r\n    <h2 id=\"Margins\">Margins</h2>\r\n\r\n    <p>There may be multiple margins to the left of the text display plus a gap either side of the text.\r\n    5 margins are allocated initially numbered from 0 to <code>SC_MAX_MARGIN</code> (4)\r\n    but this may be changed by calling\r\n    <a class=\"message\" href=\"#SCI_SETMARGINS\"><code>SCI_SETMARGINS</code></a>.\r\n    Each margin can be set to display only symbols, line numbers, or text with\r\n    <a class=\"message\" href=\"#SCI_SETMARGINTYPEN\"><code>SCI_SETMARGINTYPEN</code></a>.\r\n    Textual margins may also display symbols.\r\n    The markers\r\n    that can be displayed in each margin are set with <a class=\"message\"\r\n    href=\"#SCI_SETMARGINMASKN\"><code>SCI_SETMARGINMASKN</code></a>. Any markers not associated with\r\n    a visible margin will be displayed as changes in background colour in the text. A width in\r\n    pixels can be set for each margin. Margins with a zero width are ignored completely. You can\r\n    choose if a mouse click in a margin sends a <a class=\"message\"\r\n    href=\"#SCN_MARGINCLICK\"><code>SCN_MARGINCLICK</code></a> or <a class=\"message\"\r\n    href=\"#SCN_MARGINRIGHTCLICK\"><code>SCN_MARGINRIGHTCLICK</code></a> notification to the container or\r\n    selects a line of text.</p>\r\n\r\n    <p>Using a margin number outside the valid range has no\r\n    effect. By default, margin 0 is set to display line numbers, but is given a width of 0, so it\r\n    is hidden. Margin 1 is set to display non-folding symbols and is given a width of 16 pixels, so\r\n    it is visible. Margin 2 is set to display the folding symbols, but is given a width of 0, so it\r\n    is hidden. Of course, you can set the margins to be whatever you wish.</p>\r\n\r\n    <p>Styled text margins used to show revision and blame information:</p>\r\n    <p><img src=\"styledmargin.png\" alt=\"Styled text margins used to show revision and blame information\" /></p>\r\n\r\n    <code>\r\n     <a class=\"message\" href=\"#SCI_SETMARGINS\">SCI_SETMARGINS(int margins)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETMARGINS\">SCI_GETMARGINS &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETMARGINTYPEN\">SCI_SETMARGINTYPEN(int margin, int marginType)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETMARGINTYPEN\">SCI_GETMARGINTYPEN(int margin) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETMARGINWIDTHN\">SCI_SETMARGINWIDTHN(int margin, int\r\n    pixelWidth)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETMARGINWIDTHN\">SCI_GETMARGINWIDTHN(int margin) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETMARGINMASKN\">SCI_SETMARGINMASKN(int margin, int\r\n    mask)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETMARGINMASKN\">SCI_GETMARGINMASKN(int margin) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETMARGINSENSITIVEN\">SCI_SETMARGINSENSITIVEN(int margin, bool\r\n    sensitive)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETMARGINSENSITIVEN\">SCI_GETMARGINSENSITIVEN(int margin) &rarr; bool</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETMARGINCURSORN\">SCI_SETMARGINCURSORN(int margin, int\r\n    cursor)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETMARGINCURSORN\">SCI_GETMARGINCURSORN(int margin) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETMARGINBACKN\">SCI_SETMARGINBACKN(int margin, colour back)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETMARGINBACKN\">SCI_GETMARGINBACKN(int margin) &rarr; colour</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETMARGINLEFT\">SCI_SETMARGINLEFT(&lt;unused&gt;, int\r\n    pixelWidth)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETMARGINLEFT\">SCI_GETMARGINLEFT &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETMARGINRIGHT\">SCI_SETMARGINRIGHT(&lt;unused&gt;, int\r\n    pixelWidth)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETMARGINRIGHT\">SCI_GETMARGINRIGHT &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETFOLDMARGINCOLOUR\">SCI_SETFOLDMARGINCOLOUR(bool useSetting, colour back)</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETFOLDMARGINHICOLOUR\">SCI_SETFOLDMARGINHICOLOUR(bool useSetting, colour fore)</a><br />\r\n     <a class=\"message\" href=\"#SCI_MARGINSETTEXT\">SCI_MARGINSETTEXT(line line, const char *text)</a><br />\r\n     <a class=\"message\" href=\"#SCI_MARGINGETTEXT\">SCI_MARGINGETTEXT(line line, char *text) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_MARGINSETSTYLE\">SCI_MARGINSETSTYLE(line line, int style)</a><br />\r\n     <a class=\"message\" href=\"#SCI_MARGINGETSTYLE\">SCI_MARGINGETSTYLE(line line) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_MARGINSETSTYLES\">SCI_MARGINSETSTYLES(line line, const char *styles)</a><br />\r\n     <a class=\"message\" href=\"#SCI_MARGINGETSTYLES\">SCI_MARGINGETSTYLES(line line, char *styles) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_MARGINTEXTCLEARALL\">SCI_MARGINTEXTCLEARALL</a><br />\r\n     <a class=\"message\" href=\"#SCI_MARGINSETSTYLEOFFSET\">SCI_MARGINSETSTYLEOFFSET(int style)</a><br />\r\n     <a class=\"message\" href=\"#SCI_MARGINGETSTYLEOFFSET\">SCI_MARGINGETSTYLEOFFSET &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETMARGINOPTIONS\">SCI_SETMARGINOPTIONS(int marginOptions)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETMARGINOPTIONS\">SCI_GETMARGINOPTIONS &rarr; int</a><br />\r\n    </code>\r\n\r\n<p><b id=\"SCI_SETMARGINS\">SCI_SETMARGINS(int margins)</b><br />\r\n     <b id=\"SCI_GETMARGINS\">SCI_GETMARGINS &rarr; int</b><br />\r\n     Allocate the number of margins or find the number of margins currently allocated.</p>\r\n\r\n    <p><b id=\"SCI_SETMARGINTYPEN\">SCI_SETMARGINTYPEN(int margin, int marginType)</b><br />\r\n     <b id=\"SCI_GETMARGINTYPEN\">SCI_GETMARGINTYPEN(int margin) &rarr; int</b><br />\r\n     These two routines set and get the type of a margin. The margin argument should be 0, 1, 2, 3 or 4.\r\n    You can use the predefined constants <code>SC_MARGIN_SYMBOL</code> (0) and\r\n    <code>SC_MARGIN_NUMBER</code> (1) to set a margin as either a line number or a symbol margin.\r\n    A margin with application defined text may use <code>SC_MARGIN_TEXT</code> (4) or\r\n    <code>SC_MARGIN_RTEXT</code> (5) to right justify the text.\r\n    By convention, margin 0 is used for line numbers and the next two are used for symbols. You can\r\n    also use the constants <code>SC_MARGIN_BACK</code> (2), <code>SC_MARGIN_FORE</code> (3),\r\n    and <code>SC_MARGIN_COLOUR</code> (6) for\r\n    symbol margins that set their background colour to match the STYLE_DEFAULT background and\r\n    foreground colours or a specified colour.</p>\r\n\r\n    <p><b id=\"SCI_SETMARGINWIDTHN\">SCI_SETMARGINWIDTHN(int margin, int pixelWidth)</b><br />\r\n     <b id=\"SCI_GETMARGINWIDTHN\">SCI_GETMARGINWIDTHN(int margin) &rarr; int</b><br />\r\n     These routines set and get the width of a margin in pixels. A margin with zero width is\r\n    invisible. By default, Scintilla sets margin 1 for symbols with a width of 16 pixels, so this\r\n    is a reasonable guess if you are not sure what would be appropriate. Line number margins widths\r\n    should take into account the number of lines in the document and the line number style. You\r\n    could use something like <a class=\"message\"\r\n    href=\"#SCI_TEXTWIDTH\"><code>SCI_TEXTWIDTH(STYLE_LINENUMBER, \"_99999\")</code></a> to get a\r\n    suitable width.</p>\r\n\r\n    <p><b id=\"SCI_SETMARGINMASKN\">SCI_SETMARGINMASKN(int margin, int mask)</b><br />\r\n     <b id=\"SCI_GETMARGINMASKN\">SCI_GETMARGINMASKN(int margin) &rarr; int</b><br />\r\n     The mask is a 32-bit value. Each bit corresponds to one of 32 logical symbols that can be\r\n    displayed in a margin that is enabled for symbols. There is a useful constant,\r\n    <code>SC_MASK_FOLDERS</code> (0xFE000000 or -33554432), that is a mask for the 7 logical\r\n    symbols used to denote folding. You can assign a wide range of symbols and colours to each of\r\n    the 32 logical symbols, see <a href=\"#Markers\">Markers</a> for more information. If <code>(mask\r\n    &amp; SC_MASK_FOLDERS)==0</code>, the margin background colour is controlled by style 33 (<a\r\n    class=\"message\" href=\"#StyleDefinition\"><code>STYLE_LINENUMBER</code></a>).</p>\r\n\r\n    <p>You add logical markers to a line with <a class=\"message\"\r\n    href=\"#SCI_MARKERADD\"><code>SCI_MARKERADD</code></a>. If a line has an associated marker that\r\n    does not appear in the mask of any margin with a non-zero width, the marker changes the\r\n    background colour of the line. For example, suppose you decide to use logical marker 10 to mark\r\n    lines with a syntax error and you want to show such lines by changing the background colour.\r\n    The mask for this marker is 1 shifted left 10 times (1&lt;&lt;10) which is 0x400. If you make\r\n    sure that no symbol margin includes 0x400 in its mask, any line with the marker gets the\r\n    background colour changed.</p>\r\n\r\n    <p>To set a non-folding margin 1 use <code>SCI_SETMARGINMASKN(1, ~SC_MASK_FOLDERS)</code>\r\n    which is the default set by Scintilla.\r\n    To set a folding margin 2 use <code>SCI_SETMARGINMASKN(2, SC_MASK_FOLDERS)</code>.\r\n    <code>~SC_MASK_FOLDERS</code> is 0x1FFFFFF in hexadecimal or 33554431\r\n    decimal. Of course, you may need to display all 32 symbols in a margin, in which case use\r\n    <code>SCI_SETMARGINMASKN(margin, -1)</code>.</p>\r\n\r\n    <p><b id=\"SCI_SETMARGINSENSITIVEN\">SCI_SETMARGINSENSITIVEN(int margin, bool\r\n    sensitive)</b><br />\r\n     <b id=\"SCI_GETMARGINSENSITIVEN\">SCI_GETMARGINSENSITIVEN(int margin) &rarr; bool</b><br />\r\n     Each of the five margins can be set sensitive or insensitive to mouse clicks. A click in a\r\n    sensitive margin sends a <a class=\"message\"\r\n    href=\"#SCN_MARGINCLICK\"><code>SCN_MARGINCLICK</code></a> or <a class=\"message\"\r\n    href=\"#SCN_MARGINRIGHTCLICK\"><code>SCN_MARGINRIGHTCLICK</code></a> <a class=\"jump\"\r\n    href=\"#Notifications\">notification</a> to the container. Margins that are not sensitive act as\r\n    selection margins which make it easy to select ranges of lines. By default, all margins are\r\n    insensitive.</p>\r\n\r\n    <p><b id=\"SCI_SETMARGINCURSORN\">SCI_SETMARGINCURSORN(int margin, int\r\n    cursor)</b><br />\r\n     <b id=\"SCI_GETMARGINCURSORN\">SCI_GETMARGINCURSORN(int margin) &rarr; int</b><br />\r\n     A reversed arrow cursor is normally shown over all margins. This may be changed to a normal arrow with\r\n     <code>SCI_SETMARGINCURSORN(margin, SC_CURSORARROW)</code> or restored to a\r\n     reversed arrow with\r\n     <code>SCI_SETMARGINCURSORN(margin, SC_CURSORREVERSEARROW)</code>.</p>\r\n    <p><b id=\"SCI_SETMARGINBACKN\">SCI_SETMARGINBACKN(int margin, <a class=\"jump\" href=\"#colour\">colour</a> back)</b><br />\r\n     <b id=\"SCI_GETMARGINBACKN\">SCI_GETMARGINBACKN(int margin) &rarr; colour</b><br />\r\n     A margin of type <code>SC_MARGIN_COLOUR</code>\r\n     may have its colour set with <code>SCI_SETMARGINBACKN</code>.</p>\r\n\r\n    <p><b id=\"SCI_SETMARGINLEFT\">SCI_SETMARGINLEFT(&lt;unused&gt;, int pixelWidth)</b><br />\r\n     <b id=\"SCI_GETMARGINLEFT\">SCI_GETMARGINLEFT &rarr; int</b><br />\r\n     <b id=\"SCI_SETMARGINRIGHT\">SCI_SETMARGINRIGHT(&lt;unused&gt;, int pixelWidth)</b><br />\r\n     <b id=\"SCI_GETMARGINRIGHT\">SCI_GETMARGINRIGHT &rarr; int</b><br />\r\n     These messages set and get the width of the blank margin on both sides of the text in pixels.\r\n    The default is to one pixel on each side.</p>\r\n\r\n    <p><b id=\"SCI_SETFOLDMARGINCOLOUR\">SCI_SETFOLDMARGINCOLOUR(bool useSetting, <a class=\"jump\" href=\"#colour\">colour</a> back)</b><br />\r\n     <b id=\"SCI_SETFOLDMARGINHICOLOUR\">SCI_SETFOLDMARGINHICOLOUR(bool useSetting, <a class=\"jump\" href=\"#colour\">colour</a> fore)</b><br />\r\n     These messages allow changing the colour of the fold margin and fold margin highlight.\r\n     On Windows the fold margin colour defaults to ::GetSysColor(COLOR_3DFACE) and the fold margin highlight\r\n     colour to ::GetSysColor(COLOR_3DHIGHLIGHT).</p>\r\n\r\n    <p>\r\n     <b id=\"SCI_MARGINSETTEXT\">SCI_MARGINSETTEXT(line line, const char *text)</b><br />\r\n     <b id=\"SCI_MARGINGETTEXT\">SCI_MARGINGETTEXT(line line, char *text) &rarr; int</b><br />\r\n     <b id=\"SCI_MARGINSETSTYLE\">SCI_MARGINSETSTYLE(line line, int style)</b><br />\r\n     <b id=\"SCI_MARGINGETSTYLE\">SCI_MARGINGETSTYLE(line line) &rarr; int</b><br />\r\n     <b id=\"SCI_MARGINSETSTYLES\">SCI_MARGINSETSTYLES(line line, const char *styles)</b><br />\r\n     <b id=\"SCI_MARGINGETSTYLES\">SCI_MARGINGETSTYLES(line line, char *styles) &rarr; int</b><br />\r\n     <b id=\"SCI_MARGINTEXTCLEARALL\">SCI_MARGINTEXTCLEARALL</b><br />\r\n     Text margins are created with the type SC_MARGIN_TEXT or SC_MARGIN_RTEXT.\r\n     A different string may be set for each line with <code>SCI_MARGINSETTEXT</code>.\r\n     The whole of the text margin on a line may be displayed in a particular style with\r\n     <code>SCI_MARGINSETSTYLE</code> or each character may be individually styled with\r\n     <code>SCI_MARGINSETSTYLES</code> which uses an array of bytes with each byte setting the style\r\n     of the corresponding text byte similar to <code>SCI_SETSTYLINGEX</code>.\r\n     Setting a text margin will cause a\r\n     <a class=\"message\" href=\"#SC_MOD_CHANGEMARGIN\"><code>SC_MOD_CHANGEMARGIN</code></a>\r\n     notification to be sent.\r\n    </p>\r\n    <p>\r\n    Only some style attributes are active in text margins: font, size/sizeFractional, bold/weight, italics, fore, back, and characterSet.\r\n    </p>\r\n    <p>\r\n     <b id=\"SCI_MARGINSETSTYLEOFFSET\">SCI_MARGINSETSTYLEOFFSET(int style)</b><br />\r\n     <b id=\"SCI_MARGINGETSTYLEOFFSET\">SCI_MARGINGETSTYLEOFFSET &rarr; int</b><br />\r\n    Margin styles may be completely separated from standard text styles by setting a style offset. For example,\r\n    <code>SCI_MARGINSETSTYLEOFFSET(256)</code> would allow the margin styles to be numbered from\r\n    256 up to 511 so they do not overlap styles set by lexers. Each style number set with <code>SCI_MARGINSETSTYLE</code>\r\n    or <code>SCI_MARGINSETSTYLES</code> has the offset added before looking up the style.\r\n    </p>\r\n    <p>\r\n    Always call <a class=\"seealso\" href=\"#SCI_ALLOCATEEXTENDEDSTYLES\">SCI_ALLOCATEEXTENDEDSTYLES</a>\r\n    before <code>SCI_MARGINSETSTYLEOFFSET</code> and use the result as the argument to <code>SCI_MARGINSETSTYLEOFFSET</code>.\r\n    </p>\r\n    <p>\r\n     <b id=\"SCI_SETMARGINOPTIONS\">SCI_SETMARGINOPTIONS(int marginOptions)</b><br />\r\n     <b id=\"SCI_GETMARGINOPTIONS\">SCI_GETMARGINOPTIONS &rarr; int</b><br />\r\n    Define margin options by enabling appropriate bit flags. At the moment, only one flag is available\r\n    <code>SC_MARGINOPTION_SUBLINESELECT</code>=1, which controls how wrapped lines are selected when clicking\r\n    on margin in front of them. If <code>SC_MARGINOPTION_SUBLINESELECT</code> is set only sub line of wrapped\r\n    line is selected, otherwise whole wrapped line is selected. Margin options are set to\r\n    <code>SC_MARGINOPTION_NONE</code>=0 by default.\r\n    </p>\r\n\r\n    <h2 id=\"Annotations\">Annotations</h2>\r\n\r\n    <p>Annotations are read-only lines of text underneath each line of editable text.\r\n    An annotation may consist of multiple lines separated by '\\n'.\r\n    Annotations can be used to display an assembler version of code for debugging or to show diagnostic messages inline or to\r\n    line up different versions of text in a merge tool.</p>\r\n    <p>Annotations count as display lines for the methods\r\n    <a class=\"message\" href=\"#SCI_VISIBLEFROMDOCLINE\"><code>SCI_VISIBLEFROMDOCLINE</code></a> and\r\n    <a class=\"message\" href=\"#SCI_DOCLINEFROMVISIBLE\"><code>SCI_DOCLINEFROMVISIBLE</code></a></p>\r\n    <p>Annotations used for inline diagnostics:</p>\r\n    <p><img src=\"annotations.png\" alt=\"Annotations used for inline diagnostics\" /></p>\r\n\r\n    <code>\r\n     <a class=\"message\" href=\"#SCI_ANNOTATIONSETTEXT\">SCI_ANNOTATIONSETTEXT(line line, const char *text)</a><br />\r\n     <a class=\"message\" href=\"#SCI_ANNOTATIONGETTEXT\">SCI_ANNOTATIONGETTEXT(line line, char *text) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_ANNOTATIONSETSTYLE\">SCI_ANNOTATIONSETSTYLE(line line, int style)</a><br />\r\n     <a class=\"message\" href=\"#SCI_ANNOTATIONGETSTYLE\">SCI_ANNOTATIONGETSTYLE(line line) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_ANNOTATIONSETSTYLES\">SCI_ANNOTATIONSETSTYLES(line line, const char *styles)</a><br />\r\n     <a class=\"message\" href=\"#SCI_ANNOTATIONGETSTYLES\">SCI_ANNOTATIONGETSTYLES(line line, char *styles) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_ANNOTATIONGETLINES\">SCI_ANNOTATIONGETLINES(line line) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_ANNOTATIONCLEARALL\">SCI_ANNOTATIONCLEARALL</a><br />\r\n     <a class=\"message\" href=\"#SCI_ANNOTATIONSETVISIBLE\">SCI_ANNOTATIONSETVISIBLE(int visible)</a><br />\r\n     <a class=\"message\" href=\"#SCI_ANNOTATIONGETVISIBLE\">SCI_ANNOTATIONGETVISIBLE &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_ANNOTATIONSETSTYLEOFFSET\">SCI_ANNOTATIONSETSTYLEOFFSET(int style)</a><br />\r\n     <a class=\"message\" href=\"#SCI_ANNOTATIONGETSTYLEOFFSET\">SCI_ANNOTATIONGETSTYLEOFFSET &rarr; int</a><br />\r\n    </code>\r\n\r\n    <p>\r\n     <b id=\"SCI_ANNOTATIONSETTEXT\">SCI_ANNOTATIONSETTEXT(line line, const char *text)</b><br />\r\n     <b id=\"SCI_ANNOTATIONGETTEXT\">SCI_ANNOTATIONGETTEXT(line line, char *text) &rarr; int</b><br />\r\n     <b id=\"SCI_ANNOTATIONSETSTYLE\">SCI_ANNOTATIONSETSTYLE(line line, int style)</b><br />\r\n     <b id=\"SCI_ANNOTATIONGETSTYLE\">SCI_ANNOTATIONGETSTYLE(line line) &rarr; int</b><br />\r\n     <b id=\"SCI_ANNOTATIONSETSTYLES\">SCI_ANNOTATIONSETSTYLES(line line, const char *styles)</b><br />\r\n     <b id=\"SCI_ANNOTATIONGETSTYLES\">SCI_ANNOTATIONGETSTYLES(line line, char *styles) &rarr; int</b><br />\r\n     <b id=\"SCI_ANNOTATIONGETLINES\">SCI_ANNOTATIONGETLINES(line line) &rarr; int</b><br />\r\n     <b id=\"SCI_ANNOTATIONCLEARALL\">SCI_ANNOTATIONCLEARALL</b><br />\r\n     A different string may be set for each line with <code>SCI_ANNOTATIONSETTEXT</code>.\r\n     To clear annotations call <code>SCI_ANNOTATIONSETTEXT</code> with a NULL pointer.\r\n     The whole of the text ANNOTATION on a line may be displayed in a particular style with\r\n     <code>SCI_ANNOTATIONSETSTYLE</code> or each character may be individually styled with\r\n     <code>SCI_ANNOTATIONSETSTYLES</code> which uses an array of bytes with each byte setting the style\r\n     of the corresponding text byte similar to <code>SCI_SETSTYLINGEX</code>. The text must be set first as it\r\n     specifies how long the annotation is so how many bytes of styling to read.\r\n     Setting an annotation will cause a\r\n     <a class=\"message\" href=\"#SC_MOD_CHANGEANNOTATION\"><code>SC_MOD_CHANGEANNOTATION</code></a>\r\n     notification to be sent.\r\n    </p>\r\n    <p>\r\n    The number of lines annotating a line can be retrieved with <code>SCI_ANNOTATIONGETLINES</code>.\r\n    All the lines can be cleared of annotations with <code>SCI_ANNOTATIONCLEARALL</code>\r\n    which is equivalent to clearing each line (setting to 0) and then deleting other memory used for this feature.\r\n    </p>\r\n    <p>\r\n    Only some style attributes are active in annotations: font, size/sizeFractional, bold/weight, italics, fore, back, and characterSet.\r\n    </p>\r\n    <p>\r\n     <b id=\"SCI_ANNOTATIONSETVISIBLE\">SCI_ANNOTATIONSETVISIBLE(int visible)</b><br />\r\n     <b id=\"SCI_ANNOTATIONGETVISIBLE\">SCI_ANNOTATIONGETVISIBLE &rarr; int</b><br />\r\n     Annotations can be made visible in a view and there is a choice of display style when visible.\r\n     The two messages set and get the annotation display mode. The <code class=\"parameter\">visible</code>\r\n     argument can be one of:</p>\r\n\r\n    <table class=\"standard\" summary=\"Annotation visibility\">\r\n      <tbody valign=\"top\">\r\n        <tr>\r\n          <th align=\"left\"><code>ANNOTATION_HIDDEN</code></th>\r\n\r\n          <td>0</td>\r\n\r\n          <td>Annotations are not displayed.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>ANNOTATION_STANDARD</code></th>\r\n\r\n          <td>1</td>\r\n\r\n          <td>Annotations are drawn left justified with no adornment.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>ANNOTATION_BOXED</code></th>\r\n\r\n          <td>2</td>\r\n\r\n          <td>Annotations are indented to match the text and are surrounded by a box.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>ANNOTATION_INDENTED</code></th>\r\n\r\n          <td>3</td>\r\n\r\n          <td>Annotations are indented to match the text.</td>\r\n        </tr>\r\n      </tbody>\r\n    </table>\r\n\r\n    <p>\r\n     <b id=\"SCI_ANNOTATIONSETSTYLEOFFSET\">SCI_ANNOTATIONSETSTYLEOFFSET(int style)</b><br />\r\n     <b id=\"SCI_ANNOTATIONGETSTYLEOFFSET\">SCI_ANNOTATIONGETSTYLEOFFSET &rarr; int</b><br />\r\n    Annotation styles may be completely separated from standard text styles by setting a style offset. For example,\r\n    <code>SCI_ANNOTATIONSETSTYLEOFFSET(512)</code> would allow the annotation styles to be numbered from\r\n    512 up to 767 so they do not overlap styles set by lexers (or margins if margins offset is 256).\r\n    Each style number set with <code>SCI_ANNOTATIONSETSTYLE</code>\r\n    or <code>SCI_ANNOTATIONSETSTYLES</code> has the offset added before looking up the style.\r\n    </p>\r\n    <p>\r\n    Always call <a class=\"seealso\" href=\"#SCI_ALLOCATEEXTENDEDSTYLES\">SCI_ALLOCATEEXTENDEDSTYLES</a>\r\n    before <code>SCI_ANNOTATIONSETSTYLEOFFSET</code> and use the result as the argument to <code>SCI_ANNOTATIONSETSTYLEOFFSET</code>.\r\n    </p>\r\n\r\n    <h2 id=\"EndOfLineAnnotations\">End of Line Annotations</h2>\r\n\r\n    <p>End of Line Annotations are read-only lines of text at the end of each line of editable text.\r\n    End of Line Annotations can be used to display an assembler version of code for debugging or to show diagnostic messages inline or to\r\n    line up different versions of text in a merge tool.</p>\r\n\r\n    <p>End of Line Annotations used to display an assembler version of code for debugging</p>\r\n    <p><img src=\"eolannotation.png\" alt=\"End of Line Annotations used to display an assembler version of code for debugging\" /></p>\r\n\r\n    <code>\r\n     <a class=\"message\" href=\"#SCI_EOLANNOTATIONSETTEXT\">SCI_EOLANNOTATIONSETTEXT(line line, const char *text)</a><br />\r\n     <a class=\"message\" href=\"#SCI_EOLANNOTATIONGETTEXT\">SCI_EOLANNOTATIONGETTEXT(line line, char *text) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_EOLANNOTATIONSETSTYLE\">SCI_EOLANNOTATIONSETSTYLE(line line, int style)</a><br />\r\n     <a class=\"message\" href=\"#SCI_EOLANNOTATIONGETSTYLE\">SCI_EOLANNOTATIONGETSTYLE(line line) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_EOLANNOTATIONCLEARALL\">SCI_EOLANNOTATIONCLEARALL</a><br />\r\n     <a class=\"message\" href=\"#SCI_EOLANNOTATIONSETVISIBLE\">SCI_EOLANNOTATIONSETVISIBLE(int visible)</a><br />\r\n     <a class=\"message\" href=\"#SCI_EOLANNOTATIONGETVISIBLE\">SCI_EOLANNOTATIONGETVISIBLE &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_EOLANNOTATIONSETSTYLEOFFSET\">SCI_EOLANNOTATIONSETSTYLEOFFSET(int style)</a><br />\r\n     <a class=\"message\" href=\"#SCI_EOLANNOTATIONGETSTYLEOFFSET\">SCI_EOLANNOTATIONGETSTYLEOFFSET &rarr; int</a><br />\r\n    </code>\r\n\r\n    <p>\r\n     <b id=\"SCI_EOLANNOTATIONSETTEXT\">SCI_EOLANNOTATIONSETTEXT(line line, const char *text)</b><br />\r\n     <b id=\"SCI_EOLANNOTATIONGETTEXT\">SCI_EOLANNOTATIONGETTEXT(line line, char *text) &rarr; int</b><br />\r\n     <b id=\"SCI_EOLANNOTATIONSETSTYLE\">SCI_EOLANNOTATIONSETSTYLE(line line, int style)</b><br />\r\n     <b id=\"SCI_EOLANNOTATIONGETSTYLE\">SCI_EOLANNOTATIONGETSTYLE(line line) &rarr; int</b><br />\r\n     <b id=\"SCI_EOLANNOTATIONCLEARALL\">SCI_EOLANNOTATIONCLEARALL</b><br />\r\n     A different string may be set for each line with <code>SCI_EOLANNOTATIONSETTEXT</code>.\r\n     The text argument is always in UTF-8, not the document encoding.\r\n     To clear end of line annotations call <code>SCI_EOLANNOTATIONSETTEXT</code> with a NULL pointer.\r\n     The whole of the text EOLANNOTATION on a line may be displayed in a particular style with\r\n     <code>SCI_EOLANNOTATIONSETSTYLE</code>.\r\n     Setting an end of line annotation will cause a\r\n     <a class=\"message\" href=\"#SC_MOD_CHANGEEOLANNOTATION\"><code>SC_MOD_CHANGEEOLANNOTATION</code></a>\r\n     notification to be sent.\r\n    </p>\r\n    <p>\r\n    All the lines can be cleared of end of line annotations with <code>SCI_EOLANNOTATIONCLEARALL</code>\r\n    which is equivalent to clearing each line (setting to 0) and then deleting other memory used for this feature.\r\n    </p>\r\n    <p>\r\n    Only some style attributes are active in end of line annotations: font, size/sizeFractional, bold/weight, italics, fore, back, and characterSet.\r\n    </p>\r\n    <p>\r\n     <b id=\"SCI_EOLANNOTATIONSETVISIBLE\">SCI_EOLANNOTATIONSETVISIBLE(int visible)</b><br />\r\n     <b id=\"SCI_EOLANNOTATIONGETVISIBLE\">SCI_EOLANNOTATIONGETVISIBLE &rarr; int</b><br />\r\n     End of Line Annotations can be made visible in a view and there is a choice of display style when visible.\r\n     The two messages set and get the annotation display mode. The <code class=\"parameter\">visible</code>\r\n     argument can be one of:</p>\r\n\r\n    <table class=\"standard\" summary=\"End of Line Annotation visibility\">\r\n      <tbody valign=\"top\">\r\n        <tr>\r\n          <th align=\"left\"><code>EOLANNOTATION_HIDDEN</code></th>\r\n\r\n          <td>0x0</td>\r\n\r\n          <td>End of Line Annotations are not displayed.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>EOLANNOTATION_STANDARD</code></th>\r\n\r\n          <td>0x1</td>\r\n\r\n          <td>End of Line Annotations are drawn left justified with no adornment.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>EOLANNOTATION_BOXED</code></th>\r\n\r\n          <td>0x2</td>\r\n\r\n          <td>End of Line Annotations are indented to match the text and are surrounded by a box.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>EOLANNOTATION_STADIUM</code></th>\r\n\r\n          <td>0x100</td>\r\n\r\n          <td>Surround with a &#x25D6;stadium&#x25D7; - a rectangle with rounded ends.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>EOLANNOTATION_FLAT_CIRCLE</code></th>\r\n\r\n          <td>0x101</td>\r\n\r\n          <td>Surround with a |shape&#x25D7; with flat left end and curved right end.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>EOLANNOTATION_ANGLE_CIRCLE</code></th>\r\n\r\n          <td>0x102</td>\r\n\r\n          <td>Surround with a &#x25C4;shape&#x25D7; with angled left end and curved right end.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>EOLANNOTATION_CIRCLE_FLAT</code></th>\r\n\r\n          <td>0x110</td>\r\n\r\n          <td>Surround with a &#x25D6;shape| with curved left end and flat right end.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>EOLANNOTATION_FLATS</code></th>\r\n\r\n          <td>0x111</td>\r\n\r\n          <td>Surround with a |shape| with flat ends.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>EOLANNOTATION_ANGLE_FLAT</code></th>\r\n\r\n          <td>0x112</td>\r\n\r\n          <td>Surround with a &#x25C4;shape| with angled left end and flat right end.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>EOLANNOTATION_CIRCLE_ANGLE</code></th>\r\n\r\n          <td>0x120</td>\r\n\r\n          <td>Surround with a &#x25D6;shape&#x25B6; with curved left end and angled right end.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>EOLANNOTATION_FLAT_ANGLE</code></th>\r\n\r\n          <td>0x121</td>\r\n\r\n          <td>Surround with a |shape&#x25B6; with flat left end and angled right end.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>EOLANNOTATION_ANGLES</code></th>\r\n\r\n          <td>0x122</td>\r\n\r\n          <td>Surround with a &#x25C4;shape&#x25B6; with angles on each end.</td>\r\n        </tr>\r\n\r\n      </tbody>\r\n    </table>\r\n\r\n    <p>Different shapes available for EOL annotations.\r\n    Only one shape can currently be used for the whole document - this illustration was produced by trickery.</p>\r\n    <p><img src=\"StadiumVariants.png\" alt=\"Different shapes available for EOL annotations\" /></p>\r\n\r\n    <p>\r\n     <b id=\"SCI_EOLANNOTATIONSETSTYLEOFFSET\">SCI_EOLANNOTATIONSETSTYLEOFFSET(int style)</b><br />\r\n     <b id=\"SCI_EOLANNOTATIONGETSTYLEOFFSET\">SCI_EOLANNOTATIONGETSTYLEOFFSET &rarr; int</b><br />\r\n    End of Line Annotation styles may be completely separated from standard text styles by setting a style offset. For example,\r\n    <code>SCI_EOLANNOTATIONSETSTYLEOFFSET(512)</code> would allow the end of line  annotation styles to be numbered from\r\n    512 up to 767 so they do not overlap styles set by lexers (or margins if margins offset is 256).\r\n    Each style number set with <code>SCI_EOLANNOTATIONSETSTYLE</code> has the offset added before looking up the style.\r\n    </p>\r\n    <p>\r\n    Always call <a class=\"seealso\" href=\"#SCI_ALLOCATEEXTENDEDSTYLES\">SCI_ALLOCATEEXTENDEDSTYLES</a>\r\n    before <code>SCI_EOLANNOTATIONSETSTYLEOFFSET</code> and use the result as the argument to <code>SCI_EOLANNOTATIONSETSTYLEOFFSET</code>.\r\n    </p>\r\n    <h2 id=\"OtherSettings\">Other settings</h2>\r\n    <code>\r\n     <a class=\"message\" href=\"#SCI_SETBUFFEREDDRAW\">SCI_SETBUFFEREDDRAW(bool buffered)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETBUFFEREDDRAW\">SCI_GETBUFFEREDDRAW &rarr; bool</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETPHASESDRAW\">SCI_SETPHASESDRAW(int phases)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETPHASESDRAW\">SCI_GETPHASESDRAW &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETTECHNOLOGY\">SCI_SETTECHNOLOGY(int technology)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETTECHNOLOGY\">SCI_GETTECHNOLOGY &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETFONTQUALITY\">SCI_SETFONTQUALITY(int fontQuality)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETFONTQUALITY\">SCI_GETFONTQUALITY &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETCODEPAGE\">SCI_SETCODEPAGE(int codePage)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETCODEPAGE\">SCI_GETCODEPAGE &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETIMEINTERACTION\">SCI_SETIMEINTERACTION(int imeInteraction)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETIMEINTERACTION\">SCI_GETIMEINTERACTION &rarr; int</a><br />\r\n    </code>\r\n<div  class=\"provisional\">\r\n    <code>\r\n     <a class=\"message\" href=\"#SCI_SETBIDIRECTIONAL\"><span class=\"provisional\">SCI_SETBIDIRECTIONAL(int bidirectional)</span></a><br />\r\n     <a class=\"message\" href=\"#SCI_GETBIDIRECTIONAL\">SCI_GETBIDIRECTIONAL &rarr; int</a><br />\r\n    </code>\r\n</div>\r\n    <code>\r\n     <a class=\"message\" href=\"#SCI_GRABFOCUS\">SCI_GRABFOCUS</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETFOCUS\">SCI_SETFOCUS(bool focus)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETFOCUS\">SCI_GETFOCUS &rarr; bool</a><br />\r\n     <a class=\"message\" href=\"#SCI_SUPPORTSFEATURE\">SCI_SUPPORTSFEATURE(int feature) &rarr; bool</a><br />\r\n    </code>\r\n\r\n    <p>To forward a message <code>(WM_XXXX, WPARAM, LPARAM)</code> to Scintilla, you can use\r\n    <code>SendMessage(hScintilla, WM_XXXX, WPARAM, LPARAM)</code> where <code>hScintilla</code> is\r\n    the handle to the Scintilla window you created as your editor.</p>\r\n\r\n    <p>On Windows, the top level window should forward any <code>WM_SETTINGCHANGE</code>,\r\n    <code>WM_SYSCOLORCHANGE</code>, and\r\n    <code>WM_DPICHANGED</code> messages to Scintilla as this allows Scintilla to respond to changes to\r\n    mouse settings, monitor resolution, colour scheme and similar system properties.</p>\r\n\r\n    <p><b id=\"SCI_SETBUFFEREDDRAW\">SCI_SETBUFFEREDDRAW(bool buffered)</b><br />\r\n     <b id=\"SCI_GETBUFFEREDDRAW\">SCI_GETBUFFEREDDRAW &rarr; bool</b><br />\r\n     These messages turn buffered drawing on or off and report the buffered drawing state. Buffered\r\n    drawing draws each line into a bitmap rather than directly to the screen and then copies the\r\n    bitmap to the screen. This avoids flickering although it does take longer. The default is for\r\n    drawing to be buffered on Win32 and GTK and to not be buffered on Cocoa and Qt.\r\n    Buffered drawing is not supported on Cocoa.\r\n    </p>\r\n\r\n    <p>Current platforms perform window buffering so it is almost always better for this option to be turned off.\r\n    For Win32 and GTK, client code should turn off buffering at initialisation.\r\n    There are some older platforms and unusual modes where buffering may still be useful.\r\n    </p>\r\n\r\n    <p><b id=\"SCI_SETPHASESDRAW\">SCI_SETPHASESDRAW(int phases)</b><br />\r\n     <b id=\"SCI_GETPHASESDRAW\">SCI_GETPHASESDRAW &rarr; int</b><br />\r\n     There are several orders in which the text area may be drawn offering a trade-off between speed\r\n     and allowing all pixels of text to be seen even when they overlap other elements.</p>\r\n     <p>In single phase drawing (<code class=\"deprecated\">SC_PHASES_ONE</code>) each\r\n     run of characters in one style is drawn along with its background.\r\n     If a character overhangs the end of a run, such as in \"<i>V</i>_\" where the\r\n     \"<i>V</i>\" is in a different style from the \"_\", then this can cause the right hand\r\n     side of the \"<i>V</i>\" to be overdrawn by the background of the \"_\" which\r\n     cuts it off.</p>\r\n     <p>\r\n     Single phase drawing is deprecated and should not be used by applications.\r\n     </p>\r\n     <p>Two phase drawing (<code>SC_PHASES_TWO</code>)\r\n     fixes this by drawing all the backgrounds of a line first and then drawing the text\r\n     in transparent mode. Lines are drawn separately and no line will overlap another\r\n     so any pixels that overlap into another line such as extreme ascenders and\r\n     descenders on characters will be cut off.\r\n     Two phase drawing may flicker more than single phase\r\n     unless buffered drawing is on or the platform is naturally buffered.\r\n     The default is for drawing to be two phase.</p>\r\n     <p>Multiple phase drawing (<code>SC_PHASES_MULTIPLE</code>)\r\n     draws the whole area multiple times, once for each feature, building up\r\n     the appearance in layers or phases. The coloured backgrounds for all lines are\r\n     drawn before any text and then all the text is drawn in transparent mode over this\r\n     combined background without clipping text to the line boundaries. This allows\r\n     extreme ascenders and descenders to overflow into the adjacent lines.\r\n     This mode is incompatible with buffered drawing and will act as <code>SC_PHASES_TWO</code>\r\n     if buffered drawing is turned on.\r\n     Multiple phase drawing is slower than two phase drawing.\r\n     Setting the layout cache with\r\n     <a class=\"message\" href=\"#SCI_SETLAYOUTCACHE\"><code>\r\n     SCI_SETLAYOUTCACHE(SC_CACHE_PAGE)</code></a>\r\n     or higher can ensure that multiple phase drawing is not significantly slower.</p>\r\n\r\n    <p><b id=\"SCI_SETTECHNOLOGY\">SCI_SETTECHNOLOGY(int technology)</b><br />\r\n     <b id=\"SCI_GETTECHNOLOGY\">SCI_GETTECHNOLOGY &rarr; int</b><br />\r\n    The technology property allows choosing between different drawing APIs and options.\r\n    On most platforms, the only choice is <code>SC_TECHNOLOGY_DEFAULT</code> (0).\r\n    On Windows Vista or later, <code>SC_TECHNOLOGY_DIRECTWRITE</code> (1),\r\n    <code>SC_TECHNOLOGY_DIRECTWRITERETAIN</code> (2), or\r\n    <code>SC_TECHNOLOGY_DIRECTWRITEDC</code> (3)\r\n    can be chosen to use the Direct2D and DirectWrite APIs for higher quality antialiased drawing.\r\n    <code>SC_TECHNOLOGY_DIRECTWRITERETAIN</code> differs from\r\n    <code>SC_TECHNOLOGY_DIRECTWRITE</code> by requesting that the frame\r\n    is retained after being presented which may prevent drawing failures on some cards and drivers.\r\n    <code>SC_TECHNOLOGY_DIRECTWRITEDC</code> differs from\r\n    <code>SC_TECHNOLOGY_DIRECTWRITE</code> by using DirectWrite to draw into a GDI DC.\r\n    </p>\r\n    <p>\r\n    On Win32, buffered drawing is set to a reasonable value for the technology: on for GDI and off for Direct2D\r\n    as Direct2D performs its own buffering.\r\n    This can be changed after setting technology with\r\n    <a class=\"seealso\" href=\"#SCI_SETBUFFEREDDRAW\">SCI_SETBUFFEREDDRAW</a>.\r\n    </p>\r\n    <p>\r\n    When using DirectWrite, you can use\r\n    <a class=\"message\" href=\"#SCI_SETFONTLOCALE\"><code>SCI_SETFONTLOCALE</code></a>\r\n    to set an appropriate font locale to draw text with expected language-dependent glyphs.\r\n    </p>\r\n\r\n    <p><b id=\"SCI_SETFONTQUALITY\">SCI_SETFONTQUALITY(int fontQuality)</b><br />\r\n     <b id=\"SCI_GETFONTQUALITY\">SCI_GETFONTQUALITY &rarr; int</b><br />\r\n     Manage font quality (antialiasing method). Currently, the following values are available on Windows:\r\n     <code>SC_EFF_QUALITY_DEFAULT</code> (backward compatible),\r\n     <code>SC_EFF_QUALITY_NON_ANTIALIASED</code>,\r\n     <code>SC_EFF_QUALITY_ANTIALIASED</code>,\r\n     <code>SC_EFF_QUALITY_LCD_OPTIMIZED</code>.</p>\r\n     <p>In case it is necessary to squeeze more options into this property, only a limited number of bits defined\r\n     by <code>SC_EFF_QUALITY_MASK</code> (0xF) will be used for quality.</p>\r\n\r\n    <p><b id=\"SCI_SETCODEPAGE\">SCI_SETCODEPAGE(int codePage)</b><br />\r\n     <b id=\"SCI_GETCODEPAGE\">SCI_GETCODEPAGE &rarr; int</b><br />\r\n     Scintilla supports UTF-8, Japanese, Chinese and Korean DBCS along with single byte encodings like Latin-1.\r\n     UTF-8 (<code>SC_CP_UTF8</code>) is the default. Use this message with\r\n    <code class=\"parameter\">codePage</code> set to the code page number to set Scintilla to use code page information\r\n    to ensure multiple byte characters are treated as one character rather than multiple. This also stops\r\n    the caret from moving between the bytes in a multi-byte character.\r\n    Do not use this message to choose between different single byte character sets - use\r\n    <a class=\"seealso\" href=\"#SCI_STYLESETCHARACTERSET\">SCI_STYLESETCHARACTERSET</a>.\r\n    Call with\r\n    <code class=\"parameter\">codePage</code> set to zero to disable multi-byte support.</p>\r\n\r\n    <p>Code page <code>SC_CP_UTF8</code> (65001) sets Scintilla into Unicode mode with the document\r\n    treated as a sequence of characters expressed in UTF-8. The text is converted to the platform's\r\n    normal Unicode encoding before being drawn by the OS and thus can display Hebrew, Arabic,\r\n    Cyrillic, and Han characters. Languages which can use two characters stacked vertically in one\r\n    horizontal space, such as Thai, will mostly work but there are some issues where the characters\r\n    are drawn separately leading to visual glitches. Bi-directional text is not supported. </p>\r\n\r\n    <p>Code page can be set to 65001 (UTF-8), 932 (Japanese Shift-JIS), 936 (Simplified Chinese GBK),\r\n    949 (Korean Unified Hangul Code), 950 (Traditional Chinese Big5), or 1361 (Korean Johab).</p>\r\n\r\n    <p><b id=\"SCI_SETIMEINTERACTION\">SCI_SETIMEINTERACTION(int imeInteraction)</b><br />\r\n     <b id=\"SCI_GETIMEINTERACTION\">SCI_GETIMEINTERACTION &rarr; int</b><br />\r\n     When entering text in Chinese, Japanese, or Korean an Input Method Editor (IME) may be displayed.\r\n     The IME may be an extra window appearing above Scintilla or may be displayed by Scintilla itself\r\n     as text. On some platforms there is a choice between the two techniques.\r\n     A windowed IME <code>SC_IME_WINDOWED</code> (0) may be more similar in appearance and\r\n     behaviour to the IME in other applications.\r\n     An inline IME <code>SC_IME_INLINE</code> (1) may work better with some Scintilla features such as\r\n     rectangular and multiple selection, with IME interactions such as retrieve-surrounding or reconversion feature.</p>\r\n\r\n    <table class=\"standard\" summary=\"IME input method\">\r\n      <caption>IME input method support</caption>\r\n      <thead align=\"left\">\r\n        <tr>\r\n          <th>IME input method</th>\r\n          <th>Windows</th>\r\n          <th>GTK</th>\r\n          <th>Qt</th>\r\n          <th>macOS</th>\r\n        </tr>\r\n      </thead>\r\n      <tbody valign=\"top\">\r\n        <tr>\r\n          <th align=\"left\"><code>SC_IME_WINDOWED</code></th>\r\n          <td>&check;</td>\r\n          <td>&check;</td>\r\n          <td> </td>\r\n          <td> </td>\r\n        </tr>\r\n        <tr>\r\n          <th align=\"left\"><code>SC_IME_INLINE</code></th>\r\n          <td>&check;</td>\r\n          <td>&check;</td>\r\n          <td>&check;</td>\r\n          <td>&check;</td>\r\n       </tr>\r\n      </tbody>\r\n    </table>\r\n    <p></p>\r\n\r\n    <table class=\"standard\" summary=\"IME interaction\">\r\n      <caption>IME interaction support</caption>\r\n      <thead align=\"left\">\r\n        <tr>\r\n          <th>IME interaction</th>\r\n          <th>Windows</th>\r\n          <th>GTK</th>\r\n          <th>Qt</th>\r\n          <th>macOS</th>\r\n        </tr>\r\n      </thead>\r\n      <tbody valign=\"top\">\r\n        <tr>\r\n          <th align=\"left\">Retrieve Surrounding</th>\r\n          <td>&check;</td>\r\n          <td>&check;</td>\r\n          <td>&check;</td>\r\n          <td>&check;</td>\r\n        </tr>\r\n        <tr>\r\n          <th align=\"left\">Reconversion</th>\r\n          <td>&check;</td>\r\n          <td>&check;</td>\r\n          <td>&check;</td>\r\n          <td>&check;</td>\r\n        </tr>\r\n        <tr>\r\n          <th align=\"left\">Delete Surrounding</th>\r\n          <td>&check;</td>\r\n          <td>&check;</td>\r\n          <td>&check;</td>\r\n          <td>&check;</td>\r\n        </tr>\r\n      </tbody>\r\n    </table>\r\n\r\n     <p>The windowed behaviour can be chosen with <code>SCI_SETIMEINTERACTION(SC_IME_WINDOWED)</code>\r\n     and the inline behaviour with <code>SCI_SETIMEINTERACTION(SC_IME_INLINE)</code>.\r\n     Scintilla may ignore this call in some cases. For example, the inline behaviour might only be supported for some languages.</p>\r\n     <p>When the inline IME mode is active, characters are added tentatively before being finalised and an\r\n     <a class=\"message\" href=\"#SCN_CHARADDED\">SCN_CHARADDED</a>\r\n     notification (with <code class=\"parameter\">characterSource</code> set to <code>SC_CHARACTERSOURCE_TENTATIVE_INPUT</code>) is sent for each character.</p>\r\n\r\n<div  class=\"provisional\">\r\n    <a href=\"#ProvisionalMessages\">These bidirectional features are experimental and incomplete.</a><br />\r\n    <p><b id=\"SCI_SETBIDIRECTIONAL\">SCI_SETBIDIRECTIONAL(int bidirectional)</b><br />\r\n     <b id=\"SCI_GETBIDIRECTIONAL\">SCI_GETBIDIRECTIONAL &rarr; int</b><br />\r\n     Some languages, like Arabic and Hebrew, are written from right to left instead of from left to right as English is.\r\n     Documents that use multiple languages may contain both directions and this is termed \"bidirectional\".\r\n     The default text direction may be right to left or left to right.\r\n     Scintilla only correctly displays bidirectional text on some platforms.\r\n     Currently, there is experimental support for bidirectional text on Win32 using DirectWrite and on macOS using Cocoa.\r\n     Only UTF-8 documents will show bidirectional behaviour and only in <code>SC_BIDIRECTIONAL_L2R</code> mode.\r\n     Some features, such as virtual space may not work with\r\n     bidirectional text or may work only in some circumstances.\r\n     <code>SC_BIDIRECTIONAL_R2L</code> may be implemented in the future.</p>\r\n     <p>There are additional processing and storage costs to bidirectional text.\r\n     As some applications may not want to pay the costs, bidirectional support must be explicitly enabled by calling\r\n     <code>SCI_SETBIDIRECTIONAL(SC_BIDIRECTIONAL_L2R)</code> (1) which chooses left to right as the default direction or\r\n     <code>SCI_SETBIDIRECTIONAL(SC_BIDIRECTIONAL_R2L)</code> (2) for default right to left.\r\n     On Win32, this should be done after setting the technology to <code>SC_TECHNOLOGY_DIRECTWRITE</code>,\r\n     <code>SC_TECHNOLOGY_DIRECTWRITERETAIN</code>, or\r\n     <code>SC_TECHNOLOGY_DIRECTWRITEDC</code>.</p>\r\n     <p>If the call succeeded <code>SCI_GETBIDIRECTIONAL</code> will return the same value otherwise\r\n     <code>SC_BIDIRECTIONAL_DISABLED</code> (0) is returned.\r\n     </p>\r\n     <p>Opaque selection drawing (<a class=\"seealso\" href=\"#SCI_SETSELECTIONLAYER\">SCI_SETSELECTIONLAYER(SC_LAYER_BASE)</a>)\r\n     is not supported in bidirectional mode.\r\n     Use <code>SC_LAYER_UNDER_TEXT</code> or <code>SC_LAYER_OVER_TEXT</code> instead.\r\n     </p>\r\n</div>\r\n\r\n    <p><b id=\"SCI_GRABFOCUS\">SCI_GRABFOCUS</b><br />\r\n     <b id=\"SCI_SETFOCUS\">SCI_SETFOCUS(bool focus)</b><br />\r\n     <b id=\"SCI_GETFOCUS\">SCI_GETFOCUS &rarr; bool</b><br />\r\n     Scintilla can be told to grab the focus with <code>SCI_GRABFOCUS</code>.\r\n     This is needed more on GTK where focus handling is more complicated than on Windows.</p>\r\n\r\n    <p>The internal focus flag can be set with <code>SCI_SETFOCUS</code>. This is used by clients\r\n    that have complex focus requirements such as having their own window that gets the real focus\r\n    but with the need to indicate that Scintilla has the logical focus.</p>\r\n\r\n    <p><b id=\"SCI_SUPPORTSFEATURE\">SCI_SUPPORTSFEATURE(int feature) &rarr; bool</b><br />\r\n     Different platforms support different features and <code>SCI_SUPPORTSFEATURE</code>\r\n     can be used to check which are currently available.\r\n     For example, on Win32, Direct2D supports drawing translucent lines but GDI does not so\r\n     <code>SCI_SUPPORTSFEATURE(SC_SUPPORTS_TRANSLUCENT_STROKE)</code>\r\n     will return 1 for Direct2D and 0 for GDI. Its possible that translucent line drawing will be implemented in a future\r\n     revision to the GDI platform layer or will be implemented on particular Windows versions.\r\n     This call allows applications to tailor their settings: perhaps displaying a box with translucent coloured fill on Direct2D but\r\n     a hollow box on GDI.</p>\r\n     <p>The features that can be queried are:</p>\r\n    <table class=\"standard\" summary=\"Search flags\">\r\n      <tbody>\r\n        <tr>\r\n          <td><code>SC_SUPPORTS_LINE_DRAWS_FINAL</code></td>\r\n          <td>0</td>\r\n          <td>Whether drawing a line draws its final position.<br />\r\n          Only false on Win32 GDI.</div></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>SC_SUPPORTS_PIXEL_DIVISIONS</code></td>\r\n          <td>1</td>\r\n          <td>Are logical pixels larger than physical pixels?<br />\r\n          Currently only true for macOS Cocoa with 'retina' displays.<br />\r\n          When true, creating pixmaps at twice the resolution can produce clearer output with less blur.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>SC_SUPPORTS_FRACTIONAL_STROKE_WIDTH</code></td>\r\n          <td>2</td>\r\n          <td>Can lines be drawn with fractional widths like 1.5 or 0.5 pixels?</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>SC_SUPPORTS_TRANSLUCENT_STROKE</code></td>\r\n          <td>3</td>\r\n          <td>Can translucent lines, polygons, ellipses, and text be drawn?</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>SC_SUPPORTS_PIXEL_MODIFICATION</code></td>\r\n          <td>4</td>\r\n          <td>Can individual pixels be modified? This is false for character cell platforms like curses.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>SC_SUPPORTS_THREAD_SAFE_MEASURE_WIDTHS</code></td>\r\n          <td>5</td>\r\n          <td>Can text measurement be safely performed concurrently on multiple threads?<br />\r\n          Currently only true for macOS Cocoa, DirectWrite on Win32, and GTK on X or Wayland.\r\n          </td>\r\n        </tr>\r\n\r\n      </tbody>\r\n    </table>\r\n\r\n    <h2 id=\"BraceHighlighting\">Brace highlighting</h2>\r\n    <code><a class=\"message\" href=\"#SCI_BRACEHIGHLIGHT\">SCI_BRACEHIGHLIGHT(position posA, position\r\n    posB)</a><br />\r\n     <a class=\"message\" href=\"#SCI_BRACEBADLIGHT\">SCI_BRACEBADLIGHT(position pos)</a><br />\r\n     <a class=\"message\" href=\"#SCI_BRACEHIGHLIGHTINDICATOR\">SCI_BRACEHIGHLIGHTINDICATOR(bool useSetting, int indicator)</a><br />\r\n     <a class=\"message\" href=\"#SCI_BRACEBADLIGHTINDICATOR\">SCI_BRACEBADLIGHTINDICATOR(bool useSetting, int indicator)</a><br />\r\n     <a class=\"message\" href=\"#SCI_BRACEMATCH\">SCI_BRACEMATCH(position pos, int maxReStyle) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_BRACEMATCHNEXT\">SCI_BRACEMATCHNEXT(position pos, position startPos) &rarr; position</a><br />\r\n    </code>\r\n\r\n    <p><b id=\"SCI_BRACEHIGHLIGHT\">SCI_BRACEHIGHLIGHT(position posA, position posB)</b><br />\r\n     Up to two characters can be highlighted in a 'brace highlighting style', which is defined as\r\n    style number <a class=\"message\" href=\"#StyleDefinition\"><code>STYLE_BRACELIGHT</code></a> (34).\r\n    If you have enabled indent guides, you may also wish to highlight the indent that corresponds\r\n    with the brace. You can locate the column with <a class=\"message\"\r\n    href=\"#SCI_GETCOLUMN\"><code>SCI_GETCOLUMN</code></a> and highlight the indent with <a\r\n    class=\"message\" href=\"#SCI_SETHIGHLIGHTGUIDE\"><code>SCI_SETHIGHLIGHTGUIDE</code></a>.</p>\r\n\r\n    <p><b id=\"SCI_BRACEBADLIGHT\">SCI_BRACEBADLIGHT(position pos)</b><br />\r\n     If there is no matching brace then the <a class=\"jump\" href=\"#StyleDefinition\">brace\r\n    badlighting style</a>, style <code>STYLE_BRACEBAD</code> (35), can be used to show the brace\r\n    that is unmatched. Using a position of <code>INVALID_POSITION</code> (-1) removes the\r\n    highlight.</p>\r\n\r\n    <p><b id=\"SCI_BRACEHIGHLIGHTINDICATOR\">SCI_BRACEHIGHLIGHTINDICATOR(bool useSetting, int indicator)</b><br />\r\n     Use specified indicator to highlight matching braces instead of changing their style.</p>\r\n\r\n    <p><b id=\"SCI_BRACEBADLIGHTINDICATOR\">SCI_BRACEBADLIGHTINDICATOR(bool useSetting, int indicator)</b><br />\r\n     Use specified indicator to highlight non matching brace instead of changing its style.</p>\r\n\r\n    <p><b id=\"SCI_BRACEMATCH\">SCI_BRACEMATCH(position pos, int maxReStyle) &rarr; position</b><br />\r\n     The <code>SCI_BRACEMATCH</code> message finds a corresponding matching brace given\r\n    <code class=\"parameter\">pos</code>, the position of one brace. The brace characters handled are '(', ')', '[',\r\n    ']', '{', '}', '&lt;', and '&gt;'. The search is forwards from an opening brace and backwards\r\n    from a closing brace. If the character at position is not a brace character, or a matching\r\n    brace cannot be found, the return value is -1. Otherwise, the return value is the position of\r\n    the matching brace.</p>\r\n\r\n    <p>A match only occurs if the style of the matching brace is the same as the starting brace or\r\n    the matching brace is beyond the end of styling. Nested braces are handled correctly. The\r\n    <code class=\"parameter\">maxReStyle</code> parameter must currently be 0 - it may be used in the future to limit\r\n    the length of brace searches.</p>\r\n\r\n    <p><b id=\"SCI_BRACEMATCHNEXT\">SCI_BRACEMATCHNEXT(position pos, position startPos) &rarr; position</b><br />\r\n     Similar to <code>SCI_BRACEMATCH</code>, but matching starts at the explicit start position <code>startPos</code>\r\n     instead of the implicitly next position <code>pos &plusmn; 1</code>.</p>\r\n\r\n    <h2 id=\"TabsAndIndentationGuides\">Tabs and Indentation Guides</h2>\r\n\r\n    <p>Indentation (the white space at the start of a line) is often used by programmers to clarify\r\n    program structure and in some languages, for example Python, it may be part of the language\r\n    syntax. Tabs are normally used in editors to insert a tab character or to pad text with spaces\r\n    up to the next tab.</p>\r\n\r\n    <p>When Scintilla is laying out a section of text, text after a tab character will usually be\r\n    displayed at the next multiple of TABWIDTH columns from the left. However, it is also possible\r\n    to explicitly set tabstops in pixels for each line.</p>\r\n\r\n    <p>Scintilla can be set to treat tab and backspace in the white space at the start of a line in\r\n    a special way: inserting a tab indents the line to the next indent position rather than just\r\n    inserting a tab at the current character position and backspace unindents the line rather than\r\n    deleting a character. Scintilla can also display indentation guides (vertical lines) to help\r\n    you to generate code.</p>\r\n    <code>\r\n     <a class=\"message\" href=\"#SCI_SETTABWIDTH\">SCI_SETTABWIDTH(int tabWidth)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETTABWIDTH\">SCI_GETTABWIDTH &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETTABMINIMUMWIDTH\">SCI_SETTABMINIMUMWIDTH(int pixels)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETTABMINIMUMWIDTH\">SCI_GETTABMINIMUMWIDTH &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_CLEARTABSTOPS\">SCI_CLEARTABSTOPS(line line)</a><br />\r\n     <a class=\"message\" href=\"#SCI_ADDTABSTOP\">SCI_ADDTABSTOP(line line, int x)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETNEXTTABSTOP\">SCI_GETNEXTTABSTOP(line line, int x) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETUSETABS\">SCI_SETUSETABS(bool useTabs)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETUSETABS\">SCI_GETUSETABS &rarr; bool</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETINDENT\">SCI_SETINDENT(int indentSize)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETINDENT\">SCI_GETINDENT &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETTABINDENTS\">SCI_SETTABINDENTS(bool tabIndents)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETTABINDENTS\">SCI_GETTABINDENTS &rarr; bool</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETBACKSPACEUNINDENTS\">SCI_SETBACKSPACEUNINDENTS(bool\r\n    bsUnIndents)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETBACKSPACEUNINDENTS\">SCI_GETBACKSPACEUNINDENTS &rarr; bool</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETLINEINDENTATION\">SCI_SETLINEINDENTATION(line line, int\r\n    indentation)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETLINEINDENTATION\">SCI_GETLINEINDENTATION(line line) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETLINEINDENTPOSITION\">SCI_GETLINEINDENTPOSITION(line line) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETINDENTATIONGUIDES\">SCI_SETINDENTATIONGUIDES(int indentView)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETINDENTATIONGUIDES\">SCI_GETINDENTATIONGUIDES &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETHIGHLIGHTGUIDE\">SCI_SETHIGHLIGHTGUIDE(position column)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETHIGHLIGHTGUIDE\">SCI_GETHIGHLIGHTGUIDE &rarr; position</a><br />\r\n    </code>\r\n\r\n    <p><b id=\"SCI_SETTABMINIMUMWIDTH\">SCI_SETTABMINIMUMWIDTH(int pixels)</b><br />\r\n     <b id=\"SCI_GETTABMINIMUMWIDTH\">SCI_GETTABMINIMUMWIDTH &rarr; int</b><br />\r\n     <code>SCI_SETTABMINIMUMWIDTH</code> sets the minimum size of a tab in pixels to ensure that the tab\r\n     can be seen. The default value is 2. This is particularly useful with proportional fonts with fractional widths where\r\n     the character before the tab may end a fraction of a pixel before a tab stop, causing the tab to only be a fraction of\r\n     a pixel wide without this setting.\r\n     Where displaying a miniaturized version of the document, setting this to 0 may make the miniaturized\r\n     version lay out more like the normal size version.</p>\r\n\r\n    <p><b id=\"SCI_SETTABWIDTH\">SCI_SETTABWIDTH(int tabWidth)</b><br />\r\n     <b id=\"SCI_GETTABWIDTH\">SCI_GETTABWIDTH &rarr; int</b><br />\r\n     <code>SCI_SETTABWIDTH</code> sets the size of a tab as a multiple of the size of a space\r\n    character in <code>STYLE_DEFAULT</code>. The default tab width is 8 characters. There are no\r\n    limits on tab sizes, but values less than 1 or large values may have undesirable effects.</p>\r\n\r\n    <p><b id=\"SCI_CLEARTABSTOPS\">SCI_CLEARTABSTOPS(line line)</b><br />\r\n     <b id=\"SCI_ADDTABSTOP\">SCI_ADDTABSTOP(line line, int x)</b><br />\r\n     <b id=\"SCI_GETNEXTTABSTOP\">SCI_GETNEXTTABSTOP(line line, int x) &rarr; int</b><br />\r\n     <code>SCI_CLEARTABSTOPS</code> clears explicit tabstops on a line. <code>SCI_ADDTABSTOP</code>\r\n    adds an explicit tabstop at the specified distance from the left (in pixels), and\r\n    <code>SCI_GETNEXTTABSTOP</code> gets the next explicit tabstop position set after the given x position,\r\n    or zero if there aren't any.\r\n    Changing tab stops produces a <a class=\"message\" href=\"#SC_MOD_CHANGETABSTOPS\">SC_MOD_CHANGETABSTOPS</a> notification.\r\n    </p>\r\n\r\n    <p><b id=\"SCI_SETUSETABS\">SCI_SETUSETABS(bool useTabs)</b><br />\r\n     <b id=\"SCI_GETUSETABS\">SCI_GETUSETABS &rarr; bool</b><br />\r\n     <code>SCI_SETUSETABS</code> determines whether indentation should be created out of a mixture\r\n    of tabs and spaces or be based purely on spaces. Set <code class=\"parameter\">useTabs</code> to <code>false</code>\r\n    (0) to create all tabs and indents out of spaces. The default is <code>true</code>. You can use\r\n    <a class=\"message\" href=\"#SCI_GETCOLUMN\"><code>SCI_GETCOLUMN</code></a> to get the column of a\r\n    position taking the width of a tab into account.</p>\r\n    <p><b id=\"SCI_SETINDENT\">SCI_SETINDENT(int indentSize)</b><br />\r\n     <b id=\"SCI_GETINDENT\">SCI_GETINDENT &rarr; int</b><br />\r\n     <code>SCI_SETINDENT</code> sets the size of indentation in terms of the width of a space in <a\r\n    class=\"message\" href=\"#StyleDefinition\"><code>STYLE_DEFAULT</code></a>. If you set a width of\r\n    0, the indent size is the same as the tab size. There are no limits on indent sizes, but values\r\n    less than 0 or large values may have undesirable effects.\r\n    </p>\r\n\r\n    <p><b id=\"SCI_SETTABINDENTS\">SCI_SETTABINDENTS(bool tabIndents)</b><br />\r\n     <b id=\"SCI_GETTABINDENTS\">SCI_GETTABINDENTS &rarr; bool</b><br />\r\n     <b id=\"SCI_SETBACKSPACEUNINDENTS\">SCI_SETBACKSPACEUNINDENTS(bool bsUnIndents)</b><br />\r\n     <b id=\"SCI_GETBACKSPACEUNINDENTS\">SCI_GETBACKSPACEUNINDENTS &rarr; bool</b><br />\r\n    </p>\r\n\r\n    <p>Inside indentation white space, the tab and backspace keys can be made to indent and\r\n    unindent rather than insert a tab character or delete a character with the\r\n    <code>SCI_SETTABINDENTS</code> and <code>SCI_SETBACKSPACEUNINDENTS</code> functions.</p>\r\n\r\n    <p><b id=\"SCI_SETLINEINDENTATION\">SCI_SETLINEINDENTATION(line line, int indentation)</b><br />\r\n     <b id=\"SCI_GETLINEINDENTATION\">SCI_GETLINEINDENTATION(line line) &rarr; int</b><br />\r\n     The amount of indentation on a line can be discovered and set with\r\n    <code>SCI_GETLINEINDENTATION</code> and <code>SCI_SETLINEINDENTATION</code>. The indentation is\r\n    measured in character columns, which correspond to the width of space characters.</p>\r\n\r\n    <p><b id=\"SCI_GETLINEINDENTPOSITION\">SCI_GETLINEINDENTPOSITION(line line) &rarr; position</b><br />\r\n     This returns the position at the end of indentation of a line.</p>\r\n\r\n    <p><b id=\"SCI_SETINDENTATIONGUIDES\">SCI_SETINDENTATIONGUIDES(int indentView)</b><br />\r\n     <b id=\"SCI_GETINDENTATIONGUIDES\">SCI_GETINDENTATIONGUIDES &rarr; int</b><br />\r\n     Indentation guides are dotted vertical lines that appear within indentation white space every\r\n    indent size columns. They make it easy to see which constructs line up especially when they\r\n    extend over multiple pages. Style <a class=\"message\"\r\n    href=\"#StyleDefinition\"><code>STYLE_INDENTGUIDE</code></a> (37) is used to specify the\r\n    foreground and background colour of the indentation guides.</p>\r\n\r\n    <p>There are 4 indentation guide views.\r\n    SC_IV_NONE turns the feature off but the other 3 states determine how far the guides appear on\r\n    empty lines. </p>\r\n    <table class=\"standard\" summary=\"Search flags\">\r\n      <tbody>\r\n        <tr>\r\n          <td><code>SC_IV_NONE</code></td>\r\n          <td>No indentation guides are shown.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>SC_IV_REAL</code></td>\r\n          <td>Indentation guides are shown inside real indentation white space.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>SC_IV_LOOKFORWARD</code></td>\r\n          <td>Indentation guides are shown beyond the actual indentation up to the level of the\r\n          next non-empty line.\r\n          If the previous non-empty line was a fold header then indentation guides are shown for\r\n          one more level of indent than that line. This setting is good for Python.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>SC_IV_LOOKBOTH</code></td>\r\n          <td>Indentation guides are shown beyond the actual indentation up to the level of the\r\n          next non-empty line or previous non-empty line whichever is the greater.\r\n          This setting is good for most languages.</td>\r\n        </tr>\r\n\r\n      </tbody>\r\n    </table>\r\n\r\n    <p><b id=\"SCI_SETHIGHLIGHTGUIDE\">SCI_SETHIGHLIGHTGUIDE(position column)</b><br />\r\n     <b id=\"SCI_GETHIGHLIGHTGUIDE\">SCI_GETHIGHLIGHTGUIDE &rarr; position</b><br />\r\n     When brace highlighting occurs, the indentation guide corresponding to the braces may be\r\n    highlighted with the brace highlighting style, <a class=\"message\"\r\n    href=\"#StyleDefinition\"><code>STYLE_BRACELIGHT</code></a> (34). Set <code class=\"parameter\">column</code> to 0 to\r\n    cancel this highlight.</p>\r\n\r\n    <h2 id=\"Markers\">Markers</h2>\r\n\r\n    <p>There are 32 markers, numbered 0 to <code>MARKER_MAX</code> (31), and you can assign any combination of them to each\r\n    line in the document. Markers appear in the <a class=\"jump\" href=\"#Margins\">selection\r\n    margin</a> to the left of the text. If the selection margin is set to zero width, the\r\n    background colour of the whole line is changed instead. Marker numbers 25 to 31 are used by\r\n    Scintilla in folding margins, and have symbolic names of the form <code>SC_MARKNUM_</code>*,\r\n    for example <code>SC_MARKNUM_FOLDEROPEN</code>.</p>\r\n\r\n    <p>Marker numbers 21 to 24 are used for <a class=\"jump\" href=\"#ChangeHistory\">Change history</a> if that is enabled but are\r\n    otherwise free for application use.</p>\r\n\r\n    <p>Marker numbers 0 to 20 have no pre-defined function; you can use them to mark syntax errors\r\n    or the current point of execution, break points, or whatever you need marking. If you do not\r\n    need folding, you can use all 32 for any purpose you wish.</p>\r\n\r\n    <p>Each marker number has a symbol associated with it. You can also set the foreground and\r\n    background colour for each marker number, so you can use the same symbol more than once with\r\n    different colouring for different uses. Scintilla has a set of symbols you can assign\r\n    (<code>SC_MARK_</code>*) or you can use characters. By default, all 32 markers are set to\r\n    <code>SC_MARK_CIRCLE</code> with a black foreground and a white background.</p>\r\n\r\n    <p>The markers are drawn in the order of their numbers (except for <code>SC_MARK_BAR</code>), so higher\r\n    numbered markers appear on top of lower numbered ones.\r\n    <code>SC_MARK_BAR</code> markers are drawn first so they are underneath as they often cover\r\n    multiple lines for change history and other markers mark individual lines.\r\n    Markers try to move with their text by tracking where the start of\r\n    their line moves. When a line is deleted, its markers are combined, by an <code>OR</code>\r\n    operation, with the markers of the next line.</p>\r\n    <code><a class=\"message\" href=\"#SCI_MARKERDEFINE\">SCI_MARKERDEFINE(int markerNumber, int\r\n    markerSymbol)</a><br />\r\n     <a class=\"message\" href=\"#SCI_MARKERDEFINEPIXMAP\">SCI_MARKERDEFINEPIXMAP(int markerNumber,\r\n    const char *pixmap)</a><br />\r\n     <a class=\"message\" href=\"#SCI_RGBAIMAGESETWIDTH\">SCI_RGBAIMAGESETWIDTH(int width)</a><br />\r\n     <a class=\"message\" href=\"#SCI_RGBAIMAGESETHEIGHT\">SCI_RGBAIMAGESETHEIGHT(int height)</a><br />\r\n     <a class=\"message\" href=\"#SCI_RGBAIMAGESETSCALE\">SCI_RGBAIMAGESETSCALE(int scalePercent)</a><br />\r\n     <a class=\"message\" href=\"#SCI_MARKERDEFINERGBAIMAGE\">SCI_MARKERDEFINERGBAIMAGE(int markerNumber,\r\n    const char *pixels)</a><br />\r\n     <a class=\"message\" href=\"#SCI_MARKERSYMBOLDEFINED\">SCI_MARKERSYMBOLDEFINED(int markerNumber) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_MARKERSETFORE\">SCI_MARKERSETFORE(int markerNumber, colour fore)</a><br />\r\n     <a class=\"message\" href=\"#SCI_MARKERSETFORETRANSLUCENT\">SCI_MARKERSETFORETRANSLUCENT(int markerNumber, colouralpha fore)</a><br />\r\n     <a class=\"message\" href=\"#SCI_MARKERSETBACK\">SCI_MARKERSETBACK(int markerNumber, colour back)</a><br />\r\n     <a class=\"message\" href=\"#SCI_MARKERSETBACKTRANSLUCENT\">SCI_MARKERSETBACKTRANSLUCENT(int markerNumber, colouralpha back)</a><br />\r\n    <a class=\"message\" href=\"#SCI_MARKERSETBACKSELECTED\">SCI_MARKERSETBACKSELECTED(int markerNumber, colour\r\n    back)</a><br />\r\n    <a class=\"message\" href=\"#SCI_MARKERSETBACKSELECTEDTRANSLUCENT\">SCI_MARKERSETBACKSELECTEDTRANSLUCENT(int markerNumber, colouralpha\r\n    back)</a><br />\r\n    <a class=\"message\" href=\"#SCI_MARKERSETSTROKEWIDTH\">SCI_MARKERSETSTROKEWIDTH(int markerNumber, int hundredths)</a><br />\r\n    <a class=\"message\" href=\"#SCI_MARKERENABLEHIGHLIGHT\">SCI_MARKERENABLEHIGHLIGHT(bool enabled)</a><br />\r\n     <a class=\"message\" href=\"#SCI_MARKERSETLAYER\">SCI_MARKERSETLAYER(int markerNumber, int layer)</a><br />\r\n     <a class=\"message\" href=\"#SCI_MARKERGETLAYER\">SCI_MARKERGETLAYER(int markerNumber) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_MARKERSETALPHA\">SCI_MARKERSETALPHA(int markerNumber, alpha alpha)</a><br />\r\n     <a class=\"message\" href=\"#SCI_MARKERADD\">SCI_MARKERADD(line line, int markerNumber) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_MARKERADDSET\">SCI_MARKERADDSET(line line, int markerSet)</a><br />\r\n     <a class=\"message\" href=\"#SCI_MARKERDELETE\">SCI_MARKERDELETE(line line, int\r\n    markerNumber)</a><br />\r\n     <a class=\"message\" href=\"#SCI_MARKERDELETEALL\">SCI_MARKERDELETEALL(int markerNumber)</a><br />\r\n     <a class=\"message\" href=\"#SCI_MARKERGET\">SCI_MARKERGET(line line) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_MARKERNEXT\">SCI_MARKERNEXT(line lineStart, int markerMask) &rarr; line</a><br />\r\n     <a class=\"message\" href=\"#SCI_MARKERPREVIOUS\">SCI_MARKERPREVIOUS(line lineStart, int markerMask) &rarr; line</a><br />\r\n     <a class=\"message\" href=\"#SCI_MARKERLINEFROMHANDLE\">SCI_MARKERLINEFROMHANDLE(int markerHandle) &rarr; line</a><br />\r\n     <a class=\"message\" href=\"#SCI_MARKERDELETEHANDLE\">SCI_MARKERDELETEHANDLE(int markerHandle)</a><br />\r\n     <a class=\"message\" href=\"#SCI_MARKERHANDLEFROMLINE\">SCI_MARKERHANDLEFROMLINE(line line, int which) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_MARKERNUMBERFROMLINE\">SCI_MARKERNUMBERFROMLINE(line line, int which) &rarr; int</a><br />\r\n    </code>\r\n\r\n    <p><b id=\"SCI_MARKERDEFINE\">SCI_MARKERDEFINE(int markerNumber, int markerSymbol)</b><br />\r\n     This message associates a marker number in the range 0 to 31 with one of the marker symbols or\r\n    an ASCII character. The general-purpose marker symbols currently available are:<br />\r\n    <code>SC_MARK_CIRCLE</code>,\r\n    <code>SC_MARK_ROUNDRECT</code>,\r\n    <code>SC_MARK_ARROW</code>,\r\n    <code>SC_MARK_SMALLRECT</code>,\r\n    <code>SC_MARK_SHORTARROW</code>,\r\n    <code>SC_MARK_EMPTY</code>,\r\n    <code>SC_MARK_ARROWDOWN</code>,\r\n    <code>SC_MARK_MINUS</code>,\r\n    <code>SC_MARK_PLUS</code>,\r\n    <code>SC_MARK_ARROWS</code>,\r\n    <code>SC_MARK_DOTDOTDOT</code>,\r\n    <code>SC_MARK_BACKGROUND</code>,\r\n    <code>SC_MARK_LEFTRECT</code>,\r\n    <code>SC_MARK_FULLRECT</code>,\r\n    <code>SC_MARK_BOOKMARK</code>,\r\n    <code>SC_MARK_VERTICALBOOKMARK</code>,\r\n    <code>SC_MARK_UNDERLINE</code>, and\r\n    <code>SC_MARK_BAR</code>.\r\n    </p>\r\n\r\n    <p>The <code>SC_MARK_BACKGROUND</code> marker changes the background colour of the line only.\r\n          The <code>SC_MARK_FULLRECT</code> symbol mirrors this, changing only the margin background colour.\r\n          <code>SC_MARK_UNDERLINE</code> draws an underline across the text.\r\n    The <code>SC_MARK_EMPTY</code> symbol is invisible, allowing client code to track the movement\r\n    of lines. You would also use it if you changed the folding style and wanted one or more of the\r\n    <code>SC_FOLDERNUM_</code>* markers to have no associated symbol.</p>\r\n\r\n    <p>Applications may use the marker symbol <code>SC_MARK_AVAILABLE</code> to indicate that\r\n    plugins may allocate that marker number.\r\n    </p>\r\n\r\n    <p>There are also marker symbols designed for use in the folding margin in a flattened tree\r\n    style.<br />\r\n    <code>SC_MARK_BOXMINUS</code>,\r\n    <code>SC_MARK_BOXMINUSCONNECTED</code>,\r\n    <code>SC_MARK_BOXPLUS</code>,\r\n    <code>SC_MARK_BOXPLUSCONNECTED</code>,\r\n    <code>SC_MARK_CIRCLEMINUS</code>,\r\n    <code>SC_MARK_CIRCLEMINUSCONNECTED</code>,\r\n    <code>SC_MARK_CIRCLEPLUS</code>,\r\n    <code>SC_MARK_CIRCLEPLUSCONNECTED</code>,\r\n    <code>SC_MARK_LCORNER</code>,\r\n    <code>SC_MARK_LCORNERCURVE</code>,\r\n    <code>SC_MARK_TCORNER</code>,\r\n    <code>SC_MARK_TCORNERCURVE</code>, and\r\n    <code>SC_MARK_VLINE</code>.</p>\r\n    Characters can be used as markers by adding the Unicode code point of the character to\r\n    <code>SC_MARK_CHARACTER</code> (10000). For example, to use '&#9637;' SQUARE WITH VERTICAL FILL\r\n    (Unicode code point 9637) as marker number 1 use:<br />\r\n    <code>SCI_MARKERDEFINE(1, SC_MARK_CHARACTER+9637)</code>. <br />\r\n\r\n    <p>The marker numbers <code>SC_MARKNUM_FOLDER</code> and <code>SC_MARKNUM_FOLDEROPEN</code> are\r\n    used for showing that a fold is present and open or closed. Any symbols may be assigned for\r\n    this purpose although the (<code>SC_MARK_PLUS</code>, <code>SC_MARK_MINUS</code>) pair or the\r\n    (<code>SC_MARK_ARROW</code>, <code>SC_MARK_ARROWDOWN</code>) pair are good choices. As well as\r\n    these two, more assignments are needed for the flattened tree style:\r\n    <code>SC_MARKNUM_FOLDEREND</code>, <code>SC_MARKNUM_FOLDERMIDTAIL</code>,\r\n    <code>SC_MARKNUM_FOLDEROPENMID</code>, <code>SC_MARKNUM_FOLDERSUB</code>, and\r\n    <code>SC_MARKNUM_FOLDERTAIL</code>. The bits used for folding are specified by\r\n    <code>SC_MASK_FOLDERS</code>, which is commonly used as an argument to\r\n    <code>SCI_SETMARGINMASKN</code> when defining a margin to be used for folding.</p>\r\n\r\n    <p>This table shows which <code>SC_MARK_</code>* symbols should be assigned to which\r\n    <code>SC_MARKNUM_</code>* marker numbers to obtain four folding styles: Arrow (mimics\r\n    Macintosh), plus/minus shows folded lines as '+' and opened folds as '-', Circle tree, Box\r\n    tree.</p>\r\n\r\n    <table class=\"standard\" summary=\"Markers used for folding\">\r\n      <thead align=\"left\">\r\n        <tr>\r\n          <th><code>SC_MARKNUM_</code>*</th>\r\n\r\n          <th>Arrow</th>\r\n\r\n          <th>Plus/minus</th>\r\n\r\n          <th>Circle tree</th>\r\n\r\n          <th>Box tree</th>\r\n        </tr>\r\n      </thead>\r\n\r\n      <tbody valign=\"top\">\r\n        <tr>\r\n          <th align=\"left\"><code>FOLDEROPEN</code></th>\r\n\r\n          <td><code>ARROWDOWN</code></td>\r\n\r\n          <td><code>MINUS</code></td>\r\n\r\n          <td><code>CIRCLEMINUS</code></td>\r\n\r\n          <td><code>BOXMINUS</code></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>FOLDER</code></th>\r\n\r\n          <td><code>ARROW</code></td>\r\n\r\n          <td><code>PLUS</code></td>\r\n\r\n          <td><code>CIRCLEPLUS</code></td>\r\n\r\n          <td><code>BOXPLUS</code></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>FOLDERSUB</code></th>\r\n\r\n          <td><code>EMPTY</code></td>\r\n\r\n          <td><code>EMPTY</code></td>\r\n\r\n          <td><code>VLINE</code></td>\r\n\r\n          <td><code>VLINE</code></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>FOLDERTAIL</code></th>\r\n\r\n          <td><code>EMPTY</code></td>\r\n\r\n          <td><code>EMPTY</code></td>\r\n\r\n          <td><code>LCORNERCURVE</code></td>\r\n\r\n          <td><code>LCORNER</code></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>FOLDEREND</code></th>\r\n\r\n          <td><code>EMPTY</code></td>\r\n\r\n          <td><code>EMPTY</code></td>\r\n\r\n          <td><code>CIRCLEPLUSCONNECTED</code></td>\r\n\r\n          <td><code>BOXPLUSCONNECTED</code></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>FOLDEROPENMID</code></th>\r\n\r\n          <td><code>EMPTY</code></td>\r\n\r\n          <td><code>EMPTY</code></td>\r\n\r\n          <td><code>CIRCLEMINUSCONNECTED</code></td>\r\n\r\n          <td><code>BOXMINUSCONNECTED</code></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>FOLDERMIDTAIL</code></th>\r\n\r\n          <td><code>EMPTY</code></td>\r\n\r\n          <td><code>EMPTY</code></td>\r\n\r\n          <td><code>TCORNERCURVE</code></td>\r\n\r\n          <td><code>TCORNER</code></td>\r\n        </tr>\r\n      </tbody>\r\n    </table>\r\n    <p><img src=\"Markers.png\" alt=\"Marker samples\" /></p>\r\n\r\n    <p><b id=\"SCI_MARKERDEFINEPIXMAP\">SCI_MARKERDEFINEPIXMAP(int markerNumber, const char\r\n    *pixmap)</b><br />\r\n     Markers can be set to pixmaps with this message. The\r\n     <a class=\"jump\" href=\"#XPM\">XPM format</a> is used for the pixmap.\r\n    Pixmaps use the <code>SC_MARK_PIXMAP</code> marker symbol. </p>\r\n\r\n    <p>\r\n    <b id=\"SCI_RGBAIMAGESETWIDTH\">SCI_RGBAIMAGESETWIDTH(int width)</b><br />\r\n    <b id=\"SCI_RGBAIMAGESETHEIGHT\">SCI_RGBAIMAGESETHEIGHT(int height)</b><br />\r\n    <b id=\"SCI_RGBAIMAGESETSCALE\">SCI_RGBAIMAGESETSCALE(int scalePercent)</b><br />\r\n    <b id=\"SCI_MARKERDEFINERGBAIMAGE\">SCI_MARKERDEFINERGBAIMAGE(int markerNumber, const char *pixels)</b><br />\r\n     Markers can be set to translucent pixmaps with this message. The\r\n     <a class=\"jump\" href=\"#RGBA\">RGBA format</a> is used for the pixmap.\r\n     The width and height must previously been set with the <code>SCI_RGBAIMAGESETWIDTH</code> and\r\n     <code>SCI_RGBAIMAGESETHEIGHT</code> messages.</p>\r\n     <p>A scale factor in percent may be set with <code>SCI_RGBAIMAGESETSCALE</code>. This is useful on macOS with\r\n     a retina display where each display unit is 2 pixels: use a factor of 200 so that each image pixel is displayed using a screen pixel.\r\n     The default scale, 100, will stretch each image pixel to cover 4 screen pixels on a retina display.</p>\r\n    <p>Pixmaps use the <code>SC_MARK_RGBAIMAGE</code> marker symbol. </p>\r\n\r\n    <p><b id=\"SCI_MARKERSYMBOLDEFINED\">SCI_MARKERSYMBOLDEFINED(int markerNumber) &rarr; int</b><br />\r\n     Returns the symbol defined for a markerNumber with <code>SCI_MARKERDEFINE</code>\r\n     or <code>SC_MARK_PIXMAP</code> if defined with <code>SCI_MARKERDEFINEPIXMAP</code>\r\n     or <code>SC_MARK_RGBAIMAGE</code> if defined with <code>SCI_MARKERDEFINERGBAIMAGE</code>.</p>\r\n\r\n    <p>\r\n     <b id=\"SCI_MARKERSETFORE\">SCI_MARKERSETFORE(int markerNumber, <a class=\"jump\" href=\"#colour\">colour</a> fore)</b><br />\r\n     <b id=\"SCI_MARKERSETFORETRANSLUCENT\">SCI_MARKERSETFORETRANSLUCENT(int markerNumber, <a class=\"jump\" href=\"#colouralpha\">colouralpha</a> fore)</b><br />\r\n     <b id=\"SCI_MARKERSETBACK\">SCI_MARKERSETBACK(int markerNumber, <a class=\"jump\" href=\"#colour\">colour</a> back)</b><br />\r\n     <b id=\"SCI_MARKERSETBACKTRANSLUCENT\">SCI_MARKERSETBACKTRANSLUCENT(int markerNumber, <a class=\"jump\" href=\"#colouralpha\">colouralpha</a> back)</b><br />\r\n     These messages set the foreground and background colour of a marker number.\r\n     The <code>TRANSLUCENT</code> variants can define different degrees of opacity.<br />\r\n     <b id=\"SCI_MARKERSETBACKSELECTED\">SCI_MARKERSETBACKSELECTED(int markerNumber, <a class=\"jump\" href=\"#colour\">colour</a> back)</b><br />\r\n     <b id=\"SCI_MARKERSETBACKSELECTEDTRANSLUCENT\">SCI_MARKERSETBACKSELECTEDTRANSLUCENT(int markerNumber, <a class=\"jump\" href=\"#colouralpha\">colouralpha</a> back)</b><br />\r\n     This message sets the highlight background colour of a marker number when its folding block is selected. The default colour is #FF0000.</p>\r\n\r\n     <p><b id=\"SCI_MARKERSETSTROKEWIDTH\">SCI_MARKERSETSTROKEWIDTH(int markerNumber, int hundredths)</b><br />\r\n     This message sets the stroke width used to draw the marker in hundredths of a pixel.\r\n     The default value is 100 indicating a single pixel wide line.</p>\r\n\r\n     <p><b id=\"SCI_MARKERENABLEHIGHLIGHT\">SCI_MARKERENABLEHIGHLIGHT(bool enabled)</b><br />\r\n     This message allows to enable/disable the highlight folding block when it is selected. (i.e. block that contains the caret)</p>\r\n\r\n     <p>\r\n     <b id=\"SCI_MARKERSETLAYER\">SCI_MARKERSETLAYER(int markerNumber, int layer)</b><br />\r\n     <b id=\"SCI_MARKERGETLAYER\">SCI_MARKERGETLAYER(int markerNumber) &rarr; int</b><br />\r\n     <b id=\"SCI_MARKERSETALPHA\">SCI_MARKERSETALPHA(int markerNumber,\r\n     <a class=\"jump\" href=\"#alpha\">alpha</a> alpha)</b><br />\r\n     When markers are drawn in the content area, either because there is no margin for them or\r\n     they are of <code>SC_MARK_BACKGROUND</code> or <code>SC_MARK_UNDERLINE</code> types, they may be drawn translucently over text\r\n     or opaquely on the base layer.\r\n     The layer to draw on is defined by <code>SCI_MARKERSETLAYER</code>.\r\n     The degree of translucency can be chosen by setting an alpha value.\r\n     This is only for the content area - in margins, translucency is achieved through the <code>SCI_MARKERSET&hellip;TRANSLUCENT</code>\r\n     methods.\r\n     The <code class=\"parameter\">layer</code> argument can be one of:</p>\r\n\r\n    <table class=\"standard\" summary=\"Layer\">\r\n      <tbody valign=\"top\">\r\n        <tr>\r\n          <th align=\"left\"><code>SC_LAYER_BASE</code></th>\r\n\r\n          <td>0</td>\r\n\r\n          <td>Draw the selection background opaquely on the base layer</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>SC_LAYER_UNDER_TEXT</code></th>\r\n\r\n          <td>1</td>\r\n\r\n          <td>Draw the selection background translucently under the text.<br />\r\n\t  This will not work in single phase drawing mode (<code class=\"deprecated\">SC_PHASES_ONE</code>)\r\n\t  as there is no under-text phase.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <th align=\"left\"><code>SC_LAYER_OVER_TEXT</code></th>\r\n\r\n          <td>2</td>\r\n\r\n          <td>Draw the selection background translucently over the text.</td>\r\n        </tr>\r\n\r\n      </tbody>\r\n    </table>\r\n\r\n    <p><b id=\"SCI_MARKERADD\">SCI_MARKERADD(line line, int markerNumber) &rarr; int</b><br />\r\n     This message adds marker number <code class=\"parameter\">markerNumber</code> to a line. The message returns -1 if\r\n    this fails (illegal line number, out of memory) or it returns a marker handle number that\r\n    identifies the added marker. You can use this returned handle with\r\n    <a class=\"seealso\" href=\"#SCI_MARKERLINEFROMHANDLE\"><code>SCI_MARKERLINEFROMHANDLE</code></a> to find where a\r\n    marker is after moving or combining lines and with\r\n    <a class=\"message\" href=\"#SCI_MARKERDELETEHANDLE\"><code>SCI_MARKERDELETEHANDLE</code></a> to delete the marker\r\n    based on its handle. The message does not check the value of markerNumber, nor does it\r\n    check if the line already contains the marker.</p>\r\n\r\n    <p><b id=\"SCI_MARKERADDSET\">SCI_MARKERADDSET(line line, int markerSet)</b><br />\r\n     This message can add one or more markers to a line with a single call, specified in the same \"one-bit-per-marker\" 32-bit integer format returned by\r\n    <a class=\"message\" href=\"#SCI_MARKERGET\"><code>SCI_MARKERGET</code></a>\r\n    (and used by the mask-based marker search functions\r\n    <a class=\"message\" href=\"#SCI_MARKERNEXT\"><code>SCI_MARKERNEXT</code></a> and\r\n    <a class=\"message\" href=\"#SCI_MARKERPREVIOUS\"><code>SCI_MARKERPREVIOUS</code></a>).\r\n    As with\r\n    <a class=\"message\" href=\"#SCI_MARKERADD\"><code>SCI_MARKERADD</code></a>, no check is made\r\n    to see if any of the markers are already present on the targeted line.</p>\r\n\r\n    <p><b id=\"SCI_MARKERDELETE\">SCI_MARKERDELETE(line line, int markerNumber)</b><br />\r\n     This searches the given line number for the given marker number and deletes it if it is\r\n    present. If you added the same marker more than once to the line, this will delete one copy\r\n    each time it is used. If you pass in a marker number of -1, all markers are deleted from the\r\n    line.</p>\r\n\r\n    <p><b id=\"SCI_MARKERDELETEALL\">SCI_MARKERDELETEALL(int markerNumber)</b><br />\r\n     This removes markers of the given number from all lines. If markerNumber is -1, it deletes all\r\n    markers from all lines.</p>\r\n\r\n    <p><b id=\"SCI_MARKERGET\">SCI_MARKERGET(line line) &rarr; int</b><br />\r\n     This returns a 32-bit integer that indicates which markers were present on the line. Bit 0 is\r\n    set if marker 0 is present, bit 1 for marker 1 and so on.</p>\r\n\r\n    <p><b id=\"SCI_MARKERNEXT\">SCI_MARKERNEXT(line lineStart, int markerMask) &rarr; line</b><br />\r\n     <b id=\"SCI_MARKERPREVIOUS\">SCI_MARKERPREVIOUS(line lineStart, int markerMask) &rarr; line</b><br />\r\n     These messages search efficiently for lines that include a given set of markers. The search\r\n    starts at line number <code class=\"parameter\">lineStart</code> and continues forwards to the end of the file\r\n    (<code>SCI_MARKERNEXT</code>) or backwards to the start of the file\r\n    (<code>SCI_MARKERPREVIOUS</code>). The <code class=\"parameter\">markerMask</code> argument should have one bit set\r\n    for each marker you wish to find. Set bit 0 to find marker 0, bit 1 for marker 1 and so on. The\r\n    message returns the line number of the first line that contains one of the markers in\r\n    <code class=\"parameter\">markerMask</code> or -1 if no marker is found.</p>\r\n\r\n    <p><b id=\"SCI_MARKERLINEFROMHANDLE\">SCI_MARKERLINEFROMHANDLE(int markerHandle) &rarr; line</b><br />\r\n     The <code class=\"parameter\">markerHandle</code> argument is an identifier for a marker returned by <a\r\n    class=\"message\" href=\"#SCI_MARKERADD\"><code>SCI_MARKERADD</code></a>. This function searches\r\n    the document for the marker with this handle and returns the line number that contains it or -1\r\n    if it is not found.</p>\r\n\r\n    <p><b id=\"SCI_MARKERDELETEHANDLE\">SCI_MARKERDELETEHANDLE(int markerHandle)</b><br />\r\n     The <code class=\"parameter\">markerHandle</code> argument is an identifier for a marker returned by <a\r\n    class=\"message\" href=\"#SCI_MARKERADD\"><code>SCI_MARKERADD</code></a>. This function searches\r\n    the document for the marker with this handle and deletes the marker if it is found.</p>\r\n\r\n    <p><b id=\"SCI_MARKERHANDLEFROMLINE\">SCI_MARKERHANDLEFROMLINE(line line, int which) &rarr; int</b><br />\r\n    <b id=\"SCI_MARKERNUMBERFROMLINE\">SCI_MARKERNUMBERFROMLINE(line line, int which) &rarr; int</b><br />\r\n\t These messages returns the Nth marker handle or marker number in a given <code class=\"parameter\">line</code>.\r\n\t Handles are returned by <a class=\"message\" href=\"#SCI_MARKERADD\"><code>SCI_MARKERADD</code></a>.\r\n\t If <code class=\"parameter\">which</code> is greater or equal to the number of markers on a line, this returns -1;</p>\r\n\r\n    <h2 id=\"Indicators\">Indicators</h2>\r\n\r\n    <p>Indicators are used to display additional information over the top of styling.\r\n    They can be used to show, for example, syntax errors, deprecated names and bad indentation\r\n    by drawing underlines under text or boxes around text.</p>\r\n\r\n    <p>Indicators may have a different \"hover\" colour and style when the mouse is over them or the caret is moved into them.\r\n    This may be used, for example, to indicate that a URL can be clicked.</p>\r\n\r\n    <p>Indicators may be displayed as simple underlines, squiggly underlines, a\r\n    line of small 'T' shapes, a line of diagonal hatching, a strike-out or a rectangle around the text.\r\n    They may also be invisible when used to track pieces of content for the application as <code>INDIC_HIDDEN</code>.</p>\r\n\r\n    <p>The <code>SCI_INDIC*</code> messages allow you to get and set the visual appearance of the\r\n    indicators. They all use an <code class=\"parameter\">indicator</code> argument in the range 0 to <code>INDICATOR_MAX</code>(43)\r\n    to set the indicator to style. To prevent interference the set of indicators is divided up into a range for use\r\n    by lexers (0..7) a range for use by containers\r\n    (8=<code>INDICATOR_CONTAINER</code> .. 31=<code>INDICATOR_IME-1</code>)\r\n    a range for IME indicators (32=<code>INDICATOR_IME</code> .. 35=<code>INDICATOR_IME_MAX</code>)\r\n    and a range for  <a class=\"jump\" href=\"#ChangeHistory\">Change history</a>\r\n    (36=<code>INDICATOR_HISTORY_REVERTED_TO_ORIGIN_INSERTION</code> ..\r\n    43=<code>INDICATOR_HISTORY_REVERTED_TO_MODIFIED_DELETION</code>).</p>\r\n\r\n    <p>The <code>INDICATOR_*</code> values used for dividing up indicators\r\n    were previously <code>INDIC_CONTAINER</code>, <code>INDIC_IME</code>,\r\n    <code>INDIC_IME_MAX</code>, and <code>INDIC_MAX</code>\r\n    but these were confused with indicator styles so the new names should be used.</p>\r\n\r\n    <p>Indicators are stored in a format similar to run length encoding which is efficient in both\r\n    speed and storage for sparse information.</p>\r\n    <p>An indicator may store different values for each range but normally all values are drawn the same.\r\n    The <a class=\"seealso\" href=\"#SCI_INDICSETFLAGS\">SCI_INDICSETFLAGS</a>\r\n    API may be used to display different colours for different values.</p>\r\n\r\n    <p>Originally, Scintilla used a different technique for indicators but this\r\n    has been <a href=\"#RemovedFeatures\">removed</a>\r\n    and the APIs perform <a href=\"#StyleByteIndicators\">no action</a>.\r\n    While both techniques were supported, the term \"modern indicators\" was used for the\r\n    newer implementation.</p>\r\n\r\n    <code><a class=\"message\" href=\"#SCI_INDICSETSTYLE\">SCI_INDICSETSTYLE(int indicator, int\r\n    indicatorStyle)</a><br />\r\n     <a class=\"message\" href=\"#SCI_INDICGETSTYLE\">SCI_INDICGETSTYLE(int indicator) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_INDICSETFORE\">SCI_INDICSETFORE(int indicator, colour\r\n    fore)</a><br />\r\n     <a class=\"message\" href=\"#SCI_INDICGETFORE\">SCI_INDICGETFORE(int indicator) &rarr; colour</a><br />\r\n     <a class=\"message\" href=\"#SCI_INDICSETSTROKEWIDTH\">SCI_INDICSETSTROKEWIDTH(int indicator, int hundredths)</a><br />\r\n     <a class=\"message\" href=\"#SCI_INDICGETSTROKEWIDTH\">SCI_INDICGETSTROKEWIDTH(int indicator) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_INDICSETALPHA\">SCI_INDICSETALPHA(int indicator, alpha alpha)</a><br />\r\n     <a class=\"message\" href=\"#SCI_INDICGETALPHA\">SCI_INDICGETALPHA(int indicator) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_INDICSETOUTLINEALPHA\">SCI_INDICSETOUTLINEALPHA(int indicator, alpha alpha)</a><br />\r\n     <a class=\"message\" href=\"#SCI_INDICGETOUTLINEALPHA\">SCI_INDICGETOUTLINEALPHA(int indicator) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_INDICSETUNDER\">SCI_INDICSETUNDER(int indicator, bool under)</a><br />\r\n     <a class=\"message\" href=\"#SCI_INDICGETUNDER\">SCI_INDICGETUNDER(int indicator) &rarr; bool</a><br />\r\n    <a class=\"message\" href=\"#SCI_INDICSETHOVERSTYLE\">SCI_INDICSETHOVERSTYLE(int indicator, int\r\n    indicatorStyle)</a><br />\r\n     <a class=\"message\" href=\"#SCI_INDICGETHOVERSTYLE\">SCI_INDICGETHOVERSTYLE(int indicator) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_INDICSETHOVERFORE\">SCI_INDICSETHOVERFORE(int indicator, colour\r\n    fore)</a><br />\r\n     <a class=\"message\" href=\"#SCI_INDICGETHOVERFORE\">SCI_INDICGETHOVERFORE(int indicator) &rarr; colour</a><br />\r\n     <a class=\"message\" href=\"#SCI_INDICSETFLAGS\">SCI_INDICSETFLAGS(int indicator, int flags)</a><br />\r\n     <a class=\"message\" href=\"#SCI_INDICGETFLAGS\">SCI_INDICGETFLAGS(int indicator) &rarr; int</a><br />\r\n     <br />\r\n\r\n     <a class=\"message\" href=\"#SCI_SETINDICATORCURRENT\">SCI_SETINDICATORCURRENT(int indicator)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETINDICATORCURRENT\">SCI_GETINDICATORCURRENT &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETINDICATORVALUE\">SCI_SETINDICATORVALUE(int value)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETINDICATORVALUE\">SCI_GETINDICATORVALUE &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_INDICATORFILLRANGE\">SCI_INDICATORFILLRANGE(position start, position lengthFill)</a><br />\r\n     <a class=\"message\" href=\"#SCI_INDICATORCLEARRANGE\">SCI_INDICATORCLEARRANGE(position start, position lengthClear)</a><br />\r\n     <a class=\"message\" href=\"#SCI_INDICATORALLONFOR\">SCI_INDICATORALLONFOR(position pos) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_INDICATORVALUEAT\">SCI_INDICATORVALUEAT(int indicator, position pos) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_INDICATORSTART\">SCI_INDICATORSTART(int indicator, position pos) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_INDICATOREND\">SCI_INDICATOREND(int indicator, position pos) &rarr; position</a><br />\r\n\r\n     <a class=\"message\" href=\"#SCI_FINDINDICATORSHOW\">SCI_FINDINDICATORSHOW(position start, position end)</a><br />\r\n     <a class=\"message\" href=\"#SCI_FINDINDICATORFLASH\">SCI_FINDINDICATORFLASH(position start, position end)</a><br />\r\n     <a class=\"message\" href=\"#SCI_FINDINDICATORHIDE\">SCI_FINDINDICATORHIDE</a><br />\r\n    </code>\r\n\r\n    <p><b id=\"SCI_INDICSETSTYLE\">SCI_INDICSETSTYLE(int indicator, int\r\n    indicatorStyle)</b><br />\r\n     <b id=\"SCI_INDICGETSTYLE\">SCI_INDICGETSTYLE(int indicator) &rarr; int</b><br />\r\n     These two messages set and get the style for a particular indicator. The indicator styles\r\n    currently available are:<br />\r\n\r\n    <img src=\"Indicators.png\" alt=\"Indicator samples\" /></p>\r\n\r\n    <table class=\"standard\" summary=\"Indicators\">\r\n      <tbody>\r\n        <tr>\r\n          <th align=\"left\">Symbol</th>\r\n\r\n          <th>Value</th>\r\n\r\n          <th align=\"left\">Visual effect</th>\r\n        </tr>\r\n      </tbody>\r\n\r\n      <tbody valign=\"top\">\r\n        <tr>\r\n          <td align=\"left\"><code>INDIC_PLAIN</code></td>\r\n\r\n          <td align=\"center\">0</td>\r\n\r\n          <td>Underlined with a single, straight line.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>INDIC_SQUIGGLE</code></td>\r\n\r\n          <td align=\"center\">1</td>\r\n\r\n          <td>A squiggly underline. Requires 3 pixels of descender space.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>INDIC_TT</code></td>\r\n\r\n          <td align=\"center\">2</td>\r\n\r\n          <td>A line of small T shapes.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>INDIC_DIAGONAL</code></td>\r\n\r\n          <td align=\"center\">3</td>\r\n\r\n          <td>Diagonal hatching.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>INDIC_STRIKE</code></td>\r\n\r\n          <td align=\"center\">4</td>\r\n\r\n          <td>Strike out.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>INDIC_HIDDEN</code></td>\r\n\r\n          <td align=\"center\">5</td>\r\n\r\n          <td>An indicator with no visual effect.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>INDIC_BOX</code></td>\r\n\r\n          <td align=\"center\">6</td>\r\n\r\n          <td>A rectangle around the text.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>INDIC_ROUNDBOX</code></td>\r\n\r\n          <td align=\"center\">7</td>\r\n\r\n          <td>A rectangle with rounded corners around the text using translucent drawing with the\r\n              interior usually more transparent than the border. You can use\r\n              <a class=\"seealso\" href=\"#SCI_INDICSETALPHA\">SCI_INDICSETALPHA</a> and\r\n              <a class=\"seealso\" href=\"#SCI_INDICSETOUTLINEALPHA\">SCI_INDICSETOUTLINEALPHA</a>\r\n              to control the alpha transparency values. The default alpha values are 30 for fill colour and 50 for outline colour.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>INDIC_STRAIGHTBOX</code></td>\r\n\r\n          <td align=\"center\">8</td>\r\n\r\n          <td>A rectangle around the text using translucent drawing with the\r\n              interior usually more transparent than the border. You can use\r\n              <a class=\"seealso\" href=\"#SCI_INDICSETALPHA\">SCI_INDICSETALPHA</a> and\r\n              <a class=\"seealso\" href=\"#SCI_INDICSETOUTLINEALPHA\">SCI_INDICSETOUTLINEALPHA</a>\r\n              to control the alpha transparency values. The default alpha values are 30 for fill colour and 50 for outline colour.\r\n              This indicator does not colour the top pixel of the line so that indicators on contiguous lines are visually distinct\r\n              and disconnected.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>INDIC_FULLBOX</code></td>\r\n\r\n          <td align=\"center\">16</td>\r\n\r\n          <td>A rectangle around the text using translucent drawing similar to <code>INDIC_STRAIGHTBOX</code>\r\n              but covering the entire character area.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>INDIC_DASH</code></td>\r\n\r\n          <td align=\"center\">9</td>\r\n\r\n          <td>A dashed underline.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>INDIC_DOTS</code></td>\r\n\r\n          <td align=\"center\">10</td>\r\n\r\n          <td>A dotted underline.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>INDIC_SQUIGGLELOW</code></td>\r\n\r\n          <td align=\"center\">11</td>\r\n\r\n          <td>Similar to <code>INDIC_SQUIGGLE</code> but only using 2 vertical pixels\r\n\t  so will fit under small fonts.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>INDIC_DOTBOX</code></td>\r\n\r\n          <td align=\"center\">12</td>\r\n\r\n          <td>A dotted rectangle around the text using translucent drawing.\r\n          Translucency alternates between the alpha and outline alpha settings with the top-left pixel using the alpha setting.\r\n              <a class=\"seealso\" href=\"#SCI_INDICSETALPHA\">SCI_INDICSETALPHA</a> and\r\n              <a class=\"seealso\" href=\"#SCI_INDICSETOUTLINEALPHA\">SCI_INDICSETOUTLINEALPHA</a>\r\n              control the alpha transparency values. The default values are 30 for alpha and 50 for outline alpha.\r\n              To avoid excessive memory allocation the maximum width of a dotted box is 4000 pixels.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>INDIC_GRADIENT</code></td>\r\n\r\n          <td align=\"center\">20</td>\r\n\r\n          <td>A vertical gradient between a colour and alpha at top to fully transparent at bottom.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>INDIC_GRADIENTCENTRE</code></td>\r\n\r\n          <td align=\"center\">21</td>\r\n\r\n          <td>A vertical gradient with the specified colour and alpha in the middle\r\n          fading to fully transparent at top and bottom.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>INDIC_SQUIGGLEPIXMAP</code></td>\r\n\r\n          <td align=\"center\">13</td>\r\n\r\n          <td>A version of <code>INDIC_SQUIGGLE</code> that draws using a pixmap instead of\r\n\t  as a series of line segments for performance.\r\n\t  Measured to be between 3 and 6 times faster than <code>INDIC_SQUIGGLE</code> on GTK.\r\n\t  Appearance will not be as good as <code>INDIC_SQUIGGLE</code> on macOS in HiDPI mode.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>INDIC_COMPOSITIONTHICK</code></td>\r\n\r\n          <td align=\"center\">14</td>\r\n\r\n          <td>A 2-pixel thick underline located at the bottom of the line to try to avoid touching the character base.\r\n\t  Each side is inset 1 pixel so that different indicators in this style covering a range appear isolated.\r\n\t  This is similar to an appearance used for the target in Asian language input composition.\r\n\t  The translucency of this indicator can be changed with\r\n\t  <a class=\"seealso\" href=\"#SCI_INDICSETOUTLINEALPHA\">SCI_INDICSETOUTLINEALPHA</a>.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>INDIC_COMPOSITIONTHIN</code></td>\r\n\r\n          <td align=\"center\">15</td>\r\n\r\n          <td>A 1-pixel thick underline located just before the bottom of the line.\r\n\t  Each side is inset 1 pixel so that different indicators in this style covering a range appear isolated.\r\n\t  This is similar to an appearance used for non-target ranges in Asian language input composition.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>INDIC_TEXTFORE</code></td>\r\n\r\n          <td align=\"center\">17</td>\r\n\r\n          <td>Change the colour of the text to the indicator's fore colour.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>INDIC_POINT</code></td>\r\n\r\n          <td align=\"center\">18</td>\r\n\r\n          <td>Draw a triangle below the start of the indicator range.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>INDIC_POINTCHARACTER</code></td>\r\n\r\n          <td align=\"center\">19</td>\r\n\r\n          <td>Draw a triangle below the centre of the first character of the indicator range.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>INDIC_POINT_TOP</code></td>\r\n\r\n          <td align=\"center\">22</td>\r\n\r\n          <td>Draw a triangle above the start of the indicator range..</td>\r\n        </tr>\r\n\r\n      </tbody>\r\n    </table>\r\n\r\n    <p>The default indicator styles are equivalent to:<br />\r\n     <code>SCI_INDICSETSTYLE(0, INDIC_SQUIGGLE);</code><br />\r\n     <code>SCI_INDICSETSTYLE(1, INDIC_TT);</code><br />\r\n     <code>SCI_INDICSETSTYLE(2, INDIC_PLAIN);</code></p>\r\n\r\n    <p><b id=\"SCI_INDICSETFORE\">SCI_INDICSETFORE(int indicator, <a class=\"jump\" href=\"#colour\">colour</a> fore)</b><br />\r\n     <b id=\"SCI_INDICGETFORE\">SCI_INDICGETFORE(int indicator) &rarr; colour</b><br />\r\n     These two messages set and get the colour used to draw an indicator. The default indicator\r\n    colours are equivalent to:<br />\r\n     <code>SCI_INDICSETFORE(0, 0x007f00);</code> (dark green)<br />\r\n     <code>SCI_INDICSETFORE(1, 0xff0000);</code> (light blue)<br />\r\n     <code>SCI_INDICSETFORE(2, 0x0000ff);</code> (light red)</p>\r\n\r\n     <a class=\"message\" href=\"#SCI_INDICSETSTROKEWIDTH\">SCI_INDICSETSTROKEWIDTH(int indicator, int hundredths)</a><br />\r\n     <a class=\"message\" href=\"#SCI_INDICGETSTROKEWIDTH\">SCI_INDICGETSTROKEWIDTH(int indicator) &rarr; int</a><br />\r\n    <p><b id=\"SCI_INDICSETSTROKEWIDTH\">SCI_INDICSETSTROKEWIDTH(int indicator, int hundredths)</b><br />\r\n     <b id=\"SCI_INDICGETSTROKEWIDTH\">SCI_INDICGETSTROKEWIDTH(int indicator) &rarr; int</b><br />\r\n     These two messages set and get the stroke width used to draw an indicator in hundredths of a pixel.\r\n     The default value is 100 indicating a width of one pixel.\r\n     Some indicator styles do not support setting stroke width, generally where it makes no sense (<code>INDIC_POINT</code>) or\r\n     wasn't simple (<code>INDIC_SQUIGGLEPIXMAP</code>).\r\n     The indicators supporting stroke width are:\r\n     <code>INDIC_PLAIN</code>, <code>INDIC_SQUIGGLE</code>, <code>INDIC_TT</code>, <code>INDIC_DIAGONAL</code>,\r\n     <code>INDIC_STRIKE</code>, <code>INDIC_BOX</code>, <code>INDIC_ROUNDBOX</code>, <code>INDIC_STRAIGHTBOX</code>,\r\n     <code>INDIC_FULLBOX</code>, <code>INDIC_DASH</code>, <code>INDIC_DOTS</code>, <code>INDIC_SQUIGGLELOW</code>.\r\n     </p>\r\n     <p>Fractional pixel widths are possible such as 50 for half a pixel wide.\r\n     On many systems a half pixel value will appear as a fainter line but it allows drawing very thin lines on systems with multiple physical pixels\r\n     per logical pixel.\r\n     Half (logical) pixel lines are available on macOS with 'retina' displays,\r\n     see <a class=\"seealso\" href=\"#SCI_SUPPORTSFEATURE\">SCI_SUPPORTSFEATURE(SC_SUPPORTS_PIXEL_DIVISIONS)</a>.</p>\r\n\r\n    <p><b id=\"SCI_INDICSETALPHA\">SCI_INDICSETALPHA(int indicator, <a class=\"jump\" href=\"#alpha\">alpha</a> alpha)</b><br />\r\n     <b id=\"SCI_INDICGETALPHA\">SCI_INDICGETALPHA(int indicator) &rarr; int</b><br />\r\n     These two messages set and get the alpha transparency used for drawing the\r\n     fill colour of the INDIC_ROUNDBOX and INDIC_STRAIGHTBOX rectangle. The alpha value can range from\r\n     0 (completely transparent) to 255 (no transparency).\r\n     </p>\r\n\r\n    <p><b id=\"SCI_INDICSETOUTLINEALPHA\">SCI_INDICSETOUTLINEALPHA(int indicator, <a class=\"jump\" href=\"#alpha\">alpha</a> alpha)</b><br />\r\n     <b id=\"SCI_INDICGETOUTLINEALPHA\">SCI_INDICGETOUTLINEALPHA(int indicator) &rarr; int</b><br />\r\n     These two messages set and get the alpha transparency used for drawing the\r\n     outline colour of the INDIC_ROUNDBOX and INDIC_STRAIGHTBOX rectangle. The alpha value can range from\r\n     0 (completely transparent) to 255 (no transparency).\r\n     </p>\r\n\r\n    <p><b id=\"SCI_INDICSETUNDER\">SCI_INDICSETUNDER(int indicator, bool under)</b><br />\r\n     <b id=\"SCI_INDICGETUNDER\">SCI_INDICGETUNDER(int indicator) &rarr; bool</b><br />\r\n     These two messages set and get whether an indicator is drawn under text or over(default).\r\n     Drawing under text does not work with the deprecated <a class=\"message\" href=\"#SCI_SETPHASESDRAW\">single phase drawing</a>\r\n     mode.</p>\r\n\r\n    <p><b id=\"SCI_INDICSETHOVERSTYLE\">SCI_INDICSETHOVERSTYLE(int indicator, int\r\n    indicatorStyle)</b><br />\r\n     <b id=\"SCI_INDICGETHOVERSTYLE\">SCI_INDICGETHOVERSTYLE(int indicator) &rarr; int</b><br />\r\n     <b id=\"SCI_INDICSETHOVERFORE\">SCI_INDICSETHOVERFORE(int indicator, <a class=\"jump\" href=\"#colour\">colour</a> fore)</b><br />\r\n     <b id=\"SCI_INDICGETHOVERFORE\">SCI_INDICGETHOVERFORE(int indicator) &rarr; colour</b><br />\r\n     These messages set and get the colour and style used to draw indicators when the mouse is over them or the caret moved into them.\r\n     The mouse cursor also changes when an indicator is drawn in hover style.\r\n     The default is for the hover appearance to be the same as the normal appearance and calling\r\n     <a class=\"seealso\" href=\"#SCI_INDICSETFORE\">SCI_INDICSETFORE</a> or\r\n     <a class=\"seealso\" href=\"#SCI_INDICSETSTYLE\">SCI_INDICSETSTYLE</a> will\r\n     also reset the hover attribute.</p>\r\n\r\n    <p><b id=\"SCI_INDICSETFLAGS\">SCI_INDICSETFLAGS(int indicator, int flags)</b><br />\r\n     <b id=\"SCI_INDICGETFLAGS\">SCI_INDICGETFLAGS(int indicator) &rarr; int</b><br />\r\n     These messages set and get the flags associated with an indicator.\r\n     There is currently one flag defined, <code>SC_INDICFLAG_VALUEFORE</code>: when this flag is set\r\n     the colour used by the indicator is not from the indicator's fore setting but instead from the value of the indicator at\r\n     that point in the file. <code>SC_INDICFLAG_NONE</code> is the default.\r\n     This allows many colours to be displayed for a single indicator. The value is an <a class=\"jump\"\r\n    href=\"#colour\">RGB integer colour</a> that has been ored with <code>SC_INDICVALUEBIT</code>(0x1000000)\r\n    when calling <a class=\"seealso\" href=\"#SCI_SETINDICATORVALUE\">SCI_SETINDICATORVALUE</a>.\r\n    To find the colour from the value, and the value with <code>SC_INDICVALUEMASK</code>(0xFFFFFF).\r\n     </p>\r\n\r\n    <p>\r\n    <b id=\"SCI_SETINDICATORCURRENT\">SCI_SETINDICATORCURRENT(int indicator)</b><br />\r\n    <b id=\"SCI_GETINDICATORCURRENT\">SCI_GETINDICATORCURRENT &rarr; int</b><br />\r\n    These two messages set and get the indicator that will be affected by calls to\r\n    <a class=\"message\" href=\"#SCI_INDICATORFILLRANGE\">SCI_INDICATORFILLRANGE(position start, position lengthFill)</a> and\r\n    <a class=\"message\" href=\"#SCI_INDICATORCLEARRANGE\">SCI_INDICATORCLEARRANGE(position start, position lengthClear)</a>.\r\n    </p>\r\n\r\n    <p>\r\n    <b id=\"SCI_SETINDICATORVALUE\">SCI_SETINDICATORVALUE(int value)</b><br />\r\n    <b id=\"SCI_GETINDICATORVALUE\">SCI_GETINDICATORVALUE &rarr; int</b><br />\r\n    These two messages set and get the value that will be set by calls to\r\n    <a class=\"seealso\" href=\"#SCI_INDICATORFILLRANGE\">SCI_INDICATORFILLRANGE</a>.\r\n    </p>\r\n\r\n    <p>\r\n    <b id=\"SCI_INDICATORFILLRANGE\">SCI_INDICATORFILLRANGE(position start, position lengthFill)</b><br />\r\n    <b id=\"SCI_INDICATORCLEARRANGE\">SCI_INDICATORCLEARRANGE(position start, position lengthClear)</b><br />\r\n    These two messages fill or clear a range for the current indicator.\r\n    <code>SCI_INDICATORFILLRANGE</code> fills with the current value.\r\n    </p>\r\n\r\n    <p>\r\n    <b id=\"SCI_INDICATORALLONFOR\">SCI_INDICATORALLONFOR(position pos) &rarr; int</b><br />\r\n    Retrieve a bitmap value representing which indicators are non-zero at a position.\r\n    Only the first 32 indicators are represented in the result so no IME indicators are included.\r\n    </p>\r\n\r\n    <p>\r\n    <b id=\"SCI_INDICATORVALUEAT\">SCI_INDICATORVALUEAT(int indicator, position pos) &rarr; int</b><br />\r\n    Retrieve the value of a particular indicator at a position.\r\n    </p>\r\n\r\n    <p>\r\n    <b id=\"SCI_INDICATORSTART\">SCI_INDICATORSTART(int indicator, position pos) &rarr; position</b><br />\r\n    <b id=\"SCI_INDICATOREND\">SCI_INDICATOREND(int indicator, position pos) &rarr; position</b><br />\r\n    Find the start or end of a range with one value from a position within the range.\r\n    Can be used to iterate through the document to discover all the indicator positions.\r\n    </p>\r\n\r\n    <h3 id=\"FindIndicators\">macOS Find Indicator</h3>\r\n\r\n    <p>On macOS search matches are highlighted with an animated gold rounded rectangle.\r\n    The indicator shows, then briefly grows 25% and shrinks to the original size to draw the user's attention.\r\n    While this feature is currently only implemented on macOS, it may be implemented on other platforms\r\n    in the future.</p>\r\n\r\n    <p><b id=\"SCI_FINDINDICATORSHOW\">SCI_FINDINDICATORSHOW(position start, position end)</b><br />\r\n     <b id=\"SCI_FINDINDICATORFLASH\">SCI_FINDINDICATORFLASH(position start, position end)</b><br />\r\n     These two messages show and animate the find indicator. The indicator remains visible with\r\n     <code>SCI_FINDINDICATORSHOW</code> and fades out after showing for half a second with\r\n     <code>SCI_FINDINDICATORFLASH</code>.\r\n     <code>SCI_FINDINDICATORSHOW</code> behaves similarly to the macOS TextEdit and Safari applications\r\n     and is best suited to editing documentation where the search target is often a word.\r\n     <code>SCI_FINDINDICATORFLASH</code> is similar to Xcode and is suited to editing source code\r\n     where the match will often be located next to operators which would otherwise be hidden under the indicator's\r\n     padding.\r\n     </p>\r\n\r\n    <p><b id=\"SCI_FINDINDICATORHIDE\">SCI_FINDINDICATORHIDE</b><br />\r\n     This message hides the find indicator.\r\n     </p>\r\n\r\n    <p>Earlier versions of Scintilla allowed <a href=\"#StyleByteIndicators\">partitioning style bytes</a>\r\n    between style numbers and indicators and provided APIs for setting and querying this.</p>\r\n\r\n\r\n    <h2 id=\"Autocompletion\">Autocompletion</h2>\r\n\r\n    <p>Autocompletion displays a list box showing likely identifiers based upon the user's typing.\r\n    The user chooses the currently selected item by pressing the tab character or another character\r\n    that is a member of the fillup character set defined with <code>SCI_AUTOCSETFILLUPS</code>.\r\n    Autocompletion is triggered by your application. For example, in C if you detect that the user\r\n    has just typed <code>fred.</code> you could look up <code>fred</code>, and if it has a known\r\n    list of members, you could offer them in an autocompletion list. Alternatively, you could\r\n    monitor the user's typing and offer a list of likely items once their typing has narrowed down\r\n    the choice to a reasonable list. As yet another alternative, you could define a key code to\r\n    activate the list.</p>\r\n\r\n    <p>When the user makes a selection from the list the container is sent a <code><a class=\"message\"\r\n    href=\"#SCN_AUTOCSELECTION\">SCN_AUTOCSELECTION</a></code> <a class=\"jump\"\r\n    href=\"#Notifications\">notification message</a>. On return from the notification Scintilla will insert\r\n     the selected text and the container is sent a <code><a class=\"message\"\r\n    href=\"#SCN_AUTOCCOMPLETED\">SCN_AUTOCCOMPLETED</a></code> <a class=\"jump\"\r\n    href=\"#Notifications\">notification message</a> unless the autocompletion list has been cancelled, for example by the container sending\r\n     <code><a class=\"message\" href=\"#SCI_AUTOCCANCEL\">SCI_AUTOCCANCEL</a></code>. </p>\r\n\r\n    <p>To make use of autocompletion you must monitor each character added to the document. See\r\n    <code>SciTEBase::CharAdded()</code> in SciTEBase.cxx for an example of autocompletion.</p>\r\n    <code><a class=\"message\" href=\"#SCI_AUTOCSHOW\">SCI_AUTOCSHOW(position lengthEntered, const char\r\n    *itemList)</a><br />\r\n     <a class=\"message\" href=\"#SCI_AUTOCCANCEL\">SCI_AUTOCCANCEL</a><br />\r\n     <a class=\"message\" href=\"#SCI_AUTOCACTIVE\">SCI_AUTOCACTIVE &rarr; bool</a><br />\r\n     <a class=\"message\" href=\"#SCI_AUTOCPOSSTART\">SCI_AUTOCPOSSTART &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_AUTOCCOMPLETE\">SCI_AUTOCCOMPLETE</a><br />\r\n     <a class=\"message\" href=\"#SCI_AUTOCSTOPS\">SCI_AUTOCSTOPS(&lt;unused&gt;, const char\r\n    *characterSet)</a><br />\r\n     <a class=\"message\" href=\"#SCI_AUTOCSETSEPARATOR\">SCI_AUTOCSETSEPARATOR(int\r\n    separatorCharacter)</a><br />\r\n     <a class=\"message\" href=\"#SCI_AUTOCGETSEPARATOR\">SCI_AUTOCGETSEPARATOR &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_AUTOCSELECT\">SCI_AUTOCSELECT(&lt;unused&gt;, const char\r\n    *select)</a><br />\r\n     <a class=\"message\" href=\"#SCI_AUTOCGETCURRENT\">SCI_AUTOCGETCURRENT &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_AUTOCGETCURRENTTEXT\">SCI_AUTOCGETCURRENTTEXT(&lt;unused&gt;, char *text) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_AUTOCSETCANCELATSTART\">SCI_AUTOCSETCANCELATSTART(bool\r\n    cancel)</a><br />\r\n     <a class=\"message\" href=\"#SCI_AUTOCGETCANCELATSTART\">SCI_AUTOCGETCANCELATSTART &rarr; bool</a><br />\r\n     <a class=\"message\" href=\"#SCI_AUTOCSETFILLUPS\">SCI_AUTOCSETFILLUPS(&lt;unused&gt;, const char\r\n    *characterSet)</a><br />\r\n     <a class=\"message\" href=\"#SCI_AUTOCSETCHOOSESINGLE\">SCI_AUTOCSETCHOOSESINGLE(bool\r\n    chooseSingle)</a><br />\r\n     <a class=\"message\" href=\"#SCI_AUTOCGETCHOOSESINGLE\">SCI_AUTOCGETCHOOSESINGLE &rarr; bool</a><br />\r\n     <a class=\"message\" href=\"#SCI_AUTOCSETIGNORECASE\">SCI_AUTOCSETIGNORECASE(bool\r\n    ignoreCase)</a><br />\r\n     <a class=\"message\" href=\"#SCI_AUTOCGETIGNORECASE\">SCI_AUTOCGETIGNORECASE &rarr; bool</a><br />\r\n     <a class=\"message\" href=\"#SCI_AUTOCSETCASEINSENSITIVEBEHAVIOUR\">SCI_AUTOCSETCASEINSENSITIVEBEHAVIOUR(int behaviour)</a><br />\r\n     <a class=\"message\" href=\"#SCI_AUTOCGETCASEINSENSITIVEBEHAVIOUR\">SCI_AUTOCGETCASEINSENSITIVEBEHAVIOUR &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_AUTOCSETMULTI\">SCI_AUTOCSETMULTI(int multi)</a><br />\r\n     <a class=\"message\" href=\"#SCI_AUTOCGETMULTI\">SCI_AUTOCGETMULTI &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_AUTOCSETORDER\">SCI_AUTOCSETORDER(int order)</a><br />\r\n     <a class=\"message\" href=\"#SCI_AUTOCGETORDER\">SCI_AUTOCGETORDER &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_AUTOCSETAUTOHIDE\">SCI_AUTOCSETAUTOHIDE(bool autoHide)</a><br />\r\n     <a class=\"message\" href=\"#SCI_AUTOCGETAUTOHIDE\">SCI_AUTOCGETAUTOHIDE &rarr; bool</a><br />\r\n     <a class=\"message\" href=\"#SCI_AUTOCSETDROPRESTOFWORD\">SCI_AUTOCSETDROPRESTOFWORD(bool\r\n    dropRestOfWord)</a><br />\r\n     <a class=\"message\" href=\"#SCI_AUTOCGETDROPRESTOFWORD\">SCI_AUTOCGETDROPRESTOFWORD &rarr; bool</a><br />\r\n     <a class=\"message\" href=\"#SCI_AUTOCSETOPTIONS\">SCI_AUTOCSETOPTIONS(int options)</a><br />\r\n     <a class=\"message\" href=\"#SCI_AUTOCGETOPTIONS\">SCI_AUTOCGETOPTIONS &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_REGISTERIMAGE\">SCI_REGISTERIMAGE(int type, const char *xpmData)</a><br />\r\n     <a class=\"message\" href=\"#SCI_REGISTERRGBAIMAGE\">SCI_REGISTERRGBAIMAGE(int type, const char *pixels)</a><br />\r\n     <a class=\"message\" href=\"#SCI_CLEARREGISTEREDIMAGES\">SCI_CLEARREGISTEREDIMAGES</a><br />\r\n     <a class=\"message\" href=\"#SCI_AUTOCSETTYPESEPARATOR\">SCI_AUTOCSETTYPESEPARATOR(int separatorCharacter)</a><br />\r\n     <a class=\"message\" href=\"#SCI_AUTOCGETTYPESEPARATOR\">SCI_AUTOCGETTYPESEPARATOR &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_AUTOCSETMAXHEIGHT\">SCI_AUTOCSETMAXHEIGHT(int rowCount)</a><br />\r\n     <a class=\"message\" href=\"#SCI_AUTOCGETMAXHEIGHT\">SCI_AUTOCGETMAXHEIGHT &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_AUTOCSETMAXWIDTH\">SCI_AUTOCSETMAXWIDTH(int characterCount)</a><br />\r\n     <a class=\"message\" href=\"#SCI_AUTOCGETMAXWIDTH\">SCI_AUTOCGETMAXWIDTH &rarr; int</a><br />\r\n     <a class=\"element\" href=\"#SC_ELEMENT_LIST\">SC_ELEMENT_LIST : colouralpha</a><br />\r\n     <a class=\"element\" href=\"#SC_ELEMENT_LIST_BACK\">SC_ELEMENT_LIST_BACK : colouralpha</a><br />\r\n     <a class=\"element\" href=\"#SC_ELEMENT_LIST_SELECTED\">SC_ELEMENT_LIST_SELECTED : colouralpha</a><br />\r\n     <a class=\"element\" href=\"#SC_ELEMENT_LIST_SELECTED_BACK\">SC_ELEMENT_LIST_SELECTED_BACK : colouralpha</a><br />\r\n    </code>\r\n\r\n    <p><b id=\"SCI_AUTOCSHOW\">SCI_AUTOCSHOW(position lengthEntered, const char *itemList)</b><br />\r\n     This message causes a list to be displayed. <code class=\"parameter\">lengthEntered</code> is the number of\r\n    characters of the word already entered and <code class=\"parameter\">itemList</code> is the list of words separated by\r\n    separator characters. The initial separator character is a space but this can be set or got\r\n    with <a class=\"message\" href=\"#SCI_AUTOCSETSEPARATOR\"><code>SCI_AUTOCSETSEPARATOR</code></a>\r\n    and <a class=\"message\"\r\n    href=\"#SCI_AUTOCGETSEPARATOR\"><code>SCI_AUTOCGETSEPARATOR</code></a>.</p>\r\n\r\n    <p>With default settings, the list of words should be in sorted order.\r\n    If set to ignore case mode with <a class=\"message\" href=\"#SCI_AUTOCSETIGNORECASE\"><code>SCI_AUTOCSETIGNORECASE</code></a>, then\r\n    strings are matched after being converted to upper case. One result of this is that the list\r\n    should be sorted with the punctuation characters '[', '\\', ']', '^', '_', and '`' sorted after\r\n    letters.\r\n    Alternative handling of list order may be specified with  <a class=\"seealso\" href=\"#SCI_AUTOCSETORDER\">SCI_AUTOCSETORDER</a>\r\n    </p>\r\n\r\n    <p><b id=\"SCI_AUTOCCANCEL\">SCI_AUTOCCANCEL</b><br />\r\n     This message cancels any displayed autocompletion list. When in autocompletion mode, the list\r\n    should disappear when the user types a character that can not be part of the autocompletion,\r\n    such as '.', '(' or '[' when typing an identifier. A set of characters that will cancel\r\n    autocompletion can be specified with <a class=\"message\"\r\n    href=\"#SCI_AUTOCSTOPS\"><code>SCI_AUTOCSTOPS</code></a>.</p>\r\n\r\n    <p><b id=\"SCI_AUTOCACTIVE\">SCI_AUTOCACTIVE &rarr; bool</b><br />\r\n     This message returns non-zero if there is an active autocompletion list and zero if there is\r\n    not.</p>\r\n\r\n    <p><b id=\"SCI_AUTOCPOSSTART\">SCI_AUTOCPOSSTART &rarr; position</b><br />\r\n     This returns the value of the current position when <code>SCI_AUTOCSHOW</code> started display\r\n    of the list.</p>\r\n\r\n    <p><b id=\"SCI_AUTOCCOMPLETE\">SCI_AUTOCCOMPLETE</b><br />\r\n     This message triggers autocompletion. This has the same effect as the tab key.</p>\r\n\r\n    <p><b id=\"SCI_AUTOCSTOPS\">SCI_AUTOCSTOPS(&lt;unused&gt;, const char *characterSet)</b><br />\r\n     The <code class=\"parameter\">characterSet</code> argument is a string containing a list of characters that will\r\n    automatically cancel the autocompletion list. When you start the editor, this list is\r\n    empty.</p>\r\n\r\n    <p><b id=\"SCI_AUTOCSETSEPARATOR\">SCI_AUTOCSETSEPARATOR(int separatorCharacter)</b><br />\r\n     <b id=\"SCI_AUTOCGETSEPARATOR\">SCI_AUTOCGETSEPARATOR &rarr; int</b><br />\r\n     These two messages set and get the separator character used to separate words in the\r\n    <code>SCI_AUTOCSHOW</code> list. The default is the space character.</p>\r\n\r\n    <p><b id=\"SCI_AUTOCSELECT\">SCI_AUTOCSELECT(&lt;unused&gt;, const char *select)</b><br />\r\n     <b id=\"SCI_AUTOCGETCURRENT\">SCI_AUTOCGETCURRENT &rarr; int</b><br />\r\n     This message selects an item in the autocompletion list. It searches the list of words for the\r\n    first that matches <code class=\"parameter\">select</code>. By default, comparisons are case sensitive, but you can\r\n    change this with <a class=\"message\"\r\n    href=\"#SCI_AUTOCSETIGNORECASE\"><code>SCI_AUTOCSETIGNORECASE</code></a>. The match is character\r\n    by character for the length of the <code class=\"parameter\">select</code> string. That is, if select is \"Fred\" it\r\n    will match \"Frederick\" if this is the first item in the list that begins with \"Fred\". If an\r\n    item is found, it is selected. If the item is not found, the autocompletion list closes if\r\n    auto-hide is true (see <a class=\"message\"\r\n    href=\"#SCI_AUTOCSETAUTOHIDE\"><code>SCI_AUTOCSETAUTOHIDE</code></a>).<br />\r\n    The current selection index can be retrieved with <code>SCI_AUTOCGETCURRENT</code>.</p>\r\n\r\n    <p><b id=\"SCI_AUTOCGETCURRENTTEXT\">SCI_AUTOCGETCURRENTTEXT(&lt;unused&gt;, char *text NUL-terminated) &rarr; int</b><br />\r\n     This message retrieves the current selected text in the autocompletion list. Normally the\r\n    <a class=\"message\" href=\"#SCN_AUTOCSELECTION\"><code>SCN_AUTOCSELECTION</code></a> notification\r\n    is used instead.</p>\r\n\r\n    <p>The value is copied to the <code class=\"parameter\">text</code> buffer, returning the length (not including the\r\n    terminating 0). If not found, an empty string is copied to the buffer and 0 is returned.</p>\r\n\r\n    <p>If the value argument is 0 then the length that should be allocated to store the value is\r\n    returned; again, the terminating 0 is not included.</p>\r\n\r\n    <p><b id=\"SCI_AUTOCSETCANCELATSTART\">SCI_AUTOCSETCANCELATSTART(bool cancel)</b><br />\r\n     <b id=\"SCI_AUTOCGETCANCELATSTART\">SCI_AUTOCGETCANCELATSTART &rarr; bool</b><br />\r\n     The default behaviour is for the list to be cancelled if the caret moves to the location it\r\n    was at when the list was displayed. By calling this message with a <code>false</code> argument,\r\n    the list is not cancelled until the caret moves at least one character before the word being\r\n    completed.</p>\r\n\r\n    <p><b id=\"SCI_AUTOCSETFILLUPS\">SCI_AUTOCSETFILLUPS(&lt;unused&gt;, const char *characterSet)</b><br />\r\n     If a fillup character is typed with an autocompletion list active, the currently selected item\r\n    in the list is added into the document, then the fillup character is added. Common fillup\r\n    characters are '(', '[' and '.' but others are possible depending on the language. By default,\r\n    no fillup characters are set.</p>\r\n\r\n    <p><b id=\"SCI_AUTOCSETCHOOSESINGLE\">SCI_AUTOCSETCHOOSESINGLE(bool chooseSingle)</b><br />\r\n     <b id=\"SCI_AUTOCGETCHOOSESINGLE\">SCI_AUTOCGETCHOOSESINGLE &rarr; bool</b><br />\r\n     If you use <code>SCI_AUTOCSETCHOOSESINGLE(1)</code> and a list has only one item, it is\r\n    automatically added and no list is displayed. The default is to display the list even if there\r\n    is only a single item.</p>\r\n\r\n    <p><b id=\"SCI_AUTOCSETIGNORECASE\">SCI_AUTOCSETIGNORECASE(bool ignoreCase)</b><br />\r\n     <b id=\"SCI_AUTOCGETIGNORECASE\">SCI_AUTOCGETIGNORECASE &rarr; bool</b><br />\r\n     By default, matching of characters to list members is case sensitive. These messages let you\r\n    set and get case sensitivity.</p>\r\n\r\n    <p><b id=\"SCI_AUTOCSETCASEINSENSITIVEBEHAVIOUR\">SCI_AUTOCSETCASEINSENSITIVEBEHAVIOUR(int behaviour)</b><br />\r\n    <b id=\"SCI_AUTOCGETCASEINSENSITIVEBEHAVIOUR\">SCI_AUTOCGETCASEINSENSITIVEBEHAVIOUR &rarr; int</b><br />\r\n    When autocompletion is set to ignore case (<code>SCI_AUTOCSETIGNORECASE</code>), by default it will\r\n    nonetheless select the first list member that matches in a case sensitive way to entered characters.\r\n    This corresponds to a behaviour property of <code>SC_CASEINSENSITIVEBEHAVIOUR_RESPECTCASE</code> (0).\r\n    If you want autocompletion to ignore case at all, choose <code>SC_CASEINSENSITIVEBEHAVIOUR_IGNORECASE</code> (1).</p>\r\n\r\n    <p><b id=\"SCI_AUTOCSETMULTI\">SCI_AUTOCSETMULTI(int multi)</b><br />\r\n    <b id=\"SCI_AUTOCGETMULTI\">SCI_AUTOCGETMULTI &rarr; int</b><br />\r\n    When autocompleting with multiple selections present, the autocompleted text can go into just the main selection with\r\n    <code>SC_MULTIAUTOC_ONCE</code> (0) or into each selection with <code>SC_MULTIAUTOC_EACH</code> (1).\r\n    The default is <code>SC_MULTIAUTOC_ONCE</code>.</p>\r\n\r\n    <p><b id=\"SCI_AUTOCSETORDER\">SCI_AUTOCSETORDER(int order)</b><br />\r\n    <b id=\"SCI_AUTOCGETORDER\">SCI_AUTOCGETORDER &rarr; int</b><br />\r\n    The default setting <code>SC_ORDER_PRESORTED</code> (0) requires that the list be provided in alphabetical sorted order.\r\n   </p>\r\n    <p>Sorting the list can be done by Scintilla instead of the application with <code>SC_ORDER_PERFORMSORT</code> (1).\r\n    This will take additional time.\r\n   </p>\r\n    <p>Applications that wish to prioritize some values and show the list in order of priority instead\r\n    of alphabetical order can use <code>SC_ORDER_CUSTOM</code> (2).\r\n    This requires extra processing in <a class=\"seealso\" href=\"#SCI_AUTOCSHOW\">SCI_AUTOCSHOW</a> to create a sorted index.\r\n   </p>\r\n    <p>Setting the order should be done before calling <a class=\"seealso\" href=\"#SCI_AUTOCSHOW\">SCI_AUTOCSHOW</a>.\r\n   </p>\r\n\r\n    <p><b id=\"SCI_AUTOCSETAUTOHIDE\">SCI_AUTOCSETAUTOHIDE(bool autoHide)</b><br />\r\n     <b id=\"SCI_AUTOCGETAUTOHIDE\">SCI_AUTOCGETAUTOHIDE &rarr; bool</b><br />\r\n     By default, the list is cancelled if there are no viable matches (the user has typed\r\n    characters that no longer match a list entry). If you want to keep displaying the original\r\n    list, set <code class=\"parameter\">autoHide</code> to <code>false</code>. This also effects\r\n     <a class=\"seealso\" href=\"#SCI_AUTOCSELECT\"><code>SCI_AUTOCSELECT</code></a>.</p>\r\n\r\n    <p><b id=\"SCI_AUTOCSETDROPRESTOFWORD\">SCI_AUTOCSETDROPRESTOFWORD(bool dropRestOfWord)</b><br />\r\n     <b id=\"SCI_AUTOCGETDROPRESTOFWORD\">SCI_AUTOCGETDROPRESTOFWORD &rarr; bool</b><br />\r\n     When an item is selected, any word characters following the caret are first erased if\r\n    <code class=\"parameter\">dropRestOfWord</code> is set <code>true</code>. The default is <code>false</code>.</p>\r\n\r\n    <p><b id=\"SCI_AUTOCSETOPTIONS\">SCI_AUTOCSETOPTIONS(int options)</b><br />\r\n     <b id=\"SCI_AUTOCGETOPTIONS\">SCI_AUTOCGETOPTIONS &rarr; int</b><br />\r\n     Set options for autocompletion from the following list.</p>\r\n\r\n    <table class=\"standard\" summary=\"Autocompletion options\">\r\n      <tbody>\r\n        <tr>\r\n          <th align=\"left\">Symbol</th>\r\n\r\n          <th>Value</th>\r\n\r\n          <th align=\"left\">Purpose</th>\r\n        </tr>\r\n      </tbody>\r\n\r\n      <tbody valign=\"top\">\r\n        <tr>\r\n          <td align=\"left\"><code>SC_AUTOCOMPLETE_NORMAL</code></td>\r\n\r\n          <td align=\"center\">0</td>\r\n\r\n          <td>Display autocompletion using default settings.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>SC_AUTOCOMPLETE_FIXED_SIZE</code></td>\r\n\r\n          <td align=\"center\">1</td>\r\n\r\n          <td>On Win32 only, use a fixed size list instead of one that can be resized by the user.\r\n\t  This also avoids a header rectangle above the list.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>SC_AUTOCOMPLETE_SELECT_FIRST_ITEM</code></td>\r\n\r\n          <td align=\"center\">2</td>\r\n\r\n          <td>Always select the first item from the autocompletion list regardless of the value\r\n            entered in the editor. Useful when the autocompletion logic of the application\r\n            sorts autocompletion entries so that the best match is always at the top of the\r\n            list. Without this option, Scintilla selects the item from the autocompletion\r\n            list matching the value entered in the editor.</td>\r\n        </tr>\r\n\r\n      </tbody>\r\n    </table>\r\n\r\n    <p>\r\n      <b id=\"SCI_REGISTERIMAGE\">SCI_REGISTERIMAGE(int type, const char *xpmData)</b><br />\r\n      <b id=\"SCI_REGISTERRGBAIMAGE\">SCI_REGISTERRGBAIMAGE(int type, const char *pixels)</b><br />\r\n      <b id=\"SCI_CLEARREGISTEREDIMAGES\">SCI_CLEARREGISTEREDIMAGES</b><br />\r\n      <b id=\"SCI_AUTOCSETTYPESEPARATOR\">SCI_AUTOCSETTYPESEPARATOR(int separatorCharacter)</b><br />\r\n      <b id=\"SCI_AUTOCGETTYPESEPARATOR\">SCI_AUTOCGETTYPESEPARATOR &rarr; int</b><br />\r\n\r\n      Autocompletion list items may display an image as well as text. Each image is first registered with an integer\r\n      type. Then this integer is included in the text of the list separated by a '?' from the text. For example,\r\n      \"fclose?2 fopen\" displays image 2 before the string \"fclose\" and no image before \"fopen\".\r\n      The images are in either the <a class=\"jump\" href=\"#XPM\">XPM format</a> (<code>SCI_REGISTERIMAGE</code>) or\r\n      <a class=\"jump\" href=\"#RGBA\">RGBA format</a> (<code>SCI_REGISTERRGBAIMAGE</code>).\r\n      For <code>SCI_REGISTERRGBAIMAGE</code> the width and height must previously been set with\r\n      the <a class=\"message\" href=\"#SCI_RGBAIMAGESETWIDTH\"><code>SCI_RGBAIMAGESETWIDTH</code></a> and\r\n      <a class=\"message\" href=\"#SCI_RGBAIMAGESETHEIGHT\"><code>SCI_RGBAIMAGESETHEIGHT</code></a> messages.\r\n      The set of registered images can be cleared with <code>SCI_CLEARREGISTEREDIMAGES</code> and the '?' separator changed\r\n      with <code>SCI_AUTOCSETTYPESEPARATOR</code>.\r\n    </p>\r\n\r\n    <p>\r\n      <b id=\"SCI_AUTOCSETMAXHEIGHT\">SCI_AUTOCSETMAXHEIGHT(int rowCount)</b><br />\r\n      <b id=\"SCI_AUTOCGETMAXHEIGHT\">SCI_AUTOCGETMAXHEIGHT &rarr; int</b><br />\r\n\r\n      Get or set the maximum number of rows that will be visible in an autocompletion list. If there are more rows in the list, then a vertical\r\n      scrollbar is shown. The default is 5.\r\n     </p>\r\n\r\n    <p>\r\n      <b id=\"SCI_AUTOCSETMAXWIDTH\">SCI_AUTOCSETMAXWIDTH(int characterCount)</b><br />\r\n      <b id=\"SCI_AUTOCGETMAXWIDTH\">SCI_AUTOCGETMAXWIDTH &rarr; int</b><br />\r\n\r\n      Get or set the maximum width of an autocompletion list expressed as the number of characters in the longest item that will be totally visible.\r\n      If zero (the default) then the list's width is calculated to fit the item with the most characters. Any items that cannot be fully displayed within\r\n      the available width are indicated by the presence of ellipsis.\r\n     </p>\r\n\r\n    <p>\r\n     <b id=\"SC_ELEMENT_LIST\">SC_ELEMENT_LIST : colouralpha</b><br />\r\n     <b id=\"SC_ELEMENT_LIST_BACK\">SC_ELEMENT_LIST_BACK : colouralpha</b><br />\r\n     <b id=\"SC_ELEMENT_LIST_SELECTED\">SC_ELEMENT_LIST_SELECTED : colouralpha</b><br />\r\n     <b id=\"SC_ELEMENT_LIST_SELECTED_BACK\">SC_ELEMENT_LIST_SELECTED_BACK : colouralpha</b><br />\r\n     The colours used for autocompletion lists may be customised on Win32 using\r\n     <a class=\"message\" href=\"#SCI_SETELEMENTCOLOUR\"><code>SCI_SETELEMENTCOLOUR</code></a>.\r\n     </p>\r\n\r\n    <h2 id=\"UserLists\">User lists</h2>\r\n\r\n    <p>User lists use the same internal mechanisms as autocompletion lists, and all the calls\r\n    listed for autocompletion work on them; you cannot display a user list at the same time as an\r\n    autocompletion list is active. They differ in the following respects:</p>\r\n\r\n    <code><a class=\"message\" href=\"#SCI_USERLISTSHOW\">SCI_USERLISTSHOW(int listType, const char *itemList)</a><br /></code>\r\n\r\n    <p>o The <code><a class=\"message\"\r\n    href=\"#SCI_AUTOCSETCHOOSESINGLE\">SCI_AUTOCSETCHOOSESINGLE</a></code> message has no\r\n    effect.<br />\r\n     o When the user makes a selection you are sent a <code><a class=\"jump\"\r\n    href=\"#SCN_USERLISTSELECTION\">SCN_USERLISTSELECTION</a></code> <a class=\"jump\"\r\n    href=\"#Notifications\">notification message</a> rather than <code><a class=\"jump\"\r\n    href=\"#SCN_AUTOCSELECTION\">SCN_AUTOCSELECTION</a></code>.</p>\r\n\r\n    <p>BEWARE: if you have set fillup characters or stop characters, these will still be active\r\n    with the user list, and may result in items being selected or the user list cancelled due to\r\n    the user typing into the editor.</p>\r\n\r\n    <p><b id=\"SCI_USERLISTSHOW\">SCI_USERLISTSHOW(int listType, const char *itemList)</b><br />\r\n     The <code class=\"parameter\">listType</code> parameter is returned to the container as the <code>wParam</code>\r\n    field of the <a class=\"message\" href=\"#SCNotification\"><code>SCNotification</code></a>\r\n    structure. It must be greater than 0 as this is how Scintilla tells the difference between an\r\n    autocompletion list and a user list. If you have different types of list, for example a list of\r\n    buffers and a list of macros, you can use <code class=\"parameter\">listType</code> to tell which one has returned\r\n    a selection. </p>\r\n\r\n    <h2 id=\"CallTips\">Call tips</h2>\r\n\r\n    <p>Call tips are small windows displaying the arguments to a function and are displayed after\r\n    the user has typed the name of the function. They normally display characters using the font\r\n    facename, size and character set defined by\r\n    <code><a class=\"message\" href=\"#StyleDefinition\">STYLE_DEFAULT</a></code>. You can choose to\r\n    use <code><a class=\"message\" href=\"#StyleDefinition\">STYLE_CALLTIP</a></code> to define the\r\n    facename, size, foreground and background colours and character set with\r\n    <code><a class=\"seealso\" href=\"#SCI_CALLTIPUSESTYLE\">SCI_CALLTIPUSESTYLE</a></code>.\r\n    This also enables support for Tab characters.\r\n\r\n    There is some interaction between call tips and autocompletion lists in that showing a\r\n    call tip cancels any active autocompletion list, and vice versa.</p>\r\n\r\n    <p>Call tips can highlight part of the text within them. You could use this to highlight the\r\n    current argument to a function by counting the number of commas (or whatever separator your\r\n    language uses). See <code>SciTEBase::CharAdded()</code> in <code>SciTEBase.cxx</code> for an\r\n    example of call tip use.</p>\r\n\r\n    <p>The mouse may be clicked on call tips and this causes a\r\n    <code><a class=\"message\" href=\"#SCN_CALLTIPCLICK\">SCN_CALLTIPCLICK</a></code>\r\n    notification to be sent to the container. Small up and down arrows may be displayed within\r\n    a call tip by, respectively, including the characters '\\001', or '\\002'. This is useful\r\n    for showing that there are overloaded variants of one function name and that the user can\r\n    click on the arrows to cycle through the overloads.</p>\r\n\r\n    <p>Alternatively, call tips can be displayed when you leave the mouse pointer for a while over\r\n    a word in response to the <code><a class=\"message\"\r\n    href=\"#SCN_DWELLSTART\">SCN_DWELLSTART</a></code> <a class=\"jump\"\r\n    href=\"#Notifications\">notification</a> and cancelled in response to <code><a class=\"message\"\r\n    href=\"#SCN_DWELLEND\">SCN_DWELLEND</a></code>. This method could be used in a debugger to give\r\n    the value of a variable, or during editing to give information about the word under the\r\n    pointer.</p>\r\n    <code><a class=\"message\" href=\"#SCI_CALLTIPSHOW\">SCI_CALLTIPSHOW(position pos, const char\r\n    *definition)</a><br />\r\n     <a class=\"message\" href=\"#SCI_CALLTIPCANCEL\">SCI_CALLTIPCANCEL</a><br />\r\n     <a class=\"message\" href=\"#SCI_CALLTIPACTIVE\">SCI_CALLTIPACTIVE &rarr; bool</a><br />\r\n     <a class=\"message\" href=\"#SCI_CALLTIPPOSSTART\">SCI_CALLTIPPOSSTART &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_CALLTIPSETPOSSTART\">SCI_CALLTIPSETPOSSTART(position posStart)</a><br />\r\n     <a class=\"message\" href=\"#SCI_CALLTIPSETHLT\">SCI_CALLTIPSETHLT(position highlightStart, position\r\n    highlightEnd)</a><br />\r\n     <a class=\"message\" href=\"#SCI_CALLTIPSETBACK\">SCI_CALLTIPSETBACK(colour back)</a><br />\r\n     <a class=\"message\" href=\"#SCI_CALLTIPSETFORE\">SCI_CALLTIPSETFORE(colour fore)</a><br />\r\n     <a class=\"message\" href=\"#SCI_CALLTIPSETFOREHLT\">SCI_CALLTIPSETFOREHLT(colour fore)</a><br />\r\n     <a class=\"message\" href=\"#SCI_CALLTIPUSESTYLE\">SCI_CALLTIPUSESTYLE(int tabSize)</a><br />\r\n     <a class=\"message\" href=\"#SCI_CALLTIPSETPOSITION\">SCI_CALLTIPSETPOSITION(bool above)</a><br />\r\n    </code>\r\n\r\n    <p><b id=\"SCI_CALLTIPSHOW\">SCI_CALLTIPSHOW(position pos, const char *definition)</b><br />\r\n     This message starts the process by displaying the call tip window. If a call tip is already\r\n    active, this has no effect.<br />\r\n     <code class=\"parameter\">pos</code> is the position in the document at which to align the call tip. The call\r\n    tip text is aligned to start 1 line below this character unless you have included up and/or\r\n    down arrows in the call tip text in which case the tip is aligned to the right-hand edge of\r\n    the rightmost arrow. The assumption is that you will start the text with something like\r\n    \"\\001 1 of 3 \\002\".<br />\r\n     <code class=\"parameter\">definition</code> is the call tip text. This can contain multiple lines separated by\r\n    '\\n' (Line Feed, ASCII code 10) characters. Do not include '\\r' (Carriage Return, ASCII\r\n     code 13), as this will most likely print as an empty box. '\\t' (Tab, ASCII code 9) is\r\n     supported if you set a tabsize with\r\n    <code><a class=\"seealso\" href=\"#SCI_CALLTIPUSESTYLE\">SCI_CALLTIPUSESTYLE</a></code>.<br />\r\n    The position of the caret is remembered here so that the call tip can be cancelled automatically if subsequent deletion\r\n    moves the caret before this position.</p>\r\n\r\n    <p><b id=\"SCI_CALLTIPCANCEL\">SCI_CALLTIPCANCEL</b><br />\r\n     This message cancels any displayed call tip. Scintilla will also cancel call tips for you if\r\n    you use any keyboard commands that are not compatible with editing the argument list of a\r\n    function.\r\n    Call tips are cancelled if you delete back past the position where the caret was when the tip was triggered.</p>\r\n\r\n    <p><b id=\"SCI_CALLTIPACTIVE\">SCI_CALLTIPACTIVE &rarr; bool</b><br />\r\n     This returns 1 if a call tip is active and 0 if it is not active.</p>\r\n\r\n    <p><b id=\"SCI_CALLTIPPOSSTART\">SCI_CALLTIPPOSSTART &rarr; position</b><br />\r\n    <b id=\"SCI_CALLTIPSETPOSSTART\">SCI_CALLTIPSETPOSSTART(position posStart)</b><br />\r\n     This message returns or sets the value of the current position when <code>SCI_CALLTIPSHOW</code>\r\n    started to display the tip.</p>\r\n\r\n    <p><b id=\"SCI_CALLTIPSETHLT\">SCI_CALLTIPSETHLT(position highlightStart, position highlightEnd)</b><br />\r\n     This sets the region of the call tips text to display in a highlighted style.\r\n    <code class=\"parameter\">highlightStart</code> is the zero-based index into the string of the first character to\r\n    highlight and <code class=\"parameter\">highlightEnd</code> is the index of the first character after the highlight.\r\n    <code class=\"parameter\">highlightEnd</code> must be greater than <code class=\"parameter\">highlightStart</code>;\r\n    <code>highlightEnd-highlightStart</code> is the\r\n    number of characters to highlight. Highlights can extend over line ends if this is\r\n    required.</p>\r\n\r\n    <p>Unhighlighted text is drawn in a mid grey. Selected text is drawn in a dark blue. The\r\n    background is white. These can be changed with\r\n    <code>SCI_CALLTIPSETBACK</code>,\r\n    <code>SCI_CALLTIPSETFORE</code>, and\r\n    <code>SCI_CALLTIPSETFOREHLT</code>.\r\n    </p>\r\n\r\n    <p><b id=\"SCI_CALLTIPSETBACK\">SCI_CALLTIPSETBACK(<a class=\"jump\" href=\"#colour\">colour</a> back)</b><br />\r\n     The background colour of call tips can be set with this message; the default colour is white.\r\n    It is not a good idea to set a dark colour as the background as the default colour for normal\r\n    calltip text is mid grey and the default colour for highlighted text is dark blue. This also\r\n    sets the background colour of <code>STYLE_CALLTIP</code>.</p>\r\n\r\n    <p><b id=\"SCI_CALLTIPSETFORE\">SCI_CALLTIPSETFORE(<a class=\"jump\" href=\"#colour\">colour</a> fore)</b><br />\r\n     The colour of call tip text can be set with this message; the default colour is mid grey.\r\n    This also sets the foreground colour of <code>STYLE_CALLTIP</code>.</p>\r\n\r\n    <p><b id=\"SCI_CALLTIPSETFOREHLT\">SCI_CALLTIPSETFOREHLT(<a class=\"jump\" href=\"#colour\">colour</a> fore)</b><br />\r\n     The colour of highlighted call tip text can be set with this message; the default colour\r\n    is dark blue.</p>\r\n\r\n    <p><b id=\"SCI_CALLTIPUSESTYLE\">SCI_CALLTIPUSESTYLE(int tabSize)</b><br />\r\n     This message changes the style used for call tips from <code>STYLE_DEFAULT</code> to\r\n    <code>STYLE_CALLTIP</code> and sets a tab size in screen pixels. If <code class=\"parameter\">tabsize</code> is\r\n    less than 1, Tab characters are not treated specially. Once this call has been used, the\r\n    call tip foreground and background colours are also taken from the style.</p>\r\n\r\n    <p><b id=\"SCI_CALLTIPSETPOSITION\">SCI_CALLTIPSETPOSITION(bool above)</b><br />\r\n     By default the calltip is displayed below the text, setting above to <code>true</code>\r\n    (1) will display it above the text.</p>\r\n\r\n\r\n    <h2 id=\"KeyboardCommands\">Keyboard commands</h2>\r\n\r\n    <p>To allow the container application to perform any of the actions available to the user with\r\n    keyboard, all the keyboard actions are messages. They do not take any parameters. These\r\n    commands are also used when redefining the key bindings with the <a class=\"message\"\r\n    href=\"#SCI_ASSIGNCMDKEY\"><code>SCI_ASSIGNCMDKEY</code></a> message.</p>\r\n\r\n    <table border=\"0\" summary=\"Keyboard commands\">\r\n      <tbody>\r\n        <tr>\r\n          <td><code>SCI_LINEDOWN</code></td>\r\n\r\n          <td><code>SCI_LINEDOWNEXTEND</code></td>\r\n\r\n          <td><code>SCI_LINEDOWNRECTEXTEND</code></td>\r\n\r\n          <td><code>SCI_LINESCROLLDOWN</code></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>SCI_LINEUP</code></td>\r\n\r\n          <td><code>SCI_LINEUPEXTEND</code></td>\r\n\r\n          <td><code>SCI_LINEUPRECTEXTEND</code></td>\r\n\r\n          <td><code>SCI_LINESCROLLUP</code></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>SCI_PARADOWN</code></td>\r\n\r\n          <td><code>SCI_PARADOWNEXTEND</code></td>\r\n\r\n          <td><code>SCI_PARAUP</code></td>\r\n\r\n          <td><code>SCI_PARAUPEXTEND</code></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>SCI_CHARLEFT</code></td>\r\n\r\n          <td><code>SCI_CHARLEFTEXTEND</code></td>\r\n\r\n          <td><code>SCI_CHARLEFTRECTEXTEND</code></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>SCI_CHARRIGHT</code></td>\r\n\r\n          <td><code>SCI_CHARRIGHTEXTEND</code></td>\r\n\r\n          <td><code>SCI_CHARRIGHTRECTEXTEND</code></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>SCI_WORDLEFT</code></td>\r\n\r\n          <td><code>SCI_WORDLEFTEXTEND</code></td>\r\n\r\n          <td><code>SCI_WORDRIGHT</code></td>\r\n\r\n          <td><code>SCI_WORDRIGHTEXTEND</code></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>SCI_WORDLEFTEND</code></td>\r\n\r\n          <td><code>SCI_WORDLEFTENDEXTEND</code></td>\r\n\r\n          <td><code>SCI_WORDRIGHTEND</code></td>\r\n\r\n          <td><code>SCI_WORDRIGHTENDEXTEND</code></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>SCI_WORDPARTLEFT</code></td>\r\n\r\n          <td><code>SCI_WORDPARTLEFTEXTEND</code></td>\r\n\r\n          <td><code>SCI_WORDPARTRIGHT</code></td>\r\n\r\n          <td><code>SCI_WORDPARTRIGHTEXTEND</code></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>SCI_HOME</code></td>\r\n\r\n          <td><code>SCI_HOMEEXTEND</code></td>\r\n\r\n          <td><code>SCI_HOMERECTEXTEND</code></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>SCI_HOMEDISPLAY</code></td>\r\n\r\n          <td><code>SCI_HOMEDISPLAYEXTEND</code></td>\r\n\r\n          <td><code>SCI_HOMEWRAP</code></td>\r\n\r\n          <td><code>SCI_HOMEWRAPEXTEND</code></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>SCI_VCHOME</code></td>\r\n\r\n          <td><code>SCI_VCHOMEEXTEND</code></td>\r\n\r\n          <td><code>SCI_VCHOMERECTEXTEND</code></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>SCI_VCHOMEWRAP</code></td>\r\n\r\n          <td><code>SCI_VCHOMEWRAPEXTEND</code></td>\r\n\r\n          <td><code>SCI_VCHOMEDISPLAY</code></td>\r\n\r\n          <td><code>SCI_VCHOMEDISPLAYEXTEND</code></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>SCI_LINEEND</code></td>\r\n\r\n          <td><code>SCI_LINEENDEXTEND</code></td>\r\n\r\n          <td><code>SCI_LINEENDRECTEXTEND</code></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>SCI_LINEENDDISPLAY</code></td>\r\n\r\n          <td><code>SCI_LINEENDDISPLAYEXTEND</code></td>\r\n\r\n          <td><code>SCI_LINEENDWRAP</code></td>\r\n\r\n          <td><code>SCI_LINEENDWRAPEXTEND</code></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>SCI_DOCUMENTSTART</code></td>\r\n\r\n          <td><code>SCI_DOCUMENTSTARTEXTEND</code></td>\r\n\r\n          <td><code>SCI_DOCUMENTEND</code></td>\r\n\r\n          <td><code>SCI_DOCUMENTENDEXTEND</code></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>SCI_PAGEUP</code></td>\r\n\r\n          <td><code>SCI_PAGEUPEXTEND</code></td>\r\n\r\n          <td><code>SCI_PAGEUPRECTEXTEND</code></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>SCI_PAGEDOWN</code></td>\r\n\r\n          <td><code>SCI_PAGEDOWNEXTEND</code></td>\r\n\r\n          <td><code>SCI_PAGEDOWNRECTEXTEND</code></td>\r\n        </tr>\r\n\r\n\r\n        <tr>\r\n          <td><code>SCI_STUTTEREDPAGEUP</code></td>\r\n\r\n          <td><code>SCI_STUTTEREDPAGEUPEXTEND</code></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>SCI_STUTTEREDPAGEDOWN</code></td>\r\n\r\n          <td><code>SCI_STUTTEREDPAGEDOWNEXTEND</code></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>SCI_DELETEBACK</code></td>\r\n\r\n          <td><code>SCI_DELETEBACKNOTLINE</code></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>SCI_DELWORDLEFT</code></td>\r\n\r\n          <td><code>SCI_DELWORDRIGHT</code></td>\r\n\r\n          <td><code>SCI_DELWORDRIGHTEND</code></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>SCI_DELLINELEFT</code></td>\r\n\r\n          <td><code>SCI_DELLINERIGHT</code></td>\r\n\r\n          <td><code>SCI_LINEDELETE</code></td>\r\n\r\n          <td><code>SCI_LINECUT</code></td>\r\n        </tr>\r\n\r\n        <tr>\r\n\r\n          <td><code>SCI_LINECOPY</code></td>\r\n\r\n          <td><code>SCI_LINETRANSPOSE</code></td>\r\n\r\n          <td><code>SCI_LINEREVERSE</code></td>\r\n\r\n          <td><code>SCI_LINEDUPLICATE</code></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>SCI_LOWERCASE</code></td>\r\n\r\n          <td><code>SCI_UPPERCASE</code></td>\r\n\r\n          <td><code>SCI_CANCEL</code></td>\r\n\r\n          <td><code>SCI_EDITTOGGLEOVERTYPE</code></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>SCI_NEWLINE</code></td>\r\n\r\n          <td><code>SCI_FORMFEED</code></td>\r\n\r\n          <td><code>SCI_TAB</code></td>\r\n\r\n          <td><code>SCI_BACKTAB</code></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>SCI_SELECTIONDUPLICATE</code></td>\r\n\r\n          <td><code>SCI_VERTICALCENTRECARET</code></td>\r\n\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>SCI_MOVESELECTEDLINESUP</code></td>\r\n\r\n          <td><code>SCI_MOVESELECTEDLINESDOWN</code></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>SCI_SCROLLTOSTART</code></td>\r\n\r\n          <td><code>SCI_SCROLLTOEND</code></td>\r\n        </tr>\r\n     </tbody>\r\n    </table>\r\n\r\n    <p>The <code>SCI_*EXTEND</code> messages extend the selection.</p>\r\n\r\n    <p>The <code>SCI_*RECTEXTEND</code> messages extend the rectangular selection\r\n    (and convert regular selection to rectangular one, if any).</p>\r\n\r\n    <p>The <code>SCI_WORDPART*</code> commands are used to move between word segments marked by\r\n    capitalisation (aCamelCaseIdentifier) or underscores (an_under_bar_ident).</p>\r\n\r\n    <p>The <code>SCI_WORD[LEFT|RIGHT]END*</code> commands are\r\n    similar to <code>SCI_WORD[LEFT|RIGHT]*</code> but move between word ends instead of word starts.</p>\r\n\r\n    <p>The <code>SCI_HOME*</code> commands move the caret to the start of the line, while the\r\n    <code>SCI_VCHOME*</code> commands move the caret to the first non-blank character of the line\r\n    (ie. just after the indentation) unless it is already there; in this case, it acts as SCI_HOME*.</p>\r\n\r\n    <p>The <code>SCI_[HOME|LINEEND]DISPLAY*</code> commands are used when in line wrap mode to\r\n    allow movement to the start or end of display lines as opposed to the normal\r\n    <code>SCI_[HOME|LINEEND]</code> commands which move to the start or end of document lines.</p>\r\n\r\n    <p>The <code>SCI_[[VC]HOME|LINEEND]WRAP*</code> commands are like their namesakes\r\n    <code>SCI_[[VC]HOME|LINEEND]*</code> except they behave differently when word-wrap is enabled:\r\n     They go first to the start / end of the display line, like <code>SCI_[HOME|LINEEND]DISPLAY*</code>,\r\n     but if the cursor is already at the point, it goes on to the start or end of the document line,\r\n     as appropriate for <code>SCI_[[VC]HOME|LINEEND]*</code>.\r\n     </p>\r\n\r\n    <p>The <code>SCI_SCROLLTO[START|END]</code> commands scroll the document to the start\r\n    or end without changing the selection. These commands match macOS platform conventions for the behaviour of the\r\n    <code>home</code> and <code>end</code> keys. Scintilla can be made to match macOS applications\r\n    by binding the <code>home</code> and <code>end</code> keys to these commands.\r\n     </p>\r\n\r\n    <p class=\"message\" id=\"SCI_CANCEL\">The <code>SCI_CANCEL</code> command cancels autocompletion and\r\n    calltip display and drops any additional selections.\r\n     </p>\r\n\r\n    <h2 id=\"KeyBindings\">Key bindings</h2>\r\n\r\n    <p>There is a default binding of keys to commands that is defined in the Scintilla source in\r\n    the file <code>KeyMap.cxx</code> by the constant <code>KeyMap::MapDefault[]</code>. This table\r\n    maps key definitions to <code>SCI_*</code> messages with no parameters (mostly the <a\r\n    class=\"jump\" href=\"#KeyboardCommands\">keyboard commands</a> discussed above, but any Scintilla\r\n    command that has no arguments can be mapped). You can change the mapping to suit your own\r\n    requirements.</p>\r\n    <code><a class=\"message\" href=\"#SCI_ASSIGNCMDKEY\">SCI_ASSIGNCMDKEY(int keyDefinition, int\r\n    sciCommand)</a><br />\r\n     <a class=\"message\" href=\"#SCI_CLEARCMDKEY\">SCI_CLEARCMDKEY(int keyDefinition)</a><br />\r\n     <a class=\"message\" href=\"#SCI_CLEARALLCMDKEYS\">SCI_CLEARALLCMDKEYS</a><br />\r\n     <a class=\"message\" href=\"#SCI_NULL\">SCI_NULL</a><br />\r\n    </code>\r\n\r\n    <p><b id=\"keyDefinition\">keyDefinition</b><br />\r\n     A key definition contains the key code in the low 16-bits and the key modifiers in the high\r\n    16-bits. To combine <code>keyCode</code> and <code>keyMod</code> set:<br />\r\n    <br />\r\n     <code>keyDefinition = keyCode + (keyMod &lt;&lt; 16)</code></p>\r\n\r\n    <p>The key code is a visible or control character or a key from the <code>SCK_*</code>\r\n    enumeration, which contains:<br />\r\n     <code>SCK_ADD</code>, <code>SCK_BACK</code>, <code>SCK_DELETE</code>, <code>SCK_DIVIDE</code>,\r\n    <code>SCK_DOWN</code>, <code>SCK_END</code>, <code>SCK_ESCAPE</code>, <code>SCK_HOME</code>,\r\n    <code>SCK_INSERT</code>, <code>SCK_LEFT</code>, <code>SCK_MENU</code>, <code>SCK_NEXT</code> (Page Down),\r\n    <code>SCK_PRIOR</code> (Page Up), <code>SCK_RETURN</code>, <code>SCK_RIGHT</code>,\r\n    <code>SCK_RWIN</code>,\r\n    <code>SCK_SUBTRACT</code>, <code>SCK_TAB</code>, <code>SCK_UP</code>, and\r\n    <code>SCK_WIN</code>.</p>\r\n\r\n    <p>The modifiers are a combination of zero or more of <code>SCMOD_ALT</code>,\r\n    <code>SCMOD_CTRL</code>, <code>SCMOD_SHIFT</code>,\r\n    <code>SCMOD_META</code>, and <code>SCMOD_SUPER</code>.\r\n    On macOS, the Command key is mapped to <code>SCMOD_CTRL</code> and the Control key to\r\n    <code>SCMOD_META</code>.\r\n    <code>SCMOD_SUPER</code> is only available on GTK which is commonly the Windows key.\r\n    If you are building a table, you might\r\n    want to use <code>SCMOD_NORM</code>, which has the value 0, to mean no modifiers.</p>\r\n\r\n    <p>On Win32, the numeric keypad with Alt pressed can be used to enter characters by number.\r\n    This can produce unexpected results in non-numlock mode when function keys are assigned so\r\n    potentially problematic keys are ignored. For example, setting\r\n    <code>SCMOD_ALT</code>,<code>SCK_UP</code> will only be active for the Up key on the\r\n    main cursor keys, not the numeric keypad.</p>\r\n\r\n    <p><b id=\"SCI_ASSIGNCMDKEY\">SCI_ASSIGNCMDKEY(int <a class=\"jump\"\r\n    href=\"#keyDefinition\">keyDefinition</a>, int sciCommand)</b><br />\r\n     This assigns the given key definition to a Scintilla command identified by\r\n    <code class=\"parameter\">sciCommand</code>. <code class=\"parameter\">sciCommand</code> can be any <code>SCI_*</code> command that has\r\n    no arguments.</p>\r\n\r\n    <p><b id=\"SCI_CLEARCMDKEY\">SCI_CLEARCMDKEY(int <a class=\"jump\"\r\n    href=\"#keyDefinition\">keyDefinition</a>)</b><br />\r\n     This makes the given key definition do nothing by assigning the action <code>SCI_NULL</code>\r\n    to it.</p>\r\n\r\n    <p><b id=\"SCI_CLEARALLCMDKEYS\">SCI_CLEARALLCMDKEYS</b><br />\r\n     This command removes all keyboard command mapping by setting an empty mapping table.</p>\r\n\r\n    <p><b id=\"SCI_NULL\">SCI_NULL</b><br />\r\n     The <code>SCI_NULL</code> does nothing and is the value assigned to keys that perform no\r\n    action. SCI_NULL ensures that keys do not propagate to the parent window as that may\r\n    cause focus to move. If you want the standard platform behaviour use the constant 0 instead.</p>\r\n\r\n    <h2 id=\"PopupEditMenu\">Popup edit menu</h2>\r\n\r\n    <code><a class=\"message\" href=\"#SCI_USEPOPUP\">SCI_USEPOPUP(int popUpMode)</a><br />\r\n    </code>\r\n\r\n    <p><b id=\"SCI_USEPOPUP\">SCI_USEPOPUP(int popUpMode)</b><br />\r\n     Clicking the wrong button on the mouse pops up a short default editing menu. This may be\r\n    turned off with <code>SCI_USEPOPUP(SC_POPUP_NEVER)</code>. If you turn it off, context menu commands (in\r\n    Windows, <code>WM_CONTEXTMENU</code>) will not be handled by Scintilla, so the parent of the\r\n    Scintilla window will have the opportunity to handle the message.</p>\r\n\r\n        <table class=\"standard\" summary=\"Display context menu mode\">\r\n          <tbody>\r\n            <tr>\r\n              <th align=\"left\">Symbol</th>\r\n\r\n              <th>Value</th>\r\n\r\n              <th align=\"left\">Meaning</th>\r\n\r\n            </tr>\r\n          </tbody>\r\n\r\n          <tbody valign=\"top\">\r\n            <tr>\r\n              <td align=\"left\"><code>SC_POPUP_NEVER</code></td>\r\n\r\n              <td align=\"center\">0</td>\r\n\r\n              <td>Never show default editing menu.</td>\r\n\r\n            </tr>\r\n\r\n            <tr>\r\n              <td align=\"left\"><code>SC_POPUP_ALL</code></td>\r\n\r\n              <td align=\"center\">1</td>\r\n\r\n              <td>Show default editing menu if clicking on scintilla.</td>\r\n\r\n            </tr>\r\n\r\n            <tr>\r\n              <td align=\"left\"><code>SC_POPUP_TEXT</code></td>\r\n\r\n              <td align=\"center\">2</td>\r\n\r\n              <td>Show default editing menu only if clicking on text area.</td>\r\n\r\n            </tr>\r\n\r\n          </tbody>\r\n        </table>\r\n\r\n    <h2 id=\"MacroRecording\">Macro recording</h2>\r\n\r\n    <p>Start and stop macro recording mode. In macro recording mode, actions are reported to the\r\n    container through <code><a class=\"message\" href=\"#SCN_MACRORECORD\">SCN_MACRORECORD</a></code>\r\n    <a class=\"jump\" href=\"#Notifications\">notifications</a>. It is then up to the container to\r\n    record these actions for future replay.</p>\r\n\r\n    <code><a class=\"message\" href=\"#SCI_STARTRECORD\">SCI_STARTRECORD</a><br />\r\n     <a class=\"message\" href=\"#SCI_STOPRECORD\">SCI_STOPRECORD</a><br />\r\n    </code>\r\n\r\n    <p><b id=\"SCI_STARTRECORD\">SCI_STARTRECORD</b><br />\r\n     <b id=\"SCI_STOPRECORD\">SCI_STOPRECORD</b><br />\r\n     These two messages turn macro recording on and off.</p>\r\n\r\n    <h2 id=\"Printing\">Printing</h2>\r\n\r\n    <p><code>SCI_FORMATRANGE</code> can be used to draw the text onto a display surface\r\n    which can include a printer display surface. Printed output shows text styling as on the\r\n    screen, but it hides all margins except a line number margin.\r\n    Markers do not appear in a margin but will change line background colour.\r\n    The selection and caret are hidden.</p>\r\n\r\n    <p>Different platforms use different display surface ID types to print on. On Windows, these are\r\n    <code>HDC</code>s., on GTK 3.x <code>cairo_t *</code>,\r\n    and on Cocoa <code>CGContextRef</code> is used.</p>\r\n\r\n    <code><a class=\"message\" href=\"#SCI_FORMATRANGE\">SCI_FORMATRANGE(bool draw, Sci_RangeToFormat *fr) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_FORMATRANGEFULL\">SCI_FORMATRANGEFULL(bool draw, Sci_RangeToFormatFull *fr) &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETPRINTMAGNIFICATION\">SCI_SETPRINTMAGNIFICATION(int\r\n    magnification)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETPRINTMAGNIFICATION\">SCI_GETPRINTMAGNIFICATION &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETPRINTCOLOURMODE\">SCI_SETPRINTCOLOURMODE(int mode)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETPRINTCOLOURMODE\">SCI_GETPRINTCOLOURMODE &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETPRINTWRAPMODE\">SCI_SETPRINTWRAPMODE(int wrapMode)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETPRINTWRAPMODE\">SCI_GETPRINTWRAPMODE &rarr; int</a><br />\r\n    </code>\r\n\r\n    <p><b id=\"SCI_FORMATRANGE\">SCI_FORMATRANGE(bool draw, Sci_RangeToFormat *fr) &rarr; position</b><br />\r\n     <b id=\"SCI_FORMATRANGEFULL\">SCI_FORMATRANGEFULL(bool draw, Sci_RangeToFormatFull *fr) &rarr; position</b><br />\r\n     This call renders a range of text into a device context. If you use\r\n    this for printing, you will probably want to arrange a page header and footer; Scintilla does\r\n    not do this for you. See <code>SciTEWin::Print()</code> in <code>SciTEWinDlg.cxx</code> for an\r\n    example. Each use of this message renders a range of text into a rectangular area and returns\r\n    the position in the document of the next character to print.</p>\r\n\r\n    <p><code class=\"parameter\">draw</code> controls if any output is done. Set this to false if you are paginating\r\n    (for example, if you use this with MFC you will need to paginate in\r\n    <code>OnBeginPrinting()</code> before you output each page.\r\n    On 64-bit Win32, <code>SCI_FORMATRANGE</code> is limited to the first 2G of text and <code>SCI_FORMATRANGEFULL</code> removes this limitation.</p>\r\n<pre>\r\nstruct Sci_Rectangle { int left; int top; int right; int bottom; };\r\n\r\nstruct Sci_RangeToFormat {\r\n    Sci_SurfaceID hdc;        // The Surface ID we print to\r\n    Sci_SurfaceID hdcTarget;  // The Surface ID we use for measuring (may be same as hdc)\r\n    Sci_Rectangle rc;         // Rectangle in which to print\r\n    Sci_Rectangle rcPage;     // Physically printable page size\r\n    Sci_CharacterRange chrg;  // Range of characters to print\r\n};\r\n\r\nstruct Sci_RangeToFormatFull {\r\n    Sci_SurfaceID hdc;        // The Surface ID we print to\r\n    Sci_SurfaceID hdcTarget;  // The Surface ID we use for measuring (may be same as hdc)\r\n    Sci_Rectangle rc;         // Rectangle in which to print\r\n    Sci_Rectangle rcPage;     // Physically printable page size\r\n    Sci_CharacterRangeFull chrg;  // Range of characters to print\r\n};\r\n</pre>\r\n\r\n    <p>On Windows, <code>hdc</code> and <code>hdcTarget</code> should both be set to the device context handle\r\n    of the output device (usually a printer). If you print to a metafile these will not be the same\r\n    as Windows metafiles (unlike extended metafiles) do not implement the full API for returning\r\n    information. In this case, set <code>hdcTarget</code> to the screen DC.<br />\r\n     <code>rcPage</code> is the rectangle <code>{0, 0, maxX, maxY}</code> where <code>maxX+1</code>\r\n    and <code>maxY+1</code> are the number of physically printable pixels in x and y.<br />\r\n     <code>rc</code> is the rectangle to render the text in (which will, of course, fit within the\r\n    rectangle defined by rcPage).<br />\r\n     <code>chrg.cpMin</code> and <code>chrg.cpMax</code> define the start position and maximum\r\n    position of characters to output. All of each line within this character range is drawn.</p>\r\n\r\n    <p>On Cocoa, the surface IDs for printing (<code>draw=1</code>) should be the graphics port of the current context\r\n    (<code>(CGContextRef) [[NSGraphicsContext currentContext] graphicsPort]</code>) when the view's drawRect method is called.\r\n    The Surface IDs are not really used for measurement (<code>draw=0</code>) but can be set\r\n    to a bitmap context (created with <code>CGBitmapContextCreate</code>) to avoid runtime warnings.</p>\r\n\r\n    <p>On GTK, the surface IDs to use can be found from the printing context with\r\n    <code>gtk_print_context_get_cairo_context(context)</code>.</p>\r\n\r\n     <p><code>chrg.cpMin</code> and <code>chrg.cpMax</code> define the start position and maximum\r\n    position of characters to output. All of each line within this character range is drawn.</p>\r\n\r\n    <p>When printing, the most tedious part is always working out what the margins should be to\r\n    allow for the non-printable area of the paper and printing a header and footer. If you look at\r\n    the printing code in SciTE, you will find that most of it is taken up with this. The loop that\r\n    causes Scintilla to render text is quite simple if you strip out all the margin, non-printable\r\n    area, header and footer code.</p>\r\n\r\n    <p><b id=\"SCI_SETPRINTMAGNIFICATION\">SCI_SETPRINTMAGNIFICATION(int magnification)</b><br />\r\n     <b id=\"SCI_GETPRINTMAGNIFICATION\">SCI_GETPRINTMAGNIFICATION &rarr; int</b><br />\r\n     <code>SCI_GETPRINTMAGNIFICATION</code> lets you to print at a different size than the screen\r\n    font. <code class=\"parameter\">magnification</code> is the number of points to add to the size of each screen\r\n    font. A value of -3 or -4 gives reasonably small print. You can get this value with\r\n    <code>SCI_GETPRINTMAGNIFICATION</code>.</p>\r\n\r\n    <p><b id=\"SCI_SETPRINTCOLOURMODE\">SCI_SETPRINTCOLOURMODE(int mode)</b><br />\r\n     <b id=\"SCI_GETPRINTCOLOURMODE\">SCI_GETPRINTCOLOURMODE &rarr; int</b><br />\r\n     These two messages set and get the method used to render coloured text on a printer that is\r\n    probably using white paper. It is especially important to consider the treatment of colour if\r\n    you use a dark or black screen background. Printing white on black uses up toner and ink very\r\n    many times faster than the other way around. You can set the mode to one of:</p>\r\n\r\n    <table class=\"standard\" summary=\"Colour printing modes\">\r\n      <tbody>\r\n        <tr>\r\n          <th align=\"left\">Symbol</th>\r\n\r\n          <th>Value</th>\r\n\r\n          <th align=\"left\">Purpose</th>\r\n        </tr>\r\n      </tbody>\r\n\r\n      <tbody valign=\"top\">\r\n        <tr>\r\n          <td align=\"left\"><code>SC_PRINT_NORMAL</code></td>\r\n\r\n          <td align=\"center\">0</td>\r\n\r\n          <td>Print using the current screen colours with the exception of line number margins which print on a white background.\r\n\t\t  This is the default.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>SC_PRINT_INVERTLIGHT</code></td>\r\n\r\n          <td align=\"center\">1</td>\r\n\r\n          <td>If you use a dark screen background this saves ink by inverting the light value of\r\n          all colours and printing on a white background.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>SC_PRINT_BLACKONWHITE</code></td>\r\n\r\n          <td align=\"center\">2</td>\r\n\r\n          <td>Print all text as black on a white background.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>SC_PRINT_COLOURONWHITE</code></td>\r\n\r\n          <td align=\"center\">3</td>\r\n\r\n          <td>Everything prints in its own colour on a white background.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>SC_PRINT_COLOURONWHITEDEFAULTBG</code></td>\r\n\r\n          <td align=\"center\">4</td>\r\n\r\n          <td>Everything prints in its own foreground colour but all styles up to and including STYLE_LINENUMBER will print\r\n\t\t  on a white background.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>SC_PRINT_SCREENCOLOURS</code></td>\r\n\r\n          <td align=\"center\">5</td>\r\n\r\n          <td>Print using the current screen colours for both foreground and background.\r\n\t\t  This is the only mode that does not set the background colour of the line number margin to white.</td>\r\n        </tr>\r\n\r\n      </tbody>\r\n    </table>\r\n\r\n    <p><b id=\"SCI_SETPRINTWRAPMODE\">SCI_SETPRINTWRAPMODE(int wrapMode)</b><br />\r\n     <b id=\"SCI_GETPRINTWRAPMODE\">SCI_GETPRINTWRAPMODE &rarr; int</b><br />\r\n     These two functions get and set the printer wrap mode. <code class=\"parameter\">wrapMode</code> can be\r\n     set to <code>SC_WRAP_NONE</code> (0) or <code>SC_WRAP_WORD</code> (1).\r\n     The default is\r\n     <code>SC_WRAP_WORD</code>, which wraps printed output so that all characters fit\r\n     into the print rectangle. If you set <code>SC_WRAP_NONE</code>, each line of text\r\n     generates one line of output and the line is truncated if it is too long to fit\r\n     into the print area.<br />\r\n     <code>SC_WRAP_WORD</code> tries to wrap only between words as indicated by\r\n     white space or style changes although if a word is longer than a line, it will be wrapped before\r\n     the line end. <br />\r\n     <code>SC_WRAP_CHAR</code> is not supported for printing.</p>\r\n\r\n    <h2 id=\"DirectAccess\">Direct access</h2>\r\n    <code>\r\n     <a class=\"message\" href=\"#SCI_GETDIRECTFUNCTION\">SCI_GETDIRECTFUNCTION &rarr; pointer</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETDIRECTSTATUSFUNCTION\">SCI_GETDIRECTSTATUSFUNCTION &rarr; pointer</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETDIRECTPOINTER\">SCI_GETDIRECTPOINTER &rarr; pointer</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETCHARACTERPOINTER\">SCI_GETCHARACTERPOINTER &rarr; pointer</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETRANGEPOINTER\">SCI_GETRANGEPOINTER(position start, position lengthRange) &rarr; pointer</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETGAPPOSITION\">SCI_GETGAPPOSITION &rarr; position</a><br />\r\n    </code>\r\n\r\n    <p>On Windows, the message-passing scheme used to communicate between the container and\r\n    Scintilla is mediated by the operating system <code>SendMessage</code> function and can lead to\r\n    bad performance when calling intensively. To avoid this overhead, Scintilla provides messages\r\n    that allow you to call the Scintilla message function directly. The code to do this in C/C++ is\r\n    of the form:</p>\r\n<pre>\r\n#include \"Scintilla.h\"\r\nSciFnDirect pSciMsg = (SciFnDirect)SendMessage(hSciWnd, SCI_GETDIRECTFUNCTION, 0, 0);\r\nsptr_t pSciWndData = (sptr_t)SendMessage(hSciWnd, SCI_GETDIRECTPOINTER, 0, 0);\r\n\r\n// now a wrapper to call Scintilla directly\r\nsptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){\r\n    return pSciMsg(pSciWndData, iMessage, wParam, lParam);\r\n}\r\n</pre>\r\n\r\n    <p><code>SciFnDirect</code>, <code>SciFnDirectStatus</code>, <code>sptr_t</code> and <code>uptr_t</code> are declared in\r\n    <code>Scintilla.h</code>. <code class=\"parameter\">hSciWnd</code> is the window handle returned when you created\r\n    the Scintilla window.</p>\r\n\r\n    <p>While faster, this direct calling will cause problems if performed from a different thread\r\n    to the native thread of the Scintilla window in which case <code>SendMessage(hSciWnd, SCI_*,\r\n    wParam, lParam)</code> should be used to synchronize with the window's thread.</p>\r\n\r\n    <p>This feature also works on other platforms but has less impact on speed.</p>\r\n\r\n    <p>On Windows, Scintilla exports a function called\r\n    <code>Scintilla_DirectFunction</code> that can be used the same as the function returned by\r\n    <code>SCI_GETDIRECTFUNCTION</code>. This saves you the call to\r\n    <code>SCI_GETDIRECTFUNCTION</code> and the need to call Scintilla indirectly via the function\r\n    pointer.</p>\r\n\r\n    <p><b id=\"SCI_GETDIRECTFUNCTION\">SCI_GETDIRECTFUNCTION &rarr; pointer</b><br />\r\n     This message returns the address of the function to call to handle Scintilla messages without\r\n    the overhead of passing through the Windows messaging system. You need only call this once,\r\n    regardless of the number of Scintilla windows you create.</p>\r\n\r\n    <p><b id=\"SCI_GETDIRECTSTATUSFUNCTION\">SCI_GETDIRECTSTATUSFUNCTION &rarr; pointer</b><br />\r\n     This is similar to <code>SCI_GETDIRECTFUNCTION</code> but the returned function\r\n     is of type <code>SciFnDirectStatus</code> which also returns the status to the caller through a\r\n     pointer to an int.\r\n     This saves performing an extra call to retrieve the status in many situations so can be faster.</p>\r\n\r\n    <p><b id=\"SCI_GETDIRECTPOINTER\">SCI_GETDIRECTPOINTER &rarr; pointer</b><br />\r\n     This returns a pointer to data that identifies which Scintilla window is in use. You must call\r\n    this once for each Scintilla window you create. When you call the direct function, you must\r\n    pass in the direct pointer associated with the target window.</p>\r\n\r\n    <p><b id=\"SCI_GETCHARACTERPOINTER\">SCI_GETCHARACTERPOINTER &rarr; pointer</b><br />\r\n    <b id=\"SCI_GETRANGEPOINTER\">SCI_GETRANGEPOINTER(position start, position lengthRange) &rarr; pointer</b><br />\r\n    <b id=\"SCI_GETGAPPOSITION\">SCI_GETGAPPOSITION &rarr; position</b><br />\r\n     Grant temporary direct read-only access to the memory used by Scintilla to store\r\n     the document.</p>\r\n     <p><code>SCI_GETCHARACTERPOINTER</code> moves the gap within Scintilla so that the\r\n     text of the document is stored consecutively\r\n     and ensure there is a NUL character after the text, then returns a pointer to the first character.\r\n     Applications may then pass this to a function that accepts a character pointer such as a regular\r\n     expression search or a parser. The pointer should <em>not</em> be written to as that may desynchronize\r\n     the internal state of Scintilla.</p>\r\n     <p>Since any action in Scintilla may change its internal state\r\n     this pointer becomes invalid after any call or by allowing user interface activity. The application\r\n     should reacquire the pointer after making any call to Scintilla or performing any user-interface calls such\r\n     as modifying a progress indicator.</p>\r\n     <p>This call takes similar time to inserting a character at the end of the document and this may\r\n     include moving the document contents. Specifically, all the characters after the document gap\r\n     are moved to before the gap. This compacted state should persist over calls and user interface\r\n     actions that do not change the document contents so reacquiring the pointer afterwards is very\r\n     quick. If this call is used to implement a global replace operation, then each replacement will\r\n     move the gap so if <code>SCI_GETCHARACTERPOINTER</code> is called after\r\n     each replacement then the operation will become O(n^2) rather than O(n). Instead, all\r\n     matches should be found and remembered, then all the replacements performed.</p>\r\n\r\n     <p><code>SCI_GETRANGEPOINTER</code> provides direct access to just the\r\n     range requested. The gap is not moved unless it is within the requested range so this call\r\n     can be faster than <code>SCI_GETCHARACTERPOINTER</code>.\r\n     This can be used by application code that is able to act on blocks of text or ranges of lines.</p>\r\n\r\n     <p><code>SCI_GETGAPPOSITION</code> returns the current gap position.\r\n     This is a hint that applications can use to avoid calling <code>SCI_GETRANGEPOINTER</code>\r\n     with a range that contains the gap and consequent costs of moving the gap.</p>\r\n\r\n    <h2 id=\"MultipleViews\">Multiple views</h2>\r\n\r\n    <p>A Scintilla window and the document that it displays are separate entities. When you create\r\n    a new window, you also create a new, empty document. Each document has a reference count that\r\n    is initially set to 1. The document also has a list of the Scintilla windows that are linked to\r\n    it so when any window changes the document, all other windows in which it appears are notified\r\n    to cause them to update. The system is arranged in this way so that you can work with many\r\n    documents in a single Scintilla window and so you can display a single document in multiple\r\n    windows (for use with splitter windows).</p>\r\n\r\n    <p>These messages use <code>pointer</code> returns and arguments to refer to documents.\r\n    They point to <a class=\"seealso\" href=\"#IDocumentEditable\" style=\"background:#FFB000\">IDocumentEditable</a> objects inside\r\n    Scintilla.\r\n    The <code>IDocumentEditable</code> interface is provisional and may change.\r\n    Client code can call <code>IDocumentEditable</code> methods.\r\n    Clients may just treat these as opaque <code>void*</code> values that are received from and passed to Scintilla without dereferencing.</p>\r\n    <code><a class=\"message\" href=\"#SCI_GETDOCPOINTER\">SCI_GETDOCPOINTER &rarr; pointer</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETDOCPOINTER\">SCI_SETDOCPOINTER(&lt;unused&gt;, pointer doc)</a><br />\r\n     <a class=\"message\" href=\"#SCI_CREATEDOCUMENT\">SCI_CREATEDOCUMENT(position bytes, int documentOptions) &rarr; pointer</a><br />\r\n     <a class=\"message\" href=\"#SCI_ADDREFDOCUMENT\">SCI_ADDREFDOCUMENT(&lt;unused&gt;, pointer doc)</a><br />\r\n     <a class=\"message\" href=\"#SCI_RELEASEDOCUMENT\">SCI_RELEASEDOCUMENT(&lt;unused&gt;, pointer doc)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETDOCUMENTOPTIONS\">SCI_GETDOCUMENTOPTIONS &rarr; int</a><br />\r\n    </code>\r\n\r\n    <p><b id=\"SCI_GETDOCPOINTER\">SCI_GETDOCPOINTER &rarr; pointer</b><br />\r\n     This returns a pointer to the document currently in use by the window. It has no other\r\n    effect.</p>\r\n\r\n    <p><b id=\"SCI_SETDOCPOINTER\">SCI_SETDOCPOINTER(&lt;unused&gt;, pointer doc)</b><br />\r\n     This message does the following:<br />\r\n     1. It removes the current window from the list held by the current document.<br />\r\n     2. It reduces the reference count of the current document by 1.<br />\r\n     3. If the reference count reaches 0, the document is deleted.<br />\r\n     4. <code class=\"parameter\">doc</code> is set as the new document for the window.<br />\r\n     5. If <code class=\"parameter\">doc</code> was 0, a new, empty document is created and attached to the\r\n    window.<br />\r\n     6. If <code class=\"parameter\">doc</code> was not 0, its reference count is increased by 1.</p>\r\n\r\n    <p><b id=\"SCI_CREATEDOCUMENT\">SCI_CREATEDOCUMENT(position bytes, int documentOptions) &rarr; pointer</b><br />\r\n     This message creates a new, empty document and returns a pointer to it. This document is not\r\n     selected into the editor and starts with a reference count of 1. This means that you have\r\n     ownership of it and must either reduce its reference count by 1 after using\r\n    <code>SCI_SETDOCPOINTER</code> so that the Scintilla window owns it or you must make sure that\r\n     you reduce the reference count by 1 with <code>SCI_RELEASEDOCUMENT</code> before you close the\r\n     application to avoid memory leaks. The <code class=\"parameter\">bytes</code> argument determines\r\n     the initial memory allocation for the document as it is more efficient\r\n     to allocate once rather than rely on the buffer growing as data is added.\r\n     If <code>SCI_CREATEDOCUMENT</code> fails then 0 is returned.</p>\r\n\r\n    <p id=\"documentOptions\">The <code class=\"parameter\">documentOptions</code> argument\r\n    chooses between different document capabilities which affect memory allocation and performance with\r\n    <code>SC_DOCUMENTOPTION_DEFAULT</code> (0) choosing standard options.\r\n    <code>SC_DOCUMENTOPTION_STYLES_NONE</code> (0x1) stops allocation of memory to style characters\r\n    which saves significant memory, often 40% with the whole document treated as being style 0.\r\n    Lexers may still produce visual styling by using indicators.\r\n    <span><code>SC_DOCUMENTOPTION_TEXT_LARGE</code> (0x100) accommodates documents larger than 2 GigaBytes\r\n    in 64-bit executables.</span>\r\n    </p>\r\n\r\n    <p>With <code>SC_DOCUMENTOPTION_STYLES_NONE</code>, lexers are still active and may display\r\n    indicators. Some may produce folding information although most require lexical styles to correctly determine folding.\r\n    Its often more efficient to set the null lexer <code>NULL</code> so no lexer is run.\r\n    </p>\r\n\r\n    <p>For many applications lexing documents larger than 4GB will be too sluggish so\r\n    <code>SC_DOCUMENTOPTION_STYLES_NONE</code>\r\n    and the null lexer <code>\"null\"</code> can be used. Another approach is to turn on idle styling with\r\n    <code><a class=\"seealso\" href=\"#SCI_SETIDLESTYLING\">SCI_SETIDLESTYLING</code></a>.\r\n    </p>\r\n\r\n    <table class=\"standard\" summary=\"Document options\">\r\n      <tbody>\r\n        <tr>\r\n          <th align=\"left\">Symbol</th>\r\n          <th align=\"left\">Value</th>\r\n          <th align=\"left\">Effect</th>\r\n        </tr>\r\n      </tbody>\r\n\r\n      <tbody valign=\"top\">\r\n\r\n        <tr>\r\n          <td align=\"left\">SC_DOCUMENTOPTION_DEFAULT</td>\r\n          <td align=\"left\">0</td>\r\n          <td align=\"left\">Standard behaviour</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\">SC_DOCUMENTOPTION_STYLES_NONE</td>\r\n          <td align=\"left\">0x1</td>\r\n          <td align=\"left\">Stop allocation of memory for styles and treat all text as style 0.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\">SC_DOCUMENTOPTION_TEXT_LARGE</td>\r\n          <td align=\"left\">0x100</td>\r\n          <td align=\"left\">Allow document to be larger than 2 GB.</td>\r\n        </tr>\r\n\r\n      </tbody>\r\n    </table>\r\n\r\n    <p><b id=\"SCI_ADDREFDOCUMENT\">SCI_ADDREFDOCUMENT(&lt;unused&gt;, pointer doc)</b><br />\r\n     This increases the reference count of a document by 1. If you want to replace the current\r\n    document in the Scintilla window and take ownership of the current document, for example if you\r\n    are editing many documents in one window, do the following:<br />\r\n     1. Use <code>SCI_GETDOCPOINTER</code> to get a pointer to the document,\r\n    <code class=\"parameter\">doc</code>.<br />\r\n     2. Use <code>SCI_ADDREFDOCUMENT(0, doc)</code> to increment the reference count.<br />\r\n     3. Use <code>SCI_SETDOCPOINTER(0, docNew)</code> to set a different document or\r\n    <code>SCI_SETDOCPOINTER(0, 0)</code> to set a new, empty document.</p>\r\n\r\n    <p><b id=\"SCI_RELEASEDOCUMENT\">SCI_RELEASEDOCUMENT(&lt;unused&gt;, pointer doc)</b><br />\r\n     This message reduces the reference count of the document identified by <code class=\"parameter\">doc</code>. doc\r\n    must be the result of <code>SCI_GETDOCPOINTER</code> or <code>SCI_CREATEDOCUMENT</code> and\r\n    must point at a document that still exists. If you call this on a document with a reference\r\n    count of 1 that is still attached to a Scintilla window, bad things will happen. To keep the\r\n    world spinning in its orbit you must balance each call to <code>SCI_CREATEDOCUMENT</code> or\r\n    <code>SCI_ADDREFDOCUMENT</code> with a call to <code>SCI_RELEASEDOCUMENT</code>.</p>\r\n\r\n    <p><b id=\"SCI_GETDOCUMENTOPTIONS\">SCI_GETDOCUMENTOPTIONS &rarr; int</b><br />\r\n     Returns the options that were used to create the document.</p>\r\n\r\n    <h2 id=\"BackgroundLoadSave\">Background loading and saving</h2>\r\n\r\n    <p>To ensure a responsive user interface, applications may decide to load and save documents using a separate thread\r\n    from the user interface.</p>\r\n\r\n    <h3 id=\"BackgroundLoad\">Loading in the background</h3>\r\n\r\n    <code><a class=\"message\" href=\"#SCI_CREATELOADER\">SCI_CREATELOADER(position bytes, int documentOptions) &rarr; pointer</a><br />\r\n    </code>\r\n\r\n    <p>An application can load all of a file into a buffer it allocates on a background thread and then add the data in that buffer\r\n    into a Scintilla document on the user interface thread. That technique uses extra memory to store a complete copy of the\r\n    file and also means that the time that Scintilla takes to perform initial line end discovery blocks the user interface.</p>\r\n\r\n    <p>To avoid these issues, a loader object may be created and used to load the file. The loader object supports the ILoader interface.</p>\r\n\r\n    <p><b id=\"SCI_CREATELOADER\">SCI_CREATELOADER(position bytes, int documentOptions) &rarr; pointer</b><br />\r\n     Create an object that supports the <code>ILoader</code> interface which can be used to load data and then\r\n     be turned into a Scintilla document object for attachment to a view object.\r\n     The <code class=\"parameter\">bytes</code> argument determines the initial memory allocation for the document as it is more efficient\r\n     to allocate once rather than rely on the buffer growing as data is added.\r\n     If <code>SCI_CREATELOADER</code> fails then 0 is returned.</p>\r\n\r\n    <p>The <code class=\"parameter\">documentOptions</code> argument\r\n    is described in the <a class=\"seealso\" href=\"#documentOptions\"><code>SCI_CREATEDOCUMENT</code></a> section.</p>\r\n\r\n<h4 id=\"ILoader\">ILoader</h4>\r\n\r\n<div class=\"highlighted\">\r\n<span class=\"S5\">class</span><span class=\"S0\"> </span>ILoader<span class=\"S0\"> </span><span class=\"S10\">{</span><br />\r\n<span class=\"S5\">public</span><span class=\"S10\">:</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">int</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>Release<span class=\"S10\">()</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S2\">// Returns a status code from SC_STATUS_*</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">int</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>AddData<span class=\"S10\">(</span><span class=\"S5\">const</span><span class=\"S0\"> </span><span class=\"S5\">char</span><span class=\"S0\"> </span><span class=\"S10\">*</span>data<span class=\"S10\">,</span><span class=\"S0\"> </span>Sci_Position<span class=\"S0\"> </span>length<span class=\"S10\">)</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">void</span><span class=\"S0\"> </span><span class=\"S10\">*</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>ConvertToDocument<span class=\"S10\">()</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S10\">};</span><br />\r\n</div>\r\n\r\n    <p>The application should call the <code>AddData</code> method with each block of data read from the file.\r\n    <code>AddData</code> will return SC_STATUS_OK unless a failure, such as memory exhaustion occurs.\r\n    If a failure occurs in <code>AddData</code> or in a file reading call then loading can be abandoned and the loader released with\r\n    the <code>Release</code> call.\r\n    When the whole file has been read, <code>ConvertToDocument</code> should be called to produce a Scintilla\r\n    document pointer. This pointer can be treated as a <code>void*</code> cookie to pass to other APIs or cast to a\r\n    <a class=\"seealso\" href=\"#IDocumentEditable\" style=\"background:#FFB000\">IDocumentEditable*</a> pointer.\r\n    The newly created document will have a reference count of 1 in the same way as a document pointer\r\n    returned from\r\n    <a class=\"seealso\" href=\"#SCI_CREATEDOCUMENT\">SCI_CREATEDOCUMENT</a>.\r\n    There is no need to call <code>Release</code> after <code>ConvertToDocument</code>.</p>\r\n\r\n    <h3 id=\"BackgroundSave\">Saving in the background</h3>\r\n\r\n    <p>An application that wants to save in the background should lock the document with <code>SCI_SETREADONLY(1)</code>\r\n    to prevent modifications and retrieve a pointer to the unified document contents with\r\n    <a class=\"seealso\" href=\"#SCI_GETCHARACTERPOINTER\">SCI_GETCHARACTERPOINTER</a>.\r\n    The buffer of a locked document will not move so the pointer is valid until the application calls <code>SCI_SETREADONLY(0)</code>.</p>\r\n\r\n    <p>If the user tries to performs a modification while the document is locked then a <code><a class=\"message\"\r\n    href=\"#SCN_MODIFYATTEMPTRO\">SCN_MODIFYATTEMPTRO</a></code> notification is sent to the application.\r\n    The application may then decide to ignore the modification or to terminate the background saving thread and reenable\r\n    modification before returning from the notification.</p>\r\n\r\n   <h2 id=\"DocumentInterface\" class=\"provisional\">Document interface</h2>\r\n\r\n    <p>Applications may want to manipulate documents that are not visible and the provisional <code>IDocumentEditable</code>\r\n    interface can be used for this.</p>\r\n\r\n    <p><code>IDocumentEditable</code> allows more direct access to functionality and is faster than calling Scintilla APIs.</p>\r\n\r\n    <p><code>IDocumentEditable</code> pointers are returned by\r\n    <a class=\"seealso\" href=\"#SCI_CREATEDOCUMENT\">SCI_CREATEDOCUMENT</a>,\r\n    <a class=\"seealso\" href=\"#SCI_GETDOCPOINTER\">SCI_GETDOCPOINTER</a>, and\r\n    <a class=\"seealso\" href=\"#ILoader\">ILoader::ConvertToDocument</a>.</p>\r\n\r\n    <p>They may be passed to\r\n    <a class=\"seealso\" href=\"#SCI_ADDREFDOCUMENT\">SCI_ADDREFDOCUMENT</a>,\r\n    <a class=\"seealso\" href=\"#SCI_RELEASEDOCUMENT\">SCI_RELEASEDOCUMENT</a>, and\r\n    <a class=\"seealso\" href=\"#SCI_SETDOCPOINTER\">SCI_SETDOCPOINTER</a>,\r\n    .</p>\r\n\r\n<h4 id=\"IDocumentEditable\">IDocumentEditable</h4>\r\n\r\n<div class=\"highlighted\" style=\"background:#FFD270;border: 1px solid #FFBB00\">\r\n<span><span class=\"S5\">class</span><span class=\"S0\"> </span>IDocumentEditable<span class=\"S0\"> </span><span class=\"S10\">{</span><br />\r\n<span class=\"S5\">public</span><span class=\"S10\">:</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S2\">// Allow this interface to add methods over time and discover whether new methods available.</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">int</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>DEVersion<span class=\"S10\">()</span><span class=\"S0\"> </span><span class=\"S5\">const</span><span class=\"S0\"> </span><span class=\"S5\">noexcept</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S2\">// Lifetime control</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">int</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>AddRef<span class=\"S10\">()</span><span class=\"S0\"> </span><span class=\"S5\">noexcept</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">int</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>Release<span class=\"S10\">()</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S10\">};</span><br />\r\n<span class=\"S0\"></span></span>\r\n</div>\r\n\r\n    <p>The <code>IDocumentEditable</code> interface is being developed and more methods will be added in the future.\r\n    Its also possible that methods will change signatures or be removed.\r\n    Thus the feature is provisional and users should be aware that they may have to modify client code in response to these changes.</p>\r\n\r\n    <p><code>DEVersion</code> will return 0 while <code>IDocumentEditable</code> is provisional and will return 1\r\n    for the first stable release. After that, it will be incremented when new methods are added.</p>\r\n\r\n    <h2 id=\"Folding\">Folding</h2>\r\n\r\n    <p>The fundamental operation in folding is making lines invisible or visible. Line visibility\r\n    is a property of the view rather than the document so each view may be displaying a different\r\n    set of lines. From the point of view of the user, lines are hidden and displayed using fold\r\n    points. Generally, the fold points of a document are based on the hierarchical structure of the\r\n    document contents. In Python, the hierarchy is determined by indentation and in C++ by brace\r\n    characters. This hierarchy can be represented within a Scintilla document object by attaching a\r\n    numeric \"fold level\" to each line. The fold level is most easily set by a lexer, but you can\r\n    also set it with messages.</p>\r\n\r\n    <p>It is up to your code to set the connection between user actions and folding and unfolding.\r\n    The best way to see how this is done is to search the SciTE source code for the messages used\r\n    in this section of the documentation and see how they are used. You will also need to use\r\n    markers and a folding margin to complete your folding implementation.\r\n    The <code>\"fold\"</code> property should be set to <code>\"1\"</code> with\r\n    <code>SCI_SETPROPERTY(\"fold\", \"1\")</code> to enable folding. </p>\r\n    <code><a class=\"message\" href=\"#SCI_VISIBLEFROMDOCLINE\">SCI_VISIBLEFROMDOCLINE(line docLine) &rarr; line</a><br />\r\n     <a class=\"message\" href=\"#SCI_DOCLINEFROMVISIBLE\">SCI_DOCLINEFROMVISIBLE(line displayLine) &rarr; line</a><br />\r\n     <a class=\"message\" href=\"#SCI_SHOWLINES\">SCI_SHOWLINES(line lineStart, line lineEnd)</a><br />\r\n     <a class=\"message\" href=\"#SCI_HIDELINES\">SCI_HIDELINES(line lineStart, line lineEnd)</a><br />\r\n     <a class=\"element\" href=\"#SC_ELEMENT_HIDDEN_LINE\">SC_ELEMENT_HIDDEN_LINE : colouralpha</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETLINEVISIBLE\">SCI_GETLINEVISIBLE(line line) &rarr; bool</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETALLLINESVISIBLE\">SCI_GETALLLINESVISIBLE &rarr; bool</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETFOLDLEVEL\">SCI_SETFOLDLEVEL(line line, int level)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETFOLDLEVEL\">SCI_GETFOLDLEVEL(line line) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETAUTOMATICFOLD\">SCI_SETAUTOMATICFOLD(int automaticFold)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETAUTOMATICFOLD\">SCI_GETAUTOMATICFOLD &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETFOLDFLAGS\">SCI_SETFOLDFLAGS(int flags)</a><br />\r\n     <a class=\"element\" href=\"#SC_ELEMENT_FOLD_LINE\">SC_ELEMENT_FOLD_LINE : colouralpha</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETLASTCHILD\">SCI_GETLASTCHILD(line line, int level) &rarr; line</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETFOLDPARENT\">SCI_GETFOLDPARENT(line line) &rarr; line</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETFOLDEXPANDED\">SCI_SETFOLDEXPANDED(line line, bool\r\n    expanded)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETFOLDEXPANDED\">SCI_GETFOLDEXPANDED(line line) &rarr; bool</a><br />\r\n     <a class=\"message\" href=\"#SCI_CONTRACTEDFOLDNEXT\">SCI_CONTRACTEDFOLDNEXT(line lineStart) &rarr; line</a><br />\r\n     <a class=\"message\" href=\"#SCI_TOGGLEFOLD\">SCI_TOGGLEFOLD(line line)</a><br />\r\n     <a class=\"message\" href=\"#SCI_TOGGLEFOLDSHOWTEXT\">SCI_TOGGLEFOLDSHOWTEXT(line line, const char *text)</a><br />\r\n     <a class=\"message\" href=\"#SCI_FOLDDISPLAYTEXTSETSTYLE\">SCI_FOLDDISPLAYTEXTSETSTYLE(int style)</a><br />\r\n     <a class=\"message\" href=\"#SCI_FOLDDISPLAYTEXTGETSTYLE\">SCI_FOLDDISPLAYTEXTGETSTYLE &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETDEFAULTFOLDDISPLAYTEXT\">SCI_SETDEFAULTFOLDDISPLAYTEXT(&lt;unused&gt;, const char *text)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETDEFAULTFOLDDISPLAYTEXT\">SCI_GETDEFAULTFOLDDISPLAYTEXT(&lt;unused&gt;, char *text) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_FOLDLINE\">SCI_FOLDLINE(line line, int action)</a><br />\r\n     <a class=\"message\" href=\"#SCI_FOLDCHILDREN\">SCI_FOLDCHILDREN(line line, int action)</a><br />\r\n     <a class=\"message\" href=\"#SCI_FOLDALL\">SCI_FOLDALL(int action)</a><br />\r\n     <a class=\"message\" href=\"#SCI_EXPANDCHILDREN\">SCI_EXPANDCHILDREN(line line, int level)</a><br />\r\n     <a class=\"message\" href=\"#SCI_ENSUREVISIBLE\">SCI_ENSUREVISIBLE(line line)</a><br />\r\n     <a class=\"message\" href=\"#SCI_ENSUREVISIBLEENFORCEPOLICY\">SCI_ENSUREVISIBLEENFORCEPOLICY(line\r\n    line)</a><br />\r\n    </code>\r\n\r\n    <p><b id=\"SCI_VISIBLEFROMDOCLINE\">SCI_VISIBLEFROMDOCLINE(line docLine) &rarr; line</b><br />\r\n     When some lines are hidden and/or annotations are displayed, then a particular line in the\r\n     document may be displayed at a\r\n    different position to its document position. If no lines are hidden and there are no annotations,\r\n    this message returns\r\n    <code class=\"parameter\">docLine</code>. Otherwise, this returns the display line (counting the very first visible\r\n    line as 0). The display line of an invisible line is the same as the previous visible line. The\r\n    display line number of the first line in the document is 0. If lines are hidden and\r\n    <code class=\"parameter\">docLine</code> is outside the range of lines in the document, the return value is -1.\r\n    Lines can occupy more than one display line if they wrap.</p>\r\n\r\n    <p><b id=\"SCI_DOCLINEFROMVISIBLE\">SCI_DOCLINEFROMVISIBLE(line displayLine) &rarr; line</b><br />\r\n     When some lines are hidden and/or annotations are displayed, then a particular line in the\r\n     document may be displayed at a\r\n    different position to its document position. This message returns the document line number that\r\n    corresponds to a display line (counting the display line of the first line in the document as\r\n    0). If <code class=\"parameter\">displayLine</code> is less than or equal to 0, the result is 0. If\r\n    <code class=\"parameter\">displayLine</code> is greater than or equal to the number of displayed lines, the result\r\n    is the number of lines in the document.</p>\r\n\r\n    <p><b id=\"SCI_SHOWLINES\">SCI_SHOWLINES(line lineStart, line lineEnd)</b><br />\r\n     <b id=\"SCI_HIDELINES\">SCI_HIDELINES(line lineStart, line lineEnd)</b><br />\r\n     <b id=\"SC_ELEMENT_HIDDEN_LINE\">SC_ELEMENT_HIDDEN_LINE : colouralpha</b><br />\r\n     <b id=\"SCI_GETLINEVISIBLE\">SCI_GETLINEVISIBLE(line line) &rarr; bool</b><br />\r\n     <b id=\"SCI_GETALLLINESVISIBLE\">SCI_GETALLLINESVISIBLE &rarr; bool</b><br />\r\n     The first two messages mark a range of lines as visible or invisible and then redraw the\r\n    display.\r\n    If <a class=\"element\" href=\"#SCI_SETELEMENTCOLOUR\"><code>SC_ELEMENT_HIDDEN_LINE</code></a>\r\n    is set then a horizontal line is drawn in that colour to indicate that there are hidden lines.\r\n    A fold line drawn in that position overrides the hidden line indicator.\r\n    <code>SCI_GETLINEVISIBLE</code> reports on the visible state of a line and returns 1 if it is\r\n    visible and 0 if it is not visible.\r\n    <code>SCI_GETALLLINESVISIBLE</code> returns 1 if all lines are visible and 0\r\n    if some lines are hidden.\r\n    These messages have no effect on fold levels or fold flags.</p>\r\n\r\n    <p><b id=\"SCI_SETFOLDLEVEL\">SCI_SETFOLDLEVEL(line line, int level)</b><br />\r\n     <b id=\"SCI_GETFOLDLEVEL\">SCI_GETFOLDLEVEL(line line) &rarr; int</b><br />\r\n     These two messages set and get a 32-bit value that contains the fold level of a line and some\r\n    flags associated with folding. The fold level is a number in the range 0 to\r\n    <code>SC_FOLDLEVELNUMBERMASK</code> (0x0FFF). However, the initial fold level is set to\r\n    <code>SC_FOLDLEVELBASE</code> (0x400) to allow unsigned arithmetic on folding levels. There are\r\n    two addition flag bits. <code>SC_FOLDLEVELWHITEFLAG</code> indicates that the line is blank and\r\n    allows it to be treated slightly different then its level may indicate. For example, blank\r\n    lines should generally not be fold points and will be considered part of the preceding section even though\r\n    they may have a lesser fold level.\r\n    <code>SC_FOLDLEVELHEADERFLAG</code> indicates that the line is a header (fold point).\r\n    <code>SC_FOLDLEVELNONE</code> is a default level that may occur before folding.\r\n    </p>\r\n\r\n    <p>Use <code>SCI_GETFOLDLEVEL(line) &amp; SC_FOLDLEVELNUMBERMASK</code> to get the fold level\r\n    of a line. Likewise, use <code>SCI_GETFOLDLEVEL(line) &amp; SC_FOLDLEVEL*FLAG</code> to get the\r\n    state of the flags. To set the fold level you must or in the associated flags. For instance, to\r\n    set the level to <code>thisLevel</code> and mark a line as being a fold point use:\r\n    <code>SCI_SETFOLDLEVEL(line, thisLevel | SC_FOLDLEVELHEADERFLAG)</code>.</p>\r\n    If you use a lexer, you should not need to use <code>SCI_SETFOLDLEVEL</code> as this is far\r\n    better handled by the lexer. You will need to use <code>SCI_GETFOLDLEVEL</code> to decide how\r\n    to handle user folding requests. If you do change the fold levels, the folding margin will\r\n    update to match your changes.\r\n\r\n    <p><b id=\"SCI_SETFOLDFLAGS\">SCI_SETFOLDFLAGS(int flags)</b><br />\r\n     <b id=\"SC_ELEMENT_FOLD_LINE\">SC_ELEMENT_FOLD_LINE : colouralpha</b><br />\r\n     In addition to showing markers in the folding margin, you can indicate folds to the user by\r\n    drawing lines in the text area.\r\n    The lines are drawn in the <a class=\"element\" href=\"#SCI_SETELEMENTCOLOUR\"><code>SC_ELEMENT_FOLD_LINE</code></a>\r\n    colour if set.\r\n    If it is not set then the foreground colour set for <a\r\n    class=\"message\" href=\"#StyleDefinition\"><code>STYLE_DEFAULT</code></a> is used.\r\n    Bits set in\r\n    <code class=\"parameter\">flags</code> determine where folding lines are drawn:<br />\r\n    </p>\r\n\r\n    <table class=\"standard\" summary=\"Fold flags\">\r\n      <tbody>\r\n        <tr>\r\n          <th align=\"left\">Symbol</th>\r\n          <th align=\"left\">Value</th>\r\n          <th align=\"left\">Effect</th>\r\n        </tr>\r\n      </tbody>\r\n\r\n      <tbody valign=\"top\">\r\n        <tr>\r\n          <td align=\"left\">SC_FOLDFLAG_NONE</td>\r\n          <td align=\"left\">0</td>\r\n          <td align=\"left\">Default value.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"></td>\r\n          <td align=\"left\">1</td>\r\n          <td align=\"left\">Experimental feature that has been removed.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\">SC_FOLDFLAG_LINEBEFORE_EXPANDED</td>\r\n          <td align=\"left\">2</td>\r\n          <td align=\"left\">Draw above if expanded</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\">SC_FOLDFLAG_LINEBEFORE_CONTRACTED</td>\r\n          <td align=\"left\">4</td>\r\n          <td align=\"left\">Draw above if not expanded</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\">SC_FOLDFLAG_LINEAFTER_EXPANDED</td>\r\n          <td align=\"left\">8</td>\r\n          <td align=\"left\">Draw below if expanded</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\">SC_FOLDFLAG_LINEAFTER_CONTRACTED</td>\r\n          <td align=\"left\">16</td>\r\n          <td align=\"left\">Draw below if not expanded</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\">SC_FOLDFLAG_LEVELNUMBERS</td>\r\n          <td align=\"left\">64</td>\r\n          <td align=\"left\">Display hexadecimal fold levels in line margin to aid debugging of\r\n          folding. The appearance of this feature may change in the future.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\">SC_FOLDFLAG_LINESTATE</td>\r\n          <td align=\"left\">128</td>\r\n          <td align=\"left\">Display hexadecimal line state in line margin to aid debugging of lexing and folding.\r\n\t  May not be used at the same time as <code>SC_FOLDFLAG_LEVELNUMBERS</code>.</td>\r\n        </tr>\r\n      </tbody>\r\n    </table>\r\n\r\n    <p>This message causes the display to redraw.</p>\r\n\r\n    <p><b id=\"SCI_GETLASTCHILD\">SCI_GETLASTCHILD(line line, int level) &rarr; line</b><br />\r\n     This message searches for the next line after <code class=\"parameter\">line</code>, that has a folding level\r\n    that is less than or equal to <code class=\"parameter\">level</code> and then returns the previous line number. If\r\n    you set <code class=\"parameter\">level</code> to -1, <code class=\"parameter\">level</code> is set to the folding level of line\r\n    <code class=\"parameter\">line</code>. If <code>from</code> is a fold point, <code>SCI_GETLASTCHILD(from,\r\n    -1)</code> returns the last line that would be in made visible or hidden by toggling the fold\r\n    state.</p>\r\n\r\n    <p><b id=\"SCI_GETFOLDPARENT\">SCI_GETFOLDPARENT(line line) &rarr; line</b><br />\r\n     This message returns the line number of the first line before <code class=\"parameter\">line</code> that is\r\n    marked as a fold point with <code>SC_FOLDLEVELHEADERFLAG</code> and has a fold level less than\r\n    the <code class=\"parameter\">line</code>. If no line is found, or if the header flags and fold levels are\r\n    inconsistent, the return value is -1.</p>\r\n\r\n    <p><b id=\"SCI_TOGGLEFOLD\">SCI_TOGGLEFOLD(line line)</b><br />\r\n    <b id=\"SCI_TOGGLEFOLDSHOWTEXT\">SCI_TOGGLEFOLDSHOWTEXT(line line, const char *text)</b><br />\r\n     Each fold point may be either expanded, displaying all its child lines, or contracted, hiding\r\n    all the child lines. These messages toggle the folding state of the given line as long as it has\r\n    the <code>SC_FOLDLEVELHEADERFLAG</code> set. These messages take care of folding or expanding\r\n    all the lines that depend on the line. The display updates after this message.</p>\r\n    <p>An optional text tag may be shown to the right of the folded text with the\r\n    <code class=\"parameter\">text</code> argument to\r\n    <code>SCI_TOGGLEFOLDSHOWTEXT</code>.\r\n    The default text for all header lines can be set with <code><a class=\"seealso\" href=\"#SCI_SETDEFAULTFOLDDISPLAYTEXT\">SCI_SETDEFAULTFOLDDISPLAYTEXT</a></code>.\r\n    The text is drawn with the\r\n    <code><a class=\"message\" href=\"#StyleDefinition\">STYLE_FOLDDISPLAYTEXT</a></code> style.</p>\r\n\r\n    <p><b id=\"SCI_FOLDDISPLAYTEXTSETSTYLE\">SCI_FOLDDISPLAYTEXTSETSTYLE(int style)</b><br />\r\n    <b id=\"SCI_FOLDDISPLAYTEXTGETSTYLE\">SCI_FOLDDISPLAYTEXTGETSTYLE &rarr; int</b><br />\r\n    These message changes the appearance of fold text tags.</p>\r\n    <table class=\"standard\" summary=\"Fold flags\">\r\n      <tbody>\r\n        <tr>\r\n          <th align=\"left\">Symbol</th>\r\n          <th align=\"left\">Value</th>\r\n          <th align=\"left\">Effect</th>\r\n        </tr>\r\n      </tbody>\r\n\r\n      <tbody valign=\"top\">\r\n        <tr>\r\n          <td align=\"left\">SC_FOLDDISPLAYTEXT_HIDDEN</td>\r\n          <td align=\"left\">0</td>\r\n          <td align=\"left\">Do not display the text tags. This is the default.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\">SC_FOLDDISPLAYTEXT_STANDARD</td>\r\n          <td align=\"left\">1</td>\r\n          <td align=\"left\">Display the text tags.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\">SC_FOLDDISPLAYTEXT_BOXED</td>\r\n          <td align=\"left\">2</td>\r\n          <td align=\"left\">Display the text tags with a box drawn around them.</td>\r\n        </tr>\r\n\r\n      </tbody>\r\n    </table>\r\n\r\n    <p><b id=\"SCI_SETDEFAULTFOLDDISPLAYTEXT\">SCI_SETDEFAULTFOLDDISPLAYTEXT(&lt;unused&gt;, const char *text)</b><br />\r\n     <b id=\"SCI_GETDEFAULTFOLDDISPLAYTEXT\">SCI_GETDEFAULTFOLDDISPLAYTEXT(&lt;unused&gt;, char *text) &rarr; int</b><br />\r\n     These messages set and get the default text displayed at the right of the folded text.</p>\r\n\r\n    <p><b id=\"SCI_SETFOLDEXPANDED\">SCI_SETFOLDEXPANDED(line line, bool expanded)</b><br />\r\n     <b id=\"SCI_GETFOLDEXPANDED\">SCI_GETFOLDEXPANDED(line line) &rarr; bool</b><br />\r\n     These messages set and get the expanded state of a single line. The set message has no effect\r\n    on the visible state of the line or any lines that depend on it. It does change the markers in\r\n    the folding margin. If you ask for the expansion state of a line that is outside the document,\r\n    the result is <code>false</code> (0).</p>\r\n\r\n    <p>If you just want to toggle the fold state of one line and handle all the lines that are\r\n    dependent on it, it is much easier to use <code>SCI_TOGGLEFOLD</code>. You would use the\r\n    <code>SCI_SETFOLDEXPANDED</code> message to process many folds without updating the display\r\n    until you had finished. See <code>SciTEBase::FoldAll()</code> and\r\n    <code>SciTEBase::Expand()</code> for examples of the use of these messages.</p>\r\n\r\n    <p><b id=\"SCI_FOLDLINE\">SCI_FOLDLINE(line line, int action)</b><br />\r\n    <b id=\"SCI_FOLDCHILDREN\">SCI_FOLDCHILDREN(line line, int action)</b><br />\r\n    <b id=\"SCI_FOLDALL\">SCI_FOLDALL(int action)</b><br />\r\n    These messages provide a higher-level approach to folding instead of setting expanded flags and showing\r\n    or hiding individual lines.</p>\r\n    <p>An individual fold can be contracted/expanded/toggled with <code>SCI_FOLDLINE</code>.\r\n    To affect all child folds as well call <code>SCI_FOLDCHILDREN</code>.</p>\r\n    <p>To affect the entire document call <code>SCI_FOLDALL</code>. With <code>SC_FOLDACTION_TOGGLE</code>\r\n    the first fold header in the document is examined to decide whether to expand or contract.\r\n    </p>\r\n    <table class=\"standard\" summary=\"Fold flags\">\r\n      <tbody>\r\n        <tr>\r\n          <th align=\"left\">Symbol</th>\r\n          <th align=\"left\">Value</th>\r\n          <th align=\"left\">Effect</th>\r\n        </tr>\r\n      </tbody>\r\n\r\n      <tbody valign=\"top\">\r\n        <tr>\r\n          <td align=\"left\">SC_FOLDACTION_CONTRACT</td>\r\n          <td align=\"left\">0</td>\r\n          <td align=\"left\">Contract.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\">SC_FOLDACTION_EXPAND</td>\r\n          <td align=\"left\">1</td>\r\n          <td align=\"left\">Expand.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\">SC_FOLDACTION_TOGGLE</td>\r\n          <td align=\"left\">2</td>\r\n          <td align=\"left\">Toggle between contracted and expanded.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\">SC_FOLDACTION_CONTRACT_EVERY_LEVEL</td>\r\n          <td align=\"left\">4</td>\r\n          <td align=\"left\">Used for SCI_FOLDALL only, can be combined with SC_FOLDACTION_CONTRACT or SC_FOLDACTION_TOGGLE to contract all levels instead of only top-level.</td>\r\n        </tr>\r\n\r\n      </tbody>\r\n    </table>\r\n\r\n    <p><b id=\"SCI_EXPANDCHILDREN\">SCI_EXPANDCHILDREN(line line, int level)</b><br />\r\n    This is used to respond to a change to a line causing its fold level or whether it is a header to change,\r\n    perhaps when adding or removing a '{'.</p>\r\n    <p>By the time the container has received the notification that the line has changed,\r\n    the fold level has already been set, so the container has to use the previous level in this call\r\n    so that any range hidden underneath this line can be shown.\r\n    </p>\r\n\r\n    <p><b id=\"SCI_SETAUTOMATICFOLD\">SCI_SETAUTOMATICFOLD(int automaticFold)</b><br />\r\n    <b id=\"SCI_GETAUTOMATICFOLD\">SCI_GETAUTOMATICFOLD &rarr; int</b><br />\r\n    Instead of implementing all the logic for handling folding in the container, Scintilla can provide behaviour\r\n    that is adequate for many applications. The <code class=\"parameter\">automaticFold</code> argument is a bit set defining\r\n    which of the 3 pieces of folding implementation should be enabled. Most applications should be able to use the\r\n    <code>SC_AUTOMATICFOLD_SHOW</code> and <code>SC_AUTOMATICFOLD_CHANGE</code>\r\n    flags unless they wish to implement quite different behaviour such as defining their own fold structure.\r\n    <code>SC_AUTOMATICFOLD_CLICK</code> is more likely to be set off when an application would\r\n    like to add or change click behaviour such as showing method headers only when Shift+Alt is used in\r\n    conjunction with a click.\r\n    </p>\r\n    <table class=\"standard\" summary=\"Fold flags\">\r\n      <tbody>\r\n        <tr>\r\n          <th align=\"left\">Symbol</th>\r\n          <th align=\"left\">Value</th>\r\n          <th align=\"left\">Effect</th>\r\n        </tr>\r\n      </tbody>\r\n\r\n      <tbody valign=\"top\">\r\n        <tr>\r\n          <td align=\"left\">SC_AUTOMATICFOLD_NONE</td>\r\n          <td align=\"left\">0</td>\r\n          <td align=\"left\">Value with no automatic behaviour.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\">SC_AUTOMATICFOLD_SHOW</td>\r\n          <td align=\"left\">1</td>\r\n          <td align=\"left\">Automatically show lines as needed.\r\n          This avoids sending the <code>SCN_NEEDSHOWN</code> notification.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\">SC_AUTOMATICFOLD_CLICK</td>\r\n          <td align=\"left\">2</td>\r\n          <td align=\"left\">Handle clicks in fold margin automatically.\r\n          This avoids sending the <code>SCN_MARGINCLICK</code> notification for folding margins.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\">SC_AUTOMATICFOLD_CHANGE</td>\r\n          <td align=\"left\">4</td>\r\n          <td align=\"left\">Show lines as needed when fold structure is changed.\r\n          The <code>SCN_MODIFIED</code> notification is still sent unless it is disabled by the\r\n          container.</td>\r\n        </tr>\r\n\r\n      </tbody>\r\n    </table>\r\n\r\n    <p><b id=\"SCI_CONTRACTEDFOLDNEXT\">SCI_CONTRACTEDFOLDNEXT(line lineStart) &rarr; line</b><br />\r\n     Search efficiently for lines that are contracted fold headers.\r\n     This is useful when saving the user's folding when switching documents or saving folding with a file.\r\n     The search starts at line number <code class=\"parameter\">lineStart</code> and continues forwards to the end of the file.\r\n     <code class=\"parameter\">lineStart</code> is returned if it is a contracted fold header otherwise the next contracted\r\n     fold header is returned. If there are no more contracted fold headers then -1 is returned.</p>\r\n\r\n    <p><b id=\"SCI_ENSUREVISIBLE\">SCI_ENSUREVISIBLE(line line)</b><br />\r\n     <b id=\"SCI_ENSUREVISIBLEENFORCEPOLICY\">SCI_ENSUREVISIBLEENFORCEPOLICY(line line)</b><br />\r\n     A line may be hidden because more than one of its parent lines is contracted. Both these\r\n    message travels up the fold hierarchy, expanding any contracted folds until they reach the top\r\n    level. The line will then be visible. If you use <code>SCI_ENSUREVISIBLEENFORCEPOLICY</code>,\r\n    the vertical caret policy set by <a class=\"message\"\r\n    href=\"#SCI_SETVISIBLEPOLICY\"><code>SCI_SETVISIBLEPOLICY</code></a> is then applied.</p>\r\n\r\n    <h2 id=\"LineWrapping\">Line wrapping</h2>\r\n\r\n    <code><a class=\"message\" href=\"#SCI_SETWRAPMODE\">SCI_SETWRAPMODE(int wrapMode)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETWRAPMODE\">SCI_GETWRAPMODE &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETWRAPVISUALFLAGS\">SCI_SETWRAPVISUALFLAGS(int wrapVisualFlags)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETWRAPVISUALFLAGS\">SCI_GETWRAPVISUALFLAGS &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETWRAPVISUALFLAGSLOCATION\">SCI_SETWRAPVISUALFLAGSLOCATION(int wrapVisualFlagsLocation)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETWRAPVISUALFLAGSLOCATION\">SCI_GETWRAPVISUALFLAGSLOCATION &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETWRAPINDENTMODE\">SCI_SETWRAPINDENTMODE(int wrapIndentMode)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETWRAPINDENTMODE\">SCI_GETWRAPINDENTMODE &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETWRAPSTARTINDENT\">SCI_SETWRAPSTARTINDENT(int indent)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETWRAPSTARTINDENT\">SCI_GETWRAPSTARTINDENT &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETLAYOUTCACHE\">SCI_SETLAYOUTCACHE(int cacheMode)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETLAYOUTCACHE\">SCI_GETLAYOUTCACHE &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETPOSITIONCACHE\">SCI_SETPOSITIONCACHE(int size)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETPOSITIONCACHE\">SCI_GETPOSITIONCACHE &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETLAYOUTTHREADS\">SCI_SETLAYOUTTHREADS(int threads)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETLAYOUTTHREADS\">SCI_GETLAYOUTTHREADS &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_LINESSPLIT\">SCI_LINESSPLIT(int pixelWidth)</a><br />\r\n     <a class=\"message\" href=\"#SCI_LINESJOIN\">SCI_LINESJOIN</a><br />\r\n     <a class=\"message\" href=\"#SCI_WRAPCOUNT\">SCI_WRAPCOUNT(line docLine) &rarr; line</a><br />\r\n    </code>\r\n\r\n    <p>By default, Scintilla does not wrap lines of text. If you enable line wrapping, lines wider\r\n    than the window width are continued on the following lines. Lines are broken after space or tab\r\n    characters or between runs of different styles. If this is not possible because a word in one\r\n    style is wider than the window then the break occurs after the last character that completely\r\n    fits on the line. The horizontal scroll bar does not appear when wrap mode is on.</p>\r\n\r\n        <p>For wrapped lines Scintilla can draw visual flags (little arrows) at end of a a subline of a\r\n        wrapped line and at begin of the next subline. These can be enabled individually, but if Scintilla\r\n        draws the visual flag at the beginning of the next subline this subline will be indented by one char.\r\n        Independent from drawing a visual flag at the begin the subline can have an indention.</p>\r\n\r\n    <p>Much of the time used by Scintilla is spent on laying out and drawing text. The same text\r\n    layout calculations may be performed many times even when the data used in these calculations\r\n    does not change. To avoid these unnecessary calculations in some circumstances, the line layout\r\n    cache can store the results of the calculations. The cache is invalidated whenever the\r\n    underlying data, such as the contents or styling of the document changes. Caching the layout of\r\n    the whole document has the most effect, making dynamic line wrap as much as 20 times faster but\r\n    this requires 7 times the memory required by the document contents plus around 80 bytes per\r\n    line.</p>\r\n\r\n    <p>Wrapping is not performed immediately there is a change but is delayed until the display\r\n    is redrawn. This delay improves performance by allowing a set of changes to be performed\r\n    and then wrapped and displayed once. Because of this, some operations may not occur as\r\n    expected. If a file is read and the scroll position moved to a particular line in the text,\r\n    such as occurs when a container tries to restore a previous editing session, then\r\n    the scroll position will have been determined before wrapping so an unexpected range\r\n    of text will be displayed. To scroll to the position correctly, delay the scroll until the\r\n    wrapping has been performed by waiting for an initial\r\n    <a class=\"message\" href=\"#SCN_PAINTED\">SCN_PAINTED</a> notification.</p>\r\n\r\n    <p><b id=\"SCI_SETWRAPMODE\">SCI_SETWRAPMODE(int wrapMode)</b><br />\r\n     <b id=\"SCI_GETWRAPMODE\">SCI_GETWRAPMODE &rarr; int</b><br />\r\n     Set wrapMode to <code>SC_WRAP_WORD</code> (1) to enable wrapping\r\n     on word or style boundaries, <code>SC_WRAP_CHAR</code> (2) to enable wrapping\r\n     between any characters, <code>SC_WRAP_WHITESPACE</code> (3) to enable\r\n     wrapping on whitespace, and <code>SC_WRAP_NONE</code> (0) to disable line\r\n     wrapping. <code>SC_WRAP_CHAR</code> is preferred for Asian languages where\r\n     there is no white space between words.\r\n    </p>\r\n\r\n\r\n    <p><b id=\"SCI_SETWRAPVISUALFLAGS\">SCI_SETWRAPVISUALFLAGS(int wrapVisualFlags)</b><br />\r\n     <b id=\"SCI_GETWRAPVISUALFLAGS\">SCI_GETWRAPVISUALFLAGS &rarr; int</b><br />\r\n                You can enable the drawing of visual flags to indicate a line is wrapped. Bits set in\r\n                wrapVisualFlags determine which visual flags are drawn.\r\n    </p>\r\n    <table class=\"standard\" summary=\"Wrap visual flags\">\r\n      <tbody>\r\n        <tr>\r\n          <th align=\"left\">Symbol</th>\r\n          <th>Value</th>\r\n          <th align=\"left\">Effect</th>\r\n        </tr>\r\n      </tbody>\r\n\r\n      <tbody valign=\"top\">\r\n        <tr>\r\n          <td align=\"left\"><code>SC_WRAPVISUALFLAG_NONE</code></td>\r\n          <td align=\"center\">0</td>\r\n          <td>No visual flags</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>SC_WRAPVISUALFLAG_END</code></td>\r\n          <td align=\"center\">1</td>\r\n          <td>Visual flag at end of subline of a wrapped line.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>SC_WRAPVISUALFLAG_START</code></td>\r\n          <td align=\"center\">2</td>\r\n          <td>Visual flag at begin of subline of a wrapped line.<br />\r\n                                             Subline is indented by at least 1 to make room for the flag.<br />\r\n                                </td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>SC_WRAPVISUALFLAG_MARGIN</code></td>\r\n          <td align=\"center\">4</td>\r\n          <td>Visual flag in line number margin.</td>\r\n        </tr>\r\n      </tbody>\r\n    </table>\r\n\r\n    <p><b id=\"SCI_SETWRAPVISUALFLAGSLOCATION\">SCI_SETWRAPVISUALFLAGSLOCATION(int wrapVisualFlagsLocation)</b><br />\r\n     <b id=\"SCI_GETWRAPVISUALFLAGSLOCATION\">SCI_GETWRAPVISUALFLAGSLOCATION &rarr; int</b><br />\r\n                You can set whether the visual flags to indicate a line is wrapped are drawn near the border or near the text.\r\n                Bits set in wrapVisualFlagsLocation set the location to near the text for the corresponding visual flag.\r\n    </p>\r\n\r\n    <table class=\"standard\" summary=\"Wrap visual flags locations\">\r\n      <tbody>\r\n        <tr>\r\n          <th align=\"left\">Symbol</th>\r\n          <th>Value</th>\r\n          <th align=\"left\">Effect</th>\r\n        </tr>\r\n      </tbody>\r\n\r\n      <tbody valign=\"top\">\r\n        <tr>\r\n          <td align=\"left\"><code>SC_WRAPVISUALFLAGLOC_DEFAULT</code></td>\r\n          <td align=\"center\">0</td>\r\n          <td>Visual flags drawn near border</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>SC_WRAPVISUALFLAGLOC_END_BY_TEXT</code></td>\r\n          <td align=\"center\">1</td>\r\n          <td>Visual flag at end of subline drawn near text</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>SC_WRAPVISUALFLAGLOC_START_BY_TEXT</code></td>\r\n          <td align=\"center\">2</td>\r\n          <td>Visual flag at beginning of subline drawn near text</td>\r\n        </tr>\r\n      </tbody>\r\n    </table>\r\n\r\n    <p><b id=\"SCI_SETWRAPINDENTMODE\">SCI_SETWRAPINDENTMODE(int wrapIndentMode)</b><br />\r\n     <b id=\"SCI_GETWRAPINDENTMODE\">SCI_GETWRAPINDENTMODE &rarr; int</b><br />\r\n                Wrapped sublines can be indented to the position of their first subline or one more indent level.\r\n\t  The default is <code>SC_WRAPINDENT_FIXED</code>.\r\n                The modes are:\r\n    </p>\r\n\r\n    <table class=\"standard\" summary=\"Wrap visual flags locations\">\r\n      <tbody>\r\n        <tr>\r\n          <th align=\"left\">Symbol</th>\r\n          <th>Value</th>\r\n          <th align=\"left\">Effect</th>\r\n        </tr>\r\n      </tbody>\r\n\r\n      <tbody valign=\"top\">\r\n        <tr>\r\n          <td align=\"left\"><code>SC_WRAPINDENT_FIXED</code></td>\r\n          <td align=\"center\">0</td>\r\n          <td>\r\n              Wrapped sublines aligned to left of window plus amount set by\r\n              <a class=\"seealso\" href=\"#SCI_SETWRAPSTARTINDENT\">SCI_SETWRAPSTARTINDENT</a>\r\n          </td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>SC_WRAPINDENT_SAME</code></td>\r\n          <td align=\"center\">1</td>\r\n          <td>Wrapped sublines are aligned to first subline indent</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>SC_WRAPINDENT_INDENT</code></td>\r\n          <td align=\"center\">2</td>\r\n          <td>Wrapped sublines are aligned to first subline indent plus one more level of indentation</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>SC_WRAPINDENT_DEEPINDENT</code></td>\r\n          <td align=\"center\">3</td>\r\n          <td>Wrapped sublines are aligned to first subline indent plus two more levels of indentation</td>\r\n        </tr>\r\n      </tbody>\r\n    </table>\r\n\r\n    <p><b id=\"SCI_SETWRAPSTARTINDENT\">SCI_SETWRAPSTARTINDENT(int indent)</b><br />\r\n     <b id=\"SCI_GETWRAPSTARTINDENT\">SCI_GETWRAPSTARTINDENT &rarr; int</b><br />\r\n     <code>SCI_SETWRAPSTARTINDENT</code> sets the size of indentation of sublines for\r\n                 wrapped lines in terms of the average character width in\r\n                <a class=\"message\" href=\"#StyleDefinition\"><code>STYLE_DEFAULT</code></a>.\r\n                There are no limits on indent sizes, but values        less than 0 or large values may have\r\n                undesirable effects.<br />\r\n                The indention of sublines is independent of visual flags, but if\r\n                <code>SC_WRAPVISUALFLAG_START</code> is set an indent of at least 1 is used.\r\n     </p>\r\n\r\n    <p><b id=\"SCI_SETLAYOUTCACHE\">SCI_SETLAYOUTCACHE(int cacheMode)</b><br />\r\n     <b id=\"SCI_GETLAYOUTCACHE\">SCI_GETLAYOUTCACHE &rarr; int</b><br />\r\n     You can set <code class=\"parameter\">cacheMode</code> to one of the symbols in the table:</p>\r\n\r\n    <table class=\"standard\" summary=\"Line caching styles\">\r\n      <tbody>\r\n        <tr>\r\n          <th align=\"left\">Symbol</th>\r\n\r\n          <th>Value</th>\r\n\r\n          <th align=\"left\">Layout cached for these lines</th>\r\n        </tr>\r\n      </tbody>\r\n\r\n      <tbody valign=\"top\">\r\n        <tr>\r\n          <td align=\"left\"><code>SC_CACHE_NONE</code></td>\r\n\r\n          <td align=\"center\">0</td>\r\n\r\n          <td>No lines are cached.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>SC_CACHE_CARET</code></td>\r\n\r\n          <td align=\"center\">1</td>\r\n\r\n          <td>One line is cached. This is the default.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>SC_CACHE_PAGE</code></td>\r\n\r\n          <td align=\"center\">2</td>\r\n\r\n          <td>Visible lines plus the line containing the caret.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>SC_CACHE_DOCUMENT</code></td>\r\n\r\n          <td align=\"center\">3</td>\r\n\r\n          <td>All lines in the document.</td>\r\n        </tr>\r\n      </tbody>\r\n    </table>\r\n\r\n    <p><b id=\"SCI_SETPOSITIONCACHE\">SCI_SETPOSITIONCACHE(int size)</b><br />\r\n     <b id=\"SCI_GETPOSITIONCACHE\">SCI_GETPOSITIONCACHE &rarr; int</b><br />\r\n     The position cache stores position information for short runs of text\r\n     so that their layout can be determined more quickly if the run recurs.\r\n     The size in entries of this cache can be set with <code>SCI_SETPOSITIONCACHE</code>.</p>\r\n\r\n    <p><b id=\"SCI_SETLAYOUTTHREADS\">SCI_SETLAYOUTTHREADS(int threads)</b><br />\r\n     <b id=\"SCI_GETLAYOUTTHREADS\">SCI_GETLAYOUTTHREADS &rarr; int</b><br />\r\n     The time taken to measure text runs on wide lines or when wrapping can be improved by performing the task\r\n     concurrently on multiple threads when\r\n     <a class=\"seealso\" href=\"#SCI_SUPPORTSFEATURE\">SCI_SUPPORTSFEATURE(SC_SUPPORTS_THREAD_SAFE_MEASURE_WIDTHS)</a>\r\n     is available.\r\n     This can be a dramatic improvement - a 4 core processor is often able to reduce text layout time to just over one\r\n     quarter of the single-threaded time.</p>\r\n     <p>The default is to use just the main thread but applications may call <code>SCI_SETLAYOUTTHREADS</code>\r\n     to specify the maximum number of threads to use.\r\n     The number of threads is limited to the hardware concurrency of the system -\r\n     for a 4 core processor with hyper-threading that would be 8.\r\n     If an application just wants maximum concurrency then call with a large number\r\n     <code>SCI_SETLAYOUTTHREADS(1000)</code> and that will be reduced to a reasonable value.</p>\r\n\r\n    <p><b id=\"SCI_LINESSPLIT\">SCI_LINESSPLIT(int pixelWidth)</b><br />\r\n     Split a range of lines indicated by the target into lines that are at most pixelWidth wide.\r\n     Splitting occurs on word boundaries wherever possible in a similar manner to line wrapping.\r\n     When <code class=\"parameter\">pixelWidth</code> is 0 then the width of the window is used.\r\n     </p>\r\n\r\n    <p><b id=\"SCI_LINESJOIN\">SCI_LINESJOIN</b><br />\r\n     Join a range of lines indicated by the target into one line by\r\n     removing line end characters.\r\n     Where this would lead to no space between words, an extra space is inserted.\r\n     </p>\r\n\r\n    <p><b id=\"SCI_WRAPCOUNT\">SCI_WRAPCOUNT(line docLine) &rarr; line</b><br />\r\n    Document lines can occupy more than one display line if they wrap and this\r\n    returns the number of display lines needed to wrap a document line.</p>\r\n\r\n    <h2 id=\"Zooming\">Zooming</h2>\r\n\r\n    <p>Scintilla incorporates a \"zoom factor\" that lets you make all the text in the document\r\n    larger or smaller in steps of one point. The displayed point size never goes below 2, whatever\r\n    zoom factor you set. You can set zoom factors in the range -10 to +20 points.</p>\r\n    <code><a class=\"message\" href=\"#SCI_ZOOMIN\">SCI_ZOOMIN</a><br />\r\n     <a class=\"message\" href=\"#SCI_ZOOMOUT\">SCI_ZOOMOUT</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETZOOM\">SCI_SETZOOM(int zoomInPoints)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETZOOM\">SCI_GETZOOM &rarr; int</a><br />\r\n    </code>\r\n\r\n    <p><b id=\"SCI_ZOOMIN\">SCI_ZOOMIN</b><br />\r\n     <b id=\"SCI_ZOOMOUT\">SCI_ZOOMOUT</b><br />\r\n     <code>SCI_ZOOMIN</code> increases the zoom factor by one point if the current zoom factor is\r\n    less than 20 points. <code>SCI_ZOOMOUT</code> decreases the zoom factor by one point if the\r\n    current zoom factor is greater than -10 points.</p>\r\n\r\n    <p><b id=\"SCI_SETZOOM\">SCI_SETZOOM(int zoomInPoints)</b><br />\r\n     <b id=\"SCI_GETZOOM\">SCI_GETZOOM &rarr; int</b><br />\r\n     These messages let you set and get the zoom factor directly. There is no limit set on the\r\n    factors you can set, so limiting yourself to -10 to +20 to match the incremental zoom functions\r\n    is a good idea.</p>\r\n\r\n    <h2 id=\"LongLines\">Long lines</h2>\r\n\r\n    <p>You can choose to mark lines that exceed a given length by drawing a vertical line or by\r\n    colouring the background of characters that exceed the set length.</p>\r\n    <code><a class=\"message\" href=\"#SCI_SETEDGEMODE\">SCI_SETEDGEMODE(int edgeMode)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETEDGEMODE\">SCI_GETEDGEMODE &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETEDGECOLUMN\">SCI_SETEDGECOLUMN(position column)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETEDGECOLUMN\">SCI_GETEDGECOLUMN &rarr; position</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETEDGECOLOUR\">SCI_SETEDGECOLOUR(colour edgeColour)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETEDGECOLOUR\">SCI_GETEDGECOLOUR &rarr; colour</a><br />\r\n     <br />\r\n     <a class=\"message\" href=\"#SCI_MULTIEDGEADDLINE\">SCI_MULTIEDGEADDLINE(position column, colour edgeColour)</a><br />\r\n     <a class=\"message\" href=\"#SCI_MULTIEDGECLEARALL\">SCI_MULTIEDGECLEARALL</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETMULTIEDGECOLUMN\">SCI_GETMULTIEDGECOLUMN(int which) &rarr; position</a>\r\n     <br />\r\n    </code>\r\n\r\n    <p><b id=\"SCI_SETEDGEMODE\">SCI_SETEDGEMODE(int edgeMode)</b><br />\r\n     <b id=\"SCI_GETEDGEMODE\">SCI_GETEDGEMODE &rarr; int</b><br />\r\n     These two messages set and get the mode used to display long lines. You can set one of the\r\n    values in the table:</p>\r\n\r\n    <table class=\"standard\" summary=\"Long line styles\">\r\n      <tbody>\r\n        <tr>\r\n          <th align=\"left\">Symbol</th>\r\n\r\n          <th>Value</th>\r\n\r\n          <th align=\"left\">Long line display mode</th>\r\n        </tr>\r\n      </tbody>\r\n\r\n      <tbody valign=\"top\">\r\n        <tr>\r\n          <td align=\"left\"><code>EDGE_NONE</code></td>\r\n\r\n          <td align=\"center\">0</td>\r\n\r\n          <td>Long lines are not marked. This is the default state.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>EDGE_LINE</code></td>\r\n\r\n          <td align=\"center\">1</td>\r\n\r\n          <td>A vertical line is drawn at the column number set by <code>SCI_SETEDGECOLUMN</code>.\r\n          This works well for monospaced fonts. The line is drawn at a position based on the width\r\n          of a space character in <a class=\"message\"\r\n          href=\"#StyleDefinition\"><code>STYLE_DEFAULT</code></a>, so it may not work very well if\r\n          your styles use proportional fonts or if your style have varied font sizes or you use a\r\n          mixture of bold, italic and normal text.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>EDGE_BACKGROUND</code></td>\r\n\r\n          <td align=\"center\">2</td>\r\n\r\n          <td>The background colour of characters after the column limit is changed to the colour\r\n          set by <code>SCI_SETEDGECOLOUR</code>. This is recommended for proportional fonts.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>EDGE_MULTILINE</code></td>\r\n\r\n          <td align=\"center\">3</td>\r\n\r\n          <td>This is similar to <code>EDGE_LINE</code> but in contrary to showing only one single\r\n          line a configurable set of vertical lines can be shown simultaneously. This <code>edgeMode\r\n          </code> uses a completely independent dataset that can only be configured by using the\r\n          <code>SCI_MULTIEDGE*</code> messages.</td>\r\n        </tr>\r\n      </tbody>\r\n    </table>\r\n\r\n    <p><b id=\"SCI_SETEDGECOLUMN\">SCI_SETEDGECOLUMN(position column)</b><br />\r\n     <b id=\"SCI_GETEDGECOLUMN\">SCI_GETEDGECOLUMN &rarr; position</b><br />\r\n     These messages set and get the column number at which to display the long line marker. When\r\n    drawing lines, the column sets a position in units of the width of a space character in\r\n    <code>STYLE_DEFAULT</code>. When setting the background colour, the column is a character count\r\n    (allowing for tabs) into the line.</p>\r\n\r\n    <p><b id=\"SCI_SETEDGECOLOUR\">SCI_SETEDGECOLOUR(<a class=\"jump\" href=\"#colour\">colour</a> edgeColour)</b><br />\r\n     <b id=\"SCI_GETEDGECOLOUR\">SCI_GETEDGECOLOUR &rarr; colour</b><br />\r\n     These messages set and get the colour of the marker used to show that a line has exceeded the\r\n    length set by <code>SCI_SETEDGECOLUMN</code>.</p>\r\n\r\n    <p><b id=\"SCI_MULTIEDGEADDLINE\">SCI_MULTIEDGEADDLINE(position column,\r\n    <a class=\"jump\" href=\"#colour\">colour</a> edgeColour)</b><br />\r\n     <b id=\"SCI_MULTIEDGECLEARALL\">SCI_MULTIEDGECLEARALL</b><br />\r\n     <b id=\"SCI_GETMULTIEDGECOLUMN\">SCI_GETMULTIEDGECOLUMN(int which) &rarr; position</b><br />\r\n     <code>SCI_MULTIEDGEADDLINE</code> adds a new vertical edge to the view. The edge will be\r\n    displayed at the given column number. The resulting edge position depends on the metric\r\n    of a space character in <code>STYLE_DEFAULT</code>. All the edges can be cleared with\r\n    <code>SCI_MULTIEDGECLEARALL</code>. <code>SCI_GETMULTIEDGECOLUMN</code> returns the column of the\r\n    Nth vertical edge (indexed from 0). If <code class=\"parameter\">which</code> is greater or equal\r\n    to the number of vertical edges, this returns -1.</p>\r\n\r\n    <h2 id=\"Accessibility\">Accessibility</h2>\r\n\r\n    <p>Scintilla supports some platform accessibility features.\r\n    This support differs between platforms.\r\n    On GTK and Cocoa the platform accessibility APIs are implemented sufficiently to\r\n    make screen readers work.\r\n    On Win32, the system caret is manipulated to help screen readers.\r\n    </p>\r\n\r\n    <code><a class=\"message\" href=\"#SCI_SETACCESSIBILITY\">SCI_SETACCESSIBILITY(int accessibility)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETACCESSIBILITY\">SCI_GETACCESSIBILITY &rarr; int</a><br />\r\n    </code>\r\n\r\n    <p><b id=\"SCI_SETACCESSIBILITY\">SCI_SETACCESSIBILITY(int accessibility)</b><br />\r\n     <b id=\"SCI_GETACCESSIBILITY\">SCI_GETACCESSIBILITY &rarr; int</b><br />\r\n     These messages may enable or disable accessibility and report its current status.</p>\r\n\r\n    <p>On most platforms, accessibility is either implemented or not implemented and this can be\r\n    discovered with <code>SCI_GETACCESSIBILITY</code> with\r\n    <code>SCI_SETACCESSIBILITY</code> performing no action.\r\n    On GTK, there are storage and performance costs to accessibility, so it can be disabled\r\n    by calling <code>SCI_SETACCESSIBILITY</code>.\r\n    </p>\r\n\r\n    <table class=\"standard\" summary=\"Accessibility status\">\r\n      <tbody>\r\n        <tr>\r\n          <th align=\"left\">Symbol</th>\r\n\r\n          <th>Value</th>\r\n\r\n          <th align=\"left\">Accessibility status</th>\r\n        </tr>\r\n      </tbody>\r\n\r\n      <tbody valign=\"top\">\r\n        <tr>\r\n          <td align=\"left\"><code>SC_ACCESSIBILITY_DISABLED</code></td>\r\n\r\n          <td align=\"center\">0</td>\r\n\r\n          <td>Accessibility is disabled.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>SC_ACCESSIBILITY_ENABLED</code></td>\r\n\r\n          <td align=\"center\">1</td>\r\n\r\n          <td>Accessibility is enabled.</td>\r\n        </tr>\r\n      </tbody>\r\n    </table>\r\n\r\n    <h2 id=\"Lexer\">Lexer</h2>\r\n\r\n    <p>\r\n    To style files in different languages, different 'lexers' are used.\r\n    These are objects that are called by Scintilla with a range of text and some context information and which\r\n    then set styles and folding information for that range.\r\n    Lexers for Scintilla are now provided by the <a href=\"Lexilla.html\">Lexilla</a> project.\r\n    Before 5.0, lexers were built into most versions of Scintilla.</p>\r\n\r\n     <a class=\"message\" href=\"#SCI_GETLEXER\">SCI_GETLEXER &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETLEXERLANGUAGE\">SCI_GETLEXERLANGUAGE(&lt;unused&gt;, char *language) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETILEXER\">SCI_SETILEXER(&lt;unused&gt;, pointer ilexer)</a><br />\r\n     <a class=\"message\" href=\"#SCI_COLOURISE\">SCI_COLOURISE(position start, position end)</a><br />\r\n     <a class=\"message\" href=\"#SCI_CHANGELEXERSTATE\">SCI_CHANGELEXERSTATE(position start, position end) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_PROPERTYNAMES\">SCI_PROPERTYNAMES(&lt;unused&gt;, char *names) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_PROPERTYTYPE\">SCI_PROPERTYTYPE(const char *name) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_DESCRIBEPROPERTY\">SCI_DESCRIBEPROPERTY(const char *name, char *description) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETPROPERTY\">SCI_SETPROPERTY(const char *key, const char *value)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETPROPERTY\">SCI_GETPROPERTY(const char *key, char *value) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETPROPERTYEXPANDED\">SCI_GETPROPERTYEXPANDED(const char *key, char *value) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETPROPERTYINT\">SCI_GETPROPERTYINT(const char *key, int defaultValue) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_DESCRIBEKEYWORDSETS\">SCI_DESCRIBEKEYWORDSETS(&lt;unused&gt;, char *descriptions) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETKEYWORDS\">SCI_SETKEYWORDS(int keyWordSet, const char\r\n    *keyWords)</a><br />\r\n\r\n     <a class=\"message\" href=\"#SCI_GETSUBSTYLEBASES\">SCI_GETSUBSTYLEBASES(&lt;unused&gt;, char *styles) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_DISTANCETOSECONDARYSTYLES\">SCI_DISTANCETOSECONDARYSTYLES &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_ALLOCATESUBSTYLES\">SCI_ALLOCATESUBSTYLES(int styleBase, int numberStyles) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_FREESUBSTYLES\">SCI_FREESUBSTYLES</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETSUBSTYLESSTART\">SCI_GETSUBSTYLESSTART(int styleBase) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETSUBSTYLESLENGTH\">SCI_GETSUBSTYLESLENGTH(int styleBase) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETSTYLEFROMSUBSTYLE\">SCI_GETSTYLEFROMSUBSTYLE(int subStyle) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETPRIMARYSTYLEFROMSTYLE\">SCI_GETPRIMARYSTYLEFROMSTYLE(int style) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETIDENTIFIERS\">SCI_SETIDENTIFIERS(int style, const char *identifiers)</a><br />\r\n     <a class=\"message\" href=\"#SCI_PRIVATELEXERCALL\">SCI_PRIVATELEXERCALL(int operation, pointer pointer) &rarr; pointer</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETNAMEDSTYLES\">SCI_GETNAMEDSTYLES &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_NAMEOFSTYLE\">SCI_NAMEOFSTYLE(int style, char *name) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_TAGSOFSTYLE\">SCI_TAGSOFSTYLE(int style, char *tags) &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_DESCRIPTIONOFSTYLE\">SCI_DESCRIPTIONOFSTYLE(int style, char *description) &rarr; int</a><br />\r\n\r\n    <p><b id=\"SCI_GETLEXER\">SCI_GETLEXER &rarr; int</b><br />\r\n     You can retrieve an integer lexer ID for the current lexer from the <code>SCLEX_*</code> enumeration\r\n    in <code>SciLexer.h</code>. Some lexers may not have a lexer ID, just a lexer name in which case 0 is returned.</p>\r\n\r\n    <p><b id=\"SCI_GETLEXERLANGUAGE\">SCI_GETLEXERLANGUAGE(&lt;unused&gt;, char *language NUL-terminated) &rarr; int</b><br />\r\n     <code>SCI_GETLEXERLANGUAGE</code> returns the name of the current lexer which must be set with <code>SCI_SETILEXER</code>.\r\n    To locate the name for a lexer, open the relevant\r\n    <code>lexilla/lexers/Lex*.cxx</code> file and search for <code>LexerModule</code>. The third argument in the\r\n    <code>LexerModule</code> constructor is the name to use.</p>\r\n\r\n     <p><b id=\"SCI_SETILEXER\">SCI_SETILEXER(&lt;unused&gt;, pointer ilexer)</b><br />\r\n     <code>SCI_SETILEXER</code> allows setting a lexer as an <code>ILexer5*</code>.\r\n     The lexer may be implemented by an application or a shared library such as Lexilla.</p>\r\n\r\n    <p>To test if your lexer assignment worked, use <a class=\"seealso\" href=\"#SCI_GETLEXER\"><code>SCI_GETLEXER</code></a>\r\n    before and after setting the new lexer to\r\n    see if the lexer number changed.</p>\r\n\r\n    <p><code>SCI_GETLEXERLANGUAGE</code> retrieves the name of the lexer.</p>\r\n\r\n    <p><b id=\"SCI_COLOURISE\">SCI_COLOURISE(position start, position end)</b><br />\r\n     This requests the current lexer or the container (if the lexer is set to\r\n    <code>NULL</code>) to style the document between <code class=\"parameter\">start</code> and\r\n    <code class=\"parameter\">end</code>. If <code class=\"parameter\">end</code> is -1, the document is styled from\r\n    <code class=\"parameter\">start</code> to the end. If the <code>\"fold\"</code> property is set to\r\n    <code>\"1\"</code> and your lexer or container supports folding, fold levels are also set. This\r\n    message causes a redraw.</p>\r\n\r\n    <p><b id=\"SCI_CHANGELEXERSTATE\">SCI_CHANGELEXERSTATE(position start, position end) &rarr; int</b><br />\r\n    Indicate that the internal state of a lexer has changed over a range and therefore\r\n    there may be a need to redraw.</p>\r\n\r\n    <p><b id=\"SCI_PROPERTYNAMES\">SCI_PROPERTYNAMES(&lt;unused&gt;, char *names NUL-terminated) &rarr; int</b><br />\r\n    <b id=\"SCI_PROPERTYTYPE\">SCI_PROPERTYTYPE(const char *name) &rarr; int</b><br />\r\n    <b id=\"SCI_DESCRIBEPROPERTY\">SCI_DESCRIBEPROPERTY(const char *name, char *description NUL-terminated) &rarr; int</b><br />\r\n    Information may be retrieved about the properties that can be set for the current lexer.\r\n    This information is only available for newer lexers.\r\n    <code>SCI_PROPERTYNAMES</code> returns a string with all of the valid properties separated by \"\\n\".\r\n    If the lexer does not support this call then an empty string is returned.\r\n    Properties may be boolean (<code>SC_TYPE_BOOLEAN</code>), integer (<code>SC_TYPE_INTEGER</code>),\r\n    or string (<code>SC_TYPE_STRING</code>) and this is found with <code>SCI_PROPERTYTYPE</code>.\r\n    A description of a property in English is returned by <code>SCI_DESCRIBEPROPERTY</code>.</p>\r\n\r\n    <p><b id=\"SCI_SETPROPERTY\">SCI_SETPROPERTY(const char *key, const char *value)</b><br />\r\n     You can communicate settings to lexers with keyword:value string pairs. There is no limit to\r\n    the number of keyword pairs you can set, other than available memory. <code class=\"parameter\">key</code> is a\r\n    case sensitive keyword, <code class=\"parameter\">value</code> is a string that is associated with the keyword. If\r\n    there is already a value string associated with the keyword, it is replaced. If you pass a zero\r\n    length string, the message does nothing. Both <code class=\"parameter\">key</code> and <code class=\"parameter\">value</code> are used\r\n    without modification; extra spaces at the beginning or end of <code class=\"parameter\">key</code> are\r\n    significant.</p>\r\n\r\n    <p>The <code class=\"parameter\">value</code> string can no longer refer to other keywords\r\n    as was possible in older releases of Scintilla.</p>\r\n\r\n    <p>Lexers may only store values for keywords they support.</p>\r\n\r\n    <p>Currently the \"fold\" property is defined for most of the lexers to set the fold structure if\r\n    set to \"1\". <code>SCLEX_PYTHON</code> understands <code>\"tab.timmy.whinge.level\"</code> as a\r\n    setting that determines how to indicate bad indentation. Most keywords have values that are\r\n    interpreted as integers. Search the lexer sources for <code>GetPropertyInt</code> to see how\r\n    properties are used.</p>\r\n\r\n    <p>There is a convention for naming properties used by lexers so that the set of properties can be found by scripts.\r\n    Property names should start with \"lexer.&lt;lexer&gt;.\" or \"fold.&lt;lexer&gt;.\" when they apply to one\r\n    lexer or start with \"lexer.\" or \"fold.\" if they apply to multiple lexers.</p>\r\n\r\n    <p>Applications may discover the set of properties used by searching the source code of lexers for lines that contain\r\n    <code>GetProperty</code> or <code>DefineProperty</code> and a double quoted string and extract the value of\r\n    the double quoted string as the property name.\r\n    The <code>lexilla/scripts/LexillaData.py</code> script does this and can be used as an example.\r\n    Documentation for the property may be located above the call as a multi-line comment starting with\r\n    <br/><code>// property &lt;property-name&gt;</code></p>\r\n\r\n    <p><b id=\"SCI_GETPROPERTY\">SCI_GETPROPERTY(const char *key, char *value NUL-terminated) &rarr; int</b><br />\r\n    Lookup a keyword:value pair using the specified key; if found, copy the value to the user-supplied\r\n    buffer and return the length (not including the terminating 0).  If not found, copy an empty string\r\n    to the buffer and return 0.</p>\r\n\r\n    <p>If the value argument is 0 then the length that should be allocated to store the value is returned;\r\n    again, the terminating 0 is not included.</p>\r\n\r\n    <p><b id=\"SCI_GETPROPERTYEXPANDED\">SCI_GETPROPERTYEXPANDED(const char *key, char *value) &rarr; int</b><br />\r\n    This is now the same as <a class=\"message\" href=\"#SCI_GETPROPERTY\"><code>SCI_GETPROPERTY</code></a>\r\n    - no expansion is performed.</p>\r\n\r\n    <p>Lookup a keyword:value pair using the specified key; if found, copy the value to the user-supplied\r\n    buffer and return the length (not including the terminating 0).  If not found, copy an empty string\r\n    to the buffer and return 0.</p>\r\n\r\n    <p>If the value argument is 0 then the length that should be allocated to store the value is returned;\r\n    again, the terminating 0 is not included.</p>\r\n\r\n    <p><b id=\"SCI_GETPROPERTYINT\">SCI_GETPROPERTYINT(const char *key, int defaultValue) &rarr; int</b><br />\r\n    Lookup a keyword:value pair using the specified key; if found, interpret the value as an integer and return it.\r\n    If not found (or the value is an empty string) then return the supplied default.  If the keyword:value pair is found but is not\r\n    a number, then return 0.</p>\r\n\r\n    <p><b id=\"SCI_SETKEYWORDS\">SCI_SETKEYWORDS(int keyWordSet, const char *keyWords)</b><br />\r\n     You can set up to 9 lists of keywords for use by the current lexer.\r\n     <code class=\"parameter\">keyWordSet</code> can be 0 to 8 (actually 0 to <code>KEYWORDSET_MAX</code>)\r\n    and selects which keyword list to replace. <code class=\"parameter\">keyWords</code> is a list of keywords\r\n    separated by spaces, tabs, <code>\"\\n\"</code> or <code>\"\\r\"</code> or any combination of these.\r\n    It is expected that the keywords will be composed of standard ASCII printing characters,\r\n    but there is nothing to stop you using any non-separator character codes from 1 to 255\r\n    (except common sense).</p>\r\n\r\n    <p>How these keywords are used is entirely up to the lexer. Some languages, such as HTML may\r\n    contain embedded languages, VBScript and JavaScript are common for HTML. For HTML, key word set\r\n    0 is for HTML, 1 is for JavaScript and 2 is for VBScript, 3 is for Python, 4 is for PHP and 5\r\n    is for SGML and DTD keywords. Review the lexer code to see examples of keyword list. A fully\r\n    conforming lexer sets the fourth argument of the <code>LexerModule</code> constructor to be a\r\n    list of strings that describe the uses of the keyword lists.</p>\r\n\r\n    <p>Alternatively, you might use set 0 for general keywords, set 1 for keywords that cause\r\n    indentation and set 2 for keywords that cause unindentation. Yet again, you might have a simple\r\n    lexer that colours keywords and you could change languages by changing the keywords in set 0.\r\n    There is nothing to stop you building your own keyword lists into the lexer, but this means\r\n    that the lexer must be rebuilt if more keywords are added.</p>\r\n\r\n    <p><b id=\"SCI_DESCRIBEKEYWORDSETS\">SCI_DESCRIBEKEYWORDSETS(&lt;unused&gt;, char *descriptions NUL-terminated) &rarr; int</b><br />\r\n    A description of all of the keyword sets separated by \"\\n\" is returned by <code>SCI_DESCRIBEKEYWORDSETS</code>.</p>\r\n\r\n    <h3 id=\"Substyles\">Substyles</h3>\r\n    <p>Lexers may support several different sublanguages and each sublanguage may want to style some number of\r\n    sets of identifiers (or similar lexemes such as documentation keywords) uniquely. Preallocating a large number for each\r\n    purpose would exhaust the number of allowed styles quickly.\r\n    This is alleviated by substyles which allow the application to determine how many sets of identifiers to allocate for\r\n    each purpose.\r\n    Lexers have to explicitly support this feature by implementing particular methods.</p>\r\n\r\n    <p><b id=\"SCI_GETSUBSTYLEBASES\">SCI_GETSUBSTYLEBASES(&lt;unused&gt;, char *styles NUL-terminated) &rarr; int</b><br />\r\n     Fill <code class=\"parameter\">styles</code> with a byte for each style that can be split into substyles.</p>\r\n\r\n    <p><b id=\"SCI_DISTANCETOSECONDARYSTYLES\">SCI_DISTANCETOSECONDARYSTYLES &rarr; int</b><br />\r\n     Returns the distance between a primary style and its corresponding secondary style.</p>\r\n\r\n    <p><b id=\"SCI_ALLOCATESUBSTYLES\">SCI_ALLOCATESUBSTYLES(int styleBase, int numberStyles) &rarr; int</b><br />\r\n     Allocate some number of substyles for a particular base style returning the first substyle number allocated.\r\n     A failure, such as requesting more substyles than available, is indicated by returning a negative number.\r\n     Lexers that support substyles will commonly allow allocating 64 substyles. \r\n     Substyles are allocated contiguously.</p>\r\n\r\n    <p><b id=\"SCI_FREESUBSTYLES\">SCI_FREESUBSTYLES</b><br />\r\n     Free all allocated substyles.</p>\r\n\r\n    <p><b id=\"SCI_GETSUBSTYLESSTART\">SCI_GETSUBSTYLESSTART(int styleBase) &rarr; int</b><br />\r\n    <b id=\"SCI_GETSUBSTYLESLENGTH\">SCI_GETSUBSTYLESLENGTH(int styleBase) &rarr; int</b><br />\r\n     Return the start and length of the substyles allocated for a base style.</p>\r\n\r\n    <p><b id=\"SCI_GETSTYLEFROMSUBSTYLE\">SCI_GETSTYLEFROMSUBSTYLE(int subStyle) &rarr; int</b><br />\r\n     For a sub style, return the base style, else return the argument.</p>\r\n\r\n    <p><b id=\"SCI_GETPRIMARYSTYLEFROMSTYLE\">SCI_GETPRIMARYSTYLEFROMSTYLE(int style) &rarr; int</b><br />\r\n     For a secondary style, return the primary style, else return the argument.</p>\r\n\r\n    <p><b id=\"SCI_SETIDENTIFIERS\">SCI_SETIDENTIFIERS(int style, const char *identifiers)</b><br />\r\n     Similar to <code>SCI_SETKEYWORDS</code> but for substyles.\r\n     The prefix feature available with <code>SCI_SETKEYWORDS</code> is not implemented for <code>SCI_SETIDENTIFIERS</code>.</p>\r\n\r\n    <p><b id=\"SCI_PRIVATELEXERCALL\">SCI_PRIVATELEXERCALL(int operation, pointer pointer) &rarr; pointer</b><br />\r\n     Call into a lexer in a way not understood by Scintilla.</p>\r\n\r\n    <h3 id=\"StyleMetadata\">Style Metadata</h3>\r\n    <p>Lexers may provide information on the styles they use.\r\n    Lexers have to explicitly support this feature by implementing particular methods.</p>\r\n\r\n    <p><b id=\"SCI_GETNAMEDSTYLES\">SCI_GETNAMEDSTYLES &rarr; int</b><br />\r\n     Retrieve the number of named styles for the lexer.</p>\r\n\r\n    <p><b id=\"SCI_NAMEOFSTYLE\">SCI_NAMEOFSTYLE(int style, char *name) &rarr; int</b><br />\r\n     Retrieve the name of a style. This is a C preprocessor symbol like \"SCE_C_COMMENTDOC\".</p>\r\n\r\n    <p><b id=\"SCI_TAGSOFSTYLE\">SCI_TAGSOFSTYLE(int style, char *tags) &rarr; int</b><br />\r\n     Retrieve the tags of a style. This is a space-separated set of words like \"comment documentation\".</p>\r\n\r\n    <p><b id=\"SCI_DESCRIPTIONOFSTYLE\">SCI_DESCRIPTIONOFSTYLE(int style, char *description) &rarr; int</b><br />\r\n     Retrieve an English-language description of a style which may be suitable for display in a user interface.\r\n     This looks like \"Doc comment: block comments beginning with /** or /*!\".</p>\r\n\r\n    <h2 id=\"LexerObjects\">Lexer Objects</h2>\r\n\r\n    <p>Lexers are programmed as objects that implement the ILexer5 interface and that interact\r\n    with the document they are lexing through the IDocument interface.\r\n    Previously lexers were defined by providing lexing and folding functions but creating an object\r\n    to handle the interaction of a lexer with a document allows the lexer to store state information that\r\n    can be used during lexing. For example a C++ lexer may store a set of preprocessor definitions\r\n    or variable declarations and style these depending on their role.</p>\r\n\r\n    <p>ILexer4 is extended with the ILexer5 interface to support use of Lexilla.</p>\r\n\r\n    <p>A set of helper classes allows older lexers defined by functions to be used in Scintilla.</p>\r\n<h4>ILexer4</h4>\r\n\r\n<div class=\"highlighted\">\r\n<span class=\"S5\">class</span><span class=\"S0\"> </span>ILexer4<span class=\"S0\"> </span><span class=\"S10\">{</span><br />\r\n<span class=\"S5\">public</span><span class=\"S10\">:</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">int</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>Version<span class=\"S10\">()</span><span class=\"S0\"> </span><span class=\"S5\">const</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">void</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>Release<span class=\"S10\">()</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">const</span><span class=\"S0\"> </span><span class=\"S5\">char</span><span class=\"S0\"> </span><span class=\"S10\">*</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>PropertyNames<span class=\"S10\">()</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">int</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>PropertyType<span class=\"S10\">(</span><span class=\"S5\">const</span><span class=\"S0\"> </span><span class=\"S5\">char</span><span class=\"S0\"> </span><span class=\"S10\">*</span>name<span class=\"S10\">)</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">const</span><span class=\"S0\"> </span><span class=\"S5\">char</span><span class=\"S0\"> </span><span class=\"S10\">*</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>DescribeProperty<span class=\"S10\">(</span><span class=\"S5\">const</span><span class=\"S0\"> </span><span class=\"S5\">char</span><span class=\"S0\"> </span><span class=\"S10\">*</span>name<span class=\"S10\">)</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span>Sci_Position<span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>PropertySet<span class=\"S10\">(</span><span class=\"S5\">const</span><span class=\"S0\"> </span><span class=\"S5\">char</span><span class=\"S0\"> </span><span class=\"S10\">*</span>key<span class=\"S10\">,</span><span class=\"S0\"> </span><span class=\"S5\">const</span><span class=\"S0\"> </span><span class=\"S5\">char</span><span class=\"S0\"> </span><span class=\"S10\">*</span>val<span class=\"S10\">)</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">const</span><span class=\"S0\"> </span><span class=\"S5\">char</span><span class=\"S0\"> </span><span class=\"S10\">*</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>DescribeWordListSets<span class=\"S10\">()</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span>Sci_Position<span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>WordListSet<span class=\"S10\">(</span><span class=\"S5\">int</span><span class=\"S0\"> </span>n<span class=\"S10\">,</span><span class=\"S0\"> </span><span class=\"S5\">const</span><span class=\"S0\"> </span><span class=\"S5\">char</span><span class=\"S0\"> </span><span class=\"S10\">*</span>wl<span class=\"S10\">)</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">void</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>Lex<span class=\"S10\">(</span>Sci_PositionU<span class=\"S0\"> </span>startPos<span class=\"S10\">,</span><span class=\"S0\"> </span>Sci_Position<span class=\"S0\"> </span>lengthDoc<span class=\"S10\">,</span><span class=\"S0\"> </span><span class=\"S5\">int</span><span class=\"S0\"> </span>initStyle<span class=\"S10\">,</span><span class=\"S0\"> </span>IDocument<span class=\"S0\"> </span><span class=\"S10\">*</span>pAccess<span class=\"S10\">)</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">void</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>Fold<span class=\"S10\">(</span>Sci_PositionU<span class=\"S0\"> </span>startPos<span class=\"S10\">,</span><span class=\"S0\"> </span>Sci_Position<span class=\"S0\"> </span>lengthDoc<span class=\"S10\">,</span><span class=\"S0\"> </span><span class=\"S5\">int</span><span class=\"S0\"> </span>initStyle<span class=\"S10\">,</span><span class=\"S0\"> </span>IDocument<span class=\"S0\"> </span><span class=\"S10\">*</span>pAccess<span class=\"S10\">)</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">void</span><span class=\"S0\"> </span><span class=\"S10\">*</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>PrivateCall<span class=\"S10\">(</span><span class=\"S5\">int</span><span class=\"S0\"> </span>operation<span class=\"S10\">,</span><span class=\"S0\"> </span><span class=\"S5\">void</span><span class=\"S0\"> </span><span class=\"S10\">*</span>pointer<span class=\"S10\">)</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">int</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>LineEndTypesSupported<span class=\"S10\">()</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">int</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>AllocateSubStyles<span class=\"S10\">(</span><span class=\"S5\">int</span><span class=\"S0\"> </span>styleBase<span class=\"S10\">,</span><span class=\"S0\"> </span><span class=\"S5\">int</span><span class=\"S0\"> </span>numberStyles<span class=\"S10\">)</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">int</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>SubStylesStart<span class=\"S10\">(</span><span class=\"S5\">int</span><span class=\"S0\"> </span>styleBase<span class=\"S10\">)</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">int</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>SubStylesLength<span class=\"S10\">(</span><span class=\"S5\">int</span><span class=\"S0\"> </span>styleBase<span class=\"S10\">)</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">int</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>StyleFromSubStyle<span class=\"S10\">(</span><span class=\"S5\">int</span><span class=\"S0\"> </span>subStyle<span class=\"S10\">)</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">int</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>PrimaryStyleFromStyle<span class=\"S10\">(</span><span class=\"S5\">int</span><span class=\"S0\"> </span>style<span class=\"S10\">)</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">void</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>FreeSubStyles<span class=\"S10\">()</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">void</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>SetIdentifiers<span class=\"S10\">(</span><span class=\"S5\">int</span><span class=\"S0\"> </span>style<span class=\"S10\">,</span><span class=\"S0\"> </span><span class=\"S5\">const</span><span class=\"S0\"> </span><span class=\"S5\">char</span><span class=\"S0\"> </span><span class=\"S10\">*</span>identifiers<span class=\"S10\">)</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">int</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>DistanceToSecondaryStyles<span class=\"S10\">()</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">const</span><span class=\"S0\"> </span><span class=\"S5\">char</span><span class=\"S0\"> </span><span class=\"S10\">*</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>GetSubStyleBases<span class=\"S10\">()</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">int</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>NamedStyles<span class=\"S10\">()</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">const</span><span class=\"S0\"> </span><span class=\"S5\">char</span><span class=\"S0\"> </span><span class=\"S10\">*</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>NameOfStyle<span class=\"S10\">(</span><span class=\"S5\">int</span><span class=\"S0\"> </span>style<span class=\"S10\">)</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">const</span><span class=\"S0\"> </span><span class=\"S5\">char</span><span class=\"S0\"> </span><span class=\"S10\">*</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>TagsOfStyle<span class=\"S10\">(</span><span class=\"S5\">int</span><span class=\"S0\"> </span>style<span class=\"S10\">)</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">const</span><span class=\"S0\"> </span><span class=\"S5\">char</span><span class=\"S0\"> </span><span class=\"S10\">*</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>DescriptionOfStyle<span class=\"S10\">(</span><span class=\"S5\">int</span><span class=\"S0\"> </span>style<span class=\"S10\">)</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S10\">};</span><br />\r\n</div>\r\n\r\n<h4>ILexer5</h4>\r\n\r\n<div class=\"highlighted\">\r\n<span><span class=\"S5\">class</span><span class=\"S0\"> </span>ILexer5<span class=\"S0\"> </span><span class=\"S10\">:</span><span class=\"S0\"> </span><span class=\"S5\">public</span><span class=\"S0\"> </span>ILexer4<span class=\"S0\"> </span><span class=\"S10\">{</span><br />\r\n<span class=\"S5\">public</span><span class=\"S10\">:</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">const</span><span class=\"S0\"> </span><span class=\"S5\">char</span><span class=\"S0\"> </span><span class=\"S10\">*</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>GetName<span class=\"S10\">()</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">int</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> &nbsp;</span>GetIdentifier<span class=\"S10\">()</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">const</span><span class=\"S0\"> </span><span class=\"S5\">char</span><span class=\"S0\"> </span><span class=\"S10\">*</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>PropertyGet<span class=\"S10\">(</span><span class=\"S5\">const</span><span class=\"S0\"> </span><span class=\"S5\">char</span><span class=\"S0\"> </span><span class=\"S10\">*</span>key<span class=\"S10\">)</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S10\">};</span><br />\r\n<span class=\"S0\"></span></span>\r\n</div>\r\n\r\n<p>\r\nThe types <code>Sci_Position</code> and <code>Sci_PositionU</code> are used for positions and line numbers in the document.\r\n64-bit builds define these as 64-bit types to allow documents larger than 2 GB.\r\n</p>\r\n\r\n<p>\r\nMethods that return strings as <code>const char *</code> are not required to maintain separate allocations indefinitely:\r\nlexer implementations may own a single buffer that is reused for each call.\r\nCallers should make an immediate copy of returned strings.\r\n</p>\r\n\r\n<p>\r\nThe return values from PropertySet and WordListSet are used to indicate whether the change requires\r\nperforming lexing or folding over any of the document. It is the position at which to restart lexing and folding or -1\r\nif the change does not require any extra work on the document.\r\nA simple approach is to return 0 if there is any possibility that a change requires lexing the document again while an\r\noptimisation could be to remember where a setting first affects the document and return that position.\r\n</p>\r\n\r\n<p><code>Version</code> returns an enumerated value specifying which version of the interface is implemented:\r\n<code>lvRelease5</code> for <code>ILexer5</code> and <code>lvRelease4</code> for <code>ILexer4</code>.\r\n<code>ILexer5</code> must be provided for Scintilla version 5.0 or later.\r\n</p>\r\n\r\n<p><code>Release</code> is called to destroy the lexer object.</p>\r\n\r\n<p><code>PrivateCall</code> allows for direct communication between the\r\napplication and a lexer. An example would be where an application\r\nmaintains a single large data structure containing symbolic information\r\nabout system headers (like Windows.h) and provides this to the lexer\r\nwhere it can be applied to each document. This avoids the costs of\r\nconstructing the system header information for each document. This is\r\ninvoked with the <code>SCI_PRIVATELEXERCALL</code> API.</p>\r\n\r\n<p><code>Fold</code> is called with the exact range that needs folding.\r\nPreviously, lexers were called with a range that started one line before the range that\r\nneeds to be folded as this allowed fixing up the last line from the previous folding.\r\nThe new approach allows the lexer to decide whether to backtrack or to handle this\r\nmore efficiently.</p>\r\n\r\n<p><code>AllocateSubStyles</code> returns a negative number when more\r\nsubstyles are requested than is available.</p>\r\n\r\n<p><code>NamedStyles</code>, <code>NameOfStyle</code>,\r\n<code>TagsOfStyle</code>, and <code>DescriptionOfStyle</code>\r\nare used to provide information on the set of styles used by this lexer.\r\n<code>NameOfStyle</code> is the C-language identifier like \"<code>SCE_LUA_COMMENT</code>\".\r\n<code>TagsOfStyle</code> is a set of tags describing the style in a standardized way like \"<code>literal string multiline raw</code>\".\r\nA set of common tags and conventions for combining them is <a  class=\"jump\" href=\"StyleMetadata.html\">described here</a>.\r\n<code>DescriptionOfStyle</code> is an English description of the style like \"<code>Function or method name definition</code>\".\r\n</p>\r\n\r\n<p><code>GetName</code> and <code>GetIdentifier</code> may be called\r\nto discover the identity of a lexer and be used to implement\r\n<a class=\"seealso\" href=\"#SCI_GETLEXERLANGUAGE\">SCI_GETLEXERLANGUAGE</a> and\r\n<a class=\"seealso\" href=\"#SCI_GETLEXER\">SCI_GETLEXER</a>.</p>\r\n\r\n<p><code>PropertyGet</code> may be called\r\nto discover the value of a property stored by a lexer and be used to implement\r\n<a class=\"seealso\" href=\"#SCI_GETPROPERTY\">SCI_GETPROPERTY</a>.</p>\r\n\r\n<h4>IDocument</h4>\r\n\r\n<div class=\"highlighted\">\r\n<span class=\"S5\">class</span><span class=\"S0\"> </span>IDocument<span class=\"S0\"> </span><span class=\"S10\">{</span><br />\r\n<span class=\"S5\">public</span><span class=\"S10\">:</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">int</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>Version<span class=\"S10\">()</span><span class=\"S0\"> </span><span class=\"S5\">const</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">void</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>SetErrorStatus<span class=\"S10\">(</span><span class=\"S5\">int</span><span class=\"S0\"> </span>status<span class=\"S10\">)</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span>Sci_Position<span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>Length<span class=\"S10\">()</span><span class=\"S0\"> </span><span class=\"S5\">const</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">void</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>GetCharRange<span class=\"S10\">(</span><span class=\"S5\">char</span><span class=\"S0\"> </span><span class=\"S10\">*</span>buffer<span class=\"S10\">,</span><span class=\"S0\"> </span>Sci_Position<span class=\"S0\"> </span>position<span class=\"S10\">,</span><span class=\"S0\"> </span>Sci_Position<span class=\"S0\"> </span>lengthRetrieve<span class=\"S10\">)</span><span class=\"S0\"> </span><span class=\"S5\">const</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">char</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>StyleAt<span class=\"S10\">(</span>Sci_Position<span class=\"S0\"> </span>position<span class=\"S10\">)</span><span class=\"S0\"> </span><span class=\"S5\">const</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span>Sci_Position<span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>LineFromPosition<span class=\"S10\">(</span>Sci_Position<span class=\"S0\"> </span>position<span class=\"S10\">)</span><span class=\"S0\"> </span><span class=\"S5\">const</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span>Sci_Position<span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>LineStart<span class=\"S10\">(</span>Sci_Position<span class=\"S0\"> </span>line<span class=\"S10\">)</span><span class=\"S0\"> </span><span class=\"S5\">const</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">int</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>GetLevel<span class=\"S10\">(</span>Sci_Position<span class=\"S0\"> </span>line<span class=\"S10\">)</span><span class=\"S0\"> </span><span class=\"S5\">const</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">int</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>SetLevel<span class=\"S10\">(</span>Sci_Position<span class=\"S0\"> </span>line<span class=\"S10\">,</span><span class=\"S0\"> </span><span class=\"S5\">int</span><span class=\"S0\"> </span>level<span class=\"S10\">)</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">int</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>GetLineState<span class=\"S10\">(</span>Sci_Position<span class=\"S0\"> </span>line<span class=\"S10\">)</span><span class=\"S0\"> </span><span class=\"S5\">const</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">int</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>SetLineState<span class=\"S10\">(</span>Sci_Position<span class=\"S0\"> </span>line<span class=\"S10\">,</span><span class=\"S0\"> </span><span class=\"S5\">int</span><span class=\"S0\"> </span>state<span class=\"S10\">)</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">void</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>StartStyling<span class=\"S10\">(</span>Sci_Position<span class=\"S0\"> </span>position<span class=\"S10\">)</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">bool</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>SetStyleFor<span class=\"S10\">(</span>Sci_Position<span class=\"S0\"> </span>length<span class=\"S10\">,</span><span class=\"S0\"> </span><span class=\"S5\">char</span><span class=\"S0\"> </span>style<span class=\"S10\">)</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">bool</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>SetStyles<span class=\"S10\">(</span>Sci_Position<span class=\"S0\"> </span>length<span class=\"S10\">,</span><span class=\"S0\"> </span><span class=\"S5\">const</span><span class=\"S0\"> </span><span class=\"S5\">char</span><span class=\"S0\"> </span><span class=\"S10\">*</span>styles<span class=\"S10\">)</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">void</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>DecorationSetCurrentIndicator<span class=\"S10\">(</span><span class=\"S5\">int</span><span class=\"S0\"> </span>indicator<span class=\"S10\">)</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">void</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>DecorationFillRange<span class=\"S10\">(</span>Sci_Position<span class=\"S0\"> </span>position<span class=\"S10\">,</span><span class=\"S0\"> </span><span class=\"S5\">int</span><span class=\"S0\"> </span>value<span class=\"S10\">,</span><span class=\"S0\"> </span>Sci_Position<span class=\"S0\"> </span>fillLength<span class=\"S10\">)</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">void</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>ChangeLexerState<span class=\"S10\">(</span>Sci_Position<span class=\"S0\"> </span>start<span class=\"S10\">,</span><span class=\"S0\"> </span>Sci_Position<span class=\"S0\"> </span>end<span class=\"S10\">)</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">int</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>CodePage<span class=\"S10\">()</span><span class=\"S0\"> </span><span class=\"S5\">const</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">bool</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>IsDBCSLeadByte<span class=\"S10\">(</span><span class=\"S5\">char</span><span class=\"S0\"> </span>ch<span class=\"S10\">)</span><span class=\"S0\"> </span><span class=\"S5\">const</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">const</span><span class=\"S0\"> </span><span class=\"S5\">char</span><span class=\"S0\"> </span><span class=\"S10\">*</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>BufferPointer<span class=\"S10\">()</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">int</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>GetLineIndentation<span class=\"S10\">(</span>Sci_Position<span class=\"S0\"> </span>line<span class=\"S10\">)</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span>Sci_Position<span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>LineEnd<span class=\"S10\">(</span>Sci_Position<span class=\"S0\"> </span>line<span class=\"S10\">)</span><span class=\"S0\"> </span><span class=\"S5\">const</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span>Sci_Position<span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>GetRelativePosition<span class=\"S10\">(</span>Sci_Position<span class=\"S0\"> </span>positionStart<span class=\"S10\">,</span><span class=\"S0\"> </span>Sci_Position<span class=\"S0\"> </span>characterOffset<span class=\"S10\">)</span><span class=\"S0\"> </span><span class=\"S5\">const</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S0\">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class=\"S5\">virtual</span><span class=\"S0\"> </span><span class=\"S5\">int</span><span class=\"S0\"> </span>SCI_METHOD<span class=\"S0\"> </span>GetCharacterAndWidth<span class=\"S10\">(</span>Sci_Position<span class=\"S0\"> </span>position<span class=\"S10\">,</span><span class=\"S0\"> </span>Sci_Position<span class=\"S0\"> </span><span class=\"S10\">*</span>pWidth<span class=\"S10\">)</span><span class=\"S0\"> </span><span class=\"S5\">const</span><span class=\"S0\"> </span><span class=\"S10\">=</span><span class=\"S0\"> </span><span class=\"S4\">0</span><span class=\"S10\">;</span><br />\r\n<span class=\"S10\">};</span><br />\r\n</div>\r\n\r\n<p>Scintilla tries to minimize the consequences of modifying text to\r\nonly relex and redraw the line of the change where possible. Lexer\r\nobjects contain their own private extra state which can affect later\r\nlines. For example, if the C++ lexer is greying out inactive code\r\nsegments then changing the statement <code>#define BEOS 0</code> to <code>#define\r\n BEOS 1</code> may require restyling and redisplaying later parts of the\r\n document. The lexer can call <code>ChangeLexerState</code> to signal to\r\n the document that it should relex and display more.</p>\r\n\r\n<p>For <code>StartStyling</code> the mask argument has no effect. It was used in version 3.4.2 and earlier.</p>\r\n\r\n<p><code>SetErrorStatus</code> is used to notify the document of\r\nexceptions. Exceptions should not be thrown over build boundaries as the\r\n two sides may be built with different compilers or incompatible\r\nexception options.</p>\r\n\r\n<p>\r\nTo allow lexers to determine the end position of a line and thus more easily support Unicode line ends\r\n<code>IDocument</code> includes <code>LineEnd</code> which should be used rather than testing for specific\r\nline end characters.</p>\r\n<p><code>GetRelativePosition</code> navigates the document by whole characters,\r\nreturning <code>INVALID_POSITION</code> for movement beyond the start and end of the document.</p>\r\n<p><code>GetCharacterAndWidth</code> provides a standard\r\nconversion from UTF-8 bytes to a UTF-32 character or from DBCS to a 16 bit value.\r\nBytes in invalid UTF-8 are reported individually with values 0xDC80+byteValue, which are\r\nnot valid Unicode code points.\r\nThe <code class=\"parameter\">pWidth</code> argument can be NULL if the caller does not need to know the number of\r\nbytes in the character.\r\n</p>\r\n\r\n<p>The <code>ILexer5</code> and <code>IDocument</code>  interfaces may be\r\nexpanded in the future with extended versions (<code>ILexer6</code>...).\r\n The <code>Version</code> method indicates which interface is\r\nimplemented and thus which methods may be called.</p>\r\n\r\n    <h2 id=\"Notifications\">Notifications</h2>\r\n\r\n    <p>Notifications are sent (fired) from the Scintilla control to its container when an event has\r\n    occurred that may interest the container.</p>\r\n    <p>Notifications are sent using the\r\n    <code>WM_NOTIFY</code> message on Windows.</p>\r\n    <p>On GTK, the \"sci-notify\" signal is sent and the signal handler should have the signature\r\n    <code>handler(GtkWidget *, gint, SCNotification *notification, gpointer  userData)</code>.</p>\r\n    <p>On Cocoa, a delegate implementing the <code>ScintillaNotificationProtocol</code>\r\n    may be set to receive notifications or the <code>ScintillaView</code> class may be subclassed and the\r\n    <code>notification:</code> method overridden. Overriding <code>notification:</code> allows the\r\n    subclass to control whether default handling is performed.</p>\r\n    <p>The container is\r\n    passed a <code>SCNotification</code> structure containing information about the event.</p>\r\n<pre id=\"SCNotification\">\r\nstruct Sci_NotifyHeader {   // This matches the Win32 NMHDR structure\r\n    void *hwndFrom;     // environment specific window handle/pointer\r\n    uptr_t idFrom;        // CtrlID of the window issuing the notification\r\n    unsigned int code;  // The SCN_* notification code\r\n};\r\n\r\nstruct SCNotification {\r\n\tstruct Sci_NotifyHeader nmhdr;\r\n\tSci_Position position;\r\n\t/* SCN_STYLENEEDED, SCN_DOUBLECLICK, SCN_MODIFIED, SCN_MARGINCLICK, */\r\n\t/* SCN_MARGINRIGHTCLICK, SCN_NEEDSHOWN, SCN_DWELLSTART, SCN_DWELLEND, */\r\n\t/* SCN_CALLTIPCLICK, SCN_HOTSPOTCLICK, SCN_HOTSPOTDOUBLECLICK, */\r\n\t/* SCN_HOTSPOTRELEASECLICK, SCN_INDICATORCLICK, SCN_INDICATORRELEASE, */\r\n\t/* SCN_USERLISTSELECTION, SCN_AUTOCSELECTION, SCN_AUTOCSELECTIONCHANGE */\r\n\r\n\tint ch;\r\n\t/* SCN_CHARADDED, SCN_KEY, SCN_AUTOCCOMPLETE, SCN_AUTOCSELECTION, */\r\n\t/* SCN_USERLISTSELECTION */\r\n\tint modifiers;\r\n\t/* SCN_KEY, SCN_DOUBLECLICK, SCN_HOTSPOTCLICK, SCN_HOTSPOTDOUBLECLICK, */\r\n\t/* SCN_HOTSPOTRELEASECLICK, SCN_INDICATORCLICK, SCN_INDICATORRELEASE, */\r\n\r\n\tint modificationType;\t/* SCN_MODIFIED */\r\n\tconst char *text;\r\n\t/* SCN_MODIFIED, SCN_USERLISTSELECTION, SCN_AUTOCSELECTION, SCN_URIDROPPED, */\r\n\t/* SCN_AUTOCSELECTIONCHANGE */\r\n\r\n\tSci_Position length;\t\t/* SCN_MODIFIED */\r\n\tSci_Position linesAdded;\t/* SCN_MODIFIED */\r\n\tint message;\t/* SCN_MACRORECORD */\r\n\tuptr_t wParam;\t/* SCN_MACRORECORD */\r\n\tsptr_t lParam;\t/* SCN_MACRORECORD */\r\n\tSci_Position line;\t\t/* SCN_MODIFIED */\r\n\tint foldLevelNow;\t/* SCN_MODIFIED */\r\n\tint foldLevelPrev;\t/* SCN_MODIFIED */\r\n\tint margin;\t\t/* SCN_MARGINCLICK, SCN_MARGINRIGHTCLICK */\r\n\tint listType;\t/* SCN_USERLISTSELECTION, SCN_AUTOCSELECTIONCHANGE */\r\n\tint x;\t\t\t/* SCN_DWELLSTART, SCN_DWELLEND */\r\n\tint y;\t\t/* SCN_DWELLSTART, SCN_DWELLEND */\r\n\tint token;\t\t/* SCN_MODIFIED with SC_MOD_CONTAINER */\r\n\tSci_Position annotationLinesAdded;\t/* SCN_MODIFIED with SC_MOD_CHANGEANNOTATION */\r\n\tint updated;\t/* SCN_UPDATEUI */\r\n\tint listCompletionMethod;\r\n\t/* SCN_AUTOCSELECTION, SCN_AUTOCCOMPLETED, SCN_USERLISTSELECTION */\r\n\tint characterSource;\t/* SCN_CHARADDED */\r\n};\r\n</pre>\r\n\r\n    <p>The notification messages that your container can choose to handle and the messages\r\n    associated with them are:</p>\r\n    <code><a class=\"message\" href=\"#SCN_STYLENEEDED\">SCN_STYLENEEDED</a><br />\r\n     <a class=\"message\" href=\"#SCN_CHARADDED\">SCN_CHARADDED</a><br />\r\n     <a class=\"message\" href=\"#SCN_SAVEPOINTREACHED\">SCN_SAVEPOINTREACHED</a><br />\r\n     <a class=\"message\" href=\"#SCN_SAVEPOINTLEFT\">SCN_SAVEPOINTLEFT</a><br />\r\n     <a class=\"message\" href=\"#SCN_MODIFYATTEMPTRO\">SCN_MODIFYATTEMPTRO</a><br />\r\n     <a class=\"message\" href=\"#SCN_KEY\">SCN_KEY</a><br />\r\n     <a class=\"message\" href=\"#SCN_DOUBLECLICK\">SCN_DOUBLECLICK</a><br />\r\n     <a class=\"message\" href=\"#SCN_UPDATEUI\">SCN_UPDATEUI</a><br />\r\n     <a class=\"message\" href=\"#SCN_MODIFIED\">SCN_MODIFIED</a><br />\r\n     <a class=\"message\" href=\"#SCN_MACRORECORD\">SCN_MACRORECORD</a><br />\r\n     <a class=\"message\" href=\"#SCN_MARGINCLICK\">SCN_MARGINCLICK</a><br />\r\n     <a class=\"message\" href=\"#SCN_NEEDSHOWN\">SCN_NEEDSHOWN</a><br />\r\n     <a class=\"message\" href=\"#SCN_PAINTED\">SCN_PAINTED</a><br />\r\n     <a class=\"message\" href=\"#SCN_USERLISTSELECTION\">SCN_USERLISTSELECTION</a><br />\r\n     <a class=\"message\" href=\"#SCN_URIDROPPED\">SCN_URIDROPPED</a><br />\r\n     <a class=\"message\" href=\"#SCN_DWELLSTART\">SCN_DWELLSTART</a><br />\r\n     <a class=\"message\" href=\"#SCN_DWELLEND\">SCN_DWELLEND</a><br />\r\n     <a class=\"message\" href=\"#SCN_ZOOM\">SCN_ZOOM</a><br />\r\n     <a class=\"message\" href=\"#SCN_HOTSPOTCLICK\">SCN_HOTSPOTCLICK</a><br />\r\n     <a class=\"message\" href=\"#SCN_HOTSPOTDOUBLECLICK\">SCN_HOTSPOTDOUBLECLICK</a><br />\r\n     <a class=\"message\" href=\"#SCN_HOTSPOTRELEASECLICK\">SCN_HOTSPOTRELEASECLICK</a><br />\r\n     <a class=\"message\" href=\"#SCN_INDICATORCLICK\">SCN_INDICATORCLICK</a><br />\r\n     <a class=\"message\" href=\"#SCN_INDICATORRELEASE\">SCN_INDICATORRELEASE</a><br />\r\n     <a class=\"message\" href=\"#SCN_CALLTIPCLICK\">SCN_CALLTIPCLICK</a><br />\r\n     <a class=\"message\" href=\"#SCN_AUTOCSELECTION\">SCN_AUTOCSELECTION</a><br />\r\n     <a class=\"message\" href=\"#SCN_AUTOCCANCELLED\">SCN_AUTOCCANCELLED</a><br />\r\n     <a class=\"message\" href=\"#SCN_AUTOCCHARDELETED\">SCN_AUTOCCHARDELETED</a><br />\r\n     <a class=\"message\" href=\"#SCN_FOCUSIN\">SCN_FOCUSIN</a><br />\r\n     <a class=\"message\" href=\"#SCN_FOCUSOUT\">SCN_FOCUSOUT</a><br />\r\n     <a class=\"message\" href=\"#SCN_AUTOCCOMPLETED\">SCN_AUTOCCOMPLETED</a><br />\r\n     <a class=\"message\" href=\"#SCN_MARGINRIGHTCLICK\">SCN_MARGINRIGHTCLICK</a><br />\r\n     <a class=\"message\" href=\"#SCN_AUTOCSELECTIONCHANGE\">SCN_AUTOCSELECTIONCHANGE</a><br />\r\n    </code>\r\n\r\n    <p>The following <code>SCI_*</code> messages are associated with these notifications:</p>\r\n    <code><a class=\"message\" href=\"#SCI_SETMODEVENTMASK\">SCI_SETMODEVENTMASK(int eventMask)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETMODEVENTMASK\">SCI_GETMODEVENTMASK &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETCOMMANDEVENTS\">SCI_SETCOMMANDEVENTS(bool commandEvents)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETCOMMANDEVENTS\">SCI_GETCOMMANDEVENTS &rarr; bool</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETMOUSEDWELLTIME\">SCI_SETMOUSEDWELLTIME(int periodMilliseconds)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETMOUSEDWELLTIME\">SCI_GETMOUSEDWELLTIME &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETIDENTIFIER\">SCI_SETIDENTIFIER(int identifier)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETIDENTIFIER\">SCI_GETIDENTIFIER &rarr; int</a><br />\r\n    </code>\r\n\r\n    <p>The following additional notifications are sent using a secondary \"command\" method and should\r\n    be avoided in new code as the primary \"notification\" method provides all the same events with richer\r\n    information.\r\n    The <code>WM_COMMAND</code> message is used on Windows.\r\n    This emulates the Windows Edit control. Only the lower\r\n    16 bits of the control's ID is passed in these notifications.</p>\r\n    <p>On GTK, the \"command\" signal is sent and the signal handler should have the signature\r\n    <code>handler(GtkWidget *, gint wParam, gpointer lParam, gpointer userData)</code>.</p>\r\n    <code><a class=\"message\" href=\"#SCEN_CHANGE\">SCEN_CHANGE</a><br />\r\n     <a class=\"message\" href=\"#SCEN_SETFOCUS\">SCEN_SETFOCUS</a><br />\r\n     <a class=\"message\" href=\"#SCEN_KILLFOCUS\">SCEN_KILLFOCUS</a><br />\r\n    </code>\r\n\r\n    <p><b id=\"SCI_SETIDENTIFIER\">SCI_SETIDENTIFIER(int identifier)</b><br />\r\n     <b id=\"SCI_GETIDENTIFIER\">SCI_GETIDENTIFIER &rarr; int</b><br />\r\n     These two messages set and get the identifier of the Scintilla instance which is included in notifications as the\r\n     <code>idFrom</code> field.\r\n     When an application creates multiple Scintilla widgets, this allows the source of each notification to be found.\r\n     On Windows, this value is initialised in the <code>CreateWindow</code> call and stored as the\r\n     <code>GWLP_ID</code> attribute of the window.\r\n     The value should be small, preferably less than 16 bits,\r\n     rather than a pointer as some of the functions will only transmit 16 or 32 bits.\r\n    </p>\r\n\r\n    <p><b id=\"SCN_STYLENEEDED\">SCN_STYLENEEDED</b><br />\r\n     If you used <code><a class=\"message\"\r\n    href=\"#SCI_SETILEXER\">SCI_SETILEXER</a>(NULL)</code> to make the container act as the\r\n    lexer, you will receive this notification when Scintilla is about to display or print text that\r\n    requires styling. You are required to style the text from the line that contains the position\r\n    returned by <a class=\"seealso\" href=\"#SCI_GETENDSTYLED\"><code>SCI_GETENDSTYLED</code></a> up to\r\n    the position passed in <code>SCNotification.position</code>. Symbolically, you need code of the\r\n    form:</p>\r\n<pre>\r\n    startPos = <a class=\"seealso\" href=\"#SCI_GETENDSTYLED\">SCI_GETENDSTYLED</a>()\r\n    lineNumber = <a class=\"seealso\" href=\"#SCI_LINEFROMPOSITION\">SCI_LINEFROMPOSITION</a>(startPos);\r\n    startPos = <a class=\"seealso\" href=\"#SCI_POSITIONFROMLINE\">SCI_POSITIONFROMLINE</a>(lineNumber);\r\n    MyStyleRoutine(startPos, SCNotification.position);\r\n</pre>\r\n\r\n    <p><b id=\"SCN_CHARADDED\">SCN_CHARADDED</b><br />\r\n     This is sent when the user types an ordinary text character (as opposed to a command\r\n    character) that is entered into the text. The container can use this to decide to display a <a\r\n    class=\"jump\" href=\"#CallTips\">call tip</a> or an <a class=\"jump\" href=\"#Autocompletion\">auto\r\n    completion list</a>. The character is in <code>SCNotification::ch</code>.\r\n        For single byte character sets, this is the byte value of the character;\r\n        for UTF-8, it is the Unicode code point;\r\n        for DBCS, it is (first byte * 256 + second byte) for 2 byte characters and the byte value for 1 byte characters.\r\n        This notification is sent before the character has been styled so processing that depends on\r\n        styling should instead be performed in the SCN_UPDATEUI notification.</p>\r\n    <p>The <code>SCNotification::characterSource</code> field is the source of the character.</p>\r\n\r\n    <table class=\"standard\" summary=\"Character Source\">\r\n      <tbody>\r\n        <tr>\r\n          <th align=\"left\">Symbol</th>\r\n          <th>Value</th>\r\n          <th align=\"left\">Meaning</th>\r\n        </tr>\r\n      </tbody>\r\n      <tbody>\r\n        <tr>\r\n          <td><code>SC_CHARACTERSOURCE_DIRECT_INPUT</code></td>\r\n          <td>0</td>\r\n          <td>Direct input characters, including characters generated by calling keyboard commands like <a class=\"seealso\" href=\"#SCI_NEWLINE\">SCI_NEWLINE</a>.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>SC_CHARACTERSOURCE_TENTATIVE_INPUT</code></td>\r\n          <td>1</td>\r\n          <td>Tentative input characters. They are used by IME (inline mode, see <a class=\"seealso\" href=\"#SCI_SETIMEINTERACTION\">SCI_SETIMEINTERACTION</a>)\r\n          to composite final string, normally different from final composited string (which is the string that has been truly added into current document),\r\n          and may be withdrawn when the user cancels typing (e.g. by pressing Esc key).\r\n          Some system (at least Cocoa) also use tentative input for non-IME features like using dead key to composite diacritical marks (grave accent, etc.).\r\n          These characters are not added to macro recording. Most applications can simply ignore the notification when this value is set.\r\n          </td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td><code>SC_CHARACTERSOURCE_IME_RESULT</code></td>\r\n          <td>2</td>\r\n          <td>IME (either inline or windowed mode) full composited string. Modern IME is able to composite English word or sentence,\r\n          when this value is set, current character may not a Chinese, Japanese or Korean character.\r\n          Currently, this is only set on Windows.</td>\r\n        </tr>\r\n\r\n      </tbody>\r\n    </table>\r\n\r\n    <p><b id=\"SCN_SAVEPOINTREACHED\">SCN_SAVEPOINTREACHED</b><br />\r\n     <b id=\"SCN_SAVEPOINTLEFT\">SCN_SAVEPOINTLEFT</b><br />\r\n     Sent to the container when the save point is entered or left, allowing the container to\r\n    display a \"document dirty\" indicator and change its menus.<br />\r\n     See also: <a class=\"message\" href=\"#SCI_SETSAVEPOINT\"><code>SCI_SETSAVEPOINT</code></a>, <a\r\n    class=\"message\" href=\"#SCI_GETMODIFY\"><code>SCI_GETMODIFY</code></a></p>\r\n\r\n    <p><b id=\"SCN_MODIFYATTEMPTRO\">SCN_MODIFYATTEMPTRO</b><br />\r\n     When in read-only mode, this notification is sent to the container if the user tries to change\r\n    the text. This can be used to check the document out of a version control system. You can set\r\n    the read-only state of a document with <code><a class=\"message\"\r\n    href=\"#SCI_SETREADONLY\">SCI_SETREADONLY</a></code>.</p>\r\n\r\n    <p><b id=\"SCN_KEY\">SCN_KEY</b><br />\r\n     Reports all keys pressed but not consumed by Scintilla. Used on GTK because of\r\n     some problems with keyboard focus and is not sent by the Windows version. <code>SCNotification::ch</code> holds the key code and\r\n    <code>SCNotification.modifiers</code> holds the modifiers. This notification is sent if the\r\n    modifiers include <code>SCMOD_ALT</code> or <code>SCMOD_CTRL</code> and the key code is less\r\n    than 256.</p>\r\n\r\n    <p><b id=\"SCN_DOUBLECLICK\">SCN_DOUBLECLICK</b><br />\r\n     The mouse button was double clicked in editor. The <code>position</code> field is set to the text position of the\r\n    double click, the <code>line</code> field is set to the line of the double click, and\r\n    the <code>modifiers</code> field is set to the key modifiers\r\n    held down in a similar manner to <a class=\"message\" href=\"#SCN_KEY\">SCN_KEY</a>.</p>\r\n\r\n    <p><b id=\"SCN_UPDATEUI\">SCN_UPDATEUI</b><br />\r\n     Either the text or styling of the document has changed or the selection range or scroll position may have changed.\r\n     Now would be a good time to update any container UI elements that depend on document or view state.\r\n     As it is sometimes difficult to determine whether a change has occurred, these events may also fire when there\r\n     has been no actual change.\r\n     The <code>updated</code> field is set to the bit set of things changed since the previous notification.</p>\r\n    <table class=\"standard\" summary=\"Modify notification type flags\">\r\n      <tbody>\r\n        <tr>\r\n          <th align=\"left\">Symbol</th>\r\n\r\n          <th>Value</th>\r\n\r\n          <th align=\"left\">Meaning</th>\r\n\r\n        </tr>\r\n      </tbody>\r\n\r\n      <tbody valign=\"top\">\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>SC_UPDATE_NONE</code></td>\r\n\r\n          <td align=\"center\">0x00</td>\r\n\r\n          <td>Value without any changes.</td>\r\n\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>SC_UPDATE_CONTENT</code></td>\r\n\r\n          <td align=\"center\">0x01</td>\r\n\r\n          <td>Contents, styling or markers may have been changed.</td>\r\n\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>SC_UPDATE_SELECTION</code></td>\r\n\r\n          <td align=\"center\">0x02</td>\r\n\r\n          <td>Selection may have been changed.</td>\r\n\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>SC_UPDATE_V_SCROLL</code></td>\r\n\r\n          <td align=\"center\">0x04</td>\r\n\r\n          <td>May have scrolled vertically.</td>\r\n\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>SC_UPDATE_H_SCROLL</code></td>\r\n\r\n          <td align=\"center\">0x08</td>\r\n\r\n          <td>May have scrolled horizontally.</td>\r\n\r\n        </tr>\r\n      </tbody>\r\n    </table>\r\n\r\n    <p><b id=\"SCN_MODIFIED\">SCN_MODIFIED</b><br />\r\n     This notification is sent when the text or styling of the document changes or is about to\r\n    change. You can set a mask for the notifications that are sent to the container with <a\r\n    class=\"message\" href=\"#SCI_SETMODEVENTMASK\"><code>SCI_SETMODEVENTMASK</code></a>. The\r\n    notification structure contains information about what changed, how the change occurred and\r\n    whether this changed the number of lines in the document. No modifications may be performed\r\n    while in a <code>SCN_MODIFIED</code> event. The <code>SCNotification</code> fields used\r\n    are:</p>\r\n\r\n    <table class=\"standard\" summary=\"Modify notification types\">\r\n      <tbody>\r\n        <tr>\r\n          <th align=\"left\">Field</th>\r\n\r\n          <th align=\"left\">Usage</th>\r\n        </tr>\r\n      </tbody>\r\n\r\n      <tbody valign=\"top\">\r\n        <tr>\r\n          <td align=\"left\"><code>modificationType</code></td>\r\n\r\n          <td align=\"left\">A set of flags that identify the change(s) made. See the next\r\n          table.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>position</code></td>\r\n\r\n          <td align=\"left\">Start position of a text or styling change. Set to 0 if not used.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>length</code></td>\r\n\r\n          <td align=\"left\">Length of the change in bytes when the text or styling\r\n          changes. Set to 0 if not used.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>linesAdded</code></td>\r\n\r\n          <td align=\"left\">Number of added lines. If negative, the number of deleted lines. Set to\r\n          0 if not used or no lines added or deleted.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>text</code></td>\r\n\r\n          <td align=\"left\">Valid for text changes, not for style changes. If we are collecting undo\r\n          information this holds a pointer to the text that is handed to the Undo system, otherwise\r\n          it is zero. For user performed SC_MOD_BEFOREDELETE the text field is 0.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>line</code></td>\r\n\r\n          <td align=\"left\">The line number at which a fold level or marker change occurred. This is\r\n          0 if unused and may be -1 if more than one line changed.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>foldLevelNow</code></td>\r\n\r\n          <td align=\"left\">The new fold level applied to the line or 0 if this field is\r\n          unused.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>foldLevelPrev</code></td>\r\n\r\n          <td align=\"left\">The previous folding level of the line or 0 if this field is\r\n          unused.</td>\r\n        </tr>\r\n      </tbody>\r\n    </table>\r\n\r\n    <p>The <code>SCNotification.modificationType</code> field has bits set to tell you what has\r\n    been done. The <code>SC_MOD_*</code> bits correspond to actions. The\r\n    <code>SC_PERFORMED_*</code> bits tell you if the action was done by the user, or the result of\r\n    Undo or Redo of a previous action.</p>\r\n\r\n    <table class=\"standard\" summary=\"Modify notification type flags\">\r\n      <tbody>\r\n        <tr>\r\n          <th align=\"left\">Symbol</th>\r\n\r\n          <th>Value</th>\r\n\r\n          <th align=\"left\">Meaning</th>\r\n\r\n          <th align=\"left\">SCNotification fields</th>\r\n        </tr>\r\n      </tbody>\r\n\r\n      <tbody valign=\"top\">\r\n        <tr>\r\n          <td align=\"left\"><code>SC_MOD_NONE</code></td>\r\n\r\n          <td align=\"right\">0x00</td>\r\n\r\n          <td>Base value with no fields valid. Will not occur but is useful in tests.</td>\r\n\r\n          <td></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>SC_MOD_INSERTTEXT</code></td>\r\n\r\n          <td align=\"right\">0x01</td>\r\n\r\n          <td>Text has been inserted into the document.</td>\r\n\r\n          <td><code>position, length, text, linesAdded</code></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>SC_MOD_DELETETEXT</code></td>\r\n\r\n          <td align=\"right\">0x02</td>\r\n\r\n          <td>Text has been removed from the document.</td>\r\n\r\n          <td><code>position, length, text, linesAdded</code></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>SC_MOD_CHANGESTYLE</code></td>\r\n\r\n          <td align=\"right\">0x04</td>\r\n\r\n          <td>A style change has occurred.</td>\r\n\r\n          <td><code>position, length</code></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>SC_MOD_CHANGEFOLD</code></td>\r\n\r\n          <td align=\"right\">0x08</td>\r\n\r\n          <td>A folding change has occurred.</td>\r\n\r\n          <td><code>line, foldLevelNow, foldLevelPrev</code></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>SC_PERFORMED_USER</code></td>\r\n\r\n          <td align=\"right\">0x10</td>\r\n\r\n          <td>Information: the operation was done by the user.</td>\r\n\r\n          <td>None</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>SC_PERFORMED_UNDO</code></td>\r\n\r\n          <td align=\"right\">0x20</td>\r\n\r\n          <td>Information: this was the result of an Undo.</td>\r\n\r\n          <td>None</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>SC_PERFORMED_REDO</code></td>\r\n\r\n          <td align=\"right\">0x40</td>\r\n\r\n          <td>Information: this was the result of a Redo.</td>\r\n\r\n          <td>None</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>SC_MULTISTEPUNDOREDO</code></td>\r\n\r\n          <td align=\"right\">0x80</td>\r\n\r\n          <td>This is part of a multi-step Undo or Redo transaction.</td>\r\n\r\n          <td>None</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>SC_LASTSTEPINUNDOREDO</code></td>\r\n\r\n          <td align=\"right\">0x100</td>\r\n\r\n          <td>This is the final step in an Undo or Redo transaction.</td>\r\n\r\n          <td>None</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>SC_MOD_CHANGEMARKER</code></td>\r\n\r\n          <td align=\"right\">0x200</td>\r\n\r\n          <td>One or more markers has changed in a line.</td>\r\n\r\n          <td><code>line</code></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>SC_MOD_BEFOREINSERT</code></td>\r\n\r\n          <td align=\"right\">0x400</td>\r\n\r\n          <td>Text is about to be inserted into the document.</td>\r\n\r\n          <td><code>position, if performed by user then text in bytes, length in bytes</code></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>SC_MOD_BEFOREDELETE</code></td>\r\n\r\n          <td align=\"right\">0x800</td>\r\n\r\n          <td>Text is about to be deleted from the document.</td>\r\n\r\n          <td><code>position, length</code></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>SC_MOD_CHANGEINDICATOR</code></td>\r\n\r\n          <td align=\"right\">0x4000</td>\r\n\r\n          <td>An indicator has been added or removed from a range of text.</td>\r\n\r\n          <td><code>position, length</code></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code id=\"SC_MOD_CHANGELINESTATE\">SC_MOD_CHANGELINESTATE</code></td>\r\n\r\n          <td align=\"right\">0x8000</td>\r\n\r\n          <td>A line state has changed because <a class=\"seealso\" href=\"#SCI_SETLINESTATE\">SCI_SETLINESTATE</a>\r\n          was called.</td>\r\n\r\n          <td><code>line</code></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code id=\"SC_MOD_CHANGETABSTOPS\">SC_MOD_CHANGETABSTOPS</code></td>\r\n\r\n          <td align=\"right\">0x200000</td>\r\n\r\n          <td>The explicit tab stops on a line have changed because <a class=\"seealso\" href=\"#SCI_CLEARTABSTOPS\">SCI_CLEARTABSTOPS</a> or\r\n          <a class=\"seealso\" href=\"#SCI_ADDTABSTOP\">SCI_ADDTABSTOP</a> was called.</td>\r\n\r\n          <td><code>line</code></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code id=\"SC_MOD_LEXERSTATE\">SC_MOD_LEXERSTATE</code></td>\r\n\r\n          <td align=\"right\">0x80000</td>\r\n\r\n          <td>The internal state of a lexer has changed over a range.</td>\r\n\r\n          <td><code>position, length</code></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code id=\"SC_MOD_CHANGEMARGIN\">SC_MOD_CHANGEMARGIN</code></td>\r\n\r\n          <td align=\"right\">0x10000</td>\r\n\r\n          <td>A text margin has changed.</td>\r\n\r\n          <td><code>line</code></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code id=\"SC_MOD_CHANGEANNOTATION\">SC_MOD_CHANGEANNOTATION</code></td>\r\n\r\n          <td align=\"right\">0x20000</td>\r\n\r\n          <td>An annotation has changed.</td>\r\n\r\n          <td><code>line</code></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code id=\"SC_MOD_INSERTCHECK\">SC_MOD_INSERTCHECK</code></td>\r\n\r\n          <td align=\"right\">0x100000</td>\r\n\r\n          <td>Text is about to be inserted. The handler may change the text being inserted by calling\r\n            <a class=\"seealso\" href=\"#SCI_CHANGEINSERTION\">SCI_CHANGEINSERTION</a>.\r\n            No other modifications may be made in this handler.</td>\r\n\r\n          <td><code>position, length, text</code></td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>SC_MULTILINEUNDOREDO</code></td>\r\n\r\n          <td align=\"right\">0x1000</td>\r\n\r\n          <td>This is part of an Undo or Redo with multi-line changes.</td>\r\n\r\n          <td>None</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>SC_STARTACTION</code></td>\r\n\r\n          <td align=\"right\">0x2000</td>\r\n\r\n          <td>This is set on a SC_PERFORMED_USER action when it is the\r\n          first or only step in an undo transaction. This can be used to integrate the Scintilla\r\n          undo stack with an undo stack in the container application by adding a Scintilla\r\n          action to the container's stack for the currently opened container transaction or\r\n          to open a new container transaction if there is no open container transaction.\r\n          </td>\r\n\r\n          <td>None</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code id=\"SC_MOD_CONTAINER\">SC_MOD_CONTAINER</code></td>\r\n\r\n          <td align=\"right\">0x40000</td>\r\n\r\n          <td>This is set on for actions that the container stored into the undo stack with\r\n\t  <a class=\"message\" href=\"#SCI_ADDUNDOACTION\"><code>SCI_ADDUNDOACTION</code></a>.\r\n          </td>\r\n\r\n          <td>token</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>SC_MODEVENTMASKALL</code></td>\r\n\r\n          <td align=\"right\">0x1FFFFF</td>\r\n\r\n          <td>This is a mask for all valid flags. This is the default mask state set by <a\r\n          class=\"message\" href=\"#SCI_SETMODEVENTMASK\"><code>SCI_SETMODEVENTMASK</code></a>.</td>\r\n\r\n          <td>None</td>\r\n        </tr>\r\n      </tbody>\r\n    </table>\r\n\r\n    <p><b id=\"SCEN_CHANGE\">SCEN_CHANGE</b><br />\r\n     <code>SCEN_CHANGE</code> (768) is fired when the text (not the style) of the document changes.\r\n    This notification is sent using the <code>WM_COMMAND</code> message on Windows and the\r\n    \"command\" signal on GTK as this is the behaviour of the standard Edit control\r\n    (<code>SCEN_CHANGE</code> has the same value as the Windows Edit control\r\n    <code>EN_CHANGE</code>). No other information is sent. If you need more detailed information\r\n    use <a class=\"message\" href=\"#SCN_MODIFIED\"><code>SCN_MODIFIED</code></a>. You can filter the\r\n    types of changes you are notified about with <a class=\"message\"\r\n    href=\"#SCI_SETMODEVENTMASK\"><code>SCI_SETMODEVENTMASK</code></a> and\r\n    <a class=\"message\"\r\n    href=\"#SCI_SETCOMMANDEVENTS\"><code>SCI_SETCOMMANDEVENTS</code></a>.</p>\r\n\r\n    <p><b id=\"SCI_SETMODEVENTMASK\">SCI_SETMODEVENTMASK(int eventMask)</b><br />\r\n     <b id=\"SCI_GETMODEVENTMASK\">SCI_GETMODEVENTMASK &rarr; int</b><br />\r\n     These messages set and get an event mask that determines which document change events are\r\n    notified to the container with <a class=\"message\"\r\n    href=\"#SCN_MODIFIED\"><code>SCN_MODIFIED</code></a> and <a class=\"message\"\r\n    href=\"#SCEN_CHANGE\"><code>SCEN_CHANGE</code></a>. For example, a container may decide to see\r\n    only notifications about changes to text and not styling changes by calling\r\n    <code>SCI_SETMODEVENTMASK(SC_MOD_INSERTTEXT|SC_MOD_DELETETEXT)</code>.</p>\r\n\r\n    <p>The possible notification types are the same as the <code>modificationType</code> bit flags\r\n    used by <code>SCN_MODIFIED</code>: <code>SC_MOD_INSERTTEXT</code>,\r\n    <code>SC_MOD_DELETETEXT</code>, <code>SC_MOD_CHANGESTYLE</code>,\r\n    <code>SC_MOD_CHANGEFOLD</code>, <code>SC_PERFORMED_USER</code>, <code>SC_PERFORMED_UNDO</code>,\r\n    <code>SC_PERFORMED_REDO</code>, <code>SC_MULTISTEPUNDOREDO</code>,\r\n    <code>SC_LASTSTEPINUNDOREDO</code>, <code>SC_MOD_CHANGEMARKER</code>,\r\n    <code>SC_MOD_BEFOREINSERT</code>, <code>SC_MOD_BEFOREDELETE</code>,\r\n    <code>SC_MULTILINEUNDOREDO</code>, and <code>SC_MODEVENTMASKALL</code>.</p>\r\n\r\n    <p><b id=\"SCI_SETCOMMANDEVENTS\">SCI_SETCOMMANDEVENTS(bool commandEvents)</b><br />\r\n     <b id=\"SCI_GETCOMMANDEVENTS\">SCI_GETCOMMANDEVENTS &rarr; bool</b><br />\r\n     These messages set and get whether <code>SCEN_*</code> command events are\r\n    sent to the container. For <code>SCEN_CHANGE</code> this acts as an additional filter over\r\n    <a class=\"message\" href=\"#SCI_SETMODEVENTMASK\"><code>SCI_SETMODEVENTMASK</code></a>.\r\n    Most applications should set this off to avoid overhead and only use\r\n    <a class=\"message\" href=\"#SCN_MODIFIED\"><code>SCN_MODIFIED</code></a>.</p>\r\n\r\n    <p><b id=\"SCEN_SETFOCUS\">SCEN_SETFOCUS</b><br />\r\n     <b id=\"SCEN_KILLFOCUS\">SCEN_KILLFOCUS</b><br />\r\n     <code>SCEN_SETFOCUS</code> (512) is fired when Scintilla receives focus and\r\n    <code>SCEN_KILLFOCUS</code> (256) when it loses focus. These notifications are sent using the\r\n    <code>WM_COMMAND</code> message on Windows and the \"command\" signal on GTK as this is the\r\n    behaviour of the standard Edit control. Unfortunately, these codes do not match the Windows Edit\r\n    notification codes <code>EN_SETFOCUS</code> (256) and <code>EN_KILLFOCUS</code> (512). It is\r\n    now too late to change the Scintilla codes as clients depend on the current values.</p>\r\n\r\n    <p><b id=\"SCN_MACRORECORD\">SCN_MACRORECORD</b><br />\r\n     The <code><a class=\"message\" href=\"#SCI_STARTRECORD\">SCI_STARTRECORD</a></code> and <a\r\n    class=\"message\" href=\"#SCI_STOPRECORD\"><code>SCI_STOPRECORD</code></a> messages enable and\r\n    disable macro recording. When enabled, each time a recordable change occurs, the\r\n    <code>SCN_MACRORECORD</code> notification is sent to the container. It is up to the container\r\n    to record the action. To see the complete list of <code>SCI_*</code> messages that are\r\n    recordable, search the Scintilla source <code>Editor.cxx</code> for\r\n    <code>Editor::NotifyMacroRecord</code>. The fields of <code>SCNotification</code> set in this\r\n    notification are:</p>\r\n\r\n    <table class=\"standard\" summary=\"Macro record notification data\">\r\n      <tbody>\r\n        <tr>\r\n          <th align=\"left\">Field</th>\r\n\r\n          <th align=\"left\">Usage</th>\r\n        </tr>\r\n      </tbody>\r\n\r\n      <tbody valign=\"top\">\r\n        <tr>\r\n          <td align=\"left\"><code>message</code></td>\r\n\r\n          <td align=\"left\">The <code>SCI_*</code> message that caused the notification.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>wParam</code></td>\r\n\r\n          <td align=\"left\">The value of <code>wParam</code> in the <code>SCI_*</code> message.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>lParam</code></td>\r\n\r\n          <td align=\"left\">The value of <code>lParam</code> in the <code>SCI_*</code> message.</td>\r\n        </tr>\r\n      </tbody>\r\n    </table>\r\n\r\n    <p><b id=\"SCN_MARGINCLICK\">SCN_MARGINCLICK</b><br />\r\n     <b id=\"SCN_MARGINRIGHTCLICK\">SCN_MARGINRIGHTCLICK</b><br />\r\n     These notifications tell the container that the mouse was clicked or right clicked inside a <a class=\"jump\"\r\n    href=\"#Margins\">margin</a> that was marked as sensitive (see <a class=\"message\"\r\n    href=\"#SCI_SETMARGINSENSITIVEN\"><code>SCI_SETMARGINSENSITIVEN</code></a>). This can be used to\r\n    perform folding or to place breakpoints. The following <code>SCNotification</code> fields are\r\n    used:</p>\r\n\r\n    <table class=\"standard\" summary=\"Margin click notification\">\r\n      <tbody>\r\n        <tr>\r\n          <th align=\"left\">Field</th>\r\n\r\n          <th align=\"left\">Usage</th>\r\n        </tr>\r\n      </tbody>\r\n\r\n      <tbody valign=\"top\">\r\n        <tr>\r\n          <td align=\"left\"><code>modifiers</code></td>\r\n\r\n          <td align=\"left\">The appropriate combination of <code>SCI_SHIFT</code>,\r\n          <code>SCI_CTRL</code> and <code>SCI_ALT</code> to indicate the keys that were held down\r\n          at the time of the margin click.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>position</code></td>\r\n\r\n          <td align=\"left\">The position of the start of the line in the document that corresponds\r\n          to the margin click.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>margin</code></td>\r\n\r\n          <td align=\"left\">The margin number that was clicked.</td>\r\n        </tr>\r\n      </tbody>\r\n    </table>\r\n\r\n    <p><b id=\"SCN_NEEDSHOWN\">SCN_NEEDSHOWN</b><br />\r\n     Scintilla has determined that a range of lines that is currently invisible should be made\r\n    visible. An example of where this may be needed is if the end of line of a contracted fold\r\n    point is deleted. This message is sent to the container in case it wants to make the line\r\n    visible in some unusual way such as making the whole document visible. Most containers will\r\n    just ensure each line in the range is visible by calling <a class=\"message\"\r\n    href=\"#SCI_ENSUREVISIBLE\"><code>SCI_ENSUREVISIBLE</code></a>. The <code>position</code> and\r\n    <code>length</code> fields of <code>SCNotification</code> indicate the range of the document\r\n    that should be made visible. The container code will be similar to the following code\r\n    skeleton:</p>\r\n<pre>\r\nfirstLine = SCI_LINEFROMPOSITION(scn.position)\r\nlastLine = SCI_LINEFROMPOSITION(scn.position+scn.length-1)\r\nfor line = lineStart to lineEnd do SCI_ENSUREVISIBLE(line) next\r\n</pre>\r\n\r\n    <p><b id=\"SCN_PAINTED\">SCN_PAINTED</b><br />\r\n     Painting has just been done. Useful when you want to update some other widgets based on a\r\n    change in Scintilla, but want to have the paint occur first to appear more responsive. There is\r\n    no other information in <code>SCNotification</code>.</p>\r\n\r\n    <p><b id=\"SCN_USERLISTSELECTION\">SCN_USERLISTSELECTION</b><br />\r\n     The user has selected an item in a <a class=\"jump\" href=\"#UserLists\">user list</a>. The\r\n    <code>SCNotification</code> fields used are:</p>\r\n\r\n    <table class=\"standard\" summary=\"User list notification\">\r\n      <tbody>\r\n        <tr>\r\n          <th align=\"left\">Field</th>\r\n\r\n          <th align=\"left\">Usage</th>\r\n        </tr>\r\n      </tbody>\r\n\r\n      <tbody valign=\"top\">\r\n        <tr>\r\n          <td align=\"left\"><code>listType</code></td>\r\n\r\n          <td align=\"left\">This is set to the <code class=\"parameter\">listType</code> parameter from the <a\r\n          class=\"message\" href=\"#SCI_USERLISTSHOW\"><code>SCI_USERLISTSHOW</code></a> message that\r\n          initiated the list.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>text</code></td>\r\n\r\n          <td align=\"left\">The text of the selection.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>position</code></td>\r\n\r\n          <td align=\"left\">The position the list was displayed at.</td>\r\n        </tr>\r\n        <tr>\r\n          <td align=\"left\"><code>ch</code></td>\r\n\r\n          <td align=\"left\">If a fillup character was the method of selection, the used\r\n            character, otherwise 0.</td>\r\n        </tr>\r\n        <tr>\r\n          <td align=\"left\"><code>listCompletionMethod</code></td>\r\n\r\n          <td align=\"left\">A value indicating the way in which the completion\r\n            occurred. See the table below.</td>\r\n        </tr>\r\n      </tbody>\r\n    </table>\r\n    <br />\r\n\r\n     See the <code><a class=\"jump\" href=\"#SCN_AUTOCCOMPLETED\">SCN_AUTOCCOMPLETED</a></code> notification\r\n    for the possible values for <code>listCompletionMethod.</code>\r\n    <p><b id=\"SCN_URIDROPPED\">SCN_URIDROPPED</b><br />\r\n     Only on the GTK version. Indicates that the user has dragged a URI such as a file name or Web\r\n    address onto Scintilla. The container could interpret this as a request to open the file. The\r\n    <code>text</code> field of <code>SCNotification</code> points at the URI text.</p>\r\n\r\n    <p><b id=\"SCN_DWELLSTART\">SCN_DWELLSTART</b><br />\r\n     <b id=\"SCN_DWELLEND\">SCN_DWELLEND</b><br />\r\n     <code>SCN_DWELLSTART</code> is generated when the user keeps the mouse in one position for the\r\n    dwell period (see <code><a class=\"message\"\r\n    href=\"#SCI_SETMOUSEDWELLTIME\">SCI_SETMOUSEDWELLTIME</a></code>). <code>SCN_DWELLEND</code> is\r\n    generated after a <code>SCN_DWELLSTART</code> and the mouse is moved or other activity such as\r\n    key press indicates the dwell is over. Both notifications set the same fields in\r\n    <code>SCNotification</code>:</p>\r\n\r\n    <table class=\"standard\" summary=\"Mouse dwell notification\">\r\n      <tbody>\r\n        <tr>\r\n          <th align=\"left\">Field</th>\r\n\r\n          <th align=\"left\">Usage</th>\r\n        </tr>\r\n      </tbody>\r\n\r\n      <tbody valign=\"top\">\r\n        <tr>\r\n          <td align=\"left\"><code>position</code></td>\r\n\r\n          <td align=\"left\">This is the nearest position in the document to the position where the\r\n          mouse pointer was lingering.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>x, y</code></td>\r\n\r\n          <td align=\"left\">Where the pointer lingered. The <code>position</code> field is set to\r\n          <code><a class=\"message\"\r\n          href=\"#SCI_POSITIONFROMPOINTCLOSE\">SCI_POSITIONFROMPOINTCLOSE</a>(x, y)</code>.</td>\r\n        </tr>\r\n      </tbody>\r\n    </table>\r\n    <br />\r\n\r\n    <p><b id=\"SCI_SETMOUSEDWELLTIME\">SCI_SETMOUSEDWELLTIME(int periodMilliseconds)</b><br />\r\n     <b id=\"SCI_GETMOUSEDWELLTIME\">SCI_GETMOUSEDWELLTIME &rarr; int</b><br />\r\n     These two messages set and get the time the mouse must sit still, in milliseconds, to generate\r\n    a <code><a class=\"message\" href=\"#SCN_DWELLSTART\">SCN_DWELLSTART</a></code> notification. If\r\n    set to <code>SC_TIME_FOREVER</code>, the default, no dwell events are generated.</p>\r\n\r\n    <p><b id=\"SCN_ZOOM\">SCN_ZOOM</b><br />\r\n     This notification is generated when the user zooms the display using the keyboard or the\r\n    <code><a class=\"seealso\" href=\"#SCI_SETZOOM\">SCI_SETZOOM</a></code> method is called. This\r\n    notification can be used to recalculate positions, such as the width of the line number margin\r\n    to maintain sizes in terms of characters rather than pixels. <code>SCNotification</code> has no\r\n    additional information.</p>\r\n\r\n    <p>\r\n    <b id=\"SCN_HOTSPOTCLICK\">SCN_HOTSPOTCLICK</b><br />\r\n    <b id=\"SCN_HOTSPOTDOUBLECLICK\">SCN_HOTSPOTDOUBLECLICK</b><br />\r\n    <b id=\"SCN_HOTSPOTRELEASECLICK\">SCN_HOTSPOTRELEASECLICK</b><br />\r\n     These notifications are generated when the user clicks or double clicks on\r\n     text that is in a style with the hotspot attribute set.\r\n    This notification can be used to link to variable definitions or web pages.\r\n    In the notification handler, you should avoid calling any function that modifies the current selection or caret position.\r\n    The <code>position</code> field is set the text position of the click or\r\n    double click and the <code>modifiers</code> field set to the key modifiers\r\n    held down in a similar manner to <a class=\"message\" href=\"#SCN_KEY\">SCN_KEY</a>.\r\n    Only the state of the Ctrl key is reported for <code>SCN_HOTSPOTRELEASECLICK</code>.</p>\r\n\r\n    <p>\r\n    <b id=\"SCN_INDICATORCLICK\">SCN_INDICATORCLICK</b><br />\r\n    <b id=\"SCN_INDICATORRELEASE\">SCN_INDICATORRELEASE</b><br />\r\n     These notifications are generated when the user clicks or releases the mouse on\r\n     text that has an indicator.\r\n    The <code>position</code> field is set the text position of the click or\r\n    double click and the <code>modifiers</code> field set to the key modifiers\r\n    held down in a similar manner to <a class=\"message\" href=\"#SCN_KEY\">SCN_KEY</a>.</p>\r\n\r\n    <p><b id=\"SCN_CALLTIPCLICK\">SCN_CALLTIPCLICK</b><br />\r\n     This notification is generated when the user clicks on a calltip.\r\n    This notification can be used to display the next function prototype when a\r\n    function name is overloaded with different arguments.\r\n    The <code>position</code> field is set to 1 if the click is in an up arrow,\r\n    2 if in a down arrow, and 0 if elsewhere.</p>\r\n\r\n    <p><b id=\"SCN_AUTOCSELECTION\">SCN_AUTOCSELECTION</b><br />\r\n     The user has selected an item in an <a class=\"jump\" href=\"#Autocompletion\">autocompletion list</a>. The\r\n     notification is sent before the selection is inserted. Automatic insertion can be cancelled by sending a\r\n     <code><a class=\"message\" href=\"#SCI_AUTOCCANCEL\">SCI_AUTOCCANCEL</a></code> message\r\n     before returning from the notification. The <code>SCNotification</code> fields used are:</p>\r\n\r\n    <table class=\"standard\" summary=\"Autocompletion list notification\">\r\n      <tbody>\r\n        <tr>\r\n          <th align=\"left\">Field</th>\r\n\r\n          <th align=\"left\">Usage</th>\r\n        </tr>\r\n      </tbody>\r\n\r\n      <tbody valign=\"top\">\r\n        <tr>\r\n          <td align=\"left\"><code>position</code></td>\r\n\r\n          <td align=\"left\">The start position of the word being completed.</td>\r\n        </tr>\r\n        <tr>\r\n          <td align=\"left\"><code>text</code></td>\r\n\r\n          <td align=\"left\">The text of the selection.</td>\r\n        </tr>\r\n        <tr>\r\n          <td align=\"left\"><code>ch</code></td>\r\n\r\n          <td align=\"left\">If a fillup character was the method of selection, the used\r\n            character, otherwise 0.</td>\r\n        </tr>\r\n        <tr>\r\n          <td align=\"left\"><code>listCompletionMethod</code></td>\r\n\r\n          <td align=\"left\">A value indicating the way in which the completion\r\n            occurred. See the table below.</td>\r\n        </tr>\r\n      </tbody>\r\n    </table>\r\n    <br />\r\n    <table class=\"standard\" summary=\"Modify notification type flags\">\r\n      <tbody>\r\n        <tr>\r\n          <th align=\"left\">Symbol</th>\r\n\r\n          <th>Value</th>\r\n\r\n          <th align=\"left\">Meaning</th>\r\n\r\n        </tr>\r\n      </tbody>\r\n\r\n      <tbody valign=\"top\">\r\n        <tr>\r\n          <td align=\"left\"><code>SC_AC_FILLUP</code></td>\r\n\r\n          <td align=\"center\">1</td>\r\n\r\n          <td>A fillup character triggered the completion. The character used is\r\n            in ch. </td>\r\n\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>SC_AC_DOUBLECLICK</code></td>\r\n\r\n          <td align=\"center\">2</td>\r\n\r\n          <td>A double-click triggered the completion. ch is 0.</td>\r\n\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>SC_AC_TAB</code></td>\r\n\r\n          <td align=\"center\">3</td>\r\n\r\n          <td>The tab key or SCI_TAB triggered the completion. ch is 0.</td>\r\n\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>SC_AC_NEWLINE</code></td>\r\n\r\n          <td align=\"center\">4</td>\r\n\r\n          <td>A new line or SCI_NEWLINE triggered the completion. ch is 0.</td>\r\n\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>SC_AC_COMMAND</code></td>\r\n\r\n          <td align=\"center\">5</td>\r\n\r\n          <td>The\r\n    <code>\r\n     <a class=\"seealso\" href=\"#SCI_AUTOCSELECT\">SCI_AUTOCSELECT</a></code> message\r\n          triggered the completion. ch is 0.</td>\r\n\r\n        </tr>\r\n        <tr>\r\n          <td align=\"left\"><code>SC_AC_SINGLE_CHOICE</code></td>\r\n\r\n          <td align=\"center\">6</td>\r\n\r\n          <td>There was only a single choice in the list and 'choose single' mode was active as set by\r\n    <code>\r\n     <a class=\"seealso\" href=\"#SCI_AUTOCSETCHOOSESINGLE\">SCI_AUTOCSETCHOOSESINGLE</a></code>. ch is 0.</td>\r\n\r\n        </tr>\r\n      </tbody>\r\n    </table>\r\n\r\n    <p><b id=\"SCN_AUTOCCANCELLED\">SCN_AUTOCCANCELLED</b><br />\r\n     The user has cancelled an <a class=\"jump\" href=\"#Autocompletion\">autocompletion list</a>.\r\n     There is no other information in SCNotification.</p>\r\n\r\n    <p><b id=\"SCN_AUTOCCHARDELETED\">SCN_AUTOCCHARDELETED</b><br />\r\n     The user deleted a character while autocompletion list was active.\r\n     There is no other information in SCNotification.</p>\r\n\r\n\r\n    <p><b id=\"SCN_AUTOCCOMPLETED\">SCN_AUTOCCOMPLETED<br />\r\n    </b>This notification is generated after an autocompletion has inserted its\r\n    text. The fields are identical to the\r\n    <code>\r\n     <a class=\"jump\" href=\"#SCN_AUTOCSELECTION\">SCN_AUTOCSELECTION</a></code>\r\n     notification.</p>\r\n\r\n    <p><b id=\"SCN_AUTOCSELECTIONCHANGE\">SCN_AUTOCSELECTIONCHANGE<br />\r\n    </b>This notification is sent when items are highlighted in an autocompletion or user list.\r\n     The\r\n    <code>SCNotification</code> fields used are:</p>\r\n\r\n    <table class=\"standard\" summary=\"User list notification\">\r\n      <tbody>\r\n        <tr>\r\n          <th align=\"left\">Field</th>\r\n\r\n          <th align=\"left\">Usage</th>\r\n        </tr>\r\n      </tbody>\r\n\r\n      <tbody valign=\"top\">\r\n        <tr>\r\n          <td align=\"left\"><code>listType</code></td>\r\n\r\n          <td align=\"left\">This is set to the <code class=\"parameter\">listType</code> parameter from the <a\r\n          class=\"message\" href=\"#SCI_USERLISTSHOW\"><code>SCI_USERLISTSHOW</code></a> message\r\n\t  or 0 for an autocompletion.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>text</code></td>\r\n\r\n          <td align=\"left\">The text of the selection.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>position</code></td>\r\n\r\n          <td align=\"left\">The position the list was displayed at.</td>\r\n        </tr>\r\n      </tbody>\r\n    </table>\r\n\r\n    <p><b id=\"SCN_FOCUSIN\">SCN_FOCUSIN</b><br />\r\n    <b id=\"SCN_FOCUSOUT\">SCN_FOCUSOUT</b><br />\r\n    <code>SCN_FOCUSIN</code> (2028) is fired when Scintilla receives focus and\r\n    <code>SCN_FOCUSOUT</code> (2029) when it loses focus.</p>\r\n\r\n    <h2 id=\"Images\">Images</h2>\r\n\r\n    <p>Two formats are supported for images used in margin markers and autocompletion lists, RGBA and XPM.</p>\r\n\r\n    <h3 id=\"RGBA\">RGBA</h3>\r\n\r\n    <p>The RGBA format allows translucency with an <a class=\"jump\" href=\"#alpha\">alpha</a>\r\n    value for each pixel. It is simpler than\r\n    <code>XPM</code> and more capable.</p>\r\n\r\n    <p>The data is a sequence of 4 byte pixel values starting with the pixels for the top line, with the\r\n    leftmost pixel first, then continuing with the pixels for subsequent lines. There is no gap between\r\n    lines for alignment reasons.</p>\r\n\r\n    <p>Each pixel consists of, in order, a red byte, a green byte, a blue byte and an alpha byte.\r\n    The colour bytes are not premultiplied by the alpha value. That is, a fully red pixel that is\r\n    25% opaque will be [FF, 00, 00, 3F]</p>\r\n\r\n    <p>Since the RGBA pixel data does not include any size information the\r\n    width and height must previously been set with the\r\n    <a class=\"message\" href=\"#SCI_RGBAIMAGESETWIDTH\"><code>SCI_RGBAIMAGESETWIDTH</code></a> and\r\n    <a class=\"message\" href=\"#SCI_RGBAIMAGESETHEIGHT\"><code>SCI_RGBAIMAGESETHEIGHT</code></a> messages.</p>\r\n\r\n    <p>GUI platforms often include functions for reading image file formats like PNG into memory\r\n    in the RGBA form or a similar form.\r\n    If there is no suitable platform support, the <a href=\"http://lodev.org/lodepng/\">LodePNG and picoPNG</a> libraries are small libraries\r\n    for loading and decoding PNG files available under a BSD-style license.</p>\r\n\r\n    <p>RGBA format is supported on Windows, GTK and macOS Cocoa.</p>\r\n\r\n    <h3 id=\"XPM\">XPM</h3>\r\n\r\n    <p>The XPM format is\r\n    <a class=\"jump\" href=\"http://en.wikipedia.org/wiki/X_PixMap\">described here</a>.\r\n    Scintilla is only able to handle XPM pixmaps that use one character per pixel with no named colours.\r\n    There may be a completely transparent colour named \"None\".</p>\r\n    <p>There are two forms of data structure used for XPM images, the first \"lines form\" format is well suited\r\n    to embedding an image inside C source code and the \"text form\" is suited to reading from a file.\r\n    In the lines form, an array of strings is used with the first string indicating the dimensions and number of colours\r\n    used. This is followed by a string for each colour and that section is followed by the image with one string per line.\r\n    The text form contains the same data as one null terminated block formatted as C source code starting\r\n    with a \"/* XPM */\" comment to mark the format.</p>\r\n    <p>Either format may be used with Scintilla APIs with the bytes at the location pointed to examined\r\n    to determine which format: if the bytes start with \"/* XPM */\" then it is treated as text form,\r\n    otherwise it is treated as lines form.</p>\r\n\r\n    <p>XPM format is supported on all platforms.</p>\r\n\r\n    <h2 id=\"GTK\">GTK</h2>\r\n    <p>On GTK, the following functions create a Scintilla widget, communicate with it and allow\r\n    resources to be released after all Scintilla widgets have been destroyed.</p>\r\n    <code><a class=\"message\" href=\"#scintilla_new\">GtkWidget *scintilla_new()</a><br />\r\n     <a class=\"message\" href=\"#scintilla_set_id\">void scintilla_set_id(ScintillaObject *sci, uptr_t id)</a><br />\r\n     <a class=\"message\" href=\"#scintilla_send_message\">sptr_t scintilla_send_message(ScintillaObject *sci,unsigned int iMessage, uptr_t wParam, sptr_t lParam)</a><br />\r\n     <a class=\"message\" href=\"#scintilla_release_resources\">void scintilla_release_resources()</a><br />\r\n     </code>\r\n\r\n    <p><b id=\"scintilla_new\">GtkWidget *scintilla_new()</b><br />\r\n    Create a new Scintilla widget. The returned pointer can be added to a container and displayed in the same way as other\r\n    widgets.</p>\r\n\r\n    <p><b id=\"scintilla_set_id\">void scintilla_set_id(ScintillaObject *sci, uptr_t id)</b><br />\r\n    Set the control ID which will be used in the idFrom field of the Sci_NotifyHeader structure of all\r\n    notifications for this instance.\r\n    This is equivalent to <a class=\"seealso\" href=\"#SCI_SETIDENTIFIER\">SCI_SETIDENTIFIER</a>.</p>\r\n\r\n    <p><b id=\"scintilla_send_message\">sptr_t scintilla_send_message(ScintillaObject *sci,unsigned int iMessage, uptr_t wParam, sptr_t lParam)</b><br />\r\n    The main entry point allows sending any of the messages described in this document.</p>\r\n\r\n    <p><b id=\"scintilla_release_resources\">void scintilla_release_resources()</b><br />\r\n    Call this to free any remaining resources after all the Scintilla widgets have been destroyed.</p>\r\n\r\n    <h2 id=\"ProvisionalMessages\">Provisional messages</h2>\r\n\r\n    <p>Complex new features may be added as 'provisional' to allow further changes to the API.\r\n    Provisional features may even be removed if experience shows they are a mistake.</p>\r\n\r\n    <p>Provisional features are displayed in this document with <span class=\"provisional\">a distinctive background colour</span>.</p>\r\n\r\n    <p>Some developers may want to only use features that are stable and have graduated from\r\n    provisional status. To avoid using provisional messages compile with the symbol\r\n    <code>SCI_DISABLE_PROVISIONAL</code> defined.</p>\r\n\r\n    <h2 id=\"DeprecatedMessages\">Deprecated and discouraged messages and notifications</h2>\r\n\r\n    <p>The following messages are currently supported to emulate existing Windows controls, but\r\n    they will be removed in future versions of Scintilla. If you use these messages you should\r\n    replace them with the Scintilla equivalent.</p>\r\n<pre>\r\nWM_GETTEXT(int length, char *text)\r\nWM_SETTEXT(&lt;unused&gt;, const char *text)\r\nEM_GETLINE(int line, char *text)\r\nEM_REPLACESEL(&lt;unused&gt;, const char *text)\r\nEM_SETREADONLY\r\nEM_GETTEXTRANGE(&lt;unused&gt;, TEXTRANGE *tr)\r\nWM_CUT\r\nWM_COPY\r\nWM_PASTE\r\nWM_CLEAR\r\nWM_UNDO\r\nEM_CANUNDO\r\nEM_EMPTYUNDOBUFFER\r\nWM_GETTEXTLENGTH\r\nEM_GETFIRSTVISIBLELINE\r\nEM_GETLINECOUNT\r\nEM_GETMODIFY\r\nEM_SETMODIFY(bool isModified)\r\nEM_GETRECT(RECT *rect)\r\nEM_GETSEL(int *start, int *end)\r\nEM_EXGETSEL(&lt;unused&gt;, CHARRANGE *cr)\r\nEM_SETSEL(int start, int end)\r\nEM_EXSETSEL(&lt;unused&gt;, CHARRANGE *cr)\r\nEM_GETSELTEXT(&lt;unused&gt;, char *text)\r\nEM_LINEFROMCHAR(int position)\r\nEM_EXLINEFROMCHAR(int position)\r\nEM_LINEINDEX(int line)\r\nEM_LINELENGTH(int position)\r\nEM_SCROLL(int line)\r\nEM_LINESCROLL(int column, int line)\r\nEM_SCROLLCARET()\r\nEM_CANPASTE\r\nEM_CHARFROMPOS(&lt;unused&gt;, POINT *location)\r\nEM_POSFROMCHAR(int position, POINT *location)\r\nEM_SELECTIONTYPE\r\nEM_HIDESELECTION(bool hide)\r\nEM_FINDTEXT(int flags, FINDTEXTEX *ft)\r\nEM_FINDTEXTEX(int flags, FINDTEXTEX *ft)\r\nEM_GETMARGINS\r\nEM_SETMARGINS(EC_LEFTMARGIN or EC_RIGHTMARGIN or EC_USEFONTINFO, int val)\r\nEM_FORMATRANGE\r\n</pre>\r\n\r\n    <p>The following are features that are only included if you define\r\n    <code>INCLUDE_DEPRECATED_FEATURES</code> in <code>Scintilla.h</code>. To ensure future\r\n    compatibility you should change them as indicated.</p>\r\n\r\n    <code>\r\n     <a class=\"message\" href=\"#SCI_SETKEYSUNICODE\">SCI_SETKEYSUNICODE(bool keysUnicode)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETKEYSUNICODE\">SCI_GETKEYSUNICODE &rarr; bool</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETTWOPHASEDRAW\">SCI_SETTWOPHASEDRAW(bool twoPhase)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETTWOPHASEDRAW\">SCI_GETTWOPHASEDRAW &rarr; bool</a><br />\r\n     <a class=\"message\" href=\"#SCI_SETSTYLEBITS\">SCI_SETSTYLEBITS(int bits)</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETSTYLEBITS\">SCI_GETSTYLEBITS &rarr; int</a><br />\r\n     <a class=\"message\" href=\"#SCI_GETSTYLEBITSNEEDED\">SCI_GETSTYLEBITSNEEDED &rarr; int</a><br />\r\n    </code>\r\n\r\n    <p><b id=\"SCI_SETKEYSUNICODE\">SCI_SETKEYSUNICODE(bool keysUnicode)</b> Deprecated<br />\r\n     <b id=\"SCI_GETKEYSUNICODE\">SCI_GETKEYSUNICODE &rarr; bool</b> Deprecated<br />\r\n     On Windows, Scintilla no longer supports narrow character windows so input is always treated as Unicode.</p>\r\n\r\n    <p><b id=\"SCI_SETTWOPHASEDRAW\">SCI_SETTWOPHASEDRAW(bool twoPhase)</b><br />\r\n     <b id=\"SCI_GETTWOPHASEDRAW\">SCI_GETTWOPHASEDRAW &rarr; bool</b><br />\r\n     This property has been replaced with the preceding PHASESDRAW property which is more general,\r\n     allowing multiple phase drawing as well as one and two phase drawing.</p>\r\n\r\n    <p>Single phase drawing <code>SC_PHASES_ONE</code>, is deprecated and should be replaced with\r\n    2-phase <code>SC_PHASES_TWO</code> or multi-phase <code>SC_PHASES_MULTIPLE</code> drawing.\r\n    </p>\r\n\r\n    <p>The following are features that should be removed from calling code but are still\r\n    defined to avoid breaking callers.</p>\r\n\r\n    <p id=\"StyleByteIndicators\"><b id=\"SCI_SETSTYLEBITS\">SCI_SETSTYLEBITS(int bits)</b> Deprecated<br />\r\n    <b id=\"SCI_GETSTYLEBITS\">SCI_GETSTYLEBITS &rarr; int</b> Deprecated<br />\r\n    <b id=\"SCI_GETSTYLEBITSNEEDED\">SCI_GETSTYLEBITSNEEDED &rarr; int</b> Deprecated<br />\r\n    <code>INDIC0_MASK</code>, <code>INDIC1_MASK</code>, <code>INDIC2_MASK</code>, <code>INDICS_MASK</code> Deprecated<br />\r\n     Scintilla no longer supports style byte indicators. The last version to support style byte indicators was 3.4.2.\r\n     Any use of these symbols should be removed and replaced with <a href=\"#Indicators\">standard indicators</a>.\r\n    <code>SCI_GETSTYLEBITS</code> and <code>SCI_GETSTYLEBITSNEEDED</code> always return 8,\r\n    indicating that 8 bits are used for styling and there are 256 styles.</p>\r\n\r\n    <p>Discouraged APIs are a step before deprecation. A new preferred API has been implemented that new code should use\r\n    but the old API is unlikely to be removed.\r\n    Discouraged APIs are marked with a <span class=\"discouraged\">orange strikethrough</span> and their documentation mentions the preferred API.\r\n    </p>\r\n\r\n    <h2 id=\"EditMessagesNeverSupportedByScintilla\">Edit messages never supported by Scintilla</h2>\r\n<pre>\r\nEM_GETWORDBREAKPROC EM_GETWORDBREAKPROCEX\r\nEM_SETWORDBREAKPROC EM_SETWORDBREAKPROCEX\r\nEM_GETWORDWRAPMODE EM_SETWORDWRAPMODE\r\nEM_LIMITTEXT EM_EXLIMITTEXT\r\nEM_SETRECT EM_SETRECTNP\r\nEM_FMTLINES\r\nEM_GETHANDLE EM_SETHANDLE\r\nEM_GETPASSWORDCHAR EM_SETPASSWORDCHAR\r\nEM_SETTABSTOPS\r\nEM_FINDWORDBREAK\r\nEM_GETCHARFORMAT EM_SETCHARFORMAT\r\nEM_GETOLEINTERFACE EM_SETOLEINTERFACE\r\nEM_SETOLECALLBACK\r\nEM_GETPARAFORMAT EM_SETPARAFORMAT\r\nEM_PASTESPECIAL\r\nEM_REQUESTRESIZE\r\nEM_GETBKGNDCOLOR EM_SETBKGNDCOLOR\r\nEM_STREAMIN EM_STREAMOUT\r\nEM_GETIMECOLOR EM_SETIMECOLOR\r\nEM_GETIMEOPTIONS EM_SETIMEOPTIONS\r\nEM_GETOPTIONS EM_SETOPTIONS\r\nEM_GETPUNCTUATION EM_SETPUNCTUATION\r\nEM_GETTHUMB\r\nEM_GETEVENTMASK\r\nEM_SETEVENTMASK\r\nEM_DISPLAYBAND\r\nEM_SETTARGETDEVICE\r\n</pre>\r\n\r\n    <p>Scintilla tries to be a superset of the standard windows Edit and RichEdit controls wherever\r\n    that makes sense. As it is not intended for use in a word processor, some edit messages can not\r\n    be sensibly handled. Unsupported messages have no effect.</p>\r\n\r\n    <h2 id=\"RemovedFeatures\">Removed features</h2>\r\n\r\n    <p>These features have now been removed completely.</p>\r\n\r\n    <p><b id=\"SC_CP_DBCS\">SC_CP_DBCS</b> Removed in 2016 with release 3.7.1<br />\r\n     This was used to set a DBCS (Double Byte Character Set) mode on GTK.\r\n     An explicit DBCS code page should be used when calling <a class=\"seealso\" href=\"#SCI_SETCODEPAGE\">SCI_SETCODEPAGE</a></p>\r\n\r\n    <p><b id=\"SCI_SETUSEPALETTE\">SCI_SETUSEPALETTE(bool usePalette)</b> Removed in 2016 with release 3.7.1<br />\r\n    <b id=\"SCI_GETUSEPALETTE\">SCI_GETUSEPALETTE &rarr; bool</b> Removed in 2016 with release 3.7.1<br />\r\n     Scintilla no longer supports palette mode. The last version to support palettes was 2.29.\r\n     Any calls to these methods must be removed.</p>\r\n\r\n    <p>Previous versions of Scintilla allowed indicators to be stored in bits of each style byte.\r\n    This was deprecated in 2007 and removed in 2014 with release 3.4.3.\r\n    All uses of style byte indicators should be replaced with <a href=\"#Indicators\">standard indicators</a>.</p>\r\n\r\n    <h2 id=\"BuildingScintilla\">Building Scintilla</h2>\r\n\r\n    <p>To build Scintilla or SciTE, see the README file present in both the Scintilla and SciTE\r\n    directories.\r\n    The compiler must support C++17.\r\n    For Windows, GCC 7.1 or Microsoft Visual C++ 2017.5 can be used\r\n    for building. For GTK, GCC 7.1 or newer should be used. GTK 2.24 and 3.x are\r\n    supported with glib 2.22+. The version of GTK installed should be detected automatically.\r\n    When both GTK 2 and GTK 3 are present, building for GTK 3.x requires defining GTK3\r\n    on the command line.</p>\r\n\r\n    <p>Adding and removing source files from Scintilla may require modifying build files.\r\n    This is addressed in <a class=\"jump\" href=\"AddSource.txt\">AddSource.txt</a>.</p>\r\n\r\n    <h3>Static linking</h3>\r\n\r\n    <p>On Windows, Scintilla is normally used as a dynamic library as a .DLL file. If you want to\r\n    link Scintilla directly into your application .EXE or .DLL file, then you can link to the static library\r\n    bin/libscintilla.lib (or .a if using GCC) and call <code>Scintilla_RegisterClasses</code>.\r\n    <code>Scintilla_RegisterClasses</code> takes the <code>HINSTANCE</code> of your\r\n    application and ensures that the \"Scintilla\" window class is registered.</p>\r\n    <p>When producing a stand-alone Scintilla DLL, the ScintillaDLL.cxx file should be compiled and\r\n    linked in to provide <code>DllMain</code> and <code>Scintilla_RegisterClasses</code>.</p>\r\n\r\n    <h3>Building with an alternative Regular Expression implementation</h3>\r\n\r\n <p id=\"AlternativeRegEx\">A simple interface provides support for switching the Regular Expressions engine at\r\n compile time. You must implement <code>RegexSearchBase</code> for your chosen engine,\r\n look at the built-in implementation <code>BuiltinRegex</code> to see how this is done.\r\n You then need to implement the factory method <code>CreateRegexSearch</code>\r\n to create an instance of your class. You must disable the built-in implementation by defining\r\n <code>SCI_OWNREGEX</code>.</p>\r\n\r\n    <h3>Preprocessor definitions that affect building</h3>\r\n\r\n    <table class=\"standard\" summary=\"Building preprocessors\">\r\n      <tbody>\r\n        <tr>\r\n          <th align=\"left\">Preprocessor</th>\r\n          <th align=\"left\">Description</th>\r\n        </tr>\r\n      </tbody>\r\n      <tbody valign=\"top\">\r\n        <tr>\r\n          <td align=\"left\"><code>NO_CXX11_REGEX</code></td>\r\n          <td>Build Scintilla without C++11 <code>std::regex</code>.</td>\r\n        </tr>\r\n        <tr>\r\n          <td align=\"left\"><code>REGEX_MULTILINE</code></td>\r\n          <td>Enable using C++11 multiline regex.</td>\r\n        </tr>\r\n        <tr>\r\n          <td align=\"left\"><code> SCI_OWNREGEX</code></td>\r\n          <td>Build Scintilla with customised regex engine.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>SCI_DISABLE_AUTOGENERATED</code></td>\r\n          <td>No auto-generated constants or macros.</td>\r\n        </tr>\r\n        <tr>\r\n          <td align=\"left\"><code>SCI_DISABLE_PROVISIONAL</code></td>\r\n          <td>Build Scintilla without provisional features.</td>\r\n        </tr>\r\n        <tr>\r\n          <td align=\"left\"><code>INCLUDE_DEPRECATED_FEATURES</code></td>\r\n          <td>Expose deprecated features from Scintilla headers.</td>\r\n        </tr>\r\n\r\n        <tr>\r\n          <td align=\"left\"><code>DISABLE_D2D</code></td>\r\n          <td>(Win32) Build Scintilla without Direct2D/DirectWrite.</td>\r\n        </tr>\r\n      </tbody>\r\n    </table>\r\n\r\n  </body>\r\n</html>\r\n\r\n"
  },
  {
    "path": "scintilla/doc/ScintillaDownload.html",
    "content": "<?xml version=\"1.0\"?>\r\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\r\n    \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n  <head>\r\n    <meta name=\"generator\" content=\"HTML Tidy, see www.w3.org\" />\r\n    <meta name=\"generator\" content=\"SciTE\" />\r\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\r\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\r\n    <title>\r\n      Download Scintilla\r\n    </title>\r\n  </head>\r\n  <body bgcolor=\"#FFFFFF\" text=\"#000000\">\r\n    <table bgcolor=\"#000000\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\r\n      <tr>\r\n        <td>\r\n          <img src=\"SciTEIco.png\" border=\"3\" height=\"64\" width=\"64\" alt=\"Scintilla icon\" />\r\n        </td>\r\n        <td>\r\n          <a href=\"index.html\" style=\"color:white;text-decoration:none\"><font size=\"5\">Download\r\n          Scintilla</font></a>\r\n        </td>\r\n      </tr>\r\n    </table>\r\n    <table bgcolor=\"#CCCCCC\" width=\"100%\" cellspacing=\"0\" cellpadding=\"8\" border=\"0\">\r\n      <tr>\r\n        <td>\r\n          <font size=\"4\"> <a href=\"https://www.scintilla.org/scintilla550.zip\">\r\n\tWindows</a>&nbsp;&nbsp;\r\n\t<a href=\"https://www.scintilla.org/scintilla550.tgz\">\r\n          GTK/Linux</a>&nbsp;&nbsp;\r\n\t</font>\r\n        </td>\r\n      </tr>\r\n    </table>\r\n    <h2>\r\n       Download.\r\n    </h2>\r\n    <p>\r\n       The <a href=\"License.txt\">license</a> for using Scintilla or SciTE is similar to that of Python\r\n      containing very few restrictions.\r\n    </p>\r\n    <h3>\r\n       Release 5.5.0\r\n    </h3>\r\n    <h4>\r\n       Source Code\r\n    </h4>\r\n       The source code package contains all of the source code for Scintilla but no binary\r\n\texecutable code and is available in\r\n       <ul>\r\n       <li><a href=\"https://www.scintilla.org/scintilla550.zip\">zip format</a> (1.8M) commonly used on Windows</li>\r\n       <li><a href=\"https://www.scintilla.org/scintilla550.tgz\">tgz format</a> (1.7M) commonly used on Linux and compatible operating systems</li>\r\n       </ul>\r\n       Instructions for building on both Windows and Linux are included in the readme file.\r\n    <h4>\r\n       Windows Executable Code\r\n    </h4>\r\n       There is no download available containing only the Scintilla DLL.\r\n       However, it is included in the <a href=\"SciTEDownload.html\">SciTE\r\n       executable full download</a> as Scintilla.DLL.\r\n    <p>\r\n       <a href=\"SciTEDownload.html\">SciTE</a> is a good demonstration of Scintilla.\r\n    </p>\r\n    <p>\r\n       Previous versions can be downloaded from the <a href=\"ScintillaHistory.html\">history\r\n      page</a>.\r\n    </p>\r\n  </body>\r\n</html>\r\n"
  },
  {
    "path": "scintilla/doc/ScintillaHistory.html",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\r\n    \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n  <head>\r\n    <meta name=\"generator\" content=\"HTML Tidy, see www.w3.org\" />\r\n    <meta name=\"generator\" content=\"SciTE\" />\r\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\r\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\r\n    <title>\r\n      Scintilla\r\n    </title>\r\n    <style type=\"text/css\">\r\n        table {\r\n            border-collapse: collapse;\r\n            font-size: 80%;\r\n        }\r\n        td {\r\n            xborder: 1px solid #1F1F1F;\r\n            padding: 0px 4px;\r\n        }\r\n    </style>\r\n  </head>\r\n  <body bgcolor=\"#FFFFFF\" text=\"#000000\">\r\n    <table bgcolor=\"#000000\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\r\n      <tr>\r\n        <td>\r\n          <img src=\"SciTEIco.png\" border=\"3\" height=\"64\" width=\"64\" alt=\"Scintilla icon\" />\r\n        </td>\r\n        <td>\r\n          <a href=\"index.html\" style=\"color:white;text-decoration:none\"><font size=\"5\">Scintilla</font></a>\r\n        </td>\r\n      </tr>\r\n    </table>\r\n    <h1>History of Scintilla</h1>\r\n    <h2>Contributors</h2>\r\n    <p>\r\n       Thanks to all the people that have contributed patches, bug reports and suggestions.\r\n    </p>\r\n    <p>\r\n       Source code and documentation have been contributed by\r\n    </p>\r\n    <table>\r\n      <tr>\r\n\t<td>Atsuo Ishimoto</td>\r\n\t<td>Mark Hammond</td>\r\n\t<td>Francois Le Coguiec</td>\r\n\t<td>Dale Nagata</td>\r\n      </tr><tr>\r\n\t<td>Ralf Reinhardt</td>\r\n\t<td>Philippe Lhoste</td>\r\n\t<td>Andrew McKinlay</td>\r\n\t<td>Stephan R. A. Deibel</td>\r\n      </tr><tr>\r\n\t<td>Hans Eckardt</td>\r\n\t<td>Vassili Bourdo</td>\r\n\t<td>Maksim Lin</td>\r\n\t<td>Robin Dunn</td>\r\n      </tr><tr>\r\n\t<td>John Ehresman</td>\r\n\t<td>Steffen Goeldner</td>\r\n\t<td>Deepak S.</td>\r\n\t<td><a href=\"http://www.develop.com\">DevelopMentor</a></td>\r\n      </tr><tr>\r\n\t<td>Yann Gaillard</td>\r\n\t<td>Aubin Paul</td>\r\n\t<td>Jason Diamond</td>\r\n\t<td>Ahmad Baitalmal</td>\r\n      </tr><tr>\r\n\t<td>Paul Winwood</td>\r\n\t<td>Maxim Baranov</td>\r\n\t<td>Ragnar Højland</td>\r\n\t<td>Christian Obrecht</td>\r\n      </tr><tr>\r\n\t<td>Andreas Neukoetter</td>\r\n\t<td>Adam Gates</td>\r\n\t<td>Steve Lhomme</td>\r\n\t<td>Ferdinand Prantl</td>\r\n      </tr><tr>\r\n\t<td>Jan Dries</td>\r\n\t<td>Markus Gritsch</td>\r\n\t<td>Tahir Karaca</td>\r\n\t<td>Ahmad Zawawi</td>\r\n      </tr><tr>\r\n\t<td>Laurent le Tynevez</td>\r\n\t<td>Walter Braeu</td>\r\n\t<td>Ashley Cambrell</td>\r\n\t<td>Garrett Serack</td>\r\n      </tr><tr>\r\n\t<td>Holger Schmidt</td>\r\n\t<td><a href=\"http://www.activestate.com\">ActiveState</a></td>\r\n\t<td>James Larcombe</td>\r\n\t<td>Alexey Yutkin</td>\r\n      </tr><tr>\r\n\t<td>Jan Hercek</td>\r\n\t<td>Richard Pecl</td>\r\n\t<td>Edward K. Ream</td>\r\n\t<td>Valery Kondakoff</td>\r\n      </tr><tr>\r\n\t<td>Smári McCarthy</td>\r\n\t<td>Clemens Wyss</td>\r\n\t<td>Simon Steele</td>\r\n\t<td>Serge A. Baranov</td>\r\n      </tr><tr>\r\n\t<td>Xavier Nodet</td>\r\n\t<td>Willy Devaux</td>\r\n\t<td>David Clain</td>\r\n\t<td>Brendon Yenson</td>\r\n      </tr><tr>\r\n\t<td><a href=\"http://www.baanboard.com\">Vamsi Potluru</a></td>\r\n\t<td>Praveen Ambekar</td>\r\n\t<td>Alan Knowles</td>\r\n\t<td>Kengo Jinno</td>\r\n      </tr><tr>\r\n\t<td>Valentin Valchev</td>\r\n\t<td>Marcos E. Wurzius</td>\r\n\t<td>Martin Alderson</td>\r\n\t<td>Robert Gustavsson</td>\r\n      </tr><tr>\r\n\t<td>José Fonseca</td>\r\n\t<td>Holger Kiemes</td>\r\n\t<td>Francis Irving</td>\r\n\t<td>Scott Kirkwood</td>\r\n      </tr><tr>\r\n\t<td>Brian Quinlan</td>\r\n\t<td>Ubi</td>\r\n\t<td>Michael R. Duerig</td>\r\n\t<td>Deepak T</td>\r\n      </tr><tr>\r\n\t<td>Don Paul Beletsky</td>\r\n\t<td>Gerhard Kalab</td>\r\n\t<td>Olivier Dagenais</td>\r\n\t<td>Josh Wingstrom</td>\r\n      </tr><tr>\r\n\t<td>Bruce Dodson</td>\r\n\t<td>Sergey Koshcheyev</td>\r\n\t<td>Chuan-jian Shen</td>\r\n\t<td>Shane Caraveo</td>\r\n      </tr><tr>\r\n\t<td>Alexander Scripnik</td>\r\n\t<td>Ryan Christianson</td>\r\n\t<td>Martin Steffensen</td>\r\n\t<td>Jakub Vrána</td>\r\n      </tr><tr>\r\n\t<td>The Black Horus</td>\r\n\t<td>Bernd Kreuss</td>\r\n\t<td>Thomas Lauer</td>\r\n\t<td>Mike Lansdaal</td>\r\n      </tr><tr>\r\n\t<td>Yukihiro Nakai</td>\r\n\t<td>Jochen Tucht</td>\r\n\t<td>Greg Smith</td>\r\n\t<td>Steve Schoettler</td>\r\n      </tr><tr>\r\n\t<td>Mauritius Thinnes</td>\r\n\t<td>Darren Schroeder</td>\r\n\t<td>Pedro Guerreiro</td>\r\n\t<td>Steven te Brinke</td>\r\n      </tr><tr>\r\n\t<td>Dan Petitt</td>\r\n\t<td>Biswapesh Chattopadhyay</td>\r\n\t<td>Kein-Hong Man</td>\r\n\t<td>Patrizio Bekerle</td>\r\n      </tr><tr>\r\n\t<td>Nigel Hathaway</td>\r\n\t<td>Hrishikesh Desai</td>\r\n\t<td>Sergey Puljajev</td>\r\n\t<td>Mathias Rauen</td>\r\n      </tr><tr>\r\n\t<td><a href=\"http://www.spaceblue.com\">Angelo Mandato</a></td>\r\n\t<td>Denis Sureau</td>\r\n\t<td>Kaspar Schiess</td>\r\n\t<td>Christoph Hösler</td>\r\n      </tr><tr>\r\n\t<td>João Paulo F Farias</td>\r\n\t<td>Ron Schofield</td>\r\n\t<td>Stefan Wosnik</td>\r\n\t<td>Marius Gheorghe</td>\r\n      </tr><tr>\r\n\t<td>Naba Kumar</td>\r\n\t<td>Sean O'Dell</td>\r\n\t<td>Stefanos Togoulidis</td>\r\n\t<td>Hans Hagen</td>\r\n      </tr><tr>\r\n\t<td>Jim Cape</td>\r\n\t<td>Roland Walter</td>\r\n\t<td>Brian Mosher</td>\r\n\t<td>Nicholas Nemtsev</td>\r\n      </tr><tr>\r\n\t<td>Roy Wood</td>\r\n\t<td>Peter-Henry Mander</td>\r\n\t<td>Robert Boucher</td>\r\n\t<td>Christoph Dalitz</td>\r\n      </tr><tr>\r\n\t<td>April White</td>\r\n\t<td>S. Umar</td>\r\n\t<td>Trent Mick</td>\r\n\t<td>Filip Yaghob</td>\r\n      </tr><tr>\r\n\t<td>Avi Yegudin</td>\r\n\t<td>Vivi Orunitia</td>\r\n\t<td>Manfred Becker</td>\r\n\t<td>Dimitris Keletsekis</td>\r\n      </tr><tr>\r\n\t<td>Yuiga</td>\r\n\t<td>Davide Scola</td>\r\n\t<td>Jason Boggs</td>\r\n\t<td>Reinhold Niesner</td>\r\n      </tr><tr>\r\n\t<td>Jos van der Zande</td>\r\n\t<td>Pescuma</td>\r\n\t<td>Pavol Bosik</td>\r\n\t<td>Johannes Schmid</td>\r\n      </tr><tr>\r\n\t<td>Blair McGlashan</td>\r\n\t<td>Mikael Hultgren</td>\r\n\t<td>Florian Balmer</td>\r\n\t<td>Hadar Raz</td>\r\n      </tr><tr>\r\n\t<td>Herr Pfarrer</td>\r\n\t<td>Ben Key</td>\r\n\t<td>Gene Barry</td>\r\n\t<td>Niki Spahiev</td>\r\n      </tr><tr>\r\n\t<td>Carsten Sperber</td>\r\n\t<td>Phil Reid</td>\r\n\t<td>Iago Rubio</td>\r\n\t<td>Régis Vaquette</td>\r\n      </tr><tr>\r\n\t<td>Massimo Corà</td>\r\n\t<td>Elias Pschernig</td>\r\n\t<td>Chris Jones</td>\r\n\t<td>Josiah Reynolds</td>\r\n      </tr><tr>\r\n\t<td>Robert Roessler <a href=\"http://www.rftp.com\">rftp.com</a></td>\r\n\t<td>Steve Donovan</td>\r\n\t<td>Jan Martin Pettersen</td>\r\n\t<td>Sergey Philippov</td>\r\n      </tr><tr>\r\n\t<td>Borujoa</td>\r\n\t<td>Michael Owens</td>\r\n\t<td>Franck Marcia</td>\r\n\t<td>Massimo Maria Ghisalberti</td>\r\n      </tr><tr>\r\n\t<td>Frank Wunderlich</td>\r\n\t<td>Josepmaria Roca</td>\r\n\t<td>Tobias Engvall</td>\r\n\t<td>Suzumizaki Kimitaka</td>\r\n      </tr><tr>\r\n\t<td>Michael Cartmell</td>\r\n\t<td>Pascal Hurni</td>\r\n\t<td>Andre</td>\r\n\t<td>Randy Butler</td>\r\n      </tr><tr>\r\n\t<td>Georg Ritter</td>\r\n\t<td>Michael Goffioul</td>\r\n\t<td>Ben Harper</td>\r\n\t<td>Adam Strzelecki</td>\r\n      </tr><tr>\r\n\t<td>Kamen Stanev</td>\r\n\t<td>Steve Menard</td>\r\n\t<td>Oliver Yeoh</td>\r\n\t<td>Eric Promislow</td>\r\n      </tr><tr>\r\n\t<td>Joseph Galbraith</td>\r\n\t<td>Jeffrey Ren</td>\r\n\t<td>Armel Asselin</td>\r\n\t<td>Jim Pattee</td>\r\n      </tr><tr>\r\n\t<td>Friedrich Vedder</td>\r\n\t<td>Sebastian Pipping</td>\r\n\t<td>Andre Arpin</td>\r\n\t<td>Stanislav Maslovski</td>\r\n      </tr><tr>\r\n\t<td>Martin Stone</td>\r\n\t<td>Fabien Proriol</td>\r\n\t<td>mimir</td>\r\n\t<td>Nicola Civran</td>\r\n      </tr><tr>\r\n\t<td>Snow</td>\r\n\t<td>Mitchell Foral</td>\r\n\t<td>Pieter Holtzhausen</td>\r\n\t<td>Waldemar Augustyn</td>\r\n      </tr><tr>\r\n\t<td>Jason Haslam</td>\r\n\t<td>Sebastian Steinlechner</td>\r\n\t<td>Chris Rickard</td>\r\n\t<td>Rob McMullen</td>\r\n      </tr><tr>\r\n\t<td>Stefan Schwendeler</td>\r\n\t<td>Cristian Adam</td>\r\n\t<td>Nicolas Chachereau</td>\r\n\t<td>Istvan Szollosi</td>\r\n      </tr><tr>\r\n\t<td>Xie Renhui</td>\r\n\t<td>Enrico Tröger</td>\r\n\t<td>Todd Whiteman</td>\r\n\t<td>Yuval Papish</td>\r\n      </tr><tr>\r\n\t<td>instanton</td>\r\n\t<td>Sergio Lucato</td>\r\n\t<td>VladVRO</td>\r\n\t<td>Dmitry Maslov</td>\r\n      </tr><tr>\r\n\t<td>chupakabra</td>\r\n\t<td>Juan Carlos Arevalo Baeza</td>\r\n\t<td>Nick Treleaven</td>\r\n\t<td>Stephen Stagg</td>\r\n      </tr><tr>\r\n\t<td>Jean-Paul Iribarren</td>\r\n\t<td>Tim Gerundt</td>\r\n\t<td>Sam Harwell</td>\r\n\t<td>Boris</td>\r\n      </tr><tr>\r\n\t<td>Jason Oster</td>\r\n\t<td>Gertjan Kloosterman</td>\r\n\t<td>alexbodn</td>\r\n\t<td>Sergiu Dotenco</td>\r\n      </tr><tr>\r\n\t<td>Anders Karlsson</td>\r\n\t<td>ozlooper</td>\r\n\t<td>Marko Njezic</td>\r\n\t<td>Eugen Bitter</td>\r\n      </tr><tr>\r\n\t<td>Christoph Baumann</td>\r\n\t<td>Christopher Bean</td>\r\n\t<td>Sergey Kishchenko</td>\r\n\t<td>Kai Liu</td>\r\n      </tr><tr>\r\n\t<td>Andreas Rumpf</td>\r\n\t<td>James Moffatt</td>\r\n\t<td>Yuzhou Xin</td>\r\n\t<td>Nic Jansma</td>\r\n      </tr><tr>\r\n\t<td>Evan Jones</td>\r\n\t<td>Mike Lischke</td>\r\n\t<td>Eric Kidd</td>\r\n\t<td>maXmo</td>\r\n      </tr><tr>\r\n\t<td>David Severwright</td>\r\n\t<td>Jon Strait</td>\r\n\t<td>Oliver Kiddle</td>\r\n\t<td>Etienne Girondel</td>\r\n      </tr><tr>\r\n\t<td>Haimag Ren</td>\r\n\t<td>Andrey Moskalyov</td>\r\n\t<td>Xavi</td>\r\n\t<td>Toby Inkster</td>\r\n      </tr><tr>\r\n\t<td>Eric Forgeot</td>\r\n\t<td>Colomban Wendling</td>\r\n\t<td>Neo</td>\r\n\t<td>Jordan Russell</td>\r\n      </tr><tr>\r\n\t<td>Farshid Lashkari</td>\r\n\t<td>Sam Rawlins</td>\r\n\t<td>Michael Mullin</td>\r\n\t<td>Carlos SS</td>\r\n      </tr><tr>\r\n\t<td>vim</td>\r\n\t<td>Martial Demolins</td>\r\n\t<td>Tino Weinkauf</td>\r\n\t<td>Jérôme Laforge</td>\r\n      </tr><tr>\r\n\t<td>Udo Lechner</td>\r\n\t<td>Marco Falda</td>\r\n\t<td>Dariusz Knociński</td>\r\n\t<td>Ben Fisher</td>\r\n      </tr><tr>\r\n\t<td>Don Gobin</td>\r\n\t<td>John Yeung</td>\r\n\t<td>Adobe</td>\r\n\t<td>Elizabeth A. Irizarry</td>\r\n      </tr><tr>\r\n\t<td>Mike Schroeder</td>\r\n\t<td>Morten MacFly</td>\r\n\t<td>Jaime Gimeno</td>\r\n\t<td>Thomas Linder Puls</td>\r\n      </tr><tr>\r\n\t<td>Artyom Zuikov</td>\r\n\t<td>Gerrit</td>\r\n\t<td>Occam's Razor</td>\r\n\t<td>Ben Bluemel</td>\r\n      </tr><tr>\r\n\t<td>David Wolfendale</td>\r\n\t<td>Chris Angelico</td>\r\n\t<td>Marat Dukhan</td>\r\n\t<td>Stefan Weil</td>\r\n      </tr><tr>\r\n\t<td>Rex Conn</td>\r\n\t<td>Ross McKay</td>\r\n\t<td>Bruno Barbieri</td>\r\n\t<td>Gordon Smith</td>\r\n      </tr><tr>\r\n\t<td>dimitar</td>\r\n\t<td>Sébastien Granjoux</td>\r\n\t<td>zeniko</td>\r\n\t<td>James Ribe</td>\r\n      </tr><tr>\r\n\t<td>Markus Nißl</td>\r\n\t<td>Martin Panter</td>\r\n\t<td>Mark Yen</td>\r\n\t<td>Philippe Elsass</td>\r\n      </tr><tr>\r\n\t<td>Dimitar Zhekov</td>\r\n\t<td>Fan Yang</td>\r\n\t<td>Denis Shelomovskij</td>\r\n\t<td>darmar</td>\r\n      </tr><tr>\r\n\t<td>John Vella</td>\r\n\t<td>Chinh Nguyen</td>\r\n\t<td>Sakshi Verma</td>\r\n\t<td>Joel B. Mohler</td>\r\n      </tr><tr>\r\n\t<td>Isiledhel</td>\r\n\t<td>Vidya Wasi</td>\r\n\t<td>G. Hu</td>\r\n\t<td>Byron Hawkins</td>\r\n      </tr><tr>\r\n\t<td>Alpha</td>\r\n\t<td>John Donoghue</td>\r\n\t<td>kudah</td>\r\n\t<td>Igor Shaula</td>\r\n      </tr><tr>\r\n\t<td>Pavel Bulochkin</td>\r\n\t<td>Yosef Or Boczko</td>\r\n\t<td>Brian Griffin</td>\r\n\t<td>Özgür Emir</td>\r\n      </tr><tr>\r\n\t<td>Neomi</td>\r\n\t<td>OmegaPhil</td>\r\n\t<td>SiegeLord</td>\r\n\t<td>Erik</td>\r\n      </tr><tr>\r\n\t<td>TJF</td>\r\n\t<td>Mark Robinson</td>\r\n\t<td>Thomas Martitz</td>\r\n\t<td>felix</td>\r\n      </tr><tr>\r\n\t<td>Christian Walther</td>\r\n\t<td>Ebben</td>\r\n\t<td>Robert Gieseke</td>\r\n\t<td>Mike M</td>\r\n      </tr><tr>\r\n\t<td>nkmathew</td>\r\n\t<td>Andreas Tscharner</td>\r\n\t<td>Lee Wilmott</td>\r\n\t<td>johnsonj</td>\r\n      </tr><tr>\r\n\t<td>Vicente</td>\r\n\t<td>Nick Gravgaard</td>\r\n\t<td>Ian Goldby</td>\r\n\t<td>Holger Stenger</td>\r\n      </tr><tr>\r\n\t<td>danselmi</td>\r\n\t<td>Mat Berchtold</td>\r\n\t<td>Michael Staszewski</td>\r\n\t<td>Baurzhan Muftakhidinov</td>\r\n      </tr><tr>\r\n\t<td>Erik Angelin</td>\r\n\t<td>Yusuf Ramazan Karagöz</td>\r\n\t<td>Markus Heidelberg</td>\r\n\t<td>Joe Mueller</td>\r\n      </tr><tr>\r\n\t<td>Mika Attila</td>\r\n\t<td>JoMazM</td>\r\n\t<td>Markus Moser</td>\r\n\t<td>Stefan Küng</td>\r\n      </tr><tr>\r\n\t<td>Jiří Techet</td>\r\n\t<td>Jonathan Hunt</td>\r\n\t<td>Serg Stetsuk</td>\r\n\t<td>Jordan Jueckstock</td>\r\n      </tr><tr>\r\n\t<td>Yury Dubinsky</td>\r\n\t<td>Sam Hocevar</td>\r\n\t<td>Luyomi</td>\r\n\t<td>Matt Gilarde</td>\r\n      </tr><tr>\r\n\t<td>Mark C</td>\r\n\t<td>Johannes Sasongko</td>\r\n\t<td>fstirlitz</td>\r\n\t<td>Robin Haberkorn</td>\r\n      </tr><tr>\r\n\t<td>Pavel Sountsov</td>\r\n\t<td>Dirk Lorenzen</td>\r\n\t<td>Kasper B. Graversen</td>\r\n\t<td>Chris Mayo</td>\r\n      </tr><tr>\r\n\t<td>Van de Bugger</td>\r\n\t<td>Tse Kit Yam</td>\r\n\t<td><a href=\"https://www.smartsharesystems.com/\">SmartShare Systems</a></td>\r\n\t<td>Morten Brørup</td>\r\n      </tr><tr>\r\n\t<td>Alexey Denisov</td>\r\n\t<td>Justin Dailey</td>\r\n\t<td>oirfeodent</td>\r\n\t<td>A-R-C-A</td>\r\n      </tr><tr>\r\n\t<td>Roberto Rossi</td>\r\n\t<td>Kenny Liu</td>\r\n\t<td>Iain Clarke</td>\r\n\t<td>desto</td>\r\n      </tr><tr>\r\n\t<td>John Flatness</td>\r\n\t<td>Thorsten Kani</td>\r\n\t<td>Bernhard M. Wiedemann</td>\r\n\t<td>Baldur Karlsson</td>\r\n      </tr><tr>\r\n\t<td>Martin Kleusberg</td>\r\n\t<td>Jannick</td>\r\n\t<td>Zufu Liu</td>\r\n\t<td>Simon Sobisch</td>\r\n      </tr><tr>\r\n\t<td>Georger Araújo</td>\r\n\t<td>Tobias Kühne</td>\r\n\t<td>Dimitar Radev</td>\r\n\t<td>Liang Bai</td>\r\n      </tr><tr>\r\n\t<td>Gunter Königsmann</td>\r\n\t<td>Nicholai Benalal</td>\r\n\t<td>Uniface</td>\r\n\t<td>Raghda Morsy</td>\r\n      </tr><tr>\r\n\t<td>Giuseppe Corbelli</td>\r\n\t<td>Andreas Rönnquist</td>\r\n\t<td>Henrik Hank</td>\r\n\t<td>Luke Rasmussen</td>\r\n      </tr><tr>\r\n\t<td>Philipp</td>\r\n\t<td>maboroshin</td>\r\n\t<td>Gokul Krishnan</td>\r\n\t<td>John Horigan</td>\r\n      </tr><tr>\r\n\t<td>jj5</td>\r\n\t<td>Jad Altahan</td>\r\n\t<td>Andrea Ricchi</td>\r\n\t<td>Juarez Rudsatz</td>\r\n      </tr><tr>\r\n\t<td>Wil van Antwerpen</td>\r\n\t<td>Hodong Kim</td>\r\n\t<td>Michael Conrad</td>\r\n\t<td>Dejan Budimir</td>\r\n      </tr><tr>\r\n\t<td>Andreas Falkenhahn</td>\r\n\t<td>Mark Reay</td>\r\n\t<td>David Shuman</td>\r\n\t<td>McLoo</td>\r\n      </tr><tr>\r\n\t<td>Shmuel Zeigerman</td>\r\n\t<td>Chris Graham</td>\r\n\t<td>Hugues Larrive</td>\r\n\t<td>Prakash Sahni</td>\r\n      </tr><tr>\r\n\t<td>Michel Sauvard</td>\r\n\t<td>uhf7</td>\r\n\t<td>gnombat</td>\r\n\t<td>Derek Brown</td>\r\n      </tr><tr>\r\n\t<td>cshnik</td>\r\n\t<td>Petko Georgiev</td>\r\n\t<td>YX Hao</td>\r\n\t<td>Damiano Lombardi</td>\r\n      </tr><tr>\r\n\t<td>Michael Neuroth</td>\r\n\t<td>Arne Scheffler</td>\r\n\t<td>Jan Dolinár</td>\r\n\t<td>Rowan Daniell</td>\r\n      </tr><tr>\r\n\t<td>Arkadiusz Michalski</td>\r\n\t<td>Christian Schmitz</td>\r\n\t<td>Michael Berlenz</td>\r\n\t<td>Jacky Yang</td>\r\n      </tr><tr>\r\n\t<td>Reinhard Nißl</td>\r\n\t<td>Ferdinand Oeinck</td>\r\n\t<td>Michael Heath</td>\r\n\t<td>Enrico Tröger</td>\r\n      </tr><tr>\r\n\t<td>Chengzhi Li</td>\r\n\t<td>Gary James</td>\r\n\t<td>Tsuyoshi Miyake</td>\r\n    </tr>\r\n    </table>\r\n    <h2>Releases</h2>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scintilla550.zip\">Release 5.5.0</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 23 April 2024.\r\n\t</li>\r\n\t<li>\r\n\tAdd elements for inactive additional selections SC_ELEMENT_SELECTION_INACTIVE_ADDITIONAL_TEXT\r\n\tand SC_ELEMENT_SELECTION_INACTIVE_ADDITIONAL_BACK.\r\n\tWhen not set these default to SC_ELEMENT_SELECTION_INACTIVE_TEXT and SC_ELEMENT_SELECTION_INACTIVE_BACK.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2417/\">Bug #2417</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, avoid use of NSUserDefaults which will soon require justification when used in applications on the App Store.\r\n\t</li>\r\n\t<li>\r\n\tFix Win32 IME crash in windowed mode.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2433/\">Bug #2433</a>.\r\n\t</li>\r\n\t<li>\r\n\tScale reverse arrow cursor for margins to match other cursors when user changes pointer size.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2321/\">Bug #2321</a>.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scintilla543.zip\">Release 5.4.3</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 9 March 2024.\r\n\t</li>\r\n\t<li>\r\n\tFix redo failure introduced with 5.4.2.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2432/\">Bug #2432</a>.\r\n\t</li>\r\n\t<li>\r\n\tAdd SC_AUTOCOMPLETE_SELECT_FIRST_ITEM option to\r\n\talways selects the first item in the autocompletion list.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2403/\">Bug #2403</a>.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scintilla542.zip\">Release 5.4.2</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 5 March 2024.\r\n\t</li>\r\n\t<li>\r\n\tSignificantly reduce memory used for undo actions, often to a half or quarter of previous versions.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1458/\">Feature #1458</a>.\r\n\t</li>\r\n\t<li>\r\n\tAdd APIs for saving and restoring undo history.\r\n\t</li>\r\n\t<li>\r\n\tFor GTK, when laying out text, detect runs with both left-to-right and right-to-left ranges and divide into an ASCII prefix and\r\n\tmore complex suffix. Lay out the ASCII prefix in the standard manner but, for the suffix, measure the whole width\r\n\tand spread that over the suffix bytes. This produces more usable results where the caret moves over the ASCII prefix correctly\r\n\tand over the suffix reasonably but not accurately.\r\n\t</li>\r\n\t<li>\r\n\tFor ScintillaEdit on Qt, fix reference from ScintillaDocument to Document to match change in 5.4.1\r\n\tusing IDocumentEditable for SCI_GETDOCPOINTER and SCI_SETDOCPOINTER.\r\n\t</li>\r\n\t<li>\r\n\tFor Direct2D on Win32, use the multi-threaded option to avoid crashes when Scintilla instances\r\n\tcreated on different threads. There may be more problems with this scenario so it should be avoided.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2420/\">Bug #2420</a>.\r\n\t</li>\r\n\t<li>\r\n\tFor Win32, ensure keyboard-initiated context menu appears in multi-screen situations.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scintilla541.zip\">Release 5.4.1</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 27 December 2023.\r\n\t</li>\r\n\t<li>\r\n\tAdd IDocumentEditable interface to allow efficient interaction with document objects which may not be visible in\r\n\ta Scintilla instance. This feature is provisional and may change before being declared stable.\r\n\tFor better type-safety, the ScintillaCall C++ API uses IDocumentEditable* where void* was used before which may require\r\n\tchanges to client code that uses document pointer APIs\r\n\tDocPointer, SetDocPointer, CreateDocument, AddRefDocument, and ReleaseDocument.\r\n\t</li>\r\n\t<li>\r\n\tCtrl-click on a selection deselects it in multiple selection mode.\r\n\t</li>\r\n\t<li>\r\n\tAdd SCI_SELECTIONFROMPOINT for modifying multiple selections.\r\n\t</li>\r\n\t<li>\r\n\tAdd SCI_SETMOVEEXTENDSSELECTION and SCI_CHANGESELECTIONMODE to\r\n\tsimplify selection mode manipulation.\r\n\t</li>\r\n\t<li>\r\n\tImprove performance of global replace by reducing cache invalidation overhead.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1502/\">Feature #1502</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix regular expression search for \"\\&lt;\" matching beginning of search when not beginning of word and\r\n\tfor \"\\&gt;\" not matching line end.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2157/\">Bug #2157</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix regular expression search failure when search for \"\\&lt;\" followed by search for \"\\&gt;\".\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2413/\">Bug #2413</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix regular expression assertion (^, $, \\b. \\B) failures when using SCFIND_CXX11REGEX.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2405/\">Bug #2405</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix regular expression bug in reverse direction where shortened match returned.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2405/\">Bug #2405</a>.\r\n\t</li>\r\n\t<li>\r\n\tAvoid character fragments in regular expression search results.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2405/\">Bug #2405</a>.\r\n\t</li>\r\n\t<li>\r\n\tWith a document that does not have the SC_DOCUMENTOPTION_TEXT_LARGE option set,\r\n\tallocating more than 2G (calling SCI_ALLOCATE or similar) will now fail with SC_STATUS_FAILURE.\r\n\t</li>\r\n\t<li>\r\n\tProtect SCI_REPLACETARGET, SCI_REPLACETARGETMINIMAL, and SCI_REPLACETARGETRE from\r\n\tapplication changing target in notification handlers.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2289/\">Bug #2289</a>.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scintilla540.zip\">Release 5.4.0</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 18 November 2023.\r\n\t</li>\r\n\t<li>\r\n\tFix crashes on macOS 12 and older when built with Xcode 15.0.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scintilla538.zip\">Release 5.3.8</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 5 November 2023.\r\n\t</li>\r\n\t<li>\r\n\tFix excessive memory use when deleting contiguous ranges backwards.\r\n\t<a href=\"https://github.com/notepad-plus-plus/notepad-plus-plus/issues/13442\">Notepad++ Issue #13442</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix incorrect substitution when searching for a regular expression backwards.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2405/\">Bug #2405</a>.\r\n\t</li>\r\n\t<li>\r\n\tMake SCI_MOVESELECTEDLINESUP and SCI_MOVESELECTEDLINESDOWN work for rectangular selections.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2078/\">Bug #2078</a>.\r\n\t</li>\r\n\t<li>\r\n\tFor Cocoa, minimum supported macOS release increased to 10.13.\r\n\t</li>\r\n\t<li>\r\n\tFor Cocoa, fix invisible text on macOS 14 Sonoma.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2402/\">Bug #2402</a>.\r\n\t</li>\r\n\t<li>\r\n\tFor Cocoa, do nothing for suspendDrawing on macOS 10.14+ as the underlying calls have been deprecated.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scintilla537.zip\">Release 5.3.7</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 22 September 2023.\r\n\t</li>\r\n\t<li>\r\n\tFor GTK on macOS, fix popup window behaviour by setting type hints.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2401/\">Bug #2401</a>.\r\n\t</li>\r\n\t<li>\r\n\tFor GTK, fix assertion failure on some systems when an INDIC_SQUIGGLEPIXMAP drawn\r\n\tfor a zero-width character.\r\n\t</li>\r\n\t<li>\r\n\tFor Qt, allow parent window to handle context menu events by setting as ignored.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2395/\">Bug #2395</a>.\r\n\t</li>\r\n\t<li>\r\n\tFor Qt, fix potential crash when using IME with large amount of text selected.\r\n\t</li>\r\n\t<li>\r\n\tFor Windows, fix building with non-English environment.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2400/\">Bug #2400</a>.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scintilla536.zip\">Release 5.3.6</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 26 July 2023.\r\n\t</li>\r\n\t<li>\r\n\tRedraw calltip after showing as didn't update when size of new text exactly same as\r\n\tprevious.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1486/\">Feature #1486</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Win32 fix reverse arrow cursor when scaled.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2382/\">Bug #2382</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Win32 hide cursor when typing if that system preference has been chosen.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2333/\">Bug #2333</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Win32 and Qt, stop aligning IME candidate window to target.\r\n\tIt is now always aligned to start of composition string.\r\n\tThis undoes part of feature #1300.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1488/\">Feature #1488</a>,\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2391/\">Bug #2391</a>,\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1300/\">Feature #1300</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Qt, for IMEs, update micro focus when selection changes.\r\n\tThis may move the location of IME popups to align with the caret.\r\n\t</li>\r\n\t<li>\r\n\tOn Qt, implement replacement for IMEs which may help with actions like reconversion.\r\n\tThis is similar to delete-surrounding on GTK.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scintilla535.zip\">Release 5.3.5</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 31 May 2023.\r\n\t</li>\r\n\t<li>\r\n\tOn Win32, implement IME context sensitivity with IMR_DOCUMENTFEED.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1310/\">Feature #1310</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Win32 remove dependence on MSIMG32.DLL  by replacing AlphaBlend\r\n\tby GdiAlphaBlend.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1923/\">Bug #1923</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Qt, stop movement of IME candidate box.\r\n\t</li>\r\n\t<li>\r\n\tOn Qt, report correct caret position within paragraph for IME retrieve surrounding text.\r\n\t</li>\r\n\t<li>\r\n\tOn Qt for Cocoa, fix crash in entry of multi-character strings with IME.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scintilla534.zip\">Release 5.3.4</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 8 March 2023.\r\n\t</li>\r\n\t<li>\r\n\tAdd multithreaded wrap to significantly improve performance of wrapping large files.\r\n\t</li>\r\n\t<li>\r\n\tMore typesafe bindings of *Full APIs in ScintillaCall.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1477/\">Feature #1477</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix overlapping of text with line end wrap marker.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2378/\">Bug #2378</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix clipping of line end wrap symbol for SC_WRAPVISUALFLAGLOC_END_BY_TEXT.\r\n\t</li>\r\n\t<li>\r\n\tWhere a multi-byte character contains multiple styles, display each byte as a representation.\r\n\tThis makes it easier to see and fix lexers that change styles mid-character, commonly because\r\n\tthey use fixed size buffers.\r\n\t</li>\r\n\t<li>\r\n\tFix a potential crash with autocompletion list fill-ups where a SCN_CHARADDED\r\n\thandler retriggered an autocompletion list, but with no items that match the typed character.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scintilla533.zip\">Release 5.3.3</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 8 February 2023.\r\n\t</li>\r\n\t<li>\r\n\tFix SCI_LINESJOIN bug where carriage returns were incorrectly retained.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2372/\">Bug #2372</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix SCI_VERTICALCENTRECARET to update the vertical scroll position.\r\n\t</li>\r\n\t<li>\r\n\tWhen an autocompletion list is shown in response to SCN_CHARADDED, do not process character as fill-up or stop.\r\n\tThis avoids closing immediately when a character may both trigger and finish autocompletion.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa fix character input bug where dotless 'i' and some other extended\r\n\tLatin characters could not be entered.\r\n\tThe change also stops SCI_ASSIGNCMDKEY from working with these characters\r\n\ton Cocoa.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2374/\">Bug #2374</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK, support IME context.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1476/\">Feature #1476</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK on Win32, fix scrolling speed to not be too fast.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2375/\">Bug #2375</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Qt, fix indicator drawing past left of text pane over margin.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2373/\">Bug #2373</a>,\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1956/\">Bug #1956</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Qt, allow scrolling with mouse wheel when scroll bar hidden.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scintilla532.zip\">Release 5.3.2</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 6 December 2022.\r\n\t</li>\r\n\t<li>\r\n\tAdd SCI_REPLACETARGETMINIMAL to change text without causing unchanged prefix and suffix\r\n\tto be marked as modified in change history.\r\n\t</li>\r\n\t<li>\r\n\tDraw background colour for EOL annotations with standard and boxed visuals.\r\n\t</li>\r\n\t<li>\r\n\tAdd SCI_GETSTYLEDTEXTFULL to support 64-bit document positions on Win32 replacing\r\n\tSCI_GETSTYLEDTEXT which is not safe for huge documents.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1455/\">Feature #1455</a>.\r\n\t</li>\r\n\t<li>\r\n\tSend SCN_AUTOCCOMPLETED for SCI_AUTOCSHOW\r\n\ttriggering insertion because of SCI_AUTOCSETCHOOSESINGLE mode.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1459/\">Feature #1459</a>.\r\n\t</li>\r\n\t<li>\r\n\tChange 'paragraph up' commands SCI_PARAUP and SCI_PARAUPEXTEND to\r\n\tgo to the start position of the paragraph containing the caret.\r\n\tOnly if the caret is already at the start of the paragraph will it go to the start\r\n\tof the previous paragraph.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2363/\">Bug #2363</a>.\r\n\t</li>\r\n\t<li>\r\n\tChange release compilation optimization option to favour speed over space.\r\n\t-O2 for MSVC and -O3 for gcc and clang.\r\n\t</li>\r\n\t<li>\r\n\tOn Win32, avoid blurry display with DirectWrite in GDI scaling mode.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2344/\">Bug #2344</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Win32, use the top-level window to find the monitor for DirectWrite rendering parameters.\r\n\tTemporarily switch DPI awareness to find correct monitor in GDI scaling mode.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2344/\">Bug #2344</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Qt, implement SCI_SETRECTANGULARSELECTIONMODIFIER for all platforms.\r\n\t</li>\r\n\t<li>\r\n\tOn Qt, allow string form XPM images for SCI_REGISTERIMAGE.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scintilla531.zip\">Release 5.3.1</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 12 October 2022.\r\n\t</li>\r\n\t<li>\r\n\tAdded SCI_STYLESETINVISIBLEREPRESENTATION to make it easier to edit around invisible text.\r\n\tThis also allows representing long lexemes with a single character to provide a summarized view.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1453/\">Feature #1453</a>.\r\n\t</li>\r\n\t<li>\r\n\tRemoved NotifyLexerChanged notification from DocWatcher.\r\n\tThis is a private interface but could be used by independent platform layers\r\n\tand was exposed by ScintillaDocument in the Qt implementation of ScintillaEdit.\r\n\t</li>\r\n\t<li>\r\n\tDraw lines more consistently in SC_PHASES_TWO and SC_PHASES_ONE modes by\r\n\tclipping drawing to just the line rectangle.\r\n\tThis stops drawing some extreme ascenders, descenders and portions of indicators which\r\n\tmay appear and then disappear depending on which lines were drawn.\r\n\t</li>\r\n\t<li>\r\n\tDraw SC_MARK_BAR markers underneath other markers\r\n\tas they often cover multiple lines for change history and other markers mark individual lines.\r\n\t</li>\r\n\t<li>\r\n\tEnlarge point and point top indicators and scale to be larger with larger text.\r\n\t</li>\r\n\t<li>\r\n\tSuppress change history background line shading when printing.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2358/\">Bug #2358</a>.\r\n\t</li>\r\n\t<li>\r\n\tMake SCI_LINESCROLL more accurate when width of space not integer.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2357/\">Bug #2357</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Win32 implement horizontal scrolling mouse wheel.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1450/\">Feature #1450</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Win32 implement horizontal scrolling with Shift + mouse wheel.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/749/\">Feature #749</a>,\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1451/\">Feature #1451</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Win32 ensure page and step clicks on horizontal scroll bar do not overshoot document width.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK, fix bug where there were too many or too few lines when wrapping.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2349/\">Bug #2349</a>.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scintilla530.zip\">Release 5.3.0</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 27 August 2022.\r\n\t</li>\r\n\t<li>\r\n\tAdded change history which can display document changes (modified, saved, ...)\r\n\tin the margin or in the text.\r\n\t</li>\r\n\t<li>\r\n\tAdd SC_MARK_BAR marker and INDIC_POINT_TOP indicator.\r\n\tSC_MARK_BAR is an outlined and filled rectangle that takes the full height of the line and 1/3\r\n\tof the margin width.\r\n\tTo give a connected appearance, it displays even on wrapped lines and draws end caps on the first and last line.\r\n\tINDIC_POINT_TOP is the same as INDIC_POINT but draws at the top of the line instead of the bottom.\r\n\tINDIC_POINT and INDIC_POINTCHARACTER were tweaked to be 1 pixel taller and 2 pixels wider in\r\n\ttwo-phase draw mode to be clearer.\r\n\tThe translucency of INDIC_COMPOSITIONTHICK can be changed with SCI_INDICSETOUTLINEALPHA.\r\n\t</li>\r\n\t<li>\r\n\tImprove drawing of rounded rectangles on Direct2D.\r\n\t</li>\r\n\t<li>\r\n\tLine state optimized to avoid excess allocations by always allocating for every line.\r\n\tThis makes SCI_GETMAXLINESTATE less useful although it can still distinguish cases\r\n\twhere line state was never set for any lines.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1441/\">Feature #1441</a>.\r\n\t</li>\r\n\t<li>\r\n\tAdd SC_FOLDACTION_CONTRACT_EVERY_LEVEL option to contract every level for\r\n\tSCI_FOLDALL.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2340/\">Bug #2340</a>.\r\n\t</li>\r\n\t<li>\r\n\tEnable multiline regex for gcc and clang when REGEX_MULTILINE defined.\r\n\tThis requires gcc 11.3 or clang 14.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2338/\">Bug #2338</a>.\r\n\t</li>\r\n\t<li>\r\n\tStop including STYLE_CALLTIP when calculating line height.\r\n\tAllows a large font to be used for calltips without affecting text display.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2341/\">Bug #2341</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix incorrect display of selection when printing in some modes.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2335/\">Bug #2335</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix crash on Qt when showing autocompletion and the caret isn't on a screen.\r\n\tMove autocompletion onto screen when above it.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scintilla524.zip\">Release 5.2.4</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 10 July 2022.\r\n\t</li>\r\n\t<li>\r\n\tFix hiding selection when selection layer is SC_LAYER_UNDER_TEXT.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2334/\">Bug #2334</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix bad background colour for additional, secondary, and inactive selections when printing.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2335/\">Bug #2335</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix failures on GTK with non-UTF-8 text when multi-threading due to\r\n\tcharacter set conversion code that was not thread-safe.\r\n\t</li>\r\n\t<li>\r\n\tFix crash when printing on Win32 in bidirectional mode with a non-empty selection.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scintilla523.zip\">Release 5.2.3</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 22 May 2022.\r\n\t</li>\r\n\t<li>\r\n\tDuplicate APIs to support 64-bit document positions on Win32:\r\n\tSCI_GETTEXTRANGEFULL, SCI_FINDTEXTFULL, and SCI_FORMATRANGEFULL.\r\n\tThis adds new types to Scintilla.iface which may impact downstream projects.\r\n\tApplications should move to these APIs from their predecessors as they will be deprecated.\r\n\t</li>\r\n\t<li>\r\n\tImprove performance of SCI_FOLDALL(SC_FOLDACTION_EXPAND) by not lexing whole document\r\n\tas it does not depend on folding structure.\r\n\t</li>\r\n\t<li>\r\n\tFix partial updates and non-responsive scroll bars on Xorg.\r\n\tThis defers scroll bar changes to an idle task so could affect applications that depend on\r\n\tthe scroll position being updated.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2322/\">Bug #2322</a>,\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2196/\">Bug #2196</a>,\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2312/\">Bug #2312</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix problem with horizontally inverted glyphs with buffered drawing and WS_EX_LAYOUTRTL set on Win32 GDI.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1435/\">Feature #1435</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix ARM64 builds with Visual C++ due to unsupported CETCOMPAT flag.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2324/\">Bug #2324</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, place autocompletion lists and calltips on a higher window level so they can be seen\r\n\twhen invoked from a modal dialog.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2329/\">Bug #2329</a>.\r\n\t</li>\r\n\t<li>\r\n\tFor Qt 6, fix \"modified\" signal when text is null but length non-0.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2328/\">Bug #2328</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix pink selection background when printing by making it completely transparent.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scintilla522.zip\">Release 5.2.2</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 31 March 2022.\r\n\t</li>\r\n\t<li>\r\n\tAdd SCI_GETSTYLEINDEXAT API to return styles over 127 as positive integers.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1431/\">Feature #1431</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK, scroll horizontally with shift + scroll wheel.\r\n\t</li>\r\n\t<li>\r\n\tFix crash with unexpected right-to-left text on GTK.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2309/\">Bug #2309</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix position of end-of-line annotation when fold display text is visible.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2320/\">Bug #2320</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Direct2D, support per-monitor text rendering parameters.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1432/\">Feature #1432</a>.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scintilla521.zip\">Release 5.2.1</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 24 February 2022.\r\n\t</li>\r\n\t<li>\r\n\tEnable multi-threaded layout on GTK.\r\n\t</li>\r\n\t<li>\r\n\tFix pixmap leak on GTK.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2317/\">Bug #2317</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix re-entrant painting on GTK to maintain update region.\r\n\t</li>\r\n\t<li>\r\n\tFix key map for GTK on macOS.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2315/\">Bug #2315</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix building for Haiku.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2315/\">Bug #2315</a>.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scintilla520.zip\">Release 5.2.0</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 9 February 2022.\r\n\t</li>\r\n\t<li>\r\n\tAdd multithreaded layout to significantly improve performance for very wide lines.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1427/\">Feature #1427</a>.\r\n\t</li>\r\n\t<li>\r\n\tMade compatible with Qt 6.\r\n\t</li>\r\n\t<li>\r\n\tFix potential issue with length of buffer for string returning APIs in ScintillaEdit on Qt.\r\n\t</li>\r\n\t<li>\r\n\tFix inaccurate scroll bar when there are annotations and wrapping of inserted or deleted text changes\r\n\tnumber of screen lines.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1422/\">Feature #1422</a>.\r\n\t</li>\r\n\t<li>\r\n\tAllow choice of object file directory with makefile by setting DIR_O.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2306/\">Bug #2306</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK, use fractional positioning to help Chinese characters in monospaced fonts\r\n\tline up better with roman characters.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2310/\">Bug #2310</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn macOS allow Scintilla to run if built without cursor images.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1425/\">Feature #1425</a>.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scintilla515.zip\">Release 5.1.5</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 7 December 2021.\r\n\t</li>\r\n\t<li>\r\n\tScintillaEditPy, Python bindings for Qt using PySide, has been removed.\r\n\tScintilla was never updated for PySide 2 which was released in 2018 and PySide 1\r\n\tfell out of support making it difficult to use.\r\n\tTests that use ScintillaEditPy were removed.\r\n\t</li>\r\n\t<li>\r\n\tWhen calling SCI_GETTEXT, SCI_GETSELTEXT, and SCI_GETCURLINE with a NULL buffer argument\r\n\tto discover the length that should be allocated, do not include the terminating NUL in the returned value.\r\n\tThe value returned is 1 less than previous versions of Scintilla.\r\n\tApplications should allocate a buffer 1 more than this to accommodate the NUL.\r\n\tThe wParam (length) argument to SCI_GETTEXT and SCI_GETCURLINE also omits the NUL.\r\n\tThis is more consistent with other APIs.\r\n\t</li>\r\n\t<li>\r\n\tFix assertion failure with autocompletion list when order is SC_ORDER_CUSTOM\r\n\tor SC_ORDER_PERFORMSORT and the list is empty.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2294/\">Bug #2294</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Win32 prevent potential memory leaks for Korean language input.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2295/\">Bug #2295</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa set active state correctly at creation.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2299/\">Bug #2299</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn macOS 12, fix bug where margin would not draw when scrolled.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2292/\">Bug #2292</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, fix crash when drag image empty.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2300/\">Bug #2300</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK using Wayland, display autocompletion with window on a secondary monitor.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2296/\">Bug #2296</a>,\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2261/\">Bug #2261</a>.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scintilla514.zip\">Release 5.1.4</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 8 November 2021.\r\n\t</li>\r\n\t<li>\r\n\tAdd DEL to standard set of space characters for word operations.\r\n\t</li>\r\n\t<li>\r\n\tAdd CARETSTYLE_CURSES to draw more than 1 caret on curses terminal.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK, fix primary selection paste within same instance.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2287/\">Bug #2287</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK, fix potential crash when closing Scintilla instances due to releasing global settings object.\r\n\t</li>\r\n\t<li>\r\n\tOn Win32, when window is wider than scroll width,\r\n\tuse correct values when checking whether to change horizontal scroll bar so\r\n\tonly update and notify dwell end when needed.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2288/\">Bug #2288</a>.\r\n\t</li>\r\n\t<li>\r\n\tGetLineEndTypesSupported returns LineEndType, not int.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scintilla513.zip\">Release 5.1.3</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 29 September 2021.\r\n\t</li>\r\n\t<li>\r\n\tFix bug with SCI_STYLESETCHECKMONOSPACED on Cocoa that led to incorrect\r\n\tlayout with overlapping text.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scintilla512.zip\">Release 5.1.2</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 23 September 2021.\r\n\t</li>\r\n\t<li>\r\n\tAdd SCI_STYLESETCHECKMONOSPACED which can be used to optimize fonts that are monospaced\r\n\tover the ASCII graphics characters.\r\n\t</li>\r\n\t<li>\r\n\tAdd SC_ELEMENT_FOLD_LINE to set the colour of fold lines.\r\n\tAdd SC_ELEMENT_HIDDEN_LINE to show where lines are hidden.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1241/\">Feature #1241</a>,\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/382/\">Feature #382</a>,\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/203/\">Feature #203</a>.\r\n\t</li>\r\n\t<li>\r\n\tAdd SCI_SETCARETLINEHIGHLIGHTSUBLINE to highlight just the subline containing the caret instead of\r\n\tthe whole document line.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/841/\">Feature #841</a>.\r\n\t</li>\r\n\t<li>\r\n\tAllow SCI_HIDELINES to hide the first line or all lines which can be useful for filtered views.\r\n\t</li>\r\n\t<li>\r\n\tMake negative settings for extra ascent and descent safer by ensuring calculated ascent and thus\r\n\tline height is at least 1 pixel.\r\n\t</li>\r\n\t<li>\r\n\tFix display of fold lines when wrapped so they are only drawn once per line, not on each subline.\r\n\t</li>\r\n\t<li>\r\n\tFix crash with too many subexpressions in regular expression search with SCFIND_CXX11REGEX.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2281/\">Bug #2281</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK, fix the line spacing so that underscores and accents are visible for some fonts such as\r\n\tDejaVu Sans Mono 10.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK, respond to changes in system font scaling by clearing any cached layout data.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, fix memory leak caused by circular references.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2268/\">Bug #2268</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, fix disabling horizontal scrollbar in non-wrapping mode.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2271/\">Bug #2271</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, ensure cursor and background images are loaded.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scintilla511.zip\">Release 5.1.1</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 26 July 2021.\r\n\t</li>\r\n\t<li>\r\n\tIn DBCS encodings, treat valid DBCS lead byte followed by invalid trail byte as single byte.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1408/\">Feature #1408</a>.\r\n\t</li>\r\n\t<li>\r\n\tSearching was optimized for documents that contain mostly ASCII text and is often 2-3 times faster.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1381/\">Feature #1381</a>.\r\n\t</li>\r\n\t<li>\r\n\tWord searching behaves more consistently at start and end of document.\r\n\t</li>\r\n\t<li>\r\n\tAdd SCI_ALLOCATELINES to allocate indices to hold some number of lines.\r\n\tThis can decrease reallocation overhead when the application can count or estimate the number of lines in huge files.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1370/\">Feature #1370</a>.\r\n\t</li>\r\n\t<li>\r\n\tAdd SCI_AUTOCSETOPTIONS to allow choosing a non-resizeable autocompletion list\r\n\ton Win32.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1284/\">Feature #1284</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Win32, when technology is changed, buffering is set to a reasonable value for the technology:\r\n\ton for GDI and off for Direct2D as Direct2D performs its own buffering.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1400/\">Feature #1400</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Win32, implement WM_SETREDRAW to turn off scroll bar updates.\r\n\tThis can be used to reduce overhead when making many changes.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1411/\">Feature #1411</a>.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scintilla510.zip\">Release 5.1.0</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 23 June 2021.\r\n\t</li>\r\n\t<li>\r\n\tThis is a stable release. Interfaces with lexers and between platform-independent code\r\n\tand platform layers should remain compatible through 5.x releases.\r\n\t</li>\r\n\t<li>\r\n\tAdd SciFnDirectStatus, a direct access function which also returns status.\r\n\tIt can be retrieved with SCI_GETDIRECTSTATUSFUNCTION.\r\n\tThis can avoid calling SCI_GETSTATUS after every API to determine failure so can\r\n\timprove performance.\r\n\t</li>\r\n\t<li>\r\n\tAdd more type-safe wrappers to the API.\r\n\tThese are defined in include/ScintillaCall.h and implemented in call/ScintillaCall.cxx.\r\n\tScintillaCall throws Scintilla::Failure exceptions when a call fails.\r\n\t</li>\r\n\t<li>\r\n\tAdd APIs for setting appearance (traditional blob or plain text) and colour of representations\r\n\tand support setting a representation for the \"\\r\\n\" line end sequence.\r\n\t</li>\r\n\t<li>\r\n\tAdd SCI_REPLACERECTANGULAR to insert text like a rectangular paste.\r\n\t</li>\r\n\t<li>\r\n\tFixed bug with SCI_GETLASTCHILD.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2260/\">Bug #2260</a>.\r\n\t</li>\r\n\t<li>\r\n\tFixed gcc link-time-optimization (LTO) compilation.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2259/\">Bug #2259</a>.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scintilla503.zip\">Release 5.0.3</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 2 June 2021.\r\n\t</li>\r\n\t<li>\r\n\tA more type-safe binding of Scintilla's API that can be used from C++ is implemented in the\r\n\tScintillaTypes.h, ScintillaMessages.h, and ScintillaStructures.h headers.\r\n\t</li>\r\n\t<li>\r\n\tChange the way that selections and carets are drawn to use the element APIs.\r\n\tThe selection background colour may default to use platform APIs to discover global\r\n\tor user settings and may change in response to those settings changing.\r\n\tThe SCI_SETSELECTIONLAYER method defines whether the selection background is drawn\r\n\ttranslucently over or under text or opaquely underneath other drawing.\r\n\t</li>\r\n\t<li>\r\n\tChange caret line drawing to use SC_ELEMENT_CARET_LINE_BACK element and\r\n\tSCI_SETCARETLINELAYER method.\r\n\tOlder caret line APIs SCI_SETCARETLINEVISIBLE, SCI_SETCARETLINEBACK,\r\n\tSCI_SETCARETLINEBACKALPHA now discouraged.\r\n\t</li>\r\n\t<li>\r\n\tAdd SCI_MARKERSETLAYER to define layer on which to draw content area markers.\r\n\tThis replaces the use of SC_ALPHA_NOALPHA for markers.\r\n\t</li>\r\n\t<li>\r\n\tAdd SCI_GETELEMENTBASECOLOUR to return the default values for element colours.\r\n\t</li>\r\n\t<li>\r\n\tAdd SC_ELEMENT_WHITE_SPACE to set the colour of visible whitespace including translucency.\r\n\t</li>\r\n\t<li>\r\n\tAdd elements for hot spots SC_ELEMENT_HOT_SPOT_ACTIVE and\r\n\tSC_ELEMENT_HOT_SPOT_ACTIVE_BACK.\r\n\t</li>\r\n\t<li>\r\n\tMake idle actions wrapping and background styling smoother by\r\n\tmeasuring per-byte instead of per-line and allowing just one line to be\r\n\tprocessed in a time slice.\r\n\tVery long lines will not distort estimation\tor block interaction as much.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1373/\">Feature #1373</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK 3 with Wayland, fix primary selection.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2227/\">Bug #2227</a>.\r\n\t</li>\r\n\t<li>\r\n\tUpdate to Unicode 13.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1379/\">Feature #1379</a>.\r\n\t</li>\r\n\t<li>\r\n\tInclude modifiers in SCN_INDICATORRELEASE notification.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2254/\">Bug #2254</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Win32 enable hardware-enforced stack protection.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1405/\">Feature #1405</a>.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scintilla502.zip\">Release 5.0.2</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 23 April 2021.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa with macOS 11, use plain style for autocompletion to fix problems with truncating text\r\n\tand padding. This makes autocompletion look the same on macOS 11 as macOS 10.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2248/\">Bug #2248</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Windows, fix encoding used for text display with DirectWrite.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2246/\">Bug #2246</a>.\r\n\t</li>\r\n\t<li>\r\n\tImplement font locale SCI_SETFONTLOCALE. Initially only for DirectWrite on Win32.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2027/\">Bug #2027</a>.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scintilla501.zip\">Release 5.0.1</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 9 April 2021.\r\n\t</li>\r\n\t<li>\r\n\tRemove SetLexer, SetLexerLanguage, and LoadLexerLibrary methods.\r\n\tThese have been superceded by Lexilla and the SetILexer API.\r\n\t</li>\r\n\t<li>\r\n\tImprove the platform layer interface.\r\n\tAdd support for stroke width and translucency to drawing methods.\r\n\tAllow clipping to nest.\r\n\tAdd methods for UTF-8 text.\r\n\tAdd methods for encoding conversion.\r\n\tUse these changes to improve appearance.\r\n\t</li>\r\n\t<li>\r\n\tAdd SCI_SUPPORTSFEATURE method to allow applications to determine which features are available\r\n\tand to then choose workarounds for missing features like translucent drawing.\r\n\t</li>\r\n\t<li>\r\n\tAdd colouralpha type to Scintilla.iface for APIs that set both colour and transparency together as an RGBA value.\r\n\t</li>\r\n\t<li>\r\n\tAdd SCI_INDICSETSTROKEWIDTH to set stroke width of indicators.\r\n\t</li>\r\n\t<li>\r\n\tAdd methods to set translucency and stroke width of markers.\r\n\tSCI_MARKERSETFORETRANSLUCENT, SCI_MARKERSETBACKTRANSLUCENT,\r\n\tSCI_MARKERSETBACKSELECTEDTRANSLUCENT, SCI_MARKERSETSTROKEWIDTH.\r\n\t</li>\r\n\t<li>\r\n\tAdd shapes with curved and rounded ends to EOL annotations as EOLANNOTATION_*.\r\n\t</li>\r\n\t<li>\r\n\tAdd SCI_SETELEMENTCOLOUR and related APIs to change colours of visible elements.\r\n\tImplement SC_ELEMENT_LIST* to change colours of autocompletion lists.\r\n\t</li>\r\n\t<li>\r\n\tSupport Unicode characters as margin markers with SC_MARK_CHARACTER.\r\n\t</li>\r\n\t<li>\r\n\tEOL annotation text is now always treated as UTF-8 instead of in the document encoding.\r\n\t</li>\r\n\t<li>\r\n\tChange graphics coordinates from float (32-bit) to double (64-bit).\r\n\tFixes uneven line heights in large documents on Cocoa.\r\n\tIncreases memory use.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2224/\">Bug #2224</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, fix drawing in revealed area after enlarging window.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2238/\">Bug #2238</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Win32, fix crash with SC_TECHNOLOGY_DIRECTWRITERETAIN.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2243/\">Bug #2243</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK, changes in system font settings (such as from Tweak) are detected and position\r\n\tcaches are invalidated since different font display options, such as antialiasing, change\r\n\tcharacter shape and thus positions.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scite500.zip\">Release 5.0.0</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 5 March 2021.\r\n\t</li>\r\n\t<li>\r\n\tFirst version that separates Lexilla from Scintilla.\r\n\tEach of the 3 projects now has a separate history page but history before 5.0.0 remains combined.\r\n\t</li>\r\n\t<li>\r\n\tFix Alt+End (move to wrapped line end) for Japanese UTF-8 text..\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2231/\">Bug #2231</a>.\r\n\t</li>\r\n\t<li>\r\n\tSciTE uses the \"null\" lexer when it doesn't have a lexer assigned to a file.\r\n\tThis avoids activating a Lua script lexer if one is assigned.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scite446.zip\">Release 4.4.6</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 1 December 2020.\r\n\t</li>\r\n\t<li>\r\n\tFix building with Xcode 12.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2187/\">Bug #2187</a>.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scite445.zip\">Release 4.4.5</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 11 September 2020.\r\n\t</li>\r\n\t<li>\r\n\tLexilla interface supports setting initialisation properties on lexer libraries with\r\n\tSetLibraryProperty and GetLibraryPropertyNames functions.\r\n\tThese are called by SciTE which will forward properties to lexer libraries that are prefixed with\r\n\t\"lexilla.context.\".\r\n\t</li>\r\n\t<li>\r\n\tAllow cross-building for GTK by choosing pkg-config.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2189/\">Bug #2189</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK, allow setting CPPFLAGS (and LDFLAGS for SciTE) to support hardening.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2191/\">Bug #2191</a>.\r\n\t</li>\r\n\t<li>\r\n\tChanged SciTE's indent.auto mode to set tab size to indent size when file uses tabs for indentation.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2198/\">Bug #2198</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix position of marker symbols for SC_MARGIN_RTEXT which were being moved based on\r\n\twidth of text.\r\n\t</li>\r\n\t<li>\r\n\tFixed bug on Win32 where cursor was flickering between hand and text over an\r\n\tindicator with hover style.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2170/\">Bug #2170</a>.\r\n\t</li>\r\n\t<li>\r\n\tFixed bug where hovered indicator was not returning to non-hover\r\n\tappearance when mouse moved out of window or into margin.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2193/\">Bug #2193</a>.\r\n\t</li>\r\n\t<li>\r\n\tFixed bug where a hovered INDIC_TEXTFORE indicator was not applying the hover\r\n\tcolour to the whole range.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2199/\">Bug #2199</a>.\r\n\t</li>\r\n\t<li>\r\n\tFixed bug where gradient indicators were not showing hovered appearance.\r\n\t</li>\r\n\t<li>\r\n\tFixed bug where layout caching was ineffective.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2197/\">Bug #2197</a>.\r\n\t</li>\r\n\t<li>\r\n\tFor SciTE, don't show the output pane for quiet jobs.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1365/\">Feature #1365</a>.\r\n\t</li>\r\n\t<li>\r\n\tSupport command.quiet for SciTE on GTK.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1365/\">Feature #1365</a>.\r\n\t</li>\r\n\t<li>\r\n\tFixed a bug in SciTE with stack balance when a syntax error in the Lua startup script\r\n\tcaused continuing failures to find functions after the syntax error was corrected.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2176/\">Bug #2176</a>.\r\n\t</li>\r\n\t<li>\r\n\tAdded method for iterating through multiple vertical edges: SCI_GETMULTIEDGECOLUMN.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1350/\">Feature #1350</a>.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scite444.zip\">Release 4.4.4</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 21 July 2020.\r\n\t</li>\r\n\t<li>\r\n\tEnd of line annotations implemented.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2141/\">Bug #2141</a>.\r\n\t</li>\r\n\t<li>\r\n\tAdd SCI_BRACEMATCHNEXT API.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1368/\">Feature #1368</a>.\r\n\t</li>\r\n\t<li>\r\n\tThe latex lexer supports lstlisting environment that is similar to verbatim.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1358/\">Feature #1358</a>.\r\n\t</li>\r\n\t<li>\r\n\tFor SciTE on Linux, place liblexilla.so and libscintilla.so in /usr/lib/scite.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2184/\">Bug #2184</a>.\r\n\t</li>\r\n\t<li>\r\n\tRound SCI_TEXTWIDTH instead of truncating as this may be more accurate when sizing application\r\n\telements to match text.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1355/\">Feature #1355</a>.\r\n\t</li>\r\n\t<li>\r\n\tDisplay DEL control character as visible \"DEL\" block like other control characters.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1369/\">Feature #1369</a>.\r\n\t</li>\r\n\t<li>\r\n\tAllow caret width to be up to 20 pixels.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1361/\">Feature #1361</a>.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows adds create.hidden.console option to stop console window flashing\r\n\twhen Lua script calls os.execute or io.popen.\r\n\t</li>\r\n\t<li>\r\n\tFix translucent rectangle drawing on Qt. When drawing a translucent selection, there were edge\r\n\tartifacts as the calls used were drawing outlines over fill areas. Make bottom and right borders on\r\n\tINDIC_ROUNDBOX be same intensity as top and left.\r\n\tReplaced some deprecated Qt calls with currently supported calls.\r\n\t</li>\r\n\t<li>\r\n\tFix printing on Windows to use correct text size.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2185/\">Bug #2185</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix bug on Win32 where calling WM_GETTEXT for more text than in document could return\r\n\tless text than in document.\r\n\t</li>\r\n\t<li>\r\n\tFixed a bug in SciTE with Lua stack balance causing failure to find\r\n\tfunctions after reloading script.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2176/\">Bug #2176</a>.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scite443.zip\">Release 4.4.3</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 3 June 2020.\r\n\t</li>\r\n\t<li>\r\n\tFix syntax highlighting for SciTE on Windows by setting executable directory for loading Lexilla.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2181/\">Bug #2181</a>.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scite442.zip\">Release 4.4.2</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 2 June 2020.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa using Xcode changed Lexilla.dylib install path to @rpath as would otherwise try /usr/lib which\r\n\twon't work for sandboxed applications.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa using Xcode made work on old versions of macOS by specifying deployment target as 10.8\r\n\tinstead of 10.15.\r\n\t</li>\r\n\t<li>\r\n\tOn Win32 fix static linking of Lexilla by specifying calling convention in Lexilla.h.\r\n\t</li>\r\n\t<li>\r\n\tSciTE now uses default shared library extension even when directory contains '.'.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scite440.zip\">Release 4.4.0</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 1 June 2020.\r\n\t</li>\r\n\t<li>\r\n\tAdded Xcode project files for Lexilla and Scintilla with no lexers (cocoa/Scintilla).\r\n\t</li>\r\n\t<li>\r\n\tFor GTK, build a shared library with no lexers libscintilla.so or libscintilla.dll.\r\n\t</li>\r\n\t<li>\r\n\tLexilla used as a shared library for most builds of SciTE except for the single file executable on Win32.\r\n\tOn GTK, Scintilla shared library used.\r\n\tLexillaLibrary code can be copied out of SciTE for other applications that want to interface to Lexilla.\r\n\t</li>\r\n\t<li>\r\n\tConstants in Scintilla.h can be disabled with SCI_DISABLE_AUTOGENERATED.\r\n\t</li>\r\n\t<li>\r\n\tImplement per-monitor DPI Awareness on Win32 so both Scintilla and SciTE\r\n\twill adapt to the display scale when moved between monitors.\r\n\tApplications should forward WM_DPICHANGED to Scintilla.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2171/\">Bug #2171</a>,\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2063/\">Bug #2063</a>.\r\n\t</li>\r\n\t<li>\r\n\tOptimized performance when opening huge files.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1347/\">Feature #1347</a>.\r\n\t</li>\r\n\t<li>\r\n\tAdd Appearance and Contrast properties to SciTE that allow customising visuals for dark mode and\r\n\thigh contrast modes.\r\n\t</li>\r\n\t<li>\r\n\tFixed bug in Batch lexer where a single character line with a single character line end continued\r\n\tstate onto the next line.\r\n\t</li>\r\n\t<li>\r\n\tAdded SCE_ERR_GCC_EXCERPT style for GCC 9 diagnostics in errorlist lexer.\r\n\t</li>\r\n\t<li>\r\n\tFixed buffer over-read bug with absolute references in MMIXAL lexer.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2019/\">Bug #2019</a>.\r\n\t</li>\r\n\t<li>\r\n\tFixed bug with GTK on recent Linux distributions where underscores were invisible.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2173/\">Bug #2173</a>.\r\n\t</li>\r\n\t<li>\r\n\tFixed GTK on Linux bug when pasting from closed application.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2175/\">Bug #2175</a>.\r\n\t</li>\r\n\t<li>\r\n\tFixed bug in SciTE with Lua stack balance.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2176/\">Bug #2176</a>.\r\n\t</li>\r\n\t<li>\r\n\tFor macOS, SciTE reverts to running python (2) due to python3 not being available in the sandbox.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scite433.zip\">Release 4.3.3</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 27 April 2020.\r\n\t</li>\r\n\t<li>\r\n\tAdded Visual Studio project files for Lexilla and Scintilla with no lexers.\r\n\t</li>\r\n\t<li>\r\n\tAdd methods for iterating through the marker handles and marker numbers on a line:\r\n\tSCI_MARKERHANDLEFROMLINE and SCI_MARKERNUMBERFROMLINE.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1344/\">Feature #1344</a>.\r\n\t</li>\r\n\t<li>\r\n\tAssembler lexers asm and as can change comment character with lexer.as.comment.character property.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1314/\">Feature #1314</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix brace styling in Batch lexer so that brace matching works.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1624/\">Bug #1624</a>,\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1906/\">Bug #1906</a>,\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1997/\">Bug #1997</a>,\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2065/\">Bug #2065</a>.\r\n\t</li>\r\n\t<li>\r\n\tChange Perl lexer to style all line ends of comment lines in comment line style.\r\n\tPreviously, the last character was in default style which made the characters in\r\n\t\\r\\n line ends have mismatching styles.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2164/\">Bug #2164</a>.\r\n\t</li>\r\n\t<li>\r\n\tWhen a lexer has been set with SCI_SETILEXER, fix SCI_GETLEXER and avoid\r\n\tsending SCN_STYLENEEDED notifications.\r\n\t</li>\r\n\t<li>\r\n\tOn Win32 fix handling Japanese IME input when both GCS_COMPSTR and\r\n\tGCS_RESULTSTR set.\r\n\t</li>\r\n\t<li>\r\n\tWith Qt on Win32 add support for line copy format on clipboard, compatible with Visual Studio.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2167/\">Bug #2167</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Qt with default encoding (ISO 8859-1) fix bug where 'µ' (Micro Sign) case-insensitively matches '?'\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2168/\">Bug #2168</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK with Wayland fix display of windowed IME.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2149/\">Bug #2149</a>.\r\n\t</li>\r\n\t<li>\r\n\tFor Python programs, SciTE defaults to running python3 on Unix and pyw on Windows which will run\r\n\tthe most recently installed Python in many cases.\r\n\tSet the \"python.command\" property to override this.\r\n\tScripts distributed with Scintilla and SciTE are checked with Python 3 and may not work with Python 2.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scite432.zip\">Release 4.3.2</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 6 March 2020.\r\n\t</li>\r\n\t<li>\r\n\tOn Win32 fix new bug that treated all dropped text as rectangular.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scite431.zip\">Release 4.3.1</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 4 March 2020.\r\n\t</li>\r\n\t<li>\r\n\tAdd default argument for StyleContext::GetRelative.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1336/\">Feature #1336</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix drag and drop between different encodings on Win32 by always providing CF_UNICODETEXT only.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2151/\">Bug #2151</a>.\r\n\t</li>\r\n\t<li>\r\n\tAutomatically scroll while dragging text.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/497/\">Feature #497</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Win32, the numeric keypad with Alt pressed can be used to enter characters by number.\r\n\tThis can produce unexpected results in non-numlock mode when function keys are assigned.\r\n\tPotentially problematic keys like Alt+KeypadUp are now ignored.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2152/\">Bug #2152</a>.\r\n\t</li>\r\n\t<li>\r\n\tCrash fixed with Direct2D on Win32 when updating driver.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2138/\">Bug #2138</a>.\r\n\t</li>\r\n\t<li>\r\n\tFor SciTE on Win32, fix crashes when Lua script closes application.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2155/\">Bug #2155</a>.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scite430.zip\">Release 4.3.0</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 16 January 2020.\r\n\t</li>\r\n\t<li>\r\n\tLexers made available as Lexilla library.\r\n\tTestLexers program with tests for Lexilla and lexers added in lexilla/test.\r\n\t</li>\r\n\t<li>\r\n\tSCI_SETILEXER implemented to use lexers from Lexilla or other sources.\r\n\t</li>\r\n\t<li>\r\n\tILexer5 interface defined provisionally to support use of Lexilla.\r\n\tThe details of this interface may change before being stabilised in Scintilla 5.0.\r\n\t</li>\r\n\t<li>\r\n\tSCI_LOADLEXERLIBRARY implemented on Cocoa.\r\n\t</li>\r\n\t<li>\r\n\tBuild Scintilla with SCI_EMPTYCATALOGUE to avoid making lexers available.\r\n\t</li>\r\n\t<li>\r\n\tLexer and folder added for Raku language.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1328/\">Feature #1328</a>.\r\n\t</li>\r\n\t<li>\r\n\tDon't clear clipboard before copying text with Qt.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2147/\">Bug #2147</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Win32, remove support for CF_TEXT clipboard format as Windows will convert to\r\n\tCF_UNICODETEXT.\r\n\t</li>\r\n\t<li>\r\n\tImprove IME behaviour on GTK.\r\n\tSet candidate position for windowed IME.\r\n\tImprove location of candidate window.\r\n\tPrevent movement of candidate window while typing.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2135/\">Bug #2135</a>.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scite423.zip\">Release 4.2.3</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 11 December 2019.\r\n\t</li>\r\n\t<li>\r\n\tFix failure in SciTE's Complete Symbol command.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scite422.zip\">Release 4.2.2</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 7 December 2019.\r\n\t</li>\r\n\t<li>\r\n\tMove rather than grow selection when insertion at start.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2140/\">Bug #2140</a>.\r\n\t</li>\r\n\t<li>\r\n\tAllow target to have virtual space.\r\n\tAdd methods for finding the virtual space at start and end of multiple selections.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1316/\">Feature #1316</a>.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Win32 adds mouse button \"Forward\" and \"Backward\" key definitions for use in\r\n\tproperties like user.shortcuts.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1317/\">Feature #1317</a>.\r\n\t</li>\r\n\t<li>\r\n\tLexer and folder added for Hollywood language.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1324/\">Feature #1324</a>.\r\n\t</li>\r\n\t<li>\r\n\tHTML lexer treats custom tags from HTML5 as known tags. These contain \"-\" like \"custom-tag\".\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1299/\">Feature #1299</a>.\r\n\t</li>\r\n\t<li>\r\n\tHTML lexer fixes bug with some non-alphabetic characters in unknown tags.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1320/\">Feature #1320</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix bug in properties file lexer where long lines were only styled for the first 1024 characters.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1933/\">Bug #1933</a>.\r\n\t</li>\r\n\t<li>\r\n\tRuby lexer recognizes squiggly heredocs.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1326/\">Feature #1326</a>.\r\n\t</li>\r\n\t<li>\r\n\tAvoid unnecessary IME caret movement on Win32.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1304/\">Feature #1304</a>.\r\n\t</li>\r\n\t<li>\r\n\tClear IME state when switching language on Win32.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2137/\">Bug #2137</a>.\r\n\t</li>\r\n\t<li>\r\n\tFixed drawing of translucent rounded rectangles on Win32 with Direct2D.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2144/\">Bug #2144</a>.\r\n\t</li>\r\n\t<li>\r\n\tSetting rectangular selection made faster.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2130/\">Bug #2130</a>.\r\n\t</li>\r\n\t<li>\r\n\tSciTE reassigns *.s extension to the GNU Assembler language from the S+ statistical language.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scite421.zip\">Release 4.2.1</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 24 October 2019.\r\n\t</li>\r\n\t<li>\r\n\tAdd SCI_SETTABMINIMUMWIDTH to set the minimum width of tabs.\r\n\tThis allows minimaps or overviews to be laid out to match the full size editing view.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2118/\">Bug #2118</a>.\r\n\t</li>\r\n\t<li>\r\n\tSciTE enables use of SCI_ commands in user.context.menu.\r\n\t</li>\r\n \t<li>\r\n\tXML folder adds fold.xml.at.tag.open option to fold tags at the start of the tag \"&lt;\" instead of the end \"&gt;\".\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2128/\">Bug #2128</a>.\r\n\t</li>\r\n \t<li>\r\n\tMetapost lexer fixes crash with 'interface=none' comment.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2129/\">Bug #2129</a>.\r\n\t</li>\r\n \t<li>\r\n\tPerl lexer supports indented here-docs.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2121/\">Bug #2121</a>.\r\n\t</li>\r\n \t<li>\r\n\tPerl folder folds qw arrays.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1306/\">Feature #1306</a>.\r\n\t</li>\r\n \t<li>\r\n\tTCL folder can turn off whitespace flag by setting fold.compact property to 0.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2131/\">Bug #2131</a>.\r\n\t</li>\r\n \t<li>\r\n\tOptimize setting up keyword lists in lexers.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1305/\">Feature #1305</a>.\r\n\t</li>\r\n\t<li>\r\n\tUpdated case conversion and character categories to Unicode 12.1.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1315/\">Feature #1315</a>.\r\n\t</li>\r\n \t<li>\r\n\tOn Win32, stop the IME candidate window moving unnecessarily and position it better.<br />\r\n\tStop candidate window overlapping composition text and taskbar.<br />\r\n\tPosition candidate window closer to composition text.<br />\r\n\tStop candidate window moving while typing.<br />\r\n\tAlign candidate window to target part of composition text.<br />\r\n\tStop Google IME on Windows 7 moving while typing.<br />\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2120/\">Bug #2120</a>.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1300/\">Feature #1300</a>.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scite420.zip\">Release 4.2.0</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 5 July 2019.\r\n\t</li>\r\n \t<li>\r\n\tScintilla.iface adds line and pointer types, increases use of the position type, uses enumeration\r\n\ttypes in methods and properties, and adds enumeration aliases to produce better CamelCase\r\n\tidentifiers.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1297/\">Feature #1297</a>.\r\n\t</li>\r\n \t<li>\r\n\tSource of input (direct / IME composition / IME result) reported in SCN_CHARADDED so applications\r\n\tcan treat temporary IME composition input differently.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2038/\">Bug #2038</a>.\r\n\t</li>\r\n \t<li>\r\n\tLexer added for DataFlex.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1295/\">Feature #1295</a>.\r\n\t</li>\r\n \t<li>\r\n\tMatlab lexer now treats keywords as case-sensitive.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2112/\">Bug #2112</a>.\r\n\t</li>\r\n \t<li>\r\n\tSQL lexer fixes single quoted strings where '\" (quote, double quote) was seen as continuing the string.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2098/\">Bug #2098</a>.\r\n\t</li>\r\n \t<li>\r\n\tPlatform layers should use InsertCharacter method to perform keyboard and IME input, replacing\r\n\tAddCharUTF method.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1293/\">Feature #1293</a>.\r\n\t</li>\r\n \t<li>\r\n\tAdd CARETSTYLE_BLOCK_AFTER option to always display block caret after selection.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1924/\">Bug #1924</a>.\r\n\t</li>\r\n \t<li>\r\n\tOn Win32, limit text returned from WM_GETTEXT to the length specified in wParam.\r\n\tThis could cause failures when using assistive technologies like NVDA.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2110/\">Bug #2110</a>,\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2114/\">Bug #2114</a>.\r\n\t</li>\r\n \t<li>\r\n\tFix deletion of isolated invalid bytes.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2116/\">Bug #2116</a>.\r\n\t</li>\r\n \t<li>\r\n\tFix position of line caret when overstrike caret set to block.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2106/\">Bug #2106</a>.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scite417.zip\">Release 4.1.7</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 13 June 2019.\r\n\t</li>\r\n\t<li>\r\n\tFixes an incorrect default setting in SciTE which caused multiple visual features to fail to display.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scite416.zip\">Release 4.1.6</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 10 June 2019.\r\n\t</li>\r\n\t<li>\r\n\tFor Visual C++ 2019, /std:c++latest now includes some C++20 features so switch to /std:c++17.\r\n\t</li>\r\n\t<li>\r\n\tSciTE supports editing files larger than 2 gigabytes when built as a 64-bit application.\r\n\t</li>\r\n \t<li>\r\n\tLexer added for X12.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1280/\">Feature #1280</a>.\r\n\t</li>\r\n \t<li>\r\n\tCMake folder folds function - endfunction.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1289/\">Feature #1289</a>.\r\n\t</li>\r\n \t<li>\r\n\tVB lexer adds support for VB2017 binary literal &amp;B and digit separators 123_456.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1288/\">Feature #1288</a>.\r\n\t</li>\r\n\t<li>\r\n\tImproved performance of line folding code on large files when no folds are contracted.\r\n\tThis improves the time taken to open or close large files.\r\n\t</li>\r\n\t<li>\r\n\tFix bug where changing identifier sets in lexers preserved previous identifiers.\r\n\t</li>\r\n\t<li>\r\n\tFixed bug where changing to Unicode would rediscover line end positions even if still\r\n\tsticking to ASCII (not Unicode NEL, LS, PS) line ends.\r\n\tOnly noticeable on huge files with over 100,000 lines.\r\n\t</li>\r\n \t<li>\r\n\tChanged behaviour of SCI_STYLESETCASE(*,SC_CASE_CAMEL) so that it only treats 'a-zA-Z'\r\n\tas word characters because this covers the feature's intended use (viewing case-insensitive ASCII-only\r\n\tkeywords in a specified casing style) and simplifies the behaviour and code.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1238/\">Feature #1238</a>.\r\n\t</li>\r\n \t<li>\r\n\tIn SciTE added Camel case option \"case:c\" for styles to show keywords with initial capital.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scite415.zip\">Release 4.1.5</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 17 April 2019.\r\n\t</li>\r\n \t<li>\r\n\tOn Win32, removed special handling of non-0 wParam to WM_PAINT.\r\n\t</li>\r\n \t<li>\r\n\tImplement high-priority idle on Win32 to make redraw smoother and more efficient.\r\n\t</li>\r\n\t<li>\r\n\tAdd vertical bookmark symbol SC_MARK_VERTICALBOOKMARK.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1276/\">Feature #1276</a>.\r\n\t</li>\r\n \t<li>\r\n\tSet default fold display text SCI_SETDEFAULTFOLDDISPLAYTEXT(text).\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1272/\">Feature #1272</a>.\r\n\t</li>\r\n \t<li>\r\n\tAdd SCI_SETCHARACTERCATEGORYOPTIMIZATION API to optimize speed\r\n\tof character category features like determining whether a character is a space or number\r\n\tat the expense of memory.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1259/\">Feature #1259</a>.\r\n\t</li>\r\n \t<li>\r\n\tImprove the styling of numbers in Nim.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1268/\">Feature #1268</a>.\r\n\t</li>\r\n \t<li>\r\n\tFix exception when inserting DBCS text.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2093/\">Bug #2093</a>.\r\n\t</li>\r\n\t<li>\r\n\tImprove performance of accessibility on GTK.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2094/\">Bug #2094</a>.\r\n\t</li>\r\n \t<li>\r\n\tFix text reported for deletion with accessibility on GTK.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2095/\">Bug #2095</a>.\r\n\t</li>\r\n \t<li>\r\n\tFix flicker when inserting primary selection on GTK.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2087/\">Bug #2087</a>.\r\n\t</li>\r\n \t<li>\r\n\tSupport coloured text in Windows 8.1+.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1277/\">Feature #1277</a>.\r\n\t</li>\r\n \t<li>\r\n\tAvoid potential long hangs with idle styling for huge documents on Cocoa and GTK.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scite414.zip\">Release 4.1.4</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 7 March 2019.\r\n\t</li>\r\n\t<li>\r\n\tCalltips implemented on Qt.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1548/\">Bug #1548</a>.\r\n\t</li>\r\n \t<li>\r\n\tBlock caret in overtype mode SCI_SETCARETSTYLE(caretStyle | CARETSTYLE_OVERSTRIKE_BLOCK).\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1217/\">Feature #1217</a>.\r\n\t</li>\r\n \t<li>\r\n\tSciTE supports changing caret style via caret.style property.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1264/\">Feature #1264</a>.\r\n\t</li>\r\n \t<li>\r\n\tLexer added for .NET's Common Intermediate Language CIL.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1265/\">Feature #1265</a>.\r\n\t</li>\r\n \t<li>\r\n\tThe C++ lexer, with styling.within.preprocessor on, now interprets \"(\" in preprocessor \"#if(\"\r\n\tas an operator instead of part of the directive. This improves folding as well which could become\r\n\tunbalanced.\r\n\t</li>\r\n \t<li>\r\n\tFix raw strings in Nim.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1253/\">Feature #1253</a>.\r\n\t</li>\r\n \t<li>\r\n\tFix inconsistency with dot styling in Nim.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1260/\">Feature #1260</a>.\r\n\t</li>\r\n \t<li>\r\n\tEnhance the styling of backticks in Nim.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1261/\">Feature #1261</a>.\r\n\t</li>\r\n \t<li>\r\n\tEnhance raw string identifier styling in Nim.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1262/\">Feature #1262</a>.\r\n\t</li>\r\n \t<li>\r\n\tFix fold behaviour with comments in Nim.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1254/\">Feature #1254</a>.\r\n\t</li>\r\n \t<li>\r\n\tFix TCL lexer recognizing '\"' after \",\" inside a bracketed substitution.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1947/\">Bug #1947</a>.\r\n\t</li>\r\n \t<li>\r\n\tFix garbage text from SCI_MOVESELECTEDLINESUP and SCI_MOVESELECTEDLINESDOWN\r\n\tfor rectangular or thin selection by performing no action.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2078/\">Bug #2078</a>.\r\n\t</li>\r\n \t<li>\r\n\tEnsure container notified if Insert pressed when caret off-screen.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2083/\">Bug #2083</a>.\r\n\t</li>\r\n \t<li>\r\n\tFix memory leak when checking running instance on GTK.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1267/\">Feature #1267</a>.\r\n\t</li>\r\n\t<li>\r\n\tPlatform layer font cache removed on Win32 as there is a platform-independent cache.\r\n\t</li>\r\n\t<li>\r\n\tSciTE for GTK easier to build on macOS.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2084/\">Bug #2084</a>.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scite413.zip\">Release 4.1.3</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 10 January 2019.\r\n\t</li>\r\n\t<li>\r\n\tAdd SCI_SETCOMMANDEVENTS API to allow turning off command events as they\r\n\tcan be a significant performance cost.\r\n\t</li>\r\n\t<li>\r\n\tImprove efficiency of idle wrapping by wrapping in blocks as large as possible while\r\n\tstill remaining responsive.\r\n\t</li>\r\n\t<li>\r\n\tUpdated case conversion and character categories to Unicode 11.\r\n\t</li>\r\n\t<li>\r\n\tErrorlist lexer recognizes negative line numbers as some programs show whole-file\r\n\terrors occurring on line -1.\r\n\tSciTE's parsing of diagnostics also updated to handle this case.\r\n\t</li>\r\n \t<li>\r\n\tAdded \"nim\" lexer (SCLEX_NIM) for the Nim language which was previously called Nimrod.\r\n\tFor compatibility, the old \"nimrod\" lexer is still present but is deprecated and will be removed at the\r\n\tnext major version.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1242/\">Feature #1242</a>.\r\n\t</li>\r\n \t<li>\r\n\tThe Bash lexer implements substyles for multiple sets of keywords and supports SCI_PROPERTYNAMES.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2054/\">Bug #2054</a>.\r\n\t</li>\r\n \t<li>\r\n\tThe C++ lexer interprets continued preprocessor lines correctly by reading all of\r\n\tthe logical line.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2062/\">Bug #2062</a>.\r\n\t</li>\r\n \t<li>\r\n\tThe C++ lexer interprets preprocessor arithmetic expressions containing multiplicative and additive\r\n\toperators correctly by following operator precedence rules.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2069/\">Bug #2069</a>.\r\n\t</li>\r\n \t<li>\r\n\tThe EDIFACT lexer handles message groups as well as messages.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1247/\">Feature #1247</a>.\r\n\t</li>\r\n \t<li>\r\n\tFor SciTE's Find in Files, allow case-sensitivity and whole-word options when running\r\n\ta user defined command.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2053/\">Bug #2053</a>.\r\n\t</li>\r\n\t<li>\r\n\tNotify with SC_UPDATE_SELECTION when user performs a multiple selection add.\r\n\t</li>\r\n\t<li>\r\n\tOn macOS 10.14 Cocoa, fix incorrect horizontal offset.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2022/\">Bug #2022</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, fix a crash that occurred when entering a dead key diacritic then a character\r\n\tthat can not take that diacritic, such as option+e (acute accent) followed by g.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2061/\">Bug #2061</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, use dark info bar background when system is set to Dark Appearance.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2055/\">Bug #2055</a>.\r\n\t</li>\r\n\t<li>\r\n\tFixed a crash on Cocoa in bidirectional mode where some patterns of invalid UTF-8\r\n\tcaused failures to create Unicode strings.\r\n\t</li>\r\n\t<li>\r\n\tSCI_MARKERADD returns -1 for invalid lines as documented instead of 0.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2051/\">Bug #2051</a>.\r\n\t</li>\r\n\t<li>\r\n\tImprove performance of text insertion when Unicode line indexing off.\r\n\t</li>\r\n\t<li>\r\n\tFor Qt on Windows, stop specifying -std:c++latest as that is no longer needed\r\n\tto enable C++17 with MSVC 2017 and Qt 5.12 and it caused duplicate flag warnings.\r\n\t</li>\r\n\t<li>\r\n\tOn Linux, enable Lua to access dynamic libraries.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2058/\">Bug #2058</a>.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scite412.zip\">Release 4.1.2</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 2 October 2018.\r\n\t</li>\r\n\t<li>\r\n\tC++ lexer fixes evaluation of \"#elif\".\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2045/\">Bug #2045</a>.\r\n\t</li>\r\n\t<li>\r\n\tMarkdown lexer fixes highlighting of non-ASCII characters in links.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Win32 drops menukey feature, makes Del key work again in find and replace strips\r\n\tand disables F5 while command running.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/2044/\">Bug #2044</a>.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scite411.zip\">Release 4.1.1</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 9 September 2018.\r\n\t</li>\r\n\t<li>\r\n\tOptional indexing of line starts in UTF-8 documents by UTF-32 code points and UTF-16 code units added.\r\n\tThis can improve performance for clients that provide UTF-32 or UTF-16 interfaces or that need to interoperate\r\n\twith UTF-32 or UTF-16 components.\r\n\t</li>\r\n\t<li>\r\n\tLexers added for SAS and Stata.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1185/\">Feature #1185.</a>\r\n\t</li>\r\n\t<li>\r\n\tShell folder folds \"if\", \"do\", and \"case\".\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1144/\">Feature #1144.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE's menukey feature implemented on Windows.\r\n\t</li>\r\n\t<li>\r\n\tFor SciTE on Windows, user defined strip lists are now scrollable.\r\n\tCursor no longer flickers in edit and combo boxes.\r\n\tFocus in and out events occur for combo boxes.\r\n\t</li>\r\n\t<li>\r\n\tFix a leak in the bidirectional code on Win32.\r\n\t</li>\r\n\t<li>\r\n\tFix crash on Win32 when switching technology to default after setting bidirectional mode.\r\n\t</li>\r\n\t<li>\r\n\tFix margin cursor on Cocoa to point more accurately.\r\n\t</li>\r\n\t<li>\r\n\tFix SciTE crash on GTK+ when using director interface.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scite410.zip\">Release 4.1.0</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 19 June 2018.\r\n\t</li>\r\n\t<li>\r\n\tExperimental and incomplete support added for bidirectional text on Windows using DirectWrite and Cocoa for\r\n\tUTF-8 documents by calling SCI_SETBIDIRECTIONAL(SC_BIDIRECTIONAL_L2R).\r\n\tThis allows documents that contain Arabic or Hebrew to be edited more easily in a way that is similar\r\n\tto other editors.\r\n\t</li>\r\n\t<li>\r\n\tINDIC_GRADIENT and INDIC_GRADIENTCENTRE indicator types added.\r\n\tINDIC_GRADIENT starts with a specified colour and alpha at top of line and fades\r\n\tto fully transparent at bottom.\r\n\tINDIC_GRADIENTCENTRE starts with a specified colour and alpha at centre of line and fades\r\n\tto fully transparent at top and bottom.\r\n\t</li>\r\n\t<li>\r\n\tWrap indent mode SC_WRAPINDENT_DEEPINDENT added which indents two tabs from previous line.\r\n\t</li>\r\n\t<li>\r\n\tIndicators are drawn for line end characters when displayed.\r\n\t</li>\r\n\t<li>\r\n\tMost invalid bytes in DBCS encodings are displayed as blobs to make problems clear\r\n\tand ensure something is shown.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, invalid text in DBCS encodings will be interpreted through the\r\n\tsingle-byte MacRoman encoding as that will accept any byte.\r\n\t</li>\r\n\t<li>\r\n\tDiff lexer adds styles for diffs containing patches.\r\n\t</li>\r\n\t<li>\r\n\tCrashes fixed on macOS for invalid DBCS characters when dragging text,\r\n\tchanging case of text, case-insensitive searching, and retrieving text as UTF-8.\r\n\t</li>\r\n\t<li>\r\n\tRegular expression crash fixed on macOS when linking to libstdc++.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+, when running in single-instance mode, now forwards all command line arguments\r\n\tto the already running instance.\r\n\tThis allows \"SciTE filename -goto:line\" to work.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scite405.zip\">Release 4.0.5</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 10 May 2018.\r\n\t</li>\r\n\t<li>\r\n\tAdd experimental SC_DOCUMENTOPTION_TEXT_LARGE option to accommodate documents larger than\r\n\t2 GigaBytes.\r\n\t</li>\r\n\t<li>\r\n\tAdditional print option SC_PRINT_SCREENCOLOURS prints with the same colours used on screen\r\n\tincluding line numbers.\r\n\t</li>\r\n\t<li>\r\n\tSciTE can read settings in EditorConfig format when enabled with editor.config.enable property.\r\n\t</li>\r\n\t<li>\r\n\tEDIFACT lexer adds property lexer.edifact.highlight.un.all to highlight all UN* segments.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1166/\">Feature #1166.</a>\r\n\t</li>\r\n\t<li>\r\n\tFortran folder understands \"change team\" and \"endteam\".\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1216/\">Feature #1216.</a>\r\n\t</li>\r\n\t<li>\r\n\tSet the last X chosen when SCI_REPLACESEL called to ensure macros work\r\n\twhen text insertion followed by caret up or down.\r\n\t</li>\r\n\t<li>\r\n\tBugs fixed in regular expression searches in Scintilla where some matches did not occur in an\r\n\teffort to avoid infinite loops when replacing on empty matches like \"^\" and \"$\".\r\n\tApplications should always handle empty matches in a way that avoids infinite loops, commonly\r\n\tby incrementing the search position after replacing an empty match.\r\n\tSciTE fixes a bug where replacing \"^\" always matched on the first line even when it was an\r\n\t\"in selection\" replace and the selection started after the line start.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed in SciTE where invalid numeric properties could crash.\r\n\t</li>\r\n\t<li>\r\n\tRuntime warnings fixed with SciTE on GTK after using Find in Files.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows find and replace strips place caret at end of text after search.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed with SciTE on macOS where corner debris appeared in the margin when scrolling.\r\n\tFixed by not completely hiding the status bar so the curved corner is no longer part of the\r\n\tscrolling region.\r\n\tBy default, 4 pixels of the status bar remain visible and this can be changed with\r\n\tthe statusbar.minimum.height property or turned off if the debris are not a problem by\r\n\tsetting the property to 0.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scite404.zip\">Release 4.0.4</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 10 April 2018.\r\n\t</li>\r\n\t<li>\r\n\tOn Win32, the standard makefiles build a libscintilla static library as well as the existing dynamic libraries.\r\n\tThe statically linked version of SciTE, Sc1, links to this static library. A new file, ScintillaDLL.cxx, provides\r\n\tthe DllMain function required for a stand-alone Scintilla DLL. Build and project files should include this\r\n\tfile when producing a DLL and omit it when producing a static library or linking Scintilla statically.\r\n\tThe STATIC_BUILD preprocessor symbol is no longer used.\r\n\t</li>\r\n\t<li>\r\n\tOn Win32, Direct2D support is no longer automatically detected during build.\r\n\tDISABLE_D2D may still be defined to remove Direct2D features.\r\n\t</li>\r\n\t<li>\r\n\tIn some cases, invalid UTF-8 is handled in a way that is a little friendlier.\r\n\tFor example, when copying to the clipboard on Windows, an invalid lead byte will be copied as the\r\n\tequivalent ISO 8859-1 character and will not hide the following byte.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1211/\">Feature #1211.</a>\r\n\t</li>\r\n\t<li>\r\n\tLexer added for the Maxima computer algebra language.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1210/\">Feature #1210.</a>\r\n\t</li>\r\n\t<li>\r\n\tFix hang in Lua lexer when lexing a label up to the terminating \"::\".\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1999/\">Bug #1999</a>.\r\n\t</li>\r\n\t<li>\r\n\tLua lexer matches identifier chains with dots and colons.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1952/\">Bug #1952</a>.\r\n\t</li>\r\n\t<li>\r\n\tFor rectangular selections, pressing Home or End now moves the caret to the Home or End\r\n\tposition instead of the limit of the rectangular selection.\r\n\t</li>\r\n\t<li>\r\n\tFix move-extends-selection mode for rectangular and line selections.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK+, change lifetime of selection widget to avoid runtime warnings.\r\n\t</li>\r\n\t<li>\r\n\tFix building on Mingw/MSYS to perform file copies and deletions.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1993/\">Bug #1993</a>.\r\n\t</li>\r\n\t<li>\r\n\tSciTE can match a wider variety of file patterns where '*' is in the middle of\r\n\tthe pattern and where there are multiple '*'.\r\n\tA '?' matches any single character.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows can execute Python scripts directly by name when on path.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1209/\">Feature #1209.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows Find in Files checks for cancel after every 10,000 lines read so\r\n\tcan be stopped on huge files.\r\n\t</li>\r\n\t<li>\r\n\tSciTE remembers entered values in lists in more cases for find, replace and find in files.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1715/\">Bug #1715</a>.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scite403.zip\">Release 4.0.3</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 12 February 2018.\r\n\t</li>\r\n\t<li>\r\n\tFeatures from C++14 and C++17 are used more often, with build files now specifying\r\n\tc++17, gnu++17, c++1z, or std:c++latest (MSVC).\r\n\tRequires Microsoft Visual C++ 2017.5, GCC 7, Xcode 9.2 or Clang 4.0 or newer.\r\n\t</li>\r\n\t<li>\r\n\tSCI_CREATEDOCUMENT adds a bytes argument to allocate memory for an initial size.\r\n\tSCI_CREATELOADER and SCI_CREATEDOCUMENT add a documentOption argument to\r\n\tallow choosing different document capabilities.\r\n\t</li>\r\n\t<li>\r\n\tAdd SC_DOCUMENTOPTION_STYLES_NONE option to stop allocating memory for styles.\r\n\t</li>\r\n\t<li>\r\n\tAdd SCI_GETMOVEEXTENDSSELECTION to allow applications to add more\r\n\tcomplex selection commands.\r\n\t</li>\r\n\t<li>\r\n\tSciTE property bookmark.symbol allows choosing symbol used for bookmarks.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1208/\">Feature #1208.</a>\r\n\t</li>\r\n\t<li>\r\n\tImprove VHDL lexer's handling of character literals and escape characters in strings.\r\n\t</li>\r\n\t<li>\r\n\tFix double tap word selection on Windows 10 1709 Fall Creators Update.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1983/\">Bug #1983</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix closing autocompletion lists on Cocoa for macOS 10.13 where the window\r\n\twas emptying but staying visible.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1981/\">Bug #1981</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix drawing failure on Cocoa with animated find indicator in large files with macOS 10.12\r\n\tby disabling animation.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ installs its desktop file as non-executable and supports the common\r\n\tLDLIBS make variable.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1989/\">Bug #1989</a>,\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1990/\">Bug #1990</a>.\r\n\t</li>\r\n\t<li>\r\n\tSciTE shows correct column number when caret in virtual space.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1991/\">Bug #1991</a>.\r\n\t</li>\r\n\t<li>\r\n\tSciTE preserves selection positions when saving with strip.trailing.spaces\r\n\tand virtual space turned on.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1992/\">Bug #1992</a>.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scite402.zip\">Release 4.0.2</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 26 October 2017.\r\n\t</li>\r\n\t<li>\r\n\tFix HTML lexer handling of Django so that nesting a  &#123;&#123; &#125;&#125; or &#123;% %&#125;\r\n\tDjango tag inside of a &#123;# #&#125; Django comment does not break highlighting of rest of file\r\n\t</li>\r\n\t<li>\r\n\tThe Matlab folder now treats \"while\" as a fold start.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1985/\">Bug #1985</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix failure on Cocoa with animated find indicator in large files with macOS 10.13\r\n\tby disabling animation on 10.13.\r\n\t</li>\r\n\t<li>\r\n\tFix Cocoa hang when Scintilla loaded from SMB share on macOS 10.13.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1979/\">Bug #1979</a>.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scite401.zip\">Release 4.0.1</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 23 October 2017.\r\n\t</li>\r\n\t<li>\r\n\tThe ILoader interface is defined in its own header ILoader.h as it is not\r\n\trelated to lexing so doesn't belong in ILexer.h.\r\n\t</li>\r\n\t<li>\r\n\tThe Scintilla namespace is always active for internal symbols and for the lexer interfaces\r\n\tILexer4 and IDocument.\r\n\t</li>\r\n\t<li>\r\n\tThe Baan lexer checks that matches to 3rd set of keywords are function calls and leaves as identifiers if not.\r\n\tBaan lexer and folder support #context_on / #context_off preprocessor feature.\r\n\t</li>\r\n\t<li>\r\n\tThe C++ lexer improved preprocessor conformance.<br />\r\n\tDefault value of 0 for undefined preprocessor symbols.<br />\r\n\t#define A is treated as #define A 1.<br />\r\n\t\"defined A\" removes \"A\" before replacing \"defined\" with value.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1966/\">Bug #1966</a>.\r\n\t</li>\r\n\t<li>\r\n\tThe Python folder treats triple-quoted f-strings like triple-quoted strings.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1977/\">Bug #1977</a>.\r\n\t</li>\r\n\t<li>\r\n\tThe SQL lexer uses sql.backslash.escapes for double quoted strings.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1968/\">Bug #1968</a>.\r\n\t</li>\r\n\t<li>\r\n\tMinor undefined behaviour fixed.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1978/\">Bug #1978</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, improve scrolling on macOS 10.12.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1885/\">Bug #1885</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, fix line selection by clicking in the margin when scrolled.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1971/\">Bug #1971</a>.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scite400.zip\">Release 4.0.0</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 16 August 2017.\r\n\t</li>\r\n\t<li>\r\n\tThis is an unstable release with changes to interfaces used for lexers and platform access.\r\n\tSome more changes may occur to internal and external interfaces before stability is regained with 4.1.0.\r\n\t</li>\r\n\t<li>\r\n\tUses C++14 features. Requires Microsoft Visual C++ 2017, GCC 7, and Clang 4.0 or newer.\r\n\t</li>\r\n\t<li>\r\n\tSupport dropped for GTK+ versions before 2.24.\r\n\t</li>\r\n\t<li>\r\n\tThe lexer interfaces ILexer and ILexerWithSubStyles, along with additional style metadata methods, were merged into ILexer4.\r\n\tMost lexers will need to be updated to match the new interfaces.\r\n\t</li>\r\n\t<li>\r\n\tThe IDocumentWithLineEnd interface was merged into IDocument.\r\n\t</li>\r\n\t<li>\r\n\tThe platform layer interface has changed with unused methods removed, a new mechanism for\r\n\treporting events, removal of methods that take individual keyboard modifiers, and removal of old timer methods.\r\n\t</li>\r\n\t<li>\r\n\t<a href=\"StyleMetadata.html\">Style metadata</a> may be retrieved from lexers that support this through the SCI_GETNAMEDSTYLES, SCI_NAMEOFSTYLE,\r\n\tSCI_TAGSOFSTYLE, and SCI_DESCRIPTIONOFSTYLE APIs.\r\n\t</li>\r\n\t<li>\r\n\tThe Cocoa platform layer uses Automatic Reference Counting (ARC).\r\n\t</li>\r\n\t<li>\r\n\tThe default encoding in Scintilla is UTF-8.\r\n\t</li>\r\n\t<li>\r\n\tAn SCN_AUTOCSELECTIONCHANGE notification is sent when items are highlighted in an autocompletion or user list.\r\n\t</li>\r\n\t<li>\r\n\tThe data parameter to ILoader::AddData made const.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1955/\">Bug #1955</a>.\r\n\t</li>\r\n\t<li>\r\n\tSciTE's embedded Lua interpreter updated to Lua 5.3.\r\n\t</li>\r\n\t<li>\r\n\tSciTE allows event handlers to be arbitrary callables, not just functions.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1190/\">Feature #1190.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE allows user.shortcuts to be defined with symbolic Scintilla messages like\r\n\t'Ctrl+L|SCI_LINEDELETE|'.\r\n\t</li>\r\n\t<li>\r\n\tThe Matlab lexer treats 'end' as a number rather than a keyword when used as an index.\r\n\tThis also stops incorrect folding.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1951/\">Bug #1951</a>.\r\n\t</li>\r\n\t<li>\r\n\tThe Matlab folder implements \"fold\", \"fold.comment\", and \"fold.compact\" properties.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1965/\">Bug #1965</a>.\r\n\t</li>\r\n\t<li>\r\n\tThe Rust lexer recognizes 'usize' numeric literal suffixes.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1919/\">Bug #1919</a>.\r\n\t</li>\r\n\t<li>\r\n\tEnsure redraw when application changes overtype mode so caret change visible even when not blinking.\r\n\tNotify application with SC_UPDATE_SELECTION when overtype changed - previously\r\n\tsent SC_UPDATE_CONTENT.\r\n\t</li>\r\n\t<li>\r\n\tFix drawing failure when in wrap mode for delete to start/end of line which\r\n\taffects later lines but did not redraw them.\r\n\tAlso fixed drawing for wrap mode on GTK+ 2.x.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1949/\">Bug #1949</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK+ fix drawing problems including incorrect scrollbar redrawing and flickering of text.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1876/\">Bug #1876</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Linux, both for GTK+ and Qt, the default modifier key for rectangular selection is now Alt.\r\n\tThis is the same as Windows and macOS.\r\n\tThis was changed from Ctrl as window managers are less likely to intercept Alt+Drag for\r\n\tmoving windows than in the past.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, fix doCommandBySelector but avoid double effect of 'delete'\r\n\tkey.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1958/\">Bug #1958</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Qt, the updateUi signal includes the 'updated' flags.\r\n\tNo updateUi signal is sent for focus in events.\r\n\tThese changes make Qt behave more like the other platforms.\r\n\t</li>\r\n\t<li>\r\n\tOn Qt, dropping files on Scintilla now fires the SCN_URIDROPPED notification\r\n\tinstead of inserting text.\r\n\t</li>\r\n\t<li>\r\n\tOn Qt, focus changes send the focusChanged signal.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1957/\">Bug #1957</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Qt, mouse tracking is reenabled when the window is reshown.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1948/\">Bug #1948</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Windows, the DirectWrite modes SC_TECHNOLOGY_DIRECTWRITEDC and\r\n\tSC_TECHNOLOGY_DIRECTWRITERETAIN are no longer provisional.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on macOS fixes a crash when platform-specific and platform-independent\r\n\tsession restoration clashed.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1960/\">Bug #1960</a>.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ implements find.close.on.find.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1152/\">Bug #1152</a>,\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1254/\">Bug #1254</a>,\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1762/\">Bug #1762</a>,\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/849/\">Feature #849</a>.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scintilla376.zip\">Release 3.7.6</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 8 August 2017.\r\n\t</li>\r\n\t<li>\r\n\tThis is the first release of the\r\n\t<a href=\"https://scintilla.sourceforge.io/LongTermDownload.html\">long term branch</a>\r\n\twhich avoids using features from C++14 or later in order to support older systems.\r\n\t</li>\r\n\t<li>\r\n\tThe Baan lexer correctly highlights numbers when followed by an operator.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, fix a bug with retrieving encoded bytes.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scite375.zip\">Release 3.7.5</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 26 May 2017.\r\n\t</li>\r\n\t<li>\r\n\tThis is the final release of SciTE 3.x.\r\n\t</li>\r\n\t<li>\r\n\tSupport dropped for Microsoft Visual C++ 2013 due to increased use of C++11 features.\r\n\t</li>\r\n\t<li>\r\n\tAdded a caret line frame as an alternative visual for highlighting the caret line.\r\n\t</li>\r\n\t<li>\r\n\tAdded \"Reverse Selected Lines\" feature.\r\n\t</li>\r\n\t<li>\r\n\tSciTE adds \"Select All Bookmarks\" command.\r\n\t</li>\r\n\t<li>\r\n\tSciTE adds a save.path.suggestion setting to suggest a file name when saving an\r\n\tunnamed buffer.\r\n\t</li>\r\n\t<li>\r\n\tUpdated case conversion and character categories to Unicode 9.\r\n\t</li>\r\n\t<li>\r\n\tThe Baan lexer recognizes numeric literals in a more compliant manner including\r\n\thexadecimal numbers and exponentials.\r\n\t</li>\r\n\t<li>\r\n\tThe Bash lexer recognizes strings in lists in more cases.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1944/\">Bug #1944</a>.\r\n\t</li>\r\n\t<li>\r\n\tThe Fortran lexer recognizes a preprocessor line after a line continuation &amp;.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1935/\">Bug #1935</a>.\r\n\t</li>\r\n\t<li>\r\n\tThe Fortran folder can fold comments.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1936/\">Bug #1936</a>.\r\n\t</li>\r\n\t<li>\r\n\tThe PowerShell lexer recognizes escaped quotes in strings.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1929/\">Bug #1929</a>.\r\n\t</li>\r\n\t<li>\r\n\tThe Python lexer recognizes identifiers more accurately when they include non-ASCII characters.\r\n\t</li>\r\n\t<li>\r\n\tThe Python folder treats comments at the end of the file as separate from the preceding structure.\r\n\t</li>\r\n\t<li>\r\n\tThe YAML lexer recognizes comments in more situations and styles a\r\n\t\"...\" line like a \"---\" line.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1931/\">Bug #1931</a>.\r\n\t</li>\r\n\t<li>\r\n\tUpdate scroll bar when annotations added, removed, or visibility changed.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1187/\">Feature #1187.</a>\r\n\t</li>\r\n\t<li>\r\n\tCanceling modes with the Esc key preserves a rectangular selection.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1940/\">Bug #1940</a>.\r\n\t</li>\r\n\t<li>\r\n\tBuilds are made with a sorted list of lexers to be more reproducible.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1946/\">Bug #1946</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, a leak of mouse tracking areas was fixed.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, the autocompletion is 4 pixels wider to avoid text truncation.\r\n\t</li>\r\n\t<li>\r\n\tOn Windows, stop drawing a focus rectangle on the autocompletion list and\r\n\traise the default list length to 9 items.\r\n\t</li>\r\n\t<li>\r\n\tSciTE examines at most 1 MB of a file to automatically determine indentation\r\n\tfor indent.auto to avoid a lengthy pause when loading very large files.\r\n\t</li>\r\n\t<li>\r\n\tSciTE user interface uses lighter colours and fewer 3D elements to match current desktop environments.\r\n\t</li>\r\n\t<li>\r\n\tSciTE sets buffer dirty and shows message when file deleted if load.on.activate on.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows Find strip Find button works in incremental no-close mode.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1926/\">Bug #1926</a>.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scite374.zip\">Release 3.7.4</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 21 March 2017.\r\n\t</li>\r\n\t<li>\r\n\tRequires a C++11 compiler. GCC 4.8 and MSVC 2015 are supported.\r\n\t</li>\r\n\t<li>\r\n\tSupport dropped for Windows NT 4.\r\n\t</li>\r\n\t<li>\r\n\tAccessibility support may be queried with SCI_GETACCESSIBILITY.\r\n\tOn GTK+, accessibility may be disabled by calling SCI_SETACCESSIBILITY.\r\n\t</li>\r\n\t<li>\r\n\tLexer added for \"indent\" language which is styled as plain text but folded by indentation level.\r\n\t</li>\r\n\t<li>\r\n\tThe Progress ABL lexer handles nested comments where comment starts or ends\r\n\tare adjacent like \"/*/*\" or \"*/*/\".\r\n\t</li>\r\n\t<li>\r\n\tIn the Python lexer, improve f-string support.\r\n\tAdd support for multiline expressions in triple quoted f-strings.\r\n\tHandle nested \"()\", \"[]\", and \"{}\" in f-string expressions and terminate expression colouring at \":\" or \"!\".\r\n\tEnd f-string if ending quote is seen in a \"{}\" expression.\r\n\tFix terminating single quoted f-string at EOL.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1918/\">Bug #1918</a>.\r\n\t</li>\r\n\t<li>\r\n\tThe VHDL folder folds an \"entity\" on the first line of the file.\r\n\t</li>\r\n\t<li>\r\n\tFor IMEs, do not clear selected text when there is no composition text to show.\r\n\t</li>\r\n\t<li>\r\n\tFix to crash with fold tags where line inserted at start.\r\n\t</li>\r\n\t<li>\r\n\tFix to stream selection mode when moving caret up or down.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1905/\">Bug #1905</a>.\r\n\t</li>\r\n\t<li>\r\n\tDrawing fixes for fold tags include fully drawing lines and not overlapping some\r\n\tdrawing and ensuring edges and mark underlines are visible.\r\n\t</li>\r\n\t<li>\r\n\tFix Cocoa failure to display accented character chooser for European\r\n\tlanguages by partially reverting a change made to prevent a crash with\r\n\tChinese input by special-casing the Cangjie input source.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1881/\">Bug #1881</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix potential problems with IME on Cocoa when document contains invalid\r\n\tUTF-8.\r\n\t</li>\r\n\t<li>\r\n\tFix crash on Cocoa with OS X 10.9 due to accessibility API not available.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1915/\">Bug #1915</a>.\r\n\t</li>\r\n\t<li>\r\n\tImproved speed of accessibility code on GTK+ by using additional memory\r\n\tas a cache.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1910/\">Bug #1910</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix crash in accessibility code on GTK+ &lt; 3.3.6 caused by previous bug fix.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1907/\">Bug #1907</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix to prevent double scrolling on GTK+ with X11.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1901/\">Bug #1901</a>.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ adds an \"accessibility\" property to allow disabling accessibility\r\n\ton GTK+ as an optimization.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ has changed file chooser behaviour for some actions:\r\n\toverwriting an existing file shows a warning;\r\n\tthe default session file name \"SciTE.session\" is shown and a \"*.session\" filter is applied;\r\n\tappropriate filters are applied when exporting;\r\n\tthe current file name is displayed in \"Save As\" even when that file no longer exists.\r\n\t</li>\r\n\t<li>\r\n\tSciTE fixed a bug where, on GTK+, when the output pane had focus, menu commands\r\n\tperformed by mouse were sent instead to the edit pane.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows 8+ further restricts the paths searched for DLLs to the application\r\n\tand system directories which may prevent some binary planting attacks.\r\n\t</li>\r\n\t<li>\r\n\tFix failure to load Direct2D on Windows when used on old versions of Windows.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1653/\">Bug #1653</a>.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scite373.zip\">Release 3.7.3</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 19 February 2017.\r\n\t</li>\r\n\t<li>\r\n\tDisplay block caret over the character at the end of a selection to be similar\r\n\tto other editors.\r\n\t</li>\r\n\t<li>\r\n\tIn SciTE can choose colours for fold markers.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1172/\">Feature #1172.</a>\r\n\t</li>\r\n\t<li>\r\n\tIn SciTE can hide buffer numbers in tabs.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1173/\">Feature #1173.</a>\r\n\t</li>\r\n\t<li>\r\n\tThe Diff lexer recognizes deleted lines that start with \"--- \".\r\n\t</li>\r\n\t<li>\r\n\tThe Lua lexer requires the first line to start with \"#!\" to be treated as a shebang comment,\r\n\tnot just \"#\".\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1900/\">Bug #1900</a>.\r\n\t</li>\r\n\t<li>\r\n\tThe Matlab lexer requires block comment start and end to be alone on a line.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1902/\">Bug #1902</a>.\r\n\t</li>\r\n\t<li>\r\n\tThe Python lexer supports f-strings with new styles, allows Unicode identifiers,\r\n\tand no longer allows @1 to be a decorator.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1848/\">Bug #1848</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix folding inconsistency when fold header added above a folded part.\r\n\tAvoid unnecessary unfolding when a deletion does not include a line end.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1896/\">Bug #1896</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix finalization crash on Cocoa.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1909/\">Bug #1909</a>.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ can have a wide divider between the panes with the\r\n\tsplit.wide property.\r\n\t</li>\r\n\t<li>\r\n\tFix display of autocompletion lists and calltips on GTK+ 3.22 on Wayland.\r\n\tNewer APIs used on GTK+ 3.22 as older APIs were deprecated.\r\n\t</li>\r\n\t<li>\r\n\tFix crash in accessibility code on GTK+ due to signal receipt after destruction.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1907/\">Bug #1907</a>.\r\n\t</li>\r\n\t<li>\r\n\tMake trackpad scrolling work on Wayland.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1901/\">Bug #1901</a>.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scite372.zip\">Release 3.7.2</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 30 December 2016.\r\n\t</li>\r\n\t<li>\r\n\tMinimize redrawing for SCI_SETSELECTIONN* APIs.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1888/\">Bug #1888</a>.\r\n\t</li>\r\n\t<li>\r\n\tUse more precision to allow selecting individual lines in files with\r\n\tmore than 16.7 million lines.\r\n\t</li>\r\n\t<li>\r\n\tFor Qt 5, define QT_WS_MAC or QT_WS_X11 on those platforms.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1887/\">Bug #1887</a>.\r\n\t</li>\r\n\t<li>\r\n\tFor Cocoa, fix crash on view destruction with macOS 10.12.2.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1891/\">Bug #1891</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix crash on GTK+ &lt;3.8 due to incorrect lifetime of accessibility object.\r\n\tMore accurate reporting of attribute ranges and deletion lengths for accessibility.\r\n\t</li>\r\n\t<li>\r\n\tIn SciTE, if a Lua script causes a Scintilla failure exception, display error\r\n\tmessage in output pane instead of exiting.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1773/\">Bug #1773</a>.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scite371.zip\">Release 3.7.1</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 4 December 2016.\r\n\t</li>\r\n\t<li>\r\n\tThe Scintilla namespace is no longer applied to struct definitions in Scintilla.h even\r\n\twhen SCI_NAMESPACE defined.\r\n\tClient code should not define SCI_NAMESPACE.\r\n\t</li>\r\n\t<li>\r\n\tStructure names in Scintilla.h without prefixes are deprecated and will now only\r\n\tbe usable with INCLUDE_DEPRECATED_FEATURES defined.<br />\r\n\tUse the newer names with the \"Sci_\" prefix:<br />\r\n\tCharacterRange &rarr; Sci_CharacterRange<br />\r\n\tTextRange &rarr; Sci_TextRange<br />\r\n\tTextToFind &rarr; Sci_TextToFind<br />\r\n\tRangeToFormat &rarr; Sci_RangeToFormat<br />\r\n\tNotifyHeader &rarr; Sci_NotifyHeader\r\n\t</li>\r\n\t<li>\r\n\tPreviously deprecated features SC_CP_DBCS, SCI_SETUSEPALETTE. and SCI_GETUSEPALETTE\r\n\thave been removed and can no longer be used in client code.\r\n\t</li>\r\n\t<li>\r\n\tSingle phase drawing SC_PHASES_ONE is deprecated along with the\r\n\tSCI_SETTWOPHASEDRAW and SCI_GETTWOPHASEDRAW messages.\r\n\t</li>\r\n\t<li>\r\n\tAccessibility support allowing screen readers to work added on GTK+ and Cocoa.\r\n\t</li>\r\n\t<li>\r\n\tTextual tags may be displayed to the right on folded lines with SCI_TOGGLEFOLDSHOWTEXT.\r\n\tThis is commonly something like \"{ ... }\" or \"&lt;tr&gt;...&lt;/tr&gt;\".\r\n\tIt is displayed with the STYLE_FOLDDISPLAYTEXT style and may have a box drawn around it\r\n\twith SCI_FOLDDISPLAYTEXTSETSTYLE.\r\n\t</li>\r\n\t<li>\r\n\tA mouse right-click over the margin may send an SCN_MARGINRIGHTCLICK event.\r\n\tThis only occurs when popup menus are turned off.\r\n\tSCI_USEPOPUP now has three states: SC_POPUP_NEVER, SC_POPUP_ALL, or SC_POPUP_TEXT.\r\n\t</li>\r\n\t<li>\r\n\tINDIC_POINT and INDIC_POINTCHARACTER indicators added to display small arrows\r\n\tunderneath positions or characters.\r\n\t</li>\r\n\t<li>\r\n\tAdded alternate appearance for visible tabs which looks like a horizontal line.\r\n\tControlled with SCI_SETTABDRAWMODE.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1165/\">Feature #1165.</a>\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, a modulemap file is included to allow Scintilla to be treated as a module.\r\n\tThis makes it easier to use Scintilla from the Swift language.\r\n\t</li>\r\n\t<li>\r\n\tBaan folder accommodates sections and lexer fixes definition of SCE_BAAN_FUNCDEF.\r\n\t</li>\r\n\t<li>\r\n\tEDIFACT lexer and folder added.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1166/\">Feature #1166.</a>\r\n\t</li>\r\n\t<li>\r\n\tJSON folder fixed where it didn't resume folding with the correct fold level.\r\n\t</li>\r\n\t<li>\r\n\tMatlab folder based on syntax instead of indentation so more accurate.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1692/\">Bug #1692</a>.\r\n\t</li>\r\n\t<li>\r\n\tYAML lexer fixed style of references and keywords when followed by a comment.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1872/\">Bug #1872</a>.\r\n\t</li>\r\n\t<li>\r\n\tMargin click to select line now clears rectangular and additional selections.\r\n\t</li>\r\n\t<li>\r\n\tFixed a NULL access bug on GTK+ where the scrollbars could be used during destruction.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1873/\">Bug #1873</a>.\r\n\t</li>\r\n\t<li>\r\n\tA potential bug on GTK+ fixed where asynchronous clipboard could be delivered after its\r\n\ttarget Scintilla instance was destroyed.\r\n\t</li>\r\n\t<li>\r\n\tCocoa IME made more compliant with documented behaviour to avoid bugs that caused\r\n\thuge allocations.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1881/\">Bug #1881</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Win32 fix EM_SETSEL to match Microsoft documentation..\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1886/\">Bug #1886</a>.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ allows localizing tool bar tool tips.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1167/\">Feature #1167.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows restores focus to edit pane after closing user strip.\r\n\t</li>\r\n\t<li>\r\n\tSciTE measures files larger that 2 GB which allows it to refuse to open huge files more consistently\r\n\tand to show better warning messages.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scite370.zip\">Release 3.7.0</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 16 October 2016.\r\n\t</li>\r\n\t<li>\r\n\tWord selection, navigation, and manipulation is now performed on characters instead of bytes\r\n\tleading to more natural behaviour for multi-byte encodings like UTF-8.\r\n\tFor UTF-8 characters 0x80 and above, classification into word; punctuation; space; or line-end\r\n\tis based on the Unicode general category of the character and is not customizable.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1832/\">Bug #1832</a>.\r\n\t</li>\r\n\t<li>\r\n\tTwo enums changed in Scintilla.iface which may lead to changed bindings.\r\n\tThere were 2 FontQuality enums and the first is now PhasesDraw.\r\n\tThe prefix for FoldAction was SC_FOLDACTION and is now SC_FOLDACTION_\r\n\twhich is similar to other enums.\r\n\tThese changes do not affect the standard C/C++ binding.\r\n\t</li>\r\n\t<li>\r\n\tEDGE_MULTILINE and SCI_MULTIEDGEADDLINE added to allow displaying multiple\r\n\tvertical edges simultaneously.\r\n\t</li>\r\n\t<li>\r\n\tThe number of margins can be changed with SCI_SETMARGINS.\r\n\t</li>\r\n\t<li>\r\n\tMargin type SC_MARGIN_COLOUR added so that the application may\r\n\tchoose any colour for a margin with SCI_SETMARGINBACKN.\r\n\t</li>\r\n\t<li>\r\n\tOn Win32, mouse wheel scrolling can be restricted to only occur when the mouse is\r\n\twithin the window.\r\n\t</li>\r\n\t<li>\r\n\tThe WordList class in lexlib used by lexers adds an InListAbridged method for\r\n\tmatching keywords that have particular prefixes and/or suffixes.\r\n\t</li>\r\n\t<li>\r\n\tThe Baan lexer was changed significantly with more lexical states, keyword sets,\r\n\tand support for abridged keywords.\r\n\t</li>\r\n\t<li>\r\n\tThe CoffeeScript lexer styles interpolated code in strings.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1865/\">Bug #1865</a>.\r\n\t</li>\r\n\t<li>\r\n\tThe Progress lexer \"progress\" has been replaced with a new lexer \"abl\"\r\n\t(Advanced Business Language)\r\n\twith a different set of lexical states and more functionality.\r\n\tThe lexical state prefix has changed from SCE_4GL_ to SCE_ABL_.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1143/\">Feature #1143.</a>\r\n\t</li>\r\n\t<li>\r\n\tThe PowerShell lexer understands the grave accent escape character.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1868/\">Bug #1868</a>.\r\n\t</li>\r\n\t<li>\r\n\tThe YAML lexer recognizes inline comments.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1660/\">Bug #1660</a>.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows can retain coloured selection when inactive with\r\n\tselection.always.visible property.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows adds a state to close.on.find to close the find strip when\r\n\ta match is found.\r\n\t</li>\r\n\t<li>\r\n\tFix caret position after left or right movement with rectangular selection.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1861/\">Bug #1861</a>.\r\n\t</li>\r\n\t<li>\r\n\tIn SciTE, optional prefix argument added to scite.ConstantName method.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1860/\">Bug #1860</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, include ILexer.h in the public headers of the framework.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1855/\">Bug #1855</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, allow subclass of SCIContentView to set cursor.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1863/\">Bug #1863</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, recognize the numeric keypad '+', '-', and '/' keys as\r\n\tSCK_ADD, SCK_SUBTRACT, and SCK_DIVIDE.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1867/\">Bug #1867</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK+ 3.21+ fix incorrect font size in auto-completion list.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1859/\">Bug #1859</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix SciTE crash when command.mode ends with comma.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1857/\">Bug #1857</a>.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows has a full size toolbar icon for \"Close\".\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scite367.zip\">Release 3.6.7</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 4 September 2016.\r\n\t</li>\r\n\t<li>\r\n\tC++11 range-based for loops used in SciTE so GCC 4.6 is now the minimum supported version.\r\n\t</li>\r\n\t<li>\r\n\tSC_CHARSET_DEFAULT now means code page 1252 on Windows unless a code page is set.\r\n\tThis prevents unexpected behaviour and crashes on East Asian systems where default locales are commonly DBCS.\r\n\tProjects which want to default to DBCS code pages in East Asian locales should set the code page and\r\n\tcharacter set explicitly.\r\n\t</li>\r\n\t<li>\r\n\tSCVS_NOWRAPLINESTART option stops left arrow from wrapping to the previous line.\r\n\tMost commonly wanted when virtual space is used.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1648/\">Bug #1648</a>.\r\n\t</li>\r\n\t<li>\r\n\tThe C++ lexer can fold on #else and #elif with the fold.cpp.preprocessor.at.else property.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/210/\">Bug #210</a>.\r\n\t</li>\r\n\t<li>\r\n\tThe errorlist lexer detects warnings from Visual C++ which do not contain line numbers.\r\n\t</li>\r\n\t<li>\r\n\tThe HTML lexer no longer treats \"&lt;?\" inside a string in a script as potentially starting an XML document.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/767/\">Bug #767</a>.\r\n\t</li>\r\n\t<li>\r\n\tThe HTML lexer fixes a problem resuming at a script start where the starting state continued\r\n\tpast where it should.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1849/\">Bug #1849</a>.\r\n\t</li>\r\n\t<li>\r\n\tWhen inserting spaces for virtual space and the position is in indentation and tabs are enabled\r\n\tfor indentation then use tabs.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1850/\">Bug #1850</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix fold expand when some child text not styled.\r\n\tCaused by fixes for Bug #1799.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1842/\">Bug #1842</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix key binding bug on Cocoa for control+.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1854/\">Bug #1854</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix scroll bar size warnings on GTK+ caused by #1831.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1851/\">Bug #1851</a>.\r\n\t</li>\r\n\t<li>\r\n\tSmall fixes for GTK+ makefile.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1844/\">Bug #1844</a>.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1845/\">Bug #1845</a>.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1846/\">Bug #1846</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix SciTE indentation after code like \"void function () {}\".\r\n\t</li>\r\n\t<li>\r\n\tFix SciTE global regex replace of \"^\" with something which missed the line after empty\r\n\tlines with LF line ends.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1839/\">Bug #1839</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix SciTE on GTK+ 3.20 bug where toggle buttons on find and replace strips\r\n\tdid not show active state.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1853/\">Bug #1853</a>.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scite366.zip\">Release 3.6.6</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 24 May 2016.\r\n\t</li>\r\n\t<li>\r\n\tC++ 11 &lt;regex&gt; support built by default. Can be disabled by defining NO_CXX11_REGEX.\r\n\t</li>\r\n\t<li>\r\n\tSciTE_USERHOME environment variable allows separate location for writeable properties files.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/965/\">Feature #965.</a>\r\n\t</li>\r\n\t<li>\r\n\tGObject introspection supports notify and command events.\r\n\t</li>\r\n\t<li>\r\n\tThe Progress lexer now allows comments preceded by a tab.\r\n\t</li>\r\n\t<li>\r\n\tScripts reading Scintilla.iface file include comments for enu and lex definitions.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1829/\">Bug #1829</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix crashes on GTK+ if idle work active when destroyed.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1827/\">Bug #1827</a>.\r\n\t</li>\r\n\t<li>\r\n\tFixed bugs when used on GTK+ 3.20.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1825/\">Bug #1825</a>.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1831/\">Bug #1831</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix SciTE search field background with dark theme on GTK+ 2.x.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1826/\">Bug #1826</a>.\r\n\t</li>\r\n\t<li>\r\n\tFixed bug on Win32 that allowed resizing autocompletion from bottom when it was\r\n\tlocated above the caret.\r\n\t</li>\r\n\t<li>\r\n\tOn Win32, when using a screen reader and selecting text using Shift+Arrow,\r\n\tfix bug when scrolling made the caret stay at the same screen location\r\n\tso the screen reader did not speak the added or removed selection.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scite365.zip\">Release 3.6.5</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 26 April 2016.\r\n\t</li>\r\n\t<li>\r\n\tJSON lexer added.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1140/\">Feature #1140.</a>\r\n\t</li>\r\n\t<li>\r\n\tThe C++ lexer fixes a bug with multi-line strings with line continuation where the string style\r\n\toverflowed after an edit.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1824/\">Bug #1824</a>.\r\n\t</li>\r\n\t<li>\r\n\tThe Python lexer treats '@' as an operator except when it is the first visible character on a line.\r\n\tThis is for Python 3.5.\r\n\t</li>\r\n\t<li>\r\n\tThe Rust lexer allows '?' as an operator.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1146/\">Feature #1146.</a>\r\n\t</li>\r\n\t<li>\r\n\tDoubled size of compiled regex buffer.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1822/\">Bug #1822</a>.\r\n\t</li>\r\n\t<li>\r\n\tFor GTK+, the Super modifier key can be used in key bindings.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1142/\">Feature #1142.</a>\r\n\t</li>\r\n\t<li>\r\n\tFor GTK+, fix some crashes when using multiple threads.\r\n\t</li>\r\n\t<li>\r\n\tPlatform layer font cache removed on GTK+ as platform-independent caches are used.\r\n\tThis avoids the use of thread locking and initialization of threads so any GTK+\r\n\tapplications that rely on Scintilla initializing threads will have to do that themselves.\r\n\t</li>\r\n\t<li>\r\n\tSciTE bug fixed with exported HTML where extra line shown.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1816/\">Bug #1816</a>.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows fixes bugs with pop-up menus in the find and replace strips.\r\n\tFor the replace strip, menu choices change the state.\r\n\tFor the find strip, menu choices are reflected in the appearance of their corresponding buttons.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows on high DPI displays fixes the height of edit boxes in user strips.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scite364.zip\">Release 3.6.4</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 13 March 2016.\r\n\t</li>\r\n\t<li>\r\n\tSciTE allows setting the autocompletion type separator character.\r\n\t</li>\r\n\t<li>\r\n\tThe C++ folder folds code on '(' and ')' to allow multi-line calls to be folded.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1138/\">Feature #1138.</a>\r\n\t</li>\r\n\t<li>\r\n\tFor the HTML lexer, limit the extent of Mako line comments to finish before\r\n\tthe line end characters.\r\n\t</li>\r\n\t<li>\r\n\tFolds unfolded when two fold regions are merged by either deleting an intervening line\r\n\tor changing its fold level by adding characters.\r\n\tThis was fixed both in Scintilla and in SciTE's equivalent code.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1799/\">Bug #1799</a>.<br />\r\n\t</li>\r\n\t<li>\r\n\tThe Progress lexer supports hexadecimal numeric literals,\r\n\tsingle-line comments, abbreviated keywords and\r\n\textends nested comments to unlimited levels.\r\n\t</li>\r\n\t<li>\r\n\tRuby lexer treats alternate hash key syntax \"key:\" as a symbol.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1810/\">Bug #1810</a>.\r\n\t</li>\r\n\t<li>\r\n\tRust lexer handles bracketed Unicode string escapes like \"\\u{123abc}\".\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1809/\">Bug #1809</a>.\r\n\t</li>\r\n\t<li>\r\n\tFor GTK+ on Windows fix 64-bit build which was broken in 3.6.3.\r\n\t</li>\r\n\t<li>\r\n\tFor Qt, release builds have assertions turned off.\r\n\t</li>\r\n\t<li>\r\n\tFor Qt on Windows, fix compilation failure for Qt 4.x.\r\n\t</li>\r\n\t<li>\r\n\tIME target range displayed on Qt for OS X.\r\n\t</li>\r\n\t<li>\r\n\tOn Windows, make clipboard operations more robust by retrying OpenClipboard if it fails\r\n\tas this may occur when another application has opened the clipboard.\r\n\t</li>\r\n\t<li>\r\n\tOn Windows back out change that removed use of def file to ensure\r\n\tScintilla_DirectFunction exported without name mangling.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1813/\">Bug #1813</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK+ and Qt over Win32 in Korean fix bug caused by last release's word input change.\r\n\t</li>\r\n\t<li>\r\n\tFor SciTE, more descriptive error messages are displayed when there are problems loading the\r\n\tLua startup script.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1139/\">Feature #1139.</a>\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scite363.zip\">Release 3.6.3</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 18 January 2016.\r\n\t</li>\r\n\t<li>\r\n\tAllow painting without first styling all visible text then styling in the background\r\n\tusing idle-time. This helps performance when scrolling down in very large documents.\r\n\tCan also incrementally style after the visible area to the end of the document so that\r\n\tthe document is already styled when the user scrolls to it.\r\n\t</li>\r\n\t<li>\r\n\tSupport GObject introspection on GTK+.\r\n\t</li>\r\n\t<li>\r\n\tSciTE supports pasting to each selection with the selection.multipaste setting.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1123/\">Feature #1123.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE can optionally display a read-only indicator on tabs and in the Buffers menu.\r\n\t</li>\r\n\t<li>\r\n\tBash lexer flags incomplete here doc delimiters as syntax errors.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1789/\">Bug #1789</a>.<br />\r\n\tSupport added for using '#' in non-comment ways as is possible with zsh.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1794/\">Bug #1794</a>.<br />\r\n\tRecognize more characters as here-doc delimiters.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1778/\">Bug #1778</a>.\r\n\t</li>\r\n\t<li>\r\n\tErrorlist lexer highlights warning messages from the Microsoft linker.\r\n\t</li>\r\n\t<li>\r\n\tErrorlist lexer fixes bug with final line in escape sequence recognition mode.\r\n\t</li>\r\n\t<li>\r\n\tLua lexer includes '&amp;' and '|' bitwise operators for Lua 5.3.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1790/\">Bug #1790</a>.\r\n\t</li>\r\n\t<li>\r\n\tPerl lexer updated for Perl 5.20 and 5.22.<br />\r\n\tAllow '_' for subroutine prototypes.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1791/\">Bug #1791</a>.<br />\r\n\tDouble-diamond operator &lt;&lt;&gt;&gt;.<br />\r\n\tHexadecimal floating point literals.<br />\r\n\tRepetition in list assignment.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1793/\">Bug #1793</a>.<br />\r\n\tHighlight changed subroutine prototype syntax for Perl 5.20.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1797/\">Bug #1797</a>.<br />\r\n\tFix module ::-syntax when special characters such as 'x' are used.<br />\r\n\tAdded ' and \" detection as prefix chars for x repetition operator.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1800/\">Bug #1800</a>.\r\n\t</li>\r\n\t<li>\r\n\tVisual Prolog lexer recognizes numbers more accurately and allows non-ASCII verbatim\r\n\tquoting characters.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1130/\">Feature #1130.</a>\r\n\t</li>\r\n\t<li>\r\n\tSend SCN_UPDATEUI with SC_UPDATE_SELECTION when the application changes multiple\r\n\tselection.\r\n\t</li>\r\n\t<li>\r\n\tExpand folded areas before deleting fold header line.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1796/\">Bug #1796</a>.\r\n\t</li>\r\n\t<li>\r\n\tTreat Unicode line ends like common line ends when maintaining fold state.\r\n\t</li>\r\n\t<li>\r\n\tHighlight whole run for hover indicator when wrapped.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1784/\">Bug #1784</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, fix crash when autocompletion list closed during scroll bounce-back.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1788/\">Bug #1788</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Windows, fix non-BMP input through WM_CHAR and allow WM_UNICHAR to work\r\n\twith non-BMP characters and on non-Unicode documents.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1779/\">Bug #1779</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Windows using DirectWrite, for ligatures and other character clusters,\r\n\tdisplay caret and selections part-way through clusters so that the caret doesn't stick\r\n\tto the end of the cluster making it easier to understand editing actions.\r\n\t</li>\r\n\t<li>\r\n\tOn Windows, Scintilla no longer uses a .DEF file during linking as it duplicates\r\n\tsource code directives.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK+ and Qt, Korean input by word fixed.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK+, Qt, and Win32 block IME input when document is read-only or any selected text\r\n\tis protected.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK+ on OS X, fix warning during destruction.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1777/\">Bug #1777</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix SciTE crashes when using LPEG lexers.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scite362.zip\">Release 3.6.2</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 6 November 2015.\r\n\t</li>\r\n\t<li>\r\n\tWhitespace may be made visible just in indentation.\r\n\t</li>\r\n\t<li>\r\n\tWhitespace dots are centred when larger than 1 pixel.\r\n\t</li>\r\n\t<li>\r\n\tThe Scintilla framework on Cocoa now contains version numbers.\r\n\t</li>\r\n\t<li>\r\n\tSciTE's standard properties collect values from all active .properties file to produce the Language menu\r\n\tand the file types pull-down in the File open dialog.\r\n\t</li>\r\n\t<li>\r\n\tThe single executable version of SciTE, Sc1, uses 'module' statements within its embedded\r\n\tproperties. This makes it act more like the full distribution allowing languages to be turned on\r\n\tand off by setting imports.include and imports.exclude.\r\n\tThe default imports.exclude property adds eiffel, erlang, ps, and pov so these languages are\r\n\tturned off by default.\r\n\t</li>\r\n\t<li>\r\n\tSciTE adds an output.blank.margin.left property to allow setting the output pane\r\n\tmargin to a different width than the edit pane.\r\n\t</li>\r\n\t<li>\r\n\tCoffeeScript lexer highlights ranges correctly.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1765/\">Bug #1765</a>.\r\n\t</li>\r\n\t<li>\r\n\tMarkdown lexer treats line starts consistently to always highlight *foo* or similar at line start.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1766/\">Bug #1766</a>.\r\n\t</li>\r\n\t<li>\r\n\tOptimize marker redrawing by only drawing affected lines when markers shown in the text.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, timers and idling now work in modal dialogs. This also stops some crashes.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, fix crashes when deleting a ScintillaView. These crashes could occur when scrolling\r\n\tat the time the ScintillaView was deleted although there may have been other cases.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK+ 2.x, fix height of lines in autocompletion lists.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1774/\">Bug #1774</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix bug with SCI_LINEENDDISPLAY where the caret moved to the next document line instead of the\r\n\tend of the display line.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1772/\">Bug #1772</a>.\r\n\t</li>\r\n\t<li>\r\n\tReport error (SC_STATUS_FAILURE) when negative length passed to SCI_SETSTYLING.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1768/\">Bug #1768</a>.\r\n\t</li>\r\n\t<li>\r\n\tWhen SC_MARK_UNDERLINE is not assigned to a margin, stop drawing the whole line.\r\n\t</li>\r\n\t<li>\r\n\tWhen reverting an untitled document in SciTE, just clear it with no message about a file.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1764/\">Bug #1764</a>.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ allows use of Ctrl+A (Select All) inside find and replace strips.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1769/\">Bug #1769</a>.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scite361.zip\">Release 3.6.1</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 15 September 2015.\r\n\t</li>\r\n\t<li>\r\n\tThe oldest version of GTK+ supported now is 2.18 and for glib it is 2.22.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK+, SC_CHARSET_OEM866 added to allow editing Russian files encoded in code page 866.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1019/\">Feature #1019.</a>\r\n\t</li>\r\n\t<li>\r\n\tOn Windows, reconversion is performed when requested by the IME.\r\n\t</li>\r\n\t<li>\r\n\tCoffeeScript lexer adds lexical class for instance properties and fixes some cases of regex highlighting.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1749/\">Bug #1749</a>.\r\n\t</li>\r\n\t<li>\r\n\tThe errorlist lexer understands some ANSI escape sequences to change foreground colour and intensity.\r\n\tThis is sufficient to colour diagnostic output from gcc and clang when -fdiagnostics-color set.\r\n\t</li>\r\n\t<li>\r\n\tThe errorlist lexer allows the line number to be 0 in GCC errors as some tools report whole file\r\n\terrors as line 0.\r\n\t</li>\r\n\t<li>\r\n\tMySql lexer fixes empty comments /**/ so the comment state does not continue.\r\n\t</li>\r\n\t<li>\r\n\tVHDL folder supports \"protected\" keyword.\r\n\t</li>\r\n\t<li>\r\n\tTreat CRLF line end as two characters in SCI_COUNTCHARACTERS.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1757/\">Bug #1757</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK+ 3.x, fix height of lines in autocompletion lists to match the font.\r\n\tSwitch from deprecated style calls to CSS styling.\r\n\tRemoved setting list colours on GTK+ 3.16+ as no longer appears needed.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK+, avoid \"Invalid rectangle passed\" warning messages by never reporting the client\r\n\trectangle with a negative width or height.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1743/\">Bug #1743</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, copy Sci_Position.h into the framework so clients can build.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa fix bug with drag and drop that could lead to crashes.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1751/\">Bug #1751</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix SciTE disk exhaustion bug by reporting failures when writing files.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1760/\">Bug #1760</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix find strip in SciTE on Windows XP to be visible.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows changes the way it detects that a tool has finished executing to ensure all output data\r\n\tfrom the process is read.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows improves the time taken to read output from tools that produce a large amount\r\n\tof output by a factor of around 10.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK+ the keyboard command for View | End of Line was changed to Ctrl+Shift+N\r\n\tto avoid clash with Search | Selection Add Next.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1750/\">Bug #1750</a>.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite360.zip?download\">Release 3.6.0</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 3 August 2015.\r\n\t</li>\r\n\t<li>\r\n\tExternal interfaces use the Sci_Position and Sci_PositionU typedefs instead of int and unsigned int\r\n\tto allow for changes to a 64-bit interface on 64-bit platforms in the future.\r\n\tApplications and external lexers should start using the new type names so that\r\n\tthey will be compatible when the 64-bit change occurs.\r\n\tThere is also Sci_PositionCR (long) for use in the Sci_CharacterRange struct which will\r\n\talso eventually become 64-bit.\r\n\t</li>\r\n\t<li>\r\n\tMultiple selection now works over more key commands.\r\n\tThe new multiple-selection handling commands include horizontal movement and selection commands,\r\n\tline up and down movement and selection commands, word and line deletion commands, and\r\n\tline end insertion.\r\n\tThis change in behaviours is conditional on setting the SCI_SETADDITIONALSELECTIONTYPING property.\r\n\t</li>\r\n\t<li>\r\n\tAutocompletion lists send an SCN_AUTOCCOMPLETED notification after the text has been inserted.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1109/\">Feature #1109.</a>\r\n\t</li>\r\n\t<li>\r\n\tThe case mode style attribute can now be SC_CASE_CAMEL.\r\n\t</li>\r\n\t<li>\r\n\tThe Python lexer supports substyles for identifiers.\r\n\t</li>\r\n\t<li>\r\n\tSciTE adds support for substyles.\r\n\t</li>\r\n\t<li>\r\n\tSciTE's Export as RTF and Copy as RTF commands support UTF-8.\r\n\t</li>\r\n\t<li>\r\n\tSciTE can display autocompletion on all IME input with ime.autocomplete property.\r\n\t</li>\r\n\t<li>\r\n\tSciTE properties files now discard trailing white space on variable names.\r\n\t</li>\r\n\t<li>\r\n\tCalling SCI_SETIDENTIFIERS resets styling to ensure any added identifier are highlighted.\r\n\t</li>\r\n\t<li>\r\n\tAvoid candidate box randomly popping up away from edit pane with (especially\r\n\tJapanese) IME input.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa fix problems with positioning of autocompletion lists near screen edge\r\n\tor under dock. Cancel autocompletion when window moved.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1740/\">Bug #1740</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix drawing problem when control characters are in a hidden style as they then\r\n\thave a zero width rectangle to draw but modify that rectangle in a way that\r\n\tclears some pixels.\r\n\t</li>\r\n\t<li>\r\n\tReport error when attempt to resize buffer to more than 2GB with SC_STATUS_FAILURE.\r\n\t</li>\r\n\t<li>\r\n\tFix bug on GTK+ with scroll bars leaking.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1742/\">Bug #1742</a>.\r\n\t</li>\r\n\t<li>\r\n\tLexOthers.cxx file split into one file per lexer: LexBatch, LexDiff,\r\n\tLexErrorList, LexMake, LexNull, and LexProps.\r\n\t</li>\r\n\t<li>\r\n\tSciTE exporters handle styles &gt; 127 correctly now.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows can scale window element sizes based on the system DPI setting.\r\n\t</li>\r\n\t<li>\r\n\tSciTE implements find.in.files.close.on.find on all platforms, not just Windows.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite357.zip?download\">Release 3.5.7</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 20 June 2015.\r\n\t</li>\r\n\t<li>\r\n\tAdded SCI_MULTIPLESELECTADDNEXT to add the next occurrence of the main selection within the\r\n\ttarget to the set of selections as main. If the current selection is empty then select word around caret.\r\n\tSCI_MULTIPLESELECTADDEACH adds each occurrence of the main selection within the\r\n\ttarget to the set of selections.\r\n\t</li>\r\n\t<li>\r\n\tSciTE adds \"Selection Add Next\" and \"Selection Add Each\" commands to the Search menu.\r\n\t</li>\r\n\t<li>\r\n\tAdded SCI_ISRANGEWORD to determine if the parameters are at the start and end of a word.\r\n\t</li>\r\n\t<li>\r\n\tAdded SCI_TARGETWHOLEDOCUMENT to set the target to the whole document.\r\n\t</li>\r\n\t<li>\r\n\tVerilog lexer recognizes protected regions and the folder folds protected regions.\r\n\t</li>\r\n\t<li>\r\n\tA performance problem with markers when deleting many lines was fixed.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1733/\">Bug #1733</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa fix crash when ScintillaView destroyed if no autocompletion ever displayed.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1728/\">Bug #1728</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa fix crash in drag and drop.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK+ 3.4+, when there are both horizontal and vertical scrollbars, draw the lower-right corner\r\n\tso that it does not appear black when text selected.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1611/\">Bug #1611</a>.\r\n\t</li>\r\n\t<li>\r\n\tFixed most calls deprecated in GTK+ 3.16. Does not fix style override calls\r\n\tas they are more complex.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ 3.x uses a different technique for highlighting the search strip when there is\r\n\tno match which is more compatible with future and past versions and different themes.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite356.zip?download\">Release 3.5.6</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 26 May 2015.\r\n\t</li>\r\n\t<li>\r\n\tOn Qt, use fractional positioning calls and avoid rounding to ensure consistency.\r\n\t</li>\r\n\t<li>\r\n\tSCI_TARGETASUTF8 and SCI_ENCODEDFROMUTF8 implemented on\r\n\tWin32 as well as GTK+ and Cocoa.\r\n\t</li>\r\n\t<li>\r\n\tC++ lexer fixes empty backquoted string.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1711/\">Bug #1711</a>.\r\n\t</li>\r\n\t<li>\r\n\tC++ lexer fixes #undef directive.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1719/\">Bug #1719</a>.\r\n\t</li>\r\n\t<li>\r\n\tFortran folder fixes handling of \"selecttype\" and \"selectcase\".\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1724/\">Bug #1724</a>.\r\n\t</li>\r\n\t<li>\r\n\tVerilog folder folds interface definitions.\r\n\t</li>\r\n\t<li>\r\n\tVHDL folder folds units declarations and fixes a case insensitivity bug with not treating \"IS\" the same as \"is\".\r\n\t</li>\r\n\t<li>\r\n\tFix bug when drawing text margins in buffered mode which would use default\r\n\tencoding instead of chosen encoding.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1703/\">Bug #1703</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix bug with Korean Hanja conversions in DBCS encoding on Windows.\r\n\t</li>\r\n\t<li>\r\n\tFix for reading a UTF-16 file in SciTE where a non-BMP character is split over a read buffer boundary.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1710/\">Bug #1710</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix bug on GTK+ 2.x for Windows where there was an ABI difference between\r\n\tcompiler version.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1726/\">Bug #1726</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix undo bug on Cocoa that could lose data..\r\n\t</li>\r\n\t<li>\r\n\tFix link error on Windows when SCI_NAMESPACE used.\r\n\t</li>\r\n\t<li>\r\n\tFix exporting from SciTE when using Scintillua for lexing.\r\n\t</li>\r\n\t<li>\r\n\tSciTE does not report twice that a search string can not be found when \"Replace\" pressed.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1716/\">Bug #1716</a>.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ 3.x disables arrow in search combo when no entries.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1717/\">Bug #1717</a>.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite355.zip?download\">Release 3.5.5</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 17 April 2015.\r\n\t</li>\r\n\t<li>\r\n\tScintilla on Windows is now always a wide character window so SCI_SETKEYSUNICODE has no effect\r\n\tand SCI_GETKEYSUNICODE always returns true. These APIs are deprecated and should not be called.\r\n\t</li>\r\n\t<li>\r\n\tThe wxWidgets-specific ascent member of Font has been removed which breaks\r\n\tcompatibility with current wxStyledTextCtrl.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1682/\">Bug #1682</a>.\r\n\t</li>\r\n\t<li>\r\n\tIME on Qt supports multiple carets and behaves more like other platforms.\r\n\t</li>\r\n\t<li>\r\n\tAlways use inline IME on GTK+ for Korean.\r\n\t</li>\r\n\t<li>\r\n\tSQL lexer fixes handling of '+' and '-' in numbers so the '-' in '1-1' is seen as an operator and for\r\n\t'1--comment' the comment is recognized.\r\n\t</li>\r\n\t<li>\r\n\tTCL lexer reverts change to string handling.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1642/\">Bug #1642</a>.\r\n\t</li>\r\n\t<li>\r\n\tVerilog lexer fixes bugs with macro styling.\r\n\tVerilog folder fixes bugs with `end completing an `if* instead of `endif and fold.at.else, and implements\r\n\tfolding at preprocessor `else.\r\n\t</li>\r\n\t<li>\r\n\tVHDL lexer supports extended identifiers.\r\n\t</li>\r\n\t<li>\r\n\tFix bug on Cocoa where the calltip would display incorrectly when\r\n\tswitching calltips and the new calltip required a taller window.\r\n\t</li>\r\n\t<li>\r\n\tFix leak on Cocoa with autocompletion lists.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1706/\">Bug #1706</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix potential crash on Cocoa with drag and drop.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1709/\">Bug #1709</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix bug on Windows when compiling with MinGW-w64 which caused text to not be drawn\r\n\twhen in wrap mode.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1705/\">Bug #1705</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix SciTE bug with missing file open filters and add hex to excluded set of properties files so that its\r\n\tsettings don't appear.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1707/\">Bug #1707</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix SciTE bug where files without extensions like \"makefile\" were not highlighted correctly.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite354.zip?download\">Release 3.5.4</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 8 March 2015.\r\n\t</li>\r\n\t<li>\r\n\tIndicators may have a different colour and style when the mouse is over them or the caret is moved into them.\r\n\t</li>\r\n\t<li>\r\n\tAn indicator may display in a large variety of colours with the SC_INDICFLAG_VALUEFORE\r\n\tflag taking the colour from the indicator's value, which may differ for every character, instead of its\r\n\tforeground colour attribute.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, additional IME methods implemented so that more commands are enabled.\r\n\tFor Japanese: Reverse Conversion, Convert to Related Character, and Search Similar Kanji\r\n\tcan now be performed.\r\n\tThe global definition hotkey Command+Control+D and the equivalent three finger tap gesture\r\n\tcan be used.\r\n\t</li>\r\n\t<li>\r\n\tMinimum version of Qt supported is now 4.8 due to the use of QElapsedTimer::nsecsElapsed.\r\n\t</li>\r\n\t<li>\r\n\tOn Windows, for Korean, the VK_HANJA key is implemented to choose Hanja for Hangul and\r\n\tto convert from Hanja to Hangul.\r\n\t</li>\r\n\t<li>\r\n\tC++ lexer adds lexer.cpp.verbatim.strings.allow.escapes option that allows verbatim (@\") strings\r\n\tto contain escape sequences. This should remain off (0) for C# and be turned on (1) for Objective C.\r\n\t</li>\r\n\t<li>\r\n\tRust lexer accepts new 'is'/'us' integer suffixes instead of 'i'/'u'.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1098/\">Bug #1098</a>.\r\n\t</li>\r\n\t<li>\r\n\tRuby folder can fold multiline comments.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1697/\">Bug #1697</a>.\r\n\t</li>\r\n\t<li>\r\n\tSQL lexer fixes a bug with the q-quote operator.\r\n\t</li>\r\n\t<li>\r\n\tTCL lexer fixes a bug with some strings.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1642/\">Bug #1642</a>.\r\n\t</li>\r\n\t<li>\r\n\tVerilog lexer handles escaped identifiers that begin with \\ and end with space like \\reset* .\r\n\tVerilog folder fixes one bug with inconsistent folding when fold.comment is on and another\r\n\twith typedef class statements creating a fold point, expecting an endclass statement.\r\n\t</li>\r\n\t<li>\r\n\tVHDL folder fixes hang in folding when document starts with \"entity\".\r\n\t</li>\r\n\t<li>\r\n\tAdd new indicators INDIC_COMPOSITIONTHIN, INDIC_FULLBOX, and INDIC_TEXTFORE.\r\n\tINDIC_COMPOSITIONTHIN is a thin underline that mimics the appearance of non-target segments in OS X IME.\r\n\tINDIC_FULLBOX is similar to INDIC_STRAIGHTBOX but covers the entire character area which means that\r\n\tindicators with this style on contiguous lines may touch. INDIC_TEXTFORE changes the text foreground colour.\r\n\t</li>\r\n\t<li>\r\n\tFix adaptive scrolling speed for GTK+ on OS X with GTK Quartz backend (as opposed to X11 backend).\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1696/\">Bug #1696</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix position of autocompletion and calltips on Cocoa when there were two screens stacked vertically.\r\n\t</li>\r\n\t<li>\r\n\tFix crash in SciTE when saving large files in background when closing application.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1691/\">Bug #1691</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix decoding of MSVC warnings in SciTE so that files in the C:\\Program Files (x86)\\ directory can be opened.\r\n\tThis is a common location of system include files.\r\n\t</li>\r\n\t<li>\r\n\tFix compilation failure of C++11 &lt;regex&gt; on Windows using gcc.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite353.zip?download\">Release 3.5.3</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 20 January 2015.\r\n\t</li>\r\n\t<li>\r\n\tSupport removed for Windows 95, 98, and ME.\r\n\t</li>\r\n\t<li>\r\n\tLexers added for Motorola S-Record files, Intel hex files, and Tektronix extended hex files with folding for Intel hex files.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1091/\">Feature #1091.</a>\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1093/\">Feature #1093.</a>\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1095/\">Feature #1095.</a>\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1096/\">Feature #1096.</a>\r\n\t</li>\r\n\t<li>\r\n\tC++ folder allows folding on square brackets '['.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1087/\">Feature #1087.</a>\r\n\t</li>\r\n\t<li>\r\n\tShell lexer fixes three issues with here-documents.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1672/\">Bug #1672</a>.\r\n\t</li>\r\n\t<li>\r\n\tVerilog lexer highlights doc comment keywords; has separate styles for input, output, and inout ports\r\n\t(lexer.verilog.portstyling); fixes a bug in highlighting numbers; can treat upper-case identifiers as\r\n\tkeywords (lexer.verilog.allupperkeywords); and can use different styles for code that is inactive due\r\n\tto preprocessor commands (lexer.verilog.track.preprocessor, lexer.verilog.update.preprocessor).\r\n\t</li>\r\n\t<li>\r\n\tWhen the calltip window is taller than the Scintilla window, leave it in a\r\n\tposition that avoids overlapping the Scintilla text.\r\n\t</li>\r\n\t<li>\r\n\tWhen a text margin is displayed, for annotation lines, use the background colour of the base line.\r\n\t</li>\r\n\t<li>\r\n\tOn Windows GDI, assume font names are encoded in UTF-8. This matches the Direct2D code path.\r\n\t</li>\r\n\t<li>\r\n\tFix paste for GTK+ on OS X.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1677/\">Bug #1677</a>.\r\n\t</li>\r\n\t<li>\r\n\tReverted a fix on Qt where Qt 5.3 has returned to the behaviour of 4.x.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1575/\">Bug #1575</a>.\r\n\t</li>\r\n\t<li>\r\n\tWhen the mouse is on the line between margin and text changed to treat as within text.\r\n\tThis makes the PLAT_CURSES character cell platform work better.\r\n\t</li>\r\n\t<li>\r\n\tFix a crash in SciTE when the command line is just \"-close:\".\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1675/\">Bug #1675</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix unexpected dialog in SciTE on Windows when the command line has a quoted filename then ends with a space.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1673/\">Bug #1673</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Windows and GTK+, use indicators for inline IME.\r\n\t</li>\r\n\t<li>\r\n\tSciTE shuts down quicker when there is no user-written OnClose function and no directors are attached.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite352.zip?download\">Release 3.5.2</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 2 December 2014.\r\n\t</li>\r\n\t<li>\r\n\tFor OS X Cocoa switch C++ runtime to libc++ to enable use of features that will never\r\n\tbe added to libstdc++ including those part of C++11.\r\n\tScintilla will now run only on OS X 10.7 or later and only in 64-bit mode.\r\n\t</li>\r\n\t<li>\r\n\tInclude support for using C++11 &lt;regex&gt; for regular expression searches.\r\n\tEnabling this requires rebuilding Scintilla with a non-default option.\r\n\tThis is a provisional feature and may change API before being made permanent.\r\n\t</li>\r\n\t<li>\r\n\tAllocate indicators used for Input Method Editors after 31 which was the previous limit of indicators to\r\n\tensure no clash between the use of indicators for IME and for the application.\r\n\t</li>\r\n\t<li>\r\n\tANNOTATION_INDENTED added which is similar to ANNOTATION_BOXED in terms of positioning\r\n\tbut does not show a border.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1086/\">Feature #1086.</a>\r\n\t</li>\r\n\t<li>\r\n\tAllow platform overrides for drawing tab arrows, wrap markers, and line markers.\r\n\tSize of double click detection area is a variable.\r\n\tThese enable better visuals and behaviour for PLAT_CURSES as it is character cell based.\r\n\t</li>\r\n\t<li>\r\n\tCoffeeScript lexer fixes \"/*\" to not be a comment.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1420/\">Bug #1420</a>.\r\n\t</li>\r\n\t<li>\r\n\tVHDL folder fixes \"block\" keyword.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1664/\">Bug #1664</a>.\r\n\t</li>\r\n\t<li>\r\n\tPrevent caret blinking when holding down Delete key.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1657/\">Bug #1657</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Windows, allow right click selection in popup menu.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1080/\">Feature #1080.</a>\r\n\t</li>\r\n\t<li>\r\n\tOn Windows, only call ShowCaret in GDI mode as it interferes with caret drawing when using Direct2D.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1643/\">Bug #1643</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Windows, another DirectWrite mode SC_TECHNOLOGY_DIRECTWRITEDC added\r\n\twhich may avoid drawing failures in some circumstances by drawing into a GDI DC.\r\n\tThis feature is provisional and may be changed or removed if a better solution is found.\r\n\t</li>\r\n\t<li>\r\n\tOn Windows, avoid processing mouse move events where the mouse has not moved as these can\r\n\tcause unexpected dwell start notifications.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1670/\">Bug #1670</a>.\r\n\t</li>\r\n\t<li>\r\n\tFor GTK+ on Windows, avoid extra space when pasting from external application.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK+ 2.x allow Scintilla to be used inside tool tips by changing when preedit window created.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1662/\">Bug #1662</a>.\r\n\t</li>\r\n\t<li>\r\n\tSupport MinGW compilation under Linux.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1077/\">Feature #1077.</a>\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite351.zip?download\">Release 3.5.1</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 30 September 2014.\r\n\t</li>\r\n\t<li>\r\n\tBibTeX lexer added.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1071/\">Feature #1071.</a>\r\n\t</li>\r\n\t<li>\r\n\tSQL lexer supports the q-quote operator as SCE_SQL_QOPERATOR(24).\r\n\t</li>\r\n\t<li>\r\n\tVHDL lexer supports block comments.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1527/\">Bug #1527</a>.\r\n\t</li>\r\n\t<li>\r\n\tVHDL folder fixes case where \"component\" used before name.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/613/\">Bug #613</a>.\r\n\t</li>\r\n\t<li>\r\n\tRestore fractional pixel tab positioning which was truncated to whole pixels in 3.5.0.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1652/\">Bug #1652</a>.\r\n\t</li>\r\n\t<li>\r\n\tAllow choice between windowed and inline IME on some platforms.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK+ cache autocomplete window to avoid platform bug where windows\r\n\twere sometimes lost.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1649/\">Bug #1649</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK+ size autocomplete window more accurately.\r\n\t</li>\r\n\t<li>\r\n\tOn Windows only unregister windows classes registered.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1639/\">Bug #1639</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Windows another DirectWrite mode SC_TECHNOLOGY_DIRECTWRITERETAIN added\r\n\twhich may avoid drawing failures on some cards and drivers.\r\n\tThis feature is provisional and may be changed or removed if a better solution is found.\r\n\t</li>\r\n\t<li>\r\n\tOn Windows support the Visual Studio 2010+ clipboard format that indicates a line copy.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1636/\">Bug #1636</a>.\r\n\t</li>\r\n\t<li>\r\n\tSciTE session files remember the scroll position.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite350.zip?download\">Release 3.5.0</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 13 August 2014.\r\n\t</li>\r\n\t<li>\r\n\tText may share space vertically so that extreme ascenders and descenders are\r\n\tnot cut off by calling SCI_SETPHASESDRAW(SC_PHASES_MULTIPLE).\r\n\t</li>\r\n\t<li>\r\n\tSeparate timers are used for each type of periodic activity and they are turned on and off\r\n\tas required. This saves power as there are fewer wake ups.\r\n\tOn recent releases of OS X Cocoa and Windows, coalescing timers are used to further\r\n\tsave power.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1086/\">Bug #1086</a>.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1532/\">Bug #1532</a>.\r\n\t</li>\r\n\t<li>\r\n\tExplicit tab stops may be set for each line.\r\n\t</li>\r\n\t<li>\r\n\tOn Windows and GTK+, when using Korean input methods, IME composition is moved from a\r\n\tseparate window into the Scintilla window.\r\n\t</li>\r\n\t<li>\r\n\tSciTE adds a \"Clean\" command to the \"Tools\" menu which is meant to be bound to a command like\r\n\t\"make clean\".\r\n\t</li>\r\n\t<li>\r\n\tLexer added for Windows registry files.\r\n\t</li>\r\n\t<li>\r\n\tHTML lexer fixes a crash with SGML after a Mako comment.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1622/\">Bug #1622</a>.\r\n\t</li>\r\n\t<li>\r\n\tKiXtart lexer adds a block comment state.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1053/\">Feature #1053.</a>\r\n\t</li>\r\n\t<li>\r\n\tMatlab lexer fixes transpose operations like \"X{1}'\".\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1629/\">Bug #1629</a>.\r\n\t</li>\r\n\t<li>\r\n\tRuby lexer fixes bugs with the syntax of symbols including allowing a symbol to end with '?'.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1627/\">Bug #1627</a>.\r\n\t</li>\r\n\t<li>\r\n\tRust lexer supports byte string literals, naked CR can be escaped in strings, and files starting with\r\n\t\"#![\" are not treated as starting with a hashbang comment.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1063/\">Feature #1063.</a>\r\n\t</li>\r\n\t<li>\r\n\tBug fixed where style data was stale when deleting a rectangular selection.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed where annotations disappeared when SCI_CLEARDOCUMENTSTYLE called.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed where selection not redrawn after SCI_DELWORDRIGHT.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1633/\">Bug #1633</a>.\r\n\t</li>\r\n\t<li>\r\n\tChange the function prototypes to be complete for functions exported as \"C\".\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1618/\">Bug #1618</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix a memory leak on GTK+ with autocompletion lists.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1638/\">Bug #1638</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK+, use the full character width for the overstrike caret for multibyte characters.\r\n\t</li>\r\n\t<li>\r\n\tOn Qt, set list icon size to largest icon. Add padding on OS X.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1634/\">Bug #1634</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Qt, fix building on FreeBSD 9.2.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1635/\">Bug #1635</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Qt, add a get_character method on the document.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1064/\">Feature #1064.</a>\r\n\t</li>\r\n\t<li>\r\n\tOn Qt, add SCI_* for methods to ScintillaConstants.py.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1065/\">Feature #1065.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ crash fixed with Insert Abbreviation command.\r\n\t</li>\r\n\t<li>\r\n\tFor SciTE with read-only files and are.you.sure=0 reenable choice to save to another\r\n\tlocation when using Save or Close commands.\r\n\t</li>\r\n\t<li>\r\n\tFix SciTE bug where toggle bookmark did not work after multiple lines with bookmarks merged.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1617/\">Bug #1617</a>.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite344.zip?download\">Release 3.4.4</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 3 July 2014.\r\n\t</li>\r\n\t<li>\r\n\tStyle byte indicators removed. They were deprecated in 2007. Standard indicators should be used instead.\r\n\tSome elements used by lexers no longer take number of bits or mask arguments so lexers may need to be\r\n\tupdated for LexAccessor::StartAt,  LexAccessor::SetFlags (removed),  LexerModule::LexerModule.\r\n\t</li>\r\n\t<li>\r\n\tWhen multiple selections are active, autocompletion text may be inserted at each selection with new\r\n\tSCI_AUTOCSETMULTI method.\r\n\t</li>\r\n\t<li>\r\n\tC++ lexer fixes crash for \"#define x(\".\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1614/\">Bug #1614</a>.\r\n\t</li>\r\n\t<li>\r\n\tC++ lexer fixes raw string recognition so that R\"xxx(blah)xxx\" is styled as SCE_C_STRINGRAW.\r\n\t</li>\r\n\t<li>\r\n\tThe Postscript lexer no longer marks token edges with indicators as this used style byte indicators.\r\n\t</li>\r\n\t<li>\r\n\tThe Scriptol lexer no longer displays indicators for poor indentation as this used style byte indicators.\r\n\t</li>\r\n\t<li>\r\n\tTCL lexer fixes names of keyword sets.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1615/\">Bug #1615</a>.\r\n\t</li>\r\n\t<li>\r\n\tShell lexer fixes fold matching problem caused by \"&lt;&lt;&lt;\".\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1605/\">Bug #1605</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix bug where indicators were not removed when fold highlighting on.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1604/\">Bug #1604</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix bug on Cocoa where emoji were treated as being zero width.\r\n\t</li>\r\n\t<li>\r\n\tFix crash on GTK+ with Ubuntu 12.04 and overlay scroll bars.\r\n\t</li>\r\n\t<li>\r\n\tAvoid creating a Cairo context when measuring text on GTK+ as future versions of GTK+\r\n\tmay prohibit calling gdk_cairo_create except inside drawing handlers. This prohibition may\r\n\tbe required on Wayland.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, the registerNotifyCallback method is now marked as deprecated so client code that\r\n\tuses it will display an error message.\r\n\tClient code should use the delegate mechanism or subclassing instead.\r\n\tThe method will be removed in the next version.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, package Scintilla more in compliance with platform conventions.\r\n\tOnly publish public headers in the framework headers directory.\r\n\tOnly define the Scintilla namespace in Scintilla.h when compiling as C++.\r\n\tUse the Cocoa NS_ENUM and NS_OPTIONS macros for exposed enumerations.\r\n\tHide internal methods from public headers.\r\n\tThese changes are aimed towards publishing Scintilla as a module which will allow it to\r\n\tbe used from the Swift programming language, although more changes will be needed here.\r\n\t</li>\r\n\t<li>\r\n\tFix crash in SciTE when stream comment performed at line end.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1610/\">Bug #1610</a>.\r\n\t</li>\r\n\t<li>\r\n\tFor SciTE on Windows, display error message when common dialogs fail.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/156/\">Bug #156</a>.\r\n\t</li>\r\n\t<li>\r\n\tFor SciTE on GTK+ fix bug with initialization of toggle buttons in find and replace strips.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1612/\">Bug #1612</a>.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite343.zip?download\">Release 3.4.3</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 27 May 2014.\r\n\t</li>\r\n\t<li>\r\n\tFix hangs and crashes in DLL at shutdown on Windows when using Direct2D.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite342.zip?download\">Release 3.4.2</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 22 May 2014.\r\n\t</li>\r\n\t<li>\r\n\tInsertions can be filtered or modified by calling SCI_CHANGEINSERTION inside a handler for\r\n\tSC_MOD_INSERTCHECK.\r\n\t</li>\r\n\t<li>\r\n\tDMIS lexer added. DMIS is a language for coordinate measuring machines.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1049/\">Feature #1049.</a>\r\n\t</li>\r\n\t<li>\r\n\tLine state may be displayed in the line number margin to aid in debugging lexing and folding with\r\n\tSC_FOLDFLAG_LINESTATE (128).\r\n\t</li>\r\n\t<li>\r\n\tC++ lexer understands more preprocessor statements. #if defined SYMBOL is understood.\r\n\tSome macros with arguments can be understood and these may be predefined in keyword set 4\r\n\t(keywords5 for SciTE)\r\n\twith syntax similar to CHECKVERSION(x)=(x&lt;3).\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1051/\">Feature #1051.</a>\r\n\t</li>\r\n\t<li>\r\n\tC++ lexer can highlight task marker keywords in comments as SCE_C_TASKMARKER.\r\n\t</li>\r\n\t<li>\r\n\tC++ lexer can optionally highlight escape sequences in strings as SCE_C_ESCAPESEQUENCE.\r\n\t</li>\r\n\t<li>\r\n\tC++ lexer supports Go back quoted raw string literals with lexer.cpp.backquoted.strings option.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1047/\">Feature #1047.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE performs word and search match highlighting as an idle task to improve interactivity\r\n\tand allow use of these features on large files.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed on Cocoa where previous caret lines were visible.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1593/\">Bug #1593</a>.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed where caret remained invisible when period set to 0.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1592/\">Bug #1592</a>.\r\n\t</li>\r\n\t<li>\r\n\tFixed display flashing when scrolling with GTK+ 3.10.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1567/\">Bug #1567</a>.\r\n\t</li>\r\n\t<li>\r\n\tFixed calls and constants deprecated in GTK+ 3.10.\r\n\t</li>\r\n\t<li>\r\n\tFixed bug on Windows where WM_GETTEXT did not provide data in UTF-16 for Unicode window.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/685/\">Bug #685</a>.\r\n\t</li>\r\n\t<li>\r\n\tFor SciTE, protect access to variables used by threads with a mutex to prevent data races.\r\n\t</li>\r\n\t<li>\r\n\tFor SciTE on GTK+ fix thread object leaks.\r\n\tDisplay the version of GTK+ compiled against in the about box.\r\n\t</li>\r\n\t<li>\r\n\tFor SciTE on GTK+ 3.10, fix the size of the tab bar's content and use\r\n\tfreedesktop.org standard icon names where possible.\r\n\t</li>\r\n\t<li>\r\n\tFor SciTE on Windows, fix bug where invoking help resubmitted the\r\n\trunning program.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/272/\">Bug #272</a>.\r\n\t</li>\r\n\t<li>\r\n\tSciTE's highlight current word feature no longer matches the selection when it contains space.\r\n\t</li>\r\n\t<li>\r\n\tFor building SciTE in Visual C++, the win\\SciTE.vcxproj project file should be used.\r\n\tThe boundscheck directory and its project and solution files have been removed.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite341.zip?download\">Release 3.4.1</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 1 April 2014.\r\n\t</li>\r\n\t<li>\r\n\tDisplay Unicode line ends as [LS], [PS], and [NEL] blobs.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed where cursor down failed on wrapped lines.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1585/\">Bug #1585</a>.\r\n\t</li>\r\n\t<li>\r\n\tCaret positioning changed a little to appear inside characters less often by\r\n\trounding the caret position to the pixel grid instead of truncating.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1588/\">Bug #1588</a>.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed where automatic indentation wrong when caret in virtual space.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1586/\">Bug #1586</a>.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed on Windows where WM_LBUTTONDBLCLK was no longer sent to window.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1587/\">Bug #1587</a>.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed with SciTE on Windows XP where black stripes appeared inside the find and\r\n\treplace strips.\r\n\t</li>\r\n\t<li>\r\n\tCrash fixed in SciTE with recursive properties files.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1507/\">Bug #1507</a>.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed with SciTE where Ctrl+E before an unmatched end brace jumps to file start.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/315/\">Bug #315</a>.\r\n\t</li>\r\n\t<li>\r\n\tFixed scrolling on Cocoa to avoid display glitches and be smoother.\r\n\t</li>\r\n\t<li>\r\n\tFixed crash on Cocoa when character composition used when autocompletion list active.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite340.zip?download\">Release 3.4.0</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 22 March 2014.\r\n\t</li>\r\n\t<li>\r\n\tThe Unicode line ends and substyles features added as provisional in 3.2.5 are now finalized.\r\n\tThere are now no provisional features.\r\n\t</li>\r\n\t<li>\r\n\tAdded wrap mode SC_WRAP_WHITESPACE which only wraps on whitespace, not on style changes.\r\n\t</li>\r\n\t<li>\r\n\tSciTE find and replace strips can perform incremental searching and temporary highlighting of all\r\n\tmatches with the find.strip.incremental, replace.strip.incremental, and find.indicator.incremental settings.\r\n\t</li>\r\n\t<li>\r\n\tSciTE default settings changed to use strips for find and replace and to draw with Direct2D and\r\n\tDirectWrite on Windows.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows scales image buttons on the find and replace strips to match the current system scale factor.\r\n\t</li>\r\n\t<li>\r\n\tAdditional assembler lexer variant As(SCLEX_AS) for Unix assembly code which uses '#' for comments and\r\n\t';' to separate statements.\r\n\t</li>\r\n\t<li>\r\n\tFix Coffeescript lexer for keyword style extending past end of word.\r\n\tAlso fixes styling 0...myArray.length all as a number.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1583/\">Bug #1583</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix crashes and other bugs in Fortran folder by removing folding of do-label constructs.\r\n\t</li>\r\n\t<li>\r\n\tDeleting a whole line deletes the annotations on that line instead of the annotations on the next line.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1577/\">Bug #1577</a>.\r\n\t</li>\r\n\t<li>\r\n\tChanged position of tall calltips to prefer lower half of screen to cut off end instead of start.\r\n\t</li>\r\n\t<li>\r\n\tFix Qt bug where double click treated as triple click.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1575/\">Bug #1575</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Qt, selecting an item in an autocompletion list that is not currently visible positions it at the top.\r\n\t</li>\r\n\t<li>\r\n\tFix bug on Windows when resizing autocompletion list with only short strings caused the list to move.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa reduce scrollable height by one line to fix bugs with moving caret\r\n\tup or down.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa fix calltips which did not appear when they were created in an off-screen position.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite339.zip?download\">Release 3.3.9</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 31 January 2014.\r\n\t</li>\r\n\t<li>\r\n\tFix 3.3.8 bug where external lexers became inaccessible.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1574/\">Bug #1574</a>.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite338.zip?download\">Release 3.3.8</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 28 January 2014.\r\n\t</li>\r\n\t<li>\r\n\tDropSelectionN API added to drop a selection from a multiple selection.\r\n\t</li>\r\n\t<li>\r\n\tCallTipSetPosStart API added to change the position at which backspacing removes the calltip.\r\n\t</li>\r\n\t<li>\r\n\tSC_MARK_BOOKMARK marker symbol added which looks like bookmark ribbons used in\r\n\tbook reading applications.\r\n\t</li>\r\n\t<li>\r\n\tBasic lexer highlights hex, octal, and binary numbers in FreeBASIC which use the prefixes\r\n\t&amp;h, &amp;o and &amp;b respectively.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1041/\">Feature #1041.</a>\r\n\t</li>\r\n\t<li>\r\n\tC++ lexer fixes bug where keyword followed immediately by quoted string continued\r\n\tkeyword style.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1564/\">Bug #1564</a>.\r\n\t</li>\r\n\t<li>\r\n\tMatlab lexer treats '!' differently for Matlab and Octave languages.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1571/\">Bug #1571</a>.\r\n\t</li>\r\n\t<li>\r\n\tRust lexer improved with nested comments, more compliant doc-comment detection,\r\n\toctal literals, NUL characters treated as valid, and highlighting of raw string literals and float literals fixed.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1038/\">Feature #1038.</a>\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1570/\">Bug #1570</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Qt expose the EOLMode on the document object.\r\n\t</li>\r\n\t<li>\r\n\tFix hotspot clicking where area was off by half a character width.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1562/\">Bug #1562</a>.\r\n\t</li>\r\n\t<li>\r\n\tTweaked scroll positioning by either 2 pixels or 1 pixel when caret is at left or right of view\r\n\tto ensure caret is inside visible area.\r\n\t</li>\r\n\t<li>\r\n\tSend SCN_UPDATEUI with SC_UPDATE_SELECTION for Shift+Tab inside text.\r\n\t</li>\r\n\t<li>\r\n\tOn Windows update the system caret position when scrolling to help screen readers\r\n\tsee the scroll quickly.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, GTK+, and Windows/Direct2D draw circles more accurately so that\r\n\tcircular folding margin markers appear circular, of consistent size, and centred.\r\n\tMake SC_MARK_ARROWS drawing more even.\r\n\tFix corners of SC_MARK_ROUNDRECT with Direct2D to be similar to other platforms.\r\n\t</li>\r\n\t<li>\r\n\tSciTE uses a bookmark ribbon symbol for bookmarks as it scales better to higher resolutions\r\n\tthan the previous blue gem bitmap.\r\n\t</li>\r\n\t<li>\r\n\tSciTE will change the width of margins while running when the margin.width and fold.margin.width\r\n\tproperties are changed.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows can display a larger tool bar with the toolbar.large property.\r\n\t</li>\r\n\t<li>\r\n\tSciTE displays a warning message when asked to open a directory.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1568/\">Bug #1568</a>.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite337.zip?download\">Release 3.3.7</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 12 December 2013.\r\n\t</li>\r\n\t<li>\r\n\tLexer added for DMAP language.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1026/\">Feature #1026.</a>\r\n\t</li>\r\n\t<li>\r\n\tBasic lexer supports multiline comments in FreeBASIC.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1023/\">Feature #1023.</a>\r\n\t</li>\r\n\t<li>\r\n\tBash lexer allows '#' inside words..\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1553/\">Bug #1553</a>.\r\n\t</li>\r\n\t<li>\r\n\tC++ lexer recognizes C++11 user-defined literals and applies lexical class SCE_C_USERLITERAL.\r\n\t</li>\r\n\t<li>\r\n\tC++ lexer allows single quote characters as digit separators in numeric literals like 123'456 as this is\r\n\tincluded in C++14.\r\n\t</li>\r\n\t<li>\r\n\tC++ lexer fixes bug with #include statements without \" or &gt; terminating filename.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1538/\">Bug #1538</a>.\r\n\t</li>\r\n\t<li>\r\n\tC++ lexer fixes split of Doxygen keywords @code{.fileExtension} and @param[in,out].\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1551/\">Bug #1551</a>.\r\n\t</li>\r\n\t<li>\r\n\tC++ lexer styles Doxygen keywords at end of document.\r\n\t</li>\r\n\t<li>\r\n\tCmake lexer fixes bug with empty comments.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1550/\">Bug #1550</a>.\r\n\t</li>\r\n\t<li>\r\n\tFortran folder improved. Treats \"else\" as fold header.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/962/\">Feature #962.</a>\r\n\t</li>\r\n\t<li>\r\n\tFix bug with adjacent instances of the same indicator with different values where only the first was drawn.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1560/\">Bug #1560</a>.\r\n\t</li>\r\n\t<li>\r\n\tFor DirectWrite, use the GDI ClearType gamma value for SC_EFF_QUALITY_LCD_OPTIMIZED as\r\n\tthis results in text that is similar in colour intensity to GDI.\r\n\tFor the duller default DirectWrite ClearType text appearance, use SC_EFF_QUALITY_DEFAULT.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/887/\">Feature #887.</a>\r\n\t</li>\r\n\t<li>\r\n\tFix another problem with drawing on Windows with Direct2D when returning from lock screen.\r\n\tThe whole window is redrawn as just redrawing the initially required area left other areas black.\r\n\t</li>\r\n\t<li>\r\n\tWhen scroll width is tracked, take width of annotation lines into account.\r\n\t</li>\r\n\t<li>\r\n\tFor Cocoa on OS X 10.9, responsive scrolling is supported.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, apply font quality setting to line numbers.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1544/\">Bug #1544</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, clicking in margin now sets focus.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1542/\">Bug #1542</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, correct cursor displayed in margin after showing dialog.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, multipaste mode now works.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1541/\">Bug #1541</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK+, chain up to superclass finalize so that all finalization is performed.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1549/\">Bug #1549</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK+, fix horizontal scroll bar range to not be double the needed width.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1546/\">Bug #1546</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn OS X GTK+, report control key as SCI_META for mouse down events.\r\n\t</li>\r\n\t<li>\r\n\tOn Qt, bug fixed with drawing of scrollbars, where previous contents were not drawn over with some\r\n\tthemes.\r\n\t</li>\r\n\t<li>\r\n\tOn Qt, bug fixed with finding monitor rectangle which could lead to autocomplete showing at wrong location.\r\n\t</li>\r\n\t<li>\r\n\tSciTE fix for multiple message boxes when failing to save a file with save.on.deactivate.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1540/\">Bug #1540</a>.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ fixes SIGCHLD handling so that Lua scripts can determine the exit status of processes\r\n\tthey start.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1557/\">Bug #1557</a>.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows XP fixes bad display of find and replace values when using strips.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite336.zip?download\">Release 3.3.6</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 15 October 2013.\r\n\t</li>\r\n\t<li>\r\n\tAdded functions to help convert between substyles and base styles and between secondary and primary styles.\r\n\tSCI_GETSTYLEFROMSUBSTYLE finds the base style of substyles.\r\n\tCan be used to treat all substyles of a style equivalent to that style.\r\n\tSCI_GETPRIMARYSTYLEFROMSTYLE finds the primary style of secondary styles.\r\n\tStyleFromSubStyle and PrimaryStyleFromStyle methods were added to ILexerWithSubStyles so each lexer can implement these.\r\n\t</li>\r\n\t<li>\r\n\tLexer added for Rust language.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1024/\">Feature #1024.</a>\r\n\t</li>\r\n\t<li>\r\n\tAvoid false matches in errorlist lexer which is used for the SciTE output pane\r\n\tby stricter checking of ctags lines.\r\n\t</li>\r\n\t<li>\r\n\tPerl lexer fixes bugs with multi-byte characters, including in HEREDOCs and PODs.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1528/\">Bug #1528</a>.\r\n\t</li>\r\n\t<li>\r\n\tSQL folder folds 'create view' statements.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1020/\">Feature #1020.</a>\r\n\t</li>\r\n\t<li>\r\n\tVisual Prolog lexer updated with better support for string literals and Unicode.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1025/\">Feature #1025.</a>\r\n\t</li>\r\n\t<li>\r\n\tFor SCI_SETIDENTIFIERS, \\t, \\r, and \\n are allowed as well as space between identifiers.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1521/\">Bug #1521</a>.\r\n\t</li>\r\n\t<li>\r\n\tGaining and losing focus is now reported as a notification with the code set to SCN_FOCUSIN\r\n\tor SCN_FOCUSOUT.\r\n\tThis allows clients to uniformly use notifications instead of commands.\r\n\tSince there is no longer a need for commands they will be deprecated in a future version.\r\n\tClients should switch any code that currently uses SCEN_SETFOCUS or SCEN_KILLFOCUS.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, clients should use the delegate mechanism or subclass ScintillaView in preference\r\n\tto registerNotifyCallback: which will be deprecated in the future.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, the ScintillaView.h header hides internal implementation details from Platform.h and ScintillaCocoa.h.\r\n\tInnerView was renamed to SCIContentView and MarginView was renamed to SCIMarginView.\r\n\tdealloc removed from @interface.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, clients may customize SCIContentView by subclassing both SCIContentView and ScintillaView\r\n\tand implementing the contentViewClass class method on the ScintillaView subclass to return the class of\r\n\tthe SCIContentView subclass.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, fixed appearance of alpha rectangles to use specified alpha and colour for outline as well as corner size.\r\n\tThis makes INDIC_STRAIGHTBOX and INDIC_ROUNDBOX look correct.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, memory leak fixed for MarginView.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, make drag and drop work when destination view is empty.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1534/\">Bug #1534</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, drag image fixed when view scrolled.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, SCI_POSITIONFROMPOINTCLOSE fixed when view scrolled.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1021/\">Feature #1021.</a>\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, don't send selection change notification when scrolling.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1522/\">Bug #1522</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Qt, turn off idle events on destruction to prevent repeatedly calling idle.\r\n\t</li>\r\n\t<li>\r\n\tQt bindings in ScintillaEdit changed to use signed first parameter.\r\n\t</li>\r\n\t<li>\r\n\tCompilation errors fixed on Windows and GTK+ with SCI_NAMESPACE.\r\n\t</li>\r\n\t<li>\r\n\tOn Windows, building with gcc will check if Direct2D headers are available and enable Direct2D if they are.\r\n\t</li>\r\n\t<li>\r\n\tAvoid attempts to redraw empty areas when lexing beyond the currently visible lines.\r\n\t</li>\r\n\t<li>\r\n\tControl more attributes of indicators in SciTE with find.mark.indicator and highlight.current.word.indicator\r\n\tproperties.\r\n\t</li>\r\n\t<li>\r\n\tFix SciTE bug with buffers becoming read-only.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1525/\">Bug #1525</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix linking SciTE on non-Linux Unix systems with GNU toolchain by linking to libdl.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1523/\">Bug #1523</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Windows, SciTE's Incremental Search displays match failures by changing the background colour\r\n\tinstead of not adding the character that caused failure.\r\n\t</li>\r\n\t<li>\r\n\tFix SciTE on GTK+ 3.x incremental search to change foreground colour when no match as\r\n\tchanging background colour is difficult.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite335.zip?download\">Release 3.3.5</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 31 August 2013.\r\n\t</li>\r\n\t<li>\r\n\tCharacters may be represented by strings.\r\n\tIn Unicode mode C1 control characters are represented by their mnemonics.\r\n\t</li>\r\n\t<li>\r\n\tAdded SCI_POSITIONRELATIVE to optimize navigation by character.\r\n\t</li>\r\n\t<li>\r\n\tOption to allow mouse selection to switch to rectangular by pressing Alt after start of gesture.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1007/\">Feature #1007.</a>\r\n\t</li>\r\n\t<li>\r\n\tLexer added for KVIrc script.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1008/\">Feature #1008.</a>\r\n\t</li>\r\n\t<li>\r\n\tBash lexer fixed quoted HereDoc delimiters.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1500/\">Bug #1500</a>.\r\n\t</li>\r\n\t<li>\r\n\tMS SQL lexer fixed ';' to appear as an operator.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1509/\">Bug #1509</a>.\r\n\t</li>\r\n\t<li>\r\n\tStructured Text lexer fixed styling of enumeration members.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1508/\">Bug #1508</a>.\r\n\t</li>\r\n\t<li>\r\n\tFixed bug with horizontal caret position when margin changed.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1512/\">Bug #1512</a>.\r\n\t</li>\r\n\t<li>\r\n\tFixed bug on Cocoa where coordinates were relative to text subview instead of whole view.\r\n\t</li>\r\n\t<li>\r\n\tEnsure selection redrawn correctly in two cases.\r\n\tWhen switching from stream to rectangular selection with Alt+Shift+Up.\r\n\tWhen reducing the range of an additional selection by moving mouse up.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1007/\">Feature #1007.</a>\r\n\t</li>\r\n\t<li>\r\n\tCopy and paste of rectangular selections compatible with Borland Delphi IDE on Windows.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/1002/\">Feature #1002.</a>\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1513/\">Bug #1513</a>.\r\n\t</li>\r\n\t<li>\r\n\tInitialize extended styles to the default style.\r\n\t</li>\r\n\t<li>\r\n\tOn Windows, fix painting on an explicit HDC when first paint attempt abandoned.\r\n\t</li>\r\n\t<li>\r\n\tQt bindings in ScintillaEdit made to work on 64-bit Unix systems.\r\n\t</li>\r\n\t<li>\r\n\tEasier access to printing on Qt with formatRange method.\r\n\t</li>\r\n\t<li>\r\n\tFixed SciTE failure to save initial buffer in single buffer mode.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1339/\">Bug #1339</a>.\r\n\t</li>\r\n\t<li>\r\n\tFixed compilation problem with Visual C++ in non-English locales.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1506/\">Bug #1506</a>.\r\n\t</li>\r\n\t<li>\r\n\tDisable Direct2D when compiling with MinGW gcc on Windows because of changes in the recent MinGW release.\r\n\t</li>\r\n\t<li>\r\n\tSciTE crash fixed for negative line.margin.width.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1504/\">Bug #1504</a>.\r\n\t</li>\r\n\t<li>\r\n\tSciTE fix for infinite dialog boxes when failing to automatically save a file.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1503/\">Bug #1503</a>.\r\n\t</li>\r\n\t<li>\r\n\tSciTE settings buffered.draw, two.phase.draw, and technology are applied to the\r\n\toutput pane as well as the edit pane.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite334.zip?download\">Release 3.3.4</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 19 July 2013.\r\n\t</li>\r\n\t<li>\r\n\tHandling of UTF-8 and DBCS text in lexers improved with methods ForwardBytes and\r\n\tGetRelativeCharacter added to StyleContext.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1483/\">Bug #1483</a>.\r\n\t</li>\r\n\t<li>\r\n\tFor Unicode text, case-insensitive searching and making text upper or lower case is now\r\n\tcompliant with Unicode standards on all platforms and is much faster for non-ASCII characters.\r\n\t</li>\r\n\t<li>\r\n\tA CategoriseCharacter function was added to return the Unicode general category of a character\r\n\twhich can be useful in lexers.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, the LCD Optimized font quality level turns font smoothing on.\r\n\t</li>\r\n\t<li>\r\n\tSciTE 'immediate' subsystem added to allow scripts that work while tools are executed.\r\n\t</li>\r\n\t<li>\r\n\tFont quality exposed in SciTE as font.quality setting.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, message:... methods simplify direct access to Scintilla and avoid call layers..\r\n\t</li>\r\n\t<li>\r\n\tA68K lexer updated.\r\n\t</li>\r\n\t<li>\r\n\tCoffeeScript lexer fixes a bug with comment blocks.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1495/\">Bug #1495</a>\r\n\t</li>\r\n\t<li>\r\n\tECL lexer regular expression code fixed.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1491/\">Bug #1491</a>.\r\n\t</li>\r\n\t<li>\r\n\terrorlist lexer only recognizes Perl diagnostics when there is a filename between\r\n\t\"at\" and \"line\". Had been triggering for MSVC errors containing \"at line\".\r\n\t</li>\r\n\t<li>\r\n\tHaskell lexer fixed to avoid unnecessary full redraws.\r\n\tDon't highlight CPP inside comments when styling.within.preprocessor is on.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1459/\">Bug #1459</a>.\r\n\t</li>\r\n\t<li>\r\n\tLua lexer fixes bug in labels with UTF-8 text.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1483/\">Bug #1483</a>.\r\n\t</li>\r\n\t<li>\r\n\tPerl lexer fixes bug in string interpolation with UTF-8 text.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1483/\">Bug #1483</a>.\r\n\t</li>\r\n\t<li>\r\n\tFixed bugs with case conversion when the result was longer or shorter than the original text.\r\n\tCould access past end of string potentially crashing.\r\n\tSelection now updated to result length.\r\n\t</li>\r\n\t<li>\r\n\tFixed bug where data being inserted and removed was not being reported in\r\n\tnotification messages. Bug was introduced in 3.3.2.\r\n\t</li>\r\n\t<li>\r\n\tWord wrap bug fixed where the last line could be shown twice.\r\n\t</li>\r\n\t<li>\r\n\tWord wrap bug fixed for lines wrapping too short on Windows and GTK+.\r\n\t</li>\r\n\t<li>\r\n\tWord wrap performance improved.\r\n\t</li>\r\n\t<li>\r\n\tMinor memory leak fixed.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1487/\">Bug #1487</a>.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, fixed insertText: method which was broken when implementing a newer protocol.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, fixed a crash when performing string folding for bytes that do not represent a character\r\n\tin the current encoding.\r\n\t</li>\r\n\t<li>\r\n\tOn Qt, fixed layout problem when QApplication construction delayed.\r\n\t</li>\r\n\t<li>\r\n\tOn Qt, find_text reports failure with -1 as first element of return value.\r\n\t</li>\r\n\t<li>\r\n\tFixed SciTE on GTK+ bug where a tool command could be performed using the keyboard while one was\r\n\talready running leading to confusion and crashes.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1486/\">Bug #1486</a>.\r\n\t</li>\r\n\t<li>\r\n\tFixed SciTE bug in Copy as RTF which was limited to first 32 styles.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1011/\">Bug #1011</a>.\r\n\t</li>\r\n\t<li>\r\n\tFixed SciTE on Windows user strip height when the system text scaling factor is 125% or 150%.\r\n\t</li>\r\n\t<li>\r\n\tCompile time checks for Digital Mars C++ removed.\r\n\t</li>\r\n\t<li>\r\n\tVisual C++ 2013 supported.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1492/\">Bug #1492</a>.\r\n\t</li>\r\n\t<li>\r\n\tPython scripts used for building and maintenance improved and moved into scripts directory.\r\n\t</li>\r\n\t<li>\r\n\tTesting scripts now work on Linux using Qt and PySide.\r\n\t</li>\r\n\t<li>\r\n\tTk platform defined.\r\n\tImplementation for Tk will be available separately from main Scintilla distribution.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite333.zip?download\">Release 3.3.3</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 2 June 2013.\r\n\t</li>\r\n\t<li>\r\n\tLexer and folder added for Structured Text language.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/959/\">Feature #959.</a>\r\n\t</li>\r\n\t<li>\r\n\tOut of bounds access fixed for GTK+.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1480/\">Bug #1480</a>.\r\n\t</li>\r\n\t<li>\r\n\tCrash fixed for GTK+ on Windows paste.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed with incorrect event copying on GTK+ 3.x.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1481/\">Bug #1481</a>.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed with right to left locales, like Hebrew, on GTK+.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1477/\">Bug #1477</a>.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed with undo grouping of tab and backtab commands.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1478/\">Bug #1478</a>.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite332.zip?download\">Release 3.3.2</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 22 May 2013.\r\n\t</li>\r\n\t<li>\r\n\tBasic implementations of common folding methods added to Scintilla to make it\r\n\teasier for containers to implement folding.\r\n\t</li>\r\n\t<li>\r\n\tAdd indicator INDIC_COMPOSITIONTHICK, a thick low underline, to mimic an\r\n\tappearance used for Asian language input composition.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, implement font quality setting.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/988/\">Feature #988.</a>\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, implement automatic enabling of commands and added clear command.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/987/\">Feature #987.</a>\r\n\t</li>\r\n\t<li>\r\n\tC++ lexer adds style for preprocessor doc comment.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/990/\">Feature #990.</a>\r\n\t</li>\r\n\t<li>\r\n\tHaskell lexer and folder improved. Separate mode for literate Haskell \"literatehaskell\" SCLEX_LITERATEHASKELL.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1459/\">Bug #1459 </a>.\r\n\t</li>\r\n\t<li>\r\n\tLaTeX lexer bug fixed for Unicode character following '\\'.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1468/\">Bug #1468 </a>.\r\n\t</li>\r\n\t<li>\r\n\tPowerShell lexer recognizes here strings and doccomment keywords.\r\n\t#region folding added.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/985/\">Feature #985.</a>\r\n\t</li>\r\n\t<li>\r\n\tFix multi-typing when two carets are located in virtual space on one line so that spaces\r\n\tare preserved.\r\n\t</li>\r\n\t<li>\r\n\tFixes to input composition on Cocoa and implementation of accented character input through\r\n\tpress and hold. Set selection correctly so that changes to pieces of composition text are easier to perform.\r\n\tRestore undo collection after a sequence of composition actions.\r\n\tComposition popups appear near input.\r\n\t</li>\r\n\t<li>\r\n\tFix lexer problem where no line end was seen at end of document.\r\n\t</li>\r\n\t<li>\r\n\tFix crash on Cocoa when view deallocated.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1466/\">Bug #1466</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix Qt window positioning to not assume the top right of a monitor is at 0, 0.\r\n\t</li>\r\n\t<li>\r\n\tFix Qt to not track mouse when widget is hidden.\r\n\t</li>\r\n\t<li>\r\n\tQt now supports Qt 5.0.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1448/\">Bug #1448</a>.\r\n\t</li>\r\n\t<li>\r\n\tFix drawing on Windows with Direct2D when returning from lock screen.\r\n\tThe render target had to be recreated and an area would be black since the drawing was not retried.\r\n\t</li>\r\n\t<li>\r\n\tFix display of DBCS documents on Windows Direct2D/DirectWrite with default character set.\r\n\t</li>\r\n\t<li>\r\n\tFor SciTE on Windows, fixed most-recently-used menu when files opened through check.if.already.opened.\r\n\t</li>\r\n\t<li>\r\n\tIn SciTE, do not call OnSave twice when files saved asynchronously.\r\n\t</li>\r\n\t<li>\r\n\tScintilla no longer builds with Visual C++ 6.0.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite331.zip?download\">Release 3.3.1</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 11 April 2013.\r\n\t</li>\r\n\t<li>\r\n\tAutocompletion lists can now appear in priority order or be sorted by Scintilla.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/981/\">Feature #981.</a>\r\n\t</li>\r\n\t<li>\r\n\tMost lexers now lex an extra NUL byte at the end of the\r\n\tdocument which makes it more likely they will classify keywords at document end correctly.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/574/\">Bug #574</a>,\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/588/\">Bug #588.</a>\r\n\t</li>\r\n\t<li>\r\n\tHaskell lexer improved in several ways.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1459/\">Bug #1459.</a>\r\n\t</li>\r\n\t<li>\r\n\tMatlab/Octave lexer recognizes block comments and ... comments.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1414/\">Bug #1414.</a>\r\n\t</li>\r\n\t<li>\r\n\tRuby lexer crash fixed with keyword at start of document.\r\n\t</li>\r\n\t<li>\r\n\tThe PLAT_NCURSES platform now called PLAT_CURSES as may work on other implementations.\r\n\t</li>\r\n\t<li>\r\n\tBug on Cocoa fixed where input composition with multiple selection or virtual space selection\r\n\tcould make undo stop working.\r\n\t</li>\r\n\t<li>\r\n\tDirect2D/DirectWrite mode on Windows now displays documents in non-Latin1 8-bit encodings correctly.\r\n\t</li>\r\n\t<li>\r\n\tCharacter positioning corrected in Direct2D/DirectWrite mode on Windows to avoid text moving and cutting off\r\n\tlower parts of characters.\r\n\t</li>\r\n\t<li>\r\n\tPosition of calltip and autocompletion lists fixed on Cocoa.\r\n\t</li>\r\n\t<li>\r\n\tWhile regular expression search in DBCS text is still not working, matching partial characters is now avoided\r\n\tby moving end of match to end of character.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite330.zip?download\">Release 3.3.0</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 30 March 2013.\r\n\t</li>\r\n\t<li>\r\n\tOverlay scrollers and kinetic scrolling implemented on Cocoa.\r\n\t</li>\r\n\t<li>\r\n\tTo improve display smoothness, styling and UI Update notifications will, when possible, be performed in\r\n\ta high-priority idle task on Cocoa instead of during painting.\r\n\tPerforming these jobs inside painting can cause paints to be abandoned and a new paint scheduled.\r\n\tOn GTK+, the high-priority idle task is used in more cases.\r\n\t</li>\r\n\t<li>\r\n\tSCI_SCROLLRANGE added to scroll the view to display a range of text.\r\n\tIf the whole range can not be displayed, priority is given to one end.\r\n\t</li>\r\n\t<li>\r\n\tC++ lexer no longer recognizes raw (R\"\") strings when the first character after \"\r\n\tis invalid.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1454/\">Bug #1454.</a>\r\n\t</li>\r\n\t<li>\r\n\tHTML lexer recognizes JavaScript RegEx literals in more contexts.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1412/\">Bug #1412.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed automatic display of folded text when return pressed at end of fold header and\r\n\tfirst folded line was blank.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1455/\">Bug #1455.</a>\r\n\t</li>\r\n\t<li>\r\n\tSCI_VISIBLEFROMDOCLINE fixed to never return a line beyond the document end.\r\n\t</li>\r\n\t<li>\r\n\tSCI_LINESCROLL fixed for a negative column offset.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1450/\">Bug #1450.</a>\r\n\t</li>\r\n\t<li>\r\n\tOn GTK+, fix tab markers so visible if indent markers are visible.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1453/\">Bug #1453.</a>\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite325.zip?download\">Release 3.2.5</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 26 February 2013.\r\n\t</li>\r\n\t<li>\r\n\tTo allow cooperation between different uses of extended (beyond 255) styles they should be allocated\r\n\tusing SCI_ALLOCATEEXTENDEDSTYLES.\r\n\t</li>\r\n\t<li>\r\n\tFor Unicode documents, lexers that use StyleContext will retrieve whole characters\r\n\tinstead of bytes.\r\n\tLexAccessor provides a LineEnd method which can be a more efficient way to\r\n\thandle line ends and can enable Unicode line ends.\r\n\t</li>\r\n\t<li>\r\n\tThe C++ lexer understands the #undef directive when determining preprocessor definitions.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/978/\">Feature #978.</a>\r\n\t</li>\r\n\t<li>\r\n\tThe errorlist lexer recognizes gcc include path diagnostics that appear before an error.\r\n\t</li>\r\n\t<li>\r\n\tFolding implemented for GetText (PO)  translation language.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1437/\">Bug #1437.</a>\r\n\t</li>\r\n\t<li>\r\n\tHTML lexer does not interrupt comment style for processing instructions.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1447/\">Bug #1447.</a>\r\n\t</li>\r\n\t<li>\r\n\tFix SciTE forgetting caret x-position when switching documents.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1442/\">Bug #1442.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed bug where vertical scrollbar thumb appeared at beginning of document when\r\n\tscrollbar shown.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1446/\">Bug #1446.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed brace-highlighting bug on OS X 10.8 where matching brace is on a different line.\r\n\t</li>\r\n\t<li>\r\n\t<a href=\"ScintillaDoc.html#ProvisionalMessages\">Provisional features</a>\r\n\tare new features that may change or be removed if they cause problems but should become\r\n\tpermanent if they work well.\r\n\tFor this release <a href=\"ScintillaDoc.html#SCI_GETLINEENDTYPESSUPPORTED\">Unicode line ends</a> and\r\n\t<a href=\"ScintillaDoc.html#Substyles\">substyles</a>\r\n\tare provisional features.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite324.zip?download\">Release 3.2.4</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 17 January 2013.\r\n\t</li>\r\n\t<li>\r\n\tCaret line highlight can optionally remain visible when window does not have focus.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/964/\">Feature #964.</a>\r\n\t</li>\r\n\t<li>\r\n\tDelegate mechanism for notifications added on Cocoa.\r\n\t</li>\r\n\t<li>\r\n\tNUL characters in selection are copied to clipboard as spaces to avoid truncating\r\n\tat the NUL.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1289/\">Bug #1289.</a>\r\n\t</li>\r\n\t<li>\r\n\tC++ lexer fixes problem with showing inactive sections when preprocessor lines contain trailing comment.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1413/\">Bug #1413.</a>\r\n\t</li>\r\n\t<li>\r\n\tC++ lexer fixes problem with JavaScript regular expressions with '/' in character ranges.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1415/\">Bug #1415.</a>\r\n\t</li>\r\n\t<li>\r\n\tLaTeX folder added.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/970/\">Feature #970.</a>\r\n\t</li>\r\n\t<li>\r\n\tLaTeX lexer improves styling of math environments.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/feature-requests/970/\">Feature #970.</a>\r\n\t</li>\r\n\t<li>\r\n\tMySQL lexer implements hidden commands.\r\n\t</li>\r\n\t<li>\r\n\tOnly produce a single undo step when autocompleting a single word.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1421/\">Bug #1421.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed crash when printing lines longer than 8000 characters.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1430/\">Bug #1430.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed problem in character movement extends selection mode where reversing\r\n\tdirection collapsed the selection.\r\n\t</li>\r\n\t<li>\r\n\tMemory issues fixed on Cocoa, involving object ownership,\r\n\tlifetime of timers, and images held by the info bar.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1436/\">Bug #1436.</a>\r\n\t</li>\r\n\t<li>\r\n\tCocoa key binding for Alt+Delete changed to delete previous word to be more compatible with\r\n\tplatform standards.\r\n\t</li>\r\n\t<li>\r\n\tFixed crash on Cocoa with scrollbar when there is no scrolling possible.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1416/\">Bug #1416.</a>\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa with retina display fixed positioning of autocompletion lists.\r\n\t</li>\r\n\t<li>\r\n\tFixed SciTE on Windows failure to run a batch file with a name containing a space by\r\n\tquoting the path in the properties file.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1423/\">Bug #1423.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed scaling bug when printing on GTK+.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1427/\">Bug #1427.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK toolbar.detachable feature removed.\r\n\t</li>\r\n\t<li>\r\n\tFixed some background saving bugs in SciTE.\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1366/\">Bug #1366.</a>\r\n\t<a href=\"https://sourceforge.net/p/scintilla/bugs/1339/\">Bug #1339.</a>\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite323.zip?download\">Release 3.2.3</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 21 October 2012.\r\n\t</li>\r\n\t<li>\r\n\tImprove speed when performing multiple searches.\r\n\t</li>\r\n\t<li>\r\n\tSciTE adds definition of PLAT_UNIX for both PLAT_GTK and PLAT_MAC to allow consolidation of\r\n\tsettings valid on all Unix variants.\r\n\t</li>\r\n\t<li>\r\n\tSignal autoCompleteCancelled added on Qt.\r\n\t</li>\r\n\t<li>\r\n\tBash lexer supports nested delimiter pairs.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3569352&group_id=2439\">Feature #3569352.</a>\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=1515556&group_id=2439\">Bug #1515556.</a>\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3008483&group_id=2439\">Bug #3008483.</a>\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3512208&group_id=2439\">Bug #3512208.</a>\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3515392&group_id=2439\">Bug #3515392.</a>\r\n\t</li>\r\n\t<li>\r\n\tFor C/C++, recognize exponent in floating point hexadecimal literals.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3576454&group_id=2439\">Bug #3576454.</a>\r\n\t</li>\r\n\t<li>\r\n\tFor C #include statements, do not treat // in the path as a comment.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3519260&group_id=2439\">Bug #3519260.</a>\r\n\t</li>\r\n\t<li>\r\n\tLexer for GetText translations (PO) improved with additional styles and single instance limitation fixed.\r\n\t</li>\r\n\t<li>\r\n\tRuby for loop folding fixed.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3240902&group_id=2439\">Bug #3240902.</a>\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3567391&group_id=2439\">Bug #3567391.</a>\r\n\t</li>\r\n\t<li>\r\n\tRuby recognition of here-doc after class or instance variable fixed.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3567809&group_id=2439\">Bug #3567809.</a>\r\n\t</li>\r\n\t<li>\r\n\tSQL folding of loop and case fixed.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3567905&group_id=2439\">Bug #3567905.</a>\r\n\t</li>\r\n\t<li>\r\n\tSQL folding of case with assignment fixed.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3571820&group_id=2439\">Bug #3571820.</a>\r\n\t</li>\r\n\t<li>\r\n\tFix hang when removing all characters from indicator at end of document.\r\n\t</li>\r\n\t<li>\r\n\tFix failure of \\xhh in regular expression search for values greater than 0x79.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa on OS X 10.8, fix inverted drawing of find indicator.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, fix double drawing when horizontal scroll range small and user swipes horizontally.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, remove incorrect setting of save point when reading information through 'string' and 'selectedString'.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, fix incorrect memory management of infoBar.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK+ 3 Ubuntu, fix crash when drawing margin.\r\n\t</li>\r\n\t<li>\r\n\tOn ncurses, fix excessive spacing with italics line end.\r\n\t</li>\r\n\t<li>\r\n\tOn Windows, search for D2D1.DLL and DWRITE.DLL in system directory to avoid loading from earlier\r\n\tin path where could be planted by malware.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite322.zip?download\">Release 3.2.2</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 31 August 2012.\r\n\t</li>\r\n\t<li>\r\n\tRetina display support for Cocoa. Text size fixed.\r\n\tScale factor for images implemented so they can be displayed in high definition.\r\n\t</li>\r\n\t<li>\r\n\tImplement INDIC_SQUIGGLEPIXMAP as a faster version of INDIC_SQUIGGLE.\r\n\tAvoid poor drawing at right of INDIC_SQUIGGLE.\r\n\tAlign INDIC_DOTBOX to pixel grid for full intensity.\r\n\t</li>\r\n\t<li>\r\n\tImplement SCI_GETSELECTIONEMPTY API.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3543121&group_id=2439\">Bug #3543121.</a>\r\n\t</li>\r\n\t<li>\r\n\tAdded SCI_VCHOMEDISPLAY and SCI_VCHOMEDISPLAYEXTEND key commands.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3561433&group_id=2439\">Feature #3561433.</a>\r\n\t</li>\r\n\t<li>\r\n\tAllow specifying SciTE Find in Files directory with find.in.directory property.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3558594&group_id=2439\">Feature #3558594.</a>\r\n\t</li>\r\n\t<li>\r\n\tOverride SciTE global strip.trailing.spaces with strip.trailing.spaces by pattern files.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3556320&group_id=2439\">Feature #3556320.</a>\r\n\t</li>\r\n\t<li>\r\n\tFix long XML script tag handling in XML lexer.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3534190&group_id=2439\">Bug #3534190.</a>\r\n\t</li>\r\n\t<li>\r\n\tFix rectangular selection range after backspace.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3543097&group_id=2439\">Bug #3543097.</a>\r\n\t</li>\r\n\t<li>\r\n\tSend SCN_UPDATEUI with SC_UPDATE_SELECTION for backspace in virtual space.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3543121&group_id=2439\">Bug #3543121.</a>\r\n\t</li>\r\n\t<li>\r\n\tAvoid problems when calltip highlight range is negative.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3545938&group_id=2439\">Bug #3545938.</a>\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, fix image drawing code so that image is not accessed after being freed\r\n\tand is drawn in the correct location.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, limit horizontal touch scrolling to existing established width.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, decrease sensitivity of pinch-zoom.\r\n\t</li>\r\n\t<li>\r\n\tFix Cocoa drawing where style changes were not immediately visible.\r\n\t</li>\r\n\t<li>\r\n\tFix Cocoa memory leak due to reference cycle.\r\n\t</li>\r\n\t<li>\r\n\tFix Cocoa bug where notifications were sent after Scintilla was freed.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on OS X user shortcuts treats \"Ctrl+D\" as equivalent to \"Ctrl+d\".\r\n\t</li>\r\n\t<li>\r\n\tOn Windows, saving SciTE's Lua startup script causes it to run.\r\n\t</li>\r\n\t<li>\r\n\tLimit time allowed to highlight current word in SciTE to 0.25 seconds to remain responsive.\r\n\t</li>\r\n\t<li>\r\n\tFixed SciTE read-only mode to stick with buffer.\r\n\t</li>\r\n\t<li>\r\n\tFor SciTE on Windows, enable Ctrl+Z, Ctrl+X, and Ctrl+C (Undo, Cut, and Copy) in the\r\n\teditable fields of find and replace strips\r\n\t</li>\r\n\t<li>\r\n\tRemove limit on logical line length in SciTE .properties files.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3544312&group_id=2439\">Bug #3544312.</a>\r\n\t</li>\r\n\t<li>\r\n\tImprove performance of SciTE Save As command.\r\n\t</li>\r\n\t<li>\r\n\tFix SciTE crash with empty .properties files. Bug #3545938.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3555308&group_id=2439\">Bug #3555308.</a>\r\n\t</li>\r\n\t<li>\r\n\tFix repeated letter in SciTE calltips.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3545938&group_id=2439\">Bug #3545938.</a>\r\n\t</li>\r\n\t<li>\r\n\tRefine build time checking for Direct2D and DirectWrite.\r\n\t</li>\r\n\t<li>\r\n\tAvoid potential build problems on Windows with MultiMon.h by explicitly checking for multi-monitor APIs.\r\n\t</li>\r\n\t<li>\r\n\tAutomatically disable themed drawing in SciTE when building on Windows 2000.\r\n\tReenable building for Windows NT 4 on NT 4 .\r\n\t</li>\r\n\t<li>\r\n\tAdded ncurses platform definitions. Implementation is maintained separately as\r\n\t<a href=\"https://orbitalquark.github.io/scinterm\">Scinterm</a>.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite321.zip?download\">Release 3.2.1</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 14 July 2012.\r\n\t</li>\r\n\t<li>\r\n\tIn Scintilla.iface, specify features as properties instead of functions where possible and fix some enumerations.\r\n\t</li>\r\n\t<li>\r\n\tIn SciTE Lua scripts, string properties in Scintilla API can be retrieved as well as set using property notation.\r\n\t</li>\r\n\t<li>\r\n\tAdded character class APIs: SCI_SETPUNCTUATIONCHARS, SCI_GETWORDCHARS, SCI_GETWHITESPACECHARS,\r\n\tand SCI_GETPUNCTUATIONCHARS.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3529805&group_id=2439\">Feature #3529805.</a>\r\n\t</li>\r\n\t<li>\r\n\tLess/Hss support added to CSS lexer.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3532413&group_id=2439\">Feature #3532413.</a>\r\n\t</li>\r\n\t<li>\r\n\tC++ lexer style SCE_C_PREPROCESSORCOMMENT added for stream comments in preprocessor.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3487406&group_id=2439\">Bug #3487406.</a>\r\n\t</li>\r\n\t<li>\r\n\tFix incorrect styling of inactive code in C++ lexer.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3533036&group_id=2439\">Bug #3533036.</a>\r\n\t</li>\r\n\t<li>\r\n\tFix incorrect styling by C++ lexer after empty lines in preprocessor style.\r\n\t</li>\r\n\t<li>\r\n\tC++ lexer option \"lexer.cpp.allow.dollars\" fixed so can be turned off after being on.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3541461&group_id=2439\">Bug #3541461.</a>\r\n\t</li>\r\n\t<li>\r\n\tFortran fixed format lexer fixed to style comments from column 73.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3540486&group_id=2439\">Bug #3540486.</a>\r\n\t</li>\r\n\t<li>\r\n\tFortran folder folds CRITICAL .. END CRITICAL.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3540486&group_id=2439\">Bug #3540486.</a>\r\n\t</li>\r\n\t<li>\r\n\tFortran lexer fixes styling after comment line ending with '&amp;'.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3087226&group_id=2439\">Bug #3087226.</a>\r\n\t</li>\r\n\t<li>\r\n\tFortran lexer styles preprocessor lines so they do not trigger incorrect folding.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2906275&group_id=2439\">Bug #2906275.</a>\r\n\t</li>\r\n\t<li>\r\n\tFortran folder fixes folding of nested ifs.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2809176&group_id=2439\">Bug #2809176.</a>\r\n\t</li>\r\n\t<li>\r\n\tHTML folder fixes folding of CDATA when fold.html.preprocessor=0.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3540491&group_id=2439\">Bug #3540491.</a>\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, fix autocompletion font lifetime issue and row height computation.\r\n\t</li>\r\n\t<li>\r\n\tIn 'choose single' mode, autocompletion will close an existing list if asked to display a single entry list.\r\n\t</li>\r\n\t<li>\r\n\tFixed SCI_MARKERDELETE to only delete one marker per call.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3535806&group_id=2439\">Bug #3535806.</a>\r\n\t</li>\r\n\t<li>\r\n\tProperly position caret after undoing coalesced delete operations.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3523326&group_id=2439\">Bug #3523326.</a>\r\n\t</li>\r\n\t<li>\r\n\tEnsure margin is redrawn when SCI_MARGINSETSTYLE called.\r\n\t</li>\r\n\t<li>\r\n\tFix clicks in first pixel of margins to send SCN_MARGINCLICK.\r\n\t</li>\r\n\t<li>\r\n\tFix infinite loop when drawing block caret for a zero width space character at document start.\r\n\t</li>\r\n\t<li>\r\n\tCrash fixed for deleting negative range.\r\n\t</li>\r\n\t<li>\r\n\tFor characters that overlap the beginning of their space such as italics descenders and bold serifs, allow start\r\n\tof text to draw 1 pixel into margin.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=699587&group_id=2439\">Bug #699587.</a>\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3537799&group_id=2439\">Bug #3537799.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed problems compiling Scintilla for Qt with GCC 4.7.1 x64.\r\n\t</li>\r\n\t<li>\r\n\tFixed problem with determining GTK+ sub-platform caused when adding Qt support in 3.2.0.\r\n\t</li>\r\n\t<li>\r\n\tFix incorrect measurement of untitled file in SciTE on Linux leading to message \"File ...' is 2147483647 bytes long\".\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3537764&group_id=2439\">Bug #3537764.</a>\r\n\t</li>\r\n\t<li>\r\n\tIn SciTE, fix open of selected filename with line number to go to that line.\r\n\t</li>\r\n\t<li>\r\n\tFix problem with last visible buffer closing in SciTE causing invisible buffers to be active.\r\n\t</li>\r\n\t<li>\r\n\tAvoid blinking of SciTE's current word highlight when output pane changes.\r\n\t</li>\r\n\t<li>\r\n\tSciTE properties files can be longer than 60K.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite320.zip?download\">Release 3.2.0</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 1 June 2012.\r\n\t</li>\r\n\t<li>\r\n\tPlatform layer added for the Qt open-source cross-platform application and user interface framework\r\n\tfor development in C++ or in Python with the PySide bindings for Qt.\r\n\t</li>\r\n\t<li>\r\n\tDirect access provided to the document bytes for ranges within Scintilla.\r\n\tThis is similar to the existing SCI_GETCHARACTERPOINTER API but allows for better performance.\r\n\t</li>\r\n\t<li>\r\n\tCtrl+Double Click and Ctrl+Triple Click add the word or line to the set of selections.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3520037&group_id=2439\">Feature #3520037.</a>\r\n\t</li>\r\n\t<li>\r\n\tA SCI_DELETERANGE API was added for deleting a range of text.\r\n\t</li>\r\n\t<li>\r\n\tLine wrap markers may now be drawn in the line number margin.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3518198&group_id=2439\">Feature #3518198.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE on OS X adds option to hide hidden files in the open dialog box.\r\n\t</li>\r\n\t<li>\r\n\tLexer added for OScript language.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3523197&group_id=2439\">Feature #3523197.</a>\r\n\t</li>\r\n\t<li>\r\n\tLexer added for Visual Prolog language.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3523018&group_id=2439\">Feature #3523018.</a>\r\n\t</li>\r\n\t<li>\r\n\tUTF-8 validity is checked more stringently and consistently. All 66 non-characters are now treated as invalid.\r\n\t</li>\r\n\t<li>\r\n\tHTML lexer bug fixed with inconsistent highlighting for PHP when attribute on separate line from tag.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3520027&group_id=2439\">Bug #3520027.</a>\r\n\t</li>\r\n\t<li>\r\n\tHTML lexer bug fixed for JavaScript block comments.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3520032&group_id=2439\">Bug #3520032.</a>\r\n\t</li>\r\n\t<li>\r\n\tAnnotation drawing bug fixed when box displayed with different colours on different lines.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3519872&group_id=2439\">Bug #3519872.</a>\r\n\t</li>\r\n\t<li>\r\n\tOn Windows with Direct2D, fix drawing with 125% and 150% DPI system settings.\r\n\t</li>\r\n\t<li>\r\n\tVirtual space selection bug fixed for rectangular selections.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3519246&group_id=2439\">Bug #3519246.</a>\r\n\t</li>\r\n\t<li>\r\n\tReplacing multiple selection with newline changed to only affect main selection.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3522251&group_id=2439\">Bug #3522251.</a>\r\n\t</li>\r\n\t<li>\r\n\tReplacing selection with newline changed to group deletion and insertion as a single undo action.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3522250&group_id=2439\">Bug #3522250.</a>\r\n\t</li>\r\n\t<li>\r\n\tAuto-completion lists on GTK+ 3 set height correctly instead of showing too few lines.\r\n\t</li>\r\n\t<li>\r\n\tMouse wheel scrolling changed to avoid GTK+ bug in recent distributions.\r\n\t</li>\r\n\t<li>\r\n\tIME bug on Windows fixed for horizontal jump.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3529728&group_id=2439\">Bug #3529728.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE case-insensitive autocompletion filters equal identifiers better.\r\n\tCalltip arrows work with bare word identifiers.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3517810&group_id=2439\">Bug #3517810.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE bug fixed where shbang lines not setting file type when switching\r\n\tto file loaded in background.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ shows open and save dialogs with the directory of the current file displayed.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite310.zip?download\">Release 3.1.0</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 20 April 2012.\r\n\t</li>\r\n\t<li>\r\n\tAnimated find indicator added on Cocoa.\r\n\t</li>\r\n\t<li>\r\n\tButtons can be made default in SciTE user strips.\r\n\t</li>\r\n\t<li>\r\n\tSciTE allows find and replace histories to be saved in session.\r\n\t</li>\r\n\t<li>\r\n\tOption added to allow case-insensitive selection in auto-completion lists.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3516538&group_id=2439\">Bug #3516538.</a>\r\n\t</li>\r\n\t<li>\r\n\tReplace \\0 by complete found text in regular expressions.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3510979&group_id=2439\">Feature #3510979.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed single quoted strings in bash lexer.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3512208&group_id=2439\">Bug #3512208.</a>\r\n\t</li>\r\n\t<li>\r\n\tIncorrect highlighting fixed in C++ lexer for continued lines.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3509317&group_id=2439\">Bug #3509317.</a>\r\n\t</li>\r\n\t<li>\r\n\tHang fixed in diff lexer.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3508602&group_id=2439\">Bug #3508602.</a>\r\n\t</li>\r\n\t<li>\r\n\tFolding improved for SQL CASE/MERGE statement.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3503277&group_id=2439\">Bug #3503277.</a>\r\n\t</li>\r\n\t<li>\r\n\tFix extra drawing of selection inside word wrap indentation.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3515555&group_id=2439\">Bug #3515555.</a>\r\n\t</li>\r\n\t<li>\r\n\tFix problem with determining the last line that needs styling when drawing.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3514882&group_id=2439\">Bug #3514882.</a>\r\n\t</li>\r\n\t<li>\r\n\tFix problems with drawing in margins.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3514882&group_id=2439\">Bug #3514882.</a>\r\n\t</li>\r\n\t<li>\r\n\tFix printing crash when using Direct2D to display on-screen.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3513946&group_id=2439\">Bug #3513946.</a>\r\n\t</li>\r\n\t<li>\r\n\tFix SciTE bug where background.*.size disabled restoration of bookmarks and positions from session.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3514885&group_id=2439\">Bug #3514885.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed the Move Selected Lines command when last line does not end with a line end character.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3511023&group_id=2439\">Bug #3511023.</a>\r\n\t</li>\r\n\t<li>\r\n\tFix word wrap indentation printing to use printer settings instead of screen settings.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3512961&group_id=2439\">Bug #3512961.</a>\r\n\t</li>\r\n\t<li>\r\n\tFix SciTE bug where executing an empty command prevented executing further commands\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3512976&group_id=2439\">Bug #3512976.</a>\r\n\t</li>\r\n\t<li>\r\n\tFix SciTE bugs with focus in user strips and made strips more robust with invalid definitions.\r\n\t</li>\r\n\t<li>\r\n\tSuppress SciTE regular expression option when searching with find next selection.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3510985&group_id=2439\">Bug #3510985.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE Find in Files command matches empty pattern to all files.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3495918&group_id=2439\">Feature #3495918.</a>\r\n\t</li>\r\n\t<li>\r\n\tFix scroll with mouse wheel on GTK+.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3501321&group_id=2439\">Bug #3501321.</a>\r\n\t</li>\r\n\t<li>\r\n\tFix column finding method so that tab is counted correctly.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3483713&group_id=2439\">Bug #3483713.</a>\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite304.zip?download\">Release 3.0.4</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 8 March 2012.\r\n\t</li>\r\n\t<li>\r\n\tSciTE scripts can create user interfaces as strips.\r\n\t</li>\r\n\t<li>\r\n\tSciTE can save files automatically in the background.\r\n\t</li>\r\n\t<li>\r\n\tPinch zoom implemented on Cocoa.\r\n\t</li>\r\n\t<li>\r\n\tECL lexer added.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3488209&group_id=2439\">Feature #3488209.</a>\r\n\t</li>\r\n\t<li>\r\n\tCPP lexer fixes styling after document comment keywords.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3495445&group_id=2439\">Bug #3495445.</a>\r\n\t</li>\r\n\t<li>\r\n\tPascal folder improves handling of some constructs.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3486385&group_id=2439\">Feature #3486385.</a>\r\n\t</li>\r\n\t<li>\r\n\tXML lexer avoids entering a bad mode due to complex preprocessor instructions.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3488060&group_id=2439\">Bug #3488060.</a>\r\n\t</li>\r\n\t<li>\r\n\tDuplicate command is always remembered as a distinct command for undo.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3495836&group_id=2439\">Bug #3495836.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE xml.auto.close.tags no longer closes with PHP code similar to &lt;a $this-&gt;\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3488067&group_id=2439\">Bug #3488067.</a>\r\n\t</li>\r\n\t<li>\r\n\tFix bug where setting an indicator for the whole document would fail.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3487440&group_id=2439\">Bug #3487440.</a>\r\n\t</li>\r\n\t<li>\r\n\tCrash fixed for SCI_MOVESELECTEDLINESDOWN with empty vertical selection.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3496403&group_id=2439\">Bug #3496403.</a>\r\n\t</li>\r\n\t<li>\r\n\tDifferences between buffered and unbuffered mode on Direct2D eliminated.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3495791&group_id=2439\">Bug #3495791.</a>\r\n\t</li>\r\n\t<li>\r\n\tFont leading implemented for Direct2D to improve display of character blobs.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3494744&group_id=2439\">Bug #3494744.</a>\r\n\t</li>\r\n\t<li>\r\n\tFractional widths used for line numbers, character markers and other situations.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3494492&group_id=2439\">Bug #3494492.</a>\r\n\t</li>\r\n\t<li>\r\n\tTranslucent rectangles drawn using Direct2D with sharper corners.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3494492&group_id=2439\">Bug #3494492.</a>\r\n\t</li>\r\n\t<li>\r\n\tRGBA markers drawn sharper when centred using Direct2D.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3494202&group_id=2439\">Bug #3494202.</a>\r\n\t</li>\r\n\t<li>\r\n\tRGBA markers are drawn centred when taller than line.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3494184&group_id=2439\">Bug #3494184.</a>\r\n\t</li>\r\n\t<li>\r\n\tImage marker drawing problem fixed for markers taller than line.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3493503&group_id=2439\">Bug #3493503.</a>\r\n\t</li>\r\n\t<li>\r\n\tMarkers are drawn horizontally off-centre based on margin type instead of dimensions.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3488696&group_id=2439\">Bug #3488696.</a>\r\n\t</li>\r\n\t<li>\r\n\tFold tail markers drawn vertically centred.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3488289&group_id=2439\">Feature #3488289.</a>\r\n\t</li>\r\n\t<li>\r\n\tOn Windows, Scintilla is more responsive in wrap mode.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3487397&group_id=2439\">Bug #3487397.</a>\r\n\t</li>\r\n\t<li>\r\n\tUnimportant \"Gdk-CRITICAL\" messages are no longer displayed.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3488481&group_id=2439\">Bug #3488481.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows Find in Files sets focus to dialog when already created; allows opening dialog when a job is running.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3480635&group_id=2439\">Bug #3480635.</a>\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3486657&group_id=2439\">Bug #3486657.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed problems with multiple clicks in margin and with mouse actions combined with virtual space.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3484370&group_id=2439\">Bug #3484370.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed bug with using page up and down and not returning to original line.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3485669&group_id=2439\">Bug #3485669.</a>\r\n\t</li>\r\n\t<li>\r\n\tDown arrow with wrapped text no longer skips lines.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=1776560&group_id=2439\">Bug #1776560.</a>\r\n\t</li>\r\n\t<li>\r\n\tFix problem with dwell ending immediately due to word wrap.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3484416&group_id=2439\">Bug #3484416.</a>\r\n\t</li>\r\n\t<li>\r\n\tWrapped lines are rewrapped more consistently while resizing window.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3484179&group_id=2439\">Bug #3484179.</a>\r\n\t</li>\r\n\t<li>\r\n\tSelected line ends are highlighted more consistently.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3484330&group_id=2439\">Bug #3484330.</a>\r\n\t</li>\r\n\t<li>\r\n\tFix grey background on files that use shbang to choose language.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3482777&group_id=2439\">Bug #3482777.</a>\r\n\t</li>\r\n\t<li>\r\n\tFix failure messages from empty commands in SciTE.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3480645&group_id=2439\">Bug #3480645.</a>\r\n\t</li>\r\n\t<li>\r\n\tRedrawing reduced for some marker calls.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3493530&group_id=2439\">Feature #3493530.</a>\r\n\t</li>\r\n\t<li>\r\n\tMatch brace and select brace commands work in SciTE output pane.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3486598&group_id=2439\">Feature #3486598.</a>\r\n\t</li>\r\n\t<li>\r\n\tPerforming SciTE \"Show Calltip\" command when a calltip is already visible shows the next calltip.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3487017&group_id=2439\">Feature #3487017.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE allows saving file even when file unchanged.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3486654&group_id=2439\">Feature #3486654.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE allows optional use of character escapes in calltips.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3495239&group_id=2439\">Feature #3495239.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE can open file:// URLs with Ctrl+Shift+O.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3495389&group_id=2439\">Feature #3495389.</a>\r\n\t</li>\r\n\t<li>\r\n\tKey modifiers updated for GTK+ on OS X to match upstream changes.\r\n\t</li>\r\n\t<li>\r\n\tSciTE hang when marking all occurrences of regular expressions fixed.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite303.zip?download\">Release 3.0.3</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 28 January 2012.\r\n\t</li>\r\n\t<li>\r\n\tPrinting works on GTK+ version 2.x as well as 3.x.\r\n\t</li>\r\n\t<li>\r\n\tLexer added for the AviSynth language.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3475611&group_id=2439\">Feature #3475611.</a>\r\n\t</li>\r\n\t<li>\r\n\tLexer added for the Take Command / TCC scripting language.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3462462&group_id=2439\">Feature #3462462.</a>\r\n\t</li>\r\n\t<li>\r\n\tCSS lexer gains support for SCSS.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3268017&group_id=2439\">Feature #3268017.</a>\r\n\t</li>\r\n\t<li>\r\n\tCPP lexer fixes problems in the preprocessor structure caused by continuation lines.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3458508&group_id=2439\">Bug #3458508.</a>\r\n\t</li>\r\n\t<li>\r\n\tErrorlist lexer handles column numbers for GCC format diagnostics.\r\n\tIn SciTE, Next Message goes to column where this can be decoded from GCC format diagnostics.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3453075&group_id=2439\">Feature #3453075.</a>\r\n\t</li>\r\n\t<li>\r\n\tHTML folder fixes spurious folds on some tags.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3459262&group_id=2439\">Bug #3459262.</a>\r\n\t</li>\r\n\t<li>\r\n\tRuby lexer fixes bug where '=' at start of file caused whole file to appear as a comment.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3452488&group_id=2439\">Bug #3452488.</a>\r\n\t</li>\r\n\t<li>\r\n\tSQL folder folds blocks of single line comments.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3467425&group_id=2439\">Feature #3467425.</a>\r\n\t</li>\r\n\t<li>\r\n\tOn Windows using Direct2D, defer invalidation of render target until completion of painting to avoid failures.\r\n\t</li>\r\n\t<li>\r\n\tFurther support of fractional positioning. Spaces, tabs, and single character tokens can take fractional space\r\n\tand wrapped lines are positioned taking fractional positions into account.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3471998&group_id=2439\">Bug #3471998.</a>\r\n\t</li>\r\n\t<li>\r\n\tOn Windows using Direct2D, fix extra carets appearing.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3471998&group_id=2439\">Bug #3471998.</a>\r\n\t</li>\r\n\t<li>\r\n\tFor autocompletion lists Page Up and Down move by the list height instead of by 5 lines.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3455493&group_id=2439\">Bug #3455493.</a>\r\n\t</li>\r\n\t<li>\r\n\tFor SCI_LINESCROLLDOWN/UP don't select into virtual space.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3451681&group_id=2439\">Bug #3451681.</a>\r\n\t</li>\r\n\t<li>\r\n\tFix fold highlight not being fully drawn.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3469936&group_id=2439\">Bug #3469936.</a>\r\n\t</li>\r\n\t<li>\r\n\tFix selection margin appearing black when starting in wrap mode.\r\n\t</li>\r\n\t<li>\r\n\tFix crash when changing end of document after adding an annotation.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3476637&group_id=2439\">Bug #3476637.</a>\r\n\t</li>\r\n\t<li>\r\n\tFix problems with building to make RPMs.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3476149&group_id=2439\">Bug #3476149.</a>\r\n\t</li>\r\n\t<li>\r\n\tFix problem with building on GTK+ where recent distributions could not find gmodule.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3469056&group_id=2439\">Bug #3469056.</a>\r\n\t</li>\r\n\t<li>\r\n\tFix problem with installing SciTE on GTK+ due to icon definition in .desktop file including an extension.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3476117&group_id=2439\">Bug #3476117.</a>\r\n\t</li>\r\n\t<li>\r\n\tFix SciTE bug where new buffers inherited some properties from previously opened file.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3457060&group_id=2439\">Bug #3457060.</a>\r\n\t</li>\r\n\t<li>\r\n\tFix focus when closing tab in SciTE with middle click. Focus moves to edit pane instead of staying on tab bar.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3440142&group_id=2439\">Bug #3440142.</a>\r\n\t</li>\r\n\t<li>\r\n\tFor SciTE on Windows fix bug where Open Selected Filename for URL would append a file extension.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3459185&group_id=2439\">Feature #3459185.</a>\r\n\t</li>\r\n\t<li>\r\n\tFor SciTE on Windows fix key handling of control characters in Parameters dialog so normal editing (Ctrl+C, ...) works.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3459345&group_id=2439\">Bug #3459345.</a>\r\n\t</li>\r\n\t<li>\r\n\tFix SciTE bug where files became read-only after saving. Drop the \"*\" dirty marker after save completes.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3467432&group_id=2439\">Bug #3467432.</a>\r\n\t</li>\r\n\t<li>\r\n\tFor SciTE handling of diffs with \"+++\" and \"---\" lines, also handle case where not followed by tab.\r\n\tGo to correct line for diff \"+++\" message.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3467143&group_id=2439\">Bug #3467143.</a>\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3467178&group_id=2439\">Bug #3467178.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ now performs threaded actions even on GTK+ versions before 2.12.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite302.zip?download\">Release 3.0.2</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 9 December 2011.\r\n\t</li>\r\n\t<li>\r\n\tSciTE saves files in the background without blocking the user interface.\r\n\t</li>\r\n\t<li>\r\n\tPrinting implemented in SciTE on GTK+ 3.x.\r\n\t</li>\r\n\t<li>\r\n\tILoader interface for background loading finalized and documented.\r\n\t</li>\r\n\t<li>\r\n\tCoffeeScript lexer added.\r\n\t</li>\r\n\t<li>\r\n\tC++ lexer fixes crash with \"#if defined( XXX 1\".\r\n\t</li>\r\n\t<li>\r\n\tCrash with Direct2D on Windows fixed.\r\n\t</li>\r\n\t<li>\r\n\tBackspace removing protected range fixed.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3445911&group_id=2439\">Bug #3445911.</a>\r\n\t</li>\r\n\t<li>\r\n\tCursor setting failure on Windows when screen saver on fixed.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3438780&group_id=2439\">Bug #3438780.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ hang fixed with -open:file option.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3441980&group_id=2439\">Bug #3441980.</a>\r\n\t</li>\r\n\t<li>\r\n\tFailure to evaluate shbang fixed in SciTE.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3441801&group_id=2439\">Bug #3441801.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE failure to treat files starting with \"&lt;?xml\" as XML fixed.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3440718&group_id=2439\">Bug #3440718.</a>\r\n\t</li>\r\n\t<li>\r\n\tMade untitled tab saveable when created by closing all files.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3440244&group_id=2439\">Bug #3440244.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE crash fixed when using Scintillua.\r\n\t</li>\r\n\t<li>\r\n\tSciTE revert command fixed so that undo works on individual actions instead of undoing to revert point.\r\n\t</li>\r\n\t<li>\r\n\tFocus loss in SciTE when opening a recent file fixed.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3440142&group_id=2439\">Bug #3440142.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed SciTE SelLength property to measure characters instead of bytes.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3283519&group_id=2439\">Bug #3283519.</a>\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite301.zip?download\">Release 3.0.1</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 15 November 2011.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows now runs Lua scripts directly on the main thread instead of starting them on a\r\n\tsecondary thread and then moving back to the main thread.\r\n\t</li>\r\n\t<li>\r\n\tHighlight \"else\" as a keyword for TCL in the same way as other languages.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=1836954&group_id=2439\">Bug #1836954.</a>\r\n\t</li>\r\n\t<li>\r\n\tFix problems with setting fonts for autocompletion lists on Windows where\r\n\tfont handles were copied and later deleted causing a system default font to be used.\r\n\t</li>\r\n\t<li>\r\n\tFix font size used on Windows for Asian language input methods which sometimes led to IME not being visible.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3436753&group_id=2439\">Bug #3436753.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed polygon drawing on Windows so fold symbols are visible again.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3433558&group_id=2439\">Bug #3433558.</a>\r\n\t</li>\r\n\t<li>\r\n\tChanged background drawing on GTK+ to allow for fractional character positioning as occurs on OS X\r\n\tas this avoids faint lines at lexeme boundaries.\r\n\t</li>\r\n\t<li>\r\n\tEnsure pixmaps allocated before painting as there was a crash when Scintilla drew without common initialization calls.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3432354&group_id=2439\">Bug #3432354.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed SciTE on Windows bug causing wrong caret position after indenting a selection.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3433433&group_id=2439\">Bug #3433433.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed SciTE session saving to store buffer position matching buffer.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3434372&group_id=2439\">Bug #3434372.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed leak of document objects in SciTE.\r\n\t</li>\r\n\t<li>\r\n\tRecognize URL characters '?' and '%' for Open Selected command in SciTE.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3429409&group_id=2439\">Bug #3429409.</a>\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite300.zip?download\">Release 3.0.0</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 1 November 2011.\r\n\t</li>\r\n\t<li>\r\n\tCarbon platform support removed. OS X applications should switch to Cocoa.\r\n\t</li>\r\n\t<li>\r\n\tOn Windows Vista or newer, drawing may be performed with Direct2D and DirectWrite instead of GDI.\r\n\t</li>\r\n\t<li>\r\n\tCairo is now used for all drawing on GTK+. GDK drawing was removed.\r\n\t</li>\r\n\t<li>\r\n\tPaletted display support removed.\r\n\t</li>\r\n\t<li>\r\n\tFractional font sizes can be specified.\r\n\t</li>\r\n\t<li>\r\n\tDifferent weights of text supported on some platforms instead of just normal and bold.\r\n\t</li>\r\n\t<li>\r\n\tSub-pixel character positioning supported.\r\n\t</li>\r\n\t<li>\r\n\tSciTE loads files in the background without blocking the user interface.\r\n\t</li>\r\n\t<li>\r\n\tSciTE can display diagnostic messages interleaved with the text of files immediately after the\r\n\tline referred to by the diagnostic.\r\n\t</li>\r\n\t<li>\r\n\tNew API to see if all lines are visible which can be used to optimize processing fold structure notifications.\r\n\t</li>\r\n\t<li>\r\n\tScrolling optimized by avoiding invalidation of fold margin when redrawing whole window.\r\n\t</li>\r\n\t<li>\r\n\tOptimized SCI_MARKERNEXT.\r\n\t</li>\r\n\t<li>\r\n\tC++ lexer supports Pike hash quoted strings when turned on with lexer.cpp.hashquoted.strings.\r\n\t</li>\r\n\t<li>\r\n\tFixed incorrect line height with annotations in wrapped mode when there are multiple views.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3388159&group_id=2439\">Bug #3388159.</a>\r\n\t</li>\r\n\t<li>\r\n\tCalltips may be displayed above the text as well as below.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3410830&group_id=2439\">Bug #3410830.</a>\r\n\t</li>\r\n\t<li>\r\n\tFor huge files SciTE only examines the first megabyte for newline discovery.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ removes the fileselector.show.hidden property and check box as this was buggy and GTK+ now\r\n\tsupports an equivalent feature.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3413630&group_id=2439\">Bug #3413630.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ supports mnemonics in dynamic menus.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ displays the user's home directory as '~' in menus to make them shorter.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite229.zip?download\">Release 2.29</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 16 September 2011.\r\n\t</li>\r\n\t<li>\r\n\tTo automatically discover the encoding of a file when opening it, SciTE can run a program set with command.discover.properties.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3324341&group_id=2439\">Feature #3324341.</a>\r\n\t</li>\r\n\t<li>\r\n\tCairo always used for drawing on GTK+.\r\n\t</li>\r\n\t<li>\r\n\tThe set of properties files imported by SciTE can be controlled with the properties imports.include and imports.exclude.\r\n\tThe import statement has been extended to allow \"import *\".\r\n\tThe properties files for some languages are no longer automatically loaded by default. The properties files affected are\r\n\tavenue, baan, escript, lot, metapost, and mmixal.\r\n\t</li>\r\n\t<li>\r\n\tC++ lexer fixed a bug with raw strings being recognized too easily.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3388122&group_id=2439\">Bug #3388122.</a>\r\n\t</li>\r\n\t<li>\r\n\tLaTeX lexer improved with more states and fixes to most outstanding bugs.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=1493111&group_id=2439\">Bug #1493111.</a>\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=1856356&group_id=2439\">Bug #1856356.</a>\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3081692&group_id=2439\">Bug #3081692.</a>\r\n\t</li>\r\n\t<li>\r\n\tLua lexer updates for Lua 5.2 beta with goto labels and \"\\z\" string escape.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3386330&group_id=2439\">Feature #3386330.</a>\r\n\t</li>\r\n\t<li>\r\n\tPerl string styling highlights interpolated variables.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3394258&group_id=2439\">Feature #3394258.</a>\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3076629&group_id=2439\">Bug #3076629.</a>\r\n\t</li>\r\n\t<li>\r\n\tPerl lexer updated for Perl 5.14.0 with 0X and 0B numeric literal prefixes, break keyword and \"+\" supported in subroutine prototypes.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3388802&group_id=2439\">Feature #3388802.</a>\r\n\t</li>\r\n\t<li>\r\n\tPerl bug fixed with CRLF line endings.\r\n\t</li>\r\n\t<li>\r\n\tMarkdown lexer fixed to not change state with \"_\" in middle of word.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3398184&group_id=2439\">Bug #3398184.</a>\r\n\t</li>\r\n\t<li>\r\n\tCocoa restores compatibility with OS X 10.5.\r\n\t</li>\r\n\t<li>\r\n\tMouse pointer changes over selection to an arrow near start when scrolled horizontally.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3389055&group_id=2439\">Bug #3389055.</a>\r\n\t</li>\r\n\t<li>\r\n\tIndicators that finish at the end of the document no longer expand when text is appended.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3378718&group_id=2439\">Bug #3378718.</a>\r\n\t</li>\r\n\t<li>\r\n\tSparseState merge fixed to check if other range is empty.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3387053&group_id=2439\">Bug #3387053.</a>\r\n\t</li>\r\n\t<li>\r\n\tOn Windows, autocompletion lists will scroll instead of document when mouse wheel spun.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3403600&group_id=2439\">Feature #3403600.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE performs more rapid polling for command completion so will return faster and report more accurate times.\r\n\t</li>\r\n\t<li>\r\n\tSciTE resizes panes proportionally when switched between horizontal and vertical layout.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3376784&group_id=2439\">Feature #3376784.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ opens multiple files into a single instance more reliably.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3363754&group_id=2439\">Bug #3363754.</a>\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite228.zip?download\">Release 2.28</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 1 August 2011.\r\n\t</li>\r\n\t<li>\r\n\tGTK+ Cairo support works back to GTK+ version 2.8. Requires changing Scintilla source code to enable before GTK+ 2.22.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3322351&group_id=2439\">Bug #3322351.</a>\r\n\t</li>\r\n\t<li>\r\n\tTranslucent images in RGBA format can be used for margin markers and in autocompletion lists.\r\n\t</li>\r\n\t<li>\r\n\tINDIC_DOTBOX added as a translucent dotted rectangular indicator.\r\n\t</li>\r\n\t<li>\r\n\tAsian text input using IME works for GTK+ 3.x and GTK+ 2.x with Cairo.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK+, IME works for Ctrl+Shift+U Unicode input in Scintilla. For SciTE, Ctrl+Shift+U is still Make Selection Uppercase.\r\n\t</li>\r\n\t<li>\r\n\tKey bindings for GTK+ on OS X made compatible with Cocoa port and platform conventions.\r\n\t</li>\r\n\t<li>\r\n\tCocoa port supports different character encodings, improves scrolling performance and drag image appearance.\r\n\tThe control ID is included in WM_COMMAND notifications. Text may be deleted by dragging to the trash.\r\n\tScrollToStart and ScrollToEnd key commands added to simplify implementation of standard OS X Home and End\r\n\tbehaviour.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ uses a paned widget to contain the edit and output panes instead of custom code.\r\n\tThis allows the divider to be moved easily on GTK+ 3 and its appearance follows GTK+ conventions more closely.\r\n\t</li>\r\n\t<li>\r\n\tSciTE builds and installs on BSD.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3324644&group_id=2439\">Bug #3324644.</a>\r\n\t</li>\r\n\t<li>\r\n\tCobol supports fixed format comments.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3014850&group_id=2439\">Bug #3014850.</a>\r\n\t</li>\r\n\t<li>\r\n\tMako template language block syntax extended and ## comments recognized.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3325178&group_id=2439\">Feature #3325178.</a>\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3318818&group_id=2439\">Bug #3318818.</a>\r\n\t</li>\r\n\t<li>\r\n\tFolding of Mako template language within HTML fixed.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3324563&group_id=2439\">Bug #3324563.</a>\r\n\t</li>\r\n\t<li>\r\n\tPython lexer has lexer.python.keywords2.no.sub.identifiers option to avoid highlighting second set of\r\n\tkeywords following '.'.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3325333&group_id=2439\">Bug #3325333.</a>\r\n\t</li>\r\n\t<li>\r\n\tPython folder fixes bug where fold would not extend to final line.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3349157&group_id=2439\">Bug #3349157.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE treats LPEG lexers the same as script lexers by setting all 8 style bits.\r\n\t</li>\r\n\t<li>\r\n\tFor Cocoa, crashes with unsupported font variants and memory leaks for colour objects fixed.\r\n\t</li>\r\n\t<li>\r\n\tShift-JIS lead byte ranges modified to match Windows.\r\n\t</li>\r\n\t<li>\r\n\tMouse pointer changes over selection to an arrow more consistently.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3315756&group_id=2439\">Bug #3315756.</a>\r\n\t</li>\r\n\t<li>\r\n\tBug fixed with annotations beyond end of document.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3347268&group_id=2439\">Bug #3347268.</a>\r\n\t</li>\r\n\t<li>\r\n\tIncorrect drawing fixed for combination of background colour change and translucent selection.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3377116&group_id=2439\">Bug #3377116.</a>\r\n\t</li>\r\n\t<li>\r\n\tLexers initialized correctly when started at position other than start of line.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3377148&group_id=2439\">Bug #3377148.</a>\r\n\t</li>\r\n\t<li>\r\n\tFold highlight drawing fixed for some situations.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3323015&group_id=2439\">Bug #3323015.</a>\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3323805&group_id=2439\">Bug #3323805.</a>\r\n\t</li>\r\n\t<li>\r\n\tCase insensitive search fixed for cases where folded character uses fewer bytes than base character.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3362038&group_id=2439\">Bug #3362038.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE bookmark.alpha setting fixed.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3373907&group_id=2439\">Bug #3373907.</a>\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite227.zip?download\">Release 2.27</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 20 June 2011.\r\n\t</li>\r\n\t<li>\r\n\tOn recent GTK+ 2.x versions when using Cairo, bug fixed where wrong colours were drawn.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ slow performance in menu maintenance fixed.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3315233&group_id=2439\">Bug #3315233.</a>\r\n\t</li>\r\n\t<li>\r\n\tCocoa platform supports 64-bit builds and uses only non-deprecated APIs.\r\n\tAsian Input Method Editors are supported.\r\n\tAutocompletion lists and calltips implemented.\r\n\tControl identifier used in notifications.\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, rectangular selection now uses Option/Alt key to be compatible with Apple Human\r\n\tInterface Guidelines and other applications.\r\n\tThe Control key is reported with an SCMOD_META modifier bit.\r\n\t</li>\r\n\t<li>\r\n\tAPI added for setting and retrieving the identifier number used in notifications.\r\n\t</li>\r\n\t<li>\r\n\tSCI_SETEMPTYSELECTION added to set selection without scrolling or redrawing more than needed.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3314877&group_id=2439\">Feature #3314877.</a>\r\n\t</li>\r\n\t<li>\r\n\tAdded new indicators. INDIC_DASH and INDIC_DOTS are variants of underlines.\r\n\tINDIC_SQUIGGLELOW indicator added as shorter alternative to INDIC_SQUIGGLE for small fonts.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3314591&group_id=2439\">Bug #3314591</a>\r\n\t</li>\r\n\t<li>\r\n\tMargin line selection can be changed to select display lines instead of document lines.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3312763&group_id=2439\">Bug #3312763.</a>\r\n\t</li>\r\n\t<li>\r\n\tOn Windows, SciTE can perform reverse searches by pressing Shift+Enter\r\n\tin the Find or Replace strips or dialogs.\r\n\t</li>\r\n\t<li>\r\n\tMatlab lexer does not special case '\\' in single quoted strings.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=948757&group_id=2439\">Bug #948757</a>\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=1755950&group_id=2439\">Bug #1755950</a>\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=1888738&group_id=2439\">Bug #1888738</a>\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3316852&group_id=2439\">Bug #3316852.</a>\r\n\t</li>\r\n\t<li>\r\n\tVerilog lexer supports SystemVerilog folding and keywords.\r\n\t</li>\r\n\t<li>\r\n\tFont leak fixed.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3306156&group_id=2439\">Bug #3306156.</a>\r\n\t</li>\r\n\t<li>\r\n\tAutomatic scrolling works for long wrapped lines.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3312763&group_id=2439\">Bug #3312763.</a>\r\n\t</li>\r\n\t<li>\r\n\tMultiple typing works for cases where selections collapse together.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3309906&group_id=2439\">Bug #3309906.</a>\r\n\t</li>\r\n\t<li>\r\n\tFold expanded when needed in word wrap mode.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3291579&group_id=2439\">Bug #3291579.</a>\r\n\t</li>\r\n\t<li>\r\n\tBug fixed with edge drawn in wrong place on wrapped lines.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3314807&group_id=2439\">Bug #3314807.</a>\r\n\t</li>\r\n\t<li>\r\n\tBug fixed with unnecessary scrolling for SCI_GOTOLINE.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3303406&group_id=2439\">Bug #3303406.</a>\r\n\t</li>\r\n\t<li>\r\n\tBug fixed where extra step needed to undo SCI_CLEAR in virtual space.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3159691&group_id=2439\">Bug #3159691.</a>\r\n\t</li>\r\n\t<li>\r\n\tRegular expression search fixed for \\$ on last line of search range.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3313746&group_id=2439\">Bug #3313746.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE performance improved when switching to a tab with a very large file.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3311421&group_id=2439\">Bug #3311421.</a>\r\n\t</li>\r\n\t<li>\r\n\tOn Windows, SciTE advanced search remembers the \"Search only in this style\" setting.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3313344&group_id=2439\">Bug #3313344.</a>\r\n\t</li>\r\n\t<li>\r\n\tOn GTK+, SciTE opens help using \"xdg-open\" instead of \"netscape\" as \"netscape\" no longer commonly installed.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3314377&group_id=2439\">Bug #3314377.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE script lexers can use 256 styles.\r\n\t</li>\r\n\t<li>\r\n\tSciTE word highlight works for words containing DBCS characters.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3315173&group_id=2439\">Bug #3315173.</a>\r\n\t</li>\r\n\t<li>\r\n\tCompilation fixed for wxWidgets.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3306156&group_id=2439\">Bug #3306156.</a>\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite226.zip?download\">Release 2.26</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 25 May 2011.\r\n\t</li>\r\n\t<li>\r\n\tFolding margin symbols can be highlighted for the current folding block.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3147069&group_id=2439\">Feature #3147069.</a>\r\n\t</li>\r\n\t<li>\r\n\tSelected lines can be moved up or down together.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3304850&group_id=2439\">Feature #3304850.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE can highlight all occurrences of the current word or selected text.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3291636&group_id=2439\">Feature #3291636.</a>\r\n\t</li>\r\n\t<li>\r\n\tExperimental GTK+ 3.0 support: build with \"make GTK3=1\".\r\n\t</li>\r\n\t<li>\r\n\tINDIC_STRAIGHTBOX added. Is similar to INDIC_ROUNDBOX but without rounded corners.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3290435&group_id=2439\">Bug #3290435.</a>\r\n\t</li>\r\n\t<li>\r\n\tCan show brace matching and mismatching with indicators instead of text style.\r\n\tTranslucency of outline can be altered for INDIC_ROUNDBOX and INDIC_STRAIGHTBOX.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3290434&group_id=2439\">Feature #3290434.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE can automatically indent python by examining previous line for scope-starting ':' with indent.python.colon.\r\n\t</li>\r\n\t<li>\r\n\tBatch file lexer allows braces '(' or ')' inside variable names.\r\n\t</li>\r\n\t<li>\r\n\tThe cpp lexer only recognizes Vala triple quoted strings when lexer.cpp.triplequoted.strings property is set.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3239234&group_id=2439\">Bug #3239234.</a>\r\n\t</li>\r\n\t<li>\r\n\tMake file lexer treats a variable with a nested variable like $(f$(qx)b) as one variable.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3298223&group_id=2439\">Bug #3298223.</a>\r\n\t</li>\r\n\t<li>\r\n\tFolding bug fixed for JavaScript with nested PHP.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3193530&group_id=2439\">Bug #3193530.</a>\r\n\t</li>\r\n\t<li>\r\n\tHTML lexer styles Django's {# #} comments.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3013798&group_id=2439\">Bug #3013798.</a>\r\n\t</li>\r\n\t<li>\r\n\tHTML lexer styles JavaScript regular expression correctly for /abc/i.test('abc');.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3209108&group_id=2439\">Bug #3209108.</a>\r\n\t</li>\r\n\t<li>\r\n\tInno Setup Script lexer now works properly when it restarts from middle of [CODE] section.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3283880&group_id=2439\">Bug #3283880.</a>\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3129044&group_id=2439\">Bug #3129044.</a>\r\n\t</li>\r\n\t<li>\r\n\tLua lexer updated for Lua 5.2 with hexadecimal floating-point numbers and '\\*' whitespace escaping in strings.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3243811&group_id=2439\">Feature #3243811.</a>\r\n\t</li>\r\n\t<li>\r\n\tPerl folding folds \"here doc\"s and adds options fold.perl.at.else and fold.perl.comment.explicit. Fold structure for Perl fixed.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3112671&group_id=2439\">Feature #3112671.</a>\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3265401&group_id=2439\">Bug #3265401.</a>\r\n\t</li>\r\n\t<li>\r\n\tPython lexer supports cpdef keyword for Cython.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3279728&group_id=2439\">Bug #3279728.</a>\r\n\t</li>\r\n\t<li>\r\n\tSQL folding option lexer.sql.fold.at.else renamed to fold.sql.at.else.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3271474&group_id=2439\">Bug #3271474.</a>\r\n\t</li>\r\n\t<li>\r\n\tSQL lexer no longer treats ';' as terminating a comment.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3196071&group_id=2439\">Bug #3196071.</a>\r\n\t</li>\r\n\t<li>\r\n\tText drawing and measurement segmented into smaller runs to avoid platform bugs.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3277449&group_id=2439\">Bug #3277449.</a>\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3165743&group_id=2439\">Bug #3165743.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows adds temp.files.sync.load property to open dropped temporary files synchronously as they may\r\n\tbe removed before they can be opened asynchronously.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3072009&group_id=2439\">Bug #3072009.</a>\r\n\t</li>\r\n\t<li>\r\n\tBug fixed with indentation guides ignoring first line in SC_IV_LOOKBOTH mode.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3291317&group_id=2439\">Bug #3291317.</a>\r\n\t</li>\r\n\t<li>\r\n\tBugs fixed in backward regex search.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3292659&group_id=2439\">Bug #3292659.</a>\r\n\t</li>\r\n\t<li>\r\n\tBugs with display of folding structure fixed for wrapped lines and where there is a fold header but no body.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3291579&group_id=2439\">Bug #3291579.</a>\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3265401&group_id=2439\">Bug #3265401.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows cursor changes to an arrow now when over horizontal splitter near top of window.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3286620&group_id=2439\">Bug #3286620.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed default widget size problem on GTK+.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3267892&group_id=2439\">Bug #3267892.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed font size when using Cairo on GTK+.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3272662&group_id=2439\">Bug #3272662.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed primary selection and cursor issues on GTK+ when unrealized then realized.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3256153&group_id=2439\">Bug #3256153.</a>\r\n\t</li>\r\n\t<li>\r\n\tRight click now cancels selection on GTK+ like on Windows.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3235190&group_id=2439\">Bug #3235190.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ implements z-order buffer switching like on Windows.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3228384&group_id=2439\">Bug #3228384.</a>\r\n\t</li>\r\n\t<li>\r\n\tImprove selection position after SciTE Insert Abbreviation command when abbreviation expansion includes '|'.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite225.zip?download\">Release 2.25</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 21 March 2011.\r\n\t</li>\r\n\t<li>\r\n\tSparseState class makes it easier to write lexers which have to remember complex state between lines.\r\n\t</li>\r\n\t<li>\r\n\tVisual Studio project (.dsp) files removed. The make files should be used instead as described in the README.\r\n\t</li>\r\n\t<li>\r\n\tModula 3 lexer added along with SciTE support.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3173374&group_id=2439\">Feature #3173374.</a>\r\n\t</li>\r\n\t<li>\r\n\tAsm, Basic, and D lexers add extra folding properties.\r\n\t</li>\r\n\t<li>\r\n\tRaw string literals for C++0x supported in C++ lexer.\r\n\t</li>\r\n\t<li>\r\n\tTriple-quoted strings used in Vala language supported in C++ lexer.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3177601&group_id=2439\">Feature #3177601.</a>\r\n\t</li>\r\n\t<li>\r\n \tThe errorlist lexer used in SciTE's output pane colours lines that start with '&lt;' as diff deletions.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3172878&group_id=2439\">Feature #3172878.</a>\r\n\t</li>\r\n\t<li>\r\n \tThe Fortran lexer correctly folds type-bound procedures from Fortran 2003.\r\n\t</li>\r\n\t<li>\r\n\tLPeg lexer support‎ improved in SciTE.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows-64 fixes for menu localization and Lua scripts.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3204502&group_id=2439\">Bug #3204502.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows avoids locking folders when using the open or save dialogs.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=1795484&group_id=2439\">Bug #1795484.</a>\r\n\t</li>\r\n\t<li>\r\n\tDiff lexer fixes problem where diffs of diffs producing lines that start with \"----\".\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3197952&group_id=2439\">Bug #3197952.</a>\r\n\t</li>\r\n\t<li>\r\n\tBug fixed when searching upwards in Chinese code page 936.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3176271&group_id=2439\">Bug #3176271.</a>\r\n\t</li>\r\n\t<li>\r\n\tOn Cocoa, translucent drawing performed as on other platforms instead of 2.5 times less translucent.\r\n\t</li>\r\n\t<li>\r\n\tPerformance issue and potential bug fixed on GTK+ with caret line for long lines.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite224.zip?download\">Release 2.24</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 3 February 2011.\r\n\t</li>\r\n\t<li>\r\n\tFixed memory leak in GTK+ Cairo code.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3157655&group_id=2439\">Feature #3157655.</a>\r\n\t</li>\r\n\t<li>\r\n\tInsert Abbreviation dialog added to SciTE on GTK+.\r\n\t</li>\r\n\t<li>\r\n\tSCN_UPDATEUI notifications received when window scrolled. An 'updated' bit mask indicates which\r\n\ttypes of update have occurred from SC_UPDATE_SELECTION, SC_UPDATE_CONTENT, SC_UPDATE_H_SCROLL\r\n\tor SC_UPDATE_V_SCROLL.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3125977&group_id=2439\">Feature #3125977.</a>\r\n\t</li>\r\n\t<li>\r\n\tOn Windows, to ensure reverse arrow cursor matches platform default, it is now generated by\r\n\treflecting the platform arrow cursor.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3143968&group_id=2439\">Feature #3143968.</a>\r\n\t</li>\r\n\t<li>\r\n\tCan choose mouse cursor used in margins.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3161326&group_id=2439\">Feature #3161326.</a>\r\n\t</li>\r\n\t<li>\r\n\tOn GTK+, SciTE sets a mime type of text/plain in its .desktop file so that it will appear in the shell context menu.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3137126&group_id=2439\">Feature #3137126.</a>\r\n\t</li>\r\n\t<li>\r\n\tBash folder handles here docs.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3118223&group_id=2439\">Feature #3118223.</a>\r\n\t</li>\r\n\t<li>\r\n\tC++ folder adds fold.cpp.syntax.based, fold.cpp.comment.multiline, fold.cpp.explicit.start, fold.cpp.explicit.end,\r\n\tand fold.cpp.explicit.anywhere properties to allow more control over folding and choice of explicit fold markers.\r\n\t</li>\r\n\t<li>\r\n\tC++ lexer fixed to always handle single quote strings continued past a line end.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3150522&group_id=2439\">Bug #3150522.</a>\r\n\t</li>\r\n\t<li>\r\n\tRuby folder handles here docs.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3118224&group_id=2439\">Feature #3118224.</a>\r\n\t</li>\r\n\t<li>\r\n\tSQL lexer allows '.' to be part of words.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3103129&group_id=2439\">Feature #3103129.</a>\r\n\t</li>\r\n\t<li>\r\n\tSQL folder handles case statements in more situations.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3135027&group_id=2439\">Feature #3135027.</a>\r\n\t</li>\r\n\t<li>\r\n\tSQL folder adds fold points inside expressions based on bracket structure.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3165488&group_id=2439\">Feature #3165488.</a>\r\n\t</li>\r\n\t<li>\r\n\tSQL folder drops fold.sql.exists property as 'exists' is handled automatically.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3164194&group_id=2439\">Bug #3164194.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE only forwards properties to lexers when they have been explicitly set so the defaults set by lexers are used\r\n\trather than 0.\r\n\t</li>\r\n\t<li>\r\n\tMouse double click word selection chooses the word around the character under the mouse rather than\r\n\tthe inter-character position under the mouse. This makes double clicking select what the user is pointing\r\n\tat and avoids selecting adjacent non-word characters.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3111174&group_id=2439\">Bug #3111174.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed mouse double click to always perform word select, not line select.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3143635&group_id=2439\">Bug #3143635.</a>\r\n\t</li>\r\n\t<li>\r\n\tRight click cancels autocompletion.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3144531&group_id=2439\">Bug #3144531.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed multiPaste to work when additionalSelectionTyping off.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3126221&group_id=2439\">Bug #3126221.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed virtual space problems when text modified at caret.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3154986&group_id=2439\">Bug #3154986.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed memory leak in lexer object code.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3133672&group_id=2439\">Bug #3133672.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed SciTE on GTK+ search failure when using regular expression.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3156217&group_id=2439\">Bug #3156217.</a>\r\n\t</li>\r\n\t<li>\r\n\tAvoid unnecessary full window redraw for SCI_GOTOPOS.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3146650&group_id=2439\">Feature #3146650.</a>\r\n\t</li>\r\n\t<li>\r\n\tAvoid unnecessary redraw when indicator fill range makes no real change.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite223.zip?download\">Release 2.23</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 7 December 2010.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK+ version 2.22 and later, drawing is performed with Cairo rather than GDK.\r\n\tThis is in preparation for GTK+ 3.0 which will no longer support GDK drawing.\r\n\tThe appearance of some elements will be different with Cairo as it is anti-aliased and uses sub-pixel positioning.\r\n\tCairo may be turned on for GTK+ versions before 2.22 by defining USE_CAIRO although this has not\r\n\tbeen extensively tested.\r\n\t</li>\r\n\t<li>\r\n\tNew lexer a68k for Motorola 68000 assembler.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3101598&group_id=2439\">Feature #3101598.</a>\r\n\t</li>\r\n\t<li>\r\n\tBorland C++ is no longer supported for building Scintilla or SciTE on Windows.\r\n\t</li>\r\n\t<li>\r\n\tPerformance improved when creating large rectangular selections.\r\n\t</li>\r\n\t<li>\r\n\tPHP folder recognizes #region and #endregion comments.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3101624&group_id=2439\">Feature #3101624.</a>\r\n\t</li>\r\n\t<li>\r\n\tSQL lexer has a lexer.sql.numbersign.comment option to turn off use of '#' comments\r\n\tas these are a non-standard feature only available in some implementations.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3098071&group_id=2439\">Feature #3098071.</a>\r\n\t</li>\r\n\t<li>\r\n\tSQL folder recognizes case statements and understands the fold.at.else property.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3104091&group_id=2439\">Bug #3104091.</a>\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3107362&group_id=2439\">Bug #3107362.</a>\r\n\t</li>\r\n\t<li>\r\n\tSQL folder fixes bugs with end statements when fold.sql.only.begin=1.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3104091&group_id=2439\">Bug #3104091.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows bug fixed with multi-line tab bar not adjusting correctly when maximizing and demaximizing.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3097517&group_id=2439\">Bug #3097517.</a>\r\n\t</li>\r\n\t<li>\r\n\tCrash fixed on GTK+ when Scintilla widget destroyed while it still has an outstanding style idle pending.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed where searching backwards in DBCS text (code page 936 or similar) failed to find occurrences at the start of the line.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3103936&group_id=2439\">Bug #3103936.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows supports Unicode file names when executing help applications with winhelp and htmlhelp subsystems.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite222.zip?download\">Release 2.22</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 27 October 2010.\r\n\t</li>\r\n\t<li>\r\n\tSciTE includes support for integrating with Scintillua which allows lexers to be implemented in Lua as a\r\n\tParsing Expression Grammar (PEG).\r\n\t</li>\r\n\t<li>\r\n\tRegular expressions allow use of '?' for non-greedy matches or to match 0 or 1 instances of an item.\r\n\t</li>\r\n\t<li>\r\n\tSCI_CONTRACTEDFOLDNEXT added to allow rapid retrieval of folding state.\r\n\t</li>\r\n\t<li>\r\n\tSCN_HOTSPOTRELEASECLICK notification added which is similar to SCN_HOTSPOTCLICK but occurs\r\n\twhen the mouse is released.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3082409&group_id=2439\">Feature #3082409.</a>\r\n\t</li>\r\n\t<li>\r\n\tCommand added for centring current line in window.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3064696&group_id=2439\">Feature #3064696.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE performance improved by not examining document for line ends when switching buffers and not\r\n\tstoring folds when folding turned off.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed where scrolling to ensure the caret is visible did not take into account all pixels of the line.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3081721&group_id=2439\">Bug #3081721.</a>\r\n\t</li>\r\n\t<li>\r\n\tBug fixed for autocompletion list overlapping text when WS_EX_CLIENTEDGE used.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3079778&group_id=2439\">Bug #3079778.</a>\r\n\t</li>\r\n\t<li>\r\n\tAfter autocompletion, the caret's X is updated.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3079114&group_id=2439\">Bug #3079114.</a>\r\n\t</li>\r\n\t<li>\r\n\tOn Windows, default to the system caret blink time.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3079784&group_id=2439\">Feature #3079784.</a>\r\n\t</li>\r\n\t<li>\r\n\tPgUp/PgDn fixed to allow virtual space.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3077452&group_id=2439\">Bug #3077452.</a>\r\n\t</li>\r\n\t<li>\r\n\tCrash fixed when AddMark and AddMarkSet called with negative argument.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3075074&group_id=2439\">Bug #3075074.</a>\r\n\t</li>\r\n\t<li>\r\n\tDwell notifications fixed so that they do not occur when the mouse is outside Scintilla.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3073481&group_id=2439\">Bug #3073481.</a>\r\n\t</li>\r\n\t<li>\r\n\tBash lexer bug fixed for here docs starting with &lt;&lt;-.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3063822&group_id=2439\">Bug #3063822.</a>\r\n\t</li>\r\n\t<li>\r\n\tC++ lexer bug fixed for // comments that are continued onto a second line by a \\.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3066031&group_id=2439\">Bug #3066031.</a>\r\n\t</li>\r\n\t<li>\r\n\tC++ lexer fixes wrong highlighting for float literals containing +/-.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3058924&group_id=2439\">Bug #3058924.</a>\r\n\t</li>\r\n\t<li>\r\n\tJavaScript lexer recognize regexes following return keyword.‎\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3062287&group_id=2439\">Bug #3062287.</a>\r\n\t</li>\r\n\t<li>\r\n\tRuby lexer handles % quoting better and treats range dots as operators in 1..2 and 1...2.\r\n\tRuby folder handles \"if\" keyword used as a modifier even when it is separated from the modified statement by an escaped new line.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2093767&group_id=2439\">Bug #2093767.</a>\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3058496&group_id=2439\">Bug #3058496.</a>\r\n\t</li>\r\n\t<li>\r\n\tBug fixed where upwards search failed with DBCS code pages.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3065912&group_id=2439\">Bug #3065912.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE has a default Lua startup script name distributed in SciTEGlobal.properties.\r\n\tNo error message is displayed if this file does not exist.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows tab control height is calculated better.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2635702&group_id=2439\">Bug #2635702.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows uses better themed check buttons in find and replace strips.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows fixes bug with Find strip appearing along with Incremental Find strip.\r\n\t</li>\r\n\t<li>\r\n\tSciTE setting find.close.on.find added to allow preventing the Find dialog from closing.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows attempts to rerun commands that fail by prepending them with \"cmd.exe /c\".\r\n\tThis allows commands built in to the command processor like \"dir\" to run.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite221.zip?download\">Release 2.21</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 1 September 2010.\r\n\t</li>\r\n\t<li>\r\n\tAsian Double Byte Character Set (DBCS) support improved.\r\n\tCase insensitive search works and other operations are much faster.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2999125&group_id=2439\">Bug #2999125,</a>\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2774616&group_id=2439\">Bug #2774616,</a>\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2991942&group_id=2439\">Bug #2991942,</a>\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3005688&group_id=2439\">Bug #3005688.</a>\r\n\t</li>\r\n\t<li>\r\n\tScintilla on GTK+ uses only non-deprecated APIs (for GTK+ 2.20) except for GdkFont and GdkFont use can be disabled\r\n\twith the preprocessor symbol DISABLE_GDK_FONT.\r\n\t</li>\r\n\t<li>\r\n\tIDocument interface used by lexers adds BufferPointer and GetLineIndentation methods.\r\n\t</li>\r\n\t<li>\r\n\tOn Windows, clicking sets focus before processing the click or sending notifications.\r\n\t</li>\r\n\t<li>\r\n\tBug on OS X (macosx platform) fixed where drag/drop overwrote clipboard.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3039732&group_id=2439\">Bug #3039732.</a>\r\n\t</li>\r\n\t<li>\r\n\tGTK+ drawing bug when the view was horizontally scrolled more than 32000 pixels fixed.\r\n\t</li>\r\n\t<li>\r\n\tSciTE bug fixed with invoking Complete Symbol from output pane.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3050957&group_id=2439\">Bug #3050957.</a>\r\n\t</li>\r\n\t<li>\r\n\tBug fixed where it was not possible to disable folding.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3040649&group_id=2439\">Bug #3040649.</a>\r\n\t</li>\r\n\t<li>\r\n\tBug fixed with pressing Enter on a folded fold header line not opening the fold.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3043419&group_id=2439\">Bug #3043419.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE 'Match case' option in find and replace user interfaces changed to 'Case sensitive' to allow use of 'v'\r\n\trather than 'c' as the mnemonic.\r\n\t</li>\r\n\t<li>\r\n\tSciTE displays stack trace for Lua when error occurs..\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3051397&group_id=2439\">Bug #3051397.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows fixes bug where double clicking on error message left focus in output pane.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=1264835&group_id=2439\">Bug #1264835.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows uses SetDllDirectory to avoid a security problem.\r\n\t</li>\r\n\t<li>\r\n\tC++ lexer crash fixed with preprocessor expression that looked like division by 0.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3056825&group_id=2439\">Bug #3056825.</a>\r\n\t</li>\r\n\t<li>\r\n\tHaskell lexer improved.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3039490&group_id=2439\">Feature #3039490.</a>\r\n\t</li>\r\n\t<li>\r\n\tHTML lexing fixed around Django {% %} tags.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3034853&group_id=2439\">Bug #3034853.</a>\r\n\t</li>\r\n\t<li>\r\n\tHTML JavaScript lexing fixed when line end escaped.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3038381&group_id=2439\">Bug #3038381.</a>\r\n\t</li>\r\n\t<li>\r\n\tHTML lexer stores line state produced by a line on that line rather than on the next line.\r\n\t</li>\r\n\t<li>\r\n\tMarkdown lexer fixes infinite loop.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3045386&group_id=2439\">Bug #3045386.</a>\r\n\t</li>\r\n\t<li>\r\n\tMySQL folding bugs with END statements fixed.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3031742&group_id=2439\">Bug #3031742.</a>\r\n\t</li>\r\n\t<li>\r\n\tPowerShell lexer allows '_' as a word character.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3042228&group_id=2439\">Feature #3042228.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ abandons processing of subsequent commands if a command.go.needs command fails.\r\n\t</li>\r\n\t<li>\r\n\tWhen SciTE is closed, all buffers now receive an OnClose call.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3033857&group_id=2439\">Bug #3033857.</a>\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite220.zip?download\">Release 2.20</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 30 July 2010.\r\n\t</li>\r\n\t<li>\r\n\tLexers are implemented as objects so that they may retain extra state.\r\n\tThe interfaces defined for this are tentative and may change before the next release.\r\n\tCompatibility classes allow current lexers compiled into Scintilla to run with few changes.\r\n\tThe interface to external lexers has changed and existing external lexers will need to have changes\r\n\tmade and be recompiled.\r\n\tA single lexer object is attached to a document whereas previously lexers were attached to views\r\n\twhich could lead to different lexers being used for split views with confusing results.\r\n\t</li>\r\n\t<li>\r\n\tC++ lexer understands the preprocessor enough to grey-out inactive code due to conditional compilation.\r\n\t</li>\r\n\t<li>\r\n\tSciTE can use strips within the main window for find and replace rather than dialogs.\r\n\tOn Windows SciTE always uses a strip for incremental search.\r\n\t</li>\r\n\t<li>\r\n\tLexer added for Txt2Tags language.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3018736&group_id=2439\">Feature #3018736.</a>\r\n\t</li>\r\n\t<li>\r\n\tSticky caret feature enhanced with additional SC_CARETSTICKY_WHITESPACE mode .\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3027559&group_id=2439\">Feature #3027559.</a>\r\n\t</li>\r\n\t<li>\r\n\tBash lexer implements basic parsing of compound commands and constructs.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3033135&group_id=2439\">Feature #3033135.</a>\r\n\t</li>\r\n\t<li>\r\n\tC++ folder allows disabling explicit fold comments.\r\n\t</li>\r\n\t<li>\r\n\tPerl folder works for array blocks, adjacent package statements, nested PODs, and terminates package folding at __DATA__, ^D and ^Z.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3030887&group_id=2439\">Feature #3030887.</a>\r\n\t</li>\r\n\t<li>\r\n\tPowerShell lexer supports multiline &lt;# .. #&gt; comments and adds 2 keyword classes.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3015176&group_id=2439\">Feature #3015176.</a>\r\n\t</li>\r\n\t<li>\r\n\tLexing performed incrementally when needed by wrapping to make user interface more responsive.\r\n\t</li>\r\n\t<li>\r\n\tSciTE setting replaceselection:yes works on GTK+.\r\n\t</li>\r\n\t<li>\r\n\tSciTE Lua scripts calling io.open or io.popen on Windows have arguments treated as UTF-8 and converted to Unicode\r\n\tso that non-ASCII file paths will work. Lua files with non-ASCII paths run.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3016951&group_id=2439\">Bug #3016951.</a>\r\n\t</li>\r\n\t<li>\r\n\tCrash fixed when searching for empty string.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3017572&group_id=2439\">Bug #3017572.</a>\r\n\t</li>\r\n\t<li>\r\n\tBugs fixed with folding and lexing when Enter pressed at start of line.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3032652&group_id=2439\">Bug #3032652.</a>\r\n\t</li>\r\n\t<li>\r\n\tBug fixed with line selection mode not affecting selection range.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3021480&group_id=2439\">Bug #3021480.</a>\r\n\t</li>\r\n\t<li>\r\n\tBug fixed where indicator alpha was limited to 100 rather than 255.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3021473&group_id=2439\">Bug #3021473.</a>\r\n\t</li>\r\n\t<li>\r\n\tBug fixed where changing annotation did not cause automatic redraw.\r\n\t</li>\r\n\t<li>\r\n\tRegular expression bug fixed when a character range included non-ASCII characters.\r\n\t</li>\r\n\t<li>\r\n\tCompilation failure with recent compilers fixed on GTK+.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3022027&group_id=2439\">Bug #3022027.</a>\r\n\t</li>\r\n\t<li>\r\n\tBug fixed on Windows with multiple monitors where autocomplete pop up would appear off-screen\r\n\tor straddling monitors.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3017512&group_id=2439\">Bug #3017512.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows bug fixed where changing directory to a Unicode path failed.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3011987&group_id=2439\">Bug #3011987.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows bug fixed where combo boxes were not allowing Unicode characters.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3012986&group_id=2439\">Bug #3012986.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ bug fixed when dragging files into SciTE on KDE.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3026555&group_id=2439\">Bug #3026555.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE bug fixed where closing untitled file could lose data if attempt to name file same as another buffer.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3011680&group_id=2439\">Bug #3011680.</a>\r\n\t</li>\r\n\t<li>\r\n\tCOBOL number masks now correctly highlighted.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3012164&group_id=2439\">Bug #3012164.</a>\r\n\t</li>\r\n\t<li>\r\n\tPHP comments can include &lt;?PHP without triggering state change.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2854183&group_id=2439\">Bug #2854183.</a>\r\n\t</li>\r\n\t<li>\r\n\tVHDL lexer styles unclosed string correctly.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3029627&group_id=2439\">Bug #3029627.</a>\r\n\t</li>\r\n\t<li>\r\n\tMemory leak fixed in list boxes on GTK+.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3007669&group_id=2439\">Bug #3007669.</a>\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite212.zip?download\">Release 2.12</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 1 June 2010.\r\n\t</li>\r\n\t<li>\r\n\tDrawing optimizations improve speed and fix some visible flashing when scrolling.\r\n\t</li>\r\n\t<li>\r\n\tCopy Path command added to File menu in SciTE.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2986745&group_id=2439\">Feature #2986745.</a>\r\n\t</li>\r\n\t<li>\r\n\tOptional warning displayed by SciTE when saving a file which has been modified by another process.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2975041&group_id=2439\">Feature #2975041.</a>\r\n\t</li>\r\n\t<li>\r\n\tFlagship lexer for xBase languages updated to follow the language much more closely.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2992689&group_id=2439\">Feature #2992689.</a>\r\n\t</li>\r\n\t<li>\r\n\tHTML lexer highlights Django templates in more regions.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3002874&group_id=2439\">Feature #3002874.</a>\r\n\t</li>\r\n\t<li>\r\n\tDropping files on SciTE on Windows, releases the drag object earlier and opens the files asynchronously,\r\n\tleading to smoother user experience.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2986724&group_id=2439\">Feature #2986724.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE HTML exports take the Use Monospaced Font setting into account.\r\n\t</li>\r\n\t<li>\r\n\tSciTE window title \"[n of m]\" localized.\r\n\t</li>\r\n\t<li>\r\n\tWhen new line inserted at start of line, markers are moved down.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2986727&group_id=2439\">Bug #2986727.</a>\r\n\t</li>\r\n\t<li>\r\n\tOn Windows, dropped text has its line ends converted, similar to pasting.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3005328&group_id=2439\">Bug #3005328.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed bug with middle-click paste in block select mode where text was pasted next to selection rather than at cursor.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2984460&group_id=2439\">Bug #2984460.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed SciTE crash where a style had a size parameter without a value.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3003834&group_id=2439\">Bug #3003834.</a>\r\n\t</li>\r\n\t<li>\r\n\tDebug assertions in multiple lexers fixed.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3000566&group_id=2439\">Bug #3000566.</a>\r\n\t</li>\r\n\t<li>\r\n\tCSS lexer fixed bug where @font-face displayed incorrectly\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2994224&group_id=2439\">Bug #2994224.</a>\r\n\t</li>\r\n\t<li>\r\n\tCSS lexer fixed bug where open comment caused highlighting error.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=1683672&group_id=2439\">Bug #1683672.</a>\r\n\t</li>\r\n\t<li>\r\n\tShell file lexer fixed highlight glitch with here docs where the first line is a comment.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2830239&group_id=2439\">Bug #2830239.</a>\r\n\t</li>\r\n\t<li>\r\n\tBug fixed in SciTE openpath property that caused Open Selected File to fail to open the selected file.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed in SciTE FileExt property when file name with no extension evaluated to whole path.\r\n\t</li>\r\n\t<li>\r\n\tFixed SciTE on Windows printing bug where the $(CurrentTime), $(CurrentPage) variables were not expanded.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2994612&group_id=2439\">Bug #2994612.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE compiles for 64-bit Windows and runs without crashing.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2986312&group_id=2439\">Bug #2986312.</a>\r\n\t</li>\r\n\t<li>\r\n\tFull Screen mode in Windows Vista/7 improved to hide Start button and size borders a little better.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3002813&group_id=2439\">Bug #3002813.</a>\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite211.zip?download\">Release 2.11</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 9 April 2010.\r\n\t</li>\r\n\t<li>\r\n\tFixes compatibility of Scintilla.h with the C language.\r\n\t</li>\r\n\t<li>\r\n\tWith a rectangular selection SCI_GETSELECTIONSTART and SCI_GETSELECTIONEND return limits of the\r\n\trectangular selection rather than the limits of the main selection.\r\n\t</li>\r\n\t<li>\r\n\tWhen SciTE on Windows is minimized to tray, only takes a single click to restore rather than a double click.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=981917&group_id=2439\">Feature #981917.</a>\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite210.zip?download\">Release 2.10</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 4 April 2010.\r\n\t</li>\r\n\t<li>\r\n\tVersion 1.x of GTK+ is no longer supported.\r\n\t</li>\r\n\t<li>\r\n\tSciTE is no longer supported on Windows 95, 98 or ME.\r\n\t</li>\r\n\t<li>\r\n\tCase-insensitive search works for non-ASCII characters in UTF-8 and 8-bit encodings.\r\n\tNon-regex search in DBCS encodings is always case-sensitive.\r\n\t</li>\r\n\t<li>\r\n\tNon-ASCII characters may be changed to upper and lower case.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows can access all files including those with names outside the user's preferred character encoding.\r\n\t</li>\r\n\t<li>\r\n\tSciTE may be extended with lexers written in Lua.\r\n\t</li>\r\n\t<li>\r\n\tWhen there are multiple selections, the paste command can go either to the main selection or to each\r\n\tselection. This is controlled with SCI_SETMULTIPASTE.\r\n\t</li>\r\n\t<li>\r\n\tMore forms of bad UTF-8 are detected including overlong sequences, surrogates, and characters outside\r\n\tthe valid range. Bad UTF-8 bytes are now displayed as 2 hex digits preceded by 'x'.\r\n\t</li>\r\n\t<li>\r\n\tSCI_GETTAG retrieves the value of captured expressions within regular expression searches.\r\n\t</li>\r\n\t<li>\r\n\tDjango template highlighting added to the HTML lexer.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2974889&group_id=2439\">Feature #2974889.</a>\r\n\t</li>\r\n\t<li>\r\n\tVerilog line comments can be folded.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows allows specifying a filter for the Save As dialog.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2943445&group_id=2439\">Feature #2943445.</a>\r\n\t</li>\r\n\t<li>\r\n\tBug fixed when multiple selection disabled where rectangular selections could be expanded into multiple selections.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2948260&group_id=2439\">Bug #2948260.</a>\r\n\t</li>\r\n\t<li>\r\n\tBug fixed when document horizontally scrolled and up/down-arrow did not return to the same\r\n\tcolumn after horizontal scroll occurred.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2950799&group_id=2439\">Bug #2950799.</a>\r\n\t</li>\r\n\t<li>\r\n\tBug fixed to remove hotspot highlight when mouse is moved out of the document. Windows only fix.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&aid=2951353&group_id=2439&atid=102439\">Bug #2951353.</a>\r\n\t</li>\r\n\t<li>\r\n\tR lexer now performs case-sensitive check for keywords.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2956543&group_id=2439\">Bug #2956543.</a>\r\n\t</li>\r\n\t<li>\r\n\tBug fixed on GTK+ where text disappeared when a wrap occurred.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2958043&group_id=2439\">Bug #2958043.</a>\r\n\t</li>\r\n\t<li>\r\n\tBug fixed where regular expression replace cannot escape the '\\' character by using '\\\\'.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2959876&group_id=2439\">Bug #2959876.</a>\r\n\t</li>\r\n\t<li>\r\n\tBug fixed on GTK+ when virtual space disabled, middle-click could still paste text beyond end of line.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2971618&group_id=2439\">Bug #2971618.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE crash fixed when double clicking on a malformed error message in the output pane.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2976551&group_id=2439\">Bug #2976551.</a>\r\n\t</li>\r\n\t<li>\r\n\tImproved performance on GTK+ when changing parameters associated with scroll bars to the same value.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2964357&group_id=2439\">Bug #2964357.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed bug with pressing Shift+Tab with a rectangular selection so that it performs an un-indent\r\n\tsimilar to how Tab performs an indent.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite203.zip?download\">Release 2.03</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased 14 February 2010.\r\n\t</li>\r\n\t<li>\r\n\tAdded SCI_SETFIRSTVISIBLELINE to match SCI_GETFIRSTVISIBLELINE.\r\n\t</li>\r\n\t<li>\r\n\tErlang lexer extended set of numeric bases recognized; separate style for module:function_name; detects\r\n\tbuilt-in functions, known module attributes, and known preprocessor instructions; recognizes EDoc and EDoc macros;\r\n\tseparates types of comments.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2942448&group_id=2439\">Bug #2942448.</a>\r\n\t</li>\r\n\t<li>\r\n\tPython lexer extended with lexer.python.strings.over.newline option that allows non-triple-quoted strings to extend\r\n\tpast line ends. This allows use of the Ren'Py language.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2945550&group_id=2439\">Feature #2945550.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed bugs with cursor movement after deleting a rectangular selection.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2942131&group_id=2439\">Bug #2942131.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed bug where calling SCI_SETSEL when there is a rectangular selection left\r\n\tthe additional selections selected.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2947064&group_id=2439\">Bug #2947064.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed macro recording bug where not all bytes in multi-byte character insertions were reported through\r\n\tSCI_REPLACESEL.\r\n\t</li>\r\n\t<li>\r\n\tFixed SciTE bug where using Ctrl+Enter followed by Ctrl+Space produced an autocompletion list\r\n\twith only a single line containing all the identifiers.\r\n\t</li>\r\n\t<li>\r\n\tFixed SciTE on GTK+ bug where running a tool made the user interface completely unresponsive.\r\n\t</li>\r\n\t<li>\r\n\tFixed SciTE on Windows Copy to RTF bug.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2108574&group_id=2439\">Bug #2108574.</a>\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite202.zip?download\">Release 2.02</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased on 25 January 2010.\r\n\t</li>\r\n\t<li>\r\n\tMarkdown lexer added.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2844081&group_id=2439\">Feature #2844081.</a>\r\n\t</li>\r\n\t<li>\r\n\tOn GTK+, include code that understands the ranges of lead bytes for code pages 932, 936, and 950\r\n\tso that most Chinese and Japanese text can be used on systems that are not set to the corresponding locale.\r\n\t</li>\r\n\t<li>\r\n\tAllow changing the size of dots in visible whitespace using SCI_SETWHITESPACESIZE.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2839427&group_id=2439\">Feature #2839427.</a>\r\n\t</li>\r\n\t<li>\r\n\tAdditional carets can be hidden with SCI_SETADDITIONALCARETSVISIBLE.\r\n\t</li>\r\n\t<li>\r\n\tCan choose anti-aliased, non-anti-aliased or lcd-optimized text using SCI_SETFONTQUALITY.\r\n\t</li>\r\n\t<li>\r\n\tRetrieve the current selected text in the autocompletion list with SCI_AUTOCGETCURRENTTEXT.\r\n\t</li>\r\n\t<li>\r\n\tRetrieve the name of the current lexer with SCI_GETLEXERLANGUAGE.\r\n\t</li>\r\n\t<li>\r\n\tProgress 4GL lexer improves handling of comments in preprocessor declaration.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2902206&group_id=2439\">Feature #2902206.</a>\r\n\t</li>\r\n\t<li>\r\n\tHTML lexer extended to handle Mako template language.\r\n\t</li>\r\n\t<li>\r\n\tSQL folder extended for SQL Anywhere \"EXISTS\" and \"ENDIF\" keywords.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2887524&group_id=2439\">Feature #2887524.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE adds APIPath and AbbrevPath variables.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ uses pipes instead of temporary files for running tools. This should be more secure.\r\n\t</li>\r\n\t<li>\r\n\tFixed crash when calling SCI_STYLEGETFONT for a style which does not have a font set.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2857425&group_id=2439\">Bug #2857425.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed crash caused by not having sufficient styles allocated after choosing a lexer.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2881279&group_id=2439\">Bug #2881279.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed crash in SciTE using autocomplete word when word characters includes space.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2840141&group_id=2439\">Bug #2840141.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed bug with handling upper-case file extensions SciTE on GTK+.\r\n\t</li>\r\n\t<li>\r\n\tFixed SciTE loading files from sessions with folded folds where it would not\r\n\tbe scrolled to the correct location.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2882775&group_id=2439\">Bug #2882775.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed SciTE loading files from sessions when file no longer exists.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2883437&group_id=2439\">Bug #2883437.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed SciTE export to HTML using the wrong background colour.\r\n\t</li>\r\n\t<li>\r\n\tFixed crash when adding an annotation and then adding a new line after the annotation.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2929708&group_id=2439\">Bug #2929708.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed crash in SciTE setting a property to nil from Lua.\r\n\t</li>\r\n\t<li>\r\n\tSCI_GETSELTEXT fixed to return correct length.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2929441&group_id=2439\">Bug #2929441.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed text positioning problems with selection in some circumstances.\r\n\t</li>\r\n\t<li>\r\n\tFixed text positioning problems with ligatures on GTK+.\r\n\t</li>\r\n\t<li>\r\n\tFixed problem pasting into rectangular selection with caret at bottom caused text to go from the caret down\r\n\trather than replacing the selection.\r\n\t</li>\r\n\t<li>\r\n\tFixed problem replacing in a rectangular selection where only the final line was changed.\r\n\t</li>\r\n\t<li>\r\n\tFixed inability to select a rectangular area using Alt+Shift+Click at both corners.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2899746&group_id=2439\">Bug #2899746.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed problem moving to start/end of a rectangular selection with left/right key.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2871358&group_id=2439\">Bug #2871358.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed problem with Select All when there's a rectangular selection.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2930488&group_id=2439\">Bug #2930488.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed SCI_LINEDUPLICATE on a rectangular selection to not produce multiple discontinuous selections.\r\n\t</li>\r\n\t<li>\r\n\tVirtual space removed when performing delete word left or delete line left.\r\n\tVirtual space converted to real space for delete word right.\r\n\tPreserve virtual space when pressing Delete key.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2882566&group_id=2439\">Bug #2882566.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed problem where Shift+Alt+Down did not move through wrapped lines.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2871749&group_id=2439\">Bug #2871749.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed incorrect background colour when using coloured lines with virtual space.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2914691&group_id=2439\">Bug #2914691.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed failure to display wrap symbol for SC_WRAPVISUALFLAGLOC_END_BY_TEXT.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2936108&group_id=2439\">Bug #2936108.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed blank background colour with EOLFilled style on last line.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2890105&group_id=2439\">Bug #2890105.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed problem in VB lexer with keyword at end of file.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2901239&group_id=2439\">Bug #2901239.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed SciTE bug where double clicking on a tab closed the file.\r\n\t</li>\r\n\t<li>\r\n\tFixed SciTE brace matching commands to only work when the caret is next to the brace, not when\r\n\tit is in virtual space.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2885560&group_id=2439\">Bug #2885560.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed SciTE on Windows Vista to access files in the Program Files directory rather than allow Windows\r\n\tto virtualize access.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2916685&group_id=2439\">Bug #2916685.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed NSIS folder to handle keywords that start with '!'.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2872157&group_id=2439\">Bug #2872157.</a>\r\n\t</li>\r\n\t<li>\r\n\tChanged linkage of Scintilla_LinkLexers to \"C\" so that it can be used by clients written in C.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2844718&group_id=2439\">Bug #2844718.</a>\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite201.zip?download\">Release 2.01</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased on 19 August 2009.\r\n\t</li>\r\n\t<li>\r\n\tFix to positioning rectangular paste when viewing line ends.\r\n\t</li>\r\n\t<li>\r\n\tDon't insert new lines and indentation for line ends at end of rectangular paste.\r\n\t</li>\r\n\t<li>\r\n\tWhen not in additional selection typing mode, cutting a rectangular selection removes all of the selected text.\r\n\t</li>\r\n\t<li>\r\n\tRectangular selections are copied to the clipboard in document order, not in the order of selection.\r\n\t</li>\r\n\t<li>\r\n\tSCI_SETCURRENTPOS and SCI_SETANCHOR work in rectangular mode.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK+, drag and drop to a later position in the document now drops at the position.\r\n\t</li>\r\n\t<li>\r\n\tFix bug where missing property did not use default value.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite200.zip?download\">Release 2.0</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased on 11 August 2009.\r\n\t</li>\r\n\t<li>\r\n\tMultiple pieces of text can be selected simultaneously by holding control while dragging the mouse.\r\n\tTyping, backspace and delete may affect all selections together.\r\n\t</li>\r\n\t<li>\r\n\tVirtual space allows selecting beyond the last character on a line.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ path bar is now optional and defaults to off.\r\n\t</li>\r\n\t<li>\r\n\tMagikSF lexer recognizes numbers correctly.\r\n\t</li>\r\n\t<li>\r\n\tFolding of Python comments and blank lines improved. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=210240&group_id=2439\">Bug #210240.</a>\r\n\t</li>\r\n\t<li>\r\n\tBug fixed where background colour of last character in document leaked past that character.\r\n\t</li>\r\n\t<li>\r\n\tCrash fixed when adding marker beyond last line in document. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2830307&group_id=2439\">Bug #2830307.</a>\r\n\t</li>\r\n\t<li>\r\n\tResource leak fixed in SciTE for Windows when printing fails. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2816524&group_id=2439\">Bug #2816524.</a>\r\n\t</li>\r\n\t<li>\r\n\tBug fixed on Windows where the system caret was destroyed during destruction when another window\r\n\twas using the system caret. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2830223&group_id=2439\">Bug #2830223.</a>\r\n\t</li>\r\n\t<li>\r\n\tBug fixed where indentation guides were drawn over text when the indentation used a style with a different\r\n\tspace width to the default style.\r\n\t</li>\r\n\t<li>\r\n\tSciTE bug fixed where box comment added a bare line feed rather than the chosen line end. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2818104&group_id=2439\">Bug #2818104.</a>\r\n\t</li>\r\n\t<li>\r\n\tReverted fix that led to wrapping whole document when displaying the first line of the document.\r\n\t</li>\r\n\t<li>\r\n\tExport to LaTeX in SciTE fixed to work in more cases and not use as much space. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=1286548&group_id=2439\">Bug #1286548.</a>\r\n\t</li>\r\n\t<li>\r\n\tBug fixed where EN_CHANGE notification was sent when performing a paste operation in a\r\n\tread-only document. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2825485&group_id=2439\">Bug #2825485.</a>\r\n\t</li>\r\n\t<li>\r\n\tRefactored code so that Scintilla exposes less of its internal implementation and uses the C++ standard\r\n\tlibrary for some basic collections. Projects that linked to Scintilla's SString or PropSet classes\r\n\tshould copy this code from a previous version of Scintilla or from SciTE.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite179.zip?download\">Release 1.79</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased on 1 July 2009.\r\n\t</li>\r\n\t<li>\r\n\tMemory exhaustion and other exceptions handled by placing an error value into the\r\n\tstatus property rather than crashing.\r\n\tScintilla now builds with exception handling enabled and requires exception handling to be enabled. <br />\r\n\tThis is a major change and application developers should consider how they will deal with Scintilla exhausting\r\n\tmemory since Scintilla may not be in a stable state.\r\n\t</li>\r\n\t<li>\r\n\tDeprecated APIs removed. The symbols removed are:\r\n\t<ul>\r\n <li>SCI_SETCARETPOLICY</li>\r\n<li> CARET_CENTER</li>\r\n<li> CARET_XEVEN</li>\r\n<li> CARET_XJUMPS</li>\r\n<li> SC_FOLDFLAG_BOX</li>\r\n<li> SC_FOLDLEVELBOXHEADERFLAG</li>\r\n<li> SC_FOLDLEVELBOXFOOTERFLAG</li>\r\n<li> SC_FOLDLEVELCONTRACTED</li>\r\n<li> SC_FOLDLEVELUNINDENT</li>\r\n<li> SCN_POSCHANGED</li>\r\n<li> SCN_CHECKBRACE</li>\r\n<li> SCLEX_ASP</li>\r\n<li> SCLEX_PHP</li>\r\n</ul>\r\n\t</li>\r\n\t<li>\r\n\tCocoa platform added.\r\n\t</li>\r\n\t<li>\r\n\tNames of struct types in Scintilla.h now start with \"Sci_\" to avoid possible clashes with platform\r\n\tdefinitions. Currently, the old names still work but these will be phased out.\r\n\t</li>\r\n\t<li>\r\n\tWhen lines are wrapped, subsequent lines may be indented to match the indent of the initial line,\r\n\tor one more indentation level. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2796119&group_id=2439\">Feature #2796119.</a>\r\n\t</li>\r\n\t<li>\r\n\tAPIs added for finding the character at a point rather than an inter-character position. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2646738&group_id=2439\">Feature #2646738.</a>\r\n\t</li>\r\n\t<li>\r\n\tA new marker SC_MARK_BACKGROUND_UNDERLINE is drawn in the text area as an underline\r\n\tthe full width of the window.\r\n\t</li>\r\n\t<li>\r\n\tBatch file lexer understands variables surrounded by '!'.\r\n\t</li>\r\n\t<li>\r\n\tCAML lexer also supports SML.\r\n\t</li>\r\n\t<li>\r\n\tD lexer handles string and numeric literals more accurately. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2793782&group_id=2439\">Feature #2793782.</a>\r\n\t</li>\r\n\t<li>\r\n\tForth lexer is now case-insensitive and better supports numbers like $hex and %binary. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2804894&group_id=2439\">Feature #2804894.</a>\r\n\t</li>\r\n\t<li>\r\n\tLisp lexer treats '[', ']', '{', and '}' as balanced delimiters which is common usage. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2794989&group_id=2439\">Feature #2794989.</a>\r\n\t<br />\r\n\tIt treats keyword argument names as being equivalent to symbols. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2794901&group_id=2439\">Feature #2794901.</a>\r\n\t</li>\r\n\t<li>\r\n\tPascal lexer bug fixed to prevent hang when 'interface' near beginning of file. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2802863&group_id=2439\">Bug #2802863.</a>\r\n\t</li>\r\n\t<li>\r\n\tPerl lexer bug fixed where previous lexical states persisted causing \"/\" special case styling and\r\n\tsubroutine prototype styling to not be correct. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2809168&group_id=2439\">Bug #2809168.</a>\r\n\t</li>\r\n\t<li>\r\n\tXML lexer fixes bug where Unicode entities like '&amp;—' were broken into fragments. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2804760&group_id=2439\">Bug #2804760.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ enables scrolling the tab bar on recent versions of GTK+. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2061821&group_id=2439\">Feature #2061821.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows allows tab bar tabs to be reordered by drag and drop.\r\n\t</li>\r\n\t<li>\r\n\tUnit test script for Scintilla on Windows included with source code.\r\n\t</li>\r\n\t<li>\r\n\tUser defined menu items are now localized when there is a matching translation.\r\n\t</li>\r\n\t<li>\r\n\tWidth of icon column of autocompletion lists on GTK+ made more consistent.\r\n\t</li>\r\n\t<li>\r\n\tBug with slicing UTF-8 text into character fragments when there is a sequence of 100 or more 3 byte characters. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2780566&group_id=2439\">Bug #2780566.</a>\r\n\t</li>\r\n\t<li>\r\n\tFolding bugs introduced in 1.78 fixed. Some of the fix was generic and there was also a specific fix for C++.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed where a rectangular paste was not padding the line with sufficient spaces to align the pasted text.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed with showing all text on each line of multi-line annotations when styling the whole annotation using SCI_ANNOTATIONSETSTYLE. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2789430&group_id=2439\">Bug #2789430.</a>\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite178.zip?download\">Release 1.78</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased on 28 April 2009.\r\n\t</li>\r\n\t<li>\r\n\tAnnotation lines may be added to each line.\r\n\t</li>\r\n\t<li>\r\n\tA text margin may be defined with different text on each line.\r\n\t</li>\r\n\t<li>\r\n\tApplication actions may be added to the undo history.\r\n\t</li>\r\n\t<li>\r\n\tCan query the symbol defined for a marker.\r\n\tAn available symbol added for applications to indicate that plugins may allocate a marker.\r\n\t</li>\r\n\t<li>\r\n\tCan increase the amount of font ascent and descent.\r\n\t</li>\r\n\t<li>\r\n\tCOBOL lexer added. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2127406&group_id=2439\">Feature #2127406.</a>\r\n\t</li>\r\n\t<li>\r\n\tNimrod lexer added. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2642620&group_id=2439\">Feature #2642620.</a>\r\n\t</li>\r\n\t<li>\r\n\tPowerPro lexer added. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2195308&group_id=2439\">Feature #2195308.</a>\r\n\t</li>\r\n\t<li>\r\n\tSML lexer added. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2710950&group_id=2439\">Feature #2710950.</a>\r\n\t</li>\r\n\t<li>\r\n\tSORCUS Installation file lexer added. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2343375&group_id=2439\">Feature #2343375.</a>\r\n\t</li>\r\n\t<li>\r\n\tTACL lexer added. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2127406&group_id=2439\">Feature #2127406.</a>\r\n\t</li>\r\n\t<li>\r\n\tTAL lexer added. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2127406&group_id=2439\">Feature #2127406.</a>\r\n\t</li>\r\n\t<li>\r\n\tRewritten Pascal lexer with improved folding and other fixes. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2190650&group_id=2439\">Feature #2190650.</a>\r\n\t</li>\r\n\t<li>\r\n\tINDIC_ROUNDBOX translucency level can be modified. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2586290&group_id=2439\">Feature #2586290.</a>\r\n\t</li>\r\n\t<li>\r\n\tC++ lexer treats angle brackets in #include directives as quotes when styling.within.preprocessor. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2551033&group_id=2439\">Bug #2551033.</a>\r\n\t</li>\r\n\t<li>\r\n\tInno Setup lexer is sensitive to whether within the [Code] section and handles comments better. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2552973&group_id=2439\">Bug #2552973.</a>\r\n\t</li>\r\n\t<li>\r\n\tHTML lexer does not go into script mode when script tag is self-closing.\r\n\t</li>\r\n\t<li>\r\n\tHTML folder fixed where confused by comments when fold.html.preprocessor off. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2532774&group_id=2439\">Bug #2532774.</a>\r\n\t</li>\r\n\t<li>\r\n\tPerl lexer fixes problem with string matching caused by line endings. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2648342&group_id=2439\">Bug #2648342.</a>\r\n\t</li>\r\n\t<li>\r\n\tProgress lexer fixes problem with \"last-event:function\" phrase. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2483619&group_id=2439\">Bug #2483619.</a>\r\n\t</li>\r\n\t<li>\r\n\tProperties file lexer extended to handle RFC2822 text when lexer.props.allow.initial.spaces on.\r\n\t</li>\r\n\t<li>\r\n\tPython lexer adds options for Python 3 and Cython.\r\n\t</li>\r\n\t<li>\r\n\tShell lexer fixes heredoc problem caused by line endings. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2635257&group_id=2439\">Bug #2635257.</a>\r\n\t</li>\r\n\t<li>\r\n\tTeX lexer handles comment at end of line correctly. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2698766&group_id=2439\">Bug #2698766.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE retains selection range when performing a replace selection command. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=352439&aid=2339160&group_id=2439\">Feature #2339160.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE definition of word characters fixed to match documentation. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2464531&group_id=2439\">Bug #2464531.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ performing Search or Replace when dialog already shown now brings dialog to foreground.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2634224&group_id=2439\">Bug #2634224.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed encoding bug with calltips on GTK+.\r\n\t</li>\r\n\t<li>\r\n\tBlock caret drawn in correct place on wrapped lines. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2126144&group_id=2439\">Bug #2126144.</a>\r\n\t</li>\r\n\t<li>\r\n\tCompilation for 64 bit Windows works using MinGW. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2515578&group_id=2439\">Bug #2515578.</a>\r\n\t</li>\r\n\t<li>\r\n\tIncorrect memory freeing fixed on OS X.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2354098&group_id=2439\">Bug #2354098</a>,\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2671749&group_id=2439\">Bug #2671749.</a>\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ crash fixed on startup when child process exits before initialization complete.\r\n\t<a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2716987&group_id=2439\">Bug #2716987.</a>\r\n\t</li>\r\n\t<li>\r\n\tCrash fixed when AutoCompleteGetCurrent called with no active autocompletion.\r\n\t</li>\r\n\t<li>\r\n\tFlickering diminished when pressing Tab. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2723006&group_id=2439\">Bug #2723006.</a>\r\n\t</li>\r\n\t<li>\r\n\tNamespace compilation issues with GTK+ on OS X fixed.\r\n\t</li>\r\n\t<li>\r\n\tIncreased maximum length of SciTE's Language menu on GTK+ to 100 items. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2528241&group_id=2439\">Bug #2528241.</a>\r\n\t</li>\r\n\t<li>\r\n\tFixed incorrect Python lexing for multi-line continued strings. <a href=\"https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2450963&group_id=2439\">Bug #2450963.</a>\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite177.zip?download\">Release 1.77</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased on 18 October 2008.\r\n\t</li>\r\n\t<li>\r\n\tDirect temporary access to Scintilla's text buffer to allow simple efficient interfacing\r\n\tto libraries like regular expression libraries.\r\n\t</li>\r\n\t<li>\r\n\tScintilla on Windows can interpret keys as Unicode even when a narrow character\r\n\twindow with SCI_SETKEYSUNICODE.\r\n\t</li>\r\n\t<li>\r\n\tNotification sent when autocompletion cancelled.\r\n\t</li>\r\n\t<li>\r\n\tMySQL lexer added.\r\n\t</li>\r\n\t<li>\r\n\tLexer for gettext .po files added.\r\n\t</li>\r\n\t<li>\r\n\tAbaqus lexer handles program structure more correctly.\r\n\t</li>\r\n\t<li>\r\n\tAssembler lexer works with non-ASCII text.\r\n\t</li>\r\n\t<li>\r\n\tC++ lexer allows mixed case doc comment tags.\r\n\t</li>\r\n\t<li>\r\n\tCSS lexer updated and works with non-ASCII.\r\n\t</li>\r\n\t<li>\r\n\tDiff lexer adds style for changed lines, handles subversion diffs better and\r\n\tfixes styling and folding for lines containing chunk dividers (\"---\").\r\n\t</li>\r\n\t<li>\r\n\tFORTRAN lexer accepts more styles of compiler directive.\r\n\t</li>\r\n\t<li>\r\n\tHaskell lexer allows hexadecimal literals.\r\n\t</li>\r\n\t<li>\r\n\tHTML lexer improves PHP and JavaScript folding.\r\n\tPHP heredocs, nowdocs, strings and comments processed more accurately.\r\n\tInternet Explorer's non-standard &gt;comment&lt; tag supported.\r\n\tScript recognition in XML can be controlled with lexer.xml.allow.scripts property.\r\n\t</li>\r\n\t<li>\r\n\tLua lexer styles last character correctly.\r\n\t</li>\r\n\t<li>\r\n\tPerl lexer update.\r\n\t</li>\r\n\t<li>\r\n\tComment folding implemented for Ruby.\r\n\t</li>\r\n\t<li>\r\n\tBetter TeX folding.\r\n\t</li>\r\n\t<li>\r\n\tVerilog lexer updated.\r\n\t</li>\r\n\t<li>\r\n\tWindows Batch file lexer handles %~ and %*.\r\n\t</li>\r\n\t<li>\r\n\tYAML lexer allows non-ASCII text.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ implements \"Replace in Buffers\" in advanced mode.\r\n\t</li>\r\n\t<li>\r\n\tThe extender OnBeforeSave method can override the default file saving behaviour by retuning true.\r\n\t</li>\r\n\t<li>\r\n\tWindow position and recent files list may be saved into the session file.\r\n\t</li>\r\n\t<li>\r\n\tRight button press outside the selection moves the caret.\r\n\t</li>\r\n\t<li>\r\n\tSciTE load.on.activate works when closing a document reveals a changed document.\r\n\t</li>\r\n\t<li>\r\n\tSciTE bug fixed where eol.mode not used for initial buffer.\r\n\t</li>\r\n\t<li>\r\n\tSciTE bug fixed where a file could be saved as the same name as another\r\n\tbuffer leading to confusing behaviour.\r\n\t</li>\r\n\t<li>\r\n\tFixed display bug for long lines in same style on Windows.\r\n\t</li>\r\n\t<li>\r\n\tFixed SciTE crash when finding matching preprocessor command used on some files.\r\n\t</li>\r\n\t<li>\r\n\tDrawing performance improved for files with many blank lines.\r\n\t</li>\r\n\t<li>\r\n\tFolding bugs fixed where changing program text produced a decrease in fold level on a fold header line.\r\n\t</li>\r\n\t<li>\r\n\tClearing document style now clears all indicators.\r\n\t</li>\r\n\t<li>\r\n\tSciTE's embedded Lua updated to 5.1.4.\r\n\t</li>\r\n\t<li>\r\n\tSciTE will compile with versions of GTK+ before 2.8 again.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ bug fixed where multiple files not opened.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed with SCI_VCHOMEWRAP and SCI_VCHOMEWRAPEXTEND on white last line.\r\n\t</li>\r\n\t<li>\r\n\tRegular expression bug fixed where \"^[^(]+$\" matched empty lines.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite176.zip?download\">Release 1.76</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased on 16 March 2008.\r\n\t</li>\r\n\t<li>\r\n\tSupport for PowerShell.\r\n\t</li>\r\n\t<li>\r\n\tLexer added for Magik.\r\n\t</li>\r\n\t<li>\r\n\tDirector extension working on GTK+.\r\n\t</li>\r\n\t<li>\r\n\tDirector extension may set focus to SciTE through \"focus:\" message on GTK+.\r\n\t</li>\r\n\t<li>\r\n\tC++ folder handles final line better in some cases.\r\n\t</li>\r\n\t<li>\r\n\tSCI_COPYALLOWLINE added which is similar to SCI_COPY except that if the selection is empty then\r\n\tthe line holding the caret is copied. On Windows an extra clipboard format allows pasting this as a whole\r\n\tline before the current selection. This behaviour is compatible with Visual Studio.\r\n\t</li>\r\n\t<li>\r\n\tOn Windows, the horizontal scroll bar can handle wider files.\r\n\t</li>\r\n\t<li>\r\n\tOn Windows, a system palette leak was fixed. Should not affect many as palette mode is rarely used.\r\n\t</li>\r\n\t<li>\r\n\tInstall command on GTK+ no longer tries to set explicit owner.\r\n\t</li>\r\n\t<li>\r\n\tPerl lexer handles defined-or operator \"//\".\r\n\t</li>\r\n\t<li>\r\n\tOctave lexer fixes \"!=\" operator.\r\n\t</li>\r\n\t<li>\r\n\tOptimized selection change drawing to not redraw as much when not needed.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ no longer echoes Lua commands so is same as on Windows.\r\n\t</li>\r\n\t<li>\r\n\tAutomatic vertical scrolling limited to one line at a time so is not too fast.\r\n\t</li>\r\n\t<li>\r\n\tCrash fixed when line states set beyond end of line states. This occurred when lexers did not\r\n\tset a line state for each line.\r\n\t</li>\r\n\t<li>\r\n\tCrash in SciTE on Windows fixed when search for 513 character string fails.\r\n\t</li>\r\n\t<li>\r\n\tSciTE disables translucent features on Windows 9x due to crashes reported when using translucency.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed where whitespace background was not seen on wrapped lines.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite175.zip?download\">Release 1.75</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased on 22 November 2007.\r\n\t</li>\r\n\t<li>\r\n\tSome WordList and PropSet functionality moved from Scintilla to SciTE.\r\n\tProjects that link to Scintilla's code for these classes may need to copy\r\n\tcode from SciTE.\r\n\t</li>\r\n\t<li>\r\n\tBorland C++ can no longer build Scintilla.\r\n\t</li>\r\n\t<li>\r\n\tInvalid bytes in UTF-8 mode are displayed as hex blobs. This also prevents crashes due to\r\n\tpassing invalid UTF-8 to platform calls.\r\n\t</li>\r\n\t<li>\r\n\tIndentation guides enhanced to be visible on completely empty lines when possible.\r\n\t</li>\r\n\t<li>\r\n\tThe horizontal scroll bar may grow to match the widest line displayed.\r\n\t</li>\r\n\t<li>\r\n\tAllow autocomplete pop ups to appear outside client rectangle in some cases.\r\n\t</li>\r\n\t<li>\r\n\tWhen line state changed, SC_MOD_CHANGELINESTATE modification notification sent and\r\n\tmargin redrawn.\r\n\t</li>\r\n\t<li>\r\n\tSciTE scripts can access the menu command values IDM_*.\r\n\t</li>\r\n\t<li>\r\n\tSciTE's statement.end property has been implemented again.\r\n\t</li>\r\n\t<li>\r\n\tSciTE shows paths and matches in different styles for Find In Files.\r\n\t</li>\r\n\t<li>\r\n\tIncremental search in SciTE for Windows is modeless to make it easier to exit.\r\n\t</li>\r\n\t<li>\r\n\tFolding performance improved.\r\n\t</li>\r\n\t<li>\r\n\tSciTE for GTK+ now includes a Browse button in the Find In Files dialog.\r\n\t</li>\r\n\t<li>\r\n\tOn Windows versions that support Unicode well, Scintilla is a wide character window\r\n\twhich allows input for some less common languages like Armenian, Devanagari,\r\n\tTamil, and Georgian. To fully benefit, applications should use wide character calls.\r\n\t</li>\r\n\t<li>\r\n\tLua function names are exported from SciTE to allow some extension libraries to work.\r\n\t</li>\r\n\t<li>\r\n\tLexers added for Abaqus, Ansys APDL, Asymptote, and R.\r\n\t</li>\r\n\t<li>\r\n\tSCI_DELWORDRIGHTEND added for closer compatibility with GTK+ entry widget.\r\n\t</li>\r\n\t<li>\r\n\tThe styling buffer may now use all 8 bits in each byte for lexical states with 0 bits for indicators.\r\n\t</li>\r\n\t<li>\r\n\tMultiple characters may be set for SciTE's calltip.&lt;lexer&gt;.parameters.start property.\r\n\t</li>\r\n\t<li>\r\n\tBash lexer handles octal literals.\r\n\t</li>\r\n\t<li>\r\n\tC++/JavaScript lexer recognizes regex literals in more situations.\r\n\t</li>\r\n\t<li>\r\n\tHaskell lexer fixed for quoted strings.\r\n\t</li>\r\n\t<li>\r\n\tHTML/XML lexer does not notice XML indicator if there is\r\n\tnon-whitespace between the \"&lt;?\" and \"XML\".\r\n\tASP problem fixed where &lt;/ is used inside a comment.\r\n\t</li>\r\n\t<li>\r\n\tError messages from Lua 5.1 are recognized.\r\n\t</li>\r\n\t<li>\r\n\tFolding implemented for Metapost.\r\n\t</li>\r\n\t<li>\r\n\tPerl lexer enhanced for handling minus-prefixed barewords,\r\n\tunderscores in numeric literals and vector/version strings,\r\n\t^D and ^Z similar to __END__,\r\n\tsubroutine prototypes as a new lexical class,\r\n\tformats and format blocks as new lexical classes, and\r\n\t'/' suffixed keywords and barewords.\r\n\t</li>\r\n\t<li>\r\n\tPython lexer styles all of a decorator in the decorator style rather than just the name.\r\n\t</li>\r\n\t<li>\r\n\tYAML lexer styles colons as operators.\r\n\t</li>\r\n\t<li>\r\n\tFixed SciTE bug where undo would group together multiple separate modifications.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed where setting background colour of calltip failed.\r\n\t</li>\r\n\t<li>\r\n\tSciTE allows wildcard suffixes for file pattern based properties.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ bug fixed where user not prompted to save untitled buffer.\r\n\t</li>\r\n\t<li>\r\n\tSciTE bug fixed where property values from one file were not seen by lower priority files.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed when showing selection with a foreground colour change which highlighted\r\n\tan incorrect range in some positions.\r\n\t</li>\r\n\t<li>\r\n\tCut now invokes SCN_MODIFYATTEMPTRO notification.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed where caret not shown at beginning of wrapped lines.\r\n\tCaret made visible in some cases after wrapping and scroll bar updated after wrapping.\r\n\t</li>\r\n\t<li>\r\n\tModern indicators now work on wrapped lines.\r\n\t</li>\r\n\t<li>\r\n\tSome crashes fixed for 64-bit GTK+.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK+ clipboard features improved for VMWare tools copy and paste.\r\n\tSciTE exports the clipboard more consistently on shut down.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite174.zip?download\">Release 1.74</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased on 18 June 2007.\r\n\t</li>\r\n\t<li>\r\n\tOS X support.\r\n\t</li>\r\n\t<li>\r\n\tIndicators changed to be a separate data structure allowing more indicators. Storing indicators in high bits\r\n\tof styling bytes is deprecated and will be removed in the next version.\r\n\t</li>\r\n\t<li>\r\n\tUnicode support extended to all Unicode characters not just the Basic Multilingual Plane.\r\n\t</li>\r\n\t<li>\r\n\tPerformance improved on wide lines by breaking long runs in a single style into shorter segments.\r\n\t</li>\r\n\t<li>\r\n\tPerformance improved by caching layout of short text segments.\r\n\t</li>\r\n\t<li>\r\n\tSciTE includes Lua 5.1.\r\n\t</li>\r\n\t<li>\r\n\tCaret may be displayed as a block.\r\n\t</li>\r\n\t<li>\r\n\tLexer added for GAP.\r\n\t</li>\r\n\t<li>\r\n\tLexer added for PL/M.\r\n\t</li>\r\n\t<li>\r\n\tLexer added for Progress.\r\n\t</li>\r\n\t<li>\r\n\tSciTE session files have changed format to be like other SciTE .properties files\r\n\tand now use the extension .session.\r\n\tBookmarks and folds may optionally be saved in session files.\r\n\tSession files created with previous versions of SciTE will not load into this version.\r\n\t</li>\r\n\t<li>\r\n\tSciTE's extension and scripting interfaces add OnKey, OnDwellStart, and OnClose methods.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK+, copying to the clipboard does not include the text/urilist type since this caused problems when\r\n\tpasting into Open Office.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK+, Scintilla defaults caret blink rate to platform preference.\r\n\t</li>\r\n\t<li>\r\n\tDragging does not start until the mouse has been dragged a certain amount.\r\n\tThis stops spurious drags when just clicking inside the selection.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed where brace highlight not shown when caret line background set.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed in Ruby lexer where out of bounds access could occur.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed in XML folding where tags were not being folded because they are singletons in HTML.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed when many font names used.\r\n\t</li>\r\n\t<li>\r\n\tLayout bug fixed on GTK+ where fonts have ligatures available.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed with SCI_LINETRANSPOSE on a blank line.\r\n\t</li>\r\n\t<li>\r\n\tSciTE hang fixed when using UNC path with directory properties feature.\r\n\t</li>\r\n\t<li>\r\n\tBug on Windows fixed by examining dropped text for Unicode even in non-Unicode mode so it\r\n\tcan work when source only provides Unicode or when using an encoding different from the\r\n\tsystem default.\r\n\t</li>\r\n\t<li>\r\n\tSciTE bug on GTK+ fixed where Stop Executing did not work when more than a single process started.\r\n\t</li>\r\n\t<li>\r\n\tSciTE bug on GTK+ fixed where mouse wheel was not switching between buffers.\r\n\t</li>\r\n\t<li>\r\n\tMinor line end fix to PostScript lexer.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite173.zip?download\">Release 1.73</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased on 31 March 2007.\r\n\t</li>\r\n\t<li>\r\n\tSciTE adds a Directory properties file to configure behaviour for files in a directory and its subdirectories.\r\n\t</li>\r\n\t<li>\r\n\tStyle changes may be made during text modification events.\r\n\t</li>\r\n\t<li>\r\n\tRegular expressions recognize \\d, \\D, \\s, \\S, \\w, \\W, and \\xHH.\r\n\t</li>\r\n\t<li>\r\n\tSupport for cmake language added.\r\n\t</li>\r\n\t<li>\r\n\tMore Scintilla properties can be queried.\r\n\t</li>\r\n\t<li>\r\n\tEdge line drawn under text.\r\n\t</li>\r\n\t<li>\r\n\tA savesession command added to SciTE director interface.\r\n\t</li>\r\n\t<li>\r\n\tSciTE File | Encoding menu item names changed to be less confusing.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ dialog buttons reordered to follow guidelines.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ removed GTK+ 1.x compatible file dialog code.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ recognizes key names KeypadMultiply and KeypadDivide.\r\n\t</li>\r\n\t<li>\r\n\tBackground colour of line wrapping visual flag changed to STYLE_DEFAULT.\r\n\t</li>\r\n\t<li>\r\n\tMakefile lexing enhanced for ':=' operator and when lines start with tab.\r\n\t</li>\r\n\t<li>\r\n\tTADS3 lexer and folder improved.\r\n\t</li>\r\n\t<li>\r\n\tSCN_DOUBLECLICK notification may set SCI_SHIFT, SCI_CTRL, and SCI_ALT flags on modifiers field.\r\n\t</li>\r\n\t<li>\r\n\tSlow folding of large constructs in Python fixed.\r\n\t</li>\r\n\t<li>\r\n\tMSSQL folding fixed to be case-insensitive and fold at more keywords.\r\n\t</li>\r\n\t<li>\r\n\tSciTE's brace matching works better for HTML.\r\n\t</li>\r\n\t<li>\r\n\tDetermining API list items checks for specified parameters start character before default '('.\r\n\t</li>\r\n\t<li>\r\n\tHang fixed in HTML lexer.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed in with LineTranspose command where markers could move to different line.\r\n\t</li>\r\n\t<li>\r\n\tMemory released when buffer completely emptied.\r\n\t</li>\r\n\t<li>\r\n\tIf translucency not available on Windows, draw rectangular outline instead.\r\n\t</li>\r\n\t<li>\r\n\tBash lexer handles \"-x\" in \"--x-includes...\" better.\r\n\t</li>\r\n\t<li>\r\n\tAutoIt3 lexer fixes string followed by '+'.\r\n\t</li>\r\n\t<li>\r\n\tLinesJoin fixed where it stopped early due to not adjusting for inserted spaces..\r\n\t</li>\r\n\t<li>\r\n\tStutteredPageDown fixed when lines wrapped.\r\n\t</li>\r\n\t<li>\r\n\tFormatRange fixed to not double count line number width which could lead to a large space.\r\n\t</li>\r\n\t<li>\r\n\tSciTE Export As PDF and Latex commands fixed to format floating point numbers with '.' even in locales\r\n\tthat use ','.\r\n\t</li>\r\n\t<li>\r\n\tSciTE bug fixed where File | New could produce buffer with contents of previous file when using read-only mode.\r\n\t</li>\r\n\t<li>\r\n\tSciTE retains current scroll position when switching buffers and fold.on.open set.\r\n\t</li>\r\n\t<li>\r\n\tSciTE crash fixed where '*' used to invoke parameters dialog.\r\n\t</li>\r\n\t<li>\r\n\tSciTE bugs when writing large UCS-2 files fixed.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed when scrolling inside a SCN_PAINTED event by invalidating window\r\n\trather than trying to perform synchronous painting.\r\n\t</li>\r\n\t<li>\r\n\tSciTE for GTK+ View | Full Screen works on recent versions of GTK+.\r\n\t</li>\r\n\t<li>\r\n\tSciTE for Windows enables and disables toolbar commands correctly.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite172.zip?download\">Release 1.72</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased on 15 January 2007.\r\n\t</li>\r\n\t<li>\r\n\tPerformance of per-line data improved.\r\n\t</li>\r\n\t<li>\r\n\tSC_STARTACTION flag set on the first modification notification in an undo\r\n\ttransaction to help synchronize the container's undo stack with Scintilla's.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK+ drag and drop defaults to move rather than copy.\r\n\t</li>\r\n\t<li>\r\n\tScintilla supports extending appearance of selection to right hand margin.\r\n\t</li>\r\n\t<li>\r\n\tIncremental search available on GTK+.\r\n\t</li>\r\n\t<li>\r\n\tSciTE Indentation Settings dialog available on GTK+ and adds a \"Convert\" button.\r\n\t</li>\r\n\t<li>\r\n\tFind in Files can optionally ignore binary files or directories that start with \".\".\r\n\t</li>\r\n\t<li>\r\n\tLexer added for \"D\" language.\r\n\t</li>\r\n\t<li>\r\n\tExport as HTML shows folding with underline lines and +/- symbols.\r\n\t</li>\r\n\t<li>\r\n\tRuby lexer interprets interpolated strings as expressions.\r\n\t</li>\r\n\t<li>\r\n\tLua lexer fixes some cases of numeric literals.\r\n\t</li>\r\n\t<li>\r\n\tC++ folder fixes bug with \"@\" in doc comments.\r\n\t</li>\r\n\t<li>\r\n\tNSIS folder handles !if and related commands.\r\n\t</li>\r\n\t<li>\r\n\tInno setup lexer adds styling for single and double quoted strings.\r\n\t</li>\r\n\t<li>\r\n\tMatlab lexer handles backslashes in string literals correctly.\r\n\t</li>\r\n\t<li>\r\n\tHTML lexer fixed to allow \"?&gt;\" in comments in Basic script.\r\n\t</li>\r\n\t<li>\r\n\tAdded key codes for Windows key and Menu key.\r\n\t</li>\r\n\t<li>\r\n\tLua script method scite.MenuCommand(x) performs a menu command.\r\n\t</li>\r\n\t<li>\r\n\tSciTE bug fixed with box comment command near start of file setting selection to end of file.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+, fixed loop that occurred with automatic loading for an unreadable file.\r\n\t</li>\r\n\t<li>\r\n\tSciTE asks whether to save files when Windows shuts down.\r\n\t</li>\r\n\t<li>\r\n\tSave Session on Windows now defaults the extension to \"ses\".\r\n\t</li>\r\n\t<li>\r\n\tBug fixed with single character keywords.\r\n\t</li>\r\n\t<li>\r\n\tFixed infinite loop for SCI_GETCOLUMN for position beyond end of document.\r\n\t</li>\r\n\t<li>\r\n\tFixed failure to accept typing on Solaris/GTK+ when using default ISO-8859-1 encoding.\r\n\t</li>\r\n\t<li>\r\n\tFixed warning from Lua in SciTE when creating a new buffer when already have\r\n\tmaximum number of buffers open.\r\n\t</li>\r\n\t<li>\r\n\tCrash fixed with \"%%\" at end of batch file.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite171.zip?download\">Release 1.71</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased on 21 August 2006.\r\n\t</li>\r\n\t<!--li>\r\n\tOn GTK+ drag and drop defaults to move rather than copy.\r\n\t</li-->\r\n\t<li>\r\n\tDouble click notification includes line and position.\r\n\t</li>\r\n\t<li>\r\n\tVB lexer bugs fixed for preprocessor directive below a comment or some other states and\r\n\tto use string not closed style back to the starting quote when there are internal doubled quotes.\r\n\t</li>\r\n\t<li>\r\n\tC++ lexer allows identifiers to contain '$' and non-ASCII characters such as UTF-8.\r\n\tThe '$' character can be disallowed with lexer.cpp.allow.dollars=0.\r\n\t</li>\r\n\t<li>\r\n\tPerl lexer allows UTF-8 identifiers and has some other small improvements.\r\n\t</li>\r\n\t<li>\r\n\tSciTE's $(CurrentWord) uses word.characters.&lt;filepattern&gt; to define the word\r\n\trather than a hardcoded list of word characters.\r\n\t</li>\r\n\t<li>\r\n\tSciTE Export as HTML adds encoding information for UTF-8 file and fixes DOCTYPE.\r\n\t</li>\r\n\t<li>\r\n\tSciTE session and .recent files default to the user properties directory rather than global\r\n\tproperties directory.\r\n\t</li>\r\n\t<li>\r\n\tLeft and right scroll events handled correctly on GTK+ and horizontal scroll bar has more sensible\r\n\tdistances for page and arrow clicks.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ tab bar fixed to work on recent versions of GTK+.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK+, if the approximate character set conversion is unavailable, a second attempt is made\r\n\twithout approximations. This may allow keyboard input and paste to work on older systems.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ can redefine the Insert key.\r\n\t</li>\r\n\t<li>\r\n\tSciTE scripting interface bug fixed where some string properties could not be changed.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite170.zip?download\">Release 1.70</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased on 20 June 2006.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK+, character set conversion is performed using an option that allows approximate conversions rather\r\n\tthan failures when a character can not be converted. This may lead to similar characters being inserted or\r\n\twhen no similar character is available a '?' may be inserted.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK+, the internationalized IM (Input Method) feature is used for all typed input for all character sets.\r\n\t</li>\r\n\t<li>\r\n\tScintilla has new margin types SC_MARGIN_BACK and SC_MARGIN_FORE that use the default\r\n\tstyle's background and foreground colours (normally white and black) as the background to the margin.\r\n\t</li>\r\n\t<li>\r\n\tScintilla/GTK+ allows file drops on Windows when drop is of type DROPFILES_DND\r\n\tas well as text/uri-list.\r\n\t</li>\r\n\t<li>\r\n\tCode page can only be set to one of the listed valid values.\r\n\t</li>\r\n\t<li>\r\n\tText wrapping fixed for cases where insertion was not wide enough to trigger\r\n\twrapping before being styled but was after styling.\r\n\t</li>\r\n\t<li>\r\n\tSciTE find marks are removed before printing or exporting to avoid producing incorrect styles.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite169.zip?download\">Release 1.69</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased on 29 May 2006.\r\n\t</li>\r\n\t<li>\r\n\tSciTE supports z-order based buffer switching on Ctrl+Tab.\r\n\t</li>\r\n\t<li>\r\n\tTranslucent support for selection and whole line markers.\r\n\t</li>\r\n\t<li>\r\n\tSciTE may have per-language abbreviations files.\r\n\t</li>\r\n\t<li>\r\n\tSupport for Spice language.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK+ autocompletion lists are optimized and use correct selection colours.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK+ the URI data type is preferred in drag and drop so that applications\r\n\twill see files dragged from the shell rather than dragging the text of the file name\r\n\tinto the document.\r\n\t</li>\r\n\t<li>\r\n\tIncreased number of margins to 5.\r\n\t</li>\r\n\t<li>\r\n\tBasic lexer allows include directive $include: \"file name\".\r\n\t</li>\r\n\t<li>\r\n\tSQL lexer no longer bases folding on indentation.\r\n\t</li>\r\n\t<li>\r\n\tLine ends are transformed when copied to clipboard on\r\n\tWindows/GTK+2 as well as Windows/GTK+ 1.\r\n\t</li>\r\n\t<li>\r\n\tLexing code masks off the indicator bits on the start style before calling the lexer\r\n\tto avoid confusing the lexer when an application has used an indicator.\r\n\t</li>\r\n\t<li>\r\n\tSciTE savebefore:yes only saves the file when it has been changed.\r\n\t</li>\r\n\t<li>\r\n\tSciTE adds output.initial.hide setting to allow setting the size of the output pane\r\n\twithout it showing initially.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows Go To dialog allows line number with more digits.\r\n\t</li>\r\n\t<li>\r\n\tBug in HTML lexer fixed where a segment of PHP could switch scripting language\r\n\tbased on earlier text on that line.\r\n\t</li>\r\n\t<li>\r\n\tMemory bug fixed when freeing regions on GTK+.\r\n\tOther minor bugs fixed on GTK+.\r\n\t</li>\r\n\t<li>\r\n\tDeprecated GTK+ calls in Scintilla replaced with current calls.\r\n\t</li>\r\n\t<li>\r\n\tFixed a SciTE bug where closing the final buffer, if read-only, left the text present in an\r\n\tuntitled buffer.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed in bash lexer that prevented folding.\r\n\t</li>\r\n\t<li>\r\n\tCrash fixed in bash lexer when backslash at end of file.\r\n\t</li>\r\n\t<li>\r\n\tCrash on recent releases of GTK+ 2.x avoided by changing default font from X\r\n\tcore font to Pango font \"!Sans\".\r\n\t</li>\r\n\t<li>\r\n\tFix for SciTE properties files where multiline properties continued over completely blank lines.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed in SciTE/GTK+ director interface where more data available than\r\n\tbuffer size.\r\n\t</li>\r\n\t<li>\r\n\tMinor visual fixes to SciTE splitter on GTK+.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite168.zip?download\">Release 1.68</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased on 9 March 2006.\r\n\t</li>\r\n\t<li>\r\n\tTranslucent drawing implemented for caret line and box indicators.\r\n\t</li>\r\n\t<li>\r\n\tLexer specifically for TCL is much more accurate than reusing C++ lexer.\r\n\t</li>\r\n\t<li>\r\n\tSupport for Inno Setup scripts.\r\n\t</li>\r\n\t<li>\r\n\tSupport for Opal language.\r\n\t</li>\r\n\t<li>\r\n\tCalltips may use a new style, STYLE_CALLTIP which allows choosing a\r\n\tdifferent font for calltips.\r\n\t</li>\r\n\t<li>\r\n\tPython lexer styles comments on decorators.\r\n\t</li>\r\n\t<li>\r\n\tHTML lexer refined handling of \"?>\" and \"%>\" within server\r\n\tside scripts.\r\n\t</li>\r\n\t<li>\r\n\tBatch file lexer improved.\r\n\t</li>\r\n\t<li>\r\n\tEiffel lexer doesn't treat '.' as a name character.\r\n\t</li>\r\n\t<li>\r\n\tLua lexer handles length operator, #, and hex literals.\r\n\t</li>\r\n\t<li>\r\n\tProperties file lexer has separate style for keys.\r\n\t</li>\r\n\t<li>\r\n\tPL/SQL folding improved.\r\n\t</li>\r\n\t<li>\r\n\tSciTE Replace dialog always searches in forwards direction.\r\n\t</li>\r\n\t<li>\r\n\tSciTE can detect language of file from initial #! line.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ supports output.scroll=2 setting.\r\n\t</li>\r\n\t<li>\r\n\tSciTE can perform an import a properties file from the command line.\r\n\t</li>\r\n\t<li>\r\n\tSet of word characters used for regular expression \\&lt; and \\&gt;.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed with SCI_COPYTEXT stopping too early.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed with splitting lines so that all lines are split.\r\n\t</li>\r\n\t<li>\r\n\tSciTE calls OnSwitchFile when closing one buffer causes a switch to another.\r\n\t</li>\r\n\t<li>\r\n\tSciTE bug fixed where properties were being reevaluated without good reason\r\n\tafter running a macro.\r\n\t</li>\r\n\t<li>\r\n\tCrash fixed when clearing document with some lines contracted in word wrap mode.\r\n\t</li>\r\n\t<li>\r\n\tPalette expands as more entries are needed.\r\n\t</li>\r\n\t<li>\r\n\tSCI_POSITIONFROMPOINT returns more reasonable value when close to\r\n\tlast text on a line.\r\n\t</li>\r\n\t<li>\r\n\tOn Windows, long pieces of text may be drawn in segments if they fail to draw\r\n\tas a whole.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed with bad drawing when some visual changes made inside SCN_UPDATEUI\r\n\tnotification.\r\n\t</li>\r\n\t<li>\r\n\tSciTE bug fixed with groupundo setting.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite167.zip?download\">Release 1.67</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased on 17 December 2005.\r\n\t</li>\r\n\t<li>\r\n\tScintilla checks the paint region more accurately when seeing if an area is being\r\n\trepainted. Platform layer implementations may need to change for this to take\r\n\teffect. This fixes some drawing and styling bugs. Also optimized some parts of\r\n\tmarker code to only redraw the line of the marker rather than whole of the margin.\r\n\t</li>\r\n\t<li>\r\n\tQuoted identifier style for SQL. SQL folding performed more simply.\r\n\t</li>\r\n\t<li>\r\n\tRuby lexer improved to better handle here documents and non-ASCII\r\n\tcharacters.\r\n\t</li>\r\n\t<li>\r\n\tLua lexer supports long string and block comment syntax from Lua 5.1.\r\n\t</li>\r\n\t<li>\r\n\tBash lexer handles here documents better.\r\n\t</li>\r\n\t<li>\r\n\tJavaScript lexing recognizes regular expressions more accurately and includes flag\r\n\tcharacters in the regular expression style. This is both in JavaScript files and when\r\n\tJavaScript is embedded in HTML.\r\n\t</li>\r\n\t<li>\r\n\tScintilla API provided to reveal how many style bits are needed for the\r\n\tcurrent lexer.\r\n\t</li>\r\n\t<li>\r\n\tSelection duplicate added.\r\n\t</li>\r\n\t<li>\r\n\tScintilla API for adding a set of markers to a line.\r\n\t</li>\r\n\t<li>\r\n\tDBCS encodings work on Windows 9x.\r\n\t</li>\r\n\t<li>\r\n\tConvention defined for property names to be used by lexers and folders\r\n\tso they can be automatically discovered and forwarded from containers.\r\n\t</li>\r\n\t<li>\r\n\tDefault bookmark in SciTE changed to a blue sphere image.\r\n\t</li>\r\n\t<li>\r\n\tSciTE stores the time of last asking for a save separately for each buffer\r\n\twhich fixes bugs with automatic reloading.\r\n\t</li>\r\n\t<li>\r\n\tOn Windows, pasted text has line ends converted to current preference.\r\n\tGTK+ already did this.\r\n\t</li>\r\n\t<li>\r\n\tKid template language better handled by HTML lexer by finishing ASP Python\r\n\tmode when a ?> is found.\r\n\t</li>\r\n\t<li>\r\n\tSciTE counts number of characters in a rectangular selection correctly.\r\n\t</li>\r\n\t<li>\r\n\t64-bit compatibility improved. One change that may affect user code is that\r\n\tthe notification message header changed to include a pointer-sized id field\r\n\tto match the current Windows definition.\r\n\t</li>\r\n\t<li>\r\n\tEmpty ranges can no longer be dragged.\r\n\t</li>\r\n\t<li>\r\n\tCrash fixed when calls made that use layout inside the painted notification.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed where Scintilla created pixmap buffers that were too large leading\r\n\tto failures when many instances used.\r\n\t</li>\r\n\t<li>\r\n\tSciTE sets the directory of a new file to the directory of the currently\r\n\tactive file.\r\n\t</li>\r\n\t<li>\r\n\tSciTE allows choosing a code page for the output pane.\r\n\t</li>\r\n\t<li>\r\n\tSciTE HTML exporter no longer honours monospaced font setting.\r\n\t</li>\r\n\t<li>\r\n\tLine layout cache in page mode caches the line of the caret. An assertion is\r\n\tnow used to ensure that the layout reentrancy problem that caused this\r\n\tis easier to find.\r\n\t</li>\r\n\t<li>\r\n\tSpeed optimized for long lines and lines containing many control characters.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed in brace matching in DBCS files where byte inside character\r\n\tis same as brace.\r\n\t</li>\r\n\t<li>\r\n\tIndent command does not indent empty lines.\r\n\t</li>\r\n\t<li>\r\n\tSciTE bug fixed for commands that operate on files with empty extensions.\r\n\t</li>\r\n\t<li>\r\n\tSciTE bug fixed where monospaced option was copied for subsequently opened files.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows bug fixed in the display of a non-ASCII search string\r\n\twhich can not be found.\r\n\t</li>\r\n\t<li>\r\n\tBugs fixed with nested calls displaying a new calltip while one is already\r\n\tdisplayed.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed when styling PHP strings.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed when styling C++ continued preprocessor lines.\r\n\t</li>\r\n\t<li>\r\n\tSciTE bug fixed where opening file from recently used list reset choice of\r\n\tlanguage.\r\n\t</li>\r\n\t<li>\r\n\tSciTE bug fixed when compiled with NO_EXTENSIONS and\r\n\tclosing one file closes the application.\r\n\t</li>\r\n\t<li>\r\n\tSciTE crash fixed for error messages that look like Lua messages but aren't\r\n\tin the same order.\r\n\t</li>\r\n\t<li>\r\n\tRemaining fold box support deprecated. The symbols SC_FOLDLEVELBOXHEADERFLAG,\r\n   SC_FOLDLEVELBOXFOOTERFLAG, SC_FOLDLEVELCONTRACTED,\r\n   SC_FOLDLEVELUNINDENT, and SC_FOLDFLAG_BOX are deprecated.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite166.zip?download\">Release 1.66</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased on 26 August 2005.\r\n\t</li>\r\n\t<li>\r\n\tNew, more ambitious Ruby lexer.\r\n\t</li>\r\n\t<li>\r\n\tSciTE Find in Files dialog has options for matching case and whole words which are\r\n\tenabled when the internal find command is used.\r\n\t</li>\r\n\t<li>\r\n\tSciTE output pane can display automatic completion after \"$(\" typed.\r\n\tAn initial \">\" on a line is ignored when Enter pressed.\r\n\t</li>\r\n\t<li>\r\n\tC++ lexer recognizes keywords within line doc comments. It continues styles over line\r\n\tend characters more consistently so that eolfilled style can be used for preprocessor lines\r\n\tand line comments.\r\n\t</li>\r\n\t<li>\r\n\tVB lexer improves handling of file numbers and date literals.\r\n\t</li>\r\n\t<li>\r\n\tLua folder handles repeat until, nested comments and nested strings.\r\n\t</li>\r\n\t<li>\r\n\tPOV lexer improves handling of comment lines.\r\n\t</li>\r\n\t<li>\r\n\tAU3 lexer and folder updated. COMOBJ style added.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed with text display on GTK+ with Pango 1.8.\r\n\t</li>\r\n\t<li>\r\n\tCaret painting avoided when not focused.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ handles file names used to reference properties as case-sensitive.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ Save As and Export commands set the file name field.\r\n\tOn GTK+ the Export commands modify the file name in the same way as on Windows.\r\n\t</li>\r\n\t<li>\r\n\tFixed SciTE problem where confirmation was not displaying when closing a file where all\r\n\tcontents had been deleted.\r\n\t</li>\r\n\t<li>\r\n\tMiddle click on SciTE tab now closes correct buffer on Windows when tool bar is visible.\r\n\t</li>\r\n\t<li>\r\n\tSciTE bugs fixed where files contained in directory that includes '.' character.\r\n\t</li>\r\n\t<li>\r\n\tSciTE bug fixed where import in user options was reading file from directory of\r\n\tglobal options.\r\n\t</li>\r\n\t<li>\r\n\tSciTE calltip bug fixed where single line calltips had arrow displayed incorrectly.\r\n\t</li>\r\n\t<li>\r\n\tSciTE folding bug fixed where empty lines were shown for no reason.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed where 2 byte per pixel XPM images caused crash although they are still not\r\n\tdisplayed.\r\n\t</li>\r\n\t<li>\r\n\tAutocompletion list size tweaked.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite165.zip?download\">Release 1.65</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased on 1 August 2005.\r\n\t</li>\r\n\t<li>\r\n\tFreeBasic support.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows handles command line arguments\r\n\t\"-\" (read standard input into buffer),\r\n\t\"--\" (read standard input into output pane) and\r\n\t\"-@\" (read file names from standard input and open each).\r\n\t</li>\r\n\t<li>\r\n\tSciTE includes a simple implementation of Find in Files which is used if no find.command is set.\r\n\t</li>\r\n\t<li>\r\n\tSciTE can close tabs with a mouse middle click.\r\n\t</li>\r\n\t<li>\r\n\tSciTE includes a save.all.for.build setting.\r\n\t</li>\r\n\t<li>\r\n\tFolder for MSSQL.\r\n\t</li>\r\n\t<li>\r\n\tBatch file lexer understands more of the syntax and the behaviour of built in commands.\r\n\t</li>\r\n\t<li>\r\n\tPerl lexer handles here docs better; disambiguates barewords, quote-like delimiters, and repetition operators;\r\n\thandles Pods after __END__; recognizes numbers better; and handles some typeglob special variables.\r\n\t</li>\r\n\t<li>\r\n\tLisp adds more lexical states.\r\n\t</li>\r\n\t<li>\r\n\tPHP allows spaces after &lt;&lt;&lt;.\r\n\t</li>\r\n\t<li>\r\n\tTADS3 has a simpler set of states and recognizes identifiers.\r\n\t</li>\r\n\t<li>\r\n\tAvenue elseif folds better.\r\n\t</li>\r\n\t<li>\r\n\tErrorlist lexer treats lines starting with '+++' and '---' as separate\r\n\tstyles from '+' and '-' as they indicate file names in diffs.\r\n\t</li>\r\n\t<li>\r\n\tSciTE error recognizer handles file paths in extra explanatory lines from MSVC\r\n\tand in '+++' and '---' lines from diff.\r\n\t</li>\r\n\t<li>\r\n\tBugs fixed in SciTE and Scintilla folding behaviour when text pasted before\r\n\tfolded text caused unnecessary\r\n\tunfolding and cutting text could lead to text being irretrievably hidden.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows uses correct font for dialogs and better font for tab bar\r\n\tallowing better localization\r\n\t</li>\r\n\t<li>\r\n\tWhen Windows is used with a secondary monitor before the primary\r\n\tmonitor, autocompletion lists are not forced onto the primary monitor.\r\n\t</li>\r\n\t<li>\r\n\tScintilla calltip bug fixed where down arrow setting wrong value in notification\r\n\tif not in first line. SciTE bug fixed where second arrow only shown on multiple line\r\n\tcalltip and was therefore misinterpreting the notification value.\r\n\t</li>\r\n\t<li>\r\n\tLexers will no longer be re-entered recursively during, for example, fold level setting.\r\n\t</li>\r\n\t<li>\r\n\tUndo of typing in overwrite mode undoes one character at a time rather than requiring a removal\r\n\tand addition step for each character.\r\n\t</li>\r\n\t<li>\r\n\tEM_EXSETSEL(0,-1) fixed.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed where part of a rectangular selection was not shown as selected.\r\n\t</li>\r\n\t<li>\r\n\tAutocomplete window size fixed.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite164.zip?download\">Release 1.64</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased on 6 June 2005.\r\n\t</li>\r\n\t<li>\r\n\tTADS3 support\r\n\t</li>\r\n\t<li>\r\n\tSmalltalk support.\r\n\t</li>\r\n\t<li>\r\n\tRebol support.\r\n\t</li>\r\n\t<li>\r\n\tFlagship (Clipper / XBase) support.\r\n\t</li>\r\n\t<li>\r\n\tCSound support.\r\n\t</li>\r\n\t<li>\r\n\tSQL enhanced to support SQL*Plus.\r\n\t</li>\r\n\t<li>\r\n\tSC_MARK_FULLRECT margin marker fills the whole marker margin for marked\r\n\tlines with a colour.\r\n\t</li>\r\n\t<li>\r\n\tPerformance improved for some large undo and redo operations and modification flags\r\n\tadded in notifications.\r\n\t</li>\r\n\t<li>\r\n\tSciTE adds command equivalents for fold margin mouse actions.\r\n\t</li>\r\n\t<li>\r\n\tSciTE adds OnUpdateUI to set of events that can be handled by a Lua script.\r\n\t</li>\r\n\t<li>\r\n\tProperties set in Scintilla can be read.\r\n\t</li>\r\n\t<li>\r\n\tGTK+ SciTE exit confirmation adds Cancel button.\r\n\t</li>\r\n\t<li>\r\n\tMore accurate lexing of numbers in PHP and Caml.\r\n\t</li>\r\n\t<li>\r\n\tPerl can fold POD and package sections. POD verbatim section style.\r\n\tGlobbing syntax recognized better.\r\n\t</li>\r\n\t<li>\r\n\tContext menu moved slightly on GTK+ so that it will be under the mouse and will\r\n\tstay open if just clicked rather than held.\r\n\t</li>\r\n\t<li>\r\n\tRectangular selection paste works the same whichever direction the selection was dragged in.\r\n\t</li>\r\n\t<li>\r\n\tEncodedFromUTF8 handles -1 length argument as documented.\r\n\t</li>\r\n\t<li>\r\n\tUndo and redo can cause SCN_MODIFYATTEMPTRO notifications.\r\n\t</li>\r\n\t<li>\r\n\tIndicators display correctly when they start at the second character on a line.\r\n\t</li>\r\n\t<li>\r\n\tSciTE Export As HTML uses standards compliant CSS.\r\n\t</li>\r\n\t<li>\r\n\tSciTE automatic indentation handles keywords for indentation better.\r\n\t</li>\r\n\t<li>\r\n\tSciTE fold.comment.python property removed as does not work.\r\n\t</li>\r\n\t<li>\r\n\tFixed problem with character set conversion when pasting on GTK+.\r\n\t</li>\r\n\t<li>\r\n\tSciTE default character set changed from ANSI_CHARSET to DEFAULT_CHARSET.\r\n\t</li>\r\n\t<li>\r\n\tFixed crash when creating empty autocompletion list.\r\n\t</li>\r\n\t<li>\r\n\tAutocomplete window size made larger under some conditions to make truncation less common.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed where changing case of a selection did not affect initial character of lines\r\n\tin multi-byte encodings.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed where rectangular selection not displayed after Alt+Shift+Click.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite163.zip?download\">Release 1.63</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased on 4 April 2005.\r\n\t</li>\r\n\t<li>\r\n\tAutocompletion on Windows changed to use pop up window, be faster,\r\n\tallow choice of maximum width and height, and to highlight only the text of the\r\n\tselected item rather than both the text and icon if any.\r\n\t</li>\r\n\t<li>\r\n\tExtra items can be added to the context menu in SciTE.\r\n\t</li>\r\n\t<li>\r\n\tCharacter wrap mode in Scintilla helps East Asian languages.\r\n\t</li>\r\n\t<li>\r\n\tLexer added for Haskell.\r\n\t</li>\r\n\t<li>\r\n\tObjective Caml support.\r\n\t</li>\r\n\t<li>\r\n\tBlitzBasic and PureBasic support.\r\n\t</li>\r\n\t<li>\r\n\tCSS support updated to handle CSS2.\r\n\t</li>\r\n\t<li>\r\n\tC++ lexer is more selective about document comment keywords.\r\n\t</li>\r\n\t<li>\r\n\tAutoIt 3 lexer improved.\r\n\t</li>\r\n\t<li>\r\n\tLua lexer styles end of line characters on comment and preprocessor\r\n\tlines so that the eolfilled style can be applied to them.\r\n\t</li>\r\n\t<li>\r\n\tNSIS support updated for line continuations, box comments, SectionGroup and\r\n\tPageEx, and with more up-to-date properties.\r\n\t</li>\r\n\t<li>\r\n\tClarion lexer updated to perform folding and have more styles.\r\n\t</li>\r\n\t<li>\r\n\tSQL lexer gains second set of keywords.\r\n\t</li>\r\n\t<li>\r\n\tErrorlist lexer recognizes Borland Delphi error messages.\r\n\t</li>\r\n\t<li>\r\n\tMethod added for determining number of visual lines occupied by a document\r\n\tline due to wrapping.\r\n\t</li>\r\n\t<li>\r\n\tSticky caret mode does not modify the preferred caret x position when typing\r\n\tand may be useful for typing columns of text.\r\n\t</li>\r\n\t<li>\r\n\tDwell end notification sent when scroll occurs.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK+, Scintilla requisition height is screen height rather than large fixed value.\r\n\t</li>\r\n\t<li>\r\n\tCase insensitive autocompletion prefers exact case match.\r\n\t</li>\r\n\t<li>\r\n\tSCI_PARADOWN and SCI_PARAUP treat lines containing only white\r\n\tspace as empty and handle text hidden by folding.\r\n\t</li>\r\n\t<li>\r\n\tScintilla on Windows supports WM_PRINTCLIENT although there are some\r\n\tlimitations.\r\n\t</li>\r\n\t<li>\r\n\tSCN_AUTOCSELECTION notification sent when user selects from autoselection list.\r\n\t</li>\r\n\t<li>\r\n\tSciTE's standard properties file sets buffers to 10, uses Pango fonts on GTK+ and\r\n\thas dropped several languages to make the menu fit on screen.\r\n\t</li>\r\n\t<li>\r\n\tSciTE's encoding cookie detection loosened so that common XML files will load\r\n\tin UTF-8 if that is their declared encoding.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ changes menus and toolbars to not be detachable unless turned\r\n\ton with a property. Menus no longer tear off. The toolbar may be set to use the\r\n\tdefault theme icons rather than SciTE's set. Changed key for View | End of Line\r\n\tbecause of a conflict. Language menu can contain more items.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ 2.x allows the height and width of the file open file chooser to\r\n\tbe set, for the show hidden files check box to be set from an option and for it\r\n\tto be opened in the directory of the current file explicitly. Enter key works in\r\n\tsave chooser.\r\n\t</li>\r\n\t<li>\r\n\tScintilla lexers should no longer see bits in style bytes that are outside the set\r\n\tthey modify so should be able to correctly lex documents where the container\r\n\thas used indicators.\r\n\t</li>\r\n\t<li>\r\n\tSciTE no longer asks to save before performing a revert.\r\n\t</li>\r\n\t<li>\r\n\tSciTE director interface adds a reloadproperties command to reload properties\r\n\tfrom files.\r\n\t</li>\r\n\t<li>\r\n\tAllow build on CYGWIN platform.\r\n\t</li>\r\n\t<li>\r\n\tAllow use from LccWin compiler.\r\n\t</li>\r\n\t<li>\r\n\tSCI_COLOURISE for SCLEX_CONTAINER causes a\r\n\tSCN_STYLENEEDED notification.\r\n\t</li>\r\n\t<li>\r\n\tBugs fixed in lexing of HTML/ASP/JScript.\r\n\t</li>\r\n\t<li>\r\n\tFix for folding becoming confused.\r\n\t</li>\r\n\t<li>\r\n\tOn Windows, fixes for Japanese Input Method Editor and for 8 bit Katakana\r\n\tcharacters.\r\n\t</li>\r\n\t<li>\r\n\tFixed buffer size bug avoided when typing long words by making buffer bigger.\r\n\t</li>\r\n\t<li>\r\n\tUndo after automatic indentation more sensible.\r\n\t</li>\r\n\t<li>\r\n\tSciTE menus on GTK+ uses Shift and Ctrl rather than old style abbreviations.\r\n\t</li>\r\n\t<li>\r\n\tSciTE full screen mode on Windows calculates size more correctly.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows menus work better with skinning applications.\r\n\t</li>\r\n\t<li>\r\n\tSearching bugs fixed.\r\n\t</li>\r\n\t<li>\r\n\tColours reallocated when changing image using SCI_REGISTERIMAGE.\r\n\t</li>\r\n\t<li>\r\n\tCaret stays visible when Enter held down.\r\n\t</li>\r\n\t<li>\r\n\tUndo of automatic indentation more reasonable.\r\n\t</li>\r\n\t<li>\r\n\tHigh processor usage fixed in background wrapping under some\r\n\tcircumstances.\r\n\t</li>\r\n\t<li>\r\n\tCrashing bug fixed on AMD64.\r\n\t</li>\r\n\t<li>\r\n\tSciTE crashing bug fixed when position.height or position.width not set.\r\n\t</li>\r\n\t<li>\r\n\tCrashing bug on GTK+ fixed when setting cursor and window is NULL.\r\n\t</li>\r\n\t<li>\r\n\tCrashing bug on GTK+ preedit window fixed.\r\n\t</li>\r\n\t<li>\r\n\tSciTE crashing bug fixed in incremental search on Windows ME.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows has an optional find and replace dialogs that can search through\r\n\tall buffers and search within a particular style number.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite162.zip?download\">Release 1.62</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased on 31 October 2004.\r\n\t</li>\r\n\t<li>\r\n\tLexer added for ASN.1.\r\n\t</li>\r\n\t<li>\r\n\tLexer added for VHDL.\r\n\t</li>\r\n\t<li>\r\n\tOn Windows, an invisible system caret is used to allow screen readers to determine\r\n\twhere the caret is. The visible caret is still drawn by the painting code.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK+, Scintilla has methods to read the target as UTF-8 and to convert\r\n\ta string from UTF-8 to the document encoding. This eases integration with\r\n\tcontainers that use the UTF-8 encoding which is the API encoding for GTK+ 2.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+2 and Windows NT/2000/XP allows search and replace of Unicode text.\r\n\t</li>\r\n\t<li>\r\n\tSciTE calltips allow setting the characters used to start and end parameter lists and\r\n\tto separate parameters.\r\n\t</li>\r\n\t<li>\r\n\tFindColumn method converts a line and column into a position, taking into account\r\n\ttabs and multi-byte characters.\r\n\t</li>\r\n\t<li>\r\n\tOn Windows, when Scintilla copies text to the clipboard as Unicode, it avoids\r\n\tadding an ANSI copy as the system will automatically convert as required in\r\n\ta context-sensitive manner.\r\n\t</li>\r\n\t<li>\r\n\tSciTE indent.auto setting automatically determines indent.size and use.tabs from\r\n\tdocument contents.\r\n\t</li>\r\n\t<li>\r\n\tSciTE defines a CurrentMessage property that holds the most recently selected\r\n\toutput pane message.\r\n\t</li>\r\n\t<li>\r\n\tSciTE Lua scripting enhanced with\r\n\t<ul>\r\n\t<li>A Lua table called 'buffer' is associated with each buffer and can be used to\r\n\tmaintain buffer-specific state.</li>\r\n\t<li>A 'scite' object allows interaction with the application such as opening\r\n\tfiles from script.</li>\r\n\t<li>Dynamic properties can be reset by assigning nil to a given key in\r\n\tthe props table.</li>\r\n\t<li>An 'OnClear' event fires whenever properties and extension scripts are\r\n\tabout to be reloaded.</li>\r\n\t<li>On Windows, loadlib is enabled and can be used to access Lua\r\n\tbinary modules / DLLs.</li></ul>\r\n\t</li>\r\n\t<li>\r\n\tSciTE Find in Files on Windows can be used in a modeless way and gains a '..'\r\n\tbutton to move up to the parent directory. It is also wider so that longer paths\r\n\tcan be seen.\r\n\t</li>\r\n\t<li>\r\n\tClose buttons added to dialogs in SciTE on Windows.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ 2 has a \"hidden files\" check box in file open dialog.\r\n\t</li>\r\n\t<li>\r\n\tSciTE use.monospaced setting removed. More information in the\r\n\t<a href=\"SciTEFAQ.html\">FAQ</a>.\r\n\t</li>\r\n\t<li>\r\n\tAPDL lexer updated with more lexical classes\r\n\t</li>\r\n\t<li>\r\n\tAutoIt3 lexer updated.\r\n\t</li>\r\n\t<li>\r\n\tAda lexer fixed to support non-ASCII text.\r\n\t</li>\r\n\t<li>\r\n\tCpp lexer now only matches exactly three slashes as starting a doc-comment so that\r\n\tlines of slashes are seen as a normal comment.\r\n\tLine ending characters are appear in default style on preprocessor and single line\r\n\tcomment lines.\r\n\t</li>\r\n\t<li>\r\n\tCSS lexer updated to support CSS2 including second set of keywords.\r\n\t</li>\r\n\t<li>\r\n\tErrorlist lexer now understands Java stack trace lines.\r\n\t</li>\r\n\t<li>\r\n\tSciTE's handling of HTML Tidy messages jumps to column as well as line indicated.\r\n\t</li>\r\n\t<li>\r\n\tLisp lexer allows multiline strings.\r\n\t</li>\r\n\t<li>\r\n\tLua lexer treats .. as an operator when between identifiers.\r\n\t</li>\r\n\t<li>\r\n\tPHP lexer handles 'e' in numerical literals.\r\n\t</li>\r\n\t<li>\r\n\tPowerBasic lexer updated for macros and optimized.\r\n\t</li>\r\n\t<li>\r\n\tProperties file folder changed to leave lines before a header at the base level\r\n\tand thus avoid a vertical line when using connected folding symbols.\r\n\t</li>\r\n\t<li>\r\n\tGTK+ on Windows version uses Alt for rectangular selection to be compatible with\r\n\tplatform convention.\r\n\t</li>\r\n\t<li>\r\n\tSciTE abbreviations file moved from system directory to user directory\r\n\tso each user can have separate abbreviations.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ has improved .desktop file and make install support that may\r\n\tlead to better integration with system shell.\r\n\t</li>\r\n\t<li>\r\n\tDisabling of themed background drawing on GTK+ extended to all cases.\r\n\t</li>\r\n\t<li>\r\n\tSciTE date formatting on Windows performed with the user setting rather than the\r\n\tsystem setting.\r\n\t</li>\r\n\t<li>\r\n\tGTK+ 2 redraw while scrolling fixed.\r\n\t</li>\r\n\t<li>\r\n\tRecursive property definitions are safer, avoiding expansion when detected.\r\n\t</li>\r\n\t<li>\r\n\tSciTE thread synchronization for scripts no longer uses HWND_MESSAGE\r\n\tso is compatible with older versions of Windows.\r\n\tOther Lua scripting bugs fixed.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows localization of menu accelerators changed to be compatible\r\n\twith alternative UI themes.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows full screen mode now fits better when menu different height\r\n\tto title bar height.\r\n\t</li>\r\n\t<li>\r\n\tSC_MARK_EMPTY marker is now invisible and does not change the background\r\n\tcolour.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed in HTML lexer to allow use of &lt;?xml in strings in scripts without\r\n\ttriggering xml mode.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed in SciTE abbreviation expansion that could break indentation or crash.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed when searching for a whole word string that ends one character before\r\n\tend of document.\r\n\t</li>\r\n\t<li>\r\n\tDrawing bug fixed when indicators drawn on wrapped lines.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed when double clicking a hotspot.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed where autocompletion would remove typed text if no match found.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed where display does not scroll when inserting in long wrapped line.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed where SCI_MARKERDELETEALL would only remove one of the markers\r\n\ton a line that contained multiple markers with the same number.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed where markers would move when converting line endings.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed where SCI_LINEENDWRAP would move too far when line ends are visible.\r\n\t</li>\r\n\t<li>\r\n\tBugs fixed where calltips with unicode or other non-ASCII text would display\r\n\tincorrectly.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed in determining if at save point after undoing from save point and then\r\n\tperforming changes.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed on GTK+ using unsupported code pages where extraneous text could\r\n\tbe drawn.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed in drag and drop code on Windows where dragging from SciTE to\r\n\tFirefox could hang both applications.\r\n\t</li>\r\n\t<li>\r\n\tCrashing bug fixed on GTK+ when no font allocation succeeds.\r\n\t</li>\r\n\t<li>\r\n\tCrashing bug fixed when autocompleting word longer than 1000 characters.\r\n\t</li>\r\n\t<li>\r\n\tSciTE crashing bug fixed when both Find and Replace dialogs shown by disallowing\r\n\tthis situation.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite161.zip?download\">Release 1.61</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased on 29 May 2004.\r\n\t</li>\r\n\t<li>\r\n\tImprovements to selection handling on GTK+.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ 2.4 uses the improved file chooser which allows\r\n\tfile extension filters, multiple selection, and remembers favourite\r\n\tdirectories.\r\n\t</li>\r\n\t<li>\r\n\tSciTE Load Session and Save Session commands available on GTK+.\r\n\t</li>\r\n\t<li>\r\n\tSciTE lists Lua Startup Script in Options menu when loaded.\r\n\t</li>\r\n\t<li>\r\n\tIn SciTE, OnUserListSelection can be implemented in Lua.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows has a context menu on the file tabs.\r\n\t</li>\r\n\t<li>\r\n\tSQL lexer allows '#' comments and optionally '\\' quoting inside strings.\r\n\t</li>\r\n\t<li>\r\n\tMssql lexer improved.\r\n\t</li>\r\n\t<li>\r\n\tAutoIt3 lexer updated.\r\n\t</li>\r\n\t<li>\r\n\tPerl lexer recognizes regular expression use better.\r\n\t</li>\r\n\t<li>\r\n\tErrorlist lexer understands Lua tracebacks and copes with findstr\r\n\toutput for file names that end with digits.\r\n\t</li>\r\n\t<li>\r\n\tDrawing of lines on GTK+ improved and made more like Windows\r\n\twithout final point.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ uses a high resolution window icon.\r\n\t</li>\r\n\t<li>\r\n\tSciTE can be set to warn before loading files larger than a particular size.\r\n\t</li>\r\n\t<li>\r\n\tSciTE Lua scripting bugs fixed included a crashing bug when using\r\n\tan undefined function name that would go before first actual name.\r\n\t</li>\r\n\t<li>\r\n\tSciTE bug fixed where a modified buffer was not saved if it was\r\n\tthe last buffer and was not current when the New command used.\r\n\t</li>\r\n\t<li>\r\n\tSciTE monofont mode no longer affects line numbers.\r\n\t</li>\r\n\t<li>\r\n\tCrashing bug in SciTE avoided by not allowing both the Find and Replace\r\n\tdialogs to be visible at one time.\r\n\t</li>\r\n\t<li>\r\n\tCrashing bug in SciTE fixed when Lua scripts were being run\r\n\tconcurrently.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed that caused incorrect line number width in SciTE.\r\n\t</li>\r\n\t<li>\r\n\tPHP folding bug fixed.\r\n\t</li>\r\n\t<li>\r\n\tRegression fixed when setting word characters to not include\r\n\tsome of the standard word characters.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite160.zip?download\">Release 1.60</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased on 1 May 2004.\r\n\t</li>\r\n\t<li>\r\n\tSciTE can be scripted using the Lua programming language.\r\n\t</li>\r\n\t<li>\r\n\tcommand.mode is a better way to specify tool command options in SciTE.\r\n\t</li>\r\n\t<li>\r\n\tContinuation markers can be displayed so that you can see which lines are wrapped.\r\n\t</li>\r\n\t<li>\r\n\tLexer for Gui4Cli language.\r\n\t</li>\r\n\t<li>\r\n\tLexer for Kix language.\r\n\t</li>\r\n\t<li>\r\n\tLexer for Specman E language.\r\n\t</li>\r\n\t<li>\r\n\tLexer for AutoIt3 language.\r\n\t</li>\r\n\t<li>\r\n\tLexer for APDL language.\r\n\t</li>\r\n\t<li>\r\n\tLexer for Bash language. Also reasonable for other Unix shells.\r\n\t</li>\r\n\t<li>\r\n\tSciTE can load lexers implemented in external shared libraries.\r\n\t</li>\r\n\t<li>\r\n\tPerl treats \".\" not as part of an identifier and interprets '/' and '->'\r\n\tcorrectly in more circumstances.\r\n\t</li>\r\n\t<li>\r\n\tPHP recognizes variables within strings.\r\n\t</li>\r\n\t<li>\r\n\tNSIS has properties \"nsis.uservars\" and \"nsis.ignorecase\".\r\n\t</li>\r\n\t<li>\r\n\tMSSQL lexer adds keyword list for operators and stored procedures,\r\n\tdefines '(', ')', and ',' as operators and changes some other details.\r\n\t</li>\r\n\t<li>\r\n\tInput method preedit window on GTK+ 2 may support some Asian languages.\r\n\t</li>\r\n\t<li>\r\n\tPlatform interface adds an extra platform-specific flag to Font::Create.\r\n\tUsed on wxWidgets to choose antialiased text display but may be used for\r\n\tany task that a platform needs.\r\n\t</li>\r\n\t<li>\r\n\tOnBeforeSave method added to Extension interface.\r\n\t</li>\r\n\t<li>\r\n\tScintilla methods that return strings can be called with a NULL pointer\r\n\tto find out how long the string should be.\r\n\t</li>\r\n\t<li>\r\n\tVisual Studio .NET project file now in VS .NET 2003 format so can not be used\r\n\tdirectly in VS .NET 2002.\r\n\t</li>\r\n\t<li>\r\n\tScintilla can be built with GTK+ 2 on Windows.\r\n\t</li>\r\n\t<li>\r\n\tUpdated RPM spec for SciTE on GTK+.\r\n\t</li>\r\n\t<li>\r\n\tGTK+ makefile for SciTE allows selection of destination directory, creates destination\r\n\tdirectories and sets file modes and owners better.\r\n\t</li>\r\n\t<li>\r\n\tTab indents now go to next tab multiple rather than add tab size.\r\n\t</li>\r\n\t<li>\r\n\tSciTE abbreviations now use the longest possible match rather than the shortest.\r\n\t</li>\r\n\t<li>\r\n\tAutocompletion does not remove prefix when actioned with no choice selected.\r\n\t</li>\r\n\t<li>\r\n\tAutocompletion cancels when moving beyond the start position, not at the start position.\r\n\t</li>\r\n\t<li>\r\n\tSciTE now shows only calltips for functions that match exactly, not\r\n\tthose that match as a prefix.\r\n\t</li>\r\n\t<li>\r\n\tSciTE can repair box comment sections where some lines were added without\r\n\tthe box comment middle line prefix.\r\n\t</li>\r\n\t<li>\r\n\tAlt+ works in user.shortcuts on Windows.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ enables replace in selection for rectangular selections.\r\n\t</li>\r\n\t<li>\r\n\tKey bindings for command.shortcut implemented in a way that doesn't break\r\n\twhen the menus are localized.\r\n\t</li>\r\n\t<li>\r\n\tDrawing of background on GTK+ faster as theme drawing disabled.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK+, calltips are moved back onto the screen if they extend beyond the screen bounds.\r\n\t</li>\r\n\t<li>\r\n\tOn Windows, the Scintilla object is destroyed on WM_NCDESTROY rather than\r\n\tWM_DESTROY which arrives earlier. This fixes some problems when Scintilla was subclassed.\r\n\t</li>\r\n\t<li>\r\n\tThe zorder switching feature removed due to number of crashing bugs.\r\n\t</li>\r\n\t<li>\r\n\tCode for XPM images made more robust.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed with primary selection on GTK+.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK+ 2, copied or cut text can still be pasted after the Scintilla widget is destroyed.\r\n\t</li>\r\n\t<li>\r\n\tStyling change not visible problem fixed when line was cached.\r\n\t</li>\r\n\t<li>\r\n\tBug in SciTE on Windows fixed where clipboard commands stopped working.\r\n\t</li>\r\n\t<li>\r\n\tCrashing bugs in display fixed in line layout cache.\r\n\t</li>\r\n\t<li>\r\n\tCrashing bug may be fixed on AMD64 processor on GTK+.\r\n\t</li>\r\n\t<li>\r\n\tRare hanging crash fixed in Python lexer.\r\n\t</li>\r\n\t<li>\r\n\tDisplay bugs fixed with DBCS characters on GTK+.\r\n\t</li>\r\n\t<li>\r\n\tAutocompletion lists on GTK+ 2 are not sorted by the ListModel as the\r\n\tcontents are sorted correctly by Scintilla.\r\n\t</li>\r\n\t<li>\r\n\tSciTE fixed to not open extra untitled buffers with check.if.already.open.\r\n\t</li>\r\n\t<li>\r\n\tSizing bug fixed on GTK+ when window resized while unmapped.\r\n\t</li>\r\n\t<li>\r\n\tText drawing crashing bug fixed on GTK+ with non-Pango fonts and long strings.\r\n\t</li>\r\n\t<li>\r\n\tFixed some issues if characters are unsigned.\r\n\t</li>\r\n\t<li>\r\n\tFixes in NSIS support.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite159.zip?download\">Release 1.59</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased on 19 February 2004.\r\n\t</li>\r\n\t<li>\r\n\tSciTE Options and Language menus reduced in length by commenting\r\n\tout some languages. Languages can be enabled by editing the global\r\n\tproperties file.\r\n\t</li>\r\n\t<li>\r\n\tVerilog language supported.\r\n\t</li>\r\n\t<li>\r\n\tLexer for Microsoft dialect of SQL. SciTE properties file available from extras page.\r\n\t</li>\r\n\t<li>\r\n\tPerl lexer disambiguates '/' better.\r\n\t</li>\r\n\t<li>\r\n\tNSIS lexer improved with a lexical class for numbers, option for ignoring case\r\n\tof keywords, and folds only occurring when folding keyword first on line.\r\n\t</li>\r\n\t<li>\r\n\tPowerBasic lexer improved with styles for constants and assembler and\r\n\tfolding improvements.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK+, input method support only invoked for Asian languages and not\r\n\tEuropean languages as the old European keyboard code works better.\r\n\t</li>\r\n\t<li>\r\n\tScintilla can be requested to allocate a certain amount and so avoid repeated\r\n\treallocations and memory inefficiencies. SciTE uses this and so should require\r\n\tless memory.\r\n\t</li>\r\n\t<li>\r\n\tSciTE's \"toggle current fold\" works when invoked on child line as well as\r\n\tfold header.\r\n\t</li>\r\n\t<li>\r\n\tSciTE output pane scrolling can be set to not scroll back to start after\r\n\tcompletion of command.\r\n\t</li>\r\n\t<li>\r\n\tSciTE has a $(SessionPath) property.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows can use VK_* codes for keys in user.shortcuts.\r\n\t</li>\r\n\t<li>\r\n\tStack overwrite bug fixed in SciTE's command to move to the end of a\r\n\tpreprocessor conditional.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed where vertical selection appeared to select a different set of characters\r\n\tthen would be used by, for example, a copy.\r\n\t</li>\r\n\t<li>\r\n\tSciTE memory leak fixed in fold state remembering.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed where changing the style of some text outside the\r\n\tstandard StyleNeeded notification would not be visible.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK+ 2 g_iconv is used in preference to iconv, as it is provided by GTK+\r\n\tso should avoid problems finding the iconv library.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK+ fixed a style reference count bug.\r\n\t</li>\r\n\t<li>\r\n\tMemory corruption bug fixed with GetSelText.\r\n\t</li>\r\n\t<li>\r\n\tOn Windows Scintilla deletes memory on WM_NCDESTROY rather than\r\n\tthe earlier WM_DESTROY to avoid problems when the window is subclassed.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite158.zip?download\">Release 1.58</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased on 11 January 2004.\r\n\t</li>\r\n\t<li>\r\n\tMethod to discover the currently highlighted element in an autocompletion list.\r\n\t</li>\r\n\t<li>\r\n\tOn GTK+, the lexers are now included in the scintilla.a library file. This\r\n\twill require changes to the make files of dependent projects.\r\n\t</li>\r\n\t<li>\r\n\tOctave support added alongside related Matlab language and Matlab support improved.\r\n\t</li>\r\n\t<li>\r\n\tVB lexer gains an unterminated string state and 4 sets of keywords.\r\n\t</li>\r\n\t<li>\r\n\tRuby lexer handles $' correctly.\r\n\t</li>\r\n\t<li>\r\n\tError line handling improved for FORTRAN compilers from Absoft and Intel.\r\n\t</li>\r\n\t<li>\r\n\tInternational input enabled on GTK+ 2 although there is no way to choose an\r\n\tinput method.\r\n\t</li>\r\n\t<li>\r\n\tMultiplexExtension in SciTE allows multiple extensions to be used at once.\r\n\t</li>\r\n\t<li>\r\n\tRegular expression replace interprets backslash expressions \\a, \\b, \\f, \\n, \\r, \\t,\r\n\tand \\v in the replacement value.\r\n\t</li>\r\n\t<li>\r\n\tSciTE Replace dialog displays number of replacements made when Replace All or\r\n\tReplace in Selection performed.\r\n\t</li>\r\n\t<li>\r\n\tLocalization files may contain a translation.encoding setting which is used\r\n\ton GTK+ 2 to automatically reencode the translation to UTF-8 so it will be\r\n\tthe localized text will be displayed correctly.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ implements check.if.already.open.\r\n\t</li>\r\n\t<li>\r\n\tMake files for Mac OS X made more robust.\r\n\t</li>\r\n\t<li>\r\n\tPerformance improved in SciTE when switching buffers when there\r\n\tis a rectangular selection.\r\n\t</li>\r\n\t<li>\r\n\tFixed failure to display some text when wrapped.\r\n\t</li>\r\n\t<li>\r\n\tSciTE crashes from Ctrl+Tab buffer cycling fixed.\r\n\tMay still be some rare bugs here.\r\n\t</li>\r\n\t<li>\r\n\tCrash fixed when decoding an error message that appears similar to a\r\n\tBorland error message.\r\n\t</li>\r\n\t<li>\r\n\tFix to auto-scrolling allows containers to implement enhanced double click selection.\r\n\t</li>\r\n\t<li>\r\n\tHang fixed in idle word wrap.\r\n\t</li>\r\n\t<li>\r\n\tCrash fixed in hotspot display code..\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows Incremental Search no longer moves caret back.\r\n\t</li>\r\n\t<li>\r\n\tSciTE hang fixed when performing a replace with a find string that\r\n\tmatched zero length strings such as \".*\".\r\n\t</li>\r\n\t<li>\r\n\tSciTE no longer styles the whole file when saving buffer fold state\r\n\tas that was slow.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite157.zip?download\">Release 1.57</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased on 27 November 2003.\r\n\t</li>\r\n\t<li>\r\n\tSciTE remembers folding of each buffer.\r\n\t</li>\r\n\t<li>\r\n\tLexer for Erlang language.\r\n\t</li>\r\n\t<li>\r\n\tScintilla allows setting the set of white space characters.\r\n\t</li>\r\n\t<li>\r\n\tScintilla has 'stuttered' page movement commands to first move\r\n\tto top or bottom within current visible lines before scrolling.\r\n\t</li>\r\n\t<li>\r\n\tScintilla commands for moving to end of words.\r\n\t</li>\r\n\t<li>\r\n\tIncremental line wrap enabled on Windows.\r\n\t</li>\r\n\t<li>\r\n\tSciTE PDF exporter produces output that is more compliant with reader\r\n\tapplications, is smaller and allows more configuration.\r\n\tHTML exporter optimizes size of output files.\r\n\t</li>\r\n\t<li>\r\n\tSciTE defines properties PLAT_WINNT and PLAT_WIN95 on the\r\n\tcorresponding platforms.\r\n\t</li>\r\n\t<li>\r\n\tSciTE can adjust the line margin width to fit the largest line number.\r\n\tThe line.numbers property is split between line.margin.visible and\r\n\tline.margin.width.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ allows user defined menu accelerators.\r\n\tAlt can be included in user.shortcuts.\r\n\t</li>\r\n\t<li>\r\n\tSciTE Language menu can have items commented out.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows Go to dialog allows choosing a column number as\r\n\twell as a line number.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on GTK+ make file uses prefix setting more consistently.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed that caused word wrapping to fail to display all text.\r\n\t</li>\r\n\t<li>\r\n\tCrashing bug fixed in GTK+ version of Scintilla when using GDK fonts\r\n\tand opening autocompletion.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed in Scintilla SCI_GETSELTEXT where an extra NUL\r\n\twas included at end of returned string\r\n\t</li>\r\n\t<li>\r\n\tCrashing bug fixed in SciTE z-order switching implementation.\r\n\t</li>\r\n\t<li>\r\n\tHanging bug fixed in Perl lexer.\r\n\t</li>\r\n\t<li>\r\n\tSciTE crashing bug fixed for using 'case' without argument in style definition.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite156.zip?download\">Release 1.56</a>\r\n    </h3>\r\n    <ul>\r\n\t<li>\r\n\tReleased on 25 October 2003.\r\n\t</li>\r\n\t<li>\r\n\tRectangular selection can be performed using the keyboard.\r\n\tGreater programmatic control over rectangular selection.\r\n\tThis has caused several changes to key bindings.\r\n\t</li>\r\n\t<li>\r\n\tSciTE Replace In Selection works on rectangular selections.\r\n\t</li>\r\n\t<li>\r\n\tImproved lexer for TeX, new lexer for Metapost and other support for these\r\n\tlanguages.\r\n\t</li>\r\n\t<li>\r\n\tLexer for PowerBasic.\r\n\t</li>\r\n\t<li>\r\n\tLexer for Forth.\r\n\t</li>\r\n\t<li>\r\n\tYAML lexer improved to include error styling.\r\n\t</li>\r\n\t<li>\r\n\tPerl lexer improved to correctly handle more cases.\r\n\t</li>\r\n\t<li>\r\n\tAssembler lexer updated to support single-quote strings and fix some\r\n\tproblems.\r\n\t</li>\r\n\t<li>\r\n\tSciTE on Windows can switch between buffers in order of use (z-order) rather\r\n\tthan static order.\r\n\t</li>\r\n\t<li>\r\n\tSciTE supports adding an extension for \"Open Selected Filename\".\r\n\tThe openpath setting works on GTK+.\r\n\t</li>\r\n\t<li>\r\n\tSciTE can Export as XML.\r\n\t</li>\r\n\t<li>\r\n\tSciTE $(SelHeight) variable gives a more natural result for empty and whole line\r\n\tselections.\r\n\t</li>\r\n\t<li>\r\n\tFixes to wrapping problems, such as only first display line being visible in some\r\n\tcases.\r\n\t</li>\r\n\t<li>\r\n\tFixes to hotspot to only highlight when over the hotspot, only use background\r\n\tcolour when set and option to limit hotspots to a single line.\r\n\t</li>\r\n\t<li>\r\n\tSmall fixes to FORTRAN lexing and folding.\r\n\t</li>\r\n\t<li>\r\n\tSQL lexer treats single quote strings as a separate class to double quote strings..\r\n\t</li>\r\n\t<li>\r\n\tScintilla made compatible with expectations of container widget in GTK+ 2.3.\r\n\t</li>\r\n\t<li>\r\n\tFix to strip out pixmap ID when automatically choosing from an autocompletion\r\n\tlist with only one element.\r\n\t</li>\r\n\t<li>\r\n\tSciTE bug fixed where UTF-8 files longer than 128K were gaining more than one\r\n\tBOM.\r\n\t</li>\r\n\t<li>\r\n\tCrashing bug fixed in SciTE on GTK+ where using \"Stop Executing\" twice leads\r\n\tto all applications exiting.\r\n\t</li>\r\n\t<li>\r\n\tBug fixed in autocompletion scrolling on GTK+ 2 with a case sensitive list.\r\n\tThe ListBox::Sort method is no longer needed or available so platform\r\n\tmaintainers should remove it.\r\n\t</li>\r\n\t<li>\r\n\tSciTE check.if.already.open setting removed from GTK+ version as unmaintained.\r\n\t</li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite155.zip?download\">Release 1.55</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n\tReleased on 25 September 2003.\r\n      </li>\r\n      <li>\r\n\tFix a crashing bug in indicator display in Scintilla.\r\n      </li>\r\n      <li>\r\n\tGTK+ version now defaults to building for GTK+ 2 rather than 1.\r\n      </li>\r\n      <li>\r\n\tMingw make file detects compiler version and avoids options\r\n\tthat are cause problems for some versions.\r\n      </li>\r\n      <li>\r\n\tLarge performance improvement on GTK+ 2 for long lines.\r\n      </li>\r\n      <li>\r\n\tIncremental line wrap on GTK+.\r\n      </li>\r\n      <li>\r\n\tInternational text entry works much better on GTK+ with particular\r\n\timprovements for Baltic languages and languages that use 'dead' accents.\r\n\tNUL key events such as those generated by some function keys, ignored.\r\n      </li>\r\n      <li>\r\n\tUnicode clipboard support on GTK+.\r\n      </li>\r\n      <li>\r\n\tIndicator type INDIC_BOX draws a rectangle around the text.\r\n      </li>\r\n      <li>\r\n\tClarion language support.\r\n      </li>\r\n      <li>\r\n\tYAML language support.\r\n      </li>\r\n      <li>\r\n\tMPT LOG language support.\r\n      </li>\r\n      <li>\r\n\tOn Windows, SciTE can switch buffers based on activation order rather\r\n\tthan buffer number.\r\n      </li>\r\n      <li>\r\n\tSciTE save.on.deactivate saves all buffers rather than just the current buffer.\r\n      </li>\r\n      <li>\r\n\tLua lexer handles non-ASCII characters correctly.\r\n      </li>\r\n      <li>\r\n\tError lexer understands Borland errors with pathnames that contain space.\r\n      </li>\r\n      <li>\r\n\tOn GTK+ 2, autocompletion uses TreeView rather than deprecated CList.\r\n      </li>\r\n      <li>\r\n\tSciTE autocompletion removed when expand abbreviation command used.\r\n      </li>\r\n      <li>\r\n\tSciTE calltips support overloaded functions.\r\n      </li>\r\n      <li>\r\n\tWhen Save fails in SciTE, choice offered to Save As.\r\n      </li>\r\n      <li>\r\n\tSciTE message boxes on Windows may be moved to front when needed.\r\n      </li>\r\n      <li>\r\n\tIndicators drawn correctly on wrapped lines.\r\n      </li>\r\n      <li>\r\n\tRegular expression search no longer matches characters with high bit\r\n\tset to characters without high bit set.\r\n      </li>\r\n      <li>\r\n\tHang fixed in backwards search in multi byte character documents.\r\n      </li>\r\n      <li>\r\n\tHang fixed in SciTE Mark All command when wrap around turned off.\r\n      </li>\r\n      <li>\r\n\tSciTE Incremental Search no longer uses hot keys on Windows.\r\n      </li>\r\n      <li>\r\n\tCalltips draw non-ASCII characters correctly rather than as arrows.\r\n      </li>\r\n      <li>\r\n\tSciTE crash fixed when going to an error message with empty file name.\r\n      </li>\r\n      <li>\r\n\tBugs fixed in XPM image handling code.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite154.zip?download\">Release 1.54</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n\tReleased on 12 August 2003.\r\n      </li>\r\n      <li>\r\n\tSciTE on GTK+ 2.x can display a tab bar.\r\n      </li>\r\n      <li>\r\n\tSciTE on Windows provides incremental search.\r\n      </li>\r\n      <li>\r\n\tLexer for PostScript.\r\n      </li>\r\n      <li>\r\n\tLexer for the NSIS scripting language.\r\n      </li>\r\n      <li>\r\n\tNew lexer for POV-Ray Scene Description Language\r\n\treplaces previous implementation.\r\n      </li>\r\n      <li>\r\n\tLexer for the MMIX Assembler language.\r\n      </li>\r\n      <li>\r\n\tLexer for the Scriptol language.\r\n      </li>\r\n      <li>\r\n\tIncompatibility: SQL keywords are specified in lower case rather than upper case.\r\n\tSQL lexer allows double quoted strings.\r\n      </li>\r\n      <li>\r\n\tPascal lexer: character constants that start with '#' understood,\r\n\t'@' only allowed within assembler blocks,\r\n\t'$' can be the start of a number,\r\n\tinitial '.' in 0..constant not treated as part of a number,\r\n\tand assembler blocks made more distinctive.\r\n      </li>\r\n      <li>\r\n\tLua lexer allows '.' in keywords.\r\n\tMulti-line strings and comments can be folded.\r\n      </li>\r\n      <li>\r\n\tCSS lexer handles multiple psuedoclasses.\r\n      </li>\r\n      <li>\r\n\tProperties file folder works for INI file format.\r\n      </li>\r\n      <li>\r\n\tHidden indicator style allows the container to mark text within Scintilla\r\n\twithout there being any visual effect.\r\n      </li>\r\n      <li>\r\n\tSciTE does not prompt to save changes when the buffer is empty and untitled.\r\n      </li>\r\n      <li>\r\n\tModification notifications caused by SCI_INSERTSTYLEDSTRING\r\n\tnow include the contents of the insertion.\r\n      </li>\r\n      <li>\r\n\tSCI_MARKERDELETEALL deletes all the markers on a line\r\n\trather than just the first match.\r\n      </li>\r\n      <li>\r\n\tBetter handling of 'dead' accents on GTK+ 2 for languages\r\n\tthat use accented characters.\r\n      </li>\r\n      <li>\r\n\tSciTE now uses value of output.vertical.size property.\r\n      </li>\r\n      <li>\r\n\tCrash fixed in SciTE autocompletion on long lines.\r\n      </li>\r\n      <li>\r\n\tCrash fixed in SciTE comment command on long lines.\r\n      </li>\r\n      <li>\r\n\tBug fixed with backwards regular expression search skipping\r\n\tevery second match.\r\n      </li>\r\n      <li>\r\n\tHang fixed with regular expression replace where both target and replacement were empty.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite153.zip?download\">Release 1.53</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n\tReleased on 16 May 2003.\r\n      </li>\r\n      <li>\r\n\tOn GTK+ 2, encodings other than ASCII, Latin1, and Unicode are\r\n\tsupported for both display and input using iconv.\r\n      </li>\r\n      <li>\r\n\tExternal lexers supported on GTK+/Linux.\r\n\tExternal lexers must now be explicitly loaded with SCI_LOADLEXERLIBRARY\r\n\trather than relying upon a naming convention and automatic loading.\r\n      </li>\r\n      <li>\r\n\tSupport of Lout typesetting language.\r\n      </li>\r\n      <li>\r\n\tSupport of E-Scripts language used in the POL Ultima Online Emulator.\r\n      </li>\r\n      <li>\r\n\tScrolling and drawing performance on GTK+ enhanced, particularly for GTK+ 2.x\r\n\twith an extra window for the text area avoiding conflicts with the scroll bars.\r\n      </li>\r\n      <li>\r\n\tCopyText and CopyRange methods in Scintilla allow container to\r\n\teasily copy to the system clipboard.\r\n      </li>\r\n      <li>\r\n\tLine Copy command implemented and bound to Ctrl+Shift+T.\r\n      </li>\r\n      <li>\r\n\tScintilla APIs PositionBefore and PositionAfter can be used to iterate through\r\n\ta document taking into account the encoding and multi-byte characters.\r\n      </li>\r\n      <li>\r\n\tC++ folder can fold on the \"} else {\" line of an if statement by setting\r\n\tfold.at.else property to 1.\r\n      </li>\r\n      <li>\r\n\tC++ lexer allows an extra set of keywords.\r\n      </li>\r\n      <li>\r\n\tProperty names and thus abbreviations may be non-ASCII.\r\n      </li>\r\n      <li>\r\n\tRemoved attempt to load a file when setting properties that was\r\n\tpart of an old scripting experiment.\r\n      </li>\r\n      <li>\r\n\tSciTE no longer warns about a file not existing when opening\r\n\tproperties files from the Options menu as there is a good chance\r\n\tthe user wants to create one.\r\n      </li>\r\n      <li>\r\n\tBug fixed with brace recognition in multi-byte encoded files where a partial\r\n\tcharacter matched a brace byte.\r\n      </li>\r\n      <li>\r\n\tMore protection against infinite loops or recursion with recursive property definitions.\r\n      </li>\r\n      <li>\r\n\tOn Windows, cursor will no longer disappear over margins in custom builds when\r\n\tcursor resource not present. The Windows default cursor is displayed instead.\r\n      </li>\r\n      <li>\r\n\tload.on.activate fixed in SciTE as was broken in 1.52.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite152.zip?download\">Release 1.52</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n\tReleased on 17 April 2003.\r\n      </li>\r\n      <li>\r\n\tPango font support on GTK+ 2.\r\n\tUnicode input improved on GTK+ 2.\r\n      </li>\r\n      <li>\r\n\tHotspot style implemented in Scintilla.\r\n      </li>\r\n      <li>\r\n\tSmall up and down arrows can be displayed in calltips and the container\r\n\tis notified when the mouse is clicked on a calltip.\r\n\tNormal and selected calltip text colours can be set.\r\n      </li>\r\n      <li>\r\n\tPOSIX compatibility flag in Scintilla regular expression search\r\n\tinterprets bare ( and ) as tagged sections.\r\n      </li>\r\n      <li>\r\n\tError message lexer tightened to yield fewer false matches.\r\n\tRecognition of Lahey and Intel FORTRAN error formats.\r\n      </li>\r\n      <li>\r\n\tScintilla keyboard commands for moving to start and end of\r\n\tscreen lines rather than document lines, unless already there\r\n\twhere these keys move to the start or end of the document line.\r\n      </li>\r\n      <li>\r\n\tLine joining command.\r\n      </li>\r\n      <li>\r\n\tLexer for POV-Ray.\r\n      </li>\r\n      <li>\r\n\tCalltips on Windows are no longer clipped by the parent window.\r\n      </li>\r\n      <li>\r\n\tAutocompletion lists are cancelled when focus leaves their parent window.\r\n      </li>\r\n      <li>\r\n\tMove to next/previous empty line delimited paragraph key commands.\r\n      </li>\r\n      <li>\r\n\tSciTE hang fixed with recursive property definitions by placing limit\r\n\ton number of substitutions performed.\r\n      </li>\r\n      <li>\r\n\tSciTE Export as PDF reenabled and works.\r\n      </li>\r\n      <li>\r\n\tAdded loadsession: command line command to SciTE.\r\n      </li>\r\n      <li>\r\n\tSciTE option to quit application when last document closed.\r\n      </li>\r\n      <li>\r\n\tSciTE option to ask user if it is OK to reload a file that has been\r\n\tmodified outside SciTE.\r\n      </li>\r\n      <li>\r\n\tSciTE option to automatically save before running particular command tools\r\n\tor to ask user or to not save.\r\n      </li>\r\n      <li>\r\n\tSciTE on Windows 9x will write a Ctrl+Z to the process input pipe before\r\n\tclosing the pipe when running tool commands that take input.\r\n      </li>\r\n      <li>\r\n\tAdded a manifest resource to SciTE on Windows to enable Windows XP\r\n\tthemed UI.\r\n      </li>\r\n      <li>\r\n\tSciTE calltips handle nested calls and other situations better.\r\n      </li>\r\n      <li>\r\n\tCSS lexer improved.\r\n      </li>\r\n      <li>\r\n\tInterface to platform layer changed - Surface initialization now requires\r\n\ta WindowID parameter.\r\n      </li>\r\n      <li>\r\n\tBug fixed with drawing or measuring long pieces of text on Windows 9x\r\n\tby truncating the pieces.\r\n      </li>\r\n      <li>\r\n\tBug fixed with SciTE on GTK+ where a user shortcut for a visible character\r\n\tinserted the character as well as executing the command.\r\n      </li>\r\n      <li>\r\n\tBug fixed where primary selection on GTK+ was reset by\r\n\tScintilla during creation.\r\n      </li>\r\n      <li>\r\n\tBug fixed where SciTE would close immediately on startup\r\n\twhen using save.session.\r\n      </li>\r\n      <li>\r\n\tCrash fixed when entering '\\' in LaTeX file.\r\n      </li>\r\n      <li>\r\n\tHang fixed when '#' last character in VB file.\r\n      </li>\r\n      <li>\r\n\tCrash fixed in error message lexer.\r\n      </li>\r\n      <li>\r\n\tCrash fixed when searching for long regular expressions.\r\n      </li>\r\n      <li>\r\n\tPressing return when nothing selected in user list sends notification with\r\n\tempty text rather than random text.\r\n      </li>\r\n      <li>\r\n\tMouse debouncing disabled on Windows as it interfered with some\r\n\tmouse utilities.\r\n      </li>\r\n      <li>\r\n\tBug fixed where overstrike mode inserted before rather than replaced last\r\n\tcharacter in document.\r\n      </li>\r\n      <li>\r\n\tBug fixed with syntax highlighting of Japanese text.\r\n      </li>\r\n      <li>\r\n\tBug fixed in split lines function.\r\n      </li>\r\n      <li>\r\n\tCosmetic fix to SciTE tab bar on Windows when window resized.\r\n\tFocus sticks to either pane more consistently.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite151.zip?download\">Release 1.51</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n\tReleased on 16 February 2003.\r\n      </li>\r\n      <li>\r\n\tTwo phase drawing avoids cutting off text that overlaps runs by drawing\r\n\tall the backgrounds of a line then drawing all the text transparently.\r\n\tSingle phase drawing is an option.\r\n      </li>\r\n      <li>\r\n\tScintilla method to split lines at a particular width by adding new line\r\n\tcharacters.\r\n      </li>\r\n      <li>\r\n\tThe character used in autocompletion lists to separate the text from the image\r\n\tnumber can be changed.\r\n      </li>\r\n      <li>\r\n\tThe scrollbar range will automatically expand when the caret is moved\r\n\tbeyond the current range.\r\n\tThe scroll bar is updated when SCI_SETXOFFSET is called.\r\n      </li>\r\n      <li>\r\n\tMouse cursors on GTK+ improved to be consistent with other applications\r\n\tand the Windows version.\r\n      </li>\r\n      <li>\r\n\tHorizontal scrollbar on GTK+ now disappears in wrapped mode.\r\n      </li>\r\n      <li>\r\n\tScintilla on GTK+ 2: mouse wheel scrolling, cursor over scrollbars, focus,\r\n\tand syntax highlighting now work.\r\n\tgtk_selection_notify avoided for compatibility with GTK+ 2.2.\r\n      </li>\r\n      <li>\r\n\tFold margin colours can now be set.\r\n      </li>\r\n      <li>\r\n\tSciTE can be built for GTK+ 2.\r\n      </li>\r\n      <li>\r\n\tSciTE can optionally preserve the undo history over an automatic file reload.\r\n      </li>\r\n      <li>\r\n\tTags can optionally be case insensitive in XML and HTML.\r\n      </li>\r\n      <li>\r\n\tSciTE on Windows handles input to tool commands in a way that should avoid\r\n\tdeadlock. Output from tools can be used to replace the selection.\r\n      </li>\r\n      <li>\r\n\tSciTE on GTK+ automatically substitutes '|' for '/' in menu items as '/'\r\n\tis used to define the menu hierarchy.\r\n      </li>\r\n      <li>\r\n\tOptional buffer number in SciTE title bar.\r\n      </li>\r\n      <li>\r\n\tCrash fixed in SciTE brace matching.\r\n      </li>\r\n      <li>\r\n\tBug fixed where automatic scrolling past end of document\r\n\tflipped back to the beginning.\r\n      </li>\r\n      <li>\r\n\tBug fixed where wrapping caused text to disappear.\r\n      </li>\r\n      <li>\r\n\tBug fixed on Windows where images in autocompletion lists were\r\n\tshown on the wrong item.\r\n      </li>\r\n      <li>\r\n\tCrash fixed due to memory bug in autocompletion lists on Windows.\r\n      </li>\r\n      <li>\r\n\tCrash fixed when double clicking some error messages.\r\n      </li>\r\n      <li>\r\n\tBug fixed in word part movement where sometimes no movement would occur.\r\n      </li>\r\n      <li>\r\n\tBug fixed on Windows NT where long text runs were truncated by\r\n\ttreating NT differently to 9x where there is a limitation.\r\n      </li>\r\n      <li>\r\n\tText in not-changeable style works better but there remain some cases where\r\n\tit is still possible to delete text protected this way.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite150.zip?download\">Release 1.50</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n\tReleased on 24 January 2003.\r\n      </li>\r\n      <li>\r\n\tAutocompletion lists may have a per-item pixmap.\r\n      </li>\r\n      <li>\r\n\tAutocompletion lists allow Unicode text on Windows.\r\n      </li>\r\n      <li>\r\n\tScintilla documentation rewritten.\r\n      </li>\r\n      <li>\r\n\tAdditional DBCS encoding support in Scintilla on GTK+ primarily aimed at\r\n\tJapanese EUC encoding.\r\n      </li>\r\n      <li>\r\n\tCSS (Cascading Style Sheets) lexer added.\r\n      </li>\r\n      <li>\r\n\tdiff lexer understands some more formats.\r\n      </li>\r\n      <li>\r\n\tFold box feature is an alternative way to show the structure of code.\r\n      </li>\r\n      <li>\r\n\tAvenue lexer supports multiple keyword lists.\r\n      </li>\r\n      <li>\r\n\tThe caret may now be made invisible by setting the caret width to 0.\r\n      </li>\r\n      <li>\r\n\tPython folder attaches comments before blocks to the next block rather\r\n\tthan the previous block.\r\n      </li>\r\n      <li>\r\n\tSciTE openpath property on Windows searches a path for files that are\r\n\tthe subject of the Open Selected Filename command.\r\n      </li>\r\n      <li>\r\n        The localization file name can be changed with the locale.properties property.\r\n      </li>\r\n      <li>\r\n\tOn Windows, SciTE can pipe the result of a string expression into a command line tool.\r\n      </li>\r\n      <li>\r\n\tOn Windows, SciTE's Find dialog has a Mark All button.\r\n      </li>\r\n      <li>\r\n\tOn Windows, there is an Insert Abbreviation command that allows a choice from\r\n\tthe defined abbreviations and inserts the selection into the abbreviation at the\r\n\tposition of a '|'.\r\n      </li>\r\n      <li>\r\n\tMinor fixes to Fortran lexer.\r\n      </li>\r\n      <li>\r\n\tfold.html.preprocessor decides whether to fold &lt;? and ?&gt;.\r\n\tMinor improvements to PHP folding.\r\n      </li>\r\n      <li>\r\n\tMaximum number of keyword lists allowed increased from 6 to 9.\r\n      </li>\r\n      <li>\r\n\tDuplicate line command added with default assignment to Ctrl+D.\r\n      </li>\r\n      <li>\r\n\tSciTE sets $(Replacements) to the number of replacements made by the\r\n\tReplace All command. $(CurrentWord) is set to the word before the caret if the caret\r\n\tis at the end of a word.\r\n      </li>\r\n      <li>\r\n\tOpening a SciTE session now loads files in remembered order, sets the current file\r\n\tas remembered, and moves the caret to the remembered line.\r\n      </li>\r\n      <li>\r\n\tBugs fixed with printing on Windows where line wrapping was causing some text\r\n\tto not print.\r\n      </li>\r\n      <li>\r\n\tBug fixed with Korean Input Method Editor on Windows.\r\n      </li>\r\n      <li>\r\n\tBugs fixed with line wrap which would sometimes choose different break positions\r\n\tafter switching focus away and back.\r\n      </li>\r\n      <li>\r\n\tBug fixed where wheel scrolling had no effect on GTK+ after opening a fold.\r\n      </li>\r\n      <li>\r\n\tBug fixed with file paths containing non-ASCII characters on Windows.\r\n      </li>\r\n      <li>\r\n\tCrash fixed with printing on Windows after defining pixmap marker.\r\n      </li>\r\n      <li>\r\n\tCrash fixed in makefile lexer when first character on line was '='.\r\n      </li>\r\n      <li>\r\n\tBug fixed where local properties were not always being applied.\r\n      </li>\r\n      <li>\r\n\tCtrl+Keypad* fold command works on GTK+.\r\n      </li>\r\n      <li>\r\n\tHangs fixed in SciTE's Replace All command when replacing regular expressions '^'\r\n\tor '$'.\r\n      </li>\r\n      <li>\r\n\tSciTE monospace setting behaves more sensibly.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite149.zip?download\">Release 1.49</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n\tReleased on 1 November 2002.\r\n      </li>\r\n      <li>\r\n\tUnicode supported on GTK+. To perform well, this added a font cache to GTK+\r\n\tand to make that safe, a mutex is used. The mutex requires the application to link in\r\n\tthe threading library by evaluating `glib-config --libs gthread`. A Unicode locale\r\n\tshould also be set up by a call like setlocale(LC_CTYPE, \"en_US.UTF-8\").\r\n\tscintilla_release_resources function added to release mutex.\r\n      </li>\r\n      <li>\r\n\tFORTRAN and assembler lexers added along with other support for these\r\n\tlanguages in SciTE.\r\n      </li>\r\n      <li>\r\n\tAda lexer improved handling of based numbers, identifier validity and attributes\r\n\tdistinguished from character literals.\r\n      </li>\r\n      <li>\r\n\tLua lexer handles block comments and a deep level of nesting for literal strings\r\n\tand block comments.\r\n      </li>\r\n      <li>\r\n\tErrorlist lexer recognizes PHP error messages.\r\n      </li>\r\n      <li>\r\n\tVariant of the C++ lexer with case insensitive keywords\r\n\tcalled cppnocase. Whitespace in preprocessor text handled more correctly.\r\n      </li>\r\n      <li>\r\n\tFolder added for Perl.\r\n      </li>\r\n      <li>\r\n\tCompilation with GCC 3.2 supported.\r\n      </li>\r\n      <li>\r\n\tMarkers can be pixmaps.\r\n      </li>\r\n      <li>\r\n\tLines are wrapped when printing.\r\n\tBug fixed which printed line numbers in different styles.\r\n      </li>\r\n      <li>\r\n\tText can be appended to end with AppendText method.\r\n      </li>\r\n      <li>\r\n\tChooseCaretX method added.\r\n      </li>\r\n      <li>\r\n\tVertical scroll bar can be turned off with SetVScrollBar method.\r\n      </li>\r\n      <li>\r\n\tSciTE Save All command saves all buffers.\r\n      </li>\r\n      <li>\r\n\tSciTE localization compares keys case insensitively to make translations more flexible.\r\n      </li>\r\n      <li>\r\n\tSciTE detects a utf-8 coding cookie \"coding: utf-8\" in first two\r\n\tlines and goes into Unicode mode.\r\n      </li>\r\n      <li>\r\n\tSciTE key bindings are definable.\r\n      </li>\r\n      <li>\r\n\tSciTE Find in Files dialog can display directory browser to\r\n\tchoose directory to search.\r\n      </li>\r\n      <li>\r\n\tSciTE enabling of undo and redo toolbar buttons improved.\r\n      </li>\r\n      <li>\r\n\tSciTE on Windows file type filters in open dialog sorted.\r\n      </li>\r\n      <li>\r\n\tFixed crashing bug when using automatic tag closing in XML or HTML.\r\n      </li>\r\n      <li>\r\n\tFixed bug on Windows causing very long (&gt;64K) lines to not display.\r\n      </li>\r\n      <li>\r\n\tFixed bug in backwards regular expression searching.\r\n      </li>\r\n      <li>\r\n\tFixed bug in calltips where wrong argument was highlighted.\r\n      </li>\r\n      <li>\r\n\tFixed bug in tab timmy feature when file has line feed line endings.\r\n      </li>\r\n      <li>\r\n\tFixed bug in compiling without INCLUDE_DEPRECATED_FEATURES\r\n\tdefined.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite148.zip?download\">Release 1.48</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n\tReleased on 9 September 2002.\r\n      </li>\r\n      <li>\r\n\tImproved Pascal lexer with context sensitive keywords\r\n\tand separate folder which handles  //{ and //} folding comments and\r\n\t{$region} and {$end} folding directives.\r\n\tThe \"case\" statement now folds correctly.\r\n      </li>\r\n      <li>\r\n\tC++ lexer correctly handles comments on preprocessor lines.\r\n      </li>\r\n      <li>\r\n\tNew commands for moving to beginning and end of display lines when in line\r\n\twrap mode. Key bindings added for these commands.\r\n      </li>\r\n      <li>\r\n\tNew marker symbols that look like \">>>\" and \"...\" which can be used for\r\n\tinteractive shell prompts for Python.\r\n      </li>\r\n      <li>\r\n\tThe foreground and background colours of visible whitespace can be chosen\r\n\tindependent of the colours chosen for the lexical class of that whitespace.\r\n      </li>\r\n      <li>\r\n\tPer line data optimized by using an exponential allocation scheme.\r\n      </li>\r\n      <li>\r\n\tSciTE API file loading optimized.\r\n      </li>\r\n      <li>\r\n\tSciTE for GTK+ subsystem 2 documented. The exit status of commands\r\n\tis decoded into more understandable fields.\r\n      </li>\r\n      <li>\r\n\tSciTE find dialog remembers previous find string when there is no selection.\r\n\tFind in Selection button disabled when selection is rectangular as command\r\n\tdid not work.\r\n      </li>\r\n      <li>\r\n\tShift+Enter made equivalent to Enter to avoid users having to let go of\r\n\tthe shift key when typing. Avoids the possibility of entering single carriage\r\n\treturns in a file that contains CR+LF line ends.\r\n      </li>\r\n      <li>\r\n\tAutocompletion does not immediately disappear when the length parameter\r\n\tto SCI_AUTOCSHOW is 0.\r\n      </li>\r\n      <li>\r\n\tSciTE focuses on the editor pane when File | New executed and when the\r\n\toutput pane is closed with F8. Double clicking on a non-highlighted output\r\n\tpane line selects the word under the cursor rather than seeking the next\r\n\thighlighted line.\r\n      </li>\r\n      <li>\r\n\tSciTE director interface implements an \"askproperty\" command.\r\n      </li>\r\n      <li>\r\n\tSciTE's Export as LaTeX output improved.\r\n      </li>\r\n      <li>\r\n\tBetter choice of autocompletion displaying above the caret rather than\r\n\tbelow when that is more sensible.\r\n      </li>\r\n      <li>\r\n\tBug fixed where context menu would not be completely visible if invoked\r\n\twhen cursor near bottom or left of screen.\r\n      </li>\r\n      <li>\r\n\tCrashing bug fixed when displaying long strings on GTK+ caused failure of X server\r\n\tby displaying long text in segments.\r\n      </li>\r\n      <li>\r\n\tCrashing bug fixed on GTK+ when a Scintilla window was removed from its parent\r\n\tbut was still the selection owner.\r\n      </li>\r\n      <li>\r\n\tBug fixed on Windows in Unicode mode where not all characters on a line\r\n\twere displayed when that line contained some characters not in ASCII.\r\n      </li>\r\n      <li>\r\n\tCrashing bug fixed in SciTE on Windows with clearing output while running command.\r\n      </li>\r\n      <li>\r\n\tBug fixed in SciTE for GTK+ with command completion not detected when\r\n\tno output was produced by the command.\r\n      </li>\r\n      <li>\r\n\tBug fixed in SciTE for Windows where menus were not shown translated.\r\n      </li>\r\n      <li>\r\n\tBug fixed where words failed to display in line wrapping mode with visible\r\n\tline ends.\r\n      </li>\r\n      <li>\r\n\tBug fixed in SciTE where files opened from a session file were not closed.\r\n      </li>\r\n      <li>\r\n\tCosmetic flicker fixed when using Ctrl+Up and Ctrl+Down with some caret policies.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite147.zip?download\">Release 1.47</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n\tReleased on 1 August 2002.\r\n      </li>\r\n      <li>\r\n\tSupport for GTK+ 2 in Scintilla. International input methods not supported\r\n\ton GTK+2.\r\n      </li>\r\n      <li>\r\n\tLine wrapping performance improved greatly.\r\n      </li>\r\n      <li>\r\n\tNew caret policy implementation that treats horizontal and vertical\r\n\tpositioning equivalently and independently. Old caret policy methods\r\n\tdeprecated and not all options work correctly with old methods.\r\n      </li>\r\n      <li>\r\n\tExtra fold points for C, C++, Java, ... for fold comments //{ .. //} and\r\n\t#if / #ifdef .. #endif and the #region .. #endregion feature of C#.\r\n      </li>\r\n      <li>\r\n\tScintilla method to find the height in pixels of a line. Currently returns the\r\n\tsame result for every line as all lines are same height.\r\n      </li>\r\n      <li>\r\n\tSeparate make file, scintilla_vc6.mak, for Scintilla to use Visual C++\r\n\tversion 6 since main makefile now assumes VS .NET.\r\n\tVS .NET project files available for combined Scintilla and\r\n\tSciTE in scite/boundscheck.\r\n      </li>\r\n      <li>\r\n\tSciTE automatically recognizes Unicode files based\r\n\ton their Byte Order Marks and switches to Unicode mode.\r\n\tOn Windows, where SciTE supports Unicode display, this\r\n\tallows display of non European characters.\r\n\tThe file is saved back into the same character encoding unless\r\n\tthe user decides to switch using the File | Encoding menu.\r\n      </li>\r\n      <li>\r\n\tHandling of character input changed so that a fillup character, typically '('\r\n\tdisplays a calltip when an autocompletion list was being displayed.\r\n      </li>\r\n      <li>\r\n\tMultiline strings lexed better for C++ and Lua.\r\n      </li>\r\n      <li>\r\n\tRegular expressions in JavaScript within hypertext files are lexed better.\r\n      </li>\r\n      <li>\r\n\tOn Windows, Scintilla exports a function called Scintilla_DirectFunction\r\n\tthat can be used the same as the function returned by GetDirectFunction.\r\n      </li>\r\n      <li>\r\n\tScintilla converts line endings of text obtained from the clipboard to\r\n\tthe current default line endings.\r\n      </li>\r\n      <li>\r\n\tNew SciTE property ensure.final.line.end can ensure that saved files\r\n\talways end with a new line as this is required by some tools.\r\n\tThe ensure.consistent.line.ends property ensures all line ends are the\r\n\tcurrent default when saving files.\r\n\tThe strip.trailing.spaces property now works on the buffer so the\r\n\tbuffer in memory and the file on disk are the same after a save is performed.\r\n      </li>\r\n      <li>\r\n\tThe SciTE expand abbreviation command again allows '|' characters\r\n\tin expansions to be quoted by using '||'.\r\n      </li>\r\n      <li>\r\n\tSciTE on Windows can send data to the find tool through standard\r\n\tinput rather than using a command line argument to avoid problems\r\n\twith quoting command line arguments.\r\n      </li>\r\n      <li>\r\n\tThe Stop Executing command in SciTE on Windows improved to send\r\n\ta Ctrl+Z character to the tool. Better messages when stopping a tool.\r\n      </li>\r\n      <li>\r\n\tAutocompletion can automatically \"fill up\" when one of a set of characters is\r\n\ttype with the autocomplete.&lt;lexer&gt;.fillups property.\r\n      </li>\r\n      <li>\r\n\tNew predefined properties in SciTE, SelectionStartColumn, SelectionStartLine,\r\n\tSelectionEndColumn, SelectionEndLine can be used to integrate with other\r\n\tapplications.\r\n      </li>\r\n      <li>\r\n\tEnvironment variables are available as properties in SciTE.\r\n      </li>\r\n      <li>\r\n\tSciTE on Windows keeps status line more current.\r\n      </li>\r\n      <li>\r\n\tAbbreviations work in SciTE on Linux when first opened.\r\n      </li>\r\n      <li>\r\n\tFile saving fixed in SciTE to ensure files are not closed when they can not be\r\n\tsaved because of file permissions. Also fixed a problem with buffers that\r\n\tcaused files to not be saved.\r\n      </li>\r\n      <li>\r\n\tSciTE bug fixed where monospace mode not remembered when saving files.\r\n\tSome searching options now remembered when switching files.\r\n      </li>\r\n      <li>\r\n\tSciTE on Linux now waits on child termination when it shuts a child down\r\n\tto avoid zombies.\r\n      </li>\r\n      <li>\r\n\tSciTE on Linux has a Print menu command that defaults to invoking a2ps.\r\n      </li>\r\n      <li>\r\n\tFixed incorrect highlighting of indentation guides in SciTE for Python.\r\n      </li>\r\n      <li>\r\n\tCrash fixed in Scintilla when calling GetText for 0 characters.\r\n      </li>\r\n      <li>\r\n\tExporting as LaTeX improved when processing backslashes and tabs\r\n\tand setting up font.\r\n      </li>\r\n      <li>\r\n\tCrash fixed in SciTE when exporting or copying as RTF.\r\n      </li>\r\n      <li>\r\n\tSciTE session loading fixed to handle more than 10 files in session.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite146.zip?download\">Release 1.46</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n\tReleased on 10 May 2002.\r\n      </li>\r\n      <li>\r\n\tSet of lexers compiled into Scintilla can now be changed by adding and\r\n\tremoving lexer source files from scintilla/src and running LexGen.py.\r\n      </li>\r\n      <li>\r\n\tSCN_ZOOM notification provided by Scintilla when user changes zoom level.\r\n\tMethod to determine width of strings in pixels so that elements can be sized\r\n\trelative to text size.\r\n\tSciTE changed to keep line number column displaying a given\r\n\tnumber of characters.\r\n      </li>\r\n      <li>\r\n\tThe logical width of the document used to determine scroll bar range can be set.\r\n      </li>\r\n      <li>\r\n\tSetting to allow vertical scrolling to display last line at top rather than\r\n\tbottom of window.\r\n      </li>\r\n      <li>\r\n\tRead-only mode improved to avoid changing the selection in most cases\r\n\twhen a modification is attempted. Drag and drop cursors display correctly\r\n\tfor read-only in some cases.\r\n      </li>\r\n      <li>\r\n\tVisual C++ options in make files changed to suit Visual Studio .NET.\r\n      </li>\r\n      <li>\r\n\tScintilla.iface includes feature types for enumerations and lexers.\r\n      </li>\r\n      <li>\r\n\tLua lexer improves handling of literal strings and copes with nested literal strings.\r\n      </li>\r\n      <li>\r\n\tDiff lexer changed to treat lines starting with \"***\" similarly to \"---\".\r\n\tSymbolic names defined for lexical classes.\r\n      </li>\r\n      <li>\r\n\tnncrontab lexer improved.\r\n      </li>\r\n      <li>\r\n\tTurkish fonts (iso8859-9) supported on GTK+.\r\n      </li>\r\n      <li>\r\n\tAutomatic close tag feature for XML and HTML in SciTE.\r\n      </li>\r\n      <li>\r\n\tAutomatic indentation in SciTE improved.\r\n      </li>\r\n      <li>\r\n\tMaximum number of buffers available in SciTE increased. May be up to 100\r\n\talthough other restrictions on menu length limit the real maximum.\r\n      </li>\r\n      <li>\r\n\tSave a Copy command added to SciTE.\r\n      </li>\r\n      <li>\r\n\tExport as TeX command added to SciTE.\r\n      </li>\r\n      <li>\r\n\tExport as HTML command in SciTE respects Use Monospaced Font and\r\n\tbackground colour settings.\r\n      </li>\r\n      <li>\r\n\tCompilation problem on Solaris fixed.\r\n      </li>\r\n      <li>\r\n\tOrder of files displayed for SciTE's previous and next menu and key commands\r\n\tare now consistent.\r\n      </li>\r\n      <li>\r\n\tSaving of MRU in recent file changed so files open when SciTE quit\r\n\tare remembered.\r\n      </li>\r\n      <li>\r\n\tMore variants of ctags tags handled by Open Selected Filename in SciTE.\r\n      </li>\r\n      <li>\r\n\tJavaScript embedded in XML highlighted again.\r\n      </li>\r\n      <li>\r\n\tSciTE status bar updated after changing parameters in case they are being\r\n\tdisplayed in status bar.\r\n      </li>\r\n      <li>\r\n\tCrash fixed when handling some multi-byte languages.\r\n      </li>\r\n      <li>\r\n\tCrash fixed when replacing end of line characters.\r\n      </li>\r\n      <li>\r\n\tBug in SciTE fixed in multiple buffer mode where automatic loading\r\n\tturned on could lead to losing file contents.\r\n      </li>\r\n      <li>\r\n\tBug in SciTE on GTK+ fixed where dismissing dialogs with close box led to\r\n\tthose dialogs never being shown again.\r\n      </li>\r\n      <li>\r\n\tBug in SciTE on Windows fixed where position.tile with default positions\r\n\tled to SciTE being positioned off-screen.\r\n      </li>\r\n      <li>\r\n\tBug fixed in read-only mode, clearing all deletes contraction state data\r\n\tleading to it not being synchronized with text.\r\n      </li>\r\n      <li>\r\n\tCrash fixed in SciTE on Windows when tab bar displayed.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite145.zip?download\">Release 1.45</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n\tReleased on 15 March 2002.\r\n      </li>\r\n      <li>\r\n\tLine layout cache implemented to improve performance by maintaining\r\n\tthe positioning of characters on lines. Can be set to cache nothing,\r\n\tthe line with the caret, the visible page or the whole document.\r\n      </li>\r\n      <li>\r\n\tSupport, including a new lexer, added for Matlab programs.\r\n      </li>\r\n      <li>\r\n\tLua folder supports folding {} ranges and compact mode.\r\n\tLua lexer styles floating point numbers in number style instead of\r\n\tsetting the '.' in operator style.\r\n\tUp to 6 sets of keywords.\r\n\tBetter support for [[ although only works well\r\n\twhen all on one line.\r\n      </li>\r\n      <li>\r\n\tPython lexer improved to handle floating point numbers that contain negative\r\n\texponents and that start with '.'.\r\n      </li>\r\n      <li>\r\n\tWhen performing a rectangular paste, the caret now remains at the\r\n\tinsertion point.\r\n      </li>\r\n      <li>\r\n\tOn Windows with a wheel mouse, page-at-a-time mode is recognized.\r\n      </li>\r\n      <li>\r\n\tRead-only mode added to SciTE with a property to initialize it and another property,\r\n\t$(ReadOnly) available to show this mode in the status bar.\r\n      </li>\r\n      <li>\r\n\tSciTE status bar can show the number of lines in the selection\r\n\twith the $(SelHeight) property.\r\n      </li>\r\n      <li>\r\n\tSciTE's \"Export as HTML\" command uses the current character set to produce\r\n\tcorrect output for non-Western-European character sets, such as Russian.\r\n      </li>\r\n      <li>\r\n\tSciTE's \"Export as RTF\" fixed to produce correct output when file contains '\\'.\r\n      </li>\r\n      <li>\r\n\tSciTE goto command accepts a column as well as a line.\r\n\tIf given a column, it selects the word at that column.\r\n      </li>\r\n      <li>\r\n\tSciTE's Build, Compile and Go commands are now disabled if no\r\n\taction has been assigned to them.\r\n      </li>\r\n      <li>\r\n\tThe Refresh button in the status bar has been removed from SciTE on Windows.\r\n      </li>\r\n      <li>\r\n\tBug fixed in line wrap mode where cursor up or down command did not work.\r\n      </li>\r\n      <li>\r\n\tSome styling bugs fixed that were due to a compilation problem with\r\n\tgcc and inline functions with same name but different code.\r\n      </li>\r\n      <li>\r\n\tThe way that lexers loop over text was changed to avoid accessing beyond the\r\n\tend or setting beyond the end. May fix some bugs and make the code safer but\r\n\tmay also cause new bugs.\r\n      </li>\r\n      <li>\r\n\tBug fixed in HTML lexer's handling of SGML.\r\n      </li>\r\n      <li>\r\n\tBug fixed on GTK+/X where lines wider than 32767 pixels did not display.\r\n      </li>\r\n      <li>\r\n\tSciTE bug fixed with file name generation for standard property files.\r\n      </li>\r\n      <li>\r\n\tSciTE bug fixed with Open Selected Filename command when used with\r\n\tfile name and line number combination.\r\n      </li>\r\n      <li>\r\n\tIn SciTE, indentation and tab settings stored with buffers so maintained correctly\r\n\tas buffers selected.\r\n\tThe properties used to initialize these settings can now be set separately for different\r\n\tfile patterns.\r\n      </li>\r\n      <li>\r\n\tThread safety improved on Windows with a critical section protecting the font\r\n\tcache and initialization of globals performed within Scintilla_RegisterClasses.\r\n\tNew Scintilla_ReleaseResources call provided to allow explicit freeing of resources\r\n\twhen statically bound into another application. Resources automatically freed\r\n\tin DLL version. The window classes are now unregistered as part of resource\r\n\tfreeing which fixes bugs that occurred in some containers such as Internet Explorer.\r\n      </li>\r\n      <li>\r\n\t'make install' fixed on Solaris.\r\n      </li>\r\n      <li>\r\n\tBug fixed that could lead to a file being opened twice in SciTE.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite144.zip?download\">Release 1.44</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n\tReleased on 4 February 2002.\r\n      </li>\r\n      <li>\r\n\tCrashing bug fixed in Editor::Paint.\r\n      </li>\r\n      <li>\r\n\tLua lexer no longer treats '.' as a word character and\r\n\thandles 6 keyword sets.\r\n      </li>\r\n      <li>\r\n\tWordStartPosition and WordEndPosition take an onlyWordCharacters\r\n\targument.\r\n      </li>\r\n      <li>\r\n\tSciTE option for simplified automatic indentation which repeats\r\n\tthe indentation of the previous line.\r\n      </li>\r\n      <li>\r\n\tCompilation fix on Alpha because of 64 bit.\r\n      </li>\r\n      <li>\r\n\tCompilation fix for static linking.\r\n      </li>\r\n      <li>\r\n\tLimited maximum line length handled to 8000 characters as previous\r\n\tvalue of 16000 was causing stack exhaustion crashes for some.\r\n      </li>\r\n      <li>\r\n\tWhen whole document line selected, only the last display line gets\r\n\tthe extra selected rectangle at the right hand side rather than\r\n\tevery display line.\r\n      </li>\r\n      <li>\r\n\tCaret disappearing bug fixed for the case that the caret was not on the\r\n\tfirst display line of a document line.\r\n      </li>\r\n      <li>\r\n\tSciTE bug fixed where untitled buffer containing text was sometimes\r\n\tdeleted without chance to save.\r\n      </li>\r\n      <li>\r\n\tSciTE bug fixed where use.monospaced not working with\r\n\tmultiple buffers.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite143.zip?download\">Release 1.43</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n\tReleased on 19 January 2002.\r\n      </li>\r\n      <li>\r\n\tLine wrapping robustness and performance improved in Scintilla.\r\n      </li>\r\n      <li>\r\n\tLine wrapping option added to SciTE for both edit and output panes.\r\n      </li>\r\n      <li>\r\n\tStatic linking on Windows handles cursor resource better.\r\n\tDocumentation of static linking improved.\r\n      </li>\r\n      <li>\r\n\tAutocompletion has an option to delete any word characters after the caret\r\n\tupon selecting an item.\r\n      </li>\r\n      <li>\r\n\tFOX version identified by PLAT_FOX in Platform.h.\r\n      </li>\r\n      <li>\r\n\tCalltips in SciTE use the calltip.&lt;lexer&gt;.word.characters setting to\r\n\tcorrectly find calltips for functions that include characters like '$' which\r\n\tis not normally considered a word character.\r\n      </li>\r\n      <li>\r\n\tSciTE has a command to show help on itself which gets hooked up to displaying\r\n\tSciTEDoc.html.\r\n      </li>\r\n      <li>\r\n\tSciTE option calltip.&lt;lexer&gt;.end.definition to display help text on a\r\n\tsecond line of calltip.\r\n      </li>\r\n      <li>\r\n\tFixed the handling of the Buffers menu on GTK+ to ensure current buffer\r\n\tindicated and no warnings occur.\r\n\tChanged some menu items on GTK+ version to be same as Windows version.\r\n      </li>\r\n      <li>\r\n\tuse.monospaced property for SciTE determines initial state of Use Monospaced Font\r\n\tsetting.\r\n      </li>\r\n      <li>\r\n\tThe SciTE Complete Symbol command now works when there are no word\r\n\tcharacters before the caret, even though it is slow to display the whole set of\r\n\tsymbols.\r\n      </li>\r\n      <li>\r\n\tFunction names removed from SciTE's list of PHP keywords. The full list of\r\n\tpredefined functions is available from another web site mentioned on the\r\n\tExtras page.\r\n      </li>\r\n      <li>\r\n\tCrashing bug at startup on GTK+ for some configurations fixed.\r\n      </li>\r\n      <li>\r\n\tCrashing bug on GTK+ on 64 bit platforms fixed.\r\n      </li>\r\n      <li>\r\n\tCompilation problem with some compilers fixed in GTK+.\r\n      </li>\r\n      <li>\r\n\tJapanese text entry improved on Windows 9x.\r\n      </li>\r\n      <li>\r\n        SciTE recent files directory problem on Windows when HOME and SciTE_HOME\r\n\tenvironment variables not set is now the directory of the executable.\r\n      </li>\r\n      <li>\r\n\tSession files no longer include untitled buffers.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite142.zip?download\">Release 1.42</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n\tReleased on 24 December 2001.\r\n      </li>\r\n      <li>\r\n\tBetter localization support including context menus and most messages.\r\n\tTranslations of the SciTE user interface available for Bulgarian,\r\n\tFrench, German, Italian, Russian, and Turkish.\r\n      </li>\r\n      <li>\r\n\tCan specify a character to use to indicate control characters\r\n\trather than having them displayed as mnemonics.\r\n      </li>\r\n      <li>\r\n\tScintilla key command for backspace that will not delete line\r\n\tend characters.\r\n      </li>\r\n      <li>\r\n\tScintilla method to find start and end of words.\r\n      </li>\r\n      <li>\r\n\tSciTE on GTK+ now supports the load.on.activate and save.on.deactivate\r\n\tproperties in an equivalent way to the Windows version.\r\n      </li>\r\n      <li>\r\n\tThe output pane of SciTE on Windows is now interactive so command line\r\n\tutilities that prompt for input or confirmation can be used.\r\n      </li>\r\n      <li>\r\n\tSciTE on Windows can choose directory for a \"Find in Files\"\r\n\tcommand like the GTK+ version could.\r\n      </li>\r\n      <li>\r\n\tSciTE can now load a set of API files rather than just one file.\r\n      </li>\r\n      <li>\r\n\tElapsedTime class added to Platform for accurate measurement of durations.\r\n\tUsed for debugging and for showing the user how long commands take in SciTE.\r\n      </li>\r\n      <li>\r\n\tBaan lexer added.\r\n      </li>\r\n      <li>\r\n\tIn C++ lexer, document comment keywords no longer have to be at the start\r\n\tof the line.\r\n      </li>\r\n      <li>\r\n\tPHP lexer changed to match keywords case insensitively.\r\n      </li>\r\n      <li>\r\n\tMore shell keywords added.\r\n      </li>\r\n      <li>\r\n\tSciTE support for VoiceXML added to xml.properties.\r\n      </li>\r\n       <li>\r\n\tIn SciTE the selection is not copied to the find field of the Search and Replace\r\n\tdialogs if it contains end of line characters.\r\n      </li>\r\n      <li>\r\n\tSciTE on Windows has a menu item to decide whether to respond to other\r\n\tinstances which are performing their check.if.already.open check.\r\n      </li>\r\n      <li>\r\n\tSciTE accelerator key for Box Comment command changed to avoid problems\r\n\tin non-English locales.\r\n      </li>\r\n      <li>\r\n\tSciTE context menu includes Close command for the editor pane and\r\n\tHide command for the output pane.\r\n      </li>\r\n      <li>\r\n\toutput: command added to SciTE director interface to add text to the\r\n\toutput pane. The director interface can execute commands (such as tool\r\n\tcommands with subsystem set to 3) by sending a macro:run message.\r\n      </li>\r\n      <li>\r\n\tSciTE on GTK+ will defer to the Window Manager for position if position.left or\r\n\tposition.top not set and for size if position.width or position.height not set.\r\n      </li>\r\n      <li>\r\n\tSciTE on Windows has a position.tile property to place a second instance\r\n\tto the right of the first.\r\n      </li>\r\n      <li>\r\n\t Scintilla on Windows again supports EM_GETSEL and EM_SETSEL.\r\n      </li>\r\n      <li>\r\n\tProblem fixed in Scintilla on Windows where control ID is no longer cached\r\n\tas it could be changed by external code.\r\n      </li>\r\n      <li>\r\n\tProblems fixed in SciTE on Windows when finding any other open instances at\r\n\tstart up when check.if.already.open is true.\r\n      </li>\r\n      <li>\r\n\tBugs fixed in SciTE where command strings were not always having\r\n\tvariables evaluated.\r\n      </li>\r\n      <li>\r\n\tBugs fixed with displaying partial double-byte and Unicode characters\r\n\tin rectangular selections and at the edge when edge mode is EDGE_BACKGROUND.\r\n\tColumn numbers reported by GetColumn treat multiple byte characters as one column\r\n\trather than counting bytes.\r\n      </li>\r\n      <li>\r\n\tBug fixed with caret movement over folded lines.\r\n      </li>\r\n      <li>\r\n        Another bug fixed with tracking selection in secondary views when performing\r\n\tmodifications.\r\n      </li>\r\n      <li>\r\n\tHorizontal scrolling and display of long lines optimized.\r\n      </li>\r\n      <li>\r\n\tCursor setting in Scintilla on GTK+ optimized.\r\n      </li>\r\n      <li>\r\n\tExperimental changeable style attribute.\r\n\tSet to false to make text read-only.\r\n\tCurrently only stops caret from being within not-changeable\r\n\ttext and does not yet stop deleting a range that contains\r\n\tnot-changeable text.\r\n\tCan be used from SciTE by adding notchangeable to style entries.\r\n      </li>\r\n      <li>\r\n\tExperimental line wrapping.\r\n\tCurrently has performance and appearance problems.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite141.zip?download\">Release 1.41</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n\tReleased on 6 November 2001.\r\n      </li>\r\n      <li>\r\n        Changed Platform.h to not include platform\theaders. This lessens likelihood and impact of\r\n\tname clashes from system headers and also speeds up compilation.\r\n\tRenamed DrawText to DrawTextNoClip to avoid name clash.\r\n      </li>\r\n      <li>\r\n        Changed way word functions work to treat a sequence of punctuation as\r\n\ta word. This is more sensible and also more compatible with other editors.\r\n      </li>\r\n      <li>\r\n        Cursor changes over the margins and selection on GTK+ platform.\r\n      </li>\r\n      <li>\r\n        SC_MARK_BACKGROUND is a marker that only changes the line's background colour.\r\n      </li>\r\n      <li>\r\n\tEnhanced Visual Basic lexer handles character date and octal literals,\r\n\tand bracketed keywords for VB.NET. There are two VB lexers, vb and vbscript\r\n\twith type indication characters like ! and $ allowed at the end of identifiers\r\n\tin vb but not vbscript. Lexer states now separate from those used for C++ and\r\n\tnames start with SCE_B.\r\n      </li>\r\n      <li>\r\n         Lexer added for Bullant language.\r\n      </li>\r\n      <li>\r\n         The horizontal scroll position, xOffset, is now exposed through the API.\r\n      </li>\r\n      <li>\r\n         The SCN_POSCHANGED notification is deprecated as it was causing confusion.\r\n\t Use SCN_UPDATEUI  instead.\r\n      </li>\r\n      <li>\r\n         Compilation problems fixed for some versions of gcc.\r\n      </li>\r\n      <li>\r\n        Support for WM_GETTEXT restored on Windows.\r\n      </li>\r\n      <li>\r\n        Double clicking on an autocompletion list entry works on GTK+.\r\n      </li>\r\n      <li>\r\n        Bug fixed with case insensitive sorts for autocompletion lists.\r\n      </li>\r\n      <li>\r\n        Bug fixed with tracking selection in secondary views when performing modifications.\r\n      </li>\r\n      <li>\r\n        SciTE's abbreviation expansion feature will now indent expansions to the current\r\n\tindentation level if indent.automatic is on.\r\n      </li>\r\n      <li>\r\n        SciTE allows setting up of parameters to commands from a dialog and can also\r\n       show this dialog automatically to prompt for arguments when running a command.\r\n      </li>\r\n      <li>\r\n        SciTE's Language menu (formerly Options | Use Lexer) is now defined by the\r\n\tmenu.language property rather than being hardcoded.\r\n      </li>\r\n      <li>\r\n        The user interface of SciTE can be localized to a particular language by editing\r\n\ta locale.properties file.\r\n      </li>\r\n      <li>\r\n        On Windows, SciTE will try to move to the front when opening a new file from\r\n\tthe shell and using check.if.already.open.\r\n      </li>\r\n      <li>\r\n        SciTE can display the file name and directory in the title bar in the form\r\n\t\"file @ directory\" when title.full.path=2.\r\n      </li>\r\n      <li>\r\n        The SciTE time.commands property reports the time taken by a command as well\r\n\tas its status when completed.\r\n      </li>\r\n      <li>\r\n        The SciTE find.files property is now a list separated by '|' characters and this list is\r\n\tadded into the Files pull down of the Find in Files dialog.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite140.zip?download\">Release 1.40</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n\tReleased on 23 September 2001.\r\n      </li>\r\n      <li>\r\n\tRemoval of emulation of Win32 RichEdit control in core of Scintilla.\r\n\t<em>This change may be incompatible with existing client code.</em>\r\n\tSome emulation still done in Windows platform layer.\r\n      </li>\r\n      <li>\r\n\tSGML support in the HTML/XML lexer.\r\n      </li>\r\n      <li>\r\n\tSciTE's \"Stop Executing\" command will terminate GUI programs on\r\n\tWindows NT and Windows 2000.\r\n      </li>\r\n      <li>\r\n\tStyleContext class helps construct lexers that are simple and accurate.\r\n\tUsed in the C++, Eiffel, and Python lexers.\r\n      </li>\r\n      <li>\r\n\tClipboard operations in GTK+ version convert between platform '\\n' line endings and\r\n\tcurrently chosen line endings.\r\n      </li>\r\n      <li>\r\n\tAny character in range 0..255 can be used as a marker.\r\n\tThis can be used to support numbered bookmarks, for example.\r\n      </li>\r\n      <li>\r\n\tThe default scripting language for ASP can be set.\r\n      </li>\r\n      <li>\r\n\tNew lexer and other support for crontab files used with the nncron scheduler.\r\n      </li>\r\n      <li>\r\n\tFolding of Python improved.\r\n      </li>\r\n      <li>\r\n\tThe ` character is treated as a Python operator.\r\n      </li>\r\n      <li>\r\n\tLine continuations (\"\\\" at end of line) handled inside Python strings.\r\n      </li>\r\n      <li>\r\n\tMore consistent handling of line continuation ('\\' at end of line) in\r\n\tC++ lexer.\r\n\tThis fixes macro definitions that span more than one line.\r\n      </li>\r\n      <li>\r\n\tC++ lexer can understand Doxygen keywords in doc comments.\r\n      </li>\r\n      <li>\r\n\tSciTE on Windows allows choosing to open the \"open\" dialog on the directory\r\n\tof the current file rather than in the default directory.\r\n      </li>\r\n      <li>\r\n\tSciTE on Windows handles command line arguments in \"check.if.already.open\"\r\n\tcorrectly when the current directory of the new instance is different to the\r\n\talready open instance of SciTE.\r\n      </li>\r\n      <li>\r\n\t\"cwd\" command (change working directory) defined for SciTE director interface.\r\n      </li>\r\n      <li>\r\n\tSciTE \"Export As HTML\" produces better, more compliant, and shorter files.\r\n      </li>\r\n      <li>\r\n\tSciTE on Windows allows several options for determining default file name\r\n\tfor exported files.\r\n      </li>\r\n      <li>\r\n\tAutomatic indentation of Python in SciTE fixed.\r\n      </li>\r\n      <li>\r\n\tExported HTML can support folding.\r\n      </li>\r\n      <li>\r\n\tBug fixed in SCI_GETTEXT macro command of director interface.\r\n      </li>\r\n      <li>\r\n\tCursor leak fixed on GTK+.\r\n      </li>\r\n      <li>\r\n\tDuring SciTE shutdown, \"identity\" messages are no longer sent over the director interface.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite139.zip?download\">Release 1.39</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n\tReleased on 22 August 2001.\r\n      </li>\r\n      <li>\r\n\tWindows version requires msvcrt.dll to be available so will not work\r\n\ton original Windows 95 version 1. The msvcrt.dll file is installed\r\n\tby almost everything including Internet Explorer so should be available.\r\n      </li>\r\n      <li>\r\n\tFlattened tree control style folding margin. The SciTE fold.plus option is\r\n\tnow fold.symbols and has more values for the new styles.\r\n      </li>\r\n      <li>\r\n\tMouse dwell events are generated when the user holds the mouse steady\r\n\tover Scintilla.\r\n      </li>\r\n      <li>\r\n      PositionFromPointClose is like PositionFromPoint but returns\r\n      INVALID_POSITION when point outside window or after end of line.\r\n      </li>\r\n      <li>\r\n      Input of Hungarian and Russian characters in GTK+ version works by\r\n      truncating input to 8 bits if in the range of normal characters.\r\n      </li>\r\n      <li>\r\n      Better choices for font descriptors on GTK+ for most character sets.\r\n      </li>\r\n      <li>\r\n      GTK+ Scintilla is destroyed upon receiving destroy signal rather than\r\n      destroy_event signal.\r\n      </li>\r\n      <li>\r\n      Style setting that force upper or lower case text.\r\n      </li>\r\n      <li>\r\n      Case-insensitive autocompletion lists work correctly.\r\n      </li>\r\n      <li>\r\n      Keywords can be prefix based so ^GTK_ will treat all words that start\r\n      with GTK_ as keywords.\r\n      </li>\r\n      <li>\r\n      Horizontal scrolling can be jumpy rather than gradual.\r\n      </li>\r\n      <li>\r\n      GetSelText places a '\\0' in the buffer if the selection is empty..\r\n      </li>\r\n      <li>\r\n      EnsureVisible split into two methods EnsureVisible which will not scroll to show\r\n      the line and EnsureVisibleEnforcePolicy which may scroll.\r\n      </li>\r\n      <li>\r\n      Python folder has options to fold multi-line comments and triple quoted strings.\r\n      </li>\r\n      <li>\r\n      C++ lexer handles keywords before '.' like \"this.x\" in Java as keywords.\r\n      Compact folding mode option chooses whether blank lines after a structure are\r\n      folded with that structure. Second set of keywords with separate style supported.\r\n      </li>\r\n      <li>\r\n      Ruby lexer handles multi-line comments.\r\n      </li>\r\n      <li>\r\n      VB has folder.\r\n      </li>\r\n      <li>\r\n      PHP lexer has an operator style, handles \"&lt;?\" and \"?&gt;\" inside strings\r\n      and some comments.\r\n      </li>\r\n      <li>\r\n      TCL lexer which is just an alias for the C++ lexer so does not really\r\n      understand TCL syntax.\r\n      </li>\r\n      <li>\r\n      Error lines lexer has styles for Lua error messages and .NET stack traces.\r\n      </li>\r\n      <li>\r\n      Makefile lexer has a target style.\r\n      </li>\r\n      <li>\r\n      Lua lexer handles some [[]] string literals.\r\n      </li>\r\n      <li>\r\n      HTML and XML lexer have a SCE_H_SGML state for tags that\r\n      start with \"&lt;!\".\r\n      </li>\r\n      <li>\r\n      Fixed Scintilla bugs with folding. When modifications were performed near\r\n      folded regions sometimes no unfolding occurred when it should have. Deleting a\r\n      fold causing character sometimes failed to update fold information correctly.\r\n      </li>\r\n      <li>\r\n      Better support for Scintilla on GTK+ for Win32 including separate\r\n      PLAT_GTK_WIN32 definition and correct handling of rectangular selection\r\n      with clipboard operations.\r\n      </li>\r\n      <li>\r\n      SciTE has a Tools | Switch Pane (Ctrl+F6) command to switch focus between\r\n      edit and output panes.\r\n      </li>\r\n      <li>\r\n      SciTE option output.scroll allows automatic scrolling of output pane to\r\n      be turned off.\r\n      </li>\r\n      <li>\r\n      Commands can be typed into the SciTE output pane similar to a shell window.\r\n      </li>\r\n      <li>\r\n      SciTE properties magnification and output magnification set initial zoom levels.\r\n      </li>\r\n      <li>\r\n      Option for SciTE comment block command to place comments at start of line.\r\n      </li>\r\n      <li>\r\n       SciTE for Win32 has an option to minimize to the tray rather than the task bar.\r\n      </li>\r\n      <li>\r\n      Close button on SciTE tool bar for Win32.\r\n      </li>\r\n      <li>\r\n      SciTE compiles with GCC 3.0.\r\n      </li>\r\n      <li>\r\n      SciTE's automatic indentation of C++ handles braces without preceding keyword\r\n      correctly.\r\n      </li>\r\n      <li>\r\n      Bug fixed with GetLine method writing past the end of where it should.\r\n      </li>\r\n      <li>\r\n      Bug fixed with mouse drag automatic scrolling when some lines were folded.\r\n      </li>\r\n      <li>\r\n      Bug fixed because caret XEven setting was inverted.\r\n      </li>\r\n      <li>\r\n      Bug fixed where caret was initially visible even though window was not focussed.\r\n      </li>\r\n      <li>\r\n      Bug fixed where some file names could end with \"\\\\\" which caused slow\r\n      downs on Windows 9x.\r\n      </li>\r\n      <li>\r\n      On Win32, SciTE Replace dialog starts with focus on replacement text.\r\n      </li>\r\n      <li>\r\n      SciTE Go to dialog displays correct current line.\r\n      </li>\r\n      <li>\r\n      Fixed bug with SciTE opening multiple files at once.\r\n      </li>\r\n      <li>\r\n      Fixed bug with Unicode key values reported to container truncated.\r\n      </li>\r\n      <li>\r\n      Fixed bug with unnecessary save point notifications.\r\n      </li>\r\n      <li>\r\n      Fixed bugs with indenting and unindenting at start of line.\r\n      </li>\r\n      <li>\r\n      Monospace Font setting behaves more consistently.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite138.zip?download\">Release 1.38</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n\tReleased on 23 May 2001.\r\n      </li>\r\n      <li>\r\n\tLoadable lexer plugins on Windows.\r\n      </li>\r\n      <li>\r\n\tRuby lexer and support.\r\n      </li>\r\n      <li>\r\n\tLisp lexer and support.\r\n      </li>\r\n      <li>\r\n\tEiffel lexer and support.\r\n      </li>\r\n      <li>\r\n\tModes for better handling of Tab and BackSpace keys within\r\n\tindentation. Mode to avoid autocompletion list cancelling when\r\n\tthere are no viable matches.\r\n      </li>\r\n      <li>\r\n\tReplaceTarget replaced with two calls ReplaceTarget\r\n\t(which is incompatible with previous ReplaceTarget) and\r\n\tReplaceTargetRE. Both of these calls have a count first\r\n\tparameter which allows using strings containing nulls.\r\n\tSearchInTarget and SetSearchFlags functions allow\r\n\tspecifying a search in several simple steps which helps\r\n\tsome clients which can not create structs or pointers easily.\r\n      </li>\r\n      <li>\r\n\tAsian language input through an Input Method Editor works\r\n\ton Windows 2000.\r\n      </li>\r\n      <li>\r\n\tOn Windows, control characters can be entered through use of\r\n\tthe numeric keypad in conjunction with the Alt key.\r\n      </li>\r\n      <li>\r\n\tDocument memory allocation changed to grow exponentially\r\n\twhich reduced time to load a 30 Megabyte file from\r\n\t1000 seconds to 25. Change means more memory may be used.\r\n      </li>\r\n      <li>\r\n\tWord part movement keys now handled in Scintilla rather than\r\n\tSciTE.\r\n      </li>\r\n      <li>\r\n\tRegular expression '^' and '$' work more often allowing insertion\r\n\tof text at start or end of line with a replace command.\r\n\tBackslash quoted control characters \\a, \\b, \\f, \\t, and \\v\r\n\trecognized within sets.\r\n      </li>\r\n      <li>\r\n\tSession files for SciTE.\r\n      </li>\r\n      <li>\r\n\tExport as PDF command hidden in SciTE as it often failed.\r\n\tCode still present so can be turned on by those willing to cope.\r\n      </li>\r\n      <li>\r\n\tBug fixed in HTML lexer handling % before &gt; as end ASP\r\n\teven when no start ASP encountered.\r\n        Bug fixed when scripts ended with a quoted string and\r\n        end tag was not seen.\r\n      </li>\r\n      <li>\r\n\tBug fixed on Windows where context menu key caused menu to\r\n\tappear in corner of screen rather than within window.\r\n      </li>\r\n      <li>\r\n\tBug fixed in SciTE's Replace All command not processing\r\n\twhole file when replace string longer than search string.\r\n      </li>\r\n      <li>\r\n\tBug fixed in SciTE's MRU list repeating entries if Ctrl+Tab\r\n\tused when all entries filled.\r\n      </li>\r\n      <li>\r\n\tConvertEOLs call documentation fixed.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite137.zip?download\">Release 1.37</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n\tReleased on 17 April 2001.\r\n      </li>\r\n      <li>\r\n\tBug fixed with scroll bars being invisible on GTK+ 1.2.9.\r\n      </li>\r\n      <li>\r\n\tScintilla and SciTE support find and replace using simple regular\r\n\texpressions with tagged expressions. SciTE supports C '\\' escapes\r\n\tin the Find and Replace dialogs.\r\n\tReplace in Selection available in SciTE.\r\n      </li>\r\n      <li>\r\n\tScintilla has a 'target' feature for replacing code rapidly without\r\n\tcausing display updates.\r\n      </li>\r\n      <li>\r\n\tScintilla and SciTE on GTK+ support file dropping from file managers\r\n\tsuch as Nautilus and gmc. Files or other URIs dropped on Scintilla\r\n\tresult in a URIDropped notification.\r\n      </li>\r\n      <li>\r\n\tLexers may have separate Lex and Fold functions.\r\n      </li>\r\n      <li>\r\n\tLexer infrastructure improved to allow for plug in lexers and for referring\r\n\tto lexers by name rather than by ID.\r\n      </li>\r\n      <li>\r\n\tAda lexer and support added.\r\n      </li>\r\n      <li>\r\n\tOption in both Scintilla and SciTE to treat both left and right margin\r\n\tas equally important when repositioning visible area in response to\r\n\tcaret movement. Default is to prefer visible area positioning which\r\n\tminimizes the horizontal scroll position thus favouring the left margin.\r\n      </li>\r\n      <li>\r\n\tCaret line highlighting.\r\n      </li>\r\n      <li>\r\n\tCommands to delete from the caret to the end of line and\r\n\tfrom the caret to the beginning of line.\r\n      </li>\r\n      <li>\r\n\tSciTE has commands for inserting and removing block comments and\r\n\tfor inserting stream comments.\r\n      </li>\r\n      <li>\r\n\tSciTE Director interface uses C++ '\\' escapes to send control characters.\r\n      </li>\r\n      <li>\r\n\tSciTE Director interface adds more commands including support for macros.\r\n      </li>\r\n      <li>\r\n\tSciTE has menu options for recording and playing macros which are visible\r\n\twhen used with a companion program that supports these features.\r\n      </li>\r\n      <li>\r\n\tSciTE has an Expand Abbreviation command.\r\n\tAbbreviations are stored in a global abbrev.properties file.\r\n      </li>\r\n      <li>\r\n\tSciTE has a Full Screen command to switch between a normal window\r\n\tsize and using the full screen. On Windows, the menu bar can be turned\r\n\toff when in full screen mode.\r\n      </li>\r\n      <li>\r\n\tSciTE has a Use monospaced font command to switch between the normal\r\n\tset of fonts and one size of a particular fixed width font.\r\n      </li>\r\n      <li>\r\n\tSciTE's use of tabs can be controlled for particular file names\r\n\tas well as globally.\r\n      </li>\r\n      <li>\r\n\tThe contents of SciTE's status bar can be defined by a property and\r\n\tinclude variables. On Windows, several status bar definitions can be active\r\n\twith a click on the status bar cycling through them.\r\n      </li>\r\n      <li>\r\n\tCopy as RTF command in SciTE on Windows to allow pasting\r\n\tstyled text into word processors.\r\n      </li>\r\n      <li>\r\n\tSciTE can allow the use of non-alphabetic characters in\r\n\tComplete Symbol lists and can automatically display this autocompletion\r\n\tlist when a trigger character such as '.' is typed.\r\n\tComplete word can be set to pop up when the user is typing a word and\r\n\tthere is only one matching word in the document.\r\n      </li>\r\n      <li>\r\n\tSciTE lists the imported properties files on a menu to allow rapid\r\n\taccess to them.\r\n      </li>\r\n      <li>\r\n\tSciTE on GTK+ improvements to handling accelerator keys and focus\r\n\tin dialogs. Message boxes respond to key presses without the Alt key as\r\n\tthey have no text entries to accept normal keystrokes.\r\n      </li>\r\n      <li>\r\n\tSciTE on GTK+ sets the application icon.\r\n      </li>\r\n      <li>\r\n\tSciTE allows setting the colours used to indicate the current\r\n\terror line.\r\n      </li>\r\n      <li>\r\n\tVariables within PHP strings have own style. Keyword list updated.\r\n      </li>\r\n      <li>\r\n\tKeyword list for Lua updated for Lua 4.0.\r\n      </li>\r\n      <li>\r\n\tBug fixed in rectangular selection where rectangle still appeared\r\n\tselected after using cursor keys to move caret.\r\n      </li>\r\n      <li>\r\n\tBug fixed in C++ lexer when deleting a '{' controlling a folded range\r\n\tled to that range becoming permanently invisible.\r\n      </li>\r\n      <li>\r\n\tBug fixed in Batch lexer where comments were not recognized.\r\n      </li>\r\n      <li>\r\n\tBug fixed with undo actions coalescing into steps incorrectly.\r\n      </li>\r\n      <li>\r\n\tBug fixed with Scintilla on GTK+ positioning scroll bars 1 pixel\r\n\tover the Scintilla window leading to their sides being chopped off.\r\n      </li>\r\n      <li>\r\n\tBugs fixed in SciTE when doing some actions led to the start\r\n\tor end of the file being displayed rather than the current location.\r\n      </li>\r\n      <li>\r\n\tAppearance of calltips fixed to look like document text including\r\n\tany zoom factor. Positioned to be outside current line even when\r\n\tmultiple fonts and sizes used.\r\n      </li>\r\n      <li>\r\n\tBug fixed in Scintilla macro support where typing Enter caused both a newline\r\n\tcommand and newline character insertion to be recorded.\r\n      </li>\r\n      <li>\r\n\tBug fixed in SciTE on GTK+ where focus was moving\r\n\tbetween widgets incorrectly.\r\n      </li>\r\n      <li>\r\n\tBug fixed with fold symbols sometimes not updating when\r\n\tthe text changed.\r\n      </li>\r\n      <li>\r\n\tBugs fixed in SciTE's handling of folding commands.\r\n      </li>\r\n      <li>\r\n\tDeprecated undo collection enumeration removed from API.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite136.zip?download\">Release 1.36</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n\tReleased on 1 March 2001.\r\n      </li>\r\n      <li>\r\n\tScintilla supports GTK+ on Win32.\r\n      </li>\r\n      <li>\r\n\tSome untested work on making Scintilla and SciTE 64 bit compatible.\r\n\tFor users on GTK+ this requires including Scintilla.h before\r\n\tScintillaWidget.h.\r\n      </li>\r\n      <li>\r\n\tHTML lexer allows folding HTML.\r\n      </li>\r\n      <li>\r\n\tNew lexer for Avenue files which are used in the ESRI ArcView GIS.\r\n      </li>\r\n      <li>\r\n\tDOS Batch file lexer has states for '@', external commands, variables and\r\n\toperators.\r\n      </li>\r\n      <li>\r\n\tC++ lexer can fold comments of /* .. */ form.\r\n      </li>\r\n      <li>\r\n\tBetter disabling of pop up menu items in Scintilla when in read-only mode.\r\n      </li>\r\n      <li>\r\n\tStarting to move to Doxygen compatible commenting.\r\n      </li>\r\n      <li>\r\n\tDirector interface on Windows enables another application to control SciTE.\r\n      </li>\r\n      <li>\r\n\tOpening SciTE on Windows 9x sped up greatly for some cases.\r\n      </li>\r\n      <li>\r\n\tThe command.build.directory property allows SciTE to run the build\r\n\tcommand in a different directory to the source files.\r\n      </li>\r\n      <li>\r\n\tSciTE on Windows allows setting foreground and background colours\r\n\tfor printed headers and footers.\r\n      </li>\r\n      <li>\r\n\tBug fixed in finding calltips in SciTE which led to no calltips for some identifiers.\r\n      </li>\r\n      <li>\r\n\tDocumentation added for lexers and for the extension and director interfaces.\r\n      </li>\r\n      <li>\r\n\tSciTE menus rearranged with new View menu taking over some of the items that\r\n\twere under the Options menu. Clear All Bookmarks command added.\r\n      </li>\r\n      <li>\r\n\tClear Output command in SciTE.\r\n      </li>\r\n      <li>\r\n\tSciTE on Windows gains an Always On Top command.\r\n      </li>\r\n      <li>\r\n\tBug fixed in SciTE with attempts to define properties recursively.\r\n      </li>\r\n      <li>\r\n\tBug fixed in SciTE properties where only one level of substitution was done.\r\n      </li>\r\n      <li>\r\n\tBug fixed in SciTE properties where extensions were not being\r\n\tmatched in a case insensitive manner.\r\n      </li>\r\n      <li>\r\n\tBug fixed in SciTE on Windows where the Go to dialog displays the correct\r\n\tline number.\r\n      </li>\r\n      <li>\r\n\tIn SciTE, if fold.on.open set then switching buffers also performs fold.\r\n      </li>\r\n      <li>\r\n\tBug fixed in Scintilla where ensuring a line was visible in the presence of folding\r\n\toperated on the document line instead of the visible line.\r\n      </li>\r\n      <li>\r\n\tSciTE command line processing modified to operate on arguments in order and in\r\n\ttwo phases. First any arguments before the first file name are processed, then the\r\n\tUI is opened, then the remaining arguments are processed. Actions defined for the\r\n\tDirector interface (currently only \"open\") may also be used on the command line.\r\n\tFor example, \"SciTE -open:x.txt\" will start SciTE and open x.txt.\r\n      </li>\r\n      <li>\r\n\tNumbered menu items SciTE's Buffers menu and the Most Recently Used portion\r\n\tof the File menu go from 1..0 rather than 0..9.\r\n      </li>\r\n      <li>\r\n\tThe tab bar in SciTE for Windows has numbers.\r\n\tThe tab.hide.one option hides the tab bar until there is more than one buffer open.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite135.zip?download\">Release 1.35</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n        Released on 29 January 2001.\r\n      </li>\r\n      <li>\r\n        Rewritten and simplified widget code for the GTK+ version to enhance\r\n        solidity and make more fully compliant with platform norms. This includes more\r\n        normal handling of keystrokes so they are forwarded to containers correctly.\r\n      </li>\r\n      <li>\r\n        User defined lists can be shown.\r\n      </li>\r\n      <li>\r\n        Many fixes to the Perl lexer.\r\n      </li>\r\n      <li>\r\n        Pascal lexer handles comments more correctly.\r\n      </li>\r\n      <li>\r\n        C/C++/Java/JavaScript lexer has a state for line doc comments.\r\n      </li>\r\n      <li>\r\n        Error output lexer understands Sun CC messages.\r\n      </li>\r\n      <li>\r\n        Make file lexer has variable, preprocessor, and operator states.\r\n      </li>\r\n      <li>\r\n        Wider area given to an italics character that is at the end of a line to prevent it\r\n\tbeing cut off.\r\n      </li>\r\n      <li>\r\n        Call to move the caret inside the currently visible area.\r\n      </li>\r\n      <li>\r\n        Paste Rectangular will space fill on the left hand side of the pasted text as\r\n\tneeded to ensure it is kept rectangular.\r\n      </li>\r\n      <li>\r\n        Cut and Paste Rectangular does nothing in read-only mode.\r\n      </li>\r\n      <li>\r\n        Undo batching changed so that a paste followed by typing creates two undo actions..\r\n      </li>\r\n      <li>\r\n        A \"visibility policy\" setting for Scintilla determines which range of lines are displayed\r\n\twhen a particular line is moved to. Also exposed as a property in SciTE.\r\n      </li>\r\n      <li>\r\n        SciTE command line allows property settings.\r\n      </li>\r\n      <li>\r\n        SciTE has a View Output command to hide or show the output pane.\r\n      </li>\r\n      <li>\r\n        SciTE's Edit menu has been split in two with searching commands moved to a\r\n\tnew Search menu. Find Previous and Previous Bookmark are in the Search menu.\r\n      </li>\r\n      <li>\r\n        SciTE on Windows has options for setting print margins, headers and footers.\r\n      </li>\r\n      <li>\r\n        SciTE on Windows has tooltips for toolbar.\r\n      </li>\r\n      <li>\r\n        SciTE on GTK+ has properties for setting size of file selector.\r\n      </li>\r\n      <li>\r\n        Visual and audio cues in SciTE on Windows enhanced.\r\n      </li>\r\n      <li>\r\n        Fixed performance problem in SciTE for GTK+ by dropping the extra 3D\r\n        effect on the content windows.\r\n      </li>\r\n      <li>\r\n        Fixed problem in SciTE where choosing a specific lexer then meant\r\n        that no lexer was chosen when files opened.\r\n      </li>\r\n      <li>\r\n        Default selection colour changed to be visible on low colour displays.\r\n      </li>\r\n      <li>\r\n        Fixed problems with automatically reloading changed documents in SciTE on\r\n        Windows.\r\n      </li>\r\n      <li>\r\n        Fixed problem with uppercase file extensions in SciTE.\r\n      </li>\r\n      <li>\r\n        Fixed some problems when using characters >= 128, some of which were being\r\n        incorrectly treated as spaces.\r\n      </li>\r\n      <li>\r\n        Fixed handling multiple line tags, non-inline scripts, and XML end tags /&gt; in HTML/XML lexer.\r\n      </li>\r\n      <li>\r\n        Bookmarks in SciTE no longer disappear when switching between buffers.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite134.zip?download\">Release 1.34</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n        Released on 28 November 2000.\r\n      </li>\r\n      <li>\r\n        Pascal lexer.\r\n      </li>\r\n      <li>\r\n        Export as PDF in SciTE.\r\n      </li>\r\n      <li>\r\n        Support for the OpenVMS operating system in SciTE.\r\n      </li>\r\n      <li>\r\n        SciTE for GTK+ can check for another instance of SciTE\r\n\tediting a file and switch to it rather than open a second instance\r\n\ton one file.\r\n      </li>\r\n      <li>\r\n        Fixes to quoting and here documents in the Perl lexer.\r\n      </li>\r\n      <li>\r\n        SciTE on Windows can give extra visual and audio cues when a\r\n\twarning is shown or find restarts from beginning of file.\r\n      </li>\r\n      <li>\r\n        Open Selected Filename command in SciTE. Also understands some\r\n\twarning message formats.\r\n      </li>\r\n      <li>\r\n        Wider area for line numbers when printing.\r\n      </li>\r\n      <li>\r\n        Better scrolling performance on GTK+.\r\n      </li>\r\n      <li>\r\n        Fixed problem where rectangles with negative coordinates were\r\n\tinvalidated leading to trouble with platforms that use\r\n\tunsigned coordinates.\r\n      </li>\r\n      <li>\r\n        GTK+ Scintilla uses more compliant signalling code so that keyboard\r\n\tevents should propagate to containers.\r\n      </li>\r\n      <li>\r\n        Bug fixed with opening full or partial paths.\r\n      </li>\r\n      <li>\r\n        Improved handling of paths in error messages in SciTE.\r\n      </li>\r\n      <li>\r\n        Better handling of F6 in SciTE.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite133.zip?download\">Release 1.33</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n        Released on 6 November 2000.\r\n      </li>\r\n      <li>\r\n        XIM support for the GTK+ version of Scintilla ensures that more non-English\r\n        characters can be typed.\r\n      </li>\r\n      <li>\r\n        Caret may be 1, 2, or 3 pixels wide.\r\n      </li>\r\n      <li>\r\n        Cursor may be switched to wait image during lengthy processing.\r\n      </li>\r\n      <li>\r\n        Scintilla's internal focus flag is exposed for clients where focus is handled in\r\n        complex ways.\r\n      </li>\r\n      <li>\r\n        Error status defined for Scintilla to hold indication that an operation failed and the reason\r\n        for that failure. No detection yet implemented but clients may start using the interface\r\n        so as to be ready for when it does.\r\n      </li>\r\n      <li>\r\n        Context sensitive help in SciTE.\r\n      </li>\r\n      <li>\r\n        CurrentWord property available in SciTE holding the value of the word the\r\n        caret is within or near.\r\n      </li>\r\n      <li>\r\n        Apache CONF file lexer.\r\n      </li>\r\n      <li>\r\n        Changes to Python lexer to allow 'as' as a context sensitive keyword and the\r\n        string forms starting with u, r, and ur to be recognized.\r\n      </li>\r\n      <li>\r\n        SCN_POSCHANGED notification now working and SCN_PAINTED notification added.\r\n      </li>\r\n      <li>\r\n        Word part movement commands for cursoring between the parts of reallyLongCamelIdentifiers and\r\n        other_ways_of_making_words.\r\n      </li>\r\n      <li>\r\n        When text on only one line is selected, Shift+Tab moves to the previous tab stop.\r\n      </li>\r\n      <li>\r\n        Tab control available for Windows version of SciTE listing all the buffers\r\n        and making it easy to switch between them.\r\n      </li>\r\n      <li>\r\n        SciTE can be set to automatically determine the line ending type from the contents of a\r\n        file when it is opened.\r\n      </li>\r\n      <li>\r\n        Dialogs in GTK+ version of SciTE made more modal and have accelerator keys.\r\n      </li>\r\n      <li>\r\n        Find in Files command in GTK+ version of SciTE allows choice of directory.\r\n      </li>\r\n      <li>\r\n        On Windows, multiple files can be opened at once.\r\n      </li>\r\n      <li>\r\n        SciTE source broken up into more files.\r\n      </li>\r\n      <li>\r\n        Scintilla headers made safe for C language, not just C++.\r\n      </li>\r\n      <li>\r\n        New printing modes - force background to white and force default background to white.\r\n      </li>\r\n      <li>\r\n        Automatic unfolding not occurring when Enter pressed at end of line bug fixed.\r\n      </li>\r\n      <li>\r\n        Bugs fixed in line selection.\r\n      </li>\r\n      <li>\r\n        Bug fixed with escapes in PHP strings in the HTML lexer.\r\n      </li>\r\n      <li>\r\n        Bug fixed in SciTE for GTK+ opening files when given full paths.\r\n      </li>\r\n      <li>\r\n        Bug fixed in autocompletion where user backspaces into existing text.\r\n      </li>\r\n      <li>\r\n        Bugs fixed in opening files and ensuring they are saved before running.\r\n        A case bug also fixed here.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite132.zip?download\">Release 1.32</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n        Released on 8 September 2000.\r\n      </li>\r\n      <li>\r\n        Fixes bugs in complete word and related code. Protection against a bug when\r\n\treceiving a bad argument.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite131.zip?download\">Release 1.31</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n        Released on 6 September 2000.\r\n      </li>\r\n      <li>\r\n        Scintilla is available as a COM control from the scintillactrl module in CVS.\r\n      </li>\r\n      <li>\r\n        Style setting to underline text. Exposed in SciTE as \"underlined\".\r\n      </li>\r\n      <li>\r\n        Style setting to make text invisible.\r\n      </li>\r\n      <li>\r\n        SciTE has an extensibility interface that can be used to implement features such as\r\n        a scripting language or remote control. An example use of this is the extlua module\r\n        available from CVS which allows SciTE to be scripted in Lua.\r\n      </li>\r\n      <li>\r\n        Many minor fixes to all of the lexers.\r\n      </li>\r\n      <li>\r\n        New lexer for diff and patch files.\r\n      </li>\r\n      <li>\r\n        Error message lexer understands Perl error messages.\r\n      </li>\r\n      <li>\r\n        C/C++/Java lexer now supports C#, specifically verbatim strings and\r\n\t@ quoting of identifiers that are the same as keywords. SciTE has\r\n\ta set of keywords for C# and a build command set up for C#.\r\n      </li>\r\n      <li>\r\n        Scintilla property to see whether in overtype or insert state.\r\n      </li>\r\n      <li>\r\n         PosChanged notification fired when caret moved.\r\n      </li>\r\n      <li>\r\n        Comboboxes in dialogs in SciTE on Windows can be horizontally scrolled.\r\n      </li>\r\n      <li>\r\n        Autocompletion and calltips can treat the document as case sensitive or\r\n        case insensitive.\r\n      </li>\r\n      <li>\r\n        Autocompletion can be set to automatically choose the only\r\n\telement in a single element list.\r\n      </li>\r\n      <li>\r\n        Set of characters that automatically complete an autocompletion list\r\n\tcan be set.\r\n      </li>\r\n      <li>\r\n        SciTE command to display calltip - useful when dropped because of\r\n\tediting.\r\n      </li>\r\n      <li>\r\n        SciTE has a Revert command to go back to the last saved version.\r\n      </li>\r\n      <li>\r\n        SciTE has an Export as RTF command. Save as HTML is renamed\r\n\tto Export as HTML and is located on the Export sub menu.\r\n      </li>\r\n      <li>\r\n        SciTE command \"Complete Word\" searches document for any\r\n\twords starting with characters before caret.\r\n      </li>\r\n      <li>\r\n        SciTE options for changing aspects of the formatting of files exported\r\n\tas HTML or RTF.\r\n      </li>\r\n      <li>\r\n        SciTE \"character.set\" option for choosing the character\r\n\tset for all fonts.\r\n      </li>\r\n      <li>\r\n        SciTE has a \"Toggle all folds\" command.\r\n      </li>\r\n      <li>\r\n        The makefiles have changed. The makefile_vc and\r\n\tmakefile_bor files in scintilla/win32 and scite/win32 have been\r\n\tmerged into scintilla/win32/scintilla.mak and scite/win32/scite.mak.\r\n\tDEBUG may be defined for all make files and this will turn on\r\n\tassertions and for some make files will choose other debugging\r\n\toptions.\r\n      </li>\r\n      <li>\r\n         To make debugging easier and allow good use of BoundsChecker\r\n\t there is a Visual C++ project file in scite/boundscheck that builds\r\n\t all of Scintilla and SciTE into one executable.\r\n      </li>\r\n      <li>\r\n         The size of the SciTE output window can be set with the\r\n\t output.horizontal.size and output.vertical.size settings.\r\n      </li>\r\n      <li>\r\n         SciTE status bar indicator for insert or overwrite mode.\r\n      </li>\r\n      <li>\r\n        Performance improvements to autocompletion and calltips.\r\n      </li>\r\n      <li>\r\n        A caret redraw problem when undoing is fixed.\r\n      </li>\r\n      <li>\r\n        Crash with long lines fixed.\r\n      </li>\r\n      <li>\r\n        Bug fixed with merging markers when lines merged.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite130.zip?download\">Release 1.30</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n        Released on 26 July 2000.\r\n      </li>\r\n      <li>\r\n        Much better support for PHP which is now an integral part of the HTML support.\r\n      </li>\r\n      <li>\r\n        Start replacement of Windows-specific APIs with cross platform APIs.\r\n        In 1.30, the new APIs are introduced but the old APIs are still available.\r\n        For the GTK+ version, may have to include \"WinDefs.h\" explicitly to\r\n        use the old APIs.\r\n      </li>\r\n      <li>\r\n        \"if\" and \"import\" statements in SciTE properties files allows modularization into\r\n        language-specific properties files and choices based upon platform.\r\n        This means that SciTE is delivered with 9 language-specific properties files\r\n        as well as the standard SciTEGlobal.properties file.\r\n      </li>\r\n      <li>\r\n        Much lower resource usage on Windows 9x.\r\n      </li>\r\n      <li>\r\n        \"/p\" option in SciTE on Windows for printing a file and then exiting.\r\n      </li>\r\n      <li>\r\n        Options for printing with inverted brightness (when the screen is set to use\r\n        a dark background) and to force black on white printing.\r\n      </li>\r\n      <li>\r\n        Option for printing magnified or miniaturized from screen settings.\r\n      </li>\r\n      <li>\r\n        In SciTE, Ctrl+F3 and Ctrl+Shift+F3 find the selection in the forwards and backwards\r\n        directions respectively.\r\n      </li>\r\n      <li>\r\n        Auto-completion lists may be set to cancel when the cursor goes before\r\n        its start position or before the start of string being completed.\r\n      </li>\r\n      <li>\r\n        Auto-completion lists automatically size more sensibly.\r\n      </li>\r\n      <li>\r\n        SCI_CLEARDOCUMENTSTYLE zeroes all style bytes, ensures all\r\n        lines are shown and deletes all folding information.\r\n      </li>\r\n      <li>\r\n        On Windows, auto-completion lists are visually outdented rather than indented.\r\n      </li>\r\n      <li>\r\n        Close all command in SciTE.\r\n      </li>\r\n      <li>\r\n        On Windows multiple files can be dragged into SciTE.\r\n      </li>\r\n      <li>\r\n        When saving a file, the SciTE option save.deletes.first deletes it before doing the save.\r\n        This allows saving with a different capitalization on Windows.\r\n      </li>\r\n      <li>\r\n        When use tabs option is off pressing the tab key inserts spaces.\r\n      </li>\r\n      <li>\r\n        Bug in indicators leading to extra line drawn fixed.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite128.zip?download\">Release 1.28</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n        Released on 27 June 2000.\r\n      </li>\r\n      <li>\r\n         Fixes crash in indentation guides when indent size set to 0.\r\n      </li>\r\n      <li>\r\n         Fixes to installation on GTK+/Linux. User properties file on GTK+ has a dot at front of name:\r\n         .SciTEUser.properties. Global properties file location configurable at compile time\r\n         defaulting to $prefix/share/scite. $prefix determined from Gnome if present else its\r\n         /usr/local and can be overridden by installer. Gnome menu integration performed in\r\n         make install if Gnome present.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite127.zip?download\">Release 1.27</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n        Released on 23 June 2000.\r\n      </li>\r\n      <li>\r\n         Indentation guides. View whitespace mode may be set to not display whitespace\r\n\t in indentation.\r\n      </li>\r\n      <li>\r\n        Set methods have corresponding gets for UndoCollection, BufferedDraw,\r\n\tCodePage, UsePalette, ReadOnly, CaretFore, and ModEventMask.\r\n      </li>\r\n      <li>\r\n        Caret is continuously on rather than blinking while typing or holding down\r\n\tdelete or backspace. And is now always shown if non blinking when focused on GTK+.\r\n      </li>\r\n      <li>\r\n        Bug fixed in SciTE with file extension comparison now done in case insensitive way.\r\n      </li>\r\n      <li>\r\n        Bugs fixed in SciTE's file path handling on Windows.\r\n      </li>\r\n      <li>\r\n        Bug fixed with preprocessor '#' last visible character causing hang.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite126.zip?download\">Release 1.26</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n        Released on 13 June 2000.\r\n      </li>\r\n      <li>\r\n         Support for the Lua language in both Scintilla and SciTE.\r\n      </li>\r\n      <li>\r\n        Multiple buffers may be open in SciTE.\r\n      </li>\r\n      <li>\r\n        Each style may have a character set configured. This may determine\r\n\tthe characters that are displayed by the style.\r\n      </li>\r\n      <li>\r\n         In the C++ lexer, lexing of preprocessor source may either treat it all as being in\r\n\t the preprocessor class or only the initial # and preprocessor command word as\r\n\t being in the preprocessor class.\r\n      </li>\r\n      <li>\r\n        Scintilla provides SCI_CREATEDOCUMENT, SCI_ADDREFDOCUMENT, and\r\n\tSCI_RELEASEDOCUMENT to make it easier for a container to deal with multiple\r\n\tdocuments.\r\n      </li>\r\n      <li>\r\n        GTK+ specific definitions in Scintilla.h were removed to ScintillaWidget.h. All GTK+ clients will need to\r\n\t#include \"ScintillaWidget.h\".\r\n      </li>\r\n      <li>\r\n        For GTK+, tools can be executed in the background by setting subsystem to 2.\r\n      </li>\r\n      <li>\r\n        Keys in the properties files are now case sensitive. This leads to a performance increase.\r\n      </li>\r\n      <li>\r\n        Menu to choose which lexer to use on a file.\r\n      </li>\r\n      <li>\r\n        Tab size dialog on Windows.\r\n      </li>\r\n      <li>\r\n        File dialogs enlarged on GTK+.\r\n      </li>\r\n      <li>\r\n         Match Brace command bound to Ctrl+E on both platforms with Ctrl+] a synonym on Windows.\r\n         Ctrl+Shift+E is select to matching brace. Brace matching tries to match to either the inside or the\r\n         outside, depending on whether the cursor is inside or outside the braces initially.\r\n\tView End of Line bound to Ctrl+Shift+O.\r\n      </li>\r\n      <li>\r\n        The Home key may be bound to move the caret to either the start of the line or the start of the\r\n        text on the line.\r\n      </li>\r\n      <li>\r\n        Visual C++ project file for SciTE.\r\n      </li>\r\n      <li>\r\n        Bug fixed with current x location after Tab key.\r\n      </li>\r\n      <li>\r\n        Bug fixed with hiding fold margin by setting fold.margin.width to 0.\r\n      </li>\r\n      <li>\r\n        Bugs fixed with file name confusion on Windows when long and short names used, or different capitalizations,\r\n\tor relative paths.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite125.zip?download\">Release 1.25</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n        Released on 9 May 2000.\r\n      </li>\r\n      <li>\r\n        Some Unicode support on Windows. Treats buffer and API as UTF-8 and displays\r\n\tthrough UCS-2 of Windows.\r\n      </li>\r\n      <li>\r\n        Automatic indentation. Indentation size can be different to tab size.\r\n      </li>\r\n      <li>\r\n        Tool bar.\r\n      </li>\r\n      <li>\r\n        Status bar now on Windows as well as GTK+.\r\n      </li>\r\n      <li>\r\n        Input fields in Find and Replace dialogs now have history on both Windows and\r\n\tGTK+.\r\n      </li>\r\n      <li>\r\n        Auto completion list items may be separated by a chosen character to allow spaces\r\n\tin items. The selected item may be changed through the API.\r\n      </li>\r\n      <li>\r\n        Horizontal scrollbar can be turned off.\r\n      </li>\r\n      <li>\r\n        Property to remove trailing spaces when saving file.\r\n      </li>\r\n      <li>\r\n        On Windows, changed font size calculation to be more compatible with\r\n\tother applications.\r\n      </li>\r\n      <li>\r\n        On GTK+, SciTE's global properties files are looked for in the directory specified in the\r\n\tSCITE_HOME environment variable if it is set. This allows hiding in a dot directory.\r\n      </li>\r\n      <li>\r\n        Keyword lists in SciTE updated for JavaScript to include those destined to be used in\r\n\tthe future. IDL includes XPIDL keywords as well as MSIDL keywords.\r\n      </li>\r\n      <li>\r\n        Zoom level can be set and queried through API.\r\n      </li>\r\n      <li>\r\n        New notification sent before insertions and deletions.\r\n      </li>\r\n      <li>\r\n        LaTeX lexer.\r\n      </li>\r\n      <li>\r\n        Fixes to folding including when deletions and additions are performed.\r\n      </li>\r\n      <li>\r\n        Fix for crash with very long lines.\r\n      </li>\r\n      <li>\r\n        Fix to affect all of rectangular selections with deletion and case changing.\r\n      </li>\r\n      <li>\r\n        Removed non-working messages that had been included only for Richedit compatibility.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/scite124.zip\">Release 1.24</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n        Released on 29 March 2000.\r\n      </li>\r\n      <li>\r\n        Added lexing of IDL based on C++ lexer with extra UUID lexical class.\r\n      </li>\r\n      <li>\r\n        Functions and associated keys for Line Delete, Line Cut, Line Transpose,\r\n\tSelection Lower Case and Selection Upper Case.\r\n      </li>\r\n      <li>\r\n        Property setting for SciTE, eol.mode, chooses initial state of line end characters.\r\n      </li>\r\n      <li>\r\n        Fixed bugs in undo history with small almost-contiguous changes being incorrectly coalesced.\r\n      </li>\r\n      <li>\r\n        Fixed bugs with incorrect expansion of ContractionState data structures causing crash.\r\n      </li>\r\n      <li>\r\n        Fixed bugs relating to null fonts.\r\n      </li>\r\n      <li>\r\n        Fixed bugs where recolourization was not done sometimes when required.\r\n      </li>\r\n      <li>\r\n        Fixed compilation problems with SVector.h.\r\n      </li>\r\n      <li>\r\n        Fixed bad setting of fold points in Python.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/scite123.zip?download\">Release 1.23</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n        Released on 21 March 2000.\r\n      </li>\r\n      <li>\r\n        Directory structure to separate on basis of product (Scintilla, SciTE, DMApp)\r\n\tand environment (Cross-platform, Win32, GTK+).\r\n      </li>\r\n      <li>\r\n        Download packaging to allow download of the source or platform dependent executables.\r\n      </li>\r\n      <li>\r\n        Source code now available from CVS at SourceForge.\r\n      </li>\r\n      <li>\r\n        Very simple Windows-only demonstration application DMApp is available from cvs as dmapp.\r\n      </li>\r\n      <li>\r\n        Lexing functionality may optionally be included in Scintilla rather than be provided by\r\n        the container.\r\n      </li>\r\n      <li>\r\n        Set of lexers included is determined at link time by defining which of the Lex* object files\r\n\tare linked in.\r\n      </li>\r\n      <li>\r\n        On Windows, the SciLexer.DLL extends Scintilla.DLL with the standard lexers.\r\n      </li>\r\n      <li>\r\n        Enhanced HTML lexer styles embedded VBScript and Python.\r\n\tASP segments are styled and ASP scripts in JavaScript, VBScript and Python are styled.\r\n      </li>\r\n      <li>\r\n        PLSQL and PHP supported.\r\n      </li>\r\n      <li>\r\n        Maximum number of lexical states extended to 128.\r\n      </li>\r\n      <li>\r\n        Lexers may store per line parse state for multiple line features such as ASP script language choice.\r\n      </li>\r\n      <li>\r\n        Lexing API simplified.\r\n      </li>\r\n      <li>\r\n        Project file for Visual C++.\r\n      </li>\r\n      <li>\r\n        Can now cycle through all recent files with Ctrl+Tab in SciTE.\r\n      </li>\r\n      <li>\r\n        Bookmarks in SciTE.\r\n      </li>\r\n      <li>\r\n        Drag and drop copy works when dragging to the edge of the selection.\r\n      </li>\r\n      <li>\r\n        Fixed bug with value sizes in properties file.\r\n      </li>\r\n      <li>\r\n        Fixed bug with last line in properties file not being used.\r\n      </li>\r\n      <li>\r\n        Bug with multiple views of one document fixed.\r\n      </li>\r\n      <li>\r\n        Keypad now works on GTK+.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/SciTE122.zip?download\">Release 1.22</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n        Released on 27 February 2000.\r\n      </li>\r\n      <li>\r\n        wxWindows platform defined.\r\n\tImplementation for wxWindows will be available separately\r\n\tfrom main Scintilla distribution.\r\n      </li>\r\n      <li>\r\n        Line folding in Scintilla.\r\n      </li>\r\n      <li>\r\n        SciTE performs syntax directed folding for C/C++/Java/JavaScript and for Python.\r\n      </li>\r\n      <li>\r\n        Optional macro recording support.\r\n      </li>\r\n      <li>\r\n        User properties file (SciTEUser.properties) allows for customization by the user\r\n\tthat is not overwritten with each installation of SciTE.\r\n      </li>\r\n      <li>\r\n        Python lexer detects and highlights inconsistent indentation.\r\n      </li>\r\n      <li>\r\n        Margin API made more orthogonal. SCI_SETMARGINWIDTH and SCI_SETLINENUMBERWIDTH\r\n        are deprecated in favour of this new API.\r\n      </li>\r\n      <li>\r\n        Margins may be made sensitive to forward mouse click events to container.\r\n      </li>\r\n      <li>\r\n        SQL lexer and styles included.\r\n      </li>\r\n      <li>\r\n        Perl lexer handles regular expressions better.\r\n      </li>\r\n      <li>\r\n        Caret policy determines how closely caret is tracked by visible area.\r\n      </li>\r\n      <li>\r\n        New marker shapes: arrow pointing down, plus and minus.\r\n      </li>\r\n      <li>\r\n        Optionally display full path in title rather than just file name.\r\n      </li>\r\n      <li>\r\n        Container is notified when Scintilla gains or loses focus.\r\n      </li>\r\n      <li>\r\n        SciTE handles focus in a more standard way and applies the main\r\n\tedit commands to the focused pane.\r\n      </li>\r\n      <li>\r\n        Container is notified when Scintilla determines that a line needs to be made visible.\r\n      </li>\r\n      <li>\r\n        Document watchers receive notification when document about to be deleted.\r\n      </li>\r\n      <li>\r\n        Document interface allows access to list of watchers.\r\n      </li>\r\n      <li>\r\n        Line end determined correctly for lines ending with only a '\\n'.\r\n      </li>\r\n      <li>\r\n        Search variant that searches form current selection and sets selection.\r\n      </li>\r\n      <li>\r\n        SciTE understands format of diagnostic messages from WScript.\r\n      </li>\r\n      <li>\r\n        SciTE remembers top line of window for each file in MRU list so switching to a recent file\r\n\tis more likely to show the same text as when the file was previously visible.\r\n      </li>\r\n      <li>\r\n        Document reference count now initialized correctly.\r\n      </li>\r\n      <li>\r\n        Setting a null document pointer creates an empty document.\r\n      </li>\r\n      <li>\r\n        WM_GETTEXT can no longer overrun buffer.\r\n      </li>\r\n      <li>\r\n        Polygon drawing bug fixed on GTK+.\r\n      </li>\r\n      <li>\r\n        Java and JavaScript lexers merged into C++ lexer.\r\n      </li>\r\n      <li>\r\n        C++ lexer indicates unterminated strings by colouring the end of the line\r\n\trather than changing the rest of the file to string style. This is less\r\n\tobtrusive and helps the folding.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://prdownloads.sourceforge.net/scintilla/SciTE121.zip?download\">Release 1.21</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n        Released on 2 February 2000.\r\n      </li>\r\n      <li>\r\n        Blank margins on left and right side of text.\r\n      </li>\r\n      <li>\r\n        SCN_CHECKBRACE renamed SCN_UPDATEUI and made more efficient.\r\n      </li>\r\n      <li>\r\n        SciTE source code refactored into platform independent and platform specific classes.\r\n      </li>\r\n      <li>\r\n        XML and Perl subset lexers in SciTE.\r\n      </li>\r\n      <li>\r\n        Large improvement to lexing speed.\r\n      </li>\r\n      <li>\r\n        A new subsystem, 2, allows use of ShellExec on Windows.\r\n      </li>\r\n      <li>\r\n        Borland compatible makefile.\r\n      </li>\r\n      <li>\r\n        Status bar showing caret position in GTK+ version of SciTE.\r\n      </li>\r\n      <li>\r\n        Bug fixes to selection drawing when part of selection outside window, mouse release over\r\n        scroll bars, and scroll positioning after deletion.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/SciTE120.zip\">Release 1.2</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n        Released on 21 January 2000.\r\n      </li>\r\n      <li>\r\n        Multiple views of one document.\r\n      </li>\r\n      <li>\r\n        Rectangular selection, cut, copy, paste, drag and drop.\r\n      </li>\r\n      <li>\r\n        Long line indication.\r\n      </li>\r\n      <li>\r\n        Reverse searching\r\n      </li>\r\n      <li>\r\n        Line end conversion.\r\n      </li>\r\n      <li>\r\n        Generic autocompletion and calltips in SciTE.\r\n      </li>\r\n      <li>\r\n        Call tip background colour can be set.\r\n      </li>\r\n      <li>\r\n        SCI_MARKERPREV for moving to a previous marker.\r\n      </li>\r\n      <li>\r\n        Caret kept more within window where possible.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/SciTE115.zip\">Release 1.15</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n        Released on 15 December 1999.\r\n      </li>\r\n      <li>\r\n        Brace highlighting and badlighting (for mismatched braces).\r\n      </li>\r\n      <li>\r\n        Visible line ends.\r\n      </li>\r\n      <li>\r\n        Multiple line call tips.\r\n      </li>\r\n      <li>\r\n        Printing now works from SciTE on Windows.\r\n      </li>\r\n      <li>\r\n        SciTE has a global \"*\" lexer style that is used as the basis for all the lexers' styles.\r\n      </li>\r\n      <li>\r\n        Fixes some warnings on GTK+ 1.2.6.\r\n      </li>\r\n      <li>\r\n        Better handling of modal dialogs on GTK+.\r\n      </li>\r\n      <li>\r\n        Resize handle drawn on pane splitter in SciTE on GTK+ so it looks more like a regular GTK+\r\n        *paned widget.\r\n      </li>\r\n      <li>\r\n        SciTE does not place window origin offscreen if no properties file found on GTK+.\r\n      </li>\r\n      <li>\r\n        File open filter remembered in SciTE on Windows.\r\n      </li>\r\n      <li>\r\n        New mechanism using style numbers 32 to 36 standardizes the setting of styles for brace\r\n        highlighting, brace badlighting, line numbers, control characters and the default style.\r\n      </li>\r\n      <li>\r\n        Old messages SCI_SETFORE .. SCI_SETFONT have been replaced by the default style 32. The old\r\n        messages are deprecated and will disappear in a future version.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/SciTE114.zip\">Release 1.14</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n        Released on 20 November 1999.\r\n      </li>\r\n      <li>\r\n        Fixes a scrolling bug reported on GTK+.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/SciTE113.zip\">Release 1.13</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n        Released on 18 November 1999.\r\n      </li>\r\n      <li>\r\n        Fixes compilation problems with the mingw32 GCC 2.95.2 on Windows.\r\n      </li>\r\n      <li>\r\n        Control characters are now visible.\r\n      </li>\r\n      <li>\r\n        Performance has improved, particularly for scrolling.\r\n      </li>\r\n      <li>\r\n        Windows RichEdit emulation is more accurate. This may break client code that uses these\r\n        messages: EM_GETLINE, EM_GETLINECOUNT, EM_EXGETSEL, EM_EXSETSEL, EM_EXLINEFROMCHAR,\r\n        EM_LINELENGTH, EM_LINEINDEX, EM_CHARFROMPOS, EM_POSFROMCHAR, and EM_GETTEXTRANGE.\r\n      </li>\r\n      <li>\r\n        Menus rearranged and accelerator keys set for all static items.\r\n      </li>\r\n      <li>\r\n        Placement of space indicators in view whitespace mode is more accurate with some fonts.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/SciTE112.zip\">Release 1.12</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n        Released on 9 November 1999.\r\n      </li>\r\n      <li>\r\n        Packaging error in 1.11 meant that the compilation error was not fixed in that release.\r\n        Linux/GTK+ should compile with GCC 2.95 this time.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/SciTE111.zip\">Release 1.11</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n        Released on 7 November 1999.\r\n      </li>\r\n      <li>\r\n        Fixed a compilation bug in ScintillaGTK.cxx.\r\n      </li>\r\n      <li>\r\n        Added a README file to explain how to build.\r\n      </li>\r\n      <li>\r\n        GTK+/Linux downloads now include documentation.\r\n      </li>\r\n      <li>\r\n        Binary only Sc1.EXE one file download for Windows.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/SciTE110.zip\">Release 1.1</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n        Released on 6 November 1999.\r\n      </li>\r\n      <li>\r\n        Major restructuring for better modularity and platform independence.\r\n      </li>\r\n      <li>\r\n        Inter-application drag and drop.\r\n      </li>\r\n      <li>\r\n        Printing support in Scintilla on Windows.\r\n      </li>\r\n      <li>\r\n        Styles can select colouring to end of line. This can be used when a file contains more than\r\n        one language to differentiate between the areas in each language. An example is the HTML +\r\n        JavaScript styling in SciTE.\r\n      </li>\r\n      <li>\r\n        Actions can be grouped in the undo stack, so they will be undone together. This grouping is\r\n        hierarchical so higher level actions such as replace all can be undone in one go. Call to\r\n        discover whether there are any actions to redo.\r\n      </li>\r\n      <li>\r\n        The set of characters that define words can be changed.\r\n      </li>\r\n      <li>\r\n        Markers now have identifiers and can be found and deleted by their identifier. The empty\r\n        marker type can be used to make a marker that is invisible and which is only used to trace\r\n        where a particular line moves to.\r\n      </li>\r\n      <li>\r\n        Double click notification.\r\n      </li>\r\n      <li>\r\n        HTML styling in SciTE also styles embedded JavaScript.\r\n      </li>\r\n      <li>\r\n        Additional tool commands can be added to SciTE.\r\n      </li>\r\n      <li>\r\n        SciTE option to allow reloading if changed upon application activation and saving on\r\n        application deactivation. Not yet working on GTK+ version.\r\n      </li>\r\n      <li>\r\n        Entry fields in search dialogs remember last 10 user entries. Not working in all cases in\r\n        Windows version.\r\n      </li>\r\n      <li>\r\n        SciTE can save a styled copy of the current file in HTML format. As SciTE does not yet\r\n        support printing, this can be used to print a file by then using a browser to print the\r\n        HTML file.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/SciTE102.zip\">Release 1.02</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n        Released on 1 October 1999.\r\n      </li>\r\n      <li>\r\n        GTK+ version compiles with GCC 2.95.\r\n      </li>\r\n      <li>\r\n        Properly deleting objects when window destroyed under GTK+.\r\n      </li>\r\n      <li>\r\n        If the selection is not empty backspace deletes the selection.\r\n      </li>\r\n      <li>\r\n        Some X style middle mouse button handling for copying the primary selection to and from\r\n        Scintilla. Does not work in all cases.\r\n      </li>\r\n      <li>\r\n        HTML styling in SciTE.\r\n      </li>\r\n      <li>\r\n        Stopped dirty flag being set in SciTE when results pane modified.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/SciTE101.zip\">Release 1.01</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n        Released on 28 September 1999.\r\n      </li>\r\n      <li>\r\n        Better DBCS support on Windows including IME.\r\n      </li>\r\n      <li>\r\n        Wheel mouse support for scrolling and zooming on Windows. Zooming with Ctrl+KeypadPlus and\r\n        Ctrl+KeypadMinus.\r\n      </li>\r\n      <li>\r\n        Performance improvements especially on GTK+.\r\n      </li>\r\n      <li>\r\n        Caret blinking and settable colour on both GTK+ and Windows.\r\n      </li>\r\n      <li>\r\n        Drag and drop within a Scintilla window. On Windows, files can be dragged into SciTE.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/SciTE100.zip\">Release 1.0</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n        Released on 17 May 1999.\r\n      </li>\r\n      <li>\r\n        Changed name of \"Tide\" to \"SciTE\" to avoid clash with a TCL based IDE. \"SciTE\" is a\r\n        SCIntilla based Text Editor and is Latin meaning something like \"understanding in a neat\r\n        way\" and is also an Old English version of the word \"shit\".\r\n      </li>\r\n      <li>\r\n        There is a SCI_AUTOCSTOPS message for defining a string of characters that will stop\r\n        autocompletion mode. Autocompletion mode is cancelled when any cursor movement occurs apart\r\n        from backspace.\r\n      </li>\r\n      <li>\r\n        GTK+ version now splits horizontally as well as vertically and all dialogs cancel when the\r\n        escape key is pressed.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/Tide92.zip\">Beta release 0.93</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n        Released on 12 May 1999.\r\n      </li>\r\n      <li>\r\n        A bit more robust than 0.92 and supports SCI_MARKERNEXT message.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/Tide92.zip\">Beta release 0.92</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n        Released on 11 May 1999.\r\n      </li>\r\n      <li>\r\n        GTK+ version now contains all features of Windows version with some very small differences.\r\n        Executing programs works much better now.\r\n      </li>\r\n      <li>\r\n        New palette code to allow more colours to be displayed in 256 colour screen modes. A line\r\n        number column can be displayed to the left of the selection margin.\r\n      </li>\r\n      <li>\r\n        The code that maps from line numbers to text positions and back has been completely\r\n        rewritten to be faster, and to allow markers to move with the text.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/Tide91.zip\">Beta release 0.91</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n        Released on 30 April 1999, containing fixes to text measuring to make Scintilla work better\r\n        with bitmap fonts. Also some small fixes to make compiling work with Visual C++.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/Tide90.zip\">Beta release 0.90</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n        Released on 29 April 1999, containing working GTK+/Linux version.\r\n      </li>\r\n      <li>\r\n        The Java, C++ and Python lexers recognize operators as distinct from default allowing them\r\n        to be highlighted.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/Tide82.zip\">Beta release 0.82</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n        Released on 1 April 1999, to fix a problem with handling the Enter key in PythonWin. Also\r\n        fixes some problems with cmd key mapping.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       <a href=\"https://www.scintilla.org/Tide81.zip\">Beta release 0.81</a>\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n        Released on 30th March 1999, containing bug fixes and a few more features.\r\n      </li>\r\n      <li>\r\n        Static linking supported and Tidy.EXE, a statically linked version of Tide.EXE. Changes to\r\n        compiler flags in the makefiles to optimize for size.\r\n      </li>\r\n      <li>\r\n        Scintilla supports a 'savepoint' in the undo stack which can be set by the container when\r\n        the document is saved. Notifications are sent to the container when the savepoint is\r\n        entered or left, allowing the container to display a dirty indicator and change its\r\n        menus.\r\n      </li>\r\n      <li>\r\n        When Scintilla is set to read-only mode, a notification is sent to the container should the\r\n        user try to edit the document. This can be used to check the document out of a version\r\n        control system.\r\n      </li>\r\n      <li>\r\n        There is an API for setting the appearance of indicators.\r\n      </li>\r\n      <li>\r\n        The keyboard mapping can be redefined or removed so it can be implemented completely by the\r\n        container. All of the keyboard commands are now commands which can be sent by the\r\n        container.\r\n      </li>\r\n      <li>\r\n        A home command like Visual C++ with one hit going to the start of the text on the line and\r\n        the next going to the left margin is available. I do not personally like this but my\r\n        fingers have become trained to it by much repetition.\r\n      </li>\r\n      <li>\r\n        SCI_MARKERDELETEALL has an argument in wParam which is the number of the type marker to\r\n        delete with -1 performing the old action of removing all marker types.\r\n      </li>\r\n      <li>\r\n        Tide now understands both the file name and line numbers in error messages in most cases.\r\n      </li>\r\n      <li>\r\n        Tide remembers the current lines of files in the recently used list.\r\n      </li>\r\n      <li>\r\n        Tide has a Find in Files command.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       Beta release 0.80\r\n    </h3>\r\n    <ul>\r\n      <li>\r\n        This was the first public release on 14th March 1999, containing a mostly working Win32\r\n        Scintilla DLL and Tide EXE.\r\n      </li>\r\n    </ul>\r\n    <h3>\r\n       Beta releases of SciTE were called Tide\r\n    </h3>\r\n  </body>\r\n</html>\r\n"
  },
  {
    "path": "scintilla/doc/ScintillaRelated.html",
    "content": "<?xml version=\"1.0\"?>\r\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\r\n    \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n  <head>\r\n    <meta name=\"generator\" content=\"HTML Tidy, see www.w3.org\" />\r\n    <meta name=\"generator\" content=\"SciTE\" />\r\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\r\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\r\n    <title>\r\n      Scintilla and SciTE Related Sites\r\n    </title>\r\n  </head>\r\n  <body bgcolor=\"#FFFFFF\" text=\"#000000\">\r\n    <table bgcolor=\"#000000\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\r\n      <tr>\r\n        <td>\r\n          <img src=\"SciTEIco.png\" border=\"3\" height=\"64\" width=\"64\" alt=\"Scintilla icon\" />\r\n        </td>\r\n        <td>\r\n          <a href=\"index.html\" style=\"color:white;text-decoration:none\"><font size=\"5\">Scintilla\r\n          and SciTE</font></a>\r\n        </td>\r\n      </tr>\r\n    </table>\r\n    <h2>\r\n       Related Sites\r\n    </h2>\r\n    <h3>\r\n       Ports and Bindings of Scintilla\r\n    </h3>\r\n    <p>\r\n\t<a href=\"https://github.com/mneuroth/SciTEQt\">SciTEQt</a>\r\n\tis a port of the SciTE editor to the Qt QML/Quick platform.\r\n    </p>\r\n    <p>\r\n\t<a href=\"https://orbitalquark.github.io/scinterm\">Scinterm</a>\r\n\tis an implementation of Scintilla for the ncurses platform.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://www.morphos-team.net/releasenotes/3.0\">Scintilla.mcc</a>\r\n\tis a port to MorphOS.\r\n    </p>\r\n    <p>\r\n\t<a href=\"https://metacpan.org/pod/Wx::Scintilla\">Wx::Scintilla</a>\r\n\tis a Perl Binding for Scintilla on wxWidgets.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://codebrainz.github.com/GtkScintilla/\">GtkScintilla</a>\r\n\tis a GTK+ widget which enables easily adding a powerful\r\n\tsource code editor to your applications. Harnessing the abilities\r\n\tof the Scintilla editing component, GtkScintilla adds a familiar\r\n\tGTK+/GObject API, making the widget comfortable to use in\r\n\tthese programs, using all the typical GObject conventions.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://www.mewsoft.com/forums/source-code-editor-activex-control-released-scintilla-activex-wrapper-control&amp;action=ViewTopic&amp;Topic=1494&amp;Forum=1&amp;Page=1&amp;Period=0a&amp;Lang=English\">Editawy</a>\r\n\tis an ActiveX Control wrapper that support all Scintilla functions and additional high level functions.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://sourceforge.net/projects/jintilla/\">Jintilla</a>\r\n\tis a JNI wrapper that allows Scintilla to be used in Java with\r\n\tboth SWT and AWT.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://delphisci.sourceforge.net/\">Delphi Scintilla Interface Components</a>\r\n\tis a FREE collection of components that makes it easy to use the\r\n         Scintilla source code editing control from within Delphi and C++ Builder.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://wxcode.sourceforge.net/showcomp.php?name=wxStEdit\">wxStEdit</a>\r\n\tis a library and sample program that provides extra features over wxStyledTextControl.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://www.naughter.com/scintilla.html\">CScintillaCtrl, CScintillaView &amp; CScintillaDoc</a>\r\n\tare freeware MFC classes to encapsulate Scintilla.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://sourceforge.net/projects/scide/\">ScintillaNet\r\n\t</a> is an encapsulation of Scintilla for use within the .NET framework.\r\n    </p>\r\n    <p>\r\n\t<a href=\"https://riverbankcomputing.com/software/qscintilla/intro\">QScintilla\r\n\t</a> is a port of Scintilla to the Qt platform. It has a similar license to Qt: GPL for use in\r\n\tfree software and commercial for use in close-source applications.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://www.adapower.com/gwindows/\">\r\n\tGWindows</a> is a Win32 RAD GUI Framework for Ada 95 that\r\n\tincludes a binding of Scintilla.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://scintilla.cvs.sourceforge.net/viewvc/scintilla/ScintillaVB/\">ScintillaVB</a>\r\n\tis an ActiveX control written in VB that encapsulates Scintilla.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://savannah.nongnu.org/projects/fxscintilla/\">FXScintilla\r\n\t</a> is a port of Scintilla to the FOX platform. FXRuby includes Ruby\r\n\tbindings for FXScintilla.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://www.pnotepad.org/scintilla/\">Delphi wrapper</a> for\r\n\tScintilla which is also usable from Borland C++ Builder.\r\n    </p>\r\n    <p>\r\n       The wxStyledTextCtrl editor component  in the\r\n       <a href=\"http://www.wxwidgets.org/\">wxWidgets</a> cross platform toolkit is based on Scintilla.<br />\r\n       A Python binding for wxStyledTextCtrl is part of <a href=\"http://wxpython.org/\">wxPython</a>.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://sourceforge.net/projects/moleskine/\">gtkscintilla</a>\r\n\tis an alternative GTK class implementation for scintilla.\r\n\tThis implementation acts more like a Gtk+ object, with many methods rather\r\n\tthan just scintilla_send_message() and is available as a shared library.\r\n\tThis implementation works with GTK 1.x.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://sourceforge.net/projects/moleskine/\">gtkscintilla2</a>\r\n\tis an alternative GTK class implementation for scintilla\r\n\tsimilar to the above, but for GTK 2.x.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://sourceforge.net/projects/moleskine/\">pygtkscintilla</a>\r\n\tis a Python binding for gtk1.x scintilla that uses\r\n\tgtkscintilla instead of the default GTK class.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://scintilla.cvs.sourceforge.net/viewvc/scintilla/scintillactrl/\">ScintillaCtrl</a>\r\n\tis an unmaintained ActiveX control wrapper for Scintilla.\r\n    </p>\r\n    <h3>\r\n       Projects using Scintilla\r\n    </h3>\r\n    <p>\r\n\t<a href=\"https://github.com/dail8859/NotepadNext\">Notepad Next</a>\r\n\tis a cross-platform reimplementation of Notepad++.\r\n    </p>\r\n    <p>\r\n\t<a href=\"https://github.com/dolphinsmalltalk/Dolphin\">Dolphin Smalltalk</a>\r\n\tis an implementation of the Smalltalk language for Windows.\r\n    </p>\r\n    <p>\r\n\t<a href=\"https://github.com/simdsoft/x-studio/blob/master/README_EN.md\">x-studio</a>\r\n\tis a powerful and very lightweight developer IDE that supports Lua debugging.\r\n    </p>\r\n    <p>\r\n\t<a href=\"https://sourceforge.net/projects/autogui/\">Adventure IDE</a>\r\n\tis a general-purpose IDE and lightweight text editor for Windows.\r\n    </p>\r\n    <p>\r\n\t<a href=\"https://www.javacardos.com/tools\">JCIDE</a>\r\n\tis an IDE designed specifically for the Java Card programming language.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://www.microissuer.com/?p=176\">Snooper</a>\r\n\tis an IDE for the smart card industry.\r\n    </p>\r\n    <p>\r\n\t<a href=\"https://github.com/martinrotter/textilosaurus\">Textilosaurus</a>\r\n\tis simple cross-platform UTF-8 text editor based on Qt and Scintilla.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://stefanstools.sourceforge.net/BowPad.html\">BowPad</a>\r\n\tis a small and fast text editor with a modern ribbon user interface (Windows7 or later).\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://studio.zerobrane.com\">ZeroBrane Studio Lua IDE</a>\r\n\tis a lightweight Lua IDE with code completion, syntax highlighting, live\r\n\tcoding, remote debugger, and code analyzer (Windows, OSX, and Linux).\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://www.xml-buddy.com/\">XML Validator Buddy</a>\r\n\tis an XML/JSON editor and XML validator for Windows.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://sciteco.sf.net/\">SciTECO</a>\r\n\tis an advanced TECO dialect and interactive screen editor based on Scintilla.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://www.qgis.org/\">Quantum GIS</a>\r\n\tis a user friendly Open Source Geographic Information System (GIS).\r\n    </p>\r\n    <p>\r\n\t<a href=\"https://gitorious.org/qgrinui\">QGrinUI</a>\r\n\tsearches for a regex within all relevant files in a directory and shows matches using\r\n\tSciTE through the director interface.\r\n    </p>\r\n    <p>\r\n\t<a href=\"https://orbitalquark.github.io/textadept\">Textadept</a>\r\n\tis a remarkably extensible cross-platform text editor for programmers written (mostly) in\r\n\tLua using LPeg to handle the lexers.\r\n    </p>\r\n    <p>\r\n\t<a href=\"https://orbitalquark.github.io/scintillua\">Scintillua</a>\r\n\tis an external Scintilla lexer that uses Lua LPeg lexers for lexing.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://www.morphos-team.net/releasenotes/3.0\">Scribble</a>\r\n\tis a text editor included in MorphOS.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://mysqlworkbench.org/\">MySQL Workbench</a>\r\n\tis a cross-platform, visual database design, sql coding and administration tool.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://liveditor.com/index.php\">LIVEditor</a>\r\n\tis for web front end coders editing html/css/js code.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://padre.perlide.org/\">Padre</a>\r\n\tis a wxWidgets-based Perl IDE.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://www.manoscoder.gr/wintools/viewtopic.php?f=20&t=84\">CoderStudio</a>\r\n\tis an IDE for plain C and Assembly programming similar to Visual Studio.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://www.sparxsystems.com/products/ea/index.html\">Enterprise Architect</a>\r\n\tis a UML 2.1 analysis and design tool.\r\n    </p>\r\n    <p>\r\n\t<a href=\"https://launchpad.net/codeassistor\">The CodeAssistor Editor</a>\r\n\tis a small and simple source code editor for MacOSX, Windows, and GTK/Linux.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://www.topwizprogramming.com/freecode_pbeditor.html\">PBEditor</a>\r\n\tis a text editor for PowerBuilder.\r\n    </p>\r\n    <p>\r\n\t<a href=\"https://www.cryptool.org/en/\">CrypTool</a>\r\n\tis an application for applying and analyzing cryptographic algorithms.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://code.google.com/p/fxite/\">FXiTe</a>\r\n\tis an advanced cross-platform text editor built with the Fox GUI toolkit\r\n\tand the FXScintilla text widget.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://www.jabaco.org/\">Jabaco</a>\r\n\tis a simple programming language with a Visual Basic like syntax.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://www.daansystems.com/lispide/\">LispIDE</a>\r\n\tis a basic Lisp editor for Windows 2000, XP and Vista.\r\n    </p>\r\n    <p>\r\n\t<a href=\"https://www.assembla.com/wiki/show/FileWorkbench\">File Workbench:</a>\r\n\ta file manager / text editor environment with Squirrel scripting.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://kephra.sf.net\">Kephra</a>\r\n\tis a free, easy and comfortable cross-platform editor written in Perl.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://universalindent.sourceforge.net/\">UniversalIndentGUI</a>\r\n\tis a cross platform GUI for several code formatters, beautifiers and indenters\r\n\tlike GreatCode, AStyle (Artistic Styler), GNU Indent, BCPP and so on.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://elementaryreports.com/\">Elementary Reports</a>\r\n\tis designed to reduce the time to compose detailed and professional primary school reports.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://stepaheadsoftware.com/products/vcw/vcw.htm\">Visual Classworks</a>\r\n\tVisual class modeling and coding in C++ via 'live'\r\n\tUML style class diagrams.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://stepaheadsoftware.com/products/javelin/javelin.htm\">Javelin</a>\r\n\tVisual Class modeling and coding in Java via 'live' UML style\r\n\tclass diagrams.\r\n    </p>\r\n    <p>\r\n\tThe <a href=\"http://www.adobe.com/devnet/bridge.html\">ExtendScript Toolkit</a>\r\n\tis a development and debugging tool for JavaScript\r\n\tscripts included with Adobe CS3 Suites.\r\n    </p>\r\n    <p>\r\n\t<a href=\"https://tortoisesvn.net/\">TortoiseSVN</a>\r\n\tis a Windows GUI client for the Subversion source control software.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://www.geany.org/\">Geany</a>\r\n\tis a small and fast GTK2 based IDE, which has only a few dependencies from other packages.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://www.elliecomputing.com/products/merge_overview.asp\">ECMerge</a>\r\n\tis a commercial graphical and batch diff / merge tool for Windows, Linux and Solaris\r\n\t(aiming to target all major platforms).\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://pype.sourceforge.net/\">PyPE</a>\r\n\tis an editor written in Python with the wxPython GUI toolkit.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://home.mweb.co.za/sd/sdonovan/sciboo.html\">Sciboo</a>\r\n\tis an editor based on ScintillaNET.\r\n    </p>\r\n    <p>\r\n\t<a href=\"https://sourceforge.net/projects/tsct/\">The Scite Config Tool</a>\r\n\tis a graphical user interface for changing SciTE properties files.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://totalcmd.net/plugring/SciLister.html\">Scintilla Lister</a>\r\n\tis a plugin for Total Commander allowing viewing all documents with syntax highlighting\r\n\tinside Total Commander.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://chscite.sourceforge.net\">ChSciTE</a>\r\n\tis a free IDE for C/C++ interpreter Ch. It runs cross platform.\r\n\tCh is for cross-platform scripting, shell\r\n\tprogramming, 2D/3D plotting, numerical computing, and embedded\r\n\tscripting.\r\n    </p>\r\n    <p>\r\n       <a href=\"http://codeblocks.org/\">\r\n       Code::Blocks</a> is an open source, cross platform free C++ IDE.\r\n    </p>\r\n    <p>\r\n       <a href=\"https://notepad-plus-plus.org/\">\r\n       Notepad++</a> is a free source code editor under Windows.\r\n    </p>\r\n    <p>\r\n       <a href=\"http://gubed.mccabe.nu/\">\r\n       Gubed</a> is a cross platform program to debug PHP scripts.\r\n    </p>\r\n    <p>\r\n       <a href=\"http://www.lesser-software.com/lswdnl.htm\">\r\n       LSW DotNet-Lab</a> is a development environment for the .NET platform.\r\n    </p>\r\n    <p>\r\n       <a href=\"https://github.com/dtrebilco/glintercept\">\r\n       GLIntercept</a> is an OpenGL function call interceptor that uses SciTE as a\r\n       run-time shader editor.\r\n    </p>\r\n    <p>\r\n       <a href=\"http://wxguide.sourceforge.net/indexedit.html\">\r\n       wyoEditor</a> is \"A nice editor with a well designed and consistent look and feel\".\r\n    </p>\r\n    <p>\r\n       <a href=\"http://www.flos-freeware.ch/notepad2.html\">\r\n       Notepad2</a> is \"Yet another Notepad replacement\".\r\n    </p>\r\n    <p>\r\n       <a href=\"http://pycrash.sourceforge.net/index.php?type=3\">\r\n       PyCrash Viewer</a> can examine crash dumps of Python programs.\r\n    </p>\r\n    <p>\r\n       <a href=\"http://www.cabletest.com/en/featured_products_MPT2.aspx\">\r\n       MPT series Wire Analyzers</a> use Scintilla and SciTE.\r\n    </p>\r\n    <p>\r\n       <a href=\"http://www.mygenerationsoftware.com\">MyGeneration</a>\r\n\tis a .NET based code generator.\r\n    </p>\r\n    <p>\r\n       <a href=\"http://cssed.sourceforge.net\">CSSED</a>\r\n\tis a tiny GTK2 CSS editor.\r\n    </p>\r\n    <p>\r\n       <a href=\"http://wxghostscript.sourceforge.net/\">\r\n        IdePS</a>\r\n\tis a free Integrated Development Environment for PostScript\r\n    </p>\r\n    <p>\r\n       <a href=\"http://cute.sourceforge.net/\">\r\n        CUTE</a>\r\n\tis a user-friendly source code editor easily extended using Python.\r\n    </p>\r\n    <p>\r\n       <a href=\"http://www.spaceblue.com/products/venis/index.html\">\r\n        Venis IX</a>,\r\n\tthe Visual Environment for NSIS (Nullsoft Scriptable Install System).\r\n    </p>\r\n    <p>\r\n       <a href=\"http://eric-ide.python-projects.org/\">Eric3</a>\r\n       is a Python IDE written using PyQt and QScintilla.\r\n    </p>\r\n    <p>\r\n       <a href=\"http://www.computersciencelab.com/CppIde.htm\">CPPIDE</a>\r\n       is part of some commercial high-school oriented programming course software.\r\n    </p>\r\n    <p>\r\n       <a href=\"http://www.blazingtools.com/is.html\">Instant Source</a>\r\n       is a commercial tool for looking at the HTML on web sites.\r\n    </p>\r\n    <p>\r\n       <a href=\"http://www.codejoin.com/radon/\">RAD.On++</a>\r\n       is a free C++ Rapid Application Developer for Win32.\r\n    </p>\r\n    <p>\r\n       <a href=\"http://wxbasic.sourceforge.net/\">wxBasic</a> is an open source\r\n       Basic interpreter that uses the wxWidgets toolkit. A small IDE is under construction.\r\n    </p>\r\n    <p>\r\n       <a href=\"http://visual-mingw.sourceforge.net/\">Visual MinGW</a> is an\r\n       IDE for the MinGW compiler system.This runs on Windows with gcc.\r\n    </p>\r\n    <p>\r\n       The <a href=\"http://archaeopteryx.com/\">Wing IDE</a> is a\r\n       complete integrated development environment for the Python programming\r\n       language.\r\n       Available on Intel based Linux and Windows and on MacOS X through XDarwin.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://www.spheredev.org/\">Sphere</a>\r\n\tis 2D RPG engine with a development environment.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://gaiacrtn.free.fr/practical-ruby/index.html\">Practical Ruby</a>\r\n\tis an IDE for Ruby on Windows.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://www.gnuenterprise.org/\">GNUe</a>\r\n\tis a suite of tools and applications for solving the needs of the enterprise.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://silvercity.sourceforge.net/\">SilverCity</a>\r\n\tis a lexing package that can provide lexical analysis for over 20 programming\r\n\tand markup languages.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://hapdebugger.sourceforge.net/\">HAP Python Remote Debugger</a>\r\n\tis a Python debugger that can run on one Windows machine debugging a Python program running\r\n\ton either the same or another machine.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://sourceforge.net/projects/pycrust/\">PyCrust</a> is an interactive\r\n\tPython shell based on wxPython.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://www.activestate.com/Products/Komodo/\">Komodo</a>\r\n\tis a cross-platform multi-language development environment built\r\n\tas an application of Mozilla.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://llt.chez-alice.fr/\">Filerx</a>\r\n\tis a project manager for SciTE on Windows.\r\n\tOpen source and includes an implementation of SciTE's Director interface so\r\n\twill be of interest to others wanting to control SciTE.\r\n    </p>\r\n    <p>\r\n\t<a href=\"http://anjuta.org/\">Anjuta</a>\r\n\tis an open source C/C++ IDE for Linux/GNOME.\r\n    </p>\r\n    <p>\r\n       A <a href=\"https://www.burgaud.com\">version of SciTE for Win32</a> enhanced\r\n       with a tab control to allow easy movement between buffers.\r\n       Go to the \"Goodies\" area on this site.\r\n    </p>\r\n    <p>\r\n       <a href=\"http://suneido.com\">\r\n       Suneido</a> is an integrated application platform currently available for Win32 that includes an\r\n       object-oriented language, client-server database, and user interface and reporting frameworks.\r\n    </p>\r\n    <p>\r\n       <a href=\"http://www.allitis.com/agast/home.html\">\r\n       Agast</a> is an authoring system for adventure games which includes\r\n       a customised version of SciTE.\r\n    </p>\r\n    <p>\r\n       <a href=\"http://boa-constructor.sourceforge.net/\">Boa Constructor</a> is a RAD GUI\r\n       Building IDE for the wxWidgets cross platform platform. Written using wxPython with the\r\n       wxStyledTextCtrl used as its editor.\r\n    </p>\r\n    <p>\r\n       <a href=\"https://www.python.org/download/windows/\">PythonWin</a>, a Win32 IDE for Python, uses\r\n      Scintilla for both its editing and interactive windows.\r\n    </p>\r\n    <h3>\r\n       Editing Components\r\n    </h3>\r\n    <p>\r\n       <a href=\"https://codemirror.net/\">CodeMirror</a>\r\n       is a versatile text editor implemented in JavaScript for the browser.\r\n    </p>\r\n    <p>\r\n       <a href=\"http://www.soft-gems.net/index.php/controls/unicodeeditor-formerly-unicode-syntax-editor\">UniCodeEditor</a>\r\n       is a Unicode aware syntax editor control for Delphi and C++ Builder.\r\n    </p>\r\n    <p>\r\n       <a href=\"https://wiki.gnome.org/Projects/GtkSourceView\">GtkSourceView</a>\r\n\tis a text widget that extends the standard GTK+ 2.x text widget and improves it\r\n\tby implementing syntax highlighting and other features typical of a source editor.\r\n    </p>\r\n    <p>\r\n       <a href=\"http://aeditor.rubyforge.org/\">AEditor</a>\r\n       is a free source code editing component implemented in Ruby.\r\n    </p>\r\n    <p>\r\n       <a href=\"http://www.actiprosoftware.com/products/controls/wpf/syntaxeditor\">SyntaxEditor</a>\r\n       is a commercial native .Net source code editing component.\r\n    </p>\r\n    <p>\r\n       <a href=\"http://jedit.sourceforge.net/\">jEdit</a> is a good Open Source syntax colouring\r\n      editor written in and for Java.\r\n    </p>\r\n    <p>\r\n       <a href=\"http://www.gtk.org/\">GTK+</a>, the GIMP Toolkit, contains a rich text editing\r\n      widget.<br />\r\n       <a href=\"https://wiki.gnome.org/Apps/Gedit\">Gedit</a> is an editor for GTK+/GNOME.<br />\r\n    <!--\r\n       <a href=\"http://www.daimi.au.dk/~mailund/gtk.html\">GtkEditor</a> is a source code editing\r\n      widget based on the GTK+ text widget.<br />\r\n       <a href=\"http://gide.gdev.net/\">gIDE</a> is an IDE based on GTK+.<br />\r\n       <a href=\"http://www.bahnhof.se/~mikeh/linux_software.html\">GtkExText</a> is a source code\r\n      oriented text widget for GTK+.\r\n    -->\r\n    </p>\r\n    <p>\r\n       <a href=\"http://www.codeguru.com/\">CodeGuru</a> has source code for several Win32 MFC based\r\n      editors.\r\n    </p>\r\n    <a href=\"http://sourceforge.net/projects/synedit/\">SynEdit</a> is a Win32 edit control written\r\n    in Delphi.\r\n    <p>\r\n       <a href=\"http://www.tetradyne.com/srcvwax.htm\">SourceView</a> is a commercial editing\r\n      component for Win32.\r\n    </p>\r\n    <h3>\r\n       Documents\r\n    </h3>\r\n    <p>\r\n       <a href=\"http://www.finseth.com/craft/\">The Craft of Text Editing</a>\r\n       describes how EMACS works, <i>Craig A. Finseth</i>\r\n    </p>\r\n    <p>\r\n       <a href=\"http://www.cs.cmu.edu/~wjh/papers/byte.html\">Data Structures in a Bit-Mapped Text\r\n      Editor</a>, <i>Wilfred J. Hanson</i>, Byte January 1987\r\n    </p>\r\n    <p>\r\n       Text Editors: Algorithms and Architectures, <i>Ray Vald&eacute;s</i>, Dr. Dobbs Journal\r\n      April 1993\r\n    </p>\r\n    <p>\r\n       Macintosh User Interface Guidelines and TextEdit chapters of Inside Macintosh\r\n    </p>\r\n    <h3>\r\n       Development Tools\r\n    </h3>\r\n    <p>\r\n       Scintilla and SciTE were developed using the\r\n       <a href=\"http://www.mingw.org/\">Mingw version of GCC</a>.\r\n    </p>\r\n    <p>\r\n       <a href=\"http://astyle.sourceforge.net/\">AStyle</a> is a source code formatter for C++ and\r\n      Java code. SciTE has an Indent command defined for .cxx files that uses AStyle.\r\n    </p>\r\n    <p>\r\n       <a href=\"http://winmerge.org/\">WinMerge</a> is an interactive diff / merge\r\n       for Windows. I prefer code submissions in the form of source files rather than diffs and then run\r\n       WinMerge over the files to work out how to merge.\r\n    </p>\r\n    <p>\r\n       <a href=\"https://www.python.org\">Python</a> is my favourite programming language. Scintilla\r\n      was started after I tried to improve the editor built into <a\r\n      href=\"https://www.python.org/download/windows/\">PythonWin</a>, but was frustrated by the limitations of\r\n      the Windows Richedit control which PythonWin used.\r\n    </p>\r\n    <p>\r\n       <a href=\"http://www.cse.yorku.ca/~oz/\">regex</a> is a public domain\r\n       implementation of regular expression pattern matching used in Scintilla.\r\n    </p>\r\n    <p>\r\n       Inspirational coding soundscapes by <a href=\"http://www.davidbridie.com/\">David Bridie</a>.\r\n    </p>\r\n  </body>\r\n</html>\r\n\r\n"
  },
  {
    "path": "scintilla/doc/ScintillaToDo.html",
    "content": "<?xml version=\"1.0\"?>\r\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\r\n    \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n  <head>\r\n    <meta name=\"generator\" content=\"HTML Tidy, see www.w3.org\" />\r\n    <meta name=\"generator\" content=\"SciTE\" />\r\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\r\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\r\n    <style type=\"text/css\">\r\n        #menu {\r\n            margin: 0;\r\n            padding: .5em 0;\r\n            list-style-type: none;\r\n            font-size: larger;\r\n            background: #CCCCCC;\r\n        }\r\n        #menu li {\r\n            margin: 0;\r\n            padding: 0 .5em;\r\n            display: inline;\r\n        }\r\n    </style>\r\n    <title>\r\n      Scintilla and SciTE To Do\r\n    </title>\r\n  </head>\r\n  <body bgcolor=\"#FFFFFF\" text=\"#000000\">\r\n    <table bgcolor=\"#000000\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\r\n      <tr>\r\n        <td>\r\n          <img src=\"SciTEIco.png\" border=\"3\" height=\"64\" width=\"64\" alt=\"Scintilla icon\" />\r\n        </td>\r\n        <td>\r\n          <a href=\"index.html\" style=\"color:white;text-decoration:none\"><font size=\"5\">Scintilla\r\n          and SciTE</font></a>\r\n        </td>\r\n      </tr>\r\n    </table>\r\n    <ul id=\"menu\">\r\n      <li><a href=\"https://sourceforge.net/p/scintilla/bugs/\">Bugs</a></li>\r\n      <li><a href=\"https://sourceforge.net/p/scintilla/feature-requests/\">Feature Requests</a></li>\r\n    </ul>\r\n    <h2>\r\n       Bugs and To Do List\r\n    </h2>\r\n    <h3>\r\n       Feedback\r\n    </h3>\r\n    <p>\r\n\tIssues can be reported on the <a href=\"https://sourceforge.net/p/scintilla/bugs/\">Bug Tracker</a>\r\n\tand features requested on the <a href=\"https://sourceforge.net/p/scintilla/feature-requests/\">Feature Request Tracker</a>.\r\n    </p>\r\n    <h3>\r\n       Scintilla To Do\r\n    </h3>\r\n    <p>\r\n       Folding for languages that don't have it yet and good folding for languages\r\n       that inherited poor folding from another languages folding code.\r\n    </p>\r\n    <p>\r\n       Simple pattern based styling.\r\n    </p>\r\n    <p>\r\n       Different height lines based upon tallest text on the line rather than on the tallest style\r\n      possible.\r\n    </p>\r\n    <p>\r\n       Composition of lexing for mixed languages (such as ASP+ over COBOL) by\r\n       combining lexers.\r\n    </p>\r\n    <p>\r\n\tStream folding which could be used to fold up the contents of HTML elements.\r\n    </p>\r\n    <p>\r\n\tPrinting of highlight lines and folding margin.\r\n    </p>\r\n    <p>\r\n\tFlow diagrams inside editor similar to\r\n\tGRASP.\r\n    </p>\r\n    <p>\r\n\tMore lexers for other languages.\r\n    </p>\r\n    <h3>\r\n\tSciTE To Do\r\n    </h3>\r\n    <p>\r\n\tGood regular expression support through a plugin.\r\n    </p>\r\n    <p>\r\n\tAllow file name based selection on all properties rather than just a chosen few.\r\n    </p>\r\n    <p>\r\n\tOpening from and saving to FTP servers.\r\n    </p>\r\n    <p>\r\n\tSetting to fold away comments upon opening.\r\n    </p>\r\n    <p>\r\n\tUser defined fold ranges.\r\n    </p>\r\n    <p>\r\n\tSilent mode that does not display any message boxes.\r\n    </p>\r\n    <h3>\r\n\tFeatures I am unlikely to do\r\n    </h3>\r\n    <p>\r\n\tThese are features I don't like or don't think are important enough to work on.\r\n\tImplementations are welcome from others though.\r\n    </p>\r\n    <p>\r\n\tMouse wheel panning (press the mouse wheel and then move the mouse) on\r\n\tWindows.\r\n    </p>\r\n    <p>\r\n\tAdding options to the save dialog to save in a particular encoding or with a\r\n\tchosen line ending.\r\n    </p>\r\n    <h3>\r\n       Directions\r\n    </h3>\r\n    <p>\r\n       The main point of this development is Scintilla, and this is where most effort will\r\n       go. SciTE will get new features, but only when they make my life easier - I am\r\n       not intending to make it grow up to be a huge full-function IDE like Visual\r\n       Cafe. The lines I've currently decided not to step over in SciTE are any sort of\r\n       project facility and any configuration dialogs. SciTE for Windows now has a\r\n       Director interface for communicating with a separate project manager\r\n       application.\r\n    </p>\r\n    <p>\r\n       If you are interested in contributing code, do not feel any need to make it cross\r\n       platform.\r\n      Just code it for your platform and I'll either reimplement for the other platform or\r\n      ensure that there is no effect on the other platform.\r\n    </p>\r\n  </body>\r\n</html>\r\n"
  },
  {
    "path": "scintilla/doc/ScintillaUsage.html",
    "content": "<?xml version=\"1.0\"?>\r\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\r\n    \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n  <head>\r\n    <meta name=\"generator\" content=\"HTML Tidy, see www.w3.org\" />\r\n    <meta name=\"generator\" content=\"SciTE\" />\r\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\r\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\r\n    <title>\r\n      Scintilla Usage Notes\r\n    </title>\r\n<style type=\"text/css\">\r\nSPAN {\r\n    font-family: Verdana, Arial, Helvetica;\r\n    font-size: 9pt;\r\n}\r\n.S0 {\r\n    color: #808080;\r\n    font-family: Verdana, Arial, Helvetica;\r\n}\r\n.S1 {\r\n    font-family: Comic Sans MS, Times New Roman, Times;\r\n    color: #007F00;\r\n    font-size: 8pt;\r\n}\r\n.S2 {\r\n    font-family: Comic Sans MS, Times New Roman, Times;\r\n    color: #007F00;\r\n    font-size: 8pt;\r\n}\r\n.S3 {\r\n    font-family: Verdana, Arial, Helvetica;\r\n    color: #7F7F7F;\r\n}\r\n.S4 {\r\n    font-family: Verdana, Arial, Helvetica;\r\n    color: #007F7F;\r\n}\r\n.S5 {\r\n    color: #00007F;\r\n    font-weight: bold;\r\n    font-family: Verdana, Arial, Helvetica;\r\n}\r\n.S6 {\r\n    color: #7F007F;\r\n    font-family: Courier New, Courier;\r\n}\r\n.S7 {\r\n    color: #7F007F;\r\n    font-family: Courier New, Courier;\r\n}\r\n.S8 {\r\n    color: #007F7F;\r\n}\r\n.S9 {\r\n    color: #7F7F00;\r\n}\r\n.S10 {\r\n    font-weight: bold;\r\n}\r\n</style>\r\n  </head>\r\n  <body bgcolor=\"#FFFFFF\" text=\"#000000\">\r\n    <table bgcolor=\"#000000\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\r\n      <tr>\r\n        <td>\r\n          <img src=\"SciTEIco.png\" border=\"3\" height=\"64\" width=\"64\" alt=\"Scintilla icon\" />\r\n        </td>\r\n        <td>\r\n          <a href=\"index.html\" style=\"color:white;text-decoration:none\"><font size=\"5\">Scintilla\r\n          Usage Notes</font></a>\r\n        </td>\r\n      </tr>\r\n    </table>\r\n    <h2>\r\n       Implementing Auto-Indent\r\n    </h2>\r\n    <p>\r\n       The key idea is to use the SCN_CHARADDED notification to add indentation after a newline.\r\n    </p>\r\n    <p>\r\n       The lParam on the notification is a pointer to a SCNotification structure whose ch member\r\n      specifies the character added. If a newline was added, the previous line can be retrieved and\r\n      the same indentation can be added to the new line.\r\n    </p>\r\n    <p>\r\n       Here is the relevant portion of code from SciTE: (SciTE.cxx SciTEWindow::CharAdded)\r\n    </p>\r\n    <span class='S5'>if</span><span class='S0'>&nbsp;</span> <span class='S10'>(</span><span\r\n    class='S11'>ch</span><span class='S0'>&nbsp;</span> <span class='S10'>==</span><span\r\n    class='S0'>&nbsp;</span> <span class='S7'>'\\r'</span><span class='S0'>&nbsp;</span> <span\r\n    class='S10'>||</span><span class='S0'>&nbsp;</span> <span class='S11'>ch</span><span\r\n    class='S0'>&nbsp;</span> <span class='S10'>==</span><span class='S0'>&nbsp;</span> <span\r\n    class='S7'>'\\n'</span><span class='S10'>)</span><span class='S0'>&nbsp;</span> <span\r\n    class='S10'>{</span><span class='S0'><br />\r\n     &nbsp;&nbsp;&nbsp;&nbsp;</span> <span class='S5'>char</span><span class='S0'>&nbsp;</span>\r\n    <span class='S11'>linebuf</span><span class='S10'>[</span><span class='S4'>1000</span><span\r\n    class='S10'>];</span><span class='S0'><br />\r\n     &nbsp;&nbsp;&nbsp;&nbsp;</span> <span class='S5'>int</span><span class='S0'>&nbsp;</span>\r\n    <span class='S11'>curLine</span><span class='S0'>&nbsp;</span> <span class='S10'>=</span><span\r\n    class='S0'>&nbsp;</span> <span class='S11'>GetCurrentLineNumber</span><span\r\n    class='S10'>();</span><span class='S0'><br />\r\n     &nbsp;&nbsp;&nbsp;&nbsp;</span> <span class='S5'>int</span><span class='S0'>&nbsp;</span>\r\n    <span class='S11'>lineLength</span><span class='S0'>&nbsp;</span> <span class='S10'>\r\n    =</span><span class='S0'>&nbsp;</span> <span class='S11'>SendEditor</span><span\r\n    class='S10'>(</span><span class='S11'>SCI_LINELENGTH</span><span class='S10'>,</span><span\r\n    class='S0'>&nbsp;</span> <span class='S11'>curLine</span><span class='S10'>);</span><span\r\n    class='S0'><br />\r\n     &nbsp;&nbsp;&nbsp;&nbsp;</span> <span class='S2'>\r\n    //Platform::DebugPrintf(\"[CR]&nbsp;%d&nbsp;len&nbsp;=&nbsp;%d\\n\",&nbsp;curLine,&nbsp;lineLength);</span><span\r\n     class='S0'><br />\r\n     &nbsp;&nbsp;&nbsp;&nbsp;</span> <span class='S5'>if</span><span class='S0'>&nbsp;</span> <span\r\n    class='S10'>(</span><span class='S11'>curLine</span><span class='S0'>&nbsp;</span> <span\r\n    class='S10'>&gt;</span><span class='S0'>&nbsp;</span> <span class='S4'>0</span><span\r\n    class='S0'>&nbsp;</span> <span class='S10'>&amp;&amp;</span><span class='S0'>&nbsp;</span>\r\n    <span class='S11'>lineLength</span><span class='S0'>&nbsp;</span> <span class='S10'>\r\n    &lt;=</span><span class='S0'>&nbsp;</span> <span class='S4'>2</span><span\r\n    class='S10'>)</span><span class='S0'>&nbsp;</span> <span class='S10'>{</span><span\r\n    class='S0'><br />\r\n     &nbsp;&nbsp;&nbsp;&nbsp;</span> <span class='S5'>int</span><span class='S0'>&nbsp;</span>\r\n    <span class='S11'>prevLineLength</span><span class='S0'>&nbsp;</span> <span class='S10'>\r\n    =</span><span class='S0'>&nbsp;</span> <span class='S11'>SendEditor</span><span\r\n    class='S10'>(</span><span class='S11'>SCI_LINELENGTH</span><span class='S10'>,</span><span\r\n    class='S0'>&nbsp;</span> <span class='S11'>curLine</span><span class='S0'>&nbsp;</span> <span\r\n    class='S10'>-</span><span class='S0'>&nbsp;</span> <span class='S4'>1</span><span\r\n    class='S10'>);</span><span class='S0'><br />\r\n     &nbsp;&nbsp;&nbsp;&nbsp;</span> <span class='S5'>if</span><span class='S0'>&nbsp;</span> <span\r\n    class='S10'>(</span><span class='S11'>prevLineLength</span><span class='S0'>&nbsp;</span> <span\r\n    class='S10'>&lt;</span><span class='S0'>&nbsp;</span> <span class='S5'>sizeof</span><span\r\n    class='S10'>(</span><span class='S11'>linebuf</span><span class='S10'>))</span><span\r\n    class='S0'>&nbsp;</span> <span class='S10'>{</span><span class='S0'><br />\r\n     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> <span class='S11'>WORD</span><span\r\n    class='S0'>&nbsp;</span> <span class='S11'>buflen</span><span class='S0'>&nbsp;</span> <span\r\n    class='S10'>=</span><span class='S0'>&nbsp;</span> <span class='S5'>sizeof</span><span\r\n    class='S10'>(</span><span class='S11'>linebuf</span><span class='S10'>);</span><span\r\n    class='S0'><br />\r\n     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> <span class='S11'>memcpy</span><span\r\n    class='S10'>(</span><span class='S11'>linebuf</span><span class='S10'>,</span><span\r\n    class='S0'>&nbsp;</span> <span class='S10'>&amp;</span><span class='S11'>buflen</span><span\r\n    class='S10'>,</span><span class='S0'>&nbsp;</span> <span class='S5'>sizeof</span><span\r\n    class='S10'>(</span><span class='S11'>buflen</span><span class='S10'>));</span><span\r\n    class='S0'><br />\r\n     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> <span class='S11'>\r\n    SendEditor</span><span class='S10'>(</span><span class='S11'>EM_GETLINE</span><span\r\n    class='S10'>,</span><span class='S0'>&nbsp;</span> <span class='S11'>curLine</span><span\r\n    class='S0'>&nbsp;</span> <span class='S10'>-</span><span class='S0'>&nbsp;</span> <span\r\n    class='S4'>1</span><span class='S10'>,</span><span class='S0'><br />\r\n     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>\r\n    <span class='S5'>reinterpret_cast</span><span class='S10'>&lt;</span><span\r\n    class='S11'>LPARAM</span><span class='S10'>&gt;(</span><span class='S5'>static_cast</span><span\r\n    class='S10'>&lt;</span><span class='S5'>char</span><span class='S0'>&nbsp;</span> <span\r\n    class='S10'>*&gt;(</span><span class='S11'>linebuf</span><span class='S10'>)));</span><span\r\n    class='S0'><br />\r\n     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> <span class='S11'>linebuf</span><span\r\n    class='S10'>[</span><span class='S11'>prevLineLength</span><span class='S10'>]</span><span\r\n    class='S0'>&nbsp;</span> <span class='S10'>=</span><span class='S0'>&nbsp;</span> <span\r\n    class='S7'>'\\0'</span><span class='S10'>;</span><span class='S0'><br />\r\n     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> <span class='S5'>for</span><span\r\n    class='S0'>&nbsp;</span> <span class='S10'>(</span><span class='S5'>int</span><span\r\n    class='S0'>&nbsp;</span> <span class='S11'>pos</span><span class='S0'>&nbsp;</span> <span\r\n    class='S10'>=</span><span class='S0'>&nbsp;</span> <span class='S4'>0</span><span\r\n    class='S10'>;</span><span class='S0'>&nbsp;</span> <span class='S11'>linebuf</span><span\r\n    class='S10'>[</span><span class='S11'>pos</span><span class='S10'>];</span><span\r\n    class='S0'>&nbsp;</span> <span class='S11'>pos</span><span class='S10'>++)</span><span\r\n    class='S0'>&nbsp;</span> <span class='S10'>{</span><span class='S0'><br />\r\n     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> <span\r\n    class='S5'>if</span><span class='S0'>&nbsp;</span> <span class='S10'>(</span><span\r\n    class='S11'>linebuf</span><span class='S10'>[</span><span class='S11'>pos</span><span\r\n    class='S10'>]</span><span class='S0'>&nbsp;</span> <span class='S10'>!=</span><span\r\n    class='S0'>&nbsp;</span> <span class='S7'>'&nbsp;'</span><span class='S0'>&nbsp;</span> <span\r\n    class='S10'>&amp;&amp;</span><span class='S0'>&nbsp;</span> <span class='S11'>\r\n    linebuf</span><span class='S10'>[</span><span class='S11'>pos</span><span\r\n    class='S10'>]</span><span class='S0'>&nbsp;</span> <span class='S10'>!=</span><span\r\n    class='S0'>&nbsp;</span> <span class='S7'>'\\t'</span><span class='S10'>)</span><span\r\n    class='S0'><br />\r\n     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>\r\n    <span class='S11'>linebuf</span><span class='S10'>[</span><span class='S11'>pos</span><span\r\n    class='S10'>]</span><span class='S0'>&nbsp;</span> <span class='S10'>=</span><span\r\n    class='S0'>&nbsp;</span> <span class='S7'>'\\0'</span><span class='S10'>;</span><span\r\n    class='S0'><br />\r\n     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> <span class='S10'>}</span><span\r\n    class='S0'><br />\r\n     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> <span class='S11'>\r\n    SendEditor</span><span class='S10'>(</span><span class='S11'>EM_REPLACESEL</span><span\r\n    class='S10'>,</span><span class='S0'>&nbsp;</span> <span class='S4'>0</span><span\r\n    class='S10'>,</span><span class='S0'>&nbsp;</span> <span class='S5'>\r\n    reinterpret_cast</span><span class='S10'>&lt;</span><span class='S11'>LPARAM</span><span\r\n    class='S10'>&gt;(</span><span class='S5'>static_cast</span><span class='S10'>&lt;</span><span\r\n    class='S5'>char</span><span class='S0'>&nbsp;</span> <span class='S10'>*&gt;(</span><span\r\n    class='S11'>linebuf</span><span class='S10'>)));</span><span class='S0'><br />\r\n     &nbsp;&nbsp;&nbsp;&nbsp;</span> <span class='S10'>}</span><span class='S0'><br />\r\n    </span> <span class='S10'>}</span><br />\r\n\r\n    <p style=\"margin-bottom: 0in\">\r\n       Of course, fancier handling could be implemented. For example, if the previous line was the\r\n      start of a control construct, the next line could be automatically indented one tab further.\r\n      (Assuming that is your indenting style.)\r\n    </p>\r\n    <h2>\r\n       Implementing Syntax Styling\r\n    </h2>\r\n    <p>\r\n       Syntax styling is handled by the SCN_STYLENEEDED notification. Scintilla keeps track of the\r\n      end of the styled text - this is retrieved with SCI_GETENDSTYLED. In response to the\r\n      SCN_STYLENEEDED notification, you should apply styles to the text from ENDSTYLED to the\r\n      position specified by the notification.\r\n    </p>\r\n    <p>\r\n       Here is the relevant portion of code from SciTE: (SciTE.cxx)\r\n    </p>\r\n    <span class='S5'>void</span><span class='S0'>&nbsp;</span> <span class='S11'>\r\n    SciTEWindow</span><span class='S10'>::</span><span class='S11'>Notify</span><span\r\n    class='S10'>(</span><span class='S11'>SCNotification</span><span class='S0'>&nbsp;</span> <span\r\n    class='S10'>*</span><span class='S11'>notification</span><span class='S10'>)</span><span\r\n    class='S0'>&nbsp;</span> <span class='S10'>{</span><span class='S0'><br />\r\n     &nbsp;&nbsp;&nbsp;&nbsp;</span> <span class='S5'>switch</span><span class='S0'>&nbsp;</span>\r\n    <span class='S10'>(</span><span class='S11'>notification</span><span\r\n    class='S10'>-&gt;</span><span class='S11'>nmhdr.code</span><span class='S10'>)</span><span\r\n    class='S0'>&nbsp;</span> <span class='S10'>{</span><span class='S0'><br />\r\n     &nbsp;&nbsp;&nbsp;&nbsp;</span> <span class='S5'>case</span><span class='S0'>&nbsp;</span>\r\n    <span class='S11'>SCN_STYLENEEDED</span><span class='S10'>:</span><span\r\n    class='S0'>&nbsp;</span> <span class='S10'>{</span><span class='S0'><br />\r\n     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> <span\r\n    class='S5'>if</span><span class='S0'>&nbsp;</span> <span class='S10'>(</span><span\r\n    class='S11'>notification</span><span class='S10'>-&gt;</span><span\r\n    class='S11'>nmhdr.idFrom</span><span class='S0'>&nbsp;</span> <span class='S10'>==</span><span\r\n    class='S0'>&nbsp;</span> <span class='S11'>IDM_SRCWIN</span><span class='S10'>)</span><span\r\n    class='S0'>&nbsp;</span> <span class='S10'>{</span><span class='S0'><br />\r\n     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>\r\n    <span class='S5'>int</span><span class='S0'>&nbsp;</span> <span class='S11'>\r\n    endStyled</span><span class='S0'>&nbsp;</span> <span class='S10'>=</span><span\r\n    class='S0'>&nbsp;</span> <span class='S11'>SendEditor</span><span class='S10'>(</span><span\r\n    class='S11'>SCI_GETENDSTYLED</span><span class='S10'>);</span><span class='S0'><br />\r\n     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>\r\n    <span class='S5'>int</span><span class='S0'>&nbsp;</span> <span class='S11'>\r\n    lineEndStyled</span><span class='S0'>&nbsp;</span> <span class='S10'>=</span><span\r\n    class='S0'>&nbsp;</span> <span class='S11'>SendEditor</span><span class='S10'>(</span><span\r\n    class='S11'>EM_LINEFROMCHAR</span><span class='S10'>,</span><span class='S0'>&nbsp;</span>\r\n    <span class='S11'>endStyled</span><span class='S10'>);</span><span class='S0'><br />\r\n     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>\r\n    <span class='S11'>endStyled</span><span class='S0'>&nbsp;</span> <span class='S10'>\r\n    =</span><span class='S0'>&nbsp;</span> <span class='S11'>SendEditor</span><span\r\n    class='S10'>(</span><span class='S11'>EM_LINEINDEX</span><span class='S10'>,</span><span\r\n    class='S0'>&nbsp;</span> <span class='S11'>lineEndStyled</span><span class='S10'>);</span><span\r\n    class='S0'><br />\r\n     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>\r\n    <span class='S11'>Colourise</span><span class='S10'>(</span><span\r\n    class='S11'>endStyled</span><span class='S10'>,</span><span class='S0'>&nbsp;</span> <span\r\n    class='S11'>notification</span><span class='S10'>-&gt;</span><span\r\n    class='S11'>position</span><span class='S10'>);</span><br />\r\n\r\n    <p>\r\n       Colourize(start, end) retrieves the specified range of text and then calls ColourizeDoc in\r\n      keywords.cxx. It starts the process by calling:\r\n    </p>\r\n    &nbsp;&nbsp;&nbsp;&nbsp;<span class='S11'>SendMessage</span><span class='S10'>(</span><span\r\n    class='S11'>hwnd</span><span class='S10'>,</span><span class='S0'>&nbsp;</span> <span\r\n    class='S11'>SCI_STARTSTYLING</span><span class='S10'>,</span><span class='S0'>&nbsp;</span>\r\n    <span class='S11'>startPos</span><span class='S10'>,</span><span class='S0'>&nbsp;</span> <span\r\n    class='S4'>31</span><span class='S10'>);</span><br />\r\n\r\n    <p>\r\n       and then for each token of the text, calling:\r\n    </p>\r\n    &nbsp;&nbsp;&nbsp;&nbsp;<span class='S11'>SendMessage</span><span class='S10'>(</span><span\r\n    class='S11'>hwnd</span><span class='S10'>,</span><span class='S0'>&nbsp;</span> <span\r\n    class='S11'>SCI_SETSTYLING</span><span class='S10'>,</span><span class='S0'>&nbsp;</span> <span\r\n    class='S11'>length</span><span class='S10'>,</span><span class='S0'>&nbsp;</span> <span\r\n    class='S11'>style</span><span class='S10'>);</span><br />\r\n\r\n    <p>\r\n       where style is a number from 0 to 31 whose appearance has been defined using the\r\n      SCI_STYLESET... messages.\r\n    </p>\r\n    <h2>\r\n       Implementing Calltips\r\n    </h2>\r\n    <p>\r\n       Again, the SCN_CHARADDED notification is used to catch when an opening parenthesis is added.\r\n      The preceding word can then be retrieved from the current line:\r\n    </p>\r\n    &nbsp;&nbsp;&nbsp;&nbsp;<span class='S5'>char</span><span class='S0'>&nbsp;</span> <span\r\n    class='S11'>linebuf</span><span class='S10'>[</span><span class='S4'>1000</span><span\r\n    class='S10'>];</span><span class='S0'><br />\r\n    </span> &nbsp;&nbsp;&nbsp;&nbsp;<span class='S5'>int</span><span class='S0'>&nbsp;</span> <span\r\n    class='S11'>current</span><span class='S0'>&nbsp;</span> <span class='S10'>=</span><span\r\n    class='S0'>&nbsp;</span> <span class='S11'>SendEditor</span><span class='S10'>(</span><span\r\n    class='S11'>SCI_GETCURLINE</span><span class='S10'>,</span><span class='S0'>&nbsp;</span> <span\r\n    class='S5'>sizeof</span><span class='S10'>(</span><span class='S11'>linebuf</span><span\r\n    class='S10'>),</span><span class='S0'><br />\r\n     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> <span class='S5'>\r\n    reinterpret_cast</span><span class='S10'>&lt;</span><span class='S11'>LPARAM</span><span\r\n    class='S10'>&gt;(</span><span class='S5'>static_cast</span><span class='S10'>&lt;</span><span\r\n    class='S5'>char</span><span class='S0'>&nbsp;</span> <span class='S10'>*&gt;(</span><span\r\n    class='S11'>linebuf</span><span class='S10'>)));</span><span class='S0'><br />\r\n    </span> &nbsp;&nbsp;&nbsp;&nbsp;<span class='S5'>int</span><span class='S0'>&nbsp;</span> <span\r\n    class='S11'>pos</span><span class='S0'>&nbsp;</span> <span class='S10'>=</span><span\r\n    class='S0'>&nbsp;</span> <span class='S11'>SendEditor</span><span class='S10'>(</span><span\r\n    class='S11'>SCI_GETCURRENTPOS</span><span class='S10'>);</span><span class='S0'><br />\r\n    <br />\r\n    </span> &nbsp;&nbsp;&nbsp;&nbsp;<span class='S5'>int</span><span class='S0'>&nbsp;</span> <span\r\n    class='S11'>startword</span><span class='S0'>&nbsp;</span> <span class='S10'>=</span><span\r\n    class='S0'>&nbsp;</span> <span class='S11'>current</span><span class='S0'>&nbsp;</span> <span\r\n    class='S10'>-</span><span class='S0'>&nbsp;</span> <span class='S4'>1</span><span\r\n    class='S10'>;</span><span class='S0'><br />\r\n    </span> &nbsp;&nbsp;&nbsp;&nbsp;<span class='S5'>while</span><span class='S0'>&nbsp;</span>\r\n    <span class='S10'>(</span><span class='S11'>startword</span><span class='S0'>&nbsp;</span>\r\n    <span class='S10'>&gt;</span><span class='S0'>&nbsp;</span> <span class='S4'>0</span><span\r\n    class='S0'>&nbsp;</span> <span class='S10'>&amp;&amp;</span><span class='S0'>&nbsp;</span>\r\n    <span class='S11'>isalpha</span><span class='S10'>(</span><span class='S11'>linebuf</span><span\r\n    class='S10'>[</span><span class='S11'>startword</span><span class='S0'>&nbsp;</span> <span\r\n    class='S10'>-</span><span class='S0'>&nbsp;</span> <span class='S4'>1</span><span\r\n    class='S10'>]))</span><span class='S0'><br />\r\n     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> <span class='S11'>\r\n    startword</span><span class='S10'>--;</span><span class='S0'><br />\r\n    </span> &nbsp;&nbsp;&nbsp;&nbsp;<span class='S11'>linebuf</span><span class='S10'>[</span><span\r\n    class='S11'>current</span><span class='S0'>&nbsp;</span> <span class='S10'>-</span><span\r\n    class='S0'>&nbsp;</span> <span class='S4'>1</span><span class='S10'>]</span><span\r\n    class='S0'>&nbsp;</span> <span class='S10'>=</span><span class='S0'>&nbsp;</span> <span\r\n    class='S7'>'\\0'</span><span class='S10'>;</span><span class='S0'><br />\r\n    </span> &nbsp;&nbsp;&nbsp;&nbsp;<span class='S5'>char</span><span class='S10'>*</span><span\r\n    class='S0'>&nbsp;</span> <span class='S11'>word</span><span class='S0'>&nbsp;</span> <span\r\n    class='S10'>=</span><span class='S0'>&nbsp;</span> <span class='S11'>linebuf</span><span\r\n    class='S0'>&nbsp;</span> <span class='S10'>+</span><span class='S0'>&nbsp;</span> <span\r\n    class='S11'>startword</span><span class='S10'>;</span><br />\r\n\r\n    <p>\r\n       Then if a calltip is available it can be displayed. The calltip appears immediately below\r\n      the position specified. The calltip can be multiple lines separated by newlines (\\n).\r\n    </p>\r\n    &nbsp;&nbsp;&nbsp;&nbsp;<span class='S11'>pos</span><span class='S0'>&nbsp;</span> <span\r\n    class='S10'>=</span><span class='S0'>&nbsp;</span> <span class='S11'>SendMessage</span><span\r\n    class='S10'>(</span><span class='S11'>hwnd</span><span class='S10'>,</span><span\r\n    class='S0'>&nbsp;</span> <span class='S11'>SCI_GETCURRENTPOS</span><span\r\n    class='S10'>,</span><span class='S0'>&nbsp;</span> <span class='S4'>0</span><span\r\n    class='S10'>,</span><span class='S0'>&nbsp;</span> <span class='S4'>0</span><span\r\n    class='S10'>);</span><span class='S0'><br />\r\n    </span> &nbsp;&nbsp;&nbsp;&nbsp;<span class='S11'>SendMessageText</span><span\r\n    class='S10'>(</span><span class='S11'>hwnd</span><span class='S10'>,</span><span\r\n    class='S0'>&nbsp;</span> <span class='S11'>SCI_CALLTIPSHOW</span><span\r\n    class='S10'>,</span><span class='S0'>&nbsp;</span> <span class='S11'>pos</span><span\r\n    class='S0'>&nbsp;</span> <span class='S10'>-</span><span class='S0'>&nbsp;</span> <span\r\n    class='S11'>wordLen</span><span class='S0'>&nbsp;</span> <span class='S10'>-</span><span\r\n    class='S0'>&nbsp;</span> <span class='S4'>1</span><span class='S10'>,</span><span\r\n    class='S0'>&nbsp;</span> <span class='S11'>calltip</span><span class='S10'>);</span><br />\r\n\r\n    <p>\r\n       The calltip can be removed when a closing parenthesis is entered:\r\n    </p>\r\n    &nbsp;&nbsp;&nbsp;&nbsp;<span class='S5'>if</span><span class='S0'>&nbsp;</span> <span\r\n    class='S10'>(</span><span class='S11'>SendMessage</span><span class='S10'>(</span><span\r\n    class='S11'>hwnd</span><span class='S10'>,</span><span class='S0'>&nbsp;</span> <span\r\n    class='S11'>SCI_CALLTIPACTIVE</span><span class='S10'>,</span><span class='S0'>&nbsp;</span>\r\n    <span class='S4'>0</span><span class='S10'>,</span><span class='S0'>&nbsp;</span> <span\r\n    class='S4'>0</span><span class='S10'>))</span><span class='S0'><br />\r\n     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> <span class='S11'>\r\n    SendMessage</span><span class='S10'>(</span><span class='S11'>hwnd</span><span\r\n    class='S10'>,</span><span class='S0'>&nbsp;</span> <span class='S11'>\r\n    SCI_CALLTIPCANCEL</span><span class='S10'>,</span><span class='S0'>&nbsp;</span> <span\r\n    class='S4'>0</span><span class='S10'>,</span><span class='S0'>&nbsp;</span> <span class='S4'>\r\n    0</span><span class='S10'>);</span><br />\r\n\r\n    <p>\r\n       Obviously, it is up the application to look after supplying the appropriate calltip text.\r\n    </p>\r\n    <p>\r\n       SciTE goes one step further, counting the commas between arguments and highlighting the\r\n      corresponding part of the calltip. This code is in ContinueCallTip.\r\n    </p>\r\n    <p>\r\n       <i>Page contributed by Andrew McKinlay.</i>\r\n    </p>\r\n  </body>\r\n</html>\r\n\r\n"
  },
  {
    "path": "scintilla/doc/Steps.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\r\n<html><head><meta content=\"text/html; charset=iso-8859-1\" http-equiv=\"Content-Type\"><title>How to use the Scintilla Edit Control in windows?</title></head><body bgcolor=\"#ffffff\">\r\n\t<p><h2>How to use the Scintilla Edit Control in windows?</h2>\r\n\t\t<p>\r\n\t\t\tThis should be a little step by step explanation how to use Scintilla in the windows environment.\r\n\t\t</p>\r\n\t</p>\r\n\t<p><h2>How to create Scintilla Edit Control?</h2>\r\n\t\t<p>\r\n\t\t\tFirst of all, load the Scintilla DLL with something like:\r\n\t\t</p>\r\n\t\t<pre>\r\n\r\n\thmod = LoadLibrary(&quot;SciLexer.DLL&quot;);\r\n\t\tif (hmod==NULL)\r\n\t\t{\r\n\t\t\tMessageBox(hwndParent,\r\n\t\t\t&quot;The Scintilla DLL could not be loaded.&quot;,\r\n\t\t\t&quot;Error loading Scintilla&quot;,\r\n\t\t\tMB_OK | MB_ICONERROR);\r\n\t\t}\r\n\t\t</pre>\r\n\t\t<p>\r\n\t\t\tIf the DLL was loaded successfully, then the DLL has registered (yes, by itself) a new\r\n\t\t\twindow class. The new class called &quot;Scintilla&quot; is the new scintilla edit control.\r\n\t\t</p>\r\n\t\t<p>\r\n\t\t\tNow you can use this new control just like any other windows control.\r\n\t\t</p>\r\n\t\t<pre>\r\n\r\n\thwndScintilla = CreateWindowEx(0,\r\n\t\t&quot;Scintilla&quot;,&quot;&quot;, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_CLIPCHILDREN,\r\n\t\t10,10,500,400,hwndParent,(HMENU)GuiID, hInstance,NULL);\r\n\t\t</pre>\r\n\t\t<p>\r\n\t\t\tNote the new window class name: &quot;Scintilla&quot;. By reaching this point you actually included\r\n\t\t\ta Scintilla Edit Control to your windows program.\r\n\t\t</p>\r\n\t</p>\r\n\t<p><h2>How to control the Scintilla Edit Control?</h2>\r\n\t\t<p>\r\n\t\t\tYou can control Scintilla by sending commands to the Edit Control.\r\n\t\t\tThere a 2 ways of doing this. A simple and fast way.\r\n\t\t</p>\r\n\t\t<p><h3>The simple way to control Scintilla</h3>\r\n\t\t\t<p>\r\n\t\t\t\tThe simple way is just like with any other windows control. You can send messages to the\r\n\t\t\t\tScintilla Edit Control and receive notifications from the control. (Note that the notifications\r\n\t\t\t\tare sent to the parent window of the Scintilla Edit Control.)\r\n\t\t\t</p>\r\n\t\t\t<p>\r\n\t\t\t\tThe Scintilla Edit Control knows a special message for each command.\r\n\t\t\t\tTo send commands to the Scintilla Edit Control you can use the SendMessage function.\r\n\t\t\t</p>\r\n\t\t\t<pre>\r\n\r\n\tSendMessage(hwndScintilla,sci_command,wparam,lparam);\r\n\t\t\t</pre>\r\n\t\t\t<p>\r\n\t\t\t\tlike:\r\n\t\t\t</p>\r\n\t\t\t<pre>\r\n\r\n\tSendMessage(hwndScintilla,SCI_CREATEDOCUMENT, 0, 0);\r\n\t\t\t</pre>\r\n\t\t\t<p>\r\n\t\t\t\tSome of the commands will return a value and unused parameters should be set to NULL.\r\n\t\t\t</p>\r\n\t\t</p>\r\n\t\t<p><h3>The fast way to control Scintilla</h3>\r\n\t\t\t<p>\r\n\t\t\t\tThe fast way of controlling the Scintilla Edit Control  is to call message handling function by yourself.\r\n\t\t\t\tYou can retrieve a pointer to the message handling function of the Scintilla Edit Control and\r\n\t\t\t\tcall it directly to execute a command. This way is much more faster than the SendMessage() way.\r\n\t\t\t</p>\r\n\t\t\t<p>\r\n\t\t\t\t1st you have to use the SCI_GETDIRECTFUNCTION and SCI_GETDIRECTPOINTER commands to\r\n\t\t\t\tretrieve the pointer to the function and a pointer which must be the first parameter when calling the retrieved\r\n\t\t\t\tfunction pointer.\r\n\t\t\t\tYou have to do this with the SendMessage way :)\r\n\t\t\t</p>\r\n\t\t\t<p>\r\n\t\t\t\tThe whole thing has to look like this:\r\n\t\t\t</p>\r\n\t\t\t<pre>\r\n\r\n\tint (*fn)(void*,int,int,int);\r\n\tvoid * ptr;\r\n\tint canundo;\r\n\r\n\tfn = (int (__cdecl *)(void *,int,int,int))SendMessage(\r\n\t\thwndScintilla,SCI_GETDIRECTFUNCTION,0,0);\r\n\tptr = (void *)SendMessage(hwndScintilla,SCI_GETDIRECTPOINTER,0,0);\r\n\r\n\tcanundo = fn(ptr,SCI_CANUNDO,0,0);\r\n\t\t\t</pre>\r\n\t\t\t<p>\r\n\t\t\t\twith &quot;fn&quot; as the function pointer to the message handling function of the Scintilla Control\r\n\t\t\t\tand &quot;ptr&quot; as the pointer that must be used as 1st parameter.\r\n\t\t\t\tThe next parameters are the Scintilla Command with its two (optional) parameters.\r\n\t\t\t</p>\r\n\r\n\t\t</p>\r\n\t\t<p><h3>How will I receive notifications?</h3>\r\n\t\t\t<p>\r\n\t\t\t\tWhenever an event occurs where Scintilla wants to inform you about something, the Scintilla Edit Control\r\n\t\t\t\twill send notification to the parent window. This is done by a WM_NOTITY message.\r\n\t\t\t\tWhen receiving that message, you have to look in the xxx struct for the actual message.\r\n\t\t\t</p>\r\n\t\t\t<p>\r\n\t\t\t\tSo in Scintillas parent window message handling function you have to include some code like this:\r\n\t\t\t</p>\r\n\t\t\t<pre>\r\n\tNMHDR *lpnmhdr;\r\n\r\n\t[...]\r\n\r\n\tcase WM_NOTIFY:\r\n\t\tlpnmhdr = (LPNMHDR) lParam;\r\n\r\n\t\tif(lpnmhdr-&gt;hwndFrom==hwndScintilla)\r\n\t\t{\r\n\t\t\tswitch(lpnmhdr-&gt;code)\r\n\t\t\t{\r\n\t\t\t\tcase SCN_CHARADDED:\r\n\t\t\t\t\t/* Hey, Scintilla just told me that a new */\r\n\t\t\t\t\t/* character was added to the Edit Control.*/\r\n\t\t\t\t\t/* Now i do something cool with that char. */\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\tbreak;\r\n\t\t\t</pre>\r\n\t\t</p>\r\n\t</p>\r\n\r\n    <p>\r\n       <i>Page contributed by Holger Schmidt.</i>\r\n    </p>\r\n</body></html>\r\n\r\n"
  },
  {
    "path": "scintilla/doc/StyleMetadata.html",
    "content": "<?xml version=\"1.0\"?>\r\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\r\n        \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n        <head>\r\n                <meta name=\"generator\" content=\"HTML Tidy, see www.w3.org\" />\r\n                <meta name=\"generator\" content=\"SciTE\" />\r\n                <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\r\n                <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\r\n                <title>\r\n                        Scintilla Style Metadata\r\n                </title>\r\n                <style type=\"text/css\">\r\n<!--\r\n/*<![CDATA[*/\r\n\tCODE { font-weight: bold; font-family: Menlo,Consolas,Bitstream Vera Sans Mono,Courier New,monospace; }\r\n/*]]>*/\r\n-->\r\n                </style>\r\n        </head>\r\n<body bgcolor=\"#FFFFFF\" text=\"#000000\">\r\n        <table bgcolor=\"#000000\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\r\n                <tr>\r\n                <td>\r\n                <img src=\"SciTEIco.png\" border=\"3\" height=\"64\" width=\"64\" alt=\"Scintilla icon\" />\r\n                </td>\r\n                <td>\r\n                <a href=\"index.html\" style=\"color:white;text-decoration:none\"><font size=\"5\">Scintilla</font></a>\r\n                </td>\r\n                </tr>\r\n        </table>\r\n        <h2>\r\n                Language Types\r\n        </h2>\r\n        <p>\r\n                Scintilla contains lexers for various types of languages:\r\n                <ul>\r\n                        <li>Programming languages like C++, Java, and Python.</li>\r\n                        <li>Assembler languages are low-level programming languages which may additionally include instructions and registers.</li>\r\n                        <li>Markup languages like HTML, TeX, and Markdown.</li>\r\n                        <li>Data languages like EDIFACT and YAML.</li>\r\n                </ul>\r\n        </p>\r\n        <p>\r\n                Some languages can be used in different ways. JavaScript is a programming language but also\r\n                the basis of JSON data files. Similarly,\r\n                <a href=\"https://en.wikipedia.org/wiki/S-expression\">Lisp s expressions</a> can be used for both source code and data.\r\n        </p>\r\n        <p>\r\n                Each language type has common elements such as identifiers in programming languages.\r\n                These common elements should be identified so that languages can be displayed with common\r\n                styles for these elements.\r\n                Style tags are used for this purpose in Scintilla.\r\n        </p>\r\n        <h2>\r\n                Style Tags\r\n        </h2>\r\n        <p>\r\n                Every style has a list of tags where a tag is a lower-case word containing only the common ASCII letters 'a'-'z'\r\n                such as \"comment\" or \"operator\".\r\n        </p>\r\n        <p>\r\n                Tags are ordered from most important to least important.\r\n        </p>\r\n        <p>\r\n                While applications may assign visual attributes for tag lists in many different ways, one reasonable technique is to\r\n                apply tag-specific attributes in reverse order so that earlier and more important tags override less important tags.\r\n                For example, the tag list <code>\"error comment documentation keyword\"</code> with\r\n                a set of tag attributes <br />\r\n                <code>{ comment=fore:green,back:very-light-green,font:Serif documentation=fore:light-green error=strikethrough keyword=bold }</code><br />\r\n                could be rendered as <br />\r\n                <code>bold,fore:light-green,back:very-light-green,font:Serif,strikethrough</code>.\r\n        </p>\r\n        <p>\r\n                Alternative renderings could check for multi-tag combinations like\r\n                <code>{ comment.documentation=fore:light-green comment.line=dark-green comment=green }.</code>\r\n        </p>\r\n        <p>\r\n                Commonly, a tag list will contain an optional embedded language; optional statuses; a base type; and a set of type modifiers:<br />\r\n                <code>embedded-language? status* base-type modifiers*</code>\r\n        </p>\r\n        <h3>Embedded language</h3>\r\n        <p>\r\n                The embedded language may be a source <code>(client | server)</code> followed by a language name\r\n                <code>(javascript | php | python | basic)</code>.\r\n                This may be extended in the future with other programming languages and style-definition languages like CSS.\r\n        </p>\r\n        <h3>Status</h3>\r\n        <p>\r\n                The statuses may be <code>(error | unused | predefined | inactive)</code>.<br />\r\n                The <code>error</code> status is used for lexical statuses that indicate errors in the source code such as unterminated quoted strings.<br />\r\n                The <code>unused</code> status may indicate a gap in the lexical states, possibly because an old lexical class is no longer used or an upcoming lexical class may fill that position.<br />\r\n                The <code>predefined</code> status indicates a style in the range 32.39 that is used for non-lexical purposes in Scintilla.<br />\r\n                The <code>inactive</code> status is used for text that is not currently interpreted such as C++ code that is contained within a '#if 0' preprocessor block.\r\n        </p>\r\n        <h3>Basic Types</h3>\r\n        <p>\r\n                The basic types for programming languages are <code>(default | operator | keyword | identifier | literal | comment | preprocessor | label)</code>.<br />\r\n                The <code>default</code> type is commonly used for spaces and tabs between tokens although it may cover other characters in some languages.\r\n        </p>\r\n        <p>\r\n                Assembler languages add <code>(instruction | register)</code>. to the basic types from programming languages.<br />\r\n        </p>\r\n        <p>\r\n                The basic types for markup languages are <code>(default | tag | attribute | comment | preprocessor)</code>.<br />\r\n        </p>\r\n        <p>\r\n                The basic types for data languages are <code>(default | key | data | comment)</code>.<br />\r\n        </p>\r\n        <h3>Comments</h3>\r\n        <p>\r\n                Programming languages may differentiate between line and stream comments and treat documentation comments as distinct from other comments.\r\n                Documentation comments may be marked up with documentation keywords.<br />\r\n                The additional attributes commonly used are <code>(line | documentation | keyword | taskmarker)</code>.\r\n        </p>\r\n        <h3>Literals</h3>\r\n        <p>\r\n                Programming and assembler languages contain a rich set of literals including numbers like <code>7</code> and <code>3.89e23</code>; <code>\"string\\n\"</code>; and <code>nullptr</code>\r\n                and differentiating between these is often wanted.<br />\r\n                The common literal types are <code>(numeric | boolean | string | regex | date | time | uuid | nil | compound)</code>.<br />\r\n                Numeric literal types are subdivided into <code>(integer | real)</code>.<br />\r\n                String literal types may add (perhaps multiple) further attributes from <code> (heredoc | character | escapesequence | interpolated | multiline | raw)</code>.<br />\r\n        </p>\r\n        <p>\r\n                An escape sequence within an interpolated heredoc may thus be <code>literal string heredoc escapesequence</code>.\r\n        </p>\r\n        <h3>\r\n                List of known tags\r\n        </h3>\r\n        <table>\r\n                <tr><td><code>attribute</code></td><td>Markup attribute</td></tr>\r\n                <tr><td><code>basic</code></td><td>Embedded Basic</td></tr>\r\n                <tr><td><code>boolean</code></td><td>True or false literal</td></tr>\r\n                <tr><td><code>character</code></td><td>Single character literal as opposed to a string literal</td></tr>\r\n                <tr><td><code>client</code></td><td>Script executed on client</td></tr>\r\n                <tr><td><code>comment</code></td><td>The standard comment type in a language: may be stream or line</td></tr>\r\n                <tr><td><code>compound</code></td><td>Literal containing multiple subliterals such as a tuple or complex number</td></tr>\r\n                <tr><td><code>data</code></td><td>A value in a data file</td></tr>\r\n                <tr><td><code>date</code></td><td>Literal representing a data such as '19/November/1975'</td></tr>\r\n                <tr><td><code>default</code></td><td>Starting state commonly also used for white space</td></tr>\r\n                <tr><td><code>documentation</code></td><td>Comment that can be extracted into documentation</td></tr>\r\n                <tr><td><code>error</code></td><td>State indicating an invalid or erroneous element</td></tr>\r\n                <tr><td><code>escapesequence</code></td><td>Parts of a string that are not literal such as '\\t' for tab in C</td></tr>\r\n                <tr><td><code>heredoc</code></td><td>Lengthy text literal marked by a word at both ends</td></tr>\r\n                <tr><td><code>identifier</code></td><td>Name that identifies an object or class of object</td></tr>\r\n                <tr><td><code>inactive</code></td><td>Code that is not currently interpreted</td></tr>\r\n                <tr><td><code>instruction</code></td><td>Mnemonic in assembler languages like 'addc'</td></tr>\r\n                <tr><td><code>integer</code></td><td>Numeric literal with no fraction or exponent like '738'</td></tr>\r\n                <tr><td><code>interpolated</code></td><td>String that can contain expressions</td></tr>\r\n                <tr><td><code>javascript</code></td><td>Embedded Javascript</td></tr>\r\n                <tr><td><code>key</code></td><td>Element which allows finding associated data</td></tr>\r\n                <tr><td><code>keyword</code></td><td>Reserved word with special meaning like 'while'</td></tr>\r\n                <tr><td><code>label</code></td><td>Destination for jumps in programming and assembler languages</td></tr>\r\n                <tr><td><code>line</code></td><td>Differentiates between stream comments and line comments in languages that have both</td></tr>\r\n                <tr><td><code>literal</code></td><td>Fixed value in source code</td></tr>\r\n                <tr><td><code>multiline</code></td><td>Differentiates between single line and multiline elements, commonly strings</td></tr>\r\n                <tr><td><code>nil</code></td><td>Literal for the null pointer such as nullptr in C++ or NULL in C</td></tr>\r\n                <tr><td><code>numeric</code></td><td>Literal number like '16'</td></tr>\r\n                <tr><td><code>operator</code></td><td>Punctuation character such as '&amp;' or '['</td></tr>\r\n                <tr><td><code>php</code></td><td>Embedded PHP</td></tr>\r\n                <tr><td><code>predefined</code></td><td>Style in the range 32.39 that is used for non-lexical purposes</td></tr>\r\n                <tr><td><code>preprocessor</code></td><td>Element that is recognized in an early stage of translation</td></tr>\r\n                <tr><td><code>python</code></td><td>Embedded Python</td></tr>\r\n                <tr><td><code>raw</code></td><td>String type that avoids interpretation: may be used for regular expressions in languages without a specific regex type</td></tr>\r\n                <tr><td><code>real</code></td><td>Numeric literal which may have a fraction or exponent like '3.84e-15'</td></tr>\r\n                <tr><td><code>regex</code></td><td>Regular expression literal like '^[a-z]+'</td></tr>\r\n                <tr><td><code>register</code></td><td>CPU register in assembler languages</td></tr>\r\n                <tr><td><code>server</code></td><td>Script executed on server</td></tr>\r\n                <tr><td><code>string</code></td><td>Sequence of characters</td></tr>\r\n                <tr><td><code>tag</code></td><td>Markup tag like '&lt;br /&gt;'</td></tr>\r\n                <tr><td><code>taskmarker</code></td><td>Word in comment that marks future work like 'FIXME'</td></tr>\r\n                <tr><td><code>time</code></td><td>Literal representing a time such as '9:34:31'</td></tr>\r\n                <tr><td><code>unused</code></td><td>Style that is not currently used</td></tr>\r\n                <tr><td><code>uuid</code></td><td>Universally unique identifier often used in interface definition files which may look like '{098f2470-bae0-11cd-b579-08002b30bfeb}'</td></tr>\r\n        </table>\r\n        <h2>\r\n                Extension\r\n        </h2>\r\n        <p>\r\n                Each element in this scheme may be extended in the future. This may be done by revising this document to provide a common approach to new features.\r\n                Individual lexers may also choose to expose unique language features through new tags.\r\n        </p>\r\n        <h2>\r\n                Translation\r\n        </h2>\r\n        <p>\r\n                Tags could be exposed directly in user interfaces or configuration languages.\r\n                However, an application may also translate these to match its naming schema.\r\n                Capitalization and punctuation could be different (like <code>Here-Doc</code> instead of <code>heredoc</code>),\r\n                terminology changed (\"constant\" instead of \"literal\"),\r\n                or human language changed from English to Chinese or Spanish.\r\n        </p>\r\n        <p>\r\n                Starting from a common set of tags makes these modifications tractable.\r\n        </p>\r\n        <h2>\r\n                Open issues\r\n        </h2>\r\n        <p>\r\n                The C++ lexer (for example) has inactive states and dynamically allocated substyles.\r\n                These should be exposed through the metadata mechanism but are not currently.\r\n        </p>\r\n</body>\r\n</html>\r\n"
  },
  {
    "path": "scintilla/doc/index.html",
    "content": "<?xml version=\"1.0\"?>\r\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\r\n    \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n  <head>\r\n    <meta name=\"generator\" content=\"HTML Tidy, see www.w3.org\" />\r\n    <meta name=\"generator\" content=\"SciTE\" />\r\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\r\n    <meta name=\"keywords\" content=\"Scintilla, SciTE, Editing Component, Text Editor\" />\r\n    <meta name=\"Description\"\r\n    content=\"www.scintilla.org is the home of the Scintilla editing component and SciTE text editor application.\" />\r\n    <meta name=\"Date.Modified\" content=\"20240423\" />\r\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\r\n    <style type=\"text/css\">\r\n        .logo {\r\n            background: url(https://www.scintilla.org/ScintillaLogo.png) no-repeat;\r\n            background-image: image-set(\r\n                        url(https://www.scintilla.org/ScintillaLogo.png) 1x,\r\n                        url(https://www.scintilla.org/ScintillaLogo2x.png) 2x  );\r\n            height:150px;\r\n        }\r\n        #versionlist {\r\n            margin: 0;\r\n            padding: .5em;\r\n            list-style-type: none;\r\n            color: #FFCC99;\r\n            background: #000000;\r\n        }\r\n        #versionlist li {\r\n            margin-bottom: .5em;\r\n        }\r\n        #menu {\r\n            margin: 0;\r\n            padding: .5em 0;\r\n            list-style-type: none;\r\n            font-size: larger;\r\n            background: #CCCCCC;\r\n        }\r\n        #menu li {\r\n            margin: 0;\r\n            padding: 0 .5em;\r\n            display: inline;\r\n        }\r\n    </style>\r\n    <script type=\"text/javascript\">\r\n   \tfunction IsRemote() {\r\n\t\tvar loc = '' + window.location;\r\n\t\treturn (loc.indexOf('http:')) != -1 || (loc.indexOf('https:') != -1);\r\n   \t}\r\n    </script>\r\n     <title>\r\n       Scintilla and SciTE\r\n     </title>\r\n  </head>\r\n  <body bgcolor=\"#FFFFFF\" text=\"#000000\">\r\n    <table bgcolor=\"#000000\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\r\n      <tr>\r\n        <td width=\"40%\" align=\"left\">\r\n          <font color=\"#FFCC99\" size=\"4\"> A free source code editing component for Win32,\r\n          GTK, and macOS</font>\r\n        </td>\r\n        <td width=\"40%\" align=\"right\">\r\n          <font color=\"#FFCC99\" size=\"3\"> Release version 5.5.0<br />\r\n           Site last modified April 23 2024</font>\r\n        </td>\r\n        <td width=\"20%\">\r\n          &nbsp;\r\n        </td>\r\n      </tr>\r\n    </table>\r\n    <table bgcolor=\"#000000\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\r\n      <tr>\r\n        <td width=\"100%\" class=\"logo\">\r\n          &nbsp;\r\n        </td>\r\n      </tr>\r\n    </table>\r\n    <ul id=\"versionlist\">\r\n      <li>Version 5.5.0 fixes adds elements for inactive additional selections.</li>\r\n      <li>Version 5.4.3 fixes a redo bug.</li>\r\n      <li>Version 5.4.2 can save and restore undo history.</li>\r\n      <li>Version 5.4.1 adds IDocumentEditable interface to allow efficient interaction with document objects.</li>\r\n      <li>Version 5.4.0 fixes crashes on macOS 12 and older when built with Xcode 15.0.</li>\r\n    </ul>\r\n    <ul id=\"menu\">\r\n      <li id=\"remote1\"><a href=\"https://www.scintilla.org/SciTEImage.html\">Screenshot</a></li>\r\n      <li id=\"remote2\"><a href=\"https://www.scintilla.org/ScintillaDownload.html\">Download</a></li>\r\n      <li><a href=\"ScintillaDoc.html\">Documentation</a></li>\r\n      <li><a href=\"ScintillaToDo.html\">Bugs</a></li>\r\n      <li id=\"remote3\"><a href=\"https://www.scintilla.org/Lexilla.html\">Lexilla</a></li>\r\n      <li id=\"remote4\"><a href=\"https://www.scintilla.org/SciTE.html\">SciTE</a></li>\r\n      <li><a href=\"ScintillaHistory.html\">History</a></li>\r\n      <li><a href=\"ScintillaRelated.html\">Related</a></li>\r\n      <li id=\"remote5\"><a href=\"https://www.scintilla.org/Privacy.html\">Privacy</a></li>\r\n    </ul>\r\n<script type=\"text/javascript\" language=\"JavaScript\"><!--\r\nif (!IsRemote()) { //if NOT remote...\r\n    document.getElementById('remote1').style.display='none';\r\n    document.getElementById('remote2').style.display='none';\r\n    document.getElementById('remote3').style.display='none';\r\n    document.getElementById('remote4').style.display='none';\r\n    document.getElementById('remote5').style.display='none';\r\n}\r\n//--></script>\r\n    <p>\r\n       <a href=\"ScintillaDoc.html\">Scintilla</a> is a free source code editing component.\r\n       It comes with complete source code and a <a href=\"https://www.scintilla.org/License.txt\">license</a> that\r\n       permits use in any free project or commercial product.\r\n    </p>\r\n    <p>\r\n       As well as features found in standard text editing components, Scintilla includes features\r\n       especially useful when editing and debugging source code.\r\n       These include support for syntax styling, error indicators, code completion and call tips.\r\n       The selection margin can contain markers like those used in debuggers to indicate\r\n       breakpoints and the current line. Styling choices are more open than with many editors,\r\n       allowing the use of proportional fonts, bold and italics, multiple foreground and background\r\n       colours and multiple fonts.\r\n    </p>\r\n    <p>\r\n       Current development occurs on the default branch as 5.* which requires a recent\r\n       C++ compiler that supports C++17.\r\n    </p>\r\n    <p>\r\n       <a href=\"https://www.scintilla.org/Lexilla.html\">Lexilla</a> is a library of lexers that can\r\n       be used with Scintilla.\r\n    </p>\r\n    <p>\r\n       <a href=\"https://www.scintilla.org/SciTE.html\">SciTE</a> is a SCIntilla based Text Editor. Originally built to\r\n      demonstrate Scintilla, it has grown to be a generally useful editor with facilities for\r\n      building and running programs. It is best used for jobs with simple configurations - I use it\r\n      for building test and demonstration programs as well as SciTE and Scintilla, themselves.\r\n    </p>\r\n    <p>\r\n       Development of Scintilla started as an effort to improve the text editor in PythonWin. After\r\n      being frustrated by problems in the Richedit control used by PythonWin, it looked like the\r\n      best way forward was to write a new edit control. The biggest problem with Richedit and other\r\n      similar controls is that they treat styling changes as important persistent changes to the\r\n      document so they are saved into the undo stack and set the document's dirty flag. For source\r\n      code, styling should not be persisted as it can be mechanically recreated.\r\n    </p>\r\n    <p>\r\n       Scintilla and SciTE are currently available for Intel Win32, macOS, and Linux compatible operating\r\n      systems with GTK. They have been run on Windows XP, Windows 7, macOS 10.9+, and on Ubuntu 18.04\r\n      with GTK 2.24. <a href=\"https://www.scintilla.org/SciTEImage.html\">Here is a screenshot of\r\n      SciTE.</a><br />\r\n    </p>\r\n    <p>\r\n       You can <a href=\"https://www.scintilla.org/ScintillaDownload.html\">download Scintilla.</a>\r\n    </p>\r\n    <p>\r\n       The source code can be downloaded via Mercurial at the Source Forge\r\n\t<a href=\"https://sourceforge.net/projects/scintilla/\">Scintilla project page</a>.\r\n    </p>\r\n    <p>\r\n       <a href=\"ScintillaRelated.html\">Related sites.</a>\r\n    </p>\r\n    <p>\r\n       <a href=\"ScintillaToDo.html\">Bugs and To Do list.</a>\r\n    </p>\r\n    <p>\r\n       <a href=\"ScintillaHistory.html\">History and contribution credits.</a>\r\n    </p>\r\n    <p>\r\n       <a href=\"https://www.scintilla.org/Icons.html\">Icons that can be used with Scintilla.</a>\r\n    </p>\r\n    <p>\r\n      Questions and comments about Scintilla should be directed to the\r\n      <a href=\"https://groups.google.com/forum/#!forum/scintilla-interest\">scintilla-interest</a>\r\n      mailing list,\r\n      which is for discussion of Scintilla and related projects, their bugs and future features.\r\n      This is a low traffic list, averaging less than 20 messages per week.\r\n      To avoid spam, only list members can write to the list.\r\n      New versions of Scintilla are announced on scintilla-interest and may also be received by SourceForge\r\n      members by clicking on the Monitor column icon for \"scintilla\" on\r\n      <a href=\"https://sourceforge.net/project/showfiles.php?group_id=2439\">the downloads page</a>.\r\n      <br />\r\n    </p>\r\nThere is a <a href=\"https://sourceforge.net/projects/scintilla/\">Scintilla project page</a>\r\nhosted on\r\n<script type=\"text/javascript\" language=\"JavaScript\">\r\n<!--\r\nif (IsRemote()) {\r\n    document.write('<a href=\"https://sourceforge.net/projects/scintilla/\">');\r\n    document.write('<img src=\"https://sflogo.sourceforge.net/sflogo.php?group_id=2439&amp;type=8\" width=\"80\" height=\"15\" alt=\"Get Scintilla at SourceForge.net. Fast, secure and Free Open Source software downloads\" /></a> ');\r\n} else {\r\n    document.write('<a href=\"https://sourceforge.net/projects/scintilla/\">SourceForge<\\/a>');\r\n}\r\n//-->\r\n</script>\r\n<noscript>\r\n<a href=\"https://sourceforge.net/projects/scintilla/\">\r\n<img src=\"https://sflogo.sourceforge.net/sflogo.php?group_id=2439&amp;type=8\" width=\"80\" height=\"15\" alt=\"Get Scintilla at SourceForge.net. Fast, secure and Free Open Source software downloads\" /></a>\r\n</noscript>\r\n  </body>\r\n</html>\r\n\r\n"
  },
  {
    "path": "scintilla/gtk/Converter.h",
    "content": "// Scintilla source code edit control\r\n// Converter.h - Encapsulation of iconv\r\n// Copyright 2004 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef CONVERTER_H\r\n#define CONVERTER_H\r\n\r\nnamespace Scintilla {\r\n\r\nconst GIConv iconvhBad = (GIConv)(-1);\r\nconst gsize sizeFailure = static_cast<gsize>(-1);\r\n/**\r\n * Encapsulate g_iconv safely.\r\n */\r\nclass Converter {\r\n\tGIConv iconvh = iconvhBad;\r\n\tvoid OpenHandle(const char *fullDestination, const char *charSetSource) noexcept {\r\n\t\ticonvh = g_iconv_open(fullDestination, charSetSource);\r\n\t}\r\n\tbool Succeeded() const noexcept {\r\n\t\treturn iconvh != iconvhBad;\r\n\t}\r\npublic:\r\n\tConverter() noexcept = default;\r\n\tConverter(const char *charSetDestination, const char *charSetSource, bool transliterations) {\r\n\t\tOpen(charSetDestination, charSetSource, transliterations);\r\n\t}\r\n\t// Deleted so Converter objects can not be copied.\r\n\tConverter(const Converter &) = delete;\r\n\tConverter(Converter &&) = delete;\r\n\tConverter &operator=(const Converter &) = delete;\r\n\tConverter &operator=(Converter &&) = delete;\r\n\t~Converter() {\r\n\t\tClose();\r\n\t}\r\n\toperator bool() const noexcept {\r\n\t\treturn Succeeded();\r\n\t}\r\n\tvoid Open(const char *charSetDestination, const char *charSetSource, bool transliterations) {\r\n\t\tClose();\r\n\t\tif (*charSetSource) {\r\n\t\t\t// Try allowing approximate transliterations\r\n\t\t\tif (transliterations) {\r\n\t\t\t\tstd::string fullDest(charSetDestination);\r\n\t\t\t\tfullDest.append(\"//TRANSLIT\");\r\n\t\t\t\tOpenHandle(fullDest.c_str(), charSetSource);\r\n\t\t\t}\r\n\t\t\tif (!Succeeded()) {\r\n\t\t\t\t// Transliterations failed so try basic name\r\n\t\t\t\tOpenHandle(charSetDestination, charSetSource);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tvoid Close() noexcept {\r\n\t\tif (Succeeded()) {\r\n\t\t\tg_iconv_close(iconvh);\r\n\t\t\ticonvh = iconvhBad;\r\n\t\t}\r\n\t}\r\n\tgsize Convert(char **src, gsize *srcleft, char **dst, gsize *dstleft) const noexcept {\r\n\t\tif (!Succeeded()) {\r\n\t\t\treturn sizeFailure;\r\n\t\t} else {\r\n\t\t\treturn g_iconv(iconvh, src, srcleft, dst, dstleft);\r\n\t\t}\r\n\t}\r\n};\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/gtk/DepGen.py",
    "content": "#!/usr/bin/env python3\r\n# DepGen.py - produce a make dependencies file for Scintilla\r\n# Copyright 2019 by Neil Hodgson <neilh@scintilla.org>\r\n# The License.txt file describes the conditions under which this software may be distributed.\r\n# Requires Python 3.6 or later\r\n\r\nimport sys\r\n\r\nsys.path.append(\"..\")\r\n\r\nfrom scripts import Dependencies\r\n\r\ntopComment = \"# Created by DepGen.py. To recreate, run DepGen.py.\\n\"\r\n\r\ndef Generate():\r\n\tsources = [\"../src/*.cxx\"]\r\n\tincludes = [\"../include\", \"../src\"]\r\n\r\n\tdeps = Dependencies.FindDependencies([\"../gtk/*.cxx\"] + sources, [\"../gtk\"] + includes, \".o\", \"../gtk/\")\r\n\tDependencies.UpdateDependencies(\"../gtk/deps.mak\", deps, topComment)\r\n\r\nif __name__ == \"__main__\":\r\n\tGenerate()"
  },
  {
    "path": "scintilla/gtk/PlatGTK.cxx",
    "content": "// Scintilla source code edit control\r\n// PlatGTK.cxx - implementation of platform facilities on GTK+/Linux\r\n// Copyright 1998-2004 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#include <cstddef>\r\n#include <cstdlib>\r\n#include <cstring>\r\n#include <cstdio>\r\n#include <cmath>\r\n\r\n#include <string>\r\n#include <string_view>\r\n#include <vector>\r\n#include <map>\r\n#include <optional>\r\n#include <algorithm>\r\n#include <memory>\r\n#include <sstream>\r\n\r\n#include <glib.h>\r\n#include <gmodule.h>\r\n#include <gdk/gdk.h>\r\n#include <gtk/gtk.h>\r\n#include <gdk/gdkkeysyms.h>\r\n#if defined(GDK_WINDOWING_WAYLAND)\r\n#include <gdk/gdkwayland.h>\r\n#endif\r\n\r\n#include \"ScintillaTypes.h\"\r\n#include \"ScintillaMessages.h\"\r\n\r\n#include \"Debugging.h\"\r\n#include \"Geometry.h\"\r\n#include \"Platform.h\"\r\n\r\n#include \"Scintilla.h\"\r\n#include \"ScintillaWidget.h\"\r\n#include \"CharacterType.h\"\r\n#include \"XPM.h\"\r\n#include \"UniConversion.h\"\r\n\r\n#include \"Wrappers.h\"\r\n#include \"Converter.h\"\r\n\r\n#ifdef _MSC_VER\r\n// Ignore unreferenced local functions in GTK+ headers\r\n#pragma warning(disable: 4505)\r\n#endif\r\n\r\nusing namespace Scintilla;\r\nusing namespace Scintilla::Internal;\r\n\r\nnamespace {\r\n\r\nconstexpr double kPi = 3.14159265358979323846;\r\n\r\nconstexpr double degrees = kPi / 180.0;\r\n\r\nstruct IntegerRectangle {\r\n\tint left;\r\n\tint top;\r\n\tint right;\r\n\tint bottom;\r\n\r\n\texplicit IntegerRectangle(PRectangle rc) noexcept :\r\n\t\tleft(static_cast<int>(rc.left)), top(static_cast<int>(rc.top)),\r\n\t\tright(static_cast<int>(rc.right)), bottom(static_cast<int>(rc.bottom)) {\r\n\t}\r\n\tint Width() const noexcept { return right - left; }\r\n\tint Height() const noexcept { return bottom - top; }\r\n};\r\n\r\nGtkWidget *PWidget(WindowID wid) noexcept {\r\n\treturn static_cast<GtkWidget *>(wid);\r\n}\r\n\r\nvoid SetFractionalPositions([[maybe_unused]] PangoContext *pcontext) noexcept {\r\n#if PANGO_VERSION_CHECK(1,44,3)\r\n\tpango_context_set_round_glyph_positions(pcontext, FALSE);\r\n#endif\r\n}\r\n\r\nvoid LayoutSetText(PangoLayout *layout, std::string_view text) noexcept {\r\n\tpango_layout_set_text(layout, text.data(), static_cast<int>(text.length()));\r\n}\r\n\r\nenum class EncodingType { singleByte, utf8, dbcs };\r\n\r\n// Holds a PangoFontDescription*.\r\nclass FontHandle : public Font {\r\npublic:\r\n\tUniquePangoFontDescription fd;\r\n\tCharacterSet characterSet;\r\n\texplicit FontHandle(const FontParameters &fp) :\r\n\t\tfd(pango_font_description_new()), characterSet(fp.characterSet) {\r\n\t\tif (fd) {\r\n\t\t\tpango_font_description_set_family(fd.get(),\r\n\t\t\t\t(fp.faceName[0] == '!') ? fp.faceName + 1 : fp.faceName);\r\n\t\t\tpango_font_description_set_size(fd.get(), pango_units_from_double(fp.size));\r\n\t\t\tpango_font_description_set_weight(fd.get(), static_cast<PangoWeight>(fp.weight));\r\n\t\t\tpango_font_description_set_style(fd.get(), fp.italic ? PANGO_STYLE_ITALIC : PANGO_STYLE_NORMAL);\r\n\t\t}\r\n\t}\r\n\t~FontHandle() override = default;\r\n};\r\n\r\n// X has a 16 bit coordinate space, so stop drawing here to avoid wrapping\r\nconstexpr int maxCoordinate = 32000;\r\n\r\nconst FontHandle *PFont(const Font *f) noexcept {\r\n\treturn dynamic_cast<const FontHandle *>(f);\r\n}\r\n\r\n}\r\n\r\nstd::shared_ptr<Font> Font::Allocate(const FontParameters &fp) {\r\n\treturn std::make_shared<FontHandle>(fp);\r\n}\r\n\r\nnamespace Scintilla {\r\n\r\n// SurfaceID is a cairo_t*\r\nclass SurfaceImpl : public Surface {\r\n\tSurfaceMode mode;\r\n\tEncodingType et= EncodingType::singleByte;\r\n\tWindowID widSave = nullptr;\r\n\tcairo_t *context = nullptr;\r\n\tUniqueCairo cairoOwned;\r\n\tUniqueCairoSurface surf;\r\n\tbool inited = false;\r\n\tUniquePangoContext pcontext;\r\n\tdouble resolution = 1.0;\r\n\tPangoDirection direction = PANGO_DIRECTION_LTR;\r\n\tconst cairo_font_options_t *fontOptions = nullptr;\r\n\tPangoLanguage *language = nullptr;\r\n\tUniquePangoLayout layout;\r\n\tConverter conv;\r\n\tCharacterSet characterSet = static_cast<CharacterSet>(-1);\r\n\r\n\tvoid PenColourAlpha(ColourRGBA fore) noexcept;\r\n\tvoid SetConverter(CharacterSet characterSet_);\r\n\tvoid CairoRectangle(PRectangle rc) noexcept;\r\npublic:\r\n\tSurfaceImpl() noexcept;\r\n\tSurfaceImpl(cairo_t *context_, int width, int height, SurfaceMode mode_, WindowID wid) noexcept;\r\n\t// Deleted so SurfaceImpl objects can not be copied.\r\n\tSurfaceImpl(const SurfaceImpl&) = delete;\r\n\tSurfaceImpl(SurfaceImpl&&) = delete;\r\n\tSurfaceImpl&operator=(const SurfaceImpl&) = delete;\r\n\tSurfaceImpl&operator=(SurfaceImpl&&) = delete;\r\n\t~SurfaceImpl() override = default;\r\n\r\n\tvoid GetContextState() noexcept;\r\n\tUniquePangoContext MeasuringContext();\r\n\r\n\tvoid Init(WindowID wid) override;\r\n\tvoid Init(SurfaceID sid, WindowID wid) override;\r\n\tstd::unique_ptr<Surface> AllocatePixMap(int width, int height) override;\r\n\r\n\tvoid SetMode(SurfaceMode mode_) override;\r\n\r\n\tvoid Release() noexcept override;\r\n\tint SupportsFeature(Supports feature) noexcept override;\r\n\tbool Initialised() override;\r\n\tint LogPixelsY() override;\r\n\tint PixelDivisions() override;\r\n\tint DeviceHeightFont(int points) override;\r\n\tvoid LineDraw(Point start, Point end, Stroke stroke) override;\r\n\tvoid PolyLine(const Point *pts, size_t npts, Stroke stroke) override;\r\n\tvoid Polygon(const Point *pts, size_t npts, FillStroke fillStroke) override;\r\n\tvoid RectangleDraw(PRectangle rc, FillStroke fillStroke) override;\r\n\tvoid RectangleFrame(PRectangle rc, Stroke stroke) override;\r\n\tvoid FillRectangle(PRectangle rc, Fill fill) override;\r\n\tvoid FillRectangleAligned(PRectangle rc, Fill fill) override;\r\n\tvoid FillRectangle(PRectangle rc, Surface &surfacePattern) override;\r\n\tvoid RoundedRectangle(PRectangle rc, FillStroke fillStroke) override;\r\n\tvoid AlphaRectangle(PRectangle rc, XYPOSITION cornerSize, FillStroke fillStroke) override;\r\n\tvoid GradientRectangle(PRectangle rc, const std::vector<ColourStop> &stops, GradientOptions options) override;\r\n\tvoid DrawRGBAImage(PRectangle rc, int width, int height, const unsigned char *pixelsImage) override;\r\n\tvoid Ellipse(PRectangle rc, FillStroke fillStroke) override;\r\n\tvoid Stadium(PRectangle rc, FillStroke fillStroke, Ends ends) override;\r\n\tvoid Copy(PRectangle rc, Point from, Surface &surfaceSource) override;\r\n\r\n\tstd::unique_ptr<IScreenLineLayout> Layout(const IScreenLine *screenLine) override;\r\n\r\n\tvoid DrawTextBase(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, ColourRGBA fore);\r\n\tvoid DrawTextNoClip(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, ColourRGBA fore, ColourRGBA back) override;\r\n\tvoid DrawTextClipped(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, ColourRGBA fore, ColourRGBA back) override;\r\n\tvoid DrawTextTransparent(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, ColourRGBA fore) override;\r\n\tvoid MeasureWidths(const Font *font_, std::string_view text, XYPOSITION *positions) override;\r\n\tXYPOSITION WidthText(const Font *font_, std::string_view text) override;\r\n\r\n\tvoid DrawTextBaseUTF8(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, ColourRGBA fore);\r\n\tvoid DrawTextNoClipUTF8(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, ColourRGBA fore, ColourRGBA back) override;\r\n\tvoid DrawTextClippedUTF8(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, ColourRGBA fore, ColourRGBA back) override;\r\n\tvoid DrawTextTransparentUTF8(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, ColourRGBA fore) override;\r\n\tvoid MeasureWidthsUTF8(const Font *font_, std::string_view text, XYPOSITION *positions) override;\r\n\tXYPOSITION WidthTextUTF8(const Font *font_, std::string_view text) override;\r\n\r\n\tXYPOSITION Ascent(const Font *font_) override;\r\n\tXYPOSITION Descent(const Font *font_) override;\r\n\tXYPOSITION InternalLeading(const Font *font_) override;\r\n\tXYPOSITION Height(const Font *font_) override;\r\n\tXYPOSITION AverageCharWidth(const Font *font_) override;\r\n\r\n\tvoid SetClip(PRectangle rc) override;\r\n\tvoid PopClip() override;\r\n\tvoid FlushCachedState() override;\r\n\tvoid FlushDrawing() override;\r\n};\r\n\r\nconst Supports SupportsGTK[] = {\r\n\tSupports::LineDrawsFinal,\r\n\tSupports::FractionalStrokeWidth,\r\n\tSupports::TranslucentStroke,\r\n\tSupports::PixelModification,\r\n\tSupports::ThreadSafeMeasureWidths,\r\n};\r\n\r\n}\r\n\r\nconst char *CharacterSetID(CharacterSet characterSet) noexcept {\r\n\tswitch (characterSet) {\r\n\tcase CharacterSet::Ansi:\r\n\t\treturn \"\";\r\n\tcase CharacterSet::Default:\r\n\t\treturn \"ISO-8859-1\";\r\n\tcase CharacterSet::Baltic:\r\n\t\treturn \"ISO-8859-13\";\r\n\tcase CharacterSet::ChineseBig5:\r\n\t\treturn \"BIG-5\";\r\n\tcase CharacterSet::EastEurope:\r\n\t\treturn \"ISO-8859-2\";\r\n\tcase CharacterSet::GB2312:\r\n\t\treturn \"CP936\";\r\n\tcase CharacterSet::Greek:\r\n\t\treturn \"ISO-8859-7\";\r\n\tcase CharacterSet::Hangul:\r\n\t\treturn \"CP949\";\r\n\tcase CharacterSet::Mac:\r\n\t\treturn \"MACINTOSH\";\r\n\tcase CharacterSet::Oem:\r\n\t\treturn \"ASCII\";\r\n\tcase CharacterSet::Russian:\r\n\t\treturn \"KOI8-R\";\r\n\tcase CharacterSet::Oem866:\r\n\t\treturn \"CP866\";\r\n\tcase CharacterSet::Cyrillic:\r\n\t\treturn \"CP1251\";\r\n\tcase CharacterSet::ShiftJis:\r\n\t\treturn \"SHIFT-JIS\";\r\n\tcase CharacterSet::Symbol:\r\n\t\treturn \"\";\r\n\tcase CharacterSet::Turkish:\r\n\t\treturn \"ISO-8859-9\";\r\n\tcase CharacterSet::Johab:\r\n\t\treturn \"CP1361\";\r\n\tcase CharacterSet::Hebrew:\r\n\t\treturn \"ISO-8859-8\";\r\n\tcase CharacterSet::Arabic:\r\n\t\treturn \"ISO-8859-6\";\r\n\tcase CharacterSet::Vietnamese:\r\n\t\treturn \"\";\r\n\tcase CharacterSet::Thai:\r\n\t\treturn \"ISO-8859-11\";\r\n\tcase CharacterSet::Iso8859_15:\r\n\t\treturn \"ISO-8859-15\";\r\n\tdefault:\r\n\t\treturn \"\";\r\n\t}\r\n}\r\n\r\nvoid SurfaceImpl::PenColourAlpha(ColourRGBA fore) noexcept {\r\n\tif (context) {\r\n\t\tcairo_set_source_rgba(context,\r\n\t\t\tfore.GetRedComponent(),\r\n\t\t\tfore.GetGreenComponent(),\r\n\t\t\tfore.GetBlueComponent(),\r\n\t\t\tfore.GetAlphaComponent());\r\n\t}\r\n}\r\n\r\nvoid SurfaceImpl::SetConverter(CharacterSet characterSet_) {\r\n\tif (characterSet != characterSet_) {\r\n\t\tcharacterSet = characterSet_;\r\n\t\tconv.Open(\"UTF-8\", CharacterSetID(characterSet), false);\r\n\t}\r\n}\r\n\r\nvoid SurfaceImpl::CairoRectangle(PRectangle rc) noexcept {\r\n\tcairo_rectangle(context, rc.left, rc.top, rc.Width(), rc.Height());\r\n}\r\n\r\nSurfaceImpl::SurfaceImpl() noexcept {\r\n}\r\n\r\nSurfaceImpl::SurfaceImpl(cairo_t *context_, int width, int height, SurfaceMode mode_, WindowID wid) noexcept {\r\n\tif (height > 0 && width > 0) {\r\n\t\tcairo_surface_t *psurfContext = cairo_get_target(context_);\r\n\t\tsurf.reset(cairo_surface_create_similar(\r\n\t\t\tpsurfContext,\r\n\t\t\tCAIRO_CONTENT_COLOR_ALPHA, width, height));\r\n\t\tcairoOwned.reset(cairo_create(surf.get()));\r\n\t\tcontext = cairoOwned.get();\r\n\t\tpcontext.reset(gtk_widget_create_pango_context(PWidget(wid)));\r\n\t\tPLATFORM_ASSERT(pcontext);\r\n\t\tSetFractionalPositions(pcontext.get());\r\n\t\tGetContextState();\r\n\t\tlayout.reset(pango_layout_new(pcontext.get()));\r\n\t\tPLATFORM_ASSERT(layout);\r\n\t\tcairo_rectangle(context, 0, 0, width, height);\r\n\t\tcairo_set_source_rgb(context, 1.0, 0, 0);\r\n\t\tcairo_fill(context);\r\n\t\tcairo_set_line_width(context, 1);\r\n\t\tinited = true;\r\n\t\tmode = mode_;\r\n\t}\r\n}\r\n\r\nvoid SurfaceImpl::Release() noexcept {\r\n\tet = EncodingType::singleByte;\r\n\tcairoOwned.reset();\r\n\tcontext = nullptr;\r\n\tsurf.reset();\r\n\tlayout.reset();\r\n\t// fontOptions and language are owned by original context and don't need to be freed\r\n\tfontOptions = nullptr;\r\n\tlanguage = nullptr;\r\n\tpcontext.reset();\r\n\tconv.Close();\r\n\tcharacterSet = static_cast<CharacterSet>(-1);\r\n\tinited = false;\r\n}\r\n\r\nbool SurfaceImpl::Initialised() {\r\n\tif (inited && context) {\r\n\t\tif (cairo_status(context) == CAIRO_STATUS_SUCCESS) {\r\n\t\t\t// Even when status is success, the target surface may have been\r\n\t\t\t// finished which may cause an assertion to fail crashing the application.\r\n\t\t\t// The cairo_surface_has_show_text_glyphs call checks the finished flag\r\n\t\t\t// and when set, sets the status to CAIRO_STATUS_SURFACE_FINISHED\r\n\t\t\t// which leads to warning messages instead of crashes.\r\n\t\t\t// Performing the check in this method as it is called rarely and has no\r\n\t\t\t// other side effects.\r\n\t\t\tcairo_surface_t *psurfContext = cairo_get_target(context);\r\n\t\t\tif (psurfContext) {\r\n\t\t\t\tcairo_surface_has_show_text_glyphs(psurfContext);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn cairo_status(context) == CAIRO_STATUS_SUCCESS;\r\n\t}\r\n\treturn inited;\r\n}\r\n\r\nvoid SurfaceImpl::GetContextState() noexcept {\r\n\tresolution = pango_cairo_context_get_resolution(pcontext.get());\r\n\tdirection = pango_context_get_base_dir(pcontext.get());\r\n\tfontOptions = pango_cairo_context_get_font_options(pcontext.get());\r\n\tlanguage = pango_context_get_language(pcontext.get());\r\n}\r\n\r\nUniquePangoContext SurfaceImpl::MeasuringContext() {\r\n\tUniquePangoFontMap fmMeasure(pango_cairo_font_map_get_default());\r\n\tPLATFORM_ASSERT(fmMeasure);\r\n\tUniquePangoContext contextMeasure(pango_font_map_create_context(fmMeasure.release()));\r\n\tPLATFORM_ASSERT(contextMeasure);\r\n\tSetFractionalPositions(contextMeasure.get());\r\n\r\n\tpango_cairo_context_set_resolution(contextMeasure.get(), resolution);\r\n\tpango_context_set_base_dir(contextMeasure.get(), direction);\r\n\tpango_cairo_context_set_font_options(contextMeasure.get(), fontOptions);\r\n\tpango_context_set_language(contextMeasure.get(), language);\r\n\r\n\treturn contextMeasure;\r\n}\r\n\r\nvoid SurfaceImpl::Init(WindowID wid) {\r\n\twidSave = wid;\r\n\tRelease();\r\n\tPLATFORM_ASSERT(wid);\r\n\t// if we are only created from a window ID, we can't perform drawing\r\n\tcontext = nullptr;\r\n\tpcontext.reset(gtk_widget_create_pango_context(PWidget(wid)));\r\n\tPLATFORM_ASSERT(pcontext);\r\n\tSetFractionalPositions(pcontext.get());\r\n\tGetContextState();\r\n\tlayout.reset(pango_layout_new(pcontext.get()));\r\n\tPLATFORM_ASSERT(layout);\r\n\tinited = true;\r\n}\r\n\r\nvoid SurfaceImpl::Init(SurfaceID sid, WindowID wid) {\r\n\twidSave = wid;\r\n\tPLATFORM_ASSERT(sid);\r\n\tRelease();\r\n\tPLATFORM_ASSERT(wid);\r\n\tcairoOwned.reset(cairo_reference(static_cast<cairo_t *>(sid)));\r\n\tcontext = cairoOwned.get();\r\n\tpcontext.reset(gtk_widget_create_pango_context(PWidget(wid)));\r\n\tSetFractionalPositions(pcontext.get());\r\n\t// update the Pango context in case sid isn't the widget's surface\r\n\tpango_cairo_update_context(context, pcontext.get());\r\n\tGetContextState();\r\n\tlayout.reset(pango_layout_new(pcontext.get()));\r\n\tcairo_set_line_width(context, 1);\r\n\tinited = true;\r\n}\r\n\r\nstd::unique_ptr<Surface> SurfaceImpl::AllocatePixMap(int width, int height) {\r\n\t// widSave must be alive now so safe for creating a PangoContext\r\n\treturn std::make_unique<SurfaceImpl>(context, width, height, mode, widSave);\r\n}\r\n\r\nvoid SurfaceImpl::SetMode(SurfaceMode mode_) {\r\n\tmode = mode_;\r\n\tif (mode.codePage == SC_CP_UTF8) {\r\n\t\tet = EncodingType::utf8;\r\n\t} else if (mode.codePage) {\r\n\t\tet = EncodingType::dbcs;\r\n\t} else {\r\n\t\tet = EncodingType::singleByte;\r\n\t}\r\n}\r\n\r\nint SurfaceImpl::SupportsFeature(Supports feature) noexcept {\r\n\tfor (const Supports f : SupportsGTK) {\r\n\t\tif (f == feature)\r\n\t\t\treturn 1;\r\n\t}\r\n\treturn 0;\r\n}\r\n\r\nint SurfaceImpl::LogPixelsY() {\r\n\treturn 72;\r\n}\r\n\r\nint SurfaceImpl::PixelDivisions() {\r\n\t// GTK uses device pixels.\r\n\treturn 1;\r\n}\r\n\r\nint SurfaceImpl::DeviceHeightFont(int points) {\r\n\tconst int logPix = LogPixelsY();\r\n\treturn (points * logPix + logPix / 2) / 72;\r\n}\r\n\r\nvoid SurfaceImpl::LineDraw(Point start, Point end, Stroke stroke) {\r\n\tPLATFORM_ASSERT(context);\r\n\tif (!context)\r\n\t\treturn;\r\n\tPenColourAlpha(stroke.colour);\r\n\tcairo_set_line_width(context, stroke.width);\r\n\tcairo_move_to(context, start.x, start.y);\r\n\tcairo_line_to(context, end.x, end.y);\r\n\tcairo_stroke(context);\r\n}\r\n\r\nvoid SurfaceImpl::PolyLine(const Point *pts, size_t npts, Stroke stroke) {\r\n\t// TODO: set line joins and caps\r\n\tPLATFORM_ASSERT(context && npts > 1);\r\n\tif (!context)\r\n\t\treturn;\r\n\tPenColourAlpha(stroke.colour);\r\n\tcairo_set_line_width(context, stroke.width);\r\n\tcairo_move_to(context, pts[0].x, pts[0].y);\r\n\tfor (size_t i = 1; i < npts; i++) {\r\n\t\tcairo_line_to(context, pts[i].x, pts[i].y);\r\n\t}\r\n\tcairo_stroke(context);\r\n}\r\n\r\nvoid SurfaceImpl::Polygon(const Point *pts, size_t npts, FillStroke fillStroke) {\r\n\tPLATFORM_ASSERT(context);\r\n\tPenColourAlpha(fillStroke.fill.colour);\r\n\tcairo_move_to(context, pts[0].x, pts[0].y);\r\n\tfor (size_t i = 1; i < npts; i++) {\r\n\t\tcairo_line_to(context, pts[i].x, pts[i].y);\r\n\t}\r\n\tcairo_close_path(context);\r\n\tcairo_fill_preserve(context);\r\n\tPenColourAlpha(fillStroke.stroke.colour);\r\n\tcairo_set_line_width(context, fillStroke.stroke.width);\r\n\tcairo_stroke(context);\r\n}\r\n\r\nvoid SurfaceImpl::RectangleDraw(PRectangle rc, FillStroke fillStroke) {\r\n\tif (context) {\r\n\t\tCairoRectangle(rc.Inset(fillStroke.stroke.width / 2));\r\n\t\tPenColourAlpha(fillStroke.fill.colour);\r\n\t\tcairo_fill_preserve(context);\r\n\t\tPenColourAlpha(fillStroke.stroke.colour);\r\n\t\tcairo_set_line_width(context, fillStroke.stroke.width);\r\n\t\tcairo_stroke(context);\r\n\t}\r\n}\r\n\r\nvoid SurfaceImpl::RectangleFrame(PRectangle rc, Stroke stroke) {\r\n\tif (context) {\r\n\t\tCairoRectangle(rc.Inset(stroke.width / 2));\r\n\t\tPenColourAlpha(stroke.colour);\r\n\t\tcairo_set_line_width(context, stroke.width);\r\n\t\tcairo_stroke(context);\r\n\t}\r\n}\r\n\r\nvoid SurfaceImpl::FillRectangle(PRectangle rc, Fill fill) {\r\n\tPenColourAlpha(fill.colour);\r\n\tif (context && (rc.left < maxCoordinate)) {\t// Protect against out of range\r\n\t\tCairoRectangle(rc);\r\n\t\tcairo_fill(context);\r\n\t}\r\n}\r\n\r\nvoid SurfaceImpl::FillRectangleAligned(PRectangle rc, Fill fill) {\r\n\tFillRectangle(PixelAlign(rc, 1), fill);\r\n}\r\n\r\nvoid SurfaceImpl::FillRectangle(PRectangle rc, Surface &surfacePattern) {\r\n\tSurfaceImpl &surfi = dynamic_cast<SurfaceImpl &>(surfacePattern);\r\n\tif (context && surfi.surf) {\r\n\t\t// Tile pattern over rectangle\r\n\t\tcairo_set_source_surface(context, surfi.surf.get(), rc.left, rc.top);\r\n\t\tcairo_pattern_set_extend(cairo_get_source(context), CAIRO_EXTEND_REPEAT);\r\n\t\tcairo_rectangle(context, rc.left, rc.top, rc.Width(), rc.Height());\r\n\t\tcairo_fill(context);\r\n\t}\r\n}\r\n\r\nvoid SurfaceImpl::RoundedRectangle(PRectangle rc, FillStroke fillStroke) {\r\n\tif (((rc.right - rc.left) > 4) && ((rc.bottom - rc.top) > 4)) {\r\n\t\t// Approximate a round rect with some cut off corners\r\n\t\tPoint pts[] = {\r\n\t\t\tPoint(rc.left + 2, rc.top),\r\n\t\t\tPoint(rc.right - 2, rc.top),\r\n\t\t\tPoint(rc.right, rc.top + 2),\r\n\t\t\tPoint(rc.right, rc.bottom - 2),\r\n\t\t\tPoint(rc.right - 2, rc.bottom),\r\n\t\t\tPoint(rc.left + 2, rc.bottom),\r\n\t\t\tPoint(rc.left, rc.bottom - 2),\r\n\t\t\tPoint(rc.left, rc.top + 2),\r\n\t\t};\r\n\t\tPolygon(pts, std::size(pts), fillStroke);\r\n\t} else {\r\n\t\tRectangleDraw(rc, fillStroke);\r\n\t}\r\n}\r\n\r\nstatic void PathRoundRectangle(cairo_t *context, double left, double top, double width, double height, double radius) noexcept {\r\n\tcairo_new_sub_path(context);\r\n\tcairo_arc(context, left + width - radius, top + radius, radius, -90 * degrees, 0 * degrees);\r\n\tcairo_arc(context, left + width - radius, top + height - radius, radius, 0 * degrees, 90 * degrees);\r\n\tcairo_arc(context, left + radius, top + height - radius, radius, 90 * degrees, 180 * degrees);\r\n\tcairo_arc(context, left + radius, top + radius, radius, 180 * degrees, 270 * degrees);\r\n\tcairo_close_path(context);\r\n}\r\n\r\nvoid SurfaceImpl::AlphaRectangle(PRectangle rc, XYPOSITION cornerSize, FillStroke fillStroke) {\r\n\tif (context && rc.Width() > 0) {\r\n\t\tconst XYPOSITION halfStroke = fillStroke.stroke.width / 2.0;\r\n\t\tconst XYPOSITION doubleStroke = fillStroke.stroke.width * 2.0;\r\n\t\tPenColourAlpha(fillStroke.fill.colour);\r\n\t\tif (cornerSize > 0)\r\n\t\t\tPathRoundRectangle(context, rc.left + fillStroke.stroke.width, rc.top + fillStroke.stroke.width,\r\n\t\t\t\trc.Width() - doubleStroke, rc.Height() - doubleStroke, cornerSize);\r\n\t\telse\r\n\t\t\tcairo_rectangle(context, rc.left + fillStroke.stroke.width, rc.top + fillStroke.stroke.width,\r\n\t\t\t\trc.Width() - doubleStroke, rc.Height() - doubleStroke);\r\n\t\tcairo_fill(context);\r\n\r\n\t\tPenColourAlpha(fillStroke.stroke.colour);\r\n\t\tif (cornerSize > 0)\r\n\t\t\tPathRoundRectangle(context, rc.left + halfStroke, rc.top + halfStroke,\r\n\t\t\t\trc.Width() - fillStroke.stroke.width, rc.Height() - fillStroke.stroke.width, cornerSize);\r\n\t\telse\r\n\t\t\tcairo_rectangle(context, rc.left + halfStroke, rc.top + halfStroke,\r\n\t\t\t\trc.Width() - fillStroke.stroke.width, rc.Height() - fillStroke.stroke.width);\r\n\t\tcairo_set_line_width(context, fillStroke.stroke.width);\r\n\t\tcairo_stroke(context);\r\n\t}\r\n}\r\n\r\nvoid SurfaceImpl::GradientRectangle(PRectangle rc, const std::vector<ColourStop> &stops, GradientOptions options) {\r\n\tif (context) {\r\n\t\tcairo_pattern_t *pattern;\r\n\t\tswitch (options) {\r\n\t\tcase GradientOptions::leftToRight:\r\n\t\t\tpattern = cairo_pattern_create_linear(rc.left, rc.top, rc.right, rc.top);\r\n\t\t\tbreak;\r\n\t\tcase GradientOptions::topToBottom:\r\n\t\tdefault:\r\n\t\t\tpattern = cairo_pattern_create_linear(rc.left, rc.top, rc.left, rc.bottom);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tfor (const ColourStop &stop : stops) {\r\n\t\t\tcairo_pattern_add_color_stop_rgba(pattern, stop.position,\r\n\t\t\t\t\t\t\t  stop.colour.GetRedComponent(),\r\n\t\t\t\t\t\t\t  stop.colour.GetGreenComponent(),\r\n\t\t\t\t\t\t\t  stop.colour.GetBlueComponent(),\r\n\t\t\t\t\t\t\t  stop.colour.GetAlphaComponent());\r\n\t\t}\r\n\t\tcairo_rectangle(context, rc.left, rc.top, rc.Width(), rc.Height());\r\n\t\tcairo_set_source(context, pattern);\r\n\t\tcairo_fill(context);\r\n\t\tcairo_pattern_destroy(pattern);\r\n\t}\r\n}\r\n\r\nvoid SurfaceImpl::DrawRGBAImage(PRectangle rc, int width, int height, const unsigned char *pixelsImage) {\r\n\tPLATFORM_ASSERT(context);\r\n\tif (width == 0)\r\n\t\treturn;\r\n\tif (rc.Width() > width)\r\n\t\trc.left += (rc.Width() - width) / 2;\r\n\trc.right = rc.left + width;\r\n\tif (rc.Height() > height)\r\n\t\trc.top += (rc.Height() - height) / 2;\r\n\trc.bottom = rc.top + height;\r\n\r\n\tconst int stride = cairo_format_stride_for_width(CAIRO_FORMAT_ARGB32, width);\r\n\tconst int ucs = stride * height;\r\n\tstd::vector<unsigned char> image(ucs);\r\n\tfor (ptrdiff_t iy=0; iy<height; iy++) {\r\n\t\tunsigned char *pixel = &image[0] + iy*stride;\r\n\t\tRGBAImage::BGRAFromRGBA(pixel, pixelsImage, width);\r\n\t\tpixelsImage += RGBAImage::bytesPerPixel * width;\r\n\t}\r\n\r\n\tUniqueCairoSurface surfImage(cairo_image_surface_create_for_data(&image[0], CAIRO_FORMAT_ARGB32, width, height, stride));\r\n\tcairo_set_source_surface(context, surfImage.get(), rc.left, rc.top);\r\n\tcairo_rectangle(context, rc.left, rc.top, rc.Width(), rc.Height());\r\n\tcairo_fill(context);\r\n}\r\n\r\nvoid SurfaceImpl::Ellipse(PRectangle rc, FillStroke fillStroke) {\r\n\tPLATFORM_ASSERT(context);\r\n\tPenColourAlpha(fillStroke.fill.colour);\r\n\tcairo_arc(context, (rc.left + rc.right) / 2, (rc.top + rc.bottom) / 2,\r\n\t\t  (std::min(rc.Width(), rc.Height()) - fillStroke.stroke.width) / 2, 0, 2*kPi);\r\n\tcairo_fill_preserve(context);\r\n\tPenColourAlpha(fillStroke.stroke.colour);\r\n\tcairo_set_line_width(context, fillStroke.stroke.width);\r\n\tcairo_stroke(context);\r\n}\r\n\r\nvoid SurfaceImpl::Stadium(PRectangle rc, FillStroke fillStroke, Ends ends) {\r\n\tconst XYPOSITION midLine = rc.Centre().y;\r\n\tconst XYPOSITION halfStroke = fillStroke.stroke.width / 2.0f;\r\n\tconst XYPOSITION radius = rc.Height() / 2.0f - halfStroke;\r\n\tPRectangle rcInner = rc;\r\n\trcInner.left += radius;\r\n\trcInner.right -= radius;\r\n\r\n\tcairo_new_sub_path(context);\r\n\r\n\tconst Ends leftSide = static_cast<Ends>(static_cast<int>(ends) & 0xf);\r\n\tconst Ends rightSide = static_cast<Ends>(static_cast<int>(ends) & 0xf0);\r\n\tswitch (leftSide) {\r\n\t\tcase Ends::leftFlat:\r\n\t\t\tcairo_move_to(context, rc.left + halfStroke, rc.top + halfStroke);\r\n\t\t\tcairo_line_to(context, rc.left + halfStroke, rc.bottom - halfStroke);\r\n\t\t\tbreak;\r\n\t\tcase Ends::leftAngle:\r\n\t\t\tcairo_move_to(context, rcInner.left + halfStroke, rc.top + halfStroke);\r\n\t\t\tcairo_line_to(context, rc.left + halfStroke, rc.Centre().y);\r\n\t\t\tcairo_line_to(context, rcInner.left + halfStroke, rc.bottom - halfStroke);\r\n\t\t\tbreak;\r\n\t\tcase Ends::semiCircles:\r\n\t\tdefault:\r\n\t\t\tcairo_move_to(context, rcInner.left + halfStroke, rc.top + halfStroke);\r\n\t\t\tcairo_arc_negative(context, rcInner.left + halfStroke, midLine, radius,\r\n\t\t\t\t270 * degrees, 90 * degrees);\r\n\t\t\tbreak;\r\n\t}\r\n\r\n\tswitch (rightSide) {\r\n\t\tcase Ends::rightFlat:\r\n\t\t\tcairo_line_to(context, rc.right - halfStroke, rc.bottom - halfStroke);\r\n\t\t\tcairo_line_to(context, rc.right - halfStroke, rc.top + halfStroke);\r\n\t\t\tbreak;\r\n\t\tcase Ends::rightAngle:\r\n\t\t\tcairo_line_to(context, rcInner.right - halfStroke, rc.bottom - halfStroke);\r\n\t\t\tcairo_line_to(context, rc.right - halfStroke, rc.Centre().y);\r\n\t\t\tcairo_line_to(context, rcInner.right - halfStroke, rc.top + halfStroke);\r\n\t\t\tbreak;\r\n\t\tcase Ends::semiCircles:\r\n\t\tdefault:\r\n\t\t\tcairo_line_to(context, rcInner.right - halfStroke, rc.bottom - halfStroke);\r\n\t\t\tcairo_arc_negative(context, rcInner.right - halfStroke, midLine, radius,\r\n\t\t\t\t90 * degrees, 270 * degrees);\r\n\t\t\tbreak;\r\n\t}\r\n\r\n\t// Close the path to enclose it for stroking and for filling, then draw it\r\n\tcairo_close_path(context);\r\n\tPenColourAlpha(fillStroke.fill.colour);\r\n\tcairo_fill_preserve(context);\r\n\r\n\tPenColourAlpha(fillStroke.stroke.colour);\r\n\tcairo_set_line_width(context, fillStroke.stroke.width);\r\n\tcairo_stroke(context);\r\n}\r\n\r\nvoid SurfaceImpl::Copy(PRectangle rc, Point from, Surface &surfaceSource) {\r\n\tSurfaceImpl &surfi = static_cast<SurfaceImpl &>(surfaceSource);\r\n\tconst bool canDraw = surfi.surf != nullptr;\r\n\tif (canDraw) {\r\n\t\tPLATFORM_ASSERT(context);\r\n\t\tcairo_set_source_surface(context, surfi.surf.get(),\r\n\t\t\t\t\t rc.left - from.x, rc.top - from.y);\r\n\t\tcairo_rectangle(context, rc.left, rc.top, rc.Width(), rc.Height());\r\n\t\tcairo_fill(context);\r\n\t}\r\n}\r\n\r\nstd::unique_ptr<IScreenLineLayout> SurfaceImpl::Layout(const IScreenLine *) {\r\n\treturn {};\r\n}\r\n\r\nstd::string UTF8FromLatin1(std::string_view text) {\r\n\tstd::string utfForm(text.length()*2 + 1, '\\0');\r\n\tsize_t lenU = 0;\r\n\tfor (const char ch : text) {\r\n\t\tconst unsigned char uch = ch;\r\n\t\tif (uch < 0x80) {\r\n\t\t\tutfForm[lenU++] = uch;\r\n\t\t} else {\r\n\t\t\tutfForm[lenU++] = static_cast<char>(0xC0 | (uch >> 6));\r\n\t\t\tutfForm[lenU++] = static_cast<char>(0x80 | (uch & 0x3f));\r\n\t\t}\r\n\t}\r\n\tutfForm.resize(lenU);\r\n\treturn utfForm;\r\n}\r\n\r\nnamespace {\r\n\r\nstd::string UTF8FromIconv(const Converter &conv, std::string_view text) {\r\n\tif (conv) {\r\n\t\tstd::string utfForm(text.length()*3+1, '\\0');\r\n\t\tchar *pin = const_cast<char *>(text.data());\r\n\t\tgsize inLeft = text.length();\r\n\t\tchar *putf = &utfForm[0];\r\n\t\tchar *pout = putf;\r\n\t\tgsize outLeft = text.length()*3+1;\r\n\t\tconst gsize conversions = conv.Convert(&pin, &inLeft, &pout, &outLeft);\r\n\t\tif (conversions != sizeFailure) {\r\n\t\t\t*pout = '\\0';\r\n\t\t\tutfForm.resize(pout - putf);\r\n\t\t\treturn utfForm;\r\n\t\t}\r\n\t}\r\n\treturn std::string();\r\n}\r\n\r\n// Work out how many bytes are in a character by trying to convert using iconv,\r\n// returning the first length that succeeds.\r\nsize_t MultiByteLenFromIconv(const Converter &conv, const char *s, size_t len) noexcept {\r\n\tfor (size_t lenMB=1; (lenMB<4) && (lenMB <= len); lenMB++) {\r\n\t\tchar wcForm[2] {};\r\n\t\tchar *pin = const_cast<char *>(s);\r\n\t\tgsize inLeft = lenMB;\r\n\t\tchar *pout = wcForm;\r\n\t\tgsize outLeft = 2;\r\n\t\tconst gsize conversions = conv.Convert(&pin, &inLeft, &pout, &outLeft);\r\n\t\tif (conversions != sizeFailure) {\r\n\t\t\treturn lenMB;\r\n\t\t}\r\n\t}\r\n\treturn 1;\r\n}\r\n\r\n}\r\n\r\nvoid SurfaceImpl::DrawTextBase(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text,\r\n\t\t\t       ColourRGBA fore) {\r\n\tif (context) {\r\n\t\tPenColourAlpha(fore);\r\n\t\tconst XYPOSITION xText = rc.left;\r\n\t\tif (PFont(font_)->fd) {\r\n\t\t\tif (et == EncodingType::utf8) {\r\n\t\t\t\tLayoutSetText(layout.get(), text);\r\n\t\t\t} else {\r\n\t\t\t\tSetConverter(PFont(font_)->characterSet);\r\n\t\t\t\tstd::string utfForm = UTF8FromIconv(conv, text);\r\n\t\t\t\tif (utfForm.empty()) {\t// iconv failed so treat as Latin1\r\n\t\t\t\t\tutfForm = UTF8FromLatin1(text);\r\n\t\t\t\t}\r\n\t\t\t\tLayoutSetText(layout.get(), utfForm);\r\n\t\t\t}\r\n\t\t\tpango_layout_set_font_description(layout.get(), PFont(font_)->fd.get());\r\n\t\t\tpango_cairo_update_layout(context, layout.get());\r\n\t\t\tPangoLayoutLine *pll = pango_layout_get_line_readonly(layout.get(), 0);\r\n\t\t\tcairo_move_to(context, xText, ybase);\r\n\t\t\tpango_cairo_show_layout_line(context, pll);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid SurfaceImpl::DrawTextNoClip(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text,\r\n\t\t\t\t ColourRGBA fore, ColourRGBA back) {\r\n\tFillRectangleAligned(rc, back);\r\n\tDrawTextBase(rc, font_, ybase, text, fore);\r\n}\r\n\r\n// On GTK+, exactly same as DrawTextNoClip\r\nvoid SurfaceImpl::DrawTextClipped(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text,\r\n\t\t\t\t  ColourRGBA fore, ColourRGBA back) {\r\n\tFillRectangleAligned(rc, back);\r\n\tDrawTextBase(rc, font_, ybase, text, fore);\r\n}\r\n\r\nvoid SurfaceImpl::DrawTextTransparent(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text,\r\n\t\t\t\t      ColourRGBA fore) {\r\n\t// Avoid drawing spaces in transparent mode\r\n\tfor (size_t i=0; i<text.length(); i++) {\r\n\t\tif (text[i] != ' ') {\r\n\t\t\tDrawTextBase(rc, font_, ybase, text, fore);\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nnamespace {\r\n\r\nclass ClusterIterator {\r\n\tUniquePangoLayoutIter iter;\r\n\tPangoRectangle pos {};\r\n\tint lenPositions;\r\npublic:\r\n\tbool finished = false;\r\n\tXYPOSITION positionStart = 0.0;\r\n\tXYPOSITION position = 0.0;\r\n\tXYPOSITION distance = 0.0;\r\n\tint curIndex = 0;\r\n\tClusterIterator(PangoLayout *layout, std::string_view text) noexcept :\r\n\t\tlenPositions(static_cast<int>(text.length())) {\r\n\t\tLayoutSetText(layout, text);\r\n\t\titer.reset(pango_layout_get_iter(layout));\r\n\t\tcurIndex = pango_layout_iter_get_index(iter.get());\r\n\t\tpango_layout_iter_get_cluster_extents(iter.get(), nullptr, &pos);\r\n\t}\r\n\r\n\tvoid Next() noexcept {\r\n\t\tpositionStart = position;\r\n\t\tif (pango_layout_iter_next_cluster(iter.get())) {\r\n\t\t\tpango_layout_iter_get_cluster_extents(iter.get(), nullptr, &pos);\r\n\t\t\tposition = pango_units_to_double(pos.x);\r\n\t\t\tcurIndex = pango_layout_iter_get_index(iter.get());\r\n\t\t} else {\r\n\t\t\tfinished = true;\r\n\t\t\tposition = pango_units_to_double(pos.x + pos.width);\r\n\t\t\tcurIndex = pango_layout_iter_get_index(iter.get());\r\n\t\t}\r\n\t\tdistance = position - positionStart;\r\n\t}\r\n};\r\n\r\n// Something has gone wrong so set all the characters as equally spaced.\r\nvoid EquallySpaced(PangoLayout *layout, XYPOSITION *positions, size_t lenPositions) {\r\n\tint widthLayout = 0;\r\n\tpango_layout_get_size(layout, &widthLayout, nullptr);\r\n\tconst XYPOSITION widthTotal = pango_units_to_double(widthLayout);\r\n\tfor (size_t bytePos=0; bytePos<lenPositions; bytePos++) {\r\n\t\tpositions[bytePos] = widthTotal / lenPositions * (bytePos + 1);\r\n\t}\r\n}\r\n\r\n}\r\n\r\nvoid SurfaceImpl::MeasureWidths(const Font *font_, std::string_view text, XYPOSITION *positions) {\r\n\tif (PFont(font_)->fd) {\r\n\t\tUniquePangoContext contextMeasure = MeasuringContext();\r\n\t\tUniquePangoLayout layoutMeasure(pango_layout_new(contextMeasure.get()));\r\n\t\tPLATFORM_ASSERT(layoutMeasure);\r\n\r\n\t\tpango_layout_set_font_description(layoutMeasure.get(), PFont(font_)->fd.get());\r\n\t\tif (et == EncodingType::utf8) {\r\n\t\t\t// Simple and direct as UTF-8 is native Pango encoding\r\n\t\t\tClusterIterator iti(layoutMeasure.get(), text);\r\n\t\t\tint i = iti.curIndex;\r\n\t\t\tif (i != 0) {\r\n\t\t\t\t// Unexpected start to iteration, could be bidirectional text\r\n\t\t\t\tEquallySpaced(layoutMeasure.get(), positions, text.length());\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\twhile (!iti.finished) {\r\n\t\t\t\titi.Next();\r\n\t\t\t\tconst int places = iti.curIndex - i;\r\n\t\t\t\twhile (i < iti.curIndex) {\r\n\t\t\t\t\t// Evenly distribute space among bytes of this cluster.\r\n\t\t\t\t\t// Would be better to find number of characters and then\r\n\t\t\t\t\t// divide evenly between characters with each byte of a character\r\n\t\t\t\t\t// being at the same position.\r\n\t\t\t\t\tpositions[i] = iti.position - (iti.curIndex - 1 - i) * iti.distance / places;\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tPLATFORM_ASSERT(static_cast<size_t>(i) == text.length());\r\n\t\t} else {\r\n\t\t\tint positionsCalculated = 0;\r\n\t\t\tconst char *charSetID = CharacterSetID(PFont(font_)->characterSet);\r\n\t\t\tstd::string utfForm;\r\n\t\t\t{\r\n\t\t\t\tgsize bytesRead = 0;\r\n\t\t\t\tgsize bytesWritten = 0;\r\n\t\t\t\tGError *error = nullptr;\r\n\t\t\t\tUniqueStr textInUTF8(g_convert(text.data(), text.length(),\r\n\t\t\t\t\t\"UTF-8\", charSetID,\r\n\t\t\t\t\t&bytesRead,\r\n\t\t\t\t\t&bytesWritten,\r\n\t\t\t\t\t&error));\r\n\t\t\t\tif ((bytesWritten > 0)  && (bytesRead == text.length()) && !error) {\r\n\t\t\t\t\t// Extra allocation here but avoiding it makes code more complex\r\n\t\t\t\t\tutfForm.assign(textInUTF8.get(), bytesWritten);\r\n\t\t\t\t}\r\n\t\t\t\tif (error) {\r\n#ifdef DEBUG\r\n\t\t\t\t\tfprintf(stderr, \"MeasureWidths: %s.\\n\", error->message);\r\n#endif\r\n\t\t\t\t\tg_error_free(error);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (et == EncodingType::dbcs) {\r\n\t\t\t\tif (!utfForm.empty()) {\r\n\t\t\t\t\t// Convert to UTF-8 so can ask Pango for widths, then\r\n\t\t\t\t\t// Loop through UTF-8 and DBCS forms, taking account of different\r\n\t\t\t\t\t// character byte lengths.\r\n\t\t\t\t\tConverter convMeasure(\"UCS-2\", charSetID, false);\r\n\t\t\t\t\tint i = 0;\r\n\t\t\t\t\tClusterIterator iti(layoutMeasure.get(), utfForm);\r\n\t\t\t\t\tint clusterStart = iti.curIndex;\r\n\t\t\t\t\tif (clusterStart != 0) {\r\n\t\t\t\t\t\t// Unexpected start to iteration, could be bidirectional text\r\n\t\t\t\t\t\tEquallySpaced(layoutMeasure.get(), positions, text.length());\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\twhile (!iti.finished) {\r\n\t\t\t\t\t\titi.Next();\r\n\t\t\t\t\t\tconst int clusterEnd = iti.curIndex;\r\n\t\t\t\t\t\tconst int places = g_utf8_strlen(utfForm.data() + clusterStart, clusterEnd - clusterStart);\r\n\t\t\t\t\t\tint place = 1;\r\n\t\t\t\t\t\twhile (clusterStart < clusterEnd) {\r\n\t\t\t\t\t\t\tsize_t lenChar = MultiByteLenFromIconv(convMeasure, text.data()+i, text.length()-i);\r\n\t\t\t\t\t\t\twhile (lenChar--) {\r\n\t\t\t\t\t\t\t\tpositions[i++] = iti.position - (places - place) * iti.distance / places;\r\n\t\t\t\t\t\t\t\tpositionsCalculated++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tclusterStart += UTF8BytesOfLead[static_cast<unsigned char>(utfForm[clusterStart])];\r\n\t\t\t\t\t\t\tplace++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tPLATFORM_ASSERT(static_cast<size_t>(i) == text.length());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (positionsCalculated < 1) {\r\n\t\t\t\tconst size_t lenPositions = text.length();\r\n\t\t\t\t// Either 8-bit or DBCS conversion failed so treat as 8-bit.\r\n\t\t\t\tconst bool rtlCheck = PFont(font_)->characterSet == CharacterSet::Hebrew ||\r\n\t\t\t\t\t\t\t    PFont(font_)->characterSet == CharacterSet::Arabic;\r\n\t\t\t\tif (utfForm.empty()) {\r\n\t\t\t\t\tutfForm = UTF8FromLatin1(text);\r\n#ifdef DEBUG\r\n\t\t\t\t\tfprintf(stderr, \"MeasureWidths: Fall back to Latin1 [%s]\\n\", utfForm.c_str());\r\n#endif\r\n\t\t\t\t}\r\n\t\t\t\tsize_t i = 0;\r\n\t\t\t\t// Each 8-bit input character may take 1 or 2 bytes in UTF-8\r\n\t\t\t\t// and groups of up to 3 may be represented as ligatures.\r\n\t\t\t\tClusterIterator iti(layoutMeasure.get(), utfForm);\r\n\t\t\t\tint clusterStart = iti.curIndex;\r\n\t\t\t\tif (clusterStart != 0) {\r\n\t\t\t\t\t// Unexpected start to iteration, could be bidirectional text\r\n\t\t\t\t\tEquallySpaced(layoutMeasure.get(), positions, lenPositions);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\twhile (!iti.finished) {\r\n\t\t\t\t\titi.Next();\r\n\t\t\t\t\tconst int clusterEnd = iti.curIndex;\r\n\t\t\t\t\tconst int ligatureLength = g_utf8_strlen(utfForm.data() + clusterStart, clusterEnd - clusterStart);\r\n\t\t\t\t\tif (((i + ligatureLength) > lenPositions) ||\r\n\t\t\t\t\t\t(rtlCheck && ((clusterEnd <= clusterStart) || (ligatureLength == 0) || (ligatureLength > 3)))) {\r\n\t\t\t\t\t\t// Something has gone wrong: exit quickly but pretend all the characters are equally spaced:\r\n#ifdef DEBUG\r\n\t\t\t\t\t\tfprintf(stderr, \"MeasureWidths: result too long.\\n\");\r\n#endif\r\n\t\t\t\t\t\tEquallySpaced(layoutMeasure.get(), positions, lenPositions);\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tPLATFORM_ASSERT(ligatureLength > 0 && ligatureLength <= 3);\r\n\t\t\t\t\tfor (int charInLig=0; charInLig<ligatureLength; charInLig++) {\r\n\t\t\t\t\t\tpositions[i++] = iti.position - (ligatureLength - 1 - charInLig) * iti.distance / ligatureLength;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tclusterStart = clusterEnd;\r\n\t\t\t\t}\r\n\t\t\t\twhile (i < lenPositions) {\r\n\t\t\t\t\t// If something failed, fill in rest of the positions\r\n\t\t\t\t\tpositions[i++] = clusterStart;\r\n\t\t\t\t}\r\n\t\t\t\tPLATFORM_ASSERT(i == text.length());\r\n\t\t\t}\r\n\t\t}\r\n\t} else {\r\n\t\t// No font so return an ascending range of values\r\n\t\tfor (size_t i = 0; i < text.length(); i++) {\r\n\t\t\tpositions[i] = i + 1.0;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nXYPOSITION SurfaceImpl::WidthText(const Font *font_, std::string_view text) {\r\n\tif (PFont(font_)->fd) {\r\n\t\tpango_layout_set_font_description(layout.get(), PFont(font_)->fd.get());\r\n\t\tif (et == EncodingType::utf8) {\r\n\t\t\tLayoutSetText(layout.get(), text);\r\n\t\t} else {\r\n\t\t\tSetConverter(PFont(font_)->characterSet);\r\n\t\t\tstd::string utfForm = UTF8FromIconv(conv, text);\r\n\t\t\tif (utfForm.empty()) {\t// iconv failed so treat as Latin1\r\n\t\t\t\tutfForm = UTF8FromLatin1(text);\r\n\t\t\t}\r\n\t\t\tLayoutSetText(layout.get(), utfForm);\r\n\t\t}\r\n\t\tPangoLayoutLine *pangoLine = pango_layout_get_line_readonly(layout.get(), 0);\r\n\t\tPangoRectangle pos {};\r\n\t\tpango_layout_line_get_extents(pangoLine, nullptr, &pos);\r\n\t\treturn pango_units_to_double(pos.width);\r\n\t}\r\n\treturn 1;\r\n}\r\n\r\nvoid SurfaceImpl::DrawTextBaseUTF8(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text,\r\n\tColourRGBA fore) {\r\n\tif (context) {\r\n\t\tPenColourAlpha(fore);\r\n\t\tconst XYPOSITION xText = rc.left;\r\n\t\tif (PFont(font_)->fd) {\r\n\t\t\tLayoutSetText(layout.get(), text);\r\n\t\t\tpango_layout_set_font_description(layout.get(), PFont(font_)->fd.get());\r\n\t\t\tpango_cairo_update_layout(context, layout.get());\r\n\t\t\tPangoLayoutLine *pll = pango_layout_get_line_readonly(layout.get(), 0);\r\n\t\t\tcairo_move_to(context, xText, ybase);\r\n\t\t\tpango_cairo_show_layout_line(context, pll);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid SurfaceImpl::DrawTextNoClipUTF8(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text,\r\n\tColourRGBA fore, ColourRGBA back) {\r\n\tFillRectangleAligned(rc, back);\r\n\tDrawTextBaseUTF8(rc, font_, ybase, text, fore);\r\n}\r\n\r\n// On GTK+, exactly same as DrawTextNoClip\r\nvoid SurfaceImpl::DrawTextClippedUTF8(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text,\r\n\tColourRGBA fore, ColourRGBA back) {\r\n\tFillRectangleAligned(rc, back);\r\n\tDrawTextBaseUTF8(rc, font_, ybase, text, fore);\r\n}\r\n\r\nvoid SurfaceImpl::DrawTextTransparentUTF8(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text,\r\n\tColourRGBA fore) {\r\n\t// Avoid drawing spaces in transparent mode\r\n\tfor (size_t i = 0; i < text.length(); i++) {\r\n\t\tif (text[i] != ' ') {\r\n\t\t\tDrawTextBaseUTF8(rc, font_, ybase, text, fore);\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid SurfaceImpl::MeasureWidthsUTF8(const Font *font_, std::string_view text, XYPOSITION *positions) {\r\n\tif (PFont(font_)->fd) {\r\n\t\tUniquePangoContext contextMeasure = MeasuringContext();\r\n\t\tUniquePangoLayout layoutMeasure(pango_layout_new(contextMeasure.get()));\r\n\t\tPLATFORM_ASSERT(layoutMeasure);\r\n\r\n\t\tpango_layout_set_font_description(layoutMeasure.get(), PFont(font_)->fd.get());\r\n\t\t// Simple and direct as UTF-8 is native Pango encoding\r\n\t\tClusterIterator iti(layoutMeasure.get(), text);\r\n\t\tint i = iti.curIndex;\r\n\t\tif (i != 0) {\r\n\t\t\t// Unexpected start to iteration, could be bidirectional text\r\n\t\t\tEquallySpaced(layoutMeasure.get(), positions, text.length());\r\n\t\t\treturn;\r\n\t\t}\r\n\t\twhile (!iti.finished) {\r\n\t\t\titi.Next();\r\n\t\t\tif (iti.curIndex < i) {\r\n\t\t\t\t// Backwards movement indicater bidirectional.\r\n\t\t\t\t// Divide into ASCII prefix and non-ASCII suffix as this is common case\r\n\t\t\t\t// and produces accurate positions for the ASCII prefix.\r\n\t\t\t\tsize_t lenASCII=0;\r\n\t\t\t\twhile (lenASCII<text.length() && IsASCII(text[lenASCII])) {\r\n\t\t\t\t\tlenASCII++;\r\n\t\t\t\t}\r\n\t\t\t\tconst std::string_view asciiPrefix = text.substr(0, lenASCII);\r\n\t\t\t\tconst std::string_view bidiSuffix = text.substr(lenASCII);\r\n\t\t\t\t// Recurse for ASCII prefix.\r\n\t\t\t\tMeasureWidthsUTF8(font_, asciiPrefix, positions);\r\n\t\t\t\t// Measure the whole bidiSuffix and spread its width evenly\r\n\t\t\t\tconst XYPOSITION endASCII = positions[lenASCII-1];\r\n\t\t\t\tconst XYPOSITION widthBidi = WidthText(font_, bidiSuffix);\r\n\t\t\t\tconst XYPOSITION widthByteBidi = widthBidi / bidiSuffix.length();\r\n\t\t\t\tfor (size_t bidiPos=0; bidiPos<bidiSuffix.length(); bidiPos++) {\r\n\t\t\t\t\tpositions[bidiPos+lenASCII] = endASCII + widthByteBidi * (bidiPos + 1);\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tconst int places = iti.curIndex - i;\r\n\t\t\twhile (i < iti.curIndex) {\r\n\t\t\t\t// Evenly distribute space among bytes of this cluster.\r\n\t\t\t\t// Would be better to find number of characters and then\r\n\t\t\t\t// divide evenly between characters with each byte of a character\r\n\t\t\t\t// being at the same position.\r\n\t\t\t\tpositions[i] = iti.position - (iti.curIndex - 1 - i) * iti.distance / places;\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tPLATFORM_ASSERT(static_cast<size_t>(i) == text.length());\r\n\t} else {\r\n\t\t// No font so return an ascending range of values\r\n\t\tfor (size_t i = 0; i < text.length(); i++) {\r\n\t\t\tpositions[i] = i + 1.0;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nXYPOSITION SurfaceImpl::WidthTextUTF8(const Font *font_, std::string_view text) {\r\n\tif (PFont(font_)->fd) {\r\n\t\tpango_layout_set_font_description(layout.get(), PFont(font_)->fd.get());\r\n\t\tLayoutSetText(layout.get(), text);\r\n\t\tPangoLayoutLine *pangoLine = pango_layout_get_line_readonly(layout.get(), 0);\r\n\t\tPangoRectangle pos{};\r\n\t\tpango_layout_line_get_extents(pangoLine, nullptr, &pos);\r\n\t\treturn pango_units_to_double(pos.width);\r\n\t}\r\n\treturn 1;\r\n}\r\n\r\n// Ascent and descent determined by Pango font metrics.\r\n\r\nXYPOSITION SurfaceImpl::Ascent(const Font *font_) {\r\n\tif (!PFont(font_)->fd) {\r\n\t\treturn 1.0;\r\n\t}\r\n\tUniquePangoFontMetrics metrics(pango_context_get_metrics(pcontext.get(),\r\n\t\t\t\t    PFont(font_)->fd.get(), language));\r\n\treturn std::max(1.0, std::ceil(pango_units_to_double(\r\n\t\t\t\t    pango_font_metrics_get_ascent(metrics.get()))));\r\n}\r\n\r\nXYPOSITION SurfaceImpl::Descent(const Font *font_) {\r\n\tif (!PFont(font_)->fd) {\r\n\t\treturn 0.0;\r\n\t}\r\n\tUniquePangoFontMetrics metrics(pango_context_get_metrics(pcontext.get(),\r\n\t\t\t\t    PFont(font_)->fd.get(), language));\r\n\treturn std::ceil(pango_units_to_double(pango_font_metrics_get_descent(metrics.get())));\r\n}\r\n\r\nXYPOSITION SurfaceImpl::InternalLeading(const Font *) {\r\n\treturn 0;\r\n}\r\n\r\nXYPOSITION SurfaceImpl::Height(const Font *font_) {\r\n\treturn Ascent(font_) + Descent(font_);\r\n}\r\n\r\nXYPOSITION SurfaceImpl::AverageCharWidth(const Font *font_) {\r\n\treturn WidthText(font_, \"n\");\r\n}\r\n\r\nvoid SurfaceImpl::SetClip(PRectangle rc) {\r\n\tPLATFORM_ASSERT(context);\r\n\tcairo_save(context);\r\n\tCairoRectangle(rc);\r\n\tcairo_clip(context);\r\n}\r\n\r\nvoid SurfaceImpl::PopClip() {\r\n\tPLATFORM_ASSERT(context);\r\n\tcairo_restore(context);\r\n}\r\n\r\nvoid SurfaceImpl::FlushCachedState() {}\r\n\r\nvoid SurfaceImpl::FlushDrawing() {\r\n}\r\n\r\nstd::unique_ptr<Surface> Surface::Allocate(Technology) {\r\n\treturn std::make_unique<SurfaceImpl>();\r\n}\r\n\r\nWindow::~Window() noexcept {}\r\n\r\nvoid Window::Destroy() noexcept {\r\n\tif (wid) {\r\n\t\tListBox *listbox = dynamic_cast<ListBox *>(this);\r\n\t\tif (listbox) {\r\n\t\t\tgtk_widget_hide(GTK_WIDGET(wid));\r\n\t\t\t// clear up window content\r\n\t\t\tlistbox->Clear();\r\n\t\t\t// resize the window to the smallest possible size for it to adapt\r\n\t\t\t// to future content\r\n\t\t\tgtk_window_resize(GTK_WINDOW(wid), 1, 1);\r\n\t\t} else {\r\n\t\t\tgtk_widget_destroy(GTK_WIDGET(wid));\r\n\t\t}\r\n\t\twid = nullptr;\r\n\t}\r\n}\r\n\r\nPRectangle Window::GetPosition() const {\r\n\t// Before any size allocated pretend its 1000 wide so not scrolled\r\n\tPRectangle rc(0, 0, 1000, 1000);\r\n\tif (wid) {\r\n\t\tGtkAllocation allocation;\r\n\t\tgtk_widget_get_allocation(PWidget(wid), &allocation);\r\n\t\trc.left = static_cast<XYPOSITION>(allocation.x);\r\n\t\trc.top = static_cast<XYPOSITION>(allocation.y);\r\n\t\tif (allocation.width > 20) {\r\n\t\t\trc.right = rc.left + allocation.width;\r\n\t\t\trc.bottom = rc.top + allocation.height;\r\n\t\t}\r\n\t}\r\n\treturn rc;\r\n}\r\n\r\nvoid Window::SetPosition(PRectangle rc) {\r\n\tGtkAllocation alloc {};\r\n\talloc.x = static_cast<int>(rc.left);\r\n\talloc.y = static_cast<int>(rc.top);\r\n\talloc.width = static_cast<int>(rc.Width());\r\n\talloc.height = static_cast<int>(rc.Height());\r\n\tgtk_widget_size_allocate(PWidget(wid), &alloc);\r\n}\r\n\r\nnamespace {\r\n\r\nGdkRectangle MonitorRectangleForWidget(GtkWidget *wid) noexcept {\r\n\tGdkWindow *wnd = WindowFromWidget(wid);\r\n\tGdkRectangle rcScreen = GdkRectangle();\r\n#if GTK_CHECK_VERSION(3,22,0)\r\n\tGdkDisplay *pdisplay = gtk_widget_get_display(wid);\r\n\tGdkMonitor *monitor = gdk_display_get_monitor_at_window(pdisplay, wnd);\r\n\tgdk_monitor_get_geometry(monitor, &rcScreen);\r\n#if defined(GDK_WINDOWING_WAYLAND)\r\n\tif (GDK_IS_WAYLAND_DISPLAY(pdisplay)) {\r\n\t\t// The GDK behavior on Wayland is not self-consistent, we must correct the display coordinates to match\r\n\t\t// the coordinate space used in gtk_window_move. See also https://sourceforge.net/p/scintilla/bugs/2296/\r\n\t\trcScreen.x = 0;\r\n\t\trcScreen.y = 0;\r\n\t}\r\n#endif\r\n#else\r\n\tGdkScreen *screen = gtk_widget_get_screen(wid);\r\n\tconst gint monitor_num = gdk_screen_get_monitor_at_window(screen, wnd);\r\n\tgdk_screen_get_monitor_geometry(screen, monitor_num, &rcScreen);\r\n#endif\r\n\treturn rcScreen;\r\n}\r\n\r\n}\r\n\r\nvoid Window::SetPositionRelative(PRectangle rc, const Window *relativeTo) {\r\n\tconst IntegerRectangle irc(rc);\r\n\tint ox = 0;\r\n\tint oy = 0;\r\n\tGdkWindow *wndRelativeTo = WindowFromWidget(PWidget(relativeTo->wid));\r\n\tgdk_window_get_origin(wndRelativeTo, &ox, &oy);\r\n\tox += irc.left;\r\n\toy += irc.top;\r\n\r\n\tconst GdkRectangle rcMonitor = MonitorRectangleForWidget(PWidget(relativeTo->wid));\r\n\r\n\t/* do some corrections to fit into screen */\r\n\tconst int sizex = irc.Width();\r\n\tconst int sizey = irc.Height();\r\n\tif (sizex > rcMonitor.width || ox < rcMonitor.x)\r\n\t\tox = rcMonitor.x; /* the best we can do */\r\n\telse if (ox + sizex > rcMonitor.x + rcMonitor.width)\r\n\t\tox = rcMonitor.x + rcMonitor.width - sizex;\r\n\tif (sizey > rcMonitor.height || oy < rcMonitor.y)\r\n\t\toy = rcMonitor.y;\r\n\telse if (oy + sizey > rcMonitor.y + rcMonitor.height)\r\n\t\toy = rcMonitor.y + rcMonitor.height - sizey;\r\n\r\n\tgtk_window_move(GTK_WINDOW(PWidget(wid)), ox, oy);\r\n\r\n\tgtk_window_resize(GTK_WINDOW(wid), sizex, sizey);\r\n}\r\n\r\nPRectangle Window::GetClientPosition() const {\r\n\t// On GTK+, the client position is the window position\r\n\treturn GetPosition();\r\n}\r\n\r\nvoid Window::Show(bool show) {\r\n\tif (show)\r\n\t\tgtk_widget_show(PWidget(wid));\r\n}\r\n\r\nvoid Window::InvalidateAll() {\r\n\tif (wid) {\r\n\t\tgtk_widget_queue_draw(PWidget(wid));\r\n\t}\r\n}\r\n\r\nvoid Window::InvalidateRectangle(PRectangle rc) {\r\n\tif (wid) {\r\n\t\tconst IntegerRectangle irc(rc);\r\n\t\tgtk_widget_queue_draw_area(PWidget(wid),\r\n\t\t\t\t\t   irc.left, irc.top,\r\n\t\t\t\t\t   irc.Width(), irc.Height());\r\n\t}\r\n}\r\n\r\nvoid Window::SetCursor(Cursor curs) {\r\n\t// We don't set the cursor to same value numerous times under gtk because\r\n\t// it stores the cursor in the window once it's set\r\n\tif (curs == cursorLast)\r\n\t\treturn;\r\n\r\n\tcursorLast = curs;\r\n\tGdkDisplay *pdisplay = gtk_widget_get_display(PWidget(wid));\r\n\r\n\tGdkCursor *gdkCurs;\r\n\tswitch (curs) {\r\n\tcase Cursor::text:\r\n\t\tgdkCurs = gdk_cursor_new_for_display(pdisplay, GDK_XTERM);\r\n\t\tbreak;\r\n\tcase Cursor::arrow:\r\n\t\tgdkCurs = gdk_cursor_new_for_display(pdisplay, GDK_LEFT_PTR);\r\n\t\tbreak;\r\n\tcase Cursor::up:\r\n\t\tgdkCurs = gdk_cursor_new_for_display(pdisplay, GDK_CENTER_PTR);\r\n\t\tbreak;\r\n\tcase Cursor::wait:\r\n\t\tgdkCurs = gdk_cursor_new_for_display(pdisplay, GDK_WATCH);\r\n\t\tbreak;\r\n\tcase Cursor::hand:\r\n\t\tgdkCurs = gdk_cursor_new_for_display(pdisplay, GDK_HAND2);\r\n\t\tbreak;\r\n\tcase Cursor::reverseArrow:\r\n\t\tgdkCurs = gdk_cursor_new_for_display(pdisplay, GDK_RIGHT_PTR);\r\n\t\tbreak;\r\n\tdefault:\r\n\t\tgdkCurs = gdk_cursor_new_for_display(pdisplay, GDK_LEFT_PTR);\r\n\t\tcursorLast = Cursor::arrow;\r\n\t\tbreak;\r\n\t}\r\n\r\n\tif (WindowFromWidget(PWidget(wid)))\r\n\t\tgdk_window_set_cursor(WindowFromWidget(PWidget(wid)), gdkCurs);\r\n\tUnRefCursor(gdkCurs);\r\n}\r\n\r\n/* Returns rectangle of monitor pt is on, both rect and pt are in Window's\r\n   gdk window coordinates */\r\nPRectangle Window::GetMonitorRect(Point pt) {\r\n\tgint x_offset, y_offset;\r\n\r\n\tgdk_window_get_origin(WindowFromWidget(PWidget(wid)), &x_offset, &y_offset);\r\n\r\n\tGdkRectangle rect {};\r\n\r\n#if GTK_CHECK_VERSION(3,22,0)\r\n\tGdkDisplay *pdisplay = gtk_widget_get_display(PWidget(wid));\r\n\tGdkMonitor *monitor = gdk_display_get_monitor_at_point(pdisplay,\r\n\t\t\t      pt.x + x_offset, pt.y + y_offset);\r\n\tgdk_monitor_get_geometry(monitor, &rect);\r\n#else\r\n\tGdkScreen *screen = gtk_widget_get_screen(PWidget(wid));\r\n\tconst gint monitor_num = gdk_screen_get_monitor_at_point(screen,\r\n\t\t\t\t static_cast<gint>(pt.x) + x_offset, static_cast<gint>(pt.y) + y_offset);\r\n\tgdk_screen_get_monitor_geometry(screen, monitor_num, &rect);\r\n#endif\r\n\trect.x -= x_offset;\r\n\trect.y -= y_offset;\r\n\treturn PRectangle::FromInts(rect.x, rect.y, rect.x + rect.width, rect.y + rect.height);\r\n}\r\n\r\ntypedef std::map<int, RGBAImage *> ImageMap;\r\n\r\nstruct ListImage {\r\n\tconst RGBAImage *rgba_data;\r\n\tGdkPixbuf *pixbuf;\r\n};\r\n\r\nstatic void list_image_free(gpointer, gpointer value, gpointer) noexcept {\r\n\tListImage *list_image = static_cast<ListImage *>(value);\r\n\tif (list_image->pixbuf)\r\n\t\tg_object_unref(list_image->pixbuf);\r\n\tg_free(list_image);\r\n}\r\n\r\nListBox::ListBox() noexcept {\r\n}\r\n\r\nListBox::~ListBox() noexcept {\r\n}\r\n\r\nenum {\r\n\tPIXBUF_COLUMN,\r\n\tTEXT_COLUMN,\r\n\tN_COLUMNS\r\n};\r\n\r\nclass ListBoxX : public ListBox {\r\n\tWindowID widCached;\r\n\tWindowID frame;\r\n\tWindowID list;\r\n\tWindowID scroller;\r\n\tGHashTable *pixhash;\r\n\tGtkCellRenderer *pixbuf_renderer;\r\n\tGtkCellRenderer *renderer;\r\n\tRGBAImageSet images;\r\n\tint desiredVisibleRows;\r\n\tunsigned int maxItemCharacters;\r\n\tunsigned int aveCharWidth;\r\n#if GTK_CHECK_VERSION(3,0,0)\r\n\tstd::unique_ptr<GtkCssProvider, GObjectReleaser> cssProvider;\r\n#endif\r\npublic:\r\n\tIListBoxDelegate *delegate;\r\n\r\n\tListBoxX() noexcept : widCached(nullptr), frame(nullptr), list(nullptr), scroller(nullptr),\r\n\t\tpixhash(nullptr), pixbuf_renderer(nullptr),\r\n\t\trenderer(nullptr),\r\n\t\tdesiredVisibleRows(5), maxItemCharacters(0),\r\n\t\taveCharWidth(1),\r\n\t\tdelegate(nullptr) {\r\n\t}\r\n\t// Deleted so ListBoxX objects can not be copied.\r\n\tListBoxX(const ListBoxX&) = delete;\r\n\tListBoxX(ListBoxX&&) = delete;\r\n\tListBoxX&operator=(const ListBoxX&) = delete;\r\n\tListBoxX&operator=(ListBoxX&&) = delete;\r\n\t~ListBoxX() noexcept override {\r\n\t\tif (pixhash) {\r\n\t\t\tg_hash_table_foreach(pixhash, list_image_free, nullptr);\r\n\t\t\tg_hash_table_destroy(pixhash);\r\n\t\t}\r\n\t\tif (widCached) {\r\n\t\t\tgtk_widget_destroy(GTK_WIDGET(widCached));\r\n\t\t\twid = widCached = nullptr;\r\n\t\t}\r\n\t}\r\n\tvoid SetFont(const Font *font) override;\r\n\tvoid Create(Window &parent, int ctrlID, Point location_, int lineHeight_, bool unicodeMode_, Technology technology_) override;\r\n\tvoid SetAverageCharWidth(int width) override;\r\n\tvoid SetVisibleRows(int rows) override;\r\n\tint GetVisibleRows() const override;\r\n\tint GetRowHeight();\r\n\tPRectangle GetDesiredRect() override;\r\n\tint CaretFromEdge() override;\r\n\tvoid Clear() noexcept override;\r\n\tvoid Append(char *s, int type = -1) override;\r\n\tint Length() override;\r\n\tvoid Select(int n) override;\r\n\tint GetSelection() override;\r\n\tint Find(const char *prefix) override;\r\n\tstd::string GetValue(int n) override;\r\n\tvoid RegisterRGBA(int type, std::unique_ptr<RGBAImage> image);\r\n\tvoid RegisterImage(int type, const char *xpm_data) override;\r\n\tvoid RegisterRGBAImage(int type, int width, int height, const unsigned char *pixelsImage) override;\r\n\tvoid ClearRegisteredImages() override;\r\n\tvoid SetDelegate(IListBoxDelegate *lbDelegate) override;\r\n\tvoid SetList(const char *listText, char separator, char typesep) override;\r\n\tvoid SetOptions(ListOptions options_) override;\r\n};\r\n\r\nstd::unique_ptr<ListBox> ListBox::Allocate() {\r\n\treturn std::make_unique<ListBoxX>();\r\n}\r\n\r\nstatic int treeViewGetRowHeight(GtkTreeView *view) {\r\n#if GTK_CHECK_VERSION(3,0,0)\r\n\t// This version sometimes reports erroneous results on GTK2, but the GTK2\r\n\t// version is inaccurate for GTK 3.14.\r\n\tGdkRectangle rect;\r\n\tGtkTreePath *path = gtk_tree_path_new_first();\r\n\tgtk_tree_view_get_background_area(view, path, nullptr, &rect);\r\n\tgtk_tree_path_free(path);\r\n\treturn rect.height;\r\n#else\r\n\tint row_height=0;\r\n\tint vertical_separator=0;\r\n\tint expander_size=0;\r\n\tGtkTreeViewColumn *column = gtk_tree_view_get_column(view, 0);\r\n\tgtk_tree_view_column_cell_get_size(column, nullptr, nullptr, nullptr, nullptr, &row_height);\r\n\tgtk_widget_style_get(GTK_WIDGET(view),\r\n\t\t\t     \"vertical-separator\", &vertical_separator,\r\n\t\t\t     \"expander-size\", &expander_size, nullptr);\r\n\trow_height += vertical_separator;\r\n\trow_height = std::max(row_height, expander_size);\r\n\treturn row_height;\r\n#endif\r\n}\r\n\r\n// SmallScroller, a GtkScrolledWindow that can shrink very small, as\r\n// gtk_widget_set_size_request() cannot shrink widgets on GTK3\r\ntypedef struct {\r\n\tGtkScrolledWindow parent;\r\n\t/* Workaround ABI issue with Windows GTK2 bundle and GCC > 3.\r\n\t   See http://lists.geany.org/pipermail/devel/2015-April/thread.html#9379\r\n\r\n\t   GtkScrolledWindow contains a bitfield, and GCC 3.4 and 4.8 don't agree\r\n\t   on the size of the structure (regardless of -mms-bitfields):\r\n\t   - GCC 3.4 has sizeof(GtkScrolledWindow)=88\r\n\t   - GCC 4.8 has sizeof(GtkScrolledWindow)=84\r\n\t   As Windows GTK2 bundle is built with GCC 3, it requires types derived\r\n\t   from GtkScrolledWindow to be at least 88 bytes, which means we need to\r\n\t   add some fake padding to fill in the extra 4 bytes.\r\n\t   There is however no other issue with the layout difference as we never\r\n\t   access any GtkScrolledWindow fields ourselves. */\r\n\tint padding;\r\n} SmallScroller;\r\ntypedef GtkScrolledWindowClass SmallScrollerClass;\r\n\r\nG_DEFINE_TYPE(SmallScroller, small_scroller, GTK_TYPE_SCROLLED_WINDOW)\r\n\r\n#if GTK_CHECK_VERSION(3,0,0)\r\nstatic void small_scroller_get_preferred_height(GtkWidget *widget, gint *min, gint *nat) {\r\n\tGtkWidget *child = gtk_bin_get_child(GTK_BIN(widget));\r\n\tif (GTK_IS_TREE_VIEW(child)) {\r\n\t\tGtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(child));\r\n\t\tint n_rows = gtk_tree_model_iter_n_children(model, nullptr);\r\n\t\tint row_height = treeViewGetRowHeight(GTK_TREE_VIEW(child));\r\n\r\n\t\t*min = MAX(1, row_height);\r\n\t\t*nat = MAX(*min, n_rows * row_height);\r\n\t} else {\r\n\t\tGTK_WIDGET_CLASS(small_scroller_parent_class)->get_preferred_height(widget, min, nat);\r\n\t\tif (*min > 1)\r\n\t\t\t*min = 1;\r\n\t}\r\n}\r\n#else\r\nstatic void small_scroller_size_request(GtkWidget *widget, GtkRequisition *req) {\r\n\tGTK_WIDGET_CLASS(small_scroller_parent_class)->size_request(widget, req);\r\n\treq->height = 1;\r\n}\r\n#endif\r\n\r\nstatic void small_scroller_class_init(SmallScrollerClass *klass) {\r\n#if GTK_CHECK_VERSION(3,0,0)\r\n\tGTK_WIDGET_CLASS(klass)->get_preferred_height = small_scroller_get_preferred_height;\r\n#else\r\n\tGTK_WIDGET_CLASS(klass)->size_request = small_scroller_size_request;\r\n#endif\r\n}\r\n\r\nstatic void small_scroller_init(SmallScroller *) {}\r\n\r\nstatic gboolean ButtonPress(GtkWidget *, const GdkEventButton *ev, gpointer p) {\r\n\ttry {\r\n\t\tListBoxX *lb = static_cast<ListBoxX *>(p);\r\n\t\tif (ev->type == GDK_2BUTTON_PRESS && lb->delegate) {\r\n\t\t\tListBoxEvent event(ListBoxEvent::EventType::doubleClick);\r\n\t\t\tlb->delegate->ListNotify(&event);\r\n\t\t\treturn TRUE;\r\n\t\t}\r\n\r\n\t} catch (...) {\r\n\t\t// No pointer back to Scintilla to save status\r\n\t}\r\n\treturn FALSE;\r\n}\r\n\r\nstatic gboolean ButtonRelease(GtkWidget *, const GdkEventButton *ev, gpointer p) {\r\n\ttry {\r\n\t\tListBoxX *lb = static_cast<ListBoxX *>(p);\r\n\t\tif (ev->type != GDK_2BUTTON_PRESS && lb->delegate) {\r\n\t\t\tListBoxEvent event(ListBoxEvent::EventType::selectionChange);\r\n\t\t\tlb->delegate->ListNotify(&event);\r\n\t\t\treturn TRUE;\r\n\t\t}\r\n\t} catch (...) {\r\n\t\t// No pointer back to Scintilla to save status\r\n\t}\r\n\treturn FALSE;\r\n}\r\n\r\n/* Change the active colour to the selected colour so the listbox uses the colour\r\nscheme that it would use if it had the focus. */\r\nstatic void StyleSet(GtkWidget *w, GtkStyle *, void *) {\r\n\r\n\tg_return_if_fail(w != nullptr);\r\n\r\n\t/* Copy the selected colour to active.  Note that the modify calls will cause\r\n\trecursive calls to this function after the value is updated and w->style to\r\n\tbe set to a new object */\r\n\r\n#if GTK_CHECK_VERSION(3,16,0)\r\n\t// On recent releases of GTK+, it does not appear necessary to set the list box colours.\r\n\t// This may be because of common themes and may be needed with other themes.\r\n\t// The *override* calls are deprecated now, so only call them for older versions of GTK+.\r\n#elif GTK_CHECK_VERSION(3,0,0)\r\n\tGtkStyleContext *styleContext = gtk_widget_get_style_context(w);\r\n\tif (styleContext == nullptr)\r\n\t\treturn;\r\n\r\n\tGdkRGBA colourForeSelected;\r\n\tgtk_style_context_get_color(styleContext, GTK_STATE_FLAG_SELECTED, &colourForeSelected);\r\n\tGdkRGBA colourForeActive;\r\n\tgtk_style_context_get_color(styleContext, GTK_STATE_FLAG_ACTIVE, &colourForeActive);\r\n\tif (!gdk_rgba_equal(&colourForeSelected, &colourForeActive))\r\n\t\tgtk_widget_override_color(w, GTK_STATE_FLAG_ACTIVE, &colourForeSelected);\r\n\r\n\tstyleContext = gtk_widget_get_style_context(w);\r\n\tif (styleContext == nullptr)\r\n\t\treturn;\r\n\r\n\tGdkRGBA colourBaseSelected;\r\n\tgtk_style_context_get_background_color(styleContext, GTK_STATE_FLAG_SELECTED, &colourBaseSelected);\r\n\tGdkRGBA colourBaseActive;\r\n\tgtk_style_context_get_background_color(styleContext, GTK_STATE_FLAG_ACTIVE, &colourBaseActive);\r\n\tif (!gdk_rgba_equal(&colourBaseSelected, &colourBaseActive))\r\n\t\tgtk_widget_override_background_color(w, GTK_STATE_FLAG_ACTIVE, &colourBaseSelected);\r\n#else\r\n\tGtkStyle *style = gtk_widget_get_style(w);\r\n\tif (style == nullptr)\r\n\t\treturn;\r\n\tif (!gdk_color_equal(&style->base[GTK_STATE_SELECTED], &style->base[GTK_STATE_ACTIVE]))\r\n\t\tgtk_widget_modify_base(w, GTK_STATE_ACTIVE, &style->base[GTK_STATE_SELECTED]);\r\n\tstyle = gtk_widget_get_style(w);\r\n\tif (style == nullptr)\r\n\t\treturn;\r\n\tif (!gdk_color_equal(&style->text[GTK_STATE_SELECTED], &style->text[GTK_STATE_ACTIVE]))\r\n\t\tgtk_widget_modify_text(w, GTK_STATE_ACTIVE, &style->text[GTK_STATE_SELECTED]);\r\n#endif\r\n}\r\n\r\nvoid ListBoxX::Create(Window &parent, int, Point, int, bool, Technology) {\r\n\tif (widCached != nullptr) {\r\n\t\twid = widCached;\r\n\t\treturn;\r\n\t}\r\n\r\n#if GTK_CHECK_VERSION(3,0,0)\r\n\tif (!cssProvider) {\r\n\t\tcssProvider.reset(gtk_css_provider_new());\r\n\t}\r\n#endif\r\n\r\n\twid = widCached = gtk_window_new(GTK_WINDOW_POPUP);\r\n\tgtk_window_set_type_hint(GTK_WINDOW(wid), GDK_WINDOW_TYPE_HINT_POPUP_MENU);\r\n\r\n\tframe = gtk_frame_new(nullptr);\r\n\tgtk_widget_show(PWidget(frame));\r\n\tgtk_container_add(GTK_CONTAINER(GetID()), PWidget(frame));\r\n\tgtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_OUT);\r\n\tgtk_container_set_border_width(GTK_CONTAINER(frame), 0);\r\n\r\n\tscroller = g_object_new(small_scroller_get_type(), nullptr);\r\n\tgtk_container_set_border_width(GTK_CONTAINER(scroller), 0);\r\n\tgtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scroller),\r\n\t\t\t\t       GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);\r\n\tgtk_container_add(GTK_CONTAINER(frame), PWidget(scroller));\r\n\tgtk_widget_show(PWidget(scroller));\r\n\r\n\t/* Tree and its model */\r\n\tGtkListStore *store =\r\n\t\tgtk_list_store_new(N_COLUMNS, GDK_TYPE_PIXBUF, G_TYPE_STRING);\r\n\r\n\tlist = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store));\r\n\tg_signal_connect(G_OBJECT(list), \"style-set\", G_CALLBACK(StyleSet), nullptr);\r\n\r\n#if GTK_CHECK_VERSION(3,0,0)\r\n\tGtkStyleContext *styleContext = gtk_widget_get_style_context(GTK_WIDGET(list));\r\n\tif (styleContext) {\r\n\t\tgtk_style_context_add_provider(styleContext, GTK_STYLE_PROVIDER(cssProvider.get()),\r\n\t\t\t\t\t       GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);\r\n\t}\r\n#endif\r\n\r\n\tGtkTreeSelection *selection =\r\n\t\tgtk_tree_view_get_selection(GTK_TREE_VIEW(list));\r\n\tgtk_tree_selection_set_mode(selection, GTK_SELECTION_SINGLE);\r\n\tgtk_tree_view_set_headers_visible(GTK_TREE_VIEW(list), FALSE);\r\n\tgtk_tree_view_set_reorderable(GTK_TREE_VIEW(list), FALSE);\r\n\r\n\t/* Columns */\r\n\tGtkTreeViewColumn *column = gtk_tree_view_column_new();\r\n\tgtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED);\r\n\tgtk_tree_view_column_set_title(column, \"Autocomplete\");\r\n\r\n\tpixbuf_renderer = gtk_cell_renderer_pixbuf_new();\r\n\tgtk_cell_renderer_set_fixed_size(pixbuf_renderer, 0, -1);\r\n\tgtk_tree_view_column_pack_start(column, pixbuf_renderer, FALSE);\r\n\tgtk_tree_view_column_add_attribute(column, pixbuf_renderer,\r\n\t\t\t\t\t   \"pixbuf\", PIXBUF_COLUMN);\r\n\r\n\trenderer = gtk_cell_renderer_text_new();\r\n\tgtk_cell_renderer_text_set_fixed_height_from_font(GTK_CELL_RENDERER_TEXT(renderer), 1);\r\n\tgtk_tree_view_column_pack_start(column, renderer, TRUE);\r\n\tgtk_tree_view_column_add_attribute(column, renderer,\r\n\t\t\t\t\t   \"text\", TEXT_COLUMN);\r\n\r\n\tgtk_tree_view_append_column(GTK_TREE_VIEW(list), column);\r\n\tif (g_object_class_find_property(G_OBJECT_GET_CLASS(list), \"fixed-height-mode\"))\r\n\t\tg_object_set(G_OBJECT(list), \"fixed-height-mode\", TRUE, nullptr);\r\n\r\n\tGtkWidget *widget = PWidget(list);\t// No code inside the G_OBJECT macro\r\n\tgtk_container_add(GTK_CONTAINER(PWidget(scroller)), widget);\r\n\tgtk_widget_show(widget);\r\n\tg_signal_connect(G_OBJECT(widget), \"button_press_event\",\r\n\t\t\t G_CALLBACK(ButtonPress), this);\r\n\tg_signal_connect(G_OBJECT(widget), \"button_release_event\",\r\n\t\t\t G_CALLBACK(ButtonRelease), this);\r\n\r\n\tGtkWidget *top = gtk_widget_get_toplevel(static_cast<GtkWidget *>(parent.GetID()));\r\n\tgtk_window_set_transient_for(GTK_WINDOW(static_cast<GtkWidget *>(wid)),\r\n\t\t\t\t     GTK_WINDOW(top));\r\n}\r\n\r\nvoid ListBoxX::SetFont(const Font *font) {\r\n\t// Only do for Pango font as there have been crashes for GDK fonts\r\n\tif (Created() && PFont(font)->fd) {\r\n\t\t// Current font is Pango font\r\n#if GTK_CHECK_VERSION(3,0,0)\r\n\t\tif (cssProvider) {\r\n\t\t\tPangoFontDescription *pfd = PFont(font)->fd.get();\r\n\t\t\tstd::ostringstream ssFontSetting;\r\n\t\t\tssFontSetting << \"GtkTreeView, treeview { \";\r\n\t\t\tssFontSetting << \"font-family: \" << pango_font_description_get_family(pfd) <<  \"; \";\r\n\t\t\tssFontSetting << \"font-size:\";\r\n\t\t\tssFontSetting << static_cast<double>(pango_font_description_get_size(pfd)) / PANGO_SCALE;\r\n\t\t\t// On GTK < 3.21.0 the units are incorrectly parsed, so a font size in points\r\n\t\t\t// need to use the \"px\" unit.  Normally we only get fonts in points here, so\r\n\t\t\t// don't bother to handle the case the font is actually in pixels on < 3.21.0.\r\n\t\t\tif (gtk_check_version(3, 21, 0) != nullptr || // on < 3.21.0\r\n\t\t\t\t\tpango_font_description_get_size_is_absolute(pfd)) {\r\n\t\t\t\tssFontSetting << \"px; \";\r\n\t\t\t} else {\r\n\t\t\t\tssFontSetting << \"pt; \";\r\n\t\t\t}\r\n\t\t\tssFontSetting << \"font-weight:\"<< pango_font_description_get_weight(pfd) << \"; \";\r\n\t\t\tssFontSetting << \"}\";\r\n\t\t\tgtk_css_provider_load_from_data(GTK_CSS_PROVIDER(cssProvider.get()),\r\n\t\t\t\t\t\t\tssFontSetting.str().c_str(), -1, nullptr);\r\n\t\t}\r\n#else\r\n\t\tgtk_widget_modify_font(PWidget(list), PFont(font)->fd.get());\r\n#endif\r\n\t\tgtk_cell_renderer_text_set_fixed_height_from_font(GTK_CELL_RENDERER_TEXT(renderer), -1);\r\n\t\tgtk_cell_renderer_text_set_fixed_height_from_font(GTK_CELL_RENDERER_TEXT(renderer), 1);\r\n\t}\r\n}\r\n\r\nvoid ListBoxX::SetAverageCharWidth(int width) {\r\n\taveCharWidth = width;\r\n}\r\n\r\nvoid ListBoxX::SetVisibleRows(int rows) {\r\n\tdesiredVisibleRows = rows;\r\n}\r\n\r\nint ListBoxX::GetVisibleRows() const {\r\n\treturn desiredVisibleRows;\r\n}\r\n\r\nint ListBoxX::GetRowHeight() {\r\n\treturn treeViewGetRowHeight(GTK_TREE_VIEW(list));\r\n}\r\n\r\nPRectangle ListBoxX::GetDesiredRect() {\r\n\t// Before any size allocated pretend its 100 wide so not scrolled\r\n\tPRectangle rc(0, 0, 100, 100);\r\n\tif (wid) {\r\n\t\tint rows = Length();\r\n\t\tif ((rows == 0) || (rows > desiredVisibleRows))\r\n\t\t\trows = desiredVisibleRows;\r\n\r\n\t\tGtkRequisition req;\r\n\t\t// This, apparently unnecessary call, ensures gtk_tree_view_column_cell_get_size\r\n\t\t// returns reasonable values.\r\n#if GTK_CHECK_VERSION(3,0,0)\r\n\t\tgtk_widget_get_preferred_size(GTK_WIDGET(frame), nullptr, &req);\r\n#else\r\n\t\tgtk_widget_size_request(GTK_WIDGET(frame), &req);\r\n#endif\r\n\t\tint height;\r\n\r\n\t\t// First calculate height of the clist for our desired visible\r\n\t\t// row count otherwise it tries to expand to the total # of rows\r\n\t\t// Get cell height\r\n\t\tconst int row_height = GetRowHeight();\r\n#if GTK_CHECK_VERSION(3,0,0)\r\n\t\tGtkStyleContext *styleContextFrame = gtk_widget_get_style_context(PWidget(frame));\r\n\t\tGtkStateFlags stateFlagsFrame = gtk_style_context_get_state(styleContextFrame);\r\n\t\tGtkBorder padding, border, border_border = { 0, 0, 0, 0 };\r\n\t\tgtk_style_context_get_padding(styleContextFrame, stateFlagsFrame, &padding);\r\n\t\tgtk_style_context_get_border(styleContextFrame, stateFlagsFrame, &border);\r\n\r\n#\tif GTK_CHECK_VERSION(3,20,0)\r\n\t\t// on GTK 3.20 the frame border is in a sub-node \"border\".\r\n\t\t// Unfortunately we need to be built against 3.20 to be able to support this, as it requires\r\n\t\t// new API.\r\n\t\tGtkStyleContext *styleContextFrameBorder = gtk_style_context_new();\r\n\t\tGtkWidgetPath *widget_path = gtk_widget_path_copy(gtk_style_context_get_path(styleContextFrame));\r\n\t\tgtk_widget_path_append_type(widget_path, GTK_TYPE_BORDER); // dummy type\r\n\t\tgtk_widget_path_iter_set_object_name(widget_path, -1, \"border\");\r\n\t\tgtk_style_context_set_path(styleContextFrameBorder, widget_path);\r\n\t\tgtk_widget_path_free(widget_path);\r\n\t\tgtk_style_context_get_border(styleContextFrameBorder, stateFlagsFrame, &border_border);\r\n\t\tg_object_unref(styleContextFrameBorder);\r\n#\telse // < 3.20\r\n\t\tif (gtk_check_version(3, 20, 0) == nullptr) {\r\n\t\t\t// default to 1px all around as it's likely what it is, and so we don't miss 2px height\r\n\t\t\t// on GTK 3.20 when built against an earlier version.\r\n\t\t\tborder_border.top = border_border.bottom = border_border.left = border_border.right = 1;\r\n\t\t}\r\n#\tendif\r\n\r\n\t\theight = (rows * row_height\r\n\t\t\t  + padding.top + padding.bottom\r\n\t\t\t  + border.top + border.bottom\r\n\t\t\t  + border_border.top + border_border.bottom\r\n\t\t\t  + 2 * gtk_container_get_border_width(GTK_CONTAINER(PWidget(list))));\r\n#else\r\n\t\theight = (rows * row_height\r\n\t\t\t  + 2 * (PWidget(frame)->style->ythickness\r\n\t\t\t\t + GTK_CONTAINER(PWidget(list))->border_width));\r\n#endif\r\n\t\trc.bottom = height;\r\n\r\n\t\tconst unsigned int width = std::max(maxItemCharacters, 12U);\r\n\t\trc.right = width * (aveCharWidth + aveCharWidth / 3);\r\n\t\t// Add horizontal padding and borders\r\n\t\tint horizontal_separator=0;\r\n\t\tgtk_widget_style_get(PWidget(list),\r\n\t\t\t\t     \"horizontal-separator\", &horizontal_separator, nullptr);\r\n\t\trc.right += horizontal_separator;\r\n#if GTK_CHECK_VERSION(3,0,0)\r\n\t\trc.right += (padding.left + padding.right\r\n\t\t\t     + border.left + border.right\r\n\t\t\t     + border_border.left + border_border.right\r\n\t\t\t     + 2 * gtk_container_get_border_width(GTK_CONTAINER(PWidget(list))));\r\n#else\r\n\t\trc.right += 2 * (PWidget(frame)->style->xthickness\r\n\t\t\t\t + GTK_CONTAINER(PWidget(list))->border_width);\r\n#endif\r\n\t\tif (Length() > rows) {\r\n\t\t\t// Add the width of the scrollbar\r\n\t\t\tGtkWidget *vscrollbar =\r\n\t\t\t\tgtk_scrolled_window_get_vscrollbar(GTK_SCROLLED_WINDOW(scroller));\r\n#if GTK_CHECK_VERSION(3,0,0)\r\n\t\t\tgtk_widget_get_preferred_size(vscrollbar, nullptr, &req);\r\n#else\r\n\t\t\tgtk_widget_size_request(vscrollbar, &req);\r\n#endif\r\n\t\t\trc.right += req.width;\r\n\t\t}\r\n\t}\r\n\treturn rc;\r\n}\r\n\r\nint ListBoxX::CaretFromEdge() {\r\n\tgint renderer_width, renderer_height;\r\n\tgtk_cell_renderer_get_fixed_size(pixbuf_renderer, &renderer_width,\r\n\t\t\t\t\t &renderer_height);\r\n\treturn 4 + renderer_width;\r\n}\r\n\r\nvoid ListBoxX::Clear() noexcept {\r\n\tGtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(list));\r\n\tgtk_list_store_clear(GTK_LIST_STORE(model));\r\n\tmaxItemCharacters = 0;\r\n}\r\n\r\nstatic void init_pixmap(ListImage *list_image) noexcept {\r\n\tif (list_image->rgba_data) {\r\n\t\t// Drop any existing pixmap/bitmap as data may have changed\r\n\t\tif (list_image->pixbuf)\r\n\t\t\tg_object_unref(list_image->pixbuf);\r\n\t\tlist_image->pixbuf =\r\n\t\t\tgdk_pixbuf_new_from_data(list_image->rgba_data->Pixels(),\r\n\t\t\t\t\t\t GDK_COLORSPACE_RGB,\r\n\t\t\t\t\t\t TRUE,\r\n\t\t\t\t\t\t 8,\r\n\t\t\t\t\t\t list_image->rgba_data->GetWidth(),\r\n\t\t\t\t\t\t list_image->rgba_data->GetHeight(),\r\n\t\t\t\t\t\t list_image->rgba_data->GetWidth() * 4,\r\n\t\t\t\t\t\t nullptr,\r\n\t\t\t\t\t\t nullptr);\r\n\t}\r\n}\r\n\r\n#define SPACING 5\r\n\r\nvoid ListBoxX::Append(char *s, int type) {\r\n\tListImage *list_image = nullptr;\r\n\tif ((type >= 0) && pixhash) {\r\n\t\tlist_image = static_cast<ListImage *>(g_hash_table_lookup(pixhash,\r\n\t\t\t\t\t\t      GINT_TO_POINTER(type)));\r\n\t}\r\n\tGtkTreeIter iter {};\r\n\tGtkListStore *store =\r\n\t\tGTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(list)));\r\n\tgtk_list_store_append(GTK_LIST_STORE(store), &iter);\r\n\tif (list_image) {\r\n\t\tif (nullptr == list_image->pixbuf)\r\n\t\t\tinit_pixmap(list_image);\r\n\t\tif (list_image->pixbuf) {\r\n\t\t\tgtk_list_store_set(GTK_LIST_STORE(store), &iter,\r\n\t\t\t\t\t   PIXBUF_COLUMN, list_image->pixbuf,\r\n\t\t\t\t\t   TEXT_COLUMN, s, -1);\r\n\r\n\t\t\tconst gint pixbuf_width = gdk_pixbuf_get_width(list_image->pixbuf);\r\n\t\t\tgint renderer_height, renderer_width;\r\n\t\t\tgtk_cell_renderer_get_fixed_size(pixbuf_renderer,\r\n\t\t\t\t\t\t\t &renderer_width, &renderer_height);\r\n\t\t\tif (pixbuf_width > renderer_width)\r\n\t\t\t\tgtk_cell_renderer_set_fixed_size(pixbuf_renderer,\r\n\t\t\t\t\t\t\t\t pixbuf_width, -1);\r\n\t\t} else {\r\n\t\t\tgtk_list_store_set(GTK_LIST_STORE(store), &iter,\r\n\t\t\t\t\t   TEXT_COLUMN, s, -1);\r\n\t\t}\r\n\t} else {\r\n\t\tgtk_list_store_set(GTK_LIST_STORE(store), &iter,\r\n\t\t\t\t   TEXT_COLUMN, s, -1);\r\n\t}\r\n\tconst unsigned int len = static_cast<unsigned int>(strlen(s));\r\n\tif (maxItemCharacters < len)\r\n\t\tmaxItemCharacters = len;\r\n}\r\n\r\nint ListBoxX::Length() {\r\n\tif (wid)\r\n\t\treturn gtk_tree_model_iter_n_children(gtk_tree_view_get_model\r\n\t\t\t\t\t\t      (GTK_TREE_VIEW(list)), nullptr);\r\n\treturn 0;\r\n}\r\n\r\nvoid ListBoxX::Select(int n) {\r\n\tGtkTreeIter iter {};\r\n\tGtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(list));\r\n\tGtkTreeSelection *selection =\r\n\t\tgtk_tree_view_get_selection(GTK_TREE_VIEW(list));\r\n\r\n\tif (n < 0) {\r\n\t\tgtk_tree_selection_unselect_all(selection);\r\n\t\treturn;\r\n\t}\r\n\r\n\tconst bool valid = gtk_tree_model_iter_nth_child(model, &iter, nullptr, n) != FALSE;\r\n\tif (valid) {\r\n\t\tgtk_tree_selection_select_iter(selection, &iter);\r\n\r\n\t\t// Move the scrollbar to show the selection.\r\n\t\tconst int total = Length();\r\n#if GTK_CHECK_VERSION(3,0,0)\r\n\t\tGtkAdjustment *adj =\r\n\t\t\tgtk_scrollable_get_vadjustment(GTK_SCROLLABLE(list));\r\n#else\r\n\t\tGtkAdjustment *adj =\r\n\t\t\tgtk_tree_view_get_vadjustment(GTK_TREE_VIEW(list));\r\n#endif\r\n\t\tgdouble value = (static_cast<gdouble>(n) / total) * (gtk_adjustment_get_upper(adj) - gtk_adjustment_get_lower(adj))\r\n\t\t\t       + gtk_adjustment_get_lower(adj) - gtk_adjustment_get_page_size(adj) / 2;\r\n\t\t// Get cell height\r\n\t\tconst int row_height = GetRowHeight();\r\n\r\n\t\tint rows = Length();\r\n\t\tif ((rows == 0) || (rows > desiredVisibleRows))\r\n\t\t\trows = desiredVisibleRows;\r\n\t\tif (rows & 0x1) {\r\n\t\t\t// Odd rows to display -- We are now in the middle.\r\n\t\t\t// Align it so that we don't chop off rows.\r\n\t\t\tvalue += static_cast<gfloat>(row_height) / 2.0f;\r\n\t\t}\r\n\t\t// Clamp it.\r\n\t\tvalue = (value < 0)? 0 : value;\r\n\t\tvalue = (value > (gtk_adjustment_get_upper(adj) - gtk_adjustment_get_page_size(adj)))?\r\n\t\t\t(gtk_adjustment_get_upper(adj) - gtk_adjustment_get_page_size(adj)) : value;\r\n\r\n\t\t// Set it.\r\n\t\tgtk_adjustment_set_value(adj, value);\r\n\t} else {\r\n\t\tgtk_tree_selection_unselect_all(selection);\r\n\t}\r\n\r\n\tif (delegate) {\r\n\t\tListBoxEvent event(ListBoxEvent::EventType::selectionChange);\r\n\t\tdelegate->ListNotify(&event);\r\n\t}\r\n}\r\n\r\nint ListBoxX::GetSelection() {\r\n\tint index = -1;\r\n\tGtkTreeIter iter {};\r\n\tGtkTreeModel *model {};\r\n\tGtkTreeSelection *selection;\r\n\tselection = gtk_tree_view_get_selection(GTK_TREE_VIEW(list));\r\n\tif (gtk_tree_selection_get_selected(selection, &model, &iter)) {\r\n\t\tGtkTreePath *path = gtk_tree_model_get_path(model, &iter);\r\n\t\tconst int *indices = gtk_tree_path_get_indices(path);\r\n\t\t// Don't free indices.\r\n\t\tif (indices)\r\n\t\t\tindex = indices[0];\r\n\t\tgtk_tree_path_free(path);\r\n\t}\r\n\treturn index;\r\n}\r\n\r\nint ListBoxX::Find(const char *prefix) {\r\n\tGtkTreeIter iter {};\r\n\tGtkTreeModel *model =\r\n\t\tgtk_tree_view_get_model(GTK_TREE_VIEW(list));\r\n\tbool valid = gtk_tree_model_get_iter_first(model, &iter) != FALSE;\r\n\tint i = 0;\r\n\twhile (valid) {\r\n\t\tgchar *s = nullptr;\r\n\t\tgtk_tree_model_get(model, &iter, TEXT_COLUMN, &s, -1);\r\n\t\tif (s && (0 == strncmp(prefix, s, strlen(prefix)))) {\r\n\t\t\tg_free(s);\r\n\t\t\treturn i;\r\n\t\t}\r\n\t\tg_free(s);\r\n\t\tvalid = gtk_tree_model_iter_next(model, &iter) != FALSE;\r\n\t\ti++;\r\n\t}\r\n\treturn -1;\r\n}\r\n\r\nstd::string ListBoxX::GetValue(int n) {\r\n\tchar *text = nullptr;\r\n\tGtkTreeIter iter {};\r\n\tGtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(list));\r\n\tconst bool valid = gtk_tree_model_iter_nth_child(model, &iter, nullptr, n) != FALSE;\r\n\tif (valid) {\r\n\t\tgtk_tree_model_get(model, &iter, TEXT_COLUMN, &text, -1);\r\n\t}\r\n\tstd::string value;\r\n\tif (text) {\r\n\t\tvalue = text;\r\n\t}\r\n\tg_free(text);\r\n\treturn value;\r\n}\r\n\r\n// g_return_if_fail causes unnecessary compiler warning in release compile.\r\n#ifdef _MSC_VER\r\n#pragma warning(disable: 4127)\r\n#endif\r\n\r\nvoid ListBoxX::RegisterRGBA(int type, std::unique_ptr<RGBAImage> image) {\r\n\timages.AddImage(type, std::move(image));\r\n\tconst RGBAImage * const observe = images.Get(type);\r\n\r\n\tif (!pixhash) {\r\n\t\tpixhash = g_hash_table_new(g_direct_hash, g_direct_equal);\r\n\t}\r\n\tListImage *list_image = static_cast<ListImage *>(g_hash_table_lookup(pixhash,\r\n\t\t\t\tGINT_TO_POINTER(type)));\r\n\tif (list_image) {\r\n\t\t// Drop icon already registered\r\n\t\tif (list_image->pixbuf)\r\n\t\t\tg_object_unref(list_image->pixbuf);\r\n\t\tlist_image->pixbuf = nullptr;\r\n\t\tlist_image->rgba_data = observe;\r\n\t} else {\r\n\t\tlist_image = g_new0(ListImage, 1);\r\n\t\tlist_image->rgba_data = observe;\r\n\t\tg_hash_table_insert(pixhash, GINT_TO_POINTER(type),\r\n\t\t\t\t    (gpointer) list_image);\r\n\t}\r\n}\r\n\r\nvoid ListBoxX::RegisterImage(int type, const char *xpm_data) {\r\n\tg_return_if_fail(xpm_data);\r\n\tXPM xpmImage(xpm_data);\r\n\tRegisterRGBA(type, std::make_unique<RGBAImage>(xpmImage));\r\n}\r\n\r\nvoid ListBoxX::RegisterRGBAImage(int type, int width, int height, const unsigned char *pixelsImage) {\r\n\tRegisterRGBA(type, std::make_unique<RGBAImage>(width, height, 1.0f, pixelsImage));\r\n}\r\n\r\nvoid ListBoxX::ClearRegisteredImages() {\r\n\timages.Clear();\r\n}\r\n\r\nvoid ListBoxX::SetDelegate(IListBoxDelegate *lbDelegate) {\r\n\tdelegate = lbDelegate;\r\n}\r\n\r\nvoid ListBoxX::SetList(const char *listText, char separator, char typesep) {\r\n\tClear();\r\n\tconst size_t count = strlen(listText) + 1;\r\n\tstd::vector<char> words(listText, listText+count);\r\n\tchar *startword = &words[0];\r\n\tchar *numword = nullptr;\r\n\tint i = 0;\r\n\tfor (; words[i]; i++) {\r\n\t\tif (words[i] == separator) {\r\n\t\t\twords[i] = '\\0';\r\n\t\t\tif (numword)\r\n\t\t\t\t*numword = '\\0';\r\n\t\t\tAppend(startword, numword?atoi(numword + 1):-1);\r\n\t\t\tstartword = &words[0] + i + 1;\r\n\t\t\tnumword = nullptr;\r\n\t\t} else if (words[i] == typesep) {\r\n\t\t\tnumword = &words[0] + i;\r\n\t\t}\r\n\t}\r\n\tif (startword) {\r\n\t\tif (numword)\r\n\t\t\t*numword = '\\0';\r\n\t\tAppend(startword, numword?atoi(numword + 1):-1);\r\n\t}\r\n}\r\n\r\nvoid ListBoxX::SetOptions(ListOptions) {\r\n}\r\n\r\nMenu::Menu() noexcept : mid(nullptr) {}\r\n\r\nvoid Menu::CreatePopUp() {\r\n\tDestroy();\r\n\tmid = gtk_menu_new();\r\n\tg_object_ref_sink(G_OBJECT(mid));\r\n}\r\n\r\nvoid Menu::Destroy() noexcept {\r\n\tif (mid)\r\n\t\tg_object_unref(G_OBJECT(mid));\r\n\tmid = nullptr;\r\n}\r\n\r\n#if !GTK_CHECK_VERSION(3,22,0)\r\nstatic void MenuPositionFunc(GtkMenu *, gint *x, gint *y, gboolean *, gpointer userData) noexcept {\r\n\tconst gint intFromPointer = GPOINTER_TO_INT(userData);\r\n\t*x = intFromPointer & 0xffff;\r\n\t*y = intFromPointer >> 16;\r\n}\r\n#endif\r\n\r\nvoid Menu::Show(Point pt, const Window &w) {\r\n\tGtkMenu *widget = static_cast<GtkMenu *>(mid);\r\n\tgtk_widget_show_all(GTK_WIDGET(widget));\r\n#if GTK_CHECK_VERSION(3,22,0)\r\n\t// Rely on GTK+ to do the right thing with positioning\r\n\tgtk_menu_popup_at_pointer(widget, nullptr);\r\n#else\r\n\tconst GdkRectangle rcMonitor = MonitorRectangleForWidget(PWidget(w.GetID()));\r\n\tGtkRequisition requisition;\r\n#if GTK_CHECK_VERSION(3,0,0)\r\n\tgtk_widget_get_preferred_size(GTK_WIDGET(widget), nullptr, &requisition);\r\n#else\r\n\tgtk_widget_size_request(GTK_WIDGET(widget), &requisition);\r\n#endif\r\n\tif ((pt.x + requisition.width) > rcMonitor.x + rcMonitor.width) {\r\n\t\tpt.x = rcMonitor.x + rcMonitor.width - requisition.width;\r\n\t}\r\n\tif ((pt.y + requisition.height) > rcMonitor.y + rcMonitor.height) {\r\n\t\tpt.y = rcMonitor.y + rcMonitor.height - requisition.height;\r\n\t}\r\n\tgtk_menu_popup(widget, nullptr, nullptr, MenuPositionFunc,\r\n\t\t       GINT_TO_POINTER((static_cast<int>(pt.y) << 16) | static_cast<int>(pt.x)), 0,\r\n\t\t       gtk_get_current_event_time());\r\n#endif\r\n}\r\n\r\nColourRGBA Platform::Chrome() {\r\n\treturn ColourRGBA(0xe0, 0xe0, 0xe0);\r\n}\r\n\r\nColourRGBA Platform::ChromeHighlight() {\r\n\treturn white;\r\n}\r\n\r\nconst char *Platform::DefaultFont() {\r\n#ifdef G_OS_WIN32\r\n\treturn \"Lucida Console\";\r\n#else\r\n\treturn \"!Sans\";\r\n#endif\r\n}\r\n\r\nint Platform::DefaultFontSize() {\r\n#ifdef G_OS_WIN32\r\n\treturn 10;\r\n#else\r\n\treturn 12;\r\n#endif\r\n}\r\n\r\nunsigned int Platform::DoubleClickTime() {\r\n\treturn 500; \t// Half a second\r\n}\r\n\r\nvoid Platform::DebugDisplay(const char *s) noexcept {\r\n\tfprintf(stderr, \"%s\", s);\r\n}\r\n\r\n//#define TRACE\r\n\r\n#ifdef TRACE\r\nvoid Platform::DebugPrintf(const char *format, ...) noexcept {\r\n\tchar buffer[2000];\r\n\tva_list pArguments;\r\n\tva_start(pArguments, format);\r\n\tvsnprintf(buffer, std::size(buffer), format, pArguments);\r\n\tva_end(pArguments);\r\n\tPlatform::DebugDisplay(buffer);\r\n}\r\n#else\r\nvoid Platform::DebugPrintf(const char *, ...) noexcept {}\r\n\r\n#endif\r\n\r\n// Not supported for GTK+\r\nstatic bool assertionPopUps = true;\r\n\r\nbool Platform::ShowAssertionPopUps(bool assertionPopUps_) noexcept {\r\n\tconst bool ret = assertionPopUps;\r\n\tassertionPopUps = assertionPopUps_;\r\n\treturn ret;\r\n}\r\n\r\nvoid Platform::Assert(const char *c, const char *file, int line) noexcept {\r\n\tchar buffer[2000];\r\n\tg_snprintf(buffer, sizeof(buffer), \"Assertion [%s] failed at %s %d\\r\\n\", c, file, line);\r\n\tPlatform::DebugDisplay(buffer);\r\n\tabort();\r\n}\r\n\r\nvoid Platform_Initialise() {\r\n}\r\n\r\nvoid Platform_Finalise() {\r\n}\r\n"
  },
  {
    "path": "scintilla/gtk/ScintillaGTK.cxx",
    "content": "// Scintilla source code edit control\r\n// ScintillaGTK.cxx - GTK+ specific subclass of ScintillaBase\r\n// Copyright 1998-2004 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#include <cstddef>\r\n#include <cstdlib>\r\n#include <cstdint>\r\n#include <cassert>\r\n#include <cstring>\r\n#include <cstdio>\r\n#include <ctime>\r\n#include <cmath>\r\n\r\n#include <stdexcept>\r\n#include <new>\r\n#include <string>\r\n#include <string_view>\r\n#include <vector>\r\n#include <map>\r\n#include <set>\r\n#include <optional>\r\n#include <algorithm>\r\n#include <memory>\r\n\r\n#include <glib.h>\r\n#include <gmodule.h>\r\n#include <gdk/gdk.h>\r\n#include <gtk/gtk.h>\r\n#include <gdk/gdkkeysyms.h>\r\n#if defined(GDK_WINDOWING_WAYLAND)\r\n#include <gdk/gdkwayland.h>\r\n#endif\r\n\r\n#if defined(_WIN32)\r\n// On Win32 use windows.h to access clipboard (rectangular format) and systems parameters\r\n#undef NOMINMAX\r\n#define NOMINMAX\r\n#include <windows.h>\r\n#endif\r\n\r\n#include \"ScintillaTypes.h\"\r\n#include \"ScintillaMessages.h\"\r\n#include \"ScintillaStructures.h\"\r\n#include \"ILoader.h\"\r\n#include \"ILexer.h\"\r\n\r\n#include \"Debugging.h\"\r\n#include \"Geometry.h\"\r\n#include \"Platform.h\"\r\n\r\n#include \"Scintilla.h\"\r\n#include \"ScintillaWidget.h\"\r\n#include \"CharacterCategoryMap.h\"\r\n#include \"Position.h\"\r\n#include \"UniqueString.h\"\r\n#include \"SplitVector.h\"\r\n#include \"Partitioning.h\"\r\n#include \"RunStyles.h\"\r\n#include \"ContractionState.h\"\r\n#include \"CellBuffer.h\"\r\n#include \"CallTip.h\"\r\n#include \"KeyMap.h\"\r\n#include \"Indicator.h\"\r\n#include \"LineMarker.h\"\r\n#include \"Style.h\"\r\n#include \"ViewStyle.h\"\r\n#include \"CharClassify.h\"\r\n#include \"Decoration.h\"\r\n#include \"CaseFolder.h\"\r\n#include \"Document.h\"\r\n#include \"CaseConvert.h\"\r\n#include \"UniConversion.h\"\r\n#include \"Selection.h\"\r\n#include \"PositionCache.h\"\r\n#include \"EditModel.h\"\r\n#include \"MarginView.h\"\r\n#include \"EditView.h\"\r\n#include \"Editor.h\"\r\n#include \"AutoComplete.h\"\r\n#include \"ScintillaBase.h\"\r\n\r\n#include \"Wrappers.h\"\r\n#include \"ScintillaGTK.h\"\r\n#include \"scintilla-marshal.h\"\r\n#include \"ScintillaGTKAccessible.h\"\r\n#include \"Converter.h\"\r\n\r\n#define IS_WIDGET_REALIZED(w) (gtk_widget_get_realized(GTK_WIDGET(w)))\r\n#define IS_WIDGET_MAPPED(w) (gtk_widget_get_mapped(GTK_WIDGET(w)))\r\n\r\n#define SC_INDICATOR_INPUT INDICATOR_IME\r\n#define SC_INDICATOR_TARGET INDICATOR_IME+1\r\n#define SC_INDICATOR_CONVERTED INDICATOR_IME+2\r\n#define SC_INDICATOR_UNKNOWN INDICATOR_IME_MAX\r\n\r\nusing namespace Scintilla;\r\nusing namespace Scintilla::Internal;\r\n\r\n// From PlatGTK.cxx\r\nextern std::string UTF8FromLatin1(std::string_view text);\r\nextern void Platform_Initialise();\r\nextern void Platform_Finalise();\r\n\r\nnamespace {\r\n\r\nenum {\r\n\tCOMMAND_SIGNAL,\r\n\tNOTIFY_SIGNAL,\r\n\tLAST_SIGNAL\r\n};\r\n\r\ngint scintilla_signals[LAST_SIGNAL] = { 0 };\r\n\r\nenum {\r\n\tTARGET_STRING,\r\n\tTARGET_TEXT,\r\n\tTARGET_COMPOUND_TEXT,\r\n\tTARGET_UTF8_STRING,\r\n\tTARGET_URI\r\n};\r\n\r\nconst GtkTargetEntry clipboardCopyTargets[] = {\r\n\t{ (gchar *) \"UTF8_STRING\", 0, TARGET_UTF8_STRING },\r\n\t{ (gchar *) \"STRING\", 0, TARGET_STRING },\r\n};\r\nconstexpr gint nClipboardCopyTargets = static_cast<gint>(std::size(clipboardCopyTargets));\r\n\r\nconst GtkTargetEntry clipboardPasteTargets[] = {\r\n\t{ (gchar *) \"text/uri-list\", 0, TARGET_URI },\r\n\t{ (gchar *) \"UTF8_STRING\", 0, TARGET_UTF8_STRING },\r\n\t{ (gchar *) \"STRING\", 0, TARGET_STRING },\r\n};\r\nconstexpr gint nClipboardPasteTargets = static_cast<gint>(std::size(clipboardPasteTargets));\r\n\r\nconst GdkDragAction actionCopyOrMove = static_cast<GdkDragAction>(GDK_ACTION_COPY | GDK_ACTION_MOVE);\r\n\r\nGtkWidget *PWidget(const Window &w) noexcept {\r\n\treturn static_cast<GtkWidget *>(w.GetID());\r\n}\r\n\r\nGdkWindow *PWindow(const Window &w) noexcept {\r\n\tGtkWidget *widget = static_cast<GtkWidget *>(w.GetID());\r\n\treturn gtk_widget_get_window(widget);\r\n}\r\n\r\nvoid MapWidget(GtkWidget *widget) noexcept {\r\n\tif (widget &&\r\n\t\tgtk_widget_get_visible(GTK_WIDGET(widget)) &&\r\n\t\t!IS_WIDGET_MAPPED(widget)) {\r\n\t\tgtk_widget_map(widget);\r\n\t}\r\n}\r\n\r\nconst guchar *DataOfGSD(GtkSelectionData *sd) noexcept {\r\n\treturn gtk_selection_data_get_data(sd);\r\n}\r\n\r\ngint LengthOfGSD(GtkSelectionData *sd) noexcept {\r\n\treturn gtk_selection_data_get_length(sd);\r\n}\r\n\r\nGdkAtom TypeOfGSD(GtkSelectionData *sd) noexcept {\r\n\treturn gtk_selection_data_get_data_type(sd);\r\n}\r\n\r\nGdkAtom SelectionOfGSD(GtkSelectionData *sd) noexcept {\r\n\treturn gtk_selection_data_get_selection(sd);\r\n}\r\n\r\nbool SettingGet(GtkSettings *settings, const gchar *name, gpointer value) noexcept {\r\n\tif (!settings) {\r\n\t\treturn false;\r\n\t}\r\n\tif (!g_object_class_find_property(G_OBJECT_GET_CLASS(\r\n\t\tG_OBJECT(settings)), name)) {\r\n\t\treturn false;\r\n\t}\r\n\tg_object_get(G_OBJECT(settings), name, value, nullptr);\r\n\treturn true;\r\n}\r\n\r\n}\r\n\r\nFontOptions::FontOptions(GtkWidget *widget) noexcept {\r\n\tUniquePangoContext pcontext(gtk_widget_create_pango_context(widget));\r\n\tPLATFORM_ASSERT(pcontext);\r\n\tconst cairo_font_options_t *options = pango_cairo_context_get_font_options(pcontext.get());\r\n\t// options is owned by the PangoContext so must not be freed.\r\n\tif (options) {\r\n\t\t// options is NULL on Win32\r\n\t\tantialias = cairo_font_options_get_antialias(options);\r\n\t\torder = cairo_font_options_get_subpixel_order(options);\r\n\t\thint = cairo_font_options_get_hint_style(options);\r\n\t}\r\n}\r\n\r\nbool FontOptions::operator==(const FontOptions &other) const noexcept {\r\n\treturn antialias == other.antialias &&\r\n\t\torder == other.order &&\r\n\t\thint == other.hint;\r\n}\r\n\r\nScintillaGTK *ScintillaGTK::FromWidget(GtkWidget *widget) noexcept {\r\n\tScintillaObject *scio = SCINTILLA(widget);\r\n\treturn static_cast<ScintillaGTK *>(scio->pscin);\r\n}\r\n\r\nScintillaGTK::ScintillaGTK(_ScintillaObject *sci_) :\r\n\tadjustmentv(nullptr), adjustmenth(nullptr),\r\n\tverticalScrollBarWidth(30), horizontalScrollBarHeight(30),\r\n\tbuttonMouse(0),\r\n\tcapturedMouse(false), dragWasDropped(false),\r\n\tlastKey(0), rectangularSelectionModifier(SCMOD_CTRL),\r\n\tparentClass(nullptr),\r\n\tatomSought(nullptr),\r\n\tpreeditInitialized(false),\r\n\tim_context(nullptr),\r\n\tlastNonCommonScript(G_UNICODE_SCRIPT_INVALID_CODE),\r\n\tsettings(nullptr),\r\n\tsettingsHandlerId(0),\r\n\tlastWheelMouseTime(0),\r\n\tlastWheelMouseDirection(0),\r\n\twheelMouseIntensity(0),\r\n\tsmoothScrollY(0),\r\n\tsmoothScrollX(0),\r\n\trgnUpdate(nullptr),\r\n\trepaintFullWindow(false),\r\n\tstyleIdleID(0),\r\n\taccessibilityEnabled(SC_ACCESSIBILITY_ENABLED),\r\n\taccessible(nullptr) {\r\n\tsci = sci_;\r\n\twMain = GTK_WIDGET(sci);\r\n\r\n\trectangularSelectionModifier = SCMOD_ALT;\r\n\r\n#if PLAT_GTK_WIN32\r\n\t// There does not seem to be a real standard for indicating that the clipboard\r\n\t// contains a rectangular selection, so copy Developer Studio.\r\n\tcfColumnSelect = static_cast<CLIPFORMAT>(\r\n\t\t\t\t ::RegisterClipboardFormatW(L\"MSDEVColumnSelect\"));\r\n\r\n\t// Get intellimouse parameters when running on win32; otherwise use\r\n\t// reasonable default\r\n#ifndef SPI_GETWHEELSCROLLLINES\r\n#define SPI_GETWHEELSCROLLLINES   104\r\n#endif\r\n\t::SystemParametersInfo(SPI_GETWHEELSCROLLLINES, 0, &linesPerScroll, 0);\r\n#else\r\n\tlinesPerScroll = 4;\r\n#endif\r\n\tprimarySelection = false;\r\n\r\n\tInit();\r\n}\r\n\r\nScintillaGTK::~ScintillaGTK() {\r\n\tif (styleIdleID) {\r\n\t\tg_source_remove(styleIdleID);\r\n\t\tstyleIdleID = 0;\r\n\t}\r\n\tif (scrollBarIdleID) {\r\n\t\tg_source_remove(scrollBarIdleID);\r\n\t\tscrollBarIdleID = 0;\r\n\t}\r\n\tClearPrimarySelection();\r\n\twPreedit.Destroy();\r\n\tif (settingsHandlerId) {\r\n\t\tg_signal_handler_disconnect(settings, settingsHandlerId);\r\n\t}\r\n}\r\n\r\nvoid ScintillaGTK::RealizeThis(GtkWidget *widget) {\r\n\t//Platform::DebugPrintf(\"ScintillaGTK::realize this\\n\");\r\n\tgtk_widget_set_realized(widget, TRUE);\r\n\tGdkWindowAttr attrs {};\r\n\tattrs.window_type = GDK_WINDOW_CHILD;\r\n\tGtkAllocation allocation;\r\n\tgtk_widget_get_allocation(widget, &allocation);\r\n\tattrs.x = allocation.x;\r\n\tattrs.y = allocation.y;\r\n\tattrs.width = allocation.width;\r\n\tattrs.height = allocation.height;\r\n\tattrs.wclass = GDK_INPUT_OUTPUT;\r\n\tattrs.visual = gtk_widget_get_visual(widget);\r\n#if !GTK_CHECK_VERSION(3,0,0)\r\n\tattrs.colormap = gtk_widget_get_colormap(widget);\r\n#endif\r\n\tattrs.event_mask = gtk_widget_get_events(widget) | GDK_EXPOSURE_MASK;\r\n\tGdkDisplay *pdisplay = gtk_widget_get_display(widget);\r\n\tGdkCursor *cursor = gdk_cursor_new_for_display(pdisplay, GDK_XTERM);\r\n\tattrs.cursor = cursor;\r\n#if GTK_CHECK_VERSION(3,0,0)\r\n\tgtk_widget_set_window(widget, gdk_window_new(gtk_widget_get_parent_window(widget), &attrs,\r\n\t\t\t      GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_CURSOR));\r\n#if GTK_CHECK_VERSION(3,8,0)\r\n\tgtk_widget_register_window(widget, gtk_widget_get_window(widget));\r\n#else\r\n\tgdk_window_set_user_data(gtk_widget_get_window(widget), widget);\r\n#endif\r\n#if !GTK_CHECK_VERSION(3,18,0)\r\n\tgtk_style_context_set_background(gtk_widget_get_style_context(widget),\r\n\t\t\t\t\t gtk_widget_get_window(widget));\r\n#endif\r\n\tgdk_window_show(gtk_widget_get_window(widget));\r\n#else\r\n\twidget->window = gdk_window_new(gtk_widget_get_parent_window(widget), &attrs,\r\n\t\t\t\t\tGDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP | GDK_WA_CURSOR);\r\n\tgdk_window_set_user_data(widget->window, widget);\r\n\twidget->style = gtk_style_attach(widget->style, widget->window);\r\n\tgdk_window_set_background(widget->window, &widget->style->bg[GTK_STATE_NORMAL]);\r\n\tgdk_window_show(widget->window);\r\n#endif\r\n\tUnRefCursor(cursor);\r\n\r\n\tpreeditInitialized = false;\r\n\tgtk_widget_realize(PWidget(wPreedit));\r\n\tgtk_widget_realize(PWidget(wPreeditDraw));\r\n\r\n\tim_context.reset(gtk_im_multicontext_new());\r\n\tg_signal_connect(G_OBJECT(im_context.get()), \"commit\",\r\n\t\t\t G_CALLBACK(Commit), this);\r\n\tg_signal_connect(G_OBJECT(im_context.get()), \"preedit_changed\",\r\n\t\t\t G_CALLBACK(PreeditChanged), this);\r\n\tg_signal_connect(G_OBJECT(im_context.get()), \"retrieve-surrounding\",\r\n\t\t\t G_CALLBACK(RetrieveSurrounding), this);\r\n\tg_signal_connect(G_OBJECT(im_context.get()), \"delete-surrounding\",\r\n\t\t\t G_CALLBACK(DeleteSurrounding), this);\r\n\tgtk_im_context_set_client_window(im_context.get(), WindowFromWidget(widget));\r\n\r\n\tGtkWidget *widtxt = PWidget(wText);\t//\t// No code inside the G_OBJECT macro\r\n\tg_signal_connect_after(G_OBJECT(widtxt), \"style_set\",\r\n\t\t\t       G_CALLBACK(ScintillaGTK::StyleSetText), nullptr);\r\n\tg_signal_connect_after(G_OBJECT(widtxt), \"realize\",\r\n\t\t\t       G_CALLBACK(ScintillaGTK::RealizeText), nullptr);\r\n\tgtk_widget_realize(widtxt);\r\n\tgtk_widget_realize(PWidget(scrollbarv));\r\n\tgtk_widget_realize(PWidget(scrollbarh));\r\n\r\n\tcursor = gdk_cursor_new_for_display(pdisplay, GDK_XTERM);\r\n\tgdk_window_set_cursor(PWindow(wText), cursor);\r\n\tUnRefCursor(cursor);\r\n\r\n\tcursor = gdk_cursor_new_for_display(pdisplay, GDK_LEFT_PTR);\r\n\tgdk_window_set_cursor(PWindow(scrollbarv), cursor);\r\n\tUnRefCursor(cursor);\r\n\r\n\tcursor = gdk_cursor_new_for_display(pdisplay, GDK_LEFT_PTR);\r\n\tgdk_window_set_cursor(PWindow(scrollbarh), cursor);\r\n\tUnRefCursor(cursor);\r\n\r\n\tusing NotifyLambda = void (*)(GObject *, GParamSpec *, ScintillaGTK *);\r\n\tif (settings) {\r\n\t\tsettingsHandlerId = g_signal_connect(settings, \"notify::gtk-xft-dpi\",\r\n\t\t\tG_CALLBACK(static_cast<NotifyLambda>([](GObject *, GParamSpec *, ScintillaGTK *sciThis) {\r\n\t\t\t\tsciThis->InvalidateStyleRedraw();\r\n\t\t\t})),\r\n\t\t\tthis);\r\n\t}\r\n}\r\n\r\nvoid ScintillaGTK::Realize(GtkWidget *widget) {\r\n\tScintillaGTK *sciThis = FromWidget(widget);\r\n\tsciThis->RealizeThis(widget);\r\n}\r\n\r\nvoid ScintillaGTK::UnRealizeThis(GtkWidget *widget) {\r\n\ttry {\r\n\t\tif (IS_WIDGET_MAPPED(widget)) {\r\n\t\t\tgtk_widget_unmap(widget);\r\n\t\t}\r\n\t\tgtk_widget_set_realized(widget, FALSE);\r\n\t\tgtk_widget_unrealize(PWidget(wText));\r\n\t\tif (PWidget(scrollbarv))\r\n\t\t\tgtk_widget_unrealize(PWidget(scrollbarv));\r\n\t\tif (PWidget(scrollbarh))\r\n\t\t\tgtk_widget_unrealize(PWidget(scrollbarh));\r\n\t\tgtk_widget_unrealize(PWidget(wPreedit));\r\n\t\tgtk_widget_unrealize(PWidget(wPreeditDraw));\r\n\t\tim_context.reset();\r\n\t\tif (GTK_WIDGET_CLASS(parentClass)->unrealize)\r\n\t\t\tGTK_WIDGET_CLASS(parentClass)->unrealize(widget);\r\n\r\n\t\tFinalise();\r\n\t} catch (...) {\r\n\t\terrorStatus = Status::Failure;\r\n\t}\r\n}\r\n\r\nvoid ScintillaGTK::UnRealize(GtkWidget *widget) {\r\n\tScintillaGTK *sciThis = FromWidget(widget);\r\n\tsciThis->UnRealizeThis(widget);\r\n}\r\n\r\nvoid ScintillaGTK::MapThis() {\r\n\ttry {\r\n\t\t//Platform::DebugPrintf(\"ScintillaGTK::map this\\n\");\r\n\t\tgtk_widget_set_mapped(PWidget(wMain), TRUE);\r\n\t\tMapWidget(PWidget(wText));\r\n\t\tMapWidget(PWidget(scrollbarh));\r\n\t\tMapWidget(PWidget(scrollbarv));\r\n\t\twMain.SetCursor(Window::Cursor::arrow);\r\n\t\tscrollbarv.SetCursor(Window::Cursor::arrow);\r\n\t\tscrollbarh.SetCursor(Window::Cursor::arrow);\r\n\t\tSetClientRectangle();\r\n\t\tChangeSize();\r\n\t\tgdk_window_show(PWindow(wMain));\r\n\t} catch (...) {\r\n\t\terrorStatus = Status::Failure;\r\n\t}\r\n}\r\n\r\nvoid ScintillaGTK::Map(GtkWidget *widget) {\r\n\tScintillaGTK *sciThis = FromWidget(widget);\r\n\tsciThis->MapThis();\r\n}\r\n\r\nvoid ScintillaGTK::UnMapThis() {\r\n\ttry {\r\n\t\t//Platform::DebugPrintf(\"ScintillaGTK::unmap this\\n\");\r\n\t\tgtk_widget_set_mapped(PWidget(wMain), FALSE);\r\n\t\tDropGraphics();\r\n\t\tgdk_window_hide(PWindow(wMain));\r\n\t\tgtk_widget_unmap(PWidget(wText));\r\n\t\tif (PWidget(scrollbarh))\r\n\t\t\tgtk_widget_unmap(PWidget(scrollbarh));\r\n\t\tif (PWidget(scrollbarv))\r\n\t\t\tgtk_widget_unmap(PWidget(scrollbarv));\r\n\t} catch (...) {\r\n\t\terrorStatus = Status::Failure;\r\n\t}\r\n}\r\n\r\nvoid ScintillaGTK::UnMap(GtkWidget *widget) {\r\n\tScintillaGTK *sciThis = FromWidget(widget);\r\n\tsciThis->UnMapThis();\r\n}\r\n\r\nvoid ScintillaGTK::ForAll(GtkCallback callback, gpointer callback_data) {\r\n\ttry {\r\n\t\t(*callback)(PWidget(wText), callback_data);\r\n\t\tif (PWidget(scrollbarv))\r\n\t\t\t(*callback)(PWidget(scrollbarv), callback_data);\r\n\t\tif (PWidget(scrollbarh))\r\n\t\t\t(*callback)(PWidget(scrollbarh), callback_data);\r\n\t} catch (...) {\r\n\t\terrorStatus = Status::Failure;\r\n\t}\r\n}\r\n\r\nvoid ScintillaGTK::MainForAll(GtkContainer *container, gboolean include_internals, GtkCallback callback, gpointer callback_data) {\r\n\tScintillaGTK *sciThis = FromWidget(GTK_WIDGET(container));\r\n\r\n\tif (callback && include_internals) {\r\n\t\tsciThis->ForAll(callback, callback_data);\r\n\t}\r\n}\r\n\r\nnamespace {\r\n\r\nclass PreEditString {\r\npublic:\r\n\tgchar *str;\r\n\tgint cursor_pos;\r\n\tPangoAttrList *attrs;\r\n\tgboolean validUTF8;\r\n\tglong uniStrLen;\r\n\tgunichar *uniStr;\r\n\tGUnicodeScript pscript;\r\n\r\n\texplicit PreEditString(GtkIMContext *im_context) noexcept {\r\n\t\tgtk_im_context_get_preedit_string(im_context, &str, &attrs, &cursor_pos);\r\n\t\tvalidUTF8 = g_utf8_validate(str, strlen(str), nullptr);\r\n\t\tuniStr = g_utf8_to_ucs4_fast(str, static_cast<glong>(strlen(str)), &uniStrLen);\r\n\t\tpscript = g_unichar_get_script(uniStr[0]);\r\n\t}\r\n\t// Deleted so PreEditString objects can not be copied.\r\n\tPreEditString(const PreEditString&) = delete;\r\n\tPreEditString(PreEditString&&) = delete;\r\n\tPreEditString&operator=(const PreEditString&) = delete;\r\n\tPreEditString&operator=(PreEditString&&) = delete;\r\n\t~PreEditString() {\r\n\t\tg_free(str);\r\n\t\tg_free(uniStr);\r\n\t\tpango_attr_list_unref(attrs);\r\n\t}\r\n};\r\n\r\n}\r\n\r\ngint ScintillaGTK::FocusInThis(GtkWidget *) {\r\n\ttry {\r\n\t\tSetFocusState(true);\r\n\r\n\t\tif (im_context) {\r\n\t\t\tgtk_im_context_focus_in(im_context.get());\r\n\t\t\tPreEditString pes(im_context.get());\r\n\t\t\tif (PWidget(wPreedit)) {\r\n\t\t\t\tif (!preeditInitialized) {\r\n\t\t\t\t\tGtkWidget *top = gtk_widget_get_toplevel(PWidget(wMain));\r\n\t\t\t\t\tgtk_window_set_transient_for(GTK_WINDOW(PWidget(wPreedit)), GTK_WINDOW(top));\r\n\t\t\t\t\tpreeditInitialized = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (strlen(pes.str) > 0) {\r\n\t\t\t\t\tgtk_widget_show(PWidget(wPreedit));\r\n\t\t\t\t} else {\r\n\t\t\t\t\tgtk_widget_hide(PWidget(wPreedit));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t} catch (...) {\r\n\t\terrorStatus = Status::Failure;\r\n\t}\r\n\treturn FALSE;\r\n}\r\n\r\ngint ScintillaGTK::FocusIn(GtkWidget *widget, GdkEventFocus * /*event*/) {\r\n\tScintillaGTK *sciThis = FromWidget(widget);\r\n\treturn sciThis->FocusInThis(widget);\r\n}\r\n\r\ngint ScintillaGTK::FocusOutThis(GtkWidget *) {\r\n\ttry {\r\n\t\tSetFocusState(false);\r\n\r\n\t\tif (PWidget(wPreedit))\r\n\t\t\tgtk_widget_hide(PWidget(wPreedit));\r\n\t\tif (im_context)\r\n\t\t\tgtk_im_context_focus_out(im_context.get());\r\n\r\n\t} catch (...) {\r\n\t\terrorStatus = Status::Failure;\r\n\t}\r\n\treturn FALSE;\r\n}\r\n\r\ngint ScintillaGTK::FocusOut(GtkWidget *widget, GdkEventFocus * /*event*/) {\r\n\tScintillaGTK *sciThis = FromWidget(widget);\r\n\treturn sciThis->FocusOutThis(widget);\r\n}\r\n\r\nvoid ScintillaGTK::SizeRequest(GtkWidget *widget, GtkRequisition *requisition) {\r\n\tconst ScintillaGTK *sciThis = FromWidget(widget);\r\n\trequisition->width = 1;\r\n\trequisition->height = 1;\r\n\tGtkRequisition child_requisition;\r\n#if GTK_CHECK_VERSION(3,0,0)\r\n\tgtk_widget_get_preferred_size(PWidget(sciThis->scrollbarh), nullptr, &child_requisition);\r\n\tgtk_widget_get_preferred_size(PWidget(sciThis->scrollbarv), nullptr, &child_requisition);\r\n#else\r\n\tgtk_widget_size_request(PWidget(sciThis->scrollbarh), &child_requisition);\r\n\tgtk_widget_size_request(PWidget(sciThis->scrollbarv), &child_requisition);\r\n#endif\r\n}\r\n\r\n#if GTK_CHECK_VERSION(3,0,0)\r\n\r\nvoid ScintillaGTK::GetPreferredWidth(GtkWidget *widget, gint *minimalWidth, gint *naturalWidth) {\r\n\tGtkRequisition requisition;\r\n\tSizeRequest(widget, &requisition);\r\n\t*minimalWidth = *naturalWidth = requisition.width;\r\n}\r\n\r\nvoid ScintillaGTK::GetPreferredHeight(GtkWidget *widget, gint *minimalHeight, gint *naturalHeight) {\r\n\tGtkRequisition requisition;\r\n\tSizeRequest(widget, &requisition);\r\n\t*minimalHeight = *naturalHeight = requisition.height;\r\n}\r\n\r\n#endif\r\n\r\nvoid ScintillaGTK::SizeAllocate(GtkWidget *widget, GtkAllocation *allocation) {\r\n\tScintillaGTK *sciThis = FromWidget(widget);\r\n\ttry {\r\n\t\tgtk_widget_set_allocation(widget, allocation);\r\n\t\tif (IS_WIDGET_REALIZED(widget))\r\n\t\t\tgdk_window_move_resize(WindowFromWidget(widget),\r\n\t\t\t\t\t       allocation->x,\r\n\t\t\t\t\t       allocation->y,\r\n\t\t\t\t\t       allocation->width,\r\n\t\t\t\t\t       allocation->height);\r\n\r\n\t\tsciThis->Resize(allocation->width, allocation->height);\r\n\r\n\t} catch (...) {\r\n\t\tsciThis->errorStatus = Status::Failure;\r\n\t}\r\n}\r\n\r\nvoid ScintillaGTK::Init() {\r\n\tparentClass = static_cast<GtkWidgetClass *>(\r\n\t\t\t      g_type_class_ref(gtk_container_get_type()));\r\n\r\n\tgint maskSmooth = 0;\r\n#if defined(GDK_WINDOWING_WAYLAND)\r\n\tGdkDisplay *pdisplay = gdk_display_get_default();\r\n\tif (GDK_IS_WAYLAND_DISPLAY(pdisplay)) {\r\n\t\t// On Wayland, touch pads only produce smooth scroll events\r\n\t\tmaskSmooth = GDK_SMOOTH_SCROLL_MASK;\r\n\t}\r\n#endif\r\n\r\n\tgtk_widget_set_can_focus(PWidget(wMain), TRUE);\r\n\tgtk_widget_set_sensitive(PWidget(wMain), TRUE);\r\n\tgtk_widget_set_events(PWidget(wMain),\r\n\t\t\t      GDK_EXPOSURE_MASK\r\n\t\t\t      | GDK_SCROLL_MASK\r\n\t\t\t      | maskSmooth\r\n\t\t\t      | GDK_STRUCTURE_MASK\r\n\t\t\t      | GDK_KEY_PRESS_MASK\r\n\t\t\t      | GDK_KEY_RELEASE_MASK\r\n\t\t\t      | GDK_FOCUS_CHANGE_MASK\r\n\t\t\t      | GDK_LEAVE_NOTIFY_MASK\r\n\t\t\t      | GDK_BUTTON_PRESS_MASK\r\n\t\t\t      | GDK_BUTTON_RELEASE_MASK\r\n\t\t\t      | GDK_POINTER_MOTION_MASK\r\n\t\t\t      | GDK_POINTER_MOTION_HINT_MASK);\r\n\r\n\twText = gtk_drawing_area_new();\r\n\tgtk_widget_set_parent(PWidget(wText), PWidget(wMain));\r\n\tGtkWidget *widtxt = PWidget(wText);\t// No code inside the G_OBJECT macro\r\n\tgtk_widget_show(widtxt);\r\n#if GTK_CHECK_VERSION(3,0,0)\r\n\tg_signal_connect(G_OBJECT(widtxt), \"draw\",\r\n\t\t\t G_CALLBACK(ScintillaGTK::DrawText), this);\r\n#else\r\n\tg_signal_connect(G_OBJECT(widtxt), \"expose_event\",\r\n\t\t\t G_CALLBACK(ScintillaGTK::ExposeText), this);\r\n#endif\r\n#if GTK_CHECK_VERSION(3,0,0)\r\n\t// we need a runtime check because we don't want double buffering when\r\n\t// running on >= 3.9.2\r\n\tif (gtk_check_version(3, 9, 2) != nullptr /* on < 3.9.2 */)\r\n#endif\r\n\t{\r\n#if !GTK_CHECK_VERSION(3,14,0)\r\n\t\t// Avoid background drawing flash/missing redraws\r\n\t\tgtk_widget_set_double_buffered(widtxt, FALSE);\r\n#endif\r\n\t}\r\n\tgtk_widget_set_events(widtxt, GDK_EXPOSURE_MASK);\r\n\tgtk_widget_set_size_request(widtxt, 100, 100);\r\n\tadjustmentv = GTK_ADJUSTMENT(gtk_adjustment_new(0.0, 0.0, 201.0, 1.0, 20.0, 20.0));\r\n#if GTK_CHECK_VERSION(3,0,0)\r\n\tscrollbarv = gtk_scrollbar_new(GTK_ORIENTATION_VERTICAL, GTK_ADJUSTMENT(adjustmentv));\r\n#else\r\n\tscrollbarv = gtk_vscrollbar_new(GTK_ADJUSTMENT(adjustmentv));\r\n#endif\r\n\tgtk_widget_set_can_focus(PWidget(scrollbarv), FALSE);\r\n\tg_signal_connect(G_OBJECT(adjustmentv), \"value_changed\",\r\n\t\t\t G_CALLBACK(ScrollSignal), this);\r\n\tgtk_widget_set_parent(PWidget(scrollbarv), PWidget(wMain));\r\n\tgtk_widget_show(PWidget(scrollbarv));\r\n\r\n\tadjustmenth = GTK_ADJUSTMENT(gtk_adjustment_new(0.0, 0.0, 101.0, 1.0, 20.0, 20.0));\r\n#if GTK_CHECK_VERSION(3,0,0)\r\n\tscrollbarh = gtk_scrollbar_new(GTK_ORIENTATION_HORIZONTAL, GTK_ADJUSTMENT(adjustmenth));\r\n#else\r\n\tscrollbarh = gtk_hscrollbar_new(GTK_ADJUSTMENT(adjustmenth));\r\n#endif\r\n\tgtk_widget_set_can_focus(PWidget(scrollbarh), FALSE);\r\n\tg_signal_connect(G_OBJECT(adjustmenth), \"value_changed\",\r\n\t\t\t G_CALLBACK(ScrollHSignal), this);\r\n\tgtk_widget_set_parent(PWidget(scrollbarh), PWidget(wMain));\r\n\tgtk_widget_show(PWidget(scrollbarh));\r\n\r\n\tgtk_widget_grab_focus(PWidget(wMain));\r\n\r\n\tgtk_drag_dest_set(GTK_WIDGET(PWidget(wMain)),\r\n\t\t\t  GTK_DEST_DEFAULT_ALL, clipboardPasteTargets, nClipboardPasteTargets,\r\n\t\t\t  actionCopyOrMove);\r\n\r\n\t/* create pre-edit window */\r\n\twPreedit = gtk_window_new(GTK_WINDOW_POPUP);\r\n\tgtk_window_set_type_hint(GTK_WINDOW(PWidget(wPreedit)), GDK_WINDOW_TYPE_HINT_POPUP_MENU);\r\n\twPreeditDraw = gtk_drawing_area_new();\r\n\tGtkWidget *predrw = PWidget(wPreeditDraw);      // No code inside the G_OBJECT macro\r\n#if GTK_CHECK_VERSION(3,0,0)\r\n\tg_signal_connect(G_OBJECT(predrw), \"draw\",\r\n\t\t\t G_CALLBACK(DrawPreedit), this);\r\n#else\r\n\tg_signal_connect(G_OBJECT(predrw), \"expose_event\",\r\n\t\t\t G_CALLBACK(ExposePreedit), this);\r\n#endif\r\n\tgtk_container_add(GTK_CONTAINER(PWidget(wPreedit)), predrw);\r\n\tgtk_widget_show(predrw);\r\n\r\n\tsettings = gtk_settings_get_default();\r\n\r\n\t// Set caret period based on GTK settings\r\n\tgboolean blinkOn = false;\r\n\tSettingGet(settings, \"gtk-cursor-blink\", &blinkOn);\r\n\tif (blinkOn) {\r\n\t\tgint value = 500;\r\n\t\tif (SettingGet(settings, \"gtk-cursor-blink-time\", &value)) {\r\n\t\t\tcaret.period = static_cast<int>(value / 1.75);\r\n\t\t}\r\n\t} else {\r\n\t\tcaret.period = 0;\r\n\t}\r\n\r\n\tfor (size_t tr = static_cast<size_t>(TickReason::caret); tr <= static_cast<size_t>(TickReason::dwell); tr++) {\r\n\t\ttimers[tr].reason = static_cast<TickReason>(tr);\r\n\t\ttimers[tr].scintilla = this;\r\n\t}\r\n\r\n\tvs.indicators[SC_INDICATOR_UNKNOWN] = Indicator(IndicatorStyle::Hidden, colourIME);\r\n\tvs.indicators[SC_INDICATOR_INPUT] = Indicator(IndicatorStyle::Dots, colourIME);\r\n\tvs.indicators[SC_INDICATOR_CONVERTED] = Indicator(IndicatorStyle::CompositionThick, colourIME);\r\n\tvs.indicators[SC_INDICATOR_TARGET] = Indicator(IndicatorStyle::StraightBox, colourIME);\r\n\r\n\tfontOptionsPrevious = FontOptions(PWidget(wText));\r\n}\r\n\r\nvoid ScintillaGTK::Finalise() {\r\n\tfor (size_t tr = static_cast<size_t>(TickReason::caret); tr <= static_cast<size_t>(TickReason::dwell); tr++) {\r\n\t\tFineTickerCancel(static_cast<TickReason>(tr));\r\n\t}\r\n\tif (accessible) {\r\n\t\tgtk_accessible_set_widget(GTK_ACCESSIBLE(accessible), nullptr);\r\n\t\tg_object_unref(accessible);\r\n\t\taccessible = nullptr;\r\n\t}\r\n\r\n\tScintillaBase::Finalise();\r\n}\r\n\r\nbool ScintillaGTK::AbandonPaint() {\r\n\tif ((paintState == PaintState::painting) && !paintingAllText) {\r\n\t\trepaintFullWindow = true;\r\n\t}\r\n\treturn false;\r\n}\r\n\r\nvoid ScintillaGTK::DisplayCursor(Window::Cursor c) {\r\n\tif (cursorMode == CursorShape::Normal)\r\n\t\twText.SetCursor(c);\r\n\telse\r\n\t\twText.SetCursor(static_cast<Window::Cursor>(cursorMode));\r\n}\r\n\r\nbool ScintillaGTK::DragThreshold(Point ptStart, Point ptNow) {\r\n\treturn gtk_drag_check_threshold(GTK_WIDGET(PWidget(wMain)),\r\n\t\tstatic_cast<gint>(ptStart.x), static_cast<gint>(ptStart.y),\r\n\t\tstatic_cast<gint>(ptNow.x), static_cast<gint>(ptNow.y));\r\n}\r\n\r\nvoid ScintillaGTK::StartDrag() {\r\n\tPLATFORM_ASSERT(evbtn);\r\n\tdragWasDropped = false;\r\n\tinDragDrop = DragDrop::dragging;\r\n\tGtkTargetList *tl = gtk_target_list_new(clipboardCopyTargets, nClipboardCopyTargets);\r\n#if GTK_CHECK_VERSION(3,10,0)\r\n\tgtk_drag_begin_with_coordinates(GTK_WIDGET(PWidget(wMain)),\r\n\t\t\t\t\ttl,\r\n\t\t\t\t\tactionCopyOrMove,\r\n\t\t\t\t\tbuttonMouse,\r\n\t\t\t\t\tevbtn.get(),\r\n\t\t\t\t\t-1, -1);\r\n#else\r\n\tgtk_drag_begin(GTK_WIDGET(PWidget(wMain)),\r\n\t\t       tl,\r\n\t\t       actionCopyOrMove,\r\n\t\t       buttonMouse,\r\n\t\t       evbtn.get());\r\n#endif\r\n}\r\n\r\nnamespace Scintilla::Internal {\r\n\r\nstd::string ConvertText(const char *s, size_t len, const char *charSetDest,\r\n\t\t\tconst char *charSetSource, bool transliterations, bool silent) {\r\n\t// s is not const because of different versions of iconv disagreeing about const\r\n\tstd::string destForm;\r\n\tConverter conv(charSetDest, charSetSource, transliterations);\r\n\tif (conv) {\r\n\t\tgsize outLeft = len*3+1;\r\n\t\tdestForm = std::string(outLeft, '\\0');\r\n\t\t// g_iconv does not actually write to its input argument so safe to cast away const\r\n\t\tchar *pin = const_cast<char *>(s);\r\n\t\tgsize inLeft = len;\r\n\t\tchar *putf = &destForm[0];\r\n\t\tchar *pout = putf;\r\n\t\tconst gsize conversions = conv.Convert(&pin, &inLeft, &pout, &outLeft);\r\n\t\tif (conversions == sizeFailure) {\r\n\t\t\tif (!silent) {\r\n\t\t\t\tif (len == 1)\r\n\t\t\t\t\tfprintf(stderr, \"iconv %s->%s failed for %0x '%s'\\n\",\r\n\t\t\t\t\t\tcharSetSource, charSetDest, static_cast<unsigned char>(*s), s);\r\n\t\t\t\telse\r\n\t\t\t\t\tfprintf(stderr, \"iconv %s->%s failed for %s\\n\",\r\n\t\t\t\t\t\tcharSetSource, charSetDest, s);\r\n\t\t\t}\r\n\t\t\tdestForm = std::string();\r\n\t\t} else {\r\n\t\t\tdestForm.resize(pout - putf);\r\n\t\t}\r\n\t} else {\r\n\t\tfprintf(stderr, \"Can not iconv %s %s\\n\", charSetDest, charSetSource);\r\n\t}\r\n\treturn destForm;\r\n}\r\n}\r\n\r\n// Returns the target converted to UTF8.\r\n// Return the length in bytes.\r\nSci::Position ScintillaGTK::TargetAsUTF8(char *text) const {\r\n\tconst Sci::Position targetLength = targetRange.Length();\r\n\tif (IsUnicodeMode()) {\r\n\t\tif (text) {\r\n\t\t\tpdoc->GetCharRange(text, targetRange.start.Position(), targetLength);\r\n\t\t}\r\n\t} else {\r\n\t\t// Need to convert\r\n\t\tconst char *charSetBuffer = CharacterSetID();\r\n\t\tif (*charSetBuffer) {\r\n\t\t\tstd::string s = RangeText(targetRange.start.Position(), targetRange.end.Position());\r\n\t\t\tstd::string tmputf = ConvertText(&s[0], targetLength, \"UTF-8\", charSetBuffer, false);\r\n\t\t\tif (text) {\r\n\t\t\t\tmemcpy(text, tmputf.c_str(), tmputf.length());\r\n\t\t\t}\r\n\t\t\treturn tmputf.length();\r\n\t\t} else {\r\n\t\t\tif (text) {\r\n\t\t\t\tpdoc->GetCharRange(text, targetRange.start.Position(), targetLength);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn targetLength;\r\n}\r\n\r\n// Translates a nul terminated UTF8 string into the document encoding.\r\n// Return the length of the result in bytes.\r\nSci::Position ScintillaGTK::EncodedFromUTF8(const char *utf8, char *encoded) const {\r\n\tconst Sci::Position inputLength = (lengthForEncode >= 0) ? lengthForEncode : strlen(utf8);\r\n\tif (IsUnicodeMode()) {\r\n\t\tif (encoded) {\r\n\t\t\tmemcpy(encoded, utf8, inputLength);\r\n\t\t}\r\n\t\treturn inputLength;\r\n\t} else {\r\n\t\t// Need to convert\r\n\t\tconst char *charSetBuffer = CharacterSetID();\r\n\t\tif (*charSetBuffer) {\r\n\t\t\tstd::string tmpEncoded = ConvertText(utf8, inputLength, charSetBuffer, \"UTF-8\", true);\r\n\t\t\tif (encoded) {\r\n\t\t\t\tmemcpy(encoded, tmpEncoded.c_str(), tmpEncoded.length());\r\n\t\t\t}\r\n\t\t\treturn tmpEncoded.length();\r\n\t\t} else {\r\n\t\t\tif (encoded) {\r\n\t\t\t\tmemcpy(encoded, utf8, inputLength);\r\n\t\t\t}\r\n\t\t\treturn inputLength;\r\n\t\t}\r\n\t}\r\n\t// Fail\r\n\treturn 0;\r\n}\r\n\r\nbool ScintillaGTK::ValidCodePage(int codePage) const {\r\n\treturn codePage == 0\r\n\t       || codePage == SC_CP_UTF8\r\n\t       || codePage == 932\r\n\t       || codePage == 936\r\n\t       || codePage == 949\r\n\t       || codePage == 950\r\n\t       || codePage == 1361;\r\n}\r\n\r\nstd::string ScintillaGTK::UTF8FromEncoded(std::string_view encoded) const {\r\n\tif (IsUnicodeMode()) {\r\n\t\treturn std::string(encoded);\r\n\t} else {\r\n\t\tconst char *charSetBuffer = CharacterSetID();\r\n\t\treturn ConvertText(encoded.data(), encoded.length(), \"UTF-8\", charSetBuffer, true);\r\n\t}\r\n}\r\n\r\nstd::string ScintillaGTK::EncodedFromUTF8(std::string_view utf8) const {\r\n\tif (IsUnicodeMode()) {\r\n\t\treturn std::string(utf8);\r\n\t} else {\r\n\t\tconst char *charSetBuffer = CharacterSetID();\r\n\t\treturn ConvertText(utf8.data(), utf8.length(), charSetBuffer, \"UTF-8\", true);\r\n\t}\r\n}\r\n\r\nsptr_t ScintillaGTK::WndProc(Message iMessage, uptr_t wParam, sptr_t lParam) {\r\n\ttry {\r\n\t\tswitch (iMessage) {\r\n\r\n\t\tcase Message::GrabFocus:\r\n\t\t\tgtk_widget_grab_focus(PWidget(wMain));\r\n\t\t\tbreak;\r\n\r\n\t\tcase Message::GetDirectFunction:\r\n\t\t\treturn reinterpret_cast<sptr_t>(DirectFunction);\r\n\r\n\t\tcase Message::GetDirectStatusFunction:\r\n\t\t\treturn reinterpret_cast<sptr_t>(DirectStatusFunction);\r\n\r\n\t\tcase Message::GetDirectPointer:\r\n\t\t\treturn reinterpret_cast<sptr_t>(this);\r\n\r\n\t\tcase Message::TargetAsUTF8:\r\n\t\t\treturn TargetAsUTF8(CharPtrFromSPtr(lParam));\r\n\r\n\t\tcase Message::EncodedFromUTF8:\r\n\t\t\treturn EncodedFromUTF8(ConstCharPtrFromUPtr(wParam),\r\n\t\t\t\t\t       CharPtrFromSPtr(lParam));\r\n\r\n\t\tcase Message::SetRectangularSelectionModifier:\r\n\t\t\trectangularSelectionModifier = static_cast<int>(wParam);\r\n\t\t\tbreak;\r\n\r\n\t\tcase Message::GetRectangularSelectionModifier:\r\n\t\t\treturn rectangularSelectionModifier;\r\n\r\n\t\tcase Message::SetReadOnly: {\r\n\t\t\t\tconst sptr_t ret = ScintillaBase::WndProc(iMessage, wParam, lParam);\r\n\t\t\t\tif (accessible) {\r\n\t\t\t\t\tScintillaGTKAccessible *sciAccessible = ScintillaGTKAccessible::FromAccessible(accessible);\r\n\t\t\t\t\tif (sciAccessible) {\r\n\t\t\t\t\t\tsciAccessible->NotifyReadOnly();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn ret;\r\n\t\t\t}\r\n\r\n\t\tcase Message::GetAccessibility:\r\n\t\t\treturn accessibilityEnabled;\r\n\r\n\t\tcase Message::SetAccessibility:\r\n\t\t\taccessibilityEnabled = static_cast<int>(wParam);\r\n\t\t\tif (accessible) {\r\n\t\t\t\tScintillaGTKAccessible *sciAccessible = ScintillaGTKAccessible::FromAccessible(accessible);\r\n\t\t\t\tif (sciAccessible) {\r\n\t\t\t\t\tsciAccessible->SetAccessibility(accessibilityEnabled);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\tdefault:\r\n\t\t\treturn ScintillaBase::WndProc(iMessage, wParam, lParam);\r\n\t\t}\r\n\t} catch (std::bad_alloc &) {\r\n\t\terrorStatus = Status::BadAlloc;\r\n\t} catch (...) {\r\n\t\terrorStatus = Status::Failure;\r\n\t}\r\n\treturn 0;\r\n}\r\n\r\nsptr_t ScintillaGTK::DefWndProc(Message, uptr_t, sptr_t) {\r\n\treturn 0;\r\n}\r\n\r\nbool ScintillaGTK::FineTickerRunning(TickReason reason) {\r\n\treturn timers[static_cast<size_t>(reason)].timer != 0;\r\n}\r\n\r\nvoid ScintillaGTK::FineTickerStart(TickReason reason, int millis, int /* tolerance */) {\r\n\tFineTickerCancel(reason);\r\n\tconst size_t reasonIndex = static_cast<size_t>(reason);\r\n\ttimers[reasonIndex].timer = gdk_threads_add_timeout(millis, TimeOut, &timers[reasonIndex]);\r\n}\r\n\r\nvoid ScintillaGTK::FineTickerCancel(TickReason reason) {\r\n\tconst size_t reasonIndex = static_cast<size_t>(reason);\r\n\tif (timers[reasonIndex].timer) {\r\n\t\tg_source_remove(timers[reasonIndex].timer);\r\n\t\ttimers[reasonIndex].timer = 0;\r\n\t}\r\n}\r\n\r\nbool ScintillaGTK::SetIdle(bool on) {\r\n\tif (on) {\r\n\t\t// Start idler, if it's not running.\r\n\t\tif (!idler.state) {\r\n\t\t\tidler.state = true;\r\n\t\t\tidler.idlerID = GUINT_TO_POINTER(\r\n\t\t\t\t\t\tgdk_threads_add_idle_full(G_PRIORITY_DEFAULT_IDLE, IdleCallback, this, nullptr));\r\n\t\t}\r\n\t} else {\r\n\t\t// Stop idler, if it's running\r\n\t\tif (idler.state) {\r\n\t\t\tidler.state = false;\r\n\t\t\tg_source_remove(GPOINTER_TO_UINT(idler.idlerID));\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n}\r\n\r\nvoid ScintillaGTK::SetMouseCapture(bool on) {\r\n\tif (mouseDownCaptures) {\r\n\t\tif (on) {\r\n\t\t\tgtk_grab_add(GTK_WIDGET(PWidget(wMain)));\r\n\t\t} else {\r\n\t\t\tgtk_grab_remove(GTK_WIDGET(PWidget(wMain)));\r\n\t\t}\r\n\t}\r\n\tcapturedMouse = on;\r\n}\r\n\r\nbool ScintillaGTK::HaveMouseCapture() {\r\n\treturn capturedMouse;\r\n}\r\n\r\n#if GTK_CHECK_VERSION(3,0,0)\r\n\r\nnamespace {\r\n\r\n// Is crcTest completely in crcContainer?\r\nbool CRectContains(const cairo_rectangle_t &crcContainer, const cairo_rectangle_t &crcTest) {\r\n\treturn\r\n\t\t(crcTest.x >= crcContainer.x) && ((crcTest.x + crcTest.width) <= (crcContainer.x + crcContainer.width)) &&\r\n\t\t(crcTest.y >= crcContainer.y) && ((crcTest.y + crcTest.height) <= (crcContainer.y + crcContainer.height));\r\n}\r\n\r\n// Is crcTest completely in crcListContainer?\r\n// May incorrectly return false if complex shape\r\nbool CRectListContains(const cairo_rectangle_list_t *crcListContainer, const cairo_rectangle_t &crcTest) {\r\n\tfor (int r=0; r<crcListContainer->num_rectangles; r++) {\r\n\t\tif (CRectContains(crcListContainer->rectangles[r], crcTest))\r\n\t\t\treturn true;\r\n\t}\r\n\treturn false;\r\n}\r\n\r\n}\r\n\r\n#endif\r\n\r\nbool ScintillaGTK::PaintContains(PRectangle rc) {\r\n\t// This allows optimization when a rectangle is completely in the update region.\r\n\t// It is OK to return false when too difficult to determine as that just performs extra drawing\r\n\tbool contains = true;\r\n\tif (paintState == PaintState::painting) {\r\n\t\tif (!rcPaint.Contains(rc)) {\r\n\t\t\tcontains = false;\r\n\t\t} else if (rgnUpdate) {\r\n#if GTK_CHECK_VERSION(3,0,0)\r\n\t\t\tcairo_rectangle_t grc = {rc.left, rc.top,\r\n\t\t\t\t\t\t rc.right - rc.left, rc.bottom - rc.top\r\n\t\t\t\t\t\t};\r\n\t\t\tcontains = CRectListContains(rgnUpdate, grc);\r\n#else\r\n\t\t\tGdkRectangle grc = {static_cast<gint>(rc.left), static_cast<gint>(rc.top),\r\n\t\t\t\t\t    static_cast<gint>(rc.right - rc.left), static_cast<gint>(rc.bottom - rc.top)\r\n\t\t\t\t\t   };\r\n\t\t\tif (gdk_region_rect_in(rgnUpdate, &grc) != GDK_OVERLAP_RECTANGLE_IN) {\r\n\t\t\t\tcontains = false;\r\n\t\t\t}\r\n#endif\r\n\t\t}\r\n\t}\r\n\treturn contains;\r\n}\r\n\r\n// Redraw all of text area. This paint will not be abandoned.\r\nvoid ScintillaGTK::FullPaint() {\r\n\twText.InvalidateAll();\r\n}\r\n\r\nvoid ScintillaGTK::SetClientRectangle() {\r\n\trectangleClient = wMain.GetClientPosition();\r\n}\r\n\r\nPRectangle ScintillaGTK::GetClientRectangle() const {\r\n\tPRectangle rc = rectangleClient;\r\n\tif (verticalScrollBarVisible)\r\n\t\trc.right -= verticalScrollBarWidth;\r\n\tif (horizontalScrollBarVisible && !Wrapping())\r\n\t\trc.bottom -= horizontalScrollBarHeight;\r\n\t// Move to origin\r\n\trc.right -= rc.left;\r\n\trc.bottom -= rc.top;\r\n\tif (rc.bottom < 0)\r\n\t\trc.bottom = 0;\r\n\tif (rc.right < 0)\r\n\t\trc.right = 0;\r\n\trc.left = 0;\r\n\trc.top = 0;\r\n\treturn rc;\r\n}\r\n\r\nvoid ScintillaGTK::ScrollText(Sci::Line linesToMove) {\r\n\tNotifyUpdateUI();\r\n\r\n#if GTK_CHECK_VERSION(3,22,0)\r\n\tRedraw();\r\n#else\r\n\tGtkWidget *wi = PWidget(wText);\r\n\tif (IS_WIDGET_REALIZED(wi)) {\r\n\t\tconst Sci::Line diff = vs.lineHeight * -linesToMove;\r\n\t\tgdk_window_scroll(WindowFromWidget(wi), 0, static_cast<gint>(-diff));\r\n\t\tgdk_window_process_updates(WindowFromWidget(wi), FALSE);\r\n\t}\r\n#endif\r\n}\r\n\r\nvoid ScintillaGTK::SetVerticalScrollPos() {\r\n\tDwellEnd(true);\r\n\tgtk_adjustment_set_value(GTK_ADJUSTMENT(adjustmentv), static_cast<gdouble>(topLine));\r\n}\r\n\r\nvoid ScintillaGTK::SetHorizontalScrollPos() {\r\n\tDwellEnd(true);\r\n\tgtk_adjustment_set_value(GTK_ADJUSTMENT(adjustmenth), xOffset);\r\n}\r\n\r\nbool ScintillaGTK::ModifyScrollBars(Sci::Line nMax, Sci::Line nPage) {\r\n\tbool modified = false;\r\n\tconst int pageScroll = static_cast<int>(LinesToScroll());\r\n\r\n\tif (gtk_adjustment_get_upper(adjustmentv) != (nMax + 1) ||\r\n\t\t\tgtk_adjustment_get_page_size(adjustmentv) != nPage ||\r\n\t\t\tgtk_adjustment_get_page_increment(adjustmentv) != pageScroll) {\r\n\t\tgtk_adjustment_set_upper(adjustmentv, nMax + 1.0);\r\n\t\tgtk_adjustment_set_page_size(adjustmentv, static_cast<gdouble>(nPage));\r\n\t\tgtk_adjustment_set_page_increment(adjustmentv, pageScroll);\r\n#if !GTK_CHECK_VERSION(3,18,0)\r\n\t\tgtk_adjustment_changed(GTK_ADJUSTMENT(adjustmentv));\r\n#endif\r\n\t\tgtk_adjustment_set_value(GTK_ADJUSTMENT(adjustmentv), static_cast<gdouble>(topLine));\r\n\t\tmodified = true;\r\n\t}\r\n\r\n\tconst PRectangle rcText = GetTextRectangle();\r\n\tint horizEndPreferred = scrollWidth;\r\n\tif (horizEndPreferred < 0)\r\n\t\thorizEndPreferred = 0;\r\n\tconst unsigned int pageWidth = static_cast<unsigned int>(rcText.Width());\r\n\tconst unsigned int pageIncrement = pageWidth / 3;\r\n\tconst unsigned int charWidth = static_cast<unsigned int>(vs.styles[STYLE_DEFAULT].aveCharWidth);\r\n\tif (gtk_adjustment_get_upper(adjustmenth) != horizEndPreferred ||\r\n\t\t\tgtk_adjustment_get_page_size(adjustmenth) != pageWidth ||\r\n\t\t\tgtk_adjustment_get_page_increment(adjustmenth) != pageIncrement ||\r\n\t\t\tgtk_adjustment_get_step_increment(adjustmenth) != charWidth) {\r\n\t\tgtk_adjustment_set_upper(adjustmenth, horizEndPreferred);\r\n\t\tgtk_adjustment_set_page_size(adjustmenth, pageWidth);\r\n\t\tgtk_adjustment_set_page_increment(adjustmenth, pageIncrement);\r\n\t\tgtk_adjustment_set_step_increment(adjustmenth, charWidth);\r\n#if !GTK_CHECK_VERSION(3,18,0)\r\n\t\tgtk_adjustment_changed(GTK_ADJUSTMENT(adjustmenth));\r\n#endif\r\n\t\tgtk_adjustment_set_value(GTK_ADJUSTMENT(adjustmenth), xOffset);\r\n\t\tmodified = true;\r\n\t}\r\n\tif (modified && (paintState == PaintState::painting)) {\r\n\t\trepaintFullWindow = true;\r\n\t}\r\n\r\n\treturn modified;\r\n}\r\n\r\nvoid ScintillaGTK::ReconfigureScrollBars() {\r\n\tconst PRectangle rc = wMain.GetClientPosition();\r\n\tResize(static_cast<int>(rc.Width()), static_cast<int>(rc.Height()));\r\n}\r\n\r\nvoid ScintillaGTK::SetScrollBars() {\r\n\tif (scrollBarIdleID) {\r\n\t\t// Only allow one scroll bar change to be queued\r\n\t\treturn;\r\n\t}\r\n\tconstexpr gint priorityScrollBar = GDK_PRIORITY_REDRAW + 5;\r\n\t// On GTK, unlike other platforms, modifying scrollbars inside some events including\r\n\t// resizes causes problems. Deferring the modification to a lower priority (125) idle\r\n\t// event avoids the problems. This code did not always work when the priority was\r\n\t// higher than GTK's resize (GTK_PRIORITY_RESIZE=110) or redraw\r\n\t// (GDK_PRIORITY_REDRAW=120) idle tasks.\r\n\tscrollBarIdleID = gdk_threads_add_idle_full(priorityScrollBar,\r\n\t\t[](gpointer pSci) -> gboolean {\r\n\t\t\tScintillaGTK *sciThis = static_cast<ScintillaGTK *>(pSci);\r\n\t\t\tsciThis->ChangeScrollBars();\r\n\t\t\tsciThis->scrollBarIdleID = 0;\r\n\t\t\treturn FALSE;\r\n\t\t},\r\n\t\tthis, nullptr);\r\n}\r\n\r\nvoid ScintillaGTK::NotifyChange() {\r\n\tg_signal_emit(G_OBJECT(sci), scintilla_signals[COMMAND_SIGNAL], 0,\r\n\t\t      Platform::LongFromTwoShorts(GetCtrlID(), SCEN_CHANGE), PWidget(wMain));\r\n}\r\n\r\nvoid ScintillaGTK::NotifyFocus(bool focus) {\r\n\tif (commandEvents)\r\n\t\tg_signal_emit(G_OBJECT(sci), scintilla_signals[COMMAND_SIGNAL], 0,\r\n\t\t\t      Platform::LongFromTwoShorts\r\n\t\t\t      (GetCtrlID(), focus ? SCEN_SETFOCUS : SCEN_KILLFOCUS), PWidget(wMain));\r\n\tEditor::NotifyFocus(focus);\r\n}\r\n\r\nvoid ScintillaGTK::NotifyParent(NotificationData scn) {\r\n\tscn.nmhdr.hwndFrom = PWidget(wMain);\r\n\tscn.nmhdr.idFrom = GetCtrlID();\r\n\tg_signal_emit(G_OBJECT(sci), scintilla_signals[NOTIFY_SIGNAL], 0,\r\n\t\t      GetCtrlID(), &scn);\r\n}\r\n\r\nvoid ScintillaGTK::NotifyKey(Keys key, KeyMod modifiers) {\r\n\tNotificationData scn = {};\r\n\tscn.nmhdr.code = Notification::Key;\r\n\tscn.ch = static_cast<int>(key);\r\n\tscn.modifiers = modifiers;\r\n\r\n\tNotifyParent(scn);\r\n}\r\n\r\nvoid ScintillaGTK::NotifyURIDropped(const char *list) {\r\n\tNotificationData scn = {};\r\n\tscn.nmhdr.code = Notification::URIDropped;\r\n\tscn.text = list;\r\n\r\n\tNotifyParent(scn);\r\n}\r\n\r\nconst char *CharacterSetID(CharacterSet characterSet);\r\n\r\nconst char *ScintillaGTK::CharacterSetID() const {\r\n\treturn ::CharacterSetID(vs.styles[STYLE_DEFAULT].characterSet);\r\n}\r\n\r\nnamespace {\r\n\r\nclass CaseFolderDBCS : public CaseFolderTable {\r\n\tconst char *charSet;\r\npublic:\r\n\texplicit CaseFolderDBCS(const char *charSet_) noexcept : charSet(charSet_) {\r\n\t}\r\n\tsize_t Fold(char *folded, size_t sizeFolded, const char *mixed, size_t lenMixed) override {\r\n\t\tif ((lenMixed == 1) && (sizeFolded > 0)) {\r\n\t\t\tfolded[0] = mapping[static_cast<unsigned char>(mixed[0])];\r\n\t\t\treturn 1;\r\n\t\t} else if (*charSet) {\r\n\t\t\tstd::string sUTF8 = ConvertText(mixed, lenMixed,\r\n\t\t\t\t\t\t\t\"UTF-8\", charSet, false);\r\n\t\t\tif (!sUTF8.empty()) {\r\n\t\t\t\tUniqueStr mapped(g_utf8_casefold(sUTF8.c_str(), sUTF8.length()));\r\n\t\t\t\tsize_t lenMapped = strlen(mapped.get());\r\n\t\t\t\tif (lenMapped < sizeFolded) {\r\n\t\t\t\t\tmemcpy(folded, mapped.get(),  lenMapped);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfolded[0] = '\\0';\r\n\t\t\t\t\tlenMapped = 1;\r\n\t\t\t\t}\r\n\t\t\t\treturn lenMapped;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Something failed so return a single NUL byte\r\n\t\tfolded[0] = '\\0';\r\n\t\treturn 1;\r\n\t}\r\n};\r\n\r\n}\r\n\r\nstd::unique_ptr<CaseFolder> ScintillaGTK::CaseFolderForEncoding() {\r\n\tif (pdoc->dbcsCodePage == SC_CP_UTF8) {\r\n\t\treturn std::make_unique<CaseFolderUnicode>();\r\n\t} else {\r\n\t\tconst char *charSetBuffer = CharacterSetID();\r\n\t\tif (charSetBuffer) {\r\n\t\t\tif (pdoc->dbcsCodePage == 0) {\r\n\t\t\t\tstd::unique_ptr<CaseFolderTable> pcf = std::make_unique<CaseFolderTable>();\r\n\t\t\t\t// Only for single byte encodings\r\n\t\t\t\tfor (int i=0x80; i<0x100; i++) {\r\n\t\t\t\t\tchar sCharacter[2] = \"A\";\r\n\t\t\t\t\tsCharacter[0] = i;\r\n\t\t\t\t\t// Silent as some bytes have no assigned character\r\n\t\t\t\t\tstd::string sUTF8 = ConvertText(sCharacter, 1,\r\n\t\t\t\t\t\t\t\t\t\"UTF-8\", charSetBuffer, false, true);\r\n\t\t\t\t\tif (!sUTF8.empty()) {\r\n\t\t\t\t\t\tUniqueStr mapped(g_utf8_casefold(sUTF8.c_str(), sUTF8.length()));\r\n\t\t\t\t\t\tif (mapped) {\r\n\t\t\t\t\t\t\tstd::string mappedBack = ConvertText(mapped.get(), strlen(mapped.get()),\r\n\t\t\t\t\t\t\t\t\t\t\t     charSetBuffer, \"UTF-8\", false, true);\r\n\t\t\t\t\t\t\tif ((mappedBack.length() == 1) && (mappedBack[0] != sCharacter[0])) {\r\n\t\t\t\t\t\t\t\tpcf->SetTranslation(sCharacter[0], mappedBack[0]);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn pcf;\r\n\t\t\t} else {\r\n\t\t\t\treturn std::make_unique<CaseFolderDBCS>(charSetBuffer);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn nullptr;\r\n\t}\r\n}\r\n\r\nnamespace {\r\n\r\nstruct CaseMapper {\r\n\tUniqueStr mapped;\r\n\tCaseMapper(const std::string &sUTF8, bool toUpperCase) noexcept {\r\n\t\tif (toUpperCase) {\r\n\t\t\tmapped.reset(g_utf8_strup(sUTF8.c_str(), sUTF8.length()));\r\n\t\t} else {\r\n\t\t\tmapped.reset(g_utf8_strdown(sUTF8.c_str(), sUTF8.length()));\r\n\t\t}\r\n\t}\r\n};\r\n\r\n}\r\n\r\nstd::string ScintillaGTK::CaseMapString(const std::string &s, CaseMapping caseMapping) {\r\n\tif (s.empty() || (caseMapping == CaseMapping::same))\r\n\t\treturn s;\r\n\r\n\tif (IsUnicodeMode()) {\r\n\t\tstd::string retMapped(s.length() * maxExpansionCaseConversion, 0);\r\n\t\tconst size_t lenMapped = CaseConvertString(&retMapped[0], retMapped.length(), s.c_str(), s.length(),\r\n\t\t\t\t\t (caseMapping == CaseMapping::upper) ? CaseConversion::upper : CaseConversion::lower);\r\n\t\tretMapped.resize(lenMapped);\r\n\t\treturn retMapped;\r\n\t}\r\n\r\n\tconst char *charSetBuffer = CharacterSetID();\r\n\r\n\tif (!*charSetBuffer) {\r\n\t\tCaseMapper mapper(s, caseMapping == CaseMapping::upper);\r\n\t\treturn std::string(mapper.mapped.get());\r\n\t} else {\r\n\t\t// Change text to UTF-8\r\n\t\tstd::string sUTF8 = ConvertText(s.c_str(), s.length(),\r\n\t\t\t\t\t\t\"UTF-8\", charSetBuffer, false);\r\n\t\tCaseMapper mapper(sUTF8, caseMapping == CaseMapping::upper);\r\n\t\treturn ConvertText(mapper.mapped.get(), strlen(mapper.mapped.get()), charSetBuffer, \"UTF-8\", false);\r\n\t}\r\n}\r\n\r\nint ScintillaGTK::KeyDefault(Keys key, KeyMod modifiers) {\r\n\t// Pass up to container in case it is an accelerator\r\n\tNotifyKey(key, modifiers);\r\n\treturn 0;\r\n}\r\n\r\nvoid ScintillaGTK::CopyToClipboard(const SelectionText &selectedText) {\r\n\tSelectionText *clipText = new SelectionText();\r\n\tclipText->Copy(selectedText);\r\n\tStoreOnClipboard(clipText);\r\n}\r\n\r\nvoid ScintillaGTK::Copy() {\r\n\tif (!sel.Empty()) {\r\n\t\tSelectionText *clipText = new SelectionText();\r\n\t\tCopySelectionRange(clipText);\r\n\t\tStoreOnClipboard(clipText);\r\n#if PLAT_GTK_WIN32\r\n\t\tif (sel.IsRectangular()) {\r\n\t\t\t::OpenClipboard(NULL);\r\n\t\t\t::SetClipboardData(cfColumnSelect, 0);\r\n\t\t\t::CloseClipboard();\r\n\t\t}\r\n#endif\r\n\t}\r\n}\r\n\r\nnamespace {\r\n\r\n// Helper class for the asynchronous paste not to risk calling in a destroyed ScintillaGTK\r\n\r\nclass SelectionReceiver : GObjectWatcher {\r\n\tScintillaGTK *sci;\r\n\r\n\tvoid Destroyed() noexcept override {\r\n\t\tsci = nullptr;\r\n\t}\r\n\r\npublic:\r\n\tSelectionReceiver(ScintillaGTK *sci_) :\r\n\t\tGObjectWatcher(G_OBJECT(sci_->MainObject())),\r\n\t\tsci(sci_) {\r\n\t}\r\n\r\n\tstatic void ClipboardReceived(GtkClipboard *clipboard, GtkSelectionData *selection_data, gpointer data) noexcept {\r\n\t\tSelectionReceiver *self = static_cast<SelectionReceiver *>(data);\r\n\t\tif (self->sci) {\r\n\t\t\tself->sci->ReceivedClipboard(clipboard, selection_data);\r\n\t\t}\r\n\t\tdelete self;\r\n\t}\r\n};\r\n\r\n}\r\n\r\nvoid ScintillaGTK::RequestSelection(GdkAtom atomSelection) {\r\n\tatomSought = atomUTF8;\r\n\tGtkClipboard *clipBoard =\r\n\t\tgtk_widget_get_clipboard(GTK_WIDGET(PWidget(wMain)), atomSelection);\r\n\tif (clipBoard) {\r\n\t\tgtk_clipboard_request_contents(clipBoard, atomSought,\r\n\t\t\t\t\t       SelectionReceiver::ClipboardReceived,\r\n\t\t\t\t\t       new SelectionReceiver(this));\r\n\t}\r\n}\r\n\r\nvoid ScintillaGTK::Paste() {\r\n\tRequestSelection(GDK_SELECTION_CLIPBOARD);\r\n}\r\n\r\nvoid ScintillaGTK::CreateCallTipWindow(PRectangle rc) {\r\n\tif (!ct.wCallTip.Created()) {\r\n\t\tct.wCallTip = gtk_window_new(GTK_WINDOW_POPUP);\r\n\t\tgtk_window_set_type_hint(GTK_WINDOW(PWidget(ct.wCallTip)), GDK_WINDOW_TYPE_HINT_TOOLTIP);\r\n\t\tct.wDraw = gtk_drawing_area_new();\r\n\t\tGtkWidget *widcdrw = PWidget(ct.wDraw);\t//\t// No code inside the G_OBJECT macro\r\n\t\tgtk_container_add(GTK_CONTAINER(PWidget(ct.wCallTip)), widcdrw);\r\n#if GTK_CHECK_VERSION(3,0,0)\r\n\t\tg_signal_connect(G_OBJECT(widcdrw), \"draw\",\r\n\t\t\t\t G_CALLBACK(ScintillaGTK::DrawCT), &ct);\r\n#else\r\n\t\tg_signal_connect(G_OBJECT(widcdrw), \"expose_event\",\r\n\t\t\t\t G_CALLBACK(ScintillaGTK::ExposeCT), &ct);\r\n#endif\r\n\t\tg_signal_connect(G_OBJECT(widcdrw), \"button_press_event\",\r\n\t\t\t\t G_CALLBACK(ScintillaGTK::PressCT), this);\r\n\t\tgtk_widget_set_events(widcdrw,\r\n\t\t\t\t      GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK);\r\n\t\tGtkWidget *top = gtk_widget_get_toplevel(PWidget(wMain));\r\n\t\tgtk_window_set_transient_for(GTK_WINDOW(PWidget(ct.wCallTip)), GTK_WINDOW(top));\r\n\t}\r\n\tconst int width = static_cast<int>(rc.Width());\r\n\tconst int height = static_cast<int>(rc.Height());\r\n\tgtk_widget_set_size_request(PWidget(ct.wDraw), width, height);\r\n\tct.wDraw.Show();\r\n\tif (PWindow(ct.wCallTip)) {\r\n\t\tgdk_window_resize(PWindow(ct.wCallTip), width, height);\r\n\t}\r\n}\r\n\r\nvoid ScintillaGTK::AddToPopUp(const char *label, int cmd, bool enabled) {\r\n\tGtkWidget *menuItem;\r\n\tif (label[0])\r\n\t\tmenuItem = gtk_menu_item_new_with_label(label);\r\n\telse\r\n\t\tmenuItem = gtk_separator_menu_item_new();\r\n\tgtk_menu_shell_append(GTK_MENU_SHELL(popup.GetID()), menuItem);\r\n\tg_object_set_data(G_OBJECT(menuItem), \"CmdNum\", GINT_TO_POINTER(cmd));\r\n\tg_signal_connect(G_OBJECT(menuItem), \"activate\", G_CALLBACK(PopUpCB), this);\r\n\r\n\tif (cmd) {\r\n\t\tif (menuItem)\r\n\t\t\tgtk_widget_set_sensitive(menuItem, enabled);\r\n\t}\r\n}\r\n\r\nbool ScintillaGTK::OwnPrimarySelection() {\r\n\treturn primarySelection;\r\n}\r\n\r\nvoid ScintillaGTK::ClearPrimarySelection() {\r\n\tif (primarySelection) {\r\n\t\tinClearSelection++;\r\n\t\t// Calls PrimaryClearSelection: primarySelection -> false\r\n\t\tgtk_clipboard_clear(gtk_clipboard_get(GDK_SELECTION_PRIMARY));\r\n\t\tinClearSelection--;\r\n\t}\r\n}\r\n\r\nvoid ScintillaGTK::PrimaryGetSelectionThis(GtkClipboard *clip, GtkSelectionData *selection_data, guint info) {\r\n\ttry {\r\n\t\tif (SelectionOfGSD(selection_data) == GDK_SELECTION_PRIMARY) {\r\n\t\t\tif (primary.Empty()) {\r\n\t\t\t\tCopySelectionRange(&primary);\r\n\t\t\t}\r\n\t\t\tGetSelection(selection_data, info, &primary);\r\n\t\t}\r\n\t} catch (...) {\r\n\t\terrorStatus = Status::Failure;\r\n\t}\r\n}\r\n\r\nvoid ScintillaGTK::PrimaryGetSelection(GtkClipboard *clip, GtkSelectionData *selection_data, guint info, gpointer pSci) {\r\n\tstatic_cast<ScintillaGTK *>(pSci)->PrimaryGetSelectionThis(clip, selection_data, info);\r\n}\r\n\r\nvoid ScintillaGTK::PrimaryClearSelectionThis(GtkClipboard *clip) {\r\n\ttry {\r\n\t\tprimarySelection = false;\r\n\t\tprimary.Clear();\r\n\t\tif (!inClearSelection) {\r\n\t\t\t// Called because of another application or window claiming primary selection\r\n\t\t\t// so redraw to show selection in secondary colour.\r\n\t\t\tRedraw();\r\n\t\t}\r\n\t} catch (...) {\r\n\t\terrorStatus = Status::Failure;\r\n\t}\r\n}\r\n\r\nvoid ScintillaGTK::PrimaryClearSelection(GtkClipboard *clip, gpointer pSci) {\r\n\tstatic_cast<ScintillaGTK *>(pSci)->PrimaryClearSelectionThis(clip);\r\n}\r\n\r\nvoid ScintillaGTK::ClaimSelection() {\r\n\t// X Windows has a 'primary selection' as well as the clipboard.\r\n\t// Whenever the user selects some text, we become the primary selection\r\n\tClearPrimarySelection();\r\n\tif (!sel.Empty()) {\r\n\t\tif (gtk_clipboard_set_with_data(\r\n\t\t\tgtk_clipboard_get(GDK_SELECTION_PRIMARY),\r\n\t\t\tclipboardCopyTargets, nClipboardCopyTargets,\r\n\t\t\tPrimaryGetSelection,\r\n\t\t\tPrimaryClearSelection,\r\n\t\t\tthis)) {\r\n\t\t\tprimarySelection = true;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nbool ScintillaGTK::IsStringAtom(GdkAtom type) {\r\n\treturn (type == GDK_TARGET_STRING) || (type == atomUTF8) || (type == atomUTF8Mime);\r\n}\r\n\r\n// Detect rectangular text, convert line ends to current mode, convert from or to UTF-8\r\nvoid ScintillaGTK::GetGtkSelectionText(GtkSelectionData *selectionData, SelectionText &selText) {\r\n\tconst char *data = reinterpret_cast<const char *>(DataOfGSD(selectionData));\r\n\tint len = LengthOfGSD(selectionData);\r\n\tGdkAtom selectionTypeData = TypeOfGSD(selectionData);\r\n\r\n\t// Return empty string if selection is not a string\r\n\tif (!IsStringAtom(selectionTypeData)) {\r\n\t\tselText.Clear();\r\n\t\treturn;\r\n\t}\r\n\r\n\t// Check for \"\\n\\0\" ending to string indicating that selection is rectangular\r\n\tbool isRectangular;\r\n#if PLAT_GTK_WIN32\r\n\tisRectangular = ::IsClipboardFormatAvailable(cfColumnSelect) != 0;\r\n#else\r\n\tisRectangular = ((len > 2) && (data[len - 1] == 0 && data[len - 2] == '\\n'));\r\n\tif (isRectangular)\r\n\t\tlen--;\t// Forget the extra '\\0'\r\n#endif\r\n\r\n#if PLAT_GTK_WIN32\r\n\t// Win32 includes an ending '\\0' byte in 'len' for clipboard text from\r\n\t// external applications; ignore it.\r\n\tif ((len > 0) && (data[len - 1] == '\\0'))\r\n\t\tlen--;\r\n#endif\r\n\r\n\tstd::string dest(data, len);\r\n\tif (selectionTypeData == GDK_TARGET_STRING) {\r\n\t\tif (IsUnicodeMode()) {\r\n\t\t\t// Unknown encoding so assume in Latin1\r\n\t\t\tdest = UTF8FromLatin1(dest);\r\n\t\t\tselText.Copy(dest, CpUtf8, CharacterSet::Ansi, isRectangular, false);\r\n\t\t} else {\r\n\t\t\t// Assume buffer is in same encoding as selection\r\n\t\t\tselText.Copy(dest, pdoc->dbcsCodePage,\r\n\t\t\t\t     vs.styles[STYLE_DEFAULT].characterSet, isRectangular, false);\r\n\t\t}\r\n\t} else {\t// UTF-8\r\n\t\tconst char *charSetBuffer = CharacterSetID();\r\n\t\tif (!IsUnicodeMode() && *charSetBuffer) {\r\n\t\t\t// Convert to locale\r\n\t\t\tdest = ConvertText(dest.c_str(), dest.length(), charSetBuffer, \"UTF-8\", true);\r\n\t\t\tselText.Copy(dest, pdoc->dbcsCodePage,\r\n\t\t\t\t     vs.styles[STYLE_DEFAULT].characterSet, isRectangular, false);\r\n\t\t} else {\r\n\t\t\tselText.Copy(dest, CpUtf8, CharacterSet::Ansi, isRectangular, false);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid ScintillaGTK::InsertSelection(GtkClipboard *clipBoard, GtkSelectionData *selectionData) {\r\n\tconst gint length = gtk_selection_data_get_length(selectionData);\r\n\tconst GdkAtom selection = gtk_selection_data_get_selection(selectionData);\r\n\tif (length >= 0) {\r\n\t\tSelectionText selText;\r\n\t\tGetGtkSelectionText(selectionData, selText);\r\n\r\n\t\tUndoGroup ug(pdoc);\r\n\t\tif (selection == GDK_SELECTION_CLIPBOARD) {\r\n\t\t\tClearSelection(multiPasteMode == MultiPaste::Each);\r\n\t\t}\r\n\t\tif (selection == GDK_SELECTION_PRIMARY) {\r\n\t\t\tSetSelection(posPrimary, posPrimary);\r\n\t\t}\r\n\r\n\t\tInsertPasteShape(selText.Data(), selText.Length(),\r\n\t\t\t\t selText.rectangular ? PasteShape::rectangular : PasteShape::stream);\r\n\t\tEnsureCaretVisible();\r\n\t} else {\r\n\t\tif (selection == GDK_SELECTION_PRIMARY) {\r\n\t\t\tSetSelection(posPrimary, posPrimary);\r\n\t\t}\r\n\t\tGdkAtom target = gtk_selection_data_get_target(selectionData);\r\n\t\tif (target == atomUTF8) {\r\n\t\t\t// In case data is actually only stored as text/plain;charset=utf-8 not UTF8_STRING\r\n\t\t\tgtk_clipboard_request_contents(clipBoard, atomUTF8Mime,\r\n\t\t\t\t\t SelectionReceiver::ClipboardReceived,\r\n\t\t\t\t\t new SelectionReceiver(this)\r\n\t\t\t);\r\n\t\t}\r\n\t}\r\n\tRedraw();\r\n}\r\n\r\nGObject *ScintillaGTK::MainObject() const noexcept {\r\n\treturn G_OBJECT(PWidget(wMain));\r\n}\r\n\r\nvoid ScintillaGTK::ReceivedClipboard(GtkClipboard *clipBoard, GtkSelectionData *selection_data) noexcept {\r\n\ttry {\r\n\t\tInsertSelection(clipBoard, selection_data);\r\n\t} catch (...) {\r\n\t\terrorStatus = Status::Failure;\r\n\t}\r\n}\r\n\r\nvoid ScintillaGTK::ReceivedSelection(GtkSelectionData *selection_data) {\r\n\ttry {\r\n\t\tif ((SelectionOfGSD(selection_data) == GDK_SELECTION_CLIPBOARD) ||\r\n\t\t\t\t(SelectionOfGSD(selection_data) == GDK_SELECTION_PRIMARY)) {\r\n\t\t\tif ((atomSought == atomUTF8) && (LengthOfGSD(selection_data) <= 0)) {\r\n\t\t\t\tatomSought = atomString;\r\n\t\t\t\tgtk_selection_convert(GTK_WIDGET(PWidget(wMain)),\r\n\t\t\t\t\t\t      SelectionOfGSD(selection_data), atomSought, GDK_CURRENT_TIME);\r\n\t\t\t} else if ((LengthOfGSD(selection_data) > 0) && IsStringAtom(TypeOfGSD(selection_data))) {\r\n\t\t\t\tGtkClipboard *clipBoard = gtk_widget_get_clipboard(GTK_WIDGET(PWidget(wMain)), SelectionOfGSD(selection_data));\r\n\t\t\t\tInsertSelection(clipBoard, selection_data);\r\n\t\t\t}\r\n\t\t}\r\n//\telse fprintf(stderr, \"Target non string %d %d\\n\", (int)(selection_data->type),\r\n//\t\t(int)(atomUTF8));\r\n\t} catch (...) {\r\n\t\terrorStatus = Status::Failure;\r\n\t}\r\n}\r\n\r\nvoid ScintillaGTK::ReceivedDrop(GtkSelectionData *selection_data) {\r\n\tdragWasDropped = true;\r\n\tif (TypeOfGSD(selection_data) == atomUriList || TypeOfGSD(selection_data) == atomDROPFILES_DND) {\r\n\t\tconst char *data = reinterpret_cast<const char *>(DataOfGSD(selection_data));\r\n\t\tstd::vector<char> drop(data, data + LengthOfGSD(selection_data));\r\n\t\tdrop.push_back('\\0');\r\n\t\tNotifyURIDropped(&drop[0]);\r\n\t} else if (IsStringAtom(TypeOfGSD(selection_data))) {\r\n\t\tif (LengthOfGSD(selection_data) > 0) {\r\n\t\t\tSelectionText selText;\r\n\t\t\tGetGtkSelectionText(selection_data, selText);\r\n\t\t\tDropAt(posDrop, selText.Data(), selText.Length(), false, selText.rectangular);\r\n\t\t}\r\n\t} else if (LengthOfGSD(selection_data) > 0) {\r\n\t\t//~ fprintf(stderr, \"ReceivedDrop other %p\\n\", static_cast<void *>(selection_data->type));\r\n\t}\r\n\tRedraw();\r\n}\r\n\r\n\r\n\r\nvoid ScintillaGTK::GetSelection(GtkSelectionData *selection_data, guint info, SelectionText *text) {\r\n#if PLAT_GTK_WIN32\r\n\t// GDK on Win32 expands any \\n into \\r\\n, so make a copy of\r\n\t// the clip text now with newlines converted to \\n.  Use { } to hide symbols\r\n\t// from code below\r\n\tstd::unique_ptr<SelectionText> newline_normalized;\r\n\t{\r\n\t\tstd::string tmpstr = Document::TransformLineEnds(text->Data(), text->Length(), EndOfLine::Lf);\r\n\t\tnewline_normalized = std::make_unique<SelectionText>();\r\n\t\tnewline_normalized->Copy(tmpstr, CpUtf8, CharacterSet::Ansi, text->rectangular, false);\r\n\t\ttext = newline_normalized.get();\r\n\t}\r\n#endif\r\n\r\n\t// Convert text to utf8 if it isn't already\r\n\tstd::unique_ptr<SelectionText> converted;\r\n\tif ((text->codePage != SC_CP_UTF8) && (info == TARGET_UTF8_STRING)) {\r\n\t\tconst char *charSet = ::CharacterSetID(text->characterSet);\r\n\t\tif (*charSet) {\r\n\t\t\tstd::string tmputf = ConvertText(text->Data(), text->Length(), \"UTF-8\", charSet, false);\r\n\t\t\tconverted = std::make_unique<SelectionText>();\r\n\t\t\tconverted->Copy(tmputf, CpUtf8, CharacterSet::Ansi, text->rectangular, false);\r\n\t\t\ttext = converted.get();\r\n\t\t}\r\n\t}\r\n\r\n\t// Here is a somewhat evil kludge.\r\n\t// As I can not work out how to store data on the clipboard in multiple formats\r\n\t// and need some way to mark the clipping as being stream or rectangular,\r\n\t// the terminating \\0 is included in the length for rectangular clippings.\r\n\t// All other tested applications behave benignly by ignoring the \\0.\r\n\t// The #if is here because on Windows cfColumnSelect clip entry is used\r\n\t// instead as standard indicator of rectangularness (so no need to kludge)\r\n\tconst char *textData = text->Data();\r\n\tgint len = static_cast<gint>(text->Length());\r\n#if PLAT_GTK_WIN32 == 0\r\n\tif (text->rectangular)\r\n\t\tlen++;\r\n#endif\r\n\r\n\tif (info == TARGET_UTF8_STRING) {\r\n\t\tgtk_selection_data_set_text(selection_data, textData, len);\r\n\t} else {\r\n\t\tgtk_selection_data_set(selection_data,\r\n\t\t\t\t       static_cast<GdkAtom>(GDK_SELECTION_TYPE_STRING),\r\n\t\t\t\t       8, reinterpret_cast<const guchar *>(textData), len);\r\n\t}\r\n}\r\n\r\nvoid ScintillaGTK::StoreOnClipboard(SelectionText *clipText) {\r\n\tGtkClipboard *clipBoard =\r\n\t\tgtk_widget_get_clipboard(GTK_WIDGET(PWidget(wMain)), GDK_SELECTION_CLIPBOARD);\r\n\tif (clipBoard == nullptr) // Occurs if widget isn't in a toplevel\r\n\t\treturn;\r\n\r\n\tif (gtk_clipboard_set_with_data(clipBoard, clipboardCopyTargets, nClipboardCopyTargets,\r\n\t\t\t\t\tClipboardGetSelection, ClipboardClearSelection, clipText)) {\r\n\t\tgtk_clipboard_set_can_store(clipBoard, clipboardCopyTargets, nClipboardCopyTargets);\r\n\t}\r\n}\r\n\r\nvoid ScintillaGTK::ClipboardGetSelection(GtkClipboard *, GtkSelectionData *selection_data, guint info, void *data) {\r\n\tGetSelection(selection_data, info, static_cast<SelectionText *>(data));\r\n}\r\n\r\nvoid ScintillaGTK::ClipboardClearSelection(GtkClipboard *, void *data) {\r\n\tSelectionText *obj = static_cast<SelectionText *>(data);\r\n\tdelete obj;\r\n}\r\n\r\nvoid ScintillaGTK::UnclaimSelection(GdkEventSelection *selection_event) {\r\n\ttry {\r\n\t\t//Platform::DebugPrintf(\"UnclaimSelection\\n\");\r\n\t\tif (selection_event->selection == GDK_SELECTION_PRIMARY) {\r\n\t\t\t//Platform::DebugPrintf(\"UnclaimPrimarySelection\\n\");\r\n\t\t\tif (!OwnPrimarySelection()) {\r\n\t\t\t\tprimary.Clear();\r\n\t\t\t\tprimarySelection = false;\r\n\t\t\t\tFullPaint();\r\n\t\t\t}\r\n\t\t}\r\n\t} catch (...) {\r\n\t\terrorStatus = Status::Failure;\r\n\t}\r\n}\r\n\r\nvoid ScintillaGTK::Resize(int width, int height) {\r\n\t//Platform::DebugPrintf(\"Resize %d %d\\n\", width, height);\r\n\t//printf(\"Resize %d %d\\n\", width, height);\r\n\r\n\t// GTK+ 3 warns when we allocate smaller than the minimum allocation,\r\n\t// so we use these variables to store the minimum scrollbar lengths.\r\n\tint minVScrollBarHeight, minHScrollBarWidth;\r\n\r\n\t// Not always needed, but some themes can have different sizes of scrollbars\r\n#if GTK_CHECK_VERSION(3,0,0)\r\n\tGtkRequisition minimum, requisition;\r\n\tgtk_widget_get_preferred_size(PWidget(scrollbarv), &minimum, &requisition);\r\n\tminVScrollBarHeight = minimum.height;\r\n\tverticalScrollBarWidth = requisition.width;\r\n\tgtk_widget_get_preferred_size(PWidget(scrollbarh), &minimum, &requisition);\r\n\tminHScrollBarWidth = minimum.width;\r\n\thorizontalScrollBarHeight = requisition.height;\r\n#else\r\n\tminVScrollBarHeight = minHScrollBarWidth = 1;\r\n\tverticalScrollBarWidth = GTK_WIDGET(PWidget(scrollbarv))->requisition.width;\r\n\thorizontalScrollBarHeight = GTK_WIDGET(PWidget(scrollbarh))->requisition.height;\r\n#endif\r\n\r\n\t// These allocations should never produce negative sizes as they would wrap around to huge\r\n\t// unsigned numbers inside GTK+ causing warnings.\r\n\tconst bool showSBHorizontal = horizontalScrollBarVisible && !Wrapping();\r\n\r\n\tGtkAllocation alloc = {};\r\n\tif (showSBHorizontal) {\r\n\t\tgtk_widget_show(GTK_WIDGET(PWidget(scrollbarh)));\r\n\t\talloc.x = 0;\r\n\t\talloc.y = height - horizontalScrollBarHeight;\r\n\t\talloc.width = std::max(minHScrollBarWidth, width - verticalScrollBarWidth);\r\n\t\talloc.height = horizontalScrollBarHeight;\r\n\t\tgtk_widget_size_allocate(GTK_WIDGET(PWidget(scrollbarh)), &alloc);\r\n\t} else {\r\n\t\tgtk_widget_hide(GTK_WIDGET(PWidget(scrollbarh)));\r\n\t\thorizontalScrollBarHeight = 0; // in case horizontalScrollBarVisible is true.\r\n\t}\r\n\r\n\tif (verticalScrollBarVisible) {\r\n\t\tgtk_widget_show(GTK_WIDGET(PWidget(scrollbarv)));\r\n\t\talloc.x = width - verticalScrollBarWidth;\r\n\t\talloc.y = 0;\r\n\t\talloc.width = verticalScrollBarWidth;\r\n\t\talloc.height = std::max(minVScrollBarHeight, height - horizontalScrollBarHeight);\r\n\t\tgtk_widget_size_allocate(GTK_WIDGET(PWidget(scrollbarv)), &alloc);\r\n\t} else {\r\n\t\tgtk_widget_hide(GTK_WIDGET(PWidget(scrollbarv)));\r\n\t\tverticalScrollBarWidth = 0;\r\n\t}\r\n\tSetClientRectangle();\r\n\tif (IS_WIDGET_MAPPED(PWidget(wMain))) {\r\n\t\tChangeSize();\r\n\t} else {\r\n\t\tconst PRectangle rcTextArea = GetTextRectangle();\r\n\t\tif (wrapWidth != rcTextArea.Width()) {\r\n\t\t\twrapWidth = rcTextArea.Width();\r\n\t\t\tNeedWrapping();\r\n\t\t}\r\n\t}\r\n\r\n\talloc.x = 0;\r\n\talloc.y = 0;\r\n\talloc.width = 1;\r\n\talloc.height = 1;\r\n#if GTK_CHECK_VERSION(3, 0, 0)\r\n\t// please GTK 3.20 and ask wText what size it wants, although we know it doesn't really need\r\n\t// anything special as it's ours.\r\n\tgtk_widget_get_preferred_size(PWidget(wText), &requisition, nullptr);\r\n\talloc.width = requisition.width;\r\n\talloc.height = requisition.height;\r\n#endif\r\n\talloc.width = std::max(alloc.width, width - verticalScrollBarWidth);\r\n\talloc.height = std::max(alloc.height, height - horizontalScrollBarHeight);\r\n\tgtk_widget_size_allocate(GTK_WIDGET(PWidget(wText)), &alloc);\r\n}\r\n\r\nnamespace {\r\n\r\nvoid SetAdjustmentValue(GtkAdjustment *object, int value) noexcept {\r\n\tGtkAdjustment *adjustment = GTK_ADJUSTMENT(object);\r\n\tconst int maxValue = static_cast<int>(\r\n\t\t\t\t     gtk_adjustment_get_upper(adjustment) - gtk_adjustment_get_page_size(adjustment));\r\n\r\n\tif (value > maxValue)\r\n\t\tvalue = maxValue;\r\n\tif (value < 0)\r\n\t\tvalue = 0;\r\n\tgtk_adjustment_set_value(adjustment, value);\r\n}\r\n\r\nint modifierTranslated(int sciModifier) noexcept {\r\n\tswitch (sciModifier) {\r\n\tcase SCMOD_SHIFT:\r\n\t\treturn GDK_SHIFT_MASK;\r\n\tcase SCMOD_CTRL:\r\n\t\treturn GDK_CONTROL_MASK;\r\n\tcase SCMOD_ALT:\r\n\t\treturn GDK_MOD1_MASK;\r\n\tcase SCMOD_SUPER:\r\n\t\treturn GDK_MOD4_MASK;\r\n\tdefault:\r\n\t\treturn 0;\r\n\t}\r\n}\r\n\r\nPoint PointOfEvent(const GdkEventButton *event) noexcept {\r\n\t// Use floor as want to round in the same direction (-infinity) so\r\n\t// there is no stickiness crossing 0.0.\r\n\treturn Point(static_cast<XYPOSITION>(std::floor(event->x)), static_cast<XYPOSITION>(std::floor(event->y)));\r\n}\r\n\r\n}\r\n\r\ngint ScintillaGTK::PressThis(GdkEventButton *event) {\r\n\ttry {\r\n\t\t//Platform::DebugPrintf(\"Press %x time=%d state = %x button = %x\\n\",this,event->time, event->state, event->button);\r\n\t\t// Do not use GTK+ double click events as Scintilla has its own double click detection\r\n\t\tif (event->type != GDK_BUTTON_PRESS)\r\n\t\t\treturn FALSE;\r\n\r\n\t\tevbtn.reset(gdk_event_copy(reinterpret_cast<GdkEvent *>(event)));\r\n\t\tbuttonMouse = event->button;\r\n\t\tconst Point pt = PointOfEvent(event);\r\n\t\tconst PRectangle rcClient = GetClientRectangle();\r\n\t\t//Platform::DebugPrintf(\"Press %0d,%0d in %0d,%0d %0d,%0d\\n\",\r\n\t\t//\tpt.x, pt.y, rcClient.left, rcClient.top, rcClient.right, rcClient.bottom);\r\n\t\tif ((pt.x > rcClient.right) || (pt.y > rcClient.bottom)) {\r\n\t\t\tPlatform::DebugPrintf(\"Bad location\\n\");\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\r\n\t\tconst bool shift = (event->state & GDK_SHIFT_MASK) != 0;\r\n\t\tbool ctrl = (event->state & GDK_CONTROL_MASK) != 0;\r\n\t\t// On X, instead of sending literal modifiers use the user specified\r\n\t\t// modifier, defaulting to control instead of alt.\r\n\t\t// This is because most X window managers grab alt + click for moving\r\n\t\tconst bool alt = (event->state & modifierTranslated(rectangularSelectionModifier)) != 0;\r\n\r\n\t\tgtk_widget_grab_focus(PWidget(wMain));\r\n\t\tif (event->button == 1) {\r\n#if PLAT_GTK_MACOSX\r\n\t\t\tconst bool meta = ctrl;\r\n\t\t\t// GDK reports the Command modifier key as GDK_MOD2_MASK for button events,\r\n\t\t\t// not GDK_META_MASK like in key events.\r\n\t\t\tctrl = (event->state & GDK_MOD2_MASK) != 0;\r\n#else\r\n\t\t\tconst bool meta = false;\r\n#endif\r\n\t\t\tButtonDownWithModifiers(pt, event->time, ModifierFlags(shift, ctrl, alt, meta));\r\n\t\t} else if (event->button == 2) {\r\n\t\t\t// Grab the primary selection if it exists\r\n\t\t\tposPrimary = SPositionFromLocation(pt, false, false, UserVirtualSpace());\r\n\t\t\tif (OwnPrimarySelection() && primary.Empty())\r\n\t\t\t\tCopySelectionRange(&primary);\r\n\r\n\t\t\tsel.Clear();\r\n\t\t\tRequestSelection(GDK_SELECTION_PRIMARY);\r\n\t\t} else if (event->button == 3) {\r\n\t\t\tif (!PointInSelection(pt))\r\n\t\t\t\tSetEmptySelection(PositionFromLocation(pt));\r\n\t\t\tif (ShouldDisplayPopup(pt)) {\r\n\t\t\t\t// PopUp menu\r\n\t\t\t\t// Convert to screen\r\n\t\t\t\tint ox = 0;\r\n\t\t\t\tint oy = 0;\r\n\t\t\t\tgdk_window_get_origin(PWindow(wMain), &ox, &oy);\r\n\t\t\t\tContextMenu(Point(pt.x + ox, pt.y + oy));\r\n\t\t\t} else {\r\n#if PLAT_GTK_MACOSX\r\n\t\t\t\tconst bool meta = ctrl;\r\n\t\t\t\t// GDK reports the Command modifier key as GDK_MOD2_MASK for button events,\r\n\t\t\t\t// not GDK_META_MASK like in key events.\r\n\t\t\t\tctrl = (event->state & GDK_MOD2_MASK) != 0;\r\n#else\r\n\t\t\t\tconst bool meta = false;\r\n#endif\r\n\t\t\t\tRightButtonDownWithModifiers(pt, event->time, ModifierFlags(shift, ctrl, alt, meta));\r\n\t\t\t\treturn FALSE;\r\n\t\t\t}\r\n\t\t} else if (event->button == 4) {\r\n\t\t\t// Wheel scrolling up (only GTK 1.x does it this way)\r\n\t\t\tif (ctrl)\r\n\t\t\t\tSetAdjustmentValue(adjustmenth, xOffset - 6);\r\n\t\t\telse\r\n\t\t\t\tSetAdjustmentValue(adjustmentv, static_cast<int>(topLine) - 3);\r\n\t\t} else if (event->button == 5) {\r\n\t\t\t// Wheel scrolling down (only GTK 1.x does it this way)\r\n\t\t\tif (ctrl)\r\n\t\t\t\tSetAdjustmentValue(adjustmenth, xOffset + 6);\r\n\t\t\telse\r\n\t\t\t\tSetAdjustmentValue(adjustmentv, static_cast<int>(topLine) + 3);\r\n\t\t}\r\n\t} catch (...) {\r\n\t\terrorStatus = Status::Failure;\r\n\t}\r\n\treturn TRUE;\r\n}\r\n\r\ngint ScintillaGTK::Press(GtkWidget *widget, GdkEventButton *event) {\r\n\tif (event->window != WindowFromWidget(widget))\r\n\t\treturn FALSE;\r\n\tScintillaGTK *sciThis = FromWidget(widget);\r\n\treturn sciThis->PressThis(event);\r\n}\r\n\r\ngint ScintillaGTK::MouseRelease(GtkWidget *widget, GdkEventButton *event) {\r\n\tScintillaGTK *sciThis = FromWidget(widget);\r\n\ttry {\r\n\t\t//Platform::DebugPrintf(\"Release %x %d %d\\n\",sciThis,event->time,event->state);\r\n\t\tif (!sciThis->HaveMouseCapture())\r\n\t\t\treturn FALSE;\r\n\t\tif (event->button == 1) {\r\n\t\t\tPoint pt = PointOfEvent(event);\r\n\t\t\t//Platform::DebugPrintf(\"Up %x %x %d %d %d\\n\",\r\n\t\t\t//\tsciThis,event->window,event->time, pt.x, pt.y);\r\n\t\t\tif (event->window != PWindow(sciThis->wMain))\r\n\t\t\t\t// If mouse released on scroll bar then the position is relative to the\r\n\t\t\t\t// scrollbar, not the drawing window so just repeat the most recent point.\r\n\t\t\t\tpt = sciThis->ptMouseLast;\r\n\t\t\tconst KeyMod modifiers = ModifierFlags(\r\n\t\t\t\t\t\t      (event->state & GDK_SHIFT_MASK) != 0,\r\n\t\t\t\t\t\t      (event->state & GDK_CONTROL_MASK) != 0,\r\n\t\t\t\t\t\t      (event->state & modifierTranslated(sciThis->rectangularSelectionModifier)) != 0);\r\n\t\t\tsciThis->ButtonUpWithModifiers(pt, event->time, modifiers);\r\n\t\t}\r\n\t} catch (...) {\r\n\t\tsciThis->errorStatus = Status::Failure;\r\n\t}\r\n\treturn FALSE;\r\n}\r\n\r\n// win32gtk and GTK >= 2 use SCROLL_* events instead of passing the\r\n// button4/5/6/7 events to the GTK app\r\ngint ScintillaGTK::ScrollEvent(GtkWidget *widget, GdkEventScroll *event) {\r\n\tScintillaGTK *sciThis = FromWidget(widget);\r\n\ttry {\r\n\r\n\t\tif (widget == nullptr || event == nullptr)\r\n\t\t\treturn FALSE;\r\n\r\n#if defined(GDK_WINDOWING_WAYLAND)\r\n\t\tif (event->direction == GDK_SCROLL_SMOOTH && GDK_IS_WAYLAND_WINDOW(event->window)) {\r\n\t\t\tconst int smoothScrollFactor = 4;\r\n\t\t\tsciThis->smoothScrollY += event->delta_y * smoothScrollFactor;\r\n\t\t\tsciThis->smoothScrollX += event->delta_x * smoothScrollFactor;;\r\n\t\t\tif (ABS(sciThis->smoothScrollY) >= 1.0) {\r\n\t\t\t\tconst int scrollLines = std::trunc(sciThis->smoothScrollY);\r\n\t\t\t\tsciThis->ScrollTo(sciThis->topLine + scrollLines);\r\n\t\t\t\tsciThis->smoothScrollY -= scrollLines;\r\n\t\t\t}\r\n\t\t\tif (ABS(sciThis->smoothScrollX) >= 1.0) {\r\n\t\t\t\tconst int scrollPixels = std::trunc(sciThis->smoothScrollX);\r\n\t\t\t\tsciThis->HorizontalScrollTo(sciThis->xOffset + scrollPixels);\r\n\t\t\t\tsciThis->smoothScrollX -= scrollPixels;\r\n\t\t\t}\r\n\t\t\treturn TRUE;\r\n\t\t}\r\n#endif\r\n\r\n\t\t// Compute amount and direction to scroll (even tho on win32 there is\r\n\t\t// intensity of scrolling info in the native message, gtk doesn't\r\n\t\t// support this so we simulate similarly adaptive scrolling)\r\n\t\t// Note that this is disabled on macOS (Darwin) with the X11 backend\r\n\t\t// where the X11 server already has an adaptive scrolling algorithm\r\n\t\t// that fights with this one\r\n\t\tint cLineScroll;\r\n#if (defined(__APPLE__) || defined(PLAT_GTK_WIN32)) && !defined(GDK_WINDOWING_QUARTZ)\r\n\t\tcLineScroll = sciThis->linesPerScroll;\r\n\t\tif (cLineScroll == 0)\r\n\t\t\tcLineScroll = 4;\r\n\t\tsciThis->wheelMouseIntensity = cLineScroll;\r\n#else\r\n\t\tconst gint64 curTime = g_get_monotonic_time();\r\n\t\tconst gint64 timeDelta = curTime - sciThis->lastWheelMouseTime;\r\n\t\tif ((event->direction == sciThis->lastWheelMouseDirection) && (timeDelta < 250000)) {\r\n\t\t\tif (sciThis->wheelMouseIntensity < 12)\r\n\t\t\t\tsciThis->wheelMouseIntensity++;\r\n\t\t\tcLineScroll = sciThis->wheelMouseIntensity;\r\n\t\t} else {\r\n\t\t\tcLineScroll = sciThis->linesPerScroll;\r\n\t\t\tif (cLineScroll == 0)\r\n\t\t\t\tcLineScroll = 4;\r\n\t\t\tsciThis->wheelMouseIntensity = cLineScroll;\r\n\t\t}\r\n\t\tsciThis->lastWheelMouseTime = curTime;\r\n#endif\r\n\t\tif (event->direction == GDK_SCROLL_UP || event->direction == GDK_SCROLL_LEFT) {\r\n\t\t\tcLineScroll *= -1;\r\n\t\t}\r\n\t\tsciThis->lastWheelMouseDirection = event->direction;\r\n\r\n\t\t// Note:  Unpatched versions of win32gtk don't set the 'state' value so\r\n\t\t// only regular scrolling is supported there.  Also, unpatched win32gtk\r\n\t\t// issues spurious button 2 mouse events during wheeling, which can cause\r\n\t\t// problems (a patch for both was submitted by archaeopteryx.com on 13Jun2001)\r\n\r\n#if GTK_CHECK_VERSION(3,4,0)\r\n\t\t// Smooth scrolling not supported\r\n\t\tif (event->direction == GDK_SCROLL_SMOOTH) {\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n#endif\r\n\r\n\t\t// Horizontal scrolling\r\n\t\tif (event->direction == GDK_SCROLL_LEFT || event->direction == GDK_SCROLL_RIGHT || event->state & GDK_SHIFT_MASK) {\r\n\t\t\tint hScroll = gtk_adjustment_get_step_increment(sciThis->adjustmenth);\r\n\t\t\thScroll *= cLineScroll; // scroll by this many characters\r\n\t\t\tsciThis->HorizontalScrollTo(sciThis->xOffset + hScroll);\r\n\r\n\t\t\t// Text font size zoom\r\n\t\t} else if (event->state & GDK_CONTROL_MASK) {\r\n\t\t\tif (cLineScroll < 0) {\r\n\t\t\t\tsciThis->KeyCommand(Message::ZoomIn);\r\n\t\t\t} else {\r\n\t\t\t\tsciThis->KeyCommand(Message::ZoomOut);\r\n\t\t\t}\r\n\r\n\t\t\t// Regular scrolling\r\n\t\t} else {\r\n\t\t\tsciThis->ScrollTo(sciThis->topLine + cLineScroll);\r\n\t\t}\r\n\t\treturn TRUE;\r\n\t} catch (...) {\r\n\t\tsciThis->errorStatus = Status::Failure;\r\n\t}\r\n\treturn FALSE;\r\n}\r\n\r\ngint ScintillaGTK::Motion(GtkWidget *widget, GdkEventMotion *event) {\r\n\tScintillaGTK *sciThis = FromWidget(widget);\r\n\ttry {\r\n\t\t//Platform::DebugPrintf(\"Motion %x %d\\n\",sciThis,event->time);\r\n\t\tif (event->window != WindowFromWidget(widget))\r\n\t\t\treturn FALSE;\r\n\t\tint x = 0;\r\n\t\tint y = 0;\r\n\t\tGdkModifierType state {};\r\n\t\tif (event->is_hint) {\r\n#if GTK_CHECK_VERSION(3,0,0)\r\n\t\t\tgdk_window_get_device_position(event->window,\r\n\t\t\t\t\t\t       event->device, &x, &y, &state);\r\n#else\r\n\t\t\tgdk_window_get_pointer(event->window, &x, &y, &state);\r\n#endif\r\n\t\t} else {\r\n\t\t\tx = static_cast<int>(event->x);\r\n\t\t\ty = static_cast<int>(event->y);\r\n\t\t\tstate = static_cast<GdkModifierType>(event->state);\r\n\t\t}\r\n\t\t//Platform::DebugPrintf(\"Move %x %x %d %c %d %d\\n\",\r\n\t\t//\tsciThis,event->window,event->time,event->is_hint? 'h' :'.', x, y);\r\n\t\tconst Point pt(static_cast<XYPOSITION>(x), static_cast<XYPOSITION>(y));\r\n\t\tconst KeyMod modifiers = ModifierFlags(\r\n\t\t\t\t\t      (event->state & GDK_SHIFT_MASK) != 0,\r\n\t\t\t\t\t      (event->state & GDK_CONTROL_MASK) != 0,\r\n\t\t\t\t\t      (event->state & modifierTranslated(sciThis->rectangularSelectionModifier)) != 0);\r\n\t\tsciThis->ButtonMoveWithModifiers(pt, event->time, modifiers);\r\n\t} catch (...) {\r\n\t\tsciThis->errorStatus = Status::Failure;\r\n\t}\r\n\treturn FALSE;\r\n}\r\n\r\nnamespace {\r\n\r\n// Map the keypad keys to their equivalent functions\r\nint KeyTranslate(int keyIn) noexcept {\r\n\tswitch (keyIn) {\r\n#if GTK_CHECK_VERSION(3,0,0)\r\n\tcase GDK_KEY_ISO_Left_Tab:\r\n\t\treturn SCK_TAB;\r\n\tcase GDK_KEY_KP_Down:\r\n\t\treturn SCK_DOWN;\r\n\tcase GDK_KEY_KP_Up:\r\n\t\treturn SCK_UP;\r\n\tcase GDK_KEY_KP_Left:\r\n\t\treturn SCK_LEFT;\r\n\tcase GDK_KEY_KP_Right:\r\n\t\treturn SCK_RIGHT;\r\n\tcase GDK_KEY_KP_Home:\r\n\t\treturn SCK_HOME;\r\n\tcase GDK_KEY_KP_End:\r\n\t\treturn SCK_END;\r\n\tcase GDK_KEY_KP_Page_Up:\r\n\t\treturn SCK_PRIOR;\r\n\tcase GDK_KEY_KP_Page_Down:\r\n\t\treturn SCK_NEXT;\r\n\tcase GDK_KEY_KP_Delete:\r\n\t\treturn SCK_DELETE;\r\n\tcase GDK_KEY_KP_Insert:\r\n\t\treturn SCK_INSERT;\r\n\tcase GDK_KEY_KP_Enter:\r\n\t\treturn SCK_RETURN;\r\n\r\n\tcase GDK_KEY_Down:\r\n\t\treturn SCK_DOWN;\r\n\tcase GDK_KEY_Up:\r\n\t\treturn SCK_UP;\r\n\tcase GDK_KEY_Left:\r\n\t\treturn SCK_LEFT;\r\n\tcase GDK_KEY_Right:\r\n\t\treturn SCK_RIGHT;\r\n\tcase GDK_KEY_Home:\r\n\t\treturn SCK_HOME;\r\n\tcase GDK_KEY_End:\r\n\t\treturn SCK_END;\r\n\tcase GDK_KEY_Page_Up:\r\n\t\treturn SCK_PRIOR;\r\n\tcase GDK_KEY_Page_Down:\r\n\t\treturn SCK_NEXT;\r\n\tcase GDK_KEY_Delete:\r\n\t\treturn SCK_DELETE;\r\n\tcase GDK_KEY_Insert:\r\n\t\treturn SCK_INSERT;\r\n\tcase GDK_KEY_Escape:\r\n\t\treturn SCK_ESCAPE;\r\n\tcase GDK_KEY_BackSpace:\r\n\t\treturn SCK_BACK;\r\n\tcase GDK_KEY_Tab:\r\n\t\treturn SCK_TAB;\r\n\tcase GDK_KEY_Return:\r\n\t\treturn SCK_RETURN;\r\n\tcase GDK_KEY_KP_Add:\r\n\t\treturn SCK_ADD;\r\n\tcase GDK_KEY_KP_Subtract:\r\n\t\treturn SCK_SUBTRACT;\r\n\tcase GDK_KEY_KP_Divide:\r\n\t\treturn SCK_DIVIDE;\r\n\tcase GDK_KEY_Super_L:\r\n\t\treturn SCK_WIN;\r\n\tcase GDK_KEY_Super_R:\r\n\t\treturn SCK_RWIN;\r\n\tcase GDK_KEY_Menu:\r\n\t\treturn SCK_MENU;\r\n\r\n#else\r\n\r\n\tcase GDK_ISO_Left_Tab:\r\n\t\treturn SCK_TAB;\r\n\tcase GDK_KP_Down:\r\n\t\treturn SCK_DOWN;\r\n\tcase GDK_KP_Up:\r\n\t\treturn SCK_UP;\r\n\tcase GDK_KP_Left:\r\n\t\treturn SCK_LEFT;\r\n\tcase GDK_KP_Right:\r\n\t\treturn SCK_RIGHT;\r\n\tcase GDK_KP_Home:\r\n\t\treturn SCK_HOME;\r\n\tcase GDK_KP_End:\r\n\t\treturn SCK_END;\r\n\tcase GDK_KP_Page_Up:\r\n\t\treturn SCK_PRIOR;\r\n\tcase GDK_KP_Page_Down:\r\n\t\treturn SCK_NEXT;\r\n\tcase GDK_KP_Delete:\r\n\t\treturn SCK_DELETE;\r\n\tcase GDK_KP_Insert:\r\n\t\treturn SCK_INSERT;\r\n\tcase GDK_KP_Enter:\r\n\t\treturn SCK_RETURN;\r\n\r\n\tcase GDK_Down:\r\n\t\treturn SCK_DOWN;\r\n\tcase GDK_Up:\r\n\t\treturn SCK_UP;\r\n\tcase GDK_Left:\r\n\t\treturn SCK_LEFT;\r\n\tcase GDK_Right:\r\n\t\treturn SCK_RIGHT;\r\n\tcase GDK_Home:\r\n\t\treturn SCK_HOME;\r\n\tcase GDK_End:\r\n\t\treturn SCK_END;\r\n\tcase GDK_Page_Up:\r\n\t\treturn SCK_PRIOR;\r\n\tcase GDK_Page_Down:\r\n\t\treturn SCK_NEXT;\r\n\tcase GDK_Delete:\r\n\t\treturn SCK_DELETE;\r\n\tcase GDK_Insert:\r\n\t\treturn SCK_INSERT;\r\n\tcase GDK_Escape:\r\n\t\treturn SCK_ESCAPE;\r\n\tcase GDK_BackSpace:\r\n\t\treturn SCK_BACK;\r\n\tcase GDK_Tab:\r\n\t\treturn SCK_TAB;\r\n\tcase GDK_Return:\r\n\t\treturn SCK_RETURN;\r\n\tcase GDK_KP_Add:\r\n\t\treturn SCK_ADD;\r\n\tcase GDK_KP_Subtract:\r\n\t\treturn SCK_SUBTRACT;\r\n\tcase GDK_KP_Divide:\r\n\t\treturn SCK_DIVIDE;\r\n\tcase GDK_Super_L:\r\n\t\treturn SCK_WIN;\r\n\tcase GDK_Super_R:\r\n\t\treturn SCK_RWIN;\r\n\tcase GDK_Menu:\r\n\t\treturn SCK_MENU;\r\n#endif\r\n\tdefault:\r\n\t\treturn keyIn;\r\n\t}\r\n}\r\n\r\n}\r\n\r\ngboolean ScintillaGTK::KeyThis(GdkEventKey *event) {\r\n\ttry {\r\n\t\t//fprintf(stderr, \"SC-key: %d %x [%s]\\n\",\r\n\t\t//\tevent->keyval, event->state, (event->length > 0) ? event->string : \"empty\");\r\n\t\tif (gtk_im_context_filter_keypress(im_context.get(), event)) {\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\tif (!event->keyval) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tconst bool shift = (event->state & GDK_SHIFT_MASK) != 0;\r\n\t\tbool ctrl = (event->state & GDK_CONTROL_MASK) != 0;\r\n\t\tconst bool alt = (event->state & GDK_MOD1_MASK) != 0;\r\n\t\tconst bool super = (event->state & GDK_MOD4_MASK) != 0;\r\n\t\tguint key = event->keyval;\r\n\t\tif ((ctrl || alt) && (key < 128))\r\n\t\t\tkey = toupper(key);\r\n#if GTK_CHECK_VERSION(3,0,0)\r\n\t\telse if (!ctrl && (key >= GDK_KEY_KP_Multiply && key <= GDK_KEY_KP_9))\r\n#else\r\n\t\telse if (!ctrl && (key >= GDK_KP_Multiply && key <= GDK_KP_9))\r\n#endif\r\n\t\t\tkey &= 0x7F;\r\n\t\t// Hack for keys over 256 and below command keys but makes Hungarian work.\r\n\t\t// This will have to change for Unicode\r\n\t\telse if (key >= 0xFE00)\r\n\t\t\tkey = KeyTranslate(key);\r\n\r\n\t\tbool consumed = false;\r\n#if !(PLAT_GTK_MACOSX)\r\n\t\tconst bool meta = false;\r\n#else\r\n\t\tconst bool meta = ctrl;\r\n\t\tctrl = (event->state & GDK_META_MASK) != 0;\r\n#endif\r\n\t\tconst bool added = KeyDownWithModifiers(static_cast<Keys>(key), ModifierFlags(shift, ctrl, alt, meta, super), &consumed) != 0;\r\n\t\tif (!consumed)\r\n\t\t\tconsumed = added;\r\n\t\t//fprintf(stderr, \"SK-key: %d %x %x\\n\",event->keyval, event->state, consumed);\r\n\t\tif (event->keyval == 0xffffff && event->length > 0) {\r\n\t\t\tClearSelection();\r\n\t\t\tconst Sci::Position lengthInserted = pdoc->InsertString(CurrentPosition(), event->string, strlen(event->string));\r\n\t\t\tif (lengthInserted > 0) {\r\n\t\t\t\tMovePositionTo(CurrentPosition() + lengthInserted);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn consumed;\r\n\t} catch (...) {\r\n\t\terrorStatus = Status::Failure;\r\n\t}\r\n\treturn FALSE;\r\n}\r\n\r\ngboolean ScintillaGTK::KeyPress(GtkWidget *widget, GdkEventKey *event) {\r\n\tScintillaGTK *sciThis = FromWidget(widget);\r\n\treturn sciThis->KeyThis(event);\r\n}\r\n\r\ngboolean ScintillaGTK::KeyRelease(GtkWidget *widget, GdkEventKey *event) {\r\n\t//Platform::DebugPrintf(\"SC-keyrel: %d %x %3s\\n\",event->keyval, event->state, event->string);\r\n\tScintillaGTK *sciThis = FromWidget(widget);\r\n\tif (gtk_im_context_filter_keypress(sciThis->im_context.get(), event)) {\r\n\t\treturn TRUE;\r\n\t}\r\n\treturn FALSE;\r\n}\r\n\r\n#if GTK_CHECK_VERSION(3,0,0)\r\n\r\ngboolean ScintillaGTK::DrawPreeditThis(GtkWidget *, cairo_t *cr) {\r\n\ttry {\r\n\t\tPreEditString pes(im_context.get());\r\n\t\tUniquePangoLayout layout(gtk_widget_create_pango_layout(PWidget(wText), pes.str));\r\n\t\tpango_layout_set_attributes(layout.get(), pes.attrs);\r\n\r\n\t\tcairo_move_to(cr, 0, 0);\r\n\t\tpango_cairo_show_layout(cr, layout.get());\r\n\t} catch (...) {\r\n\t\terrorStatus = Status::Failure;\r\n\t}\r\n\treturn TRUE;\r\n}\r\n\r\ngboolean ScintillaGTK::DrawPreedit(GtkWidget *widget, cairo_t *cr, ScintillaGTK *sciThis) {\r\n\treturn sciThis->DrawPreeditThis(widget, cr);\r\n}\r\n\r\n#else\r\n\r\ngboolean ScintillaGTK::ExposePreeditThis(GtkWidget *widget, GdkEventExpose *) {\r\n\ttry {\r\n\t\tPreEditString pes(im_context.get());\r\n\t\tUniquePangoLayout layout(gtk_widget_create_pango_layout(PWidget(wText), pes.str));\r\n\t\tpango_layout_set_attributes(layout.get(), pes.attrs);\r\n\r\n\t\tUniqueCairo context(gdk_cairo_create(WindowFromWidget(widget)));\r\n\t\tcairo_move_to(context.get(), 0, 0);\r\n\t\tpango_cairo_show_layout(context.get(), layout.get());\r\n\t} catch (...) {\r\n\t\terrorStatus = Status::Failure;\r\n\t}\r\n\treturn TRUE;\r\n}\r\n\r\ngboolean ScintillaGTK::ExposePreedit(GtkWidget *widget, GdkEventExpose *ose, ScintillaGTK *sciThis) {\r\n\treturn sciThis->ExposePreeditThis(widget, ose);\r\n}\r\n\r\n#endif\r\n\r\nbool ScintillaGTK::KoreanIME() {\r\n\tPreEditString pes(im_context.get());\r\n\tif (pes.pscript != G_UNICODE_SCRIPT_COMMON)\r\n\t\tlastNonCommonScript = pes.pscript;\r\n\treturn lastNonCommonScript == G_UNICODE_SCRIPT_HANGUL;\r\n}\r\n\r\nvoid ScintillaGTK::MoveImeCarets(Sci::Position pos) {\r\n\t// Move carets relatively by bytes\r\n\tfor (size_t r=0; r<sel.Count(); r++) {\r\n\t\tconst Sci::Position positionInsert = sel.Range(r).Start().Position();\r\n\t\tsel.Range(r).caret.SetPosition(positionInsert + pos);\r\n\t\tsel.Range(r).anchor.SetPosition(positionInsert + pos);\r\n\t}\r\n}\r\n\r\nvoid ScintillaGTK::DrawImeIndicator(int indicator, Sci::Position len) {\r\n\t// Emulate the visual style of IME characters with indicators.\r\n\t// Draw an indicator on the character before caret by the character bytes of len\r\n\t// so it should be called after InsertCharacter().\r\n\t// It does not affect caret positions.\r\n\tif (indicator < 8 || indicator > INDICATOR_MAX) {\r\n\t\treturn;\r\n\t}\r\n\tpdoc->DecorationSetCurrentIndicator(indicator);\r\n\tfor (size_t r=0; r<sel.Count(); r++) {\r\n\t\tconst Sci::Position positionInsert = sel.Range(r).Start().Position();\r\n\t\tpdoc->DecorationFillRange(positionInsert - len, 1, len);\r\n\t}\r\n}\r\n\r\nnamespace {\r\n\r\nstd::vector<int> MapImeIndicators(PangoAttrList *attrs, const char *u8Str) {\r\n\t// Map input style to scintilla ime indicator.\r\n\t// Attrs position points between UTF-8 bytes.\r\n\t// Indicator index to be returned is character based though.\r\n\tconst glong charactersLen = g_utf8_strlen(u8Str, strlen(u8Str));\r\n\tstd::vector<int> indicator(charactersLen, SC_INDICATOR_UNKNOWN);\r\n\r\n\tPangoAttrIterator *iterunderline = pango_attr_list_get_iterator(attrs);\r\n\tif (iterunderline) {\r\n\t\tdo {\r\n\t\t\tconst PangoAttribute  *attrunderline = pango_attr_iterator_get(iterunderline, PANGO_ATTR_UNDERLINE);\r\n\t\t\tif (attrunderline) {\r\n\t\t\t\tconst glong start = g_utf8_strlen(u8Str, attrunderline->start_index);\r\n\t\t\t\tconst glong end = g_utf8_strlen(u8Str, attrunderline->end_index);\r\n\t\t\t\tconst int ulinevalue = reinterpret_cast<const PangoAttrInt *>(attrunderline)->value;\r\n\t\t\t\tconst PangoUnderline uline = static_cast<PangoUnderline>(ulinevalue);\r\n\t\t\t\tfor (glong i=start; i < end; ++i) {\r\n\t\t\t\t\tswitch (uline) {\r\n\t\t\t\t\tcase PANGO_UNDERLINE_NONE:\r\n\t\t\t\t\t\tindicator[i] = SC_INDICATOR_UNKNOWN;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase PANGO_UNDERLINE_SINGLE: // normal input\r\n\t\t\t\t\t\tindicator[i] = SC_INDICATOR_INPUT;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase PANGO_UNDERLINE_DOUBLE:\r\n\t\t\t\t\tcase PANGO_UNDERLINE_LOW:\r\n\t\t\t\t\tcase PANGO_UNDERLINE_ERROR:\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} while (pango_attr_iterator_next(iterunderline));\r\n\t\tpango_attr_iterator_destroy(iterunderline);\r\n\t}\r\n\r\n\tPangoAttrIterator *itercolor = pango_attr_list_get_iterator(attrs);\r\n\tif (itercolor) {\r\n\t\tdo {\r\n\t\t\tconst PangoAttribute *backcolor = pango_attr_iterator_get(itercolor, PANGO_ATTR_BACKGROUND);\r\n\t\t\tif (backcolor) {\r\n\t\t\t\tconst glong start = g_utf8_strlen(u8Str, backcolor->start_index);\r\n\t\t\t\tconst glong end = g_utf8_strlen(u8Str, backcolor->end_index);\r\n\t\t\t\tfor (glong i=start; i < end; ++i) {\r\n\t\t\t\t\tindicator[i] = SC_INDICATOR_TARGET;  // target converted\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} while (pango_attr_iterator_next(itercolor));\r\n\t\tpango_attr_iterator_destroy(itercolor);\r\n\t}\r\n\treturn indicator;\r\n}\r\n\r\n}\r\n\r\nvoid ScintillaGTK::SetCandidateWindowPos() {\r\n\t// Composition box accompanies candidate box.\r\n\tconst Point pt = PointMainCaret();\r\n\tGdkRectangle imeBox {};\r\n\timeBox.x = static_cast<gint>(pt.x);\r\n\timeBox.y = static_cast<gint>(pt.y + std::max(4, vs.lineHeight/4));\r\n\t// prevent overlapping with current line\r\n\timeBox.height = vs.lineHeight;\r\n\tgtk_im_context_set_cursor_location(im_context.get(), &imeBox);\r\n}\r\n\r\nvoid ScintillaGTK::CommitThis(char *commitStr) {\r\n\ttry {\r\n\t\t//~ fprintf(stderr, \"Commit '%s'\\n\", commitStr);\r\n\t\tview.imeCaretBlockOverride = false;\r\n\r\n\t\tif (pdoc->TentativeActive()) {\r\n\t\t\tpdoc->TentativeUndo();\r\n\t\t}\r\n\r\n\t\tconst char *charSetSource = CharacterSetID();\r\n\r\n\t\tglong uniStrLen = 0;\r\n\t\tgunichar *uniStr = g_utf8_to_ucs4_fast(commitStr, static_cast<glong>(strlen(commitStr)), &uniStrLen);\r\n\t\tfor (glong i = 0; i < uniStrLen; i++) {\r\n\t\t\tgchar u8Char[UTF8MaxBytes+2] = {0};\r\n\t\t\tconst gint u8CharLen = g_unichar_to_utf8(uniStr[i], u8Char);\r\n\t\t\tstd::string docChar = u8Char;\r\n\t\t\tif (!IsUnicodeMode())\r\n\t\t\t\tdocChar = ConvertText(u8Char, u8CharLen, charSetSource, \"UTF-8\", true);\r\n\r\n\t\t\tInsertCharacter(docChar, CharacterSource::DirectInput);\r\n\t\t}\r\n\t\tg_free(uniStr);\r\n\t\tShowCaretAtCurrentPosition();\r\n\t} catch (...) {\r\n\t\terrorStatus = Status::Failure;\r\n\t}\r\n}\r\n\r\nvoid ScintillaGTK::Commit(GtkIMContext *, char  *str, ScintillaGTK *sciThis) {\r\n\tsciThis->CommitThis(str);\r\n}\r\n\r\nvoid ScintillaGTK::PreeditChangedInlineThis() {\r\n\t// Copy & paste by johnsonj with a lot of helps of Neil\r\n\t// Great thanks for my foreruners, jiniya and BLUEnLIVE\r\n\ttry {\r\n\t\tif (pdoc->IsReadOnly() || SelectionContainsProtected()) {\r\n\t\t\tgtk_im_context_reset(im_context.get());\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tview.imeCaretBlockOverride = false; // If backspace.\r\n\r\n\t\tbool initialCompose = false;\r\n\t\tif (pdoc->TentativeActive()) {\r\n\t\t\tpdoc->TentativeUndo();\r\n\t\t} else {\r\n\t\t\t// No tentative undo means start of this composition so\r\n\t\t\t// fill in any virtual spaces.\r\n\t\t\tinitialCompose = true;\r\n\t\t}\r\n\r\n\t\tPreEditString preeditStr(im_context.get());\r\n\t\tconst char *charSetSource = CharacterSetID();\r\n\r\n\t\tif (!preeditStr.validUTF8 || (charSetSource == nullptr)) {\r\n\t\t\tShowCaretAtCurrentPosition();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (preeditStr.uniStrLen == 0) {\r\n\t\t\tShowCaretAtCurrentPosition();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (initialCompose) {\r\n\t\t\tClearBeforeTentativeStart();\r\n\t\t}\r\n\r\n\t\tSetCandidateWindowPos();\r\n\t\tpdoc->TentativeStart(); // TentativeActive() from now on\r\n\r\n\t\tstd::vector<int> indicator = MapImeIndicators(preeditStr.attrs, preeditStr.str);\r\n\r\n\t\tfor (glong i = 0; i < preeditStr.uniStrLen; i++) {\r\n\t\t\tgchar u8Char[UTF8MaxBytes+2] = {0};\r\n\t\t\tconst gint u8CharLen = g_unichar_to_utf8(preeditStr.uniStr[i], u8Char);\r\n\t\t\tstd::string docChar = u8Char;\r\n\t\t\tif (!IsUnicodeMode())\r\n\t\t\t\tdocChar = ConvertText(u8Char, u8CharLen, charSetSource, \"UTF-8\", true);\r\n\r\n\t\t\tInsertCharacter(docChar, CharacterSource::TentativeInput);\r\n\r\n\t\t\tDrawImeIndicator(indicator[i], docChar.size());\r\n\t\t}\r\n\r\n\t\t// Move caret to ime cursor position.\r\n\t\tconst int imeEndToImeCaretU32 = preeditStr.cursor_pos - preeditStr.uniStrLen;\r\n\t\tconst Sci::Position imeCaretPosDoc = pdoc->GetRelativePosition(CurrentPosition(), imeEndToImeCaretU32);\r\n\r\n\t\tMoveImeCarets(- CurrentPosition() + imeCaretPosDoc);\r\n\r\n\t\tif (KoreanIME()) {\r\n#if !PLAT_GTK_WIN32\r\n\t\t\tif (preeditStr.cursor_pos > 0) {\r\n\t\t\t\tint oneCharBefore = pdoc->GetRelativePosition(CurrentPosition(), -1);\r\n\t\t\t\tMoveImeCarets(- CurrentPosition() + oneCharBefore);\r\n\t\t\t}\r\n#endif\r\n\t\t\tview.imeCaretBlockOverride = true;\r\n\t\t}\r\n\r\n\t\tEnsureCaretVisible();\r\n\t\tShowCaretAtCurrentPosition();\r\n\t} catch (...) {\r\n\t\terrorStatus = Status::Failure;\r\n\t}\r\n}\r\n\r\nvoid ScintillaGTK::PreeditChangedWindowedThis() {\r\n\ttry {\r\n\t\tPreEditString pes(im_context.get());\r\n\t\tif (strlen(pes.str) > 0) {\r\n\t\t\tSetCandidateWindowPos();\r\n\r\n\t\t\tUniquePangoLayout layout(gtk_widget_create_pango_layout(PWidget(wText), pes.str));\r\n\t\t\tpango_layout_set_attributes(layout.get(), pes.attrs);\r\n\r\n\t\t\tgint w, h;\r\n\t\t\tpango_layout_get_pixel_size(layout.get(), &w, &h);\r\n\r\n\t\t\tgint x, y;\r\n\t\t\tgdk_window_get_origin(PWindow(wText), &x, &y);\r\n\r\n\t\t\tPoint pt = PointMainCaret();\r\n\t\t\tif (pt.x < 0)\r\n\t\t\t\tpt.x = 0;\r\n\t\t\tif (pt.y < 0)\r\n\t\t\t\tpt.y = 0;\r\n\r\n\t\t\tgtk_window_move(GTK_WINDOW(PWidget(wPreedit)), x + static_cast<gint>(pt.x), y + static_cast<gint>(pt.y));\r\n\t\t\tgtk_window_resize(GTK_WINDOW(PWidget(wPreedit)), w, h);\r\n\t\t\tgtk_widget_show(PWidget(wPreedit));\r\n\t\t\tgtk_widget_queue_draw_area(PWidget(wPreeditDraw), 0, 0, w, h);\r\n\t\t} else {\r\n\t\t\tgtk_widget_hide(PWidget(wPreedit));\r\n\t\t}\r\n\t} catch (...) {\r\n\t\terrorStatus = Status::Failure;\r\n\t}\r\n}\r\n\r\nvoid ScintillaGTK::PreeditChanged(GtkIMContext *, ScintillaGTK *sciThis) {\r\n\tif ((sciThis->imeInteraction == IMEInteraction::Inline) || (sciThis->KoreanIME())) {\r\n\t\tsciThis->PreeditChangedInlineThis();\r\n\t} else {\r\n\t\tsciThis->PreeditChangedWindowedThis();\r\n\t}\r\n}\r\n\r\nbool ScintillaGTK::RetrieveSurroundingThis(GtkIMContext *context) {\r\n\ttry {\r\n\t\tconst Sci::Position pos = CurrentPosition();\r\n\t\tconst int line = pdoc->LineFromPosition(pos);\r\n\t\tconst Sci::Position startByte = pdoc->LineStart(line);\r\n\t\tconst Sci::Position endByte = pdoc->LineEnd(line);\r\n\r\n\t\tstd::string utf8Text;\r\n\t\tgint cursorIndex; // index of the cursor inside utf8Text, in bytes\r\n\t\tconst char *charSetBuffer;\r\n\r\n\t\tif (IsUnicodeMode() || ! *(charSetBuffer = CharacterSetID())) {\r\n\t\t\tutf8Text = RangeText(startByte, endByte);\r\n\t\t\tcursorIndex = pos - startByte;\r\n\t\t} else {\r\n\t\t\t// Need to convert\r\n\t\t\tstd::string tmpbuf = RangeText(startByte, pos);\r\n\t\t\tutf8Text = ConvertText(&tmpbuf[0], tmpbuf.length(), \"UTF-8\", charSetBuffer, false);\r\n\t\t\tcursorIndex = utf8Text.length();\r\n\t\t\tif (endByte > pos) {\r\n\t\t\t\ttmpbuf = RangeText(pos, endByte);\r\n\t\t\t\tutf8Text += ConvertText(&tmpbuf[0], tmpbuf.length(), \"UTF-8\", charSetBuffer, false);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tgtk_im_context_set_surrounding(context, &utf8Text[0], utf8Text.length(), cursorIndex);\r\n\r\n\t\treturn true;\r\n\t} catch (...) {\r\n\t\terrorStatus = Status::Failure;\r\n\t}\r\n\treturn false;\r\n}\r\n\r\ngboolean ScintillaGTK::RetrieveSurrounding(GtkIMContext *context, ScintillaGTK *sciThis) {\r\n\treturn sciThis->RetrieveSurroundingThis(context);\r\n}\r\n\r\nbool ScintillaGTK::DeleteSurroundingThis(GtkIMContext *, gint characterOffset, gint characterCount) {\r\n\ttry {\r\n\t\tconst Sci::Position startByte = pdoc->GetRelativePosition(CurrentPosition(), characterOffset);\r\n\t\tif (startByte == INVALID_POSITION)\r\n\t\t\treturn false;\r\n\r\n\t\tconst Sci::Position endByte = pdoc->GetRelativePosition(startByte, characterCount);\r\n\t\tif (endByte == INVALID_POSITION)\r\n\t\t\treturn false;\r\n\r\n\t\treturn pdoc->DeleteChars(startByte, endByte - startByte);\r\n\t} catch (...) {\r\n\t\terrorStatus = Status::Failure;\r\n\t}\r\n\treturn false;\r\n}\r\n\r\ngboolean ScintillaGTK::DeleteSurrounding(GtkIMContext *context, gint characterOffset, gint characterCount, ScintillaGTK *sciThis) {\r\n\treturn sciThis->DeleteSurroundingThis(context, characterOffset, characterCount);\r\n}\r\n\r\nvoid ScintillaGTK::StyleSetText(GtkWidget *widget, GtkStyle *, void *) {\r\n\tRealizeText(widget, nullptr);\r\n}\r\n\r\nvoid ScintillaGTK::RealizeText(GtkWidget *widget, void *) {\r\n\t// Set NULL background to avoid automatic clearing so Scintilla responsible for all drawing\r\n\tif (WindowFromWidget(widget)) {\r\n#if GTK_CHECK_VERSION(3,22,0)\r\n\t\t// Appears unnecessary\r\n#elif GTK_CHECK_VERSION(3,0,0)\r\n\t\tgdk_window_set_background_pattern(WindowFromWidget(widget), nullptr);\r\n#else\r\n\t\tgdk_window_set_back_pixmap(WindowFromWidget(widget), nullptr, FALSE);\r\n#endif\r\n\t}\r\n}\r\n\r\nstatic GObjectClass *scintilla_class_parent_class;\r\n\r\nvoid ScintillaGTK::Dispose(GObject *object) {\r\n\ttry {\r\n\t\tScintillaObject *scio = SCINTILLA(object);\r\n\t\tScintillaGTK *sciThis = static_cast<ScintillaGTK *>(scio->pscin);\r\n\r\n\t\tif (PWidget(sciThis->scrollbarv)) {\r\n\t\t\tgtk_widget_unparent(PWidget(sciThis->scrollbarv));\r\n\t\t\tsciThis->scrollbarv = nullptr;\r\n\t\t}\r\n\r\n\t\tif (PWidget(sciThis->scrollbarh)) {\r\n\t\t\tgtk_widget_unparent(PWidget(sciThis->scrollbarh));\r\n\t\t\tsciThis->scrollbarh = nullptr;\r\n\t\t}\r\n\r\n\t\tscintilla_class_parent_class->dispose(object);\r\n\t} catch (...) {\r\n\t\t// Its dying so nowhere to save the status\r\n\t}\r\n}\r\n\r\nvoid ScintillaGTK::Destroy(GObject *object) {\r\n\ttry {\r\n\t\tScintillaObject *scio = SCINTILLA(object);\r\n\r\n\t\t// This avoids a double destruction\r\n\t\tif (!scio->pscin)\r\n\t\t\treturn;\r\n\t\tScintillaGTK *sciThis = static_cast<ScintillaGTK *>(scio->pscin);\r\n\t\t//Platform::DebugPrintf(\"Destroying %x %x\\n\", sciThis, object);\r\n\t\tsciThis->Finalise();\r\n\r\n\t\tdelete sciThis;\r\n\t\tscio->pscin = nullptr;\r\n\t\tscintilla_class_parent_class->finalize(object);\r\n\t} catch (...) {\r\n\t\t// Its dead so nowhere to save the status\r\n\t}\r\n}\r\n\r\nvoid ScintillaGTK::CheckForFontOptionChange() {\r\n\tconst FontOptions fontOptionsNow(PWidget(wText));\r\n\tif (!(fontOptionsNow == fontOptionsPrevious)) {\r\n\t\t// Clear position caches\r\n\t\tInvalidateStyleData();\r\n\t}\r\n\tfontOptionsPrevious = fontOptionsNow;\r\n}\r\n\r\n#if GTK_CHECK_VERSION(3,0,0)\r\n\r\ngboolean ScintillaGTK::DrawTextThis(cairo_t *cr) {\r\n\ttry {\r\n\t\tCheckForFontOptionChange();\r\n\r\n\t\tpaintState = PaintState::painting;\r\n\t\trepaintFullWindow = false;\r\n\r\n\t\trcPaint = GetClientRectangle();\r\n\r\n\t\tcairo_rectangle_list_t *oldRgnUpdate = rgnUpdate;\r\n\t\trgnUpdate = cairo_copy_clip_rectangle_list(cr);\r\n\t\tif (rgnUpdate && rgnUpdate->status != CAIRO_STATUS_SUCCESS) {\r\n\t\t\t// If not successful then ignore\r\n\t\t\tfprintf(stderr, \"DrawTextThis failed to copy update region %d [%d]\\n\", rgnUpdate->status, rgnUpdate->num_rectangles);\r\n\t\t\tcairo_rectangle_list_destroy(rgnUpdate);\r\n\t\t\trgnUpdate = nullptr;\r\n\t\t}\r\n\r\n\t\tdouble x1, y1, x2, y2;\r\n\t\tcairo_clip_extents(cr, &x1, &y1, &x2, &y2);\r\n\t\trcPaint.left = x1;\r\n\t\trcPaint.top = y1;\r\n\t\trcPaint.right = x2;\r\n\t\trcPaint.bottom = y2;\r\n\t\tPRectangle rcClient = GetClientRectangle();\r\n\t\tpaintingAllText = rcPaint.Contains(rcClient);\r\n\t\tstd::unique_ptr<Surface> surfaceWindow(Surface::Allocate(Technology::Default));\r\n\t\tsurfaceWindow->Init(cr, PWidget(wText));\r\n\t\tPaint(surfaceWindow.get(), rcPaint);\r\n\t\tsurfaceWindow->Release();\r\n\t\tif ((paintState == PaintState::abandoned) || repaintFullWindow) {\r\n\t\t\t// Painting area was insufficient to cover new styling or brace highlight positions\r\n\t\t\tFullPaint();\r\n\t\t}\r\n\t\tpaintState = PaintState::notPainting;\r\n\t\trepaintFullWindow = false;\r\n\r\n\t\tif (rgnUpdate) {\r\n\t\t\tcairo_rectangle_list_destroy(rgnUpdate);\r\n\t\t}\r\n\t\trgnUpdate = oldRgnUpdate;\r\n\t\tpaintState = PaintState::notPainting;\r\n\t} catch (...) {\r\n\t\terrorStatus = Status::Failure;\r\n\t}\r\n\r\n\treturn FALSE;\r\n}\r\n\r\ngboolean ScintillaGTK::DrawText(GtkWidget *, cairo_t *cr, ScintillaGTK *sciThis) {\r\n\treturn sciThis->DrawTextThis(cr);\r\n}\r\n\r\ngboolean ScintillaGTK::DrawThis(cairo_t *cr) {\r\n\ttry {\r\n#ifdef GTK_STYLE_CLASS_SCROLLBARS_JUNCTION /* GTK >= 3.4 */\r\n\t\t// if both scrollbars are visible, paint the little square on the bottom right corner\r\n\t\tif (verticalScrollBarVisible && horizontalScrollBarVisible && !Wrapping()) {\r\n\t\t\tGtkStyleContext *styleContext = gtk_widget_get_style_context(PWidget(wMain));\r\n\t\t\tPRectangle rc = GetClientRectangle();\r\n\r\n\t\t\tgtk_style_context_save(styleContext);\r\n\t\t\tgtk_style_context_add_class(styleContext, GTK_STYLE_CLASS_SCROLLBARS_JUNCTION);\r\n\r\n\t\t\tgtk_render_background(styleContext, cr, rc.right, rc.bottom,\r\n\t\t\t\t\t      verticalScrollBarWidth, horizontalScrollBarHeight);\r\n\t\t\tgtk_render_frame(styleContext, cr, rc.right, rc.bottom,\r\n\t\t\t\t\t verticalScrollBarWidth, horizontalScrollBarHeight);\r\n\r\n\t\t\tgtk_style_context_restore(styleContext);\r\n\t\t}\r\n#endif\r\n\r\n\t\tgtk_container_propagate_draw(\r\n\t\t\tGTK_CONTAINER(PWidget(wMain)), PWidget(scrollbarh), cr);\r\n\t\tgtk_container_propagate_draw(\r\n\t\t\tGTK_CONTAINER(PWidget(wMain)), PWidget(scrollbarv), cr);\r\n// Starting from the following version, the expose event are not propagated\r\n// for double buffered non native windows, so we need to call it ourselves\r\n// or keep the default handler\r\n#if GTK_CHECK_VERSION(3,0,0)\r\n\t\t// we want to forward on any >= 3.9.2 runtime\r\n\t\tif (gtk_check_version(3, 9, 2) == nullptr) {\r\n\t\t\tgtk_container_propagate_draw(\r\n\t\t\t\tGTK_CONTAINER(PWidget(wMain)), PWidget(wText), cr);\r\n\t\t}\r\n#endif\r\n\t} catch (...) {\r\n\t\terrorStatus = Status::Failure;\r\n\t}\r\n\treturn FALSE;\r\n}\r\n\r\ngboolean ScintillaGTK::DrawMain(GtkWidget *widget, cairo_t *cr) {\r\n\tScintillaGTK *sciThis = FromWidget(widget);\r\n\treturn sciThis->DrawThis(cr);\r\n}\r\n\r\n#else\r\n\r\ngboolean ScintillaGTK::ExposeTextThis(GtkWidget * /*widget*/, GdkEventExpose *ose) {\r\n\ttry {\r\n\t\tCheckForFontOptionChange();\r\n\r\n\t\tpaintState = PaintState::painting;\r\n\r\n\t\trcPaint = PRectangle::FromInts(\r\n\t\t\t\t  ose->area.x,\r\n\t\t\t\t  ose->area.y,\r\n\t\t\t\t  ose->area.x + ose->area.width,\r\n\t\t\t\t  ose->area.y + ose->area.height);\r\n\r\n\t\tGdkRegion *oldRgnUpdate = rgnUpdate;\r\n\t\trgnUpdate = gdk_region_copy(ose->region);\r\n\t\tconst PRectangle rcClient = GetClientRectangle();\r\n\t\tpaintingAllText = rcPaint.Contains(rcClient);\r\n\t\t{\r\n\t\t\tstd::unique_ptr<Surface> surfaceWindow(Surface::Allocate(Technology::Default));\r\n\t\t\tUniqueCairo cr(gdk_cairo_create(PWindow(wText)));\r\n\t\t\tsurfaceWindow->Init(cr.get(), PWidget(wText));\r\n\t\t\tPaint(surfaceWindow.get(), rcPaint);\r\n\t\t}\r\n\t\tif ((paintState == PaintState::abandoned) || repaintFullWindow) {\r\n\t\t\t// Painting area was insufficient to cover new styling or brace highlight positions\r\n\t\t\tFullPaint();\r\n\t\t}\r\n\t\tpaintState = PaintState::notPainting;\r\n\t\trepaintFullWindow = false;\r\n\r\n\t\tif (rgnUpdate) {\r\n\t\t\tgdk_region_destroy(rgnUpdate);\r\n\t\t}\r\n\t\trgnUpdate = oldRgnUpdate;\r\n\t} catch (...) {\r\n\t\terrorStatus = Status::Failure;\r\n\t}\r\n\r\n\treturn FALSE;\r\n}\r\n\r\ngboolean ScintillaGTK::ExposeText(GtkWidget *widget, GdkEventExpose *ose, ScintillaGTK *sciThis) {\r\n\treturn sciThis->ExposeTextThis(widget, ose);\r\n}\r\n\r\ngboolean ScintillaGTK::ExposeMain(GtkWidget *widget, GdkEventExpose *ose) {\r\n\tScintillaGTK *sciThis = FromWidget(widget);\r\n\t//Platform::DebugPrintf(\"Expose Main %0d,%0d %0d,%0d\\n\",\r\n\t//ose->area.x, ose->area.y, ose->area.width, ose->area.height);\r\n\treturn sciThis->Expose(widget, ose);\r\n}\r\n\r\ngboolean ScintillaGTK::Expose(GtkWidget *, GdkEventExpose *ose) {\r\n\ttry {\r\n\t\t//fprintf(stderr, \"Expose %0d,%0d %0d,%0d\\n\",\r\n\t\t//ose->area.x, ose->area.y, ose->area.width, ose->area.height);\r\n\r\n\t\t// The text is painted in ExposeText\r\n\t\tgtk_container_propagate_expose(\r\n\t\t\tGTK_CONTAINER(PWidget(wMain)), PWidget(scrollbarh), ose);\r\n\t\tgtk_container_propagate_expose(\r\n\t\t\tGTK_CONTAINER(PWidget(wMain)), PWidget(scrollbarv), ose);\r\n\r\n\t} catch (...) {\r\n\t\terrorStatus = Status::Failure;\r\n\t}\r\n\treturn FALSE;\r\n}\r\n\r\n#endif\r\n\r\nvoid ScintillaGTK::ScrollSignal(GtkAdjustment *adj, ScintillaGTK *sciThis) {\r\n\ttry {\r\n\t\tsciThis->ScrollTo(static_cast<int>(gtk_adjustment_get_value(adj)), false);\r\n\t} catch (...) {\r\n\t\tsciThis->errorStatus = Status::Failure;\r\n\t}\r\n}\r\n\r\nvoid ScintillaGTK::ScrollHSignal(GtkAdjustment *adj, ScintillaGTK *sciThis) {\r\n\ttry {\r\n\t\tsciThis->HorizontalScrollTo(static_cast<int>(gtk_adjustment_get_value(adj)));\r\n\t} catch (...) {\r\n\t\tsciThis->errorStatus = Status::Failure;\r\n\t}\r\n}\r\n\r\nvoid ScintillaGTK::SelectionReceived(GtkWidget *widget,\r\n\t\t\t\t     GtkSelectionData *selection_data, guint) {\r\n\tScintillaGTK *sciThis = FromWidget(widget);\r\n\t//Platform::DebugPrintf(\"Selection received\\n\");\r\n\tsciThis->ReceivedSelection(selection_data);\r\n}\r\n\r\nvoid ScintillaGTK::SelectionGet(GtkWidget *widget,\r\n\t\t\t\tGtkSelectionData *selection_data, guint info, guint) {\r\n\tScintillaGTK *sciThis = FromWidget(widget);\r\n\ttry {\r\n\t\t//Platform::DebugPrintf(\"Selection get\\n\");\r\n\t\tif (SelectionOfGSD(selection_data) == GDK_SELECTION_PRIMARY) {\r\n\t\t\tif (sciThis->primary.Empty()) {\r\n\t\t\t\tsciThis->CopySelectionRange(&sciThis->primary);\r\n\t\t\t}\r\n\t\t\tsciThis->GetSelection(selection_data, info, &sciThis->primary);\r\n\t\t}\r\n\t} catch (...) {\r\n\t\tsciThis->errorStatus = Status::Failure;\r\n\t}\r\n}\r\n\r\ngint ScintillaGTK::SelectionClear(GtkWidget *widget, GdkEventSelection *selection_event) {\r\n\tScintillaGTK *sciThis = FromWidget(widget);\r\n\t//Platform::DebugPrintf(\"Selection clear\\n\");\r\n\tsciThis->UnclaimSelection(selection_event);\r\n\tif (GTK_WIDGET_CLASS(sciThis->parentClass)->selection_clear_event) {\r\n\t\treturn GTK_WIDGET_CLASS(sciThis->parentClass)->selection_clear_event(widget, selection_event);\r\n\t}\r\n\treturn TRUE;\r\n}\r\n\r\ngboolean ScintillaGTK::DragMotionThis(GdkDragContext *context,\r\n\t\t\t\t      gint x, gint y, guint dragtime) {\r\n\ttry {\r\n\t\tconst Point npt = Point::FromInts(x, y);\r\n\t\tSetDragPosition(SPositionFromLocation(npt, false, false, UserVirtualSpace()));\r\n\t\tGdkDragAction preferredAction = gdk_drag_context_get_suggested_action(context);\r\n\t\tconst GdkDragAction actions = gdk_drag_context_get_actions(context);\r\n\t\tconst SelectionPosition pos = SPositionFromLocation(npt);\r\n\t\tif ((inDragDrop == DragDrop::dragging) && (PositionInSelection(pos.Position()))) {\r\n\t\t\t// Avoid dragging selection onto itself as that produces a move\r\n\t\t\t// with no real effect but which creates undo actions.\r\n\t\t\tpreferredAction = static_cast<GdkDragAction>(0);\r\n\t\t} else if (actions == actionCopyOrMove) {\r\n\t\t\tpreferredAction = GDK_ACTION_MOVE;\r\n\t\t}\r\n\t\tgdk_drag_status(context, preferredAction, dragtime);\r\n\t} catch (...) {\r\n\t\terrorStatus = Status::Failure;\r\n\t}\r\n\treturn FALSE;\r\n}\r\n\r\ngboolean ScintillaGTK::DragMotion(GtkWidget *widget, GdkDragContext *context,\r\n\t\t\t\t  gint x, gint y, guint dragtime) {\r\n\tScintillaGTK *sciThis = FromWidget(widget);\r\n\treturn sciThis->DragMotionThis(context, x, y, dragtime);\r\n}\r\n\r\nvoid ScintillaGTK::DragLeave(GtkWidget *widget, GdkDragContext * /*context*/, guint) {\r\n\tScintillaGTK *sciThis = FromWidget(widget);\r\n\ttry {\r\n\t\tsciThis->SetDragPosition(SelectionPosition(Sci::invalidPosition));\r\n\t\t//Platform::DebugPrintf(\"DragLeave %x\\n\", sciThis);\r\n\t} catch (...) {\r\n\t\tsciThis->errorStatus = Status::Failure;\r\n\t}\r\n}\r\n\r\nvoid ScintillaGTK::DragEnd(GtkWidget *widget, GdkDragContext * /*context*/) {\r\n\tScintillaGTK *sciThis = FromWidget(widget);\r\n\ttry {\r\n\t\t// If drag did not result in drop here or elsewhere\r\n\t\tif (!sciThis->dragWasDropped)\r\n\t\t\tsciThis->SetEmptySelection(sciThis->posDrag);\r\n\t\tsciThis->SetDragPosition(SelectionPosition(Sci::invalidPosition));\r\n\t\t//Platform::DebugPrintf(\"DragEnd %x %d\\n\", sciThis, sciThis->dragWasDropped);\r\n\t\tsciThis->inDragDrop = DragDrop::none;\r\n\t} catch (...) {\r\n\t\tsciThis->errorStatus = Status::Failure;\r\n\t}\r\n}\r\n\r\ngboolean ScintillaGTK::Drop(GtkWidget *widget, GdkDragContext * /*context*/,\r\n\t\t\t    gint, gint, guint) {\r\n\tScintillaGTK *sciThis = FromWidget(widget);\r\n\ttry {\r\n\t\t//Platform::DebugPrintf(\"Drop %x\\n\", sciThis);\r\n\t\tsciThis->SetDragPosition(SelectionPosition(Sci::invalidPosition));\r\n\t} catch (...) {\r\n\t\tsciThis->errorStatus = Status::Failure;\r\n\t}\r\n\treturn FALSE;\r\n}\r\n\r\nvoid ScintillaGTK::DragDataReceived(GtkWidget *widget, GdkDragContext * /*context*/,\r\n\t\t\t\t    gint, gint, GtkSelectionData *selection_data, guint /*info*/, guint) {\r\n\tScintillaGTK *sciThis = FromWidget(widget);\r\n\ttry {\r\n\t\tsciThis->ReceivedDrop(selection_data);\r\n\t\tsciThis->SetDragPosition(SelectionPosition(Sci::invalidPosition));\r\n\t} catch (...) {\r\n\t\tsciThis->errorStatus = Status::Failure;\r\n\t}\r\n}\r\n\r\nvoid ScintillaGTK::DragDataGet(GtkWidget *widget, GdkDragContext *context,\r\n\t\t\t       GtkSelectionData *selection_data, guint info, guint) {\r\n\tScintillaGTK *sciThis = FromWidget(widget);\r\n\ttry {\r\n\t\tsciThis->dragWasDropped = true;\r\n\t\tif (!sciThis->sel.Empty()) {\r\n\t\t\tsciThis->GetSelection(selection_data, info, &sciThis->drag);\r\n\t\t}\r\n\t\tconst GdkDragAction action = gdk_drag_context_get_selected_action(context);\r\n\t\tif (action == GDK_ACTION_MOVE) {\r\n\t\t\tfor (size_t r=0; r<sciThis->sel.Count(); r++) {\r\n\t\t\t\tif (sciThis->posDrop >= sciThis->sel.Range(r).Start()) {\r\n\t\t\t\t\tif (sciThis->posDrop > sciThis->sel.Range(r).End()) {\r\n\t\t\t\t\t\tsciThis->posDrop.Add(-sciThis->sel.Range(r).Length());\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tsciThis->posDrop.Add(-SelectionRange(sciThis->posDrop, sciThis->sel.Range(r).Start()).Length());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tsciThis->ClearSelection();\r\n\t\t}\r\n\t\tsciThis->SetDragPosition(SelectionPosition(Sci::invalidPosition));\r\n\t} catch (...) {\r\n\t\tsciThis->errorStatus = Status::Failure;\r\n\t}\r\n}\r\n\r\nint ScintillaGTK::TimeOut(gpointer ptt) {\r\n\tTimeThunk *tt = static_cast<TimeThunk *>(ptt);\r\n\ttt->scintilla->TickFor(tt->reason);\r\n\treturn 1;\r\n}\r\n\r\ngboolean ScintillaGTK::IdleCallback(gpointer pSci) {\r\n\tScintillaGTK *sciThis = static_cast<ScintillaGTK *>(pSci);\r\n\t// Idler will be automatically stopped, if there is nothing\r\n\t// to do while idle.\r\n\tconst bool ret = sciThis->Idle();\r\n\tif (!ret) {\r\n\t\t// FIXME: This will remove the idler from GTK, we don't want to\r\n\t\t// remove it as it is removed automatically when this function\r\n\t\t// returns false (although, it should be harmless).\r\n\t\tsciThis->SetIdle(false);\r\n\t}\r\n\treturn ret;\r\n}\r\n\r\ngboolean ScintillaGTK::StyleIdle(gpointer pSci) {\r\n\tScintillaGTK *sciThis = static_cast<ScintillaGTK *>(pSci);\r\n\tsciThis->IdleWork();\r\n\t// Idler will be automatically stopped\r\n\treturn FALSE;\r\n}\r\n\r\nvoid ScintillaGTK::IdleWork() {\r\n\tEditor::IdleWork();\r\n\tstyleIdleID = 0;\r\n}\r\n\r\nvoid ScintillaGTK::QueueIdleWork(WorkItems items, Sci::Position upTo) {\r\n\tEditor::QueueIdleWork(items, upTo);\r\n\tif (!styleIdleID) {\r\n\t\t// Only allow one style needed to be queued\r\n\t\tstyleIdleID = gdk_threads_add_idle_full(G_PRIORITY_HIGH_IDLE, StyleIdle, this, nullptr);\r\n\t}\r\n}\r\n\r\nvoid ScintillaGTK::SetDocPointer(Document *document) {\r\n\tDocument *oldDoc = nullptr;\r\n\tScintillaGTKAccessible *sciAccessible = nullptr;\r\n\tif (accessible) {\r\n\t\tsciAccessible = ScintillaGTKAccessible::FromAccessible(accessible);\r\n\t\tif (sciAccessible && pdoc) {\r\n\t\t\toldDoc = pdoc;\r\n\t\t\toldDoc->AddRef();\r\n\t\t}\r\n\t}\r\n\r\n\tEditor::SetDocPointer(document);\r\n\r\n\tif (sciAccessible) {\r\n\t\t// the accessible needs have the old Document, but also the new one active\r\n\t\tsciAccessible->ChangeDocument(oldDoc, pdoc);\r\n\t}\r\n\tif (oldDoc) {\r\n\t\toldDoc->Release();\r\n\t}\r\n}\r\n\r\nvoid ScintillaGTK::PopUpCB(GtkMenuItem *menuItem, ScintillaGTK *sciThis) {\r\n\tguint const action = GPOINTER_TO_UINT(g_object_get_data(G_OBJECT(menuItem), \"CmdNum\"));\r\n\tif (action) {\r\n\t\tsciThis->Command(action);\r\n\t}\r\n}\r\n\r\ngboolean ScintillaGTK::PressCT(GtkWidget *widget, GdkEventButton *event, ScintillaGTK *sciThis) {\r\n\ttry {\r\n\t\tif (event->window != WindowFromWidget(widget))\r\n\t\t\treturn FALSE;\r\n\t\tif (event->type != GDK_BUTTON_PRESS)\r\n\t\t\treturn FALSE;\r\n\t\tconst Point pt = PointOfEvent(event);\r\n\t\tsciThis->ct.MouseClick(pt);\r\n\t\tsciThis->CallTipClick();\r\n\t} catch (...) {\r\n\t}\r\n\treturn TRUE;\r\n}\r\n\r\n#if GTK_CHECK_VERSION(3,0,0)\r\n\r\ngboolean ScintillaGTK::DrawCT(GtkWidget *widget, cairo_t *cr, CallTip *ctip) {\r\n\ttry {\r\n\t\tstd::unique_ptr<Surface> surfaceWindow(Surface::Allocate(Technology::Default));\r\n\t\tsurfaceWindow->Init(cr, widget);\r\n\t\tsurfaceWindow->SetMode(SurfaceMode(ctip->codePage, false));\r\n\t\tctip->PaintCT(surfaceWindow.get());\r\n\t\tsurfaceWindow->Release();\r\n\t} catch (...) {\r\n\t\t// No pointer back to Scintilla to save status\r\n\t}\r\n\treturn TRUE;\r\n}\r\n\r\n#else\r\n\r\ngboolean ScintillaGTK::ExposeCT(GtkWidget *widget, GdkEventExpose * /*ose*/, CallTip *ctip) {\r\n\ttry {\r\n\t\tstd::unique_ptr<Surface> surfaceWindow(Surface::Allocate(Technology::Default));\r\n\t\tUniqueCairo cr(gdk_cairo_create(WindowFromWidget(widget)));\r\n\t\tsurfaceWindow->Init(cr.get(), widget);\r\n\t\tsurfaceWindow->SetMode(SurfaceMode(ctip->codePage, false));\r\n\t\tctip->PaintCT(surfaceWindow.get());\r\n\t} catch (...) {\r\n\t\t// No pointer back to Scintilla to save status\r\n\t}\r\n\treturn TRUE;\r\n}\r\n\r\n#endif\r\n\r\nAtkObject *ScintillaGTK::GetAccessibleThis(GtkWidget *widget) {\r\n\treturn ScintillaGTKAccessible::WidgetGetAccessibleImpl(widget, &accessible, scintilla_class_parent_class);\r\n}\r\n\r\nAtkObject *ScintillaGTK::GetAccessible(GtkWidget *widget) {\r\n\treturn FromWidget(widget)->GetAccessibleThis(widget);\r\n}\r\n\r\nsptr_t ScintillaGTK::DirectFunction(\r\n\tsptr_t ptr, unsigned int iMessage, uptr_t wParam, sptr_t lParam) {\r\n\tScintillaGTK *sci = reinterpret_cast<ScintillaGTK *>(ptr);\r\n\treturn sci->WndProc(static_cast<Message>(iMessage), wParam, lParam);\r\n}\r\n\r\nsptr_t ScintillaGTK::DirectStatusFunction(\r\n\tsptr_t ptr, unsigned int iMessage, uptr_t wParam, sptr_t lParam, int *pStatus) {\r\n\tScintillaGTK *sci = reinterpret_cast<ScintillaGTK *>(ptr);\r\n\tconst sptr_t returnValue = sci->WndProc(static_cast<Message>(iMessage), wParam, lParam);\r\n\t*pStatus = static_cast<int>(sci->errorStatus);\r\n\treturn returnValue;\r\n}\r\n\r\n/* legacy name for scintilla_object_send_message */\r\nsptr_t scintilla_send_message(ScintillaObject *sci, unsigned int iMessage, uptr_t wParam, sptr_t lParam) {\r\n\tScintillaGTK *psci = static_cast<ScintillaGTK *>(sci->pscin);\r\n\treturn psci->WndProc(static_cast<Message>(iMessage), wParam, lParam);\r\n}\r\n\r\ngintptr scintilla_object_send_message(ScintillaObject *sci, unsigned int iMessage, uptr_t wParam, sptr_t lParam) {\r\n\treturn scintilla_send_message(sci, iMessage, wParam, lParam);\r\n}\r\n\r\nstatic void scintilla_class_init(ScintillaClass *klass);\r\nstatic void scintilla_init(ScintillaObject *sci);\r\n\r\n/* legacy name for scintilla_object_get_type */\r\nGType scintilla_get_type() {\r\n\tstatic GType scintilla_type = 0;\r\n\ttry {\r\n\r\n\t\tif (!scintilla_type) {\r\n\t\t\tscintilla_type = g_type_from_name(\"ScintillaObject\");\r\n\t\t\tif (!scintilla_type) {\r\n\t\t\t\tstatic GTypeInfo scintilla_info = {\r\n\t\t\t\t\t(guint16) sizeof(ScintillaObjectClass),\r\n\t\t\t\t\tnullptr, //(GBaseInitFunc)\r\n\t\t\t\t\tnullptr, //(GBaseFinalizeFunc)\r\n\t\t\t\t\t(GClassInitFunc) scintilla_class_init,\r\n\t\t\t\t\tnullptr, //(GClassFinalizeFunc)\r\n\t\t\t\t\tnullptr, //gconstpointer data\r\n\t\t\t\t\t(guint16) sizeof(ScintillaObject),\r\n\t\t\t\t\t0, //n_preallocs\r\n\t\t\t\t\t(GInstanceInitFunc) scintilla_init,\r\n\t\t\t\t\tnullptr //(GTypeValueTable*)\r\n\t\t\t\t};\r\n\t\t\t\tscintilla_type = g_type_register_static(\r\n\t\t\t\t\t\t\t GTK_TYPE_CONTAINER, \"ScintillaObject\", &scintilla_info, (GTypeFlags) 0);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t} catch (...) {\r\n\t}\r\n\treturn scintilla_type;\r\n}\r\n\r\nGType scintilla_object_get_type() {\r\n\treturn scintilla_get_type();\r\n}\r\n\r\nvoid ScintillaGTK::ClassInit(OBJECT_CLASS *object_class, GtkWidgetClass *widget_class, GtkContainerClass *container_class) {\r\n\tPlatform_Initialise();\r\n\tatomUTF8 = gdk_atom_intern(\"UTF8_STRING\", FALSE);\r\n\tatomUTF8Mime = gdk_atom_intern(\"text/plain;charset=utf-8\", FALSE);\r\n\tatomString = GDK_SELECTION_TYPE_STRING;\r\n\tatomUriList = gdk_atom_intern(\"text/uri-list\", FALSE);\r\n\tatomDROPFILES_DND = gdk_atom_intern(\"DROPFILES_DND\", FALSE);\r\n\r\n\t// Define default signal handlers for the class:  Could move more\r\n\t// of the signal handlers here (those that currently attached to wDraw\r\n\t// in Init() may require coordinate translation?)\r\n\r\n\tobject_class->dispose = Dispose;\r\n\tobject_class->finalize = Destroy;\r\n#if GTK_CHECK_VERSION(3,0,0)\r\n\twidget_class->get_preferred_width = GetPreferredWidth;\r\n\twidget_class->get_preferred_height = GetPreferredHeight;\r\n#else\r\n\twidget_class->size_request = SizeRequest;\r\n#endif\r\n\twidget_class->size_allocate = SizeAllocate;\r\n#if GTK_CHECK_VERSION(3,0,0)\r\n\twidget_class->draw = DrawMain;\r\n#else\r\n\twidget_class->expose_event = ExposeMain;\r\n#endif\r\n\twidget_class->motion_notify_event = Motion;\r\n\twidget_class->button_press_event = Press;\r\n\twidget_class->button_release_event = MouseRelease;\r\n\twidget_class->scroll_event = ScrollEvent;\r\n\twidget_class->key_press_event = KeyPress;\r\n\twidget_class->key_release_event = KeyRelease;\r\n\twidget_class->focus_in_event = FocusIn;\r\n\twidget_class->focus_out_event = FocusOut;\r\n\twidget_class->selection_received = SelectionReceived;\r\n\twidget_class->selection_get = SelectionGet;\r\n\twidget_class->selection_clear_event = SelectionClear;\r\n\r\n\twidget_class->drag_data_received = DragDataReceived;\r\n\twidget_class->drag_motion = DragMotion;\r\n\twidget_class->drag_leave = DragLeave;\r\n\twidget_class->drag_end = DragEnd;\r\n\twidget_class->drag_drop = Drop;\r\n\twidget_class->drag_data_get = DragDataGet;\r\n\r\n\twidget_class->realize = Realize;\r\n\twidget_class->unrealize = UnRealize;\r\n\twidget_class->map = Map;\r\n\twidget_class->unmap = UnMap;\r\n\r\n\twidget_class->get_accessible = GetAccessible;\r\n\r\n\tcontainer_class->forall = MainForAll;\r\n}\r\n\r\nstatic void scintilla_class_init(ScintillaClass *klass) {\r\n\ttry {\r\n\t\tOBJECT_CLASS *object_class = reinterpret_cast<OBJECT_CLASS *>(klass);\r\n\t\tGtkWidgetClass *widget_class = reinterpret_cast<GtkWidgetClass *>(klass);\r\n\t\tGtkContainerClass *container_class = reinterpret_cast<GtkContainerClass *>(klass);\r\n\r\n\t\tconst GSignalFlags sigflags = static_cast<GSignalFlags>(G_SIGNAL_ACTION | G_SIGNAL_RUN_LAST);\r\n\t\tscintilla_signals[COMMAND_SIGNAL] = g_signal_new(\r\n\t\t\t\t\"command\",\r\n\t\t\t\tG_TYPE_FROM_CLASS(object_class),\r\n\t\t\t\tsigflags,\r\n\t\t\t\tG_STRUCT_OFFSET(ScintillaClass, command),\r\n\t\t\t\tnullptr, //(GSignalAccumulator)\r\n\t\t\t\tnullptr, //(gpointer)\r\n\t\t\t\tscintilla_marshal_VOID__INT_OBJECT,\r\n\t\t\t\tG_TYPE_NONE,\r\n\t\t\t\t2, G_TYPE_INT, GTK_TYPE_WIDGET);\r\n\r\n\t\tscintilla_signals[NOTIFY_SIGNAL] = g_signal_new(\r\n\t\t\t\tSCINTILLA_NOTIFY,\r\n\t\t\t\tG_TYPE_FROM_CLASS(object_class),\r\n\t\t\t\tsigflags,\r\n\t\t\t\tG_STRUCT_OFFSET(ScintillaClass, notify),\r\n\t\t\t\tnullptr, //(GSignalAccumulator)\r\n\t\t\t\tnullptr, //(gpointer)\r\n\t\t\t\tscintilla_marshal_VOID__INT_BOXED,\r\n\t\t\t\tG_TYPE_NONE,\r\n\t\t\t\t2, G_TYPE_INT, SCINTILLA_TYPE_NOTIFICATION);\r\n\r\n\t\tklass->command = nullptr;\r\n\t\tklass->notify = nullptr;\r\n\t\tscintilla_class_parent_class = G_OBJECT_CLASS(g_type_class_peek_parent(klass));\r\n\t\tScintillaGTK::ClassInit(object_class, widget_class, container_class);\r\n\t} catch (...) {\r\n\t}\r\n}\r\n\r\nstatic void scintilla_init(ScintillaObject *sci) {\r\n\ttry {\r\n\t\tgtk_widget_set_can_focus(GTK_WIDGET(sci), TRUE);\r\n\t\tsci->pscin = new ScintillaGTK(sci);\r\n\t} catch (...) {\r\n\t}\r\n}\r\n\r\n/* legacy name for scintilla_object_new */\r\nGtkWidget *scintilla_new() {\r\n\tGtkWidget *widget = GTK_WIDGET(g_object_new(scintilla_get_type(), nullptr));\r\n\tgtk_widget_set_direction(widget, GTK_TEXT_DIR_LTR);\r\n\r\n\treturn widget;\r\n}\r\n\r\nGtkWidget *scintilla_object_new() {\r\n\treturn scintilla_new();\r\n}\r\n\r\nvoid scintilla_set_id(ScintillaObject *sci, uptr_t id) {\r\n\tScintillaGTK *psci = static_cast<ScintillaGTK *>(sci->pscin);\r\n\tpsci->ctrlID = static_cast<int>(id);\r\n}\r\n\r\nvoid scintilla_release_resources(void) {\r\n\ttry {\r\n\t\tPlatform_Finalise();\r\n\t} catch (...) {\r\n\t}\r\n}\r\n\r\n/* Define a dummy boxed type because g-ir-scanner is unable to\r\n * recognize gpointer-derived types. Note that SCNotificaiton\r\n * is always allocated on stack so copying is not appropriate. */\r\nstatic void *copy_(void *src) { return src; }\r\nstatic void free_(void *) { }\r\n\r\nGType scnotification_get_type(void) {\r\n\tstatic gsize type_id = 0;\r\n\tif (g_once_init_enter(&type_id)) {\r\n\t\tconst gsize id = (gsize) g_boxed_type_register_static(\r\n\t\t\t\t\t g_intern_static_string(\"SCNotification\"),\r\n\t\t\t\t\t (GBoxedCopyFunc) copy_,\r\n\t\t\t\t\t (GBoxedFreeFunc) free_);\r\n\t\tg_once_init_leave(&type_id, id);\r\n\t}\r\n\treturn (GType) type_id;\r\n}\r\n"
  },
  {
    "path": "scintilla/gtk/ScintillaGTK.h",
    "content": "// Scintilla source code edit control\r\n// ScintillaGTK.h - GTK+ specific subclass of ScintillaBase\r\n// Copyright 1998-2004 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef SCINTILLAGTK_H\r\n#define SCINTILLAGTK_H\r\n\r\nnamespace Scintilla::Internal {\r\n\r\nclass ScintillaGTKAccessible;\r\n\r\n#define OBJECT_CLASS GObjectClass\r\n\r\nstruct FontOptions {\r\n\tcairo_antialias_t antialias {};\r\n\tcairo_subpixel_order_t order {};\r\n\tcairo_hint_style_t hint {};\r\n\tFontOptions() noexcept = default;\r\n\texplicit FontOptions(GtkWidget *widget) noexcept;\r\n\tbool operator==(const FontOptions &other) const noexcept;\r\n};\r\n\r\nclass ScintillaGTK : public ScintillaBase {\r\n\tfriend class ScintillaGTKAccessible;\r\n\r\n\t_ScintillaObject *sci;\r\n\tWindow wText;\r\n\tWindow scrollbarv;\r\n\tWindow scrollbarh;\r\n\tGtkAdjustment *adjustmentv;\r\n\tGtkAdjustment *adjustmenth;\r\n\tint verticalScrollBarWidth;\r\n\tint horizontalScrollBarHeight;\r\n\r\n\tPRectangle rectangleClient;\r\n\r\n\tSelectionText primary;\r\n\tSelectionPosition posPrimary;\r\n\r\n\tUniqueGdkEvent evbtn;\r\n\tguint buttonMouse;\r\n\tbool capturedMouse;\r\n\tbool dragWasDropped;\r\n\tint lastKey;\r\n\tint rectangularSelectionModifier;\r\n\r\n\tGtkWidgetClass *parentClass;\r\n\r\n\tstatic inline GdkAtom atomUTF8 {};\r\n\tstatic inline GdkAtom atomUTF8Mime {};\r\n\tstatic inline GdkAtom atomString {};\r\n\tstatic inline GdkAtom atomUriList {};\r\n\tstatic inline GdkAtom atomDROPFILES_DND {};\r\n\tGdkAtom atomSought;\r\n\tsize_t inClearSelection = 0;\r\n\r\n#if PLAT_GTK_WIN32\r\n\tCLIPFORMAT cfColumnSelect;\r\n#endif\r\n\r\n\tbool preeditInitialized;\r\n\tWindow wPreedit;\r\n\tWindow wPreeditDraw;\r\n\tUniqueIMContext im_context;\r\n\tGUnicodeScript lastNonCommonScript;\r\n\r\n\tGtkSettings *settings;\r\n\tgulong settingsHandlerId;\r\n\r\n\t// Wheel mouse support\r\n\tunsigned int linesPerScroll;\r\n\tgint64 lastWheelMouseTime;\r\n\tgint lastWheelMouseDirection;\r\n\tgint wheelMouseIntensity;\r\n\tgdouble smoothScrollY;\r\n\tgdouble smoothScrollX;\r\n\r\n#if GTK_CHECK_VERSION(3,0,0)\r\n\tcairo_rectangle_list_t *rgnUpdate;\r\n#else\r\n\tGdkRegion *rgnUpdate;\r\n#endif\r\n\tbool repaintFullWindow;\r\n\r\n\tguint styleIdleID;\r\n\tguint scrollBarIdleID = 0;\r\n\tFontOptions fontOptionsPrevious;\r\n\tint accessibilityEnabled;\r\n\tAtkObject *accessible;\r\n\r\npublic:\r\n\texplicit ScintillaGTK(_ScintillaObject *sci_);\r\n\t// Deleted so ScintillaGTK objects can not be copied.\r\n\tScintillaGTK(const ScintillaGTK &) = delete;\r\n\tScintillaGTK(ScintillaGTK &&) = delete;\r\n\tScintillaGTK &operator=(const ScintillaGTK &) = delete;\r\n\tScintillaGTK &operator=(ScintillaGTK &&) = delete;\r\n\t~ScintillaGTK() override;\r\n\tstatic ScintillaGTK *FromWidget(GtkWidget *widget) noexcept;\r\n\tstatic void ClassInit(OBJECT_CLASS *object_class, GtkWidgetClass *widget_class, GtkContainerClass *container_class);\r\nprivate:\r\n\tvoid Init();\r\n\tvoid Finalise() override;\r\n\tbool AbandonPaint() override;\r\n\tvoid DisplayCursor(Window::Cursor c) override;\r\n\tbool DragThreshold(Point ptStart, Point ptNow) override;\r\n\tvoid StartDrag() override;\r\n\tSci::Position TargetAsUTF8(char *text) const;\r\n\tSci::Position EncodedFromUTF8(const char *utf8, char *encoded) const;\r\n\tbool ValidCodePage(int codePage) const override;\r\n\tstd::string UTF8FromEncoded(std::string_view encoded) const override;\r\n\tstd::string EncodedFromUTF8(std::string_view utf8) const override;\r\npublic: \t// Public for scintilla_send_message\r\n\tsptr_t WndProc(Scintilla::Message iMessage, Scintilla::uptr_t wParam, Scintilla::sptr_t lParam) override;\r\nprivate:\r\n\tsptr_t DefWndProc(Scintilla::Message iMessage, Scintilla::uptr_t wParam, Scintilla::sptr_t lParam) override;\r\n\tstruct TimeThunk {\r\n\t\tTickReason reason;\r\n\t\tScintillaGTK *scintilla;\r\n\t\tguint timer;\r\n\t\tTimeThunk() noexcept : reason(TickReason::caret), scintilla(nullptr), timer(0) {}\r\n\t};\r\n\tTimeThunk timers[static_cast<size_t>(TickReason::dwell)+1];\r\n\tbool FineTickerRunning(TickReason reason) override;\r\n\tvoid FineTickerStart(TickReason reason, int millis, int tolerance) override;\r\n\tvoid FineTickerCancel(TickReason reason) override;\r\n\tbool SetIdle(bool on) override;\r\n\tvoid SetMouseCapture(bool on) override;\r\n\tbool HaveMouseCapture() override;\r\n\tbool PaintContains(PRectangle rc) override;\r\n\tvoid FullPaint();\r\n\tvoid SetClientRectangle();\r\n\tPRectangle GetClientRectangle() const override;\r\n\tvoid ScrollText(Sci::Line linesToMove) override;\r\n\tvoid SetVerticalScrollPos() override;\r\n\tvoid SetHorizontalScrollPos() override;\r\n\tbool ModifyScrollBars(Sci::Line nMax, Sci::Line nPage) override;\r\n\tvoid ReconfigureScrollBars() override;\r\n\tvoid SetScrollBars() override;\r\n\tvoid NotifyChange() override;\r\n\tvoid NotifyFocus(bool focus) override;\r\n\tvoid NotifyParent(Scintilla::NotificationData scn) override;\r\n\tvoid NotifyKey(Scintilla::Keys key, Scintilla::KeyMod modifiers);\r\n\tvoid NotifyURIDropped(const char *list);\r\n\tconst char *CharacterSetID() const;\r\n\tstd::unique_ptr<CaseFolder> CaseFolderForEncoding() override;\r\n\tstd::string CaseMapString(const std::string &s, CaseMapping caseMapping) override;\r\n\tint KeyDefault(Scintilla::Keys key, Scintilla::KeyMod modifiers) override;\r\n\tvoid CopyToClipboard(const SelectionText &selectedText) override;\r\n\tvoid Copy() override;\r\n\tvoid RequestSelection(GdkAtom atomSelection);\r\n\tvoid Paste() override;\r\n\tvoid CreateCallTipWindow(PRectangle rc) override;\r\n\tvoid AddToPopUp(const char *label, int cmd = 0, bool enabled = true) override;\r\n\tbool OwnPrimarySelection();\r\n\tvoid ClaimSelection() override;\r\n\tstatic bool IsStringAtom(GdkAtom type);\r\n\tvoid GetGtkSelectionText(GtkSelectionData *selectionData, SelectionText &selText);\r\n\tvoid InsertSelection(GtkClipboard *clipBoard, GtkSelectionData *selectionData);\r\npublic:\t// Public for SelectionReceiver\r\n\tGObject *MainObject() const noexcept;\r\n\tvoid ReceivedClipboard(GtkClipboard *clipBoard, GtkSelectionData *selection_data) noexcept;\r\nprivate:\r\n\tvoid ReceivedSelection(GtkSelectionData *selection_data);\r\n\tvoid ReceivedDrop(GtkSelectionData *selection_data);\r\n\tstatic void GetSelection(GtkSelectionData *selection_data, guint info, SelectionText *text);\r\n\tvoid StoreOnClipboard(SelectionText *clipText);\r\n\tstatic void ClipboardGetSelection(GtkClipboard *clip, GtkSelectionData *selection_data, guint info, void *data);\r\n\tstatic void ClipboardClearSelection(GtkClipboard *clip, void *data);\r\n\r\n\tvoid ClearPrimarySelection();\r\n\tvoid PrimaryGetSelectionThis(GtkClipboard *clip, GtkSelectionData *selection_data, guint info);\r\n\tstatic void PrimaryGetSelection(GtkClipboard *clip, GtkSelectionData *selection_data, guint info, gpointer pSci);\r\n\tvoid PrimaryClearSelectionThis(GtkClipboard *clip);\r\n\tstatic void PrimaryClearSelection(GtkClipboard *clip, gpointer pSci);\r\n\r\n\tvoid UnclaimSelection(GdkEventSelection *selection_event);\r\n\tvoid Resize(int width, int height);\r\n\r\n\t// Callback functions\r\n\tvoid RealizeThis(GtkWidget *widget);\r\n\tstatic void Realize(GtkWidget *widget);\r\n\tvoid UnRealizeThis(GtkWidget *widget);\r\n\tstatic void UnRealize(GtkWidget *widget);\r\n\tvoid MapThis();\r\n\tstatic void Map(GtkWidget *widget);\r\n\tvoid UnMapThis();\r\n\tstatic void UnMap(GtkWidget *widget);\r\n\tgint FocusInThis(GtkWidget *widget);\r\n\tstatic gint FocusIn(GtkWidget *widget, GdkEventFocus *event);\r\n\tgint FocusOutThis(GtkWidget *widget);\r\n\tstatic gint FocusOut(GtkWidget *widget, GdkEventFocus *event);\r\n\tstatic void SizeRequest(GtkWidget *widget, GtkRequisition *requisition);\r\n#if GTK_CHECK_VERSION(3,0,0)\r\n\tstatic void GetPreferredWidth(GtkWidget *widget, gint *minimalWidth, gint *naturalWidth);\r\n\tstatic void GetPreferredHeight(GtkWidget *widget, gint *minimalHeight, gint *naturalHeight);\r\n#endif\r\n\tstatic void SizeAllocate(GtkWidget *widget, GtkAllocation *allocation);\r\n\tvoid CheckForFontOptionChange();\r\n#if GTK_CHECK_VERSION(3,0,0)\r\n\tgboolean DrawTextThis(cairo_t *cr);\r\n\tstatic gboolean DrawText(GtkWidget *widget, cairo_t *cr, ScintillaGTK *sciThis);\r\n\tgboolean DrawThis(cairo_t *cr);\r\n\tstatic gboolean DrawMain(GtkWidget *widget, cairo_t *cr);\r\n#else\r\n\tgboolean ExposeTextThis(GtkWidget *widget, GdkEventExpose *ose);\r\n\tstatic gboolean ExposeText(GtkWidget *widget, GdkEventExpose *ose, ScintillaGTK *sciThis);\r\n\tgboolean Expose(GtkWidget *widget, GdkEventExpose *ose);\r\n\tstatic gboolean ExposeMain(GtkWidget *widget, GdkEventExpose *ose);\r\n#endif\r\n\tvoid ForAll(GtkCallback callback, gpointer callback_data);\r\n\tstatic void MainForAll(GtkContainer *container, gboolean include_internals, GtkCallback callback, gpointer callback_data);\r\n\r\n\tstatic void ScrollSignal(GtkAdjustment *adj, ScintillaGTK *sciThis);\r\n\tstatic void ScrollHSignal(GtkAdjustment *adj, ScintillaGTK *sciThis);\r\n\tgint PressThis(GdkEventButton *event);\r\n\tstatic gint Press(GtkWidget *widget, GdkEventButton *event);\r\n\tstatic gint MouseRelease(GtkWidget *widget, GdkEventButton *event);\r\n\tstatic gint ScrollEvent(GtkWidget *widget, GdkEventScroll *event);\r\n\tstatic gint Motion(GtkWidget *widget, GdkEventMotion *event);\r\n\tgboolean KeyThis(GdkEventKey *event);\r\n\tstatic gboolean KeyPress(GtkWidget *widget, GdkEventKey *event);\r\n\tstatic gboolean KeyRelease(GtkWidget *widget, GdkEventKey *event);\r\n#if GTK_CHECK_VERSION(3,0,0)\r\n\tgboolean DrawPreeditThis(GtkWidget *widget, cairo_t *cr);\r\n\tstatic gboolean DrawPreedit(GtkWidget *widget, cairo_t *cr, ScintillaGTK *sciThis);\r\n#else\r\n\tgboolean ExposePreeditThis(GtkWidget *widget, GdkEventExpose *ose);\r\n\tstatic gboolean ExposePreedit(GtkWidget *widget, GdkEventExpose *ose, ScintillaGTK *sciThis);\r\n#endif\r\n\tAtkObject *GetAccessibleThis(GtkWidget *widget);\r\n\tstatic AtkObject *GetAccessible(GtkWidget *widget);\r\n\r\n\tbool KoreanIME();\r\n\tvoid CommitThis(char *commitStr);\r\n\tstatic void Commit(GtkIMContext *context, char *str, ScintillaGTK *sciThis);\r\n\tvoid PreeditChangedInlineThis();\r\n\tvoid PreeditChangedWindowedThis();\r\n\tstatic void PreeditChanged(GtkIMContext *context, ScintillaGTK *sciThis);\r\n\tbool RetrieveSurroundingThis(GtkIMContext *context);\r\n\tstatic gboolean RetrieveSurrounding(GtkIMContext *context, ScintillaGTK *sciThis);\r\n\tbool DeleteSurroundingThis(GtkIMContext *context, gint characterOffset, gint characterCount);\r\n\tstatic gboolean DeleteSurrounding(GtkIMContext *context, gint characterOffset, gint characterCount,\r\n\t\t\t\t\t  ScintillaGTK *sciThis);\r\n\tvoid MoveImeCarets(Sci::Position pos);\r\n\tvoid DrawImeIndicator(int indicator, Sci::Position len);\r\n\tvoid SetCandidateWindowPos();\r\n\r\n\tstatic void StyleSetText(GtkWidget *widget, GtkStyle *previous, void *);\r\n\tstatic void RealizeText(GtkWidget *widget, void *);\r\n\tstatic void Dispose(GObject *object);\r\n\tstatic void Destroy(GObject *object);\r\n\tstatic void SelectionReceived(GtkWidget *widget, GtkSelectionData *selection_data,\r\n\t\t\t\t      guint time);\r\n\tstatic void SelectionGet(GtkWidget *widget, GtkSelectionData *selection_data,\r\n\t\t\t\t guint info, guint time);\r\n\tstatic gint SelectionClear(GtkWidget *widget, GdkEventSelection *selection_event);\r\n\tgboolean DragMotionThis(GdkDragContext *context, gint x, gint y, guint dragtime);\r\n\tstatic gboolean DragMotion(GtkWidget *widget, GdkDragContext *context,\r\n\t\t\t\t   gint x, gint y, guint dragtime);\r\n\tstatic void DragLeave(GtkWidget *widget, GdkDragContext *context,\r\n\t\t\t      guint time);\r\n\tstatic void DragEnd(GtkWidget *widget, GdkDragContext *context);\r\n\tstatic gboolean Drop(GtkWidget *widget, GdkDragContext *context,\r\n\t\t\t     gint x, gint y, guint time);\r\n\tstatic void DragDataReceived(GtkWidget *widget, GdkDragContext *context,\r\n\t\t\t\t     gint x, gint y, GtkSelectionData *selection_data, guint info, guint time);\r\n\tstatic void DragDataGet(GtkWidget *widget, GdkDragContext *context,\r\n\t\t\t\tGtkSelectionData *selection_data, guint info, guint time);\r\n\tstatic gboolean TimeOut(gpointer ptt);\r\n\tstatic gboolean IdleCallback(gpointer pSci);\r\n\tstatic gboolean StyleIdle(gpointer pSci);\r\n\tvoid IdleWork() override;\r\n\tvoid QueueIdleWork(WorkItems items, Sci::Position upTo) override;\r\n\tvoid SetDocPointer(Document *document) override;\r\n\tstatic void PopUpCB(GtkMenuItem *menuItem, ScintillaGTK *sciThis);\r\n\r\n#if GTK_CHECK_VERSION(3,0,0)\r\n\tstatic gboolean DrawCT(GtkWidget *widget, cairo_t *cr, CallTip *ctip);\r\n#else\r\n\tstatic gboolean ExposeCT(GtkWidget *widget, GdkEventExpose *ose, CallTip *ctip);\r\n#endif\r\n\tstatic gboolean PressCT(GtkWidget *widget, GdkEventButton *event, ScintillaGTK *sciThis);\r\n\r\n\tstatic sptr_t DirectFunction(sptr_t ptr,\r\n\t\t\t\t     unsigned int iMessage, uptr_t wParam, sptr_t lParam);\r\n\tstatic sptr_t DirectStatusFunction(sptr_t ptr,\r\n\t\t\t\t     unsigned int iMessage, uptr_t wParam, sptr_t lParam, int *pStatus);\r\n};\r\n\r\n// helper class to watch a GObject lifetime and get notified when it dies\r\nclass GObjectWatcher {\r\n\tGObject *weakRef;\r\n\r\n\tvoid WeakNotifyThis(GObject *obj G_GNUC_UNUSED) {\r\n\t\tPLATFORM_ASSERT(obj == weakRef);\r\n\r\n\t\tDestroyed();\r\n\t\tweakRef = nullptr;\r\n\t}\r\n\r\n\tstatic void WeakNotify(gpointer data, GObject *obj) {\r\n\t\tstatic_cast<GObjectWatcher *>(data)->WeakNotifyThis(obj);\r\n\t}\r\n\r\npublic:\r\n\tGObjectWatcher(GObject *obj) :\r\n\t\tweakRef(obj) {\r\n\t\tg_object_weak_ref(weakRef, WeakNotify, this);\r\n\t}\r\n\r\n\t// Deleted so GObjectWatcher objects can not be copied.\r\n\tGObjectWatcher(const GObjectWatcher&) = delete;\r\n\tGObjectWatcher(GObjectWatcher&&) = delete;\r\n\tGObjectWatcher&operator=(const GObjectWatcher&) = delete;\r\n\tGObjectWatcher&operator=(GObjectWatcher&&) = delete;\r\n\r\n\tvirtual ~GObjectWatcher() {\r\n\t\tif (weakRef) {\r\n\t\t\tg_object_weak_unref(weakRef, WeakNotify, this);\r\n\t\t}\r\n\t}\r\n\r\n\tvirtual void Destroyed() {}\r\n\r\n\tbool IsDestroyed() const {\r\n\t\treturn weakRef != nullptr;\r\n\t}\r\n};\r\n\r\nstd::string ConvertText(const char *s, size_t len, const char *charSetDest,\r\n\t\t\tconst char *charSetSource, bool transliterations, bool silent=false);\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/gtk/ScintillaGTKAccessible.cxx",
    "content": "/* Scintilla source code edit control */\r\n/* ScintillaGTKAccessible.cxx - GTK+ accessibility for ScintillaGTK */\r\n/* Copyright 2016 by Colomban Wendling <colomban@geany.org>\r\n * The License.txt file describes the conditions under which this software may be distributed. */\r\n\r\n// REFERENCES BETWEEN THE DIFFERENT OBJECTS\r\n//\r\n// ScintillaGTKAccessible is the actual implementation, as a C++ class.\r\n// ScintillaObjectAccessible is the GObject derived from AtkObject that\r\n// implements the various ATK interfaces, through ScintillaGTKAccessible.\r\n// This follows the same pattern as ScintillaGTK and ScintillaObject.\r\n//\r\n// ScintillaGTK owns a strong reference to the ScintillaObjectAccessible, and\r\n// is both responsible for creating and destroying that object.\r\n//\r\n// ScintillaObjectAccessible owns a strong reference to ScintillaGTKAccessible,\r\n// and is responsible for creating and destroying that object.\r\n//\r\n// ScintillaGTKAccessible has weak references to both the ScintillaGTK and\r\n// the ScintillaObjectAccessible objects associated, but does not own any\r\n// strong references to those objects.\r\n//\r\n// The chain of ownership is as follows:\r\n// ScintillaGTK -> ScintillaObjectAccessible -> ScintillaGTKAccessible\r\n\r\n// DETAILS ON THE GOBJECT TYPE IMPLEMENTATION\r\n//\r\n// On GTK < 3.2, we need to use the AtkObjectFactory.  We need to query\r\n// the factory to see what type we should derive from, thus making use of\r\n// dynamic inheritance.  It's tricky, but it works so long as it's done\r\n// carefully enough.\r\n//\r\n// On GTK 3.2 through 3.6, we need to hack around because GTK stopped\r\n// registering its accessible types in the factory, so we can't query\r\n// them that way.  Unfortunately, the accessible types aren't exposed\r\n// yet (not until 3.8), so there's no proper way to know which type to\r\n// inherit from.  To work around this, we instantiate the parent's\r\n// AtkObject temporarily, and use it's type.  It means creating an extra\r\n// throwaway object and being able to pass the type information up to the\r\n// type registration code, but it's the only solution I could find.\r\n//\r\n// On GTK 3.8 onward, we use the proper exposed GtkContainerAccessible as\r\n// parent, and so a straightforward class.\r\n//\r\n// To hide and contain the complexity in type creation arising from the\r\n// hackish support for GTK 3.2 to 3.8, the actual implementation for the\r\n// widget's get_accessible() is located in the accessibility layer itself.\r\n\r\n// Initially based on GtkTextViewAccessible from GTK 3.20\r\n// Inspiration for the GTK < 3.2 part comes from Evince 2.24, thanks.\r\n\r\n// FIXME: optimize character/byte offset conversion (with a cache?)\r\n\r\n#include <cstddef>\r\n#include <cstdlib>\r\n#include <cstdint>\r\n#include <cassert>\r\n#include <cstring>\r\n\r\n#include <stdexcept>\r\n#include <new>\r\n#include <string>\r\n#include <string_view>\r\n#include <vector>\r\n#include <map>\r\n#include <set>\r\n#include <optional>\r\n#include <algorithm>\r\n#include <memory>\r\n\r\n#include <glib.h>\r\n#include <gtk/gtk.h>\r\n\r\n// whether we have widget_set() and widget_unset()\r\n#define HAVE_WIDGET_SET_UNSET (GTK_CHECK_VERSION(3, 3, 6))\r\n// whether GTK accessibility is available through the ATK factory\r\n#define HAVE_GTK_FACTORY (! GTK_CHECK_VERSION(3, 1, 9))\r\n// whether we have gtk-a11y.h and the public GTK accessible types\r\n#define HAVE_GTK_A11Y_H (GTK_CHECK_VERSION(3, 7, 6))\r\n\r\n#if HAVE_GTK_A11Y_H\r\n# include <gtk/gtk-a11y.h>\r\n#endif\r\n\r\n#if defined(_WIN32)\r\n// On Win32 use windows.h to access CLIPFORMAT\r\n#undef NOMINMAX\r\n#define NOMINMAX\r\n#include <windows.h>\r\n#endif\r\n\r\n// ScintillaGTK.h and stuff it needs\r\n#include \"ScintillaTypes.h\"\r\n#include \"ScintillaMessages.h\"\r\n#include \"ScintillaStructures.h\"\r\n#include \"ILoader.h\"\r\n#include \"ILexer.h\"\r\n\r\n#include \"Debugging.h\"\r\n#include \"Geometry.h\"\r\n#include \"Platform.h\"\r\n\r\n#include \"Scintilla.h\"\r\n#include \"ScintillaWidget.h\"\r\n#include \"CharacterCategoryMap.h\"\r\n#include \"Position.h\"\r\n#include \"UniqueString.h\"\r\n#include \"SplitVector.h\"\r\n#include \"Partitioning.h\"\r\n#include \"RunStyles.h\"\r\n#include \"ContractionState.h\"\r\n#include \"CellBuffer.h\"\r\n#include \"CallTip.h\"\r\n#include \"KeyMap.h\"\r\n#include \"Indicator.h\"\r\n#include \"LineMarker.h\"\r\n#include \"Style.h\"\r\n#include \"ViewStyle.h\"\r\n#include \"CharClassify.h\"\r\n#include \"Decoration.h\"\r\n#include \"CaseFolder.h\"\r\n#include \"Document.h\"\r\n#include \"CaseConvert.h\"\r\n#include \"UniConversion.h\"\r\n#include \"Selection.h\"\r\n#include \"PositionCache.h\"\r\n#include \"EditModel.h\"\r\n#include \"MarginView.h\"\r\n#include \"EditView.h\"\r\n#include \"Editor.h\"\r\n#include \"AutoComplete.h\"\r\n#include \"ScintillaBase.h\"\r\n\r\n#include \"Wrappers.h\"\r\n#include \"ScintillaGTK.h\"\r\n#include \"ScintillaGTKAccessible.h\"\r\n\r\nusing namespace Scintilla;\r\nusing namespace Scintilla::Internal;\r\n\r\nstruct ScintillaObjectAccessiblePrivate {\r\n\tScintillaGTKAccessible *pscin;\r\n};\r\n\r\ntypedef GtkAccessible ScintillaObjectAccessible;\r\ntypedef GtkAccessibleClass ScintillaObjectAccessibleClass;\r\n\r\n#define SCINTILLA_OBJECT_ACCESSIBLE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), SCINTILLA_TYPE_OBJECT_ACCESSIBLE, ScintillaObjectAccessible))\r\n#define SCINTILLA_TYPE_OBJECT_ACCESSIBLE (scintilla_object_accessible_get_type(0))\r\n\r\n// We can't use priv member because of dynamic inheritance, so we don't actually know the offset.  Meh.\r\n#define SCINTILLA_OBJECT_ACCESSIBLE_GET_PRIVATE(inst) (G_TYPE_INSTANCE_GET_PRIVATE((inst), SCINTILLA_TYPE_OBJECT_ACCESSIBLE, ScintillaObjectAccessiblePrivate))\r\n\r\nstatic GType scintilla_object_accessible_get_type(GType parent_type);\r\n\r\nScintillaGTKAccessible *ScintillaGTKAccessible::FromAccessible(GtkAccessible *accessible) {\r\n\t// FIXME: do we need the check below?  GTK checks that in all methods, so maybe\r\n\tGtkWidget *widget = gtk_accessible_get_widget(accessible);\r\n\tif (! widget) {\r\n\t\treturn nullptr;\r\n\t}\r\n\r\n\treturn SCINTILLA_OBJECT_ACCESSIBLE_GET_PRIVATE(accessible)->pscin;\r\n}\r\n\r\nScintillaGTKAccessible::ScintillaGTKAccessible(GtkAccessible *accessible_, GtkWidget *widget_) :\r\n\t\taccessible(accessible_),\r\n\t\tsci(ScintillaGTK::FromWidget(widget_)),\r\n\t\told_pos(-1) {\r\n\tSetAccessibility(true);\r\n\tg_signal_connect(widget_, \"sci-notify\", G_CALLBACK(SciNotify), this);\r\n}\r\n\r\nScintillaGTKAccessible::~ScintillaGTKAccessible() {\r\n\tif (gtk_accessible_get_widget(accessible)) {\r\n\t\tg_signal_handlers_disconnect_matched(sci->sci, G_SIGNAL_MATCH_DATA, 0, 0, nullptr, nullptr, this);\r\n\t}\r\n}\r\n\r\ngchar *ScintillaGTKAccessible::GetTextRangeUTF8(Sci::Position startByte, Sci::Position endByte) {\r\n\tg_return_val_if_fail(startByte >= 0, nullptr);\r\n\t// FIXME: should we swap start/end if necessary?\r\n\tg_return_val_if_fail(endByte >= startByte, nullptr);\r\n\r\n\tgchar *utf8Text = nullptr;\r\n\tconst char *charSetBuffer;\r\n\r\n\t// like TargetAsUTF8, but avoids a double conversion\r\n\tif (sci->IsUnicodeMode() || ! *(charSetBuffer = sci->CharacterSetID())) {\r\n\t\tint len = endByte - startByte;\r\n\t\tutf8Text = static_cast<gchar *>(g_malloc(len + 1));\r\n\t\tsci->pdoc->GetCharRange(utf8Text, startByte, len);\r\n\t\tutf8Text[len] = '\\0';\r\n\t} else {\r\n\t\t// Need to convert\r\n\t\tstd::string s = sci->RangeText(startByte, endByte);\r\n\t\tstd::string tmputf = ConvertText(&s[0], s.length(), \"UTF-8\", charSetBuffer, false);\r\n\t\tsize_t len = tmputf.length();\r\n\t\tutf8Text = static_cast<gchar *>(g_malloc(len + 1));\r\n\t\tmemcpy(utf8Text, tmputf.c_str(), len);\r\n\t\tutf8Text[len] = '\\0';\r\n\t}\r\n\r\n\treturn utf8Text;\r\n}\r\n\r\ngchar *ScintillaGTKAccessible::GetText(int startChar, int endChar) {\r\n\tSci::Position startByte, endByte;\r\n\tif (endChar == -1) {\r\n\t\tstartByte = ByteOffsetFromCharacterOffset(startChar);\r\n\t\tendByte = sci->pdoc->Length();\r\n\t} else {\r\n\t\tByteRangeFromCharacterRange(startChar, endChar, startByte, endByte);\r\n\t}\r\n\treturn GetTextRangeUTF8(startByte, endByte);\r\n}\r\n\r\ngchar *ScintillaGTKAccessible::GetTextAfterOffset(int charOffset,\r\n\t\tAtkTextBoundary boundaryType, int *startChar, int *endChar) {\r\n\tg_return_val_if_fail(charOffset >= 0, nullptr);\r\n\r\n\tSci::Position startByte, endByte;\r\n\tSci::Position byteOffset = ByteOffsetFromCharacterOffset(charOffset);\r\n\r\n\tswitch (boundaryType) {\r\n\t\tcase ATK_TEXT_BOUNDARY_CHAR:\r\n\t\t\tstartByte = PositionAfter(byteOffset);\r\n\t\t\tendByte = PositionAfter(startByte);\r\n\t\t\t// FIXME: optimize conversion back, as we can reasonably assume +1 char?\r\n\t\t\tbreak;\r\n\r\n\t\tcase ATK_TEXT_BOUNDARY_WORD_START:\r\n\t\t\tstartByte = sci->WndProc(Message::WordEndPosition, byteOffset, 1);\r\n\t\t\tstartByte = sci->WndProc(Message::WordEndPosition, startByte, 0);\r\n\t\t\tendByte = sci->WndProc(Message::WordEndPosition, startByte, 1);\r\n\t\t\tendByte = sci->WndProc(Message::WordEndPosition, endByte, 0);\r\n\t\t\tbreak;\r\n\r\n\t\tcase ATK_TEXT_BOUNDARY_WORD_END:\r\n\t\t\tstartByte = sci->WndProc(Message::WordEndPosition, byteOffset, 0);\r\n\t\t\tstartByte = sci->WndProc(Message::WordEndPosition, startByte, 1);\r\n\t\t\tendByte = sci->WndProc(Message::WordEndPosition, startByte, 0);\r\n\t\t\tendByte = sci->WndProc(Message::WordEndPosition, endByte, 1);\r\n\t\t\tbreak;\r\n\r\n\t\tcase ATK_TEXT_BOUNDARY_LINE_START: {\r\n\t\t\tint line = sci->WndProc(Message::LineFromPosition, byteOffset, 0);\r\n\t\t\tstartByte = sci->WndProc(Message::PositionFromLine, line + 1, 0);\r\n\t\t\tendByte = sci->WndProc(Message::PositionFromLine, line + 2, 0);\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tcase ATK_TEXT_BOUNDARY_LINE_END: {\r\n\t\t\tint line = sci->WndProc(Message::LineFromPosition, byteOffset, 0);\r\n\t\t\tstartByte = sci->WndProc(Message::GetLineEndPosition, line, 0);\r\n\t\t\tendByte = sci->WndProc(Message::GetLineEndPosition, line + 1, 0);\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tdefault:\r\n\t\t\t*startChar = *endChar = -1;\r\n\t\t\treturn nullptr;\r\n\t}\r\n\r\n\tCharacterRangeFromByteRange(startByte, endByte, startChar, endChar);\r\n\treturn GetTextRangeUTF8(startByte, endByte);\r\n}\r\n\r\ngchar *ScintillaGTKAccessible::GetTextBeforeOffset(int charOffset,\r\n\t\tAtkTextBoundary boundaryType, int *startChar, int *endChar) {\r\n\tg_return_val_if_fail(charOffset >= 0, nullptr);\r\n\r\n\tSci::Position startByte, endByte;\r\n\tSci::Position byteOffset = ByteOffsetFromCharacterOffset(charOffset);\r\n\r\n\tswitch (boundaryType) {\r\n\t\tcase ATK_TEXT_BOUNDARY_CHAR:\r\n\t\t\tendByte = PositionBefore(byteOffset);\r\n\t\t\tstartByte = PositionBefore(endByte);\r\n\t\t\tbreak;\r\n\r\n\t\tcase ATK_TEXT_BOUNDARY_WORD_START:\r\n\t\t\tendByte = sci->WndProc(Message::WordStartPosition, byteOffset, 0);\r\n\t\t\tendByte = sci->WndProc(Message::WordStartPosition, endByte, 1);\r\n\t\t\tstartByte = sci->WndProc(Message::WordStartPosition, endByte, 0);\r\n\t\t\tstartByte = sci->WndProc(Message::WordStartPosition, startByte, 1);\r\n\t\t\tbreak;\r\n\r\n\t\tcase ATK_TEXT_BOUNDARY_WORD_END:\r\n\t\t\tendByte = sci->WndProc(Message::WordStartPosition, byteOffset, 1);\r\n\t\t\tendByte = sci->WndProc(Message::WordStartPosition, endByte, 0);\r\n\t\t\tstartByte = sci->WndProc(Message::WordStartPosition, endByte, 1);\r\n\t\t\tstartByte = sci->WndProc(Message::WordStartPosition, startByte, 0);\r\n\t\t\tbreak;\r\n\r\n\t\tcase ATK_TEXT_BOUNDARY_LINE_START: {\r\n\t\t\tint line = sci->WndProc(Message::LineFromPosition, byteOffset, 0);\r\n\t\t\tendByte = sci->WndProc(Message::PositionFromLine, line, 0);\r\n\t\t\tif (line > 0) {\r\n\t\t\t\tstartByte = sci->WndProc(Message::PositionFromLine, line - 1, 0);\r\n\t\t\t} else {\r\n\t\t\t\tstartByte = endByte;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tcase ATK_TEXT_BOUNDARY_LINE_END: {\r\n\t\t\tint line = sci->WndProc(Message::LineFromPosition, byteOffset, 0);\r\n\t\t\tif (line > 0) {\r\n\t\t\t\tendByte = sci->WndProc(Message::GetLineEndPosition, line - 1, 0);\r\n\t\t\t} else {\r\n\t\t\t\tendByte = 0;\r\n\t\t\t}\r\n\t\t\tif (line > 1) {\r\n\t\t\t\tstartByte = sci->WndProc(Message::GetLineEndPosition, line - 2, 0);\r\n\t\t\t} else {\r\n\t\t\t\tstartByte = endByte;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tdefault:\r\n\t\t\t*startChar = *endChar = -1;\r\n\t\t\treturn nullptr;\r\n\t}\r\n\r\n\tCharacterRangeFromByteRange(startByte, endByte, startChar, endChar);\r\n\treturn GetTextRangeUTF8(startByte, endByte);\r\n}\r\n\r\ngchar *ScintillaGTKAccessible::GetTextAtOffset(int charOffset,\r\n\t\tAtkTextBoundary boundaryType, int *startChar, int *endChar) {\r\n\tg_return_val_if_fail(charOffset >= 0, nullptr);\r\n\r\n\tSci::Position startByte, endByte;\r\n\tSci::Position byteOffset = ByteOffsetFromCharacterOffset(charOffset);\r\n\r\n\tswitch (boundaryType) {\r\n\t\tcase ATK_TEXT_BOUNDARY_CHAR:\r\n\t\t\tstartByte = byteOffset;\r\n\t\t\tendByte = sci->WndProc(Message::PositionAfter, byteOffset, 0);\r\n\t\t\tbreak;\r\n\r\n\t\tcase ATK_TEXT_BOUNDARY_WORD_START:\r\n\t\t\tstartByte = sci->WndProc(Message::WordStartPosition, byteOffset, 1);\r\n\t\t\tendByte = sci->WndProc(Message::WordEndPosition, byteOffset, 1);\r\n\t\t\tif (! sci->WndProc(Message::IsRangeWord, startByte, endByte)) {\r\n\t\t\t\t// if the cursor was not on a word, forward back\r\n\t\t\t\tstartByte = sci->WndProc(Message::WordStartPosition, startByte, 0);\r\n\t\t\t\tstartByte = sci->WndProc(Message::WordStartPosition, startByte, 1);\r\n\t\t\t}\r\n\t\t\tendByte = sci->WndProc(Message::WordEndPosition, endByte, 0);\r\n\t\t\tbreak;\r\n\r\n\t\tcase ATK_TEXT_BOUNDARY_WORD_END:\r\n\t\t\tstartByte = sci->WndProc(Message::WordStartPosition, byteOffset, 1);\r\n\t\t\tendByte = sci->WndProc(Message::WordEndPosition, byteOffset, 1);\r\n\t\t\tif (! sci->WndProc(Message::IsRangeWord, startByte, endByte)) {\r\n\t\t\t\t// if the cursor was not on a word, forward back\r\n\t\t\t\tendByte = sci->WndProc(Message::WordEndPosition, endByte, 0);\r\n\t\t\t\tendByte = sci->WndProc(Message::WordEndPosition, endByte, 1);\r\n\t\t\t}\r\n\t\t\tstartByte = sci->WndProc(Message::WordStartPosition, startByte, 0);\r\n\t\t\tbreak;\r\n\r\n\t\tcase ATK_TEXT_BOUNDARY_LINE_START: {\r\n\t\t\tint line = sci->WndProc(Message::LineFromPosition, byteOffset, 0);\r\n\t\t\tstartByte = sci->WndProc(Message::PositionFromLine, line, 0);\r\n\t\t\tendByte = sci->WndProc(Message::PositionFromLine, line + 1, 0);\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tcase ATK_TEXT_BOUNDARY_LINE_END: {\r\n\t\t\tint line = sci->WndProc(Message::LineFromPosition, byteOffset, 0);\r\n\t\t\tif (line > 0) {\r\n\t\t\t\tstartByte = sci->WndProc(Message::GetLineEndPosition, line - 1, 0);\r\n\t\t\t} else {\r\n\t\t\t\tstartByte = 0;\r\n\t\t\t}\r\n\t\t\tendByte = sci->WndProc(Message::GetLineEndPosition, line, 0);\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tdefault:\r\n\t\t\t*startChar = *endChar = -1;\r\n\t\t\treturn nullptr;\r\n\t}\r\n\r\n\tCharacterRangeFromByteRange(startByte, endByte, startChar, endChar);\r\n\treturn GetTextRangeUTF8(startByte, endByte);\r\n}\r\n\r\n#if ATK_CHECK_VERSION(2, 10, 0)\r\ngchar *ScintillaGTKAccessible::GetStringAtOffset(int charOffset,\r\n\t\tAtkTextGranularity granularity, int *startChar, int *endChar) {\r\n\tg_return_val_if_fail(charOffset >= 0, nullptr);\r\n\r\n\tSci::Position startByte, endByte;\r\n\tSci::Position byteOffset = ByteOffsetFromCharacterOffset(charOffset);\r\n\r\n\tswitch (granularity) {\r\n\t\tcase ATK_TEXT_GRANULARITY_CHAR:\r\n\t\t\tstartByte = byteOffset;\r\n\t\t\tendByte = sci->WndProc(Message::PositionAfter, byteOffset, 0);\r\n\t\t\tbreak;\r\n\t\tcase ATK_TEXT_GRANULARITY_WORD:\r\n\t\t\tstartByte = sci->WndProc(Message::WordStartPosition, byteOffset, 1);\r\n\t\t\tendByte = sci->WndProc(Message::WordEndPosition, byteOffset, 1);\r\n\t\t\tbreak;\r\n\t\tcase ATK_TEXT_GRANULARITY_LINE: {\r\n\t\t\tgint line = sci->WndProc(Message::LineFromPosition, byteOffset, 0);\r\n\t\t\tstartByte = sci->WndProc(Message::PositionFromLine, line, 0);\r\n\t\t\tendByte = sci->WndProc(Message::GetLineEndPosition, line, 0);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tdefault:\r\n\t\t\t*startChar = *endChar = -1;\r\n\t\t\treturn nullptr;\r\n\t}\r\n\r\n\tCharacterRangeFromByteRange(startByte, endByte, startChar, endChar);\r\n\treturn GetTextRangeUTF8(startByte, endByte);\r\n}\r\n#endif\r\n\r\ngunichar ScintillaGTKAccessible::GetCharacterAtOffset(int charOffset) {\r\n\tg_return_val_if_fail(charOffset >= 0, 0);\r\n\r\n\tSci::Position startByte = ByteOffsetFromCharacterOffset(charOffset);\r\n\tSci::Position endByte = PositionAfter(startByte);\r\n\tgchar *ch = GetTextRangeUTF8(startByte, endByte);\r\n\tgunichar unichar = g_utf8_get_char_validated(ch, -1);\r\n\tg_free(ch);\r\n\r\n\treturn unichar;\r\n}\r\n\r\ngint ScintillaGTKAccessible::GetCharacterCount() {\r\n\treturn sci->pdoc->CountCharacters(0, sci->pdoc->Length());\r\n}\r\n\r\ngint ScintillaGTKAccessible::GetCaretOffset() {\r\n\treturn CharacterOffsetFromByteOffset(sci->WndProc(Message::GetCurrentPos, 0, 0));\r\n}\r\n\r\ngboolean ScintillaGTKAccessible::SetCaretOffset(int charOffset) {\r\n\tsci->WndProc(Message::GotoPos, ByteOffsetFromCharacterOffset(charOffset), 0);\r\n\treturn TRUE;\r\n}\r\n\r\ngint ScintillaGTKAccessible::GetOffsetAtPoint(gint x, gint y, AtkCoordType coords) {\r\n\tgint x_widget, y_widget, x_window, y_window;\r\n\tGtkWidget *widget = gtk_accessible_get_widget(accessible);\r\n\r\n\tGdkWindow *window = gtk_widget_get_window(widget);\r\n\tgdk_window_get_origin(window, &x_widget, &y_widget);\r\n\tif (coords == ATK_XY_SCREEN) {\r\n\t\tx = x - x_widget;\r\n\t\ty = y - y_widget;\r\n\t} else if (coords == ATK_XY_WINDOW) {\r\n\t\twindow = gdk_window_get_toplevel(window);\r\n\t\tgdk_window_get_origin(window, &x_window, &y_window);\r\n\r\n\t\tx = x - x_widget + x_window;\r\n\t\ty = y - y_widget + y_window;\r\n\t} else {\r\n\t\treturn -1;\r\n\t}\r\n\r\n\t// FIXME: should we handle scrolling?\r\n\treturn CharacterOffsetFromByteOffset(sci->WndProc(Message::CharPositionFromPointClose, x, y));\r\n}\r\n\r\nvoid ScintillaGTKAccessible::GetCharacterExtents(int charOffset,\r\n\t\tgint *x, gint *y, gint *width, gint *height, AtkCoordType coords) {\r\n\t*x = *y = *height = *width = 0;\r\n\r\n\tSci::Position byteOffset = ByteOffsetFromCharacterOffset(charOffset);\r\n\r\n\t// FIXME: should we handle scrolling?\r\n\t*x = sci->WndProc(Message::PointXFromPosition, 0, byteOffset);\r\n\t*y = sci->WndProc(Message::PointYFromPosition, 0, byteOffset);\r\n\r\n\tint line = sci->WndProc(Message::LineFromPosition, byteOffset, 0);\r\n\t*height = sci->WndProc(Message::TextHeight, line, 0);\r\n\r\n\tint nextByteOffset = PositionAfter(byteOffset);\r\n\tint next_x = sci->WndProc(Message::PointXFromPosition, 0, nextByteOffset);\r\n\tif (next_x > *x) {\r\n\t\t*width = next_x - *x;\r\n\t} else if (nextByteOffset > byteOffset) {\r\n\t\t/* maybe next position was on the next line or something.\r\n\t\t * just compute the expected character width */\r\n\t\tint style = StyleAt(byteOffset, true);\r\n\t\tint len = nextByteOffset - byteOffset;\r\n\t\tchar *ch = new char[len + 1];\r\n\t\tsci->pdoc->GetCharRange(ch, byteOffset, len);\r\n\t\tch[len] = '\\0';\r\n\t\t*width = sci->TextWidth(style, ch);\r\n\t\tdelete[] ch;\r\n\t}\r\n\r\n\tGtkWidget *widget = gtk_accessible_get_widget(accessible);\r\n\tGdkWindow *window = gtk_widget_get_window(widget);\r\n\tint x_widget, y_widget;\r\n\tgdk_window_get_origin(window, &x_widget, &y_widget);\r\n\tif (coords == ATK_XY_SCREEN) {\r\n\t\t*x += x_widget;\r\n\t\t*y += y_widget;\r\n\t} else if (coords == ATK_XY_WINDOW) {\r\n\t\twindow = gdk_window_get_toplevel(window);\r\n\t\tint x_window, y_window;\r\n\t\tgdk_window_get_origin(window, &x_window, &y_window);\r\n\r\n\t\t*x += x_widget - x_window;\r\n\t\t*y += y_widget - y_window;\r\n\t} else {\r\n\t\t*x = *y = *height = *width = 0;\r\n\t}\r\n}\r\n\r\nstatic AtkAttributeSet *AddTextAttribute(AtkAttributeSet *attributes, AtkTextAttribute attr, gchar *value) {\r\n\tAtkAttribute *at = g_new(AtkAttribute, 1);\r\n\tat->name = g_strdup(atk_text_attribute_get_name(attr));\r\n\tat->value = value;\r\n\r\n\treturn g_slist_prepend(attributes, at);\r\n}\r\n\r\nstatic AtkAttributeSet *AddTextIntAttribute(AtkAttributeSet *attributes, AtkTextAttribute attr, gint i) {\r\n\treturn AddTextAttribute(attributes, attr, g_strdup(atk_text_attribute_get_value(attr, i)));\r\n}\r\n\r\nstatic AtkAttributeSet *AddTextColorAttribute(AtkAttributeSet *attributes, AtkTextAttribute attr, ColourRGBA colour) {\r\n\treturn AddTextAttribute(attributes, attr,\r\n\t\tg_strdup_printf(\"%u,%u,%u\", colour.GetRed() * 257, colour.GetGreen() * 257, colour.GetBlue() * 257));\r\n}\r\n\r\nAtkAttributeSet *ScintillaGTKAccessible::GetAttributesForStyle(unsigned int styleNum) {\r\n\tAtkAttributeSet *attr_set = nullptr;\r\n\r\n\tif (styleNum >= sci->vs.styles.size())\r\n\t\treturn nullptr;\r\n\tStyle &style = sci->vs.styles[styleNum];\r\n\r\n\tattr_set = AddTextAttribute(attr_set, ATK_TEXT_ATTR_FAMILY_NAME, g_strdup(style.fontName));\r\n\tattr_set = AddTextAttribute(attr_set, ATK_TEXT_ATTR_SIZE, g_strdup_printf(\"%d\", style.size / SC_FONT_SIZE_MULTIPLIER));\r\n\tattr_set = AddTextIntAttribute(attr_set, ATK_TEXT_ATTR_WEIGHT, CLAMP(static_cast<int>(style.weight), 100, 1000));\r\n\tattr_set = AddTextIntAttribute(attr_set, ATK_TEXT_ATTR_STYLE, style.italic ? PANGO_STYLE_ITALIC : PANGO_STYLE_NORMAL);\r\n\tattr_set = AddTextIntAttribute(attr_set, ATK_TEXT_ATTR_UNDERLINE, style.underline ? PANGO_UNDERLINE_SINGLE : PANGO_UNDERLINE_NONE);\r\n\tattr_set = AddTextColorAttribute(attr_set, ATK_TEXT_ATTR_FG_COLOR, style.fore);\r\n\tattr_set = AddTextColorAttribute(attr_set, ATK_TEXT_ATTR_BG_COLOR, style.back);\r\n\tattr_set = AddTextIntAttribute(attr_set, ATK_TEXT_ATTR_INVISIBLE, style.visible ? 0 : 1);\r\n\tattr_set = AddTextIntAttribute(attr_set, ATK_TEXT_ATTR_EDITABLE, style.changeable ? 1 : 0);\r\n\r\n\treturn attr_set;\r\n}\r\n\r\nAtkAttributeSet *ScintillaGTKAccessible::GetRunAttributes(int charOffset, int *startChar, int *endChar) {\r\n\tg_return_val_if_fail(charOffset >= -1, nullptr);\r\n\r\n\tSci::Position byteOffset;\r\n\tif (charOffset == -1) {\r\n\t\tbyteOffset = sci->WndProc(Message::GetCurrentPos, 0, 0);\r\n\t} else {\r\n\t\tbyteOffset = ByteOffsetFromCharacterOffset(charOffset);\r\n\t}\r\n\tint length = sci->pdoc->Length();\r\n\r\n\tg_return_val_if_fail(byteOffset <= length, nullptr);\r\n\r\n\tconst char style = StyleAt(byteOffset, true);\r\n\t// compute the range for this style\r\n\tSci::Position startByte = byteOffset;\r\n\t// when going backwards, we know the style is already computed\r\n\twhile (startByte > 0 && sci->pdoc->StyleAt((startByte) - 1) == style)\r\n\t\t(startByte)--;\r\n\tSci::Position endByte = byteOffset + 1;\r\n\twhile (endByte < length && StyleAt(endByte, true) == style)\r\n\t\t(endByte)++;\r\n\r\n\tCharacterRangeFromByteRange(startByte, endByte, startChar, endChar);\r\n\treturn GetAttributesForStyle((unsigned int) style);\r\n}\r\n\r\nAtkAttributeSet *ScintillaGTKAccessible::GetDefaultAttributes() {\r\n\treturn GetAttributesForStyle(0);\r\n}\r\n\r\ngint ScintillaGTKAccessible::GetNSelections() {\r\n\treturn sci->sel.Empty() ? 0 : sci->sel.Count();\r\n}\r\n\r\ngchar *ScintillaGTKAccessible::GetSelection(gint selection_num, int *startChar, int *endChar) {\r\n\tif (selection_num < 0 || (unsigned int) selection_num >= sci->sel.Count())\r\n\t\treturn nullptr;\r\n\r\n\tSci::Position startByte = sci->sel.Range(selection_num).Start().Position();\r\n\tSci::Position endByte = sci->sel.Range(selection_num).End().Position();\r\n\r\n\tCharacterRangeFromByteRange(startByte, endByte, startChar, endChar);\r\n\treturn GetTextRangeUTF8(startByte, endByte);\r\n}\r\n\r\ngboolean ScintillaGTKAccessible::AddSelection(int startChar, int endChar) {\r\n\tsize_t n_selections = sci->sel.Count();\r\n\tSci::Position startByte, endByte;\r\n\tByteRangeFromCharacterRange(startChar, endChar, startByte, endByte);\r\n\t// use WndProc() to set the selections so it notifies as needed\r\n\tif (n_selections > 1 || ! sci->sel.Empty()) {\r\n\t\tsci->WndProc(Message::AddSelection, startByte, endByte);\r\n\t} else {\r\n\t\tsci->WndProc(Message::SetSelection, startByte, endByte);\r\n\t}\r\n\r\n\treturn TRUE;\r\n}\r\n\r\ngboolean ScintillaGTKAccessible::RemoveSelection(gint selection_num) {\r\n\tsize_t n_selections = sci->sel.Count();\r\n\tif (selection_num < 0 || (unsigned int) selection_num >= n_selections)\r\n\t\treturn FALSE;\r\n\r\n\tif (n_selections > 1) {\r\n\t\tsci->WndProc(Message::DropSelectionN, selection_num, 0);\r\n\t} else if (sci->sel.Empty()) {\r\n\t\treturn FALSE;\r\n\t} else {\r\n\t\tsci->WndProc(Message::ClearSelections, 0, 0);\r\n\t}\r\n\r\n\treturn TRUE;\r\n}\r\n\r\ngboolean ScintillaGTKAccessible::SetSelection(gint selection_num, int startChar, int endChar) {\r\n\tif (selection_num < 0 || (unsigned int) selection_num >= sci->sel.Count())\r\n\t\treturn FALSE;\r\n\r\n\tSci::Position startByte, endByte;\r\n\tByteRangeFromCharacterRange(startChar, endChar, startByte, endByte);\r\n\r\n\tsci->WndProc(Message::SetSelectionNStart, selection_num, startByte);\r\n\tsci->WndProc(Message::SetSelectionNEnd, selection_num, endByte);\r\n\r\n\treturn TRUE;\r\n}\r\n\r\nvoid ScintillaGTKAccessible::AtkTextIface::init(::AtkTextIface *iface) {\r\n\tiface->get_text = GetText;\r\n\tiface->get_text_after_offset = GetTextAfterOffset;\r\n\tiface->get_text_at_offset = GetTextAtOffset;\r\n\tiface->get_text_before_offset = GetTextBeforeOffset;\r\n#if ATK_CHECK_VERSION(2, 10, 0)\r\n\tiface->get_string_at_offset = GetStringAtOffset;\r\n#endif\r\n\tiface->get_character_at_offset = GetCharacterAtOffset;\r\n\tiface->get_character_count = GetCharacterCount;\r\n\tiface->get_caret_offset = GetCaretOffset;\r\n\tiface->set_caret_offset = SetCaretOffset;\r\n\tiface->get_offset_at_point = GetOffsetAtPoint;\r\n\tiface->get_character_extents = GetCharacterExtents;\r\n\tiface->get_n_selections = GetNSelections;\r\n\tiface->get_selection = GetSelection;\r\n\tiface->add_selection = AddSelection;\r\n\tiface->remove_selection = RemoveSelection;\r\n\tiface->set_selection = SetSelection;\r\n\tiface->get_run_attributes = GetRunAttributes;\r\n\tiface->get_default_attributes = GetDefaultAttributes;\r\n}\r\n\r\n/* atkeditabletext.h */\r\n\r\nvoid ScintillaGTKAccessible::SetTextContents(const gchar *contents) {\r\n\t// FIXME: it's probably useless to check for READONLY here, SETTEXT probably does it just fine?\r\n\tif (! sci->pdoc->IsReadOnly()) {\r\n\t\tsci->WndProc(Message::SetText, 0, (sptr_t) contents);\r\n\t}\r\n}\r\n\r\nbool ScintillaGTKAccessible::InsertStringUTF8(Sci::Position bytePos, const gchar *utf8, Sci::Position lengthBytes) {\r\n\tif (sci->pdoc->IsReadOnly()) {\r\n\t\treturn false;\r\n\t}\r\n\r\n\t// like EncodedFromUTF8(), but avoids an extra copy\r\n\t// FIXME: update target?\r\n\tconst char *charSetBuffer;\r\n\tif (sci->IsUnicodeMode() || ! *(charSetBuffer = sci->CharacterSetID())) {\r\n\t\tsci->pdoc->InsertString(bytePos, utf8, lengthBytes);\r\n\t} else {\r\n\t\t// conversion needed\r\n\t\tstd::string encoded = ConvertText(utf8, lengthBytes, charSetBuffer, \"UTF-8\", true);\r\n\t\tsci->pdoc->InsertString(bytePos, encoded.c_str(), encoded.length());\r\n\t}\r\n\r\n\treturn true;\r\n}\r\n\r\nvoid ScintillaGTKAccessible::InsertText(const gchar *text, int lengthBytes, int *charPosition) {\r\n\tSci::Position bytePosition = ByteOffsetFromCharacterOffset(*charPosition);\r\n\r\n\t// FIXME: should we update the target?\r\n\tif (InsertStringUTF8(bytePosition, text, lengthBytes)) {\r\n\t\t(*charPosition) += sci->pdoc->CountCharacters(bytePosition, lengthBytes);\r\n\t}\r\n}\r\n\r\nvoid ScintillaGTKAccessible::CopyText(int startChar, int endChar) {\r\n\tSci::Position startByte, endByte;\r\n\tByteRangeFromCharacterRange(startChar, endChar, startByte, endByte);\r\n\tsci->CopyRangeToClipboard(startByte, endByte);\r\n}\r\n\r\nvoid ScintillaGTKAccessible::CutText(int startChar, int endChar) {\r\n\tg_return_if_fail(endChar >= startChar);\r\n\r\n\tif (! sci->pdoc->IsReadOnly()) {\r\n\t\t// FIXME: have a byte variant of those and convert only once?\r\n\t\tCopyText(startChar, endChar);\r\n\t\tDeleteText(startChar, endChar);\r\n\t}\r\n}\r\n\r\nvoid ScintillaGTKAccessible::DeleteText(int startChar, int endChar) {\r\n\tg_return_if_fail(endChar >= startChar);\r\n\r\n\tif (! sci->pdoc->IsReadOnly()) {\r\n\t\tSci::Position startByte, endByte;\r\n\t\tByteRangeFromCharacterRange(startChar, endChar, startByte, endByte);\r\n\r\n\t\tif (! sci->RangeContainsProtected(startByte, endByte)) {\r\n\t\t\t// FIXME: restore the target?\r\n\t\t\tsci->pdoc->DeleteChars(startByte, endByte - startByte);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid ScintillaGTKAccessible::PasteText(int charPosition) {\r\n\tif (sci->pdoc->IsReadOnly())\r\n\t\treturn;\r\n\r\n\t// Helper class holding the position for the asynchronous paste operation.\r\n\t// We can only hope that when the callback gets called scia is still valid, but ScintillaGTK\r\n\t// has always done that without problems, so let's guess it's a fairly safe bet.\r\n\tstruct Helper : GObjectWatcher {\r\n\t\tScintillaGTKAccessible *scia;\r\n\t\tSci::Position bytePosition;\r\n\r\n\t\tvoid Destroyed() override {\r\n\t\t\tscia = nullptr;\r\n\t\t}\r\n\r\n\t\tHelper(ScintillaGTKAccessible *scia_, Sci::Position bytePos_) :\r\n\t\t\tGObjectWatcher(G_OBJECT(scia_->sci->sci)),\r\n\t\t\tscia(scia_),\r\n\t\t\tbytePosition(bytePos_) {\r\n\t\t}\r\n\r\n\t\tvoid TextReceived(GtkClipboard *, const gchar *text) {\r\n\t\t\tif (text) {\r\n\t\t\t\tsize_t len = strlen(text);\r\n\t\t\t\tstd::string convertedText;\r\n\t\t\t\tif (len > 0 && scia->sci->convertPastes) {\r\n\t\t\t\t\t// Convert line endings of the paste into our local line-endings mode\r\n\t\t\t\t\tconvertedText = Document::TransformLineEnds(text, len, scia->sci->pdoc->eolMode);\r\n\t\t\t\t\tlen = convertedText.length();\r\n\t\t\t\t\ttext = convertedText.c_str();\r\n\t\t\t\t}\r\n\t\t\t\tscia->InsertStringUTF8(bytePosition, text, static_cast<Sci::Position>(len));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tstatic void TextReceivedCallback(GtkClipboard *clipboard, const gchar *text, gpointer data) {\r\n\t\t\tHelper *helper = static_cast<Helper*>(data);\r\n\t\t\ttry {\r\n\t\t\t\tif (helper->scia != nullptr) {\r\n\t\t\t\t\thelper->TextReceived(clipboard, text);\r\n\t\t\t\t}\r\n\t\t\t} catch (...) {}\r\n\t\t\tdelete helper;\r\n\t\t}\r\n\t};\r\n\r\n\tHelper *helper = new Helper(this, ByteOffsetFromCharacterOffset(charPosition));\r\n\tGtkWidget *widget = gtk_accessible_get_widget(accessible);\r\n\tGtkClipboard *clipboard = gtk_widget_get_clipboard(widget, GDK_SELECTION_CLIPBOARD);\r\n\tgtk_clipboard_request_text(clipboard, helper->TextReceivedCallback, helper);\r\n}\r\n\r\nvoid ScintillaGTKAccessible::AtkEditableTextIface::init(::AtkEditableTextIface *iface) {\r\n\tiface->set_text_contents = SetTextContents;\r\n\tiface->insert_text = InsertText;\r\n\tiface->copy_text = CopyText;\r\n\tiface->cut_text = CutText;\r\n\tiface->delete_text = DeleteText;\r\n\tiface->paste_text = PasteText;\r\n\t//~ iface->set_run_attributes = SetRunAttributes;\r\n}\r\n\r\nbool ScintillaGTKAccessible::Enabled() const {\r\n\treturn sci->accessibilityEnabled == SC_ACCESSIBILITY_ENABLED;\r\n}\r\n\r\n// Callbacks\r\n\r\nvoid ScintillaGTKAccessible::UpdateCursor() {\r\n\tSci::Position pos = sci->WndProc(Message::GetCurrentPos, 0, 0);\r\n\tif (old_pos != pos) {\r\n\t\tint charPosition = CharacterOffsetFromByteOffset(pos);\r\n\t\tg_signal_emit_by_name(accessible, \"text-caret-moved\", charPosition);\r\n\t\told_pos = pos;\r\n\t}\r\n\r\n\tsize_t n_selections = sci->sel.Count();\r\n\tsize_t prev_n_selections = old_sels.size();\r\n\tbool selection_changed = n_selections != prev_n_selections;\r\n\r\n\told_sels.resize(n_selections);\r\n\tfor (size_t i = 0; i < n_selections; i++) {\r\n\t\tSelectionRange &sel = sci->sel.Range(i);\r\n\r\n\t\tif (i < prev_n_selections && ! selection_changed) {\r\n\t\t\tSelectionRange &old_sel = old_sels[i];\r\n\t\t\t// do not consider a caret move to be a selection change\r\n\t\t\tselection_changed = ((! old_sel.Empty() || ! sel.Empty()) && ! (old_sel == sel));\r\n\t\t}\r\n\r\n\t\told_sels[i] = sel;\r\n\t}\r\n\r\n\tif (selection_changed)\r\n\t\tg_signal_emit_by_name(accessible, \"text-selection-changed\");\r\n}\r\n\r\nvoid ScintillaGTKAccessible::ChangeDocument(Document *oldDoc, Document *newDoc) {\r\n\tif (!Enabled()) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tif (oldDoc == newDoc) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tif (oldDoc) {\r\n\t\tint charLength = oldDoc->CountCharacters(0, oldDoc->Length());\r\n\t\tg_signal_emit_by_name(accessible, \"text-changed::delete\", 0, charLength);\r\n\t}\r\n\r\n\tif (newDoc) {\r\n\t\tPLATFORM_ASSERT(newDoc == sci->pdoc);\r\n\r\n\t\tint charLength = newDoc->CountCharacters(0, newDoc->Length());\r\n\t\tg_signal_emit_by_name(accessible, \"text-changed::insert\", 0, charLength);\r\n\r\n\t\tif ((oldDoc ? oldDoc->IsReadOnly() : false) != newDoc->IsReadOnly()) {\r\n\t\t\tNotifyReadOnly();\r\n\t\t}\r\n\r\n\t\t// update cursor and selection\r\n\t\told_pos = -1;\r\n\t\told_sels.clear();\r\n\t\tUpdateCursor();\r\n\t}\r\n}\r\n\r\nvoid ScintillaGTKAccessible::NotifyReadOnly() {\r\n\tbool readonly = sci->pdoc->IsReadOnly();\r\n\tatk_object_notify_state_change(ATK_OBJECT(accessible), ATK_STATE_EDITABLE, ! readonly);\r\n#if ATK_CHECK_VERSION(2, 16, 0)\r\n\tatk_object_notify_state_change(ATK_OBJECT(accessible), ATK_STATE_READ_ONLY, readonly);\r\n#endif\r\n}\r\n\r\nvoid ScintillaGTKAccessible::SetAccessibility(bool enabled) {\r\n\t// Called by ScintillaGTK when application has enabled or disabled accessibility\r\n\tif (enabled)\r\n\t\tsci->pdoc->AllocateLineCharacterIndex(LineCharacterIndexType::Utf32);\r\n\telse\r\n\t\tsci->pdoc->ReleaseLineCharacterIndex(LineCharacterIndexType::Utf32);\r\n}\r\n\r\nvoid ScintillaGTKAccessible::Notify(GtkWidget *, gint, NotificationData *nt) {\r\n\tif (!Enabled())\r\n\t\treturn;\r\n\tswitch (nt->nmhdr.code) {\r\n\t\tcase Notification::Modified: {\r\n\t\t\tif (FlagSet(nt->modificationType, ModificationFlags::InsertText)) {\r\n\t\t\t\tint startChar = CharacterOffsetFromByteOffset(nt->position);\r\n\t\t\t\tint lengthChar = sci->pdoc->CountCharacters(nt->position, nt->position + nt->length);\r\n\t\t\t\tg_signal_emit_by_name(accessible, \"text-changed::insert\", startChar, lengthChar);\r\n\t\t\t\tUpdateCursor();\r\n\t\t\t}\r\n\t\t\tif (FlagSet(nt->modificationType, ModificationFlags::BeforeDelete)) {\r\n\t\t\t\tint startChar = CharacterOffsetFromByteOffset(nt->position);\r\n\t\t\t\tint lengthChar = sci->pdoc->CountCharacters(nt->position, nt->position + nt->length);\r\n\t\t\t\tg_signal_emit_by_name(accessible, \"text-changed::delete\", startChar, lengthChar);\r\n\t\t\t}\r\n\t\t\tif (FlagSet(nt->modificationType, ModificationFlags::DeleteText)) {\r\n\t\t\t\tUpdateCursor();\r\n\t\t\t}\r\n\t\t\tif (FlagSet(nt->modificationType, ModificationFlags::ChangeStyle)) {\r\n\t\t\t\tg_signal_emit_by_name(accessible, \"text-attributes-changed\");\r\n\t\t\t}\r\n\t\t} break;\r\n\t\tcase Notification::UpdateUI: {\r\n\t\t\tif (FlagSet(nt->updated, Update::Selection)) {\r\n\t\t\t\tUpdateCursor();\r\n\t\t\t}\r\n\t\t} break;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t}\r\n}\r\n\r\n// ATK method wrappers\r\n\r\n// wraps a call from the accessible object to the ScintillaGTKAccessible, and avoid leaking any exception\r\n#define WRAPPER_METHOD_BODY(accessible, call, defret) \\\r\n\ttry { \\\r\n\t\tScintillaGTKAccessible *thisAccessible = FromAccessible(reinterpret_cast<GtkAccessible*>(accessible)); \\\r\n\t\tif (thisAccessible) { \\\r\n\t\t\treturn thisAccessible->call; \\\r\n\t\t} else { \\\r\n\t\t\treturn defret; \\\r\n\t\t} \\\r\n\t} catch (...) { \\\r\n\t\treturn defret; \\\r\n\t}\r\n\r\n// AtkText\r\ngchar *ScintillaGTKAccessible::AtkTextIface::GetText(AtkText *text, int start_offset, int end_offset) {\r\n\tWRAPPER_METHOD_BODY(text, GetText(start_offset, end_offset), nullptr);\r\n}\r\ngchar *ScintillaGTKAccessible::AtkTextIface::GetTextAfterOffset(AtkText *text, int offset, AtkTextBoundary boundary_type, int *start_offset, int *end_offset) {\r\n\tWRAPPER_METHOD_BODY(text, GetTextAfterOffset(offset, boundary_type, start_offset, end_offset), nullptr)\r\n}\r\ngchar *ScintillaGTKAccessible::AtkTextIface::GetTextBeforeOffset(AtkText *text, int offset, AtkTextBoundary boundary_type, int *start_offset, int *end_offset) {\r\n\tWRAPPER_METHOD_BODY(text, GetTextBeforeOffset(offset, boundary_type, start_offset, end_offset), nullptr)\r\n}\r\ngchar *ScintillaGTKAccessible::AtkTextIface::GetTextAtOffset(AtkText *text, gint offset, AtkTextBoundary boundary_type, gint *start_offset, gint *end_offset) {\r\n\tWRAPPER_METHOD_BODY(text, GetTextAtOffset(offset, boundary_type, start_offset, end_offset), nullptr)\r\n}\r\n#if ATK_CHECK_VERSION(2, 10, 0)\r\ngchar *ScintillaGTKAccessible::AtkTextIface::GetStringAtOffset(AtkText *text, gint offset, AtkTextGranularity granularity, gint *start_offset, gint *end_offset) {\r\n\tWRAPPER_METHOD_BODY(text, GetStringAtOffset(offset, granularity, start_offset, end_offset), nullptr)\r\n}\r\n#endif\r\ngunichar ScintillaGTKAccessible::AtkTextIface::GetCharacterAtOffset(AtkText *text, gint offset) {\r\n\tWRAPPER_METHOD_BODY(text, GetCharacterAtOffset(offset), 0)\r\n}\r\ngint ScintillaGTKAccessible::AtkTextIface::GetCharacterCount(AtkText *text) {\r\n\tWRAPPER_METHOD_BODY(text, GetCharacterCount(), 0)\r\n}\r\ngint ScintillaGTKAccessible::AtkTextIface::GetCaretOffset(AtkText *text) {\r\n\tWRAPPER_METHOD_BODY(text, GetCaretOffset(), 0)\r\n}\r\ngboolean ScintillaGTKAccessible::AtkTextIface::SetCaretOffset(AtkText *text, gint offset) {\r\n\tWRAPPER_METHOD_BODY(text, SetCaretOffset(offset), FALSE)\r\n}\r\ngint ScintillaGTKAccessible::AtkTextIface::GetOffsetAtPoint(AtkText *text, gint x, gint y, AtkCoordType coords) {\r\n\tWRAPPER_METHOD_BODY(text, GetOffsetAtPoint(x, y, coords), -1)\r\n}\r\nvoid ScintillaGTKAccessible::AtkTextIface::GetCharacterExtents(AtkText *text, gint offset, gint *x, gint *y, gint *width, gint *height, AtkCoordType coords) {\r\n\tWRAPPER_METHOD_BODY(text, GetCharacterExtents(offset, x, y, width, height, coords), )\r\n}\r\nAtkAttributeSet *ScintillaGTKAccessible::AtkTextIface::GetRunAttributes(AtkText *text, gint offset, gint *start_offset, gint *end_offset) {\r\n\tWRAPPER_METHOD_BODY(text, GetRunAttributes(offset, start_offset, end_offset), nullptr)\r\n}\r\nAtkAttributeSet *ScintillaGTKAccessible::AtkTextIface::GetDefaultAttributes(AtkText *text) {\r\n\tWRAPPER_METHOD_BODY(text, GetDefaultAttributes(), nullptr)\r\n}\r\ngint ScintillaGTKAccessible::AtkTextIface::GetNSelections(AtkText *text) {\r\n\tWRAPPER_METHOD_BODY(text, GetNSelections(), 0)\r\n}\r\ngchar *ScintillaGTKAccessible::AtkTextIface::GetSelection(AtkText *text, gint selection_num, gint *start_pos, gint *end_pos) {\r\n\tWRAPPER_METHOD_BODY(text, GetSelection(selection_num, start_pos, end_pos), nullptr)\r\n}\r\ngboolean ScintillaGTKAccessible::AtkTextIface::AddSelection(AtkText *text, gint start, gint end) {\r\n\tWRAPPER_METHOD_BODY(text, AddSelection(start, end), FALSE)\r\n}\r\ngboolean ScintillaGTKAccessible::AtkTextIface::RemoveSelection(AtkText *text, gint selection_num) {\r\n\tWRAPPER_METHOD_BODY(text, RemoveSelection(selection_num), FALSE)\r\n}\r\ngboolean ScintillaGTKAccessible::AtkTextIface::SetSelection(AtkText *text, gint selection_num, gint start, gint end) {\r\n\tWRAPPER_METHOD_BODY(text, SetSelection(selection_num, start, end), FALSE)\r\n}\r\n// AtkEditableText\r\nvoid ScintillaGTKAccessible::AtkEditableTextIface::SetTextContents(AtkEditableText *text, const gchar *contents) {\r\n\tWRAPPER_METHOD_BODY(text, SetTextContents(contents), )\r\n}\r\nvoid ScintillaGTKAccessible::AtkEditableTextIface::InsertText(AtkEditableText *text, const gchar *contents, gint length, gint *position) {\r\n\tWRAPPER_METHOD_BODY(text, InsertText(contents, length, position), )\r\n}\r\nvoid ScintillaGTKAccessible::AtkEditableTextIface::CopyText(AtkEditableText *text, gint start, gint end) {\r\n\tWRAPPER_METHOD_BODY(text, CopyText(start, end), )\r\n}\r\nvoid ScintillaGTKAccessible::AtkEditableTextIface::CutText(AtkEditableText *text, gint start, gint end) {\r\n\tWRAPPER_METHOD_BODY(text, CutText(start, end), )\r\n}\r\nvoid ScintillaGTKAccessible::AtkEditableTextIface::DeleteText(AtkEditableText *text, gint start, gint end) {\r\n\tWRAPPER_METHOD_BODY(text, DeleteText(start, end), )\r\n}\r\nvoid ScintillaGTKAccessible::AtkEditableTextIface::PasteText(AtkEditableText *text, gint position) {\r\n\tWRAPPER_METHOD_BODY(text, PasteText(position), )\r\n}\r\n\r\n// GObject glue\r\n\r\n#if HAVE_GTK_FACTORY\r\nstatic GType scintilla_object_accessible_factory_get_type(void);\r\n#endif\r\n\r\nstatic void scintilla_object_accessible_init(ScintillaObjectAccessible *accessible);\r\nstatic void scintilla_object_accessible_class_init(ScintillaObjectAccessibleClass *klass);\r\nstatic gpointer scintilla_object_accessible_parent_class = nullptr;\r\n\r\n\r\n// @p parent_type is only required on GTK 3.2 to 3.6, and only on the first call\r\nstatic GType scintilla_object_accessible_get_type(GType parent_type G_GNUC_UNUSED) {\r\n\tstatic gsize type_id_result = 0;\r\n\r\n\tif (g_once_init_enter(&type_id_result)) {\r\n\t\tGTypeInfo tinfo = {\r\n\t\t\t0,\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* class size */\r\n\t\t\t(GBaseInitFunc) nullptr,\t\t\t\t\t\t\t\t\t\t/* base init */\r\n\t\t\t(GBaseFinalizeFunc) nullptr,\t\t\t\t\t\t\t\t\t/* base finalize */\r\n\t\t\t(GClassInitFunc) scintilla_object_accessible_class_init,\t/* class init */\r\n\t\t\t(GClassFinalizeFunc) nullptr,\t\t\t\t\t\t\t\t\t/* class finalize */\r\n\t\t\tnullptr,\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* class data */\r\n\t\t\t0,\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* instance size */\r\n\t\t\t0,\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* nb preallocs */\r\n\t\t\t(GInstanceInitFunc) scintilla_object_accessible_init,\t\t/* instance init */\r\n\t\t\tnullptr\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* value table */\r\n\t\t};\r\n\r\n\t\tconst GInterfaceInfo atk_text_info = {\r\n\t\t\t(GInterfaceInitFunc) ScintillaGTKAccessible::AtkTextIface::init,\r\n\t\t\t(GInterfaceFinalizeFunc) nullptr,\r\n\t\t\tnullptr\r\n\t\t};\r\n\r\n\t\tconst GInterfaceInfo atk_editable_text_info = {\r\n\t\t\t(GInterfaceInitFunc) ScintillaGTKAccessible::AtkEditableTextIface::init,\r\n\t\t\t(GInterfaceFinalizeFunc) nullptr,\r\n\t\t\tnullptr\r\n\t\t};\r\n\r\n#if HAVE_GTK_A11Y_H\r\n\t\t// good, we have gtk-a11y.h, we can use that\r\n\t\tGType derived_atk_type = GTK_TYPE_CONTAINER_ACCESSIBLE;\r\n\t\ttinfo.class_size = sizeof (GtkContainerAccessibleClass);\r\n\t\ttinfo.instance_size = sizeof (GtkContainerAccessible);\r\n#else // ! HAVE_GTK_A11Y_H\r\n# if HAVE_GTK_FACTORY\r\n\t\t// Figure out the size of the class and instance we are deriving from through the registry\r\n\t\tGType derived_type = g_type_parent(SCINTILLA_TYPE_OBJECT);\r\n\t\tAtkObjectFactory *factory = atk_registry_get_factory(atk_get_default_registry(), derived_type);\r\n\t\tGType derived_atk_type = atk_object_factory_get_accessible_type(factory);\r\n# else // ! HAVE_GTK_FACTORY\r\n\t\t// We're kind of screwed and can't determine the parent (no registry, and no public type)\r\n\t\t// Hack your way around by requiring the caller to give us our parent type.  The caller\r\n\t\t// might be able to trick its way into doing that, by e.g. instantiating the parent's\r\n\t\t// accessible type and get its GType.  It's ugly but we can't do better on GTK 3.2 to 3.6.\r\n\t\tg_assert(parent_type != 0);\r\n\r\n\t\tGType derived_atk_type = parent_type;\r\n# endif // ! HAVE_GTK_FACTORY\r\n\r\n\t\tGTypeQuery query;\r\n\t\tg_type_query(derived_atk_type, &query);\r\n\t\ttinfo.class_size = query.class_size;\r\n\t\ttinfo.instance_size = query.instance_size;\r\n#endif // ! HAVE_GTK_A11Y_H\r\n\r\n\t\tGType type_id = g_type_register_static(derived_atk_type, \"ScintillaObjectAccessible\", &tinfo, (GTypeFlags) 0);\r\n\t\tg_type_add_interface_static(type_id, ATK_TYPE_TEXT, &atk_text_info);\r\n\t\tg_type_add_interface_static(type_id, ATK_TYPE_EDITABLE_TEXT, &atk_editable_text_info);\r\n\r\n\t\tg_once_init_leave(&type_id_result, type_id);\r\n\t}\r\n\r\n\treturn type_id_result;\r\n}\r\n\r\nstatic AtkObject *scintilla_object_accessible_new(GType parent_type, GObject *obj) {\r\n\tg_return_val_if_fail(SCINTILLA_IS_OBJECT(obj), nullptr);\r\n\r\n\tAtkObject *accessible = static_cast<AtkObject *>(g_object_new(scintilla_object_accessible_get_type(parent_type),\r\n#if HAVE_WIDGET_SET_UNSET\r\n\t\t\"widget\", obj,\r\n#endif\r\n\t\tnullptr));\r\n\tatk_object_initialize(accessible, obj);\r\n\r\n\treturn accessible;\r\n}\r\n\r\n// implementation for gtk_widget_get_accessible().\r\n// See the comment at the top of the file for details on the implementation\r\n// @p widget the widget.\r\n// @p cache pointer to store the AtkObject between repeated calls.  Might or might not be filled.\r\n// @p widget_parent_class pointer to the widget's parent class (to chain up method calls).\r\nAtkObject *ScintillaGTKAccessible::WidgetGetAccessibleImpl(GtkWidget *widget, AtkObject **cache, gpointer widget_parent_class G_GNUC_UNUSED) {\r\n\tif (*cache != nullptr) {\r\n\t\treturn *cache;\r\n\t}\r\n\r\n#if HAVE_GTK_A11Y_H // just instantiate the accessible\r\n\t*cache = scintilla_object_accessible_new(0, G_OBJECT(widget));\r\n#elif HAVE_GTK_FACTORY // register in the factory and let GTK instantiate\r\n\tstatic gsize registered = 0;\r\n\r\n\tif (g_once_init_enter(&registered)) {\r\n\t\t// Figure out whether accessibility is enabled by looking at the type of the accessible\r\n\t\t// object which would be created for the parent type of ScintillaObject.\r\n\t\tGType derived_type = g_type_parent(SCINTILLA_TYPE_OBJECT);\r\n\r\n\t\tAtkRegistry *registry = atk_get_default_registry();\r\n\t\tAtkObjectFactory *factory = atk_registry_get_factory(registry, derived_type);\r\n\t\tGType derived_atk_type = atk_object_factory_get_accessible_type(factory);\r\n\t\tif (g_type_is_a(derived_atk_type, GTK_TYPE_ACCESSIBLE)) {\r\n\t\t\tatk_registry_set_factory_type(registry, SCINTILLA_TYPE_OBJECT,\r\n\t\t\t                              scintilla_object_accessible_factory_get_type());\r\n\t\t}\r\n\t\tg_once_init_leave(&registered, 1);\r\n\t}\r\n\tAtkObject *obj = GTK_WIDGET_CLASS(widget_parent_class)->get_accessible(widget);\r\n\t*cache = static_cast<AtkObject*>(g_object_ref(obj));\r\n#else // no public API, no factory, so guess from the parent and instantiate\r\n\tstatic GType parent_atk_type = 0;\r\n\r\n\tif (parent_atk_type == 0) {\r\n\t\tAtkObject *parent_obj = GTK_WIDGET_CLASS(widget_parent_class)->get_accessible(widget);\r\n\t\tif (parent_obj) {\r\n\t\t\tparent_atk_type = G_OBJECT_TYPE(parent_obj);\r\n\r\n\t\t\t// Figure out whether accessibility is enabled by looking at the type of the accessible\r\n\t\t\t// object which would be created for the parent type of ScintillaObject.\r\n\t\t\tif (g_type_is_a(parent_atk_type, GTK_TYPE_ACCESSIBLE)) {\r\n\t\t\t\t*cache = scintilla_object_accessible_new(parent_atk_type, G_OBJECT(widget));\r\n\t\t\t} else {\r\n\t\t\t\t*cache = static_cast<AtkObject*>(g_object_ref(parent_obj));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n#endif\r\n\treturn *cache;\r\n}\r\n\r\nstatic AtkStateSet *scintilla_object_accessible_ref_state_set(AtkObject *accessible) {\r\n\tAtkStateSet *state_set = ATK_OBJECT_CLASS(scintilla_object_accessible_parent_class)->ref_state_set(accessible);\r\n\r\n\tGtkWidget *widget = gtk_accessible_get_widget(GTK_ACCESSIBLE(accessible));\r\n\tif (widget == nullptr) {\r\n\t\tatk_state_set_add_state(state_set, ATK_STATE_DEFUNCT);\r\n\t} else {\r\n\t\tif (! scintilla_send_message(SCINTILLA_OBJECT(widget), static_cast<int>(Message::GetReadOnly), 0, 0))\r\n\t\t\tatk_state_set_add_state(state_set, ATK_STATE_EDITABLE);\r\n#if ATK_CHECK_VERSION(2, 16, 0)\r\n\t\telse\r\n\t\t\tatk_state_set_add_state(state_set, ATK_STATE_READ_ONLY);\r\n#endif\r\n\t\tatk_state_set_add_state(state_set, ATK_STATE_MULTI_LINE);\r\n\t\tatk_state_set_add_state(state_set, ATK_STATE_MULTISELECTABLE);\r\n\t\tatk_state_set_add_state(state_set, ATK_STATE_SELECTABLE_TEXT);\r\n\t\t/*atk_state_set_add_state(state_set, ATK_STATE_SUPPORTS_AUTOCOMPLETION);*/\r\n\t}\r\n\r\n\treturn state_set;\r\n}\r\n\r\nstatic void scintilla_object_accessible_widget_set(GtkAccessible *accessible) {\r\n\tGtkWidget *widget = gtk_accessible_get_widget(accessible);\r\n\tif (widget == nullptr)\r\n\t\treturn;\r\n\r\n\tScintillaObjectAccessiblePrivate *priv = SCINTILLA_OBJECT_ACCESSIBLE_GET_PRIVATE(accessible);\r\n\tif (priv->pscin)\r\n\t\tdelete priv->pscin;\r\n\tpriv->pscin = new ScintillaGTKAccessible(accessible, widget);\r\n}\r\n\r\n#if HAVE_WIDGET_SET_UNSET\r\nstatic void scintilla_object_accessible_widget_unset(GtkAccessible *accessible) {\r\n\tGtkWidget *widget = gtk_accessible_get_widget(accessible);\r\n\tif (widget == nullptr)\r\n\t\treturn;\r\n\r\n\tScintillaObjectAccessiblePrivate *priv = SCINTILLA_OBJECT_ACCESSIBLE_GET_PRIVATE(accessible);\r\n\tdelete priv->pscin;\r\n\tpriv->pscin = 0;\r\n}\r\n#endif\r\n\r\nstatic void scintilla_object_accessible_initialize(AtkObject *obj, gpointer data) {\r\n\tATK_OBJECT_CLASS(scintilla_object_accessible_parent_class)->initialize(obj, data);\r\n\r\n#if ! HAVE_WIDGET_SET_UNSET\r\n\tscintilla_object_accessible_widget_set(GTK_ACCESSIBLE(obj));\r\n#endif\r\n\r\n\tobj->role = ATK_ROLE_TEXT;\r\n}\r\n\r\nstatic void scintilla_object_accessible_finalize(GObject *object) {\r\n\tScintillaObjectAccessiblePrivate *priv = SCINTILLA_OBJECT_ACCESSIBLE_GET_PRIVATE(object);\r\n\r\n\tif (priv->pscin) {\r\n\t\tdelete priv->pscin;\r\n\t\tpriv->pscin = nullptr;\r\n\t}\r\n\r\n\tG_OBJECT_CLASS(scintilla_object_accessible_parent_class)->finalize(object);\r\n}\r\n\r\nstatic void scintilla_object_accessible_class_init(ScintillaObjectAccessibleClass *klass) {\r\n\tGObjectClass *gobject_class = G_OBJECT_CLASS(klass);\r\n\tAtkObjectClass *object_class = ATK_OBJECT_CLASS(klass);\r\n\r\n#if HAVE_WIDGET_SET_UNSET\r\n\tGtkAccessibleClass *accessible_class = GTK_ACCESSIBLE_CLASS(klass);\r\n\taccessible_class->widget_set = scintilla_object_accessible_widget_set;\r\n\taccessible_class->widget_unset = scintilla_object_accessible_widget_unset;\r\n#endif\r\n\r\n\tobject_class->ref_state_set = scintilla_object_accessible_ref_state_set;\r\n\tobject_class->initialize = scintilla_object_accessible_initialize;\r\n\r\n\tgobject_class->finalize = scintilla_object_accessible_finalize;\r\n\r\n\tscintilla_object_accessible_parent_class = g_type_class_peek_parent(klass);\r\n\r\n\tg_type_class_add_private(klass, sizeof (ScintillaObjectAccessiblePrivate));\r\n}\r\n\r\nstatic void scintilla_object_accessible_init(ScintillaObjectAccessible *accessible) {\r\n\tScintillaObjectAccessiblePrivate *priv = SCINTILLA_OBJECT_ACCESSIBLE_GET_PRIVATE(accessible);\r\n\r\n\tpriv->pscin = nullptr;\r\n}\r\n\r\n#if HAVE_GTK_FACTORY\r\n// Object factory\r\ntypedef AtkObjectFactory ScintillaObjectAccessibleFactory;\r\ntypedef AtkObjectFactoryClass ScintillaObjectAccessibleFactoryClass;\r\n\r\nG_DEFINE_TYPE(ScintillaObjectAccessibleFactory, scintilla_object_accessible_factory, ATK_TYPE_OBJECT_FACTORY)\r\n\r\nstatic void scintilla_object_accessible_factory_init(ScintillaObjectAccessibleFactory *) {\r\n}\r\n\r\nstatic GType scintilla_object_accessible_factory_get_accessible_type(void) {\r\n\treturn SCINTILLA_TYPE_OBJECT_ACCESSIBLE;\r\n}\r\n\r\nstatic AtkObject *scintilla_object_accessible_factory_create_accessible(GObject *obj) {\r\n\treturn scintilla_object_accessible_new(0, obj);\r\n}\r\n\r\nstatic void scintilla_object_accessible_factory_class_init(AtkObjectFactoryClass * klass) {\r\n\tklass->create_accessible = scintilla_object_accessible_factory_create_accessible;\r\n\tklass->get_accessible_type = scintilla_object_accessible_factory_get_accessible_type;\r\n}\r\n#endif\r\n"
  },
  {
    "path": "scintilla/gtk/ScintillaGTKAccessible.h",
    "content": "/* Scintilla source code edit control */\r\n/* ScintillaGTKAccessible.h - GTK+ accessibility for ScintillaGTK */\r\n/* Copyright 2016 by Colomban Wendling <colomban@geany.org>\r\n * The License.txt file describes the conditions under which this software may be distributed. */\r\n\r\n#ifndef SCINTILLAGTKACCESSIBLE_H\r\n#define SCINTILLAGTKACCESSIBLE_H\r\n\r\nnamespace Scintilla::Internal {\r\n\r\n#ifndef ATK_CHECK_VERSION\r\n# define ATK_CHECK_VERSION(x, y, z) 0\r\n#endif\r\n\r\nclass ScintillaGTKAccessible {\r\nprivate:\r\n\t// weak references to related objects\r\n\tGtkAccessible *accessible;\r\n\tScintillaGTK *sci;\r\n\r\n\t// local state for comparing\r\n\tSci::Position old_pos;\r\n\tstd::vector<SelectionRange> old_sels;\r\n\r\n\tbool Enabled() const;\r\n\tvoid UpdateCursor();\r\n\tvoid Notify(GtkWidget *widget, gint code, Scintilla::NotificationData *nt);\r\n\tstatic void SciNotify(GtkWidget *widget, gint code, Scintilla::NotificationData *nt, gpointer data) {\r\n\t\ttry {\r\n\t\t\tstatic_cast<ScintillaGTKAccessible*>(data)->Notify(widget, code, nt);\r\n\t\t} catch (...) {}\r\n\t}\r\n\r\n\tSci::Position ByteOffsetFromCharacterOffset(Sci::Position startByte, int characterOffset) {\r\n\t\tif (!FlagSet(sci->pdoc->LineCharacterIndex(), Scintilla::LineCharacterIndexType::Utf32)) {\r\n\t\t\treturn startByte + characterOffset;\r\n\t\t}\r\n\t\tif (characterOffset > 0) {\r\n\t\t\t// Try and reduce the range by reverse-looking into the character offset cache\r\n\t\t\tSci::Line lineStart = sci->pdoc->LineFromPosition(startByte);\r\n\t\t\tSci::Position posStart = sci->pdoc->IndexLineStart(lineStart, Scintilla::LineCharacterIndexType::Utf32);\r\n\t\t\tSci::Line line = sci->pdoc->LineFromPositionIndex(posStart + characterOffset, Scintilla::LineCharacterIndexType::Utf32);\r\n\t\t\tif (line != lineStart) {\r\n\t\t\t\tstartByte += sci->pdoc->LineStart(line) - sci->pdoc->LineStart(lineStart);\r\n\t\t\t\tcharacterOffset -= sci->pdoc->IndexLineStart(line, Scintilla::LineCharacterIndexType::Utf32) - posStart;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSci::Position pos = sci->pdoc->GetRelativePosition(startByte, characterOffset);\r\n\t\tif (pos == INVALID_POSITION) {\r\n\t\t\t// clamp invalid positions inside the document\r\n\t\t\tif (characterOffset > 0) {\r\n\t\t\t\treturn sci->pdoc->Length();\r\n\t\t\t} else {\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn pos;\r\n\t}\r\n\r\n\tSci::Position ByteOffsetFromCharacterOffset(Sci::Position characterOffset) {\r\n\t\treturn ByteOffsetFromCharacterOffset(0, characterOffset);\r\n\t}\r\n\r\n\tSci::Position CharacterOffsetFromByteOffset(Sci::Position byteOffset) {\r\n\t\tif (!FlagSet(sci->pdoc->LineCharacterIndex(), Scintilla::LineCharacterIndexType::Utf32)) {\r\n\t\t\treturn byteOffset;\r\n\t\t}\r\n\t\tconst Sci::Line line = sci->pdoc->LineFromPosition(byteOffset);\r\n\t\tconst Sci::Position lineStart = sci->pdoc->LineStart(line);\r\n\t\treturn sci->pdoc->IndexLineStart(line, Scintilla::LineCharacterIndexType::Utf32) + sci->pdoc->CountCharacters(lineStart, byteOffset);\r\n\t}\r\n\r\n\tvoid CharacterRangeFromByteRange(Sci::Position startByte, Sci::Position endByte, int *startChar, int *endChar) {\r\n\t\t*startChar = CharacterOffsetFromByteOffset(startByte);\r\n\t\t*endChar = *startChar + sci->pdoc->CountCharacters(startByte, endByte);\r\n\t}\r\n\r\n\tvoid ByteRangeFromCharacterRange(int startChar, int endChar, Sci::Position& startByte, Sci::Position& endByte) {\r\n\t\tstartByte = ByteOffsetFromCharacterOffset(startChar);\r\n\t\tendByte = ByteOffsetFromCharacterOffset(startByte, endChar - startChar);\r\n\t}\r\n\r\n\tSci::Position PositionBefore(Sci::Position pos) {\r\n\t\treturn sci->pdoc->MovePositionOutsideChar(pos - 1, -1, true);\r\n\t}\r\n\r\n\tSci::Position PositionAfter(Sci::Position pos) {\r\n\t\treturn sci->pdoc->MovePositionOutsideChar(pos + 1, 1, true);\r\n\t}\r\n\r\n\tint StyleAt(Sci::Position position, bool ensureStyle = false) {\r\n\t\tif (ensureStyle)\r\n\t\t\tsci->pdoc->EnsureStyledTo(position);\r\n\t\treturn sci->pdoc->StyleAt(position);\r\n\t}\r\n\r\n\t// For AtkText\r\n\tgchar *GetTextRangeUTF8(Sci::Position startByte, Sci::Position endByte);\r\n\tgchar *GetText(int startChar, int endChar);\r\n\tgchar *GetTextAfterOffset(int charOffset, AtkTextBoundary boundaryType, int *startChar, int *endChar);\r\n\tgchar *GetTextBeforeOffset(int charOffset, AtkTextBoundary boundaryType, int *startChar, int *endChar);\r\n\tgchar *GetTextAtOffset(int charOffset, AtkTextBoundary boundaryType, int *startChar, int *endChar);\r\n#if ATK_CHECK_VERSION(2, 10, 0)\r\n\tgchar *GetStringAtOffset(int charOffset, AtkTextGranularity granularity, int *startChar, int *endChar);\r\n#endif\r\n\tgunichar GetCharacterAtOffset(int charOffset);\r\n\tgint GetCharacterCount();\r\n\tgint GetCaretOffset();\r\n\tgboolean SetCaretOffset(int charOffset);\r\n\tgint GetOffsetAtPoint(gint x, gint y, AtkCoordType coords);\r\n\tvoid GetCharacterExtents(int charOffset, gint *x, gint *y, gint *width, gint *height, AtkCoordType coords);\r\n\tAtkAttributeSet *GetAttributesForStyle(unsigned int styleNum);\r\n\tAtkAttributeSet *GetRunAttributes(int charOffset, int *startChar, int *endChar);\r\n\tAtkAttributeSet *GetDefaultAttributes();\r\n\tgint GetNSelections();\r\n\tgchar *GetSelection(gint selection_num, int *startChar, int *endChar);\r\n\tgboolean AddSelection(int startChar, int endChar);\r\n\tgboolean RemoveSelection(int selection_num);\r\n\tgboolean SetSelection(gint selection_num, int startChar, int endChar);\r\n\t// for AtkEditableText\r\n\tbool InsertStringUTF8(Sci::Position bytePos, const gchar *utf8, Sci::Position lengthBytes);\r\n\tvoid SetTextContents(const gchar *contents);\r\n\tvoid InsertText(const gchar *text, int lengthBytes, int *charPosition);\r\n\tvoid CopyText(int startChar, int endChar);\r\n\tvoid CutText(int startChar, int endChar);\r\n\tvoid DeleteText(int startChar, int endChar);\r\n\tvoid PasteText(int charPosition);\r\n\r\npublic:\r\n\tScintillaGTKAccessible(GtkAccessible *accessible_, GtkWidget *widget_);\r\n\t~ScintillaGTKAccessible();\r\n\r\n\tstatic ScintillaGTKAccessible *FromAccessible(GtkAccessible *accessible);\r\n\tstatic ScintillaGTKAccessible *FromAccessible(AtkObject *accessible) {\r\n\t\treturn FromAccessible(GTK_ACCESSIBLE(accessible));\r\n\t}\r\n\t// So ScintillaGTK can notify us\r\n\tvoid ChangeDocument(Document *oldDoc, Document *newDoc);\r\n\tvoid NotifyReadOnly();\r\n\tvoid SetAccessibility(bool enabled);\r\n\r\n\t// Helper GtkWidget methods\r\n\tstatic AtkObject *WidgetGetAccessibleImpl(GtkWidget *widget, AtkObject **cache, gpointer widget_parent_class);\r\n\r\n\t// ATK methods\r\n\r\n\tclass AtkTextIface {\r\n\tpublic:\r\n\t\tstatic void init(::AtkTextIface *iface);\r\n\r\n\tprivate:\r\n\t\tAtkTextIface();\r\n\r\n\t\tstatic gchar *GetText(AtkText *text, int start_offset, int end_offset);\r\n\t\tstatic gchar *GetTextAfterOffset(AtkText *text, int offset, AtkTextBoundary boundary_type, int *start_offset, int *end_offset);\r\n\t\tstatic gchar *GetTextBeforeOffset(AtkText *text, int offset, AtkTextBoundary boundary_type, int *start_offset, int *end_offset);\r\n\t\tstatic gchar *GetTextAtOffset(AtkText *text, gint offset, AtkTextBoundary boundary_type, gint *start_offset, gint *end_offset);\r\n#if ATK_CHECK_VERSION(2, 10, 0)\r\n\t\tstatic gchar *GetStringAtOffset(AtkText *text, gint offset, AtkTextGranularity granularity, gint *start_offset, gint *end_offset);\r\n#endif\r\n\t\tstatic gunichar GetCharacterAtOffset(AtkText *text, gint offset);\r\n\t\tstatic gint GetCharacterCount(AtkText *text);\r\n\t\tstatic gint GetCaretOffset(AtkText *text);\r\n\t\tstatic gboolean SetCaretOffset(AtkText *text, gint offset);\r\n\t\tstatic gint GetOffsetAtPoint(AtkText *text, gint x, gint y, AtkCoordType coords);\r\n\t\tstatic void GetCharacterExtents(AtkText *text, gint offset, gint *x, gint *y, gint *width, gint *height, AtkCoordType coords);\r\n\t\tstatic AtkAttributeSet *GetRunAttributes(AtkText *text, gint offset, gint *start_offset, gint *end_offset);\r\n\t\tstatic AtkAttributeSet *GetDefaultAttributes(AtkText *text);\r\n\t\tstatic gint GetNSelections(AtkText *text);\r\n\t\tstatic gchar *GetSelection(AtkText *text, gint selection_num, gint *start_pos, gint *end_pos);\r\n\t\tstatic gboolean AddSelection(AtkText *text, gint start, gint end);\r\n\t\tstatic gboolean RemoveSelection(AtkText *text, gint selection_num);\r\n\t\tstatic gboolean SetSelection(AtkText *text, gint selection_num, gint start, gint end);\r\n\t};\r\n\tclass AtkEditableTextIface {\r\n\tpublic:\r\n\t\tstatic void init(::AtkEditableTextIface *iface);\r\n\r\n\tprivate:\r\n\t\tAtkEditableTextIface();\r\n\r\n\t\tstatic void SetTextContents(AtkEditableText *text, const gchar *contents);\r\n\t\tstatic void InsertText(AtkEditableText *text, const gchar *contents, gint length, gint *position);\r\n\t\tstatic void CopyText(AtkEditableText *text, gint start, gint end);\r\n\t\tstatic void CutText(AtkEditableText *text, gint start, gint end);\r\n\t\tstatic void DeleteText(AtkEditableText *text, gint start, gint end);\r\n\t\tstatic void PasteText(AtkEditableText *text, gint position);\r\n\t};\r\n};\r\n\r\n}\r\n\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/gtk/Wrappers.h",
    "content": "// Scintilla source code edit control\r\n// Wrappers.h - Encapsulation of GLib, GObject, Pango, Cairo, GTK, and GDK types\r\n// Copyright 2022 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef WRAPPERS_H\r\n#define WRAPPERS_H\r\n\r\nnamespace Scintilla::Internal {\r\n\r\n// GLib\r\n\r\nstruct GFreeReleaser {\r\n\ttemplate <class T>\r\n\tvoid operator()(T *object) noexcept {\r\n\t\tg_free(object);\r\n\t}\r\n};\r\n\r\nusing UniqueStr = std::unique_ptr<gchar, GFreeReleaser>;\r\n\r\n// GObject\r\n\r\nstruct GObjectReleaser {\r\n\t// Called by unique_ptr to destroy/free the object\r\n\ttemplate <class T>\r\n\tvoid operator()(T *object) noexcept {\r\n\t\tg_object_unref(object);\r\n\t}\r\n};\r\n\r\n// Pango\r\n\r\nusing UniquePangoContext = std::unique_ptr<PangoContext, GObjectReleaser>;\r\nusing UniquePangoLayout = std::unique_ptr<PangoLayout, GObjectReleaser>;\r\nusing UniquePangoFontMap = std::unique_ptr<PangoFontMap, GObjectReleaser>;\r\n\r\nstruct FontDescriptionReleaser {\r\n\tvoid operator()(PangoFontDescription *fontDescription) noexcept {\r\n\t\tpango_font_description_free(fontDescription);\r\n\t}\r\n};\r\n\r\nusing UniquePangoFontDescription = std::unique_ptr<PangoFontDescription, FontDescriptionReleaser>;\r\n\r\nstruct FontMetricsReleaser {\r\n\tvoid operator()(PangoFontMetrics *metrics) noexcept {\r\n\t\tpango_font_metrics_unref(metrics);\r\n\t}\r\n};\r\n\r\nusing UniquePangoFontMetrics = std::unique_ptr<PangoFontMetrics, FontMetricsReleaser>;\r\n\r\nstruct LayoutIterReleaser {\r\n\t// Called by unique_ptr to destroy/free the object\r\n\tvoid operator()(PangoLayoutIter *iter) noexcept {\r\n\t\tpango_layout_iter_free(iter);\r\n\t}\r\n};\r\n\r\nusing UniquePangoLayoutIter = std::unique_ptr<PangoLayoutIter, LayoutIterReleaser>;\r\n\r\n// Cairo\r\n\r\nstruct CairoReleaser {\r\n\tvoid operator()(cairo_t *context) noexcept {\r\n\t\tcairo_destroy(context);\r\n\t}\r\n};\r\n\r\nusing UniqueCairo = std::unique_ptr<cairo_t, CairoReleaser>;\r\n\r\nstruct CairoSurfaceReleaser {\r\n\tvoid operator()(cairo_surface_t *psurf) noexcept {\r\n\t\tcairo_surface_destroy(psurf);\r\n\t}\r\n};\r\n\r\nusing UniqueCairoSurface = std::unique_ptr<cairo_surface_t, CairoSurfaceReleaser>;\r\n\r\n// GTK\r\n\r\nusing UniqueIMContext = std::unique_ptr<GtkIMContext, GObjectReleaser>;\r\n\r\n// GDK\r\n\r\nstruct GdkEventReleaser {\r\n\tvoid operator()(GdkEvent *ev) noexcept {\r\n\t\tgdk_event_free(ev);\r\n\t}\r\n};\r\n\r\nusing UniqueGdkEvent = std::unique_ptr<GdkEvent, GdkEventReleaser>;\r\n\r\ninline void UnRefCursor(GdkCursor *cursor) noexcept {\r\n#if GTK_CHECK_VERSION(3,0,0)\r\n\tg_object_unref(cursor);\r\n#else\r\n\tgdk_cursor_unref(cursor);\r\n#endif\r\n}\r\n\r\n[[nodiscard]] inline GdkWindow *WindowFromWidget(GtkWidget *w) noexcept {\r\n\treturn gtk_widget_get_window(w);\r\n}\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/gtk/deps.mak",
    "content": "# Created by DepGen.py. To recreate, run DepGen.py.\r\nPlatGTK.o: \\\r\n\tPlatGTK.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../include/ScintillaMessages.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../include/Scintilla.h \\\r\n\t../include/Sci_Position.h \\\r\n\t../include/ScintillaWidget.h \\\r\n\t../src/CharacterType.h \\\r\n\t../src/XPM.h \\\r\n\t../src/UniConversion.h \\\r\n\tWrappers.h \\\r\n\tConverter.h\r\nScintillaGTK.o: \\\r\n\tScintillaGTK.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../include/ScintillaMessages.h \\\r\n\t../include/ScintillaStructures.h \\\r\n\t../include/ILoader.h \\\r\n\t../include/Sci_Position.h \\\r\n\t../include/ILexer.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../include/Scintilla.h \\\r\n\t../include/ScintillaWidget.h \\\r\n\t../src/CharacterCategoryMap.h \\\r\n\t../src/Position.h \\\r\n\t../src/UniqueString.h \\\r\n\t../src/SplitVector.h \\\r\n\t../src/Partitioning.h \\\r\n\t../src/RunStyles.h \\\r\n\t../src/ContractionState.h \\\r\n\t../src/CellBuffer.h \\\r\n\t../src/CallTip.h \\\r\n\t../src/KeyMap.h \\\r\n\t../src/Indicator.h \\\r\n\t../src/LineMarker.h \\\r\n\t../src/Style.h \\\r\n\t../src/ViewStyle.h \\\r\n\t../src/CharClassify.h \\\r\n\t../src/Decoration.h \\\r\n\t../src/CaseFolder.h \\\r\n\t../src/Document.h \\\r\n\t../src/CaseConvert.h \\\r\n\t../src/UniConversion.h \\\r\n\t../src/Selection.h \\\r\n\t../src/PositionCache.h \\\r\n\t../src/EditModel.h \\\r\n\t../src/MarginView.h \\\r\n\t../src/EditView.h \\\r\n\t../src/Editor.h \\\r\n\t../src/AutoComplete.h \\\r\n\t../src/ScintillaBase.h \\\r\n\tWrappers.h \\\r\n\tScintillaGTK.h \\\r\n\tscintilla-marshal.h \\\r\n\tScintillaGTKAccessible.h \\\r\n\tConverter.h\r\nScintillaGTKAccessible.o: \\\r\n\tScintillaGTKAccessible.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../include/ScintillaMessages.h \\\r\n\t../include/ScintillaStructures.h \\\r\n\t../include/ILoader.h \\\r\n\t../include/Sci_Position.h \\\r\n\t../include/ILexer.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../include/Scintilla.h \\\r\n\t../include/ScintillaWidget.h \\\r\n\t../src/CharacterCategoryMap.h \\\r\n\t../src/Position.h \\\r\n\t../src/UniqueString.h \\\r\n\t../src/SplitVector.h \\\r\n\t../src/Partitioning.h \\\r\n\t../src/RunStyles.h \\\r\n\t../src/ContractionState.h \\\r\n\t../src/CellBuffer.h \\\r\n\t../src/CallTip.h \\\r\n\t../src/KeyMap.h \\\r\n\t../src/Indicator.h \\\r\n\t../src/LineMarker.h \\\r\n\t../src/Style.h \\\r\n\t../src/ViewStyle.h \\\r\n\t../src/CharClassify.h \\\r\n\t../src/Decoration.h \\\r\n\t../src/CaseFolder.h \\\r\n\t../src/Document.h \\\r\n\t../src/CaseConvert.h \\\r\n\t../src/UniConversion.h \\\r\n\t../src/Selection.h \\\r\n\t../src/PositionCache.h \\\r\n\t../src/EditModel.h \\\r\n\t../src/MarginView.h \\\r\n\t../src/EditView.h \\\r\n\t../src/Editor.h \\\r\n\t../src/AutoComplete.h \\\r\n\t../src/ScintillaBase.h \\\r\n\tWrappers.h \\\r\n\tScintillaGTK.h \\\r\n\tScintillaGTKAccessible.h\r\nAutoComplete.o: \\\r\n\t../src/AutoComplete.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../include/ScintillaMessages.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/CharacterType.h \\\r\n\t../src/Position.h \\\r\n\t../src/AutoComplete.h\r\nCallTip.o: \\\r\n\t../src/CallTip.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../include/ScintillaMessages.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/Position.h \\\r\n\t../src/CallTip.h\r\nCaseConvert.o: \\\r\n\t../src/CaseConvert.cxx \\\r\n\t../src/CaseConvert.h \\\r\n\t../src/UniConversion.h\r\nCaseFolder.o: \\\r\n\t../src/CaseFolder.cxx \\\r\n\t../src/CharacterType.h \\\r\n\t../src/CaseFolder.h \\\r\n\t../src/CaseConvert.h\r\nCellBuffer.o: \\\r\n\t../src/CellBuffer.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Position.h \\\r\n\t../src/SplitVector.h \\\r\n\t../src/Partitioning.h \\\r\n\t../src/RunStyles.h \\\r\n\t../src/SparseVector.h \\\r\n\t../src/ChangeHistory.h \\\r\n\t../src/CellBuffer.h \\\r\n\t../src/UndoHistory.h \\\r\n\t../src/UniConversion.h\r\nChangeHistory.o: \\\r\n\t../src/ChangeHistory.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Position.h \\\r\n\t../src/SplitVector.h \\\r\n\t../src/Partitioning.h \\\r\n\t../src/RunStyles.h \\\r\n\t../src/SparseVector.h \\\r\n\t../src/ChangeHistory.h\r\nCharacterCategoryMap.o: \\\r\n\t../src/CharacterCategoryMap.cxx \\\r\n\t../src/CharacterCategoryMap.h\r\nCharacterType.o: \\\r\n\t../src/CharacterType.cxx \\\r\n\t../src/CharacterType.h\r\nCharClassify.o: \\\r\n\t../src/CharClassify.cxx \\\r\n\t../src/CharacterType.h \\\r\n\t../src/CharClassify.h\r\nContractionState.o: \\\r\n\t../src/ContractionState.cxx \\\r\n\t../src/Debugging.h \\\r\n\t../src/Position.h \\\r\n\t../src/UniqueString.h \\\r\n\t../src/SplitVector.h \\\r\n\t../src/Partitioning.h \\\r\n\t../src/RunStyles.h \\\r\n\t../src/SparseVector.h \\\r\n\t../src/ContractionState.h\r\nDBCS.o: \\\r\n\t../src/DBCS.cxx \\\r\n\t../src/DBCS.h\r\nDecoration.o: \\\r\n\t../src/Decoration.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Position.h \\\r\n\t../src/SplitVector.h \\\r\n\t../src/Partitioning.h \\\r\n\t../src/RunStyles.h \\\r\n\t../src/Decoration.h\r\nDocument.o: \\\r\n\t../src/Document.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../include/ILoader.h \\\r\n\t../include/Sci_Position.h \\\r\n\t../include/ILexer.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/CharacterType.h \\\r\n\t../src/CharacterCategoryMap.h \\\r\n\t../src/Position.h \\\r\n\t../src/SplitVector.h \\\r\n\t../src/Partitioning.h \\\r\n\t../src/RunStyles.h \\\r\n\t../src/CellBuffer.h \\\r\n\t../src/PerLine.h \\\r\n\t../src/CharClassify.h \\\r\n\t../src/Decoration.h \\\r\n\t../src/CaseFolder.h \\\r\n\t../src/Document.h \\\r\n\t../src/RESearch.h \\\r\n\t../src/UniConversion.h \\\r\n\t../src/ElapsedPeriod.h\r\nEditModel.o: \\\r\n\t../src/EditModel.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../include/ILoader.h \\\r\n\t../include/Sci_Position.h \\\r\n\t../include/ILexer.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/CharacterCategoryMap.h \\\r\n\t../src/Position.h \\\r\n\t../src/UniqueString.h \\\r\n\t../src/SplitVector.h \\\r\n\t../src/Partitioning.h \\\r\n\t../src/RunStyles.h \\\r\n\t../src/ContractionState.h \\\r\n\t../src/CellBuffer.h \\\r\n\t../src/Indicator.h \\\r\n\t../src/LineMarker.h \\\r\n\t../src/Style.h \\\r\n\t../src/ViewStyle.h \\\r\n\t../src/CharClassify.h \\\r\n\t../src/Decoration.h \\\r\n\t../src/CaseFolder.h \\\r\n\t../src/Document.h \\\r\n\t../src/UniConversion.h \\\r\n\t../src/Selection.h \\\r\n\t../src/PositionCache.h \\\r\n\t../src/EditModel.h\r\nEditor.o: \\\r\n\t../src/Editor.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../include/ScintillaMessages.h \\\r\n\t../include/ScintillaStructures.h \\\r\n\t../include/ILoader.h \\\r\n\t../include/Sci_Position.h \\\r\n\t../include/ILexer.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/CharacterType.h \\\r\n\t../src/CharacterCategoryMap.h \\\r\n\t../src/Position.h \\\r\n\t../src/UniqueString.h \\\r\n\t../src/SplitVector.h \\\r\n\t../src/Partitioning.h \\\r\n\t../src/RunStyles.h \\\r\n\t../src/ContractionState.h \\\r\n\t../src/CellBuffer.h \\\r\n\t../src/PerLine.h \\\r\n\t../src/KeyMap.h \\\r\n\t../src/Indicator.h \\\r\n\t../src/LineMarker.h \\\r\n\t../src/Style.h \\\r\n\t../src/ViewStyle.h \\\r\n\t../src/CharClassify.h \\\r\n\t../src/Decoration.h \\\r\n\t../src/CaseFolder.h \\\r\n\t../src/Document.h \\\r\n\t../src/UniConversion.h \\\r\n\t../src/DBCS.h \\\r\n\t../src/Selection.h \\\r\n\t../src/PositionCache.h \\\r\n\t../src/EditModel.h \\\r\n\t../src/MarginView.h \\\r\n\t../src/EditView.h \\\r\n\t../src/Editor.h \\\r\n\t../src/ElapsedPeriod.h\r\nEditView.o: \\\r\n\t../src/EditView.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../include/ScintillaMessages.h \\\r\n\t../include/ScintillaStructures.h \\\r\n\t../include/ILoader.h \\\r\n\t../include/Sci_Position.h \\\r\n\t../include/ILexer.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/CharacterType.h \\\r\n\t../src/CharacterCategoryMap.h \\\r\n\t../src/Position.h \\\r\n\t../src/UniqueString.h \\\r\n\t../src/SplitVector.h \\\r\n\t../src/Partitioning.h \\\r\n\t../src/RunStyles.h \\\r\n\t../src/ContractionState.h \\\r\n\t../src/CellBuffer.h \\\r\n\t../src/PerLine.h \\\r\n\t../src/KeyMap.h \\\r\n\t../src/Indicator.h \\\r\n\t../src/LineMarker.h \\\r\n\t../src/Style.h \\\r\n\t../src/ViewStyle.h \\\r\n\t../src/CharClassify.h \\\r\n\t../src/Decoration.h \\\r\n\t../src/CaseFolder.h \\\r\n\t../src/Document.h \\\r\n\t../src/UniConversion.h \\\r\n\t../src/Selection.h \\\r\n\t../src/PositionCache.h \\\r\n\t../src/EditModel.h \\\r\n\t../src/MarginView.h \\\r\n\t../src/EditView.h \\\r\n\t../src/ElapsedPeriod.h\r\nGeometry.o: \\\r\n\t../src/Geometry.cxx \\\r\n\t../src/Geometry.h\r\nIndicator.o: \\\r\n\t../src/Indicator.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/Indicator.h \\\r\n\t../src/XPM.h\r\nKeyMap.o: \\\r\n\t../src/KeyMap.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../include/ScintillaMessages.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/KeyMap.h\r\nLineMarker.o: \\\r\n\t../src/LineMarker.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/XPM.h \\\r\n\t../src/LineMarker.h \\\r\n\t../src/UniConversion.h\r\nMarginView.o: \\\r\n\t../src/MarginView.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../include/ScintillaMessages.h \\\r\n\t../include/ScintillaStructures.h \\\r\n\t../include/ILoader.h \\\r\n\t../include/Sci_Position.h \\\r\n\t../include/ILexer.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/CharacterCategoryMap.h \\\r\n\t../src/Position.h \\\r\n\t../src/UniqueString.h \\\r\n\t../src/SplitVector.h \\\r\n\t../src/Partitioning.h \\\r\n\t../src/RunStyles.h \\\r\n\t../src/ContractionState.h \\\r\n\t../src/CellBuffer.h \\\r\n\t../src/KeyMap.h \\\r\n\t../src/Indicator.h \\\r\n\t../src/LineMarker.h \\\r\n\t../src/Style.h \\\r\n\t../src/ViewStyle.h \\\r\n\t../src/CharClassify.h \\\r\n\t../src/Decoration.h \\\r\n\t../src/CaseFolder.h \\\r\n\t../src/Document.h \\\r\n\t../src/UniConversion.h \\\r\n\t../src/Selection.h \\\r\n\t../src/PositionCache.h \\\r\n\t../src/EditModel.h \\\r\n\t../src/MarginView.h \\\r\n\t../src/EditView.h\r\nPerLine.o: \\\r\n\t../src/PerLine.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/Position.h \\\r\n\t../src/SplitVector.h \\\r\n\t../src/Partitioning.h \\\r\n\t../src/CellBuffer.h \\\r\n\t../src/PerLine.h\r\nPositionCache.o: \\\r\n\t../src/PositionCache.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../include/ScintillaMessages.h \\\r\n\t../include/ILoader.h \\\r\n\t../include/Sci_Position.h \\\r\n\t../include/ILexer.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/CharacterType.h \\\r\n\t../src/CharacterCategoryMap.h \\\r\n\t../src/Position.h \\\r\n\t../src/UniqueString.h \\\r\n\t../src/SplitVector.h \\\r\n\t../src/Partitioning.h \\\r\n\t../src/RunStyles.h \\\r\n\t../src/ContractionState.h \\\r\n\t../src/CellBuffer.h \\\r\n\t../src/KeyMap.h \\\r\n\t../src/Indicator.h \\\r\n\t../src/LineMarker.h \\\r\n\t../src/Style.h \\\r\n\t../src/ViewStyle.h \\\r\n\t../src/CharClassify.h \\\r\n\t../src/Decoration.h \\\r\n\t../src/CaseFolder.h \\\r\n\t../src/Document.h \\\r\n\t../src/UniConversion.h \\\r\n\t../src/DBCS.h \\\r\n\t../src/Selection.h \\\r\n\t../src/PositionCache.h\r\nRESearch.o: \\\r\n\t../src/RESearch.cxx \\\r\n\t../src/Position.h \\\r\n\t../src/CharClassify.h \\\r\n\t../src/RESearch.h\r\nRunStyles.o: \\\r\n\t../src/RunStyles.cxx \\\r\n\t../src/Debugging.h \\\r\n\t../src/Position.h \\\r\n\t../src/SplitVector.h \\\r\n\t../src/Partitioning.h \\\r\n\t../src/RunStyles.h\r\nScintillaBase.o: \\\r\n\t../src/ScintillaBase.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../include/ScintillaMessages.h \\\r\n\t../include/ScintillaStructures.h \\\r\n\t../include/ILoader.h \\\r\n\t../include/Sci_Position.h \\\r\n\t../include/ILexer.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/CharacterCategoryMap.h \\\r\n\t../src/Position.h \\\r\n\t../src/UniqueString.h \\\r\n\t../src/SplitVector.h \\\r\n\t../src/Partitioning.h \\\r\n\t../src/RunStyles.h \\\r\n\t../src/ContractionState.h \\\r\n\t../src/CellBuffer.h \\\r\n\t../src/CallTip.h \\\r\n\t../src/KeyMap.h \\\r\n\t../src/Indicator.h \\\r\n\t../src/LineMarker.h \\\r\n\t../src/Style.h \\\r\n\t../src/ViewStyle.h \\\r\n\t../src/CharClassify.h \\\r\n\t../src/Decoration.h \\\r\n\t../src/CaseFolder.h \\\r\n\t../src/Document.h \\\r\n\t../src/Selection.h \\\r\n\t../src/PositionCache.h \\\r\n\t../src/EditModel.h \\\r\n\t../src/MarginView.h \\\r\n\t../src/EditView.h \\\r\n\t../src/Editor.h \\\r\n\t../src/AutoComplete.h \\\r\n\t../src/ScintillaBase.h\r\nSelection.o: \\\r\n\t../src/Selection.cxx \\\r\n\t../src/Debugging.h \\\r\n\t../src/Position.h \\\r\n\t../src/Selection.h\r\nStyle.o: \\\r\n\t../src/Style.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/Style.h\r\nUndoHistory.o: \\\r\n\t../src/UndoHistory.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Position.h \\\r\n\t../src/SplitVector.h \\\r\n\t../src/Partitioning.h \\\r\n\t../src/RunStyles.h \\\r\n\t../src/SparseVector.h \\\r\n\t../src/ChangeHistory.h \\\r\n\t../src/CellBuffer.h \\\r\n\t../src/UndoHistory.h\r\nUniConversion.o: \\\r\n\t../src/UniConversion.cxx \\\r\n\t../src/UniConversion.h\r\nUniqueString.o: \\\r\n\t../src/UniqueString.cxx \\\r\n\t../src/UniqueString.h\r\nViewStyle.o: \\\r\n\t../src/ViewStyle.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/Position.h \\\r\n\t../src/UniqueString.h \\\r\n\t../src/Indicator.h \\\r\n\t../src/XPM.h \\\r\n\t../src/LineMarker.h \\\r\n\t../src/Style.h \\\r\n\t../src/ViewStyle.h\r\nXPM.o: \\\r\n\t../src/XPM.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/XPM.h\r\n"
  },
  {
    "path": "scintilla/gtk/makefile",
    "content": "# Make file for Scintilla on Linux, macOS, or Windows\r\n# @file makefile\r\n# Copyright 1998-2010 by Neil Hodgson <neilh@scintilla.org>\r\n# The License.txt file describes the conditions under which this software may be distributed.\r\n# This makefile assumes GCC 9.0+ is used and changes will be needed to use other compilers.\r\n# Clang 9.0+ can be used with CLANG=1 on command line.\r\n# Builds for GTK+ 2 and 3. GTK 3 requires GTK3=1 on command line.\r\n# Also works with ming32-make on Windows.\r\n\r\n.PHONY: static shared all clean analyze depend\r\n\r\n.SUFFIXES: .cxx .c .o .h .a .list\r\n\r\nsrcdir ?= .\r\nbasedir = $(srcdir)/..\r\n\r\nWARNINGS = -Wpedantic -Wall\r\nifdef CLANG\r\nCXX = clang++\r\nCC = clang\r\nWARNINGS += -Wno-deprecated-register\r\nifdef windir\r\n# Turn off some warnings that occur when Clang is being used on Windows where it\r\n# is including Microsoft headers.\r\n# incompatible-ms-struct is because more complex structs are not quite the same as MSVC\r\nWARNINGS += -Wno-incompatible-ms-struct\r\n# language-extension-token is because of __int64 in glib-2.0 glibconfig.h\r\nWARNINGS += -Wno-language-extension-token\r\n# register may be used in glib\r\n# This produces a warning since -Wno-register is not valid for C files but it still works\r\nWARNINGS += -Wno-register\r\nendif\r\n# Can choose aspect to sanitize: address and undefined can simply change SANITIZE but for\r\n# thread also need to create Position Independent Executable -> search online documentation\r\nSANITIZE = address\r\n#SANITIZE = undefined\r\nBASE_FLAGS += -fsanitize=$(SANITIZE)\r\nendif\r\nARFLAGS = rc\r\nRANLIB ?= ranlib\r\nPKG_CONFIG ?= pkg-config\r\n\r\nGTK_VERSION = $(if $(GTK3),gtk+-3.0,gtk+-2.0)\r\n\r\n# Environment variable windir always defined on Win32\r\n\r\n# Enable Position Independent Code except on Windows where it is the default so the flag produces a warning\r\nifndef windir\r\nBASE_FLAGS += -fPIC\r\nifeq ($(shell uname),Darwin)\r\nLDFLAGS += -dynamiclib\r\nendif\r\nendif\r\n\r\nLDFLAGS += -shared\r\n\r\n# Take care of changing Unix style '/' directory separator to '\\' on Windows\r\nnormalize = $(if $(windir),$(subst /,\\,$1),$1)\r\n\r\nPYTHON = $(if $(windir),pyw,python3)\r\n\r\nSHAREDEXTENSION = $(if $(windir),dll,so)\r\n\r\nifdef windir\r\nCC = gcc\r\nDEL = del /q\r\nelse\r\nDEL = rm -f\r\nendif\r\nCOMPLIB=$(basedir)/bin/scintilla.a\r\nCOMPONENT=$(basedir)/bin/libscintilla.$(SHAREDEXTENSION)\r\n\r\nvpath %.h $(srcdir) $(basedir)/src $(basedir)/include\r\nvpath %.c $(srcdir)\r\nvpath %.cxx $(srcdir) $(basedir)/src\r\n\r\nINCLUDES=-I $(basedir)/include -I $(basedir)/src\r\nDEFINES += -DGTK\r\nBASE_FLAGS += $(WARNINGS)\r\n\r\nifdef NO_CXX11_REGEX\r\nDEFINES += -DNO_CXX11_REGEX\r\nendif\r\n\r\nDEFINES += -D$(if $(DEBUG),DEBUG,NDEBUG)\r\nBASE_FLAGS += $(if $(DEBUG),-g,-O3)\r\n\r\nCXX_BASE_FLAGS =--std=c++17 $(BASE_FLAGS)\r\nCXX_ALL_FLAGS =$(DEFINES) $(INCLUDES) $(CXX_BASE_FLAGS) $(CONFIG_FLAGS)\r\n\r\nCONFIG_FLAGS:=$(shell $(PKG_CONFIG) --cflags $(GTK_VERSION))\r\nCONFIGLIB:=$(shell $(PKG_CONFIG) --libs $(GTK_VERSION) gmodule-no-export-2.0)\r\nMARSHALLER=scintilla-marshal.o\r\n\r\nall: $(COMPLIB) $(COMPONENT)\r\n\r\nstatic: $(COMPLIB)\r\n\r\nshared: $(COMPONENT)\r\n\r\nclean:\r\n\t$(DEL) *.o $(call normalize,$(COMPLIB)) $(call normalize,$(COMPONENT)) *.plist\r\n\r\n%.o: %.cxx\r\n\t$(CXX) $(CPPFLAGS) $(CXX_ALL_FLAGS) $(CXXFLAGS) -c $<\r\n%.o: %.c\r\n\t$(CC) $(CPPFLAGS) $(DEFINES) $(INCLUDES) $(CONFIG_FLAGS) $(BASE_FLAGS) $(CFLAGS) -w -c $<\r\n\r\nGLIB_GENMARSHAL = glib-genmarshal\r\nGLIB_GENMARSHAL_FLAGS = --prefix=scintilla_marshal\r\n\r\n%.h: %.list\r\n\t$(GLIB_GENMARSHAL) --header $(GLIB_GENMARSHAL_FLAGS) $< > $@\r\n%.c: %.list\r\n\t$(GLIB_GENMARSHAL) --body $(GLIB_GENMARSHAL_FLAGS) $< > $@\r\n\r\nanalyze:\r\n\tclang --analyze $(DEFINES) $(INCLUDES) $(CONFIG_FLAGS) $(CXX_BASE_FLAGS) $(CXXFLAGS) $(srcdir)/*.cxx $(basedir)/src/*.cxx\r\n\r\ndepend deps.mak:\r\n\t$(PYTHON) DepGen.py\r\n\r\n# Required for base Scintilla\r\nSRC_OBJS = \\\r\n\tAutoComplete.o \\\r\n\tCallTip.o \\\r\n\tCaseConvert.o \\\r\n\tCaseFolder.o \\\r\n\tCellBuffer.o \\\r\n\tChangeHistory.o \\\r\n\tCharacterCategoryMap.o \\\r\n\tCharacterType.o \\\r\n\tCharClassify.o \\\r\n\tContractionState.o \\\r\n\tDBCS.o \\\r\n\tDecoration.o \\\r\n\tDocument.o \\\r\n\tEditModel.o \\\r\n\tEditor.o \\\r\n\tEditView.o \\\r\n\tGeometry.o \\\r\n\tIndicator.o \\\r\n\tKeyMap.o \\\r\n\tLineMarker.o \\\r\n\tMarginView.o \\\r\n\tPerLine.o \\\r\n\tPositionCache.o \\\r\n\tRESearch.o \\\r\n\tRunStyles.o \\\r\n\tSelection.o \\\r\n\tStyle.o \\\r\n\tUndoHistory.o \\\r\n\tUniConversion.o \\\r\n\tUniqueString.o \\\r\n\tViewStyle.o \\\r\n\tXPM.o\r\n\r\nGTK_OBJS = \\\r\n\tScintillaBase.o \\\r\n\tPlatGTK.o \\\r\n\tScintillaGTK.o \\\r\n\tScintillaGTKAccessible.o\r\n\r\n$(COMPLIB): $(SRC_OBJS) $(GTK_OBJS) $(MARSHALLER)\r\n\t$(AR) $(ARFLAGS) $@ $^\r\n\t$(RANLIB) $@\r\n\r\n$(COMPONENT): $(SRC_OBJS) $(GTK_OBJS) $(MARSHALLER)\r\n\t$(CXX) $(CXX_ALL_FLAGS) $(CXXFLAGS) $(LDFLAGS) $^ -o $@ $(CONFIGLIB)\r\n\r\n# Automatically generate header dependencies with \"make depend\"\r\ninclude deps.mak\r\n"
  },
  {
    "path": "scintilla/gtk/scintilla-marshal.c",
    "content": "#include <glib-object.h>\r\n\r\n#ifdef G_ENABLE_DEBUG\r\n#define g_marshal_value_peek_boolean(v)  g_value_get_boolean (v)\r\n#define g_marshal_value_peek_char(v)     g_value_get_schar (v)\r\n#define g_marshal_value_peek_uchar(v)    g_value_get_uchar (v)\r\n#define g_marshal_value_peek_int(v)      g_value_get_int (v)\r\n#define g_marshal_value_peek_uint(v)     g_value_get_uint (v)\r\n#define g_marshal_value_peek_long(v)     g_value_get_long (v)\r\n#define g_marshal_value_peek_ulong(v)    g_value_get_ulong (v)\r\n#define g_marshal_value_peek_int64(v)    g_value_get_int64 (v)\r\n#define g_marshal_value_peek_uint64(v)   g_value_get_uint64 (v)\r\n#define g_marshal_value_peek_enum(v)     g_value_get_enum (v)\r\n#define g_marshal_value_peek_flags(v)    g_value_get_flags (v)\r\n#define g_marshal_value_peek_float(v)    g_value_get_float (v)\r\n#define g_marshal_value_peek_double(v)   g_value_get_double (v)\r\n#define g_marshal_value_peek_string(v)   (char*) g_value_get_string (v)\r\n#define g_marshal_value_peek_param(v)    g_value_get_param (v)\r\n#define g_marshal_value_peek_boxed(v)    g_value_get_boxed (v)\r\n#define g_marshal_value_peek_pointer(v)  g_value_get_pointer (v)\r\n#define g_marshal_value_peek_object(v)   g_value_get_object (v)\r\n#define g_marshal_value_peek_variant(v)  g_value_get_variant (v)\r\n#else /* !G_ENABLE_DEBUG */\r\n/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API.\r\n *          Do not access GValues directly in your code. Instead, use the\r\n *          g_value_get_*() functions\r\n */\r\n#define g_marshal_value_peek_boolean(v)  (v)->data[0].v_int\r\n#define g_marshal_value_peek_char(v)     (v)->data[0].v_int\r\n#define g_marshal_value_peek_uchar(v)    (v)->data[0].v_uint\r\n#define g_marshal_value_peek_int(v)      (v)->data[0].v_int\r\n#define g_marshal_value_peek_uint(v)     (v)->data[0].v_uint\r\n#define g_marshal_value_peek_long(v)     (v)->data[0].v_long\r\n#define g_marshal_value_peek_ulong(v)    (v)->data[0].v_ulong\r\n#define g_marshal_value_peek_int64(v)    (v)->data[0].v_int64\r\n#define g_marshal_value_peek_uint64(v)   (v)->data[0].v_uint64\r\n#define g_marshal_value_peek_enum(v)     (v)->data[0].v_long\r\n#define g_marshal_value_peek_flags(v)    (v)->data[0].v_ulong\r\n#define g_marshal_value_peek_float(v)    (v)->data[0].v_float\r\n#define g_marshal_value_peek_double(v)   (v)->data[0].v_double\r\n#define g_marshal_value_peek_string(v)   (v)->data[0].v_pointer\r\n#define g_marshal_value_peek_param(v)    (v)->data[0].v_pointer\r\n#define g_marshal_value_peek_boxed(v)    (v)->data[0].v_pointer\r\n#define g_marshal_value_peek_pointer(v)  (v)->data[0].v_pointer\r\n#define g_marshal_value_peek_object(v)   (v)->data[0].v_pointer\r\n#define g_marshal_value_peek_variant(v)  (v)->data[0].v_pointer\r\n#endif /* !G_ENABLE_DEBUG */\r\n\r\n/* VOID:INT,OBJECT (scintilla-marshal.list:1) */\r\nvoid\r\nscintilla_marshal_VOID__INT_OBJECT (GClosure     *closure,\r\n                                    GValue       *return_value G_GNUC_UNUSED,\r\n                                    guint         n_param_values,\r\n                                    const GValue *param_values,\r\n                                    gpointer      invocation_hint G_GNUC_UNUSED,\r\n                                    gpointer      marshal_data)\r\n{\r\n  typedef void (*GMarshalFunc_VOID__INT_OBJECT) (gpointer data1,\r\n                                                 gint arg1,\r\n                                                 gpointer arg2,\r\n                                                 gpointer data2);\r\n  GCClosure *cc = (GCClosure *) closure;\r\n  gpointer data1, data2;\r\n  GMarshalFunc_VOID__INT_OBJECT callback;\r\n\r\n  g_return_if_fail (n_param_values == 3);\r\n\r\n  if (G_CCLOSURE_SWAP_DATA (closure))\r\n    {\r\n      data1 = closure->data;\r\n      data2 = g_value_peek_pointer (param_values + 0);\r\n    }\r\n  else\r\n    {\r\n      data1 = g_value_peek_pointer (param_values + 0);\r\n      data2 = closure->data;\r\n    }\r\n  callback = (GMarshalFunc_VOID__INT_OBJECT) (marshal_data ? marshal_data : cc->callback);\r\n\r\n  callback (data1,\r\n            g_marshal_value_peek_int (param_values + 1),\r\n            g_marshal_value_peek_object (param_values + 2),\r\n            data2);\r\n}\r\n\r\n/* VOID:INT,BOXED (scintilla-marshal.list:2) */\r\nvoid\r\nscintilla_marshal_VOID__INT_BOXED (GClosure     *closure,\r\n                                   GValue       *return_value G_GNUC_UNUSED,\r\n                                   guint         n_param_values,\r\n                                   const GValue *param_values,\r\n                                   gpointer      invocation_hint G_GNUC_UNUSED,\r\n                                   gpointer      marshal_data)\r\n{\r\n  typedef void (*GMarshalFunc_VOID__INT_BOXED) (gpointer data1,\r\n                                                gint arg1,\r\n                                                gpointer arg2,\r\n                                                gpointer data2);\r\n  GCClosure *cc = (GCClosure *) closure;\r\n  gpointer data1, data2;\r\n  GMarshalFunc_VOID__INT_BOXED callback;\r\n\r\n  g_return_if_fail (n_param_values == 3);\r\n\r\n  if (G_CCLOSURE_SWAP_DATA (closure))\r\n    {\r\n      data1 = closure->data;\r\n      data2 = g_value_peek_pointer (param_values + 0);\r\n    }\r\n  else\r\n    {\r\n      data1 = g_value_peek_pointer (param_values + 0);\r\n      data2 = closure->data;\r\n    }\r\n  callback = (GMarshalFunc_VOID__INT_BOXED) (marshal_data ? marshal_data : cc->callback);\r\n\r\n  callback (data1,\r\n            g_marshal_value_peek_int (param_values + 1),\r\n            g_marshal_value_peek_boxed (param_values + 2),\r\n            data2);\r\n}\r\n\r\n"
  },
  {
    "path": "scintilla/gtk/scintilla-marshal.h",
    "content": "/* This file is generated, all changes will be lost */\r\n#ifndef __SCINTILLA_MARSHAL_MARSHAL_H__\r\n#define __SCINTILLA_MARSHAL_MARSHAL_H__\r\n\r\n#include <glib-object.h>\r\n\r\nG_BEGIN_DECLS\r\n\r\n/* VOID:INT,OBJECT (scintilla-marshal.list:1) */\r\nextern\r\nvoid scintilla_marshal_VOID__INT_OBJECT (GClosure     *closure,\r\n                                         GValue       *return_value,\r\n                                         guint         n_param_values,\r\n                                         const GValue *param_values,\r\n                                         gpointer      invocation_hint,\r\n                                         gpointer      marshal_data);\r\n\r\n/* VOID:INT,BOXED (scintilla-marshal.list:2) */\r\nextern\r\nvoid scintilla_marshal_VOID__INT_BOXED (GClosure     *closure,\r\n                                        GValue       *return_value,\r\n                                        guint         n_param_values,\r\n                                        const GValue *param_values,\r\n                                        gpointer      invocation_hint,\r\n                                        gpointer      marshal_data);\r\n\r\n\r\nG_END_DECLS\r\n\r\n#endif /* __SCINTILLA_MARSHAL_MARSHAL_H__ */\r\n"
  },
  {
    "path": "scintilla/gtk/scintilla-marshal.list",
    "content": "VOID:INT,OBJECT\nVOID:INT,BOXED\n"
  },
  {
    "path": "scintilla/include/ILexer.h",
    "content": "// Scintilla source code edit control\r\n/** @file ILexer.h\r\n ** Interface between Scintilla and lexers.\r\n **/\r\n// Copyright 1998-2010 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef ILEXER_H\r\n#define ILEXER_H\r\n\r\n#include \"Sci_Position.h\"\r\n\r\nnamespace Scintilla {\r\n\r\nenum { dvRelease4=2 };\r\n\r\nclass IDocument {\r\npublic:\r\n\tvirtual int SCI_METHOD Version() const = 0;\r\n\tvirtual void SCI_METHOD SetErrorStatus(int status) = 0;\r\n\tvirtual Sci_Position SCI_METHOD Length() const = 0;\r\n\tvirtual void SCI_METHOD GetCharRange(char *buffer, Sci_Position position, Sci_Position lengthRetrieve) const = 0;\r\n\tvirtual char SCI_METHOD StyleAt(Sci_Position position) const = 0;\r\n\tvirtual Sci_Position SCI_METHOD LineFromPosition(Sci_Position position) const = 0;\r\n\tvirtual Sci_Position SCI_METHOD LineStart(Sci_Position line) const = 0;\r\n\tvirtual int SCI_METHOD GetLevel(Sci_Position line) const = 0;\r\n\tvirtual int SCI_METHOD SetLevel(Sci_Position line, int level) = 0;\r\n\tvirtual int SCI_METHOD GetLineState(Sci_Position line) const = 0;\r\n\tvirtual int SCI_METHOD SetLineState(Sci_Position line, int state) = 0;\r\n\tvirtual void SCI_METHOD StartStyling(Sci_Position position) = 0;\r\n\tvirtual bool SCI_METHOD SetStyleFor(Sci_Position length, char style) = 0;\r\n\tvirtual bool SCI_METHOD SetStyles(Sci_Position length, const char *styles) = 0;\r\n\tvirtual void SCI_METHOD DecorationSetCurrentIndicator(int indicator) = 0;\r\n\tvirtual void SCI_METHOD DecorationFillRange(Sci_Position position, int value, Sci_Position fillLength) = 0;\r\n\tvirtual void SCI_METHOD ChangeLexerState(Sci_Position start, Sci_Position end) = 0;\r\n\tvirtual int SCI_METHOD CodePage() const = 0;\r\n\tvirtual bool SCI_METHOD IsDBCSLeadByte(char ch) const = 0;\r\n\tvirtual const char * SCI_METHOD BufferPointer() = 0;\r\n\tvirtual int SCI_METHOD GetLineIndentation(Sci_Position line) = 0;\r\n\tvirtual Sci_Position SCI_METHOD LineEnd(Sci_Position line) const = 0;\r\n\tvirtual Sci_Position SCI_METHOD GetRelativePosition(Sci_Position positionStart, Sci_Position characterOffset) const = 0;\r\n\tvirtual int SCI_METHOD GetCharacterAndWidth(Sci_Position position, Sci_Position *pWidth) const = 0;\r\n};\r\n\r\nenum { lvRelease4=2, lvRelease5=3 };\r\n\r\nclass ILexer4 {\r\npublic:\r\n\tvirtual int SCI_METHOD Version() const = 0;\r\n\tvirtual void SCI_METHOD Release() = 0;\r\n\tvirtual const char * SCI_METHOD PropertyNames() = 0;\r\n\tvirtual int SCI_METHOD PropertyType(const char *name) = 0;\r\n\tvirtual const char * SCI_METHOD DescribeProperty(const char *name) = 0;\r\n\tvirtual Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) = 0;\r\n\tvirtual const char * SCI_METHOD DescribeWordListSets() = 0;\r\n\tvirtual Sci_Position SCI_METHOD WordListSet(int n, const char *wl) = 0;\r\n\tvirtual void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) = 0;\r\n\tvirtual void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) = 0;\r\n\tvirtual void * SCI_METHOD PrivateCall(int operation, void *pointer) = 0;\r\n\tvirtual int SCI_METHOD LineEndTypesSupported() = 0;\r\n\tvirtual int SCI_METHOD AllocateSubStyles(int styleBase, int numberStyles) = 0;\r\n\tvirtual int SCI_METHOD SubStylesStart(int styleBase) = 0;\r\n\tvirtual int SCI_METHOD SubStylesLength(int styleBase) = 0;\r\n\tvirtual int SCI_METHOD StyleFromSubStyle(int subStyle) = 0;\r\n\tvirtual int SCI_METHOD PrimaryStyleFromStyle(int style) = 0;\r\n\tvirtual void SCI_METHOD FreeSubStyles() = 0;\r\n\tvirtual void SCI_METHOD SetIdentifiers(int style, const char *identifiers) = 0;\r\n\tvirtual int SCI_METHOD DistanceToSecondaryStyles() = 0;\r\n\tvirtual const char * SCI_METHOD GetSubStyleBases() = 0;\r\n\tvirtual int SCI_METHOD NamedStyles() = 0;\r\n\tvirtual const char * SCI_METHOD NameOfStyle(int style) = 0;\r\n\tvirtual const char * SCI_METHOD TagsOfStyle(int style) = 0;\r\n\tvirtual const char * SCI_METHOD DescriptionOfStyle(int style) = 0;\r\n};\r\n\r\nclass ILexer5 : public ILexer4 {\r\npublic:\r\n\tvirtual const char * SCI_METHOD GetName() = 0;\r\n\tvirtual int SCI_METHOD  GetIdentifier() = 0;\r\n\tvirtual const char * SCI_METHOD PropertyGet(const char *key) = 0;\r\n};\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/include/ILoader.h",
    "content": "// Scintilla source code edit control\r\n/** @file ILoader.h\r\n ** Interface for loading into a Scintilla document from a background thread.\r\n ** Interface for manipulating a document without a view.\r\n **/\r\n// Copyright 1998-2017 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef ILOADER_H\r\n#define ILOADER_H\r\n\r\n#include \"Sci_Position.h\"\r\n\r\nnamespace Scintilla {\r\n\r\nclass ILoader {\r\npublic:\r\n\tvirtual int SCI_METHOD Release() = 0;\r\n\t// Returns a status code from SC_STATUS_*\r\n\tvirtual int SCI_METHOD AddData(const char *data, Sci_Position length) = 0;\r\n\tvirtual void * SCI_METHOD ConvertToDocument() = 0;\r\n};\r\n\r\nstatic constexpr int deRelease0 = 0;\r\n\r\nclass IDocumentEditable {\r\npublic:\r\n\t// Allow this interface to add methods over time and discover whether new methods available.\r\n\tvirtual int SCI_METHOD DEVersion() const noexcept = 0;\r\n\r\n\t// Lifetime control\r\n\tvirtual int SCI_METHOD AddRef() noexcept = 0;\r\n\tvirtual int SCI_METHOD Release() = 0;\r\n};\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/include/Sci_Position.h",
    "content": "// Scintilla source code edit control\r\n/** @file Sci_Position.h\r\n ** Define the Sci_Position type used in Scintilla's external interfaces.\r\n ** These need to be available to clients written in C so are not in a C++ namespace.\r\n **/\r\n// Copyright 2015 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef SCI_POSITION_H\r\n#define SCI_POSITION_H\r\n\r\n#include <stddef.h>\r\n\r\n// Basic signed type used throughout interface\r\ntypedef ptrdiff_t Sci_Position;\r\n\r\n// Unsigned variant used for ILexer::Lex and ILexer::Fold\r\ntypedef size_t Sci_PositionU;\r\n\r\n// For Sci_CharacterRange  which is defined as long to be compatible with Win32 CHARRANGE\r\ntypedef long Sci_PositionCR;\r\n\r\n#ifdef _WIN32\r\n\t#define SCI_METHOD __stdcall\r\n#else\r\n\t#define SCI_METHOD\r\n#endif\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/include/Scintilla.h",
    "content": "/* Scintilla source code edit control */\r\n/** @file Scintilla.h\r\n ** Interface to the edit control.\r\n **/\r\n/* Copyright 1998-2003 by Neil Hodgson <neilh@scintilla.org>\r\n * The License.txt file describes the conditions under which this software may be distributed. */\r\n\r\n/* Most of this file is automatically generated from the Scintilla.iface interface definition\r\n * file which contains any comments about the definitions. HFacer.py does the generation. */\r\n\r\n#ifndef SCINTILLA_H\r\n#define SCINTILLA_H\r\n\r\n#ifdef __cplusplus\r\nextern \"C\" {\r\n#endif\r\n\r\n#if defined(_WIN32)\r\n/* Return false on failure: */\r\nint Scintilla_RegisterClasses(void *hInstance);\r\nint Scintilla_ReleaseResources(void);\r\n#endif\r\n\r\n#ifdef __cplusplus\r\n}\r\n#endif\r\n\r\n// Include header that defines basic numeric types.\r\n#include <stdint.h>\r\n\r\n// Define uptr_t, an unsigned integer type large enough to hold a pointer.\r\ntypedef uintptr_t uptr_t;\r\n// Define sptr_t, a signed integer large enough to hold a pointer.\r\ntypedef intptr_t sptr_t;\r\n\r\n#include \"Sci_Position.h\"\r\n\r\ntypedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, sptr_t lParam);\r\ntypedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, sptr_t lParam, int *pStatus);\r\n\r\n#ifndef SCI_DISABLE_AUTOGENERATED\r\n\r\n/* ++Autogenerated -- start of section automatically generated from Scintilla.iface */\r\n#define INVALID_POSITION -1\r\n#define SCI_START 2000\r\n#define SCI_OPTIONAL_START 3000\r\n#define SCI_LEXER_START 4000\r\n#define SCI_ADDTEXT 2001\r\n#define SCI_ADDSTYLEDTEXT 2002\r\n#define SCI_INSERTTEXT 2003\r\n#define SCI_CHANGEINSERTION 2672\r\n#define SCI_CLEARALL 2004\r\n#define SCI_DELETERANGE 2645\r\n#define SCI_CLEARDOCUMENTSTYLE 2005\r\n#define SCI_GETLENGTH 2006\r\n#define SCI_GETCHARAT 2007\r\n#define SCI_GETCURRENTPOS 2008\r\n#define SCI_GETANCHOR 2009\r\n#define SCI_GETSTYLEAT 2010\r\n#define SCI_GETSTYLEINDEXAT 2038\r\n#define SCI_REDO 2011\r\n#define SCI_SETUNDOCOLLECTION 2012\r\n#define SCI_SELECTALL 2013\r\n#define SCI_SETSAVEPOINT 2014\r\n#define SCI_GETSTYLEDTEXT 2015\r\n#define SCI_GETSTYLEDTEXTFULL 2778\r\n#define SCI_CANREDO 2016\r\n#define SCI_MARKERLINEFROMHANDLE 2017\r\n#define SCI_MARKERDELETEHANDLE 2018\r\n#define SCI_MARKERHANDLEFROMLINE 2732\r\n#define SCI_MARKERNUMBERFROMLINE 2733\r\n#define SCI_GETUNDOCOLLECTION 2019\r\n#define SCWS_INVISIBLE 0\r\n#define SCWS_VISIBLEALWAYS 1\r\n#define SCWS_VISIBLEAFTERINDENT 2\r\n#define SCWS_VISIBLEONLYININDENT 3\r\n#define SCI_GETVIEWWS 2020\r\n#define SCI_SETVIEWWS 2021\r\n#define SCTD_LONGARROW 0\r\n#define SCTD_STRIKEOUT 1\r\n#define SCI_GETTABDRAWMODE 2698\r\n#define SCI_SETTABDRAWMODE 2699\r\n#define SCI_POSITIONFROMPOINT 2022\r\n#define SCI_POSITIONFROMPOINTCLOSE 2023\r\n#define SCI_GOTOLINE 2024\r\n#define SCI_GOTOPOS 2025\r\n#define SCI_SETANCHOR 2026\r\n#define SCI_GETCURLINE 2027\r\n#define SCI_GETENDSTYLED 2028\r\n#define SC_EOL_CRLF 0\r\n#define SC_EOL_CR 1\r\n#define SC_EOL_LF 2\r\n#define SCI_CONVERTEOLS 2029\r\n#define SCI_GETEOLMODE 2030\r\n#define SCI_SETEOLMODE 2031\r\n#define SCI_STARTSTYLING 2032\r\n#define SCI_SETSTYLING 2033\r\n#define SCI_GETBUFFEREDDRAW 2034\r\n#define SCI_SETBUFFEREDDRAW 2035\r\n#define SCI_SETTABWIDTH 2036\r\n#define SCI_GETTABWIDTH 2121\r\n#define SCI_SETTABMINIMUMWIDTH 2724\r\n#define SCI_GETTABMINIMUMWIDTH 2725\r\n#define SCI_CLEARTABSTOPS 2675\r\n#define SCI_ADDTABSTOP 2676\r\n#define SCI_GETNEXTTABSTOP 2677\r\n#define SC_CP_UTF8 65001\r\n#define SCI_SETCODEPAGE 2037\r\n#define SCI_SETFONTLOCALE 2760\r\n#define SCI_GETFONTLOCALE 2761\r\n#define SC_IME_WINDOWED 0\r\n#define SC_IME_INLINE 1\r\n#define SCI_GETIMEINTERACTION 2678\r\n#define SCI_SETIMEINTERACTION 2679\r\n#define SC_ALPHA_TRANSPARENT 0\r\n#define SC_ALPHA_OPAQUE 255\r\n#define SC_ALPHA_NOALPHA 256\r\n#define SC_CURSORNORMAL -1\r\n#define SC_CURSORARROW 2\r\n#define SC_CURSORWAIT 4\r\n#define SC_CURSORREVERSEARROW 7\r\n#define MARKER_MAX 31\r\n#define SC_MARK_CIRCLE 0\r\n#define SC_MARK_ROUNDRECT 1\r\n#define SC_MARK_ARROW 2\r\n#define SC_MARK_SMALLRECT 3\r\n#define SC_MARK_SHORTARROW 4\r\n#define SC_MARK_EMPTY 5\r\n#define SC_MARK_ARROWDOWN 6\r\n#define SC_MARK_MINUS 7\r\n#define SC_MARK_PLUS 8\r\n#define SC_MARK_VLINE 9\r\n#define SC_MARK_LCORNER 10\r\n#define SC_MARK_TCORNER 11\r\n#define SC_MARK_BOXPLUS 12\r\n#define SC_MARK_BOXPLUSCONNECTED 13\r\n#define SC_MARK_BOXMINUS 14\r\n#define SC_MARK_BOXMINUSCONNECTED 15\r\n#define SC_MARK_LCORNERCURVE 16\r\n#define SC_MARK_TCORNERCURVE 17\r\n#define SC_MARK_CIRCLEPLUS 18\r\n#define SC_MARK_CIRCLEPLUSCONNECTED 19\r\n#define SC_MARK_CIRCLEMINUS 20\r\n#define SC_MARK_CIRCLEMINUSCONNECTED 21\r\n#define SC_MARK_BACKGROUND 22\r\n#define SC_MARK_DOTDOTDOT 23\r\n#define SC_MARK_ARROWS 24\r\n#define SC_MARK_PIXMAP 25\r\n#define SC_MARK_FULLRECT 26\r\n#define SC_MARK_LEFTRECT 27\r\n#define SC_MARK_AVAILABLE 28\r\n#define SC_MARK_UNDERLINE 29\r\n#define SC_MARK_RGBAIMAGE 30\r\n#define SC_MARK_BOOKMARK 31\r\n#define SC_MARK_VERTICALBOOKMARK 32\r\n#define SC_MARK_BAR 33\r\n#define SC_MARK_CHARACTER 10000\r\n#define SC_MARKNUM_HISTORY_REVERTED_TO_ORIGIN 21\r\n#define SC_MARKNUM_HISTORY_SAVED 22\r\n#define SC_MARKNUM_HISTORY_MODIFIED 23\r\n#define SC_MARKNUM_HISTORY_REVERTED_TO_MODIFIED 24\r\n#define SC_MARKNUM_FOLDEREND 25\r\n#define SC_MARKNUM_FOLDEROPENMID 26\r\n#define SC_MARKNUM_FOLDERMIDTAIL 27\r\n#define SC_MARKNUM_FOLDERTAIL 28\r\n#define SC_MARKNUM_FOLDERSUB 29\r\n#define SC_MARKNUM_FOLDER 30\r\n#define SC_MARKNUM_FOLDEROPEN 31\r\n#define SC_MASK_FOLDERS 0xFE000000\r\n#define SCI_MARKERDEFINE 2040\r\n#define SCI_MARKERSETFORE 2041\r\n#define SCI_MARKERSETBACK 2042\r\n#define SCI_MARKERSETBACKSELECTED 2292\r\n#define SCI_MARKERSETFORETRANSLUCENT 2294\r\n#define SCI_MARKERSETBACKTRANSLUCENT 2295\r\n#define SCI_MARKERSETBACKSELECTEDTRANSLUCENT 2296\r\n#define SCI_MARKERSETSTROKEWIDTH 2297\r\n#define SCI_MARKERENABLEHIGHLIGHT 2293\r\n#define SCI_MARKERADD 2043\r\n#define SCI_MARKERDELETE 2044\r\n#define SCI_MARKERDELETEALL 2045\r\n#define SCI_MARKERGET 2046\r\n#define SCI_MARKERNEXT 2047\r\n#define SCI_MARKERPREVIOUS 2048\r\n#define SCI_MARKERDEFINEPIXMAP 2049\r\n#define SCI_MARKERADDSET 2466\r\n#define SCI_MARKERSETALPHA 2476\r\n#define SCI_MARKERGETLAYER 2734\r\n#define SCI_MARKERSETLAYER 2735\r\n#define SC_MAX_MARGIN 4\r\n#define SC_MARGIN_SYMBOL 0\r\n#define SC_MARGIN_NUMBER 1\r\n#define SC_MARGIN_BACK 2\r\n#define SC_MARGIN_FORE 3\r\n#define SC_MARGIN_TEXT 4\r\n#define SC_MARGIN_RTEXT 5\r\n#define SC_MARGIN_COLOUR 6\r\n#define SCI_SETMARGINTYPEN 2240\r\n#define SCI_GETMARGINTYPEN 2241\r\n#define SCI_SETMARGINWIDTHN 2242\r\n#define SCI_GETMARGINWIDTHN 2243\r\n#define SCI_SETMARGINMASKN 2244\r\n#define SCI_GETMARGINMASKN 2245\r\n#define SCI_SETMARGINSENSITIVEN 2246\r\n#define SCI_GETMARGINSENSITIVEN 2247\r\n#define SCI_SETMARGINCURSORN 2248\r\n#define SCI_GETMARGINCURSORN 2249\r\n#define SCI_SETMARGINBACKN 2250\r\n#define SCI_GETMARGINBACKN 2251\r\n#define SCI_SETMARGINS 2252\r\n#define SCI_GETMARGINS 2253\r\n#define STYLE_DEFAULT 32\r\n#define STYLE_LINENUMBER 33\r\n#define STYLE_BRACELIGHT 34\r\n#define STYLE_BRACEBAD 35\r\n#define STYLE_CONTROLCHAR 36\r\n#define STYLE_INDENTGUIDE 37\r\n#define STYLE_CALLTIP 38\r\n#define STYLE_FOLDDISPLAYTEXT 39\r\n#define STYLE_LASTPREDEFINED 39\r\n#define STYLE_MAX 255\r\n#define SC_CHARSET_ANSI 0\r\n#define SC_CHARSET_DEFAULT 1\r\n#define SC_CHARSET_BALTIC 186\r\n#define SC_CHARSET_CHINESEBIG5 136\r\n#define SC_CHARSET_EASTEUROPE 238\r\n#define SC_CHARSET_GB2312 134\r\n#define SC_CHARSET_GREEK 161\r\n#define SC_CHARSET_HANGUL 129\r\n#define SC_CHARSET_MAC 77\r\n#define SC_CHARSET_OEM 255\r\n#define SC_CHARSET_RUSSIAN 204\r\n#define SC_CHARSET_OEM866 866\r\n#define SC_CHARSET_CYRILLIC 1251\r\n#define SC_CHARSET_SHIFTJIS 128\r\n#define SC_CHARSET_SYMBOL 2\r\n#define SC_CHARSET_TURKISH 162\r\n#define SC_CHARSET_JOHAB 130\r\n#define SC_CHARSET_HEBREW 177\r\n#define SC_CHARSET_ARABIC 178\r\n#define SC_CHARSET_VIETNAMESE 163\r\n#define SC_CHARSET_THAI 222\r\n#define SC_CHARSET_8859_15 1000\r\n#define SCI_STYLECLEARALL 2050\r\n#define SCI_STYLESETFORE 2051\r\n#define SCI_STYLESETBACK 2052\r\n#define SCI_STYLESETBOLD 2053\r\n#define SCI_STYLESETITALIC 2054\r\n#define SCI_STYLESETSIZE 2055\r\n#define SCI_STYLESETFONT 2056\r\n#define SCI_STYLESETEOLFILLED 2057\r\n#define SCI_STYLERESETDEFAULT 2058\r\n#define SCI_STYLESETUNDERLINE 2059\r\n#define SC_CASE_MIXED 0\r\n#define SC_CASE_UPPER 1\r\n#define SC_CASE_LOWER 2\r\n#define SC_CASE_CAMEL 3\r\n#define SCI_STYLEGETFORE 2481\r\n#define SCI_STYLEGETBACK 2482\r\n#define SCI_STYLEGETBOLD 2483\r\n#define SCI_STYLEGETITALIC 2484\r\n#define SCI_STYLEGETSIZE 2485\r\n#define SCI_STYLEGETFONT 2486\r\n#define SCI_STYLEGETEOLFILLED 2487\r\n#define SCI_STYLEGETUNDERLINE 2488\r\n#define SCI_STYLEGETCASE 2489\r\n#define SCI_STYLEGETCHARACTERSET 2490\r\n#define SCI_STYLEGETVISIBLE 2491\r\n#define SCI_STYLEGETCHANGEABLE 2492\r\n#define SCI_STYLEGETHOTSPOT 2493\r\n#define SCI_STYLESETCASE 2060\r\n#define SC_FONT_SIZE_MULTIPLIER 100\r\n#define SCI_STYLESETSIZEFRACTIONAL 2061\r\n#define SCI_STYLEGETSIZEFRACTIONAL 2062\r\n#define SC_WEIGHT_NORMAL 400\r\n#define SC_WEIGHT_SEMIBOLD 600\r\n#define SC_WEIGHT_BOLD 700\r\n#define SCI_STYLESETWEIGHT 2063\r\n#define SCI_STYLEGETWEIGHT 2064\r\n#define SCI_STYLESETCHARACTERSET 2066\r\n#define SCI_STYLESETHOTSPOT 2409\r\n#define SCI_STYLESETCHECKMONOSPACED 2254\r\n#define SCI_STYLEGETCHECKMONOSPACED 2255\r\n#define SCI_STYLESETINVISIBLEREPRESENTATION 2256\r\n#define SCI_STYLEGETINVISIBLEREPRESENTATION 2257\r\n#define SC_ELEMENT_LIST 0\r\n#define SC_ELEMENT_LIST_BACK 1\r\n#define SC_ELEMENT_LIST_SELECTED 2\r\n#define SC_ELEMENT_LIST_SELECTED_BACK 3\r\n#define SC_ELEMENT_SELECTION_TEXT 10\r\n#define SC_ELEMENT_SELECTION_BACK 11\r\n#define SC_ELEMENT_SELECTION_ADDITIONAL_TEXT 12\r\n#define SC_ELEMENT_SELECTION_ADDITIONAL_BACK 13\r\n#define SC_ELEMENT_SELECTION_SECONDARY_TEXT 14\r\n#define SC_ELEMENT_SELECTION_SECONDARY_BACK 15\r\n#define SC_ELEMENT_SELECTION_INACTIVE_TEXT 16\r\n#define SC_ELEMENT_SELECTION_INACTIVE_BACK 17\r\n#define SC_ELEMENT_SELECTION_INACTIVE_ADDITIONAL_TEXT 18\r\n#define SC_ELEMENT_SELECTION_INACTIVE_ADDITIONAL_BACK 19\r\n#define SC_ELEMENT_CARET 40\r\n#define SC_ELEMENT_CARET_ADDITIONAL 41\r\n#define SC_ELEMENT_CARET_LINE_BACK 50\r\n#define SC_ELEMENT_WHITE_SPACE 60\r\n#define SC_ELEMENT_WHITE_SPACE_BACK 61\r\n#define SC_ELEMENT_HOT_SPOT_ACTIVE 70\r\n#define SC_ELEMENT_HOT_SPOT_ACTIVE_BACK 71\r\n#define SC_ELEMENT_FOLD_LINE 80\r\n#define SC_ELEMENT_HIDDEN_LINE 81\r\n#define SCI_SETELEMENTCOLOUR 2753\r\n#define SCI_GETELEMENTCOLOUR 2754\r\n#define SCI_RESETELEMENTCOLOUR 2755\r\n#define SCI_GETELEMENTISSET 2756\r\n#define SCI_GETELEMENTALLOWSTRANSLUCENT 2757\r\n#define SCI_GETELEMENTBASECOLOUR 2758\r\n#define SCI_SETSELFORE 2067\r\n#define SCI_SETSELBACK 2068\r\n#define SCI_GETSELALPHA 2477\r\n#define SCI_SETSELALPHA 2478\r\n#define SCI_GETSELEOLFILLED 2479\r\n#define SCI_SETSELEOLFILLED 2480\r\n#define SC_LAYER_BASE 0\r\n#define SC_LAYER_UNDER_TEXT 1\r\n#define SC_LAYER_OVER_TEXT 2\r\n#define SCI_GETSELECTIONLAYER 2762\r\n#define SCI_SETSELECTIONLAYER 2763\r\n#define SCI_GETCARETLINELAYER 2764\r\n#define SCI_SETCARETLINELAYER 2765\r\n#define SCI_GETCARETLINEHIGHLIGHTSUBLINE 2773\r\n#define SCI_SETCARETLINEHIGHLIGHTSUBLINE 2774\r\n#define SCI_SETCARETFORE 2069\r\n#define SCI_ASSIGNCMDKEY 2070\r\n#define SCI_CLEARCMDKEY 2071\r\n#define SCI_CLEARALLCMDKEYS 2072\r\n#define SCI_SETSTYLINGEX 2073\r\n#define SCI_STYLESETVISIBLE 2074\r\n#define SCI_GETCARETPERIOD 2075\r\n#define SCI_SETCARETPERIOD 2076\r\n#define SCI_SETWORDCHARS 2077\r\n#define SCI_GETWORDCHARS 2646\r\n#define SCI_SETCHARACTERCATEGORYOPTIMIZATION 2720\r\n#define SCI_GETCHARACTERCATEGORYOPTIMIZATION 2721\r\n#define SCI_BEGINUNDOACTION 2078\r\n#define SCI_ENDUNDOACTION 2079\r\n#define SCI_GETUNDOACTIONS 2790\r\n#define SCI_SETUNDOSAVEPOINT 2791\r\n#define SCI_GETUNDOSAVEPOINT 2792\r\n#define SCI_SETUNDODETACH 2793\r\n#define SCI_GETUNDODETACH 2794\r\n#define SCI_SETUNDOTENTATIVE 2795\r\n#define SCI_GETUNDOTENTATIVE 2796\r\n#define SCI_SETUNDOCURRENT 2797\r\n#define SCI_GETUNDOCURRENT 2798\r\n#define SCI_PUSHUNDOACTIONTYPE 2800\r\n#define SCI_CHANGELASTUNDOACTIONTEXT 2801\r\n#define SCI_GETUNDOACTIONTYPE 2802\r\n#define SCI_GETUNDOACTIONPOSITION 2803\r\n#define SCI_GETUNDOACTIONTEXT 2804\r\n#define INDIC_PLAIN 0\r\n#define INDIC_SQUIGGLE 1\r\n#define INDIC_TT 2\r\n#define INDIC_DIAGONAL 3\r\n#define INDIC_STRIKE 4\r\n#define INDIC_HIDDEN 5\r\n#define INDIC_BOX 6\r\n#define INDIC_ROUNDBOX 7\r\n#define INDIC_STRAIGHTBOX 8\r\n#define INDIC_DASH 9\r\n#define INDIC_DOTS 10\r\n#define INDIC_SQUIGGLELOW 11\r\n#define INDIC_DOTBOX 12\r\n#define INDIC_SQUIGGLEPIXMAP 13\r\n#define INDIC_COMPOSITIONTHICK 14\r\n#define INDIC_COMPOSITIONTHIN 15\r\n#define INDIC_FULLBOX 16\r\n#define INDIC_TEXTFORE 17\r\n#define INDIC_POINT 18\r\n#define INDIC_POINTCHARACTER 19\r\n#define INDIC_GRADIENT 20\r\n#define INDIC_GRADIENTCENTRE 21\r\n#define INDIC_POINT_TOP 22\r\n#define INDIC_CONTAINER 8\r\n#define INDIC_IME 32\r\n#define INDIC_IME_MAX 35\r\n#define INDIC_MAX 35\r\n#define INDICATOR_CONTAINER 8\r\n#define INDICATOR_IME 32\r\n#define INDICATOR_IME_MAX 35\r\n#define INDICATOR_HISTORY_REVERTED_TO_ORIGIN_INSERTION 36\r\n#define INDICATOR_HISTORY_REVERTED_TO_ORIGIN_DELETION 37\r\n#define INDICATOR_HISTORY_SAVED_INSERTION 38\r\n#define INDICATOR_HISTORY_SAVED_DELETION 39\r\n#define INDICATOR_HISTORY_MODIFIED_INSERTION 40\r\n#define INDICATOR_HISTORY_MODIFIED_DELETION 41\r\n#define INDICATOR_HISTORY_REVERTED_TO_MODIFIED_INSERTION 42\r\n#define INDICATOR_HISTORY_REVERTED_TO_MODIFIED_DELETION 43\r\n#define INDICATOR_MAX 43\r\n#define SCI_INDICSETSTYLE 2080\r\n#define SCI_INDICGETSTYLE 2081\r\n#define SCI_INDICSETFORE 2082\r\n#define SCI_INDICGETFORE 2083\r\n#define SCI_INDICSETUNDER 2510\r\n#define SCI_INDICGETUNDER 2511\r\n#define SCI_INDICSETHOVERSTYLE 2680\r\n#define SCI_INDICGETHOVERSTYLE 2681\r\n#define SCI_INDICSETHOVERFORE 2682\r\n#define SCI_INDICGETHOVERFORE 2683\r\n#define SC_INDICVALUEBIT 0x1000000\r\n#define SC_INDICVALUEMASK 0xFFFFFF\r\n#define SC_INDICFLAG_NONE 0\r\n#define SC_INDICFLAG_VALUEFORE 1\r\n#define SCI_INDICSETFLAGS 2684\r\n#define SCI_INDICGETFLAGS 2685\r\n#define SCI_INDICSETSTROKEWIDTH 2751\r\n#define SCI_INDICGETSTROKEWIDTH 2752\r\n#define SCI_SETWHITESPACEFORE 2084\r\n#define SCI_SETWHITESPACEBACK 2085\r\n#define SCI_SETWHITESPACESIZE 2086\r\n#define SCI_GETWHITESPACESIZE 2087\r\n#define SCI_SETLINESTATE 2092\r\n#define SCI_GETLINESTATE 2093\r\n#define SCI_GETMAXLINESTATE 2094\r\n#define SCI_GETCARETLINEVISIBLE 2095\r\n#define SCI_SETCARETLINEVISIBLE 2096\r\n#define SCI_GETCARETLINEBACK 2097\r\n#define SCI_SETCARETLINEBACK 2098\r\n#define SCI_GETCARETLINEFRAME 2704\r\n#define SCI_SETCARETLINEFRAME 2705\r\n#define SCI_STYLESETCHANGEABLE 2099\r\n#define SCI_AUTOCSHOW 2100\r\n#define SCI_AUTOCCANCEL 2101\r\n#define SCI_AUTOCACTIVE 2102\r\n#define SCI_AUTOCPOSSTART 2103\r\n#define SCI_AUTOCCOMPLETE 2104\r\n#define SCI_AUTOCSTOPS 2105\r\n#define SCI_AUTOCSETSEPARATOR 2106\r\n#define SCI_AUTOCGETSEPARATOR 2107\r\n#define SCI_AUTOCSELECT 2108\r\n#define SCI_AUTOCSETCANCELATSTART 2110\r\n#define SCI_AUTOCGETCANCELATSTART 2111\r\n#define SCI_AUTOCSETFILLUPS 2112\r\n#define SCI_AUTOCSETCHOOSESINGLE 2113\r\n#define SCI_AUTOCGETCHOOSESINGLE 2114\r\n#define SCI_AUTOCSETIGNORECASE 2115\r\n#define SCI_AUTOCGETIGNORECASE 2116\r\n#define SCI_USERLISTSHOW 2117\r\n#define SCI_AUTOCSETAUTOHIDE 2118\r\n#define SCI_AUTOCGETAUTOHIDE 2119\r\n#define SC_AUTOCOMPLETE_NORMAL 0\r\n#define SC_AUTOCOMPLETE_FIXED_SIZE 1\r\n#define SC_AUTOCOMPLETE_SELECT_FIRST_ITEM 2\r\n#define SCI_AUTOCSETOPTIONS 2638\r\n#define SCI_AUTOCGETOPTIONS 2639\r\n#define SCI_AUTOCSETDROPRESTOFWORD 2270\r\n#define SCI_AUTOCGETDROPRESTOFWORD 2271\r\n#define SCI_REGISTERIMAGE 2405\r\n#define SCI_CLEARREGISTEREDIMAGES 2408\r\n#define SCI_AUTOCGETTYPESEPARATOR 2285\r\n#define SCI_AUTOCSETTYPESEPARATOR 2286\r\n#define SCI_AUTOCSETMAXWIDTH 2208\r\n#define SCI_AUTOCGETMAXWIDTH 2209\r\n#define SCI_AUTOCSETMAXHEIGHT 2210\r\n#define SCI_AUTOCGETMAXHEIGHT 2211\r\n#define SCI_SETINDENT 2122\r\n#define SCI_GETINDENT 2123\r\n#define SCI_SETUSETABS 2124\r\n#define SCI_GETUSETABS 2125\r\n#define SCI_SETLINEINDENTATION 2126\r\n#define SCI_GETLINEINDENTATION 2127\r\n#define SCI_GETLINEINDENTPOSITION 2128\r\n#define SCI_GETCOLUMN 2129\r\n#define SCI_COUNTCHARACTERS 2633\r\n#define SCI_COUNTCODEUNITS 2715\r\n#define SCI_SETHSCROLLBAR 2130\r\n#define SCI_GETHSCROLLBAR 2131\r\n#define SC_IV_NONE 0\r\n#define SC_IV_REAL 1\r\n#define SC_IV_LOOKFORWARD 2\r\n#define SC_IV_LOOKBOTH 3\r\n#define SCI_SETINDENTATIONGUIDES 2132\r\n#define SCI_GETINDENTATIONGUIDES 2133\r\n#define SCI_SETHIGHLIGHTGUIDE 2134\r\n#define SCI_GETHIGHLIGHTGUIDE 2135\r\n#define SCI_GETLINEENDPOSITION 2136\r\n#define SCI_GETCODEPAGE 2137\r\n#define SCI_GETCARETFORE 2138\r\n#define SCI_GETREADONLY 2140\r\n#define SCI_SETCURRENTPOS 2141\r\n#define SCI_SETSELECTIONSTART 2142\r\n#define SCI_GETSELECTIONSTART 2143\r\n#define SCI_SETSELECTIONEND 2144\r\n#define SCI_GETSELECTIONEND 2145\r\n#define SCI_SETEMPTYSELECTION 2556\r\n#define SCI_SETPRINTMAGNIFICATION 2146\r\n#define SCI_GETPRINTMAGNIFICATION 2147\r\n#define SC_PRINT_NORMAL 0\r\n#define SC_PRINT_INVERTLIGHT 1\r\n#define SC_PRINT_BLACKONWHITE 2\r\n#define SC_PRINT_COLOURONWHITE 3\r\n#define SC_PRINT_COLOURONWHITEDEFAULTBG 4\r\n#define SC_PRINT_SCREENCOLOURS 5\r\n#define SCI_SETPRINTCOLOURMODE 2148\r\n#define SCI_GETPRINTCOLOURMODE 2149\r\n#define SCFIND_NONE 0x0\r\n#define SCFIND_WHOLEWORD 0x2\r\n#define SCFIND_MATCHCASE 0x4\r\n#define SCFIND_WORDSTART 0x00100000\r\n#define SCFIND_REGEXP 0x00200000\r\n#define SCFIND_POSIX 0x00400000\r\n#define SCFIND_CXX11REGEX 0x00800000\r\n#define SCI_FINDTEXT 2150\r\n#define SCI_FINDTEXTFULL 2196\r\n#define SCI_FORMATRANGE 2151\r\n#define SCI_FORMATRANGEFULL 2777\r\n#define SC_CHANGE_HISTORY_DISABLED 0\r\n#define SC_CHANGE_HISTORY_ENABLED 1\r\n#define SC_CHANGE_HISTORY_MARKERS 2\r\n#define SC_CHANGE_HISTORY_INDICATORS 4\r\n#define SCI_SETCHANGEHISTORY 2780\r\n#define SCI_GETCHANGEHISTORY 2781\r\n#define SCI_GETFIRSTVISIBLELINE 2152\r\n#define SCI_GETLINE 2153\r\n#define SCI_GETLINECOUNT 2154\r\n#define SCI_ALLOCATELINES 2089\r\n#define SCI_SETMARGINLEFT 2155\r\n#define SCI_GETMARGINLEFT 2156\r\n#define SCI_SETMARGINRIGHT 2157\r\n#define SCI_GETMARGINRIGHT 2158\r\n#define SCI_GETMODIFY 2159\r\n#define SCI_SETSEL 2160\r\n#define SCI_GETSELTEXT 2161\r\n#define SCI_GETTEXTRANGE 2162\r\n#define SCI_GETTEXTRANGEFULL 2039\r\n#define SCI_HIDESELECTION 2163\r\n#define SCI_GETSELECTIONHIDDEN 2088\r\n#define SCI_POINTXFROMPOSITION 2164\r\n#define SCI_POINTYFROMPOSITION 2165\r\n#define SCI_LINEFROMPOSITION 2166\r\n#define SCI_POSITIONFROMLINE 2167\r\n#define SCI_LINESCROLL 2168\r\n#define SCI_SCROLLCARET 2169\r\n#define SCI_SCROLLRANGE 2569\r\n#define SCI_REPLACESEL 2170\r\n#define SCI_SETREADONLY 2171\r\n#define SCI_NULL 2172\r\n#define SCI_CANPASTE 2173\r\n#define SCI_CANUNDO 2174\r\n#define SCI_EMPTYUNDOBUFFER 2175\r\n#define SCI_UNDO 2176\r\n#define SCI_CUT 2177\r\n#define SCI_COPY 2178\r\n#define SCI_PASTE 2179\r\n#define SCI_CLEAR 2180\r\n#define SCI_SETTEXT 2181\r\n#define SCI_GETTEXT 2182\r\n#define SCI_GETTEXTLENGTH 2183\r\n#define SCI_GETDIRECTFUNCTION 2184\r\n#define SCI_GETDIRECTSTATUSFUNCTION 2772\r\n#define SCI_GETDIRECTPOINTER 2185\r\n#define SCI_SETOVERTYPE 2186\r\n#define SCI_GETOVERTYPE 2187\r\n#define SCI_SETCARETWIDTH 2188\r\n#define SCI_GETCARETWIDTH 2189\r\n#define SCI_SETTARGETSTART 2190\r\n#define SCI_GETTARGETSTART 2191\r\n#define SCI_SETTARGETSTARTVIRTUALSPACE 2728\r\n#define SCI_GETTARGETSTARTVIRTUALSPACE 2729\r\n#define SCI_SETTARGETEND 2192\r\n#define SCI_GETTARGETEND 2193\r\n#define SCI_SETTARGETENDVIRTUALSPACE 2730\r\n#define SCI_GETTARGETENDVIRTUALSPACE 2731\r\n#define SCI_SETTARGETRANGE 2686\r\n#define SCI_GETTARGETTEXT 2687\r\n#define SCI_TARGETFROMSELECTION 2287\r\n#define SCI_TARGETWHOLEDOCUMENT 2690\r\n#define SCI_REPLACETARGET 2194\r\n#define SCI_REPLACETARGETRE 2195\r\n#define SCI_REPLACETARGETMINIMAL 2779\r\n#define SCI_SEARCHINTARGET 2197\r\n#define SCI_SETSEARCHFLAGS 2198\r\n#define SCI_GETSEARCHFLAGS 2199\r\n#define SCI_CALLTIPSHOW 2200\r\n#define SCI_CALLTIPCANCEL 2201\r\n#define SCI_CALLTIPACTIVE 2202\r\n#define SCI_CALLTIPPOSSTART 2203\r\n#define SCI_CALLTIPSETPOSSTART 2214\r\n#define SCI_CALLTIPSETHLT 2204\r\n#define SCI_CALLTIPSETBACK 2205\r\n#define SCI_CALLTIPSETFORE 2206\r\n#define SCI_CALLTIPSETFOREHLT 2207\r\n#define SCI_CALLTIPUSESTYLE 2212\r\n#define SCI_CALLTIPSETPOSITION 2213\r\n#define SCI_VISIBLEFROMDOCLINE 2220\r\n#define SCI_DOCLINEFROMVISIBLE 2221\r\n#define SCI_WRAPCOUNT 2235\r\n#define SC_FOLDLEVELNONE 0x0\r\n#define SC_FOLDLEVELBASE 0x400\r\n#define SC_FOLDLEVELWHITEFLAG 0x1000\r\n#define SC_FOLDLEVELHEADERFLAG 0x2000\r\n#define SC_FOLDLEVELNUMBERMASK 0x0FFF\r\n#define SCI_SETFOLDLEVEL 2222\r\n#define SCI_GETFOLDLEVEL 2223\r\n#define SCI_GETLASTCHILD 2224\r\n#define SCI_GETFOLDPARENT 2225\r\n#define SCI_SHOWLINES 2226\r\n#define SCI_HIDELINES 2227\r\n#define SCI_GETLINEVISIBLE 2228\r\n#define SCI_GETALLLINESVISIBLE 2236\r\n#define SCI_SETFOLDEXPANDED 2229\r\n#define SCI_GETFOLDEXPANDED 2230\r\n#define SCI_TOGGLEFOLD 2231\r\n#define SCI_TOGGLEFOLDSHOWTEXT 2700\r\n#define SC_FOLDDISPLAYTEXT_HIDDEN 0\r\n#define SC_FOLDDISPLAYTEXT_STANDARD 1\r\n#define SC_FOLDDISPLAYTEXT_BOXED 2\r\n#define SCI_FOLDDISPLAYTEXTSETSTYLE 2701\r\n#define SCI_FOLDDISPLAYTEXTGETSTYLE 2707\r\n#define SCI_SETDEFAULTFOLDDISPLAYTEXT 2722\r\n#define SCI_GETDEFAULTFOLDDISPLAYTEXT 2723\r\n#define SC_FOLDACTION_CONTRACT 0\r\n#define SC_FOLDACTION_EXPAND 1\r\n#define SC_FOLDACTION_TOGGLE 2\r\n#define SC_FOLDACTION_CONTRACT_EVERY_LEVEL 4\r\n#define SCI_FOLDLINE 2237\r\n#define SCI_FOLDCHILDREN 2238\r\n#define SCI_EXPANDCHILDREN 2239\r\n#define SCI_FOLDALL 2662\r\n#define SCI_ENSUREVISIBLE 2232\r\n#define SC_AUTOMATICFOLD_NONE 0x0000\r\n#define SC_AUTOMATICFOLD_SHOW 0x0001\r\n#define SC_AUTOMATICFOLD_CLICK 0x0002\r\n#define SC_AUTOMATICFOLD_CHANGE 0x0004\r\n#define SCI_SETAUTOMATICFOLD 2663\r\n#define SCI_GETAUTOMATICFOLD 2664\r\n#define SC_FOLDFLAG_NONE 0x0000\r\n#define SC_FOLDFLAG_LINEBEFORE_EXPANDED 0x0002\r\n#define SC_FOLDFLAG_LINEBEFORE_CONTRACTED 0x0004\r\n#define SC_FOLDFLAG_LINEAFTER_EXPANDED 0x0008\r\n#define SC_FOLDFLAG_LINEAFTER_CONTRACTED 0x0010\r\n#define SC_FOLDFLAG_LEVELNUMBERS 0x0040\r\n#define SC_FOLDFLAG_LINESTATE 0x0080\r\n#define SCI_SETFOLDFLAGS 2233\r\n#define SCI_ENSUREVISIBLEENFORCEPOLICY 2234\r\n#define SCI_SETTABINDENTS 2260\r\n#define SCI_GETTABINDENTS 2261\r\n#define SCI_SETBACKSPACEUNINDENTS 2262\r\n#define SCI_GETBACKSPACEUNINDENTS 2263\r\n#define SC_TIME_FOREVER 10000000\r\n#define SCI_SETMOUSEDWELLTIME 2264\r\n#define SCI_GETMOUSEDWELLTIME 2265\r\n#define SCI_WORDSTARTPOSITION 2266\r\n#define SCI_WORDENDPOSITION 2267\r\n#define SCI_ISRANGEWORD 2691\r\n#define SC_IDLESTYLING_NONE 0\r\n#define SC_IDLESTYLING_TOVISIBLE 1\r\n#define SC_IDLESTYLING_AFTERVISIBLE 2\r\n#define SC_IDLESTYLING_ALL 3\r\n#define SCI_SETIDLESTYLING 2692\r\n#define SCI_GETIDLESTYLING 2693\r\n#define SC_WRAP_NONE 0\r\n#define SC_WRAP_WORD 1\r\n#define SC_WRAP_CHAR 2\r\n#define SC_WRAP_WHITESPACE 3\r\n#define SCI_SETWRAPMODE 2268\r\n#define SCI_GETWRAPMODE 2269\r\n#define SC_WRAPVISUALFLAG_NONE 0x0000\r\n#define SC_WRAPVISUALFLAG_END 0x0001\r\n#define SC_WRAPVISUALFLAG_START 0x0002\r\n#define SC_WRAPVISUALFLAG_MARGIN 0x0004\r\n#define SCI_SETWRAPVISUALFLAGS 2460\r\n#define SCI_GETWRAPVISUALFLAGS 2461\r\n#define SC_WRAPVISUALFLAGLOC_DEFAULT 0x0000\r\n#define SC_WRAPVISUALFLAGLOC_END_BY_TEXT 0x0001\r\n#define SC_WRAPVISUALFLAGLOC_START_BY_TEXT 0x0002\r\n#define SCI_SETWRAPVISUALFLAGSLOCATION 2462\r\n#define SCI_GETWRAPVISUALFLAGSLOCATION 2463\r\n#define SCI_SETWRAPSTARTINDENT 2464\r\n#define SCI_GETWRAPSTARTINDENT 2465\r\n#define SC_WRAPINDENT_FIXED 0\r\n#define SC_WRAPINDENT_SAME 1\r\n#define SC_WRAPINDENT_INDENT 2\r\n#define SC_WRAPINDENT_DEEPINDENT 3\r\n#define SCI_SETWRAPINDENTMODE 2472\r\n#define SCI_GETWRAPINDENTMODE 2473\r\n#define SC_CACHE_NONE 0\r\n#define SC_CACHE_CARET 1\r\n#define SC_CACHE_PAGE 2\r\n#define SC_CACHE_DOCUMENT 3\r\n#define SCI_SETLAYOUTCACHE 2272\r\n#define SCI_GETLAYOUTCACHE 2273\r\n#define SCI_SETSCROLLWIDTH 2274\r\n#define SCI_GETSCROLLWIDTH 2275\r\n#define SCI_SETSCROLLWIDTHTRACKING 2516\r\n#define SCI_GETSCROLLWIDTHTRACKING 2517\r\n#define SCI_TEXTWIDTH 2276\r\n#define SCI_SETENDATLASTLINE 2277\r\n#define SCI_GETENDATLASTLINE 2278\r\n#define SCI_TEXTHEIGHT 2279\r\n#define SCI_SETVSCROLLBAR 2280\r\n#define SCI_GETVSCROLLBAR 2281\r\n#define SCI_APPENDTEXT 2282\r\n#define SC_PHASES_ONE 0\r\n#define SC_PHASES_TWO 1\r\n#define SC_PHASES_MULTIPLE 2\r\n#define SCI_GETPHASESDRAW 2673\r\n#define SCI_SETPHASESDRAW 2674\r\n#define SC_EFF_QUALITY_MASK 0xF\r\n#define SC_EFF_QUALITY_DEFAULT 0\r\n#define SC_EFF_QUALITY_NON_ANTIALIASED 1\r\n#define SC_EFF_QUALITY_ANTIALIASED 2\r\n#define SC_EFF_QUALITY_LCD_OPTIMIZED 3\r\n#define SCI_SETFONTQUALITY 2611\r\n#define SCI_GETFONTQUALITY 2612\r\n#define SCI_SETFIRSTVISIBLELINE 2613\r\n#define SC_MULTIPASTE_ONCE 0\r\n#define SC_MULTIPASTE_EACH 1\r\n#define SCI_SETMULTIPASTE 2614\r\n#define SCI_GETMULTIPASTE 2615\r\n#define SCI_GETTAG 2616\r\n#define SCI_LINESJOIN 2288\r\n#define SCI_LINESSPLIT 2289\r\n#define SCI_SETFOLDMARGINCOLOUR 2290\r\n#define SCI_SETFOLDMARGINHICOLOUR 2291\r\n#define SC_ACCESSIBILITY_DISABLED 0\r\n#define SC_ACCESSIBILITY_ENABLED 1\r\n#define SCI_SETACCESSIBILITY 2702\r\n#define SCI_GETACCESSIBILITY 2703\r\n#define SCI_LINEDOWN 2300\r\n#define SCI_LINEDOWNEXTEND 2301\r\n#define SCI_LINEUP 2302\r\n#define SCI_LINEUPEXTEND 2303\r\n#define SCI_CHARLEFT 2304\r\n#define SCI_CHARLEFTEXTEND 2305\r\n#define SCI_CHARRIGHT 2306\r\n#define SCI_CHARRIGHTEXTEND 2307\r\n#define SCI_WORDLEFT 2308\r\n#define SCI_WORDLEFTEXTEND 2309\r\n#define SCI_WORDRIGHT 2310\r\n#define SCI_WORDRIGHTEXTEND 2311\r\n#define SCI_HOME 2312\r\n#define SCI_HOMEEXTEND 2313\r\n#define SCI_LINEEND 2314\r\n#define SCI_LINEENDEXTEND 2315\r\n#define SCI_DOCUMENTSTART 2316\r\n#define SCI_DOCUMENTSTARTEXTEND 2317\r\n#define SCI_DOCUMENTEND 2318\r\n#define SCI_DOCUMENTENDEXTEND 2319\r\n#define SCI_PAGEUP 2320\r\n#define SCI_PAGEUPEXTEND 2321\r\n#define SCI_PAGEDOWN 2322\r\n#define SCI_PAGEDOWNEXTEND 2323\r\n#define SCI_EDITTOGGLEOVERTYPE 2324\r\n#define SCI_CANCEL 2325\r\n#define SCI_DELETEBACK 2326\r\n#define SCI_TAB 2327\r\n#define SCI_BACKTAB 2328\r\n#define SCI_NEWLINE 2329\r\n#define SCI_FORMFEED 2330\r\n#define SCI_VCHOME 2331\r\n#define SCI_VCHOMEEXTEND 2332\r\n#define SCI_ZOOMIN 2333\r\n#define SCI_ZOOMOUT 2334\r\n#define SCI_DELWORDLEFT 2335\r\n#define SCI_DELWORDRIGHT 2336\r\n#define SCI_DELWORDRIGHTEND 2518\r\n#define SCI_LINECUT 2337\r\n#define SCI_LINEDELETE 2338\r\n#define SCI_LINETRANSPOSE 2339\r\n#define SCI_LINEREVERSE 2354\r\n#define SCI_LINEDUPLICATE 2404\r\n#define SCI_LOWERCASE 2340\r\n#define SCI_UPPERCASE 2341\r\n#define SCI_LINESCROLLDOWN 2342\r\n#define SCI_LINESCROLLUP 2343\r\n#define SCI_DELETEBACKNOTLINE 2344\r\n#define SCI_HOMEDISPLAY 2345\r\n#define SCI_HOMEDISPLAYEXTEND 2346\r\n#define SCI_LINEENDDISPLAY 2347\r\n#define SCI_LINEENDDISPLAYEXTEND 2348\r\n#define SCI_HOMEWRAP 2349\r\n#define SCI_HOMEWRAPEXTEND 2450\r\n#define SCI_LINEENDWRAP 2451\r\n#define SCI_LINEENDWRAPEXTEND 2452\r\n#define SCI_VCHOMEWRAP 2453\r\n#define SCI_VCHOMEWRAPEXTEND 2454\r\n#define SCI_LINECOPY 2455\r\n#define SCI_MOVECARETINSIDEVIEW 2401\r\n#define SCI_LINELENGTH 2350\r\n#define SCI_BRACEHIGHLIGHT 2351\r\n#define SCI_BRACEHIGHLIGHTINDICATOR 2498\r\n#define SCI_BRACEBADLIGHT 2352\r\n#define SCI_BRACEBADLIGHTINDICATOR 2499\r\n#define SCI_BRACEMATCH 2353\r\n#define SCI_BRACEMATCHNEXT 2369\r\n#define SCI_GETVIEWEOL 2355\r\n#define SCI_SETVIEWEOL 2356\r\n#define SCI_GETDOCPOINTER 2357\r\n#define SCI_SETDOCPOINTER 2358\r\n#define SCI_SETMODEVENTMASK 2359\r\n#define EDGE_NONE 0\r\n#define EDGE_LINE 1\r\n#define EDGE_BACKGROUND 2\r\n#define EDGE_MULTILINE 3\r\n#define SCI_GETEDGECOLUMN 2360\r\n#define SCI_SETEDGECOLUMN 2361\r\n#define SCI_GETEDGEMODE 2362\r\n#define SCI_SETEDGEMODE 2363\r\n#define SCI_GETEDGECOLOUR 2364\r\n#define SCI_SETEDGECOLOUR 2365\r\n#define SCI_MULTIEDGEADDLINE 2694\r\n#define SCI_MULTIEDGECLEARALL 2695\r\n#define SCI_GETMULTIEDGECOLUMN 2749\r\n#define SCI_SEARCHANCHOR 2366\r\n#define SCI_SEARCHNEXT 2367\r\n#define SCI_SEARCHPREV 2368\r\n#define SCI_LINESONSCREEN 2370\r\n#define SC_POPUP_NEVER 0\r\n#define SC_POPUP_ALL 1\r\n#define SC_POPUP_TEXT 2\r\n#define SCI_USEPOPUP 2371\r\n#define SCI_SELECTIONISRECTANGLE 2372\r\n#define SCI_SETZOOM 2373\r\n#define SCI_GETZOOM 2374\r\n#define SC_DOCUMENTOPTION_DEFAULT 0\r\n#define SC_DOCUMENTOPTION_STYLES_NONE 0x1\r\n#define SC_DOCUMENTOPTION_TEXT_LARGE 0x100\r\n#define SCI_CREATEDOCUMENT 2375\r\n#define SCI_ADDREFDOCUMENT 2376\r\n#define SCI_RELEASEDOCUMENT 2377\r\n#define SCI_GETDOCUMENTOPTIONS 2379\r\n#define SCI_GETMODEVENTMASK 2378\r\n#define SCI_SETCOMMANDEVENTS 2717\r\n#define SCI_GETCOMMANDEVENTS 2718\r\n#define SCI_SETFOCUS 2380\r\n#define SCI_GETFOCUS 2381\r\n#define SC_STATUS_OK 0\r\n#define SC_STATUS_FAILURE 1\r\n#define SC_STATUS_BADALLOC 2\r\n#define SC_STATUS_WARN_START 1000\r\n#define SC_STATUS_WARN_REGEX 1001\r\n#define SCI_SETSTATUS 2382\r\n#define SCI_GETSTATUS 2383\r\n#define SCI_SETMOUSEDOWNCAPTURES 2384\r\n#define SCI_GETMOUSEDOWNCAPTURES 2385\r\n#define SCI_SETMOUSEWHEELCAPTURES 2696\r\n#define SCI_GETMOUSEWHEELCAPTURES 2697\r\n#define SCI_SETCURSOR 2386\r\n#define SCI_GETCURSOR 2387\r\n#define SCI_SETCONTROLCHARSYMBOL 2388\r\n#define SCI_GETCONTROLCHARSYMBOL 2389\r\n#define SCI_WORDPARTLEFT 2390\r\n#define SCI_WORDPARTLEFTEXTEND 2391\r\n#define SCI_WORDPARTRIGHT 2392\r\n#define SCI_WORDPARTRIGHTEXTEND 2393\r\n#define VISIBLE_SLOP 0x01\r\n#define VISIBLE_STRICT 0x04\r\n#define SCI_SETVISIBLEPOLICY 2394\r\n#define SCI_DELLINELEFT 2395\r\n#define SCI_DELLINERIGHT 2396\r\n#define SCI_SETXOFFSET 2397\r\n#define SCI_GETXOFFSET 2398\r\n#define SCI_CHOOSECARETX 2399\r\n#define SCI_GRABFOCUS 2400\r\n#define CARET_SLOP 0x01\r\n#define CARET_STRICT 0x04\r\n#define CARET_JUMPS 0x10\r\n#define CARET_EVEN 0x08\r\n#define SCI_SETXCARETPOLICY 2402\r\n#define SCI_SETYCARETPOLICY 2403\r\n#define SCI_SETPRINTWRAPMODE 2406\r\n#define SCI_GETPRINTWRAPMODE 2407\r\n#define SCI_SETHOTSPOTACTIVEFORE 2410\r\n#define SCI_GETHOTSPOTACTIVEFORE 2494\r\n#define SCI_SETHOTSPOTACTIVEBACK 2411\r\n#define SCI_GETHOTSPOTACTIVEBACK 2495\r\n#define SCI_SETHOTSPOTACTIVEUNDERLINE 2412\r\n#define SCI_GETHOTSPOTACTIVEUNDERLINE 2496\r\n#define SCI_SETHOTSPOTSINGLELINE 2421\r\n#define SCI_GETHOTSPOTSINGLELINE 2497\r\n#define SCI_PARADOWN 2413\r\n#define SCI_PARADOWNEXTEND 2414\r\n#define SCI_PARAUP 2415\r\n#define SCI_PARAUPEXTEND 2416\r\n#define SCI_POSITIONBEFORE 2417\r\n#define SCI_POSITIONAFTER 2418\r\n#define SCI_POSITIONRELATIVE 2670\r\n#define SCI_POSITIONRELATIVECODEUNITS 2716\r\n#define SCI_COPYRANGE 2419\r\n#define SCI_COPYTEXT 2420\r\n#define SC_SEL_STREAM 0\r\n#define SC_SEL_RECTANGLE 1\r\n#define SC_SEL_LINES 2\r\n#define SC_SEL_THIN 3\r\n#define SCI_SETSELECTIONMODE 2422\r\n#define SCI_CHANGESELECTIONMODE 2659\r\n#define SCI_GETSELECTIONMODE 2423\r\n#define SCI_SETMOVEEXTENDSSELECTION 2719\r\n#define SCI_GETMOVEEXTENDSSELECTION 2706\r\n#define SCI_GETLINESELSTARTPOSITION 2424\r\n#define SCI_GETLINESELENDPOSITION 2425\r\n#define SCI_LINEDOWNRECTEXTEND 2426\r\n#define SCI_LINEUPRECTEXTEND 2427\r\n#define SCI_CHARLEFTRECTEXTEND 2428\r\n#define SCI_CHARRIGHTRECTEXTEND 2429\r\n#define SCI_HOMERECTEXTEND 2430\r\n#define SCI_VCHOMERECTEXTEND 2431\r\n#define SCI_LINEENDRECTEXTEND 2432\r\n#define SCI_PAGEUPRECTEXTEND 2433\r\n#define SCI_PAGEDOWNRECTEXTEND 2434\r\n#define SCI_STUTTEREDPAGEUP 2435\r\n#define SCI_STUTTEREDPAGEUPEXTEND 2436\r\n#define SCI_STUTTEREDPAGEDOWN 2437\r\n#define SCI_STUTTEREDPAGEDOWNEXTEND 2438\r\n#define SCI_WORDLEFTEND 2439\r\n#define SCI_WORDLEFTENDEXTEND 2440\r\n#define SCI_WORDRIGHTEND 2441\r\n#define SCI_WORDRIGHTENDEXTEND 2442\r\n#define SCI_SETWHITESPACECHARS 2443\r\n#define SCI_GETWHITESPACECHARS 2647\r\n#define SCI_SETPUNCTUATIONCHARS 2648\r\n#define SCI_GETPUNCTUATIONCHARS 2649\r\n#define SCI_SETCHARSDEFAULT 2444\r\n#define SCI_AUTOCGETCURRENT 2445\r\n#define SCI_AUTOCGETCURRENTTEXT 2610\r\n#define SC_CASEINSENSITIVEBEHAVIOUR_RESPECTCASE 0\r\n#define SC_CASEINSENSITIVEBEHAVIOUR_IGNORECASE 1\r\n#define SCI_AUTOCSETCASEINSENSITIVEBEHAVIOUR 2634\r\n#define SCI_AUTOCGETCASEINSENSITIVEBEHAVIOUR 2635\r\n#define SC_MULTIAUTOC_ONCE 0\r\n#define SC_MULTIAUTOC_EACH 1\r\n#define SCI_AUTOCSETMULTI 2636\r\n#define SCI_AUTOCGETMULTI 2637\r\n#define SC_ORDER_PRESORTED 0\r\n#define SC_ORDER_PERFORMSORT 1\r\n#define SC_ORDER_CUSTOM 2\r\n#define SCI_AUTOCSETORDER 2660\r\n#define SCI_AUTOCGETORDER 2661\r\n#define SCI_ALLOCATE 2446\r\n#define SCI_TARGETASUTF8 2447\r\n#define SCI_SETLENGTHFORENCODE 2448\r\n#define SCI_ENCODEDFROMUTF8 2449\r\n#define SCI_FINDCOLUMN 2456\r\n#define SC_CARETSTICKY_OFF 0\r\n#define SC_CARETSTICKY_ON 1\r\n#define SC_CARETSTICKY_WHITESPACE 2\r\n#define SCI_GETCARETSTICKY 2457\r\n#define SCI_SETCARETSTICKY 2458\r\n#define SCI_TOGGLECARETSTICKY 2459\r\n#define SCI_SETPASTECONVERTENDINGS 2467\r\n#define SCI_GETPASTECONVERTENDINGS 2468\r\n#define SCI_REPLACERECTANGULAR 2771\r\n#define SCI_SELECTIONDUPLICATE 2469\r\n#define SCI_SETCARETLINEBACKALPHA 2470\r\n#define SCI_GETCARETLINEBACKALPHA 2471\r\n#define CARETSTYLE_INVISIBLE 0\r\n#define CARETSTYLE_LINE 1\r\n#define CARETSTYLE_BLOCK 2\r\n#define CARETSTYLE_OVERSTRIKE_BAR 0\r\n#define CARETSTYLE_OVERSTRIKE_BLOCK 0x10\r\n#define CARETSTYLE_CURSES 0x20\r\n#define CARETSTYLE_INS_MASK 0xF\r\n#define CARETSTYLE_BLOCK_AFTER 0x100\r\n#define SCI_SETCARETSTYLE 2512\r\n#define SCI_GETCARETSTYLE 2513\r\n#define SCI_SETINDICATORCURRENT 2500\r\n#define SCI_GETINDICATORCURRENT 2501\r\n#define SCI_SETINDICATORVALUE 2502\r\n#define SCI_GETINDICATORVALUE 2503\r\n#define SCI_INDICATORFILLRANGE 2504\r\n#define SCI_INDICATORCLEARRANGE 2505\r\n#define SCI_INDICATORALLONFOR 2506\r\n#define SCI_INDICATORVALUEAT 2507\r\n#define SCI_INDICATORSTART 2508\r\n#define SCI_INDICATOREND 2509\r\n#define SCI_SETPOSITIONCACHE 2514\r\n#define SCI_GETPOSITIONCACHE 2515\r\n#define SCI_SETLAYOUTTHREADS 2775\r\n#define SCI_GETLAYOUTTHREADS 2776\r\n#define SCI_COPYALLOWLINE 2519\r\n#define SCI_GETCHARACTERPOINTER 2520\r\n#define SCI_GETRANGEPOINTER 2643\r\n#define SCI_GETGAPPOSITION 2644\r\n#define SCI_INDICSETALPHA 2523\r\n#define SCI_INDICGETALPHA 2524\r\n#define SCI_INDICSETOUTLINEALPHA 2558\r\n#define SCI_INDICGETOUTLINEALPHA 2559\r\n#define SCI_SETEXTRAASCENT 2525\r\n#define SCI_GETEXTRAASCENT 2526\r\n#define SCI_SETEXTRADESCENT 2527\r\n#define SCI_GETEXTRADESCENT 2528\r\n#define SCI_MARKERSYMBOLDEFINED 2529\r\n#define SCI_MARGINSETTEXT 2530\r\n#define SCI_MARGINGETTEXT 2531\r\n#define SCI_MARGINSETSTYLE 2532\r\n#define SCI_MARGINGETSTYLE 2533\r\n#define SCI_MARGINSETSTYLES 2534\r\n#define SCI_MARGINGETSTYLES 2535\r\n#define SCI_MARGINTEXTCLEARALL 2536\r\n#define SCI_MARGINSETSTYLEOFFSET 2537\r\n#define SCI_MARGINGETSTYLEOFFSET 2538\r\n#define SC_MARGINOPTION_NONE 0\r\n#define SC_MARGINOPTION_SUBLINESELECT 1\r\n#define SCI_SETMARGINOPTIONS 2539\r\n#define SCI_GETMARGINOPTIONS 2557\r\n#define SCI_ANNOTATIONSETTEXT 2540\r\n#define SCI_ANNOTATIONGETTEXT 2541\r\n#define SCI_ANNOTATIONSETSTYLE 2542\r\n#define SCI_ANNOTATIONGETSTYLE 2543\r\n#define SCI_ANNOTATIONSETSTYLES 2544\r\n#define SCI_ANNOTATIONGETSTYLES 2545\r\n#define SCI_ANNOTATIONGETLINES 2546\r\n#define SCI_ANNOTATIONCLEARALL 2547\r\n#define ANNOTATION_HIDDEN 0\r\n#define ANNOTATION_STANDARD 1\r\n#define ANNOTATION_BOXED 2\r\n#define ANNOTATION_INDENTED 3\r\n#define SCI_ANNOTATIONSETVISIBLE 2548\r\n#define SCI_ANNOTATIONGETVISIBLE 2549\r\n#define SCI_ANNOTATIONSETSTYLEOFFSET 2550\r\n#define SCI_ANNOTATIONGETSTYLEOFFSET 2551\r\n#define SCI_RELEASEALLEXTENDEDSTYLES 2552\r\n#define SCI_ALLOCATEEXTENDEDSTYLES 2553\r\n#define UNDO_NONE 0\r\n#define UNDO_MAY_COALESCE 1\r\n#define SCI_ADDUNDOACTION 2560\r\n#define SCI_CHARPOSITIONFROMPOINT 2561\r\n#define SCI_CHARPOSITIONFROMPOINTCLOSE 2562\r\n#define SCI_SETMOUSESELECTIONRECTANGULARSWITCH 2668\r\n#define SCI_GETMOUSESELECTIONRECTANGULARSWITCH 2669\r\n#define SCI_SETMULTIPLESELECTION 2563\r\n#define SCI_GETMULTIPLESELECTION 2564\r\n#define SCI_SETADDITIONALSELECTIONTYPING 2565\r\n#define SCI_GETADDITIONALSELECTIONTYPING 2566\r\n#define SCI_SETADDITIONALCARETSBLINK 2567\r\n#define SCI_GETADDITIONALCARETSBLINK 2568\r\n#define SCI_SETADDITIONALCARETSVISIBLE 2608\r\n#define SCI_GETADDITIONALCARETSVISIBLE 2609\r\n#define SCI_GETSELECTIONS 2570\r\n#define SCI_GETSELECTIONEMPTY 2650\r\n#define SCI_CLEARSELECTIONS 2571\r\n#define SCI_SETSELECTION 2572\r\n#define SCI_ADDSELECTION 2573\r\n#define SCI_SELECTIONFROMPOINT 2474\r\n#define SCI_DROPSELECTIONN 2671\r\n#define SCI_SETMAINSELECTION 2574\r\n#define SCI_GETMAINSELECTION 2575\r\n#define SCI_SETSELECTIONNCARET 2576\r\n#define SCI_GETSELECTIONNCARET 2577\r\n#define SCI_SETSELECTIONNANCHOR 2578\r\n#define SCI_GETSELECTIONNANCHOR 2579\r\n#define SCI_SETSELECTIONNCARETVIRTUALSPACE 2580\r\n#define SCI_GETSELECTIONNCARETVIRTUALSPACE 2581\r\n#define SCI_SETSELECTIONNANCHORVIRTUALSPACE 2582\r\n#define SCI_GETSELECTIONNANCHORVIRTUALSPACE 2583\r\n#define SCI_SETSELECTIONNSTART 2584\r\n#define SCI_GETSELECTIONNSTART 2585\r\n#define SCI_GETSELECTIONNSTARTVIRTUALSPACE 2726\r\n#define SCI_SETSELECTIONNEND 2586\r\n#define SCI_GETSELECTIONNENDVIRTUALSPACE 2727\r\n#define SCI_GETSELECTIONNEND 2587\r\n#define SCI_SETRECTANGULARSELECTIONCARET 2588\r\n#define SCI_GETRECTANGULARSELECTIONCARET 2589\r\n#define SCI_SETRECTANGULARSELECTIONANCHOR 2590\r\n#define SCI_GETRECTANGULARSELECTIONANCHOR 2591\r\n#define SCI_SETRECTANGULARSELECTIONCARETVIRTUALSPACE 2592\r\n#define SCI_GETRECTANGULARSELECTIONCARETVIRTUALSPACE 2593\r\n#define SCI_SETRECTANGULARSELECTIONANCHORVIRTUALSPACE 2594\r\n#define SCI_GETRECTANGULARSELECTIONANCHORVIRTUALSPACE 2595\r\n#define SCVS_NONE 0\r\n#define SCVS_RECTANGULARSELECTION 1\r\n#define SCVS_USERACCESSIBLE 2\r\n#define SCVS_NOWRAPLINESTART 4\r\n#define SCI_SETVIRTUALSPACEOPTIONS 2596\r\n#define SCI_GETVIRTUALSPACEOPTIONS 2597\r\n#define SCI_SETRECTANGULARSELECTIONMODIFIER 2598\r\n#define SCI_GETRECTANGULARSELECTIONMODIFIER 2599\r\n#define SCI_SETADDITIONALSELFORE 2600\r\n#define SCI_SETADDITIONALSELBACK 2601\r\n#define SCI_SETADDITIONALSELALPHA 2602\r\n#define SCI_GETADDITIONALSELALPHA 2603\r\n#define SCI_SETADDITIONALCARETFORE 2604\r\n#define SCI_GETADDITIONALCARETFORE 2605\r\n#define SCI_ROTATESELECTION 2606\r\n#define SCI_SWAPMAINANCHORCARET 2607\r\n#define SCI_MULTIPLESELECTADDNEXT 2688\r\n#define SCI_MULTIPLESELECTADDEACH 2689\r\n#define SCI_CHANGELEXERSTATE 2617\r\n#define SCI_CONTRACTEDFOLDNEXT 2618\r\n#define SCI_VERTICALCENTRECARET 2619\r\n#define SCI_MOVESELECTEDLINESUP 2620\r\n#define SCI_MOVESELECTEDLINESDOWN 2621\r\n#define SCI_SETIDENTIFIER 2622\r\n#define SCI_GETIDENTIFIER 2623\r\n#define SCI_RGBAIMAGESETWIDTH 2624\r\n#define SCI_RGBAIMAGESETHEIGHT 2625\r\n#define SCI_RGBAIMAGESETSCALE 2651\r\n#define SCI_MARKERDEFINERGBAIMAGE 2626\r\n#define SCI_REGISTERRGBAIMAGE 2627\r\n#define SCI_SCROLLTOSTART 2628\r\n#define SCI_SCROLLTOEND 2629\r\n#define SC_TECHNOLOGY_DEFAULT 0\r\n#define SC_TECHNOLOGY_DIRECTWRITE 1\r\n#define SC_TECHNOLOGY_DIRECTWRITERETAIN 2\r\n#define SC_TECHNOLOGY_DIRECTWRITEDC 3\r\n#define SCI_SETTECHNOLOGY 2630\r\n#define SCI_GETTECHNOLOGY 2631\r\n#define SCI_CREATELOADER 2632\r\n#define SCI_FINDINDICATORSHOW 2640\r\n#define SCI_FINDINDICATORFLASH 2641\r\n#define SCI_FINDINDICATORHIDE 2642\r\n#define SCI_VCHOMEDISPLAY 2652\r\n#define SCI_VCHOMEDISPLAYEXTEND 2653\r\n#define SCI_GETCARETLINEVISIBLEALWAYS 2654\r\n#define SCI_SETCARETLINEVISIBLEALWAYS 2655\r\n#define SC_LINE_END_TYPE_DEFAULT 0\r\n#define SC_LINE_END_TYPE_UNICODE 1\r\n#define SCI_SETLINEENDTYPESALLOWED 2656\r\n#define SCI_GETLINEENDTYPESALLOWED 2657\r\n#define SCI_GETLINEENDTYPESACTIVE 2658\r\n#define SCI_SETREPRESENTATION 2665\r\n#define SCI_GETREPRESENTATION 2666\r\n#define SCI_CLEARREPRESENTATION 2667\r\n#define SCI_CLEARALLREPRESENTATIONS 2770\r\n#define SC_REPRESENTATION_PLAIN 0\r\n#define SC_REPRESENTATION_BLOB 1\r\n#define SC_REPRESENTATION_COLOUR 0x10\r\n#define SCI_SETREPRESENTATIONAPPEARANCE 2766\r\n#define SCI_GETREPRESENTATIONAPPEARANCE 2767\r\n#define SCI_SETREPRESENTATIONCOLOUR 2768\r\n#define SCI_GETREPRESENTATIONCOLOUR 2769\r\n#define SCI_EOLANNOTATIONSETTEXT 2740\r\n#define SCI_EOLANNOTATIONGETTEXT 2741\r\n#define SCI_EOLANNOTATIONSETSTYLE 2742\r\n#define SCI_EOLANNOTATIONGETSTYLE 2743\r\n#define SCI_EOLANNOTATIONCLEARALL 2744\r\n#define EOLANNOTATION_HIDDEN 0x0\r\n#define EOLANNOTATION_STANDARD 0x1\r\n#define EOLANNOTATION_BOXED 0x2\r\n#define EOLANNOTATION_STADIUM 0x100\r\n#define EOLANNOTATION_FLAT_CIRCLE 0x101\r\n#define EOLANNOTATION_ANGLE_CIRCLE 0x102\r\n#define EOLANNOTATION_CIRCLE_FLAT 0x110\r\n#define EOLANNOTATION_FLATS 0x111\r\n#define EOLANNOTATION_ANGLE_FLAT 0x112\r\n#define EOLANNOTATION_CIRCLE_ANGLE 0x120\r\n#define EOLANNOTATION_FLAT_ANGLE 0x121\r\n#define EOLANNOTATION_ANGLES 0x122\r\n#define SCI_EOLANNOTATIONSETVISIBLE 2745\r\n#define SCI_EOLANNOTATIONGETVISIBLE 2746\r\n#define SCI_EOLANNOTATIONSETSTYLEOFFSET 2747\r\n#define SCI_EOLANNOTATIONGETSTYLEOFFSET 2748\r\n#define SC_SUPPORTS_LINE_DRAWS_FINAL 0\r\n#define SC_SUPPORTS_PIXEL_DIVISIONS 1\r\n#define SC_SUPPORTS_FRACTIONAL_STROKE_WIDTH 2\r\n#define SC_SUPPORTS_TRANSLUCENT_STROKE 3\r\n#define SC_SUPPORTS_PIXEL_MODIFICATION 4\r\n#define SC_SUPPORTS_THREAD_SAFE_MEASURE_WIDTHS 5\r\n#define SCI_SUPPORTSFEATURE 2750\r\n#define SC_LINECHARACTERINDEX_NONE 0\r\n#define SC_LINECHARACTERINDEX_UTF32 1\r\n#define SC_LINECHARACTERINDEX_UTF16 2\r\n#define SCI_GETLINECHARACTERINDEX 2710\r\n#define SCI_ALLOCATELINECHARACTERINDEX 2711\r\n#define SCI_RELEASELINECHARACTERINDEX 2712\r\n#define SCI_LINEFROMINDEXPOSITION 2713\r\n#define SCI_INDEXPOSITIONFROMLINE 2714\r\n#define SCI_STARTRECORD 3001\r\n#define SCI_STOPRECORD 3002\r\n#define SCI_GETLEXER 4002\r\n#define SCI_COLOURISE 4003\r\n#define SCI_SETPROPERTY 4004\r\n#define KEYWORDSET_MAX 8\r\n#define SCI_SETKEYWORDS 4005\r\n#define SCI_GETPROPERTY 4008\r\n#define SCI_GETPROPERTYEXPANDED 4009\r\n#define SCI_GETPROPERTYINT 4010\r\n#define SCI_GETLEXERLANGUAGE 4012\r\n#define SCI_PRIVATELEXERCALL 4013\r\n#define SCI_PROPERTYNAMES 4014\r\n#define SC_TYPE_BOOLEAN 0\r\n#define SC_TYPE_INTEGER 1\r\n#define SC_TYPE_STRING 2\r\n#define SCI_PROPERTYTYPE 4015\r\n#define SCI_DESCRIBEPROPERTY 4016\r\n#define SCI_DESCRIBEKEYWORDSETS 4017\r\n#define SCI_GETLINEENDTYPESSUPPORTED 4018\r\n#define SCI_ALLOCATESUBSTYLES 4020\r\n#define SCI_GETSUBSTYLESSTART 4021\r\n#define SCI_GETSUBSTYLESLENGTH 4022\r\n#define SCI_GETSTYLEFROMSUBSTYLE 4027\r\n#define SCI_GETPRIMARYSTYLEFROMSTYLE 4028\r\n#define SCI_FREESUBSTYLES 4023\r\n#define SCI_SETIDENTIFIERS 4024\r\n#define SCI_DISTANCETOSECONDARYSTYLES 4025\r\n#define SCI_GETSUBSTYLEBASES 4026\r\n#define SCI_GETNAMEDSTYLES 4029\r\n#define SCI_NAMEOFSTYLE 4030\r\n#define SCI_TAGSOFSTYLE 4031\r\n#define SCI_DESCRIPTIONOFSTYLE 4032\r\n#define SCI_SETILEXER 4033\r\n#define SC_MOD_NONE 0x0\r\n#define SC_MOD_INSERTTEXT 0x1\r\n#define SC_MOD_DELETETEXT 0x2\r\n#define SC_MOD_CHANGESTYLE 0x4\r\n#define SC_MOD_CHANGEFOLD 0x8\r\n#define SC_PERFORMED_USER 0x10\r\n#define SC_PERFORMED_UNDO 0x20\r\n#define SC_PERFORMED_REDO 0x40\r\n#define SC_MULTISTEPUNDOREDO 0x80\r\n#define SC_LASTSTEPINUNDOREDO 0x100\r\n#define SC_MOD_CHANGEMARKER 0x200\r\n#define SC_MOD_BEFOREINSERT 0x400\r\n#define SC_MOD_BEFOREDELETE 0x800\r\n#define SC_MULTILINEUNDOREDO 0x1000\r\n#define SC_STARTACTION 0x2000\r\n#define SC_MOD_CHANGEINDICATOR 0x4000\r\n#define SC_MOD_CHANGELINESTATE 0x8000\r\n#define SC_MOD_CHANGEMARGIN 0x10000\r\n#define SC_MOD_CHANGEANNOTATION 0x20000\r\n#define SC_MOD_CONTAINER 0x40000\r\n#define SC_MOD_LEXERSTATE 0x80000\r\n#define SC_MOD_INSERTCHECK 0x100000\r\n#define SC_MOD_CHANGETABSTOPS 0x200000\r\n#define SC_MOD_CHANGEEOLANNOTATION 0x400000\r\n#define SC_MODEVENTMASKALL 0x7FFFFF\r\n#define SC_UPDATE_NONE 0x0\r\n#define SC_UPDATE_CONTENT 0x1\r\n#define SC_UPDATE_SELECTION 0x2\r\n#define SC_UPDATE_V_SCROLL 0x4\r\n#define SC_UPDATE_H_SCROLL 0x8\r\n#define SCEN_CHANGE 768\r\n#define SCEN_SETFOCUS 512\r\n#define SCEN_KILLFOCUS 256\r\n#define SCK_DOWN 300\r\n#define SCK_UP 301\r\n#define SCK_LEFT 302\r\n#define SCK_RIGHT 303\r\n#define SCK_HOME 304\r\n#define SCK_END 305\r\n#define SCK_PRIOR 306\r\n#define SCK_NEXT 307\r\n#define SCK_DELETE 308\r\n#define SCK_INSERT 309\r\n#define SCK_ESCAPE 7\r\n#define SCK_BACK 8\r\n#define SCK_TAB 9\r\n#define SCK_RETURN 13\r\n#define SCK_ADD 310\r\n#define SCK_SUBTRACT 311\r\n#define SCK_DIVIDE 312\r\n#define SCK_WIN 313\r\n#define SCK_RWIN 314\r\n#define SCK_MENU 315\r\n#define SCMOD_NORM 0\r\n#define SCMOD_SHIFT 1\r\n#define SCMOD_CTRL 2\r\n#define SCMOD_ALT 4\r\n#define SCMOD_SUPER 8\r\n#define SCMOD_META 16\r\n#define SC_AC_FILLUP 1\r\n#define SC_AC_DOUBLECLICK 2\r\n#define SC_AC_TAB 3\r\n#define SC_AC_NEWLINE 4\r\n#define SC_AC_COMMAND 5\r\n#define SC_AC_SINGLE_CHOICE 6\r\n#define SC_CHARACTERSOURCE_DIRECT_INPUT 0\r\n#define SC_CHARACTERSOURCE_TENTATIVE_INPUT 1\r\n#define SC_CHARACTERSOURCE_IME_RESULT 2\r\n#define SCN_STYLENEEDED 2000\r\n#define SCN_CHARADDED 2001\r\n#define SCN_SAVEPOINTREACHED 2002\r\n#define SCN_SAVEPOINTLEFT 2003\r\n#define SCN_MODIFYATTEMPTRO 2004\r\n#define SCN_KEY 2005\r\n#define SCN_DOUBLECLICK 2006\r\n#define SCN_UPDATEUI 2007\r\n#define SCN_MODIFIED 2008\r\n#define SCN_MACRORECORD 2009\r\n#define SCN_MARGINCLICK 2010\r\n#define SCN_NEEDSHOWN 2011\r\n#define SCN_PAINTED 2013\r\n#define SCN_USERLISTSELECTION 2014\r\n#define SCN_URIDROPPED 2015\r\n#define SCN_DWELLSTART 2016\r\n#define SCN_DWELLEND 2017\r\n#define SCN_ZOOM 2018\r\n#define SCN_HOTSPOTCLICK 2019\r\n#define SCN_HOTSPOTDOUBLECLICK 2020\r\n#define SCN_CALLTIPCLICK 2021\r\n#define SCN_AUTOCSELECTION 2022\r\n#define SCN_INDICATORCLICK 2023\r\n#define SCN_INDICATORRELEASE 2024\r\n#define SCN_AUTOCCANCELLED 2025\r\n#define SCN_AUTOCCHARDELETED 2026\r\n#define SCN_HOTSPOTRELEASECLICK 2027\r\n#define SCN_FOCUSIN 2028\r\n#define SCN_FOCUSOUT 2029\r\n#define SCN_AUTOCCOMPLETED 2030\r\n#define SCN_MARGINRIGHTCLICK 2031\r\n#define SCN_AUTOCSELECTIONCHANGE 2032\r\n#ifndef SCI_DISABLE_PROVISIONAL\r\n#define SC_BIDIRECTIONAL_DISABLED 0\r\n#define SC_BIDIRECTIONAL_L2R 1\r\n#define SC_BIDIRECTIONAL_R2L 2\r\n#define SCI_GETBIDIRECTIONAL 2708\r\n#define SCI_SETBIDIRECTIONAL 2709\r\n#endif\r\n/* --Autogenerated -- end of section automatically generated from Scintilla.iface */\r\n\r\n#endif\r\n\r\n/* These structures are defined to be exactly the same shape as the Win32\r\n * CHARRANGE, TEXTRANGE, FINDTEXTEX, FORMATRANGE, and NMHDR structs.\r\n * So older code that treats Scintilla as a RichEdit will work. */\r\n\r\nstruct Sci_CharacterRange {\r\n\tSci_PositionCR cpMin;\r\n\tSci_PositionCR cpMax;\r\n};\r\n\r\nstruct Sci_CharacterRangeFull {\r\n\tSci_Position cpMin;\r\n\tSci_Position cpMax;\r\n};\r\n\r\nstruct Sci_TextRange {\r\n\tstruct Sci_CharacterRange chrg;\r\n\tchar *lpstrText;\r\n};\r\n\r\nstruct Sci_TextRangeFull {\r\n\tstruct Sci_CharacterRangeFull chrg;\r\n\tchar *lpstrText;\r\n};\r\n\r\nstruct Sci_TextToFind {\r\n\tstruct Sci_CharacterRange chrg;\r\n\tconst char *lpstrText;\r\n\tstruct Sci_CharacterRange chrgText;\r\n};\r\n\r\nstruct Sci_TextToFindFull {\r\n\tstruct Sci_CharacterRangeFull chrg;\r\n\tconst char *lpstrText;\r\n\tstruct Sci_CharacterRangeFull chrgText;\r\n};\r\n\r\ntypedef void *Sci_SurfaceID;\r\n\r\nstruct Sci_Rectangle {\r\n\tint left;\r\n\tint top;\r\n\tint right;\r\n\tint bottom;\r\n};\r\n\r\n/* This structure is used in printing and requires some of the graphics types\r\n * from Platform.h.  Not needed by most client code. */\r\n\r\nstruct Sci_RangeToFormat {\r\n\tSci_SurfaceID hdc;\r\n\tSci_SurfaceID hdcTarget;\r\n\tstruct Sci_Rectangle rc;\r\n\tstruct Sci_Rectangle rcPage;\r\n\tstruct Sci_CharacterRange chrg;\r\n};\r\n\r\nstruct Sci_RangeToFormatFull {\r\n\tSci_SurfaceID hdc;\r\n\tSci_SurfaceID hdcTarget;\r\n\tstruct Sci_Rectangle rc;\r\n\tstruct Sci_Rectangle rcPage;\r\n\tstruct Sci_CharacterRangeFull chrg;\r\n};\r\n\r\n#ifndef __cplusplus\r\n/* For the GTK+ platform, g-ir-scanner needs to have these typedefs. This\r\n * is not required in C++ code and actually seems to break ScintillaEditPy */\r\ntypedef struct Sci_NotifyHeader Sci_NotifyHeader;\r\ntypedef struct SCNotification SCNotification;\r\n#endif\r\n\r\nstruct Sci_NotifyHeader {\r\n\t/* Compatible with Windows NMHDR.\r\n\t * hwndFrom is really an environment specific window handle or pointer\r\n\t * but most clients of Scintilla.h do not have this type visible. */\r\n\tvoid *hwndFrom;\r\n\tuptr_t idFrom;\r\n\tunsigned int code;\r\n};\r\n\r\nstruct SCNotification {\r\n\tSci_NotifyHeader nmhdr;\r\n\tSci_Position position;\r\n\t/* SCN_STYLENEEDED, SCN_DOUBLECLICK, SCN_MODIFIED, SCN_MARGINCLICK, */\r\n\t/* SCN_NEEDSHOWN, SCN_DWELLSTART, SCN_DWELLEND, SCN_CALLTIPCLICK, */\r\n\t/* SCN_HOTSPOTCLICK, SCN_HOTSPOTDOUBLECLICK, SCN_HOTSPOTRELEASECLICK, */\r\n\t/* SCN_INDICATORCLICK, SCN_INDICATORRELEASE, */\r\n\t/* SCN_USERLISTSELECTION, SCN_AUTOCSELECTION */\r\n\r\n\tint ch;\r\n\t/* SCN_CHARADDED, SCN_KEY, SCN_AUTOCCOMPLETED, SCN_AUTOCSELECTION, */\r\n\t/* SCN_USERLISTSELECTION */\r\n\tint modifiers;\r\n\t/* SCN_KEY, SCN_DOUBLECLICK, SCN_HOTSPOTCLICK, SCN_HOTSPOTDOUBLECLICK, */\r\n\t/* SCN_HOTSPOTRELEASECLICK, SCN_INDICATORCLICK, SCN_INDICATORRELEASE, */\r\n\r\n\tint modificationType;\t/* SCN_MODIFIED */\r\n\tconst char *text;\r\n\t/* SCN_MODIFIED, SCN_USERLISTSELECTION, SCN_AUTOCSELECTION, SCN_URIDROPPED */\r\n\r\n\tSci_Position length;\t\t/* SCN_MODIFIED */\r\n\tSci_Position linesAdded;\t/* SCN_MODIFIED */\r\n\tint message;\t/* SCN_MACRORECORD */\r\n\tuptr_t wParam;\t/* SCN_MACRORECORD */\r\n\tsptr_t lParam;\t/* SCN_MACRORECORD */\r\n\tSci_Position line;\t\t/* SCN_MODIFIED */\r\n\tint foldLevelNow;\t/* SCN_MODIFIED */\r\n\tint foldLevelPrev;\t/* SCN_MODIFIED */\r\n\tint margin;\t\t/* SCN_MARGINCLICK */\r\n\tint listType;\t/* SCN_USERLISTSELECTION */\r\n\tint x;\t\t\t/* SCN_DWELLSTART, SCN_DWELLEND */\r\n\tint y;\t\t/* SCN_DWELLSTART, SCN_DWELLEND */\r\n\tint token;\t\t/* SCN_MODIFIED with SC_MOD_CONTAINER */\r\n\tSci_Position annotationLinesAdded;\t/* SCN_MODIFIED with SC_MOD_CHANGEANNOTATION */\r\n\tint updated;\t/* SCN_UPDATEUI */\r\n\tint listCompletionMethod;\r\n\t/* SCN_AUTOCSELECTION, SCN_AUTOCCOMPLETED, SCN_USERLISTSELECTION, */\r\n\tint characterSource;\t/* SCN_CHARADDED */\r\n};\r\n\r\n#ifdef INCLUDE_DEPRECATED_FEATURES\r\n\r\n#define SCI_SETKEYSUNICODE 2521\r\n#define SCI_GETKEYSUNICODE 2522\r\n\r\n#define SCI_GETTWOPHASEDRAW 2283\r\n#define SCI_SETTWOPHASEDRAW 2284\r\n\r\n#define CharacterRange Sci_CharacterRange\r\n#define TextRange Sci_TextRange\r\n#define TextToFind Sci_TextToFind\r\n#define RangeToFormat Sci_RangeToFormat\r\n#define NotifyHeader Sci_NotifyHeader\r\n\r\n#define SCI_SETSTYLEBITS 2090\r\n#define SCI_GETSTYLEBITS 2091\r\n#define SCI_GETSTYLEBITSNEEDED 4011\r\n\r\n#define INDIC0_MASK 0x20\r\n#define INDIC1_MASK 0x40\r\n#define INDIC2_MASK 0x80\r\n#define INDICS_MASK 0xE0\r\n\r\n#endif\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/include/Scintilla.iface",
    "content": "## First line may be used for shbang\r\n\r\n## This file defines the interface to Scintilla\r\n\r\n## Copyright 2000-2003 by Neil Hodgson <neilh@scintilla.org>\r\n## The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n## A line starting with ## is a pure comment and should be stripped by readers.\r\n## A line starting with #! is for future shbang use\r\n## A line starting with # followed by a space is a documentation comment and refers\r\n## to the next feature definition.\r\n\r\n## Each feature is defined by a line starting with fun, get, set, val, evt, enu, lex, or ali.\r\n##     cat -> start a category\r\n##     fun -> a function\r\n##     get -> a property get function\r\n##     set -> a property set function\r\n##     val -> definition of a constant\r\n##     evt -> an event\r\n##     enu -> associate an enumeration with a set of vals with a prefix\r\n##     lex -> associate a lexer with the lexical classes it produces\r\n##     ali -> add an alias for a val, commonly adding '_' to separate words\r\n##\r\n## All other feature names should be ignored. They may be defined in the future.\r\n## A property may have a set function, a get function or both. Each will have\r\n## \"Get\" or \"Set\" in their names and the corresponding name will have the obvious switch.\r\n## A property may be subscripted, in which case the first parameter is the subscript.\r\n## fun, get, and set features have a strict syntax:\r\n## <featureType><ws><returnType><ws><name>[=<number](<param>,<param>)\r\n## where <ws> stands for white space.\r\n## param may be empty (null value) or is <paramType><ws><paramName>[=<value>]\r\n## Additional white space is allowed between elements.\r\n## The syntax for evt is <featureType><ws><returnType><ws><name>[=<number]([<param>[,<param>]*])\r\n## Feature names that contain an underscore are defined by Windows, so in these\r\n## cases, using the Windows definition is preferred where available.\r\n## The feature numbers are stable so features will not be renumbered.\r\n## Features may be removed but they will go through a period of deprecation\r\n## before removal which is signalled by moving them into the Deprecated category.\r\n##\r\n## enu has the syntax enu<ws><enumeration>=<prefix>[<ws><prefix>]* where all the val\r\n## features in this file starting with a given <prefix> are considered part of the\r\n## enumeration.\r\n##\r\n## lex has the syntax lex<ws><name>=<lexerVal><ws><prefix>[<ws><prefix>]*\r\n## where name is a reasonably capitalised (Python, XML) identifier or UI name,\r\n## lexerVal is the val used to specify the lexer, and the list of prefixes is similar\r\n## to enu. The name may not be the same as that used within the lexer so the lexerVal\r\n## should be used to tie these entities together.\r\n\r\n## Types: Never start with a capital letter\r\n##     void\r\n##     int\r\n##     bool -> integer, 1=true, 0=false\r\n##     position -> intptr_t position in a document\r\n##     line -> intptr_t line in a document\r\n##     colour -> colour integer containing red, green, and blue bytes with red as least-significant and blue as most.\r\n##     colouralpha -> colour integer containing red, green, blue, and alpha bytes with red as least-significant and alpha as most.\r\n##     string -> pointer to const character\r\n##     stringresult -> pointer to character, NULL-> return size of result\r\n##     cells -> pointer to array of cells, each cell containing a style byte and character byte\r\n##     pointer -> void* pointer that may point to a document, loader, internal text storage or similar\r\n##     textrange -> range of a min and a max position with an output string\r\n##     textrangefull -> range of a min and a max position with an output string - supports 64-bit\r\n##     findtext -> searchrange, text -> foundposition\r\n##     findtextfull -> searchrange, text -> foundposition\r\n##     keymod -> integer containing key in low half and modifiers in high half\r\n##     formatrange\r\n##     formatrangefull\r\n## Enumeration types always start with a capital letter\r\n## Types no longer used:\r\n##     findtextex -> searchrange\r\n##     charrange -> range of a min and a max position\r\n##     charrangeresult -> like charrange, but output param\r\n##     countedstring\r\n##     point -> x,y\r\n##     pointresult  -> like point, but output param\r\n##     rectangle -> left,top,right,bottom\r\n## Client code should ignore definitions containing types it does not understand, except\r\n## for possibly #defining the constants\r\n\r\n## Line numbers and positions start at 0.\r\n## String arguments may contain NUL ('\\0') characters where the calls provide a length\r\n## argument and retrieve NUL characters. APIs marked as NUL-terminated also have a\r\n## NUL appended but client code should calculate the size that will be returned rather\r\n## than relying upon the NUL whenever possible. Allow for the extra NUL character when\r\n## allocating buffers. The size to allocate for a stringresult (not including NUL) can be\r\n## determined by calling with a NULL (0) pointer.\r\n\r\ncat Basics\r\n\r\n################################################\r\n## For Scintilla.h\r\nval INVALID_POSITION=-1\r\n# Define start of Scintilla messages to be greater than all Windows edit (EM_*) messages\r\n# as many EM_ messages can be used although that use is deprecated.\r\nval SCI_START=2000\r\nval SCI_OPTIONAL_START=3000\r\nval SCI_LEXER_START=4000\r\n\r\n# Add text to the document at current position.\r\nfun void AddText=2001(position length, string text)\r\n\r\n# Add array of cells to document.\r\nfun void AddStyledText=2002(position length, cells c)\r\n\r\n# Insert string at a position.\r\nfun void InsertText=2003(position pos, string text)\r\n\r\n# Change the text that is being inserted in response to SC_MOD_INSERTCHECK\r\nfun void ChangeInsertion=2672(position length, string text)\r\n\r\n# Delete all text in the document.\r\nfun void ClearAll=2004(,)\r\n\r\n# Delete a range of text in the document.\r\nfun void DeleteRange=2645(position start, position lengthDelete)\r\n\r\n# Set all style bytes to 0, remove all folding information.\r\nfun void ClearDocumentStyle=2005(,)\r\n\r\n# Returns the number of bytes in the document.\r\nget position GetLength=2006(,)\r\n\r\n# Returns the character byte at the position.\r\nget int GetCharAt=2007(position pos,)\r\n\r\n# Returns the position of the caret.\r\nget position GetCurrentPos=2008(,)\r\n\r\n# Returns the position of the opposite end of the selection to the caret.\r\nget position GetAnchor=2009(,)\r\n\r\n# Returns the style byte at the position.\r\nget int GetStyleAt=2010(position pos,)\r\n\r\n# Returns the unsigned style byte at the position.\r\nget int GetStyleIndexAt=2038(position pos,)\r\n\r\n# Redoes the next action on the undo history.\r\nfun void Redo=2011(,)\r\n\r\n# Choose between collecting actions into the undo\r\n# history and discarding them.\r\nset void SetUndoCollection=2012(bool collectUndo,)\r\n\r\n# Select all the text in the document.\r\nfun void SelectAll=2013(,)\r\n\r\n# Remember the current position in the undo history as the position\r\n# at which the document was saved.\r\nfun void SetSavePoint=2014(,)\r\n\r\n# Retrieve a buffer of cells.\r\n# Returns the number of bytes in the buffer not including terminating NULs.\r\nfun position GetStyledText=2015(, textrange tr)\r\n\r\n# Retrieve a buffer of cells that can be past 2GB.\r\n# Returns the number of bytes in the buffer not including terminating NULs.\r\nfun position GetStyledTextFull=2778(, textrangefull tr)\r\n\r\n# Are there any redoable actions in the undo history?\r\nfun bool CanRedo=2016(,)\r\n\r\n# Retrieve the line number at which a particular marker is located.\r\nfun line MarkerLineFromHandle=2017(int markerHandle,)\r\n\r\n# Delete a marker.\r\nfun void MarkerDeleteHandle=2018(int markerHandle,)\r\n\r\n# Retrieve marker handles of a line\r\nfun int MarkerHandleFromLine=2732(line line, int which)\r\n\r\n# Retrieve marker number of a marker handle\r\nfun int MarkerNumberFromLine=2733(line line, int which)\r\n\r\n# Is undo history being collected?\r\nget bool GetUndoCollection=2019(,)\r\n\r\nenu WhiteSpace=SCWS_\r\nval SCWS_INVISIBLE=0\r\nval SCWS_VISIBLEALWAYS=1\r\nval SCWS_VISIBLEAFTERINDENT=2\r\nval SCWS_VISIBLEONLYININDENT=3\r\n\r\nali SCWS_VISIBLEALWAYS=VISIBLE_ALWAYS\r\nali SCWS_VISIBLEAFTERINDENT=VISIBLE_AFTER_INDENT\r\nali SCWS_VISIBLEONLYININDENT=VISIBLE_ONLY_IN_INDENT\r\n\r\n# Are white space characters currently visible?\r\n# Returns one of SCWS_* constants.\r\nget WhiteSpace GetViewWS=2020(,)\r\n\r\n# Make white space characters invisible, always visible or visible outside indentation.\r\nset void SetViewWS=2021(WhiteSpace viewWS,)\r\n\r\nenu TabDrawMode=SCTD_\r\nval SCTD_LONGARROW=0\r\nval SCTD_STRIKEOUT=1\r\n\r\nali SCTD_LONGARROW=LONG_ARROW\r\nali SCTD_STRIKEOUT=STRIKE_OUT\r\n\r\n# Retrieve the current tab draw mode.\r\n# Returns one of SCTD_* constants.\r\nget TabDrawMode GetTabDrawMode=2698(,)\r\n\r\n# Set how tabs are drawn when visible.\r\nset void SetTabDrawMode=2699(TabDrawMode tabDrawMode,)\r\n\r\n# Find the position from a point within the window.\r\nfun position PositionFromPoint=2022(int x, int y)\r\n\r\n# Find the position from a point within the window but return\r\n# INVALID_POSITION if not close to text.\r\nfun position PositionFromPointClose=2023(int x, int y)\r\n\r\n# Set caret to start of a line and ensure it is visible.\r\nfun void GotoLine=2024(line line,)\r\n\r\n# Set caret to a position and ensure it is visible.\r\nfun void GotoPos=2025(position caret,)\r\n\r\n# Set the selection anchor to a position. The anchor is the opposite\r\n# end of the selection from the caret.\r\nset void SetAnchor=2026(position anchor,)\r\n\r\n# Retrieve the text of the line containing the caret.\r\n# Returns the index of the caret on the line.\r\n# Result is NUL-terminated.\r\nfun position GetCurLine=2027(position length, stringresult text)\r\n\r\n# Retrieve the position of the last correctly styled character.\r\nget position GetEndStyled=2028(,)\r\n\r\nenu EndOfLine=SC_EOL_\r\nval SC_EOL_CRLF=0\r\nval SC_EOL_CR=1\r\nval SC_EOL_LF=2\r\n\r\nali SC_EOL_CRLF=CR_LF\r\n\r\n# Convert all line endings in the document to one mode.\r\nfun void ConvertEOLs=2029(EndOfLine eolMode,)\r\n\r\n# Retrieve the current end of line mode - one of CRLF, CR, or LF.\r\nget EndOfLine GetEOLMode=2030(,)\r\n\r\n# Set the current end of line mode.\r\nset void SetEOLMode=2031(EndOfLine eolMode,)\r\n\r\n# Set the current styling position to start.\r\n# The unused parameter is no longer used and should be set to 0.\r\nfun void StartStyling=2032(position start, int unused)\r\n\r\n# Change style from current styling position for length characters to a style\r\n# and move the current styling position to after this newly styled segment.\r\nfun void SetStyling=2033(position length, int style)\r\n\r\n# Is drawing done first into a buffer or direct to the screen?\r\nget bool GetBufferedDraw=2034(,)\r\n\r\n# If drawing is buffered then each line of text is drawn into a bitmap buffer\r\n# before drawing it to the screen to avoid flicker.\r\nset void SetBufferedDraw=2035(bool buffered,)\r\n\r\n# Change the visible size of a tab to be a multiple of the width of a space character.\r\nset void SetTabWidth=2036(int tabWidth,)\r\n\r\n# Retrieve the visible size of a tab.\r\nget int GetTabWidth=2121(,)\r\n\r\n# Set the minimum visual width of a tab.\r\nset void SetTabMinimumWidth=2724(int pixels,)\r\n\r\n# Get the minimum visual width of a tab.\r\nget int GetTabMinimumWidth=2725(,)\r\n\r\n# Clear explicit tabstops on a line.\r\nfun void ClearTabStops=2675(line line,)\r\n\r\n# Add an explicit tab stop for a line.\r\nfun void AddTabStop=2676(line line, int x)\r\n\r\n# Find the next explicit tab stop position on a line after a position.\r\nfun int GetNextTabStop=2677(line line, int x)\r\n\r\n# The SC_CP_UTF8 value can be used to enter Unicode mode.\r\n# This is the same value as CP_UTF8 in Windows\r\nval SC_CP_UTF8=65001\r\n\r\n# Set the code page used to interpret the bytes of the document as characters.\r\n# The SC_CP_UTF8 value can be used to enter Unicode mode.\r\nset void SetCodePage=2037(int codePage,)\r\n\r\n# Set the locale for displaying text.\r\nset void SetFontLocale=2760(, string localeName)\r\n\r\n# Get the locale for displaying text.\r\nget int GetFontLocale=2761(, stringresult localeName)\r\n\r\nenu IMEInteraction=SC_IME_\r\nval SC_IME_WINDOWED=0\r\nval SC_IME_INLINE=1\r\n\r\n# Is the IME displayed in a window or inline?\r\nget IMEInteraction GetIMEInteraction=2678(,)\r\n\r\n# Choose to display the IME in a window or inline.\r\nset void SetIMEInteraction=2679(IMEInteraction imeInteraction,)\r\n\r\nenu Alpha=SC_ALPHA_\r\nval SC_ALPHA_TRANSPARENT=0\r\nval SC_ALPHA_OPAQUE=255\r\nval SC_ALPHA_NOALPHA=256\r\n\r\nali SC_ALPHA_NOALPHA=NO_ALPHA\r\n\r\nenu CursorShape=SC_CURSOR\r\nval SC_CURSORNORMAL=-1\r\nval SC_CURSORARROW=2\r\nval SC_CURSORWAIT=4\r\nval SC_CURSORREVERSEARROW=7\r\n\r\nali SC_CURSORREVERSEARROW=REVERSE_ARROW\r\n\r\nenu MarkerSymbol=SC_MARK_\r\nval MARKER_MAX=31\r\nval SC_MARK_CIRCLE=0\r\nval SC_MARK_ROUNDRECT=1\r\nval SC_MARK_ARROW=2\r\nval SC_MARK_SMALLRECT=3\r\nval SC_MARK_SHORTARROW=4\r\nval SC_MARK_EMPTY=5\r\nval SC_MARK_ARROWDOWN=6\r\nval SC_MARK_MINUS=7\r\nval SC_MARK_PLUS=8\r\n\r\n# Shapes used for outlining column.\r\nval SC_MARK_VLINE=9\r\nval SC_MARK_LCORNER=10\r\nval SC_MARK_TCORNER=11\r\nval SC_MARK_BOXPLUS=12\r\nval SC_MARK_BOXPLUSCONNECTED=13\r\nval SC_MARK_BOXMINUS=14\r\nval SC_MARK_BOXMINUSCONNECTED=15\r\nval SC_MARK_LCORNERCURVE=16\r\nval SC_MARK_TCORNERCURVE=17\r\nval SC_MARK_CIRCLEPLUS=18\r\nval SC_MARK_CIRCLEPLUSCONNECTED=19\r\nval SC_MARK_CIRCLEMINUS=20\r\nval SC_MARK_CIRCLEMINUSCONNECTED=21\r\n\r\n# Invisible mark that only sets the line background colour.\r\nval SC_MARK_BACKGROUND=22\r\nval SC_MARK_DOTDOTDOT=23\r\nval SC_MARK_ARROWS=24\r\nval SC_MARK_PIXMAP=25\r\nval SC_MARK_FULLRECT=26\r\nval SC_MARK_LEFTRECT=27\r\nval SC_MARK_AVAILABLE=28\r\nval SC_MARK_UNDERLINE=29\r\nval SC_MARK_RGBAIMAGE=30\r\nval SC_MARK_BOOKMARK=31\r\nval SC_MARK_VERTICALBOOKMARK=32\r\nval SC_MARK_BAR=33\r\n\r\nval SC_MARK_CHARACTER=10000\r\n\r\nali SC_MARK_ROUNDRECT=ROUND_RECT\r\nali SC_MARK_SMALLRECT=SMALL_RECT\r\nali SC_MARK_SHORTARROW=SHORT_ARROW\r\nali SC_MARK_ARROWDOWN=ARROW_DOWN\r\nali SC_MARK_VLINE=V_LINE\r\nali SC_MARK_LCORNER=L_CORNER\r\nali SC_MARK_TCORNER=T_CORNER\r\nali SC_MARK_BOXPLUS=BOX_PLUS\r\nali SC_MARK_BOXPLUSCONNECTED=BOX_PLUS_CONNECTED\r\nali SC_MARK_BOXMINUS=BOX_MINUS\r\nali SC_MARK_BOXMINUSCONNECTED=BOX_MINUS_CONNECTED\r\nali SC_MARK_LCORNERCURVE=L_CORNER_CURVE\r\nali SC_MARK_TCORNERCURVE=T_CORNER_CURVE\r\nali SC_MARK_CIRCLEPLUS=CIRCLE_PLUS\r\nali SC_MARK_CIRCLEPLUSCONNECTED=CIRCLE_PLUS_CONNECTED\r\nali SC_MARK_CIRCLEMINUS=CIRCLE_MINUS\r\nali SC_MARK_CIRCLEMINUSCONNECTED=CIRCLE_MINUS_CONNECTED\r\nali SC_MARK_DOTDOTDOT=DOT_DOT_DOT\r\nali SC_MARK_FULLRECT=FULL_RECT\r\nali SC_MARK_LEFTRECT=LEFT_RECT\r\nali SC_MARK_RGBAIMAGE=RGBA_IMAGE\r\nali SC_MARK_VERTICALBOOKMARK=VERTICAL_BOOKMARK\r\n\r\nenu MarkerOutline=SC_MARKNUM_\r\n# Markers used for outlining and change history columns.\r\nval SC_MARKNUM_HISTORY_REVERTED_TO_ORIGIN=21\r\nval SC_MARKNUM_HISTORY_SAVED=22\r\nval SC_MARKNUM_HISTORY_MODIFIED=23\r\nval SC_MARKNUM_HISTORY_REVERTED_TO_MODIFIED=24\r\nval SC_MARKNUM_FOLDEREND=25\r\nval SC_MARKNUM_FOLDEROPENMID=26\r\nval SC_MARKNUM_FOLDERMIDTAIL=27\r\nval SC_MARKNUM_FOLDERTAIL=28\r\nval SC_MARKNUM_FOLDERSUB=29\r\nval SC_MARKNUM_FOLDER=30\r\nval SC_MARKNUM_FOLDEROPEN=31\r\n\r\nali SC_MARKNUM_FOLDEREND=FOLDER_END\r\nali SC_MARKNUM_FOLDEROPENMID=FOLDER_OPEN_MID\r\nali SC_MARKNUM_FOLDERMIDTAIL=FOLDER_MID_TAIL\r\nali SC_MARKNUM_FOLDERTAIL=FOLDER_TAIL\r\nali SC_MARKNUM_FOLDERSUB=FOLDER_SUB\r\nali SC_MARKNUM_FOLDEROPEN=FOLDER_OPEN\r\n\r\n# SC_MASK_FOLDERS doesn't go in an enumeration as larger than max 32-bit positive integer\r\nval SC_MASK_FOLDERS=0xFE000000\r\n\r\n# Set the symbol used for a particular marker number.\r\nfun void MarkerDefine=2040(int markerNumber, MarkerSymbol markerSymbol)\r\n\r\n# Set the foreground colour used for a particular marker number.\r\nset void MarkerSetFore=2041(int markerNumber, colour fore)\r\n\r\n# Set the background colour used for a particular marker number.\r\nset void MarkerSetBack=2042(int markerNumber, colour back)\r\n\r\n# Set the background colour used for a particular marker number when its folding block is selected.\r\nset void MarkerSetBackSelected=2292(int markerNumber, colour back)\r\n\r\n# Set the foreground colour used for a particular marker number.\r\nset void MarkerSetForeTranslucent=2294(int markerNumber, colouralpha fore)\r\n\r\n# Set the background colour used for a particular marker number.\r\nset void MarkerSetBackTranslucent=2295(int markerNumber, colouralpha back)\r\n\r\n# Set the background colour used for a particular marker number when its folding block is selected.\r\nset void MarkerSetBackSelectedTranslucent=2296(int markerNumber, colouralpha back)\r\n\r\n# Set the width of strokes used in .01 pixels so 50  = 1/2 pixel width.\r\nset void MarkerSetStrokeWidth=2297(int markerNumber, int hundredths)\r\n\r\n# Enable/disable highlight for current folding block (smallest one that contains the caret)\r\nfun void MarkerEnableHighlight=2293(bool enabled,)\r\n\r\n# Add a marker to a line, returning an ID which can be used to find or delete the marker.\r\nfun int MarkerAdd=2043(line line, int markerNumber)\r\n\r\n# Delete a marker from a line.\r\nfun void MarkerDelete=2044(line line, int markerNumber)\r\n\r\n# Delete all markers with a particular number from all lines.\r\nfun void MarkerDeleteAll=2045(int markerNumber,)\r\n\r\n# Get a bit mask of all the markers set on a line.\r\nfun int MarkerGet=2046(line line,)\r\n\r\n# Find the next line at or after lineStart that includes a marker in mask.\r\n# Return -1 when no more lines.\r\nfun line MarkerNext=2047(line lineStart, int markerMask)\r\n\r\n# Find the previous line before lineStart that includes a marker in mask.\r\nfun line MarkerPrevious=2048(line lineStart, int markerMask)\r\n\r\n# Define a marker from a pixmap.\r\nfun void MarkerDefinePixmap=2049(int markerNumber, string pixmap)\r\n\r\n# Add a set of markers to a line.\r\nfun void MarkerAddSet=2466(line line, int markerSet)\r\n\r\n# Set the alpha used for a marker that is drawn in the text area, not the margin.\r\nset void MarkerSetAlpha=2476(int markerNumber, Alpha alpha)\r\n\r\n# Get the layer used for a marker that is drawn in the text area, not the margin.\r\nget Layer MarkerGetLayer=2734(int markerNumber,)\r\n\r\n# Set the layer used for a marker that is drawn in the text area, not the margin.\r\nset void MarkerSetLayer=2735(int markerNumber, Layer layer)\r\n\r\nval SC_MAX_MARGIN=4\r\n\r\nenu MarginType=SC_MARGIN_\r\nval SC_MARGIN_SYMBOL=0\r\nval SC_MARGIN_NUMBER=1\r\nval SC_MARGIN_BACK=2\r\nval SC_MARGIN_FORE=3\r\nval SC_MARGIN_TEXT=4\r\nval SC_MARGIN_RTEXT=5\r\nval SC_MARGIN_COLOUR=6\r\n\r\nali SC_MARGIN_RTEXT=R_TEXT\r\n\r\n# Set a margin to be either numeric or symbolic.\r\nset void SetMarginTypeN=2240(int margin, MarginType marginType)\r\n\r\n# Retrieve the type of a margin.\r\nget MarginType GetMarginTypeN=2241(int margin,)\r\n\r\n# Set the width of a margin to a width expressed in pixels.\r\nset void SetMarginWidthN=2242(int margin, int pixelWidth)\r\n\r\n# Retrieve the width of a margin in pixels.\r\nget int GetMarginWidthN=2243(int margin,)\r\n\r\n# Set a mask that determines which markers are displayed in a margin.\r\nset void SetMarginMaskN=2244(int margin, int mask)\r\n\r\n# Retrieve the marker mask of a margin.\r\nget int GetMarginMaskN=2245(int margin,)\r\n\r\n# Make a margin sensitive or insensitive to mouse clicks.\r\nset void SetMarginSensitiveN=2246(int margin, bool sensitive)\r\n\r\n# Retrieve the mouse click sensitivity of a margin.\r\nget bool GetMarginSensitiveN=2247(int margin,)\r\n\r\n# Set the cursor shown when the mouse is inside a margin.\r\nset void SetMarginCursorN=2248(int margin, CursorShape cursor)\r\n\r\n# Retrieve the cursor shown in a margin.\r\nget CursorShape GetMarginCursorN=2249(int margin,)\r\n\r\n# Set the background colour of a margin. Only visible for SC_MARGIN_COLOUR.\r\nset void SetMarginBackN=2250(int margin, colour back)\r\n\r\n# Retrieve the background colour of a margin\r\nget colour GetMarginBackN=2251(int margin,)\r\n\r\n# Allocate a non-standard number of margins.\r\nset void SetMargins=2252(int margins,)\r\n\r\n# How many margins are there?.\r\nget int GetMargins=2253(,)\r\n\r\n# Styles in range 32..39 are predefined for parts of the UI and are not used as normal styles.\r\nenu StylesCommon=STYLE_\r\nval STYLE_DEFAULT=32\r\nval STYLE_LINENUMBER=33\r\nval STYLE_BRACELIGHT=34\r\nval STYLE_BRACEBAD=35\r\nval STYLE_CONTROLCHAR=36\r\nval STYLE_INDENTGUIDE=37\r\nval STYLE_CALLTIP=38\r\nval STYLE_FOLDDISPLAYTEXT=39\r\nval STYLE_LASTPREDEFINED=39\r\nval STYLE_MAX=255\r\n\r\nali STYLE_LINENUMBER=LINE_NUMBER\r\nali STYLE_BRACELIGHT=BRACE_LIGHT\r\nali STYLE_BRACEBAD=BRACE_BAD\r\nali STYLE_CONTROLCHAR=CONTROL_CHAR\r\nali STYLE_INDENTGUIDE=INDENT_GUIDE\r\nali STYLE_CALLTIP=CALL_TIP\r\nali STYLE_FOLDDISPLAYTEXT=FOLD_DISPLAY_TEXT\r\nali STYLE_LASTPREDEFINED=LAST_PREDEFINED\r\n\r\n# Character set identifiers are used in StyleSetCharacterSet.\r\n# The values are the same as the Windows *_CHARSET values.\r\nenu CharacterSet=SC_CHARSET_\r\nval SC_CHARSET_ANSI=0\r\nval SC_CHARSET_DEFAULT=1\r\nval SC_CHARSET_BALTIC=186\r\nval SC_CHARSET_CHINESEBIG5=136\r\nval SC_CHARSET_EASTEUROPE=238\r\nval SC_CHARSET_GB2312=134\r\nval SC_CHARSET_GREEK=161\r\nval SC_CHARSET_HANGUL=129\r\nval SC_CHARSET_MAC=77\r\nval SC_CHARSET_OEM=255\r\nval SC_CHARSET_RUSSIAN=204\r\nval SC_CHARSET_OEM866=866\r\nval SC_CHARSET_CYRILLIC=1251\r\nval SC_CHARSET_SHIFTJIS=128\r\nval SC_CHARSET_SYMBOL=2\r\nval SC_CHARSET_TURKISH=162\r\nval SC_CHARSET_JOHAB=130\r\nval SC_CHARSET_HEBREW=177\r\nval SC_CHARSET_ARABIC=178\r\nval SC_CHARSET_VIETNAMESE=163\r\nval SC_CHARSET_THAI=222\r\nval SC_CHARSET_8859_15=1000\r\n\r\nali SC_CHARSET_CHINESEBIG5=CHINESE_BIG5\r\nali SC_CHARSET_EASTEUROPE=EAST_EUROPE\r\nali SC_CHARSET_GB2312=G_B_2312\r\nali SC_CHARSET_OEM866=OEM_866\r\nali SC_CHARSET_SHIFTJIS=SHIFT_JIS\r\nali SC_CHARSET_8859_15=ISO_8859_15\r\n\r\n# Clear all the styles and make equivalent to the global default style.\r\nfun void StyleClearAll=2050(,)\r\n\r\n# Set the foreground colour of a style.\r\nset void StyleSetFore=2051(int style, colour fore)\r\n\r\n# Set the background colour of a style.\r\nset void StyleSetBack=2052(int style, colour back)\r\n\r\n# Set a style to be bold or not.\r\nset void StyleSetBold=2053(int style, bool bold)\r\n\r\n# Set a style to be italic or not.\r\nset void StyleSetItalic=2054(int style, bool italic)\r\n\r\n# Set the size of characters of a style.\r\nset void StyleSetSize=2055(int style, int sizePoints)\r\n\r\n# Set the font of a style.\r\nset void StyleSetFont=2056(int style, string fontName)\r\n\r\n# Set a style to have its end of line filled or not.\r\nset void StyleSetEOLFilled=2057(int style, bool eolFilled)\r\n\r\n# Reset the default style to its state at startup\r\nfun void StyleResetDefault=2058(,)\r\n\r\n# Set a style to be underlined or not.\r\nset void StyleSetUnderline=2059(int style, bool underline)\r\n\r\nenu CaseVisible=SC_CASE_\r\nval SC_CASE_MIXED=0\r\nval SC_CASE_UPPER=1\r\nval SC_CASE_LOWER=2\r\nval SC_CASE_CAMEL=3\r\n\r\n# Get the foreground colour of a style.\r\nget colour StyleGetFore=2481(int style,)\r\n\r\n# Get the background colour of a style.\r\nget colour StyleGetBack=2482(int style,)\r\n\r\n# Get is a style bold or not.\r\nget bool StyleGetBold=2483(int style,)\r\n\r\n# Get is a style italic or not.\r\nget bool StyleGetItalic=2484(int style,)\r\n\r\n# Get the size of characters of a style.\r\nget int StyleGetSize=2485(int style,)\r\n\r\n# Get the font of a style.\r\n# Returns the length of the fontName\r\n# Result is NUL-terminated.\r\nget int StyleGetFont=2486(int style, stringresult fontName)\r\n\r\n# Get is a style to have its end of line filled or not.\r\nget bool StyleGetEOLFilled=2487(int style,)\r\n\r\n# Get is a style underlined or not.\r\nget bool StyleGetUnderline=2488(int style,)\r\n\r\n# Get is a style mixed case, or to force upper or lower case.\r\nget CaseVisible StyleGetCase=2489(int style,)\r\n\r\n# Get the character get of the font in a style.\r\nget CharacterSet StyleGetCharacterSet=2490(int style,)\r\n\r\n# Get is a style visible or not.\r\nget bool StyleGetVisible=2491(int style,)\r\n\r\n# Get is a style changeable or not (read only).\r\n# Experimental feature, currently buggy.\r\nget bool StyleGetChangeable=2492(int style,)\r\n\r\n# Get is a style a hotspot or not.\r\nget bool StyleGetHotSpot=2493(int style,)\r\n\r\n# Set a style to be mixed case, or to force upper or lower case.\r\nset void StyleSetCase=2060(int style, CaseVisible caseVisible)\r\n\r\nval SC_FONT_SIZE_MULTIPLIER=100\r\n\r\n# Set the size of characters of a style. Size is in points multiplied by 100.\r\nset void StyleSetSizeFractional=2061(int style, int sizeHundredthPoints)\r\n\r\n# Get the size of characters of a style in points multiplied by 100\r\nget int StyleGetSizeFractional=2062(int style,)\r\n\r\nenu FontWeight=SC_WEIGHT_\r\nval SC_WEIGHT_NORMAL=400\r\nval SC_WEIGHT_SEMIBOLD=600\r\nval SC_WEIGHT_BOLD=700\r\n\r\nali SC_WEIGHT_SEMIBOLD=SEMI_BOLD\r\n\r\n# Set the weight of characters of a style.\r\nset void StyleSetWeight=2063(int style, FontWeight weight)\r\n\r\n# Get the weight of characters of a style.\r\nget FontWeight StyleGetWeight=2064(int style,)\r\n\r\n# Set the character set of the font in a style.\r\nset void StyleSetCharacterSet=2066(int style, CharacterSet characterSet)\r\n\r\n# Set a style to be a hotspot or not.\r\nset void StyleSetHotSpot=2409(int style, bool hotspot)\r\n\r\n# Indicate that a style may be monospaced over ASCII graphics characters which enables optimizations.\r\nset void StyleSetCheckMonospaced=2254(int style, bool checkMonospaced)\r\n\r\n# Get whether a style may be monospaced.\r\nget bool StyleGetCheckMonospaced=2255(int style,)\r\n\r\n# Set the invisible representation for a style.\r\nset void StyleSetInvisibleRepresentation=2256(int style, string representation)\r\n\r\n# Get the invisible representation for a style.\r\nget int StyleGetInvisibleRepresentation=2257(int style, stringresult representation)\r\n\r\nenu Element=SC_ELEMENT_\r\nval SC_ELEMENT_LIST=0\r\nval SC_ELEMENT_LIST_BACK=1\r\nval SC_ELEMENT_LIST_SELECTED=2\r\nval SC_ELEMENT_LIST_SELECTED_BACK=3\r\nval SC_ELEMENT_SELECTION_TEXT=10\r\nval SC_ELEMENT_SELECTION_BACK=11\r\nval SC_ELEMENT_SELECTION_ADDITIONAL_TEXT=12\r\nval SC_ELEMENT_SELECTION_ADDITIONAL_BACK=13\r\nval SC_ELEMENT_SELECTION_SECONDARY_TEXT=14\r\nval SC_ELEMENT_SELECTION_SECONDARY_BACK=15\r\nval SC_ELEMENT_SELECTION_INACTIVE_TEXT=16\r\nval SC_ELEMENT_SELECTION_INACTIVE_BACK=17\r\nval SC_ELEMENT_SELECTION_INACTIVE_ADDITIONAL_TEXT=18\r\nval SC_ELEMENT_SELECTION_INACTIVE_ADDITIONAL_BACK=19\r\nval SC_ELEMENT_CARET=40\r\nval SC_ELEMENT_CARET_ADDITIONAL=41\r\nval SC_ELEMENT_CARET_LINE_BACK=50\r\nval SC_ELEMENT_WHITE_SPACE=60\r\nval SC_ELEMENT_WHITE_SPACE_BACK=61\r\nval SC_ELEMENT_HOT_SPOT_ACTIVE=70\r\nval SC_ELEMENT_HOT_SPOT_ACTIVE_BACK=71\r\nval SC_ELEMENT_FOLD_LINE=80\r\nval SC_ELEMENT_HIDDEN_LINE=81\r\n\r\n# Set the colour of an element. Translucency (alpha) may or may not be significant\r\n# and this may depend on the platform. The alpha byte should commonly be 0xff for opaque.\r\nset void SetElementColour=2753(Element element, colouralpha colourElement)\r\n\r\n# Get the colour of an element.\r\nget colouralpha GetElementColour=2754(Element element,)\r\n\r\n# Use the default or platform-defined colour for an element.\r\nfun void ResetElementColour=2755(Element element,)\r\n\r\n# Get whether an element has been set by SetElementColour.\r\n# When false, a platform-defined or default colour is used.\r\nget bool GetElementIsSet=2756(Element element,)\r\n\r\n# Get whether an element supports translucency.\r\nget bool GetElementAllowsTranslucent=2757(Element element,)\r\n\r\n# Get the colour of an element.\r\nget colouralpha GetElementBaseColour=2758(Element element,)\r\n\r\n# Set the foreground colour of the main and additional selections and whether to use this setting.\r\nfun void SetSelFore=2067(bool useSetting, colour fore)\r\n\r\n# Set the background colour of the main and additional selections and whether to use this setting.\r\nfun void SetSelBack=2068(bool useSetting, colour back)\r\n\r\n# Get the alpha of the selection.\r\nget Alpha GetSelAlpha=2477(,)\r\n\r\n# Set the alpha of the selection.\r\nset void SetSelAlpha=2478(Alpha alpha,)\r\n\r\n# Is the selection end of line filled?\r\nget bool GetSelEOLFilled=2479(,)\r\n\r\n# Set the selection to have its end of line filled or not.\r\nset void SetSelEOLFilled=2480(bool filled,)\r\n\r\nenu Layer=SC_LAYER_\r\nval SC_LAYER_BASE=0\r\nval SC_LAYER_UNDER_TEXT=1\r\nval SC_LAYER_OVER_TEXT=2\r\n\r\n# Get the layer for drawing selections\r\nget Layer GetSelectionLayer=2762(,)\r\n\r\n# Set the layer for drawing selections: either opaquely on base layer or translucently over text\r\nset void SetSelectionLayer=2763(Layer layer,)\r\n\r\n# Get the layer of the background of the line containing the caret.\r\nget Layer GetCaretLineLayer=2764(,)\r\n\r\n# Set the layer of the background of the line containing the caret.\r\nset void SetCaretLineLayer=2765(Layer layer,)\r\n\r\n# Get only highlighting subline instead of whole line.\r\nget bool GetCaretLineHighlightSubLine=2773(,)\r\n\r\n# Set only highlighting subline instead of whole line.\r\nset void SetCaretLineHighlightSubLine=2774(bool subLine,)\r\n\r\n# Set the foreground colour of the caret.\r\nset void SetCaretFore=2069(colour fore,)\r\n\r\n# When key+modifier combination keyDefinition is pressed perform sciCommand.\r\nfun void AssignCmdKey=2070(keymod keyDefinition, int sciCommand)\r\n\r\n# When key+modifier combination keyDefinition is pressed do nothing.\r\nfun void ClearCmdKey=2071(keymod keyDefinition,)\r\n\r\n# Drop all key mappings.\r\nfun void ClearAllCmdKeys=2072(,)\r\n\r\n# Set the styles for a segment of the document.\r\nfun void SetStylingEx=2073(position length, string styles)\r\n\r\n# Set a style to be visible or not.\r\nset void StyleSetVisible=2074(int style, bool visible)\r\n\r\n# Get the time in milliseconds that the caret is on and off.\r\nget int GetCaretPeriod=2075(,)\r\n\r\n# Get the time in milliseconds that the caret is on and off. 0 = steady on.\r\nset void SetCaretPeriod=2076(int periodMilliseconds,)\r\n\r\n# Set the set of characters making up words for when moving or selecting by word.\r\n# First sets defaults like SetCharsDefault.\r\nset void SetWordChars=2077(, string characters)\r\n\r\n# Get the set of characters making up words for when moving or selecting by word.\r\n# Returns the number of characters\r\nget int GetWordChars=2646(, stringresult characters)\r\n\r\n# Set the number of characters to have directly indexed categories\r\nset void SetCharacterCategoryOptimization=2720(int countCharacters,)\r\n\r\n# Get the number of characters to have directly indexed categories\r\nget int GetCharacterCategoryOptimization=2721(,)\r\n\r\n# Start a sequence of actions that is undone and redone as a unit.\r\n# May be nested.\r\nfun void BeginUndoAction=2078(,)\r\n\r\n# End a sequence of actions that is undone and redone as a unit.\r\nfun void EndUndoAction=2079(,)\r\n\r\n# How many undo actions are in the history?\r\nget int GetUndoActions=2790(,)\r\n\r\n# Set action as the save point\r\nset void SetUndoSavePoint=2791(int action,)\r\n\r\n# Which action is the save point?\r\nget int GetUndoSavePoint=2792(,)\r\n\r\n# Set action as the detach point\r\nset void SetUndoDetach=2793(int action,)\r\n\r\n# Which action is the detach point?\r\nget int GetUndoDetach=2794(,)\r\n\r\n# Set action as the tentative point\r\nset void SetUndoTentative=2795(int action,)\r\n\r\n# Which action is the tentative point?\r\nget int GetUndoTentative=2796(,)\r\n\r\n# Set action as the current point\r\nset void SetUndoCurrent=2797(int action,)\r\n\r\n# Which action is the current point?\r\nget int GetUndoCurrent=2798(,)\r\n\r\n# Push one action onto undo history with no text\r\nfun void PushUndoActionType=2800(int type, position pos)\r\n\r\n# Set the text and length of the most recently pushed action\r\nfun void ChangeLastUndoActionText=2801(position length, string text)\r\n\r\n# What is the type of an action?\r\nget int GetUndoActionType=2802(int action,)\r\n\r\n# What is the position of an action?\r\nget position GetUndoActionPosition=2803(int action,)\r\n\r\n# What is the text of an action?\r\nget int GetUndoActionText=2804(int action, stringresult text)\r\n\r\n# Indicator style enumeration and some constants\r\nenu IndicatorStyle=INDIC_\r\nval INDIC_PLAIN=0\r\nval INDIC_SQUIGGLE=1\r\nval INDIC_TT=2\r\nval INDIC_DIAGONAL=3\r\nval INDIC_STRIKE=4\r\nval INDIC_HIDDEN=5\r\nval INDIC_BOX=6\r\nval INDIC_ROUNDBOX=7\r\nval INDIC_STRAIGHTBOX=8\r\nval INDIC_DASH=9\r\nval INDIC_DOTS=10\r\nval INDIC_SQUIGGLELOW=11\r\nval INDIC_DOTBOX=12\r\nval INDIC_SQUIGGLEPIXMAP=13\r\nval INDIC_COMPOSITIONTHICK=14\r\nval INDIC_COMPOSITIONTHIN=15\r\nval INDIC_FULLBOX=16\r\nval INDIC_TEXTFORE=17\r\nval INDIC_POINT=18\r\nval INDIC_POINTCHARACTER=19\r\nval INDIC_GRADIENT=20\r\nval INDIC_GRADIENTCENTRE=21\r\nval INDIC_POINT_TOP=22\r\n\r\n# INDIC_CONTAINER, INDIC_IME, INDIC_IME_MAX, and INDIC_MAX are indicator numbers,\r\n# not IndicatorStyles so should not really be in the INDIC_ enumeration.\r\n# They are redeclared in IndicatorNumbers INDICATOR_.\r\nval INDIC_CONTAINER=8\r\nval INDIC_IME=32\r\nval INDIC_IME_MAX=35\r\nval INDIC_MAX=35\r\n\r\nenu IndicatorNumbers=INDICATOR_\r\nval INDICATOR_CONTAINER=8\r\nval INDICATOR_IME=32\r\nval INDICATOR_IME_MAX=35\r\nval INDICATOR_HISTORY_REVERTED_TO_ORIGIN_INSERTION=36\r\nval INDICATOR_HISTORY_REVERTED_TO_ORIGIN_DELETION=37\r\nval INDICATOR_HISTORY_SAVED_INSERTION=38\r\nval INDICATOR_HISTORY_SAVED_DELETION=39\r\nval INDICATOR_HISTORY_MODIFIED_INSERTION=40\r\nval INDICATOR_HISTORY_MODIFIED_DELETION=41\r\nval INDICATOR_HISTORY_REVERTED_TO_MODIFIED_INSERTION=42\r\nval INDICATOR_HISTORY_REVERTED_TO_MODIFIED_DELETION=43\r\nval INDICATOR_MAX=43\r\n\r\nali INDIC_TT=T_T\r\nali INDIC_ROUNDBOX=ROUND_BOX\r\nali INDIC_STRAIGHTBOX=STRAIGHT_BOX\r\nali INDIC_SQUIGGLELOW=SQUIGGLE_LOW\r\nali INDIC_DOTBOX=DOT_BOX\r\nali INDIC_SQUIGGLEPIXMAP=SQUIGGLE_PIXMAP\r\nali INDIC_COMPOSITIONTHICK=COMPOSITION_THICK\r\nali INDIC_COMPOSITIONTHIN=COMPOSITION_THIN\r\nali INDIC_FULLBOX=FULL_BOX\r\nali INDIC_TEXTFORE=TEXT_FORE\r\nali INDIC_POINTCHARACTER=POINT_CHARACTER\r\nali INDIC_GRADIENTCENTRE=GRADIENT_CENTRE\r\n\r\n# Set an indicator to plain, squiggle or TT.\r\nset void IndicSetStyle=2080(int indicator, IndicatorStyle indicatorStyle)\r\n\r\n# Retrieve the style of an indicator.\r\nget IndicatorStyle IndicGetStyle=2081(int indicator,)\r\n\r\n# Set the foreground colour of an indicator.\r\nset void IndicSetFore=2082(int indicator, colour fore)\r\n\r\n# Retrieve the foreground colour of an indicator.\r\nget colour IndicGetFore=2083(int indicator,)\r\n\r\n# Set an indicator to draw under text or over(default).\r\nset void IndicSetUnder=2510(int indicator, bool under)\r\n\r\n# Retrieve whether indicator drawn under or over text.\r\nget bool IndicGetUnder=2511(int indicator,)\r\n\r\n# Set a hover indicator to plain, squiggle or TT.\r\nset void IndicSetHoverStyle=2680(int indicator, IndicatorStyle indicatorStyle)\r\n\r\n# Retrieve the hover style of an indicator.\r\nget IndicatorStyle IndicGetHoverStyle=2681(int indicator,)\r\n\r\n# Set the foreground hover colour of an indicator.\r\nset void IndicSetHoverFore=2682(int indicator, colour fore)\r\n\r\n# Retrieve the foreground hover colour of an indicator.\r\nget colour IndicGetHoverFore=2683(int indicator,)\r\n\r\nenu IndicValue=SC_INDICVALUE\r\nval SC_INDICVALUEBIT=0x1000000\r\nval SC_INDICVALUEMASK=0xFFFFFF\r\n\r\nenu IndicFlag=SC_INDICFLAG_\r\nval SC_INDICFLAG_NONE=0\r\nval SC_INDICFLAG_VALUEFORE=1\r\n\r\nali SC_INDICFLAG_VALUEFORE=VALUE_FORE\r\n\r\n# Set the attributes of an indicator.\r\nset void IndicSetFlags=2684(int indicator, IndicFlag flags)\r\n\r\n# Retrieve the attributes of an indicator.\r\nget IndicFlag IndicGetFlags=2685(int indicator,)\r\n\r\n# Set the stroke width of an indicator in hundredths of a pixel.\r\nset void IndicSetStrokeWidth=2751(int indicator, int hundredths)\r\n\r\n# Retrieve the stroke width of an indicator.\r\nget int IndicGetStrokeWidth=2752(int indicator,)\r\n\r\n# Set the foreground colour of all whitespace and whether to use this setting.\r\nfun void SetWhitespaceFore=2084(bool useSetting, colour fore)\r\n\r\n# Set the background colour of all whitespace and whether to use this setting.\r\nfun void SetWhitespaceBack=2085(bool useSetting, colour back)\r\n\r\n# Set the size of the dots used to mark space characters.\r\nset void SetWhitespaceSize=2086(int size,)\r\n\r\n# Get the size of the dots used to mark space characters.\r\nget int GetWhitespaceSize=2087(,)\r\n\r\n# Used to hold extra styling information for each line.\r\nset void SetLineState=2092(line line, int state)\r\n\r\n# Retrieve the extra styling information for a line.\r\nget int GetLineState=2093(line line,)\r\n\r\n# Retrieve the last line number that has line state.\r\nget int GetMaxLineState=2094(,)\r\n\r\n# Is the background of the line containing the caret in a different colour?\r\nget bool GetCaretLineVisible=2095(,)\r\n\r\n# Display the background of the line containing the caret in a different colour.\r\nset void SetCaretLineVisible=2096(bool show,)\r\n\r\n# Get the colour of the background of the line containing the caret.\r\nget colour GetCaretLineBack=2097(,)\r\n\r\n# Set the colour of the background of the line containing the caret.\r\nset void SetCaretLineBack=2098(colour back,)\r\n\r\n# Retrieve the caret line frame width.\r\n# Width = 0 means this option is disabled.\r\nget int GetCaretLineFrame=2704(,)\r\n\r\n# Display the caret line framed.\r\n# Set width != 0 to enable this option and width = 0 to disable it.\r\nset void SetCaretLineFrame=2705(int width,)\r\n\r\n# Set a style to be changeable or not (read only).\r\n# Experimental feature, currently buggy.\r\nset void StyleSetChangeable=2099(int style, bool changeable)\r\n\r\n# Display a auto-completion list.\r\n# The lengthEntered parameter indicates how many characters before\r\n# the caret should be used to provide context.\r\nfun void AutoCShow=2100(position lengthEntered, string itemList)\r\n\r\n# Remove the auto-completion list from the screen.\r\nfun void AutoCCancel=2101(,)\r\n\r\n# Is there an auto-completion list visible?\r\nfun bool AutoCActive=2102(,)\r\n\r\n# Retrieve the position of the caret when the auto-completion list was displayed.\r\nfun position AutoCPosStart=2103(,)\r\n\r\n# User has selected an item so remove the list and insert the selection.\r\nfun void AutoCComplete=2104(,)\r\n\r\n# Define a set of character that when typed cancel the auto-completion list.\r\nfun void AutoCStops=2105(, string characterSet)\r\n\r\n# Change the separator character in the string setting up an auto-completion list.\r\n# Default is space but can be changed if items contain space.\r\nset void AutoCSetSeparator=2106(int separatorCharacter,)\r\n\r\n# Retrieve the auto-completion list separator character.\r\nget int AutoCGetSeparator=2107(,)\r\n\r\n# Select the item in the auto-completion list that starts with a string.\r\nfun void AutoCSelect=2108(, string select)\r\n\r\n# Should the auto-completion list be cancelled if the user backspaces to a\r\n# position before where the box was created.\r\nset void AutoCSetCancelAtStart=2110(bool cancel,)\r\n\r\n# Retrieve whether auto-completion cancelled by backspacing before start.\r\nget bool AutoCGetCancelAtStart=2111(,)\r\n\r\n# Define a set of characters that when typed will cause the autocompletion to\r\n# choose the selected item.\r\nset void AutoCSetFillUps=2112(, string characterSet)\r\n\r\n# Should a single item auto-completion list automatically choose the item.\r\nset void AutoCSetChooseSingle=2113(bool chooseSingle,)\r\n\r\n# Retrieve whether a single item auto-completion list automatically choose the item.\r\nget bool AutoCGetChooseSingle=2114(,)\r\n\r\n# Set whether case is significant when performing auto-completion searches.\r\nset void AutoCSetIgnoreCase=2115(bool ignoreCase,)\r\n\r\n# Retrieve state of ignore case flag.\r\nget bool AutoCGetIgnoreCase=2116(,)\r\n\r\n# Display a list of strings and send notification when user chooses one.\r\nfun void UserListShow=2117(int listType, string itemList)\r\n\r\n# Set whether or not autocompletion is hidden automatically when nothing matches.\r\nset void AutoCSetAutoHide=2118(bool autoHide,)\r\n\r\n# Retrieve whether or not autocompletion is hidden automatically when nothing matches.\r\nget bool AutoCGetAutoHide=2119(,)\r\n\r\n# Define option flags for autocompletion lists\r\nenu AutoCompleteOption=SC_AUTOCOMPLETE_\r\nval SC_AUTOCOMPLETE_NORMAL=0\r\n# Win32 specific:\r\nval SC_AUTOCOMPLETE_FIXED_SIZE=1\r\n# Always select the first item in the autocompletion list:\r\nval SC_AUTOCOMPLETE_SELECT_FIRST_ITEM=2\r\n\r\n# Set autocompletion options.\r\nset void AutoCSetOptions=2638(AutoCompleteOption options,)\r\n\r\n# Retrieve autocompletion options.\r\nget AutoCompleteOption AutoCGetOptions=2639(,)\r\n\r\n# Set whether or not autocompletion deletes any word characters\r\n# after the inserted text upon completion.\r\nset void AutoCSetDropRestOfWord=2270(bool dropRestOfWord,)\r\n\r\n# Retrieve whether or not autocompletion deletes any word characters\r\n# after the inserted text upon completion.\r\nget bool AutoCGetDropRestOfWord=2271(,)\r\n\r\n# Register an XPM image for use in autocompletion lists.\r\nfun void RegisterImage=2405(int type, string xpmData)\r\n\r\n# Clear all the registered XPM images.\r\nfun void ClearRegisteredImages=2408(,)\r\n\r\n# Retrieve the auto-completion list type-separator character.\r\nget int AutoCGetTypeSeparator=2285(,)\r\n\r\n# Change the type-separator character in the string setting up an auto-completion list.\r\n# Default is '?' but can be changed if items contain '?'.\r\nset void AutoCSetTypeSeparator=2286(int separatorCharacter,)\r\n\r\n# Set the maximum width, in characters, of auto-completion and user lists.\r\n# Set to 0 to autosize to fit longest item, which is the default.\r\nset void AutoCSetMaxWidth=2208(int characterCount,)\r\n\r\n# Get the maximum width, in characters, of auto-completion and user lists.\r\nget int AutoCGetMaxWidth=2209(,)\r\n\r\n# Set the maximum height, in rows, of auto-completion and user lists.\r\n# The default is 5 rows.\r\nset void AutoCSetMaxHeight=2210(int rowCount,)\r\n\r\n# Set the maximum height, in rows, of auto-completion and user lists.\r\nget int AutoCGetMaxHeight=2211(,)\r\n\r\n# Set the number of spaces used for one level of indentation.\r\nset void SetIndent=2122(int indentSize,)\r\n\r\n# Retrieve indentation size.\r\nget int GetIndent=2123(,)\r\n\r\n# Indentation will only use space characters if useTabs is false, otherwise\r\n# it will use a combination of tabs and spaces.\r\nset void SetUseTabs=2124(bool useTabs,)\r\n\r\n# Retrieve whether tabs will be used in indentation.\r\nget bool GetUseTabs=2125(,)\r\n\r\n# Change the indentation of a line to a number of columns.\r\nset void SetLineIndentation=2126(line line, int indentation)\r\n\r\n# Retrieve the number of columns that a line is indented.\r\nget int GetLineIndentation=2127(line line,)\r\n\r\n# Retrieve the position before the first non indentation character on a line.\r\nget position GetLineIndentPosition=2128(line line,)\r\n\r\n# Retrieve the column number of a position, taking tab width into account.\r\nget position GetColumn=2129(position pos,)\r\n\r\n# Count characters between two positions.\r\nfun position CountCharacters=2633(position start, position end)\r\n\r\n# Count code units between two positions.\r\nfun position CountCodeUnits=2715(position start, position end)\r\n\r\n# Show or hide the horizontal scroll bar.\r\nset void SetHScrollBar=2130(bool visible,)\r\n# Is the horizontal scroll bar visible?\r\nget bool GetHScrollBar=2131(,)\r\n\r\nenu IndentView=SC_IV_\r\nval SC_IV_NONE=0\r\nval SC_IV_REAL=1\r\nval SC_IV_LOOKFORWARD=2\r\nval SC_IV_LOOKBOTH=3\r\n\r\nali SC_IV_LOOKFORWARD=LOOK_FORWARD\r\nali SC_IV_LOOKBOTH=LOOK_BOTH\r\n\r\n# Show or hide indentation guides.\r\nset void SetIndentationGuides=2132(IndentView indentView,)\r\n\r\n# Are the indentation guides visible?\r\nget IndentView GetIndentationGuides=2133(,)\r\n\r\n# Set the highlighted indentation guide column.\r\n# 0 = no highlighted guide.\r\nset void SetHighlightGuide=2134(position column,)\r\n\r\n# Get the highlighted indentation guide column.\r\nget position GetHighlightGuide=2135(,)\r\n\r\n# Get the position after the last visible characters on a line.\r\nget position GetLineEndPosition=2136(line line,)\r\n\r\n# Get the code page used to interpret the bytes of the document as characters.\r\nget int GetCodePage=2137(,)\r\n\r\n# Get the foreground colour of the caret.\r\nget colour GetCaretFore=2138(,)\r\n\r\n# In read-only mode?\r\nget bool GetReadOnly=2140(,)\r\n\r\n# Sets the position of the caret.\r\nset void SetCurrentPos=2141(position caret,)\r\n\r\n# Sets the position that starts the selection - this becomes the anchor.\r\nset void SetSelectionStart=2142(position anchor,)\r\n\r\n# Returns the position at the start of the selection.\r\nget position GetSelectionStart=2143(,)\r\n\r\n# Sets the position that ends the selection - this becomes the caret.\r\nset void SetSelectionEnd=2144(position caret,)\r\n\r\n# Returns the position at the end of the selection.\r\nget position GetSelectionEnd=2145(,)\r\n\r\n# Set caret to a position, while removing any existing selection.\r\nfun void SetEmptySelection=2556(position caret,)\r\n\r\n# Sets the print magnification added to the point size of each style for printing.\r\nset void SetPrintMagnification=2146(int magnification,)\r\n\r\n# Returns the print magnification.\r\nget int GetPrintMagnification=2147(,)\r\n\r\nenu PrintOption=SC_PRINT_\r\n# PrintColourMode - use same colours as screen.\r\n# with the exception of line number margins, which use a white background\r\nval SC_PRINT_NORMAL=0\r\n# PrintColourMode - invert the light value of each style for printing.\r\nval SC_PRINT_INVERTLIGHT=1\r\n# PrintColourMode - force black text on white background for printing.\r\nval SC_PRINT_BLACKONWHITE=2\r\n# PrintColourMode - text stays coloured, but all background is forced to be white for printing.\r\nval SC_PRINT_COLOURONWHITE=3\r\n# PrintColourMode - only the default-background is forced to be white for printing.\r\nval SC_PRINT_COLOURONWHITEDEFAULTBG=4\r\n# PrintColourMode - use same colours as screen, including line number margins.\r\nval SC_PRINT_SCREENCOLOURS=5\r\n\r\nali SC_PRINT_INVERTLIGHT=INVERT_LIGHT\r\nali SC_PRINT_BLACKONWHITE=BLACK_ON_WHITE\r\nali SC_PRINT_COLOURONWHITE=COLOUR_ON_WHITE\r\nali SC_PRINT_COLOURONWHITEDEFAULTBG=COLOUR_ON_WHITE_DEFAULT_B_G\r\nali SC_PRINT_SCREENCOLOURS=SCREEN_COLOURS\r\n\r\n# Modify colours when printing for clearer printed text.\r\nset void SetPrintColourMode=2148(PrintOption mode,)\r\n\r\n# Returns the print colour mode.\r\nget PrintOption GetPrintColourMode=2149(,)\r\n\r\nenu FindOption=SCFIND_\r\nval SCFIND_NONE=0x0\r\nval SCFIND_WHOLEWORD=0x2\r\nval SCFIND_MATCHCASE=0x4\r\nval SCFIND_WORDSTART=0x00100000\r\nval SCFIND_REGEXP=0x00200000\r\nval SCFIND_POSIX=0x00400000\r\nval SCFIND_CXX11REGEX=0x00800000\r\n\r\nali SCFIND_WHOLEWORD=WHOLE_WORD\r\nali SCFIND_MATCHCASE=MATCH_CASE\r\nali SCFIND_WORDSTART=WORD_START\r\nali SCFIND_REGEXP=REG_EXP\r\nali SCFIND_CXX11REGEX=CXX11_REG_EX\r\n\r\n# Find some text in the document.\r\nfun position FindText=2150(FindOption searchFlags, findtext ft)\r\n\r\n# Find some text in the document.\r\nfun position FindTextFull=2196(FindOption searchFlags, findtextfull ft)\r\n\r\n# Draw the document into a display context such as a printer.\r\nfun position FormatRange=2151(bool draw, formatrange fr)\r\n\r\n# Draw the document into a display context such as a printer.\r\nfun position FormatRangeFull=2777(bool draw, formatrangefull fr)\r\n\r\nenu ChangeHistoryOption=SC_CHANGE_HISTORY_\r\nval SC_CHANGE_HISTORY_DISABLED=0\r\nval SC_CHANGE_HISTORY_ENABLED=1\r\nval SC_CHANGE_HISTORY_MARKERS=2\r\nval SC_CHANGE_HISTORY_INDICATORS=4\r\n\r\n# Enable or disable change history.\r\nset void SetChangeHistory=2780(ChangeHistoryOption changeHistory,)\r\n\r\n# Report change history status.\r\nget ChangeHistoryOption GetChangeHistory=2781(,)\r\n\r\n# Retrieve the display line at the top of the display.\r\nget line GetFirstVisibleLine=2152(,)\r\n\r\n# Retrieve the contents of a line.\r\n# Returns the length of the line.\r\nfun position GetLine=2153(line line, stringresult text)\r\n\r\n# Returns the number of lines in the document. There is always at least one.\r\nget line GetLineCount=2154(,)\r\n\r\n# Enlarge the number of lines allocated.\r\nset void AllocateLines=2089(line lines,)\r\n\r\n# Sets the size in pixels of the left margin.\r\nset void SetMarginLeft=2155(, int pixelWidth)\r\n\r\n# Returns the size in pixels of the left margin.\r\nget int GetMarginLeft=2156(,)\r\n\r\n# Sets the size in pixels of the right margin.\r\nset void SetMarginRight=2157(, int pixelWidth)\r\n\r\n# Returns the size in pixels of the right margin.\r\nget int GetMarginRight=2158(,)\r\n\r\n# Is the document different from when it was last saved?\r\nget bool GetModify=2159(,)\r\n\r\n# Select a range of text.\r\nfun void SetSel=2160(position anchor, position caret)\r\n\r\n# Retrieve the selected text.\r\n# Return the length of the text.\r\n# Result is NUL-terminated.\r\nfun position GetSelText=2161(, stringresult text)\r\n\r\n# Retrieve a range of text.\r\n# Return the length of the text.\r\nfun position GetTextRange=2162(, textrange tr)\r\n\r\n# Retrieve a range of text that can be past 2GB.\r\n# Return the length of the text.\r\nfun position GetTextRangeFull=2039(, textrangefull tr)\r\n\r\n# Draw the selection either highlighted or in normal (non-highlighted) style.\r\nfun void HideSelection=2163(bool hide,)\r\n\r\n#Is the selection visible or hidden?\r\nget bool GetSelectionHidden=2088(,)\r\n\r\n# Retrieve the x value of the point in the window where a position is displayed.\r\nfun int PointXFromPosition=2164(, position pos)\r\n\r\n# Retrieve the y value of the point in the window where a position is displayed.\r\nfun int PointYFromPosition=2165(, position pos)\r\n\r\n# Retrieve the line containing a position.\r\nfun line LineFromPosition=2166(position pos,)\r\n\r\n# Retrieve the position at the start of a line.\r\nfun position PositionFromLine=2167(line line,)\r\n\r\n# Scroll horizontally and vertically.\r\nfun void LineScroll=2168(position columns, line lines)\r\n\r\n# Ensure the caret is visible.\r\nfun void ScrollCaret=2169(,)\r\n\r\n# Scroll the argument positions and the range between them into view giving\r\n# priority to the primary position then the secondary position.\r\n# This may be used to make a search match visible.\r\nfun void ScrollRange=2569(position secondary, position primary)\r\n\r\n# Replace the selected text with the argument text.\r\nfun void ReplaceSel=2170(, string text)\r\n\r\n# Set to read only or read write.\r\nset void SetReadOnly=2171(bool readOnly,)\r\n\r\n# Null operation.\r\nfun void Null=2172(,)\r\n\r\n# Will a paste succeed?\r\nfun bool CanPaste=2173(,)\r\n\r\n# Are there any undoable actions in the undo history?\r\nfun bool CanUndo=2174(,)\r\n\r\n# Delete the undo history.\r\nfun void EmptyUndoBuffer=2175(,)\r\n\r\n# Undo one action in the undo history.\r\nfun void Undo=2176(,)\r\n\r\n# Cut the selection to the clipboard.\r\nfun void Cut=2177(,)\r\n\r\n# Copy the selection to the clipboard.\r\nfun void Copy=2178(,)\r\n\r\n# Paste the contents of the clipboard into the document replacing the selection.\r\nfun void Paste=2179(,)\r\n\r\n# Clear the selection.\r\nfun void Clear=2180(,)\r\n\r\n# Replace the contents of the document with the argument text.\r\nfun void SetText=2181(, string text)\r\n\r\n# Retrieve all the text in the document.\r\n# Returns number of characters retrieved.\r\n# Result is NUL-terminated.\r\nfun position GetText=2182(position length, stringresult text)\r\n\r\n# Retrieve the number of characters in the document.\r\nget position GetTextLength=2183(,)\r\n\r\n# Retrieve a pointer to a function that processes messages for this Scintilla.\r\nget pointer GetDirectFunction=2184(,)\r\n\r\n# Retrieve a pointer to a function that processes messages for this Scintilla and returns status.\r\nget pointer GetDirectStatusFunction=2772(,)\r\n\r\n# Retrieve a pointer value to use as the first argument when calling\r\n# the function returned by GetDirectFunction.\r\nget pointer GetDirectPointer=2185(,)\r\n\r\n# Set to overtype (true) or insert mode.\r\nset void SetOvertype=2186(bool overType,)\r\n\r\n# Returns true if overtype mode is active otherwise false is returned.\r\nget bool GetOvertype=2187(,)\r\n\r\n# Set the width of the insert mode caret.\r\nset void SetCaretWidth=2188(int pixelWidth,)\r\n\r\n# Returns the width of the insert mode caret.\r\nget int GetCaretWidth=2189(,)\r\n\r\n# Sets the position that starts the target which is used for updating the\r\n# document without affecting the scroll position.\r\nset void SetTargetStart=2190(position start,)\r\n\r\n# Get the position that starts the target.\r\nget position GetTargetStart=2191(,)\r\n\r\n# Sets the virtual space of the target start\r\nset void SetTargetStartVirtualSpace=2728(position space,)\r\n\r\n# Get the virtual space of the target start\r\nget position GetTargetStartVirtualSpace=2729(,)\r\n\r\n# Sets the position that ends the target which is used for updating the\r\n# document without affecting the scroll position.\r\nset void SetTargetEnd=2192(position end,)\r\n\r\n# Get the position that ends the target.\r\nget position GetTargetEnd=2193(,)\r\n\r\n# Sets the virtual space of the target end\r\nset void SetTargetEndVirtualSpace=2730(position space,)\r\n\r\n# Get the virtual space of the target end\r\nget position GetTargetEndVirtualSpace=2731(,)\r\n\r\n# Sets both the start and end of the target in one call.\r\nfun void SetTargetRange=2686(position start, position end)\r\n\r\n# Retrieve the text in the target.\r\nget position GetTargetText=2687(, stringresult text)\r\n\r\n# Make the target range start and end be the same as the selection range start and end.\r\nfun void TargetFromSelection=2287(,)\r\n\r\n# Sets the target to the whole document.\r\nfun void TargetWholeDocument=2690(,)\r\n\r\n# Replace the target text with the argument text.\r\n# Text is counted so it can contain NULs.\r\n# Returns the length of the replacement text.\r\nfun position ReplaceTarget=2194(position length, string text)\r\n\r\n# Replace the target text with the argument text after \\d processing.\r\n# Text is counted so it can contain NULs.\r\n# Looks for \\d where d is between 1 and 9 and replaces these with the strings\r\n# matched in the last search operation which were surrounded by \\( and \\).\r\n# Returns the length of the replacement text including any change\r\n# caused by processing the \\d patterns.\r\nfun position ReplaceTargetRE=2195(position length, string text)\r\n\r\n# Replace the target text with the argument text but ignore prefix and suffix that\r\n# are the same as current.\r\nfun position ReplaceTargetMinimal=2779(position length, string text)\r\n\r\n# Search for a counted string in the target and set the target to the found\r\n# range. Text is counted so it can contain NULs.\r\n# Returns start of found range or -1 for failure in which case target is not moved.\r\nfun position SearchInTarget=2197(position length, string text)\r\n\r\n# Set the search flags used by SearchInTarget.\r\nset void SetSearchFlags=2198(FindOption searchFlags,)\r\n\r\n# Get the search flags used by SearchInTarget.\r\nget FindOption GetSearchFlags=2199(,)\r\n\r\n# Show a call tip containing a definition near position pos.\r\nfun void CallTipShow=2200(position pos, string definition)\r\n\r\n# Remove the call tip from the screen.\r\nfun void CallTipCancel=2201(,)\r\n\r\n# Is there an active call tip?\r\nfun bool CallTipActive=2202(,)\r\n\r\n# Retrieve the position where the caret was before displaying the call tip.\r\nfun position CallTipPosStart=2203(,)\r\n\r\n# Set the start position in order to change when backspacing removes the calltip.\r\nset void CallTipSetPosStart=2214(position posStart,)\r\n\r\n# Highlight a segment of the definition.\r\nfun void CallTipSetHlt=2204(position highlightStart, position highlightEnd)\r\n\r\n# Set the background colour for the call tip.\r\nset void CallTipSetBack=2205(colour back,)\r\n\r\n# Set the foreground colour for the call tip.\r\nset void CallTipSetFore=2206(colour fore,)\r\n\r\n# Set the foreground colour for the highlighted part of the call tip.\r\nset void CallTipSetForeHlt=2207(colour fore,)\r\n\r\n# Enable use of STYLE_CALLTIP and set call tip tab size in pixels.\r\nset void CallTipUseStyle=2212(int tabSize,)\r\n\r\n# Set position of calltip, above or below text.\r\nset void CallTipSetPosition=2213(bool above,)\r\n\r\n# Find the display line of a document line taking hidden lines into account.\r\nfun line VisibleFromDocLine=2220(line docLine,)\r\n\r\n# Find the document line of a display line taking hidden lines into account.\r\nfun line DocLineFromVisible=2221(line displayLine,)\r\n\r\n# The number of display lines needed to wrap a document line\r\nfun line WrapCount=2235(line docLine,)\r\n\r\nenu FoldLevel=SC_FOLDLEVEL\r\nval SC_FOLDLEVELNONE=0x0\r\nval SC_FOLDLEVELBASE=0x400\r\nval SC_FOLDLEVELWHITEFLAG=0x1000\r\nval SC_FOLDLEVELHEADERFLAG=0x2000\r\nval SC_FOLDLEVELNUMBERMASK=0x0FFF\r\n\r\nali SC_FOLDLEVELWHITEFLAG=WHITE_FLAG\r\nali SC_FOLDLEVELHEADERFLAG=HEADER_FLAG\r\nali SC_FOLDLEVELNUMBERMASK=NUMBER_MASK\r\n\r\n# Set the fold level of a line.\r\n# This encodes an integer level along with flags indicating whether the\r\n# line is a header and whether it is effectively white space.\r\nset void SetFoldLevel=2222(line line, FoldLevel level)\r\n\r\n# Retrieve the fold level of a line.\r\nget FoldLevel GetFoldLevel=2223(line line,)\r\n\r\n# Find the last child line of a header line.\r\nget line GetLastChild=2224(line line, FoldLevel level)\r\n\r\n# Find the parent line of a child line.\r\nget line GetFoldParent=2225(line line,)\r\n\r\n# Make a range of lines visible.\r\nfun void ShowLines=2226(line lineStart, line lineEnd)\r\n\r\n# Make a range of lines invisible.\r\nfun void HideLines=2227(line lineStart, line lineEnd)\r\n\r\n# Is a line visible?\r\nget bool GetLineVisible=2228(line line,)\r\n\r\n# Are all lines visible?\r\nget bool GetAllLinesVisible=2236(,)\r\n\r\n# Show the children of a header line.\r\nset void SetFoldExpanded=2229(line line, bool expanded)\r\n\r\n# Is a header line expanded?\r\nget bool GetFoldExpanded=2230(line line,)\r\n\r\n# Switch a header line between expanded and contracted.\r\nfun void ToggleFold=2231(line line,)\r\n\r\n# Switch a header line between expanded and contracted and show some text after the line.\r\nfun void ToggleFoldShowText=2700(line line, string text)\r\n\r\nenu FoldDisplayTextStyle=SC_FOLDDISPLAYTEXT_\r\nval SC_FOLDDISPLAYTEXT_HIDDEN=0\r\nval SC_FOLDDISPLAYTEXT_STANDARD=1\r\nval SC_FOLDDISPLAYTEXT_BOXED=2\r\n\r\n# Set the style of fold display text.\r\nset void FoldDisplayTextSetStyle=2701(FoldDisplayTextStyle style,)\r\n\r\n# Get the style of fold display text.\r\nget FoldDisplayTextStyle FoldDisplayTextGetStyle=2707(,)\r\n\r\n# Set the default fold display text.\r\nfun void SetDefaultFoldDisplayText=2722(, string text)\r\n\r\n# Get the default fold display text.\r\nfun int GetDefaultFoldDisplayText=2723(, stringresult text)\r\n\r\nenu FoldAction=SC_FOLDACTION_\r\nval SC_FOLDACTION_CONTRACT=0\r\nval SC_FOLDACTION_EXPAND=1\r\nval SC_FOLDACTION_TOGGLE=2\r\nval SC_FOLDACTION_CONTRACT_EVERY_LEVEL=4\r\n\r\n# Expand or contract a fold header.\r\nfun void FoldLine=2237(line line, FoldAction action)\r\n\r\n# Expand or contract a fold header and its children.\r\nfun void FoldChildren=2238(line line, FoldAction action)\r\n\r\n# Expand a fold header and all children. Use the level argument instead of the line's current level.\r\nfun void ExpandChildren=2239(line line, FoldLevel level)\r\n\r\n# Expand or contract all fold headers.\r\nfun void FoldAll=2662(FoldAction action,)\r\n\r\n# Ensure a particular line is visible by expanding any header line hiding it.\r\nfun void EnsureVisible=2232(line line,)\r\n\r\nenu AutomaticFold=SC_AUTOMATICFOLD_\r\nval SC_AUTOMATICFOLD_NONE=0x0000\r\nval SC_AUTOMATICFOLD_SHOW=0x0001\r\nval SC_AUTOMATICFOLD_CLICK=0x0002\r\nval SC_AUTOMATICFOLD_CHANGE=0x0004\r\n\r\n# Set automatic folding behaviours.\r\nset void SetAutomaticFold=2663(AutomaticFold automaticFold,)\r\n\r\n# Get automatic folding behaviours.\r\nget AutomaticFold GetAutomaticFold=2664(,)\r\n\r\nenu FoldFlag=SC_FOLDFLAG_\r\nval SC_FOLDFLAG_NONE=0x0000\r\nval SC_FOLDFLAG_LINEBEFORE_EXPANDED=0x0002\r\nval SC_FOLDFLAG_LINEBEFORE_CONTRACTED=0x0004\r\nval SC_FOLDFLAG_LINEAFTER_EXPANDED=0x0008\r\nval SC_FOLDFLAG_LINEAFTER_CONTRACTED=0x0010\r\nval SC_FOLDFLAG_LEVELNUMBERS=0x0040\r\nval SC_FOLDFLAG_LINESTATE=0x0080\r\n\r\nali SC_FOLDFLAG_LINEBEFORE_EXPANDED=LINE_BEFORE_EXPANDED\r\nali SC_FOLDFLAG_LINEBEFORE_CONTRACTED=LINE_BEFORE_CONTRACTED\r\nali SC_FOLDFLAG_LINEAFTER_EXPANDED=LINE_AFTER_EXPANDED\r\nali SC_FOLDFLAG_LINEAFTER_CONTRACTED=LINE_AFTER_CONTRACTED\r\nali SC_FOLDFLAG_LEVELNUMBERS=LEVEL_NUMBERS\r\nali SC_FOLDFLAG_LINESTATE=LINE_STATE\r\n\r\n# Set some style options for folding.\r\nset void SetFoldFlags=2233(FoldFlag flags,)\r\n\r\n# Ensure a particular line is visible by expanding any header line hiding it.\r\n# Use the currently set visibility policy to determine which range to display.\r\nfun void EnsureVisibleEnforcePolicy=2234(line line,)\r\n\r\n# Sets whether a tab pressed when caret is within indentation indents.\r\nset void SetTabIndents=2260(bool tabIndents,)\r\n\r\n# Does a tab pressed when caret is within indentation indent?\r\nget bool GetTabIndents=2261(,)\r\n\r\n# Sets whether a backspace pressed when caret is within indentation unindents.\r\nset void SetBackSpaceUnIndents=2262(bool bsUnIndents,)\r\n\r\n# Does a backspace pressed when caret is within indentation unindent?\r\nget bool GetBackSpaceUnIndents=2263(,)\r\n\r\nval SC_TIME_FOREVER=10000000\r\n\r\n# Sets the time the mouse must sit still to generate a mouse dwell event.\r\nset void SetMouseDwellTime=2264(int periodMilliseconds,)\r\n\r\n# Retrieve the time the mouse must sit still to generate a mouse dwell event.\r\nget int GetMouseDwellTime=2265(,)\r\n\r\n# Get position of start of word.\r\nfun position WordStartPosition=2266(position pos, bool onlyWordCharacters)\r\n\r\n# Get position of end of word.\r\nfun position WordEndPosition=2267(position pos, bool onlyWordCharacters)\r\n\r\n# Is the range start..end considered a word?\r\nfun bool IsRangeWord=2691(position start, position end)\r\n\r\nenu IdleStyling=SC_IDLESTYLING_\r\nval SC_IDLESTYLING_NONE=0\r\nval SC_IDLESTYLING_TOVISIBLE=1\r\nval SC_IDLESTYLING_AFTERVISIBLE=2\r\nval SC_IDLESTYLING_ALL=3\r\n\r\nali SC_IDLESTYLING_TOVISIBLE=TO_VISIBLE\r\nali SC_IDLESTYLING_AFTERVISIBLE=AFTER_VISIBLE\r\n\r\n# Sets limits to idle styling.\r\nset void SetIdleStyling=2692(IdleStyling idleStyling,)\r\n\r\n# Retrieve the limits to idle styling.\r\nget IdleStyling GetIdleStyling=2693(,)\r\n\r\nenu Wrap=SC_WRAP_\r\nval SC_WRAP_NONE=0\r\nval SC_WRAP_WORD=1\r\nval SC_WRAP_CHAR=2\r\nval SC_WRAP_WHITESPACE=3\r\n\r\nali SC_WRAP_WHITESPACE=WHITE_SPACE\r\n\r\n# Sets whether text is word wrapped.\r\nset void SetWrapMode=2268(Wrap wrapMode,)\r\n\r\n# Retrieve whether text is word wrapped.\r\nget Wrap GetWrapMode=2269(,)\r\n\r\nenu WrapVisualFlag=SC_WRAPVISUALFLAG_\r\nval SC_WRAPVISUALFLAG_NONE=0x0000\r\nval SC_WRAPVISUALFLAG_END=0x0001\r\nval SC_WRAPVISUALFLAG_START=0x0002\r\nval SC_WRAPVISUALFLAG_MARGIN=0x0004\r\n\r\n# Set the display mode of visual flags for wrapped lines.\r\nset void SetWrapVisualFlags=2460(WrapVisualFlag wrapVisualFlags,)\r\n\r\n# Retrive the display mode of visual flags for wrapped lines.\r\nget WrapVisualFlag GetWrapVisualFlags=2461(,)\r\n\r\nenu WrapVisualLocation=SC_WRAPVISUALFLAGLOC_\r\nval SC_WRAPVISUALFLAGLOC_DEFAULT=0x0000\r\nval SC_WRAPVISUALFLAGLOC_END_BY_TEXT=0x0001\r\nval SC_WRAPVISUALFLAGLOC_START_BY_TEXT=0x0002\r\n\r\n# Set the location of visual flags for wrapped lines.\r\nset void SetWrapVisualFlagsLocation=2462(WrapVisualLocation wrapVisualFlagsLocation,)\r\n\r\n# Retrive the location of visual flags for wrapped lines.\r\nget WrapVisualLocation GetWrapVisualFlagsLocation=2463(,)\r\n\r\n# Set the start indent for wrapped lines.\r\nset void SetWrapStartIndent=2464(int indent,)\r\n\r\n# Retrive the start indent for wrapped lines.\r\nget int GetWrapStartIndent=2465(,)\r\n\r\nenu WrapIndentMode=SC_WRAPINDENT_\r\nval SC_WRAPINDENT_FIXED=0\r\nval SC_WRAPINDENT_SAME=1\r\nval SC_WRAPINDENT_INDENT=2\r\nval SC_WRAPINDENT_DEEPINDENT=3\r\n\r\nali SC_WRAPINDENT_DEEPINDENT=DEEP_INDENT\r\n\r\n# Sets how wrapped sublines are placed. Default is fixed.\r\nset void SetWrapIndentMode=2472(WrapIndentMode wrapIndentMode,)\r\n\r\n# Retrieve how wrapped sublines are placed. Default is fixed.\r\nget WrapIndentMode GetWrapIndentMode=2473(,)\r\n\r\nenu LineCache=SC_CACHE_\r\nval SC_CACHE_NONE=0\r\nval SC_CACHE_CARET=1\r\nval SC_CACHE_PAGE=2\r\nval SC_CACHE_DOCUMENT=3\r\n\r\n# Sets the degree of caching of layout information.\r\nset void SetLayoutCache=2272(LineCache cacheMode,)\r\n\r\n# Retrieve the degree of caching of layout information.\r\nget LineCache GetLayoutCache=2273(,)\r\n\r\n# Sets the document width assumed for scrolling.\r\nset void SetScrollWidth=2274(int pixelWidth,)\r\n\r\n# Retrieve the document width assumed for scrolling.\r\nget int GetScrollWidth=2275(,)\r\n\r\n# Sets whether the maximum width line displayed is used to set scroll width.\r\nset void SetScrollWidthTracking=2516(bool tracking,)\r\n\r\n# Retrieve whether the scroll width tracks wide lines.\r\nget bool GetScrollWidthTracking=2517(,)\r\n\r\n# Measure the pixel width of some text in a particular style.\r\n# NUL terminated text argument.\r\n# Does not handle tab or control characters.\r\nfun int TextWidth=2276(int style, string text)\r\n\r\n# Sets the scroll range so that maximum scroll position has\r\n# the last line at the bottom of the view (default).\r\n# Setting this to false allows scrolling one page below the last line.\r\nset void SetEndAtLastLine=2277(bool endAtLastLine,)\r\n\r\n# Retrieve whether the maximum scroll position has the last\r\n# line at the bottom of the view.\r\nget bool GetEndAtLastLine=2278(,)\r\n\r\n# Retrieve the height of a particular line of text in pixels.\r\nfun int TextHeight=2279(line line,)\r\n\r\n# Show or hide the vertical scroll bar.\r\nset void SetVScrollBar=2280(bool visible,)\r\n\r\n# Is the vertical scroll bar visible?\r\nget bool GetVScrollBar=2281(,)\r\n\r\n# Append a string to the end of the document without changing the selection.\r\nfun void AppendText=2282(position length, string text)\r\n\r\nenu PhasesDraw=SC_PHASES_\r\nval SC_PHASES_ONE=0\r\nval SC_PHASES_TWO=1\r\nval SC_PHASES_MULTIPLE=2\r\n\r\n# How many phases is drawing done in?\r\nget PhasesDraw GetPhasesDraw=2673(,)\r\n\r\n# In one phase draw, text is drawn in a series of rectangular blocks with no overlap.\r\n# In two phase draw, text is drawn in a series of lines allowing runs to overlap horizontally.\r\n# In multiple phase draw, each element is drawn over the whole drawing area, allowing text\r\n# to overlap from one line to the next.\r\nset void SetPhasesDraw=2674(PhasesDraw phases,)\r\n\r\n# Control font anti-aliasing.\r\n\r\nenu FontQuality=SC_EFF_\r\nval SC_EFF_QUALITY_MASK=0xF\r\nval SC_EFF_QUALITY_DEFAULT=0\r\nval SC_EFF_QUALITY_NON_ANTIALIASED=1\r\nval SC_EFF_QUALITY_ANTIALIASED=2\r\nval SC_EFF_QUALITY_LCD_OPTIMIZED=3\r\n\r\n# Choose the quality level for text from the FontQuality enumeration.\r\nset void SetFontQuality=2611(FontQuality fontQuality,)\r\n\r\n# Retrieve the quality level for text.\r\nget FontQuality GetFontQuality=2612(,)\r\n\r\n# Scroll so that a display line is at the top of the display.\r\nset void SetFirstVisibleLine=2613(line displayLine,)\r\n\r\nenu MultiPaste=SC_MULTIPASTE_\r\nval SC_MULTIPASTE_ONCE=0\r\nval SC_MULTIPASTE_EACH=1\r\n\r\n# Change the effect of pasting when there are multiple selections.\r\nset void SetMultiPaste=2614(MultiPaste multiPaste,)\r\n\r\n# Retrieve the effect of pasting when there are multiple selections.\r\nget MultiPaste GetMultiPaste=2615(,)\r\n\r\n# Retrieve the value of a tag from a regular expression search.\r\n# Result is NUL-terminated.\r\nget int GetTag=2616(int tagNumber, stringresult tagValue)\r\n\r\n# Join the lines in the target.\r\nfun void LinesJoin=2288(,)\r\n\r\n# Split the lines in the target into lines that are less wide than pixelWidth\r\n# where possible.\r\nfun void LinesSplit=2289(int pixelWidth,)\r\n\r\n# Set one of the colours used as a chequerboard pattern in the fold margin\r\nfun void SetFoldMarginColour=2290(bool useSetting, colour back)\r\n# Set the other colour used as a chequerboard pattern in the fold margin\r\nfun void SetFoldMarginHiColour=2291(bool useSetting, colour fore)\r\n\r\nenu Accessibility=SC_ACCESSIBILITY_\r\nval SC_ACCESSIBILITY_DISABLED=0\r\nval SC_ACCESSIBILITY_ENABLED=1\r\n\r\n# Enable or disable accessibility.\r\nset void SetAccessibility=2702(Accessibility accessibility,)\r\n\r\n# Report accessibility status.\r\nget Accessibility GetAccessibility=2703(,)\r\n\r\n## New messages go here\r\n\r\n## Start of key messages\r\n# Move caret down one line.\r\nfun void LineDown=2300(,)\r\n\r\n# Move caret down one line extending selection to new caret position.\r\nfun void LineDownExtend=2301(,)\r\n\r\n# Move caret up one line.\r\nfun void LineUp=2302(,)\r\n\r\n# Move caret up one line extending selection to new caret position.\r\nfun void LineUpExtend=2303(,)\r\n\r\n# Move caret left one character.\r\nfun void CharLeft=2304(,)\r\n\r\n# Move caret left one character extending selection to new caret position.\r\nfun void CharLeftExtend=2305(,)\r\n\r\n# Move caret right one character.\r\nfun void CharRight=2306(,)\r\n\r\n# Move caret right one character extending selection to new caret position.\r\nfun void CharRightExtend=2307(,)\r\n\r\n# Move caret left one word.\r\nfun void WordLeft=2308(,)\r\n\r\n# Move caret left one word extending selection to new caret position.\r\nfun void WordLeftExtend=2309(,)\r\n\r\n# Move caret right one word.\r\nfun void WordRight=2310(,)\r\n\r\n# Move caret right one word extending selection to new caret position.\r\nfun void WordRightExtend=2311(,)\r\n\r\n# Move caret to first position on line.\r\nfun void Home=2312(,)\r\n\r\n# Move caret to first position on line extending selection to new caret position.\r\nfun void HomeExtend=2313(,)\r\n\r\n# Move caret to last position on line.\r\nfun void LineEnd=2314(,)\r\n\r\n# Move caret to last position on line extending selection to new caret position.\r\nfun void LineEndExtend=2315(,)\r\n\r\n# Move caret to first position in document.\r\nfun void DocumentStart=2316(,)\r\n\r\n# Move caret to first position in document extending selection to new caret position.\r\nfun void DocumentStartExtend=2317(,)\r\n\r\n# Move caret to last position in document.\r\nfun void DocumentEnd=2318(,)\r\n\r\n# Move caret to last position in document extending selection to new caret position.\r\nfun void DocumentEndExtend=2319(,)\r\n\r\n# Move caret one page up.\r\nfun void PageUp=2320(,)\r\n\r\n# Move caret one page up extending selection to new caret position.\r\nfun void PageUpExtend=2321(,)\r\n\r\n# Move caret one page down.\r\nfun void PageDown=2322(,)\r\n\r\n# Move caret one page down extending selection to new caret position.\r\nfun void PageDownExtend=2323(,)\r\n\r\n# Switch from insert to overtype mode or the reverse.\r\nfun void EditToggleOvertype=2324(,)\r\n\r\n# Cancel any modes such as call tip or auto-completion list display.\r\nfun void Cancel=2325(,)\r\n\r\n# Delete the selection or if no selection, the character before the caret.\r\nfun void DeleteBack=2326(,)\r\n\r\n# If selection is empty or all on one line replace the selection with a tab character.\r\n# If more than one line selected, indent the lines.\r\nfun void Tab=2327(,)\r\n\r\n# Dedent the selected lines.\r\nfun void BackTab=2328(,)\r\n\r\n# Insert a new line, may use a CRLF, CR or LF depending on EOL mode.\r\nfun void NewLine=2329(,)\r\n\r\n# Insert a Form Feed character.\r\nfun void FormFeed=2330(,)\r\n\r\n# Move caret to before first visible character on line.\r\n# If already there move to first character on line.\r\nfun void VCHome=2331(,)\r\n\r\n# Like VCHome but extending selection to new caret position.\r\nfun void VCHomeExtend=2332(,)\r\n\r\n# Magnify the displayed text by increasing the sizes by 1 point.\r\nfun void ZoomIn=2333(,)\r\n\r\n# Make the displayed text smaller by decreasing the sizes by 1 point.\r\nfun void ZoomOut=2334(,)\r\n\r\n# Delete the word to the left of the caret.\r\nfun void DelWordLeft=2335(,)\r\n\r\n# Delete the word to the right of the caret.\r\nfun void DelWordRight=2336(,)\r\n\r\n# Delete the word to the right of the caret, but not the trailing non-word characters.\r\nfun void DelWordRightEnd=2518(,)\r\n\r\n# Cut the line containing the caret.\r\nfun void LineCut=2337(,)\r\n\r\n# Delete the line containing the caret.\r\nfun void LineDelete=2338(,)\r\n\r\n# Switch the current line with the previous.\r\nfun void LineTranspose=2339(,)\r\n\r\n# Reverse order of selected lines.\r\nfun void LineReverse=2354(,)\r\n\r\n# Duplicate the current line.\r\nfun void LineDuplicate=2404(,)\r\n\r\n# Transform the selection to lower case.\r\nfun void LowerCase=2340(,)\r\n\r\n# Transform the selection to upper case.\r\nfun void UpperCase=2341(,)\r\n\r\n# Scroll the document down, keeping the caret visible.\r\nfun void LineScrollDown=2342(,)\r\n\r\n# Scroll the document up, keeping the caret visible.\r\nfun void LineScrollUp=2343(,)\r\n\r\n# Delete the selection or if no selection, the character before the caret.\r\n# Will not delete the character before at the start of a line.\r\nfun void DeleteBackNotLine=2344(,)\r\n\r\n# Move caret to first position on display line.\r\nfun void HomeDisplay=2345(,)\r\n\r\n# Move caret to first position on display line extending selection to\r\n# new caret position.\r\nfun void HomeDisplayExtend=2346(,)\r\n\r\n# Move caret to last position on display line.\r\nfun void LineEndDisplay=2347(,)\r\n\r\n# Move caret to last position on display line extending selection to new\r\n# caret position.\r\nfun void LineEndDisplayExtend=2348(,)\r\n\r\n# Like Home but when word-wrap is enabled goes first to start of display line\r\n# HomeDisplay, then to start of document line Home.\r\nfun void HomeWrap=2349(,)\r\n\r\n# Like HomeExtend but when word-wrap is enabled extends first to start of display line\r\n# HomeDisplayExtend, then to start of document line HomeExtend.\r\nfun void HomeWrapExtend=2450(,)\r\n\r\n# Like LineEnd but when word-wrap is enabled goes first to end of display line\r\n# LineEndDisplay, then to start of document line LineEnd.\r\nfun void LineEndWrap=2451(,)\r\n\r\n# Like LineEndExtend but when word-wrap is enabled extends first to end of display line\r\n# LineEndDisplayExtend, then to start of document line LineEndExtend.\r\nfun void LineEndWrapExtend=2452(,)\r\n\r\n# Like VCHome but when word-wrap is enabled goes first to start of display line\r\n# VCHomeDisplay, then behaves like VCHome.\r\nfun void VCHomeWrap=2453(,)\r\n\r\n# Like VCHomeExtend but when word-wrap is enabled extends first to start of display line\r\n# VCHomeDisplayExtend, then behaves like VCHomeExtend.\r\nfun void VCHomeWrapExtend=2454(,)\r\n\r\n# Copy the line containing the caret.\r\nfun void LineCopy=2455(,)\r\n\r\n# Move the caret inside current view if it's not there already.\r\nfun void MoveCaretInsideView=2401(,)\r\n\r\n# How many characters are on a line, including end of line characters?\r\nfun position LineLength=2350(line line,)\r\n\r\n# Highlight the characters at two positions.\r\nfun void BraceHighlight=2351(position posA, position posB)\r\n\r\n# Use specified indicator to highlight matching braces instead of changing their style.\r\nfun void BraceHighlightIndicator=2498(bool useSetting, int indicator)\r\n\r\n# Highlight the character at a position indicating there is no matching brace.\r\nfun void BraceBadLight=2352(position pos,)\r\n\r\n# Use specified indicator to highlight non matching brace instead of changing its style.\r\nfun void BraceBadLightIndicator=2499(bool useSetting, int indicator)\r\n\r\n# Find the position of a matching brace or INVALID_POSITION if no match.\r\n# The maxReStyle must be 0 for now. It may be defined in a future release.\r\nfun position BraceMatch=2353(position pos, int maxReStyle)\r\n\r\n# Similar to BraceMatch, but matching starts at the explicit start position.\r\nfun position BraceMatchNext=2369(position pos, position startPos)\r\n\r\n# Are the end of line characters visible?\r\nget bool GetViewEOL=2355(,)\r\n\r\n# Make the end of line characters visible or invisible.\r\nset void SetViewEOL=2356(bool visible,)\r\n\r\n# Retrieve a pointer to the document object.\r\nget pointer GetDocPointer=2357(,)\r\n\r\n# Change the document object used.\r\nset void SetDocPointer=2358(, pointer doc)\r\n\r\n# Set which document modification events are sent to the container.\r\nset void SetModEventMask=2359(ModificationFlags eventMask,)\r\n\r\nenu EdgeVisualStyle=EDGE_\r\nval EDGE_NONE=0\r\nval EDGE_LINE=1\r\nval EDGE_BACKGROUND=2\r\nval EDGE_MULTILINE=3\r\n\r\nali EDGE_MULTILINE=MULTI_LINE\r\n\r\n# Retrieve the column number which text should be kept within.\r\nget position GetEdgeColumn=2360(,)\r\n\r\n# Set the column number of the edge.\r\n# If text goes past the edge then it is highlighted.\r\nset void SetEdgeColumn=2361(position column,)\r\n\r\n# Retrieve the edge highlight mode.\r\nget EdgeVisualStyle GetEdgeMode=2362(,)\r\n\r\n# The edge may be displayed by a line (EDGE_LINE/EDGE_MULTILINE) or by highlighting text that\r\n# goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE).\r\nset void SetEdgeMode=2363(EdgeVisualStyle edgeMode,)\r\n\r\n# Retrieve the colour used in edge indication.\r\nget colour GetEdgeColour=2364(,)\r\n\r\n# Change the colour used in edge indication.\r\nset void SetEdgeColour=2365(colour edgeColour,)\r\n\r\n# Add a new vertical edge to the view.\r\nfun void MultiEdgeAddLine=2694(position column, colour edgeColour)\r\n\r\n# Clear all vertical edges.\r\nfun void MultiEdgeClearAll=2695(,)\r\n\r\n# Get multi edge positions.\r\nget position GetMultiEdgeColumn=2749(int which,)\r\n\r\n# Sets the current caret position to be the search anchor.\r\nfun void SearchAnchor=2366(,)\r\n\r\n# Find some text starting at the search anchor.\r\n# Does not ensure the selection is visible.\r\nfun position SearchNext=2367(FindOption searchFlags, string text)\r\n\r\n# Find some text starting at the search anchor and moving backwards.\r\n# Does not ensure the selection is visible.\r\nfun position SearchPrev=2368(FindOption searchFlags, string text)\r\n\r\n# Retrieves the number of lines completely visible.\r\nget line LinesOnScreen=2370(,)\r\n\r\nenu PopUp=SC_POPUP_\r\nval SC_POPUP_NEVER=0\r\nval SC_POPUP_ALL=1\r\nval SC_POPUP_TEXT=2\r\n\r\n# Set whether a pop up menu is displayed automatically when the user presses\r\n# the wrong mouse button on certain areas.\r\nfun void UsePopUp=2371(PopUp popUpMode,)\r\n\r\n# Is the selection rectangular? The alternative is the more common stream selection.\r\nget bool SelectionIsRectangle=2372(,)\r\n\r\n# Set the zoom level. This number of points is added to the size of all fonts.\r\n# It may be positive to magnify or negative to reduce.\r\nset void SetZoom=2373(int zoomInPoints,)\r\n# Retrieve the zoom level.\r\nget int GetZoom=2374(,)\r\n\r\nenu DocumentOption=SC_DOCUMENTOPTION_\r\nval SC_DOCUMENTOPTION_DEFAULT=0\r\nval SC_DOCUMENTOPTION_STYLES_NONE=0x1\r\nval SC_DOCUMENTOPTION_TEXT_LARGE=0x100\r\n\r\n# Create a new document object.\r\n# Starts with reference count of 1 and not selected into editor.\r\nfun pointer CreateDocument=2375(position bytes, DocumentOption documentOptions)\r\n# Extend life of document.\r\nfun void AddRefDocument=2376(, pointer doc)\r\n# Release a reference to the document, deleting document if it fades to black.\r\nfun void ReleaseDocument=2377(, pointer doc)\r\n\r\n# Get which document options are set.\r\nget DocumentOption GetDocumentOptions=2379(,)\r\n\r\n# Get which document modification events are sent to the container.\r\nget ModificationFlags GetModEventMask=2378(,)\r\n\r\n# Set whether command events are sent to the container.\r\nset void SetCommandEvents=2717(bool commandEvents,)\r\n\r\n# Get whether command events are sent to the container.\r\nget bool GetCommandEvents=2718(,)\r\n\r\n# Change internal focus flag.\r\nset void SetFocus=2380(bool focus,)\r\n# Get internal focus flag.\r\nget bool GetFocus=2381(,)\r\n\r\nenu Status=SC_STATUS_\r\nval SC_STATUS_OK=0\r\nval SC_STATUS_FAILURE=1\r\nval SC_STATUS_BADALLOC=2\r\nval SC_STATUS_WARN_START=1000\r\nval SC_STATUS_WARN_REGEX=1001\r\n\r\nali SC_STATUS_BADALLOC=BAD_ALLOC\r\nali SC_STATUS_WARN_REGEX=REG_EX\r\n\r\n# Change error status - 0 = OK.\r\nset void SetStatus=2382(Status status,)\r\n# Get error status.\r\nget Status GetStatus=2383(,)\r\n\r\n# Set whether the mouse is captured when its button is pressed.\r\nset void SetMouseDownCaptures=2384(bool captures,)\r\n# Get whether mouse gets captured.\r\nget bool GetMouseDownCaptures=2385(,)\r\n\r\n# Set whether the mouse wheel can be active outside the window.\r\nset void SetMouseWheelCaptures=2696(bool captures,)\r\n# Get whether mouse wheel can be active outside the window.\r\nget bool GetMouseWheelCaptures=2697(,)\r\n\r\n# Sets the cursor to one of the SC_CURSOR* values.\r\nset void SetCursor=2386(CursorShape cursorType,)\r\n# Get cursor type.\r\nget CursorShape GetCursor=2387(,)\r\n\r\n# Change the way control characters are displayed:\r\n# If symbol is < 32, keep the drawn way, else, use the given character.\r\nset void SetControlCharSymbol=2388(int symbol,)\r\n# Get the way control characters are displayed.\r\nget int GetControlCharSymbol=2389(,)\r\n\r\n# Move to the previous change in capitalisation.\r\nfun void WordPartLeft=2390(,)\r\n# Move to the previous change in capitalisation extending selection\r\n# to new caret position.\r\nfun void WordPartLeftExtend=2391(,)\r\n# Move to the change next in capitalisation.\r\nfun void WordPartRight=2392(,)\r\n# Move to the next change in capitalisation extending selection\r\n# to new caret position.\r\nfun void WordPartRightExtend=2393(,)\r\n\r\n# Constants for use with SetVisiblePolicy, similar to SetCaretPolicy.\r\nenu VisiblePolicy=VISIBLE_\r\nval VISIBLE_SLOP=0x01\r\nval VISIBLE_STRICT=0x04\r\n\r\n# Set the way the display area is determined when a particular line\r\n# is to be moved to by Find, FindNext, GotoLine, etc.\r\nfun void SetVisiblePolicy=2394(VisiblePolicy visiblePolicy, int visibleSlop)\r\n\r\n# Delete back from the current position to the start of the line.\r\nfun void DelLineLeft=2395(,)\r\n\r\n# Delete forwards from the current position to the end of the line.\r\nfun void DelLineRight=2396(,)\r\n\r\n# Set the xOffset (ie, horizontal scroll position).\r\nset void SetXOffset=2397(int xOffset,)\r\n\r\n# Get the xOffset (ie, horizontal scroll position).\r\nget int GetXOffset=2398(,)\r\n\r\n# Set the last x chosen value to be the caret x position.\r\nfun void ChooseCaretX=2399(,)\r\n\r\n# Set the focus to this Scintilla widget.\r\nfun void GrabFocus=2400(,)\r\n\r\nenu CaretPolicy=CARET_\r\n# Caret policy, used by SetXCaretPolicy and SetYCaretPolicy.\r\n# If CARET_SLOP is set, we can define a slop value: caretSlop.\r\n# This value defines an unwanted zone (UZ) where the caret is... unwanted.\r\n# This zone is defined as a number of pixels near the vertical margins,\r\n# and as a number of lines near the horizontal margins.\r\n# By keeping the caret away from the edges, it is seen within its context,\r\n# so it is likely that the identifier that the caret is on can be completely seen,\r\n# and that the current line is seen with some of the lines following it which are\r\n# often dependent on that line.\r\nval CARET_SLOP=0x01\r\n# If CARET_STRICT is set, the policy is enforced... strictly.\r\n# The caret is centred on the display if slop is not set,\r\n# and cannot go in the UZ if slop is set.\r\nval CARET_STRICT=0x04\r\n# If CARET_JUMPS is set, the display is moved more energetically\r\n# so the caret can move in the same direction longer before the policy is applied again.\r\nval CARET_JUMPS=0x10\r\n# If CARET_EVEN is not set, instead of having symmetrical UZs,\r\n# the left and bottom UZs are extended up to right and top UZs respectively.\r\n# This way, we favour the displaying of useful information: the beginning of lines,\r\n# where most code reside, and the lines after the caret, eg. the body of a function.\r\nval CARET_EVEN=0x08\r\n\r\n# Set the way the caret is kept visible when going sideways.\r\n# The exclusion zone is given in pixels.\r\nfun void SetXCaretPolicy=2402(CaretPolicy caretPolicy, int caretSlop)\r\n\r\n# Set the way the line the caret is on is kept visible.\r\n# The exclusion zone is given in lines.\r\nfun void SetYCaretPolicy=2403(CaretPolicy caretPolicy, int caretSlop)\r\n\r\n# Set printing to line wrapped (SC_WRAP_WORD) or not line wrapped (SC_WRAP_NONE).\r\nset void SetPrintWrapMode=2406(Wrap wrapMode,)\r\n\r\n# Is printing line wrapped?\r\nget Wrap GetPrintWrapMode=2407(,)\r\n\r\n# Set a fore colour for active hotspots.\r\nset void SetHotspotActiveFore=2410(bool useSetting, colour fore)\r\n\r\n# Get the fore colour for active hotspots.\r\nget colour GetHotspotActiveFore=2494(,)\r\n\r\n# Set a back colour for active hotspots.\r\nset void SetHotspotActiveBack=2411(bool useSetting, colour back)\r\n\r\n# Get the back colour for active hotspots.\r\nget colour GetHotspotActiveBack=2495(,)\r\n\r\n# Enable / Disable underlining active hotspots.\r\nset void SetHotspotActiveUnderline=2412(bool underline,)\r\n\r\n# Get whether underlining for active hotspots.\r\nget bool GetHotspotActiveUnderline=2496(,)\r\n\r\n# Limit hotspots to single line so hotspots on two lines don't merge.\r\nset void SetHotspotSingleLine=2421(bool singleLine,)\r\n\r\n# Get the HotspotSingleLine property\r\nget bool GetHotspotSingleLine=2497(,)\r\n\r\n# Move caret down one paragraph (delimited by empty lines).\r\nfun void ParaDown=2413(,)\r\n\r\n# Extend selection down one paragraph (delimited by empty lines).\r\nfun void ParaDownExtend=2414(,)\r\n\r\n# Move caret up one paragraph (delimited by empty lines).\r\nfun void ParaUp=2415(,)\r\n\r\n# Extend selection up one paragraph (delimited by empty lines).\r\nfun void ParaUpExtend=2416(,)\r\n\r\n# Given a valid document position, return the previous position taking code\r\n# page into account. Returns 0 if passed 0.\r\nfun position PositionBefore=2417(position pos,)\r\n\r\n# Given a valid document position, return the next position taking code\r\n# page into account. Maximum value returned is the last position in the document.\r\nfun position PositionAfter=2418(position pos,)\r\n\r\n# Given a valid document position, return a position that differs in a number\r\n# of characters. Returned value is always between 0 and last position in document.\r\nfun position PositionRelative=2670(position pos, position relative)\r\n\r\n# Given a valid document position, return a position that differs in a number\r\n# of UTF-16 code units. Returned value is always between 0 and last position in document.\r\n# The result may point half way (2 bytes) inside a non-BMP character.\r\nfun position PositionRelativeCodeUnits=2716(position pos, position relative)\r\n\r\n# Copy a range of text to the clipboard. Positions are clipped into the document.\r\nfun void CopyRange=2419(position start, position end)\r\n\r\n# Copy argument text to the clipboard.\r\nfun void CopyText=2420(position length, string text)\r\n\r\nenu SelectionMode=SC_SEL_\r\nval SC_SEL_STREAM=0\r\nval SC_SEL_RECTANGLE=1\r\nval SC_SEL_LINES=2\r\nval SC_SEL_THIN=3\r\n\r\n# Set the selection mode to stream (SC_SEL_STREAM) or rectangular (SC_SEL_RECTANGLE/SC_SEL_THIN) or\r\n# by lines (SC_SEL_LINES).\r\nset void SetSelectionMode=2422(SelectionMode selectionMode,)\r\n\r\n# Set the selection mode to stream (SC_SEL_STREAM) or rectangular (SC_SEL_RECTANGLE/SC_SEL_THIN) or\r\n# by lines (SC_SEL_LINES) without changing MoveExtendsSelection.\r\nfun void ChangeSelectionMode=2659(SelectionMode selectionMode,)\r\n\r\n# Get the mode of the current selection.\r\nget SelectionMode GetSelectionMode=2423(,)\r\n\r\n# Set whether or not regular caret moves will extend or reduce the selection.\r\nset void SetMoveExtendsSelection=2719(bool moveExtendsSelection,)\r\n\r\n# Get whether or not regular caret moves will extend or reduce the selection.\r\nget bool GetMoveExtendsSelection=2706(,)\r\n\r\n# Retrieve the position of the start of the selection at the given line (INVALID_POSITION if no selection on this line).\r\nfun position GetLineSelStartPosition=2424(line line,)\r\n\r\n# Retrieve the position of the end of the selection at the given line (INVALID_POSITION if no selection on this line).\r\nfun position GetLineSelEndPosition=2425(line line,)\r\n\r\n## RectExtended rectangular selection moves\r\n# Move caret down one line, extending rectangular selection to new caret position.\r\nfun void LineDownRectExtend=2426(,)\r\n\r\n# Move caret up one line, extending rectangular selection to new caret position.\r\nfun void LineUpRectExtend=2427(,)\r\n\r\n# Move caret left one character, extending rectangular selection to new caret position.\r\nfun void CharLeftRectExtend=2428(,)\r\n\r\n# Move caret right one character, extending rectangular selection to new caret position.\r\nfun void CharRightRectExtend=2429(,)\r\n\r\n# Move caret to first position on line, extending rectangular selection to new caret position.\r\nfun void HomeRectExtend=2430(,)\r\n\r\n# Move caret to before first visible character on line.\r\n# If already there move to first character on line.\r\n# In either case, extend rectangular selection to new caret position.\r\nfun void VCHomeRectExtend=2431(,)\r\n\r\n# Move caret to last position on line, extending rectangular selection to new caret position.\r\nfun void LineEndRectExtend=2432(,)\r\n\r\n# Move caret one page up, extending rectangular selection to new caret position.\r\nfun void PageUpRectExtend=2433(,)\r\n\r\n# Move caret one page down, extending rectangular selection to new caret position.\r\nfun void PageDownRectExtend=2434(,)\r\n\r\n\r\n# Move caret to top of page, or one page up if already at top of page.\r\nfun void StutteredPageUp=2435(,)\r\n\r\n# Move caret to top of page, or one page up if already at top of page, extending selection to new caret position.\r\nfun void StutteredPageUpExtend=2436(,)\r\n\r\n# Move caret to bottom of page, or one page down if already at bottom of page.\r\nfun void StutteredPageDown=2437(,)\r\n\r\n# Move caret to bottom of page, or one page down if already at bottom of page, extending selection to new caret position.\r\nfun void StutteredPageDownExtend=2438(,)\r\n\r\n\r\n# Move caret left one word, position cursor at end of word.\r\nfun void WordLeftEnd=2439(,)\r\n\r\n# Move caret left one word, position cursor at end of word, extending selection to new caret position.\r\nfun void WordLeftEndExtend=2440(,)\r\n\r\n# Move caret right one word, position cursor at end of word.\r\nfun void WordRightEnd=2441(,)\r\n\r\n# Move caret right one word, position cursor at end of word, extending selection to new caret position.\r\nfun void WordRightEndExtend=2442(,)\r\n\r\n# Set the set of characters making up whitespace for when moving or selecting by word.\r\n# Should be called after SetWordChars.\r\nset void SetWhitespaceChars=2443(, string characters)\r\n\r\n# Get the set of characters making up whitespace for when moving or selecting by word.\r\nget int GetWhitespaceChars=2647(, stringresult characters)\r\n\r\n# Set the set of characters making up punctuation characters\r\n# Should be called after SetWordChars.\r\nset void SetPunctuationChars=2648(, string characters)\r\n\r\n# Get the set of characters making up punctuation characters\r\nget int GetPunctuationChars=2649(, stringresult characters)\r\n\r\n# Reset the set of characters for whitespace and word characters to the defaults.\r\nfun void SetCharsDefault=2444(,)\r\n\r\n# Get currently selected item position in the auto-completion list\r\nget int AutoCGetCurrent=2445(,)\r\n\r\n# Get currently selected item text in the auto-completion list\r\n# Returns the length of the item text\r\n# Result is NUL-terminated.\r\nget int AutoCGetCurrentText=2610(, stringresult text)\r\n\r\nenu CaseInsensitiveBehaviour=SC_CASEINSENSITIVEBEHAVIOUR_\r\nval SC_CASEINSENSITIVEBEHAVIOUR_RESPECTCASE=0\r\nval SC_CASEINSENSITIVEBEHAVIOUR_IGNORECASE=1\r\n\r\nali SC_CASEINSENSITIVEBEHAVIOUR_RESPECTCASE=RESPECT_CASE\r\nali SC_CASEINSENSITIVEBEHAVIOUR_IGNORECASE=IGNORE_CASE\r\n\r\n# Set auto-completion case insensitive behaviour to either prefer case-sensitive matches or have no preference.\r\nset void AutoCSetCaseInsensitiveBehaviour=2634(CaseInsensitiveBehaviour behaviour,)\r\n\r\n# Get auto-completion case insensitive behaviour.\r\nget CaseInsensitiveBehaviour AutoCGetCaseInsensitiveBehaviour=2635(,)\r\n\r\nenu MultiAutoComplete=SC_MULTIAUTOC_\r\nval SC_MULTIAUTOC_ONCE=0\r\nval SC_MULTIAUTOC_EACH=1\r\n\r\n# Change the effect of autocompleting when there are multiple selections.\r\nset void AutoCSetMulti=2636(MultiAutoComplete multi,)\r\n\r\n# Retrieve the effect of autocompleting when there are multiple selections.\r\nget MultiAutoComplete AutoCGetMulti=2637(,)\r\n\r\nenu Ordering=SC_ORDER_\r\nval SC_ORDER_PRESORTED=0\r\nval SC_ORDER_PERFORMSORT=1\r\nval SC_ORDER_CUSTOM=2\r\n\r\nali SC_ORDER_PRESORTED=PRE_SORTED\r\nali SC_ORDER_PERFORMSORT=PERFORM_SORT\r\n\r\n# Set the way autocompletion lists are ordered.\r\nset void AutoCSetOrder=2660(Ordering order,)\r\n\r\n# Get the way autocompletion lists are ordered.\r\nget Ordering AutoCGetOrder=2661(,)\r\n\r\n# Enlarge the document to a particular size of text bytes.\r\nfun void Allocate=2446(position bytes,)\r\n\r\n# Returns the target converted to UTF8.\r\n# Return the length in bytes.\r\nfun position TargetAsUTF8=2447(, stringresult s)\r\n\r\n# Set the length of the utf8 argument for calling EncodedFromUTF8.\r\n# Set to -1 and the string will be measured to the first nul.\r\nfun void SetLengthForEncode=2448(position bytes,)\r\n\r\n# Translates a UTF8 string into the document encoding.\r\n# Return the length of the result in bytes.\r\n# On error return 0.\r\nfun position EncodedFromUTF8=2449(string utf8, stringresult encoded)\r\n\r\n# Find the position of a column on a line taking into account tabs and\r\n# multi-byte characters. If beyond end of line, return line end position.\r\nfun position FindColumn=2456(line line, position column)\r\n\r\nenu CaretSticky=SC_CARETSTICKY_\r\nval SC_CARETSTICKY_OFF=0\r\nval SC_CARETSTICKY_ON=1\r\nval SC_CARETSTICKY_WHITESPACE=2\r\n\r\nali SC_CARETSTICKY_WHITESPACE=WHITE_SPACE\r\n\r\n# Can the caret preferred x position only be changed by explicit movement commands?\r\nget CaretSticky GetCaretSticky=2457(,)\r\n\r\n# Stop the caret preferred x position changing when the user types.\r\nset void SetCaretSticky=2458(CaretSticky useCaretStickyBehaviour,)\r\n\r\n# Switch between sticky and non-sticky: meant to be bound to a key.\r\nfun void ToggleCaretSticky=2459(,)\r\n\r\n# Enable/Disable convert-on-paste for line endings\r\nset void SetPasteConvertEndings=2467(bool convert,)\r\n\r\n# Get convert-on-paste setting\r\nget bool GetPasteConvertEndings=2468(,)\r\n\r\n# Replace the selection with text like a rectangular paste.\r\nfun void ReplaceRectangular=2771(position length, string text)\r\n\r\n# Duplicate the selection. If selection empty duplicate the line containing the caret.\r\nfun void SelectionDuplicate=2469(,)\r\n\r\n# Set background alpha of the caret line.\r\nset void SetCaretLineBackAlpha=2470(Alpha alpha,)\r\n\r\n# Get the background alpha of the caret line.\r\nget Alpha GetCaretLineBackAlpha=2471(,)\r\n\r\nenu CaretStyle=CARETSTYLE_\r\nval CARETSTYLE_INVISIBLE=0\r\nval CARETSTYLE_LINE=1\r\nval CARETSTYLE_BLOCK=2\r\nval CARETSTYLE_OVERSTRIKE_BAR=0\r\nval CARETSTYLE_OVERSTRIKE_BLOCK=0x10\r\nval CARETSTYLE_CURSES=0x20\r\nval CARETSTYLE_INS_MASK=0xF\r\nval CARETSTYLE_BLOCK_AFTER=0x100\r\n\r\n# Set the style of the caret to be drawn.\r\nset void SetCaretStyle=2512(CaretStyle caretStyle,)\r\n\r\n# Returns the current style of the caret.\r\nget CaretStyle GetCaretStyle=2513(,)\r\n\r\n# Set the indicator used for IndicatorFillRange and IndicatorClearRange\r\nset void SetIndicatorCurrent=2500(int indicator,)\r\n\r\n# Get the current indicator\r\nget int GetIndicatorCurrent=2501(,)\r\n\r\n# Set the value used for IndicatorFillRange\r\nset void SetIndicatorValue=2502(int value,)\r\n\r\n# Get the current indicator value\r\nget int GetIndicatorValue=2503(,)\r\n\r\n# Turn a indicator on over a range.\r\nfun void IndicatorFillRange=2504(position start, position lengthFill)\r\n\r\n# Turn a indicator off over a range.\r\nfun void IndicatorClearRange=2505(position start, position lengthClear)\r\n\r\n# Are any indicators present at pos?\r\nfun int IndicatorAllOnFor=2506(position pos,)\r\n\r\n# What value does a particular indicator have at a position?\r\nfun int IndicatorValueAt=2507(int indicator, position pos)\r\n\r\n# Where does a particular indicator start?\r\nfun position IndicatorStart=2508(int indicator, position pos)\r\n\r\n# Where does a particular indicator end?\r\nfun position IndicatorEnd=2509(int indicator, position pos)\r\n\r\n# Set number of entries in position cache\r\nset void SetPositionCache=2514(int size,)\r\n\r\n# How many entries are allocated to the position cache?\r\nget int GetPositionCache=2515(,)\r\n\r\n# Set maximum number of threads used for layout\r\nset void SetLayoutThreads=2775(int threads,)\r\n\r\n# Get maximum number of threads used for layout\r\nget int GetLayoutThreads=2776(,)\r\n\r\n# Copy the selection, if selection empty copy the line with the caret\r\nfun void CopyAllowLine=2519(,)\r\n\r\n# Compact the document buffer and return a read-only pointer to the\r\n# characters in the document.\r\nget pointer GetCharacterPointer=2520(,)\r\n\r\n# Return a read-only pointer to a range of characters in the document.\r\n# May move the gap so that the range is contiguous, but will only move up\r\n# to lengthRange bytes.\r\nget pointer GetRangePointer=2643(position start, position lengthRange)\r\n\r\n# Return a position which, to avoid performance costs, should not be within\r\n# the range of a call to GetRangePointer.\r\nget position GetGapPosition=2644(,)\r\n\r\n# Set the alpha fill colour of the given indicator.\r\nset void IndicSetAlpha=2523(int indicator, Alpha alpha)\r\n\r\n# Get the alpha fill colour of the given indicator.\r\nget Alpha IndicGetAlpha=2524(int indicator,)\r\n\r\n# Set the alpha outline colour of the given indicator.\r\nset void IndicSetOutlineAlpha=2558(int indicator, Alpha alpha)\r\n\r\n# Get the alpha outline colour of the given indicator.\r\nget Alpha IndicGetOutlineAlpha=2559(int indicator,)\r\n\r\n# Set extra ascent for each line\r\nset void SetExtraAscent=2525(int extraAscent,)\r\n\r\n# Get extra ascent for each line\r\nget int GetExtraAscent=2526(,)\r\n\r\n# Set extra descent for each line\r\nset void SetExtraDescent=2527(int extraDescent,)\r\n\r\n# Get extra descent for each line\r\nget int GetExtraDescent=2528(,)\r\n\r\n# Which symbol was defined for markerNumber with MarkerDefine\r\nfun int MarkerSymbolDefined=2529(int markerNumber,)\r\n\r\n# Set the text in the text margin for a line\r\nset void MarginSetText=2530(line line, string text)\r\n\r\n# Get the text in the text margin for a line\r\nget int MarginGetText=2531(line line, stringresult text)\r\n\r\n# Set the style number for the text margin for a line\r\nset void MarginSetStyle=2532(line line, int style)\r\n\r\n# Get the style number for the text margin for a line\r\nget int MarginGetStyle=2533(line line,)\r\n\r\n# Set the style in the text margin for a line\r\nset void MarginSetStyles=2534(line line, string styles)\r\n\r\n# Get the styles in the text margin for a line\r\nget int MarginGetStyles=2535(line line, stringresult styles)\r\n\r\n# Clear the margin text on all lines\r\nfun void MarginTextClearAll=2536(,)\r\n\r\n# Get the start of the range of style numbers used for margin text\r\nset void MarginSetStyleOffset=2537(int style,)\r\n\r\n# Get the start of the range of style numbers used for margin text\r\nget int MarginGetStyleOffset=2538(,)\r\n\r\nenu MarginOption=SC_MARGINOPTION_\r\nval SC_MARGINOPTION_NONE=0\r\nval SC_MARGINOPTION_SUBLINESELECT=1\r\n\r\nali SC_MARGINOPTION_SUBLINESELECT=SUB_LINE_SELECT\r\n\r\n# Set the margin options.\r\nset void SetMarginOptions=2539(MarginOption marginOptions,)\r\n\r\n# Get the margin options.\r\nget MarginOption GetMarginOptions=2557(,)\r\n\r\n# Set the annotation text for a line\r\nset void AnnotationSetText=2540(line line, string text)\r\n\r\n# Get the annotation text for a line\r\nget int AnnotationGetText=2541(line line, stringresult text)\r\n\r\n# Set the style number for the annotations for a line\r\nset void AnnotationSetStyle=2542(line line, int style)\r\n\r\n# Get the style number for the annotations for a line\r\nget int AnnotationGetStyle=2543(line line,)\r\n\r\n# Set the annotation styles for a line\r\nset void AnnotationSetStyles=2544(line line, string styles)\r\n\r\n# Get the annotation styles for a line\r\nget int AnnotationGetStyles=2545(line line, stringresult styles)\r\n\r\n# Get the number of annotation lines for a line\r\nget int AnnotationGetLines=2546(line line,)\r\n\r\n# Clear the annotations from all lines\r\nfun void AnnotationClearAll=2547(,)\r\n\r\nenu AnnotationVisible=ANNOTATION_\r\nval ANNOTATION_HIDDEN=0\r\nval ANNOTATION_STANDARD=1\r\nval ANNOTATION_BOXED=2\r\nval ANNOTATION_INDENTED=3\r\n\r\n# Set the visibility for the annotations for a view\r\nset void AnnotationSetVisible=2548(AnnotationVisible visible,)\r\n\r\n# Get the visibility for the annotations for a view\r\nget AnnotationVisible AnnotationGetVisible=2549(,)\r\n\r\n# Get the start of the range of style numbers used for annotations\r\nset void AnnotationSetStyleOffset=2550(int style,)\r\n\r\n# Get the start of the range of style numbers used for annotations\r\nget int AnnotationGetStyleOffset=2551(,)\r\n\r\n# Release all extended (>255) style numbers\r\nfun void ReleaseAllExtendedStyles=2552(,)\r\n\r\n# Allocate some extended (>255) style numbers and return the start of the range\r\nfun int AllocateExtendedStyles=2553(int numberStyles,)\r\n\r\nenu UndoFlags=UNDO_\r\nval UNDO_NONE=0\r\nval UNDO_MAY_COALESCE=1\r\n\r\n# Add a container action to the undo stack\r\nfun void AddUndoAction=2560(int token, UndoFlags flags)\r\n\r\n# Find the position of a character from a point within the window.\r\nfun position CharPositionFromPoint=2561(int x, int y)\r\n\r\n# Find the position of a character from a point within the window.\r\n# Return INVALID_POSITION if not close to text.\r\nfun position CharPositionFromPointClose=2562(int x, int y)\r\n\r\n# Set whether switching to rectangular mode while selecting with the mouse is allowed.\r\nset void SetMouseSelectionRectangularSwitch=2668(bool mouseSelectionRectangularSwitch,)\r\n\r\n# Whether switching to rectangular mode while selecting with the mouse is allowed.\r\nget bool GetMouseSelectionRectangularSwitch=2669(,)\r\n\r\n# Set whether multiple selections can be made\r\nset void SetMultipleSelection=2563(bool multipleSelection,)\r\n\r\n# Whether multiple selections can be made\r\nget bool GetMultipleSelection=2564(,)\r\n\r\n# Set whether typing can be performed into multiple selections\r\nset void SetAdditionalSelectionTyping=2565(bool additionalSelectionTyping,)\r\n\r\n# Whether typing can be performed into multiple selections\r\nget bool GetAdditionalSelectionTyping=2566(,)\r\n\r\n# Set whether additional carets will blink\r\nset void SetAdditionalCaretsBlink=2567(bool additionalCaretsBlink,)\r\n\r\n# Whether additional carets will blink\r\nget bool GetAdditionalCaretsBlink=2568(,)\r\n\r\n# Set whether additional carets are visible\r\nset void SetAdditionalCaretsVisible=2608(bool additionalCaretsVisible,)\r\n\r\n# Whether additional carets are visible\r\nget bool GetAdditionalCaretsVisible=2609(,)\r\n\r\n# How many selections are there?\r\nget int GetSelections=2570(,)\r\n\r\n# Is every selected range empty?\r\nget bool GetSelectionEmpty=2650(,)\r\n\r\n# Clear selections to a single empty stream selection\r\nfun void ClearSelections=2571(,)\r\n\r\n# Set a simple selection\r\nfun void SetSelection=2572(position caret, position anchor)\r\n\r\n# Add a selection\r\nfun void AddSelection=2573(position caret, position anchor)\r\n\r\n# Find the selection index for a point. -1 when not at a selection.\r\nfun int SelectionFromPoint=2474(int x, int y)\r\n\r\n# Drop one selection\r\nfun void DropSelectionN=2671(int selection,)\r\n\r\n# Set the main selection\r\nset void SetMainSelection=2574(int selection,)\r\n\r\n# Which selection is the main selection\r\nget int GetMainSelection=2575(,)\r\n\r\n# Set the caret position of the nth selection.\r\nset void SetSelectionNCaret=2576(int selection, position caret)\r\n\r\n# Return the caret position of the nth selection.\r\nget position GetSelectionNCaret=2577(int selection,)\r\n\r\n# Set the anchor position of the nth selection.\r\nset void SetSelectionNAnchor=2578(int selection, position anchor)\r\n\r\n# Return the anchor position of the nth selection.\r\nget position GetSelectionNAnchor=2579(int selection,)\r\n\r\n# Set the virtual space of the caret of the nth selection.\r\nset void SetSelectionNCaretVirtualSpace=2580(int selection, position space)\r\n\r\n# Return the virtual space of the caret of the nth selection.\r\nget position GetSelectionNCaretVirtualSpace=2581(int selection,)\r\n\r\n# Set the virtual space of the anchor of the nth selection.\r\nset void SetSelectionNAnchorVirtualSpace=2582(int selection, position space)\r\n\r\n# Return the virtual space of the anchor of the nth selection.\r\nget position GetSelectionNAnchorVirtualSpace=2583(int selection,)\r\n\r\n# Sets the position that starts the selection - this becomes the anchor.\r\nset void SetSelectionNStart=2584(int selection, position anchor)\r\n\r\n# Returns the position at the start of the selection.\r\nget position GetSelectionNStart=2585(int selection,)\r\n\r\n# Returns the virtual space at the start of the selection.\r\nget position GetSelectionNStartVirtualSpace=2726(int selection,)\r\n\r\n# Sets the position that ends the selection - this becomes the currentPosition.\r\nset void SetSelectionNEnd=2586(int selection, position caret)\r\n\r\n# Returns the virtual space at the end of the selection.\r\nget position GetSelectionNEndVirtualSpace=2727(int selection,)\r\n\r\n# Returns the position at the end of the selection.\r\nget position GetSelectionNEnd=2587(int selection,)\r\n\r\n# Set the caret position of the rectangular selection.\r\nset void SetRectangularSelectionCaret=2588(position caret,)\r\n\r\n# Return the caret position of the rectangular selection.\r\nget position GetRectangularSelectionCaret=2589(,)\r\n\r\n# Set the anchor position of the rectangular selection.\r\nset void SetRectangularSelectionAnchor=2590(position anchor,)\r\n\r\n# Return the anchor position of the rectangular selection.\r\nget position GetRectangularSelectionAnchor=2591(,)\r\n\r\n# Set the virtual space of the caret of the rectangular selection.\r\nset void SetRectangularSelectionCaretVirtualSpace=2592(position space,)\r\n\r\n# Return the virtual space of the caret of the rectangular selection.\r\nget position GetRectangularSelectionCaretVirtualSpace=2593(,)\r\n\r\n# Set the virtual space of the anchor of the rectangular selection.\r\nset void SetRectangularSelectionAnchorVirtualSpace=2594(position space,)\r\n\r\n# Return the virtual space of the anchor of the rectangular selection.\r\nget position GetRectangularSelectionAnchorVirtualSpace=2595(,)\r\n\r\nenu VirtualSpace=SCVS_\r\nval SCVS_NONE=0\r\nval SCVS_RECTANGULARSELECTION=1\r\nval SCVS_USERACCESSIBLE=2\r\nval SCVS_NOWRAPLINESTART=4\r\n\r\nali SCVS_RECTANGULARSELECTION=RECTANGULAR_SELECTION\r\nali SCVS_USERACCESSIBLE=USER_ACCESSIBLE\r\nali SCVS_NOWRAPLINESTART=NO_WRAP_LINE_START\r\n\r\n# Set options for virtual space behaviour.\r\nset void SetVirtualSpaceOptions=2596(VirtualSpace virtualSpaceOptions,)\r\n\r\n# Return options for virtual space behaviour.\r\nget VirtualSpace GetVirtualSpaceOptions=2597(,)\r\n\r\n# On GTK, allow selecting the modifier key to use for mouse-based\r\n# rectangular selection. Often the window manager requires Alt+Mouse Drag\r\n# for moving windows.\r\n# Valid values are SCMOD_CTRL(default), SCMOD_ALT, or SCMOD_SUPER.\r\n\r\nset void SetRectangularSelectionModifier=2598(int modifier,)\r\n\r\n# Get the modifier key used for rectangular selection.\r\nget int GetRectangularSelectionModifier=2599(,)\r\n\r\n# Set the foreground colour of additional selections.\r\n# Must have previously called SetSelFore with non-zero first argument for this to have an effect.\r\nset void SetAdditionalSelFore=2600(colour fore,)\r\n\r\n# Set the background colour of additional selections.\r\n# Must have previously called SetSelBack with non-zero first argument for this to have an effect.\r\nset void SetAdditionalSelBack=2601(colour back,)\r\n\r\n# Set the alpha of the selection.\r\nset void SetAdditionalSelAlpha=2602(Alpha alpha,)\r\n\r\n# Get the alpha of the selection.\r\nget Alpha GetAdditionalSelAlpha=2603(,)\r\n\r\n# Set the foreground colour of additional carets.\r\nset void SetAdditionalCaretFore=2604(colour fore,)\r\n\r\n# Get the foreground colour of additional carets.\r\nget colour GetAdditionalCaretFore=2605(,)\r\n\r\n# Set the main selection to the next selection.\r\nfun void RotateSelection=2606(,)\r\n\r\n# Swap that caret and anchor of the main selection.\r\nfun void SwapMainAnchorCaret=2607(,)\r\n\r\n# Add the next occurrence of the main selection to the set of selections as main.\r\n# If the current selection is empty then select word around caret.\r\nfun void MultipleSelectAddNext=2688(,)\r\n\r\n# Add each occurrence of the main selection in the target to the set of selections.\r\n# If the current selection is empty then select word around caret.\r\nfun void MultipleSelectAddEach=2689(,)\r\n\r\n# Indicate that the internal state of a lexer has changed over a range and therefore\r\n# there may be a need to redraw.\r\nfun int ChangeLexerState=2617(position start, position end)\r\n\r\n# Find the next line at or after lineStart that is a contracted fold header line.\r\n# Return -1 when no more lines.\r\nfun line ContractedFoldNext=2618(line lineStart,)\r\n\r\n# Centre current line in window.\r\nfun void VerticalCentreCaret=2619(,)\r\n\r\n# Move the selected lines up one line, shifting the line above after the selection\r\nfun void MoveSelectedLinesUp=2620(,)\r\n\r\n# Move the selected lines down one line, shifting the line below before the selection\r\nfun void MoveSelectedLinesDown=2621(,)\r\n\r\n# Set the identifier reported as idFrom in notification messages.\r\nset void SetIdentifier=2622(int identifier,)\r\n\r\n# Get the identifier.\r\nget int GetIdentifier=2623(,)\r\n\r\n# Set the width for future RGBA image data.\r\nset void RGBAImageSetWidth=2624(int width,)\r\n\r\n# Set the height for future RGBA image data.\r\nset void RGBAImageSetHeight=2625(int height,)\r\n\r\n# Set the scale factor in percent for future RGBA image data.\r\nset void RGBAImageSetScale=2651(int scalePercent,)\r\n\r\n# Define a marker from RGBA data.\r\n# It has the width and height from RGBAImageSetWidth/Height\r\nfun void MarkerDefineRGBAImage=2626(int markerNumber, string pixels)\r\n\r\n# Register an RGBA image for use in autocompletion lists.\r\n# It has the width and height from RGBAImageSetWidth/Height\r\nfun void RegisterRGBAImage=2627(int type, string pixels)\r\n\r\n# Scroll to start of document.\r\nfun void ScrollToStart=2628(,)\r\n\r\n# Scroll to end of document.\r\nfun void ScrollToEnd=2629(,)\r\n\r\nenu Technology=SC_TECHNOLOGY_\r\nval SC_TECHNOLOGY_DEFAULT=0\r\nval SC_TECHNOLOGY_DIRECTWRITE=1\r\nval SC_TECHNOLOGY_DIRECTWRITERETAIN=2\r\nval SC_TECHNOLOGY_DIRECTWRITEDC=3\r\n\r\nali SC_TECHNOLOGY_DIRECTWRITE=DIRECT_WRITE\r\nali SC_TECHNOLOGY_DIRECTWRITERETAIN=DIRECT_WRITE_RETAIN\r\nali SC_TECHNOLOGY_DIRECTWRITEDC=DIRECT_WRITE_D_C\r\n\r\n# Set the technology used.\r\nset void SetTechnology=2630(Technology technology,)\r\n\r\n# Get the tech.\r\nget Technology GetTechnology=2631(,)\r\n\r\n# Create an ILoader*.\r\nfun pointer CreateLoader=2632(position bytes, DocumentOption documentOptions)\r\n\r\n# On macOS, show a find indicator.\r\nfun void FindIndicatorShow=2640(position start, position end)\r\n\r\n# On macOS, flash a find indicator, then fade out.\r\nfun void FindIndicatorFlash=2641(position start, position end)\r\n\r\n# On macOS, hide the find indicator.\r\nfun void FindIndicatorHide=2642(,)\r\n\r\n# Move caret to before first visible character on display line.\r\n# If already there move to first character on display line.\r\nfun void VCHomeDisplay=2652(,)\r\n\r\n# Like VCHomeDisplay but extending selection to new caret position.\r\nfun void VCHomeDisplayExtend=2653(,)\r\n\r\n# Is the caret line always visible?\r\nget bool GetCaretLineVisibleAlways=2654(,)\r\n\r\n# Sets the caret line to always visible.\r\nset void SetCaretLineVisibleAlways=2655(bool alwaysVisible,)\r\n\r\n# Line end types which may be used in addition to LF, CR, and CRLF\r\n# SC_LINE_END_TYPE_UNICODE includes U+2028 Line Separator,\r\n# U+2029 Paragraph Separator, and U+0085 Next Line\r\nenu LineEndType=SC_LINE_END_TYPE_\r\nval SC_LINE_END_TYPE_DEFAULT=0\r\nval SC_LINE_END_TYPE_UNICODE=1\r\n\r\n# Set the line end types that the application wants to use. May not be used if incompatible with lexer or encoding.\r\nset void SetLineEndTypesAllowed=2656(LineEndType lineEndBitSet,)\r\n\r\n# Get the line end types currently allowed.\r\nget LineEndType GetLineEndTypesAllowed=2657(,)\r\n\r\n# Get the line end types currently recognised. May be a subset of the allowed types due to lexer limitation.\r\nget LineEndType GetLineEndTypesActive=2658(,)\r\n\r\n# Set the way a character is drawn.\r\nset void SetRepresentation=2665(string encodedCharacter, string representation)\r\n\r\n# Get the way a character is drawn.\r\n# Result is NUL-terminated.\r\nget int GetRepresentation=2666(string encodedCharacter, stringresult representation)\r\n\r\n# Remove a character representation.\r\nfun void ClearRepresentation=2667(string encodedCharacter,)\r\n\r\n# Clear representations to default.\r\nfun void ClearAllRepresentations=2770(,)\r\n\r\n# Can draw representations in various ways\r\nenu RepresentationAppearance=SC_REPRESENTATION\r\nval SC_REPRESENTATION_PLAIN=0\r\nval SC_REPRESENTATION_BLOB=1\r\nval SC_REPRESENTATION_COLOUR=0x10\r\n\r\n# Set the appearance of a representation.\r\nset void SetRepresentationAppearance=2766(string encodedCharacter, RepresentationAppearance appearance)\r\n\r\n# Get the appearance of a representation.\r\nget RepresentationAppearance GetRepresentationAppearance=2767(string encodedCharacter,)\r\n\r\n# Set the colour of a representation.\r\nset void SetRepresentationColour=2768(string encodedCharacter, colouralpha colour)\r\n\r\n# Get the colour of a representation.\r\nget colouralpha GetRepresentationColour=2769(string encodedCharacter,)\r\n\r\n# Set the end of line annotation text for a line\r\nset void EOLAnnotationSetText=2740(line line, string text)\r\n\r\n# Get the end of line annotation text for a line\r\nget int EOLAnnotationGetText=2741(line line, stringresult text)\r\n\r\n# Set the style number for the end of line annotations for a line\r\nset void EOLAnnotationSetStyle=2742(line line, int style)\r\n\r\n# Get the style number for the end of line annotations for a line\r\nget int EOLAnnotationGetStyle=2743(line line,)\r\n\r\n# Clear the end of annotations from all lines\r\nfun void EOLAnnotationClearAll=2744(,)\r\n\r\nenu EOLAnnotationVisible=EOLANNOTATION_\r\nval EOLANNOTATION_HIDDEN=0x0\r\nval EOLANNOTATION_STANDARD=0x1\r\nval EOLANNOTATION_BOXED=0x2\r\nval EOLANNOTATION_STADIUM=0x100\r\nval EOLANNOTATION_FLAT_CIRCLE=0x101\r\nval EOLANNOTATION_ANGLE_CIRCLE=0x102\r\nval EOLANNOTATION_CIRCLE_FLAT=0x110\r\nval EOLANNOTATION_FLATS=0x111\r\nval EOLANNOTATION_ANGLE_FLAT=0x112\r\nval EOLANNOTATION_CIRCLE_ANGLE=0x120\r\nval EOLANNOTATION_FLAT_ANGLE=0x121\r\nval EOLANNOTATION_ANGLES=0x122\r\n\r\n# Set the visibility for the end of line annotations for a view\r\nset void EOLAnnotationSetVisible=2745(EOLAnnotationVisible visible,)\r\n\r\n# Get the visibility for the end of line annotations for a view\r\nget EOLAnnotationVisible EOLAnnotationGetVisible=2746(,)\r\n\r\n# Get the start of the range of style numbers used for end of line annotations\r\nset void EOLAnnotationSetStyleOffset=2747(int style,)\r\n\r\n# Get the start of the range of style numbers used for end of line annotations\r\nget int EOLAnnotationGetStyleOffset=2748(,)\r\n\r\nenu Supports=SC_SUPPORTS_\r\nval SC_SUPPORTS_LINE_DRAWS_FINAL=0\r\nval SC_SUPPORTS_PIXEL_DIVISIONS=1\r\nval SC_SUPPORTS_FRACTIONAL_STROKE_WIDTH=2\r\nval SC_SUPPORTS_TRANSLUCENT_STROKE=3\r\nval SC_SUPPORTS_PIXEL_MODIFICATION=4\r\nval SC_SUPPORTS_THREAD_SAFE_MEASURE_WIDTHS=5\r\n\r\n# Get whether a feature is supported\r\nget bool SupportsFeature=2750(Supports feature,)\r\n\r\nenu LineCharacterIndexType=SC_LINECHARACTERINDEX_\r\nval SC_LINECHARACTERINDEX_NONE=0\r\nval SC_LINECHARACTERINDEX_UTF32=1\r\nval SC_LINECHARACTERINDEX_UTF16=2\r\n\r\n# Retrieve line character index state.\r\nget LineCharacterIndexType GetLineCharacterIndex=2710(,)\r\n\r\n# Request line character index be created or its use count increased.\r\nfun void AllocateLineCharacterIndex=2711(LineCharacterIndexType lineCharacterIndex,)\r\n\r\n# Decrease use count of line character index and remove if 0.\r\nfun void ReleaseLineCharacterIndex=2712(LineCharacterIndexType lineCharacterIndex,)\r\n\r\n# Retrieve the document line containing a position measured in index units.\r\nfun line LineFromIndexPosition=2713(position pos, LineCharacterIndexType lineCharacterIndex)\r\n\r\n# Retrieve the position measured in index units at the start of a document line.\r\nfun position IndexPositionFromLine=2714(line line, LineCharacterIndexType lineCharacterIndex)\r\n\r\n# Start notifying the container of all key presses and commands.\r\nfun void StartRecord=3001(,)\r\n\r\n# Stop notifying the container of all key presses and commands.\r\nfun void StopRecord=3002(,)\r\n\r\n# Retrieve the lexing language of the document.\r\nget int GetLexer=4002(,)\r\n\r\n# Colourise a segment of the document using the current lexing language.\r\nfun void Colourise=4003(position start, position end)\r\n\r\n# Set up a value that may be used by a lexer for some optional feature.\r\nset void SetProperty=4004(string key, string value)\r\n\r\n# Maximum value of keywordSet parameter of SetKeyWords.\r\nval KEYWORDSET_MAX=8\r\n\r\n# Set up the key words used by the lexer.\r\nset void SetKeyWords=4005(int keyWordSet, string keyWords)\r\n\r\n# Retrieve a \"property\" value previously set with SetProperty.\r\n# Result is NUL-terminated.\r\nget int GetProperty=4008(string key, stringresult value)\r\n\r\n# Retrieve a \"property\" value previously set with SetProperty,\r\n# with \"$()\" variable replacement on returned buffer.\r\n# Result is NUL-terminated.\r\nget int GetPropertyExpanded=4009(string key, stringresult value)\r\n\r\n# Retrieve a \"property\" value previously set with SetProperty,\r\n# interpreted as an int AFTER any \"$()\" variable replacement.\r\nget int GetPropertyInt=4010(string key, int defaultValue)\r\n\r\n# Retrieve the name of the lexer.\r\n# Return the length of the text.\r\n# Result is NUL-terminated.\r\nget int GetLexerLanguage=4012(, stringresult language)\r\n\r\n# For private communication between an application and a known lexer.\r\nfun pointer PrivateLexerCall=4013(int operation, pointer pointer)\r\n\r\n# Retrieve a '\\n' separated list of properties understood by the current lexer.\r\n# Result is NUL-terminated.\r\nfun int PropertyNames=4014(, stringresult names)\r\n\r\nenu TypeProperty=SC_TYPE_\r\nval SC_TYPE_BOOLEAN=0\r\nval SC_TYPE_INTEGER=1\r\nval SC_TYPE_STRING=2\r\n\r\n# Retrieve the type of a property.\r\nfun TypeProperty PropertyType=4015(string name,)\r\n\r\n# Describe a property.\r\n# Result is NUL-terminated.\r\nfun int DescribeProperty=4016(string name, stringresult description)\r\n\r\n# Retrieve a '\\n' separated list of descriptions of the keyword sets understood by the current lexer.\r\n# Result is NUL-terminated.\r\nfun int DescribeKeyWordSets=4017(, stringresult descriptions)\r\n\r\n# Bit set of LineEndType enumertion for which line ends beyond the standard\r\n# LF, CR, and CRLF are supported by the lexer.\r\nget LineEndType GetLineEndTypesSupported=4018(,)\r\n\r\n# Allocate a set of sub styles for a particular base style, returning start of range\r\nfun int AllocateSubStyles=4020(int styleBase, int numberStyles)\r\n\r\n# The starting style number for the sub styles associated with a base style\r\nget int GetSubStylesStart=4021(int styleBase,)\r\n\r\n# The number of sub styles associated with a base style\r\nget int GetSubStylesLength=4022(int styleBase,)\r\n\r\n# For a sub style, return the base style, else return the argument.\r\nget int GetStyleFromSubStyle=4027(int subStyle,)\r\n\r\n# For a secondary style, return the primary style, else return the argument.\r\nget int GetPrimaryStyleFromStyle=4028(int style,)\r\n\r\n# Free allocated sub styles\r\nfun void FreeSubStyles=4023(,)\r\n\r\n# Set the identifiers that are shown in a particular style\r\nset void SetIdentifiers=4024(int style, string identifiers)\r\n\r\n# Where styles are duplicated by a feature such as active/inactive code\r\n# return the distance between the two types.\r\nget int DistanceToSecondaryStyles=4025(,)\r\n\r\n# Get the set of base styles that can be extended with sub styles\r\n# Result is NUL-terminated.\r\nget int GetSubStyleBases=4026(, stringresult styles)\r\n\r\n# Retrieve the number of named styles for the lexer.\r\nget int GetNamedStyles=4029(,)\r\n\r\n# Retrieve the name of a style.\r\n# Result is NUL-terminated.\r\nfun int NameOfStyle=4030(int style, stringresult name)\r\n\r\n# Retrieve a ' ' separated list of style tags like \"literal quoted string\".\r\n# Result is NUL-terminated.\r\nfun int TagsOfStyle=4031(int style, stringresult tags)\r\n\r\n# Retrieve a description of a style.\r\n# Result is NUL-terminated.\r\nfun int DescriptionOfStyle=4032(int style, stringresult description)\r\n\r\n# Set the lexer from an ILexer*.\r\nset void SetILexer=4033(, pointer ilexer)\r\n\r\n# Notifications\r\n# Type of modification and the action which caused the modification.\r\n# These are defined as a bit mask to make it easy to specify which notifications are wanted.\r\n# One bit is set from each of SC_MOD_* and SC_PERFORMED_*.\r\nenu ModificationFlags=SC_MOD_ SC_PERFORMED_ SC_MULTISTEPUNDOREDO SC_LASTSTEPINUNDOREDO SC_MULTILINEUNDOREDO SC_STARTACTION SC_MODEVENTMASKALL\r\nval SC_MOD_NONE=0x0\r\nval SC_MOD_INSERTTEXT=0x1\r\nval SC_MOD_DELETETEXT=0x2\r\nval SC_MOD_CHANGESTYLE=0x4\r\nval SC_MOD_CHANGEFOLD=0x8\r\nval SC_PERFORMED_USER=0x10\r\nval SC_PERFORMED_UNDO=0x20\r\nval SC_PERFORMED_REDO=0x40\r\nval SC_MULTISTEPUNDOREDO=0x80\r\nval SC_LASTSTEPINUNDOREDO=0x100\r\nval SC_MOD_CHANGEMARKER=0x200\r\nval SC_MOD_BEFOREINSERT=0x400\r\nval SC_MOD_BEFOREDELETE=0x800\r\nval SC_MULTILINEUNDOREDO=0x1000\r\nval SC_STARTACTION=0x2000\r\nval SC_MOD_CHANGEINDICATOR=0x4000\r\nval SC_MOD_CHANGELINESTATE=0x8000\r\nval SC_MOD_CHANGEMARGIN=0x10000\r\nval SC_MOD_CHANGEANNOTATION=0x20000\r\nval SC_MOD_CONTAINER=0x40000\r\nval SC_MOD_LEXERSTATE=0x80000\r\nval SC_MOD_INSERTCHECK=0x100000\r\nval SC_MOD_CHANGETABSTOPS=0x200000\r\nval SC_MOD_CHANGEEOLANNOTATION=0x400000\r\nval SC_MODEVENTMASKALL=0x7FFFFF\r\n\r\nali SC_MOD_INSERTTEXT=INSERT_TEXT\r\nali SC_MOD_DELETETEXT=DELETE_TEXT\r\nali SC_MOD_CHANGESTYLE=CHANGE_STYLE\r\nali SC_MOD_CHANGEFOLD=CHANGE_FOLD\r\nali SC_MULTISTEPUNDOREDO=MULTI_STEP_UNDO_REDO\r\nali SC_LASTSTEPINUNDOREDO=LAST_STEP_IN_UNDO_REDO\r\nali SC_MOD_CHANGEMARKER=CHANGE_MARKER\r\nali SC_MOD_BEFOREINSERT=BEFORE_INSERT\r\nali SC_MOD_BEFOREDELETE=BEFORE_DELETE\r\nali SC_MULTILINEUNDOREDO=MULTILINE_UNDO_REDO\r\nali SC_STARTACTION=START_ACTION\r\nali SC_MOD_CHANGEINDICATOR=CHANGE_INDICATOR\r\nali SC_MOD_CHANGELINESTATE=CHANGE_LINE_STATE\r\nali SC_MOD_CHANGEMARGIN=CHANGE_MARGIN\r\nali SC_MOD_CHANGEANNOTATION=CHANGE_ANNOTATION\r\nali SC_MOD_LEXERSTATE=LEXER_STATE\r\nali SC_MOD_INSERTCHECK=INSERT_CHECK\r\nali SC_MOD_CHANGETABSTOPS=CHANGE_TAB_STOPS\r\nali SC_MOD_CHANGEEOLANNOTATION=CHANGE_E_O_L_ANNOTATION\r\nali SC_MODEVENTMASKALL=EVENT_MASK_ALL\r\n\r\nenu Update=SC_UPDATE_\r\nval SC_UPDATE_NONE=0x0\r\nval SC_UPDATE_CONTENT=0x1\r\nval SC_UPDATE_SELECTION=0x2\r\nval SC_UPDATE_V_SCROLL=0x4\r\nval SC_UPDATE_H_SCROLL=0x8\r\n\r\n# For compatibility, these go through the COMMAND notification rather than NOTIFY\r\n# and should have had exactly the same values as the EN_* constants.\r\n# Unfortunately the SETFOCUS and KILLFOCUS are flipped over from EN_*\r\n# As clients depend on these constants, this will not be changed.\r\nenu FocusChange=SCEN_\r\nval SCEN_CHANGE=768\r\nval SCEN_SETFOCUS=512\r\nval SCEN_KILLFOCUS=256\r\n\r\n# Symbolic key codes and modifier flags.\r\n# ASCII and other printable characters below 256.\r\n# Extended keys above 300.\r\n\r\nenu Keys=SCK_\r\nval SCK_DOWN=300\r\nval SCK_UP=301\r\nval SCK_LEFT=302\r\nval SCK_RIGHT=303\r\nval SCK_HOME=304\r\nval SCK_END=305\r\nval SCK_PRIOR=306\r\nval SCK_NEXT=307\r\nval SCK_DELETE=308\r\nval SCK_INSERT=309\r\nval SCK_ESCAPE=7\r\nval SCK_BACK=8\r\nval SCK_TAB=9\r\nval SCK_RETURN=13\r\nval SCK_ADD=310\r\nval SCK_SUBTRACT=311\r\nval SCK_DIVIDE=312\r\nval SCK_WIN=313\r\nval SCK_RWIN=314\r\nval SCK_MENU=315\r\n\r\nali SCK_RWIN=R_WIN\r\n\r\nenu KeyMod=SCMOD_\r\nval SCMOD_NORM=0\r\nval SCMOD_SHIFT=1\r\nval SCMOD_CTRL=2\r\nval SCMOD_ALT=4\r\nval SCMOD_SUPER=8\r\nval SCMOD_META=16\r\n\r\nenu CompletionMethods=SC_AC_\r\nval SC_AC_FILLUP=1\r\nval SC_AC_DOUBLECLICK=2\r\nval SC_AC_TAB=3\r\nval SC_AC_NEWLINE=4\r\nval SC_AC_COMMAND=5\r\nval SC_AC_SINGLE_CHOICE=6\r\n\r\nali SC_AC_FILLUP=FILL_UP\r\nali SC_AC_DOUBLECLICK=DOUBLE_CLICK\r\n\r\n# characterSource for SCN_CHARADDED\r\nenu CharacterSource=SC_CHARACTERSOURCE_\r\n# Direct input characters.\r\nval SC_CHARACTERSOURCE_DIRECT_INPUT=0\r\n# IME (inline mode) or dead key tentative input characters.\r\nval SC_CHARACTERSOURCE_TENTATIVE_INPUT=1\r\n# IME (either inline or windowed mode) full composited string.\r\nval SC_CHARACTERSOURCE_IME_RESULT=2\r\n\r\n# Events\r\n\r\nevt void StyleNeeded=2000(int position)\r\nevt void CharAdded=2001(int ch, int characterSource)\r\nevt void SavePointReached=2002(void)\r\nevt void SavePointLeft=2003(void)\r\nevt void ModifyAttemptRO=2004(void)\r\n# GTK Specific to work around focus and accelerator problems:\r\nevt void Key=2005(int ch, int modifiers)\r\nevt void DoubleClick=2006(int modifiers, int position, int line)\r\nevt void UpdateUI=2007(int updated)\r\nevt void Modified=2008(int position, int modificationType, string text, int length, int linesAdded, int line, int foldLevelNow, int foldLevelPrev, int token, int annotationLinesAdded)\r\nevt void MacroRecord=2009(int message, int wParam, int lParam)\r\nevt void MarginClick=2010(int modifiers, int position, int margin)\r\nevt void NeedShown=2011(int position, int length)\r\nevt void Painted=2013(void)\r\nevt void UserListSelection=2014(int listType, string text, int position, int ch, CompletionMethods listCompletionMethod)\r\nevt void URIDropped=2015(string text)\r\nevt void DwellStart=2016(int position, int x, int y)\r\nevt void DwellEnd=2017(int position, int x, int y)\r\nevt void Zoom=2018(void)\r\nevt void HotSpotClick=2019(int modifiers, int position)\r\nevt void HotSpotDoubleClick=2020(int modifiers, int position)\r\nevt void CallTipClick=2021(int position)\r\nevt void AutoCSelection=2022(string text, int position, int ch, CompletionMethods listCompletionMethod)\r\nevt void IndicatorClick=2023(int modifiers, int position)\r\nevt void IndicatorRelease=2024(int modifiers, int position)\r\nevt void AutoCCancelled=2025(void)\r\nevt void AutoCCharDeleted=2026(void)\r\nevt void HotSpotReleaseClick=2027(int modifiers, int position)\r\nevt void FocusIn=2028(void)\r\nevt void FocusOut=2029(void)\r\nevt void AutoCCompleted=2030(string text, int position, int ch, CompletionMethods listCompletionMethod)\r\nevt void MarginRightClick=2031(int modifiers, int position, int margin)\r\nevt void AutoCSelectionChange=2032(int listType, string text, int position)\r\n\r\ncat Provisional\r\n\r\nenu Bidirectional=SC_BIDIRECTIONAL_\r\nval SC_BIDIRECTIONAL_DISABLED=0\r\nval SC_BIDIRECTIONAL_L2R=1\r\nval SC_BIDIRECTIONAL_R2L=2\r\n\r\n# Retrieve bidirectional text display state.\r\nget Bidirectional GetBidirectional=2708(,)\r\n\r\n# Set bidirectional text display state.\r\nset void SetBidirectional=2709(Bidirectional bidirectional,)\r\n\r\ncat Deprecated\r\n\r\n# Divide each styling byte into lexical class bits (default: 5) and indicator\r\n# bits (default: 3). If a lexer requires more than 32 lexical states, then this\r\n# is used to expand the possible states.\r\nset void SetStyleBits=2090(int bits,)\r\n\r\n# Retrieve number of bits in style bytes used to hold the lexical state.\r\nget int GetStyleBits=2091(,)\r\n\r\n# Retrieve the number of bits the current lexer needs for styling.\r\nget int GetStyleBitsNeeded=4011(,)\r\n\r\n# Deprecated in 3.5.5\r\n\r\n# Always interpret keyboard input as Unicode\r\nset void SetKeysUnicode=2521(bool keysUnicode,)\r\n\r\n# Are keys always interpreted as Unicode?\r\nget bool GetKeysUnicode=2522(,)\r\n\r\n# Is drawing done in two phases with backgrounds drawn before foregrounds?\r\nget bool GetTwoPhaseDraw=2283(,)\r\n\r\n# In twoPhaseDraw mode, drawing is performed in two phases, first the background\r\n# and then the foreground. This avoids chopping off characters that overlap the next run.\r\nset void SetTwoPhaseDraw=2284(bool twoPhase,)\r\n\r\nval INDIC0_MASK=0x20\r\nval INDIC1_MASK=0x40\r\nval INDIC2_MASK=0x80\r\nval INDICS_MASK=0xE0\r\n"
  },
  {
    "path": "scintilla/include/ScintillaCall.h",
    "content": "// SciTE - Scintilla based Text Editor\r\n/** @file ScintillaCall.h\r\n ** Interface to calling a Scintilla instance.\r\n **/\r\n// Copyright 1998-2019 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n/* Most of this file is automatically generated from the Scintilla.iface interface definition\r\n * file which contains any comments about the definitions. APIFacer.py does the generation. */\r\n\r\n#ifndef SCINTILLACALL_H\r\n#define SCINTILLACALL_H\r\n\r\nnamespace Scintilla {\r\n\r\nenum class Message;\t// Declare in case ScintillaMessages.h not included\r\n\r\n// Declare in case ScintillaStructures.h not included\r\nstruct TextRangeFull;\r\nstruct TextToFindFull;\r\nstruct RangeToFormatFull;\r\n\r\nclass IDocumentEditable;\r\n\r\nusing FunctionDirect = intptr_t(*)(intptr_t ptr, unsigned int iMessage, uintptr_t wParam, intptr_t lParam, int *pStatus);\r\n\r\nstruct Failure {\r\n\tScintilla::Status status;\r\n\texplicit Failure(Scintilla::Status status_) noexcept : status(status_) {\r\n\t}\r\n};\r\n\r\nstruct Span {\r\n\t// An ordered range\r\n\t// end may be less than start when, for example, searching backwards\r\n\tPosition start;\r\n\tPosition end;\r\n\texplicit Span(Position position) noexcept : start(position), end(position) {\r\n\t}\r\n\tSpan(Position start_, Position end_) noexcept : start(start_), end(end_) {\r\n\t}\r\n\tPosition Length() const noexcept {\r\n\t\tif (end > start)\r\n\t\t\treturn end - start;\r\n\t\telse\r\n\t\t\treturn start - end;\r\n\t}\r\n\tbool operator==(const Span &other) const noexcept {\r\n\t\treturn (other.start == start) && (other.end == end);\r\n\t}\r\n};\r\n\r\nclass ScintillaCall {\r\n\tFunctionDirect fn;\r\n\tintptr_t ptr;\r\n\tintptr_t CallPointer(Message msg, uintptr_t wParam, void *s);\r\n\tintptr_t CallString(Message msg, uintptr_t wParam, const char *s);\r\n\tstd::string CallReturnString(Message msg, uintptr_t wParam);\r\npublic:\r\n\tScintilla::Status statusLastCall;\r\n\tScintillaCall() noexcept;\r\n\t// All standard methods are fine\r\n\r\n\tvoid SetFnPtr(FunctionDirect fn_, intptr_t ptr_) noexcept;\r\n\tbool IsValid() const noexcept;\r\n\tintptr_t Call(Message msg, uintptr_t wParam=0, intptr_t lParam=0);\r\n\r\n\t// Common APIs made more structured and type-safe\r\n\tPosition LineStart(Line line);\r\n\tPosition LineEnd(Line line);\r\n\tSpan SelectionSpan();\r\n\tSpan TargetSpan();\r\n\tvoid SetTarget(Span span);\r\n\tvoid ColouriseAll();\r\n\tchar CharacterAt(Position position);\r\n\tint UnsignedStyleAt(Position position);\r\n\tstd::string StringOfSpan(Span span);\r\n\tstd::string StringOfRange(Span span);\r\n\tPosition ReplaceTarget(std::string_view text);\r\n\tPosition ReplaceTargetRE(std::string_view text);\r\n\tPosition ReplaceTargetMinimal(std::string_view text);\r\n\tPosition SearchInTarget(std::string_view text);\r\n\tSpan SpanSearchInTarget(std::string_view text);\r\n\r\n\t// Generated APIs\r\n//++Autogenerated -- start of section automatically generated from Scintilla.iface\r\n//**\\(\\*\\n\\)\r\n\tvoid AddText(Position length, const char *text);\r\n\tvoid AddStyledText(Position length, const char *c);\r\n\tvoid InsertText(Position pos, const char *text);\r\n\tvoid ChangeInsertion(Position length, const char *text);\r\n\tvoid ClearAll();\r\n\tvoid DeleteRange(Position start, Position lengthDelete);\r\n\tvoid ClearDocumentStyle();\r\n\tPosition Length();\r\n\tint CharAt(Position pos);\r\n\tPosition CurrentPos();\r\n\tPosition Anchor();\r\n\tint StyleAt(Position pos);\r\n\tint StyleIndexAt(Position pos);\r\n\tvoid Redo();\r\n\tvoid SetUndoCollection(bool collectUndo);\r\n\tvoid SelectAll();\r\n\tvoid SetSavePoint();\r\n\tPosition GetStyledText(void *tr);\r\n\tPosition GetStyledTextFull(TextRangeFull *tr);\r\n\tbool CanRedo();\r\n\tLine MarkerLineFromHandle(int markerHandle);\r\n\tvoid MarkerDeleteHandle(int markerHandle);\r\n\tint MarkerHandleFromLine(Line line, int which);\r\n\tint MarkerNumberFromLine(Line line, int which);\r\n\tbool UndoCollection();\r\n\tScintilla::WhiteSpace ViewWS();\r\n\tvoid SetViewWS(Scintilla::WhiteSpace viewWS);\r\n\tScintilla::TabDrawMode TabDrawMode();\r\n\tvoid SetTabDrawMode(Scintilla::TabDrawMode tabDrawMode);\r\n\tPosition PositionFromPoint(int x, int y);\r\n\tPosition PositionFromPointClose(int x, int y);\r\n\tvoid GotoLine(Line line);\r\n\tvoid GotoPos(Position caret);\r\n\tvoid SetAnchor(Position anchor);\r\n\tPosition GetCurLine(Position length, char *text);\r\n\tstd::string GetCurLine(Position length);\r\n\tPosition EndStyled();\r\n\tvoid ConvertEOLs(Scintilla::EndOfLine eolMode);\r\n\tScintilla::EndOfLine EOLMode();\r\n\tvoid SetEOLMode(Scintilla::EndOfLine eolMode);\r\n\tvoid StartStyling(Position start, int unused);\r\n\tvoid SetStyling(Position length, int style);\r\n\tbool BufferedDraw();\r\n\tvoid SetBufferedDraw(bool buffered);\r\n\tvoid SetTabWidth(int tabWidth);\r\n\tint TabWidth();\r\n\tvoid SetTabMinimumWidth(int pixels);\r\n\tint TabMinimumWidth();\r\n\tvoid ClearTabStops(Line line);\r\n\tvoid AddTabStop(Line line, int x);\r\n\tint GetNextTabStop(Line line, int x);\r\n\tvoid SetCodePage(int codePage);\r\n\tvoid SetFontLocale(const char *localeName);\r\n\tint FontLocale(char *localeName);\r\n\tstd::string FontLocale();\r\n\tScintilla::IMEInteraction IMEInteraction();\r\n\tvoid SetIMEInteraction(Scintilla::IMEInteraction imeInteraction);\r\n\tvoid MarkerDefine(int markerNumber, Scintilla::MarkerSymbol markerSymbol);\r\n\tvoid MarkerSetFore(int markerNumber, Colour fore);\r\n\tvoid MarkerSetBack(int markerNumber, Colour back);\r\n\tvoid MarkerSetBackSelected(int markerNumber, Colour back);\r\n\tvoid MarkerSetForeTranslucent(int markerNumber, ColourAlpha fore);\r\n\tvoid MarkerSetBackTranslucent(int markerNumber, ColourAlpha back);\r\n\tvoid MarkerSetBackSelectedTranslucent(int markerNumber, ColourAlpha back);\r\n\tvoid MarkerSetStrokeWidth(int markerNumber, int hundredths);\r\n\tvoid MarkerEnableHighlight(bool enabled);\r\n\tint MarkerAdd(Line line, int markerNumber);\r\n\tvoid MarkerDelete(Line line, int markerNumber);\r\n\tvoid MarkerDeleteAll(int markerNumber);\r\n\tint MarkerGet(Line line);\r\n\tLine MarkerNext(Line lineStart, int markerMask);\r\n\tLine MarkerPrevious(Line lineStart, int markerMask);\r\n\tvoid MarkerDefinePixmap(int markerNumber, const char *pixmap);\r\n\tvoid MarkerAddSet(Line line, int markerSet);\r\n\tvoid MarkerSetAlpha(int markerNumber, Scintilla::Alpha alpha);\r\n\tScintilla::Layer MarkerGetLayer(int markerNumber);\r\n\tvoid MarkerSetLayer(int markerNumber, Scintilla::Layer layer);\r\n\tvoid SetMarginTypeN(int margin, Scintilla::MarginType marginType);\r\n\tScintilla::MarginType MarginTypeN(int margin);\r\n\tvoid SetMarginWidthN(int margin, int pixelWidth);\r\n\tint MarginWidthN(int margin);\r\n\tvoid SetMarginMaskN(int margin, int mask);\r\n\tint MarginMaskN(int margin);\r\n\tvoid SetMarginSensitiveN(int margin, bool sensitive);\r\n\tbool MarginSensitiveN(int margin);\r\n\tvoid SetMarginCursorN(int margin, Scintilla::CursorShape cursor);\r\n\tScintilla::CursorShape MarginCursorN(int margin);\r\n\tvoid SetMarginBackN(int margin, Colour back);\r\n\tColour MarginBackN(int margin);\r\n\tvoid SetMargins(int margins);\r\n\tint Margins();\r\n\tvoid StyleClearAll();\r\n\tvoid StyleSetFore(int style, Colour fore);\r\n\tvoid StyleSetBack(int style, Colour back);\r\n\tvoid StyleSetBold(int style, bool bold);\r\n\tvoid StyleSetItalic(int style, bool italic);\r\n\tvoid StyleSetSize(int style, int sizePoints);\r\n\tvoid StyleSetFont(int style, const char *fontName);\r\n\tvoid StyleSetEOLFilled(int style, bool eolFilled);\r\n\tvoid StyleResetDefault();\r\n\tvoid StyleSetUnderline(int style, bool underline);\r\n\tColour StyleGetFore(int style);\r\n\tColour StyleGetBack(int style);\r\n\tbool StyleGetBold(int style);\r\n\tbool StyleGetItalic(int style);\r\n\tint StyleGetSize(int style);\r\n\tint StyleGetFont(int style, char *fontName);\r\n\tstd::string StyleGetFont(int style);\r\n\tbool StyleGetEOLFilled(int style);\r\n\tbool StyleGetUnderline(int style);\r\n\tScintilla::CaseVisible StyleGetCase(int style);\r\n\tScintilla::CharacterSet StyleGetCharacterSet(int style);\r\n\tbool StyleGetVisible(int style);\r\n\tbool StyleGetChangeable(int style);\r\n\tbool StyleGetHotSpot(int style);\r\n\tvoid StyleSetCase(int style, Scintilla::CaseVisible caseVisible);\r\n\tvoid StyleSetSizeFractional(int style, int sizeHundredthPoints);\r\n\tint StyleGetSizeFractional(int style);\r\n\tvoid StyleSetWeight(int style, Scintilla::FontWeight weight);\r\n\tScintilla::FontWeight StyleGetWeight(int style);\r\n\tvoid StyleSetCharacterSet(int style, Scintilla::CharacterSet characterSet);\r\n\tvoid StyleSetHotSpot(int style, bool hotspot);\r\n\tvoid StyleSetCheckMonospaced(int style, bool checkMonospaced);\r\n\tbool StyleGetCheckMonospaced(int style);\r\n\tvoid StyleSetInvisibleRepresentation(int style, const char *representation);\r\n\tint StyleGetInvisibleRepresentation(int style, char *representation);\r\n\tstd::string StyleGetInvisibleRepresentation(int style);\r\n\tvoid SetElementColour(Scintilla::Element element, ColourAlpha colourElement);\r\n\tColourAlpha ElementColour(Scintilla::Element element);\r\n\tvoid ResetElementColour(Scintilla::Element element);\r\n\tbool ElementIsSet(Scintilla::Element element);\r\n\tbool ElementAllowsTranslucent(Scintilla::Element element);\r\n\tColourAlpha ElementBaseColour(Scintilla::Element element);\r\n\tvoid SetSelFore(bool useSetting, Colour fore);\r\n\tvoid SetSelBack(bool useSetting, Colour back);\r\n\tScintilla::Alpha SelAlpha();\r\n\tvoid SetSelAlpha(Scintilla::Alpha alpha);\r\n\tbool SelEOLFilled();\r\n\tvoid SetSelEOLFilled(bool filled);\r\n\tScintilla::Layer SelectionLayer();\r\n\tvoid SetSelectionLayer(Scintilla::Layer layer);\r\n\tScintilla::Layer CaretLineLayer();\r\n\tvoid SetCaretLineLayer(Scintilla::Layer layer);\r\n\tbool CaretLineHighlightSubLine();\r\n\tvoid SetCaretLineHighlightSubLine(bool subLine);\r\n\tvoid SetCaretFore(Colour fore);\r\n\tvoid AssignCmdKey(int keyDefinition, int sciCommand);\r\n\tvoid ClearCmdKey(int keyDefinition);\r\n\tvoid ClearAllCmdKeys();\r\n\tvoid SetStylingEx(Position length, const char *styles);\r\n\tvoid StyleSetVisible(int style, bool visible);\r\n\tint CaretPeriod();\r\n\tvoid SetCaretPeriod(int periodMilliseconds);\r\n\tvoid SetWordChars(const char *characters);\r\n\tint WordChars(char *characters);\r\n\tstd::string WordChars();\r\n\tvoid SetCharacterCategoryOptimization(int countCharacters);\r\n\tint CharacterCategoryOptimization();\r\n\tvoid BeginUndoAction();\r\n\tvoid EndUndoAction();\r\n\tint UndoActions();\r\n\tvoid SetUndoSavePoint(int action);\r\n\tint UndoSavePoint();\r\n\tvoid SetUndoDetach(int action);\r\n\tint UndoDetach();\r\n\tvoid SetUndoTentative(int action);\r\n\tint UndoTentative();\r\n\tvoid SetUndoCurrent(int action);\r\n\tint UndoCurrent();\r\n\tvoid PushUndoActionType(int type, Position pos);\r\n\tvoid ChangeLastUndoActionText(Position length, const char *text);\r\n\tint UndoActionType(int action);\r\n\tPosition UndoActionPosition(int action);\r\n\tint UndoActionText(int action, char *text);\r\n\tstd::string UndoActionText(int action);\r\n\tvoid IndicSetStyle(int indicator, Scintilla::IndicatorStyle indicatorStyle);\r\n\tScintilla::IndicatorStyle IndicGetStyle(int indicator);\r\n\tvoid IndicSetFore(int indicator, Colour fore);\r\n\tColour IndicGetFore(int indicator);\r\n\tvoid IndicSetUnder(int indicator, bool under);\r\n\tbool IndicGetUnder(int indicator);\r\n\tvoid IndicSetHoverStyle(int indicator, Scintilla::IndicatorStyle indicatorStyle);\r\n\tScintilla::IndicatorStyle IndicGetHoverStyle(int indicator);\r\n\tvoid IndicSetHoverFore(int indicator, Colour fore);\r\n\tColour IndicGetHoverFore(int indicator);\r\n\tvoid IndicSetFlags(int indicator, Scintilla::IndicFlag flags);\r\n\tScintilla::IndicFlag IndicGetFlags(int indicator);\r\n\tvoid IndicSetStrokeWidth(int indicator, int hundredths);\r\n\tint IndicGetStrokeWidth(int indicator);\r\n\tvoid SetWhitespaceFore(bool useSetting, Colour fore);\r\n\tvoid SetWhitespaceBack(bool useSetting, Colour back);\r\n\tvoid SetWhitespaceSize(int size);\r\n\tint WhitespaceSize();\r\n\tvoid SetLineState(Line line, int state);\r\n\tint LineState(Line line);\r\n\tint MaxLineState();\r\n\tbool CaretLineVisible();\r\n\tvoid SetCaretLineVisible(bool show);\r\n\tColour CaretLineBack();\r\n\tvoid SetCaretLineBack(Colour back);\r\n\tint CaretLineFrame();\r\n\tvoid SetCaretLineFrame(int width);\r\n\tvoid StyleSetChangeable(int style, bool changeable);\r\n\tvoid AutoCShow(Position lengthEntered, const char *itemList);\r\n\tvoid AutoCCancel();\r\n\tbool AutoCActive();\r\n\tPosition AutoCPosStart();\r\n\tvoid AutoCComplete();\r\n\tvoid AutoCStops(const char *characterSet);\r\n\tvoid AutoCSetSeparator(int separatorCharacter);\r\n\tint AutoCGetSeparator();\r\n\tvoid AutoCSelect(const char *select);\r\n\tvoid AutoCSetCancelAtStart(bool cancel);\r\n\tbool AutoCGetCancelAtStart();\r\n\tvoid AutoCSetFillUps(const char *characterSet);\r\n\tvoid AutoCSetChooseSingle(bool chooseSingle);\r\n\tbool AutoCGetChooseSingle();\r\n\tvoid AutoCSetIgnoreCase(bool ignoreCase);\r\n\tbool AutoCGetIgnoreCase();\r\n\tvoid UserListShow(int listType, const char *itemList);\r\n\tvoid AutoCSetAutoHide(bool autoHide);\r\n\tbool AutoCGetAutoHide();\r\n\tvoid AutoCSetOptions(Scintilla::AutoCompleteOption options);\r\n\tScintilla::AutoCompleteOption AutoCGetOptions();\r\n\tvoid AutoCSetDropRestOfWord(bool dropRestOfWord);\r\n\tbool AutoCGetDropRestOfWord();\r\n\tvoid RegisterImage(int type, const char *xpmData);\r\n\tvoid ClearRegisteredImages();\r\n\tint AutoCGetTypeSeparator();\r\n\tvoid AutoCSetTypeSeparator(int separatorCharacter);\r\n\tvoid AutoCSetMaxWidth(int characterCount);\r\n\tint AutoCGetMaxWidth();\r\n\tvoid AutoCSetMaxHeight(int rowCount);\r\n\tint AutoCGetMaxHeight();\r\n\tvoid SetIndent(int indentSize);\r\n\tint Indent();\r\n\tvoid SetUseTabs(bool useTabs);\r\n\tbool UseTabs();\r\n\tvoid SetLineIndentation(Line line, int indentation);\r\n\tint LineIndentation(Line line);\r\n\tPosition LineIndentPosition(Line line);\r\n\tPosition Column(Position pos);\r\n\tPosition CountCharacters(Position start, Position end);\r\n\tPosition CountCodeUnits(Position start, Position end);\r\n\tvoid SetHScrollBar(bool visible);\r\n\tbool HScrollBar();\r\n\tvoid SetIndentationGuides(Scintilla::IndentView indentView);\r\n\tScintilla::IndentView IndentationGuides();\r\n\tvoid SetHighlightGuide(Position column);\r\n\tPosition HighlightGuide();\r\n\tPosition LineEndPosition(Line line);\r\n\tint CodePage();\r\n\tColour CaretFore();\r\n\tbool ReadOnly();\r\n\tvoid SetCurrentPos(Position caret);\r\n\tvoid SetSelectionStart(Position anchor);\r\n\tPosition SelectionStart();\r\n\tvoid SetSelectionEnd(Position caret);\r\n\tPosition SelectionEnd();\r\n\tvoid SetEmptySelection(Position caret);\r\n\tvoid SetPrintMagnification(int magnification);\r\n\tint PrintMagnification();\r\n\tvoid SetPrintColourMode(Scintilla::PrintOption mode);\r\n\tScintilla::PrintOption PrintColourMode();\r\n\tPosition FindText(Scintilla::FindOption searchFlags, void *ft);\r\n\tPosition FindTextFull(Scintilla::FindOption searchFlags, TextToFindFull *ft);\r\n\tPosition FormatRange(bool draw, void *fr);\r\n\tPosition FormatRangeFull(bool draw, RangeToFormatFull *fr);\r\n\tvoid SetChangeHistory(Scintilla::ChangeHistoryOption changeHistory);\r\n\tScintilla::ChangeHistoryOption ChangeHistory();\r\n\tLine FirstVisibleLine();\r\n\tPosition GetLine(Line line, char *text);\r\n\tstd::string GetLine(Line line);\r\n\tLine LineCount();\r\n\tvoid AllocateLines(Line lines);\r\n\tvoid SetMarginLeft(int pixelWidth);\r\n\tint MarginLeft();\r\n\tvoid SetMarginRight(int pixelWidth);\r\n\tint MarginRight();\r\n\tbool Modify();\r\n\tvoid SetSel(Position anchor, Position caret);\r\n\tPosition GetSelText(char *text);\r\n\tstd::string GetSelText();\r\n\tPosition GetTextRange(void *tr);\r\n\tPosition GetTextRangeFull(TextRangeFull *tr);\r\n\tvoid HideSelection(bool hide);\r\n\tbool SelectionHidden();\r\n\tint PointXFromPosition(Position pos);\r\n\tint PointYFromPosition(Position pos);\r\n\tLine LineFromPosition(Position pos);\r\n\tPosition PositionFromLine(Line line);\r\n\tvoid LineScroll(Position columns, Line lines);\r\n\tvoid ScrollCaret();\r\n\tvoid ScrollRange(Position secondary, Position primary);\r\n\tvoid ReplaceSel(const char *text);\r\n\tvoid SetReadOnly(bool readOnly);\r\n\tvoid Null();\r\n\tbool CanPaste();\r\n\tbool CanUndo();\r\n\tvoid EmptyUndoBuffer();\r\n\tvoid Undo();\r\n\tvoid Cut();\r\n\tvoid Copy();\r\n\tvoid Paste();\r\n\tvoid Clear();\r\n\tvoid SetText(const char *text);\r\n\tPosition GetText(Position length, char *text);\r\n\tstd::string GetText(Position length);\r\n\tPosition TextLength();\r\n\tvoid *DirectFunction();\r\n\tvoid *DirectStatusFunction();\r\n\tvoid *DirectPointer();\r\n\tvoid SetOvertype(bool overType);\r\n\tbool Overtype();\r\n\tvoid SetCaretWidth(int pixelWidth);\r\n\tint CaretWidth();\r\n\tvoid SetTargetStart(Position start);\r\n\tPosition TargetStart();\r\n\tvoid SetTargetStartVirtualSpace(Position space);\r\n\tPosition TargetStartVirtualSpace();\r\n\tvoid SetTargetEnd(Position end);\r\n\tPosition TargetEnd();\r\n\tvoid SetTargetEndVirtualSpace(Position space);\r\n\tPosition TargetEndVirtualSpace();\r\n\tvoid SetTargetRange(Position start, Position end);\r\n\tPosition TargetText(char *text);\r\n\tstd::string TargetText();\r\n\tvoid TargetFromSelection();\r\n\tvoid TargetWholeDocument();\r\n\tPosition ReplaceTarget(Position length, const char *text);\r\n\tPosition ReplaceTargetRE(Position length, const char *text);\r\n\tPosition ReplaceTargetMinimal(Position length, const char *text);\r\n\tPosition SearchInTarget(Position length, const char *text);\r\n\tvoid SetSearchFlags(Scintilla::FindOption searchFlags);\r\n\tScintilla::FindOption SearchFlags();\r\n\tvoid CallTipShow(Position pos, const char *definition);\r\n\tvoid CallTipCancel();\r\n\tbool CallTipActive();\r\n\tPosition CallTipPosStart();\r\n\tvoid CallTipSetPosStart(Position posStart);\r\n\tvoid CallTipSetHlt(Position highlightStart, Position highlightEnd);\r\n\tvoid CallTipSetBack(Colour back);\r\n\tvoid CallTipSetFore(Colour fore);\r\n\tvoid CallTipSetForeHlt(Colour fore);\r\n\tvoid CallTipUseStyle(int tabSize);\r\n\tvoid CallTipSetPosition(bool above);\r\n\tLine VisibleFromDocLine(Line docLine);\r\n\tLine DocLineFromVisible(Line displayLine);\r\n\tLine WrapCount(Line docLine);\r\n\tvoid SetFoldLevel(Line line, Scintilla::FoldLevel level);\r\n\tScintilla::FoldLevel FoldLevel(Line line);\r\n\tLine LastChild(Line line, Scintilla::FoldLevel level);\r\n\tLine FoldParent(Line line);\r\n\tvoid ShowLines(Line lineStart, Line lineEnd);\r\n\tvoid HideLines(Line lineStart, Line lineEnd);\r\n\tbool LineVisible(Line line);\r\n\tbool AllLinesVisible();\r\n\tvoid SetFoldExpanded(Line line, bool expanded);\r\n\tbool FoldExpanded(Line line);\r\n\tvoid ToggleFold(Line line);\r\n\tvoid ToggleFoldShowText(Line line, const char *text);\r\n\tvoid FoldDisplayTextSetStyle(Scintilla::FoldDisplayTextStyle style);\r\n\tScintilla::FoldDisplayTextStyle FoldDisplayTextGetStyle();\r\n\tvoid SetDefaultFoldDisplayText(const char *text);\r\n\tint GetDefaultFoldDisplayText(char *text);\r\n\tstd::string GetDefaultFoldDisplayText();\r\n\tvoid FoldLine(Line line, Scintilla::FoldAction action);\r\n\tvoid FoldChildren(Line line, Scintilla::FoldAction action);\r\n\tvoid ExpandChildren(Line line, Scintilla::FoldLevel level);\r\n\tvoid FoldAll(Scintilla::FoldAction action);\r\n\tvoid EnsureVisible(Line line);\r\n\tvoid SetAutomaticFold(Scintilla::AutomaticFold automaticFold);\r\n\tScintilla::AutomaticFold AutomaticFold();\r\n\tvoid SetFoldFlags(Scintilla::FoldFlag flags);\r\n\tvoid EnsureVisibleEnforcePolicy(Line line);\r\n\tvoid SetTabIndents(bool tabIndents);\r\n\tbool TabIndents();\r\n\tvoid SetBackSpaceUnIndents(bool bsUnIndents);\r\n\tbool BackSpaceUnIndents();\r\n\tvoid SetMouseDwellTime(int periodMilliseconds);\r\n\tint MouseDwellTime();\r\n\tPosition WordStartPosition(Position pos, bool onlyWordCharacters);\r\n\tPosition WordEndPosition(Position pos, bool onlyWordCharacters);\r\n\tbool IsRangeWord(Position start, Position end);\r\n\tvoid SetIdleStyling(Scintilla::IdleStyling idleStyling);\r\n\tScintilla::IdleStyling IdleStyling();\r\n\tvoid SetWrapMode(Scintilla::Wrap wrapMode);\r\n\tScintilla::Wrap WrapMode();\r\n\tvoid SetWrapVisualFlags(Scintilla::WrapVisualFlag wrapVisualFlags);\r\n\tScintilla::WrapVisualFlag WrapVisualFlags();\r\n\tvoid SetWrapVisualFlagsLocation(Scintilla::WrapVisualLocation wrapVisualFlagsLocation);\r\n\tScintilla::WrapVisualLocation WrapVisualFlagsLocation();\r\n\tvoid SetWrapStartIndent(int indent);\r\n\tint WrapStartIndent();\r\n\tvoid SetWrapIndentMode(Scintilla::WrapIndentMode wrapIndentMode);\r\n\tScintilla::WrapIndentMode WrapIndentMode();\r\n\tvoid SetLayoutCache(Scintilla::LineCache cacheMode);\r\n\tScintilla::LineCache LayoutCache();\r\n\tvoid SetScrollWidth(int pixelWidth);\r\n\tint ScrollWidth();\r\n\tvoid SetScrollWidthTracking(bool tracking);\r\n\tbool ScrollWidthTracking();\r\n\tint TextWidth(int style, const char *text);\r\n\tvoid SetEndAtLastLine(bool endAtLastLine);\r\n\tbool EndAtLastLine();\r\n\tint TextHeight(Line line);\r\n\tvoid SetVScrollBar(bool visible);\r\n\tbool VScrollBar();\r\n\tvoid AppendText(Position length, const char *text);\r\n\tScintilla::PhasesDraw PhasesDraw();\r\n\tvoid SetPhasesDraw(Scintilla::PhasesDraw phases);\r\n\tvoid SetFontQuality(Scintilla::FontQuality fontQuality);\r\n\tScintilla::FontQuality FontQuality();\r\n\tvoid SetFirstVisibleLine(Line displayLine);\r\n\tvoid SetMultiPaste(Scintilla::MultiPaste multiPaste);\r\n\tScintilla::MultiPaste MultiPaste();\r\n\tint Tag(int tagNumber, char *tagValue);\r\n\tstd::string Tag(int tagNumber);\r\n\tvoid LinesJoin();\r\n\tvoid LinesSplit(int pixelWidth);\r\n\tvoid SetFoldMarginColour(bool useSetting, Colour back);\r\n\tvoid SetFoldMarginHiColour(bool useSetting, Colour fore);\r\n\tvoid SetAccessibility(Scintilla::Accessibility accessibility);\r\n\tScintilla::Accessibility Accessibility();\r\n\tvoid LineDown();\r\n\tvoid LineDownExtend();\r\n\tvoid LineUp();\r\n\tvoid LineUpExtend();\r\n\tvoid CharLeft();\r\n\tvoid CharLeftExtend();\r\n\tvoid CharRight();\r\n\tvoid CharRightExtend();\r\n\tvoid WordLeft();\r\n\tvoid WordLeftExtend();\r\n\tvoid WordRight();\r\n\tvoid WordRightExtend();\r\n\tvoid Home();\r\n\tvoid HomeExtend();\r\n\tvoid LineEnd();\r\n\tvoid LineEndExtend();\r\n\tvoid DocumentStart();\r\n\tvoid DocumentStartExtend();\r\n\tvoid DocumentEnd();\r\n\tvoid DocumentEndExtend();\r\n\tvoid PageUp();\r\n\tvoid PageUpExtend();\r\n\tvoid PageDown();\r\n\tvoid PageDownExtend();\r\n\tvoid EditToggleOvertype();\r\n\tvoid Cancel();\r\n\tvoid DeleteBack();\r\n\tvoid Tab();\r\n\tvoid BackTab();\r\n\tvoid NewLine();\r\n\tvoid FormFeed();\r\n\tvoid VCHome();\r\n\tvoid VCHomeExtend();\r\n\tvoid ZoomIn();\r\n\tvoid ZoomOut();\r\n\tvoid DelWordLeft();\r\n\tvoid DelWordRight();\r\n\tvoid DelWordRightEnd();\r\n\tvoid LineCut();\r\n\tvoid LineDelete();\r\n\tvoid LineTranspose();\r\n\tvoid LineReverse();\r\n\tvoid LineDuplicate();\r\n\tvoid LowerCase();\r\n\tvoid UpperCase();\r\n\tvoid LineScrollDown();\r\n\tvoid LineScrollUp();\r\n\tvoid DeleteBackNotLine();\r\n\tvoid HomeDisplay();\r\n\tvoid HomeDisplayExtend();\r\n\tvoid LineEndDisplay();\r\n\tvoid LineEndDisplayExtend();\r\n\tvoid HomeWrap();\r\n\tvoid HomeWrapExtend();\r\n\tvoid LineEndWrap();\r\n\tvoid LineEndWrapExtend();\r\n\tvoid VCHomeWrap();\r\n\tvoid VCHomeWrapExtend();\r\n\tvoid LineCopy();\r\n\tvoid MoveCaretInsideView();\r\n\tPosition LineLength(Line line);\r\n\tvoid BraceHighlight(Position posA, Position posB);\r\n\tvoid BraceHighlightIndicator(bool useSetting, int indicator);\r\n\tvoid BraceBadLight(Position pos);\r\n\tvoid BraceBadLightIndicator(bool useSetting, int indicator);\r\n\tPosition BraceMatch(Position pos, int maxReStyle);\r\n\tPosition BraceMatchNext(Position pos, Position startPos);\r\n\tbool ViewEOL();\r\n\tvoid SetViewEOL(bool visible);\r\n\tIDocumentEditable *DocPointer();\r\n\tvoid SetDocPointer(IDocumentEditable *doc);\r\n\tvoid SetModEventMask(Scintilla::ModificationFlags eventMask);\r\n\tPosition EdgeColumn();\r\n\tvoid SetEdgeColumn(Position column);\r\n\tScintilla::EdgeVisualStyle EdgeMode();\r\n\tvoid SetEdgeMode(Scintilla::EdgeVisualStyle edgeMode);\r\n\tColour EdgeColour();\r\n\tvoid SetEdgeColour(Colour edgeColour);\r\n\tvoid MultiEdgeAddLine(Position column, Colour edgeColour);\r\n\tvoid MultiEdgeClearAll();\r\n\tPosition MultiEdgeColumn(int which);\r\n\tvoid SearchAnchor();\r\n\tPosition SearchNext(Scintilla::FindOption searchFlags, const char *text);\r\n\tPosition SearchPrev(Scintilla::FindOption searchFlags, const char *text);\r\n\tLine LinesOnScreen();\r\n\tvoid UsePopUp(Scintilla::PopUp popUpMode);\r\n\tbool SelectionIsRectangle();\r\n\tvoid SetZoom(int zoomInPoints);\r\n\tint Zoom();\r\n\tIDocumentEditable *CreateDocument(Position bytes, Scintilla::DocumentOption documentOptions);\r\n\tvoid AddRefDocument(IDocumentEditable *doc);\r\n\tvoid ReleaseDocument(IDocumentEditable *doc);\r\n\tScintilla::DocumentOption DocumentOptions();\r\n\tScintilla::ModificationFlags ModEventMask();\r\n\tvoid SetCommandEvents(bool commandEvents);\r\n\tbool CommandEvents();\r\n\tvoid SetFocus(bool focus);\r\n\tbool Focus();\r\n\tvoid SetStatus(Scintilla::Status status);\r\n\tScintilla::Status Status();\r\n\tvoid SetMouseDownCaptures(bool captures);\r\n\tbool MouseDownCaptures();\r\n\tvoid SetMouseWheelCaptures(bool captures);\r\n\tbool MouseWheelCaptures();\r\n\tvoid SetCursor(Scintilla::CursorShape cursorType);\r\n\tScintilla::CursorShape Cursor();\r\n\tvoid SetControlCharSymbol(int symbol);\r\n\tint ControlCharSymbol();\r\n\tvoid WordPartLeft();\r\n\tvoid WordPartLeftExtend();\r\n\tvoid WordPartRight();\r\n\tvoid WordPartRightExtend();\r\n\tvoid SetVisiblePolicy(Scintilla::VisiblePolicy visiblePolicy, int visibleSlop);\r\n\tvoid DelLineLeft();\r\n\tvoid DelLineRight();\r\n\tvoid SetXOffset(int xOffset);\r\n\tint XOffset();\r\n\tvoid ChooseCaretX();\r\n\tvoid GrabFocus();\r\n\tvoid SetXCaretPolicy(Scintilla::CaretPolicy caretPolicy, int caretSlop);\r\n\tvoid SetYCaretPolicy(Scintilla::CaretPolicy caretPolicy, int caretSlop);\r\n\tvoid SetPrintWrapMode(Scintilla::Wrap wrapMode);\r\n\tScintilla::Wrap PrintWrapMode();\r\n\tvoid SetHotspotActiveFore(bool useSetting, Colour fore);\r\n\tColour HotspotActiveFore();\r\n\tvoid SetHotspotActiveBack(bool useSetting, Colour back);\r\n\tColour HotspotActiveBack();\r\n\tvoid SetHotspotActiveUnderline(bool underline);\r\n\tbool HotspotActiveUnderline();\r\n\tvoid SetHotspotSingleLine(bool singleLine);\r\n\tbool HotspotSingleLine();\r\n\tvoid ParaDown();\r\n\tvoid ParaDownExtend();\r\n\tvoid ParaUp();\r\n\tvoid ParaUpExtend();\r\n\tPosition PositionBefore(Position pos);\r\n\tPosition PositionAfter(Position pos);\r\n\tPosition PositionRelative(Position pos, Position relative);\r\n\tPosition PositionRelativeCodeUnits(Position pos, Position relative);\r\n\tvoid CopyRange(Position start, Position end);\r\n\tvoid CopyText(Position length, const char *text);\r\n\tvoid SetSelectionMode(Scintilla::SelectionMode selectionMode);\r\n\tvoid ChangeSelectionMode(Scintilla::SelectionMode selectionMode);\r\n\tScintilla::SelectionMode SelectionMode();\r\n\tvoid SetMoveExtendsSelection(bool moveExtendsSelection);\r\n\tbool MoveExtendsSelection();\r\n\tPosition GetLineSelStartPosition(Line line);\r\n\tPosition GetLineSelEndPosition(Line line);\r\n\tvoid LineDownRectExtend();\r\n\tvoid LineUpRectExtend();\r\n\tvoid CharLeftRectExtend();\r\n\tvoid CharRightRectExtend();\r\n\tvoid HomeRectExtend();\r\n\tvoid VCHomeRectExtend();\r\n\tvoid LineEndRectExtend();\r\n\tvoid PageUpRectExtend();\r\n\tvoid PageDownRectExtend();\r\n\tvoid StutteredPageUp();\r\n\tvoid StutteredPageUpExtend();\r\n\tvoid StutteredPageDown();\r\n\tvoid StutteredPageDownExtend();\r\n\tvoid WordLeftEnd();\r\n\tvoid WordLeftEndExtend();\r\n\tvoid WordRightEnd();\r\n\tvoid WordRightEndExtend();\r\n\tvoid SetWhitespaceChars(const char *characters);\r\n\tint WhitespaceChars(char *characters);\r\n\tstd::string WhitespaceChars();\r\n\tvoid SetPunctuationChars(const char *characters);\r\n\tint PunctuationChars(char *characters);\r\n\tstd::string PunctuationChars();\r\n\tvoid SetCharsDefault();\r\n\tint AutoCGetCurrent();\r\n\tint AutoCGetCurrentText(char *text);\r\n\tstd::string AutoCGetCurrentText();\r\n\tvoid AutoCSetCaseInsensitiveBehaviour(Scintilla::CaseInsensitiveBehaviour behaviour);\r\n\tScintilla::CaseInsensitiveBehaviour AutoCGetCaseInsensitiveBehaviour();\r\n\tvoid AutoCSetMulti(Scintilla::MultiAutoComplete multi);\r\n\tScintilla::MultiAutoComplete AutoCGetMulti();\r\n\tvoid AutoCSetOrder(Scintilla::Ordering order);\r\n\tScintilla::Ordering AutoCGetOrder();\r\n\tvoid Allocate(Position bytes);\r\n\tPosition TargetAsUTF8(char *s);\r\n\tstd::string TargetAsUTF8();\r\n\tvoid SetLengthForEncode(Position bytes);\r\n\tPosition EncodedFromUTF8(const char *utf8, char *encoded);\r\n\tstd::string EncodedFromUTF8(const char *utf8);\r\n\tPosition FindColumn(Line line, Position column);\r\n\tScintilla::CaretSticky CaretSticky();\r\n\tvoid SetCaretSticky(Scintilla::CaretSticky useCaretStickyBehaviour);\r\n\tvoid ToggleCaretSticky();\r\n\tvoid SetPasteConvertEndings(bool convert);\r\n\tbool PasteConvertEndings();\r\n\tvoid ReplaceRectangular(Position length, const char *text);\r\n\tvoid SelectionDuplicate();\r\n\tvoid SetCaretLineBackAlpha(Scintilla::Alpha alpha);\r\n\tScintilla::Alpha CaretLineBackAlpha();\r\n\tvoid SetCaretStyle(Scintilla::CaretStyle caretStyle);\r\n\tScintilla::CaretStyle CaretStyle();\r\n\tvoid SetIndicatorCurrent(int indicator);\r\n\tint IndicatorCurrent();\r\n\tvoid SetIndicatorValue(int value);\r\n\tint IndicatorValue();\r\n\tvoid IndicatorFillRange(Position start, Position lengthFill);\r\n\tvoid IndicatorClearRange(Position start, Position lengthClear);\r\n\tint IndicatorAllOnFor(Position pos);\r\n\tint IndicatorValueAt(int indicator, Position pos);\r\n\tPosition IndicatorStart(int indicator, Position pos);\r\n\tPosition IndicatorEnd(int indicator, Position pos);\r\n\tvoid SetPositionCache(int size);\r\n\tint PositionCache();\r\n\tvoid SetLayoutThreads(int threads);\r\n\tint LayoutThreads();\r\n\tvoid CopyAllowLine();\r\n\tvoid *CharacterPointer();\r\n\tvoid *RangePointer(Position start, Position lengthRange);\r\n\tPosition GapPosition();\r\n\tvoid IndicSetAlpha(int indicator, Scintilla::Alpha alpha);\r\n\tScintilla::Alpha IndicGetAlpha(int indicator);\r\n\tvoid IndicSetOutlineAlpha(int indicator, Scintilla::Alpha alpha);\r\n\tScintilla::Alpha IndicGetOutlineAlpha(int indicator);\r\n\tvoid SetExtraAscent(int extraAscent);\r\n\tint ExtraAscent();\r\n\tvoid SetExtraDescent(int extraDescent);\r\n\tint ExtraDescent();\r\n\tint MarkerSymbolDefined(int markerNumber);\r\n\tvoid MarginSetText(Line line, const char *text);\r\n\tint MarginGetText(Line line, char *text);\r\n\tstd::string MarginGetText(Line line);\r\n\tvoid MarginSetStyle(Line line, int style);\r\n\tint MarginGetStyle(Line line);\r\n\tvoid MarginSetStyles(Line line, const char *styles);\r\n\tint MarginGetStyles(Line line, char *styles);\r\n\tstd::string MarginGetStyles(Line line);\r\n\tvoid MarginTextClearAll();\r\n\tvoid MarginSetStyleOffset(int style);\r\n\tint MarginGetStyleOffset();\r\n\tvoid SetMarginOptions(Scintilla::MarginOption marginOptions);\r\n\tScintilla::MarginOption MarginOptions();\r\n\tvoid AnnotationSetText(Line line, const char *text);\r\n\tint AnnotationGetText(Line line, char *text);\r\n\tstd::string AnnotationGetText(Line line);\r\n\tvoid AnnotationSetStyle(Line line, int style);\r\n\tint AnnotationGetStyle(Line line);\r\n\tvoid AnnotationSetStyles(Line line, const char *styles);\r\n\tint AnnotationGetStyles(Line line, char *styles);\r\n\tstd::string AnnotationGetStyles(Line line);\r\n\tint AnnotationGetLines(Line line);\r\n\tvoid AnnotationClearAll();\r\n\tvoid AnnotationSetVisible(Scintilla::AnnotationVisible visible);\r\n\tScintilla::AnnotationVisible AnnotationGetVisible();\r\n\tvoid AnnotationSetStyleOffset(int style);\r\n\tint AnnotationGetStyleOffset();\r\n\tvoid ReleaseAllExtendedStyles();\r\n\tint AllocateExtendedStyles(int numberStyles);\r\n\tvoid AddUndoAction(int token, Scintilla::UndoFlags flags);\r\n\tPosition CharPositionFromPoint(int x, int y);\r\n\tPosition CharPositionFromPointClose(int x, int y);\r\n\tvoid SetMouseSelectionRectangularSwitch(bool mouseSelectionRectangularSwitch);\r\n\tbool MouseSelectionRectangularSwitch();\r\n\tvoid SetMultipleSelection(bool multipleSelection);\r\n\tbool MultipleSelection();\r\n\tvoid SetAdditionalSelectionTyping(bool additionalSelectionTyping);\r\n\tbool AdditionalSelectionTyping();\r\n\tvoid SetAdditionalCaretsBlink(bool additionalCaretsBlink);\r\n\tbool AdditionalCaretsBlink();\r\n\tvoid SetAdditionalCaretsVisible(bool additionalCaretsVisible);\r\n\tbool AdditionalCaretsVisible();\r\n\tint Selections();\r\n\tbool SelectionEmpty();\r\n\tvoid ClearSelections();\r\n\tvoid SetSelection(Position caret, Position anchor);\r\n\tvoid AddSelection(Position caret, Position anchor);\r\n\tint SelectionFromPoint(int x, int y);\r\n\tvoid DropSelectionN(int selection);\r\n\tvoid SetMainSelection(int selection);\r\n\tint MainSelection();\r\n\tvoid SetSelectionNCaret(int selection, Position caret);\r\n\tPosition SelectionNCaret(int selection);\r\n\tvoid SetSelectionNAnchor(int selection, Position anchor);\r\n\tPosition SelectionNAnchor(int selection);\r\n\tvoid SetSelectionNCaretVirtualSpace(int selection, Position space);\r\n\tPosition SelectionNCaretVirtualSpace(int selection);\r\n\tvoid SetSelectionNAnchorVirtualSpace(int selection, Position space);\r\n\tPosition SelectionNAnchorVirtualSpace(int selection);\r\n\tvoid SetSelectionNStart(int selection, Position anchor);\r\n\tPosition SelectionNStart(int selection);\r\n\tPosition SelectionNStartVirtualSpace(int selection);\r\n\tvoid SetSelectionNEnd(int selection, Position caret);\r\n\tPosition SelectionNEndVirtualSpace(int selection);\r\n\tPosition SelectionNEnd(int selection);\r\n\tvoid SetRectangularSelectionCaret(Position caret);\r\n\tPosition RectangularSelectionCaret();\r\n\tvoid SetRectangularSelectionAnchor(Position anchor);\r\n\tPosition RectangularSelectionAnchor();\r\n\tvoid SetRectangularSelectionCaretVirtualSpace(Position space);\r\n\tPosition RectangularSelectionCaretVirtualSpace();\r\n\tvoid SetRectangularSelectionAnchorVirtualSpace(Position space);\r\n\tPosition RectangularSelectionAnchorVirtualSpace();\r\n\tvoid SetVirtualSpaceOptions(Scintilla::VirtualSpace virtualSpaceOptions);\r\n\tScintilla::VirtualSpace VirtualSpaceOptions();\r\n\tvoid SetRectangularSelectionModifier(int modifier);\r\n\tint RectangularSelectionModifier();\r\n\tvoid SetAdditionalSelFore(Colour fore);\r\n\tvoid SetAdditionalSelBack(Colour back);\r\n\tvoid SetAdditionalSelAlpha(Scintilla::Alpha alpha);\r\n\tScintilla::Alpha AdditionalSelAlpha();\r\n\tvoid SetAdditionalCaretFore(Colour fore);\r\n\tColour AdditionalCaretFore();\r\n\tvoid RotateSelection();\r\n\tvoid SwapMainAnchorCaret();\r\n\tvoid MultipleSelectAddNext();\r\n\tvoid MultipleSelectAddEach();\r\n\tint ChangeLexerState(Position start, Position end);\r\n\tLine ContractedFoldNext(Line lineStart);\r\n\tvoid VerticalCentreCaret();\r\n\tvoid MoveSelectedLinesUp();\r\n\tvoid MoveSelectedLinesDown();\r\n\tvoid SetIdentifier(int identifier);\r\n\tint Identifier();\r\n\tvoid RGBAImageSetWidth(int width);\r\n\tvoid RGBAImageSetHeight(int height);\r\n\tvoid RGBAImageSetScale(int scalePercent);\r\n\tvoid MarkerDefineRGBAImage(int markerNumber, const char *pixels);\r\n\tvoid RegisterRGBAImage(int type, const char *pixels);\r\n\tvoid ScrollToStart();\r\n\tvoid ScrollToEnd();\r\n\tvoid SetTechnology(Scintilla::Technology technology);\r\n\tScintilla::Technology Technology();\r\n\tvoid *CreateLoader(Position bytes, Scintilla::DocumentOption documentOptions);\r\n\tvoid FindIndicatorShow(Position start, Position end);\r\n\tvoid FindIndicatorFlash(Position start, Position end);\r\n\tvoid FindIndicatorHide();\r\n\tvoid VCHomeDisplay();\r\n\tvoid VCHomeDisplayExtend();\r\n\tbool CaretLineVisibleAlways();\r\n\tvoid SetCaretLineVisibleAlways(bool alwaysVisible);\r\n\tvoid SetLineEndTypesAllowed(Scintilla::LineEndType lineEndBitSet);\r\n\tScintilla::LineEndType LineEndTypesAllowed();\r\n\tScintilla::LineEndType LineEndTypesActive();\r\n\tvoid SetRepresentation(const char *encodedCharacter, const char *representation);\r\n\tint Representation(const char *encodedCharacter, char *representation);\r\n\tstd::string Representation(const char *encodedCharacter);\r\n\tvoid ClearRepresentation(const char *encodedCharacter);\r\n\tvoid ClearAllRepresentations();\r\n\tvoid SetRepresentationAppearance(const char *encodedCharacter, Scintilla::RepresentationAppearance appearance);\r\n\tScintilla::RepresentationAppearance RepresentationAppearance(const char *encodedCharacter);\r\n\tvoid SetRepresentationColour(const char *encodedCharacter, ColourAlpha colour);\r\n\tColourAlpha RepresentationColour(const char *encodedCharacter);\r\n\tvoid EOLAnnotationSetText(Line line, const char *text);\r\n\tint EOLAnnotationGetText(Line line, char *text);\r\n\tstd::string EOLAnnotationGetText(Line line);\r\n\tvoid EOLAnnotationSetStyle(Line line, int style);\r\n\tint EOLAnnotationGetStyle(Line line);\r\n\tvoid EOLAnnotationClearAll();\r\n\tvoid EOLAnnotationSetVisible(Scintilla::EOLAnnotationVisible visible);\r\n\tScintilla::EOLAnnotationVisible EOLAnnotationGetVisible();\r\n\tvoid EOLAnnotationSetStyleOffset(int style);\r\n\tint EOLAnnotationGetStyleOffset();\r\n\tbool SupportsFeature(Scintilla::Supports feature);\r\n\tScintilla::LineCharacterIndexType LineCharacterIndex();\r\n\tvoid AllocateLineCharacterIndex(Scintilla::LineCharacterIndexType lineCharacterIndex);\r\n\tvoid ReleaseLineCharacterIndex(Scintilla::LineCharacterIndexType lineCharacterIndex);\r\n\tLine LineFromIndexPosition(Position pos, Scintilla::LineCharacterIndexType lineCharacterIndex);\r\n\tPosition IndexPositionFromLine(Line line, Scintilla::LineCharacterIndexType lineCharacterIndex);\r\n\tvoid StartRecord();\r\n\tvoid StopRecord();\r\n\tint Lexer();\r\n\tvoid Colourise(Position start, Position end);\r\n\tvoid SetProperty(const char *key, const char *value);\r\n\tvoid SetKeyWords(int keyWordSet, const char *keyWords);\r\n\tint Property(const char *key, char *value);\r\n\tstd::string Property(const char *key);\r\n\tint PropertyExpanded(const char *key, char *value);\r\n\tstd::string PropertyExpanded(const char *key);\r\n\tint PropertyInt(const char *key, int defaultValue);\r\n\tint LexerLanguage(char *language);\r\n\tstd::string LexerLanguage();\r\n\tvoid *PrivateLexerCall(int operation, void *pointer);\r\n\tint PropertyNames(char *names);\r\n\tstd::string PropertyNames();\r\n\tScintilla::TypeProperty PropertyType(const char *name);\r\n\tint DescribeProperty(const char *name, char *description);\r\n\tstd::string DescribeProperty(const char *name);\r\n\tint DescribeKeyWordSets(char *descriptions);\r\n\tstd::string DescribeKeyWordSets();\r\n\tScintilla::LineEndType LineEndTypesSupported();\r\n\tint AllocateSubStyles(int styleBase, int numberStyles);\r\n\tint SubStylesStart(int styleBase);\r\n\tint SubStylesLength(int styleBase);\r\n\tint StyleFromSubStyle(int subStyle);\r\n\tint PrimaryStyleFromStyle(int style);\r\n\tvoid FreeSubStyles();\r\n\tvoid SetIdentifiers(int style, const char *identifiers);\r\n\tint DistanceToSecondaryStyles();\r\n\tint SubStyleBases(char *styles);\r\n\tstd::string SubStyleBases();\r\n\tint NamedStyles();\r\n\tint NameOfStyle(int style, char *name);\r\n\tstd::string NameOfStyle(int style);\r\n\tint TagsOfStyle(int style, char *tags);\r\n\tstd::string TagsOfStyle(int style);\r\n\tint DescriptionOfStyle(int style, char *description);\r\n\tstd::string DescriptionOfStyle(int style);\r\n\tvoid SetILexer(void *ilexer);\r\n\tScintilla::Bidirectional Bidirectional();\r\n\tvoid SetBidirectional(Scintilla::Bidirectional bidirectional);\r\n\r\n//--Autogenerated -- end of section automatically generated from Scintilla.iface\r\n\r\n};\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/include/ScintillaMessages.h",
    "content": "// Scintilla source code edit control\r\n/** @file ScintillaMessages.h\r\n ** Enumerate the messages that can be sent to Scintilla.\r\n **/\r\n// Copyright 1998-2019 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n/* Most of this file is automatically generated from the Scintilla.iface interface definition\r\n * file which contains any comments about the definitions. ScintillaAPIFacer.py does the generation. */\r\n\r\n#ifndef SCINTILLAMESSAGES_H\r\n#define SCINTILLAMESSAGES_H\r\n\r\nnamespace Scintilla {\r\n\r\n// Enumerations\r\n//++Autogenerated -- start of section automatically generated from Scintilla.iface\r\nenum class Message {\r\n\tAddText = 2001,\r\n\tAddStyledText = 2002,\r\n\tInsertText = 2003,\r\n\tChangeInsertion = 2672,\r\n\tClearAll = 2004,\r\n\tDeleteRange = 2645,\r\n\tClearDocumentStyle = 2005,\r\n\tGetLength = 2006,\r\n\tGetCharAt = 2007,\r\n\tGetCurrentPos = 2008,\r\n\tGetAnchor = 2009,\r\n\tGetStyleAt = 2010,\r\n\tGetStyleIndexAt = 2038,\r\n\tRedo = 2011,\r\n\tSetUndoCollection = 2012,\r\n\tSelectAll = 2013,\r\n\tSetSavePoint = 2014,\r\n\tGetStyledText = 2015,\r\n\tGetStyledTextFull = 2778,\r\n\tCanRedo = 2016,\r\n\tMarkerLineFromHandle = 2017,\r\n\tMarkerDeleteHandle = 2018,\r\n\tMarkerHandleFromLine = 2732,\r\n\tMarkerNumberFromLine = 2733,\r\n\tGetUndoCollection = 2019,\r\n\tGetViewWS = 2020,\r\n\tSetViewWS = 2021,\r\n\tGetTabDrawMode = 2698,\r\n\tSetTabDrawMode = 2699,\r\n\tPositionFromPoint = 2022,\r\n\tPositionFromPointClose = 2023,\r\n\tGotoLine = 2024,\r\n\tGotoPos = 2025,\r\n\tSetAnchor = 2026,\r\n\tGetCurLine = 2027,\r\n\tGetEndStyled = 2028,\r\n\tConvertEOLs = 2029,\r\n\tGetEOLMode = 2030,\r\n\tSetEOLMode = 2031,\r\n\tStartStyling = 2032,\r\n\tSetStyling = 2033,\r\n\tGetBufferedDraw = 2034,\r\n\tSetBufferedDraw = 2035,\r\n\tSetTabWidth = 2036,\r\n\tGetTabWidth = 2121,\r\n\tSetTabMinimumWidth = 2724,\r\n\tGetTabMinimumWidth = 2725,\r\n\tClearTabStops = 2675,\r\n\tAddTabStop = 2676,\r\n\tGetNextTabStop = 2677,\r\n\tSetCodePage = 2037,\r\n\tSetFontLocale = 2760,\r\n\tGetFontLocale = 2761,\r\n\tGetIMEInteraction = 2678,\r\n\tSetIMEInteraction = 2679,\r\n\tMarkerDefine = 2040,\r\n\tMarkerSetFore = 2041,\r\n\tMarkerSetBack = 2042,\r\n\tMarkerSetBackSelected = 2292,\r\n\tMarkerSetForeTranslucent = 2294,\r\n\tMarkerSetBackTranslucent = 2295,\r\n\tMarkerSetBackSelectedTranslucent = 2296,\r\n\tMarkerSetStrokeWidth = 2297,\r\n\tMarkerEnableHighlight = 2293,\r\n\tMarkerAdd = 2043,\r\n\tMarkerDelete = 2044,\r\n\tMarkerDeleteAll = 2045,\r\n\tMarkerGet = 2046,\r\n\tMarkerNext = 2047,\r\n\tMarkerPrevious = 2048,\r\n\tMarkerDefinePixmap = 2049,\r\n\tMarkerAddSet = 2466,\r\n\tMarkerSetAlpha = 2476,\r\n\tMarkerGetLayer = 2734,\r\n\tMarkerSetLayer = 2735,\r\n\tSetMarginTypeN = 2240,\r\n\tGetMarginTypeN = 2241,\r\n\tSetMarginWidthN = 2242,\r\n\tGetMarginWidthN = 2243,\r\n\tSetMarginMaskN = 2244,\r\n\tGetMarginMaskN = 2245,\r\n\tSetMarginSensitiveN = 2246,\r\n\tGetMarginSensitiveN = 2247,\r\n\tSetMarginCursorN = 2248,\r\n\tGetMarginCursorN = 2249,\r\n\tSetMarginBackN = 2250,\r\n\tGetMarginBackN = 2251,\r\n\tSetMargins = 2252,\r\n\tGetMargins = 2253,\r\n\tStyleClearAll = 2050,\r\n\tStyleSetFore = 2051,\r\n\tStyleSetBack = 2052,\r\n\tStyleSetBold = 2053,\r\n\tStyleSetItalic = 2054,\r\n\tStyleSetSize = 2055,\r\n\tStyleSetFont = 2056,\r\n\tStyleSetEOLFilled = 2057,\r\n\tStyleResetDefault = 2058,\r\n\tStyleSetUnderline = 2059,\r\n\tStyleGetFore = 2481,\r\n\tStyleGetBack = 2482,\r\n\tStyleGetBold = 2483,\r\n\tStyleGetItalic = 2484,\r\n\tStyleGetSize = 2485,\r\n\tStyleGetFont = 2486,\r\n\tStyleGetEOLFilled = 2487,\r\n\tStyleGetUnderline = 2488,\r\n\tStyleGetCase = 2489,\r\n\tStyleGetCharacterSet = 2490,\r\n\tStyleGetVisible = 2491,\r\n\tStyleGetChangeable = 2492,\r\n\tStyleGetHotSpot = 2493,\r\n\tStyleSetCase = 2060,\r\n\tStyleSetSizeFractional = 2061,\r\n\tStyleGetSizeFractional = 2062,\r\n\tStyleSetWeight = 2063,\r\n\tStyleGetWeight = 2064,\r\n\tStyleSetCharacterSet = 2066,\r\n\tStyleSetHotSpot = 2409,\r\n\tStyleSetCheckMonospaced = 2254,\r\n\tStyleGetCheckMonospaced = 2255,\r\n\tStyleSetInvisibleRepresentation = 2256,\r\n\tStyleGetInvisibleRepresentation = 2257,\r\n\tSetElementColour = 2753,\r\n\tGetElementColour = 2754,\r\n\tResetElementColour = 2755,\r\n\tGetElementIsSet = 2756,\r\n\tGetElementAllowsTranslucent = 2757,\r\n\tGetElementBaseColour = 2758,\r\n\tSetSelFore = 2067,\r\n\tSetSelBack = 2068,\r\n\tGetSelAlpha = 2477,\r\n\tSetSelAlpha = 2478,\r\n\tGetSelEOLFilled = 2479,\r\n\tSetSelEOLFilled = 2480,\r\n\tGetSelectionLayer = 2762,\r\n\tSetSelectionLayer = 2763,\r\n\tGetCaretLineLayer = 2764,\r\n\tSetCaretLineLayer = 2765,\r\n\tGetCaretLineHighlightSubLine = 2773,\r\n\tSetCaretLineHighlightSubLine = 2774,\r\n\tSetCaretFore = 2069,\r\n\tAssignCmdKey = 2070,\r\n\tClearCmdKey = 2071,\r\n\tClearAllCmdKeys = 2072,\r\n\tSetStylingEx = 2073,\r\n\tStyleSetVisible = 2074,\r\n\tGetCaretPeriod = 2075,\r\n\tSetCaretPeriod = 2076,\r\n\tSetWordChars = 2077,\r\n\tGetWordChars = 2646,\r\n\tSetCharacterCategoryOptimization = 2720,\r\n\tGetCharacterCategoryOptimization = 2721,\r\n\tBeginUndoAction = 2078,\r\n\tEndUndoAction = 2079,\r\n\tGetUndoActions = 2790,\r\n\tSetUndoSavePoint = 2791,\r\n\tGetUndoSavePoint = 2792,\r\n\tSetUndoDetach = 2793,\r\n\tGetUndoDetach = 2794,\r\n\tSetUndoTentative = 2795,\r\n\tGetUndoTentative = 2796,\r\n\tSetUndoCurrent = 2797,\r\n\tGetUndoCurrent = 2798,\r\n\tPushUndoActionType = 2800,\r\n\tChangeLastUndoActionText = 2801,\r\n\tGetUndoActionType = 2802,\r\n\tGetUndoActionPosition = 2803,\r\n\tGetUndoActionText = 2804,\r\n\tIndicSetStyle = 2080,\r\n\tIndicGetStyle = 2081,\r\n\tIndicSetFore = 2082,\r\n\tIndicGetFore = 2083,\r\n\tIndicSetUnder = 2510,\r\n\tIndicGetUnder = 2511,\r\n\tIndicSetHoverStyle = 2680,\r\n\tIndicGetHoverStyle = 2681,\r\n\tIndicSetHoverFore = 2682,\r\n\tIndicGetHoverFore = 2683,\r\n\tIndicSetFlags = 2684,\r\n\tIndicGetFlags = 2685,\r\n\tIndicSetStrokeWidth = 2751,\r\n\tIndicGetStrokeWidth = 2752,\r\n\tSetWhitespaceFore = 2084,\r\n\tSetWhitespaceBack = 2085,\r\n\tSetWhitespaceSize = 2086,\r\n\tGetWhitespaceSize = 2087,\r\n\tSetLineState = 2092,\r\n\tGetLineState = 2093,\r\n\tGetMaxLineState = 2094,\r\n\tGetCaretLineVisible = 2095,\r\n\tSetCaretLineVisible = 2096,\r\n\tGetCaretLineBack = 2097,\r\n\tSetCaretLineBack = 2098,\r\n\tGetCaretLineFrame = 2704,\r\n\tSetCaretLineFrame = 2705,\r\n\tStyleSetChangeable = 2099,\r\n\tAutoCShow = 2100,\r\n\tAutoCCancel = 2101,\r\n\tAutoCActive = 2102,\r\n\tAutoCPosStart = 2103,\r\n\tAutoCComplete = 2104,\r\n\tAutoCStops = 2105,\r\n\tAutoCSetSeparator = 2106,\r\n\tAutoCGetSeparator = 2107,\r\n\tAutoCSelect = 2108,\r\n\tAutoCSetCancelAtStart = 2110,\r\n\tAutoCGetCancelAtStart = 2111,\r\n\tAutoCSetFillUps = 2112,\r\n\tAutoCSetChooseSingle = 2113,\r\n\tAutoCGetChooseSingle = 2114,\r\n\tAutoCSetIgnoreCase = 2115,\r\n\tAutoCGetIgnoreCase = 2116,\r\n\tUserListShow = 2117,\r\n\tAutoCSetAutoHide = 2118,\r\n\tAutoCGetAutoHide = 2119,\r\n\tAutoCSetOptions = 2638,\r\n\tAutoCGetOptions = 2639,\r\n\tAutoCSetDropRestOfWord = 2270,\r\n\tAutoCGetDropRestOfWord = 2271,\r\n\tRegisterImage = 2405,\r\n\tClearRegisteredImages = 2408,\r\n\tAutoCGetTypeSeparator = 2285,\r\n\tAutoCSetTypeSeparator = 2286,\r\n\tAutoCSetMaxWidth = 2208,\r\n\tAutoCGetMaxWidth = 2209,\r\n\tAutoCSetMaxHeight = 2210,\r\n\tAutoCGetMaxHeight = 2211,\r\n\tSetIndent = 2122,\r\n\tGetIndent = 2123,\r\n\tSetUseTabs = 2124,\r\n\tGetUseTabs = 2125,\r\n\tSetLineIndentation = 2126,\r\n\tGetLineIndentation = 2127,\r\n\tGetLineIndentPosition = 2128,\r\n\tGetColumn = 2129,\r\n\tCountCharacters = 2633,\r\n\tCountCodeUnits = 2715,\r\n\tSetHScrollBar = 2130,\r\n\tGetHScrollBar = 2131,\r\n\tSetIndentationGuides = 2132,\r\n\tGetIndentationGuides = 2133,\r\n\tSetHighlightGuide = 2134,\r\n\tGetHighlightGuide = 2135,\r\n\tGetLineEndPosition = 2136,\r\n\tGetCodePage = 2137,\r\n\tGetCaretFore = 2138,\r\n\tGetReadOnly = 2140,\r\n\tSetCurrentPos = 2141,\r\n\tSetSelectionStart = 2142,\r\n\tGetSelectionStart = 2143,\r\n\tSetSelectionEnd = 2144,\r\n\tGetSelectionEnd = 2145,\r\n\tSetEmptySelection = 2556,\r\n\tSetPrintMagnification = 2146,\r\n\tGetPrintMagnification = 2147,\r\n\tSetPrintColourMode = 2148,\r\n\tGetPrintColourMode = 2149,\r\n\tFindText = 2150,\r\n\tFindTextFull = 2196,\r\n\tFormatRange = 2151,\r\n\tFormatRangeFull = 2777,\r\n\tSetChangeHistory = 2780,\r\n\tGetChangeHistory = 2781,\r\n\tGetFirstVisibleLine = 2152,\r\n\tGetLine = 2153,\r\n\tGetLineCount = 2154,\r\n\tAllocateLines = 2089,\r\n\tSetMarginLeft = 2155,\r\n\tGetMarginLeft = 2156,\r\n\tSetMarginRight = 2157,\r\n\tGetMarginRight = 2158,\r\n\tGetModify = 2159,\r\n\tSetSel = 2160,\r\n\tGetSelText = 2161,\r\n\tGetTextRange = 2162,\r\n\tGetTextRangeFull = 2039,\r\n\tHideSelection = 2163,\r\n\tGetSelectionHidden = 2088,\r\n\tPointXFromPosition = 2164,\r\n\tPointYFromPosition = 2165,\r\n\tLineFromPosition = 2166,\r\n\tPositionFromLine = 2167,\r\n\tLineScroll = 2168,\r\n\tScrollCaret = 2169,\r\n\tScrollRange = 2569,\r\n\tReplaceSel = 2170,\r\n\tSetReadOnly = 2171,\r\n\tNull = 2172,\r\n\tCanPaste = 2173,\r\n\tCanUndo = 2174,\r\n\tEmptyUndoBuffer = 2175,\r\n\tUndo = 2176,\r\n\tCut = 2177,\r\n\tCopy = 2178,\r\n\tPaste = 2179,\r\n\tClear = 2180,\r\n\tSetText = 2181,\r\n\tGetText = 2182,\r\n\tGetTextLength = 2183,\r\n\tGetDirectFunction = 2184,\r\n\tGetDirectStatusFunction = 2772,\r\n\tGetDirectPointer = 2185,\r\n\tSetOvertype = 2186,\r\n\tGetOvertype = 2187,\r\n\tSetCaretWidth = 2188,\r\n\tGetCaretWidth = 2189,\r\n\tSetTargetStart = 2190,\r\n\tGetTargetStart = 2191,\r\n\tSetTargetStartVirtualSpace = 2728,\r\n\tGetTargetStartVirtualSpace = 2729,\r\n\tSetTargetEnd = 2192,\r\n\tGetTargetEnd = 2193,\r\n\tSetTargetEndVirtualSpace = 2730,\r\n\tGetTargetEndVirtualSpace = 2731,\r\n\tSetTargetRange = 2686,\r\n\tGetTargetText = 2687,\r\n\tTargetFromSelection = 2287,\r\n\tTargetWholeDocument = 2690,\r\n\tReplaceTarget = 2194,\r\n\tReplaceTargetRE = 2195,\r\n\tReplaceTargetMinimal = 2779,\r\n\tSearchInTarget = 2197,\r\n\tSetSearchFlags = 2198,\r\n\tGetSearchFlags = 2199,\r\n\tCallTipShow = 2200,\r\n\tCallTipCancel = 2201,\r\n\tCallTipActive = 2202,\r\n\tCallTipPosStart = 2203,\r\n\tCallTipSetPosStart = 2214,\r\n\tCallTipSetHlt = 2204,\r\n\tCallTipSetBack = 2205,\r\n\tCallTipSetFore = 2206,\r\n\tCallTipSetForeHlt = 2207,\r\n\tCallTipUseStyle = 2212,\r\n\tCallTipSetPosition = 2213,\r\n\tVisibleFromDocLine = 2220,\r\n\tDocLineFromVisible = 2221,\r\n\tWrapCount = 2235,\r\n\tSetFoldLevel = 2222,\r\n\tGetFoldLevel = 2223,\r\n\tGetLastChild = 2224,\r\n\tGetFoldParent = 2225,\r\n\tShowLines = 2226,\r\n\tHideLines = 2227,\r\n\tGetLineVisible = 2228,\r\n\tGetAllLinesVisible = 2236,\r\n\tSetFoldExpanded = 2229,\r\n\tGetFoldExpanded = 2230,\r\n\tToggleFold = 2231,\r\n\tToggleFoldShowText = 2700,\r\n\tFoldDisplayTextSetStyle = 2701,\r\n\tFoldDisplayTextGetStyle = 2707,\r\n\tSetDefaultFoldDisplayText = 2722,\r\n\tGetDefaultFoldDisplayText = 2723,\r\n\tFoldLine = 2237,\r\n\tFoldChildren = 2238,\r\n\tExpandChildren = 2239,\r\n\tFoldAll = 2662,\r\n\tEnsureVisible = 2232,\r\n\tSetAutomaticFold = 2663,\r\n\tGetAutomaticFold = 2664,\r\n\tSetFoldFlags = 2233,\r\n\tEnsureVisibleEnforcePolicy = 2234,\r\n\tSetTabIndents = 2260,\r\n\tGetTabIndents = 2261,\r\n\tSetBackSpaceUnIndents = 2262,\r\n\tGetBackSpaceUnIndents = 2263,\r\n\tSetMouseDwellTime = 2264,\r\n\tGetMouseDwellTime = 2265,\r\n\tWordStartPosition = 2266,\r\n\tWordEndPosition = 2267,\r\n\tIsRangeWord = 2691,\r\n\tSetIdleStyling = 2692,\r\n\tGetIdleStyling = 2693,\r\n\tSetWrapMode = 2268,\r\n\tGetWrapMode = 2269,\r\n\tSetWrapVisualFlags = 2460,\r\n\tGetWrapVisualFlags = 2461,\r\n\tSetWrapVisualFlagsLocation = 2462,\r\n\tGetWrapVisualFlagsLocation = 2463,\r\n\tSetWrapStartIndent = 2464,\r\n\tGetWrapStartIndent = 2465,\r\n\tSetWrapIndentMode = 2472,\r\n\tGetWrapIndentMode = 2473,\r\n\tSetLayoutCache = 2272,\r\n\tGetLayoutCache = 2273,\r\n\tSetScrollWidth = 2274,\r\n\tGetScrollWidth = 2275,\r\n\tSetScrollWidthTracking = 2516,\r\n\tGetScrollWidthTracking = 2517,\r\n\tTextWidth = 2276,\r\n\tSetEndAtLastLine = 2277,\r\n\tGetEndAtLastLine = 2278,\r\n\tTextHeight = 2279,\r\n\tSetVScrollBar = 2280,\r\n\tGetVScrollBar = 2281,\r\n\tAppendText = 2282,\r\n\tGetPhasesDraw = 2673,\r\n\tSetPhasesDraw = 2674,\r\n\tSetFontQuality = 2611,\r\n\tGetFontQuality = 2612,\r\n\tSetFirstVisibleLine = 2613,\r\n\tSetMultiPaste = 2614,\r\n\tGetMultiPaste = 2615,\r\n\tGetTag = 2616,\r\n\tLinesJoin = 2288,\r\n\tLinesSplit = 2289,\r\n\tSetFoldMarginColour = 2290,\r\n\tSetFoldMarginHiColour = 2291,\r\n\tSetAccessibility = 2702,\r\n\tGetAccessibility = 2703,\r\n\tLineDown = 2300,\r\n\tLineDownExtend = 2301,\r\n\tLineUp = 2302,\r\n\tLineUpExtend = 2303,\r\n\tCharLeft = 2304,\r\n\tCharLeftExtend = 2305,\r\n\tCharRight = 2306,\r\n\tCharRightExtend = 2307,\r\n\tWordLeft = 2308,\r\n\tWordLeftExtend = 2309,\r\n\tWordRight = 2310,\r\n\tWordRightExtend = 2311,\r\n\tHome = 2312,\r\n\tHomeExtend = 2313,\r\n\tLineEnd = 2314,\r\n\tLineEndExtend = 2315,\r\n\tDocumentStart = 2316,\r\n\tDocumentStartExtend = 2317,\r\n\tDocumentEnd = 2318,\r\n\tDocumentEndExtend = 2319,\r\n\tPageUp = 2320,\r\n\tPageUpExtend = 2321,\r\n\tPageDown = 2322,\r\n\tPageDownExtend = 2323,\r\n\tEditToggleOvertype = 2324,\r\n\tCancel = 2325,\r\n\tDeleteBack = 2326,\r\n\tTab = 2327,\r\n\tBackTab = 2328,\r\n\tNewLine = 2329,\r\n\tFormFeed = 2330,\r\n\tVCHome = 2331,\r\n\tVCHomeExtend = 2332,\r\n\tZoomIn = 2333,\r\n\tZoomOut = 2334,\r\n\tDelWordLeft = 2335,\r\n\tDelWordRight = 2336,\r\n\tDelWordRightEnd = 2518,\r\n\tLineCut = 2337,\r\n\tLineDelete = 2338,\r\n\tLineTranspose = 2339,\r\n\tLineReverse = 2354,\r\n\tLineDuplicate = 2404,\r\n\tLowerCase = 2340,\r\n\tUpperCase = 2341,\r\n\tLineScrollDown = 2342,\r\n\tLineScrollUp = 2343,\r\n\tDeleteBackNotLine = 2344,\r\n\tHomeDisplay = 2345,\r\n\tHomeDisplayExtend = 2346,\r\n\tLineEndDisplay = 2347,\r\n\tLineEndDisplayExtend = 2348,\r\n\tHomeWrap = 2349,\r\n\tHomeWrapExtend = 2450,\r\n\tLineEndWrap = 2451,\r\n\tLineEndWrapExtend = 2452,\r\n\tVCHomeWrap = 2453,\r\n\tVCHomeWrapExtend = 2454,\r\n\tLineCopy = 2455,\r\n\tMoveCaretInsideView = 2401,\r\n\tLineLength = 2350,\r\n\tBraceHighlight = 2351,\r\n\tBraceHighlightIndicator = 2498,\r\n\tBraceBadLight = 2352,\r\n\tBraceBadLightIndicator = 2499,\r\n\tBraceMatch = 2353,\r\n\tBraceMatchNext = 2369,\r\n\tGetViewEOL = 2355,\r\n\tSetViewEOL = 2356,\r\n\tGetDocPointer = 2357,\r\n\tSetDocPointer = 2358,\r\n\tSetModEventMask = 2359,\r\n\tGetEdgeColumn = 2360,\r\n\tSetEdgeColumn = 2361,\r\n\tGetEdgeMode = 2362,\r\n\tSetEdgeMode = 2363,\r\n\tGetEdgeColour = 2364,\r\n\tSetEdgeColour = 2365,\r\n\tMultiEdgeAddLine = 2694,\r\n\tMultiEdgeClearAll = 2695,\r\n\tGetMultiEdgeColumn = 2749,\r\n\tSearchAnchor = 2366,\r\n\tSearchNext = 2367,\r\n\tSearchPrev = 2368,\r\n\tLinesOnScreen = 2370,\r\n\tUsePopUp = 2371,\r\n\tSelectionIsRectangle = 2372,\r\n\tSetZoom = 2373,\r\n\tGetZoom = 2374,\r\n\tCreateDocument = 2375,\r\n\tAddRefDocument = 2376,\r\n\tReleaseDocument = 2377,\r\n\tGetDocumentOptions = 2379,\r\n\tGetModEventMask = 2378,\r\n\tSetCommandEvents = 2717,\r\n\tGetCommandEvents = 2718,\r\n\tSetFocus = 2380,\r\n\tGetFocus = 2381,\r\n\tSetStatus = 2382,\r\n\tGetStatus = 2383,\r\n\tSetMouseDownCaptures = 2384,\r\n\tGetMouseDownCaptures = 2385,\r\n\tSetMouseWheelCaptures = 2696,\r\n\tGetMouseWheelCaptures = 2697,\r\n\tSetCursor = 2386,\r\n\tGetCursor = 2387,\r\n\tSetControlCharSymbol = 2388,\r\n\tGetControlCharSymbol = 2389,\r\n\tWordPartLeft = 2390,\r\n\tWordPartLeftExtend = 2391,\r\n\tWordPartRight = 2392,\r\n\tWordPartRightExtend = 2393,\r\n\tSetVisiblePolicy = 2394,\r\n\tDelLineLeft = 2395,\r\n\tDelLineRight = 2396,\r\n\tSetXOffset = 2397,\r\n\tGetXOffset = 2398,\r\n\tChooseCaretX = 2399,\r\n\tGrabFocus = 2400,\r\n\tSetXCaretPolicy = 2402,\r\n\tSetYCaretPolicy = 2403,\r\n\tSetPrintWrapMode = 2406,\r\n\tGetPrintWrapMode = 2407,\r\n\tSetHotspotActiveFore = 2410,\r\n\tGetHotspotActiveFore = 2494,\r\n\tSetHotspotActiveBack = 2411,\r\n\tGetHotspotActiveBack = 2495,\r\n\tSetHotspotActiveUnderline = 2412,\r\n\tGetHotspotActiveUnderline = 2496,\r\n\tSetHotspotSingleLine = 2421,\r\n\tGetHotspotSingleLine = 2497,\r\n\tParaDown = 2413,\r\n\tParaDownExtend = 2414,\r\n\tParaUp = 2415,\r\n\tParaUpExtend = 2416,\r\n\tPositionBefore = 2417,\r\n\tPositionAfter = 2418,\r\n\tPositionRelative = 2670,\r\n\tPositionRelativeCodeUnits = 2716,\r\n\tCopyRange = 2419,\r\n\tCopyText = 2420,\r\n\tSetSelectionMode = 2422,\r\n\tChangeSelectionMode = 2659,\r\n\tGetSelectionMode = 2423,\r\n\tSetMoveExtendsSelection = 2719,\r\n\tGetMoveExtendsSelection = 2706,\r\n\tGetLineSelStartPosition = 2424,\r\n\tGetLineSelEndPosition = 2425,\r\n\tLineDownRectExtend = 2426,\r\n\tLineUpRectExtend = 2427,\r\n\tCharLeftRectExtend = 2428,\r\n\tCharRightRectExtend = 2429,\r\n\tHomeRectExtend = 2430,\r\n\tVCHomeRectExtend = 2431,\r\n\tLineEndRectExtend = 2432,\r\n\tPageUpRectExtend = 2433,\r\n\tPageDownRectExtend = 2434,\r\n\tStutteredPageUp = 2435,\r\n\tStutteredPageUpExtend = 2436,\r\n\tStutteredPageDown = 2437,\r\n\tStutteredPageDownExtend = 2438,\r\n\tWordLeftEnd = 2439,\r\n\tWordLeftEndExtend = 2440,\r\n\tWordRightEnd = 2441,\r\n\tWordRightEndExtend = 2442,\r\n\tSetWhitespaceChars = 2443,\r\n\tGetWhitespaceChars = 2647,\r\n\tSetPunctuationChars = 2648,\r\n\tGetPunctuationChars = 2649,\r\n\tSetCharsDefault = 2444,\r\n\tAutoCGetCurrent = 2445,\r\n\tAutoCGetCurrentText = 2610,\r\n\tAutoCSetCaseInsensitiveBehaviour = 2634,\r\n\tAutoCGetCaseInsensitiveBehaviour = 2635,\r\n\tAutoCSetMulti = 2636,\r\n\tAutoCGetMulti = 2637,\r\n\tAutoCSetOrder = 2660,\r\n\tAutoCGetOrder = 2661,\r\n\tAllocate = 2446,\r\n\tTargetAsUTF8 = 2447,\r\n\tSetLengthForEncode = 2448,\r\n\tEncodedFromUTF8 = 2449,\r\n\tFindColumn = 2456,\r\n\tGetCaretSticky = 2457,\r\n\tSetCaretSticky = 2458,\r\n\tToggleCaretSticky = 2459,\r\n\tSetPasteConvertEndings = 2467,\r\n\tGetPasteConvertEndings = 2468,\r\n\tReplaceRectangular = 2771,\r\n\tSelectionDuplicate = 2469,\r\n\tSetCaretLineBackAlpha = 2470,\r\n\tGetCaretLineBackAlpha = 2471,\r\n\tSetCaretStyle = 2512,\r\n\tGetCaretStyle = 2513,\r\n\tSetIndicatorCurrent = 2500,\r\n\tGetIndicatorCurrent = 2501,\r\n\tSetIndicatorValue = 2502,\r\n\tGetIndicatorValue = 2503,\r\n\tIndicatorFillRange = 2504,\r\n\tIndicatorClearRange = 2505,\r\n\tIndicatorAllOnFor = 2506,\r\n\tIndicatorValueAt = 2507,\r\n\tIndicatorStart = 2508,\r\n\tIndicatorEnd = 2509,\r\n\tSetPositionCache = 2514,\r\n\tGetPositionCache = 2515,\r\n\tSetLayoutThreads = 2775,\r\n\tGetLayoutThreads = 2776,\r\n\tCopyAllowLine = 2519,\r\n\tGetCharacterPointer = 2520,\r\n\tGetRangePointer = 2643,\r\n\tGetGapPosition = 2644,\r\n\tIndicSetAlpha = 2523,\r\n\tIndicGetAlpha = 2524,\r\n\tIndicSetOutlineAlpha = 2558,\r\n\tIndicGetOutlineAlpha = 2559,\r\n\tSetExtraAscent = 2525,\r\n\tGetExtraAscent = 2526,\r\n\tSetExtraDescent = 2527,\r\n\tGetExtraDescent = 2528,\r\n\tMarkerSymbolDefined = 2529,\r\n\tMarginSetText = 2530,\r\n\tMarginGetText = 2531,\r\n\tMarginSetStyle = 2532,\r\n\tMarginGetStyle = 2533,\r\n\tMarginSetStyles = 2534,\r\n\tMarginGetStyles = 2535,\r\n\tMarginTextClearAll = 2536,\r\n\tMarginSetStyleOffset = 2537,\r\n\tMarginGetStyleOffset = 2538,\r\n\tSetMarginOptions = 2539,\r\n\tGetMarginOptions = 2557,\r\n\tAnnotationSetText = 2540,\r\n\tAnnotationGetText = 2541,\r\n\tAnnotationSetStyle = 2542,\r\n\tAnnotationGetStyle = 2543,\r\n\tAnnotationSetStyles = 2544,\r\n\tAnnotationGetStyles = 2545,\r\n\tAnnotationGetLines = 2546,\r\n\tAnnotationClearAll = 2547,\r\n\tAnnotationSetVisible = 2548,\r\n\tAnnotationGetVisible = 2549,\r\n\tAnnotationSetStyleOffset = 2550,\r\n\tAnnotationGetStyleOffset = 2551,\r\n\tReleaseAllExtendedStyles = 2552,\r\n\tAllocateExtendedStyles = 2553,\r\n\tAddUndoAction = 2560,\r\n\tCharPositionFromPoint = 2561,\r\n\tCharPositionFromPointClose = 2562,\r\n\tSetMouseSelectionRectangularSwitch = 2668,\r\n\tGetMouseSelectionRectangularSwitch = 2669,\r\n\tSetMultipleSelection = 2563,\r\n\tGetMultipleSelection = 2564,\r\n\tSetAdditionalSelectionTyping = 2565,\r\n\tGetAdditionalSelectionTyping = 2566,\r\n\tSetAdditionalCaretsBlink = 2567,\r\n\tGetAdditionalCaretsBlink = 2568,\r\n\tSetAdditionalCaretsVisible = 2608,\r\n\tGetAdditionalCaretsVisible = 2609,\r\n\tGetSelections = 2570,\r\n\tGetSelectionEmpty = 2650,\r\n\tClearSelections = 2571,\r\n\tSetSelection = 2572,\r\n\tAddSelection = 2573,\r\n\tSelectionFromPoint = 2474,\r\n\tDropSelectionN = 2671,\r\n\tSetMainSelection = 2574,\r\n\tGetMainSelection = 2575,\r\n\tSetSelectionNCaret = 2576,\r\n\tGetSelectionNCaret = 2577,\r\n\tSetSelectionNAnchor = 2578,\r\n\tGetSelectionNAnchor = 2579,\r\n\tSetSelectionNCaretVirtualSpace = 2580,\r\n\tGetSelectionNCaretVirtualSpace = 2581,\r\n\tSetSelectionNAnchorVirtualSpace = 2582,\r\n\tGetSelectionNAnchorVirtualSpace = 2583,\r\n\tSetSelectionNStart = 2584,\r\n\tGetSelectionNStart = 2585,\r\n\tGetSelectionNStartVirtualSpace = 2726,\r\n\tSetSelectionNEnd = 2586,\r\n\tGetSelectionNEndVirtualSpace = 2727,\r\n\tGetSelectionNEnd = 2587,\r\n\tSetRectangularSelectionCaret = 2588,\r\n\tGetRectangularSelectionCaret = 2589,\r\n\tSetRectangularSelectionAnchor = 2590,\r\n\tGetRectangularSelectionAnchor = 2591,\r\n\tSetRectangularSelectionCaretVirtualSpace = 2592,\r\n\tGetRectangularSelectionCaretVirtualSpace = 2593,\r\n\tSetRectangularSelectionAnchorVirtualSpace = 2594,\r\n\tGetRectangularSelectionAnchorVirtualSpace = 2595,\r\n\tSetVirtualSpaceOptions = 2596,\r\n\tGetVirtualSpaceOptions = 2597,\r\n\tSetRectangularSelectionModifier = 2598,\r\n\tGetRectangularSelectionModifier = 2599,\r\n\tSetAdditionalSelFore = 2600,\r\n\tSetAdditionalSelBack = 2601,\r\n\tSetAdditionalSelAlpha = 2602,\r\n\tGetAdditionalSelAlpha = 2603,\r\n\tSetAdditionalCaretFore = 2604,\r\n\tGetAdditionalCaretFore = 2605,\r\n\tRotateSelection = 2606,\r\n\tSwapMainAnchorCaret = 2607,\r\n\tMultipleSelectAddNext = 2688,\r\n\tMultipleSelectAddEach = 2689,\r\n\tChangeLexerState = 2617,\r\n\tContractedFoldNext = 2618,\r\n\tVerticalCentreCaret = 2619,\r\n\tMoveSelectedLinesUp = 2620,\r\n\tMoveSelectedLinesDown = 2621,\r\n\tSetIdentifier = 2622,\r\n\tGetIdentifier = 2623,\r\n\tRGBAImageSetWidth = 2624,\r\n\tRGBAImageSetHeight = 2625,\r\n\tRGBAImageSetScale = 2651,\r\n\tMarkerDefineRGBAImage = 2626,\r\n\tRegisterRGBAImage = 2627,\r\n\tScrollToStart = 2628,\r\n\tScrollToEnd = 2629,\r\n\tSetTechnology = 2630,\r\n\tGetTechnology = 2631,\r\n\tCreateLoader = 2632,\r\n\tFindIndicatorShow = 2640,\r\n\tFindIndicatorFlash = 2641,\r\n\tFindIndicatorHide = 2642,\r\n\tVCHomeDisplay = 2652,\r\n\tVCHomeDisplayExtend = 2653,\r\n\tGetCaretLineVisibleAlways = 2654,\r\n\tSetCaretLineVisibleAlways = 2655,\r\n\tSetLineEndTypesAllowed = 2656,\r\n\tGetLineEndTypesAllowed = 2657,\r\n\tGetLineEndTypesActive = 2658,\r\n\tSetRepresentation = 2665,\r\n\tGetRepresentation = 2666,\r\n\tClearRepresentation = 2667,\r\n\tClearAllRepresentations = 2770,\r\n\tSetRepresentationAppearance = 2766,\r\n\tGetRepresentationAppearance = 2767,\r\n\tSetRepresentationColour = 2768,\r\n\tGetRepresentationColour = 2769,\r\n\tEOLAnnotationSetText = 2740,\r\n\tEOLAnnotationGetText = 2741,\r\n\tEOLAnnotationSetStyle = 2742,\r\n\tEOLAnnotationGetStyle = 2743,\r\n\tEOLAnnotationClearAll = 2744,\r\n\tEOLAnnotationSetVisible = 2745,\r\n\tEOLAnnotationGetVisible = 2746,\r\n\tEOLAnnotationSetStyleOffset = 2747,\r\n\tEOLAnnotationGetStyleOffset = 2748,\r\n\tSupportsFeature = 2750,\r\n\tGetLineCharacterIndex = 2710,\r\n\tAllocateLineCharacterIndex = 2711,\r\n\tReleaseLineCharacterIndex = 2712,\r\n\tLineFromIndexPosition = 2713,\r\n\tIndexPositionFromLine = 2714,\r\n\tStartRecord = 3001,\r\n\tStopRecord = 3002,\r\n\tGetLexer = 4002,\r\n\tColourise = 4003,\r\n\tSetProperty = 4004,\r\n\tSetKeyWords = 4005,\r\n\tGetProperty = 4008,\r\n\tGetPropertyExpanded = 4009,\r\n\tGetPropertyInt = 4010,\r\n\tGetLexerLanguage = 4012,\r\n\tPrivateLexerCall = 4013,\r\n\tPropertyNames = 4014,\r\n\tPropertyType = 4015,\r\n\tDescribeProperty = 4016,\r\n\tDescribeKeyWordSets = 4017,\r\n\tGetLineEndTypesSupported = 4018,\r\n\tAllocateSubStyles = 4020,\r\n\tGetSubStylesStart = 4021,\r\n\tGetSubStylesLength = 4022,\r\n\tGetStyleFromSubStyle = 4027,\r\n\tGetPrimaryStyleFromStyle = 4028,\r\n\tFreeSubStyles = 4023,\r\n\tSetIdentifiers = 4024,\r\n\tDistanceToSecondaryStyles = 4025,\r\n\tGetSubStyleBases = 4026,\r\n\tGetNamedStyles = 4029,\r\n\tNameOfStyle = 4030,\r\n\tTagsOfStyle = 4031,\r\n\tDescriptionOfStyle = 4032,\r\n\tSetILexer = 4033,\r\n\tGetBidirectional = 2708,\r\n\tSetBidirectional = 2709,\r\n};\r\n//--Autogenerated -- end of section automatically generated from Scintilla.iface\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/include/ScintillaStructures.h",
    "content": "// Scintilla source code edit control\r\n/** @file ScintillaStructures.h\r\n ** Structures used to communicate with Scintilla.\r\n ** The same structures are defined for C in Scintilla.h.\r\n ** Uses definitions from ScintillaTypes.h.\r\n **/\r\n// Copyright 2021 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef SCINTILLASTRUCTURES_H\r\n#define SCINTILLASTRUCTURES_H\r\n\r\nnamespace Scintilla {\r\n\r\nusing PositionCR = long;\r\n\r\nstruct CharacterRange {\r\n\tPositionCR cpMin;\r\n\tPositionCR cpMax;\r\n};\r\n\r\nstruct CharacterRangeFull {\r\n\tPosition cpMin;\r\n\tPosition cpMax;\r\n};\r\n\r\nstruct TextRange {\r\n\tCharacterRange chrg;\r\n\tchar *lpstrText;\r\n};\r\n\r\nstruct TextRangeFull {\r\n\tCharacterRangeFull chrg;\r\n\tchar *lpstrText;\r\n};\r\n\r\nstruct TextToFind {\r\n\tCharacterRange chrg;\r\n\tconst char *lpstrText;\r\n\tCharacterRange chrgText;\r\n};\r\n\r\nstruct TextToFindFull {\r\n\tCharacterRangeFull chrg;\r\n\tconst char *lpstrText;\r\n\tCharacterRangeFull chrgText;\r\n};\r\n\r\nusing SurfaceID = void *;\r\n\r\nstruct Rectangle {\r\n\tint left;\r\n\tint top;\r\n\tint right;\r\n\tint bottom;\r\n};\r\n\r\n/* This structure is used in printing. Not needed by most client code. */\r\n\r\nstruct RangeToFormat {\r\n\tSurfaceID hdc;\r\n\tSurfaceID hdcTarget;\r\n\tRectangle rc;\r\n\tRectangle rcPage;\r\n\tCharacterRange chrg;\r\n};\r\n\r\nstruct RangeToFormatFull {\r\n\tSurfaceID hdc;\r\n\tSurfaceID hdcTarget;\r\n\tRectangle rc;\r\n\tRectangle rcPage;\r\n\tCharacterRangeFull chrg;\r\n};\r\n\r\nstruct NotifyHeader {\r\n\t/* Compatible with Windows NMHDR.\r\n\t * hwndFrom is really an environment specific window handle or pointer\r\n\t * but most clients of Scintilla.h do not have this type visible. */\r\n\tvoid *hwndFrom;\r\n\tuptr_t idFrom;\r\n\tNotification code;\r\n};\r\n\r\nenum class Message;\t// Declare in case ScintillaMessages.h not included\r\n\r\nstruct NotificationData {\r\n\tNotifyHeader nmhdr;\r\n\tPosition position;\r\n\t/* SCN_STYLENEEDED, SCN_DOUBLECLICK, SCN_MODIFIED, SCN_MARGINCLICK, */\r\n\t/* SCN_NEEDSHOWN, SCN_DWELLSTART, SCN_DWELLEND, SCN_CALLTIPCLICK, */\r\n\t/* SCN_HOTSPOTCLICK, SCN_HOTSPOTDOUBLECLICK, SCN_HOTSPOTRELEASECLICK, */\r\n\t/* SCN_INDICATORCLICK, SCN_INDICATORRELEASE, */\r\n\t/* SCN_USERLISTSELECTION, SCN_AUTOCSELECTION */\r\n\r\n\tint ch;\r\n\t/* SCN_CHARADDED, SCN_KEY, SCN_AUTOCCOMPLETED, SCN_AUTOCSELECTION, */\r\n\t/* SCN_USERLISTSELECTION */\r\n\tKeyMod modifiers;\r\n\t/* SCN_KEY, SCN_DOUBLECLICK, SCN_HOTSPOTCLICK, SCN_HOTSPOTDOUBLECLICK, */\r\n\t/* SCN_HOTSPOTRELEASECLICK, SCN_INDICATORCLICK, SCN_INDICATORRELEASE, */\r\n\r\n\tModificationFlags modificationType;\t/* SCN_MODIFIED */\r\n\tconst char *text;\r\n\t/* SCN_MODIFIED, SCN_USERLISTSELECTION, SCN_AUTOCSELECTION, SCN_URIDROPPED */\r\n\r\n\tPosition length;\t\t/* SCN_MODIFIED */\r\n\tPosition linesAdded;\t/* SCN_MODIFIED */\r\n\tMessage message;\t/* SCN_MACRORECORD */\r\n\tuptr_t wParam;\t/* SCN_MACRORECORD */\r\n\tsptr_t lParam;\t/* SCN_MACRORECORD */\r\n\tPosition line;\t\t/* SCN_MODIFIED */\r\n\tFoldLevel foldLevelNow;\t/* SCN_MODIFIED */\r\n\tFoldLevel foldLevelPrev;\t/* SCN_MODIFIED */\r\n\tint margin;\t\t/* SCN_MARGINCLICK */\r\n\tint listType;\t/* SCN_USERLISTSELECTION */\r\n\tint x;\t\t\t/* SCN_DWELLSTART, SCN_DWELLEND */\r\n\tint y;\t\t/* SCN_DWELLSTART, SCN_DWELLEND */\r\n\tint token;\t\t/* SCN_MODIFIED with SC_MOD_CONTAINER */\r\n\tPosition annotationLinesAdded;\t/* SCN_MODIFIED with SC_MOD_CHANGEANNOTATION */\r\n\tUpdate updated;\t/* SCN_UPDATEUI */\r\n\tCompletionMethods listCompletionMethod;\r\n\t/* SCN_AUTOCSELECTION, SCN_AUTOCCOMPLETED, SCN_USERLISTSELECTION, */\r\n\tCharacterSource characterSource;\t/* SCN_CHARADDED */\r\n};\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/include/ScintillaTypes.h",
    "content": "// Scintilla source code edit control\r\n/** @file ScintillaTypes.h\r\n ** Types used to communicate with Scintilla.\r\n **/\r\n// Copyright 1998-2019 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n/* Most of this file is automatically generated from the Scintilla.iface interface definition\r\n * file which contains any comments about the definitions. ScintillaAPIFacer.py does the generation. */\r\n\r\n#ifndef SCINTILLATYPES_H\r\n#define SCINTILLATYPES_H\r\n\r\nnamespace Scintilla {\r\n\r\n// Enumerations\r\n//++Autogenerated -- start of section automatically generated from Scintilla.iface\r\n\r\nenum class WhiteSpace {\r\n\tInvisible = 0,\r\n\tVisibleAlways = 1,\r\n\tVisibleAfterIndent = 2,\r\n\tVisibleOnlyInIndent = 3,\r\n};\r\n\r\nenum class TabDrawMode {\r\n\tLongArrow = 0,\r\n\tStrikeOut = 1,\r\n};\r\n\r\nenum class EndOfLine {\r\n\tCrLf = 0,\r\n\tCr = 1,\r\n\tLf = 2,\r\n};\r\n\r\nenum class IMEInteraction {\r\n\tWindowed = 0,\r\n\tInline = 1,\r\n};\r\n\r\nenum class Alpha {\r\n\tTransparent = 0,\r\n\tOpaque = 255,\r\n\tNoAlpha = 256,\r\n};\r\n\r\nenum class CursorShape {\r\n\tNormal = -1,\r\n\tArrow = 2,\r\n\tWait = 4,\r\n\tReverseArrow = 7,\r\n};\r\n\r\nenum class MarkerSymbol {\r\n\tCircle = 0,\r\n\tRoundRect = 1,\r\n\tArrow = 2,\r\n\tSmallRect = 3,\r\n\tShortArrow = 4,\r\n\tEmpty = 5,\r\n\tArrowDown = 6,\r\n\tMinus = 7,\r\n\tPlus = 8,\r\n\tVLine = 9,\r\n\tLCorner = 10,\r\n\tTCorner = 11,\r\n\tBoxPlus = 12,\r\n\tBoxPlusConnected = 13,\r\n\tBoxMinus = 14,\r\n\tBoxMinusConnected = 15,\r\n\tLCornerCurve = 16,\r\n\tTCornerCurve = 17,\r\n\tCirclePlus = 18,\r\n\tCirclePlusConnected = 19,\r\n\tCircleMinus = 20,\r\n\tCircleMinusConnected = 21,\r\n\tBackground = 22,\r\n\tDotDotDot = 23,\r\n\tArrows = 24,\r\n\tPixmap = 25,\r\n\tFullRect = 26,\r\n\tLeftRect = 27,\r\n\tAvailable = 28,\r\n\tUnderline = 29,\r\n\tRgbaImage = 30,\r\n\tBookmark = 31,\r\n\tVerticalBookmark = 32,\r\n\tBar = 33,\r\n\tCharacter = 10000,\r\n};\r\n\r\nenum class MarkerOutline {\r\n\tHistoryRevertedToOrigin = 21,\r\n\tHistorySaved = 22,\r\n\tHistoryModified = 23,\r\n\tHistoryRevertedToModified = 24,\r\n\tFolderEnd = 25,\r\n\tFolderOpenMid = 26,\r\n\tFolderMidTail = 27,\r\n\tFolderTail = 28,\r\n\tFolderSub = 29,\r\n\tFolder = 30,\r\n\tFolderOpen = 31,\r\n};\r\n\r\nenum class MarginType {\r\n\tSymbol = 0,\r\n\tNumber = 1,\r\n\tBack = 2,\r\n\tFore = 3,\r\n\tText = 4,\r\n\tRText = 5,\r\n\tColour = 6,\r\n};\r\n\r\nenum class StylesCommon {\r\n\tDefault = 32,\r\n\tLineNumber = 33,\r\n\tBraceLight = 34,\r\n\tBraceBad = 35,\r\n\tControlChar = 36,\r\n\tIndentGuide = 37,\r\n\tCallTip = 38,\r\n\tFoldDisplayText = 39,\r\n\tLastPredefined = 39,\r\n\tMax = 255,\r\n};\r\n\r\nenum class CharacterSet {\r\n\tAnsi = 0,\r\n\tDefault = 1,\r\n\tBaltic = 186,\r\n\tChineseBig5 = 136,\r\n\tEastEurope = 238,\r\n\tGB2312 = 134,\r\n\tGreek = 161,\r\n\tHangul = 129,\r\n\tMac = 77,\r\n\tOem = 255,\r\n\tRussian = 204,\r\n\tOem866 = 866,\r\n\tCyrillic = 1251,\r\n\tShiftJis = 128,\r\n\tSymbol = 2,\r\n\tTurkish = 162,\r\n\tJohab = 130,\r\n\tHebrew = 177,\r\n\tArabic = 178,\r\n\tVietnamese = 163,\r\n\tThai = 222,\r\n\tIso8859_15 = 1000,\r\n};\r\n\r\nenum class CaseVisible {\r\n\tMixed = 0,\r\n\tUpper = 1,\r\n\tLower = 2,\r\n\tCamel = 3,\r\n};\r\n\r\nenum class FontWeight {\r\n\tNormal = 400,\r\n\tSemiBold = 600,\r\n\tBold = 700,\r\n};\r\n\r\nenum class Element {\r\n\tList = 0,\r\n\tListBack = 1,\r\n\tListSelected = 2,\r\n\tListSelectedBack = 3,\r\n\tSelectionText = 10,\r\n\tSelectionBack = 11,\r\n\tSelectionAdditionalText = 12,\r\n\tSelectionAdditionalBack = 13,\r\n\tSelectionSecondaryText = 14,\r\n\tSelectionSecondaryBack = 15,\r\n\tSelectionInactiveText = 16,\r\n\tSelectionInactiveBack = 17,\r\n\tSelectionInactiveAdditionalText = 18,\r\n\tSelectionInactiveAdditionalBack = 19,\r\n\tCaret = 40,\r\n\tCaretAdditional = 41,\r\n\tCaretLineBack = 50,\r\n\tWhiteSpace = 60,\r\n\tWhiteSpaceBack = 61,\r\n\tHotSpotActive = 70,\r\n\tHotSpotActiveBack = 71,\r\n\tFoldLine = 80,\r\n\tHiddenLine = 81,\r\n};\r\n\r\nenum class Layer {\r\n\tBase = 0,\r\n\tUnderText = 1,\r\n\tOverText = 2,\r\n};\r\n\r\nenum class IndicatorStyle {\r\n\tPlain = 0,\r\n\tSquiggle = 1,\r\n\tTT = 2,\r\n\tDiagonal = 3,\r\n\tStrike = 4,\r\n\tHidden = 5,\r\n\tBox = 6,\r\n\tRoundBox = 7,\r\n\tStraightBox = 8,\r\n\tDash = 9,\r\n\tDots = 10,\r\n\tSquiggleLow = 11,\r\n\tDotBox = 12,\r\n\tSquigglePixmap = 13,\r\n\tCompositionThick = 14,\r\n\tCompositionThin = 15,\r\n\tFullBox = 16,\r\n\tTextFore = 17,\r\n\tPoint = 18,\r\n\tPointCharacter = 19,\r\n\tGradient = 20,\r\n\tGradientCentre = 21,\r\n\tPointTop = 22,\r\n};\r\n\r\nenum class IndicatorNumbers {\r\n\tContainer = 8,\r\n\tIme = 32,\r\n\tImeMax = 35,\r\n\tHistoryRevertedToOriginInsertion = 36,\r\n\tHistoryRevertedToOriginDeletion = 37,\r\n\tHistorySavedInsertion = 38,\r\n\tHistorySavedDeletion = 39,\r\n\tHistoryModifiedInsertion = 40,\r\n\tHistoryModifiedDeletion = 41,\r\n\tHistoryRevertedToModifiedInsertion = 42,\r\n\tHistoryRevertedToModifiedDeletion = 43,\r\n\tMax = 43,\r\n};\r\n\r\nenum class IndicValue {\r\n\tBit = 0x1000000,\r\n\tMask = 0xFFFFFF,\r\n};\r\n\r\nenum class IndicFlag {\r\n\tNone = 0,\r\n\tValueFore = 1,\r\n};\r\n\r\nenum class AutoCompleteOption {\r\n\tNormal = 0,\r\n\tFixedSize = 1,\r\n\tSelectFirstItem = 2,\r\n};\r\n\r\nenum class IndentView {\r\n\tNone = 0,\r\n\tReal = 1,\r\n\tLookForward = 2,\r\n\tLookBoth = 3,\r\n};\r\n\r\nenum class PrintOption {\r\n\tNormal = 0,\r\n\tInvertLight = 1,\r\n\tBlackOnWhite = 2,\r\n\tColourOnWhite = 3,\r\n\tColourOnWhiteDefaultBG = 4,\r\n\tScreenColours = 5,\r\n};\r\n\r\nenum class FindOption {\r\n\tNone = 0x0,\r\n\tWholeWord = 0x2,\r\n\tMatchCase = 0x4,\r\n\tWordStart = 0x00100000,\r\n\tRegExp = 0x00200000,\r\n\tPosix = 0x00400000,\r\n\tCxx11RegEx = 0x00800000,\r\n};\r\n\r\nenum class ChangeHistoryOption {\r\n\tDisabled = 0,\r\n\tEnabled = 1,\r\n\tMarkers = 2,\r\n\tIndicators = 4,\r\n};\r\n\r\nenum class FoldLevel {\r\n\tNone = 0x0,\r\n\tBase = 0x400,\r\n\tWhiteFlag = 0x1000,\r\n\tHeaderFlag = 0x2000,\r\n\tNumberMask = 0x0FFF,\r\n};\r\n\r\nenum class FoldDisplayTextStyle {\r\n\tHidden = 0,\r\n\tStandard = 1,\r\n\tBoxed = 2,\r\n};\r\n\r\nenum class FoldAction {\r\n\tContract = 0,\r\n\tExpand = 1,\r\n\tToggle = 2,\r\n\tContractEveryLevel = 4,\r\n};\r\n\r\nenum class AutomaticFold {\r\n\tNone = 0x0000,\r\n\tShow = 0x0001,\r\n\tClick = 0x0002,\r\n\tChange = 0x0004,\r\n};\r\n\r\nenum class FoldFlag {\r\n\tNone = 0x0000,\r\n\tLineBeforeExpanded = 0x0002,\r\n\tLineBeforeContracted = 0x0004,\r\n\tLineAfterExpanded = 0x0008,\r\n\tLineAfterContracted = 0x0010,\r\n\tLevelNumbers = 0x0040,\r\n\tLineState = 0x0080,\r\n};\r\n\r\nenum class IdleStyling {\r\n\tNone = 0,\r\n\tToVisible = 1,\r\n\tAfterVisible = 2,\r\n\tAll = 3,\r\n};\r\n\r\nenum class Wrap {\r\n\tNone = 0,\r\n\tWord = 1,\r\n\tChar = 2,\r\n\tWhiteSpace = 3,\r\n};\r\n\r\nenum class WrapVisualFlag {\r\n\tNone = 0x0000,\r\n\tEnd = 0x0001,\r\n\tStart = 0x0002,\r\n\tMargin = 0x0004,\r\n};\r\n\r\nenum class WrapVisualLocation {\r\n\tDefault = 0x0000,\r\n\tEndByText = 0x0001,\r\n\tStartByText = 0x0002,\r\n};\r\n\r\nenum class WrapIndentMode {\r\n\tFixed = 0,\r\n\tSame = 1,\r\n\tIndent = 2,\r\n\tDeepIndent = 3,\r\n};\r\n\r\nenum class LineCache {\r\n\tNone = 0,\r\n\tCaret = 1,\r\n\tPage = 2,\r\n\tDocument = 3,\r\n};\r\n\r\nenum class PhasesDraw {\r\n\tOne = 0,\r\n\tTwo = 1,\r\n\tMultiple = 2,\r\n};\r\n\r\nenum class FontQuality {\r\n\tQualityMask = 0xF,\r\n\tQualityDefault = 0,\r\n\tQualityNonAntialiased = 1,\r\n\tQualityAntialiased = 2,\r\n\tQualityLcdOptimized = 3,\r\n};\r\n\r\nenum class MultiPaste {\r\n\tOnce = 0,\r\n\tEach = 1,\r\n};\r\n\r\nenum class Accessibility {\r\n\tDisabled = 0,\r\n\tEnabled = 1,\r\n};\r\n\r\nenum class EdgeVisualStyle {\r\n\tNone = 0,\r\n\tLine = 1,\r\n\tBackground = 2,\r\n\tMultiLine = 3,\r\n};\r\n\r\nenum class PopUp {\r\n\tNever = 0,\r\n\tAll = 1,\r\n\tText = 2,\r\n};\r\n\r\nenum class DocumentOption {\r\n\tDefault = 0,\r\n\tStylesNone = 0x1,\r\n\tTextLarge = 0x100,\r\n};\r\n\r\nenum class Status {\r\n\tOk = 0,\r\n\tFailure = 1,\r\n\tBadAlloc = 2,\r\n\tWarnStart = 1000,\r\n\tRegEx = 1001,\r\n};\r\n\r\nenum class VisiblePolicy {\r\n\tSlop = 0x01,\r\n\tStrict = 0x04,\r\n};\r\n\r\nenum class CaretPolicy {\r\n\tSlop = 0x01,\r\n\tStrict = 0x04,\r\n\tJumps = 0x10,\r\n\tEven = 0x08,\r\n};\r\n\r\nenum class SelectionMode {\r\n\tStream = 0,\r\n\tRectangle = 1,\r\n\tLines = 2,\r\n\tThin = 3,\r\n};\r\n\r\nenum class CaseInsensitiveBehaviour {\r\n\tRespectCase = 0,\r\n\tIgnoreCase = 1,\r\n};\r\n\r\nenum class MultiAutoComplete {\r\n\tOnce = 0,\r\n\tEach = 1,\r\n};\r\n\r\nenum class Ordering {\r\n\tPreSorted = 0,\r\n\tPerformSort = 1,\r\n\tCustom = 2,\r\n};\r\n\r\nenum class CaretSticky {\r\n\tOff = 0,\r\n\tOn = 1,\r\n\tWhiteSpace = 2,\r\n};\r\n\r\nenum class CaretStyle {\r\n\tInvisible = 0,\r\n\tLine = 1,\r\n\tBlock = 2,\r\n\tOverstrikeBar = 0,\r\n\tOverstrikeBlock = 0x10,\r\n\tCurses = 0x20,\r\n\tInsMask = 0xF,\r\n\tBlockAfter = 0x100,\r\n};\r\n\r\nenum class MarginOption {\r\n\tNone = 0,\r\n\tSubLineSelect = 1,\r\n};\r\n\r\nenum class AnnotationVisible {\r\n\tHidden = 0,\r\n\tStandard = 1,\r\n\tBoxed = 2,\r\n\tIndented = 3,\r\n};\r\n\r\nenum class UndoFlags {\r\n\tNone = 0,\r\n\tMayCoalesce = 1,\r\n};\r\n\r\nenum class VirtualSpace {\r\n\tNone = 0,\r\n\tRectangularSelection = 1,\r\n\tUserAccessible = 2,\r\n\tNoWrapLineStart = 4,\r\n};\r\n\r\nenum class Technology {\r\n\tDefault = 0,\r\n\tDirectWrite = 1,\r\n\tDirectWriteRetain = 2,\r\n\tDirectWriteDC = 3,\r\n};\r\n\r\nenum class LineEndType {\r\n\tDefault = 0,\r\n\tUnicode = 1,\r\n};\r\n\r\nenum class RepresentationAppearance {\r\n\tPlain = 0,\r\n\tBlob = 1,\r\n\tColour = 0x10,\r\n};\r\n\r\nenum class EOLAnnotationVisible {\r\n\tHidden = 0x0,\r\n\tStandard = 0x1,\r\n\tBoxed = 0x2,\r\n\tStadium = 0x100,\r\n\tFlatCircle = 0x101,\r\n\tAngleCircle = 0x102,\r\n\tCircleFlat = 0x110,\r\n\tFlats = 0x111,\r\n\tAngleFlat = 0x112,\r\n\tCircleAngle = 0x120,\r\n\tFlatAngle = 0x121,\r\n\tAngles = 0x122,\r\n};\r\n\r\nenum class Supports {\r\n\tLineDrawsFinal = 0,\r\n\tPixelDivisions = 1,\r\n\tFractionalStrokeWidth = 2,\r\n\tTranslucentStroke = 3,\r\n\tPixelModification = 4,\r\n\tThreadSafeMeasureWidths = 5,\r\n};\r\n\r\nenum class LineCharacterIndexType {\r\n\tNone = 0,\r\n\tUtf32 = 1,\r\n\tUtf16 = 2,\r\n};\r\n\r\nenum class TypeProperty {\r\n\tBoolean = 0,\r\n\tInteger = 1,\r\n\tString = 2,\r\n};\r\n\r\nenum class ModificationFlags {\r\n\tNone = 0x0,\r\n\tInsertText = 0x1,\r\n\tDeleteText = 0x2,\r\n\tChangeStyle = 0x4,\r\n\tChangeFold = 0x8,\r\n\tUser = 0x10,\r\n\tUndo = 0x20,\r\n\tRedo = 0x40,\r\n\tMultiStepUndoRedo = 0x80,\r\n\tLastStepInUndoRedo = 0x100,\r\n\tChangeMarker = 0x200,\r\n\tBeforeInsert = 0x400,\r\n\tBeforeDelete = 0x800,\r\n\tMultilineUndoRedo = 0x1000,\r\n\tStartAction = 0x2000,\r\n\tChangeIndicator = 0x4000,\r\n\tChangeLineState = 0x8000,\r\n\tChangeMargin = 0x10000,\r\n\tChangeAnnotation = 0x20000,\r\n\tContainer = 0x40000,\r\n\tLexerState = 0x80000,\r\n\tInsertCheck = 0x100000,\r\n\tChangeTabStops = 0x200000,\r\n\tChangeEOLAnnotation = 0x400000,\r\n\tEventMaskAll = 0x7FFFFF,\r\n};\r\n\r\nenum class Update {\r\n\tNone = 0x0,\r\n\tContent = 0x1,\r\n\tSelection = 0x2,\r\n\tVScroll = 0x4,\r\n\tHScroll = 0x8,\r\n};\r\n\r\nenum class FocusChange {\r\n\tChange = 768,\r\n\tSetfocus = 512,\r\n\tKillfocus = 256,\r\n};\r\n\r\nenum class Keys {\r\n\tDown = 300,\r\n\tUp = 301,\r\n\tLeft = 302,\r\n\tRight = 303,\r\n\tHome = 304,\r\n\tEnd = 305,\r\n\tPrior = 306,\r\n\tNext = 307,\r\n\tDelete = 308,\r\n\tInsert = 309,\r\n\tEscape = 7,\r\n\tBack = 8,\r\n\tTab = 9,\r\n\tReturn = 13,\r\n\tAdd = 310,\r\n\tSubtract = 311,\r\n\tDivide = 312,\r\n\tWin = 313,\r\n\tRWin = 314,\r\n\tMenu = 315,\r\n};\r\n\r\nenum class KeyMod {\r\n\tNorm = 0,\r\n\tShift = 1,\r\n\tCtrl = 2,\r\n\tAlt = 4,\r\n\tSuper = 8,\r\n\tMeta = 16,\r\n};\r\n\r\nenum class CompletionMethods {\r\n\tFillUp = 1,\r\n\tDoubleClick = 2,\r\n\tTab = 3,\r\n\tNewline = 4,\r\n\tCommand = 5,\r\n\tSingleChoice = 6,\r\n};\r\n\r\nenum class CharacterSource {\r\n\tDirectInput = 0,\r\n\tTentativeInput = 1,\r\n\tImeResult = 2,\r\n};\r\n\r\nenum class Bidirectional {\r\n\tDisabled = 0,\r\n\tL2R = 1,\r\n\tR2L = 2,\r\n};\r\n\r\nenum class Notification {\r\n\tStyleNeeded = 2000,\r\n\tCharAdded = 2001,\r\n\tSavePointReached = 2002,\r\n\tSavePointLeft = 2003,\r\n\tModifyAttemptRO = 2004,\r\n\tKey = 2005,\r\n\tDoubleClick = 2006,\r\n\tUpdateUI = 2007,\r\n\tModified = 2008,\r\n\tMacroRecord = 2009,\r\n\tMarginClick = 2010,\r\n\tNeedShown = 2011,\r\n\tPainted = 2013,\r\n\tUserListSelection = 2014,\r\n\tURIDropped = 2015,\r\n\tDwellStart = 2016,\r\n\tDwellEnd = 2017,\r\n\tZoom = 2018,\r\n\tHotSpotClick = 2019,\r\n\tHotSpotDoubleClick = 2020,\r\n\tCallTipClick = 2021,\r\n\tAutoCSelection = 2022,\r\n\tIndicatorClick = 2023,\r\n\tIndicatorRelease = 2024,\r\n\tAutoCCancelled = 2025,\r\n\tAutoCCharDeleted = 2026,\r\n\tHotSpotReleaseClick = 2027,\r\n\tFocusIn = 2028,\r\n\tFocusOut = 2029,\r\n\tAutoCCompleted = 2030,\r\n\tMarginRightClick = 2031,\r\n\tAutoCSelectionChange = 2032,\r\n};\r\n//--Autogenerated -- end of section automatically generated from Scintilla.iface\r\n\r\nusing Position = intptr_t;\r\nusing Line = intptr_t;\r\nusing Colour = int;\r\nusing ColourAlpha = int;\r\nusing uptr_t = uintptr_t;\r\nusing sptr_t = intptr_t;\r\n\r\n//++Autogenerated -- start of section automatically generated from Scintilla.iface\r\n//**1 \\(\\*\\n\\)\r\nconstexpr Position InvalidPosition = -1;\r\nconstexpr int CpUtf8 = 65001;\r\nconstexpr int MarkerMax = 31;\r\nconstexpr int MaskFolders = 0xFE000000;\r\nconstexpr int MaxMargin = 4;\r\nconstexpr int FontSizeMultiplier = 100;\r\nconstexpr int TimeForever = 10000000;\r\nconstexpr int KeywordsetMax = 8;\r\n\r\n//--Autogenerated -- end of section automatically generated from Scintilla.iface\r\n\r\nconstexpr int IndicatorMax = static_cast<int>(IndicatorNumbers::Max);\r\n\r\n// Functions to manipulate fields from a MarkerOutline\r\n\r\ninline int operator<<(int i, MarkerOutline marker) noexcept {\r\n\treturn i << static_cast<int>(marker);\r\n}\r\n\r\n// Functions to manipulate fields from a FindOption\r\n\r\nconstexpr FindOption operator|(FindOption a, FindOption b) noexcept {\r\n\treturn static_cast<FindOption>(static_cast<int>(a) | static_cast<int>(b));\r\n}\r\n\r\ninline FindOption &operator|=(FindOption &self, FindOption a) noexcept {\r\n\tself = self | a;\r\n\treturn self;\r\n}\r\n\r\n// Functions to retrieve and manipulate fields from a FoldLevel\r\n\r\nconstexpr FoldLevel operator&(FoldLevel lhs, FoldLevel rhs) noexcept {\r\n\treturn static_cast<FoldLevel>(static_cast<int>(lhs) & static_cast<int>(rhs));\r\n}\r\n\r\nconstexpr FoldLevel LevelNumberPart(FoldLevel level) noexcept {\r\n\treturn level & FoldLevel::NumberMask;\r\n}\r\n\r\nconstexpr int LevelNumber(FoldLevel level) noexcept {\r\n\treturn static_cast<int>(LevelNumberPart(level));\r\n}\r\n\r\nconstexpr bool LevelIsHeader(FoldLevel level) noexcept {\r\n\treturn (level & FoldLevel::HeaderFlag) == FoldLevel::HeaderFlag;\r\n}\r\n\r\nconstexpr bool LevelIsWhitespace(FoldLevel level) noexcept {\r\n\treturn (level & FoldLevel::WhiteFlag) == FoldLevel::WhiteFlag;\r\n}\r\n\r\n// Functions to manipulate fields from a FoldFlag\r\n\r\nconstexpr FoldFlag operator|(FoldFlag a, FoldFlag b) noexcept {\r\n\treturn static_cast<FoldFlag>(static_cast<int>(a) | static_cast<int>(b));\r\n}\r\n\r\n// Functions to manipulate fields from a FontQuality\r\n\r\nconstexpr FontQuality operator&(FontQuality a, FontQuality b) noexcept {\r\n\treturn static_cast<FontQuality>(static_cast<int>(a) & static_cast<int>(b));\r\n}\r\n\r\n// Functions to manipulate fields from a DocumentOption\r\n\r\nconstexpr DocumentOption operator|(DocumentOption a, DocumentOption b) noexcept {\r\n\treturn static_cast<DocumentOption>(static_cast<int>(a) | static_cast<int>(b));\r\n}\r\n\r\n// Functions to manipulate fields from a CaretPolicy\r\n\r\nconstexpr CaretPolicy operator|(CaretPolicy a, CaretPolicy b) noexcept {\r\n\treturn static_cast<CaretPolicy>(static_cast<int>(a) | static_cast<int>(b));\r\n}\r\n\r\n// Functions to manipulate fields from a CaretStyle\r\n\r\nconstexpr CaretStyle operator|(CaretStyle a, CaretStyle b) noexcept {\r\n\treturn static_cast<CaretStyle>(static_cast<int>(a) | static_cast<int>(b));\r\n}\r\n\r\nconstexpr CaretStyle operator&(CaretStyle a, CaretStyle b) noexcept {\r\n\treturn static_cast<CaretStyle>(static_cast<int>(a) & static_cast<int>(b));\r\n}\r\n\r\n// Functions to manipulate fields from a LineEndType\r\n\r\nconstexpr LineEndType operator&(LineEndType a, LineEndType b) noexcept {\r\n\treturn static_cast<LineEndType>(static_cast<int>(a) & static_cast<int>(b));\r\n}\r\n\r\n// Functions to manipulate fields from a RepresentationAppearance\r\n\r\nconstexpr RepresentationAppearance operator|(RepresentationAppearance a, RepresentationAppearance b) noexcept {\r\n\treturn static_cast<RepresentationAppearance>(static_cast<int>(a) | static_cast<int>(b));\r\n}\r\n\r\n// Functions to manipulate fields from a LineCharacterIndexType\r\n\r\nconstexpr LineCharacterIndexType operator|(LineCharacterIndexType a, LineCharacterIndexType b) noexcept {\r\n\treturn static_cast<LineCharacterIndexType>(static_cast<int>(a) | static_cast<int>(b));\r\n}\r\n\r\n// Functions to manipulate fields from a ModificationFlags\r\n\r\nconstexpr ModificationFlags operator|(ModificationFlags a, ModificationFlags b) noexcept {\r\n\treturn static_cast<ModificationFlags>(static_cast<int>(a) | static_cast<int>(b));\r\n}\r\n\r\nconstexpr ModificationFlags operator&(ModificationFlags a, ModificationFlags b) noexcept {\r\n\treturn static_cast<ModificationFlags>(static_cast<int>(a) & static_cast<int>(b));\r\n}\r\n\r\ninline ModificationFlags &operator|=(ModificationFlags &self, ModificationFlags a) noexcept {\r\n\tself = self | a;\r\n\treturn self;\r\n}\r\n\r\n// Functions to manipulate fields from a Update\r\n\r\nconstexpr Update operator|(Update a, Update b) noexcept {\r\n\treturn static_cast<Update>(static_cast<int>(a) | static_cast<int>(b));\r\n}\r\n\r\n// Functions to manipulate fields from a KeyMod\r\n\r\nconstexpr KeyMod operator|(KeyMod a, KeyMod b) noexcept {\r\n\treturn static_cast<KeyMod>(static_cast<int>(a) | static_cast<int>(b));\r\n}\r\n\r\nconstexpr KeyMod operator&(KeyMod a, KeyMod b) noexcept {\r\n\treturn static_cast<KeyMod>(static_cast<int>(a) & static_cast<int>(b));\r\n}\r\n\r\nconstexpr KeyMod ModifierFlags(bool shift, bool ctrl, bool alt, bool meta=false, bool super=false) noexcept {\r\n\treturn\r\n\t\t(shift ? KeyMod::Shift : KeyMod::Norm) |\r\n\t\t(ctrl ? KeyMod::Ctrl : KeyMod::Norm) |\r\n\t\t(alt ? KeyMod::Alt : KeyMod::Norm) |\r\n\t\t(meta ? KeyMod::Meta : KeyMod::Norm) |\r\n\t\t(super ? KeyMod::Super : KeyMod::Norm);\r\n}\r\n\r\n// Test if an enum class value has some bit flag(s) of test set.\r\ntemplate <typename T>\r\nconstexpr bool FlagSet(T value, T test) {\r\n\treturn (static_cast<int>(value) & static_cast<int>(test)) != 0;\r\n}\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/include/ScintillaWidget.h",
    "content": "/* Scintilla source code edit control */\r\n/* @file ScintillaWidget.h\r\n * Definition of Scintilla widget for GTK+.\r\n * Only needed by GTK+ code but is harmless on other platforms.\r\n * This comment is not a doc-comment as that causes warnings from g-ir-scanner.\r\n */\r\n/* Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>\r\n * The License.txt file describes the conditions under which this software may be distributed. */\r\n\r\n#ifndef SCINTILLAWIDGET_H\r\n#define SCINTILLAWIDGET_H\r\n\r\n#if defined(GTK)\r\n\r\n#ifdef __cplusplus\r\nextern \"C\" {\r\n#endif\r\n\r\n#define SCINTILLA(obj)          G_TYPE_CHECK_INSTANCE_CAST (obj, scintilla_get_type (), ScintillaObject)\r\n#define SCINTILLA_CLASS(klass)  G_TYPE_CHECK_CLASS_CAST (klass, scintilla_get_type (), ScintillaClass)\r\n#define IS_SCINTILLA(obj)       G_TYPE_CHECK_INSTANCE_TYPE (obj, scintilla_get_type ())\r\n\r\n#define SCINTILLA_TYPE_OBJECT             (scintilla_object_get_type())\r\n#define SCINTILLA_OBJECT(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj), SCINTILLA_TYPE_OBJECT, ScintillaObject))\r\n#define SCINTILLA_IS_OBJECT(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SCINTILLA_TYPE_OBJECT))\r\n#define SCINTILLA_OBJECT_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST((klass), SCINTILLA_TYPE_OBJECT, ScintillaObjectClass))\r\n#define SCINTILLA_IS_OBJECT_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE((klass), SCINTILLA_TYPE_OBJECT))\r\n#define SCINTILLA_OBJECT_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS((obj), SCINTILLA_TYPE_OBJECT, ScintillaObjectClass))\r\n\r\ntypedef struct _ScintillaObject ScintillaObject;\r\ntypedef struct _ScintillaClass  ScintillaObjectClass;\r\n\r\nstruct _ScintillaObject {\r\n\tGtkContainer cont;\r\n\tvoid *pscin;\r\n};\r\n\r\nstruct _ScintillaClass {\r\n\tGtkContainerClass parent_class;\r\n\r\n\tvoid (* command) (ScintillaObject *sci, int cmd, GtkWidget *window);\r\n\tvoid (* notify) (ScintillaObject *sci, int id, SCNotification *scn);\r\n};\r\n\r\nGType\t\tscintilla_object_get_type\t\t(void);\r\nGtkWidget*\tscintilla_object_new\t\t\t(void);\r\ngintptr\t\tscintilla_object_send_message\t(ScintillaObject *sci, unsigned int iMessage, guintptr wParam, gintptr lParam);\r\n\r\n\r\nGType\t\tscnotification_get_type\t\t\t(void);\r\n#define SCINTILLA_TYPE_NOTIFICATION        (scnotification_get_type())\r\n\r\n#ifndef G_IR_SCANNING\r\n/* The legacy names confuse the g-ir-scanner program */\r\ntypedef struct _ScintillaClass  ScintillaClass;\r\n\r\nGType\t\tscintilla_get_type\t(void);\r\nGtkWidget*\tscintilla_new\t\t(void);\r\nvoid\t\tscintilla_set_id\t(ScintillaObject *sci, uptr_t id);\r\nsptr_t\t\tscintilla_send_message\t(ScintillaObject *sci,unsigned int iMessage, uptr_t wParam, sptr_t lParam);\r\nvoid\t\tscintilla_release_resources(void);\r\n#endif\r\n\r\n#define SCINTILLA_NOTIFY \"sci-notify\"\r\n\r\n#ifdef __cplusplus\r\n}\r\n#endif\r\n\r\n#endif\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/qt/README",
    "content": "README for building of Scintilla on Qt\r\n\r\nThere are two different Scintilla libraries that can be produced:\r\n\r\n\tScintillaEditBase\r\nA basic widget callable from C++ which is small and can be used just as is\r\nor with higher level functionality added.\r\n\r\n\tScintillaEdit\r\nA more complete C++ widget with a method for every Scintilla API and a\r\nsecondary API allowing direct access to document objects.\r\n\r\n\tBuilding a library\r\n\r\nScintillaEditBase can be built without performing any generation steps.\r\nThe ScintillaEditBase/ScintillaEditBase.pro project can be loaded into\r\nQt Creator and the \"Build All\" command performed.\r\nAlternatively, run \"qmake\" to build make files and then use the platform\r\nmake to build. Most commonly, use \"make\" on Unix and \"nmake\"\r\non Windows.\r\n\r\nOn Linux, qmake may be called qmake-qt5 or qmake-qt4.\r\n\r\nScintillaEdit requires a generation command be run first. From the\r\nScintillaEdit directory:\r\n\r\npython WidgetGen.py\r\n\r\nAfter the generation command has run, the ScintillaEdit.h and\r\nScintillaEdit.cpp files will have been populated with the Scintilla API\r\nmethods.\r\nTo build, use Qt Creator or qmake and make as for ScintillaEditBase.\r\n"
  },
  {
    "path": "scintilla/qt/ScintillaEdit/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.16.0)\nproject(ScintillaEdit)\n\n\n  SET(SCINTILLA_SRCS\n    ScintillaEdit.cpp\n    ScintillaDocument.cpp\n    ../ScintillaEditBase/PlatQt.cpp\n    ../ScintillaEditBase/ScintillaQt.cpp\n    ../ScintillaEditBase/ScintillaEditBase.cpp\n      )\n\n  \n  SET( SCINTILLA_MOC_HDRS\n    ScintillaEdit.h\n    ScintillaDocument.h\n    ../ScintillaEditBase/ScintillaEditBase.h\n    ../ScintillaEditBase/ScintillaQt.h\n  )\n\n  FILE(GLOB SCINT_SRCS  \"../../src/*.cxx\")\n\n\n  INCLUDE_DIRECTORIES( \"../ScintillaEditBase\" )\n  INCLUDE_DIRECTORIES( \"../../include\" )\n  INCLUDE_DIRECTORIES( \"../../src\" )\n  INCLUDE_DIRECTORIES( \"${CMAKE_CURRENT_BINARY_DIR}\" )\n  INCLUDE_DIRECTORIES( \".\" )\n  INCLUDE_DIRECTORIES( \"/usr/local/include\" )\n\n  add_definitions( -DSCINTILLA_QT=1 -DSCI_LEXER=1 -D_CRT_SECURE_NO_DEPRECATE=1 -DSTATIC_BUILD=1 )\n\n  find_package( Threads REQUIRED )\n\nif (BUILD_QT5)\n\n  FIND_PACKAGE( Qt5Widgets REQUIRED )\n  FIND_PACKAGE( Qt5Core REQUIRED )\n  FIND_PACKAGE( Qt5Concurrent REQUIRED )\n\t\n  set_target_properties(Qt5::Core PROPERTIES MAP_IMPORTED_CONFIG_COVERAGE \"RELEASE\")\n# add_compile_definitions(QT_DISABLE_DEPRECATED_UP_TO=0x050F00)\n  \n  SET(CMAKE_AUTOMOC ON)\n  SET(CMAKE_INCLUDE_CURRENT_DIR ON)\n\n  INCLUDE_DIRECTORIES( \"${Qt5Widgets_INCLUDE_DIRS}\" )\n\n  add_library( scintillaedit STATIC ${SCINTILLA_SRCS} ${SCINTILLA_MOC_SRCS} ${SCINT_SRCS} )\n  target_link_libraries( scintillaedit Qt5::Widgets Qt5::Concurrent Threads::Threads )\n\nelse (BUILD_QT5)\n\n  find_package(Qt6 REQUIRED COMPONENTS Core Widgets Concurrent Core5Compat )\n\n  set(CMAKE_AUTOMOC ON)\n  set(CMAKE_AUTORCC ON)\n  set(CMAKE_AUTOUIC ON)\n\n  set_target_properties(Qt6::Core PROPERTIES MAP_IMPORTED_CONFIG_COVERAGE \"RELEASE\")\n\n  qt6_add_library( scintillaedit STATIC ${SCINTILLA_SRCS} ${SCINTILLA_MOC_SRCS} ${SCINT_SRCS} )\n  target_link_libraries( scintillaedit PRIVATE Qt6::Widgets Qt6::Concurrent Qt6::Core5Compat Threads::Threads )\n\nendif (BUILD_QT5)\n\n"
  },
  {
    "path": "scintilla/qt/ScintillaEdit/ScintillaDocument.cpp",
    "content": "// @file ScintillaDocument.cpp\r\n// Wrapper for Scintilla document object so it can be manipulated independently.\r\n// Copyright (c) 2011 Archaeopteryx Software, Inc. d/b/a Wingware\r\n\r\n#include <cstdint>\r\n#include <stdexcept>\r\n#include <string_view>\r\n#include <vector>\r\n#include <map>\r\n#include <set>\r\n#include <optional>\r\n#include <memory>\r\n\r\n#include \"ScintillaTypes.h\"\r\n#include \"ScintillaMessages.h\"\r\n#include \"ScintillaStructures.h\"\r\n#include \"ScintillaDocument.h\"\r\n\r\n#include \"Debugging.h\"\r\n#include \"Geometry.h\"\r\n#include \"Platform.h\"\r\n\r\n#include \"ILoader.h\"\r\n#include \"ILexer.h\"\r\n#include \"Scintilla.h\"\r\n\r\n#include \"CharacterCategoryMap.h\"\r\n#include \"Position.h\"\r\n#include \"UniqueString.h\"\r\n#include \"SplitVector.h\"\r\n#include \"Partitioning.h\"\r\n#include \"RunStyles.h\"\r\n#include \"ContractionState.h\"\r\n#include \"CellBuffer.h\"\r\n#include \"KeyMap.h\"\r\n#include \"Indicator.h\"\r\n#include \"LineMarker.h\"\r\n#include \"Style.h\"\r\n#include \"ViewStyle.h\"\r\n#include \"CharClassify.h\"\r\n#include \"Decoration.h\"\r\n#include \"CaseFolder.h\"\r\n#include \"Document.h\"\r\n\r\nusing namespace Scintilla;\r\nusing namespace Scintilla::Internal;\r\n\r\nclass WatcherHelper : public DocWatcher {\r\n    ScintillaDocument *owner;\r\npublic:\r\n    explicit WatcherHelper(ScintillaDocument *owner_);\r\n\r\n    void NotifyModifyAttempt(Document *doc, void *userData) override;\r\n    void NotifySavePoint(Document *doc, void *userData, bool atSavePoint) override;\r\n    void NotifyModified(Document *doc, DocModification mh, void *userData) override;\r\n    void NotifyDeleted(Document *doc, void *userData) noexcept override;\r\n    void NotifyStyleNeeded(Document *doc, void *userData, Sci::Position endPos) override;\r\n    void NotifyErrorOccurred(Document *doc, void *userData, Status status) override;\r\n};\r\n\r\nWatcherHelper::WatcherHelper(ScintillaDocument *owner_) : owner(owner_) {\r\n}\r\n\r\nvoid WatcherHelper::NotifyModifyAttempt(Document *, void *) {\r\n    emit owner->modify_attempt();\r\n}\r\n\r\nvoid WatcherHelper::NotifySavePoint(Document *, void *, bool atSavePoint) {\r\n    emit owner->save_point(atSavePoint);\r\n}\r\n\r\nvoid WatcherHelper::NotifyModified(Document *, DocModification mh, void *) {\r\n    int length = mh.length;\r\n    if (!mh.text)\r\n        length = 0;\r\n    QByteArray ba = QByteArray::fromRawData(mh.text, length);\r\n    emit owner->modified(mh.position, static_cast<int>(mh.modificationType), ba, length,\r\n\t\t\t mh.linesAdded, mh.line, static_cast<int>(mh.foldLevelNow), static_cast<int>(mh.foldLevelPrev));\r\n}\r\n\r\nvoid WatcherHelper::NotifyDeleted(Document *, void *) noexcept {\r\n}\r\n\r\nvoid WatcherHelper::NotifyStyleNeeded(Document *, void *, Sci::Position endPos) {\r\n    emit owner->style_needed(endPos);\r\n}\r\n\r\nvoid WatcherHelper::NotifyErrorOccurred(Document *, void *, Status status) {\r\n    emit owner->error_occurred(static_cast<int>(status));\r\n}\r\n\r\nScintillaDocument::ScintillaDocument(QObject *parent, void *pdoc_) :\r\n    QObject(parent), pdoc(static_cast<Scintilla::IDocumentEditable *>(pdoc_)), docWatcher(nullptr) {\r\n    if (!pdoc) {\r\n\tpdoc = new Document(DocumentOption::Default);\r\n    }\r\n    docWatcher = new WatcherHelper(this);\r\n    (static_cast<Document *>(pdoc))->AddRef();\r\n    (static_cast<Document *>(pdoc))->AddWatcher(docWatcher, pdoc);\r\n}\r\n\r\nScintillaDocument::~ScintillaDocument() {\r\n    Document *doc = static_cast<Document *>(pdoc);\r\n    if (doc) {\r\n        doc->RemoveWatcher(docWatcher, doc);\r\n        doc->Release();\r\n    }\r\n    pdoc = nullptr;\r\n    delete docWatcher;\r\n    docWatcher = nullptr;\r\n}\r\n\r\nvoid *ScintillaDocument::pointer() {\r\n    return pdoc;\r\n}\r\n\r\nint ScintillaDocument::line_from_position(int pos) {\r\n    return (static_cast<Document *>(pdoc))->LineFromPosition(pos);\r\n}\r\n\r\nbool ScintillaDocument::is_cr_lf(int pos) {\r\n    return (static_cast<Document *>(pdoc))->IsCrLf(pos);\r\n}\r\n\r\nbool ScintillaDocument::delete_chars(int pos, int len) {\r\n    return (static_cast<Document *>(pdoc))->DeleteChars(pos, len);\r\n}\r\n\r\nint ScintillaDocument::undo() {\r\n    return (static_cast<Document *>(pdoc))->Undo();\r\n}\r\n\r\nint ScintillaDocument::redo() {\r\n    return (static_cast<Document *>(pdoc))->Redo();\r\n}\r\n\r\nbool ScintillaDocument::can_undo() {\r\n    return (static_cast<Document *>(pdoc))->CanUndo();\r\n}\r\n\r\nbool ScintillaDocument::can_redo() {\r\n    return (static_cast<Document *>(pdoc))->CanRedo();\r\n}\r\n\r\nvoid ScintillaDocument::delete_undo_history() {\r\n    (static_cast<Document *>(pdoc))->DeleteUndoHistory();\r\n}\r\n\r\nbool ScintillaDocument::set_undo_collection(bool collect_undo) {\r\n    return (static_cast<Document *>(pdoc))->SetUndoCollection(collect_undo);\r\n}\r\n\r\nbool ScintillaDocument::is_collecting_undo() {\r\n    return (static_cast<Document *>(pdoc))->IsCollectingUndo();\r\n}\r\n\r\nvoid ScintillaDocument::begin_undo_action(bool coalesceWithPrior) {\r\n    (static_cast<Document *>(pdoc))->BeginUndoAction(coalesceWithPrior);\r\n}\r\n\r\nvoid ScintillaDocument::end_undo_action() {\r\n    (static_cast<Document *>(pdoc))->EndUndoAction();\r\n}\r\n\r\nvoid ScintillaDocument::set_save_point() {\r\n    (static_cast<Document *>(pdoc))->SetSavePoint();\r\n}\r\n\r\nbool ScintillaDocument::is_save_point() {\r\n    return (static_cast<Document *>(pdoc))->IsSavePoint();\r\n}\r\n\r\nvoid ScintillaDocument::set_read_only(bool read_only) {\r\n    (static_cast<Document *>(pdoc))->SetReadOnly(read_only);\r\n}\r\n\r\nbool ScintillaDocument::is_read_only() {\r\n    return (static_cast<Document *>(pdoc))->IsReadOnly();\r\n}\r\n\r\nvoid ScintillaDocument::insert_string(int position, QByteArray &str) {\r\n    (static_cast<Document *>(pdoc))->InsertString(position, str.data(), str.size());\r\n}\r\n\r\nQByteArray ScintillaDocument::get_char_range(int position, int length) {\r\n    const Document *doc = static_cast<Document *>(pdoc);\r\n\r\n    if (position < 0 || length <= 0 || position + length > doc->Length())\r\n        return QByteArray();\r\n\r\n    QByteArray ba(length, '\\0');\r\n    doc->GetCharRange(ba.data(), position, length);\r\n    return ba;\r\n}\r\n\r\nchar ScintillaDocument::style_at(int position) {\r\n    return (static_cast<Document *>(pdoc))->StyleAt(position);\r\n}\r\n\r\nint ScintillaDocument::line_start(int lineno) {\r\n    return (static_cast<Document *>(pdoc))->LineStart(lineno);\r\n}\r\n\r\nint ScintillaDocument::line_end(int lineno) {\r\n    return (static_cast<Document *>(pdoc))->LineEnd(lineno);\r\n}\r\n\r\nint ScintillaDocument::line_end_position(int pos) {\r\n    return (static_cast<Document *>(pdoc))->LineEndPosition(pos);\r\n}\r\n\r\nint ScintillaDocument::length() {\r\n    return (static_cast<Document *>(pdoc))->Length();\r\n}\r\n\r\nint ScintillaDocument::lines_total() {\r\n    return (static_cast<Document *>(pdoc))->LinesTotal();\r\n}\r\n\r\nvoid ScintillaDocument::start_styling(int position) {\r\n    (static_cast<Document *>(pdoc))->StartStyling(position);\r\n}\r\n\r\nbool ScintillaDocument::set_style_for(int length, char style) {\r\n    return (static_cast<Document *>(pdoc))->SetStyleFor(length, style);\r\n}\r\n\r\nint ScintillaDocument::get_end_styled() {\r\n    return (static_cast<Document *>(pdoc))->GetEndStyled();\r\n}\r\n\r\nvoid ScintillaDocument::ensure_styled_to(int position) {\r\n    (static_cast<Document *>(pdoc))->EnsureStyledTo(position);\r\n}\r\n\r\nvoid ScintillaDocument::set_current_indicator(int indic) {\r\n    (static_cast<Document *>(pdoc))->decorations->SetCurrentIndicator(indic);\r\n}\r\n\r\nvoid ScintillaDocument::decoration_fill_range(int position, int value, int fillLength) {\r\n    (static_cast<Document *>(pdoc))->DecorationFillRange(position, value, fillLength);\r\n}\r\n\r\nint ScintillaDocument::decorations_value_at(int indic, int position) {\r\n    return (static_cast<Document *>(pdoc))->decorations->ValueAt(indic, position);\r\n}\r\n\r\nint ScintillaDocument::decorations_start(int indic, int position) {\r\n    return (static_cast<Document *>(pdoc))->decorations->Start(indic, position);\r\n}\r\n\r\nint ScintillaDocument::decorations_end(int indic, int position) {\r\n    return (static_cast<Document *>(pdoc))->decorations->End(indic, position);\r\n}\r\n\r\nint ScintillaDocument::get_code_page() {\r\n    return (static_cast<Document *>(pdoc))->CodePage();\r\n}\r\n\r\nvoid ScintillaDocument::set_code_page(int code_page) {\r\n    (static_cast<Document *>(pdoc))->dbcsCodePage = code_page;\r\n}\r\n\r\nint ScintillaDocument::get_eol_mode() {\r\n    return static_cast<int>((static_cast<Document *>(pdoc))->eolMode);\r\n}\r\n\r\nvoid ScintillaDocument::set_eol_mode(int eol_mode) {\r\n    (static_cast<Document *>(pdoc))->eolMode = static_cast<EndOfLine>(eol_mode);\r\n}\r\n\r\nint ScintillaDocument::move_position_outside_char(int pos, int move_dir, bool check_line_end) {\r\n    return (static_cast<Document *>(pdoc))->MovePositionOutsideChar(pos, move_dir, check_line_end);\r\n}\r\n\r\nint ScintillaDocument::get_character(int pos) {\r\n    return (static_cast<Document *>(pdoc))->GetCharacterAndWidth(pos, nullptr);\r\n}\r\n"
  },
  {
    "path": "scintilla/qt/ScintillaEdit/ScintillaDocument.h",
    "content": "// @file ScintillaDocument.h\r\n// Wrapper for Scintilla document object so it can be manipulated independently.\r\n// Copyright (c) 2011 Archaeopteryx Software, Inc. d/b/a Wingware\r\n\r\n#ifndef SCINTILLADOCUMENT_H\r\n#define SCINTILLADOCUMENT_H\r\n\r\n#include <QObject>\r\n\r\nclass WatcherHelper;\r\n\r\n#ifndef EXPORT_IMPORT_API\r\n#ifdef WIN32\r\n#ifdef MAKING_LIBRARY\r\n#define EXPORT_IMPORT_API __declspec(dllexport)\r\n#else\r\n// Defining dllimport upsets moc\r\n//#define EXPORT_IMPORT_API __declspec(dllimport)\r\n#define EXPORT_IMPORT_API\r\n#endif\r\n#else\r\n#define EXPORT_IMPORT_API\r\n#endif\r\n#endif\r\n\r\n// Forward declaration\r\nnamespace Scintilla {\r\n    class IDocumentEditable;\r\n}\r\n\r\nclass EXPORT_IMPORT_API ScintillaDocument : public QObject\r\n{\r\n    Q_OBJECT\r\n\r\n    Scintilla::IDocumentEditable *pdoc;\r\n    WatcherHelper *docWatcher;\r\n\r\npublic:\r\n    explicit ScintillaDocument(QObject *parent = 0, void *pdoc_=0);\r\n    virtual ~ScintillaDocument();\r\n    void *pointer();\r\n\r\n    int line_from_position(int pos);\r\n    bool is_cr_lf(int pos);\r\n    bool delete_chars(int pos, int len);\r\n    int undo();\r\n    int redo();\r\n    bool can_undo();\r\n    bool can_redo();\r\n    void delete_undo_history();\r\n    bool set_undo_collection(bool collect_undo);\r\n    bool is_collecting_undo();\r\n    void begin_undo_action(bool coalesceWithPrior = false);\r\n    void end_undo_action();\r\n    void set_save_point();\r\n    bool is_save_point();\r\n    void set_read_only(bool read_only);\r\n    bool is_read_only();\r\n    void insert_string(int position, QByteArray &str);\r\n    QByteArray get_char_range(int position, int length);\r\n    char style_at(int position);\r\n    int line_start(int lineno);\r\n    int line_end(int lineno);\r\n    int line_end_position(int pos);\r\n    int length();\r\n    int lines_total();\r\n    void start_styling(int position);\r\n    bool set_style_for(int length, char style);\r\n    int get_end_styled();\r\n    void ensure_styled_to(int position);\r\n    void set_current_indicator(int indic);\r\n    void decoration_fill_range(int position, int value, int fillLength);\r\n    int decorations_value_at(int indic, int position);\r\n    int decorations_start(int indic, int position);\r\n    int decorations_end(int indic, int position);\r\n    int get_code_page();\r\n    void set_code_page(int code_page);\r\n    int get_eol_mode();\r\n    void set_eol_mode(int eol_mode);\r\n    int move_position_outside_char(int pos, int move_dir, bool check_line_end);\r\n\r\n    int get_character(int pos); // Calls GetCharacterAndWidth(pos, NULL)\r\n\r\nsignals:\r\n    void modify_attempt();\r\n    void save_point(bool atSavePoint);\r\n    void modified(int position, int modification_type, const QByteArray &text, int length,\r\n\t\t  int linesAdded, int line, int foldLevelNow, int foldLevelPrev);\r\n    void style_needed(int pos);\r\n    void error_occurred(int status);\r\n\r\n    friend class ::WatcherHelper;\r\n};\r\n\r\n#endif /* SCINTILLADOCUMENT_H */\r\n"
  },
  {
    "path": "scintilla/qt/ScintillaEdit/ScintillaEdit.cpp",
    "content": "// @file ScintillaEdit.cpp\n// Extended version of ScintillaEditBase with a method for each API\n// Copyright (c) 2011 Archaeopteryx Software, Inc. d/b/a Wingware\n\n#include <cstdint>\n#include \"ScintillaEdit.h\"\n\nusing namespace Scintilla;\n\nScintillaEdit::ScintillaEdit(QWidget *parent) : ScintillaEditBase(parent) {\n}\n\nScintillaEdit::~ScintillaEdit() {\n}\n\nQByteArray ScintillaEdit::TextReturner(int message, uptr_t wParam) const {\n    // While Scintilla can return strings longer than maximum(int), QByteArray uses int size\n    const int length = static_cast<int>(send(message, wParam, 0));\n    QByteArray ba(length + 1, '\\0');\n    send(message, wParam, (sptr_t)ba.data());\n    // Remove extra NULs\n    if (ba.at(ba.size()-1) == 0)\n        ba.chop(1);\n    return ba;\n}\n\nQPair<int, int>ScintillaEdit::find_text(int flags, const char *text, int cpMin, int cpMax) {\n    struct Sci_TextToFind ft = {{0, 0}, 0, {0, 0}};\n    ft.chrg.cpMin = cpMin;\n    ft.chrg.cpMax = cpMax;\n    ft.chrgText.cpMin = cpMin;\n    ft.chrgText.cpMax = cpMax;\n    ft.lpstrText = text;\n\n    int start = send(SCI_FINDTEXT, flags, (uptr_t) (&ft));\n\n    return QPair<int,int>(start, ft.chrgText.cpMax);\n}\n\nQByteArray ScintillaEdit::get_text_range(int start, int end) {\n    if (start > end)\n        start = end;\n\n    int length = end-start;\n    QByteArray ba(length+1, '\\0');\n    struct Sci_TextRange tr = {{start, end}, ba.data()};\n\n    send(SCI_GETTEXTRANGE, 0, (sptr_t)&tr);\n    ba.chop(1); // Remove extra NUL\n\n    return ba;\n}\n\nScintillaDocument *ScintillaEdit::get_doc() {\n    return new ScintillaDocument(0, (void *)send(SCI_GETDOCPOINTER, 0, 0));\n}\n\nvoid ScintillaEdit::set_doc(ScintillaDocument *pdoc_) {\n    send(SCI_SETDOCPOINTER, 0, (sptr_t)(pdoc_->pointer()));\n}\n\nlong ScintillaEdit::format_range(bool draw, QPaintDevice* target, QPaintDevice* measure,\n                                 const QRect& print_rect, const QRect& page_rect,\n                                 long range_start, long range_end)\n{\n    Sci_RangeToFormat to_format;\n\n    to_format.hdc = target;\n    to_format.hdcTarget = measure;\n\n    to_format.rc.left = print_rect.left();\n    to_format.rc.top = print_rect.top();\n    to_format.rc.right = print_rect.right();\n    to_format.rc.bottom = print_rect.bottom();\n\n    to_format.rcPage.left = page_rect.left();\n    to_format.rcPage.top = page_rect.top();\n    to_format.rcPage.right = page_rect.right();\n    to_format.rcPage.bottom = page_rect.bottom();\n\n    to_format.chrg.cpMin = range_start;\n    to_format.chrg.cpMax = range_end;\n\n    return send(SCI_FORMATRANGE, draw, reinterpret_cast<sptr_t>(&to_format));\n}\n\n/* ++Autogenerated -- start of section automatically generated from Scintilla.iface */\nvoid ScintillaEdit::addText(sptr_t length, const char * text) {\n    send(SCI_ADDTEXT, length, (sptr_t)text);\n}\n\nvoid ScintillaEdit::addStyledText(sptr_t length, const char * c) {\n    send(SCI_ADDSTYLEDTEXT, length, (sptr_t)c);\n}\n\nvoid ScintillaEdit::insertText(sptr_t pos, const char * text) {\n    send(SCI_INSERTTEXT, pos, (sptr_t)text);\n}\n\nvoid ScintillaEdit::changeInsertion(sptr_t length, const char * text) {\n    send(SCI_CHANGEINSERTION, length, (sptr_t)text);\n}\n\nvoid ScintillaEdit::clearAll() {\n    send(SCI_CLEARALL, 0, 0);\n}\n\nvoid ScintillaEdit::deleteRange(sptr_t start, sptr_t lengthDelete) {\n    send(SCI_DELETERANGE, start, lengthDelete);\n}\n\nvoid ScintillaEdit::clearDocumentStyle() {\n    send(SCI_CLEARDOCUMENTSTYLE, 0, 0);\n}\n\nsptr_t ScintillaEdit::length() const {\n    return send(SCI_GETLENGTH, 0, 0);\n}\n\nsptr_t ScintillaEdit::charAt(sptr_t pos) const {\n    return send(SCI_GETCHARAT, pos, 0);\n}\n\nsptr_t ScintillaEdit::currentPos() const {\n    return send(SCI_GETCURRENTPOS, 0, 0);\n}\n\nsptr_t ScintillaEdit::anchor() const {\n    return send(SCI_GETANCHOR, 0, 0);\n}\n\nsptr_t ScintillaEdit::styleAt(sptr_t pos) const {\n    return send(SCI_GETSTYLEAT, pos, 0);\n}\n\nsptr_t ScintillaEdit::styleIndexAt(sptr_t pos) const {\n    return send(SCI_GETSTYLEINDEXAT, pos, 0);\n}\n\nvoid ScintillaEdit::redo() {\n    send(SCI_REDO, 0, 0);\n}\n\nvoid ScintillaEdit::setUndoCollection(bool collectUndo) {\n    send(SCI_SETUNDOCOLLECTION, collectUndo, 0);\n}\n\nvoid ScintillaEdit::selectAll() {\n    send(SCI_SELECTALL, 0, 0);\n}\n\nvoid ScintillaEdit::setSavePoint() {\n    send(SCI_SETSAVEPOINT, 0, 0);\n}\n\nbool ScintillaEdit::canRedo() {\n    return send(SCI_CANREDO, 0, 0);\n}\n\nsptr_t ScintillaEdit::markerLineFromHandle(sptr_t markerHandle) {\n    return send(SCI_MARKERLINEFROMHANDLE, markerHandle, 0);\n}\n\nvoid ScintillaEdit::markerDeleteHandle(sptr_t markerHandle) {\n    send(SCI_MARKERDELETEHANDLE, markerHandle, 0);\n}\n\nsptr_t ScintillaEdit::markerHandleFromLine(sptr_t line, sptr_t which) {\n    return send(SCI_MARKERHANDLEFROMLINE, line, which);\n}\n\nsptr_t ScintillaEdit::markerNumberFromLine(sptr_t line, sptr_t which) {\n    return send(SCI_MARKERNUMBERFROMLINE, line, which);\n}\n\nbool ScintillaEdit::undoCollection() const {\n    return send(SCI_GETUNDOCOLLECTION, 0, 0);\n}\n\nsptr_t ScintillaEdit::viewWS() const {\n    return send(SCI_GETVIEWWS, 0, 0);\n}\n\nvoid ScintillaEdit::setViewWS(sptr_t viewWS) {\n    send(SCI_SETVIEWWS, viewWS, 0);\n}\n\nsptr_t ScintillaEdit::tabDrawMode() const {\n    return send(SCI_GETTABDRAWMODE, 0, 0);\n}\n\nvoid ScintillaEdit::setTabDrawMode(sptr_t tabDrawMode) {\n    send(SCI_SETTABDRAWMODE, tabDrawMode, 0);\n}\n\nsptr_t ScintillaEdit::positionFromPoint(sptr_t x, sptr_t y) {\n    return send(SCI_POSITIONFROMPOINT, x, y);\n}\n\nsptr_t ScintillaEdit::positionFromPointClose(sptr_t x, sptr_t y) {\n    return send(SCI_POSITIONFROMPOINTCLOSE, x, y);\n}\n\nvoid ScintillaEdit::gotoLine(sptr_t line) {\n    send(SCI_GOTOLINE, line, 0);\n}\n\nvoid ScintillaEdit::gotoPos(sptr_t caret) {\n    send(SCI_GOTOPOS, caret, 0);\n}\n\nvoid ScintillaEdit::setAnchor(sptr_t anchor) {\n    send(SCI_SETANCHOR, anchor, 0);\n}\n\nQByteArray ScintillaEdit::getCurLine(sptr_t length) {\n    return TextReturner(SCI_GETCURLINE, length);\n}\n\nsptr_t ScintillaEdit::endStyled() const {\n    return send(SCI_GETENDSTYLED, 0, 0);\n}\n\nvoid ScintillaEdit::convertEOLs(sptr_t eolMode) {\n    send(SCI_CONVERTEOLS, eolMode, 0);\n}\n\nsptr_t ScintillaEdit::eOLMode() const {\n    return send(SCI_GETEOLMODE, 0, 0);\n}\n\nvoid ScintillaEdit::setEOLMode(sptr_t eolMode) {\n    send(SCI_SETEOLMODE, eolMode, 0);\n}\n\nvoid ScintillaEdit::startStyling(sptr_t start, sptr_t unused) {\n    send(SCI_STARTSTYLING, start, unused);\n}\n\nvoid ScintillaEdit::setStyling(sptr_t length, sptr_t style) {\n    send(SCI_SETSTYLING, length, style);\n}\n\nbool ScintillaEdit::bufferedDraw() const {\n    return send(SCI_GETBUFFEREDDRAW, 0, 0);\n}\n\nvoid ScintillaEdit::setBufferedDraw(bool buffered) {\n    send(SCI_SETBUFFEREDDRAW, buffered, 0);\n}\n\nvoid ScintillaEdit::setTabWidth(sptr_t tabWidth) {\n    send(SCI_SETTABWIDTH, tabWidth, 0);\n}\n\nsptr_t ScintillaEdit::tabWidth() const {\n    return send(SCI_GETTABWIDTH, 0, 0);\n}\n\nvoid ScintillaEdit::setTabMinimumWidth(sptr_t pixels) {\n    send(SCI_SETTABMINIMUMWIDTH, pixels, 0);\n}\n\nsptr_t ScintillaEdit::tabMinimumWidth() const {\n    return send(SCI_GETTABMINIMUMWIDTH, 0, 0);\n}\n\nvoid ScintillaEdit::clearTabStops(sptr_t line) {\n    send(SCI_CLEARTABSTOPS, line, 0);\n}\n\nvoid ScintillaEdit::addTabStop(sptr_t line, sptr_t x) {\n    send(SCI_ADDTABSTOP, line, x);\n}\n\nsptr_t ScintillaEdit::getNextTabStop(sptr_t line, sptr_t x) {\n    return send(SCI_GETNEXTTABSTOP, line, x);\n}\n\nvoid ScintillaEdit::setCodePage(sptr_t codePage) {\n    send(SCI_SETCODEPAGE, codePage, 0);\n}\n\nvoid ScintillaEdit::setFontLocale(const char * localeName) {\n    send(SCI_SETFONTLOCALE, 0, (sptr_t)localeName);\n}\n\nQByteArray ScintillaEdit::fontLocale() const {\n    return TextReturner(SCI_GETFONTLOCALE, 0);\n}\n\nsptr_t ScintillaEdit::iMEInteraction() const {\n    return send(SCI_GETIMEINTERACTION, 0, 0);\n}\n\nvoid ScintillaEdit::setIMEInteraction(sptr_t imeInteraction) {\n    send(SCI_SETIMEINTERACTION, imeInteraction, 0);\n}\n\nvoid ScintillaEdit::markerDefine(sptr_t markerNumber, sptr_t markerSymbol) {\n    send(SCI_MARKERDEFINE, markerNumber, markerSymbol);\n}\n\nvoid ScintillaEdit::markerSetFore(sptr_t markerNumber, sptr_t fore) {\n    send(SCI_MARKERSETFORE, markerNumber, fore);\n}\n\nvoid ScintillaEdit::markerSetBack(sptr_t markerNumber, sptr_t back) {\n    send(SCI_MARKERSETBACK, markerNumber, back);\n}\n\nvoid ScintillaEdit::markerSetBackSelected(sptr_t markerNumber, sptr_t back) {\n    send(SCI_MARKERSETBACKSELECTED, markerNumber, back);\n}\n\nvoid ScintillaEdit::markerSetForeTranslucent(sptr_t markerNumber, sptr_t fore) {\n    send(SCI_MARKERSETFORETRANSLUCENT, markerNumber, fore);\n}\n\nvoid ScintillaEdit::markerSetBackTranslucent(sptr_t markerNumber, sptr_t back) {\n    send(SCI_MARKERSETBACKTRANSLUCENT, markerNumber, back);\n}\n\nvoid ScintillaEdit::markerSetBackSelectedTranslucent(sptr_t markerNumber, sptr_t back) {\n    send(SCI_MARKERSETBACKSELECTEDTRANSLUCENT, markerNumber, back);\n}\n\nvoid ScintillaEdit::markerSetStrokeWidth(sptr_t markerNumber, sptr_t hundredths) {\n    send(SCI_MARKERSETSTROKEWIDTH, markerNumber, hundredths);\n}\n\nvoid ScintillaEdit::markerEnableHighlight(bool enabled) {\n    send(SCI_MARKERENABLEHIGHLIGHT, enabled, 0);\n}\n\nsptr_t ScintillaEdit::markerAdd(sptr_t line, sptr_t markerNumber) {\n    return send(SCI_MARKERADD, line, markerNumber);\n}\n\nvoid ScintillaEdit::markerDelete(sptr_t line, sptr_t markerNumber) {\n    send(SCI_MARKERDELETE, line, markerNumber);\n}\n\nvoid ScintillaEdit::markerDeleteAll(sptr_t markerNumber) {\n    send(SCI_MARKERDELETEALL, markerNumber, 0);\n}\n\nsptr_t ScintillaEdit::markerGet(sptr_t line) {\n    return send(SCI_MARKERGET, line, 0);\n}\n\nsptr_t ScintillaEdit::markerNext(sptr_t lineStart, sptr_t markerMask) {\n    return send(SCI_MARKERNEXT, lineStart, markerMask);\n}\n\nsptr_t ScintillaEdit::markerPrevious(sptr_t lineStart, sptr_t markerMask) {\n    return send(SCI_MARKERPREVIOUS, lineStart, markerMask);\n}\n\nvoid ScintillaEdit::markerDefinePixmap(sptr_t markerNumber, const char * pixmap) {\n    send(SCI_MARKERDEFINEPIXMAP, markerNumber, (sptr_t)pixmap);\n}\n\nvoid ScintillaEdit::markerAddSet(sptr_t line, sptr_t markerSet) {\n    send(SCI_MARKERADDSET, line, markerSet);\n}\n\nvoid ScintillaEdit::markerSetAlpha(sptr_t markerNumber, sptr_t alpha) {\n    send(SCI_MARKERSETALPHA, markerNumber, alpha);\n}\n\nsptr_t ScintillaEdit::markerLayer(sptr_t markerNumber) const {\n    return send(SCI_MARKERGETLAYER, markerNumber, 0);\n}\n\nvoid ScintillaEdit::markerSetLayer(sptr_t markerNumber, sptr_t layer) {\n    send(SCI_MARKERSETLAYER, markerNumber, layer);\n}\n\nvoid ScintillaEdit::setMarginTypeN(sptr_t margin, sptr_t marginType) {\n    send(SCI_SETMARGINTYPEN, margin, marginType);\n}\n\nsptr_t ScintillaEdit::marginTypeN(sptr_t margin) const {\n    return send(SCI_GETMARGINTYPEN, margin, 0);\n}\n\nvoid ScintillaEdit::setMarginWidthN(sptr_t margin, sptr_t pixelWidth) {\n    send(SCI_SETMARGINWIDTHN, margin, pixelWidth);\n}\n\nsptr_t ScintillaEdit::marginWidthN(sptr_t margin) const {\n    return send(SCI_GETMARGINWIDTHN, margin, 0);\n}\n\nvoid ScintillaEdit::setMarginMaskN(sptr_t margin, sptr_t mask) {\n    send(SCI_SETMARGINMASKN, margin, mask);\n}\n\nsptr_t ScintillaEdit::marginMaskN(sptr_t margin) const {\n    return send(SCI_GETMARGINMASKN, margin, 0);\n}\n\nvoid ScintillaEdit::setMarginSensitiveN(sptr_t margin, bool sensitive) {\n    send(SCI_SETMARGINSENSITIVEN, margin, sensitive);\n}\n\nbool ScintillaEdit::marginSensitiveN(sptr_t margin) const {\n    return send(SCI_GETMARGINSENSITIVEN, margin, 0);\n}\n\nvoid ScintillaEdit::setMarginCursorN(sptr_t margin, sptr_t cursor) {\n    send(SCI_SETMARGINCURSORN, margin, cursor);\n}\n\nsptr_t ScintillaEdit::marginCursorN(sptr_t margin) const {\n    return send(SCI_GETMARGINCURSORN, margin, 0);\n}\n\nvoid ScintillaEdit::setMarginBackN(sptr_t margin, sptr_t back) {\n    send(SCI_SETMARGINBACKN, margin, back);\n}\n\nsptr_t ScintillaEdit::marginBackN(sptr_t margin) const {\n    return send(SCI_GETMARGINBACKN, margin, 0);\n}\n\nvoid ScintillaEdit::setMargins(sptr_t margins) {\n    send(SCI_SETMARGINS, margins, 0);\n}\n\nsptr_t ScintillaEdit::margins() const {\n    return send(SCI_GETMARGINS, 0, 0);\n}\n\nvoid ScintillaEdit::styleClearAll() {\n    send(SCI_STYLECLEARALL, 0, 0);\n}\n\nvoid ScintillaEdit::styleSetFore(sptr_t style, sptr_t fore) {\n    send(SCI_STYLESETFORE, style, fore);\n}\n\nvoid ScintillaEdit::styleSetBack(sptr_t style, sptr_t back) {\n    send(SCI_STYLESETBACK, style, back);\n}\n\nvoid ScintillaEdit::styleSetBold(sptr_t style, bool bold) {\n    send(SCI_STYLESETBOLD, style, bold);\n}\n\nvoid ScintillaEdit::styleSetItalic(sptr_t style, bool italic) {\n    send(SCI_STYLESETITALIC, style, italic);\n}\n\nvoid ScintillaEdit::styleSetSize(sptr_t style, sptr_t sizePoints) {\n    send(SCI_STYLESETSIZE, style, sizePoints);\n}\n\nvoid ScintillaEdit::styleSetFont(sptr_t style, const char * fontName) {\n    send(SCI_STYLESETFONT, style, (sptr_t)fontName);\n}\n\nvoid ScintillaEdit::styleSetEOLFilled(sptr_t style, bool eolFilled) {\n    send(SCI_STYLESETEOLFILLED, style, eolFilled);\n}\n\nvoid ScintillaEdit::styleResetDefault() {\n    send(SCI_STYLERESETDEFAULT, 0, 0);\n}\n\nvoid ScintillaEdit::styleSetUnderline(sptr_t style, bool underline) {\n    send(SCI_STYLESETUNDERLINE, style, underline);\n}\n\nsptr_t ScintillaEdit::styleFore(sptr_t style) const {\n    return send(SCI_STYLEGETFORE, style, 0);\n}\n\nsptr_t ScintillaEdit::styleBack(sptr_t style) const {\n    return send(SCI_STYLEGETBACK, style, 0);\n}\n\nbool ScintillaEdit::styleBold(sptr_t style) const {\n    return send(SCI_STYLEGETBOLD, style, 0);\n}\n\nbool ScintillaEdit::styleItalic(sptr_t style) const {\n    return send(SCI_STYLEGETITALIC, style, 0);\n}\n\nsptr_t ScintillaEdit::styleSize(sptr_t style) const {\n    return send(SCI_STYLEGETSIZE, style, 0);\n}\n\nQByteArray ScintillaEdit::styleFont(sptr_t style) const {\n    return TextReturner(SCI_STYLEGETFONT, style);\n}\n\nbool ScintillaEdit::styleEOLFilled(sptr_t style) const {\n    return send(SCI_STYLEGETEOLFILLED, style, 0);\n}\n\nbool ScintillaEdit::styleUnderline(sptr_t style) const {\n    return send(SCI_STYLEGETUNDERLINE, style, 0);\n}\n\nsptr_t ScintillaEdit::styleCase(sptr_t style) const {\n    return send(SCI_STYLEGETCASE, style, 0);\n}\n\nsptr_t ScintillaEdit::styleCharacterSet(sptr_t style) const {\n    return send(SCI_STYLEGETCHARACTERSET, style, 0);\n}\n\nbool ScintillaEdit::styleVisible(sptr_t style) const {\n    return send(SCI_STYLEGETVISIBLE, style, 0);\n}\n\nbool ScintillaEdit::styleChangeable(sptr_t style) const {\n    return send(SCI_STYLEGETCHANGEABLE, style, 0);\n}\n\nbool ScintillaEdit::styleHotSpot(sptr_t style) const {\n    return send(SCI_STYLEGETHOTSPOT, style, 0);\n}\n\nvoid ScintillaEdit::styleSetCase(sptr_t style, sptr_t caseVisible) {\n    send(SCI_STYLESETCASE, style, caseVisible);\n}\n\nvoid ScintillaEdit::styleSetSizeFractional(sptr_t style, sptr_t sizeHundredthPoints) {\n    send(SCI_STYLESETSIZEFRACTIONAL, style, sizeHundredthPoints);\n}\n\nsptr_t ScintillaEdit::styleSizeFractional(sptr_t style) const {\n    return send(SCI_STYLEGETSIZEFRACTIONAL, style, 0);\n}\n\nvoid ScintillaEdit::styleSetWeight(sptr_t style, sptr_t weight) {\n    send(SCI_STYLESETWEIGHT, style, weight);\n}\n\nsptr_t ScintillaEdit::styleWeight(sptr_t style) const {\n    return send(SCI_STYLEGETWEIGHT, style, 0);\n}\n\nvoid ScintillaEdit::styleSetCharacterSet(sptr_t style, sptr_t characterSet) {\n    send(SCI_STYLESETCHARACTERSET, style, characterSet);\n}\n\nvoid ScintillaEdit::styleSetHotSpot(sptr_t style, bool hotspot) {\n    send(SCI_STYLESETHOTSPOT, style, hotspot);\n}\n\nvoid ScintillaEdit::styleSetCheckMonospaced(sptr_t style, bool checkMonospaced) {\n    send(SCI_STYLESETCHECKMONOSPACED, style, checkMonospaced);\n}\n\nbool ScintillaEdit::styleCheckMonospaced(sptr_t style) const {\n    return send(SCI_STYLEGETCHECKMONOSPACED, style, 0);\n}\n\nvoid ScintillaEdit::styleSetInvisibleRepresentation(sptr_t style, const char * representation) {\n    send(SCI_STYLESETINVISIBLEREPRESENTATION, style, (sptr_t)representation);\n}\n\nQByteArray ScintillaEdit::styleInvisibleRepresentation(sptr_t style) const {\n    return TextReturner(SCI_STYLEGETINVISIBLEREPRESENTATION, style);\n}\n\nvoid ScintillaEdit::setElementColour(sptr_t element, sptr_t colourElement) {\n    send(SCI_SETELEMENTCOLOUR, element, colourElement);\n}\n\nsptr_t ScintillaEdit::elementColour(sptr_t element) const {\n    return send(SCI_GETELEMENTCOLOUR, element, 0);\n}\n\nvoid ScintillaEdit::resetElementColour(sptr_t element) {\n    send(SCI_RESETELEMENTCOLOUR, element, 0);\n}\n\nbool ScintillaEdit::elementIsSet(sptr_t element) const {\n    return send(SCI_GETELEMENTISSET, element, 0);\n}\n\nbool ScintillaEdit::elementAllowsTranslucent(sptr_t element) const {\n    return send(SCI_GETELEMENTALLOWSTRANSLUCENT, element, 0);\n}\n\nsptr_t ScintillaEdit::elementBaseColour(sptr_t element) const {\n    return send(SCI_GETELEMENTBASECOLOUR, element, 0);\n}\n\nvoid ScintillaEdit::setSelFore(bool useSetting, sptr_t fore) {\n    send(SCI_SETSELFORE, useSetting, fore);\n}\n\nvoid ScintillaEdit::setSelBack(bool useSetting, sptr_t back) {\n    send(SCI_SETSELBACK, useSetting, back);\n}\n\nsptr_t ScintillaEdit::selAlpha() const {\n    return send(SCI_GETSELALPHA, 0, 0);\n}\n\nvoid ScintillaEdit::setSelAlpha(sptr_t alpha) {\n    send(SCI_SETSELALPHA, alpha, 0);\n}\n\nbool ScintillaEdit::selEOLFilled() const {\n    return send(SCI_GETSELEOLFILLED, 0, 0);\n}\n\nvoid ScintillaEdit::setSelEOLFilled(bool filled) {\n    send(SCI_SETSELEOLFILLED, filled, 0);\n}\n\nsptr_t ScintillaEdit::selectionLayer() const {\n    return send(SCI_GETSELECTIONLAYER, 0, 0);\n}\n\nvoid ScintillaEdit::setSelectionLayer(sptr_t layer) {\n    send(SCI_SETSELECTIONLAYER, layer, 0);\n}\n\nsptr_t ScintillaEdit::caretLineLayer() const {\n    return send(SCI_GETCARETLINELAYER, 0, 0);\n}\n\nvoid ScintillaEdit::setCaretLineLayer(sptr_t layer) {\n    send(SCI_SETCARETLINELAYER, layer, 0);\n}\n\nbool ScintillaEdit::caretLineHighlightSubLine() const {\n    return send(SCI_GETCARETLINEHIGHLIGHTSUBLINE, 0, 0);\n}\n\nvoid ScintillaEdit::setCaretLineHighlightSubLine(bool subLine) {\n    send(SCI_SETCARETLINEHIGHLIGHTSUBLINE, subLine, 0);\n}\n\nvoid ScintillaEdit::setCaretFore(sptr_t fore) {\n    send(SCI_SETCARETFORE, fore, 0);\n}\n\nvoid ScintillaEdit::assignCmdKey(sptr_t keyDefinition, sptr_t sciCommand) {\n    send(SCI_ASSIGNCMDKEY, keyDefinition, sciCommand);\n}\n\nvoid ScintillaEdit::clearCmdKey(sptr_t keyDefinition) {\n    send(SCI_CLEARCMDKEY, keyDefinition, 0);\n}\n\nvoid ScintillaEdit::clearAllCmdKeys() {\n    send(SCI_CLEARALLCMDKEYS, 0, 0);\n}\n\nvoid ScintillaEdit::setStylingEx(sptr_t length, const char * styles) {\n    send(SCI_SETSTYLINGEX, length, (sptr_t)styles);\n}\n\nvoid ScintillaEdit::styleSetVisible(sptr_t style, bool visible) {\n    send(SCI_STYLESETVISIBLE, style, visible);\n}\n\nsptr_t ScintillaEdit::caretPeriod() const {\n    return send(SCI_GETCARETPERIOD, 0, 0);\n}\n\nvoid ScintillaEdit::setCaretPeriod(sptr_t periodMilliseconds) {\n    send(SCI_SETCARETPERIOD, periodMilliseconds, 0);\n}\n\nvoid ScintillaEdit::setWordChars(const char * characters) {\n    send(SCI_SETWORDCHARS, 0, (sptr_t)characters);\n}\n\nQByteArray ScintillaEdit::wordChars() const {\n    return TextReturner(SCI_GETWORDCHARS, 0);\n}\n\nvoid ScintillaEdit::setCharacterCategoryOptimization(sptr_t countCharacters) {\n    send(SCI_SETCHARACTERCATEGORYOPTIMIZATION, countCharacters, 0);\n}\n\nsptr_t ScintillaEdit::characterCategoryOptimization() const {\n    return send(SCI_GETCHARACTERCATEGORYOPTIMIZATION, 0, 0);\n}\n\nvoid ScintillaEdit::beginUndoAction() {\n    send(SCI_BEGINUNDOACTION, 0, 0);\n}\n\nvoid ScintillaEdit::endUndoAction() {\n    send(SCI_ENDUNDOACTION, 0, 0);\n}\n\nsptr_t ScintillaEdit::undoActions() const {\n    return send(SCI_GETUNDOACTIONS, 0, 0);\n}\n\nvoid ScintillaEdit::setUndoSavePoint(sptr_t action) {\n    send(SCI_SETUNDOSAVEPOINT, action, 0);\n}\n\nsptr_t ScintillaEdit::undoSavePoint() const {\n    return send(SCI_GETUNDOSAVEPOINT, 0, 0);\n}\n\nvoid ScintillaEdit::setUndoDetach(sptr_t action) {\n    send(SCI_SETUNDODETACH, action, 0);\n}\n\nsptr_t ScintillaEdit::undoDetach() const {\n    return send(SCI_GETUNDODETACH, 0, 0);\n}\n\nvoid ScintillaEdit::setUndoTentative(sptr_t action) {\n    send(SCI_SETUNDOTENTATIVE, action, 0);\n}\n\nsptr_t ScintillaEdit::undoTentative() const {\n    return send(SCI_GETUNDOTENTATIVE, 0, 0);\n}\n\nvoid ScintillaEdit::setUndoCurrent(sptr_t action) {\n    send(SCI_SETUNDOCURRENT, action, 0);\n}\n\nsptr_t ScintillaEdit::undoCurrent() const {\n    return send(SCI_GETUNDOCURRENT, 0, 0);\n}\n\nvoid ScintillaEdit::pushUndoActionType(sptr_t type, sptr_t pos) {\n    send(SCI_PUSHUNDOACTIONTYPE, type, pos);\n}\n\nvoid ScintillaEdit::changeLastUndoActionText(sptr_t length, const char * text) {\n    send(SCI_CHANGELASTUNDOACTIONTEXT, length, (sptr_t)text);\n}\n\nsptr_t ScintillaEdit::undoActionType(sptr_t action) const {\n    return send(SCI_GETUNDOACTIONTYPE, action, 0);\n}\n\nsptr_t ScintillaEdit::undoActionPosition(sptr_t action) const {\n    return send(SCI_GETUNDOACTIONPOSITION, action, 0);\n}\n\nQByteArray ScintillaEdit::undoActionText(sptr_t action) const {\n    return TextReturner(SCI_GETUNDOACTIONTEXT, action);\n}\n\nvoid ScintillaEdit::indicSetStyle(sptr_t indicator, sptr_t indicatorStyle) {\n    send(SCI_INDICSETSTYLE, indicator, indicatorStyle);\n}\n\nsptr_t ScintillaEdit::indicStyle(sptr_t indicator) const {\n    return send(SCI_INDICGETSTYLE, indicator, 0);\n}\n\nvoid ScintillaEdit::indicSetFore(sptr_t indicator, sptr_t fore) {\n    send(SCI_INDICSETFORE, indicator, fore);\n}\n\nsptr_t ScintillaEdit::indicFore(sptr_t indicator) const {\n    return send(SCI_INDICGETFORE, indicator, 0);\n}\n\nvoid ScintillaEdit::indicSetUnder(sptr_t indicator, bool under) {\n    send(SCI_INDICSETUNDER, indicator, under);\n}\n\nbool ScintillaEdit::indicUnder(sptr_t indicator) const {\n    return send(SCI_INDICGETUNDER, indicator, 0);\n}\n\nvoid ScintillaEdit::indicSetHoverStyle(sptr_t indicator, sptr_t indicatorStyle) {\n    send(SCI_INDICSETHOVERSTYLE, indicator, indicatorStyle);\n}\n\nsptr_t ScintillaEdit::indicHoverStyle(sptr_t indicator) const {\n    return send(SCI_INDICGETHOVERSTYLE, indicator, 0);\n}\n\nvoid ScintillaEdit::indicSetHoverFore(sptr_t indicator, sptr_t fore) {\n    send(SCI_INDICSETHOVERFORE, indicator, fore);\n}\n\nsptr_t ScintillaEdit::indicHoverFore(sptr_t indicator) const {\n    return send(SCI_INDICGETHOVERFORE, indicator, 0);\n}\n\nvoid ScintillaEdit::indicSetFlags(sptr_t indicator, sptr_t flags) {\n    send(SCI_INDICSETFLAGS, indicator, flags);\n}\n\nsptr_t ScintillaEdit::indicFlags(sptr_t indicator) const {\n    return send(SCI_INDICGETFLAGS, indicator, 0);\n}\n\nvoid ScintillaEdit::indicSetStrokeWidth(sptr_t indicator, sptr_t hundredths) {\n    send(SCI_INDICSETSTROKEWIDTH, indicator, hundredths);\n}\n\nsptr_t ScintillaEdit::indicStrokeWidth(sptr_t indicator) const {\n    return send(SCI_INDICGETSTROKEWIDTH, indicator, 0);\n}\n\nvoid ScintillaEdit::setWhitespaceFore(bool useSetting, sptr_t fore) {\n    send(SCI_SETWHITESPACEFORE, useSetting, fore);\n}\n\nvoid ScintillaEdit::setWhitespaceBack(bool useSetting, sptr_t back) {\n    send(SCI_SETWHITESPACEBACK, useSetting, back);\n}\n\nvoid ScintillaEdit::setWhitespaceSize(sptr_t size) {\n    send(SCI_SETWHITESPACESIZE, size, 0);\n}\n\nsptr_t ScintillaEdit::whitespaceSize() const {\n    return send(SCI_GETWHITESPACESIZE, 0, 0);\n}\n\nvoid ScintillaEdit::setLineState(sptr_t line, sptr_t state) {\n    send(SCI_SETLINESTATE, line, state);\n}\n\nsptr_t ScintillaEdit::lineState(sptr_t line) const {\n    return send(SCI_GETLINESTATE, line, 0);\n}\n\nsptr_t ScintillaEdit::maxLineState() const {\n    return send(SCI_GETMAXLINESTATE, 0, 0);\n}\n\nbool ScintillaEdit::caretLineVisible() const {\n    return send(SCI_GETCARETLINEVISIBLE, 0, 0);\n}\n\nvoid ScintillaEdit::setCaretLineVisible(bool show) {\n    send(SCI_SETCARETLINEVISIBLE, show, 0);\n}\n\nsptr_t ScintillaEdit::caretLineBack() const {\n    return send(SCI_GETCARETLINEBACK, 0, 0);\n}\n\nvoid ScintillaEdit::setCaretLineBack(sptr_t back) {\n    send(SCI_SETCARETLINEBACK, back, 0);\n}\n\nsptr_t ScintillaEdit::caretLineFrame() const {\n    return send(SCI_GETCARETLINEFRAME, 0, 0);\n}\n\nvoid ScintillaEdit::setCaretLineFrame(sptr_t width) {\n    send(SCI_SETCARETLINEFRAME, width, 0);\n}\n\nvoid ScintillaEdit::styleSetChangeable(sptr_t style, bool changeable) {\n    send(SCI_STYLESETCHANGEABLE, style, changeable);\n}\n\nvoid ScintillaEdit::autoCShow(sptr_t lengthEntered, const char * itemList) {\n    send(SCI_AUTOCSHOW, lengthEntered, (sptr_t)itemList);\n}\n\nvoid ScintillaEdit::autoCCancel() {\n    send(SCI_AUTOCCANCEL, 0, 0);\n}\n\nbool ScintillaEdit::autoCActive() {\n    return send(SCI_AUTOCACTIVE, 0, 0);\n}\n\nsptr_t ScintillaEdit::autoCPosStart() {\n    return send(SCI_AUTOCPOSSTART, 0, 0);\n}\n\nvoid ScintillaEdit::autoCComplete() {\n    send(SCI_AUTOCCOMPLETE, 0, 0);\n}\n\nvoid ScintillaEdit::autoCStops(const char * characterSet) {\n    send(SCI_AUTOCSTOPS, 0, (sptr_t)characterSet);\n}\n\nvoid ScintillaEdit::autoCSetSeparator(sptr_t separatorCharacter) {\n    send(SCI_AUTOCSETSEPARATOR, separatorCharacter, 0);\n}\n\nsptr_t ScintillaEdit::autoCSeparator() const {\n    return send(SCI_AUTOCGETSEPARATOR, 0, 0);\n}\n\nvoid ScintillaEdit::autoCSelect(const char * select) {\n    send(SCI_AUTOCSELECT, 0, (sptr_t)select);\n}\n\nvoid ScintillaEdit::autoCSetCancelAtStart(bool cancel) {\n    send(SCI_AUTOCSETCANCELATSTART, cancel, 0);\n}\n\nbool ScintillaEdit::autoCCancelAtStart() const {\n    return send(SCI_AUTOCGETCANCELATSTART, 0, 0);\n}\n\nvoid ScintillaEdit::autoCSetFillUps(const char * characterSet) {\n    send(SCI_AUTOCSETFILLUPS, 0, (sptr_t)characterSet);\n}\n\nvoid ScintillaEdit::autoCSetChooseSingle(bool chooseSingle) {\n    send(SCI_AUTOCSETCHOOSESINGLE, chooseSingle, 0);\n}\n\nbool ScintillaEdit::autoCChooseSingle() const {\n    return send(SCI_AUTOCGETCHOOSESINGLE, 0, 0);\n}\n\nvoid ScintillaEdit::autoCSetIgnoreCase(bool ignoreCase) {\n    send(SCI_AUTOCSETIGNORECASE, ignoreCase, 0);\n}\n\nbool ScintillaEdit::autoCIgnoreCase() const {\n    return send(SCI_AUTOCGETIGNORECASE, 0, 0);\n}\n\nvoid ScintillaEdit::userListShow(sptr_t listType, const char * itemList) {\n    send(SCI_USERLISTSHOW, listType, (sptr_t)itemList);\n}\n\nvoid ScintillaEdit::autoCSetAutoHide(bool autoHide) {\n    send(SCI_AUTOCSETAUTOHIDE, autoHide, 0);\n}\n\nbool ScintillaEdit::autoCAutoHide() const {\n    return send(SCI_AUTOCGETAUTOHIDE, 0, 0);\n}\n\nvoid ScintillaEdit::autoCSetOptions(sptr_t options) {\n    send(SCI_AUTOCSETOPTIONS, options, 0);\n}\n\nsptr_t ScintillaEdit::autoCOptions() const {\n    return send(SCI_AUTOCGETOPTIONS, 0, 0);\n}\n\nvoid ScintillaEdit::autoCSetDropRestOfWord(bool dropRestOfWord) {\n    send(SCI_AUTOCSETDROPRESTOFWORD, dropRestOfWord, 0);\n}\n\nbool ScintillaEdit::autoCDropRestOfWord() const {\n    return send(SCI_AUTOCGETDROPRESTOFWORD, 0, 0);\n}\n\nvoid ScintillaEdit::registerImage(sptr_t type, const char * xpmData) {\n    send(SCI_REGISTERIMAGE, type, (sptr_t)xpmData);\n}\n\nvoid ScintillaEdit::clearRegisteredImages() {\n    send(SCI_CLEARREGISTEREDIMAGES, 0, 0);\n}\n\nsptr_t ScintillaEdit::autoCTypeSeparator() const {\n    return send(SCI_AUTOCGETTYPESEPARATOR, 0, 0);\n}\n\nvoid ScintillaEdit::autoCSetTypeSeparator(sptr_t separatorCharacter) {\n    send(SCI_AUTOCSETTYPESEPARATOR, separatorCharacter, 0);\n}\n\nvoid ScintillaEdit::autoCSetMaxWidth(sptr_t characterCount) {\n    send(SCI_AUTOCSETMAXWIDTH, characterCount, 0);\n}\n\nsptr_t ScintillaEdit::autoCMaxWidth() const {\n    return send(SCI_AUTOCGETMAXWIDTH, 0, 0);\n}\n\nvoid ScintillaEdit::autoCSetMaxHeight(sptr_t rowCount) {\n    send(SCI_AUTOCSETMAXHEIGHT, rowCount, 0);\n}\n\nsptr_t ScintillaEdit::autoCMaxHeight() const {\n    return send(SCI_AUTOCGETMAXHEIGHT, 0, 0);\n}\n\nvoid ScintillaEdit::setIndent(sptr_t indentSize) {\n    send(SCI_SETINDENT, indentSize, 0);\n}\n\nsptr_t ScintillaEdit::indent() const {\n    return send(SCI_GETINDENT, 0, 0);\n}\n\nvoid ScintillaEdit::setUseTabs(bool useTabs) {\n    send(SCI_SETUSETABS, useTabs, 0);\n}\n\nbool ScintillaEdit::useTabs() const {\n    return send(SCI_GETUSETABS, 0, 0);\n}\n\nvoid ScintillaEdit::setLineIndentation(sptr_t line, sptr_t indentation) {\n    send(SCI_SETLINEINDENTATION, line, indentation);\n}\n\nsptr_t ScintillaEdit::lineIndentation(sptr_t line) const {\n    return send(SCI_GETLINEINDENTATION, line, 0);\n}\n\nsptr_t ScintillaEdit::lineIndentPosition(sptr_t line) const {\n    return send(SCI_GETLINEINDENTPOSITION, line, 0);\n}\n\nsptr_t ScintillaEdit::column(sptr_t pos) const {\n    return send(SCI_GETCOLUMN, pos, 0);\n}\n\nsptr_t ScintillaEdit::countCharacters(sptr_t start, sptr_t end) {\n    return send(SCI_COUNTCHARACTERS, start, end);\n}\n\nsptr_t ScintillaEdit::countCodeUnits(sptr_t start, sptr_t end) {\n    return send(SCI_COUNTCODEUNITS, start, end);\n}\n\nvoid ScintillaEdit::setHScrollBar(bool visible) {\n    send(SCI_SETHSCROLLBAR, visible, 0);\n}\n\nbool ScintillaEdit::hScrollBar() const {\n    return send(SCI_GETHSCROLLBAR, 0, 0);\n}\n\nvoid ScintillaEdit::setIndentationGuides(sptr_t indentView) {\n    send(SCI_SETINDENTATIONGUIDES, indentView, 0);\n}\n\nsptr_t ScintillaEdit::indentationGuides() const {\n    return send(SCI_GETINDENTATIONGUIDES, 0, 0);\n}\n\nvoid ScintillaEdit::setHighlightGuide(sptr_t column) {\n    send(SCI_SETHIGHLIGHTGUIDE, column, 0);\n}\n\nsptr_t ScintillaEdit::highlightGuide() const {\n    return send(SCI_GETHIGHLIGHTGUIDE, 0, 0);\n}\n\nsptr_t ScintillaEdit::lineEndPosition(sptr_t line) const {\n    return send(SCI_GETLINEENDPOSITION, line, 0);\n}\n\nsptr_t ScintillaEdit::codePage() const {\n    return send(SCI_GETCODEPAGE, 0, 0);\n}\n\nsptr_t ScintillaEdit::caretFore() const {\n    return send(SCI_GETCARETFORE, 0, 0);\n}\n\nbool ScintillaEdit::readOnly() const {\n    return send(SCI_GETREADONLY, 0, 0);\n}\n\nvoid ScintillaEdit::setCurrentPos(sptr_t caret) {\n    send(SCI_SETCURRENTPOS, caret, 0);\n}\n\nvoid ScintillaEdit::setSelectionStart(sptr_t anchor) {\n    send(SCI_SETSELECTIONSTART, anchor, 0);\n}\n\nsptr_t ScintillaEdit::selectionStart() const {\n    return send(SCI_GETSELECTIONSTART, 0, 0);\n}\n\nvoid ScintillaEdit::setSelectionEnd(sptr_t caret) {\n    send(SCI_SETSELECTIONEND, caret, 0);\n}\n\nsptr_t ScintillaEdit::selectionEnd() const {\n    return send(SCI_GETSELECTIONEND, 0, 0);\n}\n\nvoid ScintillaEdit::setEmptySelection(sptr_t caret) {\n    send(SCI_SETEMPTYSELECTION, caret, 0);\n}\n\nvoid ScintillaEdit::setPrintMagnification(sptr_t magnification) {\n    send(SCI_SETPRINTMAGNIFICATION, magnification, 0);\n}\n\nsptr_t ScintillaEdit::printMagnification() const {\n    return send(SCI_GETPRINTMAGNIFICATION, 0, 0);\n}\n\nvoid ScintillaEdit::setPrintColourMode(sptr_t mode) {\n    send(SCI_SETPRINTCOLOURMODE, mode, 0);\n}\n\nsptr_t ScintillaEdit::printColourMode() const {\n    return send(SCI_GETPRINTCOLOURMODE, 0, 0);\n}\n\nvoid ScintillaEdit::setChangeHistory(sptr_t changeHistory) {\n    send(SCI_SETCHANGEHISTORY, changeHistory, 0);\n}\n\nsptr_t ScintillaEdit::changeHistory() const {\n    return send(SCI_GETCHANGEHISTORY, 0, 0);\n}\n\nsptr_t ScintillaEdit::firstVisibleLine() const {\n    return send(SCI_GETFIRSTVISIBLELINE, 0, 0);\n}\n\nQByteArray ScintillaEdit::getLine(sptr_t line) {\n    return TextReturner(SCI_GETLINE, line);\n}\n\nsptr_t ScintillaEdit::lineCount() const {\n    return send(SCI_GETLINECOUNT, 0, 0);\n}\n\nvoid ScintillaEdit::allocateLines(sptr_t lines) {\n    send(SCI_ALLOCATELINES, lines, 0);\n}\n\nvoid ScintillaEdit::setMarginLeft(sptr_t pixelWidth) {\n    send(SCI_SETMARGINLEFT, 0, pixelWidth);\n}\n\nsptr_t ScintillaEdit::marginLeft() const {\n    return send(SCI_GETMARGINLEFT, 0, 0);\n}\n\nvoid ScintillaEdit::setMarginRight(sptr_t pixelWidth) {\n    send(SCI_SETMARGINRIGHT, 0, pixelWidth);\n}\n\nsptr_t ScintillaEdit::marginRight() const {\n    return send(SCI_GETMARGINRIGHT, 0, 0);\n}\n\nbool ScintillaEdit::modify() const {\n    return send(SCI_GETMODIFY, 0, 0);\n}\n\nvoid ScintillaEdit::setSel(sptr_t anchor, sptr_t caret) {\n    send(SCI_SETSEL, anchor, caret);\n}\n\nQByteArray ScintillaEdit::getSelText() {\n    return TextReturner(SCI_GETSELTEXT, 0);\n}\n\nvoid ScintillaEdit::hideSelection(bool hide) {\n    send(SCI_HIDESELECTION, hide, 0);\n}\n\nbool ScintillaEdit::selectionHidden() const {\n    return send(SCI_GETSELECTIONHIDDEN, 0, 0);\n}\n\nsptr_t ScintillaEdit::pointXFromPosition(sptr_t pos) {\n    return send(SCI_POINTXFROMPOSITION, 0, pos);\n}\n\nsptr_t ScintillaEdit::pointYFromPosition(sptr_t pos) {\n    return send(SCI_POINTYFROMPOSITION, 0, pos);\n}\n\nsptr_t ScintillaEdit::lineFromPosition(sptr_t pos) {\n    return send(SCI_LINEFROMPOSITION, pos, 0);\n}\n\nsptr_t ScintillaEdit::positionFromLine(sptr_t line) {\n    return send(SCI_POSITIONFROMLINE, line, 0);\n}\n\nvoid ScintillaEdit::lineScroll(sptr_t columns, sptr_t lines) {\n    send(SCI_LINESCROLL, columns, lines);\n}\n\nvoid ScintillaEdit::scrollCaret() {\n    send(SCI_SCROLLCARET, 0, 0);\n}\n\nvoid ScintillaEdit::scrollRange(sptr_t secondary, sptr_t primary) {\n    send(SCI_SCROLLRANGE, secondary, primary);\n}\n\nvoid ScintillaEdit::replaceSel(const char * text) {\n    send(SCI_REPLACESEL, 0, (sptr_t)text);\n}\n\nvoid ScintillaEdit::setReadOnly(bool readOnly) {\n    send(SCI_SETREADONLY, readOnly, 0);\n}\n\nvoid ScintillaEdit::null() {\n    send(SCI_NULL, 0, 0);\n}\n\nbool ScintillaEdit::canPaste() {\n    return send(SCI_CANPASTE, 0, 0);\n}\n\nbool ScintillaEdit::canUndo() {\n    return send(SCI_CANUNDO, 0, 0);\n}\n\nvoid ScintillaEdit::emptyUndoBuffer() {\n    send(SCI_EMPTYUNDOBUFFER, 0, 0);\n}\n\nvoid ScintillaEdit::undo() {\n    send(SCI_UNDO, 0, 0);\n}\n\nvoid ScintillaEdit::cut() {\n    send(SCI_CUT, 0, 0);\n}\n\nvoid ScintillaEdit::copy() {\n    send(SCI_COPY, 0, 0);\n}\n\nvoid ScintillaEdit::paste() {\n    send(SCI_PASTE, 0, 0);\n}\n\nvoid ScintillaEdit::clear() {\n    send(SCI_CLEAR, 0, 0);\n}\n\nvoid ScintillaEdit::setText(const char * text) {\n    send(SCI_SETTEXT, 0, (sptr_t)text);\n}\n\nQByteArray ScintillaEdit::getText(sptr_t length) {\n    return TextReturner(SCI_GETTEXT, length);\n}\n\nsptr_t ScintillaEdit::textLength() const {\n    return send(SCI_GETTEXTLENGTH, 0, 0);\n}\n\nsptr_t ScintillaEdit::directFunction() const {\n    return send(SCI_GETDIRECTFUNCTION, 0, 0);\n}\n\nsptr_t ScintillaEdit::directStatusFunction() const {\n    return send(SCI_GETDIRECTSTATUSFUNCTION, 0, 0);\n}\n\nsptr_t ScintillaEdit::directPointer() const {\n    return send(SCI_GETDIRECTPOINTER, 0, 0);\n}\n\nvoid ScintillaEdit::setOvertype(bool overType) {\n    send(SCI_SETOVERTYPE, overType, 0);\n}\n\nbool ScintillaEdit::overtype() const {\n    return send(SCI_GETOVERTYPE, 0, 0);\n}\n\nvoid ScintillaEdit::setCaretWidth(sptr_t pixelWidth) {\n    send(SCI_SETCARETWIDTH, pixelWidth, 0);\n}\n\nsptr_t ScintillaEdit::caretWidth() const {\n    return send(SCI_GETCARETWIDTH, 0, 0);\n}\n\nvoid ScintillaEdit::setTargetStart(sptr_t start) {\n    send(SCI_SETTARGETSTART, start, 0);\n}\n\nsptr_t ScintillaEdit::targetStart() const {\n    return send(SCI_GETTARGETSTART, 0, 0);\n}\n\nvoid ScintillaEdit::setTargetStartVirtualSpace(sptr_t space) {\n    send(SCI_SETTARGETSTARTVIRTUALSPACE, space, 0);\n}\n\nsptr_t ScintillaEdit::targetStartVirtualSpace() const {\n    return send(SCI_GETTARGETSTARTVIRTUALSPACE, 0, 0);\n}\n\nvoid ScintillaEdit::setTargetEnd(sptr_t end) {\n    send(SCI_SETTARGETEND, end, 0);\n}\n\nsptr_t ScintillaEdit::targetEnd() const {\n    return send(SCI_GETTARGETEND, 0, 0);\n}\n\nvoid ScintillaEdit::setTargetEndVirtualSpace(sptr_t space) {\n    send(SCI_SETTARGETENDVIRTUALSPACE, space, 0);\n}\n\nsptr_t ScintillaEdit::targetEndVirtualSpace() const {\n    return send(SCI_GETTARGETENDVIRTUALSPACE, 0, 0);\n}\n\nvoid ScintillaEdit::setTargetRange(sptr_t start, sptr_t end) {\n    send(SCI_SETTARGETRANGE, start, end);\n}\n\nQByteArray ScintillaEdit::targetText() const {\n    return TextReturner(SCI_GETTARGETTEXT, 0);\n}\n\nvoid ScintillaEdit::targetFromSelection() {\n    send(SCI_TARGETFROMSELECTION, 0, 0);\n}\n\nvoid ScintillaEdit::targetWholeDocument() {\n    send(SCI_TARGETWHOLEDOCUMENT, 0, 0);\n}\n\nsptr_t ScintillaEdit::replaceTarget(sptr_t length, const char * text) {\n    return send(SCI_REPLACETARGET, length, (sptr_t)text);\n}\n\nsptr_t ScintillaEdit::replaceTargetRE(sptr_t length, const char * text) {\n    return send(SCI_REPLACETARGETRE, length, (sptr_t)text);\n}\n\nsptr_t ScintillaEdit::replaceTargetMinimal(sptr_t length, const char * text) {\n    return send(SCI_REPLACETARGETMINIMAL, length, (sptr_t)text);\n}\n\nsptr_t ScintillaEdit::searchInTarget(sptr_t length, const char * text) {\n    return send(SCI_SEARCHINTARGET, length, (sptr_t)text);\n}\n\nvoid ScintillaEdit::setSearchFlags(sptr_t searchFlags) {\n    send(SCI_SETSEARCHFLAGS, searchFlags, 0);\n}\n\nsptr_t ScintillaEdit::searchFlags() const {\n    return send(SCI_GETSEARCHFLAGS, 0, 0);\n}\n\nvoid ScintillaEdit::callTipShow(sptr_t pos, const char * definition) {\n    send(SCI_CALLTIPSHOW, pos, (sptr_t)definition);\n}\n\nvoid ScintillaEdit::callTipCancel() {\n    send(SCI_CALLTIPCANCEL, 0, 0);\n}\n\nbool ScintillaEdit::callTipActive() {\n    return send(SCI_CALLTIPACTIVE, 0, 0);\n}\n\nsptr_t ScintillaEdit::callTipPosStart() {\n    return send(SCI_CALLTIPPOSSTART, 0, 0);\n}\n\nvoid ScintillaEdit::callTipSetPosStart(sptr_t posStart) {\n    send(SCI_CALLTIPSETPOSSTART, posStart, 0);\n}\n\nvoid ScintillaEdit::callTipSetHlt(sptr_t highlightStart, sptr_t highlightEnd) {\n    send(SCI_CALLTIPSETHLT, highlightStart, highlightEnd);\n}\n\nvoid ScintillaEdit::callTipSetBack(sptr_t back) {\n    send(SCI_CALLTIPSETBACK, back, 0);\n}\n\nvoid ScintillaEdit::callTipSetFore(sptr_t fore) {\n    send(SCI_CALLTIPSETFORE, fore, 0);\n}\n\nvoid ScintillaEdit::callTipSetForeHlt(sptr_t fore) {\n    send(SCI_CALLTIPSETFOREHLT, fore, 0);\n}\n\nvoid ScintillaEdit::callTipUseStyle(sptr_t tabSize) {\n    send(SCI_CALLTIPUSESTYLE, tabSize, 0);\n}\n\nvoid ScintillaEdit::callTipSetPosition(bool above) {\n    send(SCI_CALLTIPSETPOSITION, above, 0);\n}\n\nsptr_t ScintillaEdit::visibleFromDocLine(sptr_t docLine) {\n    return send(SCI_VISIBLEFROMDOCLINE, docLine, 0);\n}\n\nsptr_t ScintillaEdit::docLineFromVisible(sptr_t displayLine) {\n    return send(SCI_DOCLINEFROMVISIBLE, displayLine, 0);\n}\n\nsptr_t ScintillaEdit::wrapCount(sptr_t docLine) {\n    return send(SCI_WRAPCOUNT, docLine, 0);\n}\n\nvoid ScintillaEdit::setFoldLevel(sptr_t line, sptr_t level) {\n    send(SCI_SETFOLDLEVEL, line, level);\n}\n\nsptr_t ScintillaEdit::foldLevel(sptr_t line) const {\n    return send(SCI_GETFOLDLEVEL, line, 0);\n}\n\nsptr_t ScintillaEdit::lastChild(sptr_t line, sptr_t level) const {\n    return send(SCI_GETLASTCHILD, line, level);\n}\n\nsptr_t ScintillaEdit::foldParent(sptr_t line) const {\n    return send(SCI_GETFOLDPARENT, line, 0);\n}\n\nvoid ScintillaEdit::showLines(sptr_t lineStart, sptr_t lineEnd) {\n    send(SCI_SHOWLINES, lineStart, lineEnd);\n}\n\nvoid ScintillaEdit::hideLines(sptr_t lineStart, sptr_t lineEnd) {\n    send(SCI_HIDELINES, lineStart, lineEnd);\n}\n\nbool ScintillaEdit::lineVisible(sptr_t line) const {\n    return send(SCI_GETLINEVISIBLE, line, 0);\n}\n\nbool ScintillaEdit::allLinesVisible() const {\n    return send(SCI_GETALLLINESVISIBLE, 0, 0);\n}\n\nvoid ScintillaEdit::setFoldExpanded(sptr_t line, bool expanded) {\n    send(SCI_SETFOLDEXPANDED, line, expanded);\n}\n\nbool ScintillaEdit::foldExpanded(sptr_t line) const {\n    return send(SCI_GETFOLDEXPANDED, line, 0);\n}\n\nvoid ScintillaEdit::toggleFold(sptr_t line) {\n    send(SCI_TOGGLEFOLD, line, 0);\n}\n\nvoid ScintillaEdit::toggleFoldShowText(sptr_t line, const char * text) {\n    send(SCI_TOGGLEFOLDSHOWTEXT, line, (sptr_t)text);\n}\n\nvoid ScintillaEdit::foldDisplayTextSetStyle(sptr_t style) {\n    send(SCI_FOLDDISPLAYTEXTSETSTYLE, style, 0);\n}\n\nsptr_t ScintillaEdit::foldDisplayTextStyle() const {\n    return send(SCI_FOLDDISPLAYTEXTGETSTYLE, 0, 0);\n}\n\nvoid ScintillaEdit::setDefaultFoldDisplayText(const char * text) {\n    send(SCI_SETDEFAULTFOLDDISPLAYTEXT, 0, (sptr_t)text);\n}\n\nQByteArray ScintillaEdit::getDefaultFoldDisplayText() {\n    return TextReturner(SCI_GETDEFAULTFOLDDISPLAYTEXT, 0);\n}\n\nvoid ScintillaEdit::foldLine(sptr_t line, sptr_t action) {\n    send(SCI_FOLDLINE, line, action);\n}\n\nvoid ScintillaEdit::foldChildren(sptr_t line, sptr_t action) {\n    send(SCI_FOLDCHILDREN, line, action);\n}\n\nvoid ScintillaEdit::expandChildren(sptr_t line, sptr_t level) {\n    send(SCI_EXPANDCHILDREN, line, level);\n}\n\nvoid ScintillaEdit::foldAll(sptr_t action) {\n    send(SCI_FOLDALL, action, 0);\n}\n\nvoid ScintillaEdit::ensureVisible(sptr_t line) {\n    send(SCI_ENSUREVISIBLE, line, 0);\n}\n\nvoid ScintillaEdit::setAutomaticFold(sptr_t automaticFold) {\n    send(SCI_SETAUTOMATICFOLD, automaticFold, 0);\n}\n\nsptr_t ScintillaEdit::automaticFold() const {\n    return send(SCI_GETAUTOMATICFOLD, 0, 0);\n}\n\nvoid ScintillaEdit::setFoldFlags(sptr_t flags) {\n    send(SCI_SETFOLDFLAGS, flags, 0);\n}\n\nvoid ScintillaEdit::ensureVisibleEnforcePolicy(sptr_t line) {\n    send(SCI_ENSUREVISIBLEENFORCEPOLICY, line, 0);\n}\n\nvoid ScintillaEdit::setTabIndents(bool tabIndents) {\n    send(SCI_SETTABINDENTS, tabIndents, 0);\n}\n\nbool ScintillaEdit::tabIndents() const {\n    return send(SCI_GETTABINDENTS, 0, 0);\n}\n\nvoid ScintillaEdit::setBackSpaceUnIndents(bool bsUnIndents) {\n    send(SCI_SETBACKSPACEUNINDENTS, bsUnIndents, 0);\n}\n\nbool ScintillaEdit::backSpaceUnIndents() const {\n    return send(SCI_GETBACKSPACEUNINDENTS, 0, 0);\n}\n\nvoid ScintillaEdit::setMouseDwellTime(sptr_t periodMilliseconds) {\n    send(SCI_SETMOUSEDWELLTIME, periodMilliseconds, 0);\n}\n\nsptr_t ScintillaEdit::mouseDwellTime() const {\n    return send(SCI_GETMOUSEDWELLTIME, 0, 0);\n}\n\nsptr_t ScintillaEdit::wordStartPosition(sptr_t pos, bool onlyWordCharacters) {\n    return send(SCI_WORDSTARTPOSITION, pos, onlyWordCharacters);\n}\n\nsptr_t ScintillaEdit::wordEndPosition(sptr_t pos, bool onlyWordCharacters) {\n    return send(SCI_WORDENDPOSITION, pos, onlyWordCharacters);\n}\n\nbool ScintillaEdit::isRangeWord(sptr_t start, sptr_t end) {\n    return send(SCI_ISRANGEWORD, start, end);\n}\n\nvoid ScintillaEdit::setIdleStyling(sptr_t idleStyling) {\n    send(SCI_SETIDLESTYLING, idleStyling, 0);\n}\n\nsptr_t ScintillaEdit::idleStyling() const {\n    return send(SCI_GETIDLESTYLING, 0, 0);\n}\n\nvoid ScintillaEdit::setWrapMode(sptr_t wrapMode) {\n    send(SCI_SETWRAPMODE, wrapMode, 0);\n}\n\nsptr_t ScintillaEdit::wrapMode() const {\n    return send(SCI_GETWRAPMODE, 0, 0);\n}\n\nvoid ScintillaEdit::setWrapVisualFlags(sptr_t wrapVisualFlags) {\n    send(SCI_SETWRAPVISUALFLAGS, wrapVisualFlags, 0);\n}\n\nsptr_t ScintillaEdit::wrapVisualFlags() const {\n    return send(SCI_GETWRAPVISUALFLAGS, 0, 0);\n}\n\nvoid ScintillaEdit::setWrapVisualFlagsLocation(sptr_t wrapVisualFlagsLocation) {\n    send(SCI_SETWRAPVISUALFLAGSLOCATION, wrapVisualFlagsLocation, 0);\n}\n\nsptr_t ScintillaEdit::wrapVisualFlagsLocation() const {\n    return send(SCI_GETWRAPVISUALFLAGSLOCATION, 0, 0);\n}\n\nvoid ScintillaEdit::setWrapStartIndent(sptr_t indent) {\n    send(SCI_SETWRAPSTARTINDENT, indent, 0);\n}\n\nsptr_t ScintillaEdit::wrapStartIndent() const {\n    return send(SCI_GETWRAPSTARTINDENT, 0, 0);\n}\n\nvoid ScintillaEdit::setWrapIndentMode(sptr_t wrapIndentMode) {\n    send(SCI_SETWRAPINDENTMODE, wrapIndentMode, 0);\n}\n\nsptr_t ScintillaEdit::wrapIndentMode() const {\n    return send(SCI_GETWRAPINDENTMODE, 0, 0);\n}\n\nvoid ScintillaEdit::setLayoutCache(sptr_t cacheMode) {\n    send(SCI_SETLAYOUTCACHE, cacheMode, 0);\n}\n\nsptr_t ScintillaEdit::layoutCache() const {\n    return send(SCI_GETLAYOUTCACHE, 0, 0);\n}\n\nvoid ScintillaEdit::setScrollWidth(sptr_t pixelWidth) {\n    send(SCI_SETSCROLLWIDTH, pixelWidth, 0);\n}\n\nsptr_t ScintillaEdit::scrollWidth() const {\n    return send(SCI_GETSCROLLWIDTH, 0, 0);\n}\n\nvoid ScintillaEdit::setScrollWidthTracking(bool tracking) {\n    send(SCI_SETSCROLLWIDTHTRACKING, tracking, 0);\n}\n\nbool ScintillaEdit::scrollWidthTracking() const {\n    return send(SCI_GETSCROLLWIDTHTRACKING, 0, 0);\n}\n\nsptr_t ScintillaEdit::textWidth(sptr_t style, const char * text) {\n    return send(SCI_TEXTWIDTH, style, (sptr_t)text);\n}\n\nvoid ScintillaEdit::setEndAtLastLine(bool endAtLastLine) {\n    send(SCI_SETENDATLASTLINE, endAtLastLine, 0);\n}\n\nbool ScintillaEdit::endAtLastLine() const {\n    return send(SCI_GETENDATLASTLINE, 0, 0);\n}\n\nsptr_t ScintillaEdit::textHeight(sptr_t line) {\n    return send(SCI_TEXTHEIGHT, line, 0);\n}\n\nvoid ScintillaEdit::setVScrollBar(bool visible) {\n    send(SCI_SETVSCROLLBAR, visible, 0);\n}\n\nbool ScintillaEdit::vScrollBar() const {\n    return send(SCI_GETVSCROLLBAR, 0, 0);\n}\n\nvoid ScintillaEdit::appendText(sptr_t length, const char * text) {\n    send(SCI_APPENDTEXT, length, (sptr_t)text);\n}\n\nsptr_t ScintillaEdit::phasesDraw() const {\n    return send(SCI_GETPHASESDRAW, 0, 0);\n}\n\nvoid ScintillaEdit::setPhasesDraw(sptr_t phases) {\n    send(SCI_SETPHASESDRAW, phases, 0);\n}\n\nvoid ScintillaEdit::setFontQuality(sptr_t fontQuality) {\n    send(SCI_SETFONTQUALITY, fontQuality, 0);\n}\n\nsptr_t ScintillaEdit::fontQuality() const {\n    return send(SCI_GETFONTQUALITY, 0, 0);\n}\n\nvoid ScintillaEdit::setFirstVisibleLine(sptr_t displayLine) {\n    send(SCI_SETFIRSTVISIBLELINE, displayLine, 0);\n}\n\nvoid ScintillaEdit::setMultiPaste(sptr_t multiPaste) {\n    send(SCI_SETMULTIPASTE, multiPaste, 0);\n}\n\nsptr_t ScintillaEdit::multiPaste() const {\n    return send(SCI_GETMULTIPASTE, 0, 0);\n}\n\nQByteArray ScintillaEdit::tag(sptr_t tagNumber) const {\n    return TextReturner(SCI_GETTAG, tagNumber);\n}\n\nvoid ScintillaEdit::linesJoin() {\n    send(SCI_LINESJOIN, 0, 0);\n}\n\nvoid ScintillaEdit::linesSplit(sptr_t pixelWidth) {\n    send(SCI_LINESSPLIT, pixelWidth, 0);\n}\n\nvoid ScintillaEdit::setFoldMarginColour(bool useSetting, sptr_t back) {\n    send(SCI_SETFOLDMARGINCOLOUR, useSetting, back);\n}\n\nvoid ScintillaEdit::setFoldMarginHiColour(bool useSetting, sptr_t fore) {\n    send(SCI_SETFOLDMARGINHICOLOUR, useSetting, fore);\n}\n\nvoid ScintillaEdit::setAccessibility(sptr_t accessibility) {\n    send(SCI_SETACCESSIBILITY, accessibility, 0);\n}\n\nsptr_t ScintillaEdit::accessibility() const {\n    return send(SCI_GETACCESSIBILITY, 0, 0);\n}\n\nvoid ScintillaEdit::lineDown() {\n    send(SCI_LINEDOWN, 0, 0);\n}\n\nvoid ScintillaEdit::lineDownExtend() {\n    send(SCI_LINEDOWNEXTEND, 0, 0);\n}\n\nvoid ScintillaEdit::lineUp() {\n    send(SCI_LINEUP, 0, 0);\n}\n\nvoid ScintillaEdit::lineUpExtend() {\n    send(SCI_LINEUPEXTEND, 0, 0);\n}\n\nvoid ScintillaEdit::charLeft() {\n    send(SCI_CHARLEFT, 0, 0);\n}\n\nvoid ScintillaEdit::charLeftExtend() {\n    send(SCI_CHARLEFTEXTEND, 0, 0);\n}\n\nvoid ScintillaEdit::charRight() {\n    send(SCI_CHARRIGHT, 0, 0);\n}\n\nvoid ScintillaEdit::charRightExtend() {\n    send(SCI_CHARRIGHTEXTEND, 0, 0);\n}\n\nvoid ScintillaEdit::wordLeft() {\n    send(SCI_WORDLEFT, 0, 0);\n}\n\nvoid ScintillaEdit::wordLeftExtend() {\n    send(SCI_WORDLEFTEXTEND, 0, 0);\n}\n\nvoid ScintillaEdit::wordRight() {\n    send(SCI_WORDRIGHT, 0, 0);\n}\n\nvoid ScintillaEdit::wordRightExtend() {\n    send(SCI_WORDRIGHTEXTEND, 0, 0);\n}\n\nvoid ScintillaEdit::home() {\n    send(SCI_HOME, 0, 0);\n}\n\nvoid ScintillaEdit::homeExtend() {\n    send(SCI_HOMEEXTEND, 0, 0);\n}\n\nvoid ScintillaEdit::lineEnd() {\n    send(SCI_LINEEND, 0, 0);\n}\n\nvoid ScintillaEdit::lineEndExtend() {\n    send(SCI_LINEENDEXTEND, 0, 0);\n}\n\nvoid ScintillaEdit::documentStart() {\n    send(SCI_DOCUMENTSTART, 0, 0);\n}\n\nvoid ScintillaEdit::documentStartExtend() {\n    send(SCI_DOCUMENTSTARTEXTEND, 0, 0);\n}\n\nvoid ScintillaEdit::documentEnd() {\n    send(SCI_DOCUMENTEND, 0, 0);\n}\n\nvoid ScintillaEdit::documentEndExtend() {\n    send(SCI_DOCUMENTENDEXTEND, 0, 0);\n}\n\nvoid ScintillaEdit::pageUp() {\n    send(SCI_PAGEUP, 0, 0);\n}\n\nvoid ScintillaEdit::pageUpExtend() {\n    send(SCI_PAGEUPEXTEND, 0, 0);\n}\n\nvoid ScintillaEdit::pageDown() {\n    send(SCI_PAGEDOWN, 0, 0);\n}\n\nvoid ScintillaEdit::pageDownExtend() {\n    send(SCI_PAGEDOWNEXTEND, 0, 0);\n}\n\nvoid ScintillaEdit::editToggleOvertype() {\n    send(SCI_EDITTOGGLEOVERTYPE, 0, 0);\n}\n\nvoid ScintillaEdit::cancel() {\n    send(SCI_CANCEL, 0, 0);\n}\n\nvoid ScintillaEdit::deleteBack() {\n    send(SCI_DELETEBACK, 0, 0);\n}\n\nvoid ScintillaEdit::tab() {\n    send(SCI_TAB, 0, 0);\n}\n\nvoid ScintillaEdit::backTab() {\n    send(SCI_BACKTAB, 0, 0);\n}\n\nvoid ScintillaEdit::newLine() {\n    send(SCI_NEWLINE, 0, 0);\n}\n\nvoid ScintillaEdit::formFeed() {\n    send(SCI_FORMFEED, 0, 0);\n}\n\nvoid ScintillaEdit::vCHome() {\n    send(SCI_VCHOME, 0, 0);\n}\n\nvoid ScintillaEdit::vCHomeExtend() {\n    send(SCI_VCHOMEEXTEND, 0, 0);\n}\n\nvoid ScintillaEdit::zoomIn() {\n    send(SCI_ZOOMIN, 0, 0);\n}\n\nvoid ScintillaEdit::zoomOut() {\n    send(SCI_ZOOMOUT, 0, 0);\n}\n\nvoid ScintillaEdit::delWordLeft() {\n    send(SCI_DELWORDLEFT, 0, 0);\n}\n\nvoid ScintillaEdit::delWordRight() {\n    send(SCI_DELWORDRIGHT, 0, 0);\n}\n\nvoid ScintillaEdit::delWordRightEnd() {\n    send(SCI_DELWORDRIGHTEND, 0, 0);\n}\n\nvoid ScintillaEdit::lineCut() {\n    send(SCI_LINECUT, 0, 0);\n}\n\nvoid ScintillaEdit::lineDelete() {\n    send(SCI_LINEDELETE, 0, 0);\n}\n\nvoid ScintillaEdit::lineTranspose() {\n    send(SCI_LINETRANSPOSE, 0, 0);\n}\n\nvoid ScintillaEdit::lineReverse() {\n    send(SCI_LINEREVERSE, 0, 0);\n}\n\nvoid ScintillaEdit::lineDuplicate() {\n    send(SCI_LINEDUPLICATE, 0, 0);\n}\n\nvoid ScintillaEdit::lowerCase() {\n    send(SCI_LOWERCASE, 0, 0);\n}\n\nvoid ScintillaEdit::upperCase() {\n    send(SCI_UPPERCASE, 0, 0);\n}\n\nvoid ScintillaEdit::lineScrollDown() {\n    send(SCI_LINESCROLLDOWN, 0, 0);\n}\n\nvoid ScintillaEdit::lineScrollUp() {\n    send(SCI_LINESCROLLUP, 0, 0);\n}\n\nvoid ScintillaEdit::deleteBackNotLine() {\n    send(SCI_DELETEBACKNOTLINE, 0, 0);\n}\n\nvoid ScintillaEdit::homeDisplay() {\n    send(SCI_HOMEDISPLAY, 0, 0);\n}\n\nvoid ScintillaEdit::homeDisplayExtend() {\n    send(SCI_HOMEDISPLAYEXTEND, 0, 0);\n}\n\nvoid ScintillaEdit::lineEndDisplay() {\n    send(SCI_LINEENDDISPLAY, 0, 0);\n}\n\nvoid ScintillaEdit::lineEndDisplayExtend() {\n    send(SCI_LINEENDDISPLAYEXTEND, 0, 0);\n}\n\nvoid ScintillaEdit::homeWrap() {\n    send(SCI_HOMEWRAP, 0, 0);\n}\n\nvoid ScintillaEdit::homeWrapExtend() {\n    send(SCI_HOMEWRAPEXTEND, 0, 0);\n}\n\nvoid ScintillaEdit::lineEndWrap() {\n    send(SCI_LINEENDWRAP, 0, 0);\n}\n\nvoid ScintillaEdit::lineEndWrapExtend() {\n    send(SCI_LINEENDWRAPEXTEND, 0, 0);\n}\n\nvoid ScintillaEdit::vCHomeWrap() {\n    send(SCI_VCHOMEWRAP, 0, 0);\n}\n\nvoid ScintillaEdit::vCHomeWrapExtend() {\n    send(SCI_VCHOMEWRAPEXTEND, 0, 0);\n}\n\nvoid ScintillaEdit::lineCopy() {\n    send(SCI_LINECOPY, 0, 0);\n}\n\nvoid ScintillaEdit::moveCaretInsideView() {\n    send(SCI_MOVECARETINSIDEVIEW, 0, 0);\n}\n\nsptr_t ScintillaEdit::lineLength(sptr_t line) {\n    return send(SCI_LINELENGTH, line, 0);\n}\n\nvoid ScintillaEdit::braceHighlight(sptr_t posA, sptr_t posB) {\n    send(SCI_BRACEHIGHLIGHT, posA, posB);\n}\n\nvoid ScintillaEdit::braceHighlightIndicator(bool useSetting, sptr_t indicator) {\n    send(SCI_BRACEHIGHLIGHTINDICATOR, useSetting, indicator);\n}\n\nvoid ScintillaEdit::braceBadLight(sptr_t pos) {\n    send(SCI_BRACEBADLIGHT, pos, 0);\n}\n\nvoid ScintillaEdit::braceBadLightIndicator(bool useSetting, sptr_t indicator) {\n    send(SCI_BRACEBADLIGHTINDICATOR, useSetting, indicator);\n}\n\nsptr_t ScintillaEdit::braceMatch(sptr_t pos, sptr_t maxReStyle) {\n    return send(SCI_BRACEMATCH, pos, maxReStyle);\n}\n\nsptr_t ScintillaEdit::braceMatchNext(sptr_t pos, sptr_t startPos) {\n    return send(SCI_BRACEMATCHNEXT, pos, startPos);\n}\n\nbool ScintillaEdit::viewEOL() const {\n    return send(SCI_GETVIEWEOL, 0, 0);\n}\n\nvoid ScintillaEdit::setViewEOL(bool visible) {\n    send(SCI_SETVIEWEOL, visible, 0);\n}\n\nsptr_t ScintillaEdit::docPointer() const {\n    return send(SCI_GETDOCPOINTER, 0, 0);\n}\n\nvoid ScintillaEdit::setDocPointer(sptr_t doc) {\n    send(SCI_SETDOCPOINTER, 0, doc);\n}\n\nvoid ScintillaEdit::setModEventMask(sptr_t eventMask) {\n    send(SCI_SETMODEVENTMASK, eventMask, 0);\n}\n\nsptr_t ScintillaEdit::edgeColumn() const {\n    return send(SCI_GETEDGECOLUMN, 0, 0);\n}\n\nvoid ScintillaEdit::setEdgeColumn(sptr_t column) {\n    send(SCI_SETEDGECOLUMN, column, 0);\n}\n\nsptr_t ScintillaEdit::edgeMode() const {\n    return send(SCI_GETEDGEMODE, 0, 0);\n}\n\nvoid ScintillaEdit::setEdgeMode(sptr_t edgeMode) {\n    send(SCI_SETEDGEMODE, edgeMode, 0);\n}\n\nsptr_t ScintillaEdit::edgeColour() const {\n    return send(SCI_GETEDGECOLOUR, 0, 0);\n}\n\nvoid ScintillaEdit::setEdgeColour(sptr_t edgeColour) {\n    send(SCI_SETEDGECOLOUR, edgeColour, 0);\n}\n\nvoid ScintillaEdit::multiEdgeAddLine(sptr_t column, sptr_t edgeColour) {\n    send(SCI_MULTIEDGEADDLINE, column, edgeColour);\n}\n\nvoid ScintillaEdit::multiEdgeClearAll() {\n    send(SCI_MULTIEDGECLEARALL, 0, 0);\n}\n\nsptr_t ScintillaEdit::multiEdgeColumn(sptr_t which) const {\n    return send(SCI_GETMULTIEDGECOLUMN, which, 0);\n}\n\nvoid ScintillaEdit::searchAnchor() {\n    send(SCI_SEARCHANCHOR, 0, 0);\n}\n\nsptr_t ScintillaEdit::searchNext(sptr_t searchFlags, const char * text) {\n    return send(SCI_SEARCHNEXT, searchFlags, (sptr_t)text);\n}\n\nsptr_t ScintillaEdit::searchPrev(sptr_t searchFlags, const char * text) {\n    return send(SCI_SEARCHPREV, searchFlags, (sptr_t)text);\n}\n\nsptr_t ScintillaEdit::linesOnScreen() const {\n    return send(SCI_LINESONSCREEN, 0, 0);\n}\n\nvoid ScintillaEdit::usePopUp(sptr_t popUpMode) {\n    send(SCI_USEPOPUP, popUpMode, 0);\n}\n\nbool ScintillaEdit::selectionIsRectangle() const {\n    return send(SCI_SELECTIONISRECTANGLE, 0, 0);\n}\n\nvoid ScintillaEdit::setZoom(sptr_t zoomInPoints) {\n    send(SCI_SETZOOM, zoomInPoints, 0);\n}\n\nsptr_t ScintillaEdit::zoom() const {\n    return send(SCI_GETZOOM, 0, 0);\n}\n\nsptr_t ScintillaEdit::createDocument(sptr_t bytes, sptr_t documentOptions) {\n    return send(SCI_CREATEDOCUMENT, bytes, documentOptions);\n}\n\nvoid ScintillaEdit::addRefDocument(sptr_t doc) {\n    send(SCI_ADDREFDOCUMENT, 0, doc);\n}\n\nvoid ScintillaEdit::releaseDocument(sptr_t doc) {\n    send(SCI_RELEASEDOCUMENT, 0, doc);\n}\n\nsptr_t ScintillaEdit::documentOptions() const {\n    return send(SCI_GETDOCUMENTOPTIONS, 0, 0);\n}\n\nsptr_t ScintillaEdit::modEventMask() const {\n    return send(SCI_GETMODEVENTMASK, 0, 0);\n}\n\nvoid ScintillaEdit::setCommandEvents(bool commandEvents) {\n    send(SCI_SETCOMMANDEVENTS, commandEvents, 0);\n}\n\nbool ScintillaEdit::commandEvents() const {\n    return send(SCI_GETCOMMANDEVENTS, 0, 0);\n}\n\nvoid ScintillaEdit::setFocus(bool focus) {\n    send(SCI_SETFOCUS, focus, 0);\n}\n\nbool ScintillaEdit::focus() const {\n    return send(SCI_GETFOCUS, 0, 0);\n}\n\nvoid ScintillaEdit::setStatus(sptr_t status) {\n    send(SCI_SETSTATUS, status, 0);\n}\n\nsptr_t ScintillaEdit::status() const {\n    return send(SCI_GETSTATUS, 0, 0);\n}\n\nvoid ScintillaEdit::setMouseDownCaptures(bool captures) {\n    send(SCI_SETMOUSEDOWNCAPTURES, captures, 0);\n}\n\nbool ScintillaEdit::mouseDownCaptures() const {\n    return send(SCI_GETMOUSEDOWNCAPTURES, 0, 0);\n}\n\nvoid ScintillaEdit::setMouseWheelCaptures(bool captures) {\n    send(SCI_SETMOUSEWHEELCAPTURES, captures, 0);\n}\n\nbool ScintillaEdit::mouseWheelCaptures() const {\n    return send(SCI_GETMOUSEWHEELCAPTURES, 0, 0);\n}\n\nvoid ScintillaEdit::setCursor(sptr_t cursorType) {\n    send(SCI_SETCURSOR, cursorType, 0);\n}\n\nsptr_t ScintillaEdit::cursor() const {\n    return send(SCI_GETCURSOR, 0, 0);\n}\n\nvoid ScintillaEdit::setControlCharSymbol(sptr_t symbol) {\n    send(SCI_SETCONTROLCHARSYMBOL, symbol, 0);\n}\n\nsptr_t ScintillaEdit::controlCharSymbol() const {\n    return send(SCI_GETCONTROLCHARSYMBOL, 0, 0);\n}\n\nvoid ScintillaEdit::wordPartLeft() {\n    send(SCI_WORDPARTLEFT, 0, 0);\n}\n\nvoid ScintillaEdit::wordPartLeftExtend() {\n    send(SCI_WORDPARTLEFTEXTEND, 0, 0);\n}\n\nvoid ScintillaEdit::wordPartRight() {\n    send(SCI_WORDPARTRIGHT, 0, 0);\n}\n\nvoid ScintillaEdit::wordPartRightExtend() {\n    send(SCI_WORDPARTRIGHTEXTEND, 0, 0);\n}\n\nvoid ScintillaEdit::setVisiblePolicy(sptr_t visiblePolicy, sptr_t visibleSlop) {\n    send(SCI_SETVISIBLEPOLICY, visiblePolicy, visibleSlop);\n}\n\nvoid ScintillaEdit::delLineLeft() {\n    send(SCI_DELLINELEFT, 0, 0);\n}\n\nvoid ScintillaEdit::delLineRight() {\n    send(SCI_DELLINERIGHT, 0, 0);\n}\n\nvoid ScintillaEdit::setXOffset(sptr_t xOffset) {\n    send(SCI_SETXOFFSET, xOffset, 0);\n}\n\nsptr_t ScintillaEdit::xOffset() const {\n    return send(SCI_GETXOFFSET, 0, 0);\n}\n\nvoid ScintillaEdit::chooseCaretX() {\n    send(SCI_CHOOSECARETX, 0, 0);\n}\n\nvoid ScintillaEdit::grabFocus() {\n    send(SCI_GRABFOCUS, 0, 0);\n}\n\nvoid ScintillaEdit::setXCaretPolicy(sptr_t caretPolicy, sptr_t caretSlop) {\n    send(SCI_SETXCARETPOLICY, caretPolicy, caretSlop);\n}\n\nvoid ScintillaEdit::setYCaretPolicy(sptr_t caretPolicy, sptr_t caretSlop) {\n    send(SCI_SETYCARETPOLICY, caretPolicy, caretSlop);\n}\n\nvoid ScintillaEdit::setPrintWrapMode(sptr_t wrapMode) {\n    send(SCI_SETPRINTWRAPMODE, wrapMode, 0);\n}\n\nsptr_t ScintillaEdit::printWrapMode() const {\n    return send(SCI_GETPRINTWRAPMODE, 0, 0);\n}\n\nvoid ScintillaEdit::setHotspotActiveFore(bool useSetting, sptr_t fore) {\n    send(SCI_SETHOTSPOTACTIVEFORE, useSetting, fore);\n}\n\nsptr_t ScintillaEdit::hotspotActiveFore() const {\n    return send(SCI_GETHOTSPOTACTIVEFORE, 0, 0);\n}\n\nvoid ScintillaEdit::setHotspotActiveBack(bool useSetting, sptr_t back) {\n    send(SCI_SETHOTSPOTACTIVEBACK, useSetting, back);\n}\n\nsptr_t ScintillaEdit::hotspotActiveBack() const {\n    return send(SCI_GETHOTSPOTACTIVEBACK, 0, 0);\n}\n\nvoid ScintillaEdit::setHotspotActiveUnderline(bool underline) {\n    send(SCI_SETHOTSPOTACTIVEUNDERLINE, underline, 0);\n}\n\nbool ScintillaEdit::hotspotActiveUnderline() const {\n    return send(SCI_GETHOTSPOTACTIVEUNDERLINE, 0, 0);\n}\n\nvoid ScintillaEdit::setHotspotSingleLine(bool singleLine) {\n    send(SCI_SETHOTSPOTSINGLELINE, singleLine, 0);\n}\n\nbool ScintillaEdit::hotspotSingleLine() const {\n    return send(SCI_GETHOTSPOTSINGLELINE, 0, 0);\n}\n\nvoid ScintillaEdit::paraDown() {\n    send(SCI_PARADOWN, 0, 0);\n}\n\nvoid ScintillaEdit::paraDownExtend() {\n    send(SCI_PARADOWNEXTEND, 0, 0);\n}\n\nvoid ScintillaEdit::paraUp() {\n    send(SCI_PARAUP, 0, 0);\n}\n\nvoid ScintillaEdit::paraUpExtend() {\n    send(SCI_PARAUPEXTEND, 0, 0);\n}\n\nsptr_t ScintillaEdit::positionBefore(sptr_t pos) {\n    return send(SCI_POSITIONBEFORE, pos, 0);\n}\n\nsptr_t ScintillaEdit::positionAfter(sptr_t pos) {\n    return send(SCI_POSITIONAFTER, pos, 0);\n}\n\nsptr_t ScintillaEdit::positionRelative(sptr_t pos, sptr_t relative) {\n    return send(SCI_POSITIONRELATIVE, pos, relative);\n}\n\nsptr_t ScintillaEdit::positionRelativeCodeUnits(sptr_t pos, sptr_t relative) {\n    return send(SCI_POSITIONRELATIVECODEUNITS, pos, relative);\n}\n\nvoid ScintillaEdit::copyRange(sptr_t start, sptr_t end) {\n    send(SCI_COPYRANGE, start, end);\n}\n\nvoid ScintillaEdit::copyText(sptr_t length, const char * text) {\n    send(SCI_COPYTEXT, length, (sptr_t)text);\n}\n\nvoid ScintillaEdit::setSelectionMode(sptr_t selectionMode) {\n    send(SCI_SETSELECTIONMODE, selectionMode, 0);\n}\n\nvoid ScintillaEdit::changeSelectionMode(sptr_t selectionMode) {\n    send(SCI_CHANGESELECTIONMODE, selectionMode, 0);\n}\n\nsptr_t ScintillaEdit::selectionMode() const {\n    return send(SCI_GETSELECTIONMODE, 0, 0);\n}\n\nvoid ScintillaEdit::setMoveExtendsSelection(bool moveExtendsSelection) {\n    send(SCI_SETMOVEEXTENDSSELECTION, moveExtendsSelection, 0);\n}\n\nbool ScintillaEdit::moveExtendsSelection() const {\n    return send(SCI_GETMOVEEXTENDSSELECTION, 0, 0);\n}\n\nsptr_t ScintillaEdit::getLineSelStartPosition(sptr_t line) {\n    return send(SCI_GETLINESELSTARTPOSITION, line, 0);\n}\n\nsptr_t ScintillaEdit::getLineSelEndPosition(sptr_t line) {\n    return send(SCI_GETLINESELENDPOSITION, line, 0);\n}\n\nvoid ScintillaEdit::lineDownRectExtend() {\n    send(SCI_LINEDOWNRECTEXTEND, 0, 0);\n}\n\nvoid ScintillaEdit::lineUpRectExtend() {\n    send(SCI_LINEUPRECTEXTEND, 0, 0);\n}\n\nvoid ScintillaEdit::charLeftRectExtend() {\n    send(SCI_CHARLEFTRECTEXTEND, 0, 0);\n}\n\nvoid ScintillaEdit::charRightRectExtend() {\n    send(SCI_CHARRIGHTRECTEXTEND, 0, 0);\n}\n\nvoid ScintillaEdit::homeRectExtend() {\n    send(SCI_HOMERECTEXTEND, 0, 0);\n}\n\nvoid ScintillaEdit::vCHomeRectExtend() {\n    send(SCI_VCHOMERECTEXTEND, 0, 0);\n}\n\nvoid ScintillaEdit::lineEndRectExtend() {\n    send(SCI_LINEENDRECTEXTEND, 0, 0);\n}\n\nvoid ScintillaEdit::pageUpRectExtend() {\n    send(SCI_PAGEUPRECTEXTEND, 0, 0);\n}\n\nvoid ScintillaEdit::pageDownRectExtend() {\n    send(SCI_PAGEDOWNRECTEXTEND, 0, 0);\n}\n\nvoid ScintillaEdit::stutteredPageUp() {\n    send(SCI_STUTTEREDPAGEUP, 0, 0);\n}\n\nvoid ScintillaEdit::stutteredPageUpExtend() {\n    send(SCI_STUTTEREDPAGEUPEXTEND, 0, 0);\n}\n\nvoid ScintillaEdit::stutteredPageDown() {\n    send(SCI_STUTTEREDPAGEDOWN, 0, 0);\n}\n\nvoid ScintillaEdit::stutteredPageDownExtend() {\n    send(SCI_STUTTEREDPAGEDOWNEXTEND, 0, 0);\n}\n\nvoid ScintillaEdit::wordLeftEnd() {\n    send(SCI_WORDLEFTEND, 0, 0);\n}\n\nvoid ScintillaEdit::wordLeftEndExtend() {\n    send(SCI_WORDLEFTENDEXTEND, 0, 0);\n}\n\nvoid ScintillaEdit::wordRightEnd() {\n    send(SCI_WORDRIGHTEND, 0, 0);\n}\n\nvoid ScintillaEdit::wordRightEndExtend() {\n    send(SCI_WORDRIGHTENDEXTEND, 0, 0);\n}\n\nvoid ScintillaEdit::setWhitespaceChars(const char * characters) {\n    send(SCI_SETWHITESPACECHARS, 0, (sptr_t)characters);\n}\n\nQByteArray ScintillaEdit::whitespaceChars() const {\n    return TextReturner(SCI_GETWHITESPACECHARS, 0);\n}\n\nvoid ScintillaEdit::setPunctuationChars(const char * characters) {\n    send(SCI_SETPUNCTUATIONCHARS, 0, (sptr_t)characters);\n}\n\nQByteArray ScintillaEdit::punctuationChars() const {\n    return TextReturner(SCI_GETPUNCTUATIONCHARS, 0);\n}\n\nvoid ScintillaEdit::setCharsDefault() {\n    send(SCI_SETCHARSDEFAULT, 0, 0);\n}\n\nsptr_t ScintillaEdit::autoCCurrent() const {\n    return send(SCI_AUTOCGETCURRENT, 0, 0);\n}\n\nQByteArray ScintillaEdit::autoCCurrentText() const {\n    return TextReturner(SCI_AUTOCGETCURRENTTEXT, 0);\n}\n\nvoid ScintillaEdit::autoCSetCaseInsensitiveBehaviour(sptr_t behaviour) {\n    send(SCI_AUTOCSETCASEINSENSITIVEBEHAVIOUR, behaviour, 0);\n}\n\nsptr_t ScintillaEdit::autoCCaseInsensitiveBehaviour() const {\n    return send(SCI_AUTOCGETCASEINSENSITIVEBEHAVIOUR, 0, 0);\n}\n\nvoid ScintillaEdit::autoCSetMulti(sptr_t multi) {\n    send(SCI_AUTOCSETMULTI, multi, 0);\n}\n\nsptr_t ScintillaEdit::autoCMulti() const {\n    return send(SCI_AUTOCGETMULTI, 0, 0);\n}\n\nvoid ScintillaEdit::autoCSetOrder(sptr_t order) {\n    send(SCI_AUTOCSETORDER, order, 0);\n}\n\nsptr_t ScintillaEdit::autoCOrder() const {\n    return send(SCI_AUTOCGETORDER, 0, 0);\n}\n\nvoid ScintillaEdit::allocate(sptr_t bytes) {\n    send(SCI_ALLOCATE, bytes, 0);\n}\n\nQByteArray ScintillaEdit::targetAsUTF8() {\n    return TextReturner(SCI_TARGETASUTF8, 0);\n}\n\nvoid ScintillaEdit::setLengthForEncode(sptr_t bytes) {\n    send(SCI_SETLENGTHFORENCODE, bytes, 0);\n}\n\nQByteArray ScintillaEdit::encodedFromUTF8(const char * utf8) {\n    return TextReturner(SCI_ENCODEDFROMUTF8, (sptr_t)utf8);\n}\n\nsptr_t ScintillaEdit::findColumn(sptr_t line, sptr_t column) {\n    return send(SCI_FINDCOLUMN, line, column);\n}\n\nsptr_t ScintillaEdit::caretSticky() const {\n    return send(SCI_GETCARETSTICKY, 0, 0);\n}\n\nvoid ScintillaEdit::setCaretSticky(sptr_t useCaretStickyBehaviour) {\n    send(SCI_SETCARETSTICKY, useCaretStickyBehaviour, 0);\n}\n\nvoid ScintillaEdit::toggleCaretSticky() {\n    send(SCI_TOGGLECARETSTICKY, 0, 0);\n}\n\nvoid ScintillaEdit::setPasteConvertEndings(bool convert) {\n    send(SCI_SETPASTECONVERTENDINGS, convert, 0);\n}\n\nbool ScintillaEdit::pasteConvertEndings() const {\n    return send(SCI_GETPASTECONVERTENDINGS, 0, 0);\n}\n\nvoid ScintillaEdit::replaceRectangular(sptr_t length, const char * text) {\n    send(SCI_REPLACERECTANGULAR, length, (sptr_t)text);\n}\n\nvoid ScintillaEdit::selectionDuplicate() {\n    send(SCI_SELECTIONDUPLICATE, 0, 0);\n}\n\nvoid ScintillaEdit::setCaretLineBackAlpha(sptr_t alpha) {\n    send(SCI_SETCARETLINEBACKALPHA, alpha, 0);\n}\n\nsptr_t ScintillaEdit::caretLineBackAlpha() const {\n    return send(SCI_GETCARETLINEBACKALPHA, 0, 0);\n}\n\nvoid ScintillaEdit::setCaretStyle(sptr_t caretStyle) {\n    send(SCI_SETCARETSTYLE, caretStyle, 0);\n}\n\nsptr_t ScintillaEdit::caretStyle() const {\n    return send(SCI_GETCARETSTYLE, 0, 0);\n}\n\nvoid ScintillaEdit::setIndicatorCurrent(sptr_t indicator) {\n    send(SCI_SETINDICATORCURRENT, indicator, 0);\n}\n\nsptr_t ScintillaEdit::indicatorCurrent() const {\n    return send(SCI_GETINDICATORCURRENT, 0, 0);\n}\n\nvoid ScintillaEdit::setIndicatorValue(sptr_t value) {\n    send(SCI_SETINDICATORVALUE, value, 0);\n}\n\nsptr_t ScintillaEdit::indicatorValue() const {\n    return send(SCI_GETINDICATORVALUE, 0, 0);\n}\n\nvoid ScintillaEdit::indicatorFillRange(sptr_t start, sptr_t lengthFill) {\n    send(SCI_INDICATORFILLRANGE, start, lengthFill);\n}\n\nvoid ScintillaEdit::indicatorClearRange(sptr_t start, sptr_t lengthClear) {\n    send(SCI_INDICATORCLEARRANGE, start, lengthClear);\n}\n\nsptr_t ScintillaEdit::indicatorAllOnFor(sptr_t pos) {\n    return send(SCI_INDICATORALLONFOR, pos, 0);\n}\n\nsptr_t ScintillaEdit::indicatorValueAt(sptr_t indicator, sptr_t pos) {\n    return send(SCI_INDICATORVALUEAT, indicator, pos);\n}\n\nsptr_t ScintillaEdit::indicatorStart(sptr_t indicator, sptr_t pos) {\n    return send(SCI_INDICATORSTART, indicator, pos);\n}\n\nsptr_t ScintillaEdit::indicatorEnd(sptr_t indicator, sptr_t pos) {\n    return send(SCI_INDICATOREND, indicator, pos);\n}\n\nvoid ScintillaEdit::setPositionCache(sptr_t size) {\n    send(SCI_SETPOSITIONCACHE, size, 0);\n}\n\nsptr_t ScintillaEdit::positionCache() const {\n    return send(SCI_GETPOSITIONCACHE, 0, 0);\n}\n\nvoid ScintillaEdit::setLayoutThreads(sptr_t threads) {\n    send(SCI_SETLAYOUTTHREADS, threads, 0);\n}\n\nsptr_t ScintillaEdit::layoutThreads() const {\n    return send(SCI_GETLAYOUTTHREADS, 0, 0);\n}\n\nvoid ScintillaEdit::copyAllowLine() {\n    send(SCI_COPYALLOWLINE, 0, 0);\n}\n\nsptr_t ScintillaEdit::characterPointer() const {\n    return send(SCI_GETCHARACTERPOINTER, 0, 0);\n}\n\nsptr_t ScintillaEdit::rangePointer(sptr_t start, sptr_t lengthRange) const {\n    return send(SCI_GETRANGEPOINTER, start, lengthRange);\n}\n\nsptr_t ScintillaEdit::gapPosition() const {\n    return send(SCI_GETGAPPOSITION, 0, 0);\n}\n\nvoid ScintillaEdit::indicSetAlpha(sptr_t indicator, sptr_t alpha) {\n    send(SCI_INDICSETALPHA, indicator, alpha);\n}\n\nsptr_t ScintillaEdit::indicAlpha(sptr_t indicator) const {\n    return send(SCI_INDICGETALPHA, indicator, 0);\n}\n\nvoid ScintillaEdit::indicSetOutlineAlpha(sptr_t indicator, sptr_t alpha) {\n    send(SCI_INDICSETOUTLINEALPHA, indicator, alpha);\n}\n\nsptr_t ScintillaEdit::indicOutlineAlpha(sptr_t indicator) const {\n    return send(SCI_INDICGETOUTLINEALPHA, indicator, 0);\n}\n\nvoid ScintillaEdit::setExtraAscent(sptr_t extraAscent) {\n    send(SCI_SETEXTRAASCENT, extraAscent, 0);\n}\n\nsptr_t ScintillaEdit::extraAscent() const {\n    return send(SCI_GETEXTRAASCENT, 0, 0);\n}\n\nvoid ScintillaEdit::setExtraDescent(sptr_t extraDescent) {\n    send(SCI_SETEXTRADESCENT, extraDescent, 0);\n}\n\nsptr_t ScintillaEdit::extraDescent() const {\n    return send(SCI_GETEXTRADESCENT, 0, 0);\n}\n\nsptr_t ScintillaEdit::markerSymbolDefined(sptr_t markerNumber) {\n    return send(SCI_MARKERSYMBOLDEFINED, markerNumber, 0);\n}\n\nvoid ScintillaEdit::marginSetText(sptr_t line, const char * text) {\n    send(SCI_MARGINSETTEXT, line, (sptr_t)text);\n}\n\nQByteArray ScintillaEdit::marginText(sptr_t line) const {\n    return TextReturner(SCI_MARGINGETTEXT, line);\n}\n\nvoid ScintillaEdit::marginSetStyle(sptr_t line, sptr_t style) {\n    send(SCI_MARGINSETSTYLE, line, style);\n}\n\nsptr_t ScintillaEdit::marginStyle(sptr_t line) const {\n    return send(SCI_MARGINGETSTYLE, line, 0);\n}\n\nvoid ScintillaEdit::marginSetStyles(sptr_t line, const char * styles) {\n    send(SCI_MARGINSETSTYLES, line, (sptr_t)styles);\n}\n\nQByteArray ScintillaEdit::marginStyles(sptr_t line) const {\n    return TextReturner(SCI_MARGINGETSTYLES, line);\n}\n\nvoid ScintillaEdit::marginTextClearAll() {\n    send(SCI_MARGINTEXTCLEARALL, 0, 0);\n}\n\nvoid ScintillaEdit::marginSetStyleOffset(sptr_t style) {\n    send(SCI_MARGINSETSTYLEOFFSET, style, 0);\n}\n\nsptr_t ScintillaEdit::marginStyleOffset() const {\n    return send(SCI_MARGINGETSTYLEOFFSET, 0, 0);\n}\n\nvoid ScintillaEdit::setMarginOptions(sptr_t marginOptions) {\n    send(SCI_SETMARGINOPTIONS, marginOptions, 0);\n}\n\nsptr_t ScintillaEdit::marginOptions() const {\n    return send(SCI_GETMARGINOPTIONS, 0, 0);\n}\n\nvoid ScintillaEdit::annotationSetText(sptr_t line, const char * text) {\n    send(SCI_ANNOTATIONSETTEXT, line, (sptr_t)text);\n}\n\nQByteArray ScintillaEdit::annotationText(sptr_t line) const {\n    return TextReturner(SCI_ANNOTATIONGETTEXT, line);\n}\n\nvoid ScintillaEdit::annotationSetStyle(sptr_t line, sptr_t style) {\n    send(SCI_ANNOTATIONSETSTYLE, line, style);\n}\n\nsptr_t ScintillaEdit::annotationStyle(sptr_t line) const {\n    return send(SCI_ANNOTATIONGETSTYLE, line, 0);\n}\n\nvoid ScintillaEdit::annotationSetStyles(sptr_t line, const char * styles) {\n    send(SCI_ANNOTATIONSETSTYLES, line, (sptr_t)styles);\n}\n\nQByteArray ScintillaEdit::annotationStyles(sptr_t line) const {\n    return TextReturner(SCI_ANNOTATIONGETSTYLES, line);\n}\n\nsptr_t ScintillaEdit::annotationLines(sptr_t line) const {\n    return send(SCI_ANNOTATIONGETLINES, line, 0);\n}\n\nvoid ScintillaEdit::annotationClearAll() {\n    send(SCI_ANNOTATIONCLEARALL, 0, 0);\n}\n\nvoid ScintillaEdit::annotationSetVisible(sptr_t visible) {\n    send(SCI_ANNOTATIONSETVISIBLE, visible, 0);\n}\n\nsptr_t ScintillaEdit::annotationVisible() const {\n    return send(SCI_ANNOTATIONGETVISIBLE, 0, 0);\n}\n\nvoid ScintillaEdit::annotationSetStyleOffset(sptr_t style) {\n    send(SCI_ANNOTATIONSETSTYLEOFFSET, style, 0);\n}\n\nsptr_t ScintillaEdit::annotationStyleOffset() const {\n    return send(SCI_ANNOTATIONGETSTYLEOFFSET, 0, 0);\n}\n\nvoid ScintillaEdit::releaseAllExtendedStyles() {\n    send(SCI_RELEASEALLEXTENDEDSTYLES, 0, 0);\n}\n\nsptr_t ScintillaEdit::allocateExtendedStyles(sptr_t numberStyles) {\n    return send(SCI_ALLOCATEEXTENDEDSTYLES, numberStyles, 0);\n}\n\nvoid ScintillaEdit::addUndoAction(sptr_t token, sptr_t flags) {\n    send(SCI_ADDUNDOACTION, token, flags);\n}\n\nsptr_t ScintillaEdit::charPositionFromPoint(sptr_t x, sptr_t y) {\n    return send(SCI_CHARPOSITIONFROMPOINT, x, y);\n}\n\nsptr_t ScintillaEdit::charPositionFromPointClose(sptr_t x, sptr_t y) {\n    return send(SCI_CHARPOSITIONFROMPOINTCLOSE, x, y);\n}\n\nvoid ScintillaEdit::setMouseSelectionRectangularSwitch(bool mouseSelectionRectangularSwitch) {\n    send(SCI_SETMOUSESELECTIONRECTANGULARSWITCH, mouseSelectionRectangularSwitch, 0);\n}\n\nbool ScintillaEdit::mouseSelectionRectangularSwitch() const {\n    return send(SCI_GETMOUSESELECTIONRECTANGULARSWITCH, 0, 0);\n}\n\nvoid ScintillaEdit::setMultipleSelection(bool multipleSelection) {\n    send(SCI_SETMULTIPLESELECTION, multipleSelection, 0);\n}\n\nbool ScintillaEdit::multipleSelection() const {\n    return send(SCI_GETMULTIPLESELECTION, 0, 0);\n}\n\nvoid ScintillaEdit::setAdditionalSelectionTyping(bool additionalSelectionTyping) {\n    send(SCI_SETADDITIONALSELECTIONTYPING, additionalSelectionTyping, 0);\n}\n\nbool ScintillaEdit::additionalSelectionTyping() const {\n    return send(SCI_GETADDITIONALSELECTIONTYPING, 0, 0);\n}\n\nvoid ScintillaEdit::setAdditionalCaretsBlink(bool additionalCaretsBlink) {\n    send(SCI_SETADDITIONALCARETSBLINK, additionalCaretsBlink, 0);\n}\n\nbool ScintillaEdit::additionalCaretsBlink() const {\n    return send(SCI_GETADDITIONALCARETSBLINK, 0, 0);\n}\n\nvoid ScintillaEdit::setAdditionalCaretsVisible(bool additionalCaretsVisible) {\n    send(SCI_SETADDITIONALCARETSVISIBLE, additionalCaretsVisible, 0);\n}\n\nbool ScintillaEdit::additionalCaretsVisible() const {\n    return send(SCI_GETADDITIONALCARETSVISIBLE, 0, 0);\n}\n\nsptr_t ScintillaEdit::selections() const {\n    return send(SCI_GETSELECTIONS, 0, 0);\n}\n\nbool ScintillaEdit::selectionEmpty() const {\n    return send(SCI_GETSELECTIONEMPTY, 0, 0);\n}\n\nvoid ScintillaEdit::clearSelections() {\n    send(SCI_CLEARSELECTIONS, 0, 0);\n}\n\nvoid ScintillaEdit::setSelection(sptr_t caret, sptr_t anchor) {\n    send(SCI_SETSELECTION, caret, anchor);\n}\n\nvoid ScintillaEdit::addSelection(sptr_t caret, sptr_t anchor) {\n    send(SCI_ADDSELECTION, caret, anchor);\n}\n\nsptr_t ScintillaEdit::selectionFromPoint(sptr_t x, sptr_t y) {\n    return send(SCI_SELECTIONFROMPOINT, x, y);\n}\n\nvoid ScintillaEdit::dropSelectionN(sptr_t selection) {\n    send(SCI_DROPSELECTIONN, selection, 0);\n}\n\nvoid ScintillaEdit::setMainSelection(sptr_t selection) {\n    send(SCI_SETMAINSELECTION, selection, 0);\n}\n\nsptr_t ScintillaEdit::mainSelection() const {\n    return send(SCI_GETMAINSELECTION, 0, 0);\n}\n\nvoid ScintillaEdit::setSelectionNCaret(sptr_t selection, sptr_t caret) {\n    send(SCI_SETSELECTIONNCARET, selection, caret);\n}\n\nsptr_t ScintillaEdit::selectionNCaret(sptr_t selection) const {\n    return send(SCI_GETSELECTIONNCARET, selection, 0);\n}\n\nvoid ScintillaEdit::setSelectionNAnchor(sptr_t selection, sptr_t anchor) {\n    send(SCI_SETSELECTIONNANCHOR, selection, anchor);\n}\n\nsptr_t ScintillaEdit::selectionNAnchor(sptr_t selection) const {\n    return send(SCI_GETSELECTIONNANCHOR, selection, 0);\n}\n\nvoid ScintillaEdit::setSelectionNCaretVirtualSpace(sptr_t selection, sptr_t space) {\n    send(SCI_SETSELECTIONNCARETVIRTUALSPACE, selection, space);\n}\n\nsptr_t ScintillaEdit::selectionNCaretVirtualSpace(sptr_t selection) const {\n    return send(SCI_GETSELECTIONNCARETVIRTUALSPACE, selection, 0);\n}\n\nvoid ScintillaEdit::setSelectionNAnchorVirtualSpace(sptr_t selection, sptr_t space) {\n    send(SCI_SETSELECTIONNANCHORVIRTUALSPACE, selection, space);\n}\n\nsptr_t ScintillaEdit::selectionNAnchorVirtualSpace(sptr_t selection) const {\n    return send(SCI_GETSELECTIONNANCHORVIRTUALSPACE, selection, 0);\n}\n\nvoid ScintillaEdit::setSelectionNStart(sptr_t selection, sptr_t anchor) {\n    send(SCI_SETSELECTIONNSTART, selection, anchor);\n}\n\nsptr_t ScintillaEdit::selectionNStart(sptr_t selection) const {\n    return send(SCI_GETSELECTIONNSTART, selection, 0);\n}\n\nsptr_t ScintillaEdit::selectionNStartVirtualSpace(sptr_t selection) const {\n    return send(SCI_GETSELECTIONNSTARTVIRTUALSPACE, selection, 0);\n}\n\nvoid ScintillaEdit::setSelectionNEnd(sptr_t selection, sptr_t caret) {\n    send(SCI_SETSELECTIONNEND, selection, caret);\n}\n\nsptr_t ScintillaEdit::selectionNEndVirtualSpace(sptr_t selection) const {\n    return send(SCI_GETSELECTIONNENDVIRTUALSPACE, selection, 0);\n}\n\nsptr_t ScintillaEdit::selectionNEnd(sptr_t selection) const {\n    return send(SCI_GETSELECTIONNEND, selection, 0);\n}\n\nvoid ScintillaEdit::setRectangularSelectionCaret(sptr_t caret) {\n    send(SCI_SETRECTANGULARSELECTIONCARET, caret, 0);\n}\n\nsptr_t ScintillaEdit::rectangularSelectionCaret() const {\n    return send(SCI_GETRECTANGULARSELECTIONCARET, 0, 0);\n}\n\nvoid ScintillaEdit::setRectangularSelectionAnchor(sptr_t anchor) {\n    send(SCI_SETRECTANGULARSELECTIONANCHOR, anchor, 0);\n}\n\nsptr_t ScintillaEdit::rectangularSelectionAnchor() const {\n    return send(SCI_GETRECTANGULARSELECTIONANCHOR, 0, 0);\n}\n\nvoid ScintillaEdit::setRectangularSelectionCaretVirtualSpace(sptr_t space) {\n    send(SCI_SETRECTANGULARSELECTIONCARETVIRTUALSPACE, space, 0);\n}\n\nsptr_t ScintillaEdit::rectangularSelectionCaretVirtualSpace() const {\n    return send(SCI_GETRECTANGULARSELECTIONCARETVIRTUALSPACE, 0, 0);\n}\n\nvoid ScintillaEdit::setRectangularSelectionAnchorVirtualSpace(sptr_t space) {\n    send(SCI_SETRECTANGULARSELECTIONANCHORVIRTUALSPACE, space, 0);\n}\n\nsptr_t ScintillaEdit::rectangularSelectionAnchorVirtualSpace() const {\n    return send(SCI_GETRECTANGULARSELECTIONANCHORVIRTUALSPACE, 0, 0);\n}\n\nvoid ScintillaEdit::setVirtualSpaceOptions(sptr_t virtualSpaceOptions) {\n    send(SCI_SETVIRTUALSPACEOPTIONS, virtualSpaceOptions, 0);\n}\n\nsptr_t ScintillaEdit::virtualSpaceOptions() const {\n    return send(SCI_GETVIRTUALSPACEOPTIONS, 0, 0);\n}\n\nvoid ScintillaEdit::setRectangularSelectionModifier(sptr_t modifier) {\n    send(SCI_SETRECTANGULARSELECTIONMODIFIER, modifier, 0);\n}\n\nsptr_t ScintillaEdit::rectangularSelectionModifier() const {\n    return send(SCI_GETRECTANGULARSELECTIONMODIFIER, 0, 0);\n}\n\nvoid ScintillaEdit::setAdditionalSelFore(sptr_t fore) {\n    send(SCI_SETADDITIONALSELFORE, fore, 0);\n}\n\nvoid ScintillaEdit::setAdditionalSelBack(sptr_t back) {\n    send(SCI_SETADDITIONALSELBACK, back, 0);\n}\n\nvoid ScintillaEdit::setAdditionalSelAlpha(sptr_t alpha) {\n    send(SCI_SETADDITIONALSELALPHA, alpha, 0);\n}\n\nsptr_t ScintillaEdit::additionalSelAlpha() const {\n    return send(SCI_GETADDITIONALSELALPHA, 0, 0);\n}\n\nvoid ScintillaEdit::setAdditionalCaretFore(sptr_t fore) {\n    send(SCI_SETADDITIONALCARETFORE, fore, 0);\n}\n\nsptr_t ScintillaEdit::additionalCaretFore() const {\n    return send(SCI_GETADDITIONALCARETFORE, 0, 0);\n}\n\nvoid ScintillaEdit::rotateSelection() {\n    send(SCI_ROTATESELECTION, 0, 0);\n}\n\nvoid ScintillaEdit::swapMainAnchorCaret() {\n    send(SCI_SWAPMAINANCHORCARET, 0, 0);\n}\n\nvoid ScintillaEdit::multipleSelectAddNext() {\n    send(SCI_MULTIPLESELECTADDNEXT, 0, 0);\n}\n\nvoid ScintillaEdit::multipleSelectAddEach() {\n    send(SCI_MULTIPLESELECTADDEACH, 0, 0);\n}\n\nsptr_t ScintillaEdit::changeLexerState(sptr_t start, sptr_t end) {\n    return send(SCI_CHANGELEXERSTATE, start, end);\n}\n\nsptr_t ScintillaEdit::contractedFoldNext(sptr_t lineStart) {\n    return send(SCI_CONTRACTEDFOLDNEXT, lineStart, 0);\n}\n\nvoid ScintillaEdit::verticalCentreCaret() {\n    send(SCI_VERTICALCENTRECARET, 0, 0);\n}\n\nvoid ScintillaEdit::moveSelectedLinesUp() {\n    send(SCI_MOVESELECTEDLINESUP, 0, 0);\n}\n\nvoid ScintillaEdit::moveSelectedLinesDown() {\n    send(SCI_MOVESELECTEDLINESDOWN, 0, 0);\n}\n\nvoid ScintillaEdit::setIdentifier(sptr_t identifier) {\n    send(SCI_SETIDENTIFIER, identifier, 0);\n}\n\nsptr_t ScintillaEdit::identifier() const {\n    return send(SCI_GETIDENTIFIER, 0, 0);\n}\n\nvoid ScintillaEdit::rGBAImageSetWidth(sptr_t width) {\n    send(SCI_RGBAIMAGESETWIDTH, width, 0);\n}\n\nvoid ScintillaEdit::rGBAImageSetHeight(sptr_t height) {\n    send(SCI_RGBAIMAGESETHEIGHT, height, 0);\n}\n\nvoid ScintillaEdit::rGBAImageSetScale(sptr_t scalePercent) {\n    send(SCI_RGBAIMAGESETSCALE, scalePercent, 0);\n}\n\nvoid ScintillaEdit::markerDefineRGBAImage(sptr_t markerNumber, const char * pixels) {\n    send(SCI_MARKERDEFINERGBAIMAGE, markerNumber, (sptr_t)pixels);\n}\n\nvoid ScintillaEdit::registerRGBAImage(sptr_t type, const char * pixels) {\n    send(SCI_REGISTERRGBAIMAGE, type, (sptr_t)pixels);\n}\n\nvoid ScintillaEdit::scrollToStart() {\n    send(SCI_SCROLLTOSTART, 0, 0);\n}\n\nvoid ScintillaEdit::scrollToEnd() {\n    send(SCI_SCROLLTOEND, 0, 0);\n}\n\nvoid ScintillaEdit::setTechnology(sptr_t technology) {\n    send(SCI_SETTECHNOLOGY, technology, 0);\n}\n\nsptr_t ScintillaEdit::technology() const {\n    return send(SCI_GETTECHNOLOGY, 0, 0);\n}\n\nsptr_t ScintillaEdit::createLoader(sptr_t bytes, sptr_t documentOptions) {\n    return send(SCI_CREATELOADER, bytes, documentOptions);\n}\n\nvoid ScintillaEdit::findIndicatorShow(sptr_t start, sptr_t end) {\n    send(SCI_FINDINDICATORSHOW, start, end);\n}\n\nvoid ScintillaEdit::findIndicatorFlash(sptr_t start, sptr_t end) {\n    send(SCI_FINDINDICATORFLASH, start, end);\n}\n\nvoid ScintillaEdit::findIndicatorHide() {\n    send(SCI_FINDINDICATORHIDE, 0, 0);\n}\n\nvoid ScintillaEdit::vCHomeDisplay() {\n    send(SCI_VCHOMEDISPLAY, 0, 0);\n}\n\nvoid ScintillaEdit::vCHomeDisplayExtend() {\n    send(SCI_VCHOMEDISPLAYEXTEND, 0, 0);\n}\n\nbool ScintillaEdit::caretLineVisibleAlways() const {\n    return send(SCI_GETCARETLINEVISIBLEALWAYS, 0, 0);\n}\n\nvoid ScintillaEdit::setCaretLineVisibleAlways(bool alwaysVisible) {\n    send(SCI_SETCARETLINEVISIBLEALWAYS, alwaysVisible, 0);\n}\n\nvoid ScintillaEdit::setLineEndTypesAllowed(sptr_t lineEndBitSet) {\n    send(SCI_SETLINEENDTYPESALLOWED, lineEndBitSet, 0);\n}\n\nsptr_t ScintillaEdit::lineEndTypesAllowed() const {\n    return send(SCI_GETLINEENDTYPESALLOWED, 0, 0);\n}\n\nsptr_t ScintillaEdit::lineEndTypesActive() const {\n    return send(SCI_GETLINEENDTYPESACTIVE, 0, 0);\n}\n\nvoid ScintillaEdit::setRepresentation(const char * encodedCharacter, const char * representation) {\n    send(SCI_SETREPRESENTATION, (sptr_t)encodedCharacter, (sptr_t)representation);\n}\n\nQByteArray ScintillaEdit::representation(const char * encodedCharacter) const {\n    return TextReturner(SCI_GETREPRESENTATION, (sptr_t)encodedCharacter);\n}\n\nvoid ScintillaEdit::clearRepresentation(const char * encodedCharacter) {\n    send(SCI_CLEARREPRESENTATION, (sptr_t)encodedCharacter, 0);\n}\n\nvoid ScintillaEdit::clearAllRepresentations() {\n    send(SCI_CLEARALLREPRESENTATIONS, 0, 0);\n}\n\nvoid ScintillaEdit::setRepresentationAppearance(const char * encodedCharacter, sptr_t appearance) {\n    send(SCI_SETREPRESENTATIONAPPEARANCE, (sptr_t)encodedCharacter, appearance);\n}\n\nsptr_t ScintillaEdit::representationAppearance(const char * encodedCharacter) const {\n    return send(SCI_GETREPRESENTATIONAPPEARANCE, (sptr_t)encodedCharacter, 0);\n}\n\nvoid ScintillaEdit::setRepresentationColour(const char * encodedCharacter, sptr_t colour) {\n    send(SCI_SETREPRESENTATIONCOLOUR, (sptr_t)encodedCharacter, colour);\n}\n\nsptr_t ScintillaEdit::representationColour(const char * encodedCharacter) const {\n    return send(SCI_GETREPRESENTATIONCOLOUR, (sptr_t)encodedCharacter, 0);\n}\n\nvoid ScintillaEdit::eOLAnnotationSetText(sptr_t line, const char * text) {\n    send(SCI_EOLANNOTATIONSETTEXT, line, (sptr_t)text);\n}\n\nQByteArray ScintillaEdit::eOLAnnotationText(sptr_t line) const {\n    return TextReturner(SCI_EOLANNOTATIONGETTEXT, line);\n}\n\nvoid ScintillaEdit::eOLAnnotationSetStyle(sptr_t line, sptr_t style) {\n    send(SCI_EOLANNOTATIONSETSTYLE, line, style);\n}\n\nsptr_t ScintillaEdit::eOLAnnotationStyle(sptr_t line) const {\n    return send(SCI_EOLANNOTATIONGETSTYLE, line, 0);\n}\n\nvoid ScintillaEdit::eOLAnnotationClearAll() {\n    send(SCI_EOLANNOTATIONCLEARALL, 0, 0);\n}\n\nvoid ScintillaEdit::eOLAnnotationSetVisible(sptr_t visible) {\n    send(SCI_EOLANNOTATIONSETVISIBLE, visible, 0);\n}\n\nsptr_t ScintillaEdit::eOLAnnotationVisible() const {\n    return send(SCI_EOLANNOTATIONGETVISIBLE, 0, 0);\n}\n\nvoid ScintillaEdit::eOLAnnotationSetStyleOffset(sptr_t style) {\n    send(SCI_EOLANNOTATIONSETSTYLEOFFSET, style, 0);\n}\n\nsptr_t ScintillaEdit::eOLAnnotationStyleOffset() const {\n    return send(SCI_EOLANNOTATIONGETSTYLEOFFSET, 0, 0);\n}\n\nbool ScintillaEdit::supportsFeature(sptr_t feature) const {\n    return send(SCI_SUPPORTSFEATURE, feature, 0);\n}\n\nsptr_t ScintillaEdit::lineCharacterIndex() const {\n    return send(SCI_GETLINECHARACTERINDEX, 0, 0);\n}\n\nvoid ScintillaEdit::allocateLineCharacterIndex(sptr_t lineCharacterIndex) {\n    send(SCI_ALLOCATELINECHARACTERINDEX, lineCharacterIndex, 0);\n}\n\nvoid ScintillaEdit::releaseLineCharacterIndex(sptr_t lineCharacterIndex) {\n    send(SCI_RELEASELINECHARACTERINDEX, lineCharacterIndex, 0);\n}\n\nsptr_t ScintillaEdit::lineFromIndexPosition(sptr_t pos, sptr_t lineCharacterIndex) {\n    return send(SCI_LINEFROMINDEXPOSITION, pos, lineCharacterIndex);\n}\n\nsptr_t ScintillaEdit::indexPositionFromLine(sptr_t line, sptr_t lineCharacterIndex) {\n    return send(SCI_INDEXPOSITIONFROMLINE, line, lineCharacterIndex);\n}\n\nvoid ScintillaEdit::startRecord() {\n    send(SCI_STARTRECORD, 0, 0);\n}\n\nvoid ScintillaEdit::stopRecord() {\n    send(SCI_STOPRECORD, 0, 0);\n}\n\nsptr_t ScintillaEdit::lexer() const {\n    return send(SCI_GETLEXER, 0, 0);\n}\n\nvoid ScintillaEdit::colourise(sptr_t start, sptr_t end) {\n    send(SCI_COLOURISE, start, end);\n}\n\nvoid ScintillaEdit::setProperty(const char * key, const char * value) {\n    send(SCI_SETPROPERTY, (sptr_t)key, (sptr_t)value);\n}\n\nvoid ScintillaEdit::setKeyWords(sptr_t keyWordSet, const char * keyWords) {\n    send(SCI_SETKEYWORDS, keyWordSet, (sptr_t)keyWords);\n}\n\nQByteArray ScintillaEdit::property(const char * key) const {\n    return TextReturner(SCI_GETPROPERTY, (sptr_t)key);\n}\n\nQByteArray ScintillaEdit::propertyExpanded(const char * key) const {\n    return TextReturner(SCI_GETPROPERTYEXPANDED, (sptr_t)key);\n}\n\nsptr_t ScintillaEdit::propertyInt(const char * key, sptr_t defaultValue) const {\n    return send(SCI_GETPROPERTYINT, (sptr_t)key, defaultValue);\n}\n\nQByteArray ScintillaEdit::lexerLanguage() const {\n    return TextReturner(SCI_GETLEXERLANGUAGE, 0);\n}\n\nsptr_t ScintillaEdit::privateLexerCall(sptr_t operation, sptr_t pointer) {\n    return send(SCI_PRIVATELEXERCALL, operation, pointer);\n}\n\nQByteArray ScintillaEdit::propertyNames() {\n    return TextReturner(SCI_PROPERTYNAMES, 0);\n}\n\nsptr_t ScintillaEdit::propertyType(const char * name) {\n    return send(SCI_PROPERTYTYPE, (sptr_t)name, 0);\n}\n\nQByteArray ScintillaEdit::describeProperty(const char * name) {\n    return TextReturner(SCI_DESCRIBEPROPERTY, (sptr_t)name);\n}\n\nQByteArray ScintillaEdit::describeKeyWordSets() {\n    return TextReturner(SCI_DESCRIBEKEYWORDSETS, 0);\n}\n\nsptr_t ScintillaEdit::lineEndTypesSupported() const {\n    return send(SCI_GETLINEENDTYPESSUPPORTED, 0, 0);\n}\n\nsptr_t ScintillaEdit::allocateSubStyles(sptr_t styleBase, sptr_t numberStyles) {\n    return send(SCI_ALLOCATESUBSTYLES, styleBase, numberStyles);\n}\n\nsptr_t ScintillaEdit::subStylesStart(sptr_t styleBase) const {\n    return send(SCI_GETSUBSTYLESSTART, styleBase, 0);\n}\n\nsptr_t ScintillaEdit::subStylesLength(sptr_t styleBase) const {\n    return send(SCI_GETSUBSTYLESLENGTH, styleBase, 0);\n}\n\nsptr_t ScintillaEdit::styleFromSubStyle(sptr_t subStyle) const {\n    return send(SCI_GETSTYLEFROMSUBSTYLE, subStyle, 0);\n}\n\nsptr_t ScintillaEdit::primaryStyleFromStyle(sptr_t style) const {\n    return send(SCI_GETPRIMARYSTYLEFROMSTYLE, style, 0);\n}\n\nvoid ScintillaEdit::freeSubStyles() {\n    send(SCI_FREESUBSTYLES, 0, 0);\n}\n\nvoid ScintillaEdit::setIdentifiers(sptr_t style, const char * identifiers) {\n    send(SCI_SETIDENTIFIERS, style, (sptr_t)identifiers);\n}\n\nsptr_t ScintillaEdit::distanceToSecondaryStyles() const {\n    return send(SCI_DISTANCETOSECONDARYSTYLES, 0, 0);\n}\n\nQByteArray ScintillaEdit::subStyleBases() const {\n    return TextReturner(SCI_GETSUBSTYLEBASES, 0);\n}\n\nsptr_t ScintillaEdit::namedStyles() const {\n    return send(SCI_GETNAMEDSTYLES, 0, 0);\n}\n\nQByteArray ScintillaEdit::nameOfStyle(sptr_t style) {\n    return TextReturner(SCI_NAMEOFSTYLE, style);\n}\n\nQByteArray ScintillaEdit::tagsOfStyle(sptr_t style) {\n    return TextReturner(SCI_TAGSOFSTYLE, style);\n}\n\nQByteArray ScintillaEdit::descriptionOfStyle(sptr_t style) {\n    return TextReturner(SCI_DESCRIPTIONOFSTYLE, style);\n}\n\nvoid ScintillaEdit::setILexer(sptr_t ilexer) {\n    send(SCI_SETILEXER, 0, ilexer);\n}\n\nsptr_t ScintillaEdit::bidirectional() const {\n    return send(SCI_GETBIDIRECTIONAL, 0, 0);\n}\n\nvoid ScintillaEdit::setBidirectional(sptr_t bidirectional) {\n    send(SCI_SETBIDIRECTIONAL, bidirectional, 0);\n}\n\n/* --Autogenerated -- end of section automatically generated from Scintilla.iface */\n"
  },
  {
    "path": "scintilla/qt/ScintillaEdit/ScintillaEdit.cpp.template",
    "content": "// @file ScintillaEdit.cpp\r\n// Extended version of ScintillaEditBase with a method for each API\r\n// Copyright (c) 2011 Archaeopteryx Software, Inc. d/b/a Wingware\r\n\r\n#include \"ScintillaEdit.h\"\r\n\r\nusing namespace Scintilla;\r\n\r\nScintillaEdit::ScintillaEdit(QWidget *parent) : ScintillaEditBase(parent) {\r\n}\r\n\r\nScintillaEdit::~ScintillaEdit() {\r\n}\r\n\r\nQByteArray ScintillaEdit::TextReturner(int message, uptr_t wParam) const {\r\n    // While Scintilla can return strings longer than maximum(int), QByteArray uses int size\r\n    const int length = static_cast<int>(send(message, wParam, 0));\r\n    QByteArray ba(length + 1, '\\0');\r\n    send(message, wParam, (sptr_t)ba.data());\r\n    // Remove extra NULs\r\n    if (ba.at(ba.size()-1) == 0)\r\n        ba.chop(1);\r\n    return ba;\r\n}\r\n\r\nQPair<int, int>ScintillaEdit::find_text(int flags, const char *text, int cpMin, int cpMax) {\r\n    struct Sci_TextToFind ft = {{0, 0}, 0, {0, 0}};\r\n    ft.chrg.cpMin = cpMin;\r\n    ft.chrg.cpMax = cpMax;\r\n    ft.chrgText.cpMin = cpMin;\r\n    ft.chrgText.cpMax = cpMax;\r\n    ft.lpstrText = text;\r\n\r\n    int start = send(SCI_FINDTEXT, flags, (uptr_t) (&ft));\r\n\r\n    return QPair<int,int>(start, ft.chrgText.cpMax);\r\n}\r\n\r\nQByteArray ScintillaEdit::get_text_range(int start, int end) {\r\n    if (start > end)\r\n        start = end;\r\n\r\n    int length = end-start;\r\n    QByteArray ba(length+1, '\\0');\r\n    struct Sci_TextRange tr = {{start, end}, ba.data()};\r\n\r\n    send(SCI_GETTEXTRANGE, 0, (sptr_t)&tr);\r\n    ba.chop(1); // Remove extra NUL\r\n\r\n    return ba;\r\n}\r\n\r\nScintillaDocument *ScintillaEdit::get_doc() {\r\n    return new ScintillaDocument(0, (void *)send(SCI_GETDOCPOINTER, 0, 0));\r\n}\r\n\r\nvoid ScintillaEdit::set_doc(ScintillaDocument *pdoc_) {\r\n    send(SCI_SETDOCPOINTER, 0, (sptr_t)(pdoc_->pointer()));\r\n}\r\n\r\nlong ScintillaEdit::format_range(bool draw, QPaintDevice* target, QPaintDevice* measure,\r\n                                 const QRect& print_rect, const QRect& page_rect,\r\n                                 long range_start, long range_end)\r\n{\r\n    Sci_RangeToFormat to_format;\r\n\r\n    to_format.hdc = target;\r\n    to_format.hdcTarget = measure;\r\n\r\n    to_format.rc.left = print_rect.left();\r\n    to_format.rc.top = print_rect.top();\r\n    to_format.rc.right = print_rect.right();\r\n    to_format.rc.bottom = print_rect.bottom();\r\n\r\n    to_format.rcPage.left = page_rect.left();\r\n    to_format.rcPage.top = page_rect.top();\r\n    to_format.rcPage.right = page_rect.right();\r\n    to_format.rcPage.bottom = page_rect.bottom();\r\n\r\n    to_format.chrg.cpMin = range_start;\r\n    to_format.chrg.cpMax = range_end;\r\n\r\n    return send(SCI_FORMATRANGE, draw, reinterpret_cast<sptr_t>(&to_format));\r\n}\r\n\r\n/* ++Autogenerated -- start of section automatically generated from Scintilla.iface */\r\n/* --Autogenerated -- end of section automatically generated from Scintilla.iface */\r\n"
  },
  {
    "path": "scintilla/qt/ScintillaEdit/ScintillaEdit.h",
    "content": "// @file ScintillaEdit.h\n// Extended version of ScintillaEditBase with a method for each API\n// Copyright (c) 2011 Archaeopteryx Software, Inc. d/b/a Wingware\n\n#ifndef SCINTILLAEDIT_H\n#define SCINTILLAEDIT_H\n\n#include <QPair>\n\n#include \"ScintillaEditBase.h\"\n#include \"ScintillaDocument.h\"\n\n#ifndef EXPORT_IMPORT_API\n#ifdef WIN32\n#ifdef MAKING_LIBRARY\n#define EXPORT_IMPORT_API __declspec(dllexport)\n#else\n// Defining dllimport upsets moc\n//#define EXPORT_IMPORT_API __declspec(dllimport)\n#define EXPORT_IMPORT_API\n#endif\n#else\n#define EXPORT_IMPORT_API\n#endif\n#endif\n\nclass EXPORT_IMPORT_API ScintillaEdit : public ScintillaEditBase {\n\tQ_OBJECT\n\npublic:\n\tScintillaEdit(QWidget *parent = 0);\n\tvirtual ~ScintillaEdit();\n\n\tQByteArray TextReturner(int message, uptr_t wParam) const;\n\n\tQPair<int, int>find_text(int flags, const char *text, int cpMin, int cpMax);\n\tQByteArray get_text_range(int start, int end);\n        ScintillaDocument *get_doc();\n        void set_doc(ScintillaDocument *pdoc_);\n\n\t// Same as previous two methods but with Qt style names\n\tQPair<int, int>findText(int flags, const char *text, int cpMin, int cpMax) {\n\t\treturn find_text(flags, text, cpMin, cpMax);\n\t}\n\n\tQByteArray textRange(int start, int end) {\n\t\treturn get_text_range(start, end);\n\t}\n\n\t// Exposing the FORMATRANGE api with both underscore & qt style names\n\tlong format_range(bool draw, QPaintDevice* target, QPaintDevice* measure,\n\t\t\t   const QRect& print_rect, const QRect& page_rect,\n                          long range_start, long range_end);\n\tlong formatRange(bool draw, QPaintDevice* target, QPaintDevice* measure,\n                         const QRect& print_rect, const QRect& page_rect,\n                         long range_start, long range_end) {\n\t\treturn format_range(draw, target, measure, print_rect, page_rect,\n\t\t                    range_start, range_end);\n\t}\n\n/* ++Autogenerated -- start of section automatically generated from Scintilla.iface */\n\tvoid addText(sptr_t length, const char * text);\n\tvoid addStyledText(sptr_t length, const char * c);\n\tvoid insertText(sptr_t pos, const char * text);\n\tvoid changeInsertion(sptr_t length, const char * text);\n\tvoid clearAll();\n\tvoid deleteRange(sptr_t start, sptr_t lengthDelete);\n\tvoid clearDocumentStyle();\n\tsptr_t length() const;\n\tsptr_t charAt(sptr_t pos) const;\n\tsptr_t currentPos() const;\n\tsptr_t anchor() const;\n\tsptr_t styleAt(sptr_t pos) const;\n\tsptr_t styleIndexAt(sptr_t pos) const;\n\tvoid redo();\n\tvoid setUndoCollection(bool collectUndo);\n\tvoid selectAll();\n\tvoid setSavePoint();\n\tbool canRedo();\n\tsptr_t markerLineFromHandle(sptr_t markerHandle);\n\tvoid markerDeleteHandle(sptr_t markerHandle);\n\tsptr_t markerHandleFromLine(sptr_t line, sptr_t which);\n\tsptr_t markerNumberFromLine(sptr_t line, sptr_t which);\n\tbool undoCollection() const;\n\tsptr_t viewWS() const;\n\tvoid setViewWS(sptr_t viewWS);\n\tsptr_t tabDrawMode() const;\n\tvoid setTabDrawMode(sptr_t tabDrawMode);\n\tsptr_t positionFromPoint(sptr_t x, sptr_t y);\n\tsptr_t positionFromPointClose(sptr_t x, sptr_t y);\n\tvoid gotoLine(sptr_t line);\n\tvoid gotoPos(sptr_t caret);\n\tvoid setAnchor(sptr_t anchor);\n\tQByteArray getCurLine(sptr_t length);\n\tsptr_t endStyled() const;\n\tvoid convertEOLs(sptr_t eolMode);\n\tsptr_t eOLMode() const;\n\tvoid setEOLMode(sptr_t eolMode);\n\tvoid startStyling(sptr_t start, sptr_t unused);\n\tvoid setStyling(sptr_t length, sptr_t style);\n\tbool bufferedDraw() const;\n\tvoid setBufferedDraw(bool buffered);\n\tvoid setTabWidth(sptr_t tabWidth);\n\tsptr_t tabWidth() const;\n\tvoid setTabMinimumWidth(sptr_t pixels);\n\tsptr_t tabMinimumWidth() const;\n\tvoid clearTabStops(sptr_t line);\n\tvoid addTabStop(sptr_t line, sptr_t x);\n\tsptr_t getNextTabStop(sptr_t line, sptr_t x);\n\tvoid setCodePage(sptr_t codePage);\n\tvoid setFontLocale(const char * localeName);\n\tQByteArray fontLocale() const;\n\tsptr_t iMEInteraction() const;\n\tvoid setIMEInteraction(sptr_t imeInteraction);\n\tvoid markerDefine(sptr_t markerNumber, sptr_t markerSymbol);\n\tvoid markerSetFore(sptr_t markerNumber, sptr_t fore);\n\tvoid markerSetBack(sptr_t markerNumber, sptr_t back);\n\tvoid markerSetBackSelected(sptr_t markerNumber, sptr_t back);\n\tvoid markerSetForeTranslucent(sptr_t markerNumber, sptr_t fore);\n\tvoid markerSetBackTranslucent(sptr_t markerNumber, sptr_t back);\n\tvoid markerSetBackSelectedTranslucent(sptr_t markerNumber, sptr_t back);\n\tvoid markerSetStrokeWidth(sptr_t markerNumber, sptr_t hundredths);\n\tvoid markerEnableHighlight(bool enabled);\n\tsptr_t markerAdd(sptr_t line, sptr_t markerNumber);\n\tvoid markerDelete(sptr_t line, sptr_t markerNumber);\n\tvoid markerDeleteAll(sptr_t markerNumber);\n\tsptr_t markerGet(sptr_t line);\n\tsptr_t markerNext(sptr_t lineStart, sptr_t markerMask);\n\tsptr_t markerPrevious(sptr_t lineStart, sptr_t markerMask);\n\tvoid markerDefinePixmap(sptr_t markerNumber, const char * pixmap);\n\tvoid markerAddSet(sptr_t line, sptr_t markerSet);\n\tvoid markerSetAlpha(sptr_t markerNumber, sptr_t alpha);\n\tsptr_t markerLayer(sptr_t markerNumber) const;\n\tvoid markerSetLayer(sptr_t markerNumber, sptr_t layer);\n\tvoid setMarginTypeN(sptr_t margin, sptr_t marginType);\n\tsptr_t marginTypeN(sptr_t margin) const;\n\tvoid setMarginWidthN(sptr_t margin, sptr_t pixelWidth);\n\tsptr_t marginWidthN(sptr_t margin) const;\n\tvoid setMarginMaskN(sptr_t margin, sptr_t mask);\n\tsptr_t marginMaskN(sptr_t margin) const;\n\tvoid setMarginSensitiveN(sptr_t margin, bool sensitive);\n\tbool marginSensitiveN(sptr_t margin) const;\n\tvoid setMarginCursorN(sptr_t margin, sptr_t cursor);\n\tsptr_t marginCursorN(sptr_t margin) const;\n\tvoid setMarginBackN(sptr_t margin, sptr_t back);\n\tsptr_t marginBackN(sptr_t margin) const;\n\tvoid setMargins(sptr_t margins);\n\tsptr_t margins() const;\n\tvoid styleClearAll();\n\tvoid styleSetFore(sptr_t style, sptr_t fore);\n\tvoid styleSetBack(sptr_t style, sptr_t back);\n\tvoid styleSetBold(sptr_t style, bool bold);\n\tvoid styleSetItalic(sptr_t style, bool italic);\n\tvoid styleSetSize(sptr_t style, sptr_t sizePoints);\n\tvoid styleSetFont(sptr_t style, const char * fontName);\n\tvoid styleSetEOLFilled(sptr_t style, bool eolFilled);\n\tvoid styleResetDefault();\n\tvoid styleSetUnderline(sptr_t style, bool underline);\n\tsptr_t styleFore(sptr_t style) const;\n\tsptr_t styleBack(sptr_t style) const;\n\tbool styleBold(sptr_t style) const;\n\tbool styleItalic(sptr_t style) const;\n\tsptr_t styleSize(sptr_t style) const;\n\tQByteArray styleFont(sptr_t style) const;\n\tbool styleEOLFilled(sptr_t style) const;\n\tbool styleUnderline(sptr_t style) const;\n\tsptr_t styleCase(sptr_t style) const;\n\tsptr_t styleCharacterSet(sptr_t style) const;\n\tbool styleVisible(sptr_t style) const;\n\tbool styleChangeable(sptr_t style) const;\n\tbool styleHotSpot(sptr_t style) const;\n\tvoid styleSetCase(sptr_t style, sptr_t caseVisible);\n\tvoid styleSetSizeFractional(sptr_t style, sptr_t sizeHundredthPoints);\n\tsptr_t styleSizeFractional(sptr_t style) const;\n\tvoid styleSetWeight(sptr_t style, sptr_t weight);\n\tsptr_t styleWeight(sptr_t style) const;\n\tvoid styleSetCharacterSet(sptr_t style, sptr_t characterSet);\n\tvoid styleSetHotSpot(sptr_t style, bool hotspot);\n\tvoid styleSetCheckMonospaced(sptr_t style, bool checkMonospaced);\n\tbool styleCheckMonospaced(sptr_t style) const;\n\tvoid styleSetInvisibleRepresentation(sptr_t style, const char * representation);\n\tQByteArray styleInvisibleRepresentation(sptr_t style) const;\n\tvoid setElementColour(sptr_t element, sptr_t colourElement);\n\tsptr_t elementColour(sptr_t element) const;\n\tvoid resetElementColour(sptr_t element);\n\tbool elementIsSet(sptr_t element) const;\n\tbool elementAllowsTranslucent(sptr_t element) const;\n\tsptr_t elementBaseColour(sptr_t element) const;\n\tvoid setSelFore(bool useSetting, sptr_t fore);\n\tvoid setSelBack(bool useSetting, sptr_t back);\n\tsptr_t selAlpha() const;\n\tvoid setSelAlpha(sptr_t alpha);\n\tbool selEOLFilled() const;\n\tvoid setSelEOLFilled(bool filled);\n\tsptr_t selectionLayer() const;\n\tvoid setSelectionLayer(sptr_t layer);\n\tsptr_t caretLineLayer() const;\n\tvoid setCaretLineLayer(sptr_t layer);\n\tbool caretLineHighlightSubLine() const;\n\tvoid setCaretLineHighlightSubLine(bool subLine);\n\tvoid setCaretFore(sptr_t fore);\n\tvoid assignCmdKey(sptr_t keyDefinition, sptr_t sciCommand);\n\tvoid clearCmdKey(sptr_t keyDefinition);\n\tvoid clearAllCmdKeys();\n\tvoid setStylingEx(sptr_t length, const char * styles);\n\tvoid styleSetVisible(sptr_t style, bool visible);\n\tsptr_t caretPeriod() const;\n\tvoid setCaretPeriod(sptr_t periodMilliseconds);\n\tvoid setWordChars(const char * characters);\n\tQByteArray wordChars() const;\n\tvoid setCharacterCategoryOptimization(sptr_t countCharacters);\n\tsptr_t characterCategoryOptimization() const;\n\tvoid beginUndoAction();\n\tvoid endUndoAction();\n\tsptr_t undoActions() const;\n\tvoid setUndoSavePoint(sptr_t action);\n\tsptr_t undoSavePoint() const;\n\tvoid setUndoDetach(sptr_t action);\n\tsptr_t undoDetach() const;\n\tvoid setUndoTentative(sptr_t action);\n\tsptr_t undoTentative() const;\n\tvoid setUndoCurrent(sptr_t action);\n\tsptr_t undoCurrent() const;\n\tvoid pushUndoActionType(sptr_t type, sptr_t pos);\n\tvoid changeLastUndoActionText(sptr_t length, const char * text);\n\tsptr_t undoActionType(sptr_t action) const;\n\tsptr_t undoActionPosition(sptr_t action) const;\n\tQByteArray undoActionText(sptr_t action) const;\n\tvoid indicSetStyle(sptr_t indicator, sptr_t indicatorStyle);\n\tsptr_t indicStyle(sptr_t indicator) const;\n\tvoid indicSetFore(sptr_t indicator, sptr_t fore);\n\tsptr_t indicFore(sptr_t indicator) const;\n\tvoid indicSetUnder(sptr_t indicator, bool under);\n\tbool indicUnder(sptr_t indicator) const;\n\tvoid indicSetHoverStyle(sptr_t indicator, sptr_t indicatorStyle);\n\tsptr_t indicHoverStyle(sptr_t indicator) const;\n\tvoid indicSetHoverFore(sptr_t indicator, sptr_t fore);\n\tsptr_t indicHoverFore(sptr_t indicator) const;\n\tvoid indicSetFlags(sptr_t indicator, sptr_t flags);\n\tsptr_t indicFlags(sptr_t indicator) const;\n\tvoid indicSetStrokeWidth(sptr_t indicator, sptr_t hundredths);\n\tsptr_t indicStrokeWidth(sptr_t indicator) const;\n\tvoid setWhitespaceFore(bool useSetting, sptr_t fore);\n\tvoid setWhitespaceBack(bool useSetting, sptr_t back);\n\tvoid setWhitespaceSize(sptr_t size);\n\tsptr_t whitespaceSize() const;\n\tvoid setLineState(sptr_t line, sptr_t state);\n\tsptr_t lineState(sptr_t line) const;\n\tsptr_t maxLineState() const;\n\tbool caretLineVisible() const;\n\tvoid setCaretLineVisible(bool show);\n\tsptr_t caretLineBack() const;\n\tvoid setCaretLineBack(sptr_t back);\n\tsptr_t caretLineFrame() const;\n\tvoid setCaretLineFrame(sptr_t width);\n\tvoid styleSetChangeable(sptr_t style, bool changeable);\n\tvoid autoCShow(sptr_t lengthEntered, const char * itemList);\n\tvoid autoCCancel();\n\tbool autoCActive();\n\tsptr_t autoCPosStart();\n\tvoid autoCComplete();\n\tvoid autoCStops(const char * characterSet);\n\tvoid autoCSetSeparator(sptr_t separatorCharacter);\n\tsptr_t autoCSeparator() const;\n\tvoid autoCSelect(const char * select);\n\tvoid autoCSetCancelAtStart(bool cancel);\n\tbool autoCCancelAtStart() const;\n\tvoid autoCSetFillUps(const char * characterSet);\n\tvoid autoCSetChooseSingle(bool chooseSingle);\n\tbool autoCChooseSingle() const;\n\tvoid autoCSetIgnoreCase(bool ignoreCase);\n\tbool autoCIgnoreCase() const;\n\tvoid userListShow(sptr_t listType, const char * itemList);\n\tvoid autoCSetAutoHide(bool autoHide);\n\tbool autoCAutoHide() const;\n\tvoid autoCSetOptions(sptr_t options);\n\tsptr_t autoCOptions() const;\n\tvoid autoCSetDropRestOfWord(bool dropRestOfWord);\n\tbool autoCDropRestOfWord() const;\n\tvoid registerImage(sptr_t type, const char * xpmData);\n\tvoid clearRegisteredImages();\n\tsptr_t autoCTypeSeparator() const;\n\tvoid autoCSetTypeSeparator(sptr_t separatorCharacter);\n\tvoid autoCSetMaxWidth(sptr_t characterCount);\n\tsptr_t autoCMaxWidth() const;\n\tvoid autoCSetMaxHeight(sptr_t rowCount);\n\tsptr_t autoCMaxHeight() const;\n\tvoid setIndent(sptr_t indentSize);\n\tsptr_t indent() const;\n\tvoid setUseTabs(bool useTabs);\n\tbool useTabs() const;\n\tvoid setLineIndentation(sptr_t line, sptr_t indentation);\n\tsptr_t lineIndentation(sptr_t line) const;\n\tsptr_t lineIndentPosition(sptr_t line) const;\n\tsptr_t column(sptr_t pos) const;\n\tsptr_t countCharacters(sptr_t start, sptr_t end);\n\tsptr_t countCodeUnits(sptr_t start, sptr_t end);\n\tvoid setHScrollBar(bool visible);\n\tbool hScrollBar() const;\n\tvoid setIndentationGuides(sptr_t indentView);\n\tsptr_t indentationGuides() const;\n\tvoid setHighlightGuide(sptr_t column);\n\tsptr_t highlightGuide() const;\n\tsptr_t lineEndPosition(sptr_t line) const;\n\tsptr_t codePage() const;\n\tsptr_t caretFore() const;\n\tbool readOnly() const;\n\tvoid setCurrentPos(sptr_t caret);\n\tvoid setSelectionStart(sptr_t anchor);\n\tsptr_t selectionStart() const;\n\tvoid setSelectionEnd(sptr_t caret);\n\tsptr_t selectionEnd() const;\n\tvoid setEmptySelection(sptr_t caret);\n\tvoid setPrintMagnification(sptr_t magnification);\n\tsptr_t printMagnification() const;\n\tvoid setPrintColourMode(sptr_t mode);\n\tsptr_t printColourMode() const;\n\tvoid setChangeHistory(sptr_t changeHistory);\n\tsptr_t changeHistory() const;\n\tsptr_t firstVisibleLine() const;\n\tQByteArray getLine(sptr_t line);\n\tsptr_t lineCount() const;\n\tvoid allocateLines(sptr_t lines);\n\tvoid setMarginLeft(sptr_t pixelWidth);\n\tsptr_t marginLeft() const;\n\tvoid setMarginRight(sptr_t pixelWidth);\n\tsptr_t marginRight() const;\n\tbool modify() const;\n\tvoid setSel(sptr_t anchor, sptr_t caret);\n\tQByteArray getSelText();\n\tvoid hideSelection(bool hide);\n\tbool selectionHidden() const;\n\tsptr_t pointXFromPosition(sptr_t pos);\n\tsptr_t pointYFromPosition(sptr_t pos);\n\tsptr_t lineFromPosition(sptr_t pos);\n\tsptr_t positionFromLine(sptr_t line);\n\tvoid lineScroll(sptr_t columns, sptr_t lines);\n\tvoid scrollCaret();\n\tvoid scrollRange(sptr_t secondary, sptr_t primary);\n\tvoid replaceSel(const char * text);\n\tvoid setReadOnly(bool readOnly);\n\tvoid null();\n\tbool canPaste();\n\tbool canUndo();\n\tvoid emptyUndoBuffer();\n\tvoid undo();\n\tvoid cut();\n\tvoid copy();\n\tvoid paste();\n\tvoid clear();\n\tvoid setText(const char * text);\n\tQByteArray getText(sptr_t length);\n\tsptr_t textLength() const;\n\tsptr_t directFunction() const;\n\tsptr_t directStatusFunction() const;\n\tsptr_t directPointer() const;\n\tvoid setOvertype(bool overType);\n\tbool overtype() const;\n\tvoid setCaretWidth(sptr_t pixelWidth);\n\tsptr_t caretWidth() const;\n\tvoid setTargetStart(sptr_t start);\n\tsptr_t targetStart() const;\n\tvoid setTargetStartVirtualSpace(sptr_t space);\n\tsptr_t targetStartVirtualSpace() const;\n\tvoid setTargetEnd(sptr_t end);\n\tsptr_t targetEnd() const;\n\tvoid setTargetEndVirtualSpace(sptr_t space);\n\tsptr_t targetEndVirtualSpace() const;\n\tvoid setTargetRange(sptr_t start, sptr_t end);\n\tQByteArray targetText() const;\n\tvoid targetFromSelection();\n\tvoid targetWholeDocument();\n\tsptr_t replaceTarget(sptr_t length, const char * text);\n\tsptr_t replaceTargetRE(sptr_t length, const char * text);\n\tsptr_t replaceTargetMinimal(sptr_t length, const char * text);\n\tsptr_t searchInTarget(sptr_t length, const char * text);\n\tvoid setSearchFlags(sptr_t searchFlags);\n\tsptr_t searchFlags() const;\n\tvoid callTipShow(sptr_t pos, const char * definition);\n\tvoid callTipCancel();\n\tbool callTipActive();\n\tsptr_t callTipPosStart();\n\tvoid callTipSetPosStart(sptr_t posStart);\n\tvoid callTipSetHlt(sptr_t highlightStart, sptr_t highlightEnd);\n\tvoid callTipSetBack(sptr_t back);\n\tvoid callTipSetFore(sptr_t fore);\n\tvoid callTipSetForeHlt(sptr_t fore);\n\tvoid callTipUseStyle(sptr_t tabSize);\n\tvoid callTipSetPosition(bool above);\n\tsptr_t visibleFromDocLine(sptr_t docLine);\n\tsptr_t docLineFromVisible(sptr_t displayLine);\n\tsptr_t wrapCount(sptr_t docLine);\n\tvoid setFoldLevel(sptr_t line, sptr_t level);\n\tsptr_t foldLevel(sptr_t line) const;\n\tsptr_t lastChild(sptr_t line, sptr_t level) const;\n\tsptr_t foldParent(sptr_t line) const;\n\tvoid showLines(sptr_t lineStart, sptr_t lineEnd);\n\tvoid hideLines(sptr_t lineStart, sptr_t lineEnd);\n\tbool lineVisible(sptr_t line) const;\n\tbool allLinesVisible() const;\n\tvoid setFoldExpanded(sptr_t line, bool expanded);\n\tbool foldExpanded(sptr_t line) const;\n\tvoid toggleFold(sptr_t line);\n\tvoid toggleFoldShowText(sptr_t line, const char * text);\n\tvoid foldDisplayTextSetStyle(sptr_t style);\n\tsptr_t foldDisplayTextStyle() const;\n\tvoid setDefaultFoldDisplayText(const char * text);\n\tQByteArray getDefaultFoldDisplayText();\n\tvoid foldLine(sptr_t line, sptr_t action);\n\tvoid foldChildren(sptr_t line, sptr_t action);\n\tvoid expandChildren(sptr_t line, sptr_t level);\n\tvoid foldAll(sptr_t action);\n\tvoid ensureVisible(sptr_t line);\n\tvoid setAutomaticFold(sptr_t automaticFold);\n\tsptr_t automaticFold() const;\n\tvoid setFoldFlags(sptr_t flags);\n\tvoid ensureVisibleEnforcePolicy(sptr_t line);\n\tvoid setTabIndents(bool tabIndents);\n\tbool tabIndents() const;\n\tvoid setBackSpaceUnIndents(bool bsUnIndents);\n\tbool backSpaceUnIndents() const;\n\tvoid setMouseDwellTime(sptr_t periodMilliseconds);\n\tsptr_t mouseDwellTime() const;\n\tsptr_t wordStartPosition(sptr_t pos, bool onlyWordCharacters);\n\tsptr_t wordEndPosition(sptr_t pos, bool onlyWordCharacters);\n\tbool isRangeWord(sptr_t start, sptr_t end);\n\tvoid setIdleStyling(sptr_t idleStyling);\n\tsptr_t idleStyling() const;\n\tvoid setWrapMode(sptr_t wrapMode);\n\tsptr_t wrapMode() const;\n\tvoid setWrapVisualFlags(sptr_t wrapVisualFlags);\n\tsptr_t wrapVisualFlags() const;\n\tvoid setWrapVisualFlagsLocation(sptr_t wrapVisualFlagsLocation);\n\tsptr_t wrapVisualFlagsLocation() const;\n\tvoid setWrapStartIndent(sptr_t indent);\n\tsptr_t wrapStartIndent() const;\n\tvoid setWrapIndentMode(sptr_t wrapIndentMode);\n\tsptr_t wrapIndentMode() const;\n\tvoid setLayoutCache(sptr_t cacheMode);\n\tsptr_t layoutCache() const;\n\tvoid setScrollWidth(sptr_t pixelWidth);\n\tsptr_t scrollWidth() const;\n\tvoid setScrollWidthTracking(bool tracking);\n\tbool scrollWidthTracking() const;\n\tsptr_t textWidth(sptr_t style, const char * text);\n\tvoid setEndAtLastLine(bool endAtLastLine);\n\tbool endAtLastLine() const;\n\tsptr_t textHeight(sptr_t line);\n\tvoid setVScrollBar(bool visible);\n\tbool vScrollBar() const;\n\tvoid appendText(sptr_t length, const char * text);\n\tsptr_t phasesDraw() const;\n\tvoid setPhasesDraw(sptr_t phases);\n\tvoid setFontQuality(sptr_t fontQuality);\n\tsptr_t fontQuality() const;\n\tvoid setFirstVisibleLine(sptr_t displayLine);\n\tvoid setMultiPaste(sptr_t multiPaste);\n\tsptr_t multiPaste() const;\n\tQByteArray tag(sptr_t tagNumber) const;\n\tvoid linesJoin();\n\tvoid linesSplit(sptr_t pixelWidth);\n\tvoid setFoldMarginColour(bool useSetting, sptr_t back);\n\tvoid setFoldMarginHiColour(bool useSetting, sptr_t fore);\n\tvoid setAccessibility(sptr_t accessibility);\n\tsptr_t accessibility() const;\n\tvoid lineDown();\n\tvoid lineDownExtend();\n\tvoid lineUp();\n\tvoid lineUpExtend();\n\tvoid charLeft();\n\tvoid charLeftExtend();\n\tvoid charRight();\n\tvoid charRightExtend();\n\tvoid wordLeft();\n\tvoid wordLeftExtend();\n\tvoid wordRight();\n\tvoid wordRightExtend();\n\tvoid home();\n\tvoid homeExtend();\n\tvoid lineEnd();\n\tvoid lineEndExtend();\n\tvoid documentStart();\n\tvoid documentStartExtend();\n\tvoid documentEnd();\n\tvoid documentEndExtend();\n\tvoid pageUp();\n\tvoid pageUpExtend();\n\tvoid pageDown();\n\tvoid pageDownExtend();\n\tvoid editToggleOvertype();\n\tvoid cancel();\n\tvoid deleteBack();\n\tvoid tab();\n\tvoid backTab();\n\tvoid newLine();\n\tvoid formFeed();\n\tvoid vCHome();\n\tvoid vCHomeExtend();\n\tvoid zoomIn();\n\tvoid zoomOut();\n\tvoid delWordLeft();\n\tvoid delWordRight();\n\tvoid delWordRightEnd();\n\tvoid lineCut();\n\tvoid lineDelete();\n\tvoid lineTranspose();\n\tvoid lineReverse();\n\tvoid lineDuplicate();\n\tvoid lowerCase();\n\tvoid upperCase();\n\tvoid lineScrollDown();\n\tvoid lineScrollUp();\n\tvoid deleteBackNotLine();\n\tvoid homeDisplay();\n\tvoid homeDisplayExtend();\n\tvoid lineEndDisplay();\n\tvoid lineEndDisplayExtend();\n\tvoid homeWrap();\n\tvoid homeWrapExtend();\n\tvoid lineEndWrap();\n\tvoid lineEndWrapExtend();\n\tvoid vCHomeWrap();\n\tvoid vCHomeWrapExtend();\n\tvoid lineCopy();\n\tvoid moveCaretInsideView();\n\tsptr_t lineLength(sptr_t line);\n\tvoid braceHighlight(sptr_t posA, sptr_t posB);\n\tvoid braceHighlightIndicator(bool useSetting, sptr_t indicator);\n\tvoid braceBadLight(sptr_t pos);\n\tvoid braceBadLightIndicator(bool useSetting, sptr_t indicator);\n\tsptr_t braceMatch(sptr_t pos, sptr_t maxReStyle);\n\tsptr_t braceMatchNext(sptr_t pos, sptr_t startPos);\n\tbool viewEOL() const;\n\tvoid setViewEOL(bool visible);\n\tsptr_t docPointer() const;\n\tvoid setDocPointer(sptr_t doc);\n\tvoid setModEventMask(sptr_t eventMask);\n\tsptr_t edgeColumn() const;\n\tvoid setEdgeColumn(sptr_t column);\n\tsptr_t edgeMode() const;\n\tvoid setEdgeMode(sptr_t edgeMode);\n\tsptr_t edgeColour() const;\n\tvoid setEdgeColour(sptr_t edgeColour);\n\tvoid multiEdgeAddLine(sptr_t column, sptr_t edgeColour);\n\tvoid multiEdgeClearAll();\n\tsptr_t multiEdgeColumn(sptr_t which) const;\n\tvoid searchAnchor();\n\tsptr_t searchNext(sptr_t searchFlags, const char * text);\n\tsptr_t searchPrev(sptr_t searchFlags, const char * text);\n\tsptr_t linesOnScreen() const;\n\tvoid usePopUp(sptr_t popUpMode);\n\tbool selectionIsRectangle() const;\n\tvoid setZoom(sptr_t zoomInPoints);\n\tsptr_t zoom() const;\n\tsptr_t createDocument(sptr_t bytes, sptr_t documentOptions);\n\tvoid addRefDocument(sptr_t doc);\n\tvoid releaseDocument(sptr_t doc);\n\tsptr_t documentOptions() const;\n\tsptr_t modEventMask() const;\n\tvoid setCommandEvents(bool commandEvents);\n\tbool commandEvents() const;\n\tvoid setFocus(bool focus);\n\tbool focus() const;\n\tvoid setStatus(sptr_t status);\n\tsptr_t status() const;\n\tvoid setMouseDownCaptures(bool captures);\n\tbool mouseDownCaptures() const;\n\tvoid setMouseWheelCaptures(bool captures);\n\tbool mouseWheelCaptures() const;\n\tvoid setCursor(sptr_t cursorType);\n\tsptr_t cursor() const;\n\tvoid setControlCharSymbol(sptr_t symbol);\n\tsptr_t controlCharSymbol() const;\n\tvoid wordPartLeft();\n\tvoid wordPartLeftExtend();\n\tvoid wordPartRight();\n\tvoid wordPartRightExtend();\n\tvoid setVisiblePolicy(sptr_t visiblePolicy, sptr_t visibleSlop);\n\tvoid delLineLeft();\n\tvoid delLineRight();\n\tvoid setXOffset(sptr_t xOffset);\n\tsptr_t xOffset() const;\n\tvoid chooseCaretX();\n\tvoid grabFocus();\n\tvoid setXCaretPolicy(sptr_t caretPolicy, sptr_t caretSlop);\n\tvoid setYCaretPolicy(sptr_t caretPolicy, sptr_t caretSlop);\n\tvoid setPrintWrapMode(sptr_t wrapMode);\n\tsptr_t printWrapMode() const;\n\tvoid setHotspotActiveFore(bool useSetting, sptr_t fore);\n\tsptr_t hotspotActiveFore() const;\n\tvoid setHotspotActiveBack(bool useSetting, sptr_t back);\n\tsptr_t hotspotActiveBack() const;\n\tvoid setHotspotActiveUnderline(bool underline);\n\tbool hotspotActiveUnderline() const;\n\tvoid setHotspotSingleLine(bool singleLine);\n\tbool hotspotSingleLine() const;\n\tvoid paraDown();\n\tvoid paraDownExtend();\n\tvoid paraUp();\n\tvoid paraUpExtend();\n\tsptr_t positionBefore(sptr_t pos);\n\tsptr_t positionAfter(sptr_t pos);\n\tsptr_t positionRelative(sptr_t pos, sptr_t relative);\n\tsptr_t positionRelativeCodeUnits(sptr_t pos, sptr_t relative);\n\tvoid copyRange(sptr_t start, sptr_t end);\n\tvoid copyText(sptr_t length, const char * text);\n\tvoid setSelectionMode(sptr_t selectionMode);\n\tvoid changeSelectionMode(sptr_t selectionMode);\n\tsptr_t selectionMode() const;\n\tvoid setMoveExtendsSelection(bool moveExtendsSelection);\n\tbool moveExtendsSelection() const;\n\tsptr_t getLineSelStartPosition(sptr_t line);\n\tsptr_t getLineSelEndPosition(sptr_t line);\n\tvoid lineDownRectExtend();\n\tvoid lineUpRectExtend();\n\tvoid charLeftRectExtend();\n\tvoid charRightRectExtend();\n\tvoid homeRectExtend();\n\tvoid vCHomeRectExtend();\n\tvoid lineEndRectExtend();\n\tvoid pageUpRectExtend();\n\tvoid pageDownRectExtend();\n\tvoid stutteredPageUp();\n\tvoid stutteredPageUpExtend();\n\tvoid stutteredPageDown();\n\tvoid stutteredPageDownExtend();\n\tvoid wordLeftEnd();\n\tvoid wordLeftEndExtend();\n\tvoid wordRightEnd();\n\tvoid wordRightEndExtend();\n\tvoid setWhitespaceChars(const char * characters);\n\tQByteArray whitespaceChars() const;\n\tvoid setPunctuationChars(const char * characters);\n\tQByteArray punctuationChars() const;\n\tvoid setCharsDefault();\n\tsptr_t autoCCurrent() const;\n\tQByteArray autoCCurrentText() const;\n\tvoid autoCSetCaseInsensitiveBehaviour(sptr_t behaviour);\n\tsptr_t autoCCaseInsensitiveBehaviour() const;\n\tvoid autoCSetMulti(sptr_t multi);\n\tsptr_t autoCMulti() const;\n\tvoid autoCSetOrder(sptr_t order);\n\tsptr_t autoCOrder() const;\n\tvoid allocate(sptr_t bytes);\n\tQByteArray targetAsUTF8();\n\tvoid setLengthForEncode(sptr_t bytes);\n\tQByteArray encodedFromUTF8(const char * utf8);\n\tsptr_t findColumn(sptr_t line, sptr_t column);\n\tsptr_t caretSticky() const;\n\tvoid setCaretSticky(sptr_t useCaretStickyBehaviour);\n\tvoid toggleCaretSticky();\n\tvoid setPasteConvertEndings(bool convert);\n\tbool pasteConvertEndings() const;\n\tvoid replaceRectangular(sptr_t length, const char * text);\n\tvoid selectionDuplicate();\n\tvoid setCaretLineBackAlpha(sptr_t alpha);\n\tsptr_t caretLineBackAlpha() const;\n\tvoid setCaretStyle(sptr_t caretStyle);\n\tsptr_t caretStyle() const;\n\tvoid setIndicatorCurrent(sptr_t indicator);\n\tsptr_t indicatorCurrent() const;\n\tvoid setIndicatorValue(sptr_t value);\n\tsptr_t indicatorValue() const;\n\tvoid indicatorFillRange(sptr_t start, sptr_t lengthFill);\n\tvoid indicatorClearRange(sptr_t start, sptr_t lengthClear);\n\tsptr_t indicatorAllOnFor(sptr_t pos);\n\tsptr_t indicatorValueAt(sptr_t indicator, sptr_t pos);\n\tsptr_t indicatorStart(sptr_t indicator, sptr_t pos);\n\tsptr_t indicatorEnd(sptr_t indicator, sptr_t pos);\n\tvoid setPositionCache(sptr_t size);\n\tsptr_t positionCache() const;\n\tvoid setLayoutThreads(sptr_t threads);\n\tsptr_t layoutThreads() const;\n\tvoid copyAllowLine();\n\tsptr_t characterPointer() const;\n\tsptr_t rangePointer(sptr_t start, sptr_t lengthRange) const;\n\tsptr_t gapPosition() const;\n\tvoid indicSetAlpha(sptr_t indicator, sptr_t alpha);\n\tsptr_t indicAlpha(sptr_t indicator) const;\n\tvoid indicSetOutlineAlpha(sptr_t indicator, sptr_t alpha);\n\tsptr_t indicOutlineAlpha(sptr_t indicator) const;\n\tvoid setExtraAscent(sptr_t extraAscent);\n\tsptr_t extraAscent() const;\n\tvoid setExtraDescent(sptr_t extraDescent);\n\tsptr_t extraDescent() const;\n\tsptr_t markerSymbolDefined(sptr_t markerNumber);\n\tvoid marginSetText(sptr_t line, const char * text);\n\tQByteArray marginText(sptr_t line) const;\n\tvoid marginSetStyle(sptr_t line, sptr_t style);\n\tsptr_t marginStyle(sptr_t line) const;\n\tvoid marginSetStyles(sptr_t line, const char * styles);\n\tQByteArray marginStyles(sptr_t line) const;\n\tvoid marginTextClearAll();\n\tvoid marginSetStyleOffset(sptr_t style);\n\tsptr_t marginStyleOffset() const;\n\tvoid setMarginOptions(sptr_t marginOptions);\n\tsptr_t marginOptions() const;\n\tvoid annotationSetText(sptr_t line, const char * text);\n\tQByteArray annotationText(sptr_t line) const;\n\tvoid annotationSetStyle(sptr_t line, sptr_t style);\n\tsptr_t annotationStyle(sptr_t line) const;\n\tvoid annotationSetStyles(sptr_t line, const char * styles);\n\tQByteArray annotationStyles(sptr_t line) const;\n\tsptr_t annotationLines(sptr_t line) const;\n\tvoid annotationClearAll();\n\tvoid annotationSetVisible(sptr_t visible);\n\tsptr_t annotationVisible() const;\n\tvoid annotationSetStyleOffset(sptr_t style);\n\tsptr_t annotationStyleOffset() const;\n\tvoid releaseAllExtendedStyles();\n\tsptr_t allocateExtendedStyles(sptr_t numberStyles);\n\tvoid addUndoAction(sptr_t token, sptr_t flags);\n\tsptr_t charPositionFromPoint(sptr_t x, sptr_t y);\n\tsptr_t charPositionFromPointClose(sptr_t x, sptr_t y);\n\tvoid setMouseSelectionRectangularSwitch(bool mouseSelectionRectangularSwitch);\n\tbool mouseSelectionRectangularSwitch() const;\n\tvoid setMultipleSelection(bool multipleSelection);\n\tbool multipleSelection() const;\n\tvoid setAdditionalSelectionTyping(bool additionalSelectionTyping);\n\tbool additionalSelectionTyping() const;\n\tvoid setAdditionalCaretsBlink(bool additionalCaretsBlink);\n\tbool additionalCaretsBlink() const;\n\tvoid setAdditionalCaretsVisible(bool additionalCaretsVisible);\n\tbool additionalCaretsVisible() const;\n\tsptr_t selections() const;\n\tbool selectionEmpty() const;\n\tvoid clearSelections();\n\tvoid setSelection(sptr_t caret, sptr_t anchor);\n\tvoid addSelection(sptr_t caret, sptr_t anchor);\n\tsptr_t selectionFromPoint(sptr_t x, sptr_t y);\n\tvoid dropSelectionN(sptr_t selection);\n\tvoid setMainSelection(sptr_t selection);\n\tsptr_t mainSelection() const;\n\tvoid setSelectionNCaret(sptr_t selection, sptr_t caret);\n\tsptr_t selectionNCaret(sptr_t selection) const;\n\tvoid setSelectionNAnchor(sptr_t selection, sptr_t anchor);\n\tsptr_t selectionNAnchor(sptr_t selection) const;\n\tvoid setSelectionNCaretVirtualSpace(sptr_t selection, sptr_t space);\n\tsptr_t selectionNCaretVirtualSpace(sptr_t selection) const;\n\tvoid setSelectionNAnchorVirtualSpace(sptr_t selection, sptr_t space);\n\tsptr_t selectionNAnchorVirtualSpace(sptr_t selection) const;\n\tvoid setSelectionNStart(sptr_t selection, sptr_t anchor);\n\tsptr_t selectionNStart(sptr_t selection) const;\n\tsptr_t selectionNStartVirtualSpace(sptr_t selection) const;\n\tvoid setSelectionNEnd(sptr_t selection, sptr_t caret);\n\tsptr_t selectionNEndVirtualSpace(sptr_t selection) const;\n\tsptr_t selectionNEnd(sptr_t selection) const;\n\tvoid setRectangularSelectionCaret(sptr_t caret);\n\tsptr_t rectangularSelectionCaret() const;\n\tvoid setRectangularSelectionAnchor(sptr_t anchor);\n\tsptr_t rectangularSelectionAnchor() const;\n\tvoid setRectangularSelectionCaretVirtualSpace(sptr_t space);\n\tsptr_t rectangularSelectionCaretVirtualSpace() const;\n\tvoid setRectangularSelectionAnchorVirtualSpace(sptr_t space);\n\tsptr_t rectangularSelectionAnchorVirtualSpace() const;\n\tvoid setVirtualSpaceOptions(sptr_t virtualSpaceOptions);\n\tsptr_t virtualSpaceOptions() const;\n\tvoid setRectangularSelectionModifier(sptr_t modifier);\n\tsptr_t rectangularSelectionModifier() const;\n\tvoid setAdditionalSelFore(sptr_t fore);\n\tvoid setAdditionalSelBack(sptr_t back);\n\tvoid setAdditionalSelAlpha(sptr_t alpha);\n\tsptr_t additionalSelAlpha() const;\n\tvoid setAdditionalCaretFore(sptr_t fore);\n\tsptr_t additionalCaretFore() const;\n\tvoid rotateSelection();\n\tvoid swapMainAnchorCaret();\n\tvoid multipleSelectAddNext();\n\tvoid multipleSelectAddEach();\n\tsptr_t changeLexerState(sptr_t start, sptr_t end);\n\tsptr_t contractedFoldNext(sptr_t lineStart);\n\tvoid verticalCentreCaret();\n\tvoid moveSelectedLinesUp();\n\tvoid moveSelectedLinesDown();\n\tvoid setIdentifier(sptr_t identifier);\n\tsptr_t identifier() const;\n\tvoid rGBAImageSetWidth(sptr_t width);\n\tvoid rGBAImageSetHeight(sptr_t height);\n\tvoid rGBAImageSetScale(sptr_t scalePercent);\n\tvoid markerDefineRGBAImage(sptr_t markerNumber, const char * pixels);\n\tvoid registerRGBAImage(sptr_t type, const char * pixels);\n\tvoid scrollToStart();\n\tvoid scrollToEnd();\n\tvoid setTechnology(sptr_t technology);\n\tsptr_t technology() const;\n\tsptr_t createLoader(sptr_t bytes, sptr_t documentOptions);\n\tvoid findIndicatorShow(sptr_t start, sptr_t end);\n\tvoid findIndicatorFlash(sptr_t start, sptr_t end);\n\tvoid findIndicatorHide();\n\tvoid vCHomeDisplay();\n\tvoid vCHomeDisplayExtend();\n\tbool caretLineVisibleAlways() const;\n\tvoid setCaretLineVisibleAlways(bool alwaysVisible);\n\tvoid setLineEndTypesAllowed(sptr_t lineEndBitSet);\n\tsptr_t lineEndTypesAllowed() const;\n\tsptr_t lineEndTypesActive() const;\n\tvoid setRepresentation(const char * encodedCharacter, const char * representation);\n\tQByteArray representation(const char * encodedCharacter) const;\n\tvoid clearRepresentation(const char * encodedCharacter);\n\tvoid clearAllRepresentations();\n\tvoid setRepresentationAppearance(const char * encodedCharacter, sptr_t appearance);\n\tsptr_t representationAppearance(const char * encodedCharacter) const;\n\tvoid setRepresentationColour(const char * encodedCharacter, sptr_t colour);\n\tsptr_t representationColour(const char * encodedCharacter) const;\n\tvoid eOLAnnotationSetText(sptr_t line, const char * text);\n\tQByteArray eOLAnnotationText(sptr_t line) const;\n\tvoid eOLAnnotationSetStyle(sptr_t line, sptr_t style);\n\tsptr_t eOLAnnotationStyle(sptr_t line) const;\n\tvoid eOLAnnotationClearAll();\n\tvoid eOLAnnotationSetVisible(sptr_t visible);\n\tsptr_t eOLAnnotationVisible() const;\n\tvoid eOLAnnotationSetStyleOffset(sptr_t style);\n\tsptr_t eOLAnnotationStyleOffset() const;\n\tbool supportsFeature(sptr_t feature) const;\n\tsptr_t lineCharacterIndex() const;\n\tvoid allocateLineCharacterIndex(sptr_t lineCharacterIndex);\n\tvoid releaseLineCharacterIndex(sptr_t lineCharacterIndex);\n\tsptr_t lineFromIndexPosition(sptr_t pos, sptr_t lineCharacterIndex);\n\tsptr_t indexPositionFromLine(sptr_t line, sptr_t lineCharacterIndex);\n\tvoid startRecord();\n\tvoid stopRecord();\n\tsptr_t lexer() const;\n\tvoid colourise(sptr_t start, sptr_t end);\n\tvoid setProperty(const char * key, const char * value);\n\tvoid setKeyWords(sptr_t keyWordSet, const char * keyWords);\n\tQByteArray property(const char * key) const;\n\tQByteArray propertyExpanded(const char * key) const;\n\tsptr_t propertyInt(const char * key, sptr_t defaultValue) const;\n\tQByteArray lexerLanguage() const;\n\tsptr_t privateLexerCall(sptr_t operation, sptr_t pointer);\n\tQByteArray propertyNames();\n\tsptr_t propertyType(const char * name);\n\tQByteArray describeProperty(const char * name);\n\tQByteArray describeKeyWordSets();\n\tsptr_t lineEndTypesSupported() const;\n\tsptr_t allocateSubStyles(sptr_t styleBase, sptr_t numberStyles);\n\tsptr_t subStylesStart(sptr_t styleBase) const;\n\tsptr_t subStylesLength(sptr_t styleBase) const;\n\tsptr_t styleFromSubStyle(sptr_t subStyle) const;\n\tsptr_t primaryStyleFromStyle(sptr_t style) const;\n\tvoid freeSubStyles();\n\tvoid setIdentifiers(sptr_t style, const char * identifiers);\n\tsptr_t distanceToSecondaryStyles() const;\n\tQByteArray subStyleBases() const;\n\tsptr_t namedStyles() const;\n\tQByteArray nameOfStyle(sptr_t style);\n\tQByteArray tagsOfStyle(sptr_t style);\n\tQByteArray descriptionOfStyle(sptr_t style);\n\tvoid setILexer(sptr_t ilexer);\n\tsptr_t bidirectional() const;\n\tvoid setBidirectional(sptr_t bidirectional);\n/* --Autogenerated -- end of section automatically generated from Scintilla.iface */\n\n};\n\n#if defined(__GNUC__)\n#pragma GCC diagnostic ignored \"-Wmissing-field-initializers\"\n#if !defined(__clang__) && (__GNUC__ >= 8)\n#pragma GCC diagnostic ignored \"-Wcast-function-type\"\n#endif\n#endif\n\n#endif /* SCINTILLAEDIT_H */\n"
  },
  {
    "path": "scintilla/qt/ScintillaEdit/ScintillaEdit.h.template",
    "content": "// @file ScintillaEdit.h\r\n// Extended version of ScintillaEditBase with a method for each API\r\n// Copyright (c) 2011 Archaeopteryx Software, Inc. d/b/a Wingware\r\n\r\n#ifndef SCINTILLAEDIT_H\r\n#define SCINTILLAEDIT_H\r\n\r\n#include <QPair>\r\n\r\n#include \"ScintillaEditBase.h\"\r\n#include \"ScintillaDocument.h\"\r\n\r\n#ifndef EXPORT_IMPORT_API\r\n#ifdef WIN32\r\n#ifdef MAKING_LIBRARY\r\n#define EXPORT_IMPORT_API __declspec(dllexport)\r\n#else\r\n// Defining dllimport upsets moc\r\n#define EXPORT_IMPORT_API __declspec(dllimport)\r\n//#define EXPORT_IMPORT_API\r\n#endif\r\n#else\r\n#define EXPORT_IMPORT_API\r\n#endif\r\n#endif\r\n\r\nclass EXPORT_IMPORT_API ScintillaEdit : public ScintillaEditBase {\r\n\tQ_OBJECT\r\n\r\npublic:\r\n\tScintillaEdit(QWidget *parent = 0);\r\n\tvirtual ~ScintillaEdit();\r\n\r\n\tQByteArray TextReturner(int message, uptr_t wParam) const;\r\n\r\n\tQPair<int, int>find_text(int flags, const char *text, int cpMin, int cpMax);\r\n\tQByteArray get_text_range(int start, int end);\r\n        ScintillaDocument *get_doc();\r\n        void set_doc(ScintillaDocument *pdoc_);\r\n\r\n\t// Same as previous two methods but with Qt style names\r\n\tQPair<int, int>findText(int flags, const char *text, int cpMin, int cpMax) {\r\n\t\treturn find_text(flags, text, cpMin, cpMax);\r\n\t}\r\n\r\n\tQByteArray textRange(int start, int end) {\r\n\t\treturn get_text_range(start, end);\r\n\t}\r\n\r\n\t// Exposing the FORMATRANGE api with both underscore & qt style names\r\n\tlong format_range(bool draw, QPaintDevice* target, QPaintDevice* measure,\r\n\t\t\t   const QRect& print_rect, const QRect& page_rect,\r\n                          long range_start, long range_end);\r\n\tlong formatRange(bool draw, QPaintDevice* target, QPaintDevice* measure,\r\n                         const QRect& print_rect, const QRect& page_rect,\r\n                         long range_start, long range_end) {\r\n\t\treturn format_range(draw, target, measure, print_rect, page_rect,\r\n\t\t                    range_start, range_end);\r\n\t}\r\n\r\n/* ++Autogenerated -- start of section automatically generated from Scintilla.iface */\r\n/* --Autogenerated -- end of section automatically generated from Scintilla.iface */\r\n\r\n};\r\n\r\n#if defined(__GNUC__)\r\n#pragma GCC diagnostic ignored \"-Wmissing-field-initializers\"\r\n#if !defined(__clang__) && (__GNUC__ >= 8)\r\n#pragma GCC diagnostic ignored \"-Wcast-function-type\"\r\n#endif\r\n#endif\r\n\r\n#endif /* SCINTILLAEDIT_H */\r\n"
  },
  {
    "path": "scintilla/qt/ScintillaEdit/ScintillaEdit.pro",
    "content": "#-------------------------------------------------\r\n#\r\n# Project created by QtCreator 2011-05-05T12:41:23\r\n#\r\n#-------------------------------------------------\r\n\r\nQT       += core gui\r\ngreaterThan(QT_MAJOR_VERSION, 4): QT += widgets\r\nequals(QT_MAJOR_VERSION, 6): QT += core5compat\r\n\r\nTARGET = ScintillaEdit\r\nTEMPLATE = lib\r\nCONFIG += lib_bundle\r\nCONFIG += c++1z\r\n\r\nVERSION = 5.5.0\r\n\r\nSOURCES += \\\r\n    ScintillaEdit.cpp \\\r\n    ScintillaDocument.cpp \\\r\n    ../ScintillaEditBase/PlatQt.cpp \\\r\n    ../ScintillaEditBase/ScintillaQt.cpp \\\r\n    ../ScintillaEditBase/ScintillaEditBase.cpp \\\r\n    ../../src/XPM.cxx \\\r\n    ../../src/ViewStyle.cxx \\\r\n    ../../src/UndoHistory.cxx \\\r\n    ../../src/UniqueString.cxx \\\r\n    ../../src/UniConversion.cxx \\\r\n    ../../src/Style.cxx \\\r\n    ../../src/Selection.cxx \\\r\n    ../../src/ScintillaBase.cxx \\\r\n    ../../src/RunStyles.cxx \\\r\n    ../../src/RESearch.cxx \\\r\n    ../../src/PositionCache.cxx \\\r\n    ../../src/PerLine.cxx \\\r\n    ../../src/MarginView.cxx \\\r\n    ../../src/LineMarker.cxx \\\r\n    ../../src/KeyMap.cxx \\\r\n    ../../src/Indicator.cxx \\\r\n    ../../src/Geometry.cxx \\\r\n    ../../src/EditView.cxx \\\r\n    ../../src/Editor.cxx \\\r\n    ../../src/EditModel.cxx \\\r\n    ../../src/Document.cxx \\\r\n    ../../src/Decoration.cxx \\\r\n    ../../src/DBCS.cxx \\\r\n    ../../src/ContractionState.cxx \\\r\n    ../../src/CharClassify.cxx \\\r\n    ../../src/CharacterType.cxx \\\r\n    ../../src/CharacterCategoryMap.cxx \\\r\n    ../../src/ChangeHistory.cxx \\\r\n    ../../src/CellBuffer.cxx \\\r\n    ../../src/CaseFolder.cxx \\\r\n    ../../src/CaseConvert.cxx \\\r\n    ../../src/CallTip.cxx \\\r\n    ../../src/AutoComplete.cxx\r\n\r\nHEADERS  += \\\r\n    ScintillaEdit.h \\\r\n    ScintillaDocument.h \\\r\n    ../ScintillaEditBase/ScintillaEditBase.h \\\r\n    ../ScintillaEditBase/ScintillaQt.h\r\n\r\nOTHER_FILES +=\r\n\r\nINCLUDEPATH += ../ScintillaEditBase ../../include ../../src\r\n\r\nDEFINES += SCINTILLA_QT=1 MAKING_LIBRARY=1\r\nCONFIG(release, debug|release) {\r\n    DEFINES += NDEBUG=1\r\n}\r\n\r\nDESTDIR = ../../bin\r\nDLLDESTDIR = ../../bin\r\n\r\nmacx {\r\n\tQMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../Frameworks/\r\n}\r\n"
  },
  {
    "path": "scintilla/qt/ScintillaEdit/WidgetGen.py",
    "content": "#!/usr/bin/env python3\r\n# WidgetGen.py - regenerate the ScintillaEdit.cpp and ScintillaEdit.h files\r\n# Check that API includes all gtkscintilla2 functions\r\n\r\nimport sys\r\nimport os\r\nimport getopt\r\n\r\nscintillaDirectory = \"../..\"\r\nscintillaScriptsDirectory = os.path.join(scintillaDirectory, \"scripts\")\r\nsys.path.append(scintillaScriptsDirectory)\r\nimport Face\r\nfrom FileGenerator import GenerateFile\r\n\r\ndef underscoreName(s):\r\n\t# Name conversion fixes to match gtkscintilla2\r\n\tirregular = ['WS', 'EOL', 'AutoC', 'KeyWords', 'BackSpace', 'UnIndents', 'RE', 'RGBA']\r\n\tfor word in irregular:\r\n\t\treplacement = word[0] + word[1:].lower()\r\n\t\ts = s.replace(word, replacement)\r\n\r\n\tout = \"\"\r\n\tfor c in s:\r\n\t\tif c.isupper():\r\n\t\t\tif out:\r\n\t\t\t\tout += \"_\"\r\n\t\t\tout += c.lower()\r\n\t\telse:\r\n\t\t\tout += c\r\n\treturn out\r\n\r\ndef normalisedName(s, options, role=None):\r\n\tif options[\"qtStyle\"]:\r\n\t\tif role == \"get\":\r\n\t\t\ts = s.replace(\"Get\", \"\")\r\n\t\treturn s[0].lower() + s[1:]\r\n\telse:\r\n\t\treturn underscoreName(s)\r\n\r\ntypeAliases = {\r\n\t\"position\": \"int\",\r\n\t\"line\": \"int\",\r\n\t\"pointer\": \"int\",\r\n\t\"colour\": \"int\",\r\n\t\"colouralpha\": \"int\",\r\n\t\"keymod\": \"int\",\r\n\t\"string\": \"const char *\",\r\n\t\"stringresult\": \"const char *\",\r\n\t\"cells\": \"const char *\",\r\n}\r\n\r\ndef cppAlias(s):\r\n\tif s in typeAliases:\r\n\t\treturn typeAliases[s]\r\n\telif Face.IsEnumeration(s):\r\n\t\treturn \"int\"\r\n\telse:\r\n\t\treturn s\r\n\r\nunderstoodTypes = [\"\", \"void\", \"int\", \"bool\", \"position\", \"line\", \"pointer\",\r\n\t\"colour\", \"colouralpha\", \"keymod\", \"string\", \"stringresult\", \"cells\"]\r\n\r\ndef understoodType(t):\r\n\treturn t in understoodTypes or Face.IsEnumeration(t)\r\n\r\ndef checkTypes(name, v):\r\n\tunderstandAllTypes = True\r\n\tif not understoodType(v[\"ReturnType\"]):\r\n\t\t#~ print(\"Do not understand\", v[\"ReturnType\"], \"for\", name)\r\n\t\tunderstandAllTypes = False\r\n\tif not understoodType(v[\"Param1Type\"]):\r\n\t\t#~ print(\"Do not understand\", v[\"Param1Type\"], \"for\", name)\r\n\t\tunderstandAllTypes = False\r\n\tif not understoodType(v[\"Param2Type\"]):\r\n\t\t#~ print(\"Do not understand\", v[\"Param2Type\"], \"for\", name)\r\n\t\tunderstandAllTypes = False\r\n\treturn understandAllTypes\r\n\r\ndef arguments(v, stringResult, options):\r\n\tret = \"\"\r\n\tp1Type = cppAlias(v[\"Param1Type\"])\r\n\tif p1Type == \"int\":\r\n\t\tp1Type = \"sptr_t\"\r\n\tif p1Type:\r\n\t\tret = ret + p1Type + \" \" + normalisedName(v[\"Param1Name\"], options)\r\n\tp2Type = cppAlias(v[\"Param2Type\"])\r\n\tif p2Type == \"int\":\r\n\t\tp2Type = \"sptr_t\"\r\n\tif p2Type and not stringResult:\r\n\t\tif p1Type:\r\n\t\t\tret = ret + \", \"\r\n\t\tret = ret + p2Type + \" \" + normalisedName(v[\"Param2Name\"], options)\r\n\treturn ret\r\n\r\ndef printHFile(f, options):\r\n\tout = []\r\n\tfor name in f.order:\r\n\t\tv = f.features[name]\r\n\t\tif v[\"Category\"] != \"Deprecated\":\r\n\t\t\tfeat = v[\"FeatureType\"]\r\n\t\t\tif feat in [\"fun\", \"get\", \"set\"]:\r\n\t\t\t\tif checkTypes(name, v):\r\n\t\t\t\t\tconstDeclarator = \" const\" if feat == \"get\" else \"\"\r\n\t\t\t\t\treturnType = cppAlias(v[\"ReturnType\"])\r\n\t\t\t\t\tif returnType == \"int\":\r\n\t\t\t\t\t\treturnType = \"sptr_t\"\r\n\t\t\t\t\tstringResult = v[\"Param2Type\"] == \"stringresult\"\r\n\t\t\t\t\tif stringResult:\r\n\t\t\t\t\t\treturnType = \"QByteArray\"\r\n\t\t\t\t\tout.append(\"\\t\" + returnType + \" \" + normalisedName(name, options, feat) + \"(\" +\r\n\t\t\t\t\t\targuments(v, stringResult, options)+\r\n\t\t\t\t\t\t\")\" + constDeclarator + \";\")\r\n\treturn out\r\n\r\ndef methodNames(f, options):\r\n\tfor name in f.order:\r\n\t\tv = f.features[name]\r\n\t\tif v[\"Category\"] != \"Deprecated\":\r\n\t\t\tfeat = v[\"FeatureType\"]\r\n\t\t\tif feat in [\"fun\", \"get\", \"set\"]:\r\n\t\t\t\tif checkTypes(name, v):\r\n\t\t\t\t\tyield normalisedName(name, options)\r\n\r\ndef printCPPFile(f, options):\r\n\tout = []\r\n\tfor name in f.order:\r\n\t\tv = f.features[name]\r\n\t\tif v[\"Category\"] != \"Deprecated\":\r\n\t\t\tfeat = v[\"FeatureType\"]\r\n\t\t\tif feat in [\"fun\", \"get\", \"set\"]:\r\n\t\t\t\tif checkTypes(name, v):\r\n\t\t\t\t\tconstDeclarator = \" const\" if feat == \"get\" else \"\"\r\n\t\t\t\t\tfeatureDefineName = \"SCI_\" + name.upper()\r\n\t\t\t\t\treturnType = cppAlias(v[\"ReturnType\"])\r\n\t\t\t\t\tif returnType == \"int\":\r\n\t\t\t\t\t\treturnType = \"sptr_t\"\r\n\t\t\t\t\tstringResult = v[\"Param2Type\"] == \"stringresult\"\r\n\t\t\t\t\tif stringResult:\r\n\t\t\t\t\t\treturnType = \"QByteArray\"\r\n\t\t\t\t\treturnStatement = \"\"\r\n\t\t\t\t\tif returnType != \"void\":\r\n\t\t\t\t\t\treturnStatement = \"return \"\r\n\t\t\t\t\tout.append(returnType + \" ScintillaEdit::\" + normalisedName(name, options, feat) + \"(\" +\r\n\t\t\t\t\t\targuments(v, stringResult, options) +\r\n\t\t\t\t\t\t\")\" + constDeclarator + \" {\")\r\n\t\t\t\t\treturns = \"\"\r\n\t\t\t\t\tif stringResult:\r\n\t\t\t\t\t\treturns += \"    \" + returnStatement + \"TextReturner(\" + featureDefineName + \", \"\r\n\t\t\t\t\t\tif \"*\" in cppAlias(v[\"Param1Type\"]):\r\n\t\t\t\t\t\t\treturns += \"(sptr_t)\"\r\n\t\t\t\t\t\tif v[\"Param1Name\"]:\r\n\t\t\t\t\t\t\treturns += normalisedName(v[\"Param1Name\"], options)\r\n\t\t\t\t\t\telse:\r\n\t\t\t\t\t\t\treturns += \"0\"\r\n\t\t\t\t\t\treturns += \");\"\r\n\t\t\t\t\telse:\r\n\t\t\t\t\t\treturns += \"    \" + returnStatement + \"send(\" + featureDefineName + \", \"\r\n\t\t\t\t\t\tif \"*\" in cppAlias(v[\"Param1Type\"]):\r\n\t\t\t\t\t\t\treturns += \"(sptr_t)\"\r\n\t\t\t\t\t\tif v[\"Param1Name\"]:\r\n\t\t\t\t\t\t\treturns += normalisedName(v[\"Param1Name\"], options)\r\n\t\t\t\t\t\telse:\r\n\t\t\t\t\t\t\treturns += \"0\"\r\n\t\t\t\t\t\treturns += \", \"\r\n\t\t\t\t\t\tif \"*\" in cppAlias(v[\"Param2Type\"]):\r\n\t\t\t\t\t\t\treturns += \"(sptr_t)\"\r\n\t\t\t\t\t\tif v[\"Param2Name\"]:\r\n\t\t\t\t\t\t\treturns += normalisedName(v[\"Param2Name\"], options)\r\n\t\t\t\t\t\telse:\r\n\t\t\t\t\t\t\treturns += \"0\"\r\n\t\t\t\t\t\treturns += \");\"\r\n\t\t\t\t\tout.append(returns)\r\n\t\t\t\t\tout.append(\"}\")\r\n\t\t\t\t\tout.append(\"\")\r\n\treturn out\r\n\r\ndef gtkNames():\r\n\t# The full path on my machine: should be altered for anyone else\r\n\tp = \"C:/Users/Neil/Downloads/wingide-source-4.0.1-1/wingide-source-4.0.1-1/external/gtkscintilla2/gtkscintilla.c\"\r\n\twith open(p) as f:\r\n\t\tfor l in f.readlines():\r\n\t\t\tif \"gtk_scintilla_\" in l:\r\n\t\t\t\tname = l.split()[1][14:]\r\n\t\t\t\tif '(' in name:\r\n\t\t\t\t\tname = name.split('(')[0]\r\n\t\t\t\t\tyield name\r\n\r\ndef usage():\r\n\tprint(\"WidgetGen.py [-c|--clean][-h|--help][-u|--underscore-names]\")\r\n\tprint(\"\")\r\n\tprint(\"Generate full APIs for ScintillaEdit class.\")\r\n\tprint(\"\")\r\n\tprint(\"options:\")\r\n\tprint(\"\")\r\n\tprint(\"-c --clean remove all generated code from files\")\r\n\tprint(\"-h --help  display this text\")\r\n\tprint(\"-u --underscore-names  use method_names consistent with GTK+ standards\")\r\n\r\ndef readInterface(cleanGenerated):\r\n\tf = Face.Face()\r\n\tif not cleanGenerated:\r\n\t\tf.ReadFromFile(\"../../include/Scintilla.iface\")\r\n\treturn f\r\n\r\ndef main(argv):\r\n\t# Using local path for gtkscintilla2 so don't default to checking\r\n\tcheckGTK = False\r\n\tcleanGenerated = False\r\n\tqtStyleInterface = True\r\n\t# The --gtk-check option checks for full coverage of the gtkscintilla2 API but\r\n\t# depends on a particular directory so is not mentioned in --help.\r\n\topts, args = getopt.getopt(argv, \"hcgu\", [\"help\", \"clean\", \"gtk-check\", \"underscore-names\"])\r\n\tfor opt, arg in opts:\r\n\t\tif opt in (\"-h\", \"--help\"):\r\n\t\t\tusage()\r\n\t\t\tsys.exit()\r\n\t\telif opt in (\"-c\", \"--clean\"):\r\n\t\t\tcleanGenerated = True\r\n\t\telif opt in (\"-g\", \"--gtk-check\"):\r\n\t\t\tcheckGTK = True\r\n\t\telif opt in (\"-u\", \"--underscore-names\"):\r\n\t\t\tqtStyleInterface = False\r\n\r\n\toptions = {\"qtStyle\": qtStyleInterface}\r\n\tf = readInterface(cleanGenerated)\r\n\ttry:\r\n\t\tGenerateFile(\"ScintillaEdit.cpp.template\", \"ScintillaEdit.cpp\",\r\n\t\t\t\"/* \", True, printCPPFile(f, options))\r\n\t\tGenerateFile(\"ScintillaEdit.h.template\", \"ScintillaEdit.h\",\r\n\t\t\t\"/* \", True, printHFile(f, options))\r\n\t\tif checkGTK:\r\n\t\t\tnames = set(methodNames(f))\r\n\t\t\t#~ print(\"\\n\".join(names))\r\n\t\t\tnamesGtk = set(gtkNames())\r\n\t\t\tfor name in namesGtk:\r\n\t\t\t\tif name not in names:\r\n\t\t\t\t\tprint(name, \"not found in Qt version\")\r\n\t\t\tfor name in names:\r\n\t\t\t\tif name not in namesGtk:\r\n\t\t\t\t\tprint(name, \"not found in GTK+ version\")\r\n\texcept:\r\n\t\traise\r\n\r\n\tif cleanGenerated:\r\n\t\tfor file in [\"ScintillaEdit.cpp\", \"ScintillaEdit.h\"]:\r\n\t\t\ttry:\r\n\t\t\t\tos.remove(file)\r\n\t\t\texcept OSError:\r\n\t\t\t\tpass\r\n\r\nif __name__ == \"__main__\":\r\n\tmain(sys.argv[1:])\r\n"
  },
  {
    "path": "scintilla/qt/ScintillaEditBase/Notes.txt",
    "content": "\r\nIssues with Scintilla for Qt\r\n\r\nQt reports character descenders are 1 pixel shorter than they really are.\r\nThere is a tweak in the code to add a pixel in. This may have to be reviewed for Qt 5.\r\nThere's a comment in the Qt code for Windows:\r\n       // ### we subtract 1 to even out the historical +1 in QFontMetrics's\r\n       // ### height=asc+desc+1 equation. Fix in Qt5.\r\n\r\nThe clocks used aren't great. QTime is a time since midnight clock so wraps around and\r\nis only accurate to, at best, milliseconds.\r\n\r\nOn macOS drawing text into a pixmap moves it around 1 pixel to the right compared to drawing\r\nit directly onto a window. Buffered drawing turned off by default to avoid this.\r\nReported as QTBUG-19483.\r\n\r\nOnly one QPainter can be active on any widget at a time. Scintilla only draws into one\r\nwidget but reenters for measurement.\r\n"
  },
  {
    "path": "scintilla/qt/ScintillaEditBase/PlatQt.cpp",
    "content": "// @file PlatQt.cpp\r\n//          Copyright (c) 1990-2011, Scientific Toolworks, Inc.\r\n//\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n//\r\n// Author: Jason Haslam\r\n//\r\n// Additions Copyright (c) 2011 Archaeopteryx Software, Inc. d/b/a Wingware\r\n// Scintilla platform layer for Qt\r\n\r\n#include <cstdio>\r\n#include <cstdint>\r\n\r\n#include \"PlatQt.h\"\r\n#include \"Scintilla.h\"\r\n#include \"XPM.h\"\r\n#include \"UniConversion.h\"\r\n#include \"DBCS.h\"\r\n\r\n#include <QApplication>\r\n#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)\r\n#include <QScreen>\r\n#endif\r\n#include <QFont>\r\n#include <QColor>\r\n#include <QRect>\r\n#include <QPaintDevice>\r\n#include <QPaintEngine>\r\n#include <QWidget>\r\n#include <QPixmap>\r\n#include <QPainter>\r\n#include <QPainterPath>\r\n#include <QMenu>\r\n#include <QAction>\r\n#include <QTime>\r\n#include <QMessageBox>\r\n#include <QTextCodec>\r\n#include <QListWidget>\r\n#include <QVarLengthArray>\r\n#include <QScrollBar>\r\n#include <QTextLayout>\r\n#include <QTextLine>\r\n#include <QLibrary>\r\n\r\nusing namespace Scintilla;\r\n\r\nnamespace Scintilla::Internal {\r\n\r\n//----------------------------------------------------------------------\r\n\r\n// Convert from a Scintilla characterSet value to a Qt codec name.\r\nconst char *CharacterSetID(CharacterSet characterSet)\r\n{\r\n\tswitch (characterSet) {\r\n\t\t//case CharacterSet::Ansi:\r\n\t\t//\treturn \"\";\r\n\tcase CharacterSet::Default:\r\n\t\treturn \"ISO 8859-1\";\r\n\tcase CharacterSet::Baltic:\r\n\t\treturn \"ISO 8859-13\";\r\n\tcase CharacterSet::ChineseBig5:\r\n\t\treturn \"Big5\";\r\n\tcase CharacterSet::EastEurope:\r\n\t\treturn \"ISO 8859-2\";\r\n\tcase CharacterSet::GB2312:\r\n\t\treturn \"GB18030-0\";\r\n\tcase CharacterSet::Greek:\r\n\t\treturn \"ISO 8859-7\";\r\n\tcase CharacterSet::Hangul:\r\n\t\treturn \"CP949\";\r\n\tcase CharacterSet::Mac:\r\n\t\treturn \"Apple Roman\";\r\n\t\t//case SC_CHARSET_OEM:\r\n\t\t//\treturn \"ASCII\";\r\n\tcase CharacterSet::Russian:\r\n\t\treturn \"KOI8-R\";\r\n\tcase CharacterSet::Cyrillic:\r\n\t\treturn \"Windows-1251\";\r\n\tcase CharacterSet::ShiftJis:\r\n\t\treturn \"Shift-JIS\";\r\n\t\t//case SC_CHARSET_SYMBOL:\r\n\t\t//        return \"\";\r\n\tcase CharacterSet::Turkish:\r\n\t\treturn \"ISO 8859-9\";\r\n\t\t//case SC_CHARSET_JOHAB:\r\n\t\t//        return \"CP1361\";\r\n\tcase CharacterSet::Hebrew:\r\n\t\treturn \"ISO 8859-8\";\r\n\tcase CharacterSet::Arabic:\r\n\t\treturn \"ISO 8859-6\";\r\n\tcase CharacterSet::Vietnamese:\r\n\t\treturn \"Windows-1258\";\r\n\tcase CharacterSet::Thai:\r\n\t\treturn \"TIS-620\";\r\n\tcase CharacterSet::Iso8859_15:\r\n\t\treturn \"ISO 8859-15\";\r\n\tdefault:\r\n\t\treturn \"ISO 8859-1\";\r\n\t}\r\n}\r\n\r\nQString UnicodeFromText(QTextCodec *codec, std::string_view text) {\r\n\treturn codec->toUnicode(text.data(), static_cast<int>(text.length()));\r\n}\r\n\r\nstatic QFont::StyleStrategy ChooseStrategy(FontQuality eff)\r\n{\r\n\tswitch (eff) {\r\n\t\tcase FontQuality::QualityDefault:         return QFont::PreferDefault;\r\n\t\tcase FontQuality::QualityNonAntialiased: return QFont::NoAntialias;\r\n\t\tcase FontQuality::QualityAntialiased:     return QFont::PreferAntialias;\r\n\t\tcase FontQuality::QualityLcdOptimized:   return QFont::PreferAntialias;\r\n\t\tdefault:                             return QFont::PreferDefault;\r\n\t}\r\n}\r\n\r\nclass FontAndCharacterSet : public Font {\r\npublic:\r\n\tCharacterSet characterSet = CharacterSet::Ansi;\r\n\tstd::unique_ptr<QFont> pfont;\r\n\texplicit FontAndCharacterSet(const FontParameters &fp) : characterSet(fp.characterSet) {\r\n\t\tpfont = std::make_unique<QFont>();\r\n\t\tpfont->setStyleStrategy(ChooseStrategy(fp.extraFontFlag));\r\n\t\tpfont->setFamily(QString::fromUtf8(fp.faceName));\r\n\t\tpfont->setPointSizeF(fp.size);\r\n\t\tpfont->setBold(static_cast<int>(fp.weight) > 500);\r\n\t\tpfont->setItalic(fp.italic);\r\n\t}\r\n};\r\n\r\nnamespace {\r\n\r\nconst Supports SupportsQt[] = {\r\n\tSupports::LineDrawsFinal,\r\n\tSupports::FractionalStrokeWidth,\r\n\tSupports::TranslucentStroke,\r\n\tSupports::PixelModification,\r\n};\r\n\r\nconst FontAndCharacterSet *AsFontAndCharacterSet(const Font *f) {\r\n\treturn dynamic_cast<const FontAndCharacterSet *>(f);\r\n}\r\n\r\nQFont *FontPointer(const Font *f)\r\n{\r\n\treturn AsFontAndCharacterSet(f)->pfont.get();\r\n}\r\n\r\n}\r\n\r\nstd::shared_ptr<Font> Font::Allocate(const FontParameters &fp)\r\n{\r\n\treturn std::make_shared<FontAndCharacterSet>(fp);\r\n}\r\n\r\nSurfaceImpl::SurfaceImpl() = default;\r\n\r\nSurfaceImpl::SurfaceImpl(int width, int height, SurfaceMode mode_)\r\n{\r\n\tif (width < 1) width = 1;\r\n\tif (height < 1) height = 1;\r\n\tdeviceOwned = true;\r\n\tdevice = new QPixmap(width, height);\r\n\tmode = mode_;\r\n}\r\n\r\nSurfaceImpl::~SurfaceImpl()\r\n{\r\n\tClear();\r\n}\r\n\r\nvoid SurfaceImpl::Clear()\r\n{\r\n\tif (painterOwned && painter) {\r\n\t\tdelete painter;\r\n\t}\r\n\r\n\tif (deviceOwned && device) {\r\n\t\tdelete device;\r\n\t}\r\n\tdevice = nullptr;\r\n\tpainter = nullptr;\r\n\tdeviceOwned = false;\r\n\tpainterOwned = false;\r\n}\r\n\r\nvoid SurfaceImpl::Init(WindowID wid)\r\n{\r\n\tRelease();\r\n\tdevice = static_cast<QWidget *>(wid);\r\n}\r\n\r\nvoid SurfaceImpl::Init(SurfaceID sid, WindowID /*wid*/)\r\n{\r\n\tRelease();\r\n\tdevice = static_cast<QPaintDevice *>(sid);\r\n}\r\n\r\nstd::unique_ptr<Surface> SurfaceImpl::AllocatePixMap(int width, int height)\r\n{\r\n\treturn std::make_unique<SurfaceImpl>(width, height, mode);\r\n}\r\n\r\nvoid SurfaceImpl::SetMode(SurfaceMode mode_)\r\n{\r\n\tmode = mode_;\r\n}\r\n\r\nvoid SurfaceImpl::Release() noexcept\r\n{\r\n\tClear();\r\n}\r\n\r\nint SurfaceImpl::SupportsFeature(Supports feature) noexcept\r\n{\r\n\tfor (const Supports f : SupportsQt) {\r\n\t\tif (f == feature)\r\n\t\t\treturn 1;\r\n\t}\r\n\treturn 0;\r\n}\r\n\r\nbool SurfaceImpl::Initialised()\r\n{\r\n\treturn device != nullptr;\r\n}\r\n\r\nvoid SurfaceImpl::PenColour(ColourRGBA fore)\r\n{\r\n\tQPen penOutline(QColorFromColourRGBA(fore));\r\n\tpenOutline.setCapStyle(Qt::FlatCap);\r\n\tGetPainter()->setPen(penOutline);\r\n}\r\n\r\nvoid SurfaceImpl::PenColourWidth(ColourRGBA fore, XYPOSITION strokeWidth) {\r\n\tQPen penOutline(QColorFromColourRGBA(fore));\r\n\tpenOutline.setCapStyle(Qt::FlatCap);\r\n\tpenOutline.setJoinStyle(Qt::MiterJoin);\r\n\tpenOutline.setWidthF(strokeWidth);\r\n\tGetPainter()->setPen(penOutline);\r\n}\r\n\r\nvoid SurfaceImpl::BrushColour(ColourRGBA back)\r\n{\r\n\tGetPainter()->setBrush(QBrush(QColorFromColourRGBA(back)));\r\n}\r\n\r\nvoid SurfaceImpl::SetCodec(const Font *font)\r\n{\r\n\tconst FontAndCharacterSet *pfacs = AsFontAndCharacterSet(font);\r\n\tif (pfacs && pfacs->pfont) {\r\n\t\tconst char *csid = \"UTF-8\";\r\n\t\tif (!(mode.codePage == SC_CP_UTF8))\r\n\t\t\tcsid = CharacterSetID(pfacs->characterSet);\r\n\t\tif (csid != codecName) {\r\n\t\t\tcodecName = csid;\r\n\t\t\tcodec = QTextCodec::codecForName(csid);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid SurfaceImpl::SetFont(const Font *font)\r\n{\r\n\tconst FontAndCharacterSet *pfacs = AsFontAndCharacterSet(font);\r\n\tif (pfacs && pfacs->pfont) {\r\n\t\tGetPainter()->setFont(*(pfacs->pfont));\r\n\t\tSetCodec(font);\r\n\t}\r\n}\r\n\r\nint SurfaceImpl::LogPixelsY()\r\n{\r\n\treturn device->logicalDpiY();\r\n}\r\n\r\nint SurfaceImpl::PixelDivisions()\r\n{\r\n\t// Qt uses device pixels.\r\n\treturn 1;\r\n}\r\n\r\nint SurfaceImpl::DeviceHeightFont(int points)\r\n{\r\n\treturn points;\r\n}\r\n\r\nvoid SurfaceImpl::LineDraw(Point start, Point end, Stroke stroke)\r\n{\r\n\tPenColourWidth(stroke.colour, stroke.width);\r\n\tQLineF line(start.x, start.y, end.x, end.y);\r\n\tGetPainter()->drawLine(line);\r\n}\r\n\r\nvoid SurfaceImpl::PolyLine(const Point *pts, size_t npts, Stroke stroke)\r\n{\r\n\t// TODO: set line joins and caps\r\n\tPenColourWidth(stroke.colour, stroke.width);\r\n\tstd::vector<QPointF> qpts;\r\n\tstd::transform(pts, pts + npts, std::back_inserter(qpts), QPointFFromPoint);\r\n\tGetPainter()->drawPolyline(&qpts[0], static_cast<int>(npts));\r\n}\r\n\r\nvoid SurfaceImpl::Polygon(const Point *pts, size_t npts, FillStroke fillStroke)\r\n{\r\n\tPenColourWidth(fillStroke.stroke.colour, fillStroke.stroke.width);\r\n\tBrushColour(fillStroke.fill.colour);\r\n\r\n\tstd::vector<QPointF> qpts;\r\n\tstd::transform(pts, pts + npts, std::back_inserter(qpts), QPointFFromPoint);\r\n\r\n\tGetPainter()->drawPolygon(&qpts[0], static_cast<int>(npts));\r\n}\r\n\r\nvoid SurfaceImpl::RectangleDraw(PRectangle rc, FillStroke fillStroke)\r\n{\r\n\tPenColourWidth(fillStroke.stroke.colour, fillStroke.stroke.width);\r\n\tBrushColour(fillStroke.fill.colour);\r\n\tconst QRectF rect = QRectFFromPRect(rc.Inset(fillStroke.stroke.width / 2));\r\n\tGetPainter()->drawRect(rect);\r\n}\r\n\r\nvoid SurfaceImpl::RectangleFrame(PRectangle rc, Stroke stroke) {\r\n\tPenColourWidth(stroke.colour, stroke.width);\r\n\t// Default QBrush is Qt::NoBrush so does not fill\r\n\tGetPainter()->setBrush(QBrush());\r\n\tconst QRectF rect = QRectFFromPRect(rc.Inset(stroke.width / 2));\r\n\tGetPainter()->drawRect(rect);\r\n}\r\n\r\nvoid SurfaceImpl::FillRectangle(PRectangle rc, Fill fill)\r\n{\r\n\tGetPainter()->fillRect(QRectFFromPRect(rc), QColorFromColourRGBA(fill.colour));\r\n}\r\n\r\nvoid SurfaceImpl::FillRectangleAligned(PRectangle rc, Fill fill)\r\n{\r\n\tFillRectangle(PixelAlign(rc, 1), fill);\r\n}\r\n\r\nvoid SurfaceImpl::FillRectangle(PRectangle rc, Surface &surfacePattern)\r\n{\r\n\t// Tile pattern over rectangle\r\n\tSurfaceImpl *surface = dynamic_cast<SurfaceImpl *>(&surfacePattern);\r\n\tconst QPixmap *pixmap = static_cast<QPixmap *>(surface->GetPaintDevice());\r\n\tGetPainter()->drawTiledPixmap(QRectFromPRect(rc), *pixmap);\r\n}\r\n\r\nvoid SurfaceImpl::RoundedRectangle(PRectangle rc, FillStroke fillStroke)\r\n{\r\n\tPenColourWidth(fillStroke.stroke.colour, fillStroke.stroke.width);\r\n\tBrushColour(fillStroke.fill.colour);\r\n\tGetPainter()->drawRoundedRect(QRectFFromPRect(rc), 3.0f, 3.0f);\r\n}\r\n\r\nvoid SurfaceImpl::AlphaRectangle(PRectangle rc, XYPOSITION cornerSize, FillStroke fillStroke)\r\n{\r\n\tQColor qFill = QColorFromColourRGBA(fillStroke.fill.colour);\r\n\tQBrush brushFill(qFill);\r\n\tGetPainter()->setBrush(brushFill);\r\n\tif (fillStroke.fill.colour == fillStroke.stroke.colour) {\r\n\t\tpainter->setPen(Qt::NoPen);\r\n\t\tQRectF rect = QRectFFromPRect(rc);\r\n\t\tif (cornerSize > 0.0f) {\r\n\t\t\t// A radius of 1 shows no curve so add 1\r\n\t\t\tqreal radius = cornerSize+1;\r\n\t\t\tGetPainter()->drawRoundedRect(rect, radius, radius);\r\n\t\t} else {\r\n\t\t\tGetPainter()->fillRect(rect, brushFill);\r\n\t\t}\r\n\t} else {\r\n\t\tQColor qOutline = QColorFromColourRGBA(fillStroke.stroke.colour);\r\n\t\tQPen penOutline(qOutline);\r\n\t\tpenOutline.setWidthF(fillStroke.stroke.width);\r\n\t\tGetPainter()->setPen(penOutline);\r\n\r\n\t\tQRectF rect = QRectFFromPRect(rc.Inset(fillStroke.stroke.width / 2));\r\n\t\tif (cornerSize > 0.0f) {\r\n\t\t\t// A radius of 1 shows no curve so add 1\r\n\t\t\tqreal radius = cornerSize+1;\r\n\t\t\tGetPainter()->drawRoundedRect(rect, radius, radius);\r\n\t\t} else {\r\n\t\t\tGetPainter()->drawRect(rect);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid SurfaceImpl::GradientRectangle(PRectangle rc, const std::vector<ColourStop> &stops, GradientOptions options) {\r\n\tQRectF rect = QRectFFromPRect(rc);\r\n\tQLinearGradient linearGradient;\r\n\tswitch (options) {\r\n\tcase GradientOptions::leftToRight:\r\n\t\tlinearGradient = QLinearGradient(rc.left, rc.top, rc.right, rc.top);\r\n\t\tbreak;\r\n\tcase GradientOptions::topToBottom:\r\n\tdefault:\r\n\t\tlinearGradient = QLinearGradient(rc.left, rc.top, rc.left, rc.bottom);\r\n\t\tbreak;\r\n\t}\r\n\tlinearGradient.setSpread(QGradient::RepeatSpread);\r\n\tfor (const ColourStop &stop : stops) {\r\n\t\tlinearGradient.setColorAt(stop.position, QColorFromColourRGBA(stop.colour));\r\n\t}\r\n\tQBrush brush = QBrush(linearGradient);\r\n\tGetPainter()->fillRect(rect, brush);\r\n}\r\n\r\nstatic std::vector<unsigned char> ImageByteSwapped(int width, int height, const unsigned char *pixelsImage)\r\n{\r\n\t// Input is RGBA, but Format_ARGB32 is BGRA, so swap the red bytes and blue bytes\r\n\tsize_t bytes = width * height * 4;\r\n\tstd::vector<unsigned char> imageBytes(pixelsImage, pixelsImage+bytes);\r\n\tfor (size_t i=0; i<bytes; i+=4)\r\n\t\tstd::swap(imageBytes[i], imageBytes[i+2]);\r\n\treturn imageBytes;\r\n}\r\n\r\nvoid SurfaceImpl::DrawRGBAImage(PRectangle rc, int width, int height, const unsigned char *pixelsImage)\r\n{\r\n\tstd::vector<unsigned char> imageBytes = ImageByteSwapped(width, height, pixelsImage);\r\n\tQImage image(&imageBytes[0], width, height, QImage::Format_ARGB32);\r\n\tQPoint pt(rc.left, rc.top);\r\n\tGetPainter()->drawImage(pt, image);\r\n}\r\n\r\nvoid SurfaceImpl::Ellipse(PRectangle rc, FillStroke fillStroke)\r\n{\r\n\tPenColourWidth(fillStroke.stroke.colour, fillStroke.stroke.width);\r\n\tBrushColour(fillStroke.fill.colour);\r\n\tconst QRectF rect = QRectFFromPRect(rc.Inset(fillStroke.stroke.width / 2));\r\n\tGetPainter()->drawEllipse(rect);\r\n}\r\n\r\nvoid SurfaceImpl::Stadium(PRectangle rc, FillStroke fillStroke, Ends ends) {\r\n\tconst XYPOSITION halfStroke = fillStroke.stroke.width / 2.0f;\r\n\tconst XYPOSITION radius = rc.Height() / 2.0f - halfStroke;\r\n\tPRectangle rcInner = rc;\r\n\trcInner.left += radius;\r\n\trcInner.right -= radius;\r\n\tconst XYPOSITION arcHeight = rc.Height() - fillStroke.stroke.width;\r\n\r\n\tPenColourWidth(fillStroke.stroke.colour, fillStroke.stroke.width);\r\n\tBrushColour(fillStroke.fill.colour);\r\n\r\n\tQPainterPath path;\r\n\r\n\tconst Ends leftSide = static_cast<Ends>(static_cast<unsigned int>(ends) & 0xfu);\r\n\tconst Ends rightSide = static_cast<Ends>(static_cast<unsigned int>(ends) & 0xf0u);\r\n\tswitch (leftSide) {\r\n\t\tcase Ends::leftFlat:\r\n\t\t\tpath.moveTo(rc.left + halfStroke, rc.top + halfStroke);\r\n\t\t\tpath.lineTo(rc.left + halfStroke, rc.bottom - halfStroke);\r\n\t\t\tbreak;\r\n\t\tcase Ends::leftAngle:\r\n\t\t\tpath.moveTo(rcInner.left + halfStroke, rc.top + halfStroke);\r\n\t\t\tpath.lineTo(rc.left + halfStroke, rc.Centre().y);\r\n\t\t\tpath.lineTo(rcInner.left + halfStroke, rc.bottom - halfStroke);\r\n\t\t\tbreak;\r\n\t\tcase Ends::semiCircles:\r\n\t\tdefault:\r\n\t\t\tpath.moveTo(rcInner.left + halfStroke, rc.top + halfStroke);\r\n\t\t\tQRectF rectangleArc(rc.left + halfStroke, rc.top + halfStroke,\r\n\t\t\t\t\t    arcHeight, arcHeight);\r\n\t\t\tpath.arcTo(rectangleArc, 90, 180);\r\n\t\t\tbreak;\r\n\t}\r\n\r\n\tswitch (rightSide) {\r\n\t\tcase Ends::rightFlat:\r\n\t\t\tpath.lineTo(rc.right - halfStroke, rc.bottom - halfStroke);\r\n\t\t\tpath.lineTo(rc.right - halfStroke, rc.top + halfStroke);\r\n\t\t\tbreak;\r\n\t\tcase Ends::rightAngle:\r\n\t\t\tpath.lineTo(rcInner.right - halfStroke, rc.bottom - halfStroke);\r\n\t\t\tpath.lineTo(rc.right - halfStroke, rc.Centre().y);\r\n\t\t\tpath.lineTo(rcInner.right - halfStroke, rc.top + halfStroke);\r\n\t\t\tbreak;\r\n\t\tcase Ends::semiCircles:\r\n\t\tdefault:\r\n\t\t\tpath.lineTo(rcInner.right - halfStroke, rc.bottom - halfStroke);\r\n\t\t\tQRectF rectangleArc(rc.right - arcHeight - halfStroke, rc.top + halfStroke,\r\n\t\t\t\t\t    arcHeight, arcHeight);\r\n\t\t\tpath.arcTo(rectangleArc, 270, 180);\r\n\t\t\tbreak;\r\n\t}\r\n\r\n\t// Close the path to enclose it for stroking and for filling, then draw it\r\n\tpath.closeSubpath();\r\n\tGetPainter()->drawPath(path);\r\n}\r\n\r\nvoid SurfaceImpl::Copy(PRectangle rc, Point from, Surface &surfaceSource)\r\n{\r\n\tSurfaceImpl *source = dynamic_cast<SurfaceImpl *>(&surfaceSource);\r\n\tQPixmap *pixmap = static_cast<QPixmap *>(source->GetPaintDevice());\r\n\r\n\tGetPainter()->drawPixmap(rc.left, rc.top, *pixmap, from.x, from.y, -1, -1);\r\n}\r\n\r\nstd::unique_ptr<IScreenLineLayout> SurfaceImpl::Layout(const IScreenLine *)\r\n{\r\n\treturn {};\r\n}\r\n\r\nvoid SurfaceImpl::DrawTextNoClip(PRectangle rc,\r\n\t\t\t\t const Font *font,\r\n                                 XYPOSITION ybase,\r\n\t\t\t\t std::string_view text,\r\n\t\t\t\t ColourRGBA fore,\r\n\t\t\t\t ColourRGBA back)\r\n{\r\n\tSetFont(font);\r\n\tPenColour(fore);\r\n\r\n\tGetPainter()->setBackground(QColorFromColourRGBA(back));\r\n\tGetPainter()->setBackgroundMode(Qt::OpaqueMode);\r\n\tQString su = UnicodeFromText(codec, text);\r\n\tGetPainter()->drawText(QPointF(rc.left, ybase), su);\r\n}\r\n\r\nvoid SurfaceImpl::DrawTextClipped(PRectangle rc,\r\n\t\t\t\t  const Font *font,\r\n                                  XYPOSITION ybase,\r\n\t\t\t\t  std::string_view text,\r\n\t\t\t\t  ColourRGBA fore,\r\n\t\t\t\t  ColourRGBA back)\r\n{\r\n\tSetClip(rc);\r\n\tDrawTextNoClip(rc, font, ybase, text, fore, back);\r\n\tPopClip();\r\n}\r\n\r\nvoid SurfaceImpl::DrawTextTransparent(PRectangle rc,\r\n\t\t\t\t      const Font *font,\r\n                                      XYPOSITION ybase,\r\n\t\t\t\t      std::string_view text,\r\n\tColourRGBA fore)\r\n{\r\n\tSetFont(font);\r\n\tPenColour(fore);\r\n\r\n\tGetPainter()->setBackgroundMode(Qt::TransparentMode);\r\n\tQString su = UnicodeFromText(codec, text);\r\n\tGetPainter()->drawText(QPointF(rc.left, ybase), su);\r\n}\r\n\r\nvoid SurfaceImpl::SetClip(PRectangle rc)\r\n{\r\n\tGetPainter()->save();\r\n\tGetPainter()->setClipRect(QRectFFromPRect(rc), Qt::IntersectClip);\r\n}\r\n\r\nvoid SurfaceImpl::PopClip()\r\n{\r\n\tGetPainter()->restore();\r\n}\r\n\r\nvoid SurfaceImpl::MeasureWidths(const Font *font,\r\n\t\t\t\tstd::string_view text,\r\n                                XYPOSITION *positions)\r\n{\r\n\tif (!font)\r\n\t\treturn;\r\n\tSetCodec(font);\r\n\tQString su = UnicodeFromText(codec, text);\r\n\tQTextLayout tlay(su, *FontPointer(font), GetPaintDevice());\r\n\ttlay.beginLayout();\r\n\tQTextLine tl = tlay.createLine();\r\n\ttlay.endLayout();\r\n\tif (mode.codePage == SC_CP_UTF8) {\r\n\t\tint fit = su.size();\r\n\t\tint ui=0;\r\n\t\tsize_t i=0;\r\n\t\twhile (ui<fit) {\r\n\t\t\tconst unsigned char uch = text[i];\r\n\t\t\tconst unsigned int byteCount = UTF8BytesOfLead[uch];\r\n\t\t\tconst int codeUnits = UTF16LengthFromUTF8ByteCount(byteCount);\r\n\t\t\tqreal xPosition = tl.cursorToX(ui+codeUnits);\r\n\t\t\tfor (size_t bytePos=0; (bytePos<byteCount) && (i<text.length()); bytePos++) {\r\n\t\t\t\tpositions[i++] = xPosition;\r\n\t\t\t}\r\n\t\t\tui += codeUnits;\r\n\t\t}\r\n\t\tXYPOSITION lastPos = 0;\r\n\t\tif (i > 0)\r\n\t\t\tlastPos = positions[i-1];\r\n\t\twhile (i<text.length()) {\r\n\t\t\tpositions[i++] = lastPos;\r\n\t\t}\r\n\t} else if (mode.codePage) {\r\n\t\t// DBCS\r\n\t\tint ui = 0;\r\n\t\tfor (size_t i=0; i<text.length();) {\r\n\t\t\tsize_t lenChar = DBCSIsLeadByte(mode.codePage, text[i]) ? 2 : 1;\r\n\t\t\tqreal xPosition = tl.cursorToX(ui+1);\r\n\t\t\tfor (unsigned int bytePos=0; (bytePos<lenChar) && (i<text.length()); bytePos++) {\r\n\t\t\t\tpositions[i++] = xPosition;\r\n\t\t\t}\r\n\t\t\tui++;\r\n\t\t}\r\n\t} else {\r\n\t\t// Single byte encoding\r\n\t\tfor (int i=0; i<static_cast<int>(text.length()); i++) {\r\n\t\t\tpositions[i] = tl.cursorToX(i+1);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nXYPOSITION SurfaceImpl::WidthText(const Font *font, std::string_view text)\r\n{\r\n\tQFontMetricsF metrics(*FontPointer(font), device);\r\n\tSetCodec(font);\r\n\tQString su = UnicodeFromText(codec, text);\r\n#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)\r\n\treturn metrics.horizontalAdvance(su);\r\n#else\r\n\treturn metrics.width(su);\r\n#endif\r\n}\r\n\r\nvoid SurfaceImpl::DrawTextNoClipUTF8(PRectangle rc,\r\n\t\t\t\t const Font *font,\r\n\t\t\t\t XYPOSITION ybase,\r\n\t\t\t\t std::string_view text,\r\n\t\t\t\t ColourRGBA fore,\r\n\t\t\t\t ColourRGBA back)\r\n{\r\n\tSetFont(font);\r\n\tPenColour(fore);\r\n\r\n\tGetPainter()->setBackground(QColorFromColourRGBA(back));\r\n\tGetPainter()->setBackgroundMode(Qt::OpaqueMode);\r\n\tQString su = QString::fromUtf8(text.data(), static_cast<int>(text.length()));\r\n\tGetPainter()->drawText(QPointF(rc.left, ybase), su);\r\n}\r\n\r\nvoid SurfaceImpl::DrawTextClippedUTF8(PRectangle rc,\r\n\t\t\t\t  const Font *font,\r\n\t\t\t\t  XYPOSITION ybase,\r\n\t\t\t\t  std::string_view text,\r\n\t\t\t\t  ColourRGBA fore,\r\n\t\t\t\t  ColourRGBA back)\r\n{\r\n\tSetClip(rc);\r\n\tDrawTextNoClip(rc, font, ybase, text, fore, back);\r\n\tPopClip();\r\n}\r\n\r\nvoid SurfaceImpl::DrawTextTransparentUTF8(PRectangle rc,\r\n\t\t\t\t      const Font *font,\r\n\t\t\t\t      XYPOSITION ybase,\r\n\t\t\t\t      std::string_view text,\r\n\tColourRGBA fore)\r\n{\r\n\tSetFont(font);\r\n\tPenColour(fore);\r\n\r\n\tGetPainter()->setBackgroundMode(Qt::TransparentMode);\r\n\tQString su = QString::fromUtf8(text.data(), static_cast<int>(text.length()));\r\n\tGetPainter()->drawText(QPointF(rc.left, ybase), su);\r\n}\r\n\r\nvoid SurfaceImpl::MeasureWidthsUTF8(const Font *font,\r\n\t\t\t\tstd::string_view text,\r\n\t\t\t\tXYPOSITION *positions)\r\n{\r\n\tif (!font)\r\n\t\treturn;\r\n\tQString su = QString::fromUtf8(text.data(), static_cast<int>(text.length()));\r\n\tQTextLayout tlay(su, *FontPointer(font), GetPaintDevice());\r\n\ttlay.beginLayout();\r\n\tQTextLine tl = tlay.createLine();\r\n\ttlay.endLayout();\r\n\tint fit = su.size();\r\n\tint ui=0;\r\n\tsize_t i=0;\r\n\twhile (ui<fit) {\r\n\t\tconst unsigned char uch = text[i];\r\n\t\tconst unsigned int byteCount = UTF8BytesOfLead[uch];\r\n\t\tconst int codeUnits = UTF16LengthFromUTF8ByteCount(byteCount);\r\n\t\tqreal xPosition = tl.cursorToX(ui+codeUnits);\r\n\t\tfor (size_t bytePos=0; (bytePos<byteCount) && (i<text.length()); bytePos++) {\r\n\t\t\tpositions[i++] = xPosition;\r\n\t\t}\r\n\t\tui += codeUnits;\r\n\t}\r\n\tXYPOSITION lastPos = 0;\r\n\tif (i > 0)\r\n\t\tlastPos = positions[i-1];\r\n\twhile (i<text.length()) {\r\n\t\tpositions[i++] = lastPos;\r\n\t}\r\n}\r\n\r\nXYPOSITION SurfaceImpl::WidthTextUTF8(const Font *font, std::string_view text)\r\n{\r\n\tQFontMetricsF metrics(*FontPointer(font), device);\r\n\tQString su = QString::fromUtf8(text.data(), static_cast<int>(text.length()));\r\n#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)\r\n\treturn metrics.horizontalAdvance(su);\r\n#else\r\n\treturn metrics.width(su);\r\n#endif\r\n}\r\n\r\nXYPOSITION SurfaceImpl::Ascent(const Font *font)\r\n{\r\n\tQFontMetricsF metrics(*FontPointer(font), device);\r\n\treturn metrics.ascent();\r\n}\r\n\r\nXYPOSITION SurfaceImpl::Descent(const Font *font)\r\n{\r\n\tQFontMetricsF metrics(*FontPointer(font), device);\r\n\t// Qt returns 1 less than true descent\r\n\t// See: QFontEngineWin::descent which says:\r\n\t// ### we subtract 1 to even out the historical +1 in QFontMetrics's\r\n\t// ### height=asc+desc+1 equation. Fix in Qt5.\r\n\treturn metrics.descent() + 1;\r\n}\r\n\r\nXYPOSITION SurfaceImpl::InternalLeading(const Font * /* font */)\r\n{\r\n\treturn 0;\r\n}\r\n\r\nXYPOSITION SurfaceImpl::Height(const Font *font)\r\n{\r\n\tQFontMetricsF metrics(*FontPointer(font), device);\r\n\treturn metrics.height();\r\n}\r\n\r\nXYPOSITION SurfaceImpl::AverageCharWidth(const Font *font)\r\n{\r\n\tQFontMetricsF metrics(*FontPointer(font), device);\r\n\treturn metrics.averageCharWidth();\r\n}\r\n\r\nvoid SurfaceImpl::FlushCachedState()\r\n{\r\n\tif (device->paintingActive()) {\r\n\t\tGetPainter()->setPen(QPen());\r\n\t\tGetPainter()->setBrush(QBrush());\r\n\t}\r\n}\r\n\r\nvoid SurfaceImpl::FlushDrawing()\r\n{\r\n}\r\n\r\nQPaintDevice *SurfaceImpl::GetPaintDevice()\r\n{\r\n\treturn device;\r\n}\r\n\r\nQPainter *SurfaceImpl::GetPainter()\r\n{\r\n\tQ_ASSERT(device);\r\n\tif (!painter) {\r\n\t\tif (device->paintingActive()) {\r\n\t\t\tpainter = device->paintEngine()->painter();\r\n\t\t} else {\r\n\t\t\tpainterOwned = true;\r\n\t\t\tpainter = new QPainter(device);\r\n\t\t}\r\n\r\n\t\t// Set text antialiasing unconditionally.\r\n\t\t// The font's style strategy will override.\r\n\t\tpainter->setRenderHint(QPainter::TextAntialiasing, true);\r\n\r\n\t\tpainter->setRenderHint(QPainter::Antialiasing, true);\r\n\t}\r\n\r\n\treturn painter;\r\n}\r\n\r\nstd::unique_ptr<Surface> Surface::Allocate(Technology)\r\n{\r\n\treturn std::make_unique<SurfaceImpl>();\r\n}\r\n\r\n\r\n//----------------------------------------------------------------------\r\n\r\nnamespace {\r\n\r\nQWidget *window(WindowID wid) noexcept\r\n{\r\n\treturn static_cast<QWidget *>(wid);\r\n}\r\n\r\nQRect ScreenRectangleForPoint(QPoint posGlobal)\r\n{\r\n#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)\r\n\tconst QScreen *screen = QGuiApplication::screenAt(posGlobal);\r\n\tif (!screen) {\r\n\t\tscreen = QGuiApplication::primaryScreen();\r\n\t}\r\n\treturn screen->availableGeometry();\r\n#else\r\n\tconst QDesktopWidget *desktop = QApplication::desktop();\r\n\treturn desktop->availableGeometry(posGlobal);\r\n#endif\r\n}\r\n\r\n}\r\n\r\nWindow::~Window() noexcept = default;\r\n\r\nvoid Window::Destroy() noexcept\r\n{\r\n\tif (wid)\r\n\t\tdelete window(wid);\r\n\twid = nullptr;\r\n}\r\nPRectangle Window::GetPosition() const\r\n{\r\n\t// Before any size allocated pretend its 1000 wide so not scrolled\r\n\treturn wid ? PRectFromQRect(window(wid)->frameGeometry()) : PRectangle(0, 0, 1000, 1000);\r\n}\r\n\r\nvoid Window::SetPosition(PRectangle rc)\r\n{\r\n\tif (wid)\r\n\t\twindow(wid)->setGeometry(QRectFromPRect(rc));\r\n}\r\n\r\nvoid Window::SetPositionRelative(PRectangle rc, const Window *relativeTo)\r\n{\r\n\tQPoint oPos = window(relativeTo->wid)->mapToGlobal(QPoint(0,0));\r\n\tint ox = oPos.x();\r\n\tint oy = oPos.y();\r\n\tox += rc.left;\r\n\toy += rc.top;\r\n\r\n\tconst QRect rectDesk = ScreenRectangleForPoint(QPoint(ox, oy));\r\n\t/* do some corrections to fit into screen */\r\n\tint sizex = rc.right - rc.left;\r\n\tint sizey = rc.bottom - rc.top;\r\n\tint screenWidth = rectDesk.width();\r\n\tif (ox < rectDesk.x())\r\n\t\tox = rectDesk.x();\r\n\tif (sizex > screenWidth)\r\n\t\tox = rectDesk.x(); /* the best we can do */\r\n\telse if (ox + sizex > rectDesk.right())\r\n\t\tox = rectDesk.right() - sizex;\r\n\tif (oy + sizey > rectDesk.bottom())\r\n\t\toy = rectDesk.bottom() - sizey;\r\n\tif (oy < rectDesk.top())\r\n\t\toy = rectDesk.top();\r\n\r\n\tQ_ASSERT(wid);\r\n\twindow(wid)->move(ox, oy);\r\n\twindow(wid)->resize(sizex, sizey);\r\n}\r\n\r\nPRectangle Window::GetClientPosition() const\r\n{\r\n\t// The client position is the window position\r\n\treturn GetPosition();\r\n}\r\n\r\nvoid Window::Show(bool show)\r\n{\r\n\tif (wid)\r\n\t\twindow(wid)->setVisible(show);\r\n}\r\n\r\nvoid Window::InvalidateAll()\r\n{\r\n\tif (wid)\r\n\t\twindow(wid)->update();\r\n}\r\n\r\nvoid Window::InvalidateRectangle(PRectangle rc)\r\n{\r\n\tif (wid)\r\n\t\twindow(wid)->update(QRectFromPRect(rc));\r\n}\r\n\r\nvoid Window::SetCursor(Cursor curs)\r\n{\r\n\tif (wid) {\r\n\t\tQt::CursorShape shape;\r\n\r\n\t\tswitch (curs) {\r\n\t\t\tcase Cursor::text:  shape = Qt::IBeamCursor;        break;\r\n\t\t\tcase Cursor::arrow: shape = Qt::ArrowCursor;        break;\r\n\t\t\tcase Cursor::up:    shape = Qt::UpArrowCursor;      break;\r\n\t\t\tcase Cursor::wait:  shape = Qt::WaitCursor;         break;\r\n\t\t\tcase Cursor::horizontal: shape = Qt::SizeHorCursor; break;\r\n\t\t\tcase Cursor::vertical:  shape = Qt::SizeVerCursor;  break;\r\n\t\t\tcase Cursor::hand:  shape = Qt::PointingHandCursor; break;\r\n\t\t\tdefault:            shape = Qt::ArrowCursor;        break;\r\n\t\t}\r\n\r\n\t\tQCursor cursor = QCursor(shape);\r\n\r\n\t\tif (curs != cursorLast) {\r\n\t\t\twindow(wid)->setCursor(cursor);\r\n\t\t\tcursorLast = curs;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n/* Returns rectangle of monitor pt is on, both rect and pt are in Window's\r\n   window coordinates */\r\nPRectangle Window::GetMonitorRect(Point pt)\r\n{\r\n\tconst QPoint posGlobal = window(wid)->mapToGlobal(QPoint(pt.x, pt.y));\r\n\tconst QPoint originGlobal = window(wid)->mapToGlobal(QPoint(0, 0));\r\n\tQRect rectScreen = ScreenRectangleForPoint(posGlobal);\r\n\trectScreen.translate(-originGlobal.x(), -originGlobal.y());\r\n\treturn PRectFromQRect(rectScreen);\r\n}\r\n\r\n//----------------------------------------------------------------------\r\nclass ListWidget : public QListWidget {\r\npublic:\r\n\texplicit ListWidget(QWidget *parent);\r\n\r\n\tvoid setDelegate(IListBoxDelegate *lbDelegate);\r\n\r\n\tint currentSelection();\r\n\r\nprotected:\r\n\tvoid selectionChanged(const QItemSelection &selected, const QItemSelection &deselected) override;\r\n\tvoid mouseDoubleClickEvent(QMouseEvent *event) override;\r\n#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)\r\n\tvoid initViewItemOption(QStyleOptionViewItem *option) const override;\r\n#else\r\n\tQStyleOptionViewItem viewOptions() const override;\r\n#endif\r\n\r\nprivate:\r\n\tIListBoxDelegate *delegate;\r\n};\r\n\r\nclass ListBoxImpl : public ListBox {\r\npublic:\r\n\tListBoxImpl() noexcept;\r\n\r\n\tvoid SetFont(const Font *font) override;\r\n\tvoid Create(Window &parent, int ctrlID, Point location,\r\n\t\t\t\t\t\tint lineHeight, bool unicodeMode_, Technology technology) override;\r\n\tvoid SetAverageCharWidth(int width) override;\r\n\tvoid SetVisibleRows(int rows) override;\r\n\tint GetVisibleRows() const override;\r\n\tPRectangle GetDesiredRect() override;\r\n\tint CaretFromEdge() override;\r\n\tvoid Clear() noexcept override;\r\n\tvoid Append(char *s, int type) override;\r\n\tint Length() override;\r\n\tvoid Select(int n) override;\r\n\tint GetSelection() override;\r\n\tint Find(const char *prefix) override;\r\n\tstd::string GetValue(int n) override;\r\n\tvoid RegisterImage(int type, const char *xpmData) override;\r\n\tvoid RegisterRGBAImage(int type, int width, int height,\r\n\t\tconst unsigned char *pixelsImage) override;\r\n\tvirtual void RegisterQPixmapImage(int type, const QPixmap& pm);\r\n\tvoid ClearRegisteredImages() override;\r\n\tvoid SetDelegate(IListBoxDelegate *lbDelegate) override;\r\n\tvoid SetList(const char *list, char separator, char typesep) override;\r\n\tvoid SetOptions(ListOptions options_) override;\r\n\r\n\t[[nodiscard]] ListWidget *GetWidget() const noexcept;\r\nprivate:\r\n\tbool unicodeMode{false};\r\n\tint visibleRows{5};\r\n\tQMap<int,QPixmap> images;\r\n};\r\nListBoxImpl::ListBoxImpl() noexcept = default;\r\n\r\nvoid ListBoxImpl::Create(Window &parent,\r\n                         int /*ctrlID*/,\r\n                         Point location,\r\n                         int /*lineHeight*/,\r\n                         bool unicodeMode_,\r\n\t\t\t Technology)\r\n{\r\n\tunicodeMode = unicodeMode_;\r\n\r\n\tQWidget *qparent = static_cast<QWidget *>(parent.GetID());\r\n\tListWidget *list = new ListWidget(qparent);\r\n\r\n#if defined(Q_OS_WIN)\r\n\t// On Windows, Qt::ToolTip causes a crash when the list is clicked on\r\n\t// so Qt::Tool is used.\r\n\tlist->setParent(nullptr, Qt::Tool | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint\r\n#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)\r\n\t\t| Qt::WindowDoesNotAcceptFocus\r\n#endif\r\n\t);\r\n#else\r\n\t// On macOS, Qt::Tool takes focus so main window loses focus so\r\n\t// keyboard stops working. Qt::ToolTip works but its only really\r\n\t// documented for tooltips.\r\n\t// On Linux / X this setting allows clicking on list items.\r\n\tlist->setParent(nullptr, static_cast<Qt::WindowFlags>(Qt::ToolTip | Qt::FramelessWindowHint));\r\n#endif\r\n\tlist->setAttribute(Qt::WA_ShowWithoutActivating);\r\n\tlist->setFocusPolicy(Qt::NoFocus);\r\n\tlist->setUniformItemSizes(true);\r\n\tlist->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);\r\n\tlist->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);\r\n\tlist->move(location.x, location.y);\r\n\r\n\tint maxIconWidth = 0;\r\n\tint maxIconHeight = 0;\r\n\tforeach (QPixmap im, images) {\r\n\t\tif (maxIconWidth < im.width())\r\n\t\t\tmaxIconWidth = im.width();\r\n\t\tif (maxIconHeight < im.height())\r\n\t\t\tmaxIconHeight = im.height();\r\n\t}\r\n\tlist->setIconSize(QSize(maxIconWidth, maxIconHeight));\r\n\r\n\twid = list;\r\n}\r\nvoid ListBoxImpl::SetFont(const Font *font)\r\n{\r\n\tListWidget *list = GetWidget();\r\n\tconst FontAndCharacterSet *pfacs = AsFontAndCharacterSet(font);\r\n\tif (pfacs && pfacs->pfont) {\r\n\t\tlist->setFont(*(pfacs->pfont));\r\n\t}\r\n}\r\nvoid ListBoxImpl::SetAverageCharWidth(int /*width*/) {}\r\n\r\nvoid ListBoxImpl::SetVisibleRows(int rows)\r\n{\r\n\tvisibleRows = rows;\r\n}\r\n\r\nint ListBoxImpl::GetVisibleRows() const\r\n{\r\n\treturn visibleRows;\r\n}\r\nPRectangle ListBoxImpl::GetDesiredRect()\r\n{\r\n\tListWidget *list = GetWidget();\r\n\tint rows = Length();\r\n\tif (rows == 0 || rows > visibleRows) {\r\n\t\trows = visibleRows;\r\n\t}\r\n\tint rowHeight = list->sizeHintForRow(0);\r\n\tint height = (rows * rowHeight) + (2 * list->frameWidth());\r\n\r\n\tQStyle *style = QApplication::style();\r\n\tint width = list->sizeHintForColumn(0) + (2 * list->frameWidth());\r\n\tif (Length() > rows) {\r\n\t\twidth += style->pixelMetric(QStyle::PM_ScrollBarExtent);\r\n\t}\r\n\r\n\treturn PRectangle(0, 0, width, height);\r\n}\r\nint ListBoxImpl::CaretFromEdge()\r\n{\r\n\tListWidget *list = GetWidget();\r\n\tint maxIconWidth = 0;\r\n\tforeach (QPixmap im, images) {\r\n\t\tif (maxIconWidth < im.width())\r\n\t\t\tmaxIconWidth = im.width();\r\n\t}\r\n\r\n\tint extra;\r\n\t// The 12 is from trial and error on macOS and the 7\r\n\t// is from trial and error on Windows - there may be\r\n\t// a better programmatic way to find any padding factors.\r\n#ifdef Q_OS_DARWIN\r\n\textra = 12;\r\n#else\r\n\textra = 7;\r\n#endif\r\n\treturn maxIconWidth + (2 * list->frameWidth()) + extra;\r\n}\r\nvoid ListBoxImpl::Clear() noexcept\r\n{\r\n\tListWidget *list = GetWidget();\r\n\tlist->clear();\r\n}\r\nvoid ListBoxImpl::Append(char *s, int type)\r\n{\r\n\tListWidget *list = GetWidget();\r\n\tQString str = unicodeMode ? QString::fromUtf8(s) : QString::fromLocal8Bit(s);\r\n\tQIcon icon;\r\n\tif (type >= 0) {\r\n\t\tQ_ASSERT(images.contains(type));\r\n\t\ticon = images.value(type);\r\n\t}\r\n\tnew QListWidgetItem(icon, str, list);\r\n}\r\nint ListBoxImpl::Length()\r\n{\r\n\tListWidget *list = GetWidget();\r\n\treturn list->count();\r\n}\r\nvoid ListBoxImpl::Select(int n)\r\n{\r\n\tListWidget *list = GetWidget();\r\n\tQModelIndex index = list->model()->index(n, 0);\r\n\tif (index.isValid()) {\r\n\t\tQRect row_rect = list->visualRect(index);\r\n\t\tif (!list->viewport()->rect().contains(row_rect)) {\r\n\t\t\tlist->scrollTo(index, QAbstractItemView::PositionAtTop);\r\n\t\t}\r\n\t}\r\n\tlist->setCurrentRow(n);\r\n}\r\nint ListBoxImpl::GetSelection()\r\n{\r\n\tListWidget *list = GetWidget();\r\n\treturn list->currentSelection();\r\n}\r\nint ListBoxImpl::Find(const char *prefix)\r\n{\r\n\tListWidget *list = GetWidget();\r\n\tQString sPrefix = unicodeMode ? QString::fromUtf8(prefix) : QString::fromLocal8Bit(prefix);\r\n\tQList<QListWidgetItem *> ms = list->findItems(sPrefix, Qt::MatchStartsWith);\r\n\tint result = -1;\r\n\tif (!ms.isEmpty()) {\r\n\t\tresult = list->row(ms.first());\r\n\t}\r\n\r\n\treturn result;\r\n}\r\nstd::string ListBoxImpl::GetValue(int n)\r\n{\r\n\tListWidget *list = GetWidget();\r\n\tQListWidgetItem *item = list->item(n);\r\n\tQString str = item->data(Qt::DisplayRole).toString();\r\n\tQByteArray bytes = unicodeMode ? str.toUtf8() : str.toLocal8Bit();\r\n\treturn std::string(bytes.constData());\r\n}\r\n\r\nvoid ListBoxImpl::RegisterQPixmapImage(int type, const QPixmap& pm)\r\n{\r\n\timages[type] = pm;\r\n\tListWidget *list = GetWidget();\r\n\tif (list) {\r\n\t\tQSize iconSize = list->iconSize();\r\n\t\tif (pm.width() > iconSize.width() || pm.height() > iconSize.height())\r\n\t\t\tlist->setIconSize(QSize(qMax(pm.width(), iconSize.width()),\r\n\t\t\t\t\t\t qMax(pm.height(), iconSize.height())));\r\n\t}\r\n\r\n}\r\n\r\nvoid ListBoxImpl::RegisterImage(int type, const char *xpmData)\r\n{\r\n\tXPM xpmImage(xpmData);\r\n\tRGBAImage rgbaImage(xpmImage);\r\n\tRegisterRGBAImage(type, rgbaImage.GetWidth(), rgbaImage.GetHeight(), rgbaImage.Pixels());\r\n}\r\n\r\nvoid ListBoxImpl::RegisterRGBAImage(int type, int width, int height, const unsigned char *pixelsImage)\r\n{\r\n\tstd::vector<unsigned char> imageBytes = ImageByteSwapped(width, height, pixelsImage);\r\n\tQImage image(&imageBytes[0], width, height, QImage::Format_ARGB32);\r\n\tRegisterQPixmapImage(type, QPixmap::fromImage(image));\r\n}\r\n\r\nvoid ListBoxImpl::ClearRegisteredImages()\r\n{\r\n\timages.clear();\r\n\tListWidget *list = GetWidget();\r\n\tif (list)\r\n\t\tlist->setIconSize(QSize(0, 0));\r\n}\r\nvoid ListBoxImpl::SetDelegate(IListBoxDelegate *lbDelegate)\r\n{\r\n\tListWidget *list = GetWidget();\r\n\tlist->setDelegate(lbDelegate);\r\n}\r\nvoid ListBoxImpl::SetList(const char *list, char separator, char typesep)\r\n{\r\n\t// This method is *not* platform dependent.\r\n\t// It is borrowed from the GTK implementation.\r\n\tClear();\r\n\tsize_t count = strlen(list) + 1;\r\n\tstd::vector<char> words(list, list+count);\r\n\tchar *startword = &words[0];\r\n\tchar *numword = nullptr;\r\n\tint i = 0;\r\n\tfor (; words[i]; i++) {\r\n\t\tif (words[i] == separator) {\r\n\t\t\twords[i] = '\\0';\r\n\t\t\tif (numword)\r\n\t\t\t\t*numword = '\\0';\r\n\t\t\tAppend(startword, numword?atoi(numword + 1):-1);\r\n\t\t\tstartword = &words[0] + i + 1;\r\n\t\t\tnumword = nullptr;\r\n\t\t} else if (words[i] == typesep) {\r\n\t\t\tnumword = &words[0] + i;\r\n\t\t}\r\n\t}\r\n\tif (startword) {\r\n\t\tif (numword)\r\n\t\t\t*numword = '\\0';\r\n\t\tAppend(startword, numword?atoi(numword + 1):-1);\r\n\t}\r\n}\r\nvoid ListBoxImpl::SetOptions(ListOptions)\r\n{\r\n}\r\nListWidget *ListBoxImpl::GetWidget() const noexcept\r\n{\r\n\treturn static_cast<ListWidget *>(wid);\r\n}\r\n\r\nListBox::ListBox() noexcept = default;\r\nListBox::~ListBox() noexcept = default;\r\n\r\nstd::unique_ptr<ListBox> ListBox::Allocate()\r\n{\r\n\treturn std::make_unique<ListBoxImpl>();\r\n}\r\nListWidget::ListWidget(QWidget *parent)\r\n: QListWidget(parent), delegate(nullptr)\r\n{}\r\n\r\nvoid ListWidget::setDelegate(IListBoxDelegate *lbDelegate)\r\n{\r\n\tdelegate = lbDelegate;\r\n}\r\n\r\nvoid ListWidget::selectionChanged(const QItemSelection &selected, const QItemSelection &deselected) {\r\n\tQListWidget::selectionChanged(selected, deselected);\r\n\tif (delegate) {\r\n\t\tconst int selection = currentSelection();\r\n\t\tif (selection >= 0) {\r\n\t\t\tListBoxEvent event(ListBoxEvent::EventType::selectionChange);\r\n\t\t\tdelegate->ListNotify(&event);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nint ListWidget::currentSelection() {\r\n\tconst QModelIndexList indices = selectionModel()->selectedRows();\r\n\tforeach (const QModelIndex ind, indices) {\r\n\t\treturn ind.row();\r\n\t}\r\n\treturn -1;\r\n}\r\n\r\nvoid ListWidget::mouseDoubleClickEvent(QMouseEvent * /* event */)\r\n{\r\n\tif (delegate) {\r\n\t\tListBoxEvent event(ListBoxEvent::EventType::doubleClick);\r\n\t\tdelegate->ListNotify(&event);\r\n\t}\r\n}\r\n\r\n#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)\r\nvoid ListWidget::initViewItemOption(QStyleOptionViewItem *option) const\r\n{\r\n\tQListWidget::initViewItemOption(option);\r\n\toption->state |= QStyle::State_Active;\r\n}\r\n#else\r\nQStyleOptionViewItem ListWidget::viewOptions() const\r\n{\r\n\tQStyleOptionViewItem result = QListWidget::viewOptions();\r\n\tresult.state |= QStyle::State_Active;\r\n\treturn result;\r\n}\r\n#endif\r\n//----------------------------------------------------------------------\r\nMenu::Menu() noexcept : mid(nullptr) {}\r\nvoid Menu::CreatePopUp()\r\n{\r\n\tDestroy();\r\n\tmid = new QMenu();\r\n}\r\n\r\nvoid Menu::Destroy() noexcept\r\n{\r\n\tif (mid) {\r\n\t\tQMenu *menu = static_cast<QMenu *>(mid);\r\n\t\tdelete menu;\r\n\t}\r\n\tmid = nullptr;\r\n}\r\nvoid Menu::Show(Point pt, const Window & /*w*/)\r\n{\r\n\tQMenu *menu = static_cast<QMenu *>(mid);\r\n\tmenu->exec(QPoint(pt.x, pt.y));\r\n\tDestroy();\r\n}\r\n\r\n//----------------------------------------------------------------------\r\n\r\nColourRGBA Platform::Chrome()\r\n{\r\n\tQColor c(Qt::gray);\r\n\treturn ColourRGBA(c.red(), c.green(), c.blue());\r\n}\r\n\r\nColourRGBA Platform::ChromeHighlight()\r\n{\r\n\tQColor c(Qt::lightGray);\r\n\treturn ColourRGBA(c.red(), c.green(), c.blue());\r\n}\r\n\r\nconst char *Platform::DefaultFont()\r\n{\r\n\tstatic char fontNameDefault[200] = \"\";\r\n\tif (!fontNameDefault[0]) {\r\n\t\tQFont font = QApplication::font();\r\n\t\tstrcpy(fontNameDefault, font.family().toUtf8());\r\n\t}\r\n\treturn fontNameDefault;\r\n}\r\n\r\nint Platform::DefaultFontSize()\r\n{\r\n\tQFont font = QApplication::font();\r\n\treturn font.pointSize();\r\n}\r\n\r\nunsigned int Platform::DoubleClickTime()\r\n{\r\n\treturn QApplication::doubleClickInterval();\r\n}\r\n\r\nvoid Platform::DebugDisplay(const char *s) noexcept\r\n{\r\n\tqWarning(\"Scintilla: %s\", s);\r\n}\r\n\r\nvoid Platform::DebugPrintf(const char *format, ...) noexcept\r\n{\r\n\tchar buffer[2000];\r\n\tva_list pArguments{};\r\n\tva_start(pArguments, format);\r\n\tvsnprintf(buffer, std::size(buffer), format, pArguments);\r\n\tva_end(pArguments);\r\n\tPlatform::DebugDisplay(buffer);\r\n}\r\n\r\nbool Platform::ShowAssertionPopUps(bool /*assertionPopUps*/) noexcept\r\n{\r\n\treturn false;\r\n}\r\n\r\nvoid Platform::Assert(const char *c, const char *file, int line) noexcept\r\n{\r\n\tchar buffer[2000];\r\n\tsnprintf(buffer, std::size(buffer), \"Assertion [%s] failed at %s %d\", c, file, line);\r\n\tif (Platform::ShowAssertionPopUps(false)) {\r\n#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)\r\n\t\tQMessageBox mb(QMessageBox::NoIcon, \"Assertion Failure\", buffer,\r\n\t\t\tQMessageBox::Ok);\r\n#else\r\n\t\tQMessageBox mb(\"Assertion Failure\", buffer, QMessageBox::NoIcon,\r\n\t\t\tQMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton);\r\n#endif\r\n\t\tmb.exec();\r\n\t} else {\r\n\t\tstrcat(buffer, \"\\n\");\r\n\t\tPlatform::DebugDisplay(buffer);\r\n\t}\r\n}\r\n\r\n}\r\n"
  },
  {
    "path": "scintilla/qt/ScintillaEditBase/PlatQt.h",
    "content": "// @file PlatQt.h\r\n//          Copyright (c) 1990-2011, Scientific Toolworks, Inc.\r\n//\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n//\r\n// Author: Jason Haslam\r\n//\r\n// Additions Copyright (c) 2011 Archaeopteryx Software, Inc. d/b/a Wingware\r\n// Scintilla platform layer for Qt\r\n\r\n#ifndef PLATQT_H\r\n#define PLATQT_H\r\n\r\n#include <cstddef>\r\n\r\n#include <string_view>\r\n#include <vector>\r\n#include <optional>\r\n#include <memory>\r\n\r\n#include \"Debugging.h\"\r\n#include \"Geometry.h\"\r\n#include \"ScintillaTypes.h\"\r\n#include \"ScintillaMessages.h\"\r\n#include \"Platform.h\"\r\n\r\n#include <QUrl>\r\n#include <QPaintDevice>\r\n#include <QPainter>\r\n#include <QHash>\r\n#include <QTextCodec>\r\n\r\nnamespace Scintilla::Internal {\r\n\r\nconst char *CharacterSetID(Scintilla::CharacterSet characterSet);\r\n\r\ninline QColor QColorFromColourRGBA(ColourRGBA ca)\r\n{\r\n\treturn QColor(ca.GetRed(), ca.GetGreen(), ca.GetBlue(), ca.GetAlpha());\r\n}\r\n\r\ninline QRect QRectFromPRect(PRectangle pr)\r\n{\r\n\treturn QRect(pr.left, pr.top, pr.Width(), pr.Height());\r\n}\r\n\r\ninline QRectF QRectFFromPRect(PRectangle pr)\r\n{\r\n\treturn QRectF(pr.left, pr.top, pr.Width(), pr.Height());\r\n}\r\n\r\ninline PRectangle PRectFromQRect(QRect qr)\r\n{\r\n\treturn PRectangle(qr.x(), qr.y(), qr.x() + qr.width(), qr.y() + qr.height());\r\n}\r\n\r\ninline Point PointFromQPoint(QPoint qp)\r\n{\r\n\treturn Point(qp.x(), qp.y());\r\n}\r\n\r\ninline QPointF QPointFFromPoint(Point qp)\r\n{\r\n\treturn QPointF(qp.x, qp.y);\r\n}\r\n\r\nconstexpr PRectangle RectangleInset(PRectangle rc, XYPOSITION delta) noexcept {\r\n\treturn PRectangle(rc.left + delta, rc.top + delta, rc.right - delta, rc.bottom - delta);\r\n}\r\n\r\nclass SurfaceImpl : public Surface {\r\nprivate:\r\n\tQPaintDevice *device = nullptr;\r\n\tQPainter *painter = nullptr;\r\n\tbool deviceOwned = false;\r\n\tbool painterOwned = false;\r\n\tSurfaceMode mode;\r\n\tconst char *codecName = nullptr;\r\n\tQTextCodec *codec = nullptr;\r\n\r\n\tvoid Clear();\r\n\r\npublic:\r\n\tSurfaceImpl();\r\n\tSurfaceImpl(int width, int height, SurfaceMode mode_);\r\n\tvirtual ~SurfaceImpl();\r\n\r\n\tvoid Init(WindowID wid) override;\r\n\tvoid Init(SurfaceID sid, WindowID wid) override;\r\n\tstd::unique_ptr<Surface> AllocatePixMap(int width, int height) override;\r\n\r\n\tvoid SetMode(SurfaceMode mode) override;\r\n\r\n\tvoid Release() noexcept override;\r\n\tint SupportsFeature(Scintilla::Supports feature) noexcept override;\r\n\tbool Initialised() override;\r\n\tvoid PenColour(ColourRGBA fore);\r\n\tvoid PenColourWidth(ColourRGBA fore, XYPOSITION strokeWidth);\r\n\tint LogPixelsY() override;\r\n\tint PixelDivisions() override;\r\n\tint DeviceHeightFont(int points) override;\r\n\tvoid LineDraw(Point start, Point end, Stroke stroke) override;\r\n\tvoid PolyLine(const Point *pts, size_t npts, Stroke stroke) override;\r\n\tvoid Polygon(const Point *pts, size_t npts, FillStroke fillStroke) override;\r\n\tvoid RectangleDraw(PRectangle rc, FillStroke fillStroke) override;\r\n\tvoid RectangleFrame(PRectangle rc, Stroke stroke) override;\r\n\tvoid FillRectangle(PRectangle rc, Fill fill) override;\r\n\tvoid FillRectangleAligned(PRectangle rc, Fill fill) override;\r\n\tvoid FillRectangle(PRectangle rc, Surface &surfacePattern) override;\r\n\tvoid RoundedRectangle(PRectangle rc, FillStroke fillStroke) override;\r\n\tvoid AlphaRectangle(PRectangle rc, XYPOSITION cornerSize, FillStroke fillStroke) override;\r\n\tvoid GradientRectangle(PRectangle rc, const std::vector<ColourStop> &stops, GradientOptions options) override;\r\n\tvoid DrawRGBAImage(PRectangle rc, int width, int height,\r\n\t\tconst unsigned char *pixelsImage) override;\r\n\tvoid Ellipse(PRectangle rc, FillStroke fillStroke) override;\r\n\tvoid Stadium(PRectangle rc, FillStroke fillStroke, Ends ends) override;\r\n\tvoid Copy(PRectangle rc, Point from, Surface &surfaceSource) override;\r\n\r\n\tstd::unique_ptr<IScreenLineLayout> Layout(const IScreenLine *screenLine) override;\r\n\r\n\tvoid DrawTextNoClip(PRectangle rc, const Font *font, XYPOSITION ybase,\r\n\t\tstd::string_view text, ColourRGBA fore, ColourRGBA back) override;\r\n\tvoid DrawTextClipped(PRectangle rc, const Font *font, XYPOSITION ybase,\r\n\t\tstd::string_view text, ColourRGBA fore, ColourRGBA back) override;\r\n\tvoid DrawTextTransparent(PRectangle rc, const Font *font, XYPOSITION ybase,\r\n\t\tstd::string_view text, ColourRGBA fore) override;\r\n\tvoid MeasureWidths(const Font *font, std::string_view text,\r\n\t\tXYPOSITION *positions) override;\r\n\tXYPOSITION WidthText(const Font *font, std::string_view text) override;\r\n\r\n\tvoid DrawTextNoClipUTF8(PRectangle rc, const Font *font_, XYPOSITION ybase,\r\n\t\tstd::string_view text, ColourRGBA fore, ColourRGBA back) override;\r\n\tvoid DrawTextClippedUTF8(PRectangle rc, const Font *font_, XYPOSITION ybase,\r\n\t\tstd::string_view text, ColourRGBA fore, ColourRGBA back) override;\r\n\tvoid DrawTextTransparentUTF8(PRectangle rc, const Font *font_, XYPOSITION ybase,\r\n\t\tstd::string_view text, ColourRGBA fore) override;\r\n\tvoid MeasureWidthsUTF8(const Font *font_, std::string_view text,\r\n\t\tXYPOSITION *positions) override;\r\n\tXYPOSITION WidthTextUTF8(const Font *font_, std::string_view text) override;\r\n\r\n\tXYPOSITION Ascent(const Font *font) override;\r\n\tXYPOSITION Descent(const Font *font) override;\r\n\tXYPOSITION InternalLeading(const Font *font) override;\r\n\tXYPOSITION Height(const Font *font) override;\r\n\tXYPOSITION AverageCharWidth(const Font *font) override;\r\n\r\n\tvoid SetClip(PRectangle rc) override;\r\n\tvoid PopClip() override;\r\n\tvoid FlushCachedState() override;\r\n\tvoid FlushDrawing() override;\r\n\r\n\tvoid BrushColour(ColourRGBA back);\r\n\tvoid SetCodec(const Font *font);\r\n\tvoid SetFont(const Font *font);\r\n\r\n\tQPaintDevice *GetPaintDevice();\r\n\tvoid SetPainter(QPainter *painter);\r\n\tQPainter *GetPainter();\r\n};\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/qt/ScintillaEditBase/ScintillaEditBase.cpp",
    "content": "//\r\n//          Copyright (c) 1990-2011, Scientific Toolworks, Inc.\r\n//\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n//\r\n// Author: Jason Haslam\r\n//\r\n// Additions Copyright (c) 2011 Archaeopteryx Software, Inc. d/b/a Wingware\r\n// @file ScintillaEditBase.cpp - Qt widget that wraps ScintillaQt and provides events and scrolling\r\n\r\n#include <cstdint>\r\n#include \"ScintillaEditBase.h\"\r\n#include \"ScintillaQt.h\"\r\n#include \"PlatQt.h\"\r\n\r\n#include <QApplication>\r\n#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)\r\n#include <QInputContext>\r\n#endif\r\n#include <QPainter>\r\n#include <QVarLengthArray>\r\n#include <QScrollBar>\r\n#include <QTextFormat>\r\n\r\nconstexpr int IndicatorInput = static_cast<int>(Scintilla::IndicatorNumbers::Ime);\r\nconstexpr int IndicatorTarget = IndicatorInput + 1;\r\nconstexpr int IndicatorConverted = IndicatorInput + 2;\r\nconstexpr int IndicatorUnknown = IndicatorInput + 3;\r\n\r\n// Q_WS_MAC and Q_WS_X11 aren't defined in Qt5\r\n#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)\r\n#ifdef Q_OS_MAC\r\n#define Q_WS_MAC 1\r\n#endif\r\n\r\n#if !defined(Q_OS_MAC) && !defined(Q_OS_WIN)\r\n#define Q_WS_X11 1\r\n#endif\r\n#endif // QT_VERSION >= 5.0.0\r\n\r\nusing namespace Scintilla;\r\nusing namespace Scintilla::Internal;\r\n\r\nScintillaEditBase::ScintillaEditBase(QWidget *parent)\r\n: QAbstractScrollArea(parent), sqt(new ScintillaQt(this)), preeditPos(-1), wheelDelta(0)\r\n{\r\n\ttime.start();\r\n\r\n\t// Set Qt defaults.\r\n\tsetAcceptDrops(true);\r\n\tsetMouseTracking(true);\r\n\tsetAutoFillBackground(false);\r\n\tsetFrameStyle(QFrame::NoFrame);\r\n\tsetFocusPolicy(Qt::StrongFocus);\r\n\tsetAttribute(Qt::WA_StaticContents);\r\n\tviewport()->setAutoFillBackground(false);\r\n\tsetAttribute(Qt::WA_KeyCompression);\r\n\tsetAttribute(Qt::WA_InputMethodEnabled);\r\n\r\n\tsqt->vs.indicators[IndicatorUnknown] = Indicator(IndicatorStyle::Hidden, colourIME);\r\n\tsqt->vs.indicators[IndicatorInput] = Indicator(IndicatorStyle::Dots, colourIME);\r\n\tsqt->vs.indicators[IndicatorConverted] = Indicator(IndicatorStyle::CompositionThick, colourIME);\r\n\tsqt->vs.indicators[IndicatorTarget] = Indicator(IndicatorStyle::StraightBox, colourIME);\r\n\r\n\tconnect(sqt, SIGNAL(notifyParent(Scintilla::NotificationData)),\r\n\t\tthis, SLOT(notifyParent(Scintilla::NotificationData)));\r\n\r\n\t// Connect scroll bars.\r\n\tconnect(verticalScrollBar(), SIGNAL(valueChanged(int)),\r\n\t        this, SLOT(scrollVertical(int)));\r\n\tconnect(horizontalScrollBar(), SIGNAL(valueChanged(int)),\r\n\t        this, SLOT(scrollHorizontal(int)));\r\n\r\n\t// Connect pass-through signals.\r\n\tconnect(sqt, SIGNAL(horizontalRangeChanged(int,int)),\r\n\t        this, SIGNAL(horizontalRangeChanged(int,int)));\r\n\tconnect(sqt, SIGNAL(verticalRangeChanged(int,int)),\r\n\t        this, SIGNAL(verticalRangeChanged(int,int)));\r\n\tconnect(sqt, SIGNAL(horizontalScrolled(int)),\r\n\t        this, SIGNAL(horizontalScrolled(int)));\r\n\tconnect(sqt, SIGNAL(verticalScrolled(int)),\r\n\t        this, SIGNAL(verticalScrolled(int)));\r\n\r\n\tconnect(sqt, SIGNAL(notifyChange()),\r\n\t        this, SIGNAL(notifyChange()));\r\n\r\n\tconnect(sqt, SIGNAL(command(Scintilla::uptr_t,Scintilla::sptr_t)),\r\n\t\tthis, SLOT(event_command(Scintilla::uptr_t,Scintilla::sptr_t)));\r\n\r\n\tconnect(sqt, SIGNAL(aboutToCopy(QMimeData*)),\r\n\t\tthis, SIGNAL(aboutToCopy(QMimeData*)));\r\n}\r\n\r\nScintillaEditBase::~ScintillaEditBase() = default;\r\n\r\nsptr_t ScintillaEditBase::send(\r\n\tunsigned int iMessage,\r\n\tuptr_t wParam,\r\n\tsptr_t lParam) const\r\n{\r\n\treturn sqt->WndProc(static_cast<Message>(iMessage), wParam, lParam);\r\n}\r\n\r\nsptr_t ScintillaEditBase::sends(\r\n    unsigned int iMessage,\r\n    uptr_t wParam,\r\n    const char *s) const\r\n{\r\n\treturn sqt->WndProc(static_cast<Message>(iMessage), wParam, reinterpret_cast<sptr_t>(s));\r\n}\r\n\r\nvoid ScintillaEditBase::scrollHorizontal(int value)\r\n{\r\n\tsqt->HorizontalScrollTo(value);\r\n}\r\n\r\nvoid ScintillaEditBase::scrollVertical(int value)\r\n{\r\n\tsqt->ScrollTo(value);\r\n}\r\n\r\nbool ScintillaEditBase::event(QEvent *event)\r\n{\r\n\tbool result = false;\r\n\r\n\tif (event->type() == QEvent::KeyPress) {\r\n\t\t// Circumvent the tab focus convention.\r\n\t\tkeyPressEvent(static_cast<QKeyEvent *>(event));\r\n\t\tresult = event->isAccepted();\r\n\t} else if (event->type() == QEvent::Show) {\r\n\t\tsetMouseTracking(true);\r\n\t\tresult = QAbstractScrollArea::event(event);\r\n\t} else if (event->type() == QEvent::Hide) {\r\n\t\tsetMouseTracking(false);\r\n\t\tresult = QAbstractScrollArea::event(event);\r\n\t} else {\r\n\t\tresult = QAbstractScrollArea::event(event);\r\n\t}\r\n\r\n\treturn result;\r\n}\r\n\r\nvoid ScintillaEditBase::paintEvent(QPaintEvent *event)\r\n{\r\n\tsqt->PartialPaint(PRectFromQRect(event->rect()));\r\n}\r\n\r\nnamespace {\r\n\r\nbool isWheelEventHorizontal(QWheelEvent *event) {\r\n#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)\r\n\treturn event->angleDelta().y() == 0;\r\n#else\r\n\treturn event->orientation() == Qt::Horizontal;\r\n#endif\r\n}\r\n\r\nint wheelEventYDelta(QWheelEvent *event) {\r\n#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)\r\n\treturn event->angleDelta().y();\r\n#else\r\n\treturn event->delta();\r\n#endif\r\n}\r\n\r\n}\r\n\r\nvoid ScintillaEditBase::wheelEvent(QWheelEvent *event)\r\n{\r\n\tif (isWheelEventHorizontal(event)) {\r\n\t\tQAbstractScrollArea::wheelEvent(event);\r\n\t} else {\r\n\t\tif (QApplication::keyboardModifiers() & Qt::ControlModifier) {\r\n\t\t\t// Zoom! We play with the font sizes in the styles.\r\n\t\t\t// Number of steps/line is ignored, we just care if sizing up or down\r\n\t\t\tif (wheelEventYDelta(event) > 0) {\r\n\t\t\t\tsqt->KeyCommand(Message::ZoomIn);\r\n\t\t\t} else {\r\n\t\t\t\tsqt->KeyCommand(Message::ZoomOut);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t// Scroll\r\n\t\t\tQAbstractScrollArea::wheelEvent(event);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid ScintillaEditBase::focusInEvent(QFocusEvent *event)\r\n{\r\n\tsqt->SetFocusState(true);\r\n\r\n\tQAbstractScrollArea::focusInEvent(event);\r\n}\r\n\r\nvoid ScintillaEditBase::focusOutEvent(QFocusEvent *event)\r\n{\r\n\tsqt->SetFocusState(false);\r\n\r\n\tQAbstractScrollArea::focusOutEvent(event);\r\n}\r\n\r\nvoid ScintillaEditBase::resizeEvent(QResizeEvent *)\r\n{\r\n\tsqt->ChangeSize();\r\n\temit resized();\r\n}\r\n\r\nvoid ScintillaEditBase::keyPressEvent(QKeyEvent *event)\r\n{\r\n\t// All keystrokes containing the meta modifier are\r\n\t// assumed to be shortcuts not handled by scintilla.\r\n\tif (QApplication::keyboardModifiers() & Qt::MetaModifier) {\r\n\t\tQAbstractScrollArea::keyPressEvent(event);\r\n\t\temit keyPressed(event);\r\n\t\treturn;\r\n\t}\r\n\r\n\tint key = 0;\r\n\tswitch (event->key()) {\r\n\t\tcase Qt::Key_Down:          key = SCK_DOWN;     break;\r\n\t\tcase Qt::Key_Up:            key = SCK_UP;       break;\r\n\t\tcase Qt::Key_Left:          key = SCK_LEFT;     break;\r\n\t\tcase Qt::Key_Right:         key = SCK_RIGHT;    break;\r\n\t\tcase Qt::Key_Home:          key = SCK_HOME;     break;\r\n\t\tcase Qt::Key_End:           key = SCK_END;      break;\r\n\t\tcase Qt::Key_PageUp:        key = SCK_PRIOR;    break;\r\n\t\tcase Qt::Key_PageDown:      key = SCK_NEXT;     break;\r\n\t\tcase Qt::Key_Delete:        key = SCK_DELETE;   break;\r\n\t\tcase Qt::Key_Insert:        key = SCK_INSERT;   break;\r\n\t\tcase Qt::Key_Escape:        key = SCK_ESCAPE;   break;\r\n\t\tcase Qt::Key_Backspace:     key = SCK_BACK;     break;\r\n\t\tcase Qt::Key_Plus:          key = SCK_ADD;      break;\r\n\t\tcase Qt::Key_Minus:         key = SCK_SUBTRACT; break;\r\n\t\tcase Qt::Key_Backtab:       // fall through\r\n\t\tcase Qt::Key_Tab:           key = SCK_TAB;      break;\r\n\t\tcase Qt::Key_Enter:         // fall through\r\n\t\tcase Qt::Key_Return:        key = SCK_RETURN;   break;\r\n\t\tcase Qt::Key_Control:       key = 0;            break;\r\n\t\tcase Qt::Key_Alt:           key = 0;            break;\r\n\t\tcase Qt::Key_Shift:         key = 0;            break;\r\n\t\tcase Qt::Key_Meta:          key = 0;            break;\r\n\t\tdefault:                    key = event->key(); break;\r\n\t}\r\n\r\n\tbool shift = QApplication::keyboardModifiers() & Qt::ShiftModifier;\r\n\tbool ctrl  = QApplication::keyboardModifiers() & Qt::ControlModifier;\r\n\tbool alt   = QApplication::keyboardModifiers() & Qt::AltModifier;\r\n\r\n\tbool consumed = false;\r\n\tbool added = sqt->KeyDownWithModifiers(static_cast<Keys>(key),\r\n\t\t\t\t\t       ModifierFlags(shift, ctrl, alt),\r\n\t\t\t\t\t       &consumed) != 0;\r\n\tif (!consumed)\r\n\t\tconsumed = added;\r\n\r\n\tif (!consumed) {\r\n\t\t// Don't insert text if the control key was pressed unless\r\n\t\t// it was pressed in conjunction with alt for AltGr emulation.\r\n\t\tbool input = (!ctrl || alt);\r\n\r\n\t\t// Additionally, on non-mac platforms, don't insert text\r\n\t\t// if the alt key was pressed unless control is also present.\r\n\t\t// On mac alt can be used to insert special characters.\r\n#ifndef Q_WS_MAC\r\n\t\tinput &= (!alt || ctrl);\r\n#endif\r\n\r\n\t\tQString text = event->text();\r\n\t\tif (input && !text.isEmpty() && text[0].isPrint()) {\r\n\t\t\tconst int strLen = text.length();\r\n\t\t\tfor (int i = 0; i < strLen;) {\r\n\t\t\t\tconst int ucWidth = text.at(i).isHighSurrogate() ? 2 : 1;\r\n\t\t\t\tconst QString oneCharUTF16 = text.mid(i, ucWidth);\r\n\t\t\t\tconst QByteArray oneChar = sqt->BytesForDocument(oneCharUTF16);\r\n\r\n\t\t\t\tsqt->InsertCharacter(std::string_view(oneChar.data(), oneChar.length()), CharacterSource::DirectInput);\r\n\t\t\t\ti += ucWidth;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tevent->ignore();\r\n\t\t}\r\n\t}\r\n\r\n\temit keyPressed(event);\r\n}\r\n\r\nstatic int modifierTranslated(int sciModifier)\r\n{\r\n\tswitch (sciModifier) {\r\n\t\tcase SCMOD_SHIFT:\r\n\t\t\treturn Qt::ShiftModifier;\r\n\t\tcase SCMOD_CTRL:\r\n\t\t\treturn Qt::ControlModifier;\r\n\t\tcase SCMOD_ALT:\r\n\t\t\treturn Qt::AltModifier;\r\n\t\tcase SCMOD_SUPER:\r\n\t\t\treturn Qt::MetaModifier;\r\n\t\tdefault:\r\n\t\t\treturn 0;\r\n\t}\r\n}\r\n\r\nvoid ScintillaEditBase::mousePressEvent(QMouseEvent *event)\r\n{\r\n\tPoint pos = PointFromQPoint(event->pos());\r\n\r\n\temit buttonPressed(event);\r\n\r\n\tif (event->button() == Qt::MiddleButton &&\r\n\t    QApplication::clipboard()->supportsSelection()) {\r\n\t\tSelectionPosition selPos = sqt->SPositionFromLocation(\r\n\t\t\t\t\tpos, false, false, sqt->UserVirtualSpace());\r\n\t\tsqt->sel.Clear();\r\n\t\tsqt->SetSelection(selPos, selPos);\r\n\t\tsqt->PasteFromMode(QClipboard::Selection);\r\n\t\treturn;\r\n\t}\r\n\r\n\tif (event->button() == Qt::LeftButton) {\r\n\t\tbool shift = QApplication::keyboardModifiers() & Qt::ShiftModifier;\r\n\t\tbool ctrl  = QApplication::keyboardModifiers() & Qt::ControlModifier;\r\n\t\tbool alt   = QApplication::keyboardModifiers() & modifierTranslated(sqt->rectangularSelectionModifier);\r\n\r\n\t\tsqt->ButtonDownWithModifiers(pos, time.elapsed(), ModifierFlags(shift, ctrl, alt));\r\n\t}\r\n\r\n\tif (event->button() == Qt::RightButton) {\r\n\t\tsqt->RightButtonDownWithModifiers(pos, time.elapsed(), ModifiersOfKeyboard());\r\n\t}\r\n}\r\n\r\nvoid ScintillaEditBase::mouseReleaseEvent(QMouseEvent *event)\r\n{\r\n\tconst QPoint point = event->pos();\r\n\tif (event->button() == Qt::LeftButton)\r\n\t\tsqt->ButtonUpWithModifiers(PointFromQPoint(point), time.elapsed(), ModifiersOfKeyboard());\r\n\r\n\tconst sptr_t pos = send(SCI_POSITIONFROMPOINT, point.x(), point.y());\r\n\tconst sptr_t line = send(SCI_LINEFROMPOSITION, pos);\r\n\tint modifiers = QApplication::keyboardModifiers();\r\n\r\n\temit textAreaClicked(line, modifiers);\r\n\temit buttonReleased(event);\r\n}\r\n\r\nvoid ScintillaEditBase::mouseDoubleClickEvent(QMouseEvent *event)\r\n{\r\n\t// Scintilla does its own double-click detection.\r\n\tmousePressEvent(event);\r\n}\r\n\r\nvoid ScintillaEditBase::mouseMoveEvent(QMouseEvent *event)\r\n{\r\n\tPoint pos = PointFromQPoint(event->pos());\r\n\r\n\tbool shift = QApplication::keyboardModifiers() & Qt::ShiftModifier;\r\n\tbool ctrl  = QApplication::keyboardModifiers() & Qt::ControlModifier;\r\n\tbool alt   = QApplication::keyboardModifiers() & modifierTranslated(sqt->rectangularSelectionModifier);\r\n\r\n\tconst KeyMod modifiers = ModifierFlags(shift, ctrl, alt);\r\n\r\n\tsqt->ButtonMoveWithModifiers(pos, time.elapsed(), modifiers);\r\n}\r\n\r\nvoid ScintillaEditBase::contextMenuEvent(QContextMenuEvent *event)\r\n{\r\n\tPoint pos = PointFromQPoint(event->globalPos());\r\n\tPoint pt = PointFromQPoint(event->pos());\r\n\tif (!sqt->PointInSelection(pt)) {\r\n\t\tsqt->SetEmptySelection(sqt->PositionFromLocation(pt));\r\n\t}\r\n\tif (sqt->ShouldDisplayPopup(pt)) {\r\n\t\tsqt->ContextMenu(pos);\r\n\t\tevent->accept();\r\n\t} else {\r\n\t\tevent->ignore();\r\n\t}\r\n}\r\n\r\nvoid ScintillaEditBase::dragEnterEvent(QDragEnterEvent *event)\r\n{\r\n\tif (event->mimeData()->hasUrls()) {\r\n\t\tevent->acceptProposedAction();\r\n\t} else if (event->mimeData()->hasText()) {\r\n\t\tevent->acceptProposedAction();\r\n\r\n#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)\r\n\t\tPoint point = PointFromQPoint(event->pos());\r\n#else\r\n\t\tPoint point = PointFromQPoint(event->position().toPoint());\r\n#endif\r\n\t\tsqt->DragEnter(point);\r\n\t} else {\r\n\t\tevent->ignore();\r\n\t}\r\n}\r\n\r\nvoid ScintillaEditBase::dragLeaveEvent(QDragLeaveEvent * /* event */)\r\n{\r\n\tsqt->DragLeave();\r\n}\r\n\r\nvoid ScintillaEditBase::dragMoveEvent(QDragMoveEvent *event)\r\n{\r\n\tif (event->mimeData()->hasUrls()) {\r\n\t\tevent->acceptProposedAction();\r\n\t} else if (event->mimeData()->hasText()) {\r\n\t\tevent->acceptProposedAction();\r\n\r\n#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)\r\n\t\tPoint point = PointFromQPoint(event->pos());\r\n#else\r\n\t\tPoint point = PointFromQPoint(event->position().toPoint());\r\n#endif\r\n\t\tsqt->DragMove(point);\r\n\t} else {\r\n\t\tevent->ignore();\r\n\t}\r\n}\r\n\r\nvoid ScintillaEditBase::dropEvent(QDropEvent *event)\r\n{\r\n\tif (event->mimeData()->hasUrls()) {\r\n\t\tevent->acceptProposedAction();\r\n\t\tsqt->DropUrls(event->mimeData());\r\n\t} else if (event->mimeData()->hasText()) {\r\n\t\tevent->acceptProposedAction();\r\n\r\n#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)\r\n\t\tPoint point = PointFromQPoint(event->pos());\r\n#else\r\n\t\tPoint point = PointFromQPoint(event->position().toPoint());\r\n#endif\r\n\t\tbool move = (event->source() == this &&\r\n                 event->proposedAction() == Qt::MoveAction);\r\n\t\tsqt->Drop(point, event->mimeData(), move);\r\n\t} else {\r\n\t\tevent->ignore();\r\n\t}\r\n}\r\n\r\nbool ScintillaEditBase::IsHangul(const QChar qchar)\r\n{\r\n\tunsigned int unicode = qchar.unicode();\r\n\t// Korean character ranges used for preedit chars.\r\n\t// http://www.programminginkorean.com/programming/hangul-in-unicode/\r\n\tconst bool HangulJamo = (0x1100 <= unicode && unicode <= 0x11FF);\r\n\tconst bool HangulCompatibleJamo = (0x3130 <= unicode && unicode <= 0x318F);\r\n\tconst bool HangulJamoExtendedA = (0xA960 <= unicode && unicode <= 0xA97F);\r\n\tconst bool HangulJamoExtendedB = (0xD7B0 <= unicode && unicode <= 0xD7FF);\r\n\tconst bool HangulSyllable = (0xAC00 <= unicode && unicode <= 0xD7A3);\r\n\treturn HangulJamo || HangulCompatibleJamo  || HangulSyllable ||\r\n\t\t\t\tHangulJamoExtendedA || HangulJamoExtendedB;\r\n}\r\n\r\nvoid ScintillaEditBase::MoveImeCarets(Scintilla::Position offset)\r\n{\r\n\t// Move carets relatively by bytes\r\n\tfor (size_t r=0; r < sqt->sel.Count(); r++) {\r\n\t\tconst Sci::Position positionInsert = sqt->sel.Range(r).Start().Position();\r\n\t\tsqt->sel.Range(r).caret.SetPosition(positionInsert + offset);\r\n\t\tsqt->sel.Range(r).anchor.SetPosition(positionInsert + offset);\r\n \t}\r\n}\r\n\r\nvoid ScintillaEditBase::DrawImeIndicator(int indicator, int len)\r\n{\r\n\t// Emulate the visual style of IME characters with indicators.\r\n\t// Draw an indicator on the character before caret by the character bytes of len\r\n\t// so it should be called after InsertCharacter().\r\n\t// It does not affect caret positions.\r\n\tif (indicator < INDICATOR_CONTAINER || indicator > INDICATOR_MAX) {\r\n\t\treturn;\r\n\t}\r\n\tsqt->pdoc->DecorationSetCurrentIndicator(indicator);\r\n\tfor (size_t r=0; r< sqt-> sel.Count(); r++) {\r\n\t\tconst Sci::Position positionInsert = sqt->sel.Range(r).Start().Position();\r\n\t\tsqt->pdoc->DecorationFillRange(positionInsert - len, 1, len);\r\n\t}\r\n}\r\n\r\nstatic int GetImeCaretPos(QInputMethodEvent *event)\r\n{\r\n\tforeach (QInputMethodEvent::Attribute attr, event->attributes()) {\r\n\t\tif (attr.type == QInputMethodEvent::Cursor)\r\n\t\t\treturn attr.start;\r\n\t}\r\n\treturn 0;\r\n}\r\n\r\nstatic std::vector<int> MapImeIndicators(QInputMethodEvent *event)\r\n{\r\n\tstd::vector<int> imeIndicator(event->preeditString().size(), IndicatorUnknown);\r\n\tforeach (QInputMethodEvent::Attribute attr, event->attributes()) {\r\n\t\tif (attr.type == QInputMethodEvent::TextFormat) {\r\n\t\t\tQTextFormat format = attr.value.value<QTextFormat>();\r\n\t\t\tQTextCharFormat charFormat = format.toCharFormat();\r\n\r\n\t\t\tint indicator = IndicatorUnknown;\r\n\t\t\tswitch (charFormat.underlineStyle()) {\r\n\t\t\t\tcase QTextCharFormat::NoUnderline: // win32, linux\r\n\t\t\t\tcase QTextCharFormat::SingleUnderline: // osx\r\n\t\t\t\tcase QTextCharFormat::DashUnderline: // win32, linux\r\n\t\t\t\t\tindicator = IndicatorInput;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase QTextCharFormat::DotLine:\r\n\t\t\t\tcase QTextCharFormat::DashDotLine:\r\n\t\t\t\tcase QTextCharFormat::WaveUnderline:\r\n\t\t\t\tcase QTextCharFormat::SpellCheckUnderline:\r\n\t\t\t\t\tindicator = IndicatorConverted;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tindicator = IndicatorUnknown;\r\n\t\t\t}\r\n\r\n\t\t\tif (format.hasProperty(QTextFormat::BackgroundBrush)) // win32, linux\r\n\t\t\t\tindicator = IndicatorTarget;\r\n\r\n#ifdef Q_OS_OSX\r\n\t\t\tif (charFormat.underlineStyle() == QTextCharFormat::SingleUnderline) {\r\n\t\t\t\tQColor uc = charFormat.underlineColor();\r\n\t\t\t\tif (uc.lightness() < 2) { // osx\r\n\t\t\t\t\tindicator = IndicatorTarget;\r\n\t\t\t\t}\r\n\t\t\t}\r\n#endif\r\n\r\n\t\t\tfor (int i = attr.start; i < attr.start+attr.length; i++) {\r\n\t\t\t\timeIndicator[i] = indicator;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn imeIndicator;\r\n}\r\n\r\nvoid ScintillaEditBase::inputMethodEvent(QInputMethodEvent *event)\r\n{\r\n\t// Copy & paste by johnsonj with a lot of helps of Neil\r\n\t// Great thanks for my forerunners, jiniya and BLUEnLIVE\r\n\r\n\tif (sqt->pdoc->IsReadOnly() || sqt->SelectionContainsProtected()) {\r\n\t\t// Here, a canceling and/or completing composition function is needed.\r\n\t\treturn;\r\n\t}\r\n\r\n\tbool initialCompose = false;\r\n\tif (sqt->pdoc->TentativeActive()) {\r\n\t\tsqt->pdoc->TentativeUndo();\r\n\t} else {\r\n\t\t// No tentative undo means start of this composition so\r\n\t\t// Fill in any virtual spaces.\r\n\t\tinitialCompose = true;\r\n\t}\r\n\r\n\tsqt->view.imeCaretBlockOverride = false;\r\n\tpreeditPos = -1; // reset not to interrupt Qt::ImCursorRectangle.\r\n\r\n\tconst int rpLength = event->replacementLength();\r\n\tif (rpLength != 0) {\r\n\t\t// Qt has called setCommitString().\r\n\t\t// Make room for the string to sit in.\r\n\t\tconst int rpStart = event->replacementStart();\r\n\t\tconst Scintilla::Position rpBase = sqt->CurrentPosition();\r\n\t\tconst Scintilla::Position start = sqt->pdoc->GetRelativePositionUTF16(rpBase, rpStart);\r\n\t\tconst Scintilla::Position end = sqt->pdoc->GetRelativePositionUTF16(start, rpLength);\r\n\t\tsqt->pdoc->DeleteChars(start, end - start);\r\n\t}\r\n\r\n\tif (!event->commitString().isEmpty()) {\r\n\t\tconst QString &commitStr = event->commitString();\r\n\t\tconst int commitStrLen = commitStr.length();\r\n\r\n\t\tfor (int i = 0; i < commitStrLen;) {\r\n\t\t\tconst int ucWidth = commitStr.at(i).isHighSurrogate() ? 2 : 1;\r\n\t\t\tconst QString oneCharUTF16 = commitStr.mid(i, ucWidth);\r\n\t\t\tconst QByteArray oneChar = sqt->BytesForDocument(oneCharUTF16);\r\n\r\n\t\t\tsqt->InsertCharacter(std::string_view(oneChar.data(), oneChar.length()), CharacterSource::DirectInput);\r\n\t\t\ti += ucWidth;\r\n\t\t}\r\n\r\n\t} else if (!event->preeditString().isEmpty()) {\r\n\t\tconst QString preeditStr = event->preeditString();\r\n\t\tconst int preeditStrLen = preeditStr.length();\r\n\t\tif (preeditStrLen == 0) {\r\n\t\t\tsqt->ShowCaretAtCurrentPosition();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (initialCompose)\r\n\t\t\tsqt->ClearBeforeTentativeStart();\r\n\t\tsqt->pdoc->TentativeStart(); // TentativeActive() from now on.\r\n\r\n\t\t// Fix candidate window position at the start of preeditString.\r\n\t\tpreeditPos = sqt->CurrentPosition();\r\n\r\n\t\tstd::vector<int> imeIndicator = MapImeIndicators(event);\r\n\r\n\t\tfor (int i = 0; i < preeditStrLen;) {\r\n\t\t\tconst int ucWidth = preeditStr.at(i).isHighSurrogate() ? 2 : 1;\r\n\t\t\tconst QString oneCharUTF16 = preeditStr.mid(i, ucWidth);\r\n\t\t\tconst QByteArray oneChar = sqt->BytesForDocument(oneCharUTF16);\r\n\t\t\tconst int oneCharLen = oneChar.length();\r\n\r\n\t\t\tsqt->InsertCharacter(std::string_view(oneChar.data(), oneCharLen), CharacterSource::TentativeInput);\r\n\r\n\t\t\tDrawImeIndicator(imeIndicator[i], oneCharLen);\r\n\t\t\ti += ucWidth;\r\n\t\t}\r\n\r\n\t\t// Move IME carets.\r\n\t\tint imeCaretPos = GetImeCaretPos(event);\r\n\t\tint imeEndToImeCaretU16 = imeCaretPos - preeditStrLen;\r\n\t\tconst Sci::Position imeCaretPosDoc = sqt->pdoc->GetRelativePositionUTF16(sqt->CurrentPosition(), imeEndToImeCaretU16);\r\n\r\n\t\tMoveImeCarets(- sqt->CurrentPosition() + imeCaretPosDoc);\r\n\r\n\t\tif (IsHangul(preeditStr.at(0))) {\r\n#ifndef Q_OS_WIN\r\n\t\t\tif (imeCaretPos > 0) {\r\n\t\t\t\tint oneCharBefore = sqt->pdoc->GetRelativePosition(sqt->CurrentPosition(), -1);\r\n\t\t\t\tMoveImeCarets(- sqt->CurrentPosition() + oneCharBefore);\r\n\t\t\t}\r\n#endif\r\n\t\t\tsqt->view.imeCaretBlockOverride = true;\r\n\t\t}\r\n\t\tsqt->EnsureCaretVisible();\r\n\t}\r\n\tsqt->ShowCaretAtCurrentPosition();\r\n}\r\n\r\nQVariant ScintillaEditBase::inputMethodQuery(Qt::InputMethodQuery query) const\r\n{\r\n\tconst Scintilla::Position pos = send(SCI_GETCURRENTPOS);\r\n\tconst Scintilla::Position line = send(SCI_LINEFROMPOSITION, pos);\r\n\r\n\tswitch (query) {\r\n#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)\r\n\t\t// Qt 5 renamed ImMicroFocus to ImCursorRectangle then deprecated\r\n\t\t// ImMicroFocus. Its the same value (2) and same description.\r\n\t\tcase Qt::ImCursorRectangle:\r\n\t\t{\r\n\t\t\tconst Scintilla::Position startPos = (preeditPos >= 0) ? preeditPos : pos;\r\n\t\t\tconst Point pt = sqt->LocationFromPosition(startPos);\r\n\t\t\tconst int width = static_cast<int>(send(SCI_GETCARETWIDTH));\r\n\t\t\tconst int height = static_cast<int>(send(SCI_TEXTHEIGHT, line));\r\n\t\t\treturn QRectF(pt.x, pt.y, width, height).toRect();\r\n\t\t}\r\n#else\r\n\t\tcase Qt::ImMicroFocus:\r\n\t\t{\r\n\t\t\tconst Scintilla::Position startPos = (preeditPos >= 0) ? preeditPos : pos;\r\n\t\t\tconst Point pt = sqt->LocationFromPosition(startPos);\r\n\t\t\tconst int width = static_cast<int>(send(SCI_GETCARETWIDTH));\r\n\t\t\tconst int height = static_cast<int>(send(SCI_TEXTHEIGHT, line));\r\n\t\t\treturn QRect(pt.x, pt.y, width, height);\r\n\t\t}\r\n#endif\r\n\r\n\t\tcase Qt::ImFont:\r\n\t\t{\r\n\t\t\tchar fontName[64];\r\n\t\t\tconst sptr_t style = send(SCI_GETSTYLEAT, pos);\r\n\t\t\tconst int len = static_cast<int>(sends(SCI_STYLEGETFONT, style, fontName));\r\n\t\t\tconst int size = static_cast<int>(send(SCI_STYLEGETSIZE, style));\r\n\t\t\tconst bool italic = send(SCI_STYLEGETITALIC, style);\r\n\t\t\tconst int weight = send(SCI_STYLEGETBOLD, style) ? QFont::Bold : -1;\r\n\t\t\treturn QFont(QString::fromUtf8(fontName, len), size, weight, italic);\r\n\t\t}\r\n\r\n\t\tcase Qt::ImCursorPosition:\r\n\t\t{\r\n\t\t\tconst Scintilla::Position paraStart = sqt->pdoc->ParaUp(pos);\r\n\t\t\treturn static_cast<int>(sqt->pdoc->CountUTF16(paraStart, pos));\r\n\t\t}\r\n\r\n\t\tcase Qt::ImSurroundingText:\r\n\t\t{\r\n\t\t\tconst Scintilla::Position paraStart = sqt->pdoc->ParaUp(pos);\r\n\t\t\tconst Scintilla::Position paraEnd = sqt->pdoc->ParaDown(pos);\r\n\t\t\tconst std::string buffer = sqt->RangeText(paraStart, paraEnd);\r\n\t\t\treturn sqt->StringFromDocument(buffer.c_str());\r\n\t\t}\r\n\r\n\t\tcase Qt::ImCurrentSelection:\r\n\t\t{\r\n\t\t\tQVarLengthArray<char,1024> buffer(send(SCI_GETSELTEXT)+1);\r\n\t\t\tsends(SCI_GETSELTEXT, 0, buffer.data());\r\n\r\n\t\t\treturn sqt->StringFromDocument(buffer.constData());\r\n\t\t}\r\n\r\n\t\tdefault:\r\n\t\t\treturn QVariant();\r\n\t}\r\n}\r\n\r\nvoid ScintillaEditBase::notifyParent(NotificationData scn)\r\n{\r\n\temit notify(&scn);\r\n\tswitch (scn.nmhdr.code) {\r\n\t\tcase Notification::StyleNeeded:\r\n\t\t\temit styleNeeded(scn.position);\r\n\t\t\tbreak;\r\n\r\n\t\tcase Notification::CharAdded:\r\n\t\t\temit charAdded(scn.ch);\r\n\t\t\tbreak;\r\n\r\n\t\tcase Notification::SavePointReached:\r\n\t\t\temit savePointChanged(false);\r\n\t\t\tbreak;\r\n\r\n\t\tcase Notification::SavePointLeft:\r\n\t\t\temit savePointChanged(true);\r\n\t\t\tbreak;\r\n\r\n\t\tcase Notification::ModifyAttemptRO:\r\n\t\t\temit modifyAttemptReadOnly();\r\n\t\t\tbreak;\r\n\r\n\t\tcase Notification::Key:\r\n\t\t\temit key(scn.ch);\r\n\t\t\tbreak;\r\n\r\n\t\tcase Notification::DoubleClick:\r\n\t\t\temit doubleClick(scn.position, scn.line);\r\n\t\t\tbreak;\r\n\r\n\t\tcase Notification::UpdateUI:\r\n\t\t\tif (FlagSet(scn.updated, Update::Selection)) {\r\n\t\t\t\tupdateMicroFocus();\r\n\t\t\t\temit selectionChanged(send(SCI_GETSELTEXT, 0, 0) > 1); //CodeQuery\r\n\t\t\t}\r\n\t\t\temit updateUi(scn.updated);\r\n\t\t\tbreak;\r\n\r\n\t\tcase Notification::Modified:\r\n\t\t{\r\n\t\t\tconst bool added = FlagSet(scn.modificationType, ModificationFlags::InsertText);\r\n\t\t\tconst bool deleted = FlagSet(scn.modificationType, ModificationFlags::DeleteText);\r\n\r\n\t\t\tconst Scintilla::Position length = send(SCI_GETTEXTLENGTH);\r\n\t\t\tbool firstLineAdded = (added && length == 1) ||\r\n\t\t\t                      (deleted && length == 0);\r\n\r\n\t\t\tif (scn.linesAdded != 0) {\r\n\t\t\t\temit linesAdded(scn.linesAdded);\r\n\t\t\t} else if (firstLineAdded) {\r\n\t\t\t\temit linesAdded(added ? 1 : -1);\r\n\t\t\t}\r\n\r\n\t\t\tconst QByteArray bytes = QByteArray::fromRawData(scn.text, scn.text ? scn.length : 0);\r\n\t\t\temit modified(scn.modificationType, scn.position, scn.length,\r\n\t\t\t              scn.linesAdded, bytes, scn.line,\r\n\t\t\t              scn.foldLevelNow, scn.foldLevelPrev);\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tcase Notification::MacroRecord:\r\n\t\t\temit macroRecord(scn.message, scn.wParam, scn.lParam);\r\n\t\t\tbreak;\r\n\r\n\t\tcase Notification::MarginClick:\r\n\t\t\temit marginClicked(scn.position, scn.modifiers, scn.margin);\r\n\t\t\tbreak;\r\n\r\n\t\tcase Notification::NeedShown:\r\n\t\t\temit needShown(scn.position, scn.length);\r\n\t\t\tbreak;\r\n\r\n\t\tcase Notification::Painted:\r\n\t\t\temit painted();\r\n\t\t\tbreak;\r\n\r\n\t\tcase Notification::UserListSelection:\r\n\t\t\temit userListSelection();\r\n\t\t\tbreak;\r\n\r\n\t\tcase Notification::URIDropped:\r\n\t\t\temit uriDropped(QString::fromUtf8(scn.text));\r\n\t\t\tbreak;\r\n\r\n\t\tcase Notification::DwellStart:\r\n\t\t\temit dwellStart(scn.x, scn.y);\r\n\t\t\tbreak;\r\n\r\n\t\tcase Notification::DwellEnd:\r\n\t\t\temit dwellEnd(scn.x, scn.y);\r\n\t\t\tbreak;\r\n\r\n\t\tcase Notification::Zoom:\r\n\t\t\temit zoom(send(SCI_GETZOOM));\r\n\t\t\tbreak;\r\n\r\n\t\tcase Notification::HotSpotClick:\r\n\t\t\temit hotSpotClick(scn.position, scn.modifiers);\r\n\t\t\tbreak;\r\n\r\n\t\tcase Notification::HotSpotDoubleClick:\r\n\t\t\temit hotSpotDoubleClick(scn.position, scn.modifiers);\r\n\t\t\tbreak;\r\n\r\n\t\tcase Notification::CallTipClick:\r\n\t\t\temit callTipClick();\r\n\t\t\tbreak;\r\n\r\n\t\tcase Notification::AutoCSelection:\r\n\t\t\temit autoCompleteSelection(scn.lParam, QString::fromUtf8(scn.text));\r\n\t\t\tbreak;\r\n\r\n\t\tcase Notification::AutoCCancelled:\r\n\t\t\temit autoCompleteCancelled();\r\n\t\t\tbreak;\r\n\r\n\t\tcase Notification::FocusIn:\r\n\t\t\temit focusChanged(true);\r\n\t\t\tbreak;\r\n\r\n\t\tcase Notification::FocusOut:\r\n\t\t\temit focusChanged(false);\r\n\t\t\tbreak;\r\n\r\n\t\tdefault:\r\n\t\t\treturn;\r\n\t}\r\n}\r\n\r\nvoid ScintillaEditBase::event_command(uptr_t wParam, sptr_t lParam)\r\n{\r\n\temit command(wParam, lParam);\r\n}\r\n\r\nKeyMod ScintillaEditBase::ModifiersOfKeyboard()\r\n{\r\n\tconst bool shift = QApplication::keyboardModifiers() & Qt::ShiftModifier;\r\n\tconst bool ctrl  = QApplication::keyboardModifiers() & Qt::ControlModifier;\r\n\tconst bool alt   = QApplication::keyboardModifiers() & Qt::AltModifier;\r\n\r\n\treturn ModifierFlags(shift, ctrl, alt);\r\n}\r\n"
  },
  {
    "path": "scintilla/qt/ScintillaEditBase/ScintillaEditBase.h",
    "content": "//\r\n//          Copyright (c) 1990-2011, Scientific Toolworks, Inc.\r\n//\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n//\r\n// Author: Jason Haslam\r\n//\r\n// Additions Copyright (c) 2011 Archaeopteryx Software, Inc. d/b/a Wingware\r\n// @file ScintillaEditBase.h - Qt widget that wraps ScintillaQt and provides events and scrolling\r\n\r\n\r\n#ifndef SCINTILLAEDITBASE_H\r\n#define SCINTILLAEDITBASE_H\r\n\r\n#include <cstddef>\r\n\r\n#include <string_view>\r\n#include <vector>\r\n#include <optional>\r\n#include <memory>\r\n\r\n#include \"Debugging.h\"\r\n#include \"Geometry.h\"\r\n#include \"ScintillaTypes.h\"\r\n#include \"ScintillaMessages.h\"\r\n#include \"ScintillaStructures.h\"\r\n#include \"Platform.h\"\r\n#include \"Scintilla.h\"\r\n\r\n#include <QAbstractScrollArea>\r\n#include <QMimeData>\r\n#include <QElapsedTimer>\r\n\r\nnamespace Scintilla::Internal {\r\n\r\nclass ScintillaQt;\r\nclass SurfaceImpl;\r\n\r\n}\r\n\r\n#ifndef EXPORT_IMPORT_API\r\n#ifdef WIN32\r\n#ifdef MAKING_LIBRARY\r\n#define EXPORT_IMPORT_API __declspec(dllexport)\r\n#else\r\n// Defining dllimport upsets moc\r\n//#define EXPORT_IMPORT_API __declspec(dllimport)\r\n#define EXPORT_IMPORT_API\r\n#endif\r\n#else\r\n#define EXPORT_IMPORT_API\r\n#endif\r\n#endif\r\n\r\nclass EXPORT_IMPORT_API ScintillaEditBase : public QAbstractScrollArea {\r\n\tQ_OBJECT\r\n\r\npublic:\r\n\texplicit ScintillaEditBase(QWidget *parent = 0);\r\n\tvirtual ~ScintillaEditBase();\r\n\r\n\tvirtual sptr_t send(\r\n\t\tunsigned int iMessage,\r\n\t\tuptr_t wParam = 0,\r\n\t\tsptr_t lParam = 0) const;\r\n\r\n\tvirtual sptr_t sends(\r\n\t\tunsigned int iMessage,\r\n\t\tuptr_t wParam = 0,\r\n\t\tconst char *s = 0) const;\r\n\r\npublic slots:\r\n\t// Scroll events coming from GUI to be sent to Scintilla.\r\n\tvoid scrollHorizontal(int value);\r\n\tvoid scrollVertical(int value);\r\n\r\n\t// Emit Scintilla notifications as signals.\r\n\tvoid notifyParent(Scintilla::NotificationData scn);\r\n\tvoid event_command(Scintilla::uptr_t wParam, Scintilla::sptr_t lParam);\r\n\r\nsignals:\r\n\tvoid horizontalScrolled(int value);\r\n\tvoid verticalScrolled(int value);\r\n\tvoid horizontalRangeChanged(int max, int page);\r\n\tvoid verticalRangeChanged(int max, int page);\r\n\tvoid notifyChange();\r\n\tvoid linesAdded(Scintilla::Position linesAdded);\r\n\r\n\t// Clients can use this hook to add additional\r\n\t// formats (e.g. rich text) to the MIME data.\r\n\tvoid aboutToCopy(QMimeData *data);\r\n\r\n\t// Scintilla Notifications\r\n\tvoid styleNeeded(Scintilla::Position position);\r\n\tvoid charAdded(int ch);\r\n\tvoid savePointChanged(bool dirty);\r\n\tvoid modifyAttemptReadOnly();\r\n\tvoid key(int key);\r\n\tvoid doubleClick(Scintilla::Position position, Scintilla::Position line);\r\n\tvoid updateUi(Scintilla::Update updated);\r\n\tvoid selectionChanged(bool copyavail); // CodeQuery\r\n\tvoid modified(Scintilla::ModificationFlags type, Scintilla::Position position, Scintilla::Position length, Scintilla::Position linesAdded,\r\n\t\t      const QByteArray &text, Scintilla::Position line, Scintilla::FoldLevel foldNow, Scintilla::FoldLevel foldPrev);\r\n\tvoid macroRecord(Scintilla::Message message, Scintilla::uptr_t wParam, Scintilla::sptr_t lParam);\r\n\tvoid marginClicked(Scintilla::Position position, Scintilla::KeyMod modifiers, int margin);\r\n\tvoid textAreaClicked(Scintilla::Position line, int modifiers);\r\n\tvoid needShown(Scintilla::Position position, Scintilla::Position length);\r\n\tvoid painted();\r\n\tvoid userListSelection(); // Wants some args.\r\n\tvoid uriDropped(const QString &uri);\r\n\tvoid dwellStart(int x, int y);\r\n\tvoid dwellEnd(int x, int y);\r\n\tvoid zoom(int zoom);\r\n\tvoid hotSpotClick(Scintilla::Position position, Scintilla::KeyMod modifiers);\r\n\tvoid hotSpotDoubleClick(Scintilla::Position position, Scintilla::KeyMod modifiers);\r\n\tvoid callTipClick();\r\n\tvoid autoCompleteSelection(Scintilla::Position position, const QString &text);\r\n\tvoid autoCompleteCancelled();\r\n\tvoid focusChanged(bool focused);\r\n\r\n\t// Base notifications for compatibility with other Scintilla implementations\r\n\tvoid notify(Scintilla::NotificationData *pscn);\r\n\tvoid command(Scintilla::uptr_t wParam, Scintilla::sptr_t lParam);\r\n\r\n\t// GUI event notifications needed under Qt\r\n\tvoid buttonPressed(QMouseEvent *event);\r\n\tvoid buttonReleased(QMouseEvent *event);\r\n\tvoid keyPressed(QKeyEvent *event);\r\n\tvoid resized();\r\n\r\nprotected:\r\n\tbool event(QEvent *event) override;\r\n\tvoid paintEvent(QPaintEvent *event) override;\r\n\tvoid wheelEvent(QWheelEvent *event) override;\r\n\tvoid focusInEvent(QFocusEvent *event) override;\r\n\tvoid focusOutEvent(QFocusEvent *event) override;\r\n\tvoid resizeEvent(QResizeEvent *event) override;\r\n\tvoid keyPressEvent(QKeyEvent *event) override;\r\n\tvoid mousePressEvent(QMouseEvent *event) override;\r\n\tvoid mouseReleaseEvent(QMouseEvent *event) override;\r\n\tvoid mouseDoubleClickEvent(QMouseEvent *event) override;\r\n\tvoid mouseMoveEvent(QMouseEvent *event) override;\r\n\tvoid contextMenuEvent(QContextMenuEvent *event) override;\r\n\tvoid dragEnterEvent(QDragEnterEvent *event) override;\r\n\tvoid dragLeaveEvent(QDragLeaveEvent *event) override;\r\n\tvoid dragMoveEvent(QDragMoveEvent *event) override;\r\n\tvoid dropEvent(QDropEvent *event) override;\r\n\tvoid inputMethodEvent(QInputMethodEvent *event) override;\r\n\tQVariant inputMethodQuery(Qt::InputMethodQuery query) const override;\r\n\tvoid scrollContentsBy(int, int) override {}\r\n\r\nprivate:\r\n\tScintilla::Internal::ScintillaQt *sqt;\r\n\r\n\tQElapsedTimer time;\r\n\r\n\tScintilla::Position preeditPos;\r\n\tQString preeditString;\r\n\r\n\tint wheelDelta;\r\n\r\n\tstatic bool IsHangul(const QChar qchar);\r\n\tvoid MoveImeCarets(Scintilla::Position offset);\r\n\tvoid DrawImeIndicator(int indicator, int len);\r\n\tstatic Scintilla::KeyMod ModifiersOfKeyboard();\r\n};\r\n\r\n#endif /* SCINTILLAEDITBASE_H */\r\n"
  },
  {
    "path": "scintilla/qt/ScintillaEditBase/ScintillaEditBase.pro",
    "content": "#-------------------------------------------------\r\n#\r\n# Project created by QtCreator 2011-05-05T12:41:23\r\n#\r\n#-------------------------------------------------\r\n\r\nQT       += core gui\r\ngreaterThan(QT_MAJOR_VERSION, 4): QT += widgets\r\nequals(QT_MAJOR_VERSION, 6): QT += core5compat\r\n\r\nTARGET = ScintillaEditBase\r\nTEMPLATE = lib\r\nCONFIG += lib_bundle\r\nCONFIG += c++1z\r\n\r\nVERSION = 5.5.0\r\n\r\nSOURCES += \\\r\n    PlatQt.cpp \\\r\n    ScintillaQt.cpp \\\r\n    ScintillaEditBase.cpp \\\r\n    ../../src/XPM.cxx \\\r\n    ../../src/ViewStyle.cxx \\\r\n    ../../src/UniqueString.cxx \\\r\n    ../../src/UniConversion.cxx \\\r\n    ../../src/UndoHistory.cxx \\\r\n    ../../src/Style.cxx \\\r\n    ../../src/Selection.cxx \\\r\n    ../../src/ScintillaBase.cxx \\\r\n    ../../src/RunStyles.cxx \\\r\n    ../../src/RESearch.cxx \\\r\n    ../../src/PositionCache.cxx \\\r\n    ../../src/PerLine.cxx \\\r\n    ../../src/MarginView.cxx \\\r\n    ../../src/LineMarker.cxx \\\r\n    ../../src/KeyMap.cxx \\\r\n    ../../src/Indicator.cxx \\\r\n    ../../src/Geometry.cxx \\\r\n    ../../src/EditView.cxx \\\r\n    ../../src/Editor.cxx \\\r\n    ../../src/EditModel.cxx \\\r\n    ../../src/Document.cxx \\\r\n    ../../src/Decoration.cxx \\\r\n    ../../src/DBCS.cxx \\\r\n    ../../src/ContractionState.cxx \\\r\n    ../../src/CharClassify.cxx \\\r\n    ../../src/CharacterType.cxx \\\r\n    ../../src/CharacterCategoryMap.cxx \\\r\n    ../../src/ChangeHistory.cxx \\\r\n    ../../src/CellBuffer.cxx \\\r\n    ../../src/CaseFolder.cxx \\\r\n    ../../src/CaseConvert.cxx \\\r\n    ../../src/CallTip.cxx \\\r\n    ../../src/AutoComplete.cxx\r\n\r\nHEADERS  += \\\r\n    PlatQt.h \\\r\n    ScintillaQt.h \\\r\n    ScintillaEditBase.h \\\r\n    ../../src/XPM.h \\\r\n    ../../src/ViewStyle.h \\\r\n    ../../src/UndoHistory.h \\\r\n    ../../src/UniConversion.h \\\r\n    ../../src/Style.h \\\r\n    ../../src/SplitVector.h \\\r\n    ../../src/Selection.h \\\r\n    ../../src/ScintillaBase.h \\\r\n    ../../src/RunStyles.h \\\r\n    ../../src/RESearch.h \\\r\n    ../../src/PositionCache.h \\\r\n    ../../src/Platform.h \\\r\n    ../../src/PerLine.h \\\r\n    ../../src/Partitioning.h \\\r\n    ../../src/LineMarker.h \\\r\n    ../../src/KeyMap.h \\\r\n    ../../src/Indicator.h \\\r\n    ../../src/Geometry.h \\\r\n    ../../src/Editor.h \\\r\n    ../../src/Document.h \\\r\n    ../../src/Decoration.h \\\r\n    ../../src/ContractionState.h \\\r\n    ../../src/CharClassify.h \\\r\n    ../../src/CharacterType.h \\\r\n    ../../src/CharacterCategoryMap.h \\\r\n    ../../src/ChangeHistory.h \\\r\n    ../../src/CellBuffer.h \\\r\n    ../../src/CaseFolder.h \\\r\n    ../../src/CaseConvert.h \\\r\n    ../../src/CallTip.h \\\r\n    ../../src/AutoComplete.h \\\r\n    ../../include/Scintilla.h \\\r\n    ../../include/ILexer.h\r\n\r\nOTHER_FILES +=\r\n\r\nINCLUDEPATH += ../../include ../../src\r\n\r\nDEFINES += SCINTILLA_QT=1 MAKING_LIBRARY=1\r\nCONFIG(release, debug|release) {\r\n    DEFINES += NDEBUG=1\r\n}\r\n\r\nDESTDIR = ../../bin\r\n\r\nmacx {\r\n\tQMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../Frameworks/\r\n}\r\n"
  },
  {
    "path": "scintilla/qt/ScintillaEditBase/ScintillaQt.cpp",
    "content": "//\r\n//          Copyright (c) 1990-2011, Scientific Toolworks, Inc.\r\n//\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n//\r\n// Author: Jason Haslam\r\n//\r\n// Additions Copyright (c) 2011 Archaeopteryx Software, Inc. d/b/a Wingware\r\n// @file ScintillaQt.cpp - Qt specific subclass of ScintillaBase\r\n\r\n#include <cstdint>\r\n#include \"ScintillaQt.h\"\r\n#include \"PlatQt.h\"\r\n\r\n#include <QApplication>\r\n#include <QDrag>\r\n#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)\r\n#include <QInputContext>\r\n#endif\r\n#include <QMimeData>\r\n#include <QMenu>\r\n#include <QTextCodec>\r\n#include <QScrollBar>\r\n#include <QTimer>\r\n\r\nusing namespace Scintilla;\r\nusing namespace Scintilla::Internal;\r\n\r\nScintillaQt::ScintillaQt(QAbstractScrollArea *parent)\r\n: QObject(parent), scrollArea(parent), vMax(0),  hMax(0), vPage(0), hPage(0),\r\n haveMouseCapture(false), dragWasDropped(false),\r\n rectangularSelectionModifier(SCMOD_ALT)\r\n{\r\n\r\n\twMain = scrollArea->viewport();\r\n\r\n\timeInteraction = IMEInteraction::Inline;\r\n\r\n\t// On macOS drawing text into a pixmap moves it around 1 pixel to\r\n\t// the right compared to drawing it directly onto a window.\r\n\t// Buffered drawing turned off by default to avoid this.\r\n\tview.bufferedDraw = false;\r\n\r\n\tInit();\r\n\r\n\tstd::fill(timers, std::end(timers), 0);\r\n}\r\n\r\nScintillaQt::~ScintillaQt()\r\n{\r\n\tCancelTimers();\r\n\tChangeIdle(false);\r\n}\r\n\r\nvoid ScintillaQt::execCommand(QAction *action)\r\n{\r\n\tconst int commandNum = action->data().toInt();\r\n\tCommand(commandNum);\r\n}\r\n\r\n#if defined(Q_OS_WIN)\r\nstatic const QString sMSDEVColumnSelect(\"MSDEVColumnSelect\");\r\nstatic const QString sWrappedMSDEVColumnSelect(\"application/x-qt-windows-mime;value=\\\"MSDEVColumnSelect\\\"\");\r\nstatic const QString sVSEditorLineCutCopy(\"VisualStudioEditorOperationsLineCutCopyClipboardTag\");\r\nstatic const QString sWrappedVSEditorLineCutCopy(\"application/x-qt-windows-mime;value=\\\"VisualStudioEditorOperationsLineCutCopyClipboardTag\\\"\");\r\n#elif defined(Q_OS_MAC)\r\nstatic const QString sScintillaRecPboardType(\"com.scintilla.utf16-plain-text.rectangular\");\r\nstatic const QString sScintillaRecMimeType(\"text/x-scintilla.utf16-plain-text.rectangular\");\r\n#else\r\n// Linux\r\nstatic const QString sMimeRectangularMarker(\"text/x-rectangular-marker\");\r\n#endif\r\n\r\n#if defined(Q_OS_MAC) && QT_VERSION < QT_VERSION_CHECK(5, 0, 0)\r\n\r\nclass ScintillaRectangularMime : public QMacPasteboardMime {\r\npublic:\r\n\tScintillaRectangularMime() : QMacPasteboardMime(MIME_ALL) {\r\n\t}\r\n\r\n\tQString convertorName() {\r\n\t\treturn QString(\"ScintillaRectangularMime\");\r\n\t}\r\n\r\n\tbool canConvert(const QString &mime, QString flav) {\r\n\t\treturn mimeFor(flav) == mime;\r\n\t}\r\n\r\n\tQString mimeFor(QString flav) {\r\n\t\tif (flav == sScintillaRecPboardType)\r\n\t\t\treturn sScintillaRecMimeType;\r\n\t\treturn QString();\r\n\t}\r\n\r\n\tQString flavorFor(const QString &mime) {\r\n\t\tif (mime == sScintillaRecMimeType)\r\n\t\t\treturn sScintillaRecPboardType;\r\n\t\treturn QString();\r\n\t}\r\n\r\n\tQVariant convertToMime(const QString & /* mime */, QList<QByteArray> data, QString /* flav */) {\r\n\t\tQByteArray all;\r\n\t\tforeach (QByteArray i, data) {\r\n\t\t\tall += i;\r\n\t\t}\r\n\t\treturn QVariant(all);\r\n\t}\r\n\r\n\tQList<QByteArray> convertFromMime(const QString & /* mime */, QVariant data, QString /* flav */) {\r\n\t\tQByteArray a = data.toByteArray();\r\n\t\tQList<QByteArray> l;\r\n\t\tl.append(a);\r\n\t\treturn l;\r\n\t}\r\n\r\n};\r\n\r\n// The Mime object registers itself but only want one for all Scintilla instances.\r\n// Should delete at exit to help memory leak detection but that would be extra work\r\n// and, since the clipboard exists after last Scintilla instance, may be complex.\r\nstatic ScintillaRectangularMime *singletonMime = 0;\r\n\r\n#endif\r\n\r\nvoid ScintillaQt::Init()\r\n{\r\n\trectangularSelectionModifier = SCMOD_ALT;\r\n\r\n#if defined(Q_OS_MAC) && QT_VERSION < QT_VERSION_CHECK(5, 0, 0)\r\n\tif (!singletonMime) {\r\n\t\tsingletonMime = new ScintillaRectangularMime();\r\n\r\n\t\tQStringList slTypes(sScintillaRecPboardType);\r\n\t\tqRegisterDraggedTypes(slTypes);\r\n\t}\r\n#endif\r\n\r\n\tconnect(QApplication::clipboard(), SIGNAL(selectionChanged()),\r\n\t\tthis, SLOT(SelectionChanged()));\r\n}\r\n\r\nvoid ScintillaQt::Finalise()\r\n{\r\n\tCancelTimers();\r\n\tScintillaBase::Finalise();\r\n}\r\n\r\nvoid ScintillaQt::SelectionChanged()\r\n{\r\n\tbool nowPrimary = QApplication::clipboard()->ownsSelection();\r\n\tif (nowPrimary != primarySelection) {\r\n\t\tprimarySelection = nowPrimary;\r\n\t\tRedraw();\r\n\t}\r\n}\r\n\r\nbool ScintillaQt::DragThreshold(Point ptStart, Point ptNow)\r\n{\r\n\tint xMove = std::abs(ptStart.x - ptNow.x);\r\n\tint yMove = std::abs(ptStart.y - ptNow.y);\r\n\treturn (xMove > QApplication::startDragDistance()) ||\r\n\t\t(yMove > QApplication::startDragDistance());\r\n}\r\n\r\nstatic QString StringFromSelectedText(const SelectionText &selectedText)\r\n{\r\n\tif (selectedText.codePage == SC_CP_UTF8) {\r\n\t\treturn QString::fromUtf8(selectedText.Data(), static_cast<int>(selectedText.Length()));\r\n\t} else {\r\n\t\tQTextCodec *codec = QTextCodec::codecForName(\r\n\t\t\t\tCharacterSetID(selectedText.characterSet));\r\n\t\treturn codec->toUnicode(selectedText.Data(), static_cast<int>(selectedText.Length()));\r\n\t}\r\n}\r\n\r\nstatic void AddRectangularToMime(QMimeData *mimeData, [[maybe_unused]] const QString &su)\r\n{\r\n#if defined(Q_OS_WIN)\r\n\t// Add an empty marker\r\n\tmimeData->setData(sMSDEVColumnSelect, QByteArray());\r\n#elif defined(Q_OS_MAC)\r\n\t// macOS gets marker + data to work with other implementations.\r\n\t// Don't understand how this works but it does - the\r\n\t// clipboard format is supposed to be UTF-16, not UTF-8.\r\n\tmimeData->setData(sScintillaRecMimeType, su.toUtf8());\r\n#else\r\n\t// Linux\r\n\t// Add an empty marker\r\n\tmimeData->setData(sMimeRectangularMarker, QByteArray());\r\n#endif\r\n}\r\n\r\nstatic void AddLineCutCopyToMime([[maybe_unused]] QMimeData *mimeData)\r\n{\r\n#if defined(Q_OS_WIN)\r\n\t// Add an empty marker\r\n\tmimeData->setData(sVSEditorLineCutCopy, QByteArray());\r\n#endif\r\n}\r\n\r\nstatic bool IsRectangularInMime(const QMimeData *mimeData)\r\n{\r\n\tQStringList formats = mimeData->formats();\r\n\tfor (int i = 0; i < formats.size(); ++i) {\r\n#if defined(Q_OS_WIN)\r\n\t\t// Windows rectangular markers\r\n\t\t// If rectangular copies made by this application, see base name.\r\n\t\tif (formats[i] == sMSDEVColumnSelect)\r\n\t\t\treturn true;\r\n\t\t// Otherwise see wrapped name.\r\n\t\tif (formats[i] == sWrappedMSDEVColumnSelect)\r\n\t\t\treturn true;\r\n#elif defined(Q_OS_MAC)\r\n\t\tif (formats[i] == sScintillaRecMimeType)\r\n\t\t\treturn true;\r\n#else\r\n\t\t// Linux\r\n\t\tif (formats[i] == sMimeRectangularMarker)\r\n\t\t\treturn true;\r\n#endif\r\n\t}\r\n\treturn false;\r\n}\r\n\r\nstatic bool IsLineCutCopyInMime(const QMimeData *mimeData)\r\n{\r\n\tQStringList formats = mimeData->formats();\r\n\tfor (int i = 0; i < formats.size(); ++i) {\r\n#if defined(Q_OS_WIN)\r\n\t\t// Visual Studio Line Cut/Copy markers\r\n\t\t// If line cut/copy made by this application, see base name.\r\n\t\tif (formats[i] == sVSEditorLineCutCopy)\r\n\t\t\treturn true;\r\n\t\t// Otherwise see wrapped name.\r\n\t\tif (formats[i] == sWrappedVSEditorLineCutCopy)\r\n\t\t\treturn true;\r\n#endif\r\n\t}\r\n\treturn false;\r\n}\r\n\r\nbool ScintillaQt::ValidCodePage(int codePage) const\r\n{\r\n\treturn codePage == 0\r\n\t|| codePage == SC_CP_UTF8\r\n\t|| codePage == 932\r\n\t|| codePage == 936\r\n\t|| codePage == 949\r\n\t|| codePage == 950\r\n\t|| codePage == 1361;\r\n}\r\n\r\nstd::string ScintillaQt::UTF8FromEncoded(std::string_view encoded) const {\r\n\tif (IsUnicodeMode()) {\r\n\t\treturn std::string(encoded);\r\n\t} else {\r\n\t\tQTextCodec *codec = QTextCodec::codecForName(\r\n\t\t\t\tCharacterSetID(CharacterSetOfDocument()));\r\n\t\tQString text = codec->toUnicode(encoded.data(), static_cast<int>(encoded.length()));\r\n\t\treturn text.toStdString();\r\n\t}\r\n}\r\n\r\nstd::string ScintillaQt::EncodedFromUTF8(std::string_view utf8) const {\r\n\tif (IsUnicodeMode()) {\r\n\t\treturn std::string(utf8);\r\n\t} else {\r\n\t\tQString text = QString::fromUtf8(utf8.data(), static_cast<int>(utf8.length()));\r\n\t\tQTextCodec *codec = QTextCodec::codecForName(\r\n\t\t\t\tCharacterSetID(CharacterSetOfDocument()));\r\n\t\tQByteArray ba = codec->fromUnicode(text);\r\n\t\treturn std::string(ba.data(), ba.length());\r\n\t}\r\n}\r\n\r\nvoid ScintillaQt::ScrollText(Sci::Line linesToMove)\r\n{\r\n\tint dy = vs.lineHeight * (linesToMove);\r\n\tscrollArea->viewport()->scroll(0, dy);\r\n}\r\n\r\nvoid ScintillaQt::SetVerticalScrollPos()\r\n{\r\n\tscrollArea->verticalScrollBar()->setValue(topLine);\r\n\temit verticalScrolled(topLine);\r\n}\r\n\r\nvoid ScintillaQt::SetHorizontalScrollPos()\r\n{\r\n\tscrollArea->horizontalScrollBar()->setValue(xOffset);\r\n\temit horizontalScrolled(xOffset);\r\n}\r\n\r\nbool ScintillaQt::ModifyScrollBars(Sci::Line nMax, Sci::Line nPage)\r\n{\r\n\tbool modified = false;\r\n\r\n\tint vNewPage = nPage;\r\n\tint vNewMax = nMax - vNewPage + 1;\r\n\tif (vMax != vNewMax || vPage != vNewPage) {\r\n\t\tvMax = vNewMax;\r\n\t\tvPage = vNewPage;\r\n\t\tmodified = true;\r\n\r\n\t\tscrollArea->verticalScrollBar()->setMaximum(vMax);\r\n\t\tscrollArea->verticalScrollBar()->setPageStep(vPage);\r\n\t\temit verticalRangeChanged(vMax, vPage);\r\n\t}\r\n\r\n\tint hNewPage = GetTextRectangle().Width();\r\n\tint hNewMax = (scrollWidth > hNewPage) ? scrollWidth - hNewPage : 0;\r\n\tint charWidth = vs.styles[STYLE_DEFAULT].aveCharWidth;\r\n\tif (hMax != hNewMax || hPage != hNewPage ||\r\n\t    scrollArea->horizontalScrollBar()->singleStep() != charWidth) {\r\n\t\thMax = hNewMax;\r\n\t\thPage = hNewPage;\r\n\t\tmodified = true;\r\n\r\n\t\tscrollArea->horizontalScrollBar()->setMaximum(hMax);\r\n\t\tscrollArea->horizontalScrollBar()->setPageStep(hPage);\r\n\t\tscrollArea->horizontalScrollBar()->setSingleStep(charWidth);\r\n\t\temit horizontalRangeChanged(hMax, hPage);\r\n\t}\r\n\r\n\treturn modified;\r\n}\r\n\r\nvoid ScintillaQt::ReconfigureScrollBars()\r\n{\r\n\tif (verticalScrollBarVisible) {\r\n\t\tscrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);\r\n\t} else {\r\n\t\tscrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);\r\n\t}\r\n\r\n\tif (horizontalScrollBarVisible && !Wrapping()) {\r\n\t\tscrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);\r\n\t} else {\r\n\t\tscrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);\r\n\t}\r\n}\r\n\r\nvoid ScintillaQt::CopyToModeClipboard(const SelectionText &selectedText, QClipboard::Mode clipboardMode_)\r\n{\r\n\tQClipboard *clipboard = QApplication::clipboard();\r\n\tQString su = StringFromSelectedText(selectedText);\r\n\tQMimeData *mimeData = new QMimeData();\r\n\tmimeData->setText(su);\r\n\tif (selectedText.rectangular) {\r\n\t\tAddRectangularToMime(mimeData, su);\r\n\t}\r\n\r\n\tif (selectedText.lineCopy) {\r\n\t\tAddLineCutCopyToMime(mimeData);\r\n\t}\r\n\r\n\t// Allow client code to add additional data (e.g rich text).\r\n\temit aboutToCopy(mimeData);\r\n\r\n\tclipboard->setMimeData(mimeData, clipboardMode_);\r\n}\r\n\r\nvoid ScintillaQt::Copy()\r\n{\r\n\tif (!sel.Empty()) {\r\n\t\tSelectionText st;\r\n\t\tCopySelectionRange(&st);\r\n\t\tCopyToClipboard(st);\r\n\t}\r\n}\r\n\r\nvoid ScintillaQt::CopyToClipboard(const SelectionText &selectedText)\r\n{\r\n\tCopyToModeClipboard(selectedText, QClipboard::Clipboard);\r\n}\r\n\r\nvoid ScintillaQt::PasteFromMode(QClipboard::Mode clipboardMode_)\r\n{\r\n\tQClipboard *clipboard = QApplication::clipboard();\r\n\tconst QMimeData *mimeData = clipboard->mimeData(clipboardMode_);\r\n\tbool isRectangular = IsRectangularInMime(mimeData);\r\n\tbool isLine = SelectionEmpty() && IsLineCutCopyInMime(mimeData);\r\n\tQString text = clipboard->text(clipboardMode_);\r\n\tQByteArray utext = BytesForDocument(text);\r\n\tstd::string dest(utext.constData(), utext.length());\r\n\tSelectionText selText;\r\n\tselText.Copy(dest, pdoc->dbcsCodePage, CharacterSetOfDocument(), isRectangular, false);\r\n\r\n\tUndoGroup ug(pdoc);\r\n\tClearSelection(multiPasteMode == MultiPaste::Each);\r\n\tInsertPasteShape(selText.Data(), selText.Length(),\r\n\t\tisRectangular ? PasteShape::rectangular : (isLine ? PasteShape::line : PasteShape::stream));\r\n\tEnsureCaretVisible();\r\n}\r\n\r\nvoid ScintillaQt::Paste()\r\n{\r\n\tPasteFromMode(QClipboard::Clipboard);\r\n}\r\n\r\nvoid ScintillaQt::ClaimSelection()\r\n{\r\n\tif (QApplication::clipboard()->supportsSelection()) {\r\n\t\t// X Windows has a 'primary selection' as well as the clipboard.\r\n\t\t// Whenever the user selects some text, we become the primary selection\r\n\t\tif (!sel.Empty()) {\r\n\t\t\tprimarySelection = true;\r\n\t\t\tSelectionText st;\r\n\t\t\tCopySelectionRange(&st);\r\n\t\t\tCopyToModeClipboard(st, QClipboard::Selection);\r\n\t\t} else {\r\n\t\t\tprimarySelection = false;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid ScintillaQt::NotifyChange()\r\n{\r\n\temit notifyChange();\r\n\temit command(\r\n\t\t\tPlatform::LongFromTwoShorts(GetCtrlID(), SCEN_CHANGE),\r\n\t\t\treinterpret_cast<sptr_t>(wMain.GetID()));\r\n}\r\n\r\nvoid ScintillaQt::NotifyFocus(bool focus)\r\n{\r\n\tif (commandEvents) {\r\n\t\temit command(\r\n\t\t\t\tPlatform::LongFromTwoShorts\r\n\t\t\t\t\t\t(GetCtrlID(), focus ? SCEN_SETFOCUS : SCEN_KILLFOCUS),\r\n\t\t\t\treinterpret_cast<sptr_t>(wMain.GetID()));\r\n\t}\r\n\r\n\tEditor::NotifyFocus(focus);\r\n}\r\n\r\nvoid ScintillaQt::NotifyParent(NotificationData scn)\r\n{\r\n\tscn.nmhdr.hwndFrom = wMain.GetID();\r\n\tscn.nmhdr.idFrom = GetCtrlID();\r\n\temit notifyParent(scn);\r\n}\r\n\r\nvoid ScintillaQt::NotifyURIDropped(const char *uri)\r\n{\r\n\tNotificationData scn = {};\r\n\tscn.nmhdr.code = Notification::URIDropped;\r\n\tscn.text = uri;\r\n\r\n\tNotifyParent(scn);\r\n}\r\n\r\nbool ScintillaQt::FineTickerRunning(TickReason reason)\r\n{\r\n\treturn timers[static_cast<size_t>(reason)] != 0;\r\n}\r\n\r\nvoid ScintillaQt::FineTickerStart(TickReason reason, int millis, int /* tolerance */)\r\n{\r\n\tFineTickerCancel(reason);\r\n\ttimers[static_cast<size_t>(reason)] = startTimer(millis);\r\n}\r\n\r\n// CancelTimers cleans up all fine-ticker timers and is non-virtual to avoid warnings when\r\n// called during destruction.\r\nvoid ScintillaQt::CancelTimers()\r\n{\r\n\tfor (size_t tr = static_cast<size_t>(TickReason::caret); tr <= static_cast<size_t>(TickReason::dwell); tr++) {\r\n\t\tif (timers[tr]) {\r\n\t\t\tkillTimer(timers[tr]);\r\n\t\t\ttimers[tr] = 0;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid ScintillaQt::FineTickerCancel(TickReason reason)\r\n{\r\n\tconst size_t reasonIndex = static_cast<size_t>(reason);\r\n\tif (timers[reasonIndex]) {\r\n\t\tkillTimer(timers[reasonIndex]);\r\n\t\ttimers[reasonIndex] = 0;\r\n\t}\r\n}\r\n\r\nvoid ScintillaQt::onIdle()\r\n{\r\n\tbool continueIdling = Idle();\r\n\tif (!continueIdling) {\r\n\t\tSetIdle(false);\r\n\t}\r\n}\r\n\r\nbool ScintillaQt::ChangeIdle(bool on)\r\n{\r\n\tif (on) {\r\n\t\t// Start idler, if it's not running.\r\n\t\tif (!idler.state) {\r\n\t\t\tidler.state = true;\r\n\t\t\tQTimer *qIdle = new QTimer;\r\n\t\t\tconnect(qIdle, SIGNAL(timeout()), this, SLOT(onIdle()));\r\n\t\t\tqIdle->start(0);\r\n\t\t\tidler.idlerID = qIdle;\r\n\t\t}\r\n\t} else {\r\n\t\t// Stop idler, if it's running\r\n\t\tif (idler.state) {\r\n\t\t\tidler.state = false;\r\n\t\t\tQTimer *qIdle = static_cast<QTimer *>(idler.idlerID);\r\n\t\t\tqIdle->stop();\r\n\t\t\tdisconnect(qIdle, SIGNAL(timeout()), nullptr, nullptr);\r\n\t\t\tdelete qIdle;\r\n\t\t\tidler.idlerID = {};\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n}\r\n\r\nbool ScintillaQt::SetIdle(bool on)\r\n{\r\n\treturn ChangeIdle(on);\r\n}\r\n\r\nCharacterSet ScintillaQt::CharacterSetOfDocument() const\r\n{\r\n\treturn vs.styles[STYLE_DEFAULT].characterSet;\r\n}\r\n\r\nconst char *ScintillaQt::CharacterSetIDOfDocument() const\r\n{\r\n\treturn CharacterSetID(CharacterSetOfDocument());\r\n}\r\n\r\nQString ScintillaQt::StringFromDocument(const char *s) const\r\n{\r\n\tif (IsUnicodeMode()) {\r\n\t\treturn QString::fromUtf8(s);\r\n\t} else {\r\n\t\tQTextCodec *codec = QTextCodec::codecForName(\r\n\t\t\t\tCharacterSetID(CharacterSetOfDocument()));\r\n\t\treturn codec->toUnicode(s);\r\n\t}\r\n}\r\n\r\nQByteArray ScintillaQt::BytesForDocument(const QString &text) const\r\n{\r\n\tif (IsUnicodeMode()) {\r\n\t\treturn text.toUtf8();\r\n\t} else {\r\n\t\tQTextCodec *codec = QTextCodec::codecForName(\r\n\t\t\t\tCharacterSetID(CharacterSetOfDocument()));\r\n\t\treturn codec->fromUnicode(text);\r\n\t}\r\n}\r\n\r\nnamespace {\r\n\r\nclass CaseFolderDBCS : public CaseFolderTable {\r\n\tQTextCodec *codec;\r\npublic:\r\n\texplicit CaseFolderDBCS(QTextCodec *codec_) : codec(codec_) {\r\n\t}\r\n\tsize_t Fold(char *folded, size_t sizeFolded, const char *mixed, size_t lenMixed) override {\r\n\t\tif ((lenMixed == 1) && (sizeFolded > 0)) {\r\n\t\t\tfolded[0] = mapping[static_cast<unsigned char>(mixed[0])];\r\n\t\t\treturn 1;\r\n\t\t} else if (codec) {\r\n\t\t\tQString su = codec->toUnicode(mixed, static_cast<int>(lenMixed));\r\n\t\t\tQString suFolded = su.toCaseFolded();\r\n\t\t\tQByteArray bytesFolded = codec->fromUnicode(suFolded);\r\n\r\n\t\t\tif (bytesFolded.length() < static_cast<int>(sizeFolded)) {\r\n\t\t\t\tmemcpy(folded, bytesFolded,  bytesFolded.length());\r\n\t\t\t\treturn bytesFolded.length();\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Something failed so return a single NUL byte\r\n\t\tfolded[0] = '\\0';\r\n\t\treturn 1;\r\n\t}\r\n};\r\n\r\n}\r\n\r\nstd::unique_ptr<CaseFolder> ScintillaQt::CaseFolderForEncoding()\r\n{\r\n\tif (pdoc->dbcsCodePage == SC_CP_UTF8) {\r\n\t\treturn std::make_unique<CaseFolderUnicode>();\r\n\t} else {\r\n\t\tconst char *charSetBuffer = CharacterSetIDOfDocument();\r\n\t\tif (charSetBuffer) {\r\n\t\t\tif (pdoc->dbcsCodePage == 0) {\r\n\t\t\t\tstd::unique_ptr<CaseFolderTable> pcf = std::make_unique<CaseFolderTable>();\r\n\t\t\t\tQTextCodec *codec = QTextCodec::codecForName(charSetBuffer);\r\n\t\t\t\t// Only for single byte encodings\r\n\t\t\t\tfor (int i=0x80; i<0x100; i++) {\r\n\t\t\t\t\tchar sCharacter[2] = \"A\";\r\n\t\t\t\t\tsCharacter[0] = static_cast<char>(i);\r\n\t\t\t\t\tQString su = codec->toUnicode(sCharacter, 1);\r\n\t\t\t\t\tQString suFolded = su.toCaseFolded();\r\n\t\t\t\t\tif (codec->canEncode(suFolded)) {\r\n\t\t\t\t\t\tQByteArray bytesFolded = codec->fromUnicode(suFolded);\r\n\t\t\t\t\t\tif (bytesFolded.length() == 1) {\r\n\t\t\t\t\t\t\tpcf->SetTranslation(sCharacter[0], bytesFolded[0]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn pcf;\r\n\t\t\t} else {\r\n\t\t\t\treturn std::make_unique<CaseFolderDBCS>(QTextCodec::codecForName(charSetBuffer));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn nullptr;\r\n\t}\r\n}\r\n\r\nstd::string ScintillaQt::CaseMapString(const std::string &s, CaseMapping caseMapping)\r\n{\r\n\tif (s.empty() || (caseMapping == CaseMapping::same))\r\n\t\treturn s;\r\n\r\n\tif (IsUnicodeMode()) {\r\n\t\tstd::string retMapped(s.length() * maxExpansionCaseConversion, 0);\r\n\t\tsize_t lenMapped = CaseConvertString(&retMapped[0], retMapped.length(), s.c_str(), s.length(),\r\n\t\t\t(caseMapping == CaseMapping::upper) ? CaseConversion::upper : CaseConversion::lower);\r\n\t\tretMapped.resize(lenMapped);\r\n\t\treturn retMapped;\r\n\t}\r\n\r\n\tQTextCodec *codec = QTextCodec::codecForName(CharacterSetIDOfDocument());\r\n\tQString text = codec->toUnicode(s.c_str(), static_cast<int>(s.length()));\r\n\r\n\tif (caseMapping == CaseMapping::upper) {\r\n\t\ttext = text.toUpper();\r\n\t} else {\r\n\t\ttext = text.toLower();\r\n\t}\r\n\r\n\tQByteArray bytes = BytesForDocument(text);\r\n\treturn std::string(bytes.data(), bytes.length());\r\n}\r\n\r\nvoid ScintillaQt::SetMouseCapture(bool on)\r\n{\r\n\t// This is handled automatically by Qt\r\n\tif (mouseDownCaptures) {\r\n\t\thaveMouseCapture = on;\r\n\t}\r\n}\r\n\r\nbool ScintillaQt::HaveMouseCapture()\r\n{\r\n\treturn haveMouseCapture;\r\n}\r\n\r\nvoid ScintillaQt::StartDrag()\r\n{\r\n\tinDragDrop = DragDrop::dragging;\r\n\tdropWentOutside = true;\r\n\tif (drag.Length()) {\r\n\t\tQMimeData *mimeData = new QMimeData;\r\n\t\tQString sText = StringFromSelectedText(drag);\r\n\t\tmimeData->setText(sText);\r\n\t\tif (drag.rectangular) {\r\n\t\t\tAddRectangularToMime(mimeData, sText);\r\n\t\t}\r\n\t\t// This QDrag is not freed as that causes a crash on Linux\r\n\t\tQDrag *dragon = new QDrag(scrollArea);\r\n\t\tdragon->setMimeData(mimeData);\r\n\r\n\t\tQt::DropAction dropAction = dragon->exec(static_cast<Qt::DropActions>(Qt::CopyAction|Qt::MoveAction));\r\n\t\tif ((dropAction == Qt::MoveAction) && dropWentOutside) {\r\n\t\t\t// Remove dragged out text\r\n\t\t\tClearSelection();\r\n\t\t}\r\n\t}\r\n\tinDragDrop = DragDrop::none;\r\n\tSetDragPosition(SelectionPosition(Sci::invalidPosition));\r\n}\r\n\r\nclass CallTipImpl : public QWidget {\r\npublic:\r\n\texplicit CallTipImpl(CallTip *pct_)\r\n\t\t: QWidget(nullptr, Qt::ToolTip),\r\n\t\t  pct(pct_)\r\n\t{\r\n#if QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)\r\n\t\tsetWindowFlag(Qt::WindowTransparentForInput);\r\n#endif\r\n\t}\r\n\r\n\tvoid paintEvent(QPaintEvent *) override\r\n\t{\r\n\t\tif (pct->inCallTipMode) {\r\n\t\t\tstd::unique_ptr<Surface> surfaceWindow = Surface::Allocate(Technology::Default);\r\n\t\t\tsurfaceWindow->Init(this);\r\n\t\t\tsurfaceWindow->SetMode(SurfaceMode(pct->codePage, false));\r\n\t\t\tpct->PaintCT(surfaceWindow.get());\r\n\t\t}\r\n\t}\r\n\r\nprivate:\r\n\tCallTip *pct;\r\n};\r\n\r\nvoid ScintillaQt::CreateCallTipWindow(PRectangle rc)\r\n{\r\n\r\n\tif (!ct.wCallTip.Created()) {\r\n\t\tQWidget *pCallTip = new CallTipImpl(&ct);\r\n\t\tct.wCallTip = pCallTip;\r\n\t\tpCallTip->move(rc.left, rc.top);\r\n\t\tpCallTip->resize(rc.Width(), rc.Height());\r\n\t}\r\n}\r\n\r\nvoid ScintillaQt::AddToPopUp(const char *label,\r\n                             int cmd,\r\n                             bool enabled)\r\n{\r\n\tQMenu *menu = static_cast<QMenu *>(popup.GetID());\r\n\tQString text(label);\r\n\r\n\tif (text.isEmpty()) {\r\n\t\tmenu->addSeparator();\r\n\t} else {\r\n\t\tQAction *action = menu->addAction(text);\r\n\t\taction->setData(cmd);\r\n\t\taction->setEnabled(enabled);\r\n\t}\r\n\r\n\t// Make sure the menu's signal is connected only once.\r\n\tmenu->disconnect();\r\n\tconnect(menu, SIGNAL(triggered(QAction*)),\r\n\t\tthis, SLOT(execCommand(QAction*)));\r\n}\r\n\r\nsptr_t ScintillaQt::WndProc(Message iMessage, uptr_t wParam, sptr_t lParam)\r\n{\r\n\ttry {\r\n\t\tswitch (iMessage) {\r\n\r\n\t\tcase Message::SetIMEInteraction:\r\n\t\t\t// Only inline IME supported on Qt\r\n\t\t\tbreak;\r\n\r\n\t\tcase Message::GrabFocus:\r\n\t\t\tscrollArea->setFocus(Qt::OtherFocusReason);\r\n\t\t\tbreak;\r\n\r\n\t\tcase Message::GetDirectFunction:\r\n\t\t\treturn reinterpret_cast<sptr_t>(DirectFunction);\r\n\r\n\t\tcase Message::GetDirectStatusFunction:\r\n\t\t\treturn reinterpret_cast<sptr_t>(DirectStatusFunction);\r\n\r\n\t\tcase Message::GetDirectPointer:\r\n\t\t\treturn reinterpret_cast<sptr_t>(this);\r\n\r\n\t\tcase Message::SetRectangularSelectionModifier:\r\n\t\t\trectangularSelectionModifier = static_cast<int>(wParam);\r\n\t\t\tbreak;\r\n\r\n\t\tcase Message::GetRectangularSelectionModifier:\r\n\t\t\treturn rectangularSelectionModifier;\r\n\r\n\t\tdefault:\r\n\t\t\treturn ScintillaBase::WndProc(iMessage, wParam, lParam);\r\n\t\t}\r\n\t} catch (std::bad_alloc &) {\r\n\t\terrorStatus = Status::BadAlloc;\r\n\t} catch (...) {\r\n\t\terrorStatus = Status::Failure;\r\n\t}\r\n\treturn 0;\r\n}\r\n\r\nsptr_t ScintillaQt::DefWndProc(Message, uptr_t, sptr_t)\r\n{\r\n\treturn 0;\r\n}\r\n\r\nsptr_t ScintillaQt::DirectFunction(\r\n    sptr_t ptr, unsigned int iMessage, uptr_t wParam, sptr_t lParam)\r\n{\r\n\tScintillaQt *sci = reinterpret_cast<ScintillaQt *>(ptr);\r\n\treturn sci->WndProc(static_cast<Message>(iMessage), wParam, lParam);\r\n}\r\n\r\nsptr_t ScintillaQt::DirectStatusFunction(\r\n    sptr_t ptr, unsigned int iMessage, uptr_t wParam, sptr_t lParam, int *pStatus)\r\n{\r\n\tScintillaQt *sci = reinterpret_cast<ScintillaQt *>(ptr);\r\n\tconst sptr_t returnValue = sci->WndProc(static_cast<Message>(iMessage), wParam, lParam);\r\n\t*pStatus = static_cast<int>(sci->errorStatus);\r\n\treturn returnValue;\r\n}\r\n\r\n// Additions to merge in Scientific Toolworks widget structure\r\n\r\nvoid ScintillaQt::PartialPaint(const PRectangle &rect)\r\n{\r\n\trcPaint = rect;\r\n\tpaintState = PaintState::painting;\r\n\tPRectangle rcClient = GetClientRectangle();\r\n\tpaintingAllText = rcPaint.Contains(rcClient);\r\n\r\n\tAutoSurface surfacePaint(this);\r\n\tPaint(surfacePaint, rcPaint);\r\n\tsurfacePaint->Release();\r\n\r\n\tif (paintState == PaintState::abandoned) {\r\n\t\t// FIXME: Failure to paint the requested rectangle in each\r\n\t\t// paint event causes flicker on some platforms (Mac?)\r\n\t\t// Paint rect immediately.\r\n\t\tpaintState = PaintState::painting;\r\n\t\tpaintingAllText = true;\r\n\r\n\t\tAutoSurface surface(this);\r\n\t\tPaint(surface, rcPaint);\r\n\t\tsurface->Release();\r\n\r\n\t\t// Queue a full repaint.\r\n\t\tscrollArea->viewport()->update();\r\n\t}\r\n\r\n\tpaintState = PaintState::notPainting;\r\n}\r\n\r\nvoid ScintillaQt::DragEnter(const Point &point)\r\n{\r\n\tSetDragPosition(SPositionFromLocation(point,\r\n\t\t\t\t\t      false, false, UserVirtualSpace()));\r\n}\r\n\r\nvoid ScintillaQt::DragMove(const Point &point)\r\n{\r\n\tSetDragPosition(SPositionFromLocation(point,\r\n\t\t\t\t\t      false, false, UserVirtualSpace()));\r\n}\r\n\r\nvoid ScintillaQt::DragLeave()\r\n{\r\n\tSetDragPosition(SelectionPosition(Sci::invalidPosition));\r\n}\r\n\r\nvoid ScintillaQt::Drop(const Point &point, const QMimeData *data, bool move)\r\n{\r\n\tQString text = data->text();\r\n\tbool rectangular = IsRectangularInMime(data);\r\n\tQByteArray bytes = BytesForDocument(text);\r\n\tint len = bytes.length();\r\n\r\n\tSelectionPosition movePos = SPositionFromLocation(point,\r\n\t\t\t\tfalse, false, UserVirtualSpace());\r\n\r\n\tDropAt(movePos, bytes, len, move, rectangular);\r\n}\r\n\r\nvoid ScintillaQt::DropUrls(const QMimeData *data)\r\n{\r\n\tforeach(const QUrl &url, data->urls()) {\r\n\t\tNotifyURIDropped(url.toString().toUtf8().constData());\r\n\t}\r\n}\r\n\r\nvoid ScintillaQt::timerEvent(QTimerEvent *event)\r\n{\r\n\tfor (size_t tr=static_cast<size_t>(TickReason::caret); tr<=static_cast<size_t>(TickReason::dwell); tr++) {\r\n\t\tif (timers[tr] == event->timerId()) {\r\n\t\t\tTickFor(static_cast<TickReason>(tr));\r\n\t\t}\r\n\t}\r\n}\r\n"
  },
  {
    "path": "scintilla/qt/ScintillaEditBase/ScintillaQt.h",
    "content": "//\r\n//          Copyright (c) 1990-2011, Scientific Toolworks, Inc.\r\n//\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n//\r\n// Author: Jason Haslam\r\n//\r\n// Additions Copyright (c) 2011 Archaeopteryx Software, Inc. d/b/a Wingware\r\n// @file ScintillaQt.h - Qt specific subclass of ScintillaBase\r\n\r\n#ifndef SCINTILLAQT_H\r\n#define SCINTILLAQT_H\r\n\r\n#include <cstddef>\r\n#include <cstdlib>\r\n#include <cstdint>\r\n#include <cassert>\r\n#include <cstring>\r\n#include <cctype>\r\n#include <cstdio>\r\n#include <ctime>\r\n#include <cmath>\r\n#include <stdexcept>\r\n#include <string>\r\n#include <string_view>\r\n#include <vector>\r\n#include <map>\r\n#include <set>\r\n#include <optional>\r\n#include <algorithm>\r\n#include <memory>\r\n\r\n#include \"ScintillaTypes.h\"\r\n#include \"ScintillaMessages.h\"\r\n#include \"ScintillaStructures.h\"\r\n#include \"Scintilla.h\"\r\n#include \"Debugging.h\"\r\n#include \"Geometry.h\"\r\n#include \"Platform.h\"\r\n#include \"ILoader.h\"\r\n#include \"ILexer.h\"\r\n#include \"CharacterCategoryMap.h\"\r\n#include \"Position.h\"\r\n#include \"UniqueString.h\"\r\n#include \"SplitVector.h\"\r\n#include \"Partitioning.h\"\r\n#include \"RunStyles.h\"\r\n#include \"ContractionState.h\"\r\n#include \"CellBuffer.h\"\r\n#include \"CallTip.h\"\r\n#include \"KeyMap.h\"\r\n#include \"Indicator.h\"\r\n#include \"LineMarker.h\"\r\n#include \"Style.h\"\r\n#include \"AutoComplete.h\"\r\n#include \"ViewStyle.h\"\r\n#include \"CharClassify.h\"\r\n#include \"Decoration.h\"\r\n#include \"CaseFolder.h\"\r\n#include \"Document.h\"\r\n#include \"Selection.h\"\r\n#include \"PositionCache.h\"\r\n#include \"EditModel.h\"\r\n#include \"MarginView.h\"\r\n#include \"EditView.h\"\r\n#include \"Editor.h\"\r\n#include \"ScintillaBase.h\"\r\n#include \"CaseConvert.h\"\r\n\r\n#include <QObject>\r\n#include <QAbstractScrollArea>\r\n#include <QAction>\r\n#include <QClipboard>\r\n#include <QPaintEvent>\r\n\r\nclass ScintillaEditBase;\r\n\r\nnamespace Scintilla::Internal {\r\n\r\nclass ScintillaQt : public QObject, public ScintillaBase {\r\n\tQ_OBJECT\r\n\r\npublic:\r\n\texplicit ScintillaQt(QAbstractScrollArea *parent);\r\n\tvirtual ~ScintillaQt();\r\n\r\nsignals:\r\n\tvoid horizontalScrolled(int value);\r\n\tvoid verticalScrolled(int value);\r\n\tvoid horizontalRangeChanged(int max, int page);\r\n\tvoid verticalRangeChanged(int max, int page);\r\n\r\n\tvoid notifyParent(Scintilla::NotificationData scn);\r\n\tvoid notifyChange();\r\n\r\n\t// Clients can use this hook to add additional\r\n\t// formats (e.g. rich text) to the MIME data.\r\n\tvoid aboutToCopy(QMimeData *data);\r\n\r\n\tvoid command(Scintilla::uptr_t wParam, Scintilla::sptr_t lParam);\r\n\r\nprivate slots:\r\n\tvoid onIdle();\r\n\tvoid execCommand(QAction *action);\r\n\tvoid SelectionChanged();\r\n\r\nprivate:\r\n\tvoid Init();\r\n\tvoid Finalise() override;\r\n\tbool DragThreshold(Point ptStart, Point ptNow) override;\r\n\tbool ValidCodePage(int codePage) const override;\r\n\tstd::string UTF8FromEncoded(std::string_view encoded) const override;\r\n\tstd::string EncodedFromUTF8(std::string_view utf8) const override;\r\n\r\nprivate:\r\n\tvoid ScrollText(Sci::Line linesToMove) override;\r\n\tvoid SetVerticalScrollPos() override;\r\n\tvoid SetHorizontalScrollPos() override;\r\n\tbool ModifyScrollBars(Sci::Line nMax, Sci::Line nPage) override;\r\n\tvoid ReconfigureScrollBars() override;\r\n\tvoid CopyToModeClipboard(const SelectionText &selectedText, QClipboard::Mode clipboardMode_);\r\n\tvoid Copy() override;\r\n\tvoid CopyToClipboard(const SelectionText &selectedText) override;\r\n\tvoid PasteFromMode(QClipboard::Mode clipboardMode_);\r\n\tvoid Paste() override;\r\n\tvoid ClaimSelection() override;\r\n\tvoid NotifyChange() override;\r\n\tvoid NotifyFocus(bool focus) override;\r\n\tvoid NotifyParent(Scintilla::NotificationData scn) override;\r\n\tvoid NotifyURIDropped(const char *uri);\r\n\tint timers[static_cast<size_t>(TickReason::dwell)+1]{};\r\n\tbool FineTickerRunning(TickReason reason) override;\r\n\tvoid FineTickerStart(TickReason reason, int millis, int tolerance) override;\r\n\tvoid CancelTimers();\r\n\tvoid FineTickerCancel(TickReason reason) override;\r\n\tbool ChangeIdle(bool on);\r\n\tbool SetIdle(bool on) override;\r\n\tvoid SetMouseCapture(bool on) override;\r\n\tbool HaveMouseCapture() override;\r\n\tvoid StartDrag() override;\r\n\tScintilla::CharacterSet CharacterSetOfDocument() const;\r\n\tconst char *CharacterSetIDOfDocument() const;\r\n\tQString StringFromDocument(const char *s) const;\r\n\tQByteArray BytesForDocument(const QString &text) const;\r\n\tstd::unique_ptr<CaseFolder> CaseFolderForEncoding() override;\r\n\tstd::string CaseMapString(const std::string &s, CaseMapping caseMapping) override;\r\n\r\n\tvoid CreateCallTipWindow(PRectangle rc) override;\r\n\tvoid AddToPopUp(const char *label, int cmd, bool enabled) override;\r\n\tsptr_t WndProc(Scintilla::Message iMessage, uptr_t wParam, sptr_t lParam) override;\r\n\tsptr_t DefWndProc(Scintilla::Message iMessage, uptr_t wParam, sptr_t lParam) override;\r\n\r\n\tstatic sptr_t DirectFunction(sptr_t ptr,\r\n\t\t\t\t     unsigned int iMessage, uptr_t wParam, sptr_t lParam);\r\n\tstatic sptr_t DirectStatusFunction(sptr_t ptr,\r\n\t\t\t\t     unsigned int iMessage, uptr_t wParam, sptr_t lParam, int *pStatus);\r\n\r\nprotected:\r\n\r\n\tvoid PartialPaint(const PRectangle &rect);\r\n\r\n\tvoid DragEnter(const Point &point);\r\n\tvoid DragMove(const Point &point);\r\n\tvoid DragLeave();\r\n\tvoid Drop(const Point &point, const QMimeData *data, bool move);\r\n\tvoid DropUrls(const QMimeData *data);\r\n\r\n\tvoid timerEvent(QTimerEvent *event) override;\r\n\r\nprivate:\r\n\tQAbstractScrollArea *scrollArea;\r\n\r\n\tint vMax, hMax;   // Scroll bar maximums.\r\n\tint vPage, hPage; // Scroll bar page sizes.\r\n\r\n\tbool haveMouseCapture;\r\n\tbool dragWasDropped;\r\n\tint rectangularSelectionModifier;\r\n\r\n\tfriend class ::ScintillaEditBase;\r\n};\r\n\r\n}\r\n\r\n#endif /* SCINTILLAQT_H */\r\n"
  },
  {
    "path": "scintilla/scripts/CheckMentioned.py",
    "content": "#!/usr/bin/env python3\r\n# CheckMentioned.py\r\n# Find all the symbols in scintilla/include/Scintilla.h and check if they\r\n# are mentioned in scintilla/doc/ScintillaDoc.html.\r\n# Requires Python 3.6 or later\r\n\r\nimport re, string, sys\r\n\r\nsrcRoot = \"../..\"\r\n\r\nsys.path.append(srcRoot + \"/scintilla/scripts\")\r\n\r\nimport Face\r\n\r\nuninteresting = {\r\n\t\"SCINTILLA_H\", \"SCI_START\", \"SCI_LEXER_START\", \"SCI_OPTIONAL_START\",\r\n\t# These archaic names are #defined to the Sci_ prefixed modern equivalents.\r\n\t# They are not documented so they are not used in new code.\r\n\t\"CharacterRange\", \"TextRange\", \"TextToFind\", \"RangeToFormat\", \"NotifyHeader\",\r\n}\r\n\r\nincFileName = srcRoot + \"/scintilla/include/Scintilla.h\"\r\ndocFileName = srcRoot + \"/scintilla/doc/ScintillaDoc.html\"\r\nidentCharacters = \"_\" + string.ascii_letters + string.digits\r\n\r\n# Convert all punctuation characters except '_' into spaces.\r\ndef depunctuate(s):\r\n\td = \"\"\r\n\tfor ch in s:\r\n\t\tif ch in identCharacters:\r\n\t\t\td = d + ch\r\n\t\telse:\r\n\t\t\td = d + \" \"\r\n\treturn d\r\n\r\nsymbols = {}\r\nwith open(incFileName, \"rt\") as incFile:\r\n\tfor line in incFile.readlines():\r\n\t\tif line.startswith(\"#define\"):\r\n\t\t\tidentifier = line.split()[1]\r\n\t\t\tsymbols[identifier] = 0\r\n\r\nwith open(docFileName, \"rt\") as docFile:\r\n\tfor line in docFile.readlines():\r\n\t\tfor word in depunctuate(line).split():\r\n\t\t\tif word in symbols.keys():\r\n\t\t\t\tsymbols[word] = 1\r\n\r\ndef convertIFaceTypeToC(t):\r\n\tif t == \"keymod\":\r\n\t\treturn \"int \"\r\n\telif t == \"string\":\r\n\t\treturn \"const char *\"\r\n\telif t == \"stringresult\":\r\n\t\treturn \"char *\"\r\n\telif t == \"cells\":\r\n\t\treturn \"cell *\"\r\n\telif t == \"textrange\":\r\n\t\treturn \"Sci_TextRange *\"\r\n\telif t == \"findtext\":\r\n\t\treturn \"Sci_TextToFind *\"\r\n\telif t == \"formatrange\":\r\n\t\treturn \"Sci_RangeToFormat *\"\r\n\telif t == \"textrangefull\":\r\n\t\treturn \"Sci_TextRangeFull *\"\r\n\telif t == \"findtextfull\":\r\n\t\treturn \"Sci_TextToFindFull *\"\r\n\telif t == \"formatrangefull\":\r\n\t\treturn \"Sci_RangeToFormatFull *\"\r\n\telif Face.IsEnumeration(t):\r\n\t\treturn \"int \"\r\n\treturn t + \" \"\r\n\r\ndef makeParm(t, n, v):\r\n\treturn (convertIFaceTypeToC(t) + n).rstrip()\r\n\r\ndef makeSig(params):\r\n\tp1 = makeParm(params[\"Param1Type\"], params[\"Param1Name\"], params[\"Param1Value\"])\r\n\tp2 = makeParm(params[\"Param2Type\"], params[\"Param2Name\"], params[\"Param2Value\"])\r\n\r\n\tretType = params[\"ReturnType\"]\r\n\tif retType in [\"void\", \"string\", \"stringresult\"]:\r\n\t\tretType = \"\"\r\n\telif Face.IsEnumeration(retType):\r\n\t\tretType = \"int\"\r\n\tif retType:\r\n\t\tretType = \" &rarr; \" + retType\r\n\r\n\tif p1 == \"\" and p2 == \"\":\r\n\t\treturn retType\r\n\r\n\tif p1 == \"\":\r\n\t\tp1 = \"&lt;unused&gt;\"\r\n\tjoiner = \"\"\r\n\tif p2 != \"\":\r\n\t\tjoiner = \", \"\r\n\treturn \"(\" + p1 + joiner + p2 + \")\" + retType\r\n\r\npathIface = srcRoot + \"/scintilla/include/Scintilla.iface\"\r\n\r\ndef retrieveFeatures():\r\n\tface = Face.Face()\r\n\tface.ReadFromFile(pathIface)\r\n\tsciToFeature = {}\r\n\tsccToValue = { \"true\":\"1\", \"false\":\"0\", \"EN_SETFOCUS\":\"256\", \"EN_KILLFOCUS\":\"512\"}\r\n\tfor name in face.order:\r\n\t\tv = face.features[name]\r\n\t\tif v[\"FeatureType\"] in [\"fun\", \"get\", \"set\"]:\r\n\t\t\tfeatureDefineName = \"SCI_\" + name.upper()\r\n\t\t\tsciToFeature[featureDefineName] = name\r\n\t\telif v[\"FeatureType\"] in [\"val\"]:\r\n\t\t\tfeatureDefineName = name.upper()\r\n\t\t\tsccToValue[featureDefineName] = v[\"Value\"]\r\n\t\telif v[\"FeatureType\"] in [\"evt\"]:\r\n\t\t\tfeatureDefineName = \"SCN_\" + name.upper()\r\n\t\t\tsccToValue[featureDefineName] = v[\"Value\"]\r\n\treturn (face, sciToFeature, sccToValue)\r\n\r\ndef flattenSpaces(s):\r\n\treturn s.replace(\"\\n\", \" \").replace(\"  \", \" \").replace(\"  \", \" \").replace(\"  \", \" \").strip()\r\n\r\ndef printCtag(ident, path):\r\n\tprint(ident.strip() + \"\\t\" + path + \"\\t\" + \"/^\" + ident + \"$/\")\r\n\r\nshowCTags = True\r\n\r\ndef checkDocumentation():\r\n\twith open(docFileName, \"rt\") as docFile:\r\n\t\tdocs = docFile.read()\r\n\r\n\tface, sciToFeature, sccToValue = retrieveFeatures()\r\n\r\n\theaders = {}\r\n\tdefinitions = {}\r\n\r\n\t# Examine header sections which point to definitions\r\n\t#<a class=\"message\" href=\"#SCI_SETLAYOUTCACHE\">SCI_SETLAYOUTCACHE(int cacheMode)</a><br />\r\n\tdirPattern = re.compile(r'<a class=\"message\" href=\"#([A-Z0-9_]+)\">([A-Z][A-Za-z0-9_() *&;,\\n]+)</a>')\r\n\tfor api, sig in re.findall(dirPattern, docs):\r\n\t\tsigApi = re.split(r'\\W+', sig)[0]\r\n\t\tsigFlat = flattenSpaces(sig)\r\n\t\tsigFlat = sigFlat.replace('colouralpha ', 'xxxx ')\t# Temporary to avoid next line\r\n\t\tsigFlat = sigFlat.replace('alpha ', 'int ')\r\n\t\tsigFlat = sigFlat.replace('xxxx ', 'colouralpha ')\r\n\r\n\t\tsigFlat = sigFlat.replace(\"document *\", \"int \")\r\n\t\tsigFlat = sigFlat.rstrip()\r\n\t\tif '(' in sigFlat or api.startswith(\"SCI_\"):\r\n\t\t\tname = sciToFeature[api]\r\n\t\t\tsigFromFace = api + makeSig(face.features[name])\r\n\t\t\tif sigFlat != sigFromFace:\r\n\t\t\t\tprint(sigFlat, \"|\", sigFromFace)\r\n\t\t\t\tif showCTags:\r\n\t\t\t\t\tprintCtag(api, docFileName)\r\n\t\t\t\t#~ printCtag(\" \" + name, pathIface)\r\n\t\tif api != sigApi:\r\n\t\t\tprint(sigApi, \";;\", sig, \";;\", api)\r\n\t\theaders[api] = 1\r\n\t# Warns for most keyboard commands so not enabled\r\n\t#~ for api in sorted(sciToFeature.keys()):\r\n\t\t#~ if api not in headers:\r\n\t\t\t#~ print(\"No header for \", api)\r\n\r\n\t# Examine definitions\r\n\t#<b id=\"SCI_SETLAYOUTCACHE\">SCI_SETLAYOUTCACHE(int cacheMode)</b>\r\n\tdefPattern = re.compile(r'<b id=\"([A-Z_0-9]+)\">([A-Z][A-Za-z0-9_() *#\\\"=<>/&;,\\n-]+?)</b>')\r\n\tfor api, sig in re.findall(defPattern, docs):\r\n\t\tsigFlat = flattenSpaces(sig)\r\n\t\tif '<a' in sigFlat\t:\t# Remove anchors\r\n\t\t\tsigFlat = re.sub('<a.*>(.+)</a>', '\\\\1', sigFlat)\r\n\t\tsigFlat = sigFlat.replace('colouralpha ', 'xxxx ')\t# Temporary to avoid next line\r\n\t\tsigFlat = sigFlat.replace('alpha ', 'int ')\r\n\t\tsigFlat = sigFlat.replace('xxxx ', 'colouralpha ')\r\n\t\tsigFlat = sigFlat.replace(\"document *\", \"int \")\r\n\r\n\t\tsigFlat = sigFlat.replace(' NUL-terminated', '')\r\n\t\tsigFlat = sigFlat.rstrip()\r\n\t\t#~ sigFlat = sigFlat.replace(' NUL-terminated', '')\r\n\t\tsigApi = re.split(r'\\W+', sigFlat)[0]\r\n\t\t#~ print(sigFlat, \";;\", sig, \";;\", api)\r\n\t\tif '(' in sigFlat or api.startswith(\"SCI_\"):\r\n\t\t\ttry:\r\n\t\t\t\tname = sciToFeature[api]\r\n\t\t\t\tsigFromFace = api + makeSig(face.features[name])\r\n\t\t\t\tif sigFlat != sigFromFace:\r\n\t\t\t\t\tprint(sigFlat, \"|\", sigFromFace)\r\n\t\t\t\t\tif showCTags:\r\n\t\t\t\t\t\tprintCtag('=\"' + api, docFileName)\r\n\t\t\t\t\t#~ printCtag(\" \" + name, pathIface)\r\n\t\t\texcept KeyError:\r\n\t\t\t\tpass\t\t# Feature removed but still has documentation\r\n\t\tif api != sigApi:\r\n\t\t\tprint(sigApi, \";;\", sig, \";;\", api)\r\n\t\tdefinitions[api] = 1\r\n\t# Warns for most keyboard commands so not enabled\r\n\t#~ for api in sorted(sciToFeature.keys()):\r\n\t\t#~ if api not in definitions:\r\n\t\t\t#~ print(\"No definition for \", api)\r\n\r\n\toutName = docFileName.replace(\"Doc\", \"Dox\")\r\n\twith open(outName, \"wt\") as docFile:\r\n\t\tdocFile.write(docs)\r\n\r\n\t# Examine constant definitions\r\n\t#<code>SC_CARETSTICKY_WHITESPACE</code> (2)\r\n\tconstPattern = re.compile(r'<code>(\\w+)</code> *\\((\\w+)\\)')\r\n\tfor name, val in re.findall(constPattern, docs):\r\n\t\ttry:\r\n\t\t\tvalOfName = sccToValue[name]\r\n\t\t\tif val != valOfName:\r\n\t\t\t\tprint(val, \"<-\", name, \";;\", valOfName)\r\n\t\texcept KeyError:\r\n\t\t\tprint(\"***\", val, \"<-\", name)\r\n\r\n\t# Examine 'seealso' definitions\r\n\t#<a class=\"seealso\" href=\"#SCI_CREATEDOCUMENT\">SCI_CREATEDOCUMENT</a>\r\n\tseealsoPattern = re.compile(r'\"seealso\" href=\"#(\\w+)\">(\\w+)[<(]')\r\n\tfor ref, text in re.findall(seealsoPattern, docs):\r\n\t\tif ref != text:\r\n\t\t\tprint(f\"seealso {text} -> {ref}\")\r\n\r\n\tfor name in sccToValue.keys():\r\n\t\tif name not in [\"SCI_OPTIONAL_START\", \"SCI_LEXER_START\"] and name not in docs:\r\n\t\t\tprint(f\"Unknown {name}\")\r\n\r\nfor identifier in sorted(symbols.keys()):\r\n\tif not symbols[identifier] and identifier not in uninteresting:\r\n\t\tprint(identifier)\r\n\r\ncheckDocumentation()\r\n"
  },
  {
    "path": "scintilla/scripts/Dependencies.py",
    "content": "#!/usr/bin/env python3\r\n# Dependencies.py - discover, read, and write dependencies file for make.\r\n# The format like the output from \"g++ -MM\" which produces a\r\n# list of header (.h) files used by source files (.cxx).\r\n# As a module, provides\r\n#\tFindPathToHeader(header, includePath) -> path\r\n#\tFindHeadersInFile(filePath) -> [headers]\r\n#\tFindHeadersInFileRecursive(filePath, includePath, renames) -> [paths]\r\n#\tFindDependencies(sourceGlobs, includePath, objExt, startDirectory, renames) -> [dependencies]\r\n#\tExtractDependencies(input) -> [dependencies]\r\n#\tTextFromDependencies(dependencies)\r\n#\tWriteDependencies(output, dependencies)\r\n#\tUpdateDependencies(filepath, dependencies)\r\n#\tPathStem(p) -> stem\r\n#\tInsertSynonym(dependencies, current, additional) -> [dependencies]\r\n# If run as a script reads from stdin and writes to stdout.\r\n# Only tested with ASCII file names.\r\n# Copyright 2019 by Neil Hodgson <neilh@scintilla.org>\r\n# The License.txt file describes the conditions under which this software may be distributed.\r\n# Requires Python 2.7 or later\r\n\r\nimport codecs, glob, os, sys\r\n\r\nif __name__ == \"__main__\":\r\n\timport FileGenerator\r\nelse:\r\n\tfrom . import FileGenerator\r\n\r\ncontinuationLineEnd = \" \\\\\"\r\n\r\ndef FindPathToHeader(header, includePath):\r\n\tfor incDir in includePath:\r\n\t\trelPath = os.path.join(incDir, header)\r\n\t\tif os.path.exists(relPath):\r\n\t\t\treturn relPath\r\n\treturn \"\"\r\n\r\nfhifCache = {}\t# Remember the includes in each file. ~5x speed up.\r\ndef FindHeadersInFile(filePath):\r\n\tif filePath not in fhifCache:\r\n\t\theaders = []\r\n\t\twith codecs.open(filePath, \"r\", \"utf-8\") as f:\r\n\t\t\tfor line in f:\r\n\t\t\t\tif line.strip().startswith(\"#include\"):\r\n\t\t\t\t\tparts = line.split()\r\n\t\t\t\t\tif len(parts) > 1:\r\n\t\t\t\t\t\theader = parts[1]\r\n\t\t\t\t\t\tif header[0] != '<':\t# No system headers\r\n\t\t\t\t\t\t\theaders.append(header.strip('\"'))\r\n\t\tfhifCache[filePath] = headers\r\n\treturn fhifCache[filePath]\r\n\r\ndef FindHeadersInFileRecursive(filePath, includePath, renames):\r\n\theaderPaths = []\r\n\tfor header in FindHeadersInFile(filePath):\r\n\t\tif header in renames:\r\n\t\t\theader = renames[header]\r\n\t\trelPath = FindPathToHeader(header, includePath)\r\n\t\tif relPath and relPath not in headerPaths:\r\n\t\t\t\theaderPaths.append(relPath)\r\n\t\t\t\tsubHeaders = FindHeadersInFileRecursive(relPath, includePath, renames)\r\n\t\t\t\theaderPaths.extend(sh for sh in subHeaders if sh not in headerPaths)\r\n\treturn headerPaths\r\n\r\ndef RemoveStart(relPath, start):\r\n\tif relPath.startswith(start):\r\n\t\treturn relPath[len(start):]\r\n\treturn relPath\r\n\r\ndef ciKey(f):\r\n\treturn f.lower()\r\n\r\ndef FindDependencies(sourceGlobs, includePath, objExt, startDirectory, renames={}):\r\n\tdeps = []\r\n\tfor sourceGlob in sourceGlobs:\r\n\t\tsourceFiles = glob.glob(sourceGlob)\r\n\t\t# Sorting the files minimizes deltas as order returned by OS may be arbitrary\r\n\t\tsourceFiles.sort(key=ciKey)\r\n\t\tfor sourceName in sourceFiles:\r\n\t\t\tobjName = os.path.splitext(os.path.basename(sourceName))[0]+objExt\r\n\t\t\theaderPaths = FindHeadersInFileRecursive(sourceName, includePath, renames)\r\n\t\t\tdepsForSource = [sourceName] + headerPaths\r\n\t\t\tdepsToAppend = [RemoveStart(fn.replace(\"\\\\\", \"/\"), startDirectory) for\r\n\t\t\t\tfn in depsForSource]\r\n\t\t\tdeps.append([objName, depsToAppend])\r\n\treturn deps\r\n\r\ndef PathStem(p):\r\n\t\"\"\" Return the stem of a filename: \"CallTip.o\" -> \"CallTip\" \"\"\"\r\n\treturn os.path.splitext(os.path.basename(p))[0]\r\n\r\ndef InsertSynonym(dependencies, current, additional):\r\n\t\"\"\" Insert a copy of one object file with dependencies under a different name.\r\n\tUsed when one source file is used to create two object files with different\r\n\tpreprocessor definitions. \"\"\"\r\n\tresult = []\r\n\tfor dep in dependencies:\r\n\t\tresult.append(dep)\r\n\t\tif (dep[0] == current):\r\n\t\t\tdepAdd = [additional, dep[1]]\r\n\t\t\tresult.append(depAdd)\r\n\treturn result\r\n\r\ndef ExtractDependencies(input):\r\n\t\"\"\" Create a list of dependencies from input list of lines\r\n\tEach element contains the name of the object and a list of\r\n\tfiles that it depends on.\r\n\tDependencies that contain \"/usr/\" are removed as they are system headers. \"\"\"\r\n\r\n\tdeps = []\r\n\tfor line in input:\r\n\t\theadersLine = line.startswith(\" \") or line.startswith(\"\\t\")\r\n\t\tline = line.strip()\r\n\t\tline = line.rstrip(\"\\\\ \")\r\n\t\tfileNames = line.strip().split(\" \")\r\n\t\tif not headersLine:\r\n\t\t\t# its a source file line, there may be headers too\r\n\t\t\tsourceLine = fileNames[0].rstrip(\":\")\r\n\t\t\tfileNames = fileNames[1:]\r\n\t\t\tdeps.append([sourceLine, []])\r\n\t\tdeps[-1][1].extend(header for header in fileNames if \"/usr/\" not in header)\r\n\treturn deps\r\n\r\ndef TextFromDependencies(dependencies):\r\n\t\"\"\" Convert a list of dependencies to text. \"\"\"\r\n\ttext = \"\"\r\n\tindentHeaders = \"\\t\"\r\n\tjoinHeaders = continuationLineEnd + os.linesep + indentHeaders\r\n\tfor dep in dependencies:\r\n\t\tobject, headers = dep\r\n\t\ttext += object + \":\"\r\n\t\tfor header in headers:\r\n\t\t\ttext += joinHeaders\r\n\t\t\ttext += header\r\n\t\tif headers:\r\n\t\t\ttext += os.linesep\r\n\treturn text\r\n\r\ndef UpdateDependencies(filepath, dependencies, comment=\"\"):\r\n\t\"\"\" Write a dependencies file if different from dependencies. \"\"\"\r\n\tFileGenerator.UpdateFile(os.path.abspath(filepath), comment.rstrip() + os.linesep +\r\n\t\tTextFromDependencies(dependencies))\r\n\r\ndef WriteDependencies(output, dependencies):\r\n\t\"\"\" Write a list of dependencies out to a stream. \"\"\"\r\n\toutput.write(TextFromDependencies(dependencies))\r\n\r\nif __name__ == \"__main__\":\r\n\t\"\"\" Act as a filter that reformats input dependencies to one per line. \"\"\"\r\n\tinputLines = sys.stdin.readlines()\r\n\tdeps = ExtractDependencies(inputLines)\r\n\tWriteDependencies(sys.stdout, deps)\r\n"
  },
  {
    "path": "scintilla/scripts/Face.py",
    "content": "#!/usr/bin/env python3\r\n# Face.py - module for reading and parsing Scintilla.iface file\r\n# Implemented 2000 by Neil Hodgson neilh@scintilla.org\r\n# Released to the public domain.\r\n# Requires Python 2.7 or later\r\n\r\ndef sanitiseLine(line):\r\n\tline = line.rstrip('\\n')\r\n\tif \"##\" in line:\r\n\t\tline = line[:line.find(\"##\")]\r\n\tline = line.strip()\r\n\treturn line\r\n\r\ndef decodeFunction(featureVal):\r\n\tretType, rest = featureVal.split(\" \", 1)\r\n\tnameIdent, params = rest.split(\"(\")\r\n\tname, value = nameIdent.split(\"=\")\r\n\tparams, rest = params.split(\")\")\r\n\tparam1, param2 = params.split(\",\")\r\n\treturn retType, name, value, param1, param2\r\n\r\ndef decodeEvent(featureVal):\r\n\tretType, rest = featureVal.split(\" \", 1)\r\n\tnameIdent, params = rest.split(\"(\")\r\n\tname, value = nameIdent.split(\"=\")\r\n\treturn retType, name, value\r\n\r\ndef decodeParam(p):\r\n\tparam = p.strip()\r\n\ttype = \"\"\r\n\tname = \"\"\r\n\tvalue = \"\"\r\n\tif \" \" in param:\r\n\t\ttype, nv = param.split(\" \")\r\n\t\tif \"=\" in nv:\r\n\t\t\tname, value = nv.split(\"=\")\r\n\t\telse:\r\n\t\t\tname = nv\r\n\treturn type, name, value\r\n\r\ndef IsEnumeration(t):\r\n\treturn t[:1].isupper()\r\n\r\ndef PascalCase(s):\r\n\tcapitalized = s.title()\r\n\t# Remove '_' except between digits\r\n\tpascalCase = \"\"\r\n\tcharacterPrevious = \" \"\r\n\t# Loop until penultimate character\r\n\tfor i in range(len(capitalized)-1):\r\n\t\tcharacter = capitalized[i]\r\n\t\tcharacterNext = capitalized[i+1]\r\n\t\tif character != \"_\" or (\r\n\t\t\tcharacterPrevious.isnumeric() and characterNext.isnumeric()):\r\n\t\t\tpascalCase += character\r\n\t\tcharacterPrevious = character\r\n\t# Add last character - not between digits so no special treatment\r\n\tpascalCase += capitalized[-1]\r\n\treturn pascalCase\r\n\r\nclass Face:\r\n\r\n\tdef __init__(self):\r\n\t\tself.order = []\r\n\t\tself.features = {}\r\n\t\tself.values = {}\r\n\t\tself.events = {}\r\n\t\tself.aliases = {}\r\n\r\n\tdef ReadFromFile(self, name):\r\n\t\tcurrentCategory = \"\"\r\n\t\tcurrentComment = []\r\n\t\tcurrentCommentFinished = 0\r\n\t\tfile = open(name)\r\n\t\tfor line in file.readlines():\r\n\t\t\tline = sanitiseLine(line)\r\n\t\t\tif line:\r\n\t\t\t\tif line[0] == \"#\":\r\n\t\t\t\t\tif line[1] == \" \":\r\n\t\t\t\t\t\tif currentCommentFinished:\r\n\t\t\t\t\t\t\tcurrentComment = []\r\n\t\t\t\t\t\t\tcurrentCommentFinished = 0\r\n\t\t\t\t\t\tcurrentComment.append(line[2:])\r\n\t\t\t\telse:\r\n\t\t\t\t\tcurrentCommentFinished = 1\r\n\t\t\t\t\tfeatureType, featureVal = line.split(\" \", 1)\r\n\t\t\t\t\tif featureType in [\"fun\", \"get\", \"set\"]:\r\n\t\t\t\t\t\ttry:\r\n\t\t\t\t\t\t\tretType, name, value, param1, param2 = decodeFunction(featureVal)\r\n\t\t\t\t\t\texcept ValueError:\r\n\t\t\t\t\t\t\tprint(\"Failed to decode %s\" % line)\r\n\t\t\t\t\t\t\traise\r\n\t\t\t\t\t\tp1 = decodeParam(param1)\r\n\t\t\t\t\t\tp2 = decodeParam(param2)\r\n\t\t\t\t\t\tself.features[name] = {\r\n\t\t\t\t\t\t\t\"FeatureType\": featureType,\r\n\t\t\t\t\t\t\t\"ReturnType\": retType,\r\n\t\t\t\t\t\t\t\"Value\": value,\r\n\t\t\t\t\t\t\t\"Param1Type\": p1[0], \"Param1Name\": p1[1], \"Param1Value\": p1[2],\r\n\t\t\t\t\t\t\t\"Param2Type\": p2[0], \"Param2Name\": p2[1], \"Param2Value\": p2[2],\r\n\t\t\t\t\t\t\t\"Category\": currentCategory, \"Comment\": currentComment\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif value in self.values:\r\n\t\t\t\t\t\t\traise Exception(\"Duplicate value \" + value + \" \" + name)\r\n\t\t\t\t\t\tself.values[value] = 1\r\n\t\t\t\t\t\tself.order.append(name)\r\n\t\t\t\t\t\tcurrentComment = []\r\n\t\t\t\t\telif featureType == \"evt\":\r\n\t\t\t\t\t\tretType, name, value = decodeEvent(featureVal)\r\n\t\t\t\t\t\tself.features[name] = {\r\n\t\t\t\t\t\t\t\"FeatureType\": featureType,\r\n\t\t\t\t\t\t\t\"ReturnType\": retType,\r\n\t\t\t\t\t\t\t\"Value\": value,\r\n\t\t\t\t\t\t\t\"Category\": currentCategory, \"Comment\": currentComment\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif value in self.events:\r\n\t\t\t\t\t\t\traise Exception(\"Duplicate event \" + value + \" \" + name)\r\n\t\t\t\t\t\tself.events[value] = 1\r\n\t\t\t\t\t\tself.order.append(name)\r\n\t\t\t\t\telif featureType == \"cat\":\r\n\t\t\t\t\t\tcurrentCategory = featureVal\r\n\t\t\t\t\telif featureType == \"val\":\r\n\t\t\t\t\t\ttry:\r\n\t\t\t\t\t\t\tname, value = featureVal.split(\"=\", 1)\r\n\t\t\t\t\t\texcept ValueError:\r\n\t\t\t\t\t\t\tprint(\"Failure %s\" % featureVal)\r\n\t\t\t\t\t\t\traise Exception()\r\n\t\t\t\t\t\tself.features[name] = {\r\n\t\t\t\t\t\t\t\"FeatureType\": featureType,\r\n\t\t\t\t\t\t\t\"Category\": currentCategory,\r\n\t\t\t\t\t\t\t\"Value\": value }\r\n\t\t\t\t\t\tself.order.append(name)\r\n\t\t\t\t\telif featureType == \"enu\" or featureType == \"lex\":\r\n\t\t\t\t\t\tname, value = featureVal.split(\"=\", 1)\r\n\t\t\t\t\t\tself.features[name] = {\r\n\t\t\t\t\t\t\t\"FeatureType\": featureType,\r\n\t\t\t\t\t\t\t\"Category\": currentCategory,\r\n\t\t\t\t\t\t\t\"Value\": value,\r\n\t\t\t\t\t\t\t\"Comment\": currentComment }\r\n\t\t\t\t\t\tself.order.append(name)\r\n\t\t\t\t\t\tcurrentComment = []\r\n\t\t\t\t\telif featureType == \"ali\":\r\n\t\t\t\t\t\t# Enumeration alias\r\n\t\t\t\t\t\tname, value = featureVal.split(\"=\", 1)\r\n\t\t\t\t\t\tself.aliases[name] = value\r\n\t\t\t\t\t\tcurrentComment = []\r\n\t\tfile.close()\r\n"
  },
  {
    "path": "scintilla/scripts/FileGenerator.py",
    "content": "#!/usr/bin/env python3\r\n# FileGenerator.py - implemented 2013 by Neil Hodgson neilh@scintilla.org\r\n# Released to the public domain.\r\n\r\n# Generate or regenerate source files based on comments in those files.\r\n# May be modified in-place or a template may be generated into a complete file.\r\n# Requires Python 2.7 or later\r\n# The files are copied to a string apart from sections between a\r\n# ++Autogenerated comment and a --Autogenerated comment which is\r\n# generated by the CopyWithInsertion function. After the whole string is\r\n# instantiated, it is compared with the target file and if different the file\r\n# is rewritten.\r\n\r\nfrom __future__ import with_statement\r\n\r\nimport codecs, os, re, string, sys\r\n\r\nlineEnd = \"\\r\\n\" if sys.platform == \"win32\" else \"\\n\"\r\n\r\ndef UpdateFile(filename, updated):\r\n    \"\"\" If the file contents are different to updated then copy updated into the\r\n    file else leave alone so Mercurial and make don't treat it as modified. \"\"\"\r\n    newOrChanged = \"Changed\"\r\n    try:\r\n        with codecs.open(filename, \"r\", \"utf-8\") as infile:\r\n            original = infile.read()\r\n        if updated == original:\r\n            # Same as before so don't write\r\n            return\r\n        os.unlink(filename)\r\n    except IOError: # File is not there yet\r\n        newOrChanged = \"New\"\r\n    with codecs.open(filename, \"w\", \"utf-8\") as outfile:\r\n        outfile.write(updated)\r\n    print(\"%s:0: %s\" % (filename, newOrChanged))\r\n\r\n# Automatically generated sections contain start and end comments,\r\n# a definition line and the results.\r\n# The results are replaced by regenerating based on the definition line.\r\n# The definition line is a comment prefix followed by \"**\".\r\n# If there is a digit after the ** then this indicates which list to use\r\n# and the digit and next character are not part of the definition\r\n# Backslash is used as an escape within the definition line.\r\n# The part between \\( and \\) is repeated for each item in the list.\r\n# \\* is replaced by each list item. \\t, and \\n are tab and newline.\r\n# If there is no definition line than the first list is copied verbatim.\r\n# If retainDefs then the comments controlling generation are copied.\r\ndef CopyWithInsertion(input, commentPrefix, retainDefs, lists):\r\n    copying = 1\r\n    generated = False\r\n    listid = 0\r\n    output = []\r\n    for line in input.splitlines(0):\r\n        isStartGenerated = line.lstrip().startswith(commentPrefix + \"++Autogenerated\")\r\n        if copying and not isStartGenerated:\r\n            output.append(line)\r\n        if isStartGenerated:\r\n            if retainDefs:\r\n                output.append(line)\r\n            copying = 0\r\n            generated = False\r\n        elif not copying and not generated:\r\n            # Generating\r\n            if line.startswith(commentPrefix + \"**\"):\r\n                # Pattern to transform input data\r\n                if retainDefs:\r\n                    output.append(line)\r\n                definition = line[len(commentPrefix + \"**\"):]\r\n                if (commentPrefix == \"<!--\") and (\" -->\" in definition):\r\n                    definition = definition.replace(\" -->\", \"\")\r\n                listid = 0\r\n                if definition[0] in string.digits:\r\n                    listid = int(definition[:1])\r\n                    definition = definition[2:]\r\n                # Hide double slashes as a control character\r\n                definition = definition.replace(\"\\\\\\\\\", \"\\001\")\r\n                # Do some normal C style transforms\r\n                definition = definition.replace(\"\\\\n\", \"\\n\")\r\n                definition = definition.replace(\"\\\\t\", \"\\t\")\r\n                # Get the doubled backslashes back as single backslashes\r\n                definition = definition.replace(\"\\001\", \"\\\\\")\r\n                startRepeat = definition.find(\"\\\\(\")\r\n                endRepeat = definition.find(\"\\\\)\")\r\n                intro = definition[:startRepeat]\r\n                out = \"\"\r\n                if intro.endswith(\"\\n\"):\r\n                    pos = 0\r\n                else:\r\n                    pos = len(intro)\r\n                out += intro\r\n                middle = definition[startRepeat+2:endRepeat]\r\n                for i in lists[listid]:\r\n                    item = middle.replace(\"\\\\*\", i)\r\n                    if pos and (pos + len(item) >= 80):\r\n                        out += \"\\\\\\n\"\r\n                        pos = 0\r\n                    out += item\r\n                    pos += len(item)\r\n                    if item.endswith(\"\\n\"):\r\n                        pos = 0\r\n                outro = definition[endRepeat+2:]\r\n                out += outro\r\n                out = out.replace(\"\\n\", lineEnd) # correct EOLs in generated content\r\n                output.append(out)\r\n            else:\r\n                # Simple form with no rule to transform input\r\n                output.extend(lists[0])\r\n            generated = True\r\n        if line.lstrip().startswith(commentPrefix + \"--Autogenerated\") or \\\r\n            line.lstrip().startswith(commentPrefix + \"~~Autogenerated\"):\r\n            copying = 1\r\n            if retainDefs:\r\n                output.append(line)\r\n    output = [line.rstrip(\" \\t\") for line in output] # trim trailing whitespace\r\n    return lineEnd.join(output) + lineEnd\r\n\r\ndef GenerateFile(inpath, outpath, commentPrefix, retainDefs, *lists):\r\n    \"\"\"Generate 'outpath' from 'inpath'.\r\n    \"\"\"\r\n\r\n    try:\r\n        with codecs.open(inpath, \"r\", \"UTF-8\") as infile:\r\n            original = infile.read()\r\n        updated = CopyWithInsertion(original, commentPrefix,\r\n            retainDefs, lists)\r\n        UpdateFile(outpath, updated)\r\n    except IOError:\r\n        print(\"Can not open %s\" % inpath)\r\n\r\ndef Generate(inpath, outpath, commentPrefix, *lists):\r\n    \"\"\"Generate 'outpath' from 'inpath'.\r\n    \"\"\"\r\n    GenerateFile(inpath, outpath, commentPrefix, inpath == outpath, *lists)\r\n\r\ndef Regenerate(filename, commentPrefix, *lists):\r\n    \"\"\"Regenerate the given file.\r\n    \"\"\"\r\n    Generate(filename, filename, commentPrefix, *lists)\r\n\r\ndef UpdateLineInPlistFile(path, key, value):\r\n    \"\"\"Replace a single string value preceded by 'key' in an XML plist file.\r\n    \"\"\"\r\n    lines = []\r\n    keyCurrent = \"\"\r\n    with codecs.open(path, \"rb\", \"utf-8\") as f:\r\n        for line in f.readlines():\r\n            ls = line.strip()\r\n            if ls.startswith(\"<key>\"):\r\n                keyCurrent = ls.replace(\"<key>\", \"\").replace(\"</key>\", \"\")\r\n            elif ls.startswith(\"<string>\"):\r\n                if keyCurrent == key:\r\n                    start, tag, rest = line.partition(\"<string>\")\r\n                    _val, etag, end = rest.partition(\"</string>\")\r\n                    line = start + tag + value + etag + end\r\n            lines.append(line)\r\n    contents = \"\".join(lines)\r\n    UpdateFile(path, contents)\r\n\r\ndef UpdateLineInFile(path, linePrefix, lineReplace):\r\n    lines = []\r\n    updated = False\r\n    with codecs.open(path, \"r\", \"utf-8\") as f:\r\n        for line in f.readlines():\r\n            line = line.rstrip()\r\n            if not updated and line.startswith(linePrefix):\r\n                lines.append(lineReplace)\r\n                updated = True\r\n            else:\r\n                lines.append(line)\r\n    if not updated:\r\n        print(f\"{path}:0: Can't find '{linePrefix}'\")\r\n    contents = lineEnd.join(lines) + lineEnd\r\n    UpdateFile(path, contents)\r\n\r\ndef UpdateFileFromLines(path, lines, lineEndToUse):\r\n    \"\"\"Join the lines with the lineEndToUse then update file if the result is different.\r\n    \"\"\"\r\n    contents = lineEndToUse.join(lines) + lineEndToUse\r\n    UpdateFile(path, contents)\r\n\r\ndef ReplaceREInFile(path, match, replace, count=1):\r\n    with codecs.open(path, \"r\", \"utf-8\") as f:\r\n        contents = f.read()\r\n    contents = re.sub(match, replace, contents, count)\r\n    UpdateFile(path, contents)\r\n"
  },
  {
    "path": "scintilla/scripts/GenerateCaseConvert.py",
    "content": "#!/usr/bin/env python3\r\n# Script to generate CaseConvert.cxx from Python's Unicode data\r\n# Should be run rarely when a Python with a new version of Unicode data is available.\r\n# Requires Python 3.3 or later\r\n# Should not be run with old versions of Python.\r\n\r\n# Current best approach divides case conversions into two cases:\r\n# simple symmetric and complex.\r\n# Simple symmetric is where a lower and upper case pair convert to each\r\n# other and the folded form is the same as the lower case.\r\n# There are 1006 symmetric pairs.\r\n# These are further divided into ranges (stored as lower, upper, range length,\r\n# range pitch and singletons (stored as lower, upper).\r\n# Complex is for cases that don't fit the above: where there are multiple\r\n# characters in one of the forms or fold is different to lower or\r\n# lower(upper(x)) or upper(lower(x)) are not x. These are represented as UTF-8\r\n# strings with original, folded, upper, and lower separated by '|'.\r\n# There are 126 complex cases.\r\n\r\nimport itertools, string, sys\r\n\r\nfrom FileGenerator import Regenerate\r\n\r\ndef contiguousRanges(ll, diff):\r\n    # ll is a list of lists\r\n    # group into lists where first element of each element differs by diff\r\n    out = [[ll[0]]]\r\n    for s in ll[1:]:\r\n        if s[0] != out[-1][-1][0] + diff:\r\n            out.append([])\r\n        out[-1].append(s)\r\n    return out\r\n\r\ndef flatten(listOfLists):\r\n    \"Flatten one level of nesting\"\r\n    return itertools.chain.from_iterable(listOfLists)\r\n\r\ndef conversionSets():\r\n    # For all Unicode characters, see whether they have case conversions\r\n    # Return 2 sets: one of simple symmetric conversion cases and another\r\n    # with complex cases.\r\n    complexes = []\r\n    symmetrics = []\r\n    for ch in range(sys.maxunicode + 1):\r\n        if ch >= 0xd800 and ch <= 0xDBFF:\r\n            continue\r\n        if ch >= 0xdc00 and ch <= 0xDFFF:\r\n            continue\r\n        uch = chr(ch)\r\n\r\n        fold = uch.casefold()\r\n        upper = uch.upper()\r\n        lower = uch.lower()\r\n        symmetric = False\r\n        if uch != upper and len(upper) == 1 and uch == lower and uch == fold:\r\n            lowerUpper = upper.lower()\r\n            foldUpper = upper.casefold()\r\n            if lowerUpper == foldUpper and lowerUpper == uch:\r\n                symmetric = True\r\n                symmetrics.append((ch, ord(upper), ch - ord(upper)))\r\n        if uch != lower and len(lower) == 1 and uch == upper and lower == fold:\r\n            upperLower = lower.upper()\r\n            if upperLower == uch:\r\n                symmetric = True\r\n\r\n        if fold == uch:\r\n            fold = \"\"\r\n        if upper == uch:\r\n            upper = \"\"\r\n        if lower == uch:\r\n            lower = \"\"\r\n\r\n        if (fold or upper or lower) and not symmetric:\r\n            complexes.append((uch, fold, upper, lower))\r\n\r\n    return symmetrics, complexes\r\n\r\ndef groupRanges(symmetrics):\r\n    # Group the symmetrics into groups where possible, returning a list\r\n    # of ranges and a list of symmetrics that didn't fit into a range\r\n\r\n    def distance(s):\r\n        return s[2]\r\n\r\n    groups = []\r\n    uniquekeys = []\r\n    for k, g in itertools.groupby(symmetrics, distance):\r\n        groups.append(list(g))      # Store group iterator as a list\r\n        uniquekeys.append(k)\r\n\r\n    contiguousGroups = flatten([contiguousRanges(g, 1) for g in groups])\r\n    longGroups = [(x[0][0], x[0][1], len(x), 1) for x in contiguousGroups if len(x) > 4]\r\n\r\n    oneDiffs = [s for s in symmetrics if s[2] == 1]\r\n    contiguousOnes = flatten([contiguousRanges(g, 2) for g in [oneDiffs]])\r\n    longOneGroups = [(x[0][0], x[0][1], len(x), 2) for x in contiguousOnes if len(x) > 4]\r\n\r\n    rangeGroups = sorted(longGroups+longOneGroups, key=lambda s: s[0])\r\n\r\n    rangeCoverage = list(flatten([range(r[0], r[0]+r[2]*r[3], r[3]) for r in rangeGroups]))\r\n\r\n    nonRanges = [(x, u) for x, u, _d in symmetrics if x not in rangeCoverage]\r\n\r\n    return rangeGroups, nonRanges\r\n\r\ndef escape(s):\r\n    return \"\".join((chr(c) if chr(c) in string.ascii_letters else \"\\\\x%x\" % c) for c in s.encode('utf-8'))\r\n\r\ndef updateCaseConvert():\r\n    symmetrics, complexes = conversionSets()\r\n\r\n    rangeGroups, nonRanges = groupRanges(symmetrics)\r\n\r\n    print(len(rangeGroups), \"ranges\")\r\n    rangeLines = [\"%d,%d,%d,%d,\" % x for x in rangeGroups]\r\n\r\n    print(len(nonRanges), \"non ranges\")\r\n    nonRangeLines = [\"%d,%d,\" % x for x in nonRanges]\r\n\r\n    print(len(symmetrics), \"symmetric\")\r\n\r\n    complexLines = ['\"%s|%s|%s|%s|\"' % tuple(escape(t) for t in x) for x in complexes]\r\n    print(len(complexLines), \"complex\")\r\n\r\n    Regenerate(\"../src/CaseConvert.cxx\", \"//\", rangeLines, nonRangeLines, complexLines)\r\n\r\nupdateCaseConvert()\r\n"
  },
  {
    "path": "scintilla/scripts/GenerateCharacterCategory.py",
    "content": "#!/usr/bin/env python3\r\n# Script to generate scintilla/src/CharacterCategoryMap.cxx and lexilla/lexlib/CharacterCategory.cxx\r\n# from Python's Unicode data\r\n# Should be run rarely when a Python with a new version of Unicode data is available.\r\n# Requires Python 3.3 or later\r\n# Should not be run with old versions of Python.\r\n\r\nimport pathlib, platform, sys, unicodedata\r\n\r\nfrom FileGenerator import Regenerate\r\n\r\ndef findCategories(filename):\r\n    with filename.open(encoding=\"UTF-8\") as infile:\r\n        lines = [x.strip() for x in infile.readlines() if \"\\tcc\" in x]\r\n    values = \"\".join(lines).replace(\" \",\"\").split(\",\")\r\n    print(\"Categrories:\", values)\r\n    return [v[2:] for v in values]\r\n\r\ndef updateCharacterCategory(filename):\r\n    values = [\"// Created with Python %s,  Unicode %s\" % (\r\n        platform.python_version(), unicodedata.unidata_version)]\r\n\r\n    startRange = 0\r\n    category = unicodedata.category(chr(startRange))\r\n    table = []\r\n    for ch in range(sys.maxunicode):\r\n        uch = chr(ch)\r\n        current = unicodedata.category(uch)\r\n        if current != category:\r\n            value = startRange * 32 + categories.index(category)\r\n            table.append(value)\r\n            category = current\r\n            startRange = ch\r\n    value = startRange * 32 + categories.index(category)\r\n    table.append(value)\r\n\r\n    # the sentinel value is used to simplify CharacterCategoryMap::Optimize()\r\n    category = 'Cn'\r\n    value = (sys.maxunicode + 1)*32 + categories.index(category)\r\n    table.append(value)\r\n\r\n    values.extend([\"%d,\" % value for value in table])\r\n\r\n    Regenerate(filename, \"//\", values)\r\n\r\n\r\nscintillaDirectory = pathlib.Path(__file__).resolve().parent.parent\r\n\r\ncategories = findCategories(scintillaDirectory / \"src\" / \"CharacterCategoryMap.h\")\r\n\r\nupdateCharacterCategory(scintillaDirectory / \"src\" / \"CharacterCategoryMap.cxx\")\r\n\r\nupdateCharacterCategory(scintillaDirectory.parent / \"lexilla\" / \"lexlib\" / \"CharacterCategory.cxx\")\r\n"
  },
  {
    "path": "scintilla/scripts/HFacer.py",
    "content": "#!/usr/bin/env python3\r\n# HFacer.py - regenerate the Scintilla.h and SciLexer.h files from the Scintilla.iface interface\r\n# definition file.\r\n# Implemented 2000 by Neil Hodgson neilh@scintilla.org\r\n# Requires Python 3.6 or later\r\n\r\nimport pathlib\r\nimport Face\r\nimport FileGenerator\r\n\r\ndef printHFile(f):\r\n\tout = []\r\n\tpreviousCategory = \"\"\r\n\tanyProvisional = False\r\n\tfor name in f.order:\r\n\t\tv = f.features[name]\r\n\t\tif v[\"Category\"] != \"Deprecated\":\r\n\t\t\tif v[\"Category\"] == \"Provisional\" and previousCategory != \"Provisional\":\r\n\t\t\t\tout.append(\"#ifndef SCI_DISABLE_PROVISIONAL\")\r\n\t\t\t\tanyProvisional = True\r\n\t\t\tpreviousCategory = v[\"Category\"]\r\n\t\t\tif v[\"FeatureType\"] in [\"fun\", \"get\", \"set\"]:\r\n\t\t\t\tfeatureDefineName = \"SCI_\" + name.upper()\r\n\t\t\t\tout.append(\"#define \" + featureDefineName + \" \" + v[\"Value\"])\r\n\t\t\telif v[\"FeatureType\"] in [\"evt\"]:\r\n\t\t\t\tfeatureDefineName = \"SCN_\" + name.upper()\r\n\t\t\t\tout.append(\"#define \" + featureDefineName + \" \" + v[\"Value\"])\r\n\t\t\telif v[\"FeatureType\"] in [\"val\"]:\r\n\t\t\t\tout.append(\"#define \" + name + \" \" + v[\"Value\"])\r\n\tif anyProvisional:\r\n\t\tout.append(\"#endif\")\r\n\treturn out\r\n\r\nshowUnused = False\r\n\r\ndef RegenerateAll(root, showMaxID):\r\n\tf = Face.Face()\r\n\tf.ReadFromFile(root / \"include/Scintilla.iface\")\r\n\tFileGenerator.Regenerate(root / \"include/Scintilla.h\", \"/* \", printHFile(f))\r\n\tif showMaxID:\r\n\t\tvalueSet = set(int(x) for x in f.values if int(x) < 3000)\r\n\t\tmaximumID = max(valueSet)\r\n\t\tprint(\"Maximum ID is %d\" % maximumID)\r\n\t\tif showUnused:\r\n\t\t\tvaluesUnused = sorted(x for x in range(2001,maximumID) if x not in valueSet)\r\n\t\t\tprint(\"\\nUnused values\")\r\n\t\t\tvalueToName = {}\r\n\t\t\tfor name, feature in f.features.items():\r\n\t\t\t\ttry:\r\n\t\t\t\t\tvalue = int(feature[\"Value\"])\r\n\t\t\t\t\tvalueToName[value] = name\r\n\t\t\t\texcept ValueError:\r\n\t\t\t\t\tpass\r\n\t\t\tfor v in valuesUnused:\r\n\t\t\t\tprev = valueToName.get(v-1, \"\")\r\n\t\t\t\tprint(v, prev)\r\n\r\nif __name__ == \"__main__\":\r\n\tRegenerateAll(pathlib.Path(__file__).resolve().parent.parent, True)\r\n"
  },
  {
    "path": "scintilla/scripts/HeaderCheck.py",
    "content": "#!/usr/bin/env python3\r\n# Script to check that headers are in a consistent order\r\n# Canonical header order is defined in a file, normally scripts/HeaderOrder.txt\r\n# Requires Python 3.6 or later\r\n\r\nimport pathlib, sys\r\n\r\ndef IsHeader(x):\r\n    return x.strip().startswith(\"#\") and \\\r\n        (\"include\" in x or \"import\" in x) and \\\r\n        \"dllimport\" not in x\r\n\r\ndef HeaderFromIncludeLine(s):\r\n    #\\s*#\\s*(include|import)\\s+\\S+\\s*\r\n    return s.strip()[1:].strip()[7:].strip()\r\n\r\ndef ExtractHeaders(file):\r\n    with file.open(encoding=\"iso-8859-1\") as infile:\r\n        return [HeaderFromIncludeLine(h) for h in infile if IsHeader(h)]\r\n\r\ndef ExtractWithPrefix(file, prefix):\r\n    with file.open(encoding=\"iso-8859-1\") as infile:\r\n        return [s.strip()[len(prefix):] for s in infile if s.startswith(prefix)]\r\n\r\ndef ExcludeName(name, excludes):\r\n    return any(exclude in name for exclude in excludes)\r\n\r\ndef SortLike(incs, order):\r\n    return sorted(incs, key = lambda i: order.index(i))\r\n\r\nbasePrefix = \"//base:\"\r\nsourcePrefix = \"//source:\"\r\nexcludePrefix = \"//exclude:\"\r\n\r\ndef CheckFiles(headerOrderTxt):\r\n    headerOrderFile = pathlib.Path(headerOrderTxt).resolve()\r\n    bases = ExtractWithPrefix(headerOrderFile, basePrefix)\r\n    base = bases[0] if len(bases) > 0 else \"..\"\r\n    orderDirectory = headerOrderFile.parent\r\n    root = (orderDirectory / base).resolve()\r\n\r\n    # Find all the source code files\r\n    patterns = ExtractWithPrefix(headerOrderFile, sourcePrefix)\r\n    excludes = ExtractWithPrefix(headerOrderFile, excludePrefix)\r\n\r\n    filePaths = []\r\n    for p in patterns:\r\n        filePaths += root.glob(p)\r\n    headerOrder = ExtractHeaders(headerOrderFile)\r\n    originalOrder = headerOrder[:]\r\n    orderedPaths = [p for p in sorted(filePaths) if not ExcludeName(str(p), excludes)]\r\n    allIncs = set()\r\n    for f in orderedPaths:\r\n        #~ print(\"   File \", f.relative_to(root))\r\n        incs = ExtractHeaders(f)\r\n        allIncs = allIncs.union(set(incs))\r\n\r\n        m = 0\r\n        i = 0\r\n        # Detect headers not in header order list and insert at OK position\r\n        needs = []\r\n        while i < len(incs):\r\n            if m == len(headerOrder):\r\n                #~ print(\"**** extend\", incs[i:])\r\n                headerOrder.extend(incs[i:])\r\n                needs.extend(incs[i:])\r\n                break\r\n            if headerOrder[m] == incs[i]:\r\n                #~ print(\"equal\", headerOrder[m])\r\n                i += 1\r\n                m += 1\r\n            else:\r\n                if headerOrder[m] not in incs:\r\n                    #~ print(\"skip\", headerOrder[m])\r\n                    m += 1\r\n                elif incs[i] not in headerOrder:\r\n                    #~ print(str(f) + \":1: Add master\", incs[i])\r\n                    headerOrder.insert(m, incs[i])\r\n                    needs.append(incs[i])\r\n                    i += 1\r\n                    m += 1\r\n                else:\r\n                    i += 1\r\n        if needs:\r\n            print(f\"{f}:1: needs these headers:\")\r\n            for header in needs:\r\n                print(\"#include \" + header)\r\n\r\n        # Detect out of order\r\n        ordered = SortLike(incs, headerOrder)\r\n        if incs != ordered:\r\n            print(f\"{f}:1: is out of order\")\r\n            fOrdered = pathlib.Path(str(f) + \".ordered\")\r\n            with fOrdered.open(\"w\") as headerOut:\r\n                for header in ordered:\r\n                    headerOut.write(\"#include \" + header + \"\\n\")\r\n            print(f\"{fOrdered}:1: is ordered\")\r\n\r\n    if headerOrder != originalOrder:\r\n        newIncludes = set(headerOrder) - set(originalOrder)\r\n        headerOrderNew = orderDirectory / \"NewOrder.txt\"\r\n        print(f\"{headerOrderFile}:1: changed to {headerOrderNew}\")\r\n        print(f\"   Added {', '.join(newIncludes)}.\")\r\n        with headerOrderNew.open(\"w\") as headerOut:\r\n            for header in headerOrder:\r\n                headerOut.write(\"#include \" + header + \"\\n\")\r\n\r\n    unused = sorted(set(headerOrder) - allIncs)\r\n    if unused:\r\n        print(\"In HeaderOrder.txt but not used\")\r\n        print(\"\\n\".join(unused))\r\n\r\nif len(sys.argv) > 1:\r\n    CheckFiles(sys.argv[1])\r\nelse:\r\n    CheckFiles(\"HeaderOrder.txt\")\r\n"
  },
  {
    "path": "scintilla/scripts/HeaderOrder.txt",
    "content": "// Define the standard order in which to include header files\r\n// All platform headers should be included before Scintilla headers\r\n// and each of these groups are then divided into directory groups.\r\n\r\n// Base of the repository relative to this file\r\n\r\n//base:..\r\n\r\n// File patterns to check:\r\n//source:include/*.h\r\n//source:src/*.cxx\r\n//source:lexlib/*.cxx\r\n//source:lexers/*.cxx\r\n//source:win32/*.cxx\r\n//source:gtk/*.cxx\r\n//source:cocoa/*.mm\r\n//source:cocoa/*.h\r\n//source:test/unit/*.cxx\r\n//source:lexilla/src/*.cxx\r\n//source:lexilla/test/*.cxx\r\n\r\n// C standard library\r\n#include <stddef.h>\r\n#include <stdint.h>\r\n\r\n// C++ wrappers of C standard library\r\n#include <cstddef>\r\n#include <cstdlib>\r\n#include <cstdint>\r\n#include <cassert>\r\n#include <cstring>\r\n#include <cstdio>\r\n#include <cstdarg>\r\n#include <ctime>\r\n#include <cmath>\r\n#include <climits>\r\n\r\n// C++ standard library\r\n#include <stdexcept>\r\n#include <new>\r\n#include <string>\r\n#include <string_view>\r\n#include <vector>\r\n#include <array>\r\n#include <map>\r\n#include <set>\r\n#include <forward_list>\r\n#include <optional>\r\n#include <algorithm>\r\n#include <iterator>\r\n#include <functional>\r\n#include <memory>\r\n#include <numeric>\r\n#include <chrono>\r\n#include <regex>\r\n#include <iostream>\r\n#include <sstream>\r\n#include <fstream>\r\n#include <iomanip>\r\n#include <atomic>\r\n#include <mutex>\r\n#include <thread>\r\n#include <future>\r\n\r\n// GTK headers\r\n#include <glib.h>\r\n#include <gmodule.h>\r\n#include <gdk/gdk.h>\r\n#include <gtk/gtk.h>\r\n#include <gdk/gdkkeysyms.h>\r\n#include <gdk/gdkwayland.h>\r\n#include <gtk/gtk-a11y.h>\r\n\r\n// Windows headers\r\n#include <windows.h>\r\n#include <commctrl.h>\r\n#include <richedit.h>\r\n#include <windowsx.h>\r\n#include <shellscalingapi.h>\r\n#include <zmouse.h>\r\n#include <ole2.h>\r\n#include <d2d1.h>\r\n#include <dwrite.h>\r\n\r\n// Cocoa headers\r\n#include <Cocoa/Cocoa.h>\r\n#import <Foundation/NSGeometry.h>\r\n#import <QuartzCore/CAGradientLayer.h>\r\n#import <QuartzCore/CAAnimation.h>\r\n#import <QuartzCore/CATransaction.h>\r\n\r\n// Scintilla headers\r\n\r\n// Non-platform-specific headers\r\n\r\n// Exported headers\r\n\r\n#include \"Sci_Position.h\"\r\n#include \"ScintillaTypes.h\"\r\n#include \"ScintillaMessages.h\"\r\n#include \"ScintillaStructures.h\"\r\n#include \"ILoader.h\"\r\n#include \"ILexer.h\"\r\n\r\n// src platform interface\r\n#include \"Debugging.h\"\r\n#include \"Geometry.h\"\r\n#include \"Platform.h\"\r\n\r\n#include \"Scintilla.h\"\r\n#include \"ScintillaWidget.h\"\r\n\r\n// src\r\n#include \"CharacterType.h\"\r\n#include \"CharacterCategoryMap.h\"\r\n#include \"Position.h\"\r\n#include \"UniqueString.h\"\r\n#include \"SplitVector.h\"\r\n#include \"Partitioning.h\"\r\n#include \"RunStyles.h\"\r\n#include \"SparseVector.h\"\r\n#include \"ContractionState.h\"\r\n#include \"ChangeHistory.h\"\r\n#include \"CellBuffer.h\"\r\n#include \"UndoHistory.h\"\r\n#include \"PerLine.h\"\r\n#include \"CallTip.h\"\r\n#include \"KeyMap.h\"\r\n#include \"Indicator.h\"\r\n#include \"XPM.h\"\r\n#include \"LineMarker.h\"\r\n#include \"Style.h\"\r\n#include \"ViewStyle.h\"\r\n#include \"CharClassify.h\"\r\n#include \"Decoration.h\"\r\n#include \"CaseFolder.h\"\r\n#include \"Document.h\"\r\n#include \"RESearch.h\"\r\n#include \"CaseConvert.h\"\r\n#include \"UniConversion.h\"\r\n#include \"DBCS.h\"\r\n#include \"Selection.h\"\r\n#include \"PositionCache.h\"\r\n#include \"EditModel.h\"\r\n#include \"MarginView.h\"\r\n#include \"EditView.h\"\r\n#include \"Editor.h\"\r\n#include \"ElapsedPeriod.h\"\r\n\r\n#include \"AutoComplete.h\"\r\n#include \"ScintillaBase.h\"\r\n\r\n// Platform-specific headers\r\n\r\n// win32\r\n#include \"WinTypes.h\"\r\n#include \"PlatWin.h\"\r\n#include \"HanjaDic.h\"\r\n#include \"ScintillaWin.h\"\r\n\r\n// gtk\r\n#include \"Wrappers.h\"\r\n#include \"ScintillaGTK.h\"\r\n#include \"scintilla-marshal.h\"\r\n#include \"ScintillaGTKAccessible.h\"\r\n#include \"Converter.h\"\r\n\r\n// cocoa\r\n#include \"QuartzTextStyle.h\"\r\n#include \"QuartzTextStyleAttribute.h\"\r\n#include \"QuartzTextLayout.h\"\r\n#import \"InfoBarCommunicator.h\"\r\n#include \"InfoBar.h\"\r\n#import \"ScintillaView.h\"\r\n#import \"ScintillaCocoa.h\"\r\n#import \"PlatCocoa.h\"\r\n\r\n// Catch testing framework\r\n#include \"catch.hpp\"\r\n\r\n"
  },
  {
    "path": "scintilla/scripts/LexGen.py",
    "content": "#!/usr/bin/env python3\r\n# LexGen.py - implemented 2002 by Neil Hodgson neilh@scintilla.org\r\n# Released to the public domain.\r\n\r\n# Update Scintilla files.\r\n# Update version numbers and modification dates in documentation and header files.\r\n# Update make dependencies.\r\n# Requires Python 3.6 or later\r\n\r\nfrom FileGenerator import UpdateLineInFile, ReplaceREInFile, UpdateLineInPlistFile\r\nimport ScintillaData\r\nimport HFacer\r\nimport os\r\nimport pathlib\r\nimport sys\r\n\r\nbaseDirectory = os.path.dirname(os.path.dirname(ScintillaData.__file__))\r\nsys.path.append(baseDirectory)\r\n\r\nimport win32.DepGen\r\nimport gtk.DepGen\r\n\r\ndef UpdateVersionNumbers(sci, root):\r\n    UpdateLineInFile(root / \"win32/ScintRes.rc\", \"#define VERSION_SCINTILLA\",\r\n        \"#define VERSION_SCINTILLA \\\"\" + sci.versionDotted + \"\\\"\")\r\n    UpdateLineInFile(root / \"win32/ScintRes.rc\", \"#define VERSION_WORDS\",\r\n        \"#define VERSION_WORDS \" + sci.versionCommad)\r\n    UpdateLineInFile(root / \"qt/ScintillaEditBase/ScintillaEditBase.pro\",\r\n        \"VERSION =\",\r\n        \"VERSION = \" + sci.versionDotted)\r\n    UpdateLineInFile(root / \"qt/ScintillaEdit/ScintillaEdit.pro\",\r\n        \"VERSION =\",\r\n        \"VERSION = \" + sci.versionDotted)\r\n    UpdateLineInFile(root / \"doc/ScintillaDownload.html\", \"       Release\",\r\n        \"       Release \" + sci.versionDotted)\r\n    ReplaceREInFile(root / \"doc/ScintillaDownload.html\",\r\n        r\"/www.scintilla.org/([a-zA-Z]+)\\d{3,5}\",\r\n        r\"/www.scintilla.org/\\g<1>\" +  sci.version,\r\n        0)\r\n    UpdateLineInFile(root / \"doc/index.html\",\r\n        '          <font color=\"#FFCC99\" size=\"3\"> Release version',\r\n        '          <font color=\"#FFCC99\" size=\"3\"> Release version ' +\\\r\n        sci.versionDotted + '<br />')\r\n    UpdateLineInFile(root / \"doc/index.html\",\r\n        '           Site last modified',\r\n        '           Site last modified ' + sci.mdyModified + '</font>')\r\n    UpdateLineInFile(root / \"doc/ScintillaHistory.html\",\r\n        '\tReleased ',\r\n        '\tReleased ' + sci.dmyModified + '.')\r\n\r\n    cocoa = root / \"cocoa\"\r\n\r\n    UpdateLineInPlistFile(cocoa / \"Scintilla\" / \"Info.plist\",\r\n        \"CFBundleShortVersionString\", sci.versionDotted)\r\n    ReplaceREInFile(cocoa / \"Scintilla\"/ \"Scintilla.xcodeproj\" / \"project.pbxproj\",\r\n        \"CURRENT_PROJECT_VERSION = [0-9.]+;\",\r\n        f'CURRENT_PROJECT_VERSION = {sci.versionDotted};',\r\n        0)\r\n\r\ndef RegenerateAll(rootDirectory):\r\n\r\n    root = pathlib.Path(rootDirectory)\r\n\r\n    scintillaBase = root.resolve()\r\n\r\n    sci = ScintillaData.ScintillaData(scintillaBase)\r\n\r\n    startDir = os.getcwd()\r\n    os.chdir(os.path.join(scintillaBase, \"win32\"))\r\n    win32.DepGen.Generate()\r\n    os.chdir(os.path.join(scintillaBase, \"gtk\"))\r\n    gtk.DepGen.Generate()\r\n    os.chdir(startDir)\r\n\r\n    UpdateVersionNumbers(sci, root)\r\n\r\n    HFacer.RegenerateAll(root, False)\r\n\r\nif __name__==\"__main__\":\r\n    RegenerateAll(pathlib.Path(__file__).resolve().parent.parent)\r\n"
  },
  {
    "path": "scintilla/scripts/ScintillaAPIFacer.py",
    "content": "#!/usr/bin/env python3\r\n# ScintillaAPIFacer.py - regenerate the ScintillaTypes.h, and ScintillaMessages.h\r\n# from the Scintilla.iface interface definition file.\r\n# Implemented 2019 by Neil Hodgson neilh@scintilla.org\r\n# Requires Python 3.6 or later\r\n\r\nimport pathlib\r\n\r\nimport Face\r\nimport FileGenerator\r\nimport HFacer\r\n\r\nnamespace = \"Scintilla::\"\r\n\r\ntypeAliases = {\r\n\t# Convert iface types to C++ types\r\n\t# bool and void are OK as is\r\n\t\"cells\": \"const char *\",\r\n\t\"colour\": \"Colour\",\r\n\t\"colouralpha\": \"ColourAlpha\",\r\n\t\"findtext\": \"void *\",\r\n\t\"findtextfull\": \"TextToFindFull *\",\r\n\t\"formatrange\": \"void *\",\r\n\t\"formatrangefull\": \"RangeToFormatFull *\",\r\n\t\"int\": \"int\",\r\n\t\"keymod\": \"int\",\r\n\t\"line\": \"Line\",\r\n\t\"pointer\": \"void *\",\r\n\t\"position\": \"Position\",\r\n\t\"string\": \"const char *\",\r\n\t\"stringresult\": \"char *\",\r\n\t\"textrange\": \"void *\",\r\n\t\"textrangefull\": \"TextRangeFull *\",\r\n}\r\n\r\nbasicTypes = [\r\n\t\"bool\",\r\n\t\"char *\",\r\n\t\"Colour\",\r\n\t\"ColourAlpha\",\r\n\t\"const char *\",\r\n\t\"int\",\r\n\t\"intptr_t\",\r\n\t\"Line\",\r\n\t\"Position\",\r\n\t\"void\",\r\n\t\"void *\",\r\n]\r\n\r\ndeadValues = [\r\n\t\"INDIC_CONTAINER\",\r\n\t\"INDIC_IME\",\r\n\t\"INDIC_IME_MAX\",\r\n\t\"INDIC_MAX\",\r\n]\r\n\r\ndef ActualTypeName(type, identifier=None):\r\n\tif type == \"pointer\" and identifier in [\"doc\", \"DocPointer\", \"CreateDocument\"]:\r\n\t\treturn \"IDocumentEditable *\"\r\n\telif type in typeAliases:\r\n\t\treturn typeAliases[type]\r\n\telse:\r\n\t\treturn type\r\n\r\ndef IsEnumeration(s):\r\n\tif s in [\"Position\", \"Line\", \"Colour\", \"ColourAlpha\"]:\r\n\t\treturn False\r\n\tif s.endswith(\"*\"):\r\n\t\treturn False\r\n\treturn s[:1].isupper()\r\n\r\ndef JoinTypeAndIdentifier(type, identifier):\r\n\t# Add a space to separate type from identifier unless type is pointer\r\n\tif type.endswith(\"*\"):\r\n\t\treturn type + identifier\r\n\telse:\r\n\t\treturn type + \" \" + identifier\r\n\r\ndef ParametersArgsCallname(v):\r\n\tparameters = \"\"\r\n\targs = \"\"\r\n\tcallName = \"Call\"\r\n\r\n\tparam1TypeBase = v[\"Param1Type\"]\r\n\tparam1Name = v[\"Param1Name\"]\r\n\tparam1Type = ActualTypeName(param1TypeBase, param1Name)\r\n\tparam1Arg = \"\"\r\n\tif param1Type:\r\n\t\tcastName = param1Name\r\n\t\tif param1Type.endswith(\"*\"):\r\n\t\t\tcastName = \"reinterpret_cast<uintptr_t>(\" + param1Name + \")\"\r\n\t\telif param1Type not in basicTypes:\r\n\t\t\tcastName = \"static_cast<uintptr_t>(\" + param1Name + \")\"\r\n\t\tif IsEnumeration(param1TypeBase):\r\n\t\t\tparam1Type = namespace + param1Type\r\n\t\tparam1Arg = JoinTypeAndIdentifier(param1Type, param1Name)\r\n\t\tparameters = param1Arg\r\n\t\targs = castName\r\n\r\n\tparam2TypeBase = v[\"Param2Type\"]\r\n\tparam2Name = v[\"Param2Name\"]\r\n\tparam2Type = ActualTypeName(param2TypeBase, param2Name)\r\n\tparam2Arg = \"\"\r\n\tif param2Type:\r\n\t\tcastName = param2Name\r\n\t\tif param2Type.endswith(\"*\"):\r\n\t\t\tif param2Type == \"const char *\":\r\n\t\t\t\tcallName = \"CallString\"\r\n\t\t\telse:\r\n\t\t\t\tcallName = \"CallPointer\"\r\n\t\telif param2Type not in basicTypes:\r\n\t\t\tcastName = \"static_cast<intptr_t>(\" + param2Name + \")\"\r\n\t\tif IsEnumeration(param2TypeBase):\r\n\t\t\tparam2Type = namespace + param2Type\r\n\t\tparam2Arg = JoinTypeAndIdentifier(param2Type, param2Name)\r\n\t\tif param1Arg:\r\n\t\t\tparameters = parameters + \", \"\r\n\t\tparameters = parameters + param2Arg\r\n\t\tif not args:\r\n\t\t\targs = args + \"0\"\r\n\t\tif args:\r\n\t\t\targs = args + \", \"\r\n\t\targs = args + castName\r\n\r\n\tif args:\r\n\t\targs = \", \" + args\r\n\treturn (parameters, args, callName)\r\n\r\ndef ParametersExceptLast(parameters):\r\n\tif \",\" in parameters:\r\n\t\treturn parameters[:parameters.rfind(\",\")]\r\n\telse:\r\n\t\treturn \"\"\r\n\r\ndef HMessages(f):\r\n\tout = [\"enum class Message {\"]\r\n\tfor name in f.order:\r\n\t\tv = f.features[name]\r\n\t\tif v[\"Category\"] != \"Deprecated\":\r\n\t\t\tif v[\"FeatureType\"] in [\"fun\", \"get\", \"set\"]:\r\n\t\t\t\tout.append(\"\\t\" + name + \" = \" + v[\"Value\"] + \",\")\r\n\tout.append(\"};\")\r\n\treturn out\r\n\r\ndef HEnumerations(f):\r\n\tout = []\r\n\tfor name in f.order:\r\n\t\tv = f.features[name]\r\n\t\tif v[\"Category\"] != \"Deprecated\":\r\n\t\t\t# Only want non-deprecated enumerations and lexers are not part of Scintilla API\r\n\t\t\tif v[\"FeatureType\"] in [\"enu\"] and name != \"Lexer\":\r\n\t\t\t\tout.append(\"\")\r\n\t\t\t\tprefixes = v[\"Value\"].split()\r\n\t\t\t\t#out.append(\"enum class \" + name + \" {\" + \" // \" + \",\".join(prefixes))\r\n\t\t\t\tout.append(\"enum class \" + name + \" {\")\r\n\t\t\t\tfor valueName in f.order:\r\n\t\t\t\t\tprefixMatched = \"\"\r\n\t\t\t\t\tfor p in prefixes:\r\n\t\t\t\t\t\tif valueName.startswith(p) and valueName not in deadValues:\r\n\t\t\t\t\t\t\tprefixMatched = p\r\n\t\t\t\t\tif prefixMatched:\r\n\t\t\t\t\t\tvEnum = f.features[valueName]\r\n\t\t\t\t\t\tvalueNameNoPrefix = \"\"\r\n\t\t\t\t\t\tif valueName in f.aliases:\r\n\t\t\t\t\t\t\tvalueNameNoPrefix = f.aliases[valueName]\r\n\t\t\t\t\t\telse:\r\n\t\t\t\t\t\t\tvalueNameNoPrefix = valueName[len(prefixMatched):]\r\n\t\t\t\t\t\t\tif not valueNameNoPrefix:\t# Removed whole name\r\n\t\t\t\t\t\t\t\tvalueNameNoPrefix = valueName\r\n\t\t\t\t\t\t\tif valueNameNoPrefix.startswith(\"SC_\"):\r\n\t\t\t\t\t\t\t\tvalueNameNoPrefix = valueNameNoPrefix[len(\"SC_\"):]\r\n\t\t\t\t\t\tpascalName = Face.PascalCase(valueNameNoPrefix)\r\n\t\t\t\t\t\tout.append(\"\\t\" + pascalName + \" = \" + vEnum[\"Value\"] + \",\")\r\n\t\t\t\tout.append(\"};\")\r\n\r\n\tout.append(\"\")\r\n\tout.append(\"enum class Notification {\")\r\n\tfor name in f.order:\r\n\t\tv = f.features[name]\r\n\t\tif v[\"Category\"] != \"Deprecated\":\r\n\t\t\tif v[\"FeatureType\"] in [\"evt\"]:\r\n\t\t\t\tout.append(\"\\t\" + name + \" = \" + v[\"Value\"] + \",\")\r\n\tout.append(\"};\")\r\n\r\n\treturn out\r\n\r\ndef HConstants(f):\r\n\t# Constants not in an eumeration\r\n\tout = []\r\n\tallEnumPrefixes = [\r\n\t\t\"SCE_\", # Lexical styles\r\n\t\t\"SCI_\", # Message number allocation\r\n\t\t\"SCEN_\", # Notifications sent with WM_COMMAND\r\n\t]\r\n\tfor _n, v in f.features.items():\r\n\t\tif v[\"Category\"] != \"Deprecated\":\r\n\t\t\t# Only want non-deprecated enumerations and lexers are not part of Scintilla API\r\n\t\t\tif v[\"FeatureType\"] in [\"enu\"]:\r\n\t\t\t\tallEnumPrefixes.extend(v[\"Value\"].split())\r\n\tfor name in f.order:\r\n\t\tv = f.features[name]\r\n\t\tif v[\"Category\"] != \"Deprecated\":\r\n\t\t\t# Only want non-deprecated enumerations and lexers are not part of Scintilla API\r\n\t\t\tif v[\"FeatureType\"] in [\"val\"]:\r\n\t\t\t\thasPrefix = False\r\n\t\t\t\tfor prefix in allEnumPrefixes:\r\n\t\t\t\t\tif name.startswith(prefix):\r\n\t\t\t\t\t\thasPrefix = True\r\n\t\t\t\tif not hasPrefix:\r\n\t\t\t\t\tif name.startswith(\"SC_\"):\r\n\t\t\t\t\t\tname = name[3:]\r\n\t\t\t\t\ttype = \"int\"\r\n\t\t\t\t\tif name == \"INVALID_POSITION\":\r\n\t\t\t\t\t\ttype = \"Position\"\r\n\t\t\t\t\tout.append(\"constexpr \" + type + \" \" + Face.PascalCase(name) + \" = \" + v[\"Value\"] + \";\")\r\n\treturn out\r\n\r\ndef HMethods(f):\r\n\tout = []\r\n\tfor name in f.order:\r\n\t\tv = f.features[name]\r\n\t\tif v[\"Category\"] != \"Deprecated\":\r\n\t\t\tif v[\"FeatureType\"] in [\"fun\", \"get\", \"set\"]:\r\n\t\t\t\tif v[\"FeatureType\"] == \"get\" and name.startswith(\"Get\"):\r\n\t\t\t\t\tname = name[len(\"Get\"):]\r\n\t\t\t\tretType = ActualTypeName(v[\"ReturnType\"], name)\r\n\t\t\t\tif IsEnumeration(retType):\r\n\t\t\t\t\tretType = namespace + retType\r\n\t\t\t\tparameters, args, callName = ParametersArgsCallname(v)\r\n\r\n\t\t\t\tout.append(\"\\t\" + JoinTypeAndIdentifier(retType, name) + \"(\" + parameters + \");\")\r\n\r\n\t\t\t\t# Extra method for stringresult that returns std::string\r\n\t\t\t\tif v[\"Param2Type\"] == \"stringresult\":\r\n\t\t\t\t\tout.append(\"\\t\" + JoinTypeAndIdentifier(\"std::string\", name) + \\\r\n\t\t\t\t\t\t\"(\" + ParametersExceptLast(parameters) + \");\")\r\n\treturn out\r\n\r\ndef CXXMethods(f):\r\n\tout = []\r\n\tfor name in f.order:\r\n\t\tv = f.features[name]\r\n\t\tif v[\"Category\"] != \"Deprecated\":\r\n\t\t\tif v[\"FeatureType\"] in [\"fun\", \"get\", \"set\"]:\r\n\t\t\t\tmsgName = \"Message::\" + name\r\n\t\t\t\tif v[\"FeatureType\"] == \"get\" and name.startswith(\"Get\"):\r\n\t\t\t\t\tname = name[len(\"Get\"):]\r\n\t\t\t\tretType = ActualTypeName(v[\"ReturnType\"], name)\r\n\t\t\t\tparameters, args, callName = ParametersArgsCallname(v)\r\n\t\t\t\treturnIfNeeded = \"return \" if retType != \"void\" else \"\"\r\n\r\n\t\t\t\tout.append(JoinTypeAndIdentifier(retType, \"ScintillaCall::\" + name) + \"(\" + parameters + \")\" + \" {\")\r\n\t\t\t\tretCast = \"\"\r\n\t\t\t\tretCastEnd = \"\"\r\n\t\t\t\tif retType.endswith(\"*\"):\r\n\t\t\t\t\tretCast = \"reinterpret_cast<\" + retType + \">(\"\r\n\t\t\t\t\tretCastEnd = \")\"\r\n\t\t\t\telif retType not in basicTypes or retType in [\"int\", \"Colour\", \"ColourAlpha\"]:\r\n\t\t\t\t\tif IsEnumeration(retType):\r\n\t\t\t\t\t\tretType = namespace + retType\r\n\t\t\t\t\tretCast = \"static_cast<\" + retType + \">(\"\r\n\t\t\t\t\tretCastEnd = \")\"\r\n\t\t\t\tout.append(\"\\t\" + returnIfNeeded + retCast + callName + \"(\" + msgName + args + \")\" + retCastEnd + \";\")\r\n\t\t\t\tout.append(\"}\")\r\n\t\t\t\tout.append(\"\")\r\n\r\n\t\t\t\t# Extra method for stringresult that returns std::string\r\n\t\t\t\tif v[\"Param2Type\"] == \"stringresult\":\r\n\t\t\t\t\tparamList = ParametersExceptLast(parameters)\r\n\t\t\t\t\targList = ParametersExceptLast(args)\r\n\t\t\t\t\tout.append(JoinTypeAndIdentifier(\"std::string\", \"ScintillaCall::\" + name) + \\\r\n\t\t\t\t\t\t\"(\" + paramList + \") {\")\r\n\t\t\t\t\tout.append(\"\\treturn CallReturnString(\" + msgName + argList + \");\")\r\n\t\t\t\t\tout.append(\"}\")\r\n\t\t\t\t\tout.append(\"\")\r\n\r\n\treturn out\r\n\r\ndef RegenerateAll(root):\r\n\tHFacer.RegenerateAll(root, False)\r\n\tf = Face.Face()\r\n\tinclude = root / \"include\"\r\n\tf.ReadFromFile(include / \"Scintilla.iface\")\r\n\tFileGenerator.Regenerate(include / \"ScintillaMessages.h\", \"//\", HMessages(f))\r\n\tFileGenerator.Regenerate(include / \"ScintillaTypes.h\", \"//\", HEnumerations(f), HConstants(f))\r\n\tFileGenerator.Regenerate(include / \"ScintillaCall.h\", \"//\", HMethods(f))\r\n\tFileGenerator.Regenerate(root / \"call\" / \"ScintillaCall.cxx\", \"//\", CXXMethods(f))\r\n\r\nif __name__ == \"__main__\":\r\n\tRegenerateAll(pathlib.Path(__file__).resolve().parent.parent)\r\n"
  },
  {
    "path": "scintilla/scripts/ScintillaData.py",
    "content": "#!/usr/bin/env python3\r\n# ScintillaData.py - implemented 2013 by Neil Hodgson neilh@scintilla.org\r\n# Released to the public domain.\r\n\r\n# Common code used by Scintilla and SciTE for source file regeneration.\r\n# The ScintillaData object exposes information about Scintilla as properties:\r\n# Version properties\r\n#     version\r\n#     versionDotted\r\n#     versionCommad\r\n#\r\n# Date last modified\r\n#     dateModified\r\n#     yearModified\r\n#     mdyModified\r\n#     dmyModified\r\n#     myModified\r\n#\r\n# List of contributors\r\n#     credits\r\n\r\n# This file can be run to see the data it provides.\r\n# Requires Python 3.6 or later\r\n\r\nimport datetime, pathlib, sys\r\n\r\ndef FindCredits(historyFile, removeLinks=True):\r\n    credits = []\r\n    stage = 0\r\n    with historyFile.open(encoding=\"utf-8\") as f:\r\n        for line in f.readlines():\r\n            line = line.strip()\r\n            if stage == 0 and line == \"<table>\":\r\n                stage = 1\r\n            elif stage == 1 and line == \"</table>\":\r\n                stage = 2\r\n            if stage == 1 and line.startswith(\"<td>\"):\r\n                credit = line[4:-5]\r\n                if removeLinks and \"<a\" in line:\r\n                    title, _a, rest = credit.partition(\"<a href=\")\r\n                    urlplus, _bracket, end = rest.partition(\">\")\r\n                    name = end.split(\"<\")[0]\r\n                    url = urlplus[1:-1]\r\n                    credit = title.strip()\r\n                    if credit:\r\n                        credit += \" \"\r\n                    credit += name + \" \" + url\r\n                credits.append(credit)\r\n    return credits\r\n\r\nclass ScintillaData:\r\n    def __init__(self, scintillaRoot):\r\n        # Discover version information\r\n        self.version = (scintillaRoot / \"version.txt\").read_text().strip()\r\n        self.versionDotted = self.version[0:-2] + '.' + self.version[-2] + '.' + \\\r\n            self.version[-1]\r\n        self.versionCommad = self.versionDotted.replace(\".\", \", \") + ', 0'\r\n\r\n        with (scintillaRoot / \"doc\" / \"index.html\").open() as f:\r\n            self.dateModified = [d for d in f.readlines() if \"Date.Modified\" in d]\\\r\n                [0].split('\\\"')[3]\r\n            # 20130602\r\n            # index.html, SciTE.html\r\n            dtModified = datetime.datetime.strptime(self.dateModified, \"%Y%m%d\")\r\n            self.yearModified = self.dateModified[0:4]\r\n            monthModified = dtModified.strftime(\"%B\")\r\n            dayModified = \"%d\" % dtModified.day\r\n            self.mdyModified = monthModified + \" \" + dayModified + \" \" + self.yearModified\r\n            # May 22 2013\r\n            # index.html, SciTE.html\r\n            self.dmyModified = dayModified + \" \" + monthModified + \" \" + self.yearModified\r\n            # 22 May 2013\r\n            # ScintillaHistory.html -- only first should change\r\n            self.myModified = monthModified + \" \" + self.yearModified\r\n\r\n        self.credits = FindCredits(scintillaRoot / \"doc\" / \"ScintillaHistory.html\")\r\n\r\nif __name__==\"__main__\":\r\n    sci = ScintillaData(pathlib.Path(__file__).resolve().parent.parent)\r\n    print(\"Version   %s   %s   %s\" % (sci.version, sci.versionDotted, sci.versionCommad))\r\n    print(\"Date last modified    %s   %s   %s   %s   %s\" % (\r\n        sci.dateModified, sci.yearModified, sci.mdyModified, sci.dmyModified, sci.myModified))\r\n    print(\"Credits:\")\r\n    for c in sci.credits:\r\n        sys.stdout.buffer.write(b\"    \" + c.encode(\"utf-8\") + b\"\\n\")\r\n"
  },
  {
    "path": "scintilla/scripts/__init__.py",
    "content": ""
  },
  {
    "path": "scintilla/scripts/archive.sh",
    "content": "# Up to parent directory of scintilla\ncd ../..\n\n# Archive Scintilla to scintilla.tgz\nhg archive --repository scintilla scintilla.tgz\n"
  },
  {
    "path": "scintilla/src/AutoComplete.cxx",
    "content": "// Scintilla source code edit control\r\n/** @file AutoComplete.cxx\r\n ** Defines the auto completion list box.\r\n **/\r\n// Copyright 1998-2003 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#include <cstddef>\r\n#include <cstdlib>\r\n#include <cassert>\r\n#include <cstring>\r\n#include <cstdio>\r\n#include <cstdint>\r\n\r\n#include <stdexcept>\r\n#include <string>\r\n#include <string_view>\r\n#include <vector>\r\n#include <optional>\r\n#include <algorithm>\r\n#include <memory>\r\n\r\n#include \"ScintillaTypes.h\"\r\n#include \"ScintillaMessages.h\"\r\n\r\n#include \"Debugging.h\"\r\n#include \"Geometry.h\"\r\n#include \"Platform.h\"\r\n\r\n#include \"CharacterType.h\"\r\n#include \"Position.h\"\r\n#include \"AutoComplete.h\"\r\n\r\nusing namespace Scintilla;\r\nusing namespace Scintilla::Internal;\r\n\r\nAutoComplete::AutoComplete() :\r\n\tactive(false),\r\n\tseparator(' '),\r\n\ttypesep('?'),\r\n\tignoreCase(false),\r\n\tchooseSingle(false),\r\n\toptions(AutoCompleteOption::Normal),\r\n\tposStart(0),\r\n\tstartLen(0),\r\n\tcancelAtStartPos(true),\r\n\tautoHide(true),\r\n\tdropRestOfWord(false),\r\n\tignoreCaseBehaviour(CaseInsensitiveBehaviour::RespectCase),\r\n\twidthLBDefault(100),\r\n\theightLBDefault(100),\r\n\tautoSort(Ordering::PreSorted) {\r\n\tlb = ListBox::Allocate();\r\n}\r\n\r\nAutoComplete::~AutoComplete() {\r\n\tif (lb) {\r\n\t\tlb->Destroy();\r\n\t}\r\n}\r\n\r\nbool AutoComplete::Active() const noexcept {\r\n\treturn active;\r\n}\r\n\r\nvoid AutoComplete::Start(Window &parent, int ctrlID,\r\n\tSci::Position position, Point location, Sci::Position startLen_,\r\n\tint lineHeight, bool unicodeMode, Technology technology, ListOptions listOptions) {\r\n\tif (active) {\r\n\t\tCancel();\r\n\t}\r\n\tlb->SetOptions(listOptions);\r\n\tlb->Create(parent, ctrlID, location, lineHeight, unicodeMode, technology);\r\n\tlb->Clear();\r\n\tactive = true;\r\n\tstartLen = startLen_;\r\n\tposStart = position;\r\n}\r\n\r\nvoid AutoComplete::SetStopChars(const char *stopChars_) {\r\n\tstopChars = stopChars_;\r\n}\r\n\r\nbool AutoComplete::IsStopChar(char ch) const noexcept {\r\n\treturn ch && (stopChars.find(ch) != std::string::npos);\r\n}\r\n\r\nvoid AutoComplete::SetFillUpChars(const char *fillUpChars_) {\r\n\tfillUpChars = fillUpChars_;\r\n}\r\n\r\nbool AutoComplete::IsFillUpChar(char ch) const noexcept {\r\n\treturn ch && (fillUpChars.find(ch) != std::string::npos);\r\n}\r\n\r\nvoid AutoComplete::SetSeparator(char separator_) {\r\n\tseparator = separator_;\r\n}\r\n\r\nchar AutoComplete::GetSeparator() const noexcept {\r\n\treturn separator;\r\n}\r\n\r\nvoid AutoComplete::SetTypesep(char separator_) {\r\n\ttypesep = separator_;\r\n}\r\n\r\nchar AutoComplete::GetTypesep() const noexcept {\r\n\treturn typesep;\r\n}\r\n\r\nstruct Sorter {\r\n\tAutoComplete *ac;\r\n\tconst char *list;\r\n\tstd::vector<int> indices;\r\n\r\n\tSorter(AutoComplete *ac_, const char *list_) : ac(ac_), list(list_) {\r\n\t\tint i = 0;\r\n\t\tif (!list[i]) {\r\n\t\t\t// Empty list has a single empty member\r\n\t\t\tindices.push_back(i); // word start\r\n\t\t\tindices.push_back(i); // word end\r\n\t\t}\r\n\t\twhile (list[i]) {\r\n\t\t\tindices.push_back(i); // word start\r\n\t\t\twhile (list[i] != ac->GetTypesep() && list[i] != ac->GetSeparator() && list[i])\r\n\t\t\t\t++i;\r\n\t\t\tindices.push_back(i); // word end\r\n\t\t\tif (list[i] == ac->GetTypesep()) {\r\n\t\t\t\twhile (list[i] != ac->GetSeparator() && list[i])\r\n\t\t\t\t\t++i;\r\n\t\t\t}\r\n\t\t\tif (list[i] == ac->GetSeparator()) {\r\n\t\t\t\t++i;\r\n\t\t\t\t// preserve trailing separator as blank entry\r\n\t\t\t\tif (!list[i]) {\r\n\t\t\t\t\tindices.push_back(i);\r\n\t\t\t\t\tindices.push_back(i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tindices.push_back(i); // index of last position\r\n\t}\r\n\r\n\tbool operator()(int a, int b) noexcept {\r\n\t\tconst int lenA = indices[a * 2 + 1] - indices[a * 2];\r\n\t\tconst int lenB = indices[b * 2 + 1] - indices[b * 2];\r\n\t\tconst int len  = std::min(lenA, lenB);\r\n\t\tint cmp;\r\n\t\tif (ac->ignoreCase)\r\n\t\t\tcmp = CompareNCaseInsensitive(list + indices[a * 2], list + indices[b * 2], len);\r\n\t\telse\r\n\t\t\tcmp = strncmp(list + indices[a * 2], list + indices[b * 2], len);\r\n\t\tif (cmp == 0)\r\n\t\t\tcmp = lenA - lenB;\r\n\t\treturn cmp < 0;\r\n\t}\r\n};\r\n\r\nvoid AutoComplete::SetList(const char *list) {\r\n\tif (autoSort == Ordering::PreSorted) {\r\n\t\tlb->SetList(list, separator, typesep);\r\n\t\tsortMatrix.clear();\r\n\t\tfor (int i = 0; i < lb->Length(); ++i)\r\n\t\t\tsortMatrix.push_back(i);\r\n\t\treturn;\r\n\t}\r\n\r\n\tSorter IndexSort(this, list);\r\n\tsortMatrix.clear();\r\n\tfor (int i = 0; i < static_cast<int>(IndexSort.indices.size()) / 2; ++i)\r\n\t\tsortMatrix.push_back(i);\r\n\tstd::sort(sortMatrix.begin(), sortMatrix.end(), IndexSort);\r\n\tif (autoSort == Ordering::Custom || sortMatrix.size() < 2) {\r\n\t\tlb->SetList(list, separator, typesep);\r\n\t\tPLATFORM_ASSERT(lb->Length() == static_cast<int>(sortMatrix.size()));\r\n\t\treturn;\r\n\t}\r\n\r\n\tstd::string sortedList;\r\n\tchar item[maxItemLen];\r\n\tfor (size_t i = 0; i < sortMatrix.size(); ++i) {\r\n\t\tint wordLen = IndexSort.indices[sortMatrix[i] * 2 + 2] - IndexSort.indices[sortMatrix[i] * 2];\r\n\t\tif (wordLen > maxItemLen-2)\r\n\t\t\twordLen = maxItemLen - 2;\r\n\t\tmemcpy(item, list + IndexSort.indices[sortMatrix[i] * 2], wordLen);\r\n\t\tif ((i+1) == sortMatrix.size()) {\r\n\t\t\t// Last item so remove separator if present\r\n\t\t\tif ((wordLen > 0) && (item[wordLen-1] == separator))\r\n\t\t\t\twordLen--;\r\n\t\t} else {\r\n\t\t\t// Item before last needs a separator\r\n\t\t\tif ((wordLen == 0) || (item[wordLen-1] != separator)) {\r\n\t\t\t\titem[wordLen] = separator;\r\n\t\t\t\twordLen++;\r\n\t\t\t}\r\n\t\t}\r\n\t\titem[wordLen] = '\\0';\r\n\t\tsortedList += item;\r\n\t}\r\n\tfor (int i = 0; i < static_cast<int>(sortMatrix.size()); ++i)\r\n\t\tsortMatrix[i] = i;\r\n\tlb->SetList(sortedList.c_str(), separator, typesep);\r\n}\r\n\r\nint AutoComplete::GetSelection() const {\r\n\treturn lb->GetSelection();\r\n}\r\n\r\nstd::string AutoComplete::GetValue(int item) const {\r\n\treturn lb->GetValue(item);\r\n}\r\n\r\nvoid AutoComplete::Show(bool show) {\r\n\tlb->Show(show);\r\n\tif (show)\r\n\t\tlb->Select(0);\r\n}\r\n\r\nvoid AutoComplete::Cancel() noexcept {\r\n\tif (lb->Created()) {\r\n\t\tlb->Clear();\r\n\t\tlb->Destroy();\r\n\t\tactive = false;\r\n\t}\r\n}\r\n\r\n\r\nvoid AutoComplete::Move(int delta) {\r\n\tconst int count = lb->Length();\r\n\tint current = lb->GetSelection();\r\n\tcurrent += delta;\r\n\tif (current >= count)\r\n\t\tcurrent = count - 1;\r\n\tif (current < 0)\r\n\t\tcurrent = 0;\r\n\tlb->Select(current);\r\n}\r\n\r\nvoid AutoComplete::Select(const char *word) {\r\n\tconst size_t lenWord = strlen(word);\r\n\tint location = -1;\r\n\tint start = 0; // lower bound of the api array block to search\r\n\tint end = lb->Length() - 1; // upper bound of the api array block to search\r\n\twhile ((start <= end) && (location == -1)) { // Binary searching loop\r\n\t\tint pivot = (start + end) / 2;\r\n\t\tstd::string item = GetValue(sortMatrix[pivot]);\r\n\t\tint cond;\r\n\t\tif (ignoreCase)\r\n\t\t\tcond = CompareNCaseInsensitive(word, item.c_str(), lenWord);\r\n\t\telse\r\n\t\t\tcond = strncmp(word, item.c_str(), lenWord);\r\n\t\tif (!cond) {\r\n\t\t\t// Find first match\r\n\t\t\twhile (pivot > start) {\r\n\t\t\t\titem = lb->GetValue(sortMatrix[pivot-1]);\r\n\t\t\t\tif (ignoreCase)\r\n\t\t\t\t\tcond = CompareNCaseInsensitive(word, item.c_str(), lenWord);\r\n\t\t\t\telse\r\n\t\t\t\t\tcond = strncmp(word, item.c_str(), lenWord);\r\n\t\t\t\tif (0 != cond)\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t--pivot;\r\n\t\t\t}\r\n\t\t\tlocation = pivot;\r\n\t\t\tif (ignoreCase\r\n\t\t\t\t&& ignoreCaseBehaviour == CaseInsensitiveBehaviour::RespectCase) {\r\n\t\t\t\t// Check for exact-case match\r\n\t\t\t\tfor (; pivot <= end; pivot++) {\r\n\t\t\t\t\titem = lb->GetValue(sortMatrix[pivot]);\r\n\t\t\t\t\tif (!strncmp(word, item.c_str(), lenWord)) {\r\n\t\t\t\t\t\tlocation = pivot;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (CompareNCaseInsensitive(word, item.c_str(), lenWord))\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (cond < 0) {\r\n\t\t\tend = pivot - 1;\r\n\t\t} else { // cond > 0\r\n\t\t\tstart = pivot + 1;\r\n\t\t}\r\n\t}\r\n\tif (location == -1) {\r\n\t\tif (autoHide)\r\n\t\t\tCancel();\r\n\t\telse\r\n\t\t\tlb->Select(-1);\r\n\t} else {\r\n\t\tif (autoSort == Ordering::Custom) {\r\n\t\t\t// Check for a logically earlier match\r\n\t\t\tfor (int i = location + 1; i <= end; ++i) {\r\n\t\t\t\tstd::string item = lb->GetValue(sortMatrix[i]);\r\n\t\t\t\tif (CompareNCaseInsensitive(word, item.c_str(), lenWord))\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tif (sortMatrix[i] < sortMatrix[location] && !strncmp(word, item.c_str(), lenWord))\r\n\t\t\t\t\tlocation = i;\r\n\t\t\t}\r\n\t\t}\r\n\t\tlb->Select(sortMatrix[location]);\r\n\t}\r\n}\r\n\r\n"
  },
  {
    "path": "scintilla/src/AutoComplete.h",
    "content": "// Scintilla source code edit control\r\n/** @file AutoComplete.h\r\n ** Defines the auto completion list box.\r\n **/\r\n// Copyright 1998-2003 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef AUTOCOMPLETE_H\r\n#define AUTOCOMPLETE_H\r\n\r\nnamespace Scintilla::Internal {\r\n\r\n/**\r\n */\r\nclass AutoComplete {\r\n\tbool active;\r\n\tstd::string stopChars;\r\n\tstd::string fillUpChars;\r\n\tchar separator;\r\n\tchar typesep; // Type separator\r\n\tenum { maxItemLen=1000 };\r\n\tstd::vector<int> sortMatrix;\r\n\r\npublic:\r\n\r\n\tbool ignoreCase;\r\n\tbool chooseSingle;\r\n\tAutoCompleteOption options;\r\n\tstd::unique_ptr<ListBox> lb;\r\n\tSci::Position posStart;\r\n\tSci::Position startLen;\r\n\t/// Should autocompletion be cancelled if editor's currentPos <= startPos?\r\n\tbool cancelAtStartPos;\r\n\tbool autoHide;\r\n\tbool dropRestOfWord;\r\n\tScintilla::CaseInsensitiveBehaviour ignoreCaseBehaviour;\r\n\tint widthLBDefault;\r\n\tint heightLBDefault;\r\n\t/** Ordering::PreSorted:   Assume the list is presorted; selection will fail if it is not alphabetical<br />\r\n\t *  Ordering::PerformSort: Sort the list alphabetically; start up performance cost for sorting<br />\r\n\t *  Ordering::Custom:      Handle non-alphabetical entries; start up performance cost for generating a sorted lookup table\r\n\t */\r\n\tScintilla::Ordering autoSort;\r\n\r\n\tAutoComplete();\r\n\t// Deleted so AutoComplete objects can not be copied.\r\n\tAutoComplete(const AutoComplete &) = delete;\r\n\tAutoComplete(AutoComplete &&) = delete;\r\n\tAutoComplete &operator=(const AutoComplete &) = delete;\r\n\tAutoComplete &operator=(AutoComplete &&) = delete;\r\n\t~AutoComplete();\r\n\r\n\t/// Is the auto completion list displayed?\r\n\tbool Active() const noexcept;\r\n\r\n\t/// Display the auto completion list positioned to be near a character position\r\n\tvoid Start(Window &parent, int ctrlID, Sci::Position position, Point location,\r\n\t\tSci::Position startLen_, int lineHeight, bool unicodeMode, Scintilla::Technology technology,\r\n\t\tListOptions listOptions);\r\n\r\n\t/// The stop chars are characters which, when typed, cause the auto completion list to disappear\r\n\tvoid SetStopChars(const char *stopChars_);\r\n\tbool IsStopChar(char ch) const noexcept;\r\n\r\n\t/// The fillup chars are characters which, when typed, fill up the selected word\r\n\tvoid SetFillUpChars(const char *fillUpChars_);\r\n\tbool IsFillUpChar(char ch) const noexcept;\r\n\r\n\t/// The separator character is used when interpreting the list in SetList\r\n\tvoid SetSeparator(char separator_);\r\n\tchar GetSeparator() const noexcept;\r\n\r\n\t/// The typesep character is used for separating the word from the type\r\n\tvoid SetTypesep(char separator_);\r\n\tchar GetTypesep() const noexcept;\r\n\r\n\t/// The list string contains a sequence of words separated by the separator character\r\n\tvoid SetList(const char *list);\r\n\r\n\t/// Return the position of the currently selected list item\r\n\tint GetSelection() const;\r\n\r\n\t/// Return the value of an item in the list\r\n\tstd::string GetValue(int item) const;\r\n\r\n\tvoid Show(bool show);\r\n\tvoid Cancel() noexcept;\r\n\r\n\t/// Move the current list element by delta, scrolling appropriately\r\n\tvoid Move(int delta);\r\n\r\n\t/// Select a list element that starts with word as the current element\r\n\tvoid Select(const char *word);\r\n};\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/src/CallTip.cxx",
    "content": "// Scintilla source code edit control\r\n/** @file CallTip.cxx\r\n ** Code for displaying call tips.\r\n **/\r\n// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#include <cstddef>\r\n#include <cstdlib>\r\n#include <cassert>\r\n#include <cstring>\r\n#include <cstdio>\r\n#include <cmath>\r\n#include <cstdint>\r\n\r\n#include <stdexcept>\r\n#include <string>\r\n#include <string_view>\r\n#include <vector>\r\n#include <optional>\r\n#include <algorithm>\r\n#include <memory>\r\n\r\n#include \"ScintillaTypes.h\"\r\n#include \"ScintillaMessages.h\"\r\n\r\n#include \"Debugging.h\"\r\n#include \"Geometry.h\"\r\n#include \"Platform.h\"\r\n\r\n#include \"Position.h\"\r\n#include \"CallTip.h\"\r\n\r\nusing namespace Scintilla;\r\nusing namespace Scintilla::Internal;\r\n\r\nsize_t Chunk::Length() const noexcept {\r\n\treturn end - start;\r\n}\r\n\r\nnamespace {\r\n\r\n#ifdef __APPLE__\r\n// Archaic macOS colours for the default: black on light yellow\r\nconstexpr ColourRGBA colourTextAndArrow(black);\r\nconstexpr ColourRGBA colourBackground(0xff, 0xff, 0xc6);\r\n#else\r\n// Grey on white\r\nconstexpr ColourRGBA colourTextAndArrow(0x80, 0x80, 0x80);\r\nconstexpr ColourRGBA colourBackground(white);\r\n#endif\r\n\r\nconstexpr ColourRGBA silver(0xc0, 0xc0, 0xc0);\r\n\r\n}\r\n\r\nCallTip::CallTip() noexcept {\r\n\twCallTip = {};\r\n\tinCallTipMode = false;\r\n\tposStartCallTip = 0;\r\n\trectUp = PRectangle(0,0,0,0);\r\n\trectDown = PRectangle(0,0,0,0);\r\n\tlineHeight = 1;\r\n\toffsetMain = 0;\r\n\ttabSize = 0;\r\n\tabove = false;\r\n\tuseStyleCallTip = false;    // for backwards compatibility\r\n\r\n\tinsetX = 5;\r\n\twidthArrow = 14;\r\n\tborderHeight = 2; // Extra line for border and an empty line at top and bottom.\r\n\tverticalOffset = 1;\r\n\r\n\tcolourBG = colourBackground;\r\n\tcolourUnSel = colourTextAndArrow;\r\n\r\n\tcolourSel = ColourRGBA(0, 0, 0x80);\r\n\tcolourShade = black;\r\n\tcolourLight = silver;\r\n\tcodePage = 0;\r\n\tclickPlace = 0;\r\n}\r\n\r\nCallTip::~CallTip() {\r\n\twCallTip.Destroy();\r\n}\r\n\r\n// We ignore tabs unless a tab width has been set.\r\nbool CallTip::IsTabCharacter(char ch) const noexcept {\r\n\treturn (tabSize > 0) && (ch == '\\t');\r\n}\r\n\r\nint CallTip::NextTabPos(int x) const noexcept {\r\n\tif (tabSize > 0) {              // paranoia... not called unless this is true\r\n\t\tx -= insetX;                // position relative to text\r\n\t\tx = (x + tabSize) / tabSize;  // tab \"number\"\r\n\t\treturn tabSize*x + insetX;  // position of next tab\r\n\t} else {\r\n\t\treturn x + 1;                 // arbitrary\r\n\t}\r\n}\r\n\r\nnamespace {\r\n\r\n// Although this test includes 0, we should never see a \\0 character.\r\nconstexpr bool IsArrowCharacter(char ch) noexcept {\r\n\treturn (ch == 0) || (ch == '\\001') || (ch == '\\002');\r\n}\r\n\r\nvoid DrawArrow(Surface *surface, const PRectangle &rc, bool upArrow, ColourRGBA colourBG, ColourRGBA colourUnSel) {\r\n\tsurface->FillRectangle(rc, colourBG);\r\n\tconst PRectangle rcClientInner = Clamp(rc.Inset(1), Edge::right, rc.right - 2);\r\n\tsurface->FillRectangle(rcClientInner, colourUnSel);\r\n\r\n\tconst XYPOSITION width = std::floor(rcClientInner.Width());\r\n\tconst XYPOSITION halfWidth = std::floor(width / 2) - 1;\r\n\tconst XYPOSITION quarterWidth = std::floor(halfWidth / 2);\r\n\tconst XYPOSITION centreX = rcClientInner.left + width / 2;\r\n\tconst XYPOSITION centreY = std::floor((rcClientInner.top + rcClientInner.bottom) / 2);\r\n\r\n\tconstexpr XYPOSITION pixelMove = 0.0f;\r\n\tif (upArrow) {      // Up arrow\r\n\t\tconst Point pts[] = {\r\n\t\t\tPoint(centreX - halfWidth + pixelMove, centreY + quarterWidth + 0.5f),\r\n\t\t\tPoint(centreX + halfWidth + pixelMove, centreY + quarterWidth + 0.5f),\r\n\t\t\tPoint(centreX + pixelMove, centreY - halfWidth + quarterWidth + 0.5f),\r\n\t\t};\r\n\t\tsurface->Polygon(pts, std::size(pts), FillStroke(colourBG));\r\n\t} else {            // Down arrow\r\n\t\tconst Point pts[] = {\r\n\t\t\tPoint(centreX - halfWidth + pixelMove, centreY - quarterWidth + 0.5f),\r\n\t\t\tPoint(centreX + halfWidth + pixelMove, centreY - quarterWidth + 0.5f),\r\n\t\t\tPoint(centreX + pixelMove, centreY + halfWidth - quarterWidth + 0.5f),\r\n\t\t};\r\n\t\tsurface->Polygon(pts, std::size(pts), FillStroke(colourBG));\r\n\t}\r\n}\r\n\r\n}\r\n\r\n// Draw a section of the call tip that does not include \\n in one colour.\r\n// The text may include tabs or arrow characters.\r\nint CallTip::DrawChunk(Surface *surface, int x, std::string_view sv,\r\n\tint ytext, PRectangle rcClient, bool asHighlight, bool draw) {\r\n\r\n\tif (sv.empty()) {\r\n\t\treturn x;\r\n\t}\r\n\r\n\t// Divide the text into sections that are all text, or that are\r\n\t// single arrows or single tab characters (if tabSize > 0).\r\n\t// Start with single element 0 to simplify append checks.\r\n\tstd::vector<size_t> ends(1);\r\n\tfor (size_t i=0; i<sv.length(); i++) {\r\n\t\tif (IsArrowCharacter(sv[i]) || IsTabCharacter(sv[i])) {\r\n\t\t\tif (ends.back() != i)\r\n\t\t\t\tends.push_back(i);\r\n\t\t\tends.push_back(i+1);\r\n\t\t}\r\n\t}\r\n\tif (ends.back() != sv.length())\r\n\t\tends.push_back(sv.length());\r\n\tends.erase(ends.begin());\t// Remove initial 0.\r\n\r\n\tsize_t startSeg = 0;\r\n\tfor (const size_t endSeg : ends) {\r\n\t\tassert(endSeg > 0);\r\n\t\tint xEnd = 0;\r\n\t\tif (IsArrowCharacter(sv[startSeg])) {\r\n\t\t\txEnd = x + widthArrow;\r\n\t\t\tconst bool upArrow = sv[startSeg] == '\\001';\r\n\t\t\trcClient.left = static_cast<XYPOSITION>(x);\r\n\t\t\trcClient.right = static_cast<XYPOSITION>(xEnd);\r\n\t\t\tif (draw) {\r\n\t\t\t\tDrawArrow(surface, rcClient, upArrow, colourBG, colourUnSel);\r\n\t\t\t}\r\n\t\t\toffsetMain = xEnd;\r\n\t\t\tif (upArrow) {\r\n\t\t\t\trectUp = rcClient;\r\n\t\t\t} else {\r\n\t\t\t\trectDown = rcClient;\r\n\t\t\t}\r\n\t\t} else if (IsTabCharacter(sv[startSeg])) {\r\n\t\t\txEnd = NextTabPos(x);\r\n\t\t} else {\r\n\t\t\tconst std::string_view segText = sv.substr(startSeg, endSeg - startSeg);\r\n\t\t\txEnd = x + static_cast<int>(std::lround(surface->WidthText(font.get(), segText)));\r\n\t\t\tif (draw) {\r\n\t\t\t\trcClient.left = static_cast<XYPOSITION>(x);\r\n\t\t\t\trcClient.right = static_cast<XYPOSITION>(xEnd);\r\n\t\t\t\tsurface->DrawTextTransparent(rcClient, font.get(), static_cast<XYPOSITION>(ytext),\r\n\t\t\t\t\t\t\t\t\tsegText, asHighlight ? colourSel : colourUnSel);\r\n\t\t\t}\r\n\t\t}\r\n\t\tx = xEnd;\r\n\t\tstartSeg = endSeg;\r\n\t}\r\n\treturn x;\r\n}\r\n\r\nint CallTip::PaintContents(Surface *surfaceWindow, bool draw) {\r\n\tconst PRectangle rcClientPos = wCallTip.GetClientPosition();\r\n\tconst PRectangle rcClientSize(0.0f, 0.0f, rcClientPos.right - rcClientPos.left,\r\n\t                        rcClientPos.bottom - rcClientPos.top);\r\n\tPRectangle rcClient(1.0f, 1.0f, rcClientSize.right - 1, rcClientSize.bottom - 1);\r\n\r\n\t// To make a nice small call tip window, it is only sized to fit most normal characters without accents\r\n\tconst int ascent = static_cast<int>(std::round(surfaceWindow->Ascent(font.get()) - surfaceWindow->InternalLeading(font.get())));\r\n\r\n\t// For each line...\r\n\t// Draw the definition in three parts: before highlight, highlighted, after highlight\r\n\tint ytext = static_cast<int>(rcClient.top) + ascent + 1;\r\n\trcClient.bottom = ytext + surfaceWindow->Descent(font.get()) + 1;\r\n\tstd::string_view remaining(val);\r\n\tint maxWidth = 0;\r\n\tsize_t lineStart = 0;\r\n\twhile (!remaining.empty()) {\r\n\t\tconst std::string_view chunkVal = remaining.substr(0, remaining.find_first_of('\\n'));\r\n\t\tremaining.remove_prefix(chunkVal.length());\r\n\t\tif (!remaining.empty()) {\r\n\t\t\tremaining.remove_prefix(1);\t// Skip \\n\r\n\t\t}\r\n\r\n\t\tconst Chunk chunkLine(lineStart, lineStart + chunkVal.length());\r\n\t\tChunk chunkHighlight(\r\n\t\t\tstd::clamp(highlight.start, chunkLine.start, chunkLine.end),\r\n\t\t\tstd::clamp(highlight.end, chunkLine.start, chunkLine.end)\r\n\t\t);\r\n\t\tchunkHighlight.start -= lineStart;\r\n\t\tchunkHighlight.end -= lineStart;\r\n\r\n\t\tconst int top = ytext - ascent - 1;\r\n\t\trcClient.top = top;\r\n\r\n\t\tint x = insetX;     // start each line at this inset\r\n\r\n\t\tx = DrawChunk(surfaceWindow, x,\r\n\t\t\tchunkVal.substr(0, chunkHighlight.start),\r\n\t\t\tytext, rcClient, false, draw);\r\n\t\tx = DrawChunk(surfaceWindow, x,\r\n\t\t\tchunkVal.substr(chunkHighlight.start, chunkHighlight.Length()),\r\n\t\t\tytext, rcClient, true, draw);\r\n\t\tx = DrawChunk(surfaceWindow, x,\r\n\t\t\tchunkVal.substr(chunkHighlight.end),\r\n\t\t\tytext, rcClient, false, draw);\r\n\r\n\t\tytext += lineHeight;\r\n\t\trcClient.bottom += lineHeight;\r\n\t\tmaxWidth = std::max(maxWidth, x);\r\n\t\tlineStart += chunkVal.length() + 1;\r\n\t}\r\n\treturn maxWidth;\r\n}\r\n\r\nvoid CallTip::PaintCT(Surface *surfaceWindow) {\r\n\tif (val.empty())\r\n\t\treturn;\r\n\tconst PRectangle rcClientPos = wCallTip.GetClientPosition();\r\n\tconst PRectangle rcClientSize(0.0f, 0.0f, rcClientPos.right - rcClientPos.left,\r\n\t                        rcClientPos.bottom - rcClientPos.top);\r\n\tconst PRectangle rcClient(1.0f, 1.0f, rcClientSize.right - 1, rcClientSize.bottom - 1);\r\n\r\n\tsurfaceWindow->FillRectangle(rcClient, colourBG);\r\n\r\n\toffsetMain = insetX;    // initial alignment assuming no arrows\r\n\tPaintContents(surfaceWindow, true);\r\n\r\n#if !defined(__APPLE__) && !PLAT_CURSES\r\n\t// OSX doesn't put borders on \"help tags\"\r\n\t// Draw a raised border around the edges of the window\r\n\tconstexpr XYPOSITION border = 1.0f;\r\n\tsurfaceWindow->FillRectangle(Side(rcClientSize, Edge::left, border), colourLight);\r\n\tsurfaceWindow->FillRectangle(Side(rcClientSize, Edge::right, border), colourShade);\r\n\tsurfaceWindow->FillRectangle(Side(rcClientSize, Edge::bottom, border), colourShade);\r\n\tsurfaceWindow->FillRectangle(Side(rcClientSize, Edge::top, border), colourLight);\r\n#endif\r\n}\r\n\r\nvoid CallTip::MouseClick(Point pt) noexcept {\r\n\tclickPlace = 0;\r\n\tif (rectUp.Contains(pt))\r\n\t\tclickPlace = 1;\r\n\tif (rectDown.Contains(pt))\r\n\t\tclickPlace = 2;\r\n}\r\n\r\nPRectangle CallTip::CallTipStart(Sci::Position pos, Point pt, int textHeight, const char *defn,\r\n                                 int codePage_, Surface *surfaceMeasure, const std::shared_ptr<Font> &font_) {\r\n\tclickPlace = 0;\r\n\tval = defn;\r\n\tcodePage = codePage_;\r\n\thighlight = Chunk();\r\n\tinCallTipMode = true;\r\n\tposStartCallTip = pos;\r\n\tfont = font_;\r\n\t// Look for multiple lines in the text\r\n\t// Only support \\n here - simply means container must avoid \\r!\r\n\tconst int numLines = 1 + static_cast<int>(std::count(val.begin(), val.end(), '\\n'));\r\n\trectUp = PRectangle(0,0,0,0);\r\n\trectDown = PRectangle(0,0,0,0);\r\n\toffsetMain = insetX;            // changed to right edge of any arrows\r\n\tlineHeight = static_cast<int>(std::lround(surfaceMeasure->Height(font.get())));\r\n#if !PLAT_CURSES\r\n\twidthArrow = lineHeight * 9 / 10;\r\n#endif\r\n\tconst int width = PaintContents(surfaceMeasure, false) + insetX;\r\n\r\n\t// The returned\r\n\t// rectangle is aligned to the right edge of the last arrow encountered in\r\n\t// the tip text, else to the tip text left edge.\r\n\tconst int height = lineHeight * numLines - static_cast<int>(surfaceMeasure->InternalLeading(font.get())) + borderHeight * 2;\r\n\tif (above) {\r\n\t\treturn PRectangle(pt.x - offsetMain, pt.y - verticalOffset - height, pt.x + width - offsetMain, pt.y - verticalOffset);\r\n\t} else {\r\n\t\treturn PRectangle(pt.x - offsetMain, pt.y + verticalOffset + textHeight, pt.x + width - offsetMain, pt.y + verticalOffset + textHeight + height);\r\n\t}\r\n}\r\n\r\nvoid CallTip::CallTipCancel() noexcept {\r\n\tinCallTipMode = false;\r\n\tif (wCallTip.Created()) {\r\n\t\twCallTip.Destroy();\r\n\t}\r\n}\r\n\r\nvoid CallTip::SetHighlight(size_t start, size_t end) {\r\n\t// Avoid flashing by checking something has really changed\r\n\tif ((start != highlight.start) || (end != highlight.end)) {\r\n\t\thighlight.start = start;\r\n\t\thighlight.end = (end > start) ? end : start;\r\n\t\tif (wCallTip.Created()) {\r\n\t\t\twCallTip.InvalidateAll();\r\n\t\t}\r\n\t}\r\n}\r\n\r\n// Set the tab size (sizes > 0 enable the use of tabs). This also enables the\r\n// use of the StyleCallTip.\r\nvoid CallTip::SetTabSize(int tabSz) noexcept {\r\n\ttabSize = tabSz;\r\n\tuseStyleCallTip = true;\r\n}\r\n\r\n// Set the calltip position, below the text by default or if above is false\r\n// else above the text.\r\nvoid CallTip::SetPosition(bool aboveText) noexcept {\r\n\tabove = aboveText;\r\n}\r\n\r\nbool CallTip::UseStyleCallTip() const noexcept {\r\n\treturn useStyleCallTip;\r\n}\r\n\r\n// It might be better to have two access functions for this and to use\r\n// them for all settings of colours.\r\nvoid CallTip::SetForeBack(ColourRGBA fore, ColourRGBA back) noexcept {\r\n\tcolourBG = back;\r\n\tcolourUnSel = fore;\r\n}\r\n"
  },
  {
    "path": "scintilla/src/CallTip.h",
    "content": "// Scintilla source code edit control\r\n/** @file CallTip.h\r\n ** Interface to the call tip control.\r\n **/\r\n// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef CALLTIP_H\r\n#define CALLTIP_H\r\n\r\nnamespace Scintilla::Internal {\r\n\r\nstruct Chunk {\r\n\tsize_t start;\r\n\tsize_t end;\r\n\tconstexpr Chunk(size_t start_=0, size_t end_=0) noexcept : start(start_), end(end_) {\r\n\t\tassert(start <= end);\r\n\t}\r\n\tsize_t Length() const noexcept;\r\n};\r\n\r\n/**\r\n */\r\nclass CallTip {\r\n\tChunk highlight;    // character offset to start and end of highlighted text\r\n\tstd::string val;\r\n\tstd::shared_ptr<Font> font;\r\n\tPRectangle rectUp;      // rectangle of last up angle in the tip\r\n\tPRectangle rectDown;    // rectangle of last down arrow in the tip\r\n\tint lineHeight;         // vertical line spacing\r\n\tint offsetMain;         // The alignment point of the call tip\r\n\tint tabSize;            // Tab size in pixels, <=0 no TAB expand\r\n\tbool useStyleCallTip;   // if true, StyleCallTip should be used\r\n\tbool above;\t\t// if true, display calltip above text\r\n\r\n\tint DrawChunk(Surface *surface, int x, std::string_view sv,\r\n\t\tint ytext, PRectangle rcClient, bool asHighlight, bool draw);\r\n\tint PaintContents(Surface *surfaceWindow, bool draw);\r\n\tbool IsTabCharacter(char ch) const noexcept;\r\n\tint NextTabPos(int x) const noexcept;\r\n\r\npublic:\r\n\tWindow wCallTip;\r\n\tWindow wDraw;\r\n\tbool inCallTipMode;\r\n\tSci::Position posStartCallTip;\r\n\tColourRGBA colourBG;\r\n\tColourRGBA colourUnSel;\r\n\tColourRGBA colourSel;\r\n\tColourRGBA colourShade;\r\n\tColourRGBA colourLight;\r\n\tint codePage;\r\n\tint clickPlace;\r\n\r\n\tint insetX; // text inset in x from calltip border\r\n\tint widthArrow;\r\n\tint borderHeight;\r\n\tint verticalOffset; // pixel offset up or down of the calltip with respect to the line\r\n\r\n\tCallTip() noexcept;\r\n\t// Deleted so CallTip objects can not be copied.\r\n\tCallTip(const CallTip &) = delete;\r\n\tCallTip(CallTip &&) = delete;\r\n\tCallTip &operator=(const CallTip &) = delete;\r\n\tCallTip &operator=(CallTip &&) = delete;\r\n\t~CallTip();\r\n\r\n\tvoid PaintCT(Surface *surfaceWindow);\r\n\r\n\tvoid MouseClick(Point pt) noexcept;\r\n\r\n\t/// Setup the calltip and return a rectangle of the area required.\r\n\tPRectangle CallTipStart(Sci::Position pos, Point pt, int textHeight, const char *defn,\r\n\t\tint codePage_, Surface *surfaceMeasure, const std::shared_ptr<Font> &font_);\r\n\r\n\tvoid CallTipCancel() noexcept;\r\n\r\n\t/// Set a range of characters to be displayed in a highlight style.\r\n\t/// Commonly used to highlight the current parameter.\r\n\tvoid SetHighlight(size_t start, size_t end);\r\n\r\n\t/// Set the tab size in pixels for the call tip. 0 or -ve means no tab expand.\r\n\tvoid SetTabSize(int tabSz) noexcept;\r\n\r\n\t/// Set calltip position.\r\n\tvoid SetPosition(bool aboveText) noexcept;\r\n\r\n\t/// Used to determine which STYLE_xxxx to use for call tip information\r\n\tbool UseStyleCallTip() const noexcept;\r\n\r\n\t// Modify foreground and background colours\r\n\tvoid SetForeBack(ColourRGBA fore, ColourRGBA back) noexcept;\r\n};\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/src/CaseConvert.cxx",
    "content": "// Scintilla source code edit control\r\n// Encoding: UTF-8\r\n/** @file CaseConvert.cxx\r\n ** Case fold characters and convert them to upper or lower case.\r\n ** Tables automatically regenerated by scripts/GenerateCaseConvert.py\r\n ** Should only be rarely regenerated for new versions of Unicode.\r\n **/\r\n// Copyright 2013 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#include <cassert>\r\n#include <cstring>\r\n#include <cstdint>\r\n\r\n#include <stdexcept>\r\n#include <string>\r\n#include <string_view>\r\n#include <vector>\r\n#include <algorithm>\r\n\r\n#include \"CaseConvert.h\"\r\n#include \"UniConversion.h\"\r\n\r\nusing namespace Scintilla::Internal;\r\n\r\nnamespace {\r\n\t// Use an unnamed namespace to protect the declarations from name conflicts\r\n\r\n// Unicode code points are ordered by groups and follow patterns.\r\n// Most characters (pitch==1) are in ranges for a particular alphabet and their\r\n// upper case forms are a fixed distance away.\r\n// Another pattern (pitch==2) is where each lower case letter is preceded by\r\n// the upper case form. These are also grouped into ranges.\r\n\r\nconstexpr int symmetricCaseConversionRanges[] = {\r\n//lower, upper, range length, range pitch\r\n//++Autogenerated -- start of section automatically generated\r\n//**\\(\\*\\n\\)\r\n97,65,26,1,\r\n224,192,23,1,\r\n248,216,7,1,\r\n257,256,24,2,\r\n314,313,8,2,\r\n331,330,23,2,\r\n462,461,8,2,\r\n479,478,9,2,\r\n505,504,20,2,\r\n547,546,9,2,\r\n583,582,5,2,\r\n945,913,17,1,\r\n963,931,9,1,\r\n985,984,12,2,\r\n1072,1040,32,1,\r\n1104,1024,16,1,\r\n1121,1120,17,2,\r\n1163,1162,27,2,\r\n1218,1217,7,2,\r\n1233,1232,48,2,\r\n1377,1329,38,1,\r\n4304,7312,43,1,\r\n7681,7680,75,2,\r\n7841,7840,48,2,\r\n7936,7944,8,1,\r\n7952,7960,6,1,\r\n7968,7976,8,1,\r\n7984,7992,8,1,\r\n8000,8008,6,1,\r\n8032,8040,8,1,\r\n8560,8544,16,1,\r\n9424,9398,26,1,\r\n11312,11264,48,1,\r\n11393,11392,50,2,\r\n11520,4256,38,1,\r\n42561,42560,23,2,\r\n42625,42624,14,2,\r\n42787,42786,7,2,\r\n42803,42802,31,2,\r\n42879,42878,5,2,\r\n42903,42902,10,2,\r\n42933,42932,8,2,\r\n65345,65313,26,1,\r\n66600,66560,40,1,\r\n66776,66736,36,1,\r\n66967,66928,11,1,\r\n66979,66940,15,1,\r\n66995,66956,7,1,\r\n68800,68736,51,1,\r\n71872,71840,32,1,\r\n93792,93760,32,1,\r\n125218,125184,34,1,\r\n\r\n//--Autogenerated -- end of section automatically generated\r\n};\r\n\r\n// Code points that are symmetric but don't fit into a range of similar characters\r\n// are listed here.\r\n\r\nconstexpr int symmetricCaseConversions[] = {\r\n//lower, upper\r\n//++Autogenerated -- start of section automatically generated\r\n//**1 \\(\\*\\n\\)\r\n255,376,\r\n307,306,\r\n309,308,\r\n311,310,\r\n378,377,\r\n380,379,\r\n382,381,\r\n384,579,\r\n387,386,\r\n389,388,\r\n392,391,\r\n396,395,\r\n402,401,\r\n405,502,\r\n409,408,\r\n410,573,\r\n414,544,\r\n417,416,\r\n419,418,\r\n421,420,\r\n424,423,\r\n429,428,\r\n432,431,\r\n436,435,\r\n438,437,\r\n441,440,\r\n445,444,\r\n447,503,\r\n454,452,\r\n457,455,\r\n460,458,\r\n477,398,\r\n499,497,\r\n501,500,\r\n572,571,\r\n575,11390,\r\n576,11391,\r\n578,577,\r\n592,11375,\r\n593,11373,\r\n594,11376,\r\n595,385,\r\n596,390,\r\n598,393,\r\n599,394,\r\n601,399,\r\n603,400,\r\n604,42923,\r\n608,403,\r\n609,42924,\r\n611,404,\r\n613,42893,\r\n614,42922,\r\n616,407,\r\n617,406,\r\n618,42926,\r\n619,11362,\r\n620,42925,\r\n623,412,\r\n625,11374,\r\n626,413,\r\n629,415,\r\n637,11364,\r\n640,422,\r\n642,42949,\r\n643,425,\r\n647,42929,\r\n648,430,\r\n649,580,\r\n650,433,\r\n651,434,\r\n652,581,\r\n658,439,\r\n669,42930,\r\n670,42928,\r\n881,880,\r\n883,882,\r\n887,886,\r\n891,1021,\r\n892,1022,\r\n893,1023,\r\n940,902,\r\n941,904,\r\n942,905,\r\n943,906,\r\n972,908,\r\n973,910,\r\n974,911,\r\n983,975,\r\n1010,1017,\r\n1011,895,\r\n1016,1015,\r\n1019,1018,\r\n1231,1216,\r\n4349,7357,\r\n4350,7358,\r\n4351,7359,\r\n7545,42877,\r\n7549,11363,\r\n7566,42950,\r\n8017,8025,\r\n8019,8027,\r\n8021,8029,\r\n8023,8031,\r\n8048,8122,\r\n8049,8123,\r\n8050,8136,\r\n8051,8137,\r\n8052,8138,\r\n8053,8139,\r\n8054,8154,\r\n8055,8155,\r\n8056,8184,\r\n8057,8185,\r\n8058,8170,\r\n8059,8171,\r\n8060,8186,\r\n8061,8187,\r\n8112,8120,\r\n8113,8121,\r\n8144,8152,\r\n8145,8153,\r\n8160,8168,\r\n8161,8169,\r\n8165,8172,\r\n8526,8498,\r\n8580,8579,\r\n11361,11360,\r\n11365,570,\r\n11366,574,\r\n11368,11367,\r\n11370,11369,\r\n11372,11371,\r\n11379,11378,\r\n11382,11381,\r\n11500,11499,\r\n11502,11501,\r\n11507,11506,\r\n11559,4295,\r\n11565,4301,\r\n42874,42873,\r\n42876,42875,\r\n42892,42891,\r\n42897,42896,\r\n42899,42898,\r\n42900,42948,\r\n42952,42951,\r\n42954,42953,\r\n42961,42960,\r\n42967,42966,\r\n42969,42968,\r\n42998,42997,\r\n43859,42931,\r\n67003,66964,\r\n67004,66965,\r\n\r\n//--Autogenerated -- end of section automatically generated\r\n};\r\n\r\n// Characters that have complex case conversions are listed here.\r\n// This includes cases where more than one character is needed for a conversion,\r\n// folding is different to lowering, or (as appropriate) upper(lower(x)) != x or\r\n// lower(upper(x)) != x.\r\n\r\nconstexpr std::string_view complexCaseConversions =\r\n// Original | Folded | Upper | Lower |\r\n//++Autogenerated -- start of section automatically generated\r\n//**2 \\(\\*\\n\\)\r\n\"\\xc2\\xb5|\\xce\\xbc|\\xce\\x9c||\"\r\n\"\\xc3\\x9f|ss|SS||\"\r\n\"\\xc4\\xb0|i\\xcc\\x87||i\\xcc\\x87|\"\r\n\"\\xc4\\xb1||I||\"\r\n\"\\xc5\\x89|\\xca\\xbcn|\\xca\\xbcN||\"\r\n\"\\xc5\\xbf|s|S||\"\r\n\"\\xc7\\x85|\\xc7\\x86|\\xc7\\x84|\\xc7\\x86|\"\r\n\"\\xc7\\x88|\\xc7\\x89|\\xc7\\x87|\\xc7\\x89|\"\r\n\"\\xc7\\x8b|\\xc7\\x8c|\\xc7\\x8a|\\xc7\\x8c|\"\r\n\"\\xc7\\xb0|j\\xcc\\x8c|J\\xcc\\x8c||\"\r\n\"\\xc7\\xb2|\\xc7\\xb3|\\xc7\\xb1|\\xc7\\xb3|\"\r\n\"\\xcd\\x85|\\xce\\xb9|\\xce\\x99||\"\r\n\"\\xce\\x90|\\xce\\xb9\\xcc\\x88\\xcc\\x81|\\xce\\x99\\xcc\\x88\\xcc\\x81||\"\r\n\"\\xce\\xb0|\\xcf\\x85\\xcc\\x88\\xcc\\x81|\\xce\\xa5\\xcc\\x88\\xcc\\x81||\"\r\n\"\\xcf\\x82|\\xcf\\x83|\\xce\\xa3||\"\r\n\"\\xcf\\x90|\\xce\\xb2|\\xce\\x92||\"\r\n\"\\xcf\\x91|\\xce\\xb8|\\xce\\x98||\"\r\n\"\\xcf\\x95|\\xcf\\x86|\\xce\\xa6||\"\r\n\"\\xcf\\x96|\\xcf\\x80|\\xce\\xa0||\"\r\n\"\\xcf\\xb0|\\xce\\xba|\\xce\\x9a||\"\r\n\"\\xcf\\xb1|\\xcf\\x81|\\xce\\xa1||\"\r\n\"\\xcf\\xb4|\\xce\\xb8||\\xce\\xb8|\"\r\n\"\\xcf\\xb5|\\xce\\xb5|\\xce\\x95||\"\r\n\"\\xd6\\x87|\\xd5\\xa5\\xd6\\x82|\\xd4\\xb5\\xd5\\x92||\"\r\n\"\\xe1\\x8e\\xa0|||\\xea\\xad\\xb0|\"\r\n\"\\xe1\\x8e\\xa1|||\\xea\\xad\\xb1|\"\r\n\"\\xe1\\x8e\\xa2|||\\xea\\xad\\xb2|\"\r\n\"\\xe1\\x8e\\xa3|||\\xea\\xad\\xb3|\"\r\n\"\\xe1\\x8e\\xa4|||\\xea\\xad\\xb4|\"\r\n\"\\xe1\\x8e\\xa5|||\\xea\\xad\\xb5|\"\r\n\"\\xe1\\x8e\\xa6|||\\xea\\xad\\xb6|\"\r\n\"\\xe1\\x8e\\xa7|||\\xea\\xad\\xb7|\"\r\n\"\\xe1\\x8e\\xa8|||\\xea\\xad\\xb8|\"\r\n\"\\xe1\\x8e\\xa9|||\\xea\\xad\\xb9|\"\r\n\"\\xe1\\x8e\\xaa|||\\xea\\xad\\xba|\"\r\n\"\\xe1\\x8e\\xab|||\\xea\\xad\\xbb|\"\r\n\"\\xe1\\x8e\\xac|||\\xea\\xad\\xbc|\"\r\n\"\\xe1\\x8e\\xad|||\\xea\\xad\\xbd|\"\r\n\"\\xe1\\x8e\\xae|||\\xea\\xad\\xbe|\"\r\n\"\\xe1\\x8e\\xaf|||\\xea\\xad\\xbf|\"\r\n\"\\xe1\\x8e\\xb0|||\\xea\\xae\\x80|\"\r\n\"\\xe1\\x8e\\xb1|||\\xea\\xae\\x81|\"\r\n\"\\xe1\\x8e\\xb2|||\\xea\\xae\\x82|\"\r\n\"\\xe1\\x8e\\xb3|||\\xea\\xae\\x83|\"\r\n\"\\xe1\\x8e\\xb4|||\\xea\\xae\\x84|\"\r\n\"\\xe1\\x8e\\xb5|||\\xea\\xae\\x85|\"\r\n\"\\xe1\\x8e\\xb6|||\\xea\\xae\\x86|\"\r\n\"\\xe1\\x8e\\xb7|||\\xea\\xae\\x87|\"\r\n\"\\xe1\\x8e\\xb8|||\\xea\\xae\\x88|\"\r\n\"\\xe1\\x8e\\xb9|||\\xea\\xae\\x89|\"\r\n\"\\xe1\\x8e\\xba|||\\xea\\xae\\x8a|\"\r\n\"\\xe1\\x8e\\xbb|||\\xea\\xae\\x8b|\"\r\n\"\\xe1\\x8e\\xbc|||\\xea\\xae\\x8c|\"\r\n\"\\xe1\\x8e\\xbd|||\\xea\\xae\\x8d|\"\r\n\"\\xe1\\x8e\\xbe|||\\xea\\xae\\x8e|\"\r\n\"\\xe1\\x8e\\xbf|||\\xea\\xae\\x8f|\"\r\n\"\\xe1\\x8f\\x80|||\\xea\\xae\\x90|\"\r\n\"\\xe1\\x8f\\x81|||\\xea\\xae\\x91|\"\r\n\"\\xe1\\x8f\\x82|||\\xea\\xae\\x92|\"\r\n\"\\xe1\\x8f\\x83|||\\xea\\xae\\x93|\"\r\n\"\\xe1\\x8f\\x84|||\\xea\\xae\\x94|\"\r\n\"\\xe1\\x8f\\x85|||\\xea\\xae\\x95|\"\r\n\"\\xe1\\x8f\\x86|||\\xea\\xae\\x96|\"\r\n\"\\xe1\\x8f\\x87|||\\xea\\xae\\x97|\"\r\n\"\\xe1\\x8f\\x88|||\\xea\\xae\\x98|\"\r\n\"\\xe1\\x8f\\x89|||\\xea\\xae\\x99|\"\r\n\"\\xe1\\x8f\\x8a|||\\xea\\xae\\x9a|\"\r\n\"\\xe1\\x8f\\x8b|||\\xea\\xae\\x9b|\"\r\n\"\\xe1\\x8f\\x8c|||\\xea\\xae\\x9c|\"\r\n\"\\xe1\\x8f\\x8d|||\\xea\\xae\\x9d|\"\r\n\"\\xe1\\x8f\\x8e|||\\xea\\xae\\x9e|\"\r\n\"\\xe1\\x8f\\x8f|||\\xea\\xae\\x9f|\"\r\n\"\\xe1\\x8f\\x90|||\\xea\\xae\\xa0|\"\r\n\"\\xe1\\x8f\\x91|||\\xea\\xae\\xa1|\"\r\n\"\\xe1\\x8f\\x92|||\\xea\\xae\\xa2|\"\r\n\"\\xe1\\x8f\\x93|||\\xea\\xae\\xa3|\"\r\n\"\\xe1\\x8f\\x94|||\\xea\\xae\\xa4|\"\r\n\"\\xe1\\x8f\\x95|||\\xea\\xae\\xa5|\"\r\n\"\\xe1\\x8f\\x96|||\\xea\\xae\\xa6|\"\r\n\"\\xe1\\x8f\\x97|||\\xea\\xae\\xa7|\"\r\n\"\\xe1\\x8f\\x98|||\\xea\\xae\\xa8|\"\r\n\"\\xe1\\x8f\\x99|||\\xea\\xae\\xa9|\"\r\n\"\\xe1\\x8f\\x9a|||\\xea\\xae\\xaa|\"\r\n\"\\xe1\\x8f\\x9b|||\\xea\\xae\\xab|\"\r\n\"\\xe1\\x8f\\x9c|||\\xea\\xae\\xac|\"\r\n\"\\xe1\\x8f\\x9d|||\\xea\\xae\\xad|\"\r\n\"\\xe1\\x8f\\x9e|||\\xea\\xae\\xae|\"\r\n\"\\xe1\\x8f\\x9f|||\\xea\\xae\\xaf|\"\r\n\"\\xe1\\x8f\\xa0|||\\xea\\xae\\xb0|\"\r\n\"\\xe1\\x8f\\xa1|||\\xea\\xae\\xb1|\"\r\n\"\\xe1\\x8f\\xa2|||\\xea\\xae\\xb2|\"\r\n\"\\xe1\\x8f\\xa3|||\\xea\\xae\\xb3|\"\r\n\"\\xe1\\x8f\\xa4|||\\xea\\xae\\xb4|\"\r\n\"\\xe1\\x8f\\xa5|||\\xea\\xae\\xb5|\"\r\n\"\\xe1\\x8f\\xa6|||\\xea\\xae\\xb6|\"\r\n\"\\xe1\\x8f\\xa7|||\\xea\\xae\\xb7|\"\r\n\"\\xe1\\x8f\\xa8|||\\xea\\xae\\xb8|\"\r\n\"\\xe1\\x8f\\xa9|||\\xea\\xae\\xb9|\"\r\n\"\\xe1\\x8f\\xaa|||\\xea\\xae\\xba|\"\r\n\"\\xe1\\x8f\\xab|||\\xea\\xae\\xbb|\"\r\n\"\\xe1\\x8f\\xac|||\\xea\\xae\\xbc|\"\r\n\"\\xe1\\x8f\\xad|||\\xea\\xae\\xbd|\"\r\n\"\\xe1\\x8f\\xae|||\\xea\\xae\\xbe|\"\r\n\"\\xe1\\x8f\\xaf|||\\xea\\xae\\xbf|\"\r\n\"\\xe1\\x8f\\xb0|||\\xe1\\x8f\\xb8|\"\r\n\"\\xe1\\x8f\\xb1|||\\xe1\\x8f\\xb9|\"\r\n\"\\xe1\\x8f\\xb2|||\\xe1\\x8f\\xba|\"\r\n\"\\xe1\\x8f\\xb3|||\\xe1\\x8f\\xbb|\"\r\n\"\\xe1\\x8f\\xb4|||\\xe1\\x8f\\xbc|\"\r\n\"\\xe1\\x8f\\xb5|||\\xe1\\x8f\\xbd|\"\r\n\"\\xe1\\x8f\\xb8|\\xe1\\x8f\\xb0|\\xe1\\x8f\\xb0||\"\r\n\"\\xe1\\x8f\\xb9|\\xe1\\x8f\\xb1|\\xe1\\x8f\\xb1||\"\r\n\"\\xe1\\x8f\\xba|\\xe1\\x8f\\xb2|\\xe1\\x8f\\xb2||\"\r\n\"\\xe1\\x8f\\xbb|\\xe1\\x8f\\xb3|\\xe1\\x8f\\xb3||\"\r\n\"\\xe1\\x8f\\xbc|\\xe1\\x8f\\xb4|\\xe1\\x8f\\xb4||\"\r\n\"\\xe1\\x8f\\xbd|\\xe1\\x8f\\xb5|\\xe1\\x8f\\xb5||\"\r\n\"\\xe1\\xb2\\x80|\\xd0\\xb2|\\xd0\\x92||\"\r\n\"\\xe1\\xb2\\x81|\\xd0\\xb4|\\xd0\\x94||\"\r\n\"\\xe1\\xb2\\x82|\\xd0\\xbe|\\xd0\\x9e||\"\r\n\"\\xe1\\xb2\\x83|\\xd1\\x81|\\xd0\\xa1||\"\r\n\"\\xe1\\xb2\\x84|\\xd1\\x82|\\xd0\\xa2||\"\r\n\"\\xe1\\xb2\\x85|\\xd1\\x82|\\xd0\\xa2||\"\r\n\"\\xe1\\xb2\\x86|\\xd1\\x8a|\\xd0\\xaa||\"\r\n\"\\xe1\\xb2\\x87|\\xd1\\xa3|\\xd1\\xa2||\"\r\n\"\\xe1\\xb2\\x88|\\xea\\x99\\x8b|\\xea\\x99\\x8a||\"\r\n\"\\xe1\\xba\\x96|h\\xcc\\xb1|H\\xcc\\xb1||\"\r\n\"\\xe1\\xba\\x97|t\\xcc\\x88|T\\xcc\\x88||\"\r\n\"\\xe1\\xba\\x98|w\\xcc\\x8a|W\\xcc\\x8a||\"\r\n\"\\xe1\\xba\\x99|y\\xcc\\x8a|Y\\xcc\\x8a||\"\r\n\"\\xe1\\xba\\x9a|a\\xca\\xbe|A\\xca\\xbe||\"\r\n\"\\xe1\\xba\\x9b|\\xe1\\xb9\\xa1|\\xe1\\xb9\\xa0||\"\r\n\"\\xe1\\xba\\x9e|ss||\\xc3\\x9f|\"\r\n\"\\xe1\\xbd\\x90|\\xcf\\x85\\xcc\\x93|\\xce\\xa5\\xcc\\x93||\"\r\n\"\\xe1\\xbd\\x92|\\xcf\\x85\\xcc\\x93\\xcc\\x80|\\xce\\xa5\\xcc\\x93\\xcc\\x80||\"\r\n\"\\xe1\\xbd\\x94|\\xcf\\x85\\xcc\\x93\\xcc\\x81|\\xce\\xa5\\xcc\\x93\\xcc\\x81||\"\r\n\"\\xe1\\xbd\\x96|\\xcf\\x85\\xcc\\x93\\xcd\\x82|\\xce\\xa5\\xcc\\x93\\xcd\\x82||\"\r\n\"\\xe1\\xbe\\x80|\\xe1\\xbc\\x80\\xce\\xb9|\\xe1\\xbc\\x88\\xce\\x99||\"\r\n\"\\xe1\\xbe\\x81|\\xe1\\xbc\\x81\\xce\\xb9|\\xe1\\xbc\\x89\\xce\\x99||\"\r\n\"\\xe1\\xbe\\x82|\\xe1\\xbc\\x82\\xce\\xb9|\\xe1\\xbc\\x8a\\xce\\x99||\"\r\n\"\\xe1\\xbe\\x83|\\xe1\\xbc\\x83\\xce\\xb9|\\xe1\\xbc\\x8b\\xce\\x99||\"\r\n\"\\xe1\\xbe\\x84|\\xe1\\xbc\\x84\\xce\\xb9|\\xe1\\xbc\\x8c\\xce\\x99||\"\r\n\"\\xe1\\xbe\\x85|\\xe1\\xbc\\x85\\xce\\xb9|\\xe1\\xbc\\x8d\\xce\\x99||\"\r\n\"\\xe1\\xbe\\x86|\\xe1\\xbc\\x86\\xce\\xb9|\\xe1\\xbc\\x8e\\xce\\x99||\"\r\n\"\\xe1\\xbe\\x87|\\xe1\\xbc\\x87\\xce\\xb9|\\xe1\\xbc\\x8f\\xce\\x99||\"\r\n\"\\xe1\\xbe\\x88|\\xe1\\xbc\\x80\\xce\\xb9|\\xe1\\xbc\\x88\\xce\\x99|\\xe1\\xbe\\x80|\"\r\n\"\\xe1\\xbe\\x89|\\xe1\\xbc\\x81\\xce\\xb9|\\xe1\\xbc\\x89\\xce\\x99|\\xe1\\xbe\\x81|\"\r\n\"\\xe1\\xbe\\x8a|\\xe1\\xbc\\x82\\xce\\xb9|\\xe1\\xbc\\x8a\\xce\\x99|\\xe1\\xbe\\x82|\"\r\n\"\\xe1\\xbe\\x8b|\\xe1\\xbc\\x83\\xce\\xb9|\\xe1\\xbc\\x8b\\xce\\x99|\\xe1\\xbe\\x83|\"\r\n\"\\xe1\\xbe\\x8c|\\xe1\\xbc\\x84\\xce\\xb9|\\xe1\\xbc\\x8c\\xce\\x99|\\xe1\\xbe\\x84|\"\r\n\"\\xe1\\xbe\\x8d|\\xe1\\xbc\\x85\\xce\\xb9|\\xe1\\xbc\\x8d\\xce\\x99|\\xe1\\xbe\\x85|\"\r\n\"\\xe1\\xbe\\x8e|\\xe1\\xbc\\x86\\xce\\xb9|\\xe1\\xbc\\x8e\\xce\\x99|\\xe1\\xbe\\x86|\"\r\n\"\\xe1\\xbe\\x8f|\\xe1\\xbc\\x87\\xce\\xb9|\\xe1\\xbc\\x8f\\xce\\x99|\\xe1\\xbe\\x87|\"\r\n\"\\xe1\\xbe\\x90|\\xe1\\xbc\\xa0\\xce\\xb9|\\xe1\\xbc\\xa8\\xce\\x99||\"\r\n\"\\xe1\\xbe\\x91|\\xe1\\xbc\\xa1\\xce\\xb9|\\xe1\\xbc\\xa9\\xce\\x99||\"\r\n\"\\xe1\\xbe\\x92|\\xe1\\xbc\\xa2\\xce\\xb9|\\xe1\\xbc\\xaa\\xce\\x99||\"\r\n\"\\xe1\\xbe\\x93|\\xe1\\xbc\\xa3\\xce\\xb9|\\xe1\\xbc\\xab\\xce\\x99||\"\r\n\"\\xe1\\xbe\\x94|\\xe1\\xbc\\xa4\\xce\\xb9|\\xe1\\xbc\\xac\\xce\\x99||\"\r\n\"\\xe1\\xbe\\x95|\\xe1\\xbc\\xa5\\xce\\xb9|\\xe1\\xbc\\xad\\xce\\x99||\"\r\n\"\\xe1\\xbe\\x96|\\xe1\\xbc\\xa6\\xce\\xb9|\\xe1\\xbc\\xae\\xce\\x99||\"\r\n\"\\xe1\\xbe\\x97|\\xe1\\xbc\\xa7\\xce\\xb9|\\xe1\\xbc\\xaf\\xce\\x99||\"\r\n\"\\xe1\\xbe\\x98|\\xe1\\xbc\\xa0\\xce\\xb9|\\xe1\\xbc\\xa8\\xce\\x99|\\xe1\\xbe\\x90|\"\r\n\"\\xe1\\xbe\\x99|\\xe1\\xbc\\xa1\\xce\\xb9|\\xe1\\xbc\\xa9\\xce\\x99|\\xe1\\xbe\\x91|\"\r\n\"\\xe1\\xbe\\x9a|\\xe1\\xbc\\xa2\\xce\\xb9|\\xe1\\xbc\\xaa\\xce\\x99|\\xe1\\xbe\\x92|\"\r\n\"\\xe1\\xbe\\x9b|\\xe1\\xbc\\xa3\\xce\\xb9|\\xe1\\xbc\\xab\\xce\\x99|\\xe1\\xbe\\x93|\"\r\n\"\\xe1\\xbe\\x9c|\\xe1\\xbc\\xa4\\xce\\xb9|\\xe1\\xbc\\xac\\xce\\x99|\\xe1\\xbe\\x94|\"\r\n\"\\xe1\\xbe\\x9d|\\xe1\\xbc\\xa5\\xce\\xb9|\\xe1\\xbc\\xad\\xce\\x99|\\xe1\\xbe\\x95|\"\r\n\"\\xe1\\xbe\\x9e|\\xe1\\xbc\\xa6\\xce\\xb9|\\xe1\\xbc\\xae\\xce\\x99|\\xe1\\xbe\\x96|\"\r\n\"\\xe1\\xbe\\x9f|\\xe1\\xbc\\xa7\\xce\\xb9|\\xe1\\xbc\\xaf\\xce\\x99|\\xe1\\xbe\\x97|\"\r\n\"\\xe1\\xbe\\xa0|\\xe1\\xbd\\xa0\\xce\\xb9|\\xe1\\xbd\\xa8\\xce\\x99||\"\r\n\"\\xe1\\xbe\\xa1|\\xe1\\xbd\\xa1\\xce\\xb9|\\xe1\\xbd\\xa9\\xce\\x99||\"\r\n\"\\xe1\\xbe\\xa2|\\xe1\\xbd\\xa2\\xce\\xb9|\\xe1\\xbd\\xaa\\xce\\x99||\"\r\n\"\\xe1\\xbe\\xa3|\\xe1\\xbd\\xa3\\xce\\xb9|\\xe1\\xbd\\xab\\xce\\x99||\"\r\n\"\\xe1\\xbe\\xa4|\\xe1\\xbd\\xa4\\xce\\xb9|\\xe1\\xbd\\xac\\xce\\x99||\"\r\n\"\\xe1\\xbe\\xa5|\\xe1\\xbd\\xa5\\xce\\xb9|\\xe1\\xbd\\xad\\xce\\x99||\"\r\n\"\\xe1\\xbe\\xa6|\\xe1\\xbd\\xa6\\xce\\xb9|\\xe1\\xbd\\xae\\xce\\x99||\"\r\n\"\\xe1\\xbe\\xa7|\\xe1\\xbd\\xa7\\xce\\xb9|\\xe1\\xbd\\xaf\\xce\\x99||\"\r\n\"\\xe1\\xbe\\xa8|\\xe1\\xbd\\xa0\\xce\\xb9|\\xe1\\xbd\\xa8\\xce\\x99|\\xe1\\xbe\\xa0|\"\r\n\"\\xe1\\xbe\\xa9|\\xe1\\xbd\\xa1\\xce\\xb9|\\xe1\\xbd\\xa9\\xce\\x99|\\xe1\\xbe\\xa1|\"\r\n\"\\xe1\\xbe\\xaa|\\xe1\\xbd\\xa2\\xce\\xb9|\\xe1\\xbd\\xaa\\xce\\x99|\\xe1\\xbe\\xa2|\"\r\n\"\\xe1\\xbe\\xab|\\xe1\\xbd\\xa3\\xce\\xb9|\\xe1\\xbd\\xab\\xce\\x99|\\xe1\\xbe\\xa3|\"\r\n\"\\xe1\\xbe\\xac|\\xe1\\xbd\\xa4\\xce\\xb9|\\xe1\\xbd\\xac\\xce\\x99|\\xe1\\xbe\\xa4|\"\r\n\"\\xe1\\xbe\\xad|\\xe1\\xbd\\xa5\\xce\\xb9|\\xe1\\xbd\\xad\\xce\\x99|\\xe1\\xbe\\xa5|\"\r\n\"\\xe1\\xbe\\xae|\\xe1\\xbd\\xa6\\xce\\xb9|\\xe1\\xbd\\xae\\xce\\x99|\\xe1\\xbe\\xa6|\"\r\n\"\\xe1\\xbe\\xaf|\\xe1\\xbd\\xa7\\xce\\xb9|\\xe1\\xbd\\xaf\\xce\\x99|\\xe1\\xbe\\xa7|\"\r\n\"\\xe1\\xbe\\xb2|\\xe1\\xbd\\xb0\\xce\\xb9|\\xe1\\xbe\\xba\\xce\\x99||\"\r\n\"\\xe1\\xbe\\xb3|\\xce\\xb1\\xce\\xb9|\\xce\\x91\\xce\\x99||\"\r\n\"\\xe1\\xbe\\xb4|\\xce\\xac\\xce\\xb9|\\xce\\x86\\xce\\x99||\"\r\n\"\\xe1\\xbe\\xb6|\\xce\\xb1\\xcd\\x82|\\xce\\x91\\xcd\\x82||\"\r\n\"\\xe1\\xbe\\xb7|\\xce\\xb1\\xcd\\x82\\xce\\xb9|\\xce\\x91\\xcd\\x82\\xce\\x99||\"\r\n\"\\xe1\\xbe\\xbc|\\xce\\xb1\\xce\\xb9|\\xce\\x91\\xce\\x99|\\xe1\\xbe\\xb3|\"\r\n\"\\xe1\\xbe\\xbe|\\xce\\xb9|\\xce\\x99||\"\r\n\"\\xe1\\xbf\\x82|\\xe1\\xbd\\xb4\\xce\\xb9|\\xe1\\xbf\\x8a\\xce\\x99||\"\r\n\"\\xe1\\xbf\\x83|\\xce\\xb7\\xce\\xb9|\\xce\\x97\\xce\\x99||\"\r\n\"\\xe1\\xbf\\x84|\\xce\\xae\\xce\\xb9|\\xce\\x89\\xce\\x99||\"\r\n\"\\xe1\\xbf\\x86|\\xce\\xb7\\xcd\\x82|\\xce\\x97\\xcd\\x82||\"\r\n\"\\xe1\\xbf\\x87|\\xce\\xb7\\xcd\\x82\\xce\\xb9|\\xce\\x97\\xcd\\x82\\xce\\x99||\"\r\n\"\\xe1\\xbf\\x8c|\\xce\\xb7\\xce\\xb9|\\xce\\x97\\xce\\x99|\\xe1\\xbf\\x83|\"\r\n\"\\xe1\\xbf\\x92|\\xce\\xb9\\xcc\\x88\\xcc\\x80|\\xce\\x99\\xcc\\x88\\xcc\\x80||\"\r\n\"\\xe1\\xbf\\x93|\\xce\\xb9\\xcc\\x88\\xcc\\x81|\\xce\\x99\\xcc\\x88\\xcc\\x81||\"\r\n\"\\xe1\\xbf\\x96|\\xce\\xb9\\xcd\\x82|\\xce\\x99\\xcd\\x82||\"\r\n\"\\xe1\\xbf\\x97|\\xce\\xb9\\xcc\\x88\\xcd\\x82|\\xce\\x99\\xcc\\x88\\xcd\\x82||\"\r\n\"\\xe1\\xbf\\xa2|\\xcf\\x85\\xcc\\x88\\xcc\\x80|\\xce\\xa5\\xcc\\x88\\xcc\\x80||\"\r\n\"\\xe1\\xbf\\xa3|\\xcf\\x85\\xcc\\x88\\xcc\\x81|\\xce\\xa5\\xcc\\x88\\xcc\\x81||\"\r\n\"\\xe1\\xbf\\xa4|\\xcf\\x81\\xcc\\x93|\\xce\\xa1\\xcc\\x93||\"\r\n\"\\xe1\\xbf\\xa6|\\xcf\\x85\\xcd\\x82|\\xce\\xa5\\xcd\\x82||\"\r\n\"\\xe1\\xbf\\xa7|\\xcf\\x85\\xcc\\x88\\xcd\\x82|\\xce\\xa5\\xcc\\x88\\xcd\\x82||\"\r\n\"\\xe1\\xbf\\xb2|\\xe1\\xbd\\xbc\\xce\\xb9|\\xe1\\xbf\\xba\\xce\\x99||\"\r\n\"\\xe1\\xbf\\xb3|\\xcf\\x89\\xce\\xb9|\\xce\\xa9\\xce\\x99||\"\r\n\"\\xe1\\xbf\\xb4|\\xcf\\x8e\\xce\\xb9|\\xce\\x8f\\xce\\x99||\"\r\n\"\\xe1\\xbf\\xb6|\\xcf\\x89\\xcd\\x82|\\xce\\xa9\\xcd\\x82||\"\r\n\"\\xe1\\xbf\\xb7|\\xcf\\x89\\xcd\\x82\\xce\\xb9|\\xce\\xa9\\xcd\\x82\\xce\\x99||\"\r\n\"\\xe1\\xbf\\xbc|\\xcf\\x89\\xce\\xb9|\\xce\\xa9\\xce\\x99|\\xe1\\xbf\\xb3|\"\r\n\"\\xe2\\x84\\xa6|\\xcf\\x89||\\xcf\\x89|\"\r\n\"\\xe2\\x84\\xaa|k||k|\"\r\n\"\\xe2\\x84\\xab|\\xc3\\xa5||\\xc3\\xa5|\"\r\n\"\\xea\\xad\\xb0|\\xe1\\x8e\\xa0|\\xe1\\x8e\\xa0||\"\r\n\"\\xea\\xad\\xb1|\\xe1\\x8e\\xa1|\\xe1\\x8e\\xa1||\"\r\n\"\\xea\\xad\\xb2|\\xe1\\x8e\\xa2|\\xe1\\x8e\\xa2||\"\r\n\"\\xea\\xad\\xb3|\\xe1\\x8e\\xa3|\\xe1\\x8e\\xa3||\"\r\n\"\\xea\\xad\\xb4|\\xe1\\x8e\\xa4|\\xe1\\x8e\\xa4||\"\r\n\"\\xea\\xad\\xb5|\\xe1\\x8e\\xa5|\\xe1\\x8e\\xa5||\"\r\n\"\\xea\\xad\\xb6|\\xe1\\x8e\\xa6|\\xe1\\x8e\\xa6||\"\r\n\"\\xea\\xad\\xb7|\\xe1\\x8e\\xa7|\\xe1\\x8e\\xa7||\"\r\n\"\\xea\\xad\\xb8|\\xe1\\x8e\\xa8|\\xe1\\x8e\\xa8||\"\r\n\"\\xea\\xad\\xb9|\\xe1\\x8e\\xa9|\\xe1\\x8e\\xa9||\"\r\n\"\\xea\\xad\\xba|\\xe1\\x8e\\xaa|\\xe1\\x8e\\xaa||\"\r\n\"\\xea\\xad\\xbb|\\xe1\\x8e\\xab|\\xe1\\x8e\\xab||\"\r\n\"\\xea\\xad\\xbc|\\xe1\\x8e\\xac|\\xe1\\x8e\\xac||\"\r\n\"\\xea\\xad\\xbd|\\xe1\\x8e\\xad|\\xe1\\x8e\\xad||\"\r\n\"\\xea\\xad\\xbe|\\xe1\\x8e\\xae|\\xe1\\x8e\\xae||\"\r\n\"\\xea\\xad\\xbf|\\xe1\\x8e\\xaf|\\xe1\\x8e\\xaf||\"\r\n\"\\xea\\xae\\x80|\\xe1\\x8e\\xb0|\\xe1\\x8e\\xb0||\"\r\n\"\\xea\\xae\\x81|\\xe1\\x8e\\xb1|\\xe1\\x8e\\xb1||\"\r\n\"\\xea\\xae\\x82|\\xe1\\x8e\\xb2|\\xe1\\x8e\\xb2||\"\r\n\"\\xea\\xae\\x83|\\xe1\\x8e\\xb3|\\xe1\\x8e\\xb3||\"\r\n\"\\xea\\xae\\x84|\\xe1\\x8e\\xb4|\\xe1\\x8e\\xb4||\"\r\n\"\\xea\\xae\\x85|\\xe1\\x8e\\xb5|\\xe1\\x8e\\xb5||\"\r\n\"\\xea\\xae\\x86|\\xe1\\x8e\\xb6|\\xe1\\x8e\\xb6||\"\r\n\"\\xea\\xae\\x87|\\xe1\\x8e\\xb7|\\xe1\\x8e\\xb7||\"\r\n\"\\xea\\xae\\x88|\\xe1\\x8e\\xb8|\\xe1\\x8e\\xb8||\"\r\n\"\\xea\\xae\\x89|\\xe1\\x8e\\xb9|\\xe1\\x8e\\xb9||\"\r\n\"\\xea\\xae\\x8a|\\xe1\\x8e\\xba|\\xe1\\x8e\\xba||\"\r\n\"\\xea\\xae\\x8b|\\xe1\\x8e\\xbb|\\xe1\\x8e\\xbb||\"\r\n\"\\xea\\xae\\x8c|\\xe1\\x8e\\xbc|\\xe1\\x8e\\xbc||\"\r\n\"\\xea\\xae\\x8d|\\xe1\\x8e\\xbd|\\xe1\\x8e\\xbd||\"\r\n\"\\xea\\xae\\x8e|\\xe1\\x8e\\xbe|\\xe1\\x8e\\xbe||\"\r\n\"\\xea\\xae\\x8f|\\xe1\\x8e\\xbf|\\xe1\\x8e\\xbf||\"\r\n\"\\xea\\xae\\x90|\\xe1\\x8f\\x80|\\xe1\\x8f\\x80||\"\r\n\"\\xea\\xae\\x91|\\xe1\\x8f\\x81|\\xe1\\x8f\\x81||\"\r\n\"\\xea\\xae\\x92|\\xe1\\x8f\\x82|\\xe1\\x8f\\x82||\"\r\n\"\\xea\\xae\\x93|\\xe1\\x8f\\x83|\\xe1\\x8f\\x83||\"\r\n\"\\xea\\xae\\x94|\\xe1\\x8f\\x84|\\xe1\\x8f\\x84||\"\r\n\"\\xea\\xae\\x95|\\xe1\\x8f\\x85|\\xe1\\x8f\\x85||\"\r\n\"\\xea\\xae\\x96|\\xe1\\x8f\\x86|\\xe1\\x8f\\x86||\"\r\n\"\\xea\\xae\\x97|\\xe1\\x8f\\x87|\\xe1\\x8f\\x87||\"\r\n\"\\xea\\xae\\x98|\\xe1\\x8f\\x88|\\xe1\\x8f\\x88||\"\r\n\"\\xea\\xae\\x99|\\xe1\\x8f\\x89|\\xe1\\x8f\\x89||\"\r\n\"\\xea\\xae\\x9a|\\xe1\\x8f\\x8a|\\xe1\\x8f\\x8a||\"\r\n\"\\xea\\xae\\x9b|\\xe1\\x8f\\x8b|\\xe1\\x8f\\x8b||\"\r\n\"\\xea\\xae\\x9c|\\xe1\\x8f\\x8c|\\xe1\\x8f\\x8c||\"\r\n\"\\xea\\xae\\x9d|\\xe1\\x8f\\x8d|\\xe1\\x8f\\x8d||\"\r\n\"\\xea\\xae\\x9e|\\xe1\\x8f\\x8e|\\xe1\\x8f\\x8e||\"\r\n\"\\xea\\xae\\x9f|\\xe1\\x8f\\x8f|\\xe1\\x8f\\x8f||\"\r\n\"\\xea\\xae\\xa0|\\xe1\\x8f\\x90|\\xe1\\x8f\\x90||\"\r\n\"\\xea\\xae\\xa1|\\xe1\\x8f\\x91|\\xe1\\x8f\\x91||\"\r\n\"\\xea\\xae\\xa2|\\xe1\\x8f\\x92|\\xe1\\x8f\\x92||\"\r\n\"\\xea\\xae\\xa3|\\xe1\\x8f\\x93|\\xe1\\x8f\\x93||\"\r\n\"\\xea\\xae\\xa4|\\xe1\\x8f\\x94|\\xe1\\x8f\\x94||\"\r\n\"\\xea\\xae\\xa5|\\xe1\\x8f\\x95|\\xe1\\x8f\\x95||\"\r\n\"\\xea\\xae\\xa6|\\xe1\\x8f\\x96|\\xe1\\x8f\\x96||\"\r\n\"\\xea\\xae\\xa7|\\xe1\\x8f\\x97|\\xe1\\x8f\\x97||\"\r\n\"\\xea\\xae\\xa8|\\xe1\\x8f\\x98|\\xe1\\x8f\\x98||\"\r\n\"\\xea\\xae\\xa9|\\xe1\\x8f\\x99|\\xe1\\x8f\\x99||\"\r\n\"\\xea\\xae\\xaa|\\xe1\\x8f\\x9a|\\xe1\\x8f\\x9a||\"\r\n\"\\xea\\xae\\xab|\\xe1\\x8f\\x9b|\\xe1\\x8f\\x9b||\"\r\n\"\\xea\\xae\\xac|\\xe1\\x8f\\x9c|\\xe1\\x8f\\x9c||\"\r\n\"\\xea\\xae\\xad|\\xe1\\x8f\\x9d|\\xe1\\x8f\\x9d||\"\r\n\"\\xea\\xae\\xae|\\xe1\\x8f\\x9e|\\xe1\\x8f\\x9e||\"\r\n\"\\xea\\xae\\xaf|\\xe1\\x8f\\x9f|\\xe1\\x8f\\x9f||\"\r\n\"\\xea\\xae\\xb0|\\xe1\\x8f\\xa0|\\xe1\\x8f\\xa0||\"\r\n\"\\xea\\xae\\xb1|\\xe1\\x8f\\xa1|\\xe1\\x8f\\xa1||\"\r\n\"\\xea\\xae\\xb2|\\xe1\\x8f\\xa2|\\xe1\\x8f\\xa2||\"\r\n\"\\xea\\xae\\xb3|\\xe1\\x8f\\xa3|\\xe1\\x8f\\xa3||\"\r\n\"\\xea\\xae\\xb4|\\xe1\\x8f\\xa4|\\xe1\\x8f\\xa4||\"\r\n\"\\xea\\xae\\xb5|\\xe1\\x8f\\xa5|\\xe1\\x8f\\xa5||\"\r\n\"\\xea\\xae\\xb6|\\xe1\\x8f\\xa6|\\xe1\\x8f\\xa6||\"\r\n\"\\xea\\xae\\xb7|\\xe1\\x8f\\xa7|\\xe1\\x8f\\xa7||\"\r\n\"\\xea\\xae\\xb8|\\xe1\\x8f\\xa8|\\xe1\\x8f\\xa8||\"\r\n\"\\xea\\xae\\xb9|\\xe1\\x8f\\xa9|\\xe1\\x8f\\xa9||\"\r\n\"\\xea\\xae\\xba|\\xe1\\x8f\\xaa|\\xe1\\x8f\\xaa||\"\r\n\"\\xea\\xae\\xbb|\\xe1\\x8f\\xab|\\xe1\\x8f\\xab||\"\r\n\"\\xea\\xae\\xbc|\\xe1\\x8f\\xac|\\xe1\\x8f\\xac||\"\r\n\"\\xea\\xae\\xbd|\\xe1\\x8f\\xad|\\xe1\\x8f\\xad||\"\r\n\"\\xea\\xae\\xbe|\\xe1\\x8f\\xae|\\xe1\\x8f\\xae||\"\r\n\"\\xea\\xae\\xbf|\\xe1\\x8f\\xaf|\\xe1\\x8f\\xaf||\"\r\n\"\\xef\\xac\\x80|ff|FF||\"\r\n\"\\xef\\xac\\x81|fi|FI||\"\r\n\"\\xef\\xac\\x82|fl|FL||\"\r\n\"\\xef\\xac\\x83|ffi|FFI||\"\r\n\"\\xef\\xac\\x84|ffl|FFL||\"\r\n\"\\xef\\xac\\x85|st|ST||\"\r\n\"\\xef\\xac\\x86|st|ST||\"\r\n\"\\xef\\xac\\x93|\\xd5\\xb4\\xd5\\xb6|\\xd5\\x84\\xd5\\x86||\"\r\n\"\\xef\\xac\\x94|\\xd5\\xb4\\xd5\\xa5|\\xd5\\x84\\xd4\\xb5||\"\r\n\"\\xef\\xac\\x95|\\xd5\\xb4\\xd5\\xab|\\xd5\\x84\\xd4\\xbb||\"\r\n\"\\xef\\xac\\x96|\\xd5\\xbe\\xd5\\xb6|\\xd5\\x8e\\xd5\\x86||\"\r\n\"\\xef\\xac\\x97|\\xd5\\xb4\\xd5\\xad|\\xd5\\x84\\xd4\\xbd||\"\r\n\r\n//--Autogenerated -- end of section automatically generated\r\n;\r\n\r\n// Maximum length of a case conversion result is 6 bytes in UTF-8\r\nconstexpr size_t maxConversionLength = 6;\r\n\r\nclass CaseConverter final : public ICaseConverter {\r\n\tstruct ConversionString {\r\n\t\tchar conversion[maxConversionLength+1]{};\r\n\t};\r\n\t// Conversions are initially store in a vector of structs but then decomposed into\r\n\t// parallel arrays as that is about 10% faster to search.\r\n\tstruct CharacterConversion {\r\n\t\tint character = 0;\r\n\t\tConversionString conversion;\r\n\t\t// Empty case: NUL -> \"\".\r\n\t\tCharacterConversion() noexcept = default;\r\n\t\tCharacterConversion(int character_, std::string_view conversion_) noexcept : character(character_) {\r\n\t\t\tassert(conversion_.length() <= maxConversionLength);\r\n\t\t\ttry {\r\n\t\t\t\t// This can never fail as std::string_view::copy should only throw\r\n\t\t\t\t// std::out_of_range if pos > size() and pos == 0 here\r\n\t\t\t\tconversion_.copy(conversion.conversion, conversion_.length());\r\n\t\t\t} catch (...) {\r\n\t\t\t\t// Ignore any exception\r\n\t\t\t}\r\n\t\t}\r\n\t\tbool operator<(const CharacterConversion &other) const noexcept {\r\n\t\t\treturn character < other.character;\r\n\t\t}\r\n\t};\r\n\ttypedef std::vector<CharacterConversion> CharacterToConversion;\r\n\tCharacterToConversion characterToConversion;\r\n\t// The parallel arrays\r\n\tstd::vector<int> characters;\r\n\tstd::vector<ConversionString> conversions;\r\n\r\npublic:\r\n\tCaseConverter() noexcept = default;\r\n\tbool Initialised() const noexcept {\r\n\t\treturn !characters.empty();\r\n\t}\r\n\tvoid Add(int character, std::string_view conversion_) {\r\n\t\tcharacterToConversion.emplace_back(character, conversion_);\r\n\t}\r\n\tconst char *Find(int character) {\r\n\t\tconst std::vector<int>::iterator it = std::lower_bound(characters.begin(), characters.end(), character);\r\n\t\tif (it == characters.end())\r\n\t\t\treturn nullptr;\r\n\t\telse if (*it == character)\r\n\t\t\treturn conversions[it - characters.begin()].conversion;\r\n\t\telse\r\n\t\t\treturn nullptr;\r\n\t}\r\n\tsize_t CaseConvertString(char *converted, size_t sizeConverted, const char *mixed, size_t lenMixed) override {\r\n\t\tsize_t lenConverted = 0;\r\n\t\tsize_t mixedPos = 0;\r\n\t\tunsigned char bytes[UTF8MaxBytes + 1]{};\r\n\t\twhile (mixedPos < lenMixed) {\r\n\t\t\tconst unsigned char leadByte = mixed[mixedPos];\r\n\t\t\tconst char *caseConverted = nullptr;\r\n\t\t\tsize_t lenMixedChar = 1;\r\n\t\t\tif (UTF8IsAscii(leadByte)) {\r\n\t\t\t\tcaseConverted = Find(leadByte);\r\n\t\t\t} else {\r\n\t\t\t\tbytes[0] = leadByte;\r\n\t\t\t\tconst int widthCharBytes = UTF8BytesOfLead[leadByte];\r\n\t\t\t\tfor (int b=1; b<widthCharBytes; b++) {\r\n\t\t\t\t\tbytes[b] = (mixedPos+b < lenMixed) ? mixed[mixedPos+b] : 0;\r\n\t\t\t\t}\r\n\t\t\t\tconst int classified = UTF8Classify(bytes, widthCharBytes);\r\n\t\t\t\tif (!(classified & UTF8MaskInvalid)) {\r\n\t\t\t\t\t// valid UTF-8\r\n\t\t\t\t\tlenMixedChar = classified & UTF8MaskWidth;\r\n\t\t\t\t\tconst int character = UnicodeFromUTF8(bytes);\r\n\t\t\t\t\tcaseConverted = Find(character);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (caseConverted) {\r\n\t\t\t\t// Character has a conversion so copy that conversion in\r\n\t\t\t\twhile (*caseConverted) {\r\n\t\t\t\t\tconverted[lenConverted++] = *caseConverted++;\r\n\t\t\t\t\tif (lenConverted >= sizeConverted)\r\n\t\t\t\t\t\treturn 0;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// Character has no conversion so copy the input to output\r\n\t\t\t\tfor (size_t i=0; i<lenMixedChar; i++) {\r\n\t\t\t\t\tconverted[lenConverted++] = mixed[mixedPos+i];\r\n\t\t\t\t\tif (lenConverted >= sizeConverted)\r\n\t\t\t\t\t\treturn 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tmixedPos += lenMixedChar;\r\n\t\t}\r\n\t\treturn lenConverted;\r\n\t}\r\n\tvoid FinishedAdding() {\r\n\t\tstd::sort(characterToConversion.begin(), characterToConversion.end());\r\n\t\tcharacters.reserve(characterToConversion.size());\r\n\t\tconversions.reserve(characterToConversion.size());\r\n\t\tfor (const CharacterConversion &chConv : characterToConversion) {\r\n\t\t\tcharacters.push_back(chConv.character);\r\n\t\t\tconversions.push_back(chConv.conversion);\r\n\t\t}\r\n\t\t// Empty the original calculated data completely\r\n\t\tCharacterToConversion().swap(characterToConversion);\r\n\t}\r\n\tvoid AddSymmetric(CaseConversion conversion, int lower, int upper);\r\n\tvoid SetupConversions(CaseConversion conversion);\r\n};\r\n\r\nCaseConverter caseConvList[3];\r\n\r\nvoid CaseConverter::AddSymmetric(CaseConversion conversion, int lower, int upper) {\r\n\tconst int character = (conversion == CaseConversion::upper) ? lower : upper;\r\n\tconst int source = (conversion == CaseConversion::upper) ? upper : lower;\r\n\tchar converted[maxConversionLength+1]{};\r\n\tUTF8FromUTF32Character(source, converted);\r\n\tAdd(character, converted);\r\n}\r\n\r\n// Return the next '|' separated field and remove from view.\r\nstd::string_view NextField(std::string_view &view) {\r\n\tconst size_t separatorPosition = view.find_first_of('|');\r\n\tconst std::string_view field = view.substr(0, separatorPosition);\r\n\tif (separatorPosition == std::string_view::npos) {\r\n\t\t// Reached the end so empty the view\r\n\t\tview.remove_prefix(view.length());\r\n\t} else {\r\n\t\t// Remove the '|' from the view as well as the field\r\n\t\tview.remove_prefix(separatorPosition + 1);\r\n\t}\r\n\treturn field;\r\n}\r\n\r\nvoid CaseConverter::SetupConversions(CaseConversion conversion) {\r\n\t// First initialize for the symmetric ranges\r\n\tfor (size_t i=0; i<std::size(symmetricCaseConversionRanges);) {\r\n\t\tconst int lower = symmetricCaseConversionRanges[i++];\r\n\t\tconst int upper = symmetricCaseConversionRanges[i++];\r\n\t\tconst int length = symmetricCaseConversionRanges[i++];\r\n\t\tconst int pitch = symmetricCaseConversionRanges[i++];\r\n\t\tfor (int j=0; j<length*pitch; j+=pitch) {\r\n\t\t\tAddSymmetric(conversion, lower+j, upper+j);\r\n\t\t}\r\n\t}\r\n\t// Add the symmetric singletons\r\n\tfor (size_t i=0; i<std::size(symmetricCaseConversions);) {\r\n\t\tconst int lower = symmetricCaseConversions[i++];\r\n\t\tconst int upper = symmetricCaseConversions[i++];\r\n\t\tAddSymmetric(conversion, lower, upper);\r\n\t}\r\n\t// Add the complex cases\r\n\tstd::string_view sComplex = complexCaseConversions;\r\n\twhile (!sComplex.empty()) {\r\n\t\tconst std::string_view originUTF8 = NextField(sComplex);\r\n\t\tconst std::string_view foldedUTF8 = NextField(sComplex);\r\n\t\tconst std::string_view upperUTF8 = NextField(sComplex);\r\n\t\tconst std::string_view lowerUTF8 = NextField(sComplex);\r\n\r\n\t\tstd::string_view converted;\r\n\t\tswitch (conversion) {\r\n\t\tcase CaseConversion::fold:\r\n\t\t\tconverted = foldedUTF8;\r\n\t\t\tbreak;\r\n\t\tcase CaseConversion::upper:\r\n\t\t\tconverted = upperUTF8;\r\n\t\t\tbreak;\r\n\t\tcase CaseConversion::lower:\r\n\t\tdefault:\r\n\t\t\tconverted = lowerUTF8;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tif (!converted.empty()) {\r\n\t\t\tconst int character = UnicodeFromUTF8(reinterpret_cast<const unsigned char *>(originUTF8.data()));\r\n\t\t\tAdd(character, converted);\r\n\t\t}\r\n\t}\r\n\r\n\tFinishedAdding();\r\n}\r\n\r\nCaseConverter *ConverterForConversion(CaseConversion conversion) {\r\n\tconst unsigned index = static_cast<unsigned>(conversion);\r\n\tassert(index < std::size(caseConvList));\r\n\tCaseConverter *pCaseConv = &caseConvList[index];\r\n\tif (!pCaseConv->Initialised()) {\r\n\t\tpCaseConv->SetupConversions(conversion);\r\n\t}\r\n\treturn pCaseConv;\r\n}\r\n\r\n}\r\n\r\nnamespace Scintilla::Internal {\r\n\r\nICaseConverter *ConverterFor(CaseConversion conversion) {\r\n\treturn ConverterForConversion(conversion);\r\n}\r\n\r\nconst char *CaseConvert(int character, CaseConversion conversion) {\r\n\tCaseConverter *pCaseConv = ConverterForConversion(conversion);\r\n\treturn pCaseConv->Find(character);\r\n}\r\n\r\nsize_t CaseConvertString(char *converted, size_t sizeConverted, const char *mixed, size_t lenMixed, CaseConversion conversion) {\r\n\tCaseConverter *pCaseConv = ConverterForConversion(conversion);\r\n\treturn pCaseConv->CaseConvertString(converted, sizeConverted, mixed, lenMixed);\r\n}\r\n\r\nstd::string CaseConvertString(const std::string &s, CaseConversion conversion) {\r\n\tstd::string retMapped(s.length() * maxExpansionCaseConversion, 0);\r\n\tconst size_t lenMapped = CaseConvertString(&retMapped[0], retMapped.length(), s.c_str(), s.length(),\r\n\t\tconversion);\r\n\tretMapped.resize(lenMapped);\r\n\treturn retMapped;\r\n}\r\n\r\n}\r\n"
  },
  {
    "path": "scintilla/src/CaseConvert.h",
    "content": "// Scintilla source code edit control\r\n// Encoding: UTF-8\r\n/** @file CaseConvert.h\r\n ** Performs Unicode case conversions.\r\n ** Does not handle locale-sensitive case conversion.\r\n **/\r\n// Copyright 2013 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef CASECONVERT_H\r\n#define CASECONVERT_H\r\n\r\nnamespace Scintilla::Internal {\r\n\r\nenum class CaseConversion {\r\n\tfold,\r\n\tupper,\r\n\tlower\r\n};\r\n\r\nclass ICaseConverter {\r\npublic:\r\n\tvirtual size_t CaseConvertString(char *converted, size_t sizeConverted, const char *mixed, size_t lenMixed) = 0;\r\n};\r\n\r\nICaseConverter *ConverterFor(CaseConversion conversion);\r\n\r\n// Returns a UTF-8 string. Empty when no conversion\r\nconst char *CaseConvert(int character, CaseConversion conversion);\r\n\r\n// When performing CaseConvertString, the converted value may be up to 3 times longer than the input.\r\n// Ligatures are often decomposed into multiple characters and long cases include:\r\n// ΐ \"\\xce\\x90\" folds to ΐ \"\\xce\\xb9\\xcc\\x88\\xcc\\x81\"\r\nconstexpr size_t maxExpansionCaseConversion = 3;\r\n\r\n// Converts a mixed case string using a particular conversion.\r\n// Result may be a different length to input and the length is the return value.\r\n// If there is not enough space then 0 is returned.\r\nsize_t CaseConvertString(char *converted, size_t sizeConverted, const char *mixed, size_t lenMixed, CaseConversion conversion);\r\n\r\n// Converts a mixed case string using a particular conversion.\r\nstd::string CaseConvertString(const std::string &s, CaseConversion conversion);\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/src/CaseFolder.cxx",
    "content": "// Scintilla source code edit control\r\n/** @file CaseFolder.cxx\r\n ** Classes for case folding.\r\n **/\r\n// Copyright 1998-2013 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#include <stdexcept>\r\n#include <vector>\r\n#include <algorithm>\r\n#include <cstdint>\r\n\r\n#include \"CharacterType.h\"\r\n#include \"CaseFolder.h\"\r\n#include \"CaseConvert.h\"\r\n\r\nusing namespace Scintilla::Internal;\r\n\r\nnamespace {\r\n\r\nconstexpr unsigned char IndexFromChar(char ch) {\r\n\treturn static_cast<unsigned char>(ch);\r\n}\r\n\r\n}\r\n\r\nCaseFolderTable::CaseFolderTable() noexcept : mapping{}  {\r\n\tStandardASCII();\r\n}\r\n\r\nsize_t CaseFolderTable::Fold(char *folded, size_t sizeFolded, const char *mixed, size_t lenMixed) {\r\n\tif (lenMixed > sizeFolded) {\r\n\t\treturn 0;\r\n\t}\r\n\tfor (size_t i=0; i<lenMixed; i++) {\r\n\t\tfolded[i] = mapping[IndexFromChar(mixed[i])];\r\n\t}\r\n\treturn lenMixed;\r\n}\r\n\r\nvoid CaseFolderTable::SetTranslation(char ch, char chTranslation) noexcept {\r\n\tmapping[IndexFromChar(ch)] = chTranslation;\r\n}\r\n\r\nvoid CaseFolderTable::StandardASCII() noexcept {\r\n\tfor (size_t iChar=0; iChar<std::size(mapping); iChar++) {\r\n\t\tmapping[iChar] = static_cast<char>(MakeLowerCase(iChar));\r\n\t}\r\n}\r\n\r\nCaseFolderUnicode::CaseFolderUnicode() {\r\n\tconverter = ConverterFor(CaseConversion::fold);\r\n}\r\n\r\nsize_t CaseFolderUnicode::Fold(char *folded, size_t sizeFolded, const char *mixed, size_t lenMixed) {\r\n\tif ((lenMixed == 1) && (sizeFolded > 0)) {\r\n\t\tfolded[0] = mapping[IndexFromChar(mixed[0])];\r\n\t\treturn 1;\r\n\t} else {\r\n\t\treturn converter->CaseConvertString(folded, sizeFolded, mixed, lenMixed);\r\n\t}\r\n}\r\n"
  },
  {
    "path": "scintilla/src/CaseFolder.h",
    "content": "// Scintilla source code edit control\r\n/** @file CaseFolder.h\r\n ** Classes for case folding.\r\n **/\r\n// Copyright 1998-2013 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef CASEFOLDER_H\r\n#define CASEFOLDER_H\r\n\r\nnamespace Scintilla::Internal {\r\n\r\nclass CaseFolder {\r\npublic:\r\n\tCaseFolder() = default;\r\n\t// Deleted so CaseFolder objects can not be copied.\r\n\tCaseFolder(const CaseFolder &source) = delete;\r\n\tCaseFolder(CaseFolder &&) = delete;\r\n\tCaseFolder &operator=(const CaseFolder &) = delete;\r\n\tCaseFolder &operator=(CaseFolder &&) = delete;\r\n\tvirtual ~CaseFolder() = default;\r\n\tvirtual size_t Fold(char *folded, size_t sizeFolded, const char *mixed, size_t lenMixed) = 0;\r\n};\r\n\r\nclass CaseFolderTable : public CaseFolder {\r\nprotected:\r\n\tchar mapping[256];\r\npublic:\r\n\tCaseFolderTable() noexcept;\r\n\tsize_t Fold(char *folded, size_t sizeFolded, const char *mixed, size_t lenMixed) override;\r\n\tvoid SetTranslation(char ch, char chTranslation) noexcept;\r\n\tvoid StandardASCII() noexcept;\r\n};\r\n\r\nclass ICaseConverter;\r\n\r\nclass CaseFolderUnicode : public CaseFolderTable {\r\n\tICaseConverter *converter;\r\npublic:\r\n\tCaseFolderUnicode();\r\n\tsize_t Fold(char *folded, size_t sizeFolded, const char *mixed, size_t lenMixed) override;\r\n};\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/src/CellBuffer.cxx",
    "content": "// Scintilla source code edit control\r\n/** @file CellBuffer.cxx\r\n ** Manages a buffer of cells.\r\n **/\r\n// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#include <cstddef>\r\n#include <cstdlib>\r\n#include <cassert>\r\n#include <cstring>\r\n#include <cstdio>\r\n#include <cstdarg>\r\n#include <climits>\r\n#include <cstdint>\r\n\r\n#include <stdexcept>\r\n#include <string>\r\n#include <string_view>\r\n#include <vector>\r\n#include <optional>\r\n#include <algorithm>\r\n#include <memory>\r\n\r\n#include \"ScintillaTypes.h\"\r\n\r\n#include \"Debugging.h\"\r\n\r\n#include \"Position.h\"\r\n#include \"SplitVector.h\"\r\n#include \"Partitioning.h\"\r\n#include \"RunStyles.h\"\r\n#include \"SparseVector.h\"\r\n#include \"ChangeHistory.h\"\r\n#include \"CellBuffer.h\"\r\n#include \"UndoHistory.h\"\r\n#include \"UniConversion.h\"\r\n\r\nnamespace Scintilla::Internal {\r\n\r\nstruct CountWidths {\r\n\t// Measures the number of characters in a string divided into those\r\n\t// from the Base Multilingual Plane and those from other planes.\r\n\tSci::Position countBasePlane;\r\n\tSci::Position countOtherPlanes;\r\n\texplicit CountWidths(Sci::Position countBasePlane_=0, Sci::Position countOtherPlanes_=0) noexcept :\r\n\t\tcountBasePlane(countBasePlane_),\r\n\t\tcountOtherPlanes(countOtherPlanes_) {\r\n\t}\r\n\tCountWidths operator-() const noexcept {\r\n\t\treturn CountWidths(-countBasePlane, -countOtherPlanes);\r\n\t}\r\n\tSci::Position WidthUTF32() const noexcept {\r\n\t\t// All code points take one code unit in UTF-32.\r\n\t\treturn countBasePlane + countOtherPlanes;\r\n\t}\r\n\tSci::Position WidthUTF16() const noexcept {\r\n\t\t// UTF-16 takes 2 code units for other planes\r\n\t\treturn countBasePlane + 2 * countOtherPlanes;\r\n\t}\r\n\tvoid CountChar(int lenChar) noexcept {\r\n\t\tif (lenChar == 4) {\r\n\t\t\tcountOtherPlanes++;\r\n\t\t} else {\r\n\t\t\tcountBasePlane++;\r\n\t\t}\r\n\t}\r\n};\r\n\r\nclass ILineVector {\r\npublic:\r\n\tvirtual void Init() = 0;\r\n\tvirtual void SetPerLine(PerLine *pl) noexcept = 0;\r\n\tvirtual void InsertText(Sci::Line line, Sci::Position delta) noexcept = 0;\r\n\tvirtual void InsertLine(Sci::Line line, Sci::Position position, bool lineStart) = 0;\r\n\tvirtual void InsertLines(Sci::Line line, const Sci::Position *positions, size_t lines, bool lineStart) = 0;\r\n\tvirtual void SetLineStart(Sci::Line line, Sci::Position position) noexcept = 0;\r\n\tvirtual void RemoveLine(Sci::Line line) = 0;\r\n\tvirtual Sci::Line Lines() const noexcept = 0;\r\n\tvirtual void AllocateLines(Sci::Line lines) = 0;\r\n\tvirtual Sci::Line LineFromPosition(Sci::Position pos) const noexcept = 0;\r\n\tvirtual Sci::Position LineStart(Sci::Line line) const noexcept = 0;\r\n\tvirtual void InsertCharacters(Sci::Line line, CountWidths delta) noexcept = 0;\r\n\tvirtual void SetLineCharactersWidth(Sci::Line line, CountWidths width) noexcept = 0;\r\n\tvirtual Scintilla::LineCharacterIndexType LineCharacterIndex() const noexcept = 0;\r\n\tvirtual bool AllocateLineCharacterIndex(Scintilla::LineCharacterIndexType lineCharacterIndex, Sci::Line lines) = 0;\r\n\tvirtual bool ReleaseLineCharacterIndex(Scintilla::LineCharacterIndexType lineCharacterIndex) = 0;\r\n\tvirtual Sci::Position IndexLineStart(Sci::Line line, Scintilla::LineCharacterIndexType lineCharacterIndex) const noexcept = 0;\r\n\tvirtual Sci::Line LineFromPositionIndex(Sci::Position pos, Scintilla::LineCharacterIndexType lineCharacterIndex) const noexcept = 0;\r\n\tvirtual ~ILineVector() {}\r\n};\r\n\r\n}\r\n\r\nusing namespace Scintilla;\r\nusing namespace Scintilla::Internal;\r\n\r\ntemplate <typename POS>\r\nclass LineStartIndex {\r\n\t// line_cast(): cast Sci::Line to either 32-bit or 64-bit value\r\n\t// This avoids warnings from Visual C++ Code Analysis and shortens code\r\n\tstatic constexpr POS line_cast(Sci::Line pos) noexcept {\r\n\t\treturn static_cast<POS>(pos);\r\n\t}\r\npublic:\r\n\tint refCount;\r\n\tPartitioning<POS> starts;\r\n\r\n\tLineStartIndex() : refCount(0), starts(4) {\r\n\t\t// Minimal initial allocation\r\n\t}\r\n\tbool Allocate(Sci::Line lines) {\r\n\t\trefCount++;\r\n\t\tSci::Position length = starts.PositionFromPartition(starts.Partitions());\r\n\t\tfor (Sci::Line line = starts.Partitions(); line < lines; line++) {\r\n\t\t\t// Produce an ascending sequence that will be filled in with correct widths later\r\n\t\t\tlength++;\r\n\t\t\tstarts.InsertPartition(line_cast(line), line_cast(length));\r\n\t\t}\r\n\t\treturn refCount == 1;\r\n\t}\r\n\tbool Release() {\r\n\t\tif (refCount == 1) {\r\n\t\t\tstarts.DeleteAll();\r\n\t\t}\r\n\t\trefCount--;\r\n\t\treturn refCount == 0;\r\n\t}\r\n\tbool Active() const noexcept {\r\n\t\treturn refCount > 0;\r\n\t}\r\n\tSci::Position LineWidth(Sci::Line line) const noexcept {\r\n\t\treturn starts.PositionFromPartition(line_cast(line) + 1) -\r\n\t\t\tstarts.PositionFromPartition(line_cast(line));\r\n\t}\r\n\tvoid SetLineWidth(Sci::Line line, Sci::Position width) noexcept {\r\n\t\tconst Sci::Position widthCurrent = LineWidth(line);\r\n\t\tstarts.InsertText(line_cast(line), line_cast(width - widthCurrent));\r\n\t}\r\n\tvoid AllocateLines(Sci::Line lines) {\r\n\t\tif (lines > starts.Partitions()) {\r\n\t\t\tstarts.ReAllocate(lines);\r\n\t\t}\r\n\t}\r\n\tvoid InsertLines(Sci::Line line, Sci::Line lines) {\r\n\t\t// Insert multiple lines with each temporarily 1 character wide.\r\n\t\t// The line widths will be fixed up by later measuring code.\r\n\t\tconst POS lineAsPos = line_cast(line);\r\n\t\tconst POS lineStart = starts.PositionFromPartition(lineAsPos - 1) + 1;\r\n\t\tfor (POS l = 0; l < line_cast(lines); l++) {\r\n\t\t\tstarts.InsertPartition(lineAsPos + l, lineStart + l);\r\n\t\t}\r\n\t}\r\n};\r\n\r\ntemplate <typename POS>\r\nclass LineVector : public ILineVector {\r\n\tPartitioning<POS> starts;\r\n\tPerLine *perLine;\r\n\tLineStartIndex<POS> startsUTF16;\r\n\tLineStartIndex<POS> startsUTF32;\r\n\tLineCharacterIndexType activeIndices;\r\n\r\n\tvoid SetActiveIndices() noexcept {\r\n\t\tactiveIndices =\r\n\t\t\t  (startsUTF32.Active() ? LineCharacterIndexType::Utf32 : LineCharacterIndexType::None)\r\n\t\t\t| (startsUTF16.Active() ? LineCharacterIndexType::Utf16 : LineCharacterIndexType::None);\r\n\t}\r\n\r\n\t// pos_cast(): cast Sci::Line and Sci::Position to either 32-bit or 64-bit value\r\n\t// This avoids warnings from Visual C++ Code Analysis and shortens code\r\n\tstatic constexpr POS pos_cast(Sci::Position pos) noexcept {\r\n\t\treturn static_cast<POS>(pos);\r\n\t}\r\n\r\n\t// line_from_pos_cast(): return 32-bit or 64-bit value as Sci::Line\r\n\t// This avoids warnings from Visual C++ Code Analysis and shortens code\r\n\tstatic constexpr Sci::Line line_from_pos_cast(POS line) noexcept {\r\n\t\treturn static_cast<Sci::Line>(line);\r\n\t}\r\n\r\npublic:\r\n\tLineVector() : starts(256), perLine(nullptr), activeIndices(LineCharacterIndexType::None) {\r\n\t}\r\n\tvoid Init() override {\r\n\t\tstarts.DeleteAll();\r\n\t\tif (perLine) {\r\n\t\t\tperLine->Init();\r\n\t\t}\r\n\t\tstartsUTF32.starts.DeleteAll();\r\n\t\tstartsUTF16.starts.DeleteAll();\r\n\t}\r\n\tvoid SetPerLine(PerLine *pl) noexcept override {\r\n\t\tperLine = pl;\r\n\t}\r\n\tvoid InsertText(Sci::Line line, Sci::Position delta) noexcept override {\r\n\t\tstarts.InsertText(pos_cast(line), pos_cast(delta));\r\n\t}\r\n\tvoid InsertLine(Sci::Line line, Sci::Position position, bool lineStart) override {\r\n\t\tconst POS lineAsPos = pos_cast(line);\r\n\t\tstarts.InsertPartition(lineAsPos, pos_cast(position));\r\n\t\tif (activeIndices != LineCharacterIndexType::None) {\r\n\t\t\tif (FlagSet(activeIndices, LineCharacterIndexType::Utf32)) {\r\n\t\t\t\tstartsUTF32.InsertLines(line, 1);\r\n\t\t\t}\r\n\t\t\tif (FlagSet(activeIndices, LineCharacterIndexType::Utf16)) {\r\n\t\t\t\tstartsUTF16.InsertLines(line, 1);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (perLine) {\r\n\t\t\tif ((line > 0) && lineStart)\r\n\t\t\t\tline--;\r\n\t\t\tperLine->InsertLine(line);\r\n\t\t}\r\n\t}\r\n\tvoid InsertLines(Sci::Line line, const Sci::Position *positions, size_t lines, bool lineStart) override {\r\n\t\tconst POS lineAsPos = pos_cast(line);\r\n\t\tif constexpr (sizeof(Sci::Position) == sizeof(POS)) {\r\n\t\t\tstarts.InsertPartitions(lineAsPos, positions, lines);\r\n\t\t} else {\r\n\t\t\tstarts.InsertPartitionsWithCast(lineAsPos, positions, lines);\r\n\t\t}\r\n\t\tif (activeIndices != LineCharacterIndexType::None) {\r\n\t\t\tif (FlagSet(activeIndices, LineCharacterIndexType::Utf32)) {\r\n\t\t\t\tstartsUTF32.InsertLines(line, lines);\r\n\t\t\t}\r\n\t\t\tif (FlagSet(activeIndices, LineCharacterIndexType::Utf16)) {\r\n\t\t\t\tstartsUTF16.InsertLines(line, lines);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (perLine) {\r\n\t\t\tif ((line > 0) && lineStart)\r\n\t\t\t\tline--;\r\n\t\t\tperLine->InsertLines(line, lines);\r\n\t\t}\r\n\t}\r\n\tvoid SetLineStart(Sci::Line line, Sci::Position position) noexcept override {\r\n\t\tstarts.SetPartitionStartPosition(pos_cast(line), pos_cast(position));\r\n\t}\r\n\tvoid RemoveLine(Sci::Line line) override {\r\n\t\tstarts.RemovePartition(pos_cast(line));\r\n\t\tif (FlagSet(activeIndices, LineCharacterIndexType::Utf32)) {\r\n\t\t\tstartsUTF32.starts.RemovePartition(pos_cast(line));\r\n\t\t}\r\n\t\tif (FlagSet(activeIndices, LineCharacterIndexType::Utf16)) {\r\n\t\t\tstartsUTF16.starts.RemovePartition(pos_cast(line));\r\n\t\t}\r\n\t\tif (perLine) {\r\n\t\t\tperLine->RemoveLine(line);\r\n\t\t}\r\n\t}\r\n\tSci::Line Lines() const noexcept override {\r\n\t\treturn line_from_pos_cast(starts.Partitions());\r\n\t}\r\n\tvoid AllocateLines(Sci::Line lines) override {\r\n\t\tif (lines > Lines()) {\r\n\t\t\tstarts.ReAllocate(lines);\r\n\t\t\tif (FlagSet(activeIndices, LineCharacterIndexType::Utf32)) {\r\n\t\t\t\tstartsUTF32.AllocateLines(lines);\r\n\t\t\t}\r\n\t\t\tif (FlagSet(activeIndices, LineCharacterIndexType::Utf16)) {\r\n\t\t\t\tstartsUTF16.AllocateLines(lines);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tSci::Line LineFromPosition(Sci::Position pos) const noexcept override {\r\n\t\treturn line_from_pos_cast(starts.PartitionFromPosition(pos_cast(pos)));\r\n\t}\r\n\tSci::Position LineStart(Sci::Line line) const noexcept override {\r\n\t\treturn starts.PositionFromPartition(pos_cast(line));\r\n\t}\r\n\tvoid InsertCharacters(Sci::Line line, CountWidths delta) noexcept override {\r\n\t\tif (FlagSet(activeIndices, LineCharacterIndexType::Utf32)) {\r\n\t\t\tstartsUTF32.starts.InsertText(pos_cast(line), pos_cast(delta.WidthUTF32()));\r\n\t\t}\r\n\t\tif (FlagSet(activeIndices, LineCharacterIndexType::Utf16)) {\r\n\t\t\tstartsUTF16.starts.InsertText(pos_cast(line), pos_cast(delta.WidthUTF16()));\r\n\t\t}\r\n\t}\r\n\tvoid SetLineCharactersWidth(Sci::Line line, CountWidths width) noexcept override {\r\n\t\tif (FlagSet(activeIndices, LineCharacterIndexType::Utf32)) {\r\n\t\t\tassert(startsUTF32.starts.Partitions() == starts.Partitions());\r\n\t\t\tstartsUTF32.SetLineWidth(line, width.WidthUTF32());\r\n\t\t}\r\n\t\tif (FlagSet(activeIndices, LineCharacterIndexType::Utf16)) {\r\n\t\t\tassert(startsUTF16.starts.Partitions() == starts.Partitions());\r\n\t\t\tstartsUTF16.SetLineWidth(line, width.WidthUTF16());\r\n\t\t}\r\n\t}\r\n\r\n\tLineCharacterIndexType LineCharacterIndex() const noexcept override {\r\n\t\treturn activeIndices;\r\n\t}\r\n\tbool AllocateLineCharacterIndex(LineCharacterIndexType lineCharacterIndex, Sci::Line lines) override {\r\n\t\tconst LineCharacterIndexType activeIndicesStart = activeIndices;\r\n\t\tif (FlagSet(lineCharacterIndex, LineCharacterIndexType::Utf32)) {\r\n\t\t\tstartsUTF32.Allocate(lines);\r\n\t\t\tassert(startsUTF32.starts.Partitions() == starts.Partitions());\r\n\t\t}\r\n\t\tif (FlagSet(lineCharacterIndex, LineCharacterIndexType::Utf16)) {\r\n\t\t\tstartsUTF16.Allocate(lines);\r\n\t\t\tassert(startsUTF16.starts.Partitions() == starts.Partitions());\r\n\t\t}\r\n\t\tSetActiveIndices();\r\n\t\treturn activeIndicesStart != activeIndices;\r\n\t}\r\n\tbool ReleaseLineCharacterIndex(LineCharacterIndexType lineCharacterIndex) override {\r\n\t\tconst LineCharacterIndexType activeIndicesStart = activeIndices;\r\n\t\tif (FlagSet(lineCharacterIndex, LineCharacterIndexType::Utf32)) {\r\n\t\t\tstartsUTF32.Release();\r\n\t\t}\r\n\t\tif (FlagSet(lineCharacterIndex, LineCharacterIndexType::Utf16)) {\r\n\t\t\tstartsUTF16.Release();\r\n\t\t}\r\n\t\tSetActiveIndices();\r\n\t\treturn activeIndicesStart != activeIndices;\r\n\t}\r\n\tSci::Position IndexLineStart(Sci::Line line, LineCharacterIndexType lineCharacterIndex) const noexcept override {\r\n\t\tif (lineCharacterIndex == LineCharacterIndexType::Utf32) {\r\n\t\t\treturn startsUTF32.starts.PositionFromPartition(pos_cast(line));\r\n\t\t} else {\r\n\t\t\treturn startsUTF16.starts.PositionFromPartition(pos_cast(line));\r\n\t\t}\r\n\t}\r\n\tSci::Line LineFromPositionIndex(Sci::Position pos, LineCharacterIndexType lineCharacterIndex) const noexcept override {\r\n\t\tif (lineCharacterIndex == LineCharacterIndexType::Utf32) {\r\n\t\t\treturn line_from_pos_cast(startsUTF32.starts.PartitionFromPosition(pos_cast(pos)));\r\n\t\t} else {\r\n\t\t\treturn line_from_pos_cast(startsUTF16.starts.PartitionFromPosition(pos_cast(pos)));\r\n\t\t}\r\n\t}\r\n};\r\n\r\nCellBuffer::CellBuffer(bool hasStyles_, bool largeDocument_) :\r\n\thasStyles(hasStyles_), largeDocument(largeDocument_) {\r\n\treadOnly = false;\r\n\tutf8Substance = false;\r\n\tutf8LineEnds = LineEndType::Default;\r\n\tcollectingUndo = true;\r\n\tuh = std::make_unique<UndoHistory>();\r\n\tif (largeDocument)\r\n\t\tplv = std::make_unique<LineVector<Sci::Position>>();\r\n\telse\r\n\t\tplv = std::make_unique<LineVector<int>>();\r\n}\r\n\r\nCellBuffer::~CellBuffer() noexcept = default;\r\n\r\nchar CellBuffer::CharAt(Sci::Position position) const noexcept {\r\n\treturn substance.ValueAt(position);\r\n}\r\n\r\nunsigned char CellBuffer::UCharAt(Sci::Position position) const noexcept {\r\n\treturn substance.ValueAt(position);\r\n}\r\n\r\nvoid CellBuffer::GetCharRange(char *buffer, Sci::Position position, Sci::Position lengthRetrieve) const {\r\n\tif (lengthRetrieve <= 0)\r\n\t\treturn;\r\n\tif (position < 0)\r\n\t\treturn;\r\n\tif ((position + lengthRetrieve) > substance.Length()) {\r\n\t\tPlatform::DebugPrintf(\"Bad GetCharRange %.0f for %.0f of %.0f\\n\",\r\n\t\t\t\t      static_cast<double>(position),\r\n\t\t\t\t      static_cast<double>(lengthRetrieve),\r\n\t\t\t\t      static_cast<double>(substance.Length()));\r\n\t\treturn;\r\n\t}\r\n\tsubstance.GetRange(buffer, position, lengthRetrieve);\r\n}\r\n\r\nchar CellBuffer::StyleAt(Sci::Position position) const noexcept {\r\n\treturn hasStyles ? style.ValueAt(position) : '\\0';\r\n}\r\n\r\nvoid CellBuffer::GetStyleRange(unsigned char *buffer, Sci::Position position, Sci::Position lengthRetrieve) const {\r\n\tif (lengthRetrieve < 0)\r\n\t\treturn;\r\n\tif (position < 0)\r\n\t\treturn;\r\n\tif (!hasStyles) {\r\n\t\tstd::fill(buffer, buffer + lengthRetrieve, static_cast<unsigned char>(0));\r\n\t\treturn;\r\n\t}\r\n\tif ((position + lengthRetrieve) > style.Length()) {\r\n\t\tPlatform::DebugPrintf(\"Bad GetStyleRange %.0f for %.0f of %.0f\\n\",\r\n\t\t\t\t      static_cast<double>(position),\r\n\t\t\t\t      static_cast<double>(lengthRetrieve),\r\n\t\t\t\t      static_cast<double>(style.Length()));\r\n\t\treturn;\r\n\t}\r\n\tstyle.GetRange(reinterpret_cast<char *>(buffer), position, lengthRetrieve);\r\n}\r\n\r\nconst char *CellBuffer::BufferPointer() {\r\n\treturn substance.BufferPointer();\r\n}\r\n\r\nconst char *CellBuffer::RangePointer(Sci::Position position, Sci::Position rangeLength) noexcept {\r\n\treturn substance.RangePointer(position, rangeLength);\r\n}\r\n\r\nSci::Position CellBuffer::GapPosition() const noexcept {\r\n\treturn substance.GapPosition();\r\n}\r\n\r\nSplitView CellBuffer::AllView() const noexcept {\r\n\tconst size_t length = substance.Length();\r\n\tsize_t length1 = substance.GapPosition();\r\n\tif (length1 == 0) {\r\n\t\t// Assign segment2 to segment1 / length1 to avoid useless test against 0 length1\r\n\t\tlength1 = length;\r\n\t}\r\n\treturn SplitView {\r\n\t\tsubstance.ElementPointer(0),\r\n\t\tlength1,\r\n\t\tsubstance.ElementPointer(length1) - length1,\r\n\t\tlength\r\n\t};\r\n}\r\n\r\n// The char* returned is to an allocation owned by the undo history\r\nconst char *CellBuffer::InsertString(Sci::Position position, const char *s, Sci::Position insertLength, bool &startSequence) {\r\n\t// InsertString and DeleteChars are the bottleneck though which all changes occur\r\n\tconst char *data = s;\r\n\tif (!readOnly) {\r\n\t\tif (collectingUndo) {\r\n\t\t\t// Save into the undo/redo stack, but only the characters - not the formatting\r\n\t\t\t// This takes up about half load time\r\n\t\t\tdata = uh->AppendAction(ActionType::insert, position, s, insertLength, startSequence);\r\n\t\t}\r\n\r\n\t\tBasicInsertString(position, s, insertLength);\r\n\t\tif (changeHistory) {\r\n\t\t\tchangeHistory->Insert(position, insertLength, collectingUndo, uh->BeforeReachableSavePoint());\r\n\t\t}\r\n\t}\r\n\treturn data;\r\n}\r\n\r\nbool CellBuffer::SetStyleAt(Sci::Position position, char styleValue) noexcept {\r\n\tif (!hasStyles) {\r\n\t\treturn false;\r\n\t}\r\n\tconst char curVal = style.ValueAt(position);\r\n\tif (curVal != styleValue) {\r\n\t\tstyle.SetValueAt(position, styleValue);\r\n\t\treturn true;\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n}\r\n\r\nbool CellBuffer::SetStyleFor(Sci::Position position, Sci::Position lengthStyle, char styleValue) noexcept {\r\n\tif (!hasStyles) {\r\n\t\treturn false;\r\n\t}\r\n\tbool changed = false;\r\n\tPLATFORM_ASSERT(lengthStyle == 0 ||\r\n\t\t(lengthStyle > 0 && lengthStyle + position <= style.Length()));\r\n\twhile (lengthStyle--) {\r\n\t\tconst char curVal = style.ValueAt(position);\r\n\t\tif (curVal != styleValue) {\r\n\t\t\tstyle.SetValueAt(position, styleValue);\r\n\t\t\tchanged = true;\r\n\t\t}\r\n\t\tposition++;\r\n\t}\r\n\treturn changed;\r\n}\r\n\r\n// The char* returned is to an allocation owned by the undo history\r\nconst char *CellBuffer::DeleteChars(Sci::Position position, Sci::Position deleteLength, bool &startSequence) {\r\n\t// InsertString and DeleteChars are the bottleneck though which all changes occur\r\n\tPLATFORM_ASSERT(deleteLength > 0);\r\n\tconst char *data = nullptr;\r\n\tif (!readOnly) {\r\n\t\tif (collectingUndo) {\r\n\t\t\t// Save into the undo/redo stack, but only the characters - not the formatting\r\n\t\t\t// The gap would be moved to position anyway for the deletion so this doesn't cost extra\r\n\t\t\tdata = substance.RangePointer(position, deleteLength);\r\n\t\t\tdata = uh->AppendAction(ActionType::remove, position, data, deleteLength, startSequence);\r\n\t\t}\r\n\r\n\t\tif (changeHistory) {\r\n\t\t\tchangeHistory->DeleteRangeSavingHistory(position, deleteLength,\r\n\t\t\t\tuh->BeforeReachableSavePoint(), uh->AfterOrAtDetachPoint());\r\n\t\t}\r\n\r\n\t\tBasicDeleteChars(position, deleteLength);\r\n\t}\r\n\treturn data;\r\n}\r\n\r\nSci::Position CellBuffer::Length() const noexcept {\r\n\treturn substance.Length();\r\n}\r\n\r\nvoid CellBuffer::Allocate(Sci::Position newSize) {\r\n\tif (!largeDocument && (newSize > INT32_MAX)) {\r\n\t\tthrow std::runtime_error(\"CellBuffer::Allocate: size of standard document limited to 2G.\");\r\n\t}\r\n\tsubstance.ReAllocate(newSize);\r\n\tif (hasStyles) {\r\n\t\tstyle.ReAllocate(newSize);\r\n\t}\r\n}\r\n\r\nvoid CellBuffer::SetUTF8Substance(bool utf8Substance_) noexcept {\r\n\tutf8Substance = utf8Substance_;\r\n}\r\n\r\nvoid CellBuffer::SetLineEndTypes(LineEndType utf8LineEnds_) {\r\n\tif (utf8LineEnds != utf8LineEnds_) {\r\n\t\tconst LineCharacterIndexType indexes = plv->LineCharacterIndex();\r\n\t\tutf8LineEnds = utf8LineEnds_;\r\n\t\tResetLineEnds();\r\n\t\tAllocateLineCharacterIndex(indexes);\r\n\t}\r\n}\r\n\r\nbool CellBuffer::ContainsLineEnd(const char *s, Sci::Position length) const noexcept {\r\n\tunsigned char chBeforePrev = 0;\r\n\tunsigned char chPrev = 0;\r\n\tfor (Sci::Position i = 0; i < length; i++) {\r\n\t\tconst unsigned char ch = s[i];\r\n\t\tif ((ch == '\\r') || (ch == '\\n')) {\r\n\t\t\treturn true;\r\n\t\t} else if (utf8LineEnds == LineEndType::Unicode) {\r\n\t\t\tif (UTF8IsMultibyteLineEnd(chBeforePrev, chPrev, ch)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tchBeforePrev = chPrev;\r\n\t\tchPrev = ch;\r\n\t}\r\n\treturn false;\r\n}\r\n\r\nvoid CellBuffer::SetPerLine(PerLine *pl) noexcept {\r\n\tplv->SetPerLine(pl);\r\n}\r\n\r\nLineCharacterIndexType CellBuffer::LineCharacterIndex() const noexcept {\r\n\treturn plv->LineCharacterIndex();\r\n}\r\n\r\nvoid CellBuffer::AllocateLineCharacterIndex(LineCharacterIndexType lineCharacterIndex) {\r\n\tif (utf8Substance) {\r\n\t\tif (plv->AllocateLineCharacterIndex(lineCharacterIndex, Lines())) {\r\n\t\t\t// Changed so recalculate whole file\r\n\t\t\tRecalculateIndexLineStarts(0, Lines() - 1);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid CellBuffer::ReleaseLineCharacterIndex(LineCharacterIndexType lineCharacterIndex) {\r\n\tplv->ReleaseLineCharacterIndex(lineCharacterIndex);\r\n}\r\n\r\nSci::Line CellBuffer::Lines() const noexcept {\r\n\treturn plv->Lines();\r\n}\r\n\r\nvoid CellBuffer::AllocateLines(Sci::Line lines) {\r\n\tplv->AllocateLines(lines);\r\n}\r\n\r\nSci::Position CellBuffer::LineStart(Sci::Line line) const noexcept {\r\n\tif (line < 0)\r\n\t\treturn 0;\r\n\telse if (line >= Lines())\r\n\t\treturn Length();\r\n\telse\r\n\t\treturn plv->LineStart(line);\r\n}\r\n\r\nSci::Position CellBuffer::LineEnd(Sci::Line line) const noexcept {\r\n\tif (line >= Lines() - 1) {\r\n\t\treturn LineStart(line + 1);\r\n\t} else {\r\n\t\tSci::Position position = LineStart(line + 1);\r\n\t\tif (LineEndType::Unicode == GetLineEndTypes()) {\r\n\t\t\tconst unsigned char bytes[] = {\r\n\t\t\t\tUCharAt(position - 3),\r\n\t\t\t\tUCharAt(position - 2),\r\n\t\t\t\tUCharAt(position - 1),\r\n\t\t\t};\r\n\t\t\tif (UTF8IsSeparator(bytes)) {\r\n\t\t\t\treturn position - UTF8SeparatorLength;\r\n\t\t\t}\r\n\t\t\tif (UTF8IsNEL(bytes + 1)) {\r\n\t\t\t\treturn position - UTF8NELLength;\r\n\t\t\t}\r\n\t\t}\r\n\t\tposition--; // Back over CR or LF\r\n\t\t// When line terminator is CR+LF, may need to go back one more\r\n\t\tif ((position > LineStart(line)) && (CharAt(position - 1) == '\\r')) {\r\n\t\t\tposition--;\r\n\t\t}\r\n\t\treturn position;\r\n\t}\r\n}\r\n\r\nSci::Line CellBuffer::LineFromPosition(Sci::Position pos) const noexcept {\r\n\treturn plv->LineFromPosition(pos);\r\n}\r\n\r\nSci::Position CellBuffer::IndexLineStart(Sci::Line line, LineCharacterIndexType lineCharacterIndex) const noexcept {\r\n\treturn plv->IndexLineStart(line, lineCharacterIndex);\r\n}\r\n\r\nSci::Line CellBuffer::LineFromPositionIndex(Sci::Position pos, LineCharacterIndexType lineCharacterIndex) const noexcept {\r\n\treturn plv->LineFromPositionIndex(pos, lineCharacterIndex);\r\n}\r\n\r\nbool CellBuffer::IsReadOnly() const noexcept {\r\n\treturn readOnly;\r\n}\r\n\r\nvoid CellBuffer::SetReadOnly(bool set) noexcept {\r\n\treadOnly = set;\r\n}\r\n\r\nbool CellBuffer::IsLarge() const noexcept {\r\n\treturn largeDocument;\r\n}\r\n\r\nbool CellBuffer::HasStyles() const noexcept {\r\n\treturn hasStyles;\r\n}\r\n\r\nvoid CellBuffer::SetSavePoint() {\r\n\tuh->SetSavePoint();\r\n\tif (changeHistory) {\r\n\t\tchangeHistory->SetSavePoint();\r\n\t}\r\n}\r\n\r\nbool CellBuffer::IsSavePoint() const noexcept {\r\n\treturn uh->IsSavePoint();\r\n}\r\n\r\nvoid CellBuffer::TentativeStart() noexcept {\r\n\tuh->TentativeStart();\r\n}\r\n\r\nvoid CellBuffer::TentativeCommit() noexcept {\r\n\tuh->TentativeCommit();\r\n}\r\n\r\nint CellBuffer::TentativeSteps() noexcept {\r\n\treturn uh->TentativeSteps();\r\n}\r\n\r\nbool CellBuffer::TentativeActive() const noexcept {\r\n\treturn uh->TentativeActive();\r\n}\r\n\r\n// Without undo\r\n\r\nvoid CellBuffer::InsertLine(Sci::Line line, Sci::Position position, bool lineStart) {\r\n\tplv->InsertLine(line, position, lineStart);\r\n}\r\n\r\nvoid CellBuffer::RemoveLine(Sci::Line line) {\r\n\tplv->RemoveLine(line);\r\n}\r\n\r\nbool CellBuffer::UTF8LineEndOverlaps(Sci::Position position) const noexcept {\r\n\tconst unsigned char bytes[] = {\r\n\t\tstatic_cast<unsigned char>(substance.ValueAt(position-2)),\r\n\t\tstatic_cast<unsigned char>(substance.ValueAt(position-1)),\r\n\t\tstatic_cast<unsigned char>(substance.ValueAt(position)),\r\n\t\tstatic_cast<unsigned char>(substance.ValueAt(position+1)),\r\n\t};\r\n\treturn UTF8IsSeparator(bytes) || UTF8IsSeparator(bytes+1) || UTF8IsNEL(bytes+1);\r\n}\r\n\r\nbool CellBuffer::UTF8IsCharacterBoundary(Sci::Position position) const {\r\n\tassert(position >= 0 && position <= Length());\r\n\tif (position > 0) {\r\n\t\tstd::string back;\r\n\t\tfor (int i = 0; i < UTF8MaxBytes; i++) {\r\n\t\t\tconst Sci::Position posBack = position - i;\r\n\t\t\tif (posBack < 0) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tback.insert(0, 1, substance.ValueAt(posBack));\r\n\t\t\tif (!UTF8IsTrailByte(back.front())) {\r\n\t\t\t\tif (i > 0) {\r\n\t\t\t\t\t// Have reached a non-trail\r\n\t\t\t\t\tconst int cla = UTF8Classify(back);\r\n\t\t\t\t\tif ((cla & UTF8MaskInvalid) || (cla != i)) {\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (position < Length()) {\r\n\t\tconst unsigned char fore = substance.ValueAt(position);\r\n\t\tif (UTF8IsTrailByte(fore)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n}\r\n\r\nvoid CellBuffer::ResetLineEnds() {\r\n\t// Reinitialize line data -- too much work to preserve\r\n\tconst Sci::Line lines = plv->Lines();\r\n\tplv->Init();\r\n\tplv->AllocateLines(lines);\r\n\r\n\tconstexpr Sci::Position position = 0;\r\n\tconst Sci::Position length = Length();\r\n\tplv->InsertText(0, length);\r\n\tSci::Line lineInsert = 1;\r\n\tconstexpr bool atLineStart = true;\r\n\tunsigned char chBeforePrev = 0;\r\n\tunsigned char chPrev = 0;\r\n\tfor (Sci::Position i = 0; i < length; i++) {\r\n\t\tconst unsigned char ch = substance.ValueAt(position + i);\r\n\t\tif (ch == '\\r') {\r\n\t\t\tInsertLine(lineInsert, (position + i) + 1, atLineStart);\r\n\t\t\tlineInsert++;\r\n\t\t} else if (ch == '\\n') {\r\n\t\t\tif (chPrev == '\\r') {\r\n\t\t\t\t// Patch up what was end of line\r\n\t\t\t\tplv->SetLineStart(lineInsert - 1, (position + i) + 1);\r\n\t\t\t} else {\r\n\t\t\t\tInsertLine(lineInsert, (position + i) + 1, atLineStart);\r\n\t\t\t\tlineInsert++;\r\n\t\t\t}\r\n\t\t} else if (utf8LineEnds == LineEndType::Unicode) {\r\n\t\t\tif (UTF8IsMultibyteLineEnd(chBeforePrev, chPrev, ch)) {\r\n\t\t\t\tInsertLine(lineInsert, (position + i) + 1, atLineStart);\r\n\t\t\t\tlineInsert++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tchBeforePrev = chPrev;\r\n\t\tchPrev = ch;\r\n\t}\r\n}\r\n\r\nnamespace {\r\n\r\nCountWidths CountCharacterWidthsUTF8(std::string_view sv) noexcept {\r\n\tCountWidths cw;\r\n\tsize_t remaining = sv.length();\r\n\twhile (remaining > 0) {\r\n\t\tconst int utf8Status = UTF8Classify(sv);\r\n\t\tconst int lenChar = utf8Status & UTF8MaskWidth;\r\n\t\tcw.CountChar(lenChar);\r\n\t\tsv.remove_prefix(lenChar);\r\n\t\tremaining -= lenChar;\r\n\t}\r\n\treturn cw;\r\n}\r\n\r\n}\r\n\r\nbool CellBuffer::MaintainingLineCharacterIndex() const noexcept {\r\n\treturn plv->LineCharacterIndex() != LineCharacterIndexType::None;\r\n}\r\n\r\nvoid CellBuffer::RecalculateIndexLineStarts(Sci::Line lineFirst, Sci::Line lineLast) {\r\n\tstd::string text;\r\n\tSci::Position posLineEnd = LineStart(lineFirst);\r\n\tfor (Sci::Line line = lineFirst; line <= lineLast; line++) {\r\n\t\t// Find line start and end, retrieve text of line, count characters and update line width\r\n\t\tconst Sci::Position posLineStart = posLineEnd;\r\n\t\tposLineEnd = LineStart(line+1);\r\n\t\tconst Sci::Position width = posLineEnd - posLineStart;\r\n\t\ttext.resize(width);\r\n\t\tGetCharRange(text.data(), posLineStart, width);\r\n\t\tconst CountWidths cw = CountCharacterWidthsUTF8(text);\r\n\t\tplv->SetLineCharactersWidth(line, cw);\r\n\t}\r\n}\r\n\r\nvoid CellBuffer::BasicInsertString(Sci::Position position, const char *s, Sci::Position insertLength) {\r\n\tif (insertLength == 0)\r\n\t\treturn;\r\n\tPLATFORM_ASSERT(insertLength > 0);\r\n\r\n\tconst unsigned char chAfter = substance.ValueAt(position);\r\n\tbool breakingUTF8LineEnd = false;\r\n\tif (utf8LineEnds == LineEndType::Unicode && UTF8IsTrailByte(chAfter)) {\r\n\t\tbreakingUTF8LineEnd = UTF8LineEndOverlaps(position);\r\n\t}\r\n\r\n\tconst Sci::Line linePosition = plv->LineFromPosition(position);\r\n\tSci::Line lineInsert = linePosition + 1;\r\n\r\n\t// A simple insertion is one that inserts valid text on a single line at a character boundary\r\n\tbool simpleInsertion = false;\r\n\r\n\tconst bool maintainingIndex = MaintainingLineCharacterIndex();\r\n\r\n\t// Check for breaking apart a UTF-8 sequence and inserting invalid UTF-8\r\n\tif (utf8Substance && maintainingIndex) {\r\n\t\t// Actually, don't need to check that whole insertion is valid just that there\r\n\t\t// are no potential fragments at ends.\r\n\t\tsimpleInsertion = UTF8IsCharacterBoundary(position) &&\r\n\t\t\tUTF8IsValid(std::string_view(s, insertLength));\r\n\t}\r\n\r\n\tsubstance.InsertFromArray(position, s, 0, insertLength);\r\n\tif (hasStyles) {\r\n\t\tstyle.InsertValue(position, insertLength, 0);\r\n\t}\r\n\r\n\tconst bool atLineStart = plv->LineStart(lineInsert-1) == position;\r\n\t// Point all the lines after the insertion point further along in the buffer\r\n\tplv->InsertText(lineInsert-1, insertLength);\r\n\tunsigned char chBeforePrev = substance.ValueAt(position - 2);\r\n\tunsigned char chPrev = substance.ValueAt(position - 1);\r\n\tif (chPrev == '\\r' && chAfter == '\\n') {\r\n\t\t// Splitting up a crlf pair at position\r\n\t\tInsertLine(lineInsert, position, false);\r\n\t\tlineInsert++;\r\n\t}\r\n\tif (breakingUTF8LineEnd) {\r\n\t\tRemoveLine(lineInsert);\r\n\t}\r\n\r\n\tconstexpr size_t PositionBlockSize = 128;\r\n\tSci::Position positions[PositionBlockSize]{};\r\n\tsize_t nPositions = 0;\r\n\tconst Sci::Line lineStart = lineInsert;\r\n\r\n\t// s may not NULL-terminated, ensure *ptr == '\\n' or *next == '\\n' is valid.\r\n\tconst char *const end = s + insertLength - 1;\r\n\tconst char *ptr = s;\r\n\tunsigned char ch = 0;\r\n\r\n\tif (chPrev == '\\r' && *ptr == '\\n') {\r\n\t\t++ptr;\r\n\t\t// Patch up what was end of line\r\n\t\tplv->SetLineStart(lineInsert - 1, (position + ptr - s));\r\n\t\tsimpleInsertion = false;\r\n\t}\r\n\r\n\tif (ptr < end) {\r\n\t\tuint8_t eolTable[256]{};\r\n\t\teolTable[static_cast<uint8_t>('\\n')] = 1;\r\n\t\teolTable[static_cast<uint8_t>('\\r')] = 2;\r\n\t\tif (utf8LineEnds == LineEndType::Unicode) {\r\n\t\t\t// see UniConversion.h for LS, PS and NEL\r\n\t\t\teolTable[0x85] = 4;\r\n\t\t\teolTable[0xa8] = 3;\r\n\t\t\teolTable[0xa9] = 3;\r\n\t\t}\r\n\r\n\t\tdo {\r\n\t\t\t// skip to line end\r\n\t\t\tch = *ptr++;\r\n\t\t\tuint8_t type;\r\n\t\t\twhile ((type = eolTable[ch]) == 0 && ptr < end) {\r\n\t\t\t\tchBeforePrev = chPrev;\r\n\t\t\t\tchPrev = ch;\r\n\t\t\t\tch = *ptr++;\r\n\t\t\t}\r\n\t\t\tswitch (type) {\r\n\t\t\tcase 2: // '\\r'\r\n\t\t\t\tif (*ptr == '\\n') {\r\n\t\t\t\t\t++ptr;\r\n\t\t\t\t}\r\n\t\t\t\t[[fallthrough]];\r\n\t\t\tcase 1: // '\\n'\r\n\t\t\t\tpositions[nPositions++] = position + ptr - s;\r\n\t\t\t\tif (nPositions == PositionBlockSize) {\r\n\t\t\t\t\tplv->InsertLines(lineInsert, positions, nPositions, atLineStart);\r\n\t\t\t\t\tlineInsert += nPositions;\r\n\t\t\t\t\tnPositions = 0;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\tcase 4:\r\n\t\t\t\t// LS, PS and NEL\r\n\t\t\t\tif ((type == 3 && chPrev == 0x80 && chBeforePrev == 0xe2) || (type == 4 && chPrev == 0xc2)) {\r\n\t\t\t\t\tpositions[nPositions++] = position + ptr - s;\r\n\t\t\t\t\tif (nPositions == PositionBlockSize) {\r\n\t\t\t\t\t\tplv->InsertLines(lineInsert, positions, nPositions, atLineStart);\r\n\t\t\t\t\t\tlineInsert += nPositions;\r\n\t\t\t\t\t\tnPositions = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tchBeforePrev = chPrev;\r\n\t\t\tchPrev = ch;\r\n\t\t} while (ptr < end);\r\n\t}\r\n\r\n\tif (nPositions != 0) {\r\n\t\tplv->InsertLines(lineInsert, positions, nPositions, atLineStart);\r\n\t\tlineInsert += nPositions;\r\n\t}\r\n\r\n\tch = *end;\r\n\tif (ptr == end) {\r\n\t\t++ptr;\r\n\t\tif (ch == '\\r' || ch == '\\n') {\r\n\t\t\tInsertLine(lineInsert, (position + ptr - s), atLineStart);\r\n\t\t\tlineInsert++;\r\n\t\t} else if (utf8LineEnds == LineEndType::Unicode && !UTF8IsAscii(ch)) {\r\n\t\t\tif (UTF8IsMultibyteLineEnd(chBeforePrev, chPrev, ch)) {\r\n\t\t\t\tInsertLine(lineInsert, (position + ptr - s), atLineStart);\r\n\t\t\t\tlineInsert++;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Joining two lines where last insertion is cr and following substance starts with lf\r\n\tif (chAfter == '\\n') {\r\n\t\tif (ch == '\\r') {\r\n\t\t\t// End of line already in buffer so drop the newly created one\r\n\t\t\tRemoveLine(lineInsert - 1);\r\n\t\t\tsimpleInsertion = false;\r\n\t\t}\r\n\t} else if (utf8LineEnds == LineEndType::Unicode && !UTF8IsAscii(chAfter)) {\r\n\t\tchBeforePrev = chPrev;\r\n\t\tchPrev = ch;\r\n\t\t// May have end of UTF-8 line end in buffer and start in insertion\r\n\t\tfor (int j = 0; j < UTF8SeparatorLength-1; j++) {\r\n\t\t\tconst unsigned char chAt = substance.ValueAt(position + insertLength + j);\r\n\t\t\tconst unsigned char back3[3] = {chBeforePrev, chPrev, chAt};\r\n\t\t\tif (UTF8IsSeparator(back3)) {\r\n\t\t\t\tInsertLine(lineInsert, (position + insertLength + j) + 1, atLineStart);\r\n\t\t\t\tlineInsert++;\r\n\t\t\t}\r\n\t\t\tif ((j == 0) && UTF8IsNEL(back3+1)) {\r\n\t\t\t\tInsertLine(lineInsert, (position + insertLength + j) + 1, atLineStart);\r\n\t\t\t\tlineInsert++;\r\n\t\t\t}\r\n\t\t\tchBeforePrev = chPrev;\r\n\t\t\tchPrev = chAt;\r\n\t\t}\r\n\t}\r\n\tif (maintainingIndex) {\r\n\t\tif (simpleInsertion && (lineInsert == lineStart)) {\r\n\t\t\tconst CountWidths cw = CountCharacterWidthsUTF8(std::string_view(s, insertLength));\r\n\t\t\tplv->InsertCharacters(linePosition, cw);\r\n\t\t} else {\r\n\t\t\tRecalculateIndexLineStarts(linePosition, lineInsert - 1);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid CellBuffer::BasicDeleteChars(Sci::Position position, Sci::Position deleteLength) {\r\n\tif (deleteLength == 0)\r\n\t\treturn;\r\n\r\n\tSci::Line lineRecalculateStart = Sci::invalidPosition;\r\n\r\n\tif ((position == 0) && (deleteLength == substance.Length())) {\r\n\t\t// If whole buffer is being deleted, faster to reinitialise lines data\r\n\t\t// than to delete each line.\r\n\t\tplv->Init();\r\n\t} else {\r\n\t\t// Have to fix up line positions before doing deletion as looking at text in buffer\r\n\t\t// to work out which lines have been removed\r\n\r\n\t\tconst Sci::Line linePosition = plv->LineFromPosition(position);\r\n\t\tSci::Line lineRemove = linePosition + 1;\r\n\r\n\t\tplv->InsertText(lineRemove-1, - (deleteLength));\r\n\t\tconst unsigned char chPrev = substance.ValueAt(position - 1);\r\n\t\tconst unsigned char chBefore = chPrev;\r\n\t\tunsigned char chNext = substance.ValueAt(position);\r\n\r\n\t\t// Check for breaking apart a UTF-8 sequence\r\n\t\t// Needs further checks that text is UTF-8 or that some other break apart is occurring\r\n\t\tif (utf8Substance && MaintainingLineCharacterIndex()) {\r\n\t\t\tconst Sci::Position posEnd = position + deleteLength;\r\n\t\t\tconst Sci::Line lineEndRemove = plv->LineFromPosition(posEnd);\r\n\t\t\tconst bool simpleDeletion =\r\n\t\t\t\t(linePosition == lineEndRemove) &&\r\n\t\t\t\tUTF8IsCharacterBoundary(position) && UTF8IsCharacterBoundary(posEnd);\r\n\t\t\tif (simpleDeletion) {\r\n\t\t\t\tstd::string text(deleteLength, '\\0');\r\n\t\t\t\tGetCharRange(text.data(), position, deleteLength);\r\n\t\t\t\tif (UTF8IsValid(text)) {\r\n\t\t\t\t\t// Everything is good\r\n\t\t\t\t\tconst CountWidths cw = CountCharacterWidthsUTF8(text);\r\n\t\t\t\t\tplv->InsertCharacters(linePosition, -cw);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tlineRecalculateStart = linePosition;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tlineRecalculateStart = linePosition;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tbool ignoreNL = false;\r\n\t\tif (chPrev == '\\r' && chNext == '\\n') {\r\n\t\t\t// Move back one\r\n\t\t\tplv->SetLineStart(lineRemove, position);\r\n\t\t\tlineRemove++;\r\n\t\t\tignoreNL = true; \t// First \\n is not real deletion\r\n\t\t}\r\n\t\tif (utf8LineEnds == LineEndType::Unicode && UTF8IsTrailByte(chNext)) {\r\n\t\t\tif (UTF8LineEndOverlaps(position)) {\r\n\t\t\t\tRemoveLine(lineRemove);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tunsigned char ch = chNext;\r\n\t\tfor (Sci::Position i = 0; i < deleteLength; i++) {\r\n\t\t\tchNext = substance.ValueAt(position + i + 1);\r\n\t\t\tif (ch == '\\r') {\r\n\t\t\t\tif (chNext != '\\n') {\r\n\t\t\t\t\tRemoveLine(lineRemove);\r\n\t\t\t\t}\r\n\t\t\t} else if (ch == '\\n') {\r\n\t\t\t\tif (ignoreNL) {\r\n\t\t\t\t\tignoreNL = false; \t// Further \\n are real deletions\r\n\t\t\t\t} else {\r\n\t\t\t\t\tRemoveLine(lineRemove);\r\n\t\t\t\t}\r\n\t\t\t} else if (utf8LineEnds == LineEndType::Unicode) {\r\n\t\t\t\tif (!UTF8IsAscii(ch)) {\r\n\t\t\t\t\tconst unsigned char next3[3] = {ch, chNext,\r\n\t\t\t\t\t\tstatic_cast<unsigned char>(substance.ValueAt(position + i + 2))};\r\n\t\t\t\t\tif (UTF8IsSeparator(next3) || UTF8IsNEL(next3)) {\r\n\t\t\t\t\t\tRemoveLine(lineRemove);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tch = chNext;\r\n\t\t}\r\n\t\t// May have to fix up end if last deletion causes cr to be next to lf\r\n\t\t// or removes one of a crlf pair\r\n\t\tconst char chAfter = substance.ValueAt(position + deleteLength);\r\n\t\tif (chBefore == '\\r' && chAfter == '\\n') {\r\n\t\t\t// Using lineRemove-1 as cr ended line before start of deletion\r\n\t\t\tRemoveLine(lineRemove - 1);\r\n\t\t\tplv->SetLineStart(lineRemove - 1, position + 1);\r\n\t\t}\r\n\t}\r\n\tsubstance.DeleteRange(position, deleteLength);\r\n\tif (lineRecalculateStart >= 0) {\r\n\t\tRecalculateIndexLineStarts(lineRecalculateStart, lineRecalculateStart);\r\n\t}\r\n\tif (hasStyles) {\r\n\t\tstyle.DeleteRange(position, deleteLength);\r\n\t}\r\n}\r\n\r\nbool CellBuffer::SetUndoCollection(bool collectUndo) noexcept {\r\n\tcollectingUndo = collectUndo;\r\n\tuh->DropUndoSequence();\r\n\treturn collectingUndo;\r\n}\r\n\r\nbool CellBuffer::IsCollectingUndo() const noexcept {\r\n\treturn collectingUndo;\r\n}\r\n\r\nvoid CellBuffer::BeginUndoAction(bool mayCoalesce) noexcept {\r\n\tuh->BeginUndoAction(mayCoalesce);\r\n}\r\n\r\nvoid CellBuffer::EndUndoAction() noexcept {\r\n\tuh->EndUndoAction();\r\n}\r\n\r\nvoid CellBuffer::AddUndoAction(Sci::Position token, bool mayCoalesce) {\r\n\tbool startSequence = false;\r\n\tuh->AppendAction(ActionType::container, token, nullptr, 0, startSequence, mayCoalesce);\r\n}\r\n\r\nvoid CellBuffer::DeleteUndoHistory() noexcept {\r\n\tuh->DeleteUndoHistory();\r\n}\r\n\r\nbool CellBuffer::CanUndo() const noexcept {\r\n\treturn uh->CanUndo();\r\n}\r\n\r\nint CellBuffer::StartUndo() noexcept {\r\n\treturn uh->StartUndo();\r\n}\r\n\r\nAction CellBuffer::GetUndoStep() const noexcept {\r\n\treturn uh->GetUndoStep();\r\n}\r\n\r\nvoid CellBuffer::PerformUndoStep() {\r\n\tconst Action previousStep = uh->GetUndoStep();\r\n\t// PreviousBeforeSavePoint and AfterDetachPoint are called since acting on the previous action,\r\n\t// that is currentAction-1\r\n\tif (changeHistory && uh->PreviousBeforeSavePoint()) {\r\n\t\tchangeHistory->StartReversion();\r\n\t}\r\n\tif (previousStep.at == ActionType::insert) {\r\n\t\tif (substance.Length() < previousStep.lenData) {\r\n\t\t\tthrow std::runtime_error(\r\n\t\t\t\t\"CellBuffer::PerformUndoStep: deletion must be less than document length.\");\r\n\t\t}\r\n\t\tif (changeHistory) {\r\n\t\t\tchangeHistory->DeleteRange(previousStep.position, previousStep.lenData,\r\n\t\t\t\tuh->PreviousBeforeSavePoint() && !uh->AfterDetachPoint());\r\n\t\t}\r\n\t\tBasicDeleteChars(previousStep.position, previousStep.lenData);\r\n\t} else if (previousStep.at == ActionType::remove) {\r\n\t\tBasicInsertString(previousStep.position, previousStep.data, previousStep.lenData);\r\n\t\tif (changeHistory) {\r\n\t\t\tchangeHistory->UndoDeleteStep(previousStep.position, previousStep.lenData, uh->AfterDetachPoint());\r\n\t\t}\r\n\t}\r\n\tuh->CompletedUndoStep();\r\n}\r\n\r\nbool CellBuffer::CanRedo() const noexcept {\r\n\treturn uh->CanRedo();\r\n}\r\n\r\nint CellBuffer::StartRedo() noexcept {\r\n\treturn uh->StartRedo();\r\n}\r\n\r\nAction CellBuffer::GetRedoStep() const noexcept {\r\n\treturn uh->GetRedoStep();\r\n}\r\n\r\nvoid CellBuffer::PerformRedoStep() {\r\n\tconst Action actionStep = uh->GetRedoStep();\r\n\tif (actionStep.at == ActionType::insert) {\r\n\t\tBasicInsertString(actionStep.position, actionStep.data, actionStep.lenData);\r\n\t\tif (changeHistory) {\r\n\t\t\tchangeHistory->Insert(actionStep.position, actionStep.lenData, collectingUndo,\r\n\t\t\t\tuh->BeforeSavePoint() && !uh->AfterOrAtDetachPoint());\r\n\t\t}\r\n\t} else if (actionStep.at == ActionType::remove) {\r\n\t\tif (changeHistory) {\r\n\t\t\tchangeHistory->DeleteRangeSavingHistory(actionStep.position, actionStep.lenData,\r\n\t\t\t\tuh->BeforeReachableSavePoint(), uh->AfterOrAtDetachPoint());\r\n\t\t}\r\n\t\tBasicDeleteChars(actionStep.position, actionStep.lenData);\r\n\t}\r\n\tif (changeHistory && uh->AfterSavePoint()) {\r\n\t\tchangeHistory->EndReversion();\r\n\t}\r\n\tuh->CompletedRedoStep();\r\n}\r\n\r\nint CellBuffer::UndoActions() const noexcept {\r\n\treturn uh->Actions();\r\n}\r\n\r\nvoid CellBuffer::SetUndoSavePoint(int action) noexcept {\r\n\tuh->SetSavePoint(action);\r\n}\r\n\r\nint CellBuffer::UndoSavePoint() const noexcept {\r\n\treturn uh->SavePoint();\r\n}\r\n\r\nvoid CellBuffer::SetUndoDetach(int action) noexcept {\r\n\tuh->SetDetachPoint(action);\r\n}\r\n\r\nint CellBuffer::UndoDetach() const noexcept {\r\n\treturn uh->DetachPoint();\r\n}\r\n\r\nvoid CellBuffer::SetUndoTentative(int action) noexcept {\r\n\tuh->SetTentative(action);\r\n}\r\n\r\nint CellBuffer::UndoTentative() const noexcept {\r\n\treturn uh->TentativePoint();\r\n}\r\n\r\nnamespace {\r\n\r\nvoid RestoreChangeHistory(const UndoHistory *uh, ChangeHistory *changeHistory) {\r\n\t// Replay all undo actions into changeHistory\r\n\tconst int savePoint = uh->SavePoint();\r\n\tconst int detachPoint = uh->DetachPoint();\r\n\tconst int currentPoint = uh->Current();\r\n\tfor (int act = 0; act < uh->Actions(); act++) {\r\n\t\tconst ActionType type = static_cast<ActionType>(uh->Type(act) & ~coalesceFlag);\r\n\t\tconst Sci::Position position = uh->Position(act);\r\n\t\tconst Sci::Position length = uh->Length(act);\r\n\t\tconst bool beforeSave = act < savePoint || ((detachPoint >= 0) && (detachPoint > act));\r\n\t\tconst bool afterDetach = (detachPoint >= 0) && (detachPoint < act);\r\n\t\tswitch (type) {\r\n\t\tcase ActionType::insert:\r\n\t\t\tchangeHistory->Insert(position, length, true, beforeSave);\r\n\t\t\tbreak;\r\n\t\tcase ActionType::remove:\r\n\t\t\tchangeHistory->DeleteRangeSavingHistory(position, length, beforeSave, afterDetach);\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\t// Only insertions and deletions go into change history\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tchangeHistory->Check();\r\n\t}\r\n\t// Undo back to currentPoint, updating change history\r\n\tfor (int act = uh->Actions() - 1; act >= currentPoint; act--) {\r\n\t\tconst ActionType type = static_cast<ActionType>(uh->Type(act) & ~coalesceFlag);\r\n\t\tconst Sci::Position position = uh->Position(act);\r\n\t\tconst Sci::Position length = uh->Length(act);\r\n\t\tconst bool beforeSave = act < savePoint;\r\n\t\tconst bool afterDetach = (detachPoint >= 0) && (detachPoint < act);\r\n\t\tif (beforeSave) {\r\n\t\t\tchangeHistory->StartReversion();\r\n\t\t}\r\n\t\tswitch (type) {\r\n\t\tcase ActionType::insert:\r\n\t\t\tchangeHistory->DeleteRange(position, length, beforeSave && !afterDetach);\r\n\t\t\tbreak;\r\n\t\tcase ActionType::remove:\r\n\t\t\tchangeHistory->UndoDeleteStep(position, length, afterDetach);\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\t// Only insertions and deletions go into change history\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tchangeHistory->Check();\r\n\t}\r\n}\r\n\r\n}\r\n\r\nvoid CellBuffer::SetUndoCurrent(int action) {\r\n\tuh->SetCurrent(action, Length());\r\n\tif (changeHistory) {\r\n\t\tif ((uh->DetachPoint() >= 0) && (uh->SavePoint() >= 0)) {\r\n\t\t\t// Can't have a valid save point and a valid detach point at same time\r\n\t\t\tuh->DeleteUndoHistory();\r\n\t\t\tchangeHistory.reset();\r\n\t\t\tthrow std::runtime_error(\"UndoHistory::SetCurrent: invalid undo history.\");\r\n\t\t}\r\n\t\tconst intptr_t sizeChange = uh->Delta(action);\r\n\t\tconst intptr_t lengthOriginal = Length() - sizeChange;\r\n\t\t// Recreate empty change history\r\n\t\tchangeHistory = std::make_unique<ChangeHistory>(lengthOriginal);\r\n\t\tRestoreChangeHistory(uh.get(), changeHistory.get());\r\n\t\tif (Length() != changeHistory->Length()) {\r\n\t\t\tuh->DeleteUndoHistory();\r\n\t\t\tchangeHistory.reset();\r\n\t\t\tthrow std::runtime_error(\"UndoHistory::SetCurrent: invalid undo history.\");\r\n\t\t}\r\n\t}\r\n}\r\n\r\nint CellBuffer::UndoCurrent() const noexcept {\r\n\treturn uh->Current();\r\n}\r\n\r\nint CellBuffer::UndoActionType(int action) const noexcept {\r\n\treturn uh->Type(action);\r\n}\r\n\r\nSci::Position CellBuffer::UndoActionPosition(int action) const noexcept {\r\n\treturn uh->Position(action);\r\n}\r\n\r\nstd::string_view CellBuffer::UndoActionText(int action) const noexcept {\r\n\treturn uh->Text(action);\r\n}\r\n\r\nvoid CellBuffer::PushUndoActionType(int type, Sci::Position position) {\r\n\tuh->PushUndoActionType(type, position);\r\n}\r\n\r\nvoid CellBuffer::ChangeLastUndoActionText(size_t length, const char *text) {\r\n\tuh->ChangeLastUndoActionText(length, text);\r\n}\r\n\r\nvoid CellBuffer::ChangeHistorySet(bool set) {\r\n\tif (set) {\r\n\t\tif (!changeHistory && !uh->CanUndo()) {\r\n\t\t\tchangeHistory = std::make_unique<ChangeHistory>(Length());\r\n\t\t}\r\n\t} else {\r\n\t\tchangeHistory.reset();\r\n\t}\r\n}\r\n\r\nint CellBuffer::EditionAt(Sci::Position pos) const noexcept {\r\n\tif (changeHistory) {\r\n\t\treturn changeHistory->EditionAt(pos);\r\n\t}\r\n\treturn 0;\r\n}\r\n\r\nSci::Position CellBuffer::EditionEndRun(Sci::Position pos) const noexcept {\r\n\tif (changeHistory) {\r\n\t\treturn changeHistory->EditionEndRun(pos);\r\n\t}\r\n\treturn Length();\r\n}\r\n\r\nunsigned int CellBuffer::EditionDeletesAt(Sci::Position pos) const noexcept {\r\n\tif (changeHistory) {\r\n\t\treturn changeHistory->EditionDeletesAt(pos);\r\n\t}\r\n\treturn 0;\r\n}\r\n\r\nSci::Position CellBuffer::EditionNextDelete(Sci::Position pos) const noexcept {\r\n\tif (changeHistory) {\r\n\t\treturn changeHistory->EditionNextDelete(pos);\r\n\t}\r\n\treturn Length() + 1;\r\n}\r\n"
  },
  {
    "path": "scintilla/src/CellBuffer.h",
    "content": "// Scintilla source code edit control\r\n/** @file CellBuffer.h\r\n ** Manages the text of the document.\r\n **/\r\n// Copyright 1998-2004 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef CELLBUFFER_H\r\n#define CELLBUFFER_H\r\n\r\nnamespace Scintilla::Internal {\r\n\r\n// Interface to per-line data that wants to see each line insertion and deletion\r\nclass PerLine {\r\npublic:\r\n\tvirtual ~PerLine() {}\r\n\tvirtual void Init()=0;\r\n\tvirtual void InsertLine(Sci::Line line)=0;\r\n\tvirtual void InsertLines(Sci::Line line, Sci::Line lines) = 0;\r\n\tvirtual void RemoveLine(Sci::Line line)=0;\r\n};\r\n\r\nclass UndoHistory;\r\nclass ChangeHistory;\r\n\r\n/**\r\n * The line vector contains information about each of the lines in a cell buffer.\r\n */\r\nclass ILineVector;\r\n\r\nenum class ActionType : unsigned char { insert, remove, container };\r\n\r\n/**\r\n * Actions are used to return the information required to report one undo/redo step.\r\n */\r\nstruct Action {\r\n\tActionType at = ActionType::insert;\r\n\tbool mayCoalesce = false;\r\n\tSci::Position position = 0;\r\n\tconst char *data = nullptr;\r\n\tSci::Position lenData = 0;\r\n};\r\n\r\nstruct SplitView {\r\n\tconst char *segment1 = nullptr;\r\n\tsize_t length1 = 0;\r\n\tconst char *segment2 = nullptr;\r\n\tsize_t length = 0;\r\n\r\n\tbool operator==(const SplitView &other) const noexcept {\r\n\t\treturn segment1 == other.segment1 && length1 == other.length1 &&\r\n\t\t\tsegment2 == other.segment2 && length == other.length;\r\n\t}\r\n\tbool operator!=(const SplitView &other) const noexcept {\r\n\t\treturn !(*this == other);\r\n\t}\r\n\r\n\tchar CharAt(size_t position) const noexcept {\r\n\t\tif (position < length1) {\r\n\t\t\treturn segment1[position];\r\n\t\t}\r\n\t\tif (position < length) {\r\n\t\t\treturn segment2[position];\r\n\t\t}\r\n\t\treturn 0;\r\n\t}\r\n};\r\n\r\n\r\n/**\r\n * Holder for an expandable array of characters that supports undo and line markers.\r\n * Based on article \"Data Structures in a Bit-Mapped Text Editor\"\r\n * by Wilfred J. Hansen, Byte January 1987, page 183.\r\n */\r\nclass CellBuffer {\r\nprivate:\r\n\tbool hasStyles;\r\n\tbool largeDocument;\r\n\tSplitVector<char> substance;\r\n\tSplitVector<char> style;\r\n\tbool readOnly;\r\n\tbool utf8Substance;\r\n\tScintilla::LineEndType utf8LineEnds;\r\n\r\n\tbool collectingUndo;\r\n\tstd::unique_ptr<UndoHistory> uh;\r\n\r\n\tstd::unique_ptr<ChangeHistory> changeHistory;\r\n\r\n\tstd::unique_ptr<ILineVector> plv;\r\n\r\n\tbool UTF8LineEndOverlaps(Sci::Position position) const noexcept;\r\n\tbool UTF8IsCharacterBoundary(Sci::Position position) const;\r\n\tvoid ResetLineEnds();\r\n\tvoid RecalculateIndexLineStarts(Sci::Line lineFirst, Sci::Line lineLast);\r\n\tbool MaintainingLineCharacterIndex() const noexcept;\r\n\t/// Actions without undo\r\n\tvoid BasicInsertString(Sci::Position position, const char *s, Sci::Position insertLength);\r\n\tvoid BasicDeleteChars(Sci::Position position, Sci::Position deleteLength);\r\n\r\npublic:\r\n\r\n\tCellBuffer(bool hasStyles_, bool largeDocument_);\r\n\t// Deleted so CellBuffer objects can not be copied.\r\n\tCellBuffer(const CellBuffer &) = delete;\r\n\tCellBuffer(CellBuffer &&) = delete;\r\n\tCellBuffer &operator=(const CellBuffer &) = delete;\r\n\tCellBuffer &operator=(CellBuffer &&) = delete;\r\n\t~CellBuffer() noexcept;\r\n\r\n\t/// Retrieving positions outside the range of the buffer works and returns 0\r\n\tchar CharAt(Sci::Position position) const noexcept;\r\n\tunsigned char UCharAt(Sci::Position position) const noexcept;\r\n\tvoid GetCharRange(char *buffer, Sci::Position position, Sci::Position lengthRetrieve) const;\r\n\tchar StyleAt(Sci::Position position) const noexcept;\r\n\tvoid GetStyleRange(unsigned char *buffer, Sci::Position position, Sci::Position lengthRetrieve) const;\r\n\tconst char *BufferPointer();\r\n\tconst char *RangePointer(Sci::Position position, Sci::Position rangeLength) noexcept;\r\n\tSci::Position GapPosition() const noexcept;\r\n\tSplitView AllView() const noexcept;\r\n\r\n\tSci::Position Length() const noexcept;\r\n\tvoid Allocate(Sci::Position newSize);\r\n\tvoid SetUTF8Substance(bool utf8Substance_) noexcept;\r\n\tScintilla::LineEndType GetLineEndTypes() const noexcept { return utf8LineEnds; }\r\n\tvoid SetLineEndTypes(Scintilla::LineEndType utf8LineEnds_);\r\n\tbool ContainsLineEnd(const char *s, Sci::Position length) const noexcept;\r\n\tvoid SetPerLine(PerLine *pl) noexcept;\r\n\tScintilla::LineCharacterIndexType LineCharacterIndex() const noexcept;\r\n\tvoid AllocateLineCharacterIndex(Scintilla::LineCharacterIndexType lineCharacterIndex);\r\n\tvoid ReleaseLineCharacterIndex(Scintilla::LineCharacterIndexType lineCharacterIndex);\r\n\tSci::Line Lines() const noexcept;\r\n\tvoid AllocateLines(Sci::Line lines);\r\n\tSci::Position LineStart(Sci::Line line) const noexcept;\r\n\tSci::Position LineEnd(Sci::Line line) const noexcept;\r\n\tSci::Position IndexLineStart(Sci::Line line, Scintilla::LineCharacterIndexType lineCharacterIndex) const noexcept;\r\n\tSci::Line LineFromPosition(Sci::Position pos) const noexcept;\r\n\tSci::Line LineFromPositionIndex(Sci::Position pos, Scintilla::LineCharacterIndexType lineCharacterIndex) const noexcept;\r\n\tvoid InsertLine(Sci::Line line, Sci::Position position, bool lineStart);\r\n\tvoid RemoveLine(Sci::Line line);\r\n\tconst char *InsertString(Sci::Position position, const char *s, Sci::Position insertLength, bool &startSequence);\r\n\r\n\t/// Setting styles for positions outside the range of the buffer is safe and has no effect.\r\n\t/// @return true if the style of a character is changed.\r\n\tbool SetStyleAt(Sci::Position position, char styleValue) noexcept;\r\n\tbool SetStyleFor(Sci::Position position, Sci::Position lengthStyle, char styleValue) noexcept;\r\n\r\n\tconst char *DeleteChars(Sci::Position position, Sci::Position deleteLength, bool &startSequence);\r\n\r\n\tbool IsReadOnly() const noexcept;\r\n\tvoid SetReadOnly(bool set) noexcept;\r\n\tbool IsLarge() const noexcept;\r\n\tbool HasStyles() const noexcept;\r\n\r\n\t/// The save point is a marker in the undo stack where the container has stated that\r\n\t/// the buffer was saved. Undo and redo can move over the save point.\r\n\tvoid SetSavePoint();\r\n\tbool IsSavePoint() const noexcept;\r\n\r\n\tvoid TentativeStart() noexcept;\r\n\tvoid TentativeCommit() noexcept;\r\n\tbool TentativeActive() const noexcept;\r\n\tint TentativeSteps() noexcept;\r\n\r\n\tbool SetUndoCollection(bool collectUndo) noexcept;\r\n\tbool IsCollectingUndo() const noexcept;\r\n\tvoid BeginUndoAction(bool mayCoalesce=false) noexcept;\r\n\tvoid EndUndoAction() noexcept;\r\n\tvoid AddUndoAction(Sci::Position token, bool mayCoalesce);\r\n\tvoid DeleteUndoHistory() noexcept;\r\n\r\n\t/// To perform an undo, StartUndo is called to retrieve the number of steps, then UndoStep is\r\n\t/// called that many times. Similarly for redo.\r\n\tbool CanUndo() const noexcept;\r\n\tint StartUndo() noexcept;\r\n\tAction GetUndoStep() const noexcept;\r\n\tvoid PerformUndoStep();\r\n\tbool CanRedo() const noexcept;\r\n\tint StartRedo() noexcept;\r\n\tAction GetRedoStep() const noexcept;\r\n\tvoid PerformRedoStep();\r\n\r\n\tint UndoActions() const noexcept;\r\n\tvoid SetUndoSavePoint(int action) noexcept;\r\n\tint UndoSavePoint() const noexcept;\r\n\tvoid SetUndoDetach(int action) noexcept;\r\n\tint UndoDetach() const noexcept;\r\n\tvoid SetUndoTentative(int action) noexcept;\r\n\tint UndoTentative() const noexcept;\r\n\tvoid SetUndoCurrent(int action);\r\n\tint UndoCurrent() const noexcept;\r\n\tint UndoActionType(int action) const noexcept;\r\n\tSci::Position UndoActionPosition(int action) const noexcept;\r\n\tstd::string_view UndoActionText(int action) const noexcept;\r\n\tvoid PushUndoActionType(int type, Sci::Position position);\r\n\tvoid ChangeLastUndoActionText(size_t length, const char *text);\r\n\r\n\tvoid ChangeHistorySet(bool set);\r\n\t[[nodiscard]] int EditionAt(Sci::Position pos) const noexcept;\r\n\t[[nodiscard]] Sci::Position EditionEndRun(Sci::Position pos) const noexcept;\r\n\t[[nodiscard]] unsigned int EditionDeletesAt(Sci::Position pos) const noexcept;\r\n\t[[nodiscard]] Sci::Position EditionNextDelete(Sci::Position pos) const noexcept;\r\n};\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/src/ChangeHistory.cxx",
    "content": "// Scintilla source code edit control\r\n/** @file ChangeHistory.cxx\r\n ** Manages a history of changes in a document.\r\n **/\r\n// Copyright 2022 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#include <cstddef>\r\n#include <cstdlib>\r\n#include <cassert>\r\n#include <cstdint>\r\n\r\n#include <stdexcept>\r\n#include <vector>\r\n#include <set>\r\n#include <algorithm>\r\n#include <memory>\r\n\r\n#include \"ScintillaTypes.h\"\r\n\r\n#include \"Debugging.h\"\r\n\r\n#include \"Position.h\"\r\n#include \"SplitVector.h\"\r\n#include \"Partitioning.h\"\r\n#include \"RunStyles.h\"\r\n#include \"SparseVector.h\"\r\n#include \"ChangeHistory.h\"\r\n\r\nnamespace Scintilla::Internal {\r\n\r\nvoid ChangeStack::Clear() noexcept {\r\n\tsteps.clear();\r\n\tchanges.clear();\r\n}\r\n\r\nvoid ChangeStack::AddStep() {\r\n\tsteps.push_back(0);\r\n}\r\n\r\nnamespace {\r\n\r\nconstexpr bool InsertionSpanSameDeletion(const ChangeSpan &is, Sci::Position positionDeletion, int edition) {\r\n\t// Equal except for count\r\n\treturn\r\n\t\tis.direction == ChangeSpan::Direction::deletion &&\r\n\t\tis.start == positionDeletion &&\r\n\t\tis.length == 0 &&\r\n\t\tis.edition == edition;\r\n}\r\n\r\n}\r\n\r\nvoid ChangeStack::PushDeletion(Sci::Position positionDeletion, const EditionCount &ec) {\r\n\tsteps.back() += ec.count;\r\n\tif (changes.empty() || !InsertionSpanSameDeletion(changes.back(), positionDeletion, ec.edition)) {\r\n\t\tchanges.push_back({ positionDeletion, 0, ec.edition, ec.count, ChangeSpan::Direction::deletion });\r\n\t} else {\r\n\t\tchanges.back().count += ec.count;\r\n\t}\r\n}\r\n\r\nvoid ChangeStack::PushInsertion(Sci::Position positionInsertion, Sci::Position length, int edition) {\r\n\tsteps.back()++;\r\n\tchanges.push_back({ positionInsertion, length, edition, 1, ChangeSpan::Direction::insertion });\r\n}\r\n\r\nint ChangeStack::PopStep() noexcept {\r\n\tconst int spans = steps.back();\r\n\tsteps.pop_back();\r\n\treturn spans;\r\n}\r\n\r\nChangeSpan ChangeStack::PopSpan(int maxSteps) noexcept {\r\n\tChangeSpan span = changes.back();\r\n\tconst int remove = std::min(maxSteps, span.count);\r\n\tif (span.count == remove) {\r\n\t\tchanges.pop_back();\r\n\t} else {\r\n\t\tchanges.back().count -= remove;\r\n\t\tspan.count = remove;\r\n\t}\r\n\treturn span;\r\n}\r\n\r\nvoid ChangeStack::SetSavePoint() noexcept {\r\n\t// Switch changeUnsaved to changeSaved\r\n\tfor (ChangeSpan &x : changes) {\r\n\t\tif (x.edition == changeModified) {\r\n\t\t\tx.edition = changeSaved;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid ChangeStack::Check() const noexcept {\r\n#ifdef _DEBUG\r\n\t// Ensure count in steps same as insertions;\r\n\tint sizeSteps = 0;\r\n\tfor (const int c : steps) {\r\n\t\tsizeSteps += c;\r\n\t}\r\n\tint sizeInsertions = 0;\r\n\tfor (const ChangeSpan &is: changes) {\r\n\t\tsizeInsertions += is.count;\r\n\t}\r\n\tassert(sizeSteps == sizeInsertions);\r\n#endif\r\n}\r\n\r\nvoid ChangeLog::Clear(Sci::Position length) {\r\n\tchangeStack.Clear();\r\n\tinsertEdition.DeleteAll();\r\n\tdeleteEdition.DeleteAll();\r\n\tInsertSpace(0, length);\r\n}\r\n\r\nvoid ChangeLog::InsertSpace(Sci::Position position, Sci::Position insertLength) {\r\n\tassert(insertEdition.Length() == deleteEdition.Length());\r\n\tinsertEdition.InsertSpace(position, insertLength);\r\n\tdeleteEdition.InsertSpace(position, insertLength);\r\n}\r\n\r\nvoid ChangeLog::DeleteRange(Sci::Position position, Sci::Position deleteLength) {\r\n\tinsertEdition.DeleteRange(position, deleteLength);\r\n\tconst EditionSetOwned &editions = deleteEdition.ValueAt(position);\r\n\tif (editions) {\r\n\t\tconst EditionSet savedEditions = *editions;\r\n\t\tdeleteEdition.DeleteRange(position, deleteLength);\r\n\t\tEditionSetOwned reset = std::make_unique<EditionSet>(savedEditions);\r\n\t\tdeleteEdition.SetValueAt(position, std::move(reset));\r\n\t} else {\r\n\t\tdeleteEdition.DeleteRange(position, deleteLength);\r\n\t}\r\n\tassert(insertEdition.Length() == deleteEdition.Length());\r\n}\r\n\r\nvoid ChangeLog::Insert(Sci::Position start, Sci::Position length, int edition) {\r\n\tinsertEdition.FillRange(start, edition, length);\r\n}\r\n\r\nvoid ChangeLog::CollapseRange(Sci::Position position, Sci::Position deleteLength) {\r\n\tconst Sci::Position positionMax = position + deleteLength;\r\n\tSci::Position positionDeletion = position + 1;\r\n\twhile (positionDeletion <= positionMax) {\r\n\t\tconst EditionSetOwned &editions = deleteEdition.ValueAt(positionDeletion);\r\n\t\tif (editions) {\r\n\t\t\tfor (const EditionCount &ec : *editions) {\r\n\t\t\t\tPushDeletionAt(position, ec);\r\n\t\t\t}\r\n\t\t\tEditionSetOwned empty;\r\n\t\t\tdeleteEdition.SetValueAt(positionDeletion, std::move(empty));\r\n\t\t}\r\n\t\tpositionDeletion = deleteEdition.PositionNext(positionDeletion);\r\n\t}\r\n}\r\n\r\nnamespace {\r\n\r\n// EditionSets have repeat counts on items so push and pop may just\r\n// manipulate the count field or may push/pop items.\r\n\r\nvoid EditionSetPush(EditionSet &set, EditionCount ec) {\r\n\tif (set.empty() || (set.back().edition != ec.edition)) {\r\n\t\tset.push_back(ec);\r\n\t} else {\r\n\t\tset.back().count += ec.count;\r\n\t}\r\n}\r\n\r\nvoid EditionSetPop(EditionSet &set) noexcept {\r\n\tif (set.back().count == 1) {\r\n\t\tset.pop_back();\r\n\t} else {\r\n\t\tset.back().count--;\r\n\t}\r\n}\r\n\r\nint EditionSetCount(const EditionSet &set) noexcept {\r\n\tint count = 0;\r\n\tfor (const EditionCount &ec : set) {\r\n\t\tcount += ec.count;\r\n\t}\r\n\treturn count;\r\n}\r\n\r\n}\r\n\r\nvoid ChangeLog::PushDeletionAt(Sci::Position position, EditionCount ec) {\r\n\tif (!deleteEdition.ValueAt(position)) {\r\n\t\tdeleteEdition.SetValueAt(position, std::make_unique<EditionSet>());\r\n\t}\r\n\tEditionSetPush(*deleteEdition.ValueAt(position), ec);\r\n}\r\n\r\nvoid ChangeLog::InsertFrontDeletionAt(Sci::Position position, EditionCount ec) {\r\n\tif (!deleteEdition.ValueAt(position)) {\r\n\t\tdeleteEdition.SetValueAt(position, std::make_unique<EditionSet>());\r\n\t}\r\n\tconst EditionSetOwned &editions = deleteEdition.ValueAt(position);\r\n\teditions->insert(editions->begin(), ec);\r\n}\r\n\r\nvoid ChangeLog::SaveRange(Sci::Position position, Sci::Position length) {\r\n\t// Save insertEdition range into undo stack\r\n\tchangeStack.AddStep();\r\n\tSci::Position positionInsertion = position;\r\n\tconst ptrdiff_t editionStart = insertEdition.ValueAt(positionInsertion);\r\n\tif (editionStart == 0) {\r\n\t\tpositionInsertion = insertEdition.EndRun(positionInsertion);\r\n\t}\r\n\tconst Sci::Position positionMax = position + length;\r\n\twhile (positionInsertion < positionMax) {\r\n\t\tconst Sci::Position positionEndInsertion = insertEdition.EndRun(positionInsertion);\r\n\t\tchangeStack.PushInsertion(positionInsertion, std::min(positionEndInsertion, positionMax) - positionInsertion,\r\n\t\t\tinsertEdition.ValueAt(positionInsertion));\r\n\t\tpositionInsertion = insertEdition.EndRun(positionEndInsertion);\r\n\t}\r\n\tSci::Position positionDeletion = position + 1;\r\n\twhile (positionDeletion <= positionMax) {\r\n\t\tconst EditionSetOwned &editions = deleteEdition.ValueAt(positionDeletion);\r\n\t\tif (editions) {\r\n\t\t\tfor (const EditionCount &ec : *editions) {\r\n\t\t\t\tchangeStack.PushDeletion(positionDeletion, ec);\r\n\t\t\t}\r\n\t\t}\r\n\t\tpositionDeletion = deleteEdition.PositionNext(positionDeletion);\r\n\t}\r\n}\r\n\r\nvoid ChangeLog::PopDeletion(Sci::Position position, Sci::Position deleteLength) {\r\n\t// Just performed InsertSpace(position, deleteLength) so *this* element in\r\n\t// deleteEdition moved forward by deleteLength\r\n\tEditionSetOwned eso = deleteEdition.Extract(position + deleteLength);\r\n\tdeleteEdition.SetValueAt(position, std::move(eso));\r\n\tconst EditionSetOwned &editions = deleteEdition.ValueAt(position);\r\n\tassert(editions);\r\n\tEditionSetPop(*editions);\r\n\tconst int inserts = changeStack.PopStep();\r\n\tfor (int i = 0; i < inserts;) {\r\n\t\tconst ChangeSpan span = changeStack.PopSpan(inserts);\r\n\t\tif (span.direction == ChangeSpan::Direction::insertion) {\r\n\t\t\tassert(span.count == 1);\t// Insertions are never compressed\r\n\t\t\tinsertEdition.FillRange(span.start, span.edition, span.length);\r\n\t\t\ti++;\r\n\t\t} else {\r\n\t\t\tassert(editions);\r\n\t\t\tassert(editions->back().edition == span.edition);\r\n\t\t\tfor (int j = 0; j < span.count; j++) {\r\n\t\t\t\tEditionSetPop(*editions);\r\n\t\t\t}\r\n\t\t\t// Iterating backwards (pop) through changeStack, reverse order of insertion\r\n\t\t\t// and original deletion list.\r\n\t\t\t// Therefore need to insert at front to recreate original order.\r\n\t\t\tInsertFrontDeletionAt(span.start, { span.edition, span.count });\r\n\t\t\ti += span.count;\r\n\t\t}\r\n\t}\r\n\r\n\tif (editions->empty()) {\r\n\t\tdeleteEdition.SetValueAt(position, EditionSetOwned{});\r\n\t}\r\n}\r\n\r\nvoid ChangeLog::SaveHistoryForDelete(Sci::Position position, Sci::Position deleteLength) {\r\n\tassert(position >= 0);\r\n\tassert(deleteLength >= 0);\r\n\tassert(position + deleteLength <= Length());\r\n\tSaveRange(position, deleteLength);\r\n\tCollapseRange(position, deleteLength);\r\n}\r\n\r\nvoid ChangeLog::DeleteRangeSavingHistory(Sci::Position position, Sci::Position deleteLength) {\r\n\tSaveHistoryForDelete(position, deleteLength);\r\n\tDeleteRange(position, deleteLength);\r\n}\r\n\r\nvoid ChangeLog::SetSavePoint() {\r\n\t// Switch changeUnsaved to changeSaved\r\n\tchangeStack.SetSavePoint();\r\n\r\n\tconst Sci::Position length = insertEdition.Length();\r\n\r\n\tfor (Sci::Position startRun = 0; startRun < length;) {\r\n\t\tconst Sci::Position endRun = insertEdition.EndRun(startRun);\r\n\t\tif (insertEdition.ValueAt(startRun) == changeModified) {\r\n\t\t\tinsertEdition.FillRange(startRun, changeSaved, endRun - startRun);\r\n\t\t}\r\n\t\tstartRun = endRun;\r\n\t}\r\n\r\n\tfor (Sci::Position positionDeletion = 0; positionDeletion <= length;) {\r\n\t\tconst EditionSetOwned &editions = deleteEdition.ValueAt(positionDeletion);\r\n\t\tif (editions) {\r\n\t\t\tfor (EditionCount &ec : *editions) {\r\n\t\t\t\tif (ec.edition == changeModified) {\r\n\t\t\t\t\tec.edition = changeSaved;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tpositionDeletion = deleteEdition.PositionNext(positionDeletion);\r\n\t}\r\n}\r\n\r\nSci::Position ChangeLog::Length() const noexcept {\r\n\treturn insertEdition.Length();\r\n}\r\n\r\nsize_t ChangeLog::DeletionCount(Sci::Position start, Sci::Position length) const noexcept {\r\n\tconst Sci::Position end = start + length;\r\n\tsize_t count = 0;\r\n\twhile (start <= end) {\r\n\t\tconst EditionSetOwned &editions = deleteEdition.ValueAt(start);\r\n\t\tif (editions) {\r\n\t\t\tcount += EditionSetCount(*editions);\r\n\t\t}\r\n\t\tstart = deleteEdition.PositionNext(start);\r\n\t}\r\n\treturn count;\r\n}\r\n\r\nvoid ChangeLog::Check() const noexcept {\r\n\tassert(insertEdition.Length() == deleteEdition.Length());\r\n\tchangeStack.Check();\r\n}\r\n\r\nChangeHistory::ChangeHistory(Sci::Position length) {\r\n\tchangeLog.Clear(length);\r\n}\r\n\r\nvoid ChangeHistory::Insert(Sci::Position position, Sci::Position insertLength, bool collectingUndo, bool beforeSave) {\r\n\tCheck();\r\n\tchangeLog.InsertSpace(position, insertLength);\r\n\tconst int edition = collectingUndo ? (beforeSave ? changeSaved : changeModified) :\r\n\t\tchangeOriginal;\r\n\tchangeLog.Insert(position, insertLength, edition);\r\n\tif (changeLogReversions) {\r\n\t\tchangeLogReversions->InsertSpace(position, insertLength);\r\n\t\tif (beforeSave) {\r\n\t\t\tchangeLogReversions->PopDeletion(position, insertLength);\r\n\t\t}\r\n\t}\r\n\tCheck();\r\n}\r\n\r\nvoid ChangeHistory::DeleteRange(Sci::Position position, Sci::Position deleteLength, bool reverting) {\r\n\tCheck();\r\n\tassert(DeletionCount(position, deleteLength-1) == 0);\r\n\tchangeLog.DeleteRange(position, deleteLength);\r\n\tif (changeLogReversions) {\r\n\t\tchangeLogReversions->DeleteRangeSavingHistory(position, deleteLength);\r\n\t\tif (reverting) {\r\n\t\t\tchangeLogReversions->PushDeletionAt(position, { changeRevertedOriginal, 1 });\r\n\t\t}\r\n\t}\r\n\tCheck();\r\n}\r\n\r\nvoid ChangeHistory::DeleteRangeSavingHistory(Sci::Position position, Sci::Position deleteLength, bool beforeSave, bool isDetached) {\r\n\tchangeLog.DeleteRangeSavingHistory(position, deleteLength);\r\n\tchangeLog.PushDeletionAt(position, { beforeSave ? changeSaved : changeModified, 1 });\r\n\tif (changeLogReversions) {\r\n\t\tif (isDetached) {\r\n\t\t\tchangeLogReversions->SaveHistoryForDelete(position, deleteLength);\r\n\t\t}\r\n\t\tchangeLogReversions->DeleteRange(position, deleteLength);\r\n\t}\r\n\tCheck();\r\n}\r\n\r\nvoid ChangeHistory::StartReversion() {\r\n\tif (!changeLogReversions) {\r\n\t\tchangeLogReversions = std::make_unique<ChangeLog>();\r\n\t\tchangeLogReversions->Clear(changeLog.Length());\r\n\t}\r\n\tCheck();\r\n}\r\n\r\nvoid ChangeHistory::EndReversion() noexcept {\r\n\tchangeLogReversions.reset();\r\n\tCheck();\r\n}\r\n\r\nvoid ChangeHistory::SetSavePoint() {\r\n\tchangeLog.SetSavePoint();\r\n\tEndReversion();\r\n}\r\n\r\nvoid ChangeHistory::UndoDeleteStep(Sci::Position position, Sci::Position deleteLength, bool isDetached) {\r\n\tCheck();\r\n\tchangeLog.InsertSpace(position, deleteLength);\r\n\tchangeLog.PopDeletion(position, deleteLength);\r\n\tif (changeLogReversions) {\r\n\t\tchangeLogReversions->InsertSpace(position, deleteLength);\r\n\t\tif (!isDetached) {\r\n\t\t\tchangeLogReversions->Insert(position, deleteLength, 1);\r\n\t\t}\r\n\t}\r\n\tCheck();\r\n}\r\n\r\nSci::Position ChangeHistory::Length() const noexcept {\r\n\treturn changeLog.Length();\r\n}\r\n\r\nvoid ChangeHistory::SetEpoch(int epoch) noexcept {\r\n\thistoricEpoch = epoch;\r\n}\r\n\r\nvoid ChangeHistory::EditionCreateHistory(Sci::Position start, Sci::Position length) {\r\n\tif (start <= changeLog.Length()) {\r\n\t\tif (length) {\r\n\t\t\tchangeLog.insertEdition.FillRange(start, historicEpoch, length);\r\n\t\t} else {\r\n\t\t\tchangeLog.PushDeletionAt(start, { historicEpoch, 1 });\r\n\t\t}\r\n\t}\r\n}\r\n\r\n// Editions:\r\n// <0 History\r\n// 0 Original unchanged\r\n// 1 Reverted to origin\r\n// 2 Saved\r\n// 3 Unsaved\r\n// 4 Reverted to change\r\nint ChangeHistory::EditionAt(Sci::Position pos) const noexcept {\r\n\tconst int edition = changeLog.insertEdition.ValueAt(pos);\r\n\tif (changeLogReversions) {\r\n\t\tconst int editionReversion = changeLogReversions->insertEdition.ValueAt(pos);\r\n\t\tif (editionReversion) {\r\n\t\t\tif (edition < 0)\t// Historical revision\r\n\t\t\t\treturn changeRevertedOriginal;\r\n\t\t\treturn edition ? changeRevertedToChange : changeRevertedOriginal;\r\n\t\t}\r\n\t}\r\n\treturn edition;\r\n}\r\n\r\nSci::Position ChangeHistory::EditionEndRun(Sci::Position pos) const noexcept {\r\n\tif (changeLogReversions) {\r\n\t\tassert(changeLogReversions->Length() == changeLog.Length());\r\n\t\tconst Sci::Position nextReversion = changeLogReversions->insertEdition.EndRun(pos);\r\n\t\tconst Sci::Position next = changeLog.insertEdition.EndRun(pos);\r\n\t\treturn std::min(next, nextReversion);\r\n\t}\r\n\treturn changeLog.insertEdition.EndRun(pos);\r\n}\r\n\r\n// Produce a 4-bit value from the deletions at a position\r\nunsigned int ChangeHistory::EditionDeletesAt(Sci::Position pos) const noexcept {\r\n\tunsigned int editionSet = 0;\r\n\tconst EditionSetOwned &editionSetDeletions = changeLog.deleteEdition.ValueAt(pos);\r\n\tif (editionSetDeletions) {\r\n\t\tfor (const EditionCount &ec : *editionSetDeletions) {\r\n\t\t\teditionSet = editionSet | (1u << (ec.edition-1));\r\n\t\t}\r\n\t}\r\n\tif (changeLogReversions) {\r\n\t\tconst EditionSetOwned &editionSetReversions = changeLogReversions->deleteEdition.ValueAt(pos);\r\n\t\tif (editionSetReversions) {\r\n\t\t\t// If there is no saved or modified -> revertedToOrigin\r\n\t\t\tif (!(editionSet & (bitSaved | bitModified))) {\r\n\t\t\t\teditionSet = editionSet | bitRevertedToOriginal;\r\n\t\t\t} else {\r\n\t\t\t\teditionSet = editionSet | bitRevertedToModified;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn editionSet;\r\n}\r\n\r\nSci::Position ChangeHistory::EditionNextDelete(Sci::Position pos) const noexcept {\r\n\tconst Sci::Position next = changeLog.deleteEdition.PositionNext(pos);\r\n\tif (changeLogReversions) {\r\n\t\tconst Sci::Position nextReversion = changeLogReversions->deleteEdition.PositionNext(pos);\r\n\t\treturn std::min(next, nextReversion);\r\n\t}\r\n\treturn next;\r\n}\r\n\r\nsize_t ChangeHistory::DeletionCount(Sci::Position start, Sci::Position length) const noexcept {\r\n\treturn changeLog.DeletionCount(start, length);\r\n}\r\n\r\nEditionSet ChangeHistory::DeletionsAt(Sci::Position pos) const {\r\n\tconst EditionSetOwned &editions = changeLog.deleteEdition.ValueAt(pos);\r\n\tif (editions) {\r\n\t\treturn *editions;\r\n\t}\r\n\treturn {};\r\n}\r\n\r\nvoid ChangeHistory::Check() noexcept {\r\n\tchangeLog.Check();\r\n\tif (changeLogReversions) {\r\n\t\tchangeLogReversions->Check();\r\n\t\tassert(changeLogReversions->Length() == changeLog.Length());\r\n\t}\r\n}\r\n\r\n}\r\n"
  },
  {
    "path": "scintilla/src/ChangeHistory.h",
    "content": "// Scintilla source code edit control\r\n/** @file ChangeHistory.h\r\n ** Manages a history of changes in a document.\r\n **/\r\n// Copyright 2022 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef CHANGEHISTORY_H\r\n#define CHANGEHISTORY_H\r\n\r\nnamespace Scintilla::Internal {\r\n\r\nconstexpr int changeOriginal = 0;\r\nconstexpr int changeRevertedOriginal = 1;\r\nconstexpr int changeSaved = 2;\r\nconstexpr int changeModified = 3;\r\nconstexpr int changeRevertedToChange = 4;\r\n\r\n// As bit flags\r\nconstexpr unsigned int bitRevertedToOriginal = 1;\r\nconstexpr unsigned int bitSaved = 2;\r\nconstexpr unsigned int bitModified = 4;\r\nconstexpr unsigned int bitRevertedToModified = 8;\r\n\r\nstruct ChangeSpan {\r\n\tSci::Position start;\r\n\tSci::Position length;\r\n\tint edition;\r\n\tint count;\r\n\tenum class Direction { insertion, deletion } direction;\r\n};\r\n\r\nstruct EditionCount {\r\n\tint edition;\r\n\tint count;\r\n\t// Used in tests.\r\n\tconstexpr bool operator==(const EditionCount &other) const noexcept {\r\n\t\treturn (edition == other.edition) && (count == other.count);\r\n\t}\r\n};\r\n\r\n// EditionSet is ordered from oldest to newest, its not really a set\r\nusing EditionSet = std::vector<EditionCount>;\r\nusing EditionSetOwned = std::unique_ptr<EditionSet>;\r\n\r\nclass ChangeStack {\r\n\tstd::vector<int> steps;\r\n\tstd::vector<ChangeSpan> changes;\r\npublic:\r\n\tvoid Clear() noexcept;\r\n\tvoid AddStep();\r\n\tvoid PushDeletion(Sci::Position positionDeletion, const EditionCount &ec);\r\n\tvoid PushInsertion(Sci::Position positionInsertion, Sci::Position length, int edition);\r\n\t[[nodiscard]] int PopStep() noexcept;\r\n\t[[nodiscard]] ChangeSpan PopSpan(int maxSteps) noexcept;\r\n\tvoid SetSavePoint() noexcept;\r\n\tvoid Check() const noexcept;\r\n};\r\n\r\nstruct ChangeLog {\r\n\tChangeStack changeStack;\r\n\tRunStyles<Sci::Position, int> insertEdition;\r\n\tSparseVector<EditionSetOwned> deleteEdition;\r\n\r\n\tvoid Clear(Sci::Position length);\r\n\tvoid InsertSpace(Sci::Position position, Sci::Position insertLength);\r\n\tvoid DeleteRange(Sci::Position position, Sci::Position deleteLength);\r\n\tvoid Insert(Sci::Position start, Sci::Position length, int edition);\r\n\tvoid CollapseRange(Sci::Position position, Sci::Position deleteLength);\r\n\tvoid PushDeletionAt(Sci::Position position, EditionCount ec);\r\n\tvoid InsertFrontDeletionAt(Sci::Position position, EditionCount ec);\r\n\tvoid SaveRange(Sci::Position position, Sci::Position length);\r\n\tvoid PopDeletion(Sci::Position position, Sci::Position deleteLength);\r\n\tvoid SaveHistoryForDelete(Sci::Position position, Sci::Position deleteLength);\r\n\tvoid DeleteRangeSavingHistory(Sci::Position position, Sci::Position deleteLength);\r\n\tvoid SetSavePoint();\r\n\r\n\tSci::Position Length() const noexcept;\r\n\t[[nodiscard]] size_t DeletionCount(Sci::Position start, Sci::Position length) const noexcept;\r\n\tvoid Check() const noexcept;\r\n};\r\n\r\nenum class ReversionState { clear, reverting, detached };\r\n\r\nclass ChangeHistory {\r\n\tChangeLog changeLog;\r\n\tstd::unique_ptr<ChangeLog> changeLogReversions;\r\n\tint historicEpoch = -1;\r\n\r\npublic:\r\n\tChangeHistory(Sci::Position length=0);\r\n\r\n\tvoid Insert(Sci::Position position, Sci::Position insertLength, bool collectingUndo, bool beforeSave);\r\n\tvoid DeleteRange(Sci::Position position, Sci::Position deleteLength, bool reverting);\r\n\tvoid DeleteRangeSavingHistory(Sci::Position position, Sci::Position deleteLength, bool beforeSave, bool isDetached);\r\n\r\n\tvoid StartReversion();\r\n\tvoid EndReversion() noexcept;\r\n\r\n\tvoid SetSavePoint();\r\n\r\n\tvoid UndoDeleteStep(Sci::Position position, Sci::Position deleteLength, bool isDetached);\r\n\r\n\t[[nodiscard]] Sci::Position Length() const noexcept;\r\n\r\n\t// Setting up history before this session\r\n\tvoid SetEpoch(int epoch) noexcept;\r\n\tvoid EditionCreateHistory(Sci::Position start, Sci::Position length);\r\n\r\n\t// Queries for drawing\r\n\t[[nodiscard]] int EditionAt(Sci::Position pos) const noexcept;\r\n\t[[nodiscard]] Sci::Position EditionEndRun(Sci::Position pos) const noexcept;\r\n\t[[nodiscard]] unsigned int EditionDeletesAt(Sci::Position pos) const noexcept;\r\n\t[[nodiscard]] Sci::Position EditionNextDelete(Sci::Position pos) const noexcept;\r\n\r\n\t// Testing - not used by Scintilla\r\n\t[[nodiscard]] size_t DeletionCount(Sci::Position start, Sci::Position length) const noexcept;\r\n\tEditionSet DeletionsAt(Sci::Position pos) const;\r\n\tvoid Check() noexcept;\r\n};\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/src/CharClassify.cxx",
    "content": "// Scintilla source code edit control\r\n/** @file CharClassify.cxx\r\n ** Character classifications used by Document and RESearch.\r\n **/\r\n// Copyright 2006 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#include <cstdlib>\r\n#include <cassert>\r\n#include <cstdint>\r\n\r\n#include <stdexcept>\r\n\r\n#include \"CharacterType.h\"\r\n#include \"CharClassify.h\"\r\n\r\nusing namespace Scintilla::Internal;\r\n\r\nCharClassify::CharClassify() : charClass{} {\r\n\tSetDefaultCharClasses(true);\r\n}\r\n\r\nvoid CharClassify::SetDefaultCharClasses(bool includeWordClass) {\r\n\t// Initialize all char classes to default values\r\n\tfor (int ch = 0; ch < maxChar; ch++) {\r\n\t\tif (ch == '\\r' || ch == '\\n')\r\n\t\t\tcharClass[ch] = CharacterClass::newLine;\r\n\t\telse if (IsControl(ch) || ch == ' ')\r\n\t\t\tcharClass[ch] = CharacterClass::space;\r\n\t\telse if (includeWordClass && (ch >= 0x80 || IsAlphaNumeric(ch) || ch == '_'))\r\n\t\t\tcharClass[ch] = CharacterClass::word;\r\n\t\telse\r\n\t\t\tcharClass[ch] = CharacterClass::punctuation;\r\n\t}\r\n}\r\n\r\nvoid CharClassify::SetCharClasses(const unsigned char *chars, CharacterClass newCharClass) {\r\n\t// Apply the newCharClass to the specified chars\r\n\tif (chars) {\r\n\t\twhile (*chars) {\r\n\t\t\tcharClass[*chars] = newCharClass;\r\n\t\t\tchars++;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nint CharClassify::GetCharsOfClass(CharacterClass characterClass, unsigned char *buffer) const noexcept {\r\n\t// Get characters belonging to the given char class; return the number\r\n\t// of characters (if the buffer is NULL, don't write to it).\r\n\tint count = 0;\r\n\tfor (int ch = maxChar - 1; ch >= 0; --ch) {\r\n\t\tif (charClass[ch] == characterClass) {\r\n\t\t\t++count;\r\n\t\t\tif (buffer) {\r\n\t\t\t\t*buffer = static_cast<unsigned char>(ch);\r\n\t\t\t\tbuffer++;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn count;\r\n}\r\n"
  },
  {
    "path": "scintilla/src/CharClassify.h",
    "content": "// Scintilla source code edit control\r\n/** @file CharClassify.h\r\n ** Character classifications used by Document and RESearch.\r\n **/\r\n// Copyright 2006-2009 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef CHARCLASSIFY_H\r\n#define CHARCLASSIFY_H\r\n\r\nnamespace Scintilla::Internal {\r\n\r\nenum class CharacterClass : unsigned char { space, newLine, word, punctuation };\r\n\r\nclass CharClassify {\r\npublic:\r\n\tCharClassify();\r\n\r\n\tvoid SetDefaultCharClasses(bool includeWordClass);\r\n\tvoid SetCharClasses(const unsigned char *chars, CharacterClass newCharClass);\r\n\tint GetCharsOfClass(CharacterClass characterClass, unsigned char *buffer) const noexcept;\r\n\tCharacterClass GetClass(unsigned char ch) const noexcept { return charClass[ch];}\r\n\tbool IsWord(unsigned char ch) const noexcept { return charClass[ch] == CharacterClass::word;}\r\n\r\nprivate:\r\n\tstatic constexpr int maxChar=256;\r\n\tCharacterClass charClass[maxChar];\r\n};\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/src/CharacterCategoryMap.cxx",
    "content": "// Scintilla source code edit control\r\n/** @file CharacterCategoryMap.cxx\r\n ** Returns the Unicode general category of a character.\r\n ** Table automatically regenerated by scripts/GenerateCharacterCategory.py\r\n ** Should only be rarely regenerated for new versions of Unicode.\r\n ** Similar code to Lexilla's lexilla/lexlib/CharacterCategory.cxx but renamed\r\n ** to avoid problems with builds that statically include both Scintilla and Lexilla.\r\n **/\r\n// Copyright 2013 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#include <cstdint>\r\n#include <vector>\r\n#include <algorithm>\r\n#include <iterator>\r\n\r\n#include \"CharacterCategoryMap.h\"\r\n\r\nnamespace Scintilla::Internal {\r\n\r\nnamespace {\r\n\t// Use an unnamed namespace to protect the declarations from name conflicts\r\n\r\nconst int catRanges[] = {\r\n//++Autogenerated -- start of section automatically generated\r\n// Created with Python 3.12.0,  Unicode 15.0.0\r\n25,\r\n1046,\r\n1073,\r\n1171,\r\n1201,\r\n1293,\r\n1326,\r\n1361,\r\n1394,\r\n1425,\r\n1452,\r\n1489,\r\n1544,\r\n1873,\r\n1938,\r\n2033,\r\n2080,\r\n2925,\r\n2961,\r\n2990,\r\n3028,\r\n3051,\r\n3092,\r\n3105,\r\n3949,\r\n3986,\r\n4014,\r\n4050,\r\n4089,\r\n5142,\r\n5169,\r\n5203,\r\n5333,\r\n5361,\r\n5396,\r\n5429,\r\n5444,\r\n5487,\r\n5522,\r\n5562,\r\n5589,\r\n5620,\r\n5653,\r\n5682,\r\n5706,\r\n5780,\r\n5793,\r\n5841,\r\n5908,\r\n5930,\r\n5956,\r\n6000,\r\n6026,\r\n6129,\r\n6144,\r\n6898,\r\n6912,\r\n7137,\r\n7922,\r\n7937,\r\n8192,\r\n8225,\r\n8256,\r\n8289,\r\n8320,\r\n8353,\r\n8384,\r\n8417,\r\n8448,\r\n8481,\r\n8512,\r\n8545,\r\n8576,\r\n8609,\r\n8640,\r\n8673,\r\n8704,\r\n8737,\r\n8768,\r\n8801,\r\n8832,\r\n8865,\r\n8896,\r\n8929,\r\n8960,\r\n8993,\r\n9024,\r\n9057,\r\n9088,\r\n9121,\r\n9152,\r\n9185,\r\n9216,\r\n9249,\r\n9280,\r\n9313,\r\n9344,\r\n9377,\r\n9408,\r\n9441,\r\n9472,\r\n9505,\r\n9536,\r\n9569,\r\n9600,\r\n9633,\r\n9664,\r\n9697,\r\n9728,\r\n9761,\r\n9792,\r\n9825,\r\n9856,\r\n9889,\r\n9920,\r\n9953,\r\n10016,\r\n10049,\r\n10080,\r\n10113,\r\n10144,\r\n10177,\r\n10208,\r\n10241,\r\n10272,\r\n10305,\r\n10336,\r\n10369,\r\n10400,\r\n10433,\r\n10464,\r\n10497,\r\n10560,\r\n10593,\r\n10624,\r\n10657,\r\n10688,\r\n10721,\r\n10752,\r\n10785,\r\n10816,\r\n10849,\r\n10880,\r\n10913,\r\n10944,\r\n10977,\r\n11008,\r\n11041,\r\n11072,\r\n11105,\r\n11136,\r\n11169,\r\n11200,\r\n11233,\r\n11264,\r\n11297,\r\n11328,\r\n11361,\r\n11392,\r\n11425,\r\n11456,\r\n11489,\r\n11520,\r\n11553,\r\n11584,\r\n11617,\r\n11648,\r\n11681,\r\n11712,\r\n11745,\r\n11776,\r\n11809,\r\n11840,\r\n11873,\r\n11904,\r\n11937,\r\n11968,\r\n12001,\r\n12032,\r\n12097,\r\n12128,\r\n12161,\r\n12192,\r\n12225,\r\n12320,\r\n12385,\r\n12416,\r\n12449,\r\n12480,\r\n12545,\r\n12576,\r\n12673,\r\n12736,\r\n12865,\r\n12896,\r\n12961,\r\n12992,\r\n13089,\r\n13184,\r\n13249,\r\n13280,\r\n13345,\r\n13376,\r\n13409,\r\n13440,\r\n13473,\r\n13504,\r\n13569,\r\n13600,\r\n13633,\r\n13696,\r\n13729,\r\n13760,\r\n13825,\r\n13856,\r\n13953,\r\n13984,\r\n14017,\r\n14048,\r\n14113,\r\n14180,\r\n14208,\r\n14241,\r\n14340,\r\n14464,\r\n14498,\r\n14529,\r\n14560,\r\n14594,\r\n14625,\r\n14656,\r\n14690,\r\n14721,\r\n14752,\r\n14785,\r\n14816,\r\n14849,\r\n14880,\r\n14913,\r\n14944,\r\n14977,\r\n15008,\r\n15041,\r\n15072,\r\n15105,\r\n15136,\r\n15169,\r\n15200,\r\n15233,\r\n15296,\r\n15329,\r\n15360,\r\n15393,\r\n15424,\r\n15457,\r\n15488,\r\n15521,\r\n15552,\r\n15585,\r\n15616,\r\n15649,\r\n15680,\r\n15713,\r\n15744,\r\n15777,\r\n15808,\r\n15841,\r\n15904,\r\n15938,\r\n15969,\r\n16000,\r\n16033,\r\n16064,\r\n16161,\r\n16192,\r\n16225,\r\n16256,\r\n16289,\r\n16320,\r\n16353,\r\n16384,\r\n16417,\r\n16448,\r\n16481,\r\n16512,\r\n16545,\r\n16576,\r\n16609,\r\n16640,\r\n16673,\r\n16704,\r\n16737,\r\n16768,\r\n16801,\r\n16832,\r\n16865,\r\n16896,\r\n16929,\r\n16960,\r\n16993,\r\n17024,\r\n17057,\r\n17088,\r\n17121,\r\n17152,\r\n17185,\r\n17216,\r\n17249,\r\n17280,\r\n17313,\r\n17344,\r\n17377,\r\n17408,\r\n17441,\r\n17472,\r\n17505,\r\n17536,\r\n17569,\r\n17600,\r\n17633,\r\n17664,\r\n17697,\r\n17728,\r\n17761,\r\n17792,\r\n17825,\r\n17856,\r\n17889,\r\n17920,\r\n17953,\r\n17984,\r\n18017,\r\n18240,\r\n18305,\r\n18336,\r\n18401,\r\n18464,\r\n18497,\r\n18528,\r\n18657,\r\n18688,\r\n18721,\r\n18752,\r\n18785,\r\n18816,\r\n18849,\r\n18880,\r\n18913,\r\n21124,\r\n21153,\r\n22019,\r\n22612,\r\n22723,\r\n23124,\r\n23555,\r\n23732,\r\n23939,\r\n23988,\r\n24003,\r\n24052,\r\n24581,\r\n28160,\r\n28193,\r\n28224,\r\n28257,\r\n28291,\r\n28340,\r\n28352,\r\n28385,\r\n28445,\r\n28483,\r\n28513,\r\n28625,\r\n28640,\r\n28701,\r\n28820,\r\n28864,\r\n28913,\r\n28928,\r\n29053,\r\n29056,\r\n29117,\r\n29120,\r\n29185,\r\n29216,\r\n29789,\r\n29792,\r\n30081,\r\n31200,\r\n31233,\r\n31296,\r\n31393,\r\n31488,\r\n31521,\r\n31552,\r\n31585,\r\n31616,\r\n31649,\r\n31680,\r\n31713,\r\n31744,\r\n31777,\r\n31808,\r\n31841,\r\n31872,\r\n31905,\r\n31936,\r\n31969,\r\n32000,\r\n32033,\r\n32064,\r\n32097,\r\n32128,\r\n32161,\r\n32192,\r\n32225,\r\n32384,\r\n32417,\r\n32466,\r\n32480,\r\n32513,\r\n32544,\r\n32609,\r\n32672,\r\n34305,\r\n35840,\r\n35873,\r\n35904,\r\n35937,\r\n35968,\r\n36001,\r\n36032,\r\n36065,\r\n36096,\r\n36129,\r\n36160,\r\n36193,\r\n36224,\r\n36257,\r\n36288,\r\n36321,\r\n36352,\r\n36385,\r\n36416,\r\n36449,\r\n36480,\r\n36513,\r\n36544,\r\n36577,\r\n36608,\r\n36641,\r\n36672,\r\n36705,\r\n36736,\r\n36769,\r\n36800,\r\n36833,\r\n36864,\r\n36897,\r\n36949,\r\n36965,\r\n37127,\r\n37184,\r\n37217,\r\n37248,\r\n37281,\r\n37312,\r\n37345,\r\n37376,\r\n37409,\r\n37440,\r\n37473,\r\n37504,\r\n37537,\r\n37568,\r\n37601,\r\n37632,\r\n37665,\r\n37696,\r\n37729,\r\n37760,\r\n37793,\r\n37824,\r\n37857,\r\n37888,\r\n37921,\r\n37952,\r\n37985,\r\n38016,\r\n38049,\r\n38080,\r\n38113,\r\n38144,\r\n38177,\r\n38208,\r\n38241,\r\n38272,\r\n38305,\r\n38336,\r\n38369,\r\n38400,\r\n38433,\r\n38464,\r\n38497,\r\n38528,\r\n38561,\r\n38592,\r\n38625,\r\n38656,\r\n38689,\r\n38720,\r\n38753,\r\n38784,\r\n38817,\r\n38848,\r\n38881,\r\n38912,\r\n38977,\r\n39008,\r\n39041,\r\n39072,\r\n39105,\r\n39136,\r\n39169,\r\n39200,\r\n39233,\r\n39264,\r\n39297,\r\n39328,\r\n39361,\r\n39424,\r\n39457,\r\n39488,\r\n39521,\r\n39552,\r\n39585,\r\n39616,\r\n39649,\r\n39680,\r\n39713,\r\n39744,\r\n39777,\r\n39808,\r\n39841,\r\n39872,\r\n39905,\r\n39936,\r\n39969,\r\n40000,\r\n40033,\r\n40064,\r\n40097,\r\n40128,\r\n40161,\r\n40192,\r\n40225,\r\n40256,\r\n40289,\r\n40320,\r\n40353,\r\n40384,\r\n40417,\r\n40448,\r\n40481,\r\n40512,\r\n40545,\r\n40576,\r\n40609,\r\n40640,\r\n40673,\r\n40704,\r\n40737,\r\n40768,\r\n40801,\r\n40832,\r\n40865,\r\n40896,\r\n40929,\r\n40960,\r\n40993,\r\n41024,\r\n41057,\r\n41088,\r\n41121,\r\n41152,\r\n41185,\r\n41216,\r\n41249,\r\n41280,\r\n41313,\r\n41344,\r\n41377,\r\n41408,\r\n41441,\r\n41472,\r\n41505,\r\n41536,\r\n41569,\r\n41600,\r\n41633,\r\n41664,\r\n41697,\r\n41728,\r\n41761,\r\n41792,\r\n41825,\r\n41856,\r\n41889,\r\n41920,\r\n41953,\r\n41984,\r\n42017,\r\n42048,\r\n42081,\r\n42112,\r\n42145,\r\n42176,\r\n42209,\r\n42240,\r\n42273,\r\n42304,\r\n42337,\r\n42368,\r\n42401,\r\n42432,\r\n42465,\r\n42525,\r\n42528,\r\n43773,\r\n43811,\r\n43857,\r\n44033,\r\n45361,\r\n45388,\r\n45437,\r\n45493,\r\n45555,\r\n45597,\r\n45605,\r\n47052,\r\n47077,\r\n47121,\r\n47141,\r\n47217,\r\n47237,\r\n47313,\r\n47333,\r\n47389,\r\n47620,\r\n48509,\r\n48612,\r\n48753,\r\n48829,\r\n49178,\r\n49362,\r\n49457,\r\n49523,\r\n49553,\r\n49621,\r\n49669,\r\n50033,\r\n50074,\r\n50097,\r\n50180,\r\n51203,\r\n51236,\r\n51557,\r\n52232,\r\n52561,\r\n52676,\r\n52741,\r\n52772,\r\n55953,\r\n55972,\r\n56005,\r\n56250,\r\n56277,\r\n56293,\r\n56483,\r\n56549,\r\n56629,\r\n56645,\r\n56772,\r\n56840,\r\n57156,\r\n57269,\r\n57316,\r\n57361,\r\n57821,\r\n57850,\r\n57860,\r\n57893,\r\n57924,\r\n58885,\r\n59773,\r\n59812,\r\n62661,\r\n63012,\r\n63069,\r\n63496,\r\n63812,\r\n64869,\r\n65155,\r\n65237,\r\n65265,\r\n65347,\r\n65405,\r\n65445,\r\n65491,\r\n65540,\r\n66245,\r\n66371,\r\n66405,\r\n66691,\r\n66725,\r\n66819,\r\n66853,\r\n67037,\r\n67089,\r\n67581,\r\n67588,\r\n68389,\r\n68509,\r\n68561,\r\n68605,\r\n68612,\r\n68989,\r\n69124,\r\n69908,\r\n69924,\r\n70141,\r\n70170,\r\n70237,\r\n70405,\r\n70660,\r\n71971,\r\n72005,\r\n72794,\r\n72805,\r\n73830,\r\n73860,\r\n75589,\r\n75622,\r\n75653,\r\n75684,\r\n75718,\r\n75813,\r\n76070,\r\n76197,\r\n76230,\r\n76292,\r\n76325,\r\n76548,\r\n76869,\r\n76945,\r\n77000,\r\n77329,\r\n77347,\r\n77380,\r\n77861,\r\n77894,\r\n77981,\r\n77988,\r\n78269,\r\n78308,\r\n78397,\r\n78436,\r\n79165,\r\n79172,\r\n79421,\r\n79428,\r\n79485,\r\n79556,\r\n79709,\r\n79749,\r\n79780,\r\n79814,\r\n79909,\r\n80061,\r\n80102,\r\n80189,\r\n80230,\r\n80293,\r\n80324,\r\n80381,\r\n80614,\r\n80669,\r\n80772,\r\n80861,\r\n80868,\r\n80965,\r\n81053,\r\n81096,\r\n81412,\r\n81491,\r\n81546,\r\n81749,\r\n81779,\r\n81796,\r\n81841,\r\n81861,\r\n81917,\r\n81957,\r\n82022,\r\n82077,\r\n82084,\r\n82301,\r\n82404,\r\n82493,\r\n82532,\r\n83261,\r\n83268,\r\n83517,\r\n83524,\r\n83613,\r\n83620,\r\n83709,\r\n83716,\r\n83805,\r\n83845,\r\n83901,\r\n83910,\r\n84005,\r\n84093,\r\n84197,\r\n84285,\r\n84325,\r\n84445,\r\n84517,\r\n84573,\r\n84772,\r\n84925,\r\n84932,\r\n84989,\r\n85192,\r\n85509,\r\n85572,\r\n85669,\r\n85713,\r\n85757,\r\n86053,\r\n86118,\r\n86173,\r\n86180,\r\n86493,\r\n86500,\r\n86621,\r\n86628,\r\n87357,\r\n87364,\r\n87613,\r\n87620,\r\n87709,\r\n87716,\r\n87901,\r\n87941,\r\n87972,\r\n88006,\r\n88101,\r\n88285,\r\n88293,\r\n88358,\r\n88413,\r\n88422,\r\n88485,\r\n88541,\r\n88580,\r\n88637,\r\n89092,\r\n89157,\r\n89245,\r\n89288,\r\n89617,\r\n89651,\r\n89693,\r\n89892,\r\n89925,\r\n90141,\r\n90149,\r\n90182,\r\n90269,\r\n90276,\r\n90557,\r\n90596,\r\n90685,\r\n90724,\r\n91453,\r\n91460,\r\n91709,\r\n91716,\r\n91805,\r\n91812,\r\n91997,\r\n92037,\r\n92068,\r\n92102,\r\n92133,\r\n92166,\r\n92197,\r\n92349,\r\n92390,\r\n92477,\r\n92518,\r\n92581,\r\n92637,\r\n92837,\r\n92902,\r\n92957,\r\n93060,\r\n93149,\r\n93156,\r\n93253,\r\n93341,\r\n93384,\r\n93717,\r\n93732,\r\n93770,\r\n93981,\r\n94277,\r\n94308,\r\n94365,\r\n94372,\r\n94589,\r\n94660,\r\n94781,\r\n94788,\r\n94941,\r\n95012,\r\n95101,\r\n95108,\r\n95165,\r\n95172,\r\n95261,\r\n95332,\r\n95421,\r\n95492,\r\n95613,\r\n95684,\r\n96093,\r\n96198,\r\n96261,\r\n96294,\r\n96381,\r\n96454,\r\n96573,\r\n96582,\r\n96677,\r\n96733,\r\n96772,\r\n96829,\r\n96998,\r\n97053,\r\n97480,\r\n97802,\r\n97909,\r\n98099,\r\n98133,\r\n98173,\r\n98309,\r\n98342,\r\n98437,\r\n98468,\r\n98749,\r\n98756,\r\n98877,\r\n98884,\r\n99645,\r\n99652,\r\n100189,\r\n100229,\r\n100260,\r\n100293,\r\n100390,\r\n100541,\r\n100549,\r\n100669,\r\n100677,\r\n100829,\r\n101029,\r\n101117,\r\n101124,\r\n101245,\r\n101284,\r\n101341,\r\n101380,\r\n101445,\r\n101533,\r\n101576,\r\n101917,\r\n102129,\r\n102154,\r\n102389,\r\n102404,\r\n102437,\r\n102470,\r\n102545,\r\n102564,\r\n102845,\r\n102852,\r\n102973,\r\n102980,\r\n103741,\r\n103748,\r\n104093,\r\n104100,\r\n104285,\r\n104325,\r\n104356,\r\n104390,\r\n104421,\r\n104454,\r\n104637,\r\n104645,\r\n104678,\r\n104765,\r\n104774,\r\n104837,\r\n104925,\r\n105126,\r\n105213,\r\n105380,\r\n105469,\r\n105476,\r\n105541,\r\n105629,\r\n105672,\r\n106013,\r\n106020,\r\n106086,\r\n106141,\r\n106501,\r\n106566,\r\n106628,\r\n106941,\r\n106948,\r\n107069,\r\n107076,\r\n108389,\r\n108452,\r\n108486,\r\n108581,\r\n108733,\r\n108742,\r\n108861,\r\n108870,\r\n108965,\r\n108996,\r\n109045,\r\n109085,\r\n109188,\r\n109286,\r\n109322,\r\n109540,\r\n109637,\r\n109725,\r\n109768,\r\n110090,\r\n110389,\r\n110404,\r\n110621,\r\n110629,\r\n110662,\r\n110749,\r\n110756,\r\n111357,\r\n111428,\r\n112221,\r\n112228,\r\n112541,\r\n112548,\r\n112605,\r\n112644,\r\n112893,\r\n112965,\r\n113021,\r\n113126,\r\n113221,\r\n113341,\r\n113349,\r\n113405,\r\n113414,\r\n113693,\r\n113864,\r\n114205,\r\n114246,\r\n114321,\r\n114365,\r\n114724,\r\n116261,\r\n116292,\r\n116357,\r\n116605,\r\n116723,\r\n116740,\r\n116931,\r\n116965,\r\n117233,\r\n117256,\r\n117585,\r\n117661,\r\n118820,\r\n118909,\r\n118916,\r\n118973,\r\n118980,\r\n119165,\r\n119172,\r\n119965,\r\n119972,\r\n120029,\r\n120036,\r\n120357,\r\n120388,\r\n120453,\r\n120740,\r\n120797,\r\n120836,\r\n121021,\r\n121027,\r\n121085,\r\n121093,\r\n121341,\r\n121352,\r\n121693,\r\n121732,\r\n121885,\r\n122884,\r\n122933,\r\n123025,\r\n123509,\r\n123537,\r\n123573,\r\n123653,\r\n123733,\r\n123912,\r\n124234,\r\n124565,\r\n124581,\r\n124629,\r\n124645,\r\n124693,\r\n124709,\r\n124749,\r\n124782,\r\n124813,\r\n124846,\r\n124870,\r\n124932,\r\n125213,\r\n125220,\r\n126397,\r\n126501,\r\n126950,\r\n126981,\r\n127153,\r\n127173,\r\n127236,\r\n127397,\r\n127773,\r\n127781,\r\n128957,\r\n128981,\r\n129221,\r\n129269,\r\n129469,\r\n129493,\r\n129553,\r\n129717,\r\n129841,\r\n129917,\r\n131076,\r\n132454,\r\n132517,\r\n132646,\r\n132677,\r\n132870,\r\n132901,\r\n132966,\r\n133029,\r\n133092,\r\n133128,\r\n133457,\r\n133636,\r\n133830,\r\n133893,\r\n133956,\r\n134085,\r\n134180,\r\n134214,\r\n134308,\r\n134374,\r\n134596,\r\n134693,\r\n134820,\r\n135237,\r\n135270,\r\n135333,\r\n135398,\r\n135589,\r\n135620,\r\n135654,\r\n135688,\r\n136006,\r\n136101,\r\n136149,\r\n136192,\r\n137437,\r\n137440,\r\n137501,\r\n137632,\r\n137693,\r\n137729,\r\n139121,\r\n139139,\r\n139169,\r\n139268,\r\n149821,\r\n149828,\r\n149981,\r\n150020,\r\n150269,\r\n150276,\r\n150333,\r\n150340,\r\n150493,\r\n150532,\r\n151869,\r\n151876,\r\n152029,\r\n152068,\r\n153149,\r\n153156,\r\n153309,\r\n153348,\r\n153597,\r\n153604,\r\n153661,\r\n153668,\r\n153821,\r\n153860,\r\n154365,\r\n154372,\r\n156221,\r\n156228,\r\n156381,\r\n156420,\r\n158589,\r\n158629,\r\n158737,\r\n159018,\r\n159677,\r\n159748,\r\n160277,\r\n160605,\r\n160768,\r\n163549,\r\n163585,\r\n163805,\r\n163852,\r\n163876,\r\n183733,\r\n183761,\r\n183780,\r\n184342,\r\n184356,\r\n185197,\r\n185230,\r\n185277,\r\n185348,\r\n187761,\r\n187849,\r\n187940,\r\n188221,\r\n188420,\r\n188997,\r\n189094,\r\n189149,\r\n189412,\r\n190021,\r\n190086,\r\n190129,\r\n190205,\r\n190468,\r\n191045,\r\n191133,\r\n191492,\r\n191933,\r\n191940,\r\n192061,\r\n192069,\r\n192157,\r\n192516,\r\n194181,\r\n194246,\r\n194277,\r\n194502,\r\n194757,\r\n194790,\r\n194853,\r\n195217,\r\n195299,\r\n195345,\r\n195443,\r\n195460,\r\n195493,\r\n195549,\r\n195592,\r\n195933,\r\n196106,\r\n196445,\r\n196625,\r\n196812,\r\n196849,\r\n196965,\r\n197082,\r\n197093,\r\n197128,\r\n197469,\r\n197636,\r\n198755,\r\n198788,\r\n200509,\r\n200708,\r\n200869,\r\n200932,\r\n202021,\r\n202052,\r\n202109,\r\n202244,\r\n204509,\r\n204804,\r\n205821,\r\n205829,\r\n205926,\r\n206053,\r\n206118,\r\n206237,\r\n206342,\r\n206405,\r\n206438,\r\n206629,\r\n206749,\r\n206869,\r\n206909,\r\n206993,\r\n207048,\r\n207364,\r\n208349,\r\n208388,\r\n208573,\r\n208900,\r\n210333,\r\n210436,\r\n211293,\r\n211464,\r\n211786,\r\n211837,\r\n211925,\r\n212996,\r\n213733,\r\n213798,\r\n213861,\r\n213917,\r\n213969,\r\n214020,\r\n215718,\r\n215749,\r\n215782,\r\n215813,\r\n216061,\r\n216069,\r\n216102,\r\n216133,\r\n216166,\r\n216229,\r\n216486,\r\n216677,\r\n217021,\r\n217061,\r\n217096,\r\n217437,\r\n217608,\r\n217949,\r\n218129,\r\n218339,\r\n218385,\r\n218589,\r\n218629,\r\n219079,\r\n219109,\r\n219645,\r\n221189,\r\n221318,\r\n221348,\r\n222853,\r\n222886,\r\n222917,\r\n223078,\r\n223109,\r\n223142,\r\n223301,\r\n223334,\r\n223396,\r\n223677,\r\n223752,\r\n224081,\r\n224309,\r\n224613,\r\n224917,\r\n225201,\r\n225277,\r\n225285,\r\n225350,\r\n225380,\r\n226342,\r\n226373,\r\n226502,\r\n226565,\r\n226630,\r\n226661,\r\n226756,\r\n226824,\r\n227140,\r\n228549,\r\n228582,\r\n228613,\r\n228678,\r\n228773,\r\n228806,\r\n228837,\r\n228934,\r\n229021,\r\n229265,\r\n229380,\r\n230534,\r\n230789,\r\n231046,\r\n231109,\r\n231197,\r\n231281,\r\n231432,\r\n231773,\r\n231844,\r\n231944,\r\n232260,\r\n233219,\r\n233425,\r\n233473,\r\n233789,\r\n233984,\r\n235389,\r\n235424,\r\n235537,\r\n235805,\r\n236037,\r\n236145,\r\n236165,\r\n236582,\r\n236613,\r\n236836,\r\n236965,\r\n236996,\r\n237189,\r\n237220,\r\n237286,\r\n237317,\r\n237380,\r\n237437,\r\n237569,\r\n238979,\r\n240993,\r\n241411,\r\n241441,\r\n242531,\r\n243717,\r\n245760,\r\n245793,\r\n245824,\r\n245857,\r\n245888,\r\n245921,\r\n245952,\r\n245985,\r\n246016,\r\n246049,\r\n246080,\r\n246113,\r\n246144,\r\n246177,\r\n246208,\r\n246241,\r\n246272,\r\n246305,\r\n246336,\r\n246369,\r\n246400,\r\n246433,\r\n246464,\r\n246497,\r\n246528,\r\n246561,\r\n246592,\r\n246625,\r\n246656,\r\n246689,\r\n246720,\r\n246753,\r\n246784,\r\n246817,\r\n246848,\r\n246881,\r\n246912,\r\n246945,\r\n246976,\r\n247009,\r\n247040,\r\n247073,\r\n247104,\r\n247137,\r\n247168,\r\n247201,\r\n247232,\r\n247265,\r\n247296,\r\n247329,\r\n247360,\r\n247393,\r\n247424,\r\n247457,\r\n247488,\r\n247521,\r\n247552,\r\n247585,\r\n247616,\r\n247649,\r\n247680,\r\n247713,\r\n247744,\r\n247777,\r\n247808,\r\n247841,\r\n247872,\r\n247905,\r\n247936,\r\n247969,\r\n248000,\r\n248033,\r\n248064,\r\n248097,\r\n248128,\r\n248161,\r\n248192,\r\n248225,\r\n248256,\r\n248289,\r\n248320,\r\n248353,\r\n248384,\r\n248417,\r\n248448,\r\n248481,\r\n248512,\r\n248545,\r\n248576,\r\n248609,\r\n248640,\r\n248673,\r\n248704,\r\n248737,\r\n248768,\r\n248801,\r\n248832,\r\n248865,\r\n248896,\r\n248929,\r\n248960,\r\n248993,\r\n249024,\r\n249057,\r\n249088,\r\n249121,\r\n249152,\r\n249185,\r\n249216,\r\n249249,\r\n249280,\r\n249313,\r\n249344,\r\n249377,\r\n249408,\r\n249441,\r\n249472,\r\n249505,\r\n249536,\r\n249569,\r\n249600,\r\n249633,\r\n249664,\r\n249697,\r\n249728,\r\n249761,\r\n249792,\r\n249825,\r\n249856,\r\n249889,\r\n249920,\r\n249953,\r\n249984,\r\n250017,\r\n250048,\r\n250081,\r\n250112,\r\n250145,\r\n250176,\r\n250209,\r\n250240,\r\n250273,\r\n250304,\r\n250337,\r\n250368,\r\n250401,\r\n250432,\r\n250465,\r\n250496,\r\n250529,\r\n250816,\r\n250849,\r\n250880,\r\n250913,\r\n250944,\r\n250977,\r\n251008,\r\n251041,\r\n251072,\r\n251105,\r\n251136,\r\n251169,\r\n251200,\r\n251233,\r\n251264,\r\n251297,\r\n251328,\r\n251361,\r\n251392,\r\n251425,\r\n251456,\r\n251489,\r\n251520,\r\n251553,\r\n251584,\r\n251617,\r\n251648,\r\n251681,\r\n251712,\r\n251745,\r\n251776,\r\n251809,\r\n251840,\r\n251873,\r\n251904,\r\n251937,\r\n251968,\r\n252001,\r\n252032,\r\n252065,\r\n252096,\r\n252129,\r\n252160,\r\n252193,\r\n252224,\r\n252257,\r\n252288,\r\n252321,\r\n252352,\r\n252385,\r\n252416,\r\n252449,\r\n252480,\r\n252513,\r\n252544,\r\n252577,\r\n252608,\r\n252641,\r\n252672,\r\n252705,\r\n252736,\r\n252769,\r\n252800,\r\n252833,\r\n252864,\r\n252897,\r\n252928,\r\n252961,\r\n252992,\r\n253025,\r\n253056,\r\n253089,\r\n253120,\r\n253153,\r\n253184,\r\n253217,\r\n253248,\r\n253281,\r\n253312,\r\n253345,\r\n253376,\r\n253409,\r\n253440,\r\n253473,\r\n253504,\r\n253537,\r\n253568,\r\n253601,\r\n253632,\r\n253665,\r\n253696,\r\n253729,\r\n253760,\r\n253793,\r\n253824,\r\n253857,\r\n253888,\r\n253921,\r\n254208,\r\n254465,\r\n254685,\r\n254720,\r\n254941,\r\n254977,\r\n255232,\r\n255489,\r\n255744,\r\n256001,\r\n256221,\r\n256256,\r\n256477,\r\n256513,\r\n256797,\r\n256800,\r\n256861,\r\n256864,\r\n256925,\r\n256928,\r\n256989,\r\n256992,\r\n257025,\r\n257280,\r\n257537,\r\n258013,\r\n258049,\r\n258306,\r\n258561,\r\n258818,\r\n259073,\r\n259330,\r\n259585,\r\n259773,\r\n259777,\r\n259840,\r\n259970,\r\n260020,\r\n260033,\r\n260084,\r\n260161,\r\n260285,\r\n260289,\r\n260352,\r\n260482,\r\n260532,\r\n260609,\r\n260765,\r\n260801,\r\n260864,\r\n261021,\r\n261044,\r\n261121,\r\n261376,\r\n261556,\r\n261661,\r\n261697,\r\n261821,\r\n261825,\r\n261888,\r\n262018,\r\n262068,\r\n262141,\r\n262166,\r\n262522,\r\n262668,\r\n262865,\r\n262927,\r\n262960,\r\n262989,\r\n263023,\r\n263088,\r\n263117,\r\n263151,\r\n263185,\r\n263447,\r\n263480,\r\n263514,\r\n263670,\r\n263697,\r\n263983,\r\n264016,\r\n264049,\r\n264171,\r\n264241,\r\n264338,\r\n264365,\r\n264398,\r\n264433,\r\n264786,\r\n264817,\r\n264843,\r\n264881,\r\n265206,\r\n265242,\r\n265405,\r\n265434,\r\n265738,\r\n265763,\r\n265821,\r\n265866,\r\n266066,\r\n266157,\r\n266190,\r\n266211,\r\n266250,\r\n266578,\r\n266669,\r\n266702,\r\n266749,\r\n266755,\r\n267197,\r\n267283,\r\n268349,\r\n268805,\r\n269223,\r\n269349,\r\n269383,\r\n269477,\r\n269885,\r\n270357,\r\n270400,\r\n270453,\r\n270560,\r\n270613,\r\n270657,\r\n270688,\r\n270785,\r\n270848,\r\n270945,\r\n270997,\r\n271008,\r\n271061,\r\n271122,\r\n271136,\r\n271317,\r\n271488,\r\n271541,\r\n271552,\r\n271605,\r\n271616,\r\n271669,\r\n271680,\r\n271829,\r\n271841,\r\n271872,\r\n272001,\r\n272036,\r\n272161,\r\n272213,\r\n272257,\r\n272320,\r\n272402,\r\n272544,\r\n272577,\r\n272725,\r\n272754,\r\n272789,\r\n272833,\r\n272885,\r\n272906,\r\n273417,\r\n274528,\r\n274561,\r\n274601,\r\n274730,\r\n274773,\r\n274845,\r\n274962,\r\n275125,\r\n275282,\r\n275349,\r\n275474,\r\n275509,\r\n275570,\r\n275605,\r\n275666,\r\n275701,\r\n275922,\r\n275957,\r\n276946,\r\n277013,\r\n277074,\r\n277109,\r\n277138,\r\n277173,\r\n278162,\r\n286741,\r\n286989,\r\n287022,\r\n287053,\r\n287086,\r\n287125,\r\n287762,\r\n287829,\r\n288045,\r\n288078,\r\n288117,\r\n290706,\r\n290741,\r\n291698,\r\n292501,\r\n293778,\r\n293973,\r\n296189,\r\n296981,\r\n297341,\r\n297994,\r\n299925,\r\n302410,\r\n303125,\r\n308978,\r\n309013,\r\n309298,\r\n309333,\r\n311058,\r\n311317,\r\n314866,\r\n314901,\r\n322829,\r\n322862,\r\n322893,\r\n322926,\r\n322957,\r\n322990,\r\n323021,\r\n323054,\r\n323085,\r\n323118,\r\n323149,\r\n323182,\r\n323213,\r\n323246,\r\n323274,\r\n324245,\r\n325650,\r\n325805,\r\n325838,\r\n325874,\r\n326861,\r\n326894,\r\n326925,\r\n326958,\r\n326989,\r\n327022,\r\n327053,\r\n327086,\r\n327117,\r\n327150,\r\n327186,\r\n327701,\r\n335890,\r\n340077,\r\n340110,\r\n340141,\r\n340174,\r\n340205,\r\n340238,\r\n340269,\r\n340302,\r\n340333,\r\n340366,\r\n340397,\r\n340430,\r\n340461,\r\n340494,\r\n340525,\r\n340558,\r\n340589,\r\n340622,\r\n340653,\r\n340686,\r\n340717,\r\n340750,\r\n340786,\r\n342797,\r\n342830,\r\n342861,\r\n342894,\r\n342930,\r\n343949,\r\n343982,\r\n344018,\r\n352277,\r\n353810,\r\n354485,\r\n354546,\r\n354741,\r\n355997,\r\n356053,\r\n357085,\r\n357109,\r\n360448,\r\n361985,\r\n363520,\r\n363553,\r\n363584,\r\n363681,\r\n363744,\r\n363777,\r\n363808,\r\n363841,\r\n363872,\r\n363905,\r\n363936,\r\n364065,\r\n364096,\r\n364129,\r\n364192,\r\n364225,\r\n364419,\r\n364480,\r\n364577,\r\n364608,\r\n364641,\r\n364672,\r\n364705,\r\n364736,\r\n364769,\r\n364800,\r\n364833,\r\n364864,\r\n364897,\r\n364928,\r\n364961,\r\n364992,\r\n365025,\r\n365056,\r\n365089,\r\n365120,\r\n365153,\r\n365184,\r\n365217,\r\n365248,\r\n365281,\r\n365312,\r\n365345,\r\n365376,\r\n365409,\r\n365440,\r\n365473,\r\n365504,\r\n365537,\r\n365568,\r\n365601,\r\n365632,\r\n365665,\r\n365696,\r\n365729,\r\n365760,\r\n365793,\r\n365824,\r\n365857,\r\n365888,\r\n365921,\r\n365952,\r\n365985,\r\n366016,\r\n366049,\r\n366080,\r\n366113,\r\n366144,\r\n366177,\r\n366208,\r\n366241,\r\n366272,\r\n366305,\r\n366336,\r\n366369,\r\n366400,\r\n366433,\r\n366464,\r\n366497,\r\n366528,\r\n366561,\r\n366592,\r\n366625,\r\n366656,\r\n366689,\r\n366720,\r\n366753,\r\n366784,\r\n366817,\r\n366848,\r\n366881,\r\n366912,\r\n366945,\r\n366976,\r\n367009,\r\n367040,\r\n367073,\r\n367104,\r\n367137,\r\n367168,\r\n367201,\r\n367232,\r\n367265,\r\n367296,\r\n367329,\r\n367360,\r\n367393,\r\n367424,\r\n367457,\r\n367488,\r\n367521,\r\n367552,\r\n367585,\r\n367616,\r\n367649,\r\n367680,\r\n367713,\r\n367797,\r\n367968,\r\n368001,\r\n368032,\r\n368065,\r\n368101,\r\n368192,\r\n368225,\r\n368285,\r\n368433,\r\n368554,\r\n368593,\r\n368641,\r\n369885,\r\n369889,\r\n369949,\r\n370081,\r\n370141,\r\n370180,\r\n371997,\r\n372195,\r\n372241,\r\n372285,\r\n372709,\r\n372740,\r\n373501,\r\n373764,\r\n374013,\r\n374020,\r\n374269,\r\n374276,\r\n374525,\r\n374532,\r\n374781,\r\n374788,\r\n375037,\r\n375044,\r\n375293,\r\n375300,\r\n375549,\r\n375556,\r\n375805,\r\n375813,\r\n376849,\r\n376911,\r\n376944,\r\n376975,\r\n377008,\r\n377041,\r\n377135,\r\n377168,\r\n377201,\r\n377231,\r\n377264,\r\n377297,\r\n377580,\r\n377617,\r\n377676,\r\n377713,\r\n377743,\r\n377776,\r\n377809,\r\n377871,\r\n377904,\r\n377933,\r\n377966,\r\n377997,\r\n378030,\r\n378061,\r\n378094,\r\n378125,\r\n378158,\r\n378193,\r\n378339,\r\n378385,\r\n378700,\r\n378769,\r\n378892,\r\n378929,\r\n378957,\r\n378993,\r\n379413,\r\n379473,\r\n379565,\r\n379598,\r\n379629,\r\n379662,\r\n379693,\r\n379726,\r\n379757,\r\n379790,\r\n379820,\r\n379869,\r\n380949,\r\n381789,\r\n381813,\r\n384669,\r\n385045,\r\n391901,\r\n392725,\r\n393117,\r\n393238,\r\n393265,\r\n393365,\r\n393379,\r\n393412,\r\n393449,\r\n393485,\r\n393518,\r\n393549,\r\n393582,\r\n393613,\r\n393646,\r\n393677,\r\n393710,\r\n393741,\r\n393774,\r\n393813,\r\n393869,\r\n393902,\r\n393933,\r\n393966,\r\n393997,\r\n394030,\r\n394061,\r\n394094,\r\n394124,\r\n394157,\r\n394190,\r\n394261,\r\n394281,\r\n394565,\r\n394694,\r\n394764,\r\n394787,\r\n394965,\r\n395017,\r\n395107,\r\n395140,\r\n395185,\r\n395221,\r\n395293,\r\n395300,\r\n398077,\r\n398117,\r\n398196,\r\n398243,\r\n398308,\r\n398348,\r\n398372,\r\n401265,\r\n401283,\r\n401380,\r\n401437,\r\n401572,\r\n402973,\r\n402980,\r\n406013,\r\n406037,\r\n406090,\r\n406229,\r\n406532,\r\n407573,\r\n408733,\r\n409092,\r\n409621,\r\n410621,\r\n410634,\r\n410965,\r\n411914,\r\n412181,\r\n412202,\r\n412693,\r\n413706,\r\n414037,\r\n415274,\r\n415765,\r\n425988,\r\n636949,\r\n638980,\r\n1311395,\r\n1311428,\r\n1348029,\r\n1348117,\r\n1349885,\r\n1350148,\r\n1351427,\r\n1351633,\r\n1351684,\r\n1360259,\r\n1360305,\r\n1360388,\r\n1360904,\r\n1361220,\r\n1361309,\r\n1361920,\r\n1361953,\r\n1361984,\r\n1362017,\r\n1362048,\r\n1362081,\r\n1362112,\r\n1362145,\r\n1362176,\r\n1362209,\r\n1362240,\r\n1362273,\r\n1362304,\r\n1362337,\r\n1362368,\r\n1362401,\r\n1362432,\r\n1362465,\r\n1362496,\r\n1362529,\r\n1362560,\r\n1362593,\r\n1362624,\r\n1362657,\r\n1362688,\r\n1362721,\r\n1362752,\r\n1362785,\r\n1362816,\r\n1362849,\r\n1362880,\r\n1362913,\r\n1362944,\r\n1362977,\r\n1363008,\r\n1363041,\r\n1363072,\r\n1363105,\r\n1363136,\r\n1363169,\r\n1363200,\r\n1363233,\r\n1363264,\r\n1363297,\r\n1363328,\r\n1363361,\r\n1363396,\r\n1363429,\r\n1363463,\r\n1363569,\r\n1363589,\r\n1363921,\r\n1363939,\r\n1363968,\r\n1364001,\r\n1364032,\r\n1364065,\r\n1364096,\r\n1364129,\r\n1364160,\r\n1364193,\r\n1364224,\r\n1364257,\r\n1364288,\r\n1364321,\r\n1364352,\r\n1364385,\r\n1364416,\r\n1364449,\r\n1364480,\r\n1364513,\r\n1364544,\r\n1364577,\r\n1364608,\r\n1364641,\r\n1364672,\r\n1364705,\r\n1364736,\r\n1364769,\r\n1364800,\r\n1364833,\r\n1364867,\r\n1364933,\r\n1364996,\r\n1367241,\r\n1367557,\r\n1367633,\r\n1367837,\r\n1368084,\r\n1368803,\r\n1369108,\r\n1369152,\r\n1369185,\r\n1369216,\r\n1369249,\r\n1369280,\r\n1369313,\r\n1369344,\r\n1369377,\r\n1369408,\r\n1369441,\r\n1369472,\r\n1369505,\r\n1369536,\r\n1369569,\r\n1369664,\r\n1369697,\r\n1369728,\r\n1369761,\r\n1369792,\r\n1369825,\r\n1369856,\r\n1369889,\r\n1369920,\r\n1369953,\r\n1369984,\r\n1370017,\r\n1370048,\r\n1370081,\r\n1370112,\r\n1370145,\r\n1370176,\r\n1370209,\r\n1370240,\r\n1370273,\r\n1370304,\r\n1370337,\r\n1370368,\r\n1370401,\r\n1370432,\r\n1370465,\r\n1370496,\r\n1370529,\r\n1370560,\r\n1370593,\r\n1370624,\r\n1370657,\r\n1370688,\r\n1370721,\r\n1370752,\r\n1370785,\r\n1370816,\r\n1370849,\r\n1370880,\r\n1370913,\r\n1370944,\r\n1370977,\r\n1371008,\r\n1371041,\r\n1371072,\r\n1371105,\r\n1371136,\r\n1371169,\r\n1371200,\r\n1371233,\r\n1371264,\r\n1371297,\r\n1371328,\r\n1371361,\r\n1371392,\r\n1371425,\r\n1371456,\r\n1371489,\r\n1371520,\r\n1371553,\r\n1371584,\r\n1371617,\r\n1371651,\r\n1371681,\r\n1371936,\r\n1371969,\r\n1372000,\r\n1372033,\r\n1372064,\r\n1372129,\r\n1372160,\r\n1372193,\r\n1372224,\r\n1372257,\r\n1372288,\r\n1372321,\r\n1372352,\r\n1372385,\r\n1372419,\r\n1372468,\r\n1372512,\r\n1372545,\r\n1372576,\r\n1372609,\r\n1372644,\r\n1372672,\r\n1372705,\r\n1372736,\r\n1372769,\r\n1372864,\r\n1372897,\r\n1372928,\r\n1372961,\r\n1372992,\r\n1373025,\r\n1373056,\r\n1373089,\r\n1373120,\r\n1373153,\r\n1373184,\r\n1373217,\r\n1373248,\r\n1373281,\r\n1373312,\r\n1373345,\r\n1373376,\r\n1373409,\r\n1373440,\r\n1373473,\r\n1373504,\r\n1373665,\r\n1373696,\r\n1373857,\r\n1373888,\r\n1373921,\r\n1373952,\r\n1373985,\r\n1374016,\r\n1374049,\r\n1374080,\r\n1374113,\r\n1374144,\r\n1374177,\r\n1374208,\r\n1374241,\r\n1374272,\r\n1374305,\r\n1374336,\r\n1374465,\r\n1374496,\r\n1374529,\r\n1374589,\r\n1374720,\r\n1374753,\r\n1374813,\r\n1374817,\r\n1374877,\r\n1374881,\r\n1374912,\r\n1374945,\r\n1374976,\r\n1375009,\r\n1375069,\r\n1375811,\r\n1375904,\r\n1375937,\r\n1375972,\r\n1376003,\r\n1376065,\r\n1376100,\r\n1376325,\r\n1376356,\r\n1376453,\r\n1376484,\r\n1376613,\r\n1376644,\r\n1377382,\r\n1377445,\r\n1377510,\r\n1377557,\r\n1377669,\r\n1377725,\r\n1377802,\r\n1378005,\r\n1378067,\r\n1378101,\r\n1378141,\r\n1378308,\r\n1379985,\r\n1380125,\r\n1380358,\r\n1380420,\r\n1382022,\r\n1382533,\r\n1382621,\r\n1382865,\r\n1382920,\r\n1383261,\r\n1383429,\r\n1384004,\r\n1384209,\r\n1384292,\r\n1384337,\r\n1384356,\r\n1384421,\r\n1384456,\r\n1384772,\r\n1385669,\r\n1385937,\r\n1385988,\r\n1386725,\r\n1387078,\r\n1387165,\r\n1387505,\r\n1387524,\r\n1388477,\r\n1388549,\r\n1388646,\r\n1388676,\r\n1390181,\r\n1390214,\r\n1390277,\r\n1390406,\r\n1390469,\r\n1390534,\r\n1390641,\r\n1391069,\r\n1391075,\r\n1391112,\r\n1391453,\r\n1391569,\r\n1391620,\r\n1391781,\r\n1391811,\r\n1391844,\r\n1392136,\r\n1392452,\r\n1392637,\r\n1392644,\r\n1393957,\r\n1394150,\r\n1394213,\r\n1394278,\r\n1394341,\r\n1394429,\r\n1394692,\r\n1394789,\r\n1394820,\r\n1395077,\r\n1395110,\r\n1395165,\r\n1395208,\r\n1395549,\r\n1395601,\r\n1395716,\r\n1396227,\r\n1396260,\r\n1396469,\r\n1396548,\r\n1396582,\r\n1396613,\r\n1396646,\r\n1396676,\r\n1398277,\r\n1398308,\r\n1398341,\r\n1398436,\r\n1398501,\r\n1398564,\r\n1398725,\r\n1398788,\r\n1398821,\r\n1398852,\r\n1398909,\r\n1399652,\r\n1399715,\r\n1399761,\r\n1399812,\r\n1400166,\r\n1400197,\r\n1400262,\r\n1400337,\r\n1400388,\r\n1400419,\r\n1400486,\r\n1400517,\r\n1400573,\r\n1400868,\r\n1401085,\r\n1401124,\r\n1401341,\r\n1401380,\r\n1401597,\r\n1401860,\r\n1402109,\r\n1402116,\r\n1402365,\r\n1402369,\r\n1403764,\r\n1403779,\r\n1403905,\r\n1404195,\r\n1404244,\r\n1404317,\r\n1404417,\r\n1406980,\r\n1408102,\r\n1408165,\r\n1408198,\r\n1408261,\r\n1408294,\r\n1408369,\r\n1408390,\r\n1408421,\r\n1408477,\r\n1408520,\r\n1408861,\r\n1409028,\r\n1766557,\r\n1766916,\r\n1767677,\r\n1767780,\r\n1769373,\r\n1769499,\r\n1835036,\r\n2039812,\r\n2051549,\r\n2051588,\r\n2055005,\r\n2056193,\r\n2056445,\r\n2056801,\r\n2056989,\r\n2057124,\r\n2057157,\r\n2057188,\r\n2057522,\r\n2057540,\r\n2057981,\r\n2057988,\r\n2058173,\r\n2058180,\r\n2058237,\r\n2058244,\r\n2058333,\r\n2058340,\r\n2058429,\r\n2058436,\r\n2061908,\r\n2062461,\r\n2062948,\r\n2074574,\r\n2074605,\r\n2074645,\r\n2075140,\r\n2077213,\r\n2077252,\r\n2079005,\r\n2079221,\r\n2079261,\r\n2080260,\r\n2080659,\r\n2080693,\r\n2080773,\r\n2081297,\r\n2081517,\r\n2081550,\r\n2081585,\r\n2081629,\r\n2081797,\r\n2082321,\r\n2082348,\r\n2082411,\r\n2082477,\r\n2082510,\r\n2082541,\r\n2082574,\r\n2082605,\r\n2082638,\r\n2082669,\r\n2082702,\r\n2082733,\r\n2082766,\r\n2082797,\r\n2082830,\r\n2082861,\r\n2082894,\r\n2082925,\r\n2082958,\r\n2082993,\r\n2083053,\r\n2083086,\r\n2083121,\r\n2083243,\r\n2083345,\r\n2083453,\r\n2083473,\r\n2083596,\r\n2083629,\r\n2083662,\r\n2083693,\r\n2083726,\r\n2083757,\r\n2083790,\r\n2083825,\r\n2083922,\r\n2083948,\r\n2083986,\r\n2084093,\r\n2084113,\r\n2084147,\r\n2084177,\r\n2084253,\r\n2084356,\r\n2084541,\r\n2084548,\r\n2088893,\r\n2088954,\r\n2088989,\r\n2089009,\r\n2089107,\r\n2089137,\r\n2089229,\r\n2089262,\r\n2089297,\r\n2089330,\r\n2089361,\r\n2089388,\r\n2089425,\r\n2089480,\r\n2089809,\r\n2089874,\r\n2089969,\r\n2090016,\r\n2090861,\r\n2090897,\r\n2090926,\r\n2090964,\r\n2090987,\r\n2091028,\r\n2091041,\r\n2091885,\r\n2091922,\r\n2091950,\r\n2091986,\r\n2092013,\r\n2092046,\r\n2092081,\r\n2092109,\r\n2092142,\r\n2092177,\r\n2092228,\r\n2092547,\r\n2092580,\r\n2094019,\r\n2094084,\r\n2095101,\r\n2095172,\r\n2095389,\r\n2095428,\r\n2095645,\r\n2095684,\r\n2095901,\r\n2095940,\r\n2096061,\r\n2096147,\r\n2096210,\r\n2096244,\r\n2096277,\r\n2096307,\r\n2096381,\r\n2096405,\r\n2096434,\r\n2096565,\r\n2096637,\r\n2096954,\r\n2097045,\r\n2097117,\r\n2097156,\r\n2097565,\r\n2097572,\r\n2098429,\r\n2098436,\r\n2099069,\r\n2099076,\r\n2099165,\r\n2099172,\r\n2099677,\r\n2099716,\r\n2100189,\r\n2101252,\r\n2105213,\r\n2105361,\r\n2105469,\r\n2105578,\r\n2107037,\r\n2107125,\r\n2107401,\r\n2109098,\r\n2109237,\r\n2109770,\r\n2109845,\r\n2109949,\r\n2109973,\r\n2110397,\r\n2110485,\r\n2110525,\r\n2112021,\r\n2113445,\r\n2113501,\r\n2117636,\r\n2118589,\r\n2118660,\r\n2120253,\r\n2120709,\r\n2120746,\r\n2121629,\r\n2121732,\r\n2122762,\r\n2122909,\r\n2123172,\r\n2123817,\r\n2123844,\r\n2124105,\r\n2124157,\r\n2124292,\r\n2125509,\r\n2125693,\r\n2125828,\r\n2126813,\r\n2126833,\r\n2126852,\r\n2128029,\r\n2128132,\r\n2128401,\r\n2128425,\r\n2128605,\r\n2129920,\r\n2131201,\r\n2132484,\r\n2135005,\r\n2135048,\r\n2135389,\r\n2135552,\r\n2136733,\r\n2136833,\r\n2138013,\r\n2138116,\r\n2139421,\r\n2139652,\r\n2141341,\r\n2141681,\r\n2141696,\r\n2142077,\r\n2142080,\r\n2142589,\r\n2142592,\r\n2142845,\r\n2142848,\r\n2142941,\r\n2142945,\r\n2143325,\r\n2143329,\r\n2143837,\r\n2143841,\r\n2144093,\r\n2144097,\r\n2144189,\r\n2146308,\r\n2156285,\r\n2156548,\r\n2157277,\r\n2157572,\r\n2157853,\r\n2158595,\r\n2158813,\r\n2158819,\r\n2160189,\r\n2160195,\r\n2160509,\r\n2162692,\r\n2162909,\r\n2162948,\r\n2163005,\r\n2163012,\r\n2164445,\r\n2164452,\r\n2164541,\r\n2164612,\r\n2164669,\r\n2164708,\r\n2165469,\r\n2165489,\r\n2165514,\r\n2165764,\r\n2166517,\r\n2166570,\r\n2166788,\r\n2167805,\r\n2168042,\r\n2168349,\r\n2169860,\r\n2170493,\r\n2170500,\r\n2170589,\r\n2170730,\r\n2170884,\r\n2171594,\r\n2171805,\r\n2171889,\r\n2171908,\r\n2172765,\r\n2172913,\r\n2172957,\r\n2174980,\r\n2176797,\r\n2176906,\r\n2176964,\r\n2177034,\r\n2177565,\r\n2177610,\r\n2179076,\r\n2179109,\r\n2179229,\r\n2179237,\r\n2179325,\r\n2179461,\r\n2179588,\r\n2179741,\r\n2179748,\r\n2179869,\r\n2179876,\r\n2180829,\r\n2180869,\r\n2180989,\r\n2181093,\r\n2181130,\r\n2181437,\r\n2181649,\r\n2181949,\r\n2182148,\r\n2183082,\r\n2183153,\r\n2183172,\r\n2184106,\r\n2184221,\r\n2185220,\r\n2185493,\r\n2185508,\r\n2186405,\r\n2186493,\r\n2186602,\r\n2186769,\r\n2187005,\r\n2187268,\r\n2189021,\r\n2189105,\r\n2189316,\r\n2190045,\r\n2190090,\r\n2190340,\r\n2190973,\r\n2191114,\r\n2191364,\r\n2191965,\r\n2192177,\r\n2192317,\r\n2192682,\r\n2192925,\r\n2195460,\r\n2197821,\r\n2199552,\r\n2201213,\r\n2201601,\r\n2203261,\r\n2203466,\r\n2203652,\r\n2204805,\r\n2204957,\r\n2205192,\r\n2205533,\r\n2214922,\r\n2215933,\r\n2215940,\r\n2217309,\r\n2217317,\r\n2217388,\r\n2217437,\r\n2217476,\r\n2217565,\r\n2219941,\r\n2220036,\r\n2220970,\r\n2221284,\r\n2221341,\r\n2221572,\r\n2222277,\r\n2222634,\r\n2222769,\r\n2222941,\r\n2223620,\r\n2224197,\r\n2224337,\r\n2224477,\r\n2225668,\r\n2226346,\r\n2226589,\r\n2227204,\r\n2227965,\r\n2228230,\r\n2228261,\r\n2228294,\r\n2228324,\r\n2230021,\r\n2230513,\r\n2230749,\r\n2230858,\r\n2231496,\r\n2231813,\r\n2231844,\r\n2231909,\r\n2231972,\r\n2232029,\r\n2232293,\r\n2232390,\r\n2232420,\r\n2233862,\r\n2233957,\r\n2234086,\r\n2234149,\r\n2234225,\r\n2234298,\r\n2234321,\r\n2234437,\r\n2234493,\r\n2234810,\r\n2234845,\r\n2234884,\r\n2235709,\r\n2235912,\r\n2236253,\r\n2236421,\r\n2236516,\r\n2237669,\r\n2237830,\r\n2237861,\r\n2238141,\r\n2238152,\r\n2238481,\r\n2238596,\r\n2238630,\r\n2238692,\r\n2238749,\r\n2238980,\r\n2240101,\r\n2240145,\r\n2240196,\r\n2240253,\r\n2240517,\r\n2240582,\r\n2240612,\r\n2242150,\r\n2242245,\r\n2242534,\r\n2242596,\r\n2242737,\r\n2242853,\r\n2242993,\r\n2243014,\r\n2243045,\r\n2243080,\r\n2243396,\r\n2243441,\r\n2243460,\r\n2243505,\r\n2243613,\r\n2243626,\r\n2244285,\r\n2244612,\r\n2245213,\r\n2245220,\r\n2246022,\r\n2246117,\r\n2246214,\r\n2246277,\r\n2246310,\r\n2246341,\r\n2246417,\r\n2246597,\r\n2246628,\r\n2246693,\r\n2246749,\r\n2248708,\r\n2248957,\r\n2248964,\r\n2249021,\r\n2249028,\r\n2249181,\r\n2249188,\r\n2249693,\r\n2249700,\r\n2250033,\r\n2250077,\r\n2250244,\r\n2251749,\r\n2251782,\r\n2251877,\r\n2252157,\r\n2252296,\r\n2252637,\r\n2252805,\r\n2252870,\r\n2252957,\r\n2252964,\r\n2253245,\r\n2253284,\r\n2253373,\r\n2253412,\r\n2254141,\r\n2254148,\r\n2254397,\r\n2254404,\r\n2254493,\r\n2254500,\r\n2254685,\r\n2254693,\r\n2254756,\r\n2254790,\r\n2254853,\r\n2254886,\r\n2255037,\r\n2255078,\r\n2255165,\r\n2255206,\r\n2255325,\r\n2255364,\r\n2255421,\r\n2255590,\r\n2255645,\r\n2255780,\r\n2255942,\r\n2256029,\r\n2256069,\r\n2256317,\r\n2256389,\r\n2256573,\r\n2260996,\r\n2262694,\r\n2262789,\r\n2263046,\r\n2263109,\r\n2263206,\r\n2263237,\r\n2263268,\r\n2263409,\r\n2263560,\r\n2263889,\r\n2263965,\r\n2263985,\r\n2264005,\r\n2264036,\r\n2264157,\r\n2265092,\r\n2266630,\r\n2266725,\r\n2266918,\r\n2266949,\r\n2266982,\r\n2267109,\r\n2267174,\r\n2267205,\r\n2267268,\r\n2267345,\r\n2267364,\r\n2267421,\r\n2267656,\r\n2267997,\r\n2273284,\r\n2274790,\r\n2274885,\r\n2275037,\r\n2275078,\r\n2275205,\r\n2275270,\r\n2275301,\r\n2275377,\r\n2276100,\r\n2276229,\r\n2276317,\r\n2277380,\r\n2278918,\r\n2279013,\r\n2279270,\r\n2279333,\r\n2279366,\r\n2279397,\r\n2279473,\r\n2279556,\r\n2279613,\r\n2279944,\r\n2280285,\r\n2280465,\r\n2280893,\r\n2281476,\r\n2282853,\r\n2282886,\r\n2282917,\r\n2282950,\r\n2283013,\r\n2283206,\r\n2283237,\r\n2283268,\r\n2283313,\r\n2283357,\r\n2283528,\r\n2283869,\r\n2285572,\r\n2286461,\r\n2286501,\r\n2286598,\r\n2286661,\r\n2286790,\r\n2286821,\r\n2287005,\r\n2287112,\r\n2287434,\r\n2287505,\r\n2287605,\r\n2287620,\r\n2287869,\r\n2293764,\r\n2295174,\r\n2295269,\r\n2295558,\r\n2295589,\r\n2295665,\r\n2295709,\r\n2298880,\r\n2299905,\r\n2300936,\r\n2301258,\r\n2301565,\r\n2301924,\r\n2302205,\r\n2302244,\r\n2302301,\r\n2302340,\r\n2302621,\r\n2302628,\r\n2302717,\r\n2302724,\r\n2303494,\r\n2303709,\r\n2303718,\r\n2303805,\r\n2303845,\r\n2303910,\r\n2303941,\r\n2303972,\r\n2304006,\r\n2304036,\r\n2304070,\r\n2304101,\r\n2304145,\r\n2304253,\r\n2304520,\r\n2304861,\r\n2307076,\r\n2307357,\r\n2307396,\r\n2308646,\r\n2308741,\r\n2308893,\r\n2308933,\r\n2308998,\r\n2309125,\r\n2309156,\r\n2309201,\r\n2309220,\r\n2309254,\r\n2309309,\r\n2310148,\r\n2310181,\r\n2310500,\r\n2311781,\r\n2311974,\r\n2312004,\r\n2312037,\r\n2312177,\r\n2312421,\r\n2312477,\r\n2312708,\r\n2312741,\r\n2312934,\r\n2312997,\r\n2313092,\r\n2314565,\r\n2314982,\r\n2315013,\r\n2315089,\r\n2315172,\r\n2315217,\r\n2315389,\r\n2315780,\r\n2318141,\r\n2318353,\r\n2318685,\r\n2326532,\r\n2326845,\r\n2326852,\r\n2328038,\r\n2328069,\r\n2328317,\r\n2328325,\r\n2328518,\r\n2328549,\r\n2328580,\r\n2328625,\r\n2328797,\r\n2329096,\r\n2329418,\r\n2330045,\r\n2330129,\r\n2330180,\r\n2331165,\r\n2331205,\r\n2331933,\r\n2331942,\r\n2331973,\r\n2332198,\r\n2332229,\r\n2332294,\r\n2332325,\r\n2332413,\r\n2334724,\r\n2334973,\r\n2334980,\r\n2335069,\r\n2335076,\r\n2336293,\r\n2336509,\r\n2336581,\r\n2336637,\r\n2336645,\r\n2336733,\r\n2336741,\r\n2336964,\r\n2336997,\r\n2337053,\r\n2337288,\r\n2337629,\r\n2337796,\r\n2338013,\r\n2338020,\r\n2338109,\r\n2338116,\r\n2339142,\r\n2339325,\r\n2339333,\r\n2339421,\r\n2339430,\r\n2339493,\r\n2339526,\r\n2339557,\r\n2339588,\r\n2339645,\r\n2339848,\r\n2340189,\r\n2350084,\r\n2350693,\r\n2350758,\r\n2350833,\r\n2350909,\r\n2351109,\r\n2351172,\r\n2351206,\r\n2351236,\r\n2351677,\r\n2351684,\r\n2352774,\r\n2352837,\r\n2353021,\r\n2353094,\r\n2353157,\r\n2353190,\r\n2353221,\r\n2353265,\r\n2353672,\r\n2354013,\r\n2356740,\r\n2356797,\r\n2357258,\r\n2357941,\r\n2358195,\r\n2358325,\r\n2358877,\r\n2359281,\r\n2359300,\r\n2388829,\r\n2392073,\r\n2395645,\r\n2395665,\r\n2395837,\r\n2396164,\r\n2402461,\r\n2486788,\r\n2489905,\r\n2489981,\r\n2490372,\r\n2524698,\r\n2525189,\r\n2525220,\r\n2525413,\r\n2525917,\r\n2654212,\r\n2672893,\r\n2949124,\r\n2967357,\r\n2967556,\r\n2968573,\r\n2968584,\r\n2968925,\r\n2969041,\r\n2969092,\r\n2971645,\r\n2971656,\r\n2971997,\r\n2972164,\r\n2973149,\r\n2973189,\r\n2973361,\r\n2973405,\r\n2973700,\r\n2975237,\r\n2975473,\r\n2975637,\r\n2975747,\r\n2975889,\r\n2975925,\r\n2975965,\r\n2976264,\r\n2976605,\r\n2976618,\r\n2976861,\r\n2976868,\r\n2977565,\r\n2977700,\r\n2978333,\r\n3000320,\r\n3001345,\r\n3002378,\r\n3003121,\r\n3003261,\r\n3006468,\r\n3008893,\r\n3008997,\r\n3009028,\r\n3009062,\r\n3010845,\r\n3011045,\r\n3011171,\r\n3011613,\r\n3013635,\r\n3013713,\r\n3013731,\r\n3013765,\r\n3013821,\r\n3014150,\r\n3014237,\r\n3014660,\r\n3211037,\r\n3211268,\r\n3250909,\r\n3252228,\r\n3252541,\r\n3538435,\r\n3538589,\r\n3538595,\r\n3538845,\r\n3538851,\r\n3538941,\r\n3538948,\r\n3548285,\r\n3548740,\r\n3548797,\r\n3549700,\r\n3549821,\r\n3549860,\r\n3549917,\r\n3550340,\r\n3550493,\r\n3550724,\r\n3563421,\r\n3637252,\r\n3640701,\r\n3640836,\r\n3641277,\r\n3641348,\r\n3641661,\r\n3641860,\r\n3642205,\r\n3642261,\r\n3642277,\r\n3642353,\r\n3642394,\r\n3642525,\r\n3792901,\r\n3794397,\r\n3794437,\r\n3795197,\r\n3795477,\r\n3799197,\r\n3801109,\r\n3808989,\r\n3809301,\r\n3810557,\r\n3810613,\r\n3812518,\r\n3812581,\r\n3812693,\r\n3812774,\r\n3812986,\r\n3813221,\r\n3813493,\r\n3813541,\r\n3813781,\r\n3814725,\r\n3814869,\r\n3816829,\r\n3817493,\r\n3819589,\r\n3819701,\r\n3819741,\r\n3823626,\r\n3824285,\r\n3824650,\r\n3825309,\r\n3825685,\r\n3828477,\r\n3828746,\r\n3829565,\r\n3833856,\r\n3834689,\r\n3835520,\r\n3836353,\r\n3836605,\r\n3836609,\r\n3837184,\r\n3838017,\r\n3838848,\r\n3838909,\r\n3838912,\r\n3839005,\r\n3839040,\r\n3839101,\r\n3839136,\r\n3839229,\r\n3839264,\r\n3839421,\r\n3839424,\r\n3839681,\r\n3839837,\r\n3839841,\r\n3839901,\r\n3839905,\r\n3840157,\r\n3840161,\r\n3840512,\r\n3841345,\r\n3842176,\r\n3842269,\r\n3842272,\r\n3842429,\r\n3842464,\r\n3842749,\r\n3842752,\r\n3843005,\r\n3843009,\r\n3843840,\r\n3843933,\r\n3843936,\r\n3844093,\r\n3844096,\r\n3844285,\r\n3844288,\r\n3844349,\r\n3844416,\r\n3844669,\r\n3844673,\r\n3845504,\r\n3846337,\r\n3847168,\r\n3848001,\r\n3848832,\r\n3849665,\r\n3850496,\r\n3851329,\r\n3852160,\r\n3852993,\r\n3853824,\r\n3854657,\r\n3855581,\r\n3855616,\r\n3856434,\r\n3856449,\r\n3857266,\r\n3857281,\r\n3857472,\r\n3858290,\r\n3858305,\r\n3859122,\r\n3859137,\r\n3859328,\r\n3860146,\r\n3860161,\r\n3860978,\r\n3860993,\r\n3861184,\r\n3862002,\r\n3862017,\r\n3862834,\r\n3862849,\r\n3863040,\r\n3863858,\r\n3863873,\r\n3864690,\r\n3864705,\r\n3864896,\r\n3864929,\r\n3864989,\r\n3865032,\r\n3866645,\r\n3883013,\r\n3884789,\r\n3884901,\r\n3886517,\r\n3886757,\r\n3886805,\r\n3887237,\r\n3887285,\r\n3887345,\r\n3887517,\r\n3887973,\r\n3888157,\r\n3888165,\r\n3888669,\r\n3923969,\r\n3924292,\r\n3924321,\r\n3924989,\r\n3925153,\r\n3925373,\r\n3932165,\r\n3932413,\r\n3932421,\r\n3932989,\r\n3933029,\r\n3933277,\r\n3933285,\r\n3933373,\r\n3933381,\r\n3933565,\r\n3933699,\r\n3935709,\r\n3936741,\r\n3936797,\r\n3940356,\r\n3941821,\r\n3941893,\r\n3942115,\r\n3942365,\r\n3942408,\r\n3942749,\r\n3942852,\r\n3942901,\r\n3942941,\r\n3953156,\r\n3954117,\r\n3954173,\r\n3954692,\r\n3956101,\r\n3956232,\r\n3956573,\r\n3956723,\r\n3956765,\r\n3971588,\r\n3972451,\r\n3972485,\r\n3972616,\r\n3972957,\r\n3996676,\r\n3996925,\r\n3996932,\r\n3997085,\r\n3997092,\r\n3997181,\r\n3997188,\r\n3997693,\r\n3997700,\r\n4004029,\r\n4004074,\r\n4004357,\r\n4004605,\r\n4005888,\r\n4006977,\r\n4008069,\r\n4008291,\r\n4008349,\r\n4008456,\r\n4008797,\r\n4008913,\r\n4008989,\r\n4034090,\r\n4035989,\r\n4036010,\r\n4036115,\r\n4036138,\r\n4036285,\r\n4038698,\r\n4040149,\r\n4040170,\r\n4040669,\r\n4046852,\r\n4047005,\r\n4047012,\r\n4047901,\r\n4047908,\r\n4047997,\r\n4048004,\r\n4048061,\r\n4048100,\r\n4048157,\r\n4048164,\r\n4048509,\r\n4048516,\r\n4048669,\r\n4048676,\r\n4048733,\r\n4048740,\r\n4048797,\r\n4048964,\r\n4049021,\r\n4049124,\r\n4049181,\r\n4049188,\r\n4049245,\r\n4049252,\r\n4049309,\r\n4049316,\r\n4049437,\r\n4049444,\r\n4049533,\r\n4049540,\r\n4049597,\r\n4049636,\r\n4049693,\r\n4049700,\r\n4049757,\r\n4049764,\r\n4049821,\r\n4049828,\r\n4049885,\r\n4049892,\r\n4049949,\r\n4049956,\r\n4050045,\r\n4050052,\r\n4050109,\r\n4050148,\r\n4050301,\r\n4050308,\r\n4050557,\r\n4050564,\r\n4050717,\r\n4050724,\r\n4050877,\r\n4050884,\r\n4050941,\r\n4050948,\r\n4051293,\r\n4051300,\r\n4051869,\r\n4052004,\r\n4052125,\r\n4052132,\r\n4052317,\r\n4052324,\r\n4052893,\r\n4054546,\r\n4054621,\r\n4063253,\r\n4064669,\r\n4064789,\r\n4067997,\r\n4068373,\r\n4068861,\r\n4068917,\r\n4069405,\r\n4069429,\r\n4069917,\r\n4069941,\r\n4071133,\r\n4071434,\r\n4071861,\r\n4077021,\r\n4078805,\r\n4079741,\r\n4080149,\r\n4081565,\r\n4081685,\r\n4081981,\r\n4082197,\r\n4082269,\r\n4082709,\r\n4082909,\r\n4087829,\r\n4095860,\r\n4096021,\r\n4119325,\r\n4119445,\r\n4119997,\r\n4120085,\r\n4120509,\r\n4120597,\r\n4124413,\r\n4124533,\r\n4127581,\r\n4127765,\r\n4128157,\r\n4128277,\r\n4128317,\r\n4128789,\r\n4129181,\r\n4129301,\r\n4131101,\r\n4131349,\r\n4131677,\r\n4131861,\r\n4133149,\r\n4133397,\r\n4134365,\r\n4134421,\r\n4134493,\r\n4136981,\r\n4147869,\r\n4148245,\r\n4148701,\r\n4148757,\r\n4149181,\r\n4149269,\r\n4149565,\r\n4149781,\r\n4151261,\r\n4151285,\r\n4151517,\r\n4151765,\r\n4152221,\r\n4152341,\r\n4152637,\r\n4152853,\r\n4153149,\r\n4153365,\r\n4158077,\r\n4158101,\r\n4159869,\r\n4161032,\r\n4161373,\r\n4194308,\r\n5561373,\r\n5562372,\r\n5695325,\r\n5695492,\r\n5702621,\r\n5702660,\r\n5887069,\r\n5887492,\r\n6126653,\r\n6225924,\r\n6243293,\r\n6291460,\r\n6449533,\r\n6449668,\r\n6583837,\r\n29360186,\r\n29360221,\r\n29361178,\r\n29364253,\r\n29368325,\r\n29376029,\r\n31457308,\r\n33554397,\r\n33554460,\r\n35651549,\r\n35651613,\r\n//--Autogenerated -- end of section automatically generated\r\n};\r\n\r\nconstexpr int maxUnicode = 0x10ffff;\r\nconstexpr int maskCategory = 0x1F;\r\n\r\n}\r\n\r\n// Each element in catRanges is the start of a range of Unicode characters in\r\n// one general category.\r\n// The value is comprised of a 21-bit character value shifted 5 bits and a 5 bit\r\n// category matching the CharacterCategory enumeration.\r\n// Initial version has 3249 entries and adds about 13K to the executable.\r\n// The array is in ascending order so can be searched using binary search.\r\n// Therefore the average call takes log2(3249) = 12 comparisons.\r\n// For speed, it may be useful to make a linear table for the common values,\r\n// possibly for 0..0xff for most Western European text or 0..0xfff for most\r\n// alphabetic languages.\r\n\r\nCharacterCategory CategoriseCharacter(int character) noexcept {\r\n\tif (character < 0 || character > maxUnicode)\r\n\t\treturn ccCn;\r\n\tconst int baseValue = character * (maskCategory+1) + maskCategory;\r\n\ttry {\r\n\t\t// lower_bound will never throw with these args but its not marked noexcept so add catch to pretend.\r\n\t\tconst int *placeAfter = std::lower_bound(catRanges, std::end(catRanges), baseValue);\r\n\t\treturn static_cast<CharacterCategory>(*(placeAfter - 1) & maskCategory);\r\n\t} catch (...) {\r\n\t\treturn ccCn;\r\n\t}\r\n}\r\n\r\n// Implementation of character sets recommended for identifiers in Unicode Standard Annex #31.\r\n// http://unicode.org/reports/tr31/\r\n\r\nnamespace {\r\n\r\nenum class OtherID { oidNone, oidStart, oidContinue };\r\n\r\n// Some characters are treated as valid for identifiers even\r\n// though most characters from their category are not.\r\n// Values copied from http://www.unicode.org/Public/9.0.0/ucd/PropList.txt\r\nOtherID OtherIDOfCharacter(int character) noexcept {\r\n\tif (\r\n\t\t(character == 0x1885) ||\t// MONGOLIAN LETTER ALI GALI BALUDA\r\n\t\t(character == 0x1886) ||\t// MONGOLIAN LETTER ALI GALI THREE BALUDA\r\n\t\t(character == 0x2118) ||\t// SCRIPT CAPITAL P\r\n\t\t(character == 0x212E) ||\t// ESTIMATED SYMBOL\r\n\t\t(character == 0x309B) ||\t// KATAKANA-HIRAGANA VOICED SOUND MARK\r\n\t\t(character == 0x309C)) {\t// KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK\r\n\t\treturn OtherID::oidStart;\r\n\t} else if (\r\n\t\t(character == 0x00B7) ||\t// MIDDLE DOT\r\n\t\t(character == 0x0387) ||\t// GREEK ANO TELEIA\r\n\t\t((character >= 0x1369) && (character <= 0x1371)) ||\t// ETHIOPIC DIGIT ONE..ETHIOPIC DIGIT NINE\r\n\t\t(character == 0x19DA)) {\t// NEW TAI LUE THAM DIGIT ONE\r\n\t\treturn OtherID::oidContinue;\r\n\t} else {\r\n\t\treturn OtherID::oidNone;\r\n\t}\r\n}\r\n\r\n// Determine if a character is in  Ll|Lu|Lt|Lm|Lo|Nl|Mn|Mc|Nd|Pc and has\r\n// Pattern_Syntax|Pattern_White_Space.\r\n// As of Unicode 9, only VERTICAL TILDE which is in Lm and has Pattern_Syntax matches.\r\n// Should really generate from PropList.txt a list of Pattern_Syntax and Pattern_White_Space.\r\nconstexpr bool IsIdPattern(int character) noexcept {\r\n\treturn character == 0x2E2F;\r\n}\r\n\r\nbool OmitXidStart(int character) noexcept {\r\n\tswitch (character) {\r\n\tcase 0x037A:\t// GREEK YPOGEGRAMMENI\r\n\tcase 0x0E33:\t// THAI CHARACTER SARA AM\r\n\tcase 0x0EB3:\t// LAO VOWEL SIGN AM\r\n\tcase 0x309B:\t// KATAKANA-HIRAGANA VOICED SOUND MARK\r\n\tcase 0x309C:\t// KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK\r\n\tcase 0xFC5E:\t// ARABIC LIGATURE SHADDA WITH DAMMATAN ISOLATED FORM\r\n\tcase 0xFC5F:\t// ARABIC LIGATURE SHADDA WITH KASRATAN ISOLATED FORM\r\n\tcase 0xFC60:\t// ARABIC LIGATURE SHADDA WITH FATHA ISOLATED FORM\r\n\tcase 0xFC61:\t// ARABIC LIGATURE SHADDA WITH DAMMA ISOLATED FORM\r\n\tcase 0xFC62:\t// ARABIC LIGATURE SHADDA WITH KASRA ISOLATED FORM\r\n\tcase 0xFC63:\t// ARABIC LIGATURE SHADDA WITH SUPERSCRIPT ALEF ISOLATED FORM\r\n\tcase 0xFDFA:\t// ARABIC LIGATURE SALLALLAHOU ALAYHE WASALLAM\r\n\tcase 0xFDFB:\t// ARABIC LIGATURE JALLAJALALOUHOU\r\n\tcase 0xFE70:\t// ARABIC FATHATAN ISOLATED FORM\r\n\tcase 0xFE72:\t// ARABIC DAMMATAN ISOLATED FORM\r\n\tcase 0xFE74:\t// ARABIC KASRATAN ISOLATED FORM\r\n\tcase 0xFE76:\t// ARABIC FATHA ISOLATED FORM\r\n\tcase 0xFE78:\t// ARABIC DAMMA ISOLATED FORM\r\n\tcase 0xFE7A:\t// ARABIC KASRA ISOLATED FORM\r\n\tcase 0xFE7C:\t// ARABIC SHADDA ISOLATED FORM\r\n\tcase 0xFE7E:\t// ARABIC SUKUN ISOLATED FORM\r\n\tcase 0xFF9E:\t// HALFWIDTH KATAKANA VOICED SOUND MARK\r\n\tcase 0xFF9F:\t// HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK\r\n\t\treturn true;\r\n\tdefault:\r\n\t\treturn false;\r\n\t}\r\n}\r\n\r\nbool OmitXidContinue(int character) noexcept {\r\n\tswitch (character) {\r\n\tcase 0x037A:\t// GREEK YPOGEGRAMMENI\r\n\tcase 0x309B:\t// KATAKANA-HIRAGANA VOICED SOUND MARK\r\n\tcase 0x309C:\t// KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK\r\n\tcase 0xFC5E:\t// ARABIC LIGATURE SHADDA WITH DAMMATAN ISOLATED FORM\r\n\tcase 0xFC5F:\t// ARABIC LIGATURE SHADDA WITH KASRATAN ISOLATED FORM\r\n\tcase 0xFC60:\t// ARABIC LIGATURE SHADDA WITH FATHA ISOLATED FORM\r\n\tcase 0xFC61:\t// ARABIC LIGATURE SHADDA WITH DAMMA ISOLATED FORM\r\n\tcase 0xFC62:\t// ARABIC LIGATURE SHADDA WITH KASRA ISOLATED FORM\r\n\tcase 0xFC63:\t// ARABIC LIGATURE SHADDA WITH SUPERSCRIPT ALEF ISOLATED FORM\r\n\tcase 0xFDFA:\t// ARABIC LIGATURE SALLALLAHOU ALAYHE WASALLAM\r\n\tcase 0xFDFB:\t// ARABIC LIGATURE JALLAJALALOUHOU\r\n\tcase 0xFE70:\t// ARABIC FATHATAN ISOLATED FORM\r\n\tcase 0xFE72:\t// ARABIC DAMMATAN ISOLATED FORM\r\n\tcase 0xFE74:\t// ARABIC KASRATAN ISOLATED FORM\r\n\tcase 0xFE76:\t// ARABIC FATHA ISOLATED FORM\r\n\tcase 0xFE78:\t// ARABIC DAMMA ISOLATED FORM\r\n\tcase 0xFE7A:\t// ARABIC KASRA ISOLATED FORM\r\n\tcase 0xFE7C:\t// ARABIC SHADDA ISOLATED FORM\r\n\tcase 0xFE7E:\t// ARABIC SUKUN ISOLATED FORM\r\n\t\treturn true;\r\n\tdefault:\r\n\t\treturn false;\r\n\t}\r\n}\r\n\r\n}\r\n\r\n// UAX #31 defines ID_Start as\r\n// [[:L:][:Nl:][:Other_ID_Start:]--[:Pattern_Syntax:]--[:Pattern_White_Space:]]\r\nbool IsIdStart(int character) noexcept {\r\n\tif (IsIdPattern(character)) {\r\n\t\treturn false;\r\n\t}\r\n\tconst OtherID oid = OtherIDOfCharacter(character);\r\n\tif (oid == OtherID::oidStart) {\r\n\t\treturn true;\r\n\t}\r\n\tconst CharacterCategory c = CategoriseCharacter(character);\r\n\treturn (c == ccLl || c == ccLu || c == ccLt || c == ccLm || c == ccLo\r\n\t\t|| c == ccNl);\r\n}\r\n\r\n// UAX #31 defines ID_Continue as\r\n// [[:ID_Start:][:Mn:][:Mc:][:Nd:][:Pc:][:Other_ID_Continue:]--[:Pattern_Syntax:]--[:Pattern_White_Space:]]\r\nbool IsIdContinue(int character) noexcept {\r\n\tif (IsIdPattern(character)) {\r\n\t\treturn false;\r\n\t}\r\n\tconst OtherID oid = OtherIDOfCharacter(character);\r\n\tif (oid != OtherID::oidNone) {\r\n\t\treturn true;\r\n\t}\r\n\tconst CharacterCategory c = CategoriseCharacter(character);\r\n\treturn (c == ccLl || c == ccLu || c == ccLt || c == ccLm || c == ccLo\r\n\t\t|| c == ccNl || c == ccMn || c == ccMc || c == ccNd || c == ccPc);\r\n}\r\n\r\n// XID_Start is ID_Start modified for Normalization Form KC in UAX #31\r\nbool IsXidStart(int character) noexcept {\r\n\tif (OmitXidStart(character)) {\r\n\t\treturn false;\r\n\t} else {\r\n\t\treturn IsIdStart(character);\r\n\t}\r\n}\r\n\r\n// XID_Continue is ID_Continue modified for Normalization Form KC in UAX #31\r\nbool IsXidContinue(int character) noexcept {\r\n\tif (OmitXidContinue(character)) {\r\n\t\treturn false;\r\n\t} else {\r\n\t\treturn IsIdContinue(character);\r\n\t}\r\n}\r\n\r\nCharacterCategoryMap::CharacterCategoryMap() {\r\n\tOptimize(256);\r\n}\r\n\r\nint CharacterCategoryMap::Size() const noexcept {\r\n\treturn static_cast<int>(dense.size());\r\n}\r\n\r\nvoid CharacterCategoryMap::Optimize(int countCharacters) {\r\n\tconst int characters = std::clamp(countCharacters, 256, maxUnicode + 1);\r\n\tdense.resize(characters);\r\n\r\n\tint end = 0;\r\n\tint index = 0;\r\n\tint current = catRanges[index];\r\n\t++index;\r\n\tdo {\r\n\t\tconst int next = catRanges[index];\r\n\t\tconst unsigned char category = current & maskCategory;\r\n\t\tcurrent >>= 5;\r\n\t\tend = std::min(characters, next >> 5);\r\n\t\twhile (current < end) {\r\n\t\t\tdense[current++] = category;\r\n\t\t}\r\n\t\tcurrent = next;\r\n\t\t++index;\r\n\t} while (characters > end);\r\n}\r\n\r\n}\r\n"
  },
  {
    "path": "scintilla/src/CharacterCategoryMap.h",
    "content": "// Scintilla source code edit control\r\n/** @file CharacterCategoryMap.h\r\n ** Returns the Unicode general category of a character.\r\n ** Similar code to Lexilla's lexilla/lexlib/CharacterCategory.h but renamed\r\n ** to avoid problems with builds that statically include both Scintilla and Lexilla.\r\n **/\r\n// Copyright 2013 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef CHARACTERCATEGORYMAP_H\r\n#define CHARACTERCATEGORYMAP_H\r\n\r\nnamespace Scintilla::Internal {\r\n\r\nenum CharacterCategory {\r\n\tccLu, ccLl, ccLt, ccLm, ccLo,\r\n\tccMn, ccMc, ccMe,\r\n\tccNd, ccNl, ccNo,\r\n\tccPc, ccPd, ccPs, ccPe, ccPi, ccPf, ccPo,\r\n\tccSm, ccSc, ccSk, ccSo,\r\n\tccZs, ccZl, ccZp,\r\n\tccCc, ccCf, ccCs, ccCo, ccCn\r\n};\r\n\r\nCharacterCategory CategoriseCharacter(int character) noexcept;\r\n\r\n// Common definitions of allowable characters in identifiers from UAX #31.\r\nbool IsIdStart(int character) noexcept;\r\nbool IsIdContinue(int character) noexcept;\r\nbool IsXidStart(int character) noexcept;\r\nbool IsXidContinue(int character) noexcept;\r\n\r\nclass CharacterCategoryMap {\r\nprivate:\r\n\tstd::vector<unsigned char> dense;\r\npublic:\r\n\tCharacterCategoryMap();\r\n\tCharacterCategory CategoryFor(int character) const noexcept {\r\n\t\tif (static_cast<size_t>(character) < dense.size()) {\r\n\t\t\treturn static_cast<CharacterCategory>(dense[character]);\r\n\t\t} else {\r\n\t\t\t// binary search through ranges\r\n\t\t\treturn CategoriseCharacter(character);\r\n\t\t}\r\n\t}\r\n\tint Size() const noexcept;\r\n\tvoid Optimize(int countCharacters);\r\n};\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/src/CharacterType.cxx",
    "content": "// Scintilla source code edit control\r\n/** @file CharacterType.cxx\r\n ** Tests for character type and case-insensitive comparisons.\r\n **/\r\n// Copyright 1998-2010 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#include <cstdlib>\r\n#include <cassert>\r\n#include <cstdint>\r\n\r\n#include \"CharacterType.h\"\r\n\r\nusing namespace Scintilla::Internal;\r\n\r\nnamespace Scintilla::Internal {\r\n\r\nint CompareCaseInsensitive(const char *a, const char *b) noexcept {\r\n\twhile (*a && *b) {\r\n\t\tif (*a != *b) {\r\n\t\t\tconst char upperA = MakeUpperCase(*a);\r\n\t\t\tconst char upperB = MakeUpperCase(*b);\r\n\t\t\tif (upperA != upperB)\r\n\t\t\t\treturn upperA - upperB;\r\n\t\t}\r\n\t\ta++;\r\n\t\tb++;\r\n\t}\r\n\t// Either *a or *b is nul\r\n\treturn *a - *b;\r\n}\r\n\r\nint CompareNCaseInsensitive(const char *a, const char *b, size_t len) noexcept {\r\n\twhile (*a && *b && len) {\r\n\t\tif (*a != *b) {\r\n\t\t\tconst char upperA = MakeUpperCase(*a);\r\n\t\t\tconst char upperB = MakeUpperCase(*b);\r\n\t\t\tif (upperA != upperB)\r\n\t\t\t\treturn upperA - upperB;\r\n\t\t}\r\n\t\ta++;\r\n\t\tb++;\r\n\t\tlen--;\r\n\t}\r\n\tif (len == 0)\r\n\t\treturn 0;\r\n\telse\r\n\t\t// Either *a or *b is nul\r\n\t\treturn *a - *b;\r\n}\r\n\r\n}\r\n"
  },
  {
    "path": "scintilla/src/CharacterType.h",
    "content": "// Scintilla source code edit control\r\n/** @file CharacterType.h\r\n ** Tests for character type and case-insensitive comparisons.\r\n **/\r\n// Copyright 2007 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef CHARACTERTYPE_H\r\n#define CHARACTERTYPE_H\r\n\r\nnamespace Scintilla::Internal {\r\n\r\n// Functions for classifying characters\r\n\r\n/**\r\n * Check if a character is a space.\r\n * This is ASCII specific but is safe with chars >= 0x80.\r\n */\r\nconstexpr bool IsASpace(int ch) noexcept {\r\n    return (ch == ' ') || ((ch >= 0x09) && (ch <= 0x0d));\r\n}\r\n\r\nconstexpr bool IsSpaceOrTab(int ch) noexcept {\r\n\treturn (ch == ' ') || (ch == '\\t');\r\n}\r\n\r\nconstexpr bool IsControl(int ch) noexcept {\r\n\treturn ((ch >= 0) && (ch <= 0x1F)) || (ch == 0x7F);\r\n}\r\n\r\nconstexpr bool IsEOLCharacter(int ch) noexcept {\r\n\treturn ch == '\\r' || ch == '\\n';\r\n}\r\n\r\nconstexpr bool IsBreakSpace(int ch) noexcept {\r\n\t// used for text breaking, treat C0 control character as space.\r\n\t// by default C0 control character is handled as special representation,\r\n\t// so not appears in normal text. 0x7F DEL is omitted to simplify the code.\r\n\treturn ch >= 0 && ch <= ' ';\r\n}\r\n\r\nconstexpr bool IsADigit(int ch) noexcept {\r\n\treturn (ch >= '0') && (ch <= '9');\r\n}\r\n\r\nconstexpr bool IsADigit(int ch, int base) noexcept {\r\n\tif (base <= 10) {\r\n\t\treturn (ch >= '0') && (ch < '0' + base);\r\n\t} else {\r\n\t\treturn ((ch >= '0') && (ch <= '9')) ||\r\n\t\t       ((ch >= 'A') && (ch < 'A' + base - 10)) ||\r\n\t\t       ((ch >= 'a') && (ch < 'a' + base - 10));\r\n\t}\r\n}\r\n\r\nconstexpr bool IsASCII(int ch) noexcept {\r\n\treturn (ch >= 0) && (ch < 0x80);\r\n}\r\n\r\nconstexpr bool IsLowerCase(int ch) noexcept {\r\n\treturn (ch >= 'a') && (ch <= 'z');\r\n}\r\n\r\nconstexpr bool IsUpperCase(int ch) noexcept {\r\n\treturn (ch >= 'A') && (ch <= 'Z');\r\n}\r\n\r\nconstexpr bool IsUpperOrLowerCase(int ch) noexcept {\r\n\treturn IsUpperCase(ch) || IsLowerCase(ch);\r\n}\r\n\r\nconstexpr bool IsAlphaNumeric(int ch) noexcept {\r\n\treturn\r\n\t\t((ch >= '0') && (ch <= '9')) ||\r\n\t\t((ch >= 'a') && (ch <= 'z')) ||\r\n\t\t((ch >= 'A') && (ch <= 'Z'));\r\n}\r\n\r\nconstexpr bool IsPunctuation(int ch) noexcept {\r\n\tswitch (ch) {\r\n\tcase '!':\r\n\tcase '\"':\r\n\tcase '#':\r\n\tcase '$':\r\n\tcase '%':\r\n\tcase '&':\r\n\tcase '\\'':\r\n\tcase '(':\r\n\tcase ')':\r\n\tcase '*':\r\n\tcase '+':\r\n\tcase ',':\r\n\tcase '-':\r\n\tcase '.':\r\n\tcase '/':\r\n\tcase ':':\r\n\tcase ';':\r\n\tcase '<':\r\n\tcase '=':\r\n\tcase '>':\r\n\tcase '?':\r\n\tcase '@':\r\n\tcase '[':\r\n\tcase '\\\\':\r\n\tcase ']':\r\n\tcase '^':\r\n\tcase '_':\r\n\tcase '`':\r\n\tcase '{':\r\n\tcase '|':\r\n\tcase '}':\r\n\tcase '~':\r\n\t\treturn true;\r\n\tdefault:\r\n\t\treturn false;\r\n\t}\r\n}\r\n\r\n// Simple case functions for ASCII supersets.\r\n\r\ntemplate <typename T>\r\nconstexpr T MakeUpperCase(T ch) noexcept {\r\n\tif (ch < 'a' || ch > 'z')\r\n\t\treturn ch;\r\n\telse\r\n\t\treturn ch - 'a' + 'A';\r\n}\r\n\r\ntemplate <typename T>\r\nconstexpr T MakeLowerCase(T ch) noexcept {\r\n\tif (ch < 'A' || ch > 'Z')\r\n\t\treturn ch;\r\n\telse\r\n\t\treturn ch - 'A' + 'a';\r\n}\r\n\r\nint CompareCaseInsensitive(const char *a, const char *b) noexcept;\r\nint CompareNCaseInsensitive(const char *a, const char *b, size_t len) noexcept;\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/src/ContractionState.cxx",
    "content": "// Scintilla source code edit control\r\n/** @file ContractionState.cxx\r\n ** Manages visibility of lines for folding and wrapping.\r\n **/\r\n// Copyright 1998-2007 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#include <cstddef>\r\n#include <cassert>\r\n#include <cstring>\r\n#include <cstdint>\r\n\r\n#include <stdexcept>\r\n#include <string_view>\r\n#include <vector>\r\n#include <optional>\r\n#include <algorithm>\r\n#include <memory>\r\n\r\n#include \"Debugging.h\"\r\n\r\n#include \"Position.h\"\r\n#include \"UniqueString.h\"\r\n#include \"SplitVector.h\"\r\n#include \"Partitioning.h\"\r\n#include \"RunStyles.h\"\r\n#include \"SparseVector.h\"\r\n#include \"ContractionState.h\"\r\n\r\nusing namespace Scintilla::Internal;\r\n\r\nnamespace {\r\n\r\ntemplate <typename LINE>\r\nclass ContractionState final : public IContractionState {\r\n\t// These contain 1 element for every document line.\r\n\tstd::unique_ptr<RunStyles<LINE, char>> visible;\r\n\tstd::unique_ptr<RunStyles<LINE, char>> expanded;\r\n\tstd::unique_ptr<RunStyles<LINE, int>> heights;\r\n\tstd::unique_ptr<SparseVector<UniqueString>> foldDisplayTexts;\r\n\tstd::unique_ptr<Partitioning<LINE>> displayLines;\r\n\tLINE linesInDocument;\r\n\r\n\tvoid EnsureData();\r\n\r\n\tbool OneToOne() const noexcept {\r\n\t\t// True when each document line is exactly one display line so need for\r\n\t\t// complex data structures.\r\n\t\treturn visible == nullptr;\r\n\t}\r\n\r\n\tvoid InsertLine(Sci::Line lineDoc);\r\n\tvoid DeleteLine(Sci::Line lineDoc);\r\n\r\n\t// line_cast(): cast Sci::Line to either 32-bit or 64-bit value\r\n\t// This avoids warnings from Visual C++ Code Analysis and shortens code\r\n\tstatic constexpr LINE line_cast(Sci::Line line) noexcept {\r\n\t\treturn static_cast<LINE>(line);\r\n\t}\r\n\r\npublic:\r\n\tContractionState() noexcept;\r\n\r\n\tvoid Clear() noexcept override;\r\n\r\n\tSci::Line LinesInDoc() const noexcept override;\r\n\tSci::Line LinesDisplayed() const noexcept override;\r\n\tSci::Line DisplayFromDoc(Sci::Line lineDoc) const noexcept override;\r\n\tSci::Line DisplayLastFromDoc(Sci::Line lineDoc) const noexcept override;\r\n\tSci::Line DocFromDisplay(Sci::Line lineDisplay) const noexcept override;\r\n\r\n\tvoid InsertLines(Sci::Line lineDoc, Sci::Line lineCount) override;\r\n\tvoid DeleteLines(Sci::Line lineDoc, Sci::Line lineCount) override;\r\n\r\n\tbool GetVisible(Sci::Line lineDoc) const noexcept override;\r\n\tbool SetVisible(Sci::Line lineDocStart, Sci::Line lineDocEnd, bool isVisible) override;\r\n\tbool HiddenLines() const noexcept override;\r\n\r\n\tconst char *GetFoldDisplayText(Sci::Line lineDoc) const noexcept override;\r\n\tbool SetFoldDisplayText(Sci::Line lineDoc, const char *text) override;\r\n\r\n\tbool GetExpanded(Sci::Line lineDoc) const noexcept override;\r\n\tbool SetExpanded(Sci::Line lineDoc, bool isExpanded) override;\r\n\tbool ExpandAll() override;\r\n\tSci::Line ContractedNext(Sci::Line lineDocStart) const noexcept override;\r\n\r\n\tint GetHeight(Sci::Line lineDoc) const noexcept override;\r\n\tbool SetHeight(Sci::Line lineDoc, int height) override;\r\n\r\n\tvoid ShowAll() noexcept override;\r\n\r\n\tvoid Check() const noexcept;\r\n};\r\n\r\ntemplate <typename LINE>\r\nContractionState<LINE>::ContractionState() noexcept : linesInDocument(1) {\r\n}\r\n\r\ntemplate <typename LINE>\r\nvoid ContractionState<LINE>::EnsureData() {\r\n\tif (OneToOne()) {\r\n\t\tvisible = std::make_unique<RunStyles<LINE, char>>();\r\n\t\texpanded = std::make_unique<RunStyles<LINE, char>>();\r\n\t\theights = std::make_unique<RunStyles<LINE, int>>();\r\n\t\tfoldDisplayTexts = std::make_unique<SparseVector<UniqueString>>();\r\n\t\tdisplayLines = std::make_unique<Partitioning<LINE>>(4);\r\n\t\tInsertLines(0, linesInDocument);\r\n\t}\r\n}\r\n\r\ntemplate <typename LINE>\r\nvoid ContractionState<LINE>::InsertLine(Sci::Line lineDoc) {\r\n\tif (OneToOne()) {\r\n\t\tlinesInDocument++;\r\n\t} else {\r\n\t\tconst LINE lineDocCast = line_cast(lineDoc);\r\n\t\tvisible->InsertSpace(lineDocCast, 1);\r\n\t\tvisible->SetValueAt(lineDocCast, 1);\r\n\t\texpanded->InsertSpace(lineDocCast, 1);\r\n\t\texpanded->SetValueAt(lineDocCast, 1);\r\n\t\theights->InsertSpace(lineDocCast, 1);\r\n\t\theights->SetValueAt(lineDocCast, 1);\r\n\t\tfoldDisplayTexts->InsertSpace(lineDocCast, 1);\r\n\t\tfoldDisplayTexts->SetValueAt(lineDocCast, nullptr);\r\n\t\tconst Sci::Line lineDisplay = DisplayFromDoc(lineDoc);\r\n\t\tdisplayLines->InsertPartition(lineDocCast, line_cast(lineDisplay));\r\n\t\tdisplayLines->InsertText(lineDocCast, 1);\r\n\t}\r\n}\r\n\r\ntemplate <typename LINE>\r\nvoid ContractionState<LINE>::DeleteLine(Sci::Line lineDoc) {\r\n\tif (OneToOne()) {\r\n\t\tlinesInDocument--;\r\n\t} else {\r\n\t\tconst LINE lineDocCast = line_cast(lineDoc);\r\n\t\tif (GetVisible(lineDoc)) {\r\n\t\t\tdisplayLines->InsertText(lineDocCast, -heights->ValueAt(lineDocCast));\r\n\t\t}\r\n\t\tdisplayLines->RemovePartition(lineDocCast);\r\n\t\tvisible->DeleteRange(lineDocCast, 1);\r\n\t\texpanded->DeleteRange(lineDocCast, 1);\r\n\t\theights->DeleteRange(lineDocCast, 1);\r\n\t\tfoldDisplayTexts->DeletePosition(lineDocCast);\r\n\t}\r\n}\r\n\r\ntemplate <typename LINE>\r\nvoid ContractionState<LINE>::Clear() noexcept {\r\n\tvisible.reset();\r\n\texpanded.reset();\r\n\theights.reset();\r\n\tfoldDisplayTexts.reset();\r\n\tdisplayLines.reset();\r\n\tlinesInDocument = 1;\r\n}\r\n\r\ntemplate <typename LINE>\r\nSci::Line ContractionState<LINE>::LinesInDoc() const noexcept {\r\n\tif (OneToOne()) {\r\n\t\treturn linesInDocument;\r\n\t} else {\r\n\t\treturn displayLines->Partitions() - 1;\r\n\t}\r\n}\r\n\r\ntemplate <typename LINE>\r\nSci::Line ContractionState<LINE>::LinesDisplayed() const noexcept {\r\n\tif (OneToOne()) {\r\n\t\treturn linesInDocument;\r\n\t} else {\r\n\t\treturn displayLines->PositionFromPartition(line_cast(LinesInDoc()));\r\n\t}\r\n}\r\n\r\ntemplate <typename LINE>\r\nSci::Line ContractionState<LINE>::DisplayFromDoc(Sci::Line lineDoc) const noexcept {\r\n\tif (OneToOne()) {\r\n\t\treturn (lineDoc <= linesInDocument) ? lineDoc : linesInDocument;\r\n\t} else {\r\n\t\tif (lineDoc > displayLines->Partitions())\r\n\t\t\tlineDoc = displayLines->Partitions();\r\n\t\treturn displayLines->PositionFromPartition(line_cast(lineDoc));\r\n\t}\r\n}\r\n\r\ntemplate <typename LINE>\r\nSci::Line ContractionState<LINE>::DisplayLastFromDoc(Sci::Line lineDoc) const noexcept {\r\n\treturn DisplayFromDoc(lineDoc) + GetHeight(lineDoc) - 1;\r\n}\r\n\r\ntemplate <typename LINE>\r\nSci::Line ContractionState<LINE>::DocFromDisplay(Sci::Line lineDisplay) const noexcept {\r\n\tif (OneToOne()) {\r\n\t\treturn lineDisplay;\r\n\t} else {\r\n\t\tif (lineDisplay < 0) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tif (lineDisplay > LinesDisplayed()) {\r\n\t\t\treturn displayLines->PartitionFromPosition(line_cast(LinesDisplayed()));\r\n\t\t}\r\n\t\tconst Sci::Line lineDoc = displayLines->PartitionFromPosition(line_cast(lineDisplay));\r\n\t\tPLATFORM_ASSERT(GetVisible(lineDoc));\r\n\t\treturn lineDoc;\r\n\t}\r\n}\r\n\r\ntemplate <typename LINE>\r\nvoid ContractionState<LINE>::InsertLines(Sci::Line lineDoc, Sci::Line lineCount) {\r\n\tif (OneToOne()) {\r\n\t\tlinesInDocument += line_cast(lineCount);\r\n\t} else {\r\n\t\tfor (Sci::Line l = 0; l < lineCount; l++) {\r\n\t\t\tInsertLine(lineDoc + l);\r\n\t\t}\r\n\t}\r\n\tCheck();\r\n}\r\n\r\ntemplate <typename LINE>\r\nvoid ContractionState<LINE>::DeleteLines(Sci::Line lineDoc, Sci::Line lineCount) {\r\n\tif (OneToOne()) {\r\n\t\tlinesInDocument -= line_cast(lineCount);\r\n\t} else {\r\n\t\tfor (Sci::Line l = 0; l < lineCount; l++) {\r\n\t\t\tDeleteLine(lineDoc);\r\n\t\t}\r\n\t}\r\n\tCheck();\r\n}\r\n\r\ntemplate <typename LINE>\r\nbool ContractionState<LINE>::GetVisible(Sci::Line lineDoc) const noexcept {\r\n\tif (OneToOne()) {\r\n\t\treturn true;\r\n\t} else {\r\n\t\tif (lineDoc >= visible->Length())\r\n\t\t\treturn true;\r\n\t\treturn visible->ValueAt(line_cast(lineDoc)) == 1;\r\n\t}\r\n}\r\n\r\ntemplate <typename LINE>\r\nbool ContractionState<LINE>::SetVisible(Sci::Line lineDocStart, Sci::Line lineDocEnd, bool isVisible) {\r\n\tif (OneToOne() && isVisible) {\r\n\t\treturn false;\r\n\t} else {\r\n\t\tEnsureData();\r\n\t\tCheck();\r\n\t\tif ((lineDocStart <= lineDocEnd) && (lineDocStart >= 0) && (lineDocEnd < LinesInDoc())) {\r\n\t\t\tbool changed = false;\r\n\t\t\tfor (Sci::Line line = lineDocStart; line <= lineDocEnd; line++) {\r\n\t\t\t\tif (GetVisible(line) != isVisible) {\r\n\t\t\t\t\tchanged = true;\r\n\t\t\t\t\tconst int heightLine = heights->ValueAt(line_cast(line));\r\n\t\t\t\t\tconst int difference = isVisible ? heightLine : -heightLine;\r\n\t\t\t\t\tdisplayLines->InsertText(line_cast(line), difference);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (changed) {\r\n\t\t\t\tvisible->FillRange(line_cast(lineDocStart), isVisible ? 1 : 0,\r\n\t\t\t\t\tline_cast(lineDocEnd - lineDocStart) + 1);\r\n\t\t\t}\r\n\t\t\tCheck();\r\n\t\t\treturn changed;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n}\r\n\r\ntemplate <typename LINE>\r\nbool ContractionState<LINE>::HiddenLines() const noexcept {\r\n\tif (OneToOne()) {\r\n\t\treturn false;\r\n\t} else {\r\n\t\treturn !visible->AllSameAs(1);\r\n\t}\r\n}\r\n\r\ntemplate <typename LINE>\r\nconst char *ContractionState<LINE>::GetFoldDisplayText(Sci::Line lineDoc) const noexcept {\r\n\tCheck();\r\n\treturn foldDisplayTexts->ValueAt(lineDoc).get();\r\n}\r\n\r\ntemplate <typename LINE>\r\nbool ContractionState<LINE>::SetFoldDisplayText(Sci::Line lineDoc, const char *text) {\r\n\tEnsureData();\r\n\tconst char *foldText = foldDisplayTexts->ValueAt(lineDoc).get();\r\n\tif (!foldText || !text || 0 != strcmp(text, foldText)) {\r\n\t\tUniqueString uns = IsNullOrEmpty(text) ? UniqueString() : UniqueStringCopy(text);\r\n\t\tfoldDisplayTexts->SetValueAt(lineDoc, std::move(uns));\r\n\t\tCheck();\r\n\t\treturn true;\r\n\t} else {\r\n\t\tCheck();\r\n\t\treturn false;\r\n\t}\r\n}\r\n\r\ntemplate <typename LINE>\r\nbool ContractionState<LINE>::GetExpanded(Sci::Line lineDoc) const noexcept {\r\n\tif (OneToOne()) {\r\n\t\treturn true;\r\n\t} else {\r\n\t\tCheck();\r\n\t\treturn expanded->ValueAt(line_cast(lineDoc)) == 1;\r\n\t}\r\n}\r\n\r\ntemplate <typename LINE>\r\nbool ContractionState<LINE>::SetExpanded(Sci::Line lineDoc, bool isExpanded) {\r\n\tif (OneToOne() && isExpanded) {\r\n\t\treturn false;\r\n\t} else {\r\n\t\tEnsureData();\r\n\t\tif (isExpanded != (expanded->ValueAt(line_cast(lineDoc)) == 1)) {\r\n\t\t\texpanded->SetValueAt(line_cast(lineDoc), isExpanded ? 1 : 0);\r\n\t\t\tCheck();\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\tCheck();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n}\r\n\r\ntemplate <typename LINE>\r\nbool ContractionState<LINE>::ExpandAll() {\r\n\tif (OneToOne()) {\r\n\t\treturn false;\r\n\t} else {\r\n\t\tconst LINE lines = expanded->Length();\r\n\t\tconst bool changed = expanded->FillRange(0, 1, lines).changed;\r\n\t\tCheck();\r\n\t\treturn changed;\r\n\t}\r\n}\r\n\r\ntemplate <typename LINE>\r\nSci::Line ContractionState<LINE>::ContractedNext(Sci::Line lineDocStart) const noexcept {\r\n\tif (OneToOne()) {\r\n\t\treturn -1;\r\n\t} else {\r\n\t\tCheck();\r\n\t\tif (!expanded->ValueAt(line_cast(lineDocStart))) {\r\n\t\t\treturn lineDocStart;\r\n\t\t} else {\r\n\t\t\tconst Sci::Line lineDocNextChange = expanded->EndRun(line_cast(lineDocStart));\r\n\t\t\tif (lineDocNextChange < LinesInDoc())\r\n\t\t\t\treturn lineDocNextChange;\r\n\t\t\telse\r\n\t\t\t\treturn -1;\r\n\t\t}\r\n\t}\r\n}\r\n\r\ntemplate <typename LINE>\r\nint ContractionState<LINE>::GetHeight(Sci::Line lineDoc) const noexcept {\r\n\tif (OneToOne()) {\r\n\t\treturn 1;\r\n\t} else {\r\n\t\treturn heights->ValueAt(line_cast(lineDoc));\r\n\t}\r\n}\r\n\r\n// Set the number of display lines needed for this line.\r\n// Return true if this is a change.\r\ntemplate <typename LINE>\r\nbool ContractionState<LINE>::SetHeight(Sci::Line lineDoc, int height) {\r\n\tif (OneToOne() && (height == 1)) {\r\n\t\treturn false;\r\n\t} else if (lineDoc < LinesInDoc()) {\r\n\t\tEnsureData();\r\n\t\tif (GetHeight(lineDoc) != height) {\r\n\t\t\tif (GetVisible(lineDoc)) {\r\n\t\t\t\tdisplayLines->InsertText(line_cast(lineDoc), height - GetHeight(lineDoc));\r\n\t\t\t}\r\n\t\t\theights->SetValueAt(line_cast(lineDoc), height);\r\n\t\t\tCheck();\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\tCheck();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n}\r\n\r\ntemplate <typename LINE>\r\nvoid ContractionState<LINE>::ShowAll() noexcept {\r\n\tconst LINE lines = line_cast(LinesInDoc());\r\n\tClear();\r\n\tlinesInDocument = lines;\r\n}\r\n\r\n// Debugging checks\r\n\r\ntemplate <typename LINE>\r\nvoid ContractionState<LINE>::Check() const noexcept {\r\n#ifdef CHECK_CORRECTNESS\r\n\tfor (Sci::Line vline = 0; vline < LinesDisplayed(); vline++) {\r\n\t\tconst Sci::Line lineDoc = DocFromDisplay(vline);\r\n\t\tPLATFORM_ASSERT(GetVisible(lineDoc));\r\n\t}\r\n\tfor (Sci::Line lineDoc = 0; lineDoc < LinesInDoc(); lineDoc++) {\r\n\t\tconst Sci::Line displayThis = DisplayFromDoc(lineDoc);\r\n\t\tconst Sci::Line displayNext = DisplayFromDoc(lineDoc + 1);\r\n\t\tconst Sci::Line height = displayNext - displayThis;\r\n\t\tPLATFORM_ASSERT(height >= 0);\r\n\t\tif (GetVisible(lineDoc)) {\r\n\t\t\tPLATFORM_ASSERT(GetHeight(lineDoc) == height);\r\n\t\t} else {\r\n\t\t\tPLATFORM_ASSERT(0 == height);\r\n\t\t}\r\n\t}\r\n#endif\r\n}\r\n\r\n}\r\n\r\nnamespace Scintilla::Internal {\r\n\r\nstd::unique_ptr<IContractionState> ContractionStateCreate(bool largeDocument) {\r\n\tif (largeDocument)\r\n\t\treturn std::make_unique<ContractionState<Sci::Line>>();\r\n\telse\r\n\t\treturn std::make_unique<ContractionState<int>>();\r\n}\r\n\r\n}\r\n"
  },
  {
    "path": "scintilla/src/ContractionState.h",
    "content": "// Scintilla source code edit control\r\n/** @file ContractionState.h\r\n ** Manages visibility of lines for folding and wrapping.\r\n **/\r\n// Copyright 1998-2007 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef CONTRACTIONSTATE_H\r\n#define CONTRACTIONSTATE_H\r\n\r\nnamespace Scintilla::Internal {\r\n\r\n/**\r\n*/\r\nclass IContractionState {\r\npublic:\r\n\tvirtual ~IContractionState() {};\r\n\r\n\tvirtual void Clear()=0;\r\n\r\n\tvirtual Sci::Line LinesInDoc() const noexcept=0;\r\n\tvirtual Sci::Line LinesDisplayed() const noexcept=0;\r\n\tvirtual Sci::Line DisplayFromDoc(Sci::Line lineDoc) const noexcept=0;\r\n\tvirtual Sci::Line DisplayLastFromDoc(Sci::Line lineDoc) const noexcept=0;\r\n\tvirtual Sci::Line DocFromDisplay(Sci::Line lineDisplay) const noexcept=0;\r\n\r\n\tvirtual void InsertLines(Sci::Line lineDoc, Sci::Line lineCount)=0;\r\n\tvirtual void DeleteLines(Sci::Line lineDoc, Sci::Line lineCount)=0;\r\n\r\n\tvirtual bool GetVisible(Sci::Line lineDoc) const noexcept=0;\r\n\tvirtual bool SetVisible(Sci::Line lineDocStart, Sci::Line lineDocEnd, bool isVisible)=0;\r\n\tvirtual bool HiddenLines() const noexcept=0;\r\n\r\n\tvirtual const char *GetFoldDisplayText(Sci::Line lineDoc) const noexcept=0;\r\n\tvirtual bool SetFoldDisplayText(Sci::Line lineDoc, const char *text)=0;\r\n\r\n\tvirtual bool GetExpanded(Sci::Line lineDoc) const noexcept=0;\r\n\tvirtual bool SetExpanded(Sci::Line lineDoc, bool isExpanded)=0;\r\n\tvirtual bool ExpandAll()=0;\r\n\tvirtual Sci::Line ContractedNext(Sci::Line lineDocStart) const noexcept =0;\r\n\r\n\tvirtual int GetHeight(Sci::Line lineDoc) const noexcept=0;\r\n\tvirtual bool SetHeight(Sci::Line lineDoc, int height)=0;\r\n\r\n\tvirtual void ShowAll() noexcept=0;\r\n};\r\n\r\nstd::unique_ptr<IContractionState> ContractionStateCreate(bool largeDocument);\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/src/DBCS.cxx",
    "content": "// Scintilla source code edit control\r\n/** @file DBCS.cxx\r\n ** Functions to handle DBCS double byte encodings like Shift-JIS.\r\n **/\r\n// Copyright 2017 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#include <cstdint>\r\n#include \"DBCS.h\"\r\n\r\nusing namespace Scintilla::Internal;\r\n\r\nnamespace Scintilla::Internal {\r\n\r\nbool DBCSIsLeadByte(int codePage, char ch) noexcept {\r\n\t// Byte ranges found in Wikipedia articles with relevant search strings in each case\r\n\tconst unsigned char uch = ch;\r\n\tswitch (codePage) {\r\n\tcase 932:\r\n\t\t// Shift_jis\r\n\t\treturn ((uch >= 0x81) && (uch <= 0x9F)) ||\r\n\t\t\t((uch >= 0xE0) && (uch <= 0xFC));\r\n\t\t// Lead bytes F0 to FC may be a Microsoft addition.\r\n\tcase 936:\r\n\t\t// GBK\r\n\t\treturn (uch >= 0x81) && (uch <= 0xFE);\r\n\tcase 949:\r\n\t\t// Korean Wansung KS C-5601-1987\r\n\t\treturn (uch >= 0x81) && (uch <= 0xFE);\r\n\tcase 950:\r\n\t\t// Big5\r\n\t\treturn (uch >= 0x81) && (uch <= 0xFE);\r\n\tcase 1361:\r\n\t\t// Korean Johab KS C-5601-1992\r\n\t\treturn\r\n\t\t\t((uch >= 0x84) && (uch <= 0xD3)) ||\r\n\t\t\t((uch >= 0xD8) && (uch <= 0xDE)) ||\r\n\t\t\t((uch >= 0xE0) && (uch <= 0xF9));\r\n\t}\r\n\treturn false;\r\n}\r\n\r\nbool IsDBCSValidSingleByte(int codePage, int ch) noexcept {\r\n\tswitch (codePage) {\r\n\tcase 932:\r\n\t\treturn ch == 0x80\r\n\t\t\t|| (ch >= 0xA0 && ch <= 0xDF)\r\n\t\t\t|| (ch >= 0xFD);\r\n\r\n\tdefault:\r\n\t\treturn false;\r\n\t}\r\n}\r\n\r\n}\r\n"
  },
  {
    "path": "scintilla/src/DBCS.h",
    "content": "// Scintilla source code edit control\r\n/** @file DBCS.h\r\n ** Functions to handle DBCS double byte encodings like Shift-JIS.\r\n **/\r\n// Copyright 2017 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef DBCS_H\r\n#define DBCS_H\r\n\r\nnamespace Scintilla::Internal {\r\n\r\nconstexpr bool IsDBCSCodePage(int codePage) noexcept {\r\n\treturn codePage == 932\r\n\t       || codePage == 936\r\n\t       || codePage == 949\r\n\t       || codePage == 950\r\n\t       || codePage == 1361;\r\n}\r\n\r\nbool DBCSIsLeadByte(int codePage, char ch) noexcept;\r\nbool IsDBCSValidSingleByte(int codePage, int ch) noexcept;\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/src/Debugging.h",
    "content": "// Scintilla source code edit control\r\n/** @file Debugging.h\r\n ** Assert and debug trace functions.\r\n ** Implemented in each platform layer.\r\n **/\r\n// Copyright 1998-2009 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef DEBUGGING_H\r\n#define DEBUGGING_H\r\n\r\nnamespace Scintilla::Internal {\r\n\r\n#if defined(__clang__)\r\n# if __has_feature(attribute_analyzer_noreturn)\r\n#  define CLANG_ANALYZER_NORETURN __attribute__((analyzer_noreturn))\r\n# else\r\n#  define CLANG_ANALYZER_NORETURN\r\n# endif\r\n#else\r\n# define CLANG_ANALYZER_NORETURN\r\n#endif\r\n\r\n/**\r\n * Platform namespace used to segregate debugging functions.\r\n */\r\nnamespace Platform {\r\n\r\nvoid DebugDisplay(const char *s) noexcept;\r\nvoid DebugPrintf(const char *format, ...) noexcept;\r\nbool ShowAssertionPopUps(bool assertionPopUps_) noexcept;\r\nvoid Assert(const char *c, const char *file, int line) noexcept CLANG_ANALYZER_NORETURN;\r\n\r\n}\r\n\r\n#ifdef  NDEBUG\r\n#define PLATFORM_ASSERT(c) ((void)0)\r\n#else\r\n#define PLATFORM_ASSERT(c) ((c) ? (void)(0) : Scintilla::Internal::Platform::Assert(#c, __FILE__, __LINE__))\r\n#endif\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/src/Decoration.cxx",
    "content": "/** @file Decoration.cxx\r\n ** Visual elements added over text.\r\n **/\r\n// Copyright 1998-2007 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#include <cstddef>\r\n#include <cstdlib>\r\n#include <cstring>\r\n#include <cstdio>\r\n#include <cstdarg>\r\n#include <cstdint>\r\n\r\n#include <stdexcept>\r\n#include <string_view>\r\n#include <vector>\r\n#include <optional>\r\n#include <algorithm>\r\n#include <memory>\r\n\r\n#include \"ScintillaTypes.h\"\r\n\r\n#include \"Debugging.h\"\r\n\r\n#include \"Position.h\"\r\n#include \"SplitVector.h\"\r\n#include \"Partitioning.h\"\r\n#include \"RunStyles.h\"\r\n#include \"Decoration.h\"\r\n\r\nusing namespace Scintilla::Internal;\r\n\r\nnamespace {\r\n\r\ntemplate <typename POS>\r\nclass Decoration : public IDecoration {\r\n\tint indicator;\r\n\r\n\t// pos_cast(): cast Sci::Position to either 32-bit or 64-bit value\r\n\t// This avoids warnings from Visual C++ Code Analysis and shortens code\r\n\tstatic constexpr POS pos_cast(Sci::Position pos) noexcept {\r\n\t\treturn static_cast<POS>(pos);\r\n\t}\r\n\r\npublic:\r\n\tRunStyles<POS, int> rs;\r\n\r\n\texplicit Decoration(int indicator_) : indicator(indicator_) {\r\n\t}\r\n\r\n\tbool Empty() const noexcept override {\r\n\t\treturn (rs.Runs() == 1) && (rs.AllSameAs(0));\r\n\t}\r\n\tint Indicator() const noexcept override {\r\n\t\treturn indicator;\r\n\t}\r\n\tSci::Position Length() const noexcept override {\r\n\t\treturn rs.Length();\r\n\t}\r\n\tint ValueAt(Sci::Position position) const noexcept override {\r\n\t\treturn rs.ValueAt(pos_cast(position));\r\n\t}\r\n\tSci::Position StartRun(Sci::Position position) const noexcept override {\r\n\t\treturn rs.StartRun(pos_cast(position));\r\n\t}\r\n\tSci::Position EndRun(Sci::Position position) const noexcept override {\r\n\t\treturn rs.EndRun(pos_cast(position));\r\n\t}\r\n\tvoid SetValueAt(Sci::Position position, int value) override {\r\n\t\trs.SetValueAt(pos_cast(position), value);\r\n\t}\r\n\tvoid InsertSpace(Sci::Position position, Sci::Position insertLength) override {\r\n\t\trs.InsertSpace(pos_cast(position), pos_cast(insertLength));\r\n\t}\r\n\tSci::Position Runs() const noexcept override {\r\n\t\treturn rs.Runs();\r\n\t}\r\n};\r\n\r\ntemplate <typename POS>\r\nclass DecorationList : public IDecorationList {\r\n\tint currentIndicator;\r\n\tint currentValue;\r\n\tDecoration<POS> *current;\t// Non-owning. Cached so FillRange doesn't have to search for each call.\r\n\tSci::Position lengthDocument;\r\n\t// Ordered by indicator\r\n\tstd::vector<std::unique_ptr<Decoration<POS>>> decorationList;\r\n\tstd::vector<const IDecoration*> decorationView;\t// Read-only view of decorationList\r\n\tbool clickNotified;\r\n\r\n\tDecoration<POS> *DecorationFromIndicator(int indicator) noexcept;\r\n\tDecoration<POS> *Create(int indicator, Sci::Position length);\r\n\tvoid Delete(int indicator);\r\n\tvoid DeleteAnyEmpty();\r\n\tvoid SetView();\r\n\r\n\t// pos_cast(): cast Sci::Position to either 32-bit or 64-bit value\r\n\t// This avoids warnings from Visual C++ Code Analysis and shortens code\r\n\tstatic constexpr POS pos_cast(Sci::Position pos) noexcept {\r\n\t\treturn static_cast<POS>(pos);\r\n\t}\r\n\r\npublic:\r\n\r\n\tDecorationList();\r\n\r\n\tconst std::vector<const IDecoration*> &View() const noexcept override {\r\n\t\treturn decorationView;\r\n\t}\r\n\r\n\tvoid SetCurrentIndicator(int indicator) override;\r\n\tint GetCurrentIndicator() const noexcept override { return currentIndicator; }\r\n\r\n\tvoid SetCurrentValue(int value) noexcept override;\r\n\tint GetCurrentValue() const noexcept override { return currentValue; }\r\n\r\n\t// Returns changed=true if some values may have changed\r\n\tFillResult<Sci::Position> FillRange(Sci::Position position, int value, Sci::Position fillLength) override;\r\n\r\n\tvoid InsertSpace(Sci::Position position, Sci::Position insertLength) override;\r\n\tvoid DeleteRange(Sci::Position position, Sci::Position deleteLength) override;\r\n\r\n\tvoid DeleteLexerDecorations() override;\r\n\r\n\tint AllOnFor(Sci::Position position) const noexcept override;\r\n\tint ValueAt(int indicator, Sci::Position position) noexcept override;\r\n\tSci::Position Start(int indicator, Sci::Position position) noexcept override;\r\n\tSci::Position End(int indicator, Sci::Position position) noexcept override;\r\n\r\n\tbool ClickNotified() const noexcept override {\r\n\t\treturn clickNotified;\r\n\t}\r\n\tvoid SetClickNotified(bool notified) noexcept override {\r\n\t\tclickNotified = notified;\r\n\t}\r\n};\r\n\r\ntemplate <typename POS>\r\nDecorationList<POS>::DecorationList() : currentIndicator(0), currentValue(1), current(nullptr),\r\n\tlengthDocument(0), clickNotified(false) {\r\n}\r\n\r\ntemplate <typename POS>\r\nDecoration<POS> *DecorationList<POS>::DecorationFromIndicator(int indicator) noexcept {\r\n\tfor (const std::unique_ptr<Decoration<POS>> &deco : decorationList) {\r\n\t\tif (deco->Indicator() == indicator) {\r\n\t\t\treturn deco.get();\r\n\t\t}\r\n\t}\r\n\treturn nullptr;\r\n}\r\n\r\ntemplate <typename POS>\r\nDecoration<POS> *DecorationList<POS>::Create(int indicator, Sci::Position length) {\r\n\tcurrentIndicator = indicator;\r\n\tstd::unique_ptr<Decoration<POS>> decoNew = std::make_unique<Decoration<POS>>(indicator);\r\n\tdecoNew->rs.InsertSpace(0, pos_cast(length));\r\n\r\n\ttypename std::vector<std::unique_ptr<Decoration<POS>>>::iterator it = std::lower_bound(\r\n\t\tdecorationList.begin(), decorationList.end(), decoNew,\r\n\t\t[](const std::unique_ptr<Decoration<POS>> &a, const std::unique_ptr<Decoration<POS>> &b) noexcept {\r\n\t\treturn a->Indicator() < b->Indicator();\r\n\t});\r\n\ttypename std::vector<std::unique_ptr<Decoration<POS>>>::iterator itAdded =\r\n\t\tdecorationList.insert(it, std::move(decoNew));\r\n\r\n\tSetView();\r\n\r\n\treturn itAdded->get();\r\n}\r\n\r\ntemplate <typename POS>\r\nvoid DecorationList<POS>::Delete(int indicator) {\r\n\tdecorationList.erase(std::remove_if(decorationList.begin(), decorationList.end(),\r\n\t\t[indicator](const std::unique_ptr<Decoration<POS>> &deco) noexcept {\r\n\t\treturn deco->Indicator() == indicator;\r\n\t}), decorationList.end());\r\n\tcurrent = nullptr;\r\n\tSetView();\r\n}\r\n\r\ntemplate <typename POS>\r\nvoid DecorationList<POS>::SetCurrentIndicator(int indicator) {\r\n\tcurrentIndicator = indicator;\r\n\tcurrent = DecorationFromIndicator(indicator);\r\n\tcurrentValue = 1;\r\n}\r\n\r\ntemplate <typename POS>\r\nvoid DecorationList<POS>::SetCurrentValue(int value) noexcept {\r\n\tcurrentValue = value ? value : 1;\r\n}\r\n\r\ntemplate <typename POS>\r\nFillResult<Sci::Position> DecorationList<POS>::FillRange(Sci::Position position, int value, Sci::Position fillLength) {\r\n\tif (!current) {\r\n\t\tcurrent = DecorationFromIndicator(currentIndicator);\r\n\t\tif (!current) {\r\n\t\t\tcurrent = Create(currentIndicator, lengthDocument);\r\n\t\t}\r\n\t}\r\n\t// Converting result from POS to Sci::Position as callers not polymorphic.\r\n\tconst FillResult<POS> frInPOS = current->rs.FillRange(pos_cast(position), value, pos_cast(fillLength));\r\n\tconst FillResult<Sci::Position> fr { frInPOS.changed, frInPOS.position, frInPOS.fillLength };\r\n\tif (current->Empty()) {\r\n\t\tDelete(currentIndicator);\r\n\t}\r\n\treturn fr;\r\n}\r\n\r\ntemplate <typename POS>\r\nvoid DecorationList<POS>::InsertSpace(Sci::Position position, Sci::Position insertLength) {\r\n\tconst bool atEnd = position == lengthDocument;\r\n\tlengthDocument += insertLength;\r\n\tfor (const std::unique_ptr<Decoration<POS>> &deco : decorationList) {\r\n\t\tdeco->rs.InsertSpace(pos_cast(position), pos_cast(insertLength));\r\n\t\tif (atEnd) {\r\n\t\t\tdeco->rs.FillRange(pos_cast(position), 0, pos_cast(insertLength));\r\n\t\t}\r\n\t}\r\n}\r\n\r\ntemplate <typename POS>\r\nvoid DecorationList<POS>::DeleteRange(Sci::Position position, Sci::Position deleteLength) {\r\n\tlengthDocument -= deleteLength;\r\n\tfor (const std::unique_ptr<Decoration<POS>> &deco : decorationList) {\r\n\t\tdeco->rs.DeleteRange(pos_cast(position), pos_cast(deleteLength));\r\n\t}\r\n\tDeleteAnyEmpty();\r\n\tif (decorationList.size() != decorationView.size()) {\r\n\t\t// One or more empty decorations deleted so update view.\r\n\t\tcurrent = nullptr;\r\n\t\tSetView();\r\n\t}\r\n}\r\n\r\ntemplate <typename POS>\r\nvoid DecorationList<POS>::DeleteLexerDecorations() {\r\n\tdecorationList.erase(std::remove_if(decorationList.begin(), decorationList.end(),\r\n\t\t[](const std::unique_ptr<Decoration<POS>> &deco) noexcept {\r\n\t\treturn deco->Indicator() < static_cast<int>(Scintilla::IndicatorNumbers::Container);\r\n\t}), decorationList.end());\r\n\tcurrent = nullptr;\r\n\tSetView();\r\n}\r\n\r\ntemplate <typename POS>\r\nvoid DecorationList<POS>::DeleteAnyEmpty() {\r\n\tif (lengthDocument == 0) {\r\n\t\tdecorationList.clear();\r\n\t} else {\r\n\t\tdecorationList.erase(std::remove_if(decorationList.begin(), decorationList.end(),\r\n\t\t\t[](const std::unique_ptr<Decoration<POS>> &deco) noexcept {\r\n\t\t\treturn deco->Empty();\r\n\t\t}), decorationList.end());\r\n\t}\r\n}\r\n\r\ntemplate <typename POS>\r\nvoid DecorationList<POS>::SetView() {\r\n\tdecorationView.clear();\r\n\tfor (const std::unique_ptr<Decoration<POS>> &deco : decorationList) {\r\n\t\tdecorationView.push_back(deco.get());\r\n\t}\r\n}\r\n\r\ntemplate <typename POS>\r\nint DecorationList<POS>::AllOnFor(Sci::Position position) const noexcept {\r\n\tint mask = 0;\r\n\tfor (const std::unique_ptr<Decoration<POS>> &deco : decorationList) {\r\n\t\tif (deco->rs.ValueAt(pos_cast(position))) {\r\n\t\t\tif (deco->Indicator() < static_cast<int>(Scintilla::IndicatorNumbers::Ime)) {\r\n\t\t\t\tmask |= 1u << deco->Indicator();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn mask;\r\n}\r\n\r\ntemplate <typename POS>\r\nint DecorationList<POS>::ValueAt(int indicator, Sci::Position position) noexcept {\r\n\tconst Decoration<POS> *deco = DecorationFromIndicator(indicator);\r\n\tif (deco) {\r\n\t\treturn deco->rs.ValueAt(pos_cast(position));\r\n\t}\r\n\treturn 0;\r\n}\r\n\r\ntemplate <typename POS>\r\nSci::Position DecorationList<POS>::Start(int indicator, Sci::Position position) noexcept {\r\n\tconst Decoration<POS> *deco = DecorationFromIndicator(indicator);\r\n\tif (deco) {\r\n\t\treturn deco->rs.StartRun(pos_cast(position));\r\n\t}\r\n\treturn 0;\r\n}\r\n\r\ntemplate <typename POS>\r\nSci::Position DecorationList<POS>::End(int indicator, Sci::Position position) noexcept {\r\n\tconst Decoration<POS> *deco = DecorationFromIndicator(indicator);\r\n\tif (deco) {\r\n\t\treturn deco->rs.EndRun(pos_cast(position));\r\n\t}\r\n\treturn 0;\r\n}\r\n\r\n}\r\n\r\nnamespace Scintilla::Internal {\r\n\r\nstd::unique_ptr<IDecoration> DecorationCreate(bool largeDocument, int indicator) {\r\n\tif (largeDocument)\r\n\t\treturn std::make_unique<Decoration<Sci::Position>>(indicator);\r\n\telse\r\n\t\treturn std::make_unique<Decoration<int>>(indicator);\r\n}\r\n\r\nstd::unique_ptr<IDecorationList> DecorationListCreate(bool largeDocument) {\r\n\tif (largeDocument)\r\n\t\treturn std::make_unique<DecorationList<Sci::Position>>();\r\n\telse\r\n\t\treturn std::make_unique<DecorationList<int>>();\r\n}\r\n\r\n}\r\n\r\n"
  },
  {
    "path": "scintilla/src/Decoration.h",
    "content": "/** @file Decoration.h\r\n ** Visual elements added over text.\r\n **/\r\n// Copyright 1998-2007 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef DECORATION_H\r\n#define DECORATION_H\r\n\r\nnamespace Scintilla::Internal {\r\n\r\nclass IDecoration {\r\npublic:\r\n\tvirtual ~IDecoration() {}\r\n\tvirtual bool Empty() const noexcept = 0;\r\n\tvirtual int Indicator() const noexcept = 0;\r\n\tvirtual Sci::Position Length() const noexcept = 0;\r\n\tvirtual int ValueAt(Sci::Position position) const noexcept = 0;\r\n\tvirtual Sci::Position StartRun(Sci::Position position) const noexcept = 0;\r\n\tvirtual Sci::Position EndRun(Sci::Position position) const noexcept = 0;\r\n\tvirtual void SetValueAt(Sci::Position position, int value) = 0;\r\n\tvirtual void InsertSpace(Sci::Position position, Sci::Position insertLength) = 0;\r\n\tvirtual Sci::Position Runs() const noexcept = 0;\r\n};\r\n\r\nclass IDecorationList {\r\npublic:\r\n\tvirtual ~IDecorationList() {}\r\n\r\n\tvirtual const std::vector<const IDecoration*> &View() const noexcept = 0;\r\n\r\n\tvirtual void SetCurrentIndicator(int indicator) = 0;\r\n\tvirtual int GetCurrentIndicator() const noexcept = 0;\r\n\r\n\tvirtual void SetCurrentValue(int value) noexcept = 0;\r\n\tvirtual int GetCurrentValue() const noexcept = 0;\r\n\r\n\t// Returns with changed=true if some values may have changed\r\n\tvirtual FillResult<Sci::Position> FillRange(Sci::Position position, int value, Sci::Position fillLength) = 0;\r\n\tvirtual void InsertSpace(Sci::Position position, Sci::Position insertLength) = 0;\r\n\tvirtual void DeleteRange(Sci::Position position, Sci::Position deleteLength) = 0;\r\n\tvirtual void DeleteLexerDecorations() = 0;\r\n\r\n\tvirtual int AllOnFor(Sci::Position position) const noexcept = 0;\r\n\tvirtual int ValueAt(int indicator, Sci::Position position) noexcept = 0;\r\n\tvirtual Sci::Position Start(int indicator, Sci::Position position) noexcept = 0;\r\n\tvirtual Sci::Position End(int indicator, Sci::Position position) noexcept = 0;\r\n\r\n\tvirtual bool ClickNotified() const noexcept = 0;\r\n\tvirtual void SetClickNotified(bool notified) noexcept = 0;\r\n};\r\n\r\nstd::unique_ptr<IDecoration> DecorationCreate(bool largeDocument, int indicator);\r\n\r\nstd::unique_ptr<IDecorationList> DecorationListCreate(bool largeDocument);\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/src/Document.cxx",
    "content": "// Scintilla source code edit control\r\n/** @file Document.cxx\r\n ** Text document that handles notifications, DBCS, styling, words and end of line.\r\n **/\r\n// Copyright 1998-2011 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#include <cstddef>\r\n#include <cstdlib>\r\n#include <cassert>\r\n#include <cstring>\r\n#include <cstdio>\r\n#include <cmath>\r\n#include <cstdint>\r\n\r\n#include <stdexcept>\r\n#include <string>\r\n#include <string_view>\r\n#include <vector>\r\n#include <array>\r\n#include <forward_list>\r\n#include <optional>\r\n#include <algorithm>\r\n#include <memory>\r\n#include <chrono>\r\n\r\n#ifndef NO_CXX11_REGEX\r\n#include <regex>\r\n#endif\r\n\r\n#include \"ScintillaTypes.h\"\r\n#include \"ILoader.h\"\r\n#include \"ILexer.h\"\r\n\r\n#include \"Debugging.h\"\r\n\r\n#include \"CharacterType.h\"\r\n#include \"CharacterCategoryMap.h\"\r\n#include \"Position.h\"\r\n#include \"SplitVector.h\"\r\n#include \"Partitioning.h\"\r\n#include \"RunStyles.h\"\r\n#include \"CellBuffer.h\"\r\n#include \"PerLine.h\"\r\n#include \"CharClassify.h\"\r\n#include \"Decoration.h\"\r\n#include \"CaseFolder.h\"\r\n#include \"Document.h\"\r\n#include \"RESearch.h\"\r\n#include \"UniConversion.h\"\r\n#include \"ElapsedPeriod.h\"\r\n\r\nusing namespace Scintilla;\r\nusing namespace Scintilla::Internal;\r\n\r\nLexInterface::LexInterface(Document *pdoc_) noexcept : pdoc(pdoc_), performingStyle(false) {\r\n}\r\n\r\nLexInterface::~LexInterface() noexcept = default;\r\n\r\nvoid LexInterface::SetInstance(ILexer5 *instance_) noexcept {\r\n\tinstance.reset(instance_);\r\n}\r\n\r\nvoid LexInterface::Colourise(Sci::Position start, Sci::Position end) {\r\n\tif (pdoc && instance && !performingStyle) {\r\n\t\t// Protect against reentrance, which may occur, for example, when\r\n\t\t// fold points are discovered while performing styling and the folding\r\n\t\t// code looks for child lines which may trigger styling.\r\n\t\tperformingStyle = true;\r\n\r\n\t\tconst Sci::Position lengthDoc = pdoc->Length();\r\n\t\tif (end == -1)\r\n\t\t\tend = lengthDoc;\r\n\t\tconst Sci::Position len = end - start;\r\n\r\n\t\tPLATFORM_ASSERT(len >= 0);\r\n\t\tPLATFORM_ASSERT(start + len <= lengthDoc);\r\n\r\n\t\tint styleStart = 0;\r\n\t\tif (start > 0)\r\n\t\t\tstyleStart = pdoc->StyleAt(start - 1);\r\n\r\n\t\tif (len > 0) {\r\n\t\t\tinstance->Lex(start, len, styleStart, pdoc);\r\n\t\t\tinstance->Fold(start, len, styleStart, pdoc);\r\n\t\t}\r\n\r\n\t\tperformingStyle = false;\r\n\t}\r\n}\r\n\r\nLineEndType LexInterface::LineEndTypesSupported() {\r\n\tif (instance) {\r\n\t\treturn static_cast<LineEndType>(instance->LineEndTypesSupported());\r\n\t}\r\n\treturn LineEndType::Default;\r\n}\r\n\r\nbool LexInterface::UseContainerLexing() const noexcept {\r\n\treturn !instance;\r\n}\r\n\r\nActionDuration::ActionDuration(double duration_, double minDuration_, double maxDuration_) noexcept :\r\n\tduration(duration_), minDuration(minDuration_), maxDuration(maxDuration_) {\r\n}\r\n\r\nvoid ActionDuration::AddSample(size_t numberActions, double durationOfActions) noexcept {\r\n\t// Only adjust for multiple actions to avoid instability\r\n\tif (numberActions < 8)\r\n\t\treturn;\r\n\r\n\t// Alpha value for exponential smoothing.\r\n\t// Most recent value contributes 25% to smoothed value.\r\n\tconstexpr double alpha = 0.25;\r\n\r\n\tconst double durationOne = durationOfActions / numberActions;\r\n\tduration = std::clamp(alpha * durationOne + (1.0 - alpha) * duration,\r\n\t\tminDuration, maxDuration);\r\n}\r\n\r\ndouble ActionDuration::Duration() const noexcept {\r\n\treturn duration;\r\n}\r\n\r\nsize_t ActionDuration::ActionsInAllowedTime(double secondsAllowed) const noexcept {\r\n\treturn std::lround(secondsAllowed / Duration());\r\n}\r\n\r\nCharacterExtracted::CharacterExtracted(const unsigned char *charBytes, size_t widthCharBytes) noexcept {\r\n\tconst int utf8status = UTF8Classify(charBytes, widthCharBytes);\r\n\tif (utf8status & UTF8MaskInvalid) {\r\n\t\t// Treat as invalid and use up just one byte\r\n\t\tcharacter = unicodeReplacementChar;\r\n\t\twidthBytes = 1;\r\n\t} else {\r\n\t\tcharacter = UnicodeFromUTF8(charBytes);\r\n\t\twidthBytes = utf8status & UTF8MaskWidth;\r\n\t}\r\n}\r\n\r\nDocument::Document(DocumentOption options) :\r\n\tcb(!FlagSet(options, DocumentOption::StylesNone), FlagSet(options, DocumentOption::TextLarge)),\r\n\tdurationStyleOneByte(0.000001, 0.0000001, 0.00001) {\r\n\trefCount = 0;\r\n#ifdef _WIN32\r\n\teolMode = EndOfLine::CrLf;\r\n#else\r\n\teolMode = EndOfLine::Lf;\r\n#endif\r\n\tdbcsCodePage = CpUtf8;\r\n\tlineEndBitSet = LineEndType::Default;\r\n\tendStyled = 0;\r\n\tstyleClock = 0;\r\n\tenteredModification = 0;\r\n\tenteredStyling = 0;\r\n\tenteredReadOnlyCount = 0;\r\n\tinsertionSet = false;\r\n\ttabInChars = 8;\r\n\tindentInChars = 0;\r\n\tactualIndentInChars = 8;\r\n\tuseTabs = true;\r\n\ttabIndents = true;\r\n\tbackspaceUnindents = false;\r\n\r\n\tmatchesValid = false;\r\n\r\n\tperLineData[ldMarkers] = std::make_unique<LineMarkers>();\r\n\tperLineData[ldLevels] = std::make_unique<LineLevels>();\r\n\tperLineData[ldState] = std::make_unique<LineState>();\r\n\tperLineData[ldMargin] = std::make_unique<LineAnnotation>();\r\n\tperLineData[ldAnnotation] = std::make_unique<LineAnnotation>();\r\n\tperLineData[ldEOLAnnotation] = std::make_unique<LineAnnotation>();\r\n\r\n\tdecorations = DecorationListCreate(IsLarge());\r\n\r\n\tcb.SetPerLine(this);\r\n\tcb.SetUTF8Substance(CpUtf8 == dbcsCodePage);\r\n}\r\n\r\nDocument::~Document() {\r\n\tfor (const WatcherWithUserData &watcher : watchers) {\r\n\t\twatcher.watcher->NotifyDeleted(this, watcher.userData);\r\n\t}\r\n}\r\n\r\n// Increase reference count and return its previous value.\r\nint SCI_METHOD Document::AddRef() noexcept {\r\n\treturn refCount++;\r\n}\r\n\r\n// Decrease reference count and return its previous value.\r\n// Delete the document if reference count reaches zero.\r\nint SCI_METHOD Document::Release() {\r\n\tconst int curRefCount = --refCount;\r\n\tif (curRefCount == 0)\r\n\t\tdelete this;\r\n\treturn curRefCount;\r\n}\r\n\r\nvoid Document::Init() {\r\n\tfor (const std::unique_ptr<PerLine> &pl : perLineData) {\r\n\t\tif (pl)\r\n\t\t\tpl->Init();\r\n\t}\r\n}\r\n\r\nvoid Document::InsertLine(Sci::Line line) {\r\n\tfor (const std::unique_ptr<PerLine> &pl : perLineData) {\r\n\t\tif (pl)\r\n\t\t\tpl->InsertLine(line);\r\n\t}\r\n}\r\n\r\nvoid Document::InsertLines(Sci::Line line, Sci::Line lines) {\r\n\tfor (const auto &pl : perLineData) {\r\n\t\tif (pl)\r\n\t\t\tpl->InsertLines(line, lines);\r\n\t}\r\n}\r\n\r\nvoid Document::RemoveLine(Sci::Line line) {\r\n\tfor (const std::unique_ptr<PerLine> &pl : perLineData) {\r\n\t\tif (pl)\r\n\t\t\tpl->RemoveLine(line);\r\n\t}\r\n}\r\n\r\nLineMarkers *Document::Markers() const noexcept {\r\n\treturn static_cast<LineMarkers *>(perLineData[ldMarkers].get());\r\n}\r\n\r\nLineLevels *Document::Levels() const noexcept {\r\n\treturn static_cast<LineLevels *>(perLineData[ldLevels].get());\r\n}\r\n\r\nLineState *Document::States() const noexcept {\r\n\treturn static_cast<LineState *>(perLineData[ldState].get());\r\n}\r\n\r\nLineAnnotation *Document::Margins() const noexcept {\r\n\treturn static_cast<LineAnnotation *>(perLineData[ldMargin].get());\r\n}\r\n\r\nLineAnnotation *Document::Annotations() const noexcept {\r\n\treturn static_cast<LineAnnotation *>(perLineData[ldAnnotation].get());\r\n}\r\n\r\nLineAnnotation *Document::EOLAnnotations() const noexcept {\r\n\treturn static_cast<LineAnnotation *>(perLineData[ldEOLAnnotation].get());\r\n}\r\n\r\nLineEndType Document::LineEndTypesSupported() const {\r\n\tif ((CpUtf8 == dbcsCodePage) && pli)\r\n\t\treturn pli->LineEndTypesSupported();\r\n\telse\r\n\t\treturn LineEndType::Default;\r\n}\r\n\r\nbool Document::SetDBCSCodePage(int dbcsCodePage_) {\r\n\tif (dbcsCodePage != dbcsCodePage_) {\r\n\t\tdbcsCodePage = dbcsCodePage_;\r\n\t\tSetCaseFolder(nullptr);\r\n\t\tcb.SetLineEndTypes(lineEndBitSet & LineEndTypesSupported());\r\n\t\tcb.SetUTF8Substance(CpUtf8 == dbcsCodePage);\r\n\t\tModifiedAt(0);\t// Need to restyle whole document\r\n\t\treturn true;\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n}\r\n\r\nbool Document::SetLineEndTypesAllowed(LineEndType lineEndBitSet_) {\r\n\tif (lineEndBitSet != lineEndBitSet_) {\r\n\t\tlineEndBitSet = lineEndBitSet_;\r\n\t\tconst LineEndType lineEndBitSetActive = lineEndBitSet & LineEndTypesSupported();\r\n\t\tif (lineEndBitSetActive != cb.GetLineEndTypes()) {\r\n\t\t\tModifiedAt(0);\r\n\t\t\tcb.SetLineEndTypes(lineEndBitSetActive);\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n}\r\n\r\nvoid Document::SetSavePoint() {\r\n\tcb.SetSavePoint();\r\n\tNotifySavePoint(true);\r\n}\r\n\r\nvoid Document::TentativeUndo() {\r\n\tif (!TentativeActive())\r\n\t\treturn;\r\n\tCheckReadOnly();\r\n\tif (enteredModification == 0) {\r\n\t\tenteredModification++;\r\n\t\tif (!cb.IsReadOnly()) {\r\n\t\t\tconst bool startSavePoint = cb.IsSavePoint();\r\n\t\t\tbool multiLine = false;\r\n\t\t\tconst int steps = cb.TentativeSteps();\r\n\t\t\t//Platform::DebugPrintf(\"Steps=%d\\n\", steps);\r\n\t\t\tfor (int step = 0; step < steps; step++) {\r\n\t\t\t\tconst Sci::Line prevLinesTotal = LinesTotal();\r\n\t\t\t\tconst Action action = cb.GetUndoStep();\r\n\t\t\t\tif (action.at == ActionType::remove) {\r\n\t\t\t\t\tNotifyModified(DocModification(\r\n\t\t\t\t\t\t\t\t\tModificationFlags::BeforeInsert | ModificationFlags::Undo, action));\r\n\t\t\t\t} else if (action.at == ActionType::container) {\r\n\t\t\t\t\tDocModification dm(ModificationFlags::Container | ModificationFlags::Undo);\r\n\t\t\t\t\tdm.token = action.position;\r\n\t\t\t\t\tNotifyModified(dm);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tNotifyModified(DocModification(\r\n\t\t\t\t\t\t\t\t\tModificationFlags::BeforeDelete | ModificationFlags::Undo, action));\r\n\t\t\t\t}\r\n\t\t\t\tcb.PerformUndoStep();\r\n\t\t\t\tif (action.at != ActionType::container) {\r\n\t\t\t\t\tModifiedAt(action.position);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tModificationFlags modFlags = ModificationFlags::Undo;\r\n\t\t\t\t// With undo, an insertion action becomes a deletion notification\r\n\t\t\t\tif (action.at == ActionType::remove) {\r\n\t\t\t\t\tmodFlags |= ModificationFlags::InsertText;\r\n\t\t\t\t} else if (action.at == ActionType::insert) {\r\n\t\t\t\t\tmodFlags |= ModificationFlags::DeleteText;\r\n\t\t\t\t}\r\n\t\t\t\tif (steps > 1)\r\n\t\t\t\t\tmodFlags |= ModificationFlags::MultiStepUndoRedo;\r\n\t\t\t\tconst Sci::Line linesAdded = LinesTotal() - prevLinesTotal;\r\n\t\t\t\tif (linesAdded != 0)\r\n\t\t\t\t\tmultiLine = true;\r\n\t\t\t\tif (step == steps - 1) {\r\n\t\t\t\t\tmodFlags |= ModificationFlags::LastStepInUndoRedo;\r\n\t\t\t\t\tif (multiLine)\r\n\t\t\t\t\t\tmodFlags |= ModificationFlags::MultilineUndoRedo;\r\n\t\t\t\t}\r\n\t\t\t\tNotifyModified(DocModification(modFlags, action.position, action.lenData,\r\n\t\t\t\t\t\t\t\t\t\t\t   linesAdded, action.data));\r\n\t\t\t}\r\n\r\n\t\t\tconst bool endSavePoint = cb.IsSavePoint();\r\n\t\t\tif (startSavePoint != endSavePoint)\r\n\t\t\t\tNotifySavePoint(endSavePoint);\r\n\r\n\t\t\tcb.TentativeCommit();\r\n\t\t}\r\n\t\tenteredModification--;\r\n\t}\r\n}\r\n\r\nint Document::UndoActions() const noexcept {\r\n\treturn cb.UndoActions();\r\n}\r\n\r\nvoid Document::SetUndoSavePoint(int action) noexcept {\r\n\tcb.SetUndoSavePoint(action);\r\n}\r\n\r\nint Document::UndoSavePoint() const noexcept {\r\n\treturn cb.UndoSavePoint();\r\n}\r\n\r\nvoid Document::SetUndoDetach(int action) noexcept {\r\n\tcb.SetUndoDetach(action);\r\n}\r\n\r\nint Document::UndoDetach() const noexcept {\r\n\treturn cb.UndoDetach();\r\n}\r\n\r\nvoid Document::SetUndoTentative(int action) noexcept {\r\n\tcb.SetUndoTentative(action);\r\n}\r\n\r\nint Document::UndoTentative() const noexcept {\r\n\treturn cb.UndoTentative();\r\n}\r\n\r\nvoid Document::SetUndoCurrent(int action) {\r\n\tcb.SetUndoCurrent(action);\r\n}\r\n\r\nint Document::UndoCurrent() const noexcept {\r\n\treturn cb.UndoCurrent();\r\n}\r\n\r\nint Document::UndoActionType(int action) const noexcept {\r\n\treturn cb.UndoActionType(action);\r\n}\r\n\r\nSci::Position Document::UndoActionPosition(int action) const noexcept {\r\n\treturn cb.UndoActionPosition(action);\r\n}\r\n\r\nstd::string_view Document::UndoActionText(int action) const noexcept {\r\n\treturn cb.UndoActionText(action);\r\n}\r\n\r\nvoid Document::PushUndoActionType(int type, Sci::Position position) {\r\n\tcb.PushUndoActionType(type, position);\r\n}\r\n\r\nvoid Document::ChangeLastUndoActionText(size_t length, const char *text) {\r\n\tcb.ChangeLastUndoActionText(length, text);\r\n}\r\n\r\nint Document::GetMark(Sci::Line line, bool includeChangeHistory) const {\r\n\tint marksHistory = 0;\r\n\tif (includeChangeHistory && (line < LinesTotal())) {\r\n\t\tint marksEdition = 0;\r\n\r\n\t\tconst Sci::Position start = LineStart(line);\r\n\t\tconst Sci::Position lineNext = LineStart(line + 1);\r\n\t\tfor (Sci::Position position = start; position < lineNext;) {\r\n\t\t\tconst int edition = EditionAt(position);\r\n\t\t\tif (edition) {\r\n\t\t\t\tmarksEdition |= 1 << (edition-1);\r\n\t\t\t}\r\n\t\t\tposition = EditionEndRun(position);\r\n\t\t}\r\n\t\tconst Sci::Position lineEnd = LineEnd(line);\r\n\t\tfor (Sci::Position position = start; position <= lineEnd;) {\r\n\t\t\tmarksEdition |= EditionDeletesAt(position);\r\n\t\t\tposition = EditionNextDelete(position);\r\n\t\t}\r\n\r\n\t\t/* Bits: RevertedToOrigin, Saved, Modified, RevertedToModified */\r\n\t\tconstexpr unsigned int editionShift = static_cast<unsigned int>(MarkerOutline::HistoryRevertedToOrigin);\r\n\t\tmarksHistory = marksEdition << editionShift;\r\n\t}\r\n\r\n\treturn marksHistory | Markers()->MarkValue(line);\r\n}\r\n\r\nSci::Line Document::MarkerNext(Sci::Line lineStart, int mask) const noexcept {\r\n\treturn Markers()->MarkerNext(lineStart, mask);\r\n}\r\n\r\nint Document::AddMark(Sci::Line line, int markerNum) {\r\n\tif (line >= 0 && line < LinesTotal()) {\r\n\t\tconst int prev = Markers()->AddMark(line, markerNum, LinesTotal());\r\n\t\tconst DocModification mh(ModificationFlags::ChangeMarker, LineStart(line), 0, 0, nullptr, line);\r\n\t\tNotifyModified(mh);\r\n\t\treturn prev;\r\n\t} else {\r\n\t\treturn -1;\r\n\t}\r\n}\r\n\r\nvoid Document::AddMarkSet(Sci::Line line, int valueSet) {\r\n\tif (line < 0 || line >= LinesTotal()) {\r\n\t\treturn;\r\n\t}\r\n\tunsigned int m = valueSet;\r\n\tfor (int i = 0; m; i++, m >>= 1) {\r\n\t\tif (m & 1)\r\n\t\t\tMarkers()->AddMark(line, i, LinesTotal());\r\n\t}\r\n\tconst DocModification mh(ModificationFlags::ChangeMarker, LineStart(line), 0, 0, nullptr, line);\r\n\tNotifyModified(mh);\r\n}\r\n\r\nvoid Document::DeleteMark(Sci::Line line, int markerNum) {\r\n\tMarkers()->DeleteMark(line, markerNum, false);\r\n\tconst DocModification mh(ModificationFlags::ChangeMarker, LineStart(line), 0, 0, nullptr, line);\r\n\tNotifyModified(mh);\r\n}\r\n\r\nvoid Document::DeleteMarkFromHandle(int markerHandle) {\r\n\tMarkers()->DeleteMarkFromHandle(markerHandle);\r\n\tDocModification mh(ModificationFlags::ChangeMarker);\r\n\tmh.line = -1;\r\n\tNotifyModified(mh);\r\n}\r\n\r\nvoid Document::DeleteAllMarks(int markerNum) {\r\n\tbool someChanges = false;\r\n\tfor (Sci::Line line = 0; line < LinesTotal(); line++) {\r\n\t\tif (Markers()->DeleteMark(line, markerNum, true))\r\n\t\t\tsomeChanges = true;\r\n\t}\r\n\tif (someChanges) {\r\n\t\tDocModification mh(ModificationFlags::ChangeMarker);\r\n\t\tmh.line = -1;\r\n\t\tNotifyModified(mh);\r\n\t}\r\n}\r\n\r\nSci::Line Document::LineFromHandle(int markerHandle) const noexcept {\r\n\treturn Markers()->LineFromHandle(markerHandle);\r\n}\r\n\r\nint Document::MarkerNumberFromLine(Sci::Line line, int which) const noexcept {\r\n\treturn Markers()->NumberFromLine(line, which);\r\n}\r\n\r\nint Document::MarkerHandleFromLine(Sci::Line line, int which) const noexcept {\r\n\treturn Markers()->HandleFromLine(line, which);\r\n}\r\n\r\nSci_Position SCI_METHOD Document::LineStart(Sci_Position line) const {\r\n\treturn cb.LineStart(line);\r\n}\r\n\r\nRange Document::LineRange(Sci::Line line) const noexcept {\r\n\treturn {cb.LineStart(line), cb.LineStart(line + 1)};\r\n}\r\n\r\nbool Document::IsLineStartPosition(Sci::Position position) const noexcept {\r\n\treturn LineStartPosition(position) == position;\r\n}\r\n\r\nSci_Position SCI_METHOD Document::LineEnd(Sci_Position line) const {\r\n\treturn cb.LineEnd(line);\r\n}\r\n\r\nint SCI_METHOD Document::DEVersion() const noexcept {\r\n\treturn deRelease0;\r\n}\r\n\r\nvoid SCI_METHOD Document::SetErrorStatus(int status) {\r\n\t// Tell the watchers an error has occurred.\r\n\tfor (const WatcherWithUserData &watcher : watchers) {\r\n\t\twatcher.watcher->NotifyErrorOccurred(this, watcher.userData, static_cast<Status>(status));\r\n\t}\r\n}\r\n\r\nSci_Position SCI_METHOD Document::LineFromPosition(Sci_Position pos) const {\r\n\treturn cb.LineFromPosition(pos);\r\n}\r\n\r\nSci::Line Document::SciLineFromPosition(Sci::Position pos) const noexcept {\r\n\t// Avoids casting in callers for this very common function\r\n\treturn cb.LineFromPosition(pos);\r\n}\r\n\r\nSci::Position Document::LineStartPosition(Sci::Position position) const noexcept {\r\n\treturn cb.LineStart(cb.LineFromPosition(position));\r\n}\r\n\r\nSci::Position Document::LineEndPosition(Sci::Position position) const noexcept {\r\n\treturn cb.LineEnd(cb.LineFromPosition(position));\r\n}\r\n\r\nbool Document::IsLineEndPosition(Sci::Position position) const noexcept {\r\n\treturn LineEndPosition(position) == position;\r\n}\r\n\r\nbool Document::IsPositionInLineEnd(Sci::Position position) const noexcept {\r\n\treturn position >= LineEndPosition(position);\r\n}\r\n\r\nSci::Position Document::VCHomePosition(Sci::Position position) const {\r\n\tconst Sci::Line line = SciLineFromPosition(position);\r\n\tconst Sci::Position startPosition = LineStart(line);\r\n\tconst Sci::Position endLine = LineEnd(line);\r\n\tSci::Position startText = startPosition;\r\n\twhile (startText < endLine && IsSpaceOrTab(cb.CharAt(startText)))\r\n\t\tstartText++;\r\n\tif (position == startText)\r\n\t\treturn startPosition;\r\n\telse\r\n\t\treturn startText;\r\n}\r\n\r\nSci::Position Document::IndexLineStart(Sci::Line line, LineCharacterIndexType lineCharacterIndex) const noexcept {\r\n\treturn cb.IndexLineStart(line, lineCharacterIndex);\r\n}\r\n\r\nSci::Line Document::LineFromPositionIndex(Sci::Position pos, LineCharacterIndexType lineCharacterIndex) const noexcept {\r\n\treturn cb.LineFromPositionIndex(pos, lineCharacterIndex);\r\n}\r\n\r\nSci::Line Document::LineFromPositionAfter(Sci::Line line, Sci::Position length) const noexcept {\r\n\tconst Sci::Position posAfter = cb.LineStart(line) + length;\r\n\tif (posAfter >= LengthNoExcept()) {\r\n\t\treturn LinesTotal();\r\n\t}\r\n\tconst Sci::Line lineAfter = SciLineFromPosition(posAfter);\r\n\tif (lineAfter > line) {\r\n\t\treturn lineAfter;\r\n\t} else {\r\n\t\t// Want to make some progress so return next line\r\n\t\treturn lineAfter + 1;\r\n\t}\r\n}\r\n\r\nint SCI_METHOD Document::SetLevel(Sci_Position line, int level) {\r\n\tconst int prev = Levels()->SetLevel(line, level, LinesTotal());\r\n\tif (prev != level) {\r\n\t\tDocModification mh(ModificationFlags::ChangeFold | ModificationFlags::ChangeMarker,\r\n\t\t                   LineStart(line), 0, 0, nullptr, line);\r\n\t\tmh.foldLevelNow = static_cast<FoldLevel>(level);\r\n\t\tmh.foldLevelPrev = static_cast<FoldLevel>(prev);\r\n\t\tNotifyModified(mh);\r\n\t}\r\n\treturn prev;\r\n}\r\n\r\nint SCI_METHOD Document::GetLevel(Sci_Position line) const {\r\n\treturn Levels()->GetLevel(line);\r\n}\r\n\r\nFoldLevel Document::GetFoldLevel(Sci_Position line) const noexcept {\r\n\treturn Levels()->GetFoldLevel(line);\r\n}\r\n\r\nvoid Document::ClearLevels() {\r\n\tLevels()->ClearLevels();\r\n}\r\n\r\nstatic bool IsSubordinate(FoldLevel levelStart, FoldLevel levelTry) noexcept {\r\n\tif (LevelIsWhitespace(levelTry))\r\n\t\treturn true;\r\n\telse\r\n\t\treturn LevelNumber(levelStart) < LevelNumber(levelTry);\r\n}\r\n\r\nSci::Line Document::GetLastChild(Sci::Line lineParent, std::optional<FoldLevel> level, Sci::Line lastLine) {\r\n\tconst FoldLevel levelStart = LevelNumberPart(level ? *level : GetFoldLevel(lineParent));\r\n\tconst Sci::Line maxLine = LinesTotal();\r\n\tconst Sci::Line lookLastLine = (lastLine != -1) ? std::min(LinesTotal() - 1, lastLine) : -1;\r\n\tSci::Line lineMaxSubord = lineParent;\r\n\twhile (lineMaxSubord < maxLine - 1) {\r\n\t\tEnsureStyledTo(LineStart(lineMaxSubord + 2));\r\n\t\tif (!IsSubordinate(levelStart, GetFoldLevel(lineMaxSubord + 1)))\r\n\t\t\tbreak;\r\n\t\tif ((lookLastLine != -1) && (lineMaxSubord >= lookLastLine) && !LevelIsWhitespace(GetFoldLevel(lineMaxSubord)))\r\n\t\t\tbreak;\r\n\t\tlineMaxSubord++;\r\n\t}\r\n\tif (lineMaxSubord > lineParent) {\r\n\t\tif (levelStart > LevelNumberPart(GetFoldLevel(lineMaxSubord + 1))) {\r\n\t\t\t// Have chewed up some whitespace that belongs to a parent so seek back\r\n\t\t\tif (LevelIsWhitespace(GetFoldLevel(lineMaxSubord))) {\r\n\t\t\t\tlineMaxSubord--;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn lineMaxSubord;\r\n}\r\n\r\nSci::Line Document::GetFoldParent(Sci::Line line) const noexcept {\r\n\treturn Levels()->GetFoldParent(line);\r\n}\r\n\r\nvoid Document::GetHighlightDelimiters(HighlightDelimiter &highlightDelimiter, Sci::Line line, Sci::Line lastLine) {\r\n\tconst FoldLevel level = GetFoldLevel(line);\r\n\tconst Sci::Line lookLastLine = std::max(line, lastLine) + 1;\r\n\r\n\tSci::Line lookLine = line;\r\n\tFoldLevel lookLineLevel = level;\r\n\tFoldLevel lookLineLevelNum = LevelNumberPart(lookLineLevel);\r\n\twhile ((lookLine > 0) && (LevelIsWhitespace(lookLineLevel) ||\r\n\t\t(LevelIsHeader(lookLineLevel) && (lookLineLevelNum >= LevelNumberPart(GetFoldLevel(lookLine + 1)))))) {\r\n\t\tlookLineLevel = GetFoldLevel(--lookLine);\r\n\t\tlookLineLevelNum = LevelNumberPart(lookLineLevel);\r\n\t}\r\n\r\n\tSci::Line beginFoldBlock = LevelIsHeader(lookLineLevel) ? lookLine : GetFoldParent(lookLine);\r\n\tif (beginFoldBlock == -1) {\r\n\t\thighlightDelimiter.Clear();\r\n\t\treturn;\r\n\t}\r\n\r\n\tSci::Line endFoldBlock = GetLastChild(beginFoldBlock, {}, lookLastLine);\r\n\tSci::Line firstChangeableLineBefore = -1;\r\n\tif (endFoldBlock < line) {\r\n\t\tlookLine = beginFoldBlock - 1;\r\n\t\tlookLineLevel = GetFoldLevel(lookLine);\r\n\t\tlookLineLevelNum = LevelNumberPart(lookLineLevel);\r\n\t\twhile ((lookLine >= 0) && (lookLineLevelNum >= FoldLevel::Base)) {\r\n\t\t\tif (LevelIsHeader(lookLineLevel)) {\r\n\t\t\t\tif (GetLastChild(lookLine, {}, lookLastLine) == line) {\r\n\t\t\t\t\tbeginFoldBlock = lookLine;\r\n\t\t\t\t\tendFoldBlock = line;\r\n\t\t\t\t\tfirstChangeableLineBefore = line - 1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif ((lookLine > 0) && (lookLineLevelNum == FoldLevel::Base) && (LevelNumberPart(GetFoldLevel(lookLine - 1)) > lookLineLevelNum))\r\n\t\t\t\tbreak;\r\n\t\t\tlookLineLevel = GetFoldLevel(--lookLine);\r\n\t\t\tlookLineLevelNum = LevelNumberPart(lookLineLevel);\r\n\t\t}\r\n\t}\r\n\tif (firstChangeableLineBefore == -1) {\r\n\t\tfor (lookLine = line - 1, lookLineLevel = GetFoldLevel(lookLine), lookLineLevelNum = LevelNumberPart(lookLineLevel);\r\n\t\t\tlookLine >= beginFoldBlock;\r\n\t\t\tlookLineLevel = GetFoldLevel(--lookLine), lookLineLevelNum = LevelNumberPart(lookLineLevel)) {\r\n\t\t\tif (LevelIsWhitespace(lookLineLevel) || (lookLineLevelNum > LevelNumberPart(level))) {\r\n\t\t\t\tfirstChangeableLineBefore = lookLine;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (firstChangeableLineBefore == -1)\r\n\t\tfirstChangeableLineBefore = beginFoldBlock - 1;\r\n\r\n\tSci::Line firstChangeableLineAfter = -1;\r\n\tfor (lookLine = line + 1, lookLineLevel = GetFoldLevel(lookLine), lookLineLevelNum = LevelNumberPart(lookLineLevel);\r\n\t\tlookLine <= endFoldBlock;\r\n\t\tlookLineLevel = GetFoldLevel(++lookLine), lookLineLevelNum = LevelNumberPart(lookLineLevel)) {\r\n\t\tif (LevelIsHeader(lookLineLevel) && (lookLineLevelNum < LevelNumberPart(GetFoldLevel(lookLine + 1)))) {\r\n\t\t\tfirstChangeableLineAfter = lookLine;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\tif (firstChangeableLineAfter == -1)\r\n\t\tfirstChangeableLineAfter = endFoldBlock + 1;\r\n\r\n\thighlightDelimiter.beginFoldBlock = beginFoldBlock;\r\n\thighlightDelimiter.endFoldBlock = endFoldBlock;\r\n\thighlightDelimiter.firstChangeableLineBefore = firstChangeableLineBefore;\r\n\thighlightDelimiter.firstChangeableLineAfter = firstChangeableLineAfter;\r\n}\r\n\r\nSci::Position Document::ClampPositionIntoDocument(Sci::Position pos) const noexcept {\r\n\treturn std::clamp<Sci::Position>(pos, 0, LengthNoExcept());\r\n}\r\n\r\nbool Document::IsCrLf(Sci::Position pos) const noexcept {\r\n\tif (pos < 0)\r\n\t\treturn false;\r\n\tif (pos >= (LengthNoExcept() - 1))\r\n\t\treturn false;\r\n\treturn (cb.CharAt(pos) == '\\r') && (cb.CharAt(pos + 1) == '\\n');\r\n}\r\n\r\nint Document::LenChar(Sci::Position pos) const noexcept {\r\n\tif (pos < 0 || pos >= LengthNoExcept()) {\r\n\t\t// Returning 1 instead of 0 to defend against hanging with a loop that goes (or starts) out of bounds.\r\n\t\treturn 1;\r\n\t} else if (IsCrLf(pos)) {\r\n\t\treturn 2;\r\n\t}\r\n\r\n\tconst unsigned char leadByte = cb.UCharAt(pos);\r\n\tif (!dbcsCodePage || UTF8IsAscii(leadByte)) {\r\n\t\t// Common case: ASCII character\r\n\t\treturn 1;\r\n\t}\r\n\tif (CpUtf8 == dbcsCodePage) {\r\n\t\tconst int widthCharBytes = UTF8BytesOfLead[leadByte];\r\n\t\tunsigned char charBytes[UTF8MaxBytes] = { leadByte, 0, 0, 0 };\r\n\t\tfor (int b = 1; b < widthCharBytes; b++) {\r\n\t\t\tcharBytes[b] = cb.UCharAt(pos + b);\r\n\t\t}\r\n\t\tconst int utf8status = UTF8Classify(charBytes, widthCharBytes);\r\n\t\tif (utf8status & UTF8MaskInvalid) {\r\n\t\t\t// Treat as invalid and use up just one byte\r\n\t\t\treturn 1;\r\n\t\t} else {\r\n\t\t\treturn utf8status & UTF8MaskWidth;\r\n\t\t}\r\n\t} else {\r\n\t\tif (IsDBCSLeadByteNoExcept(leadByte) && IsDBCSTrailByteNoExcept(cb.CharAt(pos + 1))) {\r\n\t\t\treturn 2;\r\n\t\t} else {\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nbool Document::InGoodUTF8(Sci::Position pos, Sci::Position &start, Sci::Position &end) const noexcept {\r\n\tSci::Position trail = pos;\r\n\twhile ((trail>0) && (pos-trail < UTF8MaxBytes) && UTF8IsTrailByte(cb.UCharAt(trail-1)))\r\n\t\ttrail--;\r\n\tstart = (trail > 0) ? trail-1 : trail;\r\n\r\n\tconst unsigned char leadByte = cb.UCharAt(start);\r\n\tconst int widthCharBytes = UTF8BytesOfLead[leadByte];\r\n\tif (widthCharBytes == 1) {\r\n\t\treturn false;\r\n\t} else {\r\n\t\tconst int trailBytes = widthCharBytes - 1;\r\n\t\tconst Sci::Position len = pos - start;\r\n\t\tif (len > trailBytes)\r\n\t\t\t// pos too far from lead\r\n\t\t\treturn false;\r\n\t\tunsigned char charBytes[UTF8MaxBytes] = {leadByte,0,0,0};\r\n\t\tfor (Sci::Position b=1; b<widthCharBytes && ((start+b) < cb.Length()); b++)\r\n\t\t\tcharBytes[b] = cb.CharAt(start+b);\r\n\t\tconst int utf8status = UTF8Classify(charBytes, widthCharBytes);\r\n\t\tif (utf8status & UTF8MaskInvalid)\r\n\t\t\treturn false;\r\n\t\tend = start + widthCharBytes;\r\n\t\treturn true;\r\n\t}\r\n}\r\n\r\n// Normalise a position so that it is not part way through a multi-byte character.\r\n// This can occur in two situations -\r\n// When lines are terminated with \\r\\n pairs which should be treated as one character.\r\n// When displaying DBCS text such as Japanese.\r\n// If moving, move the position in the indicated direction.\r\nSci::Position Document::MovePositionOutsideChar(Sci::Position pos, Sci::Position moveDir, bool checkLineEnd) const noexcept {\r\n\t//Platform::DebugPrintf(\"NoCRLF %d %d\\n\", pos, moveDir);\r\n\t// If out of range, just return minimum/maximum value.\r\n\tif (pos <= 0)\r\n\t\treturn 0;\r\n\tif (pos >= LengthNoExcept())\r\n\t\treturn LengthNoExcept();\r\n\r\n\t// PLATFORM_ASSERT(pos > 0 && pos < LengthNoExcept());\r\n\tif (checkLineEnd && IsCrLf(pos - 1)) {\r\n\t\tif (moveDir > 0)\r\n\t\t\treturn pos + 1;\r\n\t\telse\r\n\t\t\treturn pos - 1;\r\n\t}\r\n\r\n\tif (dbcsCodePage) {\r\n\t\tif (CpUtf8 == dbcsCodePage) {\r\n\t\t\tconst unsigned char ch = cb.UCharAt(pos);\r\n\t\t\t// If ch is not a trail byte then pos is valid intercharacter position\r\n\t\t\tif (UTF8IsTrailByte(ch)) {\r\n\t\t\t\tSci::Position startUTF = pos;\r\n\t\t\t\tSci::Position endUTF = pos;\r\n\t\t\t\tif (InGoodUTF8(pos, startUTF, endUTF)) {\r\n\t\t\t\t\t// ch is a trail byte within a UTF-8 character\r\n\t\t\t\t\tif (moveDir > 0)\r\n\t\t\t\t\t\tpos = endUTF;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tpos = startUTF;\r\n\t\t\t\t}\r\n\t\t\t\t// Else invalid UTF-8 so return position of isolated trail byte\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t// Anchor DBCS calculations at start of line because start of line can\r\n\t\t\t// not be a DBCS trail byte.\r\n\t\t\tconst Sci::Position posStartLine = LineStartPosition(pos);\r\n\t\t\tif (pos == posStartLine)\r\n\t\t\t\treturn pos;\r\n\r\n\t\t\t// Step back until a non-lead-byte is found.\r\n\t\t\tSci::Position posCheck = pos;\r\n\t\t\twhile ((posCheck > posStartLine) && IsDBCSLeadByteNoExcept(cb.CharAt(posCheck-1)))\r\n\t\t\t\tposCheck--;\r\n\r\n\t\t\t// Check from known start of character.\r\n\t\t\twhile (posCheck < pos) {\r\n\t\t\t\tconst int mbsize = IsDBCSDualByteAt(posCheck) ? 2 : 1;\r\n\t\t\t\tif (posCheck + mbsize == pos) {\r\n\t\t\t\t\treturn pos;\r\n\t\t\t\t} else if (posCheck + mbsize > pos) {\r\n\t\t\t\t\tif (moveDir > 0) {\r\n\t\t\t\t\t\treturn posCheck + mbsize;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\treturn posCheck;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tposCheck += mbsize;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn pos;\r\n}\r\n\r\n// NextPosition moves between valid positions - it can not handle a position in the middle of a\r\n// multi-byte character. It is used to iterate through text more efficiently than MovePositionOutsideChar.\r\n// A \\r\\n pair is treated as two characters.\r\nSci::Position Document::NextPosition(Sci::Position pos, int moveDir) const noexcept {\r\n\t// If out of range, just return minimum/maximum value.\r\n\tconst int increment = (moveDir > 0) ? 1 : -1;\r\n\tif (pos + increment <= 0)\r\n\t\treturn 0;\r\n\tif (pos + increment >= cb.Length())\r\n\t\treturn cb.Length();\r\n\r\n\tif (dbcsCodePage) {\r\n\t\tif (CpUtf8 == dbcsCodePage) {\r\n\t\t\tif (increment == 1) {\r\n\t\t\t\t// Simple forward movement case so can avoid some checks\r\n\t\t\t\tconst unsigned char leadByte = cb.UCharAt(pos);\r\n\t\t\t\tif (UTF8IsAscii(leadByte)) {\r\n\t\t\t\t\t// Single byte character or invalid\r\n\t\t\t\t\tpos++;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tconst int widthCharBytes = UTF8BytesOfLead[leadByte];\r\n\t\t\t\t\tunsigned char charBytes[UTF8MaxBytes] = {leadByte,0,0,0};\r\n\t\t\t\t\tfor (int b=1; b<widthCharBytes; b++)\r\n\t\t\t\t\t\tcharBytes[b] = cb.CharAt(pos+b);\r\n\t\t\t\t\tconst int utf8status = UTF8Classify(charBytes, widthCharBytes);\r\n\t\t\t\t\tif (utf8status & UTF8MaskInvalid)\r\n\t\t\t\t\t\tpos++;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tpos += utf8status & UTF8MaskWidth;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// Examine byte before position\r\n\t\t\t\tpos--;\r\n\t\t\t\tconst unsigned char ch = cb.UCharAt(pos);\r\n\t\t\t\t// If ch is not a trail byte then pos is valid intercharacter position\r\n\t\t\t\tif (UTF8IsTrailByte(ch)) {\r\n\t\t\t\t\t// If ch is a trail byte in a valid UTF-8 character then return start of character\r\n\t\t\t\t\tSci::Position startUTF = pos;\r\n\t\t\t\t\tSci::Position endUTF = pos;\r\n\t\t\t\t\tif (InGoodUTF8(pos, startUTF, endUTF)) {\r\n\t\t\t\t\t\tpos = startUTF;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Else invalid UTF-8 so return position of isolated trail byte\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (moveDir > 0) {\r\n\t\t\t\tconst int mbsize = IsDBCSDualByteAt(pos) ? 2 : 1;\r\n\t\t\t\tpos += mbsize;\r\n\t\t\t\tif (pos > cb.Length())\r\n\t\t\t\t\tpos = cb.Length();\r\n\t\t\t} else {\r\n\t\t\t\t// Anchor DBCS calculations at start of line because start of line can\r\n\t\t\t\t// not be a DBCS trail byte.\r\n\t\t\t\tconst Sci::Position posStartLine = LineStartPosition(pos);\r\n\t\t\t\t// See http://msdn.microsoft.com/en-us/library/cc194792%28v=MSDN.10%29.aspx\r\n\t\t\t\t// http://msdn.microsoft.com/en-us/library/cc194790.aspx\r\n\t\t\t\tif ((pos - 1) <= posStartLine) {\r\n\t\t\t\t\treturn pos - 1;\r\n\t\t\t\t} else if (IsDBCSLeadByteNoExcept(cb.CharAt(pos - 1))) {\r\n\t\t\t\t\t// Should actually be trail byte\r\n\t\t\t\t\tif (IsDBCSDualByteAt(pos - 2)) {\r\n\t\t\t\t\t\treturn pos - 2;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// Invalid byte pair so treat as one byte wide\r\n\t\t\t\t\t\treturn pos - 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Otherwise, step back until a non-lead-byte is found.\r\n\t\t\t\t\tSci::Position posTemp = pos - 1;\r\n\t\t\t\t\twhile (posStartLine <= --posTemp && IsDBCSLeadByteNoExcept(cb.CharAt(posTemp)))\r\n\t\t\t\t\t\t;\r\n\t\t\t\t\t// Now posTemp+1 must point to the beginning of a character,\r\n\t\t\t\t\t// so figure out whether we went back an even or an odd\r\n\t\t\t\t\t// number of bytes and go back 1 or 2 bytes, respectively.\r\n\t\t\t\t\tconst Sci::Position widthLast = ((pos - posTemp) & 1) + 1;\r\n\t\t\t\t\tif ((widthLast == 2) && (IsDBCSDualByteAt(pos - widthLast))) {\r\n\t\t\t\t\t\treturn pos - widthLast;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Byte before pos may be valid character or may be an invalid second byte\r\n\t\t\t\t\treturn pos - 1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t} else {\r\n\t\tpos += increment;\r\n\t}\r\n\r\n\treturn pos;\r\n}\r\n\r\nbool Document::NextCharacter(Sci::Position &pos, int moveDir) const noexcept {\r\n\t// Returns true if pos changed\r\n\tSci::Position posNext = NextPosition(pos, moveDir);\r\n\tif (posNext == pos) {\r\n\t\treturn false;\r\n\t} else {\r\n\t\tpos = posNext;\r\n\t\treturn true;\r\n\t}\r\n}\r\n\r\nCharacterExtracted Document::CharacterAfter(Sci::Position position) const noexcept {\r\n\tif (position >= LengthNoExcept()) {\r\n\t\treturn CharacterExtracted(unicodeReplacementChar, 0);\r\n\t}\r\n\tconst unsigned char leadByte = cb.UCharAt(position);\r\n\tif (!dbcsCodePage || UTF8IsAscii(leadByte)) {\r\n\t\t// Common case: ASCII character\r\n\t\treturn CharacterExtracted(leadByte, 1);\r\n\t}\r\n\tif (CpUtf8 == dbcsCodePage) {\r\n\t\tconst int widthCharBytes = UTF8BytesOfLead[leadByte];\r\n\t\tunsigned char charBytes[UTF8MaxBytes] = { leadByte, 0, 0, 0 };\r\n\t\tfor (int b = 1; b<widthCharBytes; b++)\r\n\t\t\tcharBytes[b] = cb.UCharAt(position + b);\r\n\t\treturn CharacterExtracted(charBytes, widthCharBytes);\r\n\t} else {\r\n\t\tif (IsDBCSLeadByteNoExcept(leadByte)) {\r\n\t\t\tconst unsigned char trailByte = cb.UCharAt(position + 1);\r\n\t\t\tif (IsDBCSTrailByteNoExcept(trailByte)) {\r\n\t\t\t\treturn CharacterExtracted::DBCS(leadByte, trailByte);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn CharacterExtracted(leadByte, 1);\r\n\t}\r\n}\r\n\r\nCharacterExtracted Document::CharacterBefore(Sci::Position position) const noexcept {\r\n\tif (position <= 0) {\r\n\t\treturn CharacterExtracted(unicodeReplacementChar, 0);\r\n\t}\r\n\tconst unsigned char previousByte = cb.UCharAt(position - 1);\r\n\tif (0 == dbcsCodePage) {\r\n\t\treturn CharacterExtracted(previousByte, 1);\r\n\t}\r\n\tif (CpUtf8 == dbcsCodePage) {\r\n\t\tif (UTF8IsAscii(previousByte)) {\r\n\t\t\treturn CharacterExtracted(previousByte, 1);\r\n\t\t}\r\n\t\tposition--;\r\n\t\t// If previousByte is not a trail byte then its invalid\r\n\t\tif (UTF8IsTrailByte(previousByte)) {\r\n\t\t\t// If previousByte is a trail byte in a valid UTF-8 character then find start of character\r\n\t\t\tSci::Position startUTF = position;\r\n\t\t\tSci::Position endUTF = position;\r\n\t\t\tif (InGoodUTF8(position, startUTF, endUTF)) {\r\n\t\t\t\tconst Sci::Position widthCharBytes = endUTF - startUTF;\r\n\t\t\t\tunsigned char charBytes[UTF8MaxBytes] = { 0, 0, 0, 0 };\r\n\t\t\t\tfor (Sci::Position b = 0; b<widthCharBytes; b++)\r\n\t\t\t\t\tcharBytes[b] = cb.UCharAt(startUTF + b);\r\n\t\t\t\treturn CharacterExtracted(charBytes, widthCharBytes);\r\n\t\t\t}\r\n\t\t\t// Else invalid UTF-8 so return position of isolated trail byte\r\n\t\t}\r\n\t\treturn CharacterExtracted(unicodeReplacementChar, 1);\r\n\t} else {\r\n\t\t// Moving backwards in DBCS is complex so use NextPosition\r\n\t\tconst Sci::Position posStartCharacter = NextPosition(position, -1);\r\n\t\treturn CharacterAfter(posStartCharacter);\r\n\t}\r\n}\r\n\r\n// Return -1  on out-of-bounds\r\nSci_Position SCI_METHOD Document::GetRelativePosition(Sci_Position positionStart, Sci_Position characterOffset) const {\r\n\tSci::Position pos = positionStart;\r\n\tif (dbcsCodePage) {\r\n\t\tconst int increment = (characterOffset > 0) ? 1 : -1;\r\n\t\twhile (characterOffset != 0) {\r\n\t\t\tconst Sci::Position posNext = NextPosition(pos, increment);\r\n\t\t\tif (posNext == pos)\r\n\t\t\t\treturn Sci::invalidPosition;\r\n\t\t\tpos = posNext;\r\n\t\t\tcharacterOffset -= increment;\r\n\t\t}\r\n\t} else {\r\n\t\tpos = positionStart + characterOffset;\r\n\t\tif ((pos < 0) || (pos > Length()))\r\n\t\t\treturn Sci::invalidPosition;\r\n\t}\r\n\treturn pos;\r\n}\r\n\r\nSci::Position Document::GetRelativePositionUTF16(Sci::Position positionStart, Sci::Position characterOffset) const noexcept {\r\n\tSci::Position pos = positionStart;\r\n\tif (dbcsCodePage) {\r\n\t\tconst int increment = (characterOffset > 0) ? 1 : -1;\r\n\t\twhile (characterOffset != 0) {\r\n\t\t\tconst Sci::Position posNext = NextPosition(pos, increment);\r\n\t\t\tif (posNext == pos)\r\n\t\t\t\treturn Sci::invalidPosition;\r\n\t\t\tif (std::abs(pos-posNext) > 3)\t// 4 byte character = 2*UTF16.\r\n\t\t\t\tcharacterOffset -= increment;\r\n\t\t\tpos = posNext;\r\n\t\t\tcharacterOffset -= increment;\r\n\t\t}\r\n\t} else {\r\n\t\tpos = positionStart + characterOffset;\r\n\t\tif ((pos < 0) || (pos > LengthNoExcept()))\r\n\t\t\treturn Sci::invalidPosition;\r\n\t}\r\n\treturn pos;\r\n}\r\n\r\nint SCI_METHOD Document::GetCharacterAndWidth(Sci_Position position, Sci_Position *pWidth) const {\r\n\tint bytesInCharacter = 1;\r\n\tconst unsigned char leadByte = cb.UCharAt(position);\r\n\tint character = leadByte;\r\n\tif (dbcsCodePage && !UTF8IsAscii(leadByte)) {\r\n\t\tif (CpUtf8 == dbcsCodePage) {\r\n\t\t\tconst int widthCharBytes = UTF8BytesOfLead[leadByte];\r\n\t\t\tunsigned char charBytes[UTF8MaxBytes] = {leadByte,0,0,0};\r\n\t\t\tfor (int b=1; b<widthCharBytes; b++)\r\n\t\t\t\tcharBytes[b] = cb.UCharAt(position+b);\r\n\t\t\tconst int utf8status = UTF8Classify(charBytes, widthCharBytes);\r\n\t\t\tif (utf8status & UTF8MaskInvalid) {\r\n\t\t\t\t// Report as singleton surrogate values which are invalid Unicode\r\n\t\t\t\tcharacter =  0xDC80 + leadByte;\r\n\t\t\t} else {\r\n\t\t\t\tbytesInCharacter = utf8status & UTF8MaskWidth;\r\n\t\t\t\tcharacter = UnicodeFromUTF8(charBytes);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (IsDBCSLeadByteNoExcept(leadByte)) {\r\n\t\t\t\tconst unsigned char trailByte = cb.UCharAt(position + 1);\r\n\t\t\t\tif (IsDBCSTrailByteNoExcept(trailByte)) {\r\n\t\t\t\t\tbytesInCharacter = 2;\r\n\t\t\t\t\tcharacter = (leadByte << 8) | trailByte;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (pWidth) {\r\n\t\t*pWidth = bytesInCharacter;\r\n\t}\r\n\treturn character;\r\n}\r\n\r\nint SCI_METHOD Document::CodePage() const {\r\n\treturn dbcsCodePage;\r\n}\r\n\r\nbool SCI_METHOD Document::IsDBCSLeadByte(char ch) const {\r\n\t// Used by lexers so must match IDocument method exactly\r\n\treturn IsDBCSLeadByteNoExcept(ch);\r\n}\r\n\r\nbool Document::IsDBCSLeadByteNoExcept(char ch) const noexcept {\r\n\t// Used inside core Scintilla\r\n\t// Byte ranges found in Wikipedia articles with relevant search strings in each case\r\n\tconst unsigned char uch = ch;\r\n\tswitch (dbcsCodePage) {\r\n\t\tcase 932:\r\n\t\t\t// Shift_jis\r\n\t\t\treturn ((uch >= 0x81) && (uch <= 0x9F)) ||\r\n\t\t\t\t((uch >= 0xE0) && (uch <= 0xFC));\r\n\t\t\t\t// Lead bytes F0 to FC may be a Microsoft addition.\r\n\t\tcase 936:\r\n\t\t\t// GBK\r\n\t\t\treturn (uch >= 0x81) && (uch <= 0xFE);\r\n\t\tcase 949:\r\n\t\t\t// Korean Wansung KS C-5601-1987\r\n\t\t\treturn (uch >= 0x81) && (uch <= 0xFE);\r\n\t\tcase 950:\r\n\t\t\t// Big5\r\n\t\t\treturn (uch >= 0x81) && (uch <= 0xFE);\r\n\t\tcase 1361:\r\n\t\t\t// Korean Johab KS C-5601-1992\r\n\t\t\treturn\r\n\t\t\t\t((uch >= 0x84) && (uch <= 0xD3)) ||\r\n\t\t\t\t((uch >= 0xD8) && (uch <= 0xDE)) ||\r\n\t\t\t\t((uch >= 0xE0) && (uch <= 0xF9));\r\n\t}\r\n\treturn false;\r\n}\r\n\r\nbool Document::IsDBCSTrailByteNoExcept(char ch) const noexcept {\r\n\tconst unsigned char trail = ch;\r\n\tswitch (dbcsCodePage) {\r\n\tcase 932:\r\n\t\t// Shift_jis\r\n\t\treturn (trail != 0x7F) &&\r\n\t\t\t((trail >= 0x40) && (trail <= 0xFC));\r\n\tcase 936:\r\n\t\t// GBK\r\n\t\treturn (trail != 0x7F) &&\r\n\t\t\t((trail >= 0x40) && (trail <= 0xFE));\r\n\tcase 949:\r\n\t\t// Korean Wansung KS C-5601-1987\r\n\t\treturn\r\n\t\t\t((trail >= 0x41) && (trail <= 0x5A)) ||\r\n\t\t\t((trail >= 0x61) && (trail <= 0x7A)) ||\r\n\t\t\t((trail >= 0x81) && (trail <= 0xFE));\r\n\tcase 950:\r\n\t\t// Big5\r\n\t\treturn\r\n\t\t\t((trail >= 0x40) && (trail <= 0x7E)) ||\r\n\t\t\t((trail >= 0xA1) && (trail <= 0xFE));\r\n\tcase 1361:\r\n\t\t// Korean Johab KS C-5601-1992\r\n\t\treturn\r\n\t\t\t((trail >= 0x31) && (trail <= 0x7E)) ||\r\n\t\t\t((trail >= 0x81) && (trail <= 0xFE));\r\n\t}\r\n\treturn false;\r\n}\r\n\r\nint Document::DBCSDrawBytes(std::string_view text) const noexcept {\r\n\tif (text.length() <= 1) {\r\n\t\treturn static_cast<int>(text.length());\r\n\t}\r\n\tif (IsDBCSLeadByteNoExcept(text[0])) {\r\n\t\treturn IsDBCSTrailByteNoExcept(text[1]) ? 2 : 1;\r\n\t} else {\r\n\t\treturn 1;\r\n\t}\r\n}\r\n\r\nbool Document::IsDBCSDualByteAt(Sci::Position pos) const noexcept {\r\n\treturn IsDBCSLeadByteNoExcept(cb.CharAt(pos))\r\n\t\t&& IsDBCSTrailByteNoExcept(cb.CharAt(pos + 1));\r\n}\r\n\r\n// Need to break text into segments near end but taking into account the\r\n// encoding to not break inside a UTF-8 or DBCS character and also trying\r\n// to avoid breaking inside a pair of combining characters, or inside\r\n// ligatures.\r\n// TODO: implement grapheme cluster boundaries,\r\n// see https://www.unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries.\r\n//\r\n// The segment length must always be long enough (more than 4 bytes)\r\n// so that there will be at least one whole character to make a segment.\r\n// For UTF-8, text must consist only of valid whole characters.\r\n// In preference order from best to worst:\r\n//   1) Break before or after spaces or controls\r\n//   2) Break at word and punctuation boundary for better kerning and ligature support\r\n//   3) Break after whole character, this may break combining characters\r\n\r\nsize_t Document::SafeSegment(std::string_view text) const noexcept {\r\n\t// check space first as most written language use spaces.\r\n\tfor (std::string_view::iterator it = text.end() - 1; it != text.begin(); --it) {\r\n\t\tif (IsBreakSpace(*it)) {\r\n\t\t\treturn it - text.begin();\r\n\t\t}\r\n\t}\r\n\r\n\tif (!dbcsCodePage || dbcsCodePage == CpUtf8) {\r\n\t\t// backward iterate for UTF-8 and single byte encoding to find word and punctuation boundary.\r\n\t\tstd::string_view::iterator it = text.end() - 1;\r\n\t\tconst bool punctuation = IsPunctuation(*it);\r\n\t\tdo {\r\n\t\t\t--it;\r\n\t\t\tif (punctuation != IsPunctuation(*it)) {\r\n\t\t\t\treturn it - text.begin() + 1;\r\n\t\t\t}\r\n\t\t} while (it != text.begin());\r\n\r\n\t\tit = text.end() - 1;\r\n\t\tif (dbcsCodePage) {\r\n\t\t\t// for UTF-8 go back to the start of last character.\r\n\t\t\tfor (int trail = 0; trail < UTF8MaxBytes - 1 && UTF8IsTrailByte(*it); trail++) {\r\n\t\t\t\t--it;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn it - text.begin();\r\n\t}\r\n\r\n\t{\r\n\t\t// forward iterate for DBCS to find word and punctuation boundary.\r\n\t\tsize_t lastPunctuationBreak = 0;\r\n\t\tsize_t lastEncodingAllowedBreak = 0;\r\n\t\tCharacterClass ccPrev = CharacterClass::space;\r\n\t\tfor (size_t j = 0; j < text.length();) {\r\n\t\t\tconst unsigned char ch = text[j];\r\n\t\t\tlastEncodingAllowedBreak = j++;\r\n\r\n\t\t\tCharacterClass cc = CharacterClass::word;\r\n\t\t\tif (UTF8IsAscii(ch)) {\r\n\t\t\t\tif (IsPunctuation(ch)) {\r\n\t\t\t\t\tcc = CharacterClass::punctuation;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tj += IsDBCSLeadByteNoExcept(ch);\r\n\t\t\t}\r\n\t\t\tif (cc != ccPrev) {\r\n\t\t\t\tccPrev = cc;\r\n\t\t\t\tlastPunctuationBreak = lastEncodingAllowedBreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn lastPunctuationBreak ? lastPunctuationBreak : lastEncodingAllowedBreak;\r\n\t}\r\n}\r\n\r\nEncodingFamily Document::CodePageFamily() const noexcept {\r\n\tif (CpUtf8 == dbcsCodePage)\r\n\t\treturn EncodingFamily::unicode;\r\n\telse if (dbcsCodePage)\r\n\t\treturn EncodingFamily::dbcs;\r\n\telse\r\n\t\treturn EncodingFamily::eightBit;\r\n}\r\n\r\nvoid Document::ModifiedAt(Sci::Position pos) noexcept {\r\n\tif (endStyled > pos)\r\n\t\tendStyled = pos;\r\n}\r\n\r\nvoid Document::CheckReadOnly() {\r\n\tif (cb.IsReadOnly() && enteredReadOnlyCount == 0) {\r\n\t\tenteredReadOnlyCount++;\r\n\t\tNotifyModifyAttempt();\r\n\t\tenteredReadOnlyCount--;\r\n\t}\r\n}\r\n\r\nvoid Document::TrimReplacement(std::string_view &text, Range &range) const noexcept {\r\n\twhile (!text.empty() && !range.Empty() && (text.front() == CharAt(range.start))) {\r\n\t\ttext.remove_prefix(1);\r\n\t\trange.start++;\r\n\t}\r\n\twhile (!text.empty() && !range.Empty() && (text.back() == CharAt(range.end-1))) {\r\n\t\ttext.remove_suffix(1);\r\n\t\trange.end--;\r\n\t}\r\n}\r\n\r\n// Document only modified by gateways DeleteChars, InsertString, Undo, Redo, and SetStyleAt.\r\n// SetStyleAt does not change the persistent state of a document\r\n\r\nbool Document::DeleteChars(Sci::Position pos, Sci::Position len) {\r\n\tif (pos < 0)\r\n\t\treturn false;\r\n\tif (len <= 0)\r\n\t\treturn false;\r\n\tif ((pos + len) > LengthNoExcept())\r\n\t\treturn false;\r\n\tCheckReadOnly();\r\n\tif (enteredModification != 0) {\r\n\t\treturn false;\r\n\t} else {\r\n\t\tenteredModification++;\r\n\t\tif (!cb.IsReadOnly()) {\r\n\t\t\tNotifyModified(\r\n\t\t\t    DocModification(\r\n\t\t\t        ModificationFlags::BeforeDelete | ModificationFlags::User,\r\n\t\t\t        pos, len,\r\n\t\t\t\t0, nullptr));\r\n\t\t\tconst Sci::Line prevLinesTotal = LinesTotal();\r\n\t\t\tconst bool startSavePoint = cb.IsSavePoint();\r\n\t\t\tbool startSequence = false;\r\n\t\t\tconst char *text = cb.DeleteChars(pos, len, startSequence);\r\n\t\t\tif (startSavePoint && cb.IsCollectingUndo())\r\n\t\t\t\tNotifySavePoint(false);\r\n\t\t\tif ((pos < LengthNoExcept()) || (pos == 0))\r\n\t\t\t\tModifiedAt(pos);\r\n\t\t\telse\r\n\t\t\t\tModifiedAt(pos-1);\r\n\t\t\tNotifyModified(\r\n\t\t\t    DocModification(\r\n\t\t\t        ModificationFlags::DeleteText | ModificationFlags::User |\r\n\t\t\t\t\t(startSequence?ModificationFlags::StartAction:ModificationFlags::None),\r\n\t\t\t        pos, len,\r\n\t\t\t        LinesTotal() - prevLinesTotal, text));\r\n\t\t}\r\n\t\tenteredModification--;\r\n\t}\r\n\treturn !cb.IsReadOnly();\r\n}\r\n\r\n/**\r\n * Insert a string with a length.\r\n */\r\nSci::Position Document::InsertString(Sci::Position position, const char *s, Sci::Position insertLength) {\r\n\tif (insertLength <= 0) {\r\n\t\treturn 0;\r\n\t}\r\n\tCheckReadOnly();\t// Application may change read only state here\r\n\tif (cb.IsReadOnly()) {\r\n\t\treturn 0;\r\n\t}\r\n\tif (enteredModification != 0) {\r\n\t\treturn 0;\r\n\t}\r\n\tenteredModification++;\r\n\tinsertionSet = false;\r\n\tinsertion.clear();\r\n\tNotifyModified(\r\n\t\tDocModification(\r\n\t\t\tModificationFlags::InsertCheck,\r\n\t\t\tposition, insertLength,\r\n\t\t\t0, s));\r\n\tif (insertionSet) {\r\n\t\ts = insertion.c_str();\r\n\t\tinsertLength = insertion.length();\r\n\t}\r\n\tNotifyModified(\r\n\t\tDocModification(\r\n\t\t\tModificationFlags::BeforeInsert | ModificationFlags::User,\r\n\t\t\tposition, insertLength,\r\n\t\t\t0, s));\r\n\tconst Sci::Line prevLinesTotal = LinesTotal();\r\n\tconst bool startSavePoint = cb.IsSavePoint();\r\n\tbool startSequence = false;\r\n\tconst char *text = cb.InsertString(position, s, insertLength, startSequence);\r\n\tif (startSavePoint && cb.IsCollectingUndo())\r\n\t\tNotifySavePoint(false);\r\n\tModifiedAt(position);\r\n\tNotifyModified(\r\n\t\tDocModification(\r\n\t\t\tModificationFlags::InsertText | ModificationFlags::User |\r\n\t\t\t(startSequence?ModificationFlags::StartAction:ModificationFlags::None),\r\n\t\t\tposition, insertLength,\r\n\t\t\tLinesTotal() - prevLinesTotal, text));\r\n\tif (insertionSet) {\t// Free memory as could be large\r\n\t\tstd::string().swap(insertion);\r\n\t}\r\n\tenteredModification--;\r\n\treturn insertLength;\r\n}\r\n\r\nSci::Position Document::InsertString(Sci::Position position, std::string_view sv) {\r\n\treturn InsertString(position, sv.data(), sv.length());\r\n}\r\n\r\nvoid Document::ChangeInsertion(const char *s, Sci::Position length) {\r\n\tinsertionSet = true;\r\n\tinsertion.assign(s, length);\r\n}\r\n\r\nint SCI_METHOD Document::AddData(const char *data, Sci_Position length) {\r\n\ttry {\r\n\t\tconst Sci::Position position = Length();\r\n\t\tInsertString(position, data, length);\r\n\t} catch (std::bad_alloc &) {\r\n\t\treturn static_cast<int>(Status::BadAlloc);\r\n\t} catch (...) {\r\n\t\treturn static_cast<int>(Status::Failure);\r\n\t}\r\n\treturn static_cast<int>(Status::Ok);\r\n}\r\n\r\nIDocumentEditable *Document::AsDocumentEditable() noexcept {\r\n\treturn static_cast<IDocumentEditable *>(this);\r\n}\r\n\r\nvoid *SCI_METHOD Document::ConvertToDocument() {\r\n\treturn AsDocumentEditable();\r\n}\r\n\r\nSci::Position Document::Undo() {\r\n\tSci::Position newPos = -1;\r\n\tCheckReadOnly();\r\n\tif ((enteredModification == 0) && (cb.IsCollectingUndo())) {\r\n\t\tenteredModification++;\r\n\t\tif (!cb.IsReadOnly()) {\r\n\t\t\tconst bool startSavePoint = cb.IsSavePoint();\r\n\t\t\tbool multiLine = false;\r\n\t\t\tconst int steps = cb.StartUndo();\r\n\t\t\t//Platform::DebugPrintf(\"Steps=%d\\n\", steps);\r\n\t\t\tRange coalescedRemove;\t// Default is empty at 0\r\n\t\t\tfor (int step = 0; step < steps; step++) {\r\n\t\t\t\tconst Sci::Line prevLinesTotal = LinesTotal();\r\n\t\t\t\tconst Action action = cb.GetUndoStep();\r\n\t\t\t\tif (action.at == ActionType::remove) {\r\n\t\t\t\t\tNotifyModified(DocModification(\r\n\t\t\t\t\t\t\t\t\tModificationFlags::BeforeInsert | ModificationFlags::Undo, action));\r\n\t\t\t\t} else if (action.at == ActionType::container) {\r\n\t\t\t\t\tDocModification dm(ModificationFlags::Container | ModificationFlags::Undo);\r\n\t\t\t\t\tdm.token = action.position;\r\n\t\t\t\t\tNotifyModified(dm);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tNotifyModified(DocModification(\r\n\t\t\t\t\t\t\t\t\tModificationFlags::BeforeDelete | ModificationFlags::Undo, action));\r\n\t\t\t\t}\r\n\t\t\t\tcb.PerformUndoStep();\r\n\t\t\t\tif (action.at != ActionType::container) {\r\n\t\t\t\t\tModifiedAt(action.position);\r\n\t\t\t\t\tnewPos = action.position;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tModificationFlags modFlags = ModificationFlags::Undo;\r\n\t\t\t\t// With undo, an insertion action becomes a deletion notification\r\n\t\t\t\tif (action.at == ActionType::remove) {\r\n\t\t\t\t\tnewPos += action.lenData;\r\n\t\t\t\t\tmodFlags |= ModificationFlags::InsertText;\r\n\t\t\t\t\tif (coalescedRemove.Contains(action.position)) {\r\n\t\t\t\t\t\tcoalescedRemove.end += action.lenData;\r\n\t\t\t\t\t\tnewPos = coalescedRemove.end;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcoalescedRemove = Range(action.position, action.position + action.lenData);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (action.at == ActionType::insert) {\r\n\t\t\t\t\tmodFlags |= ModificationFlags::DeleteText;\r\n\t\t\t\t\tcoalescedRemove = Range();\r\n\t\t\t\t}\r\n\t\t\t\tif (steps > 1)\r\n\t\t\t\t\tmodFlags |= ModificationFlags::MultiStepUndoRedo;\r\n\t\t\t\tconst Sci::Line linesAdded = LinesTotal() - prevLinesTotal;\r\n\t\t\t\tif (linesAdded != 0)\r\n\t\t\t\t\tmultiLine = true;\r\n\t\t\t\tif (step == steps - 1) {\r\n\t\t\t\t\tmodFlags |= ModificationFlags::LastStepInUndoRedo;\r\n\t\t\t\t\tif (multiLine)\r\n\t\t\t\t\t\tmodFlags |= ModificationFlags::MultilineUndoRedo;\r\n\t\t\t\t}\r\n\t\t\t\tNotifyModified(DocModification(modFlags, action.position, action.lenData,\r\n\t\t\t\t\t\t\t\t\t\t\t   linesAdded, action.data));\r\n\t\t\t}\r\n\r\n\t\t\tconst bool endSavePoint = cb.IsSavePoint();\r\n\t\t\tif (startSavePoint != endSavePoint)\r\n\t\t\t\tNotifySavePoint(endSavePoint);\r\n\t\t}\r\n\t\tenteredModification--;\r\n\t}\r\n\treturn newPos;\r\n}\r\n\r\nSci::Position Document::Redo() {\r\n\tSci::Position newPos = -1;\r\n\tCheckReadOnly();\r\n\tif ((enteredModification == 0) && (cb.IsCollectingUndo())) {\r\n\t\tenteredModification++;\r\n\t\tif (!cb.IsReadOnly()) {\r\n\t\t\tconst bool startSavePoint = cb.IsSavePoint();\r\n\t\t\tbool multiLine = false;\r\n\t\t\tconst int steps = cb.StartRedo();\r\n\t\t\tfor (int step = 0; step < steps; step++) {\r\n\t\t\t\tconst Sci::Line prevLinesTotal = LinesTotal();\r\n\t\t\t\tconst Action action = cb.GetRedoStep();\r\n\t\t\t\tif (action.at == ActionType::insert) {\r\n\t\t\t\t\tNotifyModified(DocModification(\r\n\t\t\t\t\t\t\t\t\tModificationFlags::BeforeInsert | ModificationFlags::Redo, action));\r\n\t\t\t\t} else if (action.at == ActionType::container) {\r\n\t\t\t\t\tDocModification dm(ModificationFlags::Container | ModificationFlags::Redo);\r\n\t\t\t\t\tdm.token = action.position;\r\n\t\t\t\t\tNotifyModified(dm);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tNotifyModified(DocModification(\r\n\t\t\t\t\t\t\t\t\tModificationFlags::BeforeDelete | ModificationFlags::Redo, action));\r\n\t\t\t\t}\r\n\t\t\t\tcb.PerformRedoStep();\r\n\t\t\t\tif (action.at != ActionType::container) {\r\n\t\t\t\t\tModifiedAt(action.position);\r\n\t\t\t\t\tnewPos = action.position;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tModificationFlags modFlags = ModificationFlags::Redo;\r\n\t\t\t\tif (action.at == ActionType::insert) {\r\n\t\t\t\t\tnewPos += action.lenData;\r\n\t\t\t\t\tmodFlags |= ModificationFlags::InsertText;\r\n\t\t\t\t} else if (action.at == ActionType::remove) {\r\n\t\t\t\t\tmodFlags |= ModificationFlags::DeleteText;\r\n\t\t\t\t}\r\n\t\t\t\tif (steps > 1)\r\n\t\t\t\t\tmodFlags |= ModificationFlags::MultiStepUndoRedo;\r\n\t\t\t\tconst Sci::Line linesAdded = LinesTotal() - prevLinesTotal;\r\n\t\t\t\tif (linesAdded != 0)\r\n\t\t\t\t\tmultiLine = true;\r\n\t\t\t\tif (step == steps - 1) {\r\n\t\t\t\t\tmodFlags |= ModificationFlags::LastStepInUndoRedo;\r\n\t\t\t\t\tif (multiLine)\r\n\t\t\t\t\t\tmodFlags |= ModificationFlags::MultilineUndoRedo;\r\n\t\t\t\t}\r\n\t\t\t\tNotifyModified(\r\n\t\t\t\t\tDocModification(modFlags, action.position, action.lenData,\r\n\t\t\t\t\t\t\t\t\tlinesAdded, action.data));\r\n\t\t\t}\r\n\r\n\t\t\tconst bool endSavePoint = cb.IsSavePoint();\r\n\t\t\tif (startSavePoint != endSavePoint)\r\n\t\t\t\tNotifySavePoint(endSavePoint);\r\n\t\t}\r\n\t\tenteredModification--;\r\n\t}\r\n\treturn newPos;\r\n}\r\n\r\nvoid Document::DelChar(Sci::Position pos) {\r\n\tDeleteChars(pos, LenChar(pos));\r\n}\r\n\r\nvoid Document::DelCharBack(Sci::Position pos) {\r\n\tif (pos <= 0) {\r\n\t\treturn;\r\n\t} else if (IsCrLf(pos - 2)) {\r\n\t\tDeleteChars(pos - 2, 2);\r\n\t} else if (dbcsCodePage) {\r\n\t\tconst Sci::Position startChar = NextPosition(pos, -1);\r\n\t\tDeleteChars(startChar, pos - startChar);\r\n\t} else {\r\n\t\tDeleteChars(pos - 1, 1);\r\n\t}\r\n}\r\n\r\nstatic constexpr Sci::Position NextTab(Sci::Position pos, Sci::Position tabSize) noexcept {\r\n\treturn ((pos / tabSize) + 1) * tabSize;\r\n}\r\n\r\nstatic std::string CreateIndentation(Sci::Position indent, int tabSize, bool insertSpaces) {\r\n\tstd::string indentation;\r\n\tif (!insertSpaces) {\r\n\t\twhile (indent >= tabSize) {\r\n\t\t\tindentation += '\\t';\r\n\t\t\tindent -= tabSize;\r\n\t\t}\r\n\t}\r\n\twhile (indent > 0) {\r\n\t\tindentation += ' ';\r\n\t\tindent--;\r\n\t}\r\n\treturn indentation;\r\n}\r\n\r\nint SCI_METHOD Document::GetLineIndentation(Sci_Position line) {\r\n\tint indent = 0;\r\n\tif ((line >= 0) && (line < LinesTotal())) {\r\n\t\tconst Sci::Position lineStart = LineStart(line);\r\n\t\tconst Sci::Position length = Length();\r\n\t\tfor (Sci::Position i = lineStart; i < length; i++) {\r\n\t\t\tconst char ch = cb.CharAt(i);\r\n\t\t\tif (ch == ' ')\r\n\t\t\t\tindent++;\r\n\t\t\telse if (ch == '\\t')\r\n\t\t\t\tindent = static_cast<int>(NextTab(indent, tabInChars));\r\n\t\t\telse\r\n\t\t\t\treturn indent;\r\n\t\t}\r\n\t}\r\n\treturn indent;\r\n}\r\n\r\nSci::Position Document::SetLineIndentation(Sci::Line line, Sci::Position indent) {\r\n\tconst int indentOfLine = GetLineIndentation(line);\r\n\tif (indent < 0)\r\n\t\tindent = 0;\r\n\tif (indent != indentOfLine) {\r\n\t\tconst std::string linebuf = CreateIndentation(indent, tabInChars, !useTabs);\r\n\t\tconst Sci::Position thisLineStart = LineStart(line);\r\n\t\tconst Sci::Position indentPos = GetLineIndentPosition(line);\r\n\t\tUndoGroup ug(this);\r\n\t\tDeleteChars(thisLineStart, indentPos - thisLineStart);\r\n\t\treturn thisLineStart + InsertString(thisLineStart, linebuf);\r\n\t} else {\r\n\t\treturn GetLineIndentPosition(line);\r\n\t}\r\n}\r\n\r\nSci::Position Document::GetLineIndentPosition(Sci::Line line) const {\r\n\tif (line < 0)\r\n\t\treturn 0;\r\n\tSci::Position pos = LineStart(line);\r\n\tconst Sci::Position length = Length();\r\n\twhile ((pos < length) && IsSpaceOrTab(cb.CharAt(pos))) {\r\n\t\tpos++;\r\n\t}\r\n\treturn pos;\r\n}\r\n\r\nSci::Position Document::GetColumn(Sci::Position pos) const {\r\n\tSci::Position column = 0;\r\n\tconst Sci::Line line = SciLineFromPosition(pos);\r\n\tif ((line >= 0) && (line < LinesTotal())) {\r\n\t\tfor (Sci::Position i = LineStart(line); i < pos;) {\r\n\t\t\tconst char ch = cb.CharAt(i);\r\n\t\t\tif (ch == '\\t') {\r\n\t\t\t\tcolumn = NextTab(column, tabInChars);\r\n\t\t\t\ti++;\r\n\t\t\t} else if (ch == '\\r') {\r\n\t\t\t\treturn column;\r\n\t\t\t} else if (ch == '\\n') {\r\n\t\t\t\treturn column;\r\n\t\t\t} else if (i >= Length()) {\r\n\t\t\t\treturn column;\r\n\t\t\t} else if (UTF8IsAscii(ch)) {\r\n\t\t\t\tcolumn++;\r\n\t\t\t\ti++;\r\n\t\t\t} else {\r\n\t\t\t\tcolumn++;\r\n\t\t\t\ti = NextPosition(i, 1);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn column;\r\n}\r\n\r\nSci::Position Document::CountCharacters(Sci::Position startPos, Sci::Position endPos) const noexcept {\r\n\tstartPos = MovePositionOutsideChar(startPos, 1, false);\r\n\tendPos = MovePositionOutsideChar(endPos, -1, false);\r\n\tSci::Position count = 0;\r\n\tSci::Position i = startPos;\r\n\twhile (i < endPos) {\r\n\t\tcount++;\r\n\t\ti = NextPosition(i, 1);\r\n\t}\r\n\treturn count;\r\n}\r\n\r\nSci::Position Document::CountUTF16(Sci::Position startPos, Sci::Position endPos) const noexcept {\r\n\tstartPos = MovePositionOutsideChar(startPos, 1, false);\r\n\tendPos = MovePositionOutsideChar(endPos, -1, false);\r\n\tSci::Position count = 0;\r\n\tSci::Position i = startPos;\r\n\twhile (i < endPos) {\r\n\t\tcount++;\r\n\t\tconst Sci::Position next = NextPosition(i, 1);\r\n\t\tif ((next - i) > 3)\r\n\t\t\tcount++;\r\n\t\ti = next;\r\n\t}\r\n\treturn count;\r\n}\r\n\r\nSci::Position Document::FindColumn(Sci::Line line, Sci::Position column) {\r\n\tSci::Position position = LineStart(line);\r\n\tif ((line >= 0) && (line < LinesTotal())) {\r\n\t\tSci::Position columnCurrent = 0;\r\n\t\twhile ((columnCurrent < column) && (position < Length())) {\r\n\t\t\tconst char ch = cb.CharAt(position);\r\n\t\t\tif (ch == '\\t') {\r\n\t\t\t\tcolumnCurrent = NextTab(columnCurrent, tabInChars);\r\n\t\t\t\tif (columnCurrent > column)\r\n\t\t\t\t\treturn position;\r\n\t\t\t\tposition++;\r\n\t\t\t} else if (ch == '\\r') {\r\n\t\t\t\treturn position;\r\n\t\t\t} else if (ch == '\\n') {\r\n\t\t\t\treturn position;\r\n\t\t\t} else {\r\n\t\t\t\tcolumnCurrent++;\r\n\t\t\t\tposition = NextPosition(position, 1);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn position;\r\n}\r\n\r\nvoid Document::Indent(bool forwards, Sci::Line lineBottom, Sci::Line lineTop) {\r\n\t// Dedent - suck white space off the front of the line to dedent by equivalent of a tab\r\n\tfor (Sci::Line line = lineBottom; line >= lineTop; line--) {\r\n\t\tconst Sci::Position indentOfLine = GetLineIndentation(line);\r\n\t\tif (forwards) {\r\n\t\t\tif (LineStart(line) < LineEnd(line)) {\r\n\t\t\t\tSetLineIndentation(line, indentOfLine + IndentSize());\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tSetLineIndentation(line, indentOfLine - IndentSize());\r\n\t\t}\r\n\t}\r\n}\r\n\r\n// Convert line endings for a piece of text to a particular mode.\r\n// Stop at len or when a NUL is found.\r\nstd::string Document::TransformLineEnds(const char *s, size_t len, EndOfLine eolModeWanted) {\r\n\tstd::string dest;\r\n\tfor (size_t i = 0; (i < len) && (s[i]); i++) {\r\n\t\tif (s[i] == '\\n' || s[i] == '\\r') {\r\n\t\t\tif (eolModeWanted == EndOfLine::Cr) {\r\n\t\t\t\tdest.push_back('\\r');\r\n\t\t\t} else if (eolModeWanted == EndOfLine::Lf) {\r\n\t\t\t\tdest.push_back('\\n');\r\n\t\t\t} else { // eolModeWanted == EndOfLine::CrLf\r\n\t\t\t\tdest.push_back('\\r');\r\n\t\t\t\tdest.push_back('\\n');\r\n\t\t\t}\r\n\t\t\tif ((s[i] == '\\r') && (i+1 < len) && (s[i+1] == '\\n')) {\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tdest.push_back(s[i]);\r\n\t\t}\r\n\t}\r\n\treturn dest;\r\n}\r\n\r\nvoid Document::ConvertLineEnds(EndOfLine eolModeSet) {\r\n\tUndoGroup ug(this);\r\n\r\n\tfor (Sci::Position pos = 0; pos < Length(); pos++) {\r\n\t\tconst char ch = cb.CharAt(pos);\r\n\t\tif (ch == '\\r') {\r\n\t\t\tif (cb.CharAt(pos + 1) == '\\n') {\r\n\t\t\t\t// CRLF\r\n\t\t\t\tif (eolModeSet == EndOfLine::Cr) {\r\n\t\t\t\t\tDeleteChars(pos + 1, 1); // Delete the LF\r\n\t\t\t\t} else if (eolModeSet == EndOfLine::Lf) {\r\n\t\t\t\t\tDeleteChars(pos, 1); // Delete the CR\r\n\t\t\t\t} else {\r\n\t\t\t\t\tpos++;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// CR\r\n\t\t\t\tif (eolModeSet == EndOfLine::CrLf) {\r\n\t\t\t\t\tpos += InsertString(pos + 1, \"\\n\", 1); // Insert LF\r\n\t\t\t\t} else if (eolModeSet == EndOfLine::Lf) {\r\n\t\t\t\t\tpos += InsertString(pos, \"\\n\", 1); // Insert LF\r\n\t\t\t\t\tDeleteChars(pos, 1); // Delete CR\r\n\t\t\t\t\tpos--;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (ch == '\\n') {\r\n\t\t\t// LF\r\n\t\t\tif (eolModeSet == EndOfLine::CrLf) {\r\n\t\t\t\tpos += InsertString(pos, \"\\r\", 1); // Insert CR\r\n\t\t\t} else if (eolModeSet == EndOfLine::Cr) {\r\n\t\t\t\tpos += InsertString(pos, \"\\r\", 1); // Insert CR\r\n\t\t\t\tDeleteChars(pos, 1); // Delete LF\r\n\t\t\t\tpos--;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n}\r\n\r\nstd::string_view Document::EOLString() const noexcept {\r\n\tif (eolMode == EndOfLine::CrLf) {\r\n\t\treturn \"\\r\\n\";\r\n\t} else if (eolMode == EndOfLine::Cr) {\r\n\t\treturn \"\\r\";\r\n\t} else {\r\n\t\treturn \"\\n\";\r\n\t}\r\n}\r\n\r\nDocumentOption Document::Options() const noexcept {\r\n\treturn (IsLarge() ? DocumentOption::TextLarge : DocumentOption::Default) |\r\n\t\t(cb.HasStyles() ? DocumentOption::Default : DocumentOption::StylesNone);\r\n}\r\n\r\nbool Document::IsWhiteLine(Sci::Line line) const {\r\n\tSci::Position currentChar = LineStart(line);\r\n\tconst Sci::Position endLine = LineEnd(line);\r\n\twhile (currentChar < endLine) {\r\n\t\tif (!IsSpaceOrTab(cb.CharAt(currentChar))) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t++currentChar;\r\n\t}\r\n\treturn true;\r\n}\r\n\r\nSci::Position Document::ParaUp(Sci::Position pos) const {\r\n\tSci::Line line = SciLineFromPosition(pos);\r\n\tconst Sci::Position start = LineStart(line);\r\n\tif (pos == start) {\r\n\t\tline--;\r\n\t}\r\n\twhile (line >= 0 && IsWhiteLine(line)) { // skip empty lines\r\n\t\tline--;\r\n\t}\r\n\twhile (line >= 0 && !IsWhiteLine(line)) { // skip non-empty lines\r\n\t\tline--;\r\n\t}\r\n\tline++;\r\n\treturn LineStart(line);\r\n}\r\n\r\nSci::Position Document::ParaDown(Sci::Position pos) const {\r\n\tSci::Line line = SciLineFromPosition(pos);\r\n\twhile (line < LinesTotal() && !IsWhiteLine(line)) { // skip non-empty lines\r\n\t\tline++;\r\n\t}\r\n\twhile (line < LinesTotal() && IsWhiteLine(line)) { // skip empty lines\r\n\t\tline++;\r\n\t}\r\n\tif (line < LinesTotal())\r\n\t\treturn LineStart(line);\r\n\telse // end of a document\r\n\t\treturn LineEnd(line-1);\r\n}\r\n\r\nCharacterClass Document::WordCharacterClass(unsigned int ch) const {\r\n\tif (dbcsCodePage && (ch >= 0x80)) {\r\n\t\tif (CpUtf8 == dbcsCodePage) {\r\n\t\t\t// Use hard coded Unicode class\r\n\t\t\tconst CharacterCategory cc = charMap.CategoryFor(ch);\r\n\t\t\tswitch (cc) {\r\n\r\n\t\t\t\t// Separator, Line/Paragraph\r\n\t\t\tcase ccZl:\r\n\t\t\tcase ccZp:\r\n\t\t\t\treturn CharacterClass::newLine;\r\n\r\n\t\t\t\t// Separator, Space\r\n\t\t\tcase ccZs:\r\n\t\t\t\t// Other\r\n\t\t\tcase ccCc:\r\n\t\t\tcase ccCf:\r\n\t\t\tcase ccCs:\r\n\t\t\tcase ccCo:\r\n\t\t\tcase ccCn:\r\n\t\t\t\treturn CharacterClass::space;\r\n\r\n\t\t\t\t// Letter\r\n\t\t\tcase ccLu:\r\n\t\t\tcase ccLl:\r\n\t\t\tcase ccLt:\r\n\t\t\tcase ccLm:\r\n\t\t\tcase ccLo:\r\n\t\t\t\t// Number\r\n\t\t\tcase ccNd:\r\n\t\t\tcase ccNl:\r\n\t\t\tcase ccNo:\r\n\t\t\t\t// Mark - includes combining diacritics\r\n\t\t\tcase ccMn:\r\n\t\t\tcase ccMc:\r\n\t\t\tcase ccMe:\r\n\t\t\t\treturn CharacterClass::word;\r\n\r\n\t\t\t\t// Punctuation\r\n\t\t\tcase ccPc:\r\n\t\t\tcase ccPd:\r\n\t\t\tcase ccPs:\r\n\t\t\tcase ccPe:\r\n\t\t\tcase ccPi:\r\n\t\t\tcase ccPf:\r\n\t\t\tcase ccPo:\r\n\t\t\t\t// Symbol\r\n\t\t\tcase ccSm:\r\n\t\t\tcase ccSc:\r\n\t\t\tcase ccSk:\r\n\t\t\tcase ccSo:\r\n\t\t\t\treturn CharacterClass::punctuation;\r\n\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t// Asian DBCS\r\n\t\t\treturn CharacterClass::word;\r\n\t\t}\r\n\t}\r\n\treturn charClass.GetClass(static_cast<unsigned char>(ch));\r\n}\r\n\r\n/**\r\n * Used by commands that want to select whole words.\r\n * Finds the start of word at pos when delta < 0 or the end of the word when delta >= 0.\r\n */\r\nSci::Position Document::ExtendWordSelect(Sci::Position pos, int delta, bool onlyWordCharacters) const {\r\n\tCharacterClass ccStart = CharacterClass::word;\r\n\tif (delta < 0) {\r\n\t\tif (!onlyWordCharacters) {\r\n\t\t\tconst CharacterExtracted ce = CharacterBefore(pos);\r\n\t\t\tccStart = WordCharacterClass(ce.character);\r\n\t\t}\r\n\t\twhile (pos > 0) {\r\n\t\t\tconst CharacterExtracted ce = CharacterBefore(pos);\r\n\t\t\tif (WordCharacterClass(ce.character) != ccStart)\r\n\t\t\t\tbreak;\r\n\t\t\tpos -= ce.widthBytes;\r\n\t\t}\r\n\t} else {\r\n\t\tif (!onlyWordCharacters && pos < LengthNoExcept()) {\r\n\t\t\tconst CharacterExtracted ce = CharacterAfter(pos);\r\n\t\t\tccStart = WordCharacterClass(ce.character);\r\n\t\t}\r\n\t\twhile (pos < LengthNoExcept()) {\r\n\t\t\tconst CharacterExtracted ce = CharacterAfter(pos);\r\n\t\t\tif (WordCharacterClass(ce.character) != ccStart)\r\n\t\t\t\tbreak;\r\n\t\t\tpos += ce.widthBytes;\r\n\t\t}\r\n\t}\r\n\treturn MovePositionOutsideChar(pos, delta, true);\r\n}\r\n\r\n/**\r\n * Find the start of the next word in either a forward (delta >= 0) or backwards direction\r\n * (delta < 0).\r\n * This is looking for a transition between character classes although there is also some\r\n * additional movement to transit white space.\r\n * Used by cursor movement by word commands.\r\n */\r\nSci::Position Document::NextWordStart(Sci::Position pos, int delta) const {\r\n\tif (delta < 0) {\r\n\t\twhile (pos > 0) {\r\n\t\t\tconst CharacterExtracted ce = CharacterBefore(pos);\r\n\t\t\tif (WordCharacterClass(ce.character) != CharacterClass::space)\r\n\t\t\t\tbreak;\r\n\t\t\tpos -= ce.widthBytes;\r\n\t\t}\r\n\t\tif (pos > 0) {\r\n\t\t\tCharacterExtracted ce = CharacterBefore(pos);\r\n\t\t\tconst CharacterClass ccStart = WordCharacterClass(ce.character);\r\n\t\t\twhile (pos > 0) {\r\n\t\t\t\tce = CharacterBefore(pos);\r\n\t\t\t\tif (WordCharacterClass(ce.character) != ccStart)\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tpos -= ce.widthBytes;\r\n\t\t\t}\r\n\t\t}\r\n\t} else {\r\n\t\tCharacterExtracted ce = CharacterAfter(pos);\r\n\t\tconst CharacterClass ccStart = WordCharacterClass(ce.character);\r\n\t\twhile (pos < LengthNoExcept()) {\r\n\t\t\tce = CharacterAfter(pos);\r\n\t\t\tif (WordCharacterClass(ce.character) != ccStart)\r\n\t\t\t\tbreak;\r\n\t\t\tpos += ce.widthBytes;\r\n\t\t}\r\n\t\twhile (pos < LengthNoExcept()) {\r\n\t\t\tce = CharacterAfter(pos);\r\n\t\t\tif (WordCharacterClass(ce.character) != CharacterClass::space)\r\n\t\t\t\tbreak;\r\n\t\t\tpos += ce.widthBytes;\r\n\t\t}\r\n\t}\r\n\treturn pos;\r\n}\r\n\r\n/**\r\n * Find the end of the next word in either a forward (delta >= 0) or backwards direction\r\n * (delta < 0).\r\n * This is looking for a transition between character classes although there is also some\r\n * additional movement to transit white space.\r\n * Used by cursor movement by word commands.\r\n */\r\nSci::Position Document::NextWordEnd(Sci::Position pos, int delta) const {\r\n\tif (delta < 0) {\r\n\t\tif (pos > 0) {\r\n\t\t\tCharacterExtracted ce = CharacterBefore(pos);\r\n\t\t\tconst CharacterClass ccStart = WordCharacterClass(ce.character);\r\n\t\t\tif (ccStart != CharacterClass::space) {\r\n\t\t\t\twhile (pos > 0) {\r\n\t\t\t\t\tce = CharacterBefore(pos);\r\n\t\t\t\t\tif (WordCharacterClass(ce.character) != ccStart)\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tpos -= ce.widthBytes;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\twhile (pos > 0) {\r\n\t\t\t\tce = CharacterBefore(pos);\r\n\t\t\t\tif (WordCharacterClass(ce.character) != CharacterClass::space)\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tpos -= ce.widthBytes;\r\n\t\t\t}\r\n\t\t}\r\n\t} else {\r\n\t\twhile (pos < LengthNoExcept()) {\r\n\t\t\tconst CharacterExtracted ce = CharacterAfter(pos);\r\n\t\t\tif (WordCharacterClass(ce.character) != CharacterClass::space)\r\n\t\t\t\tbreak;\r\n\t\t\tpos += ce.widthBytes;\r\n\t\t}\r\n\t\tif (pos < LengthNoExcept()) {\r\n\t\t\tCharacterExtracted ce = CharacterAfter(pos);\r\n\t\t\tconst CharacterClass ccStart = WordCharacterClass(ce.character);\r\n\t\t\twhile (pos < LengthNoExcept()) {\r\n\t\t\t\tce = CharacterAfter(pos);\r\n\t\t\t\tif (WordCharacterClass(ce.character) != ccStart)\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tpos += ce.widthBytes;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn pos;\r\n}\r\n\r\nnamespace {\r\n\r\nconstexpr bool IsWordEdge(CharacterClass cc, CharacterClass ccNext) noexcept {\r\n\treturn (cc != ccNext) &&\r\n\t\t(cc == CharacterClass::word || cc == CharacterClass::punctuation);\r\n}\r\n\r\n}\r\n\r\n/**\r\n * Check that the character at the given position is a word or punctuation character and that\r\n * the previous character is of a different character class.\r\n */\r\nbool Document::IsWordStartAt(Sci::Position pos) const {\r\n\tif (pos >= LengthNoExcept())\r\n\t\treturn false;\r\n\tif (pos >= 0) {\r\n\t\tconst CharacterExtracted cePos = CharacterAfter(pos);\r\n\t\t// At start of document, treat as if space before so can be word start\r\n\t\tconst CharacterExtracted cePrev = (pos > 0) ?\r\n\t\t\tCharacterBefore(pos) : CharacterExtracted(' ', 1);\r\n\t\treturn IsWordEdge(WordCharacterClass(cePos.character), WordCharacterClass(cePrev.character));\r\n\t}\r\n\treturn true;\r\n}\r\n\r\n/**\r\n * Check that the character before the given position is a word or punctuation character and that\r\n * the next character is of a different character class.\r\n */\r\nbool Document::IsWordEndAt(Sci::Position pos) const {\r\n\tif (pos <= 0)\r\n\t\treturn false;\r\n\tif (pos <= LengthNoExcept()) {\r\n\t\t// At end of document, treat as if space after so can be word end\r\n\t\tconst CharacterExtracted cePos = (pos < LengthNoExcept()) ?\r\n\t\t\tCharacterAfter(pos) : CharacterExtracted(' ', 1);\r\n\t\tconst CharacterExtracted cePrev = CharacterBefore(pos);\r\n\t\treturn IsWordEdge(WordCharacterClass(cePrev.character), WordCharacterClass(cePos.character));\r\n\t}\r\n\treturn true;\r\n}\r\n\r\n/**\r\n * Check that the given range is has transitions between character classes at both\r\n * ends and where the characters on the inside are word or punctuation characters.\r\n */\r\nbool Document::IsWordAt(Sci::Position start, Sci::Position end) const {\r\n\treturn (start < end) && IsWordStartAt(start) && IsWordEndAt(end);\r\n}\r\n\r\nbool Document::MatchesWordOptions(bool word, bool wordStart, Sci::Position pos, Sci::Position length) const {\r\n\treturn (!word && !wordStart) ||\r\n\t\t\t(word && IsWordAt(pos, pos + length)) ||\r\n\t\t\t(wordStart && IsWordStartAt(pos));\r\n}\r\n\r\nbool Document::HasCaseFolder() const noexcept {\r\n\treturn pcf != nullptr;\r\n}\r\n\r\nvoid Document::SetCaseFolder(std::unique_ptr<CaseFolder> pcf_) noexcept {\r\n\tpcf = std::move(pcf_);\r\n}\r\n\r\nCharacterExtracted Document::ExtractCharacter(Sci::Position position) const noexcept {\r\n\tconst unsigned char leadByte = cb.UCharAt(position);\r\n\tif (UTF8IsAscii(leadByte)) {\r\n\t\t// Common case: ASCII character\r\n\t\treturn CharacterExtracted(leadByte, 1);\r\n\t}\r\n\tconst int widthCharBytes = UTF8BytesOfLead[leadByte];\r\n\tunsigned char charBytes[UTF8MaxBytes] = { leadByte, 0, 0, 0 };\r\n\tfor (int b=1; b<widthCharBytes; b++)\r\n\t\tcharBytes[b] = cb.UCharAt(position + b);\r\n\treturn CharacterExtracted(charBytes, widthCharBytes);\r\n}\r\n\r\nnamespace {\r\n\r\n// Equivalent of memchr over the split view\r\nptrdiff_t SplitFindChar(const SplitView &view, size_t start, size_t length, int ch) noexcept {\r\n\tsize_t range1Length = 0;\r\n\tif (start < view.length1) {\r\n\t\trange1Length = std::min(length, view.length1 - start);\r\n\t\tconst char *match = static_cast<const char *>(memchr(view.segment1 + start, ch, range1Length));\r\n\t\tif (match) {\r\n\t\t\treturn match - view.segment1;\r\n\t\t}\r\n\t\tstart += range1Length;\r\n\t}\r\n\tconst char *match2 = static_cast<const char *>(memchr(view.segment2 + start, ch, length - range1Length));\r\n\tif (match2) {\r\n\t\treturn match2 - view.segment2;\r\n\t}\r\n\treturn -1;\r\n}\r\n\r\n// Equivalent of memcmp over the split view\r\n// This does not call memcmp as search texts are commonly too short to overcome the\r\n// call overhead.\r\nbool SplitMatch(const SplitView &view, size_t start, std::string_view text) noexcept {\r\n\tfor (size_t i = 0; i < text.length(); i++) {\r\n\t\tif (view.CharAt(i + start) != text[i]) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n}\r\n\r\n}\r\n\r\n/**\r\n * Find text in document, supporting both forward and backward\r\n * searches (just pass minPos > maxPos to do a backward search)\r\n * Has not been tested with backwards DBCS searches yet.\r\n */\r\nSci::Position Document::FindText(Sci::Position minPos, Sci::Position maxPos, const char *search,\r\n                        FindOption flags, Sci::Position *length) {\r\n\tif (*length <= 0)\r\n\t\treturn minPos;\r\n\tconst bool caseSensitive = FlagSet(flags, FindOption::MatchCase);\r\n\tconst bool word = FlagSet(flags, FindOption::WholeWord);\r\n\tconst bool wordStart = FlagSet(flags, FindOption::WordStart);\r\n\tconst bool regExp = FlagSet(flags, FindOption::RegExp);\r\n\tif (regExp) {\r\n\t\tif (!regex)\r\n\t\t\tregex = std::unique_ptr<RegexSearchBase>(CreateRegexSearch(&charClass));\r\n\t\treturn regex->FindText(this, minPos, maxPos, search, caseSensitive, word, wordStart, flags, length);\r\n\t} else {\r\n\r\n\t\tconst bool forward = minPos <= maxPos;\r\n\t\tconst int increment = forward ? 1 : -1;\r\n\r\n\t\t// Range endpoints should not be inside DBCS characters, but just in case, move them.\r\n\t\tconst Sci::Position startPos = MovePositionOutsideChar(minPos, increment, false);\r\n\t\tconst Sci::Position endPos = MovePositionOutsideChar(maxPos, increment, false);\r\n\r\n\t\t// Compute actual search ranges needed\r\n\t\tconst Sci::Position lengthFind = *length;\r\n\r\n\t\t//Platform::DebugPrintf(\"Find %d %d %s %d\\n\", startPos, endPos, ft->lpstrText, lengthFind);\r\n\t\tconst Sci::Position limitPos = std::max(startPos, endPos);\r\n\t\tSci::Position pos = startPos;\r\n\t\tif (!forward) {\r\n\t\t\t// Back all of a character\r\n\t\t\tpos = NextPosition(pos, increment);\r\n\t\t}\r\n\t\tconst SplitView cbView = cb.AllView();\r\n\t\tif (caseSensitive) {\r\n\t\t\tconst Sci::Position endSearch = (startPos <= endPos) ? endPos - lengthFind + 1 : endPos;\r\n\t\t\tconst unsigned char charStartSearch =  search[0];\r\n\t\t\tif (forward && ((0 == dbcsCodePage) || (CpUtf8 == dbcsCodePage && !UTF8IsTrailByte(charStartSearch)))) {\r\n\t\t\t\t// This is a fast case where there is no need to test byte values to iterate\r\n\t\t\t\t// so becomes the equivalent of a memchr+memcmp loop.\r\n\t\t\t\t// UTF-8 search will not be self-synchronizing when starts with trail byte\r\n\t\t\t\tconst std::string_view suffix(search + 1, lengthFind - 1);\r\n\t\t\t\twhile (pos < endSearch) {\r\n\t\t\t\t\tpos = SplitFindChar(cbView, pos, limitPos - pos, charStartSearch);\r\n\t\t\t\t\tif (pos < 0) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (SplitMatch(cbView, pos + 1, suffix) && MatchesWordOptions(word, wordStart, pos, lengthFind)) {\r\n\t\t\t\t\t\treturn pos;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tpos++;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\twhile (forward ? (pos < endSearch) : (pos >= endSearch)) {\r\n\t\t\t\t\tconst unsigned char leadByte = cbView.CharAt(pos);\r\n\t\t\t\t\tif (leadByte == charStartSearch) {\r\n\t\t\t\t\t\tbool found = (pos + lengthFind) <= limitPos;\r\n\t\t\t\t\t\t// SplitMatch could be called here but it is slower with g++ -O2\r\n\t\t\t\t\t\tfor (int indexSearch = 1; (indexSearch < lengthFind) && found; indexSearch++) {\r\n\t\t\t\t\t\t\tfound = cbView.CharAt(pos + indexSearch) == search[indexSearch];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (found && MatchesWordOptions(word, wordStart, pos, lengthFind)) {\r\n\t\t\t\t\t\t\treturn pos;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (forward && UTF8IsAscii(leadByte)) {\r\n\t\t\t\t\t\tpos++;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (dbcsCodePage) {\r\n\t\t\t\t\t\t\tif (!NextCharacter(pos, increment)) {\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tpos += increment;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (CpUtf8 == dbcsCodePage) {\r\n\t\t\tconstexpr size_t maxFoldingExpansion = 4;\r\n\t\t\tstd::vector<char> searchThing((lengthFind+1) * UTF8MaxBytes * maxFoldingExpansion + 1);\r\n\t\t\tconst size_t lenSearch =\r\n\t\t\t\tpcf->Fold(&searchThing[0], searchThing.size(), search, lengthFind);\r\n\t\t\twhile (forward ? (pos < endPos) : (pos >= endPos)) {\r\n\t\t\t\tint widthFirstCharacter = 1;\r\n\t\t\t\tSci::Position posIndexDocument = pos;\r\n\t\t\t\tsize_t indexSearch = 0;\r\n\t\t\t\tbool characterMatches = true;\r\n\t\t\t\twhile (indexSearch < lenSearch) {\r\n\t\t\t\t\tconst unsigned char leadByte = cbView.CharAt(posIndexDocument);\r\n\t\t\t\t\tint widthChar = 1;\r\n\t\t\t\t\tsize_t lenFlat = 1;\r\n\t\t\t\t\tif (UTF8IsAscii(leadByte)) {\r\n\t\t\t\t\t\tif ((posIndexDocument + 1) > limitPos) {\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcharacterMatches = searchThing[indexSearch] == MakeLowerCase(leadByte);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tchar bytes[UTF8MaxBytes]{ static_cast<char>(leadByte) };\r\n\t\t\t\t\t\tconst int widthCharBytes = UTF8BytesOfLead[leadByte];\r\n\t\t\t\t\t\tfor (int b = 1; b < widthCharBytes; b++) {\r\n\t\t\t\t\t\t\tbytes[b] = cbView.CharAt(posIndexDocument + b);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\twidthChar = UTF8Classify(bytes, widthCharBytes) & UTF8MaskWidth;\r\n\t\t\t\t\t\tif (!indexSearch) {\t// First character\r\n\t\t\t\t\t\t\twidthFirstCharacter = widthChar;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif ((posIndexDocument + widthChar) > limitPos) {\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tchar folded[UTF8MaxBytes * maxFoldingExpansion + 1];\r\n\t\t\t\t\t\tlenFlat = pcf->Fold(folded, sizeof(folded), bytes, widthChar);\r\n\t\t\t\t\t\t// memcmp may examine lenFlat bytes in both arguments so assert it doesn't read past end of searchThing\r\n\t\t\t\t\t\tassert((indexSearch + lenFlat) <= searchThing.size());\r\n\t\t\t\t\t\t// Does folded match the buffer\r\n\t\t\t\t\t\tcharacterMatches = 0 == memcmp(folded, &searchThing[0] + indexSearch, lenFlat);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!characterMatches) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tposIndexDocument += widthChar;\r\n\t\t\t\t\tindexSearch += lenFlat;\r\n\t\t\t\t}\r\n\t\t\t\tif (characterMatches && (indexSearch == lenSearch)) {\r\n\t\t\t\t\tif (MatchesWordOptions(word, wordStart, pos, posIndexDocument - pos)) {\r\n\t\t\t\t\t\t*length = posIndexDocument - pos;\r\n\t\t\t\t\t\treturn pos;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (forward) {\r\n\t\t\t\t\tpos += widthFirstCharacter;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (!NextCharacter(pos, increment)) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (dbcsCodePage) {\r\n\t\t\tconstexpr size_t maxBytesCharacter = 2;\r\n\t\t\tconstexpr size_t maxFoldingExpansion = 4;\r\n\t\t\tstd::vector<char> searchThing((lengthFind+1) * maxBytesCharacter * maxFoldingExpansion + 1);\r\n\t\t\tconst size_t lenSearch = pcf->Fold(&searchThing[0], searchThing.size(), search, lengthFind);\r\n\t\t\twhile (forward ? (pos < endPos) : (pos >= endPos)) {\r\n\t\t\t\tint widthFirstCharacter = 0;\r\n\t\t\t\tSci::Position indexDocument = 0;\r\n\t\t\t\tsize_t indexSearch = 0;\r\n\t\t\t\tbool characterMatches = true;\r\n\t\t\t\twhile (((pos + indexDocument) < limitPos) &&\r\n\t\t\t\t\t(indexSearch < lenSearch)) {\r\n\t\t\t\t\tconst unsigned char leadByte = cbView.CharAt(pos + indexDocument);\r\n\t\t\t\t\tconst int widthChar = (!UTF8IsAscii(leadByte) && IsDBCSLeadByteNoExcept(leadByte)) ? 2 : 1;\r\n\t\t\t\t\tif (!widthFirstCharacter) {\r\n\t\t\t\t\t\twidthFirstCharacter = widthChar;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ((pos + indexDocument + widthChar) > limitPos) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tsize_t lenFlat = 1;\r\n\t\t\t\t\tif (widthChar == 1) {\r\n\t\t\t\t\t\tcharacterMatches = searchThing[indexSearch] == MakeLowerCase(leadByte);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tconst char bytes[maxBytesCharacter + 1] {\r\n\t\t\t\t\t\t\tstatic_cast<char>(leadByte),\r\n\t\t\t\t\t\t\tcbView.CharAt(pos + indexDocument + 1)\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t\tchar folded[maxBytesCharacter * maxFoldingExpansion + 1];\r\n\t\t\t\t\t\tlenFlat = pcf->Fold(folded, sizeof(folded), bytes, widthChar);\r\n\t\t\t\t\t\t// memcmp may examine lenFlat bytes in both arguments so assert it doesn't read past end of searchThing\r\n\t\t\t\t\t\tassert((indexSearch + lenFlat) <= searchThing.size());\r\n\t\t\t\t\t\t// Does folded match the buffer\r\n\t\t\t\t\t\tcharacterMatches = 0 == memcmp(folded, &searchThing[0] + indexSearch, lenFlat);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!characterMatches) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tindexDocument += widthChar;\r\n\t\t\t\t\tindexSearch += lenFlat;\r\n\t\t\t\t}\r\n\t\t\t\tif (characterMatches && (indexSearch == lenSearch)) {\r\n\t\t\t\t\tif (MatchesWordOptions(word, wordStart, pos, indexDocument)) {\r\n\t\t\t\t\t\t*length = indexDocument;\r\n\t\t\t\t\t\treturn pos;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (forward) {\r\n\t\t\t\t\tpos += widthFirstCharacter;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (!NextCharacter(pos, increment)) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tconst Sci::Position endSearch = (startPos <= endPos) ? endPos - lengthFind + 1 : endPos;\r\n\t\t\tstd::vector<char> searchThing(lengthFind + 1);\r\n\t\t\tpcf->Fold(&searchThing[0], searchThing.size(), search, lengthFind);\r\n\t\t\twhile (forward ? (pos < endSearch) : (pos >= endSearch)) {\r\n\t\t\t\tbool found = (pos + lengthFind) <= limitPos;\r\n\t\t\t\tfor (int indexSearch = 0; (indexSearch < lengthFind) && found; indexSearch++) {\r\n\t\t\t\t\tconst char ch = cbView.CharAt(pos + indexSearch);\r\n\t\t\t\t\tconst char chTest = searchThing[indexSearch];\r\n\t\t\t\t\tif (UTF8IsAscii(ch)) {\r\n\t\t\t\t\t\tfound = chTest == MakeLowerCase(ch);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tchar folded[2];\r\n\t\t\t\t\t\tpcf->Fold(folded, sizeof(folded), &ch, 1);\r\n\t\t\t\t\t\tfound = folded[0] == chTest;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (found && MatchesWordOptions(word, wordStart, pos, lengthFind)) {\r\n\t\t\t\t\treturn pos;\r\n\t\t\t\t}\r\n\t\t\t\tpos += increment;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t//Platform::DebugPrintf(\"Not found\\n\");\r\n\treturn -1;\r\n}\r\n\r\nconst char *Document::SubstituteByPosition(const char *text, Sci::Position *length) {\r\n\tif (regex)\r\n\t\treturn regex->SubstituteByPosition(this, text, length);\r\n\telse\r\n\t\treturn nullptr;\r\n}\r\n\r\nLineCharacterIndexType Document::LineCharacterIndex() const noexcept {\r\n\treturn cb.LineCharacterIndex();\r\n}\r\n\r\nvoid Document::AllocateLineCharacterIndex(LineCharacterIndexType lineCharacterIndex) {\r\n\treturn cb.AllocateLineCharacterIndex(lineCharacterIndex);\r\n}\r\n\r\nvoid Document::ReleaseLineCharacterIndex(LineCharacterIndexType lineCharacterIndex) {\r\n\treturn cb.ReleaseLineCharacterIndex(lineCharacterIndex);\r\n}\r\n\r\nSci::Line Document::LinesTotal() const noexcept {\r\n\treturn cb.Lines();\r\n}\r\n\r\nvoid Document::AllocateLines(Sci::Line lines) {\r\n\tcb.AllocateLines(lines);\r\n}\r\n\r\nvoid Document::SetDefaultCharClasses(bool includeWordClass) {\r\n\tcharClass.SetDefaultCharClasses(includeWordClass);\r\n}\r\n\r\nvoid Document::SetCharClasses(const unsigned char *chars, CharacterClass newCharClass) {\r\n\tcharClass.SetCharClasses(chars, newCharClass);\r\n}\r\n\r\nint Document::GetCharsOfClass(CharacterClass characterClass, unsigned char *buffer) const {\r\n\treturn charClass.GetCharsOfClass(characterClass, buffer);\r\n}\r\n\r\nvoid Document::SetCharacterCategoryOptimization(int countCharacters) {\r\n\tcharMap.Optimize(countCharacters);\r\n}\r\n\r\nint Document::CharacterCategoryOptimization() const noexcept {\r\n\treturn charMap.Size();\r\n}\r\n\r\nvoid SCI_METHOD Document::StartStyling(Sci_Position position) {\r\n\tendStyled = position;\r\n}\r\n\r\nbool SCI_METHOD Document::SetStyleFor(Sci_Position length, char style) {\r\n\tif (enteredStyling != 0) {\r\n\t\treturn false;\r\n\t} else {\r\n\t\tenteredStyling++;\r\n\t\tconst Sci::Position prevEndStyled = endStyled;\r\n\t\tif (cb.SetStyleFor(endStyled, length, style)) {\r\n\t\t\tconst DocModification mh(ModificationFlags::ChangeStyle | ModificationFlags::User,\r\n\t\t\t                   prevEndStyled, length);\r\n\t\t\tNotifyModified(mh);\r\n\t\t}\r\n\t\tendStyled += length;\r\n\t\tenteredStyling--;\r\n\t\treturn true;\r\n\t}\r\n}\r\n\r\nbool SCI_METHOD Document::SetStyles(Sci_Position length, const char *styles) {\r\n\tif (enteredStyling != 0) {\r\n\t\treturn false;\r\n\t} else {\r\n\t\tenteredStyling++;\r\n\t\tbool didChange = false;\r\n\t\tSci::Position startMod = 0;\r\n\t\tSci::Position endMod = 0;\r\n\t\tfor (int iPos = 0; iPos < length; iPos++, endStyled++) {\r\n\t\t\tPLATFORM_ASSERT(endStyled < Length());\r\n\t\t\tif (cb.SetStyleAt(endStyled, styles[iPos])) {\r\n\t\t\t\tif (!didChange) {\r\n\t\t\t\t\tstartMod = endStyled;\r\n\t\t\t\t}\r\n\t\t\t\tdidChange = true;\r\n\t\t\t\tendMod = endStyled;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (didChange) {\r\n\t\t\tconst DocModification mh(ModificationFlags::ChangeStyle | ModificationFlags::User,\r\n\t\t\t                   startMod, endMod - startMod + 1);\r\n\t\t\tNotifyModified(mh);\r\n\t\t}\r\n\t\tenteredStyling--;\r\n\t\treturn true;\r\n\t}\r\n}\r\n\r\nvoid Document::EnsureStyledTo(Sci::Position pos) {\r\n\tif ((enteredStyling == 0) && (pos > GetEndStyled())) {\r\n\t\tIncrementStyleClock();\r\n\t\tif (pli && !pli->UseContainerLexing()) {\r\n\t\t\tconst Sci::Position endStyledTo = LineStartPosition(GetEndStyled());\r\n\t\t\tpli->Colourise(endStyledTo, pos);\r\n\t\t} else {\r\n\t\t\t// Ask the watchers to style, and stop as soon as one responds.\r\n\t\t\tfor (std::vector<WatcherWithUserData>::iterator it = watchers.begin();\r\n\t\t\t\t(pos > GetEndStyled()) && (it != watchers.end()); ++it) {\r\n\t\t\t\tit->watcher->NotifyStyleNeeded(this, it->userData, pos);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid Document::StyleToAdjustingLineDuration(Sci::Position pos) {\r\n\tconst Sci::Position stylingStart = GetEndStyled();\r\n\tElapsedPeriod epStyling;\r\n\tEnsureStyledTo(pos);\r\n\tdurationStyleOneByte.AddSample(pos - stylingStart, epStyling.Duration());\r\n}\r\n\r\nLexInterface *Document::GetLexInterface() const noexcept {\r\n\treturn pli.get();\r\n}\r\n\r\nvoid Document::SetLexInterface(std::unique_ptr<LexInterface> pLexInterface) noexcept {\r\n\tpli = std::move(pLexInterface);\r\n}\r\n\r\nint SCI_METHOD Document::SetLineState(Sci_Position line, int state) {\r\n\tconst int statePrevious = States()->SetLineState(line, state, LinesTotal());\r\n\tif (state != statePrevious) {\r\n\t\tconst DocModification mh(ModificationFlags::ChangeLineState, LineStart(line), 0, 0, nullptr,\r\n\t\t\tstatic_cast<Sci::Line>(line));\r\n\t\tNotifyModified(mh);\r\n\t}\r\n\treturn statePrevious;\r\n}\r\n\r\nint SCI_METHOD Document::GetLineState(Sci_Position line) const {\r\n\treturn States()->GetLineState(line);\r\n}\r\n\r\nSci::Line Document::GetMaxLineState() const noexcept {\r\n\treturn States()->GetMaxLineState();\r\n}\r\n\r\nvoid SCI_METHOD Document::ChangeLexerState(Sci_Position start, Sci_Position end) {\r\n\tconst DocModification mh(ModificationFlags::LexerState, start,\r\n\t\tend-start, 0, nullptr, 0);\r\n\tNotifyModified(mh);\r\n}\r\n\r\nStyledText Document::MarginStyledText(Sci::Line line) const noexcept {\r\n\tconst LineAnnotation *pla = Margins();\r\n\treturn StyledText(pla->Length(line), pla->Text(line),\r\n\t\tpla->MultipleStyles(line), pla->Style(line), pla->Styles(line));\r\n}\r\n\r\nvoid Document::MarginSetText(Sci::Line line, const char *text) {\r\n\tMargins()->SetText(line, text);\r\n\tconst DocModification mh(ModificationFlags::ChangeMargin, LineStart(line),\r\n\t\t0, 0, nullptr, line);\r\n\tNotifyModified(mh);\r\n}\r\n\r\nvoid Document::MarginSetStyle(Sci::Line line, int style) {\r\n\tMargins()->SetStyle(line, style);\r\n\tNotifyModified(DocModification(ModificationFlags::ChangeMargin, LineStart(line),\r\n\t\t0, 0, nullptr, line));\r\n}\r\n\r\nvoid Document::MarginSetStyles(Sci::Line line, const unsigned char *styles) {\r\n\tMargins()->SetStyles(line, styles);\r\n\tNotifyModified(DocModification(ModificationFlags::ChangeMargin, LineStart(line),\r\n\t\t0, 0, nullptr, line));\r\n}\r\n\r\nvoid Document::MarginClearAll() {\r\n\tconst Sci::Line maxEditorLine = LinesTotal();\r\n\tfor (Sci::Line l=0; l<maxEditorLine; l++)\r\n\t\tMarginSetText(l, nullptr);\r\n\t// Free remaining data\r\n\tMargins()->ClearAll();\r\n}\r\n\r\nStyledText Document::AnnotationStyledText(Sci::Line line) const noexcept {\r\n\tconst LineAnnotation *pla = Annotations();\r\n\treturn StyledText(pla->Length(line), pla->Text(line),\r\n\t\tpla->MultipleStyles(line), pla->Style(line), pla->Styles(line));\r\n}\r\n\r\nvoid Document::AnnotationSetText(Sci::Line line, const char *text) {\r\n\tif (line >= 0 && line < LinesTotal()) {\r\n\t\tconst Sci::Line linesBefore = AnnotationLines(line);\r\n\t\tAnnotations()->SetText(line, text);\r\n\t\tconst int linesAfter = AnnotationLines(line);\r\n\t\tDocModification mh(ModificationFlags::ChangeAnnotation, LineStart(line),\r\n\t\t\t0, 0, nullptr, line);\r\n\t\tmh.annotationLinesAdded = linesAfter - linesBefore;\r\n\t\tNotifyModified(mh);\r\n\t}\r\n}\r\n\r\nvoid Document::AnnotationSetStyle(Sci::Line line, int style) {\r\n\tif (line >= 0 && line < LinesTotal()) {\r\n\t\tAnnotations()->SetStyle(line, style);\r\n\t\tconst DocModification mh(ModificationFlags::ChangeAnnotation, LineStart(line),\r\n\t\t\t0, 0, nullptr, line);\r\n\t\tNotifyModified(mh);\r\n\t}\r\n}\r\n\r\nvoid Document::AnnotationSetStyles(Sci::Line line, const unsigned char *styles) {\r\n\tif (line >= 0 && line < LinesTotal()) {\r\n\t\tAnnotations()->SetStyles(line, styles);\r\n\t}\r\n}\r\n\r\nint Document::AnnotationLines(Sci::Line line) const noexcept {\r\n\treturn Annotations()->Lines(line);\r\n}\r\n\r\nvoid Document::AnnotationClearAll() {\r\n\tif (Annotations()->Empty()) {\r\n\t\treturn;\r\n\t}\r\n\tconst Sci::Line maxEditorLine = LinesTotal();\r\n\tfor (Sci::Line l=0; l<maxEditorLine; l++)\r\n\t\tAnnotationSetText(l, nullptr);\r\n\t// Free remaining data\r\n\tAnnotations()->ClearAll();\r\n}\r\n\r\nStyledText Document::EOLAnnotationStyledText(Sci::Line line) const noexcept {\r\n\tconst LineAnnotation *pla = EOLAnnotations();\r\n\treturn StyledText(pla->Length(line), pla->Text(line),\r\n\t\tpla->MultipleStyles(line), pla->Style(line), pla->Styles(line));\r\n}\r\n\r\nvoid Document::EOLAnnotationSetText(Sci::Line line, const char *text) {\r\n\tif (line >= 0 && line < LinesTotal()) {\r\n\t\tEOLAnnotations()->SetText(line, text);\r\n\t\tconst DocModification mh(ModificationFlags::ChangeEOLAnnotation, LineStart(line),\r\n\t\t\t0, 0, nullptr, line);\r\n\t\tNotifyModified(mh);\r\n\t}\r\n}\r\n\r\nvoid Document::EOLAnnotationSetStyle(Sci::Line line, int style) {\r\n\tif (line >= 0 && line < LinesTotal()) {\r\n\t\tEOLAnnotations()->SetStyle(line, style);\r\n\t\tconst DocModification mh(ModificationFlags::ChangeEOLAnnotation, LineStart(line),\r\n\t\t\t0, 0, nullptr, line);\r\n\t\tNotifyModified(mh);\r\n\t}\r\n}\r\n\r\nvoid Document::EOLAnnotationClearAll() {\r\n\tif (EOLAnnotations()->Empty()) {\r\n\t\treturn;\r\n\t}\r\n\tconst Sci::Line maxEditorLine = LinesTotal();\r\n\tfor (Sci::Line l=0; l<maxEditorLine; l++)\r\n\t\tEOLAnnotationSetText(l, nullptr);\r\n\t// Free remaining data\r\n\tEOLAnnotations()->ClearAll();\r\n}\r\n\r\nvoid Document::IncrementStyleClock() noexcept {\r\n\tstyleClock = (styleClock + 1) % 0x100000;\r\n}\r\n\r\nvoid SCI_METHOD Document::DecorationSetCurrentIndicator(int indicator) {\r\n\tdecorations->SetCurrentIndicator(indicator);\r\n}\r\n\r\nvoid SCI_METHOD Document::DecorationFillRange(Sci_Position position, int value, Sci_Position fillLength) {\r\n\tconst FillResult<Sci::Position> fr = decorations->FillRange(\r\n\t\tposition, value, fillLength);\r\n\tif (fr.changed) {\r\n\t\tconst DocModification mh(ModificationFlags::ChangeIndicator | ModificationFlags::User,\r\n\t\t\t\t\t\t\tfr.position, fr.fillLength);\r\n\t\tNotifyModified(mh);\r\n\t}\r\n}\r\n\r\nbool Document::AddWatcher(DocWatcher *watcher, void *userData) {\r\n\tconst WatcherWithUserData wwud(watcher, userData);\r\n\tstd::vector<WatcherWithUserData>::iterator it =\r\n\t\tstd::find(watchers.begin(), watchers.end(), wwud);\r\n\tif (it != watchers.end())\r\n\t\treturn false;\r\n\twatchers.push_back(wwud);\r\n\treturn true;\r\n}\r\n\r\nbool Document::RemoveWatcher(DocWatcher *watcher, void *userData) noexcept {\r\n\ttry {\r\n\t\t// This can never fail as WatcherWithUserData constructor and == are noexcept\r\n\t\t// but std::find is not noexcept.\r\n\t\tstd::vector<WatcherWithUserData>::iterator it =\r\n\t\t\tstd::find(watchers.begin(), watchers.end(), WatcherWithUserData(watcher, userData));\r\n\t\tif (it != watchers.end()) {\r\n\t\t\twatchers.erase(it);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t} catch (...) {\r\n\t\t// Ignore any exception\r\n\t}\r\n\treturn false;\r\n}\r\n\r\nvoid Document::NotifyModifyAttempt() {\r\n\tfor (const WatcherWithUserData &watcher : watchers) {\r\n\t\twatcher.watcher->NotifyModifyAttempt(this, watcher.userData);\r\n\t}\r\n}\r\n\r\nvoid Document::NotifySavePoint(bool atSavePoint) {\r\n\tfor (const WatcherWithUserData &watcher : watchers) {\r\n\t\twatcher.watcher->NotifySavePoint(this, watcher.userData, atSavePoint);\r\n\t}\r\n}\r\n\r\nvoid Document::NotifyModified(DocModification mh) {\r\n\tif (FlagSet(mh.modificationType, ModificationFlags::InsertText)) {\r\n\t\tdecorations->InsertSpace(mh.position, mh.length);\r\n\t} else if (FlagSet(mh.modificationType, ModificationFlags::DeleteText)) {\r\n\t\tdecorations->DeleteRange(mh.position, mh.length);\r\n\t}\r\n\tfor (const WatcherWithUserData &watcher : watchers) {\r\n\t\twatcher.watcher->NotifyModified(this, mh, watcher.userData);\r\n\t}\r\n}\r\n\r\nbool Document::IsWordPartSeparator(unsigned int ch) const {\r\n\treturn (WordCharacterClass(ch) == CharacterClass::word) && IsPunctuation(ch);\r\n}\r\n\r\nSci::Position Document::WordPartLeft(Sci::Position pos) const {\r\n\tif (pos > 0) {\r\n\t\tpos -= CharacterBefore(pos).widthBytes;\r\n\t\tCharacterExtracted ceStart = CharacterAfter(pos);\r\n\t\tif (IsWordPartSeparator(ceStart.character)) {\r\n\t\t\twhile (pos > 0 && IsWordPartSeparator(CharacterAfter(pos).character)) {\r\n\t\t\t\tpos -= CharacterBefore(pos).widthBytes;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (pos > 0) {\r\n\t\t\tceStart = CharacterAfter(pos);\r\n\t\t\tpos -= CharacterBefore(pos).widthBytes;\r\n\t\t\tif (IsLowerCase(ceStart.character)) {\r\n\t\t\t\twhile (pos > 0 && IsLowerCase(CharacterAfter(pos).character))\r\n\t\t\t\t\tpos -= CharacterBefore(pos).widthBytes;\r\n\t\t\t\tif (!IsUpperCase(CharacterAfter(pos).character) && !IsLowerCase(CharacterAfter(pos).character))\r\n\t\t\t\t\tpos += CharacterAfter(pos).widthBytes;\r\n\t\t\t} else if (IsUpperCase(ceStart.character)) {\r\n\t\t\t\twhile (pos > 0 && IsUpperCase(CharacterAfter(pos).character))\r\n\t\t\t\t\tpos -= CharacterBefore(pos).widthBytes;\r\n\t\t\t\tif (!IsUpperCase(CharacterAfter(pos).character))\r\n\t\t\t\t\tpos += CharacterAfter(pos).widthBytes;\r\n\t\t\t} else if (IsADigit(ceStart.character)) {\r\n\t\t\t\twhile (pos > 0 && IsADigit(CharacterAfter(pos).character))\r\n\t\t\t\t\tpos -= CharacterBefore(pos).widthBytes;\r\n\t\t\t\tif (!IsADigit(CharacterAfter(pos).character))\r\n\t\t\t\t\tpos += CharacterAfter(pos).widthBytes;\r\n\t\t\t} else if (IsPunctuation(ceStart.character)) {\r\n\t\t\t\twhile (pos > 0 && IsPunctuation(CharacterAfter(pos).character))\r\n\t\t\t\t\tpos -= CharacterBefore(pos).widthBytes;\r\n\t\t\t\tif (!IsPunctuation(CharacterAfter(pos).character))\r\n\t\t\t\t\tpos += CharacterAfter(pos).widthBytes;\r\n\t\t\t} else if (IsASpace(ceStart.character)) {\r\n\t\t\t\twhile (pos > 0 && IsASpace(CharacterAfter(pos).character))\r\n\t\t\t\t\tpos -= CharacterBefore(pos).widthBytes;\r\n\t\t\t\tif (!IsASpace(CharacterAfter(pos).character))\r\n\t\t\t\t\tpos += CharacterAfter(pos).widthBytes;\r\n\t\t\t} else if (!IsASCII(ceStart.character)) {\r\n\t\t\t\twhile (pos > 0 && !IsASCII(CharacterAfter(pos).character))\r\n\t\t\t\t\tpos -= CharacterBefore(pos).widthBytes;\r\n\t\t\t\tif (IsASCII(CharacterAfter(pos).character))\r\n\t\t\t\t\tpos += CharacterAfter(pos).widthBytes;\r\n\t\t\t} else {\r\n\t\t\t\tpos += CharacterAfter(pos).widthBytes;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn pos;\r\n}\r\n\r\nSci::Position Document::WordPartRight(Sci::Position pos) const {\r\n\tCharacterExtracted ceStart = CharacterAfter(pos);\r\n\tconst Sci::Position length = LengthNoExcept();\r\n\tif (IsWordPartSeparator(ceStart.character)) {\r\n\t\twhile (pos < length && IsWordPartSeparator(CharacterAfter(pos).character))\r\n\t\t\tpos += CharacterAfter(pos).widthBytes;\r\n\t\tceStart = CharacterAfter(pos);\r\n\t}\r\n\tif (!IsASCII(ceStart.character)) {\r\n\t\twhile (pos < length && !IsASCII(CharacterAfter(pos).character))\r\n\t\t\tpos += CharacterAfter(pos).widthBytes;\r\n\t} else if (IsLowerCase(ceStart.character)) {\r\n\t\twhile (pos < length && IsLowerCase(CharacterAfter(pos).character))\r\n\t\t\tpos += CharacterAfter(pos).widthBytes;\r\n\t} else if (IsUpperCase(ceStart.character)) {\r\n\t\tif (IsLowerCase(CharacterAfter(pos + ceStart.widthBytes).character)) {\r\n\t\t\tpos += CharacterAfter(pos).widthBytes;\r\n\t\t\twhile (pos < length && IsLowerCase(CharacterAfter(pos).character))\r\n\t\t\t\tpos += CharacterAfter(pos).widthBytes;\r\n\t\t} else {\r\n\t\t\twhile (pos < length && IsUpperCase(CharacterAfter(pos).character))\r\n\t\t\t\tpos += CharacterAfter(pos).widthBytes;\r\n\t\t}\r\n\t\tif (IsLowerCase(CharacterAfter(pos).character) && IsUpperCase(CharacterBefore(pos).character))\r\n\t\t\tpos -= CharacterBefore(pos).widthBytes;\r\n\t} else if (IsADigit(ceStart.character)) {\r\n\t\twhile (pos < length && IsADigit(CharacterAfter(pos).character))\r\n\t\t\tpos += CharacterAfter(pos).widthBytes;\r\n\t} else if (IsPunctuation(ceStart.character)) {\r\n\t\twhile (pos < length && IsPunctuation(CharacterAfter(pos).character))\r\n\t\t\tpos += CharacterAfter(pos).widthBytes;\r\n\t} else if (IsASpace(ceStart.character)) {\r\n\t\twhile (pos < length && IsASpace(CharacterAfter(pos).character))\r\n\t\t\tpos += CharacterAfter(pos).widthBytes;\r\n\t} else {\r\n\t\tpos += CharacterAfter(pos).widthBytes;\r\n\t}\r\n\treturn pos;\r\n}\r\n\r\nSci::Position Document::ExtendStyleRange(Sci::Position pos, int delta, bool singleLine) noexcept {\r\n\tconst char sStart = cb.StyleAt(pos);\r\n\tif (delta < 0) {\r\n\t\twhile (pos > 0 && (cb.StyleAt(pos) == sStart) && (!singleLine || !IsEOLCharacter(cb.CharAt(pos))))\r\n\t\t\tpos--;\r\n\t\tpos++;\r\n\t} else {\r\n\t\twhile (pos < (LengthNoExcept()) && (cb.StyleAt(pos) == sStart) && (!singleLine || !IsEOLCharacter(cb.CharAt(pos))))\r\n\t\t\tpos++;\r\n\t}\r\n\treturn pos;\r\n}\r\n\r\nstatic char BraceOpposite(char ch) noexcept {\r\n\tswitch (ch) {\r\n\tcase '(':\r\n\t\treturn ')';\r\n\tcase ')':\r\n\t\treturn '(';\r\n\tcase '[':\r\n\t\treturn ']';\r\n\tcase ']':\r\n\t\treturn '[';\r\n\tcase '{':\r\n\t\treturn '}';\r\n\tcase '}':\r\n\t\treturn '{';\r\n\tcase '<':\r\n\t\treturn '>';\r\n\tcase '>':\r\n\t\treturn '<';\r\n\tdefault:\r\n\t\treturn '\\0';\r\n\t}\r\n}\r\n\r\n// TODO: should be able to extend styled region to find matching brace\r\nSci::Position Document::BraceMatch(Sci::Position position, Sci::Position /*maxReStyle*/, Sci::Position startPos, bool useStartPos) noexcept {\r\n\tconst char chBrace = CharAt(position);\r\n\tconst char chSeek = BraceOpposite(chBrace);\r\n\tif (chSeek == '\\0')\r\n\t\treturn - 1;\r\n\tconst int styBrace = StyleIndexAt(position);\r\n\tint direction = -1;\r\n\tif (chBrace == '(' || chBrace == '[' || chBrace == '{' || chBrace == '<')\r\n\t\tdirection = 1;\r\n\tint depth = 1;\r\n\tposition = useStartPos ? startPos : NextPosition(position, direction);\r\n\twhile ((position >= 0) && (position < LengthNoExcept())) {\r\n\t\tconst char chAtPos = CharAt(position);\r\n\t\tconst int styAtPos = StyleIndexAt(position);\r\n\t\tif ((position > GetEndStyled()) || (styAtPos == styBrace)) {\r\n\t\t\tif (chAtPos == chBrace)\r\n\t\t\t\tdepth++;\r\n\t\t\tif (chAtPos == chSeek)\r\n\t\t\t\tdepth--;\r\n\t\t\tif (depth == 0)\r\n\t\t\t\treturn position;\r\n\t\t}\r\n\t\tconst Sci::Position positionBeforeMove = position;\r\n\t\tposition = NextPosition(position, direction);\r\n\t\tif (position == positionBeforeMove)\r\n\t\t\tbreak;\r\n\t}\r\n\treturn - 1;\r\n}\r\n\r\n/**\r\n * Implementation of RegexSearchBase for the default built-in regular expression engine\r\n */\r\nclass BuiltinRegex : public RegexSearchBase {\r\npublic:\r\n\texplicit BuiltinRegex(CharClassify *charClassTable) : search(charClassTable) {}\r\n\r\n\tSci::Position FindText(Document *doc, Sci::Position minPos, Sci::Position maxPos, const char *s,\r\n                        bool caseSensitive, bool word, bool wordStart, FindOption flags,\r\n                        Sci::Position *length) override;\r\n\r\n\tconst char *SubstituteByPosition(Document *doc, const char *text, Sci::Position *length) override;\r\n\r\nprivate:\r\n\tRESearch search;\r\n\tstd::string substituted;\r\n};\r\n\r\nnamespace {\r\n\r\n/**\r\n* RESearchRange keeps track of search range.\r\n*/\r\nclass RESearchRange {\r\npublic:\r\n\tconst Document *doc;\r\n\tint increment;\r\n\tSci::Position startPos;\r\n\tSci::Position endPos;\r\n\tSci::Line lineRangeStart;\r\n\tSci::Line lineRangeEnd;\r\n\tSci::Line lineRangeBreak;\r\n\tRESearchRange(const Document *doc_, Sci::Position minPos, Sci::Position maxPos) noexcept : doc(doc_) {\r\n\t\tincrement = (minPos <= maxPos) ? 1 : -1;\r\n\r\n\t\t// Range endpoints should not be inside DBCS characters or between a CR and LF,\r\n\t\t// but just in case, move them.\r\n\t\tstartPos = doc->MovePositionOutsideChar(minPos, 1, true);\r\n\t\tendPos = doc->MovePositionOutsideChar(maxPos, 1, true);\r\n\r\n\t\tlineRangeStart = doc->SciLineFromPosition(startPos);\r\n\t\tlineRangeEnd = doc->SciLineFromPosition(endPos);\r\n\t\tlineRangeBreak = lineRangeEnd + increment;\r\n\t}\r\n\tRange LineRange(Sci::Line line, Sci::Position lineStartPos, Sci::Position lineEndPos) const noexcept {\r\n\t\tRange range(lineStartPos, lineEndPos);\r\n\t\tif (increment == 1) {\r\n\t\t\tif (line == lineRangeStart)\r\n\t\t\t\trange.start = startPos;\r\n\t\t\tif (line == lineRangeEnd)\r\n\t\t\t\trange.end = endPos;\r\n\t\t} else {\r\n\t\t\tif (line == lineRangeEnd)\r\n\t\t\t\trange.start = endPos;\r\n\t\t\tif (line == lineRangeStart)\r\n\t\t\t\trange.end = startPos;\r\n\t\t}\r\n\t\treturn range;\r\n\t}\r\n};\r\n\r\n// Define a way for the Regular Expression code to access the document\r\nclass DocumentIndexer final : public CharacterIndexer {\r\n\tDocument *pdoc;\r\n\tSci::Position end;\r\npublic:\r\n\tDocumentIndexer(Document *pdoc_, Sci::Position end_) noexcept :\r\n\t\tpdoc(pdoc_), end(end_) {\r\n\t}\r\n\r\n\tchar CharAt(Sci::Position index) const noexcept override {\r\n\t\tif (index < 0 || index >= end)\r\n\t\t\treturn 0;\r\n\t\telse\r\n\t\t\treturn pdoc->CharAt(index);\r\n\t}\r\n\tSci::Position MovePositionOutsideChar(Sci::Position pos, Sci::Position moveDir) const noexcept override {\r\n\t\treturn pdoc->MovePositionOutsideChar(pos, moveDir, false);\r\n\t}\r\n};\r\n\r\n#ifndef NO_CXX11_REGEX\r\n\r\nclass ByteIterator {\r\npublic:\r\n\tusing iterator_category = std::bidirectional_iterator_tag;\r\n\tusing value_type = char;\r\n\tusing difference_type = ptrdiff_t;\r\n\tusing pointer = char*;\r\n\tusing reference = char&;\r\n\r\n\tconst Document *doc;\r\n\tSci::Position position;\r\n\r\n\texplicit ByteIterator(const Document *doc_=nullptr, Sci::Position position_=0) noexcept :\r\n\t\tdoc(doc_), position(position_) {\r\n\t}\r\n\tchar operator*() const noexcept {\r\n\t\treturn doc->CharAt(position);\r\n\t}\r\n\tByteIterator &operator++() noexcept {\r\n\t\tposition++;\r\n\t\treturn *this;\r\n\t}\r\n\tByteIterator operator++(int) noexcept {\r\n\t\tByteIterator retVal(*this);\r\n\t\tposition++;\r\n\t\treturn retVal;\r\n\t}\r\n\tByteIterator &operator--() noexcept {\r\n\t\tposition--;\r\n\t\treturn *this;\r\n\t}\r\n\tbool operator==(const ByteIterator &other) const noexcept {\r\n\t\treturn doc == other.doc && position == other.position;\r\n\t}\r\n\tbool operator!=(const ByteIterator &other) const noexcept {\r\n\t\treturn doc != other.doc || position != other.position;\r\n\t}\r\n\tSci::Position Pos() const noexcept {\r\n\t\treturn position;\r\n\t}\r\n\tSci::Position PosRoundUp() const noexcept {\r\n\t\treturn position;\r\n\t}\r\n};\r\n\r\n// On Windows, wchar_t is 16 bits wide and on Unix it is 32 bits wide.\r\n// Would be better to use sizeof(wchar_t) or similar to differentiate\r\n// but easier for now to hard-code platforms.\r\n// C++11 has char16_t and char32_t but neither Clang nor Visual C++\r\n// appear to allow specializing basic_regex over these.\r\n\r\n#ifdef _WIN32\r\n#define WCHAR_T_IS_16 1\r\n#else\r\n#define WCHAR_T_IS_16 0\r\n#endif\r\n\r\n#if WCHAR_T_IS_16\r\n\r\n// On Windows, report non-BMP characters as 2 separate surrogates as that\r\n// matches wregex since it is based on wchar_t.\r\nclass UTF8Iterator {\r\n\t// These 3 fields determine the iterator position and are used for comparisons\r\n\tconst Document *doc;\r\n\tSci::Position position;\r\n\tsize_t characterIndex;\r\n\t// Remaining fields are derived from the determining fields so are excluded in comparisons\r\n\tunsigned int lenBytes;\r\n\tsize_t lenCharacters;\r\n\twchar_t buffered[2];\r\npublic:\r\n\tusing iterator_category = std::bidirectional_iterator_tag;\r\n\tusing value_type = wchar_t;\r\n\tusing difference_type = ptrdiff_t;\r\n\tusing pointer = wchar_t*;\r\n\tusing reference = wchar_t&;\r\n\r\n\texplicit UTF8Iterator(const Document *doc_=nullptr, Sci::Position position_=0) noexcept :\r\n\t\tdoc(doc_), position(position_), characterIndex(0), lenBytes(0), lenCharacters(0), buffered{} {\r\n\t\tbuffered[0] = 0;\r\n\t\tbuffered[1] = 0;\r\n\t\tif (doc) {\r\n\t\t\tReadCharacter();\r\n\t\t}\r\n\t}\r\n\twchar_t operator*() const noexcept {\r\n\t\tassert(lenCharacters != 0);\r\n\t\treturn buffered[characterIndex];\r\n\t}\r\n\tUTF8Iterator &operator++() noexcept {\r\n\t\tif ((characterIndex + 1) < (lenCharacters)) {\r\n\t\t\tcharacterIndex++;\r\n\t\t} else {\r\n\t\t\tposition += lenBytes;\r\n\t\t\tReadCharacter();\r\n\t\t\tcharacterIndex = 0;\r\n\t\t}\r\n\t\treturn *this;\r\n\t}\r\n\tUTF8Iterator operator++(int) noexcept {\r\n\t\tUTF8Iterator retVal(*this);\r\n\t\tif ((characterIndex + 1) < (lenCharacters)) {\r\n\t\t\tcharacterIndex++;\r\n\t\t} else {\r\n\t\t\tposition += lenBytes;\r\n\t\t\tReadCharacter();\r\n\t\t\tcharacterIndex = 0;\r\n\t\t}\r\n\t\treturn retVal;\r\n\t}\r\n\tUTF8Iterator &operator--() noexcept {\r\n\t\tif (characterIndex) {\r\n\t\t\tcharacterIndex--;\r\n\t\t} else {\r\n\t\t\tposition = doc->NextPosition(position, -1);\r\n\t\t\tReadCharacter();\r\n\t\t\tcharacterIndex = lenCharacters - 1;\r\n\t\t}\r\n\t\treturn *this;\r\n\t}\r\n\tbool operator==(const UTF8Iterator &other) const noexcept {\r\n\t\t// Only test the determining fields, not the character widths and values derived from this\r\n\t\treturn doc == other.doc &&\r\n\t\t\tposition == other.position &&\r\n\t\t\tcharacterIndex == other.characterIndex;\r\n\t}\r\n\tbool operator!=(const UTF8Iterator &other) const noexcept {\r\n\t\t// Only test the determining fields, not the character widths and values derived from this\r\n\t\treturn doc != other.doc ||\r\n\t\t\tposition != other.position ||\r\n\t\t\tcharacterIndex != other.characterIndex;\r\n\t}\r\n\tSci::Position Pos() const noexcept {\r\n\t\treturn position;\r\n\t}\r\n\tSci::Position PosRoundUp() const noexcept {\r\n\t\tif (characterIndex)\r\n\t\t\treturn position + lenBytes;\t// Force to end of character\r\n\t\telse\r\n\t\t\treturn position;\r\n\t}\r\nprivate:\r\n\tvoid ReadCharacter() noexcept {\r\n\t\tconst CharacterExtracted charExtracted = doc->ExtractCharacter(position);\r\n\t\tlenBytes = charExtracted.widthBytes;\r\n\t\tif (charExtracted.character == unicodeReplacementChar) {\r\n\t\t\tlenCharacters = 1;\r\n\t\t\tbuffered[0] = static_cast<wchar_t>(charExtracted.character);\r\n\t\t} else {\r\n\t\t\tlenCharacters = UTF16FromUTF32Character(charExtracted.character, buffered);\r\n\t\t}\r\n\t}\r\n};\r\n\r\n#else\r\n\r\n// On Unix, report non-BMP characters as single characters\r\n\r\nclass UTF8Iterator {\r\n\tconst Document *doc;\r\n\tSci::Position position;\r\npublic:\r\n\tusing iterator_category = std::bidirectional_iterator_tag;\r\n\tusing value_type = wchar_t;\r\n\tusing difference_type = ptrdiff_t;\r\n\tusing pointer = wchar_t*;\r\n\tusing reference = wchar_t&;\r\n\r\n\texplicit UTF8Iterator(const Document *doc_=nullptr, Sci::Position position_=0) noexcept :\r\n\t\tdoc(doc_), position(position_) {\r\n\t}\r\n\twchar_t operator*() const noexcept {\r\n\t\tconst CharacterExtracted charExtracted = doc->ExtractCharacter(position);\r\n\t\treturn charExtracted.character;\r\n\t}\r\n\tUTF8Iterator &operator++() noexcept {\r\n\t\tposition = doc->NextPosition(position, 1);\r\n\t\treturn *this;\r\n\t}\r\n\tUTF8Iterator operator++(int) noexcept {\r\n\t\tUTF8Iterator retVal(*this);\r\n\t\tposition = doc->NextPosition(position, 1);\r\n\t\treturn retVal;\r\n\t}\r\n\tUTF8Iterator &operator--() noexcept {\r\n\t\tposition = doc->NextPosition(position, -1);\r\n\t\treturn *this;\r\n\t}\r\n\tbool operator==(const UTF8Iterator &other) const noexcept {\r\n\t\treturn doc == other.doc && position == other.position;\r\n\t}\r\n\tbool operator!=(const UTF8Iterator &other) const noexcept {\r\n\t\treturn doc != other.doc || position != other.position;\r\n\t}\r\n\tSci::Position Pos() const noexcept {\r\n\t\treturn position;\r\n\t}\r\n\tSci::Position PosRoundUp() const noexcept {\r\n\t\treturn position;\r\n\t}\r\n};\r\n\r\n#endif\r\n\r\nstd::regex_constants::match_flag_type MatchFlags(const Document *doc, Sci::Position startPos, Sci::Position endPos, Sci::Position lineStartPos, Sci::Position lineEndPos) {\r\n\tstd::regex_constants::match_flag_type flagsMatch = std::regex_constants::match_default;\r\n\tif (startPos != lineStartPos) {\r\n#ifdef _LIBCPP_VERSION\r\n\t\tflagsMatch |= std::regex_constants::match_not_bol;\r\n\t\tif (!doc->IsWordStartAt(startPos)) {\r\n\t\t\tflagsMatch |= std::regex_constants::match_not_bow;\r\n\t\t}\r\n#else\r\n\t\tflagsMatch |= std::regex_constants::match_prev_avail;\r\n#endif\r\n\t}\r\n\tif (endPos != lineEndPos) {\r\n\t\tflagsMatch |= std::regex_constants::match_not_eol;\r\n\t\tif (!doc->IsWordEndAt(endPos)) {\r\n\t\t\tflagsMatch |= std::regex_constants::match_not_eow;\r\n\t\t}\r\n\t}\r\n\treturn flagsMatch;\r\n}\r\n\r\ntemplate<typename Iterator, typename Regex>\r\nbool MatchOnLines(const Document *doc, const Regex &regexp, const RESearchRange &resr, RESearch &search) {\r\n\tstd::match_results<Iterator> match;\r\n\r\n\t// MSVC and libc++ have problems with ^ and $ matching line ends inside a range.\r\n\t// CRLF line ends are also a problem as ^ and $ only treat LF as a line end.\r\n\t// The std::regex::multiline option was added to C++17 to improve behaviour but\r\n\t// has not been implemented by compiler runtimes with MSVC always in multiline\r\n\t// mode and libc++ and libstdc++ always in single-line mode.\r\n\t// If multiline regex worked well then the line by line iteration could be removed\r\n\t// for the forwards case and replaced with the following:\r\n#ifdef REGEX_MULTILINE\r\n\tconst Sci::Position lineStartPos = doc->LineStart(resr.lineRangeStart);\r\n\tconst Sci::Position lineEndPos = doc->LineEnd(resr.lineRangeEnd);\r\n\tIterator itStart(doc, resr.startPos);\r\n\tIterator itEnd(doc, resr.endPos);\r\n\tconst std::regex_constants::match_flag_type flagsMatch = MatchFlags(doc, resr.startPos, resr.endPos, lineStartPos, lineEndPos);\r\n\tconst bool matched = std::regex_search(itStart, itEnd, match, regexp, flagsMatch);\r\n#else\r\n\t// Line by line.\r\n\tbool matched = false;\r\n\tfor (Sci::Line line = resr.lineRangeStart; line != resr.lineRangeBreak; line += resr.increment) {\r\n\t\tconst Sci::Position lineStartPos = doc->LineStart(line);\r\n\t\tconst Sci::Position lineEndPos = doc->LineEnd(line);\r\n\t\tconst Range lineRange = resr.LineRange(line, lineStartPos, lineEndPos);\r\n\t\tIterator itStart(doc, lineRange.start);\r\n\t\tIterator itEnd(doc, lineRange.end);\r\n\t\tconst std::regex_constants::match_flag_type flagsMatch = MatchFlags(doc, lineRange.start, lineRange.end, lineStartPos, lineEndPos);\r\n\t\tstd::regex_iterator<Iterator> it(itStart, itEnd, regexp, flagsMatch);\r\n\t\tfor (const std::regex_iterator<Iterator> last; it != last; ++it) {\r\n\t\t\tmatch = *it;\r\n\t\t\tmatched = true;\r\n\t\t\tif (resr.increment > 0) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (matched) {\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n#endif\r\n\tif (matched) {\r\n\t\tfor (size_t co = 0; co < match.size() && co < RESearch::MAXTAG; co++) {\r\n\t\t\tsearch.bopat[co] = match[co].first.Pos();\r\n\t\t\tsearch.eopat[co] = match[co].second.PosRoundUp();\r\n\t\t}\r\n\t}\r\n\treturn matched;\r\n}\r\n\r\nSci::Position Cxx11RegexFindText(const Document *doc, Sci::Position minPos, Sci::Position maxPos, const char *s,\r\n\tbool caseSensitive, Sci::Position *length, RESearch &search) {\r\n\tconst RESearchRange resr(doc, minPos, maxPos);\r\n\ttry {\r\n\t\t//ElapsedPeriod ep;\r\n\t\tstd::regex::flag_type flagsRe = std::regex::ECMAScript;\r\n\t\t// Flags that appear to have no effect:\r\n\t\t// | std::regex::collate | std::regex::extended;\r\n\t\tif (!caseSensitive)\r\n\t\t\tflagsRe = flagsRe | std::regex::icase;\r\n\r\n#if defined(REGEX_MULTILINE) && !defined(_MSC_VER)\r\n\t\tflagsRe = flagsRe | std::regex::multiline;\r\n#endif\r\n\r\n\t\t// Clear the RESearch so can fill in matches\r\n\t\tsearch.Clear();\r\n\r\n\t\tbool matched = false;\r\n\t\tif (CpUtf8 == doc->dbcsCodePage) {\r\n\t\t\tconst std::wstring ws = WStringFromUTF8(s);\r\n\t\t\tstd::wregex regexp;\r\n\t\t\tregexp.assign(ws, flagsRe);\r\n\t\t\tmatched = MatchOnLines<UTF8Iterator>(doc, regexp, resr, search);\r\n\t\t} else {\r\n\t\t\tstd::regex regexp;\r\n\t\t\tregexp.assign(s, flagsRe);\r\n\t\t\tmatched = MatchOnLines<ByteIterator>(doc, regexp, resr, search);\r\n\t\t}\r\n\r\n\t\tSci::Position posMatch = -1;\r\n\t\tif (matched) {\r\n\t\t\tposMatch = search.bopat[0];\r\n\t\t\t*length = search.eopat[0] - search.bopat[0];\r\n\t\t}\r\n\t\t// Example - search in doc/ScintillaHistory.html for\r\n\t\t// [[:upper:]]eta[[:space:]]\r\n\t\t// On MacBook, normally around 1 second but with locale imbued -> 14 seconds.\r\n\t\t//const double durSearch = ep.Duration(true);\r\n\t\t//Platform::DebugPrintf(\"Search:%9.6g \\n\", durSearch);\r\n\t\treturn posMatch;\r\n\t} catch (std::regex_error &) {\r\n\t\t// Failed to create regular expression\r\n\t\tthrow RegexError();\r\n\t} catch (...) {\r\n\t\t// Failed in some other way\r\n\t\treturn -1;\r\n\t}\r\n}\r\n\r\n#endif\r\n\r\n}\r\n\r\nSci::Position BuiltinRegex::FindText(Document *doc, Sci::Position minPos, Sci::Position maxPos, const char *s,\r\n                        bool caseSensitive, bool, bool, FindOption flags,\r\n                        Sci::Position *length) {\r\n\r\n#ifndef NO_CXX11_REGEX\r\n\tif (FlagSet(flags, FindOption::Cxx11RegEx)) {\r\n\t\t\treturn Cxx11RegexFindText(doc, minPos, maxPos, s,\r\n\t\t\tcaseSensitive, length, search);\r\n\t}\r\n#endif\r\n\r\n\tconst RESearchRange resr(doc, minPos, maxPos);\r\n\r\n\tconst bool posix = FlagSet(flags, FindOption::Posix);\r\n\r\n\tconst char *errmsg = search.Compile(s, *length, caseSensitive, posix);\r\n\tif (errmsg) {\r\n\t\treturn -1;\r\n\t}\r\n\t// Find a variable in a property file: \\$(\\([A-Za-z0-9_.]+\\))\r\n\t// Replace first '.' with '-' in each property file variable reference:\r\n\t//     Search: \\$(\\([A-Za-z0-9_-]+\\)\\.\\([A-Za-z0-9_.]+\\))\r\n\t//     Replace: $(\\1-\\2)\r\n\tSci::Position pos = -1;\r\n\tSci::Position lenRet = 0;\r\n\tconst bool searchforLineStart = s[0] == '^';\r\n\tconst char searchEnd = s[*length - 1];\r\n\tconst char searchEndPrev = (*length > 1) ? s[*length - 2] : '\\0';\r\n\tconst bool searchforLineEnd = (searchEnd == '$') && (searchEndPrev != '\\\\');\r\n\tfor (Sci::Line line = resr.lineRangeStart; line != resr.lineRangeBreak; line += resr.increment) {\r\n\t\tconst Sci::Position lineStartPos = doc->LineStart(line);\r\n\t\tconst Sci::Position lineEndPos = doc->LineEnd(line);\r\n\t\tSci::Position startOfLine = lineStartPos;\r\n\t\tSci::Position endOfLine = lineEndPos;\r\n\t\tif (resr.increment == 1) {\r\n\t\t\tif (line == resr.lineRangeStart) {\r\n\t\t\t\tif ((resr.startPos != startOfLine) && searchforLineStart)\r\n\t\t\t\t\tcontinue;\t// Can't match start of line if start position after start of line\r\n\t\t\t\tstartOfLine = resr.startPos;\r\n\t\t\t}\r\n\t\t\tif (line == resr.lineRangeEnd) {\r\n\t\t\t\tif ((resr.endPos != endOfLine) && searchforLineEnd)\r\n\t\t\t\t\tcontinue;\t// Can't match end of line if end position before end of line\r\n\t\t\t\tendOfLine = resr.endPos;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (line == resr.lineRangeEnd) {\r\n\t\t\t\tif ((resr.endPos != startOfLine) && searchforLineStart)\r\n\t\t\t\t\tcontinue;\t// Can't match start of line if end position after start of line\r\n\t\t\t\tstartOfLine = resr.endPos;\r\n\t\t\t}\r\n\t\t\tif (line == resr.lineRangeStart) {\r\n\t\t\t\tif ((resr.startPos != endOfLine) && searchforLineEnd)\r\n\t\t\t\t\tcontinue;\t// Can't match end of line if start position before end of line\r\n\t\t\t\tendOfLine = resr.startPos;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tconst DocumentIndexer di(doc, endOfLine);\r\n\t\tsearch.SetLineRange(lineStartPos, lineEndPos);\r\n\t\tint success = search.Execute(di, startOfLine, endOfLine);\r\n\t\tif (success) {\r\n\t\t\tSci::Position endPos = search.eopat[0];\r\n\t\t\t// There can be only one start of a line, so no need to look for last match in line\r\n\t\t\tif ((resr.increment == -1) && !searchforLineStart) {\r\n\t\t\t\t// Check for the last match on this line.\r\n\t\t\t\twhile (success && (endPos < endOfLine)) {\r\n\t\t\t\t\tconst RESearch::MatchPositions bopat = search.bopat;\r\n\t\t\t\t\tconst RESearch::MatchPositions eopat = search.eopat;\r\n\t\t\t\t\tpos = endPos;\r\n\t\t\t\t\tif (pos == bopat[0]) {\r\n\t\t\t\t\t\t// empty match\r\n\t\t\t\t\t\tpos = doc->NextPosition(pos, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tsuccess = search.Execute(di, pos, endOfLine);\r\n\t\t\t\t\tif (success) {\r\n\t\t\t\t\t\tendPos = search.eopat[0];\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tsearch.bopat = bopat;\r\n\t\t\t\t\t\tsearch.eopat = eopat;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tpos = search.bopat[0];\r\n\t\t\tlenRet = endPos - pos;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\t*length = lenRet;\r\n\treturn pos;\r\n}\r\n\r\nconst char *BuiltinRegex::SubstituteByPosition(Document *doc, const char *text, Sci::Position *length) {\r\n\tsubstituted.clear();\r\n\tfor (Sci::Position j = 0; j < *length; j++) {\r\n\t\tif (text[j] == '\\\\') {\r\n\t\t\tconst char chNext = text[++j];\r\n\t\t\tif (chNext >= '0' && chNext <= '9') {\r\n\t\t\t\tconst unsigned int patNum = chNext - '0';\r\n\t\t\t\tconst Sci::Position startPos = search.bopat[patNum];\r\n\t\t\t\tconst Sci::Position len = search.eopat[patNum] - startPos;\r\n\t\t\t\tif (len > 0) {\t// Will be null if try for a match that did not occur\r\n\t\t\t\t\tconst size_t size = substituted.length();\r\n\t\t\t\t\tsubstituted.resize(size + len);\r\n\t\t\t\t\tdoc->GetCharRange(substituted.data() + size, startPos, len);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tswitch (chNext) {\r\n\t\t\t\tcase 'a':\r\n\t\t\t\t\tsubstituted.push_back('\\a');\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'b':\r\n\t\t\t\t\tsubstituted.push_back('\\b');\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'f':\r\n\t\t\t\t\tsubstituted.push_back('\\f');\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'n':\r\n\t\t\t\t\tsubstituted.push_back('\\n');\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'r':\r\n\t\t\t\t\tsubstituted.push_back('\\r');\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 't':\r\n\t\t\t\t\tsubstituted.push_back('\\t');\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'v':\r\n\t\t\t\t\tsubstituted.push_back('\\v');\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase '\\\\':\r\n\t\t\t\t\tsubstituted.push_back('\\\\');\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tsubstituted.push_back('\\\\');\r\n\t\t\t\t\tj--;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tsubstituted.push_back(text[j]);\r\n\t\t}\r\n\t}\r\n\t*length = substituted.length();\r\n\treturn substituted.c_str();\r\n}\r\n\r\n#ifndef SCI_OWNREGEX\r\n\r\nRegexSearchBase *Scintilla::Internal::CreateRegexSearch(CharClassify *charClassTable) {\r\n\treturn new BuiltinRegex(charClassTable);\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/src/Document.h",
    "content": "// Scintilla source code edit control\r\n/** @file Document.h\r\n ** Text document that handles notifications, DBCS, styling, words and end of line.\r\n **/\r\n// Copyright 1998-2011 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef DOCUMENT_H\r\n#define DOCUMENT_H\r\n\r\nnamespace Scintilla::Internal {\r\n\r\nclass DocWatcher;\r\nclass DocModification;\r\nclass Document;\r\nclass LineMarkers;\r\nclass LineLevels;\r\nclass LineState;\r\nclass LineAnnotation;\r\n\r\nenum class EncodingFamily { eightBit, unicode, dbcs };\r\n\r\n/**\r\n * The range class represents a range of text in a document.\r\n * The two values are not sorted as one end may be more significant than the other\r\n * as is the case for the selection where the end position is the position of the caret.\r\n * If either position is invalidPosition then the range is invalid and most operations will fail.\r\n */\r\nclass Range {\r\npublic:\r\n\tSci::Position start;\r\n\tSci::Position end;\r\n\r\n\texplicit Range(Sci::Position pos=0) noexcept :\r\n\t\tstart(pos), end(pos) {\r\n\t}\r\n\tRange(Sci::Position start_, Sci::Position end_) noexcept :\r\n\t\tstart(start_), end(end_) {\r\n\t}\r\n\r\n\tbool operator==(const Range &other) const noexcept {\r\n\t\treturn (start == other.start) && (end == other.end);\r\n\t}\r\n\r\n\tbool Valid() const noexcept {\r\n\t\treturn (start != Sci::invalidPosition) && (end != Sci::invalidPosition);\r\n\t}\r\n\r\n\t[[nodiscard]] bool Empty() const noexcept {\r\n\t\treturn start == end;\r\n\t}\r\n\r\n\t[[nodiscard]] Sci::Position Length() const noexcept {\r\n\t\treturn (start <= end) ? (end - start) : (start - end);\r\n\t}\r\n\r\n\tSci::Position First() const noexcept {\r\n\t\treturn (start <= end) ? start : end;\r\n\t}\r\n\r\n\tSci::Position Last() const noexcept {\r\n\t\treturn (start > end) ? start : end;\r\n\t}\r\n\r\n\t// Is the position within the range?\r\n\tbool Contains(Sci::Position pos) const noexcept {\r\n\t\tif (start < end) {\r\n\t\t\treturn (pos >= start && pos <= end);\r\n\t\t} else {\r\n\t\t\treturn (pos <= start && pos >= end);\r\n\t\t}\r\n\t}\r\n\r\n\t// Is the character after pos within the range?\r\n\tbool ContainsCharacter(Sci::Position pos) const noexcept {\r\n\t\tif (start < end) {\r\n\t\t\treturn (pos >= start && pos < end);\r\n\t\t} else {\r\n\t\t\treturn (pos < start && pos >= end);\r\n\t\t}\r\n\t}\r\n\r\n\tbool Contains(Range other) const noexcept {\r\n\t\treturn Contains(other.start) && Contains(other.end);\r\n\t}\r\n\r\n\tbool Overlaps(Range other) const noexcept {\r\n\t\treturn\r\n\t\tContains(other.start) ||\r\n\t\tContains(other.end) ||\r\n\t\tother.Contains(start) ||\r\n\t\tother.Contains(end);\r\n\t}\r\n};\r\n\r\n/**\r\n * Interface class for regular expression searching\r\n */\r\nclass RegexSearchBase {\r\npublic:\r\n\tvirtual ~RegexSearchBase() = default;\r\n\r\n\tvirtual Sci::Position FindText(Document *doc, Sci::Position minPos, Sci::Position maxPos, const char *s,\r\n                        bool caseSensitive, bool word, bool wordStart, Scintilla::FindOption flags, Sci::Position *length) = 0;\r\n\r\n\t///@return String with the substitutions, must remain valid until the next call or destruction\r\n\tvirtual const char *SubstituteByPosition(Document *doc, const char *text, Sci::Position *length) = 0;\r\n};\r\n\r\n/// Factory function for RegexSearchBase\r\nextern RegexSearchBase *CreateRegexSearch(CharClassify *charClassTable);\r\n\r\nstruct StyledText {\r\n\tsize_t length;\r\n\tconst char *text;\r\n\tbool multipleStyles;\r\n\tsize_t style;\r\n\tconst unsigned char *styles;\r\n\tStyledText(size_t length_, const char *text_, bool multipleStyles_, int style_, const unsigned char *styles_) noexcept :\r\n\t\tlength(length_), text(text_), multipleStyles(multipleStyles_), style(style_), styles(styles_) {\r\n\t}\r\n\t// Return number of bytes from start to before '\\n' or end of text.\r\n\t// Return 1 when start is outside text\r\n\tsize_t LineLength(size_t start) const noexcept {\r\n\t\tsize_t cur = start;\r\n\t\twhile ((cur < length) && (text[cur] != '\\n'))\r\n\t\t\tcur++;\r\n\t\treturn cur-start;\r\n\t}\r\n\tsize_t StyleAt(size_t i) const noexcept {\r\n\t\treturn multipleStyles ? styles[i] : style;\r\n\t}\r\n};\r\n\r\nclass HighlightDelimiter {\r\npublic:\r\n\tHighlightDelimiter() noexcept : isEnabled(false) {\r\n\t\tClear();\r\n\t}\r\n\r\n\tvoid Clear() noexcept {\r\n\t\tbeginFoldBlock = -1;\r\n\t\tendFoldBlock = -1;\r\n\t\tfirstChangeableLineBefore = -1;\r\n\t\tfirstChangeableLineAfter = -1;\r\n\t}\r\n\r\n\tbool NeedsDrawing(Sci::Line line) const noexcept {\r\n\t\treturn isEnabled && (line <= firstChangeableLineBefore || line >= firstChangeableLineAfter);\r\n\t}\r\n\r\n\tbool IsFoldBlockHighlighted(Sci::Line line) const noexcept {\r\n\t\treturn isEnabled && beginFoldBlock != -1 && beginFoldBlock <= line && line <= endFoldBlock;\r\n\t}\r\n\r\n\tbool IsHeadOfFoldBlock(Sci::Line line) const noexcept {\r\n\t\treturn beginFoldBlock == line && line < endFoldBlock;\r\n\t}\r\n\r\n\tbool IsBodyOfFoldBlock(Sci::Line line) const noexcept {\r\n\t\treturn beginFoldBlock != -1 && beginFoldBlock < line && line < endFoldBlock;\r\n\t}\r\n\r\n\tbool IsTailOfFoldBlock(Sci::Line line) const noexcept {\r\n\t\treturn beginFoldBlock != -1 && beginFoldBlock < line && line == endFoldBlock;\r\n\t}\r\n\r\n\tSci::Line beginFoldBlock;\t// Begin of current fold block\r\n\tSci::Line endFoldBlock;\t// End of current fold block\r\n\tSci::Line firstChangeableLineBefore;\t// First line that triggers repaint before starting line that determined current fold block\r\n\tSci::Line firstChangeableLineAfter;\t// First line that triggers repaint after starting line that determined current fold block\r\n\tbool isEnabled;\r\n};\r\n\r\nstruct LexerReleaser {\r\n\t// Called by unique_ptr to destroy/free the Resource\r\n\tvoid operator()(Scintilla::ILexer5 *pLexer) noexcept {\r\n\t\tif (pLexer) {\r\n\t\t\ttry {\r\n\t\t\t\tpLexer->Release();\r\n\t\t\t} catch (...) {\r\n\t\t\t\t// ILexer5::Release must not throw, ignore if it does.\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\n\r\nusing LexerInstance = std::unique_ptr<Scintilla::ILexer5, LexerReleaser>;\r\n\r\n// LexInterface defines the interface to ILexer used in Document.\r\n// The LexState subclass is actually created and that is used within ScintillaBase\r\n// to provide more methods that are exposed through Scintilla's external API.\r\nclass LexInterface {\r\nprotected:\r\n\tDocument *pdoc;\r\n\tLexerInstance instance;\r\n\tbool performingStyle;\t///< Prevent reentrance\r\npublic:\r\n\texplicit LexInterface(Document *pdoc_) noexcept;\r\n\t// Deleted so LexInterface objects can not be copied.\r\n\tLexInterface(const LexInterface &) = delete;\r\n\tLexInterface(LexInterface &&) = delete;\r\n\tLexInterface &operator=(const LexInterface &) = delete;\r\n\tLexInterface &operator=(LexInterface &&) = delete;\r\n\tvirtual ~LexInterface() noexcept;\r\n\tvoid SetInstance(ILexer5 *instance_) noexcept;\r\n\tvoid Colourise(Sci::Position start, Sci::Position end);\r\n\tvirtual Scintilla::LineEndType LineEndTypesSupported();\r\n\tbool UseContainerLexing() const noexcept;\r\n};\r\n\r\nstruct RegexError : public std::runtime_error {\r\n\tRegexError() : std::runtime_error(\"regex failure\") {}\r\n};\r\n\r\n/**\r\n * The ActionDuration class stores the average time taken for some action such as styling or\r\n * wrapping a line. It is used to decide how many repetitions of that action can be performed\r\n * on idle to maximize efficiency without affecting application responsiveness.\r\n * The duration changes if the time for the action changes. For example, if a simple lexer is\r\n * changed to a complex lexer. Changes are damped and clamped to avoid short periods of easy\r\n * or difficult processing moving the value too far leading to inefficiency or poor user\r\n * experience.\r\n */\r\n\r\nclass ActionDuration {\r\n\tdouble duration;\r\n\tconst double minDuration;\r\n\tconst double maxDuration;\r\npublic:\r\n\tActionDuration(double duration_, double minDuration_, double maxDuration_) noexcept;\r\n\tvoid AddSample(size_t numberActions, double durationOfActions) noexcept;\r\n\tdouble Duration() const noexcept;\r\n\tsize_t ActionsInAllowedTime(double secondsAllowed) const noexcept;\r\n};\r\n\r\n/**\r\n * A whole character (code point) with a value and width in bytes.\r\n * For UTF-8, the value is the code point value.\r\n * For DBCS, its jamming the lead and trail bytes together.\r\n * For 8 bit encodings, is just the byte value.\r\n */\r\nstruct CharacterExtracted {\r\n\tunsigned int character;\r\n\tunsigned int widthBytes;\r\n\r\n\tCharacterExtracted(unsigned int character_, unsigned int widthBytes_) noexcept :\r\n\t\tcharacter(character_), widthBytes(widthBytes_) {\r\n\t}\r\n\r\n\t// For UTF-8:\r\n\tCharacterExtracted(const unsigned char *charBytes, size_t widthCharBytes) noexcept;\r\n\r\n\t// For DBCS characters turn 2 bytes into an int\r\n\tstatic CharacterExtracted DBCS(unsigned char lead, unsigned char trail) noexcept {\r\n\t\treturn CharacterExtracted((lead << 8) | trail, 2);\r\n\t}\r\n};\r\n\r\n/**\r\n */\r\nclass Document : PerLine, public Scintilla::IDocument, public Scintilla::ILoader, public Scintilla::IDocumentEditable {\r\n\r\npublic:\r\n\t/** Used to pair watcher pointer with user data. */\r\n\tstruct WatcherWithUserData {\r\n\t\tDocWatcher *watcher;\r\n\t\tvoid *userData;\r\n\t\tWatcherWithUserData(DocWatcher *watcher_=nullptr, void *userData_=nullptr) noexcept :\r\n\t\t\twatcher(watcher_), userData(userData_) {\r\n\t\t}\r\n\t\tbool operator==(const WatcherWithUserData &other) const noexcept {\r\n\t\t\treturn (watcher == other.watcher) && (userData == other.userData);\r\n\t\t}\r\n\t};\r\n\r\nprivate:\r\n\tint refCount;\r\n\tCellBuffer cb;\r\n\tCharClassify charClass;\r\n\tCharacterCategoryMap charMap;\r\n\tstd::unique_ptr<CaseFolder> pcf;\r\n\tSci::Position endStyled;\r\n\tint styleClock;\r\n\tint enteredModification;\r\n\tint enteredStyling;\r\n\tint enteredReadOnlyCount;\r\n\r\n\tbool insertionSet;\r\n\tstd::string insertion;\r\n\r\n\tstd::vector<WatcherWithUserData> watchers;\r\n\r\n\t// ldSize is not real data - it is for dimensions and loops\r\n\tenum lineData { ldMarkers, ldLevels, ldState, ldMargin, ldAnnotation, ldEOLAnnotation, ldSize };\r\n\tstd::unique_ptr<PerLine> perLineData[ldSize];\r\n\tLineMarkers *Markers() const noexcept;\r\n\tLineLevels *Levels() const noexcept;\r\n\tLineState *States() const noexcept;\r\n\tLineAnnotation *Margins() const noexcept;\r\n\tLineAnnotation *Annotations() const noexcept;\r\n\tLineAnnotation *EOLAnnotations() const noexcept;\r\n\r\n\tbool matchesValid;\r\n\tstd::unique_ptr<RegexSearchBase> regex;\r\n\tstd::unique_ptr<LexInterface> pli;\r\n\r\npublic:\r\n\r\n\tScintilla::EndOfLine eolMode;\r\n\t/// Can also be SC_CP_UTF8 to enable UTF-8 mode\r\n\tint dbcsCodePage;\r\n\tScintilla::LineEndType lineEndBitSet;\r\n\tint tabInChars;\r\n\tint indentInChars;\r\n\tint actualIndentInChars;\r\n\tbool useTabs;\r\n\tbool tabIndents;\r\n\tbool backspaceUnindents;\r\n\tActionDuration durationStyleOneByte;\r\n\r\n\tstd::unique_ptr<IDecorationList> decorations;\r\n\r\n\tDocument(Scintilla::DocumentOption options);\r\n\t// Deleted so Document objects can not be copied.\r\n\tDocument(const Document &) = delete;\r\n\tDocument(Document &&) = delete;\r\n\tvoid operator=(const Document &) = delete;\r\n\tDocument &operator=(Document &&) = delete;\r\n\t~Document() override;\r\n\r\n\tint SCI_METHOD AddRef() noexcept override;\r\n\tint SCI_METHOD Release() override;\r\n\r\n\t// From PerLine\r\n\tvoid Init() override;\r\n\tvoid InsertLine(Sci::Line line) override;\r\n\tvoid InsertLines(Sci::Line line, Sci::Line lines) override;\r\n\tvoid RemoveLine(Sci::Line line) override;\r\n\r\n\tScintilla::LineEndType LineEndTypesSupported() const;\r\n\tbool SetDBCSCodePage(int dbcsCodePage_);\r\n\tScintilla::LineEndType GetLineEndTypesAllowed() const noexcept { return cb.GetLineEndTypes(); }\r\n\tbool SetLineEndTypesAllowed(Scintilla::LineEndType lineEndBitSet_);\r\n\tScintilla::LineEndType GetLineEndTypesActive() const noexcept { return cb.GetLineEndTypes(); }\r\n\r\n\tint SCI_METHOD Version() const override {\r\n\t\treturn Scintilla::dvRelease4;\r\n\t}\r\n\tint SCI_METHOD DEVersion() const noexcept override;\r\n\r\n\tvoid SCI_METHOD SetErrorStatus(int status) override;\r\n\r\n\tSci_Position SCI_METHOD LineFromPosition(Sci_Position pos) const override;\r\n\tSci::Line SciLineFromPosition(Sci::Position pos) const noexcept;\t// Avoids casting LineFromPosition\r\n\tSci::Position ClampPositionIntoDocument(Sci::Position pos) const noexcept;\r\n\tbool ContainsLineEnd(const char *s, Sci::Position length) const noexcept { return cb.ContainsLineEnd(s, length); }\r\n\tbool IsCrLf(Sci::Position pos) const noexcept;\r\n\tint LenChar(Sci::Position pos) const noexcept;\r\n\tbool InGoodUTF8(Sci::Position pos, Sci::Position &start, Sci::Position &end) const noexcept;\r\n\tSci::Position MovePositionOutsideChar(Sci::Position pos, Sci::Position moveDir, bool checkLineEnd=true) const noexcept;\r\n\tSci::Position NextPosition(Sci::Position pos, int moveDir) const noexcept;\r\n\tbool NextCharacter(Sci::Position &pos, int moveDir) const noexcept;\t// Returns true if pos changed\r\n\tCharacterExtracted CharacterAfter(Sci::Position position) const noexcept;\r\n\tCharacterExtracted CharacterBefore(Sci::Position position) const noexcept;\r\n\tSci_Position SCI_METHOD GetRelativePosition(Sci_Position positionStart, Sci_Position characterOffset) const override;\r\n\tSci::Position GetRelativePositionUTF16(Sci::Position positionStart, Sci::Position characterOffset) const noexcept;\r\n\tint SCI_METHOD GetCharacterAndWidth(Sci_Position position, Sci_Position *pWidth) const override;\r\n\tint SCI_METHOD CodePage() const override;\r\n\tbool SCI_METHOD IsDBCSLeadByte(char ch) const override;\r\n\tbool IsDBCSLeadByteNoExcept(char ch) const noexcept;\r\n\tbool IsDBCSTrailByteNoExcept(char ch) const noexcept;\r\n\tint DBCSDrawBytes(std::string_view text) const noexcept;\r\n\tbool IsDBCSDualByteAt(Sci::Position pos) const noexcept;\r\n\tsize_t SafeSegment(std::string_view text) const noexcept;\r\n\tEncodingFamily CodePageFamily() const noexcept;\r\n\r\n\t// Gateways to modifying document\r\n\tvoid ModifiedAt(Sci::Position pos) noexcept;\r\n\tvoid CheckReadOnly();\r\n\tvoid TrimReplacement(std::string_view &text, Range &range) const noexcept;\r\n\tbool DeleteChars(Sci::Position pos, Sci::Position len);\r\n\tSci::Position InsertString(Sci::Position position, const char *s, Sci::Position insertLength);\r\n\tSci::Position InsertString(Sci::Position position, std::string_view sv);\r\n\tvoid ChangeInsertion(const char *s, Sci::Position length);\r\n\tint SCI_METHOD AddData(const char *data, Sci_Position length) override;\r\n\tIDocumentEditable *AsDocumentEditable() noexcept;\r\n\tvoid *SCI_METHOD ConvertToDocument() override;\r\n\tSci::Position Undo();\r\n\tSci::Position Redo();\r\n\tbool CanUndo() const noexcept { return cb.CanUndo(); }\r\n\tbool CanRedo() const noexcept { return cb.CanRedo(); }\r\n\tvoid DeleteUndoHistory() noexcept { cb.DeleteUndoHistory(); }\r\n\tbool SetUndoCollection(bool collectUndo) noexcept {\r\n\t\treturn cb.SetUndoCollection(collectUndo);\r\n\t}\r\n\tbool IsCollectingUndo() const noexcept { return cb.IsCollectingUndo(); }\r\n\tvoid BeginUndoAction(bool coalesceWithPrior=false) noexcept { cb.BeginUndoAction(coalesceWithPrior); }\r\n\tvoid EndUndoAction() noexcept { cb.EndUndoAction(); }\r\n\tvoid AddUndoAction(Sci::Position token, bool mayCoalesce) { cb.AddUndoAction(token, mayCoalesce); }\r\n\tvoid SetSavePoint();\r\n\tbool IsSavePoint() const noexcept { return cb.IsSavePoint(); }\r\n\r\n\tvoid TentativeStart() noexcept { cb.TentativeStart(); }\r\n\tvoid TentativeCommit() noexcept { cb.TentativeCommit(); }\r\n\tvoid TentativeUndo();\r\n\tbool TentativeActive() const noexcept { return cb.TentativeActive(); }\r\n\r\n\tint UndoActions() const noexcept;\r\n\tvoid SetUndoSavePoint(int action) noexcept;\r\n\tint UndoSavePoint() const noexcept;\r\n\tvoid SetUndoDetach(int action) noexcept;\r\n\tint UndoDetach() const noexcept;\r\n\tvoid SetUndoTentative(int action) noexcept;\r\n\tint UndoTentative() const noexcept;\r\n\tvoid SetUndoCurrent(int action);\r\n\tint UndoCurrent() const noexcept;\r\n\tint UndoActionType(int action) const noexcept;\r\n\tSci::Position UndoActionPosition(int action) const noexcept;\r\n\tstd::string_view UndoActionText(int action) const noexcept;\r\n\tvoid PushUndoActionType(int type, Sci::Position position);\r\n\tvoid ChangeLastUndoActionText(size_t length, const char *text);\r\n\r\n\tvoid ChangeHistorySet(bool set) { cb.ChangeHistorySet(set); }\r\n\t[[nodiscard]] int EditionAt(Sci::Position pos) const noexcept { return cb.EditionAt(pos); }\r\n\t[[nodiscard]] Sci::Position EditionEndRun(Sci::Position pos) const noexcept { return cb.EditionEndRun(pos); }\r\n\t[[nodiscard]] unsigned int EditionDeletesAt(Sci::Position pos) const noexcept { return cb.EditionDeletesAt(pos); }\r\n\t[[nodiscard]] Sci::Position EditionNextDelete(Sci::Position pos) const noexcept { return cb.EditionNextDelete(pos); }\r\n\r\n\tconst char *SCI_METHOD BufferPointer() override { return cb.BufferPointer(); }\r\n\tconst char *RangePointer(Sci::Position position, Sci::Position rangeLength) noexcept { return cb.RangePointer(position, rangeLength); }\r\n\tSci::Position GapPosition() const noexcept { return cb.GapPosition(); }\r\n\r\n\tint SCI_METHOD GetLineIndentation(Sci_Position line) override;\r\n\tSci::Position SetLineIndentation(Sci::Line line, Sci::Position indent);\r\n\tSci::Position GetLineIndentPosition(Sci::Line line) const;\r\n\tSci::Position GetColumn(Sci::Position pos) const;\r\n\tSci::Position CountCharacters(Sci::Position startPos, Sci::Position endPos) const noexcept;\r\n\tSci::Position CountUTF16(Sci::Position startPos, Sci::Position endPos) const noexcept;\r\n\tSci::Position FindColumn(Sci::Line line, Sci::Position column);\r\n\tvoid Indent(bool forwards, Sci::Line lineBottom, Sci::Line lineTop);\r\n\tstatic std::string TransformLineEnds(const char *s, size_t len, Scintilla::EndOfLine eolModeWanted);\r\n\tvoid ConvertLineEnds(Scintilla::EndOfLine eolModeSet);\r\n\tstd::string_view EOLString() const noexcept;\r\n\tvoid SetReadOnly(bool set) noexcept { cb.SetReadOnly(set); }\r\n\tbool IsReadOnly() const noexcept { return cb.IsReadOnly(); }\r\n\tbool IsLarge() const noexcept { return cb.IsLarge(); }\r\n\tScintilla::DocumentOption Options() const noexcept;\r\n\r\n\tvoid DelChar(Sci::Position pos);\r\n\tvoid DelCharBack(Sci::Position pos);\r\n\r\n\tchar CharAt(Sci::Position position) const noexcept { return cb.CharAt(position); }\r\n\tvoid SCI_METHOD GetCharRange(char *buffer, Sci_Position position, Sci_Position lengthRetrieve) const override {\r\n\t\tcb.GetCharRange(buffer, position, lengthRetrieve);\r\n\t}\r\n\tchar SCI_METHOD StyleAt(Sci_Position position) const override { return cb.StyleAt(position); }\r\n\tchar StyleAtNoExcept(Sci_Position position) const noexcept { return cb.StyleAt(position); }\r\n\tint StyleIndexAt(Sci_Position position) const noexcept { return static_cast<unsigned char>(cb.StyleAt(position)); }\r\n\tvoid GetStyleRange(unsigned char *buffer, Sci::Position position, Sci::Position lengthRetrieve) const {\r\n\t\tcb.GetStyleRange(buffer, position, lengthRetrieve);\r\n\t}\r\n\tint GetMark(Sci::Line line, bool includeChangeHistory) const;\r\n\tSci::Line MarkerNext(Sci::Line lineStart, int mask) const noexcept;\r\n\tint AddMark(Sci::Line line, int markerNum);\r\n\tvoid AddMarkSet(Sci::Line line, int valueSet);\r\n\tvoid DeleteMark(Sci::Line line, int markerNum);\r\n\tvoid DeleteMarkFromHandle(int markerHandle);\r\n\tvoid DeleteAllMarks(int markerNum);\r\n\tSci::Line LineFromHandle(int markerHandle) const noexcept;\r\n\tint MarkerNumberFromLine(Sci::Line line, int which) const noexcept;\r\n\tint MarkerHandleFromLine(Sci::Line line, int which) const noexcept;\r\n\tSci_Position SCI_METHOD LineStart(Sci_Position line) const override;\r\n\t[[nodiscard]] Range LineRange(Sci::Line line) const noexcept;\r\n\tbool IsLineStartPosition(Sci::Position position) const noexcept;\r\n\tSci_Position SCI_METHOD LineEnd(Sci_Position line) const override;\r\n\tSci::Position LineStartPosition(Sci::Position position) const noexcept;\r\n\tSci::Position LineEndPosition(Sci::Position position) const noexcept;\r\n\tbool IsLineEndPosition(Sci::Position position) const noexcept;\r\n\tbool IsPositionInLineEnd(Sci::Position position) const noexcept;\r\n\tSci::Position VCHomePosition(Sci::Position position) const;\r\n\tSci::Position IndexLineStart(Sci::Line line, Scintilla::LineCharacterIndexType lineCharacterIndex) const noexcept;\r\n\tSci::Line LineFromPositionIndex(Sci::Position pos, Scintilla::LineCharacterIndexType lineCharacterIndex) const noexcept;\r\n\tSci::Line LineFromPositionAfter(Sci::Line line, Sci::Position length) const noexcept;\r\n\r\n\tint SCI_METHOD SetLevel(Sci_Position line, int level) override;\r\n\tint SCI_METHOD GetLevel(Sci_Position line) const override;\r\n\tScintilla::FoldLevel GetFoldLevel(Sci_Position line) const noexcept;\r\n\tvoid ClearLevels();\r\n\tSci::Line GetLastChild(Sci::Line lineParent, std::optional<Scintilla::FoldLevel> level = {}, Sci::Line lastLine = -1);\r\n\tSci::Line GetFoldParent(Sci::Line line) const noexcept;\r\n\tvoid GetHighlightDelimiters(HighlightDelimiter &highlightDelimiter, Sci::Line line, Sci::Line lastLine);\r\n\r\n\tSci::Position ExtendWordSelect(Sci::Position pos, int delta, bool onlyWordCharacters=false) const;\r\n\tSci::Position NextWordStart(Sci::Position pos, int delta) const;\r\n\tSci::Position NextWordEnd(Sci::Position pos, int delta) const;\r\n\tSci_Position SCI_METHOD Length() const override { return cb.Length(); }\r\n\tSci::Position LengthNoExcept() const noexcept { return cb.Length(); }\r\n\tvoid Allocate(Sci::Position newSize) { cb.Allocate(newSize); }\r\n\r\n\tCharacterExtracted ExtractCharacter(Sci::Position position) const noexcept;\r\n\r\n\tbool IsWordStartAt(Sci::Position pos) const;\r\n\tbool IsWordEndAt(Sci::Position pos) const;\r\n\tbool IsWordAt(Sci::Position start, Sci::Position end) const;\r\n\r\n\tbool MatchesWordOptions(bool word, bool wordStart, Sci::Position pos, Sci::Position length) const;\r\n\tbool HasCaseFolder() const noexcept;\r\n\tvoid SetCaseFolder(std::unique_ptr<CaseFolder> pcf_) noexcept;\r\n\tSci::Position FindText(Sci::Position minPos, Sci::Position maxPos, const char *search, Scintilla::FindOption flags, Sci::Position *length);\r\n\tconst char *SubstituteByPosition(const char *text, Sci::Position *length);\r\n\tScintilla::LineCharacterIndexType LineCharacterIndex() const noexcept;\r\n\tvoid AllocateLineCharacterIndex(Scintilla::LineCharacterIndexType lineCharacterIndex);\r\n\tvoid ReleaseLineCharacterIndex(Scintilla::LineCharacterIndexType lineCharacterIndex);\r\n\tSci::Line LinesTotal() const noexcept;\r\n\tvoid AllocateLines(Sci::Line lines);\r\n\r\n\tvoid SetDefaultCharClasses(bool includeWordClass);\r\n\tvoid SetCharClasses(const unsigned char *chars, CharacterClass newCharClass);\r\n\tint GetCharsOfClass(CharacterClass characterClass, unsigned char *buffer) const;\r\n\tvoid SetCharacterCategoryOptimization(int countCharacters);\r\n\tint CharacterCategoryOptimization() const noexcept;\r\n\tvoid SCI_METHOD StartStyling(Sci_Position position) override;\r\n\tbool SCI_METHOD SetStyleFor(Sci_Position length, char style) override;\r\n\tbool SCI_METHOD SetStyles(Sci_Position length, const char *styles) override;\r\n\tSci::Position GetEndStyled() const noexcept { return endStyled; }\r\n\tvoid EnsureStyledTo(Sci::Position pos);\r\n\tvoid StyleToAdjustingLineDuration(Sci::Position pos);\r\n\tint GetStyleClock() const noexcept { return styleClock; }\r\n\tvoid IncrementStyleClock() noexcept;\r\n\tvoid SCI_METHOD DecorationSetCurrentIndicator(int indicator) override;\r\n\tvoid SCI_METHOD DecorationFillRange(Sci_Position position, int value, Sci_Position fillLength) override;\r\n\tLexInterface *GetLexInterface() const noexcept;\r\n\tvoid SetLexInterface(std::unique_ptr<LexInterface> pLexInterface) noexcept;\r\n\r\n\tint SCI_METHOD SetLineState(Sci_Position line, int state) override;\r\n\tint SCI_METHOD GetLineState(Sci_Position line) const override;\r\n\tSci::Line GetMaxLineState() const noexcept;\r\n\tvoid SCI_METHOD ChangeLexerState(Sci_Position start, Sci_Position end) override;\r\n\r\n\tStyledText MarginStyledText(Sci::Line line) const noexcept;\r\n\tvoid MarginSetStyle(Sci::Line line, int style);\r\n\tvoid MarginSetStyles(Sci::Line line, const unsigned char *styles);\r\n\tvoid MarginSetText(Sci::Line line, const char *text);\r\n\tvoid MarginClearAll();\r\n\r\n\tStyledText AnnotationStyledText(Sci::Line line) const noexcept;\r\n\tvoid AnnotationSetText(Sci::Line line, const char *text);\r\n\tvoid AnnotationSetStyle(Sci::Line line, int style);\r\n\tvoid AnnotationSetStyles(Sci::Line line, const unsigned char *styles);\r\n\tint AnnotationLines(Sci::Line line) const noexcept;\r\n\tvoid AnnotationClearAll();\r\n\r\n\tStyledText EOLAnnotationStyledText(Sci::Line line) const noexcept;\r\n\tvoid EOLAnnotationSetStyle(Sci::Line line, int style);\r\n\tvoid EOLAnnotationSetText(Sci::Line line, const char *text);\r\n\tvoid EOLAnnotationClearAll();\r\n\r\n\tbool AddWatcher(DocWatcher *watcher, void *userData);\r\n\tbool RemoveWatcher(DocWatcher *watcher, void *userData) noexcept;\r\n\r\n\tCharacterClass WordCharacterClass(unsigned int ch) const;\r\n\tbool IsWordPartSeparator(unsigned int ch) const;\r\n\tSci::Position WordPartLeft(Sci::Position pos) const;\r\n\tSci::Position WordPartRight(Sci::Position pos) const;\r\n\tSci::Position ExtendStyleRange(Sci::Position pos, int delta, bool singleLine) noexcept;\r\n\tbool IsWhiteLine(Sci::Line line) const;\r\n\tSci::Position ParaUp(Sci::Position pos) const;\r\n\tSci::Position ParaDown(Sci::Position pos) const;\r\n\tint IndentSize() const noexcept { return actualIndentInChars; }\r\n\tSci::Position BraceMatch(Sci::Position position, Sci::Position maxReStyle, Sci::Position startPos, bool useStartPos) noexcept;\r\n\r\nprivate:\r\n\tvoid NotifyModifyAttempt();\r\n\tvoid NotifySavePoint(bool atSavePoint);\r\n\tvoid NotifyModified(DocModification mh);\r\n};\r\n\r\nclass UndoGroup {\r\n\tDocument *pdoc;\r\n\tbool groupNeeded;\r\npublic:\r\n\tUndoGroup(Document *pdoc_, bool groupNeeded_=true) noexcept :\r\n\t\tpdoc(pdoc_), groupNeeded(groupNeeded_) {\r\n\t\tif (groupNeeded) {\r\n\t\t\tpdoc->BeginUndoAction();\r\n\t\t}\r\n\t}\r\n\t// Deleted so UndoGroup objects can not be copied.\r\n\tUndoGroup(const UndoGroup &) = delete;\r\n\tUndoGroup(UndoGroup &&) = delete;\r\n\tvoid operator=(const UndoGroup &) = delete;\r\n\tUndoGroup &operator=(UndoGroup &&) = delete;\r\n\t~UndoGroup() {\r\n\t\tif (groupNeeded) {\r\n\t\t\t// EndUndoAction can throw as it allocates but throw in destructor is fatal.\r\n\t\t\t// To fix this UndoHistory should allocate any memory needed by EndUndoAction\r\n\t\t\t// beforehand or change EndUndoAction to not require allocation.\r\n\t\t\tpdoc->EndUndoAction();\r\n\t\t}\r\n\t}\r\n\tbool Needed() const noexcept {\r\n\t\treturn groupNeeded;\r\n\t}\r\n};\r\n\r\n\r\n/**\r\n * To optimise processing of document modifications by DocWatchers, a hint is passed indicating the\r\n * scope of the change.\r\n * If the DocWatcher is a document view then this can be used to optimise screen updating.\r\n */\r\nclass DocModification {\r\npublic:\r\n\tScintilla::ModificationFlags modificationType;\r\n\tSci::Position position;\r\n\tSci::Position length;\r\n\tSci::Line linesAdded;\t/**< Negative if lines deleted. */\r\n\tconst char *text;\t/**< Only valid for changes to text, not for changes to style. */\r\n\tSci::Line line;\r\n\tScintilla::FoldLevel foldLevelNow;\r\n\tScintilla::FoldLevel foldLevelPrev;\r\n\tSci::Line annotationLinesAdded;\r\n\tSci::Position token;\r\n\r\n\tDocModification(Scintilla::ModificationFlags modificationType_, Sci::Position position_=0, Sci::Position length_=0,\r\n\t\tSci::Line linesAdded_=0, const char *text_=nullptr, Sci::Line line_=0) noexcept :\r\n\t\tmodificationType(modificationType_),\r\n\t\tposition(position_),\r\n\t\tlength(length_),\r\n\t\tlinesAdded(linesAdded_),\r\n\t\ttext(text_),\r\n\t\tline(line_),\r\n\t\tfoldLevelNow(Scintilla::FoldLevel::None),\r\n\t\tfoldLevelPrev(Scintilla::FoldLevel::None),\r\n\t\tannotationLinesAdded(0),\r\n\t\ttoken(0) {}\r\n\r\n\tDocModification(Scintilla::ModificationFlags modificationType_, const Action &act, Sci::Line linesAdded_=0) noexcept :\r\n\t\tmodificationType(modificationType_),\r\n\t\tposition(act.position),\r\n\t\tlength(act.lenData),\r\n\t\tlinesAdded(linesAdded_),\r\n\t\ttext(act.data),\r\n\t\tline(0),\r\n\t\tfoldLevelNow(Scintilla::FoldLevel::None),\r\n\t\tfoldLevelPrev(Scintilla::FoldLevel::None),\r\n\t\tannotationLinesAdded(0),\r\n\t\ttoken(0) {}\r\n};\r\n\r\n/**\r\n * A class that wants to receive notifications from a Document must be derived from DocWatcher\r\n * and implement the notification methods. It can then be added to the watcher list with AddWatcher.\r\n */\r\nclass DocWatcher {\r\npublic:\r\n\tvirtual ~DocWatcher() {}\r\n\r\n\tvirtual void NotifyModifyAttempt(Document *doc, void *userData) = 0;\r\n\tvirtual void NotifySavePoint(Document *doc, void *userData, bool atSavePoint) = 0;\r\n\tvirtual void NotifyModified(Document *doc, DocModification mh, void *userData) = 0;\r\n\tvirtual void NotifyDeleted(Document *doc, void *userData) noexcept = 0;\r\n\tvirtual void NotifyStyleNeeded(Document *doc, void *userData, Sci::Position endPos) = 0;\r\n\tvirtual void NotifyErrorOccurred(Document *doc, void *userData, Scintilla::Status status) = 0;\r\n};\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/src/EditModel.cxx",
    "content": "// Scintilla source code edit control\r\n/** @file EditModel.cxx\r\n ** Defines the editor state that must be visible to EditorView.\r\n **/\r\n// Copyright 1998-2014 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#include <cstddef>\r\n#include <cstdlib>\r\n#include <cstdint>\r\n#include <cassert>\r\n#include <cstring>\r\n#include <cmath>\r\n#include <cstdint>\r\n\r\n#include <stdexcept>\r\n#include <string>\r\n#include <string_view>\r\n#include <vector>\r\n#include <map>\r\n#include <set>\r\n#include <optional>\r\n#include <algorithm>\r\n#include <memory>\r\n\r\n#include \"ScintillaTypes.h\"\r\n#include \"ILoader.h\"\r\n#include \"ILexer.h\"\r\n\r\n#include \"Debugging.h\"\r\n#include \"Geometry.h\"\r\n#include \"Platform.h\"\r\n\r\n#include \"CharacterCategoryMap.h\"\r\n\r\n#include \"Position.h\"\r\n#include \"UniqueString.h\"\r\n#include \"SplitVector.h\"\r\n#include \"Partitioning.h\"\r\n#include \"RunStyles.h\"\r\n#include \"ContractionState.h\"\r\n#include \"CellBuffer.h\"\r\n#include \"Indicator.h\"\r\n#include \"LineMarker.h\"\r\n#include \"Style.h\"\r\n#include \"ViewStyle.h\"\r\n#include \"CharClassify.h\"\r\n#include \"Decoration.h\"\r\n#include \"CaseFolder.h\"\r\n#include \"Document.h\"\r\n#include \"UniConversion.h\"\r\n#include \"Selection.h\"\r\n#include \"PositionCache.h\"\r\n#include \"EditModel.h\"\r\n\r\nusing namespace Scintilla;\r\nusing namespace Scintilla::Internal;\r\n\r\nCaret::Caret() noexcept :\r\n\tactive(false), on(false), period(500) {}\r\n\r\nEditModel::EditModel() : braces{} {\r\n\tinOverstrike = false;\r\n\txOffset = 0;\r\n\ttrackLineWidth = false;\r\n\tposDrag = SelectionPosition(Sci::invalidPosition);\r\n\tbraces[0] = Sci::invalidPosition;\r\n\tbraces[1] = Sci::invalidPosition;\r\n\tbracesMatchStyle = StyleBraceBad;\r\n\thighlightGuideColumn = 0;\r\n\thasFocus = false;\r\n\tprimarySelection = true;\r\n\timeInteraction = IMEInteraction::Windowed;\r\n\tbidirectional = Bidirectional::Disabled;\r\n\tfoldFlags = FoldFlag::None;\r\n\tfoldDisplayTextStyle = FoldDisplayTextStyle::Hidden;\r\n\thotspot = Range(Sci::invalidPosition);\r\n\thotspotSingleLine = true;\r\n\thoverIndicatorPos = Sci::invalidPosition;\r\n\twrapWidth = LineLayout::wrapWidthInfinite;\r\n\tpdoc = new Document(DocumentOption::Default);\r\n\tpdoc->AddRef();\r\n\tpcs = ContractionStateCreate(pdoc->IsLarge());\r\n}\r\n\r\nEditModel::~EditModel() {\r\n\ttry {\r\n\t\t// This never throws but isn't marked noexcept for compatibility\r\n\t\tpdoc->Release();\r\n\t} catch (...) {\r\n\t\t// Ignore any exception\r\n\t}\r\n\tpdoc = nullptr;\r\n}\r\n\r\nbool EditModel::BidirectionalEnabled() const noexcept {\r\n\treturn (bidirectional != Bidirectional::Disabled) &&\r\n\t\t(CpUtf8 == pdoc->dbcsCodePage);\r\n}\r\n\r\nbool EditModel::BidirectionalR2L() const noexcept {\r\n\treturn bidirectional == Bidirectional::R2L;\r\n}\r\n\r\nSurfaceMode EditModel::CurrentSurfaceMode() const noexcept {\r\n\treturn SurfaceMode(pdoc->dbcsCodePage, BidirectionalR2L());\r\n}\r\n\r\nvoid EditModel::SetDefaultFoldDisplayText(const char *text) {\r\n\tdefaultFoldDisplayText = IsNullOrEmpty(text) ? UniqueString() : UniqueStringCopy(text);\r\n}\r\n\r\nconst char *EditModel::GetDefaultFoldDisplayText() const noexcept {\r\n\treturn defaultFoldDisplayText.get();\r\n}\r\n\r\nconst char *EditModel::GetFoldDisplayText(Sci::Line lineDoc) const noexcept {\r\n\tif (foldDisplayTextStyle == FoldDisplayTextStyle::Hidden || pcs->GetExpanded(lineDoc)) {\r\n\t\treturn nullptr;\r\n\t}\r\n\r\n\tconst char *text = pcs->GetFoldDisplayText(lineDoc);\r\n\treturn text ? text : defaultFoldDisplayText.get();\r\n}\r\n\r\nInSelection EditModel::LineEndInSelection(Sci::Line lineDoc) const {\r\n\tconst Sci::Position posAfterLineEnd = pdoc->LineStart(lineDoc + 1);\r\n\treturn sel.InSelectionForEOL(posAfterLineEnd);\r\n}\r\n\r\nint EditModel::GetMark(Sci::Line line) const {\r\n\treturn pdoc->GetMark(line, FlagSet(changeHistoryOption, ChangeHistoryOption::Markers));\r\n}\r\n"
  },
  {
    "path": "scintilla/src/EditModel.h",
    "content": "// Scintilla source code edit control\r\n/** @file EditModel.h\r\n ** Defines the editor state that must be visible to EditorView.\r\n **/\r\n// Copyright 1998-2014 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef EDITMODEL_H\r\n#define EDITMODEL_H\r\n\r\nnamespace Scintilla::Internal {\r\n\r\n/**\r\n*/\r\nclass Caret {\r\npublic:\r\n\tbool active;\r\n\tbool on;\r\n\tint period;\r\n\r\n\tCaret() noexcept;\r\n};\r\n\r\nclass EditModel {\r\npublic:\r\n\tbool inOverstrike;\r\n\tint xOffset;\t\t///< Horizontal scrolled amount in pixels\r\n\tbool trackLineWidth;\r\n\r\n\tSpecialRepresentations reprs;\r\n\tCaret caret;\r\n\tSelectionPosition posDrag;\r\n\tSci::Position braces[2];\r\n\tint bracesMatchStyle;\r\n\tint highlightGuideColumn;\r\n\tbool hasFocus;\r\n\tSelection sel;\r\n\tbool primarySelection;\r\n\r\n\tScintilla::IMEInteraction imeInteraction;\r\n\tScintilla::Bidirectional bidirectional;\r\n\r\n\tScintilla::FoldFlag foldFlags;\r\n\tScintilla::FoldDisplayTextStyle foldDisplayTextStyle;\r\n\tUniqueString defaultFoldDisplayText;\r\n\tstd::unique_ptr<IContractionState> pcs;\r\n\t// Hotspot support\r\n\tRange hotspot;\r\n\tbool hotspotSingleLine;\r\n\tSci::Position hoverIndicatorPos;\r\n\r\n\tScintilla::ChangeHistoryOption changeHistoryOption = Scintilla::ChangeHistoryOption::Disabled;\r\n\r\n\t// Wrapping support\r\n\tint wrapWidth;\r\n\r\n\tDocument *pdoc;\r\n\r\n\tEditModel();\r\n\t// Deleted so EditModel objects can not be copied.\r\n\tEditModel(const EditModel &) = delete;\r\n\tEditModel(EditModel &&) = delete;\r\n\tEditModel &operator=(const EditModel &) = delete;\r\n\tEditModel &operator=(EditModel &&) = delete;\r\n\tvirtual ~EditModel();\r\n\tvirtual Sci::Line TopLineOfMain() const noexcept = 0;\r\n\tvirtual Point GetVisibleOriginInMain() const = 0;\r\n\tvirtual Sci::Line LinesOnScreen() const = 0;\r\n\tbool BidirectionalEnabled() const noexcept;\r\n\tbool BidirectionalR2L() const noexcept;\r\n\tSurfaceMode CurrentSurfaceMode() const noexcept;\r\n\tvoid SetDefaultFoldDisplayText(const char *text);\r\n\tconst char *GetDefaultFoldDisplayText() const noexcept;\r\n\tconst char *GetFoldDisplayText(Sci::Line lineDoc) const noexcept;\r\n\tInSelection LineEndInSelection(Sci::Line lineDoc) const;\r\n\t[[nodiscard]] int GetMark(Sci::Line line) const;\r\n};\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/src/EditView.cxx",
    "content": "// Scintilla source code edit control\r\n/** @file EditView.cxx\r\n ** Defines the appearance of the main text area of the editor window.\r\n **/\r\n// Copyright 1998-2014 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#include <cstddef>\r\n#include <cstdlib>\r\n#include <cstdint>\r\n#include <cassert>\r\n#include <cstring>\r\n#include <cstdio>\r\n#include <cmath>\r\n#include <cstdint>\r\n\r\n#include <stdexcept>\r\n#include <string>\r\n#include <string_view>\r\n#include <vector>\r\n#include <map>\r\n#include <set>\r\n#include <forward_list>\r\n#include <optional>\r\n#include <algorithm>\r\n#include <iterator>\r\n#include <memory>\r\n#include <chrono>\r\n#include <atomic>\r\n#include <thread>\r\n#include <future>\r\n\r\n#include \"ScintillaTypes.h\"\r\n#include \"ScintillaMessages.h\"\r\n#include \"ScintillaStructures.h\"\r\n#include \"ILoader.h\"\r\n#include \"ILexer.h\"\r\n\r\n#include \"Debugging.h\"\r\n#include \"Geometry.h\"\r\n#include \"Platform.h\"\r\n\r\n#include \"CharacterType.h\"\r\n#include \"CharacterCategoryMap.h\"\r\n#include \"Position.h\"\r\n#include \"UniqueString.h\"\r\n#include \"SplitVector.h\"\r\n#include \"Partitioning.h\"\r\n#include \"RunStyles.h\"\r\n#include \"ContractionState.h\"\r\n#include \"CellBuffer.h\"\r\n#include \"PerLine.h\"\r\n#include \"KeyMap.h\"\r\n#include \"Indicator.h\"\r\n#include \"LineMarker.h\"\r\n#include \"Style.h\"\r\n#include \"ViewStyle.h\"\r\n#include \"CharClassify.h\"\r\n#include \"Decoration.h\"\r\n#include \"CaseFolder.h\"\r\n#include \"Document.h\"\r\n#include \"UniConversion.h\"\r\n#include \"Selection.h\"\r\n#include \"PositionCache.h\"\r\n#include \"EditModel.h\"\r\n#include \"MarginView.h\"\r\n#include \"EditView.h\"\r\n#include \"ElapsedPeriod.h\"\r\n\r\nusing namespace Scintilla;\r\nusing namespace Scintilla::Internal;\r\n\r\nPrintParameters::PrintParameters() noexcept {\r\n\tmagnification = 0;\r\n\tcolourMode = PrintOption::Normal;\r\n\twrapState = Wrap::Word;\r\n}\r\n\r\nnamespace {\r\n\r\nint WidthStyledText(Surface *surface, const ViewStyle &vs, int styleOffset,\r\n\tconst char *text, const unsigned char *styles, size_t len) {\r\n\tint width = 0;\r\n\tsize_t start = 0;\r\n\twhile (start < len) {\r\n\t\tconst unsigned char style = styles[start];\r\n\t\tsize_t endSegment = start;\r\n\t\twhile ((endSegment + 1 < len) && (styles[endSegment + 1] == style))\r\n\t\t\tendSegment++;\r\n\t\tconst Font *fontText = vs.styles[style + styleOffset].font.get();\r\n\t\tconst std::string_view sv(text + start, endSegment - start + 1);\r\n\t\twidth += static_cast<int>(surface->WidthText(fontText, sv));\r\n\t\tstart = endSegment + 1;\r\n\t}\r\n\treturn width;\r\n}\r\n\r\n}\r\n\r\nnamespace Scintilla::Internal {\r\n\r\nbool ValidStyledText(const ViewStyle &vs, size_t styleOffset, const StyledText &st) noexcept {\r\n\tif (st.multipleStyles) {\r\n\t\tfor (size_t iStyle = 0; iStyle<st.length; iStyle++) {\r\n\t\t\tif (!vs.ValidStyle(styleOffset + st.styles[iStyle]))\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\t} else {\r\n\t\tif (!vs.ValidStyle(styleOffset + st.style))\r\n\t\t\treturn false;\r\n\t}\r\n\treturn true;\r\n}\r\n\r\nint WidestLineWidth(Surface *surface, const ViewStyle &vs, int styleOffset, const StyledText &st) {\r\n\tint widthMax = 0;\r\n\tsize_t start = 0;\r\n\twhile (start < st.length) {\r\n\t\tconst size_t lenLine = st.LineLength(start);\r\n\t\tint widthSubLine;\r\n\t\tif (st.multipleStyles) {\r\n\t\t\twidthSubLine = WidthStyledText(surface, vs, styleOffset, st.text + start, st.styles + start, lenLine);\r\n\t\t} else {\r\n\t\t\tconst Font *fontText = vs.styles[styleOffset + st.style].font.get();\r\n\t\t\tconst std::string_view text(st.text + start, lenLine);\r\n\t\t\twidthSubLine = static_cast<int>(surface->WidthText(fontText, text));\r\n\t\t}\r\n\t\tif (widthSubLine > widthMax)\r\n\t\t\twidthMax = widthSubLine;\r\n\t\tstart += lenLine + 1;\r\n\t}\r\n\treturn widthMax;\r\n}\r\n\r\nvoid DrawTextNoClipPhase(Surface *surface, PRectangle rc, const Style &style, XYPOSITION ybase,\r\n\tstd::string_view text, DrawPhase phase) {\r\n\tconst Font *fontText = style.font.get();\r\n\tif (FlagSet(phase, DrawPhase::back)) {\r\n\t\tif (FlagSet(phase, DrawPhase::text)) {\r\n\t\t\t// Drawing both\r\n\t\t\tsurface->DrawTextNoClip(rc, fontText, ybase, text,\r\n\t\t\t\tstyle.fore, style.back);\r\n\t\t} else {\r\n\t\t\tsurface->FillRectangleAligned(rc, Fill(style.back));\r\n\t\t}\r\n\t} else if (FlagSet(phase, DrawPhase::text)) {\r\n\t\tsurface->DrawTextTransparent(rc, fontText, ybase, text, style.fore);\r\n\t}\r\n}\r\n\r\nvoid DrawStyledText(Surface *surface, const ViewStyle &vs, int styleOffset, PRectangle rcText,\r\n\tconst StyledText &st, size_t start, size_t length, DrawPhase phase) {\r\n\r\n\tif (st.multipleStyles) {\r\n\t\tint x = static_cast<int>(rcText.left);\r\n\t\tsize_t i = 0;\r\n\t\twhile (i < length) {\r\n\t\t\tsize_t end = i;\r\n\t\t\tsize_t style = st.styles[i + start];\r\n\t\t\twhile (end < length - 1 && st.styles[start + end + 1] == style)\r\n\t\t\t\tend++;\r\n\t\t\tstyle += styleOffset;\r\n\t\t\tconst Font *fontText = vs.styles[style].font.get();\r\n\t\t\tconst std::string_view text(st.text + start + i, end - i + 1);\r\n\t\t\tconst int width = static_cast<int>(surface->WidthText(fontText, text));\r\n\t\t\tPRectangle rcSegment = rcText;\r\n\t\t\trcSegment.left = static_cast<XYPOSITION>(x);\r\n\t\t\trcSegment.right = static_cast<XYPOSITION>(x + width + 1);\r\n\t\t\tDrawTextNoClipPhase(surface, rcSegment, vs.styles[style],\r\n\t\t\t\trcText.top + vs.maxAscent, text, phase);\r\n\t\t\tx += width;\r\n\t\t\ti = end + 1;\r\n\t\t}\r\n\t} else {\r\n\t\tconst size_t style = st.style + styleOffset;\r\n\t\tDrawTextNoClipPhase(surface, rcText, vs.styles[style],\r\n\t\t\trcText.top + vs.maxAscent,\r\n\t\t\tstd::string_view(st.text + start, length), phase);\r\n\t}\r\n}\r\n\r\n}\r\n\r\nEditView::EditView() {\r\n\ttabWidthMinimumPixels = 2; // needed for calculating tab stops for fractional proportional fonts\r\n\tdrawOverstrikeCaret = true;\r\n\tbufferedDraw = true;\r\n\tphasesDraw = PhasesDraw::Two;\r\n\tlineWidthMaxSeen = 0;\r\n\tadditionalCaretsBlink = true;\r\n\tadditionalCaretsVisible = true;\r\n\timeCaretBlockOverride = false;\r\n\tllc.SetLevel(LineCache::Caret);\r\n\tposCache = CreatePositionCache();\r\n\tposCache->SetSize(0x400);\r\n\tmaxLayoutThreads = 1;\r\n\ttabArrowHeight = 4;\r\n\tcustomDrawTabArrow = nullptr;\r\n\tcustomDrawWrapMarker = nullptr;\r\n}\r\n\r\nEditView::~EditView() = default;\r\n\r\nbool EditView::SetTwoPhaseDraw(bool twoPhaseDraw) noexcept {\r\n\tconst PhasesDraw phasesDrawNew = twoPhaseDraw ? PhasesDraw::Two : PhasesDraw::One;\r\n\tconst bool redraw = phasesDraw != phasesDrawNew;\r\n\tphasesDraw = phasesDrawNew;\r\n\treturn redraw;\r\n}\r\n\r\nbool EditView::SetPhasesDraw(int phases) noexcept {\r\n\tconst PhasesDraw phasesDrawNew = static_cast<PhasesDraw>(phases);\r\n\tconst bool redraw = phasesDraw != phasesDrawNew;\r\n\tphasesDraw = phasesDrawNew;\r\n\treturn redraw;\r\n}\r\n\r\nbool EditView::LinesOverlap() const noexcept {\r\n\treturn phasesDraw == PhasesDraw::Multiple;\r\n}\r\n\r\nvoid EditView::SetLayoutThreads(unsigned int threads) noexcept {\r\n\tmaxLayoutThreads = std::clamp(threads, 1U, std::thread::hardware_concurrency());\r\n}\r\n\r\nunsigned int EditView::GetLayoutThreads() const noexcept {\r\n\treturn maxLayoutThreads;\r\n}\r\n\r\nvoid EditView::ClearAllTabstops() noexcept {\r\n\tldTabstops.reset();\r\n}\r\n\r\nXYPOSITION EditView::NextTabstopPos(Sci::Line line, XYPOSITION x, XYPOSITION tabWidth) const noexcept {\r\n\tconst int next = GetNextTabstop(line, static_cast<int>(x + tabWidthMinimumPixels));\r\n\tif (next > 0)\r\n\t\treturn static_cast<XYPOSITION>(next);\r\n\treturn (static_cast<int>((x + tabWidthMinimumPixels) / tabWidth) + 1) * tabWidth;\r\n}\r\n\r\nbool EditView::ClearTabstops(Sci::Line line) noexcept {\r\n\treturn ldTabstops && ldTabstops->ClearTabstops(line);\r\n}\r\n\r\nbool EditView::AddTabstop(Sci::Line line, int x) {\r\n\tif (!ldTabstops) {\r\n\t\tldTabstops = std::make_unique<LineTabstops>();\r\n\t}\r\n\treturn ldTabstops && ldTabstops->AddTabstop(line, x);\r\n}\r\n\r\nint EditView::GetNextTabstop(Sci::Line line, int x) const noexcept {\r\n\tif (ldTabstops) {\r\n\t\treturn ldTabstops->GetNextTabstop(line, x);\r\n\t} else {\r\n\t\treturn 0;\r\n\t}\r\n}\r\n\r\nvoid EditView::LinesAddedOrRemoved(Sci::Line lineOfPos, Sci::Line linesAdded) {\r\n\tif (ldTabstops) {\r\n\t\tif (linesAdded > 0) {\r\n\t\t\tfor (Sci::Line line = lineOfPos; line < lineOfPos + linesAdded; line++) {\r\n\t\t\t\tldTabstops->InsertLine(line);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tfor (Sci::Line line = (lineOfPos + -linesAdded) - 1; line >= lineOfPos; line--) {\r\n\t\t\t\tldTabstops->RemoveLine(line);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid EditView::DropGraphics() noexcept {\r\n\tpixmapLine.reset();\r\n\tpixmapIndentGuide.reset();\r\n\tpixmapIndentGuideHighlight.reset();\r\n}\r\n\r\nvoid EditView::RefreshPixMaps(Surface *surfaceWindow, const ViewStyle &vsDraw) {\r\n\tif (!pixmapIndentGuide) {\r\n\t\t// 1 extra pixel in height so can handle odd/even positions and so produce a continuous line\r\n\t\tpixmapIndentGuide = surfaceWindow->AllocatePixMap(1, vsDraw.lineHeight + 1);\r\n\t\tpixmapIndentGuideHighlight = surfaceWindow->AllocatePixMap(1, vsDraw.lineHeight + 1);\r\n\t\tconst PRectangle rcIG = PRectangle::FromInts(0, 0, 1, vsDraw.lineHeight);\r\n\t\tpixmapIndentGuide->FillRectangle(rcIG, vsDraw.styles[StyleIndentGuide].back);\r\n\t\tpixmapIndentGuideHighlight->FillRectangle(rcIG, vsDraw.styles[StyleBraceLight].back);\r\n\t\tfor (int stripe = 1; stripe < vsDraw.lineHeight + 1; stripe += 2) {\r\n\t\t\tconst PRectangle rcPixel = PRectangle::FromInts(0, stripe, 1, stripe + 1);\r\n\t\t\tpixmapIndentGuide->FillRectangle(rcPixel, vsDraw.styles[StyleIndentGuide].fore);\r\n\t\t\tpixmapIndentGuideHighlight->FillRectangle(rcPixel, vsDraw.styles[StyleBraceLight].fore);\r\n\t\t}\r\n\t\tpixmapIndentGuide->FlushDrawing();\r\n\t\tpixmapIndentGuideHighlight->FlushDrawing();\r\n\t}\r\n}\r\n\r\nstd::shared_ptr<LineLayout> EditView::RetrieveLineLayout(Sci::Line lineNumber, const EditModel &model) {\r\n\tconst Sci::Position posLineStart = model.pdoc->LineStart(lineNumber);\r\n\tconst Sci::Position posLineEnd = model.pdoc->LineStart(lineNumber + 1);\r\n\tPLATFORM_ASSERT(posLineEnd >= posLineStart);\r\n\tconst Sci::Line lineCaret = model.pdoc->SciLineFromPosition(model.sel.MainCaret());\r\n\treturn llc.Retrieve(lineNumber, lineCaret,\r\n\t\tstatic_cast<int>(posLineEnd - posLineStart), model.pdoc->GetStyleClock(),\r\n\t\tmodel.LinesOnScreen() + 1, model.pdoc->LinesTotal());\r\n}\r\n\r\nnamespace {\r\n\r\nconstexpr XYPOSITION epsilon = 0.0001f;\t// A small nudge to avoid floating point precision issues\r\n\r\n/**\r\n* Return the chDoc argument with case transformed as indicated by the caseForce argument.\r\n* chPrevious is needed for camel casing.\r\n* This only affects ASCII characters and is provided for languages with case-insensitive\r\n* ASCII keywords where the user wishes to view keywords in a preferred case.\r\n*/\r\ninline char CaseForce(Style::CaseForce caseForce, char chDoc, char chPrevious) noexcept {\r\n\tswitch (caseForce) {\r\n\tcase Style::CaseForce::mixed:\r\n\t\treturn chDoc;\r\n\tcase Style::CaseForce::lower:\r\n\t\treturn MakeLowerCase(chDoc);\r\n\tcase Style::CaseForce::upper:\r\n\t\treturn MakeUpperCase(chDoc);\r\n\tcase Style::CaseForce::camel:\r\n\tdefault:\t// default should not occur, included to avoid warnings\r\n\t\tif (IsUpperOrLowerCase(chDoc) && !IsUpperOrLowerCase(chPrevious)) {\r\n\t\t\treturn MakeUpperCase(chDoc);\r\n\t\t} else {\r\n\t\t\treturn MakeLowerCase(chDoc);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid LayoutSegments(IPositionCache *pCache,\r\n\tSurface *surface,\r\n\tconst ViewStyle &vstyle,\r\n\tLineLayout *ll,\r\n\tconst std::vector<TextSegment> &segments,\r\n\tstd::atomic<uint32_t> &nextIndex,\r\n\tconst bool textUnicode,\r\n\tconst bool multiThreaded) {\r\n\twhile (true) {\r\n\t\tconst uint32_t i = nextIndex.fetch_add(1, std::memory_order_acq_rel);\r\n\t\tif (i >= segments.size()) {\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tconst TextSegment &ts = segments[i];\r\n\t\tconst unsigned int styleSegment = ll->styles[ts.start];\r\n\t\tXYPOSITION *positions = &ll->positions[ts.start + 1];\r\n\t\tif (vstyle.styles[styleSegment].visible) {\r\n\t\t\tif (ts.representation) {\r\n\t\t\t\tXYPOSITION representationWidth = 0.0;\r\n\t\t\t\t// Tab is a special case of representation, taking a variable amount of space\r\n\t\t\t\t// which will be filled in later.\r\n\t\t\t\tif (ll->chars[ts.start] != '\\t') {\r\n\t\t\t\t\trepresentationWidth = vstyle.controlCharWidth;\r\n\t\t\t\t\tif (representationWidth <= 0.0) {\r\n\t\t\t\t\t\tassert(ts.representation->stringRep.length() <= Representation::maxLength);\r\n\t\t\t\t\t\tXYPOSITION positionsRepr[Representation::maxLength + 1];\r\n\t\t\t\t\t\t// ts.representation->stringRep is UTF-8.\r\n\t\t\t\t\t\tpCache->MeasureWidths(surface, vstyle, StyleControlChar, true, ts.representation->stringRep,\r\n\t\t\t\t\t\t\tpositionsRepr, multiThreaded);\r\n\t\t\t\t\t\trepresentationWidth = positionsRepr[ts.representation->stringRep.length() - 1];\r\n\t\t\t\t\t\tif (FlagSet(ts.representation->appearance, RepresentationAppearance::Blob)) {\r\n\t\t\t\t\t\t\trepresentationWidth += vstyle.ctrlCharPadding;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tstd::fill(positions, positions + ts.length, representationWidth);\r\n\t\t\t} else {\r\n\t\t\t\tif ((ts.length == 1) && (' ' == ll->chars[ts.start])) {\r\n\t\t\t\t\t// Over half the segments are single characters and of these about half are space characters.\r\n\t\t\t\t\tpositions[0] = vstyle.styles[styleSegment].spaceWidth;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tpCache->MeasureWidths(surface, vstyle, styleSegment, textUnicode,\r\n\t\t\t\t\t\tstd::string_view(&ll->chars[ts.start], ts.length), positions, multiThreaded);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (vstyle.styles[styleSegment].invisibleRepresentation[0]) {\r\n\t\t\tconst std::string_view text = vstyle.styles[styleSegment].invisibleRepresentation;\r\n\t\t\tXYPOSITION positionsRepr[Representation::maxLength + 1];\r\n\t\t\t// invisibleRepresentation is UTF-8.\r\n\t\t\tpCache->MeasureWidths(surface, vstyle, styleSegment, true, text, positionsRepr, multiThreaded);\r\n\t\t\tconst XYPOSITION representationWidth = positionsRepr[text.length() - 1];\r\n\t\t\tstd::fill(positions, positions + ts.length, representationWidth);\r\n\t\t}\r\n\t}\r\n}\r\n\r\n}\r\n\r\n/**\r\n* Fill in the LineLayout data for the given line.\r\n* Copy the given @a line and its styles from the document into local arrays.\r\n* Also determine the x position at which each character starts.\r\n*/\r\nvoid EditView::LayoutLine(const EditModel &model, Surface *surface, const ViewStyle &vstyle, LineLayout *ll, int width, bool callerMultiThreaded) {\r\n\tif (!ll)\r\n\t\treturn;\r\n\tconst Sci::Line line = ll->LineNumber();\r\n\tPLATFORM_ASSERT(line < model.pdoc->LinesTotal());\r\n\tPLATFORM_ASSERT(ll->chars);\r\n\tconst Sci::Position posLineStart = model.pdoc->LineStart(line);\r\n\tSci::Position posLineEnd = model.pdoc->LineStart(line + 1);\r\n\t// If the line is very long, limit the treatment to a length that should fit in the viewport\r\n\tif (posLineEnd >(posLineStart + ll->maxLineLength)) {\r\n\t\tposLineEnd = posLineStart + ll->maxLineLength;\r\n\t}\r\n\t// Hard to cope when too narrow, so just assume there is space\r\n\twidth = std::max(width, 20);\r\n\r\n\tif (ll->validity == LineLayout::ValidLevel::checkTextAndStyle) {\r\n\t\tSci::Position lineLength = posLineEnd - posLineStart;\r\n\t\tif (!vstyle.viewEOL) {\r\n\t\t\tlineLength = model.pdoc->LineEnd(line) - posLineStart;\r\n\t\t}\r\n\t\tif (lineLength == ll->numCharsInLine) {\r\n\t\t\t// See if chars, styles, indicators, are all the same\r\n\t\t\tbool allSame = true;\r\n\t\t\t// Check base line layout\r\n\t\t\tchar chPrevious = 0;\r\n\t\t\tfor (Sci::Position numCharsInLine = 0; numCharsInLine < lineLength; numCharsInLine++) {\r\n\t\t\t\tconst Sci::Position charInDoc = numCharsInLine + posLineStart;\r\n\t\t\t\tconst char chDoc = model.pdoc->CharAt(charInDoc);\r\n\t\t\t\tconst int styleByte = model.pdoc->StyleIndexAt(charInDoc);\r\n\t\t\t\tallSame = allSame &&\r\n\t\t\t\t\t(ll->styles[numCharsInLine] == styleByte);\r\n\t\t\t\tallSame = allSame &&\r\n\t\t\t\t\t(ll->chars[numCharsInLine] == CaseForce(vstyle.styles[styleByte].caseForce, chDoc, chPrevious));\r\n\t\t\t\tchPrevious = chDoc;\r\n\t\t\t}\r\n\t\t\tconst int styleByteLast = (posLineEnd > posLineStart) ? model.pdoc->StyleIndexAt(posLineEnd - 1) : 0;\r\n\t\t\tallSame = allSame && (ll->styles[lineLength] == styleByteLast);\t// For eolFilled\r\n\t\t\tif (allSame) {\r\n\t\t\t\tll->validity = (ll->widthLine != width) ? LineLayout::ValidLevel::positions : LineLayout::ValidLevel::lines;\r\n\t\t\t} else {\r\n\t\t\t\tll->validity = LineLayout::ValidLevel::invalid;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tll->validity = LineLayout::ValidLevel::invalid;\r\n\t\t}\r\n\t}\r\n\tif (ll->validity == LineLayout::ValidLevel::invalid) {\r\n\t\tll->widthLine = LineLayout::wrapWidthInfinite;\r\n\t\tll->lines = 1;\r\n\t\tif (vstyle.edgeState == EdgeVisualStyle::Background) {\r\n\t\t\tSci::Position edgePosition = model.pdoc->FindColumn(line, vstyle.theEdge.column);\r\n\t\t\tif (edgePosition >= posLineStart) {\r\n\t\t\t\tedgePosition -= posLineStart;\r\n\t\t\t}\r\n\t\t\tll->edgeColumn = static_cast<int>(edgePosition);\r\n\t\t} else {\r\n\t\t\tll->edgeColumn = -1;\r\n\t\t}\r\n\r\n\t\t// Fill base line layout\r\n\t\tconst int lineLength = static_cast<int>(posLineEnd - posLineStart);\r\n\t\tmodel.pdoc->GetCharRange(ll->chars.get(), posLineStart, lineLength);\r\n\t\tmodel.pdoc->GetStyleRange(ll->styles.get(), posLineStart, lineLength);\r\n\t\tconst int numCharsBeforeEOL = static_cast<int>(model.pdoc->LineEnd(line) - posLineStart);\r\n\t\tconst int numCharsInLine = (vstyle.viewEOL) ? lineLength : numCharsBeforeEOL;\r\n\t\tconst unsigned char styleByteLast = (lineLength > 0) ? ll->styles[lineLength - 1] : 0;\r\n\t\tif (vstyle.someStylesForceCase) {\r\n\t\t\tchar chPrevious = 0;\r\n\t\t\tfor (int charInLine = 0; charInLine<lineLength; charInLine++) {\r\n\t\t\t\tconst char chDoc = ll->chars[charInLine];\r\n\t\t\t\tll->chars[charInLine] = CaseForce(vstyle.styles[ll->styles[charInLine]].caseForce, chDoc, chPrevious);\r\n\t\t\t\tchPrevious = chDoc;\r\n\t\t\t}\r\n\t\t}\r\n\t\tll->xHighlightGuide = 0;\r\n\t\t// Extra element at the end of the line to hold end x position and act as\r\n\t\tll->chars[numCharsInLine] = 0;   // Also triggers processing in the loops as this is a control character\r\n\t\tll->styles[numCharsInLine] = styleByteLast;\t// For eolFilled\r\n\r\n\t\t// Layout the line, determining the position of each character,\r\n\t\t// with an extra element at the end for the end of the line.\r\n\t\tll->positions[0] = 0;\r\n\t\tbool lastSegItalics = false;\r\n\r\n\t\tstd::vector<TextSegment> segments;\r\n\t\tBreakFinder bfLayout(ll, nullptr, Range(0, numCharsInLine), posLineStart, 0, BreakFinder::BreakFor::Text, model.pdoc, &model.reprs, nullptr);\r\n\t\twhile (bfLayout.More()) {\r\n\t\t\tsegments.push_back(bfLayout.Next());\r\n\t\t}\r\n\r\n\t\tll->ClearPositions();\r\n\r\n\t\tif (!segments.empty()) {\r\n\r\n\t\t\tconst size_t threadsForLength = std::max(1, numCharsInLine / bytesPerLayoutThread);\r\n\t\t\tsize_t threads = std::min<size_t>({ segments.size(), threadsForLength, maxLayoutThreads });\r\n\t\t\tif (!surface->SupportsFeature(Supports::ThreadSafeMeasureWidths) || callerMultiThreaded) {\r\n\t\t\t\tthreads = 1;\r\n\t\t\t}\r\n\r\n\t\t\tstd::atomic<uint32_t> nextIndex = 0;\r\n\r\n\t\t\tconst bool textUnicode = CpUtf8 == model.pdoc->dbcsCodePage;\r\n\t\t\tconst bool multiThreaded = threads > 1;\r\n\t\t\tconst bool multiThreadedContext = multiThreaded || callerMultiThreaded;\r\n\t\t\tIPositionCache *pCache = posCache.get();\r\n\r\n\t\t\t// If only 1 thread needed then use the main thread, else spin up multiple\r\n\t\t\tconst std::launch policy = (multiThreaded) ? std::launch::async : std::launch::deferred;\r\n\r\n\t\t\tstd::vector<std::future<void>> futures;\r\n\t\t\tfor (size_t th = 0; th < threads; th++) {\r\n\t\t\t\t// Find relative positions of everything except for tabs\r\n\t\t\t\tstd::future<void> fut = std::async(policy,\r\n\t\t\t\t\t[pCache, surface, &vstyle, &ll, &segments, &nextIndex, textUnicode, multiThreadedContext]() {\r\n\t\t\t\t\tLayoutSegments(pCache, surface, vstyle, ll, segments, nextIndex, textUnicode, multiThreadedContext);\r\n\t\t\t\t});\r\n\t\t\t\tfutures.push_back(std::move(fut));\r\n\t\t\t}\r\n\t\t\tfor (const std::future<void> &f : futures) {\r\n\t\t\t\tf.wait();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Accumulate absolute positions from relative positions within segments and expand tabs\r\n\t\tXYPOSITION xPosition = 0.0;\r\n\t\tsize_t iByte = 0;\r\n\t\tll->positions[iByte++] = xPosition;\r\n\t\tfor (const TextSegment &ts : segments) {\r\n\t\t\tif (vstyle.styles[ll->styles[ts.start]].visible &&\r\n\t\t\t\tts.representation &&\r\n\t\t\t\t(ll->chars[ts.start] == '\\t')) {\r\n\t\t\t\t// Simple visible tab, go to next tab stop\r\n\t\t\t\tconst XYPOSITION startTab = ll->positions[ts.start];\r\n\t\t\t\tconst XYPOSITION nextTab = NextTabstopPos(line, startTab, vstyle.tabWidth);\r\n\t\t\t\txPosition += nextTab - startTab;\r\n\t\t\t}\r\n\t\t\tconst XYPOSITION xBeginSegment = xPosition;\r\n\t\t\tfor (int i = 0; i < ts.length; i++) {\r\n\t\t\t\txPosition = ll->positions[iByte] + xBeginSegment;\r\n\t\t\t\tll->positions[iByte++] = xPosition;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (!segments.empty()) {\r\n\t\t\t// Not quite the same as before which would effectively ignore trailing invisible segments\r\n\t\t\tconst TextSegment &ts = segments.back();\r\n\t\t\tlastSegItalics = (!ts.representation) && ((ll->chars[ts.end() - 1] != ' ') && vstyle.styles[ll->styles[ts.start]].italic);\r\n\t\t}\r\n\r\n\t\t// Small hack to make lines that end with italics not cut off the edge of the last character\r\n\t\tif (lastSegItalics) {\r\n\t\t\tll->positions[numCharsInLine] += vstyle.lastSegItalicsOffset;\r\n\t\t}\r\n\t\tll->numCharsInLine = numCharsInLine;\r\n\t\tll->numCharsBeforeEOL = numCharsBeforeEOL;\r\n\t\tll->validity = LineLayout::ValidLevel::positions;\r\n\t}\r\n\tif ((ll->validity == LineLayout::ValidLevel::positions) || (ll->widthLine != width)) {\r\n\t\tll->widthLine = width;\r\n\t\tif (width == LineLayout::wrapWidthInfinite) {\r\n\t\t\tll->lines = 1;\r\n\t\t} else if (width > ll->positions[ll->numCharsInLine]) {\r\n\t\t\t// Simple common case where line does not need wrapping.\r\n\t\t\tll->lines = 1;\r\n\t\t} else {\r\n\t\t\tif (FlagSet(vstyle.wrap.visualFlags, WrapVisualFlag::End)) {\r\n\t\t\t\twidth -= static_cast<int>(vstyle.aveCharWidth); // take into account the space for end wrap mark\r\n\t\t\t}\r\n\t\t\tXYPOSITION wrapAddIndent = 0; // This will be added to initial indent of line\r\n\t\t\tswitch (vstyle.wrap.indentMode) {\r\n\t\t\tcase WrapIndentMode::Fixed:\r\n\t\t\t\twrapAddIndent = vstyle.wrap.visualStartIndent * vstyle.aveCharWidth;\r\n\t\t\t\tbreak;\r\n\t\t\tcase WrapIndentMode::Indent:\r\n\t\t\t\twrapAddIndent = model.pdoc->IndentSize() * vstyle.spaceWidth;\r\n\t\t\t\tbreak;\r\n\t\t\tcase WrapIndentMode::DeepIndent:\r\n\t\t\t\twrapAddIndent = model.pdoc->IndentSize() * 2 * vstyle.spaceWidth;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\t// No additional indent for WrapIndentMode::Fixed\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tll->wrapIndent = wrapAddIndent;\r\n\t\t\tif (vstyle.wrap.indentMode != WrapIndentMode::Fixed) {\r\n\t\t\t\tfor (int i = 0; i < ll->numCharsInLine; i++) {\r\n\t\t\t\t\tif (!IsSpaceOrTab(ll->chars[i])) {\r\n\t\t\t\t\t\tll->wrapIndent += ll->positions[i]; // Add line indent\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// Check for text width minimum\r\n\t\t\tif (ll->wrapIndent > width - static_cast<int>(vstyle.aveCharWidth) * 15)\r\n\t\t\t\tll->wrapIndent = wrapAddIndent;\r\n\t\t\t// Check for wrapIndent minimum\r\n\t\t\tif ((FlagSet(vstyle.wrap.visualFlags, WrapVisualFlag::Start)) && (ll->wrapIndent < vstyle.aveCharWidth))\r\n\t\t\t\tll->wrapIndent = vstyle.aveCharWidth; // Indent to show start visual\r\n\t\t\tll->WrapLine(model.pdoc, posLineStart, vstyle.wrap.state, width);\r\n\t\t}\r\n\t\tll->validity = LineLayout::ValidLevel::lines;\r\n\t}\r\n}\r\n\r\n// Fill the LineLayout bidirectional data fields according to each char style\r\n\r\nvoid EditView::UpdateBidiData(const EditModel &model, const ViewStyle &vstyle, LineLayout *ll) {\r\n\tif (model.BidirectionalEnabled()) {\r\n\t\tll->EnsureBidiData();\r\n\t\tfor (int stylesInLine = 0; stylesInLine < ll->numCharsInLine; stylesInLine++) {\r\n\t\t\tll->bidiData->stylesFonts[stylesInLine] = vstyle.styles[ll->styles[stylesInLine]].font;\r\n\t\t}\r\n\t\tll->bidiData->stylesFonts[ll->numCharsInLine].reset();\r\n\r\n\t\tfor (int charsInLine = 0; charsInLine < ll->numCharsInLine; charsInLine++) {\r\n\t\t\tconst int charWidth = UTF8DrawBytes(&ll->chars[charsInLine], ll->numCharsInLine - charsInLine);\r\n\t\t\tconst Representation *repr = model.reprs.RepresentationFromCharacter(std::string_view(&ll->chars[charsInLine], charWidth));\r\n\r\n\t\t\tll->bidiData->widthReprs[charsInLine] = 0.0f;\r\n\t\t\tif (repr && ll->chars[charsInLine] != '\\t') {\r\n\t\t\t\tll->bidiData->widthReprs[charsInLine] = ll->positions[charsInLine + charWidth] - ll->positions[charsInLine];\r\n\t\t\t}\r\n\t\t\tif (charWidth > 1) {\r\n\t\t\t\tfor (int c = 1; c < charWidth; c++) {\r\n\t\t\t\t\tcharsInLine++;\r\n\t\t\t\t\tll->bidiData->widthReprs[charsInLine] = 0.0f;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tll->bidiData->widthReprs[ll->numCharsInLine] = 0.0f;\r\n\t} else {\r\n\t\tll->bidiData.reset();\r\n\t}\r\n}\r\n\r\nPoint EditView::LocationFromPosition(Surface *surface, const EditModel &model, SelectionPosition pos, Sci::Line topLine,\r\n\t\t\t\t     const ViewStyle &vs, PointEnd pe, const PRectangle rcClient) {\r\n\tPoint pt;\r\n\tif (pos.Position() == Sci::invalidPosition)\r\n\t\treturn pt;\r\n\tSci::Line lineDoc = model.pdoc->SciLineFromPosition(pos.Position());\r\n\tSci::Position posLineStart = model.pdoc->LineStart(lineDoc);\r\n\tif (FlagSet(pe, PointEnd::lineEnd) && (lineDoc > 0) && (pos.Position() == posLineStart)) {\r\n\t\t// Want point at end of first line\r\n\t\tlineDoc--;\r\n\t\tposLineStart = model.pdoc->LineStart(lineDoc);\r\n\t}\r\n\tconst Sci::Line lineVisible = model.pcs->DisplayFromDoc(lineDoc);\r\n\tstd::shared_ptr<LineLayout> ll = RetrieveLineLayout(lineDoc, model);\r\n\tif (surface && ll) {\r\n\t\tLayoutLine(model, surface, vs, ll.get(), model.wrapWidth);\r\n\t\tconst int posInLine = static_cast<int>(pos.Position() - posLineStart);\r\n\t\tpt = ll->PointFromPosition(posInLine, vs.lineHeight, pe);\r\n\t\tpt.x += vs.textStart - model.xOffset;\r\n\r\n\t\tif (model.BidirectionalEnabled()) {\r\n\t\t\t// Fill the line bidi data\r\n\t\t\tUpdateBidiData(model, vs, ll.get());\r\n\r\n\t\t\t// Find subLine\r\n\t\t\tconst int subLine = ll->SubLineFromPosition(posInLine, pe);\r\n\t\t\tconst int caretPosition = posInLine - ll->LineStart(subLine);\r\n\r\n\t\t\t// Get the point from current position\r\n\t\t\tconst ScreenLine screenLine(ll.get(), subLine, vs, rcClient.right, tabWidthMinimumPixels);\r\n\t\t\tstd::unique_ptr<IScreenLineLayout> slLayout = surface->Layout(&screenLine);\r\n\t\t\tpt.x = slLayout->XFromPosition(caretPosition);\r\n\r\n\t\t\tpt.x += vs.textStart - model.xOffset;\r\n\r\n\t\t\tpt.y = 0;\r\n\t\t\tif (posInLine >= ll->LineStart(subLine)) {\r\n\t\t\t\tpt.y = static_cast<XYPOSITION>(subLine*vs.lineHeight);\r\n\t\t\t}\r\n\t\t}\r\n\t\tpt.y += (lineVisible - topLine) * vs.lineHeight;\r\n\t\tpt.x += pos.VirtualSpace() * vs.styles[ll->EndLineStyle()].spaceWidth;\r\n\t}\r\n\treturn pt;\r\n}\r\n\r\nRange EditView::RangeDisplayLine(Surface *surface, const EditModel &model, Sci::Line lineVisible, const ViewStyle &vs) {\r\n\tRange rangeSubLine = Range(0, 0);\r\n\tif (lineVisible < 0) {\r\n\t\treturn rangeSubLine;\r\n\t}\r\n\tconst Sci::Line lineDoc = model.pcs->DocFromDisplay(lineVisible);\r\n\tconst Sci::Position positionLineStart = model.pdoc->LineStart(lineDoc);\r\n\tstd::shared_ptr<LineLayout> ll = RetrieveLineLayout(lineDoc, model);\r\n\tif (surface && ll) {\r\n\t\tLayoutLine(model, surface, vs, ll.get(), model.wrapWidth);\r\n\t\tconst Sci::Line lineStartSet = model.pcs->DisplayFromDoc(lineDoc);\r\n\t\tconst int subLine = static_cast<int>(lineVisible - lineStartSet);\r\n\t\tif (subLine < ll->lines) {\r\n\t\t\trangeSubLine = ll->SubLineRange(subLine, LineLayout::Scope::visibleOnly);\r\n\t\t\tif (subLine == ll->lines-1) {\r\n\t\t\t\trangeSubLine.end = model.pdoc->LineStart(lineDoc + 1) -\r\n\t\t\t\t\tpositionLineStart;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\trangeSubLine.start += positionLineStart;\r\n\trangeSubLine.end += positionLineStart;\r\n\treturn rangeSubLine;\r\n}\r\n\r\nSelectionPosition EditView::SPositionFromLocation(Surface *surface, const EditModel &model, PointDocument pt, bool canReturnInvalid,\r\n\tbool charPosition, bool virtualSpace, const ViewStyle &vs, const PRectangle rcClient) {\r\n\tpt.x = pt.x - vs.textStart;\r\n\tSci::Line visibleLine = static_cast<int>(std::floor(pt.y / vs.lineHeight));\r\n\tif (!canReturnInvalid && (visibleLine < 0))\r\n\t\tvisibleLine = 0;\r\n\tconst Sci::Line lineDoc = model.pcs->DocFromDisplay(visibleLine);\r\n\tif (canReturnInvalid && (lineDoc < 0))\r\n\t\treturn SelectionPosition(Sci::invalidPosition);\r\n\tif (lineDoc >= model.pdoc->LinesTotal())\r\n\t\treturn SelectionPosition(canReturnInvalid ? Sci::invalidPosition :\r\n\t\t\tmodel.pdoc->Length());\r\n\tconst Sci::Position posLineStart = model.pdoc->LineStart(lineDoc);\r\n\tstd::shared_ptr<LineLayout> ll = RetrieveLineLayout(lineDoc, model);\r\n\tif (surface && ll) {\r\n\t\tLayoutLine(model, surface, vs, ll.get(), model.wrapWidth);\r\n\t\tconst Sci::Line lineStartSet = model.pcs->DisplayFromDoc(lineDoc);\r\n\t\tconst int subLine = static_cast<int>(visibleLine - lineStartSet);\r\n\t\tif (subLine < ll->lines) {\r\n\t\t\tconst Range rangeSubLine = ll->SubLineRange(subLine, LineLayout::Scope::visibleOnly);\r\n\t\t\tconst XYPOSITION subLineStart = ll->positions[rangeSubLine.start];\r\n\t\t\tif (subLine > 0)\t// Wrapped\r\n\t\t\t\tpt.x -= ll->wrapIndent;\r\n\t\t\tSci::Position positionInLine = 0;\r\n\t\t\tif (model.BidirectionalEnabled()) {\r\n\t\t\t\t// Fill the line bidi data\r\n\t\t\t\tUpdateBidiData(model, vs, ll.get());\r\n\r\n\t\t\t\tconst ScreenLine screenLine(ll.get(), subLine, vs, rcClient.right, tabWidthMinimumPixels);\r\n\t\t\t\tstd::unique_ptr<IScreenLineLayout> slLayout = surface->Layout(&screenLine);\r\n\t\t\t\tpositionInLine = slLayout->PositionFromX(pt.x, charPosition) +\r\n\t\t\t\t\trangeSubLine.start;\r\n\t\t\t} else {\r\n\t\t\t\tpositionInLine = ll->FindPositionFromX(pt.x + subLineStart,\r\n\t\t\t\t\trangeSubLine, charPosition);\r\n\t\t\t}\r\n\t\t\tif (positionInLine < rangeSubLine.end) {\r\n\t\t\t\treturn SelectionPosition(model.pdoc->MovePositionOutsideChar(positionInLine + posLineStart, 1));\r\n\t\t\t}\r\n\t\t\tif (virtualSpace) {\r\n\t\t\t\tconst XYPOSITION spaceWidth = vs.styles[ll->EndLineStyle()].spaceWidth;\r\n\t\t\t\tconst int spaceOffset = static_cast<int>(\r\n\t\t\t\t\t(pt.x + subLineStart - ll->positions[rangeSubLine.end] + spaceWidth / 2) / spaceWidth);\r\n\t\t\t\treturn SelectionPosition(rangeSubLine.end + posLineStart, spaceOffset);\r\n\t\t\t} else if (canReturnInvalid) {\r\n\t\t\t\tif (pt.x < (ll->positions[rangeSubLine.end] - subLineStart)) {\r\n\t\t\t\t\treturn SelectionPosition(model.pdoc->MovePositionOutsideChar(rangeSubLine.end + posLineStart, 1));\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\treturn SelectionPosition(rangeSubLine.end + posLineStart);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (!canReturnInvalid)\r\n\t\t\treturn SelectionPosition(ll->numCharsInLine + posLineStart);\r\n\t}\r\n\treturn SelectionPosition(canReturnInvalid ? Sci::invalidPosition : posLineStart);\r\n}\r\n\r\n/**\r\n* Find the document position corresponding to an x coordinate on a particular document line.\r\n* Ensure is between whole characters when document is in multi-byte or UTF-8 mode.\r\n* This method is used for rectangular selections and does not work on wrapped lines.\r\n*/\r\nSelectionPosition EditView::SPositionFromLineX(Surface *surface, const EditModel &model, Sci::Line lineDoc, int x, const ViewStyle &vs) {\r\n\tstd::shared_ptr<LineLayout> ll = RetrieveLineLayout(lineDoc, model);\r\n\tif (surface && ll) {\r\n\t\tconst Sci::Position posLineStart = model.pdoc->LineStart(lineDoc);\r\n\t\tLayoutLine(model, surface, vs, ll.get(), model.wrapWidth);\r\n\t\tconst Range rangeSubLine = ll->SubLineRange(0, LineLayout::Scope::visibleOnly);\r\n\t\tconst XYPOSITION subLineStart = ll->positions[rangeSubLine.start];\r\n\t\tconst Sci::Position positionInLine = ll->FindPositionFromX(x + subLineStart, rangeSubLine, false);\r\n\t\tif (positionInLine < rangeSubLine.end) {\r\n\t\t\treturn SelectionPosition(model.pdoc->MovePositionOutsideChar(positionInLine + posLineStart, 1));\r\n\t\t}\r\n\t\tconst XYPOSITION spaceWidth = vs.styles[ll->EndLineStyle()].spaceWidth;\r\n\t\tconst int spaceOffset = static_cast<int>(\r\n\t\t\t(x + subLineStart - ll->positions[rangeSubLine.end] + spaceWidth / 2) / spaceWidth);\r\n\t\treturn SelectionPosition(rangeSubLine.end + posLineStart, spaceOffset);\r\n\t}\r\n\treturn SelectionPosition(0);\r\n}\r\n\r\nSci::Line EditView::DisplayFromPosition(Surface *surface, const EditModel &model, Sci::Position pos, const ViewStyle &vs) {\r\n\tconst Sci::Line lineDoc = model.pdoc->SciLineFromPosition(pos);\r\n\tSci::Line lineDisplay = model.pcs->DisplayFromDoc(lineDoc);\r\n\tstd::shared_ptr<LineLayout> ll = RetrieveLineLayout(lineDoc, model);\r\n\tif (surface && ll) {\r\n\t\tLayoutLine(model, surface, vs, ll.get(), model.wrapWidth);\r\n\t\tconst Sci::Position posLineStart = model.pdoc->LineStart(lineDoc);\r\n\t\tconst Sci::Position posInLine = pos - posLineStart;\r\n\t\tlineDisplay--; // To make up for first increment ahead.\r\n\t\tfor (int subLine = 0; subLine < ll->lines; subLine++) {\r\n\t\t\tif (posInLine >= ll->LineStart(subLine)) {\r\n\t\t\t\tlineDisplay++;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn lineDisplay;\r\n}\r\n\r\nSci::Position EditView::StartEndDisplayLine(Surface *surface, const EditModel &model, Sci::Position pos, bool start, const ViewStyle &vs) {\r\n\tconst Sci::Line line = model.pdoc->SciLineFromPosition(pos);\r\n\tstd::shared_ptr<LineLayout> ll = RetrieveLineLayout(line, model);\r\n\tSci::Position posRet = Sci::invalidPosition;\r\n\tif (surface && ll) {\r\n\t\tconst Sci::Position posLineStart = model.pdoc->LineStart(line);\r\n\t\tLayoutLine(model, surface, vs, ll.get(), model.wrapWidth);\r\n\t\tconst Sci::Position posInLine = pos - posLineStart;\r\n\t\tif (posInLine <= ll->maxLineLength) {\r\n\t\t\tfor (int subLine = 0; subLine < ll->lines; subLine++) {\r\n\t\t\t\tif ((posInLine >= ll->LineStart(subLine)) &&\r\n\t\t\t\t    (posInLine <= ll->LineStart(subLine + 1)) &&\r\n\t\t\t\t    (posInLine <= ll->numCharsBeforeEOL)) {\r\n\t\t\t\t\tif (start) {\r\n\t\t\t\t\t\tposRet = ll->LineStart(subLine) + posLineStart;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (subLine == ll->lines - 1)\r\n\t\t\t\t\t\t\tposRet = ll->numCharsBeforeEOL + posLineStart;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tposRet = model.pdoc->MovePositionOutsideChar(ll->LineStart(subLine + 1) + posLineStart - 1, -1, false);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn posRet;\r\n}\r\n\r\nnamespace {\r\n\r\nconstexpr ColourRGBA colourBug(0xff, 0, 0xfe, 0xf0);\r\n\r\n// Selection background colours are always defined, the value_or is to show if bug\r\n\r\nColourRGBA SelectionBackground(const EditModel &model, const ViewStyle &vsDraw, InSelection inSelection) {\r\n\tif (inSelection == InSelection::inNone)\r\n\t\treturn colourBug;\t// Not selected is a bug\r\n\r\n\tElement element = Element::SelectionBack;\r\n\tif (inSelection == InSelection::inAdditional)\r\n\t\telement = Element::SelectionAdditionalBack;\r\n\tif (!model.primarySelection)\r\n\t\telement = Element::SelectionSecondaryBack;\r\n\tif (!model.hasFocus) {\r\n\t\tif (inSelection == InSelection::inAdditional) {\r\n\t\t\tif (ColourOptional colour = vsDraw.ElementColour(Element::SelectionInactiveAdditionalBack)) {\r\n\t\t\t\treturn *colour;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (ColourOptional colour = vsDraw.ElementColour(Element::SelectionInactiveBack)) {\r\n\t\t\treturn *colour;\r\n\t\t}\r\n\t}\r\n\treturn vsDraw.ElementColour(element).value_or(colourBug);\r\n}\r\n\r\nColourOptional SelectionForeground(const EditModel &model, const ViewStyle &vsDraw, InSelection inSelection) {\r\n\tif (inSelection == InSelection::inNone)\r\n\t\treturn {};\r\n\tElement element = Element::SelectionText;\r\n\tif (inSelection == InSelection::inAdditional)\r\n\t\telement = Element::SelectionAdditionalText;\r\n\tif (!model.primarySelection)\t// Secondary selection\r\n\t\telement = Element::SelectionSecondaryText;\r\n\tif (!model.hasFocus) {\r\n\t\tif (inSelection == InSelection::inAdditional) {\r\n\t\t\tif (ColourOptional colour = vsDraw.ElementColour(Element::SelectionInactiveAdditionalText)) {\r\n\t\t\t\treturn colour;\r\n\t\t\t}\r\n\t\t}\r\n\t\telement = Element::SelectionInactiveText;\r\n\t}\r\n\treturn vsDraw.ElementColour(element);\r\n}\r\n\r\nColourRGBA TextBackground(const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll,\r\n\tColourOptional background, InSelection inSelection, bool inHotspot, int styleMain, Sci::Position i) {\r\n\tif (inSelection && (vsDraw.selection.layer == Layer::Base)) {\r\n\t\treturn SelectionBackground(model, vsDraw, inSelection).Opaque();\r\n\t}\r\n\tif ((vsDraw.edgeState == EdgeVisualStyle::Background) &&\r\n\t\t(i >= ll->edgeColumn) &&\r\n\t\t(i < ll->numCharsBeforeEOL))\r\n\t\treturn vsDraw.theEdge.colour;\r\n\tif (inHotspot) {\r\n\t\tif (const ColourOptional colourHotSpotBack = vsDraw.ElementColour(Element::HotSpotActiveBack)) {\r\n\t\t\treturn colourHotSpotBack->Opaque();\r\n\t\t}\r\n\t}\r\n\tif (background && (styleMain != StyleBraceLight) && (styleMain != StyleBraceBad)) {\r\n\t\treturn *background;\r\n\t} else {\r\n\t\treturn vsDraw.styles[styleMain].back;\r\n\t}\r\n}\r\n\r\nvoid DrawTextBlob(Surface *surface, const ViewStyle &vsDraw, PRectangle rcSegment,\r\n\tstd::string_view text, ColourRGBA textBack, ColourRGBA textFore, bool fillBackground) {\r\n\tif (rcSegment.Empty())\r\n\t\treturn;\r\n\tif (fillBackground) {\r\n\t\tsurface->FillRectangleAligned(rcSegment, Fill(textBack));\r\n\t}\r\n\tconst Font *ctrlCharsFont = vsDraw.styles[StyleControlChar].font.get();\r\n\tconst int normalCharHeight = static_cast<int>(std::ceil(vsDraw.styles[StyleControlChar].capitalHeight));\r\n\tPRectangle rcCChar = rcSegment;\r\n\trcCChar.left = rcCChar.left + 1;\r\n\trcCChar.top = rcSegment.top + vsDraw.maxAscent - normalCharHeight;\r\n\trcCChar.bottom = rcSegment.top + vsDraw.maxAscent + 1;\r\n\tPRectangle rcCentral = rcCChar;\r\n\trcCentral.top++;\r\n\trcCentral.bottom--;\r\n\tsurface->FillRectangleAligned(rcCentral, Fill(textFore));\r\n\tPRectangle rcChar = rcCChar;\r\n\trcChar.left++;\r\n\trcChar.right--;\r\n\tsurface->DrawTextClippedUTF8(rcChar, ctrlCharsFont,\r\n\t\trcSegment.top + vsDraw.maxAscent, text,\r\n\t\ttextBack, textFore);\r\n}\r\n\r\nvoid FillLineRemainder(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll,\r\n\tSci::Line line, PRectangle rcArea, int subLine) {\r\n\tInSelection eolInSelection = InSelection::inNone;\r\n\tif (vsDraw.selection.visible && (subLine == (ll->lines - 1))) {\r\n\t\teolInSelection = model.LineEndInSelection(line);\r\n\t}\r\n\r\n\tif (eolInSelection && vsDraw.selection.eolFilled && (line < model.pdoc->LinesTotal() - 1) && (vsDraw.selection.layer == Layer::Base)) {\r\n\t\tsurface->FillRectangleAligned(rcArea, Fill(SelectionBackground(model, vsDraw, eolInSelection).Opaque()));\r\n\t} else {\r\n\t\tconst ColourOptional background = vsDraw.Background(model.GetMark(line), model.caret.active, ll->containsCaret);\r\n\t\tif (background) {\r\n\t\t\tsurface->FillRectangleAligned(rcArea, Fill(*background));\r\n\t\t} else if (vsDraw.styles[ll->styles[ll->numCharsInLine]].eolFilled) {\r\n\t\t\tsurface->FillRectangleAligned(rcArea, Fill(vsDraw.styles[ll->styles[ll->numCharsInLine]].back));\r\n\t\t} else {\r\n\t\t\tsurface->FillRectangleAligned(rcArea, Fill(vsDraw.styles[StyleDefault].back));\r\n\t\t}\r\n\t\tif (eolInSelection && vsDraw.selection.eolFilled && (line < model.pdoc->LinesTotal() - 1) && (vsDraw.selection.layer != Layer::Base)) {\r\n\t\t\tsurface->FillRectangleAligned(rcArea, SelectionBackground(model, vsDraw, eolInSelection));\r\n\t\t}\r\n\t}\r\n}\r\n\r\n}\r\n\r\nvoid EditView::DrawEOL(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll,\r\n\tSci::Line line, int xStart, PRectangle rcLine, int subLine, Sci::Position lineEnd, XYPOSITION subLineStart, ColourOptional background) {\r\n\r\n\tconst Sci::Position posLineStart = model.pdoc->LineStart(line);\r\n\tPRectangle rcSegment = rcLine;\r\n\r\n\tconst bool lastSubLine = subLine == (ll->lines - 1);\r\n\tXYPOSITION virtualSpace = 0;\r\n\tif (lastSubLine) {\r\n\t\tconst XYPOSITION spaceWidth = vsDraw.styles[ll->EndLineStyle()].spaceWidth;\r\n\t\tvirtualSpace = model.sel.VirtualSpaceFor(model.pdoc->LineEnd(line)) * spaceWidth;\r\n\t}\r\n\tconst XYPOSITION xEol = ll->positions[lineEnd] - subLineStart;\r\n\r\n\t// Fill the virtual space and show selections within it\r\n\tif (virtualSpace > 0.0f) {\r\n\t\trcSegment.left = xEol + xStart;\r\n\t\trcSegment.right = xEol + xStart + virtualSpace;\r\n\t\tconst ColourRGBA backgroundFill = background.value_or(vsDraw.styles[ll->styles[ll->numCharsInLine]].back);\r\n\t\tsurface->FillRectangleAligned(rcSegment, backgroundFill);\r\n\t\tif (vsDraw.selection.visible && (vsDraw.selection.layer == Layer::Base)) {\r\n\t\t\tconst SelectionSegment virtualSpaceRange(SelectionPosition(model.pdoc->LineEnd(line)),\r\n\t\t\t\tSelectionPosition(model.pdoc->LineEnd(line),\r\n\t\t\t\t\tmodel.sel.VirtualSpaceFor(model.pdoc->LineEnd(line))));\r\n\t\t\tfor (size_t r = 0; r<model.sel.Count(); r++) {\r\n\t\t\t\tconst SelectionSegment portion = model.sel.Range(r).Intersect(virtualSpaceRange);\r\n\t\t\t\tif (!portion.Empty()) {\r\n\t\t\t\t\tconst XYPOSITION spaceWidth = vsDraw.styles[ll->EndLineStyle()].spaceWidth;\r\n\t\t\t\t\trcSegment.left = xStart + ll->positions[portion.start.Position() - posLineStart] -\r\n\t\t\t\t\t\tsubLineStart+portion.start.VirtualSpace() * spaceWidth;\r\n\t\t\t\t\trcSegment.right = xStart + ll->positions[portion.end.Position() - posLineStart] -\r\n\t\t\t\t\t\tsubLineStart+portion.end.VirtualSpace() * spaceWidth;\r\n\t\t\t\t\trcSegment.left = (rcSegment.left > rcLine.left) ? rcSegment.left : rcLine.left;\r\n\t\t\t\t\trcSegment.right = (rcSegment.right < rcLine.right) ? rcSegment.right : rcLine.right;\r\n\t\t\t\t\tsurface->FillRectangleAligned(rcSegment, Fill(\r\n\t\t\t\t\t\tSelectionBackground(model, vsDraw, model.sel.RangeType(r)).Opaque()));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tInSelection eolInSelection = InSelection::inNone;\r\n\tif (vsDraw.selection.visible && lastSubLine) {\r\n\t\teolInSelection = model.LineEndInSelection(line);\r\n\t}\r\n\r\n\tconst ColourRGBA selectionBack = SelectionBackground(model, vsDraw, eolInSelection);\r\n\r\n\t// Draw the [CR], [LF], or [CR][LF] blobs if visible line ends are on\r\n\tXYPOSITION blobsWidth = 0;\r\n\tif (lastSubLine) {\r\n\t\tfor (Sci::Position eolPos = ll->numCharsBeforeEOL; eolPos<ll->numCharsInLine;) {\r\n\t\t\tconst int styleMain = ll->styles[eolPos];\r\n\t\t\tconst ColourOptional selectionFore = SelectionForeground(model, vsDraw, eolInSelection);\r\n\t\t\tColourRGBA textFore = selectionFore.value_or(vsDraw.styles[styleMain].fore);\r\n\t\t\tchar hexits[4] = \"\";\r\n\t\t\tstd::string_view ctrlChar;\r\n\t\t\tSci::Position widthBytes = 1;\r\n\t\t\tRepresentationAppearance appearance = RepresentationAppearance::Blob;\r\n\t\t\tconst Representation *repr = model.reprs.RepresentationFromCharacter(std::string_view(&ll->chars[eolPos], ll->numCharsInLine - eolPos));\r\n\t\t\tif (repr) {\r\n\t\t\t\t// Representation of whole text\r\n\t\t\t\twidthBytes = ll->numCharsInLine - eolPos;\r\n\t\t\t} else {\r\n\t\t\t\trepr = model.reprs.RepresentationFromCharacter(std::string_view(&ll->chars[eolPos], 1));\r\n\t\t\t}\r\n\t\t\tif (repr) {\r\n\t\t\t\tctrlChar = repr->stringRep;\r\n\t\t\t\tappearance = repr->appearance;\r\n\t\t\t\tif (FlagSet(appearance, RepresentationAppearance::Colour)) {\r\n\t\t\t\t\ttextFore = repr->colour;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tconst unsigned char chEOL = ll->chars[eolPos];\r\n\t\t\t\tif (UTF8IsAscii(chEOL)) {\r\n\t\t\t\t\tctrlChar = ControlCharacterString(chEOL);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tHexits(hexits, chEOL);\r\n\t\t\t\t\tctrlChar = hexits;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\trcSegment.left = xStart + ll->positions[eolPos] - subLineStart + virtualSpace;\r\n\t\t\trcSegment.right = xStart + ll->positions[eolPos + widthBytes] - subLineStart + virtualSpace;\r\n\t\t\tblobsWidth += rcSegment.Width();\r\n\t\t\tconst ColourRGBA textBack = TextBackground(model, vsDraw, ll, background, eolInSelection, false, styleMain, eolPos);\r\n\t\t\tif (eolInSelection && (line < model.pdoc->LinesTotal() - 1)) {\r\n\t\t\t\tif (vsDraw.selection.layer == Layer::Base) {\r\n\t\t\t\t\tsurface->FillRectangleAligned(rcSegment, Fill(selectionBack.Opaque()));\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsurface->FillRectangleAligned(rcSegment, Fill(textBack));\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tsurface->FillRectangleAligned(rcSegment, Fill(textBack));\r\n\t\t\t}\r\n\t\t\tconst bool drawEOLSelection = eolInSelection && (line < model.pdoc->LinesTotal() - 1);\r\n\t\t\tColourRGBA blobText = textBack;\r\n\t\t\tif (drawEOLSelection && (vsDraw.selection.layer == Layer::UnderText)) {\r\n\t\t\t\tsurface->FillRectangleAligned(rcSegment, selectionBack);\r\n\t\t\t\tblobText = textBack.MixedWith(selectionBack, selectionBack.GetAlphaComponent());\r\n\t\t\t}\r\n\t\t\tif (FlagSet(appearance, RepresentationAppearance::Blob)) {\r\n\t\t\t\tDrawTextBlob(surface, vsDraw, rcSegment, ctrlChar, blobText, textFore, phasesDraw == PhasesDraw::One);\r\n\t\t\t} else {\r\n\t\t\t\tsurface->DrawTextTransparentUTF8(rcSegment, vsDraw.styles[StyleControlChar].font.get(),\r\n\t\t\t\t\trcSegment.top + vsDraw.maxAscent, ctrlChar, textFore);\r\n\t\t\t}\r\n\t\t\tif (drawEOLSelection && (vsDraw.selection.layer == Layer::OverText)) {\r\n\t\t\t\tsurface->FillRectangleAligned(rcSegment, selectionBack);\r\n\t\t\t}\r\n\t\t\teolPos += widthBytes;\r\n\t\t}\r\n\t}\r\n\r\n\t// Draw the eol-is-selected rectangle\r\n\trcSegment.left = xEol + xStart + virtualSpace + blobsWidth;\r\n\trcSegment.right = rcSegment.left + vsDraw.aveCharWidth;\r\n\r\n\tif (eolInSelection && (line < model.pdoc->LinesTotal() - 1) && (vsDraw.selection.layer == Layer::Base)) {\r\n\t\tsurface->FillRectangleAligned(rcSegment, Fill(selectionBack.Opaque()));\r\n\t} else {\r\n\t\tif (background) {\r\n\t\t\tsurface->FillRectangleAligned(rcSegment, Fill(*background));\r\n\t\t} else if (line < model.pdoc->LinesTotal() - 1) {\r\n\t\t\tsurface->FillRectangleAligned(rcSegment, Fill(vsDraw.styles[ll->styles[ll->numCharsInLine]].back));\r\n\t\t} else if (vsDraw.styles[ll->styles[ll->numCharsInLine]].eolFilled) {\r\n\t\t\tsurface->FillRectangleAligned(rcSegment, Fill(vsDraw.styles[ll->styles[ll->numCharsInLine]].back));\r\n\t\t} else {\r\n\t\t\tsurface->FillRectangleAligned(rcSegment, Fill(vsDraw.styles[StyleDefault].back));\r\n\t\t}\r\n\t\tif (eolInSelection && (line < model.pdoc->LinesTotal() - 1) && (vsDraw.selection.layer != Layer::Base)) {\r\n\t\t\tsurface->FillRectangleAligned(rcSegment, selectionBack);\r\n\t\t}\r\n\t}\r\n\r\n\trcSegment.left = rcSegment.right;\r\n\tif (rcSegment.left < rcLine.left)\r\n\t\trcSegment.left = rcLine.left;\r\n\trcSegment.right = rcLine.right;\r\n\r\n\tconst bool drawEOLAnnotationStyledText = (vsDraw.eolAnnotationVisible != EOLAnnotationVisible::Hidden) && model.pdoc->EOLAnnotationStyledText(line).text;\r\n\tconst bool fillRemainder = (!lastSubLine || (!model.GetFoldDisplayText(line) && !drawEOLAnnotationStyledText));\r\n\tif (fillRemainder) {\r\n\t\t// Fill the remainder of the line\r\n\t\tFillLineRemainder(surface, model, vsDraw, ll, line, rcSegment, subLine);\r\n\t}\r\n\r\n\tbool drawWrapMarkEnd = false;\r\n\r\n\tif (subLine + 1 < ll->lines) {\r\n\t\tif (FlagSet(vsDraw.wrap.visualFlags, WrapVisualFlag::End)) {\r\n\t\t\tdrawWrapMarkEnd = ll->LineStart(subLine + 1) != 0;\r\n\t\t}\r\n\t\tif (vsDraw.IsLineFrameOpaque(model.caret.active, ll->containsCaret)) {\r\n\t\t\t// Draw right of frame under marker\r\n\t\t\tsurface->FillRectangleAligned(Side(rcLine, Edge::right, vsDraw.GetFrameWidth()),\r\n\t\t\t\tvsDraw.ElementColourForced(Element::CaretLineBack).Opaque());\r\n\t\t}\r\n\t}\r\n\r\n\tif (drawWrapMarkEnd) {\r\n\t\tPRectangle rcPlace = rcSegment;\r\n\t\tconst XYPOSITION maxLeft = rcPlace.right - vsDraw.aveCharWidth;\r\n\r\n\t\tif (FlagSet(vsDraw.wrap.visualFlagsLocation, WrapVisualLocation::EndByText)) {\r\n\t\t\trcPlace.left = std::min(xEol + xStart + virtualSpace, maxLeft);\r\n\t\t\trcPlace.right = rcPlace.left + vsDraw.aveCharWidth;\r\n\t\t} else {\r\n\t\t\t// rcLine is clipped to text area\r\n\t\t\trcPlace.right = rcLine.right;\r\n\t\t\trcPlace.left = maxLeft;\r\n\t\t}\r\n\t\tif (!customDrawWrapMarker) {\r\n\t\t\tDrawWrapMarker(surface, rcPlace, true, vsDraw.WrapColour());\r\n\t\t} else {\r\n\t\t\tcustomDrawWrapMarker(surface, rcPlace, true, vsDraw.WrapColour());\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid EditView::DrawFoldDisplayText(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll,\r\n\t\t\t\t\t\t\t  Sci::Line line, int xStart, PRectangle rcLine, int subLine, XYPOSITION subLineStart, DrawPhase phase) {\r\n\tconst bool lastSubLine = subLine == (ll->lines - 1);\r\n\tif (!lastSubLine)\r\n\t\treturn;\r\n\r\n\tconst char *text = model.GetFoldDisplayText(line);\r\n\tif (!text)\r\n\t\treturn;\r\n\r\n\tPRectangle rcSegment = rcLine;\r\n\tconst std::string_view foldDisplayText(text);\r\n\tconst Font *fontText = vsDraw.styles[StyleFoldDisplayText].font.get();\r\n\tconst int widthFoldDisplayText = static_cast<int>(surface->WidthText(fontText, foldDisplayText));\r\n\r\n\tInSelection eolInSelection = InSelection::inNone;\r\n\tif (vsDraw.selection.visible) {\r\n\t\teolInSelection = model.LineEndInSelection(line);\r\n\t}\r\n\r\n\tconst XYPOSITION spaceWidth = vsDraw.styles[ll->EndLineStyle()].spaceWidth;\r\n\tconst XYPOSITION virtualSpace = model.sel.VirtualSpaceFor(\r\n\t\tmodel.pdoc->LineEnd(line)) * spaceWidth;\r\n\trcSegment.left = xStart + ll->positions[ll->numCharsInLine] - subLineStart + virtualSpace + vsDraw.aveCharWidth;\r\n\trcSegment.right = rcSegment.left + static_cast<XYPOSITION>(widthFoldDisplayText);\r\n\r\n\tconst ColourOptional background = vsDraw.Background(model.GetMark(line), model.caret.active, ll->containsCaret);\r\n\tconst ColourOptional selectionFore = SelectionForeground(model, vsDraw, eolInSelection);\r\n\tconst ColourRGBA textFore = selectionFore.value_or(vsDraw.styles[StyleFoldDisplayText].fore);\r\n\tconst ColourRGBA textBack = TextBackground(model, vsDraw, ll, background, eolInSelection,\r\n\t\t\t\t\t\t\t\t\t\t\tfalse, StyleFoldDisplayText, -1);\r\n\r\n\tif (model.trackLineWidth) {\r\n\t\tif (rcSegment.right + 1> lineWidthMaxSeen) {\r\n\t\t\t// Fold display text border drawn on rcSegment.right with width 1 is the last visible object of the line\r\n\t\t\tlineWidthMaxSeen = static_cast<int>(rcSegment.right + 1);\r\n\t\t}\r\n\t}\r\n\r\n\tif (FlagSet(phase, DrawPhase::back)) {\r\n\t\tsurface->FillRectangleAligned(rcSegment, Fill(textBack));\r\n\r\n\t\t// Fill Remainder of the line\r\n\t\tPRectangle rcRemainder = rcSegment;\r\n\t\trcRemainder.left = rcRemainder.right;\r\n\t\tif (rcRemainder.left < rcLine.left)\r\n\t\t\trcRemainder.left = rcLine.left;\r\n\t\trcRemainder.right = rcLine.right;\r\n\t\tFillLineRemainder(surface, model, vsDraw, ll, line, rcRemainder, subLine);\r\n\t}\r\n\r\n\tif (FlagSet(phase, DrawPhase::text)) {\r\n\t\tif (phasesDraw != PhasesDraw::One) {\r\n\t\t\tsurface->DrawTextTransparent(rcSegment, fontText,\r\n\t\t\t\trcSegment.top + vsDraw.maxAscent, foldDisplayText,\r\n\t\t\t\ttextFore);\r\n\t\t} else {\r\n\t\t\tsurface->DrawTextNoClip(rcSegment, fontText,\r\n\t\t\t\trcSegment.top + vsDraw.maxAscent, foldDisplayText,\r\n\t\t\t\ttextFore, textBack);\r\n\t\t}\r\n\t}\r\n\r\n\tif (FlagSet(phase, DrawPhase::indicatorsFore)) {\r\n\t\tif (model.foldDisplayTextStyle == FoldDisplayTextStyle::Boxed) {\r\n\t\t\tPRectangle rcBox = rcSegment;\r\n\t\t\trcBox.left = std::round(rcSegment.left);\r\n\t\t\trcBox.right = std::round(rcSegment.right);\r\n\t\t\tsurface->RectangleFrame(rcBox, Stroke(textFore));\r\n\t\t}\r\n\t}\r\n\r\n\tif (FlagSet(phase, DrawPhase::selectionTranslucent)) {\r\n\t\tif (eolInSelection && (line < model.pdoc->LinesTotal() - 1) && (vsDraw.selection.layer != Layer::Base)) {\r\n\t\t\tsurface->FillRectangleAligned(rcSegment, SelectionBackground(model, vsDraw, eolInSelection));\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid EditView::DrawEOLAnnotationText(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll,\r\n\tSci::Line line, int xStart, PRectangle rcLine, int subLine, XYPOSITION subLineStart, DrawPhase phase) {\r\n\r\n\tconst bool lastSubLine = subLine == (ll->lines - 1);\r\n\tif (!lastSubLine)\r\n\t\treturn;\r\n\r\n\tif (vsDraw.eolAnnotationVisible == EOLAnnotationVisible::Hidden) {\r\n\t\treturn;\r\n\t}\r\n\tconst StyledText stEOLAnnotation = model.pdoc->EOLAnnotationStyledText(line);\r\n\tif (!stEOLAnnotation.text || !ValidStyledText(vsDraw, vsDraw.eolAnnotationStyleOffset, stEOLAnnotation)) {\r\n\t\treturn;\r\n\t}\r\n\tconst std::string_view eolAnnotationText(stEOLAnnotation.text, stEOLAnnotation.length);\r\n\tconst size_t style = stEOLAnnotation.style + vsDraw.eolAnnotationStyleOffset;\r\n\r\n\tPRectangle rcSegment = rcLine;\r\n\tconst Font *fontText = vsDraw.styles[style].font.get();\r\n\r\n\tconst Surface::Ends ends = static_cast<Surface::Ends>(static_cast<int>(vsDraw.eolAnnotationVisible) & 0xff);\r\n\tconst Surface::Ends leftSide = static_cast<Surface::Ends>(static_cast<int>(ends) & 0xf);\r\n\tconst Surface::Ends rightSide = static_cast<Surface::Ends>(static_cast<int>(ends) & 0xf0);\r\n\r\n\tXYPOSITION leftBoxSpace = 0;\r\n\tXYPOSITION rightBoxSpace = 0;\r\n\tif (vsDraw.eolAnnotationVisible >= EOLAnnotationVisible::Boxed) {\r\n\t\tleftBoxSpace = 1;\r\n\t\trightBoxSpace = 1;\r\n\t\tif (vsDraw.eolAnnotationVisible != EOLAnnotationVisible::Boxed) {\r\n\t\t\tswitch (leftSide) {\r\n\t\t\tcase Surface::Ends::leftFlat:\r\n\t\t\t\tleftBoxSpace = 1;\r\n\t\t\t\tbreak;\r\n\t\t\tcase Surface::Ends::leftAngle:\r\n\t\t\t\tleftBoxSpace = rcLine.Height() / 2.0;\r\n\t\t\t\tbreak;\r\n\t\t\tcase Surface::Ends::semiCircles:\r\n\t\t\tdefault:\r\n\t\t\t\tleftBoxSpace = rcLine.Height() / 3.0;\r\n\t\t\t   break;\r\n\t\t\t}\r\n\t\t\tswitch (rightSide) {\r\n\t\t\tcase Surface::Ends::rightFlat:\r\n\t\t\t\trightBoxSpace = 1;\r\n\t\t\t\tbreak;\r\n\t\t\tcase Surface::Ends::rightAngle:\r\n\t\t\t\trightBoxSpace = rcLine.Height() / 2.0;\r\n\t\t\t\tbreak;\r\n\t\t\tcase Surface::Ends::semiCircles:\r\n\t\t\tdefault:\r\n\t\t\t\trightBoxSpace = rcLine.Height() / 3.0;\r\n\t\t\t   break;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tconst int widthEOLAnnotationText = static_cast<int>(surface->WidthTextUTF8(fontText, eolAnnotationText) +\r\n\t\tleftBoxSpace + rightBoxSpace);\r\n\r\n\tconst XYPOSITION spaceWidth = vsDraw.styles[ll->EndLineStyle()].spaceWidth;\r\n\tconst XYPOSITION virtualSpace = model.sel.VirtualSpaceFor(\r\n\t\tmodel.pdoc->LineEnd(line)) * spaceWidth;\r\n\trcSegment.left = xStart +\r\n\t\tll->positions[ll->numCharsInLine] - subLineStart\r\n\t\t+ virtualSpace + vsDraw.aveCharWidth;\r\n\r\n\tconst char *textFoldDisplay = model.GetFoldDisplayText(line);\r\n\tif (textFoldDisplay) {\r\n\t\tconst std::string_view foldDisplayText(textFoldDisplay);\r\n\t\trcSegment.left += static_cast<int>(\r\n\t\t\tsurface->WidthText(vsDraw.styles[StyleFoldDisplayText].font.get(), foldDisplayText)) +\r\n\t\t\tvsDraw.aveCharWidth;\r\n\t}\r\n\trcSegment.right = rcSegment.left + static_cast<XYPOSITION>(widthEOLAnnotationText);\r\n\r\n\tconst ColourOptional background = vsDraw.Background(model.GetMark(line), model.caret.active, ll->containsCaret);\r\n\tconst ColourRGBA textFore = vsDraw.styles[style].fore;\r\n\tconst ColourRGBA textBack = TextBackground(model, vsDraw, ll, background, InSelection::inNone,\r\n\t\t\t\t\t\t\t\t\t\t\tfalse, static_cast<int>(style), -1);\r\n\r\n\tif (model.trackLineWidth) {\r\n\t\tif (rcSegment.right + 1> lineWidthMaxSeen) {\r\n\t\t\t// EOL Annotation text border drawn on rcSegment.right with width 1 is the last visible object of the line\r\n\t\t\tlineWidthMaxSeen = static_cast<int>(rcSegment.right + 1);\r\n\t\t}\r\n\t}\r\n\r\n\tif (FlagSet(phase, DrawPhase::back)) {\r\n\t\t// This fills in the whole remainder of the line even though\r\n\t\t// it may be double drawing. This is to allow stadiums with\r\n\t\t// curved or angled ends to have the area outside in the correct\r\n\t\t// background colour.\r\n\t\tPRectangle rcRemainder = rcSegment;\r\n\t\trcRemainder.right = rcLine.right;\r\n\t\tFillLineRemainder(surface, model, vsDraw, ll, line, rcRemainder, subLine);\r\n\t}\r\n\r\n\tPRectangle rcText = rcSegment;\r\n\trcText.left += leftBoxSpace;\r\n\trcText.right -= rightBoxSpace;\r\n\r\n\t// For single phase drawing, draw the text then any box over it\r\n\tif (FlagSet(phase, DrawPhase::text)) {\r\n\t\tif (phasesDraw == PhasesDraw::One) {\r\n\t\t\tsurface->DrawTextNoClipUTF8(rcText, fontText,\r\n\t\t\trcText.top + vsDraw.maxAscent, eolAnnotationText,\r\n\t\t\ttextFore, textBack);\r\n\t\t}\r\n\t}\r\n\r\n\t// Draw any box or stadium shape\r\n\tif (FlagSet(phase, DrawPhase::indicatorsBack)) {\r\n\t\tconst PRectangle rcBox = PixelAlign(rcSegment, 1);\r\n\r\n\t\tswitch (vsDraw.eolAnnotationVisible) {\r\n\t\tcase EOLAnnotationVisible::Standard:\r\n\t\t\tif (phasesDraw != PhasesDraw::One) {\r\n\t\t\t\tsurface->FillRectangle(rcBox, textBack);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\tcase EOLAnnotationVisible::Boxed:\r\n\t\t\tif (phasesDraw == PhasesDraw::One) {\r\n\t\t\t\t// Draw a rectangular outline around the text\r\n\t\t\t\tsurface->RectangleFrame(rcBox, textFore);\r\n\t\t\t} else {\r\n\t\t\t\t// Draw with a fill to fill the edges of the rectangle.\r\n\t\t\t\tsurface->RectangleDraw(rcBox, FillStroke(textBack, textFore));\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\tdefault:\r\n\t\t\tif (phasesDraw == PhasesDraw::One) {\r\n\t\t\t\t// Draw an outline around the text\r\n\t\t\t\tsurface->Stadium(rcBox, FillStroke(ColourRGBA(textBack, 0), textFore), ends);\r\n\t\t\t} else {\r\n\t\t\t\t// Draw with a fill to fill the edges of the shape.\r\n\t\t\t\tsurface->Stadium(rcBox, FillStroke(textBack, textFore), ends);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\t// For multi-phase drawing draw the text last as transparent over any box\r\n\tif (FlagSet(phase, DrawPhase::text)) {\r\n\t\tif (phasesDraw != PhasesDraw::One) {\r\n\t\t\tsurface->DrawTextTransparentUTF8(rcText, fontText,\r\n\t\t\t\trcText.top + vsDraw.maxAscent, eolAnnotationText,\r\n\t\t\t\ttextFore);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nnamespace {\r\n\r\nconstexpr bool AnnotationBoxedOrIndented(AnnotationVisible annotationVisible) noexcept {\r\n\treturn annotationVisible == AnnotationVisible::Boxed || annotationVisible == AnnotationVisible::Indented;\r\n}\r\n\r\n}\r\n\r\nvoid EditView::DrawAnnotation(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll,\r\n\tSci::Line line, int xStart, PRectangle rcLine, int subLine, DrawPhase phase) {\r\n\tconst int indent = static_cast<int>(model.pdoc->GetLineIndentation(line) * vsDraw.spaceWidth);\r\n\tPRectangle rcSegment = rcLine;\r\n\tconst int annotationLine = subLine - ll->lines;\r\n\tconst StyledText stAnnotation = model.pdoc->AnnotationStyledText(line);\r\n\tif (stAnnotation.text && ValidStyledText(vsDraw, vsDraw.annotationStyleOffset, stAnnotation)) {\r\n\t\tif (FlagSet(phase, DrawPhase::back)) {\r\n\t\t\tsurface->FillRectangleAligned(rcSegment, Fill(vsDraw.styles[0].back));\r\n\t\t}\r\n\t\trcSegment.left = static_cast<XYPOSITION>(xStart);\r\n\t\tif (model.trackLineWidth || AnnotationBoxedOrIndented(vsDraw.annotationVisible)) {\r\n\t\t\t// Only care about calculating width if tracking or need to draw indented box\r\n\t\t\tint widthAnnotation = WidestLineWidth(surface, vsDraw, vsDraw.annotationStyleOffset, stAnnotation);\r\n\t\t\tif (AnnotationBoxedOrIndented(vsDraw.annotationVisible)) {\r\n\t\t\t\twidthAnnotation += static_cast<int>(vsDraw.spaceWidth * 2); // Margins\r\n\t\t\t\trcSegment.left = static_cast<XYPOSITION>(xStart + indent);\r\n\t\t\t\trcSegment.right = rcSegment.left + widthAnnotation;\r\n\t\t\t}\r\n\t\t\tif (widthAnnotation > lineWidthMaxSeen)\r\n\t\t\t\tlineWidthMaxSeen = widthAnnotation;\r\n\t\t}\r\n\t\tconst int annotationLines = model.pdoc->AnnotationLines(line);\r\n\t\tsize_t start = 0;\r\n\t\tsize_t lengthAnnotation = stAnnotation.LineLength(start);\r\n\t\tint lineInAnnotation = 0;\r\n\t\twhile ((lineInAnnotation < annotationLine) && (start < stAnnotation.length)) {\r\n\t\t\tstart += lengthAnnotation + 1;\r\n\t\t\tlengthAnnotation = stAnnotation.LineLength(start);\r\n\t\t\tlineInAnnotation++;\r\n\t\t}\r\n\t\tPRectangle rcText = rcSegment;\r\n\t\tif ((FlagSet(phase, DrawPhase::back)) && AnnotationBoxedOrIndented(vsDraw.annotationVisible)) {\r\n\t\t\tsurface->FillRectangleAligned(rcText,\r\n\t\t\t\tFill(vsDraw.styles[stAnnotation.StyleAt(start) + vsDraw.annotationStyleOffset].back));\r\n\t\t\trcText.left += vsDraw.spaceWidth;\r\n\t\t}\r\n\t\tDrawStyledText(surface, vsDraw, vsDraw.annotationStyleOffset, rcText,\r\n\t\t\tstAnnotation, start, lengthAnnotation, phase);\r\n\t\tif ((FlagSet(phase, DrawPhase::back)) && (vsDraw.annotationVisible == AnnotationVisible::Boxed)) {\r\n\t\t\tconst ColourRGBA colourBorder = vsDraw.styles[vsDraw.annotationStyleOffset].fore;\r\n\t\t\tconst PRectangle rcBorder = PixelAlignOutside(rcSegment, surface->PixelDivisions());\r\n\t\t\tsurface->FillRectangle(Side(rcBorder, Edge::left, 1), colourBorder);\r\n\t\t\tsurface->FillRectangle(Side(rcBorder, Edge::right, 1), colourBorder);\r\n\t\t\tif (subLine == ll->lines) {\r\n\t\t\t\tsurface->FillRectangle(Side(rcBorder, Edge::top, 1), colourBorder);\r\n\t\t\t}\r\n\t\t\tif (subLine == ll->lines + annotationLines - 1) {\r\n\t\t\t\tsurface->FillRectangle(Side(rcBorder, Edge::bottom, 1), colourBorder);\r\n\t\t\t}\r\n\t\t}\r\n\t} else {\r\n\t\t// No annotation to draw so show bug with colourBug\r\n\t\tif (FlagSet(phase, DrawPhase::back)) {\r\n\t\t\tsurface->FillRectangle(rcSegment, colourBug.Opaque());\r\n\t\t}\r\n\t}\r\n}\r\n\r\nnamespace {\r\n\r\nvoid DrawBlockCaret(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll,\r\n\tint subLine, int xStart, Sci::Position offset, Sci::Position posCaret, PRectangle rcCaret, ColourRGBA caretColour) {\r\n\r\n\tconst Sci::Position lineStart = ll->LineStart(subLine);\r\n\tSci::Position posBefore = posCaret;\r\n\tSci::Position posAfter = model.pdoc->MovePositionOutsideChar(posCaret + 1, 1);\r\n\tSci::Position numCharsToDraw = posAfter - posCaret;\r\n\r\n\t// Work out where the starting and ending offsets are. We need to\r\n\t// see if the previous character shares horizontal space, such as a\r\n\t// glyph / combining character. If so we'll need to draw that too.\r\n\tSci::Position offsetFirstChar = offset;\r\n\tSci::Position offsetLastChar = offset + (posAfter - posCaret);\r\n\twhile ((posBefore > 0) && ((offsetLastChar - numCharsToDraw) >= lineStart)) {\r\n\t\tif ((ll->positions[offsetLastChar] - ll->positions[offsetLastChar - numCharsToDraw]) > 0) {\r\n\t\t\t// The char does not share horizontal space\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t// Char shares horizontal space, update the numChars to draw\r\n\t\t// Update posBefore to point to the prev char\r\n\t\tposBefore = model.pdoc->MovePositionOutsideChar(posBefore - 1, -1);\r\n\t\tnumCharsToDraw = posAfter - posBefore;\r\n\t\toffsetFirstChar = offset - (posCaret - posBefore);\r\n\t}\r\n\r\n\t// See if the next character shares horizontal space, if so we'll\r\n\t// need to draw that too.\r\n\tif (offsetFirstChar < 0)\r\n\t\toffsetFirstChar = 0;\r\n\tnumCharsToDraw = offsetLastChar - offsetFirstChar;\r\n\twhile ((offsetLastChar < ll->LineStart(subLine + 1)) && (offsetLastChar <= ll->numCharsInLine)) {\r\n\t\t// Update posAfter to point to the 2nd next char, this is where\r\n\t\t// the next character ends, and 2nd next begins. We'll need\r\n\t\t// to compare these two\r\n\t\tposBefore = posAfter;\r\n\t\tposAfter = model.pdoc->MovePositionOutsideChar(posAfter + 1, 1);\r\n\t\toffsetLastChar = offset + (posAfter - posCaret);\r\n\t\tif ((ll->positions[offsetLastChar] - ll->positions[offsetLastChar - (posAfter - posBefore)]) > 0) {\r\n\t\t\t// The char does not share horizontal space\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t// Char shares horizontal space, update the numChars to draw\r\n\t\tnumCharsToDraw = offsetLastChar - offsetFirstChar;\r\n\t}\r\n\r\n\t// We now know what to draw, update the caret drawing rectangle\r\n\trcCaret.left = ll->positions[offsetFirstChar] - ll->positions[lineStart] + xStart;\r\n\trcCaret.right = ll->positions[offsetFirstChar + numCharsToDraw] - ll->positions[lineStart] + xStart;\r\n\r\n\t// Adjust caret position to take into account any word wrapping symbols.\r\n\tif ((ll->wrapIndent != 0) && (lineStart != 0)) {\r\n\t\tconst XYPOSITION wordWrapCharWidth = ll->wrapIndent;\r\n\t\trcCaret.left += wordWrapCharWidth;\r\n\t\trcCaret.right += wordWrapCharWidth;\r\n\t}\r\n\r\n\t// This character is where the caret block is, we override the colours\r\n\t// (inversed) for drawing the caret here.\r\n\tconst int styleMain = ll->styles[offsetFirstChar];\r\n\tconst Font *fontText = vsDraw.styles[styleMain].font.get();\r\n\tconst std::string_view text(&ll->chars[offsetFirstChar], numCharsToDraw);\r\n\tsurface->DrawTextClipped(rcCaret, fontText,\r\n\t\trcCaret.top + vsDraw.maxAscent, text, vsDraw.styles[styleMain].back,\r\n\t\tcaretColour);\r\n}\r\n\r\n}\r\n\r\nvoid EditView::DrawCarets(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll,\r\n\tSci::Line lineDoc, int xStart, PRectangle rcLine, int subLine) const {\r\n\t// When drag is active it is the only caret drawn\r\n\tconst bool drawDrag = model.posDrag.IsValid();\r\n\tif (!vsDraw.selection.visible && !drawDrag)\r\n\t\treturn;\r\n\tconst Sci::Position posLineStart = model.pdoc->LineStart(lineDoc);\r\n\t// For each selection draw\r\n\tfor (size_t r = 0; (r<model.sel.Count()) || drawDrag; r++) {\r\n\t\tconst bool mainCaret = r == model.sel.Main();\r\n\t\tSelectionPosition posCaret = (drawDrag ? model.posDrag : model.sel.Range(r).caret);\r\n\t\tif ((vsDraw.DrawCaretInsideSelection(model.inOverstrike, imeCaretBlockOverride)) &&\r\n\t\t\t!drawDrag &&\r\n\t\t\tposCaret > model.sel.Range(r).anchor) {\r\n\t\t\tif (posCaret.VirtualSpace() > 0)\r\n\t\t\t\tposCaret.SetVirtualSpace(posCaret.VirtualSpace() - 1);\r\n\t\t\telse\r\n\t\t\t\tposCaret.SetPosition(model.pdoc->MovePositionOutsideChar(posCaret.Position()-1, -1));\r\n\t\t}\r\n\t\tconst int offset = static_cast<int>(posCaret.Position() - posLineStart);\r\n\t\tconst XYPOSITION spaceWidth = vsDraw.styles[ll->EndLineStyle()].spaceWidth;\r\n\t\tconst XYPOSITION virtualOffset = posCaret.VirtualSpace() * spaceWidth;\r\n\t\tif (ll->InLine(offset, subLine) && offset <= ll->numCharsBeforeEOL) {\r\n\t\t\tXYPOSITION xposCaret = ll->positions[offset] + virtualOffset - ll->positions[ll->LineStart(subLine)];\r\n\t\t\tif (model.BidirectionalEnabled() && (posCaret.VirtualSpace() == 0)) {\r\n\t\t\t\t// Get caret point\r\n\t\t\t\tconst ScreenLine screenLine(ll, subLine, vsDraw, rcLine.right, tabWidthMinimumPixels);\r\n\r\n\t\t\t\tconst int caretPosition = offset - ll->LineStart(subLine);\r\n\r\n\t\t\t\tstd::unique_ptr<IScreenLineLayout> slLayout = surface->Layout(&screenLine);\r\n\t\t\t\tconst XYPOSITION caretLeft = slLayout->XFromPosition(caretPosition);\r\n\r\n\t\t\t\t// In case of start of line, the cursor should be at the right\r\n\t\t\t\txposCaret = caretLeft + virtualOffset;\r\n\t\t\t}\r\n\t\t\tif (ll->wrapIndent != 0) {\r\n\t\t\t\tconst Sci::Position lineStart = ll->LineStart(subLine);\r\n\t\t\t\tif (lineStart != 0)\t// Wrapped\r\n\t\t\t\t\txposCaret += ll->wrapIndent;\r\n\t\t\t}\r\n\t\t\tconst bool caretBlinkState = (model.caret.active && model.caret.on) || (!additionalCaretsBlink && !mainCaret);\r\n\t\t\tconst bool caretVisibleState = additionalCaretsVisible || mainCaret;\r\n\t\t\tif ((xposCaret >= 0) && vsDraw.IsCaretVisible(mainCaret) &&\r\n\t\t\t\t(drawDrag || (caretBlinkState && caretVisibleState))) {\r\n\t\t\t\tbool canDrawBlockCaret = true;\r\n\t\t\t\tbool drawBlockCaret = false;\r\n\t\t\t\tXYPOSITION widthOverstrikeCaret;\r\n\t\t\t\tXYPOSITION caretWidthOffset = 0;\r\n\t\t\t\tPRectangle rcCaret = rcLine;\r\n\r\n\t\t\t\tif (posCaret.Position() == model.pdoc->Length()) {   // At end of document\r\n\t\t\t\t\tcanDrawBlockCaret = false;\r\n\t\t\t\t\twidthOverstrikeCaret = vsDraw.aveCharWidth;\r\n\t\t\t\t} else if ((posCaret.Position() - posLineStart) >= ll->numCharsInLine) {\t// At end of line\r\n\t\t\t\t\tcanDrawBlockCaret = false;\r\n\t\t\t\t\twidthOverstrikeCaret = vsDraw.aveCharWidth;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tconst int widthChar = model.pdoc->LenChar(posCaret.Position());\r\n\t\t\t\t\twidthOverstrikeCaret = ll->positions[offset + widthChar] - ll->positions[offset];\r\n\t\t\t\t}\r\n\t\t\t\tif (widthOverstrikeCaret < 3)\t// Make sure its visible\r\n\t\t\t\t\twidthOverstrikeCaret = 3;\r\n\r\n\t\t\t\tif (xposCaret > 0)\r\n\t\t\t\t\tcaretWidthOffset = 0.51f;\t// Move back so overlaps both character cells.\r\n\t\t\t\txposCaret += xStart;\r\n\t\t\t\tconst ViewStyle::CaretShape caretShape = drawDrag ? ViewStyle::CaretShape::line :\r\n\t\t\t\t\tvsDraw.CaretShapeForMode(model.inOverstrike, mainCaret);\r\n\t\t\t\tif (drawDrag) {\r\n\t\t\t\t\t/* Dragging text, use a line caret */\r\n\t\t\t\t\trcCaret.left = std::round(xposCaret - caretWidthOffset);\r\n\t\t\t\t\trcCaret.right = rcCaret.left + vsDraw.caret.width;\r\n\t\t\t\t} else if ((caretShape == ViewStyle::CaretShape::bar) && drawOverstrikeCaret) {\r\n\t\t\t\t\t/* Over-strike (insert mode), use a modified bar caret */\r\n\t\t\t\t\trcCaret.top = rcCaret.bottom - 2;\r\n\t\t\t\t\trcCaret.left = xposCaret + 1;\r\n\t\t\t\t\trcCaret.right = rcCaret.left + widthOverstrikeCaret - 1;\r\n\t\t\t\t} else if ((caretShape == ViewStyle::CaretShape::block) || imeCaretBlockOverride) {\r\n\t\t\t\t\t/* Block caret */\r\n\t\t\t\t\trcCaret.left = xposCaret;\r\n\t\t\t\t\tif (canDrawBlockCaret && !(IsControl(ll->chars[offset]))) {\r\n\t\t\t\t\t\tdrawBlockCaret = true;\r\n\t\t\t\t\t\trcCaret.right = xposCaret + widthOverstrikeCaret;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\trcCaret.right = xposCaret + vsDraw.aveCharWidth;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t/* Line caret */\r\n\t\t\t\t\trcCaret.left = std::round(xposCaret - caretWidthOffset);\r\n\t\t\t\t\trcCaret.right = rcCaret.left + vsDraw.caret.width;\r\n\t\t\t\t}\r\n\t\t\t\tconst Element elementCaret = mainCaret ? Element::Caret : Element::CaretAdditional;\r\n\t\t\t\tconst ColourRGBA caretColour = vsDraw.ElementColourForced(elementCaret);\r\n\t\t\t\t//assert(caretColour.IsOpaque());\r\n\t\t\t\tif (drawBlockCaret) {\r\n\t\t\t\t\tDrawBlockCaret(surface, model, vsDraw, ll, subLine, xStart, offset, posCaret.Position(), rcCaret, caretColour);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsurface->FillRectangleAligned(rcCaret, Fill(caretColour));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (drawDrag)\r\n\t\t\tbreak;\r\n\t}\r\n}\r\n\r\nnamespace {\r\n\r\nvoid DrawWrapIndentAndMarker(Surface *surface, const ViewStyle &vsDraw, const LineLayout *ll,\r\n\tint xStart, PRectangle rcLine, ColourOptional background, DrawWrapMarkerFn customDrawWrapMarker,\r\n\tbool caretActive) {\r\n\t// default background here..\r\n\tsurface->FillRectangleAligned(rcLine, Fill(background.value_or(vsDraw.styles[StyleDefault].back)));\r\n\r\n\tif (vsDraw.IsLineFrameOpaque(caretActive, ll->containsCaret)) {\r\n\t\t// Draw left of frame under marker\r\n\t\tsurface->FillRectangleAligned(Side(rcLine, Edge::left, vsDraw.GetFrameWidth()),\r\n\t\t\tvsDraw.ElementColourForced(Element::CaretLineBack).Opaque());\r\n\t}\r\n\r\n\tif (FlagSet(vsDraw.wrap.visualFlags, WrapVisualFlag::Start)) {\r\n\r\n\t\t// draw continuation rect\r\n\t\tPRectangle rcPlace = rcLine;\r\n\r\n\t\trcPlace.left = static_cast<XYPOSITION>(xStart);\r\n\t\trcPlace.right = rcPlace.left + ll->wrapIndent;\r\n\r\n\t\tif (FlagSet(vsDraw.wrap.visualFlagsLocation, WrapVisualLocation::StartByText))\r\n\t\t\trcPlace.left = rcPlace.right - vsDraw.aveCharWidth;\r\n\t\telse\r\n\t\t\trcPlace.right = rcPlace.left + vsDraw.aveCharWidth;\r\n\r\n\t\tif (!customDrawWrapMarker) {\r\n\t\t\tDrawWrapMarker(surface, rcPlace, false, vsDraw.WrapColour());\r\n\t\t} else {\r\n\t\t\tcustomDrawWrapMarker(surface, rcPlace, false, vsDraw.WrapColour());\r\n\t\t}\r\n\t}\r\n}\r\n\r\n// On the curses platform, the terminal is drawing its own caret, so if the caret is within\r\n// the main selection, do not draw the selection at that position.\r\n// Use iDoc from DrawBackground and DrawForeground here because TextSegment has been adjusted\r\n// such that, if the caret is inside the main selection, the beginning or end of that selection\r\n// is at the end of a text segment.\r\n// This function should only be called if iDoc is within the main selection.\r\nInSelection CharacterInCursesSelection(Sci::Position iDoc, const EditModel &model, const ViewStyle &vsDraw) noexcept {\r\n\tconst SelectionPosition &posCaret = model.sel.RangeMain().caret;\r\n\tconst bool caretAtStart = posCaret < model.sel.RangeMain().anchor && posCaret.Position() == iDoc;\r\n\tconst bool caretAtEnd = posCaret > model.sel.RangeMain().anchor &&\r\n\t\tvsDraw.DrawCaretInsideSelection(false, false) &&\r\n\t\tmodel.pdoc->MovePositionOutsideChar(posCaret.Position() - 1, -1) == iDoc;\r\n\treturn (caretAtStart || caretAtEnd) ? InSelection::inNone : InSelection::inMain;\r\n}\r\n\r\nvoid DrawBackground(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll,\r\n\tint xStart, PRectangle rcLine, int subLine, Range lineRange, Sci::Position posLineStart,\r\n\tColourOptional background) {\r\n\r\n\tconst bool selBackDrawn = vsDraw.SelectionBackgroundDrawn();\r\n\tbool inIndentation = subLine == 0;\t// Do not handle indentation except on first subline.\r\n\tconst XYPOSITION subLineStart = ll->positions[lineRange.start];\r\n\tconst XYPOSITION horizontalOffset = xStart - subLineStart;\r\n\t// Does not take margin into account but not significant\r\n\tconst XYPOSITION xStartVisible = subLineStart - xStart;\r\n\r\n\tconst BreakFinder::BreakFor breakFor = selBackDrawn ? BreakFinder::BreakFor::Selection : BreakFinder::BreakFor::Text;\r\n\tBreakFinder bfBack(ll, &model.sel, lineRange, posLineStart, xStartVisible, breakFor, model.pdoc, &model.reprs, &vsDraw);\r\n\r\n\tconst bool drawWhitespaceBackground = vsDraw.WhitespaceBackgroundDrawn() && !background;\r\n\r\n\t// Background drawing loop\r\n\twhile (bfBack.More()) {\r\n\r\n\t\tconst TextSegment ts = bfBack.Next();\r\n\t\tconst Sci::Position i = ts.end() - 1;\r\n\t\tconst Sci::Position iDoc = i + posLineStart;\r\n\r\n\t\tconst Interval horizontal = ll->Span(ts.start, ts.end()).Offset(horizontalOffset);\r\n\t\t// Only try to draw if really visible - enhances performance by not calling environment to\r\n\t\t// draw strings that are completely past the right side of the window.\r\n\t\tif (!horizontal.Empty() && rcLine.Intersects(horizontal)) {\r\n\t\t\tconst PRectangle rcSegment = Intersection(rcLine, horizontal);\r\n\r\n\t\t\tInSelection inSelection = vsDraw.selection.visible ? model.sel.CharacterInSelection(iDoc) : InSelection::inNone;\r\n\t\t\tif (FlagSet(vsDraw.caret.style, CaretStyle::Curses) && (inSelection == InSelection::inMain))\r\n\t\t\t\tinSelection = CharacterInCursesSelection(iDoc, model, vsDraw);\r\n\t\t\tconst bool inHotspot = model.hotspot.Valid() && model.hotspot.ContainsCharacter(iDoc);\r\n\t\t\tColourRGBA textBack = TextBackground(model, vsDraw, ll, background, inSelection,\r\n\t\t\t\tinHotspot, ll->styles[i], i);\r\n\t\t\tif (ts.representation) {\r\n\t\t\t\tif (ll->chars[i] == '\\t') {\r\n\t\t\t\t\t// Tab display\r\n\t\t\t\t\tif (drawWhitespaceBackground && vsDraw.WhiteSpaceVisible(inIndentation)) {\r\n\t\t\t\t\t\ttextBack = vsDraw.ElementColourForced(Element::WhiteSpaceBack).Opaque();\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Blob display\r\n\t\t\t\t\tinIndentation = false;\r\n\t\t\t\t}\r\n\t\t\t\tsurface->FillRectangleAligned(rcSegment, Fill(textBack));\r\n\t\t\t} else {\r\n\t\t\t\t// Normal text display\r\n\t\t\t\tsurface->FillRectangleAligned(rcSegment, Fill(textBack));\r\n\t\t\t\tif (vsDraw.viewWhitespace != WhiteSpace::Invisible) {\r\n\t\t\t\t\tfor (int cpos = 0; cpos <= i - ts.start; cpos++) {\r\n\t\t\t\t\t\tif (ll->chars[cpos + ts.start] == ' ') {\r\n\t\t\t\t\t\t\tif (drawWhitespaceBackground && vsDraw.WhiteSpaceVisible(inIndentation)) {\r\n\t\t\t\t\t\t\t\tconst PRectangle rcSpace = Intersection(rcLine,\r\n\t\t\t\t\t\t\t\t\tll->SpanByte(cpos + ts.start).Offset(horizontalOffset));\r\n\t\t\t\t\t\t\t\tsurface->FillRectangleAligned(rcSpace,\r\n\t\t\t\t\t\t\t\t\tvsDraw.ElementColourForced(Element::WhiteSpaceBack).Opaque());\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tinIndentation = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (horizontal.left > rcLine.right) {\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid DrawEdgeLine(Surface *surface, const ViewStyle &vsDraw, const LineLayout *ll,\r\n\tint xStart, PRectangle rcLine, Range lineRange) {\r\n\tif (vsDraw.edgeState == EdgeVisualStyle::Line) {\r\n\t\tPRectangle rcSegment = rcLine;\r\n\t\tconst int edgeX = static_cast<int>(vsDraw.theEdge.column * vsDraw.spaceWidth);\r\n\t\trcSegment.left = static_cast<XYPOSITION>(edgeX + xStart);\r\n\t\tif ((ll->wrapIndent != 0) && (lineRange.start != 0))\r\n\t\t\trcSegment.left -= ll->wrapIndent;\r\n\t\trcSegment.right = rcSegment.left + 1;\r\n\t\tsurface->FillRectangleAligned(rcSegment, Fill(vsDraw.theEdge.colour));\r\n\t} else if (vsDraw.edgeState == EdgeVisualStyle::MultiLine) {\r\n\t\tfor (size_t edge = 0; edge < vsDraw.theMultiEdge.size(); edge++) {\r\n\t\t\tif (vsDraw.theMultiEdge[edge].column >= 0) {\r\n\t\t\t\tPRectangle rcSegment = rcLine;\r\n\t\t\t\tconst int edgeX = static_cast<int>(vsDraw.theMultiEdge[edge].column * vsDraw.spaceWidth);\r\n\t\t\t\trcSegment.left = static_cast<XYPOSITION>(edgeX + xStart);\r\n\t\t\t\tif ((ll->wrapIndent != 0) && (lineRange.start != 0))\r\n\t\t\t\t\trcSegment.left -= ll->wrapIndent;\r\n\t\t\t\trcSegment.right = rcSegment.left + 1;\r\n\t\t\t\tsurface->FillRectangleAligned(rcSegment, Fill(vsDraw.theMultiEdge[edge].colour));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n// Draw underline mark as part of background if on base layer\r\nvoid DrawMarkUnderline(Surface *surface, const EditModel &model, const ViewStyle &vsDraw,\r\n\tSci::Line line, PRectangle rcLine) {\r\n\tint marks = model.GetMark(line);\r\n\tfor (int markBit = 0; (markBit <= MarkerMax) && marks; markBit++) {\r\n\t\tif ((marks & 1) && (vsDraw.markers[markBit].markType == MarkerSymbol::Underline) &&\r\n\t\t\t(vsDraw.markers[markBit].layer == Layer::Base)) {\r\n\t\t\tPRectangle rcUnderline = rcLine;\r\n\t\t\trcUnderline.top = rcUnderline.bottom - 2;\r\n\t\t\tsurface->FillRectangleAligned(rcUnderline, Fill(vsDraw.markers[markBit].back));\r\n\t\t}\r\n\t\tmarks >>= 1;\r\n\t}\r\n}\r\n\r\nvoid DrawTranslucentSelection(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll,\r\n\tSci::Line line, int xStart, PRectangle rcLine, int subLine, Range lineRange, int tabWidthMinimumPixels, Layer layer) {\r\n\tif (vsDraw.selection.layer == layer) {\r\n\t\tconst Sci::Position posLineStart = model.pdoc->LineStart(line);\r\n\t\tconst XYPOSITION subLineStart = ll->positions[lineRange.start];\r\n\t\tconst XYPOSITION horizontalOffset = xStart - subLineStart;\r\n\t\t// For each selection draw\r\n\t\tSci::Position virtualSpaces = 0;\r\n\t\tif (subLine == (ll->lines - 1)) {\r\n\t\t\tvirtualSpaces = model.sel.VirtualSpaceFor(model.pdoc->LineEnd(line));\r\n\t\t}\r\n\t\tconst SelectionPosition posStart(posLineStart + lineRange.start);\r\n\t\tconst SelectionPosition posEnd(posLineStart + lineRange.end, virtualSpaces);\r\n\t\tconst SelectionSegment virtualSpaceRange(posStart, posEnd);\r\n\t\tfor (size_t r = 0; r < model.sel.Count(); r++) {\r\n\t\t\tconst SelectionSegment portion = model.sel.Range(r).Intersect(virtualSpaceRange);\r\n\t\t\tif (!portion.Empty()) {\r\n\t\t\t\tconst SelectionSegment portionInLine = portion.Subtract(posLineStart);\r\n\t\t\t\tconst ColourRGBA selectionBack = SelectionBackground(\r\n\t\t\t\t\tmodel, vsDraw, model.sel.RangeType(r));\r\n\t\t\t\tconst XYPOSITION spaceWidth = vsDraw.styles[ll->EndLineStyle()].spaceWidth;\r\n\t\t\t\tconst Interval intervalVirtual{ portion.start.VirtualSpace() * spaceWidth, portion.end.VirtualSpace() * spaceWidth };\r\n\t\t\t\tif (model.BidirectionalEnabled()) {\r\n\t\t\t\t\tconst SelectionSegment portionInSubLine = portionInLine.Subtract(lineRange.start);\r\n\r\n\t\t\t\t\tconst ScreenLine screenLine(ll, subLine, vsDraw, rcLine.right, tabWidthMinimumPixels);\r\n\t\t\t\t\tstd::unique_ptr<IScreenLineLayout> slLayout = surface->Layout(&screenLine);\r\n\r\n\t\t\t\t\tif (slLayout) {\r\n\t\t\t\t\t\tconst std::vector<Interval> intervals = slLayout->FindRangeIntervals(\r\n\t\t\t\t\t\t\tportionInSubLine.start.Position(), portionInSubLine.end.Position());\r\n\t\t\t\t\t\tfor (const Interval &interval : intervals) {\r\n\t\t\t\t\t\t\tconst PRectangle rcSelection = rcLine.WithHorizontalBounds(interval.Offset(xStart));\r\n\t\t\t\t\t\t\tsurface->FillRectangleAligned(rcSelection, selectionBack);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (portion.end.VirtualSpace()) {\r\n\t\t\t\t\t\tconst XYPOSITION xStartVirtual = ll->positions[lineRange.end] + horizontalOffset;\r\n\t\t\t\t\t\tconst PRectangle rcSegment = rcLine.WithHorizontalBounds(intervalVirtual.Offset(xStartVirtual));\r\n\t\t\t\t\t\tsurface->FillRectangleAligned(rcSegment, selectionBack);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tInterval intervalSegment = ll->Span(\r\n\t\t\t\t\t\tstatic_cast<int>(portionInLine.start.Position()),\r\n\t\t\t\t\t\tstatic_cast<int>(portionInLine.end.Position()))\r\n\t\t\t\t\t\t.Offset(horizontalOffset);\r\n\t\t\t\t\tintervalSegment.left += intervalVirtual.left;\r\n\t\t\t\t\tintervalSegment.right += intervalVirtual.right;\r\n\t\t\t\t\tif ((ll->wrapIndent != 0) && (lineRange.start != 0)) {\r\n\t\t\t\t\t\tif ((portionInLine.start.Position() == lineRange.start) &&\r\n\t\t\t\t\t\t\tmodel.sel.Range(r).ContainsCharacter(portion.start.Position() - 1))\r\n\t\t\t\t\t\t\tintervalSegment.left -= static_cast<int>(ll->wrapIndent); // indentation added to xStart was truncated to int, so we do the same here\r\n\t\t\t\t\t}\r\n\t\t\t\t\tconst PRectangle rcSegment = Intersection(rcLine, intervalSegment);\r\n\t\t\t\t\tif (rcSegment.right > rcLine.left)\r\n\t\t\t\t\t\tsurface->FillRectangleAligned(rcSegment, selectionBack);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid DrawCaretLineFramed(Surface *surface, const ViewStyle &vsDraw, const LineLayout *ll,\r\n\tPRectangle rcLine, int subLine) {\r\n\tconst ColourOptional caretlineBack = vsDraw.ElementColour(Element::CaretLineBack);\r\n\tif (!caretlineBack) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tconst ColourRGBA colourFrame = (vsDraw.caretLine.layer == Layer::Base) ?\r\n\t\tcaretlineBack->Opaque() : *caretlineBack;\r\n\r\n\tconst int width = vsDraw.GetFrameWidth();\r\n\r\n\t// Avoid double drawing the corners by removing the left and right sides when drawing top and bottom borders\r\n\tconst PRectangle rcWithoutLeftRight = rcLine.Inset(Point(width, 0.0));\r\n\r\n\tif (subLine == 0 || ll->wrapIndent == 0 || vsDraw.caretLine.layer != Layer::Base || vsDraw.caretLine.subLine) {\r\n\t\t// Left\r\n\t\tsurface->FillRectangleAligned(Side(rcLine, Edge::left, width), colourFrame);\r\n\t}\r\n\tif (subLine == 0 || vsDraw.caretLine.subLine) {\r\n\t\t// Top\r\n\t\tsurface->FillRectangleAligned(Side(rcWithoutLeftRight, Edge::top, width), colourFrame);\r\n\t}\r\n\tif (subLine == ll->lines - 1 || vsDraw.caretLine.layer != Layer::Base || vsDraw.caretLine.subLine) {\r\n\t\t// Right\r\n\t\tsurface->FillRectangleAligned(Side(rcLine, Edge::right, width), colourFrame);\r\n\t}\r\n\tif (subLine == ll->lines - 1 || vsDraw.caretLine.subLine) {\r\n\t\t// Bottom\r\n\t\tsurface->FillRectangleAligned(Side(rcWithoutLeftRight, Edge::bottom, width), colourFrame);\r\n\t}\r\n}\r\n\r\n// Draw any translucent whole line states\r\nvoid DrawTranslucentLineState(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll,\r\n\tSci::Line line, PRectangle rcLine, int subLine, Layer layer) {\r\n\tif ((model.caret.active || vsDraw.caretLine.alwaysShow) && vsDraw.ElementColour(Element::CaretLineBack) && ll->containsCaret &&\r\n\t\tvsDraw.caretLine.layer == layer) {\r\n\t\tif (vsDraw.caretLine.frame) {\r\n\t\t\tDrawCaretLineFramed(surface, vsDraw, ll, rcLine, subLine);\r\n\t\t} else {\r\n\t\t\tsurface->FillRectangleAligned(rcLine, vsDraw.ElementColourForced(Element::CaretLineBack));\r\n\t\t}\r\n\t}\r\n\tconst int marksOfLine = model.GetMark(line);\r\n\tint marksDrawnInText = marksOfLine & vsDraw.maskDrawInText;\r\n\tfor (int markBit = 0; (markBit <= MarkerMax) && marksDrawnInText; markBit++) {\r\n\t\tif ((marksDrawnInText & 1) && (vsDraw.markers[markBit].layer == layer)) {\r\n\t\t\tif (vsDraw.markers[markBit].markType == MarkerSymbol::Background) {\r\n\t\t\t\tsurface->FillRectangleAligned(rcLine, vsDraw.markers[markBit].BackWithAlpha());\r\n\t\t\t} else if (vsDraw.markers[markBit].markType == MarkerSymbol::Underline) {\r\n\t\t\t\tPRectangle rcUnderline = rcLine;\r\n\t\t\t\trcUnderline.top = rcUnderline.bottom - 2;\r\n\t\t\t\tsurface->FillRectangleAligned(rcUnderline, vsDraw.markers[markBit].BackWithAlpha());\r\n\t\t\t}\r\n\t\t}\r\n\t\tmarksDrawnInText >>= 1;\r\n\t}\r\n\tint marksDrawnInLine = marksOfLine & vsDraw.maskInLine;\r\n\tfor (int markBit = 0; (markBit <= MarkerMax) && marksDrawnInLine; markBit++) {\r\n\t\tif ((marksDrawnInLine & 1) && (vsDraw.markers[markBit].layer == layer)) {\r\n\t\t\tsurface->FillRectangleAligned(rcLine, vsDraw.markers[markBit].BackWithAlpha());\r\n\t\t}\r\n\t\tmarksDrawnInLine >>= 1;\r\n\t}\r\n}\r\n\r\nvoid DrawTabArrow(Surface *surface, PRectangle rcTab, int ymid,\r\n\tconst ViewStyle &vsDraw, Stroke stroke) {\r\n\r\n\tconst XYPOSITION halfWidth = stroke.width / 2.0;\r\n\r\n\tconst XYPOSITION leftStroke = std::round(std::min(rcTab.left + 2, rcTab.right - 1)) + halfWidth;\r\n\tconst XYPOSITION rightStroke = std::max(leftStroke, std::round(rcTab.right) - 1.0f - halfWidth);\r\n\tconst XYPOSITION yMidAligned = ymid + halfWidth;\r\n\tconst Point arrowPoint(rightStroke, yMidAligned);\r\n\tif (rightStroke > leftStroke) {\r\n\t\t// When not enough room, don't draw the arrow shaft\r\n\t\tsurface->LineDraw(Point(leftStroke, yMidAligned), arrowPoint, stroke);\r\n\t}\r\n\r\n\t// Draw the arrow head if needed\r\n\tif (vsDraw.tabDrawMode == TabDrawMode::LongArrow) {\r\n\t\tXYPOSITION ydiff = std::floor(rcTab.Height() / 2.0f);\r\n\t\tXYPOSITION xhead = rightStroke - ydiff;\r\n\t\tif (xhead <= rcTab.left) {\r\n\t\t\tydiff -= rcTab.left - xhead;\r\n\t\t\txhead = rcTab.left;\r\n\t\t}\r\n\t\tconst Point ptsHead[] = {\r\n\t\t\tPoint(xhead, yMidAligned - ydiff),\r\n\t\t\tarrowPoint,\r\n\t\t\tPoint(xhead, yMidAligned + ydiff)\r\n\t\t};\r\n\t\tsurface->PolyLine(ptsHead, std::size(ptsHead), stroke);\r\n\t}\r\n}\r\n\r\nvoid DrawIndicator(int indicNum, Sci::Position startPos, Sci::Position endPos, Surface *surface, const ViewStyle &vsDraw,\r\n\tconst LineLayout *ll, int xStart, PRectangle rcLine, Sci::Position secondCharacter, int subLine, Indicator::State state,\r\n\tint value, bool bidiEnabled, int tabWidthMinimumPixels) {\r\n\r\n\tconst XYPOSITION subLineStart = ll->positions[ll->LineStart(subLine)];\r\n\tconst XYPOSITION horizontalOffset = xStart - subLineStart;\r\n\r\n\tstd::vector<PRectangle> rectangles;\r\n\r\n\tconst XYPOSITION left = ll->XInLine(startPos) + horizontalOffset;\r\n\tconst XYPOSITION right = ll->XInLine(endPos) + horizontalOffset;\r\n\tconst PRectangle rcIndic(left, rcLine.top + vsDraw.maxAscent, right,\r\n\t\tstd::max(rcLine.top + vsDraw.maxAscent + 3, rcLine.bottom));\r\n\r\n\tif (bidiEnabled) {\r\n\t\tScreenLine screenLine(ll, subLine, vsDraw, rcLine.right - xStart, tabWidthMinimumPixels);\r\n\t\tconst Range lineRange = ll->SubLineRange(subLine, LineLayout::Scope::visibleOnly);\r\n\r\n\t\tstd::unique_ptr<IScreenLineLayout> slLayout = surface->Layout(&screenLine);\r\n\t\tstd::vector<Interval> intervals = slLayout->FindRangeIntervals(\r\n\t\t\tstartPos - lineRange.start, endPos - lineRange.start);\r\n\t\tfor (const Interval &interval : intervals) {\r\n\t\t\tPRectangle rcInterval = rcIndic;\r\n\t\t\trcInterval.left = interval.left + xStart;\r\n\t\t\trcInterval.right = interval.right + xStart;\r\n\t\t\trectangles.push_back(rcInterval);\r\n\t\t}\r\n\t} else {\r\n\t\trectangles.push_back(rcIndic);\r\n\t}\r\n\r\n\tfor (const PRectangle &rc : rectangles) {\r\n\t\tPRectangle rcFirstCharacter = rc;\r\n\t\t// Allow full descent space for character indicators\r\n\t\trcFirstCharacter.bottom = rcLine.top + vsDraw.maxAscent + vsDraw.maxDescent;\r\n\t\tif (secondCharacter >= 0) {\r\n\t\t\trcFirstCharacter.right = ll->XInLine(secondCharacter) + horizontalOffset;\r\n\t\t} else {\r\n\t\t\t// Indicator continued from earlier line so make an empty box and don't draw\r\n\t\t\trcFirstCharacter.right = rcFirstCharacter.left;\r\n\t\t}\r\n\t\tvsDraw.indicators[indicNum].Draw(surface, rc, rcLine, rcFirstCharacter, state, value);\r\n\t}\r\n}\r\n\r\nvoid DrawIndicators(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll,\r\n\tSci::Line line, int xStart, PRectangle rcLine, int subLine, Sci::Position lineEnd, bool under, int tabWidthMinimumPixels) {\r\n\t// Draw decorators\r\n\tconst Sci::Position posLineStart = model.pdoc->LineStart(line);\r\n\tconst Sci::Position lineStart = ll->LineStart(subLine);\r\n\tconst Sci::Position posLineEnd = posLineStart + lineEnd;\r\n\r\n\tfor (const IDecoration *deco : model.pdoc->decorations->View()) {\r\n\t\tif (under == vsDraw.indicators[deco->Indicator()].under) {\r\n\t\t\tSci::Position startPos = posLineStart + lineStart;\r\n\t\t\twhile (startPos < posLineEnd) {\r\n\t\t\t\tconst Range rangeRun(deco->StartRun(startPos), deco->EndRun(startPos));\r\n\t\t\t\tconst Sci::Position endPos = std::min(rangeRun.end, posLineEnd);\r\n\t\t\t\tconst int value = deco->ValueAt(startPos);\r\n\t\t\t\tif (value) {\r\n\t\t\t\t\tconst bool hover = vsDraw.indicators[deco->Indicator()].IsDynamic() &&\r\n\t\t\t\t\t\trangeRun.ContainsCharacter(model.hoverIndicatorPos);\r\n\t\t\t\t\tconst Indicator::State state = hover ? Indicator::State::hover : Indicator::State::normal;\r\n\t\t\t\t\tconst Sci::Position posSecond = model.pdoc->MovePositionOutsideChar(rangeRun.First() + 1, 1);\r\n\t\t\t\t\tDrawIndicator(deco->Indicator(), startPos - posLineStart, endPos - posLineStart,\r\n\t\t\t\t\t\tsurface, vsDraw, ll, xStart, rcLine, posSecond - posLineStart, subLine, state,\r\n\t\t\t\t\t\tvalue, model.BidirectionalEnabled(), tabWidthMinimumPixels);\r\n\t\t\t\t}\r\n\t\t\t\tstartPos = endPos;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Use indicators to highlight matching braces\r\n\tif ((vsDraw.braceHighlightIndicatorSet && (model.bracesMatchStyle == StyleBraceLight)) ||\r\n\t\t(vsDraw.braceBadLightIndicatorSet && (model.bracesMatchStyle == StyleBraceBad))) {\r\n\t\tconst int braceIndicator = (model.bracesMatchStyle == StyleBraceLight) ? vsDraw.braceHighlightIndicator : vsDraw.braceBadLightIndicator;\r\n\t\tif (under == vsDraw.indicators[braceIndicator].under) {\r\n\t\t\tconst Range rangeLine(posLineStart + lineStart, posLineEnd);\r\n\t\t\tfor (size_t brace = 0; brace <= 1; brace++) {\r\n\t\t\t\tif (rangeLine.ContainsCharacter(model.braces[brace])) {\r\n\t\t\t\t\tconst Sci::Position braceOffset = model.braces[brace] - posLineStart;\r\n\t\t\t\t\tif (braceOffset < ll->numCharsInLine) {\r\n\t\t\t\t\t\tconst Sci::Position braceEnd = model.pdoc->MovePositionOutsideChar(model.braces[brace] + 1, 1) - posLineStart;\r\n\t\t\t\t\t\tDrawIndicator(braceIndicator, braceOffset, braceEnd,\r\n\t\t\t\t\t\t\tsurface, vsDraw, ll, xStart, rcLine, braceEnd, subLine, Indicator::State::normal,\r\n\t\t\t\t\t\t\t1, model.BidirectionalEnabled(), tabWidthMinimumPixels);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tif (FlagSet(model.changeHistoryOption, ChangeHistoryOption::Indicators)) {\r\n\t\t// Draw editions\r\n\t\tconstexpr int indexHistory = static_cast<int>(IndicatorNumbers::HistoryRevertedToOriginInsertion);\r\n\t\t{\r\n\t\t\t// Draw insertions\r\n\t\t\tSci::Position startPos = posLineStart + lineStart;\r\n\t\t\twhile (startPos < posLineEnd) {\r\n\t\t\t\tconst Range rangeRun(startPos, model.pdoc->EditionEndRun(startPos));\r\n\t\t\t\tconst Sci::Position endPos = std::min(rangeRun.end, posLineEnd);\r\n\t\t\t\tconst int edition = model.pdoc->EditionAt(startPos);\r\n\t\t\t\tif (edition != 0) {\r\n\t\t\t\t\tconst int indicator = (edition - 1) * 2 + indexHistory;\r\n\t\t\t\t\tconst Sci::Position posSecond = model.pdoc->MovePositionOutsideChar(rangeRun.First() + 1, 1);\r\n\t\t\t\t\tDrawIndicator(indicator, startPos - posLineStart, endPos - posLineStart,\r\n\t\t\t\t\t\tsurface, vsDraw, ll, xStart, rcLine, posSecond - posLineStart, subLine, Indicator::State::normal,\r\n\t\t\t\t\t\t1, model.BidirectionalEnabled(), tabWidthMinimumPixels);\r\n\t\t\t\t}\r\n\t\t\t\tstartPos = endPos;\r\n\t\t\t}\r\n\t\t}\r\n\t\t{\r\n\t\t\t// Draw deletions\r\n\t\t\tSci::Position startPos = posLineStart + lineStart;\r\n\t\t\twhile (startPos <= posLineEnd) {\r\n\t\t\t\tconst unsigned int editions = model.pdoc->EditionDeletesAt(startPos);\r\n\t\t\t\tconst Sci::Position posSecond = model.pdoc->MovePositionOutsideChar(startPos + 1, 1);\r\n\t\t\t\tfor (unsigned int edition = 0; edition < 4; edition++) {\r\n\t\t\t\t\tif (editions & (1 << edition)) {\r\n\t\t\t\t\t\tconst int indicator = edition * 2 + indexHistory + 1;\r\n\t\t\t\t\t\tDrawIndicator(indicator, startPos - posLineStart, posSecond - posLineStart,\r\n\t\t\t\t\t\t\tsurface, vsDraw, ll, xStart, rcLine, posSecond - posLineStart, subLine, Indicator::State::normal,\r\n\t\t\t\t\t\t\t1, model.BidirectionalEnabled(), tabWidthMinimumPixels);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tstartPos = model.pdoc->EditionNextDelete(startPos);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid DrawFoldLines(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll,\r\n\tSci::Line line, PRectangle rcLine, int subLine) {\r\n\tconst bool lastSubLine = subLine == (ll->lines - 1);\r\n\tconst bool expanded = model.pcs->GetExpanded(line);\r\n\tconst FoldLevel level = model.pdoc->GetFoldLevel(line);\r\n\tconst FoldLevel levelNext = model.pdoc->GetFoldLevel(line + 1);\r\n\tif (LevelIsHeader(level) &&\r\n\t\t(LevelNumber(level) < LevelNumber(levelNext))) {\r\n\t\tconst ColourRGBA foldLineColour = vsDraw.ElementColour(Element::FoldLine).value_or(\r\n\t\t\tvsDraw.styles[StyleDefault].fore);\r\n\t\t// Paint the line above the fold\r\n\t\tif ((subLine == 0) && FlagSet(model.foldFlags, (expanded ? FoldFlag::LineBeforeExpanded: FoldFlag::LineBeforeContracted))) {\r\n\t\t\tsurface->FillRectangleAligned(Side(rcLine, Edge::top, 1.0), foldLineColour);\r\n\t\t}\r\n\t\t// Paint the line below the fold\r\n\t\tif (lastSubLine && FlagSet(model.foldFlags, (expanded ? FoldFlag::LineAfterExpanded : FoldFlag::LineAfterContracted))) {\r\n\t\t\tsurface->FillRectangleAligned(Side(rcLine, Edge::bottom, 1.0), foldLineColour);\r\n\t\t\t// If contracted fold line drawn then don't overwrite with hidden line\r\n\t\t\t// as fold lines are more specific then hidden lines.\r\n\t\t\tif (!expanded) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (lastSubLine && model.pcs->GetVisible(line) && !model.pcs->GetVisible(line + 1)) {\r\n\t\tif (const ColourOptional hiddenLineColour = vsDraw.ElementColour(Element::HiddenLine)) {\r\n\t\t\tsurface->FillRectangleAligned(Side(rcLine, Edge::bottom, 1.0), *hiddenLineColour);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nColourRGBA InvertedLight(ColourRGBA orig) noexcept {\r\n\tunsigned int r = orig.GetRed();\r\n\tunsigned int g = orig.GetGreen();\r\n\tunsigned int b = orig.GetBlue();\r\n\tconst unsigned int l = (r + g + b) / 3; \t// There is a better calculation for this that matches human eye\r\n\tconst unsigned int il = 0xff - l;\r\n\tif (l == 0)\r\n\t\treturn white;\r\n\tr = r * il / l;\r\n\tg = g * il / l;\r\n\tb = b * il / l;\r\n\treturn ColourRGBA(std::min(r, 0xffu), std::min(g, 0xffu), std::min(b, 0xffu));\r\n}\r\n\r\n}\r\n\r\nvoid EditView::DrawIndentGuide(Surface *surface, XYPOSITION start, PRectangle rcSegment, bool highlight, bool offset) {\r\n\tconst Point from = Point::FromInts(0, offset ? 1 : 0);\r\n\tconst PRectangle rcCopyArea(start + 1, rcSegment.top,\r\n\t\tstart + 2, rcSegment.bottom);\r\n\tsurface->Copy(rcCopyArea, from,\r\n\t\thighlight ? *pixmapIndentGuideHighlight : *pixmapIndentGuide);\r\n}\r\n\r\nvoid EditView::DrawForeground(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll,\r\n\tint xStart, PRectangle rcLine, int subLine, Sci::Line lineVisible, Range lineRange, Sci::Position posLineStart,\r\n\tColourOptional background) {\r\n\r\n\tconst bool selBackDrawn = vsDraw.SelectionBackgroundDrawn();\r\n\tconst bool drawWhitespaceBackground = vsDraw.WhitespaceBackgroundDrawn() && !background;\r\n\tbool inIndentation = subLine == 0;\t// Do not handle indentation except on first subline.\r\n\r\n\tconst XYPOSITION subLineStart = ll->positions[lineRange.start];\r\n\tconst XYPOSITION horizontalOffset = xStart - subLineStart;\r\n\tconst XYPOSITION indentWidth = model.pdoc->IndentSize() * vsDraw.spaceWidth;\r\n\r\n\t// Does not take margin into account but not significant\r\n\tconst XYPOSITION xStartVisible = subLineStart - xStart;\r\n\r\n\t// When lineHeight is odd, dotted indent guides are drawn offset by 1 on odd lines to join together.\r\n\tconst bool offsetGuide = (lineVisible & 1) && (vsDraw.lineHeight & 1);\r\n\r\n\t// Same baseline used for all text\r\n\tconst XYPOSITION ybase = rcLine.top + vsDraw.maxAscent;\r\n\r\n\t// Foreground drawing loop\r\n\tconst BreakFinder::BreakFor breakFor = (((phasesDraw == PhasesDraw::One) && selBackDrawn) || vsDraw.SelectionTextDrawn())\r\n\t\t? BreakFinder::BreakFor::ForegroundAndSelection : BreakFinder::BreakFor::Foreground;\r\n\tBreakFinder bfFore(ll, &model.sel, lineRange, posLineStart, xStartVisible, breakFor, model.pdoc, &model.reprs, &vsDraw);\r\n\r\n\twhile (bfFore.More()) {\r\n\r\n\t\tconst TextSegment ts = bfFore.Next();\r\n\t\tconst Sci::Position i = ts.end() - 1;\r\n\t\tconst Sci::Position iDoc = i + posLineStart;\r\n\r\n\t\tconst Interval horizontal = ll->Span(ts.start, ts.end()).Offset(horizontalOffset);\r\n\t\t// Only try to draw if really visible - enhances performance by not calling environment to\r\n\t\t// draw strings that are completely past the right side of the window.\r\n\t\tif (rcLine.Intersects(horizontal)) {\r\n\t\t\tconst PRectangle rcSegment = rcLine.WithHorizontalBounds(horizontal);\r\n\t\t\tconst int styleMain = ll->styles[i];\r\n\t\t\tColourRGBA textFore = vsDraw.styles[styleMain].fore;\r\n\t\t\tconst Font *textFont = vsDraw.styles[styleMain].font.get();\r\n\t\t\t// Hot-spot foreground\r\n\t\t\tconst bool inHotspot = model.hotspot.Valid() && model.hotspot.ContainsCharacter(iDoc);\r\n\t\t\tif (inHotspot) {\r\n\t\t\t\tif (const ColourOptional colourHotSpot = vsDraw.ElementColour(Element::HotSpotActive)) {\r\n\t\t\t\t\ttextFore = *colourHotSpot;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (vsDraw.indicatorsSetFore) {\r\n\t\t\t\t// At least one indicator sets the text colour so see if it applies to this segment\r\n\t\t\t\tfor (const IDecoration *deco : model.pdoc->decorations->View()) {\r\n\t\t\t\t\tconst int indicatorValue = deco->ValueAt(ts.start + posLineStart);\r\n\t\t\t\t\tif (indicatorValue) {\r\n\t\t\t\t\t\tconst Indicator &indicator = vsDraw.indicators[deco->Indicator()];\r\n\t\t\t\t\t\tbool hover = false;\r\n\t\t\t\t\t\tif (indicator.IsDynamic()) {\r\n\t\t\t\t\t\t\tconst Sci::Position startPos = ts.start + posLineStart;\r\n\t\t\t\t\t\t\tconst Range rangeRun(deco->StartRun(startPos), deco->EndRun(startPos));\r\n\t\t\t\t\t\t\thover =\trangeRun.ContainsCharacter(model.hoverIndicatorPos);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (hover) {\r\n\t\t\t\t\t\t\tif (indicator.sacHover.style == IndicatorStyle::TextFore) {\r\n\t\t\t\t\t\t\t\ttextFore = indicator.sacHover.fore;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tif (indicator.sacNormal.style == IndicatorStyle::TextFore) {\r\n\t\t\t\t\t\t\t\tif (FlagSet(indicator.Flags(), IndicFlag::ValueFore))\r\n\t\t\t\t\t\t\t\t\ttextFore = ColourRGBA::FromRGB(indicatorValue & static_cast<int>(IndicValue::Mask));\r\n\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\ttextFore = indicator.sacNormal.fore;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tInSelection inSelection = vsDraw.selection.visible ? model.sel.CharacterInSelection(iDoc) : InSelection::inNone;\r\n\t\t\tif (FlagSet(vsDraw.caret.style, CaretStyle::Curses) && (inSelection == InSelection::inMain))\r\n\t\t\t\tinSelection = CharacterInCursesSelection(iDoc, model, vsDraw);\r\n\t\t\tif (const ColourOptional selectionFore = SelectionForeground(model, vsDraw, inSelection)) {\r\n\t\t\t\ttextFore = *selectionFore;\r\n\t\t\t}\r\n\t\t\tColourRGBA textBack = TextBackground(model, vsDraw, ll, background, inSelection, inHotspot, styleMain, i);\r\n\t\t\tif (ts.representation) {\r\n\t\t\t\tif (ll->chars[i] == '\\t') {\r\n\t\t\t\t\t// Tab display\r\n\t\t\t\t\tif (phasesDraw == PhasesDraw::One) {\r\n\t\t\t\t\t\tif (drawWhitespaceBackground && vsDraw.WhiteSpaceVisible(inIndentation))\r\n\t\t\t\t\t\t\ttextBack = vsDraw.ElementColourForced(Element::WhiteSpaceBack).Opaque();\r\n\t\t\t\t\t\tsurface->FillRectangleAligned(rcSegment, Fill(textBack));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (inIndentation && vsDraw.viewIndentationGuides == IndentView::Real) {\r\n\t\t\t\t\t\tconst Interval intervalCharacter = ll->SpanByte(static_cast<int>(i));\r\n\t\t\t\t\t\tfor (int indentCount = static_cast<int>((intervalCharacter.left + epsilon) / indentWidth);\r\n\t\t\t\t\t\t\tindentCount <= (intervalCharacter.right - epsilon) / indentWidth;\r\n\t\t\t\t\t\t\tindentCount++) {\r\n\t\t\t\t\t\t\tif (indentCount > 0) {\r\n\t\t\t\t\t\t\t\tconst XYPOSITION xIndent = std::floor(indentCount * indentWidth);\r\n\t\t\t\t\t\t\t\tDrawIndentGuide(surface, xIndent + xStart, rcSegment, ll->xHighlightGuide == xIndent, offsetGuide);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (vsDraw.viewWhitespace != WhiteSpace::Invisible) {\r\n\t\t\t\t\t\tif (vsDraw.WhiteSpaceVisible(inIndentation)) {\r\n\t\t\t\t\t\t\tconst PRectangle rcTab(rcSegment.left + 1, rcSegment.top + tabArrowHeight,\r\n\t\t\t\t\t\t\t\trcSegment.right - 1, rcSegment.bottom - vsDraw.maxDescent);\r\n\t\t\t\t\t\t\tconst int segmentTop = static_cast<int>(rcSegment.top) + vsDraw.lineHeight / 2;\r\n\t\t\t\t\t\t\tconst ColourRGBA whiteSpaceFore = vsDraw.ElementColour(Element::WhiteSpace).value_or(textFore);\r\n\t\t\t\t\t\t\tif (!customDrawTabArrow)\r\n\t\t\t\t\t\t\t\tDrawTabArrow(surface, rcTab, segmentTop, vsDraw, Stroke(whiteSpaceFore, 1.0f));\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\tcustomDrawTabArrow(surface, rcTab, segmentTop, vsDraw, Stroke(whiteSpaceFore, 1.0f));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tinIndentation = false;\r\n\t\t\t\t\tif (vsDraw.controlCharSymbol >= 32) {\r\n\t\t\t\t\t\t// Using one font for all control characters so it can be controlled independently to ensure\r\n\t\t\t\t\t\t// the box goes around the characters tightly. Seems to be no way to work out what height\r\n\t\t\t\t\t\t// is taken by an individual character - internal leading gives varying results.\r\n\t\t\t\t\t\tconst Font *ctrlCharsFont = vsDraw.styles[StyleControlChar].font.get();\r\n\t\t\t\t\t\tconst char cc[2] = { static_cast<char>(vsDraw.controlCharSymbol), '\\0' };\r\n\t\t\t\t\t\tsurface->DrawTextNoClip(rcSegment, ctrlCharsFont,\r\n\t\t\t\t\t\t\tybase, cc, textBack, textFore);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (FlagSet(ts.representation->appearance, RepresentationAppearance::Colour)) {\r\n\t\t\t\t\t\t\ttextFore = ts.representation->colour;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (FlagSet(ts.representation->appearance, RepresentationAppearance::Blob)) {\r\n\t\t\t\t\t\t\tDrawTextBlob(surface, vsDraw, rcSegment, ts.representation->stringRep,\r\n\t\t\t\t\t\t\t\ttextBack, textFore, phasesDraw == PhasesDraw::One);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tsurface->DrawTextTransparentUTF8(rcSegment, vsDraw.styles[StyleControlChar].font.get(),\r\n\t\t\t\t\t\t\t\tybase, ts.representation->stringRep, textFore);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// Normal text display\r\n\t\t\t\tif (vsDraw.styles[styleMain].visible) {\r\n\t\t\t\t\tconst std::string_view text(&ll->chars[ts.start], i - ts.start + 1);\r\n\t\t\t\t\tif (phasesDraw != PhasesDraw::One) {\r\n\t\t\t\t\t\tsurface->DrawTextTransparent(rcSegment, textFont,\r\n\t\t\t\t\t\t\tybase, text, textFore);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tsurface->DrawTextNoClip(rcSegment, textFont,\r\n\t\t\t\t\t\t\tybase, text, textFore, textBack);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (vsDraw.styles[styleMain].invisibleRepresentation[0]) {\r\n\t\t\t\t\tconst std::string_view text = vsDraw.styles[styleMain].invisibleRepresentation;\r\n  \t\t\t\t\tif (phasesDraw != PhasesDraw::One) {\r\n\t\t\t\t\t\tsurface->DrawTextTransparentUTF8(rcSegment, textFont,\r\n\t\t\t\t\t\t\tybase, text, textFore);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tsurface->DrawTextNoClipUTF8(rcSegment, textFont,\r\n\t\t\t\t\t\t\tybase, text, textFore, textBack);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (vsDraw.viewWhitespace != WhiteSpace::Invisible ||\r\n\t\t\t\t\t(inIndentation && vsDraw.viewIndentationGuides != IndentView::None)) {\r\n\t\t\t\t\tfor (int cpos = 0; cpos <= i - ts.start; cpos++) {\r\n\t\t\t\t\t\tif (ll->chars[cpos + ts.start] == ' ') {\r\n\t\t\t\t\t\t\tif (vsDraw.viewWhitespace != WhiteSpace::Invisible) {\r\n\t\t\t\t\t\t\t\tif (vsDraw.WhiteSpaceVisible(inIndentation)) {\r\n\t\t\t\t\t\t\t\t\tconst Interval intervalSpace = ll->SpanByte(cpos + ts.start).Offset(horizontalOffset);\r\n\t\t\t\t\t\t\t\t\tconst XYPOSITION xmid = (intervalSpace.left + intervalSpace.right) / 2;\r\n\t\t\t\t\t\t\t\t\tif ((phasesDraw == PhasesDraw::One) && drawWhitespaceBackground) {\r\n\t\t\t\t\t\t\t\t\t\ttextBack = vsDraw.ElementColourForced(Element::WhiteSpaceBack).Opaque();\r\n\t\t\t\t\t\t\t\t\t\tconst PRectangle rcSpace = rcLine.WithHorizontalBounds(intervalSpace);\r\n\t\t\t\t\t\t\t\t\t\tsurface->FillRectangleAligned(rcSpace, Fill(textBack));\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tconst int halfDotWidth = vsDraw.whitespaceSize / 2;\r\n\t\t\t\t\t\t\t\t\tPRectangle rcDot(xmid - halfDotWidth,\r\n\t\t\t\t\t\t\t\t\t\trcSegment.top + vsDraw.lineHeight / 2, 0.0f, 0.0f);\r\n\t\t\t\t\t\t\t\t\trcDot.right = rcDot.left + vsDraw.whitespaceSize;\r\n\t\t\t\t\t\t\t\t\trcDot.bottom = rcDot.top + vsDraw.whitespaceSize;\r\n\t\t\t\t\t\t\t\t\tconst ColourRGBA whiteSpaceFore = vsDraw.ElementColour(Element::WhiteSpace).value_or(textFore);\r\n\t\t\t\t\t\t\t\t\tsurface->FillRectangleAligned(rcDot, Fill(whiteSpaceFore));\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (inIndentation && vsDraw.viewIndentationGuides == IndentView::Real) {\r\n\t\t\t\t\t\t\t\tconst Interval intervalCharacter = ll->SpanByte(cpos + ts.start);\r\n\t\t\t\t\t\t\t\tfor (int indentCount = static_cast<int>((intervalCharacter.left + epsilon) / indentWidth);\r\n\t\t\t\t\t\t\t\t\tindentCount <= (intervalCharacter.right - epsilon) / indentWidth;\r\n\t\t\t\t\t\t\t\t\tindentCount++) {\r\n\t\t\t\t\t\t\t\t\tif (indentCount > 0) {\r\n\t\t\t\t\t\t\t\t\t\tconst XYPOSITION xIndent = std::floor(indentCount * indentWidth);\r\n\t\t\t\t\t\t\t\t\t\tDrawIndentGuide(surface, xIndent + xStart, rcSegment, ll->xHighlightGuide == xIndent, offsetGuide);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tinIndentation = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif ((inHotspot && vsDraw.hotspotUnderline) || vsDraw.styles[styleMain].underline) {\r\n\t\t\t\tPRectangle rcUL = rcSegment;\r\n\t\t\t\trcUL.top = ybase + 1;\r\n\t\t\t\trcUL.bottom = ybase + 2;\r\n\t\t\t\tColourRGBA colourUnderline = textFore;\r\n\t\t\t\tif (inHotspot && vsDraw.hotspotUnderline) {\r\n\t\t\t\t\tcolourUnderline = vsDraw.ElementColour(Element::HotSpotActive).value_or(textFore);\r\n\t\t\t\t}\r\n\t\t\t\tsurface->FillRectangleAligned(rcUL, colourUnderline);\r\n\t\t\t}\r\n\t\t} else if (horizontal.left > rcLine.right) {\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid EditView::DrawIndentGuidesOverEmpty(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll,\r\n\tSci::Line line, int xStart, PRectangle rcLine, int subLine, Sci::Line lineVisible) {\r\n\tif ((vsDraw.viewIndentationGuides == IndentView::LookForward || vsDraw.viewIndentationGuides == IndentView::LookBoth)\r\n\t\t&& (subLine == 0)) {\r\n\t\tconst Sci::Position posLineStart = model.pdoc->LineStart(line);\r\n\t\tint indentSpace = model.pdoc->GetLineIndentation(line);\r\n\t\tint xStartText = static_cast<int>(ll->positions[model.pdoc->GetLineIndentPosition(line) - posLineStart]);\r\n\r\n\t\t// Find the most recent line with some text\r\n\r\n\t\tSci::Line lineLastWithText = line;\r\n\t\twhile (lineLastWithText > std::max(line - 20, static_cast<Sci::Line>(0)) && model.pdoc->IsWhiteLine(lineLastWithText)) {\r\n\t\t\tlineLastWithText--;\r\n\t\t}\r\n\t\tif (lineLastWithText < line) {\r\n\t\t\txStartText = 100000;\t// Don't limit to visible indentation on empty line\r\n\t\t\t// This line is empty, so use indentation of last line with text\r\n\t\t\tint indentLastWithText = model.pdoc->GetLineIndentation(lineLastWithText);\r\n\t\t\tconst int isFoldHeader = LevelIsHeader(model.pdoc->GetFoldLevel(lineLastWithText));\r\n\t\t\tif (isFoldHeader) {\r\n\t\t\t\t// Level is one more level than parent\r\n\t\t\t\tindentLastWithText += model.pdoc->IndentSize();\r\n\t\t\t}\r\n\t\t\tif (vsDraw.viewIndentationGuides == IndentView::LookForward) {\r\n\t\t\t\t// In viLookForward mode, previous line only used if it is a fold header\r\n\t\t\t\tif (isFoldHeader) {\r\n\t\t\t\t\tindentSpace = std::max(indentSpace, indentLastWithText);\r\n\t\t\t\t}\r\n\t\t\t} else {\t// viLookBoth\r\n\t\t\t\tindentSpace = std::max(indentSpace, indentLastWithText);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tSci::Line lineNextWithText = line;\r\n\t\twhile (lineNextWithText < std::min(line + 20, model.pdoc->LinesTotal()) && model.pdoc->IsWhiteLine(lineNextWithText)) {\r\n\t\t\tlineNextWithText++;\r\n\t\t}\r\n\t\tif (lineNextWithText > line) {\r\n\t\t\txStartText = 100000;\t// Don't limit to visible indentation on empty line\r\n\t\t\t// This line is empty, so use indentation of first next line with text\r\n\t\t\tindentSpace = std::max(indentSpace,\r\n\t\t\t\tmodel.pdoc->GetLineIndentation(lineNextWithText));\r\n\t\t}\r\n\r\n\t\tconst bool offsetGuide = (lineVisible & 1) && (vsDraw.lineHeight & 1);\r\n\t\tfor (int indentPos = model.pdoc->IndentSize(); indentPos < indentSpace; indentPos += model.pdoc->IndentSize()) {\r\n\t\t\tconst XYPOSITION xIndent = std::floor(indentPos * vsDraw.spaceWidth);\r\n\t\t\tif (xIndent < xStartText) {\r\n\t\t\t\tDrawIndentGuide(surface, xIndent + xStart, rcLine,\tll->xHighlightGuide == xIndent, offsetGuide);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid EditView::DrawLine(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll,\r\n\tSci::Line line, Sci::Line lineVisible, int xStart, PRectangle rcLine, int subLine, DrawPhase phase) {\r\n\r\n\tif (subLine >= ll->lines) {\r\n\t\tDrawAnnotation(surface, model, vsDraw, ll, line, xStart, rcLine, subLine, phase);\r\n\t\treturn; // No further drawing\r\n\t}\r\n\r\n\tconst bool clipLine = !bufferedDraw && !LinesOverlap();\r\n\tif (clipLine) {\r\n\t\tsurface->SetClip(rcLine);\r\n\t}\r\n\r\n\t// See if something overrides the line background colour.\r\n\tconst ColourOptional background = vsDraw.Background(model.GetMark(line), model.caret.active, ll->containsCaret);\r\n\r\n\tconst Sci::Position posLineStart = model.pdoc->LineStart(line);\r\n\r\n\tconst Range lineRange = ll->SubLineRange(subLine, LineLayout::Scope::visibleOnly);\r\n\tconst Range lineRangeIncludingEnd = ll->SubLineRange(subLine, LineLayout::Scope::includeEnd);\r\n\tconst XYPOSITION subLineStart = ll->positions[lineRange.start];\r\n\r\n\tif ((ll->wrapIndent != 0) && (subLine > 0)) {\r\n\t\tif (FlagSet(phase, DrawPhase::back)) {\r\n\t\t\tDrawWrapIndentAndMarker(surface, vsDraw, ll, xStart, rcLine, background, customDrawWrapMarker, model.caret.active);\r\n\t\t}\r\n\t\txStart += static_cast<int>(ll->wrapIndent);\r\n\t}\r\n\r\n\tif (phasesDraw != PhasesDraw::One) {\r\n\t\tif (FlagSet(phase, DrawPhase::back)) {\r\n\t\t\tDrawBackground(surface, model, vsDraw, ll,\r\n\t\t\t\txStart, rcLine, subLine, lineRange, posLineStart,\r\n\t\t\t\tbackground);\r\n\t\t\tDrawFoldDisplayText(surface, model, vsDraw, ll, line, xStart, rcLine, subLine, subLineStart, DrawPhase::back);\r\n\t\t\tDrawEOLAnnotationText(surface, model, vsDraw, ll, line, xStart, rcLine, subLine, subLineStart, DrawPhase::back);\r\n\t\t\t// Remove drawBack to not draw again in DrawFoldDisplayText\r\n\t\t\tphase = static_cast<DrawPhase>(static_cast<int>(phase) & ~static_cast<int>(DrawPhase::back));\r\n\t\t\tDrawEOL(surface, model, vsDraw, ll,\r\n\t\t\t\tline, xStart, rcLine, subLine, lineRange.end, subLineStart, background);\r\n\t\t\tif (vsDraw.IsLineFrameOpaque(model.caret.active, ll->containsCaret))\r\n\t\t\t\tDrawCaretLineFramed(surface, vsDraw, ll, rcLine, subLine);\r\n\t\t}\r\n\r\n\t\tif (FlagSet(phase, DrawPhase::indicatorsBack)) {\r\n\t\t\tDrawIndicators(surface, model, vsDraw, ll, line, xStart, rcLine, subLine,\r\n\t\t\t\tlineRangeIncludingEnd.end, true, tabWidthMinimumPixels);\r\n\t\t\tDrawEdgeLine(surface, vsDraw, ll, xStart, rcLine, lineRange);\r\n\t\t\tDrawMarkUnderline(surface, model, vsDraw, line, rcLine);\r\n\t\t}\r\n\t}\r\n\r\n\tif (FlagSet(phase, DrawPhase::text)) {\r\n\t\tif (vsDraw.selection.visible) {\r\n\t\t\tDrawTranslucentSelection(surface, model, vsDraw, ll,\r\n\t\t\t\tline, xStart, rcLine, subLine, lineRange, tabWidthMinimumPixels, Layer::UnderText);\r\n\t\t}\r\n\t\tDrawTranslucentLineState(surface, model, vsDraw, ll, line, rcLine, subLine, Layer::UnderText);\r\n\t\tDrawForeground(surface, model, vsDraw, ll,\r\n\t\t\txStart, rcLine, subLine, lineVisible, lineRange, posLineStart,\r\n\t\t\tbackground);\r\n\t}\r\n\r\n\tif (FlagSet(phase, DrawPhase::indentationGuides)) {\r\n\t\tDrawIndentGuidesOverEmpty(surface, model, vsDraw, ll, line, xStart, rcLine, subLine, lineVisible);\r\n\t}\r\n\r\n\tif (FlagSet(phase, DrawPhase::indicatorsFore)) {\r\n\t\tDrawIndicators(surface, model, vsDraw, ll, line, xStart, rcLine, subLine,\r\n\t\t\tlineRangeIncludingEnd.end, false, tabWidthMinimumPixels);\r\n\t}\r\n\r\n\tDrawFoldDisplayText(surface, model, vsDraw, ll, line, xStart, rcLine, subLine, subLineStart, phase);\r\n\tDrawEOLAnnotationText(surface, model, vsDraw, ll, line, xStart, rcLine, subLine, subLineStart, phase);\r\n\r\n\tif (phasesDraw == PhasesDraw::One) {\r\n\t\tDrawEOL(surface, model, vsDraw, ll,\r\n\t\t\tline, xStart, rcLine, subLine, lineRange.end, subLineStart, background);\r\n\t\tif (vsDraw.IsLineFrameOpaque(model.caret.active, ll->containsCaret))\r\n\t\t\tDrawCaretLineFramed(surface, vsDraw, ll, rcLine, subLine);\r\n\t\tDrawEdgeLine(surface, vsDraw, ll, xStart, rcLine, lineRange);\r\n\t\tDrawMarkUnderline(surface, model, vsDraw, line, rcLine);\r\n\t}\r\n\r\n\tif (vsDraw.selection.visible && FlagSet(phase, DrawPhase::selectionTranslucent)) {\r\n\t\tDrawTranslucentSelection(surface, model, vsDraw, ll,\r\n\t\t\tline, xStart, rcLine, subLine, lineRange, tabWidthMinimumPixels, Layer::OverText);\r\n\t}\r\n\r\n\tif (FlagSet(phase, DrawPhase::lineTranslucent)) {\r\n\t\tDrawTranslucentLineState(surface, model, vsDraw, ll, line, rcLine, subLine, Layer::OverText);\r\n\t}\r\n\r\n\tif (clipLine) {\r\n\t\tsurface->PopClip();\r\n\t}\r\n}\r\n\r\nvoid EditView::PaintText(Surface *surfaceWindow, const EditModel &model, const ViewStyle &vsDraw,\r\n\tPRectangle rcArea, PRectangle rcClient) {\r\n\t// Allow text at start of line to overlap 1 pixel into the margin as this displays\r\n\t// serifs and italic stems for aliased text.\r\n\tconst int leftTextOverlap = ((model.xOffset == 0) && (vsDraw.leftMarginWidth > 0)) ? 1 : 0;\r\n\r\n\t// Do the painting\r\n\tif (rcArea.right > vsDraw.textStart - leftTextOverlap) {\r\n\r\n\t\tSurface *surface = surfaceWindow;\r\n\t\tif (bufferedDraw) {\r\n\t\t\tsurface = pixmapLine.get();\r\n\t\t\tPLATFORM_ASSERT(pixmapLine->Initialised());\r\n\t\t}\r\n\t\tsurface->SetMode(model.CurrentSurfaceMode());\r\n\r\n\t\tconst Point ptOrigin = model.GetVisibleOriginInMain();\r\n\r\n\t\tconst int screenLinePaintFirst = static_cast<int>(rcArea.top) / vsDraw.lineHeight;\r\n\t\tconst int xStart = vsDraw.textStart - model.xOffset + static_cast<int>(ptOrigin.x);\r\n\r\n\t\tconst SelectionPosition posCaret = model.posDrag.IsValid() ? model.posDrag : model.sel.RangeMain().caret;\r\n\t\tconst Sci::Line lineCaret = model.pdoc->SciLineFromPosition(posCaret.Position());\r\n\t\tconst int caretOffset = static_cast<int>(posCaret.Position() - model.pdoc->LineStart(lineCaret));\r\n\r\n\t\tPRectangle rcTextArea = rcClient;\r\n\t\tif (vsDraw.marginInside) {\r\n\t\t\trcTextArea.left += vsDraw.textStart;\r\n\t\t\trcTextArea.right -= vsDraw.rightMarginWidth;\r\n\t\t} else {\r\n\t\t\trcTextArea = rcArea;\r\n\t\t}\r\n\r\n\t\t// Remove selection margin from drawing area so text will not be drawn\r\n\t\t// on it in unbuffered mode.\r\n\t\tconst bool clipping = !bufferedDraw && vsDraw.marginInside;\r\n\t\tif (clipping) {\r\n\t\t\tPRectangle rcClipText = rcTextArea;\r\n\t\t\trcClipText.left -= leftTextOverlap;\r\n\t\t\tsurfaceWindow->SetClip(rcClipText);\r\n\t\t}\r\n\r\n\t\t// Loop on visible lines\r\n#if defined(TIME_PAINTING)\r\n\t\tdouble durLayout = 0.0;\r\n\t\tdouble durPaint = 0.0;\r\n\t\tdouble durCopy = 0.0;\r\n\t\tElapsedPeriod epWhole;\r\n#endif\r\n\t\tconst bool bracesIgnoreStyle = ((vsDraw.braceHighlightIndicatorSet && (model.bracesMatchStyle == StyleBraceLight)) ||\r\n\t\t\t(vsDraw.braceBadLightIndicatorSet && (model.bracesMatchStyle == StyleBraceBad)));\r\n\r\n\t\tSci::Line lineDocPrevious = -1;\t// Used to avoid laying out one document line multiple times\r\n\t\tstd::shared_ptr<LineLayout> ll;\r\n\t\tstd::vector<DrawPhase> phases;\r\n\t\tif ((phasesDraw == PhasesDraw::Multiple) && !bufferedDraw) {\r\n\t\t\tfor (DrawPhase phase = DrawPhase::back; phase <= DrawPhase::carets; phase = static_cast<DrawPhase>(static_cast<int>(phase) * 2)) {\r\n\t\t\t\tphases.push_back(phase);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tphases.push_back(DrawPhase::all);\r\n\t\t}\r\n\t\tfor (const DrawPhase &phase : phases) {\r\n\t\t\tint ypos = 0;\r\n\t\t\tif (!bufferedDraw)\r\n\t\t\t\typos += screenLinePaintFirst * vsDraw.lineHeight;\r\n\t\t\tint yposScreen = screenLinePaintFirst * vsDraw.lineHeight;\r\n\t\t\tSci::Line visibleLine = model.TopLineOfMain() + screenLinePaintFirst;\r\n\t\t\twhile (visibleLine < model.pcs->LinesDisplayed() && yposScreen < rcArea.bottom) {\r\n\r\n\t\t\t\tconst Sci::Line lineDoc = model.pcs->DocFromDisplay(visibleLine);\r\n\t\t\t\t// Only visible lines should be handled by the code within the loop\r\n\t\t\t\tPLATFORM_ASSERT(model.pcs->GetVisible(lineDoc));\r\n\t\t\t\tconst Sci::Line lineStartSet = model.pcs->DisplayFromDoc(lineDoc);\r\n\t\t\t\tconst int subLine = static_cast<int>(visibleLine - lineStartSet);\r\n\r\n\t\t\t\t// Copy this line and its styles from the document into local arrays\r\n\t\t\t\t// and determine the x position at which each character starts.\r\n#if defined(TIME_PAINTING)\r\n\t\t\t\tElapsedPeriod ep;\r\n#endif\r\n\t\t\t\tif (lineDoc != lineDocPrevious) {\r\n\t\t\t\t\tll = RetrieveLineLayout(lineDoc, model);\r\n\t\t\t\t\tLayoutLine(model, surface, vsDraw, ll.get(), model.wrapWidth);\r\n\t\t\t\t\tlineDocPrevious = lineDoc;\r\n\t\t\t\t}\r\n#if defined(TIME_PAINTING)\r\n\t\t\t\tdurLayout += ep.Duration(true);\r\n#endif\r\n\t\t\t\tif (ll) {\r\n\t\t\t\t\tll->containsCaret = vsDraw.selection.visible && (lineDoc == lineCaret)\r\n\t\t\t\t\t\t&& (ll->lines == 1 || !vsDraw.caretLine.subLine || ll->InLine(caretOffset, subLine));\r\n\r\n\t\t\t\t\tPRectangle rcLine = rcTextArea;\r\n\t\t\t\t\trcLine.top = static_cast<XYPOSITION>(ypos);\r\n\t\t\t\t\trcLine.bottom = static_cast<XYPOSITION>(ypos + vsDraw.lineHeight);\r\n\r\n\t\t\t\t\tconst Range rangeLine(model.pdoc->LineStart(lineDoc),\r\n\t\t\t\t\t\tmodel.pdoc->LineStart(lineDoc + 1));\r\n\r\n\t\t\t\t\t// Highlight the current braces if any\r\n\t\t\t\t\tll->SetBracesHighlight(rangeLine, model.braces, static_cast<char>(model.bracesMatchStyle),\r\n\t\t\t\t\t\tstatic_cast<int>(model.highlightGuideColumn * vsDraw.spaceWidth), bracesIgnoreStyle);\r\n\r\n\t\t\t\t\tif (leftTextOverlap && (bufferedDraw || ((phasesDraw < PhasesDraw::Multiple) && (FlagSet(phase, DrawPhase::back))))) {\r\n\t\t\t\t\t\t// Clear the left margin\r\n\t\t\t\t\t\tPRectangle rcSpacer = rcLine;\r\n\t\t\t\t\t\trcSpacer.right = rcSpacer.left;\r\n\t\t\t\t\t\trcSpacer.left -= 1;\r\n\t\t\t\t\t\tsurface->FillRectangleAligned(rcSpacer, Fill(vsDraw.styles[StyleDefault].back));\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (model.BidirectionalEnabled()) {\r\n\t\t\t\t\t\t// Fill the line bidi data\r\n\t\t\t\t\t\tUpdateBidiData(model, vsDraw, ll.get());\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tDrawLine(surface, model, vsDraw, ll.get(), lineDoc, visibleLine, xStart, rcLine, subLine, phase);\r\n#if defined(TIME_PAINTING)\r\n\t\t\t\t\tdurPaint += ep.Duration(true);\r\n#endif\r\n\t\t\t\t\t// Restore the previous styles for the brace highlights in case layout is in cache.\r\n\t\t\t\t\tll->RestoreBracesHighlight(rangeLine, model.braces, bracesIgnoreStyle);\r\n\r\n\t\t\t\t\tif (FlagSet(phase, DrawPhase::foldLines)) {\r\n\t\t\t\t\t\tDrawFoldLines(surface, model, vsDraw, ll.get(), lineDoc, rcLine, subLine);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (FlagSet(phase, DrawPhase::carets)) {\r\n\t\t\t\t\t\tDrawCarets(surface, model, vsDraw, ll.get(), lineDoc, xStart, rcLine, subLine);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (bufferedDraw) {\r\n\t\t\t\t\t\tconst Point from = Point::FromInts(vsDraw.textStart - leftTextOverlap, 0);\r\n\t\t\t\t\t\tconst PRectangle rcCopyArea = PRectangle::FromInts(vsDraw.textStart - leftTextOverlap, yposScreen,\r\n\t\t\t\t\t\t\tstatic_cast<int>(rcClient.right - vsDraw.rightMarginWidth),\r\n\t\t\t\t\t\t\typosScreen + vsDraw.lineHeight);\r\n\t\t\t\t\t\tpixmapLine->FlushDrawing();\r\n\t\t\t\t\t\tsurfaceWindow->Copy(rcCopyArea, from, *pixmapLine);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tlineWidthMaxSeen = std::max(\r\n\t\t\t\t\t\tlineWidthMaxSeen, static_cast<int>(ll->positions[ll->numCharsInLine]));\r\n#if defined(TIME_PAINTING)\r\n\t\t\t\t\tdurCopy += ep.Duration(true);\r\n#endif\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!bufferedDraw) {\r\n\t\t\t\t\typos += vsDraw.lineHeight;\r\n\t\t\t\t}\r\n\r\n\t\t\t\typosScreen += vsDraw.lineHeight;\r\n\t\t\t\tvisibleLine++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tll.reset();\r\n#if defined(TIME_PAINTING)\r\n\t\tif (durPaint < 0.00000001)\r\n\t\t\tdurPaint = 0.00000001;\r\n#endif\r\n\t\t// Right column limit indicator\r\n\t\tPRectangle rcBeyondEOF = (vsDraw.marginInside) ? rcClient : rcArea;\r\n\t\trcBeyondEOF.left = static_cast<XYPOSITION>(vsDraw.textStart);\r\n\t\trcBeyondEOF.right = rcBeyondEOF.right - ((vsDraw.marginInside) ? vsDraw.rightMarginWidth : 0);\r\n\t\trcBeyondEOF.top = static_cast<XYPOSITION>((model.pcs->LinesDisplayed() - model.TopLineOfMain()) * vsDraw.lineHeight);\r\n\t\tif (rcBeyondEOF.top < rcBeyondEOF.bottom) {\r\n\t\t\tsurfaceWindow->FillRectangleAligned(rcBeyondEOF, Fill(vsDraw.styles[StyleDefault].back));\r\n\t\t\tif (vsDraw.edgeState == EdgeVisualStyle::Line) {\r\n\t\t\t\tconst int edgeX = static_cast<int>(vsDraw.theEdge.column * vsDraw.spaceWidth);\r\n\t\t\t\trcBeyondEOF.left = static_cast<XYPOSITION>(edgeX + xStart);\r\n\t\t\t\trcBeyondEOF.right = rcBeyondEOF.left + 1;\r\n\t\t\t\tsurfaceWindow->FillRectangleAligned(rcBeyondEOF, Fill(vsDraw.theEdge.colour));\r\n\t\t\t} else if (vsDraw.edgeState == EdgeVisualStyle::MultiLine) {\r\n\t\t\t\tfor (size_t edge = 0; edge < vsDraw.theMultiEdge.size(); edge++) {\r\n\t\t\t\t\tif (vsDraw.theMultiEdge[edge].column >= 0) {\r\n\t\t\t\t\t\tconst int edgeX = static_cast<int>(vsDraw.theMultiEdge[edge].column * vsDraw.spaceWidth);\r\n\t\t\t\t\t\trcBeyondEOF.left = static_cast<XYPOSITION>(edgeX + xStart);\r\n\t\t\t\t\t\trcBeyondEOF.right = rcBeyondEOF.left + 1;\r\n\t\t\t\t\t\tsurfaceWindow->FillRectangleAligned(rcBeyondEOF, Fill(vsDraw.theMultiEdge[edge].colour));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (clipping)\r\n\t\t\tsurfaceWindow->PopClip();\r\n\r\n\t\t//Platform::DebugPrintf(\"start display %d, offset = %d\\n\", model.pdoc->Length(), model.xOffset);\r\n#if defined(TIME_PAINTING)\r\n\t\tPlatform::DebugPrintf(\r\n\t\t\"Layout:%9.6g    Paint:%9.6g    Ratio:%9.6g   Copy:%9.6g   Total:%9.6g\\n\",\r\n\t\tdurLayout, durPaint, durLayout / durPaint, durCopy, epWhole.Duration());\r\n#endif\r\n\t}\r\n}\r\n\r\n// Space (3 space characters) between line numbers and text when printing.\r\n#define lineNumberPrintSpace \"   \"\r\n\r\nSci::Position EditView::FormatRange(bool draw, CharacterRangeFull chrg, Rectangle rc, Surface *surface, Surface *surfaceMeasure,\r\n\tconst EditModel &model, const ViewStyle &vs) {\r\n\t// Can't use measurements cached for screen\r\n\tposCache->Clear();\r\n\r\n\tViewStyle vsPrint(vs);\r\n\tvsPrint.technology = Technology::Default;\r\n\r\n\t// Modify the view style for printing as do not normally want any of the transient features to be printed\r\n\t// Printing supports only the line number margin.\r\n\tint lineNumberIndex = -1;\r\n\tfor (size_t margin = 0; margin < vs.ms.size(); margin++) {\r\n\t\tif ((vsPrint.ms[margin].style == MarginType::Number) && (vsPrint.ms[margin].width > 0)) {\r\n\t\t\tlineNumberIndex = static_cast<int>(margin);\r\n\t\t} else {\r\n\t\t\tvsPrint.ms[margin].width = 0;\r\n\t\t}\r\n\t}\r\n\tvsPrint.fixedColumnWidth = 0;\r\n\tvsPrint.zoomLevel = printParameters.magnification;\r\n\t// Don't show indentation guides\r\n\t// If this ever gets changed, cached pixmap would need to be recreated if technology != Technology::Default\r\n\tvsPrint.viewIndentationGuides = IndentView::None;\r\n\t// Don't show the selection when printing\r\n\tvsPrint.selection.visible = false;\r\n\tvsPrint.elementColours.clear();\r\n\tvsPrint.elementBaseColours.clear();\r\n\tvsPrint.caretLine.alwaysShow = false;\r\n\t// Don't highlight matching braces using indicators\r\n\tvsPrint.braceHighlightIndicatorSet = false;\r\n\tvsPrint.braceBadLightIndicatorSet = false;\r\n\r\n\t// Set colours for printing according to users settings\r\n\tconst PrintOption colourMode = printParameters.colourMode;\r\n\tconst std::vector<Style>::iterator endStyles = (colourMode == PrintOption::ColourOnWhiteDefaultBG) ?\r\n\t\tvsPrint.styles.begin() + StyleLineNumber : vsPrint.styles.end();\r\n\tfor (std::vector<Style>::iterator it = vsPrint.styles.begin(); it != endStyles; ++it) {\r\n\t\tif (colourMode == PrintOption::InvertLight) {\r\n\t\t\tit->fore = InvertedLight(it->fore);\r\n\t\t\tit->back = InvertedLight(it->back);\r\n\t\t} else if (colourMode == PrintOption::BlackOnWhite) {\r\n\t\t\tit->fore = black;\r\n\t\t\tit->back = white;\r\n\t\t} else if (colourMode == PrintOption::ColourOnWhite || colourMode == PrintOption::ColourOnWhiteDefaultBG) {\r\n\t\t\tit->back = white;\r\n\t\t}\r\n\t}\r\n\t// White background for the line numbers if PrintOption::ScreenColours isn't used\r\n\tif (colourMode != PrintOption::ScreenColours) {\r\n\t\tvsPrint.styles[StyleLineNumber].back = white;\r\n\t}\r\n\r\n\t// Printing uses different margins, so reset screen margins\r\n\tvsPrint.leftMarginWidth = 0;\r\n\tvsPrint.rightMarginWidth = 0;\r\n\r\n\tvsPrint.Refresh(*surfaceMeasure, model.pdoc->tabInChars);\r\n\t// Determining width must happen after fonts have been realised in Refresh\r\n\tint lineNumberWidth = 0;\r\n\tif (lineNumberIndex >= 0) {\r\n\t\tlineNumberWidth = static_cast<int>(surfaceMeasure->WidthText(vsPrint.styles[StyleLineNumber].font.get(),\r\n\t\t\t\"99999\" lineNumberPrintSpace));\r\n\t\tvsPrint.ms[lineNumberIndex].width = lineNumberWidth;\r\n\t\tvsPrint.Refresh(*surfaceMeasure, model.pdoc->tabInChars);\t// Recalculate fixedColumnWidth\r\n\t}\r\n\r\n\t// Turn off change history marker backgrounds\r\n\tconstexpr unsigned int changeMarkers =\r\n\t\t1u << static_cast<unsigned int>(MarkerOutline::HistoryRevertedToOrigin) |\r\n\t\t1u << static_cast<unsigned int>(MarkerOutline::HistorySaved) |\r\n\t\t1u << static_cast<unsigned int>(MarkerOutline::HistoryModified) |\r\n\t\t1u << static_cast<unsigned int>(MarkerOutline::HistoryRevertedToModified);\r\n\tvsPrint.maskInLine &= ~changeMarkers;\r\n\r\n\tconst Sci::Line linePrintStart = model.pdoc->SciLineFromPosition(chrg.cpMin);\r\n\tSci::Line linePrintLast = linePrintStart + (rc.bottom - rc.top) / vsPrint.lineHeight - 1;\r\n\tif (linePrintLast < linePrintStart)\r\n\t\tlinePrintLast = linePrintStart;\r\n\tconst Sci::Line linePrintMax = model.pdoc->SciLineFromPosition(chrg.cpMax);\r\n\tif (linePrintLast > linePrintMax)\r\n\t\tlinePrintLast = linePrintMax;\r\n\t//Platform::DebugPrintf(\"Formatting lines=[%0d,%0d,%0d] top=%0d bottom=%0d line=%0d %0d\\n\",\r\n\t//      linePrintStart, linePrintLast, linePrintMax, rc.top, rc.bottom, vsPrint.lineHeight,\r\n\t//      surfaceMeasure->Height(vsPrint.styles[StyleLineNumber].font));\r\n\tSci::Position endPosPrint = model.pdoc->Length();\r\n\tif (linePrintLast < model.pdoc->LinesTotal())\r\n\t\tendPosPrint = model.pdoc->LineStart(linePrintLast + 1);\r\n\r\n\t// Ensure we are styled to where we are formatting.\r\n\tmodel.pdoc->EnsureStyledTo(endPosPrint);\r\n\r\n\tconst int xStart = vsPrint.fixedColumnWidth + rc.left;\r\n\tint ypos = rc.top;\r\n\r\n\tSci::Line lineDoc = linePrintStart;\r\n\r\n\tSci::Position nPrintPos = chrg.cpMin;\r\n\tint visibleLine = 0;\r\n\tint widthPrint = rc.right - rc.left - vsPrint.fixedColumnWidth;\r\n\tif (printParameters.wrapState == Wrap::None)\r\n\t\twidthPrint = LineLayout::wrapWidthInfinite;\r\n\r\n\twhile (lineDoc <= linePrintLast && ypos < rc.bottom) {\r\n\r\n\t\t// When printing, the hdc and hdcTarget may be the same, so\r\n\t\t// changing the state of surfaceMeasure may change the underlying\r\n\t\t// state of surface. Therefore, any cached state is discarded before\r\n\t\t// using each surface.\r\n\t\tsurfaceMeasure->FlushCachedState();\r\n\r\n\t\t// Copy this line and its styles from the document into local arrays\r\n\t\t// and determine the x position at which each character starts.\r\n\t\tLineLayout ll(lineDoc, static_cast<int>(model.pdoc->LineStart(lineDoc + 1) - model.pdoc->LineStart(lineDoc) + 1));\r\n\t\tLayoutLine(model, surfaceMeasure, vsPrint, &ll, widthPrint);\r\n\r\n\t\tll.containsCaret = false;\r\n\r\n\t\tPRectangle rcLine = PRectangle::FromInts(\r\n\t\t\trc.left,\r\n\t\t\typos,\r\n\t\t\trc.right - 1,\r\n\t\t\typos + vsPrint.lineHeight);\r\n\r\n\t\t// When document line is wrapped over multiple display lines, find where\r\n\t\t// to start printing from to ensure a particular position is on the first\r\n\t\t// line of the page.\r\n\t\tif (visibleLine == 0) {\r\n\t\t\tconst Sci::Position startWithinLine = nPrintPos -\r\n\t\t\t\tmodel.pdoc->LineStart(lineDoc);\r\n\t\t\tfor (int iwl = 0; iwl < ll.lines - 1; iwl++) {\r\n\t\t\t\tif (ll.LineStart(iwl) <= startWithinLine && ll.LineStart(iwl + 1) >= startWithinLine) {\r\n\t\t\t\t\tvisibleLine = -iwl;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (ll.lines > 1 && startWithinLine >= ll.LineStart(ll.lines - 1)) {\r\n\t\t\t\tvisibleLine = -(ll.lines - 1);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (draw && lineNumberWidth &&\r\n\t\t\t(ypos + vsPrint.lineHeight <= rc.bottom) &&\r\n\t\t\t(visibleLine >= 0)) {\r\n\t\t\tconst std::string number = std::to_string(lineDoc + 1) + lineNumberPrintSpace;\r\n\t\t\tPRectangle rcNumber = rcLine;\r\n\t\t\trcNumber.right = rcNumber.left + lineNumberWidth;\r\n\t\t\t// Right justify\r\n\t\t\trcNumber.left = rcNumber.right - surfaceMeasure->WidthText(\r\n\t\t\t\tvsPrint.styles[StyleLineNumber].font.get(), number);\r\n\t\t\tsurface->FlushCachedState();\r\n\t\t\tsurface->DrawTextNoClip(rcNumber, vsPrint.styles[StyleLineNumber].font.get(),\r\n\t\t\t\typos + vsPrint.maxAscent, number,\r\n\t\t\t\tvsPrint.styles[StyleLineNumber].fore,\r\n\t\t\t\tvsPrint.styles[StyleLineNumber].back);\r\n\t\t}\r\n\r\n\t\t// Draw the line\r\n\t\tsurface->FlushCachedState();\r\n\r\n\t\tfor (int iwl = 0; iwl < ll.lines; iwl++) {\r\n\t\t\tif (ypos + vsPrint.lineHeight <= rc.bottom) {\r\n\t\t\t\tif (visibleLine >= 0) {\r\n\t\t\t\t\tif (draw) {\r\n\t\t\t\t\t\trcLine.top = static_cast<XYPOSITION>(ypos);\r\n\t\t\t\t\t\trcLine.bottom = static_cast<XYPOSITION>(ypos + vsPrint.lineHeight);\r\n\t\t\t\t\t\tDrawLine(surface, model, vsPrint, &ll, lineDoc, visibleLine, xStart, rcLine, iwl, DrawPhase::all);\r\n\t\t\t\t\t}\r\n\t\t\t\t\typos += vsPrint.lineHeight;\r\n\t\t\t\t}\r\n\t\t\t\tvisibleLine++;\r\n\t\t\t\tif (iwl == ll.lines - 1)\r\n\t\t\t\t\tnPrintPos = model.pdoc->LineStart(lineDoc + 1);\r\n\t\t\t\telse\r\n\t\t\t\t\tnPrintPos += ll.LineStart(iwl + 1) - ll.LineStart(iwl);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t++lineDoc;\r\n\t}\r\n\r\n\t// Clear cache so measurements are not used for screen\r\n\tposCache->Clear();\r\n\r\n\treturn nPrintPos;\r\n}\r\n"
  },
  {
    "path": "scintilla/src/EditView.h",
    "content": "// Scintilla source code edit control\r\n/** @file EditView.h\r\n ** Defines the appearance of the main text area of the editor window.\r\n **/\r\n// Copyright 1998-2014 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef EDITVIEW_H\r\n#define EDITVIEW_H\r\n\r\nnamespace Scintilla::Internal {\r\n\r\nstruct PrintParameters {\r\n\tint magnification;\r\n\tScintilla::PrintOption colourMode;\r\n\tScintilla::Wrap wrapState;\r\n\tPrintParameters() noexcept;\r\n};\r\n\r\n/**\r\n* The view may be drawn in separate phases.\r\n*/\r\nenum class DrawPhase {\r\n\tnone = 0x0,\r\n\tback = 0x1,\r\n\tindicatorsBack = 0x2,\r\n\ttext = 0x4,\r\n\tindentationGuides = 0x8,\r\n\tindicatorsFore = 0x10,\r\n\tselectionTranslucent = 0x20,\r\n\tlineTranslucent = 0x40,\r\n\tfoldLines = 0x80,\r\n\tcarets = 0x100,\r\n\tall = 0x1FF\r\n};\r\n\r\nbool ValidStyledText(const ViewStyle &vs, size_t styleOffset, const StyledText &st) noexcept;\r\nint WidestLineWidth(Surface *surface, const ViewStyle &vs, int styleOffset, const StyledText &st);\r\nvoid DrawTextNoClipPhase(Surface *surface, PRectangle rc, const Style &style, XYPOSITION ybase,\r\n\tstd::string_view text, DrawPhase phase);\r\nvoid DrawStyledText(Surface *surface, const ViewStyle &vs, int styleOffset, PRectangle rcText,\r\n\tconst StyledText &st, size_t start, size_t length, DrawPhase phase);\r\n\r\ntypedef void (*DrawTabArrowFn)(Surface *surface, PRectangle rcTab, int ymid,\r\n\tconst ViewStyle &vsDraw, Stroke stroke);\r\n\r\nclass LineTabstops;\r\n\r\n/**\r\n* EditView draws the main text area.\r\n*/\r\nclass EditView {\r\npublic:\r\n\tPrintParameters printParameters;\r\n\tstd::unique_ptr<LineTabstops> ldTabstops;\r\n\tint tabWidthMinimumPixels;\r\n\r\n\tbool drawOverstrikeCaret; // used by the curses platform\r\n\r\n\t/** In bufferedDraw mode, graphics operations are drawn to a pixmap and then copied to\r\n\t* the screen. This avoids flashing but is about 30% slower. */\r\n\tbool bufferedDraw;\r\n\t/** In phasesTwo mode, drawing is performed in two phases, first the background\r\n\t* and then the foreground. This avoids chopping off characters that overlap the next run.\r\n\t* In multiPhaseDraw mode, drawing is performed in multiple phases with each phase drawing\r\n\t* one feature over the whole drawing area, instead of within one line. This allows text to\r\n\t* overlap from one line to the next. */\r\n\tScintilla::PhasesDraw phasesDraw;\r\n\r\n\tint lineWidthMaxSeen;\r\n\r\n\tbool additionalCaretsBlink;\r\n\tbool additionalCaretsVisible;\r\n\r\n\tbool imeCaretBlockOverride;\r\n\r\n\tstd::unique_ptr<Surface> pixmapLine;\r\n\tstd::unique_ptr<Surface> pixmapIndentGuide;\r\n\tstd::unique_ptr<Surface> pixmapIndentGuideHighlight;\r\n\r\n\tLineLayoutCache llc;\r\n\tstd::unique_ptr<IPositionCache> posCache;\r\n\r\n\tunsigned int maxLayoutThreads;\r\n\tstatic constexpr int bytesPerLayoutThread = 1000;\r\n\r\n\tint tabArrowHeight; // draw arrow heads this many pixels above/below line midpoint\r\n\t/** Some platforms, notably PLAT_CURSES, do not support Scintilla's native\r\n\t * DrawTabArrow function for drawing tab characters. Allow those platforms to\r\n\t * override it instead of creating a new method in the Surface class that\r\n\t * existing platforms must implement as empty. */\r\n\tDrawTabArrowFn customDrawTabArrow;\r\n\tDrawWrapMarkerFn customDrawWrapMarker;\r\n\r\n\tEditView();\r\n\t// Deleted so EditView objects can not be copied.\r\n\tEditView(const EditView &) = delete;\r\n\tEditView(EditView &&) = delete;\r\n\tvoid operator=(const EditView &) = delete;\r\n\tvoid operator=(EditView &&) = delete;\r\n\tvirtual ~EditView();\r\n\r\n\tbool SetTwoPhaseDraw(bool twoPhaseDraw) noexcept;\r\n\tbool SetPhasesDraw(int phases) noexcept;\r\n\tbool LinesOverlap() const noexcept;\r\n\r\n\tvoid SetLayoutThreads(unsigned int threads) noexcept;\r\n\tunsigned int GetLayoutThreads() const noexcept;\r\n\r\n\tvoid ClearAllTabstops() noexcept;\r\n\tXYPOSITION NextTabstopPos(Sci::Line line, XYPOSITION x, XYPOSITION tabWidth) const noexcept;\r\n\tbool ClearTabstops(Sci::Line line) noexcept;\r\n\tbool AddTabstop(Sci::Line line, int x);\r\n\tint GetNextTabstop(Sci::Line line, int x) const noexcept;\r\n\tvoid LinesAddedOrRemoved(Sci::Line lineOfPos, Sci::Line linesAdded);\r\n\r\n\tvoid DropGraphics() noexcept;\r\n\tvoid RefreshPixMaps(Surface *surfaceWindow, const ViewStyle &vsDraw);\r\n\r\n\tstd::shared_ptr<LineLayout> RetrieveLineLayout(Sci::Line lineNumber, const EditModel &model);\r\n\tvoid LayoutLine(const EditModel &model, Surface *surface, const ViewStyle &vstyle,\r\n\t\tLineLayout *ll, int width, bool callerMultiThreaded=false);\r\n\r\n\tstatic void UpdateBidiData(const EditModel &model, const ViewStyle &vstyle, LineLayout *ll);\r\n\r\n\tPoint LocationFromPosition(Surface *surface, const EditModel &model, SelectionPosition pos, Sci::Line topLine,\r\n\t\tconst ViewStyle &vs, PointEnd pe, const PRectangle rcClient);\r\n\tRange RangeDisplayLine(Surface *surface, const EditModel &model, Sci::Line lineVisible, const ViewStyle &vs);\r\n\tSelectionPosition SPositionFromLocation(Surface *surface, const EditModel &model, PointDocument pt, bool canReturnInvalid,\r\n\t\tbool charPosition, bool virtualSpace, const ViewStyle &vs, const PRectangle rcClient);\r\n\tSelectionPosition SPositionFromLineX(Surface *surface, const EditModel &model, Sci::Line lineDoc, int x, const ViewStyle &vs);\r\n\tSci::Line DisplayFromPosition(Surface *surface, const EditModel &model, Sci::Position pos, const ViewStyle &vs);\r\n\tSci::Position StartEndDisplayLine(Surface *surface, const EditModel &model, Sci::Position pos, bool start, const ViewStyle &vs);\r\n\r\nprivate:\r\n\tvoid DrawEOL(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll,\r\n\t\tSci::Line line, int xStart, PRectangle rcLine, int subLine, Sci::Position lineEnd, XYPOSITION subLineStart, ColourOptional background);\r\n\tvoid DrawFoldDisplayText(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll,\r\n\t\tSci::Line line, int xStart, PRectangle rcLine, int subLine, XYPOSITION subLineStart, DrawPhase phase);\r\n\tvoid DrawEOLAnnotationText(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll,\r\n\t\tSci::Line line, int xStart, PRectangle rcLine, int subLine, XYPOSITION subLineStart, DrawPhase phase);\r\n\tvoid DrawAnnotation(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll,\r\n\t\tSci::Line line, int xStart, PRectangle rcLine, int subLine, DrawPhase phase);\r\n\tvoid DrawCarets(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll,\r\n\t\tSci::Line lineDoc, int xStart, PRectangle rcLine, int subLine) const;\r\n\tvoid DrawIndentGuide(Surface *surface, XYPOSITION start, PRectangle rcSegment, bool highlight, bool offset);\r\n\tvoid DrawForeground(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll,\r\n\t\tint xStart, PRectangle rcLine, int subLine, Sci::Line lineVisible, Range lineRange, Sci::Position posLineStart,\r\n\t\tColourOptional background);\r\n\tvoid DrawIndentGuidesOverEmpty(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll,\r\n\t\tSci::Line line, int xStart, PRectangle rcLine, int subLine, Sci::Line lineVisible);\r\n\tvoid DrawLine(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll,\r\n\t\tSci::Line line, Sci::Line lineVisible, int xStart, PRectangle rcLine, int subLine, DrawPhase phase);\r\n\r\npublic:\r\n\tvoid PaintText(Surface *surfaceWindow, const EditModel &model, const ViewStyle &vsDraw,\r\n\t\tPRectangle rcArea, PRectangle rcClient);\r\n\tSci::Position FormatRange(bool draw, CharacterRangeFull chrg, Rectangle rc, Surface *surface, Surface *surfaceMeasure,\r\n\t\tconst EditModel &model, const ViewStyle &vs);\r\n};\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/src/Editor.cxx",
    "content": "// Scintilla source code edit control\r\n/** @file Editor.cxx\r\n ** Main code for the edit control.\r\n **/\r\n// Copyright 1998-2011 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#include <cstddef>\r\n#include <cstdlib>\r\n#include <cstdint>\r\n#include <cassert>\r\n#include <cstring>\r\n#include <cstdio>\r\n#include <cmath>\r\n#include <cstdint>\r\n\r\n#include <stdexcept>\r\n#include <string>\r\n#include <string_view>\r\n#include <vector>\r\n#include <map>\r\n#include <set>\r\n#include <forward_list>\r\n#include <optional>\r\n#include <algorithm>\r\n#include <iterator>\r\n#include <memory>\r\n#include <chrono>\r\n#include <atomic>\r\n#include <mutex>\r\n#include <thread>\r\n#include <future>\r\n\r\n#include \"ScintillaTypes.h\"\r\n#include \"ScintillaMessages.h\"\r\n#include \"ScintillaStructures.h\"\r\n#include \"ILoader.h\"\r\n#include \"ILexer.h\"\r\n\r\n#include \"Debugging.h\"\r\n#include \"Geometry.h\"\r\n#include \"Platform.h\"\r\n\r\n#include \"CharacterType.h\"\r\n#include \"CharacterCategoryMap.h\"\r\n#include \"Position.h\"\r\n#include \"UniqueString.h\"\r\n#include \"SplitVector.h\"\r\n#include \"Partitioning.h\"\r\n#include \"RunStyles.h\"\r\n#include \"ContractionState.h\"\r\n#include \"CellBuffer.h\"\r\n#include \"PerLine.h\"\r\n#include \"KeyMap.h\"\r\n#include \"Indicator.h\"\r\n#include \"LineMarker.h\"\r\n#include \"Style.h\"\r\n#include \"ViewStyle.h\"\r\n#include \"CharClassify.h\"\r\n#include \"Decoration.h\"\r\n#include \"CaseFolder.h\"\r\n#include \"Document.h\"\r\n#include \"UniConversion.h\"\r\n#include \"DBCS.h\"\r\n#include \"Selection.h\"\r\n#include \"PositionCache.h\"\r\n#include \"EditModel.h\"\r\n#include \"MarginView.h\"\r\n#include \"EditView.h\"\r\n#include \"Editor.h\"\r\n#include \"ElapsedPeriod.h\"\r\n\r\nusing namespace Scintilla;\r\nusing namespace Scintilla::Internal;\r\n\r\nnamespace {\r\n\r\n/*\r\n\treturn whether this modification represents an operation that\r\n\tmay reasonably be deferred (not done now OR [possibly] at all)\r\n*/\r\nconstexpr bool CanDeferToLastStep(const DocModification &mh) noexcept {\r\n\tif (FlagSet(mh.modificationType, (ModificationFlags::BeforeInsert | ModificationFlags::BeforeDelete)))\r\n\t\treturn true;\t// CAN skip\r\n\tif (!FlagSet(mh.modificationType, (ModificationFlags::Undo | ModificationFlags::Redo)))\r\n\t\treturn false;\t// MUST do\r\n\tif (FlagSet(mh.modificationType, ModificationFlags::MultiStepUndoRedo))\r\n\t\treturn true;\t// CAN skip\r\n\treturn false;\t\t// PRESUMABLY must do\r\n}\r\n\r\nconstexpr bool CanEliminate(const DocModification &mh) noexcept {\r\n\treturn\r\n\t\tFlagSet(mh.modificationType, (ModificationFlags::BeforeInsert | ModificationFlags::BeforeDelete));\r\n}\r\n\r\n/*\r\n\treturn whether this modification represents the FINAL step\r\n\tin a [possibly lengthy] multi-step Undo/Redo sequence\r\n*/\r\nconstexpr bool IsLastStep(const DocModification &mh) noexcept {\r\n\tconstexpr ModificationFlags finalMask = ModificationFlags::MultiStepUndoRedo\r\n\t\t| ModificationFlags::LastStepInUndoRedo\r\n\t\t| ModificationFlags::MultilineUndoRedo;\r\n\treturn\r\n\t\tFlagSet(mh.modificationType, (ModificationFlags::Undo | ModificationFlags::Redo))\r\n\t    && ((mh.modificationType & finalMask) == finalMask);\r\n}\r\n\r\n}\r\n\r\nTimer::Timer() noexcept :\r\n\t\tticking(false), ticksToWait(0), tickerID{} {}\r\n\r\nIdler::Idler() noexcept :\r\n\t\tstate(false), idlerID(nullptr) {}\r\n\r\nstatic constexpr bool IsAllSpacesOrTabs(std::string_view sv) noexcept {\r\n\tfor (const char ch : sv) {\r\n\t\t// This is safe because IsSpaceOrTab() will return false for null terminators\r\n\t\tif (!IsSpaceOrTab(ch))\r\n\t\t\treturn false;\r\n\t}\r\n\treturn true;\r\n}\r\n\r\nEditor::Editor() : durationWrapOneByte(0.000001, 0.00000001, 0.00001) {\r\n\tctrlID = 0;\r\n\r\n\tstylesValid = false;\r\n\ttechnology = Technology::Default;\r\n\tscaleRGBAImage = 100.0f;\r\n\r\n\tcursorMode = CursorShape::Normal;\r\n\r\n\terrorStatus = Status::Ok;\r\n\tmouseDownCaptures = true;\r\n\tmouseWheelCaptures = true;\r\n\r\n\tlastClickTime = 0;\r\n\tdoubleClickCloseThreshold = Point(3, 3);\r\n\tdwellDelay = TimeForever;\r\n\tticksToDwell = TimeForever;\r\n\tdwelling = false;\r\n\tptMouseLast.x = 0;\r\n\tptMouseLast.y = 0;\r\n\tinDragDrop = DragDrop::none;\r\n\tdropWentOutside = false;\r\n\tposDrop = SelectionPosition(Sci::invalidPosition);\r\n\thotSpotClickPos = Sci::invalidPosition;\r\n\tselectionUnit = TextUnit::character;\r\n\r\n\tlastXChosen = 0;\r\n\tlineAnchorPos = 0;\r\n\toriginalAnchorPos = 0;\r\n\twordSelectAnchorStartPos = 0;\r\n\twordSelectAnchorEndPos = 0;\r\n\twordSelectInitialCaretPos = -1;\r\n\r\n\tcaretPolicies.x = { CaretPolicy::Slop | CaretPolicy::Even, 50 };\r\n\tcaretPolicies.y = { CaretPolicy::Even, 0 };\r\n\r\n\tvisiblePolicy = { 0, 0 };\r\n\r\n\tsearchAnchor = 0;\r\n\r\n\txCaretMargin = 50;\r\n\thorizontalScrollBarVisible = true;\r\n\tscrollWidth = 2000;\r\n\tverticalScrollBarVisible = true;\r\n\tendAtLastLine = true;\r\n\tcaretSticky = CaretSticky::Off;\r\n\tmarginOptions = MarginOption::None;\r\n\tmouseSelectionRectangularSwitch = false;\r\n\tmultipleSelection = false;\r\n\tadditionalSelectionTyping = false;\r\n\tmultiPasteMode = MultiPaste::Once;\r\n\tvirtualSpaceOptions = VirtualSpace::None;\r\n\r\n\ttargetRange = SelectionSegment();\r\n\tsearchFlags = FindOption::None;\r\n\r\n\ttopLine = 0;\r\n\tposTopLine = 0;\r\n\r\n\tlengthForEncode = -1;\r\n\r\n\tneedUpdateUI = Update::None;\r\n\tContainerNeedsUpdate(Update::Content);\r\n\r\n\tpaintState = PaintState::notPainting;\r\n\tpaintAbandonedByStyling = false;\r\n\tpaintingAllText = false;\r\n\twillRedrawAll = false;\r\n\tidleStyling = IdleStyling::None;\r\n\tneedIdleStyling = false;\r\n\r\n\tmodEventMask = ModificationFlags::EventMaskAll;\r\n\tcommandEvents = true;\r\n\r\n\tpdoc->AddWatcher(this, nullptr);\r\n\r\n\trecordingMacro = false;\r\n\tfoldAutomatic = AutomaticFold::None;\r\n\r\n\tconvertPastes = true;\r\n\r\n\tSetRepresentations();\r\n}\r\n\r\nEditor::~Editor() {\r\n\tpdoc->RemoveWatcher(this, nullptr);\r\n}\r\n\r\nvoid Editor::Finalise() {\r\n\tSetIdle(false);\r\n\tCancelModes();\r\n}\r\n\r\nvoid Editor::SetRepresentations() {\r\n\treprs.SetDefaultRepresentations(pdoc->dbcsCodePage);\r\n}\r\n\r\nvoid Editor::DropGraphics() noexcept {\r\n\tmarginView.DropGraphics();\r\n\tview.DropGraphics();\r\n}\r\n\r\nvoid Editor::InvalidateStyleData() noexcept {\r\n\tstylesValid = false;\r\n\tvs.technology = technology;\r\n\tDropGraphics();\r\n\tview.llc.Invalidate(LineLayout::ValidLevel::invalid);\r\n\tview.posCache->Clear();\r\n}\r\n\r\nvoid Editor::InvalidateStyleRedraw() {\r\n\tNeedWrapping();\r\n\tInvalidateStyleData();\r\n\tRedraw();\r\n}\r\n\r\nvoid Editor::RefreshStyleData() {\r\n\tif (!stylesValid) {\r\n\t\tstylesValid = true;\r\n\t\tAutoSurface surface(this);\r\n\t\tif (surface) {\r\n\t\t\tvs.Refresh(*surface, pdoc->tabInChars);\r\n\t\t}\r\n\t\tSetScrollBars();\r\n\t\tSetRectangularRange();\r\n\t}\r\n}\r\n\r\nbool Editor::HasMarginWindow() const noexcept {\r\n\treturn wMargin.Created();\r\n}\r\n\r\nPoint Editor::GetVisibleOriginInMain() const {\r\n\treturn Point(0, 0);\r\n}\r\n\r\nPointDocument Editor::DocumentPointFromView(Point ptView) const {\r\n\tPointDocument ptDocument(ptView);\r\n\tif (HasMarginWindow()) {\r\n\t\tconst Point ptOrigin = GetVisibleOriginInMain();\r\n\t\tptDocument.x += ptOrigin.x;\r\n\t\tptDocument.y += ptOrigin.y;\r\n\t} else {\r\n\t\tptDocument.x += xOffset;\r\n\t\tptDocument.y += topLine * vs.lineHeight;\r\n\t}\r\n\treturn ptDocument;\r\n}\r\n\r\nSci::Line Editor::TopLineOfMain() const noexcept {\r\n\tif (HasMarginWindow())\r\n\t\treturn 0;\r\n\telse\r\n\t\treturn topLine;\r\n}\r\n\r\nPoint Editor::ClientSize() const {\r\n\tconst PRectangle rcClient = GetClientRectangle();\r\n\treturn Point(rcClient.Width(), rcClient.Height());\r\n}\r\n\r\nPRectangle Editor::GetClientRectangle() const {\r\n\treturn wMain.GetClientPosition();\r\n}\r\n\r\nPRectangle Editor::GetClientDrawingRectangle() {\r\n\treturn GetClientRectangle();\r\n}\r\n\r\nPRectangle Editor::GetTextRectangle() const {\r\n\tPRectangle rc = GetClientRectangle();\r\n\trc.left += vs.textStart;\r\n\trc.right -= vs.rightMarginWidth;\r\n\treturn rc;\r\n}\r\n\r\nSci::Line Editor::LinesOnScreen() const {\r\n\tconst Point sizeClient = ClientSize();\r\n\tconst int htClient = static_cast<int>(sizeClient.y);\r\n\t//Platform::DebugPrintf(\"lines on screen = %d\\n\", htClient / lineHeight + 1);\r\n\treturn htClient / vs.lineHeight;\r\n}\r\n\r\nSci::Line Editor::LinesToScroll() const {\r\n\tconst Sci::Line retVal = LinesOnScreen() - 1;\r\n\tif (retVal < 1)\r\n\t\treturn 1;\r\n\telse\r\n\t\treturn retVal;\r\n}\r\n\r\nSci::Line Editor::MaxScrollPos() const {\r\n\t//Platform::DebugPrintf(\"Lines %d screen = %d maxScroll = %d\\n\",\r\n\t//LinesTotal(), LinesOnScreen(), LinesTotal() - LinesOnScreen() + 1);\r\n\tSci::Line retVal = pcs->LinesDisplayed();\r\n\tif (endAtLastLine) {\r\n\t\tretVal -= LinesOnScreen();\r\n\t} else {\r\n\t\tretVal--;\r\n\t}\r\n\tif (retVal < 0) {\r\n\t\treturn 0;\r\n\t} else {\r\n\t\treturn retVal;\r\n\t}\r\n}\r\n\r\nSelectionPosition Editor::ClampPositionIntoDocument(SelectionPosition sp) const {\r\n\tif (sp.Position() < 0) {\r\n\t\treturn SelectionPosition(0);\r\n\t} else if (sp.Position() > pdoc->Length()) {\r\n\t\treturn SelectionPosition(pdoc->Length());\r\n\t} else {\r\n\t\t// If not at end of line then set offset to 0\r\n\t\tif (!pdoc->IsLineEndPosition(sp.Position()))\r\n\t\t\tsp.SetVirtualSpace(0);\r\n\t\treturn sp;\r\n\t}\r\n}\r\n\r\nPoint Editor::LocationFromPosition(SelectionPosition pos, PointEnd pe) {\r\n\tconst PRectangle rcClient = GetTextRectangle();\r\n\tRefreshStyleData();\r\n\tAutoSurface surface(this);\r\n\treturn view.LocationFromPosition(surface, *this, pos, topLine, vs, pe, rcClient);\r\n}\r\n\r\nPoint Editor::LocationFromPosition(Sci::Position pos, PointEnd pe) {\r\n\treturn LocationFromPosition(SelectionPosition(pos), pe);\r\n}\r\n\r\nint Editor::XFromPosition(SelectionPosition sp) {\r\n\tconst Point pt = LocationFromPosition(sp);\r\n\treturn static_cast<int>(pt.x) - vs.textStart + xOffset;\r\n}\r\n\r\nSelectionPosition Editor::SPositionFromLocation(Point pt, bool canReturnInvalid, bool charPosition, bool virtualSpace) {\r\n\tRefreshStyleData();\r\n\tAutoSurface surface(this);\r\n\r\n\tPRectangle rcClient = GetTextRectangle();\r\n\t// May be in scroll view coordinates so translate back to main view\r\n\tconst Point ptOrigin = GetVisibleOriginInMain();\r\n\trcClient.Move(-ptOrigin.x, -ptOrigin.y);\r\n\r\n\tif (canReturnInvalid) {\r\n\t\tif (!rcClient.Contains(pt))\r\n\t\t\treturn SelectionPosition(Sci::invalidPosition);\r\n\t\tif (pt.x < vs.textStart)\r\n\t\t\treturn SelectionPosition(Sci::invalidPosition);\r\n\t\tif (pt.y < 0)\r\n\t\t\treturn SelectionPosition(Sci::invalidPosition);\r\n\t}\r\n\tconst PointDocument ptdoc = DocumentPointFromView(pt);\r\n\treturn view.SPositionFromLocation(surface, *this, ptdoc, canReturnInvalid,\r\n\t\tcharPosition, virtualSpace, vs, rcClient);\r\n}\r\n\r\nSci::Position Editor::PositionFromLocation(Point pt, bool canReturnInvalid, bool charPosition) {\r\n\treturn SPositionFromLocation(pt, canReturnInvalid, charPosition, false).Position();\r\n}\r\n\r\n/**\r\n* Find the document position corresponding to an x coordinate on a particular document line.\r\n* Ensure is between whole characters when document is in multi-byte or UTF-8 mode.\r\n* This method is used for rectangular selections and does not work on wrapped lines.\r\n*/\r\nSelectionPosition Editor::SPositionFromLineX(Sci::Line lineDoc, int x) {\r\n\tRefreshStyleData();\r\n\tif (lineDoc >= pdoc->LinesTotal())\r\n\t\treturn SelectionPosition(pdoc->Length());\r\n\t//Platform::DebugPrintf(\"Position of (%d,%d) line = %d top=%d\\n\", pt.x, pt.y, line, topLine);\r\n\tAutoSurface surface(this);\r\n\treturn view.SPositionFromLineX(surface, *this, lineDoc, x, vs);\r\n}\r\n\r\nSci::Position Editor::PositionFromLineX(Sci::Line lineDoc, int x) {\r\n\treturn SPositionFromLineX(lineDoc, x).Position();\r\n}\r\n\r\nSci::Line Editor::LineFromLocation(Point pt) const noexcept {\r\n\treturn pcs->DocFromDisplay(static_cast<int>(pt.y) / vs.lineHeight + topLine);\r\n}\r\n\r\nvoid Editor::SetTopLine(Sci::Line topLineNew) {\r\n\tif ((topLine != topLineNew) && (topLineNew >= 0)) {\r\n\t\ttopLine = topLineNew;\r\n\t\tContainerNeedsUpdate(Update::VScroll);\r\n\t}\r\n\tposTopLine = pdoc->LineStart(pcs->DocFromDisplay(topLine));\r\n}\r\n\r\n/**\r\n * If painting then abandon the painting because a wider redraw is needed.\r\n * @return true if calling code should stop drawing.\r\n */\r\nbool Editor::AbandonPaint() {\r\n\tif ((paintState == PaintState::painting) && !paintingAllText) {\r\n\t\tpaintState = PaintState::abandoned;\r\n\t}\r\n\treturn paintState == PaintState::abandoned;\r\n}\r\n\r\nvoid Editor::RedrawRect(PRectangle rc) {\r\n\t//Platform::DebugPrintf(\"Redraw %0d,%0d - %0d,%0d\\n\", rc.left, rc.top, rc.right, rc.bottom);\r\n\r\n\t// Clip the redraw rectangle into the client area\r\n\tconst PRectangle rcClient = GetClientRectangle();\r\n\tif (rc.top < rcClient.top)\r\n\t\trc.top = rcClient.top;\r\n\tif (rc.bottom > rcClient.bottom)\r\n\t\trc.bottom = rcClient.bottom;\r\n\tif (rc.left < rcClient.left)\r\n\t\trc.left = rcClient.left;\r\n\tif (rc.right > rcClient.right)\r\n\t\trc.right = rcClient.right;\r\n\r\n\tif ((rc.bottom > rc.top) && (rc.right > rc.left)) {\r\n\t\twMain.InvalidateRectangle(rc);\r\n\t}\r\n}\r\n\r\nvoid Editor::DiscardOverdraw() {\r\n\t// Overridden on platforms that may draw outside visible area.\r\n}\r\n\r\nvoid Editor::Redraw() {\r\n\tif (redrawPendingText) {\r\n\t\treturn;\r\n\t}\r\n\t//Platform::DebugPrintf(\"Redraw all\\n\");\r\n\tconst PRectangle rcClient = GetClientRectangle();\r\n\twMain.InvalidateRectangle(rcClient);\r\n\tif (HasMarginWindow()) {\r\n\t\twMargin.InvalidateAll();\r\n\t} else if (paintState == PaintState::notPainting) {\r\n\t\tredrawPendingText = true;\r\n\t}\r\n}\r\n\r\nvoid Editor::RedrawSelMargin(Sci::Line line, bool allAfter) {\r\n\tconst bool markersInText = vs.maskInLine || vs.maskDrawInText;\r\n\tif (!HasMarginWindow() || markersInText) {\t// May affect text area so may need to abandon and retry\r\n\t\tif (AbandonPaint()) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n\tif (HasMarginWindow() && markersInText) {\r\n\t\tRedraw();\r\n\t\treturn;\r\n\t}\r\n\tif (redrawPendingMargin) {\r\n\t\treturn;\r\n\t}\r\n\tPRectangle rcMarkers = GetClientRectangle();\r\n\tif (!markersInText) {\r\n\t\t// Normal case: just draw the margin\r\n\t\trcMarkers.right = rcMarkers.left + vs.fixedColumnWidth;\r\n\t}\r\n\tconst PRectangle rcMarkersFull = rcMarkers;\r\n\tif (line != -1) {\r\n\t\tPRectangle rcLine = RectangleFromRange(Range(pdoc->LineStart(line)), 0);\r\n\r\n\t\t// Inflate line rectangle if there are image markers with height larger than line height\r\n\t\tif (vs.largestMarkerHeight > vs.lineHeight) {\r\n\t\t\tconst int delta = (vs.largestMarkerHeight - vs.lineHeight + 1) / 2;\r\n\t\t\trcLine.top -= delta;\r\n\t\t\trcLine.bottom += delta;\r\n\t\t\tif (rcLine.top < rcMarkers.top)\r\n\t\t\t\trcLine.top = rcMarkers.top;\r\n\t\t\tif (rcLine.bottom > rcMarkers.bottom)\r\n\t\t\t\trcLine.bottom = rcMarkers.bottom;\r\n\t\t}\r\n\r\n\t\trcMarkers.top = rcLine.top;\r\n\t\tif (!allAfter)\r\n\t\t\trcMarkers.bottom = rcLine.bottom;\r\n\t\tif (rcMarkers.Empty())\r\n\t\t\treturn;\r\n\t}\r\n\tif (HasMarginWindow()) {\r\n\t\tconst Point ptOrigin = GetVisibleOriginInMain();\r\n\t\trcMarkers.Move(-ptOrigin.x, -ptOrigin.y);\r\n\t\twMargin.InvalidateRectangle(rcMarkers);\r\n\t} else {\r\n\t\twMain.InvalidateRectangle(rcMarkers);\r\n\t\tif (rcMarkers == rcMarkersFull) {\r\n\t\t\tredrawPendingMargin = true;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nPRectangle Editor::RectangleFromRange(Range r, int overlap) {\r\n\tconst Sci::Line minLine = pcs->DisplayFromDoc(\r\n\t\tpdoc->SciLineFromPosition(r.First()));\r\n\tconst Sci::Line maxLine = pcs->DisplayLastFromDoc(\r\n\t\tpdoc->SciLineFromPosition(r.Last()));\r\n\tconst PRectangle rcClientDrawing = GetClientDrawingRectangle();\r\n\tPRectangle rc;\r\n\tconst int leftTextOverlap = ((xOffset == 0) && (vs.leftMarginWidth > 0)) ? 1 : 0;\r\n\trc.left = static_cast<XYPOSITION>(vs.textStart - leftTextOverlap);\r\n\trc.top = static_cast<XYPOSITION>((minLine - TopLineOfMain()) * vs.lineHeight - overlap);\r\n\tif (rc.top < rcClientDrawing.top)\r\n\t\trc.top = rcClientDrawing.top;\r\n\t// Extend to right of prepared area if any to prevent artifacts from caret line highlight\r\n\trc.right = rcClientDrawing.right;\r\n\trc.bottom = static_cast<XYPOSITION>((maxLine - TopLineOfMain() + 1) * vs.lineHeight + overlap);\r\n\r\n\treturn rc;\r\n}\r\n\r\nvoid Editor::InvalidateRange(Sci::Position start, Sci::Position end) {\r\n\tif (redrawPendingText) {\r\n\t\treturn;\r\n\t}\r\n\tRedrawRect(RectangleFromRange(Range(start, end), view.LinesOverlap() ? vs.lineOverlap : 0));\r\n}\r\n\r\nSci::Position Editor::CurrentPosition() const noexcept {\r\n\treturn sel.MainCaret();\r\n}\r\n\r\nbool Editor::SelectionEmpty() const noexcept {\r\n\treturn sel.Empty();\r\n}\r\n\r\nSelectionPosition Editor::SelectionStart() noexcept {\r\n\treturn sel.RangeMain().Start();\r\n}\r\n\r\nSelectionPosition Editor::SelectionEnd() noexcept {\r\n\treturn sel.RangeMain().End();\r\n}\r\n\r\nvoid Editor::SetRectangularRange() {\r\n\tif (sel.IsRectangular()) {\r\n\t\tconst int xAnchor = XFromPosition(sel.Rectangular().anchor);\r\n\t\tint xCaret = XFromPosition(sel.Rectangular().caret);\r\n\t\tif (sel.selType == Selection::SelTypes::thin) {\r\n\t\t\txCaret = xAnchor;\r\n\t\t}\r\n\t\tconst Sci::Line lineAnchorRect =\r\n\t\t\tpdoc->SciLineFromPosition(sel.Rectangular().anchor.Position());\r\n\t\tconst Sci::Line lineCaret =\r\n\t\t\tpdoc->SciLineFromPosition(sel.Rectangular().caret.Position());\r\n\t\tconst int increment = (lineCaret > lineAnchorRect) ? 1 : -1;\r\n\t\tAutoSurface surface(this);\r\n\t\tfor (Sci::Line line=lineAnchorRect; line != lineCaret+increment; line += increment) {\r\n\t\t\tSelectionRange range(\r\n\t\t\t\tview.SPositionFromLineX(surface, *this, line, xCaret, vs),\r\n\t\t\t\tview.SPositionFromLineX(surface, *this, line, xAnchor, vs));\r\n\t\t\tif (!FlagSet(virtualSpaceOptions, VirtualSpace::RectangularSelection))\r\n\t\t\t\trange.ClearVirtualSpace();\r\n\t\t\tif (line == lineAnchorRect)\r\n\t\t\t\tsel.SetSelection(range);\r\n\t\t\telse\r\n\t\t\t\tsel.AddSelectionWithoutTrim(range);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid Editor::ThinRectangularRange() {\r\n\tif (sel.IsRectangular()) {\r\n\t\tsel.selType = Selection::SelTypes::thin;\r\n\t\tif (sel.Rectangular().caret < sel.Rectangular().anchor) {\r\n\t\t\tsel.Rectangular() = SelectionRange(sel.Range(sel.Count()-1).caret, sel.Range(0).anchor);\r\n\t\t} else {\r\n\t\t\tsel.Rectangular() = SelectionRange(sel.Range(sel.Count()-1).anchor, sel.Range(0).caret);\r\n\t\t}\r\n\t\tSetRectangularRange();\r\n\t}\r\n}\r\n\r\nvoid Editor::InvalidateSelection(SelectionRange newMain, bool invalidateWholeSelection) {\r\n\tif (sel.Count() > 1 || !(sel.RangeMain().anchor == newMain.anchor) || sel.IsRectangular()) {\r\n\t\tinvalidateWholeSelection = true;\r\n\t}\r\n\tSci::Position firstAffected = std::min(sel.RangeMain().Start().Position(), newMain.Start().Position());\r\n\t// +1 for lastAffected ensures caret repainted\r\n\tSci::Position lastAffected = std::max(newMain.caret.Position()+1, newMain.anchor.Position());\r\n\tlastAffected = std::max(lastAffected, sel.RangeMain().End().Position());\r\n\tif (invalidateWholeSelection) {\r\n\t\tfor (size_t r=0; r<sel.Count(); r++) {\r\n\t\t\tfirstAffected = std::min(firstAffected, sel.Range(r).caret.Position());\r\n\t\t\tfirstAffected = std::min(firstAffected, sel.Range(r).anchor.Position());\r\n\t\t\tlastAffected = std::max(lastAffected, sel.Range(r).caret.Position()+1);\r\n\t\t\tlastAffected = std::max(lastAffected, sel.Range(r).anchor.Position());\r\n\t\t}\r\n\t}\r\n\tContainerNeedsUpdate(Update::Selection);\r\n\tInvalidateRange(firstAffected, lastAffected);\r\n}\r\n\r\nvoid Editor::InvalidateWholeSelection() {\r\n\tInvalidateSelection(sel.RangeMain(), true);\r\n}\r\n\r\n/* For Line selection - the anchor and caret are always\r\n   at the beginning and end of the region lines. */\r\nSelectionRange Editor::LineSelectionRange(SelectionPosition currentPos_, SelectionPosition anchor_) const {\r\n\tif (currentPos_ > anchor_) {\r\n\t\tanchor_ = SelectionPosition(pdoc->LineStartPosition(anchor_.Position()));\r\n\t\tcurrentPos_ = SelectionPosition(pdoc->LineEndPosition(currentPos_.Position()));\r\n\t} else {\r\n\t\tcurrentPos_ = SelectionPosition(pdoc->LineStartPosition(currentPos_.Position()));\r\n\t\tanchor_ = SelectionPosition(pdoc->LineEndPosition(anchor_.Position()));\r\n\t}\r\n\treturn SelectionRange(currentPos_, anchor_);\r\n}\r\n\r\nvoid Editor::SetSelection(SelectionPosition currentPos_, SelectionPosition anchor_) {\r\n\tcurrentPos_ = ClampPositionIntoDocument(currentPos_);\r\n\tanchor_ = ClampPositionIntoDocument(anchor_);\r\n\tconst Sci::Line currentLine = pdoc->SciLineFromPosition(currentPos_.Position());\r\n\tSelectionRange rangeNew(currentPos_, anchor_);\r\n\tif (sel.selType == Selection::SelTypes::lines) {\r\n\t\trangeNew = LineSelectionRange(currentPos_, anchor_);\r\n\t}\r\n\tif (sel.Count() > 1 || !(sel.RangeMain() == rangeNew)) {\r\n\t\tInvalidateSelection(rangeNew);\r\n\t}\r\n\tsel.RangeMain() = rangeNew;\r\n\tSetRectangularRange();\r\n\tClaimSelection();\r\n\tSetHoverIndicatorPosition(sel.MainCaret());\r\n\r\n\tif (marginView.highlightDelimiter.NeedsDrawing(currentLine)) {\r\n\t\tRedrawSelMargin();\r\n\t}\r\n\tQueueIdleWork(WorkItems::updateUI);\r\n}\r\n\r\nvoid Editor::SetSelection(Sci::Position currentPos_, Sci::Position anchor_) {\r\n\tSetSelection(SelectionPosition(currentPos_), SelectionPosition(anchor_));\r\n}\r\n\r\n// Just move the caret on the main selection\r\nvoid Editor::SetSelection(SelectionPosition currentPos_) {\r\n\tcurrentPos_ = ClampPositionIntoDocument(currentPos_);\r\n\tconst Sci::Line currentLine = pdoc->SciLineFromPosition(currentPos_.Position());\r\n\tif (sel.Count() > 1 || !(sel.RangeMain().caret == currentPos_)) {\r\n\t\tInvalidateSelection(SelectionRange(currentPos_));\r\n\t}\r\n\tif (sel.IsRectangular()) {\r\n\t\tsel.Rectangular() =\r\n\t\t\tSelectionRange(SelectionPosition(currentPos_), sel.Rectangular().anchor);\r\n\t\tSetRectangularRange();\r\n\t} else if (sel.selType == Selection::SelTypes::lines) {\r\n\t\tsel.RangeMain() = LineSelectionRange(currentPos_, sel.RangeMain().anchor);\r\n\t} else {\r\n\t\tsel.RangeMain() =\r\n\t\t\tSelectionRange(SelectionPosition(currentPos_), sel.RangeMain().anchor);\r\n\t}\r\n\tClaimSelection();\r\n\tSetHoverIndicatorPosition(sel.MainCaret());\r\n\r\n\tif (marginView.highlightDelimiter.NeedsDrawing(currentLine)) {\r\n\t\tRedrawSelMargin();\r\n\t}\r\n\tQueueIdleWork(WorkItems::updateUI);\r\n}\r\n\r\nvoid Editor::SetEmptySelection(SelectionPosition currentPos_) {\r\n\tconst Sci::Line currentLine = pdoc->SciLineFromPosition(currentPos_.Position());\r\n\tSelectionRange rangeNew(ClampPositionIntoDocument(currentPos_));\r\n\tif (sel.Count() > 1 || !(sel.RangeMain() == rangeNew)) {\r\n\t\tInvalidateSelection(rangeNew);\r\n\t}\r\n\tsel.Clear();\r\n\tsel.RangeMain() = rangeNew;\r\n\tSetRectangularRange();\r\n\tClaimSelection();\r\n\tSetHoverIndicatorPosition(sel.MainCaret());\r\n\r\n\tif (marginView.highlightDelimiter.NeedsDrawing(currentLine)) {\r\n\t\tRedrawSelMargin();\r\n\t}\r\n\tQueueIdleWork(WorkItems::updateUI);\r\n}\r\n\r\nvoid Editor::SetEmptySelection(Sci::Position currentPos_) {\r\n\tSetEmptySelection(SelectionPosition(currentPos_));\r\n}\r\n\r\nvoid Editor::MultipleSelectAdd(AddNumber addNumber) {\r\n\tif (SelectionEmpty() || !multipleSelection) {\r\n\t\t// Select word at caret\r\n\t\tconst Sci::Position startWord = pdoc->ExtendWordSelect(sel.MainCaret(), -1, true);\r\n\t\tconst Sci::Position endWord = pdoc->ExtendWordSelect(startWord, 1, true);\r\n\t\tTrimAndSetSelection(endWord, startWord);\r\n\r\n\t} else {\r\n\r\n\t\tif (!pdoc->HasCaseFolder())\r\n\t\t\tpdoc->SetCaseFolder(CaseFolderForEncoding());\r\n\r\n\t\tconst Range rangeMainSelection(sel.RangeMain().Start().Position(), sel.RangeMain().End().Position());\r\n\t\tconst std::string selectedText = RangeText(rangeMainSelection.start, rangeMainSelection.end);\r\n\r\n\t\tconst Range rangeTarget(targetRange.start.Position(), targetRange.end.Position());\r\n\t\tstd::vector<Range> searchRanges;\r\n\t\t// Search should be over the target range excluding the current selection so\r\n\t\t// may need to search 2 ranges, after the selection then before the selection.\r\n\t\tif (rangeTarget.Overlaps(rangeMainSelection)) {\r\n\t\t\t// Common case is that the selection is completely within the target but\r\n\t\t\t// may also have overlap at start or end.\r\n\t\t\tif (rangeMainSelection.end < rangeTarget.end)\r\n\t\t\t\tsearchRanges.push_back(Range(rangeMainSelection.end, rangeTarget.end));\r\n\t\t\tif (rangeTarget.start < rangeMainSelection.start)\r\n\t\t\t\tsearchRanges.push_back(Range(rangeTarget.start, rangeMainSelection.start));\r\n\t\t} else {\r\n\t\t\t// No overlap\r\n\t\t\tsearchRanges.push_back(rangeTarget);\r\n\t\t}\r\n\r\n\t\tfor (const Range range : searchRanges) {\r\n\t\t\tSci::Position searchStart = range.start;\r\n\t\t\tconst Sci::Position searchEnd = range.end;\r\n\t\t\tfor (;;) {\r\n\t\t\t\tSci::Position lengthFound = selectedText.length();\r\n\t\t\t\tconst Sci::Position pos = pdoc->FindText(searchStart, searchEnd,\r\n\t\t\t\t\tselectedText.c_str(), searchFlags, &lengthFound);\r\n\t\t\t\tif (pos >= 0) {\r\n\t\t\t\t\tsel.AddSelection(SelectionRange(pos + lengthFound, pos));\r\n\t\t\t\t\tContainerNeedsUpdate(Update::Selection);\r\n\t\t\t\t\tScrollRange(sel.RangeMain());\r\n\t\t\t\t\tRedraw();\r\n\t\t\t\t\tif (addNumber == AddNumber::one)\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\tsearchStart = pos + lengthFound;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nbool Editor::RangeContainsProtected(Sci::Position start, Sci::Position end) const noexcept {\r\n\tif (vs.ProtectionActive()) {\r\n\t\tif (start > end) {\r\n\t\t\tstd::swap(start, end);\r\n\t\t}\r\n\t\tfor (Sci::Position pos = start; pos < end; pos++) {\r\n\t\t\tif (vs.styles[pdoc->StyleIndexAt(pos)].IsProtected())\r\n\t\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\treturn false;\r\n}\r\n\r\nbool Editor::SelectionContainsProtected() const noexcept {\r\n\tfor (size_t r=0; r<sel.Count(); r++) {\r\n\t\tif (RangeContainsProtected(sel.Range(r).Start().Position(),\r\n\t\t\tsel.Range(r).End().Position())) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\treturn false;\r\n}\r\n\r\n/**\r\n * Asks document to find a good position and then moves out of any invisible positions.\r\n */\r\nSci::Position Editor::MovePositionOutsideChar(Sci::Position pos, Sci::Position moveDir, bool checkLineEnd) const {\r\n\treturn MovePositionOutsideChar(SelectionPosition(pos), moveDir, checkLineEnd).Position();\r\n}\r\n\r\nSelectionPosition Editor::MovePositionOutsideChar(SelectionPosition pos, Sci::Position moveDir, bool checkLineEnd) const {\r\n\tconst Sci::Position posMoved = pdoc->MovePositionOutsideChar(pos.Position(), moveDir, checkLineEnd);\r\n\tif (posMoved != pos.Position())\r\n\t\tpos.SetPosition(posMoved);\r\n\tif (vs.ProtectionActive()) {\r\n\t\tif (moveDir > 0) {\r\n\t\t\tif ((pos.Position() > 0) && vs.styles[pdoc->StyleIndexAt(pos.Position() - 1)].IsProtected()) {\r\n\t\t\t\twhile ((pos.Position() < pdoc->Length()) &&\r\n\t\t\t\t        (vs.styles[pdoc->StyleIndexAt(pos.Position())].IsProtected()))\r\n\t\t\t\t\tpos.Add(1);\r\n\t\t\t}\r\n\t\t} else if (moveDir < 0) {\r\n\t\t\tif (vs.styles[pdoc->StyleIndexAt(pos.Position())].IsProtected()) {\r\n\t\t\t\twhile ((pos.Position() > 0) &&\r\n\t\t\t\t        (vs.styles[pdoc->StyleIndexAt(pos.Position() - 1)].IsProtected()))\r\n\t\t\t\t\tpos.Add(-1);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn pos;\r\n}\r\n\r\nvoid Editor::MovedCaret(SelectionPosition newPos, SelectionPosition previousPos,\r\n\tbool ensureVisible, CaretPolicies policies) {\r\n\tconst Sci::Line currentLine = pdoc->SciLineFromPosition(newPos.Position());\r\n\tif (ensureVisible) {\r\n\t\t// In case in need of wrapping to ensure DisplayFromDoc works.\r\n\t\tif (currentLine >= wrapPending.start) {\r\n\t\t\tif (WrapLines(WrapScope::wsAll)) {\r\n\t\t\t\tRedraw();\r\n\t\t\t}\r\n\t\t}\r\n\t\tconst XYScrollPosition newXY = XYScrollToMakeVisible(\r\n\t\t\tSelectionRange(posDrag.IsValid() ? posDrag : newPos), XYScrollOptions::all, policies);\r\n\t\tif (previousPos.IsValid() && (newXY.xOffset == xOffset)) {\r\n\t\t\t// simple vertical scroll then invalidate\r\n\t\t\tScrollTo(newXY.topLine);\r\n\t\t\tInvalidateSelection(SelectionRange(previousPos), true);\r\n\t\t} else {\r\n\t\t\tSetXYScroll(newXY);\r\n\t\t}\r\n\t}\r\n\r\n\tShowCaretAtCurrentPosition();\r\n\tNotifyCaretMove();\r\n\r\n\tClaimSelection();\r\n\tSetHoverIndicatorPosition(sel.MainCaret());\r\n\tQueueIdleWork(WorkItems::updateUI);\r\n\r\n\tif (marginView.highlightDelimiter.NeedsDrawing(currentLine)) {\r\n\t\tRedrawSelMargin();\r\n\t}\r\n}\r\n\r\nvoid Editor::MovePositionTo(SelectionPosition newPos, Selection::SelTypes selt, bool ensureVisible) {\r\n\tconst SelectionPosition spCaret = ((sel.Count() == 1) && sel.Empty()) ?\r\n\t\tsel.Last() : SelectionPosition(Sci::invalidPosition);\r\n\r\n\tconst Sci::Position delta = newPos.Position() - sel.MainCaret();\r\n\tnewPos = ClampPositionIntoDocument(newPos);\r\n\tnewPos = MovePositionOutsideChar(newPos, delta);\r\n\tif (!multipleSelection && sel.IsRectangular() && (selt == Selection::SelTypes::stream)) {\r\n\t\t// Can't turn into multiple selection so clear additional selections\r\n\t\tInvalidateSelection(SelectionRange(newPos), true);\r\n\t\tsel.DropAdditionalRanges();\r\n\t}\r\n\tif (!sel.IsRectangular() && (selt == Selection::SelTypes::rectangle)) {\r\n\t\t// Switching to rectangular\r\n\t\tInvalidateSelection(sel.RangeMain(), false);\r\n\t\tSelectionRange rangeMain = sel.RangeMain();\r\n\t\tsel.Clear();\r\n\t\tsel.Rectangular() = rangeMain;\r\n\t}\r\n\tif (selt != Selection::SelTypes::none) {\r\n\t\tsel.selType = selt;\r\n\t}\r\n\tif (selt != Selection::SelTypes::none || sel.MoveExtends()) {\r\n\t\tSetSelection(newPos);\r\n\t} else {\r\n\t\tSetEmptySelection(newPos);\r\n\t}\r\n\r\n\tMovedCaret(newPos, spCaret, ensureVisible, caretPolicies);\r\n}\r\n\r\nvoid Editor::MovePositionTo(Sci::Position newPos, Selection::SelTypes selt, bool ensureVisible) {\r\n\tMovePositionTo(SelectionPosition(newPos), selt, ensureVisible);\r\n}\r\n\r\nSelectionPosition Editor::MovePositionSoVisible(SelectionPosition pos, int moveDir) {\r\n\tpos = ClampPositionIntoDocument(pos);\r\n\tpos = MovePositionOutsideChar(pos, moveDir);\r\n\tconst Sci::Line lineDoc = pdoc->SciLineFromPosition(pos.Position());\r\n\tif (pcs->GetVisible(lineDoc)) {\r\n\t\treturn pos;\r\n\t} else {\r\n\t\tSci::Line lineDisplay = pcs->DisplayFromDoc(lineDoc);\r\n\t\tif (moveDir > 0) {\r\n\t\t\t// lineDisplay is already line before fold as lines in fold use display line of line after fold\r\n\t\t\tlineDisplay = std::clamp<Sci::Line>(lineDisplay, 0, pcs->LinesDisplayed());\r\n\t\t\treturn SelectionPosition(\r\n\t\t\t\tpdoc->LineStart(pcs->DocFromDisplay(lineDisplay)));\r\n\t\t} else {\r\n\t\t\tlineDisplay = std::clamp<Sci::Line>(lineDisplay - 1, 0, pcs->LinesDisplayed());\r\n\t\t\treturn SelectionPosition(\r\n\t\t\t\tpdoc->LineEnd(pcs->DocFromDisplay(lineDisplay)));\r\n\t\t}\r\n\t}\r\n}\r\n\r\nSelectionPosition Editor::MovePositionSoVisible(Sci::Position pos, int moveDir) {\r\n\treturn MovePositionSoVisible(SelectionPosition(pos), moveDir);\r\n}\r\n\r\nPoint Editor::PointMainCaret() {\r\n\treturn LocationFromPosition(sel.RangeMain().caret);\r\n}\r\n\r\n/**\r\n * Choose the x position that the caret will try to stick to\r\n * as it moves up and down.\r\n */\r\nvoid Editor::SetLastXChosen() {\r\n\tconst Point pt = PointMainCaret();\r\n\tlastXChosen = static_cast<int>(pt.x) + xOffset;\r\n}\r\n\r\nvoid Editor::ScrollTo(Sci::Line line, bool moveThumb) {\r\n\tconst Sci::Line topLineNew = std::clamp<Sci::Line>(line, 0, MaxScrollPos());\r\n\tif (topLineNew != topLine) {\r\n\t\t// Try to optimise small scrolls\r\n#ifndef UNDER_CE\r\n\t\tconst Sci::Line linesToMove = topLine - topLineNew;\r\n\t\tconst bool performBlit = (std::abs(linesToMove) <= 10) && (paintState == PaintState::notPainting);\r\n\t\twillRedrawAll = !performBlit;\r\n#endif\r\n\t\tSetTopLine(topLineNew);\r\n\t\t// Optimize by styling the view as this will invalidate any needed area\r\n\t\t// which could abort the initial paint if discovered later.\r\n\t\tStyleAreaBounded(GetClientRectangle(), true);\r\n#ifndef UNDER_CE\r\n\t\t// Perform redraw rather than scroll if many lines would be redrawn anyway.\r\n\t\tif (performBlit) {\r\n\t\t\tScrollText(linesToMove);\r\n\t\t} else {\r\n\t\t\tRedraw();\r\n\t\t}\r\n\t\twillRedrawAll = false;\r\n#else\r\n\t\tRedraw();\r\n#endif\r\n\t\tif (moveThumb) {\r\n\t\t\tSetVerticalScrollPos();\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid Editor::ScrollText(Sci::Line /* linesToMove */) {\r\n\t//Platform::DebugPrintf(\"Editor::ScrollText %d\\n\", linesToMove);\r\n\tRedraw();\r\n}\r\n\r\nvoid Editor::HorizontalScrollTo(int xPos) {\r\n\t//Platform::DebugPrintf(\"HorizontalScroll %d\\n\", xPos);\r\n\tif (xPos < 0)\r\n\t\txPos = 0;\r\n\tif (!Wrapping() && (xOffset != xPos)) {\r\n\t\txOffset = xPos;\r\n\t\tContainerNeedsUpdate(Update::HScroll);\r\n\t\tSetHorizontalScrollPos();\r\n\t\tRedrawRect(GetClientRectangle());\r\n\t}\r\n}\r\n\r\nvoid Editor::VerticalCentreCaret() {\r\n\tconst Sci::Line lineDoc =\r\n\t\tpdoc->SciLineFromPosition(sel.IsRectangular() ? sel.Rectangular().caret.Position() : sel.MainCaret());\r\n\tconst Sci::Line lineDisplay = pcs->DisplayFromDoc(lineDoc);\r\n\tconst Sci::Line newTop = lineDisplay - (LinesOnScreen() / 2);\r\n\tif (topLine != newTop) {\r\n\t\tSetTopLine(newTop > 0 ? newTop : 0);\r\n\t\tSetVerticalScrollPos();\r\n\t\tRedrawRect(GetClientRectangle());\r\n\t}\r\n}\r\n\r\nvoid Editor::MoveSelectedLines(int lineDelta) {\r\n\r\n\tif (sel.IsRectangular()) {\r\n\t\t// Convert to stream selection\r\n\t\tconst SelectionRange rangeRectangular = sel.Rectangular();\r\n\t\tsel.Clear();\r\n\t\tsel.SetSelection(rangeRectangular);\r\n\t}\r\n\r\n\t// if selection doesn't start at the beginning of the line, set the new start\r\n\tSci::Position selectionStart = SelectionStart().Position();\r\n\tconst Sci::Line startLine = pdoc->SciLineFromPosition(selectionStart);\r\n\tconst Sci::Position beginningOfStartLine = pdoc->LineStart(startLine);\r\n\tselectionStart = beginningOfStartLine;\r\n\r\n\t// if selection doesn't end at the beginning of a line greater than that of the start,\r\n\t// then set it at the beginning of the next one\r\n\tSci::Position selectionEnd = SelectionEnd().Position();\r\n\tconst Sci::Line endLine = pdoc->SciLineFromPosition(selectionEnd);\r\n\tconst Sci::Position beginningOfEndLine = pdoc->LineStart(endLine);\r\n\tbool appendEol = false;\r\n\tif (selectionEnd > beginningOfEndLine\r\n\t\t|| selectionStart == selectionEnd) {\r\n\t\tselectionEnd = pdoc->LineStart(endLine + 1);\r\n\t\tappendEol = (selectionEnd == pdoc->Length() && pdoc->SciLineFromPosition(selectionEnd) == endLine);\r\n\t}\r\n\r\n\t// if there's nowhere for the selection to move\r\n\t// (i.e. at the beginning going up or at the end going down),\r\n\t// stop it right there!\r\n\tif ((selectionStart == 0 && lineDelta < 0)\r\n\t\t|| (selectionEnd == pdoc->Length() && lineDelta > 0)\r\n\t        || selectionStart == selectionEnd) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tUndoGroup ug(pdoc);\r\n\r\n\tif (lineDelta > 0 && selectionEnd == pdoc->LineStart(pdoc->LinesTotal() - 1)) {\r\n\t\tSetSelection(pdoc->MovePositionOutsideChar(selectionEnd - 1, -1), selectionEnd);\r\n\t\tClearSelection();\r\n\t\tselectionEnd = CurrentPosition();\r\n\t}\r\n\tSetSelection(selectionStart, selectionEnd);\r\n\r\n\tconst std::string selectedText = RangeText(selectionStart, selectionEnd);\r\n\r\n\tconst Point currentLocation = LocationFromPosition(CurrentPosition());\r\n\tconst Sci::Line currentLine = LineFromLocation(currentLocation);\r\n\r\n\tif (appendEol)\r\n\t\tSetSelection(pdoc->MovePositionOutsideChar(selectionStart - 1, -1), selectionEnd);\r\n\tClearSelection();\r\n\r\n\tconst std::string_view eol = pdoc->EOLString();\r\n\tif (currentLine + lineDelta >= pdoc->LinesTotal())\r\n\t\tpdoc->InsertString(pdoc->Length(), eol);\r\n\tGoToLine(currentLine + lineDelta);\r\n\r\n\tSci::Position selectionLength = pdoc->InsertString(CurrentPosition(), selectedText);\r\n\tif (appendEol) {\r\n\t\tconst Sci::Position lengthInserted = pdoc->InsertString(CurrentPosition() + selectionLength, eol);\r\n\t\tselectionLength += lengthInserted;\r\n\t}\r\n\tSetSelection(CurrentPosition(), CurrentPosition() + selectionLength);\r\n}\r\n\r\nvoid Editor::MoveSelectedLinesUp() {\r\n\tMoveSelectedLines(-1);\r\n}\r\n\r\nvoid Editor::MoveSelectedLinesDown() {\r\n\tMoveSelectedLines(1);\r\n}\r\n\r\nvoid Editor::MoveCaretInsideView(bool ensureVisible) {\r\n\tconst PRectangle rcClient = GetTextRectangle();\r\n\tconst Point pt = PointMainCaret();\r\n\tif (pt.y < rcClient.top) {\r\n\t\tMovePositionTo(SPositionFromLocation(\r\n\t\t            Point::FromInts(lastXChosen - xOffset, static_cast<int>(rcClient.top)),\r\n\t\t\t\t\tfalse, false, UserVirtualSpace()),\r\n\t\t\t\t\tSelection::SelTypes::none, ensureVisible);\r\n\t} else if ((pt.y + vs.lineHeight - 1) > rcClient.bottom) {\r\n\t\tconst ptrdiff_t yOfLastLineFullyDisplayed = static_cast<ptrdiff_t>(rcClient.top) + (LinesOnScreen() - 1) * vs.lineHeight;\r\n\t\tMovePositionTo(SPositionFromLocation(\r\n\t\t            Point::FromInts(lastXChosen - xOffset, static_cast<int>(rcClient.top + yOfLastLineFullyDisplayed)),\r\n\t\t\t\t\tfalse, false, UserVirtualSpace()),\r\n\t\t        Selection::SelTypes::none, ensureVisible);\r\n\t}\r\n}\r\n\r\nSci::Line Editor::DisplayFromPosition(Sci::Position pos) {\r\n\tAutoSurface surface(this);\r\n\treturn view.DisplayFromPosition(surface, *this, pos, vs);\r\n}\r\n\r\n/**\r\n * Ensure the caret is reasonably visible in context.\r\n *\r\nCaret policy in Scintilla\r\n\r\nIf slop is set, we can define a slop value.\r\nThis value defines an unwanted zone (UZ) where the caret is... unwanted.\r\nThis zone is defined as a number of pixels near the vertical margins,\r\nand as a number of lines near the horizontal margins.\r\nBy keeping the caret away from the edges, it is seen within its context,\r\nso it is likely that the identifier that the caret is on can be completely seen,\r\nand that the current line is seen with some of the lines following it which are\r\noften dependent on that line.\r\n\r\nIf strict is set, the policy is enforced... strictly.\r\nThe caret is centred on the display if slop is not set,\r\nand cannot go in the UZ if slop is set.\r\n\r\nIf jumps is set, the display is moved more energetically\r\nso the caret can move in the same direction longer before the policy is applied again.\r\n'3UZ' notation is used to indicate three time the size of the UZ as a distance to the margin.\r\n\r\nIf even is not set, instead of having symmetrical UZs,\r\nthe left and bottom UZs are extended up to right and top UZs respectively.\r\nThis way, we favour the displaying of useful information: the beginning of lines,\r\nwhere most code reside, and the lines after the caret, eg. the body of a function.\r\n\r\n     |        |       |      |                                            |\r\nslop | strict | jumps | even | Caret can go to the margin                 | When reaching limit (caret going out of\r\n     |        |       |      |                                            | visibility or going into the UZ) display is...\r\n-----+--------+-------+------+--------------------------------------------+--------------------------------------------------------------\r\n  0  |   0    |   0   |   0  | Yes                                        | moved to put caret on top/on right\r\n  0  |   0    |   0   |   1  | Yes                                        | moved by one position\r\n  0  |   0    |   1   |   0  | Yes                                        | moved to put caret on top/on right\r\n  0  |   0    |   1   |   1  | Yes                                        | centred on the caret\r\n  0  |   1    |   -   |   0  | Caret is always on top/on right of display | -\r\n  0  |   1    |   -   |   1  | No, caret is always centred                | -\r\n  1  |   0    |   0   |   0  | Yes                                        | moved to put caret out of the asymmetrical UZ\r\n  1  |   0    |   0   |   1  | Yes                                        | moved to put caret out of the UZ\r\n  1  |   0    |   1   |   0  | Yes                                        | moved to put caret at 3UZ of the top or right margin\r\n  1  |   0    |   1   |   1  | Yes                                        | moved to put caret at 3UZ of the margin\r\n  1  |   1    |   -   |   0  | Caret is always at UZ of top/right margin  | -\r\n  1  |   1    |   0   |   1  | No, kept out of UZ                         | moved by one position\r\n  1  |   1    |   1   |   1  | No, kept out of UZ                         | moved to put caret at 3UZ of the margin\r\n*/\r\n\r\nEditor::XYScrollPosition Editor::XYScrollToMakeVisible(const SelectionRange &range,\r\n\tconst XYScrollOptions options, CaretPolicies policies) {\r\n\tconst PRectangle rcClient = GetTextRectangle();\r\n\tconst Point ptOrigin = GetVisibleOriginInMain();\r\n\tconst Point pt = LocationFromPosition(range.caret) + ptOrigin;\r\n\tconst Point ptAnchor = LocationFromPosition(range.anchor) + ptOrigin;\r\n\tconst Point ptBottomCaret(pt.x, pt.y + vs.lineHeight - 1);\r\n\r\n\tXYScrollPosition newXY(xOffset, topLine);\r\n\tif (rcClient.Empty()) {\r\n\t\treturn newXY;\r\n\t}\r\n\r\n\t// Vertical positioning\r\n\tif (FlagSet(options, XYScrollOptions::vertical) &&\r\n\t\t(pt.y < rcClient.top || ptBottomCaret.y >= rcClient.bottom || FlagSet(policies.y.policy, CaretPolicy::Strict))) {\r\n\t\tconst Sci::Line lineCaret = DisplayFromPosition(range.caret.Position());\r\n\t\tconst Sci::Line linesOnScreen = LinesOnScreen();\r\n\t\tconst Sci::Line halfScreen = std::max(linesOnScreen - 1, static_cast<Sci::Line>(2)) / 2;\r\n\t\tconst bool bSlop = FlagSet(policies.y.policy, CaretPolicy::Slop);\r\n\t\tconst bool bStrict = FlagSet(policies.y.policy, CaretPolicy::Strict);\r\n\t\tconst bool bJump = FlagSet(policies.y.policy, CaretPolicy::Jumps);\r\n\t\tconst bool bEven = FlagSet(policies.y.policy, CaretPolicy::Even);\r\n\r\n\t\t// It should be possible to scroll the window to show the caret,\r\n\t\t// but this fails to remove the caret on GTK+\r\n\t\tif (bSlop) {\t// A margin is defined\r\n\t\t\tSci::Line yMoveT = 0;\r\n\t\t\tSci::Line yMoveB = 0;\r\n\t\t\tif (bStrict) {\r\n\t\t\t\tSci::Line yMarginT = 0;\r\n\t\t\t\tSci::Line yMarginB = 0;\r\n\t\t\t\tif (!FlagSet(options, XYScrollOptions::useMargin)) {\r\n\t\t\t\t\t// In drag mode, avoid moves\r\n\t\t\t\t\t// otherwise, a double click will select several lines.\r\n\t\t\t\t\tyMarginT = yMarginB = 0;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// yMarginT must equal to caretYSlop, with a minimum of 1 and\r\n\t\t\t\t\t// a maximum of slightly less than half the height of the text area.\r\n\t\t\t\t\tyMarginT = std::clamp<Sci::Line>(policies.y.slop, 1, halfScreen);\r\n\t\t\t\t\tif (bEven) {\r\n\t\t\t\t\t\tyMarginB = yMarginT;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tyMarginB = linesOnScreen - yMarginT - 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tyMoveT = yMarginT;\r\n\t\t\t\tif (bEven) {\r\n\t\t\t\t\tif (bJump) {\r\n\t\t\t\t\t\tyMoveT = std::clamp<Sci::Line>(policies.y.slop * 3, 1, halfScreen);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tyMoveB = yMoveT;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tyMoveB = linesOnScreen - yMoveT - 1;\r\n\t\t\t\t}\r\n\t\t\t\tif (lineCaret < topLine + yMarginT) {\r\n\t\t\t\t\t// Caret goes too high\r\n\t\t\t\t\tnewXY.topLine = lineCaret - yMoveT;\r\n\t\t\t\t} else if (lineCaret > topLine + linesOnScreen - 1 - yMarginB) {\r\n\t\t\t\t\t// Caret goes too low\r\n\t\t\t\t\tnewXY.topLine = lineCaret - linesOnScreen + 1 + yMoveB;\r\n\t\t\t\t}\r\n\t\t\t} else {\t// Not strict\r\n\t\t\t\tyMoveT = bJump ? policies.y.slop * 3 : policies.y.slop;\r\n\t\t\t\tyMoveT = std::clamp<Sci::Line>(yMoveT, 1, halfScreen);\r\n\t\t\t\tif (bEven) {\r\n\t\t\t\t\tyMoveB = yMoveT;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tyMoveB = linesOnScreen - yMoveT - 1;\r\n\t\t\t\t}\r\n\t\t\t\tif (lineCaret < topLine) {\r\n\t\t\t\t\t// Caret goes too high\r\n\t\t\t\t\tnewXY.topLine = lineCaret - yMoveT;\r\n\t\t\t\t} else if (lineCaret > topLine + linesOnScreen - 1) {\r\n\t\t\t\t\t// Caret goes too low\r\n\t\t\t\t\tnewXY.topLine = lineCaret - linesOnScreen + 1 + yMoveB;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\t// No slop\r\n\t\t\tif (!bStrict && !bJump) {\r\n\t\t\t\t// Minimal move\r\n\t\t\t\tif (lineCaret < topLine) {\r\n\t\t\t\t\t// Caret goes too high\r\n\t\t\t\t\tnewXY.topLine = lineCaret;\r\n\t\t\t\t} else if (lineCaret > topLine + linesOnScreen - 1) {\r\n\t\t\t\t\t// Caret goes too low\r\n\t\t\t\t\tif (bEven) {\r\n\t\t\t\t\t\tnewXY.topLine = lineCaret - linesOnScreen + 1;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tnewXY.topLine = lineCaret;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\t// Strict or going out of display\r\n\t\t\t\tif (bEven) {\r\n\t\t\t\t\t// Always centre caret\r\n\t\t\t\t\tnewXY.topLine = lineCaret - halfScreen;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Always put caret on top of display\r\n\t\t\t\t\tnewXY.topLine = lineCaret;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (!(range.caret == range.anchor)) {\r\n\t\t\tconst Sci::Line lineAnchor = DisplayFromPosition(range.anchor.Position());\r\n\t\t\tif (lineAnchor < lineCaret) {\r\n\t\t\t\t// Shift up to show anchor or as much of range as possible\r\n\t\t\t\tnewXY.topLine = std::min(newXY.topLine, lineAnchor);\r\n\t\t\t\tnewXY.topLine = std::max(newXY.topLine, lineCaret - LinesOnScreen());\r\n\t\t\t} else {\r\n\t\t\t\t// Shift down to show anchor or as much of range as possible\r\n\t\t\t\tnewXY.topLine = std::max(newXY.topLine, lineAnchor - LinesOnScreen());\r\n\t\t\t\tnewXY.topLine = std::min(newXY.topLine, lineCaret);\r\n\t\t\t}\r\n\t\t}\r\n\t\tnewXY.topLine = std::clamp<Sci::Line>(newXY.topLine, 0, MaxScrollPos());\r\n\t}\r\n\r\n\t// Horizontal positioning\r\n\tif (FlagSet(options, XYScrollOptions::horizontal) && !Wrapping()) {\r\n\t\tconst int halfScreen = std::max(static_cast<int>(rcClient.Width()) - 4, 4) / 2;\r\n\t\tconst bool bSlop = FlagSet(policies.x.policy, CaretPolicy::Slop);\r\n\t\tconst bool bStrict = FlagSet(policies.x.policy, CaretPolicy::Strict);\r\n\t\tconst bool bJump = FlagSet(policies.x.policy, CaretPolicy::Jumps);\r\n\t\tconst bool bEven = FlagSet(policies.x.policy, CaretPolicy::Even);\r\n\r\n\t\tif (bSlop) {\t// A margin is defined\r\n\t\t\tint xMoveL = 0;\r\n\t\t\tint xMoveR = 0;\r\n\t\t\tif (bStrict) {\r\n\t\t\t\tint xMarginL = 0;\r\n\t\t\t\tint xMarginR = 0;\r\n\t\t\t\tif (!FlagSet(options, XYScrollOptions::useMargin)) {\r\n\t\t\t\t\t// In drag mode, avoid moves unless very near of the margin\r\n\t\t\t\t\t// otherwise, a simple click will select text.\r\n\t\t\t\t\txMarginL = xMarginR = 2;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// xMargin must equal to caretXSlop, with a minimum of 2 and\r\n\t\t\t\t\t// a maximum of slightly less than half the width of the text area.\r\n\t\t\t\t\txMarginR = std::clamp(policies.x.slop, 2, halfScreen);\r\n\t\t\t\t\tif (bEven) {\r\n\t\t\t\t\t\txMarginL = xMarginR;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\txMarginL = static_cast<int>(rcClient.Width()) - xMarginR - 4;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (bJump && bEven) {\r\n\t\t\t\t\t// Jump is used only in even mode\r\n\t\t\t\t\txMoveL = xMoveR = std::clamp(policies.x.slop * 3, 1, halfScreen);\r\n\t\t\t\t} else {\r\n\t\t\t\t\txMoveL = xMoveR = 0;\t// Not used, avoid a warning\r\n\t\t\t\t}\r\n\t\t\t\tif (pt.x < rcClient.left + xMarginL) {\r\n\t\t\t\t\t// Caret is on the left of the display\r\n\t\t\t\t\tif (bJump && bEven) {\r\n\t\t\t\t\t\tnewXY.xOffset -= xMoveL;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// Move just enough to allow to display the caret\r\n\t\t\t\t\t\tnewXY.xOffset -= static_cast<int>((rcClient.left + xMarginL) - pt.x);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (pt.x >= rcClient.right - xMarginR) {\r\n\t\t\t\t\t// Caret is on the right of the display\r\n\t\t\t\t\tif (bJump && bEven) {\r\n\t\t\t\t\t\tnewXY.xOffset += xMoveR;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// Move just enough to allow to display the caret\r\n\t\t\t\t\t\tnewXY.xOffset += static_cast<int>(pt.x - (rcClient.right - xMarginR) + 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\t// Not strict\r\n\t\t\t\txMoveR = bJump ? policies.x.slop * 3 : policies.x.slop;\r\n\t\t\t\txMoveR = std::clamp(xMoveR, 1, halfScreen);\r\n\t\t\t\tif (bEven) {\r\n\t\t\t\t\txMoveL = xMoveR;\r\n\t\t\t\t} else {\r\n\t\t\t\t\txMoveL = static_cast<int>(rcClient.Width()) - xMoveR - 4;\r\n\t\t\t\t}\r\n\t\t\t\tif (pt.x < rcClient.left) {\r\n\t\t\t\t\t// Caret is on the left of the display\r\n\t\t\t\t\tnewXY.xOffset -= xMoveL;\r\n\t\t\t\t} else if (pt.x >= rcClient.right) {\r\n\t\t\t\t\t// Caret is on the right of the display\r\n\t\t\t\t\tnewXY.xOffset += xMoveR;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\t// No slop\r\n\t\t\tif (bStrict ||\r\n\t\t\t        (bJump && (pt.x < rcClient.left || pt.x >= rcClient.right))) {\r\n\t\t\t\t// Strict or going out of display\r\n\t\t\t\tif (bEven) {\r\n\t\t\t\t\t// Centre caret\r\n\t\t\t\t\tnewXY.xOffset += static_cast<int>(pt.x - rcClient.left - halfScreen);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Put caret on right\r\n\t\t\t\t\tnewXY.xOffset += static_cast<int>(pt.x - rcClient.right + 1);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// Move just enough to allow to display the caret\r\n\t\t\t\tif (pt.x < rcClient.left) {\r\n\t\t\t\t\t// Caret is on the left of the display\r\n\t\t\t\t\tif (bEven) {\r\n\t\t\t\t\t\tnewXY.xOffset -= static_cast<int>(rcClient.left - pt.x);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tnewXY.xOffset += static_cast<int>(pt.x - rcClient.right) + 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (pt.x >= rcClient.right) {\r\n\t\t\t\t\t// Caret is on the right of the display\r\n\t\t\t\t\tnewXY.xOffset += static_cast<int>(pt.x - rcClient.right) + 1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// In case of a jump (find result) largely out of display, adjust the offset to display the caret\r\n\t\tif (pt.x + xOffset < rcClient.left + newXY.xOffset) {\r\n\t\t\tnewXY.xOffset = static_cast<int>(pt.x + xOffset - rcClient.left) - 2;\r\n\t\t} else if (pt.x + xOffset >= rcClient.right + newXY.xOffset) {\r\n\t\t\tnewXY.xOffset = static_cast<int>(pt.x + xOffset - rcClient.right) + 2;\r\n\t\t\tif (vs.IsBlockCaretStyle() || view.imeCaretBlockOverride) {\r\n\t\t\t\t// Ensure we can see a good portion of the block caret\r\n\t\t\t\tnewXY.xOffset += static_cast<int>(vs.aveCharWidth);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (!(range.caret == range.anchor)) {\r\n\t\t\tif (ptAnchor.x < pt.x) {\r\n\t\t\t\t// Shift to left to show anchor or as much of range as possible\r\n\t\t\t\tconst int maxOffset = static_cast<int>(ptAnchor.x + xOffset - rcClient.left) - 1;\r\n\t\t\t\tconst int minOffset = static_cast<int>(pt.x + xOffset - rcClient.right) + 1;\r\n\t\t\t\tnewXY.xOffset = std::min(newXY.xOffset, maxOffset);\r\n\t\t\t\tnewXY.xOffset = std::max(newXY.xOffset, minOffset);\r\n\t\t\t} else {\r\n\t\t\t\t// Shift to right to show anchor or as much of range as possible\r\n\t\t\t\tconst int minOffset = static_cast<int>(ptAnchor.x + xOffset - rcClient.right) + 1;\r\n\t\t\t\tconst int maxOffset = static_cast<int>(pt.x + xOffset - rcClient.left) - 1;\r\n\t\t\t\tnewXY.xOffset = std::max(newXY.xOffset, minOffset);\r\n\t\t\t\tnewXY.xOffset = std::min(newXY.xOffset, maxOffset);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (newXY.xOffset < 0) {\r\n\t\t\tnewXY.xOffset = 0;\r\n\t\t}\r\n\t}\r\n\r\n\treturn newXY;\r\n}\r\n\r\nvoid Editor::SetXYScroll(XYScrollPosition newXY) {\r\n\tif ((newXY.topLine != topLine) || (newXY.xOffset != xOffset)) {\r\n\t\tif (newXY.topLine != topLine) {\r\n\t\t\tSetTopLine(newXY.topLine);\r\n\t\t\tSetVerticalScrollPos();\r\n\t\t}\r\n\t\tif (newXY.xOffset != xOffset) {\r\n\t\t\txOffset = newXY.xOffset;\r\n\t\t\tContainerNeedsUpdate(Update::HScroll);\r\n\t\t\tif (newXY.xOffset > 0) {\r\n\t\t\t\tconst PRectangle rcText = GetTextRectangle();\r\n\t\t\t\tif (horizontalScrollBarVisible &&\r\n\t\t\t\t\trcText.Width() + xOffset > scrollWidth) {\r\n\t\t\t\t\tscrollWidth = xOffset + static_cast<int>(rcText.Width());\r\n\t\t\t\t\tSetScrollBars();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSetHorizontalScrollPos();\r\n\t\t}\r\n\t\tRedraw();\r\n\t\tUpdateSystemCaret();\r\n\t}\r\n}\r\n\r\nvoid Editor::ScrollRange(SelectionRange range) {\r\n\tSetXYScroll(XYScrollToMakeVisible(range, XYScrollOptions::all, caretPolicies));\r\n}\r\n\r\nvoid Editor::EnsureCaretVisible(bool useMargin, bool vert, bool horiz) {\r\n\tSetXYScroll(XYScrollToMakeVisible(SelectionRange(posDrag.IsValid() ? posDrag : sel.RangeMain().caret),\r\n\t\t(useMargin?XYScrollOptions::useMargin:XYScrollOptions::none)|\r\n\t\t(vert?XYScrollOptions::vertical:XYScrollOptions::none)|\r\n\t\t(horiz?XYScrollOptions::horizontal:XYScrollOptions::none),\r\n\t\tcaretPolicies));\r\n}\r\n\r\nvoid Editor::ShowCaretAtCurrentPosition() {\r\n\tif (hasFocus) {\r\n\t\tcaret.active = true;\r\n\t\tcaret.on = true;\r\n\t\tFineTickerCancel(TickReason::caret);\r\n\t\tif (caret.period > 0)\r\n\t\t\tFineTickerStart(TickReason::caret, caret.period, caret.period/10);\r\n\t} else {\r\n\t\tcaret.active = false;\r\n\t\tcaret.on = false;\r\n\t\tFineTickerCancel(TickReason::caret);\r\n\t}\r\n\tInvalidateCaret();\r\n}\r\n\r\nvoid Editor::DropCaret() {\r\n\tcaret.active = false;\r\n\tFineTickerCancel(TickReason::caret);\r\n\tInvalidateCaret();\r\n}\r\n\r\nvoid Editor::CaretSetPeriod(int period) {\r\n\tif (caret.period != period) {\r\n\t\tcaret.period = period;\r\n\t\tcaret.on = true;\r\n\t\tFineTickerCancel(TickReason::caret);\r\n\t\tif ((caret.active) && (caret.period > 0))\r\n\t\t\tFineTickerStart(TickReason::caret, caret.period, caret.period/10);\r\n\t\tInvalidateCaret();\r\n\t}\r\n}\r\n\r\nvoid Editor::InvalidateCaret() {\r\n\tif (posDrag.IsValid()) {\r\n\t\tInvalidateRange(posDrag.Position(), posDrag.Position() + 1);\r\n\t} else {\r\n\t\tfor (size_t r=0; r<sel.Count(); r++) {\r\n\t\t\tInvalidateRange(sel.Range(r).caret.Position(), sel.Range(r).caret.Position() + 1);\r\n\t\t}\r\n\t}\r\n\tUpdateSystemCaret();\r\n}\r\n\r\nvoid Editor::NotifyCaretMove() {\r\n}\r\n\r\nvoid Editor::UpdateSystemCaret() {\r\n}\r\n\r\nbool Editor::Wrapping() const noexcept {\r\n\treturn vs.wrap.state != Wrap::None;\r\n}\r\n\r\nvoid Editor::NeedWrapping(Sci::Line docLineStart, Sci::Line docLineEnd) {\r\n//Platform::DebugPrintf(\"\\nNeedWrapping: %0d..%0d\\n\", docLineStart, docLineEnd);\r\n\tif (wrapPending.AddRange(docLineStart, docLineEnd)) {\r\n\t\tview.llc.Invalidate(LineLayout::ValidLevel::positions);\r\n\t}\r\n\t// Wrap lines during idle.\r\n\tif (Wrapping() && wrapPending.NeedsWrap()) {\r\n\t\tSetIdle(true);\r\n\t}\r\n}\r\n\r\nbool Editor::WrapOneLine(Surface *surface, Sci::Line lineToWrap) {\r\n\tstd::shared_ptr<LineLayout> ll = view.RetrieveLineLayout(lineToWrap, *this);\r\n\tint linesWrapped = 1;\r\n\tif (ll) {\r\n\t\tview.LayoutLine(*this, surface, vs, ll.get(), wrapWidth);\r\n\t\tlinesWrapped = ll->lines;\r\n\t}\r\n\tif (vs.annotationVisible != AnnotationVisible::Hidden) {\r\n\t\tlinesWrapped += pdoc->AnnotationLines(lineToWrap);\r\n\t}\r\n\treturn pcs->SetHeight(lineToWrap, linesWrapped);\r\n}\r\n\r\nnamespace {\r\n\r\n// Lines less than lengthToMultiThread are laid out in blocks in parallel.\r\n// Longer lines are multi-threaded inside LayoutLine.\r\n// This allows faster processing when lines differ greatly in length and thus time to lay out.\r\nconstexpr Sci::Position lengthToMultiThread = 4000;\r\n\r\n}\r\n\r\nbool Editor::WrapBlock(Surface *surface, Sci::Line lineToWrap, Sci::Line lineToWrapEnd) {\r\n\r\n\tconst size_t linesBeingWrapped = static_cast<size_t>(lineToWrapEnd - lineToWrap);\r\n\r\n\tstd::vector<int> linesAfterWrap(linesBeingWrapped);\r\n\r\n\tsize_t threads = std::min<size_t>({ linesBeingWrapped, view.maxLayoutThreads });\r\n\tif (!surface->SupportsFeature(Supports::ThreadSafeMeasureWidths)) {\r\n\t\tthreads = 1;\r\n\t}\r\n\r\n\tconst bool multiThreaded = threads > 1;\r\n\r\n\tElapsedPeriod epWrapping;\r\n\r\n\t// Wrap all the short lines in multiple threads\r\n\r\n\t// If only 1 thread needed then use the main thread, else spin up multiple\r\n\tconst std::launch policy = multiThreaded ? std::launch::async : std::launch::deferred;\r\n\r\n\tstd::atomic<size_t> nextIndex = 0;\r\n\r\n\t// Lines that are less likely to be re-examined should not be read from or written to the cache.\r\n\tconst SignificantLines significantLines {\r\n\t\tpdoc->SciLineFromPosition(sel.MainCaret()),\r\n\t\tpcs->DocFromDisplay(topLine),\r\n\t\tLinesOnScreen() + 1,\r\n\t\tview.llc.GetLevel(),\r\n\t};\r\n\r\n\t// Protect the line layout cache from being accessed from multiple threads simultaneously\r\n\tstd::mutex mutexRetrieve;\r\n\r\n\tstd::vector<std::future<void>> futures;\r\n\tfor (size_t th = 0; th < threads; th++) {\r\n\t\tstd::future<void> fut = std::async(policy,\r\n\t\t\t[=, &surface, &nextIndex, &linesAfterWrap, &mutexRetrieve]() {\r\n\t\t\t// llTemporary is reused for non-significant lines, avoiding allocation costs.\r\n\t\t\tstd::shared_ptr<LineLayout> llTemporary = std::make_shared<LineLayout>(-1, 200);\r\n\t\t\twhile (true) {\r\n\t\t\t\tconst size_t i = nextIndex.fetch_add(1, std::memory_order_acq_rel);\r\n\t\t\t\tif (i >= linesBeingWrapped) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tconst Sci::Line lineNumber = lineToWrap + i;\r\n\t\t\t\tconst Range rangeLine = pdoc->LineRange(lineNumber);\r\n\t\t\t\tconst Sci::Position lengthLine = rangeLine.Length();\r\n\t\t\t\tif (lengthLine < lengthToMultiThread) {\r\n\t\t\t\t\tstd::shared_ptr<LineLayout> ll;\r\n\t\t\t\t\tif (significantLines.LineMayCache(lineNumber)) {\r\n\t\t\t\t\t\tstd::lock_guard<std::mutex> guard(mutexRetrieve);\r\n\t\t\t\t\t\tll = view.RetrieveLineLayout(lineNumber, *this);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tll = llTemporary;\r\n\t\t\t\t\t\tll->ReSet(lineNumber, lengthLine);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tview.LayoutLine(*this, surface, vs, ll.get(), wrapWidth, multiThreaded);\r\n\t\t\t\t\tlinesAfterWrap[i] = ll->lines;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tfutures.push_back(std::move(fut));\r\n\t}\r\n\tfor (const std::future<void> &f : futures) {\r\n\t\tf.wait();\r\n\t}\r\n\t// End of multiple threads\r\n\r\n\t// Multiply duration by number of threads to produce (near) equivalence to duration if single threaded\r\n\tconst double durationShortLines = epWrapping.Duration(true);\r\n\tconst double durationShortLinesThreads = durationShortLines * threads;\r\n\r\n\t// Wrap all the long lines in the main thread.\r\n\t// LayoutLine may then multi-thread over segments in each line.\r\n\r\n\tstd::shared_ptr<LineLayout> llLarge = std::make_shared<LineLayout>(-1, 200);\r\n\tfor (size_t indexLarge = 0; indexLarge < linesBeingWrapped; indexLarge++) {\r\n\t\tconst Sci::Line lineNumber = lineToWrap + indexLarge;\r\n\t\tconst Range rangeLine = pdoc->LineRange(lineNumber);\r\n\t\tconst Sci::Position lengthLine = rangeLine.Length();\r\n\t\tif (lengthLine >= lengthToMultiThread) {\r\n\t\t\tstd::shared_ptr<LineLayout> ll;\r\n\t\t\tif (significantLines.LineMayCache(lineNumber)) {\r\n\t\t\t\tll = view.RetrieveLineLayout(lineNumber, *this);\r\n\t\t\t} else {\r\n\t\t\t\tll = llLarge;\r\n\t\t\t\tll->ReSet(lineNumber, lengthLine);\r\n\t\t\t}\r\n\t\t\tview.LayoutLine(*this, surface, vs, ll.get(), wrapWidth);\r\n\t\t\tlinesAfterWrap[indexLarge] = ll->lines;\r\n\t\t}\r\n\t}\r\n\r\n\tconst double durationLongLines = epWrapping.Duration();\r\n\tconst size_t bytesBeingWrapped = pdoc->LineStart(lineToWrap + linesBeingWrapped) - pdoc->LineStart(lineToWrap);\r\n\r\n\tsize_t wrapsDone = 0;\r\n\r\n\tfor (size_t i = 0; i < linesBeingWrapped; i++) {\r\n\t\tconst Sci::Line lineNumber = lineToWrap + i;\r\n\t\tint linesWrapped = linesAfterWrap[i];\r\n\t\tif (vs.annotationVisible != AnnotationVisible::Hidden) {\r\n\t\t\tlinesWrapped += pdoc->AnnotationLines(lineNumber);\r\n\t\t}\r\n\t\tif (pcs->SetHeight(lineNumber, linesWrapped)) {\r\n\t\t\twrapsDone++;\r\n\t\t}\r\n\t\twrapPending.Wrapped(lineNumber);\r\n\t}\r\n\r\n\tdurationWrapOneByte.AddSample(bytesBeingWrapped, durationShortLinesThreads + durationLongLines);\r\n\r\n\treturn wrapsDone > 0;\r\n}\r\n\r\n// Perform  wrapping for a subset of the lines needing wrapping.\r\n// wsAll: wrap all lines which need wrapping in this single call\r\n// wsVisible: wrap currently visible lines\r\n// wsIdle: wrap one page + 100 lines\r\n// Return true if wrapping occurred.\r\nbool Editor::WrapLines(WrapScope ws) {\r\n\tSci::Line goodTopLine = topLine;\r\n\tbool wrapOccurred = false;\r\n\tif (!Wrapping()) {\r\n\t\tif (wrapWidth != LineLayout::wrapWidthInfinite) {\r\n\t\t\twrapWidth = LineLayout::wrapWidthInfinite;\r\n\t\t\tfor (Sci::Line lineDoc = 0; lineDoc < pdoc->LinesTotal(); lineDoc++) {\r\n\t\t\t\tint linesWrapped = 1;\r\n\t\t\t\tif (vs.annotationVisible != AnnotationVisible::Hidden) {\r\n\t\t\t\t\tlinesWrapped += pdoc->AnnotationLines(lineDoc);\r\n\t\t\t\t}\r\n\t\t\t\tpcs->SetHeight(lineDoc, linesWrapped);\r\n\t\t\t}\r\n\t\t\twrapOccurred = true;\r\n\t\t}\r\n\t\twrapPending.Reset();\r\n\r\n\t} else if (wrapPending.NeedsWrap()) {\r\n\t\twrapPending.start = std::min(wrapPending.start, pdoc->LinesTotal());\r\n\t\tif (!SetIdle(true)) {\r\n\t\t\t// Idle processing not supported so full wrap required.\r\n\t\t\tws = WrapScope::wsAll;\r\n\t\t}\r\n\t\t// Decide where to start wrapping\r\n\t\tSci::Line lineToWrap = wrapPending.start;\r\n\t\tSci::Line lineToWrapEnd = std::min(wrapPending.end, pdoc->LinesTotal());\r\n\t\tconst Sci::Line lineDocTop = pcs->DocFromDisplay(topLine);\r\n\t\tconst Sci::Line subLineTop = topLine - pcs->DisplayFromDoc(lineDocTop);\r\n\t\tif (ws == WrapScope::wsVisible) {\r\n\t\t\tlineToWrap = std::clamp(lineDocTop-5, wrapPending.start, pdoc->LinesTotal());\r\n\t\t\t// Priority wrap to just after visible area.\r\n\t\t\t// Since wrapping could reduce display lines, treat each\r\n\t\t\t// as taking only one display line.\r\n\t\t\tlineToWrapEnd = lineDocTop;\r\n\t\t\tSci::Line lines = LinesOnScreen() + 1;\r\n\t\t\tconstexpr double secondsAllowed = 0.1;\r\n\t\t\tconst size_t actionsInAllowedTime = std::clamp<Sci::Line>(\r\n\t\t\t\tdurationWrapOneByte.ActionsInAllowedTime(secondsAllowed),\r\n\t\t\t\t0x2000, 0x200000);\r\n\t\t\tconst Sci::Line lineLast = pdoc->LineFromPositionAfter(lineToWrap, actionsInAllowedTime);\r\n\t\t\tconst Sci::Line maxLine = std::min(lineLast, pcs->LinesInDoc());\r\n\t\t\twhile ((lineToWrapEnd < maxLine) && (lines>0)) {\r\n\t\t\t\tif (pcs->GetVisible(lineToWrapEnd))\r\n\t\t\t\t\tlines--;\r\n\t\t\t\tlineToWrapEnd++;\r\n\t\t\t}\r\n\t\t\t// .. and if the paint window is outside pending wraps\r\n\t\t\tif ((lineToWrap > wrapPending.end) || (lineToWrapEnd < wrapPending.start)) {\r\n\t\t\t\t// Currently visible text does not need wrapping\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t} else if (ws == WrapScope::wsIdle) {\r\n\t\t\t// Try to keep time taken by wrapping reasonable so interaction remains smooth.\r\n\t\t\tconstexpr double secondsAllowed = 0.01;\r\n\t\t\tconst size_t actionsInAllowedTime = std::clamp<Sci::Line>(\r\n\t\t\t\tdurationWrapOneByte.ActionsInAllowedTime(secondsAllowed),\r\n\t\t\t\t0x200, 0x20000);\r\n\t\t\tlineToWrapEnd = pdoc->LineFromPositionAfter(lineToWrap, actionsInAllowedTime);\r\n\t\t}\r\n\t\tconst Sci::Line lineEndNeedWrap = std::min(wrapPending.end, pdoc->LinesTotal());\r\n\t\tlineToWrapEnd = std::min(lineToWrapEnd, lineEndNeedWrap);\r\n\r\n\t\t// Ensure all lines being wrapped are styled.\r\n\t\tpdoc->EnsureStyledTo(pdoc->LineStart(lineToWrapEnd));\r\n\r\n\t\tif (lineToWrap < lineToWrapEnd) {\r\n\r\n\t\t\tPRectangle rcTextArea = GetClientRectangle();\r\n\t\t\trcTextArea.left = static_cast<XYPOSITION>(vs.textStart);\r\n\t\t\trcTextArea.right -= vs.rightMarginWidth;\r\n\t\t\twrapWidth = static_cast<int>(rcTextArea.Width());\r\n\t\t\tRefreshStyleData();\r\n\t\t\tAutoSurface surface(this);\r\n\t\t\tif (surface) {\r\n//Platform::DebugPrintf(\"Wraplines: scope=%0d need=%0d..%0d perform=%0d..%0d\\n\", ws, wrapPending.start, wrapPending.end, lineToWrap, lineToWrapEnd);\r\n\r\n\t\t\t\twrapOccurred = WrapBlock(surface, lineToWrap, lineToWrapEnd);\r\n\r\n\t\t\t\tgoodTopLine = pcs->DisplayFromDoc(lineDocTop) + std::min(\r\n\t\t\t\t\tsubLineTop, static_cast<Sci::Line>(pcs->GetHeight(lineDocTop)-1));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// If wrapping is done, bring it to resting position\r\n\t\tif (wrapPending.start >= lineEndNeedWrap) {\r\n\t\t\twrapPending.Reset();\r\n\t\t}\r\n\t}\r\n\r\n\tif (wrapOccurred) {\r\n\t\tSetScrollBars();\r\n\t\tSetTopLine(std::clamp<Sci::Line>(goodTopLine, 0, MaxScrollPos()));\r\n\t\tSetVerticalScrollPos();\r\n\t}\r\n\r\n\treturn wrapOccurred;\r\n}\r\n\r\nvoid Editor::LinesJoin() {\r\n\tif (!RangeContainsProtected(targetRange.start.Position(), targetRange.end.Position())) {\r\n\t\tUndoGroup ug(pdoc);\r\n\t\tconst Sci::Line line = pdoc->SciLineFromPosition(targetRange.start.Position());\r\n\t\tfor (Sci::Position pos = pdoc->LineEnd(line); pos < targetRange.end.Position(); pos = pdoc->LineEnd(line)) {\r\n\t\t\tconst char chPrev = pdoc->CharAt(pos - 1);\r\n\t\t\tconst Sci::Position widthChar = pdoc->LenChar(pos);\r\n\t\t\ttargetRange.end.Add(-widthChar);\r\n\t\t\tpdoc->DeleteChars(pos, widthChar);\r\n\t\t\tif (chPrev != ' ') {\r\n\t\t\t\t// Ensure at least one space separating previous lines\r\n\t\t\t\tconst Sci::Position lengthInserted = pdoc->InsertString(pos, \" \", 1);\r\n\t\t\t\ttargetRange.end.Add(lengthInserted);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid Editor::LinesSplit(int pixelWidth) {\r\n\tif (!RangeContainsProtected(targetRange.start.Position(), targetRange.end.Position())) {\r\n\t\tif (pixelWidth == 0) {\r\n\t\t\tconst PRectangle rcText = GetTextRectangle();\r\n\t\t\tpixelWidth = static_cast<int>(rcText.Width());\r\n\t\t}\r\n\t\tconst Sci::Line lineStart = pdoc->SciLineFromPosition(targetRange.start.Position());\r\n\t\tSci::Line lineEnd = pdoc->SciLineFromPosition(targetRange.end.Position());\r\n\t\tconst std::string_view eol = pdoc->EOLString();\r\n\t\tUndoGroup ug(pdoc);\r\n\t\tfor (Sci::Line line = lineStart; line <= lineEnd; line++) {\r\n\t\t\tAutoSurface surface(this);\r\n\t\t\tstd::shared_ptr<LineLayout> ll = view.RetrieveLineLayout(line, *this);\r\n\t\t\tif (surface && ll) {\r\n\t\t\t\tconst Sci::Position posLineStart = pdoc->LineStart(line);\r\n\t\t\t\tview.LayoutLine(*this, surface, vs, ll.get(), pixelWidth);\r\n\t\t\t\tSci::Position lengthInsertedTotal = 0;\r\n\t\t\t\tfor (int subLine = 1; subLine < ll->lines; subLine++) {\r\n\t\t\t\t\tconst Sci::Position lengthInserted = pdoc->InsertString(\r\n\t\t\t\t\t\tposLineStart + lengthInsertedTotal + ll->LineStart(subLine), eol);\r\n\t\t\t\t\ttargetRange.end.Add(lengthInserted);\r\n\t\t\t\t\tlengthInsertedTotal += lengthInserted;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tlineEnd = pdoc->SciLineFromPosition(targetRange.end.Position());\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid Editor::PaintSelMargin(Surface *surfaceWindow, const PRectangle &rc) {\r\n\tif (vs.fixedColumnWidth == 0)\r\n\t\treturn;\r\n\r\n\tRefreshStyleData();\r\n\tRefreshPixMaps(surfaceWindow);\r\n\r\n\t// On GTK+ with Ubuntu overlay scroll bars, the surface may have been finished\r\n\t// at this point. The Initialised call checks for this case and sets the status\r\n\t// to be bad which avoids crashes in following calls.\r\n\tif (!surfaceWindow->Initialised()) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tPRectangle rcMargin = GetClientRectangle();\r\n\tconst Point ptOrigin = GetVisibleOriginInMain();\r\n\trcMargin.Move(0, -ptOrigin.y);\r\n\trcMargin.left = 0;\r\n\trcMargin.right = static_cast<XYPOSITION>(vs.fixedColumnWidth);\r\n\r\n\tif (!rc.Intersects(rcMargin))\r\n\t\treturn;\r\n\r\n\tSurface *surface;\r\n\tif (view.bufferedDraw) {\r\n\t\tsurface = marginView.pixmapSelMargin.get();\r\n\t} else {\r\n\t\tsurface = surfaceWindow;\r\n\t}\r\n\tsurface->SetMode(CurrentSurfaceMode());\r\n\r\n\t// Clip vertically to paint area to avoid drawing line numbers\r\n\tif (rcMargin.bottom > rc.bottom)\r\n\t\trcMargin.bottom = rc.bottom;\r\n\tif (rcMargin.top < rc.top)\r\n\t\trcMargin.top = rc.top;\r\n\r\n\tmarginView.PaintMargin(surface, topLine, rc, rcMargin, *this, vs);\r\n\r\n\tif (view.bufferedDraw) {\r\n\t\tmarginView.pixmapSelMargin->FlushDrawing();\r\n\t\tsurfaceWindow->Copy(rcMargin, Point(rcMargin.left, rcMargin.top), *marginView.pixmapSelMargin);\r\n\t}\r\n}\r\n\r\nvoid Editor::RefreshPixMaps(Surface *surfaceWindow) {\r\n\tview.RefreshPixMaps(surfaceWindow, vs);\r\n\tmarginView.RefreshPixMaps(surfaceWindow, vs);\r\n\tif (view.bufferedDraw) {\r\n\t\tconst PRectangle rcClient = GetClientRectangle();\r\n\t\tif (!view.pixmapLine) {\r\n\t\t\tview.pixmapLine = surfaceWindow->AllocatePixMap(static_cast<int>(rcClient.Width()), vs.lineHeight);\r\n\t\t}\r\n\t\tif (!marginView.pixmapSelMargin) {\r\n\t\t\tmarginView.pixmapSelMargin = surfaceWindow->AllocatePixMap(vs.fixedColumnWidth,\r\n\t\t\t\tstatic_cast<int>(rcClient.Height()));\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) {\r\n\tredrawPendingText = false;\r\n\tredrawPendingMargin = false;\r\n\r\n\t//Platform::DebugPrintf(\"Paint:%1d (%3d,%3d) ... (%3d,%3d)\\n\",\r\n\t//\tpaintingAllText, rcArea.left, rcArea.top, rcArea.right, rcArea.bottom);\r\n\r\n\tRefreshStyleData();\r\n\tif (paintState == PaintState::abandoned)\r\n\t\treturn;\t// Scroll bars may have changed so need redraw\r\n\tRefreshPixMaps(surfaceWindow);\r\n\r\n\tpaintAbandonedByStyling = false;\r\n\r\n\tStyleAreaBounded(rcArea, false);\r\n\r\n\tconst PRectangle rcClient = GetClientRectangle();\r\n\t//Platform::DebugPrintf(\"Client: (%3d,%3d) ... (%3d,%3d)   %d\\n\",\r\n\t//\trcClient.left, rcClient.top, rcClient.right, rcClient.bottom);\r\n\r\n\tif (NotifyUpdateUI()) {\r\n\t\tRefreshStyleData();\r\n\t\tRefreshPixMaps(surfaceWindow);\r\n\t}\r\n\r\n\t// Wrap the visible lines if needed.\r\n\tif (WrapLines(WrapScope::wsVisible)) {\r\n\t\t// The wrapping process has changed the height of some lines so\r\n\t\t// abandon this paint for a complete repaint.\r\n\t\tif (AbandonPaint()) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tRefreshPixMaps(surfaceWindow);\t// In case pixmaps invalidated by scrollbar change\r\n\t}\r\n\r\n\tif (!marginView.pixmapSelPattern->Initialised()) {\r\n\t\t// When Direct2D is used, pixmap creation may fail with D2DERR_RECREATE_TARGET so\r\n\t\t// abandon this paint to avoid further failures.\r\n\t\t// Main drawing surface and pixmaps should be recreated by next paint.\r\n\t\treturn;\r\n\t}\r\n\r\n\tif (!view.bufferedDraw)\r\n\t\tsurfaceWindow->SetClip(rcArea);\r\n\r\n\tif (paintState != PaintState::abandoned) {\r\n\t\tif (vs.marginInside) {\r\n\t\t\tPaintSelMargin(surfaceWindow, rcArea);\r\n\t\t\tPRectangle rcRightMargin = rcClient;\r\n\t\t\trcRightMargin.left = rcRightMargin.right - vs.rightMarginWidth;\r\n\t\t\tif (rcArea.Intersects(rcRightMargin)) {\r\n\t\t\t\tsurfaceWindow->FillRectangle(rcRightMargin, vs.styles[StyleDefault].back);\r\n\t\t\t}\r\n\t\t} else { // Else separate view so separate paint event but leftMargin included to allow overlap\r\n\t\t\tPRectangle rcLeftMargin = rcArea;\r\n\t\t\trcLeftMargin.left = 0;\r\n\t\t\trcLeftMargin.right = rcLeftMargin.left + vs.leftMarginWidth;\r\n\t\t\tif (rcArea.Intersects(rcLeftMargin)) {\r\n\t\t\t\tsurfaceWindow->FillRectangle(rcLeftMargin, vs.styles[StyleDefault].back);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tif (paintState == PaintState::abandoned) {\r\n\t\t// Either styling or NotifyUpdateUI noticed that painting is needed\r\n\t\t// outside the current painting rectangle\r\n\t\t//Platform::DebugPrintf(\"Abandoning paint\\n\");\r\n\t\tif (Wrapping()) {\r\n\t\t\tif (paintAbandonedByStyling) {\r\n\t\t\t\t// Styling has spilled over a line end, such as occurs by starting a multiline\r\n\t\t\t\t// comment. The width of subsequent text may have changed, so rewrap.\r\n\t\t\t\tNeedWrapping(pcs->DocFromDisplay(topLine));\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (!view.bufferedDraw)\r\n\t\t\tsurfaceWindow->PopClip();\r\n\t\treturn;\r\n\t}\r\n\r\n\tview.PaintText(surfaceWindow, *this, vs, rcArea, rcClient);\r\n\r\n\tif (horizontalScrollBarVisible && trackLineWidth && (view.lineWidthMaxSeen > scrollWidth)) {\r\n\t\tscrollWidth = view.lineWidthMaxSeen;\r\n\t\tif (!FineTickerRunning(TickReason::widen)) {\r\n\t\t\tFineTickerStart(TickReason::widen, 50, 5);\r\n\t\t}\r\n\t}\r\n\r\n\tif (!view.bufferedDraw)\r\n\t\tsurfaceWindow->PopClip();\r\n\r\n\tNotifyPainted();\r\n}\r\n\r\n// This is mostly copied from the Paint method but with some things omitted\r\n// such as the margin markers, line numbers, selection and caret\r\n// Should be merged back into a combined Draw method.\r\nSci::Position Editor::FormatRange(Scintilla::Message iMessage, Scintilla::uptr_t wParam, Scintilla::sptr_t lParam) {\r\n\tif (!lParam)\r\n\t\treturn 0;\r\n\tconst bool draw = wParam != 0;\r\n\tvoid *ptr = PtrFromSPtr(lParam);\r\n\tif (iMessage == Message::FormatRange) {\r\n\t\tRangeToFormat *pfr = static_cast<RangeToFormat *>(ptr);\r\n\t\tconst CharacterRangeFull chrg{ pfr->chrg.cpMin, pfr->chrg.cpMax };\r\n\t\tAutoSurface surface(pfr->hdc, this, Technology::Default);\r\n\t\tAutoSurface surfaceMeasure(pfr->hdcTarget, this, Technology::Default);\r\n\t\tif (!surface || !surfaceMeasure) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\treturn view.FormatRange(draw, chrg, pfr->rc, surface, surfaceMeasure, *this, vs);\r\n\t} else {\r\n\t\t// FormatRangeFull\r\n\t\tRangeToFormatFull *pfr = static_cast<RangeToFormatFull *>(ptr);\r\n\t\tAutoSurface surface(pfr->hdc, this, Technology::Default);\r\n\t\tAutoSurface surfaceMeasure(pfr->hdcTarget, this, Technology::Default);\r\n\t\tif (!surface || !surfaceMeasure) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\treturn view.FormatRange(draw, pfr->chrg, pfr->rc, surface, surfaceMeasure, *this, vs);\r\n\t}\r\n}\r\n\r\nlong Editor::TextWidth(uptr_t style, const char *text) {\r\n\tRefreshStyleData();\r\n\tAutoSurface surface(this);\r\n\tif (surface) {\r\n\t\treturn std::lround(surface->WidthText(vs.styles[style].font.get(), text));\r\n\t} else {\r\n\t\treturn 1;\r\n\t}\r\n}\r\n\r\n// Empty method is overridden on GTK+ to show / hide scrollbars\r\nvoid Editor::ReconfigureScrollBars() {}\r\n\r\nvoid Editor::ChangeScrollBars() {\r\n\tRefreshStyleData();\r\n\r\n\tconst Sci::Line nMax = MaxScrollPos();\r\n\tconst Sci::Line nPage = LinesOnScreen();\r\n\tconst bool modified = ModifyScrollBars(nMax + nPage - 1, nPage);\r\n\tif (modified) {\r\n\t\tDwellEnd(true);\r\n\t}\r\n\r\n\t// TODO: ensure always showing as many lines as possible\r\n\t// May not be, if, for example, window made larger\r\n\tif (topLine > MaxScrollPos()) {\r\n\t\tSetTopLine(std::clamp<Sci::Line>(topLine, 0, MaxScrollPos()));\r\n\t\tSetVerticalScrollPos();\r\n\t\tRedraw();\r\n\t}\r\n\tif (modified) {\r\n\t\tif (!AbandonPaint())\r\n\t\t\tRedraw();\r\n\t}\r\n\t//Platform::DebugPrintf(\"end max = %d page = %d\\n\", nMax, nPage);\r\n}\r\n\r\nvoid Editor::SetScrollBars() {\r\n\t// Overridden on GTK to defer to idle\r\n\tChangeScrollBars();\r\n}\r\n\r\nvoid Editor::ChangeSize() {\r\n\tDropGraphics();\r\n\tSetScrollBars();\r\n\tif (Wrapping()) {\r\n\t\tPRectangle rcTextArea = GetClientRectangle();\r\n\t\trcTextArea.left = static_cast<XYPOSITION>(vs.textStart);\r\n\t\trcTextArea.right -= vs.rightMarginWidth;\r\n\t\tif (wrapWidth != rcTextArea.Width()) {\r\n\t\t\tNeedWrapping();\r\n\t\t\tRedraw();\r\n\t\t}\r\n\t}\r\n}\r\n\r\nSci::Position Editor::RealizeVirtualSpace(Sci::Position position, Sci::Position virtualSpace) {\r\n\tif (virtualSpace > 0) {\r\n\t\tconst Sci::Line line = pdoc->SciLineFromPosition(position);\r\n\t\tconst Sci::Position indent = pdoc->GetLineIndentPosition(line);\r\n\t\tif (indent == position) {\r\n\t\t\treturn pdoc->SetLineIndentation(line, pdoc->GetLineIndentation(line) + virtualSpace);\r\n\t\t} else {\r\n\t\t\tconst std::string spaceText(virtualSpace, ' ');\r\n\t\t\tconst Sci::Position lengthInserted = pdoc->InsertString(position, spaceText);\r\n\t\t\tposition += lengthInserted;\r\n\t\t}\r\n\t}\r\n\treturn position;\r\n}\r\n\r\nSelectionPosition Editor::RealizeVirtualSpace(const SelectionPosition &position) {\r\n\t// Return the new position with no virtual space\r\n\treturn SelectionPosition(RealizeVirtualSpace(position.Position(), position.VirtualSpace()));\r\n}\r\n\r\nvoid Editor::AddChar(char ch) {\r\n\tconst char s[1] {ch};\r\n\tInsertCharacter(std::string_view(s, 1), CharacterSource::DirectInput);\r\n}\r\n\r\nvoid Editor::FilterSelections() {\r\n\tif (!additionalSelectionTyping && (sel.Count() > 1)) {\r\n\t\tInvalidateWholeSelection();\r\n\t\tsel.DropAdditionalRanges();\r\n\t}\r\n}\r\n\r\n// InsertCharacter inserts a character encoded in document code page.\r\nvoid Editor::InsertCharacter(std::string_view sv, CharacterSource charSource) {\r\n\tif (sv.empty()) {\r\n\t\treturn;\r\n\t}\r\n\tFilterSelections();\r\n\tbool wrapOccurred = false;\r\n\t{\r\n\t\tUndoGroup ug(pdoc, (sel.Count() > 1) || !sel.Empty() || inOverstrike);\r\n\r\n\t\t// Vector elements point into selection in order to change selection.\r\n\t\tstd::vector<SelectionRange *> selPtrs;\r\n\t\tfor (size_t r = 0; r < sel.Count(); r++) {\r\n\t\t\tselPtrs.push_back(&sel.Range(r));\r\n\t\t}\r\n\t\t// Order selections by position in document.\r\n\t\tstd::sort(selPtrs.begin(), selPtrs.end(),\r\n\t\t\t[](const SelectionRange *a, const SelectionRange *b) noexcept {return *a < *b;});\r\n\r\n\t\t// Loop in reverse to avoid disturbing positions of selections yet to be processed.\r\n\t\tfor (std::vector<SelectionRange *>::reverse_iterator rit = selPtrs.rbegin();\r\n\t\t\trit != selPtrs.rend(); ++rit) {\r\n\t\t\tSelectionRange *currentSel = *rit;\r\n\t\t\tif (!RangeContainsProtected(currentSel->Start().Position(),\r\n\t\t\t\tcurrentSel->End().Position())) {\r\n\t\t\t\tSci::Position positionInsert = currentSel->Start().Position();\r\n\t\t\t\tif (!currentSel->Empty()) {\r\n\t\t\t\t\tif (currentSel->Length()) {\r\n\t\t\t\t\t\tpdoc->DeleteChars(positionInsert, currentSel->Length());\r\n\t\t\t\t\t\tcurrentSel->ClearVirtualSpace();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// Range is all virtual so collapse to start of virtual space\r\n\t\t\t\t\t\tcurrentSel->MinimizeVirtualSpace();\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (inOverstrike) {\r\n\t\t\t\t\tif (positionInsert < pdoc->Length()) {\r\n\t\t\t\t\t\tif (!pdoc->IsPositionInLineEnd(positionInsert)) {\r\n\t\t\t\t\t\t\tpdoc->DelChar(positionInsert);\r\n\t\t\t\t\t\t\tcurrentSel->ClearVirtualSpace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tpositionInsert = RealizeVirtualSpace(positionInsert, currentSel->caret.VirtualSpace());\r\n\t\t\t\tconst Sci::Position lengthInserted = pdoc->InsertString(positionInsert, sv);\r\n\t\t\t\tif (lengthInserted > 0) {\r\n\t\t\t\t\tcurrentSel->caret.SetPosition(positionInsert + lengthInserted);\r\n\t\t\t\t\tcurrentSel->anchor.SetPosition(positionInsert + lengthInserted);\r\n\t\t\t\t}\r\n\t\t\t\tcurrentSel->ClearVirtualSpace();\r\n\t\t\t\t// If in wrap mode rewrap current line so EnsureCaretVisible has accurate information\r\n\t\t\t\tif (Wrapping()) {\r\n\t\t\t\t\tAutoSurface surface(this);\r\n\t\t\t\t\tif (surface) {\r\n\t\t\t\t\t\tif (WrapOneLine(surface, pdoc->SciLineFromPosition(positionInsert))) {\r\n\t\t\t\t\t\t\twrapOccurred = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (wrapOccurred) {\r\n\t\tSetScrollBars();\r\n\t\tSetVerticalScrollPos();\r\n\t\tRedraw();\r\n\t}\r\n\tThinRectangularRange();\r\n\t// If in wrap mode rewrap current line so EnsureCaretVisible has accurate information\r\n\tEnsureCaretVisible();\r\n\t// Avoid blinking during rapid typing:\r\n\tShowCaretAtCurrentPosition();\r\n\tif ((caretSticky == CaretSticky::Off) ||\r\n\t\t((caretSticky == CaretSticky::WhiteSpace) && !IsAllSpacesOrTabs(sv))) {\r\n\t\tSetLastXChosen();\r\n\t}\r\n\r\n\tint ch = static_cast<unsigned char>(sv[0]);\r\n\tif (pdoc->dbcsCodePage != CpUtf8) {\r\n\t\tif (sv.length() > 1) {\r\n\t\t\t// DBCS code page or DBCS font character set.\r\n\t\t\tch = (ch << 8) | static_cast<unsigned char>(sv[1]);\r\n\t\t}\r\n\t} else {\r\n\t\tif ((ch < 0xC0) || (1 == sv.length())) {\r\n\t\t\t// Handles UTF-8 characters between 0x01 and 0x7F and single byte\r\n\t\t\t// characters when not in UTF-8 mode.\r\n\t\t\t// Also treats \\0 and naked trail bytes 0x80 to 0xBF as valid\r\n\t\t\t// characters representing themselves.\r\n\t\t} else {\r\n\t\t\tunsigned int utf32[1] = { 0 };\r\n\t\t\tUTF32FromUTF8(sv, utf32, std::size(utf32));\r\n\t\t\tch = utf32[0];\r\n\t\t}\r\n\t}\r\n\tNotifyChar(ch, charSource);\r\n\r\n\tif (recordingMacro && charSource != CharacterSource::TentativeInput) {\r\n\t\tstd::string copy(sv); // ensure NUL-terminated\r\n\t\tNotifyMacroRecord(Message::ReplaceSel, 0, reinterpret_cast<sptr_t>(copy.data()));\r\n\t}\r\n}\r\n\r\nvoid Editor::ClearBeforeTentativeStart() {\r\n\t// Make positions for the first composition string.\r\n\tFilterSelections();\r\n\tUndoGroup ug(pdoc, (sel.Count() > 1) || !sel.Empty() || inOverstrike);\r\n\tfor (size_t r = 0; r<sel.Count(); r++) {\r\n\t\tif (!RangeContainsProtected(sel.Range(r).Start().Position(),\r\n\t\t\tsel.Range(r).End().Position())) {\r\n\t\t\tconst Sci::Position positionInsert = sel.Range(r).Start().Position();\r\n\t\t\tif (!sel.Range(r).Empty()) {\r\n\t\t\t\tif (sel.Range(r).Length()) {\r\n\t\t\t\t\tpdoc->DeleteChars(positionInsert, sel.Range(r).Length());\r\n\t\t\t\t\tsel.Range(r).ClearVirtualSpace();\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Range is all virtual so collapse to start of virtual space\r\n\t\t\t\t\tsel.Range(r).MinimizeVirtualSpace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tRealizeVirtualSpace(positionInsert, sel.Range(r).caret.VirtualSpace());\r\n\t\t\tsel.Range(r).ClearVirtualSpace();\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid Editor::InsertPaste(const char *text, Sci::Position len) {\r\n\tif (multiPasteMode == MultiPaste::Once) {\r\n\t\tSelectionPosition selStart = sel.Start();\r\n\t\tselStart = RealizeVirtualSpace(selStart);\r\n\t\tconst Sci::Position lengthInserted = pdoc->InsertString(selStart.Position(), text, len);\r\n\t\tif (lengthInserted > 0) {\r\n\t\t\tSetEmptySelection(selStart.Position() + lengthInserted);\r\n\t\t}\r\n\t} else {\r\n\t\t// MultiPaste::Each\r\n\t\tfor (size_t r=0; r<sel.Count(); r++) {\r\n\t\t\tif (!RangeContainsProtected(sel.Range(r).Start().Position(),\r\n\t\t\t\tsel.Range(r).End().Position())) {\r\n\t\t\t\tSci::Position positionInsert = sel.Range(r).Start().Position();\r\n\t\t\t\tif (!sel.Range(r).Empty()) {\r\n\t\t\t\t\tif (sel.Range(r).Length()) {\r\n\t\t\t\t\t\tpdoc->DeleteChars(positionInsert, sel.Range(r).Length());\r\n\t\t\t\t\t\tsel.Range(r).ClearVirtualSpace();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// Range is all virtual so collapse to start of virtual space\r\n\t\t\t\t\t\tsel.Range(r).MinimizeVirtualSpace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tpositionInsert = RealizeVirtualSpace(positionInsert, sel.Range(r).caret.VirtualSpace());\r\n\t\t\t\tconst Sci::Position lengthInserted = pdoc->InsertString(positionInsert, text, len);\r\n\t\t\t\tif (lengthInserted > 0) {\r\n\t\t\t\t\tsel.Range(r).caret.SetPosition(positionInsert + lengthInserted);\r\n\t\t\t\t\tsel.Range(r).anchor.SetPosition(positionInsert + lengthInserted);\r\n\t\t\t\t}\r\n\t\t\t\tsel.Range(r).ClearVirtualSpace();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid Editor::InsertPasteShape(const char *text, Sci::Position len, PasteShape shape) {\r\n\tstd::string convertedText;\r\n\tif (convertPastes) {\r\n\t\t// Convert line endings of the paste into our local line-endings mode\r\n\t\tconvertedText = Document::TransformLineEnds(text, len, pdoc->eolMode);\r\n\t\tlen = convertedText.length();\r\n\t\ttext = convertedText.c_str();\r\n\t}\r\n\tif (shape == PasteShape::rectangular) {\r\n\t\tPasteRectangular(sel.Start(), text, len);\r\n\t} else {\r\n\t\tif (shape == PasteShape::line) {\r\n\t\t\tconst Sci::Position insertPos = pdoc->LineStartPosition(sel.MainCaret());\r\n\t\t\tSci::Position lengthInserted = pdoc->InsertString(insertPos, text, len);\r\n\t\t\t// add the newline if necessary\r\n\t\t\tif ((len > 0) && (text[len - 1] != '\\n' && text[len - 1] != '\\r')) {\r\n\t\t\t\tconst std::string_view endline = pdoc->EOLString();\r\n\t\t\t\tlengthInserted += pdoc->InsertString(insertPos + lengthInserted, endline);\r\n\t\t\t}\r\n\t\t\tif (sel.MainCaret() == insertPos) {\r\n\t\t\t\tSetEmptySelection(sel.MainCaret() + lengthInserted);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tInsertPaste(text, len);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid Editor::ClearSelection(bool retainMultipleSelections) {\r\n\tif (!sel.IsRectangular() && !retainMultipleSelections)\r\n\t\tFilterSelections();\r\n\tUndoGroup ug(pdoc);\r\n\tfor (size_t r=0; r<sel.Count(); r++) {\r\n\t\tif (!sel.Range(r).Empty()) {\r\n\t\t\tif (!RangeContainsProtected(sel.Range(r).Start().Position(),\r\n\t\t\t\tsel.Range(r).End().Position())) {\r\n\t\t\t\tpdoc->DeleteChars(sel.Range(r).Start().Position(),\r\n\t\t\t\t\tsel.Range(r).Length());\r\n\t\t\t\tsel.Range(r) = SelectionRange(sel.Range(r).Start());\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tThinRectangularRange();\r\n\tsel.RemoveDuplicates();\r\n\tClaimSelection();\r\n\tSetHoverIndicatorPosition(sel.MainCaret());\r\n}\r\n\r\nvoid Editor::ClearAll() {\r\n\t{\r\n\t\tUndoGroup ug(pdoc);\r\n\t\tif (0 != pdoc->Length()) {\r\n\t\t\tpdoc->DeleteChars(0, pdoc->Length());\r\n\t\t}\r\n\t\tif (!pdoc->IsReadOnly()) {\r\n\t\t\tpcs->Clear();\r\n\t\t\tpdoc->AnnotationClearAll();\r\n\t\t\tpdoc->EOLAnnotationClearAll();\r\n\t\t\tpdoc->MarginClearAll();\r\n\t\t}\r\n\t}\r\n\r\n\tview.ClearAllTabstops();\r\n\r\n\tsel.Clear();\r\n\tSetTopLine(0);\r\n\tSetVerticalScrollPos();\r\n\tInvalidateStyleRedraw();\r\n}\r\n\r\nvoid Editor::ClearDocumentStyle() {\r\n\tpdoc->decorations->DeleteLexerDecorations();\r\n\tpdoc->StartStyling(0);\r\n\tpdoc->SetStyleFor(pdoc->Length(), 0);\r\n\tpcs->ShowAll();\r\n\tSetAnnotationHeights(0, pdoc->LinesTotal());\r\n\tpdoc->ClearLevels();\r\n}\r\n\r\nvoid Editor::CopyAllowLine() {\r\n\tSelectionText selectedText;\r\n\tCopySelectionRange(&selectedText, true);\r\n\tCopyToClipboard(selectedText);\r\n}\r\n\r\nvoid Editor::Cut() {\r\n\tpdoc->CheckReadOnly();\r\n\tif (!pdoc->IsReadOnly() && !SelectionContainsProtected()) {\r\n\t\tCopy();\r\n\t\tClearSelection();\r\n\t}\r\n}\r\n\r\nvoid Editor::PasteRectangular(SelectionPosition pos, const char *ptr, Sci::Position len) {\r\n\tif (pdoc->IsReadOnly() || SelectionContainsProtected()) {\r\n\t\treturn;\r\n\t}\r\n\tsel.Clear();\r\n\tsel.RangeMain() = SelectionRange(pos);\r\n\tSci::Line line = pdoc->SciLineFromPosition(sel.MainCaret());\r\n\tUndoGroup ug(pdoc);\r\n\tsel.RangeMain().caret = RealizeVirtualSpace(sel.RangeMain().caret);\r\n\tconst int xInsert = XFromPosition(sel.RangeMain().caret);\r\n\tbool prevCr = false;\r\n\twhile ((len > 0) && IsEOLCharacter(ptr[len-1]))\r\n\t\tlen--;\r\n\tfor (Sci::Position i = 0; i < len; i++) {\r\n\t\tif (IsEOLCharacter(ptr[i])) {\r\n\t\t\tif ((ptr[i] == '\\r') || (!prevCr))\r\n\t\t\t\tline++;\r\n\t\t\tif (line >= pdoc->LinesTotal()) {\r\n\t\t\t\tconst std::string_view eol = pdoc->EOLString();\r\n\t\t\t\tpdoc->InsertString(pdoc->LengthNoExcept(), eol);\r\n\t\t\t}\r\n\t\t\t// Pad the end of lines with spaces if required\r\n\t\t\tsel.RangeMain().caret.SetPosition(PositionFromLineX(line, xInsert));\r\n\t\t\tif ((XFromPosition(sel.RangeMain().caret) < xInsert) && (i + 1 < len)) {\r\n\t\t\t\twhile (XFromPosition(sel.RangeMain().caret) < xInsert) {\r\n\t\t\t\t\tassert(pdoc);\r\n\t\t\t\t\tconst Sci::Position lengthInserted = pdoc->InsertString(sel.MainCaret(), \" \", 1);\r\n\t\t\t\t\tsel.RangeMain().caret.Add(lengthInserted);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tprevCr = ptr[i] == '\\r';\r\n\t\t} else {\r\n\t\t\tconst Sci::Position lengthInserted = pdoc->InsertString(sel.MainCaret(), ptr + i, 1);\r\n\t\t\tsel.RangeMain().caret.Add(lengthInserted);\r\n\t\t\tprevCr = false;\r\n\t\t}\r\n\t}\r\n\tSetEmptySelection(pos);\r\n}\r\n\r\nbool Editor::CanPaste() {\r\n\treturn !pdoc->IsReadOnly() && !SelectionContainsProtected();\r\n}\r\n\r\nvoid Editor::Clear() {\r\n\t// If multiple selections, don't delete EOLS\r\n\tif (sel.Empty()) {\r\n\t\tbool singleVirtual = false;\r\n\t\tif ((sel.Count() == 1) &&\r\n\t\t\t!RangeContainsProtected(sel.MainCaret(), sel.MainCaret() + 1) &&\r\n\t\t\tsel.RangeMain().Start().VirtualSpace()) {\r\n\t\t\tsingleVirtual = true;\r\n\t\t}\r\n\t\tUndoGroup ug(pdoc, (sel.Count() > 1) || singleVirtual);\r\n\t\tfor (size_t r=0; r<sel.Count(); r++) {\r\n\t\t\tif (!RangeContainsProtected(sel.Range(r).caret.Position(), sel.Range(r).caret.Position() + 1)) {\r\n\t\t\t\tif (sel.Range(r).Start().VirtualSpace()) {\r\n\t\t\t\t\tif (sel.Range(r).anchor < sel.Range(r).caret)\r\n\t\t\t\t\t\tsel.Range(r) = SelectionRange(RealizeVirtualSpace(sel.Range(r).anchor.Position(), sel.Range(r).anchor.VirtualSpace()));\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tsel.Range(r) = SelectionRange(RealizeVirtualSpace(sel.Range(r).caret.Position(), sel.Range(r).caret.VirtualSpace()));\r\n\t\t\t\t}\r\n\t\t\t\tif ((sel.Count() == 1) || !pdoc->IsPositionInLineEnd(sel.Range(r).caret.Position())) {\r\n\t\t\t\t\tpdoc->DelChar(sel.Range(r).caret.Position());\r\n\t\t\t\t\tsel.Range(r).ClearVirtualSpace();\r\n\t\t\t\t}  // else multiple selection so don't eat line ends\r\n\t\t\t} else {\r\n\t\t\t\tsel.Range(r).ClearVirtualSpace();\r\n\t\t\t}\r\n\t\t}\r\n\t} else {\r\n\t\tClearSelection();\r\n\t}\r\n\tsel.RemoveDuplicates();\r\n\tShowCaretAtCurrentPosition();\t\t// Avoid blinking\r\n}\r\n\r\nvoid Editor::SelectAll() {\r\n\tsel.Clear();\r\n\tSetSelection(0, pdoc->Length());\r\n\tRedraw();\r\n}\r\n\r\nvoid Editor::Undo() {\r\n\tif (pdoc->CanUndo()) {\r\n\t\tInvalidateCaret();\r\n\t\tconst Sci::Position newPos = pdoc->Undo();\r\n\t\tif (newPos >= 0)\r\n\t\t\tSetEmptySelection(newPos);\r\n\t\tEnsureCaretVisible();\r\n\t}\r\n}\r\n\r\nvoid Editor::Redo() {\r\n\tif (pdoc->CanRedo()) {\r\n\t\tconst Sci::Position newPos = pdoc->Redo();\r\n\t\tif (newPos >= 0)\r\n\t\t\tSetEmptySelection(newPos);\r\n\t\tEnsureCaretVisible();\r\n\t}\r\n}\r\n\r\nvoid Editor::DelCharBack(bool allowLineStartDeletion) {\r\n\tRefreshStyleData();\r\n\tif (!sel.IsRectangular())\r\n\t\tFilterSelections();\r\n\tif (sel.IsRectangular())\r\n\t\tallowLineStartDeletion = false;\r\n\tUndoGroup ug(pdoc, (sel.Count() > 1) || !sel.Empty());\r\n\tif (sel.Empty()) {\r\n\t\tfor (size_t r=0; r<sel.Count(); r++) {\r\n\t\t\tif (!RangeContainsProtected(sel.Range(r).caret.Position() - 1, sel.Range(r).caret.Position())) {\r\n\t\t\t\tif (sel.Range(r).caret.VirtualSpace()) {\r\n\t\t\t\t\tsel.Range(r).caret.SetVirtualSpace(sel.Range(r).caret.VirtualSpace() - 1);\r\n\t\t\t\t\tsel.Range(r).anchor.SetVirtualSpace(sel.Range(r).caret.VirtualSpace());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tconst Sci::Line lineCurrentPos =\r\n\t\t\t\t\t\tpdoc->SciLineFromPosition(sel.Range(r).caret.Position());\r\n\t\t\t\t\tif (allowLineStartDeletion || (pdoc->LineStart(lineCurrentPos) != sel.Range(r).caret.Position())) {\r\n\t\t\t\t\t\tif (pdoc->GetColumn(sel.Range(r).caret.Position()) <= pdoc->GetLineIndentation(lineCurrentPos) &&\r\n\t\t\t\t\t\t\t\tpdoc->GetColumn(sel.Range(r).caret.Position()) > 0 && pdoc->backspaceUnindents) {\r\n\t\t\t\t\t\t\tUndoGroup ugInner(pdoc, !ug.Needed());\r\n\t\t\t\t\t\t\tconst int indentation = pdoc->GetLineIndentation(lineCurrentPos);\r\n\t\t\t\t\t\t\tconst int indentationStep = pdoc->IndentSize();\r\n\t\t\t\t\t\t\tint indentationChange = indentation % indentationStep;\r\n\t\t\t\t\t\t\tif (indentationChange == 0)\r\n\t\t\t\t\t\t\t\tindentationChange = indentationStep;\r\n\t\t\t\t\t\t\tconst Sci::Position posSelect = pdoc->SetLineIndentation(lineCurrentPos, indentation - indentationChange);\r\n\t\t\t\t\t\t\t// SetEmptySelection\r\n\t\t\t\t\t\t\tsel.Range(r) = SelectionRange(posSelect);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tpdoc->DelCharBack(sel.Range(r).caret.Position());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tsel.Range(r).ClearVirtualSpace();\r\n\t\t\t}\r\n\t\t}\r\n\t\tThinRectangularRange();\r\n\t} else {\r\n\t\tClearSelection();\r\n\t}\r\n\tsel.RemoveDuplicates();\r\n\tContainerNeedsUpdate(Update::Selection);\r\n\t// Avoid blinking during rapid typing:\r\n\tShowCaretAtCurrentPosition();\r\n}\r\n\r\nvoid Editor::NotifyFocus(bool focus) {\r\n\tNotificationData scn = {};\r\n\tscn.nmhdr.code = focus ? Notification::FocusIn : Notification::FocusOut;\r\n\tNotifyParent(scn);\r\n}\r\n\r\nvoid Editor::SetCtrlID(int identifier) {\r\n\tctrlID = identifier;\r\n}\r\n\r\nvoid Editor::NotifyStyleToNeeded(Sci::Position endStyleNeeded) {\r\n\tNotificationData scn = {};\r\n\tscn.nmhdr.code = Notification::StyleNeeded;\r\n\tscn.position = endStyleNeeded;\r\n\tNotifyParent(scn);\r\n}\r\n\r\nvoid Editor::NotifyStyleNeeded(Document *, void *, Sci::Position endStyleNeeded) {\r\n\tNotifyStyleToNeeded(endStyleNeeded);\r\n}\r\n\r\nvoid Editor::NotifyErrorOccurred(Document *, void *, Status status) {\r\n\terrorStatus = status;\r\n}\r\n\r\nvoid Editor::NotifyChar(int ch, CharacterSource charSource) {\r\n\tNotificationData scn = {};\r\n\tscn.nmhdr.code = Notification::CharAdded;\r\n\tscn.ch = ch;\r\n\tscn.characterSource = charSource;\r\n\tNotifyParent(scn);\r\n}\r\n\r\nvoid Editor::NotifySavePoint(bool isSavePoint) {\r\n\tNotificationData scn = {};\r\n\tif (isSavePoint) {\r\n\t\tscn.nmhdr.code = Notification::SavePointReached;\r\n\t\tif (changeHistoryOption != ChangeHistoryOption::Disabled) {\r\n\t\t\tRedraw();\r\n\t\t}\r\n\t} else {\r\n\t\tscn.nmhdr.code = Notification::SavePointLeft;\r\n\t}\r\n\tNotifyParent(scn);\r\n}\r\n\r\nvoid Editor::NotifyModifyAttempt() {\r\n\tNotificationData scn = {};\r\n\tscn.nmhdr.code = Notification::ModifyAttemptRO;\r\n\tNotifyParent(scn);\r\n}\r\n\r\nvoid Editor::NotifyDoubleClick(Point pt, KeyMod modifiers) {\r\n\tNotificationData scn = {};\r\n\tscn.nmhdr.code = Notification::DoubleClick;\r\n\tscn.line = LineFromLocation(pt);\r\n\tscn.position = PositionFromLocation(pt, true);\r\n\tscn.modifiers = modifiers;\r\n\tNotifyParent(scn);\r\n}\r\n\r\nvoid Editor::NotifyHotSpotDoubleClicked(Sci::Position position, KeyMod modifiers) {\r\n\tNotificationData scn = {};\r\n\tscn.nmhdr.code = Notification::HotSpotDoubleClick;\r\n\tscn.position = position;\r\n\tscn.modifiers = modifiers;\r\n\tNotifyParent(scn);\r\n}\r\n\r\nvoid Editor::NotifyHotSpotClicked(Sci::Position position, KeyMod modifiers) {\r\n\tNotificationData scn = {};\r\n\tscn.nmhdr.code = Notification::HotSpotClick;\r\n\tscn.position = position;\r\n\tscn.modifiers = modifiers;\r\n\tNotifyParent(scn);\r\n}\r\n\r\nvoid Editor::NotifyHotSpotReleaseClick(Sci::Position position, KeyMod modifiers) {\r\n\tNotificationData scn = {};\r\n\tscn.nmhdr.code = Notification::HotSpotReleaseClick;\r\n\tscn.position = position;\r\n\tscn.modifiers = modifiers;\r\n\tNotifyParent(scn);\r\n}\r\n\r\nbool Editor::NotifyUpdateUI() {\r\n\tif (needUpdateUI != Update::None) {\r\n\t\tNotificationData scn = {};\r\n\t\tscn.nmhdr.code = Notification::UpdateUI;\r\n\t\tscn.updated = needUpdateUI;\r\n\t\tNotifyParent(scn);\r\n\t\tneedUpdateUI = Update::None;\r\n\t\treturn true;\r\n\t}\r\n\treturn false;\r\n}\r\n\r\nvoid Editor::NotifyPainted() {\r\n\tNotificationData scn = {};\r\n\tscn.nmhdr.code = Notification::Painted;\r\n\tNotifyParent(scn);\r\n}\r\n\r\nvoid Editor::NotifyIndicatorClick(bool click, Sci::Position position, KeyMod modifiers) {\r\n\tconst int mask = pdoc->decorations->AllOnFor(position);\r\n\tif ((click && mask) || pdoc->decorations->ClickNotified()) {\r\n\t\tNotificationData scn = {};\r\n\t\tpdoc->decorations->SetClickNotified(click);\r\n\t\tscn.nmhdr.code = click ? Notification::IndicatorClick : Notification::IndicatorRelease;\r\n\t\tscn.modifiers = modifiers;\r\n\t\tscn.position = position;\r\n\t\tNotifyParent(scn);\r\n\t}\r\n}\r\n\r\nbool Editor::NotifyMarginClick(Point pt, KeyMod modifiers) {\r\n\tconst int marginClicked = vs.MarginFromLocation(pt);\r\n\tif ((marginClicked >= 0) && vs.ms[marginClicked].sensitive) {\r\n\t\tconst Sci::Position position = pdoc->LineStart(LineFromLocation(pt));\r\n\t\tif ((vs.ms[marginClicked].mask & MaskFolders) && (FlagSet(foldAutomatic, AutomaticFold::Click))) {\r\n\t\t\tconst bool ctrl = FlagSet(modifiers, KeyMod::Ctrl);\r\n\t\t\tconst bool shift = FlagSet(modifiers, KeyMod::Shift);\r\n\t\t\tconst Sci::Line lineClick = pdoc->SciLineFromPosition(position);\r\n\t\t\tif (shift && ctrl) {\r\n\t\t\t\tFoldAll(FoldAction::Toggle);\r\n\t\t\t} else {\r\n\t\t\t\tconst FoldLevel levelClick = pdoc->GetFoldLevel(lineClick);\r\n\t\t\t\tif (LevelIsHeader(levelClick)) {\r\n\t\t\t\t\tif (shift) {\r\n\t\t\t\t\t\t// Ensure all children visible\r\n\t\t\t\t\t\tFoldExpand(lineClick, FoldAction::Expand, levelClick);\r\n\t\t\t\t\t} else if (ctrl) {\r\n\t\t\t\t\t\tFoldExpand(lineClick, FoldAction::Toggle, levelClick);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// Toggle this line\r\n\t\t\t\t\t\tFoldLine(lineClick, FoldAction::Toggle);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tNotificationData scn = {};\r\n\t\tscn.nmhdr.code = Notification::MarginClick;\r\n\t\tscn.modifiers = modifiers;\r\n\t\tscn.position = position;\r\n\t\tscn.margin = marginClicked;\r\n\t\tNotifyParent(scn);\r\n\t\treturn true;\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n}\r\n\r\nbool Editor::NotifyMarginRightClick(Point pt, KeyMod modifiers) {\r\n\tconst int marginRightClicked = vs.MarginFromLocation(pt);\r\n\tif ((marginRightClicked >= 0) && vs.ms[marginRightClicked].sensitive) {\r\n\t\tconst Sci::Position position = pdoc->LineStart(LineFromLocation(pt));\r\n\t\tNotificationData scn = {};\r\n\t\tscn.nmhdr.code = Notification::MarginRightClick;\r\n\t\tscn.modifiers = modifiers;\r\n\t\tscn.position = position;\r\n\t\tscn.margin = marginRightClicked;\r\n\t\tNotifyParent(scn);\r\n\t\treturn true;\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n}\r\n\r\nvoid Editor::NotifyNeedShown(Sci::Position pos, Sci::Position len) {\r\n\tNotificationData scn = {};\r\n\tscn.nmhdr.code = Notification::NeedShown;\r\n\tscn.position = pos;\r\n\tscn.length = len;\r\n\tNotifyParent(scn);\r\n}\r\n\r\nvoid Editor::NotifyDwelling(Point pt, bool state) {\r\n\tNotificationData scn = {};\r\n\tscn.nmhdr.code = state ? Notification::DwellStart : Notification::DwellEnd;\r\n\tscn.position = PositionFromLocation(pt, true);\r\n\tscn.x = static_cast<int>(pt.x + vs.ExternalMarginWidth());\r\n\tscn.y = static_cast<int>(pt.y);\r\n\tNotifyParent(scn);\r\n}\r\n\r\nvoid Editor::NotifyZoom() {\r\n\tNotificationData scn = {};\r\n\tscn.nmhdr.code = Notification::Zoom;\r\n\tNotifyParent(scn);\r\n}\r\n\r\n// Notifications from document\r\nvoid Editor::NotifyModifyAttempt(Document *, void *) {\r\n\t//Platform::DebugPrintf(\"** Modify Attempt\\n\");\r\n\tNotifyModifyAttempt();\r\n}\r\n\r\nvoid Editor::NotifySavePoint(Document *, void *, bool atSavePoint) {\r\n\t//Platform::DebugPrintf(\"** Save Point %s\\n\", atSavePoint ? \"On\" : \"Off\");\r\n\tNotifySavePoint(atSavePoint);\r\n}\r\n\r\nvoid Editor::CheckModificationForWrap(DocModification mh) {\r\n\tif (FlagSet(mh.modificationType, ModificationFlags::InsertText | ModificationFlags::DeleteText)) {\r\n\t\tview.llc.Invalidate(LineLayout::ValidLevel::checkTextAndStyle);\r\n\t\tconst Sci::Line lineDoc = pdoc->SciLineFromPosition(mh.position);\r\n\t\tconst Sci::Line lines = std::max(static_cast<Sci::Line>(0), mh.linesAdded);\r\n\t\tif (Wrapping()) {\r\n\t\t\tNeedWrapping(lineDoc, lineDoc + lines + 1);\r\n\t\t}\r\n\t\tRefreshStyleData();\r\n\t\t// Fix up annotation heights\r\n\t\tSetAnnotationHeights(lineDoc, lineDoc + lines + 2);\r\n\t}\r\n}\r\n\r\nnamespace {\r\n\r\n// Move a position so it is still after the same character as before the insertion.\r\nconstexpr Sci::Position MovePositionForInsertion(Sci::Position position, Sci::Position startInsertion, Sci::Position length) noexcept {\r\n\tif (position > startInsertion) {\r\n\t\treturn position + length;\r\n\t}\r\n\treturn position;\r\n}\r\n\r\n// Move a position so it is still after the same character as before the deletion if that\r\n// character is still present else after the previous surviving character.\r\nconstexpr Sci::Position MovePositionForDeletion(Sci::Position position, Sci::Position startDeletion, Sci::Position length) noexcept {\r\n\tif (position > startDeletion) {\r\n\t\tconst Sci::Position endDeletion = startDeletion + length;\r\n\t\tif (position > endDeletion) {\r\n\t\t\treturn position - length;\r\n\t\t} else {\r\n\t\t\treturn startDeletion;\r\n\t\t}\r\n\t} else {\r\n\t\treturn position;\r\n\t}\r\n}\r\n\r\n}\r\n\r\nvoid Editor::NotifyModified(Document *, DocModification mh, void *) {\r\n\tContainerNeedsUpdate(Update::Content);\r\n\tif (paintState == PaintState::painting) {\r\n\t\tCheckForChangeOutsidePaint(Range(mh.position, mh.position + mh.length));\r\n\t}\r\n\tif (FlagSet(mh.modificationType, ModificationFlags::ChangeLineState)) {\r\n\t\tif (paintState == PaintState::painting) {\r\n\t\t\tCheckForChangeOutsidePaint(\r\n\t\t\t    Range(pdoc->LineStart(mh.line),\r\n\t\t\t\t\tpdoc->LineStart(mh.line + 1)));\r\n\t\t} else {\r\n\t\t\t// Could check that change is before last visible line.\r\n\t\t\tRedraw();\r\n\t\t}\r\n\t}\r\n\tif (FlagSet(mh.modificationType, ModificationFlags::ChangeTabStops)) {\r\n\t\tRedraw();\r\n\t}\r\n\tif (FlagSet(mh.modificationType, ModificationFlags::LexerState)) {\r\n\t\tif (paintState == PaintState::painting) {\r\n\t\t\tCheckForChangeOutsidePaint(\r\n\t\t\t    Range(mh.position, mh.position + mh.length));\r\n\t\t} else {\r\n\t\t\tRedraw();\r\n\t\t}\r\n\t}\r\n\tif (FlagSet(mh.modificationType, ModificationFlags::ChangeStyle | ModificationFlags::ChangeIndicator)) {\r\n\t\tif (FlagSet(mh.modificationType, ModificationFlags::ChangeStyle)) {\r\n\t\t\tpdoc->IncrementStyleClock();\r\n\t\t}\r\n\t\tif (paintState == PaintState::notPainting) {\r\n\t\t\tconst Sci::Line lineDocTop = pcs->DocFromDisplay(topLine);\r\n\t\t\tif (mh.position < pdoc->LineStart(lineDocTop)) {\r\n\t\t\t\t// Styling performed before this view\r\n\t\t\t\tRedraw();\r\n\t\t\t} else {\r\n\t\t\t\tInvalidateRange(mh.position, mh.position + mh.length);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (FlagSet(mh.modificationType, ModificationFlags::ChangeStyle)) {\r\n\t\t\tview.llc.Invalidate(LineLayout::ValidLevel::checkTextAndStyle);\r\n\t\t}\r\n\t} else {\r\n\t\t// Move selection and brace highlights\r\n\t\tif (FlagSet(mh.modificationType, ModificationFlags::InsertText)) {\r\n\t\t\tsel.MovePositions(true, mh.position, mh.length);\r\n\t\t\tbraces[0] = MovePositionForInsertion(braces[0], mh.position, mh.length);\r\n\t\t\tbraces[1] = MovePositionForInsertion(braces[1], mh.position, mh.length);\r\n\t\t} else if (FlagSet(mh.modificationType, ModificationFlags::DeleteText)) {\r\n\t\t\tsel.MovePositions(false, mh.position, mh.length);\r\n\t\t\tbraces[0] = MovePositionForDeletion(braces[0], mh.position, mh.length);\r\n\t\t\tbraces[1] = MovePositionForDeletion(braces[1], mh.position, mh.length);\r\n\t\t}\r\n\t\tif (FlagSet(mh.modificationType, ModificationFlags::BeforeInsert | ModificationFlags::BeforeDelete) && pcs->HiddenLines()) {\r\n\t\t\t// Some lines are hidden so may need shown.\r\n\t\t\tconst Sci::Line lineOfPos = pdoc->SciLineFromPosition(mh.position);\r\n\t\t\tSci::Position endNeedShown = mh.position;\r\n\t\t\tif (FlagSet(mh.modificationType, ModificationFlags::BeforeInsert)) {\r\n\t\t\t\tif (pdoc->ContainsLineEnd(mh.text, mh.length) && (mh.position != pdoc->LineStart(lineOfPos)))\r\n\t\t\t\t\tendNeedShown = pdoc->LineStart(lineOfPos+1);\r\n\t\t\t} else {\r\n\t\t\t\t// If the deletion includes any EOL then we extend the need shown area.\r\n\t\t\t\tendNeedShown = mh.position + mh.length;\r\n\t\t\t\tSci::Line lineLast = pdoc->SciLineFromPosition(mh.position+mh.length);\r\n\t\t\t\tfor (Sci::Line line = lineOfPos + 1; line <= lineLast; line++) {\r\n\t\t\t\t\tconst Sci::Line lineMaxSubord = pdoc->GetLastChild(line, {}, -1);\r\n\t\t\t\t\tif (lineLast < lineMaxSubord) {\r\n\t\t\t\t\t\tlineLast = lineMaxSubord;\r\n\t\t\t\t\t\tendNeedShown = pdoc->LineEnd(lineLast);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tNeedShown(mh.position, endNeedShown - mh.position);\r\n\t\t}\r\n\t\tif (mh.linesAdded != 0) {\r\n\t\t\t// Update contraction state for inserted and removed lines\r\n\t\t\t// lineOfPos should be calculated in context of state before modification, shouldn't it\r\n\t\t\tSci::Line lineOfPos = pdoc->SciLineFromPosition(mh.position);\r\n\t\t\tif (mh.position > pdoc->LineStart(lineOfPos))\r\n\t\t\t\tlineOfPos++;\t// Affecting subsequent lines\r\n\t\t\tif (mh.linesAdded > 0) {\r\n\t\t\t\tpcs->InsertLines(lineOfPos, mh.linesAdded);\r\n\t\t\t} else {\r\n\t\t\t\tpcs->DeleteLines(lineOfPos, -mh.linesAdded);\r\n\t\t\t}\r\n\t\t\tview.LinesAddedOrRemoved(lineOfPos, mh.linesAdded);\r\n\t\t}\r\n\t\tif (FlagSet(mh.modificationType, ModificationFlags::ChangeAnnotation)) {\r\n\t\t\tconst Sci::Line lineDoc = pdoc->SciLineFromPosition(mh.position);\r\n\t\t\tif (vs.annotationVisible != AnnotationVisible::Hidden) {\r\n\t\t\t\tif (pcs->SetHeight(lineDoc, pcs->GetHeight(lineDoc) + static_cast<int>(mh.annotationLinesAdded))) {\r\n\t\t\t\t\tSetScrollBars();\r\n\t\t\t\t}\r\n\t\t\t\tRedraw();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (FlagSet(mh.modificationType, ModificationFlags::ChangeEOLAnnotation)) {\r\n\t\t\tif (vs.eolAnnotationVisible != EOLAnnotationVisible::Hidden) {\r\n\t\t\t\tRedraw();\r\n\t\t\t}\r\n\t\t}\r\n\t\tCheckModificationForWrap(mh);\r\n\t\tif (mh.linesAdded != 0) {\r\n\t\t\t// Avoid scrolling of display if change before current display\r\n\t\t\tif (mh.position < posTopLine && !CanDeferToLastStep(mh)) {\r\n\t\t\t\tconst Sci::Line newTop = std::clamp<Sci::Line>(topLine + mh.linesAdded, 0, MaxScrollPos());\r\n\t\t\t\tif (newTop != topLine) {\r\n\t\t\t\t\tSetTopLine(newTop);\r\n\t\t\t\t\tSetVerticalScrollPos();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (paintState == PaintState::notPainting && !CanDeferToLastStep(mh)) {\r\n\t\t\t\tif (SynchronousStylingToVisible()) {\r\n\t\t\t\t\tQueueIdleWork(WorkItems::style, pdoc->Length());\r\n\t\t\t\t}\r\n\t\t\t\tRedraw();\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (paintState == PaintState::notPainting && mh.length && !CanEliminate(mh)) {\r\n\t\t\t\tif (SynchronousStylingToVisible()) {\r\n\t\t\t\t\tQueueIdleWork(WorkItems::style, mh.position + mh.length);\r\n\t\t\t\t}\r\n\t\t\t\tInvalidateRange(mh.position, mh.position + mh.length);\r\n\t\t\t\tif (FlagSet(changeHistoryOption, ChangeHistoryOption::Markers)) {\r\n\t\t\t\t\tRedrawSelMargin(pdoc->SciLineFromPosition(mh.position));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tif (mh.linesAdded != 0 && !CanDeferToLastStep(mh)) {\r\n\t\tSetScrollBars();\r\n\t}\r\n\r\n\tif (FlagSet(mh.modificationType, (ModificationFlags::ChangeMarker | ModificationFlags::ChangeMargin))) {\r\n\t\tif ((!willRedrawAll) && ((paintState == PaintState::notPainting) || !PaintContainsMargin())) {\r\n\t\t\tif (FlagSet(mh.modificationType, ModificationFlags::ChangeFold)) {\r\n\t\t\t\t// Fold changes can affect the drawing of following lines so redraw whole margin\r\n\t\t\t\tRedrawSelMargin(marginView.highlightDelimiter.isEnabled ? -1 : mh.line - 1, true);\r\n\t\t\t} else {\r\n\t\t\t\tRedrawSelMargin(mh.line);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif ((FlagSet(mh.modificationType, ModificationFlags::ChangeFold)) && (FlagSet(foldAutomatic, AutomaticFold::Change))) {\r\n\t\tFoldChanged(mh.line, mh.foldLevelNow, mh.foldLevelPrev);\r\n\t}\r\n\r\n\t// NOW pay the piper WRT \"deferred\" visual updates\r\n\tif (IsLastStep(mh)) {\r\n\t\tSetScrollBars();\r\n\t\tRedraw();\r\n\t}\r\n\r\n\t// If client wants to see this modification\r\n\tif (FlagSet(mh.modificationType, modEventMask)) {\r\n\t\tif (commandEvents) {\r\n\t\t\tif ((mh.modificationType & (ModificationFlags::ChangeStyle | ModificationFlags::ChangeIndicator)) == ModificationFlags::None) {\r\n\t\t\t\t// Real modification made to text of document.\r\n\t\t\t\tNotifyChange();\t// Send EN_CHANGE\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tNotificationData scn = {};\r\n\t\tscn.nmhdr.code = Notification::Modified;\r\n\t\tscn.position = mh.position;\r\n\t\tscn.modificationType = mh.modificationType;\r\n\t\tscn.text = mh.text;\r\n\t\tscn.length = mh.length;\r\n\t\tscn.linesAdded = mh.linesAdded;\r\n\t\tscn.line = mh.line;\r\n\t\tscn.foldLevelNow = mh.foldLevelNow;\r\n\t\tscn.foldLevelPrev = mh.foldLevelPrev;\r\n\t\tscn.token = static_cast<int>(mh.token);\r\n\t\tscn.annotationLinesAdded = mh.annotationLinesAdded;\r\n\t\tNotifyParent(scn);\r\n\t}\r\n}\r\n\r\nvoid Editor::NotifyDeleted(Document *, void *) noexcept {\r\n\t/* Do nothing */\r\n}\r\n\r\nvoid Editor::NotifyMacroRecord(Message iMessage, uptr_t wParam, sptr_t lParam) {\r\n\r\n\t// Enumerates all macroable messages\r\n\tswitch (iMessage) {\r\n\tcase Message::Cut:\r\n\tcase Message::Copy:\r\n\tcase Message::Paste:\r\n\tcase Message::Clear:\r\n\tcase Message::ReplaceSel:\r\n\tcase Message::AddText:\r\n\tcase Message::InsertText:\r\n\tcase Message::AppendText:\r\n\tcase Message::ClearAll:\r\n\tcase Message::SelectAll:\r\n\tcase Message::GotoLine:\r\n\tcase Message::GotoPos:\r\n\tcase Message::SearchAnchor:\r\n\tcase Message::SearchNext:\r\n\tcase Message::SearchPrev:\r\n\tcase Message::LineDown:\r\n\tcase Message::LineDownExtend:\r\n\tcase Message::ParaDown:\r\n\tcase Message::ParaDownExtend:\r\n\tcase Message::LineUp:\r\n\tcase Message::LineUpExtend:\r\n\tcase Message::ParaUp:\r\n\tcase Message::ParaUpExtend:\r\n\tcase Message::CharLeft:\r\n\tcase Message::CharLeftExtend:\r\n\tcase Message::CharRight:\r\n\tcase Message::CharRightExtend:\r\n\tcase Message::WordLeft:\r\n\tcase Message::WordLeftExtend:\r\n\tcase Message::WordRight:\r\n\tcase Message::WordRightExtend:\r\n\tcase Message::WordPartLeft:\r\n\tcase Message::WordPartLeftExtend:\r\n\tcase Message::WordPartRight:\r\n\tcase Message::WordPartRightExtend:\r\n\tcase Message::WordLeftEnd:\r\n\tcase Message::WordLeftEndExtend:\r\n\tcase Message::WordRightEnd:\r\n\tcase Message::WordRightEndExtend:\r\n\tcase Message::Home:\r\n\tcase Message::HomeExtend:\r\n\tcase Message::LineEnd:\r\n\tcase Message::LineEndExtend:\r\n\tcase Message::HomeWrap:\r\n\tcase Message::HomeWrapExtend:\r\n\tcase Message::LineEndWrap:\r\n\tcase Message::LineEndWrapExtend:\r\n\tcase Message::DocumentStart:\r\n\tcase Message::DocumentStartExtend:\r\n\tcase Message::DocumentEnd:\r\n\tcase Message::DocumentEndExtend:\r\n\tcase Message::StutteredPageUp:\r\n\tcase Message::StutteredPageUpExtend:\r\n\tcase Message::StutteredPageDown:\r\n\tcase Message::StutteredPageDownExtend:\r\n\tcase Message::PageUp:\r\n\tcase Message::PageUpExtend:\r\n\tcase Message::PageDown:\r\n\tcase Message::PageDownExtend:\r\n\tcase Message::EditToggleOvertype:\r\n\tcase Message::Cancel:\r\n\tcase Message::DeleteBack:\r\n\tcase Message::Tab:\r\n\tcase Message::BackTab:\r\n\tcase Message::FormFeed:\r\n\tcase Message::VCHome:\r\n\tcase Message::VCHomeExtend:\r\n\tcase Message::VCHomeWrap:\r\n\tcase Message::VCHomeWrapExtend:\r\n\tcase Message::VCHomeDisplay:\r\n\tcase Message::VCHomeDisplayExtend:\r\n\tcase Message::DelWordLeft:\r\n\tcase Message::DelWordRight:\r\n\tcase Message::DelWordRightEnd:\r\n\tcase Message::DelLineLeft:\r\n\tcase Message::DelLineRight:\r\n\tcase Message::LineCopy:\r\n\tcase Message::LineCut:\r\n\tcase Message::LineDelete:\r\n\tcase Message::LineTranspose:\r\n\tcase Message::LineReverse:\r\n\tcase Message::LineDuplicate:\r\n\tcase Message::LowerCase:\r\n\tcase Message::UpperCase:\r\n\tcase Message::LineScrollDown:\r\n\tcase Message::LineScrollUp:\r\n\tcase Message::DeleteBackNotLine:\r\n\tcase Message::HomeDisplay:\r\n\tcase Message::HomeDisplayExtend:\r\n\tcase Message::LineEndDisplay:\r\n\tcase Message::LineEndDisplayExtend:\r\n\tcase Message::SetSelectionMode:\r\n\tcase Message::LineDownRectExtend:\r\n\tcase Message::LineUpRectExtend:\r\n\tcase Message::CharLeftRectExtend:\r\n\tcase Message::CharRightRectExtend:\r\n\tcase Message::HomeRectExtend:\r\n\tcase Message::VCHomeRectExtend:\r\n\tcase Message::LineEndRectExtend:\r\n\tcase Message::PageUpRectExtend:\r\n\tcase Message::PageDownRectExtend:\r\n\tcase Message::SelectionDuplicate:\r\n\tcase Message::CopyAllowLine:\r\n\tcase Message::VerticalCentreCaret:\r\n\tcase Message::MoveSelectedLinesUp:\r\n\tcase Message::MoveSelectedLinesDown:\r\n\tcase Message::ScrollToStart:\r\n\tcase Message::ScrollToEnd:\r\n\t\tbreak;\r\n\r\n\t\t// Filter out all others like display changes. Also, newlines are redundant\r\n\t\t// with char insert messages.\r\n\tcase Message::NewLine:\r\n\tdefault:\r\n\t\t//\t\tprintf(\"Filtered out %ld of macro recording\\n\", iMessage);\r\n\t\treturn;\r\n\t}\r\n\r\n\t// Send notification\r\n\tNotificationData scn = {};\r\n\tscn.nmhdr.code = Notification::MacroRecord;\r\n\tscn.message = iMessage;\r\n\tscn.wParam = wParam;\r\n\tscn.lParam = lParam;\r\n\tNotifyParent(scn);\r\n}\r\n\r\n// Something has changed that the container should know about\r\nvoid Editor::ContainerNeedsUpdate(Update flags) noexcept {\r\n\tneedUpdateUI = needUpdateUI | flags;\r\n}\r\n\r\n/**\r\n * Force scroll and keep position relative to top of window.\r\n *\r\n * If stuttered = true and not already at first/last row, move to first/last row of window.\r\n * If stuttered = true and already at first/last row, scroll as normal.\r\n */\r\nvoid Editor::PageMove(int direction, Selection::SelTypes selt, bool stuttered) {\r\n\tSci::Line topLineNew;\r\n\tSelectionPosition newPos;\r\n\r\n\tconst Sci::Line currentLine = pdoc->SciLineFromPosition(sel.MainCaret());\r\n\tconst Sci::Line topStutterLine = topLine + caretPolicies.y.slop;\r\n\tconst Sci::Line bottomStutterLine =\r\n\t    pdoc->SciLineFromPosition(PositionFromLocation(\r\n\t                Point::FromInts(lastXChosen - xOffset, direction * vs.lineHeight * static_cast<int>(LinesToScroll()))))\r\n\t    - caretPolicies.y.slop - 1;\r\n\r\n\tif (stuttered && (direction < 0 && currentLine > topStutterLine)) {\r\n\t\ttopLineNew = topLine;\r\n\t\tnewPos = SPositionFromLocation(Point::FromInts(lastXChosen - xOffset, vs.lineHeight * caretPolicies.y.slop),\r\n\t\t\tfalse, false, UserVirtualSpace());\r\n\r\n\t} else if (stuttered && (direction > 0 && currentLine < bottomStutterLine)) {\r\n\t\ttopLineNew = topLine;\r\n\t\tnewPos = SPositionFromLocation(Point::FromInts(lastXChosen - xOffset, vs.lineHeight * static_cast<int>(LinesToScroll() - caretPolicies.y.slop)),\r\n\t\t\tfalse, false, UserVirtualSpace());\r\n\r\n\t} else {\r\n\t\tconst Point pt = LocationFromPosition(sel.MainCaret());\r\n\r\n\t\ttopLineNew = std::clamp<Sci::Line>(\r\n\t\t            topLine + direction * LinesToScroll(), 0, MaxScrollPos());\r\n\t\tnewPos = SPositionFromLocation(\r\n\t\t\tPoint::FromInts(lastXChosen - xOffset, static_cast<int>(pt.y) +\r\n\t\t\t\tdirection * (vs.lineHeight * static_cast<int>(LinesToScroll()))),\r\n\t\t\tfalse, false, UserVirtualSpace());\r\n\t}\r\n\r\n\tif (topLineNew != topLine) {\r\n\t\tSetTopLine(topLineNew);\r\n\t\tMovePositionTo(newPos, selt);\r\n\t\tSetVerticalScrollPos();\r\n\t\tRedraw();\r\n\t} else {\r\n\t\tMovePositionTo(newPos, selt);\r\n\t}\r\n}\r\n\r\nvoid Editor::ChangeCaseOfSelection(CaseMapping caseMapping) {\r\n\tUndoGroup ug(pdoc);\r\n\tfor (size_t r=0; r<sel.Count(); r++) {\r\n\t\tSelectionRange current = sel.Range(r);\r\n\t\tSelectionRange currentNoVS = current;\r\n\t\tcurrentNoVS.ClearVirtualSpace();\r\n\t\tconst size_t rangeBytes = currentNoVS.Length();\r\n\t\tif (rangeBytes > 0) {\r\n\t\t\tstd::string sText = RangeText(currentNoVS.Start().Position(), currentNoVS.End().Position());\r\n\r\n\t\t\tstd::string sMapped = CaseMapString(sText, caseMapping);\r\n\r\n\t\t\tif (sMapped != sText) {\r\n\t\t\t\tsize_t firstDifference = 0;\r\n\t\t\t\twhile (sMapped[firstDifference] == sText[firstDifference])\r\n\t\t\t\t\tfirstDifference++;\r\n\t\t\t\tsize_t lastDifferenceText = sText.size() - 1;\r\n\t\t\t\tsize_t lastDifferenceMapped = sMapped.size() - 1;\r\n\t\t\t\twhile (sMapped[lastDifferenceMapped] == sText[lastDifferenceText]) {\r\n\t\t\t\t\tlastDifferenceText--;\r\n\t\t\t\t\tlastDifferenceMapped--;\r\n\t\t\t\t}\r\n\t\t\t\tconst size_t endDifferenceText = sText.size() - 1 - lastDifferenceText;\r\n\t\t\t\tpdoc->DeleteChars(\r\n\t\t\t\t\tcurrentNoVS.Start().Position() + firstDifference,\r\n\t\t\t\t\trangeBytes - firstDifference - endDifferenceText);\r\n\t\t\t\tconst Sci::Position lengthChange = lastDifferenceMapped - firstDifference + 1;\r\n\t\t\t\tconst Sci::Position lengthInserted = pdoc->InsertString(\r\n\t\t\t\t\tcurrentNoVS.Start().Position() + firstDifference,\r\n\t\t\t\t\tsMapped.c_str() + firstDifference,\r\n\t\t\t\t\tlengthChange);\r\n\t\t\t\t// Automatic movement changes selection so reset to exactly the same as it was.\r\n\t\t\t\tconst Sci::Position diffSizes = sMapped.size() - sText.size() + lengthInserted - lengthChange;\r\n\t\t\t\tif (diffSizes != 0) {\r\n\t\t\t\t\tif (current.anchor > current.caret)\r\n\t\t\t\t\t\tcurrent.anchor.Add(diffSizes);\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tcurrent.caret.Add(diffSizes);\r\n\t\t\t\t}\r\n\t\t\t\tsel.Range(r) = current;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid Editor::LineTranspose() {\r\n\tconst Sci::Line line = pdoc->SciLineFromPosition(sel.MainCaret());\r\n\tif (line > 0) {\r\n\t\tUndoGroup ug(pdoc);\r\n\r\n\t\tconst Sci::Position startPrevious = pdoc->LineStart(line - 1);\r\n\t\tconst std::string linePrevious = RangeText(startPrevious, pdoc->LineEnd(line - 1));\r\n\r\n\t\tSci::Position startCurrent = pdoc->LineStart(line);\r\n\t\tconst std::string lineCurrent = RangeText(startCurrent, pdoc->LineEnd(line));\r\n\r\n\t\tpdoc->DeleteChars(startCurrent, lineCurrent.length());\r\n\t\tpdoc->DeleteChars(startPrevious, linePrevious.length());\r\n\t\tstartCurrent -= linePrevious.length();\r\n\r\n\t\tstartCurrent += pdoc->InsertString(startPrevious, lineCurrent);\r\n\t\tpdoc->InsertString(startCurrent, linePrevious);\r\n\t\t// Move caret to start of current line\r\n\t\tMovePositionTo(SelectionPosition(startCurrent));\r\n\t}\r\n}\r\n\r\nvoid Editor::LineReverse() {\r\n\tconst Sci::Line lineStart =\r\n\t\tpdoc->SciLineFromPosition(sel.RangeMain().Start().Position());\r\n\tconst Sci::Line lineEnd =\r\n\t\tpdoc->SciLineFromPosition(sel.RangeMain().End().Position()-1);\r\n\tconst Sci::Line lineDiff = lineEnd - lineStart;\r\n\tif (lineDiff <= 0)\r\n\t\treturn;\r\n\tUndoGroup ug(pdoc);\r\n\tfor (Sci::Line i=(lineDiff+1)/2-1; i>=0; --i) {\r\n\t\tconst Sci::Line lineNum2 = lineEnd - i;\r\n\t\tconst Sci::Line lineNum1 = lineStart + i;\r\n\t\tSci::Position lineStart2 = pdoc->LineStart(lineNum2);\r\n\t\tconst Sci::Position lineStart1 = pdoc->LineStart(lineNum1);\r\n\t\tconst std::string line2 = RangeText(lineStart2, pdoc->LineEnd(lineNum2));\r\n\t\tconst std::string line1 = RangeText(lineStart1, pdoc->LineEnd(lineNum1));\r\n\t\tconst Sci::Position lineLen2 = line2.length();\r\n\t\tconst Sci::Position lineLen1 = line1.length();\r\n\t\tpdoc->DeleteChars(lineStart2, lineLen2);\r\n\t\tpdoc->DeleteChars(lineStart1, lineLen1);\r\n\t\tlineStart2 -= lineLen1;\r\n\t\tpdoc->InsertString(lineStart2, line1);\r\n\t\tpdoc->InsertString(lineStart1, line2);\r\n\t}\r\n\t// Wholly select all affected lines\r\n\tsel.RangeMain() = SelectionRange(pdoc->LineStart(lineStart),\r\n\t\tpdoc->LineStart(lineEnd+1));\r\n}\r\n\r\nvoid Editor::Duplicate(bool forLine) {\r\n\tif (sel.Empty()) {\r\n\t\tforLine = true;\r\n\t}\r\n\tUndoGroup ug(pdoc);\r\n\tstd::string_view eol;\r\n\tif (forLine) {\r\n\t\teol = pdoc->EOLString();\r\n\t}\r\n\tfor (size_t r=0; r<sel.Count(); r++) {\r\n\t\tSelectionPosition start = sel.Range(r).Start();\r\n\t\tSelectionPosition end = sel.Range(r).End();\r\n\t\tif (forLine) {\r\n\t\t\tconst Sci::Line line = pdoc->SciLineFromPosition(sel.Range(r).caret.Position());\r\n\t\t\tstart = SelectionPosition(pdoc->LineStart(line));\r\n\t\t\tend = SelectionPosition(pdoc->LineEnd(line));\r\n\t\t}\r\n\t\tstd::string text = RangeText(start.Position(), end.Position());\r\n\t\tSci::Position lengthInserted = 0;\r\n\t\tif (forLine)\r\n\t\t\tlengthInserted = pdoc->InsertString(end.Position(), eol);\r\n\t\tpdoc->InsertString(end.Position() + lengthInserted, text);\r\n\t}\r\n\tif (sel.Count() && sel.IsRectangular()) {\r\n\t\tSelectionPosition last = sel.Last();\r\n\t\tif (forLine) {\r\n\t\t\tconst Sci::Line line = pdoc->SciLineFromPosition(last.Position());\r\n\t\t\tlast = SelectionPosition(last.Position() +\r\n\t\t\t\tpdoc->LineStart(line+1) - pdoc->LineStart(line));\r\n\t\t}\r\n\t\tif (sel.Rectangular().anchor > sel.Rectangular().caret)\r\n\t\t\tsel.Rectangular().anchor = last;\r\n\t\telse\r\n\t\t\tsel.Rectangular().caret = last;\r\n\t\tSetRectangularRange();\r\n\t}\r\n}\r\n\r\nvoid Editor::CancelModes() {\r\n\tsel.SetMoveExtends(false);\r\n}\r\n\r\nvoid Editor::NewLine() {\r\n\tInvalidateWholeSelection();\r\n\tif (sel.IsRectangular() || !additionalSelectionTyping) {\r\n\t\t// Remove non-main ranges\r\n\t\tsel.DropAdditionalRanges();\r\n\t}\r\n\r\n\tUndoGroup ug(pdoc, !sel.Empty() || (sel.Count() > 1));\r\n\r\n\t// Clear each range\r\n\tif (!sel.Empty()) {\r\n\t\tClearSelection();\r\n\t}\r\n\r\n\t// Insert each line end\r\n\tsize_t countInsertions = 0;\r\n\tconst std::string_view eol = pdoc->EOLString();\r\n\tfor (size_t r = 0; r < sel.Count(); r++) {\r\n\t\tsel.Range(r).ClearVirtualSpace();\r\n\t\tconst Sci::Position positionInsert = sel.Range(r).caret.Position();\r\n\t\tconst Sci::Position insertLength = pdoc->InsertString(positionInsert, eol);\r\n\t\tif (insertLength > 0) {\r\n\t\t\tsel.Range(r) = SelectionRange(positionInsert + insertLength);\r\n\t\t\tcountInsertions++;\r\n\t\t}\r\n\t}\r\n\r\n\t// Perform notifications after all the changes as the application may change the\r\n\t// selections in response to the characters.\r\n\tfor (size_t i = 0; i < countInsertions; i++) {\r\n\t\tfor (const char ch : eol) {\r\n\t\t\tNotifyChar(ch, CharacterSource::DirectInput);\r\n\t\t\tif (recordingMacro) {\r\n\t\t\t\tconst char txt[2] = { ch, '\\0' };\r\n\t\t\t\tNotifyMacroRecord(Message::ReplaceSel, 0, reinterpret_cast<sptr_t>(txt));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tSetLastXChosen();\r\n\tSetScrollBars();\r\n\tEnsureCaretVisible();\r\n\t// Avoid blinking during rapid typing:\r\n\tShowCaretAtCurrentPosition();\r\n}\r\n\r\nSelectionPosition Editor::PositionUpOrDown(SelectionPosition spStart, int direction, int lastX) {\r\n\tconst Point pt = LocationFromPosition(spStart);\r\n\tint skipLines = 0;\r\n\r\n\tif (vs.annotationVisible != AnnotationVisible::Hidden) {\r\n\t\tconst Sci::Line lineDoc = pdoc->SciLineFromPosition(spStart.Position());\r\n\t\tconst Point ptStartLine = LocationFromPosition(pdoc->LineStart(lineDoc));\r\n\t\tconst int subLine = static_cast<int>(pt.y - ptStartLine.y) / vs.lineHeight;\r\n\r\n\t\tif (direction < 0 && subLine == 0) {\r\n\t\t\tconst Sci::Line lineDisplay = pcs->DisplayFromDoc(lineDoc);\r\n\t\t\tif (lineDisplay > 0) {\r\n\t\t\t\tskipLines = pdoc->AnnotationLines(pcs->DocFromDisplay(lineDisplay - 1));\r\n\t\t\t}\r\n\t\t} else if (direction > 0 && subLine >= (pcs->GetHeight(lineDoc) - 1 - pdoc->AnnotationLines(lineDoc))) {\r\n\t\t\tskipLines = pdoc->AnnotationLines(lineDoc);\r\n\t\t}\r\n\t}\r\n\r\n\tconst Sci::Line newY = static_cast<Sci::Line>(pt.y) + (1 + skipLines) * direction * vs.lineHeight;\r\n\tif (lastX < 0) {\r\n\t\tlastX = static_cast<int>(pt.x) + xOffset;\r\n\t}\r\n\tSelectionPosition posNew = SPositionFromLocation(\r\n\t\tPoint::FromInts(lastX - xOffset, static_cast<int>(newY)), false, false, UserVirtualSpace());\r\n\r\n\tif (direction < 0) {\r\n\t\t// Line wrapping may lead to a location on the same line, so\r\n\t\t// seek back if that is the case.\r\n\t\tPoint ptNew = LocationFromPosition(posNew.Position());\r\n\t\twhile ((posNew.Position() > 0) && (pt.y == ptNew.y)) {\r\n\t\t\tposNew.Add(-1);\r\n\t\t\tposNew.SetVirtualSpace(0);\r\n\t\t\tptNew = LocationFromPosition(posNew.Position());\r\n\t\t}\r\n\t} else if (direction > 0 && posNew.Position() != pdoc->Length()) {\r\n\t\t// There is an equivalent case when moving down which skips\r\n\t\t// over a line.\r\n\t\tPoint ptNew = LocationFromPosition(posNew.Position());\r\n\t\twhile ((posNew.Position() > spStart.Position()) && (ptNew.y > newY)) {\r\n\t\t\tposNew.Add(-1);\r\n\t\t\tposNew.SetVirtualSpace(0);\r\n\t\t\tptNew = LocationFromPosition(posNew.Position());\r\n\t\t}\r\n\t}\r\n\treturn posNew;\r\n}\r\n\r\nvoid Editor::CursorUpOrDown(int direction, Selection::SelTypes selt) {\r\n\tif ((selt == Selection::SelTypes::none) && sel.MoveExtends()) {\r\n\t\tselt = !sel.IsRectangular() ? Selection::SelTypes::stream : Selection::SelTypes::rectangle;\r\n\t}\r\n\tSelectionPosition caretToUse = sel.RangeMain().caret;\r\n\tif (sel.IsRectangular()) {\r\n\t\tif (selt ==  Selection::SelTypes::none) {\r\n\t\t\tcaretToUse = (direction > 0) ? sel.Limits().end : sel.Limits().start;\r\n\t\t} else {\r\n\t\t\tcaretToUse = sel.Rectangular().caret;\r\n\t\t}\r\n\t}\r\n\tif (selt == Selection::SelTypes::rectangle) {\r\n\t\tconst SelectionRange rangeBase = sel.IsRectangular() ? sel.Rectangular() : sel.RangeMain();\r\n\t\tif (!sel.IsRectangular()) {\r\n\t\t\tInvalidateWholeSelection();\r\n\t\t\tsel.DropAdditionalRanges();\r\n\t\t}\r\n\t\tconst SelectionPosition posNew = MovePositionSoVisible(\r\n\t\t\tPositionUpOrDown(caretToUse, direction, lastXChosen), direction);\r\n\t\tsel.selType = Selection::SelTypes::rectangle;\r\n\t\tsel.Rectangular() = SelectionRange(posNew, rangeBase.anchor);\r\n\t\tSetRectangularRange();\r\n\t\tMovedCaret(posNew, caretToUse, true, caretPolicies);\r\n\t} else if (sel.selType == Selection::SelTypes::lines && sel.MoveExtends()) {\r\n\t\t// Calculate new caret position and call SetSelection(), which will ensure whole lines are selected.\r\n\t\tconst SelectionPosition posNew = MovePositionSoVisible(\r\n\t\t\tPositionUpOrDown(caretToUse, direction, -1), direction);\r\n\t\tSetSelection(posNew, sel.RangeMain().anchor);\r\n\t} else {\r\n\t\tInvalidateWholeSelection();\r\n\t\tif (!additionalSelectionTyping || (sel.IsRectangular())) {\r\n\t\t\tsel.DropAdditionalRanges();\r\n\t\t}\r\n\t\tsel.selType = Selection::SelTypes::stream;\r\n\t\tfor (size_t r = 0; r < sel.Count(); r++) {\r\n\t\t\tconst int lastX = (r == sel.Main()) ? lastXChosen : -1;\r\n\t\t\tconst SelectionPosition spCaretNow = sel.Range(r).caret;\r\n\t\t\tconst SelectionPosition posNew = MovePositionSoVisible(\r\n\t\t\t\tPositionUpOrDown(spCaretNow, direction, lastX), direction);\r\n\t\t\tsel.Range(r) = selt == Selection::SelTypes::stream ?\r\n\t\t\t\tSelectionRange(posNew, sel.Range(r).anchor) : SelectionRange(posNew);\r\n\t\t}\r\n\t\tsel.RemoveDuplicates();\r\n\t\tMovedCaret(sel.RangeMain().caret, caretToUse, true, caretPolicies);\r\n\t}\r\n}\r\n\r\nvoid Editor::ParaUpOrDown(int direction, Selection::SelTypes selt) {\r\n\tSci::Line lineDoc;\r\n\tconst Sci::Position savedPos = sel.MainCaret();\r\n\tdo {\r\n\t\tMovePositionTo(SelectionPosition(direction > 0 ? pdoc->ParaDown(sel.MainCaret()) : pdoc->ParaUp(sel.MainCaret())), selt);\r\n\t\tlineDoc = pdoc->SciLineFromPosition(sel.MainCaret());\r\n\t\tif (direction > 0) {\r\n\t\t\tif (sel.MainCaret() >= pdoc->Length() && !pcs->GetVisible(lineDoc)) {\r\n\t\t\t\tif (selt == Selection::SelTypes::none) {\r\n\t\t\t\t\tMovePositionTo(SelectionPosition(pdoc->LineEndPosition(savedPos)));\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t} while (!pcs->GetVisible(lineDoc));\r\n}\r\n\r\nRange Editor::RangeDisplayLine(Sci::Line lineVisible) {\r\n\tRefreshStyleData();\r\n\tAutoSurface surface(this);\r\n\treturn view.RangeDisplayLine(surface, *this, lineVisible, vs);\r\n}\r\n\r\nSci::Position Editor::StartEndDisplayLine(Sci::Position pos, bool start) {\r\n\tRefreshStyleData();\r\n\tAutoSurface surface(this);\r\n\tconst Sci::Position posRet = view.StartEndDisplayLine(surface, *this, pos, start, vs);\r\n\tif (posRet == Sci::invalidPosition) {\r\n\t\treturn pos;\r\n\t} else {\r\n\t\treturn posRet;\r\n\t}\r\n}\r\n\r\nnamespace {\r\n\r\nconstexpr short HighShortFromWParam(uptr_t x) {\r\n\treturn static_cast<short>(x >> 16);\r\n}\r\n\r\nconstexpr short LowShortFromWParam(uptr_t x) {\r\n\treturn static_cast<short>(x & 0xffff);\r\n}\r\n\r\nconstexpr Message WithExtends(Message iMessage) noexcept {\r\n\tswitch (iMessage) {\r\n\tcase Message::CharLeft: return Message::CharLeftExtend;\r\n\tcase Message::CharRight: return Message::CharRightExtend;\r\n\r\n\tcase Message::WordLeft: return Message::WordLeftExtend;\r\n\tcase Message::WordRight: return Message::WordRightExtend;\r\n\tcase Message::WordLeftEnd: return Message::WordLeftEndExtend;\r\n\tcase Message::WordRightEnd: return Message::WordRightEndExtend;\r\n\tcase Message::WordPartLeft: return Message::WordPartLeftExtend;\r\n\tcase Message::WordPartRight: return Message::WordPartRightExtend;\r\n\r\n\tcase Message::Home: return Message::HomeExtend;\r\n\tcase Message::HomeDisplay: return Message::HomeDisplayExtend;\r\n\tcase Message::HomeWrap: return Message::HomeWrapExtend;\r\n\tcase Message::VCHome: return Message::VCHomeExtend;\r\n\tcase Message::VCHomeDisplay: return Message::VCHomeDisplayExtend;\r\n\tcase Message::VCHomeWrap: return Message::VCHomeWrapExtend;\r\n\r\n\tcase Message::LineEnd: return Message::LineEndExtend;\r\n\tcase Message::LineEndDisplay: return Message::LineEndDisplayExtend;\r\n\tcase Message::LineEndWrap: return Message::LineEndWrapExtend;\r\n\r\n\tdefault:\treturn iMessage;\r\n\t}\r\n}\r\n\r\nconstexpr int NaturalDirection(Message iMessage) noexcept {\r\n\tswitch (iMessage) {\r\n\tcase Message::CharLeft:\r\n\tcase Message::CharLeftExtend:\r\n\tcase Message::CharLeftRectExtend:\r\n\tcase Message::WordLeft:\r\n\tcase Message::WordLeftExtend:\r\n\tcase Message::WordLeftEnd:\r\n\tcase Message::WordLeftEndExtend:\r\n\tcase Message::WordPartLeft:\r\n\tcase Message::WordPartLeftExtend:\r\n\tcase Message::Home:\r\n\tcase Message::HomeExtend:\r\n\tcase Message::HomeDisplay:\r\n\tcase Message::HomeDisplayExtend:\r\n\tcase Message::HomeWrap:\r\n\tcase Message::HomeWrapExtend:\r\n\t\t// VC_HOME* mostly goes back\r\n\tcase Message::VCHome:\r\n\tcase Message::VCHomeExtend:\r\n\tcase Message::VCHomeDisplay:\r\n\tcase Message::VCHomeDisplayExtend:\r\n\tcase Message::VCHomeWrap:\r\n\tcase Message::VCHomeWrapExtend:\r\n\t\treturn -1;\r\n\r\n\tdefault:\r\n\t\treturn 1;\r\n\t}\r\n}\r\n\r\nconstexpr bool IsRectExtend(Message iMessage, bool isRectMoveExtends) noexcept {\r\n\tswitch (iMessage) {\r\n\tcase Message::CharLeftRectExtend:\r\n\tcase Message::CharRightRectExtend:\r\n\tcase Message::HomeRectExtend:\r\n\tcase Message::VCHomeRectExtend:\r\n\tcase Message::LineEndRectExtend:\r\n\t\treturn true;\r\n\tdefault:\r\n\t\tif (isRectMoveExtends) {\r\n\t\t\t// Handle Message::SetSelectionMode(SelectionMode::Rectangle) and subsequent movements.\r\n\t\t\tswitch (iMessage) {\r\n\t\t\tcase Message::CharLeftExtend:\r\n\t\t\tcase Message::CharRightExtend:\r\n\t\t\tcase Message::HomeExtend:\r\n\t\t\tcase Message::VCHomeExtend:\r\n\t\t\tcase Message::LineEndExtend:\r\n\t\t\t\treturn true;\r\n\t\t\tdefault:\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n}\r\n\r\n}\r\n\r\nSci::Position Editor::HomeWrapPosition(Sci::Position position) {\r\n\tconst Sci::Position viewLineStart = StartEndDisplayLine(position, true);\r\n\tconst Sci::Position homePos = MovePositionSoVisible(viewLineStart, -1).Position();\r\n\tif (position <= homePos)\r\n\t\treturn pdoc->LineStartPosition(position);\r\n\treturn homePos;\r\n}\r\n\r\nSci::Position Editor::VCHomeDisplayPosition(Sci::Position position) {\r\n\tconst Sci::Position homePos = pdoc->VCHomePosition(position);\r\n\tconst Sci::Position viewLineStart = StartEndDisplayLine(position, true);\r\n\tif (viewLineStart > homePos)\r\n\t\treturn viewLineStart;\r\n\telse\r\n\t\treturn homePos;\r\n}\r\n\r\nSci::Position Editor::VCHomeWrapPosition(Sci::Position position) {\r\n\tconst Sci::Position homePos = pdoc->VCHomePosition(position);\r\n\tconst Sci::Position viewLineStart = StartEndDisplayLine(position, true);\r\n\tif ((viewLineStart < position) && (viewLineStart > homePos))\r\n\t\treturn viewLineStart;\r\n\telse\r\n\t\treturn homePos;\r\n}\r\n\r\nSci::Position Editor::LineEndWrapPosition(Sci::Position position) {\r\n\tconst Sci::Position endPos = StartEndDisplayLine(position, false);\r\n\tconst Sci::Position realEndPos = pdoc->LineEndPosition(position);\r\n\tif (endPos > realEndPos      // if moved past visible EOLs\r\n\t\t|| position >= endPos) // if at end of display line already\r\n\t\treturn realEndPos;\r\n\telse\r\n\t\treturn endPos;\r\n}\r\n\r\nSelectionPosition Editor::PositionMove(Message iMessage, SelectionPosition spCaret) {\r\n\tswitch (iMessage) {\r\n\tcase Message::CharLeft:\r\n\tcase Message::CharLeftExtend:\r\n\t\tif (spCaret.VirtualSpace()) {\r\n\t\t\tspCaret.AddVirtualSpace(-1);\r\n\t\t} else if (!FlagSet(virtualSpaceOptions, VirtualSpace::NoWrapLineStart) || pdoc->GetColumn(spCaret.Position()) > 0) {\r\n\t\t\tspCaret.Add(-1);\r\n\t\t}\r\n\t\treturn spCaret;\r\n\tcase Message::CharRight:\r\n\tcase Message::CharRightExtend:\r\n\t\tif (FlagSet(virtualSpaceOptions, VirtualSpace::UserAccessible) && pdoc->IsLineEndPosition(spCaret.Position())) {\r\n\t\t\tspCaret.AddVirtualSpace(1);\r\n\t\t} else {\r\n\t\t\tspCaret.Add(1);\r\n\t\t}\r\n\t\treturn spCaret;\r\n\tcase Message::WordLeft:\r\n\tcase Message::WordLeftExtend:\r\n\t\treturn SelectionPosition(pdoc->NextWordStart(spCaret.Position(), -1));\r\n\tcase Message::WordRight:\r\n\tcase Message::WordRightExtend:\r\n\t\treturn SelectionPosition(pdoc->NextWordStart(spCaret.Position(), 1));\r\n\tcase Message::WordLeftEnd:\r\n\tcase Message::WordLeftEndExtend:\r\n\t\treturn SelectionPosition(pdoc->NextWordEnd(spCaret.Position(), -1));\r\n\tcase Message::WordRightEnd:\r\n\tcase Message::WordRightEndExtend:\r\n\t\treturn SelectionPosition(pdoc->NextWordEnd(spCaret.Position(), 1));\r\n\tcase Message::WordPartLeft:\r\n\tcase Message::WordPartLeftExtend:\r\n\t\treturn SelectionPosition(pdoc->WordPartLeft(spCaret.Position()));\r\n\tcase Message::WordPartRight:\r\n\tcase Message::WordPartRightExtend:\r\n\t\treturn SelectionPosition(pdoc->WordPartRight(spCaret.Position()));\r\n\tcase Message::Home:\r\n\tcase Message::HomeExtend:\r\n\t\treturn SelectionPosition(pdoc->LineStartPosition(spCaret.Position()));\r\n\tcase Message::HomeDisplay:\r\n\tcase Message::HomeDisplayExtend:\r\n\t\treturn SelectionPosition(StartEndDisplayLine(spCaret.Position(), true));\r\n\tcase Message::HomeWrap:\r\n\tcase Message::HomeWrapExtend:\r\n\t\treturn SelectionPosition(HomeWrapPosition(spCaret.Position()));\r\n\tcase Message::VCHome:\r\n\tcase Message::VCHomeExtend:\r\n\t\t// VCHome alternates between beginning of line and beginning of text so may move back or forwards\r\n\t\treturn SelectionPosition(pdoc->VCHomePosition(spCaret.Position()));\r\n\tcase Message::VCHomeDisplay:\r\n\tcase Message::VCHomeDisplayExtend:\r\n\t\treturn SelectionPosition(VCHomeDisplayPosition(spCaret.Position()));\r\n\tcase Message::VCHomeWrap:\r\n\tcase Message::VCHomeWrapExtend:\r\n\t\treturn SelectionPosition(VCHomeWrapPosition(spCaret.Position()));\r\n\tcase Message::LineEnd:\r\n\tcase Message::LineEndExtend:\r\n\t\treturn SelectionPosition(pdoc->LineEndPosition(spCaret.Position()));\r\n\tcase Message::LineEndDisplay:\r\n\tcase Message::LineEndDisplayExtend:\r\n\t\treturn SelectionPosition(StartEndDisplayLine(spCaret.Position(), false));\r\n\tcase Message::LineEndWrap:\r\n\tcase Message::LineEndWrapExtend:\r\n\t\treturn SelectionPosition(LineEndWrapPosition(spCaret.Position()));\r\n\r\n\tdefault:\r\n\t\tbreak;\r\n\t}\r\n\t// Above switch should be exhaustive so this will never be reached.\r\n\tPLATFORM_ASSERT(false);\r\n\treturn spCaret;\r\n}\r\n\r\nSelectionRange Editor::SelectionMove(Scintilla::Message iMessage, size_t r) {\r\n\tconst SelectionPosition spCaretStart = sel.Range(r).caret;\r\n\tconst SelectionPosition spCaretMoved = PositionMove(iMessage, spCaretStart);\r\n\r\n\tconst int directionMove = (spCaretMoved < spCaretStart) ? -1 : 1;\r\n\tconst SelectionPosition spCaret = MovePositionSoVisible(spCaretMoved, directionMove);\r\n\r\n\t// Handle move versus extend, and special behaviour for non-empty left/right\r\n\tswitch (iMessage) {\r\n\tcase Message::CharLeft:\r\n\tcase Message::CharRight:\r\n\t\tif (sel.Range(r).Empty()) {\r\n\t\t\treturn SelectionRange(spCaret);\r\n\t\t}\r\n\t\tif (iMessage == Message::CharLeft) {\r\n\t\t\treturn SelectionRange(sel.Range(r).Start());\r\n\t\t}\r\n\t\treturn SelectionRange(sel.Range(r).End());\r\n\r\n\tcase Message::WordLeft:\r\n\tcase Message::WordRight:\r\n\tcase Message::WordLeftEnd:\r\n\tcase Message::WordRightEnd:\r\n\tcase Message::WordPartLeft:\r\n\tcase Message::WordPartRight:\r\n\tcase Message::Home:\r\n\tcase Message::HomeDisplay:\r\n\tcase Message::HomeWrap:\r\n\tcase Message::VCHome:\r\n\tcase Message::VCHomeDisplay:\r\n\tcase Message::VCHomeWrap:\r\n\tcase Message::LineEnd:\r\n\tcase Message::LineEndDisplay:\r\n\tcase Message::LineEndWrap:\r\n\t\treturn SelectionRange(spCaret);\r\n\r\n\tdefault:\r\n\t\tbreak;\r\n\t}\r\n\r\n\t// All remaining cases are *Extend\r\n\tconst SelectionRange rangeNew = SelectionRange(spCaret, sel.Range(r).anchor);\r\n\tsel.TrimOtherSelections(r, rangeNew);\r\n\treturn rangeNew;\r\n}\r\n\r\nint Editor::HorizontalMove(Message iMessage) {\r\n\tif (sel.selType == Selection::SelTypes::lines) {\r\n\t\treturn 0; // horizontal moves with line selection have no effect\r\n\t}\r\n\tif (sel.MoveExtends()) {\r\n\t\tiMessage = WithExtends(iMessage);\r\n\t}\r\n\r\n\tif (!multipleSelection && !sel.IsRectangular()) {\r\n\t\t// Simplify selection down to 1\r\n\t\tsel.SetSelection(sel.RangeMain());\r\n\t}\r\n\r\n\t// Invalidate each of the current selections\r\n\tInvalidateWholeSelection();\r\n\r\n\tif (IsRectExtend(iMessage, sel.IsRectangular() && sel.MoveExtends())) {\r\n\t\tconst SelectionRange rangeBase = sel.IsRectangular() ? sel.Rectangular() : sel.RangeMain();\r\n\t\tif (!sel.IsRectangular()) {\r\n\t\t\tsel.DropAdditionalRanges();\r\n\t\t}\r\n\t\t// Will change to rectangular if not currently rectangular\r\n\t\tSelectionPosition spCaret = rangeBase.caret;\r\n\t\tswitch (iMessage) {\r\n\t\tcase Message::CharLeftRectExtend:\r\n\t\tcase Message::CharLeftExtend: // only when sel.IsRectangular() && sel.MoveExtends()\r\n\t\t\tif (pdoc->IsLineEndPosition(spCaret.Position()) && spCaret.VirtualSpace()) {\r\n\t\t\t\tspCaret.SetVirtualSpace(spCaret.VirtualSpace() - 1);\r\n\t\t\t} else if (!FlagSet(virtualSpaceOptions, VirtualSpace::NoWrapLineStart) || pdoc->GetColumn(spCaret.Position()) > 0) {\r\n\t\t\t\tspCaret = SelectionPosition(spCaret.Position() - 1);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase Message::CharRightRectExtend:\r\n\t\tcase Message::CharRightExtend: // only when sel.IsRectangular() && sel.MoveExtends()\r\n\t\t\tif (FlagSet(virtualSpaceOptions, VirtualSpace::RectangularSelection) && pdoc->IsLineEndPosition(sel.MainCaret())) {\r\n\t\t\t\tspCaret.SetVirtualSpace(spCaret.VirtualSpace() + 1);\r\n\t\t\t} else {\r\n\t\t\t\tspCaret = SelectionPosition(spCaret.Position() + 1);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase Message::HomeRectExtend:\r\n\t\tcase Message::HomeExtend: // only when sel.IsRectangular() && sel.MoveExtends()\r\n\t\t\tspCaret = SelectionPosition(pdoc->LineStartPosition(spCaret.Position()));\r\n\t\t\tbreak;\r\n\t\tcase Message::VCHomeRectExtend:\r\n\t\tcase Message::VCHomeExtend: // only when sel.IsRectangular() && sel.MoveExtends()\r\n\t\t\tspCaret = SelectionPosition(pdoc->VCHomePosition(spCaret.Position()));\r\n\t\t\tbreak;\r\n\t\tcase Message::LineEndRectExtend:\r\n\t\tcase Message::LineEndExtend: // only when sel.IsRectangular() && sel.MoveExtends()\r\n\t\t\tspCaret = SelectionPosition(pdoc->LineEndPosition(spCaret.Position()));\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tconst int directionMove = (spCaret < rangeBase.caret) ? -1 : 1;\r\n\t\tspCaret = MovePositionSoVisible(spCaret, directionMove);\r\n\t\tsel.selType = Selection::SelTypes::rectangle;\r\n\t\tsel.Rectangular() = SelectionRange(spCaret, rangeBase.anchor);\r\n\t\tSetRectangularRange();\r\n\t} else if (sel.IsRectangular()) {\r\n\t\t// Not a rectangular extension so switch to stream.\r\n\t\tSelectionPosition selAtLimit = (NaturalDirection(iMessage) > 0) ? sel.Limits().end : sel.Limits().start;\r\n\t\tswitch (iMessage) {\r\n\t\tcase Message::Home:\r\n\t\t\tselAtLimit = SelectionPosition(pdoc->LineStartPosition(selAtLimit.Position()));\r\n\t\t\tbreak;\r\n\t\tcase Message::VCHome:\r\n\t\t\tselAtLimit = SelectionPosition(pdoc->VCHomePosition(selAtLimit.Position()));\r\n\t\t\tbreak;\r\n\t\tcase Message::LineEnd:\r\n\t\t\tselAtLimit = SelectionPosition(pdoc->LineEndPosition(selAtLimit.Position()));\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tsel.selType = Selection::SelTypes::stream;\r\n\t\tsel.SetSelection(SelectionRange(selAtLimit));\r\n\t} else {\r\n\t\tif (!additionalSelectionTyping) {\r\n\t\t\tInvalidateWholeSelection();\r\n\t\t\tsel.DropAdditionalRanges();\r\n\t\t}\r\n\t\tfor (size_t r = 0; r < sel.Count(); r++) {\r\n\t\t\tsel.Range(r) = SelectionMove(iMessage, r);\r\n\t\t}\r\n\t}\r\n\r\n\tsel.RemoveDuplicates();\r\n\r\n\tMovedCaret(sel.RangeMain().caret, SelectionPosition(Sci::invalidPosition), true, caretPolicies);\r\n\r\n\t// Invalidate the new state of the selection\r\n\tInvalidateWholeSelection();\r\n\r\n\tSetLastXChosen();\r\n\t// Need the line moving and so forth from MovePositionTo\r\n\treturn 0;\r\n}\r\n\r\nint Editor::DelWordOrLine(Message iMessage) {\r\n\t// Virtual space may be realised for Message::DelWordRight or Message::DelWordRightEnd\r\n\t// which means 2 actions so wrap in an undo group.\r\n\r\n\t// Rightwards and leftwards deletions differ in treatment of virtual space.\r\n\t// Clear virtual space for leftwards, realise for rightwards.\r\n\tconst bool leftwards = (iMessage == Message::DelWordLeft) || (iMessage == Message::DelLineLeft);\r\n\r\n\tif (!additionalSelectionTyping) {\r\n\t\tInvalidateWholeSelection();\r\n\t\tsel.DropAdditionalRanges();\r\n\t}\r\n\r\n\tUndoGroup ug0(pdoc, (sel.Count() > 1) || !leftwards);\r\n\r\n\tfor (size_t r = 0; r < sel.Count(); r++) {\r\n\t\tif (leftwards) {\r\n\t\t\t// Delete to the left so first clear the virtual space.\r\n\t\t\tsel.Range(r).ClearVirtualSpace();\r\n\t\t} else {\r\n\t\t\t// Delete to the right so first realise the virtual space.\r\n\t\t\tsel.Range(r) = SelectionRange(\r\n\t\t\t\tRealizeVirtualSpace(sel.Range(r).caret));\r\n\t\t}\r\n\r\n\t\tRange rangeDelete;\r\n\t\tswitch (iMessage) {\r\n\t\tcase Message::DelWordLeft:\r\n\t\t\trangeDelete = Range(\r\n\t\t\t\tpdoc->NextWordStart(sel.Range(r).caret.Position(), -1),\r\n\t\t\t\tsel.Range(r).caret.Position());\r\n\t\t\tbreak;\r\n\t\tcase Message::DelWordRight:\r\n\t\t\trangeDelete = Range(\r\n\t\t\t\tsel.Range(r).caret.Position(),\r\n\t\t\t\tpdoc->NextWordStart(sel.Range(r).caret.Position(), 1));\r\n\t\t\tbreak;\r\n\t\tcase Message::DelWordRightEnd:\r\n\t\t\trangeDelete = Range(\r\n\t\t\t\tsel.Range(r).caret.Position(),\r\n\t\t\t\tpdoc->NextWordEnd(sel.Range(r).caret.Position(), 1));\r\n\t\t\tbreak;\r\n\t\tcase Message::DelLineLeft:\r\n\t\t\trangeDelete = Range(\r\n\t\t\t\tpdoc->LineStartPosition(sel.Range(r).caret.Position()),\r\n\t\t\t\tsel.Range(r).caret.Position());\r\n\t\t\tbreak;\r\n\t\tcase Message::DelLineRight:\r\n\t\t\trangeDelete = Range(\r\n\t\t\t\tsel.Range(r).caret.Position(),\r\n\t\t\t\tpdoc->LineEndPosition(sel.Range(r).caret.Position()));\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tif (!RangeContainsProtected(rangeDelete.start, rangeDelete.end)) {\r\n\t\t\tpdoc->DeleteChars(rangeDelete.start, rangeDelete.end - rangeDelete.start);\r\n\t\t}\r\n\t}\r\n\r\n\t// May need something stronger here: can selections overlap at this point?\r\n\tsel.RemoveDuplicates();\r\n\r\n\tMovedCaret(sel.RangeMain().caret, SelectionPosition(Sci::invalidPosition), true, caretPolicies);\r\n\r\n\t// Invalidate the new state of the selection\r\n\tInvalidateWholeSelection();\r\n\r\n\tSetLastXChosen();\r\n\treturn 0;\r\n}\r\n\r\nint Editor::KeyCommand(Message iMessage) {\r\n\tswitch (iMessage) {\r\n\tcase Message::LineDown:\r\n\t\tCursorUpOrDown(1, Selection::SelTypes::none);\r\n\t\tbreak;\r\n\tcase Message::LineDownExtend:\r\n\t\tCursorUpOrDown(1, Selection::SelTypes::stream);\r\n\t\tbreak;\r\n\tcase Message::LineDownRectExtend:\r\n\t\tCursorUpOrDown(1, Selection::SelTypes::rectangle);\r\n\t\tbreak;\r\n\tcase Message::ParaDown:\r\n\t\tParaUpOrDown(1, Selection::SelTypes::none);\r\n\t\tbreak;\r\n\tcase Message::ParaDownExtend:\r\n\t\tParaUpOrDown(1, Selection::SelTypes::stream);\r\n\t\tbreak;\r\n\tcase Message::LineScrollDown:\r\n\t\tScrollTo(topLine + 1);\r\n\t\tMoveCaretInsideView(false);\r\n\t\tbreak;\r\n\tcase Message::LineUp:\r\n\t\tCursorUpOrDown(-1, Selection::SelTypes::none);\r\n\t\tbreak;\r\n\tcase Message::LineUpExtend:\r\n\t\tCursorUpOrDown(-1, Selection::SelTypes::stream);\r\n\t\tbreak;\r\n\tcase Message::LineUpRectExtend:\r\n\t\tCursorUpOrDown(-1, Selection::SelTypes::rectangle);\r\n\t\tbreak;\r\n\tcase Message::ParaUp:\r\n\t\tParaUpOrDown(-1, Selection::SelTypes::none);\r\n\t\tbreak;\r\n\tcase Message::ParaUpExtend:\r\n\t\tParaUpOrDown(-1, Selection::SelTypes::stream);\r\n\t\tbreak;\r\n\tcase Message::LineScrollUp:\r\n\t\tScrollTo(topLine - 1);\r\n\t\tMoveCaretInsideView(false);\r\n\t\tbreak;\r\n\r\n\tcase Message::CharLeft:\r\n\tcase Message::CharLeftExtend:\r\n\tcase Message::CharLeftRectExtend:\r\n\tcase Message::CharRight:\r\n\tcase Message::CharRightExtend:\r\n\tcase Message::CharRightRectExtend:\r\n\tcase Message::WordLeft:\r\n\tcase Message::WordLeftExtend:\r\n\tcase Message::WordRight:\r\n\tcase Message::WordRightExtend:\r\n\tcase Message::WordLeftEnd:\r\n\tcase Message::WordLeftEndExtend:\r\n\tcase Message::WordRightEnd:\r\n\tcase Message::WordRightEndExtend:\r\n\tcase Message::WordPartLeft:\r\n\tcase Message::WordPartLeftExtend:\r\n\tcase Message::WordPartRight:\r\n\tcase Message::WordPartRightExtend:\r\n\tcase Message::Home:\r\n\tcase Message::HomeExtend:\r\n\tcase Message::HomeRectExtend:\r\n\tcase Message::HomeDisplay:\r\n\tcase Message::HomeDisplayExtend:\r\n\tcase Message::HomeWrap:\r\n\tcase Message::HomeWrapExtend:\r\n\tcase Message::VCHome:\r\n\tcase Message::VCHomeExtend:\r\n\tcase Message::VCHomeRectExtend:\r\n\tcase Message::VCHomeDisplay:\r\n\tcase Message::VCHomeDisplayExtend:\r\n\tcase Message::VCHomeWrap:\r\n\tcase Message::VCHomeWrapExtend:\r\n\tcase Message::LineEnd:\r\n\tcase Message::LineEndExtend:\r\n\tcase Message::LineEndRectExtend:\r\n\tcase Message::LineEndDisplay:\r\n\tcase Message::LineEndDisplayExtend:\r\n\tcase Message::LineEndWrap:\r\n\tcase Message::LineEndWrapExtend:\r\n\t\treturn HorizontalMove(iMessage);\r\n\r\n\tcase Message::DocumentStart:\r\n\t\tMovePositionTo(0);\r\n\t\tSetLastXChosen();\r\n\t\tbreak;\r\n\tcase Message::DocumentStartExtend:\r\n\t\tMovePositionTo(0, Selection::SelTypes::stream);\r\n\t\tSetLastXChosen();\r\n\t\tbreak;\r\n\tcase Message::DocumentEnd:\r\n\t\tMovePositionTo(pdoc->Length());\r\n\t\tSetLastXChosen();\r\n\t\tbreak;\r\n\tcase Message::DocumentEndExtend:\r\n\t\tMovePositionTo(pdoc->Length(), Selection::SelTypes::stream);\r\n\t\tSetLastXChosen();\r\n\t\tbreak;\r\n\tcase Message::StutteredPageUp:\r\n\t\tPageMove(-1, Selection::SelTypes::none, true);\r\n\t\tbreak;\r\n\tcase Message::StutteredPageUpExtend:\r\n\t\tPageMove(-1, Selection::SelTypes::stream, true);\r\n\t\tbreak;\r\n\tcase Message::StutteredPageDown:\r\n\t\tPageMove(1, Selection::SelTypes::none, true);\r\n\t\tbreak;\r\n\tcase Message::StutteredPageDownExtend:\r\n\t\tPageMove(1, Selection::SelTypes::stream, true);\r\n\t\tbreak;\r\n\tcase Message::PageUp:\r\n\t\tPageMove(-1);\r\n\t\tbreak;\r\n\tcase Message::PageUpExtend:\r\n\t\tPageMove(-1, Selection::SelTypes::stream);\r\n\t\tbreak;\r\n\tcase Message::PageUpRectExtend:\r\n\t\tPageMove(-1, Selection::SelTypes::rectangle);\r\n\t\tbreak;\r\n\tcase Message::PageDown:\r\n\t\tPageMove(1);\r\n\t\tbreak;\r\n\tcase Message::PageDownExtend:\r\n\t\tPageMove(1, Selection::SelTypes::stream);\r\n\t\tbreak;\r\n\tcase Message::PageDownRectExtend:\r\n\t\tPageMove(1, Selection::SelTypes::rectangle);\r\n\t\tbreak;\r\n\tcase Message::EditToggleOvertype:\r\n\t\tinOverstrike = !inOverstrike;\r\n\t\tContainerNeedsUpdate(Update::Selection);\r\n\t\tShowCaretAtCurrentPosition();\r\n\t\tSetIdle(true);\r\n\t\tbreak;\r\n\tcase Message::Cancel:            \t// Cancel any modes - handled in subclass\r\n\t\t// Also unselect text\r\n\t\tCancelModes();\r\n\t\tif ((sel.Count() > 1) && !sel.IsRectangular()) {\r\n\t\t\t// Drop additional selections\r\n\t\t\tInvalidateWholeSelection();\r\n\t\t\tsel.DropAdditionalRanges();\r\n\t\t}\r\n\t\tbreak;\r\n\tcase Message::DeleteBack:\r\n\t\tDelCharBack(true);\r\n\t\tif ((caretSticky == CaretSticky::Off) || (caretSticky == CaretSticky::WhiteSpace)) {\r\n\t\t\tSetLastXChosen();\r\n\t\t}\r\n\t\tEnsureCaretVisible();\r\n\t\tbreak;\r\n\tcase Message::DeleteBackNotLine:\r\n\t\tDelCharBack(false);\r\n\t\tif ((caretSticky == CaretSticky::Off) || (caretSticky == CaretSticky::WhiteSpace)) {\r\n\t\t\tSetLastXChosen();\r\n\t\t}\r\n\t\tEnsureCaretVisible();\r\n\t\tbreak;\r\n\tcase Message::Tab:\r\n\t\tIndent(true);\r\n\t\tif (caretSticky == CaretSticky::Off) {\r\n\t\t\tSetLastXChosen();\r\n\t\t}\r\n\t\tEnsureCaretVisible();\r\n\t\tShowCaretAtCurrentPosition();\t\t// Avoid blinking\r\n\t\tbreak;\r\n\tcase Message::BackTab:\r\n\t\tIndent(false);\r\n\t\tif ((caretSticky == CaretSticky::Off) || (caretSticky == CaretSticky::WhiteSpace)) {\r\n\t\t\tSetLastXChosen();\r\n\t\t}\r\n\t\tEnsureCaretVisible();\r\n\t\tShowCaretAtCurrentPosition();\t\t// Avoid blinking\r\n\t\tbreak;\r\n\tcase Message::NewLine:\r\n\t\tNewLine();\r\n\t\tbreak;\r\n\tcase Message::FormFeed:\r\n\t\tAddChar('\\f');\r\n\t\tbreak;\r\n\tcase Message::ZoomIn:\r\n\t\tif (vs.zoomLevel < 20) {\r\n\t\t\tvs.zoomLevel++;\r\n\t\t\tInvalidateStyleRedraw();\r\n\t\t\tNotifyZoom();\r\n\t\t}\r\n\t\tbreak;\r\n\tcase Message::ZoomOut:\r\n\t\tif (vs.zoomLevel > -10) {\r\n\t\t\tvs.zoomLevel--;\r\n\t\t\tInvalidateStyleRedraw();\r\n\t\t\tNotifyZoom();\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::DelWordLeft:\r\n\tcase Message::DelWordRight:\r\n\tcase Message::DelWordRightEnd:\r\n\tcase Message::DelLineLeft:\r\n\tcase Message::DelLineRight:\r\n\t\treturn DelWordOrLine(iMessage);\r\n\r\n\tcase Message::LineCopy: {\r\n\t\t\tconst Sci::Line lineStart = pdoc->SciLineFromPosition(SelectionStart().Position());\r\n\t\t\tconst Sci::Line lineEnd = pdoc->SciLineFromPosition(SelectionEnd().Position());\r\n\t\t\tCopyRangeToClipboard(pdoc->LineStart(lineStart),\r\n\t\t\t\tpdoc->LineStart(lineEnd + 1));\r\n\t\t}\r\n\t\tbreak;\r\n\tcase Message::LineCut: {\r\n\t\t\tconst Sci::Line lineStart = pdoc->SciLineFromPosition(SelectionStart().Position());\r\n\t\t\tconst Sci::Line lineEnd = pdoc->SciLineFromPosition(SelectionEnd().Position());\r\n\t\t\tconst Sci::Position start = pdoc->LineStart(lineStart);\r\n\t\t\tconst Sci::Position end = pdoc->LineStart(lineEnd + 1);\r\n\t\t\tSetSelection(start, end);\r\n\t\t\tCut();\r\n\t\t\tSetLastXChosen();\r\n\t\t}\r\n\t\tbreak;\r\n\tcase Message::LineDelete: {\r\n\t\t\tconst Sci::Line line = pdoc->SciLineFromPosition(sel.MainCaret());\r\n\t\t\tconst Sci::Position start = pdoc->LineStart(line);\r\n\t\t\tconst Sci::Position end = pdoc->LineStart(line + 1);\r\n\t\t\tpdoc->DeleteChars(start, end - start);\r\n\t\t}\r\n\t\tbreak;\r\n\tcase Message::LineTranspose:\r\n\t\tLineTranspose();\r\n\t\tbreak;\r\n\tcase Message::LineReverse:\r\n\t\tLineReverse();\r\n\t\tbreak;\r\n\tcase Message::LineDuplicate:\r\n\t\tDuplicate(true);\r\n\t\tbreak;\r\n\tcase Message::SelectionDuplicate:\r\n\t\tDuplicate(false);\r\n\t\tbreak;\r\n\tcase Message::LowerCase:\r\n\t\tChangeCaseOfSelection(CaseMapping::lower);\r\n\t\tbreak;\r\n\tcase Message::UpperCase:\r\n\t\tChangeCaseOfSelection(CaseMapping::upper);\r\n\t\tbreak;\r\n\tcase Message::ScrollToStart:\r\n\t\tScrollTo(0);\r\n\t\tbreak;\r\n\tcase Message::ScrollToEnd:\r\n\t\tScrollTo(MaxScrollPos());\r\n\t\tbreak;\r\n\tdefault:\r\n\t\tbreak;\r\n\t}\r\n\treturn 0;\r\n}\r\n\r\nint Editor::KeyDefault(Keys, KeyMod) {\r\n\treturn 0;\r\n}\r\n\r\nint Editor::KeyDownWithModifiers(Keys key, KeyMod modifiers, bool *consumed) {\r\n\tDwellEnd(false);\r\n\tconst Message msg = kmap.Find(key, modifiers);\r\n\tif (msg != static_cast<Message>(0)) {\r\n\t\tif (consumed)\r\n\t\t\t*consumed = true;\r\n\t\treturn static_cast<int>(WndProc(msg, 0, 0));\r\n\t} else {\r\n\t\tif (consumed)\r\n\t\t\t*consumed = false;\r\n\t\treturn KeyDefault(key, modifiers);\r\n\t}\r\n}\r\n\r\nvoid Editor::Indent(bool forwards) {\r\n\tUndoGroup ug(pdoc);\r\n\tfor (size_t r=0; r<sel.Count(); r++) {\r\n\t\tconst Sci::Line lineOfAnchor =\r\n\t\t\tpdoc->SciLineFromPosition(sel.Range(r).anchor.Position());\r\n\t\tSci::Position caretPosition = sel.Range(r).caret.Position();\r\n\t\tconst Sci::Line lineCurrentPos = pdoc->SciLineFromPosition(caretPosition);\r\n\t\tif (lineOfAnchor == lineCurrentPos) {\r\n\t\t\tif (forwards) {\r\n\t\t\t\tpdoc->DeleteChars(sel.Range(r).Start().Position(), sel.Range(r).Length());\r\n\t\t\t\tcaretPosition = sel.Range(r).caret.Position();\r\n\t\t\t\tif (pdoc->GetColumn(caretPosition) <= pdoc->GetColumn(pdoc->GetLineIndentPosition(lineCurrentPos)) &&\r\n\t\t\t\t\t\tpdoc->tabIndents) {\r\n\t\t\t\t\tconst int indentation = pdoc->GetLineIndentation(lineCurrentPos);\r\n\t\t\t\t\tconst int indentationStep = pdoc->IndentSize();\r\n\t\t\t\t\tconst Sci::Position posSelect = pdoc->SetLineIndentation(\r\n\t\t\t\t\t\tlineCurrentPos, indentation + indentationStep - indentation % indentationStep);\r\n\t\t\t\t\tsel.Range(r) = SelectionRange(posSelect);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (pdoc->useTabs) {\r\n\t\t\t\t\t\tconst Sci::Position lengthInserted = pdoc->InsertString(caretPosition, \"\\t\", 1);\r\n\t\t\t\t\t\tsel.Range(r) = SelectionRange(caretPosition + lengthInserted);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tint numSpaces = (pdoc->tabInChars) -\r\n\t\t\t\t\t\t\t\t(pdoc->GetColumn(caretPosition) % (pdoc->tabInChars));\r\n\t\t\t\t\t\tif (numSpaces < 1)\r\n\t\t\t\t\t\t\tnumSpaces = pdoc->tabInChars;\r\n\t\t\t\t\t\tconst std::string spaceText(numSpaces, ' ');\r\n\t\t\t\t\t\tconst Sci::Position lengthInserted = pdoc->InsertString(caretPosition, spaceText);\r\n\t\t\t\t\t\tsel.Range(r) = SelectionRange(caretPosition + lengthInserted);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (pdoc->GetColumn(caretPosition) <= pdoc->GetLineIndentation(lineCurrentPos) &&\r\n\t\t\t\t\t\tpdoc->tabIndents) {\r\n\t\t\t\t\tconst int indentation = pdoc->GetLineIndentation(lineCurrentPos);\r\n\t\t\t\t\tconst int indentationStep = pdoc->IndentSize();\r\n\t\t\t\t\tconst Sci::Position posSelect = pdoc->SetLineIndentation(lineCurrentPos, indentation - indentationStep);\r\n\t\t\t\t\tsel.Range(r) = SelectionRange(posSelect);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tSci::Position newColumn = ((pdoc->GetColumn(caretPosition) - 1) / pdoc->tabInChars) *\r\n\t\t\t\t\t\t\tpdoc->tabInChars;\r\n\t\t\t\t\tif (newColumn < 0)\r\n\t\t\t\t\t\tnewColumn = 0;\r\n\t\t\t\t\tSci::Position newPos = caretPosition;\r\n\t\t\t\t\twhile (pdoc->GetColumn(newPos) > newColumn)\r\n\t\t\t\t\t\tnewPos--;\r\n\t\t\t\t\tsel.Range(r) = SelectionRange(newPos);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\t// Multiline\r\n\t\t\tconst Sci::Position anchorPosOnLine = sel.Range(r).anchor.Position() -\r\n\t\t\t\tpdoc->LineStart(lineOfAnchor);\r\n\t\t\tconst Sci::Position currentPosPosOnLine = caretPosition -\r\n\t\t\t\tpdoc->LineStart(lineCurrentPos);\r\n\t\t\t// Multiple lines selected so indent / dedent\r\n\t\t\tconst Sci::Line lineTopSel = std::min(lineOfAnchor, lineCurrentPos);\r\n\t\t\tSci::Line lineBottomSel = std::max(lineOfAnchor, lineCurrentPos);\r\n\t\t\tif (pdoc->LineStart(lineBottomSel) == sel.Range(r).anchor.Position() || pdoc->LineStart(lineBottomSel) == caretPosition)\r\n\t\t\t\tlineBottomSel--;  \t// If not selecting any characters on a line, do not indent\r\n\t\t\tpdoc->Indent(forwards, lineBottomSel, lineTopSel);\r\n\t\t\tif (lineOfAnchor < lineCurrentPos) {\r\n\t\t\t\tif (currentPosPosOnLine == 0)\r\n\t\t\t\t\tsel.Range(r) = SelectionRange(pdoc->LineStart(lineCurrentPos),\r\n\t\t\t\t\t\tpdoc->LineStart(lineOfAnchor));\r\n\t\t\t\telse\r\n\t\t\t\t\tsel.Range(r) = SelectionRange(pdoc->LineStart(lineCurrentPos + 1),\r\n\t\t\t\t\t\tpdoc->LineStart(lineOfAnchor));\r\n\t\t\t} else {\r\n\t\t\t\tif (anchorPosOnLine == 0)\r\n\t\t\t\t\tsel.Range(r) = SelectionRange(pdoc->LineStart(lineCurrentPos),\r\n\t\t\t\t\t\tpdoc->LineStart(lineOfAnchor));\r\n\t\t\t\telse\r\n\t\t\t\t\tsel.Range(r) = SelectionRange(pdoc->LineStart(lineCurrentPos),\r\n\t\t\t\t\t\tpdoc->LineStart(lineOfAnchor + 1));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tContainerNeedsUpdate(Update::Selection);\r\n}\r\n\r\nstd::unique_ptr<CaseFolder> Editor::CaseFolderForEncoding() {\r\n\t// Simple default that only maps ASCII upper case to lower case.\r\n\treturn std::make_unique<CaseFolderTable>();\r\n}\r\n\r\n/**\r\n * Search of a text in the document, in the given range.\r\n * @return The position of the found text, -1 if not found.\r\n */\r\nSci::Position Editor::FindText(\r\n    uptr_t wParam,\t\t///< Search modes : @c FindOption::MatchCase, @c FindOption::WholeWord,\r\n    ///< @c FindOption::WordStart, @c FindOption::RegExp or @c FindOption::Posix.\r\n    sptr_t lParam) {\t///< @c Sci_TextToFind structure: The text to search for in the given range.\r\n\r\n\tTextToFind *ft = static_cast<TextToFind *>(PtrFromSPtr(lParam));\r\n\tSci::Position lengthFound = strlen(ft->lpstrText);\r\n\tif (!pdoc->HasCaseFolder())\r\n\t\tpdoc->SetCaseFolder(CaseFolderForEncoding());\r\n\ttry {\r\n\t\tconst Sci::Position pos = pdoc->FindText(\r\n\t\t\tstatic_cast<Sci::Position>(ft->chrg.cpMin),\r\n\t\t\tstatic_cast<Sci::Position>(ft->chrg.cpMax),\r\n\t\t\tft->lpstrText,\r\n\t\t\tstatic_cast<FindOption>(wParam),\r\n\t\t\t&lengthFound);\r\n\t\tif (pos != -1) {\r\n\t\t\tft->chrgText.cpMin = static_cast<Sci_PositionCR>(pos);\r\n\t\t\tft->chrgText.cpMax = static_cast<Sci_PositionCR>(pos + lengthFound);\r\n\t\t}\r\n\t\treturn pos;\r\n\t} catch (RegexError &) {\r\n\t\terrorStatus = Status::RegEx;\r\n\t\treturn -1;\r\n\t}\r\n}\r\n\r\n/**\r\n * Search of a text in the document, in the given range.\r\n * @return The position of the found text, -1 if not found.\r\n */\r\nSci::Position Editor::FindTextFull(\r\n    uptr_t wParam,\t\t///< Search modes : @c FindOption::MatchCase, @c FindOption::WholeWord,\r\n    ///< @c FindOption::WordStart, @c FindOption::RegExp or @c FindOption::Posix.\r\n    sptr_t lParam) {\t///< @c Sci_TextToFindFull structure: The text to search for in the given range.\r\n\r\n\tTextToFindFull *ft = static_cast<TextToFindFull *>(PtrFromSPtr(lParam));\r\n\tSci::Position lengthFound = strlen(ft->lpstrText);\r\n\tif (!pdoc->HasCaseFolder())\r\n\t\tpdoc->SetCaseFolder(CaseFolderForEncoding());\r\n\ttry {\r\n\t\tconst Sci::Position pos = pdoc->FindText(\r\n\t\t\tft->chrg.cpMin,\r\n\t\t\tft->chrg.cpMax,\r\n\t\t\tft->lpstrText,\r\n\t\t\tstatic_cast<FindOption>(wParam),\r\n\t\t\t&lengthFound);\r\n\t\tif (pos != -1) {\r\n\t\t\tft->chrgText.cpMin = pos;\r\n\t\t\tft->chrgText.cpMax = pos + lengthFound;\r\n\t\t}\r\n\t\treturn pos;\r\n\t} catch (RegexError &) {\r\n\t\terrorStatus = Status::RegEx;\r\n\t\treturn -1;\r\n\t}\r\n}\r\n\r\n/**\r\n * Relocatable search support : Searches relative to current selection\r\n * point and sets the selection to the found text range with\r\n * each search.\r\n */\r\n/**\r\n * Anchor following searches at current selection start: This allows\r\n * multiple incremental interactive searches to be macro recorded\r\n * while still setting the selection to found text so the find/select\r\n * operation is self-contained.\r\n */\r\nvoid Editor::SearchAnchor() noexcept {\r\n\tsearchAnchor = SelectionStart().Position();\r\n}\r\n\r\n/**\r\n * Find text from current search anchor: Must call @c SearchAnchor first.\r\n * Used for next text and previous text requests.\r\n * @return The position of the found text, -1 if not found.\r\n */\r\nSci::Position Editor::SearchText(\r\n    Message iMessage,\t\t///< Accepts both @c Message::SearchNext and @c Message::SearchPrev.\r\n    uptr_t wParam,\t\t\t\t///< Search modes : @c FindOption::MatchCase, @c FindOption::WholeWord,\r\n    ///< @c FindOption::WordStart, @c FindOption::RegExp or @c FindOption::Posix.\r\n    sptr_t lParam) {\t\t\t///< The text to search for.\r\n\r\n\tconst char *txt = ConstCharPtrFromSPtr(lParam);\r\n\tSci::Position pos = Sci::invalidPosition;\r\n\tSci::Position lengthFound = strlen(txt);\r\n\tif (!pdoc->HasCaseFolder())\r\n\t\tpdoc->SetCaseFolder(CaseFolderForEncoding());\r\n\ttry {\r\n\t\tif (iMessage == Message::SearchNext) {\r\n\t\t\tpos = pdoc->FindText(searchAnchor, pdoc->Length(), txt,\r\n\t\t\t\t\tstatic_cast<FindOption>(wParam),\r\n\t\t\t\t\t&lengthFound);\r\n\t\t} else {\r\n\t\t\tpos = pdoc->FindText(searchAnchor, 0, txt,\r\n\t\t\t\t\tstatic_cast<FindOption>(wParam),\r\n\t\t\t\t\t&lengthFound);\r\n\t\t}\r\n\t} catch (RegexError &) {\r\n\t\terrorStatus = Status::RegEx;\r\n\t\treturn Sci::invalidPosition;\r\n\t}\r\n\tif (pos != Sci::invalidPosition) {\r\n\t\tSetSelection(pos, pos + lengthFound);\r\n\t}\r\n\r\n\treturn pos;\r\n}\r\n\r\nstd::string Editor::CaseMapString(const std::string &s, CaseMapping caseMapping) {\r\n\tstd::string ret(s);\r\n\tfor (char &ch : ret) {\r\n\t\tswitch (caseMapping) {\r\n\t\t\tcase CaseMapping::upper:\r\n\t\t\t\tch = MakeUpperCase(ch);\r\n\t\t\t\tbreak;\r\n\t\t\tcase CaseMapping::lower:\r\n\t\t\t\tch = MakeLowerCase(ch);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\t// no action\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\treturn ret;\r\n}\r\n\r\n/**\r\n * Search for text in the target range of the document.\r\n * @return The position of the found text, -1 if not found.\r\n */\r\nSci::Position Editor::SearchInTarget(const char *text, Sci::Position length) {\r\n\tSci::Position lengthFound = length;\r\n\r\n\tif (!pdoc->HasCaseFolder())\r\n\t\tpdoc->SetCaseFolder(CaseFolderForEncoding());\r\n\ttry {\r\n\t\tconst Sci::Position pos = pdoc->FindText(targetRange.start.Position(), targetRange.end.Position(), text,\r\n\t\t\t\tsearchFlags,\r\n\t\t\t\t&lengthFound);\r\n\t\tif (pos != -1) {\r\n\t\t\ttargetRange.start.SetPosition(pos);\r\n\t\t\ttargetRange.end.SetPosition(pos + lengthFound);\r\n\t\t}\r\n\t\treturn pos;\r\n\t} catch (RegexError &) {\r\n\t\terrorStatus = Status::RegEx;\r\n\t\treturn -1;\r\n\t}\r\n}\r\n\r\nvoid Editor::GoToLine(Sci::Line lineNo) {\r\n\tif (lineNo > pdoc->LinesTotal())\r\n\t\tlineNo = pdoc->LinesTotal();\r\n\tif (lineNo < 0)\r\n\t\tlineNo = 0;\r\n\tSetEmptySelection(pdoc->LineStart(lineNo));\r\n\tShowCaretAtCurrentPosition();\r\n\tEnsureCaretVisible();\r\n}\r\n\r\nstatic bool Close(Point pt1, Point pt2, Point threshold) noexcept {\r\n\tconst Point ptDifference = pt2 - pt1;\r\n\tif (std::abs(ptDifference.x) > threshold.x)\r\n\t\treturn false;\r\n\tif (std::abs(ptDifference.y) > threshold.y)\r\n\t\treturn false;\r\n\treturn true;\r\n}\r\n\r\nstd::string Editor::RangeText(Sci::Position start, Sci::Position end) const {\r\n\tif (start < end) {\r\n\t\tconst Sci::Position len = end - start;\r\n\t\tstd::string ret(len, '\\0');\r\n\t\tpdoc->GetCharRange(ret.data(), start, len);\r\n\t\treturn ret;\r\n\t}\r\n\treturn std::string();\r\n}\r\n\r\nvoid Editor::CopySelectionRange(SelectionText *ss, bool allowLineCopy) {\r\n\tif (sel.Empty()) {\r\n\t\tif (allowLineCopy) {\r\n\t\t\tconst Sci::Line currentLine = pdoc->SciLineFromPosition(sel.MainCaret());\r\n\t\t\tconst Sci::Position start = pdoc->LineStart(currentLine);\r\n\t\t\tconst Sci::Position end = pdoc->LineEnd(currentLine);\r\n\r\n\t\t\tstd::string text = RangeText(start, end);\r\n\t\t\tif (pdoc->eolMode != EndOfLine::Lf)\r\n\t\t\t\ttext.push_back('\\r');\r\n\t\t\tif (pdoc->eolMode != EndOfLine::Cr)\r\n\t\t\t\ttext.push_back('\\n');\r\n\t\t\tss->Copy(text, pdoc->dbcsCodePage,\r\n\t\t\t\tvs.styles[StyleDefault].characterSet, false, true);\r\n\t\t}\r\n\t} else {\r\n\t\tstd::string text;\r\n\t\tstd::vector<SelectionRange> rangesInOrder = sel.RangesCopy();\r\n\t\tif (sel.selType == Selection::SelTypes::rectangle)\r\n\t\t\tstd::sort(rangesInOrder.begin(), rangesInOrder.end());\r\n\t\tfor (const SelectionRange &current : rangesInOrder) {\r\n\t\t\t\ttext.append(RangeText(current.Start().Position(), current.End().Position()));\r\n\t\t\tif (sel.selType == Selection::SelTypes::rectangle) {\r\n\t\t\t\tif (pdoc->eolMode != EndOfLine::Lf)\r\n\t\t\t\t\ttext.push_back('\\r');\r\n\t\t\t\tif (pdoc->eolMode != EndOfLine::Cr)\r\n\t\t\t\t\ttext.push_back('\\n');\r\n\t\t\t}\r\n\t\t}\r\n\t\tss->Copy(text, pdoc->dbcsCodePage,\r\n\t\t\tvs.styles[StyleDefault].characterSet, sel.IsRectangular(), sel.selType == Selection::SelTypes::lines);\r\n\t}\r\n}\r\n\r\nvoid Editor::CopyRangeToClipboard(Sci::Position start, Sci::Position end) {\r\n\tstart = pdoc->ClampPositionIntoDocument(start);\r\n\tend = pdoc->ClampPositionIntoDocument(end);\r\n\tSelectionText selectedText;\r\n\tstd::string text = RangeText(start, end);\r\n\tselectedText.Copy(text,\r\n\t\tpdoc->dbcsCodePage, vs.styles[StyleDefault].characterSet, false, false);\r\n\tCopyToClipboard(selectedText);\r\n}\r\n\r\nvoid Editor::CopyText(size_t length, const char *text) {\r\n\tSelectionText selectedText;\r\n\tselectedText.Copy(std::string(text, length),\r\n\t\tpdoc->dbcsCodePage, vs.styles[StyleDefault].characterSet, false, false);\r\n\tCopyToClipboard(selectedText);\r\n}\r\n\r\nvoid Editor::SetDragPosition(SelectionPosition newPos) {\r\n\tif (newPos.Position() >= 0) {\r\n\t\tnewPos = MovePositionOutsideChar(newPos, 1);\r\n\t\tposDrop = newPos;\r\n\t}\r\n\tif (!(posDrag == newPos)) {\r\n\t\tconst CaretPolicies dragCaretPolicies = {\r\n\t\t\tCaretPolicySlop(CaretPolicy::Slop | CaretPolicy::Strict | CaretPolicy::Even, 50),\r\n\t\t\tCaretPolicySlop(CaretPolicy::Slop | CaretPolicy::Strict | CaretPolicy::Even, 2)\r\n\t\t};\r\n\t\tMovedCaret(newPos, posDrag, true, dragCaretPolicies);\r\n\r\n\t\tcaret.on = true;\r\n\t\tFineTickerCancel(TickReason::caret);\r\n\t\tif ((caret.active) && (caret.period > 0) && (newPos.Position() < 0))\r\n\t\t\tFineTickerStart(TickReason::caret, caret.period, caret.period/10);\r\n\t\tInvalidateCaret();\r\n\t\tposDrag = newPos;\r\n\t\tInvalidateCaret();\r\n\t}\r\n}\r\n\r\nvoid Editor::DisplayCursor(Window::Cursor c) {\r\n\tif (cursorMode == CursorShape::Normal)\r\n\t\twMain.SetCursor(c);\r\n\telse\r\n\t\twMain.SetCursor(static_cast<Window::Cursor>(cursorMode));\r\n}\r\n\r\nbool Editor::DragThreshold(Point ptStart, Point ptNow) {\r\n\tconst Point ptDiff = ptStart - ptNow;\r\n\tconst XYPOSITION distanceSquared = ptDiff.x * ptDiff.x + ptDiff.y * ptDiff.y;\r\n\treturn distanceSquared > 16.0f;\r\n}\r\n\r\nvoid Editor::StartDrag() {\r\n\t// Always handled by subclasses\r\n}\r\n\r\nvoid Editor::DropAt(SelectionPosition position, const char *value, size_t lengthValue, bool moving, bool rectangular) {\r\n\t//Platform::DebugPrintf(\"DropAt %d %d\\n\", inDragDrop, position);\r\n\tif (inDragDrop == DragDrop::dragging)\r\n\t\tdropWentOutside = false;\r\n\r\n\tconst bool positionWasInSelection = PositionInSelection(position.Position());\r\n\r\n\tconst bool positionOnEdgeOfSelection =\r\n\t    (position == SelectionStart()) || (position == SelectionEnd());\r\n\r\n\tif ((inDragDrop != DragDrop::dragging) || !(positionWasInSelection) ||\r\n\t        (positionOnEdgeOfSelection && !moving)) {\r\n\r\n\t\tconst SelectionPosition selStart = SelectionStart();\r\n\t\tconst SelectionPosition selEnd = SelectionEnd();\r\n\r\n\t\tUndoGroup ug(pdoc);\r\n\r\n\t\tSelectionPosition positionAfterDeletion = position;\r\n\t\tif ((inDragDrop == DragDrop::dragging) && moving) {\r\n\t\t\t// Remove dragged out text\r\n\t\t\tif (rectangular || sel.selType == Selection::SelTypes::lines) {\r\n\t\t\t\tfor (size_t r=0; r<sel.Count(); r++) {\r\n\t\t\t\t\tif (position >= sel.Range(r).Start()) {\r\n\t\t\t\t\t\tif (position > sel.Range(r).End()) {\r\n\t\t\t\t\t\t\tpositionAfterDeletion.Add(-sel.Range(r).Length());\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tpositionAfterDeletion.Add(-SelectionRange(position, sel.Range(r).Start()).Length());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (position > selStart) {\r\n\t\t\t\t\tpositionAfterDeletion.Add(-SelectionRange(selEnd, selStart).Length());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tClearSelection();\r\n\t\t}\r\n\t\tposition = positionAfterDeletion;\r\n\r\n\t\tstd::string convertedText = Document::TransformLineEnds(value, lengthValue, pdoc->eolMode);\r\n\r\n\t\tif (rectangular) {\r\n\t\t\tPasteRectangular(position, convertedText.c_str(), convertedText.length());\r\n\t\t\t// Should try to select new rectangle but it may not be a rectangle now so just select the drop position\r\n\t\t\tSetEmptySelection(position);\r\n\t\t} else {\r\n\t\t\tposition = MovePositionOutsideChar(position, sel.MainCaret() - position.Position());\r\n\t\t\tposition = RealizeVirtualSpace(position);\r\n\t\t\tconst Sci::Position lengthInserted = pdoc->InsertString(\r\n\t\t\t\tposition.Position(), convertedText);\r\n\t\t\tif (lengthInserted > 0) {\r\n\t\t\t\tSelectionPosition posAfterInsertion = position;\r\n\t\t\t\tposAfterInsertion.Add(lengthInserted);\r\n\t\t\t\tSetSelection(posAfterInsertion, position);\r\n\t\t\t}\r\n\t\t}\r\n\t} else if (inDragDrop == DragDrop::dragging) {\r\n\t\tSetEmptySelection(position);\r\n\t}\r\n}\r\n\r\nvoid Editor::DropAt(SelectionPosition position, const char *value, bool moving, bool rectangular) {\r\n\tDropAt(position, value, strlen(value), moving, rectangular);\r\n}\r\n\r\n/**\r\n * @return true if given position is inside the selection,\r\n */\r\nbool Editor::PositionInSelection(Sci::Position pos) {\r\n\tpos = MovePositionOutsideChar(pos, sel.MainCaret() - pos);\r\n\tfor (size_t r=0; r<sel.Count(); r++) {\r\n\t\tif (sel.Range(r).Contains(pos))\r\n\t\t\treturn true;\r\n\t}\r\n\treturn false;\r\n}\r\n\r\nbool Editor::PointInSelection(Point pt) {\r\n\tconst SelectionPosition pos = SPositionFromLocation(pt, false, true);\r\n\tconst Point ptPos = LocationFromPosition(pos);\r\n\tfor (size_t r=0; r<sel.Count(); r++) {\r\n\t\tconst SelectionRange &range = sel.Range(r);\r\n\t\tif (range.Contains(pos)) {\r\n\t\t\tbool hit = true;\r\n\t\t\tif (pos == range.Start()) {\r\n\t\t\t\t// see if just before selection\r\n\t\t\t\tif (pt.x < ptPos.x) {\r\n\t\t\t\t\thit = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (pos == range.End()) {\r\n\t\t\t\t// see if just after selection\r\n\t\t\t\tif (pt.x > ptPos.x) {\r\n\t\t\t\t\thit = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (hit)\r\n\t\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\treturn false;\r\n}\r\n\r\nptrdiff_t Editor::SelectionFromPoint(Point pt) {\r\n\t// Prioritize checking inside non-empty selections since each character will be inside only 1 \r\n\tconst SelectionPosition posChar = SPositionFromLocation(pt, true, true);\r\n\tfor (size_t r = 0; r < sel.Count(); r++) {\r\n\t\tif (sel.Range(r).ContainsCharacter(posChar)) {\r\n\t\t\treturn r;\r\n\t\t}\r\n\t}\r\n\r\n\t// Then check if near empty selections as may be near more than 1\r\n\tconst SelectionPosition pos = SPositionFromLocation(pt, true, false);\r\n\tfor (size_t r = 0; r < sel.Count(); r++) {\r\n\t\tconst SelectionRange &range = sel.Range(r);\r\n\t\tif ((range.Empty()) && (pos == range.caret)) {\r\n\t\t\treturn r;\r\n\t\t}\r\n\t}\r\n\r\n\t// No selection at point\r\n\treturn -1;\r\n}\r\n\r\nbool Editor::PointInSelMargin(Point pt) const {\r\n\t// Really means: \"Point in a margin\"\r\n\tif (vs.fixedColumnWidth > 0) {\t// There is a margin\r\n\t\tPRectangle rcSelMargin = GetClientRectangle();\r\n\t\trcSelMargin.right = static_cast<XYPOSITION>(vs.textStart - vs.leftMarginWidth);\r\n\t\trcSelMargin.left = static_cast<XYPOSITION>(vs.textStart - vs.fixedColumnWidth);\r\n\t\tconst Point ptOrigin = GetVisibleOriginInMain();\r\n\t\trcSelMargin.Move(0, -ptOrigin.y);\r\n\t\treturn rcSelMargin.ContainsWholePixel(pt);\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n}\r\n\r\nWindow::Cursor Editor::GetMarginCursor(Point pt) const noexcept {\r\n\tint x = 0;\r\n\tfor (const MarginStyle &m : vs.ms) {\r\n\t\tif ((pt.x >= x) && (pt.x < x + m.width))\r\n\t\t\treturn static_cast<Window::Cursor>(m.cursor);\r\n\t\tx += m.width;\r\n\t}\r\n\treturn Window::Cursor::reverseArrow;\r\n}\r\n\r\nvoid Editor::DropSelection(size_t part) {\r\n\tsel.DropSelection(part);\r\n\tContainerNeedsUpdate(Update::Selection);\r\n\tRedraw();\r\n}\r\n\r\nvoid Editor::TrimAndSetSelection(Sci::Position currentPos_, Sci::Position anchor_) {\r\n\tsel.TrimSelection(SelectionRange(currentPos_, anchor_));\r\n\tSetSelection(currentPos_, anchor_);\r\n}\r\n\r\nvoid Editor::LineSelection(Sci::Position lineCurrentPos_, Sci::Position lineAnchorPos_, bool wholeLine) {\r\n\tSci::Position selCurrentPos;\r\n\tSci::Position selAnchorPos;\r\n\tif (wholeLine) {\r\n\t\tconst Sci::Line lineCurrent_ = pdoc->SciLineFromPosition(lineCurrentPos_);\r\n\t\tconst Sci::Line lineAnchor_ = pdoc->SciLineFromPosition(lineAnchorPos_);\r\n\t\tif (lineAnchorPos_ < lineCurrentPos_) {\r\n\t\t\tselCurrentPos = pdoc->LineStart(lineCurrent_ + 1);\r\n\t\t\tselAnchorPos = pdoc->LineStart(lineAnchor_);\r\n\t\t} else if (lineAnchorPos_ > lineCurrentPos_) {\r\n\t\t\tselCurrentPos = pdoc->LineStart(lineCurrent_);\r\n\t\t\tselAnchorPos = pdoc->LineStart(lineAnchor_ + 1);\r\n\t\t} else { // Same line, select it\r\n\t\t\tselCurrentPos = pdoc->LineStart(lineAnchor_ + 1);\r\n\t\t\tselAnchorPos = pdoc->LineStart(lineAnchor_);\r\n\t\t}\r\n\t} else {\r\n\t\tif (lineAnchorPos_ < lineCurrentPos_) {\r\n\t\t\tselCurrentPos = StartEndDisplayLine(lineCurrentPos_, false) + 1;\r\n\t\t\tselCurrentPos = pdoc->MovePositionOutsideChar(selCurrentPos, 1);\r\n\t\t\tselAnchorPos = StartEndDisplayLine(lineAnchorPos_, true);\r\n\t\t} else if (lineAnchorPos_ > lineCurrentPos_) {\r\n\t\t\tselCurrentPos = StartEndDisplayLine(lineCurrentPos_, true);\r\n\t\t\tselAnchorPos = StartEndDisplayLine(lineAnchorPos_, false) + 1;\r\n\t\t\tselAnchorPos = pdoc->MovePositionOutsideChar(selAnchorPos, 1);\r\n\t\t} else { // Same line, select it\r\n\t\t\tselCurrentPos = StartEndDisplayLine(lineAnchorPos_, false) + 1;\r\n\t\t\tselCurrentPos = pdoc->MovePositionOutsideChar(selCurrentPos, 1);\r\n\t\t\tselAnchorPos = StartEndDisplayLine(lineAnchorPos_, true);\r\n\t\t}\r\n\t}\r\n\tTrimAndSetSelection(selCurrentPos, selAnchorPos);\r\n}\r\n\r\nvoid Editor::WordSelection(Sci::Position pos) {\r\n\tif (pos < wordSelectAnchorStartPos) {\r\n\t\t// Extend backward to the word containing pos.\r\n\t\t// Skip ExtendWordSelect if the line is empty or if pos is after the last character.\r\n\t\t// This ensures that a series of empty lines isn't counted as a single \"word\".\r\n\t\tif (!pdoc->IsLineEndPosition(pos))\r\n\t\t\tpos = pdoc->ExtendWordSelect(pdoc->MovePositionOutsideChar(pos + 1, 1), -1);\r\n\t\tTrimAndSetSelection(pos, wordSelectAnchorEndPos);\r\n\t} else if (pos > wordSelectAnchorEndPos) {\r\n\t\t// Extend forward to the word containing the character to the left of pos.\r\n\t\t// Skip ExtendWordSelect if the line is empty or if pos is the first position on the line.\r\n\t\t// This ensures that a series of empty lines isn't counted as a single \"word\".\r\n\t\tif (pos > pdoc->LineStartPosition(pos))\r\n\t\t\tpos = pdoc->ExtendWordSelect(pdoc->MovePositionOutsideChar(pos - 1, -1), 1);\r\n\t\tTrimAndSetSelection(pos, wordSelectAnchorStartPos);\r\n\t} else {\r\n\t\t// Select only the anchored word\r\n\t\tif (pos >= originalAnchorPos)\r\n\t\t\tTrimAndSetSelection(wordSelectAnchorEndPos, wordSelectAnchorStartPos);\r\n\t\telse\r\n\t\t\tTrimAndSetSelection(wordSelectAnchorStartPos, wordSelectAnchorEndPos);\r\n\t}\r\n}\r\n\r\nvoid Editor::DwellEnd(bool mouseMoved) {\r\n\tif (mouseMoved)\r\n\t\tticksToDwell = dwellDelay;\r\n\telse\r\n\t\tticksToDwell = TimeForever;\r\n\tif (dwelling && (dwellDelay < TimeForever)) {\r\n\t\tdwelling = false;\r\n\t\tNotifyDwelling(ptMouseLast, dwelling);\r\n\t}\r\n\tFineTickerCancel(TickReason::dwell);\r\n}\r\n\r\nvoid Editor::MouseLeave() {\r\n\tSetHotSpotRange(nullptr);\r\n\tSetHoverIndicatorPosition(Sci::invalidPosition);\r\n\tif (!HaveMouseCapture()) {\r\n\t\tptMouseLast = Point(-1, -1);\r\n\t\tDwellEnd(true);\r\n\t}\r\n}\r\n\r\nstatic constexpr bool AllowVirtualSpace(VirtualSpace virtualSpaceOptions, bool rectangular) noexcept {\r\n\treturn FlagSet(virtualSpaceOptions, (rectangular ? VirtualSpace::RectangularSelection : VirtualSpace::UserAccessible));\r\n}\r\n\r\nvoid Editor::ButtonDownWithModifiers(Point pt, unsigned int curTime, KeyMod modifiers) {\r\n\tSetHoverIndicatorPoint(pt);\r\n\t//Platform::DebugPrintf(\"ButtonDown %d %d = %d alt=%d %d\\n\", curTime, lastClickTime, curTime - lastClickTime, alt, inDragDrop);\r\n\tptMouseLast = pt;\r\n\tconst bool ctrl = FlagSet(modifiers, KeyMod::Ctrl);\r\n\tconst bool shift = FlagSet(modifiers, KeyMod::Shift);\r\n\tconst bool alt = FlagSet(modifiers, KeyMod::Alt);\r\n\tconst SelectionPosition clickPos = SPositionFromLocation(pt, false, false, AllowVirtualSpace(virtualSpaceOptions, alt));\r\n\tconst SelectionPosition newPos = MovePositionOutsideChar(clickPos, sel.MainCaret() - clickPos.Position());\r\n\tconst SelectionPosition newCharPos = MovePositionOutsideChar(\r\n\t\tSPositionFromLocation(pt, false, true, false), -1);\r\n\tinDragDrop = DragDrop::none;\r\n\tsel.SetMoveExtends(false);\r\n\r\n\tif (NotifyMarginClick(pt, modifiers))\r\n\t\treturn;\r\n\r\n\tNotifyIndicatorClick(true, newPos.Position(), modifiers);\r\n\r\n\tconst bool multiClick = (curTime < (lastClickTime + Platform::DoubleClickTime())) && Close(pt, lastClick, doubleClickCloseThreshold);\r\n\tlastClickTime = curTime;\r\n\tlastClick = pt;\r\n\r\n\tconst bool inSelMargin = PointInSelMargin(pt);\r\n\t// In margin ctrl+(double)click should always select everything\r\n\tif (ctrl && inSelMargin) {\r\n\t\tSelectAll();\r\n\t\treturn;\r\n\t}\r\n\tif (shift && !inSelMargin) {\r\n\t\tSetSelection(newPos);\r\n\t}\r\n\tif (multiClick) {\r\n\t\t//Platform::DebugPrintf(\"Double click %d %d = %d\\n\", curTime, lastClickTime, curTime - lastClickTime);\r\n\t\tChangeMouseCapture(true);\r\n\t\tif (!ctrl || !multipleSelection || (selectionUnit != TextUnit::character && selectionUnit != TextUnit::word))\r\n\t\t\tSetEmptySelection(newPos.Position());\r\n\t\tbool doubleClick = false;\r\n\t\tif (inSelMargin) {\r\n\t\t\t// Inside margin selection type should be either subLine or wholeLine.\r\n\t\t\tif (selectionUnit == TextUnit::subLine) {\r\n\t\t\t\t// If it is subLine, we're inside a *double* click and word wrap is enabled,\r\n\t\t\t\t// so we switch to wholeLine in order to select whole line.\r\n\t\t\t\tselectionUnit = TextUnit::wholeLine;\r\n\t\t\t} else if (selectionUnit != TextUnit::subLine && selectionUnit != TextUnit::wholeLine) {\r\n\t\t\t\t// If it is neither, reset selection type to line selection.\r\n\t\t\t\tselectionUnit = (Wrapping() && (FlagSet(marginOptions, MarginOption::SubLineSelect))) ? TextUnit::subLine : TextUnit::wholeLine;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (selectionUnit == TextUnit::character) {\r\n\t\t\t\tselectionUnit = TextUnit::word;\r\n\t\t\t\tdoubleClick = true;\r\n\t\t\t} else if (selectionUnit == TextUnit::word) {\r\n\t\t\t\t// Since we ended up here, we're inside a *triple* click, which should always select\r\n\t\t\t\t// whole line regardless of word wrap being enabled or not.\r\n\t\t\t\tselectionUnit = TextUnit::wholeLine;\r\n\t\t\t} else {\r\n\t\t\t\tselectionUnit = TextUnit::character;\r\n\t\t\t\toriginalAnchorPos = sel.MainCaret();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (selectionUnit == TextUnit::word) {\r\n\t\t\tSci::Position charPos = originalAnchorPos;\r\n\t\t\tif (sel.MainCaret() == originalAnchorPos) {\r\n\t\t\t\tcharPos = PositionFromLocation(pt, false, true);\r\n\t\t\t\tcharPos = MovePositionOutsideChar(charPos, -1);\r\n\t\t\t}\r\n\r\n\t\t\tSci::Position startWord;\r\n\t\t\tSci::Position endWord;\r\n\t\t\tif ((sel.MainCaret() >= originalAnchorPos) && !pdoc->IsLineEndPosition(charPos)) {\r\n\t\t\t\tstartWord = pdoc->ExtendWordSelect(pdoc->MovePositionOutsideChar(charPos + 1, 1), -1);\r\n\t\t\t\tendWord = pdoc->ExtendWordSelect(charPos, 1);\r\n\t\t\t} else {\r\n\t\t\t\t// Selecting backwards, or anchor beyond last character on line. In these cases,\r\n\t\t\t\t// we select the word containing the character to the *left* of the anchor.\r\n\t\t\t\tif (charPos > pdoc->LineStartPosition(charPos)) {\r\n\t\t\t\t\tstartWord = pdoc->ExtendWordSelect(charPos, -1);\r\n\t\t\t\t\tendWord = pdoc->ExtendWordSelect(startWord, 1);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Anchor at start of line; select nothing to begin with.\r\n\t\t\t\t\tstartWord = charPos;\r\n\t\t\t\t\tendWord = charPos;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\twordSelectAnchorStartPos = startWord;\r\n\t\t\twordSelectAnchorEndPos = endWord;\r\n\t\t\twordSelectInitialCaretPos = sel.MainCaret();\r\n\t\t\tWordSelection(wordSelectInitialCaretPos);\r\n\t\t} else if (selectionUnit == TextUnit::subLine || selectionUnit == TextUnit::wholeLine) {\r\n\t\t\tlineAnchorPos = newPos.Position();\r\n\t\t\tLineSelection(lineAnchorPos, lineAnchorPos, selectionUnit == TextUnit::wholeLine);\r\n\t\t\t//Platform::DebugPrintf(\"Triple click: %d - %d\\n\", anchor, currentPos);\r\n\t\t} else {\r\n\t\t\tSetEmptySelection(sel.MainCaret());\r\n\t\t}\r\n\t\t//Platform::DebugPrintf(\"Double click: %d - %d\\n\", anchor, currentPos);\r\n\t\tif (doubleClick) {\r\n\t\t\tNotifyDoubleClick(pt, modifiers);\r\n\t\t\tif (PositionIsHotspot(newCharPos.Position()))\r\n\t\t\t\tNotifyHotSpotDoubleClicked(newCharPos.Position(), modifiers);\r\n\t\t}\r\n\t} else {\t// Single click\r\n\t\tif (inSelMargin) {\r\n\t\t\tif (sel.IsRectangular() || (sel.Count() > 1)) {\r\n\t\t\t\tInvalidateWholeSelection();\r\n\t\t\t\tsel.Clear();\r\n\t\t\t}\r\n\t\t\tsel.selType = Selection::SelTypes::stream;\r\n\t\t\tif (!shift) {\r\n\t\t\t\t// Single click in margin: select wholeLine or only subLine if word wrap is enabled\r\n\t\t\t\tlineAnchorPos = newPos.Position();\r\n\t\t\t\tselectionUnit = (Wrapping() && (FlagSet(marginOptions, MarginOption::SubLineSelect))) ? TextUnit::subLine : TextUnit::wholeLine;\r\n\t\t\t\tLineSelection(lineAnchorPos, lineAnchorPos, selectionUnit == TextUnit::wholeLine);\r\n\t\t\t} else {\r\n\t\t\t\t// Single shift+click in margin: select from line anchor to clicked line\r\n\t\t\t\tif (sel.MainAnchor() > sel.MainCaret())\r\n\t\t\t\t\tlineAnchorPos = sel.MainAnchor() - 1;\r\n\t\t\t\telse\r\n\t\t\t\t\tlineAnchorPos = sel.MainAnchor();\r\n\t\t\t\t// Reset selection type if there is an empty selection.\r\n\t\t\t\t// This ensures that we don't end up stuck in previous selection mode, which is no longer valid.\r\n\t\t\t\t// Otherwise, if there's a non empty selection, reset selection type only if it differs from selSubLine and selWholeLine.\r\n\t\t\t\t// This ensures that we continue selecting in the same selection mode.\r\n\t\t\t\tif (sel.Empty() || (selectionUnit != TextUnit::subLine && selectionUnit != TextUnit::wholeLine))\r\n\t\t\t\t\tselectionUnit = (Wrapping() && (FlagSet(marginOptions, MarginOption::SubLineSelect))) ? TextUnit::subLine : TextUnit::wholeLine;\r\n\t\t\t\tLineSelection(newPos.Position(), lineAnchorPos, selectionUnit == TextUnit::wholeLine);\r\n\t\t\t}\r\n\r\n\t\t\tSetDragPosition(SelectionPosition(Sci::invalidPosition));\r\n\t\t\tChangeMouseCapture(true);\r\n\t\t} else {\r\n\t\t\tif (PointIsHotspot(pt)) {\r\n\t\t\t\tNotifyHotSpotClicked(newCharPos.Position(), modifiers);\r\n\t\t\t\thotSpotClickPos = newCharPos.Position();\r\n\t\t\t}\r\n\t\t\tif (!shift) {\r\n\t\t\t\tconst ptrdiff_t selectionPart = SelectionFromPoint(pt);\r\n\t\t\t\tif (selectionPart >= 0) {\r\n\t\t\t\t\tif (multipleSelection && ctrl) {\r\n\t\t\t\t\t\t// Deselect\r\n\t\t\t\t\t\tif (sel.Count() > 1) {\r\n\t\t\t\t\t\t\tDropSelection(selectionPart);\r\n\t\t\t\t\t\t\t// Completed: don't want any more processing of this click\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// Switch to just the click position\r\n\t\t\t\t\t\t\tSetSelection(newPos, newPos);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!sel.Range(selectionPart).Empty()) {\r\n\t\t\t\t\t\tinDragDrop = DragDrop::initial;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tChangeMouseCapture(true);\r\n\t\t\tif (inDragDrop != DragDrop::initial) {\r\n\t\t\t\tSetDragPosition(SelectionPosition(Sci::invalidPosition));\r\n\t\t\t\tif (!shift) {\r\n\t\t\t\t\tif (ctrl && multipleSelection) {\r\n\t\t\t\t\t\tconst SelectionRange range(newPos);\r\n\t\t\t\t\t\tsel.TentativeSelection(range);\r\n\t\t\t\t\t\tInvalidateSelection(range, true);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tInvalidateSelection(SelectionRange(newPos), true);\r\n\t\t\t\t\t\tif (sel.Count() > 1)\r\n\t\t\t\t\t\t\tRedraw();\r\n\t\t\t\t\t\tif ((sel.Count() > 1) || (sel.selType != Selection::SelTypes::stream))\r\n\t\t\t\t\t\t\tsel.Clear();\r\n\t\t\t\t\t\tsel.selType = alt ? Selection::SelTypes::rectangle : Selection::SelTypes::stream;\r\n\t\t\t\t\t\tSetSelection(newPos, newPos);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tSelectionPosition anchorCurrent = newPos;\r\n\t\t\t\tif (shift)\r\n\t\t\t\t\tanchorCurrent = sel.IsRectangular() ?\r\n\t\t\t\t\t\tsel.Rectangular().anchor : sel.RangeMain().anchor;\r\n\t\t\t\tsel.selType = alt ? Selection::SelTypes::rectangle : Selection::SelTypes::stream;\r\n\t\t\t\tselectionUnit = TextUnit::character;\r\n\t\t\t\toriginalAnchorPos = sel.MainCaret();\r\n\t\t\t\tsel.Rectangular() = SelectionRange(newPos, anchorCurrent);\r\n\t\t\t\tSetRectangularRange();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tlastXChosen = static_cast<int>(pt.x) + xOffset;\r\n\tShowCaretAtCurrentPosition();\r\n}\r\n\r\nvoid Editor::RightButtonDownWithModifiers(Point pt, unsigned int, KeyMod modifiers) {\r\n\tif (NotifyMarginRightClick(pt, modifiers))\r\n\t\treturn;\r\n}\r\n\r\nbool Editor::PositionIsHotspot(Sci::Position position) const noexcept {\r\n\treturn vs.styles[pdoc->StyleIndexAt(position)].hotspot;\r\n}\r\n\r\nbool Editor::PointIsHotspot(Point pt) {\r\n\tconst Sci::Position pos = PositionFromLocation(pt, true, true);\r\n\tif (pos == Sci::invalidPosition)\r\n\t\treturn false;\r\n\treturn PositionIsHotspot(pos);\r\n}\r\n\r\nvoid Editor::SetHoverIndicatorPosition(Sci::Position position) {\r\n\tconst Sci::Position hoverIndicatorPosPrev = hoverIndicatorPos;\r\n\thoverIndicatorPos = Sci::invalidPosition;\r\n\tif (!vs.indicatorsDynamic)\r\n\t\treturn;\r\n\tif (position != Sci::invalidPosition) {\r\n\t\tfor (const IDecoration *deco : pdoc->decorations->View()) {\r\n\t\t\tif (vs.indicators[deco->Indicator()].IsDynamic()) {\r\n\t\t\t\tif (pdoc->decorations->ValueAt(deco->Indicator(), position)) {\r\n\t\t\t\t\thoverIndicatorPos = position;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (hoverIndicatorPosPrev != hoverIndicatorPos) {\r\n\t\tRedraw();\r\n\t}\r\n}\r\n\r\nvoid Editor::SetHoverIndicatorPoint(Point pt) {\r\n\tif (!vs.indicatorsDynamic) {\r\n\t\tSetHoverIndicatorPosition(Sci::invalidPosition);\r\n\t} else {\r\n\t\tSetHoverIndicatorPosition(PositionFromLocation(pt, true, true));\r\n\t}\r\n}\r\n\r\nvoid Editor::SetHotSpotRange(const Point *pt) {\r\n\tif (pt) {\r\n\t\tconst Sci::Position pos = PositionFromLocation(*pt, false, true);\r\n\r\n\t\t// If we don't limit this to word characters then the\r\n\t\t// range can encompass more than the run range and then\r\n\t\t// the underline will not be drawn properly.\r\n\t\tRange hsNew;\r\n\t\thsNew.start = pdoc->ExtendStyleRange(pos, -1, hotspotSingleLine);\r\n\t\thsNew.end = pdoc->ExtendStyleRange(pos, 1, hotspotSingleLine);\r\n\r\n\t\t// Only invalidate the range if the hotspot range has changed...\r\n\t\tif (!(hsNew == hotspot)) {\r\n\t\t\tif (hotspot.Valid()) {\r\n\t\t\t\tInvalidateRange(hotspot.start, hotspot.end);\r\n\t\t\t}\r\n\t\t\thotspot = hsNew;\r\n\t\t\tInvalidateRange(hotspot.start, hotspot.end);\r\n\t\t}\r\n\t} else {\r\n\t\tif (hotspot.Valid()) {\r\n\t\t\tInvalidateRange(hotspot.start, hotspot.end);\r\n\t\t}\r\n\t\thotspot = Range(Sci::invalidPosition);\r\n\t}\r\n}\r\n\r\nvoid Editor::ButtonMoveWithModifiers(Point pt, unsigned int, KeyMod modifiers) {\r\n\tif (ptMouseLast != pt) {\r\n\t\tDwellEnd(true);\r\n\t}\r\n\r\n\tSelectionPosition movePos = SPositionFromLocation(pt, false, false,\r\n\t\tAllowVirtualSpace(virtualSpaceOptions, sel.IsRectangular()));\r\n\tmovePos = MovePositionOutsideChar(movePos, sel.MainCaret() - movePos.Position());\r\n\r\n\tif (inDragDrop == DragDrop::initial) {\r\n\t\tif (DragThreshold(ptMouseLast, pt)) {\r\n\t\t\tChangeMouseCapture(false);\r\n\t\t\tSetDragPosition(movePos);\r\n\t\t\tCopySelectionRange(&drag);\r\n\t\t\tStartDrag();\r\n\t\t}\r\n\t\treturn;\r\n\t}\r\n\r\n\tptMouseLast = pt;\r\n\tPRectangle rcClient = GetClientRectangle();\r\n\tconst Point ptOrigin = GetVisibleOriginInMain();\r\n\trcClient.Move(0, -ptOrigin.y);\r\n\tif ((dwellDelay < TimeForever) && rcClient.Contains(pt)) {\r\n\t\tFineTickerStart(TickReason::dwell, dwellDelay, dwellDelay/10);\r\n\t}\r\n\t//Platform::DebugPrintf(\"Move %d %d\\n\", pt.x, pt.y);\r\n\tif (HaveMouseCapture()) {\r\n\r\n\t\t// Slow down autoscrolling/selection\r\n\t\tautoScrollTimer.ticksToWait -= timer.tickSize;\r\n\t\tif (autoScrollTimer.ticksToWait > 0)\r\n\t\t\treturn;\r\n\t\tautoScrollTimer.ticksToWait = autoScrollDelay;\r\n\r\n\t\t// Adjust selection\r\n\t\tif (posDrag.IsValid()) {\r\n\t\t\tSetDragPosition(movePos);\r\n\t\t} else {\r\n\t\t\tif (selectionUnit == TextUnit::character) {\r\n\t\t\t\tif (sel.selType == Selection::SelTypes::stream && FlagSet(modifiers, KeyMod::Alt) && mouseSelectionRectangularSwitch) {\r\n\t\t\t\t\tsel.selType = Selection::SelTypes::rectangle;\r\n\t\t\t\t}\r\n\t\t\t\tif (sel.IsRectangular()) {\r\n\t\t\t\t\tsel.Rectangular() = SelectionRange(movePos, sel.Rectangular().anchor);\r\n\t\t\t\t\tSetSelection(movePos, sel.RangeMain().anchor);\r\n\t\t\t\t} else if (sel.Count() > 1) {\r\n\t\t\t\t\tInvalidateSelection(sel.RangeMain(), false);\r\n\t\t\t\t\tconst SelectionRange range(movePos, sel.RangeMain().anchor);\r\n\t\t\t\t\tsel.TentativeSelection(range);\r\n\t\t\t\t\tInvalidateSelection(range, true);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tSetSelection(movePos, sel.RangeMain().anchor);\r\n\t\t\t\t}\r\n\t\t\t} else if (selectionUnit == TextUnit::word) {\r\n\t\t\t\t// Continue selecting by word\r\n\t\t\t\tif (movePos.Position() == wordSelectInitialCaretPos) {  // Didn't move\r\n\t\t\t\t\t// No need to do anything. Previously this case was lumped\r\n\t\t\t\t\t// in with \"Moved forward\", but that can be harmful in this\r\n\t\t\t\t\t// case: a handler for the NotifyDoubleClick re-adjusts\r\n\t\t\t\t\t// the selection for a fancier definition of \"word\" (for\r\n\t\t\t\t\t// example, in Perl it is useful to include the leading\r\n\t\t\t\t\t// '$', '%' or '@' on variables for word selection). In this\r\n\t\t\t\t\t// the ButtonMove() called via TickFor() for auto-scrolling\r\n\t\t\t\t\t// could result in the fancier word selection adjustment\r\n\t\t\t\t\t// being unmade.\r\n\t\t\t\t} else {\r\n\t\t\t\t\twordSelectInitialCaretPos = -1;\r\n\t\t\t\t\tWordSelection(movePos.Position());\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// Continue selecting by line\r\n\t\t\t\tLineSelection(movePos.Position(), lineAnchorPos, selectionUnit == TextUnit::wholeLine);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Autoscroll\r\n\t\tconst Sci::Line lineMove = DisplayFromPosition(movePos.Position());\r\n\t\tif (pt.y >= rcClient.bottom) {\r\n\t\t\tScrollTo(lineMove - LinesOnScreen() + 1);\r\n\t\t\tRedraw();\r\n\t\t} else if (pt.y < rcClient.top) {\r\n\t\t\tScrollTo(lineMove);\r\n\t\t\tRedraw();\r\n\t\t}\r\n\t\tEnsureCaretVisible(false, false, true);\r\n\r\n\t\tif (hotspot.Valid() && !PointIsHotspot(pt))\r\n\t\t\tSetHotSpotRange(nullptr);\r\n\r\n\t\tif (hotSpotClickPos != Sci::invalidPosition && PositionFromLocation(pt, true, true) != hotSpotClickPos) {\r\n\t\t\tif (inDragDrop == DragDrop::none) {\r\n\t\t\t\tDisplayCursor(Window::Cursor::text);\r\n\t\t\t}\r\n\t\t\thotSpotClickPos = Sci::invalidPosition;\r\n\t\t}\r\n\r\n\t} else {\r\n\t\tif (vs.fixedColumnWidth > 0) {\t// There is a margin\r\n\t\t\tif (PointInSelMargin(pt)) {\r\n\t\t\t\tDisplayCursor(GetMarginCursor(pt));\r\n\t\t\t\tSetHotSpotRange(nullptr);\r\n\t\t\t\tSetHoverIndicatorPosition(Sci::invalidPosition);\r\n\t\t\t\treturn; \t// No need to test for selection\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Display regular (drag) cursor over selection\r\n\t\tif (PointInSelection(pt) && !SelectionEmpty()) {\r\n\t\t\tDisplayCursor(Window::Cursor::arrow);\r\n\t\t\tSetHoverIndicatorPosition(Sci::invalidPosition);\r\n\t\t} else {\r\n\t\t\tSetHoverIndicatorPoint(pt);\r\n\t\t\tif (PointIsHotspot(pt)) {\r\n\t\t\t\tDisplayCursor(Window::Cursor::hand);\r\n\t\t\t\tSetHotSpotRange(&pt);\r\n\t\t\t} else {\r\n\t\t\t\tif (hoverIndicatorPos != Sci::invalidPosition)\r\n\t\t\t\t\tDisplayCursor(Window::Cursor::hand);\r\n\t\t\t\telse\r\n\t\t\t\t\tDisplayCursor(Window::Cursor::text);\r\n\t\t\t\tSetHotSpotRange(nullptr);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid Editor::ButtonUpWithModifiers(Point pt, unsigned int curTime, KeyMod modifiers) {\r\n\t//Platform::DebugPrintf(\"ButtonUp %d %d\\n\", HaveMouseCapture(), inDragDrop);\r\n\tSelectionPosition newPos = SPositionFromLocation(pt, false, false,\r\n\t\tAllowVirtualSpace(virtualSpaceOptions, sel.IsRectangular()));\r\n\tif (hoverIndicatorPos != Sci::invalidPosition)\r\n\t\tInvalidateRange(newPos.Position(), newPos.Position() + 1);\r\n\tnewPos = MovePositionOutsideChar(newPos, sel.MainCaret() - newPos.Position());\r\n\tif (inDragDrop == DragDrop::initial) {\r\n\t\tinDragDrop = DragDrop::none;\r\n\t\tSetEmptySelection(newPos);\r\n\t\tselectionUnit = TextUnit::character;\r\n\t\toriginalAnchorPos = sel.MainCaret();\r\n\t}\r\n\tif (hotSpotClickPos != Sci::invalidPosition && PointIsHotspot(pt)) {\r\n\t\thotSpotClickPos = Sci::invalidPosition;\r\n\t\tSelectionPosition newCharPos = SPositionFromLocation(pt, false, true, false);\r\n\t\tnewCharPos = MovePositionOutsideChar(newCharPos, -1);\r\n\t\tNotifyHotSpotReleaseClick(newCharPos.Position(), modifiers & KeyMod::Ctrl);\r\n\t}\r\n\tif (HaveMouseCapture()) {\r\n\t\tif (PointInSelMargin(pt)) {\r\n\t\t\tDisplayCursor(GetMarginCursor(pt));\r\n\t\t} else {\r\n\t\t\tDisplayCursor(Window::Cursor::text);\r\n\t\t\tSetHotSpotRange(nullptr);\r\n\t\t}\r\n\t\tptMouseLast = pt;\r\n\t\tChangeMouseCapture(false);\r\n\t\tNotifyIndicatorClick(false, newPos.Position(), modifiers);\r\n\t\tif (inDragDrop == DragDrop::dragging) {\r\n\t\t\tconst SelectionPosition selStart = SelectionStart();\r\n\t\t\tconst SelectionPosition selEnd = SelectionEnd();\r\n\t\t\tif (selStart < selEnd) {\r\n\t\t\t\tif (drag.Length()) {\r\n\t\t\t\t\tconst Sci::Position length = drag.Length();\r\n\t\t\t\t\tif (FlagSet(modifiers, KeyMod::Ctrl)) {\r\n\t\t\t\t\t\tconst Sci::Position lengthInserted = pdoc->InsertString(\r\n\t\t\t\t\t\t\tnewPos.Position(), drag.Data(), length);\r\n\t\t\t\t\t\tif (lengthInserted > 0) {\r\n\t\t\t\t\t\t\tSetSelection(newPos.Position(), newPos.Position() + lengthInserted);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if (newPos < selStart) {\r\n\t\t\t\t\t\tpdoc->DeleteChars(selStart.Position(), drag.Length());\r\n\t\t\t\t\t\tconst Sci::Position lengthInserted = pdoc->InsertString(\r\n\t\t\t\t\t\t\tnewPos.Position(), drag.Data(), length);\r\n\t\t\t\t\t\tif (lengthInserted > 0) {\r\n\t\t\t\t\t\t\tSetSelection(newPos.Position(), newPos.Position() + lengthInserted);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if (newPos > selEnd) {\r\n\t\t\t\t\t\tpdoc->DeleteChars(selStart.Position(), drag.Length());\r\n\t\t\t\t\t\tnewPos.Add(-static_cast<Sci::Position>(drag.Length()));\r\n\t\t\t\t\t\tconst Sci::Position lengthInserted = pdoc->InsertString(\r\n\t\t\t\t\t\t\tnewPos.Position(), drag.Data(), length);\r\n\t\t\t\t\t\tif (lengthInserted > 0) {\r\n\t\t\t\t\t\t\tSetSelection(newPos.Position(), newPos.Position() + lengthInserted);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tSetEmptySelection(newPos.Position());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdrag.Clear();\r\n\t\t\t\t}\r\n\t\t\t\tselectionUnit = TextUnit::character;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (selectionUnit == TextUnit::character) {\r\n\t\t\t\tif (sel.Count() > 1) {\r\n\t\t\t\t\tsel.RangeMain() =\r\n\t\t\t\t\t\tSelectionRange(newPos, sel.Range(sel.Count() - 1).anchor);\r\n\t\t\t\t\tInvalidateWholeSelection();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tSetSelection(newPos, sel.RangeMain().anchor);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tsel.CommitTentative();\r\n\t\t}\r\n\t\tSetRectangularRange();\r\n\t\tlastClickTime = curTime;\r\n\t\tlastClick = pt;\r\n\t\tlastXChosen = static_cast<int>(pt.x) + xOffset;\r\n\t\tif (sel.selType == Selection::SelTypes::stream) {\r\n\t\t\tSetLastXChosen();\r\n\t\t}\r\n\t\tinDragDrop = DragDrop::none;\r\n\t\tEnsureCaretVisible(false);\r\n\t}\r\n}\r\n\r\nbool Editor::Idle() {\r\n\tNotifyUpdateUI();\r\n\r\n\tbool needWrap = Wrapping() && wrapPending.NeedsWrap();\r\n\r\n\tif (needWrap) {\r\n\t\t// Wrap lines during idle.\r\n\t\tWrapLines(WrapScope::wsIdle);\r\n\t\t// No more wrapping\r\n\t\tneedWrap = wrapPending.NeedsWrap();\r\n\t} else if (needIdleStyling) {\r\n\t\tIdleStyle();\r\n\t}\r\n\r\n\t// Add more idle things to do here, but make sure idleDone is\r\n\t// set correctly before the function returns. returning\r\n\t// false will stop calling this idle function until SetIdle() is\r\n\t// called again.\r\n\r\n\tconst bool idleDone = !needWrap && !needIdleStyling; // && thatDone && theOtherThingDone...\r\n\r\n\treturn !idleDone;\r\n}\r\n\r\nvoid Editor::TickFor(TickReason reason) {\r\n\tswitch (reason) {\r\n\t\tcase TickReason::caret:\r\n\t\t\tcaret.on = !caret.on;\r\n\t\t\tif (caret.active) {\r\n\t\t\t\tInvalidateCaret();\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase TickReason::scroll:\r\n\t\t\t// Auto scroll\r\n\t\t\tButtonMoveWithModifiers(ptMouseLast, 0, KeyMod::Norm);\r\n\t\t\tbreak;\r\n\t\tcase TickReason::widen:\r\n\t\t\tSetScrollBars();\r\n\t\t\tFineTickerCancel(TickReason::widen);\r\n\t\t\tbreak;\r\n\t\tcase TickReason::dwell:\r\n\t\t\tif ((!HaveMouseCapture()) &&\r\n\t\t\t\t(ptMouseLast.y >= 0)) {\r\n\t\t\t\tdwelling = true;\r\n\t\t\t\tNotifyDwelling(ptMouseLast, dwelling);\r\n\t\t\t}\r\n\t\t\tFineTickerCancel(TickReason::dwell);\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\t// tickPlatform handled by subclass\r\n\t\t\tbreak;\r\n\t}\r\n}\r\n\r\n// FineTickerStart is be overridden by subclasses that support fine ticking so\r\n// this method should never be called.\r\nbool Editor::FineTickerRunning(TickReason) {\r\n\tassert(false);\r\n\treturn false;\r\n}\r\n\r\n// FineTickerStart is be overridden by subclasses that support fine ticking so\r\n// this method should never be called.\r\nvoid Editor::FineTickerStart(TickReason, int, int) {\r\n\tassert(false);\r\n}\r\n\r\n// FineTickerCancel is be overridden by subclasses that support fine ticking so\r\n// this method should never be called.\r\nvoid Editor::FineTickerCancel(TickReason) {\r\n\tassert(false);\r\n}\r\n\r\nvoid Editor::ChangeMouseCapture(bool on) {\r\n\tSetMouseCapture(on);\r\n\t// While mouse captured want timer to scroll automatically\r\n\tif (on) {\r\n\t\tFineTickerStart(TickReason::scroll, 100, 10);\r\n\t} else {\r\n\t\tFineTickerCancel(TickReason::scroll);\r\n\t}\r\n}\r\n\r\nvoid Editor::SetFocusState(bool focusState) {\r\n\tconst bool changing = hasFocus != focusState;\r\n\thasFocus = focusState;\r\n\tif (changing) {\r\n\t\tRedraw();\r\n\t}\r\n\tNotifyFocus(hasFocus);\r\n\tif (!hasFocus) {\r\n\t\tCancelModes();\r\n\t}\r\n\tShowCaretAtCurrentPosition();\r\n}\r\n\r\nvoid Editor::UpdateBaseElements() {\r\n\t// Overridden by subclasses\r\n}\r\n\r\nSci::Position Editor::PositionAfterArea(PRectangle rcArea) const {\r\n\t// The start of the document line after the display line after the area\r\n\t// This often means that the line after a modification is restyled which helps\r\n\t// detect multiline comment additions and heals single line comments\r\n\tconst Sci::Line lineAfter = TopLineOfMain() + static_cast<Sci::Line>(rcArea.bottom - 1) / vs.lineHeight + 1;\r\n\tif (lineAfter < pcs->LinesDisplayed())\r\n\t\treturn pdoc->LineStart(pcs->DocFromDisplay(lineAfter) + 1);\r\n\telse\r\n\t\treturn pdoc->Length();\r\n}\r\n\r\n// Style to a position within the view. If this causes a change at end of last line then\r\n// affects later lines so style all the viewed text.\r\nvoid Editor::StyleToPositionInView(Sci::Position pos) {\r\n\tSci::Position endWindow = PositionAfterArea(GetClientDrawingRectangle());\r\n\tif (pos > endWindow)\r\n\t\tpos = endWindow;\r\n\tconst int styleAtEnd = pdoc->StyleIndexAt(pos-1);\r\n\tpdoc->EnsureStyledTo(pos);\r\n\tif ((endWindow > pos) && (styleAtEnd != pdoc->StyleIndexAt(pos-1))) {\r\n\t\t// Style at end of line changed so is multi-line change like starting a comment\r\n\t\t// so require rest of window to be styled.\r\n\t\tDiscardOverdraw();\t// Prepared bitmaps may be invalid\r\n\t\t// DiscardOverdraw may have truncated client drawing area so recalculate endWindow\r\n\t\tendWindow = PositionAfterArea(GetClientDrawingRectangle());\r\n\t\tpdoc->EnsureStyledTo(endWindow);\r\n\t}\r\n}\r\n\r\nSci::Position Editor::PositionAfterMaxStyling(Sci::Position posMax, bool scrolling) const {\r\n\tif (SynchronousStylingToVisible()) {\r\n\t\t// Both states do not limit styling\r\n\t\treturn posMax;\r\n\t}\r\n\r\n\t// Try to keep time taken by styling reasonable so interaction remains smooth.\r\n\t// When scrolling, allow less time to ensure responsive\r\n\tconst double secondsAllowed = scrolling ? 0.005 : 0.02;\r\n\r\n\tconst size_t actionsInAllowedTime = std::clamp<Sci::Line>(\r\n\t\tpdoc->durationStyleOneByte.ActionsInAllowedTime(secondsAllowed),\r\n\t\t0x200, 0x20000);\r\n\tconst Sci::Line lineLast = pdoc->LineFromPositionAfter(pdoc->SciLineFromPosition(pdoc->GetEndStyled()), actionsInAllowedTime);\r\n\tconst Sci::Line stylingMaxLine = std::min(lineLast, pdoc->LinesTotal());\r\n\r\n\treturn std::min(pdoc->LineStart(stylingMaxLine), posMax);\r\n}\r\n\r\nvoid Editor::StartIdleStyling(bool truncatedLastStyling) {\r\n\tif ((idleStyling == IdleStyling::All) || (idleStyling == IdleStyling::AfterVisible)) {\r\n\t\tif (pdoc->GetEndStyled() < pdoc->Length()) {\r\n\t\t\t// Style remainder of document in idle time\r\n\t\t\tneedIdleStyling = true;\r\n\t\t}\r\n\t} else if (truncatedLastStyling) {\r\n\t\tneedIdleStyling = true;\r\n\t}\r\n\r\n\tif (needIdleStyling) {\r\n\t\tSetIdle(true);\r\n\t}\r\n}\r\n\r\n// Style for an area but bound the amount of styling to remain responsive\r\nvoid Editor::StyleAreaBounded(PRectangle rcArea, bool scrolling) {\r\n\tconst Sci::Position posAfterArea = PositionAfterArea(rcArea);\r\n\tconst Sci::Position posAfterMax = PositionAfterMaxStyling(posAfterArea, scrolling);\r\n\tif (posAfterMax < posAfterArea) {\r\n\t\t// Idle styling may be performed before current visible area\r\n\t\t// Style a bit now then style further in idle time\r\n\t\tpdoc->StyleToAdjustingLineDuration(posAfterMax);\r\n\t} else {\r\n\t\t// Can style all wanted now.\r\n\t\tStyleToPositionInView(posAfterArea);\r\n\t}\r\n\tStartIdleStyling(posAfterMax < posAfterArea);\r\n}\r\n\r\nvoid Editor::IdleStyle() {\r\n\tconst Sci::Position posAfterArea = PositionAfterArea(GetClientRectangle());\r\n\tconst Sci::Position endGoal = (idleStyling >= IdleStyling::AfterVisible) ?\r\n\t\tpdoc->Length() : posAfterArea;\r\n\tconst Sci::Position posAfterMax = PositionAfterMaxStyling(endGoal, false);\r\n\tpdoc->StyleToAdjustingLineDuration(posAfterMax);\r\n\tif (pdoc->GetEndStyled() >= endGoal) {\r\n\t\tneedIdleStyling = false;\r\n\t}\r\n}\r\n\r\nvoid Editor::IdleWork() {\r\n\t// Style the line after the modification as this allows modifications that change just the\r\n\t// line of the modification to heal instead of propagating to the rest of the window.\r\n\tif (FlagSet(workNeeded.items, WorkItems::style)) {\r\n\t\tStyleToPositionInView(pdoc->LineStart(pdoc->LineFromPosition(workNeeded.upTo) + 2));\r\n\t}\r\n\tNotifyUpdateUI();\r\n\tworkNeeded.Reset();\r\n}\r\n\r\nvoid Editor::QueueIdleWork(WorkItems items, Sci::Position upTo) {\r\n\tworkNeeded.Need(items, upTo);\r\n}\r\n\r\nint Editor::SupportsFeature(Supports feature) {\r\n\tAutoSurface surface(this);\r\n\treturn surface->SupportsFeature(feature);\r\n}\r\n\r\nbool Editor::PaintContains(PRectangle rc) {\r\n\tif (rc.Empty()) {\r\n\t\treturn true;\r\n\t} else {\r\n\t\treturn rcPaint.Contains(rc);\r\n\t}\r\n}\r\n\r\nbool Editor::PaintContainsMargin() {\r\n\tif (HasMarginWindow()) {\r\n\t\t// With separate margin view, paint of text view\r\n\t\t// never contains margin.\r\n\t\treturn false;\r\n\t}\r\n\tPRectangle rcSelMargin = GetClientRectangle();\r\n\trcSelMargin.right = static_cast<XYPOSITION>(vs.textStart);\r\n\treturn PaintContains(rcSelMargin);\r\n}\r\n\r\nvoid Editor::CheckForChangeOutsidePaint(Range r) {\r\n\tif (paintState == PaintState::painting && !paintingAllText) {\r\n\t\t//Platform::DebugPrintf(\"Checking range in paint %d-%d\\n\", r.start, r.end);\r\n\t\tif (!r.Valid())\r\n\t\t\treturn;\r\n\r\n\t\tPRectangle rcRange = RectangleFromRange(r, 0);\r\n\t\tconst PRectangle rcText = GetTextRectangle();\r\n\t\tif (rcRange.top < rcText.top) {\r\n\t\t\trcRange.top = rcText.top;\r\n\t\t}\r\n\t\tif (rcRange.bottom > rcText.bottom) {\r\n\t\t\trcRange.bottom = rcText.bottom;\r\n\t\t}\r\n\r\n\t\tif (!PaintContains(rcRange)) {\r\n\t\t\tAbandonPaint();\r\n\t\t\tpaintAbandonedByStyling = true;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid Editor::SetBraceHighlight(Sci::Position pos0, Sci::Position pos1, int matchStyle) {\r\n\tif ((pos0 != braces[0]) || (pos1 != braces[1]) || (matchStyle != bracesMatchStyle)) {\r\n\t\tif ((braces[0] != pos0) || (matchStyle != bracesMatchStyle)) {\r\n\t\t\tCheckForChangeOutsidePaint(Range(braces[0]));\r\n\t\t\tCheckForChangeOutsidePaint(Range(pos0));\r\n\t\t\tbraces[0] = pos0;\r\n\t\t}\r\n\t\tif ((braces[1] != pos1) || (matchStyle != bracesMatchStyle)) {\r\n\t\t\tCheckForChangeOutsidePaint(Range(braces[1]));\r\n\t\t\tCheckForChangeOutsidePaint(Range(pos1));\r\n\t\t\tbraces[1] = pos1;\r\n\t\t}\r\n\t\tbracesMatchStyle = matchStyle;\r\n\t\tif (paintState == PaintState::notPainting) {\r\n\t\t\tRedraw();\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid Editor::SetAnnotationHeights(Sci::Line start, Sci::Line end) {\r\n\tif (vs.annotationVisible != AnnotationVisible::Hidden) {\r\n\t\tRefreshStyleData();\r\n\t\tbool changedHeight = false;\r\n\t\tfor (Sci::Line line=start; line<end && line<pdoc->LinesTotal(); line++) {\r\n\t\t\tint linesWrapped = 1;\r\n\t\t\tif (Wrapping()) {\r\n\t\t\t\tAutoSurface surface(this);\r\n\t\t\t\tstd::shared_ptr<LineLayout> ll = view.RetrieveLineLayout(line, *this);\r\n\t\t\t\tif (surface && ll) {\r\n\t\t\t\t\tview.LayoutLine(*this, surface, vs, ll.get(), wrapWidth);\r\n\t\t\t\t\tlinesWrapped = ll->lines;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (pcs->SetHeight(line, pdoc->AnnotationLines(line) + linesWrapped))\r\n\t\t\t\tchangedHeight = true;\r\n\t\t}\r\n\t\tif (changedHeight) {\r\n\t\t\tSetScrollBars();\r\n\t\t\tSetVerticalScrollPos();\r\n\t\t\tRedraw();\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid Editor::SetDocPointer(Document *document) {\r\n\t//Platform::DebugPrintf(\"** %x setdoc to %x\\n\", pdoc, document);\r\n\tpdoc->RemoveWatcher(this, nullptr);\r\n\tpdoc->Release();\r\n\tif (!document) {\r\n\t\tpdoc = new Document(DocumentOption::Default);\r\n\t} else {\r\n\t\tpdoc = document;\r\n\t}\r\n\tpdoc->AddRef();\r\n\tpcs = ContractionStateCreate(pdoc->IsLarge());\r\n\r\n\t// Ensure all positions within document\r\n\tsel.Clear();\r\n\ttargetRange = SelectionSegment();\r\n\r\n\tbraces[0] = Sci::invalidPosition;\r\n\tbraces[1] = Sci::invalidPosition;\r\n\r\n\tvs.ReleaseAllExtendedStyles();\r\n\r\n\tSetRepresentations();\r\n\r\n\t// Reset the contraction state to fully shown.\r\n\tpcs->Clear();\r\n\tpcs->InsertLines(0, pdoc->LinesTotal() - 1);\r\n\tSetAnnotationHeights(0, pdoc->LinesTotal());\r\n\tview.llc.Deallocate();\r\n\tNeedWrapping();\r\n\r\n\thotspot = Range(Sci::invalidPosition);\r\n\thoverIndicatorPos = Sci::invalidPosition;\r\n\r\n\tview.ClearAllTabstops();\r\n\r\n\tpdoc->AddWatcher(this, nullptr);\r\n\tSetScrollBars();\r\n\tRedraw();\r\n}\r\n\r\nvoid Editor::SetAnnotationVisible(AnnotationVisible visible) {\r\n\tif (vs.annotationVisible != visible) {\r\n\t\tconst bool changedFromOrToHidden = ((vs.annotationVisible != AnnotationVisible::Hidden) != (visible != AnnotationVisible::Hidden));\r\n\t\tvs.annotationVisible = visible;\r\n\t\tif (changedFromOrToHidden) {\r\n\t\t\tconst int dir = (vs.annotationVisible!= AnnotationVisible::Hidden) ? 1 : -1;\r\n\t\t\tfor (Sci::Line line=0; line<pdoc->LinesTotal(); line++) {\r\n\t\t\t\tconst int annotationLines = pdoc->AnnotationLines(line);\r\n\t\t\t\tif (annotationLines > 0) {\r\n\t\t\t\t\tpcs->SetHeight(line, pcs->GetHeight(line) + annotationLines * dir);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSetScrollBars();\r\n\t\t}\r\n\t\tRedraw();\r\n\t}\r\n}\r\n\r\nvoid Editor::SetEOLAnnotationVisible(EOLAnnotationVisible visible) {\r\n\tif (vs.eolAnnotationVisible != visible) {\r\n\t\tvs.eolAnnotationVisible = visible;\r\n\t\tRedraw();\r\n\t}\r\n}\r\n\r\n/**\r\n * Recursively expand a fold, making lines visible except where they have an unexpanded parent.\r\n */\r\nSci::Line Editor::ExpandLine(Sci::Line line) {\r\n\tconst Sci::Line lineMaxSubord = pdoc->GetLastChild(line);\r\n\tline++;\r\n\tSci::Line lineStart = line;\r\n\twhile (line <= lineMaxSubord) {\r\n\t\tconst FoldLevel level = pdoc->GetFoldLevel(line);\r\n\t\tif (LevelIsHeader(level)) {\r\n\t\t\tpcs->SetVisible(lineStart, line, true);\r\n\t\t\tif (pcs->GetExpanded(line)) {\r\n\t\t\t\tline = ExpandLine(line);\r\n\t\t\t} else {\r\n\t\t\t\tline = pdoc->GetLastChild(line);\r\n\t\t\t}\r\n\t\t\tlineStart = line + 1;\r\n\t\t}\r\n\t\tline++;\r\n\t}\r\n\tif (lineStart <= lineMaxSubord) {\r\n\t\tpcs->SetVisible(lineStart, lineMaxSubord, true);\r\n\t}\r\n\treturn lineMaxSubord;\r\n}\r\n\r\nvoid Editor::SetFoldExpanded(Sci::Line lineDoc, bool expanded) {\r\n\tif (pcs->SetExpanded(lineDoc, expanded)) {\r\n\t\tRedrawSelMargin();\r\n\t}\r\n}\r\n\r\nvoid Editor::FoldLine(Sci::Line line, FoldAction action) {\r\n\tif (line >= 0) {\r\n\t\tif (action == FoldAction::Toggle) {\r\n\t\t\tif (!LevelIsHeader(pdoc->GetFoldLevel(line))) {\r\n\t\t\t\tline = pdoc->GetFoldParent(line);\r\n\t\t\t\tif (line < 0)\r\n\t\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\taction = (pcs->GetExpanded(line)) ? FoldAction::Contract : FoldAction::Expand;\r\n\t\t}\r\n\r\n\t\tif (action == FoldAction::Contract) {\r\n\t\t\tconst Sci::Line lineMaxSubord = pdoc->GetLastChild(line);\r\n\t\t\tif (lineMaxSubord > line) {\r\n\t\t\t\tpcs->SetExpanded(line, false);\r\n\t\t\t\tpcs->SetVisible(line + 1, lineMaxSubord, false);\r\n\r\n\t\t\t\tconst Sci::Line lineCurrent =\r\n\t\t\t\t\tpdoc->SciLineFromPosition(sel.MainCaret());\r\n\t\t\t\tif (lineCurrent > line && lineCurrent <= lineMaxSubord) {\r\n\t\t\t\t\t// This does not re-expand the fold\r\n\t\t\t\t\tEnsureCaretVisible();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\tif (!(pcs->GetVisible(line))) {\r\n\t\t\t\tEnsureLineVisible(line, false);\r\n\t\t\t\tGoToLine(line);\r\n\t\t\t}\r\n\t\t\tpcs->SetExpanded(line, true);\r\n\t\t\tExpandLine(line);\r\n\t\t}\r\n\r\n\t\tSetScrollBars();\r\n\t\tRedraw();\r\n\t}\r\n}\r\n\r\nvoid Editor::FoldExpand(Sci::Line line, FoldAction action, FoldLevel level) {\r\n\tbool expanding = action == FoldAction::Expand;\r\n\tif (action == FoldAction::Toggle) {\r\n\t\texpanding = !pcs->GetExpanded(line);\r\n\t}\r\n\t// Ensure child lines lexed and fold information extracted before\r\n\t// flipping the state.\r\n\tpdoc->GetLastChild(line, LevelNumberPart(level));\r\n\tSetFoldExpanded(line, expanding);\r\n\tif (expanding && (pcs->HiddenLines() == 0))\r\n\t\t// Nothing to do\r\n\t\treturn;\r\n\tconst Sci::Line lineMaxSubord = pdoc->GetLastChild(line, LevelNumberPart(level));\r\n\tline++;\r\n\tpcs->SetVisible(line, lineMaxSubord, expanding);\r\n\twhile (line <= lineMaxSubord) {\r\n\t\tconst FoldLevel levelLine = pdoc->GetFoldLevel(line);\r\n\t\tif (LevelIsHeader(levelLine)) {\r\n\t\t\tSetFoldExpanded(line, expanding);\r\n\t\t}\r\n\t\tline++;\r\n\t}\r\n\tSetScrollBars();\r\n\tRedraw();\r\n}\r\n\r\nSci::Line Editor::ContractedFoldNext(Sci::Line lineStart) const {\r\n\tfor (Sci::Line line = lineStart; line<pdoc->LinesTotal();) {\r\n\t\tif (!pcs->GetExpanded(line) && LevelIsHeader(pdoc->GetFoldLevel(line)))\r\n\t\t\treturn line;\r\n\t\tline = pcs->ContractedNext(line+1);\r\n\t\tif (line < 0)\r\n\t\t\treturn -1;\r\n\t}\r\n\r\n\treturn -1;\r\n}\r\n\r\n/**\r\n * Recurse up from this line to find any folds that prevent this line from being visible\r\n * and unfold them all.\r\n */\r\nvoid Editor::EnsureLineVisible(Sci::Line lineDoc, bool enforcePolicy) {\r\n\r\n\t// In case in need of wrapping to ensure DisplayFromDoc works.\r\n\tif (lineDoc >= wrapPending.start) {\r\n\t\tif (WrapLines(WrapScope::wsAll)) {\r\n\t\t\tRedraw();\r\n\t\t}\r\n\t}\r\n\r\n\tif (!pcs->GetVisible(lineDoc)) {\r\n\t\t// Back up to find a non-blank line\r\n\t\tSci::Line lookLine = lineDoc;\r\n\t\tFoldLevel lookLineLevel = pdoc->GetFoldLevel(lookLine);\r\n\t\twhile ((lookLine > 0) && LevelIsWhitespace(lookLineLevel)) {\r\n\t\t\tlookLineLevel = pdoc->GetFoldLevel(--lookLine);\r\n\t\t}\r\n\t\tSci::Line lineParent = pdoc->GetFoldParent(lookLine);\r\n\t\tif (lineParent < 0) {\r\n\t\t\t// Backed up to a top level line, so try to find parent of initial line\r\n\t\t\tlineParent = pdoc->GetFoldParent(lineDoc);\r\n\t\t}\r\n\t\tif (lineParent >= 0) {\r\n\t\t\tif (lineDoc != lineParent)\r\n\t\t\t\tEnsureLineVisible(lineParent, enforcePolicy);\r\n\t\t\tif (!pcs->GetExpanded(lineParent)) {\r\n\t\t\t\tpcs->SetExpanded(lineParent, true);\r\n\t\t\t\tExpandLine(lineParent);\r\n\t\t\t}\r\n\t\t}\r\n\t\tSetScrollBars();\r\n\t\tRedraw();\r\n\t}\r\n\tif (enforcePolicy) {\r\n\t\tconst Sci::Line lineDisplay = pcs->DisplayFromDoc(lineDoc);\r\n\t\tif (FlagSet(visiblePolicy.policy, VisiblePolicy::Slop)) {\r\n\t\t\tif ((topLine > lineDisplay) || ((FlagSet(visiblePolicy.policy, VisiblePolicy::Strict)) && (topLine + visiblePolicy.slop > lineDisplay))) {\r\n\t\t\t\tSetTopLine(std::clamp<Sci::Line>(lineDisplay - visiblePolicy.slop, 0, MaxScrollPos()));\r\n\t\t\t\tSetVerticalScrollPos();\r\n\t\t\t\tRedraw();\r\n\t\t\t} else if ((lineDisplay > topLine + LinesOnScreen() - 1) ||\r\n\t\t\t        ((FlagSet(visiblePolicy.policy, VisiblePolicy::Strict)) && (lineDisplay > topLine + LinesOnScreen() - 1 - visiblePolicy.slop))) {\r\n\t\t\t\tSetTopLine(std::clamp<Sci::Line>(lineDisplay - LinesOnScreen() + 1 + visiblePolicy.slop, 0, MaxScrollPos()));\r\n\t\t\t\tSetVerticalScrollPos();\r\n\t\t\t\tRedraw();\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif ((topLine > lineDisplay) || (lineDisplay > topLine + LinesOnScreen() - 1) || (FlagSet(visiblePolicy.policy, VisiblePolicy::Strict))) {\r\n\t\t\t\tSetTopLine(std::clamp<Sci::Line>(lineDisplay - LinesOnScreen() / 2 + 1, 0, MaxScrollPos()));\r\n\t\t\t\tSetVerticalScrollPos();\r\n\t\t\t\tRedraw();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid Editor::FoldAll(FoldAction action) {\r\n\tconst Sci::Line maxLine = pdoc->LinesTotal();\r\n\tconst bool contractAll = FlagSet(action, FoldAction::ContractEveryLevel);\r\n\taction = static_cast<FoldAction>(static_cast<int>(action) & ~static_cast<int>(FoldAction::ContractEveryLevel));\r\n\tbool expanding = action == FoldAction::Expand;\r\n\tif (!expanding) {\r\n\t\tpdoc->EnsureStyledTo(pdoc->Length());\r\n\t}\r\n\tSci::Line line = 0;\r\n\tif (action == FoldAction::Toggle) {\r\n\t\t// Discover current state\r\n\t\tfor (; line < maxLine; line++) {\r\n\t\t\tif (LevelIsHeader(pdoc->GetFoldLevel(line))) {\r\n\t\t\t\texpanding = !pcs->GetExpanded(line);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (expanding) {\r\n\t\tpcs->SetVisible(0, maxLine-1, true);\r\n\t\tpcs->ExpandAll();\r\n\t} else {\r\n\t\tfor (; line < maxLine; line++) {\r\n\t\t\tconst FoldLevel level = pdoc->GetFoldLevel(line);\r\n\t\t\tif (LevelIsHeader(level)) {\r\n\t\t\t\tif (FoldLevel::Base == LevelNumberPart(level)) {\r\n\t\t\t\t\tSetFoldExpanded(line, false);\r\n\t\t\t\t\tconst Sci::Line lineMaxSubord = pdoc->GetLastChild(line);\r\n\t\t\t\t\tif (lineMaxSubord > line) {\r\n\t\t\t\t\t\tpcs->SetVisible(line + 1, lineMaxSubord, false);\r\n\t\t\t\t\t\tif (!contractAll) {\r\n\t\t\t\t\t\t\tline = lineMaxSubord;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (contractAll) {\r\n\t\t\t\t\tSetFoldExpanded(line, false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tSetScrollBars();\r\n\tRedraw();\r\n}\r\n\r\nvoid Editor::FoldChanged(Sci::Line line, FoldLevel levelNow, FoldLevel levelPrev) {\r\n\tif (LevelIsHeader(levelNow)) {\r\n\t\tif (!LevelIsHeader(levelPrev)) {\r\n\t\t\t// Adding a fold point.\r\n\t\t\tif (pcs->SetExpanded(line, true)) {\r\n\t\t\t\tRedrawSelMargin();\r\n\t\t\t}\r\n\t\t\tFoldExpand(line, FoldAction::Expand, levelPrev);\r\n\t\t}\r\n\t} else if (LevelIsHeader(levelPrev)) {\r\n\t\tconst Sci::Line prevLine = line - 1;\r\n\t\tconst FoldLevel prevLineLevel = pdoc->GetFoldLevel(prevLine);\r\n\r\n\t\t// Combining two blocks where the first block is collapsed (e.g. by deleting the line(s) which separate(s) the two blocks)\r\n\t\tif ((LevelNumber(prevLineLevel) == LevelNumber(levelNow)) && !pcs->GetVisible(prevLine))\r\n\t\t\tFoldLine(pdoc->GetFoldParent(prevLine), FoldAction::Expand);\r\n\r\n\t\tif (!pcs->GetExpanded(line)) {\r\n\t\t\t// Removing the fold from one that has been contracted so should expand\r\n\t\t\t// otherwise lines are left invisible with no way to make them visible\r\n\t\t\tif (pcs->SetExpanded(line, true)) {\r\n\t\t\t\tRedrawSelMargin();\r\n\t\t\t}\r\n\t\t\t// Combining two blocks where the second one is collapsed (e.g. by adding characters in the line which separates the two blocks)\r\n\t\t\tFoldExpand(line, FoldAction::Expand, levelPrev);\r\n\t\t}\r\n\t}\r\n\tif (!LevelIsWhitespace(levelNow) &&\r\n\t        (LevelNumber(levelPrev) > LevelNumber(levelNow))) {\r\n\t\tif (pcs->HiddenLines()) {\r\n\t\t\t// See if should still be hidden\r\n\t\t\tconst Sci::Line parentLine = pdoc->GetFoldParent(line);\r\n\t\t\tif ((parentLine < 0) || (pcs->GetExpanded(parentLine) && pcs->GetVisible(parentLine))) {\r\n\t\t\t\tpcs->SetVisible(line, line, true);\r\n\t\t\t\tSetScrollBars();\r\n\t\t\t\tRedraw();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Combining two blocks where the first one is collapsed (e.g. by adding characters in the line which separates the two blocks)\r\n\tif (!LevelIsWhitespace(levelNow) && (LevelNumber(levelPrev) < LevelNumber(levelNow))) {\r\n\t\tif (pcs->HiddenLines()) {\r\n\t\t\tconst Sci::Line parentLine = pdoc->GetFoldParent(line);\r\n\t\t\tif (!pcs->GetExpanded(parentLine) && pcs->GetVisible(line))\r\n\t\t\t\tFoldLine(parentLine, FoldAction::Expand);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid Editor::NeedShown(Sci::Position pos, Sci::Position len) {\r\n\tif (FlagSet(foldAutomatic, AutomaticFold::Show)) {\r\n\t\tconst Sci::Line lineStart = pdoc->SciLineFromPosition(pos);\r\n\t\tconst Sci::Line lineEnd = pdoc->SciLineFromPosition(pos+len);\r\n\t\tfor (Sci::Line line = lineStart; line <= lineEnd; line++) {\r\n\t\t\tEnsureLineVisible(line, false);\r\n\t\t}\r\n\t} else {\r\n\t\tNotifyNeedShown(pos, len);\r\n\t}\r\n}\r\n\r\nSci::Position Editor::GetTag(char *tagValue, int tagNumber) {\r\n\tconst char *text = nullptr;\r\n\tSci::Position length = 0;\r\n\tif ((tagNumber >= 1) && (tagNumber <= 9)) {\r\n\t\tchar name[3] = \"\\\\?\";\r\n\t\tname[1] = static_cast<char>(tagNumber + '0');\r\n\t\tlength = 2;\r\n\t\ttext = pdoc->SubstituteByPosition(name, &length);\r\n\t}\r\n\tif (tagValue) {\r\n\t\tif (text)\r\n\t\t\tmemcpy(tagValue, text, length + 1);\r\n\t\telse\r\n\t\t\t*tagValue = '\\0';\r\n\t}\r\n\treturn length;\r\n}\r\n\r\nSci::Position Editor::ReplaceTarget(ReplaceType replaceType, std::string_view text) {\r\n\tUndoGroup ug(pdoc);\r\n\r\n\tstd::string substituted;\t// Copy in case of re-entrance\r\n\r\n\tif (replaceType == ReplaceType::patterns) {\r\n\t\tSci::Position length = text.length();\r\n\t\tconst char *p = pdoc->SubstituteByPosition(text.data(), &length);\r\n\t\tif (!p) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tsubstituted.assign(p, length);\r\n\t\ttext = substituted;\r\n\t}\r\n\r\n\tif (replaceType == ReplaceType::minimal) {\r\n\t\t// Check for prefix and suffix and reduce text and target to match.\r\n\t\t// This is performed with Range which doesn't support virtual space.\r\n\t\tRange range(targetRange.start.Position(), targetRange.end.Position());\r\n\t\tpdoc->TrimReplacement(text, range);\r\n\t\t// Re-apply virtual space to start if start position didn't change.\r\n\t\t// Don't bother with end as its virtual space is not used\r\n\t\tconst SelectionPosition start(range.start == targetRange.start.Position() ?\r\n\t\t\ttargetRange.start : SelectionPosition(range.start));\r\n\t\ttargetRange = SelectionSegment(start, SelectionPosition(range.end));\r\n\t}\r\n\r\n\t// Make a copy of targetRange in case callbacks use target\r\n\tSelectionSegment replaceRange = targetRange;\r\n\r\n\t// Remove the text inside the range\r\n\tif (replaceRange.Length() > 0)\r\n\t\tpdoc->DeleteChars(replaceRange.start.Position(), replaceRange.Length());\r\n\r\n\t// Realize virtual space of target start\r\n\tconst Sci::Position startAfterSpaceInsertion = RealizeVirtualSpace(replaceRange.start.Position(), replaceRange.start.VirtualSpace());\r\n\treplaceRange.start.SetPosition(startAfterSpaceInsertion);\r\n\treplaceRange.end = replaceRange.start;\r\n\r\n\t// Insert the new text\r\n\tconst Sci::Position lengthInserted = pdoc->InsertString(replaceRange.start.Position(), text);\r\n\treplaceRange.end.SetPosition(replaceRange.start.Position() + lengthInserted);\r\n\r\n\t// Copy back to targetRange in case application is chaining modifications\r\n\ttargetRange = replaceRange;\r\n\r\n\treturn text.length();\r\n}\r\n\r\nbool Editor::IsUnicodeMode() const noexcept {\r\n\treturn pdoc && (CpUtf8 == pdoc->dbcsCodePage);\r\n}\r\n\r\nint Editor::CodePage() const noexcept {\r\n\tif (pdoc)\r\n\t\treturn pdoc->dbcsCodePage;\r\n\telse\r\n\t\treturn 0;\r\n}\r\n\r\nstd::unique_ptr<Surface> Editor::CreateMeasurementSurface() const {\r\n\tif (!wMain.GetID()) {\r\n\t\treturn {};\r\n\t}\r\n\tstd::unique_ptr<Surface> surf = Surface::Allocate(technology);\r\n\tsurf->Init(wMain.GetID());\r\n\tsurf->SetMode(CurrentSurfaceMode());\r\n\treturn surf;\r\n}\r\n\r\nstd::unique_ptr<Surface> Editor::CreateDrawingSurface(SurfaceID sid, std::optional<Scintilla::Technology> technologyOpt) const {\r\n\tif (!wMain.GetID()) {\r\n\t\treturn {};\r\n\t}\r\n\tstd::unique_ptr<Surface> surf = Surface::Allocate(technologyOpt ? *technologyOpt : technology);\r\n\tsurf->Init(sid, wMain.GetID());\r\n\tsurf->SetMode(CurrentSurfaceMode());\r\n\treturn surf;\r\n}\r\n\r\nSci::Line Editor::WrapCount(Sci::Line line) {\r\n\tAutoSurface surface(this);\r\n\tstd::shared_ptr<LineLayout> ll = view.RetrieveLineLayout(line, *this);\r\n\r\n\tif (surface && ll) {\r\n\t\tview.LayoutLine(*this, surface, vs, ll.get(), wrapWidth);\r\n\t\treturn ll->lines;\r\n\t} else {\r\n\t\treturn 1;\r\n\t}\r\n}\r\n\r\nvoid Editor::AddStyledText(const char *buffer, Sci::Position appendLength) {\r\n\t// The buffer consists of alternating character bytes and style bytes\r\n\tconst Sci::Position textLength = appendLength / 2;\r\n\tstd::string text(textLength, '\\0');\r\n\tfor (Sci::Position i = 0; i < textLength; i++) {\r\n\t\ttext[i] = buffer[i*2];\r\n\t}\r\n\tconst Sci::Position lengthInserted = pdoc->InsertString(CurrentPosition(), text);\r\n\tfor (Sci::Position i = 0; i < textLength; i++) {\r\n\t\ttext[i] = buffer[i*2+1];\r\n\t}\r\n\tpdoc->StartStyling(CurrentPosition());\r\n\tpdoc->SetStyles(textLength, text.c_str());\r\n\tSetEmptySelection(sel.MainCaret() + lengthInserted);\r\n}\r\n\r\nSci::Position Editor::GetStyledText(char *buffer, Sci::Position cpMin, Sci::Position cpMax) const noexcept {\r\n\tSci::Position iPlace = 0;\r\n\tfor (Sci::Position iChar = cpMin; iChar < cpMax; iChar++) {\r\n\t\tbuffer[iPlace++] = pdoc->CharAt(iChar);\r\n\t\tbuffer[iPlace++] = pdoc->StyleAtNoExcept(iChar);\r\n\t}\r\n\tbuffer[iPlace] = '\\0';\r\n\tbuffer[iPlace + 1] = '\\0';\r\n\treturn iPlace;\r\n}\r\n\r\nSci::Position Editor::GetTextRange(char *buffer, Sci::Position cpMin, Sci::Position cpMax) const {\r\n\tconst Sci::Position cpEnd = (cpMax == -1) ? pdoc->Length() : cpMax;\r\n\tPLATFORM_ASSERT(cpEnd <= pdoc->Length());\r\n\tconst Sci::Position len = cpEnd - cpMin; \t// No -1 as cpMin and cpMax are referring to inter character positions\r\n\tpdoc->GetCharRange(buffer, cpMin, len);\r\n\t// Spec says copied text is terminated with a NUL\r\n\tbuffer[len] = '\\0';\r\n\treturn len; \t// Not including NUL\r\n}\r\n\r\nbool Editor::ValidMargin(uptr_t wParam) const noexcept {\r\n\treturn wParam < vs.ms.size();\r\n}\r\n\r\nvoid Editor::StyleSetMessage(Message iMessage, uptr_t wParam, sptr_t lParam) {\r\n\tvs.EnsureStyle(wParam);\r\n\tswitch (iMessage) {\r\n\tcase Message::StyleSetFore:\r\n\t\tvs.styles[wParam].fore = ColourRGBA::FromIpRGB(lParam);\r\n\t\tbreak;\r\n\tcase Message::StyleSetBack:\r\n\t\tvs.styles[wParam].back = ColourRGBA::FromIpRGB(lParam);\r\n\t\tbreak;\r\n\tcase Message::StyleSetBold:\r\n\t\tvs.styles[wParam].weight = lParam != 0 ? FontWeight::Bold : FontWeight::Normal;\r\n\t\tbreak;\r\n\tcase Message::StyleSetWeight:\r\n\t\tvs.styles[wParam].weight = static_cast<FontWeight>(lParam);\r\n\t\tbreak;\r\n\tcase Message::StyleSetItalic:\r\n\t\tvs.styles[wParam].italic = lParam != 0;\r\n\t\tbreak;\r\n\tcase Message::StyleSetEOLFilled:\r\n\t\tvs.styles[wParam].eolFilled = lParam != 0;\r\n\t\tbreak;\r\n\tcase Message::StyleSetSize:\r\n\t\tvs.styles[wParam].size = static_cast<int>(lParam * FontSizeMultiplier);\r\n\t\tbreak;\r\n\tcase Message::StyleSetSizeFractional:\r\n\t\tvs.styles[wParam].size = static_cast<int>(lParam);\r\n\t\tbreak;\r\n\tcase Message::StyleSetFont:\r\n\t\tif (lParam != 0) {\r\n\t\t\tvs.SetStyleFontName(static_cast<int>(wParam), ConstCharPtrFromSPtr(lParam));\r\n\t\t}\r\n\t\tbreak;\r\n\tcase Message::StyleSetUnderline:\r\n\t\tvs.styles[wParam].underline = lParam != 0;\r\n\t\tbreak;\r\n\tcase Message::StyleSetCase:\r\n\t\tvs.styles[wParam].caseForce = static_cast<Style::CaseForce>(lParam);\r\n\t\tbreak;\r\n\tcase Message::StyleSetCharacterSet:\r\n\t\tvs.styles[wParam].characterSet = static_cast<CharacterSet>(lParam);\r\n\t\tpdoc->SetCaseFolder(nullptr);\r\n\t\tbreak;\r\n\tcase Message::StyleSetVisible:\r\n\t\tvs.styles[wParam].visible = lParam != 0;\r\n\t\tbreak;\r\n\tcase Message::StyleSetInvisibleRepresentation: {\r\n\t\tconst char *utf8 = ConstCharPtrFromSPtr(lParam);\r\n\t\tchar *rep = vs.styles[wParam].invisibleRepresentation;\r\n\t\tconst int classified = UTF8Classify(utf8);\r\n\t\tif (!(classified & UTF8MaskInvalid)) {\r\n\t\t\t// valid UTF-8\r\n\t\t\tconst int len = classified & UTF8MaskWidth;\r\n\t\t\tfor (int i=0; i<len && i<UTF8MaxBytes; i++)\r\n\t\t\t\t*rep++ = *utf8++;\r\n\t\t}\r\n\t\t*rep = 0;\r\n\t\tbreak;\r\n\t}\r\n\tcase Message::StyleSetChangeable:\r\n\t\tvs.styles[wParam].changeable = lParam != 0;\r\n\t\tbreak;\r\n\tcase Message::StyleSetHotSpot:\r\n\t\tvs.styles[wParam].hotspot = lParam != 0;\r\n\t\tbreak;\r\n\tcase Message::StyleSetCheckMonospaced:\r\n\t\tvs.styles[wParam].checkMonospaced = lParam != 0;\r\n\t\tbreak;\r\n\tdefault:\r\n\t\tbreak;\r\n\t}\r\n\tInvalidateStyleRedraw();\r\n}\r\n\r\nsptr_t Editor::StyleGetMessage(Message iMessage, uptr_t wParam, sptr_t lParam) {\r\n\tvs.EnsureStyle(wParam);\r\n\tswitch (iMessage) {\r\n\tcase Message::StyleGetFore:\r\n\t\treturn vs.styles[wParam].fore.OpaqueRGB();\r\n\tcase Message::StyleGetBack:\r\n\t\treturn vs.styles[wParam].back.OpaqueRGB();\r\n\tcase Message::StyleGetBold:\r\n\t\treturn vs.styles[wParam].weight > FontWeight::Normal;\r\n\tcase Message::StyleGetWeight:\r\n\t\treturn static_cast<sptr_t>(vs.styles[wParam].weight);\r\n\tcase Message::StyleGetItalic:\r\n\t\treturn vs.styles[wParam].italic ? 1 : 0;\r\n\tcase Message::StyleGetEOLFilled:\r\n\t\treturn vs.styles[wParam].eolFilled ? 1 : 0;\r\n\tcase Message::StyleGetSize:\r\n\t\treturn vs.styles[wParam].size / FontSizeMultiplier;\r\n\tcase Message::StyleGetSizeFractional:\r\n\t\treturn vs.styles[wParam].size;\r\n\tcase Message::StyleGetFont:\r\n\t\treturn StringResult(lParam, vs.styles[wParam].fontName);\r\n\tcase Message::StyleGetUnderline:\r\n\t\treturn vs.styles[wParam].underline ? 1 : 0;\r\n\tcase Message::StyleGetCase:\r\n\t\treturn static_cast<int>(vs.styles[wParam].caseForce);\r\n\tcase Message::StyleGetCharacterSet:\r\n\t\treturn static_cast<sptr_t>(vs.styles[wParam].characterSet);\r\n\tcase Message::StyleGetVisible:\r\n\t\treturn vs.styles[wParam].visible ? 1 : 0;\r\n\tcase Message::StyleGetChangeable:\r\n\t\treturn vs.styles[wParam].changeable ? 1 : 0;\r\n\tcase Message::StyleGetInvisibleRepresentation:\r\n\t\treturn StringResult(lParam, vs.styles[wParam].invisibleRepresentation);\r\n\tcase Message::StyleGetHotSpot:\r\n\t\treturn vs.styles[wParam].hotspot ? 1 : 0;\r\n\tcase Message::StyleGetCheckMonospaced:\r\n\t\treturn vs.styles[wParam].checkMonospaced ? 1 : 0;\r\n\tdefault:\r\n\t\tbreak;\r\n\t}\r\n\treturn 0;\r\n}\r\n\r\nvoid Editor::SetSelectionNMessage(Message iMessage, uptr_t wParam, sptr_t lParam) {\r\n\tif (wParam >= sel.Count()) {\r\n\t\treturn;\r\n\t}\r\n\tInvalidateRange(sel.Range(wParam).Start().Position(), sel.Range(wParam).End().Position());\r\n\r\n\tswitch (iMessage) {\r\n\tcase Message::SetSelectionNCaret:\r\n\t\tsel.Range(wParam).caret.SetPosition(lParam);\r\n\t\tbreak;\r\n\r\n\tcase Message::SetSelectionNAnchor:\r\n\t\tsel.Range(wParam).anchor.SetPosition(lParam);\r\n\t\tbreak;\r\n\r\n\tcase Message::SetSelectionNCaretVirtualSpace:\r\n\t\tsel.Range(wParam).caret.SetVirtualSpace(lParam);\r\n\t\tbreak;\r\n\r\n\tcase Message::SetSelectionNAnchorVirtualSpace:\r\n\t\tsel.Range(wParam).anchor.SetVirtualSpace(lParam);\r\n\t\tbreak;\r\n\r\n\tcase Message::SetSelectionNStart:\r\n\t\tsel.Range(wParam).anchor.SetPosition(lParam);\r\n\t\tbreak;\r\n\r\n\tcase Message::SetSelectionNEnd:\r\n\t\tsel.Range(wParam).caret.SetPosition(lParam);\r\n\t\tbreak;\r\n\r\n\tdefault:\r\n\t\tbreak;\r\n\r\n\t}\r\n\r\n\tInvalidateRange(sel.Range(wParam).Start().Position(), sel.Range(wParam).End().Position());\r\n\tContainerNeedsUpdate(Update::Selection);\r\n}\r\n\r\nnamespace {\r\n\r\nconstexpr Selection::SelTypes SelTypeFromMode(SelectionMode mode) {\r\n\tswitch (mode) {\r\n\tcase SelectionMode::Rectangle:\r\n\t\treturn Selection::SelTypes::rectangle;\r\n\tcase SelectionMode::Lines:\r\n\t\treturn Selection::SelTypes::lines;\r\n\tcase SelectionMode::Thin:\r\n\t\treturn Selection::SelTypes::thin;\r\n\tcase SelectionMode::Stream:\r\n\tdefault:\r\n\t\treturn Selection::SelTypes::stream;\r\n\t}\r\n}\r\n\r\nsptr_t SPtrFromPtr(void *ptr) noexcept {\r\n\treturn reinterpret_cast<sptr_t>(ptr);\r\n}\r\n\r\n}\r\n\r\nvoid Editor::SetSelectionMode(uptr_t wParam, bool setMoveExtends) {\r\n\tconst Selection::SelTypes newSelType = SelTypeFromMode(static_cast<SelectionMode>(wParam));\r\n\tif (setMoveExtends) {\r\n\t\tsel.SetMoveExtends(!sel.MoveExtends() || (sel.selType != newSelType));\r\n\t}\r\n\tsel.selType = newSelType;\r\n\tswitch (sel.selType) {\r\n\tcase Selection::SelTypes::rectangle:\r\n\t\tsel.Rectangular() = sel.RangeMain(); // adjust current selection\r\n\t\tbreak;\r\n\tcase Selection::SelTypes::lines:\r\n\t\tSetSelection(sel.RangeMain().caret, sel.RangeMain().anchor); // adjust current selection\r\n\t\tbreak;\r\n\tdefault:\r\n\t\tbreak;\r\n\t}\r\n\tInvalidateWholeSelection();\r\n}\r\n\r\nsptr_t Editor::StringResult(sptr_t lParam, const char *val) noexcept {\r\n\tconst size_t len = val ? strlen(val) : 0;\r\n\tif (lParam) {\r\n\t\tchar *ptr = CharPtrFromSPtr(lParam);\r\n\t\tif (val)\r\n\t\t\tmemcpy(ptr, val, len+1);\r\n\t\telse\r\n\t\t\t*ptr = 0;\r\n\t}\r\n\treturn len;\t// Not including NUL\r\n}\r\n\r\nsptr_t Editor::BytesResult(sptr_t lParam, const unsigned char *val, size_t len) noexcept {\r\n\t// No NUL termination: len is number of valid/displayed bytes\r\n\tif ((lParam) && (len > 0)) {\r\n\t\tchar *ptr = CharPtrFromSPtr(lParam);\r\n\t\tif (val)\r\n\t\t\tmemcpy(ptr, val, len);\r\n\t\telse\r\n\t\t\t*ptr = 0;\r\n\t}\r\n\treturn val ? len : 0;\r\n}\r\n\r\nsptr_t Editor::BytesResult(Scintilla::sptr_t lParam, std::string_view sv) noexcept {\r\n\t// No NUL termination: sv.length() is number of valid/displayed bytes\r\n\tif (lParam && !sv.empty()) {\r\n\t\tchar *ptr = CharPtrFromSPtr(lParam);\r\n\t\tmemcpy(ptr, sv.data(), sv.length());\r\n\t}\r\n\treturn sv.length();\r\n}\r\n\r\nsptr_t Editor::WndProc(Message iMessage, uptr_t wParam, sptr_t lParam) {\r\n\t//Platform::DebugPrintf(\"S start wnd proc %d %d %d\\n\",iMessage, wParam, lParam);\r\n\r\n\t// Optional macro recording hook\r\n\tif (recordingMacro)\r\n\t\tNotifyMacroRecord(iMessage, wParam, lParam);\r\n\r\n\tswitch (iMessage) {\r\n\r\n\tcase Message::GetText: {\r\n\t\t\tif (lParam == 0)\r\n\t\t\t\treturn pdoc->Length();\r\n\t\t\tchar *ptr = CharPtrFromSPtr(lParam);\r\n\t\t\tconst Sci_Position len = std::min<Sci_Position>(wParam, pdoc->Length());\r\n\t\t\tpdoc->GetCharRange(ptr, 0, len);\r\n\t\t\tptr[len] = '\\0';\r\n\t\t\treturn len;\r\n\t\t}\r\n\r\n\tcase Message::SetText: {\r\n\t\t\tif (lParam == 0)\r\n\t\t\t\treturn 0;\r\n\t\t\tUndoGroup ug(pdoc);\r\n\t\t\tpdoc->DeleteChars(0, pdoc->Length());\r\n\t\t\tSetEmptySelection(0);\r\n\t\t\tconst char *text = ConstCharPtrFromSPtr(lParam);\r\n\t\t\tpdoc->InsertString(0, text, strlen(text));\r\n\t\t\treturn 1;\r\n\t\t}\r\n\r\n\tcase Message::GetTextLength:\r\n\t\treturn pdoc->Length();\r\n\r\n\tcase Message::Cut:\r\n\t\tCut();\r\n\t\tSetLastXChosen();\r\n\t\tbreak;\r\n\r\n\tcase Message::Copy:\r\n\t\tCopy();\r\n\t\tbreak;\r\n\r\n\tcase Message::CopyAllowLine:\r\n\t\tCopyAllowLine();\r\n\t\tbreak;\r\n\r\n\tcase Message::VerticalCentreCaret:\r\n\t\tVerticalCentreCaret();\r\n\t\tbreak;\r\n\r\n\tcase Message::MoveSelectedLinesUp:\r\n\t\tMoveSelectedLinesUp();\r\n\t\tbreak;\r\n\r\n\tcase Message::MoveSelectedLinesDown:\r\n\t\tMoveSelectedLinesDown();\r\n\t\tbreak;\r\n\r\n\tcase Message::CopyRange:\r\n\t\tCopyRangeToClipboard(PositionFromUPtr(wParam), lParam);\r\n\t\tbreak;\r\n\r\n\tcase Message::CopyText:\r\n\t\tCopyText(wParam, ConstCharPtrFromSPtr(lParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::Paste:\r\n\t\tPaste();\r\n\t\tif ((caretSticky == CaretSticky::Off) || (caretSticky == CaretSticky::WhiteSpace)) {\r\n\t\t\tSetLastXChosen();\r\n\t\t}\r\n\t\tEnsureCaretVisible();\r\n\t\tbreak;\r\n\r\n\tcase Message::ReplaceRectangular: {\r\n\t\tUndoGroup ug(pdoc);\r\n\t\tif (!sel.Empty()) {\r\n\t\t\tClearSelection(); // want to replace rectangular selection contents\r\n\t\t}\r\n\t\tInsertPasteShape(ConstCharPtrFromSPtr(lParam), PositionFromUPtr(wParam), PasteShape::rectangular);\r\n\t\tbreak;\r\n\t}\r\n\r\n\tcase Message::Clear:\r\n\t\tClear();\r\n\t\tSetLastXChosen();\r\n\t\tEnsureCaretVisible();\r\n\t\tbreak;\r\n\r\n\tcase Message::Undo:\r\n\t\tUndo();\r\n\t\tSetLastXChosen();\r\n\t\tbreak;\r\n\r\n\tcase Message::CanUndo:\r\n\t\treturn (pdoc->CanUndo() && !pdoc->IsReadOnly()) ? 1 : 0;\r\n\r\n\tcase Message::EmptyUndoBuffer:\r\n\t\tpdoc->DeleteUndoHistory();\r\n\t\treturn 0;\r\n\r\n\tcase Message::GetFirstVisibleLine:\r\n\t\treturn topLine;\r\n\r\n\tcase Message::SetFirstVisibleLine:\r\n\t\tScrollTo(LineFromUPtr(wParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::GetLine: {\t// Risk of overwriting the end of the buffer\r\n\t\t\tconst Sci::Position lineStart =\r\n\t\t\t\tpdoc->LineStart(LineFromUPtr(wParam));\r\n\t\t\tconst Sci::Position lineEnd =\r\n\t\t\t\tpdoc->LineStart(LineFromUPtr(wParam + 1));\r\n\t\t\t// not NUL terminated\r\n\t\t\tconst Sci::Position len = lineEnd - lineStart;\r\n\t\t\tif (lParam == 0) {\r\n\t\t\t\treturn len;\r\n\t\t\t}\r\n\t\t\tchar *ptr = CharPtrFromSPtr(lParam);\r\n\t\t\tpdoc->GetCharRange(ptr, lineStart, len);\r\n\t\t\treturn len;\r\n\t\t}\r\n\r\n\tcase Message::GetLineCount:\r\n\t\tif (pdoc->LinesTotal() == 0)\r\n\t\t\treturn 1;\r\n\t\telse\r\n\t\t\treturn pdoc->LinesTotal();\r\n\r\n\tcase Message::AllocateLines:\r\n\t\tpdoc->AllocateLines(wParam);\r\n\t\tbreak;\r\n\r\n\tcase Message::GetModify:\r\n\t\treturn !pdoc->IsSavePoint();\r\n\r\n\tcase Message::SetSel: {\r\n\t\t\tSci::Position nStart = PositionFromUPtr(wParam);\r\n\t\t\tSci::Position nEnd = lParam;\r\n\t\t\tif (nEnd < 0)\r\n\t\t\t\tnEnd = pdoc->Length();\r\n\t\t\tif (nStart < 0)\r\n\t\t\t\tnStart = nEnd; \t// Remove selection\r\n\t\t\tInvalidateSelection(SelectionRange(nStart, nEnd));\r\n\t\t\tsel.Clear();\r\n\t\t\tsel.selType = Selection::SelTypes::stream;\r\n\t\t\tSetSelection(nEnd, nStart);\r\n\t\t\tEnsureCaretVisible();\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::GetSelText: {\r\n\t\t\tSelectionText selectedText;\r\n\t\t\tCopySelectionRange(&selectedText);\r\n\t\t\tif (lParam) {\r\n\t\t\t\tchar *ptr = CharPtrFromSPtr(lParam);\r\n\t\t\t\tsize_t iChar = selectedText.Length();\r\n\t\t\t\tif (iChar) {\r\n\t\t\t\t\tmemcpy(ptr, selectedText.Data(), iChar);\r\n\t\t\t\t}\r\n\t\t\t\tptr[iChar] = '\\0';\r\n\t\t\t}\r\n\t\t\treturn selectedText.Length();\r\n\t}\r\n\r\n\tcase Message::LineFromPosition:\r\n\t\tif (PositionFromUPtr(wParam) < 0)\r\n\t\t\treturn 0;\r\n\t\treturn pdoc->LineFromPosition(PositionFromUPtr(wParam));\r\n\r\n\tcase Message::PositionFromLine:\r\n\t\tif (LineFromUPtr(wParam) < 0)\r\n\t\t\twParam = pdoc->LineFromPosition(SelectionStart().Position());\r\n\t\tif (wParam == 0)\r\n\t\t\treturn 0; \t// Even if there is no text, there is a first line that starts at 0\r\n\t\tif (LineFromUPtr(wParam) > pdoc->LinesTotal())\r\n\t\t\treturn -1;\r\n\t\t//if (wParam > pdoc->LineFromPosition(pdoc->Length()))\t// Useful test, anyway...\r\n\t\t//\treturn -1;\r\n\t\treturn pdoc->LineStart(LineFromUPtr(wParam));\r\n\r\n\t\t// Replacement of the old Scintilla interpretation of EM_LINELENGTH\r\n\tcase Message::LineLength:\r\n\t\tif ((LineFromUPtr(wParam) < 0) ||\r\n\t\t        (LineFromUPtr(wParam) > pdoc->LineFromPosition(pdoc->Length())))\r\n\t\t\treturn 0;\r\n\t\treturn pdoc->LineStart(LineFromUPtr(wParam) + 1) - pdoc->LineStart(LineFromUPtr(wParam));\r\n\r\n\tcase Message::ReplaceSel: {\r\n\t\t\tif (lParam == 0)\r\n\t\t\t\treturn 0;\r\n\t\t\tUndoGroup ug(pdoc);\r\n\t\t\tClearSelection();\r\n\t\t\tconst char *replacement = ConstCharPtrFromSPtr(lParam);\r\n\t\t\tconst Sci::Position lengthInserted = pdoc->InsertString(\r\n\t\t\t\tsel.MainCaret(), replacement, strlen(replacement));\r\n\t\t\tSetEmptySelection(sel.MainCaret() + lengthInserted);\r\n\t\t\tSetLastXChosen();\r\n\t\t\tEnsureCaretVisible();\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::SetTargetStart:\r\n\t\ttargetRange.start.SetPosition(PositionFromUPtr(wParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::GetTargetStart:\r\n\t\treturn targetRange.start.Position();\r\n\r\n\tcase Message::SetTargetStartVirtualSpace:\r\n\t\ttargetRange.start.SetVirtualSpace(PositionFromUPtr(wParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::GetTargetStartVirtualSpace:\r\n\t\treturn targetRange.start.VirtualSpace();\r\n\r\n\tcase Message::SetTargetEnd:\r\n\t\ttargetRange.end.SetPosition(PositionFromUPtr(wParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::GetTargetEnd:\r\n\t\treturn targetRange.end.Position();\r\n\r\n\tcase Message::SetTargetEndVirtualSpace:\r\n\t\ttargetRange.end.SetVirtualSpace(PositionFromUPtr(wParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::GetTargetEndVirtualSpace:\r\n\t\treturn targetRange.end.VirtualSpace();\r\n\r\n\tcase Message::SetTargetRange:\r\n\t\ttargetRange.start.SetPosition(PositionFromUPtr(wParam));\r\n\t\ttargetRange.end.SetPosition(lParam);\r\n\t\tbreak;\r\n\r\n\tcase Message::TargetWholeDocument:\r\n\t\ttargetRange.start.SetPosition(0);\r\n\t\ttargetRange.end.SetPosition(pdoc->Length());\r\n\t\tbreak;\r\n\r\n\tcase Message::TargetFromSelection:\r\n\t\ttargetRange.start = sel.RangeMain().Start();\r\n\t\ttargetRange.end = sel.RangeMain().End();\r\n\t\tbreak;\r\n\r\n\tcase Message::GetTargetText: {\r\n\t\t\tconst std::string text = RangeText(targetRange.start.Position(), targetRange.end.Position());\r\n\t\t\treturn BytesResult(lParam, text);\r\n\t\t}\r\n\r\n\tcase Message::ReplaceTarget:\r\n\t\tPLATFORM_ASSERT(lParam);\r\n\t\treturn ReplaceTarget(ReplaceType::basic, ViewFromParams(lParam, wParam));\r\n\r\n\tcase Message::ReplaceTargetRE:\r\n\t\tPLATFORM_ASSERT(lParam);\r\n\t\treturn ReplaceTarget(ReplaceType::patterns, ViewFromParams(lParam, wParam));\r\n\r\n\tcase Message::ReplaceTargetMinimal:\r\n\t\tPLATFORM_ASSERT(lParam);\r\n\t\treturn ReplaceTarget(ReplaceType::minimal, ViewFromParams(lParam, wParam));\r\n\r\n\tcase Message::SearchInTarget:\r\n\t\tPLATFORM_ASSERT(lParam);\r\n\t\treturn SearchInTarget(ConstCharPtrFromSPtr(lParam), PositionFromUPtr(wParam));\r\n\r\n\tcase Message::SetSearchFlags:\r\n\t\tsearchFlags = static_cast<FindOption>(wParam);\r\n\t\tbreak;\r\n\r\n\tcase Message::GetSearchFlags:\r\n\t\treturn static_cast<sptr_t>(searchFlags);\r\n\r\n\tcase Message::GetTag:\r\n\t\treturn GetTag(CharPtrFromSPtr(lParam), static_cast<int>(wParam));\r\n\r\n\tcase Message::PositionBefore:\r\n\t\treturn pdoc->MovePositionOutsideChar(PositionFromUPtr(wParam) - 1, -1, true);\r\n\r\n\tcase Message::PositionAfter:\r\n\t\treturn pdoc->MovePositionOutsideChar(PositionFromUPtr(wParam) + 1, 1, true);\r\n\r\n\tcase Message::PositionRelative:\r\n\t\treturn std::clamp<Sci::Position>(pdoc->GetRelativePosition(\r\n\t\t\tPositionFromUPtr(wParam), lParam),\r\n\t\t\t0, pdoc->Length());\r\n\r\n\tcase Message::PositionRelativeCodeUnits:\r\n\t\treturn std::clamp<Sci::Position>(pdoc->GetRelativePositionUTF16(\r\n\t\t\tPositionFromUPtr(wParam), lParam),\r\n\t\t\t0, pdoc->Length());\r\n\r\n\tcase Message::LineScroll:\r\n\t\tScrollTo(topLine + lParam);\r\n\t\tHorizontalScrollTo(xOffset + static_cast<int>(static_cast<int>(wParam) * vs.spaceWidth));\r\n\t\treturn 1;\r\n\r\n\tcase Message::SetXOffset:\r\n\t\txOffset = static_cast<int>(wParam);\r\n\t\tContainerNeedsUpdate(Update::HScroll);\r\n\t\tSetHorizontalScrollPos();\r\n\t\tRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::GetXOffset:\r\n\t\treturn xOffset;\r\n\r\n\tcase Message::ChooseCaretX:\r\n\t\tSetLastXChosen();\r\n\t\tbreak;\r\n\r\n\tcase Message::ScrollCaret:\r\n\t\tEnsureCaretVisible();\r\n\t\tbreak;\r\n\r\n\tcase Message::SetReadOnly:\r\n\t\tpdoc->SetReadOnly(wParam != 0);\r\n\t\treturn 1;\r\n\r\n\tcase Message::GetReadOnly:\r\n\t\treturn pdoc->IsReadOnly();\r\n\r\n\tcase Message::CanPaste:\r\n\t\treturn CanPaste();\r\n\r\n\tcase Message::PointXFromPosition:\r\n\t\tif (lParam < 0) {\r\n\t\t\treturn 0;\r\n\t\t} else {\r\n\t\t\tconst Point pt = LocationFromPosition(lParam);\r\n\t\t\t// Convert to view-relative\r\n\t\t\treturn static_cast<int>(pt.x) - vs.textStart + vs.fixedColumnWidth;\r\n\t\t}\r\n\r\n\tcase Message::PointYFromPosition:\r\n\t\tif (lParam < 0) {\r\n\t\t\treturn 0;\r\n\t\t} else {\r\n\t\t\tconst Point pt = LocationFromPosition(lParam);\r\n\t\t\treturn static_cast<int>(pt.y);\r\n\t\t}\r\n\r\n\tcase Message::FindText:\r\n\t\treturn FindText(wParam, lParam);\r\n\r\n\tcase Message::FindTextFull:\r\n\t\treturn FindTextFull(wParam, lParam);\r\n\r\n\tcase Message::GetTextRange:\r\n\t\tif (TextRange *tr = static_cast<TextRange *>(PtrFromSPtr(lParam))) {\r\n\t\t\treturn GetTextRange(tr->lpstrText, tr->chrg.cpMin, tr->chrg.cpMax);\r\n\t\t}\r\n\t\treturn 0;\r\n\r\n\tcase Message::GetTextRangeFull:\r\n\t\tif (TextRangeFull *tr = static_cast<TextRangeFull *>(PtrFromSPtr(lParam))) {\r\n\t\t\treturn GetTextRange(tr->lpstrText, tr->chrg.cpMin, tr->chrg.cpMax);\r\n\t\t}\r\n\t\treturn 0;\r\n\r\n\tcase Message::HideSelection:\r\n\t\tvs.selection.visible = wParam == 0;\r\n\t\tRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::GetSelectionHidden:\r\n\t\treturn !vs.selection.visible;\r\n\t\tbreak;\r\n\r\n\tcase Message::FormatRange:\r\n\tcase Message::FormatRangeFull:\r\n\t\treturn FormatRange(iMessage, wParam, lParam);\r\n\r\n\tcase Message::GetMarginLeft:\r\n\t\treturn vs.leftMarginWidth;\r\n\r\n\tcase Message::GetMarginRight:\r\n\t\treturn vs.rightMarginWidth;\r\n\r\n\tcase Message::SetMarginLeft:\r\n\t\tlastXChosen += static_cast<int>(lParam) - vs.leftMarginWidth;\r\n\t\tvs.leftMarginWidth = static_cast<int>(lParam);\r\n\t\tInvalidateStyleRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::SetMarginRight:\r\n\t\tvs.rightMarginWidth = static_cast<int>(lParam);\r\n\t\tInvalidateStyleRedraw();\r\n\t\tbreak;\r\n\r\n\t\t// Control specific messages\r\n\r\n\tcase Message::AddText: {\r\n\t\t\tif (lParam == 0)\r\n\t\t\t\treturn 0;\r\n\t\t\tconst Sci::Position lengthInserted = pdoc->InsertString(\r\n\t\t\t\tCurrentPosition(), ConstCharPtrFromSPtr(lParam), PositionFromUPtr(wParam));\r\n\t\t\tSetEmptySelection(sel.MainCaret() + lengthInserted);\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\tcase Message::AddStyledText:\r\n\t\tif (lParam)\r\n\t\t\tAddStyledText(ConstCharPtrFromSPtr(lParam), PositionFromUPtr(wParam));\r\n\t\treturn 0;\r\n\r\n\tcase Message::InsertText: {\r\n\t\t\tif (lParam == 0)\r\n\t\t\t\treturn 0;\r\n\t\t\tSci::Position insertPos = PositionFromUPtr(wParam);\r\n\t\t\tif (insertPos == -1)\r\n\t\t\t\tinsertPos = CurrentPosition();\r\n\t\t\tSci::Position newCurrent = CurrentPosition();\r\n\t\t\tconst char *sz = ConstCharPtrFromSPtr(lParam);\r\n\t\t\tconst Sci::Position lengthInserted = pdoc->InsertString(insertPos, sz, strlen(sz));\r\n\t\t\tif (newCurrent > insertPos)\r\n\t\t\t\tnewCurrent += lengthInserted;\r\n\t\t\tSetEmptySelection(newCurrent);\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\tcase Message::ChangeInsertion:\r\n\t\tPLATFORM_ASSERT(lParam);\r\n\t\tpdoc->ChangeInsertion(ConstCharPtrFromSPtr(lParam), PositionFromUPtr(wParam));\r\n\t\treturn 0;\r\n\r\n\tcase Message::AppendText:\r\n\t\tpdoc->InsertString(pdoc->Length(),\r\n\t\t\tConstCharPtrFromSPtr(lParam), PositionFromUPtr(wParam));\r\n\t\treturn 0;\r\n\r\n\tcase Message::ClearAll:\r\n\t\tClearAll();\r\n\t\treturn 0;\r\n\r\n\tcase Message::DeleteRange:\r\n\t\tpdoc->DeleteChars(PositionFromUPtr(wParam), lParam);\r\n\t\treturn 0;\r\n\r\n\tcase Message::ClearDocumentStyle:\r\n\t\tClearDocumentStyle();\r\n\t\treturn 0;\r\n\r\n\tcase Message::SetUndoCollection:\r\n\t\tpdoc->SetUndoCollection(wParam != 0);\r\n\t\treturn 0;\r\n\r\n\tcase Message::GetUndoCollection:\r\n\t\treturn pdoc->IsCollectingUndo();\r\n\r\n\tcase Message::BeginUndoAction:\r\n\t\tpdoc->BeginUndoAction();\r\n\t\treturn 0;\r\n\r\n\tcase Message::EndUndoAction:\r\n\t\tpdoc->EndUndoAction();\r\n\t\treturn 0;\r\n\r\n\tcase Message::GetUndoActions:\r\n\t\treturn pdoc->UndoActions();\r\n\r\n\tcase Message::SetUndoSavePoint:\r\n\t\tpdoc->SetUndoSavePoint(static_cast<int>(wParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::GetUndoSavePoint:\r\n\t\treturn pdoc->UndoSavePoint();\r\n\r\n\tcase Message::SetUndoDetach:\r\n\t\tpdoc->SetUndoDetach(static_cast<int>(wParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::GetUndoDetach:\r\n\t\treturn pdoc->UndoDetach();\r\n\r\n\tcase Message::SetUndoTentative:\r\n\t\tpdoc->SetUndoTentative(static_cast<int>(wParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::GetUndoTentative:\r\n\t\treturn pdoc->UndoTentative();\r\n\r\n\tcase Message::SetUndoCurrent:\r\n\t\tpdoc->SetUndoCurrent(static_cast<int>(wParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::GetUndoCurrent:\r\n\t\treturn pdoc->UndoCurrent();\r\n\r\n\tcase Message::GetUndoActionType:\r\n\t\treturn pdoc->UndoActionType(static_cast<int>(wParam));\r\n\r\n\tcase Message::GetUndoActionPosition:\r\n\t\treturn pdoc->UndoActionPosition(static_cast<int>(wParam));\r\n\r\n\tcase Message::GetUndoActionText: {\r\n\t\tconst std::string_view text = pdoc->UndoActionText(static_cast<int>(wParam));\r\n\t\treturn BytesResult(lParam, text);\r\n\t}\r\n\r\n\tcase Message::PushUndoActionType:\r\n\t\tpdoc->PushUndoActionType(static_cast<int>(wParam), lParam);\r\n\t\tbreak;\r\n\r\n\tcase Message::ChangeLastUndoActionText:\r\n\t\tpdoc->ChangeLastUndoActionText(wParam, CharPtrFromSPtr(lParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::GetCaretPeriod:\r\n\t\treturn caret.period;\r\n\r\n\tcase Message::SetCaretPeriod:\r\n\t\tCaretSetPeriod(static_cast<int>(wParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::GetWordChars:\r\n\t\treturn pdoc->GetCharsOfClass(CharacterClass::word, UCharPtrFromSPtr(lParam));\r\n\r\n\tcase Message::SetWordChars: {\r\n\t\t\tpdoc->SetDefaultCharClasses(false);\r\n\t\t\tif (lParam == 0)\r\n\t\t\t\treturn 0;\r\n\t\t\tpdoc->SetCharClasses(ConstUCharPtrFromSPtr(lParam), CharacterClass::word);\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::GetWhitespaceChars:\r\n\t\treturn pdoc->GetCharsOfClass(CharacterClass::space, UCharPtrFromSPtr(lParam));\r\n\r\n\tcase Message::SetWhitespaceChars: {\r\n\t\t\tif (lParam == 0)\r\n\t\t\t\treturn 0;\r\n\t\t\tpdoc->SetCharClasses(ConstUCharPtrFromSPtr(lParam), CharacterClass::space);\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::GetPunctuationChars:\r\n\t\treturn pdoc->GetCharsOfClass(CharacterClass::punctuation, UCharPtrFromSPtr(lParam));\r\n\r\n\tcase Message::SetPunctuationChars: {\r\n\t\t\tif (lParam == 0)\r\n\t\t\t\treturn 0;\r\n\t\t\tpdoc->SetCharClasses(ConstUCharPtrFromSPtr(lParam), CharacterClass::punctuation);\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::SetCharsDefault:\r\n\t\tpdoc->SetDefaultCharClasses(true);\r\n\t\tbreak;\r\n\r\n\tcase Message::SetCharacterCategoryOptimization:\r\n\t\tpdoc->SetCharacterCategoryOptimization(static_cast<int>(wParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::GetCharacterCategoryOptimization:\r\n\t\treturn pdoc->CharacterCategoryOptimization();\r\n\r\n\tcase Message::GetLength:\r\n\t\treturn pdoc->Length();\r\n\r\n\tcase Message::Allocate:\r\n\t\tpdoc->Allocate(PositionFromUPtr(wParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::GetCharAt:\r\n\t\treturn pdoc->CharAt(PositionFromUPtr(wParam));\r\n\r\n\tcase Message::SetCurrentPos:\r\n\t\tif (sel.IsRectangular()) {\r\n\t\t\tsel.Rectangular().caret.SetPosition(PositionFromUPtr(wParam));\r\n\t\t\tSetRectangularRange();\r\n\t\t\tRedraw();\r\n\t\t} else {\r\n\t\t\tSetSelection(PositionFromUPtr(wParam), sel.MainAnchor());\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::GetCurrentPos:\r\n\t\treturn sel.IsRectangular() ? sel.Rectangular().caret.Position() : sel.MainCaret();\r\n\r\n\tcase Message::SetAnchor:\r\n\t\tif (sel.IsRectangular()) {\r\n\t\t\tsel.Rectangular().anchor.SetPosition(PositionFromUPtr(wParam));\r\n\t\t\tSetRectangularRange();\r\n\t\t\tRedraw();\r\n\t\t} else {\r\n\t\t\tSetSelection(sel.MainCaret(), PositionFromUPtr(wParam));\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::GetAnchor:\r\n\t\treturn sel.IsRectangular() ? sel.Rectangular().anchor.Position() : sel.MainAnchor();\r\n\r\n\tcase Message::SetSelectionStart:\r\n\t\tSetSelection(std::max(sel.MainCaret(), PositionFromUPtr(wParam)), PositionFromUPtr(wParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::GetSelectionStart:\r\n\t\treturn sel.LimitsForRectangularElseMain().start.Position();\r\n\r\n\tcase Message::SetSelectionEnd:\r\n\t\tSetSelection(PositionFromUPtr(wParam), std::min(sel.MainAnchor(), PositionFromUPtr(wParam)));\r\n\t\tbreak;\r\n\r\n\tcase Message::GetSelectionEnd:\r\n\t\treturn sel.LimitsForRectangularElseMain().end.Position();\r\n\r\n\tcase Message::SetEmptySelection:\r\n\t\tSetEmptySelection(PositionFromUPtr(wParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::SetPrintMagnification:\r\n\t\tview.printParameters.magnification = static_cast<int>(wParam);\r\n\t\tbreak;\r\n\r\n\tcase Message::GetPrintMagnification:\r\n\t\treturn view.printParameters.magnification;\r\n\r\n\tcase Message::SetPrintColourMode:\r\n\t\tview.printParameters.colourMode = static_cast<PrintOption>(wParam);\r\n\t\tbreak;\r\n\r\n\tcase Message::GetPrintColourMode:\r\n\t\treturn static_cast<sptr_t>(view.printParameters.colourMode);\r\n\r\n\tcase Message::SetPrintWrapMode:\r\n\t\tview.printParameters.wrapState = (static_cast<Wrap>(wParam) == Wrap::Word) ? Wrap::Word : Wrap::None;\r\n\t\tbreak;\r\n\r\n\tcase Message::GetPrintWrapMode:\r\n\t\treturn static_cast<sptr_t>(view.printParameters.wrapState);\r\n\r\n\tcase Message::GetStyleAt:\r\n\t\tif (PositionFromUPtr(wParam) >= pdoc->Length())\r\n\t\t\treturn 0;\r\n\t\telse\r\n\t\t\treturn pdoc->StyleAt(PositionFromUPtr(wParam));\r\n\r\n\tcase Message::GetStyleIndexAt:\r\n\t\tif (PositionFromUPtr(wParam) >= pdoc->Length())\r\n\t\t\treturn 0;\r\n\t\telse\r\n\t\t\treturn pdoc->StyleIndexAt(PositionFromUPtr(wParam));\r\n\r\n\tcase Message::Redo:\r\n\t\tRedo();\r\n\t\tbreak;\r\n\r\n\tcase Message::SelectAll:\r\n\t\tSelectAll();\r\n\t\tbreak;\r\n\r\n\tcase Message::SetSavePoint:\r\n\t\tpdoc->SetSavePoint();\r\n\t\tbreak;\r\n\r\n\tcase Message::GetStyledText:\r\n\t\tif (TextRange *tr = static_cast<TextRange *>(PtrFromSPtr(lParam))) {\r\n\t\t\treturn GetStyledText(tr->lpstrText, tr->chrg.cpMin, tr->chrg.cpMax);\r\n\t\t}\r\n\t\treturn 0;\r\n\r\n\tcase Message::GetStyledTextFull:\r\n\t\tif (TextRangeFull *tr = static_cast<TextRangeFull *>(PtrFromSPtr(lParam))) {\r\n\t\t\treturn GetStyledText(tr->lpstrText, tr->chrg.cpMin, tr->chrg.cpMax);\r\n\t\t}\r\n\t\treturn 0;\r\n\r\n\tcase Message::CanRedo:\r\n\t\treturn (pdoc->CanRedo() && !pdoc->IsReadOnly()) ? 1 : 0;\r\n\r\n\tcase Message::MarkerLineFromHandle:\r\n\t\treturn pdoc->LineFromHandle(static_cast<int>(wParam));\r\n\r\n\tcase Message::MarkerDeleteHandle:\r\n\t\tpdoc->DeleteMarkFromHandle(static_cast<int>(wParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::MarkerHandleFromLine:\r\n\t\treturn pdoc->MarkerHandleFromLine(LineFromUPtr(wParam), static_cast<int>(lParam));\r\n\r\n\tcase Message::MarkerNumberFromLine:\r\n\t\treturn pdoc->MarkerNumberFromLine(LineFromUPtr(wParam), static_cast<int>(lParam));\r\n\r\n\tcase Message::GetViewWS:\r\n\t\treturn static_cast<sptr_t>(vs.viewWhitespace);\r\n\r\n\tcase Message::SetViewWS:\r\n\t\tvs.viewWhitespace = static_cast<WhiteSpace>(wParam);\r\n\t\tRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::GetTabDrawMode:\r\n\t\treturn static_cast<sptr_t>(vs.tabDrawMode);\r\n\r\n\tcase Message::SetTabDrawMode:\r\n\t\tvs.tabDrawMode = static_cast<TabDrawMode>(wParam);\r\n\t\tRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::GetWhitespaceSize:\r\n\t\treturn vs.whitespaceSize;\r\n\r\n\tcase Message::SetWhitespaceSize:\r\n\t\tvs.whitespaceSize = static_cast<int>(wParam);\r\n\t\tRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::PositionFromPoint:\r\n\t\treturn PositionFromLocation(PointFromParameters(wParam, lParam), false, false);\r\n\r\n\tcase Message::PositionFromPointClose:\r\n\t\treturn PositionFromLocation(PointFromParameters(wParam, lParam), true, false);\r\n\r\n\tcase Message::CharPositionFromPoint:\r\n\t\treturn PositionFromLocation(PointFromParameters(wParam, lParam), false, true);\r\n\r\n\tcase Message::CharPositionFromPointClose:\r\n\t\treturn PositionFromLocation(PointFromParameters(wParam, lParam), true, true);\r\n\r\n\tcase Message::GotoLine:\r\n\t\tGoToLine(LineFromUPtr(wParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::GotoPos:\r\n\t\tSetEmptySelection(PositionFromUPtr(wParam));\r\n\t\tEnsureCaretVisible();\r\n\t\tbreak;\r\n\r\n\tcase Message::GetCurLine: {\r\n\t\t\tconst Sci::Line lineCurrentPos = pdoc->SciLineFromPosition(sel.MainCaret());\r\n\t\t\tconst Sci::Position lineStart = pdoc->LineStart(lineCurrentPos);\r\n\t\t\tconst Sci::Position lineEnd = pdoc->LineStart(lineCurrentPos + 1);\r\n\t\t\tif (lParam == 0) {\r\n\t\t\t\treturn lineEnd - lineStart;\r\n\t\t\t}\r\n\t\t\tchar *ptr = CharPtrFromSPtr(lParam);\r\n\t\t\tconst Sci::Position len = std::min<uptr_t>(lineEnd - lineStart, wParam);\r\n\t\t\tpdoc->GetCharRange(ptr, lineStart, len);\r\n\t\t\tptr[len] = '\\0';\r\n\t\t\treturn sel.MainCaret() - lineStart;\r\n\t\t}\r\n\r\n\tcase Message::GetEndStyled:\r\n\t\treturn pdoc->GetEndStyled();\r\n\r\n\tcase Message::GetEOLMode:\r\n\t\treturn static_cast<sptr_t>(pdoc->eolMode);\r\n\r\n\tcase Message::SetEOLMode:\r\n\t\tpdoc->eolMode = static_cast<EndOfLine>(wParam);\r\n\t\tbreak;\r\n\r\n\tcase Message::SetLineEndTypesAllowed:\r\n\t\tif (pdoc->SetLineEndTypesAllowed(static_cast<LineEndType>(wParam))) {\r\n\t\t\tpcs->Clear();\r\n\t\t\tpcs->InsertLines(0, pdoc->LinesTotal() - 1);\r\n\t\t\tSetAnnotationHeights(0, pdoc->LinesTotal());\r\n\t\t\tInvalidateStyleRedraw();\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::GetLineEndTypesAllowed:\r\n\t\treturn static_cast<sptr_t>(pdoc->GetLineEndTypesAllowed());\r\n\r\n\tcase Message::GetLineEndTypesActive:\r\n\t\treturn static_cast<sptr_t>(pdoc->GetLineEndTypesActive());\r\n\r\n\tcase Message::StartStyling:\r\n\t\tpdoc->StartStyling(PositionFromUPtr(wParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::SetStyling:\r\n\t\tif (PositionFromUPtr(wParam) < 0)\r\n\t\t\terrorStatus = Status::Failure;\r\n\t\telse\r\n\t\t\tpdoc->SetStyleFor(PositionFromUPtr(wParam), static_cast<char>(lParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::SetStylingEx:             // Specify a complete styling buffer\r\n\t\tif (lParam == 0)\r\n\t\t\treturn 0;\r\n\t\tpdoc->SetStyles(PositionFromUPtr(wParam), ConstCharPtrFromSPtr(lParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::SetBufferedDraw:\r\n\t\tview.bufferedDraw = wParam != 0;\r\n\t\tbreak;\r\n\r\n\tcase Message::GetBufferedDraw:\r\n\t\treturn view.bufferedDraw;\r\n\r\n#ifdef INCLUDE_DEPRECATED_FEATURES\r\n\tcase SCI_GETTWOPHASEDRAW:\r\n\t\treturn view.phasesDraw == EditView::phasesTwo;\r\n\r\n\tcase SCI_SETTWOPHASEDRAW:\r\n\t\tif (view.SetTwoPhaseDraw(wParam != 0))\r\n\t\t\tInvalidateStyleRedraw();\r\n\t\tbreak;\r\n#endif\r\n\r\n\tcase Message::GetPhasesDraw:\r\n\t\treturn static_cast<sptr_t>(view.phasesDraw);\r\n\r\n\tcase Message::SetPhasesDraw:\r\n\t\tif (view.SetPhasesDraw(static_cast<int>(wParam)))\r\n\t\t\tInvalidateStyleRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::SetFontQuality:\r\n\t\tvs.extraFontFlag = static_cast<FontQuality>(\r\n\t\t\t(static_cast<int>(vs.extraFontFlag) & ~static_cast<int>(FontQuality::QualityMask)) |\r\n\t\t\t(wParam & static_cast<int>(FontQuality::QualityMask)));\r\n\t\tInvalidateStyleRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::GetFontQuality:\r\n\t\treturn static_cast<int>(vs.extraFontFlag) & static_cast<int>(FontQuality::QualityMask);\r\n\r\n\tcase Message::SetTabWidth:\r\n\t\tif (wParam > 0) {\r\n\t\t\tpdoc->tabInChars = static_cast<int>(wParam);\r\n\t\t\tif (pdoc->indentInChars == 0)\r\n\t\t\t\tpdoc->actualIndentInChars = pdoc->tabInChars;\r\n\t\t}\r\n\t\tInvalidateStyleRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::GetTabWidth:\r\n\t\treturn pdoc->tabInChars;\r\n\r\n\tcase Message::SetTabMinimumWidth:\r\n\t\tSetAppearance(view.tabWidthMinimumPixels, static_cast<int>(wParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::GetTabMinimumWidth:\r\n\t\treturn view.tabWidthMinimumPixels;\r\n\r\n\tcase Message::ClearTabStops:\r\n\t\tif (view.ClearTabstops(LineFromUPtr(wParam))) {\r\n\t\t\tconst DocModification mh(ModificationFlags::ChangeTabStops, 0, 0, 0, nullptr, LineFromUPtr(wParam));\r\n\t\t\tNotifyModified(pdoc, mh, nullptr);\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::AddTabStop:\r\n\t\tif (view.AddTabstop(LineFromUPtr(wParam), static_cast<int>(lParam))) {\r\n\t\t\tconst DocModification mh(ModificationFlags::ChangeTabStops, 0, 0, 0, nullptr, LineFromUPtr(wParam));\r\n\t\t\tNotifyModified(pdoc, mh, nullptr);\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::GetNextTabStop:\r\n\t\treturn view.GetNextTabstop(LineFromUPtr(wParam), static_cast<int>(lParam));\r\n\r\n\tcase Message::SetIndent:\r\n\t\tpdoc->indentInChars = static_cast<int>(wParam);\r\n\t\tif (pdoc->indentInChars != 0)\r\n\t\t\tpdoc->actualIndentInChars = pdoc->indentInChars;\r\n\t\telse\r\n\t\t\tpdoc->actualIndentInChars = pdoc->tabInChars;\r\n\t\tInvalidateStyleRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::GetIndent:\r\n\t\treturn pdoc->indentInChars;\r\n\r\n\tcase Message::SetUseTabs:\r\n\t\tpdoc->useTabs = wParam != 0;\r\n\t\tInvalidateStyleRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::GetUseTabs:\r\n\t\treturn pdoc->useTabs;\r\n\r\n\tcase Message::SetLineIndentation:\r\n\t\tpdoc->SetLineIndentation(LineFromUPtr(wParam), lParam);\r\n\t\tbreak;\r\n\r\n\tcase Message::GetLineIndentation:\r\n\t\treturn pdoc->GetLineIndentation(LineFromUPtr(wParam));\r\n\r\n\tcase Message::GetLineIndentPosition:\r\n\t\treturn pdoc->GetLineIndentPosition(LineFromUPtr(wParam));\r\n\r\n\tcase Message::SetTabIndents:\r\n\t\tpdoc->tabIndents = wParam != 0;\r\n\t\tbreak;\r\n\r\n\tcase Message::GetTabIndents:\r\n\t\treturn pdoc->tabIndents;\r\n\r\n\tcase Message::SetBackSpaceUnIndents:\r\n\t\tpdoc->backspaceUnindents = wParam != 0;\r\n\t\tbreak;\r\n\r\n\tcase Message::GetBackSpaceUnIndents:\r\n\t\treturn pdoc->backspaceUnindents;\r\n\r\n\tcase Message::SetMouseDwellTime:\r\n\t\tdwellDelay = static_cast<int>(wParam);\r\n\t\tticksToDwell = dwellDelay;\r\n\t\tbreak;\r\n\r\n\tcase Message::GetMouseDwellTime:\r\n\t\treturn dwellDelay;\r\n\r\n\tcase Message::WordStartPosition:\r\n\t\treturn pdoc->ExtendWordSelect(PositionFromUPtr(wParam), -1, lParam != 0);\r\n\r\n\tcase Message::WordEndPosition:\r\n\t\treturn pdoc->ExtendWordSelect(PositionFromUPtr(wParam), 1, lParam != 0);\r\n\r\n\tcase Message::IsRangeWord:\r\n\t\treturn pdoc->IsWordAt(PositionFromUPtr(wParam), lParam);\r\n\r\n\tcase Message::SetIdleStyling:\r\n\t\tidleStyling = static_cast<IdleStyling>(wParam);\r\n\t\tbreak;\r\n\r\n\tcase Message::GetIdleStyling:\r\n\t\treturn static_cast<sptr_t>(idleStyling);\r\n\r\n\tcase Message::SetWrapMode:\r\n\t\tif (vs.SetWrapState(static_cast<Wrap>(wParam))) {\r\n\t\t\txOffset = 0;\r\n\t\t\tContainerNeedsUpdate(Update::HScroll);\r\n\t\t\tInvalidateStyleRedraw();\r\n\t\t\tReconfigureScrollBars();\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::GetWrapMode:\r\n\t\treturn static_cast<sptr_t>(vs.wrap.state);\r\n\r\n\tcase Message::SetWrapVisualFlags:\r\n\t\tif (vs.SetWrapVisualFlags(static_cast<WrapVisualFlag>(wParam))) {\r\n\t\t\tInvalidateStyleRedraw();\r\n\t\t\tReconfigureScrollBars();\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::GetWrapVisualFlags:\r\n\t\treturn static_cast<sptr_t>(vs.wrap.visualFlags);\r\n\r\n\tcase Message::SetWrapVisualFlagsLocation:\r\n\t\tif (vs.SetWrapVisualFlagsLocation(static_cast<WrapVisualLocation>(wParam))) {\r\n\t\t\tInvalidateStyleRedraw();\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::GetWrapVisualFlagsLocation:\r\n\t\treturn static_cast<sptr_t>(vs.wrap.visualFlagsLocation);\r\n\r\n\tcase Message::SetWrapStartIndent:\r\n\t\tif (vs.SetWrapVisualStartIndent(static_cast<int>(wParam))) {\r\n\t\t\tInvalidateStyleRedraw();\r\n\t\t\tReconfigureScrollBars();\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::GetWrapStartIndent:\r\n\t\treturn vs.wrap.visualStartIndent;\r\n\r\n\tcase Message::SetWrapIndentMode:\r\n\t\tif (vs.SetWrapIndentMode(static_cast<WrapIndentMode>(wParam))) {\r\n\t\t\tInvalidateStyleRedraw();\r\n\t\t\tReconfigureScrollBars();\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::GetWrapIndentMode:\r\n\t\treturn static_cast<sptr_t>(vs.wrap.indentMode);\r\n\r\n\tcase Message::SetLayoutCache:\r\n\t\tif (static_cast<LineCache>(wParam) <= LineCache::Document) {\r\n\t\t\tview.llc.SetLevel(static_cast<LineCache>(wParam));\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::GetLayoutCache:\r\n\t\treturn static_cast<sptr_t>(view.llc.GetLevel());\r\n\r\n\tcase Message::SetPositionCache:\r\n\t\tview.posCache->SetSize(wParam);\r\n\t\tbreak;\r\n\r\n\tcase Message::GetPositionCache:\r\n\t\treturn view.posCache->GetSize();\r\n\r\n\tcase Message::SetLayoutThreads:\r\n\t\tview.SetLayoutThreads(static_cast<unsigned int>(wParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::GetLayoutThreads:\r\n\t\treturn view.GetLayoutThreads();\r\n\r\n\tcase Message::SetScrollWidth:\r\n\t\tPLATFORM_ASSERT(wParam > 0);\r\n\t\tif ((wParam > 0) && (wParam != static_cast<unsigned int>(scrollWidth))) {\r\n\t\t\tview.lineWidthMaxSeen = 0;\r\n\t\t\tscrollWidth = static_cast<int>(wParam);\r\n\t\t\tSetScrollBars();\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::GetScrollWidth:\r\n\t\treturn scrollWidth;\r\n\r\n\tcase Message::SetScrollWidthTracking:\r\n\t\ttrackLineWidth = wParam != 0;\r\n\t\tbreak;\r\n\r\n\tcase Message::GetScrollWidthTracking:\r\n\t\treturn trackLineWidth;\r\n\r\n\tcase Message::LinesJoin:\r\n\t\tLinesJoin();\r\n\t\tbreak;\r\n\r\n\tcase Message::LinesSplit:\r\n\t\tLinesSplit(static_cast<int>(wParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::TextWidth:\r\n\t\tPLATFORM_ASSERT(wParam < vs.styles.size());\r\n\t\tPLATFORM_ASSERT(lParam);\r\n\t\treturn TextWidth(wParam, ConstCharPtrFromSPtr(lParam));\r\n\r\n\tcase Message::TextHeight:\r\n\t\tRefreshStyleData();\r\n\t\treturn vs.lineHeight;\r\n\r\n\tcase Message::SetEndAtLastLine:\r\n\t\tPLATFORM_ASSERT((wParam == 0) || (wParam == 1));\r\n\t\tif (endAtLastLine != (wParam != 0)) {\r\n\t\t\tendAtLastLine = wParam != 0;\r\n\t\t\tSetScrollBars();\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::GetEndAtLastLine:\r\n\t\treturn endAtLastLine;\r\n\r\n\tcase Message::SetCaretSticky:\r\n\t\tPLATFORM_ASSERT(static_cast<CaretSticky>(wParam) <= CaretSticky::WhiteSpace);\r\n\t\tif (static_cast<CaretSticky>(wParam) <= CaretSticky::WhiteSpace) {\r\n\t\t\tcaretSticky = static_cast<CaretSticky>(wParam);\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::GetCaretSticky:\r\n\t\treturn static_cast<sptr_t>(caretSticky);\r\n\r\n\tcase Message::ToggleCaretSticky:\r\n\t\tcaretSticky = (caretSticky == CaretSticky::Off) ? CaretSticky::On : CaretSticky::Off;\r\n\t\tbreak;\r\n\r\n\tcase Message::GetColumn:\r\n\t\treturn pdoc->GetColumn(PositionFromUPtr(wParam));\r\n\r\n\tcase Message::FindColumn:\r\n\t\treturn pdoc->FindColumn(LineFromUPtr(wParam), lParam);\r\n\r\n\tcase Message::SetHScrollBar :\r\n\t\tif (horizontalScrollBarVisible != (wParam != 0)) {\r\n\t\t\thorizontalScrollBarVisible = wParam != 0;\r\n\t\t\tSetScrollBars();\r\n\t\t\tReconfigureScrollBars();\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::GetHScrollBar:\r\n\t\treturn horizontalScrollBarVisible;\r\n\r\n\tcase Message::SetVScrollBar:\r\n\t\tif (verticalScrollBarVisible != (wParam != 0)) {\r\n\t\t\tverticalScrollBarVisible = wParam != 0;\r\n\t\t\tSetScrollBars();\r\n\t\t\tReconfigureScrollBars();\r\n\t\t\tif (verticalScrollBarVisible)\r\n\t\t\t\tSetVerticalScrollPos();\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::GetVScrollBar:\r\n\t\treturn verticalScrollBarVisible;\r\n\r\n\tcase Message::SetIndentationGuides:\r\n\t\tvs.viewIndentationGuides = static_cast<IndentView>(wParam);\r\n\t\tRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::GetIndentationGuides:\r\n\t\treturn static_cast<sptr_t>(vs.viewIndentationGuides);\r\n\r\n\tcase Message::SetHighlightGuide:\r\n\t\tif ((highlightGuideColumn != static_cast<int>(wParam)) || (wParam > 0)) {\r\n\t\t\thighlightGuideColumn = static_cast<int>(wParam);\r\n\t\t\tRedraw();\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::GetHighlightGuide:\r\n\t\treturn highlightGuideColumn;\r\n\r\n\tcase Message::GetLineEndPosition:\r\n\t\treturn pdoc->LineEnd(LineFromUPtr(wParam));\r\n\r\n\tcase Message::SetCodePage:\r\n\t\tif (ValidCodePage(static_cast<int>(wParam))) {\r\n\t\t\tif (pdoc->SetDBCSCodePage(static_cast<int>(wParam))) {\r\n\t\t\t\tpcs->Clear();\r\n\t\t\t\tpcs->InsertLines(0, pdoc->LinesTotal() - 1);\r\n\t\t\t\tSetAnnotationHeights(0, pdoc->LinesTotal());\r\n\t\t\t\tInvalidateStyleRedraw();\r\n\t\t\t\tSetRepresentations();\r\n\t\t\t}\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::GetCodePage:\r\n\t\treturn pdoc->dbcsCodePage;\r\n\r\n\tcase Message::SetIMEInteraction:\r\n\t\timeInteraction = static_cast<IMEInteraction>(wParam);\r\n\t\tbreak;\r\n\r\n\tcase Message::GetIMEInteraction:\r\n\t\treturn static_cast<sptr_t>(imeInteraction);\r\n\r\n\tcase Message::SetBidirectional:\r\n\t\t// Message::SetBidirectional is implemented on platform subclasses if they support bidirectional text.\r\n\t\tbreak;\r\n\r\n\tcase Message::GetBidirectional:\r\n\t\treturn static_cast<sptr_t>(bidirectional);\r\n\r\n\tcase Message::GetLineCharacterIndex:\r\n\t\treturn static_cast<sptr_t>(pdoc->LineCharacterIndex());\r\n\r\n\tcase Message::AllocateLineCharacterIndex:\r\n\t\tpdoc->AllocateLineCharacterIndex(static_cast<LineCharacterIndexType>(wParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::ReleaseLineCharacterIndex:\r\n\t\tpdoc->ReleaseLineCharacterIndex(static_cast<LineCharacterIndexType>(wParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::LineFromIndexPosition:\r\n\t\treturn pdoc->LineFromPositionIndex(PositionFromUPtr(wParam), static_cast<LineCharacterIndexType>(lParam));\r\n\r\n\tcase Message::IndexPositionFromLine:\r\n\t\treturn pdoc->IndexLineStart(LineFromUPtr(wParam), static_cast<LineCharacterIndexType>(lParam));\r\n\r\n\t\t// Marker definition and setting\r\n\tcase Message::MarkerDefine:\r\n\t\tif (wParam <= MarkerMax) {\r\n\t\t\tvs.markers[wParam].markType = static_cast<MarkerSymbol>(lParam);\r\n\t\t\tvs.CalcLargestMarkerHeight();\r\n\t\t}\r\n\t\tInvalidateStyleData();\r\n\t\tRedrawSelMargin();\r\n\t\tbreak;\r\n\r\n\tcase Message::MarkerSymbolDefined:\r\n\t\tif (wParam <= MarkerMax)\r\n\t\t\treturn static_cast<sptr_t>(vs.markers[wParam].markType);\r\n\t\telse\r\n\t\t\treturn 0;\r\n\r\n\tcase Message::MarkerSetFore:\r\n\t\tif (wParam <= MarkerMax)\r\n\t\t\tvs.markers[wParam].fore = ColourRGBA::FromIpRGB(lParam);\r\n\t\tInvalidateStyleData();\r\n\t\tRedrawSelMargin();\r\n\t\tbreak;\r\n\tcase Message::MarkerSetBack:\r\n\t\tif (wParam <= MarkerMax)\r\n\t\t\tvs.markers[wParam].back = ColourRGBA::FromIpRGB(lParam);\r\n\t\tInvalidateStyleData();\r\n\t\tRedrawSelMargin();\r\n\t\tbreak;\r\n\tcase Message::MarkerSetBackSelected:\r\n\t\tif (wParam <= MarkerMax)\r\n\t\t\tvs.markers[wParam].backSelected = ColourRGBA::FromIpRGB(lParam);\r\n\t\tInvalidateStyleData();\r\n\t\tRedrawSelMargin();\r\n\t\tbreak;\r\n\tcase Message::MarkerSetForeTranslucent:\r\n\t\tif (wParam <= MarkerMax)\r\n\t\t\tvs.markers[wParam].fore = ColourRGBA(static_cast<int>(lParam));\r\n\t\tInvalidateStyleData();\r\n\t\tRedrawSelMargin();\r\n\t\tbreak;\r\n\tcase Message::MarkerSetBackTranslucent:\r\n\t\tif (wParam <= MarkerMax)\r\n\t\t\tvs.markers[wParam].back = ColourRGBA(static_cast<int>(lParam));\r\n\t\tInvalidateStyleData();\r\n\t\tRedrawSelMargin();\r\n\t\tbreak;\r\n\tcase Message::MarkerSetBackSelectedTranslucent:\r\n\t\tif (wParam <= MarkerMax)\r\n\t\t\tvs.markers[wParam].backSelected = ColourRGBA(static_cast<int>(lParam));\r\n\t\tInvalidateStyleData();\r\n\t\tRedrawSelMargin();\r\n\t\tbreak;\r\n\tcase Message::MarkerSetStrokeWidth:\r\n\t\tif (wParam <= MarkerMax)\r\n\t\t\tvs.markers[wParam].strokeWidth = lParam / 100.0f;\r\n\t\tInvalidateStyleData();\r\n\t\tRedrawSelMargin();\r\n\t\tbreak;\r\n\tcase Message::MarkerEnableHighlight:\r\n\t\tmarginView.highlightDelimiter.isEnabled = wParam == 1;\r\n\t\tRedrawSelMargin();\r\n\t\tbreak;\r\n\tcase Message::MarkerSetAlpha:\r\n\t\tif (wParam <= MarkerMax) {\r\n\t\t\tif (static_cast<Alpha>(lParam) == Alpha::NoAlpha) {\r\n\t\t\t\tSetAppearance(vs.markers[wParam].alpha, Alpha::Opaque);\r\n\t\t\t\tSetAppearance(vs.markers[wParam].layer, Layer::Base);\r\n\t\t\t} else {\r\n\t\t\t\tSetAppearance(vs.markers[wParam].alpha, static_cast<Alpha>(lParam));\r\n\t\t\t\tSetAppearance(vs.markers[wParam].layer, Layer::OverText);\r\n\t\t\t}\r\n\t\t}\r\n\t\tbreak;\r\n\tcase Message::MarkerSetLayer:\r\n\t\tif (wParam <= MarkerMax) {\r\n\t\t\tSetAppearance(vs.markers[wParam].layer, static_cast<Layer>(lParam));\r\n\t\t}\r\n\t\tbreak;\r\n\tcase Message::MarkerGetLayer:\r\n\t\tif (wParam <= MarkerMax) {\r\n\t\t\treturn static_cast<sptr_t>(vs.markers[wParam].layer);\r\n\t\t}\r\n\t\treturn 0;\r\n\tcase Message::MarkerAdd: {\r\n\t\t\tconst int markerID = pdoc->AddMark(LineFromUPtr(wParam), static_cast<int>(lParam));\r\n\t\t\treturn markerID;\r\n\t\t}\r\n\tcase Message::MarkerAddSet:\r\n\t\tif (lParam != 0)\r\n\t\t\tpdoc->AddMarkSet(LineFromUPtr(wParam), static_cast<int>(lParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::MarkerDelete:\r\n\t\tpdoc->DeleteMark(LineFromUPtr(wParam), static_cast<int>(lParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::MarkerDeleteAll:\r\n\t\tpdoc->DeleteAllMarks(static_cast<int>(wParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::MarkerGet:\r\n\t\treturn GetMark(LineFromUPtr(wParam));\r\n\r\n\tcase Message::MarkerNext:\r\n\t\treturn pdoc->MarkerNext(LineFromUPtr(wParam), static_cast<int>(lParam));\r\n\r\n\tcase Message::MarkerPrevious: {\r\n\t\t\tfor (Sci::Line iLine = LineFromUPtr(wParam); iLine >= 0; iLine--) {\r\n\t\t\t\tif ((GetMark(iLine) & lParam) != 0)\r\n\t\t\t\t\treturn iLine;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn -1;\r\n\r\n\tcase Message::MarkerDefinePixmap:\r\n\t\tif (wParam <= MarkerMax) {\r\n\t\t\tvs.markers[wParam].SetXPM(ConstCharPtrFromSPtr(lParam));\r\n\t\t\tvs.CalcLargestMarkerHeight();\r\n\t\t}\r\n\t\tInvalidateStyleData();\r\n\t\tRedrawSelMargin();\r\n\t\tbreak;\r\n\r\n\tcase Message::RGBAImageSetWidth:\r\n\t\tsizeRGBAImage.x = static_cast<XYPOSITION>(wParam);\r\n\t\tbreak;\r\n\r\n\tcase Message::RGBAImageSetHeight:\r\n\t\tsizeRGBAImage.y = static_cast<XYPOSITION>(wParam);\r\n\t\tbreak;\r\n\r\n\tcase Message::RGBAImageSetScale:\r\n\t\tscaleRGBAImage = static_cast<float>(wParam);\r\n\t\tbreak;\r\n\r\n\tcase Message::MarkerDefineRGBAImage:\r\n\t\tif (wParam <= MarkerMax) {\r\n\t\t\tvs.markers[wParam].SetRGBAImage(sizeRGBAImage, scaleRGBAImage / 100.0f, ConstUCharPtrFromSPtr(lParam));\r\n\t\t\tvs.CalcLargestMarkerHeight();\r\n\t\t}\r\n\t\tInvalidateStyleData();\r\n\t\tRedrawSelMargin();\r\n\t\tbreak;\r\n\r\n\tcase Message::SetMarginTypeN:\r\n\t\tif (ValidMargin(wParam)) {\r\n\t\t\tvs.ms[wParam].style = static_cast<MarginType>(lParam);\r\n\t\t\tInvalidateStyleRedraw();\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::GetMarginTypeN:\r\n\t\tif (ValidMargin(wParam))\r\n\t\t\treturn static_cast<sptr_t>(vs.ms[wParam].style);\r\n\t\telse\r\n\t\t\treturn 0;\r\n\r\n\tcase Message::SetMarginWidthN:\r\n\t\tif (ValidMargin(wParam)) {\r\n\t\t\t// Short-circuit if the width is unchanged, to avoid unnecessary redraw.\r\n\t\t\tif (vs.ms[wParam].width != lParam) {\r\n\t\t\t\tlastXChosen += static_cast<int>(lParam) - vs.ms[wParam].width;\r\n\t\t\t\tvs.ms[wParam].width = static_cast<int>(lParam);\r\n\t\t\t\tInvalidateStyleRedraw();\r\n\t\t\t}\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::GetMarginWidthN:\r\n\t\tif (ValidMargin(wParam))\r\n\t\t\treturn vs.ms[wParam].width;\r\n\t\telse\r\n\t\t\treturn 0;\r\n\r\n\tcase Message::SetMarginMaskN:\r\n\t\tif (ValidMargin(wParam)) {\r\n\t\t\tvs.ms[wParam].mask = static_cast<int>(lParam);\r\n\t\t\tInvalidateStyleRedraw();\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::GetMarginMaskN:\r\n\t\tif (ValidMargin(wParam))\r\n\t\t\treturn vs.ms[wParam].mask;\r\n\t\telse\r\n\t\t\treturn 0;\r\n\r\n\tcase Message::SetMarginSensitiveN:\r\n\t\tif (ValidMargin(wParam)) {\r\n\t\t\tvs.ms[wParam].sensitive = lParam != 0;\r\n\t\t\tInvalidateStyleRedraw();\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::GetMarginSensitiveN:\r\n\t\tif (ValidMargin(wParam))\r\n\t\t\treturn vs.ms[wParam].sensitive ? 1 : 0;\r\n\t\telse\r\n\t\t\treturn 0;\r\n\r\n\tcase Message::SetMarginCursorN:\r\n\t\tif (ValidMargin(wParam))\r\n\t\t\tvs.ms[wParam].cursor = static_cast<CursorShape>(lParam);\r\n\t\tbreak;\r\n\r\n\tcase Message::GetMarginCursorN:\r\n\t\tif (ValidMargin(wParam))\r\n\t\t\treturn static_cast<sptr_t>(vs.ms[wParam].cursor);\r\n\t\telse\r\n\t\t\treturn 0;\r\n\r\n\tcase Message::SetMarginBackN:\r\n\t\tif (ValidMargin(wParam)) {\r\n\t\t\tvs.ms[wParam].back = ColourRGBA::FromIpRGB(lParam);\r\n\t\t\tInvalidateStyleRedraw();\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::GetMarginBackN:\r\n\t\tif (ValidMargin(wParam))\r\n\t\t\treturn vs.ms[wParam].back.OpaqueRGB();\r\n\t\telse\r\n\t\t\treturn 0;\r\n\r\n\tcase Message::SetMargins:\r\n\t\tif (wParam < 1000)\r\n\t\t\tvs.ms.resize(wParam);\r\n\t\tbreak;\r\n\r\n\tcase Message::GetMargins:\r\n\t\treturn vs.ms.size();\r\n\r\n\tcase Message::StyleClearAll:\r\n\t\tvs.ClearStyles();\r\n\t\tInvalidateStyleRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::StyleSetFore:\r\n\tcase Message::StyleSetBack:\r\n\tcase Message::StyleSetBold:\r\n\tcase Message::StyleSetWeight:\r\n\tcase Message::StyleSetItalic:\r\n\tcase Message::StyleSetEOLFilled:\r\n\tcase Message::StyleSetSize:\r\n\tcase Message::StyleSetSizeFractional:\r\n\tcase Message::StyleSetFont:\r\n\tcase Message::StyleSetUnderline:\r\n\tcase Message::StyleSetCase:\r\n\tcase Message::StyleSetCharacterSet:\r\n\tcase Message::StyleSetVisible:\r\n\tcase Message::StyleSetChangeable:\r\n\tcase Message::StyleSetHotSpot:\r\n\tcase Message::StyleSetCheckMonospaced:\r\n\tcase Message::StyleSetInvisibleRepresentation:\r\n\t\tStyleSetMessage(iMessage, wParam, lParam);\r\n\t\tbreak;\r\n\r\n\tcase Message::StyleGetFore:\r\n\tcase Message::StyleGetBack:\r\n\tcase Message::StyleGetBold:\r\n\tcase Message::StyleGetWeight:\r\n\tcase Message::StyleGetItalic:\r\n\tcase Message::StyleGetEOLFilled:\r\n\tcase Message::StyleGetSize:\r\n\tcase Message::StyleGetSizeFractional:\r\n\tcase Message::StyleGetFont:\r\n\tcase Message::StyleGetUnderline:\r\n\tcase Message::StyleGetCase:\r\n\tcase Message::StyleGetCharacterSet:\r\n\tcase Message::StyleGetVisible:\r\n\tcase Message::StyleGetChangeable:\r\n\tcase Message::StyleGetHotSpot:\r\n\tcase Message::StyleGetCheckMonospaced:\r\n\tcase Message::StyleGetInvisibleRepresentation:\r\n\t\treturn StyleGetMessage(iMessage, wParam, lParam);\r\n\r\n\tcase Message::StyleResetDefault:\r\n\t\tvs.ResetDefaultStyle();\r\n\t\tInvalidateStyleRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::SetElementColour:\r\n\t\tif (vs.SetElementColour(static_cast<Element>(wParam), ColourRGBA(static_cast<int>(lParam)))) {\r\n\t\t\tInvalidateStyleRedraw();\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::GetElementColour:\r\n\t\treturn vs.ElementColour(static_cast<Element>(wParam)).value_or(ColourRGBA()).AsInteger();\r\n\r\n\tcase Message::ResetElementColour:\r\n\t\tif (vs.ResetElement(static_cast<Element>(wParam))) {\r\n\t\t\tInvalidateStyleRedraw();\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::GetElementIsSet:\r\n\t\treturn vs.ElementColour(static_cast<Element>(wParam)).has_value();\r\n\r\n\tcase Message::GetElementAllowsTranslucent:\r\n\t\treturn vs.ElementAllowsTranslucent(static_cast<Element>(wParam));\r\n\r\n\tcase Message::GetElementBaseColour:\r\n\t\treturn vs.elementBaseColours[static_cast<Element>(wParam)].value_or(ColourRGBA()).AsInteger();\r\n\r\n\tcase Message::SetFontLocale:\r\n\t\tif (lParam) {\r\n\t\t\tvs.SetFontLocaleName(ConstCharPtrFromSPtr(lParam));\r\n\t\t\tInvalidateStyleRedraw();\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::GetFontLocale:\r\n\t\treturn StringResult(lParam, vs.localeName.c_str());\r\n\r\n#ifdef INCLUDE_DEPRECATED_FEATURES\r\n\tcase SCI_SETSTYLEBITS:\r\n\t\tvs.EnsureStyle(0xff);\r\n\t\tbreak;\r\n\r\n\tcase SCI_GETSTYLEBITS:\r\n\t\treturn 8;\r\n#endif\r\n\r\n\tcase Message::SetLineState:\r\n\t\treturn pdoc->SetLineState(LineFromUPtr(wParam), static_cast<int>(lParam));\r\n\r\n\tcase Message::GetLineState:\r\n\t\treturn pdoc->GetLineState(LineFromUPtr(wParam));\r\n\r\n\tcase Message::GetMaxLineState:\r\n\t\treturn pdoc->GetMaxLineState();\r\n\r\n\tcase Message::GetCaretLineVisible:\r\n\t\treturn vs.ElementColour(Element::CaretLineBack) ? 1 : 0;\r\n\tcase Message::SetCaretLineVisible:\r\n\t\tif (wParam) {\r\n\t\t\tif (!vs.elementColours.count(Element::CaretLineBack)) {\r\n\t\t\t\t// Yellow default\r\n\t\t\t\tvs.elementColours[Element::CaretLineBack] = ColourRGBA(maximumByte, maximumByte, 0);\r\n\t\t\t\tInvalidateStyleRedraw();\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (vs.ResetElement(Element::CaretLineBack)) {\r\n\t\t\t\tInvalidateStyleRedraw();\r\n\t\t\t}\r\n\t\t}\r\n\t\tbreak;\r\n\tcase Message::GetCaretLineVisibleAlways:\r\n\t\treturn vs.caretLine.alwaysShow;\r\n\tcase Message::SetCaretLineVisibleAlways:\r\n\t\tvs.caretLine.alwaysShow = wParam != 0;\r\n\t\tInvalidateStyleRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::GetCaretLineHighlightSubLine:\r\n\t\treturn vs.caretLine.subLine;\r\n\tcase Message::SetCaretLineHighlightSubLine:\r\n\t\tvs.caretLine.subLine = wParam != 0;\r\n\t\tInvalidateStyleRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::GetCaretLineFrame:\r\n\t\treturn vs.caretLine.frame;\r\n\tcase Message::SetCaretLineFrame:\r\n\t\tvs.caretLine.frame = static_cast<int>(wParam);\r\n\t\tInvalidateStyleRedraw();\r\n\t\tbreak;\r\n\tcase Message::GetCaretLineBack:\r\n\t\treturn vs.ElementColourForced(Element::CaretLineBack).OpaqueRGB();\r\n\r\n\tcase Message::SetCaretLineBack:\r\n\t\tvs.SetElementRGB(Element::CaretLineBack, static_cast<int>(wParam));\r\n\t\tInvalidateStyleRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::GetCaretLineLayer:\r\n\t\treturn static_cast<sptr_t>(vs.caretLine.layer);\r\n\r\n\tcase Message::SetCaretLineLayer:\r\n\t\tif (vs.caretLine.layer != static_cast<Layer>(wParam)) {\r\n\t\t\tvs.caretLine.layer = static_cast<Layer>(wParam);\r\n\t\t\tUpdateBaseElements();\r\n\t\t\tInvalidateStyleRedraw();\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::GetCaretLineBackAlpha:\r\n\t\tif (vs.caretLine.layer == Layer::Base)\r\n\t\t\treturn static_cast<sptr_t>(Alpha::NoAlpha);\r\n\t\treturn vs.ElementColour(Element::CaretLineBack).value_or(ColourRGBA()).GetAlpha();\r\n\r\n\tcase Message::SetCaretLineBackAlpha: {\r\n\t\t\tconst Layer layerNew = (static_cast<Alpha>(wParam) == Alpha::NoAlpha) ? Layer::Base : Layer::OverText;\r\n\t\t\tvs.caretLine.layer = layerNew;\r\n\t\t\tif (vs.ElementColour(Element::CaretLineBack)) {\r\n\t\t\t\tvs.SetElementAlpha(Element::CaretLineBack, static_cast<int>(wParam));\r\n\t\t\t}\r\n\t\t\tInvalidateStyleRedraw();\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\t\t// Folding messages\r\n\r\n\tcase Message::VisibleFromDocLine:\r\n\t\treturn pcs->DisplayFromDoc(LineFromUPtr(wParam));\r\n\r\n\tcase Message::DocLineFromVisible:\r\n\t\treturn pcs->DocFromDisplay(LineFromUPtr(wParam));\r\n\r\n\tcase Message::WrapCount:\r\n\t\treturn WrapCount(LineFromUPtr(wParam));\r\n\r\n\tcase Message::SetFoldLevel: {\r\n\t\t\tconst int prev = pdoc->SetLevel(LineFromUPtr(wParam), static_cast<int>(lParam));\r\n\t\t\tif (prev != static_cast<int>(lParam))\r\n\t\t\t\tRedrawSelMargin();\r\n\t\t\treturn prev;\r\n\t\t}\r\n\r\n\tcase Message::GetFoldLevel:\r\n\t\treturn pdoc->GetLevel(LineFromUPtr(wParam));\r\n\r\n\tcase Message::GetLastChild:\r\n\t\treturn pdoc->GetLastChild(LineFromUPtr(wParam), OptionalFoldLevel(lParam));\r\n\r\n\tcase Message::GetFoldParent:\r\n\t\treturn pdoc->GetFoldParent(LineFromUPtr(wParam));\r\n\r\n\tcase Message::ShowLines:\r\n\t\tpcs->SetVisible(LineFromUPtr(wParam), lParam, true);\r\n\t\tSetScrollBars();\r\n\t\tRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::HideLines:\r\n\t\tpcs->SetVisible(LineFromUPtr(wParam), lParam, false);\r\n\t\tSetScrollBars();\r\n\t\tRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::GetLineVisible:\r\n\t\treturn pcs->GetVisible(LineFromUPtr(wParam));\r\n\r\n\tcase Message::GetAllLinesVisible:\r\n\t\treturn pcs->HiddenLines() ? 0 : 1;\r\n\r\n\tcase Message::SetFoldExpanded:\r\n\t\tSetFoldExpanded(LineFromUPtr(wParam), lParam != 0);\r\n\t\tbreak;\r\n\r\n\tcase Message::GetFoldExpanded:\r\n\t\treturn pcs->GetExpanded(LineFromUPtr(wParam));\r\n\r\n\tcase Message::SetAutomaticFold:\r\n\t\tfoldAutomatic = static_cast<AutomaticFold>(wParam);\r\n\t\tbreak;\r\n\r\n\tcase Message::GetAutomaticFold:\r\n\t\treturn static_cast<sptr_t>(foldAutomatic);\r\n\r\n\tcase Message::SetFoldFlags:\r\n\t\tfoldFlags = static_cast<FoldFlag>(wParam);\r\n\t\tRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::ToggleFoldShowText:\r\n\t\tpcs->SetFoldDisplayText(LineFromUPtr(wParam), ConstCharPtrFromSPtr(lParam));\r\n\t\tFoldLine(LineFromUPtr(wParam), FoldAction::Toggle);\r\n\t\tbreak;\r\n\r\n\tcase Message::FoldDisplayTextSetStyle:\r\n\t\tfoldDisplayTextStyle = static_cast<FoldDisplayTextStyle>(wParam);\r\n\t\tRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::FoldDisplayTextGetStyle:\r\n\t\treturn static_cast<sptr_t>(foldDisplayTextStyle);\r\n\r\n\tcase Message::SetDefaultFoldDisplayText:\r\n\t\tSetDefaultFoldDisplayText(ConstCharPtrFromSPtr(lParam));\r\n\t\tRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::GetDefaultFoldDisplayText:\r\n\t\treturn StringResult(lParam, GetDefaultFoldDisplayText());\r\n\r\n\tcase Message::ToggleFold:\r\n\t\tFoldLine(LineFromUPtr(wParam), FoldAction::Toggle);\r\n\t\tbreak;\r\n\r\n\tcase Message::FoldLine:\r\n\t\tFoldLine(LineFromUPtr(wParam), static_cast<FoldAction>(lParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::FoldChildren:\r\n\t\tFoldExpand(LineFromUPtr(wParam), static_cast<FoldAction>(lParam), pdoc->GetFoldLevel(LineFromUPtr(wParam)));\r\n\t\tbreak;\r\n\r\n\tcase Message::FoldAll:\r\n\t\tFoldAll(static_cast<FoldAction>(wParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::ExpandChildren:\r\n\t\tFoldExpand(LineFromUPtr(wParam), FoldAction::Expand, static_cast<FoldLevel>(lParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::ContractedFoldNext:\r\n\t\treturn ContractedFoldNext(LineFromUPtr(wParam));\r\n\r\n\tcase Message::EnsureVisible:\r\n\t\tEnsureLineVisible(LineFromUPtr(wParam), false);\r\n\t\tbreak;\r\n\r\n\tcase Message::EnsureVisibleEnforcePolicy:\r\n\t\tEnsureLineVisible(LineFromUPtr(wParam), true);\r\n\t\tbreak;\r\n\r\n\tcase Message::ScrollRange:\r\n\t\tScrollRange(SelectionRange(PositionFromUPtr(wParam), lParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::SearchAnchor:\r\n\t\tSearchAnchor();\r\n\t\tbreak;\r\n\r\n\tcase Message::SearchNext:\r\n\tcase Message::SearchPrev:\r\n\t\treturn SearchText(iMessage, wParam, lParam);\r\n\r\n\tcase Message::SetXCaretPolicy:\r\n\t\tcaretPolicies.x = CaretPolicySlop(wParam, lParam);\r\n\t\tbreak;\r\n\r\n\tcase Message::SetYCaretPolicy:\r\n\t\tcaretPolicies.y = CaretPolicySlop(wParam, lParam);\r\n\t\tbreak;\r\n\r\n\tcase Message::SetVisiblePolicy:\r\n\t\tvisiblePolicy = VisiblePolicySlop(wParam, lParam);\r\n\t\tbreak;\r\n\r\n\tcase Message::LinesOnScreen:\r\n\t\treturn LinesOnScreen();\r\n\r\n\tcase Message::SetSelFore:\r\n\t\tvs.elementColours[Element::SelectionText] = OptionalColour(wParam, lParam);\r\n\t\tvs.elementColours[Element::SelectionAdditionalText] = OptionalColour(wParam, lParam);\r\n\t\tInvalidateStyleRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::SetSelBack:\r\n\t\tif (wParam) {\r\n\t\t\tvs.SetElementRGB(Element::SelectionBack, static_cast<int>(lParam));\r\n\t\t\tvs.SetElementRGB(Element::SelectionAdditionalBack, static_cast<int>(lParam));\r\n\t\t} else {\r\n\t\t\tvs.ResetElement(Element::SelectionBack);\r\n\t\t\tvs.ResetElement(Element::SelectionAdditionalBack);\r\n\t\t}\r\n\t\tInvalidateStyleRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::SetSelAlpha: {\r\n\t\t\tconst Layer layerNew = (static_cast<Alpha>(wParam) == Alpha::NoAlpha) ? Layer::Base : Layer::OverText;\r\n\t\t\tif (vs.selection.layer != layerNew) {\r\n\t\t\t    vs.selection.layer = layerNew;\r\n\t\t\t    UpdateBaseElements();\r\n\t\t\t}\r\n\t\t\tconst int alpha = static_cast<int>(wParam);\r\n\t\t\tvs.SetElementAlpha(Element::SelectionBack, alpha);\r\n\t\t\tvs.SetElementAlpha(Element::SelectionAdditionalBack, alpha);\r\n\t\t\tvs.SetElementAlpha(Element::SelectionSecondaryBack, alpha);\r\n\t\t\tvs.SetElementAlpha(Element::SelectionInactiveBack, alpha);\r\n\t\t\tInvalidateStyleRedraw();\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::GetSelAlpha:\r\n\t\tif (vs.selection.layer == Layer::Base)\r\n\t\t\treturn static_cast<sptr_t>(Alpha::NoAlpha);\r\n\t\treturn vs.ElementColourForced(Element::SelectionBack).GetAlpha();\r\n\r\n\tcase Message::GetSelEOLFilled:\r\n\t\treturn vs.selection.eolFilled;\r\n\r\n\tcase Message::SetSelEOLFilled:\r\n\t\tvs.selection.eolFilled = wParam != 0;\r\n\t\tInvalidateStyleRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::SetWhitespaceFore:\r\n\t\tif (vs.SetElementColourOptional(Element::WhiteSpace, wParam, lParam)) {\r\n\t\t\tInvalidateStyleRedraw();\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::SetWhitespaceBack:\r\n\t\tif (vs.SetElementColourOptional(Element::WhiteSpaceBack, wParam, lParam)) {\r\n\t\t\tInvalidateStyleRedraw();\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::SetSelectionLayer:\r\n\t\tif (vs.selection.layer != static_cast<Layer>(wParam)) {\r\n\t\t\tvs.selection.layer = static_cast<Layer>(wParam);\r\n\t\t\tUpdateBaseElements();\r\n\t\t\tInvalidateStyleRedraw();\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::GetSelectionLayer:\r\n\t\treturn static_cast<sptr_t>(vs.selection.layer);\r\n\r\n\tcase Message::SetCaretFore:\r\n\t\tvs.elementColours[Element::Caret] = ColourRGBA::FromIpRGB(SPtrFromUPtr(wParam));\r\n\t\tInvalidateStyleRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::GetCaretFore:\r\n\t\treturn vs.ElementColourForced(Element::Caret).OpaqueRGB();\r\n\r\n\tcase Message::SetCaretStyle:\r\n\t\tif (static_cast<CaretStyle>(wParam) <= (CaretStyle::Block | CaretStyle::OverstrikeBlock | CaretStyle::Curses | CaretStyle::BlockAfter))\r\n\t\t\tvs.caret.style = static_cast<CaretStyle>(wParam);\r\n\t\telse\r\n\t\t\t/* Default to the line caret */\r\n\t\t\tvs.caret.style = CaretStyle::Line;\r\n\t\tInvalidateStyleRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::GetCaretStyle:\r\n\t\treturn static_cast<sptr_t>(vs.caret.style);\r\n\r\n\tcase Message::SetCaretWidth:\r\n\t\tvs.caret.width = std::clamp(static_cast<int>(wParam), 0, 20);\r\n\t\tInvalidateStyleRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::GetCaretWidth:\r\n\t\treturn vs.caret.width;\r\n\r\n\tcase Message::AssignCmdKey:\r\n\t\tkmap.AssignCmdKey(static_cast<Keys>(LowShortFromWParam(wParam)),\r\n\t\t\tstatic_cast<KeyMod>(HighShortFromWParam(wParam)), static_cast<Message>(lParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::ClearCmdKey:\r\n\t\tkmap.AssignCmdKey(static_cast<Keys>(LowShortFromWParam(wParam)),\r\n\t\t\tstatic_cast<KeyMod>(HighShortFromWParam(wParam)), Message::Null);\r\n\t\tbreak;\r\n\r\n\tcase Message::ClearAllCmdKeys:\r\n\t\tkmap.Clear();\r\n\t\tbreak;\r\n\r\n\tcase Message::IndicSetStyle:\r\n\t\tif (wParam <= IndicatorMax) {\r\n\t\t\tvs.indicators[wParam].sacNormal.style = static_cast<IndicatorStyle>(lParam);\r\n\t\t\tvs.indicators[wParam].sacHover.style = static_cast<IndicatorStyle>(lParam);\r\n\t\t\tInvalidateStyleRedraw();\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::IndicGetStyle:\r\n\t\treturn (wParam <= IndicatorMax) ?\r\n\t\t\tstatic_cast<sptr_t>(vs.indicators[wParam].sacNormal.style) : 0;\r\n\r\n\tcase Message::IndicSetFore:\r\n\t\tif (wParam <= IndicatorMax) {\r\n\t\t\tvs.indicators[wParam].sacNormal.fore = ColourRGBA::FromIpRGB(lParam);\r\n\t\t\tvs.indicators[wParam].sacHover.fore = ColourRGBA::FromIpRGB(lParam);\r\n\t\t\tInvalidateStyleRedraw();\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::IndicGetFore:\r\n\t\treturn (wParam <= IndicatorMax) ?\r\n\t\t\tvs.indicators[wParam].sacNormal.fore.OpaqueRGB() : 0;\r\n\r\n\tcase Message::IndicSetHoverStyle:\r\n\t\tif (wParam <= IndicatorMax) {\r\n\t\t\tvs.indicators[wParam].sacHover.style = static_cast<IndicatorStyle>(lParam);\r\n\t\t\tInvalidateStyleRedraw();\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::IndicGetHoverStyle:\r\n\t\treturn (wParam <= IndicatorMax) ?\r\n\t\t\tstatic_cast<sptr_t>(vs.indicators[wParam].sacHover.style) : 0;\r\n\r\n\tcase Message::IndicSetHoverFore:\r\n\t\tif (wParam <= IndicatorMax) {\r\n\t\t\tvs.indicators[wParam].sacHover.fore = ColourRGBA::FromIpRGB(lParam);\r\n\t\t\tInvalidateStyleRedraw();\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::IndicGetHoverFore:\r\n\t\treturn (wParam <= IndicatorMax) ?\r\n\t\t\tvs.indicators[wParam].sacHover.fore.OpaqueRGB() : 0;\r\n\r\n\tcase Message::IndicSetFlags:\r\n\t\tif (wParam <= IndicatorMax) {\r\n\t\t\tvs.indicators[wParam].SetFlags(static_cast<IndicFlag>(lParam));\r\n\t\t\tInvalidateStyleRedraw();\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::IndicGetFlags:\r\n\t\treturn (wParam <= IndicatorMax) ?\r\n\t\t\tstatic_cast<sptr_t>(vs.indicators[wParam].Flags()) : 0;\r\n\r\n\tcase Message::IndicSetUnder:\r\n\t\tif (wParam <= IndicatorMax) {\r\n\t\t\tvs.indicators[wParam].under = lParam != 0;\r\n\t\t\tInvalidateStyleRedraw();\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::IndicGetUnder:\r\n\t\treturn (wParam <= IndicatorMax) ?\r\n\t\t\tvs.indicators[wParam].under : 0;\r\n\r\n\tcase Message::IndicSetAlpha:\r\n\t\tif (wParam <= IndicatorMax && lParam >=0 && lParam <= 255) {\r\n\t\t\tvs.indicators[wParam].fillAlpha = static_cast<int>(lParam);\r\n\t\t\tInvalidateStyleRedraw();\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::IndicGetAlpha:\r\n\t\treturn (wParam <= IndicatorMax)\r\n\t\t\t? vs.indicators[wParam].fillAlpha : 0;\r\n\r\n\tcase Message::IndicSetOutlineAlpha:\r\n\t\tif (wParam <= IndicatorMax && lParam >=0 && lParam <= 255) {\r\n\t\t\tvs.indicators[wParam].outlineAlpha = static_cast<int>(lParam);\r\n\t\t\tInvalidateStyleRedraw();\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::IndicGetOutlineAlpha:\r\n\t\treturn (wParam <= IndicatorMax) ? vs.indicators[wParam].outlineAlpha : 0;\r\n\r\n\tcase Message::IndicSetStrokeWidth:\r\n\t\tif (wParam <= IndicatorMax && lParam >= 0 && lParam <= 1000) {\r\n\t\t\tvs.indicators[wParam].strokeWidth = lParam / 100.0f;\r\n\t\t\tInvalidateStyleRedraw();\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::IndicGetStrokeWidth:\r\n\t\tif (wParam <= IndicatorMax) {\r\n\t\t\treturn std::lround(vs.indicators[wParam].strokeWidth * 100);\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::SetIndicatorCurrent:\r\n\t\tpdoc->DecorationSetCurrentIndicator(static_cast<int>(wParam));\r\n\t\tbreak;\r\n\tcase Message::GetIndicatorCurrent:\r\n\t\treturn pdoc->decorations->GetCurrentIndicator();\r\n\tcase Message::SetIndicatorValue:\r\n\t\tpdoc->decorations->SetCurrentValue(static_cast<int>(wParam));\r\n\t\tbreak;\r\n\tcase Message::GetIndicatorValue:\r\n\t\treturn pdoc->decorations->GetCurrentValue();\r\n\r\n\tcase Message::IndicatorFillRange:\r\n\t\tpdoc->DecorationFillRange(PositionFromUPtr(wParam),\r\n\t\t\tpdoc->decorations->GetCurrentValue(), lParam);\r\n\t\tbreak;\r\n\r\n\tcase Message::IndicatorClearRange:\r\n\t\tpdoc->DecorationFillRange(PositionFromUPtr(wParam), 0,\r\n\t\t\tlParam);\r\n\t\tbreak;\r\n\r\n\tcase Message::IndicatorAllOnFor:\r\n\t\treturn pdoc->decorations->AllOnFor(PositionFromUPtr(wParam));\r\n\r\n\tcase Message::IndicatorValueAt:\r\n\t\treturn pdoc->decorations->ValueAt(static_cast<int>(wParam), lParam);\r\n\r\n\tcase Message::IndicatorStart:\r\n\t\treturn pdoc->decorations->Start(static_cast<int>(wParam), lParam);\r\n\r\n\tcase Message::IndicatorEnd:\r\n\t\treturn pdoc->decorations->End(static_cast<int>(wParam), lParam);\r\n\r\n\tcase Message::LineDown:\r\n\tcase Message::LineDownExtend:\r\n\tcase Message::ParaDown:\r\n\tcase Message::ParaDownExtend:\r\n\tcase Message::LineUp:\r\n\tcase Message::LineUpExtend:\r\n\tcase Message::ParaUp:\r\n\tcase Message::ParaUpExtend:\r\n\tcase Message::CharLeft:\r\n\tcase Message::CharLeftExtend:\r\n\tcase Message::CharRight:\r\n\tcase Message::CharRightExtend:\r\n\tcase Message::WordLeft:\r\n\tcase Message::WordLeftExtend:\r\n\tcase Message::WordRight:\r\n\tcase Message::WordRightExtend:\r\n\tcase Message::WordLeftEnd:\r\n\tcase Message::WordLeftEndExtend:\r\n\tcase Message::WordRightEnd:\r\n\tcase Message::WordRightEndExtend:\r\n\tcase Message::Home:\r\n\tcase Message::HomeExtend:\r\n\tcase Message::LineEnd:\r\n\tcase Message::LineEndExtend:\r\n\tcase Message::HomeWrap:\r\n\tcase Message::HomeWrapExtend:\r\n\tcase Message::LineEndWrap:\r\n\tcase Message::LineEndWrapExtend:\r\n\tcase Message::DocumentStart:\r\n\tcase Message::DocumentStartExtend:\r\n\tcase Message::DocumentEnd:\r\n\tcase Message::DocumentEndExtend:\r\n\tcase Message::ScrollToStart:\r\n\tcase Message::ScrollToEnd:\r\n\r\n\tcase Message::StutteredPageUp:\r\n\tcase Message::StutteredPageUpExtend:\r\n\tcase Message::StutteredPageDown:\r\n\tcase Message::StutteredPageDownExtend:\r\n\r\n\tcase Message::PageUp:\r\n\tcase Message::PageUpExtend:\r\n\tcase Message::PageDown:\r\n\tcase Message::PageDownExtend:\r\n\tcase Message::EditToggleOvertype:\r\n\tcase Message::Cancel:\r\n\tcase Message::DeleteBack:\r\n\tcase Message::Tab:\r\n\tcase Message::BackTab:\r\n\tcase Message::NewLine:\r\n\tcase Message::FormFeed:\r\n\tcase Message::VCHome:\r\n\tcase Message::VCHomeExtend:\r\n\tcase Message::VCHomeWrap:\r\n\tcase Message::VCHomeWrapExtend:\r\n\tcase Message::VCHomeDisplay:\r\n\tcase Message::VCHomeDisplayExtend:\r\n\tcase Message::ZoomIn:\r\n\tcase Message::ZoomOut:\r\n\tcase Message::DelWordLeft:\r\n\tcase Message::DelWordRight:\r\n\tcase Message::DelWordRightEnd:\r\n\tcase Message::DelLineLeft:\r\n\tcase Message::DelLineRight:\r\n\tcase Message::LineCopy:\r\n\tcase Message::LineCut:\r\n\tcase Message::LineDelete:\r\n\tcase Message::LineTranspose:\r\n\tcase Message::LineReverse:\r\n\tcase Message::LineDuplicate:\r\n\tcase Message::LowerCase:\r\n\tcase Message::UpperCase:\r\n\tcase Message::LineScrollDown:\r\n\tcase Message::LineScrollUp:\r\n\tcase Message::WordPartLeft:\r\n\tcase Message::WordPartLeftExtend:\r\n\tcase Message::WordPartRight:\r\n\tcase Message::WordPartRightExtend:\r\n\tcase Message::DeleteBackNotLine:\r\n\tcase Message::HomeDisplay:\r\n\tcase Message::HomeDisplayExtend:\r\n\tcase Message::LineEndDisplay:\r\n\tcase Message::LineEndDisplayExtend:\r\n\tcase Message::LineDownRectExtend:\r\n\tcase Message::LineUpRectExtend:\r\n\tcase Message::CharLeftRectExtend:\r\n\tcase Message::CharRightRectExtend:\r\n\tcase Message::HomeRectExtend:\r\n\tcase Message::VCHomeRectExtend:\r\n\tcase Message::LineEndRectExtend:\r\n\tcase Message::PageUpRectExtend:\r\n\tcase Message::PageDownRectExtend:\r\n\tcase Message::SelectionDuplicate:\r\n\t\treturn KeyCommand(iMessage);\r\n\r\n\tcase Message::BraceHighlight:\r\n\t\tSetBraceHighlight(PositionFromUPtr(wParam), lParam, StyleBraceLight);\r\n\t\tbreak;\r\n\r\n\tcase Message::BraceHighlightIndicator:\r\n\t\tif (lParam >= 0 && static_cast<size_t>(lParam) <= IndicatorMax) {\r\n\t\t\tvs.braceHighlightIndicatorSet = wParam != 0;\r\n\t\t\tvs.braceHighlightIndicator = static_cast<int>(lParam);\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::BraceBadLight:\r\n\t\tSetBraceHighlight(PositionFromUPtr(wParam), -1, StyleBraceBad);\r\n\t\tbreak;\r\n\r\n\tcase Message::BraceBadLightIndicator:\r\n\t\tif (lParam >= 0 && static_cast<size_t>(lParam) <= IndicatorMax) {\r\n\t\t\tvs.braceBadLightIndicatorSet = wParam != 0;\r\n\t\t\tvs.braceBadLightIndicator = static_cast<int>(lParam);\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::BraceMatch:\r\n\t\t// wParam is position of char to find brace for,\r\n\t\t// lParam is maximum amount of text to restyle to find it\r\n\t\treturn pdoc->BraceMatch(PositionFromUPtr(wParam), lParam, 0, false);\r\n\r\n\tcase Message::BraceMatchNext:\r\n\t\treturn pdoc->BraceMatch(PositionFromUPtr(wParam), 0, lParam, true);\r\n\r\n\tcase Message::GetViewEOL:\r\n\t\treturn vs.viewEOL;\r\n\r\n\tcase Message::SetViewEOL:\r\n\t\tvs.viewEOL = wParam != 0;\r\n\t\tInvalidateStyleRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::SetZoom: {\r\n\t\t\tconst int zoomLevel = static_cast<int>(wParam);\r\n\t\t\tif (zoomLevel != vs.zoomLevel) {\r\n\t\t\t\tvs.zoomLevel = zoomLevel;\r\n\t\t\t\tInvalidateStyleRedraw();\r\n\t\t\t\tNotifyZoom();\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\tcase Message::GetZoom:\r\n\t\treturn vs.zoomLevel;\r\n\r\n\tcase Message::GetEdgeColumn:\r\n\t\treturn vs.theEdge.column;\r\n\r\n\tcase Message::SetEdgeColumn:\r\n\t\tvs.theEdge.column = static_cast<int>(wParam);\r\n\t\tInvalidateStyleRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::GetEdgeMode:\r\n\t\treturn static_cast<sptr_t>(vs.edgeState);\r\n\r\n\tcase Message::SetEdgeMode:\r\n\t\tvs.edgeState = static_cast<EdgeVisualStyle>(wParam);\r\n\t\tInvalidateStyleRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::GetEdgeColour:\r\n\t\treturn vs.theEdge.colour.OpaqueRGB();\r\n\r\n\tcase Message::SetEdgeColour:\r\n\t\tvs.theEdge.colour = ColourRGBA::FromIpRGB(SPtrFromUPtr(wParam));\r\n\t\tInvalidateStyleRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::MultiEdgeAddLine:\r\n\t\tvs.AddMultiEdge(static_cast<int>(wParam), ColourRGBA::FromIpRGB(lParam));\r\n\t\tInvalidateStyleRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::MultiEdgeClearAll:\r\n\t\tstd::vector<EdgeProperties>().swap(vs.theMultiEdge); // Free vector and memory, C++03 compatible\r\n\t\tInvalidateStyleRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::GetMultiEdgeColumn: {\r\n\t\t\tconst size_t which = wParam;\r\n\t\t\t// size_t is unsigned so this also handles negative inputs.\r\n\t\t\tif (which >= vs.theMultiEdge.size()) {\r\n\t\t\t\treturn -1;\r\n\t\t\t}\r\n\t\t\treturn vs.theMultiEdge[which].column;\r\n\t\t}\r\n\r\n\tcase Message::GetAccessibility:\r\n\t\treturn static_cast<sptr_t>(Accessibility::Disabled);\r\n\r\n\tcase Message::SetAccessibility:\r\n\t\t// May be implemented by platform code.\r\n\t\tbreak;\r\n\r\n\tcase Message::GetDocPointer:\r\n\t\treturn SPtrFromPtr(pdoc->AsDocumentEditable());\r\n\r\n\tcase Message::SetDocPointer:\r\n\t\tCancelModes();\r\n\t\tSetDocPointer(static_cast<Document *>(static_cast<IDocumentEditable *>(PtrFromSPtr(lParam))));\r\n\t\treturn 0;\r\n\r\n\tcase Message::CreateDocument: {\r\n\t\t\tDocument *doc = new Document(static_cast<DocumentOption>(lParam));\r\n\t\t\tdoc->AddRef();\r\n\t\t\tdoc->Allocate(PositionFromUPtr(wParam));\r\n\t\t\tpcs = ContractionStateCreate(pdoc->IsLarge());\r\n\t\t\treturn SPtrFromPtr(doc->AsDocumentEditable());\r\n\t\t}\r\n\r\n\tcase Message::AddRefDocument:\r\n\t\t(static_cast<IDocumentEditable *>(PtrFromSPtr(lParam)))->AddRef();\r\n\t\tbreak;\r\n\r\n\tcase Message::ReleaseDocument:\r\n\t\t(static_cast<IDocumentEditable *>(PtrFromSPtr(lParam)))->Release();\r\n\t\tbreak;\r\n\r\n\tcase Message::GetDocumentOptions:\r\n\t\treturn static_cast<sptr_t>(pdoc->Options());\r\n\r\n\tcase Message::CreateLoader: {\r\n\t\t\tDocument *doc = new Document(static_cast<DocumentOption>(lParam));\r\n\t\t\tdoc->AddRef();\r\n\t\t\tdoc->Allocate(PositionFromUPtr(wParam));\r\n\t\t\tdoc->SetUndoCollection(false);\r\n\t\t\tpcs = ContractionStateCreate(pdoc->IsLarge());\r\n\t\t\treturn reinterpret_cast<sptr_t>(static_cast<ILoader *>(doc));\r\n\t\t}\r\n\r\n\tcase Message::SetModEventMask:\r\n\t\tmodEventMask = static_cast<ModificationFlags>(wParam);\r\n\t\treturn 0;\r\n\r\n\tcase Message::GetModEventMask:\r\n\t\treturn static_cast<sptr_t>(modEventMask);\r\n\r\n\tcase Message::SetCommandEvents:\r\n\t\tcommandEvents = static_cast<bool>(wParam);\r\n\t\treturn 0;\r\n\r\n\tcase Message::GetCommandEvents:\r\n\t\treturn commandEvents;\r\n\r\n\tcase Message::ConvertEOLs:\r\n\t\tpdoc->ConvertLineEnds(static_cast<EndOfLine>(wParam));\r\n\t\tSetSelection(sel.MainCaret(), sel.MainAnchor());\t// Ensure selection inside document\r\n\t\treturn 0;\r\n\r\n\tcase Message::SetLengthForEncode:\r\n\t\tlengthForEncode = PositionFromUPtr(wParam);\r\n\t\treturn 0;\r\n\r\n\tcase Message::SelectionIsRectangle:\r\n\t\treturn sel.selType == Selection::SelTypes::rectangle ? 1 : 0;\r\n\r\n\tcase Message::SetSelectionMode:\r\n\t\tSetSelectionMode(wParam, true);\r\n\t\tbreak;\r\n\tcase Message::ChangeSelectionMode:\r\n\t\tSetSelectionMode(wParam, false);\r\n\t\tbreak;\r\n\tcase Message::GetSelectionMode:\r\n\t\tswitch (sel.selType) {\r\n\t\tcase Selection::SelTypes::stream:\r\n\t\t\treturn static_cast<sptr_t>(SelectionMode::Stream);\r\n\t\tcase Selection::SelTypes::rectangle:\r\n\t\t\treturn static_cast<sptr_t>(SelectionMode::Rectangle);\r\n\t\tcase Selection::SelTypes::lines:\r\n\t\t\treturn static_cast<sptr_t>(SelectionMode::Lines);\r\n\t\tcase Selection::SelTypes::thin:\r\n\t\t\treturn static_cast<sptr_t>(SelectionMode::Thin);\r\n\t\tdefault:\t// ?!\r\n\t\t\treturn static_cast<sptr_t>(SelectionMode::Stream);\r\n\t\t}\r\n\tcase Message::SetMoveExtendsSelection:\r\n\t\tsel.SetMoveExtends(wParam != 0);\r\n\t\tbreak;\r\n\tcase Message::GetMoveExtendsSelection:\r\n\t\treturn sel.MoveExtends();\r\n\tcase Message::GetLineSelStartPosition:\r\n\tcase Message::GetLineSelEndPosition: {\r\n\t\t\tconst SelectionSegment segmentLine(\r\n\t\t\t\tSelectionPosition(pdoc->LineStart(LineFromUPtr(wParam))),\r\n\t\t\t\tSelectionPosition(pdoc->LineEnd(LineFromUPtr(wParam))));\r\n\t\t\tfor (size_t r=0; r<sel.Count(); r++) {\r\n\t\t\t\tconst SelectionSegment portion = sel.Range(r).Intersect(segmentLine);\r\n\t\t\t\tif (portion.start.IsValid()) {\r\n\t\t\t\t\treturn (iMessage == Message::GetLineSelStartPosition) ? portion.start.Position() : portion.end.Position();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn Sci::invalidPosition;\r\n\t\t}\r\n\r\n\tcase Message::SetOvertype:\r\n\t\tif (inOverstrike != (wParam != 0)) {\r\n\t\t\tinOverstrike = wParam != 0;\r\n\t\t\tContainerNeedsUpdate(Update::Selection);\r\n\t\t\tShowCaretAtCurrentPosition();\r\n\t\t\tSetIdle(true);\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::GetOvertype:\r\n\t\treturn inOverstrike ? 1 : 0;\r\n\r\n\tcase Message::SetFocus:\r\n\t\tSetFocusState(wParam != 0);\r\n\t\tbreak;\r\n\r\n\tcase Message::GetFocus:\r\n\t\treturn hasFocus;\r\n\r\n\tcase Message::SetStatus:\r\n\t\terrorStatus = static_cast<Status>(wParam);\r\n\t\tbreak;\r\n\r\n\tcase Message::GetStatus:\r\n\t\treturn static_cast<sptr_t>(errorStatus);\r\n\r\n\tcase Message::SetMouseDownCaptures:\r\n\t\tmouseDownCaptures = wParam != 0;\r\n\t\tbreak;\r\n\r\n\tcase Message::GetMouseDownCaptures:\r\n\t\treturn mouseDownCaptures;\r\n\r\n\tcase Message::SetMouseWheelCaptures:\r\n\t\tmouseWheelCaptures = wParam != 0;\r\n\t\tbreak;\r\n\r\n\tcase Message::GetMouseWheelCaptures:\r\n\t\treturn mouseWheelCaptures;\r\n\r\n\tcase Message::SetCursor:\r\n\t\tcursorMode = static_cast<CursorShape>(wParam);\r\n\t\tDisplayCursor(Window::Cursor::text);\r\n\t\tbreak;\r\n\r\n\tcase Message::GetCursor:\r\n\t\treturn static_cast<sptr_t>(cursorMode);\r\n\r\n\tcase Message::SetControlCharSymbol:\r\n\t\tvs.controlCharSymbol = static_cast<int>(wParam);\r\n\t\tInvalidateStyleRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::GetControlCharSymbol:\r\n\t\treturn vs.controlCharSymbol;\r\n\r\n\tcase Message::SetRepresentation:\r\n\t\treprs.SetRepresentation(ConstCharPtrFromUPtr(wParam), ConstCharPtrFromSPtr(lParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::GetRepresentation: {\r\n\t\t\tconst Representation *repr = reprs.RepresentationFromCharacter(\r\n\t\t\t\tConstCharPtrFromUPtr(wParam));\r\n\t\t\tif (repr) {\r\n\t\t\t\treturn StringResult(lParam, repr->stringRep.c_str());\r\n\t\t\t}\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\tcase Message::ClearRepresentation:\r\n\t\treprs.ClearRepresentation(ConstCharPtrFromUPtr(wParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::ClearAllRepresentations:\r\n\t\tSetRepresentations();\r\n\t\tbreak;\r\n\r\n\tcase Message::SetRepresentationAppearance:\r\n\t\treprs.SetRepresentationAppearance(ConstCharPtrFromUPtr(wParam), static_cast<RepresentationAppearance>(lParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::GetRepresentationAppearance: {\r\n\t\t\tconst Representation *repr = reprs.RepresentationFromCharacter(\r\n\t\t\t\tConstCharPtrFromUPtr(wParam));\r\n\t\t\tif (repr) {\r\n\t\t\t\treturn static_cast<sptr_t>(repr->appearance);\r\n\t\t\t}\r\n\t\t\treturn 0;\r\n\t\t}\r\n\tcase Message::SetRepresentationColour:\r\n\t\treprs.SetRepresentationColour(ConstCharPtrFromUPtr(wParam), ColourRGBA(static_cast<int>(lParam)));\r\n\t\tbreak;\r\n\r\n\tcase Message::GetRepresentationColour: {\r\n\t\t\tconst Representation *repr = reprs.RepresentationFromCharacter(\r\n\t\t\t\tConstCharPtrFromUPtr(wParam));\r\n\t\t\tif (repr) {\r\n\t\t\t\treturn repr->colour.AsInteger();\r\n\t\t\t}\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\tcase Message::StartRecord:\r\n\t\trecordingMacro = true;\r\n\t\treturn 0;\r\n\r\n\tcase Message::StopRecord:\r\n\t\trecordingMacro = false;\r\n\t\treturn 0;\r\n\r\n\tcase Message::MoveCaretInsideView:\r\n\t\tMoveCaretInsideView();\r\n\t\tbreak;\r\n\r\n\tcase Message::SetFoldMarginColour:\r\n\t\tvs.foldmarginColour = OptionalColour(wParam, lParam);\r\n\t\tInvalidateStyleRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::SetFoldMarginHiColour:\r\n\t\tvs.foldmarginHighlightColour = OptionalColour(wParam, lParam);\r\n\t\tInvalidateStyleRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::SetHotspotActiveFore:\r\n\t\tif (vs.SetElementColourOptional(Element::HotSpotActive, wParam, lParam)) {\r\n\t\t\tInvalidateStyleRedraw();\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::GetHotspotActiveFore:\r\n\t\treturn vs.ElementColour(Element::HotSpotActive).value_or(ColourRGBA()).OpaqueRGB();\r\n\r\n\tcase Message::SetHotspotActiveBack:\r\n\t\tif (vs.SetElementColourOptional(Element::HotSpotActiveBack, wParam, lParam)) {\r\n\t\t\tInvalidateStyleRedraw();\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::GetHotspotActiveBack:\r\n\t\treturn vs.ElementColour(Element::HotSpotActiveBack).value_or(ColourRGBA()).OpaqueRGB();\r\n\r\n\tcase Message::SetHotspotActiveUnderline:\r\n\t\tvs.hotspotUnderline = wParam != 0;\r\n\t\tInvalidateStyleRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::GetHotspotActiveUnderline:\r\n\t\treturn vs.hotspotUnderline ? 1 : 0;\r\n\r\n\tcase Message::SetHotspotSingleLine:\r\n\t\thotspotSingleLine = wParam != 0;\r\n\t\tInvalidateStyleRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::GetHotspotSingleLine:\r\n\t\treturn hotspotSingleLine ? 1 : 0;\r\n\r\n\tcase Message::SetPasteConvertEndings:\r\n\t\tconvertPastes = wParam != 0;\r\n\t\tbreak;\r\n\r\n\tcase Message::GetPasteConvertEndings:\r\n\t\treturn convertPastes ? 1 : 0;\r\n\r\n\tcase Message::GetCharacterPointer:\r\n\t\treturn reinterpret_cast<sptr_t>(pdoc->BufferPointer());\r\n\r\n\tcase Message::GetRangePointer:\r\n\t\treturn reinterpret_cast<sptr_t>(pdoc->RangePointer(\r\n\t\t\tPositionFromUPtr(wParam), lParam));\r\n\r\n\tcase Message::GetGapPosition:\r\n\t\treturn pdoc->GapPosition();\r\n\r\n\tcase Message::SetChangeHistory:\r\n\t\tchangeHistoryOption = static_cast<ChangeHistoryOption>(wParam);\r\n\t\tpdoc->ChangeHistorySet(wParam & 1);\r\n\t\tbreak;\r\n\r\n\tcase Message::GetChangeHistory:\r\n\t\treturn static_cast<sptr_t>(changeHistoryOption);\r\n\r\n\tcase Message::SetExtraAscent:\r\n\t\tvs.extraAscent = static_cast<int>(wParam);\r\n\t\tInvalidateStyleRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::GetExtraAscent:\r\n\t\treturn vs.extraAscent;\r\n\r\n\tcase Message::SetExtraDescent:\r\n\t\tvs.extraDescent = static_cast<int>(wParam);\r\n\t\tInvalidateStyleRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::GetExtraDescent:\r\n\t\treturn vs.extraDescent;\r\n\r\n\tcase Message::MarginSetStyleOffset:\r\n\t\tvs.marginStyleOffset = static_cast<int>(wParam);\r\n\t\tInvalidateStyleRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::MarginGetStyleOffset:\r\n\t\treturn vs.marginStyleOffset;\r\n\r\n\tcase Message::SetMarginOptions:\r\n\t\tmarginOptions = static_cast<MarginOption>(wParam);\r\n\t\tbreak;\r\n\r\n\tcase Message::GetMarginOptions:\r\n\t\treturn static_cast<sptr_t>(marginOptions);\r\n\r\n\tcase Message::MarginSetText:\r\n\t\tpdoc->MarginSetText(LineFromUPtr(wParam), ConstCharPtrFromSPtr(lParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::MarginGetText: {\r\n\t\t\tconst StyledText st = pdoc->MarginStyledText(LineFromUPtr(wParam));\r\n\t\t\treturn BytesResult(lParam, reinterpret_cast<const unsigned char *>(st.text), st.length);\r\n\t\t}\r\n\r\n\tcase Message::MarginSetStyle:\r\n\t\tpdoc->MarginSetStyle(LineFromUPtr(wParam), static_cast<int>(lParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::MarginGetStyle: {\r\n\t\t\tconst StyledText st = pdoc->MarginStyledText(LineFromUPtr(wParam));\r\n\t\t\treturn st.style;\r\n\t\t}\r\n\r\n\tcase Message::MarginSetStyles:\r\n\t\tpdoc->MarginSetStyles(LineFromUPtr(wParam), ConstUCharPtrFromSPtr(lParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::MarginGetStyles: {\r\n\t\t\tconst StyledText st = pdoc->MarginStyledText(LineFromUPtr(wParam));\r\n\t\t\treturn BytesResult(lParam, st.styles, st.length);\r\n\t\t}\r\n\r\n\tcase Message::MarginTextClearAll:\r\n\t\tpdoc->MarginClearAll();\r\n\t\tbreak;\r\n\r\n\tcase Message::AnnotationSetText:\r\n\t\tpdoc->AnnotationSetText(LineFromUPtr(wParam), ConstCharPtrFromSPtr(lParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::AnnotationGetText: {\r\n\t\t\tconst StyledText st = pdoc->AnnotationStyledText(LineFromUPtr(wParam));\r\n\t\t\treturn BytesResult(lParam, reinterpret_cast<const unsigned char *>(st.text), st.length);\r\n\t\t}\r\n\r\n\tcase Message::AnnotationGetStyle: {\r\n\t\t\tconst StyledText st = pdoc->AnnotationStyledText(LineFromUPtr(wParam));\r\n\t\t\treturn st.style;\r\n\t\t}\r\n\r\n\tcase Message::AnnotationSetStyle:\r\n\t\tpdoc->AnnotationSetStyle(LineFromUPtr(wParam), static_cast<int>(lParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::AnnotationSetStyles:\r\n\t\tpdoc->AnnotationSetStyles(LineFromUPtr(wParam), ConstUCharPtrFromSPtr(lParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::AnnotationGetStyles: {\r\n\t\t\tconst StyledText st = pdoc->AnnotationStyledText(LineFromUPtr(wParam));\r\n\t\t\treturn BytesResult(lParam, st.styles, st.length);\r\n\t\t}\r\n\r\n\tcase Message::AnnotationGetLines:\r\n\t\treturn pdoc->AnnotationLines(LineFromUPtr(wParam));\r\n\r\n\tcase Message::AnnotationClearAll:\r\n\t\tpdoc->AnnotationClearAll();\r\n\t\tbreak;\r\n\r\n\tcase Message::AnnotationSetVisible:\r\n\t\tSetAnnotationVisible(static_cast<AnnotationVisible>(wParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::AnnotationGetVisible:\r\n\t\treturn static_cast<sptr_t>(vs.annotationVisible);\r\n\r\n\tcase Message::AnnotationSetStyleOffset:\r\n\t\tvs.annotationStyleOffset = static_cast<int>(wParam);\r\n\t\tInvalidateStyleRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::AnnotationGetStyleOffset:\r\n\t\treturn vs.annotationStyleOffset;\r\n\r\n\tcase Message::EOLAnnotationSetText:\r\n\t\tpdoc->EOLAnnotationSetText(LineFromUPtr(wParam), ConstCharPtrFromSPtr(lParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::EOLAnnotationGetText: {\r\n\t\t\tconst StyledText st = pdoc->EOLAnnotationStyledText(LineFromUPtr(wParam));\r\n\t\t\treturn BytesResult(lParam, reinterpret_cast<const unsigned char *>(st.text), st.length);\r\n\t\t}\r\n\r\n\tcase Message::EOLAnnotationGetStyle: {\r\n\t\t\tconst StyledText st = pdoc->EOLAnnotationStyledText(LineFromUPtr(wParam));\r\n\t\t\treturn st.style;\r\n\t\t}\r\n\r\n\tcase Message::EOLAnnotationSetStyle:\r\n\t\tpdoc->EOLAnnotationSetStyle(LineFromUPtr(wParam), static_cast<int>(lParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::EOLAnnotationClearAll:\r\n\t\tpdoc->EOLAnnotationClearAll();\r\n\t\tbreak;\r\n\r\n\tcase Message::EOLAnnotationSetVisible:\r\n\t\tSetEOLAnnotationVisible(static_cast<EOLAnnotationVisible>(wParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::EOLAnnotationGetVisible:\r\n\t\treturn static_cast<sptr_t>(vs.eolAnnotationVisible);\r\n\r\n\tcase Message::EOLAnnotationSetStyleOffset:\r\n\t\tvs.eolAnnotationStyleOffset = static_cast<int>(wParam);\r\n\t\tInvalidateStyleRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::EOLAnnotationGetStyleOffset:\r\n\t\treturn vs.eolAnnotationStyleOffset;\r\n\r\n\tcase Message::ReleaseAllExtendedStyles:\r\n\t\tvs.ReleaseAllExtendedStyles();\r\n\t\tbreak;\r\n\r\n\tcase Message::AllocateExtendedStyles:\r\n\t\treturn vs.AllocateExtendedStyles(static_cast<int>(wParam));\r\n\r\n\tcase Message::SupportsFeature:\r\n\t\treturn SupportsFeature(static_cast<Supports>(wParam));\r\n\r\n\tcase Message::AddUndoAction:\r\n\t\tpdoc->AddUndoAction(PositionFromUPtr(wParam),\r\n\t\t\tFlagSet(static_cast<UndoFlags>(lParam), UndoFlags::MayCoalesce));\r\n\t\tbreak;\r\n\r\n\tcase Message::SetMouseSelectionRectangularSwitch:\r\n\t\tmouseSelectionRectangularSwitch = wParam != 0;\r\n\t\tbreak;\r\n\r\n\tcase Message::GetMouseSelectionRectangularSwitch:\r\n\t\treturn mouseSelectionRectangularSwitch;\r\n\r\n\tcase Message::SetMultipleSelection:\r\n\t\tmultipleSelection = wParam != 0;\r\n\t\tInvalidateCaret();\r\n\t\tbreak;\r\n\r\n\tcase Message::GetMultipleSelection:\r\n\t\treturn multipleSelection;\r\n\r\n\tcase Message::SetAdditionalSelectionTyping:\r\n\t\tadditionalSelectionTyping = wParam != 0;\r\n\t\tInvalidateCaret();\r\n\t\tbreak;\r\n\r\n\tcase Message::GetAdditionalSelectionTyping:\r\n\t\treturn additionalSelectionTyping;\r\n\r\n\tcase Message::SetMultiPaste:\r\n\t\tmultiPasteMode = static_cast<MultiPaste>(wParam);\r\n\t\tbreak;\r\n\r\n\tcase Message::GetMultiPaste:\r\n\t\treturn static_cast<sptr_t>(multiPasteMode);\r\n\r\n\tcase Message::SetAdditionalCaretsBlink:\r\n\t\tview.additionalCaretsBlink = wParam != 0;\r\n\t\tInvalidateCaret();\r\n\t\tbreak;\r\n\r\n\tcase Message::GetAdditionalCaretsBlink:\r\n\t\treturn view.additionalCaretsBlink;\r\n\r\n\tcase Message::SetAdditionalCaretsVisible:\r\n\t\tview.additionalCaretsVisible = wParam != 0;\r\n\t\tInvalidateCaret();\r\n\t\tbreak;\r\n\r\n\tcase Message::GetAdditionalCaretsVisible:\r\n\t\treturn view.additionalCaretsVisible;\r\n\r\n\tcase Message::GetSelections:\r\n\t\treturn sel.Count();\r\n\r\n\tcase Message::GetSelectionEmpty:\r\n\t\treturn sel.Empty();\r\n\r\n\tcase Message::ClearSelections:\r\n\t\tsel.Clear();\r\n\t\tContainerNeedsUpdate(Update::Selection);\r\n\t\tRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::SetSelection:\r\n\t\tsel.SetSelection(SelectionRange(PositionFromUPtr(wParam), lParam));\r\n\t\tRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::AddSelection:\r\n\t\tsel.AddSelection(SelectionRange(PositionFromUPtr(wParam), lParam));\r\n\t\tContainerNeedsUpdate(Update::Selection);\r\n\t\tRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::SelectionFromPoint:\r\n\t\treturn SelectionFromPoint(PointFromParameters(wParam, lParam));\r\n\r\n\tcase Message::DropSelectionN:\r\n\t\tDropSelection(wParam);\r\n\t\tbreak;\r\n\r\n\tcase Message::SetMainSelection:\r\n\t\tsel.SetMain(wParam);\r\n\t\tContainerNeedsUpdate(Update::Selection);\r\n\t\tRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::GetMainSelection:\r\n\t\treturn sel.Main();\r\n\r\n\tcase Message::SetSelectionNCaret:\r\n\tcase Message::SetSelectionNAnchor:\r\n\tcase Message::SetSelectionNCaretVirtualSpace:\r\n\tcase Message::SetSelectionNAnchorVirtualSpace:\r\n\tcase Message::SetSelectionNStart:\r\n\tcase Message::SetSelectionNEnd:\r\n\t\tSetSelectionNMessage(iMessage, wParam, lParam);\r\n\t\tbreak;\r\n\r\n\tcase Message::GetSelectionNCaret:\r\n\t\treturn sel.Range(wParam).caret.Position();\r\n\r\n\tcase Message::GetSelectionNAnchor:\r\n\t\treturn sel.Range(wParam).anchor.Position();\r\n\r\n\tcase Message::GetSelectionNCaretVirtualSpace:\r\n\t\treturn sel.Range(wParam).caret.VirtualSpace();\r\n\r\n\tcase Message::GetSelectionNAnchorVirtualSpace:\r\n\t\treturn sel.Range(wParam).anchor.VirtualSpace();\r\n\r\n\tcase Message::GetSelectionNStart:\r\n\t\treturn sel.Range(wParam).Start().Position();\r\n\r\n\tcase Message::GetSelectionNStartVirtualSpace:\r\n\t\treturn sel.Range(wParam).Start().VirtualSpace();\r\n\r\n\tcase Message::GetSelectionNEnd:\r\n\t\treturn sel.Range(wParam).End().Position();\r\n\r\n\tcase Message::GetSelectionNEndVirtualSpace:\r\n\t\treturn sel.Range(wParam).End().VirtualSpace();\r\n\r\n\tcase Message::SetRectangularSelectionCaret:\r\n\t\tif (!sel.IsRectangular())\r\n\t\t\tsel.Clear();\r\n\t\tsel.selType = Selection::SelTypes::rectangle;\r\n\t\tsel.Rectangular().caret.SetPosition(PositionFromUPtr(wParam));\r\n\t\tSetRectangularRange();\r\n\t\tRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::GetRectangularSelectionCaret:\r\n\t\treturn sel.Rectangular().caret.Position();\r\n\r\n\tcase Message::SetRectangularSelectionAnchor:\r\n\t\tif (!sel.IsRectangular())\r\n\t\t\tsel.Clear();\r\n\t\tsel.selType = Selection::SelTypes::rectangle;\r\n\t\tsel.Rectangular().anchor.SetPosition(PositionFromUPtr(wParam));\r\n\t\tSetRectangularRange();\r\n\t\tRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::GetRectangularSelectionAnchor:\r\n\t\treturn sel.Rectangular().anchor.Position();\r\n\r\n\tcase Message::SetRectangularSelectionCaretVirtualSpace:\r\n\t\tif (!sel.IsRectangular())\r\n\t\t\tsel.Clear();\r\n\t\tsel.selType = Selection::SelTypes::rectangle;\r\n\t\tsel.Rectangular().caret.SetVirtualSpace(PositionFromUPtr(wParam));\r\n\t\tSetRectangularRange();\r\n\t\tRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::GetRectangularSelectionCaretVirtualSpace:\r\n\t\treturn sel.Rectangular().caret.VirtualSpace();\r\n\r\n\tcase Message::SetRectangularSelectionAnchorVirtualSpace:\r\n\t\tif (!sel.IsRectangular())\r\n\t\t\tsel.Clear();\r\n\t\tsel.selType = Selection::SelTypes::rectangle;\r\n\t\tsel.Rectangular().anchor.SetVirtualSpace(PositionFromUPtr(wParam));\r\n\t\tSetRectangularRange();\r\n\t\tRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::GetRectangularSelectionAnchorVirtualSpace:\r\n\t\treturn sel.Rectangular().anchor.VirtualSpace();\r\n\r\n\tcase Message::SetVirtualSpaceOptions:\r\n\t\tvirtualSpaceOptions = static_cast<VirtualSpace>(wParam);\r\n\t\tbreak;\r\n\r\n\tcase Message::GetVirtualSpaceOptions:\r\n\t\treturn static_cast<sptr_t>(virtualSpaceOptions);\r\n\r\n\tcase Message::SetAdditionalSelFore:\r\n\t\tvs.elementColours[Element::SelectionAdditionalText] = ColourRGBA::FromIpRGB(SPtrFromUPtr(wParam));\r\n\t\tInvalidateStyleRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::SetAdditionalSelBack:\r\n\t\tvs.SetElementRGB(Element::SelectionAdditionalBack, static_cast<int>(wParam));\r\n\t\tInvalidateStyleRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::SetAdditionalSelAlpha:\r\n\t\tvs.SetElementAlpha(Element::SelectionAdditionalBack, static_cast<int>(wParam));\r\n\t\tInvalidateStyleRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::GetAdditionalSelAlpha:\r\n\t\tif (vs.selection.layer == Layer::Base)\r\n\t\t\treturn static_cast<sptr_t>(Alpha::NoAlpha);\r\n\t\treturn vs.ElementColourForced(Element::SelectionAdditionalBack).GetAlpha();\r\n\r\n\tcase Message::SetAdditionalCaretFore:\r\n\t\tvs.elementColours[Element::CaretAdditional] = ColourRGBA::FromIpRGB(SPtrFromUPtr(wParam));\r\n\t\tInvalidateStyleRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::GetAdditionalCaretFore:\r\n\t\treturn vs.ElementColourForced(Element::CaretAdditional).OpaqueRGB();\r\n\r\n\tcase Message::RotateSelection:\r\n\t\tsel.RotateMain();\r\n\t\tInvalidateWholeSelection();\r\n\t\tbreak;\r\n\r\n\tcase Message::SwapMainAnchorCaret:\r\n\t\tInvalidateSelection(sel.RangeMain());\r\n\t\tsel.RangeMain().Swap();\r\n\t\tbreak;\r\n\r\n\tcase Message::MultipleSelectAddNext:\r\n\t\tMultipleSelectAdd(AddNumber::one);\r\n\t\tbreak;\r\n\r\n\tcase Message::MultipleSelectAddEach:\r\n\t\tMultipleSelectAdd(AddNumber::each);\r\n\t\tbreak;\r\n\r\n\tcase Message::ChangeLexerState:\r\n\t\tpdoc->ChangeLexerState(PositionFromUPtr(wParam), lParam);\r\n\t\tbreak;\r\n\r\n\tcase Message::SetIdentifier:\r\n\t\tSetCtrlID(static_cast<int>(wParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::GetIdentifier:\r\n\t\treturn GetCtrlID();\r\n\r\n\tcase Message::SetTechnology:\r\n\t\t// No action by default\r\n\t\tbreak;\r\n\r\n\tcase Message::GetTechnology:\r\n\t\treturn static_cast<sptr_t>(technology);\r\n\r\n\tcase Message::CountCharacters:\r\n\t\treturn pdoc->CountCharacters(PositionFromUPtr(wParam), lParam);\r\n\r\n\tcase Message::CountCodeUnits:\r\n\t\treturn pdoc->CountUTF16(PositionFromUPtr(wParam), lParam);\r\n\r\n\tdefault:\r\n\t\treturn DefWndProc(iMessage, wParam, lParam);\r\n\t}\r\n\t//Platform::DebugPrintf(\"end wnd proc\\n\");\r\n\treturn 0;\r\n}\r\n"
  },
  {
    "path": "scintilla/src/Editor.h",
    "content": "// Scintilla source code edit control\r\n/** @file Editor.h\r\n ** Defines the main editor class.\r\n **/\r\n// Copyright 1998-2011 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef EDITOR_H\r\n#define EDITOR_H\r\n\r\nnamespace Scintilla::Internal {\r\n\r\n/**\r\n */\r\nclass Timer {\r\npublic:\r\n\tbool ticking;\r\n\tint ticksToWait;\r\n\tenum {tickSize = 100};\r\n\tTickerID tickerID;\r\n\r\n\tTimer() noexcept;\r\n};\r\n\r\n/**\r\n */\r\nclass Idler {\r\npublic:\r\n\tbool state;\r\n\tIdlerID idlerID;\r\n\r\n\tIdler() noexcept;\r\n};\r\n\r\n/**\r\n * When platform has a way to generate an event before painting,\r\n * accumulate needed styling range and other work items in\r\n * WorkNeeded to avoid unnecessary work inside paint handler\r\n */\r\n\r\nenum class WorkItems {\r\n\tnone = 0,\r\n\tstyle = 1,\r\n\tupdateUI = 2\r\n};\r\n\r\nclass WorkNeeded {\r\npublic:\r\n\tenum WorkItems items;\r\n\tSci::Position upTo;\r\n\r\n\tWorkNeeded() noexcept : items(WorkItems::none), upTo(0) {}\r\n\tvoid Reset() noexcept {\r\n\t\titems = WorkItems::none;\r\n\t\tupTo = 0;\r\n\t}\r\n\tvoid Need(WorkItems items_, Sci::Position pos) noexcept {\r\n\t\tif (Scintilla::FlagSet(items_, WorkItems::style) && (upTo < pos))\r\n\t\t\tupTo = pos;\r\n\t\titems = static_cast<WorkItems>(static_cast<int>(items) | static_cast<int>(items_));\r\n\t}\r\n};\r\n\r\n/**\r\n * Hold a piece of text selected for copying or dragging, along with encoding and selection format information.\r\n */\r\nclass SelectionText {\r\n\tstd::string s;\r\npublic:\r\n\tbool rectangular;\r\n\tbool lineCopy;\r\n\tint codePage;\r\n\tScintilla::CharacterSet characterSet;\r\n\tSelectionText() noexcept : rectangular(false), lineCopy(false), codePage(0), characterSet(Scintilla::CharacterSet::Ansi) {}\r\n\tvoid Clear() noexcept {\r\n\t\ts.clear();\r\n\t\trectangular = false;\r\n\t\tlineCopy = false;\r\n\t\tcodePage = 0;\r\n\t\tcharacterSet = Scintilla::CharacterSet::Ansi;\r\n\t}\r\n\tvoid Copy(const std::string &s_, int codePage_, Scintilla::CharacterSet characterSet_, bool rectangular_, bool lineCopy_) {\r\n\t\ts = s_;\r\n\t\tcodePage = codePage_;\r\n\t\tcharacterSet = characterSet_;\r\n\t\trectangular = rectangular_;\r\n\t\tlineCopy = lineCopy_;\r\n\t\tFixSelectionForClipboard();\r\n\t}\r\n\tvoid Copy(const SelectionText &other) {\r\n\t\tCopy(other.s, other.codePage, other.characterSet, other.rectangular, other.lineCopy);\r\n\t}\r\n\tconst char *Data() const noexcept {\r\n\t\treturn s.c_str();\r\n\t}\r\n\tsize_t Length() const noexcept {\r\n\t\treturn s.length();\r\n\t}\r\n\tsize_t LengthWithTerminator() const noexcept {\r\n\t\treturn s.length() + 1;\r\n\t}\r\n\tbool Empty() const noexcept {\r\n\t\treturn s.empty();\r\n\t}\r\nprivate:\r\n\tvoid FixSelectionForClipboard() {\r\n\t\t// To avoid truncating the contents of the clipboard when pasted where the\r\n\t\t// clipboard contains NUL characters, replace NUL characters by spaces.\r\n\t\tstd::replace(s.begin(), s.end(), '\\0', ' ');\r\n\t}\r\n};\r\n\r\nstruct WrapPending {\r\n\t// The range of lines that need to be wrapped\r\n\tenum { lineLarge = 0x7ffffff };\r\n\tSci::Line start;\t// When there are wraps pending, will be in document range\r\n\tSci::Line end;\t// May be lineLarge to indicate all of document after start\r\n\tWrapPending() noexcept {\r\n\t\tstart = lineLarge;\r\n\t\tend = lineLarge;\r\n\t}\r\n\tvoid Reset() noexcept {\r\n\t\tstart = lineLarge;\r\n\t\tend = lineLarge;\r\n\t}\r\n\tvoid Wrapped(Sci::Line line) noexcept {\r\n\t\tif (start == line)\r\n\t\t\tstart++;\r\n\t}\r\n\tbool NeedsWrap() const noexcept {\r\n\t\treturn start < end;\r\n\t}\r\n\tbool AddRange(Sci::Line lineStart, Sci::Line lineEnd) noexcept {\r\n\t\tconst bool neededWrap = NeedsWrap();\r\n\t\tbool changed = false;\r\n\t\tif (start > lineStart) {\r\n\t\t\tstart = lineStart;\r\n\t\t\tchanged = true;\r\n\t\t}\r\n\t\tif ((end < lineEnd) || !neededWrap) {\r\n\t\t\tend = lineEnd;\r\n\t\t\tchanged = true;\r\n\t\t}\r\n\t\treturn changed;\r\n\t}\r\n};\r\n\r\nstruct CaretPolicySlop {\r\n\tScintilla::CaretPolicy policy;\t// Combination from CaretPolicy::Slop, CaretPolicy::Strict, CaretPolicy::Jumps, CaretPolicy::Even\r\n\tint slop;\t// Pixels for X, lines for Y\r\n\tCaretPolicySlop(Scintilla::CaretPolicy policy_, intptr_t slop_) noexcept :\r\n\t\tpolicy(policy_), slop(static_cast<int>(slop_)) {}\r\n\tCaretPolicySlop(uintptr_t policy_=0, intptr_t slop_=0) noexcept :\r\n\t\tpolicy(static_cast<Scintilla::CaretPolicy>(policy_)), slop(static_cast<int>(slop_)) {}\r\n};\r\n\r\nstruct CaretPolicies {\r\n\tCaretPolicySlop x;\r\n\tCaretPolicySlop y;\r\n};\r\n\r\nstruct VisiblePolicySlop {\r\n\tScintilla::VisiblePolicy policy;\t// Combination from VisiblePolicy::Slop, VisiblePolicy::Strict\r\n\tint slop;\t// Pixels for X, lines for Y\r\n\tVisiblePolicySlop(uintptr_t policy_ = 0, intptr_t slop_ = 0) noexcept :\r\n\t\tpolicy(static_cast<Scintilla::VisiblePolicy>(policy_)), slop(static_cast<int>(slop_)) {}\r\n};\r\n\r\nenum class XYScrollOptions {\r\n\tnone = 0x0,\r\n\tuseMargin = 0x1,\r\n\tvertical = 0x2,\r\n\thorizontal = 0x4,\r\n\tall = useMargin | vertical | horizontal\r\n};\r\n\r\nconstexpr XYScrollOptions operator|(XYScrollOptions a, XYScrollOptions b) noexcept {\r\n\treturn static_cast<XYScrollOptions>(static_cast<int>(a) | static_cast<int>(b));\r\n}\r\n\r\n/**\r\n */\r\nclass Editor : public EditModel, public DocWatcher {\r\nprotected:\t// ScintillaBase subclass needs access to much of Editor\r\n\r\n\t/** On GTK+, Scintilla is a container widget holding two scroll bars\r\n\t * whereas on Windows there is just one window with both scroll bars turned on. */\r\n\tWindow wMain;\t///< The Scintilla parent window\r\n\tWindow wMargin;\t///< May be separate when using a scroll view for wMain\r\n\r\n\t// Optimization that avoids superfluous invalidations\r\n\tbool redrawPendingText = false;\r\n\tbool redrawPendingMargin = false;\r\n\r\n\t/** Style resources may be expensive to allocate so are cached between uses.\r\n\t * When a style attribute is changed, this cache is flushed. */\r\n\tbool stylesValid;\r\n\tViewStyle vs;\r\n\tScintilla::Technology technology;\r\n\tPoint sizeRGBAImage;\r\n\tfloat scaleRGBAImage;\r\n\r\n\tMarginView marginView;\r\n\tEditView view;\r\n\r\n\tScintilla::CursorShape cursorMode;\r\n\r\n\tbool mouseDownCaptures;\r\n\tbool mouseWheelCaptures;\r\n\r\n\tint xCaretMargin;\t///< Ensure this many pixels visible on both sides of caret\r\n\tbool horizontalScrollBarVisible;\r\n\tint scrollWidth;\r\n\tbool verticalScrollBarVisible;\r\n\tbool endAtLastLine;\r\n\tScintilla::CaretSticky caretSticky;\r\n\tScintilla::MarginOption marginOptions;\r\n\tbool mouseSelectionRectangularSwitch;\r\n\tbool multipleSelection;\r\n\tbool additionalSelectionTyping;\r\n\tScintilla::MultiPaste multiPasteMode;\r\n\r\n\tScintilla::VirtualSpace virtualSpaceOptions;\r\n\r\n\tKeyMap kmap;\r\n\r\n\tTimer timer;\r\n\tTimer autoScrollTimer;\r\n\tenum { autoScrollDelay = 200 };\r\n\r\n\tIdler idler;\r\n\r\n\tPoint lastClick;\r\n\tunsigned int lastClickTime;\r\n\tPoint doubleClickCloseThreshold;\r\n\tint dwellDelay;\r\n\tint ticksToDwell;\r\n\tbool dwelling;\r\n\tenum class TextUnit { character, word, subLine, wholeLine } selectionUnit;\r\n\tPoint ptMouseLast;\r\n\tenum class DragDrop { none, initial, dragging } inDragDrop;\r\n\tbool dropWentOutside;\r\n\tSelectionPosition posDrop;\r\n\tSci::Position hotSpotClickPos;\r\n\tint lastXChosen;\r\n\tSci::Position lineAnchorPos;\r\n\tSci::Position originalAnchorPos;\r\n\tSci::Position wordSelectAnchorStartPos;\r\n\tSci::Position wordSelectAnchorEndPos;\r\n\tSci::Position wordSelectInitialCaretPos;\r\n\tSelectionSegment targetRange;\r\n\tScintilla::FindOption searchFlags;\r\n\tSci::Line topLine;\r\n\tSci::Position posTopLine;\r\n\tSci::Position lengthForEncode;\r\n\r\n\tScintilla::Update needUpdateUI;\r\n\r\n\tenum class PaintState { notPainting, painting, abandoned } paintState;\r\n\tbool paintAbandonedByStyling;\r\n\tPRectangle rcPaint;\r\n\tbool paintingAllText;\r\n\tbool willRedrawAll;\r\n\tWorkNeeded workNeeded;\r\n\tScintilla::IdleStyling idleStyling;\r\n\tbool needIdleStyling;\r\n\r\n\tScintilla::ModificationFlags modEventMask;\r\n\tbool commandEvents;\r\n\r\n\tSelectionText drag;\r\n\r\n\tCaretPolicies caretPolicies;\r\n\r\n\tVisiblePolicySlop visiblePolicy;\r\n\r\n\tSci::Position searchAnchor;\r\n\r\n\tbool recordingMacro;\r\n\r\n\tScintilla::AutomaticFold foldAutomatic;\r\n\r\n\t// Wrapping support\r\n\tWrapPending wrapPending;\r\n\tActionDuration durationWrapOneByte;\r\n\r\n\tbool convertPastes;\r\n\r\n\tEditor();\r\n\t// Deleted so Editor objects can not be copied.\r\n\tEditor(const Editor &) = delete;\r\n\tEditor(Editor &&) = delete;\r\n\tEditor &operator=(const Editor &) = delete;\r\n\tEditor &operator=(Editor &&) = delete;\r\n\t// ~Editor() in public section\r\n\tvirtual void Initialise() = 0;\r\n\tvirtual void Finalise();\r\n\r\n\tvoid InvalidateStyleData() noexcept;\r\n\tvoid InvalidateStyleRedraw();\r\n\tvoid RefreshStyleData();\r\n\tvoid SetRepresentations();\r\n\tvoid DropGraphics() noexcept;\r\n\r\n\tbool HasMarginWindow() const noexcept;\r\n\t// The top left visible point in main window coordinates. Will be 0,0 except for\r\n\t// scroll views where it will be equivalent to the current scroll position.\r\n\tPoint GetVisibleOriginInMain() const override;\r\n\tPointDocument DocumentPointFromView(Point ptView) const;  // Convert a point from view space to document\r\n\tSci::Line TopLineOfMain() const noexcept final;   // Return the line at Main's y coordinate 0\r\n\tvirtual Point ClientSize() const;\r\n\tvirtual PRectangle GetClientRectangle() const;\r\n\tvirtual PRectangle GetClientDrawingRectangle();\r\n\tPRectangle GetTextRectangle() const;\r\n\r\n\tSci::Line LinesOnScreen() const override;\r\n\tSci::Line LinesToScroll() const;\r\n\tSci::Line MaxScrollPos() const;\r\n\tSelectionPosition ClampPositionIntoDocument(SelectionPosition sp) const;\r\n\tPoint LocationFromPosition(SelectionPosition pos, PointEnd pe=PointEnd::start);\r\n\tPoint LocationFromPosition(Sci::Position pos, PointEnd pe=PointEnd::start);\r\n\tint XFromPosition(SelectionPosition sp);\r\n\tSelectionPosition SPositionFromLocation(Point pt, bool canReturnInvalid=false, bool charPosition=false, bool virtualSpace=true);\r\n\tSci::Position PositionFromLocation(Point pt, bool canReturnInvalid = false, bool charPosition = false);\r\n\tSelectionPosition SPositionFromLineX(Sci::Line lineDoc, int x);\r\n\tSci::Position PositionFromLineX(Sci::Line lineDoc, int x);\r\n\tSci::Line LineFromLocation(Point pt) const noexcept;\r\n\tvoid SetTopLine(Sci::Line topLineNew);\r\n\r\n\tvirtual bool AbandonPaint();\r\n\tvirtual void RedrawRect(PRectangle rc);\r\n\tvirtual void DiscardOverdraw();\r\n\tvirtual void Redraw();\r\n\tvoid RedrawSelMargin(Sci::Line line=-1, bool allAfter=false);\r\n\tPRectangle RectangleFromRange(Range r, int overlap);\r\n\tvoid InvalidateRange(Sci::Position start, Sci::Position end);\r\n\r\n\tbool UserVirtualSpace() const noexcept {\r\n\t\treturn (FlagSet(virtualSpaceOptions, Scintilla::VirtualSpace::UserAccessible));\r\n\t}\r\n\tSci::Position CurrentPosition() const noexcept;\r\n\tbool SelectionEmpty() const noexcept;\r\n\tSelectionPosition SelectionStart() noexcept;\r\n\tSelectionPosition SelectionEnd() noexcept;\r\n\tvoid SetRectangularRange();\r\n\tvoid ThinRectangularRange();\r\n\tvoid InvalidateSelection(SelectionRange newMain, bool invalidateWholeSelection=false);\r\n\tvoid InvalidateWholeSelection();\r\n\tSelectionRange LineSelectionRange(SelectionPosition currentPos_, SelectionPosition anchor_) const;\r\n\tvoid SetSelection(SelectionPosition currentPos_, SelectionPosition anchor_);\r\n\tvoid SetSelection(Sci::Position currentPos_, Sci::Position anchor_);\r\n\tvoid SetSelection(SelectionPosition currentPos_);\r\n\tvoid SetEmptySelection(SelectionPosition currentPos_);\r\n\tvoid SetEmptySelection(Sci::Position currentPos_);\r\n\tenum class AddNumber { one, each };\r\n\tvoid MultipleSelectAdd(AddNumber addNumber);\r\n\tbool RangeContainsProtected(Sci::Position start, Sci::Position end) const noexcept;\r\n\tbool SelectionContainsProtected() const noexcept;\r\n\tSci::Position MovePositionOutsideChar(Sci::Position pos, Sci::Position moveDir, bool checkLineEnd=true) const;\r\n\tSelectionPosition MovePositionOutsideChar(SelectionPosition pos, Sci::Position moveDir, bool checkLineEnd=true) const;\r\n\tvoid MovedCaret(SelectionPosition newPos, SelectionPosition previousPos,\r\n\t\tbool ensureVisible, CaretPolicies policies);\r\n\tvoid MovePositionTo(SelectionPosition newPos, Selection::SelTypes selt=Selection::SelTypes::none, bool ensureVisible=true);\r\n\tvoid MovePositionTo(Sci::Position newPos, Selection::SelTypes selt=Selection::SelTypes::none, bool ensureVisible=true);\r\n\tSelectionPosition MovePositionSoVisible(SelectionPosition pos, int moveDir);\r\n\tSelectionPosition MovePositionSoVisible(Sci::Position pos, int moveDir);\r\n\tPoint PointMainCaret();\r\n\tvoid SetLastXChosen();\r\n\r\n\tvoid ScrollTo(Sci::Line line, bool moveThumb=true);\r\n\tvirtual void ScrollText(Sci::Line linesToMove);\r\n\tvoid HorizontalScrollTo(int xPos);\r\n\tvoid VerticalCentreCaret();\r\n\tvoid MoveSelectedLines(int lineDelta);\r\n\tvoid MoveSelectedLinesUp();\r\n\tvoid MoveSelectedLinesDown();\r\n\tvoid MoveCaretInsideView(bool ensureVisible=true);\r\n\tSci::Line DisplayFromPosition(Sci::Position pos);\r\n\r\n\tstruct XYScrollPosition {\r\n\t\tint xOffset;\r\n\t\tSci::Line topLine;\r\n\t\tXYScrollPosition(int xOffset_, Sci::Line topLine_) noexcept : xOffset(xOffset_), topLine(topLine_) {}\r\n\t\tbool operator==(const XYScrollPosition &other) const noexcept {\r\n\t\t\treturn (xOffset == other.xOffset) && (topLine == other.topLine);\r\n\t\t}\r\n\t};\r\n\tXYScrollPosition XYScrollToMakeVisible(const SelectionRange &range,\r\n\t\tconst XYScrollOptions options, CaretPolicies policies);\r\n\tvoid SetXYScroll(XYScrollPosition newXY);\r\n\tvoid EnsureCaretVisible(bool useMargin=true, bool vert=true, bool horiz=true);\r\n\tvoid ScrollRange(SelectionRange range);\r\n\tvoid ShowCaretAtCurrentPosition();\r\n\tvoid DropCaret();\r\n\tvoid CaretSetPeriod(int period);\r\n\tvoid InvalidateCaret();\r\n\tvirtual void NotifyCaretMove();\r\n\tvirtual void UpdateSystemCaret();\r\n\r\n\tbool Wrapping() const noexcept;\r\n\tvoid NeedWrapping(Sci::Line docLineStart=0, Sci::Line docLineEnd=WrapPending::lineLarge);\r\n\tbool WrapOneLine(Surface *surface, Sci::Line lineToWrap);\r\n\tbool WrapBlock(Surface *surface, Sci::Line lineToWrap, Sci::Line lineToWrapEnd);\r\n\tenum class WrapScope {wsAll, wsVisible, wsIdle};\r\n\tbool WrapLines(WrapScope ws);\r\n\tvoid LinesJoin();\r\n\tvoid LinesSplit(int pixelWidth);\r\n\r\n\tvoid PaintSelMargin(Surface *surfaceWindow, const PRectangle &rc);\r\n\tvoid RefreshPixMaps(Surface *surfaceWindow);\r\n\tvoid Paint(Surface *surfaceWindow, PRectangle rcArea);\r\n\tSci::Position FormatRange(Scintilla::Message iMessage, Scintilla::uptr_t wParam, Scintilla::sptr_t lParam);\r\n\tlong TextWidth(Scintilla::uptr_t style, const char *text);\r\n\r\n\tvirtual void SetVerticalScrollPos() = 0;\r\n\tvirtual void SetHorizontalScrollPos() = 0;\r\n\tvirtual bool ModifyScrollBars(Sci::Line nMax, Sci::Line nPage) = 0;\r\n\tvirtual void ReconfigureScrollBars();\r\n\tvoid ChangeScrollBars();\r\n\tvirtual void SetScrollBars();\r\n\tvoid ChangeSize();\r\n\r\n\tvoid FilterSelections();\r\n\tSci::Position RealizeVirtualSpace(Sci::Position position, Sci::Position virtualSpace);\r\n\tSelectionPosition RealizeVirtualSpace(const SelectionPosition &position);\r\n\tvoid AddChar(char ch);\r\n\tvirtual void InsertCharacter(std::string_view sv, Scintilla::CharacterSource charSource);\r\n\tvoid ClearBeforeTentativeStart();\r\n\tvoid InsertPaste(const char *text, Sci::Position len);\r\n\tenum class PasteShape { stream=0, rectangular = 1, line = 2 };\r\n\tvoid InsertPasteShape(const char *text, Sci::Position len, PasteShape shape);\r\n\tvoid ClearSelection(bool retainMultipleSelections = false);\r\n\tvoid ClearAll();\r\n\tvoid ClearDocumentStyle();\r\n\tvirtual void Cut();\r\n\tvoid PasteRectangular(SelectionPosition pos, const char *ptr, Sci::Position len);\r\n\tvirtual void Copy() = 0;\r\n\tvoid CopyAllowLine();\r\n\tvirtual bool CanPaste();\r\n\tvirtual void Paste() = 0;\r\n\tvoid Clear();\r\n\tvirtual void SelectAll();\r\n\tvirtual void Undo();\r\n\tvirtual void Redo();\r\n\tvoid DelCharBack(bool allowLineStartDeletion);\r\n\tvirtual void ClaimSelection() = 0;\r\n\r\n\tvirtual void NotifyChange() = 0;\r\n\tvirtual void NotifyFocus(bool focus);\r\n\tvirtual void SetCtrlID(int identifier);\r\n\tvirtual int GetCtrlID() { return ctrlID; }\r\n\tvirtual void NotifyParent(Scintilla::NotificationData scn) = 0;\r\n\tvirtual void NotifyStyleToNeeded(Sci::Position endStyleNeeded);\r\n\tvoid NotifyChar(int ch, Scintilla::CharacterSource charSource);\r\n\tvoid NotifySavePoint(bool isSavePoint);\r\n\tvoid NotifyModifyAttempt();\r\n\tvirtual void NotifyDoubleClick(Point pt, Scintilla::KeyMod modifiers);\r\n\tvoid NotifyHotSpotClicked(Sci::Position position, Scintilla::KeyMod modifiers);\r\n\tvoid NotifyHotSpotDoubleClicked(Sci::Position position, Scintilla::KeyMod modifiers);\r\n\tvoid NotifyHotSpotReleaseClick(Sci::Position position, Scintilla::KeyMod modifiers);\r\n\tbool NotifyUpdateUI();\r\n\tvoid NotifyPainted();\r\n\tvoid NotifyIndicatorClick(bool click, Sci::Position position, Scintilla::KeyMod modifiers);\r\n\tbool NotifyMarginClick(Point pt, Scintilla::KeyMod modifiers);\r\n\tbool NotifyMarginRightClick(Point pt, Scintilla::KeyMod modifiers);\r\n\tvoid NotifyNeedShown(Sci::Position pos, Sci::Position len);\r\n\tvoid NotifyDwelling(Point pt, bool state);\r\n\tvoid NotifyZoom();\r\n\r\n\tvoid NotifyModifyAttempt(Document *document, void *userData) override;\r\n\tvoid NotifySavePoint(Document *document, void *userData, bool atSavePoint) override;\r\n\tvoid CheckModificationForWrap(DocModification mh);\r\n\tvoid NotifyModified(Document *document, DocModification mh, void *userData) override;\r\n\tvoid NotifyDeleted(Document *document, void *userData) noexcept override;\r\n\tvoid NotifyStyleNeeded(Document *doc, void *userData, Sci::Position endStyleNeeded) override;\r\n\tvoid NotifyErrorOccurred(Document *doc, void *userData, Scintilla::Status status) override;\r\n\tvoid NotifyMacroRecord(Scintilla::Message iMessage, Scintilla::uptr_t wParam, Scintilla::sptr_t lParam);\r\n\r\n\tvoid ContainerNeedsUpdate(Scintilla::Update flags) noexcept;\r\n\tvoid PageMove(int direction, Selection::SelTypes selt=Selection::SelTypes::none, bool stuttered = false);\r\n\tenum class CaseMapping { same, upper, lower };\r\n\tvirtual std::string CaseMapString(const std::string &s, CaseMapping caseMapping);\r\n\tvoid ChangeCaseOfSelection(CaseMapping caseMapping);\r\n\tvoid LineTranspose();\r\n\tvoid LineReverse();\r\n\tvoid Duplicate(bool forLine);\r\n\tvirtual void CancelModes();\r\n\tvoid NewLine();\r\n\tSelectionPosition PositionUpOrDown(SelectionPosition spStart, int direction, int lastX);\r\n\tvoid CursorUpOrDown(int direction, Selection::SelTypes selt);\r\n\tvoid ParaUpOrDown(int direction, Selection::SelTypes selt);\r\n\tRange RangeDisplayLine(Sci::Line lineVisible);\r\n\tSci::Position StartEndDisplayLine(Sci::Position pos, bool start);\r\n\tSci::Position HomeWrapPosition(Sci::Position position);\r\n\tSci::Position VCHomeDisplayPosition(Sci::Position position);\r\n\tSci::Position VCHomeWrapPosition(Sci::Position position);\r\n\tSci::Position LineEndWrapPosition(Sci::Position position);\r\n\tSelectionPosition PositionMove(Scintilla::Message iMessage, SelectionPosition spCaretNow);\r\n\tSelectionRange SelectionMove(Scintilla::Message iMessage, size_t r);\r\n\tint HorizontalMove(Scintilla::Message iMessage);\r\n\tint DelWordOrLine(Scintilla::Message iMessage);\r\n\tvirtual int KeyCommand(Scintilla::Message iMessage);\r\n\tvirtual int KeyDefault(Scintilla::Keys /* key */, Scintilla::KeyMod /*modifiers*/);\r\n\tint KeyDownWithModifiers(Scintilla::Keys key, Scintilla::KeyMod modifiers, bool *consumed);\r\n\r\n\tvoid Indent(bool forwards);\r\n\r\n\tvirtual std::unique_ptr<CaseFolder> CaseFolderForEncoding();\r\n\tSci::Position FindText(Scintilla::uptr_t wParam, Scintilla::sptr_t lParam);\r\n\tSci::Position FindTextFull(Scintilla::uptr_t wParam, Scintilla::sptr_t lParam);\r\n\tvoid SearchAnchor() noexcept;\r\n\tSci::Position SearchText(Scintilla::Message iMessage, Scintilla::uptr_t wParam, Scintilla::sptr_t lParam);\r\n\tSci::Position SearchInTarget(const char *text, Sci::Position length);\r\n\tvoid GoToLine(Sci::Line lineNo);\r\n\r\n\tvirtual void CopyToClipboard(const SelectionText &selectedText) = 0;\r\n\tstd::string RangeText(Sci::Position start, Sci::Position end) const;\r\n\tvoid CopySelectionRange(SelectionText *ss, bool allowLineCopy=false);\r\n\tvoid CopyRangeToClipboard(Sci::Position start, Sci::Position end);\r\n\tvoid CopyText(size_t length, const char *text);\r\n\tvoid SetDragPosition(SelectionPosition newPos);\r\n\tvirtual void DisplayCursor(Window::Cursor c);\r\n\tvirtual bool DragThreshold(Point ptStart, Point ptNow);\r\n\tvirtual void StartDrag();\r\n\tvoid DropAt(SelectionPosition position, const char *value, size_t lengthValue, bool moving, bool rectangular);\r\n\tvoid DropAt(SelectionPosition position, const char *value, bool moving, bool rectangular);\r\n\t/** PositionInSelection returns true if position in selection. */\r\n\tbool PositionInSelection(Sci::Position pos);\r\n\tbool PointInSelection(Point pt);\r\n\tptrdiff_t SelectionFromPoint(Point pt);\r\n\tbool PointInSelMargin(Point pt) const;\r\n\tWindow::Cursor GetMarginCursor(Point pt) const noexcept;\r\n\tvoid DropSelection(size_t part);\r\n\tvoid TrimAndSetSelection(Sci::Position currentPos_, Sci::Position anchor_);\r\n\tvoid LineSelection(Sci::Position lineCurrentPos_, Sci::Position lineAnchorPos_, bool wholeLine);\r\n\tvoid WordSelection(Sci::Position pos);\r\n\tvoid DwellEnd(bool mouseMoved);\r\n\tvoid MouseLeave();\r\n\tvirtual void ButtonDownWithModifiers(Point pt, unsigned int curTime, Scintilla::KeyMod modifiers);\r\n\tvirtual void RightButtonDownWithModifiers(Point pt, unsigned int curTime, Scintilla::KeyMod modifiers);\r\n\tvoid ButtonMoveWithModifiers(Point pt, unsigned int curTime, Scintilla::KeyMod modifiers);\r\n\tvoid ButtonUpWithModifiers(Point pt, unsigned int curTime, Scintilla::KeyMod modifiers);\r\n\r\n\tbool Idle();\r\n\tenum class TickReason { caret, scroll, widen, dwell, platform };\r\n\tvirtual void TickFor(TickReason reason);\r\n\tvirtual bool FineTickerRunning(TickReason reason);\r\n\tvirtual void FineTickerStart(TickReason reason, int millis, int tolerance);\r\n\tvirtual void FineTickerCancel(TickReason reason);\r\n\tvirtual bool SetIdle(bool) { return false; }\r\n\tvoid ChangeMouseCapture(bool on);\r\n\tvirtual void SetMouseCapture(bool on) = 0;\r\n\tvirtual bool HaveMouseCapture() = 0;\r\n\tvoid SetFocusState(bool focusState);\r\n\tvirtual void UpdateBaseElements();\r\n\r\n\tSci::Position PositionAfterArea(PRectangle rcArea) const;\r\n\tvoid StyleToPositionInView(Sci::Position pos);\r\n\tSci::Position PositionAfterMaxStyling(Sci::Position posMax, bool scrolling) const;\r\n\tvoid StartIdleStyling(bool truncatedLastStyling);\r\n\tvoid StyleAreaBounded(PRectangle rcArea, bool scrolling);\r\n\tconstexpr bool SynchronousStylingToVisible() const noexcept {\r\n\t\treturn (idleStyling == Scintilla::IdleStyling::None) || (idleStyling == Scintilla::IdleStyling::AfterVisible);\r\n\t}\r\n\tvoid IdleStyle();\r\n\tvirtual void IdleWork();\r\n\tvirtual void QueueIdleWork(WorkItems items, Sci::Position upTo=0);\r\n\r\n\tvirtual int SupportsFeature(Scintilla::Supports feature);\r\n\tvirtual bool PaintContains(PRectangle rc);\r\n\tbool PaintContainsMargin();\r\n\tvoid CheckForChangeOutsidePaint(Range r);\r\n\tvoid SetBraceHighlight(Sci::Position pos0, Sci::Position pos1, int matchStyle);\r\n\r\n\tvoid SetAnnotationHeights(Sci::Line start, Sci::Line end);\r\n\tvirtual void SetDocPointer(Document *document);\r\n\r\n\tvoid SetAnnotationVisible(Scintilla::AnnotationVisible visible);\r\n\tvoid SetEOLAnnotationVisible(Scintilla::EOLAnnotationVisible visible);\r\n\r\n\tSci::Line ExpandLine(Sci::Line line);\r\n\tvoid SetFoldExpanded(Sci::Line lineDoc, bool expanded);\r\n\tvoid FoldLine(Sci::Line line, Scintilla::FoldAction action);\r\n\tvoid FoldExpand(Sci::Line line, Scintilla::FoldAction action, Scintilla::FoldLevel level);\r\n\tSci::Line ContractedFoldNext(Sci::Line lineStart) const;\r\n\tvoid EnsureLineVisible(Sci::Line lineDoc, bool enforcePolicy);\r\n\tvoid FoldChanged(Sci::Line line, Scintilla::FoldLevel levelNow, Scintilla::FoldLevel levelPrev);\r\n\tvoid NeedShown(Sci::Position pos, Sci::Position len);\r\n\tvoid FoldAll(Scintilla::FoldAction action);\r\n\r\n\tSci::Position GetTag(char *tagValue, int tagNumber);\r\n\tenum class ReplaceType {basic, patterns, minimal};\r\n\tSci::Position ReplaceTarget(ReplaceType replaceType, std::string_view text);\r\n\r\n\tbool PositionIsHotspot(Sci::Position position) const noexcept;\r\n\tbool PointIsHotspot(Point pt);\r\n\tvoid SetHotSpotRange(const Point *pt);\r\n\tvoid SetHoverIndicatorPosition(Sci::Position position);\r\n\tvoid SetHoverIndicatorPoint(Point pt);\r\n\r\n\tint CodePage() const noexcept;\r\n\tvirtual bool ValidCodePage(int /* codePage */) const { return true; }\r\n\tvirtual std::string UTF8FromEncoded(std::string_view encoded) const = 0;\r\n\tvirtual std::string EncodedFromUTF8(std::string_view utf8) const = 0;\r\n\tvirtual std::unique_ptr<Surface> CreateMeasurementSurface() const;\r\n\tvirtual std::unique_ptr<Surface> CreateDrawingSurface(SurfaceID sid, std::optional<Scintilla::Technology> technologyOpt = {}) const;\r\n\r\n\tSci::Line WrapCount(Sci::Line line);\r\n\tvoid AddStyledText(const char *buffer, Sci::Position appendLength);\r\n\tSci::Position GetStyledText(char *buffer, Sci::Position cpMin, Sci::Position cpMax) const noexcept;\r\n\tSci::Position GetTextRange(char *buffer, Sci::Position cpMin, Sci::Position cpMax) const;\r\n\r\n\tvirtual Scintilla::sptr_t DefWndProc(Scintilla::Message iMessage, Scintilla::uptr_t wParam, Scintilla::sptr_t lParam) = 0;\r\n\tbool ValidMargin(Scintilla::uptr_t wParam) const noexcept;\r\n\tvoid StyleSetMessage(Scintilla::Message iMessage, Scintilla::uptr_t wParam, Scintilla::sptr_t lParam);\r\n\tScintilla::sptr_t StyleGetMessage(Scintilla::Message iMessage, Scintilla::uptr_t wParam, Scintilla::sptr_t lParam);\r\n\tvoid SetSelectionNMessage(Scintilla::Message iMessage, Scintilla::uptr_t wParam, Scintilla::sptr_t lParam);\r\n\tvoid SetSelectionMode(uptr_t wParam, bool setMoveExtends);\r\n\r\n\t// Coercion functions for transforming WndProc parameters into pointers\r\n\tstatic void *PtrFromSPtr(Scintilla::sptr_t lParam) noexcept {\r\n\t\treturn reinterpret_cast<void *>(lParam);\r\n\t}\r\n\tstatic const char *ConstCharPtrFromSPtr(Scintilla::sptr_t lParam) noexcept {\r\n\t\treturn static_cast<const char *>(PtrFromSPtr(lParam));\r\n\t}\r\n\tstatic const unsigned char *ConstUCharPtrFromSPtr(Scintilla::sptr_t lParam) noexcept {\r\n\t\treturn static_cast<const unsigned char *>(PtrFromSPtr(lParam));\r\n\t}\r\n\tstatic char *CharPtrFromSPtr(Scintilla::sptr_t lParam) noexcept {\r\n\t\treturn static_cast<char *>(PtrFromSPtr(lParam));\r\n\t}\r\n\tstatic unsigned char *UCharPtrFromSPtr(Scintilla::sptr_t lParam) noexcept {\r\n\t\treturn static_cast<unsigned char *>(PtrFromSPtr(lParam));\r\n\t}\r\n\tstatic std::string_view ViewFromParams(Scintilla::sptr_t lParam, Scintilla::uptr_t wParam) noexcept {\r\n\t\tif (SPtrFromUPtr(wParam) == -1) {\r\n\t\t\treturn std::string_view(CharPtrFromSPtr(lParam));\r\n\t\t}\r\n\t\treturn std::string_view(CharPtrFromSPtr(lParam), wParam);\r\n\t}\r\n\tstatic void *PtrFromUPtr(Scintilla::uptr_t wParam) noexcept {\r\n\t\treturn reinterpret_cast<void *>(wParam);\r\n\t}\r\n\tstatic const char *ConstCharPtrFromUPtr(Scintilla::uptr_t wParam) noexcept {\r\n\t\treturn static_cast<const char *>(PtrFromUPtr(wParam));\r\n\t}\r\n\r\n\tstatic constexpr Scintilla::sptr_t SPtrFromUPtr(Scintilla::uptr_t wParam) noexcept {\r\n\t\treturn static_cast<Scintilla::sptr_t>(wParam);\r\n\t}\r\n\tstatic constexpr Sci::Position PositionFromUPtr(Scintilla::uptr_t wParam) noexcept {\r\n\t\treturn SPtrFromUPtr(wParam);\r\n\t}\r\n\tstatic constexpr Sci::Line LineFromUPtr(Scintilla::uptr_t wParam) noexcept {\r\n\t\treturn SPtrFromUPtr(wParam);\r\n\t}\r\n\tPoint PointFromParameters(Scintilla::uptr_t wParam, Scintilla::sptr_t lParam) const noexcept {\r\n\t\treturn Point(static_cast<XYPOSITION>(wParam) - vs.ExternalMarginWidth(), static_cast<XYPOSITION>(lParam));\r\n\t}\r\n\r\n\tstatic constexpr std::optional<FoldLevel> OptionalFoldLevel(Scintilla::sptr_t lParam) {\r\n\t\tif (lParam >= 0) {\r\n\t\t\treturn static_cast<FoldLevel>(lParam);\r\n\t\t}\r\n\t\treturn std::nullopt;\r\n\t}\r\n\r\n\tstatic Scintilla::sptr_t StringResult(Scintilla::sptr_t lParam, const char *val) noexcept;\r\n\tstatic Scintilla::sptr_t BytesResult(Scintilla::sptr_t lParam, const unsigned char *val, size_t len) noexcept;\r\n\tstatic Scintilla::sptr_t BytesResult(Scintilla::sptr_t lParam, std::string_view sv) noexcept;\r\n\r\n\t// Set a variable controlling appearance to a value and invalidates the display\r\n\t// if a change was made. Avoids extra text and the possibility of mistyping.\r\n\ttemplate <typename T>\r\n\tbool SetAppearance(T &variable, T value) {\r\n\t\t// Using ! and == as more types have == defined than !=.\r\n\t\tconst bool changed = !(variable == value);\r\n\t\tif (changed) {\r\n\t\t\tvariable = value;\r\n\t\t\tInvalidateStyleRedraw();\r\n\t\t}\r\n\t\treturn changed;\r\n\t}\r\n\r\npublic:\r\n\t~Editor() override;\r\n\r\n\t// Public so the COM thunks can access it.\r\n\tbool IsUnicodeMode() const noexcept;\r\n\t// Public so scintilla_send_message can use it.\r\n\tvirtual Scintilla::sptr_t WndProc(Scintilla::Message iMessage, Scintilla::uptr_t wParam, Scintilla::sptr_t lParam);\r\n\t// Public so scintilla_set_id can use it.\r\n\tint ctrlID;\r\n\t// Public so COM methods for drag and drop can set it.\r\n\tScintilla::Status errorStatus;\r\n\tfriend class AutoSurface;\r\n};\r\n\r\n/**\r\n * A smart pointer class to ensure Surfaces are set up and deleted correctly.\r\n */\r\nclass AutoSurface {\r\nprivate:\r\n\tstd::unique_ptr<Surface> surf;\r\npublic:\r\n\tAutoSurface(const Editor *ed) :\r\n\t\tsurf(ed->CreateMeasurementSurface())  {\r\n\t}\r\n\tAutoSurface(SurfaceID sid, const Editor *ed, std::optional<Scintilla::Technology> technology = {}) :\r\n\t\tsurf(ed->CreateDrawingSurface(sid, technology)) {\r\n\t}\r\n\t// Deleted so AutoSurface objects can not be copied.\r\n\tAutoSurface(const AutoSurface &) = delete;\r\n\tAutoSurface(AutoSurface &&) = delete;\r\n\tvoid operator=(const AutoSurface &) = delete;\r\n\tvoid operator=(AutoSurface &&) = delete;\r\n\t~AutoSurface() {\r\n\t}\r\n\tSurface *operator->() const noexcept {\r\n\t\treturn surf.get();\r\n\t}\r\n\toperator Surface *() const noexcept {\r\n\t\treturn surf.get();\r\n\t}\r\n};\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/src/ElapsedPeriod.h",
    "content": "// Scintilla source code edit control\r\n/** @file ElapsedPeriod.h\r\n ** Encapsulate C++ <chrono> to simplify use.\r\n **/\r\n// Copyright 2018 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef ELAPSEDPERIOD_H\r\n#define ELAPSEDPERIOD_H\r\n\r\nnamespace Scintilla::Internal {\r\n\r\n// Simplified access to high precision timing.\r\nclass ElapsedPeriod {\r\n\tusing ElapsedClock = std::chrono::steady_clock;\r\n\tElapsedClock::time_point tp;\r\npublic:\r\n\t/// Capture the moment\r\n\tElapsedPeriod() noexcept : tp(ElapsedClock::now()) {\r\n\t}\r\n\t/// Return duration as floating point seconds\r\n\tdouble Duration(bool reset=false) noexcept {\r\n\t\tconst ElapsedClock::time_point tpNow = ElapsedClock::now();\r\n\t\tconst std::chrono::duration<double> duration =\r\n\t\t\tstd::chrono::duration_cast<std::chrono::duration<double>>(tpNow - tp);\r\n\t\tif (reset) {\r\n\t\t\ttp = tpNow;\r\n\t\t}\r\n\t\treturn duration.count();\r\n\t}\r\n};\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/src/Geometry.cxx",
    "content": "// Scintilla source code edit control\r\n/** @file Geometry.cxx\r\n ** Helper functions for geometric calculations.\r\n **/\r\n// Copyright 2020 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#include <cstdint>\r\n#include <cmath>\r\n\r\n#include <algorithm>\r\n\r\n#include \"Geometry.h\"\r\n\r\nnamespace {\r\n\r\nconstexpr unsigned int Mixed(unsigned char a, unsigned char b, double proportion) noexcept {\r\n\treturn static_cast<unsigned int>(a + proportion * (b - a));\r\n}\r\n\r\n}\r\n\r\nnamespace Scintilla::Internal {\r\n\r\nPRectangle Clamp(PRectangle rc, Edge edge, XYPOSITION position) noexcept {\r\n\tswitch (edge) {\r\n\tcase Edge::left:\r\n\t\treturn PRectangle(std::clamp(position, rc.left, rc.right), rc.top, rc.right, rc.bottom);\r\n\tcase Edge::top:\r\n\t\treturn PRectangle(rc.left, std::clamp(position, rc.top, rc.bottom), rc.right, rc.bottom);\r\n\tcase Edge::right:\r\n\t\treturn PRectangle(rc.left, rc.top, std::clamp(position, rc.left, rc.right), rc.bottom);\r\n\tcase Edge::bottom:\r\n\tdefault:\r\n\t\treturn PRectangle(rc.left, rc.top, rc.right, std::clamp(position, rc.top, rc.bottom));\r\n\t}\r\n}\r\n\r\nPRectangle Side(PRectangle rc, Edge edge, XYPOSITION size) noexcept {\r\n\tswitch (edge) {\r\n\tcase Edge::left:\r\n\t\treturn PRectangle(rc.left, rc.top, std::min(rc.left + size, rc.right), rc.bottom);\r\n\tcase Edge::top:\r\n\t\treturn PRectangle(rc.left, rc.top, rc.right, std::min(rc.top + size, rc.bottom));\r\n\tcase Edge::right:\r\n\t\treturn PRectangle(std::max(rc.left, rc.right - size), rc.top, rc.right, rc.bottom);\r\n\tcase Edge::bottom:\r\n\tdefault:\r\n\t\treturn PRectangle(rc.left, std::max(rc.top, rc.bottom - size), rc.right, rc.bottom);\r\n\t}\r\n}\r\n\r\nInterval Intersection(Interval a, Interval b) noexcept {\r\n\tconst XYPOSITION leftMax = std::max(a.left, b.left);\r\n\tconst XYPOSITION rightMin = std::min(a.right, b.right);\r\n\t// If the result would have a negative width. make empty instead.\r\n\tconst XYPOSITION rightResult = (rightMin >= leftMax) ? rightMin : leftMax;\r\n\treturn { leftMax, rightResult };\r\n}\r\n\r\nPRectangle Intersection(PRectangle rc, Interval horizontalBounds) noexcept {\r\n\tconst Interval intersection = Intersection(HorizontalBounds(rc), horizontalBounds);\r\n\treturn PRectangle(intersection.left, rc.top, intersection.right, rc.bottom);\r\n}\r\n\r\nInterval HorizontalBounds(PRectangle rc) noexcept {\r\n\treturn { rc.left, rc.right };\r\n}\r\n\r\nXYPOSITION PixelAlign(XYPOSITION xy, int pixelDivisions) noexcept {\r\n\treturn std::round(xy * pixelDivisions) / pixelDivisions;\r\n}\r\n\r\nXYPOSITION PixelAlignFloor(XYPOSITION xy, int pixelDivisions) noexcept {\r\n\treturn std::floor(xy * pixelDivisions) / pixelDivisions;\r\n}\r\n\r\nXYPOSITION PixelAlignCeil(XYPOSITION xy, int pixelDivisions) noexcept {\r\n\treturn std::ceil(xy * pixelDivisions) / pixelDivisions;\r\n}\r\n\r\nPoint PixelAlign(const Point &pt, int pixelDivisions) noexcept {\r\n\treturn Point(\r\n\t\tPixelAlign(pt.x, pixelDivisions),\r\n\t\tPixelAlign(pt.y, pixelDivisions));\r\n}\r\n\r\nPRectangle PixelAlign(const PRectangle &rc, int pixelDivisions) noexcept {\r\n\t// Move left and right side to nearest pixel to avoid blurry visuals.\r\n\t// The top and bottom should be integers but floor them to make sure.\r\n\t// `pixelDivisions` is commonly 1 except for 'retina' displays where it is 2.\r\n\t// On retina displays, the positions should be moved to the nearest device\r\n\t// pixel which is the nearest half logical pixel.\r\n\treturn PRectangle(\r\n\t\tPixelAlign(rc.left, pixelDivisions),\r\n\t\tPixelAlignFloor(rc.top, pixelDivisions),\r\n\t\tPixelAlign(rc.right, pixelDivisions),\r\n\t\tPixelAlignFloor(rc.bottom, pixelDivisions));\r\n}\r\n\r\nPRectangle PixelAlignOutside(const PRectangle &rc, int pixelDivisions) noexcept {\r\n\t// Move left and right side to extremes (floor(left) ceil(right)) to avoid blurry visuals.\r\n\treturn PRectangle(\r\n\t\tPixelAlignFloor(rc.left, pixelDivisions),\r\n\t\tPixelAlignFloor(rc.top, pixelDivisions),\r\n\t\tPixelAlignCeil(rc.right, pixelDivisions),\r\n\t\tPixelAlignFloor(rc.bottom, pixelDivisions));\r\n}\r\n\r\nColourRGBA ColourRGBA::MixedWith(ColourRGBA other) const noexcept {\r\n\tconst unsigned int red = (GetRed() + other.GetRed()) / 2;\r\n\tconst unsigned int green = (GetGreen() + other.GetGreen()) / 2;\r\n\tconst unsigned int blue = (GetBlue() + other.GetBlue()) / 2;\r\n\tconst unsigned int alpha = (GetAlpha() + other.GetAlpha()) / 2;\r\n\treturn ColourRGBA(red, green, blue, alpha);\r\n}\r\n\r\nColourRGBA ColourRGBA::MixedWith(ColourRGBA other, double proportion) const noexcept {\r\n\treturn ColourRGBA(\r\n\t\tMixed(GetRed(), other.GetRed(), proportion),\r\n\t\tMixed(GetGreen(), other.GetGreen(), proportion),\r\n\t\tMixed(GetBlue(), other.GetBlue(), proportion),\r\n\t\tMixed(GetAlpha(), other.GetAlpha(), proportion));\r\n}\r\n\r\n}\r\n"
  },
  {
    "path": "scintilla/src/Geometry.h",
    "content": "// Scintilla source code edit control\r\n/** @file Geometry.h\r\n ** Classes and functions for geometric and colour calculations.\r\n **/\r\n// Copyright 2020 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef GEOMETRY_H\r\n#define GEOMETRY_H\r\n\r\nnamespace Scintilla::Internal {\r\n\r\ntypedef double XYPOSITION;\r\ntypedef double XYACCUMULATOR;\r\n\r\n/**\r\n * A geometric point class.\r\n * Point is similar to the Win32 POINT and GTK+ GdkPoint types.\r\n */\r\nclass Point {\r\npublic:\r\n\tXYPOSITION x;\r\n\tXYPOSITION y;\r\n\r\n\tconstexpr explicit Point(XYPOSITION x_=0, XYPOSITION y_=0) noexcept : x(x_), y(y_) {\r\n\t}\r\n\r\n\tstatic constexpr Point FromInts(int x_, int y_) noexcept {\r\n\t\treturn Point(static_cast<XYPOSITION>(x_), static_cast<XYPOSITION>(y_));\r\n\t}\r\n\r\n\tconstexpr bool operator==(Point other) const noexcept {\r\n\t\treturn (x == other.x) && (y == other.y);\r\n\t}\r\n\r\n\tconstexpr bool operator!=(Point other) const noexcept {\r\n\t\treturn (x != other.x) || (y != other.y);\r\n\t}\r\n\r\n\tconstexpr Point operator+(Point other) const noexcept {\r\n\t\treturn Point(x + other.x, y + other.y);\r\n\t}\r\n\r\n\tconstexpr Point operator-(Point other) const noexcept {\r\n\t\treturn Point(x - other.x, y - other.y);\r\n\t}\r\n\r\n\t// Other automatically defined methods (assignment, copy constructor, destructor) are fine\r\n};\r\n\r\n\r\n/**\r\n * A geometric interval class.\r\n */\r\nclass Interval {\r\npublic:\r\n\tXYPOSITION left;\r\n\tXYPOSITION right;\r\n\tconstexpr bool operator==(const Interval &other) const noexcept {\r\n\t\treturn (left == other.left) && (right == other.right);\r\n\t}\r\n\tconstexpr XYPOSITION Width() const noexcept { return right - left; }\r\n\tconstexpr bool Empty() const noexcept {\r\n\t\treturn Width() <= 0;\r\n\t}\r\n\tconstexpr bool Intersects(Interval other) const noexcept {\r\n\t\treturn (right > other.left) && (left < other.right);\r\n\t}\r\n\tconstexpr Interval Offset(XYPOSITION offset) const noexcept {\r\n\t\treturn {left + offset, right + offset};\r\n\t}\r\n};\r\n\r\n/**\r\n * A geometric rectangle class.\r\n * PRectangle is similar to Win32 RECT.\r\n * PRectangles contain their top and left sides, but not their right and bottom sides.\r\n */\r\nclass PRectangle {\r\npublic:\r\n\tXYPOSITION left;\r\n\tXYPOSITION top;\r\n\tXYPOSITION right;\r\n\tXYPOSITION bottom;\r\n\r\n\tconstexpr explicit PRectangle(XYPOSITION left_=0, XYPOSITION top_=0, XYPOSITION right_=0, XYPOSITION bottom_ = 0) noexcept :\r\n\t\tleft(left_), top(top_), right(right_), bottom(bottom_) {\r\n\t}\r\n\r\n\tstatic constexpr PRectangle FromInts(int left_, int top_, int right_, int bottom_) noexcept {\r\n\t\treturn PRectangle(static_cast<XYPOSITION>(left_), static_cast<XYPOSITION>(top_),\r\n\t\t\tstatic_cast<XYPOSITION>(right_), static_cast<XYPOSITION>(bottom_));\r\n\t}\r\n\r\n\t// Other automatically defined methods (assignment, copy constructor, destructor) are fine\r\n\r\n\tconstexpr bool operator==(const PRectangle &rc) const noexcept {\r\n\t\treturn (rc.left == left) && (rc.right == right) &&\r\n\t\t\t(rc.top == top) && (rc.bottom == bottom);\r\n\t}\r\n\tconstexpr bool Contains(Point pt) const noexcept {\r\n\t\treturn (pt.x >= left) && (pt.x <= right) &&\r\n\t\t\t(pt.y >= top) && (pt.y <= bottom);\r\n\t}\r\n\tconstexpr bool ContainsWholePixel(Point pt) const noexcept {\r\n\t\t// Does the rectangle contain all of the pixel to left/below the point\r\n\t\treturn (pt.x >= left) && ((pt.x+1) <= right) &&\r\n\t\t\t(pt.y >= top) && ((pt.y+1) <= bottom);\r\n\t}\r\n\tconstexpr bool Contains(PRectangle rc) const noexcept {\r\n\t\treturn (rc.left >= left) && (rc.right <= right) &&\r\n\t\t\t(rc.top >= top) && (rc.bottom <= bottom);\r\n\t}\r\n\tconstexpr bool Intersects(PRectangle other) const noexcept {\r\n\t\treturn (right > other.left) && (left < other.right) &&\r\n\t\t\t(bottom > other.top) && (top < other.bottom);\r\n\t}\r\n\tconstexpr bool Intersects(Interval horizontalBounds) const noexcept {\r\n\t\treturn (right > horizontalBounds.left) && (left < horizontalBounds.right);\r\n\t}\r\n\r\n\tvoid Move(XYPOSITION xDelta, XYPOSITION yDelta) noexcept {\r\n\t\tleft += xDelta;\r\n\t\ttop += yDelta;\r\n\t\tright += xDelta;\r\n\t\tbottom += yDelta;\r\n\t}\r\n\r\n\tPRectangle WithHorizontalBounds(Interval horizontal) const noexcept {\r\n\t\treturn PRectangle(horizontal.left, top, horizontal.right, bottom);\r\n\t}\r\n\r\n\tconstexpr PRectangle Inset(XYPOSITION delta) const noexcept {\r\n\t\treturn PRectangle(left + delta, top + delta, right - delta, bottom - delta);\r\n\t}\r\n\r\n\tconstexpr PRectangle Inset(Point delta) const noexcept {\r\n\t\treturn PRectangle(left + delta.x, top + delta.y, right - delta.x, bottom - delta.y);\r\n\t}\r\n\r\n\tconstexpr Point Centre() const noexcept {\r\n\t\treturn Point((left + right) / 2, (top + bottom) / 2);\r\n\t}\r\n\r\n\tconstexpr XYPOSITION Width() const noexcept { return right - left; }\r\n\tconstexpr XYPOSITION Height() const noexcept { return bottom - top; }\r\n\tconstexpr bool Empty() const noexcept {\r\n\t\treturn (Height() <= 0) || (Width() <= 0);\r\n\t}\r\n};\r\n\r\nenum class Edge { left, top, bottom, right };\r\n\r\nPRectangle Clamp(PRectangle rc, Edge edge, XYPOSITION position) noexcept;\r\nPRectangle Side(PRectangle rc, Edge edge, XYPOSITION size) noexcept;\r\n\r\nInterval Intersection(Interval a, Interval b) noexcept;\r\nPRectangle Intersection(PRectangle rc, Interval horizontalBounds) noexcept;\r\nInterval HorizontalBounds(PRectangle rc) noexcept;\r\n\r\nXYPOSITION PixelAlign(XYPOSITION xy, int pixelDivisions) noexcept;\r\nXYPOSITION PixelAlignFloor(XYPOSITION xy, int pixelDivisions) noexcept;\r\nXYPOSITION PixelAlignCeil(XYPOSITION xy, int pixelDivisions) noexcept;\r\n\r\nPoint PixelAlign(const Point &pt, int pixelDivisions) noexcept;\r\n\r\nPRectangle PixelAlign(const PRectangle &rc, int pixelDivisions) noexcept;\r\nPRectangle PixelAlignOutside(const PRectangle &rc, int pixelDivisions) noexcept;\r\n\r\n/**\r\n* Holds an RGBA colour with 8 bits for each component.\r\n*/\r\nconstexpr float componentMaximum = 255.0F;\r\nconstexpr unsigned int maximumByte = 0xffU;\r\nclass ColourRGBA {\r\n\tstatic constexpr float ComponentAsFloat(unsigned char component) {\r\n\t\treturn component / componentMaximum;\r\n\t}\r\n\tstatic constexpr int rgbMask = 0xffffff;\r\n\tint co;\r\npublic:\r\n\tconstexpr explicit ColourRGBA(int co_ = 0) noexcept : co(co_) {\r\n\t}\r\n\r\n\tconstexpr ColourRGBA(unsigned int red, unsigned int green, unsigned int blue, unsigned int alpha=maximumByte) noexcept :\r\n\t\tColourRGBA(red | (green << 8) | (blue << 16) | (alpha << 24)) {\r\n\t}\r\n\r\n\tconstexpr ColourRGBA(ColourRGBA cd, unsigned int alpha) noexcept :\r\n\t\tColourRGBA(cd.OpaqueRGB() | (alpha << 24)) {\r\n\t}\r\n\r\n\tstatic constexpr ColourRGBA FromRGB(int co_) noexcept {\r\n\t\treturn ColourRGBA(co_ | (maximumByte << 24));\r\n\t}\r\n\r\n\tstatic constexpr ColourRGBA Grey(unsigned int grey, unsigned int alpha=maximumByte) noexcept {\r\n\t\treturn ColourRGBA(grey, grey, grey, alpha);\r\n\t}\r\n\r\n\tstatic constexpr ColourRGBA FromIpRGB(intptr_t co_) noexcept {\r\n\t\tconst int rgb = co_ & rgbMask;\r\n\t\treturn ColourRGBA(rgb | (maximumByte << 24));\r\n\t}\r\n\r\n\tconstexpr ColourRGBA WithoutAlpha() const noexcept {\r\n\t\treturn ColourRGBA(co & rgbMask);\r\n\t}\r\n\r\n\tconstexpr ColourRGBA Opaque() const noexcept {\r\n\t\treturn ColourRGBA(co | (maximumByte << 24));\r\n\t}\r\n\r\n\tconstexpr int AsInteger() const noexcept {\r\n\t\treturn co;\r\n\t}\r\n\r\n\tconstexpr int OpaqueRGB() const noexcept {\r\n\t\treturn co & rgbMask;\r\n\t}\r\n\r\n\t// Red, green and blue values as bytes 0..255\r\n\tconstexpr unsigned char GetRed() const noexcept {\r\n\t\treturn co & maximumByte;\r\n\t}\r\n\tconstexpr unsigned char GetGreen() const noexcept {\r\n\t\treturn (co >> 8) & maximumByte;\r\n\t}\r\n\tconstexpr unsigned char GetBlue() const noexcept {\r\n\t\treturn (co >> 16) & maximumByte;\r\n\t}\r\n\tconstexpr unsigned char GetAlpha() const noexcept {\r\n\t\t// Use a temporary here to prevent a 'Wconversion' warning from GCC\r\n\t\tconst int shifted = co >> 24;\r\n\t\treturn shifted & maximumByte;\r\n\t}\r\n\r\n\t// Red, green, blue, and alpha values as float 0..1.0\r\n\tconstexpr float GetRedComponent() const noexcept {\r\n\t\treturn ComponentAsFloat(GetRed());\r\n\t}\r\n\tconstexpr float GetGreenComponent() const noexcept {\r\n\t\treturn ComponentAsFloat(GetGreen());\r\n\t}\r\n\tconstexpr float GetBlueComponent() const noexcept {\r\n\t\treturn ComponentAsFloat(GetBlue());\r\n\t}\r\n\tconstexpr float GetAlphaComponent() const noexcept {\r\n\t\treturn ComponentAsFloat(GetAlpha());\r\n\t}\r\n\r\n\tconstexpr bool operator==(const ColourRGBA &other) const noexcept {\r\n\t\treturn co == other.co;\r\n\t}\r\n\r\n\tconstexpr bool IsOpaque() const noexcept {\r\n\t\treturn GetAlpha() == maximumByte;\r\n\t}\r\n\r\n\tColourRGBA MixedWith(ColourRGBA other) const noexcept;\r\n\tColourRGBA MixedWith(ColourRGBA other, double proportion) const noexcept;\r\n};\r\n\r\nconstexpr ColourRGBA white(maximumByte, maximumByte, maximumByte);\r\nconstexpr ColourRGBA black(0x0, 0x0, 0x0);\r\n\r\n/**\r\n* Holds an RGBA colour and stroke width to stroke a shape.\r\n*/\r\nclass Stroke {\r\npublic:\r\n\tColourRGBA colour;\r\n\tXYPOSITION width;\r\n\tconstexpr Stroke(ColourRGBA colour_, XYPOSITION width_=1.0) noexcept :\r\n\t\tcolour(colour_), width(width_) {\r\n\t}\r\n\tconstexpr float WidthF() const noexcept {\r\n\t\treturn static_cast<float>(width);\r\n\t}\r\n};\r\n\r\n/**\r\n* Holds an RGBA colour to fill a shape.\r\n*/\r\nclass Fill {\r\npublic:\r\n\tColourRGBA colour;\r\n\tconstexpr Fill(ColourRGBA colour_) noexcept :\r\n\t\tcolour(colour_) {\r\n\t}\r\n};\r\n\r\n/**\r\n* Holds a pair of RGBA colours and stroke width to fill and stroke a shape.\r\n*/\r\nclass FillStroke {\r\npublic:\r\n\tFill fill;\r\n\tStroke stroke;\r\n\tconstexpr FillStroke(ColourRGBA colourFill_, ColourRGBA colourStroke_, XYPOSITION widthStroke_=1.0) noexcept :\r\n\t\tfill(colourFill_), stroke(colourStroke_, widthStroke_) {\r\n\t}\r\n\tconstexpr FillStroke(ColourRGBA colourBoth, XYPOSITION widthStroke_=1.0) noexcept :\r\n\t\tfill(colourBoth), stroke(colourBoth, widthStroke_) {\r\n\t}\r\n};\r\n\r\n/**\r\n* Holds an element of a gradient with an RGBA colour and a relative position.\r\n*/\r\nclass ColourStop {\r\npublic:\r\n\tXYPOSITION position;\r\n\tColourRGBA colour;\r\n\tconstexpr ColourStop(XYPOSITION position_, ColourRGBA colour_) noexcept :\r\n\t\tposition(position_), colour(colour_) {\r\n\t}\r\n};\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/src/Indicator.cxx",
    "content": "// Scintilla source code edit control\r\n/** @file Indicator.cxx\r\n ** Defines the style of indicators which are text decorations such as underlining.\r\n **/\r\n// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#include <cmath>\r\n#include <cstdint>\r\n\r\n#include <stdexcept>\r\n#include <string_view>\r\n#include <vector>\r\n#include <map>\r\n#include <optional>\r\n#include <algorithm>\r\n#include <memory>\r\n\r\n#include \"ScintillaTypes.h\"\r\n\r\n#include \"Debugging.h\"\r\n#include \"Geometry.h\"\r\n#include \"Platform.h\"\r\n\r\n#include \"Indicator.h\"\r\n#include \"XPM.h\"\r\n\r\nusing namespace Scintilla;\r\nusing namespace Scintilla::Internal;\r\n\r\nvoid Indicator::Draw(Surface *surface, const PRectangle &rc, const PRectangle &rcLine, const PRectangle &rcCharacter, State state, int value) const {\r\n\tStyleAndColour sacDraw = sacNormal;\r\n\tif (FlagSet(Flags(), IndicFlag::ValueFore)) {\r\n\t\tsacDraw.fore = ColourRGBA::FromRGB(value & static_cast<int>(IndicValue::Mask));\r\n\t}\r\n\tif (state == State::hover) {\r\n\t\tsacDraw = sacHover;\r\n\t}\r\n\r\n\tconst int pixelDivisions = surface->PixelDivisions();\r\n\r\n\tconst XYPOSITION halfWidth = strokeWidth / 2.0f;\r\n\r\n\tconst PRectangle rcAligned(PixelAlignOutside(rc, pixelDivisions));\r\n\tPRectangle rcFullHeightAligned = PixelAlignOutside(rcLine, pixelDivisions);\r\n\trcFullHeightAligned.left = rcAligned.left;\r\n\trcFullHeightAligned.right = rcAligned.right;\r\n\r\n\tconst XYPOSITION ymid = PixelAlign(rc.Centre().y, pixelDivisions);\r\n\r\n\t// This is a reasonable clip for indicators beneath text like underlines\r\n\tPRectangle rcClip = rcAligned;\r\n\trcClip.bottom = rcFullHeightAligned.bottom;\r\n\r\n\tswitch (sacDraw.style) {\r\n\tcase IndicatorStyle::Squiggle: {\r\n\t\t\tsurface->SetClip(rcClip);\r\n\t\t\tXYPOSITION x = rcAligned.left + halfWidth;\r\n\t\t\tconst XYPOSITION top = rcAligned.top + halfWidth;\r\n\t\t\tconst XYPOSITION xLast = rcAligned.right + halfWidth;\r\n\t\t\tXYPOSITION y = 0;\r\n\t\t\tstd::vector<Point> pts;\r\n\t\t\tconst XYPOSITION pitch = 1 + strokeWidth;\r\n\t\t\tpts.emplace_back(x, top + y);\r\n\t\t\twhile (x < xLast) {\r\n\t\t\t\tx += pitch;\r\n\t\t\t\ty = pitch - y;\r\n\t\t\t\tpts.emplace_back(x, top + y);\r\n\t\t\t\t}\r\n\t\t\tsurface->PolyLine(pts.data(), std::size(pts), Stroke(sacDraw.fore, strokeWidth));\r\n\t\t\tsurface->PopClip();\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase IndicatorStyle::SquigglePixmap: {\r\n\t\t\tconst PRectangle rcSquiggle = PixelAlign(rc, 1);\r\n\r\n\t\t\tconst int width = std::min(4000, static_cast<int>(rcSquiggle.Width()));\r\n\t\t\tRGBAImage image(width, 3, 1.0, nullptr);\r\n\t\t\tconstexpr unsigned int alphaFull = 0xff;\r\n\t\t\tconstexpr unsigned int alphaSide = 0x2f;\r\n\t\t\tconstexpr unsigned int alphaSide2 = 0x5f;\r\n\t\t\tfor (int x = 0; x < width; x++) {\r\n\t\t\t\tif (x%2) {\r\n\t\t\t\t\t// Two halfway columns have a full pixel in middle flanked by light pixels\r\n\t\t\t\t\timage.SetPixel(x, 0, ColourRGBA(sacDraw.fore, alphaSide));\r\n\t\t\t\t\timage.SetPixel(x, 1, ColourRGBA(sacDraw.fore, alphaFull));\r\n\t\t\t\t\timage.SetPixel(x, 2, ColourRGBA(sacDraw.fore, alphaSide));\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Extreme columns have a full pixel at bottom or top and a mid-tone pixel in centre\r\n\t\t\t\t\timage.SetPixel(x, (x % 4) ? 0 : 2, ColourRGBA(sacDraw.fore, alphaFull));\r\n\t\t\t\t\timage.SetPixel(x, 1, ColourRGBA(sacDraw.fore, alphaSide2));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tsurface->DrawRGBAImage(rcSquiggle, image.GetWidth(), image.GetHeight(), image.Pixels());\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase IndicatorStyle::SquiggleLow: {\r\n\t\t\tstd::vector<Point> pts;\r\n\t\t\tconst XYPOSITION top = rcAligned.top + halfWidth;\r\n\t\t\tint y = 0;\r\n\t\t\tXYPOSITION x = std::round(rcAligned.left) + halfWidth;\r\n\t\t\tpts.emplace_back(x, top + y);\r\n\t\t\tconst XYPOSITION pitch = 2 + strokeWidth;\r\n\t\t\tx += pitch;\r\n\t\t\twhile (x < rcAligned.right) {\r\n\t\t\t\tpts.emplace_back(x - 1, top + y);\r\n\t\t\t\ty = 1 - y;\r\n\t\t\t\tpts.emplace_back(x, top + y);\r\n\t\t\t\tx += pitch;\r\n\t\t\t}\r\n\t\t\tpts.emplace_back(rcAligned.right, top + y);\r\n\t\t\tsurface->PolyLine(pts.data(), std::size(pts), Stroke(sacDraw.fore, strokeWidth));\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase IndicatorStyle::TT: {\r\n\t\t\tsurface->SetClip(rcClip);\r\n\t\t\tconst XYPOSITION yLine = ymid;\r\n\t\t\tXYPOSITION x = rcAligned.left + 5.0f;\r\n\t\t\tconst XYPOSITION pitch = 4 + strokeWidth;\r\n\t\t\twhile (x < rc.right + pitch) {\r\n\t\t\t\tconst PRectangle line(x-pitch, yLine, x, yLine + strokeWidth);\r\n\t\t\t\tsurface->FillRectangle(line, sacDraw.fore);\r\n\t\t\t\tconst PRectangle tail(x - 2 - strokeWidth, yLine + strokeWidth, x - 2, yLine + strokeWidth * 2);\r\n\t\t\t\tsurface->FillRectangle(tail, sacDraw.fore);\r\n\t\t\t\tx++;\r\n\t\t\t\tx += pitch;\r\n\t\t\t}\r\n\t\t\tsurface->PopClip();\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase IndicatorStyle::Diagonal: {\r\n\t\t\tsurface->SetClip(rcClip);\r\n\t\t\tXYPOSITION x = rcAligned.left + halfWidth;\r\n\t\t\tconst XYPOSITION top = rcAligned.top + halfWidth;\r\n\t\t\tconst XYPOSITION pitch = 3 + strokeWidth;\r\n\t\t\twhile (x < rc.right) {\r\n\t\t\t\tconst XYPOSITION endX = x+3;\r\n\t\t\t\tconst XYPOSITION endY = top - 1;\r\n\t\t\t\tsurface->LineDraw(Point(x, top + 2), Point(endX, endY), Stroke(sacDraw.fore, strokeWidth));\r\n\t\t\t\tx += pitch;\r\n\t\t\t}\r\n\t\t\tsurface->PopClip();\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase IndicatorStyle::Strike: {\r\n\t\t\tconst XYPOSITION yStrike = std::round(rcLine.Centre().y);\r\n\t\t\tconst PRectangle rcStrike(\r\n\t\t\t\trcAligned.left, yStrike, rcAligned.right, yStrike + strokeWidth);\r\n\t\t\tsurface->FillRectangle(rcStrike, sacDraw.fore);\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase IndicatorStyle::Hidden:\r\n\tcase IndicatorStyle::TextFore:\r\n\t\t// Draw nothing\r\n\t\tbreak;\r\n\r\n\tcase IndicatorStyle::Box: {\r\n\t\t\tPRectangle rcBox = rcFullHeightAligned;\r\n\t\t\trcBox.top = rcBox.top + 1.0f;\r\n\t\t\trcBox.bottom = ymid + 1.0f;\r\n\t\t\tsurface->RectangleFrame(rcBox, Stroke(ColourRGBA(sacDraw.fore, outlineAlpha), strokeWidth));\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase IndicatorStyle::RoundBox:\r\n\tcase IndicatorStyle::StraightBox:\r\n\tcase IndicatorStyle::FullBox: {\r\n\t\t\tPRectangle rcBox = rcFullHeightAligned;\r\n\t\t\tif (sacDraw.style != IndicatorStyle::FullBox)\r\n\t\t\t\trcBox.top = rcBox.top + 1;\r\n\t\t\tsurface->AlphaRectangle(rcBox, (sacDraw.style == IndicatorStyle::RoundBox) ? 1.0f : 0.0f,\r\n\t\t\t\t\t\tFillStroke(ColourRGBA(sacDraw.fore, fillAlpha), ColourRGBA(sacDraw.fore, outlineAlpha), strokeWidth));\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase IndicatorStyle::Gradient:\r\n\tcase IndicatorStyle::GradientCentre: {\r\n\t\t\tPRectangle rcBox = rcFullHeightAligned;\r\n\t\t\trcBox.top = rcBox.top + 1;\r\n\t\t\tconst Surface::GradientOptions options = Surface::GradientOptions::topToBottom;\r\n\t\t\tconst ColourRGBA start(sacDraw.fore, fillAlpha);\r\n\t\t\tconst ColourRGBA end(sacDraw.fore, 0);\r\n\t\t\tstd::vector<ColourStop> stops;\r\n\t\t\tswitch (sacDraw.style) {\r\n\t\t\tcase IndicatorStyle::Gradient:\r\n\t\t\t\tstops.push_back(ColourStop(0.0, start));\r\n\t\t\t\tstops.push_back(ColourStop(1.0, end));\r\n\t\t\t\tbreak;\r\n\t\t\tcase IndicatorStyle::GradientCentre:\r\n\t\t\t\tstops.push_back(ColourStop(0.0, end));\r\n\t\t\t\tstops.push_back(ColourStop(0.5, start));\r\n\t\t\t\tstops.push_back(ColourStop(1.0, end));\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tsurface->GradientRectangle(rcBox, stops, options);\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase IndicatorStyle::DotBox: {\r\n\t\t\tPRectangle rcBox = rcFullHeightAligned;\r\n\t\t\trcBox.top = rcBox.top + 1;\r\n\t\t\t// Cap width at 4000 to avoid large allocations when mistakes made\r\n\t\t\tconst int width = std::min(static_cast<int>(rcBox.Width()), 4000);\r\n\t\t\tconst int height = static_cast<int>(rcBox.Height());\r\n\t\t\tRGBAImage image(width, height, 1.0, nullptr);\r\n\t\t\t// Draw horizontal lines top and bottom\r\n\t\t\tfor (int x=0; x<width; x++) {\r\n\t\t\t\tfor (int y = 0; y< height; y += height - 1) {\r\n\t\t\t\t\timage.SetPixel(x, y, ColourRGBA(sacDraw.fore, ((x + y) % 2) ? outlineAlpha : fillAlpha));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// Draw vertical lines left and right\r\n\t\t\tfor (int y = 1; y<height; y++) {\r\n\t\t\t\tfor (int x=0; x<width; x += width-1) {\r\n\t\t\t\t\timage.SetPixel(x, y, ColourRGBA(sacDraw.fore, ((x + y) % 2) ? outlineAlpha : fillAlpha));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tsurface->DrawRGBAImage(rcBox, image.GetWidth(), image.GetHeight(), image.Pixels());\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase IndicatorStyle::Dash: {\r\n\t\t\tXYPOSITION x = std::floor(rc.left);\r\n\t\t\tconst XYPOSITION widthDash = 3 + std::round(strokeWidth);\r\n\t\t\twhile (x < rc.right) {\r\n\t\t\t\tconst PRectangle rcDash = PRectangle(x, ymid,\r\n\t\t\t\t\tx + widthDash, ymid + std::round(strokeWidth));\r\n\t\t\t\tsurface->FillRectangle(rcDash, sacDraw.fore);\r\n\t\t\t\tx += 3 + widthDash;\r\n\t\t\t}\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase IndicatorStyle::Dots: {\r\n\t\t\tconst XYPOSITION widthDot = std::round(strokeWidth);\r\n\t\t\tXYPOSITION x = std::floor(rc.left);\r\n\t\t\twhile (x < rc.right) {\r\n\t\t\t\tconst PRectangle rcDot = PRectangle(x, ymid,\r\n\t\t\t\t\tx + widthDot, ymid + widthDot);\r\n\t\t\t\tsurface->FillRectangle(rcDot, sacDraw.fore);\r\n\t\t\t\tx += widthDot * 2;\r\n\t\t\t}\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase IndicatorStyle::CompositionThick: {\r\n\t\t\tconst PRectangle rcComposition(rc.left+1, rcLine.bottom-2, rc.right-1, rcLine.bottom);\r\n\t\t\tsurface->FillRectangle(rcComposition, ColourRGBA(sacDraw.fore, outlineAlpha));\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase IndicatorStyle::CompositionThin: {\r\n\t\t\tconst PRectangle rcComposition(rc.left+1, rcLine.bottom-2, rc.right-1, rcLine.bottom-1);\r\n\t\t\tsurface->FillRectangle(rcComposition, sacDraw.fore);\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase IndicatorStyle::Point:\r\n\tcase IndicatorStyle::PointCharacter:\r\n\t\tif (rcCharacter.Width() >= 0.1) {\r\n\t\t\tconst XYPOSITION pixelHeight = std::floor(rc.Height());\t// 1 pixel onto next line if multiphase\r\n\t\t\tconst XYPOSITION x = (sacDraw.style == IndicatorStyle::Point) ? (rcCharacter.left) : ((rcCharacter.right + rcCharacter.left) / 2);\r\n\t\t\t// 0.5f is to hit midpoint of pixels:\r\n\t\t\tconst XYPOSITION ix = std::round(x) + 0.5f;\r\n\t\t\tconst XYPOSITION iy = std::ceil(rc.bottom) + 0.5f;\r\n\t\t\tconst Point pts[] = {\r\n\t\t\t\tPoint(ix - pixelHeight, iy),\t// Left\r\n\t\t\t\tPoint(ix + pixelHeight, iy),\t// Right\r\n\t\t\t\tPoint(ix, iy - pixelHeight)\t\t\t\t\t\t\t\t// Top\r\n\t\t\t};\r\n\t\t\tsurface->Polygon(pts, std::size(pts), FillStroke(sacDraw.fore));\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase IndicatorStyle::PointTop:\r\n\t\tif (rcCharacter.Width() >= 0.1) {\r\n\t\t\tconst XYPOSITION pixelHeight = std::floor(rc.Height());\t// 1 pixel onto previous line if multiphase\r\n\t\t\tconst XYPOSITION x = rcCharacter.left;\r\n\t\t\t// 0.5f is to hit midpoint of pixels:\r\n\t\t\tconst XYPOSITION ix = std::round(x) + 0.5f;\r\n\t\t\tconst XYPOSITION iy = std::floor(rcLine.top) - 0.5f;\r\n\t\t\tconst Point pts[] = {\r\n\t\t\t\tPoint(ix - pixelHeight, iy),\t// Left\r\n\t\t\t\tPoint(ix + pixelHeight, iy),\t// Right\r\n\t\t\t\tPoint(ix, iy + pixelHeight)\t\t// Bottom\r\n\t\t\t};\r\n\t\t\tsurface->Polygon(pts, std::size(pts), FillStroke(sacDraw.fore));\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tdefault:\r\n\t\t// Either IndicatorStyle::Plain or unknown\r\n\t\tsurface->FillRectangle(PRectangle(rcAligned.left, ymid,\r\n\t\t\trcAligned.right, ymid + std::round(strokeWidth)), sacDraw.fore);\r\n\t}\r\n}\r\n\r\nvoid Indicator::SetFlags(IndicFlag attributes_) noexcept {\r\n\tattributes = attributes_;\r\n}\r\n"
  },
  {
    "path": "scintilla/src/Indicator.h",
    "content": "// Scintilla source code edit control\r\n/** @file Indicator.h\r\n ** Defines the style of indicators which are text decorations such as underlining.\r\n **/\r\n// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef INDICATOR_H\r\n#define INDICATOR_H\r\n\r\nnamespace Scintilla::Internal {\r\n\r\nstruct StyleAndColour {\r\n\tScintilla::IndicatorStyle style;\r\n\tColourRGBA fore;\r\n\tStyleAndColour() noexcept : style(Scintilla::IndicatorStyle::Plain), fore(black) {\r\n\t}\r\n\tStyleAndColour(Scintilla::IndicatorStyle style_, ColourRGBA fore_ = black) noexcept : style(style_), fore(fore_) {\r\n\t}\r\n\tbool operator==(const StyleAndColour &other) const noexcept {\r\n\t\treturn (style == other.style) && (fore == other.fore);\r\n\t}\r\n};\r\n\r\n/**\r\n */\r\nclass Indicator {\r\npublic:\r\n\tenum class State { normal, hover };\r\n\tStyleAndColour sacNormal;\r\n\tStyleAndColour sacHover;\r\n\tbool under;\r\n\tint fillAlpha;\r\n\tint outlineAlpha;\r\n\tScintilla::IndicFlag attributes;\r\n\tXYPOSITION strokeWidth = 1.0f;\r\n\tIndicator() noexcept : under(false), fillAlpha(30), outlineAlpha(50), attributes(Scintilla::IndicFlag::None) {\r\n\t}\r\n\tIndicator(Scintilla::IndicatorStyle style_, ColourRGBA fore_= black, bool under_=false, int fillAlpha_=30, int outlineAlpha_=50) noexcept :\r\n\t\tsacNormal(style_, fore_), sacHover(style_, fore_), under(under_), fillAlpha(fillAlpha_), outlineAlpha(outlineAlpha_), attributes(Scintilla::IndicFlag::None) {\r\n\t}\r\n\tvoid Draw(Surface *surface, const PRectangle &rc, const PRectangle &rcLine, const PRectangle &rcCharacter, State drawState, int value) const;\r\n\tbool IsDynamic() const noexcept {\r\n\t\treturn !(sacNormal == sacHover);\r\n\t}\r\n\tbool OverridesTextFore() const noexcept {\r\n\t\treturn sacNormal.style == Scintilla::IndicatorStyle::TextFore || sacHover.style == Scintilla::IndicatorStyle::TextFore;\r\n\t}\r\n\tScintilla::IndicFlag Flags() const noexcept {\r\n\t\treturn attributes;\r\n\t}\r\n\tvoid SetFlags(Scintilla::IndicFlag attributes_) noexcept;\r\n};\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/src/KeyMap.cxx",
    "content": "// Scintilla source code edit control\r\n/** @file KeyMap.cxx\r\n ** Defines a mapping between keystrokes and commands.\r\n **/\r\n// Copyright 1998-2003 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#include <cstdlib>\r\n#include <cstdint>\r\n\r\n#include <stdexcept>\r\n#include <string_view>\r\n#include <vector>\r\n#include <map>\r\n#include <optional>\r\n#include <memory>\r\n\r\n#include \"ScintillaTypes.h\"\r\n#include \"ScintillaMessages.h\"\r\n\r\n#include \"Debugging.h\"\r\n#include \"Geometry.h\"\r\n#include \"Platform.h\"\r\n\r\n#include \"KeyMap.h\"\r\n\r\nusing namespace Scintilla;\r\nusing namespace Scintilla::Internal;\r\n\r\nKeyMap::KeyMap() {\r\n\tfor (int i = 0; static_cast<int>(MapDefault[i].key); i++) {\r\n\t\tAssignCmdKey(MapDefault[i].key,\r\n\t\t\tMapDefault[i].modifiers,\r\n\t\t\tMapDefault[i].msg);\r\n\t}\r\n}\r\n\r\nvoid KeyMap::Clear() noexcept {\r\n\tkmap.clear();\r\n}\r\n\r\nvoid KeyMap::AssignCmdKey(Keys key, KeyMod modifiers, Message msg) {\r\n\tkmap[KeyModifiers(key, modifiers)] = msg;\r\n}\r\n\r\nMessage KeyMap::Find(Keys key, KeyMod modifiers) const {\r\n\tstd::map<KeyModifiers, Message>::const_iterator it = kmap.find(KeyModifiers(key, modifiers));\r\n\treturn (it == kmap.end()) ? static_cast<Message>(0) : it->second;\r\n}\r\n\r\nconst std::map<KeyModifiers, Message> &KeyMap::GetKeyMap() const noexcept {\r\n\treturn kmap;\r\n}\r\n\r\n#if PLAT_GTK_MACOSX\r\n#define OS_X_KEYS 1\r\n#else\r\n#define OS_X_KEYS 0\r\n#endif\r\n\r\n// Define a modifier that is exactly Ctrl key on all platforms\r\n// Most uses of Ctrl map to Cmd on macOS but some can't so use SCI_[S]CTRL_META\r\n#if OS_X_KEYS\r\n#define SCI_CTRL_META SCI_META\r\n#define SCI_SCTRL_META (SCI_META | SCI_SHIFT)\r\n#else\r\n#define SCI_CTRL_META SCI_CTRL\r\n#define SCI_SCTRL_META (SCI_CTRL | SCI_SHIFT)\r\n#endif\r\n\r\nnamespace {\r\n\r\nconstexpr Keys Key(char ch) noexcept {\r\n    return static_cast<Keys>(ch);\r\n}\r\n\r\n}\r\n\r\nconst KeyToCommand KeyMap::MapDefault[] = {\r\n\r\n#if OS_X_KEYS\r\n    {Keys::Down,\t\tSCI_CTRL,\tMessage::DocumentEnd},\r\n    {Keys::Down,\t\tSCI_CSHIFT,\tMessage::DocumentEndExtend},\r\n    {Keys::Up,\t\t    SCI_CTRL,\tMessage::DocumentStart},\r\n    {Keys::Up,\t\t    SCI_CSHIFT,\tMessage::DocumentStartExtend},\r\n    {Keys::Left,\t\tSCI_CTRL,\tMessage::VCHome},\r\n    {Keys::Left,\t\tSCI_CSHIFT,\tMessage::VCHomeExtend},\r\n    {Keys::Right,\t\tSCI_CTRL,\tMessage::LineEnd},\r\n    {Keys::Right,\t\tSCI_CSHIFT,\tMessage::LineEndExtend},\r\n#endif\r\n\r\n    {Keys::Down,\t\tSCI_NORM,\tMessage::LineDown},\r\n    {Keys::Down,\t\tSCI_SHIFT,\tMessage::LineDownExtend},\r\n    {Keys::Down,\t\tSCI_CTRL_META,\tMessage::LineScrollDown},\r\n    {Keys::Down,\t\tSCI_ASHIFT,\tMessage::LineDownRectExtend},\r\n    {Keys::Up,\t\t    SCI_NORM,\tMessage::LineUp},\r\n    {Keys::Up,\t\t\tSCI_SHIFT,\tMessage::LineUpExtend},\r\n    {Keys::Up,\t\t\tSCI_CTRL_META,\tMessage::LineScrollUp},\r\n    {Keys::Up,\t\t    SCI_ASHIFT,\tMessage::LineUpRectExtend},\r\n    {Key('['),\t\t\tSCI_CTRL,\tMessage::ParaUp},\r\n    {Key('['),\t\t\tSCI_CSHIFT,\tMessage::ParaUpExtend},\r\n    {Key(']'),\t\t\tSCI_CTRL,\tMessage::ParaDown},\r\n    {Key(']'),\t\t\tSCI_CSHIFT,\tMessage::ParaDownExtend},\r\n    {Keys::Left,\t\tSCI_NORM,\tMessage::CharLeft},\r\n    {Keys::Left,\t\tSCI_SHIFT,\tMessage::CharLeftExtend},\r\n    {Keys::Left,\t\tSCI_CTRL_META,\tMessage::WordLeft},\r\n    {Keys::Left,\t\tSCI_SCTRL_META,\tMessage::WordLeftExtend},\r\n    {Keys::Left,\t\tSCI_ASHIFT,\tMessage::CharLeftRectExtend},\r\n    {Keys::Right,\t\tSCI_NORM,\tMessage::CharRight},\r\n    {Keys::Right,\t\tSCI_SHIFT,\tMessage::CharRightExtend},\r\n    {Keys::Right,\t\tSCI_CTRL_META,\tMessage::WordRight},\r\n    {Keys::Right,\t\tSCI_SCTRL_META,\tMessage::WordRightExtend},\r\n    {Keys::Right,\t\tSCI_ASHIFT,\tMessage::CharRightRectExtend},\r\n    {Key('/'),\t\t    SCI_CTRL,\tMessage::WordPartLeft},\r\n    {Key('/'),\t\t    SCI_CSHIFT,\tMessage::WordPartLeftExtend},\r\n    {Key('\\\\'),\t\t    SCI_CTRL,\tMessage::WordPartRight},\r\n    {Key('\\\\'),\t\t    SCI_CSHIFT,\tMessage::WordPartRightExtend},\r\n    {Keys::Home,\t\tSCI_NORM,\tMessage::VCHome},\r\n    {Keys::Home, \t\tSCI_SHIFT, \tMessage::VCHomeExtend},\r\n    {Keys::Home, \t\tSCI_CTRL, \tMessage::DocumentStart},\r\n    {Keys::Home, \t\tSCI_CSHIFT, Message::DocumentStartExtend},\r\n    {Keys::Home, \t\tSCI_ALT, \tMessage::HomeDisplay},\r\n    {Keys::Home,\t\tSCI_ASHIFT,\tMessage::VCHomeRectExtend},\r\n    {Keys::End,\t \t    SCI_NORM,\tMessage::LineEnd},\r\n    {Keys::End,\t \t    SCI_SHIFT, \tMessage::LineEndExtend},\r\n    {Keys::End, \t\tSCI_CTRL, \tMessage::DocumentEnd},\r\n    {Keys::End, \t\tSCI_CSHIFT, Message::DocumentEndExtend},\r\n    {Keys::End, \t\tSCI_ALT, \tMessage::LineEndDisplay},\r\n    {Keys::End,\t\t    SCI_ASHIFT,\tMessage::LineEndRectExtend},\r\n    {Keys::Prior,\t\tSCI_NORM,\tMessage::PageUp},\r\n    {Keys::Prior,\t\tSCI_SHIFT, \tMessage::PageUpExtend},\r\n    {Keys::Prior,\t\tSCI_ASHIFT,\tMessage::PageUpRectExtend},\r\n    {Keys::Next, \t\tSCI_NORM, \tMessage::PageDown},\r\n    {Keys::Next, \t\tSCI_SHIFT, \tMessage::PageDownExtend},\r\n    {Keys::Next,\t\tSCI_ASHIFT,\tMessage::PageDownRectExtend},\r\n    {Keys::Delete,      SCI_NORM,\tMessage::Clear},\r\n    {Keys::Delete, \t    SCI_SHIFT,\tMessage::Cut},\r\n    {Keys::Delete, \t    SCI_CTRL,\tMessage::DelWordRight},\r\n    {Keys::Delete,\t    SCI_CSHIFT,\tMessage::DelLineRight},\r\n    {Keys::Insert, \t\tSCI_NORM,\tMessage::EditToggleOvertype},\r\n    {Keys::Insert, \t\tSCI_SHIFT,\tMessage::Paste},\r\n    {Keys::Insert, \t\tSCI_CTRL,\tMessage::Copy},\r\n    {Keys::Escape,  \tSCI_NORM,\tMessage::Cancel},\r\n    {Keys::Back,\t\tSCI_NORM, \tMessage::DeleteBack},\r\n    {Keys::Back,\t\tSCI_SHIFT, \tMessage::DeleteBack},\r\n    {Keys::Back,\t\tSCI_CTRL, \tMessage::DelWordLeft},\r\n    {Keys::Back, \t\tSCI_ALT,\tMessage::Undo},\r\n    {Keys::Back,\t\tSCI_CSHIFT,\tMessage::DelLineLeft},\r\n    {Key('Z'), \t\t\tSCI_CTRL,\tMessage::Undo},\r\n#if OS_X_KEYS\r\n    {Key('Z'), \t\t\tSCI_CSHIFT,\tMessage::Redo},\r\n#else\r\n    {Key('Y'), \t\t\tSCI_CTRL,\tMessage::Redo},\r\n#endif\r\n    {Key('X'), \t\t\tSCI_CTRL,\tMessage::Cut},\r\n    {Key('C'), \t\t\tSCI_CTRL,\tMessage::Copy},\r\n    {Key('V'), \t\t\tSCI_CTRL,\tMessage::Paste},\r\n    {Key('A'), \t\t\tSCI_CTRL,\tMessage::SelectAll},\r\n    {Keys::Tab,\t\t    SCI_NORM,\tMessage::Tab},\r\n    {Keys::Tab,\t\t    SCI_SHIFT,\tMessage::BackTab},\r\n    {Keys::Return, \t    SCI_NORM,\tMessage::NewLine},\r\n    {Keys::Return, \t    SCI_SHIFT,\tMessage::NewLine},\r\n    {Keys::Add, \t\tSCI_CTRL,\tMessage::ZoomIn},\r\n    {Keys::Subtract,\tSCI_CTRL,\tMessage::ZoomOut},\r\n    {Keys::Divide,\t    SCI_CTRL,\tMessage::SetZoom},\r\n    {Key('L'), \t\t\tSCI_CTRL,\tMessage::LineCut},\r\n    {Key('L'), \t\t\tSCI_CSHIFT,\tMessage::LineDelete},\r\n    {Key('T'), \t\t\tSCI_CSHIFT,\tMessage::LineCopy},\r\n    {Key('T'), \t\t\tSCI_CTRL,\tMessage::LineTranspose},\r\n    {Key('D'), \t\t\tSCI_CTRL,\tMessage::SelectionDuplicate},\r\n    {Key('U'), \t\t\tSCI_CTRL,\tMessage::LowerCase},\r\n    {Key('U'), \t\t\tSCI_CSHIFT,\tMessage::UpperCase},\r\n    {Key(0),SCI_NORM,static_cast<Message>(0)},\r\n};\r\n\r\n"
  },
  {
    "path": "scintilla/src/KeyMap.h",
    "content": "// Scintilla source code edit control\r\n/** @file KeyMap.h\r\n ** Defines a mapping between keystrokes and commands.\r\n **/\r\n// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef KEYMAP_H\r\n#define KEYMAP_H\r\n\r\nnamespace Scintilla::Internal {\r\n\r\n#define SCI_NORM KeyMod::Norm\r\n#define SCI_SHIFT KeyMod::Shift\r\n#define SCI_CTRL KeyMod::Ctrl\r\n#define SCI_ALT KeyMod::Alt\r\n#define SCI_META KeyMod::Meta\r\n#define SCI_SUPER KeyMod::Super\r\n#define SCI_CSHIFT (KeyMod::Ctrl | KeyMod::Shift)\r\n#define SCI_ASHIFT (KeyMod::Alt | KeyMod::Shift)\r\n\r\n/**\r\n */\r\nclass KeyModifiers {\r\npublic:\r\n\tScintilla::Keys key;\r\n\tScintilla::KeyMod modifiers;\r\n\tKeyModifiers() noexcept : key{}, modifiers(KeyMod::Norm) {\r\n\t};\r\n\tKeyModifiers(Scintilla::Keys key_, Scintilla::KeyMod modifiers_) noexcept : key(key_), modifiers(modifiers_) {\r\n\t}\r\n\tbool operator<(const KeyModifiers &other) const noexcept {\r\n\t\tif (key == other.key)\r\n\t\t\treturn modifiers < other.modifiers;\r\n\t\telse\r\n\t\t\treturn key < other.key;\r\n\t}\r\n};\r\n\r\n/**\r\n */\r\nclass KeyToCommand {\r\npublic:\r\n\tScintilla::Keys key;\r\n\tScintilla::KeyMod modifiers;\r\n\tScintilla::Message msg;\r\n};\r\n\r\n/**\r\n */\r\nclass KeyMap {\r\n\tstd::map<KeyModifiers, Scintilla::Message> kmap;\r\n\tstatic const KeyToCommand MapDefault[];\r\n\r\npublic:\r\n\tKeyMap();\r\n\tvoid Clear() noexcept;\r\n\tvoid AssignCmdKey(Scintilla::Keys key, Scintilla::KeyMod modifiers, Scintilla::Message msg);\r\n\tScintilla::Message Find(Scintilla::Keys key, Scintilla::KeyMod modifiers) const;\t// 0 returned on failure\r\n\tconst std::map<KeyModifiers, Scintilla::Message> &GetKeyMap() const noexcept;\r\n};\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/src/LineMarker.cxx",
    "content": "// Scintilla source code edit control\r\n/** @file LineMarker.cxx\r\n ** Defines the look of a line marker in the margin.\r\n **/\r\n// Copyright 1998-2011 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#include <cstring>\r\n#include <cmath>\r\n#include <cstdint>\r\n\r\n#include <stdexcept>\r\n#include <string>\r\n#include <string_view>\r\n#include <vector>\r\n#include <map>\r\n#include <optional>\r\n#include <algorithm>\r\n#include <iterator>\r\n#include <memory>\r\n\r\n#include \"ScintillaTypes.h\"\r\n\r\n#include \"Debugging.h\"\r\n#include \"Geometry.h\"\r\n\r\n#include \"Platform.h\"\r\n\r\n#include \"XPM.h\"\r\n#include \"LineMarker.h\"\r\n#include \"UniConversion.h\"\r\n\r\nusing namespace Scintilla;\r\nusing namespace Scintilla::Internal;\r\n\r\nLineMarker::LineMarker(const LineMarker &other) {\r\n\t// Defined to avoid pxpm and image being blindly copied, not as a complete copy constructor.\r\n\tmarkType = other.markType;\r\n\tfore = other.fore;\r\n\tback = other.back;\r\n\tbackSelected = other.backSelected;\r\n\tstrokeWidth = other.strokeWidth;\r\n\tlayer = other.layer;\r\n\talpha = other.alpha;\r\n\tif (other.pxpm)\r\n\t\tpxpm = std::make_unique<XPM>(*other.pxpm);\r\n\telse\r\n\t\tpxpm = nullptr;\r\n\tif (other.image)\r\n\t\timage = std::make_unique<RGBAImage>(*other.image);\r\n\telse\r\n\t\timage = nullptr;\r\n\tcustomDraw = other.customDraw;\r\n}\r\n\r\nLineMarker &LineMarker::operator=(const LineMarker &other) {\r\n\t// Defined to avoid pxpm and image being blindly copied, not as a complete assignment operator.\r\n\tif (this != &other) {\r\n\t\tmarkType = other.markType;\r\n\t\tfore = other.fore;\r\n\t\tback = other.back;\r\n\t\tbackSelected = other.backSelected;\r\n\t\tstrokeWidth = other.strokeWidth;\r\n\t\tlayer = other.layer;\r\n\t\talpha = other.alpha;\r\n\t\tif (other.pxpm)\r\n\t\t\tpxpm = std::make_unique<XPM>(*other.pxpm);\r\n\t\telse\r\n\t\t\tpxpm = nullptr;\r\n\t\tif (other.image)\r\n\t\t\timage = std::make_unique<RGBAImage>(*other.image);\r\n\t\telse\r\n\t\t\timage = nullptr;\r\n\t\tcustomDraw = other.customDraw;\r\n\t}\r\n\treturn *this;\r\n}\r\n\r\nColourRGBA LineMarker::BackWithAlpha() const noexcept {\r\n\treturn ColourRGBA(back, static_cast<int>(alpha));\r\n}\r\n\r\nvoid LineMarker::SetXPM(const char *textForm) {\r\n\tpxpm = std::make_unique<XPM>(textForm);\r\n\tmarkType = MarkerSymbol::Pixmap;\r\n}\r\n\r\nvoid LineMarker::SetXPM(const char *const *linesForm) {\r\n\tpxpm = std::make_unique<XPM>(linesForm);\r\n\tmarkType = MarkerSymbol::Pixmap;\r\n}\r\n\r\nvoid LineMarker::SetRGBAImage(Point sizeRGBAImage, float scale, const unsigned char *pixelsRGBAImage) {\r\n\timage = std::make_unique<RGBAImage>(static_cast<int>(sizeRGBAImage.x), static_cast<int>(sizeRGBAImage.y), scale, pixelsRGBAImage);\r\n\tmarkType = MarkerSymbol::RgbaImage;\r\n}\r\n\r\nnamespace {\r\n\r\nenum class Expansion { Minus, Plus };\r\nenum class Shape { Square, Circle };\r\n\r\nvoid DrawSymbol(Surface *surface, Shape shape, Expansion expansion, PRectangle rcSymbol, XYPOSITION widthStroke,\r\n\tColourRGBA colourFill, ColourRGBA colourFrame, ColourRGBA colourFrameRight, ColourRGBA colourExpansion) {\r\n\r\n\tconst FillStroke fillStroke(colourFill, colourFrame, widthStroke);\r\n\tconst PRectangle rcSymbolLeft = Side(rcSymbol, Edge::left, (rcSymbol.Width() + widthStroke) / 2.0f);\r\n\tsurface->SetClip(rcSymbolLeft);\r\n\tif (shape == Shape::Square) {\r\n\t\t// Hollowed square\r\n\t\tsurface->RectangleDraw(rcSymbol, fillStroke);\r\n\t} else {\r\n\t\tsurface->Ellipse(rcSymbol, fillStroke);\r\n\t}\r\n\tsurface->PopClip();\r\n\r\n\tconst FillStroke fillStrokeRight(colourFill, colourFrameRight, widthStroke);\r\n\tconst PRectangle rcSymbolRight = Side(rcSymbol, Edge::right, (rcSymbol.Width() - widthStroke) / 2.0f);\r\n\tsurface->SetClip(rcSymbolRight);\r\n\tif (shape == Shape::Square) {\r\n\t\tsurface->RectangleDraw(rcSymbol, fillStrokeRight);\r\n\t} else {\r\n\t\tsurface->Ellipse(rcSymbol, fillStrokeRight);\r\n\t}\r\n\tsurface->PopClip();\r\n\r\n\tconst PRectangle rcPlusMinus = rcSymbol.Inset(widthStroke + 1.0f);\r\n\tconst XYPOSITION armWidth = (rcPlusMinus.Width() - widthStroke) / 2.0f;\r\n\tconst XYPOSITION top = rcPlusMinus.top + armWidth;\r\n\tconst PRectangle rcH = PRectangle(\r\n\t\trcPlusMinus.left, top,\r\n\t\trcPlusMinus.right, top + widthStroke);\r\n\tsurface->FillRectangle(rcH, colourExpansion);\r\n\tif (expansion == Expansion::Plus) {\r\n\t\tconst XYPOSITION left = rcPlusMinus.left + armWidth;\r\n\t\tconst PRectangle rcV = PRectangle(\r\n\t\t\tleft, rcPlusMinus.top,\r\n\t\t\tleft + widthStroke, rcPlusMinus.bottom);\r\n\t\tsurface->FillRectangle(rcV, colourExpansion);\r\n\t}\r\n}\r\n\r\nvoid DrawTail(Surface *surface, XYPOSITION leftLine, XYPOSITION rightTail, XYPOSITION centreY, XYPOSITION widthSymbolStroke, ColourRGBA fill) {\r\n\tconst XYPOSITION slopeLength = 2.0f + widthSymbolStroke;\r\n\tconst XYPOSITION strokeTop = centreY + slopeLength;\r\n\tconst XYPOSITION halfWidth = widthSymbolStroke / 2.0f;\r\n\tconst XYPOSITION strokeMiddle = strokeTop + halfWidth;\r\n\tconst Point lines[] = {\r\n\t\t// Stick\r\n\t\tPoint(rightTail, strokeMiddle),\r\n\t\tPoint(leftLine + halfWidth + slopeLength, strokeMiddle),\r\n\t\t// Slope\r\n\t\tPoint(leftLine + widthSymbolStroke / 2.0f, centreY + halfWidth),\r\n\t};\r\n\tsurface->PolyLine(lines, std::size(lines), Stroke(fill, widthSymbolStroke));\r\n}\r\n\r\n}\r\n\r\nvoid LineMarker::DrawFoldingMark(Surface *surface, const PRectangle &rcWhole, FoldPart part) const {\r\n\t// Assume: edges of rcWhole are integers.\r\n\t// Code can only really handle integer strokeWidth.\r\n\r\n\tColourRGBA colourHead = back;\r\n\tColourRGBA colourBody = back;\r\n\tColourRGBA colourTail = back;\r\n\r\n\tswitch (part) {\r\n\tcase FoldPart::head:\r\n\tcase FoldPart::headWithTail:\r\n\t\tcolourHead = backSelected;\r\n\t\tcolourTail = backSelected;\r\n\t\tbreak;\r\n\tcase FoldPart::body:\r\n\t\tcolourHead = backSelected;\r\n\t\tcolourBody = backSelected;\r\n\t\tbreak;\r\n\tcase FoldPart::tail:\r\n\t\tcolourBody = backSelected;\r\n\t\tcolourTail = backSelected;\r\n\t\tbreak;\r\n\tdefault:\r\n\t\t// LineMarker::undefined\r\n\t\tbreak;\r\n\t}\r\n\r\n\tconst int pixelDivisions = surface->PixelDivisions();\r\n\r\n\t// Folding symbols should have equal height and width to be either a circle or square.\r\n\t// So find the minimum of width and height.\r\n\tconst XYPOSITION minDimension = std::floor(std::min(rcWhole.Width(), rcWhole.Height() - 2)) - 1;\r\n\r\n\t// If strokeWidth would take up too much of area reduce to reasonable width.\r\n\tconst XYPOSITION widthStroke = PixelAlignFloor(std::min(strokeWidth, minDimension / 5.0f), pixelDivisions);\r\n\r\n\t// To centre +/-, odd strokeWidth -> odd symbol width, even -> even\r\n\tconst XYPOSITION widthSymbol =\r\n\t\t((std::lround(minDimension * pixelDivisions) % 2) == (std::lround(widthStroke * pixelDivisions) % 2)) ?\r\n\t\tminDimension : minDimension - 1.0f / pixelDivisions;\r\n\r\n\tconst Point centre = PixelAlign(rcWhole.Centre(), pixelDivisions);\r\n\r\n\t// Folder symbols and lines follow some rules to join up, fit the pixel grid,\r\n\t// and avoid over-painting.\r\n\r\n\tconst XYPOSITION halfSymbol = std::round(widthSymbol / 2);\r\n\tconst Point topLeft(centre.x - halfSymbol, centre.y - halfSymbol);\r\n\tconst PRectangle rcSymbol(\r\n\t\ttopLeft.x, topLeft.y,\r\n\t\ttopLeft.x + widthSymbol, topLeft.y + widthSymbol);\r\n\tconst XYPOSITION leftLine = rcSymbol.Centre().x - widthStroke / 2.0f;\r\n\tconst XYPOSITION rightLine = leftLine + widthStroke;\r\n\r\n\t// This is the vertical line through the whole area which is subdivided\r\n\t// when there is a symbol on the line or the colour changes for highlighting.\r\n\tconst PRectangle rcVLine(leftLine, rcWhole.top, rightLine, rcWhole.bottom);\r\n\r\n\t// Portions of rcVLine above and below the symbol.\r\n\tconst PRectangle rcAboveSymbol = Clamp(rcVLine, Edge::bottom, rcSymbol.top);\r\n\tconst PRectangle rcBelowSymbol = Clamp(rcVLine, Edge::top, rcSymbol.bottom);\r\n\r\n\t// Projection to right.\r\n\tconst PRectangle rcStick(\r\n\t\trcVLine.right, centre.y + 1.0f - widthStroke,\r\n\t\trcWhole.right - 1, centre.y + 1.0f);\r\n\r\n\tswitch (markType) {\r\n\r\n\tcase MarkerSymbol::VLine:\r\n\t\tsurface->FillRectangle(rcVLine, colourBody);\r\n\t\tbreak;\r\n\r\n\tcase MarkerSymbol::LCorner:\r\n\t\tsurface->FillRectangle(Clamp(rcVLine, Edge::bottom, centre.y + 1.0f), colourTail);\r\n\t\tsurface->FillRectangle(rcStick, colourTail);\r\n\t\tbreak;\r\n\r\n\tcase MarkerSymbol::TCorner:\r\n\t\tsurface->FillRectangle(Clamp(rcVLine, Edge::bottom, centre.y + 1.0f), colourBody);\r\n\t\tsurface->FillRectangle(Clamp(rcVLine, Edge::top, centre.y + 1.0f), colourHead);\r\n\t\tsurface->FillRectangle(rcStick, colourTail);\r\n\t\tbreak;\r\n\r\n\t// CORNERCURVE cases divide slightly lower than CORNER to accommodate the curve\r\n\tcase MarkerSymbol::LCornerCurve:\r\n\t\tsurface->FillRectangle(Clamp(rcVLine, Edge::bottom, centre.y), colourTail);\r\n\t\tDrawTail(surface, leftLine, rcWhole.right - 1.0f, centre.y - widthStroke,\r\n\t\t\twidthStroke, colourTail);\r\n\t\tbreak;\r\n\r\n\tcase MarkerSymbol::TCornerCurve:\r\n\t\tsurface->FillRectangle(Clamp(rcVLine, Edge::bottom, centre.y), colourBody);\r\n\t\tsurface->FillRectangle(Clamp(rcVLine, Edge::top, centre.y), colourHead);\r\n\t\tDrawTail(surface, leftLine, rcWhole.right - 1.0f, centre.y - widthStroke,\r\n\t\t\twidthStroke, colourTail);\r\n\t\tbreak;\r\n\r\n\tcase MarkerSymbol::BoxPlus:\r\n\t\tDrawSymbol(surface, Shape::Square, Expansion::Plus, rcSymbol, widthStroke,\r\n\t\t\tfore, colourHead, colourHead, colourTail);\r\n\t\tbreak;\r\n\r\n\tcase MarkerSymbol::BoxPlusConnected: {\r\n\t\t\tconst ColourRGBA colourBelow = (part == FoldPart::headWithTail) ? colourTail : colourBody;\r\n\t\t\tsurface->FillRectangle(rcBelowSymbol, colourBelow);\r\n\t\t\tsurface->FillRectangle(rcAboveSymbol, colourBody);\r\n\r\n\t\t\tconst ColourRGBA colourRight = (part == FoldPart::body) ? colourTail : colourHead;\r\n\t\t\tDrawSymbol(surface, Shape::Square, Expansion::Plus, rcSymbol, widthStroke,\r\n\t\t\t\tfore, colourHead, colourRight, colourTail);\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase MarkerSymbol::BoxMinus:\r\n\t\tsurface->FillRectangle(rcBelowSymbol, colourHead);\r\n\t\tDrawSymbol(surface, Shape::Square, Expansion::Minus, rcSymbol, widthStroke,\r\n\t\t\tfore, colourHead, colourHead, colourTail);\r\n\t\tbreak;\r\n\r\n\tcase MarkerSymbol::BoxMinusConnected: {\r\n\t\t\tsurface->FillRectangle(rcBelowSymbol, colourHead);\r\n\t\t\tsurface->FillRectangle(rcAboveSymbol, colourBody);\r\n\r\n\t\t\tconst ColourRGBA colourRight = (part == FoldPart::body) ? colourTail : colourHead;\r\n\t\t\tDrawSymbol(surface, Shape::Square, Expansion::Minus, rcSymbol, widthStroke,\r\n\t\t\t\tfore, colourHead, colourRight, colourTail);\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase MarkerSymbol::CirclePlus:\r\n\t\tDrawSymbol(surface, Shape::Circle, Expansion::Plus, rcSymbol, widthStroke,\r\n\t\t\tfore, colourHead, colourHead, colourTail);\r\n\t\tbreak;\r\n\r\n\tcase MarkerSymbol::CirclePlusConnected: {\r\n\t\t\tconst ColourRGBA colourBelow = (part == FoldPart::headWithTail) ? colourTail : colourBody;\r\n\t\t\tsurface->FillRectangle(rcBelowSymbol, colourBelow);\r\n\t\t\tsurface->FillRectangle(rcAboveSymbol, colourBody);\r\n\r\n\t\t\tconst ColourRGBA colourRight = (part == FoldPart::body) ? colourTail : colourHead;\r\n\t\t\tDrawSymbol(surface, Shape::Circle, Expansion::Plus, rcSymbol, widthStroke,\r\n\t\t\t\tfore, colourHead, colourRight, colourTail);\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase MarkerSymbol::CircleMinus:\r\n\t\tsurface->FillRectangle(rcBelowSymbol, colourHead);\r\n\t\tDrawSymbol(surface, Shape::Circle, Expansion::Minus, rcSymbol, widthStroke,\r\n\t\t\tfore, colourHead, colourHead, colourTail);\r\n\t\tbreak;\r\n\r\n\tcase MarkerSymbol::CircleMinusConnected: {\r\n\t\t\tsurface->FillRectangle(rcBelowSymbol, colourHead);\r\n\t\t\tsurface->FillRectangle(rcAboveSymbol, colourBody);\r\n\t\t\tconst ColourRGBA colourRight = (part == FoldPart::body) ? colourTail : colourHead;\r\n\t\t\tDrawSymbol(surface, Shape::Circle, Expansion::Minus, rcSymbol, widthStroke,\r\n\t\t\t\tfore, colourHead, colourRight, colourTail);\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tdefault:\r\n\t\tbreak;\r\n\r\n\t}\r\n}\r\n\r\nvoid LineMarker::AlignedPolygon(Surface *surface, const Point *pts, size_t npts) const {\r\n\tconst XYPOSITION move = strokeWidth / 2.0;\r\n\tstd::vector<Point> points;\r\n\tstd::transform(pts, pts + npts, std::back_inserter(points), [=](Point pt) noexcept ->Point {\r\n\t\treturn Point(pt.x + move, pt.y + move);\r\n\t});\r\n\tsurface->Polygon(points.data(), std::size(points), FillStroke(back, fore, strokeWidth));\r\n}\r\n\r\nvoid LineMarker::Draw(Surface *surface, const PRectangle &rcWhole, const Font *fontForCharacter, FoldPart part, MarginType marginStyle) const {\r\n\t// This is to satisfy the changed API - eventually the stroke width will be exposed to clients\r\n\r\n\tif (customDraw) {\r\n\t\tcustomDraw(surface, rcWhole, fontForCharacter, static_cast<int>(part), marginStyle, this);\r\n\t\treturn;\r\n\t}\r\n\r\n\tif ((markType == MarkerSymbol::Pixmap) && (pxpm)) {\r\n\t\tpxpm->Draw(surface, rcWhole);\r\n\t\treturn;\r\n\t}\r\n\tif ((markType == MarkerSymbol::RgbaImage) && (image)) {\r\n\t\t// Make rectangle just large enough to fit image centred on centre of rcWhole\r\n\t\tPRectangle rcImage;\r\n\t\trcImage.top = ((rcWhole.top + rcWhole.bottom) - image->GetScaledHeight()) / 2;\r\n\t\trcImage.bottom = rcImage.top + image->GetScaledHeight();\r\n\t\trcImage.left = ((rcWhole.left + rcWhole.right) - image->GetScaledWidth()) / 2;\r\n\t\trcImage.right = rcImage.left + image->GetScaledWidth();\r\n\t\tsurface->DrawRGBAImage(rcImage, image->GetWidth(), image->GetHeight(), image->Pixels());\r\n\t\treturn;\r\n\t}\r\n\r\n\tif ((markType >= MarkerSymbol::VLine) && markType <= (MarkerSymbol::CircleMinusConnected)) {\r\n\t\tDrawFoldingMark(surface, rcWhole, part);\r\n\t\treturn;\r\n\t}\r\n\r\n\t// Restrict most shapes a bit\r\n\tconst PRectangle rc(rcWhole.left, rcWhole.top + 1, rcWhole.right, rcWhole.bottom - 1);\r\n\t// Ensure does not go beyond edge\r\n\tconst XYPOSITION minDim = std::min(rcWhole.Width(), rcWhole.Height() - 2) - 1;\r\n\r\n\tconst Point centre = rcWhole.Centre();\r\n\tXYPOSITION centreX = std::floor(centre.x);\r\n\tconst XYPOSITION centreY = std::floor(centre.y);\r\n\tconst XYPOSITION dimOn2 = std::floor(minDim / 2);\r\n\tconst XYPOSITION dimOn4 = std::floor(minDim / 4);\r\n\tconst XYPOSITION armSize = dimOn2 - 2;\r\n\tif (marginStyle == MarginType::Number || marginStyle == MarginType::Text || marginStyle == MarginType::RText) {\r\n\t\t// On textual margins move marker to the left to try to avoid overlapping the text\r\n\t\tcentreX = rcWhole.left + dimOn2 + 1;\r\n\t}\r\n\r\n\tswitch (markType) {\r\n\tcase MarkerSymbol::RoundRect: {\r\n\t\t\tPRectangle rcRounded = rc;\r\n\t\t\trcRounded.left = rc.left + 1;\r\n\t\t\trcRounded.right = rc.right - 1;\r\n\t\t\tsurface->RoundedRectangle(rcRounded, FillStroke(back, fore, strokeWidth));\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase MarkerSymbol::Circle: {\r\n\t\t\tconst PRectangle rcCircle = PRectangle(\r\n\t\t\t\t\t\t\t    centreX - dimOn2,\r\n\t\t\t\t\t\t\t    centreY - dimOn2,\r\n\t\t\t\t\t\t\t    centreX + dimOn2,\r\n\t\t\t\t\t\t\t    centreY + dimOn2);\r\n\t\t\tsurface->Ellipse(rcCircle, FillStroke(back, fore, strokeWidth));\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase MarkerSymbol::Arrow: {\r\n\t\t\tconst Point pts[] = {\r\n\t\t\t\tPoint(centreX - dimOn4, centreY - dimOn2),\r\n\t\t\t\tPoint(centreX - dimOn4, centreY + dimOn2),\r\n\t\t\t\tPoint(centreX + dimOn2 - dimOn4, centreY),\r\n\t\t\t};\r\n\t\t\tAlignedPolygon(surface, pts, std::size(pts));\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase MarkerSymbol::ArrowDown: {\r\n\t\t\tconst Point pts[] = {\r\n\t\t\t\tPoint(centreX - dimOn2, centreY - dimOn4),\r\n\t\t\t\tPoint(centreX + dimOn2, centreY - dimOn4),\r\n\t\t\t\tPoint(centreX, centreY + dimOn2 - dimOn4),\r\n\t\t\t};\r\n\t\t\tAlignedPolygon(surface, pts, std::size(pts));\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase MarkerSymbol::Plus: {\r\n\t\t\tconst Point pts[] = {\r\n\t\t\t\tPoint(centreX - armSize, centreY - 1),\r\n\t\t\t\tPoint(centreX - 1, centreY - 1),\r\n\t\t\t\tPoint(centreX - 1, centreY - armSize),\r\n\t\t\t\tPoint(centreX + 1, centreY - armSize),\r\n\t\t\t\tPoint(centreX + 1, centreY - 1),\r\n\t\t\t\tPoint(centreX + armSize, centreY - 1),\r\n\t\t\t\tPoint(centreX + armSize, centreY + 1),\r\n\t\t\t\tPoint(centreX + 1, centreY + 1),\r\n\t\t\t\tPoint(centreX + 1, centreY + armSize),\r\n\t\t\t\tPoint(centreX - 1, centreY + armSize),\r\n\t\t\t\tPoint(centreX - 1, centreY + 1),\r\n\t\t\t\tPoint(centreX - armSize, centreY + 1),\r\n\t\t\t};\r\n\t\t\tAlignedPolygon(surface, pts, std::size(pts));\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase MarkerSymbol::Minus: {\r\n\t\t\tconst Point pts[] = {\r\n\t\t\t\tPoint(centreX - armSize, centreY - 1),\r\n\t\t\t\tPoint(centreX + armSize, centreY - 1),\r\n\t\t\t\tPoint(centreX + armSize, centreY + 1),\r\n\t\t\t\tPoint(centreX - armSize, centreY + 1),\r\n\t\t\t};\r\n\t\t\tAlignedPolygon(surface, pts, std::size(pts));\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase MarkerSymbol::SmallRect: {\r\n\t\t\tPRectangle rcSmall;\r\n\t\t\trcSmall.left = rc.left + 1;\r\n\t\t\trcSmall.top = rc.top + 2;\r\n\t\t\trcSmall.right = rc.right - 1;\r\n\t\t\trcSmall.bottom = rc.bottom - 2;\r\n\t\t\tsurface->RectangleDraw(rcSmall, FillStroke(back, fore, strokeWidth));\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase MarkerSymbol::Empty:\r\n\tcase MarkerSymbol::Background:\r\n\tcase MarkerSymbol::Underline:\r\n\tcase MarkerSymbol::Available:\r\n\t\t// An invisible marker so don't draw anything\r\n\t\tbreak;\r\n\r\n\tcase MarkerSymbol::DotDotDot: {\r\n\t\t\tXYPOSITION right = static_cast<XYPOSITION>(centreX - 6);\r\n\t\t\tfor (int b = 0; b < 3; b++) {\r\n\t\t\t\tconst PRectangle rcBlob(right, rc.bottom - 4, right + 2, rc.bottom - 2);\r\n\t\t\t\tsurface->FillRectangle(rcBlob, fore);\r\n\t\t\t\tright += 5.0f;\r\n\t\t\t}\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase MarkerSymbol::Arrows: {\r\n\t\t\tXYPOSITION right = centreX - 4.0f + strokeWidth / 2.0f;\r\n\t\t\tconst XYPOSITION midY = centreY + strokeWidth / 2.0f;\r\n\t\t\tconst XYPOSITION armLength = std::round(dimOn2 - strokeWidth);\r\n\t\t\tfor (int b = 0; b < 3; b++) {\r\n\t\t\t\tconst Point pts[] = {\r\n\t\t\t\t\tPoint(right - armLength, midY - armLength),\r\n\t\t\t\t\tPoint(right, midY),\r\n\t\t\t\t\tPoint(right - armLength, midY + armLength)\r\n\t\t\t\t};\r\n\t\t\t\tsurface->PolyLine(pts, std::size(pts), Stroke(fore, strokeWidth));\r\n\t\t\t\tright += strokeWidth + 3.0f;\r\n\t\t\t}\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase MarkerSymbol::ShortArrow: {\r\n\t\t\tconst Point pts[] = {\r\n\t\t\t\tPoint(centreX, centreY + dimOn2),\r\n\t\t\t\tPoint(centreX + dimOn2, centreY),\r\n\t\t\t\tPoint(centreX, centreY - dimOn2),\r\n\t\t\t\tPoint(centreX, centreY - dimOn4),\r\n\t\t\t\tPoint(centreX - dimOn4, centreY - dimOn4),\r\n\t\t\t\tPoint(centreX - dimOn4, centreY + dimOn4),\r\n\t\t\t\tPoint(centreX, centreY + dimOn4),\r\n\t\t\t\tPoint(centreX, centreY + dimOn2),\r\n\t\t\t};\r\n\t\t\tAlignedPolygon(surface, pts, std::size(pts));\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase MarkerSymbol::FullRect:\r\n\t\tsurface->FillRectangle(rcWhole, back);\r\n\t\tbreak;\r\n\r\n\tcase MarkerSymbol::LeftRect: {\r\n\t\t\tPRectangle rcLeft = rcWhole;\r\n\t\t\trcLeft.right = rcLeft.left + 4;\r\n\t\t\tsurface->FillRectangle(rcLeft, back);\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase MarkerSymbol::Bar: {\r\n\t\t\tPRectangle rcBar = rcWhole;\r\n\t\t\tconst XYPOSITION widthBar = std::floor(rcWhole.Width() / 3.0);\r\n\t\t\trcBar.left = centreX - std::floor(widthBar / 2.0);\r\n\t\t\trcBar.right = rcBar.left + widthBar;\r\n\t\t\tsurface->SetClip(rcWhole);\r\n\t\t\tswitch (part) {\r\n\t\t\tcase LineMarker::FoldPart::headWithTail:\r\n\t\t\t\tsurface->RectangleDraw(rcBar, FillStroke(back, fore, strokeWidth));\r\n\t\t\t\tbreak;\r\n\t\t\tcase LineMarker::FoldPart::head:\r\n\t\t\t\trcBar.bottom += 5;\r\n\t\t\t\tsurface->RectangleDraw(rcBar, FillStroke(back, fore, strokeWidth));\r\n\t\t\t\tbreak;\r\n\t\t\tcase LineMarker::FoldPart::tail:\r\n\t\t\t\trcBar.top -= 5;\r\n\t\t\t\tsurface->RectangleDraw(rcBar, FillStroke(back, fore, strokeWidth));\r\n\t\t\t\tbreak;\r\n\t\t\tcase LineMarker::FoldPart::body:\r\n\t\t\t\trcBar.top -= 5;\r\n\t\t\t\trcBar.bottom += 5;\r\n\t\t\t\tsurface->RectangleDraw(rcBar, FillStroke(back, fore, strokeWidth));\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tsurface->PopClip();\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\r\n\tcase MarkerSymbol::Bookmark: {\r\n\t\t\tconst XYPOSITION halfHeight = std::floor(minDim / 3);\r\n\t\t\tconst Point pts[] = {\r\n\t\t\t\tPoint(rcWhole.left, centreY - halfHeight),\r\n\t\t\t\tPoint(rcWhole.right - strokeWidth - 2, centreY - halfHeight),\r\n\t\t\t\tPoint(rcWhole.right - strokeWidth - 2 - halfHeight, centreY),\r\n\t\t\t\tPoint(rcWhole.right - strokeWidth - 2, centreY + halfHeight),\r\n\t\t\t\tPoint(rcWhole.left, centreY + halfHeight),\r\n\t\t\t};\r\n\t\t\tAlignedPolygon(surface, pts, std::size(pts));\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase MarkerSymbol::VerticalBookmark: {\r\n\t\t\tconst XYPOSITION halfWidth = std::floor(minDim / 3);\r\n\t\t\tconst Point pts[] = {\r\n\t\t\t\tPoint(centreX - halfWidth, centreY - dimOn2),\r\n\t\t\t\tPoint(centreX + halfWidth, centreY - dimOn2),\r\n\t\t\t\tPoint(centreX + halfWidth, centreY + dimOn2),\r\n\t\t\t\tPoint(centreX, centreY + dimOn2 - halfWidth),\r\n\t\t\t\tPoint(centreX - halfWidth, centreY + dimOn2),\r\n\t\t\t};\r\n\t\t\tAlignedPolygon(surface, pts, std::size(pts));\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tdefault:\r\n\t\tif (markType >= MarkerSymbol::Character) {\r\n\t\t\tchar character[UTF8MaxBytes + 1] {};\r\n\t\t\tconst int uch = static_cast<int>(markType) - static_cast<int>(MarkerSymbol::Character);\r\n\t\t\tUTF8FromUTF32Character(uch, character);\r\n\t\t\tconst XYPOSITION width = surface->WidthTextUTF8(fontForCharacter, character);\r\n\t\t\tPRectangle rcText = rc;\r\n\t\t\trcText.left += (rc.Width() - width) / 2;\r\n\t\t\trcText.right = rcText.left + width;\r\n\t\t\tsurface->DrawTextNoClipUTF8(rcText, fontForCharacter, rcText.bottom - 2,\r\n\t\t\t\t\t\t character, fore, back);\r\n\t\t} else {\r\n\t\t\t// treat as MarkerSymbol::FullRect\r\n\t\t\tsurface->FillRectangle(rcWhole, back);\r\n\t\t}\r\n\t\tbreak;\r\n\t}\r\n}\r\n"
  },
  {
    "path": "scintilla/src/LineMarker.h",
    "content": "// Scintilla source code edit control\r\n/** @file LineMarker.h\r\n ** Defines the look of a line marker in the margin .\r\n **/\r\n// Copyright 1998-2011 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef LINEMARKER_H\r\n#define LINEMARKER_H\r\n\r\nnamespace Scintilla::Internal {\r\n\r\nclass XPM;\r\nclass RGBAImage;\r\n\r\ntypedef void (*DrawLineMarkerFn)(Surface *surface, const PRectangle &rcWhole, const Font *fontForCharacter, int tFold, Scintilla::MarginType marginStyle, const void *lineMarker);\r\n\r\n/**\r\n */\r\nclass LineMarker {\r\npublic:\r\n\tenum class FoldPart { undefined, head, body, tail, headWithTail };\r\n\r\n\tScintilla::MarkerSymbol markType = Scintilla::MarkerSymbol::Circle;\r\n\tColourRGBA fore = black;\r\n\tColourRGBA back = white;\r\n\tColourRGBA backSelected = ColourRGBA(maximumByte, 0, 0);\t// Red default\r\n\tScintilla::Layer layer = Scintilla::Layer::Base;\r\n\tScintilla::Alpha alpha = Scintilla::Alpha::NoAlpha;\r\n\tXYPOSITION strokeWidth = 1.0f;\r\n\tstd::unique_ptr<XPM> pxpm;\r\n\tstd::unique_ptr<RGBAImage> image;\r\n\t/** Some platforms, notably PLAT_CURSES, do not support Scintilla's native\r\n\t * Draw function for drawing line markers. Allow those platforms to override\r\n\t * it instead of creating a new method(s) in the Surface class that existing\r\n\t * platforms must implement as empty. */\r\n\tDrawLineMarkerFn customDraw = nullptr;\r\n\r\n\tLineMarker() noexcept = default;\r\n\tLineMarker(const LineMarker &other);\r\n\tLineMarker(LineMarker &&) noexcept = default;\r\n\tLineMarker &operator=(const LineMarker& other);\r\n\tLineMarker &operator=(LineMarker&&) noexcept = default;\r\n\tvirtual ~LineMarker() = default;\r\n\r\n\tColourRGBA BackWithAlpha() const noexcept;\r\n\r\n\tvoid SetXPM(const char *textForm);\r\n\tvoid SetXPM(const char *const *linesForm);\r\n\tvoid SetRGBAImage(Point sizeRGBAImage, float scale, const unsigned char *pixelsRGBAImage);\r\n\tvoid AlignedPolygon(Surface *surface, const Point *pts, size_t npts) const;\r\n\tvoid Draw(Surface *surface, const PRectangle &rcWhole, const Font *fontForCharacter, FoldPart part, Scintilla::MarginType marginStyle) const;\r\n\tvoid DrawFoldingMark(Surface *surface, const PRectangle &rcWhole, FoldPart part) const;\r\n};\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/src/MarginView.cxx",
    "content": "// Scintilla source code edit control\r\n/** @file MarginView.cxx\r\n ** Defines the appearance of the editor margin.\r\n **/\r\n// Copyright 1998-2014 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#include <cstddef>\r\n#include <cstdlib>\r\n#include <cstdint>\r\n#include <cassert>\r\n#include <cstring>\r\n#include <cstdio>\r\n#include <cmath>\r\n\r\n#include <stdexcept>\r\n#include <string>\r\n#include <string_view>\r\n#include <vector>\r\n#include <map>\r\n#include <set>\r\n#include <optional>\r\n#include <algorithm>\r\n#include <memory>\r\n\r\n#include \"ScintillaTypes.h\"\r\n#include \"ScintillaMessages.h\"\r\n#include \"ScintillaStructures.h\"\r\n#include \"ILoader.h\"\r\n#include \"ILexer.h\"\r\n\r\n#include \"Debugging.h\"\r\n#include \"Geometry.h\"\r\n#include \"Platform.h\"\r\n\r\n#include \"CharacterCategoryMap.h\"\r\n#include \"Position.h\"\r\n#include \"UniqueString.h\"\r\n#include \"SplitVector.h\"\r\n#include \"Partitioning.h\"\r\n#include \"RunStyles.h\"\r\n#include \"ContractionState.h\"\r\n#include \"CellBuffer.h\"\r\n#include \"KeyMap.h\"\r\n#include \"Indicator.h\"\r\n#include \"LineMarker.h\"\r\n#include \"Style.h\"\r\n#include \"ViewStyle.h\"\r\n#include \"CharClassify.h\"\r\n#include \"Decoration.h\"\r\n#include \"CaseFolder.h\"\r\n#include \"Document.h\"\r\n#include \"UniConversion.h\"\r\n#include \"Selection.h\"\r\n#include \"PositionCache.h\"\r\n#include \"EditModel.h\"\r\n#include \"MarginView.h\"\r\n#include \"EditView.h\"\r\n\r\nusing namespace Scintilla;\r\n\r\nnamespace Scintilla::Internal {\r\n\r\nvoid DrawWrapMarker(Surface *surface, PRectangle rcPlace,\r\n\tbool isEndMarker, ColourRGBA wrapColour) {\r\n\r\n\tconst XYPOSITION extraFinalPixel = surface->SupportsFeature(Supports::LineDrawsFinal) ? 0.0f : 1.0f;\r\n\r\n\tconst PRectangle rcAligned = PixelAlignOutside(rcPlace, surface->PixelDivisions());\r\n\r\n\tconst XYPOSITION widthStroke = std::floor(rcAligned.Width() / 6);\r\n\r\n\tconstexpr XYPOSITION xa = 1; // gap before start\r\n\tconst XYPOSITION w = rcAligned.Width() - xa - widthStroke;\r\n\r\n\t// isEndMarker -> x-mirrored symbol for start marker\r\n\r\n\tconst XYPOSITION x0 = isEndMarker ? rcAligned.left : rcAligned.right - widthStroke;\r\n\tconst XYPOSITION y0 = rcAligned.top;\r\n\r\n\tconst XYPOSITION dy = std::floor(rcAligned.Height() / 5);\r\n\tconst XYPOSITION y = std::floor(rcAligned.Height() / 2) + dy;\r\n\r\n\tstruct Relative {\r\n\t\tXYPOSITION xBase;\r\n\t\tint xDir;\r\n\t\tXYPOSITION yBase;\r\n\t\tint yDir;\r\n\t\tXYPOSITION halfWidth;\r\n\t\tPoint At(XYPOSITION xRelative, XYPOSITION yRelative) const noexcept {\r\n\t\t\treturn Point(xBase + xDir * xRelative + halfWidth, yBase + yDir * yRelative + halfWidth);\r\n\t\t}\r\n\t};\r\n\r\n\tconst Relative rel = { x0, isEndMarker ? 1 : -1, y0, 1, widthStroke / 2.0f };\r\n\r\n\t// arrow head\r\n\tconst Point head[] = {\r\n\t\trel.At(xa + dy, y - dy),\r\n\t\trel.At(xa, y),\r\n\t\trel.At(xa + dy + extraFinalPixel, y + dy + extraFinalPixel)\r\n\t};\r\n\tsurface->PolyLine(head, std::size(head), Stroke(wrapColour, widthStroke));\r\n\r\n\t// arrow body\r\n\tconst Point body[] = {\r\n\t\trel.At(xa, y),\r\n\t\trel.At(xa + w, y),\r\n\t\trel.At(xa + w, y - 2 * dy),\r\n\t\trel.At(xa, y - 2 * dy),\r\n\t};\r\n\tsurface->PolyLine(body, std::size(body), Stroke(wrapColour, widthStroke));\r\n}\r\n\r\nMarginView::MarginView() noexcept {\r\n\twrapMarkerPaddingRight = 3;\r\n\tcustomDrawWrapMarker = nullptr;\r\n}\r\n\r\nvoid MarginView::DropGraphics() noexcept {\r\n\tpixmapSelMargin.reset();\r\n\tpixmapSelPattern.reset();\r\n\tpixmapSelPatternOffset1.reset();\r\n}\r\n\r\nvoid MarginView::RefreshPixMaps(Surface *surfaceWindow, const ViewStyle &vsDraw) {\r\n\tif (!pixmapSelPattern) {\r\n\t\tconstexpr int patternSize = 8;\r\n\t\tpixmapSelPattern = surfaceWindow->AllocatePixMap(patternSize, patternSize);\r\n\t\tpixmapSelPatternOffset1 = surfaceWindow->AllocatePixMap(patternSize, patternSize);\r\n\t\t// This complex procedure is to reproduce the checkerboard dithered pattern used by windows\r\n\t\t// for scroll bars and Visual Studio for its selection margin. The colour of this pattern is half\r\n\t\t// way between the chrome colour and the chrome highlight colour making a nice transition\r\n\t\t// between the window chrome and the content area. And it works in low colour depths.\r\n\t\tconst PRectangle rcPattern = PRectangle::FromInts(0, 0, patternSize, patternSize);\r\n\r\n\t\t// Initialize default colours based on the chrome colour scheme.  Typically the highlight is white.\r\n\t\tColourRGBA colourFMFill = vsDraw.selbar;\r\n\t\tColourRGBA colourFMStripes = vsDraw.selbarlight;\r\n\r\n\t\tif (!(vsDraw.selbarlight == white)) {\r\n\t\t\t// User has chosen an unusual chrome colour scheme so just use the highlight edge colour.\r\n\t\t\t// (Typically, the highlight colour is white.)\r\n\t\t\tcolourFMFill = vsDraw.selbarlight;\r\n\t\t}\r\n\r\n\t\tif (vsDraw.foldmarginColour) {\r\n\t\t\t// override default fold margin colour\r\n\t\t\tcolourFMFill = *vsDraw.foldmarginColour;\r\n\t\t}\r\n\t\tif (vsDraw.foldmarginHighlightColour) {\r\n\t\t\t// override default fold margin highlight colour\r\n\t\t\tcolourFMStripes = *vsDraw.foldmarginHighlightColour;\r\n\t\t}\r\n\r\n\t\tpixmapSelPattern->FillRectangle(rcPattern, colourFMFill);\r\n\t\tpixmapSelPatternOffset1->FillRectangle(rcPattern, colourFMStripes);\r\n\t\tfor (int y = 0; y < patternSize; y++) {\r\n\t\t\tfor (int x = y % 2; x < patternSize; x += 2) {\r\n\t\t\t\tconst PRectangle rcPixel = PRectangle::FromInts(x, y, x + 1, y + 1);\r\n\t\t\t\tpixmapSelPattern->FillRectangle(rcPixel, colourFMStripes);\r\n\t\t\t\tpixmapSelPatternOffset1->FillRectangle(rcPixel, colourFMFill);\r\n\t\t\t}\r\n\t\t}\r\n\t\tpixmapSelPattern->FlushDrawing();\r\n\t\tpixmapSelPatternOffset1->FlushDrawing();\r\n\t}\r\n}\r\n\r\nnamespace {\r\n\r\nMarkerOutline SubstituteMarkerIfEmpty(MarkerOutline markerCheck, MarkerOutline markerDefault, const ViewStyle &vs) noexcept {\r\n\tif (vs.markers[static_cast<size_t>(markerCheck)].markType == MarkerSymbol::Empty)\r\n\t\treturn markerDefault;\r\n\treturn markerCheck;\r\n}\r\n\r\nconstexpr MarkerOutline TailFromNextLevel(FoldLevel levelNextNum) noexcept {\r\n\treturn (levelNextNum > FoldLevel::Base) ? MarkerOutline::FolderMidTail : MarkerOutline::FolderTail;\r\n}\r\n\r\nint FoldingMark(FoldLevel level, FoldLevel levelNext, bool firstSubLine, bool lastSubLine,\r\n\tbool isExpanded, bool needWhiteClosure, MarkerOutline folderOpenMid, MarkerOutline folderEnd) noexcept {\r\n\r\n\tconst FoldLevel levelNum = LevelNumberPart(level);\r\n\tconst FoldLevel levelNextNum = LevelNumberPart(levelNext);\r\n\r\n\tif (LevelIsHeader(level)) {\r\n\t\tif (firstSubLine) {\r\n\t\t\tif (levelNum < levelNextNum) {\r\n\t\t\t\tif (levelNum == FoldLevel::Base) {\r\n\t\t\t\t\treturn 1 << (isExpanded ? MarkerOutline::FolderOpen : MarkerOutline::Folder);\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn 1 << (isExpanded ? folderOpenMid : folderEnd);\r\n\t\t\t\t}\r\n\t\t\t} else if (levelNum > FoldLevel::Base) {\r\n\t\t\t\treturn 1 << MarkerOutline::FolderSub;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (levelNum < levelNextNum) {\r\n\t\t\t\tif (isExpanded) {\r\n\t\t\t\t\treturn 1 << MarkerOutline::FolderSub;\r\n\t\t\t\t} else if (levelNum > FoldLevel::Base) {\r\n\t\t\t\t\treturn 1 << MarkerOutline::FolderSub;\r\n\t\t\t\t}\r\n\t\t\t} else if (levelNum > FoldLevel::Base) {\r\n\t\t\t\treturn 1 << MarkerOutline::FolderSub;\r\n\t\t\t}\r\n\t\t}\r\n\t} else if (LevelIsWhitespace(level)) {\r\n\t\tif (needWhiteClosure) {\r\n\t\t\tif (LevelIsWhitespace(levelNext)) {\r\n\t\t\t\treturn 1 << MarkerOutline::FolderSub;\r\n\t\t\t} else {\r\n\t\t\t\treturn 1 << TailFromNextLevel(levelNextNum);\r\n\t\t\t}\r\n\t\t} else if (levelNum > FoldLevel::Base) {\r\n\t\t\tif (levelNextNum < levelNum) {\r\n\t\t\t\treturn 1 << TailFromNextLevel(levelNextNum);\r\n\t\t\t} else {\r\n\t\t\t\treturn 1 << MarkerOutline::FolderSub;\r\n\t\t\t}\r\n\t\t}\r\n\t} else if (levelNum > FoldLevel::Base) {\r\n\t\tif (levelNextNum < levelNum) {\r\n\t\t\tif (LevelIsWhitespace(levelNext)) {\r\n\t\t\t\treturn 1 << MarkerOutline::FolderSub;\r\n\t\t\t} else if (lastSubLine) {\r\n\t\t\t\treturn 1 << TailFromNextLevel(levelNextNum);\r\n\t\t\t} else {\r\n\t\t\t\treturn 1 << MarkerOutline::FolderSub;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\treturn 1 << MarkerOutline::FolderSub;\r\n\t\t}\r\n\t}\r\n\r\n\t// No folding mark on this line\r\n\treturn 0;\r\n}\r\n\r\nLineMarker::FoldPart PartForFoldHighlight(const HighlightDelimiter &highlightDelimiter, Sci::Line lineDoc, bool firstSubLine, bool headWithTail, bool isExpanded) noexcept {\r\n\tif (highlightDelimiter.IsFoldBlockHighlighted(lineDoc)) {\r\n\t\tif (highlightDelimiter.IsBodyOfFoldBlock(lineDoc)) {\r\n\t\t\treturn LineMarker::FoldPart::body;\r\n\t\t}\r\n\t\tif (highlightDelimiter.IsHeadOfFoldBlock(lineDoc)) {\r\n\t\t\tif (firstSubLine) {\r\n\t\t\t\treturn headWithTail ? LineMarker::FoldPart::headWithTail : LineMarker::FoldPart::head;\r\n\t\t\t}\r\n\t\t\tif (isExpanded || headWithTail) {\r\n\t\t\t\treturn LineMarker::FoldPart::body;\r\n\t\t\t}\r\n\t\t} else if (highlightDelimiter.IsTailOfFoldBlock(lineDoc)) {\r\n\t\t\treturn LineMarker::FoldPart::tail;\r\n\t\t}\r\n\t}\r\n\treturn LineMarker::FoldPart::undefined;\r\n}\r\n\r\nconstexpr LineMarker::FoldPart PartForBar(bool markBefore, bool markAfter) {\r\n\tif (markBefore) {\r\n\t\tif (markAfter) {\r\n\t\t\treturn LineMarker::FoldPart::body;\r\n\t\t}\r\n\t\treturn LineMarker::FoldPart::tail;\r\n\t}\r\n\tif (markAfter) {\r\n\t\treturn LineMarker::FoldPart::head;\r\n\t}\r\n\treturn LineMarker::FoldPart::headWithTail;\r\n}\r\n\r\n}\r\n\r\nvoid MarginView::PaintOneMargin(Surface *surface, PRectangle rc, PRectangle rcOneMargin, const MarginStyle &marginStyle,\r\n\tconst EditModel &model, const ViewStyle &vs) const {\r\n\tconst Point ptOrigin = model.GetVisibleOriginInMain();\r\n\tconst Sci::Line lineStartPaint = static_cast<Sci::Line>(rcOneMargin.top + ptOrigin.y) / vs.lineHeight;\r\n\tSci::Line visibleLine = model.TopLineOfMain() + lineStartPaint;\r\n\tXYPOSITION yposScreen = lineStartPaint * vs.lineHeight - ptOrigin.y;\r\n\t// Work out whether the top line is whitespace located after a\r\n\t// lessening of fold level which implies a 'fold tail' but which should not\r\n\t// be displayed until the last of a sequence of whitespace.\r\n\tbool needWhiteClosure = false;\r\n\tif (marginStyle.ShowsFolding()) {\r\n\t\tconst FoldLevel level = model.pdoc->GetFoldLevel(model.pcs->DocFromDisplay(visibleLine));\r\n\t\tif (LevelIsWhitespace(level)) {\r\n\t\t\tSci::Line lineBack = model.pcs->DocFromDisplay(visibleLine);\r\n\t\t\tFoldLevel levelPrev = level;\r\n\t\t\twhile ((lineBack > 0) && LevelIsWhitespace(levelPrev)) {\r\n\t\t\t\tlineBack--;\r\n\t\t\t\tlevelPrev = model.pdoc->GetFoldLevel(lineBack);\r\n\t\t\t}\r\n\t\t\tif (!LevelIsHeader(levelPrev)) {\r\n\t\t\t\tif (LevelNumber(level) < LevelNumber(levelPrev))\r\n\t\t\t\t\tneedWhiteClosure = true;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Old code does not know about new markers needed to distinguish all cases\r\n\tconst MarkerOutline folderOpenMid = SubstituteMarkerIfEmpty(MarkerOutline::FolderOpenMid,\r\n\t\tMarkerOutline::FolderOpen, vs);\r\n\tconst MarkerOutline folderEnd = SubstituteMarkerIfEmpty(MarkerOutline::FolderEnd,\r\n\t\tMarkerOutline::Folder, vs);\r\n\r\n\twhile ((visibleLine < model.pcs->LinesDisplayed()) && yposScreen < rc.bottom) {\r\n\r\n\t\tPLATFORM_ASSERT(visibleLine < model.pcs->LinesDisplayed());\r\n\t\tconst Sci::Line lineDoc = model.pcs->DocFromDisplay(visibleLine);\r\n\t\tPLATFORM_ASSERT((lineDoc == 0) || model.pcs->GetVisible(lineDoc));\r\n\t\tconst Sci::Line firstVisibleLine = model.pcs->DisplayFromDoc(lineDoc);\r\n\t\tconst Sci::Line lastVisibleLine = model.pcs->DisplayLastFromDoc(lineDoc);\r\n\t\tconst bool firstSubLine = visibleLine == firstVisibleLine;\r\n\t\tconst bool lastSubLine = visibleLine == lastVisibleLine;\r\n\r\n\t\tint marks = model.GetMark(lineDoc);\r\n\t\tif (!firstSubLine) {\r\n\t\t\t// Mask off non-continuing marks\r\n\t\t\tmarks = marks & vs.maskDrawWrapped;\r\n\t\t}\r\n\r\n\t\tbool headWithTail = false;\r\n\t\tbool isExpanded = false;\r\n\r\n\t\tif (marginStyle.ShowsFolding()) {\r\n\t\t\t// Decide which fold indicator should be displayed\r\n\t\t\tconst FoldLevel level = model.pdoc->GetFoldLevel(lineDoc);\r\n\t\t\tconst FoldLevel levelNext = model.pdoc->GetFoldLevel(lineDoc + 1);\r\n\t\t\tisExpanded = model.pcs->GetExpanded(lineDoc);\r\n\r\n\t\t\tmarks |= FoldingMark(level, levelNext, firstSubLine, lastSubLine,\r\n\t\t\t\tisExpanded, needWhiteClosure, folderOpenMid, folderEnd);\r\n\r\n\t\t\tconst FoldLevel levelNum = LevelNumberPart(level);\r\n\t\t\tconst FoldLevel levelNextNum = LevelNumberPart(levelNext);\r\n\r\n\t\t\t// Change needWhiteClosure and headWithTail if needed\r\n\t\t\tif (LevelIsHeader(level)) {\r\n\t\t\t\tneedWhiteClosure = false;\r\n\t\t\t\tif (!isExpanded) {\r\n\t\t\t\t\tconst Sci::Line firstFollowupLine = model.pcs->DocFromDisplay(model.pcs->DisplayFromDoc(lineDoc + 1));\r\n\t\t\t\t\tconst FoldLevel firstFollowupLineLevel = model.pdoc->GetFoldLevel(firstFollowupLine);\r\n\t\t\t\t\tconst FoldLevel secondFollowupLineLevelNum = LevelNumberPart(model.pdoc->GetFoldLevel(firstFollowupLine + 1));\r\n\t\t\t\t\tif (LevelIsWhitespace(firstFollowupLineLevel) &&\r\n\t\t\t\t\t\t(levelNum > secondFollowupLineLevelNum))\r\n\t\t\t\t\t\tneedWhiteClosure = true;\r\n\r\n\t\t\t\t\tif (highlightDelimiter.IsFoldBlockHighlighted(firstFollowupLine))\r\n\t\t\t\t\t\theadWithTail = true;\r\n\t\t\t\t}\r\n\t\t\t} else if (LevelIsWhitespace(level)) {\r\n\t\t\t\tif (needWhiteClosure) {\r\n\t\t\t\t\tneedWhiteClosure = LevelIsWhitespace(levelNext);\r\n\t\t\t\t}\r\n\t\t\t} else if (levelNum > FoldLevel::Base) {\r\n\t\t\t\tif (levelNextNum < levelNum) {\r\n\t\t\t\t\tneedWhiteClosure = LevelIsWhitespace(levelNext);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tconst PRectangle rcMarker(\r\n\t\t\trcOneMargin.left,\r\n\t\t\typosScreen,\r\n\t\t\trcOneMargin.right,\r\n\t\t\typosScreen + vs.lineHeight);\r\n\t\tif (marginStyle.style == MarginType::Number) {\r\n\t\t\tif (firstSubLine) {\r\n\t\t\t\tstd::string sNumber;\r\n\t\t\t\tif (lineDoc >= 0) {\r\n\t\t\t\t\tsNumber = std::to_string(lineDoc + 1);\r\n\t\t\t\t}\r\n\t\t\t\tif (FlagSet(model.foldFlags, (FoldFlag::LevelNumbers | FoldFlag::LineState))) {\r\n\t\t\t\t\tchar number[100] = \"\";\r\n\t\t\t\t\tif (FlagSet(model.foldFlags, FoldFlag::LevelNumbers)) {\r\n\t\t\t\t\t\tconst FoldLevel lev = model.pdoc->GetFoldLevel(lineDoc);\r\n\t\t\t\t\t\tsnprintf(number,std::size(number), \"%c%c %03X %03X\",\r\n\t\t\t\t\t\t\tLevelIsHeader(lev) ? 'H' : '_',\r\n\t\t\t\t\t\t\tLevelIsWhitespace(lev) ? 'W' : '_',\r\n\t\t\t\t\t\t\tLevelNumber(lev),\r\n\t\t\t\t\t\t\tstatic_cast<unsigned int>(lev) >> 16\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tconst int state = model.pdoc->GetLineState(lineDoc);\r\n\t\t\t\t\t\tsnprintf(number, std::size(number), \"%0X\", state);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tsNumber = number;\r\n\t\t\t\t}\r\n\t\t\t\tPRectangle rcNumber = rcMarker;\r\n\t\t\t\t// Right justify\r\n\t\t\t\tconst XYPOSITION width = surface->WidthText(vs.styles[StyleLineNumber].font.get(), sNumber);\r\n\t\t\t\tconst XYPOSITION xpos = rcNumber.right - width - vs.marginNumberPadding;\r\n\t\t\t\trcNumber.left = xpos;\r\n\t\t\t\tDrawTextNoClipPhase(surface, rcNumber, vs.styles[StyleLineNumber],\r\n\t\t\t\t\trcNumber.top + vs.maxAscent, sNumber, DrawPhase::all);\r\n\t\t\t} else if (FlagSet(vs.wrap.visualFlags, WrapVisualFlag::Margin)) {\r\n\t\t\t\tPRectangle rcWrapMarker = rcMarker;\r\n\t\t\t\trcWrapMarker.right -= wrapMarkerPaddingRight;\r\n\t\t\t\trcWrapMarker.left = rcWrapMarker.right - vs.styles[StyleLineNumber].aveCharWidth;\r\n\t\t\t\tif (!customDrawWrapMarker) {\r\n\t\t\t\t\tDrawWrapMarker(surface, rcWrapMarker, false, vs.styles[StyleLineNumber].fore);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcustomDrawWrapMarker(surface, rcWrapMarker, false, vs.styles[StyleLineNumber].fore);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (marginStyle.style == MarginType::Text || marginStyle.style == MarginType::RText) {\r\n\t\t\tconst StyledText stMargin = model.pdoc->MarginStyledText(lineDoc);\r\n\t\t\tif (stMargin.text && ValidStyledText(vs, vs.marginStyleOffset, stMargin)) {\r\n\t\t\t\tif (firstSubLine) {\r\n\t\t\t\t\tsurface->FillRectangle(rcMarker,\r\n\t\t\t\t\t\tvs.styles[stMargin.StyleAt(0) + vs.marginStyleOffset].back);\r\n\t\t\t\t\tPRectangle rcText = rcMarker;\r\n\t\t\t\t\tif (marginStyle.style == MarginType::RText) {\r\n\t\t\t\t\t\tconst int width = WidestLineWidth(surface, vs, vs.marginStyleOffset, stMargin);\r\n\t\t\t\t\t\trcText.left = rcText.right - width - 3;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tDrawStyledText(surface, vs, vs.marginStyleOffset, rcText,\r\n\t\t\t\t\t\tstMargin, 0, stMargin.length, DrawPhase::all);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// if we're displaying annotation lines, colour the margin to match the associated document line\r\n\t\t\t\t\tconst int annotationLines = model.pdoc->AnnotationLines(lineDoc);\r\n\t\t\t\t\tif (annotationLines && (visibleLine > lastVisibleLine - annotationLines)) {\r\n\t\t\t\t\t\tsurface->FillRectangle(rcMarker, vs.styles[stMargin.StyleAt(0) + vs.marginStyleOffset].back);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tmarks &= marginStyle.mask;\r\n\r\n\t\tif (marks) {\r\n\t\t\t// Draw all the bar markers first so they are underneath as they often cover\r\n\t\t\t// multiple lines for change history and other markers mark individual lines.\r\n\t\t\tint marksBar = marks;\r\n\t\t\tfor (int markBit = 0; (markBit <= MarkerMax) && marksBar; markBit++) {\r\n\t\t\t\tif ((marksBar & 1) && (vs.markers[markBit].markType == MarkerSymbol::Bar)) {\r\n\t\t\t\t\tconst int mask = 1 << markBit;\r\n\t\t\t\t\tconst bool markBefore = firstSubLine ? (model.GetMark(lineDoc - 1) & mask) : true;\r\n\t\t\t\t\tconst bool markAfter = lastSubLine ? (model.GetMark(lineDoc + 1) & mask) : true;\r\n\t\t\t\t\tvs.markers[markBit].Draw(surface, rcMarker, vs.styles[StyleLineNumber].font.get(),\r\n\t\t\t\t\t\tPartForBar(markBefore, markAfter), marginStyle.style);\r\n\t\t\t\t}\r\n\t\t\t\tmarksBar >>= 1;\r\n\t\t\t}\r\n\t\t\t// Draw all the other markers over the bar markers\r\n\t\t\tfor (int markBit = 0; (markBit <= MarkerMax) && marks; markBit++) {\r\n\t\t\t\tif ((marks & 1) && (vs.markers[markBit].markType != MarkerSymbol::Bar)) {\r\n\t\t\t\t\tconst LineMarker::FoldPart part = marginStyle.ShowsFolding() ?\r\n\t\t\t\t\t\tPartForFoldHighlight(highlightDelimiter, lineDoc, firstSubLine, headWithTail, isExpanded) :\r\n\t\t\t\t\t\tLineMarker::FoldPart::undefined;\r\n\t\t\t\t\tvs.markers[markBit].Draw(surface, rcMarker, vs.styles[StyleLineNumber].font.get(), part, marginStyle.style);\r\n\t\t\t\t}\r\n\t\t\t\tmarks >>= 1;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvisibleLine++;\r\n\t\typosScreen += vs.lineHeight;\r\n\t}\r\n}\r\n\r\nvoid MarginView::PaintMargin(Surface *surface, Sci::Line topLine, PRectangle rc, PRectangle rcMargin,\r\n\tconst EditModel &model, const ViewStyle &vs) {\r\n\r\n\tPRectangle rcOneMargin = rcMargin;\r\n\trcOneMargin.right = rcMargin.left;\r\n\tif (rcOneMargin.bottom < rc.bottom)\r\n\t\trcOneMargin.bottom = rc.bottom;\r\n\r\n\tconst Point ptOrigin = model.GetVisibleOriginInMain();\r\n\tfor (const MarginStyle &marginStyle : vs.ms) {\r\n\t\tif (marginStyle.width > 0) {\r\n\r\n\t\t\trcOneMargin.left = rcOneMargin.right;\r\n\t\t\trcOneMargin.right = rcOneMargin.left + marginStyle.width;\r\n\r\n\t\t\tif (marginStyle.style != MarginType::Number) {\r\n\t\t\t\tif (marginStyle.ShowsFolding()) {\r\n\t\t\t\t\t// Required because of special way brush is created for selection margin\r\n\t\t\t\t\t// Ensure patterns line up when scrolling with separate margin view\r\n\t\t\t\t\t// by choosing correctly aligned variant.\r\n\t\t\t\t\tconst bool invertPhase = static_cast<int>(ptOrigin.y) & 1;\r\n\t\t\t\t\tsurface->FillRectangle(rcOneMargin,\r\n\t\t\t\t\t\tinvertPhase ? *pixmapSelPattern : *pixmapSelPatternOffset1);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tColourRGBA colour;\r\n\t\t\t\t\tswitch (marginStyle.style) {\r\n\t\t\t\t\tcase MarginType::Back:\r\n\t\t\t\t\t\tcolour = vs.styles[StyleDefault].back;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase MarginType::Fore:\r\n\t\t\t\t\t\tcolour = vs.styles[StyleDefault].fore;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase MarginType::Colour:\r\n\t\t\t\t\t\tcolour = marginStyle.back;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tcolour = vs.styles[StyleLineNumber].back;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tsurface->FillRectangle(rcOneMargin, colour);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tsurface->FillRectangle(rcOneMargin, vs.styles[StyleLineNumber].back);\r\n\t\t\t}\r\n\r\n\t\t\tif (marginStyle.ShowsFolding() && highlightDelimiter.isEnabled) {\r\n\t\t\t\tconst Sci::Line lastLine = model.pcs->DocFromDisplay(topLine + model.LinesOnScreen()) + 1;\r\n\t\t\t\tmodel.pdoc->GetHighlightDelimiters(highlightDelimiter,\r\n\t\t\t\t\tmodel.pdoc->SciLineFromPosition(model.sel.MainCaret()), lastLine);\r\n\t\t\t}\r\n\r\n\t\t\tPaintOneMargin(surface, rc, rcOneMargin, marginStyle, model, vs);\r\n\t\t}\r\n\t}\r\n\r\n\tPRectangle rcBlankMargin = rcMargin;\r\n\trcBlankMargin.left = rcOneMargin.right;\r\n\tsurface->FillRectangle(rcBlankMargin, vs.styles[StyleDefault].back);\r\n}\r\n\r\n}\r\n\r\n"
  },
  {
    "path": "scintilla/src/MarginView.h",
    "content": "// Scintilla source code edit control\r\n/** @file MarginView.h\r\n ** Defines the appearance of the editor margin.\r\n **/\r\n// Copyright 1998-2014 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef MARGINVIEW_H\r\n#define MARGINVIEW_H\r\n\r\nnamespace Scintilla::Internal {\r\n\r\nvoid DrawWrapMarker(Surface *surface, PRectangle rcPlace, bool isEndMarker, ColourRGBA wrapColour);\r\n\r\ntypedef void (*DrawWrapMarkerFn)(Surface *surface, PRectangle rcPlace, bool isEndMarker, ColourRGBA wrapColour);\r\n\r\n/**\r\n* MarginView draws the margins.\r\n*/\r\nclass MarginView {\r\npublic:\r\n\tstd::unique_ptr<Surface> pixmapSelMargin;\r\n\tstd::unique_ptr<Surface> pixmapSelPattern;\r\n\tstd::unique_ptr<Surface> pixmapSelPatternOffset1;\r\n\t// Highlight current folding block\r\n\tHighlightDelimiter highlightDelimiter;\r\n\r\n\tint wrapMarkerPaddingRight; // right-most pixel padding of wrap markers\r\n\t/** Some platforms, notably PLAT_CURSES, do not support Scintilla's native\r\n\t * DrawWrapMarker function for drawing wrap markers. Allow those platforms to\r\n\t * override it instead of creating a new method in the Surface class that\r\n\t * existing platforms must implement as empty. */\r\n\tDrawWrapMarkerFn customDrawWrapMarker;\r\n\r\n\tMarginView() noexcept;\r\n\r\n\tvoid DropGraphics() noexcept;\r\n\tvoid RefreshPixMaps(Surface *surfaceWindow, const ViewStyle &vsDraw);\r\n\tvoid PaintOneMargin(Surface *surface, PRectangle rc, PRectangle rcOneMargin, const MarginStyle &marginStyle,\r\n\t\tconst EditModel &model, const ViewStyle &vs) const;\r\n\tvoid PaintMargin(Surface *surface, Sci::Line topLine, PRectangle rc, PRectangle rcMargin,\r\n\t\tconst EditModel &model, const ViewStyle &vs);\r\n};\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/src/Partitioning.h",
    "content": "// Scintilla source code edit control\r\n/** @file Partitioning.h\r\n ** Data structure used to partition an interval. Used for holding line start/end positions.\r\n **/\r\n// Copyright 1998-2007 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef PARTITIONING_H\r\n#define PARTITIONING_H\r\n\r\nnamespace Scintilla::Internal {\r\n\r\n/// Divide an interval into multiple partitions.\r\n/// Useful for breaking a document down into sections such as lines.\r\n/// A 0 length interval has a single 0 length partition, numbered 0\r\n/// If interval not 0 length then each partition non-zero length\r\n/// When needed, positions after the interval are considered part of the last partition\r\n/// but the end of the last partition can be found with PositionFromPartition(last+1).\r\n\r\ntemplate <typename T>\r\nclass Partitioning {\r\nprivate:\r\n\t// To avoid calculating all the partition positions whenever any text is inserted\r\n\t// there may be a step somewhere in the list.\r\n\tT stepPartition;\r\n\tT stepLength;\r\n\tSplitVector<T> body;\r\n\r\n\t// Deleted so SplitVectorWithRangeAdd objects can not be copied.\r\n\tvoid RangeAddDelta(T start, T end, T delta) noexcept {\r\n\t\t// end is 1 past end, so end-start is number of elements to change\r\n\t\tconst ptrdiff_t position = start;\r\n\t\tptrdiff_t i = 0;\r\n\t\tconst ptrdiff_t rangeLength = end - position;\r\n\t\tptrdiff_t range1Length = rangeLength;\r\n\t\tconst ptrdiff_t part1Left = body.GapPosition() - position;\r\n\t\tif (range1Length > part1Left)\r\n\t\t\trange1Length = part1Left;\r\n\t\tT *writer = &body[position];\r\n\t\twhile (i < range1Length) {\r\n\t\t\t*writer += delta;\r\n\t\t\twriter++;\r\n\t\t\ti++;\r\n\t\t}\r\n\t\tif (i < rangeLength) {\r\n\t\t\tT *writer2 = &body[position + i];\r\n\t\t\twhile (i < rangeLength) {\r\n\t\t\t\t*writer2 += delta;\r\n\t\t\t\twriter2++;\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Move step forward\r\n\tvoid ApplyStep(T partitionUpTo) noexcept {\r\n\t\tif (stepLength != 0) {\r\n\t\t\tRangeAddDelta(stepPartition+1, partitionUpTo + 1, stepLength);\r\n\t\t}\r\n\t\tstepPartition = partitionUpTo;\r\n\t\tif (stepPartition >= Partitions()) {\r\n\t\t\tstepPartition = Partitions();\r\n\t\t\tstepLength = 0;\r\n\t\t}\r\n\t}\r\n\r\n\t// Move step backward\r\n\tvoid BackStep(T partitionDownTo) noexcept {\r\n\t\tif (stepLength != 0) {\r\n\t\t\tRangeAddDelta(partitionDownTo+1, stepPartition+1, -stepLength);\r\n\t\t}\r\n\t\tstepPartition = partitionDownTo;\r\n\t}\r\n\r\npublic:\r\n\texplicit Partitioning(size_t growSize=8) : stepPartition(0), stepLength(0), body(growSize) {\r\n\t\tbody.Insert(0, 0);\t// This value stays 0 for ever\r\n\t\tbody.Insert(1, 0);\t// This is the end of the first partition and will be the start of the second\r\n\t}\r\n\r\n\tT Partitions() const noexcept {\r\n\t\treturn static_cast<T>(body.Length())-1;\r\n\t}\r\n\r\n\tvoid ReAllocate(ptrdiff_t newSize) {\r\n\t\t// + 1 accounts for initial element that is always 0.\r\n\t\tbody.ReAllocate(newSize + 1);\r\n\t}\r\n\r\n\tT Length() const noexcept {\r\n\t\treturn PositionFromPartition(Partitions());\r\n\t}\r\n\r\n\tvoid InsertPartition(T partition, T pos) {\r\n\t\tif (stepPartition < partition) {\r\n\t\t\tApplyStep(partition);\r\n\t\t}\r\n\t\tbody.Insert(partition, pos);\r\n\t\tstepPartition++;\r\n\t}\r\n\r\n\tvoid InsertPartitions(T partition, const T *positions, size_t length) {\r\n\t\tif (stepPartition < partition) {\r\n\t\t\tApplyStep(partition);\r\n\t\t}\r\n\t\tbody.InsertFromArray(partition, positions, 0, length);\r\n\t\tstepPartition += static_cast<T>(length);\r\n\t}\r\n\r\n\tvoid InsertPartitionsWithCast(T partition, const ptrdiff_t *positions, size_t length) {\r\n\t\t// Used for 64-bit builds when T is 32-bits\r\n\t\tif (stepPartition < partition) {\r\n\t\t\tApplyStep(partition);\r\n\t\t}\r\n\t\tT *pInsertion = body.InsertEmpty(partition, length);\r\n\t\tfor (size_t i = 0; i < length; i++) {\r\n\t\t\tpInsertion[i] = static_cast<T>(positions[i]);\r\n\t\t}\r\n\t\tstepPartition += static_cast<T>(length);\r\n\t}\r\n\r\n\tvoid SetPartitionStartPosition(T partition, T pos) noexcept {\r\n\t\tApplyStep(partition+1);\r\n\t\tif ((partition < 0) || (partition >= body.Length())) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tbody.SetValueAt(partition, pos);\r\n\t}\r\n\r\n\tvoid InsertText(T partitionInsert, T delta) noexcept {\r\n\t\t// Point all the partitions after the insertion point further along in the buffer\r\n\t\tif (stepLength != 0) {\r\n\t\t\tif (partitionInsert >= stepPartition) {\r\n\t\t\t\t// Fill in up to the new insertion point\r\n\t\t\t\tApplyStep(partitionInsert);\r\n\t\t\t\tstepLength += delta;\r\n\t\t\t} else if (partitionInsert >= (stepPartition - body.Length() / 10)) {\r\n\t\t\t\t// Close to step but before so move step back\r\n\t\t\t\tBackStep(partitionInsert);\r\n\t\t\t\tstepLength += delta;\r\n\t\t\t} else {\r\n\t\t\t\tApplyStep(Partitions());\r\n\t\t\t\tstepPartition = partitionInsert;\r\n\t\t\t\tstepLength = delta;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tstepPartition = partitionInsert;\r\n\t\t\tstepLength = delta;\r\n\t\t}\r\n\t}\r\n\r\n\tvoid RemovePartition(T partition) {\r\n\t\tif (partition > stepPartition) {\r\n\t\t\tApplyStep(partition);\r\n\t\t\tstepPartition--;\r\n\t\t} else {\r\n\t\t\tstepPartition--;\r\n\t\t}\r\n\t\tbody.Delete(partition);\r\n\t}\r\n\r\n\tT PositionFromPartition(T partition) const noexcept {\r\n\t\tPLATFORM_ASSERT(partition >= 0);\r\n\t\tPLATFORM_ASSERT(partition < body.Length());\r\n\t\tconst ptrdiff_t lengthBody = body.Length();\r\n\t\tif ((partition < 0) || (partition >= lengthBody)) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tT pos = body.ValueAt(partition);\r\n\t\tif (partition > stepPartition)\r\n\t\t\tpos += stepLength;\r\n\t\treturn pos;\r\n\t}\r\n\r\n\t/// Return value in range [0 .. Partitions() - 1] even for arguments outside interval\r\n\tT PartitionFromPosition(T pos) const noexcept {\r\n\t\tif (body.Length() <= 1)\r\n\t\t\treturn 0;\r\n\t\tif (pos >= (PositionFromPartition(Partitions())))\r\n\t\t\treturn Partitions() - 1;\r\n\t\tT lower = 0;\r\n\t\tT upper = Partitions();\r\n\t\tdo {\r\n\t\t\tconst T middle = (upper + lower + 1) / 2; \t// Round high\r\n\t\t\tT posMiddle = body.ValueAt(middle);\r\n\t\t\tif (middle > stepPartition)\r\n\t\t\t\tposMiddle += stepLength;\r\n\t\t\tif (pos < posMiddle) {\r\n\t\t\t\tupper = middle - 1;\r\n\t\t\t} else {\r\n\t\t\t\tlower = middle;\r\n\t\t\t}\r\n\t\t} while (lower < upper);\r\n\t\treturn lower;\r\n\t}\r\n\r\n\tvoid DeleteAll() {\r\n\t\tbody.DeleteAll();\r\n\t\tstepPartition = 0;\r\n\t\tstepLength = 0;\r\n\t\tbody.Insert(0, 0);\t// This value stays 0 for ever\r\n\t\tbody.Insert(1, 0);\t// This is the end of the first partition and will be the start of the second\r\n\t}\r\n\r\n\tvoid Check() const {\r\n#ifdef CHECK_CORRECTNESS\r\n\t\tif (Length() < 0) {\r\n\t\t\tthrow std::runtime_error(\"Partitioning: Length can not be negative.\");\r\n\t\t}\r\n\t\tif (Partitions() < 1) {\r\n\t\t\tthrow std::runtime_error(\"Partitioning: Must always have 1 or more partitions.\");\r\n\t\t}\r\n\t\tif (Length() == 0) {\r\n\t\t\tif ((PositionFromPartition(0) != 0) || (PositionFromPartition(1) != 0)) {\r\n\t\t\t\tthrow std::runtime_error(\"Partitioning: Invalid empty partitioning.\");\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t// Positions should be a strictly ascending sequence\r\n\t\t\tfor (T i = 0; i < Partitions(); i++) {\r\n\t\t\t\tconst T pos = PositionFromPartition(i);\r\n\t\t\t\tconst T posNext = PositionFromPartition(i+1);\r\n\t\t\t\tif (pos > posNext) {\r\n\t\t\t\t\tthrow std::runtime_error(\"Partitioning: Negative partition.\");\r\n\t\t\t\t} else if (pos == posNext) {\r\n\t\t\t\t\tthrow std::runtime_error(\"Partitioning: Empty partition.\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n#endif\r\n\t}\r\n\r\n};\r\n\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/src/PerLine.cxx",
    "content": "// Scintilla source code edit control\r\n/** @file PerLine.cxx\r\n ** Manages data associated with each line of the document\r\n **/\r\n// Copyright 1998-2009 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#include <cstddef>\r\n#include <cassert>\r\n#include <cstring>\r\n#include <cstdint>\r\n\r\n#include <stdexcept>\r\n#include <string_view>\r\n#include <vector>\r\n#include <forward_list>\r\n#include <optional>\r\n#include <algorithm>\r\n#include <memory>\r\n\r\n#include \"ScintillaTypes.h\"\r\n\r\n#include \"Debugging.h\"\r\n#include \"Geometry.h\"\r\n#include \"Platform.h\"\r\n\r\n#include \"Position.h\"\r\n#include \"SplitVector.h\"\r\n#include \"Partitioning.h\"\r\n#include \"CellBuffer.h\"\r\n#include \"PerLine.h\"\r\n\r\nusing namespace Scintilla::Internal;\r\n\r\nMarkerHandleSet::MarkerHandleSet() {\r\n}\r\n\r\nbool MarkerHandleSet::Empty() const noexcept {\r\n\treturn mhList.empty();\r\n}\r\n\r\nint MarkerHandleSet::MarkValue() const noexcept {\r\n\tunsigned int m = 0;\r\n\tfor (const MarkerHandleNumber &mhn : mhList) {\r\n\t\tm |= (1 << mhn.number);\r\n\t}\r\n\treturn m;\r\n}\r\n\r\nbool MarkerHandleSet::Contains(int handle) const noexcept {\r\n\tfor (const MarkerHandleNumber &mhn : mhList) {\r\n\t\tif (mhn.handle == handle) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\treturn false;\r\n}\r\n\r\nMarkerHandleNumber const *MarkerHandleSet::GetMarkerHandleNumber(int which) const noexcept {\r\n\tfor (const MarkerHandleNumber &mhn : mhList) {\r\n\t\tif (which == 0)\r\n\t\t\treturn &mhn;\r\n\t\twhich--;\r\n\t}\r\n\treturn nullptr;\r\n}\r\n\r\nbool MarkerHandleSet::InsertHandle(int handle, int markerNum) {\r\n\tmhList.push_front(MarkerHandleNumber(handle, markerNum));\r\n\treturn true;\r\n}\r\n\r\nvoid MarkerHandleSet::RemoveHandle(int handle) {\r\n\tmhList.remove_if([handle](const MarkerHandleNumber &mhn) noexcept { return mhn.handle == handle; });\r\n}\r\n\r\nbool MarkerHandleSet::RemoveNumber(int markerNum, bool all) {\r\n\tbool performedDeletion = false;\r\n\tmhList.remove_if([&](const MarkerHandleNumber &mhn) noexcept {\r\n\t\tif ((all || !performedDeletion) && (mhn.number == markerNum)) {\r\n\t\t\tperformedDeletion = true;\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t});\r\n\treturn performedDeletion;\r\n}\r\n\r\nvoid MarkerHandleSet::CombineWith(MarkerHandleSet *other) noexcept {\r\n\tmhList.splice_after(mhList.before_begin(), other->mhList);\r\n}\r\n\r\nvoid LineMarkers::Init() {\r\n\tmarkers.DeleteAll();\r\n}\r\n\r\nvoid LineMarkers::InsertLine(Sci::Line line) {\r\n\tif (markers.Length()) {\r\n\t\tmarkers.Insert(line, nullptr);\r\n\t}\r\n}\r\n\r\nvoid LineMarkers::InsertLines(Sci::Line line, Sci::Line lines) {\r\n\tif (markers.Length()) {\r\n\t\tmarkers.InsertEmpty(line, lines);\r\n\t}\r\n}\r\n\r\nvoid LineMarkers::RemoveLine(Sci::Line line) {\r\n\t// Retain the markers from the deleted line by oring them into the previous line\r\n\tif (markers.Length()) {\r\n\t\tif (line > 0) {\r\n\t\t\tMergeMarkers(line - 1);\r\n\t\t}\r\n\t\tmarkers.Delete(line);\r\n\t}\r\n}\r\n\r\nSci::Line LineMarkers::LineFromHandle(int markerHandle) const noexcept {\r\n\tfor (Sci::Line line = 0; line < markers.Length(); line++) {\r\n\t\tif (markers[line] && markers[line]->Contains(markerHandle)) {\r\n\t\t\treturn line;\r\n\t\t}\r\n\t}\r\n\treturn -1;\r\n}\r\n\r\nint LineMarkers::HandleFromLine(Sci::Line line, int which) const noexcept {\r\n\tif (markers.Length() && (line >= 0) && (line < markers.Length()) && markers[line]) {\r\n\t\tMarkerHandleNumber const *pnmh = markers[line]->GetMarkerHandleNumber(which);\r\n\t\treturn pnmh ? pnmh->handle : -1;\r\n\t}\r\n\treturn -1;\r\n}\r\n\r\nint LineMarkers::NumberFromLine(Sci::Line line, int which) const noexcept {\r\n\tif (markers.Length() && (line >= 0) && (line < markers.Length()) && markers[line]) {\r\n\t\tMarkerHandleNumber const *pnmh = markers[line]->GetMarkerHandleNumber(which);\r\n\t\treturn pnmh ? pnmh->number : -1;\r\n\t}\r\n\treturn -1;\r\n}\r\n\r\nvoid LineMarkers::MergeMarkers(Sci::Line line) {\r\n\tif (markers[line + 1]) {\r\n\t\tif (!markers[line])\r\n\t\t\tmarkers[line] = std::make_unique<MarkerHandleSet>();\r\n\t\tmarkers[line]->CombineWith(markers[line + 1].get());\r\n\t\tmarkers[line + 1].reset();\r\n\t}\r\n}\r\n\r\nint LineMarkers::MarkValue(Sci::Line line) const noexcept {\r\n\tif (markers.Length() && (line >= 0) && (line < markers.Length()) && markers[line])\r\n\t\treturn markers[line]->MarkValue();\r\n\telse\r\n\t\treturn 0;\r\n}\r\n\r\nSci::Line LineMarkers::MarkerNext(Sci::Line lineStart, int mask) const noexcept {\r\n\tif (lineStart < 0)\r\n\t\tlineStart = 0;\r\n\tconst Sci::Line length = markers.Length();\r\n\tfor (Sci::Line iLine = lineStart; iLine < length; iLine++) {\r\n\t\tconst MarkerHandleSet *onLine = markers[iLine].get();\r\n\t\tif (onLine && ((onLine->MarkValue() & mask) != 0))\r\n\t\t\treturn iLine;\r\n\t}\r\n\treturn -1;\r\n}\r\n\r\nint LineMarkers::AddMark(Sci::Line line, int markerNum, Sci::Line lines) {\r\n\thandleCurrent++;\r\n\tif (!markers.Length()) {\r\n\t\t// No existing markers so allocate one element per line\r\n\t\tmarkers.InsertEmpty(0, lines);\r\n\t}\r\n\tif (line >= markers.Length()) {\r\n\t\treturn -1;\r\n\t}\r\n\tif (!markers[line]) {\r\n\t\t// Need new structure to hold marker handle\r\n\t\tmarkers[line] = std::make_unique<MarkerHandleSet>();\r\n\t}\r\n\tmarkers[line]->InsertHandle(handleCurrent, markerNum);\r\n\r\n\treturn handleCurrent;\r\n}\r\n\r\nbool LineMarkers::DeleteMark(Sci::Line line, int markerNum, bool all) {\r\n\tbool someChanges = false;\r\n\tif (markers.Length() && (line >= 0) && (line < markers.Length()) && markers[line]) {\r\n\t\tif (markerNum == -1) {\r\n\t\t\tsomeChanges = true;\r\n\t\t\tmarkers[line].reset();\r\n\t\t} else {\r\n\t\t\tsomeChanges = markers[line]->RemoveNumber(markerNum, all);\r\n\t\t\tif (markers[line]->Empty()) {\r\n\t\t\t\tmarkers[line].reset();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn someChanges;\r\n}\r\n\r\nvoid LineMarkers::DeleteMarkFromHandle(int markerHandle) {\r\n\tconst Sci::Line line = LineFromHandle(markerHandle);\r\n\tif (line >= 0) {\r\n\t\tmarkers[line]->RemoveHandle(markerHandle);\r\n\t\tif (markers[line]->Empty()) {\r\n\t\t\tmarkers[line].reset();\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid LineLevels::Init() {\r\n\tlevels.DeleteAll();\r\n}\r\n\r\nvoid LineLevels::InsertLine(Sci::Line line) {\r\n\tif (levels.Length()) {\r\n\t\tconst int level = (line < levels.Length()) ? levels[line] : static_cast<int>(Scintilla::FoldLevel::Base);\r\n\t\tlevels.Insert(line, level);\r\n\t}\r\n}\r\n\r\nvoid LineLevels::InsertLines(Sci::Line line, Sci::Line lines) {\r\n\tif (levels.Length()) {\r\n\t\tconst int level = (line < levels.Length()) ? levels[line] : static_cast<int>(Scintilla::FoldLevel::Base);\r\n\t\tlevels.InsertValue(line, lines, level);\r\n\t}\r\n}\r\n\r\nvoid LineLevels::RemoveLine(Sci::Line line) {\r\n\tif (levels.Length()) {\r\n\t\t// Move up following lines but merge header flag from this line\r\n\t\t// to line before to avoid a temporary disappearance causing expansion.\r\n\t\tint firstHeader = levels[line] & static_cast<int>(Scintilla::FoldLevel::HeaderFlag);\r\n\t\tlevels.Delete(line);\r\n\t\tif (line == levels.Length()-1) // Last line loses the header flag\r\n\t\t\tlevels[line-1] &= ~static_cast<int>(Scintilla::FoldLevel::HeaderFlag);\r\n\t\telse if (line > 0)\r\n\t\t\tlevels[line-1] |= firstHeader;\r\n\t}\r\n}\r\n\r\nvoid LineLevels::ExpandLevels(Sci::Line sizeNew) {\r\n\tlevels.InsertValue(levels.Length(), sizeNew - levels.Length(), static_cast<int>(Scintilla::FoldLevel::Base));\r\n}\r\n\r\nvoid LineLevels::ClearLevels() {\r\n\tlevels.DeleteAll();\r\n}\r\n\r\nint LineLevels::SetLevel(Sci::Line line, int level, Sci::Line lines) {\r\n\tint prev = level;\r\n\tif ((line >= 0) && (line < lines)) {\r\n\t\tif (!levels.Length()) {\r\n\t\t\tExpandLevels(lines + 1);\r\n\t\t}\r\n\t\tprev = levels[line];\r\n\t\tlevels[line] = level;\r\n\t}\r\n\treturn prev;\r\n}\r\n\r\nint LineLevels::GetLevel(Sci::Line line) const noexcept {\r\n\tif ((line >= 0) && (line < levels.Length())) {\r\n\t\treturn levels[line];\r\n\t}\r\n\treturn static_cast<int>(Scintilla::FoldLevel::Base);\r\n}\r\n\r\nScintilla::FoldLevel LineLevels::GetFoldLevel(Sci::Line line) const noexcept {\r\n\tif ((line >= 0) && (line < levels.Length())) {\r\n\t\treturn static_cast<FoldLevel>(levels[line]);\r\n\t}\r\n\treturn Scintilla::FoldLevel::Base;\r\n}\r\n\r\nSci::Line LineLevels::GetFoldParent(Sci::Line line) const noexcept {\r\n\tconst FoldLevel level = LevelNumberPart(GetFoldLevel(line));\r\n\tfor (Sci::Line lineLook = line - 1; lineLook >= 0; lineLook--) {\r\n\t\tconst FoldLevel levelTry = GetFoldLevel(lineLook);\r\n\t\tif (LevelIsHeader(levelTry) && LevelNumberPart(levelTry) < level) {\r\n\t\t\treturn lineLook;\r\n\t\t}\r\n\t}\r\n\treturn -1;\r\n}\r\n\r\nvoid LineState::Init() {\r\n\tlineStates.DeleteAll();\r\n}\r\n\r\nvoid LineState::InsertLine(Sci::Line line) {\r\n\tif (lineStates.Length()) {\r\n\t\tlineStates.EnsureLength(line);\r\n\t\tconst int val = (line < lineStates.Length()) ? lineStates[line] : 0;\r\n\t\tlineStates.Insert(line, val);\r\n\t}\r\n}\r\n\r\nvoid LineState::InsertLines(Sci::Line line, Sci::Line lines) {\r\n\tif (lineStates.Length()) {\r\n\t\tlineStates.EnsureLength(line);\r\n\t\tconst int val = (line < lineStates.Length()) ? lineStates[line] : 0;\r\n\t\tlineStates.InsertValue(line, lines, val);\r\n\t}\r\n}\r\n\r\nvoid LineState::RemoveLine(Sci::Line line) {\r\n\tif (lineStates.Length() > line) {\r\n\t\tlineStates.Delete(line);\r\n\t}\r\n}\r\n\r\nint LineState::SetLineState(Sci::Line line, int state, Sci::Line lines) {\r\n\tint stateOld = state;\r\n\tif ((line >= 0) && (line < lines)) {\r\n\t\tlineStates.EnsureLength(lines + 1);\r\n\t\tstateOld = lineStates[line];\r\n\t\tlineStates[line] = state;\r\n\t}\r\n\treturn stateOld;\r\n}\r\n\r\nint LineState::GetLineState(Sci::Line line) {\r\n\tif (line < 0)\r\n\t\treturn 0;\r\n\tlineStates.EnsureLength(line + 1);\r\n\treturn lineStates[line];\r\n}\r\n\r\nSci::Line LineState::GetMaxLineState() const noexcept {\r\n\treturn lineStates.Length();\r\n}\r\n\r\n// Each allocated LineAnnotation is a char array which starts with an AnnotationHeader\r\n// and then has text and optional styles.\r\n\r\nstruct AnnotationHeader {\r\n\tshort style;\t// Style IndividualStyles implies array of styles\r\n\tshort lines;\r\n\tint length;\r\n};\r\n\r\nnamespace {\r\n\r\nconstexpr int IndividualStyles = 0x100;\r\n\r\nsize_t NumberLines(std::string_view sv) {\r\n\treturn std::count(sv.begin(), sv.end(), '\\n') + 1;\r\n}\r\n\r\nstd::unique_ptr<char[]>AllocateAnnotation(size_t length, int style) {\r\n\tconst size_t len = sizeof(AnnotationHeader) + length + ((style == IndividualStyles) ? length : 0);\r\n\treturn std::make_unique<char[]>(len);\r\n}\r\n\r\n}\r\n\r\nbool LineAnnotation::Empty() const noexcept {\r\n\treturn annotations.Length() == 0;\r\n}\r\n\r\nvoid LineAnnotation::Init() {\r\n\tClearAll();\r\n}\r\n\r\nvoid LineAnnotation::InsertLine(Sci::Line line) {\r\n\tif (annotations.Length()) {\r\n\t\tannotations.EnsureLength(line);\r\n\t\tannotations.Insert(line, std::unique_ptr<char []>());\r\n\t}\r\n}\r\n\r\nvoid LineAnnotation::InsertLines(Sci::Line line, Sci::Line lines) {\r\n\tif (annotations.Length()) {\r\n\t\tannotations.EnsureLength(line);\r\n\t\tannotations.InsertEmpty(line, lines);\r\n\t}\r\n}\r\n\r\nvoid LineAnnotation::RemoveLine(Sci::Line line) {\r\n\tif (annotations.Length() && (line > 0) && (line <= annotations.Length())) {\r\n\t\tannotations[line-1].reset();\r\n\t\tannotations.Delete(line-1);\r\n\t}\r\n}\r\n\r\nbool LineAnnotation::MultipleStyles(Sci::Line line) const noexcept {\r\n\tif (annotations.Length() && (line >= 0) && (line < annotations.Length()) && annotations[line])\r\n\t\treturn reinterpret_cast<AnnotationHeader *>(annotations[line].get())->style == IndividualStyles;\r\n\telse\r\n\t\treturn false;\r\n}\r\n\r\nint LineAnnotation::Style(Sci::Line line) const noexcept {\r\n\tif (annotations.Length() && (line >= 0) && (line < annotations.Length()) && annotations[line])\r\n\t\treturn reinterpret_cast<AnnotationHeader *>(annotations[line].get())->style;\r\n\telse\r\n\t\treturn 0;\r\n}\r\n\r\nconst char *LineAnnotation::Text(Sci::Line line) const noexcept {\r\n\tif (annotations.Length() && (line >= 0) && (line < annotations.Length()) && annotations[line])\r\n\t\treturn annotations[line].get()+sizeof(AnnotationHeader);\r\n\telse\r\n\t\treturn nullptr;\r\n}\r\n\r\nconst unsigned char *LineAnnotation::Styles(Sci::Line line) const noexcept {\r\n\tif (annotations.Length() && (line >= 0) && (line < annotations.Length()) && annotations[line] && MultipleStyles(line))\r\n\t\treturn reinterpret_cast<unsigned char *>(annotations[line].get() + sizeof(AnnotationHeader) + Length(line));\r\n\telse\r\n\t\treturn nullptr;\r\n}\r\n\r\nvoid LineAnnotation::SetText(Sci::Line line, const char *text) {\r\n\tif (text && (line >= 0)) {\r\n\t\tannotations.EnsureLength(line+1);\r\n\t\tconst int style = Style(line);\r\n\t\tannotations[line] = AllocateAnnotation(strlen(text), style);\r\n\t\tchar *pa = annotations[line].get();\r\n\t\tassert(pa);\r\n\t\tAnnotationHeader *pah = reinterpret_cast<AnnotationHeader *>(pa);\r\n\t\tpah->style = static_cast<short>(style);\r\n\t\tpah->length = static_cast<int>(strlen(text));\r\n\t\tpah->lines = static_cast<short>(NumberLines(text));\r\n\t\tmemcpy(pa+sizeof(AnnotationHeader), text, pah->length);\r\n\t} else {\r\n\t\tif (annotations.Length() && (line >= 0) && (line < annotations.Length()) && annotations[line]) {\r\n\t\t\tannotations[line].reset();\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid LineAnnotation::ClearAll() {\r\n\tannotations.DeleteAll();\r\n}\r\n\r\nvoid LineAnnotation::SetStyle(Sci::Line line, int style) {\r\n\tannotations.EnsureLength(line+1);\r\n\tif (!annotations[line]) {\r\n\t\tannotations[line] = AllocateAnnotation(0, style);\r\n\t}\r\n\treinterpret_cast<AnnotationHeader *>(annotations[line].get())->style = static_cast<short>(style);\r\n}\r\n\r\nvoid LineAnnotation::SetStyles(Sci::Line line, const unsigned char *styles) {\r\n\tif (line >= 0) {\r\n\t\tannotations.EnsureLength(line+1);\r\n\t\tif (!annotations[line]) {\r\n\t\t\tannotations[line] = AllocateAnnotation(0, IndividualStyles);\r\n\t\t} else {\r\n\t\t\tconst AnnotationHeader *pahSource = reinterpret_cast<AnnotationHeader *>(annotations[line].get());\r\n\t\t\tif (pahSource->style != IndividualStyles) {\r\n\t\t\t\tstd::unique_ptr<char[]>allocation = AllocateAnnotation(pahSource->length, IndividualStyles);\r\n\t\t\t\tAnnotationHeader *pahAlloc = reinterpret_cast<AnnotationHeader *>(allocation.get());\r\n\t\t\t\tpahAlloc->length = pahSource->length;\r\n\t\t\t\tpahAlloc->lines = pahSource->lines;\r\n\t\t\t\tmemcpy(allocation.get() + sizeof(AnnotationHeader), annotations[line].get() + sizeof(AnnotationHeader), pahSource->length);\r\n\t\t\t\tannotations[line] = std::move(allocation);\r\n\t\t\t}\r\n\t\t}\r\n\t\tAnnotationHeader *pah = reinterpret_cast<AnnotationHeader *>(annotations[line].get());\r\n\t\tpah->style = IndividualStyles;\r\n\t\tmemcpy(annotations[line].get() + sizeof(AnnotationHeader) + pah->length, styles, pah->length);\r\n\t}\r\n}\r\n\r\nint LineAnnotation::Length(Sci::Line line) const noexcept {\r\n\tif (annotations.Length() && (line >= 0) && (line < annotations.Length()) && annotations[line])\r\n\t\treturn reinterpret_cast<AnnotationHeader *>(annotations[line].get())->length;\r\n\telse\r\n\t\treturn 0;\r\n}\r\n\r\nint LineAnnotation::Lines(Sci::Line line) const noexcept {\r\n\tif (annotations.Length() && (line >= 0) && (line < annotations.Length()) && annotations[line])\r\n\t\treturn reinterpret_cast<AnnotationHeader *>(annotations[line].get())->lines;\r\n\telse\r\n\t\treturn 0;\r\n}\r\n\r\nvoid LineTabstops::Init() {\r\n\ttabstops.DeleteAll();\r\n}\r\n\r\nvoid LineTabstops::InsertLine(Sci::Line line) {\r\n\tif (tabstops.Length()) {\r\n\t\ttabstops.EnsureLength(line);\r\n\t\ttabstops.Insert(line, nullptr);\r\n\t}\r\n}\r\n\r\nvoid LineTabstops::InsertLines(Sci::Line line, Sci::Line lines) {\r\n\tif (tabstops.Length()) {\r\n\t\ttabstops.EnsureLength(line);\r\n\t\ttabstops.InsertEmpty(line, lines);\r\n\t}\r\n}\r\n\r\nvoid LineTabstops::RemoveLine(Sci::Line line) {\r\n\tif (tabstops.Length() > line) {\r\n\t\ttabstops[line].reset();\r\n\t\ttabstops.Delete(line);\r\n\t}\r\n}\r\n\r\nbool LineTabstops::ClearTabstops(Sci::Line line) noexcept {\r\n\tif (line < tabstops.Length()) {\r\n\t\tTabstopList *tl = tabstops[line].get();\r\n\t\tif (tl) {\r\n\t\t\ttl->clear();\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\treturn false;\r\n}\r\n\r\nbool LineTabstops::AddTabstop(Sci::Line line, int x) {\r\n\ttabstops.EnsureLength(line + 1);\r\n\tif (!tabstops[line]) {\r\n\t\ttabstops[line] = std::make_unique<TabstopList>();\r\n\t}\r\n\r\n\tTabstopList *tl = tabstops[line].get();\r\n\tif (tl) {\r\n\t\t// tabstop positions are kept in order - insert in the right place\r\n\t\tstd::vector<int>::iterator it = std::lower_bound(tl->begin(), tl->end(), x);\r\n\t\t// don't insert duplicates\r\n\t\tif (it == tl->end() || *it != x) {\r\n\t\t\ttl->insert(it, x);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\treturn false;\r\n}\r\n\r\nint LineTabstops::GetNextTabstop(Sci::Line line, int x) const noexcept {\r\n\tif (line < tabstops.Length()) {\r\n\t\tconst TabstopList *tl = tabstops[line].get();\r\n\t\tif (tl) {\r\n\t\t\tfor (const int i : *tl) {\r\n\t\t\t\tif (i > x) {\r\n\t\t\t\t\treturn i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn 0;\r\n}\r\n"
  },
  {
    "path": "scintilla/src/PerLine.h",
    "content": "// Scintilla source code edit control\r\n/** @file PerLine.h\r\n ** Manages data associated with each line of the document\r\n **/\r\n// Copyright 1998-2009 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef PERLINE_H\r\n#define PERLINE_H\r\n\r\nnamespace Scintilla::Internal {\r\n\r\n/**\r\n * This holds the marker identifier and the marker type to display.\r\n * MarkerHandleNumbers are members of lists.\r\n */\r\nstruct MarkerHandleNumber {\r\n\tint handle;\r\n\tint number;\r\n\tMarkerHandleNumber(int handle_, int number_) noexcept : handle(handle_), number(number_) {}\r\n};\r\n\r\n/**\r\n * A marker handle set contains any number of MarkerHandleNumbers.\r\n */\r\nclass MarkerHandleSet {\r\n\tstd::forward_list<MarkerHandleNumber> mhList;\r\n\r\npublic:\r\n\tMarkerHandleSet();\r\n\tbool Empty() const noexcept;\r\n\tint MarkValue() const noexcept;\t///< Bit set of marker numbers.\r\n\tbool Contains(int handle) const noexcept;\r\n\tbool InsertHandle(int handle, int markerNum);\r\n\tvoid RemoveHandle(int handle);\r\n\tbool RemoveNumber(int markerNum, bool all);\r\n\tvoid CombineWith(MarkerHandleSet *other) noexcept;\r\n\tMarkerHandleNumber const *GetMarkerHandleNumber(int which) const noexcept;\r\n};\r\n\r\nclass LineMarkers : public PerLine {\r\n\tSplitVector<std::unique_ptr<MarkerHandleSet>> markers;\r\n\t/// Handles are allocated sequentially and should never have to be reused as 32 bit ints are very big.\r\n\tint handleCurrent;\r\npublic:\r\n\tLineMarkers() : handleCurrent(0) {\r\n\t}\r\n\tvoid Init() override;\r\n\tvoid InsertLine(Sci::Line line) override;\r\n\tvoid InsertLines(Sci::Line line, Sci::Line lines) override;\r\n\tvoid RemoveLine(Sci::Line line) override;\r\n\r\n\tint MarkValue(Sci::Line line) const noexcept;\r\n\tSci::Line MarkerNext(Sci::Line lineStart, int mask) const noexcept;\r\n\tint AddMark(Sci::Line line, int markerNum, Sci::Line lines);\r\n\tvoid MergeMarkers(Sci::Line line);\r\n\tbool DeleteMark(Sci::Line line, int markerNum, bool all);\r\n\tvoid DeleteMarkFromHandle(int markerHandle);\r\n\tSci::Line LineFromHandle(int markerHandle) const noexcept;\r\n\tint HandleFromLine(Sci::Line line, int which) const noexcept;\r\n\tint NumberFromLine(Sci::Line line, int which) const noexcept;\r\n};\r\n\r\nclass LineLevels : public PerLine {\r\n\tSplitVector<int> levels;\r\npublic:\r\n\tLineLevels() {\r\n\t}\r\n\tvoid Init() override;\r\n\tvoid InsertLine(Sci::Line line) override;\r\n\tvoid InsertLines(Sci::Line line, Sci::Line lines) override;\r\n\tvoid RemoveLine(Sci::Line line) override;\r\n\r\n\tvoid ExpandLevels(Sci::Line sizeNew=-1);\r\n\tvoid ClearLevels();\r\n\tint SetLevel(Sci::Line line, int level, Sci::Line lines);\r\n\tint GetLevel(Sci::Line line) const noexcept;\r\n\tFoldLevel GetFoldLevel(Sci::Line line) const noexcept;\r\n\tSci::Line GetFoldParent(Sci::Line line) const noexcept;\r\n};\r\n\r\nclass LineState : public PerLine {\r\n\tSplitVector<int> lineStates;\r\npublic:\r\n\tLineState() {\r\n\t}\r\n\tvoid Init() override;\r\n\tvoid InsertLine(Sci::Line line) override;\r\n\tvoid InsertLines(Sci::Line line, Sci::Line lines) override;\r\n\tvoid RemoveLine(Sci::Line line) override;\r\n\r\n\tint SetLineState(Sci::Line line, int state, Sci::Line lines);\r\n\tint GetLineState(Sci::Line line);\r\n\tSci::Line GetMaxLineState() const noexcept;\r\n};\r\n\r\nclass LineAnnotation : public PerLine {\r\n\tSplitVector<std::unique_ptr<char []>> annotations;\r\npublic:\r\n\tLineAnnotation() {\r\n\t}\r\n\r\n\t[[nodiscard]] bool Empty() const noexcept;\r\n\tvoid Init() override;\r\n\tvoid InsertLine(Sci::Line line) override;\r\n\tvoid InsertLines(Sci::Line line, Sci::Line lines) override;\r\n\tvoid RemoveLine(Sci::Line line) override;\r\n\r\n\tbool MultipleStyles(Sci::Line line) const noexcept;\r\n\tint Style(Sci::Line line) const noexcept;\r\n\tconst char *Text(Sci::Line line) const noexcept;\r\n\tconst unsigned char *Styles(Sci::Line line) const noexcept;\r\n\tvoid SetText(Sci::Line line, const char *text);\r\n\tvoid ClearAll();\r\n\tvoid SetStyle(Sci::Line line, int style);\r\n\tvoid SetStyles(Sci::Line line, const unsigned char *styles);\r\n\tint Length(Sci::Line line) const noexcept;\r\n\tint Lines(Sci::Line line) const noexcept;\r\n};\r\n\r\ntypedef std::vector<int> TabstopList;\r\n\r\nclass LineTabstops : public PerLine {\r\n\tSplitVector<std::unique_ptr<TabstopList>> tabstops;\r\npublic:\r\n\tLineTabstops() {\r\n\t}\r\n\tvoid Init() override;\r\n\tvoid InsertLine(Sci::Line line) override;\r\n\tvoid InsertLines(Sci::Line line, Sci::Line lines) override;\r\n\tvoid RemoveLine(Sci::Line line) override;\r\n\r\n\tbool ClearTabstops(Sci::Line line) noexcept;\r\n\tbool AddTabstop(Sci::Line line, int x);\r\n\tint GetNextTabstop(Sci::Line line, int x) const noexcept;\r\n};\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/src/Platform.h",
    "content": "// Scintilla source code edit control\r\n/** @file Platform.h\r\n ** Interface to platform facilities. Also includes some basic utilities.\r\n ** Implemented in PlatGTK.cxx for GTK+/Linux, PlatWin.cxx for Windows, and PlatWX.cxx for wxWindows.\r\n **/\r\n// Copyright 1998-2009 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef PLATFORM_H\r\n#define PLATFORM_H\r\n\r\n// PLAT_GTK = GTK+ on Linux or Win32\r\n// PLAT_GTK_WIN32 is defined additionally when running PLAT_GTK under Win32\r\n// PLAT_WIN = Win32 API on Win32 OS\r\n// PLAT_WX is wxWindows on any supported platform\r\n// PLAT_TK = Tcl/TK on Linux or Win32\r\n\r\n#define PLAT_GTK 0\r\n#define PLAT_GTK_WIN32 0\r\n#define PLAT_GTK_MACOSX 0\r\n#define PLAT_MACOSX 0\r\n#define PLAT_WIN 0\r\n#define PLAT_WX  0\r\n#define PLAT_QT 0\r\n#define PLAT_QT_QML 0\r\n#define PLAT_FOX 0\r\n#define PLAT_CURSES 0\r\n#define PLAT_TK 0\r\n#define PLAT_HAIKU 0\r\n\r\n#if defined(FOX)\r\n#undef PLAT_FOX\r\n#define PLAT_FOX 1\r\n\r\n#elif defined(__WX__)\r\n#undef PLAT_WX\r\n#define PLAT_WX  1\r\n\r\n#elif defined(CURSES)\r\n#undef PLAT_CURSES\r\n#define PLAT_CURSES 1\r\n\r\n#elif defined(__HAIKU__)\r\n#undef PLAT_HAIKU\r\n#define PLAT_HAIKU 1\r\n\r\n#elif defined(SCINTILLA_QT)\r\n#undef PLAT_QT\r\n#define PLAT_QT 1\r\n\r\n#elif defined(SCINTILLA_QT_QML)\r\n#undef PLAT_QT_QML\r\n#define PLAT_QT_QML 1\r\n\r\n#elif defined(TK)\r\n#undef PLAT_TK\r\n#define PLAT_TK 1\r\n\r\n#elif defined(GTK)\r\n#undef PLAT_GTK\r\n#define PLAT_GTK 1\r\n\r\n#if defined(__WIN32__) || defined(_MSC_VER)\r\n#undef PLAT_GTK_WIN32\r\n#define PLAT_GTK_WIN32 1\r\n#endif\r\n\r\n#if defined(__APPLE__)\r\n#undef PLAT_GTK_MACOSX\r\n#define PLAT_GTK_MACOSX 1\r\n#endif\r\n\r\n#elif defined(__APPLE__)\r\n\r\n#undef PLAT_MACOSX\r\n#define PLAT_MACOSX 1\r\n\r\n#else\r\n#undef PLAT_WIN\r\n#define PLAT_WIN 1\r\n\r\n#endif\r\n\r\nnamespace Scintilla::Internal {\r\n\r\n// Underlying the implementation of the platform classes are platform specific types.\r\n// Sometimes these need to be passed around by client code so they are defined here\r\n\r\ntypedef void *SurfaceID;\r\ntypedef void *WindowID;\r\ntypedef void *MenuID;\r\ntypedef void *TickerID;\r\ntypedef void *Function;\r\ntypedef void *IdlerID;\r\n\r\n/**\r\n * Font management.\r\n */\r\n\r\nconstexpr const char *localeNameDefault = \"en-us\";\r\n\r\nstruct FontParameters {\r\n\tconst char *faceName;\r\n\tXYPOSITION size;\r\n\tScintilla::FontWeight weight;\r\n\tbool italic;\r\n\tScintilla::FontQuality extraFontFlag;\r\n\tScintilla::Technology technology;\r\n\tScintilla::CharacterSet characterSet;\r\n\tconst char *localeName;\r\n\r\n\tconstexpr FontParameters(\r\n\t\tconst char *faceName_,\r\n\t\tXYPOSITION size_=10,\r\n\t\tScintilla::FontWeight weight_= Scintilla::FontWeight::Normal,\r\n\t\tbool italic_=false,\r\n\t\tScintilla::FontQuality extraFontFlag_= Scintilla::FontQuality::QualityDefault,\r\n\t\tScintilla::Technology technology_= Scintilla::Technology::Default,\r\n\t\tScintilla::CharacterSet characterSet_= Scintilla::CharacterSet::Ansi,\r\n\t\tconst char *localeName_=localeNameDefault) noexcept :\r\n\r\n\t\tfaceName(faceName_),\r\n\t\tsize(size_),\r\n\t\tweight(weight_),\r\n\t\titalic(italic_),\r\n\t\textraFontFlag(extraFontFlag_),\r\n\t\ttechnology(technology_),\r\n\t\tcharacterSet(characterSet_),\r\n\t\tlocaleName(localeName_)\r\n\t{\r\n\t}\r\n\r\n};\r\n\r\nclass Font {\r\npublic:\r\n\tFont() noexcept = default;\r\n\t// Deleted so Font objects can not be copied\r\n\tFont(const Font &) = delete;\r\n\tFont(Font &&) = delete;\r\n\tFont &operator=(const Font &) = delete;\r\n\tFont &operator=(Font &&) = delete;\r\n\tvirtual ~Font() noexcept = default;\r\n\r\n\tstatic std::shared_ptr<Font> Allocate(const FontParameters &fp);\r\n};\r\n\r\nclass IScreenLine {\r\npublic:\r\n\tvirtual std::string_view Text() const = 0;\r\n\tvirtual size_t Length() const = 0;\r\n\tvirtual size_t RepresentationCount() const = 0;\r\n\tvirtual XYPOSITION Width() const = 0;\r\n\tvirtual XYPOSITION Height() const = 0;\r\n\tvirtual XYPOSITION TabWidth() const = 0;\r\n\tvirtual XYPOSITION TabWidthMinimumPixels() const = 0;\r\n\tvirtual const Font *FontOfPosition(size_t position) const = 0;\r\n\tvirtual XYPOSITION RepresentationWidth(size_t position) const = 0;\r\n\tvirtual XYPOSITION TabPositionAfter(XYPOSITION xPosition) const = 0;\r\n};\r\n\r\nclass IScreenLineLayout {\r\npublic:\r\n\tvirtual ~IScreenLineLayout() noexcept = default;\r\n\tvirtual size_t PositionFromX(XYPOSITION xDistance, bool charPosition) = 0;\r\n\tvirtual XYPOSITION XFromPosition(size_t caretPosition) = 0;\r\n\tvirtual std::vector<Interval> FindRangeIntervals(size_t start, size_t end) = 0;\r\n};\r\n\r\n/**\r\n * Parameters for surfaces.\r\n */\r\nstruct SurfaceMode {\r\n\tint codePage = 0;\r\n\tbool bidiR2L = false;\r\n\tSurfaceMode() = default;\r\n\texplicit SurfaceMode(int codePage_, bool bidiR2L_) noexcept : codePage(codePage_), bidiR2L(bidiR2L_) {\r\n\t}\r\n};\r\n\r\n/**\r\n * A surface abstracts a place to draw.\r\n */\r\nclass Surface {\r\npublic:\r\n\tSurface() noexcept = default;\r\n\tSurface(const Surface &) = delete;\r\n\tSurface(Surface &&) = delete;\r\n\tSurface &operator=(const Surface &) = delete;\r\n\tSurface &operator=(Surface &&) = delete;\r\n\tvirtual ~Surface() noexcept = default;\r\n\tstatic std::unique_ptr<Surface> Allocate(Scintilla::Technology technology);\r\n\r\n\tvirtual void Init(WindowID wid)=0;\r\n\tvirtual void Init(SurfaceID sid, WindowID wid)=0;\r\n\tvirtual std::unique_ptr<Surface> AllocatePixMap(int width, int height)=0;\r\n\r\n\tvirtual void SetMode(SurfaceMode mode)=0;\r\n\r\n\tenum class Ends {\r\n\t\tsemiCircles = 0x0,\r\n\t\tleftFlat = 0x1,\r\n\t\tleftAngle = 0x2,\r\n\t\trightFlat = 0x10,\r\n\t\trightAngle = 0x20,\r\n\t};\r\n\r\n\tvirtual void Release() noexcept=0;\r\n\tvirtual int SupportsFeature(Scintilla::Supports feature) noexcept=0;\r\n\tvirtual bool Initialised()=0;\r\n\tvirtual int LogPixelsY()=0;\r\n\tvirtual int PixelDivisions()=0;\r\n\tvirtual int DeviceHeightFont(int points)=0;\r\n\tvirtual void LineDraw(Point start, Point end, Stroke stroke)=0;\r\n\tvirtual void PolyLine(const Point *pts, size_t npts, Stroke stroke)=0;\r\n\tvirtual void Polygon(const Point *pts, size_t npts, FillStroke fillStroke)=0;\r\n\tvirtual void RectangleDraw(PRectangle rc, FillStroke fillStroke)=0;\r\n\tvirtual void RectangleFrame(PRectangle rc, Stroke stroke)=0;\r\n\tvirtual void FillRectangle(PRectangle rc, Fill fill)=0;\r\n\tvirtual void FillRectangleAligned(PRectangle rc, Fill fill)=0;\r\n\tvirtual void FillRectangle(PRectangle rc, Surface &surfacePattern)=0;\r\n\tvirtual void RoundedRectangle(PRectangle rc, FillStroke fillStroke)=0;\r\n\tvirtual void AlphaRectangle(PRectangle rc, XYPOSITION cornerSize, FillStroke fillStroke)=0;\r\n\tenum class GradientOptions { leftToRight, topToBottom };\r\n\tvirtual void GradientRectangle(PRectangle rc, const std::vector<ColourStop> &stops, GradientOptions options)=0;\r\n\tvirtual void DrawRGBAImage(PRectangle rc, int width, int height, const unsigned char *pixelsImage) = 0;\r\n\tvirtual void Ellipse(PRectangle rc, FillStroke fillStroke)=0;\r\n\tvirtual void Stadium(PRectangle rc, FillStroke fillStroke, Ends ends)=0;\r\n\tvirtual void Copy(PRectangle rc, Point from, Surface &surfaceSource)=0;\r\n\r\n\tvirtual std::unique_ptr<IScreenLineLayout> Layout(const IScreenLine *screenLine) = 0;\r\n\r\n\tvirtual void DrawTextNoClip(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, ColourRGBA fore, ColourRGBA back) = 0;\r\n\tvirtual void DrawTextClipped(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, ColourRGBA fore, ColourRGBA back) = 0;\r\n\tvirtual void DrawTextTransparent(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, ColourRGBA fore) = 0;\r\n\tvirtual void MeasureWidths(const Font *font_, std::string_view text, XYPOSITION *positions) = 0;\r\n\tvirtual XYPOSITION WidthText(const Font *font_, std::string_view text) = 0;\r\n\r\n\tvirtual void DrawTextNoClipUTF8(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, ColourRGBA fore, ColourRGBA back) = 0;\r\n\tvirtual void DrawTextClippedUTF8(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, ColourRGBA fore, ColourRGBA back) = 0;\r\n\tvirtual void DrawTextTransparentUTF8(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, ColourRGBA fore) = 0;\r\n\tvirtual void MeasureWidthsUTF8(const Font *font_, std::string_view text, XYPOSITION *positions) = 0;\r\n\tvirtual XYPOSITION WidthTextUTF8(const Font *font_, std::string_view text) = 0;\r\n\r\n\tvirtual XYPOSITION Ascent(const Font *font_)=0;\r\n\tvirtual XYPOSITION Descent(const Font *font_)=0;\r\n\tvirtual XYPOSITION InternalLeading(const Font *font_)=0;\r\n\tvirtual XYPOSITION Height(const Font *font_)=0;\r\n\tvirtual XYPOSITION AverageCharWidth(const Font *font_)=0;\r\n\r\n\tvirtual void SetClip(PRectangle rc)=0;\r\n\tvirtual void PopClip()=0;\r\n\tvirtual void FlushCachedState()=0;\r\n\tvirtual void FlushDrawing()=0;\r\n};\r\n\r\n/**\r\n * Class to hide the details of window manipulation.\r\n * Does not own the window which will normally have a longer life than this object.\r\n */\r\nclass Window {\r\nprotected:\r\n\tWindowID wid;\r\npublic:\r\n\tWindow() noexcept : wid(nullptr), cursorLast(Cursor::invalid) {\r\n\t}\r\n\tWindow(const Window &source) = delete;\r\n\tWindow(Window &&) = delete;\r\n\tWindow &operator=(WindowID wid_) noexcept {\r\n\t\twid = wid_;\r\n\t\tcursorLast = Cursor::invalid;\r\n\t\treturn *this;\r\n\t}\r\n\tWindow &operator=(const Window &) = delete;\r\n\tWindow &operator=(Window &&) = delete;\r\n\tvirtual ~Window() noexcept;\r\n\tWindowID GetID() const noexcept { return wid; }\r\n\tbool Created() const noexcept { return wid != nullptr; }\r\n\tvoid Destroy() noexcept;\r\n\tPRectangle GetPosition() const;\r\n\tvoid SetPosition(PRectangle rc);\r\n\tvoid SetPositionRelative(PRectangle rc, const Window *relativeTo);\r\n\tPRectangle GetClientPosition() const;\r\n\tvoid Show(bool show=true);\r\n\tvoid InvalidateAll();\r\n\tvoid InvalidateRectangle(PRectangle rc);\r\n\tenum class Cursor { invalid, text, arrow, up, wait, horizontal, vertical, reverseArrow, hand };\r\n\tvoid SetCursor(Cursor curs);\r\n\tPRectangle GetMonitorRect(Point pt);\r\nprivate:\r\n\tCursor cursorLast;\r\n};\r\n\r\n/**\r\n * Listbox management.\r\n */\r\n\r\n// ScintillaBase implements IListBoxDelegate to receive ListBoxEvents from a ListBox\r\n\r\nstruct ListBoxEvent {\r\n\tenum class EventType { selectionChange, doubleClick } event;\r\n\tListBoxEvent(EventType event_) noexcept : event(event_) {\r\n\t}\r\n};\r\n\r\nclass IListBoxDelegate {\r\npublic:\r\n\tvirtual void ListNotify(ListBoxEvent *plbe)=0;\r\n};\r\n\r\nstruct ListOptions {\r\n\tstd::optional<ColourRGBA> fore;\r\n\tstd::optional<ColourRGBA> back;\r\n\tstd::optional<ColourRGBA> foreSelected;\r\n\tstd::optional<ColourRGBA> backSelected;\r\n\tAutoCompleteOption options=AutoCompleteOption::Normal;\r\n};\r\n\r\nclass ListBox : public Window {\r\npublic:\r\n\tListBox() noexcept;\r\n\t~ListBox() noexcept override;\r\n\tstatic std::unique_ptr<ListBox> Allocate();\r\n\r\n\tvirtual void SetFont(const Font *font)=0;\r\n\tvirtual void Create(Window &parent, int ctrlID, Point location, int lineHeight_, bool unicodeMode_, Scintilla::Technology technology_)=0;\r\n\tvirtual void SetAverageCharWidth(int width)=0;\r\n\tvirtual void SetVisibleRows(int rows)=0;\r\n\tvirtual int GetVisibleRows() const=0;\r\n\tvirtual PRectangle GetDesiredRect()=0;\r\n\tvirtual int CaretFromEdge()=0;\r\n\tvirtual void Clear() noexcept=0;\r\n\tvirtual void Append(char *s, int type = -1)=0;\r\n\tvirtual int Length()=0;\r\n\tvirtual void Select(int n)=0;\r\n\tvirtual int GetSelection()=0;\r\n\tvirtual int Find(const char *prefix)=0;\r\n\tvirtual std::string GetValue(int n)=0;\r\n\tvirtual void RegisterImage(int type, const char *xpm_data)=0;\r\n\tvirtual void RegisterRGBAImage(int type, int width, int height, const unsigned char *pixelsImage) = 0;\r\n\tvirtual void ClearRegisteredImages()=0;\r\n\tvirtual void SetDelegate(IListBoxDelegate *lbDelegate)=0;\r\n\tvirtual void SetList(const char* list, char separator, char typesep)=0;\r\n\tvirtual void SetOptions(ListOptions options_)=0;\r\n};\r\n\r\n/**\r\n * Menu management.\r\n */\r\nclass Menu {\r\n\tMenuID mid;\r\npublic:\r\n\tMenu() noexcept;\r\n\tMenuID GetID() const noexcept { return mid; }\r\n\tvoid CreatePopUp();\r\n\tvoid Destroy() noexcept;\r\n\tvoid Show(Point pt, const Window &w);\r\n};\r\n\r\n/**\r\n * Platform namespace used to retrieve system wide parameters such as double click speed\r\n * and chrome colour.\r\n */\r\nnamespace Platform {\r\n\r\nColourRGBA Chrome();\r\nColourRGBA ChromeHighlight();\r\nconst char *DefaultFont();\r\nint DefaultFontSize();\r\nunsigned int DoubleClickTime();\r\nconstexpr long LongFromTwoShorts(short a,short b) noexcept {\r\n\treturn (a) | ((b) << 16);\r\n}\r\n\r\n}\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/src/Position.h",
    "content": "// Scintilla source code edit control\r\n/** @file Position.h\r\n ** Defines global type name Position in the Sci internal namespace.\r\n **/\r\n// Copyright 2015 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef POSITION_H\r\n#define POSITION_H\r\n\r\n/**\r\n * A Position is a position within a document between two characters or at the beginning or end.\r\n * Sometimes used as a character index where it identifies the character after the position.\r\n * A Line is a document or screen line.\r\n */\r\n\r\nnamespace Sci {\r\n\r\ntypedef ptrdiff_t Position;\r\ntypedef ptrdiff_t Line;\r\n\r\ninline constexpr Position invalidPosition = -1;\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/src/PositionCache.cxx",
    "content": "// Scintilla source code edit control\r\n/** @file PositionCache.cxx\r\n ** Classes for caching layout information.\r\n **/\r\n// Copyright 1998-2007 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#include <cstddef>\r\n#include <cstdlib>\r\n#include <cstdint>\r\n#include <cstring>\r\n#include <cmath>\r\n\r\n#include <stdexcept>\r\n#include <string>\r\n#include <string_view>\r\n#include <vector>\r\n#include <map>\r\n#include <set>\r\n#include <optional>\r\n#include <algorithm>\r\n#include <iterator>\r\n#include <memory>\r\n#include <mutex>\r\n\r\n#include \"ScintillaTypes.h\"\r\n#include \"ScintillaMessages.h\"\r\n#include \"ILoader.h\"\r\n#include \"ILexer.h\"\r\n\r\n#include \"Debugging.h\"\r\n#include \"Geometry.h\"\r\n#include \"Platform.h\"\r\n\r\n#include \"CharacterType.h\"\r\n#include \"CharacterCategoryMap.h\"\r\n#include \"Position.h\"\r\n#include \"UniqueString.h\"\r\n#include \"SplitVector.h\"\r\n#include \"Partitioning.h\"\r\n#include \"RunStyles.h\"\r\n#include \"ContractionState.h\"\r\n#include \"CellBuffer.h\"\r\n#include \"KeyMap.h\"\r\n#include \"Indicator.h\"\r\n#include \"LineMarker.h\"\r\n#include \"Style.h\"\r\n#include \"ViewStyle.h\"\r\n#include \"CharClassify.h\"\r\n#include \"Decoration.h\"\r\n#include \"CaseFolder.h\"\r\n#include \"Document.h\"\r\n#include \"UniConversion.h\"\r\n#include \"DBCS.h\"\r\n#include \"Selection.h\"\r\n#include \"PositionCache.h\"\r\n\r\nusing namespace Scintilla;\r\nusing namespace Scintilla::Internal;\r\n\r\nvoid BidiData::Resize(size_t maxLineLength_) {\r\n\tstylesFonts.resize(maxLineLength_ + 1);\r\n\twidthReprs.resize(maxLineLength_ + 1);\r\n}\r\n\r\nLineLayout::LineLayout(Sci::Line lineNumber_, int maxLineLength_) :\r\n\tlenLineStarts(0),\r\n\tlineNumber(lineNumber_),\r\n\tmaxLineLength(-1),\r\n\tnumCharsInLine(0),\r\n\tnumCharsBeforeEOL(0),\r\n\tvalidity(ValidLevel::invalid),\r\n\txHighlightGuide(0),\r\n\thighlightColumn(false),\r\n\tcontainsCaret(false),\r\n\tedgeColumn(0),\r\n\tbracePreviousStyles{},\r\n\twidthLine(wrapWidthInfinite),\r\n\tlines(1),\r\n\twrapIndent(0) {\r\n\tResize(maxLineLength_);\r\n}\r\n\r\nLineLayout::~LineLayout() {\r\n\tFree();\r\n}\r\n\r\nvoid LineLayout::Resize(int maxLineLength_) {\r\n\tif (maxLineLength_ > maxLineLength) {\r\n\t\tFree();\r\n\t\tconst size_t lineAllocation = maxLineLength_ + 1;\r\n\t\tchars = std::make_unique<char[]>(lineAllocation);\r\n\t\tstyles = std::make_unique<unsigned char []>(lineAllocation);\r\n\t\t// Extra position allocated as sometimes the Windows\r\n\t\t// GetTextExtentExPoint API writes an extra element.\r\n\t\tpositions = std::make_unique<XYPOSITION []>(lineAllocation + 1);\r\n\t\tif (bidiData) {\r\n\t\t\tbidiData->Resize(maxLineLength_);\r\n\t\t}\r\n\r\n\t\tmaxLineLength = maxLineLength_;\r\n\t}\r\n}\r\n\r\nvoid LineLayout::ReSet(Sci::Line lineNumber_, Sci::Position maxLineLength_) {\r\n\tlineNumber = lineNumber_;\r\n\tResize(static_cast<int>(maxLineLength_));\r\n\tlines = 0;\r\n\tInvalidate(ValidLevel::invalid);\r\n}\r\n\r\nvoid LineLayout::EnsureBidiData() {\r\n\tif (!bidiData) {\r\n\t\tbidiData = std::make_unique<BidiData>();\r\n\t\tbidiData->Resize(maxLineLength);\r\n\t}\r\n}\r\n\r\nvoid LineLayout::Free() noexcept {\r\n\tchars.reset();\r\n\tstyles.reset();\r\n\tpositions.reset();\r\n\tlineStarts.reset();\r\n\tlenLineStarts = 0;\r\n\tbidiData.reset();\r\n}\r\n\r\nvoid LineLayout::ClearPositions() {\r\n\tstd::fill(&positions[0], &positions[maxLineLength + 2], 0.0f);\r\n}\r\n\r\nvoid LineLayout::Invalidate(ValidLevel validity_) noexcept {\r\n\tif (validity > validity_)\r\n\t\tvalidity = validity_;\r\n}\r\n\r\nSci::Line LineLayout::LineNumber() const noexcept {\r\n\treturn lineNumber;\r\n}\r\n\r\nbool LineLayout::CanHold(Sci::Line lineDoc, int lineLength_) const noexcept {\r\n\treturn (lineNumber == lineDoc) && (lineLength_ <= maxLineLength);\r\n}\r\n\r\nint LineLayout::LineStart(int line) const noexcept {\r\n\tif (line <= 0) {\r\n\t\treturn 0;\r\n\t} else if ((line >= lines) || !lineStarts) {\r\n\t\treturn numCharsInLine;\r\n\t} else {\r\n\t\treturn lineStarts[line];\r\n\t}\r\n}\r\n\r\nint LineLayout::LineLength(int line) const noexcept {\r\n\tif (!lineStarts) {\r\n\t\treturn numCharsInLine;\r\n\t} if (line >= lines - 1) {\r\n\t\treturn numCharsInLine - lineStarts[line];\r\n\t} else {\r\n\t\treturn lineStarts[line + 1] - lineStarts[line];\r\n\t}\r\n}\r\n\r\nint LineLayout::LineLastVisible(int line, Scope scope) const noexcept {\r\n\tif (line < 0) {\r\n\t\treturn 0;\r\n\t} else if ((line >= lines-1) || !lineStarts) {\r\n\t\treturn scope == Scope::visibleOnly ? numCharsBeforeEOL : numCharsInLine;\r\n\t} else {\r\n\t\treturn lineStarts[line+1];\r\n\t}\r\n}\r\n\r\nRange LineLayout::SubLineRange(int subLine, Scope scope) const noexcept {\r\n\treturn Range(LineStart(subLine), LineLastVisible(subLine, scope));\r\n}\r\n\r\nbool LineLayout::InLine(int offset, int line) const noexcept {\r\n\treturn ((offset >= LineStart(line)) && (offset < LineStart(line + 1))) ||\r\n\t\t((offset == numCharsInLine) && (line == (lines-1)));\r\n}\r\n\r\nint LineLayout::SubLineFromPosition(int posInLine, PointEnd pe) const noexcept {\r\n\tif (!lineStarts || (posInLine > maxLineLength)) {\r\n\t\treturn lines - 1;\r\n\t}\r\n\r\n\tfor (int line = 0; line < lines; line++) {\r\n\t\tif (FlagSet(pe, PointEnd::subLineEnd)) {\r\n\t\t\t// Return subline not start of next\r\n\t\t\tif (lineStarts[line + 1] <= posInLine + 1)\r\n\t\t\t\treturn line;\r\n\t\t} else {\r\n\t\t\tif (lineStarts[line + 1] <= posInLine)\r\n\t\t\t\treturn line;\r\n\t\t}\r\n\t}\r\n\r\n\treturn lines - 1;\r\n}\r\n\r\nvoid LineLayout::AddLineStart(Sci::Position start) {\r\n\tlines++;\r\n\tif (lines >= lenLineStarts) {\r\n\t\tconst int newMaxLines = lines + 20;\r\n\t\tstd::unique_ptr<int[]> newLineStarts = std::make_unique<int[]>(newMaxLines);\r\n\t\tif (lenLineStarts) {\r\n\t\t\tstd::copy(lineStarts.get(), lineStarts.get() + lenLineStarts, newLineStarts.get());\r\n\t\t}\r\n\t\tlineStarts = std::move(newLineStarts);\r\n\t\tlenLineStarts = newMaxLines;\r\n\t}\r\n\tlineStarts[lines] = static_cast<int>(start);\r\n}\r\n\r\nvoid LineLayout::SetBracesHighlight(Range rangeLine, const Sci::Position braces[],\r\n                                    char bracesMatchStyle, int xHighlight, bool ignoreStyle) {\r\n\tif (!ignoreStyle && rangeLine.ContainsCharacter(braces[0])) {\r\n\t\tconst Sci::Position braceOffset = braces[0] - rangeLine.start;\r\n\t\tif (braceOffset < numCharsInLine) {\r\n\t\t\tbracePreviousStyles[0] = styles[braceOffset];\r\n\t\t\tstyles[braceOffset] = bracesMatchStyle;\r\n\t\t}\r\n\t}\r\n\tif (!ignoreStyle && rangeLine.ContainsCharacter(braces[1])) {\r\n\t\tconst Sci::Position braceOffset = braces[1] - rangeLine.start;\r\n\t\tif (braceOffset < numCharsInLine) {\r\n\t\t\tbracePreviousStyles[1] = styles[braceOffset];\r\n\t\t\tstyles[braceOffset] = bracesMatchStyle;\r\n\t\t}\r\n\t}\r\n\tif ((braces[0] >= rangeLine.start && braces[1] <= rangeLine.end) ||\r\n\t        (braces[1] >= rangeLine.start && braces[0] <= rangeLine.end)) {\r\n\t\txHighlightGuide = xHighlight;\r\n\t}\r\n}\r\n\r\nvoid LineLayout::RestoreBracesHighlight(Range rangeLine, const Sci::Position braces[], bool ignoreStyle) {\r\n\tif (!ignoreStyle && rangeLine.ContainsCharacter(braces[0])) {\r\n\t\tconst Sci::Position braceOffset = braces[0] - rangeLine.start;\r\n\t\tif (braceOffset < numCharsInLine) {\r\n\t\t\tstyles[braceOffset] = bracePreviousStyles[0];\r\n\t\t}\r\n\t}\r\n\tif (!ignoreStyle && rangeLine.ContainsCharacter(braces[1])) {\r\n\t\tconst Sci::Position braceOffset = braces[1] - rangeLine.start;\r\n\t\tif (braceOffset < numCharsInLine) {\r\n\t\t\tstyles[braceOffset] = bracePreviousStyles[1];\r\n\t\t}\r\n\t}\r\n\txHighlightGuide = 0;\r\n}\r\n\r\nint LineLayout::FindBefore(XYPOSITION x, Range range) const noexcept {\r\n\tSci::Position lower = range.start;\r\n\tSci::Position upper = range.end;\r\n\tdo {\r\n\t\tconst Sci::Position middle = (upper + lower + 1) / 2; \t// Round high\r\n\t\tconst XYPOSITION posMiddle = positions[middle];\r\n\t\tif (x < posMiddle) {\r\n\t\t\tupper = middle - 1;\r\n\t\t} else {\r\n\t\t\tlower = middle;\r\n\t\t}\r\n\t} while (lower < upper);\r\n\treturn static_cast<int>(lower);\r\n}\r\n\r\n\r\nint LineLayout::FindPositionFromX(XYPOSITION x, Range range, bool charPosition) const noexcept {\r\n\tint pos = FindBefore(x, range);\r\n\twhile (pos < range.end) {\r\n\t\tif (charPosition) {\r\n\t\t\tif (x < (positions[pos + 1])) {\r\n\t\t\t\treturn pos;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (x < ((positions[pos] + positions[pos + 1]) / 2)) {\r\n\t\t\t\treturn pos;\r\n\t\t\t}\r\n\t\t}\r\n\t\tpos++;\r\n\t}\r\n\treturn static_cast<int>(range.end);\r\n}\r\n\r\nPoint LineLayout::PointFromPosition(int posInLine, int lineHeight, PointEnd pe) const noexcept {\r\n\tPoint pt;\r\n\t// In case of very long line put x at arbitrary large position\r\n\tif (posInLine > maxLineLength) {\r\n\t\tpt.x = positions[maxLineLength] - positions[LineStart(lines)];\r\n\t}\r\n\r\n\tfor (int subLine = 0; subLine < lines; subLine++) {\r\n\t\tconst Range rangeSubLine = SubLineRange(subLine, Scope::visibleOnly);\r\n\t\tif (posInLine >= rangeSubLine.start) {\r\n\t\t\tpt.y = static_cast<XYPOSITION>(subLine*lineHeight);\r\n\t\t\tif (posInLine <= rangeSubLine.end) {\r\n\t\t\t\tpt.x = positions[posInLine] - positions[rangeSubLine.start];\r\n\t\t\t\tif (rangeSubLine.start != 0)\t// Wrapped lines may be indented\r\n\t\t\t\t\tpt.x += wrapIndent;\r\n\t\t\t\tif (FlagSet(pe, PointEnd::subLineEnd))\t// Return end of first subline not start of next\r\n\t\t\t\t\tbreak;\r\n\t\t\t} else if (FlagSet(pe, PointEnd::lineEnd) && (subLine == (lines-1))) {\r\n\t\t\t\tpt.x = positions[numCharsInLine] - positions[rangeSubLine.start];\r\n\t\t\t\tif (rangeSubLine.start != 0)\t// Wrapped lines may be indented\r\n\t\t\t\t\tpt.x += wrapIndent;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\treturn pt;\r\n}\r\n\r\nXYPOSITION LineLayout::XInLine(Sci::Position index) const noexcept {\r\n\t// For positions inside line return value from positions\r\n\t// For positions after line return last position + 1.0\r\n\tif (index <= numCharsInLine) {\r\n\t\treturn positions[index];\r\n\t}\r\n\treturn positions[numCharsInLine] + 1.0;\r\n}\r\n\r\nInterval LineLayout::Span(int start, int end) const noexcept {\r\n\treturn { positions[start], positions[end] };\r\n}\r\n\r\nInterval LineLayout::SpanByte(int index) const noexcept {\r\n\treturn Span(index, index+1);\r\n}\r\n\r\nint LineLayout::EndLineStyle() const noexcept {\r\n\treturn styles[numCharsBeforeEOL > 0 ? numCharsBeforeEOL-1 : 0];\r\n}\r\n\r\nvoid LineLayout::WrapLine(const Document *pdoc, Sci::Position posLineStart, Wrap wrapState, XYPOSITION wrapWidth) {\r\n\t// Document wants document positions but simpler to work in line positions\r\n\t// so take care of adding and subtracting line start in a lambda.\r\n\tauto CharacterBoundary = [=](Sci::Position i, Sci::Position moveDir) noexcept -> Sci::Position {\r\n\t\treturn pdoc->MovePositionOutsideChar(i + posLineStart, moveDir) - posLineStart;\r\n\t};\r\n\tlines = 0;\r\n\t// Calculate line start positions based upon width.\r\n\tSci::Position lastLineStart = 0;\r\n\tXYPOSITION startOffset = wrapWidth;\r\n\tSci::Position p = 0;\r\n\twhile (p < numCharsInLine) {\r\n\t\twhile (p < numCharsInLine && positions[p + 1] < startOffset) {\r\n\t\t\tp++;\r\n\t\t}\r\n\t\tif (p < numCharsInLine) {\r\n\t\t\t// backtrack to find lastGoodBreak\r\n\t\t\tSci::Position lastGoodBreak = p;\r\n\t\t\tif (p > 0) {\r\n\t\t\t\tlastGoodBreak = CharacterBoundary(p, -1);\r\n\t\t\t}\r\n\t\t\tif (wrapState != Wrap::Char) {\r\n\t\t\t\tSci::Position pos = lastGoodBreak;\r\n\t\t\t\twhile (pos > lastLineStart) {\r\n\t\t\t\t\t// style boundary and space\r\n\t\t\t\t\tif (wrapState != Wrap::WhiteSpace && (styles[pos - 1] != styles[pos])) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (IsBreakSpace(chars[pos - 1]) && !IsBreakSpace(chars[pos])) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tpos = CharacterBoundary(pos - 1, -1);\r\n\t\t\t\t}\r\n\t\t\t\tif (pos > lastLineStart) {\r\n\t\t\t\t\tlastGoodBreak = pos;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (lastGoodBreak == lastLineStart) {\r\n\t\t\t\t// Try moving to start of last character\r\n\t\t\t\tif (p > 0) {\r\n\t\t\t\t\tlastGoodBreak = CharacterBoundary(p, -1);\r\n\t\t\t\t}\r\n\t\t\t\tif (lastGoodBreak == lastLineStart) {\r\n\t\t\t\t\t// Ensure at least one character on line.\r\n\t\t\t\t\tlastGoodBreak = CharacterBoundary(lastGoodBreak + 1, 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tlastLineStart = lastGoodBreak;\r\n\t\t\tAddLineStart(lastLineStart);\r\n\t\t\tstartOffset = positions[lastLineStart];\r\n\t\t\t// take into account the space for start wrap mark and indent\r\n\t\t\tstartOffset += wrapWidth - wrapIndent;\r\n\t\t\tp = lastLineStart + 1;\r\n\t\t}\r\n\t}\r\n\tlines++;\r\n}\r\n\r\nScreenLine::ScreenLine(\r\n\tconst LineLayout *ll_,\r\n\tint subLine,\r\n\tconst ViewStyle &vs,\r\n\tXYPOSITION width_,\r\n\tint tabWidthMinimumPixels_) :\r\n\tll(ll_),\r\n\tstart(ll->LineStart(subLine)),\r\n\tlen(ll->LineLength(subLine)),\r\n\twidth(width_),\r\n\theight(static_cast<float>(vs.lineHeight)),\r\n\tctrlCharPadding(vs.ctrlCharPadding),\r\n\ttabWidth(vs.tabWidth),\r\n\ttabWidthMinimumPixels(tabWidthMinimumPixels_) {\r\n}\r\n\r\nScreenLine::~ScreenLine() {\r\n}\r\n\r\nstd::string_view ScreenLine::Text() const {\r\n\treturn std::string_view(&ll->chars[start], len);\r\n}\r\n\r\nsize_t ScreenLine::Length() const {\r\n\treturn len;\r\n}\r\n\r\nsize_t ScreenLine::RepresentationCount() const {\r\n\treturn std::count_if(&ll->bidiData->widthReprs[start],\r\n\t\t&ll->bidiData->widthReprs[start + len],\r\n\t\t[](XYPOSITION w) noexcept { return w > 0.0f; });\r\n}\r\n\r\nXYPOSITION ScreenLine::Width() const {\r\n\treturn width;\r\n}\r\n\r\nXYPOSITION ScreenLine::Height() const {\r\n\treturn height;\r\n}\r\n\r\nXYPOSITION ScreenLine::TabWidth() const {\r\n\treturn tabWidth;\r\n}\r\n\r\nXYPOSITION ScreenLine::TabWidthMinimumPixels() const {\r\n\treturn static_cast<XYPOSITION>(tabWidthMinimumPixels);\r\n}\r\n\r\nconst Font *ScreenLine::FontOfPosition(size_t position) const {\r\n\treturn ll->bidiData->stylesFonts[start + position].get();\r\n}\r\n\r\nXYPOSITION ScreenLine::RepresentationWidth(size_t position) const {\r\n\treturn ll->bidiData->widthReprs[start + position];\r\n}\r\n\r\nXYPOSITION ScreenLine::TabPositionAfter(XYPOSITION xPosition) const {\r\n\treturn (std::floor((xPosition + TabWidthMinimumPixels()) / TabWidth()) + 1) * TabWidth();\r\n}\r\n\r\nbool SignificantLines::LineMayCache(Sci::Line line) const noexcept {\r\n\tswitch (level) {\r\n\tcase LineCache::None:\r\n\t\treturn false;\r\n\tcase LineCache::Caret:\r\n\t\treturn line == lineCaret;\r\n\tcase LineCache::Page:\r\n\t\treturn (std::abs(line - lineCaret) < linesOnScreen) ||\r\n\t\t\t((line >= lineTop) && (line <= (lineTop + linesOnScreen)));\r\n\tcase LineCache::Document:\r\n\tdefault:\r\n\t\treturn true;\r\n\t}\r\n}\r\n\r\nLineLayoutCache::LineLayoutCache() :\r\n\tlevel(LineCache::None),\r\n\tmaxValidity(LineLayout::ValidLevel::invalid), styleClock(-1) {\r\n}\r\n\r\nLineLayoutCache::~LineLayoutCache() = default;\r\n\r\nnamespace {\r\n\r\nconstexpr size_t AlignUp(size_t value, size_t alignment) noexcept {\r\n\treturn ((value - 1) / alignment + 1) * alignment;\r\n}\r\n\r\nconstexpr size_t alignmentLLC = 20;\r\n\r\nconstexpr bool GraphicASCII(char ch) noexcept {\r\n\treturn ch >= ' ' && ch <= '~';\r\n}\r\n\r\nbool AllGraphicASCII(std::string_view text) {\r\n\treturn std::all_of(text.cbegin(), text.cend(), GraphicASCII);\r\n}\r\n\r\n}\r\n\r\n\r\nsize_t LineLayoutCache::EntryForLine(Sci::Line line) const noexcept {\r\n\tswitch (level) {\r\n\tcase LineCache::None:\r\n\t\treturn 0;\r\n\tcase LineCache::Caret:\r\n\t\treturn 0;\r\n\tcase LineCache::Page:\r\n\t\treturn 1 + (line % (cache.size() - 1));\r\n\tcase LineCache::Document:\r\n\t\treturn line;\r\n\t}\r\n\treturn 0;\r\n}\r\n\r\nvoid LineLayoutCache::AllocateForLevel(Sci::Line linesOnScreen, Sci::Line linesInDoc) {\r\n\tsize_t lengthForLevel = 0;\r\n\tif (level == LineCache::Caret) {\r\n\t\tlengthForLevel = 1;\r\n\t} else if (level == LineCache::Page) {\r\n\t\tlengthForLevel = AlignUp(linesOnScreen + 1, alignmentLLC);\r\n\t} else if (level == LineCache::Document) {\r\n\t\tlengthForLevel = AlignUp(linesInDoc, alignmentLLC);\r\n\t}\r\n\r\n\tif (lengthForLevel != cache.size()) {\r\n\t\tmaxValidity = LineLayout::ValidLevel::lines;\r\n\t\tcache.resize(lengthForLevel);\r\n\t\t// Cache::none -> no entries\r\n\t\t// Cache::caret -> 1 entry can take any line\r\n\t\t// Cache::document -> entry per line so each line in correct entry after resize\r\n\t\tif (level == LineCache::Page) {\r\n\t\t\t// Cache::page -> locates lines in particular entries which may be incorrect after\r\n\t\t\t// a resize so move them to correct entries.\r\n\t\t\tfor (size_t i = 1; i < cache.size();) {\r\n\t\t\t\tsize_t increment = 1;\r\n\t\t\t\tif (cache[i]) {\r\n\t\t\t\t\tconst size_t posForLine = EntryForLine(cache[i]->LineNumber());\r\n\t\t\t\t\tif (posForLine != i) {\r\n\t\t\t\t\t\tif (cache[posForLine]) {\r\n\t\t\t\t\t\t\tif (EntryForLine(cache[posForLine]->LineNumber()) == posForLine) {\r\n\t\t\t\t\t\t\t\t// [posForLine] already holds line that is in correct place\r\n\t\t\t\t\t\t\t\tcache[i].reset();\t// This line has nowhere to go so reset it.\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tstd::swap(cache[i], cache[posForLine]);\r\n\t\t\t\t\t\t\t\tincrement = 0;\r\n\t\t\t\t\t\t\t\t// Don't increment as newly swapped in value may have to move\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tcache[posForLine] = std::move(cache[i]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\ti += increment;\r\n\t\t\t}\r\n\r\n#ifdef CHECK_LLC\r\n\t\t\tfor (size_t i = 1; i < cache.size(); i++) {\r\n\t\t\t\tif (cache[i]) {\r\n\t\t\t\t\tPLATFORM_ASSERT(EntryForLine(cache[i]->LineNumber()) == i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n#endif\r\n\t\t}\r\n\t}\r\n\tPLATFORM_ASSERT(cache.size() == lengthForLevel);\r\n}\r\n\r\nvoid LineLayoutCache::Deallocate() noexcept {\r\n\tmaxValidity = LineLayout::ValidLevel::invalid;\r\n\tcache.clear();\r\n}\r\n\r\nvoid LineLayoutCache::Invalidate(LineLayout::ValidLevel validity_) noexcept {\r\n\tif (maxValidity > validity_) {\r\n\t\tmaxValidity = validity_;\r\n\t\tfor (const std::shared_ptr<LineLayout> &ll : cache) {\r\n\t\t\tif (ll) {\r\n\t\t\t\tll->Invalidate(validity_);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid LineLayoutCache::SetLevel(LineCache level_) noexcept {\r\n\tif (level != level_) {\r\n\t\tlevel = level_;\r\n\t\tmaxValidity = LineLayout::ValidLevel::invalid;\r\n\t\tcache.clear();\r\n\t}\r\n}\r\n\r\nstd::shared_ptr<LineLayout> LineLayoutCache::Retrieve(Sci::Line lineNumber, Sci::Line lineCaret, int maxChars, int styleClock_,\r\n                                      Sci::Line linesOnScreen, Sci::Line linesInDoc) {\r\n\tAllocateForLevel(linesOnScreen, linesInDoc);\r\n\tif (styleClock != styleClock_) {\r\n\t\tInvalidate(LineLayout::ValidLevel::checkTextAndStyle);\r\n\t\tstyleClock = styleClock_;\r\n\t}\r\n\tmaxValidity = LineLayout::ValidLevel::lines;\r\n\tsize_t pos = 0;\r\n\tif (level == LineCache::Page) {\r\n\t\t// If first entry is this line then just reuse it.\r\n\t\tif (!(cache[0] && (cache[0]->LineNumber() == lineNumber))) {\r\n\t\t\tconst size_t posForLine = EntryForLine(lineNumber);\r\n\t\t\tif (lineNumber == lineCaret) {\r\n\t\t\t\t// Use position 0 for caret line.\r\n\t\t\t\tif (cache[0]) {\r\n\t\t\t\t\t// Another line is currently in [0] so move it out to its normal position.\r\n\t\t\t\t\t// Since it was recently the caret line its likely to be needed soon.\r\n\t\t\t\t\tconst size_t posNewForEntry0 = EntryForLine(cache[0]->LineNumber());\r\n\t\t\t\t\tif (posForLine == posNewForEntry0) {\r\n\t\t\t\t\t\tstd::swap(cache[0], cache[posNewForEntry0]);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcache[posNewForEntry0] = std::move(cache[0]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (cache[posForLine] && (cache[posForLine]->LineNumber() == lineNumber)) {\r\n\t\t\t\t\t// Caret line is currently somewhere else so move it to [0].\r\n\t\t\t\t\tcache[0] = std::move(cache[posForLine]);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tpos = posForLine;\r\n\t\t\t}\r\n\t\t}\r\n\t} else if (level == LineCache::Document) {\r\n\t\tpos = lineNumber;\r\n\t}\r\n\r\n\tif (pos < cache.size()) {\r\n\t\tif (cache[pos] && !cache[pos]->CanHold(lineNumber, maxChars)) {\r\n\t\t\tcache[pos].reset();\r\n\t\t}\r\n\t\tif (!cache[pos]) {\r\n\t\t\tcache[pos] = std::make_shared<LineLayout>(lineNumber, maxChars);\r\n\t\t}\r\n#ifdef CHECK_LLC\r\n\t\t// Expensive check that there is only one entry for any line number\r\n\t\tstd::vector<bool> linesInCache(linesInDoc);\r\n\t\tfor (const auto &entry : cache) {\r\n\t\t\tif (entry) {\r\n\t\t\t\tPLATFORM_ASSERT(!linesInCache[entry->LineNumber()]);\r\n\t\t\t\tlinesInCache[entry->LineNumber()] = true;\r\n\t\t\t}\r\n\t\t}\r\n#endif\r\n\t\treturn cache[pos];\r\n\t}\r\n\r\n\t// Only reach here for level == Cache::none\r\n\treturn std::make_shared<LineLayout>(lineNumber, maxChars);\r\n}\r\n\r\nnamespace {\r\n\r\n// Simply pack the (maximum 4) character bytes into an int\r\nconstexpr unsigned int KeyFromString(std::string_view charBytes) noexcept {\r\n\tPLATFORM_ASSERT(charBytes.length() <= 4);\r\n\tunsigned int k=0;\r\n\tfor (const unsigned char uc : charBytes) {\r\n\t\tk = k * 0x100 + uc;\r\n\t}\r\n\treturn k;\r\n}\r\n\r\nconstexpr unsigned int representationKeyCrLf = KeyFromString(\"\\r\\n\");\r\n\r\nconst char *const repsC0[] = {\r\n\t\"NUL\", \"SOH\", \"STX\", \"ETX\", \"EOT\", \"ENQ\", \"ACK\", \"BEL\",\r\n\t\"BS\", \"HT\", \"LF\", \"VT\", \"FF\", \"CR\", \"SO\", \"SI\",\r\n\t\"DLE\", \"DC1\", \"DC2\", \"DC3\", \"DC4\", \"NAK\", \"SYN\", \"ETB\",\r\n\t\"CAN\", \"EM\", \"SUB\", \"ESC\", \"FS\", \"GS\", \"RS\", \"US\"\r\n};\r\n\r\nconst char *const repsC1[] = {\r\n\t\"PAD\", \"HOP\", \"BPH\", \"NBH\", \"IND\", \"NEL\", \"SSA\", \"ESA\",\r\n\t\"HTS\", \"HTJ\", \"VTS\", \"PLD\", \"PLU\", \"RI\", \"SS2\", \"SS3\",\r\n\t\"DCS\", \"PU1\", \"PU2\", \"STS\", \"CCH\", \"MW\", \"SPA\", \"EPA\",\r\n\t\"SOS\", \"SGCI\", \"SCI\", \"CSI\", \"ST\", \"OSC\", \"PM\", \"APC\"\r\n};\r\n\r\n}\r\n\r\nnamespace Scintilla::Internal {\r\n\r\nconst char *ControlCharacterString(unsigned char ch) noexcept {\r\n\tif (ch < std::size(repsC0)) {\r\n\t\treturn repsC0[ch];\r\n\t} else {\r\n\t\treturn \"BAD\";\r\n\t}\r\n}\r\n\r\n\r\nvoid Hexits(char *hexits, int ch) noexcept {\r\n\thexits[0] = 'x';\r\n\thexits[1] = \"0123456789ABCDEF\"[ch / 0x10];\r\n\thexits[2] = \"0123456789ABCDEF\"[ch % 0x10];\r\n\thexits[3] = 0;\r\n}\r\n\r\n}\r\n\r\nvoid SpecialRepresentations::SetRepresentation(std::string_view charBytes, std::string_view value) {\r\n\tif ((charBytes.length() <= 4) && (value.length() <= Representation::maxLength)) {\r\n\t\tconst unsigned int key = KeyFromString(charBytes);\r\n\t\tconst bool inserted = mapReprs.insert_or_assign(key, Representation(value)).second;\r\n\t\tif (inserted) {\r\n\t\t\t// New entry so increment for first byte\r\n\t\t\tconst unsigned char ucStart = charBytes.empty() ? 0 : charBytes[0];\r\n\t\t\tstartByteHasReprs[ucStart]++;\r\n\t\t\tif (key > maxKey) {\r\n\t\t\t\tmaxKey = key;\r\n\t\t\t}\r\n\t\t\tif (key == representationKeyCrLf) {\r\n\t\t\t\tcrlf = true;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid SpecialRepresentations::SetRepresentationAppearance(std::string_view charBytes, RepresentationAppearance appearance) {\r\n\tif (charBytes.length() <= 4) {\r\n\t\tconst unsigned int key = KeyFromString(charBytes);\r\n\t\tconst MapRepresentation::iterator it = mapReprs.find(key);\r\n\t\tif (it == mapReprs.end()) {\r\n\t\t\t// Not present so fail\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tit->second.appearance = appearance;\r\n\t}\r\n}\r\n\r\nvoid SpecialRepresentations::SetRepresentationColour(std::string_view charBytes, ColourRGBA colour) {\r\n\tif (charBytes.length() <= 4) {\r\n\t\tconst unsigned int key = KeyFromString(charBytes);\r\n\t\tconst MapRepresentation::iterator it = mapReprs.find(key);\r\n\t\tif (it == mapReprs.end()) {\r\n\t\t\t// Not present so fail\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tit->second.appearance = it->second.appearance | RepresentationAppearance::Colour;\r\n\t\tit->second.colour = colour;\r\n\t}\r\n}\r\n\r\nvoid SpecialRepresentations::ClearRepresentation(std::string_view charBytes) {\r\n\tif (charBytes.length() <= 4) {\r\n\t\tconst unsigned int key = KeyFromString(charBytes);\r\n\t\tconst MapRepresentation::iterator it = mapReprs.find(key);\r\n\t\tif (it != mapReprs.end()) {\r\n\t\t\tmapReprs.erase(it);\r\n\t\t\tconst unsigned char ucStart = charBytes.empty() ? 0 : charBytes[0];\r\n\t\t\tstartByteHasReprs[ucStart]--;\r\n\t\t\tif (key == maxKey && startByteHasReprs[ucStart] == 0) {\r\n\t\t\t\tmaxKey = mapReprs.empty() ? 0 : mapReprs.crbegin()->first;\r\n\t\t\t}\r\n\t\t\tif (key == representationKeyCrLf) {\r\n\t\t\t\tcrlf = false;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nconst Representation *SpecialRepresentations::GetRepresentation(std::string_view charBytes) const {\r\n\tconst unsigned int key = KeyFromString(charBytes);\r\n\tif (key > maxKey) {\r\n\t\treturn nullptr;\r\n\t}\r\n\tconst MapRepresentation::const_iterator it = mapReprs.find(key);\r\n\tif (it != mapReprs.end()) {\r\n\t\treturn &(it->second);\r\n\t}\r\n\treturn nullptr;\r\n}\r\n\r\nconst Representation *SpecialRepresentations::RepresentationFromCharacter(std::string_view charBytes) const {\r\n\tif (charBytes.length() <= 4) {\r\n\t\tconst unsigned char ucStart = charBytes.empty() ? 0 : charBytes[0];\r\n\t\tif (!startByteHasReprs[ucStart])\r\n\t\t\treturn nullptr;\r\n\t\treturn GetRepresentation(charBytes);\r\n\t}\r\n\treturn nullptr;\r\n}\r\n\r\nvoid SpecialRepresentations::Clear() {\r\n\tmapReprs.clear();\r\n\tconstexpr unsigned short none = 0;\r\n\tstd::fill(startByteHasReprs, std::end(startByteHasReprs), none);\r\n\tmaxKey = 0;\r\n\tcrlf = false;\r\n}\r\n\r\nvoid SpecialRepresentations::SetDefaultRepresentations(int dbcsCodePage) {\r\n\tClear();\r\n\r\n\t// C0 control set\r\n\tfor (size_t j = 0; j < std::size(repsC0); j++) {\r\n\t\tconst char c[2] = { static_cast<char>(j), 0 };\r\n\t\tSetRepresentation(std::string_view(c, 1), repsC0[j]);\r\n\t}\r\n\tSetRepresentation(\"\\x7f\", \"DEL\");\r\n\r\n\t// C1 control set\r\n\t// As well as Unicode mode, ISO-8859-1 should use these\r\n\tif (CpUtf8 == dbcsCodePage) {\r\n\t\tfor (size_t j = 0; j < std::size(repsC1); j++) {\r\n\t\t\tconst char c1[3] = { '\\xc2',  static_cast<char>(0x80 + j), 0 };\r\n\t\t\tSetRepresentation(c1, repsC1[j]);\r\n\t\t}\r\n\t\tSetRepresentation(\"\\xe2\\x80\\xa8\", \"LS\");\r\n\t\tSetRepresentation(\"\\xe2\\x80\\xa9\", \"PS\");\r\n\t}\r\n\r\n\t// Invalid as single bytes in multi-byte encodings\r\n\tif (dbcsCodePage) {\r\n\t\tfor (int k = 0x80; k < 0x100; k++) {\r\n\t\t\tif ((CpUtf8 == dbcsCodePage) || !IsDBCSValidSingleByte(dbcsCodePage, k)) {\r\n\t\t\t\tconst char hiByte[2] = { static_cast<char>(k), 0 };\r\n\t\t\t\tchar hexits[4];\r\n\t\t\t\tHexits(hexits, k);\r\n\t\t\t\tSetRepresentation(hiByte, hexits);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid BreakFinder::Insert(Sci::Position val) {\r\n\tconst int posInLine = static_cast<int>(val);\r\n\tif (posInLine > nextBreak) {\r\n\t\tconst std::vector<int>::iterator it = std::lower_bound(selAndEdge.begin(), selAndEdge.end(), posInLine);\r\n\t\tif (it == selAndEdge.end()) {\r\n\t\t\tselAndEdge.push_back(posInLine);\r\n\t\t} else if (*it != posInLine) {\r\n\t\t\tselAndEdge.insert(it, 1, posInLine);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nBreakFinder::BreakFinder(const LineLayout *ll_, const Selection *psel, Range lineRange_, Sci::Position posLineStart,\r\n\tXYPOSITION xStart, BreakFor breakFor, const Document *pdoc_, const SpecialRepresentations *preprs_, const ViewStyle *pvsDraw) :\r\n\tll(ll_),\r\n\tlineRange(lineRange_),\r\n\tnextBreak(static_cast<int>(lineRange_.start)),\r\n\tsaeCurrentPos(0),\r\n\tsaeNext(0),\r\n\tsubBreak(-1),\r\n\tpdoc(pdoc_),\r\n\tencodingFamily(pdoc_->CodePageFamily()),\r\n\tpreprs(preprs_) {\r\n\r\n\t// Search for first visible break\r\n\t// First find the first visible character\r\n\tif (xStart > 0.0f)\r\n\t\tnextBreak = ll->FindBefore(xStart, lineRange);\r\n\t// Now back to a style break\r\n\twhile ((nextBreak > lineRange.start) && (ll->styles[nextBreak] == ll->styles[nextBreak - 1])) {\r\n\t\tnextBreak--;\r\n\t}\r\n\r\n\tif (FlagSet(breakFor, BreakFor::Selection)) {\r\n\t\tconst SelectionPosition posStart(posLineStart);\r\n\t\tconst SelectionPosition posEnd(posLineStart + lineRange.end);\r\n\t\tconst SelectionSegment segmentLine(posStart, posEnd);\r\n\t\tfor (size_t r=0; r<psel->Count(); r++) {\r\n\t\t\tconst SelectionSegment portion = psel->Range(r).Intersect(segmentLine);\r\n\t\t\tif (!(portion.start == portion.end)) {\r\n\t\t\t\tif (portion.start.IsValid())\r\n\t\t\t\t\tInsert(portion.start.Position() - posLineStart);\r\n\t\t\t\tif (portion.end.IsValid())\r\n\t\t\t\t\tInsert(portion.end.Position() - posLineStart);\r\n\t\t\t}\r\n\t\t}\r\n\t\t// On the curses platform, the terminal is drawing its own caret, so add breaks around the\r\n\t\t// caret in the main selection in order to help prevent the selection from being drawn in\r\n\t\t// the caret's cell.\r\n\t\tif (FlagSet(pvsDraw->caret.style, CaretStyle::Curses) && !psel->RangeMain().Empty()) {\r\n\t\t\tconst Sci::Position caretPos = psel->RangeMain().caret.Position();\r\n\t\t\tconst Sci::Position anchorPos = psel->RangeMain().anchor.Position();\r\n\t\t\tif (caretPos < anchorPos) {\r\n\t\t\t\tconst Sci::Position nextPos = pdoc->MovePositionOutsideChar(caretPos + 1, 1);\r\n\t\t\t\tInsert(nextPos - posLineStart);\r\n\t\t\t} else if (caretPos > anchorPos && pvsDraw->DrawCaretInsideSelection(false, false)) {\r\n\t\t\t\tconst Sci::Position prevPos = pdoc->MovePositionOutsideChar(caretPos - 1, -1);\r\n\t\t\t\tif (prevPos > anchorPos)\r\n\t\t\t\t\tInsert(prevPos - posLineStart);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (FlagSet(breakFor, BreakFor::Foreground) && pvsDraw->indicatorsSetFore) {\r\n\t\tfor (const IDecoration *deco : pdoc->decorations->View()) {\r\n\t\t\tif (pvsDraw->indicators[deco->Indicator()].OverridesTextFore()) {\r\n\t\t\t\tSci::Position startPos = deco->EndRun(posLineStart);\r\n\t\t\t\twhile (startPos < (posLineStart + lineRange.end)) {\r\n\t\t\t\t\tInsert(startPos - posLineStart);\r\n\t\t\t\t\tstartPos = deco->EndRun(startPos);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tInsert(ll->edgeColumn);\r\n\tInsert(lineRange.end);\r\n\tsaeNext = (!selAndEdge.empty()) ? selAndEdge[0] : -1;\r\n}\r\n\r\nBreakFinder::~BreakFinder() noexcept = default;\r\n\r\nTextSegment BreakFinder::Next() {\r\n\tif (subBreak < 0) {\r\n\t\tconst int prev = nextBreak;\r\n\t\tconst Representation *repr = nullptr;\r\n\t\twhile (nextBreak < lineRange.end) {\r\n\t\t\tint charWidth = 1;\r\n\t\t\tconst char * const chars = &ll->chars[nextBreak];\r\n\t\t\tconst unsigned char ch = chars[0];\r\n\t\t\tbool characterStyleConsistent = true;\t// All bytes of character in same style?\r\n\t\t\tif (!UTF8IsAscii(ch) && encodingFamily != EncodingFamily::eightBit) {\r\n\t\t\t\tif (encodingFamily == EncodingFamily::unicode) {\r\n\t\t\t\t\tcharWidth = UTF8DrawBytes(chars, lineRange.end - nextBreak);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcharWidth = pdoc->DBCSDrawBytes(std::string_view(chars, lineRange.end - nextBreak));\r\n\t\t\t\t}\r\n\t\t\t\tfor (int trail = 1; trail < charWidth; trail++) {\r\n\t\t\t\t\tif (ll->styles[nextBreak] != ll->styles[nextBreak + trail]) {\r\n\t\t\t\t\t\tcharacterStyleConsistent = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (!characterStyleConsistent) {\r\n\t\t\t\tif (nextBreak == prev) {\r\n\t\t\t\t\t// Show first character representation bytes since it has inconsistent styles.\r\n\t\t\t\t\tcharWidth = 1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Return segment before nextBreak but allow to be split up if too long\r\n\t\t\t\t\t// If not split up, next call will hit the above 'charWidth = 1;' and display bytes.\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\trepr = nullptr;\r\n\t\t\tif (preprs->MayContain(ch)) {\r\n\t\t\t\t// Special case \\r\\n line ends if there is a representation\r\n\t\t\t\tif (ch == '\\r' && preprs->ContainsCrLf() && chars[1] == '\\n') {\r\n\t\t\t\t\tcharWidth = 2;\r\n\t\t\t\t}\r\n\t\t\t\trepr = preprs->GetRepresentation(std::string_view(chars, charWidth));\r\n\t\t\t}\r\n\t\t\tif (((nextBreak > 0) && (ll->styles[nextBreak] != ll->styles[nextBreak - 1])) ||\r\n\t\t\t\t\trepr ||\r\n\t\t\t\t\t(nextBreak == saeNext)) {\r\n\t\t\t\twhile ((nextBreak >= saeNext) && (saeNext < lineRange.end)) {\r\n\t\t\t\t\tsaeCurrentPos++;\r\n\t\t\t\t\tsaeNext = static_cast<int>((saeCurrentPos < selAndEdge.size()) ? selAndEdge[saeCurrentPos] : lineRange.end);\r\n\t\t\t\t}\r\n\t\t\t\tif ((nextBreak > prev) || repr) {\r\n\t\t\t\t\t// Have a segment to report\r\n\t\t\t\t\tif (nextBreak == prev) {\r\n\t\t\t\t\t\tnextBreak += charWidth;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\trepr = nullptr;\t// Optimize -> should remember repr\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tnextBreak += charWidth;\r\n\t\t}\r\n\r\n\t\tconst int lengthSegment = nextBreak - prev;\r\n\t\tif (lengthSegment < lengthStartSubdivision) {\r\n\t\t\treturn TextSegment(prev, lengthSegment, repr);\r\n\t\t}\r\n\t\tsubBreak = prev;\r\n\t}\r\n\r\n\t// Splitting up a long run from prev to nextBreak in lots of approximately lengthEachSubdivision.\r\n\tconst int startSegment = subBreak;\r\n\tconst int remaining = nextBreak - startSegment;\r\n\tint lengthSegment = remaining;\r\n\tif (lengthSegment > lengthEachSubdivision) {\r\n\t\tlengthSegment = static_cast<int>(pdoc->SafeSegment(std::string_view(&ll->chars[startSegment], lengthEachSubdivision)));\r\n\t}\r\n\tif (lengthSegment < remaining) {\r\n\t\tsubBreak += lengthSegment;\r\n\t} else {\r\n\t\tsubBreak = -1;\r\n\t}\r\n\treturn TextSegment(startSegment, lengthSegment);\r\n}\r\n\r\nbool BreakFinder::More() const noexcept {\r\n\treturn (subBreak >= 0) || (nextBreak < lineRange.end);\r\n}\r\n\r\nclass PositionCacheEntry {\r\n\tuint16_t styleNumber;\r\n\tuint16_t len;\r\n\tuint16_t clock;\r\n\tbool unicode;\r\n\tstd::unique_ptr<XYPOSITION[]> positions;\r\npublic:\r\n\tPositionCacheEntry() noexcept;\r\n\t// Copy constructor not currently used, but needed for being element in std::vector.\r\n\tPositionCacheEntry(const PositionCacheEntry &);\r\n\tPositionCacheEntry(PositionCacheEntry &&) noexcept = default;\r\n\t// Deleted so PositionCacheEntry objects can not be assigned.\r\n\tvoid operator=(const PositionCacheEntry &) = delete;\r\n\tvoid operator=(PositionCacheEntry &&) = delete;\r\n\t~PositionCacheEntry();\r\n\tvoid Set(unsigned int styleNumber_, bool unicode_, std::string_view sv, const XYPOSITION *positions_, uint16_t clock_);\r\n\tvoid Clear() noexcept;\r\n\tbool Retrieve(unsigned int styleNumber_, bool unicode_, std::string_view sv, XYPOSITION *positions_) const noexcept;\r\n\tstatic size_t Hash(unsigned int styleNumber_, bool unicode_, std::string_view sv) noexcept;\r\n\tbool NewerThan(const PositionCacheEntry &other) const noexcept;\r\n\tvoid ResetClock() noexcept;\r\n};\r\n\r\nclass PositionCache : public IPositionCache {\r\n\tstd::vector<PositionCacheEntry> pces;\r\n\tstd::mutex mutex;\r\n\tuint16_t clock;\r\n\tbool allClear;\r\npublic:\r\n\tPositionCache();\r\n\t// Deleted so LineAnnotation objects can not be copied.\r\n\tPositionCache(const PositionCache &) = delete;\r\n\tPositionCache(PositionCache &&) = delete;\r\n\tvoid operator=(const PositionCache &) = delete;\r\n\tvoid operator=(PositionCache &&) = delete;\r\n\t~PositionCache() override = default;\r\n\r\n\tvoid Clear() noexcept override;\r\n\tvoid SetSize(size_t size_) override;\r\n\tsize_t GetSize() const noexcept override;\r\n\tvoid MeasureWidths(Surface *surface, const ViewStyle &vstyle, unsigned int styleNumber,\r\n\t\tbool unicode, std::string_view sv, XYPOSITION *positions, bool needsLocking) override;\r\n};\r\n\r\nPositionCacheEntry::PositionCacheEntry() noexcept :\r\n\tstyleNumber(0), len(0), clock(0), unicode(false) {\r\n}\r\n\r\n// Copy constructor not currently used, but needed for being element in std::vector.\r\nPositionCacheEntry::PositionCacheEntry(const PositionCacheEntry &other) :\r\n\tstyleNumber(other.styleNumber), len(other.len), clock(other.clock), unicode(other.unicode) {\r\n\tif (other.positions) {\r\n\t\tconst size_t lenData = len + (len / sizeof(XYPOSITION)) + 1;\r\n\t\tpositions = std::make_unique<XYPOSITION[]>(lenData);\r\n\t\tmemcpy(positions.get(), other.positions.get(), lenData * sizeof(XYPOSITION));\r\n\t}\r\n}\r\n\r\nvoid PositionCacheEntry::Set(unsigned int styleNumber_, bool unicode_, std::string_view sv,\r\n\tconst XYPOSITION *positions_, uint16_t clock_) {\r\n\tClear();\r\n\tstyleNumber = static_cast<uint16_t>(styleNumber_);\r\n\tlen = static_cast<uint16_t>(sv.length());\r\n\tclock = clock_;\r\n\tunicode = unicode_;\r\n\tif (sv.data() && positions_) {\r\n\t\tpositions = std::make_unique<XYPOSITION[]>(len + (len / sizeof(XYPOSITION)) + 1);\r\n\t\tfor (unsigned int i=0; i<len; i++) {\r\n\t\t\tpositions[i] = positions_[i];\r\n\t\t}\r\n\t\tmemcpy(&positions[len], sv.data(), sv.length());\r\n\t}\r\n}\r\n\r\nPositionCacheEntry::~PositionCacheEntry() {\r\n\tClear();\r\n}\r\n\r\nvoid PositionCacheEntry::Clear() noexcept {\r\n\tpositions.reset();\r\n\tstyleNumber = 0;\r\n\tlen = 0;\r\n\tclock = 0;\r\n}\r\n\r\nbool PositionCacheEntry::Retrieve(unsigned int styleNumber_, bool unicode_, std::string_view sv, XYPOSITION *positions_) const noexcept {\r\n\tif ((styleNumber == styleNumber_) && (unicode == unicode_) && (len == sv.length()) &&\r\n\t\t(memcmp(&positions[len], sv.data(), sv.length())== 0)) {\r\n\t\tfor (unsigned int i=0; i<len; i++) {\r\n\t\t\tpositions_[i] = positions[i];\r\n\t\t}\r\n\t\treturn true;\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n}\r\n\r\nsize_t PositionCacheEntry::Hash(unsigned int styleNumber_, bool unicode_, std::string_view sv) noexcept {\r\n\tconst size_t h1 = std::hash<std::string_view>{}(sv);\r\n\tconst size_t h2 = std::hash<unsigned int>{}(styleNumber_);\r\n\treturn h1 ^ (h2 << 1) ^ static_cast<size_t>(unicode_);\r\n}\r\n\r\nbool PositionCacheEntry::NewerThan(const PositionCacheEntry &other) const noexcept {\r\n\treturn clock > other.clock;\r\n}\r\n\r\nvoid PositionCacheEntry::ResetClock() noexcept {\r\n\tif (clock > 0) {\r\n\t\tclock = 1;\r\n\t}\r\n}\r\n\r\nPositionCache::PositionCache() {\r\n\tclock = 1;\r\n\tpces.resize(0x400);\r\n\tallClear = true;\r\n}\r\n\r\nvoid PositionCache::Clear() noexcept {\r\n\tif (!allClear) {\r\n\t\tfor (PositionCacheEntry &pce : pces) {\r\n\t\t\tpce.Clear();\r\n\t\t}\r\n\t}\r\n\tclock = 1;\r\n\tallClear = true;\r\n}\r\n\r\nvoid PositionCache::SetSize(size_t size_) {\r\n\tClear();\r\n\tpces.resize(size_);\r\n}\r\n\r\nsize_t PositionCache::GetSize() const noexcept {\r\n\treturn pces.size();\r\n}\r\n\r\nvoid PositionCache::MeasureWidths(Surface *surface, const ViewStyle &vstyle, unsigned int styleNumber,\r\n\tbool unicode, std::string_view sv, XYPOSITION *positions, bool needsLocking) {\r\n\tconst Style &style = vstyle.styles[styleNumber];\r\n\tif (style.monospaceASCII) {\r\n\t\tif (AllGraphicASCII(sv)) {\r\n\t\t\tconst XYPOSITION monospaceCharacterWidth = style.monospaceCharacterWidth;\r\n\t\t\tfor (size_t i = 0; i < sv.length(); i++) {\r\n\t\t\t\tpositions[i] = monospaceCharacterWidth * (i+1);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n\r\n\tsize_t probe = pces.size();\t// Out of bounds\r\n\tif ((!pces.empty()) && (sv.length() < 30)) {\r\n\t\t// Only store short strings in the cache so it doesn't churn with\r\n\t\t// long comments with only a single comment.\r\n\r\n\t\t// Two way associative: try two probe positions.\r\n\t\tconst size_t hashValue = PositionCacheEntry::Hash(styleNumber, unicode, sv);\r\n\t\tprobe = hashValue % pces.size();\r\n\t\tstd::unique_lock<std::mutex> guard(mutex, std::defer_lock);\r\n\t\tif (needsLocking) {\r\n\t\t\tguard.lock();\r\n\t\t}\r\n\t\tif (pces[probe].Retrieve(styleNumber, unicode, sv, positions)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tconst size_t probe2 = (hashValue * 37) % pces.size();\r\n\t\tif (pces[probe2].Retrieve(styleNumber, unicode, sv, positions)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// Not found. Choose the oldest of the two slots to replace\r\n\t\tif (pces[probe].NewerThan(pces[probe2])) {\r\n\t\t\tprobe = probe2;\r\n\t\t}\r\n\t}\r\n\r\n\tconst Font *fontStyle = style.font.get();\r\n\tif (unicode) {\r\n\t\tsurface->MeasureWidthsUTF8(fontStyle, sv, positions);\r\n\t} else {\r\n\t\tsurface->MeasureWidths(fontStyle, sv, positions);\r\n\t}\r\n\tif (probe < pces.size()) {\r\n\t\t// Store into cache\r\n\t\tstd::unique_lock<std::mutex> guard(mutex, std::defer_lock);\r\n\t\tif (needsLocking) {\r\n\t\t\tguard.lock();\r\n\t\t}\r\n\t\tclock++;\r\n\t\tif (clock > 60000) {\r\n\t\t\t// Since there are only 16 bits for the clock, wrap it round and\r\n\t\t\t// reset all cache entries so none get stuck with a high clock.\r\n\t\t\tfor (PositionCacheEntry &pce : pces) {\r\n\t\t\t\tpce.ResetClock();\r\n\t\t\t}\r\n\t\t\tclock = 2;\r\n\t\t}\r\n\t\tallClear = false;\r\n\t\tpces[probe].Set(styleNumber, unicode, sv, positions, clock);\r\n\t}\r\n}\r\n\r\nstd::unique_ptr<IPositionCache> Scintilla::Internal::CreatePositionCache() {\r\n\treturn std::make_unique<PositionCache>();\r\n}\r\n"
  },
  {
    "path": "scintilla/src/PositionCache.h",
    "content": "// Scintilla source code edit control\r\n/** @file PositionCache.h\r\n ** Classes for caching layout information.\r\n **/\r\n// Copyright 1998-2009 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef POSITIONCACHE_H\r\n#define POSITIONCACHE_H\r\n\r\nnamespace Scintilla::Internal {\r\n\r\n/**\r\n* A point in document space.\r\n* Uses double for sufficient resolution in large (>20,000,000 line) documents.\r\n*/\r\nclass PointDocument {\r\npublic:\r\n\tdouble x;\r\n\tdouble y;\r\n\r\n\texplicit PointDocument(double x_ = 0, double y_ = 0) noexcept : x(x_), y(y_) {\r\n\t}\r\n\r\n\t// Conversion from Point.\r\n\texplicit PointDocument(Point pt) noexcept : x(pt.x), y(pt.y) {\r\n\t}\r\n};\r\n\r\n// There are two points for some positions and this enumeration\r\n// can choose between the end of the first line or subline\r\n// and the start of the next line or subline.\r\nenum class PointEnd {\r\n\tstart = 0x0,\r\n\tlineEnd = 0x1,\r\n\tsubLineEnd = 0x2,\r\n\tendEither = lineEnd | subLineEnd,\r\n};\r\n\r\nclass BidiData {\r\npublic:\r\n\tstd::vector<std::shared_ptr<Font>> stylesFonts;\r\n\tstd::vector<XYPOSITION> widthReprs;\r\n\tvoid Resize(size_t maxLineLength_);\r\n};\r\n\r\n/**\r\n */\r\nclass LineLayout {\r\nprivate:\r\n\tstd::unique_ptr<int []>lineStarts;\r\n\tint lenLineStarts;\r\n\t/// Drawing is only performed for @a maxLineLength characters on each line.\r\n\tSci::Line lineNumber;\r\npublic:\r\n\tenum { wrapWidthInfinite = 0x7ffffff };\r\n\r\n\tint maxLineLength;\r\n\tint numCharsInLine;\r\n\tint numCharsBeforeEOL;\r\n\tenum class ValidLevel { invalid, checkTextAndStyle, positions, lines } validity;\r\n\tint xHighlightGuide;\r\n\tbool highlightColumn;\r\n\tbool containsCaret;\r\n\tint edgeColumn;\r\n\tstd::unique_ptr<char[]> chars;\r\n\tstd::unique_ptr<unsigned char[]> styles;\r\n\tstd::unique_ptr<XYPOSITION[]> positions;\r\n\tunsigned char bracePreviousStyles[2];\r\n\r\n\tstd::unique_ptr<BidiData> bidiData;\r\n\r\n\t// Wrapped line support\r\n\tint widthLine;\r\n\tint lines;\r\n\tXYPOSITION wrapIndent; // In pixels\r\n\r\n\tLineLayout(Sci::Line lineNumber_, int maxLineLength_);\r\n\t// Deleted so LineLayout objects can not be copied.\r\n\tLineLayout(const LineLayout &) = delete;\r\n\tLineLayout(LineLayout &&) = delete;\r\n\tvoid operator=(const LineLayout &) = delete;\r\n\tvoid operator=(LineLayout &&) = delete;\r\n\tvirtual ~LineLayout();\r\n\tvoid Resize(int maxLineLength_);\r\n\tvoid ReSet(Sci::Line lineNumber_, Sci::Position maxLineLength_);\r\n\tvoid EnsureBidiData();\r\n\tvoid Free() noexcept;\r\n\tvoid ClearPositions();\r\n\tvoid Invalidate(ValidLevel validity_) noexcept;\r\n\tSci::Line LineNumber() const noexcept;\r\n\tbool CanHold(Sci::Line lineDoc, int lineLength_) const noexcept;\r\n\tint LineStart(int line) const noexcept;\r\n\tint LineLength(int line) const noexcept;\r\n\tenum class Scope { visibleOnly, includeEnd };\r\n\tint LineLastVisible(int line, Scope scope) const noexcept;\r\n\tRange SubLineRange(int subLine, Scope scope) const noexcept;\r\n\tbool InLine(int offset, int line) const noexcept;\r\n\tint SubLineFromPosition(int posInLine, PointEnd pe) const noexcept;\r\n\tvoid AddLineStart(Sci::Position start);\r\n\tvoid SetBracesHighlight(Range rangeLine, const Sci::Position braces[],\r\n\t\tchar bracesMatchStyle, int xHighlight, bool ignoreStyle);\r\n\tvoid RestoreBracesHighlight(Range rangeLine, const Sci::Position braces[], bool ignoreStyle);\r\n\tint FindBefore(XYPOSITION x, Range range) const noexcept;\r\n\tint FindPositionFromX(XYPOSITION x, Range range, bool charPosition) const noexcept;\r\n\tPoint PointFromPosition(int posInLine, int lineHeight, PointEnd pe) const noexcept;\r\n\tXYPOSITION XInLine(Sci::Position index) const noexcept;\r\n\tInterval Span(int start, int end) const noexcept;\r\n\tInterval SpanByte(int index) const noexcept;\r\n\tint EndLineStyle() const noexcept;\r\n\tvoid WrapLine(const Document *pdoc, Sci::Position posLineStart, Wrap wrapState, XYPOSITION wrapWidth);\r\n};\r\n\r\nstruct ScreenLine : public IScreenLine {\r\n\tconst LineLayout *ll;\r\n\tsize_t start;\r\n\tsize_t len;\r\n\tXYPOSITION width;\r\n\tXYPOSITION height;\r\n\tint ctrlCharPadding;\r\n\tXYPOSITION tabWidth;\r\n\tint tabWidthMinimumPixels;\r\n\r\n\tScreenLine(const LineLayout *ll_, int subLine, const ViewStyle &vs, XYPOSITION width_, int tabWidthMinimumPixels_);\r\n\t// Deleted so ScreenLine objects can not be copied.\r\n\tScreenLine(const ScreenLine &) = delete;\r\n\tScreenLine(ScreenLine &&) = delete;\r\n\tvoid operator=(const ScreenLine &) = delete;\r\n\tvoid operator=(ScreenLine &&) = delete;\r\n\tvirtual ~ScreenLine();\r\n\r\n\tstd::string_view Text() const override;\r\n\tsize_t Length() const override;\r\n\tsize_t RepresentationCount() const override;\r\n\tXYPOSITION Width() const override;\r\n\tXYPOSITION Height() const override;\r\n\tXYPOSITION TabWidth() const override;\r\n\tXYPOSITION TabWidthMinimumPixels() const override;\r\n\tconst Font *FontOfPosition(size_t position) const override;\r\n\tXYPOSITION RepresentationWidth(size_t position) const override;\r\n\tXYPOSITION TabPositionAfter(XYPOSITION xPosition) const override;\r\n};\r\n\r\nstruct SignificantLines {\r\n\tSci::Line lineCaret;\r\n\tSci::Line lineTop;\r\n\tSci::Line linesOnScreen;\r\n\tScintilla::LineCache level;\r\n\tbool LineMayCache(Sci::Line line) const noexcept;\r\n};\r\n\r\n/**\r\n */\r\nclass LineLayoutCache {\r\npublic:\r\nprivate:\r\n\tScintilla::LineCache level;\r\n\tstd::vector<std::shared_ptr<LineLayout>>cache;\r\n\tLineLayout::ValidLevel maxValidity;\r\n\tint styleClock;\r\n\tsize_t EntryForLine(Sci::Line line) const noexcept;\r\n\tvoid AllocateForLevel(Sci::Line linesOnScreen, Sci::Line linesInDoc);\r\npublic:\r\n\tLineLayoutCache();\r\n\t// Deleted so LineLayoutCache objects can not be copied.\r\n\tLineLayoutCache(const LineLayoutCache &) = delete;\r\n\tLineLayoutCache(LineLayoutCache &&) = delete;\r\n\tvoid operator=(const LineLayoutCache &) = delete;\r\n\tvoid operator=(LineLayoutCache &&) = delete;\r\n\tvirtual ~LineLayoutCache();\r\n\tvoid Deallocate() noexcept;\r\n\tvoid Invalidate(LineLayout::ValidLevel validity_) noexcept;\r\n\tvoid SetLevel(Scintilla::LineCache level_) noexcept;\r\n\tScintilla::LineCache GetLevel() const noexcept { return level; }\r\n\tstd::shared_ptr<LineLayout> Retrieve(Sci::Line lineNumber, Sci::Line lineCaret, int maxChars, int styleClock_,\r\n\t\tSci::Line linesOnScreen, Sci::Line linesInDoc);\r\n};\r\n\r\nclass Representation {\r\npublic:\r\n\tstatic constexpr size_t maxLength = 200;\r\n\tstd::string stringRep;\r\n\tRepresentationAppearance appearance;\r\n\tColourRGBA colour;\r\n\texplicit Representation(std::string_view value=\"\", RepresentationAppearance appearance_= RepresentationAppearance::Blob) :\r\n\t\tstringRep(value), appearance(appearance_) {\r\n\t}\r\n};\r\n\r\ntypedef std::map<unsigned int, Representation> MapRepresentation;\r\n\r\nconst char *ControlCharacterString(unsigned char ch) noexcept;\r\nvoid Hexits(char *hexits, int ch) noexcept;\r\n\r\nclass SpecialRepresentations {\r\n\tMapRepresentation mapReprs;\r\n\tunsigned short startByteHasReprs[0x100] {};\r\n\tunsigned int maxKey = 0;\r\n\tbool crlf = false;\r\npublic:\r\n\tvoid SetRepresentation(std::string_view charBytes, std::string_view value);\r\n\tvoid SetRepresentationAppearance(std::string_view charBytes, RepresentationAppearance appearance);\r\n\tvoid SetRepresentationColour(std::string_view charBytes, ColourRGBA colour);\r\n\tvoid ClearRepresentation(std::string_view charBytes);\r\n\tconst Representation *GetRepresentation(std::string_view charBytes) const;\r\n\tconst Representation *RepresentationFromCharacter(std::string_view charBytes) const;\r\n\tbool ContainsCrLf() const noexcept {\r\n\t\treturn crlf;\r\n\t}\r\n\tbool MayContain(unsigned char ch) const noexcept {\r\n\t\treturn startByteHasReprs[ch] != 0;\r\n\t}\r\n\tvoid Clear();\r\n\tvoid SetDefaultRepresentations(int dbcsCodePage);\r\n};\r\n\r\nstruct TextSegment {\r\n\tint start;\r\n\tint length;\r\n\tconst Representation *representation;\r\n\tTextSegment(int start_=0, int length_=0, const Representation *representation_=nullptr) noexcept :\r\n\t\tstart(start_), length(length_), representation(representation_) {\r\n\t}\r\n\tint end() const noexcept {\r\n\t\treturn start + length;\r\n\t}\r\n};\r\n\r\n// Class to break a line of text into shorter runs at sensible places.\r\nclass BreakFinder {\r\n\tconst LineLayout *ll;\r\n\tconst Range lineRange;\r\n\tint nextBreak;\r\n\tstd::vector<int> selAndEdge;\r\n\tunsigned int saeCurrentPos;\r\n\tint saeNext;\r\n\tint subBreak;\r\n\tconst Document *pdoc;\r\n\tconst EncodingFamily encodingFamily;\r\n\tconst SpecialRepresentations *preprs;\r\n\tvoid Insert(Sci::Position val);\r\npublic:\r\n\t// If a whole run is longer than lengthStartSubdivision then subdivide\r\n\t// into smaller runs at spaces or punctuation.\r\n\tenum { lengthStartSubdivision = 300 };\r\n\t// Try to make each subdivided run lengthEachSubdivision or shorter.\r\n\tenum { lengthEachSubdivision = 100 };\r\n\tenum class BreakFor {\r\n\t\tText = 0,\r\n\t\tSelection = 1,\r\n\t\tForeground = 2,\r\n\t\tForegroundAndSelection = 3,\r\n\t};\r\n\tBreakFinder(const LineLayout *ll_, const Selection *psel, Range lineRange_, Sci::Position posLineStart,\r\n\t\tXYPOSITION xStart, BreakFor breakFor, const Document *pdoc_, const SpecialRepresentations *preprs_, const ViewStyle *pvsDraw);\r\n\t// Deleted so BreakFinder objects can not be copied.\r\n\tBreakFinder(const BreakFinder &) = delete;\r\n\tBreakFinder(BreakFinder &&) = delete;\r\n\tvoid operator=(const BreakFinder &) = delete;\r\n\tvoid operator=(BreakFinder &&) = delete;\r\n\t~BreakFinder() noexcept;\r\n\tTextSegment Next();\r\n\tbool More() const noexcept;\r\n};\r\n\r\nclass IPositionCache {\r\npublic:\r\n\tvirtual ~IPositionCache() = default;\r\n\tvirtual void Clear() noexcept = 0;\r\n\tvirtual void SetSize(size_t size_) = 0;\r\n\tvirtual size_t GetSize() const noexcept = 0;\r\n\tvirtual void MeasureWidths(Surface *surface, const ViewStyle &vstyle, unsigned int styleNumber,\r\n\t\tbool unicode, std::string_view sv, XYPOSITION *positions, bool needsLocking) = 0;\r\n};\r\n\r\nstd::unique_ptr<IPositionCache> CreatePositionCache();\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/src/RESearch.cxx",
    "content": "// Scintilla source code edit control\r\n/** @file RESearch.cxx\r\n ** Regular expression search library.\r\n **/\r\n\r\n/*\r\n * regex - Regular expression pattern matching and replacement\r\n *\r\n * By:  Ozan S. Yigit (oz)\r\n *      Dept. of Computer Science\r\n *      York University\r\n *\r\n * Original code available from http://www.cs.yorku.ca/~oz/\r\n * Translation to C++ by Neil Hodgson neilh@scintilla.org\r\n * Removed all use of register.\r\n * Converted to modern function prototypes.\r\n * Put all global/static variables into an object so this code can be\r\n * used from multiple threads, etc.\r\n * Some extensions by Philippe Lhoste PhiLho(a)GMX.net\r\n * '?' extensions by Michael Mullin masmullin@gmail.com\r\n *\r\n * These routines are the PUBLIC DOMAIN equivalents of regex\r\n * routines as found in 4.nBSD UN*X, with minor extensions.\r\n *\r\n * These routines are derived from various implementations found\r\n * in software tools books, and Conroy's grep. They are NOT derived\r\n * from licensed/restricted software.\r\n * For more interesting/academic/complicated implementations,\r\n * see Henry Spencer's regexp routines, or GNU Emacs pattern\r\n * matching module.\r\n *\r\n * Modification history removed.\r\n *\r\n * Interfaces:\r\n *  RESearch::Compile:      compile a regular expression into a NFA.\r\n *\r\n *          const char *RESearch::Compile(const char *pattern, int length,\r\n *                                        bool caseSensitive, bool posix)\r\n *\r\n * Returns a short error string if they fail.\r\n *\r\n *  RESearch::Execute:      execute the NFA to match a pattern.\r\n *\r\n *          int RESearch::Execute(characterIndexer &ci, int lp, int endp)\r\n *\r\n *  re_fail:                failure routine for RESearch::Execute. (no longer used)\r\n *\r\n *          void re_fail(char *msg, char op)\r\n *\r\n * Regular Expressions:\r\n *\r\n *      [1]     char    matches itself, unless it is a special\r\n *                      character (metachar): . \\ [ ] * + ? ^ $\r\n *                      and ( ) if posix option.\r\n *\r\n *      [2]     .       matches any character.\r\n *\r\n *      [3]     \\       matches the character following it, except:\r\n *                      - \\a, \\b, \\f, \\n, \\r, \\t, \\v match the corresponding C\r\n *                      escape char, respectively BEL, BS, FF, LF, CR, TAB and VT;\r\n *                      Note that \\r and \\n are never matched because Scintilla\r\n *                      regex searches are made line per line\r\n *                      (stripped of end-of-line chars).\r\n *                      - if not in posix mode, when followed by a\r\n *                      left or right round bracket (see [8]);\r\n *                      - when followed by a digit 1 to 9 (see [9]);\r\n *                      - when followed by a left or right angle bracket\r\n *                      (see [10]);\r\n *                      - when followed by d, D, s, S, w or W (see [11]);\r\n *                      - when followed by x and two hexa digits (see [12].\r\n *                      Backslash is used as an escape character for all\r\n *                      other meta-characters, and itself.\r\n *\r\n *      [4]     [set]   matches one of the characters in the set.\r\n *                      If the first character in the set is \"^\",\r\n *                      it matches the characters NOT in the set, i.e.\r\n *                      complements the set. A shorthand S-E (start dash end)\r\n *                      is used to specify a set of characters S up to\r\n *                      E, inclusive. S and E must be characters, otherwise\r\n *                      the dash is taken literally (eg. in expression [\\d-a]).\r\n *                      The special characters \"]\" and \"-\" have no special\r\n *                      meaning if they appear as the first chars in the set.\r\n *                      To include both, put - first: [-]A-Z]\r\n *                      (or just backslash them).\r\n *                      examples:        match:\r\n *\r\n *                              [-]|]    matches these 3 chars,\r\n *\r\n *                              []-|]    matches from ] to | chars\r\n *\r\n *                              [a-z]    any lowercase alpha\r\n *\r\n *                              [^-]]    any char except - and ]\r\n *\r\n *                              [^A-Z]   any char except uppercase\r\n *                                       alpha\r\n *\r\n *                              [a-zA-Z] any alpha\r\n *\r\n *      [5]     *       any regular expression form [1] to [4]\r\n *                      (except [8], [9] and [10] forms of [3]),\r\n *                      followed by closure char (*)\r\n *                      matches zero or more matches of that form.\r\n *\r\n *      [6]     +       same as [5], except it matches one or more.\r\n *\r\n *      [5-6]           Both [5] and [6] are greedy (they match as much as possible).\r\n *                      Unless they are followed by the 'lazy' quantifier (?)\r\n *                      In which case both [5] and [6] try to match as little as possible\r\n *\r\n *      [7]     ?       same as [5] except it matches zero or one.\r\n *\r\n *      [8]             a regular expression in the form [1] to [13], enclosed\r\n *                      as \\(form\\) (or (form) with posix flag) matches what\r\n *                      form matches. The enclosure creates a set of tags,\r\n *                      used for [9] and for pattern substitution.\r\n *                      The tagged forms are numbered starting from 1.\r\n *\r\n *      [9]             a \\ followed by a digit 1 to 9 matches whatever a\r\n *                      previously tagged regular expression ([8]) matched.\r\n *\r\n *      [10]    \\<      a regular expression starting with a \\< construct\r\n *              \\>      and/or ending with a \\> construct, restricts the\r\n *                      pattern matching to the beginning of a word, and/or\r\n *                      the end of a word. A word is defined to be a character\r\n *                      string beginning and/or ending with the characters\r\n *                      A-Z a-z 0-9 and _. Scintilla extends this definition\r\n *                      by user setting. The word must also be preceded and/or\r\n *                      followed by any character outside those mentioned.\r\n *\r\n *      [11]    \\l      a backslash followed by d, D, s, S, w or W,\r\n *                      becomes a character class (both inside and\r\n *                      outside sets []).\r\n *                        d: decimal digits\r\n *                        D: any char except decimal digits\r\n *                        s: whitespace (space, \\t \\n \\r \\f \\v)\r\n *                        S: any char except whitespace (see above)\r\n *                        w: alphanumeric & underscore (changed by user setting)\r\n *                        W: any char except alphanumeric & underscore (see above)\r\n *\r\n *      [12]    \\xHH    a backslash followed by x and two hexa digits,\r\n *                      becomes the character whose ASCII code is equal\r\n *                      to these digits. If not followed by two digits,\r\n *                      it is 'x' char itself.\r\n *\r\n *      [13]            a composite regular expression xy where x and y\r\n *                      are in the form [1] to [12] matches the longest\r\n *                      match of x followed by a match for y.\r\n *\r\n *      [14]    ^       a regular expression starting with a ^ character\r\n *              $       and/or ending with a $ character, restricts the\r\n *                      pattern matching to the beginning of the line,\r\n *                      or the end of line. [anchors] Elsewhere in the\r\n *                      pattern, ^ and $ are treated as ordinary characters.\r\n *\r\n *\r\n * Acknowledgements:\r\n *\r\n *  HCR's Hugh Redelmeier has been most helpful in various\r\n *  stages of development. He convinced me to include BOW\r\n *  and EOW constructs, originally invented by Rob Pike at\r\n *  the University of Toronto.\r\n *\r\n * References:\r\n *              Software tools                  Kernighan & Plauger\r\n *              Software tools in Pascal        Kernighan & Plauger\r\n *              Grep [rsx-11 C dist]            David Conroy\r\n *              ed - text editor                Un*x Programmer's Manual\r\n *              Advanced editing on Un*x        B. W. Kernighan\r\n *              RegExp routines                 Henry Spencer\r\n *\r\n * Notes:\r\n *\r\n *  This implementation uses a bit-set representation for character\r\n *  classes for speed and compactness. Each character is represented\r\n *  by one bit in a 256-bit block. Thus, CCL always takes a\r\n *\tconstant 32 bytes in the internal nfa, and RESearch::Execute does a single\r\n *  bit comparison to locate the character in the set.\r\n *\r\n * Examples:\r\n *\r\n *  pattern:    foo*.*\r\n *  compile:    CHR f CHR o CLO CHR o END CLO ANY END END\r\n *  matches:    fo foo fooo foobar fobar foxx ...\r\n *\r\n *  pattern:    fo[ob]a[rz]\r\n *  compile:    CHR f CHR o CCL bitset CHR a CCL bitset END\r\n *  matches:    fobar fooar fobaz fooaz\r\n *\r\n *  pattern:    foo\\\\+\r\n *  compile:    CHR f CHR o CHR o CHR \\ CLO CHR \\ END END\r\n *  matches:    foo\\ foo\\\\ foo\\\\\\  ...\r\n *\r\n *  pattern:    \\(foo\\)[1-3]\\1  (same as foo[1-3]foo)\r\n *  compile:    BOT 1 CHR f CHR o CHR o EOT 1 CCL bitset REF 1 END\r\n *  matches:    foo1foo foo2foo foo3foo\r\n *\r\n *  pattern:    \\(fo.*\\)-\\1\r\n *  compile:    BOT 1 CHR f CHR o CLO ANY END EOT 1 CHR - REF 1 END\r\n *  matches:    foo-foo fo-fo fob-fob foobar-foobar ...\r\n */\r\n\r\n#include <cstddef>\r\n#include <cstdlib>\r\n#include <cstdint>\r\n\r\n#include <stdexcept>\r\n#include <string>\r\n#include <array>\r\n#include <algorithm>\r\n#include <iterator>\r\n\r\n#include \"Position.h\"\r\n#include \"CharClassify.h\"\r\n#include \"RESearch.h\"\r\n\r\nusing namespace Scintilla::Internal;\r\n\r\n#define OKP     1\r\n#define NOP     0\r\n\r\n#define CHR     1\r\n#define ANY     2\r\n#define CCL     3\r\n#define BOL     4\r\n#define EOL     5\r\n#define BOT     6\r\n#define EOT     7\r\n#define BOW     8\r\n#define EOW     9\r\n#define REF     10\r\n#define CLO     11\r\n#define CLQ     12 /* 0 to 1 closure */\r\n#define LCLO    13 /* lazy closure */\r\n\r\n#define END     0\r\n\r\n/*\r\n * The following defines are not meant to be changeable.\r\n * They are for readability only.\r\n */\r\n#define BITIND  07\r\n\r\n#define badpat(x)\t(*nfa = END, x)\r\n\r\n/*\r\n * Character classification table for word boundary operators BOW\r\n * and EOW is passed in by the creator of this object (Scintilla\r\n * Document). The Document default state is that word chars are:\r\n * 0-9, a-z, A-Z and _\r\n */\r\n\r\nRESearch::RESearch(CharClassify *charClassTable) {\r\n\tfailure = 0;\r\n\tcharClass = charClassTable;\r\n\tsta = NOP;                  /* status of lastpat */\r\n\tlineStartPos = 0;\r\n\tlineEndPos = 0;\r\n\tnfa[0] = END;\r\n\tClear();\r\n}\r\n\r\nvoid RESearch::Clear() {\r\n\tbopat.fill(NOTFOUND);\r\n\teopat.fill(NOTFOUND);\r\n}\r\n\r\nvoid RESearch::ChSet(unsigned char c) noexcept {\r\n\tbittab[c >> 3] |= 1 << (c & BITIND);\r\n}\r\n\r\nvoid RESearch::ChSetWithCase(unsigned char c, bool caseSensitive) noexcept {\r\n\tChSet(c);\r\n\tif (!caseSensitive) {\r\n\t\tif ((c >= 'a') && (c <= 'z')) {\r\n\t\t\tChSet(c - 'a' + 'A');\r\n\t\t} else if ((c >= 'A') && (c <= 'Z')) {\r\n\t\t\tChSet(c - 'A' + 'a');\r\n\t\t}\r\n\t}\r\n}\r\n\r\nnamespace {\r\n\r\nconstexpr unsigned char escapeValue(unsigned char ch) noexcept {\r\n\tswitch (ch) {\r\n\tcase 'a':\treturn '\\a';\r\n\tcase 'b':\treturn '\\b';\r\n\tcase 'f':\treturn '\\f';\r\n\tcase 'n':\treturn '\\n';\r\n\tcase 'r':\treturn '\\r';\r\n\tcase 't':\treturn '\\t';\r\n\tcase 'v':\treturn '\\v';\r\n\tdefault:\tbreak;\r\n\t}\r\n\treturn 0;\r\n}\r\n\r\nconstexpr int GetHexaChar(unsigned char hd1, unsigned char hd2) noexcept {\r\n\tint hexValue = 0;\r\n\tif (hd1 >= '0' && hd1 <= '9') {\r\n\t\thexValue += 16 * (hd1 - '0');\r\n\t} else if (hd1 >= 'A' && hd1 <= 'F') {\r\n\t\thexValue += 16 * (hd1 - 'A' + 10);\r\n\t} else if (hd1 >= 'a' && hd1 <= 'f') {\r\n\t\thexValue += 16 * (hd1 - 'a' + 10);\r\n\t} else {\r\n\t\treturn -1;\r\n\t}\r\n\tif (hd2 >= '0' && hd2 <= '9') {\r\n\t\thexValue += hd2 - '0';\r\n\t} else if (hd2 >= 'A' && hd2 <= 'F') {\r\n\t\thexValue += hd2 - 'A' + 10;\r\n\t} else if (hd2 >= 'a' && hd2 <= 'f') {\r\n\t\thexValue += hd2 - 'a' + 10;\r\n\t} else {\r\n\t\treturn -1;\r\n\t}\r\n\treturn hexValue;\r\n}\r\n\r\nconstexpr int isinset(const char *ap, unsigned char c) noexcept {\r\n\treturn ap[c >> 3] & (1 << (c & BITIND));\r\n}\r\n\r\n}\r\n\r\n/**\r\n * Called when the parser finds a backslash not followed\r\n * by a valid expression (like \\( in non-Posix mode).\r\n * @param pattern : pointer on the char after the backslash.\r\n * @param incr : (out) number of chars to skip after expression evaluation.\r\n * @return the char if it resolves to a simple char,\r\n * or -1 for a char class. In this case, bittab is changed.\r\n */\r\nint RESearch::GetBackslashExpression(const char *pattern, int &incr) noexcept {\r\n\t// Since error reporting is primitive and messages are not used anyway,\r\n\t// I choose to interpret unexpected syntax in a logical way instead\r\n\t// of reporting errors. Otherwise, we can stick on, eg., PCRE behaviour.\r\n\tincr = 0;\t// Most of the time, will skip the char \"naturally\".\r\n\tint result = -1;\r\n\tconst unsigned char bsc = *pattern;\r\n\tif (!bsc) {\r\n\t\t// Avoid overrun\r\n\t\tresult = '\\\\';\t// \\ at end of pattern, take it literally\r\n\t\treturn result;\r\n\t}\r\n\r\n\tswitch (bsc) {\r\n\tcase 'a':\r\n\tcase 'b':\r\n\tcase 'n':\r\n\tcase 'f':\r\n\tcase 'r':\r\n\tcase 't':\r\n\tcase 'v':\r\n\t\tresult = escapeValue(bsc);\r\n\t\tbreak;\r\n\tcase 'x': {\r\n\t\t\tconst unsigned char hd1 = *(pattern + 1);\r\n\t\t\tconst unsigned char hd2 = *(pattern + 2);\r\n\t\t\tconst int hexValue = GetHexaChar(hd1, hd2);\r\n\t\t\tif (hexValue >= 0) {\r\n\t\t\t\tresult = hexValue;\r\n\t\t\t\tincr = 2;\t// Must skip the digits\r\n\t\t\t} else {\r\n\t\t\t\tresult = 'x';\t// \\x without 2 digits: see it as 'x'\r\n\t\t\t}\r\n\t\t}\r\n\t\tbreak;\r\n\tcase 'd':\r\n\t\tfor (int c = '0'; c <= '9'; c++) {\r\n\t\t\tChSet(static_cast<unsigned char>(c));\r\n\t\t}\r\n\t\tbreak;\r\n\tcase 'D':\r\n\t\tfor (int c = 0; c < MAXCHR; c++) {\r\n\t\t\tif (c < '0' || c > '9') {\r\n\t\t\t\tChSet(static_cast<unsigned char>(c));\r\n\t\t\t}\r\n\t\t}\r\n\t\tbreak;\r\n\tcase 's':\r\n\t\tChSet(' ');\r\n\t\tChSet('\\t');\r\n\t\tChSet('\\n');\r\n\t\tChSet('\\r');\r\n\t\tChSet('\\f');\r\n\t\tChSet('\\v');\r\n\t\tbreak;\r\n\tcase 'S':\r\n\t\tfor (int c = 0; c < MAXCHR; c++) {\r\n\t\t\tif (c != ' ' && !(c >= 0x09 && c <= 0x0D)) {\r\n\t\t\t\tChSet(static_cast<unsigned char>(c));\r\n\t\t\t}\r\n\t\t}\r\n\t\tbreak;\r\n\tcase 'w':\r\n\t\tfor (int c = 0; c < MAXCHR; c++) {\r\n\t\t\tif (iswordc(static_cast<unsigned char>(c))) {\r\n\t\t\t\tChSet(static_cast<unsigned char>(c));\r\n\t\t\t}\r\n\t\t}\r\n\t\tbreak;\r\n\tcase 'W':\r\n\t\tfor (int c = 0; c < MAXCHR; c++) {\r\n\t\t\tif (!iswordc(static_cast<unsigned char>(c))) {\r\n\t\t\t\tChSet(static_cast<unsigned char>(c));\r\n\t\t\t}\r\n\t\t}\r\n\t\tbreak;\r\n\tdefault:\r\n\t\tresult = bsc;\r\n\t}\r\n\treturn result;\r\n}\r\n\r\nconst char *RESearch::Compile(const char *pattern, Sci::Position length, bool caseSensitive, bool posix) {\r\n\tif (!pattern || !length) {\r\n\t\tif (sta)\r\n\t\t\treturn nullptr;\r\n\t\telse\r\n\t\t\treturn badpat(\"No previous regular expression\");\r\n\t}\r\n\r\n\tbittab.fill(0);\r\n\tnfa[0] = END;\r\n\r\n\tchar *mp=nfa;          /* nfa pointer       */\r\n\tchar *sp=nfa;          /* another saved pointer */\r\n\tconst char * const mpMax = mp + MAXNFA - BITBLK - 10;\r\n\r\n\tint tagstk[MAXTAG]{};  /* subpat tag stack */\r\n\tint tagi = 0;          /* tag stack index   */\r\n\tint tagc = 1;          /* actual tag count  */\r\n\r\n\tsta = NOP;\r\n\r\n\tconst char *p=pattern;     /* pattern pointer   */\r\n\tfor (int i=0; i<length; i++, p++) {\r\n\t\tif (mp > mpMax)\r\n\t\t\treturn badpat(\"Pattern too long\");\r\n\t\tchar *lp = mp;\t\t\t/* saved pointer     */\r\n\t\tswitch (*p) {\r\n\r\n\t\tcase '.':               /* match any char  */\r\n\t\t\t*mp++ = ANY;\r\n\t\t\tbreak;\r\n\r\n\t\tcase '^':               /* match beginning */\r\n\t\t\tif (p == pattern) {\r\n\t\t\t\t*mp++ = BOL;\r\n\t\t\t} else {\r\n\t\t\t\t*mp++ = CHR;\r\n\t\t\t\t*mp++ = *p;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\tcase '$':               /* match endofline */\r\n\t\t\tif (!p[1]) {\r\n\t\t\t\t*mp++ = EOL;\r\n\t\t\t} else {\r\n\t\t\t\t*mp++ = CHR;\r\n\t\t\t\t*mp++ = *p;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\tcase '[': {               /* match char class */\r\n\t\t\tint prevChar = 0;\r\n\t\t\tchar mask = 0;      /* xor mask -CCL/NCL */\r\n\r\n\t\t\ti++;\r\n\t\t\tif (*++p == '^') {\r\n\t\t\t\tmask = '\\377';\r\n\t\t\t\ti++;\r\n\t\t\t\tp++;\r\n\t\t\t}\r\n\r\n\t\t\tif (*p == '-') {\t/* real dash */\r\n\t\t\t\ti++;\r\n\t\t\t\tprevChar = *p;\r\n\t\t\t\tChSet(*p++);\r\n\t\t\t}\r\n\t\t\tif (*p == ']') {\t/* real brace */\r\n\t\t\t\ti++;\r\n\t\t\t\tprevChar = *p;\r\n\t\t\t\tChSet(*p++);\r\n\t\t\t}\r\n\t\t\twhile (*p && *p != ']') {\r\n\t\t\t\tif (*p == '-') {\r\n\t\t\t\t\tif (prevChar < 0) {\r\n\t\t\t\t\t\t// Previous def. was a char class like \\d, take dash literally\r\n\t\t\t\t\t\tprevChar = *p;\r\n\t\t\t\t\t\tChSet(*p);\r\n\t\t\t\t\t} else if (p[1]) {\r\n\t\t\t\t\t\tif (p[1] != ']') {\r\n\t\t\t\t\t\t\tint c1 = prevChar + 1;\r\n\t\t\t\t\t\t\ti++;\r\n\t\t\t\t\t\t\tint c2 = static_cast<unsigned char>(*++p);\r\n\t\t\t\t\t\t\tif (c2 == '\\\\') {\r\n\t\t\t\t\t\t\t\tif (!p[1]) {\t// End of RE\r\n\t\t\t\t\t\t\t\t\treturn badpat(\"Missing ]\");\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\ti++;\r\n\t\t\t\t\t\t\t\t\tp++;\r\n\t\t\t\t\t\t\t\t\tint incr = 0;\r\n\t\t\t\t\t\t\t\t\tc2 = GetBackslashExpression(p, incr);\r\n\t\t\t\t\t\t\t\t\ti += incr;\r\n\t\t\t\t\t\t\t\t\tp += incr;\r\n\t\t\t\t\t\t\t\t\tif (c2 >= 0) {\r\n\t\t\t\t\t\t\t\t\t\t// Convention: \\c (c is any char) is case sensitive, whatever the option\r\n\t\t\t\t\t\t\t\t\t\tChSet(static_cast<unsigned char>(c2));\r\n\t\t\t\t\t\t\t\t\t\tprevChar = c2;\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t// bittab is already changed\r\n\t\t\t\t\t\t\t\t\t\tprevChar = -1;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (prevChar < 0) {\r\n\t\t\t\t\t\t\t\t// Char after dash is char class like \\d, take dash literally\r\n\t\t\t\t\t\t\t\tprevChar = '-';\r\n\t\t\t\t\t\t\t\tChSet('-');\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t// Put all chars between c1 and c2 included in the char set\r\n\t\t\t\t\t\t\t\twhile (c1 <= c2) {\r\n\t\t\t\t\t\t\t\t\tChSetWithCase(static_cast<unsigned char>(c1++), caseSensitive);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// Dash before the ], take it literally\r\n\t\t\t\t\t\t\tprevChar = *p;\r\n\t\t\t\t\t\t\tChSet(*p);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\treturn badpat(\"Missing ]\");\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (*p == '\\\\' && p[1]) {\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\tp++;\r\n\t\t\t\t\tint incr = 0;\r\n\t\t\t\t\tconst int c = GetBackslashExpression(p, incr);\r\n\t\t\t\t\ti += incr;\r\n\t\t\t\t\tp += incr;\r\n\t\t\t\t\tif (c >= 0) {\r\n\t\t\t\t\t\t// Convention: \\c (c is any char) is case sensitive, whatever the option\r\n\t\t\t\t\t\tChSet(static_cast<unsigned char>(c));\r\n\t\t\t\t\t\tprevChar = c;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// bittab is already changed\r\n\t\t\t\t\t\tprevChar = -1;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprevChar = static_cast<unsigned char>(*p);\r\n\t\t\t\t\tChSetWithCase(*p, caseSensitive);\r\n\t\t\t\t}\r\n\t\t\t\ti++;\r\n\t\t\t\tp++;\r\n\t\t\t}\r\n\t\t\tif (!*p)\r\n\t\t\t\treturn badpat(\"Missing ]\");\r\n\r\n\t\t\t*mp++ = CCL;\r\n\t\t\tfor (const unsigned char byte : bittab) {\r\n\t\t\t\t*mp++ = mask ^ byte;\r\n\t\t\t}\r\n\t\t\tbittab.fill(0);\r\n\t\t} break;\r\n\r\n\t\tcase '*':               /* match 0 or more... */\r\n\t\tcase '+':               /* match 1 or more... */\r\n\t\tcase '?':\r\n\t\t\tif (p == pattern)\r\n\t\t\t\treturn badpat(\"Empty closure\");\r\n\t\t\tlp = sp;\t\t/* previous opcode */\r\n\t\t\tif (*lp == CLO || *lp == LCLO)\t\t/* equivalence... */\r\n\t\t\t\tbreak;\r\n\t\t\tswitch (*lp) {\r\n\r\n\t\t\tcase BOL:\r\n\t\t\tcase BOT:\r\n\t\t\tcase EOT:\r\n\t\t\tcase BOW:\r\n\t\t\tcase EOW:\r\n\t\t\tcase REF:\r\n\t\t\t\treturn badpat(\"Illegal closure\");\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif (*p == '+')\r\n\t\t\t\tfor (sp = mp; lp < sp; lp++)\r\n\t\t\t\t\t*mp++ = *lp;\r\n\r\n\t\t\t*mp++ = END;\r\n\t\t\t*mp++ = END;\r\n\t\t\tsp = mp;\r\n\r\n\t\t\twhile (--mp > lp)\r\n\t\t\t\t*mp = mp[-1];\r\n\t\t\tif (*p == '?')          *mp = CLQ;\r\n\t\t\telse if (p[1] == '?') *mp = LCLO;\r\n\t\t\telse                    *mp = CLO;\r\n\r\n\t\t\tmp = sp;\r\n\t\t\tbreak;\r\n\r\n\t\tcase '\\\\':              /* tags, backrefs... */\r\n\t\t\ti++;\r\n\t\t\tswitch (*++p) {\r\n\t\t\tcase '<':\r\n\t\t\t\t*mp++ = BOW;\r\n\t\t\t\tbreak;\r\n\t\t\tcase '>':\r\n\t\t\t\tif (*sp == BOW)\r\n\t\t\t\t\treturn badpat(\"Null pattern inside \\\\<\\\\>\");\r\n\t\t\t\t*mp++ = EOW;\r\n\t\t\t\tbreak;\r\n\t\t\tcase '1':\r\n\t\t\tcase '2':\r\n\t\t\tcase '3':\r\n\t\t\tcase '4':\r\n\t\t\tcase '5':\r\n\t\t\tcase '6':\r\n\t\t\tcase '7':\r\n\t\t\tcase '8':\r\n\t\t\tcase '9': {\r\n\t\t\t\tconst int n = *p-'0';\r\n\t\t\t\tif (tagi > 0 && tagstk[tagi] == n)\r\n\t\t\t\t\treturn badpat(\"Cyclical reference\");\r\n\t\t\t\tif (tagc > n) {\r\n\t\t\t\t\t*mp++ = REF;\r\n\t\t\t\t\t*mp++ = static_cast<char>(n);\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn badpat(\"Undetermined reference\");\r\n\t\t\t\t}\r\n\t\t\t} break;\r\n\t\t\tdefault:\r\n\t\t\t\tif (!posix && *p == '(') {\r\n\t\t\t\t\tif (tagc < MAXTAG) {\r\n\t\t\t\t\t\ttagstk[++tagi] = tagc;\r\n\t\t\t\t\t\t*mp++ = BOT;\r\n\t\t\t\t\t\t*mp++ = static_cast<char>(tagc++);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\treturn badpat(\"Too many \\\\(\\\\) pairs\");\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (!posix && *p == ')') {\r\n\t\t\t\t\tif (*sp == BOT)\r\n\t\t\t\t\t\treturn badpat(\"Null pattern inside \\\\(\\\\)\");\r\n\t\t\t\t\tif (tagi > 0) {\r\n\t\t\t\t\t\t*mp++ = EOT;\r\n\t\t\t\t\t\t*mp++ = static_cast<char>(tagstk[tagi--]);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\treturn badpat(\"Unmatched \\\\)\");\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tint incr = 0;\r\n\t\t\t\t\tconst int c = GetBackslashExpression(p, incr);\r\n\t\t\t\t\ti += incr;\r\n\t\t\t\t\tp += incr;\r\n\t\t\t\t\tif (c >= 0) {\r\n\t\t\t\t\t\t*mp++ = CHR;\r\n\t\t\t\t\t\t*mp++ = static_cast<unsigned char>(c);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t*mp++ = CCL;\r\n\t\t\t\t\t\tfor (const unsigned char byte : bittab) {\r\n\t\t\t\t\t\t\t*mp++ = byte;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbittab.fill(0);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\tdefault :               /* an ordinary char */\r\n\t\t\tif (posix && *p == '(') {\r\n\t\t\t\tif (tagc < MAXTAG) {\r\n\t\t\t\t\ttagstk[++tagi] = tagc;\r\n\t\t\t\t\t*mp++ = BOT;\r\n\t\t\t\t\t*mp++ = static_cast<char>(tagc++);\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn badpat(\"Too many () pairs\");\r\n\t\t\t\t}\r\n\t\t\t} else if (posix && *p == ')') {\r\n\t\t\t\tif (*sp == BOT)\r\n\t\t\t\t\treturn badpat(\"Null pattern inside ()\");\r\n\t\t\t\tif (tagi > 0) {\r\n\t\t\t\t\t*mp++ = EOT;\r\n\t\t\t\t\t*mp++ = static_cast<char>(tagstk[tagi--]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn badpat(\"Unmatched )\");\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tunsigned char c = *p;\r\n\t\t\t\tif (!c)\t// End of RE\r\n\t\t\t\t\tc = '\\\\';\t// We take it as raw backslash\r\n\t\t\t\tif (caseSensitive || !iswordc(c)) {\r\n\t\t\t\t\t*mp++ = CHR;\r\n\t\t\t\t\t*mp++ = c;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tChSetWithCase(c, false);\r\n\t\t\t\t\t*mp++ = CCL;\r\n\t\t\t\t\tfor (const unsigned char byte : bittab) {\r\n\t\t\t\t\t\t*mp++ = byte;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbittab.fill(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tsp = lp;\r\n\t}\r\n\tif (tagi > 0)\r\n\t\treturn badpat((posix ? \"Unmatched (\" : \"Unmatched \\\\(\"));\r\n\t*mp = END;\r\n\tsta = OKP;\r\n\treturn nullptr;\r\n}\r\n\r\n/*\r\n * RESearch::Execute:\r\n *   execute nfa to find a match.\r\n *\r\n *  special cases: (nfa[0])\r\n *      BOL\r\n *          Match only once, starting from the\r\n *          beginning.\r\n *      CHR\r\n *          First locate the character without\r\n *          calling PMatch, and if found, call\r\n *          PMatch for the remaining string.\r\n *      END\r\n *          RESearch::Compile failed, poor luser did not\r\n *          check for it. Fail fast.\r\n *\r\n *  If a match is found, bopat[0] and eopat[0] are set\r\n *  to the beginning and the end of the matched fragment,\r\n *  respectively.\r\n *\r\n */\r\nint RESearch::Execute(const CharacterIndexer &ci, Sci::Position lp, Sci::Position endp) {\r\n\tSci::Position ep = NOTFOUND;\r\n\tconst char * const ap = nfa;\r\n\r\n\tfailure = 0;\r\n\r\n\tClear();\r\n\r\n\tswitch (*ap) {\r\n\r\n\tcase BOL:\t\t\t/* anchored: match from BOL only */\r\n\t\tep = PMatch(ci, lp, endp, ap);\r\n\t\tbreak;\r\n\tcase EOL:\t\t\t/* just searching for end of line normal path doesn't work */\r\n\t\tif (endp == lineEndPos && ap[1] == END) {\r\n\t\t\tlp = endp;\r\n\t\t\tep = lp;\r\n\t\t\tbreak;\r\n\t\t} else {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\tcase CHR: {\t\t\t/* ordinary char: locate it fast */\r\n\t\tconst unsigned char c = ap[1];\r\n\t\twhile ((lp < endp) && (static_cast<unsigned char>(ci.CharAt(lp)) != c))\r\n\t\t\tlp++;\r\n\t\tif (lp >= endp)\t/* if EOS, fail, else fall through. */\r\n\t\t\treturn 0;\r\n\t}\r\n\t[[fallthrough]];\r\n\tdefault:\t\t\t/* regular matching all the way. */\r\n\t\twhile (lp < endp) {\r\n\t\t\tep = PMatch(ci, lp, endp, ap);\r\n\t\t\tif (ep != NOTFOUND) {\r\n\t\t\t\t// fix match started from middle of character like DBCS trailing ASCII byte\r\n\t\t\t\tconst Sci::Position pos = ci.MovePositionOutsideChar(lp, -1);\r\n\t\t\t\tif (pos != lp) {\r\n\t\t\t\t\tep = NOTFOUND;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tlp++;\r\n\t\t}\r\n\t\tbreak;\r\n\tcase END:\t\t\t/* munged automaton. fail always */\r\n\t\treturn 0;\r\n\t}\r\n\tif (ep == NOTFOUND) {\r\n\t\t/* similar to EOL, match EOW at line end */\r\n\t\tif (endp == lineEndPos && *ap == EOW) {\r\n\t\t\tif ((ap[1] == END || ((ap[1] == EOL && ap[2] == END))) && iswordc(ci.CharAt(lp - 1))) {\r\n\t\t\t\tlp = endp;\r\n\t\t\t\tep = lp;\r\n\t\t\t} else {\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}\r\n\r\n\tep = ci.MovePositionOutsideChar(ep, 1);\r\n\tbopat[0] = lp;\r\n\teopat[0] = ep;\r\n\treturn 1;\r\n}\r\n\r\n/*\r\n * PMatch: internal routine for the hard part\r\n *\r\n *  This code is partly snarfed from an early grep written by\r\n *  David Conroy. The backref and tag stuff, and various other\r\n *  innovations are by oz.\r\n *\r\n *  special case optimizations: (nfa[n], nfa[n+1])\r\n *      CLO ANY\r\n *          We KNOW .* will match everything up to the\r\n *          end of line. Thus, directly go to the end of\r\n *          line, without recursive PMatch calls. As in\r\n *          the other closure cases, the remaining pattern\r\n *          must be matched by moving backwards on the\r\n *          string recursively, to find a match for xy\r\n *          (x is \".*\" and y is the remaining pattern)\r\n *          where the match satisfies the LONGEST match for\r\n *          x followed by a match for y.\r\n *      CLO CHR\r\n *          We can again scan the string forward for the\r\n *          single char and at the point of failure, we\r\n *          execute the remaining nfa recursively, same as\r\n *          above.\r\n *\r\n *  At the end of a successful match, bopat[n] and eopat[n]\r\n *  are set to the beginning and end of subpatterns matched\r\n *  by tagged expressions (n = 1 to 9).\r\n */\r\n\r\n//extern void re_fail(char *,char);\r\n\r\n/*\r\n * skip values for CLO XXX to skip past the closure\r\n */\r\n\r\n#define ANYSKIP 2 \t/* [CLO] ANY END          */\r\n#define CHRSKIP 3\t/* [CLO] CHR chr END      */\r\n#define CCLSKIP 34\t/* [CLO] CCL 32 bytes END */\r\n\r\nSci::Position RESearch::PMatch(const CharacterIndexer &ci, Sci::Position lp, Sci::Position endp, const char *ap) {\r\n\tunsigned char op = 0;\r\n\r\n\twhile ((op = *ap++) != END)\r\n\t\tswitch (op) {\r\n\r\n\t\tcase CHR:\r\n\t\t\tif (ci.CharAt(lp++) != *ap++)\r\n\t\t\t\treturn NOTFOUND;\r\n\t\t\tbreak;\r\n\t\tcase ANY:\r\n\t\t\tif (lp++ >= endp)\r\n\t\t\t\treturn NOTFOUND;\r\n\t\t\tbreak;\r\n\t\tcase CCL:\r\n\t\t\tif (lp >= endp)\r\n\t\t\t\treturn NOTFOUND;\r\n\t\t\tif (!isinset(ap, ci.CharAt(lp++)))\r\n\t\t\t\treturn NOTFOUND;\r\n\t\t\tap += BITBLK;\r\n\t\t\tbreak;\r\n\t\tcase BOL:\r\n\t\t\tif (lp != lineStartPos)\r\n\t\t\t\treturn NOTFOUND;\r\n\t\t\tbreak;\r\n\t\tcase EOL:\r\n\t\t\tif (lp < lineEndPos)\r\n\t\t\t\treturn NOTFOUND;\r\n\t\t\tbreak;\r\n\t\tcase BOT:\r\n\t\t\tif (lp != ci.MovePositionOutsideChar(lp, -1)) {\r\n\t\t\t\treturn NOTFOUND;\r\n\t\t\t}\r\n\t\t\tbopat[static_cast<unsigned char>(*ap++)] = lp;\r\n\t\t\tbreak;\r\n\t\tcase EOT:\r\n\t\t\tlp = ci.MovePositionOutsideChar(lp, 1);\r\n\t\t\teopat[static_cast<unsigned char>(*ap++)] = lp;\r\n\t\t\tbreak;\r\n\t\tcase BOW:\r\n\t\t\tif ((lp!=lineStartPos && iswordc(ci.CharAt(lp-1))) || !iswordc(ci.CharAt(lp)))\r\n\t\t\t\treturn NOTFOUND;\r\n\t\t\tbreak;\r\n\t\tcase EOW:\r\n\t\t\tif (lp==lineStartPos || !iswordc(ci.CharAt(lp-1)) || iswordc(ci.CharAt(lp)))\r\n\t\t\t\treturn NOTFOUND;\r\n\t\t\tbreak;\r\n\t\tcase REF: {\r\n\t\t\tconst int n = static_cast<unsigned char>(*ap++);\r\n\t\t\tSci::Position bp = bopat[n];\t\t/* beginning of subpat... */\r\n\t\t\tconst Sci::Position ep = eopat[n];\t/* ending of subpat...    */\r\n\t\t\twhile (bp < ep)\r\n\t\t\t\tif (ci.CharAt(bp++) != ci.CharAt(lp++))\r\n\t\t\t\t\treturn NOTFOUND;\r\n\t\t} break;\r\n\t\tcase LCLO:\r\n\t\tcase CLQ:\r\n\t\tcase CLO: {\r\n\t\t\tint n = 0;\r\n\t\t\tconst Sci::Position are = lp;\t/* to save the line ptr.  */\r\n\t\t\tswitch (*ap) {\r\n\r\n\t\t\tcase ANY:\r\n\t\t\t\tif (op == CLO || op == LCLO)\r\n\t\t\t\t\twhile (lp < endp)\r\n\t\t\t\t\t\tlp++;\r\n\t\t\t\telse if (lp < endp)\r\n\t\t\t\t\tlp++;\r\n\r\n\t\t\t\tn = ANYSKIP;\r\n\t\t\t\tbreak;\r\n\t\t\tcase CHR: {\r\n\t\t\t\tconst char c = ap[1];\r\n\t\t\t\tif (op == CLO || op == LCLO)\r\n\t\t\t\t\twhile ((lp < endp) && (c == ci.CharAt(lp)))\r\n\t\t\t\t\t\tlp++;\r\n\t\t\t\telse if ((lp < endp) && (c == ci.CharAt(lp)))\r\n\t\t\t\t\tlp++;\r\n\t\t\t\tn = CHRSKIP;\r\n\t\t\t} break;\r\n\t\t\tcase CCL:\r\n\t\t\t\twhile ((lp < endp) && isinset(ap+1, ci.CharAt(lp)))\r\n\t\t\t\t\tlp++;\r\n\t\t\t\tn = CCLSKIP;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tfailure = true;\r\n\t\t\t\t//re_fail(\"closure: bad nfa.\", *ap);\r\n\t\t\t\treturn NOTFOUND;\r\n\t\t\t}\r\n\t\t\tap += n;\r\n\r\n\t\t\tSci::Position llp = lp;\t\t/* lazy lp for LCLO       */\r\n\t\t\tSci::Position e = NOTFOUND; /* extra pointer for CLO  */\r\n\t\t\twhile (llp >= are) {\r\n\t\t\t\tconst Sci::Position q = PMatch(ci, llp, endp, ap);\r\n\t\t\t\tif (q != NOTFOUND) {\r\n\t\t\t\t\te = q;\r\n\t\t\t\t\tlp = llp;\r\n\t\t\t\t\tif (op != LCLO) return e;\r\n\t\t\t\t}\r\n\t\t\t\tif (*ap == END) return e;\r\n\t\t\t\t--llp;\r\n\t\t\t}\r\n\t\t\tif (*ap == EOT)\r\n\t\t\t\tPMatch(ci, lp, endp, ap);\r\n\t\t\treturn e;\r\n\t\t}\r\n\t\tdefault:\r\n\t\t\t//re_fail(\"RESearch::Execute: bad nfa.\", static_cast<char>(op));\r\n\t\t\treturn NOTFOUND;\r\n\t\t}\r\n\treturn lp;\r\n}\r\n"
  },
  {
    "path": "scintilla/src/RESearch.h",
    "content": "// Scintilla source code edit control\r\n/** @file RESearch.h\r\n ** Interface to the regular expression search library.\r\n **/\r\n// Written by Neil Hodgson <neilh@scintilla.org>\r\n// Based on the work of Ozan S. Yigit.\r\n// This file is in the public domain.\r\n\r\n#ifndef RESEARCH_H\r\n#define RESEARCH_H\r\n\r\nnamespace Scintilla::Internal {\r\n\r\nclass CharacterIndexer {\r\npublic:\r\n\tvirtual char CharAt(Sci::Position index) const=0;\r\n\tvirtual Sci::Position MovePositionOutsideChar(Sci::Position pos, [[maybe_unused]] Sci::Position moveDir) const noexcept=0;\r\n};\r\n\r\nclass RESearch {\r\n\r\npublic:\r\n\texplicit RESearch(CharClassify *charClassTable);\r\n\t// No dynamic allocation so default copy constructor and assignment operator are OK.\r\n\tvoid Clear();\r\n\tconst char *Compile(const char *pattern, Sci::Position length, bool caseSensitive, bool posix);\r\n\tint Execute(const CharacterIndexer &ci, Sci::Position lp, Sci::Position endp);\r\n\tvoid SetLineRange(Sci::Position startPos, Sci::Position endPos) noexcept {\r\n\t\tlineStartPos = startPos;\r\n\t\tlineEndPos = endPos;\r\n\t}\r\n\r\n\tstatic constexpr int MAXTAG = 10;\r\n\tstatic constexpr int NOTFOUND = -1;\r\n\r\n\tusing MatchPositions = std::array<Sci::Position, MAXTAG>;\r\n\tMatchPositions bopat;\r\n\tMatchPositions eopat;\r\n\r\nprivate:\r\n\r\n\tstatic constexpr int MAXNFA = 4096;\r\n\t// The following constants are not meant to be changeable.\r\n\t// They are for readability only.\r\n\tstatic constexpr int MAXCHR = 256;\r\n\tstatic constexpr int CHRBIT = 8;\r\n\tstatic constexpr int BITBLK = MAXCHR / CHRBIT;\r\n\r\n\tvoid ChSet(unsigned char c) noexcept;\r\n\tvoid ChSetWithCase(unsigned char c, bool caseSensitive) noexcept;\r\n\tint GetBackslashExpression(const char *pattern, int &incr) noexcept;\r\n\r\n\tSci::Position PMatch(const CharacterIndexer &ci, Sci::Position lp, Sci::Position endp, const char *ap);\r\n\r\n\t// positions to match line start and line end\r\n\tSci::Position lineStartPos;\r\n\tSci::Position lineEndPos;\r\n\tchar nfa[MAXNFA];    /* automaton */\r\n\tint sta;\r\n\tint failure;\r\n\tstd::array<unsigned char, BITBLK> bittab {}; /* bit table for CCL pre-set bits */\r\n\tCharClassify *charClass;\r\n\tbool iswordc(unsigned char x) const noexcept {\r\n\t\treturn charClass->IsWord(x);\r\n\t}\r\n};\r\n\r\n}\r\n\r\n#endif\r\n\r\n"
  },
  {
    "path": "scintilla/src/RunStyles.cxx",
    "content": "/** @file RunStyles.cxx\r\n ** Data structure used to store sparse styles.\r\n **/\r\n// Copyright 1998-2007 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#include <cstddef>\r\n#include <cstdlib>\r\n#include <cstdint>\r\n#include <cstring>\r\n#include <cstdio>\r\n#include <cstdarg>\r\n#include <climits>\r\n\r\n#include <stdexcept>\r\n#include <string_view>\r\n#include <vector>\r\n#include <optional>\r\n#include <algorithm>\r\n#include <memory>\r\n\r\n#include \"Debugging.h\"\r\n\r\n#include \"Position.h\"\r\n#include \"SplitVector.h\"\r\n#include \"Partitioning.h\"\r\n#include \"RunStyles.h\"\r\n\r\nusing namespace Scintilla::Internal;\r\n\r\n// Find the first run at a position\r\ntemplate <typename DISTANCE, typename STYLE>\r\nDISTANCE RunStyles<DISTANCE, STYLE>::RunFromPosition(DISTANCE position) const noexcept {\r\n\tDISTANCE run = starts.PartitionFromPosition(position);\r\n\t// Go to first element with this position\r\n\twhile ((run > 0) && (position == starts.PositionFromPartition(run-1))) {\r\n\t\trun--;\r\n\t}\r\n\treturn run;\r\n}\r\n\r\n// If there is no run boundary at position, insert one continuing style.\r\ntemplate <typename DISTANCE, typename STYLE>\r\nDISTANCE RunStyles<DISTANCE, STYLE>::SplitRun(DISTANCE position) {\r\n\tDISTANCE run = RunFromPosition(position);\r\n\tconst DISTANCE posRun = starts.PositionFromPartition(run);\r\n\tif (posRun < position) {\r\n\t\tSTYLE runStyle = ValueAt(position);\r\n\t\trun++;\r\n\t\tstarts.InsertPartition(run, position);\r\n\t\tstyles.InsertValue(run, 1, runStyle);\r\n\t}\r\n\treturn run;\r\n}\r\n\r\ntemplate <typename DISTANCE, typename STYLE>\r\nvoid RunStyles<DISTANCE, STYLE>::RemoveRun(DISTANCE run) {\r\n\tstarts.RemovePartition(run);\r\n\tstyles.DeleteRange(run, 1);\r\n}\r\n\r\ntemplate <typename DISTANCE, typename STYLE>\r\nvoid RunStyles<DISTANCE, STYLE>::RemoveRunIfEmpty(DISTANCE run) {\r\n\tif ((run < starts.Partitions()) && (starts.Partitions() > 1)) {\r\n\t\tif (starts.PositionFromPartition(run) == starts.PositionFromPartition(run+1)) {\r\n\t\t\tRemoveRun(run);\r\n\t\t}\r\n\t}\r\n}\r\n\r\ntemplate <typename DISTANCE, typename STYLE>\r\nvoid RunStyles<DISTANCE, STYLE>::RemoveRunIfSameAsPrevious(DISTANCE run) {\r\n\tif ((run > 0) && (run < starts.Partitions())) {\r\n\t\tconst DISTANCE runBefore = run - 1;\r\n\t\tif (styles.ValueAt(runBefore) == styles.ValueAt(run)) {\r\n\t\t\tRemoveRun(run);\r\n\t\t}\r\n\t}\r\n}\r\n\r\ntemplate <typename DISTANCE, typename STYLE>\r\nRunStyles<DISTANCE, STYLE>::RunStyles() {\r\n\tstarts = Partitioning<DISTANCE>(8);\r\n\tstyles = SplitVector<STYLE>();\r\n\tstyles.InsertValue(0, 2, 0);\r\n}\r\n\r\ntemplate <typename DISTANCE, typename STYLE>\r\nDISTANCE RunStyles<DISTANCE, STYLE>::Length() const noexcept {\r\n\treturn starts.PositionFromPartition(starts.Partitions());\r\n}\r\n\r\ntemplate <typename DISTANCE, typename STYLE>\r\nSTYLE RunStyles<DISTANCE, STYLE>::ValueAt(DISTANCE position) const noexcept {\r\n\treturn styles.ValueAt(starts.PartitionFromPosition(position));\r\n}\r\n\r\ntemplate <typename DISTANCE, typename STYLE>\r\nDISTANCE RunStyles<DISTANCE, STYLE>::FindNextChange(DISTANCE position, DISTANCE end) const noexcept {\r\n\tconst DISTANCE run = starts.PartitionFromPosition(position);\r\n\tif (run < starts.Partitions()) {\r\n\t\tconst DISTANCE runChange = starts.PositionFromPartition(run);\r\n\t\tif (runChange > position)\r\n\t\t\treturn runChange;\r\n\t\tconst DISTANCE nextChange = starts.PositionFromPartition(run + 1);\r\n\t\tif (nextChange > position) {\r\n\t\t\treturn nextChange;\r\n\t\t} else if (position < end) {\r\n\t\t\treturn end;\r\n\t\t} else {\r\n\t\t\treturn end + 1;\r\n\t\t}\r\n\t} else {\r\n\t\treturn end + 1;\r\n\t}\r\n}\r\n\r\ntemplate <typename DISTANCE, typename STYLE>\r\nDISTANCE RunStyles<DISTANCE, STYLE>::StartRun(DISTANCE position) const noexcept {\r\n\treturn starts.PositionFromPartition(starts.PartitionFromPosition(position));\r\n}\r\n\r\ntemplate <typename DISTANCE, typename STYLE>\r\nDISTANCE RunStyles<DISTANCE, STYLE>::EndRun(DISTANCE position) const noexcept {\r\n\treturn starts.PositionFromPartition(starts.PartitionFromPosition(position) + 1);\r\n}\r\n\r\ntemplate <typename DISTANCE, typename STYLE>\r\nFillResult<DISTANCE> RunStyles<DISTANCE, STYLE>::FillRange(DISTANCE position, STYLE value, DISTANCE fillLength) {\r\n\tconst FillResult<DISTANCE> resultNoChange{false, position, fillLength};\r\n\tif (fillLength <= 0) {\r\n\t\treturn resultNoChange;\r\n\t}\r\n\tDISTANCE end = position + fillLength;\r\n\tif (end > Length()) {\r\n\t\treturn resultNoChange;\r\n\t}\r\n\tDISTANCE runEnd = RunFromPosition(end);\r\n\tif (styles.ValueAt(runEnd) == value) {\r\n\t\t// End already has value so trim range.\r\n\t\tend = starts.PositionFromPartition(runEnd);\r\n\t\tif (position >= end) {\r\n\t\t\t// Whole range is already same as value so no action\r\n\t\t\treturn resultNoChange;\r\n\t\t}\r\n\t\tfillLength = end - position;\r\n\t} else {\r\n\t\trunEnd = SplitRun(end);\r\n\t}\r\n\tDISTANCE runStart = RunFromPosition(position);\r\n\tif (styles.ValueAt(runStart) == value) {\r\n\t\t// Start is in expected value so trim range.\r\n\t\trunStart++;\r\n\t\tposition = starts.PositionFromPartition(runStart);\r\n\t\tfillLength = end - position;\r\n\t} else {\r\n\t\tif (starts.PositionFromPartition(runStart) < position) {\r\n\t\t\trunStart = SplitRun(position);\r\n\t\t\trunEnd++;\r\n\t\t}\r\n\t}\r\n\tif (runStart < runEnd) {\r\n\t\tconst FillResult<DISTANCE> result{ true, position, fillLength };\r\n\t\tstyles.SetValueAt(runStart, value);\r\n\t\t// Remove each old run over the range\r\n\t\tfor (DISTANCE run=runStart+1; run<runEnd; run++) {\r\n\t\t\tRemoveRun(runStart+1);\r\n\t\t}\r\n\t\trunEnd = RunFromPosition(end);\r\n\t\tRemoveRunIfSameAsPrevious(runEnd);\r\n\t\tRemoveRunIfSameAsPrevious(runStart);\r\n\t\trunEnd = RunFromPosition(end);\r\n\t\tRemoveRunIfEmpty(runEnd);\r\n\t\treturn result;\r\n\t} else {\r\n\t\treturn resultNoChange;\r\n\t}\r\n}\r\n\r\ntemplate <typename DISTANCE, typename STYLE>\r\nvoid RunStyles<DISTANCE, STYLE>::SetValueAt(DISTANCE position, STYLE value) {\r\n\tFillRange(position, value, 1);\r\n}\r\n\r\ntemplate <typename DISTANCE, typename STYLE>\r\nvoid RunStyles<DISTANCE, STYLE>::InsertSpace(DISTANCE position, DISTANCE insertLength) {\r\n\tDISTANCE runStart = RunFromPosition(position);\r\n\tif (starts.PositionFromPartition(runStart) == position) {\r\n\t\tSTYLE runStyle = ValueAt(position);\r\n\t\t// Inserting at start of run so make previous longer\r\n\t\tif (runStart == 0) {\r\n\t\t\t// Inserting at start of document so ensure 0\r\n\t\t\tif (runStyle) {\r\n\t\t\t\tstyles.SetValueAt(0, STYLE());\r\n\t\t\t\tstarts.InsertPartition(1, 0);\r\n\t\t\t\tstyles.InsertValue(1, 1, runStyle);\r\n\t\t\t\tstarts.InsertText(0, insertLength);\r\n\t\t\t} else {\r\n\t\t\t\tstarts.InsertText(runStart, insertLength);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (runStyle) {\r\n\t\t\t\tstarts.InsertText(runStart-1, insertLength);\r\n\t\t\t} else {\r\n\t\t\t\t// Insert at end of run so do not extend style\r\n\t\t\t\tstarts.InsertText(runStart, insertLength);\r\n\t\t\t}\r\n\t\t}\r\n\t} else {\r\n\t\tstarts.InsertText(runStart, insertLength);\r\n\t}\r\n}\r\n\r\ntemplate <typename DISTANCE, typename STYLE>\r\nvoid RunStyles<DISTANCE, STYLE>::DeleteAll() {\r\n\tstarts = Partitioning<DISTANCE>(8);\r\n\tstyles = SplitVector<STYLE>();\r\n\tstyles.InsertValue(0, 2, 0);\r\n}\r\n\r\ntemplate <typename DISTANCE, typename STYLE>\r\nvoid RunStyles<DISTANCE, STYLE>::DeleteRange(DISTANCE position, DISTANCE deleteLength) {\r\n\tDISTANCE end = position + deleteLength;\r\n\tDISTANCE runStart = RunFromPosition(position);\r\n\tDISTANCE runEnd = RunFromPosition(end);\r\n\tif (runStart == runEnd) {\r\n\t\t// Deleting from inside one run\r\n\t\tstarts.InsertText(runStart, -deleteLength);\r\n\t\tRemoveRunIfEmpty(runStart);\r\n\t} else {\r\n\t\trunStart = SplitRun(position);\r\n\t\trunEnd = SplitRun(end);\r\n\t\tstarts.InsertText(runStart, -deleteLength);\r\n\t\t// Remove each old run over the range\r\n\t\tfor (DISTANCE run=runStart; run<runEnd; run++) {\r\n\t\t\tRemoveRun(runStart);\r\n\t\t}\r\n\t\tRemoveRunIfEmpty(runStart);\r\n\t\tRemoveRunIfSameAsPrevious(runStart);\r\n\t}\r\n}\r\n\r\ntemplate <typename DISTANCE, typename STYLE>\r\nDISTANCE RunStyles<DISTANCE, STYLE>::Runs() const noexcept {\r\n\treturn starts.Partitions();\r\n}\r\n\r\ntemplate <typename DISTANCE, typename STYLE>\r\nbool RunStyles<DISTANCE, STYLE>::AllSame() const noexcept {\r\n\tfor (DISTANCE run = 1; run < starts.Partitions(); run++) {\r\n\t\tconst DISTANCE runBefore = run - 1;\r\n\t\tif (styles.ValueAt(run) != styles.ValueAt(runBefore))\r\n\t\t\treturn false;\r\n\t}\r\n\treturn true;\r\n}\r\n\r\ntemplate <typename DISTANCE, typename STYLE>\r\nbool RunStyles<DISTANCE, STYLE>::AllSameAs(STYLE value) const noexcept {\r\n\treturn AllSame() && (styles.ValueAt(0) == value);\r\n}\r\n\r\ntemplate <typename DISTANCE, typename STYLE>\r\nDISTANCE RunStyles<DISTANCE, STYLE>::Find(STYLE value, DISTANCE start) const noexcept {\r\n\tif (start < Length()) {\r\n\t\tDISTANCE run = start ? RunFromPosition(start) : 0;\r\n\t\tif (styles.ValueAt(run) == value)\r\n\t\t\treturn start;\r\n\t\trun++;\r\n\t\twhile (run < starts.Partitions()) {\r\n\t\t\tif (styles.ValueAt(run) == value)\r\n\t\t\t\treturn starts.PositionFromPartition(run);\r\n\t\t\trun++;\r\n\t\t}\r\n\t}\r\n\treturn -1;\r\n}\r\n\r\ntemplate <typename DISTANCE, typename STYLE>\r\nvoid RunStyles<DISTANCE, STYLE>::Check() const {\r\n\tif (Length() < 0) {\r\n\t\tthrow std::runtime_error(\"RunStyles: Length can not be negative.\");\r\n\t}\r\n\tif (starts.Partitions() < 1) {\r\n\t\tthrow std::runtime_error(\"RunStyles: Must always have 1 or more partitions.\");\r\n\t}\r\n\tif (starts.Partitions() != styles.Length()-1) {\r\n\t\tthrow std::runtime_error(\"RunStyles: Partitions and styles different lengths.\");\r\n\t}\r\n\tDISTANCE start=0;\r\n\twhile (start < Length()) {\r\n\t\tconst DISTANCE end = EndRun(start);\r\n\t\tif (start >= end) {\r\n\t\t\tthrow std::runtime_error(\"RunStyles: Partition is 0 length.\");\r\n\t\t}\r\n\t\tstart = end;\r\n\t}\r\n\tif (styles.ValueAt(styles.Length()-1) != 0) {\r\n\t\tthrow std::runtime_error(\"RunStyles: Unused style at end changed.\");\r\n\t}\r\n\tfor (ptrdiff_t j=1; j<styles.Length()-1; j++) {\r\n\t\tif (styles.ValueAt(j) == styles.ValueAt(j-1)) {\r\n\t\t\tthrow std::runtime_error(\"RunStyles: Style of a partition same as previous.\");\r\n\t\t}\r\n\t}\r\n}\r\n\r\ntemplate class Scintilla::Internal::RunStyles<int, int>;\r\ntemplate class Scintilla::Internal::RunStyles<int, char>;\r\n#if (PTRDIFF_MAX != INT_MAX) || defined(__HAIKU__)\r\ntemplate class Scintilla::Internal::RunStyles<ptrdiff_t, int>;\r\ntemplate class Scintilla::Internal::RunStyles<ptrdiff_t, char>;\r\n#endif\r\n"
  },
  {
    "path": "scintilla/src/RunStyles.h",
    "content": "/** @file RunStyles.h\r\n ** Data structure used to store sparse styles.\r\n **/\r\n// Copyright 1998-2007 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n/// Styling buffer using one element for each run rather than using\r\n/// a filled buffer.\r\n\r\n#ifndef RUNSTYLES_H\r\n#define RUNSTYLES_H\r\n\r\nnamespace Scintilla::Internal {\r\n\r\n// Return for RunStyles::FillRange reports if anything was changed and the\r\n// range that was changed. This may be trimmed from the requested range\r\n// when some of the requested range already had the requested value.\r\ntemplate <typename DISTANCE>\r\nstruct FillResult {\r\n\tbool changed;\r\n\tDISTANCE position;\r\n\tDISTANCE fillLength;\r\n};\r\n\r\ntemplate <typename DISTANCE, typename STYLE>\r\nclass RunStyles {\r\nprivate:\r\n\tPartitioning<DISTANCE> starts;\r\n\tSplitVector<STYLE> styles;\r\n\tDISTANCE RunFromPosition(DISTANCE position) const noexcept;\r\n\tDISTANCE SplitRun(DISTANCE position);\r\n\tvoid RemoveRun(DISTANCE run);\r\n\tvoid RemoveRunIfEmpty(DISTANCE run);\r\n\tvoid RemoveRunIfSameAsPrevious(DISTANCE run);\r\npublic:\r\n\tRunStyles();\r\n\tDISTANCE Length() const noexcept;\r\n\tSTYLE ValueAt(DISTANCE position) const noexcept;\r\n\tDISTANCE FindNextChange(DISTANCE position, DISTANCE end) const noexcept;\r\n\tDISTANCE StartRun(DISTANCE position) const noexcept;\r\n\tDISTANCE EndRun(DISTANCE position) const noexcept;\r\n\t// Returns changed=true if some values may have changed\r\n\tFillResult<DISTANCE> FillRange(DISTANCE position, STYLE value, DISTANCE fillLength);\r\n\tvoid SetValueAt(DISTANCE position, STYLE value);\r\n\tvoid InsertSpace(DISTANCE position, DISTANCE insertLength);\r\n\tvoid DeleteAll();\r\n\tvoid DeleteRange(DISTANCE position, DISTANCE deleteLength);\r\n\tDISTANCE Runs() const noexcept;\r\n\tbool AllSame() const noexcept;\r\n\tbool AllSameAs(STYLE value) const noexcept;\r\n\tDISTANCE Find(STYLE value, DISTANCE start) const noexcept;\r\n\r\n\tvoid Check() const;\r\n};\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/src/SciTE.properties",
    "content": "# SciTE.properties is the per directory local options file and can be used to override\r\n# settings made in SciTEGlobal.properties\r\ncommand.build.directory.*.cxx=..\\win32\r\ncommand.build.directory.*.h=..\\win32\r\ncommand.build.*.cxx=nmake -f scintilla.mak QUIET=1\r\ncommand.build.*.h=nmake -f scintilla.mak QUIET=1\r\n"
  },
  {
    "path": "scintilla/src/ScintillaBase.cxx",
    "content": "// Scintilla source code edit control\r\n/** @file ScintillaBase.cxx\r\n ** An enhanced subclass of Editor with calltips, autocomplete and context menu.\r\n **/\r\n// Copyright 1998-2003 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#include <cstddef>\r\n#include <cstdlib>\r\n#include <cstdint>\r\n#include <cassert>\r\n#include <cstring>\r\n\r\n#include <stdexcept>\r\n#include <string>\r\n#include <string_view>\r\n#include <vector>\r\n#include <map>\r\n#include <set>\r\n#include <optional>\r\n#include <algorithm>\r\n#include <memory>\r\n\r\n#include \"ScintillaTypes.h\"\r\n#include \"ScintillaMessages.h\"\r\n#include \"ScintillaStructures.h\"\r\n#include \"ILoader.h\"\r\n#include \"ILexer.h\"\r\n\r\n#include \"Debugging.h\"\r\n#include \"Geometry.h\"\r\n#include \"Platform.h\"\r\n\r\n#include \"CharacterCategoryMap.h\"\r\n\r\n#include \"Position.h\"\r\n#include \"UniqueString.h\"\r\n#include \"SplitVector.h\"\r\n#include \"Partitioning.h\"\r\n#include \"RunStyles.h\"\r\n#include \"ContractionState.h\"\r\n#include \"CellBuffer.h\"\r\n#include \"CallTip.h\"\r\n#include \"KeyMap.h\"\r\n#include \"Indicator.h\"\r\n#include \"LineMarker.h\"\r\n#include \"Style.h\"\r\n#include \"ViewStyle.h\"\r\n#include \"CharClassify.h\"\r\n#include \"Decoration.h\"\r\n#include \"CaseFolder.h\"\r\n#include \"Document.h\"\r\n#include \"Selection.h\"\r\n#include \"PositionCache.h\"\r\n#include \"EditModel.h\"\r\n#include \"MarginView.h\"\r\n#include \"EditView.h\"\r\n#include \"Editor.h\"\r\n#include \"AutoComplete.h\"\r\n#include \"ScintillaBase.h\"\r\n\r\nusing namespace Scintilla;\r\nusing namespace Scintilla::Internal;\r\n\r\nScintillaBase::ScintillaBase() {\r\n\tdisplayPopupMenu = PopUp::All;\r\n\tlistType = 0;\r\n\tmaxListWidth = 0;\r\n\tmultiAutoCMode = MultiAutoComplete::Once;\r\n}\r\n\r\nScintillaBase::~ScintillaBase() {\r\n}\r\n\r\nvoid ScintillaBase::Finalise() {\r\n\tEditor::Finalise();\r\n\tpopup.Destroy();\r\n}\r\n\r\nvoid ScintillaBase::InsertCharacter(std::string_view sv, CharacterSource charSource) {\r\n\tconst bool acActive = ac.Active();\r\n\tconst bool isFillUp = acActive && ac.IsFillUpChar(sv[0]);\r\n\tif (!isFillUp) {\r\n\t\tEditor::InsertCharacter(sv, charSource);\r\n\t}\r\n\tif (acActive && ac.Active()) { // if it was and still is active\r\n\t\tAutoCompleteCharacterAdded(sv[0]);\r\n\t\t// For fill ups add the character after the autocompletion has\r\n\t\t// triggered so containers see the key so can display a calltip.\r\n\t\tif (isFillUp) {\r\n\t\t\tEditor::InsertCharacter(sv, charSource);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid ScintillaBase::Command(int cmdId) {\r\n\r\n\tswitch (cmdId) {\r\n\r\n\tcase idAutoComplete:  \t// Nothing to do\r\n\r\n\t\tbreak;\r\n\r\n\tcase idCallTip:  \t// Nothing to do\r\n\r\n\t\tbreak;\r\n\r\n\tcase idcmdUndo:\r\n\t\tWndProc(Message::Undo, 0, 0);\r\n\t\tbreak;\r\n\r\n\tcase idcmdRedo:\r\n\t\tWndProc(Message::Redo, 0, 0);\r\n\t\tbreak;\r\n\r\n\tcase idcmdCut:\r\n\t\tWndProc(Message::Cut, 0, 0);\r\n\t\tbreak;\r\n\r\n\tcase idcmdCopy:\r\n\t\tWndProc(Message::Copy, 0, 0);\r\n\t\tbreak;\r\n\r\n\tcase idcmdPaste:\r\n\t\tWndProc(Message::Paste, 0, 0);\r\n\t\tbreak;\r\n\r\n\tcase idcmdDelete:\r\n\t\tWndProc(Message::Clear, 0, 0);\r\n\t\tbreak;\r\n\r\n\tcase idcmdSelectAll:\r\n\t\tWndProc(Message::SelectAll, 0, 0);\r\n\t\tbreak;\r\n\t}\r\n}\r\n\r\nint ScintillaBase::KeyCommand(Message iMessage) {\r\n\t// Most key commands cancel autocompletion mode\r\n\tif (ac.Active()) {\r\n\t\tswitch (iMessage) {\r\n\t\t\t// Except for these\r\n\t\tcase Message::LineDown:\r\n\t\t\tAutoCompleteMove(1);\r\n\t\t\treturn 0;\r\n\t\tcase Message::LineUp:\r\n\t\t\tAutoCompleteMove(-1);\r\n\t\t\treturn 0;\r\n\t\tcase Message::PageDown:\r\n\t\t\tAutoCompleteMove(ac.lb->GetVisibleRows());\r\n\t\t\treturn 0;\r\n\t\tcase Message::PageUp:\r\n\t\t\tAutoCompleteMove(-ac.lb->GetVisibleRows());\r\n\t\t\treturn 0;\r\n\t\tcase Message::VCHome:\r\n\t\t\tAutoCompleteMove(-5000);\r\n\t\t\treturn 0;\r\n\t\tcase Message::LineEnd:\r\n\t\t\tAutoCompleteMove(5000);\r\n\t\t\treturn 0;\r\n\t\tcase Message::DeleteBack:\r\n\t\t\tDelCharBack(true);\r\n\t\t\tAutoCompleteCharacterDeleted();\r\n\t\t\tEnsureCaretVisible();\r\n\t\t\treturn 0;\r\n\t\tcase Message::DeleteBackNotLine:\r\n\t\t\tDelCharBack(false);\r\n\t\t\tAutoCompleteCharacterDeleted();\r\n\t\t\tEnsureCaretVisible();\r\n\t\t\treturn 0;\r\n\t\tcase Message::Tab:\r\n\t\t\tAutoCompleteCompleted(0, CompletionMethods::Tab);\r\n\t\t\treturn 0;\r\n\t\tcase Message::NewLine:\r\n\t\t\tAutoCompleteCompleted(0, CompletionMethods::Newline);\r\n\t\t\treturn 0;\r\n\r\n\t\tdefault:\r\n\t\t\tAutoCompleteCancel();\r\n\t\t}\r\n\t}\r\n\r\n\tif (ct.inCallTipMode) {\r\n\t\tif (\r\n\t\t    (iMessage != Message::CharLeft) &&\r\n\t\t    (iMessage != Message::CharLeftExtend) &&\r\n\t\t    (iMessage != Message::CharRight) &&\r\n\t\t    (iMessage != Message::CharRightExtend) &&\r\n\t\t    (iMessage != Message::EditToggleOvertype) &&\r\n\t\t    (iMessage != Message::DeleteBack) &&\r\n\t\t    (iMessage != Message::DeleteBackNotLine)\r\n\t\t) {\r\n\t\t\tct.CallTipCancel();\r\n\t\t}\r\n\t\tif ((iMessage == Message::DeleteBack) || (iMessage == Message::DeleteBackNotLine)) {\r\n\t\t\tif (sel.MainCaret() <= ct.posStartCallTip) {\r\n\t\t\t\tct.CallTipCancel();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn Editor::KeyCommand(iMessage);\r\n}\r\n\r\nvoid ScintillaBase::ListNotify(ListBoxEvent *plbe) {\r\n\tswitch (plbe->event) {\r\n\tcase ListBoxEvent::EventType::selectionChange:\r\n\t\tAutoCompleteSelection();\r\n\t\tbreak;\r\n\tcase ListBoxEvent::EventType::doubleClick:\r\n\t\tAutoCompleteCompleted(0, CompletionMethods::DoubleClick);\r\n\t\tbreak;\r\n\t}\r\n}\r\n\r\nvoid ScintillaBase::AutoCompleteInsert(Sci::Position startPos, Sci::Position removeLen, std::string_view text) {\r\n\tUndoGroup ug(pdoc);\r\n\tif (multiAutoCMode == MultiAutoComplete::Once) {\r\n\t\tpdoc->DeleteChars(startPos, removeLen);\r\n\t\tconst Sci::Position lengthInserted = pdoc->InsertString(startPos, text);\r\n\t\tSetEmptySelection(startPos + lengthInserted);\r\n\t} else {\r\n\t\t// MultiAutoComplete::Each\r\n\t\tfor (size_t r=0; r<sel.Count(); r++) {\r\n\t\t\tif (!RangeContainsProtected(sel.Range(r).Start().Position(),\r\n\t\t\t\tsel.Range(r).End().Position())) {\r\n\t\t\t\tSci::Position positionInsert = sel.Range(r).Start().Position();\r\n\t\t\t\tpositionInsert = RealizeVirtualSpace(positionInsert, sel.Range(r).caret.VirtualSpace());\r\n\t\t\t\tif (positionInsert - removeLen >= 0) {\r\n\t\t\t\t\tpositionInsert -= removeLen;\r\n\t\t\t\t\tpdoc->DeleteChars(positionInsert, removeLen);\r\n\t\t\t\t}\r\n\t\t\t\tconst Sci::Position lengthInserted = pdoc->InsertString(positionInsert, text);\r\n\t\t\t\tif (lengthInserted > 0) {\r\n\t\t\t\t\tsel.Range(r).caret.SetPosition(positionInsert + lengthInserted);\r\n\t\t\t\t\tsel.Range(r).anchor.SetPosition(positionInsert + lengthInserted);\r\n\t\t\t\t}\r\n\t\t\t\tsel.Range(r).ClearVirtualSpace();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid ScintillaBase::AutoCompleteStart(Sci::Position lenEntered, const char *list) {\r\n\t//Platform::DebugPrintf(\"AutoComplete %s\\n\", list);\r\n\tct.CallTipCancel();\r\n\r\n\tif (ac.chooseSingle && (listType == 0)) {\r\n\t\tif (list && !strchr(list, ac.GetSeparator())) {\r\n\t\t\t// list contains just one item so choose it\r\n\t\t\tconst std::string_view item(list);\r\n\t\t\tconst std::string_view choice = item.substr(0, item.find_first_of(ac.GetTypesep()));\r\n\t\t\tif (ac.ignoreCase) {\r\n\t\t\t\t// May need to convert the case before invocation, so remove lenEntered characters\r\n\t\t\t\tAutoCompleteInsert(sel.MainCaret() - lenEntered, lenEntered, choice);\r\n\t\t\t} else {\r\n\t\t\t\tAutoCompleteInsert(sel.MainCaret(), 0, choice.substr(lenEntered));\r\n\t\t\t}\r\n\t\t\tconst Sci::Position firstPos = sel.MainCaret() - lenEntered;\r\n\t\t\t// Construct a string with a NUL at end as that is expected by applications\r\n\t\t\tconst std::string selected(choice);\r\n\t\t\tAutoCompleteNotifyCompleted('\\0', CompletionMethods::SingleChoice, firstPos, selected.c_str());\r\n\r\n\t\t\tac.Cancel();\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n\r\n\tconst ListOptions options{\r\n\t\tvs.ElementColour(Element::List),\r\n\t\tvs.ElementColour(Element::ListBack),\r\n\t\tvs.ElementColour(Element::ListSelected),\r\n\t\tvs.ElementColour(Element::ListSelectedBack),\r\n\t\tac.options,\r\n\t};\r\n\r\n\tac.Start(wMain, idAutoComplete, sel.MainCaret(), PointMainCaret(),\r\n\t\t\t\tlenEntered, vs.lineHeight, IsUnicodeMode(), technology, options);\r\n\r\n\tconst PRectangle rcClient = GetClientRectangle();\r\n\tPoint pt = LocationFromPosition(sel.MainCaret() - lenEntered);\r\n\tPRectangle rcPopupBounds = wMain.GetMonitorRect(pt);\r\n\tif (rcPopupBounds.Height() == 0)\r\n\t\trcPopupBounds = rcClient;\r\n\r\n\tint heightLB = ac.heightLBDefault;\r\n\tint widthLB = ac.widthLBDefault;\r\n\tif (pt.x >= rcClient.right - widthLB) {\r\n\t\tHorizontalScrollTo(static_cast<int>(xOffset + pt.x - rcClient.right + widthLB));\r\n\t\tRedraw();\r\n\t\tpt = PointMainCaret();\r\n\t}\r\n\tif (wMargin.Created()) {\r\n\t\tpt = pt + GetVisibleOriginInMain();\r\n\t}\r\n\tPRectangle rcac;\r\n\trcac.left = pt.x - ac.lb->CaretFromEdge();\r\n\tif (pt.y >= rcPopupBounds.bottom - heightLB &&  // Won't fit below.\r\n\t        pt.y >= (rcPopupBounds.bottom + rcPopupBounds.top) / 2) { // and there is more room above.\r\n\t\trcac.top = pt.y - heightLB;\r\n\t\tif (rcac.top < rcPopupBounds.top) {\r\n\t\t\theightLB -= static_cast<int>(rcPopupBounds.top - rcac.top);\r\n\t\t\trcac.top = rcPopupBounds.top;\r\n\t\t}\r\n\t} else {\r\n\t\trcac.top = pt.y + vs.lineHeight;\r\n\t}\r\n\trcac.right = rcac.left + widthLB;\r\n\trcac.bottom = static_cast<XYPOSITION>(std::min(static_cast<int>(rcac.top) + heightLB, static_cast<int>(rcPopupBounds.bottom)));\r\n\tac.lb->SetPositionRelative(rcac, &wMain);\r\n\tac.lb->SetFont(vs.styles[StyleDefault].font.get());\r\n\tconst int aveCharWidth = static_cast<int>(vs.styles[StyleDefault].aveCharWidth);\r\n\tac.lb->SetAverageCharWidth(aveCharWidth);\r\n\tac.lb->SetDelegate(this);\r\n\r\n\tac.SetList(list ? list : \"\");\r\n\r\n\t// Fiddle the position of the list so it is right next to the target and wide enough for all its strings\r\n\tPRectangle rcList = ac.lb->GetDesiredRect();\r\n\tconst int heightAlloced = static_cast<int>(rcList.bottom - rcList.top);\r\n\twidthLB = std::max(widthLB, static_cast<int>(rcList.right - rcList.left));\r\n\tif (maxListWidth != 0)\r\n\t\twidthLB = std::min(widthLB, aveCharWidth*maxListWidth);\r\n\t// Make an allowance for large strings in list\r\n\trcList.left = pt.x - ac.lb->CaretFromEdge();\r\n\trcList.right = rcList.left + widthLB;\r\n\tif (((pt.y + vs.lineHeight) >= (rcPopupBounds.bottom - heightAlloced)) &&  // Won't fit below.\r\n\t        ((pt.y + vs.lineHeight / 2) >= (rcPopupBounds.bottom + rcPopupBounds.top) / 2)) { // and there is more room above.\r\n\t\trcList.top = pt.y - heightAlloced;\r\n\t} else {\r\n\t\trcList.top = pt.y + vs.lineHeight;\r\n\t}\r\n\trcList.bottom = rcList.top + heightAlloced;\r\n\tac.lb->SetPositionRelative(rcList, &wMain);\r\n\tac.Show(true);\r\n\tif (lenEntered != 0) {\r\n\t\tAutoCompleteMoveToCurrentWord();\r\n\t}\r\n}\r\n\r\nvoid ScintillaBase::AutoCompleteCancel() {\r\n\tif (ac.Active()) {\r\n\t\tNotificationData scn = {};\r\n\t\tscn.nmhdr.code = Notification::AutoCCancelled;\r\n\t\tscn.wParam = 0;\r\n\t\tscn.listType = 0;\r\n\t\tNotifyParent(scn);\r\n\t}\r\n\tac.Cancel();\r\n}\r\n\r\nvoid ScintillaBase::AutoCompleteMove(int delta) {\r\n\tac.Move(delta);\r\n}\r\n\r\nvoid ScintillaBase::AutoCompleteMoveToCurrentWord() {\r\n\tif (FlagSet(ac.options, AutoCompleteOption::SelectFirstItem))\r\n\t\treturn;\r\n\tstd::string wordCurrent = RangeText(ac.posStart - ac.startLen, sel.MainCaret());\r\n\tac.Select(wordCurrent.c_str());\r\n}\r\n\r\nvoid ScintillaBase::AutoCompleteSelection() {\r\n\tconst int item = ac.GetSelection();\r\n\tstd::string selected;\r\n\tif (item != -1) {\r\n\t\tselected = ac.GetValue(item);\r\n\t}\r\n\r\n\tNotificationData scn = {};\r\n\tscn.nmhdr.code = Notification::AutoCSelectionChange;\r\n\tscn.message = static_cast<Message>(0);\r\n\tscn.wParam = listType;\r\n\tscn.listType = listType;\r\n\tconst Sci::Position firstPos = ac.posStart - ac.startLen;\r\n\tscn.position = firstPos;\r\n\tscn.lParam = firstPos;\r\n\tscn.text = selected.c_str();\r\n\tNotifyParent(scn);\r\n}\r\n\r\nvoid ScintillaBase::AutoCompleteCharacterAdded(char ch) {\r\n\tif (ac.IsFillUpChar(ch)) {\r\n\t\tAutoCompleteCompleted(ch, CompletionMethods::FillUp);\r\n\t} else if (ac.IsStopChar(ch)) {\r\n\t\tAutoCompleteCancel();\r\n\t} else {\r\n\t\tAutoCompleteMoveToCurrentWord();\r\n\t}\r\n}\r\n\r\nvoid ScintillaBase::AutoCompleteCharacterDeleted() {\r\n\tif (sel.MainCaret() < ac.posStart - ac.startLen) {\r\n\t\tAutoCompleteCancel();\r\n\t} else if (ac.cancelAtStartPos && (sel.MainCaret() <= ac.posStart)) {\r\n\t\tAutoCompleteCancel();\r\n\t} else {\r\n\t\tAutoCompleteMoveToCurrentWord();\r\n\t}\r\n\tNotificationData scn = {};\r\n\tscn.nmhdr.code = Notification::AutoCCharDeleted;\r\n\tscn.wParam = 0;\r\n\tscn.listType = 0;\r\n\tNotifyParent(scn);\r\n}\r\n\r\nvoid ScintillaBase::AutoCompleteNotifyCompleted(char ch, CompletionMethods completionMethod, Sci::Position firstPos, const char *text) {\r\n\tNotificationData scn = {};\r\n\tscn.nmhdr.code = Notification::AutoCCompleted;\r\n\tscn.message = static_cast<Message>(0);\r\n\tscn.ch = ch;\r\n\tscn.listCompletionMethod = completionMethod;\r\n\tscn.wParam = listType;\r\n\tscn.listType = listType;\r\n\tscn.position = firstPos;\r\n\tscn.lParam = firstPos;\r\n\tscn.text = text;\r\n\tNotifyParent(scn);\r\n}\r\n\r\nvoid ScintillaBase::AutoCompleteCompleted(char ch, CompletionMethods completionMethod) {\r\n\tconst int item = ac.GetSelection();\r\n\tif (item == -1) {\r\n\t\tAutoCompleteCancel();\r\n\t\treturn;\r\n\t}\r\n\tconst std::string selected = ac.GetValue(item);\r\n\r\n\tac.Show(false);\r\n\r\n\tNotificationData scn = {};\r\n\tscn.nmhdr.code = listType > 0 ? Notification::UserListSelection : Notification::AutoCSelection;\r\n\tscn.message = static_cast<Message>(0);\r\n\tscn.ch = ch;\r\n\tscn.listCompletionMethod = completionMethod;\r\n\tscn.wParam = listType;\r\n\tscn.listType = listType;\r\n\tconst Sci::Position firstPos = ac.posStart - ac.startLen;\r\n\tscn.position = firstPos;\r\n\tscn.lParam = firstPos;\r\n\tscn.text = selected.c_str();\r\n\tNotifyParent(scn);\r\n\r\n\tif (!ac.Active())\r\n\t\treturn;\r\n\tac.Cancel();\r\n\r\n\tif (listType > 0)\r\n\t\treturn;\r\n\r\n\tSci::Position endPos = sel.MainCaret();\r\n\tif (ac.dropRestOfWord)\r\n\t\tendPos = pdoc->ExtendWordSelect(endPos, 1, true);\r\n\tif (endPos < firstPos)\r\n\t\treturn;\r\n\tAutoCompleteInsert(firstPos, endPos - firstPos, selected);\r\n\tSetLastXChosen();\r\n\r\n\tAutoCompleteNotifyCompleted(ch, completionMethod, firstPos, selected.c_str());\r\n}\r\n\r\nint ScintillaBase::AutoCompleteGetCurrent() const {\r\n\tif (!ac.Active())\r\n\t\treturn -1;\r\n\treturn ac.GetSelection();\r\n}\r\n\r\nint ScintillaBase::AutoCompleteGetCurrentText(char *buffer) const {\r\n\tif (ac.Active()) {\r\n\t\tconst int item = ac.GetSelection();\r\n\t\tif (item != -1) {\r\n\t\t\tconst std::string selected = ac.GetValue(item);\r\n\t\t\tif (buffer)\r\n\t\t\t\tmemcpy(buffer, selected.c_str(), selected.length()+1);\r\n\t\t\treturn static_cast<int>(selected.length());\r\n\t\t}\r\n\t}\r\n\tif (buffer)\r\n\t\t*buffer = '\\0';\r\n\treturn 0;\r\n}\r\n\r\nvoid ScintillaBase::CallTipShow(Point pt, const char *defn) {\r\n\tac.Cancel();\r\n\t// If container knows about StyleCallTip then use it in place of the\r\n\t// StyleDefault for the face name, size and character set. Also use it\r\n\t// for the foreground and background colour.\r\n\tconst int ctStyle = ct.UseStyleCallTip() ? StyleCallTip : StyleDefault;\r\n\tconst Style &style = vs.styles[ctStyle];\r\n\tif (ct.UseStyleCallTip()) {\r\n\t\tct.SetForeBack(style.fore, style.back);\r\n\t}\r\n\tif (wMargin.Created()) {\r\n\t\tpt = pt + GetVisibleOriginInMain();\r\n\t}\r\n\tAutoSurface surfaceMeasure(this);\r\n\tPRectangle rc = ct.CallTipStart(sel.MainCaret(), pt,\r\n\t\tvs.lineHeight,\r\n\t\tdefn,\r\n\t\tCodePage(),\r\n\t\tsurfaceMeasure,\r\n\t\tstyle.font);\r\n\t// If the call-tip window would be out of the client\r\n\t// space\r\n\tconst PRectangle rcClient = GetClientRectangle();\r\n\tconst int offset = vs.lineHeight + static_cast<int>(rc.Height());\r\n\t// adjust so it displays above the text.\r\n\tif (rc.bottom > rcClient.bottom && rc.Height() < rcClient.Height()) {\r\n\t\trc.top -= offset;\r\n\t\trc.bottom -= offset;\r\n\t}\r\n\t// adjust so it displays below the text.\r\n\tif (rc.top < rcClient.top && rc.Height() < rcClient.Height()) {\r\n\t\trc.top += offset;\r\n\t\trc.bottom += offset;\r\n\t}\r\n\t// Now display the window.\r\n\tCreateCallTipWindow(rc);\r\n\tct.wCallTip.SetPositionRelative(rc, &wMain);\r\n\tct.wCallTip.Show();\r\n\tct.wCallTip.InvalidateAll();\r\n}\r\n\r\nvoid ScintillaBase::CallTipClick() {\r\n\tNotificationData scn = {};\r\n\tscn.nmhdr.code = Notification::CallTipClick;\r\n\tscn.position = ct.clickPlace;\r\n\tNotifyParent(scn);\r\n}\r\n\r\nbool ScintillaBase::ShouldDisplayPopup(Point ptInWindowCoordinates) const {\r\n\treturn (displayPopupMenu == PopUp::All ||\r\n\t\t(displayPopupMenu == PopUp::Text && !PointInSelMargin(ptInWindowCoordinates)));\r\n}\r\n\r\nvoid ScintillaBase::ContextMenu(Point pt) {\r\n\tif (displayPopupMenu != PopUp::Never) {\r\n\t\tconst bool writable = !WndProc(Message::GetReadOnly, 0, 0);\r\n\t\tpopup.CreatePopUp();\r\n\t\tAddToPopUp(\"Undo\", idcmdUndo, writable && pdoc->CanUndo());\r\n\t\tAddToPopUp(\"Redo\", idcmdRedo, writable && pdoc->CanRedo());\r\n\t\tAddToPopUp(\"\");\r\n\t\tAddToPopUp(\"Cut\", idcmdCut, writable && !sel.Empty());\r\n\t\tAddToPopUp(\"Copy\", idcmdCopy, !sel.Empty());\r\n\t\tAddToPopUp(\"Paste\", idcmdPaste, writable && WndProc(Message::CanPaste, 0, 0));\r\n\t\tAddToPopUp(\"Delete\", idcmdDelete, writable && !sel.Empty());\r\n\t\tAddToPopUp(\"\");\r\n\t\tAddToPopUp(\"Select All\", idcmdSelectAll);\r\n\t\tpopup.Show(pt, wMain);\r\n\t}\r\n}\r\n\r\nvoid ScintillaBase::CancelModes() {\r\n\tAutoCompleteCancel();\r\n\tct.CallTipCancel();\r\n\tEditor::CancelModes();\r\n}\r\n\r\nvoid ScintillaBase::ButtonDownWithModifiers(Point pt, unsigned int curTime, KeyMod modifiers) {\r\n\tCancelModes();\r\n\tEditor::ButtonDownWithModifiers(pt, curTime, modifiers);\r\n}\r\n\r\nvoid ScintillaBase::RightButtonDownWithModifiers(Point pt, unsigned int curTime, KeyMod modifiers) {\r\n\tCancelModes();\r\n\tEditor::RightButtonDownWithModifiers(pt, curTime, modifiers);\r\n}\r\n\r\nnamespace Scintilla::Internal {\r\n\r\nclass LexState : public LexInterface {\r\npublic:\r\n\texplicit LexState(Document *pdoc_) noexcept;\r\n\r\n\t// LexInterface deleted the standard operators and defined the virtual destructor so don't need to here.\r\n\r\n\tconst char *DescribeWordListSets();\r\n\tvoid SetWordList(int n, const char *wl);\r\n\tint GetIdentifier() const;\r\n\tconst char *GetName() const;\r\n\tvoid *PrivateCall(int operation, void *pointer);\r\n\tconst char *PropertyNames();\r\n\tTypeProperty PropertyType(const char *name);\r\n\tconst char *DescribeProperty(const char *name);\r\n\tvoid PropSet(const char *key, const char *val);\r\n\tconst char *PropGet(const char *key) const;\r\n\tint PropGetInt(const char *key, int defaultValue=0) const;\r\n\r\n\tLineEndType LineEndTypesSupported() override;\r\n\tint AllocateSubStyles(int styleBase, int numberStyles);\r\n\tint SubStylesStart(int styleBase);\r\n\tint SubStylesLength(int styleBase);\r\n\tint StyleFromSubStyle(int subStyle);\r\n\tint PrimaryStyleFromStyle(int style);\r\n\tvoid FreeSubStyles();\r\n\tvoid SetIdentifiers(int style, const char *identifiers);\r\n\tint DistanceToSecondaryStyles();\r\n\tconst char *GetSubStyleBases();\r\n\tint NamedStyles();\r\n\tconst char *NameOfStyle(int style);\r\n\tconst char *TagsOfStyle(int style);\r\n\tconst char *DescriptionOfStyle(int style);\r\n};\r\n\r\n}\r\n\r\nLexState::LexState(Document *pdoc_) noexcept : LexInterface(pdoc_) {\r\n}\r\n\r\nLexState *ScintillaBase::DocumentLexState() {\r\n\tif (!pdoc->GetLexInterface()) {\r\n\t\tpdoc->SetLexInterface(std::make_unique<LexState>(pdoc));\r\n\t}\r\n\treturn dynamic_cast<LexState *>(pdoc->GetLexInterface());\r\n}\r\n\r\nconst char *LexState::DescribeWordListSets() {\r\n\tif (instance) {\r\n\t\treturn instance->DescribeWordListSets();\r\n\t} else {\r\n\t\treturn nullptr;\r\n\t}\r\n}\r\n\r\nvoid LexState::SetWordList(int n, const char *wl) {\r\n\tif (instance) {\r\n\t\tconst Sci_Position firstModification = instance->WordListSet(n, wl);\r\n\t\tif (firstModification >= 0) {\r\n\t\t\tpdoc->ModifiedAt(firstModification);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nint LexState::GetIdentifier() const {\r\n\tif (instance) {\r\n\t\treturn instance->GetIdentifier();\r\n\t}\r\n\treturn 0;\r\n}\r\n\r\nconst char *LexState::GetName() const {\r\n\tif (instance) {\r\n\t\treturn instance->GetName();\r\n\t}\r\n\treturn \"\";\r\n}\r\n\r\nvoid *LexState::PrivateCall(int operation, void *pointer) {\r\n\tif (instance) {\r\n\t\treturn instance->PrivateCall(operation, pointer);\r\n\t} else {\r\n\t\treturn nullptr;\r\n\t}\r\n}\r\n\r\nconst char *LexState::PropertyNames() {\r\n\tif (instance) {\r\n\t\treturn instance->PropertyNames();\r\n\t} else {\r\n\t\treturn nullptr;\r\n\t}\r\n}\r\n\r\nTypeProperty LexState::PropertyType(const char *name) {\r\n\tif (instance) {\r\n\t\treturn static_cast<TypeProperty>(instance->PropertyType(name));\r\n\t} else {\r\n\t\treturn TypeProperty::Boolean;\r\n\t}\r\n}\r\n\r\nconst char *LexState::DescribeProperty(const char *name) {\r\n\tif (instance) {\r\n\t\treturn instance->DescribeProperty(name);\r\n\t} else {\r\n\t\treturn nullptr;\r\n\t}\r\n}\r\n\r\nvoid LexState::PropSet(const char *key, const char *val) {\r\n\tif (instance) {\r\n\t\tconst Sci_Position firstModification = instance->PropertySet(key, val);\r\n\t\tif (firstModification >= 0) {\r\n\t\t\tpdoc->ModifiedAt(firstModification);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nconst char *LexState::PropGet(const char *key) const {\r\n\tif (instance) {\r\n\t\treturn instance->PropertyGet(key);\r\n\t} else {\r\n\t\treturn nullptr;\r\n\t}\r\n}\r\n\r\nint LexState::PropGetInt(const char *key, int defaultValue) const {\r\n\tif (instance) {\r\n\t\tconst char *value = instance->PropertyGet(key);\r\n\t\tif (value && *value) {\r\n\t\t\treturn atoi(value);\r\n\t\t}\r\n\t}\r\n\treturn defaultValue;\r\n}\r\n\r\nLineEndType LexState::LineEndTypesSupported() {\r\n\tif (instance) {\r\n\t\treturn static_cast<LineEndType>(instance->LineEndTypesSupported());\r\n\t}\r\n\treturn LineEndType::Default;\r\n}\r\n\r\nint LexState::AllocateSubStyles(int styleBase, int numberStyles) {\r\n\tif (instance) {\r\n\t\treturn instance->AllocateSubStyles(styleBase, numberStyles);\r\n\t}\r\n\treturn -1;\r\n}\r\n\r\nint LexState::SubStylesStart(int styleBase) {\r\n\tif (instance) {\r\n\t\treturn instance->SubStylesStart(styleBase);\r\n\t}\r\n\treturn -1;\r\n}\r\n\r\nint LexState::SubStylesLength(int styleBase) {\r\n\tif (instance) {\r\n\t\treturn instance->SubStylesLength(styleBase);\r\n\t}\r\n\treturn 0;\r\n}\r\n\r\nint LexState::StyleFromSubStyle(int subStyle) {\r\n\tif (instance) {\r\n\t\treturn instance->StyleFromSubStyle(subStyle);\r\n\t}\r\n\treturn 0;\r\n}\r\n\r\nint LexState::PrimaryStyleFromStyle(int style) {\r\n\tif (instance) {\r\n\t\treturn instance->PrimaryStyleFromStyle(style);\r\n\t}\r\n\treturn 0;\r\n}\r\n\r\nvoid LexState::FreeSubStyles() {\r\n\tif (instance) {\r\n\t\tinstance->FreeSubStyles();\r\n\t}\r\n}\r\n\r\nvoid LexState::SetIdentifiers(int style, const char *identifiers) {\r\n\tif (instance) {\r\n\t\tinstance->SetIdentifiers(style, identifiers);\r\n\t\tpdoc->ModifiedAt(0);\r\n\t}\r\n}\r\n\r\nint LexState::DistanceToSecondaryStyles() {\r\n\tif (instance) {\r\n\t\treturn instance->DistanceToSecondaryStyles();\r\n\t}\r\n\treturn 0;\r\n}\r\n\r\nconst char *LexState::GetSubStyleBases() {\r\n\tif (instance) {\r\n\t\treturn instance->GetSubStyleBases();\r\n\t}\r\n\treturn \"\";\r\n}\r\n\r\nint LexState::NamedStyles() {\r\n\tif (instance) {\r\n\t\treturn instance->NamedStyles();\r\n\t} else {\r\n\t\treturn -1;\r\n\t}\r\n}\r\n\r\nconst char *LexState::NameOfStyle(int style) {\r\n\tif (instance) {\r\n\t\treturn instance->NameOfStyle(style);\r\n\t} else {\r\n\t\treturn nullptr;\r\n\t}\r\n}\r\n\r\nconst char *LexState::TagsOfStyle(int style) {\r\n\tif (instance) {\r\n\t\treturn instance->TagsOfStyle(style);\r\n\t} else {\r\n\t\treturn nullptr;\r\n\t}\r\n}\r\n\r\nconst char *LexState::DescriptionOfStyle(int style) {\r\n\tif (instance) {\r\n\t\treturn instance->DescriptionOfStyle(style);\r\n\t} else {\r\n\t\treturn nullptr;\r\n\t}\r\n}\r\n\r\nvoid ScintillaBase::NotifyStyleToNeeded(Sci::Position endStyleNeeded) {\r\n\tif (!DocumentLexState()->UseContainerLexing()) {\r\n\t\tconst Sci::Position endStyled = pdoc->LineStartPosition(pdoc->GetEndStyled());\r\n\t\tDocumentLexState()->Colourise(endStyled, endStyleNeeded);\r\n\t\treturn;\r\n\t}\r\n\tEditor::NotifyStyleToNeeded(endStyleNeeded);\r\n}\r\n\r\nsptr_t ScintillaBase::WndProc(Message iMessage, uptr_t wParam, sptr_t lParam) {\r\n\tswitch (iMessage) {\r\n\tcase Message::AutoCShow:\r\n\t\tlistType = 0;\r\n\t\tAutoCompleteStart(PositionFromUPtr(wParam), ConstCharPtrFromSPtr(lParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::AutoCCancel:\r\n\t\tac.Cancel();\r\n\t\tbreak;\r\n\r\n\tcase Message::AutoCActive:\r\n\t\treturn ac.Active();\r\n\r\n\tcase Message::AutoCPosStart:\r\n\t\treturn ac.posStart;\r\n\r\n\tcase Message::AutoCComplete:\r\n\t\tAutoCompleteCompleted(0, CompletionMethods::Command);\r\n\t\tbreak;\r\n\r\n\tcase Message::AutoCSetSeparator:\r\n\t\tac.SetSeparator(static_cast<char>(wParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::AutoCGetSeparator:\r\n\t\treturn ac.GetSeparator();\r\n\r\n\tcase Message::AutoCStops:\r\n\t\tac.SetStopChars(ConstCharPtrFromSPtr(lParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::AutoCSelect:\r\n\t\tac.Select(ConstCharPtrFromSPtr(lParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::AutoCGetCurrent:\r\n\t\treturn AutoCompleteGetCurrent();\r\n\r\n\tcase Message::AutoCGetCurrentText:\r\n\t\treturn AutoCompleteGetCurrentText(CharPtrFromSPtr(lParam));\r\n\r\n\tcase Message::AutoCSetCancelAtStart:\r\n\t\tac.cancelAtStartPos = wParam != 0;\r\n\t\tbreak;\r\n\r\n\tcase Message::AutoCGetCancelAtStart:\r\n\t\treturn ac.cancelAtStartPos;\r\n\r\n\tcase Message::AutoCSetFillUps:\r\n\t\tac.SetFillUpChars(ConstCharPtrFromSPtr(lParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::AutoCSetChooseSingle:\r\n\t\tac.chooseSingle = wParam != 0;\r\n\t\tbreak;\r\n\r\n\tcase Message::AutoCGetChooseSingle:\r\n\t\treturn ac.chooseSingle;\r\n\r\n\tcase Message::AutoCSetIgnoreCase:\r\n\t\tac.ignoreCase = wParam != 0;\r\n\t\tbreak;\r\n\r\n\tcase Message::AutoCGetIgnoreCase:\r\n\t\treturn ac.ignoreCase;\r\n\r\n\tcase Message::AutoCSetCaseInsensitiveBehaviour:\r\n\t\tac.ignoreCaseBehaviour = static_cast<CaseInsensitiveBehaviour>(wParam);\r\n\t\tbreak;\r\n\r\n\tcase Message::AutoCGetCaseInsensitiveBehaviour:\r\n\t\treturn static_cast<sptr_t>(ac.ignoreCaseBehaviour);\r\n\r\n\tcase Message::AutoCSetMulti:\r\n\t\tmultiAutoCMode = static_cast<MultiAutoComplete>(wParam);\r\n\t\tbreak;\r\n\r\n\tcase Message::AutoCGetMulti:\r\n\t\treturn static_cast<sptr_t>(multiAutoCMode);\r\n\r\n\tcase Message::AutoCSetOrder:\r\n\t\tac.autoSort = static_cast<Ordering>(wParam);\r\n\t\tbreak;\r\n\r\n\tcase Message::AutoCGetOrder:\r\n\t\treturn static_cast<sptr_t>(ac.autoSort);\r\n\r\n\tcase Message::UserListShow:\r\n\t\tlistType = static_cast<int>(wParam);\r\n\t\tAutoCompleteStart(0, ConstCharPtrFromSPtr(lParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::AutoCSetAutoHide:\r\n\t\tac.autoHide = wParam != 0;\r\n\t\tbreak;\r\n\r\n\tcase Message::AutoCGetAutoHide:\r\n\t\treturn ac.autoHide;\r\n\r\n\tcase Message::AutoCSetOptions:\r\n\t\tac.options = static_cast<AutoCompleteOption>(wParam);\r\n\t\tbreak;\r\n\r\n\tcase Message::AutoCGetOptions:\r\n\t\treturn static_cast<sptr_t>(ac.options);\r\n\r\n\tcase Message::AutoCSetDropRestOfWord:\r\n\t\tac.dropRestOfWord = wParam != 0;\r\n\t\tbreak;\r\n\r\n\tcase Message::AutoCGetDropRestOfWord:\r\n\t\treturn ac.dropRestOfWord;\r\n\r\n\tcase Message::AutoCSetMaxHeight:\r\n\t\tac.lb->SetVisibleRows(static_cast<int>(wParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::AutoCGetMaxHeight:\r\n\t\treturn ac.lb->GetVisibleRows();\r\n\r\n\tcase Message::AutoCSetMaxWidth:\r\n\t\tmaxListWidth = static_cast<int>(wParam);\r\n\t\tbreak;\r\n\r\n\tcase Message::AutoCGetMaxWidth:\r\n\t\treturn maxListWidth;\r\n\r\n\tcase Message::RegisterImage:\r\n\t\tac.lb->RegisterImage(static_cast<int>(wParam), ConstCharPtrFromSPtr(lParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::RegisterRGBAImage:\r\n\t\tac.lb->RegisterRGBAImage(static_cast<int>(wParam), static_cast<int>(sizeRGBAImage.x), static_cast<int>(sizeRGBAImage.y),\r\n\t\t\tConstUCharPtrFromSPtr(lParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::ClearRegisteredImages:\r\n\t\tac.lb->ClearRegisteredImages();\r\n\t\tbreak;\r\n\r\n\tcase Message::AutoCSetTypeSeparator:\r\n\t\tac.SetTypesep(static_cast<char>(wParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::AutoCGetTypeSeparator:\r\n\t\treturn ac.GetTypesep();\r\n\r\n\tcase Message::CallTipShow:\r\n\t\tCallTipShow(LocationFromPosition(wParam),\r\n\t\t\tConstCharPtrFromSPtr(lParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::CallTipCancel:\r\n\t\tct.CallTipCancel();\r\n\t\tbreak;\r\n\r\n\tcase Message::CallTipActive:\r\n\t\treturn ct.inCallTipMode;\r\n\r\n\tcase Message::CallTipPosStart:\r\n\t\treturn ct.posStartCallTip;\r\n\r\n\tcase Message::CallTipSetPosStart:\r\n\t\tct.posStartCallTip = wParam;\r\n\t\tbreak;\r\n\r\n\tcase Message::CallTipSetHlt:\r\n\t\tct.SetHighlight(wParam, lParam);\r\n\t\tbreak;\r\n\r\n\tcase Message::CallTipSetBack:\r\n\t\tct.colourBG = ColourRGBA::FromIpRGB(SPtrFromUPtr(wParam));\r\n\t\tvs.styles[StyleCallTip].back = ct.colourBG;\r\n\t\tInvalidateStyleRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::CallTipSetFore:\r\n\t\tct.colourUnSel = ColourRGBA::FromIpRGB(SPtrFromUPtr(wParam));\r\n\t\tvs.styles[StyleCallTip].fore = ct.colourUnSel;\r\n\t\tInvalidateStyleRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::CallTipSetForeHlt:\r\n\t\tct.colourSel = ColourRGBA::FromIpRGB(SPtrFromUPtr(wParam));\r\n\t\tInvalidateStyleRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::CallTipUseStyle:\r\n\t\tct.SetTabSize(static_cast<int>(wParam));\r\n\t\tInvalidateStyleRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::CallTipSetPosition:\r\n\t\tct.SetPosition(wParam != 0);\r\n\t\tInvalidateStyleRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::UsePopUp:\r\n\t\tdisplayPopupMenu = static_cast<PopUp>(wParam);\r\n\t\tbreak;\r\n\r\n\tcase Message::GetLexer:\r\n\t\treturn DocumentLexState()->GetIdentifier();\r\n\r\n\tcase Message::SetILexer:\r\n\t\tDocumentLexState()->SetInstance(static_cast<ILexer5 *>(PtrFromSPtr(lParam)));\r\n\t\treturn 0;\r\n\r\n\tcase Message::Colourise:\r\n\t\tif (DocumentLexState()->UseContainerLexing()) {\r\n\t\t\tpdoc->ModifiedAt(PositionFromUPtr(wParam));\r\n\t\t\tNotifyStyleToNeeded((lParam == -1) ? pdoc->Length() : lParam);\r\n\t\t} else {\r\n\t\t\tDocumentLexState()->Colourise(PositionFromUPtr(wParam), lParam);\r\n\t\t}\r\n\t\tRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::SetProperty:\r\n\t\tDocumentLexState()->PropSet(ConstCharPtrFromUPtr(wParam),\r\n\t\t          ConstCharPtrFromSPtr(lParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::GetProperty:\r\n\t\treturn StringResult(lParam, DocumentLexState()->PropGet(ConstCharPtrFromUPtr(wParam)));\r\n\r\n\tcase Message::GetPropertyExpanded:\r\n\t\treturn StringResult(lParam, DocumentLexState()->PropGet(ConstCharPtrFromUPtr(wParam)));\r\n\r\n\tcase Message::GetPropertyInt:\r\n\t\treturn DocumentLexState()->PropGetInt(ConstCharPtrFromUPtr(wParam), static_cast<int>(lParam));\r\n\r\n\tcase Message::SetKeyWords:\r\n\t\tDocumentLexState()->SetWordList(static_cast<int>(wParam), ConstCharPtrFromSPtr(lParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::GetLexerLanguage:\r\n\t\treturn StringResult(lParam, DocumentLexState()->GetName());\r\n\r\n\tcase Message::PrivateLexerCall:\r\n\t\treturn reinterpret_cast<sptr_t>(\r\n\t\t\tDocumentLexState()->PrivateCall(static_cast<int>(wParam), PtrFromSPtr(lParam)));\r\n\r\n#ifdef INCLUDE_DEPRECATED_FEATURES\r\n\tcase SCI_GETSTYLEBITSNEEDED:\r\n\t\treturn 8;\r\n#endif\r\n\r\n\tcase Message::PropertyNames:\r\n\t\treturn StringResult(lParam, DocumentLexState()->PropertyNames());\r\n\r\n\tcase Message::PropertyType:\r\n\t\treturn static_cast<sptr_t>(DocumentLexState()->PropertyType(ConstCharPtrFromUPtr(wParam)));\r\n\r\n\tcase Message::DescribeProperty:\r\n\t\treturn StringResult(lParam,\r\n\t\t\t\t    DocumentLexState()->DescribeProperty(ConstCharPtrFromUPtr(wParam)));\r\n\r\n\tcase Message::DescribeKeyWordSets:\r\n\t\treturn StringResult(lParam, DocumentLexState()->DescribeWordListSets());\r\n\r\n\tcase Message::GetLineEndTypesSupported:\r\n\t\treturn static_cast<sptr_t>(DocumentLexState()->LineEndTypesSupported());\r\n\r\n\tcase Message::AllocateSubStyles:\r\n\t\treturn DocumentLexState()->AllocateSubStyles(static_cast<int>(wParam), static_cast<int>(lParam));\r\n\r\n\tcase Message::GetSubStylesStart:\r\n\t\treturn DocumentLexState()->SubStylesStart(static_cast<int>(wParam));\r\n\r\n\tcase Message::GetSubStylesLength:\r\n\t\treturn DocumentLexState()->SubStylesLength(static_cast<int>(wParam));\r\n\r\n\tcase Message::GetStyleFromSubStyle:\r\n\t\treturn DocumentLexState()->StyleFromSubStyle(static_cast<int>(wParam));\r\n\r\n\tcase Message::GetPrimaryStyleFromStyle:\r\n\t\treturn DocumentLexState()->PrimaryStyleFromStyle(static_cast<int>(wParam));\r\n\r\n\tcase Message::FreeSubStyles:\r\n\t\tDocumentLexState()->FreeSubStyles();\r\n\t\tbreak;\r\n\r\n\tcase Message::SetIdentifiers:\r\n\t\tDocumentLexState()->SetIdentifiers(static_cast<int>(wParam),\r\n\t\t\t\t\t\t   ConstCharPtrFromSPtr(lParam));\r\n\t\tbreak;\r\n\r\n\tcase Message::DistanceToSecondaryStyles:\r\n\t\treturn DocumentLexState()->DistanceToSecondaryStyles();\r\n\r\n\tcase Message::GetSubStyleBases:\r\n\t\treturn StringResult(lParam, DocumentLexState()->GetSubStyleBases());\r\n\r\n\tcase Message::GetNamedStyles:\r\n\t\treturn DocumentLexState()->NamedStyles();\r\n\r\n\tcase Message::NameOfStyle:\r\n\t\treturn StringResult(lParam, DocumentLexState()->\r\n\t\t\t\t    NameOfStyle(static_cast<int>(wParam)));\r\n\r\n\tcase Message::TagsOfStyle:\r\n\t\treturn StringResult(lParam, DocumentLexState()->\r\n\t\t\t\t    TagsOfStyle(static_cast<int>(wParam)));\r\n\r\n\tcase Message::DescriptionOfStyle:\r\n\t\treturn StringResult(lParam, DocumentLexState()->\r\n\t\t\t\t    DescriptionOfStyle(static_cast<int>(wParam)));\r\n\r\n\tdefault:\r\n\t\treturn Editor::WndProc(iMessage, wParam, lParam);\r\n\t}\r\n\treturn 0;\r\n}\r\n"
  },
  {
    "path": "scintilla/src/ScintillaBase.h",
    "content": "// Scintilla source code edit control\r\n/** @file ScintillaBase.h\r\n ** Defines an enhanced subclass of Editor with calltips, autocomplete and context menu.\r\n **/\r\n// Copyright 1998-2002 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef SCINTILLABASE_H\r\n#define SCINTILLABASE_H\r\n\r\nnamespace Scintilla::Internal {\r\n\r\n// For most platforms (not Cocoa) all IME indicators are drawn in same colour,\r\n// blue, with different patterns.\r\nconstexpr ColourRGBA colourIME(0x0, 0x0, 0xffU);\r\n\r\nclass LexState;\r\n/**\r\n */\r\nclass ScintillaBase : public Editor, IListBoxDelegate {\r\nprotected:\r\n\t/** Enumeration of commands and child windows. */\r\n\tenum {\r\n\t\tidCallTip=1,\r\n\t\tidAutoComplete=2,\r\n\r\n\t\tidcmdUndo=10,\r\n\t\tidcmdRedo=11,\r\n\t\tidcmdCut=12,\r\n\t\tidcmdCopy=13,\r\n\t\tidcmdPaste=14,\r\n\t\tidcmdDelete=15,\r\n\t\tidcmdSelectAll=16\r\n\t};\r\n\r\n\tScintilla::PopUp displayPopupMenu;\r\n\tMenu popup;\r\n\tScintilla::Internal::AutoComplete ac;\r\n\r\n\tCallTip ct;\r\n\r\n\tint listType;\t\t\t///< 0 is an autocomplete list\r\n\tint maxListWidth;\t\t/// Maximum width of list, in average character widths\r\n\tScintilla::MultiAutoComplete multiAutoCMode; /// Mode for autocompleting when multiple selections are present\r\n\r\n\tLexState *DocumentLexState();\r\n\tvoid Colourise(int start, int end);\r\n\r\n\tScintillaBase();\r\n\t// Deleted so ScintillaBase objects can not be copied.\r\n\tScintillaBase(const ScintillaBase &) = delete;\r\n\tScintillaBase(ScintillaBase &&) = delete;\r\n\tScintillaBase &operator=(const ScintillaBase &) = delete;\r\n\tScintillaBase &operator=(ScintillaBase &&) = delete;\r\n\t// ~ScintillaBase() in public section\r\n\tvoid Initialise() override {}\r\n\tvoid Finalise() override;\r\n\r\n\tvoid InsertCharacter(std::string_view sv, Scintilla::CharacterSource charSource) override;\r\n\tvoid Command(int cmdId);\r\n\tvoid CancelModes() override;\r\n\tint KeyCommand(Scintilla::Message iMessage) override;\r\n\r\n\tvoid AutoCompleteInsert(Sci::Position startPos, Sci::Position removeLen, std::string_view text);\r\n\tvoid AutoCompleteStart(Sci::Position lenEntered, const char *list);\r\n\tvoid AutoCompleteCancel();\r\n\tvoid AutoCompleteMove(int delta);\r\n\tint AutoCompleteGetCurrent() const;\r\n\tint AutoCompleteGetCurrentText(char *buffer) const;\r\n\tvoid AutoCompleteCharacterAdded(char ch);\r\n\tvoid AutoCompleteCharacterDeleted();\r\n\tvoid AutoCompleteNotifyCompleted(char ch, CompletionMethods completionMethod, Sci::Position firstPos, const char *text);\r\n\tvoid AutoCompleteCompleted(char ch, Scintilla::CompletionMethods completionMethod);\r\n\tvoid AutoCompleteMoveToCurrentWord();\r\n\tvoid AutoCompleteSelection();\r\n\tvoid ListNotify(ListBoxEvent *plbe) override;\r\n\r\n\tvoid CallTipClick();\r\n\tvoid CallTipShow(Point pt, const char *defn);\r\n\tvirtual void CreateCallTipWindow(PRectangle rc) = 0;\r\n\r\n\tvirtual void AddToPopUp(const char *label, int cmd=0, bool enabled=true) = 0;\r\n\tbool ShouldDisplayPopup(Point ptInWindowCoordinates) const;\r\n\tvoid ContextMenu(Point pt);\r\n\r\n\tvoid ButtonDownWithModifiers(Point pt, unsigned int curTime, Scintilla::KeyMod modifiers) override;\r\n\tvoid RightButtonDownWithModifiers(Point pt, unsigned int curTime, Scintilla::KeyMod modifiers) override;\r\n\r\n\tvoid NotifyStyleToNeeded(Sci::Position endStyleNeeded) override;\r\n\r\npublic:\r\n\t~ScintillaBase() override;\r\n\r\n\t// Public so scintilla_send_message can use it\r\n\tScintilla::sptr_t WndProc(Scintilla::Message iMessage, Scintilla::uptr_t wParam, Scintilla::sptr_t lParam) override;\r\n};\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/src/Selection.cxx",
    "content": "// Scintilla source code edit control\r\n/** @file Selection.cxx\r\n ** Classes maintaining the selection.\r\n **/\r\n// Copyright 2009 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#include <cstddef>\r\n#include <cstdlib>\r\n#include <cstdint>\r\n\r\n#include <stdexcept>\r\n#include <string_view>\r\n#include <vector>\r\n#include <optional>\r\n#include <algorithm>\r\n#include <memory>\r\n\r\n#include \"Debugging.h\"\r\n\r\n#include \"Position.h\"\r\n#include \"Selection.h\"\r\n\r\nusing namespace Scintilla::Internal;\r\n\r\nvoid SelectionPosition::MoveForInsertDelete(bool insertion, Sci::Position startChange, Sci::Position length, bool moveForEqual) noexcept {\r\n\tif (insertion) {\r\n\t\tif (position == startChange) {\r\n\t\t\t// Always consume virtual space\r\n\t\t\tconst Sci::Position virtualLengthRemove = std::min(length, virtualSpace);\r\n\t\t\tvirtualSpace -= virtualLengthRemove;\r\n\t\t\tposition += virtualLengthRemove;\r\n\t\t\tif (moveForEqual) {\r\n\t\t\t\tconst Sci::Position lengthAfterVirtualRemove = length - virtualLengthRemove;\r\n\t\t\t\tposition += lengthAfterVirtualRemove;\r\n\t\t\t}\r\n\t\t} else if (position > startChange) {\r\n\t\t\tposition += length;\r\n\t\t}\r\n\t} else {\r\n\t\tif (position == startChange) {\r\n\t\t\tvirtualSpace = 0;\r\n\t\t}\r\n\t\tif (position > startChange) {\r\n\t\t\tconst Sci::Position endDeletion = startChange + length;\r\n\t\t\tif (position > endDeletion) {\r\n\t\t\t\tposition -= length;\r\n\t\t\t} else {\r\n\t\t\t\tposition = startChange;\r\n\t\t\t\tvirtualSpace = 0;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nbool SelectionPosition::operator <(const SelectionPosition &other) const noexcept {\r\n\tif (position == other.position)\r\n\t\treturn virtualSpace < other.virtualSpace;\r\n\telse\r\n\t\treturn position < other.position;\r\n}\r\n\r\nbool SelectionPosition::operator >(const SelectionPosition &other) const noexcept {\r\n\tif (position == other.position)\r\n\t\treturn virtualSpace > other.virtualSpace;\r\n\telse\r\n\t\treturn position > other.position;\r\n}\r\n\r\nbool SelectionPosition::operator <=(const SelectionPosition &other) const noexcept {\r\n\tif (position == other.position && virtualSpace == other.virtualSpace)\r\n\t\treturn true;\r\n\telse\r\n\t\treturn other > *this;\r\n}\r\n\r\nbool SelectionPosition::operator >=(const SelectionPosition &other) const noexcept {\r\n\tif (position == other.position && virtualSpace == other.virtualSpace)\r\n\t\treturn true;\r\n\telse\r\n\t\treturn *this > other;\r\n}\r\n\r\nSci::Position SelectionRange::Length() const noexcept {\r\n\tif (anchor > caret) {\r\n\t\treturn anchor.Position() - caret.Position();\r\n\t} else {\r\n\t\treturn caret.Position() - anchor.Position();\r\n\t}\r\n}\r\n\r\nvoid SelectionRange::MoveForInsertDelete(bool insertion, Sci::Position startChange, Sci::Position length) noexcept {\r\n\t// For insertions that occur at the start of the selection move both the start\r\n\t// and end of the selection to preserve the selected length.\r\n\t// The end will automatically move since it is after the insertion, so determine\r\n\t// which position is the start and pass this into\r\n\t// SelectionPosition::MoveForInsertDelete.\r\n\t// There isn't any reason to move an empty selection so don't move it.\r\n\tconst bool caretStart = caret.Position() < anchor.Position();\r\n\tconst bool anchorStart = anchor.Position() < caret.Position();\r\n\r\n\tcaret.MoveForInsertDelete(insertion, startChange, length, caretStart);\r\n\tanchor.MoveForInsertDelete(insertion, startChange, length, anchorStart);\r\n}\r\n\r\nbool SelectionRange::Contains(Sci::Position pos) const noexcept {\r\n\tif (anchor > caret)\r\n\t\treturn (pos >= caret.Position()) && (pos <= anchor.Position());\r\n\telse\r\n\t\treturn (pos >= anchor.Position()) && (pos <= caret.Position());\r\n}\r\n\r\nbool SelectionRange::Contains(SelectionPosition sp) const noexcept {\r\n\tif (anchor > caret)\r\n\t\treturn (sp >= caret) && (sp <= anchor);\r\n\telse\r\n\t\treturn (sp >= anchor) && (sp <= caret);\r\n}\r\n\r\nbool SelectionRange::ContainsCharacter(Sci::Position posCharacter) const noexcept {\r\n\tif (anchor > caret)\r\n\t\treturn (posCharacter >= caret.Position()) && (posCharacter < anchor.Position());\r\n\telse\r\n\t\treturn (posCharacter >= anchor.Position()) && (posCharacter < caret.Position());\r\n}\r\n\r\nbool SelectionRange::ContainsCharacter(SelectionPosition spCharacter) const noexcept {\r\n\tif (anchor > caret)\r\n\t\treturn (spCharacter >= caret) && (spCharacter < anchor);\r\n\telse\r\n\t\treturn (spCharacter >= anchor) && (spCharacter < caret);\r\n}\r\n\r\nSelectionSegment SelectionRange::Intersect(SelectionSegment check) const noexcept {\r\n\tconst SelectionSegment inOrder(caret, anchor);\r\n\tif ((inOrder.start <= check.end) || (inOrder.end >= check.start)) {\r\n\t\tSelectionSegment portion = check;\r\n\t\tif (portion.start < inOrder.start)\r\n\t\t\tportion.start = inOrder.start;\r\n\t\tif (portion.end > inOrder.end)\r\n\t\t\tportion.end = inOrder.end;\r\n\t\tif (portion.start > portion.end)\r\n\t\t\treturn SelectionSegment();\r\n\t\telse\r\n\t\t\treturn portion;\r\n\t} else {\r\n\t\treturn SelectionSegment();\r\n\t}\r\n}\r\n\r\nvoid SelectionRange::Swap() noexcept {\r\n\tstd::swap(caret, anchor);\r\n}\r\n\r\nbool SelectionRange::Trim(SelectionRange range) noexcept {\r\n\tconst SelectionPosition startRange = range.Start();\r\n\tconst SelectionPosition endRange = range.End();\r\n\tSelectionPosition start = Start();\r\n\tSelectionPosition end = End();\r\n\tPLATFORM_ASSERT(start <= end);\r\n\tPLATFORM_ASSERT(startRange <= endRange);\r\n\tif ((startRange <= end) && (endRange >= start)) {\r\n\t\tif ((start > startRange) && (end < endRange)) {\r\n\t\t\t// Completely covered by range -> empty at start\r\n\t\t\tend = start;\r\n\t\t} else if ((start < startRange) && (end > endRange)) {\r\n\t\t\t// Completely covers range -> empty at start\r\n\t\t\tend = start;\r\n\t\t} else if (start <= startRange) {\r\n\t\t\t// Trim end\r\n\t\t\tend = startRange;\r\n\t\t} else { //\r\n\t\t\tPLATFORM_ASSERT(end >= endRange);\r\n\t\t\t// Trim start\r\n\t\t\tstart = endRange;\r\n\t\t}\r\n\t\tif (anchor > caret) {\r\n\t\t\tcaret = start;\r\n\t\t\tanchor = end;\r\n\t\t} else {\r\n\t\t\tanchor = start;\r\n\t\t\tcaret = end;\r\n\t\t}\r\n\t\treturn Empty();\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n}\r\n\r\n// If range is all virtual collapse to start of virtual space\r\nvoid SelectionRange::MinimizeVirtualSpace() noexcept {\r\n\tif (caret.Position() == anchor.Position()) {\r\n\t\tSci::Position virtualSpace = caret.VirtualSpace();\r\n\t\tif (virtualSpace > anchor.VirtualSpace())\r\n\t\t\tvirtualSpace = anchor.VirtualSpace();\r\n\t\tcaret.SetVirtualSpace(virtualSpace);\r\n\t\tanchor.SetVirtualSpace(virtualSpace);\r\n\t}\r\n}\r\n\r\nSelection::Selection() : mainRange(0), moveExtends(false), tentativeMain(false), selType(SelTypes::stream) {\r\n\tAddSelection(SelectionRange(SelectionPosition(0)));\r\n}\r\n\r\nbool Selection::IsRectangular() const noexcept {\r\n\treturn (selType == SelTypes::rectangle) || (selType == SelTypes::thin);\r\n}\r\n\r\nSci::Position Selection::MainCaret() const noexcept {\r\n\treturn ranges[mainRange].caret.Position();\r\n}\r\n\r\nSci::Position Selection::MainAnchor() const noexcept {\r\n\treturn ranges[mainRange].anchor.Position();\r\n}\r\n\r\nSelectionRange &Selection::Rectangular() noexcept {\r\n\treturn rangeRectangular;\r\n}\r\n\r\nSelectionSegment Selection::Limits() const noexcept {\r\n\tPLATFORM_ASSERT(!ranges.empty());\r\n\tSelectionSegment sr(ranges[0].anchor, ranges[0].caret);\r\n\tfor (size_t i=1; i<ranges.size(); i++) {\r\n\t\tsr.Extend(ranges[i].anchor);\r\n\t\tsr.Extend(ranges[i].caret);\r\n\t}\r\n\treturn sr;\r\n}\r\n\r\nSelectionSegment Selection::LimitsForRectangularElseMain() const noexcept {\r\n\tif (IsRectangular()) {\r\n\t\treturn Limits();\r\n\t} else {\r\n\t\treturn SelectionSegment(ranges[mainRange].caret, ranges[mainRange].anchor);\r\n\t}\r\n}\r\n\r\nsize_t Selection::Count() const noexcept {\r\n\treturn ranges.size();\r\n}\r\n\r\nsize_t Selection::Main() const noexcept {\r\n\treturn mainRange;\r\n}\r\n\r\nvoid Selection::SetMain(size_t r) noexcept {\r\n\tPLATFORM_ASSERT(r < ranges.size());\r\n\tmainRange = r;\r\n}\r\n\r\nSelectionRange &Selection::Range(size_t r) noexcept {\r\n\treturn ranges[r];\r\n}\r\n\r\nconst SelectionRange &Selection::Range(size_t r) const noexcept {\r\n\treturn ranges[r];\r\n}\r\n\r\nSelectionRange &Selection::RangeMain() noexcept {\r\n\treturn ranges[mainRange];\r\n}\r\n\r\nconst SelectionRange &Selection::RangeMain() const noexcept {\r\n\treturn ranges[mainRange];\r\n}\r\n\r\nSelectionPosition Selection::Start() const noexcept {\r\n\tif (IsRectangular()) {\r\n\t\treturn rangeRectangular.Start();\r\n\t} else {\r\n\t\treturn ranges[mainRange].Start();\r\n\t}\r\n}\r\n\r\nbool Selection::MoveExtends() const noexcept {\r\n\treturn moveExtends;\r\n}\r\n\r\nvoid Selection::SetMoveExtends(bool moveExtends_) noexcept {\r\n\tmoveExtends = moveExtends_;\r\n}\r\n\r\nbool Selection::Empty() const noexcept {\r\n\tfor (const SelectionRange &range : ranges) {\r\n\t\tif (!range.Empty())\r\n\t\t\treturn false;\r\n\t}\r\n\treturn true;\r\n}\r\n\r\nSelectionPosition Selection::Last() const noexcept {\r\n\tSelectionPosition lastPosition;\r\n\tfor (const SelectionRange &range : ranges) {\r\n\t\tif (lastPosition < range.caret)\r\n\t\t\tlastPosition = range.caret;\r\n\t\tif (lastPosition < range.anchor)\r\n\t\t\tlastPosition = range.anchor;\r\n\t}\r\n\treturn lastPosition;\r\n}\r\n\r\nSci::Position Selection::Length() const noexcept {\r\n\tSci::Position len = 0;\r\n\tfor (const SelectionRange &range : ranges) {\r\n\t\tlen += range.Length();\r\n\t}\r\n\treturn len;\r\n}\r\n\r\nvoid Selection::MovePositions(bool insertion, Sci::Position startChange, Sci::Position length) noexcept {\r\n\tfor (SelectionRange &range : ranges) {\r\n\t\trange.MoveForInsertDelete(insertion, startChange, length);\r\n\t}\r\n\tif (selType == SelTypes::rectangle) {\r\n\t\trangeRectangular.MoveForInsertDelete(insertion, startChange, length);\r\n\t}\r\n}\r\n\r\nvoid Selection::TrimSelection(SelectionRange range) noexcept {\r\n\tfor (size_t i=0; i<ranges.size();) {\r\n\t\tif ((i != mainRange) && (ranges[i].Trim(range))) {\r\n\t\t\t// Trimmed to empty so remove\r\n\t\t\tfor (size_t j=i; j<ranges.size()-1; j++) {\r\n\t\t\t\tranges[j] = ranges[j+1];\r\n\t\t\t\tif (j == mainRange-1)\r\n\t\t\t\t\tmainRange--;\r\n\t\t\t}\r\n\t\t\tranges.pop_back();\r\n\t\t} else {\r\n\t\t\ti++;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid Selection::TrimOtherSelections(size_t r, SelectionRange range) noexcept {\r\n\tfor (size_t i = 0; i<ranges.size(); ++i) {\r\n\t\tif (i != r) {\r\n\t\t\tranges[i].Trim(range);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid Selection::SetSelection(SelectionRange range) noexcept {\r\n\tif (ranges.size() > 1) {\r\n\t\tranges.erase(ranges.begin() + 1, ranges.end());\r\n\t}\r\n\tranges[0] = range;\r\n\tmainRange = 0;\r\n}\r\n\r\nvoid Selection::AddSelection(SelectionRange range) {\r\n\tTrimSelection(range);\r\n\tranges.push_back(range);\r\n\tmainRange = ranges.size() - 1;\r\n}\r\n\r\nvoid Selection::AddSelectionWithoutTrim(SelectionRange range) {\r\n\tranges.push_back(range);\r\n\tmainRange = ranges.size() - 1;\r\n}\r\n\r\nvoid Selection::DropSelection(size_t r) noexcept {\r\n\tif ((ranges.size() > 1) && (r < ranges.size())) {\r\n\t\tsize_t mainNew = mainRange;\r\n\t\tif (mainNew >= r) {\r\n\t\t\tif (mainNew == 0) {\r\n\t\t\t\tmainNew = ranges.size() - 2;\r\n\t\t\t} else {\r\n\t\t\t\tmainNew--;\r\n\t\t\t}\r\n\t\t}\r\n\t\tranges.erase(ranges.begin() + r);\r\n\t\tmainRange = mainNew;\r\n\t}\r\n}\r\n\r\nvoid Selection::DropAdditionalRanges() noexcept {\r\n\tSetSelection(RangeMain());\r\n}\r\n\r\nvoid Selection::TentativeSelection(SelectionRange range) {\r\n\tif (!tentativeMain) {\r\n\t\trangesSaved = ranges;\r\n\t}\r\n\tranges = rangesSaved;\r\n\tAddSelection(range);\r\n\tTrimSelection(ranges[mainRange]);\r\n\ttentativeMain = true;\r\n}\r\n\r\nvoid Selection::CommitTentative() noexcept {\r\n\trangesSaved.clear();\r\n\ttentativeMain = false;\r\n}\r\n\r\nInSelection Selection::RangeType(size_t r) const noexcept {\r\n\treturn r == Main() ? InSelection::inMain : InSelection::inAdditional;\r\n}\r\n\r\nInSelection Selection::CharacterInSelection(Sci::Position posCharacter) const noexcept {\r\n\tfor (size_t i=0; i<ranges.size(); i++) {\r\n\t\tif (ranges[i].ContainsCharacter(posCharacter))\r\n\t\t\treturn RangeType(i);\r\n\t}\r\n\treturn InSelection::inNone;\r\n}\r\n\r\nInSelection Selection::InSelectionForEOL(Sci::Position pos) const noexcept {\r\n\tfor (size_t i=0; i<ranges.size(); i++) {\r\n\t\tif (!ranges[i].Empty() && (pos > ranges[i].Start().Position()) && (pos <= ranges[i].End().Position()))\r\n\t\t\treturn RangeType(i);\r\n\t}\r\n\treturn InSelection::inNone;\r\n}\r\n\r\nSci::Position Selection::VirtualSpaceFor(Sci::Position pos) const noexcept {\r\n\tSci::Position virtualSpace = 0;\r\n\tfor (const SelectionRange &range : ranges) {\r\n\t\tif ((range.caret.Position() == pos) && (virtualSpace < range.caret.VirtualSpace()))\r\n\t\t\tvirtualSpace = range.caret.VirtualSpace();\r\n\t\tif ((range.anchor.Position() == pos) && (virtualSpace < range.anchor.VirtualSpace()))\r\n\t\t\tvirtualSpace = range.anchor.VirtualSpace();\r\n\t}\r\n\treturn virtualSpace;\r\n}\r\n\r\nvoid Selection::Clear() noexcept {\r\n\tif (ranges.size() > 1) {\r\n\t\tranges.erase(ranges.begin() + 1, ranges.end());\r\n\t}\r\n\tmainRange = 0;\r\n\tselType = SelTypes::stream;\r\n\tmoveExtends = false;\r\n\tranges[mainRange].Reset();\r\n\trangeRectangular.Reset();\r\n}\r\n\r\nvoid Selection::RemoveDuplicates() noexcept {\r\n\tfor (size_t i=0; i<ranges.size()-1; i++) {\r\n\t\tif (ranges[i].Empty()) {\r\n\t\t\tsize_t j=i+1;\r\n\t\t\twhile (j<ranges.size()) {\r\n\t\t\t\tif (ranges[i] == ranges[j]) {\r\n\t\t\t\t\tranges.erase(ranges.begin() + j);\r\n\t\t\t\t\tif (mainRange >= j)\r\n\t\t\t\t\t\tmainRange--;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tj++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid Selection::RotateMain() noexcept {\r\n\tmainRange = (mainRange + 1) % ranges.size();\r\n}\r\n\r\n"
  },
  {
    "path": "scintilla/src/Selection.h",
    "content": "// Scintilla source code edit control\r\n/** @file Selection.h\r\n ** Classes maintaining the selection.\r\n **/\r\n// Copyright 2009 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef SELECTION_H\r\n#define SELECTION_H\r\n\r\nnamespace Scintilla::Internal {\r\n\r\nclass SelectionPosition {\r\n\tSci::Position position;\r\n\tSci::Position virtualSpace;\r\npublic:\r\n\texplicit SelectionPosition(Sci::Position position_= Sci::invalidPosition, Sci::Position virtualSpace_=0) noexcept : position(position_), virtualSpace(virtualSpace_) {\r\n\t\tPLATFORM_ASSERT(virtualSpace < 800000000);\r\n\t\tif (virtualSpace < 0)\r\n\t\t\tvirtualSpace = 0;\r\n\t}\r\n\tvoid Reset() noexcept {\r\n\t\tposition = 0;\r\n\t\tvirtualSpace = 0;\r\n\t}\r\n\tvoid MoveForInsertDelete(bool insertion, Sci::Position startChange, Sci::Position length, bool moveForEqual) noexcept;\r\n\tbool operator ==(const SelectionPosition &other) const noexcept {\r\n\t\treturn position == other.position && virtualSpace == other.virtualSpace;\r\n\t}\r\n\tbool operator <(const SelectionPosition &other) const noexcept;\r\n\tbool operator >(const SelectionPosition &other) const noexcept;\r\n\tbool operator <=(const SelectionPosition &other) const noexcept;\r\n\tbool operator >=(const SelectionPosition &other) const noexcept;\r\n\tSci::Position Position() const noexcept {\r\n\t\treturn position;\r\n\t}\r\n\tvoid SetPosition(Sci::Position position_) noexcept {\r\n\t\tposition = position_;\r\n\t\tvirtualSpace = 0;\r\n\t}\r\n\tSci::Position VirtualSpace() const noexcept {\r\n\t\treturn virtualSpace;\r\n\t}\r\n\tvoid SetVirtualSpace(Sci::Position virtualSpace_) noexcept {\r\n\t\tPLATFORM_ASSERT(virtualSpace_ < 800000000);\r\n\t\tif (virtualSpace_ >= 0)\r\n\t\t\tvirtualSpace = virtualSpace_;\r\n\t}\r\n\tvoid Add(Sci::Position increment) noexcept {\r\n\t\tposition = position + increment;\r\n\t}\r\n\tvoid AddVirtualSpace(Sci::Position increment) noexcept {\r\n\t\tSetVirtualSpace(virtualSpace + increment);\r\n\t}\r\n\tbool IsValid() const noexcept {\r\n\t\treturn position >= 0;\r\n\t}\r\n};\r\n\r\n// Ordered range to make drawing simpler\r\nstruct SelectionSegment {\r\n\tSelectionPosition start;\r\n\tSelectionPosition end;\r\n\tSelectionSegment() noexcept : start(), end() {\r\n\t}\r\n\tSelectionSegment(SelectionPosition a, SelectionPosition b) noexcept {\r\n\t\tif (a < b) {\r\n\t\t\tstart = a;\r\n\t\t\tend = b;\r\n\t\t} else {\r\n\t\t\tstart = b;\r\n\t\t\tend = a;\r\n\t\t}\r\n\t}\r\n\tbool Empty() const noexcept {\r\n\t\treturn start == end;\r\n\t}\r\n\tSci::Position Length() const noexcept {\r\n\t\treturn end.Position() - start.Position();\r\n\t}\r\n\tvoid Extend(SelectionPosition p) noexcept {\r\n\t\tif (start > p)\r\n\t\t\tstart = p;\r\n\t\tif (end < p)\r\n\t\t\tend = p;\r\n\t}\r\n\tSelectionSegment Subtract(Sci::Position increment) const noexcept {\r\n\t\tSelectionSegment ret(start, end);\r\n\t\tret.start.Add(-increment);\r\n\t\tret.end.Add(-increment);\r\n\t\treturn ret;\r\n\t}\r\n};\r\n\r\nstruct SelectionRange {\r\n\tSelectionPosition caret;\r\n\tSelectionPosition anchor;\r\n\r\n\tSelectionRange() noexcept : caret(), anchor() {\r\n\t}\r\n\texplicit SelectionRange(SelectionPosition single) noexcept : caret(single), anchor(single) {\r\n\t}\r\n\texplicit SelectionRange(Sci::Position single) noexcept : caret(single), anchor(single) {\r\n\t}\r\n\tSelectionRange(SelectionPosition caret_, SelectionPosition anchor_) noexcept : caret(caret_), anchor(anchor_) {\r\n\t}\r\n\tSelectionRange(Sci::Position caret_, Sci::Position anchor_) noexcept : caret(caret_), anchor(anchor_) {\r\n\t}\r\n\tbool Empty() const noexcept {\r\n\t\treturn anchor == caret;\r\n\t}\r\n\tSci::Position Length() const noexcept;\r\n\t// Sci::Position Width() const;\t// Like Length but takes virtual space into account\r\n\tbool operator ==(const SelectionRange &other) const noexcept {\r\n\t\treturn caret == other.caret && anchor == other.anchor;\r\n\t}\r\n\tbool operator <(const SelectionRange &other) const noexcept {\r\n\t\treturn caret < other.caret || ((caret == other.caret) && (anchor < other.anchor));\r\n\t}\r\n\tvoid Reset() noexcept {\r\n\t\tanchor.Reset();\r\n\t\tcaret.Reset();\r\n\t}\r\n\tvoid ClearVirtualSpace() noexcept {\r\n\t\tanchor.SetVirtualSpace(0);\r\n\t\tcaret.SetVirtualSpace(0);\r\n\t}\r\n\tvoid MoveForInsertDelete(bool insertion, Sci::Position startChange, Sci::Position length) noexcept;\r\n\tbool Contains(Sci::Position pos) const noexcept;\r\n\tbool Contains(SelectionPosition sp) const noexcept;\r\n\tbool ContainsCharacter(Sci::Position posCharacter) const noexcept;\r\n\tbool ContainsCharacter(SelectionPosition spCharacter) const noexcept;\r\n\tSelectionSegment Intersect(SelectionSegment check) const noexcept;\r\n\tSelectionPosition Start() const noexcept {\r\n\t\treturn (anchor < caret) ? anchor : caret;\r\n\t}\r\n\tSelectionPosition End() const noexcept {\r\n\t\treturn (anchor < caret) ? caret : anchor;\r\n\t}\r\n\tvoid Swap() noexcept;\r\n\tbool Trim(SelectionRange range) noexcept;\r\n\t// If range is all virtual collapse to start of virtual space\r\n\tvoid MinimizeVirtualSpace() noexcept;\r\n};\r\n\r\n// Deliberately an enum rather than an enum class to allow treating as bool\r\nenum InSelection { inNone, inMain, inAdditional };\r\n\r\nclass Selection {\r\n\tstd::vector<SelectionRange> ranges;\r\n\tstd::vector<SelectionRange> rangesSaved;\r\n\tSelectionRange rangeRectangular;\r\n\tsize_t mainRange;\r\n\tbool moveExtends;\r\n\tbool tentativeMain;\r\npublic:\r\n\tenum class SelTypes { none, stream, rectangle, lines, thin };\r\n\tSelTypes selType;\r\n\r\n\tSelection();\r\n\tbool IsRectangular() const noexcept;\r\n\tSci::Position MainCaret() const noexcept;\r\n\tSci::Position MainAnchor() const noexcept;\r\n\tSelectionRange &Rectangular() noexcept;\r\n\tSelectionSegment Limits() const noexcept;\r\n\t// This is for when you want to move the caret in response to a\r\n\t// user direction command - for rectangular selections, use the range\r\n\t// that covers all selected text otherwise return the main selection.\r\n\tSelectionSegment LimitsForRectangularElseMain() const noexcept;\r\n\tsize_t Count() const noexcept;\r\n\tsize_t Main() const noexcept;\r\n\tvoid SetMain(size_t r) noexcept;\r\n\tSelectionRange &Range(size_t r) noexcept;\r\n\tconst SelectionRange &Range(size_t r) const noexcept;\r\n\tSelectionRange &RangeMain() noexcept;\r\n\tconst SelectionRange &RangeMain() const noexcept;\r\n\tSelectionPosition Start() const noexcept;\r\n\tbool MoveExtends() const noexcept;\r\n\tvoid SetMoveExtends(bool moveExtends_) noexcept;\r\n\tbool Empty() const noexcept;\r\n\tSelectionPosition Last() const noexcept;\r\n\tSci::Position Length() const noexcept;\r\n\tvoid MovePositions(bool insertion, Sci::Position startChange, Sci::Position length) noexcept;\r\n\tvoid TrimSelection(SelectionRange range) noexcept;\r\n\tvoid TrimOtherSelections(size_t r, SelectionRange range) noexcept;\r\n\tvoid SetSelection(SelectionRange range) noexcept;\r\n\tvoid AddSelection(SelectionRange range);\r\n\tvoid AddSelectionWithoutTrim(SelectionRange range);\r\n\tvoid DropSelection(size_t r) noexcept;\r\n\tvoid DropAdditionalRanges() noexcept;\r\n\tvoid TentativeSelection(SelectionRange range);\r\n\tvoid CommitTentative() noexcept;\r\n\tInSelection RangeType(size_t r) const noexcept;\r\n\tInSelection CharacterInSelection(Sci::Position posCharacter) const noexcept;\r\n\tInSelection InSelectionForEOL(Sci::Position pos) const noexcept;\r\n\tSci::Position VirtualSpaceFor(Sci::Position pos) const noexcept;\r\n\tvoid Clear() noexcept;\r\n\tvoid RemoveDuplicates() noexcept;\r\n\tvoid RotateMain() noexcept;\r\n\tbool Tentative() const noexcept { return tentativeMain; }\r\n\tstd::vector<SelectionRange> RangesCopy() const {\r\n\t\treturn ranges;\r\n\t}\r\n};\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/src/SparseVector.h",
    "content": "// Scintilla source code edit control\r\n/** @file SparseVector.h\r\n ** Hold data sparsely associated with elements in a range.\r\n **/\r\n// Copyright 2016 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef SPARSEVECTOR_H\r\n#define SPARSEVECTOR_H\r\n\r\nnamespace Scintilla::Internal {\r\n\r\n// SparseVector is similar to RunStyles but is more efficient for cases where values occur\r\n// for one position instead of over a range of positions.\r\n// There are always elements at the start and end, so the element type should have\r\n// a reasonable empty value that will cause no problems.\r\n// The element type should have a noexcept default constructor as that allows methods to\r\n// be noexcept.\r\ntemplate <typename T>\r\nclass SparseVector {\r\nprivate:\r\n\tPartitioning<Sci::Position> starts;\r\n\tSplitVector<T> values;\r\n\tT empty;\t// Return from ValueAt when no element at a position.\r\n\tvoid ClearValue(Sci::Position partition) noexcept {\r\n\t\tvalues.SetValueAt(partition, T());\r\n\t}\r\npublic:\r\n\tSparseVector() : empty() {\r\n\t\tstarts = Partitioning<Sci::Position>(8);\r\n\t\tvalues = SplitVector<T>();\r\n\t\tvalues.InsertEmpty(0, 2);\r\n\t}\r\n\tSci::Position Length() const noexcept {\r\n\t\treturn starts.Length();\r\n\t}\r\n\tSci::Position Elements() const noexcept {\r\n\t\treturn starts.Partitions();\r\n\t}\r\n\tSci::Position PositionOfElement(Sci::Position element) const noexcept {\r\n\t\treturn starts.PositionFromPartition(element);\r\n\t}\r\n\tSci::Position ElementFromPosition(Sci::Position position) const noexcept {\r\n\t\tif (position < Length()) {\r\n\t\t\treturn starts.PartitionFromPosition(position);\r\n\t\t} else {\r\n\t\t\treturn starts.Partitions();\r\n\t\t}\r\n\t}\r\n\tconst T& ValueAt(Sci::Position position) const noexcept {\r\n\t\tassert(position <= Length());\r\n\t\tconst Sci::Position partition = ElementFromPosition(position);\r\n\t\tconst Sci::Position startPartition = starts.PositionFromPartition(partition);\r\n\t\tif (startPartition == position) {\r\n\t\t\treturn values.ValueAt(partition);\r\n\t\t} else {\r\n\t\t\treturn empty;\r\n\t\t}\r\n\t}\r\n\tT Extract(Sci::Position position) {\r\n\t\t// Move value currently at position; clear and remove position; return value.\r\n\t\t// Doesn't remove position at start or end.\r\n\t\tassert(position <= Length());\r\n\t\tconst Sci::Position partition = ElementFromPosition(position);\r\n\t\tassert(partition >= 0);\r\n\t\tassert(partition <= starts.Partitions());\r\n\t\tassert(starts.PositionFromPartition(partition) == position);\r\n\t\tT value = std::move(values.operator[](partition));\r\n\t\tif ((partition > 0) && (partition < starts.Partitions())) {\r\n\t\t\tstarts.RemovePartition(partition);\r\n\t\t\tvalues.Delete(partition);\r\n\t\t}\r\n\t\tCheck();\r\n\t\treturn value;\r\n\t}\r\n\ttemplate <typename ParamType>\r\n\tvoid SetValueAt(Sci::Position position, ParamType &&value) {\r\n\t\tassert(position <= Length());\r\n\t\tconst Sci::Position partition = ElementFromPosition(position);\r\n\t\tconst Sci::Position startPartition = starts.PositionFromPartition(partition);\r\n\t\tif (value == T()) {\r\n\t\t\t// Setting the empty value is equivalent to deleting the position\r\n\t\t\tif (position == 0 || position == Length()) {\r\n\t\t\t\tClearValue(partition);\r\n\t\t\t} else if (position == startPartition) {\r\n\t\t\t\t// Currently an element at this position, so remove\r\n\t\t\t\tClearValue(partition);\r\n\t\t\t\tstarts.RemovePartition(partition);\r\n\t\t\t\tvalues.Delete(partition);\r\n\t\t\t}\r\n\t\t\t// Else element remains empty\r\n\t\t} else {\r\n\t\t\tif (position == startPartition) {\r\n\t\t\t\t// Already a value at this position, so replace\r\n\t\t\t\tClearValue(partition);\r\n\t\t\t\tvalues.SetValueAt(partition, std::forward<ParamType>(value));\r\n\t\t\t} else {\r\n\t\t\t\t// Insert a new element\r\n\t\t\t\tstarts.InsertPartition(partition + 1, position);\r\n\t\t\t\tvalues.Insert(partition + 1, std::forward<ParamType>(value));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tvoid InsertSpace(Sci::Position position, Sci::Position insertLength) {\r\n\t\tassert(position <= Length());\r\n\t\tconst Sci::Position partition = starts.PartitionFromPosition(position);\r\n\t\tconst Sci::Position startPartition = starts.PositionFromPartition(partition);\r\n\t\tif (startPartition == position) {\r\n\t\t\tconst bool positionOccupied = values.ValueAt(partition) != T();\r\n\t\t\t// Inserting at start of run so make previous longer\r\n\t\t\tif (partition == 0) {\r\n\t\t\t\t// Inserting at start of document so ensure start empty\r\n\t\t\t\tif (positionOccupied) {\r\n\t\t\t\t\tstarts.InsertPartition(1, 0);\r\n\t\t\t\t\tvalues.InsertEmpty(0, 1);\r\n\t\t\t\t}\r\n\t\t\t\tstarts.InsertText(partition, insertLength);\r\n\t\t\t} else {\r\n\t\t\t\tif (positionOccupied) {\r\n\t\t\t\t\tstarts.InsertText(partition - 1, insertLength);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Insert at end of run so do not extend style\r\n\t\t\t\t\tstarts.InsertText(partition, insertLength);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tstarts.InsertText(partition, insertLength);\r\n\t\t}\r\n\t}\r\n\tvoid DeletePosition(Sci::Position position) {\r\n\t\tassert(position < Length());\r\n\t\tSci::Position partition = starts.PartitionFromPosition(position);\r\n\t\tconst Sci::Position startPartition = starts.PositionFromPartition(partition);\r\n\t\tif (startPartition == position) {\r\n\t\t\tif (partition == 0) {\r\n\t\t\t\tClearValue(0);\r\n\t\t\t\tif (starts.PositionFromPartition(1) == 1) {\r\n\t\t\t\t\t// Removing all space of first partition, so remove next partition\r\n\t\t\t\t\t// and move value if not last\r\n\t\t\t\t\tif (Elements() > 1) {\r\n\t\t\t\t\t\tstarts.RemovePartition(partition + 1);\r\n\t\t\t\t\t\tvalues.Delete(partition);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if (partition == starts.Partitions()) {\r\n\t\t\t\t// This should not be possible\r\n\t\t\t\tClearValue(partition);\r\n\t\t\t\tthrow std::runtime_error(\"SparseVector: deleting end partition.\");\r\n\t\t\t} else {\r\n\t\t\t\tClearValue(partition);\r\n\t\t\t\tstarts.RemovePartition(partition);\r\n\t\t\t\tvalues.Delete(partition);\r\n\t\t\t\t// Its the previous partition now that gets smaller\r\n\t\t\t\tpartition--;\r\n\t\t\t}\r\n\t\t}\r\n\t\tstarts.InsertText(partition, -1);\r\n\t\tCheck();\r\n\t}\r\n\tvoid DeleteAll() {\r\n\t\tstarts = Partitioning<Sci::Position>(8);\r\n\t\tvalues = SplitVector<T>();\r\n\t\tvalues.InsertEmpty(0, 2);\r\n\t}\r\n\tvoid DeleteRange(Sci::Position position, Sci::Position deleteLength) {\r\n\t\t// For now, delete elements in range - may want to leave value at start\r\n\t\t// or combine onto position.\r\n\t\tif (position > Length() || (deleteLength == 0)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tconst Sci::Position positionEnd = position + deleteLength;\r\n\t\tassert(positionEnd <= Length());\r\n\t\tif (position == 0) {\r\n\t\t\t// Remove all partitions in range, moving values to start\r\n\t\t\twhile ((Elements() > 1) && (starts.PositionFromPartition(1) <= deleteLength)) {\r\n\t\t\t\tstarts.RemovePartition(1);\r\n\t\t\t\tvalues.Delete(0);\r\n\t\t\t}\r\n\t\t\tstarts.InsertText(0, -deleteLength);\r\n\t\t\tif (Length() == 0) {\r\n\t\t\t\tClearValue(0);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tconst Sci::Position partition = starts.PartitionFromPosition(position);\r\n\t\t\tconst bool atPartitionStart = position == starts.PositionFromPartition(partition);\r\n\t\t\tconst Sci::Position partitionDelete = partition + (atPartitionStart ? 0 : 1);\r\n\t\t\tassert(partitionDelete > 0);\r\n\t\t\tfor (;;) {\r\n\t\t\t\tconst Sci::Position positionAtIndex = starts.PositionFromPartition(partitionDelete);\r\n\t\t\t\tassert(position <= positionAtIndex);\r\n\t\t\t\tif (positionAtIndex >= positionEnd) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tassert(partitionDelete <= Elements());\r\n\t\t\t\tstarts.RemovePartition(partitionDelete);\r\n\t\t\t\tvalues.Delete(partitionDelete);\r\n\t\t\t}\r\n\t\t\tstarts.InsertText(partition - (atPartitionStart ? 1 : 0), -deleteLength);\r\n\t\t}\r\n\t\tCheck();\r\n\t}\r\n\tSci::Position PositionNext(Sci::Position start) const noexcept {\r\n\t\tconst Sci::Position element = ElementFromPosition(start);\r\n\t\tif (element < Elements()) {\r\n\t\t\treturn PositionOfElement(element + 1);\r\n\t\t}\r\n\t\treturn Length() + 1;\t// Out of bounds to terminate\r\n\t}\r\n\tSci::Position IndexAfter(Sci::Position position) const noexcept {\r\n\t\tassert(position < Length());\r\n\t\tif (position < 0)\r\n\t\t\treturn 0;\r\n\t\tconst Sci::Position partition = starts.PartitionFromPosition(position);\r\n\t\treturn partition + 1;\r\n\t}\r\n\tvoid Check() const {\r\n#ifdef CHECK_CORRECTNESS\r\n\t\tstarts.Check();\r\n\t\tif (starts.Partitions() != values.Length() - 1) {\r\n\t\t\tthrow std::runtime_error(\"SparseVector: Partitions and values different lengths.\");\r\n\t\t}\r\n#endif\r\n\t}\r\n};\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/src/SplitVector.h",
    "content": "// Scintilla source code edit control\r\n/** @file SplitVector.h\r\n ** Main data structure for holding arrays that handle insertions\r\n ** and deletions efficiently.\r\n **/\r\n// Copyright 1998-2007 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef SPLITVECTOR_H\r\n#define SPLITVECTOR_H\r\n\r\nnamespace Scintilla::Internal {\r\n\r\ntemplate <typename T>\r\nclass SplitVector {\r\nprotected:\r\n\tstd::vector<T> body;\r\n\tT empty;\t/// Returned as the result of out-of-bounds access.\r\n\tptrdiff_t lengthBody;\r\n\tptrdiff_t part1Length;\r\n\tptrdiff_t gapLength;\t/// invariant: gapLength == body.size() - lengthBody\r\n\tsize_t growSize;\r\n\r\n\t/// Move the gap to a particular position so that insertion and\r\n\t/// deletion at that point will not require much copying and\r\n\t/// hence be fast.\r\n\tvoid GapTo(ptrdiff_t position) noexcept {\r\n\t\tif (position != part1Length) {\r\n\t\t\ttry {\r\n\t\t\t\tif (gapLength > 0) {\t// If gap to move\r\n\t\t\t\t\t// This can never fail but std::move and std::move_backward are not noexcept.\r\n\t\t\t\t\tif (position < part1Length) {\r\n\t\t\t\t\t\t// Moving the gap towards start so moving elements towards end\r\n\t\t\t\t\t\tstd::move_backward(\r\n\t\t\t\t\t\t\tbody.data() + position,\r\n\t\t\t\t\t\t\tbody.data() + part1Length,\r\n\t\t\t\t\t\t\tbody.data() + gapLength + part1Length);\r\n\t\t\t\t\t} else {\t// position > part1Length\r\n\t\t\t\t\t\t// Moving the gap towards end so moving elements towards start\r\n\t\t\t\t\t\tstd::move(\r\n\t\t\t\t\t\t\tbody.data() + part1Length + gapLength,\r\n\t\t\t\t\t\t\tbody.data() + gapLength + position,\r\n\t\t\t\t\t\t\tbody.data() + part1Length);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tpart1Length = position;\r\n\t\t\t} catch (...) {\r\n\t\t\t\t// Ignore any exception\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/// Check that there is room in the buffer for an insertion,\r\n\t/// reallocating if more space needed.\r\n\tvoid RoomFor(ptrdiff_t insertionLength) {\r\n\t\tif (gapLength < insertionLength) {\r\n\t\t\twhile (growSize < body.size() / 6)\r\n\t\t\t\tgrowSize *= 2;\r\n\t\t\tReAllocate(body.size() + insertionLength + growSize);\r\n\t\t}\r\n\t}\r\n\r\n\tvoid Init() {\r\n\t\tbody.clear();\r\n\t\tbody.shrink_to_fit();\r\n\t\tlengthBody = 0;\r\n\t\tpart1Length = 0;\r\n\t\tgapLength = 0;\r\n\t\tgrowSize = 8;\r\n\t}\r\n\r\npublic:\r\n\t/// Construct a split buffer.\r\n\tSplitVector(size_t growSize_=8) : empty(), lengthBody(0), part1Length(0), gapLength(0), growSize(growSize_) {\r\n\t}\r\n\r\n\tsize_t GetGrowSize() const noexcept {\r\n\t\treturn growSize;\r\n\t}\r\n\r\n\tvoid SetGrowSize(size_t growSize_) noexcept {\r\n\t\tgrowSize = growSize_;\r\n\t}\r\n\r\n\t/// Reallocate the storage for the buffer to be newSize and\r\n\t/// copy existing contents to the new buffer.\r\n\t/// Must not be used to decrease the size of the buffer.\r\n\tvoid ReAllocate(size_t newSize) {\r\n\t\tif (newSize > body.size()) {\r\n\t\t\t// Move the gap to the end\r\n\t\t\tGapTo(lengthBody);\r\n\t\t\tgapLength += newSize - body.size();\r\n\t\t\t// RoomFor implements a growth strategy but so does vector::resize so\r\n\t\t\t// ensure vector::resize allocates exactly the amount wanted by\r\n\t\t\t// calling reserve first.\r\n\t\t\tbody.reserve(newSize);\r\n\t\t\tbody.resize(newSize);\r\n\t\t}\r\n\t}\r\n\r\n\t/// Retrieve the element at a particular position.\r\n\t/// Retrieving positions outside the range of the buffer returns empty or 0.\r\n\tconst T& ValueAt(ptrdiff_t position) const noexcept {\r\n\t\tif (position < part1Length) {\r\n\t\t\tif (position < 0) {\r\n\t\t\t\treturn empty;\r\n\t\t\t} else {\r\n\t\t\t\treturn body[position];\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (position >= lengthBody) {\r\n\t\t\t\treturn empty;\r\n\t\t\t} else {\r\n\t\t\t\treturn body[gapLength + position];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/// Set the element at a particular position.\r\n\t/// Setting positions outside the range of the buffer performs no assignment\r\n\t/// but asserts in debug builds.\r\n\ttemplate <typename ParamType>\r\n\tvoid SetValueAt(ptrdiff_t position, ParamType&& v) noexcept {\r\n\t\tif (position < part1Length) {\r\n\t\t\tPLATFORM_ASSERT(position >= 0);\r\n\t\t\tif (position < 0) {\r\n\t\t\t\t;\r\n\t\t\t} else {\r\n\t\t\t\tbody[position] = std::forward<ParamType>(v);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tPLATFORM_ASSERT(position < lengthBody);\r\n\t\t\tif (position >= lengthBody) {\r\n\t\t\t\t;\r\n\t\t\t} else {\r\n\t\t\t\tbody[gapLength + position] = std::forward<ParamType>(v);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/// Retrieve the element at a particular position.\r\n\t/// The position must be within bounds or an assertion is triggered.\r\n\tconst T &operator[](ptrdiff_t position) const noexcept {\r\n\t\tPLATFORM_ASSERT(position >= 0 && position < lengthBody);\r\n\t\tif (position < part1Length) {\r\n\t\t\treturn body[position];\r\n\t\t} else {\r\n\t\t\treturn body[gapLength + position];\r\n\t\t}\r\n\t}\r\n\r\n\t/// Retrieve reference to the element at a particular position.\r\n\t/// This, instead of the const variant, can be used to mutate in-place.\r\n\t/// The position must be within bounds or an assertion is triggered.\r\n\tT &operator[](ptrdiff_t position) noexcept {\r\n\t\tPLATFORM_ASSERT(position >= 0 && position < lengthBody);\r\n\t\tif (position < part1Length) {\r\n\t\t\treturn body[position];\r\n\t\t} else {\r\n\t\t\treturn body[gapLength + position];\r\n\t\t}\r\n\t}\r\n\r\n\t/// Retrieve the length of the buffer.\r\n\tptrdiff_t Length() const noexcept {\r\n\t\treturn lengthBody;\r\n\t}\r\n\r\n\t/// Insert a single value into the buffer.\r\n\t/// Inserting at positions outside the current range fails.\r\n\tvoid Insert(ptrdiff_t position, T v) {\r\n\t\tPLATFORM_ASSERT((position >= 0) && (position <= lengthBody));\r\n\t\tif ((position < 0) || (position > lengthBody)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tRoomFor(1);\r\n\t\tGapTo(position);\r\n\t\tbody[part1Length] = std::move(v);\r\n\t\tlengthBody++;\r\n\t\tpart1Length++;\r\n\t\tgapLength--;\r\n\t}\r\n\r\n\t/// Insert a number of elements into the buffer setting their value.\r\n\t/// Inserting at positions outside the current range fails.\r\n\tvoid InsertValue(ptrdiff_t position, ptrdiff_t insertLength, T v) {\r\n\t\tPLATFORM_ASSERT((position >= 0) && (position <= lengthBody));\r\n\t\tif (insertLength > 0) {\r\n\t\t\tif ((position < 0) || (position > lengthBody)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tRoomFor(insertLength);\r\n\t\t\tGapTo(position);\r\n\t\t\tstd::fill(body.data() + part1Length, body.data() + part1Length + insertLength, v);\r\n\t\t\tlengthBody += insertLength;\r\n\t\t\tpart1Length += insertLength;\r\n\t\t\tgapLength -= insertLength;\r\n\t\t}\r\n\t}\r\n\r\n\t/// Add some new empty elements.\r\n\t/// InsertValue is good for value objects but not for unique_ptr objects\r\n\t/// since they can only be moved from once.\r\n\t/// Callers can write to the returned pointer to transform inputs without copies.\r\n\tT *InsertEmpty(ptrdiff_t position, ptrdiff_t insertLength) {\r\n\t\tPLATFORM_ASSERT((position >= 0) && (position <= lengthBody));\r\n\t\tif (insertLength > 0) {\r\n\t\t\tif ((position < 0) || (position > lengthBody)) {\r\n\t\t\t\treturn nullptr;\r\n\t\t\t}\r\n\t\t\tRoomFor(insertLength);\r\n\t\t\tGapTo(position);\r\n\t\t\tfor (ptrdiff_t elem = part1Length; elem < part1Length + insertLength; elem++) {\r\n\t\t\t\tT emptyOne = {};\r\n\t\t\t\tbody[elem] = std::move(emptyOne);\r\n\t\t\t}\r\n\t\t\tlengthBody += insertLength;\r\n\t\t\tpart1Length += insertLength;\r\n\t\t\tgapLength -= insertLength;\r\n\t\t}\r\n\t\treturn body.data() + position;\r\n\t}\r\n\r\n\t/// Ensure at least length elements allocated,\r\n\t/// appending zero valued elements if needed.\r\n\tvoid EnsureLength(ptrdiff_t wantedLength) {\r\n\t\tif (Length() < wantedLength) {\r\n\t\t\tInsertEmpty(Length(), wantedLength - Length());\r\n\t\t}\r\n\t}\r\n\r\n\t/// Insert text into the buffer from an array.\r\n\tvoid InsertFromArray(ptrdiff_t positionToInsert, const T s[], ptrdiff_t positionFrom, ptrdiff_t insertLength) {\r\n\t\tPLATFORM_ASSERT((positionToInsert >= 0) && (positionToInsert <= lengthBody));\r\n\t\tif (insertLength > 0) {\r\n\t\t\tif ((positionToInsert < 0) || (positionToInsert > lengthBody)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tRoomFor(insertLength);\r\n\t\t\tGapTo(positionToInsert);\r\n\t\t\tstd::copy(s + positionFrom, s + positionFrom + insertLength, body.data() + part1Length);\r\n\t\t\tlengthBody += insertLength;\r\n\t\t\tpart1Length += insertLength;\r\n\t\t\tgapLength -= insertLength;\r\n\t\t}\r\n\t}\r\n\r\n\t/// Delete one element from the buffer.\r\n\tvoid Delete(ptrdiff_t position) {\r\n\t\tPLATFORM_ASSERT((position >= 0) && (position < lengthBody));\r\n\t\tDeleteRange(position, 1);\r\n\t}\r\n\r\n\t/// Delete a range from the buffer.\r\n\t/// Deleting positions outside the current range fails.\r\n\t/// Cannot be noexcept as vector::shrink_to_fit may be called and it may throw.\r\n\tvoid DeleteRange(ptrdiff_t position, ptrdiff_t deleteLength) {\r\n\t\tPLATFORM_ASSERT((position >= 0) && (position + deleteLength <= lengthBody));\r\n\t\tif ((position < 0) || ((position + deleteLength) > lengthBody)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif ((position == 0) && (deleteLength == lengthBody)) {\r\n\t\t\t// Full deallocation returns storage and is faster\r\n\t\t\tInit();\r\n\t\t} else if (deleteLength > 0) {\r\n\t\t\tGapTo(position);\r\n\t\t\tlengthBody -= deleteLength;\r\n\t\t\tgapLength += deleteLength;\r\n\t\t}\r\n\t}\r\n\r\n\t/// Delete all the buffer contents.\r\n\tvoid DeleteAll() {\r\n\t\tDeleteRange(0, lengthBody);\r\n\t}\r\n\r\n\t/// Retrieve a range of elements into an array\r\n\tvoid GetRange(T *buffer, ptrdiff_t position, ptrdiff_t retrieveLength) const {\r\n\t\t// Split into up to 2 ranges, before and after the split then use memcpy on each.\r\n\t\tptrdiff_t range1Length = 0;\r\n\t\tif (position < part1Length) {\r\n\t\t\tconst ptrdiff_t part1AfterPosition = part1Length - position;\r\n\t\t\trange1Length = retrieveLength;\r\n\t\t\tif (range1Length > part1AfterPosition)\r\n\t\t\t\trange1Length = part1AfterPosition;\r\n\t\t}\r\n\t\tstd::copy(body.data() + position, body.data() + position + range1Length, buffer);\r\n\t\tbuffer += range1Length;\r\n\t\tposition = position + range1Length + gapLength;\r\n\t\tconst ptrdiff_t range2Length = retrieveLength - range1Length;\r\n\t\tstd::copy(body.data() + position, body.data() + position + range2Length, buffer);\r\n\t}\r\n\r\n\t/// Compact the buffer and return a pointer to the first element.\r\n\t/// Also ensures there is an empty element beyond logical end in case its\r\n\t/// passed to a function expecting a NUL terminated string.\r\n\tT *BufferPointer() {\r\n\t\tRoomFor(1);\r\n\t\tGapTo(lengthBody);\r\n\t\tT emptyOne = {};\r\n\t\tbody[lengthBody] = std::move(emptyOne);\r\n\t\treturn body.data();\r\n\t}\r\n\r\n\t/// Return a pointer to a range of elements, first rearranging the buffer if\r\n\t/// needed to make that range contiguous.\r\n\tT *RangePointer(ptrdiff_t position, ptrdiff_t rangeLength) noexcept {\r\n\t\tif (position < part1Length) {\r\n\t\t\tif ((position + rangeLength) > part1Length) {\r\n\t\t\t\t// Range overlaps gap, so move gap to start of range.\r\n\t\t\t\tGapTo(position);\r\n\t\t\t\treturn body.data() + position + gapLength;\r\n\t\t\t} else {\r\n\t\t\t\treturn body.data() + position;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\treturn body.data() + position + gapLength;\r\n\t\t}\r\n\t}\r\n\r\n\t/// Return a pointer to a single element.\r\n\t/// Does not rearrange the buffer.\r\n\tconst T *ElementPointer(ptrdiff_t position) const noexcept {\r\n\t\tif (position < part1Length) {\r\n\t\t\treturn body.data() + position;\r\n\t\t} else {\r\n\t\t\treturn body.data() + position + gapLength;\r\n\t\t}\r\n\t}\r\n\r\n\t/// Return the position of the gap within the buffer.\r\n\tptrdiff_t GapPosition() const noexcept {\r\n\t\treturn part1Length;\r\n\t}\r\n};\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/src/Style.cxx",
    "content": "// Scintilla source code edit control\r\n/** @file Style.cxx\r\n ** Defines the font and colour style for a class of text.\r\n **/\r\n// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#include <cstdint>\r\n#include <stdexcept>\r\n#include <string_view>\r\n#include <vector>\r\n#include <optional>\r\n#include <memory>\r\n\r\n#include \"ScintillaTypes.h\"\r\n\r\n#include \"Debugging.h\"\r\n#include \"Geometry.h\"\r\n#include \"Platform.h\"\r\n\r\n#include \"Style.h\"\r\n\r\nusing namespace Scintilla;\r\nusing namespace Scintilla::Internal;\r\n\r\nbool FontSpecification::operator==(const FontSpecification &other) const noexcept {\r\n\treturn fontName == other.fontName &&\r\n\t       weight == other.weight &&\r\n\t       italic == other.italic &&\r\n\t       size == other.size &&\r\n\t       characterSet == other.characterSet &&\r\n\t       extraFontFlag == other.extraFontFlag &&\r\n\t       checkMonospaced == other.checkMonospaced;\r\n}\r\n\r\nbool FontSpecification::operator<(const FontSpecification &other) const noexcept {\r\n\tif (fontName != other.fontName)\r\n\t\treturn fontName < other.fontName;\r\n\tif (weight != other.weight)\r\n\t\treturn weight < other.weight;\r\n\tif (italic != other.italic)\r\n\t\treturn !italic;\r\n\tif (size != other.size)\r\n\t\treturn size < other.size;\r\n\tif (characterSet != other.characterSet)\r\n\t\treturn characterSet < other.characterSet;\r\n\tif (extraFontFlag != other.extraFontFlag)\r\n\t\treturn extraFontFlag < other.extraFontFlag;\r\n\tif (checkMonospaced != other.checkMonospaced)\r\n\t\treturn checkMonospaced < other.checkMonospaced;\r\n\treturn false;\r\n}\r\n\r\nnamespace {\r\n\r\n// noexcept Platform::DefaultFontSize\r\nint DefaultFontSize() noexcept {\r\n\ttry {\r\n\t\treturn Platform::DefaultFontSize();\r\n\t} catch (...) {\r\n\t\treturn 10;\r\n\t}\r\n}\r\n\r\n}\r\n\r\nStyle::Style(const char *fontName_) noexcept :\r\n\tFontSpecification(fontName_, DefaultFontSize() * FontSizeMultiplier),\r\n\tfore(black),\r\n\tback(white),\r\n\teolFilled(false),\r\n\tunderline(false),\r\n\tcaseForce(CaseForce::mixed),\r\n\tvisible(true),\r\n\tchangeable(true),\r\n\thotspot(false),\r\n\tinvisibleRepresentation{} {\r\n}\r\n\r\nvoid Style::Copy(std::shared_ptr<Font> font_, const FontMeasurements &fm_) noexcept {\r\n\tfont = std::move(font_);\r\n\t(FontMeasurements &)(*this) = fm_;\r\n}\r\n"
  },
  {
    "path": "scintilla/src/Style.h",
    "content": "// Scintilla source code edit control\r\n/** @file Style.h\r\n ** Defines the font and colour style for a class of text.\r\n **/\r\n// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef STYLE_H\r\n#define STYLE_H\r\n\r\nnamespace Scintilla::Internal {\r\n\r\nstruct FontSpecification {\r\n\t// fontName is allocated by a ViewStyle container object and may be null\r\n\tconst char *fontName;\r\n\tint size;\r\n\tScintilla::FontWeight weight = Scintilla::FontWeight::Normal;\r\n\tbool italic = false;\r\n\tScintilla::CharacterSet characterSet = Scintilla::CharacterSet::Default;\r\n\tScintilla::FontQuality extraFontFlag = Scintilla::FontQuality::QualityDefault;\r\n\tbool checkMonospaced = false;\r\n\r\n\tconstexpr FontSpecification(const char *fontName_=nullptr, int size_=10*Scintilla::FontSizeMultiplier) noexcept :\r\n\t\tfontName(fontName_), size(size_) {\r\n\t}\r\n\tbool operator==(const FontSpecification &other) const noexcept;\r\n\tbool operator<(const FontSpecification &other) const noexcept;\r\n};\r\n\r\nstruct FontMeasurements {\r\n\tXYPOSITION ascent = 1;\r\n\tXYPOSITION descent = 1;\r\n\tXYPOSITION capitalHeight = 1;\t// Top of capital letter to baseline: ascent - internal leading\r\n\tXYPOSITION aveCharWidth = 1;\r\n\tXYPOSITION monospaceCharacterWidth = 1;\r\n\tXYPOSITION spaceWidth = 1;\r\n\tbool monospaceASCII = false;\r\n\tint sizeZoomed = 2;\r\n};\r\n\r\n/**\r\n */\r\nclass Style : public FontSpecification, public FontMeasurements {\r\npublic:\r\n\tColourRGBA fore;\r\n\tColourRGBA back;\r\n\tbool eolFilled;\r\n\tbool underline;\r\n\tenum class CaseForce {mixed, upper, lower, camel};\r\n\tCaseForce caseForce;\r\n\tbool visible;\r\n\tbool changeable;\r\n\tbool hotspot;\r\n\tchar invisibleRepresentation[5];\r\n\r\n\tstd::shared_ptr<Font> font;\r\n\r\n\tStyle(const char *fontName_=nullptr) noexcept;\r\n\tvoid Copy(std::shared_ptr<Font> font_, const FontMeasurements &fm_) noexcept;\r\n\tbool IsProtected() const noexcept { return !(changeable && visible);}\r\n};\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/src/UndoHistory.cxx",
    "content": "// Scintilla source code edit control\r\n/** @file UndoHistory.cxx\r\n ** Manages undo for the document.\r\n **/\r\n// Copyright 1998-2024 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#include <cstddef>\r\n#include <cstdlib>\r\n#include <cstdint>\r\n#include <cassert>\r\n#include <cstring>\r\n#include <cstdio>\r\n#include <cstdarg>\r\n#include <climits>\r\n\r\n#include <stdexcept>\r\n#include <string>\r\n#include <string_view>\r\n#include <vector>\r\n#include <optional>\r\n#include <algorithm>\r\n#include <memory>\r\n\r\n#include \"ScintillaTypes.h\"\r\n\r\n#include \"Debugging.h\"\r\n\r\n#include \"Position.h\"\r\n#include \"SplitVector.h\"\r\n#include \"Partitioning.h\"\r\n#include \"RunStyles.h\"\r\n#include \"SparseVector.h\"\r\n#include \"ChangeHistory.h\"\r\n#include \"CellBuffer.h\"\r\n#include \"UndoHistory.h\"\r\n\r\nnamespace Scintilla::Internal {\r\n\r\ntemplate <typename T>\r\nvoid VectorTruncate(std::vector<T> &v, size_t length) noexcept {\r\n\tv.erase(v.begin() + length, v.end());\r\n}\r\n\r\nconstexpr size_t byteMask = UINT8_MAX;\r\nconstexpr size_t byteBits = 8;\r\n\r\nsize_t ReadValue(const uint8_t *bytes, size_t length) noexcept {\r\n\tsize_t value = 0;\r\n\tfor (size_t i = 0; i < length; i++) {\r\n\t\tvalue = (value << byteBits) + bytes[i];\r\n\t}\r\n\treturn value;\r\n}\r\n\r\nvoid WriteValue(uint8_t *bytes, size_t length, size_t value) noexcept {\r\n\twhile (length != 0) {\r\n\t\t--length;\r\n\t\tbytes[length] = value & byteMask;\r\n\t\tvalue = value >> byteBits;\r\n\t}\r\n}\r\n\r\nsize_t ScaledVector::Size() const noexcept {\r\n\treturn bytes.size() / element.size;\r\n}\r\n\r\nsize_t ScaledVector::ValueAt(size_t index) const noexcept {\r\n\treturn ReadValue(bytes.data() + index * element.size, element.size);\r\n}\r\n\r\nintptr_t ScaledVector::SignedValueAt(size_t index) const noexcept {\r\n\treturn ReadValue(bytes.data() + index * element.size, element.size);\r\n}\r\n\r\nconstexpr SizeMax ElementForValue(size_t value) noexcept {\r\n\tsize_t maxN = byteMask;\r\n\tsize_t i = 1;\r\n\twhile (value > byteMask) {\r\n\t\ti++;\r\n\t\tvalue >>= byteBits;\r\n\t\tmaxN = (maxN << byteBits) + byteMask;\r\n\t}\r\n\treturn { i, maxN };\r\n}\r\n\r\nvoid ScaledVector::SetValueAt(size_t index, size_t value) {\r\n\t// Check if value fits, if not then expand\r\n\tif (value > element.maxValue) {\r\n\t\tconst SizeMax elementForValue = ElementForValue(value);\r\n\t\tconst size_t length = bytes.size() / element.size;\r\n\t\tstd::vector<uint8_t> bytesNew(elementForValue.size * length);\r\n\t\tfor (size_t i = 0; i < length; i++) {\r\n\t\t\tconst uint8_t *source = bytes.data() + i * element.size;\r\n\t\t\tuint8_t *destination = bytesNew.data() + (i+1) * elementForValue.size - element.size;\r\n\t\t\tmemcpy(destination, source, element.size);\r\n\t\t}\r\n\t\tstd::swap(bytes, bytesNew);\r\n\t\telement = elementForValue;\r\n\t}\r\n\tWriteValue(bytes.data() + index * element.size, element.size, value);\r\n}\r\n\r\nvoid ScaledVector::ClearValueAt(size_t index) noexcept {\r\n\t// 0 fits in any size element so no expansion needed so no exceptions\r\n\tWriteValue(bytes.data() + index * element.size, element.size, 0);\r\n}\r\n\r\nvoid ScaledVector::Clear() noexcept {\r\n\tbytes.clear();\r\n}\r\n\r\nvoid ScaledVector::Truncate(size_t length) noexcept {\r\n\tVectorTruncate(bytes, length * element.size);\r\n\tassert(bytes.size() == length * element.size);\r\n}\r\n\r\nvoid ScaledVector::ReSize(size_t length) {\r\n\tbytes.resize(length * element.size);\r\n}\r\n\r\nvoid ScaledVector::PushBack() {\r\n\tbytes.resize(bytes.size() + element.size);\r\n}\r\n\r\nsize_t ScaledVector::SizeInBytes() const noexcept {\r\n\treturn bytes.size();\r\n}\r\n\r\nUndoActionType::UndoActionType() noexcept : at(ActionType::insert), mayCoalesce(false) {\r\n}\r\n\r\nUndoActions::UndoActions() noexcept = default;\r\n\r\nvoid UndoActions::Truncate(size_t length) noexcept {\r\n\tVectorTruncate(types, length);\r\n\tassert(types.size() == length);\r\n\tpositions.Truncate(length);\r\n\tlengths.Truncate(length);\r\n}\r\n\r\nvoid UndoActions::PushBack() {\r\n\ttypes.emplace_back();\r\n\tpositions.PushBack();\r\n\tlengths.PushBack();\r\n}\r\n\r\nvoid UndoActions::Clear() noexcept {\r\n\ttypes.clear();\r\n\tpositions.Clear();\r\n\tlengths.Clear();\r\n}\r\n\r\nintptr_t UndoActions::SSize() const noexcept {\r\n\treturn types.size();\r\n}\r\n\r\nvoid UndoActions::Create(size_t index, ActionType at_, Sci::Position position_, Sci::Position lenData_, bool mayCoalesce_) {\r\n\ttypes[index].at = at_;\r\n\ttypes[index].mayCoalesce = mayCoalesce_;\r\n\tpositions.SetValueAt(index, position_);\r\n\tlengths.SetValueAt(index, lenData_);\r\n}\r\n\r\nbool UndoActions::AtStart(size_t index) const noexcept {\r\n\tif (index == 0) {\r\n\t\treturn true;\r\n\t}\r\n\treturn !types[index-1].mayCoalesce;\r\n}\r\n\r\nsize_t UndoActions::LengthTo(size_t index) const noexcept {\r\n\tsize_t sum = 0;\r\n\tfor (size_t act = 0; act < index; act++) {\r\n\t\tsum += lengths.ValueAt(act);\r\n\t}\r\n\treturn sum;\r\n}\r\n\r\nSci::Position UndoActions::Position(int action) const noexcept {\r\n\treturn positions.SignedValueAt(action);\r\n}\r\nSci::Position UndoActions::Length(int action) const noexcept {\r\n\treturn lengths.SignedValueAt(action);\r\n}\r\n\r\nvoid ScrapStack::Clear() noexcept {\r\n\tstack.clear();\r\n\tcurrent = 0;\r\n}\r\n\r\nconst char *ScrapStack::Push(const char *text, size_t length) {\r\n\tif (current < stack.length()) {\r\n\t\tstack.resize(current);\r\n\t}\r\n\tstack.append(text, length);\r\n\tcurrent = stack.length();\r\n\treturn stack.data() + current - length;\r\n}\r\n\r\nvoid ScrapStack::SetCurrent(size_t position) noexcept {\r\n\tcurrent = position;\r\n}\r\n\r\nvoid ScrapStack::MoveForward(size_t length) noexcept {\r\n\tif ((current + length) <= stack.length()) {\r\n\t\tcurrent += length;\r\n\t}\r\n}\r\n\r\nvoid ScrapStack::MoveBack(size_t length) noexcept {\r\n\tif (current >= length) {\r\n\t\tcurrent -= length;\r\n\t}\r\n}\r\n\r\nconst char *ScrapStack::CurrentText() const noexcept {\r\n\treturn stack.data() + current;\r\n}\r\n\r\nconst char *ScrapStack::TextAt(size_t position) const noexcept {\r\n\treturn stack.data() + position;\r\n}\r\n\r\n// The undo history stores a sequence of user operations that represent the user's view of the\r\n// commands executed on the text.\r\n// Each user operation contains a sequence of text insertion and text deletion actions.\r\n// All the user operations are stored in a list of individual actions.\r\n// A false 'mayCoalesce' flag acts as an end to a user operation.\r\n// Initially there are no actions in the history.\r\n// As each action is performed, it is recorded in the history. The action may either become\r\n// part of the current user operation or may start a new user operation. If it is to be part of the\r\n// current operation, then 'mayCoalesce' is true. If it is to be part of a new operation, the\r\n// 'mayCoalesce' flag of the previous action is set false.\r\n// The decision of whether to start a new user operation is based upon two factors. If a\r\n// compound operation has been explicitly started by calling BeginUndoAction and no matching\r\n// EndUndoAction (these calls nest) has been called, then the action is coalesced into the current\r\n// operation. If there is no outstanding BeginUndoAction call then a new operation is started\r\n// unless it looks as if the new action is caused by the user typing or deleting a stream of text.\r\n// Sequences that look like typing or deletion are coalesced into a single user operation.\r\n\r\nint UndoHistory::PreviousAction() const noexcept {\r\n\treturn currentAction - 1;\r\n}\r\n\r\nUndoHistory::UndoHistory() {\r\n\tscraps = std::make_unique<ScrapStack>();\r\n}\r\n\r\nUndoHistory::~UndoHistory() noexcept = default;\r\n\r\nconst char *UndoHistory::AppendAction(ActionType at, Sci::Position position, const char *data, Sci::Position lengthData,\r\n\tbool &startSequence, bool mayCoalesce) {\r\n\t//Platform::DebugPrintf(\"%% %d action %d %d %d\\n\", at, position, lengthData, currentAction);\r\n\t//Platform::DebugPrintf(\"^ %d action %d %d\\n\", actions[currentAction - 1].at,\r\n\t//\tactions[currentAction - 1].position, actions[currentAction - 1].lenData);\r\n\tif (currentAction < savePoint) {\r\n\t\tsavePoint = -1;\r\n\t\tif (!detach) {\r\n\t\t\tdetach = currentAction;\r\n\t\t}\r\n\t} else if (detach && (*detach > currentAction)) {\r\n\t\tdetach = currentAction;\r\n\t}\r\n\tif (undoSequenceDepth > 0) {\r\n\t\t// Actions not at top level are always coalesced unless this is after return to top level\r\n\t\tmayCoalesce = true;\r\n\t}\r\n\tbool coalesce = true;\r\n\tif (currentAction >= 1) {\r\n\t\tint targetAct = currentAction - 1;\r\n\t\tif (0 == undoSequenceDepth) {\r\n\t\t\t// Top level actions may not always be coalesced\r\n\t\t\t// Container actions may forward the coalesce state of Scintilla Actions.\r\n\t\t\twhile ((targetAct > 0) && (actions.types[targetAct].at == ActionType::container) && actions.types[targetAct].mayCoalesce) {\r\n\t\t\t\ttargetAct--;\r\n\t\t\t}\r\n\t\t\t// See if current action can be coalesced into previous action\r\n\t\t\t// Will work if both are inserts or deletes and position is same\r\n\t\t\tif ((currentAction == savePoint) || (currentAction == tentativePoint)) {\r\n\t\t\t\tcoalesce = false;\r\n\t\t\t} else if (!mayCoalesce || !actions.types[targetAct].mayCoalesce) {\r\n\t\t\t\tcoalesce = false;\r\n\t\t\t} else if (at == ActionType::container || actions.types[targetAct].at == ActionType::container) {\r\n\t\t\t\t;\t// A coalescible containerAction\r\n\t\t\t} else if ((at != actions.types[targetAct].at)) { // } && (!actions.AtStart(targetAct))) {\r\n\t\t\t\tcoalesce = false;\r\n\t\t\t} else if ((at == ActionType::insert) &&\r\n\t\t\t           (position != (actions.Position(targetAct) + actions.Length(targetAct)))) {\r\n\t\t\t\t// Insertions must be immediately after to coalesce\r\n\t\t\t\tcoalesce = false;\r\n\t\t\t} else if (at == ActionType::remove) {\r\n\t\t\t\tif ((lengthData == 1) || (lengthData == 2)) {\r\n\t\t\t\t\tif ((position + lengthData) == actions.Position(targetAct)) {\r\n\t\t\t\t\t\t; // Backspace -> OK\r\n\t\t\t\t\t} else if (position == actions.Position(targetAct)) {\r\n\t\t\t\t\t\t; // Delete -> OK\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// Removals must be at same position to coalesce\r\n\t\t\t\t\t\tcoalesce = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Removals must be of one character to coalesce\r\n\t\t\t\t\tcoalesce = false;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// Action coalesced.\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\t// Actions not at top level are always coalesced unless this is after return to top level\r\n\t\t\tif (!actions.types[targetAct].mayCoalesce)\r\n\t\t\t\tcoalesce = false;\r\n\t\t}\r\n\t} else {\r\n\t\tcoalesce = false;\r\n\t}\r\n\tstartSequence = !coalesce;\r\n\t// Maybe close previous action\r\n\tif ((currentAction > 0) && startSequence) {\r\n\t\tactions.types[PreviousAction()].mayCoalesce = false;\r\n\t}\r\n\tconst char *dataNew = lengthData ? scraps->Push(data, lengthData) : nullptr;\r\n\tif (currentAction >= actions.SSize()) {\r\n\t\tactions.PushBack();\r\n\t} else {\r\n\t\tactions.Truncate(currentAction+1);\r\n\t}\r\n\tactions.Create(currentAction, at, position, lengthData, mayCoalesce);\r\n\tcurrentAction++;\r\n\treturn dataNew;\r\n}\r\n\r\nvoid UndoHistory::BeginUndoAction(bool mayCoalesce) noexcept {\r\n\tif (undoSequenceDepth == 0) {\r\n\t\tif (currentAction > 0) {\r\n\t\t\tactions.types[PreviousAction()].mayCoalesce = mayCoalesce;\r\n\t\t}\r\n\t}\r\n\tundoSequenceDepth++;\r\n}\r\n\r\nvoid UndoHistory::EndUndoAction() noexcept {\r\n\tPLATFORM_ASSERT(undoSequenceDepth > 0);\r\n\tundoSequenceDepth--;\r\n\tif (0 == undoSequenceDepth) {\r\n\t\tif (currentAction > 0) {\r\n\t\t\tactions.types[PreviousAction()].mayCoalesce = false;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid UndoHistory::DropUndoSequence() noexcept {\r\n\tundoSequenceDepth = 0;\r\n}\r\n\r\nvoid UndoHistory::DeleteUndoHistory() noexcept {\r\n\tactions.Clear();\r\n\tcurrentAction = 0;\r\n\tsavePoint = 0;\r\n\ttentativePoint = -1;\r\n\tscraps->Clear();\r\n\tmemory = {};\r\n}\r\n\r\nint UndoHistory::Actions() const noexcept {\r\n\treturn static_cast<int>(actions.SSize());\r\n}\r\n\r\nvoid UndoHistory::SetSavePoint(int action) noexcept {\r\n\tsavePoint = action;\r\n}\r\n\r\nint UndoHistory::SavePoint() const noexcept {\r\n\treturn savePoint;\r\n}\r\n\r\nvoid UndoHistory::SetSavePoint() noexcept {\r\n\tsavePoint = currentAction;\r\n\tdetach.reset();\r\n}\r\n\r\nbool UndoHistory::IsSavePoint() const noexcept {\r\n\treturn savePoint == currentAction;\r\n}\r\n\r\nbool UndoHistory::BeforeSavePoint() const noexcept {\r\n\treturn (savePoint < 0) || (savePoint > currentAction);\r\n}\r\n\r\nbool UndoHistory::PreviousBeforeSavePoint() const noexcept {\r\n\treturn (savePoint < 0) || (savePoint >= currentAction);\r\n}\r\n\r\nbool UndoHistory::BeforeReachableSavePoint() const noexcept {\r\n\treturn (savePoint > 0) && (savePoint > currentAction);\r\n}\r\n\r\nbool UndoHistory::AfterSavePoint() const noexcept {\r\n\treturn (savePoint >= 0) && (savePoint <= currentAction);\r\n}\r\n\r\nvoid UndoHistory::SetDetachPoint(int action) noexcept {\r\n\tif (action == -1) {\r\n\t\tdetach = {};\r\n\t} else {\r\n\t\tdetach = action;\r\n\t}\r\n}\r\n\r\nint UndoHistory::DetachPoint() const noexcept {\r\n\treturn detach.value_or(-1);\r\n}\r\n\r\nbool UndoHistory::AfterDetachPoint() const noexcept {\r\n\treturn detach && (*detach < currentAction);\r\n}\r\n\r\nbool UndoHistory::AfterOrAtDetachPoint() const noexcept {\r\n\treturn detach && (*detach <= currentAction);\r\n}\r\n\r\nintptr_t UndoHistory::Delta(int action) const noexcept {\r\n\tintptr_t sizeChange = 0;\r\n\tfor (int act = 0; act < action; act++) {\r\n\t\tconst intptr_t lengthChange = actions.Length(act);\r\n\t\tsizeChange += (actions.types[act].at == ActionType::insert) ? lengthChange : -lengthChange;\r\n\t}\r\n\treturn sizeChange;\r\n}\r\n\r\nbool UndoHistory::Validate(intptr_t lengthDocument) const noexcept {\r\n\t// Check history for validity\r\n\tconst intptr_t sizeChange = Delta(currentAction);\r\n\tif (sizeChange > lengthDocument) {\r\n\t\t// Current document size too small for changes made in undo history.\r\n\t\treturn false;\r\n\t}\r\n\tconst intptr_t lengthOriginal = lengthDocument - sizeChange;\r\n\tintptr_t lengthCurrent = lengthOriginal;\r\n\tfor (int act = 0; act < actions.SSize(); act++) {\r\n\t\tconst intptr_t lengthChange = actions.Length(act);\r\n\t\tif (actions.Position(act) > lengthCurrent) {\r\n\t\t\t// Change outside document.\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tlengthCurrent += (actions.types[act].at == ActionType::insert) ? lengthChange : -lengthChange;\r\n\t\tif (lengthCurrent < 0) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n}\r\n\r\nvoid UndoHistory::SetCurrent(int action, intptr_t lengthDocument) {\r\n\t// Find position in scraps for action\r\n\tmemory = {};\r\n\tconst size_t lengthSum = actions.LengthTo(action);\r\n\tscraps->SetCurrent(lengthSum);\r\n\tcurrentAction = action;\r\n\tif (!Validate(lengthDocument)) {\r\n\t\tcurrentAction = 0;\r\n\t\tDeleteUndoHistory();\r\n\t\tthrow std::runtime_error(\"UndoHistory::SetCurrent: invalid undo history.\");\r\n\t}\r\n}\r\n\r\nint UndoHistory::Current() const noexcept {\r\n\treturn currentAction;\r\n}\r\n\r\nint UndoHistory::Type(int action) const noexcept {\r\n\tconst int baseType = static_cast<int>(actions.types[action].at);\r\n\tconst int open = actions.types[action].mayCoalesce ? coalesceFlag : 0;\r\n\treturn baseType | open;\r\n}\r\n\r\nSci::Position UndoHistory::Position(int action) const noexcept {\r\n\treturn actions.Position(action);\r\n}\r\n\r\nSci::Position UndoHistory::Length(int action) const noexcept {\r\n\treturn actions.Length(action);\r\n}\r\n\r\nstd::string_view UndoHistory::Text(int action) noexcept {\r\n\t// Assumes first call after any changes is for action 0.\r\n\t// TODO: may need to invalidate memory in other circumstances\r\n\tif (action == 0) {\r\n\t\tmemory = {};\r\n\t}\r\n\tint act = 0;\r\n\tsize_t position = 0;\r\n\tif (memory && memory->act <= action) {\r\n\t\tact = memory->act;\r\n\t\tposition = memory->position;\r\n\t}\r\n\tfor (; act < action; act++) {\r\n\t\tposition += actions.Length(act);\r\n\t}\r\n\tconst size_t length = actions.Length(action);\r\n\tconst char *scrap = scraps->TextAt(position);\r\n\tmemory = {action, position};\r\n\treturn {scrap, length};\r\n}\r\n\r\nvoid UndoHistory::PushUndoActionType(int type, Sci::Position position) {\r\n\tactions.PushBack();\r\n\tactions.Create(actions.SSize()-1, static_cast<ActionType>(type & byteMask),\r\n\t\tposition, 0, type & coalesceFlag);\r\n}\r\n\r\nvoid UndoHistory::ChangeLastUndoActionText(size_t length, const char *text) {\r\n\tassert(actions.lengths.ValueAt(actions.SSize()-1) == 0);\r\n\tactions.lengths.SetValueAt(actions.SSize()-1, length);\r\n\tscraps->Push(text, length);\r\n}\r\n\r\nvoid UndoHistory::SetTentative(int action) noexcept {\r\n\ttentativePoint = action;\r\n}\r\n\r\nint UndoHistory::TentativePoint() const noexcept {\r\n\treturn tentativePoint;\r\n}\r\n\r\nvoid UndoHistory::TentativeStart() noexcept {\r\n\ttentativePoint = currentAction;\r\n}\r\n\r\nvoid UndoHistory::TentativeCommit() noexcept {\r\n\ttentativePoint = -1;\r\n\t// Truncate undo history\r\n\tactions.Truncate(currentAction);\r\n}\r\n\r\nbool UndoHistory::TentativeActive() const noexcept {\r\n\treturn tentativePoint >= 0;\r\n}\r\n\r\nint UndoHistory::TentativeSteps() const noexcept {\r\n\t// Drop any trailing startAction\r\n\tif (tentativePoint >= 0)\r\n\t\treturn currentAction - tentativePoint;\r\n\treturn -1;\r\n}\r\n\r\nbool UndoHistory::CanUndo() const noexcept {\r\n\treturn (currentAction > 0) && (actions.SSize() != 0);\r\n}\r\n\r\nint UndoHistory::StartUndo() const noexcept {\r\n\tassert(currentAction >= 0);\r\n\r\n\t// Count the steps in this action\r\n\tif (currentAction == 0) {\r\n\t\treturn 0;\r\n\t}\r\n\r\n\tint act = currentAction - 1;\r\n\r\n\twhile (act > 0 && !actions.AtStart(act)) {\r\n\t\tact--;\r\n\t}\r\n\treturn currentAction - act;\r\n}\r\n\r\nAction UndoHistory::GetUndoStep() const noexcept {\r\n\tconst int previousAction = PreviousAction();\r\n\tAction acta {\r\n\t\tactions.types[previousAction].at,\r\n\t\tactions.types[previousAction].mayCoalesce,\r\n\t\tactions.Position(previousAction),\r\n\t\tnullptr,\r\n\t\tactions.Length(previousAction)\r\n\t};\r\n\tif (acta.lenData) {\r\n\t\tacta.data = scraps->CurrentText() - acta.lenData;\r\n\t}\r\n\treturn acta;\r\n}\r\n\r\nvoid UndoHistory::CompletedUndoStep() noexcept {\r\n\tscraps->MoveBack(actions.Length(PreviousAction()));\r\n\tcurrentAction--;\r\n}\r\n\r\nbool UndoHistory::CanRedo() const noexcept {\r\n\treturn actions.SSize() > currentAction;\r\n}\r\n\r\nint UndoHistory::StartRedo() const noexcept {\r\n\t// Count the steps in this action\r\n\r\n\tif (currentAction >= actions.SSize()) {\r\n\t\t// Already at end so can't redo\r\n\t\treturn 0;\r\n\t}\r\n\r\n\t// Slightly unusual logic handles case where last action still has mayCoalesce.\r\n\t// Could set mayCoalesce of last action to false in StartUndo but this state is\r\n\t// visible to applications so should not be changed.\r\n\tconst int maxAction = Actions() - 1;\r\n\tint act = currentAction;\r\n\twhile (act <= maxAction && actions.types[act].mayCoalesce) {\r\n\t\tact++;\r\n\t}\r\n\tact = std::min(act, maxAction);\r\n\treturn act - currentAction + 1;\r\n}\r\n\r\nAction UndoHistory::GetRedoStep() const noexcept {\r\n\tAction acta{\r\n\t\tactions.types[currentAction].at,\r\n\t\tactions.types[currentAction].mayCoalesce,\r\n\t\tactions.Position(currentAction),\r\n\t\tnullptr,\r\n\t\tactions.Length(currentAction)\r\n\t};\r\n\tif (acta.lenData) {\r\n\t\tacta.data = scraps->CurrentText();\r\n\t}\r\n\treturn acta;\r\n}\r\n\r\nvoid UndoHistory::CompletedRedoStep() noexcept {\r\n\tscraps->MoveForward(actions.Length(currentAction));\r\n\tcurrentAction++;\r\n}\r\n\r\n}\r\n"
  },
  {
    "path": "scintilla/src/UndoHistory.h",
    "content": "// Scintilla source code edit control\r\n/** @file UndoHistory.h\r\n ** Manages undo for the document.\r\n **/\r\n// Copyright 1998-2024 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef UNDOHISTORY_H\r\n#define UNDOHISTORY_H\r\n\r\nnamespace Scintilla::Internal {\r\n\r\n// ScaledVector is a vector of unsigned integers that uses elements sized to hold the largest value.\r\n// Thus, if an undo history only contains short insertions and deletions the lengths vector may\r\n// only use 2 bytes or even 1 byte for each length.\r\n// This saves much memory often reducing by 50% for 32-bit builds and 75% for 64-bit builds.\r\n\r\nstruct SizeMax {\r\n\tsize_t size = 1;\r\n\tsize_t maxValue = UINT8_MAX;\r\n};\r\n\r\nclass ScaledVector {\r\n\tSizeMax element;\r\n\tstd::vector<uint8_t> bytes;\r\npublic:\r\n\t[[nodiscard]] size_t Size() const noexcept;\r\n\t[[nodiscard]] size_t ValueAt(size_t index) const noexcept;\r\n\t[[nodiscard]] intptr_t SignedValueAt(size_t index) const noexcept;\r\n\tvoid SetValueAt(size_t index, size_t value);\r\n\tvoid ClearValueAt(size_t index) noexcept;\r\n\tvoid Clear() noexcept;\r\n\tvoid Truncate(size_t length) noexcept;\r\n\tvoid ReSize(size_t length);\r\n\tvoid PushBack();\r\n\r\n\t// For testing\r\n\t[[nodiscard]] size_t SizeInBytes() const noexcept;\r\n};\r\n\r\nclass UndoActionType {\r\npublic:\r\n\tActionType at : 4;\r\n\tbool mayCoalesce : 1;\r\n\tUndoActionType() noexcept;\r\n};\r\n\r\nstruct UndoActions {\r\n\tstd::vector<UndoActionType> types;\r\n\tScaledVector positions;\r\n\tScaledVector lengths;\r\n\r\n\tUndoActions() noexcept;\r\n\tvoid Truncate(size_t length) noexcept;\r\n\tvoid PushBack();\r\n\tvoid Clear() noexcept;\r\n\t[[nodiscard]] intptr_t SSize() const noexcept;\r\n\tvoid Create(size_t index, ActionType at_, Sci::Position position_, Sci::Position lenData_, bool mayCoalesce_);\r\n\t[[nodiscard]] bool AtStart(size_t index) const noexcept;\r\n\t[[nodiscard]] size_t LengthTo(size_t index) const noexcept;\r\n\t[[nodiscard]] Sci::Position Position(int action) const noexcept;\r\n\t[[nodiscard]] Sci::Position Length(int action) const noexcept;\r\n};\r\n\r\nclass ScrapStack {\r\n\tstd::string stack;\r\n\tsize_t current = 0;\r\npublic:\r\n\tvoid Clear() noexcept;\r\n\tconst char *Push(const char *text, size_t length);\r\n\tvoid SetCurrent(size_t position) noexcept;\r\n\tvoid MoveForward(size_t length) noexcept;\r\n\tvoid MoveBack(size_t length) noexcept;\r\n\t[[nodiscard]] const char *CurrentText() const noexcept;\r\n\t[[nodiscard]] const char *TextAt(size_t position) const noexcept;\r\n};\r\n\r\nconstexpr int coalesceFlag = 0x100;\r\n\r\n/**\r\n *\r\n */\r\nclass UndoHistory {\r\n\tUndoActions actions;\r\n\tint currentAction = 0;\r\n\tint undoSequenceDepth = 0;\r\n\tint savePoint = 0;\r\n\tint tentativePoint = -1;\r\n\tstd::optional<int> detach;\t// Never set if savePoint set (>= 0)\r\n\tstd::unique_ptr<ScrapStack> scraps;\r\n\tstruct actPos { int act; size_t position; };\r\n\tstd::optional<actPos> memory;\r\n\r\n\tint PreviousAction() const noexcept;\r\n\r\npublic:\r\n\tUndoHistory();\r\n\t~UndoHistory() noexcept;\r\n\r\n\tconst char *AppendAction(ActionType at, Sci::Position position, const char *data, Sci::Position lengthData, bool &startSequence, bool mayCoalesce=true);\r\n\r\n\tvoid BeginUndoAction(bool mayCoalesce=false) noexcept;\r\n\tvoid EndUndoAction() noexcept;\r\n\tvoid DropUndoSequence() noexcept;\r\n\tvoid DeleteUndoHistory() noexcept;\r\n\r\n\t[[nodiscard]] int Actions() const noexcept;\r\n\r\n\t/// The save point is a marker in the undo stack where the container has stated that\r\n\t/// the buffer was saved. Undo and redo can move over the save point.\r\n\tvoid SetSavePoint(int action) noexcept;\r\n\t[[nodiscard]] int SavePoint() const noexcept;\r\n\tvoid SetSavePoint() noexcept;\r\n\tbool IsSavePoint() const noexcept;\r\n\tbool BeforeSavePoint() const noexcept;\r\n\tbool PreviousBeforeSavePoint() const noexcept;\r\n\tbool BeforeReachableSavePoint() const noexcept;\r\n\tbool AfterSavePoint() const noexcept;\r\n\r\n\t/// The detach point is the last action that was before an inaccessible missing save point.\r\n\tvoid SetDetachPoint(int action) noexcept;\r\n\t[[nodiscard]] int DetachPoint() const noexcept;\r\n\tbool AfterDetachPoint() const noexcept;\r\n\tbool AfterOrAtDetachPoint() const noexcept;\r\n\r\n\t[[nodiscard]] intptr_t Delta(int action) const noexcept;\r\n\t[[nodiscard]] bool Validate(intptr_t lengthDocument) const noexcept;\r\n\tvoid SetCurrent(int action, intptr_t lengthDocument);\r\n\t[[nodiscard]] int Current() const noexcept;\r\n\t[[nodiscard]] int Type(int action) const noexcept;\r\n\t[[nodiscard]] Sci::Position Position(int action) const noexcept;\r\n\t[[nodiscard]] Sci::Position Length(int action) const noexcept;\r\n\t[[nodiscard]] std::string_view Text(int action) noexcept;\r\n\tvoid PushUndoActionType(int type, Sci::Position position);\r\n\tvoid ChangeLastUndoActionText(size_t length, const char *text);\r\n\r\n\t// Tentative actions are used for input composition so that it can be undone cleanly\r\n\tvoid SetTentative(int action) noexcept;\r\n\t[[nodiscard]] int TentativePoint() const noexcept;\r\n\tvoid TentativeStart() noexcept;\r\n\tvoid TentativeCommit() noexcept;\r\n\tbool TentativeActive() const noexcept;\r\n\tint TentativeSteps() const noexcept;\r\n\r\n\t/// To perform an undo, StartUndo is called to retrieve the number of steps, then UndoStep is\r\n\t/// called that many times. Similarly for redo.\r\n\tbool CanUndo() const noexcept;\r\n\tint StartUndo() const noexcept;\r\n\tAction GetUndoStep() const noexcept;\r\n\tvoid CompletedUndoStep() noexcept;\r\n\tbool CanRedo() const noexcept;\r\n\tint StartRedo() const noexcept;\r\n\tAction GetRedoStep() const noexcept;\r\n\tvoid CompletedRedoStep() noexcept;\r\n};\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/src/UniConversion.cxx",
    "content": "// Scintilla source code edit control\r\n/** @file UniConversion.cxx\r\n ** Functions to handle UTF-8 and UTF-16 strings.\r\n **/\r\n// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#include <cstdlib>\r\n#include <cstdint>\r\n\r\n#include <stdexcept>\r\n#include <string>\r\n#include <string_view>\r\n\r\n#include \"UniConversion.h\"\r\n\r\nnamespace Scintilla::Internal {\r\n\r\nsize_t UTF8Length(std::wstring_view wsv) noexcept {\r\n\tsize_t len = 0;\r\n\tfor (size_t i = 0; i < wsv.length() && wsv[i];) {\r\n\t\tconst unsigned int uch = wsv[i];\r\n\t\tif (uch < 0x80) {\r\n\t\t\tlen++;\r\n\t\t} else if (uch < 0x800) {\r\n\t\t\tlen += 2;\r\n\t\t} else if ((uch >= SURROGATE_LEAD_FIRST) &&\r\n\t\t\t(uch <= SURROGATE_TRAIL_LAST)) {\r\n\t\t\tlen += 4;\r\n\t\t\ti++;\r\n\t\t} else {\r\n\t\t\tlen += 3;\r\n\t\t}\r\n\t\ti++;\r\n\t}\r\n\treturn len;\r\n}\r\n\r\nsize_t UTF8PositionFromUTF16Position(std::string_view u8Text, size_t positionUTF16) noexcept {\r\n\tsize_t positionUTF8 = 0;\r\n\tfor (size_t lengthUTF16 = 0; (positionUTF8 < u8Text.length()) && (lengthUTF16 < positionUTF16);) {\r\n\t\tconst unsigned char uch = u8Text[positionUTF8];\r\n\t\tconst unsigned int byteCount = UTF8BytesOfLead[uch];\r\n\t\tlengthUTF16 += UTF16LengthFromUTF8ByteCount(byteCount);\r\n\t\tpositionUTF8 += byteCount;\r\n\t}\r\n\r\n\treturn positionUTF8;\r\n}\r\n\r\nvoid UTF8FromUTF16(std::wstring_view wsv, char *putf, size_t len) noexcept {\r\n\tsize_t k = 0;\r\n\tfor (size_t i = 0; i < wsv.length() && wsv[i];) {\r\n\t\tconst unsigned int uch = wsv[i];\r\n\t\tif (uch < 0x80) {\r\n\t\t\tputf[k++] = static_cast<char>(uch);\r\n\t\t} else if (uch < 0x800) {\r\n\t\t\tputf[k++] = static_cast<char>(0xC0 | (uch >> 6));\r\n\t\t\tputf[k++] = static_cast<char>(0x80 | (uch & 0x3f));\r\n\t\t} else if ((uch >= SURROGATE_LEAD_FIRST) &&\r\n\t\t\t(uch <= SURROGATE_TRAIL_LAST)) {\r\n\t\t\t// Half a surrogate pair\r\n\t\t\ti++;\r\n\t\t\tconst unsigned int xch = 0x10000 + ((uch & 0x3ff) << 10) + (wsv[i] & 0x3ff);\r\n\t\t\tputf[k++] = static_cast<char>(0xF0 | (xch >> 18));\r\n\t\t\tputf[k++] = static_cast<char>(0x80 | ((xch >> 12) & 0x3f));\r\n\t\t\tputf[k++] = static_cast<char>(0x80 | ((xch >> 6) & 0x3f));\r\n\t\t\tputf[k++] = static_cast<char>(0x80 | (xch & 0x3f));\r\n\t\t} else {\r\n\t\t\tputf[k++] = static_cast<char>(0xE0 | (uch >> 12));\r\n\t\t\tputf[k++] = static_cast<char>(0x80 | ((uch >> 6) & 0x3f));\r\n\t\t\tputf[k++] = static_cast<char>(0x80 | (uch & 0x3f));\r\n\t\t}\r\n\t\ti++;\r\n\t}\r\n\tif (k < len)\r\n\t\tputf[k] = '\\0';\r\n}\r\n\r\nvoid UTF8FromUTF32Character(int uch, char *putf) noexcept {\r\n\tsize_t k = 0;\r\n\tif (uch < 0x80) {\r\n\t\tputf[k++] = static_cast<char>(uch);\r\n\t} else if (uch < 0x800) {\r\n\t\tputf[k++] = static_cast<char>(0xC0 | (uch >> 6));\r\n\t\tputf[k++] = static_cast<char>(0x80 | (uch & 0x3f));\r\n\t} else if (uch < 0x10000) {\r\n\t\tputf[k++] = static_cast<char>(0xE0 | (uch >> 12));\r\n\t\tputf[k++] = static_cast<char>(0x80 | ((uch >> 6) & 0x3f));\r\n\t\tputf[k++] = static_cast<char>(0x80 | (uch & 0x3f));\r\n\t} else {\r\n\t\tputf[k++] = static_cast<char>(0xF0 | (uch >> 18));\r\n\t\tputf[k++] = static_cast<char>(0x80 | ((uch >> 12) & 0x3f));\r\n\t\tputf[k++] = static_cast<char>(0x80 | ((uch >> 6) & 0x3f));\r\n\t\tputf[k++] = static_cast<char>(0x80 | (uch & 0x3f));\r\n\t}\r\n\tputf[k] = '\\0';\r\n}\r\n\r\nsize_t UTF16Length(std::string_view svu8) noexcept {\r\n\tsize_t ulen = 0;\r\n\tfor (size_t i = 0; i< svu8.length();) {\r\n\t\tconst unsigned char ch = svu8[i];\r\n\t\tconst unsigned int byteCount = UTF8BytesOfLead[ch];\r\n\t\tconst unsigned int utf16Len = UTF16LengthFromUTF8ByteCount(byteCount);\r\n\t\ti += byteCount;\r\n\t\tulen += (i > svu8.length()) ? 1 : utf16Len;\r\n\t}\r\n\treturn ulen;\r\n}\r\n\r\nconstexpr unsigned char TrailByteValue(unsigned char c) {\r\n\t// The top 2 bits are 0b10 to indicate a trail byte.\r\n\t// The lower 6 bits contain the value.\r\n\treturn c & 0b0011'1111;\r\n}\r\n\r\nsize_t UTF16FromUTF8(std::string_view svu8, wchar_t *tbuf, size_t tlen) {\r\n\tsize_t ui = 0;\r\n\tfor (size_t i = 0; i < svu8.length();) {\r\n\t\tunsigned char ch = svu8[i];\r\n\t\tconst unsigned int byteCount = UTF8BytesOfLead[ch];\r\n\t\tunsigned int value;\r\n\r\n\t\tif (i + byteCount > svu8.length()) {\r\n\t\t\t// Trying to read past end but still have space to write\r\n\t\t\tif (ui < tlen) {\r\n\t\t\t\ttbuf[ui] = ch;\r\n\t\t\t\tui++;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tconst size_t outLen = UTF16LengthFromUTF8ByteCount(byteCount);\r\n\t\tif (ui + outLen > tlen) {\r\n\t\t\tthrow std::runtime_error(\"UTF16FromUTF8: attempted write beyond end\");\r\n\t\t}\r\n\r\n\t\ti++;\r\n\t\tswitch (byteCount) {\r\n\t\tcase 1:\r\n\t\t\ttbuf[ui] = ch;\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tvalue = (ch & 0x1F) << 6;\r\n\t\t\tch = svu8[i++];\r\n\t\t\tvalue += TrailByteValue(ch);\r\n\t\t\ttbuf[ui] = static_cast<wchar_t>(value);\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tvalue = (ch & 0xF) << 12;\r\n\t\t\tch = svu8[i++];\r\n\t\t\tvalue += (TrailByteValue(ch) << 6);\r\n\t\t\tch = svu8[i++];\r\n\t\t\tvalue += TrailByteValue(ch);\r\n\t\t\ttbuf[ui] = static_cast<wchar_t>(value);\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\t// Outside the BMP so need two surrogates\r\n\t\t\tvalue = (ch & 0x7) << 18;\r\n\t\t\tch = svu8[i++];\r\n\t\t\tvalue += TrailByteValue(ch) << 12;\r\n\t\t\tch = svu8[i++];\r\n\t\t\tvalue += TrailByteValue(ch) << 6;\r\n\t\t\tch = svu8[i++];\r\n\t\t\tvalue += TrailByteValue(ch);\r\n\t\t\ttbuf[ui] = static_cast<wchar_t>(((value - 0x10000) >> 10) + SURROGATE_LEAD_FIRST);\r\n\t\t\tui++;\r\n\t\t\ttbuf[ui] = static_cast<wchar_t>((value & 0x3ff) + SURROGATE_TRAIL_FIRST);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tui++;\r\n\t}\r\n\treturn ui;\r\n}\r\n\r\nsize_t UTF32Length(std::string_view svu8) noexcept {\r\n\tsize_t ulen = 0;\r\n\tfor (size_t i = 0; i < svu8.length();) {\r\n\t\tconst unsigned char ch = svu8[i];\r\n\t\tconst unsigned int byteCount = UTF8BytesOfLead[ch];\r\n\t\ti += byteCount;\r\n\t\tulen++;\r\n\t}\r\n\treturn ulen;\r\n}\r\n\r\nsize_t UTF32FromUTF8(std::string_view svu8, unsigned int *tbuf, size_t tlen) {\r\n\tsize_t ui = 0;\r\n\tfor (size_t i = 0; i < svu8.length();) {\r\n\t\tunsigned char ch = svu8[i];\r\n\t\tconst unsigned int byteCount = UTF8BytesOfLead[ch];\r\n\t\tunsigned int value;\r\n\r\n\t\tif (i + byteCount > svu8.length()) {\r\n\t\t\t// Trying to read past end but still have space to write\r\n\t\t\tif (ui < tlen) {\r\n\t\t\t\ttbuf[ui] = ch;\r\n\t\t\t\tui++;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tif (ui == tlen) {\r\n\t\t\tthrow std::runtime_error(\"UTF32FromUTF8: attempted write beyond end\");\r\n\t\t}\r\n\r\n\t\ti++;\r\n\t\tswitch (byteCount) {\r\n\t\tcase 1:\r\n\t\t\tvalue = ch;\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tvalue = (ch & 0x1F) << 6;\r\n\t\t\tch = svu8[i++];\r\n\t\t\tvalue += TrailByteValue(ch);\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tvalue = (ch & 0xF) << 12;\r\n\t\t\tch = svu8[i++];\r\n\t\t\tvalue += TrailByteValue(ch) << 6;\r\n\t\t\tch = svu8[i++];\r\n\t\t\tvalue += TrailByteValue(ch);\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tvalue = (ch & 0x7) << 18;\r\n\t\t\tch = svu8[i++];\r\n\t\t\tvalue += TrailByteValue(ch) << 12;\r\n\t\t\tch = svu8[i++];\r\n\t\t\tvalue += TrailByteValue(ch) << 6;\r\n\t\t\tch = svu8[i++];\r\n\t\t\tvalue += TrailByteValue(ch);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\ttbuf[ui] = value;\r\n\t\tui++;\r\n\t}\r\n\treturn ui;\r\n}\r\n\r\nstd::wstring WStringFromUTF8(std::string_view svu8) {\r\n\tif constexpr (sizeof(wchar_t) == 2) {\r\n\t\tconst size_t len16 = UTF16Length(svu8);\r\n\t\tstd::wstring ws(len16, 0);\r\n\t\tUTF16FromUTF8(svu8, ws.data(), len16);\r\n\t\treturn ws;\r\n\t} else {\r\n\t\tconst size_t len32 = UTF32Length(svu8);\r\n\t\tstd::wstring ws(len32, 0);\r\n\t\tUTF32FromUTF8(svu8, reinterpret_cast<unsigned int *>(ws.data()), len32);\r\n\t\treturn ws;\r\n\t}\r\n}\r\n\r\nunsigned int UTF16FromUTF32Character(unsigned int val, wchar_t *tbuf) noexcept {\r\n\tif (val < SUPPLEMENTAL_PLANE_FIRST) {\r\n\t\ttbuf[0] = static_cast<wchar_t>(val);\r\n\t\treturn 1;\r\n\t}\r\n\ttbuf[0] = static_cast<wchar_t>(((val - SUPPLEMENTAL_PLANE_FIRST) >> 10) + SURROGATE_LEAD_FIRST);\r\n\ttbuf[1] = static_cast<wchar_t>((val & 0x3ff) + SURROGATE_TRAIL_FIRST);\r\n\treturn 2;\r\n}\r\n\r\nconst unsigned char UTF8BytesOfLead[256] = {\r\n1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 00 - 0F\r\n1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 10 - 1F\r\n1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 20 - 2F\r\n1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 30 - 3F\r\n1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 40 - 4F\r\n1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 50 - 5F\r\n1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 60 - 6F\r\n1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 70 - 7F\r\n1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 80 - 8F\r\n1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 90 - 9F\r\n1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // A0 - AF\r\n1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // B0 - BF\r\n1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // C0 - CF\r\n2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // D0 - DF\r\n3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // E0 - EF\r\n4, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // F0 - FF\r\n};\r\n\r\n// Return both the width of the first character in the string and a status\r\n// saying whether it is valid or invalid.\r\n// Most invalid sequences return a width of 1 so are treated as isolated bytes but\r\n// the non-characters *FFFE, *FFFF and FDD0 .. FDEF return 3 or 4 as they can be\r\n// reasonably treated as code points in some circumstances. They will, however,\r\n// not have associated glyphs.\r\nint UTF8Classify(const unsigned char *us, size_t len) noexcept {\r\n\t// For the rules: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8\r\n\tif (us[0] < 0x80) {\r\n\t\t// ASCII\r\n\t\treturn 1;\r\n\t}\r\n\r\n\tconst size_t byteCount = UTF8BytesOfLead[us[0]];\r\n\tif (byteCount == 1 || byteCount > len) {\r\n\t\t// Invalid lead byte\r\n\t\treturn UTF8MaskInvalid | 1;\r\n\t}\r\n\r\n\tif (!UTF8IsTrailByte(us[1])) {\r\n\t\t// Invalid trail byte\r\n\t\treturn UTF8MaskInvalid | 1;\r\n\t}\r\n\r\n\tswitch (byteCount) {\r\n\tcase 2:\r\n\t\treturn 2;\r\n\r\n\tcase 3:\r\n\t\tif (UTF8IsTrailByte(us[2])) {\r\n\t\t\tif ((*us == 0xe0) && ((us[1] & 0xe0) == 0x80)) {\r\n\t\t\t\t// Overlong\r\n\t\t\t\treturn UTF8MaskInvalid | 1;\r\n\t\t\t}\r\n\t\t\tif ((*us == 0xed) && ((us[1] & 0xe0) == 0xa0)) {\r\n\t\t\t\t// Surrogate\r\n\t\t\t\treturn UTF8MaskInvalid | 1;\r\n\t\t\t}\r\n\t\t\tif ((*us == 0xef) && (us[1] == 0xbf) && (us[2] == 0xbe)) {\r\n\t\t\t\t// U+FFFE non-character - 3 bytes long\r\n\t\t\t\treturn UTF8MaskInvalid | 3;\r\n\t\t\t}\r\n\t\t\tif ((*us == 0xef) && (us[1] == 0xbf) && (us[2] == 0xbf)) {\r\n\t\t\t\t// U+FFFF non-character - 3 bytes long\r\n\t\t\t\treturn UTF8MaskInvalid | 3;\r\n\t\t\t}\r\n\t\t\tif ((*us == 0xef) && (us[1] == 0xb7) && (((us[2] & 0xf0) == 0x90) || ((us[2] & 0xf0) == 0xa0))) {\r\n\t\t\t\t// U+FDD0 .. U+FDEF\r\n\t\t\t\treturn UTF8MaskInvalid | 3;\r\n\t\t\t}\r\n\t\t\treturn 3;\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tdefault:\r\n\t\tif (UTF8IsTrailByte(us[2]) && UTF8IsTrailByte(us[3])) {\r\n\t\t\tif (((us[1] & 0xf) == 0xf) && (us[2] == 0xbf) && ((us[3] == 0xbe) || (us[3] == 0xbf))) {\r\n\t\t\t\t// *FFFE or *FFFF non-character\r\n\t\t\t\treturn UTF8MaskInvalid | 4;\r\n\t\t\t}\r\n\t\t\tif (*us == 0xf4) {\r\n\t\t\t\t// Check if encoding a value beyond the last Unicode character 10FFFF\r\n\t\t\t\tif (us[1] > 0x8f) {\r\n\t\t\t\t\treturn UTF8MaskInvalid | 1;\r\n\t\t\t\t}\r\n\t\t\t} else if ((*us == 0xf0) && ((us[1] & 0xf0) == 0x80)) {\r\n\t\t\t\t// Overlong\r\n\t\t\t\treturn UTF8MaskInvalid | 1;\r\n\t\t\t}\r\n\t\t\treturn 4;\r\n\t\t}\r\n\t\tbreak;\r\n\t}\r\n\r\n\treturn UTF8MaskInvalid | 1;\r\n}\r\n\r\nint UTF8Classify(const char *s, size_t len) noexcept {\r\n\treturn UTF8Classify(reinterpret_cast<const unsigned char *>(s), len);\r\n}\r\n\r\nint UTF8DrawBytes(const char *s, size_t len) noexcept {\r\n\tconst int utf8StatusNext = UTF8Classify(s, len);\r\n\treturn (utf8StatusNext & UTF8MaskInvalid) ? 1 : (utf8StatusNext & UTF8MaskWidth);\r\n}\r\n\r\nbool UTF8IsValid(std::string_view svu8) noexcept {\r\n\tconst char *s = svu8.data();\r\n\tsize_t remaining = svu8.length();\r\n\twhile (remaining > 0) {\r\n\t\tconst int utf8Status = UTF8Classify(s, remaining);\r\n\t\tif (utf8Status & UTF8MaskInvalid) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tconst int lenChar = utf8Status & UTF8MaskWidth;\r\n\t\ts += lenChar;\r\n\t\tremaining -= lenChar;\r\n\t}\r\n\treturn true;\r\n}\r\n\r\n// Replace invalid bytes in UTF-8 with the replacement character\r\nstd::string FixInvalidUTF8(const std::string &text) {\r\n\tstd::string result;\r\n\tconst char *s = text.c_str();\r\n\tsize_t remaining = text.size();\r\n\twhile (remaining > 0) {\r\n\t\tconst int utf8Status = UTF8Classify(s, remaining);\r\n\t\tif (utf8Status & UTF8MaskInvalid) {\r\n\t\t\t// Replacement character 0xFFFD = UTF8:\"efbfbd\".\r\n\t\t\tresult.append(\"\\xef\\xbf\\xbd\");\r\n\t\t\ts++;\r\n\t\t\tremaining--;\r\n\t\t} else {\r\n\t\t\tconst size_t len = utf8Status & UTF8MaskWidth;\r\n\t\t\tresult.append(s, len);\r\n\t\t\ts += len;\r\n\t\t\tremaining -= len;\r\n\t\t}\r\n\t}\r\n\treturn result;\r\n}\r\n\r\n}\r\n"
  },
  {
    "path": "scintilla/src/UniConversion.h",
    "content": "// Scintilla source code edit control\r\n/** @file UniConversion.h\r\n ** Functions to handle UTF-8 and UTF-16 strings.\r\n **/\r\n// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef UNICONVERSION_H\r\n#define UNICONVERSION_H\r\n\r\nnamespace Scintilla::Internal {\r\n\r\nconstexpr int UTF8MaxBytes = 4;\r\n\r\nconstexpr int unicodeReplacementChar = 0xFFFD;\r\n\r\nsize_t UTF8Length(std::wstring_view wsv) noexcept;\r\nsize_t UTF8PositionFromUTF16Position(std::string_view u8Text, size_t positionUTF16) noexcept;\r\nvoid UTF8FromUTF16(std::wstring_view wsv, char *putf, size_t len) noexcept;\r\nvoid UTF8FromUTF32Character(int uch, char *putf) noexcept;\r\nsize_t UTF16Length(std::string_view svu8) noexcept;\r\nsize_t UTF16FromUTF8(std::string_view svu8, wchar_t *tbuf, size_t tlen);\r\nsize_t UTF32Length(std::string_view svu8) noexcept;\r\nsize_t UTF32FromUTF8(std::string_view svu8, unsigned int *tbuf, size_t tlen);\r\n// WStringFromUTF8 does the right thing when wchar_t is 2 or 4 bytes so\r\n// works on both Windows and Unix.\r\nstd::wstring WStringFromUTF8(std::string_view svu8);\r\nunsigned int UTF16FromUTF32Character(unsigned int val, wchar_t *tbuf) noexcept;\r\nbool UTF8IsValid(std::string_view svu8) noexcept;\r\nstd::string FixInvalidUTF8(const std::string &text);\r\n\r\nextern const unsigned char UTF8BytesOfLead[256];\r\n\r\ninline int UnicodeFromUTF8(const unsigned char *us) noexcept {\r\n\tswitch (UTF8BytesOfLead[us[0]]) {\r\n\tcase 1:\r\n\t\treturn us[0];\r\n\tcase 2:\r\n\t\treturn ((us[0] & 0x1F) << 6) + (us[1] & 0x3F);\r\n\tcase 3:\r\n\t\treturn ((us[0] & 0xF) << 12) + ((us[1] & 0x3F) << 6) + (us[2] & 0x3F);\r\n\tdefault:\r\n\t\treturn ((us[0] & 0x7) << 18) + ((us[1] & 0x3F) << 12) + ((us[2] & 0x3F) << 6) + (us[3] & 0x3F);\r\n\t}\r\n}\r\n\r\nconstexpr bool UTF8IsTrailByte(unsigned char ch) noexcept {\r\n\treturn (ch >= 0x80) && (ch < 0xc0);\r\n}\r\n\r\nconstexpr bool UTF8IsAscii(unsigned char ch) noexcept {\r\n\treturn ch < 0x80;\r\n}\r\n\r\nconstexpr bool UTF8IsAscii(char ch) noexcept {\r\n\tconst unsigned char uch = ch;\r\n\treturn uch < 0x80;\r\n}\r\n\r\nenum { UTF8MaskWidth=0x7, UTF8MaskInvalid=0x8 };\r\nint UTF8Classify(const unsigned char *us, size_t len) noexcept;\r\nint UTF8Classify(const char *s, size_t len) noexcept;\r\ninline int UTF8Classify(std::string_view sv) noexcept {\r\n\treturn UTF8Classify(sv.data(), sv.length());\r\n}\r\n\r\n// Similar to UTF8Classify but returns a length of 1 for invalid bytes\r\n// instead of setting the invalid flag\r\nint UTF8DrawBytes(const char *s, size_t len) noexcept;\r\n\r\n// Line separator is U+2028 \\xe2\\x80\\xa8\r\n// Paragraph separator is U+2029 \\xe2\\x80\\xa9\r\nconstexpr int UTF8SeparatorLength = 3;\r\nconstexpr bool UTF8IsSeparator(const unsigned char *us) noexcept {\r\n\treturn (us[0] == 0xe2) && (us[1] == 0x80) && ((us[2] == 0xa8) || (us[2] == 0xa9));\r\n}\r\n\r\n// NEL is U+0085 \\xc2\\x85\r\nconstexpr int UTF8NELLength = 2;\r\nconstexpr bool UTF8IsNEL(const unsigned char *us) noexcept {\r\n\treturn (us[0] == 0xc2) && (us[1] == 0x85);\r\n}\r\n\r\n// Is the sequence of 3 char a UTF-8 line end? Only the last two char are tested for a NEL.\r\nconstexpr bool UTF8IsMultibyteLineEnd(unsigned char ch0, unsigned char ch1, unsigned char ch2) noexcept {\r\n\treturn\r\n\t\t((ch0 == 0xe2) && (ch1 == 0x80) && ((ch2 == 0xa8) || (ch2 == 0xa9))) ||\r\n\t\t((ch1 == 0xc2) && (ch2 == 0x85));\r\n}\r\n\r\nenum { SURROGATE_LEAD_FIRST = 0xD800 };\r\nenum { SURROGATE_LEAD_LAST = 0xDBFF };\r\nenum { SURROGATE_TRAIL_FIRST = 0xDC00 };\r\nenum { SURROGATE_TRAIL_LAST = 0xDFFF };\r\nenum { SUPPLEMENTAL_PLANE_FIRST = 0x10000 };\r\n\r\nconstexpr unsigned int UTF16CharLength(wchar_t uch) noexcept {\r\n\treturn ((uch >= SURROGATE_LEAD_FIRST) && (uch <= SURROGATE_LEAD_LAST)) ? 2 : 1;\r\n}\r\n\r\nconstexpr unsigned int UTF16LengthFromUTF8ByteCount(unsigned int byteCount) noexcept {\r\n\treturn (byteCount < 4) ? 1 : 2;\r\n}\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/src/UniqueString.cxx",
    "content": "// Scintilla source code edit control\r\n/** @file UniqueString.cxx\r\n ** Define an allocator for UniqueString.\r\n **/\r\n// Copyright 2017 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#include <cstdint>\r\n#include <string_view>\r\n#include <vector>\r\n#include <algorithm>\r\n#include <memory>\r\n\r\n#include \"UniqueString.h\"\r\n\r\nnamespace Scintilla::Internal {\r\n\r\n/// Equivalent to strdup but produces a std::unique_ptr<const char[]> allocation to go\r\n/// into collections.\r\nUniqueString UniqueStringCopy(const char *text) {\r\n\tif (!text) {\r\n\t\treturn UniqueString();\r\n\t}\r\n\tconst std::string_view sv(text);\r\n\tstd::unique_ptr<char[]> upcNew = std::make_unique<char[]>(sv.length() + 1);\r\n\tsv.copy(upcNew.get(), sv.length());\r\n\treturn UniqueString(upcNew.release());\r\n}\r\n\r\n// A set of strings that always returns the same pointer for each string.\r\n\r\nUniqueStringSet::UniqueStringSet() = default;\r\n\r\nvoid UniqueStringSet::Clear() noexcept {\r\n\tstrings.clear();\r\n}\r\n\r\nconst char *UniqueStringSet::Save(const char *text) {\r\n\tif (!text)\r\n\t\treturn nullptr;\r\n\r\n\tconst std::string_view sv(text);\r\n\tfor (const UniqueString &us : strings) {\r\n\t\tif (sv == us.get()) {\r\n\t\t\treturn us.get();\r\n\t\t}\r\n\t}\r\n\r\n\tstrings.push_back(UniqueStringCopy(text));\r\n\treturn strings.back().get();\r\n}\r\n\r\n}\r\n"
  },
  {
    "path": "scintilla/src/UniqueString.h",
    "content": "// Scintilla source code edit control\r\n/** @file UniqueString.h\r\n ** Define UniqueString, a unique_ptr based string type for storage in containers\r\n ** and an allocator for UniqueString.\r\n ** Define UniqueStringSet which holds a set of strings, used to avoid holding many copies\r\n ** of font names.\r\n **/\r\n// Copyright 2017 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef UNIQUESTRING_H\r\n#define UNIQUESTRING_H\r\n\r\nnamespace Scintilla::Internal {\r\n\r\nconstexpr bool IsNullOrEmpty(const char *text) noexcept {\r\n\treturn text == nullptr || *text == '\\0';\r\n}\r\n\r\nusing UniqueString = std::unique_ptr<const char[]>;\r\n\r\n/// Equivalent to strdup but produces a std::unique_ptr<const char[]> allocation to go\r\n/// into collections.\r\nUniqueString UniqueStringCopy(const char *text);\r\n\r\n// A set of strings that always returns the same pointer for each string.\r\n\r\nclass UniqueStringSet {\r\nprivate:\r\n\tstd::vector<UniqueString> strings;\r\npublic:\r\n\tUniqueStringSet();\r\n\tvoid Clear() noexcept;\r\n\tconst char *Save(const char *text);\r\n};\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/src/ViewStyle.cxx",
    "content": "// Scintilla source code edit control\r\n/** @file ViewStyle.cxx\r\n ** Store information on how the document is to be viewed.\r\n **/\r\n// Copyright 1998-2003 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#include <cstddef>\r\n#include <cassert>\r\n#include <cstring>\r\n#include <cmath>\r\n#include <cstdint>\r\n\r\n#include <stdexcept>\r\n#include <string>\r\n#include <string_view>\r\n#include <vector>\r\n#include <array>\r\n#include <map>\r\n#include <set>\r\n#include <optional>\r\n#include <algorithm>\r\n#include <memory>\r\n#include <numeric>\r\n\r\n#include \"ScintillaTypes.h\"\r\n\r\n#include \"Debugging.h\"\r\n#include \"Geometry.h\"\r\n#include \"Platform.h\"\r\n\r\n#include \"Position.h\"\r\n#include \"UniqueString.h\"\r\n#include \"Indicator.h\"\r\n#include \"XPM.h\"\r\n#include \"LineMarker.h\"\r\n#include \"Style.h\"\r\n#include \"ViewStyle.h\"\r\n\r\nusing namespace Scintilla;\r\nusing namespace Scintilla::Internal;\r\n\r\nnamespace {\r\n\r\n// Colour component proportions of maximum 0xffU\r\nconstexpr unsigned int light = 0xc0U;\r\n// The middle point of 0..0xff is between 0x7fU and 0x80U and both are used\r\nconstexpr unsigned int mid = 0x80U;\r\nconstexpr unsigned int half = 0x7fU;\r\nconstexpr unsigned int quarter = 0x3fU;\r\n\r\n}\r\n\r\nMarginStyle::MarginStyle(MarginType style_, int width_, int mask_) noexcept :\r\n\tstyle(style_), width(width_), mask(mask_), sensitive(false), cursor(CursorShape::ReverseArrow) {\r\n}\r\n\r\nbool MarginStyle::ShowsFolding() const noexcept {\r\n\treturn (mask & MaskFolders) != 0;\r\n}\r\n\r\nvoid FontRealised::Realise(Surface &surface, int zoomLevel, Technology technology, const FontSpecification &fs, const char *localeName) {\r\n\tPLATFORM_ASSERT(fs.fontName);\r\n\tmeasurements.sizeZoomed = fs.size + zoomLevel * FontSizeMultiplier;\r\n\tif (measurements.sizeZoomed <= FontSizeMultiplier)\t// May fail if sizeZoomed < 1\r\n\t\tmeasurements.sizeZoomed = FontSizeMultiplier;\r\n\r\n\tconst float deviceHeight = static_cast<float>(surface.DeviceHeightFont(measurements.sizeZoomed));\r\n\tconst FontParameters fp(fs.fontName, deviceHeight / FontSizeMultiplier, fs.weight,\r\n\t\tfs.italic, fs.extraFontFlag, technology, fs.characterSet, localeName);\r\n\tfont = Font::Allocate(fp);\r\n\r\n\t// floor here is historical as platform layers have tweaked their values to match.\r\n\t// ceil would likely be better to ensure (nearly) all of the ink of a character is seen\r\n\t// but that would require platform layer changes.\r\n\tmeasurements.ascent = std::floor(surface.Ascent(font.get()));\r\n\tmeasurements.descent = std::floor(surface.Descent(font.get()));\r\n\r\n\tmeasurements.capitalHeight = surface.Ascent(font.get()) - surface.InternalLeading(font.get());\r\n\tmeasurements.aveCharWidth = surface.AverageCharWidth(font.get());\r\n\tmeasurements.monospaceCharacterWidth = measurements.aveCharWidth;\r\n\tmeasurements.spaceWidth = surface.WidthText(font.get(), \" \");\r\n\r\n\tif (fs.checkMonospaced) {\r\n\t\t// \"Ay\" is normally strongly kerned and \"fi\" may be a ligature\r\n\t\tconstexpr std::string_view allASCIIGraphic(\"Ayfi\"\r\n\t\t// python: ''.join(chr(ch) for ch in range(32, 127))\r\n\t\t\" !\\\"#$%&\\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\");\r\n\t\tstd::array<XYPOSITION, allASCIIGraphic.length()> positions {};\r\n\t\tsurface.MeasureWidthsUTF8(font.get(), allASCIIGraphic, positions.data());\r\n\t\tstd::adjacent_difference(positions.begin(), positions.end(), positions.begin());\r\n\t\tconst XYPOSITION maxWidth = *std::max_element(positions.begin(), positions.end());\r\n\t\tconst XYPOSITION minWidth = *std::min_element(positions.begin(), positions.end());\r\n\t\tconst XYPOSITION variance = maxWidth - minWidth;\r\n\t\tconst XYPOSITION scaledVariance = variance / measurements.aveCharWidth;\r\n\t\tconstexpr XYPOSITION monospaceWidthEpsilon = 0.000001;\t// May need tweaking if monospace fonts vary more\r\n\t\tmeasurements.monospaceASCII = scaledVariance < monospaceWidthEpsilon;\r\n\t\tmeasurements.monospaceCharacterWidth = minWidth;\r\n\t} else {\r\n\t\tmeasurements.monospaceASCII = false;\r\n\t}\r\n}\r\n\r\nViewStyle::ViewStyle(size_t stylesSize_) :\r\n\tstyles(stylesSize_),\r\n\tmarkers(MarkerMax + 1),\r\n\tindicators(static_cast<size_t>(IndicatorNumbers::Max) + 1),\r\n\tms(MaxMargin + 1) {\r\n\r\n\tnextExtendedStyle = 256;\r\n\tResetDefaultStyle();\r\n\r\n\t// There are no image markers by default, so no need for calling CalcLargestMarkerHeight()\r\n\tlargestMarkerHeight = 0;\r\n\r\n\tindicators[0] = Indicator(IndicatorStyle::Squiggle, ColourRGBA(0, half, 0));\t// Green\r\n\tindicators[1] = Indicator(IndicatorStyle::TT, ColourRGBA(0, 0, maximumByte));\t// Blue\r\n\tindicators[2] = Indicator(IndicatorStyle::Plain, ColourRGBA(maximumByte, 0, 0));\t// Red\r\n\r\n\t// Reverted to origin\r\n\tconstexpr ColourRGBA revertedToOrigin(0x40, 0xA0, 0xBF);\r\n\t// Saved\r\n\tconstexpr ColourRGBA saved(0x0, 0xA0, 0x0);\r\n\t// Modified\r\n\tconstexpr ColourRGBA modified(0xFF, 0x80, 0x0);\r\n\t// Reverted to change\r\n\tconstexpr ColourRGBA revertedToChange(0xA0, 0xC0, 0x0);\r\n\r\n\t// Edition indicators\r\n\tconstexpr size_t indexHistory = static_cast<size_t>(IndicatorNumbers::HistoryRevertedToOriginInsertion);\r\n\r\n\t// Default indicators are moderately intense so they don't overwhelm text\r\n\tconstexpr int alphaFill = 30;\r\n\tconstexpr int alphaOutline = 50;\r\n\tindicators[indexHistory+0] = Indicator(IndicatorStyle::CompositionThick, revertedToOrigin, false, alphaFill, alphaOutline);\r\n\tindicators[indexHistory+1] = Indicator(IndicatorStyle::Point, revertedToOrigin);\r\n\tindicators[indexHistory+2] = Indicator(IndicatorStyle::CompositionThick, saved, false, alphaFill, alphaOutline);\r\n\tindicators[indexHistory+3] = Indicator(IndicatorStyle::Point, saved);\r\n\tindicators[indexHistory+4] = Indicator(IndicatorStyle::CompositionThick, modified, false, alphaFill, alphaOutline);\r\n\tindicators[indexHistory+5] = Indicator(IndicatorStyle::PointTop, modified);\r\n\tindicators[indexHistory+6] = Indicator(IndicatorStyle::CompositionThick, revertedToChange, false, alphaFill, alphaOutline);\r\n\tindicators[indexHistory+7] = Indicator(IndicatorStyle::Point, revertedToChange);\r\n\r\n\t// Edition markers\r\n\t// Reverted to origin\r\n\tconstexpr size_t indexHistoryRevertedToOrigin = static_cast<size_t>(MarkerOutline::HistoryRevertedToOrigin);\r\n\tmarkers[indexHistoryRevertedToOrigin].back = revertedToOrigin;\r\n\tmarkers[indexHistoryRevertedToOrigin].fore = revertedToOrigin;\r\n\tmarkers[indexHistoryRevertedToOrigin].markType = MarkerSymbol::Bar;\r\n\t// Saved\r\n\tconstexpr size_t indexHistorySaved = static_cast<size_t>(MarkerOutline::HistorySaved);\r\n\tmarkers[indexHistorySaved].back = saved;\r\n\tmarkers[indexHistorySaved].fore = saved;\r\n\tmarkers[indexHistorySaved].markType = MarkerSymbol::Bar;\r\n\t// Modified\r\n\tconstexpr size_t indexHistoryModified = static_cast<size_t>(MarkerOutline::HistoryModified);\r\n\tmarkers[indexHistoryModified].back = Platform::Chrome();\r\n\tmarkers[indexHistoryModified].fore = modified;\r\n\tmarkers[indexHistoryModified].markType = MarkerSymbol::Bar;\r\n\t// Reverted to change\r\n\tconstexpr size_t indexHistoryRevertedToModified = static_cast<size_t>(MarkerOutline::HistoryRevertedToModified);\r\n\tmarkers[indexHistoryRevertedToModified].back = revertedToChange;\r\n\tmarkers[indexHistoryRevertedToModified].fore = revertedToChange;\r\n\tmarkers[indexHistoryRevertedToModified].markType = MarkerSymbol::Bar;\r\n\r\n\ttechnology = Technology::Default;\r\n\tindicatorsDynamic = false;\r\n\tindicatorsSetFore = false;\r\n\tlineHeight = 1;\r\n\tlineOverlap = 0;\r\n\tmaxAscent = 1;\r\n\tmaxDescent = 1;\r\n\taveCharWidth = 8;\r\n\tspaceWidth = 8;\r\n\ttabWidth = spaceWidth * 8;\r\n\r\n\t// Default is for no selection foregrounds\r\n\t// Shades of grey for selection backgrounds\r\n\telementBaseColours[Element::SelectionBack] = ColourRGBA::Grey(light);\r\n\tconstexpr unsigned int veryLight = 0xd7U;\r\n\telementBaseColours[Element::SelectionAdditionalBack] = ColourRGBA::Grey(veryLight);\r\n\tconstexpr unsigned int halfLight = 0xb0;\r\n\telementBaseColours[Element::SelectionSecondaryBack] = ColourRGBA::Grey(halfLight);\r\n\telementBaseColours[Element::SelectionInactiveBack] = ColourRGBA::Grey(mid, quarter);\r\n\telementAllowsTranslucent.insert({\r\n\t\tElement::SelectionText,\r\n\t\tElement::SelectionBack,\r\n\t\tElement::SelectionAdditionalText,\r\n\t\tElement::SelectionAdditionalBack,\r\n\t\tElement::SelectionSecondaryText,\r\n\t\tElement::SelectionSecondaryBack,\r\n\t\tElement::SelectionInactiveText,\r\n\t\tElement::SelectionInactiveBack,\r\n\t\tElement::SelectionInactiveAdditionalText,\r\n\t\tElement::SelectionInactiveAdditionalBack,\r\n\t\t});\r\n\r\n\tcontrolCharSymbol = 0;\t/* Draw the control characters */\r\n\tcontrolCharWidth = 0;\r\n\tselbar = Platform::Chrome();\r\n\tselbarlight = Platform::ChromeHighlight();\r\n\tstyles[StyleLineNumber].fore = black;\r\n\tstyles[StyleLineNumber].back = Platform::Chrome();\r\n\r\n\telementBaseColours[Element::Caret] = black;\r\n\telementBaseColours[Element::CaretAdditional] = ColourRGBA::Grey(half);\r\n\telementAllowsTranslucent.insert({\r\n\t\tElement::Caret,\r\n\t\tElement::CaretAdditional,\r\n\t\t});\r\n\r\n\telementAllowsTranslucent.insert(Element::CaretLineBack);\r\n\r\n\tsomeStylesProtected = false;\r\n\tsomeStylesForceCase = false;\r\n\r\n\thotspotUnderline = true;\r\n\telementAllowsTranslucent.insert(Element::HotSpotActive);\r\n\r\n\tleftMarginWidth = 1;\r\n\trightMarginWidth = 1;\r\n\tms[0] = MarginStyle(MarginType::Number);\r\n\tms[1] = MarginStyle(MarginType::Symbol, 16, ~MaskFolders);\r\n\tms[2] = MarginStyle(MarginType::Symbol);\r\n\tmarginInside = true;\r\n\tCalculateMarginWidthAndMask();\r\n\ttextStart = marginInside ? fixedColumnWidth : leftMarginWidth;\r\n\tzoomLevel = 0;\r\n\tviewWhitespace = WhiteSpace::Invisible;\r\n\ttabDrawMode = TabDrawMode::LongArrow;\r\n\twhitespaceSize = 1;\r\n\telementAllowsTranslucent.insert(Element::WhiteSpace);\r\n\r\n\tviewIndentationGuides = IndentView::None;\r\n\tviewEOL = false;\r\n\textraFontFlag = FontQuality::QualityDefault;\r\n\textraAscent = 0;\r\n\textraDescent = 0;\r\n\tmarginStyleOffset = 0;\r\n\tannotationVisible = AnnotationVisible::Hidden;\r\n\tannotationStyleOffset = 0;\r\n\teolAnnotationVisible = EOLAnnotationVisible::Hidden;\r\n\teolAnnotationStyleOffset = 0;\r\n\tbraceHighlightIndicatorSet = false;\r\n\tbraceHighlightIndicator = 0;\r\n\tbraceBadLightIndicatorSet = false;\r\n\tbraceBadLightIndicator = 0;\r\n\r\n\tedgeState = EdgeVisualStyle::None;\r\n\ttheEdge = EdgeProperties(0, ColourRGBA::Grey(light));\r\n\r\n\tmarginNumberPadding = 3;\r\n\tctrlCharPadding = 3; // +3 For a blank on front and rounded edge each side\r\n\tlastSegItalicsOffset = 2;\r\n\r\n\tlocaleName = localeNameDefault;\r\n}\r\n\r\n// Copy constructor only called when printing copies the screen ViewStyle so it can be\r\n// modified for printing styles.\r\nViewStyle::ViewStyle(const ViewStyle &source) : ViewStyle(source.styles.size()) {\r\n\tstyles = source.styles;\r\n\tfor (Style &style : styles) {\r\n\t\t// Can't just copy fontName as its lifetime is relative to its owning ViewStyle\r\n\t\tstyle.fontName = fontNames.Save(style.fontName);\r\n\t}\r\n\tnextExtendedStyle = source.nextExtendedStyle;\r\n\tmarkers = source.markers;\r\n\tCalcLargestMarkerHeight();\r\n\r\n\tindicators = source.indicators;\r\n\r\n\tindicatorsDynamic = source.indicatorsDynamic;\r\n\tindicatorsSetFore = source.indicatorsSetFore;\r\n\r\n\tselection = source.selection;\r\n\r\n\tfoldmarginColour = source.foldmarginColour;\r\n\tfoldmarginHighlightColour = source.foldmarginHighlightColour;\r\n\r\n\thotspotUnderline = source.hotspotUnderline;\r\n\r\n\tcontrolCharSymbol = source.controlCharSymbol;\r\n\tcontrolCharWidth = source.controlCharWidth;\r\n\tselbar = source.selbar;\r\n\tselbarlight = source.selbarlight;\r\n\tcaret = source.caret;\r\n\tcaretLine = source.caretLine;\r\n\tsomeStylesProtected = false;\r\n\tsomeStylesForceCase = false;\r\n\tleftMarginWidth = source.leftMarginWidth;\r\n\trightMarginWidth = source.rightMarginWidth;\r\n\tms = source.ms;\r\n\tmaskInLine = source.maskInLine;\r\n\tmaskDrawInText = source.maskDrawInText;\r\n\tmaskDrawWrapped = source.maskDrawWrapped;\r\n\tfixedColumnWidth = source.fixedColumnWidth;\r\n\tmarginInside = source.marginInside;\r\n\ttextStart = source.textStart;\r\n\tzoomLevel = source.zoomLevel;\r\n\tviewWhitespace = source.viewWhitespace;\r\n\ttabDrawMode = source.tabDrawMode;\r\n\twhitespaceSize = source.whitespaceSize;\r\n\tviewIndentationGuides = source.viewIndentationGuides;\r\n\tviewEOL = source.viewEOL;\r\n\textraFontFlag = source.extraFontFlag;\r\n\textraAscent = source.extraAscent;\r\n\textraDescent = source.extraDescent;\r\n\tmarginStyleOffset = source.marginStyleOffset;\r\n\tannotationVisible = source.annotationVisible;\r\n\tannotationStyleOffset = source.annotationStyleOffset;\r\n\teolAnnotationVisible = source.eolAnnotationVisible;\r\n\teolAnnotationStyleOffset = source.eolAnnotationStyleOffset;\r\n\tbraceHighlightIndicatorSet = source.braceHighlightIndicatorSet;\r\n\tbraceHighlightIndicator = source.braceHighlightIndicator;\r\n\tbraceBadLightIndicatorSet = source.braceBadLightIndicatorSet;\r\n\tbraceBadLightIndicator = source.braceBadLightIndicator;\r\n\r\n\tedgeState = source.edgeState;\r\n\ttheEdge = source.theEdge;\r\n\ttheMultiEdge = source.theMultiEdge;\r\n\r\n\tmarginNumberPadding = source.marginNumberPadding;\r\n\tctrlCharPadding = source.ctrlCharPadding;\r\n\tlastSegItalicsOffset = source.lastSegItalicsOffset;\r\n\r\n\twrap = source.wrap;\r\n\r\n\tlocaleName = source.localeName;\r\n}\r\n\r\nViewStyle::~ViewStyle() = default;\r\n\r\nvoid ViewStyle::CalculateMarginWidthAndMask() noexcept {\r\n\tfixedColumnWidth = marginInside ? leftMarginWidth : 0;\r\n\tmaskInLine = 0xffffffff;\r\n\tint maskDefinedMarkers = 0;\r\n\tfor (const MarginStyle &m : ms) {\r\n\t\tfixedColumnWidth += m.width;\r\n\t\tif (m.width > 0)\r\n\t\t\tmaskInLine &= ~m.mask;\r\n\t\tmaskDefinedMarkers |= m.mask;\r\n\t}\r\n\tmaskDrawInText = 0;\r\n\tfor (int markBit = 0; markBit <= MarkerMax; markBit++) {\r\n\t\tconst int maskBit = 1U << markBit;\r\n\t\tswitch (markers[markBit].markType) {\r\n\t\tcase MarkerSymbol::Empty:\r\n\t\t\tmaskInLine &= ~maskBit;\r\n\t\t\tbreak;\r\n\t\tcase MarkerSymbol::Background:\r\n\t\tcase MarkerSymbol::Underline:\r\n\t\t\tmaskInLine &= ~maskBit;\r\n\t\t\tmaskDrawInText |= maskDefinedMarkers & maskBit;\r\n\t\t\tbreak;\r\n\t\tdefault:\t// Other marker types do not affect the masks\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\tmaskDrawWrapped = 0;\r\n\tfor (int markBit = 0; markBit <= MarkerMax; markBit++) {\r\n\t\tconst int maskBit = 1U << markBit;\r\n\t\tswitch (markers[markBit].markType) {\r\n\t\tcase MarkerSymbol::Bar:\r\n\t\t\tmaskDrawWrapped |= maskBit;\r\n\t\t\tbreak;\r\n\t\tdefault:\t// Other marker types do not affect the masks\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid ViewStyle::Refresh(Surface &surface, int tabInChars) {\r\n\tfonts.clear();\r\n\r\n\tselbar = Platform::Chrome();\r\n\tselbarlight = Platform::ChromeHighlight();\r\n\r\n\t// Apply the extra font flag which controls text drawing quality to each style.\r\n\tfor (Style &style : styles) {\r\n\t\tstyle.extraFontFlag = extraFontFlag;\r\n\t}\r\n\r\n\t// Create a FontRealised object for each unique font in the styles.\r\n\tCreateAndAddFont(styles[StyleDefault]);\r\n\tfor (const Style &style : styles) {\r\n\t\tCreateAndAddFont(style);\r\n\t}\r\n\r\n\t// Ask platform to allocate each unique font.\r\n\tfor (const std::pair<const FontSpecification, std::unique_ptr<FontRealised>> &font : fonts) {\r\n\t\tfont.second->Realise(surface, zoomLevel, technology, font.first, localeName.c_str());\r\n\t}\r\n\r\n\t// Set the platform font handle and measurements for each style.\r\n\tfor (Style &style : styles) {\r\n\t\tconst FontRealised *fr = Find(style);\r\n\t\tstyle.Copy(fr->font, fr->measurements);\r\n\t}\r\n\r\n\tindicatorsDynamic = std::any_of(indicators.cbegin(), indicators.cend(),\r\n\t\t[](const Indicator &indicator) noexcept { return indicator.IsDynamic(); });\r\n\r\n\tindicatorsSetFore = std::any_of(indicators.cbegin(), indicators.cend(),\r\n\t\t[](const Indicator &indicator) noexcept { return indicator.OverridesTextFore(); });\r\n\r\n\tmaxAscent = 1;\r\n\tmaxDescent = 1;\r\n\tFindMaxAscentDescent();\r\n\t// Ensure reasonable values: lines less than 1 pixel high will not work\r\n\tmaxAscent = std::max(1.0, maxAscent + extraAscent);\r\n\tmaxDescent = std::max(0.0, maxDescent + extraDescent);\r\n\tlineHeight = static_cast<int>(std::lround(maxAscent + maxDescent));\r\n\tlineOverlap = lineHeight / 10;\r\n\tif (lineOverlap < 2)\r\n\t\tlineOverlap = 2;\r\n\tif (lineOverlap > lineHeight)\r\n\t\tlineOverlap = lineHeight;\r\n\r\n\tsomeStylesProtected = std::any_of(styles.cbegin(), styles.cend(),\r\n\t\t[](const Style &style) noexcept { return style.IsProtected(); });\r\n\r\n\tsomeStylesForceCase = std::any_of(styles.cbegin(), styles.cend(),\r\n\t\t[](const Style &style) noexcept { return style.caseForce != Style::CaseForce::mixed; });\r\n\r\n\taveCharWidth = styles[StyleDefault].aveCharWidth;\r\n\tspaceWidth = styles[StyleDefault].spaceWidth;\r\n\ttabWidth = spaceWidth * tabInChars;\r\n\r\n\tcontrolCharWidth = 0.0;\r\n\tif (controlCharSymbol >= 32) {\r\n\t\tconst char cc[2] = { static_cast<char>(controlCharSymbol), '\\0' };\r\n\t\tcontrolCharWidth = surface.WidthText(styles[StyleControlChar].font.get(), cc);\r\n\t}\r\n\r\n\tCalculateMarginWidthAndMask();\r\n\ttextStart = marginInside ? fixedColumnWidth : leftMarginWidth;\r\n}\r\n\r\nvoid ViewStyle::ReleaseAllExtendedStyles() noexcept {\r\n\tnextExtendedStyle = 256;\r\n}\r\n\r\nint ViewStyle::AllocateExtendedStyles(int numberStyles) {\r\n\tconst int startRange = nextExtendedStyle;\r\n\tnextExtendedStyle += numberStyles;\r\n\tEnsureStyle(nextExtendedStyle);\r\n\treturn startRange;\r\n}\r\n\r\nvoid ViewStyle::EnsureStyle(size_t index) {\r\n\tif (index >= styles.size()) {\r\n\t\tAllocStyles(index+1);\r\n\t}\r\n}\r\n\r\nvoid ViewStyle::ResetDefaultStyle() {\r\n\tstyles[StyleDefault] = Style(fontNames.Save(Platform::DefaultFont()));\r\n}\r\n\r\nvoid ViewStyle::ClearStyles() {\r\n\t// Reset all styles to be like the default style\r\n\tfor (size_t i=0; i<styles.size(); i++) {\r\n\t\tif (i != StyleDefault) {\r\n\t\t\tstyles[i] = styles[StyleDefault];\r\n\t\t}\r\n\t}\r\n\tstyles[StyleLineNumber].back = Platform::Chrome();\r\n\r\n\t// Set call tip fore/back to match the values previously set for call tips\r\n\tstyles[StyleCallTip].back = white;\r\n\tstyles[StyleCallTip].fore = ColourRGBA::Grey(mid);\r\n}\r\n\r\nvoid ViewStyle::SetStyleFontName(int styleIndex, const char *name) {\r\n\tstyles[styleIndex].fontName = fontNames.Save(name);\r\n}\r\n\r\nvoid ViewStyle::SetFontLocaleName(const char *name) {\r\n\tlocaleName = name;\r\n}\r\n\r\nbool ViewStyle::ProtectionActive() const noexcept {\r\n\treturn someStylesProtected;\r\n}\r\n\r\nint ViewStyle::ExternalMarginWidth() const noexcept {\r\n\treturn marginInside ? 0 : fixedColumnWidth;\r\n}\r\n\r\nint ViewStyle::MarginFromLocation(Point pt) const noexcept {\r\n\tXYPOSITION x = marginInside ? 0 : -fixedColumnWidth;\r\n\tfor (size_t i = 0; i < ms.size(); i++) {\r\n\t\tif ((pt.x >= x) && (pt.x < x + ms[i].width))\r\n\t\t\treturn static_cast<int>(i);\r\n\t\tx += ms[i].width;\r\n\t}\r\n\treturn -1;\r\n}\r\n\r\nbool ViewStyle::ValidStyle(size_t styleIndex) const noexcept {\r\n\treturn styleIndex < styles.size();\r\n}\r\n\r\nvoid ViewStyle::CalcLargestMarkerHeight() noexcept {\r\n\tlargestMarkerHeight = 0;\r\n\tfor (const LineMarker &marker : markers) {\r\n\t\tswitch (marker.markType) {\r\n\t\tcase MarkerSymbol::Pixmap:\r\n\t\t\tif (marker.pxpm && marker.pxpm->GetHeight() > largestMarkerHeight)\r\n\t\t\t\tlargestMarkerHeight = marker.pxpm->GetHeight();\r\n\t\t\tbreak;\r\n\t\tcase MarkerSymbol::RgbaImage:\r\n\t\t\tif (marker.image && marker.image->GetHeight() > largestMarkerHeight)\r\n\t\t\t\tlargestMarkerHeight = marker.image->GetHeight();\r\n\t\t\tbreak;\r\n\t\tcase MarkerSymbol::Bar:\r\n\t\t\tlargestMarkerHeight = lineHeight + 2;\r\n\t\t\tbreak;\r\n\t\tdefault:\t// Only images have their own natural heights\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nint ViewStyle::GetFrameWidth() const noexcept {\r\n\treturn std::clamp(caretLine.frame, 1, lineHeight / 3);\r\n}\r\n\r\nbool ViewStyle::IsLineFrameOpaque(bool caretActive, bool lineContainsCaret) const {\r\n\treturn caretLine.frame && (caretActive || caretLine.alwaysShow) &&\r\n\t\tElementColour(Element::CaretLineBack) &&\r\n\t\t(caretLine.layer == Layer::Base) && lineContainsCaret;\r\n}\r\n\r\n// See if something overrides the line background colour:  Either if caret is on the line\r\n// and background colour is set for that, or if a marker is defined that forces its background\r\n// colour onto the line, or if a marker is defined but has no selection margin in which to\r\n// display itself (as long as it's not an MarkerSymbol::Empty marker).  These are checked in order\r\n// with the earlier taking precedence.  When multiple markers cause background override,\r\n// the colour for the highest numbered one is used.\r\nColourOptional ViewStyle::Background(int marksOfLine, bool caretActive, bool lineContainsCaret) const {\r\n\tColourOptional background;\r\n\tif (!caretLine.frame && (caretActive || caretLine.alwaysShow) &&\r\n\t\t(caretLine.layer == Layer::Base) && lineContainsCaret) {\r\n\t\tbackground = ElementColour(Element::CaretLineBack);\r\n\t}\r\n\tif (!background && marksOfLine) {\r\n\t\tint marks = marksOfLine;\r\n\t\tfor (int markBit = 0; (markBit <= MarkerMax) && marks; markBit++) {\r\n\t\t\tif ((marks & 1) && (markers[markBit].markType == MarkerSymbol::Background) &&\r\n\t\t\t\t(markers[markBit].layer == Layer::Base)) {\r\n\t\t\t\tbackground = markers[markBit].back;\r\n\t\t\t}\r\n\t\t\tmarks >>= 1;\r\n\t\t}\r\n\t}\r\n\tif (!background && maskInLine) {\r\n\t\tint marksMasked = marksOfLine & maskInLine;\r\n\t\tif (marksMasked) {\r\n\t\t\tfor (int markBit = 0; (markBit <= MarkerMax) && marksMasked; markBit++) {\r\n\t\t\t\tif ((marksMasked & 1) &&\r\n\t\t\t\t\t(markers[markBit].layer == Layer::Base)) {\r\n\t\t\t\t\tbackground = markers[markBit].back;\r\n\t\t\t\t}\r\n\t\t\t\tmarksMasked >>= 1;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (background) {\r\n\t\treturn background->Opaque();\r\n\t} else {\r\n\t\treturn {};\r\n\t}\r\n}\r\n\r\nbool ViewStyle::SelectionBackgroundDrawn() const noexcept {\r\n\treturn selection.layer == Layer::Base;\r\n}\r\n\r\nbool ViewStyle::SelectionTextDrawn() const {\r\n\treturn\r\n\t\tElementIsSet(Element::SelectionText) ||\r\n\t\tElementIsSet(Element::SelectionAdditionalText) ||\r\n\t\tElementIsSet(Element::SelectionSecondaryText) ||\r\n\t\tElementIsSet(Element::SelectionInactiveText) ||\r\n\t\tElementIsSet(Element::SelectionInactiveAdditionalText);\r\n}\r\n\r\nbool ViewStyle::WhitespaceBackgroundDrawn() const {\r\n\treturn (viewWhitespace != WhiteSpace::Invisible) && (ElementIsSet(Element::WhiteSpaceBack));\r\n}\r\n\r\nbool ViewStyle::WhiteSpaceVisible(bool inIndent) const noexcept {\r\n\treturn (!inIndent && viewWhitespace == WhiteSpace::VisibleAfterIndent) ||\r\n\t\t(inIndent && viewWhitespace == WhiteSpace::VisibleOnlyInIndent) ||\r\n\t\tviewWhitespace == WhiteSpace::VisibleAlways;\r\n}\r\n\r\nColourRGBA ViewStyle::WrapColour() const {\r\n\treturn ElementColour(Element::WhiteSpace).value_or(styles[StyleDefault].fore);\r\n}\r\n\r\n// Insert new edge in sorted order.\r\nvoid ViewStyle::AddMultiEdge(int column, ColourRGBA colour) {\r\n\ttheMultiEdge.insert(\r\n\t\tstd::upper_bound(theMultiEdge.begin(), theMultiEdge.end(), column,\r\n\t\t\t[](const EdgeProperties &a, const EdgeProperties &b) noexcept {\r\n\t\t\t\treturn a.column < b.column;\r\n\t\t\t}),\r\n\t\tEdgeProperties(column, colour));\r\n}\r\n\r\nColourOptional ViewStyle::ElementColour(Element element) const {\r\n\tconst ElementMap::const_iterator search = elementColours.find(element);\r\n\tif (search != elementColours.end()) {\r\n\t\tif (search->second.has_value()) {\r\n\t\t\treturn search->second;\r\n\t\t}\r\n\t}\r\n\tconst ElementMap::const_iterator searchBase = elementBaseColours.find(element);\r\n\tif (searchBase != elementBaseColours.end()) {\r\n\t\tif (searchBase->second.has_value()) {\r\n\t\t\treturn searchBase->second;\r\n\t\t}\r\n\t}\r\n\treturn {};\r\n}\r\n\r\nColourRGBA ViewStyle::ElementColourForced(Element element) const {\r\n\t// Like ElementColour but never returns empty - when not found return opaque black.\r\n\t// This method avoids warnings for unwrapping potentially empty optionals from\r\n\t// Visual C++ Code Analysis\r\n\tconst ColourOptional colour = ElementColour(element);\r\n\treturn colour.value_or(black);\r\n}\r\n\r\nbool ViewStyle::ElementAllowsTranslucent(Element element) const {\r\n\treturn elementAllowsTranslucent.count(element) > 0;\r\n}\r\n\r\nbool ViewStyle::ResetElement(Element element) {\r\n\tconst ElementMap::const_iterator search = elementColours.find(element);\r\n\tconst bool changed = (search != elementColours.end()) && (search->second.has_value());\r\n\telementColours.erase(element);\r\n\treturn changed;\r\n}\r\n\r\nnamespace {\r\n\r\nbool IsDifferentColour(const ColourOptional &colour, const ColourRGBA &test) noexcept {\r\n\treturn colour.has_value() && !(*colour == test);\r\n}\r\n\r\nbool SetElementMapColour(ViewStyle::ElementMap &elements, Element element, ColourRGBA colour) {\r\n\tconst ViewStyle::ElementMap::const_iterator search = elements.find(element);\r\n\tconst bool changed = (search == elements.end()) ||\r\n\t\tIsDifferentColour(search->second, colour);\r\n\telements[element] = colour;\r\n\treturn changed;\r\n}\r\n\r\n}\r\n\r\nbool ViewStyle::SetElementColour(Element element, ColourRGBA colour) {\r\n\treturn SetElementMapColour(elementColours, element, colour);\r\n}\r\n\r\nbool ViewStyle::SetElementColourOptional(Element element, uptr_t wParam, sptr_t lParam) {\r\n\tif (wParam) {\r\n\t\treturn SetElementColour(element, ColourRGBA::FromIpRGB(lParam));\r\n\t} else {\r\n\t\treturn ResetElement(element);\r\n\t}\r\n}\r\n\r\nvoid ViewStyle::SetElementRGB(Element element, int rgb) {\r\n\tconst ColourRGBA current = ElementColour(element).value_or(ColourRGBA(0, 0, 0, 0));\r\n\telementColours[element] = ColourRGBA(ColourRGBA(rgb), current.GetAlpha());\r\n}\r\n\r\nvoid ViewStyle::SetElementAlpha(Element element, int alpha) {\r\n\tconst ColourRGBA current = ElementColour(element).value_or(ColourRGBA(0, 0, 0, 0));\r\n\telementColours[element] = ColourRGBA(current, std::min<unsigned int>(alpha, maximumByte));\r\n}\r\n\r\nbool ViewStyle::ElementIsSet(Element element) const {\r\n\tconst ElementMap::const_iterator search = elementColours.find(element);\r\n\tif (search != elementColours.end()) {\r\n\t\treturn search->second.has_value();\r\n\t}\r\n\treturn false;\r\n}\r\n\r\nbool ViewStyle::SetElementBase(Element element, ColourRGBA colour) {\r\n\treturn SetElementMapColour(elementBaseColours, element, colour);\r\n}\r\n\r\nbool ViewStyle::SetWrapState(Wrap wrapState_) noexcept {\r\n\tconst bool changed = wrap.state != wrapState_;\r\n\twrap.state = wrapState_;\r\n\treturn changed;\r\n}\r\n\r\nbool ViewStyle::SetWrapVisualFlags(WrapVisualFlag wrapVisualFlags_) noexcept {\r\n\tconst bool changed = wrap.visualFlags != wrapVisualFlags_;\r\n\twrap.visualFlags = wrapVisualFlags_;\r\n\treturn changed;\r\n}\r\n\r\nbool ViewStyle::SetWrapVisualFlagsLocation(WrapVisualLocation wrapVisualFlagsLocation_) noexcept {\r\n\tconst bool changed = wrap.visualFlagsLocation != wrapVisualFlagsLocation_;\r\n\twrap.visualFlagsLocation = wrapVisualFlagsLocation_;\r\n\treturn changed;\r\n}\r\n\r\nbool ViewStyle::SetWrapVisualStartIndent(int wrapVisualStartIndent_) noexcept {\r\n\tconst bool changed = wrap.visualStartIndent != wrapVisualStartIndent_;\r\n\twrap.visualStartIndent = wrapVisualStartIndent_;\r\n\treturn changed;\r\n}\r\n\r\nbool ViewStyle::SetWrapIndentMode(WrapIndentMode wrapIndentMode_) noexcept {\r\n\tconst bool changed = wrap.indentMode != wrapIndentMode_;\r\n\twrap.indentMode = wrapIndentMode_;\r\n\treturn changed;\r\n}\r\n\r\nbool ViewStyle::IsBlockCaretStyle() const noexcept {\r\n\treturn ((caret.style & CaretStyle::InsMask) == CaretStyle::Block) ||\r\n\t\tFlagSet(caret.style, (CaretStyle::OverstrikeBlock | CaretStyle::Curses));\r\n}\r\n\r\nbool ViewStyle::IsCaretVisible(bool isMainSelection) const noexcept {\r\n\treturn caret.width > 0 &&\r\n\t\t((caret.style & CaretStyle::InsMask) != CaretStyle::Invisible ||\r\n\t\t(FlagSet(caret.style, CaretStyle::Curses) && !isMainSelection)); // only draw additional selections in curses mode\r\n}\r\n\r\nbool ViewStyle::DrawCaretInsideSelection(bool inOverstrike, bool imeCaretBlockOverride) const noexcept {\r\n\tif (FlagSet(caret.style, CaretStyle::BlockAfter))\r\n\t\treturn false;\r\n\treturn ((caret.style & CaretStyle::InsMask) == CaretStyle::Block) ||\r\n\t\t(inOverstrike && FlagSet(caret.style, CaretStyle::OverstrikeBlock)) ||\r\n\t\timeCaretBlockOverride ||\r\n\t\tFlagSet(caret.style, CaretStyle::Curses);\r\n}\r\n\r\nViewStyle::CaretShape ViewStyle::CaretShapeForMode(bool inOverstrike, bool isMainSelection) const noexcept {\r\n\tif (inOverstrike) {\r\n\t\treturn (FlagSet(caret.style, CaretStyle::OverstrikeBlock)) ? CaretShape::block : CaretShape::bar;\r\n\t}\r\n\r\n\tif (FlagSet(caret.style, CaretStyle::Curses) && !isMainSelection) {\r\n\t\treturn CaretShape::block;\r\n\t}\r\n\r\n\tconst CaretStyle caretStyle = caret.style & CaretStyle::InsMask;\r\n\treturn (caretStyle <= CaretStyle::Block) ? static_cast<CaretShape>(caretStyle) : CaretShape::line;\r\n}\r\n\r\nvoid ViewStyle::AllocStyles(size_t sizeNew) {\r\n\tsize_t i=styles.size();\r\n\tstyles.resize(sizeNew);\r\n\tif (styles.size() > StyleDefault) {\r\n\t\tfor (; i<sizeNew; i++) {\r\n\t\t\tif (i != StyleDefault) {\r\n\t\t\t\tstyles[i] = styles[StyleDefault];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid ViewStyle::CreateAndAddFont(const FontSpecification &fs) {\r\n\tif (fs.fontName) {\r\n\t\tconst FontMap::iterator it = fonts.find(fs);\r\n\t\tif (it == fonts.end()) {\r\n\t\t\tfonts[fs] = std::make_unique<FontRealised>();\r\n\t\t}\r\n\t}\r\n}\r\n\r\nFontRealised *ViewStyle::Find(const FontSpecification &fs) {\r\n\tif (!fs.fontName)\t// Invalid specification so return arbitrary object\r\n\t\treturn fonts.begin()->second.get();\r\n\tconst FontMap::iterator it = fonts.find(fs);\r\n\tif (it != fonts.end()) {\r\n\t\t// Should always reach here since map was just set for all styles\r\n\t\treturn it->second.get();\r\n\t}\r\n\treturn nullptr;\r\n}\r\n\r\nvoid ViewStyle::FindMaxAscentDescent() noexcept {\r\n\tfor (size_t i = 0; i < styles.size(); i++) {\r\n\t\tif (i == StyleCallTip)\r\n\t\t\tcontinue;\r\n\r\n\t\tconst auto &style = styles[i];\r\n\r\n\t\tif (maxAscent < style.ascent)\r\n\t\t\tmaxAscent = style.ascent;\r\n\t\tif (maxDescent < style.descent)\r\n\t\t\tmaxDescent = style.descent;\r\n\t}\r\n}\r\n"
  },
  {
    "path": "scintilla/src/ViewStyle.h",
    "content": "// Scintilla source code edit control\r\n/** @file ViewStyle.h\r\n ** Store information on how the document is to be viewed.\r\n **/\r\n// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef VIEWSTYLE_H\r\n#define VIEWSTYLE_H\r\n\r\nnamespace Scintilla::Internal {\r\n\r\n/**\r\n */\r\nclass MarginStyle {\r\npublic:\r\n\tScintilla::MarginType style;\r\n\tColourRGBA back;\r\n\tint width;\r\n\tint mask;\r\n\tbool sensitive;\r\n\tScintilla::CursorShape cursor;\r\n\tMarginStyle(Scintilla::MarginType style_= Scintilla::MarginType::Symbol, int width_=0, int mask_=0) noexcept;\r\n\tbool ShowsFolding() const noexcept;\r\n};\r\n\r\n/**\r\n */\r\n\r\n\r\nclass FontRealised {\r\npublic:\r\n\tFontMeasurements measurements;\r\n\tstd::shared_ptr<Font> font;\r\n\tvoid Realise(Surface &surface, int zoomLevel, Scintilla::Technology technology, const FontSpecification &fs, const char *localeName);\r\n};\r\n\r\ntypedef std::map<FontSpecification, std::unique_ptr<FontRealised>> FontMap;\r\n\r\nusing ColourOptional = std::optional<ColourRGBA>;\r\n\r\ninline ColourOptional OptionalColour(Scintilla::uptr_t wParam, Scintilla::sptr_t lParam) noexcept {\r\n\tif (wParam) {\r\n\t\treturn ColourRGBA::FromIpRGB(lParam);\r\n\t} else {\r\n\t\treturn {};\r\n\t}\r\n}\r\n\r\nstruct SelectionAppearance {\r\n\t// Is the selection visible?\r\n\tbool visible = true;\r\n\t// Whether to draw on base layer or over text\r\n\tScintilla::Layer layer = Layer::Base;\r\n\t// Draw selection past line end characters up to right border\r\n\tbool eolFilled = false;\r\n};\r\n\r\nstruct CaretLineAppearance {\r\n\t// Whether to draw on base layer or over text\r\n\tScintilla::Layer layer = Layer::Base;\r\n\t// Also show when non-focused\r\n\tbool alwaysShow = false;\r\n\t// highlight sub line instead of whole line\r\n\tbool subLine = false;\r\n\t// Non-0: draw a rectangle around line instead of filling line. Value is pixel width of frame\r\n\tint frame = 0;\r\n};\r\n\r\nstruct CaretAppearance {\r\n\t// Line, block, over-strike bar ...\r\n\tScintilla::CaretStyle style = CaretStyle::Line;\r\n\t// Width in pixels\r\n\tint width = 1;\r\n};\r\n\r\nstruct WrapAppearance {\r\n\t// No wrapping, word, character, whitespace appearance\r\n\tScintilla::Wrap state = Wrap::None;\r\n\t// Show indication of wrap at line end, line start, or in margin\r\n\tScintilla::WrapVisualFlag visualFlags = WrapVisualFlag::None;\r\n\t// Show indication near margin or near text\r\n\tScintilla::WrapVisualLocation visualFlagsLocation = WrapVisualLocation::Default;\r\n\t// How much indentation to show wrapping\r\n\tint visualStartIndent = 0;\r\n\t// WrapIndentMode::Fixed, Same, Indent, DeepIndent\r\n\tScintilla::WrapIndentMode indentMode = WrapIndentMode::Fixed;\r\n};\r\n\r\nstruct EdgeProperties {\r\n\tint column = 0;\r\n\tColourRGBA colour;\r\n\tconstexpr EdgeProperties(int column_ = 0, ColourRGBA colour_ = ColourRGBA::FromRGB(0)) noexcept :\r\n\t\tcolumn(column_), colour(colour_) {\r\n\t}\r\n};\r\n\r\n// This is an old style enum so that its members can be used directly as indices without casting\r\nenum StyleIndices {\r\n\tStyleDefault = static_cast<int>(Scintilla::StylesCommon::Default),\r\n\tStyleLineNumber = static_cast<int>(Scintilla::StylesCommon::LineNumber),\r\n\tStyleBraceLight = static_cast<int>(Scintilla::StylesCommon::BraceLight),\r\n\tStyleBraceBad = static_cast<int>(Scintilla::StylesCommon::BraceBad),\r\n\tStyleControlChar = static_cast<int>(Scintilla::StylesCommon::ControlChar),\r\n\tStyleIndentGuide = static_cast<int>(Scintilla::StylesCommon::IndentGuide),\r\n\tStyleCallTip = static_cast<int>(Scintilla::StylesCommon::CallTip),\r\n\tStyleFoldDisplayText = static_cast<int>(Scintilla::StylesCommon::FoldDisplayText),\r\n};\r\n\r\n/**\r\n */\r\nclass ViewStyle {\r\n\tUniqueStringSet fontNames;\r\n\tFontMap fonts;\r\npublic:\r\n\tstd::vector<Style> styles;\r\n\tint nextExtendedStyle;\r\n\tstd::vector<LineMarker> markers;\r\n\tint largestMarkerHeight;\r\n\tstd::vector<Indicator> indicators;\r\n\tbool indicatorsDynamic;\r\n\tbool indicatorsSetFore;\r\n\tScintilla::Technology technology;\r\n\tint lineHeight;\r\n\tint lineOverlap;\r\n\tXYPOSITION maxAscent;\r\n\tXYPOSITION maxDescent;\r\n\tXYPOSITION aveCharWidth;\r\n\tXYPOSITION spaceWidth;\r\n\tXYPOSITION tabWidth;\r\n\r\n\tSelectionAppearance selection;\r\n\r\n\tint controlCharSymbol;\r\n\tXYPOSITION controlCharWidth;\r\n\tColourRGBA selbar;\r\n\tColourRGBA selbarlight;\r\n\tColourOptional foldmarginColour;\r\n\tColourOptional foldmarginHighlightColour;\r\n\tbool hotspotUnderline;\r\n\t/// Margins are ordered: Line Numbers, Selection Margin, Spacing Margin\r\n\tint leftMarginWidth;\t///< Spacing margin on left of text\r\n\tint rightMarginWidth;\t///< Spacing margin on right of text\r\n\tint maskInLine = 0;\t///< Mask for markers to be put into text because there is nowhere for them to go in margin\r\n\tint maskDrawInText = 0;\t///< Mask for markers that always draw in text\r\n\tint maskDrawWrapped = 0;\t///< Mask for markers that draw on wrapped lines\r\n\tstd::vector<MarginStyle> ms;\r\n\tint fixedColumnWidth = 0;\t///< Total width of margins\r\n\tbool marginInside;\t///< true: margin included in text view, false: separate views\r\n\tint textStart;\t///< Starting x position of text within the view\r\n\tint zoomLevel;\r\n\tScintilla::WhiteSpace viewWhitespace;\r\n\tScintilla::TabDrawMode tabDrawMode;\r\n\tint whitespaceSize;\r\n\tScintilla::IndentView viewIndentationGuides;\r\n\tbool viewEOL;\r\n\r\n\tCaretAppearance caret;\r\n\r\n\tCaretLineAppearance caretLine;\r\n\r\n\tbool someStylesProtected;\r\n\tbool someStylesForceCase;\r\n\tScintilla::FontQuality extraFontFlag;\r\n\tint extraAscent;\r\n\tint extraDescent;\r\n\tint marginStyleOffset;\r\n\tScintilla::AnnotationVisible annotationVisible;\r\n\tint annotationStyleOffset;\r\n\tScintilla::EOLAnnotationVisible eolAnnotationVisible;\r\n\tint eolAnnotationStyleOffset;\r\n\tbool braceHighlightIndicatorSet;\r\n\tint braceHighlightIndicator;\r\n\tbool braceBadLightIndicatorSet;\r\n\tint braceBadLightIndicator;\r\n\tScintilla::EdgeVisualStyle edgeState;\r\n\tEdgeProperties theEdge;\r\n\tstd::vector<EdgeProperties> theMultiEdge;\r\n\tint marginNumberPadding; // the right-side padding of the number margin\r\n\tint ctrlCharPadding; // the padding around control character text blobs\r\n\tint lastSegItalicsOffset; // the offset so as not to clip italic characters at EOLs\r\n\r\n\tusing ElementMap = std::map<Scintilla::Element, ColourOptional>;\r\n\tElementMap elementColours;\r\n\tElementMap elementBaseColours;\r\n\tstd::set<Scintilla::Element> elementAllowsTranslucent;\r\n\r\n\tWrapAppearance wrap;\r\n\r\n\tstd::string localeName;\r\n\r\n\tViewStyle(size_t stylesSize_=256);\r\n\tViewStyle(const ViewStyle &source);\r\n\tViewStyle(ViewStyle &&) = delete;\r\n\t// Can only be copied through copy constructor which ensures font names initialised correctly\r\n\tViewStyle &operator=(const ViewStyle &) = delete;\r\n\tViewStyle &operator=(ViewStyle &&) = delete;\r\n\t~ViewStyle();\r\n\tvoid CalculateMarginWidthAndMask() noexcept;\r\n\tvoid Refresh(Surface &surface, int tabInChars);\r\n\tvoid ReleaseAllExtendedStyles() noexcept;\r\n\tint AllocateExtendedStyles(int numberStyles);\r\n\tvoid EnsureStyle(size_t index);\r\n\tvoid ResetDefaultStyle();\r\n\tvoid ClearStyles();\r\n\tvoid SetStyleFontName(int styleIndex, const char *name);\r\n\tvoid SetFontLocaleName(const char *name);\r\n\tbool ProtectionActive() const noexcept;\r\n\tint ExternalMarginWidth() const noexcept;\r\n\tint MarginFromLocation(Point pt) const noexcept;\r\n\tbool ValidStyle(size_t styleIndex) const noexcept;\r\n\tvoid CalcLargestMarkerHeight() noexcept;\r\n\tint GetFrameWidth() const noexcept;\r\n\tbool IsLineFrameOpaque(bool caretActive, bool lineContainsCaret) const;\r\n\tColourOptional Background(int marksOfLine, bool caretActive, bool lineContainsCaret) const;\r\n\tbool SelectionBackgroundDrawn() const noexcept;\r\n\tbool SelectionTextDrawn() const;\r\n\tbool WhitespaceBackgroundDrawn() const;\r\n\tColourRGBA WrapColour() const;\r\n\r\n\tvoid AddMultiEdge(int column, ColourRGBA colour);\r\n\r\n\tColourOptional ElementColour(Scintilla::Element element) const;\r\n\tColourRGBA ElementColourForced(Scintilla::Element element) const;\r\n\tbool ElementAllowsTranslucent(Scintilla::Element element) const;\r\n\tbool ResetElement(Scintilla::Element element);\r\n\tbool SetElementColour(Scintilla::Element element, ColourRGBA colour);\r\n\tbool SetElementColourOptional(Scintilla::Element element, Scintilla::uptr_t wParam, Scintilla::sptr_t lParam);\r\n\tvoid SetElementRGB(Scintilla::Element element, int rgb);\r\n\tvoid SetElementAlpha(Scintilla::Element element, int alpha);\r\n\tbool ElementIsSet(Scintilla::Element element) const;\r\n\tbool SetElementBase(Scintilla::Element element, ColourRGBA colour);\r\n\r\n\tbool SetWrapState(Scintilla::Wrap wrapState_) noexcept;\r\n\tbool SetWrapVisualFlags(Scintilla::WrapVisualFlag wrapVisualFlags_) noexcept;\r\n\tbool SetWrapVisualFlagsLocation(Scintilla::WrapVisualLocation wrapVisualFlagsLocation_) noexcept;\r\n\tbool SetWrapVisualStartIndent(int wrapVisualStartIndent_) noexcept;\r\n\tbool SetWrapIndentMode(Scintilla::WrapIndentMode wrapIndentMode_) noexcept;\r\n\r\n\tbool WhiteSpaceVisible(bool inIndent) const noexcept;\r\n\r\n\tenum class CaretShape { invisible, line, block, bar };\r\n\tbool IsBlockCaretStyle() const noexcept;\r\n\tbool IsCaretVisible(bool isMainSelection) const noexcept;\r\n\tbool DrawCaretInsideSelection(bool inOverstrike, bool imeCaretBlockOverride) const noexcept;\r\n\tCaretShape CaretShapeForMode(bool inOverstrike, bool isMainSelection) const noexcept;\r\n\r\nprivate:\r\n\tvoid AllocStyles(size_t sizeNew);\r\n\tvoid CreateAndAddFont(const FontSpecification &fs);\r\n\tFontRealised *Find(const FontSpecification &fs);\r\n\tvoid FindMaxAscentDescent() noexcept;\r\n};\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/src/XPM.cxx",
    "content": "// Scintilla source code edit control\r\n/** @file XPM.cxx\r\n ** Define a class that holds data in the X Pixmap (XPM) format.\r\n **/\r\n// Copyright 1998-2003 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#include <cstdlib>\r\n#include <cstring>\r\n#include <climits>\r\n#include <cstdint>\r\n\r\n#include <stdexcept>\r\n#include <string_view>\r\n#include <vector>\r\n#include <map>\r\n#include <optional>\r\n#include <algorithm>\r\n#include <iterator>\r\n#include <memory>\r\n\r\n#include \"ScintillaTypes.h\"\r\n\r\n#include \"Debugging.h\"\r\n#include \"Geometry.h\"\r\n#include \"Platform.h\"\r\n\r\n#include \"XPM.h\"\r\n\r\nusing namespace Scintilla;\r\nusing namespace Scintilla::Internal;\r\n\r\nnamespace {\r\n\r\nconst char *NextField(const char *s) noexcept {\r\n\t// In case there are leading spaces in the string\r\n\twhile (*s == ' ') {\r\n\t\ts++;\r\n\t}\r\n\twhile (*s && *s != ' ') {\r\n\t\ts++;\r\n\t}\r\n\twhile (*s == ' ') {\r\n\t\ts++;\r\n\t}\r\n\treturn s;\r\n}\r\n\r\n// Data lines in XPM can be terminated either with NUL or \"\r\nsize_t MeasureLength(const char *s) noexcept {\r\n\tsize_t i = 0;\r\n\twhile (s[i] && (s[i] != '\\\"'))\r\n\t\ti++;\r\n\treturn i;\r\n}\r\n\r\nunsigned int ValueOfHex(const char ch) noexcept {\r\n\tif (ch >= '0' && ch <= '9')\r\n\t\treturn ch - '0';\r\n\telse if (ch >= 'A' && ch <= 'F')\r\n\t\treturn ch - 'A' + 10;\r\n\telse if (ch >= 'a' && ch <= 'f')\r\n\t\treturn ch - 'a' + 10;\r\n\telse\r\n\t\treturn 0;\r\n}\r\n\r\nColourRGBA ColourFromHex(const char *val) noexcept {\r\n\tconst unsigned int r = ValueOfHex(val[0]) * 16 + ValueOfHex(val[1]);\r\n\tconst unsigned int g = ValueOfHex(val[2]) * 16 + ValueOfHex(val[3]);\r\n\tconst unsigned int b = ValueOfHex(val[4]) * 16 + ValueOfHex(val[5]);\r\n\treturn ColourRGBA(r, g, b);\r\n}\r\n\r\n}\r\n\r\n\r\nColourRGBA XPM::ColourFromCode(int ch) const noexcept {\r\n\treturn colourCodeTable[ch];\r\n}\r\n\r\nvoid XPM::FillRun(Surface *surface, int code, int startX, int y, int x) const {\r\n\tif ((code != codeTransparent) && (startX != x)) {\r\n\t\tconst PRectangle rc = PRectangle::FromInts(startX, y, x, y + 1);\r\n\t\tsurface->FillRectangle(rc, ColourFromCode(code));\r\n\t}\r\n}\r\n\r\nXPM::XPM(const char *textForm) {\r\n\tInit(textForm);\r\n}\r\n\r\nXPM::XPM(const char *const *linesForm) {\r\n\tInit(linesForm);\r\n}\r\n\r\nvoid XPM::Init(const char *textForm) {\r\n\t// Test done is two parts to avoid possibility of overstepping the memory\r\n\t// if memcmp implemented strangely. Must be 4 bytes at least at destination.\r\n\tif ((0 == memcmp(textForm, \"/* X\", 4)) && (0 == memcmp(textForm, \"/* XPM */\", 9))) {\r\n\t\t// Build the lines form out of the text form\r\n\t\tstd::vector<const char *> linesForm = LinesFormFromTextForm(textForm);\r\n\t\tif (!linesForm.empty()) {\r\n\t\t\tInit(linesForm.data());\r\n\t\t}\r\n\t} else {\r\n\t\t// It is really in line form\r\n\t\tInit(reinterpret_cast<const char * const *>(textForm));\r\n\t}\r\n}\r\n\r\nvoid XPM::Init(const char *const *linesForm) {\r\n\theight = 1;\r\n\twidth = 1;\r\n\tnColours = 1;\r\n\tpixels.clear();\r\n\tcodeTransparent = ' ';\r\n\tif (!linesForm)\r\n\t\treturn;\r\n\r\n\tstd::fill(colourCodeTable, std::end(colourCodeTable), black);\r\n\tconst char *line0 = linesForm[0];\r\n\twidth = atoi(line0);\r\n\tline0 = NextField(line0);\r\n\theight = atoi(line0);\r\n\tpixels.resize(width*height);\r\n\tline0 = NextField(line0);\r\n\tnColours = atoi(line0);\r\n\tline0 = NextField(line0);\r\n\tif (atoi(line0) != 1) {\r\n\t\t// Only one char per pixel is supported\r\n\t\treturn;\r\n\t}\r\n\r\n\tfor (int c=0; c<nColours; c++) {\r\n\t\tconst char *colourDef = linesForm[c+1];\r\n\t\tconst char code = colourDef[0];\r\n\t\tcolourDef += 4;\r\n\t\tColourRGBA colour(0, 0, 0, 0);\r\n\t\tif (*colourDef == '#') {\r\n\t\t\tcolour = ColourFromHex(colourDef+1);\r\n\t\t} else {\r\n\t\t\tcodeTransparent = code;\r\n\t\t}\r\n\t\tcolourCodeTable[static_cast<unsigned char>(code)] = colour;\r\n\t}\r\n\r\n\tfor (ptrdiff_t y=0; y<height; y++) {\r\n\t\tconst char *lform = linesForm[y+nColours+1];\r\n\t\tconst size_t len = MeasureLength(lform);\r\n\t\tfor (size_t x = 0; x<len; x++)\r\n\t\t\tpixels[y * width + x] = lform[x];\r\n\t}\r\n}\r\n\r\nvoid XPM::Draw(Surface *surface, const PRectangle &rc) {\r\n\tif (pixels.empty()) {\r\n\t\treturn;\r\n\t}\r\n\t// Centre the pixmap\r\n\tconst int startY = static_cast<int>(rc.top + (rc.Height() - height) / 2);\r\n\tconst int startX = static_cast<int>(rc.left + (rc.Width() - width) / 2);\r\n\tfor (int y=0; y<height; y++) {\r\n\t\tint prevCode = 0;\r\n\t\tint xStartRun = 0;\r\n\t\tfor (int x=0; x<width; x++) {\r\n\t\t\tconst int code = pixels[y * width + x];\r\n\t\t\tif (code != prevCode) {\r\n\t\t\t\tFillRun(surface, prevCode, startX + xStartRun, startY + y, startX + x);\r\n\t\t\t\txStartRun = x;\r\n\t\t\t\tprevCode = code;\r\n\t\t\t}\r\n\t\t}\r\n\t\tFillRun(surface, prevCode, startX + xStartRun, startY + y, startX + width);\r\n\t}\r\n}\r\n\r\nColourRGBA XPM::PixelAt(int x, int y) const noexcept {\r\n\tif (pixels.empty() || (x < 0) || (x >= width) || (y < 0) || (y >= height)) {\r\n\t\t// Out of bounds -> transparent black\r\n\t\treturn ColourRGBA(0, 0, 0, 0);\r\n\t}\r\n\tconst int code = pixels[y * width + x];\r\n\treturn ColourFromCode(code);\r\n}\r\n\r\nstd::vector<const char *> XPM::LinesFormFromTextForm(const char *textForm) {\r\n\t// Build the lines form out of the text form\r\n\tstd::vector<const char *> linesForm;\r\n\tint countQuotes = 0;\r\n\tint strings=1;\r\n\tint j=0;\r\n\tfor (; countQuotes < (2*strings) && textForm[j] != '\\0'; j++) {\r\n\t\tif (textForm[j] == '\\\"') {\r\n\t\t\tif (countQuotes == 0) {\r\n\t\t\t\t// First field: width, height, number of colours, chars per pixel\r\n\t\t\t\tconst char *line0 = textForm + j + 1;\r\n\t\t\t\t// Skip width\r\n\t\t\t\tline0 = NextField(line0);\r\n\t\t\t\t// Add 1 line for each pixel of height\r\n\t\t\t\tstrings += atoi(line0);\r\n\t\t\t\tline0 = NextField(line0);\r\n\t\t\t\t// Add 1 line for each colour\r\n\t\t\t\tstrings += atoi(line0);\r\n\t\t\t}\r\n\t\t\tif (countQuotes / 2 >= strings) {\r\n\t\t\t\tbreak;\t// Bad height or number of colours!\r\n\t\t\t}\r\n\t\t\tif ((countQuotes & 1) == 0) {\r\n\t\t\t\tlinesForm.push_back(textForm + j + 1);\r\n\t\t\t}\r\n\t\t\tcountQuotes++;\r\n\t\t}\r\n\t}\r\n\tif (textForm[j] == '\\0' || countQuotes / 2 > strings) {\r\n\t\t// Malformed XPM! Height + number of colours too high or too low\r\n\t\tlinesForm.clear();\r\n\t}\r\n\treturn linesForm;\r\n}\r\n\r\nRGBAImage::RGBAImage(int width_, int height_, float scale_, const unsigned char *pixels_) :\r\n\theight(height_), width(width_), scale(scale_) {\r\n\tif (pixels_) {\r\n\t\tpixelBytes.assign(pixels_, pixels_ + CountBytes());\r\n\t} else {\r\n\t\tpixelBytes.resize(CountBytes());\r\n\t}\r\n}\r\n\r\nRGBAImage::RGBAImage(const XPM &xpm) {\r\n\theight = xpm.GetHeight();\r\n\twidth = xpm.GetWidth();\r\n\tscale = 1;\r\n\tpixelBytes.resize(CountBytes());\r\n\tfor (int y=0; y<height; y++) {\r\n\t\tfor (int x=0; x<width; x++) {\r\n\t\t\tSetPixel(x, y, xpm.PixelAt(x, y));\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfloat RGBAImage::GetScaledHeight() const noexcept {\r\n\treturn static_cast<float>(height) / scale;\r\n}\r\n\r\nfloat RGBAImage::GetScaledWidth() const noexcept {\r\n\treturn static_cast<float>(width) / scale;\r\n}\r\n\r\nint RGBAImage::CountBytes() const noexcept {\r\n\treturn width * height * 4;\r\n}\r\n\r\nconst unsigned char *RGBAImage::Pixels() const noexcept {\r\n\treturn pixelBytes.data();\r\n}\r\n\r\nvoid RGBAImage::SetPixel(int x, int y, ColourRGBA colour) noexcept {\r\n\tunsigned char *pixel = pixelBytes.data() + (y * width + x) * 4;\r\n\t// RGBA\r\n\tpixel[0] = colour.GetRed();\r\n\tpixel[1] = colour.GetGreen();\r\n\tpixel[2] = colour.GetBlue();\r\n\tpixel[3] = colour.GetAlpha();\r\n}\r\n\r\nnamespace {\r\n\r\nconstexpr unsigned char AlphaMultiplied(unsigned char value, unsigned char alpha) noexcept {\r\n\treturn (value * alpha / UCHAR_MAX) & 0xffU;\r\n}\r\n\r\n}\r\n\r\n// Transform a block of pixels from RGBA to BGRA with premultiplied alpha.\r\n// Used for DrawRGBAImage on some platforms.\r\nvoid RGBAImage::BGRAFromRGBA(unsigned char *pixelsBGRA, const unsigned char *pixelsRGBA, size_t count) noexcept {\r\n\tfor (size_t i = 0; i < count; i++) {\r\n\t\tconst unsigned char alpha = pixelsRGBA[3];\r\n\t\t// Input is RGBA, output is BGRA with premultiplied alpha\r\n\t\tpixelsBGRA[2] = AlphaMultiplied(pixelsRGBA[0], alpha);\r\n\t\tpixelsBGRA[1] = AlphaMultiplied(pixelsRGBA[1], alpha);\r\n\t\tpixelsBGRA[0] = AlphaMultiplied(pixelsRGBA[2], alpha);\r\n\t\tpixelsBGRA[3] = alpha;\r\n\t\tpixelsRGBA += bytesPerPixel;\r\n\t\tpixelsBGRA += bytesPerPixel;\r\n\t}\r\n}\r\n\r\nRGBAImageSet::RGBAImageSet() : height(-1), width(-1) {\r\n}\r\n\r\n/// Remove all images.\r\nvoid RGBAImageSet::Clear() noexcept {\r\n\timages.clear();\r\n\theight = -1;\r\n\twidth = -1;\r\n}\r\n\r\n/// Add an image.\r\nvoid RGBAImageSet::AddImage(int ident, std::unique_ptr<RGBAImage> image) {\r\n\timages[ident] = std::move(image);\r\n\theight = -1;\r\n\twidth = -1;\r\n}\r\n\r\n/// Get image by id.\r\nRGBAImage *RGBAImageSet::Get(int ident) {\r\n\tImageMap::iterator it = images.find(ident);\r\n\tif (it != images.end()) {\r\n\t\treturn it->second.get();\r\n\t}\r\n\treturn nullptr;\r\n}\r\n\r\n/// Give the largest height of the set.\r\nint RGBAImageSet::GetHeight() const noexcept {\r\n\tif (height < 0) {\r\n\t\tfor (const std::pair<const int, std::unique_ptr<RGBAImage>> &image : images) {\r\n\t\t\tif (height < image.second->GetHeight()) {\r\n\t\t\t\theight = image.second->GetHeight();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn (height > 0) ? height : 0;\r\n}\r\n\r\n/// Give the largest width of the set.\r\nint RGBAImageSet::GetWidth() const noexcept {\r\n\tif (width < 0) {\r\n\t\tfor (const std::pair<const int, std::unique_ptr<RGBAImage>> &image : images) {\r\n\t\t\tif (width < image.second->GetWidth()) {\r\n\t\t\t\twidth = image.second->GetWidth();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn (width > 0) ? width : 0;\r\n}\r\n"
  },
  {
    "path": "scintilla/src/XPM.h",
    "content": "// Scintilla source code edit control\r\n/** @file XPM.h\r\n ** Define a classes to hold image data in the X Pixmap (XPM) and RGBA formats.\r\n **/\r\n// Copyright 1998-2003 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef XPM_H\r\n#define XPM_H\r\n\r\nnamespace Scintilla::Internal {\r\n\r\n/**\r\n * Hold a pixmap in XPM format.\r\n */\r\nclass XPM {\r\n\tint height=1;\r\n\tint width=1;\r\n\tint nColours=1;\r\n\tstd::vector<unsigned char> pixels;\r\n\tColourRGBA colourCodeTable[256];\r\n\tchar codeTransparent=' ';\r\n\tColourRGBA ColourFromCode(int ch) const noexcept;\r\n\tvoid FillRun(Surface *surface, int code, int startX, int y, int x) const;\r\npublic:\r\n\texplicit XPM(const char *textForm);\r\n\texplicit XPM(const char *const *linesForm);\r\n\tvoid Init(const char *textForm);\r\n\tvoid Init(const char *const *linesForm);\r\n\t/// Decompose image into runs and use FillRectangle for each run\r\n\tvoid Draw(Surface *surface, const PRectangle &rc);\r\n\tint GetHeight() const noexcept { return height; }\r\n\tint GetWidth() const noexcept { return width; }\r\n\tColourRGBA PixelAt(int x, int y) const noexcept;\r\nprivate:\r\n\tstatic std::vector<const char *>LinesFormFromTextForm(const char *textForm);\r\n};\r\n\r\n/**\r\n * A translucent image stored as a sequence of RGBA bytes.\r\n */\r\nclass RGBAImage {\r\n\tint height;\r\n\tint width;\r\n\tfloat scale;\r\n\tstd::vector<unsigned char> pixelBytes;\r\npublic:\r\n\tstatic constexpr size_t bytesPerPixel = 4;\r\n\tRGBAImage(int width_, int height_, float scale_, const unsigned char *pixels_);\r\n\texplicit RGBAImage(const XPM &xpm);\r\n\tint GetHeight() const noexcept { return height; }\r\n\tint GetWidth() const noexcept { return width; }\r\n\tfloat GetScale() const noexcept { return scale; }\r\n\tfloat GetScaledHeight() const noexcept;\r\n\tfloat GetScaledWidth() const noexcept;\r\n\tint CountBytes() const noexcept;\r\n\tconst unsigned char *Pixels() const noexcept;\r\n\tvoid SetPixel(int x, int y, ColourRGBA colour) noexcept;\r\n\tstatic void BGRAFromRGBA(unsigned char *pixelsBGRA, const unsigned char *pixelsRGBA, size_t count) noexcept;\r\n};\r\n\r\n/**\r\n * A collection of RGBAImage pixmaps indexed by integer id.\r\n */\r\nclass RGBAImageSet {\r\n\ttypedef std::map<int, std::unique_ptr<RGBAImage>> ImageMap;\r\n\tImageMap images;\r\n\tmutable int height;\t///< Memorize largest height of the set.\r\n\tmutable int width;\t///< Memorize largest width of the set.\r\npublic:\r\n\tRGBAImageSet();\r\n\t/// Remove all images.\r\n\tvoid Clear() noexcept;\r\n\t/// Add an image.\r\n\tvoid AddImage(int ident, std::unique_ptr<RGBAImage> image);\r\n\t/// Get image by id.\r\n\tRGBAImage *Get(int ident);\r\n\t/// Give the largest height of the set.\r\n\tint GetHeight() const noexcept;\r\n\t/// Give the largest width of the set.\r\n\tint GetWidth() const noexcept;\r\n};\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/test/MessageNumbers.py",
    "content": "# List many windows message numbers\r\n\r\nmsgs = {\r\n\"WM_ACTIVATE\":6,\r\n\"WM_ACTIVATEAPP\":28,\r\n\"WM_CAPTURECHANGED\":533,\r\n\"WM_CHAR\":258,\r\n\"WM_CLOSE\":16,\r\n\"WM_CREATE\":1,\r\n\"WM_COMMAND\":273,\r\n\"WM_DESTROY\":2,\r\n\"WM_ENTERSIZEMOVE\":561,\r\n\"WM_ERASEBKGND\":20,\r\n\"WM_EXITSIZEMOVE\":562,\r\n\"WM_GETMINMAXINFO\":36,\r\n\"WM_GETTEXT\":13,\r\n\"WM_GETTEXTLENGTH\":14,\r\n\"WM_IME_SETCONTEXT\":0x0281,\r\n\"WM_IME_NOTIFY\":0x0282,\r\n\"WM_KEYDOWN\":256,\r\n\"WM_KEYUP\":257,\r\n\"WM_KILLFOCUS\":8,\r\n\"WM_LBUTTONDOWN\":513,\r\n\"WM_LBUTTONUP\":514,\r\n\"WM_MBUTTONDOWN\":519,\r\n\"WM_MBUTTONUP\":520,\r\n\"WM_MBUTTONDBLCLK\":521,\r\n\"WM_MOUSEACTIVATE\":33,\r\n\"WM_MOUSEMOVE\":512,\r\n\"WM_MOVE\":3,\r\n\"WM_MOVING\":534,\r\n\"WM_NCACTIVATE\":134,\r\n\"WM_NCCALCSIZE\":131,\r\n\"WM_NCCREATE\":129,\r\n\"WM_NCDESTROY\":130,\r\n\"WM_NCHITTEST\":132,\r\n\"WM_NCLBUTTONDBLCLK\":163,\r\n\"WM_NCLBUTTONDOWN\":161,\r\n\"WM_NCLBUTTONUP\":162,\r\n\"WM_NCMOUSEMOVE\":160,\r\n\"WM_NCPAINT\":133,\r\n\"WM_PAINT\":15,\r\n\"WM_PARENTNOTIFY\":528,\r\n\"WM_SETCURSOR\":32,\r\n\"WM_SETFOCUS\":7,\r\n\"WM_SETFONT\":48,\r\n\"WM_SETTEXT\":12,\r\n\"WM_SHOWWINDOW\":24,\r\n\"WM_SIZE\":5,\r\n\"WM_SIZING\":532,\r\n\"WM_SYNCPAINT\":136,\r\n\"WM_SYSCOMMAND\":274,\r\n\"WM_SYSKEYDOWN\":260,\r\n\"WM_TIMER\":275,\r\n\"WM_USER\":1024,\r\n\"WM_USER+1\":1025,\r\n\"WM_WINDOWPOSCHANGED\":71,\r\n\"WM_WINDOWPOSCHANGING\":70,\r\n}\r\n\r\nsgsm={}\r\nfor k,v in msgs.items():\r\n\tsgsm[v] = k\r\n\r\n"
  },
  {
    "path": "scintilla/test/README",
    "content": "The test directory contains some unit and performance tests for Scintilla.\n\nThe tests can only be run on Windows using Python 2.7 or 3.x.\nPython 2.7+ is required because the bytes string type and literals are available.\nScintilla must be built before running any tests.\nLexilla may be built before running tests but lexing tests will be skipped if Lexilla not available.\n\nA test application for Windows only is in xite.py and this can be run to experiment:\npythonw xite.py\n\nTo run the basic tests:\npython simpleTests.py\n\nTo check for performance regressions:\npython performanceTests.py\nWhile each test run will be different and the timer has only limited granularity, some results\nfrom a 2 GHz Athlon with a DEBUG build are:\n 0.187 testAddLine\n. 0.203 testAddLineMiddle\n. 0.171 testHuge\n. 0.203 testHugeInserts\n. 0.312 testHugeReplace\n.\n"
  },
  {
    "path": "scintilla/test/ScintillaCallable.py",
    "content": "# -*- coding: utf-8 -*-\r\n\r\nfrom __future__ import unicode_literals\r\n\r\nimport ctypes\r\n\r\nfrom ctypes import c_int, c_char_p, c_long, c_ssize_t\r\n\r\ndef IsEnumeration(t):\r\n\treturn t[:1].isupper()\r\n\r\nbasicTypes = [\"bool\", \"int\", \"position\", \"line\", \"pointer\", \"colour\", \"colouralpha\"]\r\n\r\ndef BasicTypeOrEnumeration(t):\r\n\treturn t in basicTypes or IsEnumeration(t)\r\n\r\nclass TEXTRANGE(ctypes.Structure):\r\n\t_fields_= (\\\r\n\t\t('cpMin', c_long),\r\n\t\t('cpMax', c_long),\r\n\t\t('lpstrText', ctypes.POINTER(ctypes.c_char)),\r\n\t)\r\n\r\nclass TEXTRANGEFULL(ctypes.Structure):\r\n\t_fields_= (\\\r\n\t\t('cpMin', c_ssize_t),\r\n\t\t('cpMax', c_ssize_t),\r\n\t\t('lpstrText', ctypes.POINTER(ctypes.c_char)),\r\n\t)\r\n\r\nclass FINDTEXT(ctypes.Structure):\r\n\t_fields_= (\\\r\n\t\t('cpMin', c_long),\r\n\t\t('cpMax', c_long),\r\n\t\t('lpstrText', c_char_p),\r\n\t\t('cpMinText', c_long),\r\n\t\t('cpMaxText', c_long),\r\n\t)\r\n\r\nclass FINDTEXTFULL(ctypes.Structure):\r\n\t_fields_= (\\\r\n\t\t('cpMin', c_ssize_t),\r\n\t\t('cpMax', c_ssize_t),\r\n\t\t('lpstrText', c_char_p),\r\n\t\t('cpMinText', c_ssize_t),\r\n\t\t('cpMaxText', c_ssize_t),\r\n\t)\r\n\r\nclass SciCall:\r\n\tdef __init__(self, fn, ptr, msg, stringResult=False):\r\n\t\tself._fn = fn\r\n\t\tself._ptr = ptr\r\n\t\tself._msg = msg\r\n\t\tself._stringResult = stringResult\r\n\tdef __call__(self, w=0, lp=0):\r\n\t\tww = ctypes.cast(w, c_char_p)\r\n\t\tif self._stringResult:\r\n\t\t\tlengthBytes = self._fn(self._ptr, self._msg, ww, None)\r\n\t\t\tif lengthBytes == 0:\r\n\t\t\t\treturn bytearray()\r\n\t\t\tresult = (ctypes.c_byte * lengthBytes)(0)\r\n\t\t\tlengthBytes2 = self._fn(self._ptr, self._msg, ww, ctypes.cast(result, c_char_p))\r\n\t\t\tassert lengthBytes == lengthBytes2\r\n\t\t\treturn bytearray(result)[:lengthBytes]\r\n\t\telse:\r\n\t\t\tll = ctypes.cast(lp, c_char_p)\r\n\t\t\treturn self._fn(self._ptr, self._msg, ww, ll)\r\n\r\nsciFX = ctypes.CFUNCTYPE(c_ssize_t, c_char_p, c_int, c_char_p, c_char_p)\r\n\r\nclass ScintillaCallable:\r\n\tdef __init__(self, face, scifn, sciptr):\r\n\t\tself.__dict__[\"face\"] = face\r\n\t\tself.__dict__[\"used\"] = set()\r\n\t\tself.__dict__[\"all\"] = set()\r\n\t\t# The k member is for accessing constants as a dictionary\r\n\t\tself.__dict__[\"k\"] = {}\r\n\t\tfor f in face.features:\r\n\t\t\tself.all.add(f)\r\n\t\t\tif face.features[f][\"FeatureType\"] == \"val\":\r\n\t\t\t\tself.k[f] = int(self.face.features[f][\"Value\"], 0)\r\n\t\t\telif face.features[f][\"FeatureType\"] == \"evt\":\r\n\t\t\t\tself.k[\"SCN_\"+f] = int(self.face.features[f][\"Value\"], 0)\r\n\t\tscifn = sciFX(scifn)\r\n\t\tself.__dict__[\"_scifn\"] = scifn\r\n\t\tself.__dict__[\"_sciptr\"] = sciptr\r\n\tdef __getattr__(self, name):\r\n\t\tif name in self.face.features:\r\n\t\t\tself.used.add(name)\r\n\t\t\tfeature = self.face.features[name]\r\n\t\t\tvalue = int(feature[\"Value\"], 0)\r\n\t\t\t#~ print(\"Feature\", name, feature)\r\n\t\t\tif feature[\"FeatureType\"] == \"val\":\r\n\t\t\t\tself.__dict__[name] = value\r\n\t\t\t\treturn value\r\n\t\t\telse:\r\n\t\t\t\tif feature[\"Param2Type\"] == \"stringresult\" and \\\r\n\t\t\t\t\tname not in [\"GetText\", \"GetLine\", \"GetCurLine\"]:\r\n\t\t\t\t\treturn SciCall(self._scifn, self._sciptr, value, True)\r\n\t\t\t\telse:\r\n\t\t\t\t\treturn SciCall(self._scifn, self._sciptr, value)\r\n\t\telif (\"Get\" + name) in self.face.features:\r\n\t\t\tself.used.add(\"Get\" + name)\r\n\t\t\tfeature = self.face.features[\"Get\" + name]\r\n\t\t\tvalue = int(feature[\"Value\"], 0)\r\n\t\t\tif feature[\"FeatureType\"] == \"get\" and \\\r\n\t\t\t\tnot name.startswith(\"Get\") and \\\r\n\t\t\t\tnot feature[\"Param1Type\"] and \\\r\n\t\t\t\tnot feature[\"Param2Type\"] and \\\r\n\t\t\t\tBasicTypeOrEnumeration(feature[\"ReturnType\"]):\r\n\t\t\t\t#~ print(\"property\", feature)\r\n\t\t\t\treturn self._scifn(self._sciptr, value, None, None)\r\n\t\telif name.startswith(\"SCN_\") and name in self.k:\r\n\t\t\tself.used.add(name)\r\n\t\t\tfeature = self.face.features[name[4:]]\r\n\t\t\tvalue = int(feature[\"Value\"], 0)\r\n\t\t\t#~ print(\"Feature\", name, feature)\r\n\t\t\tif feature[\"FeatureType\"] == \"val\":\r\n\t\t\t\treturn value\r\n\t\traise AttributeError(name)\r\n\tdef __setattr__(self, name, val):\r\n\t\tif (\"Set\" + name) in self.face.features:\r\n\t\t\tself.used.add(\"Set\" + name)\r\n\t\t\tfeature = self.face.features[\"Set\" + name]\r\n\t\t\tvalue = int(feature[\"Value\"], 0)\r\n\t\t\t#~ print(\"setproperty\", feature)\r\n\t\t\tif feature[\"FeatureType\"] == \"set\" and not name.startswith(\"Set\"):\r\n\t\t\t\tif BasicTypeOrEnumeration(feature[\"Param1Type\"]):\r\n\t\t\t\t\treturn self._scifn(self._sciptr, value, c_char_p(val), None)\r\n\t\t\t\telif feature[\"Param2Type\"] in [\"string\"]:\r\n\t\t\t\t\treturn self._scifn(self._sciptr, value, None, c_char_p(val))\r\n\t\t\t\traise AttributeError(name)\r\n\t\traise AttributeError(name)\r\n\tdef getvalue(self, name):\r\n\t\tif name in self.face.features:\r\n\t\t\tfeature = self.face.features[name]\r\n\t\t\tif feature[\"FeatureType\"] != \"evt\":\r\n\t\t\t\ttry:\r\n\t\t\t\t\treturn int(feature[\"Value\"], 0)\r\n\t\t\t\texcept ValueError:\r\n\t\t\t\t\treturn -1\r\n\t\treturn -1\r\n\r\n\r\n\tdef ByteRange(self, start, end):\r\n\t\ttr = TEXTRANGE()\r\n\t\ttr.cpMin = start\r\n\t\ttr.cpMax = end\r\n\t\tlength = end - start\r\n\t\ttr.lpstrText = ctypes.create_string_buffer(length + 1)\r\n\t\tself.GetTextRange(0, ctypes.byref(tr))\r\n\t\ttext = tr.lpstrText[:length]\r\n\t\ttext += b\"\\0\" * (length - len(text))\r\n\t\treturn text\r\n\tdef ByteRangeFull(self, start, end):\r\n\t\ttr = TEXTRANGEFULL()\r\n\t\ttr.cpMin = start\r\n\t\ttr.cpMax = end\r\n\t\tlength = end - start\r\n\t\ttr.lpstrText = ctypes.create_string_buffer(length + 1)\r\n\t\tself.GetTextRangeFull(0, ctypes.byref(tr))\r\n\t\ttext = tr.lpstrText[:length]\r\n\t\ttext += b\"\\0\" * (length - len(text))\r\n\t\treturn text\r\n\tdef StyledTextRange(self, start, end):\r\n\t\ttr = TEXTRANGE()\r\n\t\ttr.cpMin = start\r\n\t\ttr.cpMax = end\r\n\t\tlength = 2 * (end - start)\r\n\t\ttr.lpstrText = ctypes.create_string_buffer(length + 2)\r\n\t\tself.GetStyledText(0, ctypes.byref(tr))\r\n\t\tstyledText = tr.lpstrText[:length]\r\n\t\tstyledText += b\"\\0\" * (length - len(styledText))\r\n\t\treturn styledText\r\n\tdef StyledTextRangeFull(self, start, end):\r\n\t\ttr = TEXTRANGEFULL()\r\n\t\ttr.cpMin = start\r\n\t\ttr.cpMax = end\r\n\t\tlength = 2 * (end - start)\r\n\t\ttr.lpstrText = ctypes.create_string_buffer(length + 2)\r\n\t\tself.GetStyledTextFull(0, ctypes.byref(tr))\r\n\t\tstyledText = tr.lpstrText[:length]\r\n\t\tstyledText += b\"\\0\" * (length - len(styledText))\r\n\t\treturn styledText\r\n\tdef FindBytes(self, start, end, s, flags):\r\n\t\tft = FINDTEXT()\r\n\t\tft.cpMin = start\r\n\t\tft.cpMax = end\r\n\t\tft.lpstrText = s\r\n\t\tft.cpMinText = 0\r\n\t\tft.cpMaxText = 0\r\n\t\tpos = self.FindText(flags, ctypes.byref(ft))\r\n\t\t#~ print(start, end, ft.cpMinText, ft.cpMaxText)\r\n\t\treturn pos\r\n\tdef FindBytesFull(self, start, end, s, flags):\r\n\t\tft = FINDTEXTFULL()\r\n\t\tft.cpMin = start\r\n\t\tft.cpMax = end\r\n\t\tft.lpstrText = s\r\n\t\tft.cpMinText = 0\r\n\t\tft.cpMaxText = 0\r\n\t\tpos = self.FindTextFull(flags, ctypes.byref(ft))\r\n\t\t#~ print(start, end, ft.cpMinText, ft.cpMaxText)\r\n\t\treturn pos\r\n\r\n\tdef Contents(self):\r\n\t\treturn self.ByteRange(0, self.Length)\r\n\r\n\tdef SetContents(self, s):\r\n\t\tself.TargetStart = 0\r\n\t\tself.TargetEnd = self.Length\r\n\t\tself.ReplaceTarget(len(s), s)\r\n\r\n"
  },
  {
    "path": "scintilla/test/XiteMenu.py",
    "content": "# -*- coding: utf-8 -*-\r\n\r\nfrom __future__ import unicode_literals\r\n\r\n\"\"\" Define the menu structure used by the Pentacle applications \"\"\"\r\n\r\nMenuStructure = [\r\n\t[\"&File\", [\r\n\t\t[\"&New\", \"<control>N\"],\r\n\t\t[\"&Open...\", \"<control>O\"],\r\n\t\t[\"&Save\", \"<control>S\"],\r\n\t\t[\"Save &As...\", \"<control><shift>S\"],\r\n\t\t[\"Test\", \"\"],\r\n\t\t[\"Exercised\", \"\"],\r\n\t\t[\"Uncalled\", \"\"],\r\n\t\t[\"-\", \"\"],\r\n\t\t[\"&Exit\", \"\"]]],\r\n\t[ \"&Edit\", [\r\n\t\t[\"&Undo\", \"<control>Z\"],\r\n\t\t[\"&Redo\", \"<control>Y\"],\r\n\t\t[\"-\", \"\"],\r\n\t\t[\"Cu&t\", \"<control>X\"],\r\n\t\t[\"&Copy\", \"<control>C\"],\r\n\t\t[\"&Paste\", \"<control>V\"],\r\n\t\t[\"&Delete\", \"Del\"],\r\n\t\t[\"Select &All\", \"<control>A\"],\r\n\t\t]],\r\n]\r\n"
  },
  {
    "path": "scintilla/test/XiteWin.py",
    "content": "#!/usr/bin/env python3\r\n# -*- coding: utf-8 -*-\r\n# Requires Python 3.6 or later\r\n\r\nfrom __future__ import with_statement\r\nfrom __future__ import unicode_literals\r\n\r\nimport os, platform, sys, unittest\r\n\r\nimport ctypes\r\nfrom ctypes import c_int, c_char_p, c_wchar_p, c_ushort, c_uint\r\nfrom ctypes.wintypes import HWND, WPARAM, LPARAM, HANDLE, HBRUSH, LPCWSTR\r\nuser32=ctypes.windll.user32\r\ngdi32=ctypes.windll.gdi32\r\nkernel32=ctypes.windll.kernel32\r\nfrom MessageNumbers import msgs, sgsm\r\n\r\nimport ScintillaCallable\r\nimport XiteMenu\r\n\r\nscintillaIncludesLexers = False\r\n# Lexilla may optionally be tested it is built and can be loaded\r\nlexillaAvailable = False\r\n\r\nscintillaDirectory = \"..\"\r\nscintillaIncludeDirectory = os.path.join(scintillaDirectory, \"include\")\r\nscintillaScriptsDirectory = os.path.join(scintillaDirectory, \"scripts\")\r\nsys.path.append(scintillaScriptsDirectory)\r\nimport Face\r\n\r\nscintillaBinDirectory = os.path.join(scintillaDirectory, \"bin\")\r\n\r\nlexillaDirectory = os.path.join(scintillaDirectory, \"..\", \"lexilla\")\r\nlexillaBinDirectory = os.path.join(lexillaDirectory, \"bin\")\r\nlexillaIncludeDirectory = os.path.join(lexillaDirectory, \"include\")\r\n\r\nlexName = \"Lexilla.DLL\"\r\ntry:\r\n\tlexillaDLLPath = os.path.join(lexillaBinDirectory, lexName)\r\n\tlexillaLibrary = ctypes.cdll.LoadLibrary(lexillaDLLPath)\r\n\tcreateLexer = lexillaLibrary.CreateLexer\r\n\tcreateLexer.restype = ctypes.c_void_p\r\n\tlexillaAvailable = True\r\n\tprint(\"Found Lexilla\")\r\nexcept OSError:\r\n\tprint(\"Can't find \" + lexName)\r\n\tprint(\"Python is built for \" + \" \".join(platform.architecture()))\r\n\r\nWFUNC = ctypes.WINFUNCTYPE(c_int, HWND, c_uint, WPARAM, LPARAM)\r\n\r\nWS_CHILD = 0x40000000\r\nWS_CLIPCHILDREN = 0x2000000\r\nWS_OVERLAPPEDWINDOW = 0xcf0000\r\nWS_VISIBLE = 0x10000000\r\nWS_HSCROLL = 0x100000\r\nWS_VSCROLL = 0x200000\r\nWA_INACTIVE = 0\r\nMF_POPUP = 16\r\nMF_SEPARATOR = 0x800\r\nIDYES = 6\r\nOFN_HIDEREADONLY = 4\r\nMB_OK = 0\r\nMB_YESNOCANCEL = 3\r\nMF_CHECKED = 8\r\nMF_UNCHECKED = 0\r\nSW_SHOW = 5\r\nPM_REMOVE = 1\r\n\r\nVK_SHIFT = 16\r\nVK_CONTROL = 17\r\nVK_MENU = 18\r\n\r\nclass OPENFILENAME(ctypes.Structure):\r\n\t_fields_ = ((\"lStructSize\", c_int),\r\n\t\t(\"hwndOwner\", c_int),\r\n\t\t(\"hInstance\", c_int),\r\n\t\t(\"lpstrFilter\", c_wchar_p),\r\n\t\t(\"lpstrCustomFilter\", c_char_p),\r\n\t\t(\"nMaxCustFilter\", c_int),\r\n\t\t(\"nFilterIndex\", c_int),\r\n\t\t(\"lpstrFile\", c_wchar_p),\r\n\t\t(\"nMaxFile\", c_int),\r\n\t\t(\"lpstrFileTitle\", c_wchar_p),\r\n\t\t(\"nMaxFileTitle\", c_int),\r\n\t\t(\"lpstrInitialDir\", c_wchar_p),\r\n\t\t(\"lpstrTitle\", c_wchar_p),\r\n\t\t(\"flags\", c_int),\r\n\t\t(\"nFileOffset\", c_ushort),\r\n\t\t(\"nFileExtension\", c_ushort),\r\n\t\t(\"lpstrDefExt\", c_char_p),\r\n\t\t(\"lCustData\", c_int),\r\n\t\t(\"lpfnHook\", c_char_p),\r\n\t\t(\"lpTemplateName\", c_char_p),\r\n\t\t(\"pvReserved\", c_char_p),\r\n\t\t(\"dwReserved\", c_int),\r\n\t\t(\"flagsEx\", c_int))\r\n\r\n\tdef __init__(self, win, title):\r\n\t\tctypes.Structure.__init__(self)\r\n\t\tself.lStructSize = ctypes.sizeof(OPENFILENAME)\r\n\t\tself.nMaxFile = 1024\r\n\t\tself.hwndOwner = win\r\n\t\tself.lpstrTitle = title\r\n\t\tself.Flags = OFN_HIDEREADONLY\r\n\r\ntrace = False\r\n#~ trace = True\r\n\r\ndef WindowSize(w):\r\n\trc = ctypes.wintypes.RECT()\r\n\tuser32.GetClientRect(w, ctypes.byref(rc))\r\n\treturn rc.right - rc.left, rc.bottom - rc.top\r\n\r\ndef IsKeyDown(key):\r\n\treturn (user32.GetKeyState(key) & 0x8000) != 0\r\n\r\ndef KeyTranslate(w):\r\n\ttr = { 9: \"Tab\", 0xD:\"Enter\", 0x1B: \"Esc\" }\r\n\tif w in tr:\r\n\t\treturn tr[w]\r\n\telif ord(\"A\") <= w <= ord(\"Z\"):\r\n\t\treturn chr(w)\r\n\telif 0x70 <= w <= 0x7b:\r\n\t\treturn \"F\" + str(w-0x70+1)\r\n\telse:\r\n\t\treturn \"Unknown_\" + hex(w)\r\n\r\nclass WNDCLASS(ctypes.Structure):\r\n\t_fields_= (\\\r\n\t\t('style', c_int),\r\n\t\t('lpfnWndProc', WFUNC),\r\n\t\t('cls_extra', c_int),\r\n\t\t('wnd_extra', c_int),\r\n\t\t('hInst', HANDLE),\r\n\t\t('hIcon', HANDLE),\r\n\t\t('hCursor', HANDLE),\r\n\t\t('hbrBackground', HBRUSH),\r\n\t\t('menu_name', LPCWSTR),\r\n\t\t('lpzClassName', LPCWSTR),\r\n\t)\r\n\r\nhinst = ctypes.windll.kernel32.GetModuleHandleW(0)\r\n\r\ndef RegisterClass(name, func, background = 0):\r\n\t# register a window class for toplevel windows.\r\n\twc = WNDCLASS()\r\n\twc.style = 0\r\n\twc.lpfnWndProc = func\r\n\twc.cls_extra = 0\r\n\twc.wnd_extra = 0\r\n\twc.hInst = hinst\r\n\twc.hIcon = 0\r\n\twc.hCursor = 0\r\n\twc.hbrBackground = background\r\n\twc.menu_name = None\r\n\twc.lpzClassName = name\r\n\tuser32.RegisterClassW(ctypes.byref(wc))\r\n\r\n\r\nclass XiteWin():\r\n\tdef __init__(self, test=\"\"):\r\n\t\tself.face = Face.Face()\r\n\t\tself.face.ReadFromFile(os.path.join(scintillaIncludeDirectory, \"Scintilla.iface\"))\r\n\t\ttry:\r\n\t\t\tfaceLex = Face.Face()\r\n\t\t\tfaceLex.ReadFromFile(os.path.join(lexillaIncludeDirectory, \"LexicalStyles.iface\"))\r\n\t\t\tself.face.features.update(faceLex.features)\r\n\t\texcept FileNotFoundError:\r\n\t\t\tprint(\"Can't find \" + \"LexicalStyles.iface\")\r\n\t\tif scintillaIncludesLexers:\r\n\t\t\tsciName = \"SciLexer.DLL\"\r\n\t\telse:\r\n\t\t\tsciName = \"Scintilla.DLL\"\r\n\t\ttry:\r\n\t\t\tscintillaDLLPath = os.path.join(scintillaBinDirectory, sciName)\r\n\t\t\tctypes.cdll.LoadLibrary(scintillaDLLPath)\r\n\t\texcept OSError:\r\n\t\t\tprint(\"Can't find \" + sciName)\r\n\t\t\tprint(\"Python is built for \" + \" \".join(platform.architecture()))\r\n\t\t\tsys.exit()\r\n\r\n\t\tself.titleDirty = True\r\n\t\tself.fullPath = \"\"\r\n\t\tself.test = test\r\n\r\n\t\tself.appName = \"xite\"\r\n\r\n\t\tself.large = \"-large\" in sys.argv\r\n\r\n\t\tself.cmds = {}\r\n\t\tself.windowName = \"XiteWindow\"\r\n\t\tself.wfunc = WFUNC(self.WndProc)\r\n\t\tRegisterClass(self.windowName, self.wfunc)\r\n\t\tuser32.CreateWindowExW(0, self.windowName, self.appName, \\\r\n\t\t\tWS_VISIBLE | WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN, \\\r\n\t\t\t0, 0, 500, 700, 0, 0, hinst, 0)\r\n\r\n\t\targs = [a for a in sys.argv[1:] if not a.startswith(\"-\")]\r\n\t\tself.SetMenus()\r\n\t\tif args:\r\n\t\t\tself.GrabFile(args[0])\r\n\t\t\tself.FocusOnEditor()\r\n\t\t\tself.ed.GotoPos(self.ed.Length)\r\n\r\n\t\tif self.test:\r\n\t\t\tprint(self.test)\r\n\t\t\tfor k in self.cmds:\r\n\t\t\t\tif self.cmds[k] == \"Test\":\r\n\t\t\t\t\tuser32.PostMessageW(self.win, msgs[\"WM_COMMAND\"], k, 0)\r\n\r\n\tdef FocusOnEditor(self):\r\n\t\tuser32.SetFocus(self.sciHwnd)\r\n\r\n\tdef OnSize(self):\r\n\t\twidth, height = WindowSize(self.win)\r\n\t\tuser32.SetWindowPos(self.sciHwnd, 0, 0, 0, width, height, 0)\r\n\t\tuser32.InvalidateRect(self.win, 0, 0)\r\n\r\n\tdef OnCreate(self, hwnd):\r\n\t\tself.win = hwnd\r\n\t\tself.sciHwnd = user32.CreateWindowExW(0,\r\n\t\t\t\"Scintilla\", \"Source\",\r\n\t\t\tWS_CHILD | WS_VSCROLL | WS_HSCROLL | WS_CLIPCHILDREN,\r\n\t\t\t0, 0, 100, 100, self.win, 0, hinst, 0)\r\n\t\tuser32.ShowWindow(self.sciHwnd, SW_SHOW)\r\n\t\tuser32.SendMessageW.restype = WPARAM\r\n\t\tscifn = user32.SendMessageW(self.sciHwnd,\r\n\t\t\tint(self.face.features[\"GetDirectFunction\"][\"Value\"], 0), 0,0)\r\n\t\tsciptr = c_char_p(user32.SendMessageW(self.sciHwnd,\r\n\t\t\tint(self.face.features[\"GetDirectPointer\"][\"Value\"], 0), 0,0))\r\n\t\tself.ed = ScintillaCallable.ScintillaCallable(self.face, scifn, sciptr)\r\n\t\tif self.large:\r\n\t\t\tdoc = self.ed.CreateDocument(10, 0x100)\r\n\t\t\tself.ed.SetDocPointer(0, doc)\r\n\r\n\t\tself.FocusOnEditor()\r\n\r\n\tdef ChooseLexer(self, lexer):\r\n\t\tif scintillaIncludesLexers:\r\n\t\t\tself.ed.LexerLanguage = lexer\r\n\t\telif lexillaAvailable:\r\n\t\t\tpLexilla = createLexer(lexer)\r\n\t\t\tself.ed.SetILexer(0, pLexilla)\r\n\t\telse:\t# No lexers available\r\n\t\t\tpass\r\n\r\n\tdef Invalidate(self):\r\n\t\tuser32.InvalidateRect(self.win, 0, 0)\r\n\r\n\tdef WndProc(self, h, m, wp, lp):\r\n\t\tuser32.DefWindowProcW.argtypes = [HWND, c_uint, WPARAM, LPARAM]\r\n\t\tms = sgsm.get(m, \"XXX\")\r\n\t\tif trace:\r\n\t\t\tprint(\"%s %s %s %s\" % (hex(h)[2:],ms,wp,lp))\r\n\t\tif ms == \"WM_CLOSE\":\r\n\t\t\tuser32.PostQuitMessage(0)\r\n\t\telif ms == \"WM_CREATE\":\r\n\t\t\tself.OnCreate(h)\r\n\t\t\treturn 0\r\n\t\telif ms == \"WM_SIZE\":\r\n\t\t\t# Work out size\r\n\t\t\tif wp != 1:\r\n\t\t\t\tself.OnSize()\r\n\t\t\treturn 0\r\n\t\telif ms == \"WM_COMMAND\":\r\n\t\t\tcmdCode = wp & 0xffff\r\n\t\t\tif cmdCode in self.cmds:\r\n\t\t\t\tself.Command(self.cmds[cmdCode])\r\n\t\t\treturn 0\r\n\t\telif ms == \"WM_ACTIVATE\":\r\n\t\t\tif wp != WA_INACTIVE:\r\n\t\t\t\tself.FocusOnEditor()\r\n\t\t\treturn 0\r\n\t\telse:\r\n\t\t\treturn user32.DefWindowProcW(h, m, wp, lp)\r\n\t\treturn 0\r\n\r\n\tdef Command(self, name):\r\n\t\tname = name.replace(\" \", \"\")\r\n\t\tmethod = \"Cmd\" + name\r\n\t\tcmd = None\r\n\t\ttry:\r\n\t\t\tcmd = getattr(self, method)\r\n\t\texcept AttributeError:\r\n\t\t\treturn\r\n\t\tif cmd:\r\n\t\t\tcmd()\r\n\r\n\tdef KeyDown(self, w, prefix = \"\"):\r\n\t\tkeyName = prefix\r\n\t\tif IsKeyDown(VK_CONTROL):\r\n\t\t\tkeyName += \"<control>\"\r\n\t\tif IsKeyDown(VK_SHIFT):\r\n\t\t\tkeyName += \"<shift>\"\r\n\t\tkeyName += KeyTranslate(w)\r\n\t\tif trace:\r\n\t\t\tprint(\"Key:\", keyName)\r\n\t\tif keyName in self.keys:\r\n\t\t\tmethod = \"Cmd\" + self.keys[keyName]\r\n\t\t\tgetattr(self, method)()\r\n\t\t\treturn True\r\n\t\t#~ print(\"UKey:\", keyName)\r\n\t\treturn False\r\n\r\n\tdef Accelerator(self, msg):\r\n\t\tms = sgsm.get(msg.message, \"XXX\")\r\n\t\tif ms == \"WM_KEYDOWN\":\r\n\t\t\treturn self.KeyDown(msg.wParam)\r\n\t\telif ms == \"WM_SYSKEYDOWN\":\r\n\t\t\treturn self.KeyDown(msg.wParam, \"<alt>\")\r\n\t\treturn False\r\n\r\n\tdef AppLoop(self):\r\n\t\tmsg = ctypes.wintypes.MSG()\r\n\t\tlpmsg = ctypes.byref(msg)\r\n\t\twhile user32.GetMessageW(lpmsg, 0, 0, 0):\r\n\t\t\tif trace and msg.message != msgs[\"WM_TIMER\"]:\r\n\t\t\t\tprint('mm', hex(msg.hWnd)[2:],sgsm.get(msg.message, \"XXX\"))\r\n\t\t\tif not self.Accelerator(msg):\r\n\t\t\t\tuser32.TranslateMessage(lpmsg)\r\n\t\t\t\tuser32.DispatchMessageW(lpmsg)\r\n\r\n\tdef DoEvents(self):\r\n\t\tmsg = ctypes.wintypes.MSG()\r\n\t\tlpmsg = ctypes.byref(msg)\r\n\t\tcont = True\r\n\t\twhile cont:\r\n\t\t\tcont = user32.PeekMessageW(lpmsg, 0, 0, 0, PM_REMOVE)\r\n\t\t\tif cont:\r\n\t\t\t\tif not self.Accelerator(msg):\r\n\t\t\t\t\tuser32.TranslateMessage(lpmsg)\r\n\t\t\t\t\tuser32.DispatchMessageW(lpmsg)\r\n\r\n\tdef SetTitle(self, changePath):\r\n\t\tif changePath or self.titleDirty != self.ed.Modify:\r\n\t\t\tself.titleDirty = self.ed.Modify\r\n\t\t\tself.title = self.fullPath\r\n\t\t\tif self.titleDirty:\r\n\t\t\t\tself.title += \" * \"\r\n\t\t\telse:\r\n\t\t\t\tself.title += \" - \"\r\n\t\t\tself.title += self.appName\r\n\t\t\tif self.win:\r\n\t\t\t\tuser32.SetWindowTextW(self.win, self.title)\r\n\r\n\tdef Open(self):\r\n\t\tofx = OPENFILENAME(self.win, \"Open File\")\r\n\t\topath = ctypes.create_unicode_buffer(1024)\r\n\t\tofx.lpstrFile = ctypes.addressof(opath)\r\n\t\tfilters = [\"Python (.py;.pyw)|*.py;*.pyw|All|*.*\"]\r\n\t\tfilterText = \"\\0\".join([f.replace(\"|\", \"\\0\") for f in filters])+\"\\0\\0\"\r\n\t\tofx.lpstrFilter = filterText\r\n\t\tif ctypes.windll.comdlg32.GetOpenFileNameW(ctypes.byref(ofx)):\r\n\t\t\tabsPath = opath.value.replace(\"\\0\", \"\")\r\n\t\t\tself.GrabFile(absPath)\r\n\t\t\tself.FocusOnEditor()\r\n\t\t\tself.ed.LexerLanguage = b\"python\"\r\n\t\t\tself.ed.Lexer = self.ed.SCLEX_PYTHON\r\n\t\t\tself.ed.SetKeyWords(0, b\"class def else for from if import print return while\")\r\n\t\t\tfor style in [k for k in self.ed.k if k.startswith(\"SCE_P_\")]:\r\n\t\t\t\tself.ed.StyleSetFont(self.ed.k[style], b\"Verdana\")\r\n\t\t\t\tif \"COMMENT\" in style:\r\n\t\t\t\t\tself.ed.StyleSetFore(self.ed.k[style], 127 * 256)\r\n\t\t\t\t\tself.ed.StyleSetFont(self.ed.k[style], b\"Comic Sans MS\")\r\n\t\t\t\telif \"OPERATOR\" in style:\r\n\t\t\t\t\tself.ed.StyleSetBold(self.ed.k[style], 1)\r\n\t\t\t\t\tself.ed.StyleSetFore(self.ed.k[style], 127 * 256 * 256)\r\n\t\t\t\telif \"WORD\" in style:\r\n\t\t\t\t\tself.ed.StyleSetItalic(self.ed.k[style], 255)\r\n\t\t\t\t\tself.ed.StyleSetFore(self.ed.k[style], 255 * 256 * 256)\r\n\t\t\t\telif \"TRIPLE\" in style:\r\n\t\t\t\t\tself.ed.StyleSetFore(self.ed.k[style], 0xA0A0)\r\n\t\t\t\telif \"STRING\" in style or \"CHARACTER\" in style:\r\n\t\t\t\t\tself.ed.StyleSetFore(self.ed.k[style], 0xA000A0)\r\n\t\t\t\telse:\r\n\t\t\t\t\tself.ed.StyleSetFore(self.ed.k[style], 0)\r\n\r\n\tdef SaveAs(self):\r\n\t\tofx = OPENFILENAME(self.win, \"Save File\")\r\n\t\topath = \"\\0\" * 1024\r\n\t\tofx.lpstrFile = opath\r\n\t\tif ctypes.windll.comdlg32.GetSaveFileNameW(ctypes.byref(ofx)):\r\n\t\t\tself.fullPath = opath.replace(\"\\0\", \"\")\r\n\t\t\tself.Save()\r\n\t\t\tself.SetTitle(1)\r\n\t\t\tself.FocusOnEditor()\r\n\r\n\tdef SetMenus(self):\r\n\t\tui = XiteMenu.MenuStructure\r\n\t\tself.cmds = {}\r\n\t\tself.keys = {}\r\n\r\n\t\tcmdId = 0\r\n\t\tself.menuBar = user32.CreateMenu()\r\n\t\tfor name, contents in ui:\r\n\t\t\tcmdId += 1\r\n\t\t\tmenu = user32.CreateMenu()\r\n\t\t\tfor item in contents:\r\n\t\t\t\ttext, key = item\r\n\t\t\t\tcmdText = text.replace(\"&\", \"\")\r\n\t\t\t\tcmdText = cmdText.replace(\"...\", \"\")\r\n\t\t\t\tcmdText = cmdText.replace(\" \", \"\")\r\n\t\t\t\tcmdId += 1\r\n\t\t\t\tif key:\r\n\t\t\t\t\tkeyText = key.replace(\"<control>\", \"Ctrl+\")\r\n\t\t\t\t\tkeyText = keyText.replace(\"<shift>\", \"Shift+\")\r\n\t\t\t\t\ttext += \"\\t\" + keyText\r\n\t\t\t\tif text == \"-\":\r\n\t\t\t\t\tuser32.AppendMenuW(menu, MF_SEPARATOR, cmdId, text)\r\n\t\t\t\telse:\r\n\t\t\t\t\tuser32.AppendMenuW(menu, 0, cmdId, text)\r\n\t\t\t\tself.cmds[cmdId] = cmdText\r\n\t\t\t\tself.keys[key] = cmdText\r\n\t\t\t\t#~ print(cmdId, item)\r\n\t\t\tuser32.AppendMenuW(self.menuBar, MF_POPUP, menu, name)\r\n\t\tuser32.SetMenu(self.win, self.menuBar)\r\n\t\tself.CheckMenuItem(\"Wrap\", True)\r\n\t\tuser32.ShowWindow(self.win, SW_SHOW)\r\n\r\n\tdef CheckMenuItem(self, name, val):\r\n\t\t#~ print(name, val)\r\n\t\tif self.cmds:\r\n\t\t\tfor k,v in self.cmds.items():\r\n\t\t\t\tif v == name:\r\n\t\t\t\t\t#~ print(name, k)\r\n\t\t\t\t\tuser32.CheckMenuItem(user32.GetMenu(self.win), \\\r\n\t\t\t\t\t\tk, [MF_UNCHECKED, MF_CHECKED][val])\r\n\r\n\tdef Exit(self):\r\n\t\tsys.exit(0)\r\n\r\n\tdef DisplayMessage(self, msg, ask):\r\n\t\treturn IDYES == user32.MessageBoxW(self.win, \\\r\n\t\t\tmsg, self.appName, [MB_OK, MB_YESNOCANCEL][ask])\r\n\r\n\tdef NewDocument(self):\r\n\t\tself.ed.ClearAll()\r\n\t\tself.ed.EmptyUndoBuffer()\r\n\t\tself.ed.SetSavePoint()\r\n\r\n\tdef SaveIfUnsure(self):\r\n\t\tif self.ed.Modify:\r\n\t\t\tmsg = \"Save changes to \\\"\" + self.fullPath + \"\\\"?\"\r\n\t\t\tprint(msg)\r\n\t\t\tdecision = self.DisplayMessage(msg, True)\r\n\t\t\tif decision:\r\n\t\t\t\tself.CmdSave()\r\n\t\t\treturn decision\r\n\t\treturn True\r\n\r\n\tdef New(self):\r\n\t\tif self.SaveIfUnsure():\r\n\t\t\tself.fullPath = \"\"\r\n\t\t\tself.overrideMode = None\r\n\t\t\tself.NewDocument()\r\n\t\t\tself.SetTitle(1)\r\n\t\tself.Invalidate()\r\n\r\n\tdef CheckMenus(self):\r\n\t\tpass\r\n\r\n\tdef MoveSelection(self, caret, anchor=-1):\r\n\t\tif anchor == -1:\r\n\t\t\tanchor = caret\r\n\t\tself.ed.SetSelectionStart(caret)\r\n\t\tself.ed.SetSelectionEnd(anchor)\r\n\t\tself.ed.ScrollCaret()\r\n\t\tself.Invalidate()\r\n\r\n\tdef GrabFile(self, name):\r\n\t\tself.fullPath = name\r\n\t\tself.overrideMode = None\r\n\t\tself.NewDocument()\r\n\t\tfsr = open(name, \"rb\")\r\n\t\tdata = fsr.read()\r\n\t\tfsr.close()\r\n\t\tself.ed.AddText(len(data), data)\r\n\t\tself.ed.EmptyUndoBuffer()\r\n\t\tself.MoveSelection(0)\r\n\t\tself.SetTitle(1)\r\n\r\n\tdef Save(self):\r\n\t\tfos = open(self.fullPath, \"wb\")\r\n\t\tblockSize = 1024\r\n\t\tlength = self.ed.Length\r\n\t\ti = 0\r\n\t\twhile i < length:\r\n\t\t\tgrabSize = length - i\r\n\t\t\tif grabSize > blockSize:\r\n\t\t\t\tgrabSize = blockSize\r\n\t\t\t#~ print(i, grabSize, length)\r\n\t\t\tdata = self.ed.ByteRange(i, i + grabSize)\r\n\t\t\tfos.write(data)\r\n\t\t\ti += grabSize\r\n\t\tfos.close()\r\n\t\tself.ed.SetSavePoint()\r\n\t\tself.SetTitle(0)\r\n\r\n\t# Command handlers are called by menu actions\r\n\r\n\tdef CmdNew(self):\r\n\t\tself.New()\r\n\r\n\tdef CmdOpen(self):\r\n\t\tself.Open()\r\n\r\n\tdef CmdSave(self):\r\n\t\tif (self.fullPath is None) or (len(self.fullPath) == 0):\r\n\t\t\tself.SaveAs()\r\n\t\telse:\r\n\t\t\tself.Save()\r\n\r\n\tdef CmdSaveAs(self):\r\n\t\tself.SaveAs()\r\n\r\n\tdef CmdTest(self):\r\n\t\trunner = unittest.TextTestRunner()\r\n\t\tif self.test:\r\n\t\t\ttests = unittest.defaultTestLoader.loadTestsFromName(self.test)\r\n\t\telse:\r\n\t\t\ttests = unittest.defaultTestLoader.loadTestsFromName(\"simpleTests\")\r\n\t\tresults = runner.run(tests)\r\n\t\t#~ print(results)\r\n\t\tif self.test:\r\n\t\t\tuser32.PostQuitMessage(0)\r\n\r\n\tdef CmdExercised(self):\r\n\t\tprint()\r\n\t\tunused = sorted(self.ed.all.difference(self.ed.used))\r\n\t\tprint(\"Unused\", len(unused))\r\n\t\tprint()\r\n\t\tprint(\"\\n\".join(unused))\r\n\t\tprint()\r\n\t\tprint(\"Used\", len(self.ed.used))\r\n\t\tprint()\r\n\t\tprint(\"\\n\".join(sorted(self.ed.used)))\r\n\r\n\tdef Uncalled(self):\r\n\t\tprint(\"\")\r\n\t\tunused = sorted(self.ed.all.difference(self.ed.used))\r\n\t\tuu = {}\r\n\t\tfor u in unused:\r\n\t\t\tv = self.ed.getvalue(u)\r\n\t\t\tif v > 2000:\r\n\t\t\t\tuu[v] = u\r\n\t\t#~ for x in sorted(uu.keys())[150:]:\r\n\t\treturn uu\r\n\r\n\tdef CmdExit(self):\r\n\t\tself.Exit()\r\n\r\n\tdef CmdUndo(self):\r\n\t\tself.ed.Undo()\r\n\r\n\tdef CmdRedo(self):\r\n\t\tself.ed.Redo()\r\n\r\n\tdef CmdCut(self):\r\n\t\tself.ed.Cut()\r\n\r\n\tdef CmdCopy(self):\r\n\t\tself.ed.Copy()\r\n\r\n\tdef CmdPaste(self):\r\n\t\tself.ed.Paste()\r\n\r\n\tdef CmdDelete(self):\r\n\t\tself.ed.Clear()\r\n\r\nxiteFrame = None\r\n\r\ndef main(test):\r\n\tglobal xiteFrame\r\n\txiteFrame = XiteWin(test)\r\n\txiteFrame.AppLoop()\r\n\t#~ xiteFrame.CmdExercised()\r\n\treturn xiteFrame.Uncalled()\r\n"
  },
  {
    "path": "scintilla/test/gi/Scintilla-0.1.gir.good",
    "content": "<?xml version=\"1.0\"?>\n<!-- This file was automatically generated from C sources - DO NOT EDIT!\nTo affect the contents of this file, edit the original C definitions,\nand/or use gtk-doc annotations.  -->\n<repository version=\"1.2\"\n            xmlns=\"http://www.gtk.org/introspection/core/1.0\"\n            xmlns:c=\"http://www.gtk.org/introspection/c/1.0\"\n            xmlns:glib=\"http://www.gtk.org/introspection/glib/1.0\">\n  <include name=\"Gtk\" version=\"3.0\"/>\n  <c:include name=\"Scintilla.h\"/>\n  <c:include name=\"ScintillaWidget.h\"/>\n  <namespace name=\"Scintilla\"\n             version=\"0.1\"\n             shared-library=\"libscintilla.so\"\n             c:identifier-prefixes=\"Scintilla\"\n             c:symbol-prefixes=\"scintilla\">\n    <alias name=\"Sci_Position\" c:type=\"Sci_Position\">\n      <type name=\"gint\" c:type=\"int\"/>\n    </alias>\n    <alias name=\"Sci_PositionCR\" c:type=\"Sci_PositionCR\">\n      <type name=\"glong\" c:type=\"long\"/>\n    </alias>\n    <alias name=\"Sci_PositionU\" c:type=\"Sci_PositionU\">\n      <type name=\"guint\" c:type=\"unsigned int\"/>\n    </alias>\n    <alias name=\"Sci_SurfaceID\" c:type=\"Sci_SurfaceID\">\n      <type name=\"gpointer\" c:type=\"gpointer\"/>\n    </alias>\n    <alias name=\"sptr_t\" c:type=\"sptr_t\">\n      <type name=\"glong\" c:type=\"long\"/>\n    </alias>\n    <alias name=\"uptr_t\" c:type=\"uptr_t\">\n      <type name=\"gulong\" c:type=\"unsigned long\"/>\n    </alias>\n    <constant name=\"NOTIFY\" value=\"sci-notify\" c:type=\"SCINTILLA_NOTIFY\">\n      <type name=\"utf8\" c:type=\"gchar*\"/>\n    </constant>\n    <class name=\"Object\"\n           c:symbol-prefix=\"object\"\n           c:type=\"ScintillaObject\"\n           parent=\"Gtk.Container\"\n           glib:type-name=\"ScintillaObject\"\n           glib:get-type=\"scintilla_object_get_type\"\n           glib:type-struct=\"ObjectClass\">\n      <implements name=\"Atk.ImplementorIface\"/>\n      <implements name=\"Gtk.Buildable\"/>\n      <constructor name=\"new\" c:identifier=\"scintilla_object_new\">\n        <return-value transfer-ownership=\"none\">\n          <type name=\"Gtk.Widget\" c:type=\"GtkWidget*\"/>\n        </return-value>\n      </constructor>\n      <virtual-method name=\"command\">\n        <return-value transfer-ownership=\"none\">\n          <type name=\"none\" c:type=\"void\"/>\n        </return-value>\n        <parameters>\n          <instance-parameter name=\"sci\" transfer-ownership=\"none\">\n            <type name=\"Object\" c:type=\"ScintillaObject*\"/>\n          </instance-parameter>\n          <parameter name=\"cmd\" transfer-ownership=\"none\">\n            <type name=\"gint\" c:type=\"int\"/>\n          </parameter>\n          <parameter name=\"window\" transfer-ownership=\"none\">\n            <type name=\"Gtk.Widget\" c:type=\"GtkWidget*\"/>\n          </parameter>\n        </parameters>\n      </virtual-method>\n      <virtual-method name=\"notify\">\n        <return-value transfer-ownership=\"none\">\n          <type name=\"none\" c:type=\"void\"/>\n        </return-value>\n        <parameters>\n          <instance-parameter name=\"sci\" transfer-ownership=\"none\">\n            <type name=\"Object\" c:type=\"ScintillaObject*\"/>\n          </instance-parameter>\n          <parameter name=\"id\" transfer-ownership=\"none\">\n            <type name=\"gint\" c:type=\"int\"/>\n          </parameter>\n          <parameter name=\"scn\" transfer-ownership=\"none\">\n            <type name=\"SCNotification\" c:type=\"SCNotification*\"/>\n          </parameter>\n        </parameters>\n      </virtual-method>\n      <method name=\"send_message\" c:identifier=\"scintilla_object_send_message\">\n        <return-value transfer-ownership=\"none\">\n          <type name=\"gintptr\" c:type=\"gintptr\"/>\n        </return-value>\n        <parameters>\n          <instance-parameter name=\"sci\" transfer-ownership=\"none\">\n            <type name=\"Object\" c:type=\"ScintillaObject*\"/>\n          </instance-parameter>\n          <parameter name=\"iMessage\" transfer-ownership=\"none\">\n            <type name=\"guint\" c:type=\"unsigned int\"/>\n          </parameter>\n          <parameter name=\"wParam\" transfer-ownership=\"none\">\n            <type name=\"guintptr\" c:type=\"guintptr\"/>\n          </parameter>\n          <parameter name=\"lParam\" transfer-ownership=\"none\">\n            <type name=\"gintptr\" c:type=\"gintptr\"/>\n          </parameter>\n        </parameters>\n      </method>\n      <field name=\"cont\">\n        <type name=\"Gtk.Container\" c:type=\"GtkContainer\"/>\n      </field>\n      <field name=\"pscin\">\n        <type name=\"gpointer\" c:type=\"void*\"/>\n      </field>\n      <glib:signal name=\"command\" when=\"last\" action=\"1\">\n        <return-value transfer-ownership=\"none\">\n          <type name=\"none\" c:type=\"void\"/>\n        </return-value>\n        <parameters>\n          <parameter name=\"object\" transfer-ownership=\"none\">\n            <type name=\"gint\" c:type=\"gint\"/>\n          </parameter>\n          <parameter name=\"p0\" transfer-ownership=\"none\">\n            <type name=\"Gtk.Widget\"/>\n          </parameter>\n        </parameters>\n      </glib:signal>\n      <glib:signal name=\"sci-notify\" when=\"last\" action=\"1\">\n        <return-value transfer-ownership=\"none\">\n          <type name=\"none\" c:type=\"void\"/>\n        </return-value>\n        <parameters>\n          <parameter name=\"object\" transfer-ownership=\"none\">\n            <type name=\"gint\" c:type=\"gint\"/>\n          </parameter>\n          <parameter name=\"p0\" transfer-ownership=\"none\">\n            <type name=\"SCNotification\"/>\n          </parameter>\n        </parameters>\n      </glib:signal>\n    </class>\n    <record name=\"ObjectClass\"\n            c:type=\"ScintillaObjectClass\"\n            glib:is-gtype-struct-for=\"Object\">\n      <field name=\"parent_class\">\n        <type name=\"Gtk.ContainerClass\" c:type=\"GtkContainerClass\"/>\n      </field>\n      <field name=\"command\">\n        <callback name=\"command\">\n          <return-value transfer-ownership=\"none\">\n            <type name=\"none\" c:type=\"void\"/>\n          </return-value>\n          <parameters>\n            <parameter name=\"sci\" transfer-ownership=\"none\">\n              <type name=\"Object\" c:type=\"ScintillaObject*\"/>\n            </parameter>\n            <parameter name=\"cmd\" transfer-ownership=\"none\">\n              <type name=\"gint\" c:type=\"int\"/>\n            </parameter>\n            <parameter name=\"window\" transfer-ownership=\"none\">\n              <type name=\"Gtk.Widget\" c:type=\"GtkWidget*\"/>\n            </parameter>\n          </parameters>\n        </callback>\n      </field>\n      <field name=\"notify\">\n        <callback name=\"notify\">\n          <return-value transfer-ownership=\"none\">\n            <type name=\"none\" c:type=\"void\"/>\n          </return-value>\n          <parameters>\n            <parameter name=\"sci\" transfer-ownership=\"none\">\n              <type name=\"Object\" c:type=\"ScintillaObject*\"/>\n            </parameter>\n            <parameter name=\"id\" transfer-ownership=\"none\">\n              <type name=\"gint\" c:type=\"int\"/>\n            </parameter>\n            <parameter name=\"scn\" transfer-ownership=\"none\">\n              <type name=\"SCNotification\" c:type=\"SCNotification*\"/>\n            </parameter>\n          </parameters>\n        </callback>\n      </field>\n    </record>\n    <record name=\"SCNotification\"\n            c:type=\"SCNotification\"\n            glib:type-name=\"SCNotification\"\n            glib:get-type=\"scnotification_get_type\"\n            c:symbol-prefix=\"scnotification\">\n      <field name=\"nmhdr\" writable=\"1\">\n        <type name=\"Sci_NotifyHeader\" c:type=\"Sci_NotifyHeader\"/>\n      </field>\n      <field name=\"position\" writable=\"1\">\n        <type name=\"Sci_Position\" c:type=\"Sci_Position\"/>\n      </field>\n      <field name=\"ch\" writable=\"1\">\n        <type name=\"gint\" c:type=\"int\"/>\n      </field>\n      <field name=\"modifiers\" writable=\"1\">\n        <type name=\"gint\" c:type=\"int\"/>\n      </field>\n      <field name=\"modificationType\" writable=\"1\">\n        <type name=\"gint\" c:type=\"int\"/>\n      </field>\n      <field name=\"text\" writable=\"1\">\n        <type name=\"utf8\" c:type=\"const char*\"/>\n      </field>\n      <field name=\"length\" writable=\"1\">\n        <type name=\"Sci_Position\" c:type=\"Sci_Position\"/>\n      </field>\n      <field name=\"linesAdded\" writable=\"1\">\n        <type name=\"Sci_Position\" c:type=\"Sci_Position\"/>\n      </field>\n      <field name=\"message\" writable=\"1\">\n        <type name=\"gint\" c:type=\"int\"/>\n      </field>\n      <field name=\"wParam\" writable=\"1\">\n        <type name=\"uptr_t\" c:type=\"uptr_t\"/>\n      </field>\n      <field name=\"lParam\" writable=\"1\">\n        <type name=\"sptr_t\" c:type=\"sptr_t\"/>\n      </field>\n      <field name=\"line\" writable=\"1\">\n        <type name=\"Sci_Position\" c:type=\"Sci_Position\"/>\n      </field>\n      <field name=\"foldLevelNow\" writable=\"1\">\n        <type name=\"gint\" c:type=\"int\"/>\n      </field>\n      <field name=\"foldLevelPrev\" writable=\"1\">\n        <type name=\"gint\" c:type=\"int\"/>\n      </field>\n      <field name=\"margin\" writable=\"1\">\n        <type name=\"gint\" c:type=\"int\"/>\n      </field>\n      <field name=\"listType\" writable=\"1\">\n        <type name=\"gint\" c:type=\"int\"/>\n      </field>\n      <field name=\"x\" writable=\"1\">\n        <type name=\"gint\" c:type=\"int\"/>\n      </field>\n      <field name=\"y\" writable=\"1\">\n        <type name=\"gint\" c:type=\"int\"/>\n      </field>\n      <field name=\"token\" writable=\"1\">\n        <type name=\"gint\" c:type=\"int\"/>\n      </field>\n      <field name=\"annotationLinesAdded\" writable=\"1\">\n        <type name=\"Sci_Position\" c:type=\"Sci_Position\"/>\n      </field>\n      <field name=\"updated\" writable=\"1\">\n        <type name=\"gint\" c:type=\"int\"/>\n      </field>\n      <field name=\"listCompletionMethod\" writable=\"1\">\n        <type name=\"gint\" c:type=\"int\"/>\n      </field>\n    </record>\n    <callback name=\"SciFnDirect\">\n      <return-value transfer-ownership=\"none\">\n        <type name=\"sptr_t\" c:type=\"sptr_t\"/>\n      </return-value>\n      <parameters>\n        <parameter name=\"ptr\" transfer-ownership=\"none\">\n          <type name=\"sptr_t\" c:type=\"sptr_t\"/>\n        </parameter>\n        <parameter name=\"iMessage\" transfer-ownership=\"none\">\n          <type name=\"guint\" c:type=\"unsigned int\"/>\n        </parameter>\n        <parameter name=\"wParam\" transfer-ownership=\"none\">\n          <type name=\"uptr_t\" c:type=\"uptr_t\"/>\n        </parameter>\n        <parameter name=\"lParam\" transfer-ownership=\"none\">\n          <type name=\"sptr_t\" c:type=\"sptr_t\"/>\n        </parameter>\n      </parameters>\n    </callback>\n    <record name=\"Sci_CharacterRange\" c:type=\"Sci_CharacterRange\">\n      <field name=\"cpMin\" writable=\"1\">\n        <type name=\"Sci_PositionCR\" c:type=\"Sci_PositionCR\"/>\n      </field>\n      <field name=\"cpMax\" writable=\"1\">\n        <type name=\"Sci_PositionCR\" c:type=\"Sci_PositionCR\"/>\n      </field>\n    </record>\n    <record name=\"Sci_NotifyHeader\" c:type=\"Sci_NotifyHeader\">\n      <field name=\"hwndFrom\" writable=\"1\">\n        <type name=\"gpointer\" c:type=\"void*\"/>\n      </field>\n      <field name=\"idFrom\" writable=\"1\">\n        <type name=\"uptr_t\" c:type=\"uptr_t\"/>\n      </field>\n      <field name=\"code\" writable=\"1\">\n        <type name=\"guint\" c:type=\"unsigned\"/>\n      </field>\n    </record>\n    <record name=\"Sci_RangeToFormat\" c:type=\"Sci_RangeToFormat\">\n      <field name=\"hdc\" writable=\"1\">\n        <type name=\"Sci_SurfaceID\" c:type=\"Sci_SurfaceID\"/>\n      </field>\n      <field name=\"hdcTarget\" writable=\"1\">\n        <type name=\"Sci_SurfaceID\" c:type=\"Sci_SurfaceID\"/>\n      </field>\n      <field name=\"rc\" writable=\"1\">\n        <type name=\"gpointer\" c:type=\"Sci_Rectangle\"/>\n      </field>\n      <field name=\"rcPage\" writable=\"1\">\n        <type name=\"gpointer\" c:type=\"Sci_Rectangle\"/>\n      </field>\n      <field name=\"chrg\" writable=\"1\">\n        <type name=\"gpointer\" c:type=\"Sci_CharacterRange\"/>\n      </field>\n    </record>\n    <record name=\"Sci_Rectangle\" c:type=\"Sci_Rectangle\">\n      <field name=\"left\" writable=\"1\">\n        <type name=\"gint\" c:type=\"int\"/>\n      </field>\n      <field name=\"top\" writable=\"1\">\n        <type name=\"gint\" c:type=\"int\"/>\n      </field>\n      <field name=\"right\" writable=\"1\">\n        <type name=\"gint\" c:type=\"int\"/>\n      </field>\n      <field name=\"bottom\" writable=\"1\">\n        <type name=\"gint\" c:type=\"int\"/>\n      </field>\n    </record>\n    <record name=\"Sci_TextRange\" c:type=\"Sci_TextRange\">\n      <field name=\"chrg\" writable=\"1\">\n        <type name=\"gpointer\" c:type=\"Sci_CharacterRange\"/>\n      </field>\n      <field name=\"lpstrText\" writable=\"1\">\n        <type name=\"utf8\" c:type=\"char*\"/>\n      </field>\n    </record>\n    <record name=\"Sci_TextToFind\" c:type=\"Sci_TextToFind\">\n      <field name=\"chrg\" writable=\"1\">\n        <type name=\"gpointer\" c:type=\"Sci_CharacterRange\"/>\n      </field>\n      <field name=\"lpstrText\" writable=\"1\">\n        <type name=\"utf8\" c:type=\"const char*\"/>\n      </field>\n      <field name=\"chrgText\" writable=\"1\">\n        <type name=\"gpointer\" c:type=\"Sci_CharacterRange\"/>\n      </field>\n    </record>\n    <function name=\"Scintilla_LinkLexers\" c:identifier=\"Scintilla_LinkLexers\">\n      <return-value transfer-ownership=\"none\">\n        <type name=\"gint\" c:type=\"int\"/>\n      </return-value>\n    </function>\n  </namespace>\n</repository>\n"
  },
  {
    "path": "scintilla/test/gi/filter-scintilla-h.py",
    "content": "#!/usr/bin/env python\r\n# Filters Scintilla.h to not contain generated stuff or deprecated defines\r\n\r\nimport sys\r\nimport fileinput\r\n\r\ndef main():\r\n    inhibit = 0\r\n    for line in fileinput.input():\r\n        if line.startswith(\"/* ++Autogenerated\") or line.startswith(\"#ifdef INCLUDE_DEPRECATED_FEATURES\"):\r\n            inhibit += 1\r\n        if inhibit == 0:\r\n            sys.stdout.write(line)\r\n        if line.startswith(\"/* --Autogenerated\") or line.startswith(\"#endif\"):\r\n            if (inhibit > 0):\r\n                inhibit -= 1\r\n\r\nif __name__ == \"__main__\":\r\n    main()\r\n"
  },
  {
    "path": "scintilla/test/gi/gi-test.py",
    "content": "#!/usr/bin/python\r\nimport gi\r\ngi.require_version('Scintilla', '0.1')\r\n\r\n# Scintilla is imported before because it loads Gtk with a specified version\r\n# this avoids a warning when Gtk is imported without version such as below (where\r\n# it is imported without because this script works with gtk2 and gtk3)\r\nfrom gi.repository import Scintilla\r\nfrom gi.repository import Gtk\r\n\r\ndef on_notify(sci, id, scn):\r\n    if (scn.nmhdr.code == 2001): # SCN_CHARADDED\r\n        print (\"sci-notify: id: %d, char added: %d\" % (id, scn.ch))\r\n    elif (scn.nmhdr.code == 2008): # SCN_MODIFIED\r\n        print (\"sci-notify: id: %d, pos: %d, mod type: %d\" % (id, scn.position, scn.modificationType))\r\n    else:\r\n        print (\"sci-notify: id: %d, scn.nmhdr.code: %d\" % (id, scn.nmhdr.code))\r\n\r\nwin = Gtk.Window()\r\nwin.connect(\"delete-event\", Gtk.main_quit)\r\nsci = Scintilla.Object()\r\nsci.connect(\"sci-notify\", on_notify)\r\nwin.add(sci)\r\nwin.show_all()\r\nwin.resize(400,300)\r\nGtk.main()\r\n"
  },
  {
    "path": "scintilla/test/gi/makefile",
    "content": "# Build gir and test\r\n# For Ubuntu, these may be needed:\r\n#     apt-get install gobject-introspection\r\n#     apt-get install libgirepository1.0-dev\r\nall: Scintilla-0.1.typelib\r\n\r\nifdef GTK3\r\nGTKVERSION=3.0\r\nelse\r\nGTKVERSION=2.0\r\nendif\r\n\r\nGI_SCANNER = g-ir-scanner\r\nGI_COMPILER = g-ir-compiler\r\nGTK_LIBS = $(shell pkg-config --libs gtk+-$(GTKVERSION))\r\nGTK_CFLAGS = $(shell pkg-config --cflags gtk+-$(GTKVERSION))\r\nPWD = $(shell pwd)\r\n\r\n.PHONY: test clean FORCE\r\n\r\n../../bin/scintilla.a: FORCE\r\n\t$(MAKE) -C ../../gtk all\r\n\r\nScintilla-filtered.h: ../../include/Scintilla.h\r\n\tpython filter-scintilla-h.py $< > $@\r\n\r\nlibscintilla.so: ../../bin/scintilla.a\r\n\t$(CXX) -shared -o $@ -Wl,--whole-archive $^ -Wl,--no-whole-archive $(GTK_LIBS)\r\n\r\nScintilla-0.1.gir: libscintilla.so Scintilla-filtered.h\r\n\tLDFLAGS=-Wl,-rpath=$(shell pwd) \\\r\n\t\t$(GI_SCANNER) --no-libtool --warn-all -i Gtk-$(GTKVERSION) -DG_IR_SCANNING -DGTK \\\r\n\t\t--cflags-begin $(GTK_CFLAGS) -include gtk/gtk.h \\\r\n\t\t-include Scintilla-filtered.h -I../../include --cflags-end \\\r\n\t\t--accept-unprefixed \\\r\n\t\t--c-include Scintilla.h --c-include ScintillaWidget.h \\\r\n\t\t-n Scintilla --nsversion 0.1 --library scintilla -L$(PWD) \\\r\n\t\t../../include/Sci_Position.h ../../include/ScintillaWidget.h Scintilla-filtered.h \\\r\n\t\t-o $@\r\n\r\nScintilla-0.1.typelib: Scintilla-0.1.gir\r\n\t$(GI_COMPILER) $^ -o $@\r\n\r\nclean:\r\n\trm -f libscintilla.so Scintilla-0.1.gir Scintilla-0.1.typelib Scintilla-filtered.h\r\n\t$(MAKE) -C ../../gtk clean\r\n\r\ntest: Scintilla-0.1.gir Scintilla-0.1.typelib\r\n\t@echo Verifying Scintilla-0.1.gir file\r\n\t@diff $<.good $< || (echo \"GIR FILE MISMATCH!\"; exit 1)\r\n\t@echo Launching gi-test.py python program\r\n\tGI_TYPELIB_PATH=$(PWD) LD_LIBRARY_PATH=$(PWD) \\\r\n\t\tpython $(PWD)/gi-test.py\r\n"
  },
  {
    "path": "scintilla/test/performanceTests.py",
    "content": "#!/usr/bin/env python3\r\n# -*- coding: utf-8 -*-\r\n# Requires Python 2.7 or later\r\n\r\nfrom __future__ import with_statement\r\nfrom __future__ import unicode_literals\r\n\r\nimport string, time, unittest\r\n\r\ntry:\r\n\tstart = time.perf_counter()\r\n\ttimer = time.perf_counter\r\nexcept AttributeError:\r\n\ttimer = time.time\r\n\r\nimport XiteWin as Xite\r\n\r\nclass TestPerformance(unittest.TestCase):\r\n\r\n\tdef setUp(self):\r\n\t\tself.xite = Xite.xiteFrame\r\n\t\tself.ed = self.xite.ed\r\n\t\tself.ed.ClearAll()\r\n\t\tself.ed.EmptyUndoBuffer()\r\n\r\n\tdef testAddLine(self):\r\n\t\tdata = (string.ascii_letters + string.digits + \"\\n\").encode('utf-8')\r\n\t\tstart = timer()\r\n\t\tfor i in range(2000):\r\n\t\t\tself.ed.AddText(len(data), data)\r\n\t\t\tself.assertEqual(self.ed.LineCount, i + 2)\r\n\t\tend = timer()\r\n\t\tduration = end - start\r\n\t\tprint(\"%6.3f testAddLine\" % duration)\r\n\t\tself.xite.DoEvents()\r\n\t\tself.assertTrue(self.ed.Length > 0)\r\n\r\n\tdef testAddLineMiddle(self):\r\n\t\tdata = (string.ascii_letters + string.digits + \"\\n\").encode('utf-8')\r\n\t\tstart = timer()\r\n\t\tfor i in range(2000):\r\n\t\t\tself.ed.AddText(len(data), data)\r\n\t\t\tself.assertEqual(self.ed.LineCount, i + 2)\r\n\t\tend = timer()\r\n\t\tduration = end - start\r\n\t\tprint(\"%6.3f testAddLineMiddle\" % duration)\r\n\t\tself.xite.DoEvents()\r\n\t\tself.assertTrue(self.ed.Length > 0)\r\n\r\n\tdef testHuge(self):\r\n\t\tdata = (string.ascii_letters + string.digits + \"\\n\").encode('utf-8')\r\n\t\tdata = data * 100000\r\n\t\tstart = timer()\r\n\t\tself.ed.AddText(len(data), data)\r\n\t\tend = timer()\r\n\t\tduration = end - start\r\n\t\tprint(\"%6.3f testHuge\" % duration)\r\n\t\tself.xite.DoEvents()\r\n\t\tself.assertTrue(self.ed.Length > 0)\r\n\r\n\tdef testHugeInserts(self):\r\n\t\tdata = (string.ascii_letters + string.digits + \"\\n\").encode('utf-8')\r\n\t\tdata = data * 100000\r\n\t\tinsert = (string.digits + \"\\n\").encode('utf-8')\r\n\t\tself.ed.AddText(len(data), data)\r\n\t\tstart = timer()\r\n\t\tfor i in range(2000):\r\n\t\t\tself.ed.InsertText(0, insert)\r\n\t\tend = timer()\r\n\t\tduration = end - start\r\n\t\tprint(\"%6.3f testHugeInserts\" % duration)\r\n\t\tself.xite.DoEvents()\r\n\t\tself.assertTrue(self.ed.Length > 0)\r\n\r\n\tdef testHugeReplace(self):\r\n\t\toneLine = (string.ascii_letters + string.digits + \"\\n\").encode('utf-8')\r\n\t\tdata = oneLine * 100000\r\n\t\tinsert = (string.digits + \"\\n\").encode('utf-8')\r\n\t\tself.ed.AddText(len(data), data)\r\n\t\tstart = timer()\r\n\t\tfor i in range(1000):\r\n\t\t\tself.ed.TargetStart = i * len(insert)\r\n\t\t\tself.ed.TargetEnd = self.ed.TargetStart + len(oneLine)\r\n\t\t\tself.ed.ReplaceTarget(len(insert), insert)\r\n\t\tend = timer()\r\n\t\tduration = end - start\r\n\t\tprint(\"%6.3f testHugeReplace\" % duration)\r\n\t\tself.xite.DoEvents()\r\n\t\tself.assertTrue(self.ed.Length > 0)\r\n\r\n\tdef testUTF8CaseSearches(self):\r\n\t\tself.ed.SetCodePage(65001)\r\n\t\toneLine = \"Fold Margin=折りたたみ表示用の余白(&F)\\n\".encode('utf-8')\r\n\t\tmanyLines = oneLine * 100000\r\n\t\tmanyLines = manyLines + \"φ\\n\".encode('utf-8')\r\n\t\tself.ed.AddText(len(manyLines), manyLines)\r\n\t\tsearchString = \"φ\".encode('utf-8')\r\n\t\tstart = timer()\r\n\t\tfor i in range(1000):\r\n\t\t\tself.ed.TargetStart = 0\r\n\t\t\tself.ed.TargetEnd = self.ed.Length-1\r\n\t\t\tself.ed.SearchFlags = self.ed.SCFIND_MATCHCASE\r\n\t\t\tpos = self.ed.SearchInTarget(len(searchString), searchString)\r\n\t\t\tself.assertTrue(pos > 0)\r\n\t\tend = timer()\r\n\t\tduration = end - start\r\n\t\tprint(\"%6.3f testUTF8CaseSearches\" % duration)\r\n\t\tself.xite.DoEvents()\r\n\r\n\tdef testUTF8Searches(self):\r\n\t\tself.ed.SetCodePage(65001)\r\n\t\toneLine = \"Fold Margin=折りたたみ表示用の余白(&F)\\n\".encode('utf-8')\r\n\t\tmanyLines = oneLine * 100000\r\n\t\tmanyLines = manyLines + \"φ\\n\".encode('utf-8')\r\n\t\tself.ed.AddText(len(manyLines), manyLines)\r\n\t\tsearchString = \"φ\".encode('utf-8')\r\n\t\tstart = timer()\r\n\t\tfor i in range(20):\r\n\t\t\tself.ed.TargetStart = 0\r\n\t\t\tself.ed.TargetEnd = self.ed.Length-1\r\n\t\t\tself.ed.SearchFlags = 0\r\n\t\t\tpos = self.ed.SearchInTarget(len(searchString), searchString)\r\n\t\t\tself.assertTrue(pos > 0)\r\n\t\tend = timer()\r\n\t\tduration = end - start\r\n\t\tprint(\"%6.3f testUTF8Searches\" % duration)\r\n\t\tself.xite.DoEvents()\r\n\r\n\tdef testUTF8AsciiSearches(self):\r\n\t\tself.ed.SetCodePage(65001)\r\n\t\toneLine = \"Fold Margin=NagasakiOsakaHiroshimaHanedaKyoto(&F)\\n\".encode('utf-8')\r\n\t\tmanyLines = oneLine * 100000\r\n\t\tmanyLines = manyLines + \"φ\\n\".encode('utf-8')\r\n\t\tself.ed.AddText(len(manyLines), manyLines)\r\n\t\tsearchString = \"φ\".encode('utf-8')\r\n\t\tstart = timer()\r\n\t\tfor i in range(20):\r\n\t\t\tself.ed.TargetStart = 0\r\n\t\t\tself.ed.TargetEnd = self.ed.Length-1\r\n\t\t\tself.ed.SearchFlags = 0\r\n\t\t\tpos = self.ed.SearchInTarget(len(searchString), searchString)\r\n\t\t\tself.assertTrue(pos > 0)\r\n\t\tend = timer()\r\n\t\tduration = end - start\r\n\t\tprint(\"%6.3f testUTF8AsciiSearches\" % duration)\r\n\t\tself.xite.DoEvents()\r\n\r\nif __name__ == '__main__':\r\n\tXite.main(\"performanceTests\")\r\n"
  },
  {
    "path": "scintilla/test/simpleTests.py",
    "content": "#!/usr/bin/env python3\r\n# -*- coding: utf-8 -*-\r\n# @file simpleTests.py\r\n# Requires Python 2.7 or later\r\n\r\nfrom __future__ import with_statement\r\nfrom __future__ import unicode_literals\r\n\r\nimport ctypes, string, sys, unittest\r\n\r\nimport XiteWin as Xite\r\n\r\n# Unicode line ends are only available for lexers that support the feature so requires lexers\r\nlexersAvailable = Xite.lexillaAvailable or Xite.scintillaIncludesLexers\r\nunicodeLineEndsAvailable = lexersAvailable\r\n\r\nclass TestSimple(unittest.TestCase):\r\n\r\n\tdef setUp(self):\r\n\t\tself.xite = Xite.xiteFrame\r\n\t\tself.ed = self.xite.ed\r\n\t\tself.ed.ClearAll()\r\n\t\tself.ed.EmptyUndoBuffer()\r\n\r\n\tdef testStatus(self):\r\n\t\tself.assertEqual(self.ed.GetStatus(), 0)\r\n\t\tself.ed.SetStatus(1)\r\n\t\tself.assertEqual(self.ed.GetStatus(), 1)\r\n\t\tself.ed.SetStatus(0)\r\n\t\tself.assertEqual(self.ed.GetStatus(), 0)\r\n\r\n\tdef testLength(self):\r\n\t\tself.assertEqual(self.ed.Length, 0)\r\n\r\n\tdef testAddText(self):\r\n\t\tself.ed.AddText(1, b\"x\")\r\n\t\tself.assertEqual(self.ed.Length, 1)\r\n\t\tself.assertEqual(self.ed.GetCharAt(0), ord(\"x\"))\r\n\t\tself.assertEqual(self.ed.GetStyleAt(0), 0)\r\n\t\tself.ed.ClearAll()\r\n\t\tself.assertEqual(self.ed.Length, 0)\r\n\r\n\tdef testDeleteRange(self):\r\n\t\tself.ed.AddText(5, b\"abcde\")\r\n\t\tself.assertEqual(self.ed.Length, 5)\r\n\t\tself.ed.DeleteRange(1, 2)\r\n\t\tself.assertEqual(self.ed.Length, 3)\r\n\t\tself.assertEqual(self.ed.Contents(), b\"ade\")\r\n\r\n\tdef testAddStyledText(self):\r\n\t\tself.assertEqual(self.ed.EndStyled, 0)\r\n\t\tself.ed.AddStyledText(4, b\"x\\002y\\377\")\r\n\t\tself.assertEqual(self.ed.Length, 2)\r\n\t\tself.assertEqual(self.ed.GetCharAt(0), ord(\"x\"))\r\n\t\tself.assertEqual(self.ed.GetStyleAt(0), 2)\r\n\t\tself.assertEqual(self.ed.GetStyleIndexAt(0), 2)\r\n\t\tself.assertEqual(self.ed.GetStyleIndexAt(1), 255)\r\n\t\tself.assertEqual(self.ed.StyledTextRange(0, 1), b\"x\\002\")\r\n\t\tself.assertEqual(self.ed.StyledTextRange(1, 2), b\"y\\377\")\r\n\t\tself.ed.ClearDocumentStyle()\r\n\t\tself.assertEqual(self.ed.Length, 2)\r\n\t\tself.assertEqual(self.ed.GetCharAt(0), ord(\"x\"))\r\n\t\tself.assertEqual(self.ed.GetStyleAt(0), 0)\r\n\t\tself.assertEqual(self.ed.StyledTextRange(0, 1), b\"x\\0\")\r\n\r\n\tdef testStyledTextRangeFull(self):\r\n\t\tself.assertEqual(self.ed.EndStyled, 0)\r\n\t\tself.ed.AddStyledText(4, b\"x\\002y\\377\")\r\n\t\tself.assertEqual(self.ed.StyledTextRangeFull(0, 1), b\"x\\002\")\r\n\t\tself.assertEqual(self.ed.StyledTextRangeFull(1, 2), b\"y\\377\")\r\n\t\tself.ed.ClearDocumentStyle()\r\n\t\tself.assertEqual(self.ed.Length, 2)\r\n\t\tself.assertEqual(self.ed.StyledTextRangeFull(0, 1), b\"x\\0\")\r\n\r\n\tdef testStyling(self):\r\n\t\tself.assertEqual(self.ed.EndStyled, 0)\r\n\t\tself.ed.AddStyledText(4, b\"x\\002y\\003\")\r\n\t\tself.assertEqual(self.ed.StyledTextRange(0, 2), b\"x\\002y\\003\")\r\n\t\tself.ed.StartStyling(0,0xf)\r\n\t\tself.ed.SetStyling(1, 5)\r\n\t\tself.assertEqual(self.ed.StyledTextRange(0, 2), b\"x\\005y\\003\")\r\n\r\n\t\tself.ed.StartStyling(0,0xff)\r\n\t\tself.ed.SetStylingEx(2, b\"\\100\\101\")\r\n\t\tself.assertEqual(self.ed.StyledTextRange(0, 2), b\"x\\100y\\101\")\r\n\r\n\tdef testPosition(self):\r\n\t\tself.assertEqual(self.ed.CurrentPos, 0)\r\n\t\tself.assertEqual(self.ed.Anchor, 0)\r\n\t\tself.ed.AddText(1, b\"x\")\r\n\t\t# Caret has automatically moved\r\n\t\tself.assertEqual(self.ed.CurrentPos, 1)\r\n\t\tself.assertEqual(self.ed.Anchor, 1)\r\n\t\tself.ed.SelectAll()\r\n\t\tself.assertEqual(self.ed.CurrentPos, 0)\r\n\t\tself.assertEqual(self.ed.Anchor, 1)\r\n\t\tself.ed.Anchor = 0\r\n\t\tself.assertEqual(self.ed.Anchor, 0)\r\n\t\t# Check line positions\r\n\t\tself.assertEqual(self.ed.PositionFromLine(0), 0)\r\n\t\tself.assertEqual(self.ed.GetLineEndPosition(0), 1)\r\n\t\tself.assertEqual(self.ed.PositionFromLine(1), 1)\r\n\r\n\t\tself.ed.CurrentPos = 1\r\n\t\tself.assertEqual(self.ed.Anchor, 0)\r\n\t\tself.assertEqual(self.ed.CurrentPos, 1)\r\n\r\n\tdef testBeyonEnd(self):\r\n\t\tself.ed.AddText(1, b\"x\")\r\n\t\tself.assertEqual(self.ed.GetLineEndPosition(0), 1)\r\n\t\tself.assertEqual(self.ed.GetLineEndPosition(1), 1)\r\n\t\tself.assertEqual(self.ed.GetLineEndPosition(2), 1)\r\n\r\n\tdef testSelection(self):\r\n\t\tself.assertEqual(self.ed.CurrentPos, 0)\r\n\t\tself.assertEqual(self.ed.Anchor, 0)\r\n\t\tself.assertEqual(self.ed.SelectionStart, 0)\r\n\t\tself.assertEqual(self.ed.SelectionEnd, 0)\r\n\t\tself.ed.AddText(1, b\"x\")\r\n\t\tself.ed.SelectionStart = 0\r\n\t\tself.assertEqual(self.ed.CurrentPos, 1)\r\n\t\tself.assertEqual(self.ed.Anchor, 0)\r\n\t\tself.assertEqual(self.ed.SelectionStart, 0)\r\n\t\tself.assertEqual(self.ed.SelectionEnd, 1)\r\n\t\tself.ed.SelectionStart = 1\r\n\t\tself.assertEqual(self.ed.CurrentPos, 1)\r\n\t\tself.assertEqual(self.ed.Anchor, 1)\r\n\t\tself.assertEqual(self.ed.SelectionStart, 1)\r\n\t\tself.assertEqual(self.ed.SelectionEnd, 1)\r\n\r\n\t\tself.ed.SelectionEnd = 0\r\n\t\tself.assertEqual(self.ed.CurrentPos, 0)\r\n\t\tself.assertEqual(self.ed.Anchor, 0)\r\n\r\n\tdef testSetSelection(self):\r\n\t\tself.ed.AddText(4, b\"abcd\")\r\n\t\tself.ed.SetSel(1, 3)\r\n\t\tself.assertEqual(self.ed.SelectionStart, 1)\r\n\t\tself.assertEqual(self.ed.SelectionEnd, 3)\r\n\t\tresult = self.ed.GetSelText(0)\r\n\t\tself.assertEqual(result, b\"bc\")\r\n\t\tself.ed.ReplaceSel(0, b\"1234\")\r\n\t\tself.assertEqual(self.ed.Length, 6)\r\n\t\tself.assertEqual(self.ed.Contents(), b\"a1234d\")\r\n\r\n\tdef testReadOnly(self):\r\n\t\tself.ed.AddText(1, b\"x\")\r\n\t\tself.assertEqual(self.ed.ReadOnly, 0)\r\n\t\tself.assertEqual(self.ed.Contents(), b\"x\")\r\n\t\tself.ed.ReadOnly = 1\r\n\t\tself.assertEqual(self.ed.ReadOnly, 1)\r\n\t\tself.ed.AddText(1, b\"x\")\r\n\t\tself.assertEqual(self.ed.Contents(), b\"x\")\r\n\t\tself.ed.ReadOnly = 0\r\n\t\tself.ed.AddText(1, b\"x\")\r\n\t\tself.assertEqual(self.ed.Contents(), b\"xx\")\r\n\t\tself.ed.Null()\r\n\t\tself.assertEqual(self.ed.Contents(), b\"xx\")\r\n\r\n\tdef testAddLine(self):\r\n\t\tdata = b\"x\" * 70 + b\"\\n\"\r\n\t\tfor i in range(5):\r\n\t\t\tself.ed.AddText(len(data), data)\r\n\t\t\tself.assertEqual(self.ed.LineCount, i + 2)\r\n\t\tself.assertTrue(self.ed.Length > 0)\r\n\r\n\tdef testInsertText(self):\r\n\t\tdata = b\"xy\"\r\n\t\tself.ed.InsertText(0, data)\r\n\t\tself.assertEqual(self.ed.Length, 2)\r\n\t\tself.assertEqual(data, self.ed.ByteRange(0,2))\r\n\r\n\t\tself.ed.InsertText(1, data)\r\n\t\t# Should now be \"xxyy\"\r\n\t\tself.assertEqual(self.ed.Length, 4)\r\n\t\tself.assertEqual(b\"xxyy\", self.ed.ByteRange(0,4))\r\n\r\n\tdef testTextRangeFull(self):\r\n\t\tdata = b\"xy\"\r\n\t\tself.ed.InsertText(0, data)\r\n\t\tself.assertEqual(self.ed.Length, 2)\r\n\t\tself.assertEqual(data, self.ed.ByteRangeFull(0,2))\r\n\r\n\t\tself.ed.InsertText(1, data)\r\n\t\t# Should now be \"xxyy\"\r\n\t\tself.assertEqual(self.ed.Length, 4)\r\n\t\tself.assertEqual(b\"xxyy\", self.ed.ByteRangeFull(0,4))\r\n\r\n\tdef testInsertNul(self):\r\n\t\tdata = b\"\\0\"\r\n\t\tself.ed.AddText(1, data)\r\n\t\tself.assertEqual(self.ed.Length, 1)\r\n\t\tself.assertEqual(data, self.ed.ByteRange(0,1))\r\n\r\n\tdef testNewLine(self):\r\n\t\tself.ed.SetContents(b\"12\")\r\n\t\tself.ed.SetSel(1, 1)\r\n\t\tself.ed.NewLine()\r\n\t\tself.assertEqual(self.ed.Contents(), b\"1\\r\\n2\")\r\n\r\n\tdef testUndoRedo(self):\r\n\t\tdata = b\"xy\"\r\n\t\tself.assertEqual(self.ed.Modify, 0)\r\n\t\tself.assertEqual(self.ed.UndoCollection, 1)\r\n\t\tself.assertEqual(self.ed.CanRedo(), 0)\r\n\t\tself.assertEqual(self.ed.CanUndo(), 0)\r\n\t\tself.ed.InsertText(0, data)\r\n\t\tself.assertEqual(self.ed.Length, 2)\r\n\t\tself.assertEqual(self.ed.Modify, 1)\r\n\t\tself.assertEqual(self.ed.CanRedo(), 0)\r\n\t\tself.assertEqual(self.ed.CanUndo(), 1)\r\n\t\tself.ed.Undo()\r\n\t\tself.assertEqual(self.ed.Length, 0)\r\n\t\tself.assertEqual(self.ed.Modify, 0)\r\n\t\tself.assertEqual(self.ed.CanRedo(), 1)\r\n\t\tself.assertEqual(self.ed.CanUndo(), 0)\r\n\t\tself.ed.Redo()\r\n\t\tself.assertEqual(self.ed.Length, 2)\r\n\t\tself.assertEqual(self.ed.Modify, 1)\r\n\t\tself.assertEqual(data, self.ed.Contents())\r\n\t\tself.assertEqual(self.ed.CanRedo(), 0)\r\n\t\tself.assertEqual(self.ed.CanUndo(), 1)\r\n\r\n\tdef testUndoSavePoint(self):\r\n\t\tdata = b\"xy\"\r\n\t\tself.assertEqual(self.ed.Modify, 0)\r\n\t\tself.ed.InsertText(0, data)\r\n\t\tself.assertEqual(self.ed.Modify, 1)\r\n\t\tself.ed.SetSavePoint()\r\n\t\tself.assertEqual(self.ed.Modify, 0)\r\n\t\tself.ed.InsertText(0, data)\r\n\t\tself.assertEqual(self.ed.Modify, 1)\r\n\r\n\tdef testUndoCollection(self):\r\n\t\tdata = b\"xy\"\r\n\t\tself.assertEqual(self.ed.UndoCollection, 1)\r\n\t\tself.ed.UndoCollection = 0\r\n\t\tself.assertEqual(self.ed.UndoCollection, 0)\r\n\t\tself.ed.InsertText(0, data)\r\n\t\tself.assertEqual(self.ed.CanRedo(), 0)\r\n\t\tself.assertEqual(self.ed.CanUndo(), 0)\r\n\t\tself.ed.UndoCollection = 1\r\n\r\n\tdef testGetColumn(self):\r\n\t\tself.ed.AddText(1, b\"x\")\r\n\t\tself.assertEqual(self.ed.GetColumn(0), 0)\r\n\t\tself.assertEqual(self.ed.GetColumn(1), 1)\r\n\t\t# Next line caused infinite loop in 1.71\r\n\t\tself.assertEqual(self.ed.GetColumn(2), 1)\r\n\t\tself.assertEqual(self.ed.GetColumn(3), 1)\r\n\r\n\tdef testTabWidth(self):\r\n\t\tself.assertEqual(self.ed.TabWidth, 8)\r\n\t\tself.ed.AddText(3, b\"x\\tb\")\r\n\t\tself.assertEqual(self.ed.GetColumn(0), 0)\r\n\t\tself.assertEqual(self.ed.GetColumn(1), 1)\r\n\t\tself.assertEqual(self.ed.GetColumn(2), 8)\r\n\t\tfor col in range(10):\r\n\t\t\tif col == 0:\r\n\t\t\t\tself.assertEqual(self.ed.FindColumn(0, col), 0)\r\n\t\t\telif col == 1:\r\n\t\t\t\tself.assertEqual(self.ed.FindColumn(0, col), 1)\r\n\t\t\telif col == 8:\r\n\t\t\t\tself.assertEqual(self.ed.FindColumn(0, col), 2)\r\n\t\t\telif col == 9:\r\n\t\t\t\tself.assertEqual(self.ed.FindColumn(0, col), 3)\r\n\t\t\telse:\r\n\t\t\t\tself.assertEqual(self.ed.FindColumn(0, col), 1)\r\n\t\tself.ed.TabWidth = 4\r\n\t\tself.assertEqual(self.ed.TabWidth, 4)\r\n\t\tself.assertEqual(self.ed.GetColumn(0), 0)\r\n\t\tself.assertEqual(self.ed.GetColumn(1), 1)\r\n\t\tself.assertEqual(self.ed.GetColumn(2), 4)\r\n\r\n\tdef testIndent(self):\r\n\t\tself.assertEqual(self.ed.Indent, 0)\r\n\t\tself.assertEqual(self.ed.UseTabs, 1)\r\n\t\tself.ed.Indent = 8\r\n\t\tself.ed.UseTabs = 0\r\n\t\tself.assertEqual(self.ed.Indent, 8)\r\n\t\tself.assertEqual(self.ed.UseTabs, 0)\r\n\t\tself.ed.AddText(3, b\"x\\tb\")\r\n\t\tself.assertEqual(self.ed.GetLineIndentation(0), 0)\r\n\t\tself.ed.InsertText(0, b\" \")\r\n\t\tself.assertEqual(self.ed.GetLineIndentation(0), 1)\r\n\t\tself.assertEqual(self.ed.GetLineIndentPosition(0), 1)\r\n\t\tself.assertEqual(self.ed.Contents(), b\" x\\tb\")\r\n\t\tself.ed.SetLineIndentation(0,2)\r\n\t\tself.assertEqual(self.ed.Contents(), b\"  x\\tb\")\r\n\t\tself.assertEqual(self.ed.GetLineIndentPosition(0), 2)\r\n\t\tself.ed.UseTabs = 1\r\n\t\tself.ed.SetLineIndentation(0,8)\r\n\t\tself.assertEqual(self.ed.Contents(), b\"\\tx\\tb\")\r\n\t\tself.assertEqual(self.ed.GetLineIndentPosition(0), 1)\r\n\r\n\tdef testGetCurLine(self):\r\n\t\tself.ed.AddText(1, b\"x\")\r\n\t\tdata = ctypes.create_string_buffer(b\"\\0\" * 100)\r\n\t\tcaret = self.ed.GetCurLine(len(data), data)\r\n\t\tself.assertEqual(caret, 1)\r\n\t\tself.assertEqual(data.value, b\"x\")\r\n\r\n\tdef testGetLine(self):\r\n\t\tself.ed.AddText(1, b\"x\")\r\n\t\tdata = ctypes.create_string_buffer(b\"\\0\" * 100)\r\n\t\tself.ed.GetLine(0, data)\r\n\t\tself.assertEqual(data.value, b\"x\")\r\n\r\n\tdef testLineEnds(self):\r\n\t\tself.ed.AddText(3, b\"x\\ny\")\r\n\t\tself.assertEqual(self.ed.GetLineEndPosition(0), 1)\r\n\t\tself.assertEqual(self.ed.GetLineEndPosition(1), 3)\r\n\t\tself.assertEqual(self.ed.LineLength(0), 2)\r\n\t\tself.assertEqual(self.ed.LineLength(1), 1)\r\n\t\t# Test lines out of range.\r\n\t\tself.assertEqual(self.ed.LineLength(2), 0)\r\n\t\tself.assertEqual(self.ed.LineLength(-1), 0)\r\n\t\tif sys.platform == \"win32\":\r\n\t\t\tself.assertEqual(self.ed.EOLMode, self.ed.SC_EOL_CRLF)\r\n\t\telse:\r\n\t\t\tself.assertEqual(self.ed.EOLMode, self.ed.SC_EOL_LF)\r\n\t\tlineEnds = [b\"\\r\\n\", b\"\\r\", b\"\\n\"]\r\n\t\tfor lineEndType in [self.ed.SC_EOL_CR, self.ed.SC_EOL_LF, self.ed.SC_EOL_CRLF]:\r\n\t\t\tself.ed.EOLMode = lineEndType\r\n\t\t\tself.assertEqual(self.ed.EOLMode, lineEndType)\r\n\t\t\tself.ed.ConvertEOLs(lineEndType)\r\n\t\t\tself.assertEqual(self.ed.Contents(), b\"x\" + lineEnds[lineEndType] + b\"y\")\r\n\t\t\tself.assertEqual(self.ed.LineLength(0), 1 + len(lineEnds[lineEndType]))\r\n\r\n\t# Several tests for unicode line ends U+2028 and U+2029\r\n\r\n\t@unittest.skipUnless(unicodeLineEndsAvailable, \"can not test Unicode line ends\")\r\n\tdef testUnicodeLineEnds(self):\r\n\t\t# Add two lines separated with U+2028 and ensure it is seen as two lines\r\n\t\t# Then remove U+2028 and should be just 1 lines\r\n\t\tself.xite.ChooseLexer(b\"cpp\")\r\n\t\tself.ed.SetCodePage(65001)\r\n\t\tself.ed.SetLineEndTypesAllowed(1)\r\n\t\tself.ed.AddText(5, b\"x\\xe2\\x80\\xa8y\")\r\n\t\tself.assertEqual(self.ed.LineCount, 2)\r\n\t\tself.assertEqual(self.ed.GetLineEndPosition(0), 1)\r\n\t\tself.assertEqual(self.ed.GetLineEndPosition(1), 5)\r\n\t\tself.assertEqual(self.ed.LineLength(0), 4)\r\n\t\tself.assertEqual(self.ed.LineLength(1), 1)\r\n\t\tself.ed.TargetStart = 1\r\n\t\tself.ed.TargetEnd = 4\r\n\t\tself.ed.ReplaceTarget(0, b\"\")\r\n\t\tself.assertEqual(self.ed.LineCount, 1)\r\n\t\tself.assertEqual(self.ed.LineLength(0), 2)\r\n\t\tself.assertEqual(self.ed.GetLineEndPosition(0), 2)\r\n\t\tself.assertEqual(self.ed.LineEndTypesSupported, 1)\r\n\r\n\tdef testUnicodeLineEndsWithCodePage0(self):\r\n\t\t# Try the Unicode line ends when not in Unicode mode -> should remain 1 line\r\n\t\tself.ed.SetCodePage(0)\r\n\t\tself.ed.AddText(5, b\"x\\xe2\\x80\\xa8y\")\r\n\t\tself.assertEqual(self.ed.LineCount, 1)\r\n\t\tself.ed.AddText(4, b\"x\\xc2\\x85y\")\r\n\t\tself.assertEqual(self.ed.LineCount, 1)\r\n\r\n\t@unittest.skipUnless(unicodeLineEndsAvailable, \"can not test Unicode line ends\")\r\n\tdef testUnicodeLineEndsSwitchToUnicodeAndBack(self):\r\n\t\t# Add the Unicode line ends when not in Unicode mode\r\n\t\tself.ed.SetCodePage(0)\r\n\t\tself.ed.AddText(5, b\"x\\xe2\\x80\\xa8y\")\r\n\t\tself.assertEqual(self.ed.LineCount, 1)\r\n\t\t# Into UTF-8 mode - should now be interpreting as two lines\r\n\t\tself.xite.ChooseLexer(b\"cpp\")\r\n\t\tself.ed.SetCodePage(65001)\r\n\t\tself.ed.SetLineEndTypesAllowed(1)\r\n\t\tself.assertEqual(self.ed.LineCount, 2)\r\n\t\t# Back to code page 0 and 1 line\r\n\t\tself.ed.SetCodePage(0)\r\n\t\tself.assertEqual(self.ed.LineCount, 1)\r\n\r\n\t@unittest.skipUnless(unicodeLineEndsAvailable, \"can not test Unicode line ends\")\r\n\tdef testUFragmentedEOLCompletion(self):\r\n\t\t# Add 2 starting bytes of UTF-8 line end then complete it\r\n\t\tself.ed.ClearAll()\r\n\t\tself.ed.AddText(4, b\"x\\xe2\\x80y\")\r\n\t\tself.assertEqual(self.ed.LineCount, 1)\r\n\t\tself.assertEqual(self.ed.GetLineEndPosition(0), 4)\r\n\t\tself.ed.SetSel(3,3)\r\n\t\tself.ed.AddText(1, b\"\\xa8\")\r\n\t\tself.assertEqual(self.ed.Contents(), b\"x\\xe2\\x80\\xa8y\")\r\n\t\tself.assertEqual(self.ed.LineCount, 2)\r\n\r\n\t\t# Add 1 starting bytes of UTF-8 line end then complete it\r\n\t\tself.ed.ClearAll()\r\n\t\tself.ed.AddText(3, b\"x\\xe2y\")\r\n\t\tself.assertEqual(self.ed.LineCount, 1)\r\n\t\tself.assertEqual(self.ed.GetLineEndPosition(0), 3)\r\n\t\tself.ed.SetSel(2,2)\r\n\t\tself.ed.AddText(2, b\"\\x80\\xa8\")\r\n\t\tself.assertEqual(self.ed.Contents(), b\"x\\xe2\\x80\\xa8y\")\r\n\t\tself.assertEqual(self.ed.LineCount, 2)\r\n\r\n\t@unittest.skipUnless(unicodeLineEndsAvailable, \"can not test Unicode line ends\")\r\n\tdef testUFragmentedEOLStart(self):\r\n\t\t# Add end of UTF-8 line end then insert start\r\n\t\tself.xite.ChooseLexer(b\"cpp\")\r\n\t\tself.ed.SetCodePage(65001)\r\n\t\tself.ed.SetLineEndTypesAllowed(1)\r\n\t\tself.assertEqual(self.ed.LineCount, 1)\r\n\t\tself.ed.AddText(4, b\"x\\x80\\xa8y\")\r\n\t\tself.assertEqual(self.ed.LineCount, 1)\r\n\t\tself.ed.SetSel(1,1)\r\n\t\tself.ed.AddText(1, b\"\\xe2\")\r\n\t\tself.assertEqual(self.ed.LineCount, 2)\r\n\r\n\t@unittest.skipUnless(unicodeLineEndsAvailable, \"can not test Unicode line ends\")\r\n\tdef testUBreakApartEOL(self):\r\n\t\t# Add two lines separated by U+2029 then remove and add back each byte ensuring\r\n\t\t# only one line after each removal of any byte in line end and 2 lines after reinsertion\r\n\t\tself.xite.ChooseLexer(b\"cpp\")\r\n\t\tself.ed.SetCodePage(65001)\r\n\t\tself.ed.SetLineEndTypesAllowed(1)\r\n\t\ttext = b\"x\\xe2\\x80\\xa9y\"\r\n\t\tself.ed.AddText(5, text)\r\n\t\tself.assertEqual(self.ed.LineCount, 2)\r\n\r\n\t\tfor i in range(len(text)):\r\n\t\t\tself.ed.TargetStart = i\r\n\t\t\tself.ed.TargetEnd = i + 1\r\n\t\t\tself.ed.ReplaceTarget(0, b\"\")\r\n\t\t\tif i in [0, 4]:\r\n\t\t\t\t# Removing text characters does not change number of lines\r\n\t\t\t\tself.assertEqual(self.ed.LineCount, 2)\r\n\t\t\telse:\r\n\t\t\t\t# Removing byte from line end, removes 1 line\r\n\t\t\t\tself.assertEqual(self.ed.LineCount, 1)\r\n\r\n\t\t\tself.ed.TargetEnd = i\r\n\t\t\tself.ed.ReplaceTarget(1, text[i:i+1])\r\n\t\t\tself.assertEqual(self.ed.LineCount, 2)\r\n\r\n\t@unittest.skipUnless(unicodeLineEndsAvailable, \"can not test Unicode line ends\")\r\n\tdef testURemoveEOLFragment(self):\r\n\t\t# Add UTF-8 line end then delete each byte causing line end to disappear\r\n\t\tself.xite.ChooseLexer(b\"cpp\")\r\n\t\tself.ed.SetCodePage(65001)\r\n\t\tself.ed.SetLineEndTypesAllowed(1)\r\n\t\tfor i in range(3):\r\n\t\t\tself.ed.ClearAll()\r\n\t\t\tself.ed.AddText(5, b\"x\\xe2\\x80\\xa8y\")\r\n\t\t\tself.assertEqual(self.ed.LineCount, 2)\r\n\t\t\tself.ed.TargetStart = i+1\r\n\t\t\tself.ed.TargetEnd = i+2\r\n\t\t\tself.ed.ReplaceTarget(0, b\"\")\r\n\t\t\tself.assertEqual(self.ed.LineCount, 1)\r\n\r\n\t# Several tests for unicode NEL line ends U+0085\r\n\r\n\t@unittest.skipUnless(unicodeLineEndsAvailable, \"can not test Unicode line ends\")\r\n\tdef testNELLineEnds(self):\r\n\t\t# Add two lines separated with U+0085 and ensure it is seen as two lines\r\n\t\t# Then remove U+0085 and should be just 1 lines\r\n\t\tself.xite.ChooseLexer(b\"cpp\")\r\n\t\tself.ed.SetCodePage(65001)\r\n\t\tself.ed.SetLineEndTypesAllowed(1)\r\n\t\tself.ed.AddText(4, b\"x\\xc2\\x85y\")\r\n\t\tself.assertEqual(self.ed.LineCount, 2)\r\n\t\tself.assertEqual(self.ed.GetLineEndPosition(0), 1)\r\n\t\tself.assertEqual(self.ed.GetLineEndPosition(1), 4)\r\n\t\tself.assertEqual(self.ed.LineLength(0), 3)\r\n\t\tself.assertEqual(self.ed.LineLength(1), 1)\r\n\t\tself.ed.TargetStart = 1\r\n\t\tself.ed.TargetEnd = 3\r\n\t\tself.ed.ReplaceTarget(0, b\"\")\r\n\t\tself.assertEqual(self.ed.LineCount, 1)\r\n\t\tself.assertEqual(self.ed.LineLength(0), 2)\r\n\t\tself.assertEqual(self.ed.GetLineEndPosition(0), 2)\r\n\r\n\t@unittest.skipUnless(unicodeLineEndsAvailable, \"can not test Unicode line ends\")\r\n\tdef testNELFragmentedEOLCompletion(self):\r\n\t\t# Add starting byte of UTF-8 NEL then complete it\r\n\t\tself.ed.AddText(3, b\"x\\xc2y\")\r\n\t\tself.assertEqual(self.ed.LineCount, 1)\r\n\t\tself.assertEqual(self.ed.GetLineEndPosition(0), 3)\r\n\t\tself.ed.SetSel(2,2)\r\n\t\tself.ed.AddText(1, b\"\\x85\")\r\n\t\tself.assertEqual(self.ed.Contents(), b\"x\\xc2\\x85y\")\r\n\t\tself.assertEqual(self.ed.LineCount, 2)\r\n\r\n\t@unittest.skipUnless(unicodeLineEndsAvailable, \"can not test Unicode line ends\")\r\n\tdef testNELFragmentedEOLStart(self):\r\n\t\t# Add end of UTF-8 NEL then insert start\r\n\t\tself.xite.ChooseLexer(b\"cpp\")\r\n\t\tself.ed.SetCodePage(65001)\r\n\t\tself.ed.SetLineEndTypesAllowed(1)\r\n\t\tself.assertEqual(self.ed.LineCount, 1)\r\n\t\tself.ed.AddText(4, b\"x\\x85y\")\r\n\t\tself.assertEqual(self.ed.LineCount, 1)\r\n\t\tself.ed.SetSel(1,1)\r\n\t\tself.ed.AddText(1, b\"\\xc2\")\r\n\t\tself.assertEqual(self.ed.LineCount, 2)\r\n\r\n\t@unittest.skipUnless(unicodeLineEndsAvailable, \"can not test Unicode line ends\")\r\n\tdef testNELBreakApartEOL(self):\r\n\t\t# Add two lines separated by U+0085 then remove and add back each byte ensuring\r\n\t\t# only one line after each removal of any byte in line end and 2 lines after reinsertion\r\n\t\tself.xite.ChooseLexer(b\"cpp\")\r\n\t\tself.ed.SetCodePage(65001)\r\n\t\tself.ed.SetLineEndTypesAllowed(1)\r\n\t\ttext = b\"x\\xc2\\x85y\"\r\n\t\tself.ed.AddText(4, text)\r\n\t\tself.assertEqual(self.ed.LineCount, 2)\r\n\r\n\t\tfor i in range(len(text)):\r\n\t\t\tself.ed.TargetStart = i\r\n\t\t\tself.ed.TargetEnd = i + 1\r\n\t\t\tself.ed.ReplaceTarget(0, b\"\")\r\n\t\t\tif i in [0, 3]:\r\n\t\t\t\t# Removing text characters does not change number of lines\r\n\t\t\t\tself.assertEqual(self.ed.LineCount, 2)\r\n\t\t\telse:\r\n\t\t\t\t# Removing byte from line end, removes 1 line\r\n\t\t\t\tself.assertEqual(self.ed.LineCount, 1)\r\n\r\n\t\t\tself.ed.TargetEnd = i\r\n\t\t\tself.ed.ReplaceTarget(1, text[i:i+1])\r\n\t\t\tself.assertEqual(self.ed.LineCount, 2)\r\n\r\n\t@unittest.skipUnless(unicodeLineEndsAvailable, \"can not test Unicode line ends\")\r\n\tdef testNELRemoveEOLFragment(self):\r\n\t\t# Add UTF-8 NEL then delete each byte causing line end to disappear\r\n\t\tself.ed.SetCodePage(65001)\r\n\t\tfor i in range(2):\r\n\t\t\tself.ed.ClearAll()\r\n\t\t\tself.ed.AddText(4, b\"x\\xc2\\x85y\")\r\n\t\t\tself.assertEqual(self.ed.LineCount, 2)\r\n\t\t\tself.ed.TargetStart = i+1\r\n\t\t\tself.ed.TargetEnd = i+2\r\n\t\t\tself.ed.ReplaceTarget(0, b\"\")\r\n\t\t\tself.assertEqual(self.ed.LineCount, 1)\r\n\r\n\tdef testGoto(self):\r\n\t\tself.ed.AddText(5, b\"a\\nb\\nc\")\r\n\t\tself.assertEqual(self.ed.CurrentPos, 5)\r\n\t\tself.ed.GotoLine(1)\r\n\t\tself.assertEqual(self.ed.CurrentPos, 2)\r\n\t\tself.ed.GotoPos(4)\r\n\t\tself.assertEqual(self.ed.CurrentPos, 4)\r\n\r\n\tdef testCutCopyPaste(self):\r\n\t\tself.ed.AddText(5, b\"a1b2c\")\r\n\t\tself.ed.SetSel(1,3)\r\n\t\tself.ed.Cut()\r\n\t\t# Clipboard = \"1b\"\r\n\t\tself.assertEqual(self.ed.Contents(), b\"a2c\")\r\n\t\tself.assertEqual(self.ed.CanPaste(), 1)\r\n\t\tself.ed.SetSel(0, 0)\r\n\t\tself.ed.Paste()\r\n\t\tself.assertEqual(self.ed.Contents(), b\"1ba2c\")\r\n\t\tself.ed.SetSel(4,5)\r\n\t\tself.ed.Copy()\r\n\t\t# Clipboard = \"c\"\r\n\t\tself.ed.SetSel(1,3)\r\n\t\tself.ed.Paste()\r\n\t\tself.assertEqual(self.ed.Contents(), b\"1c2c\")\r\n\t\tself.ed.SetSel(2,4)\r\n\t\tself.ed.Clear()\r\n\t\tself.assertEqual(self.ed.Contents(), b\"1c\")\r\n\r\n\tdef testReplaceRectangular(self):\r\n\t\tself.ed.AddText(5, b\"a\\nb\\nc\")\r\n\t\tself.ed.SetSel(0,0)\r\n\t\tself.ed.ReplaceRectangular(3, b\"1\\n2\")\r\n\t\tself.assertEqual(self.ed.Contents(), b\"1a\\n2b\\nc\")\r\n\r\n\tdef testCopyAllowLine(self):\r\n\t\tlineEndType = self.ed.EOLMode\r\n\t\tself.ed.EOLMode = self.ed.SC_EOL_LF\r\n\t\tself.ed.AddText(5, b\"a1\\nb2\")\r\n\t\tself.ed.SetSel(1,1)\r\n\t\tself.ed.CopyAllowLine()\r\n\t\t# Clipboard = \"a1\\n\"\r\n\t\tself.assertEqual(self.ed.CanPaste(), 1)\r\n\t\tself.ed.SetSel(0, 0)\r\n\t\tself.ed.Paste()\r\n\t\tself.ed.EOLMode = lineEndType\r\n\t\tself.assertEqual(self.ed.Contents(), b\"a1\\na1\\nb2\")\r\n\r\n\tdef testDuplicate(self):\r\n\t\tself.ed.AddText(3, b\"1b2\")\r\n\t\tself.ed.SetSel(1,2)\r\n\t\tself.ed.SelectionDuplicate()\r\n\t\tself.assertEqual(self.ed.Contents(), b\"1bb2\")\r\n\r\n\tdef testLineDuplicate(self):\r\n\t\tself.ed.SetContents(b\"1\\r\\nb\\r\\n2\")\r\n\t\tself.ed.SetSel(3, 3)\r\n\t\t# Duplicates the second line containing 'b'\r\n\t\tself.ed.LineDuplicate()\r\n\t\tself.assertEqual(self.ed.Contents(), b\"1\\r\\nb\\r\\nb\\r\\n2\")\r\n\r\n\tdef testLineDuplicateDifferentLineEnd(self):\r\n\t\tself.ed.SetContents(b\"1\\nb\\n2\")\r\n\t\tself.ed.SetSel(3, 3)\r\n\t\t# Duplicates the second line containing 'b'\r\n\t\tself.ed.LineDuplicate()\r\n\t\t# Same as above but end of duplicated line is \\r\\n\r\n\t\tself.assertEqual(self.ed.Contents(), b\"1\\nb\\r\\nb\\n2\")\r\n\r\n\tdef testTransposeLines(self):\r\n\t\tself.ed.AddText(8, b\"a1\\nb2\\nc3\")\r\n\t\tself.ed.SetSel(3,3)\r\n\t\tself.ed.LineTranspose()\r\n\t\tself.assertEqual(self.ed.Contents(), b\"b2\\na1\\nc3\")\r\n\r\n\tdef testReverseLines(self):\r\n\t\tself.ed.SetContents(b\"a1\\nb2\\nc3\")\r\n\t\tself.ed.SetSel(0, 8)\r\n\t\tself.ed.LineReverse()\r\n\t\tself.assertEqual(self.ed.Contents(), b\"c3\\nb2\\na1\")\r\n\r\n\t\tself.ed.SetContents(b\"a1\\nb2\\nc3\\n\")\r\n\t\tself.ed.SetSel(0, 9)\r\n\t\tself.ed.LineReverse()\r\n\t\tself.assertEqual(self.ed.Contents(), b\"c3\\nb2\\na1\\n\")\r\n\r\n\tdef testMoveSelectedLines(self):\r\n\t\tlineEndType = self.ed.EOLMode\r\n\t\tself.ed.EOLMode = self.ed.SC_EOL_LF\r\n\r\n\t\tself.ed.SetContents(b\"a1\\nb2\\nc3\")\r\n\t\tself.ed.SetSel(3, 6)\r\n\t\tself.ed.MoveSelectedLinesDown()\r\n\t\tself.assertEqual(self.ed.Contents(), b\"a1\\nc3\\nb2\")\r\n\r\n\t\tself.ed.SetContents(b\"a1\\nb2\\nc3\")\r\n\t\tself.ed.SetSel(3, 6)\r\n\t\tself.ed.MoveSelectedLinesUp()\r\n\t\tself.assertEqual(self.ed.Contents(), b\"b2\\na1\\nc3\")\r\n\r\n\t\t# Exercise the 'appendEol' case as the last line has no EOL characters to copy\r\n\t\tself.ed.SetContents(b\"a1\\nb2\\nc3\")\r\n\t\tself.ed.SetSel(4, 7)\r\n\t\tself.ed.MoveSelectedLinesUp()\r\n\t\tself.assertEqual(self.ed.Contents(), b\"b2\\nc3\\na1\")\r\n\r\n\t\t# Testing extreme lines\r\n\t\tself.ed.SetContents(b\"a1\\nb2\\nc3\")\r\n\t\tself.ed.SetSel(6, 7)\r\n\t\tself.ed.MoveSelectedLinesDown()\r\n\t\t# No change as moving last line down\r\n\t\tself.assertEqual(self.ed.Contents(), b\"a1\\nb2\\nc3\")\r\n\r\n\t\tself.ed.SetContents(b\"a1\\nb2\\nc3\")\r\n\t\tself.ed.SetSel(1, 2)\r\n\t\tself.ed.MoveSelectedLinesUp()\r\n\t\t# No change as moving first line up\r\n\t\tself.assertEqual(self.ed.Contents(), b\"a1\\nb2\\nc3\")\r\n\r\n\t\t# Moving line to end with different line end uses that line end\r\n\t\tself.ed.EOLMode = self.ed.SC_EOL_CRLF\r\n\t\tself.ed.SetContents(b\"a1\\nb2\\nc3\")\r\n\t\tself.ed.SetSel(3, 6)\r\n\t\tself.ed.MoveSelectedLinesDown()\r\n\t\tself.assertEqual(self.ed.Contents(), b\"a1\\nc3\\r\\nb2\")\r\n\r\n\t\t# Exercise 'appendEol'\r\n\t\tself.ed.SetContents(b\"a1\\nb2\\nc3\")\r\n\t\tself.ed.SetSel(4, 7)\r\n\t\tself.ed.MoveSelectedLinesUp()\r\n\t\tself.assertEqual(self.ed.Contents(), b\"b2\\nc3\\r\\na1\")\r\n\r\n\t\tself.ed.SetContents(b\"a1\\nb2\\nc3\")\r\n\t\tself.ed.SetSel(1, 2)\r\n\t\tself.ed.MoveSelectedLinesDown()\r\n\t\tself.assertEqual(self.ed.Contents(), b\"b2\\na1\\nc3\")\r\n\t\t\r\n\t\t# Exercise rectangular selection\r\n\t\tself.ed.EOLMode = self.ed.SC_EOL_LF\r\n\t\tself.ed.SetContents(b\"a1\\nb2\\nc3\")\r\n\t\tself.ed.RectangularSelectionAnchor = 1\r\n\t\tself.ed.RectangularSelectionCaret = 4\r\n\t\t# Check rectangular not stream\r\n\t\tself.assertEqual(self.ed.GetSelectionMode(), self.ed.SC_SEL_RECTANGLE)\r\n\t\tself.assertEqual(self.ed.Selections, 2)\r\n\t\tself.ed.MoveSelectedLinesDown()\r\n\t\tself.assertEqual(self.ed.Contents(), b\"c3\\na1\\nb2\")\r\n\r\n\t\t# Restore line end\r\n\t\tself.ed.EOLMode = lineEndType\r\n\r\n\tdef testGetSet(self):\r\n\t\tself.ed.SetContents(b\"abc\")\r\n\t\tself.assertEqual(self.ed.TextLength, 3)\r\n\t\t# String buffer containing exactly 5 digits\r\n\t\tresult = ctypes.create_string_buffer(b\"12345\", 5)\r\n\t\tself.assertEqual(result.raw, b\"12345\")\r\n\t\tlength = self.ed.GetText(4, result)\r\n\t\tself.assertEqual(length, 3)\r\n\t\tself.assertEqual(result.value, b\"abc\")\r\n\t\t# GetText has written the 3 bytes of text and a terminating NUL but left the final digit 5\r\n\t\tself.assertEqual(result.raw, b\"abc\\x005\")\r\n\r\n\tdef testAppend(self):\r\n\t\tself.ed.SetContents(b\"abc\")\r\n\t\tself.assertEqual(self.ed.SelectionStart, 0)\r\n\t\tself.assertEqual(self.ed.SelectionEnd, 0)\r\n\t\ttext = b\"12\"\r\n\t\tself.ed.AppendText(len(text), text)\r\n\t\tself.assertEqual(self.ed.SelectionStart, 0)\r\n\t\tself.assertEqual(self.ed.SelectionEnd, 0)\r\n\t\tself.assertEqual(self.ed.Contents(), b\"abc12\")\r\n\r\n\tdef testTarget(self):\r\n\t\tself.ed.SetContents(b\"abcd\")\r\n\t\tself.ed.TargetStart = 1\r\n\t\tself.ed.TargetEnd = 3\r\n\t\tself.assertEqual(self.ed.TargetStart, 1)\r\n\t\tself.assertEqual(self.ed.TargetEnd, 3)\r\n\t\trep = b\"321\"\r\n\t\tself.ed.ReplaceTarget(len(rep), rep)\r\n\t\tself.assertEqual(self.ed.Contents(), b\"a321d\")\r\n\t\tself.ed.SearchFlags = self.ed.SCFIND_REGEXP\r\n\t\tself.assertEqual(self.ed.SearchFlags, self.ed.SCFIND_REGEXP)\r\n\t\tsearchString = rb\"\\([1-9]+\\)\"\r\n\t\tpos = self.ed.SearchInTarget(len(searchString), searchString)\r\n\t\tself.assertEqual(1, pos)\r\n\t\ttagString = self.ed.GetTag(1)\r\n\t\tself.assertEqual(tagString, b\"321\")\r\n\t\trep = b\"\\\\1\"\r\n\t\tself.ed.TargetStart = 0\r\n\t\tself.ed.TargetEnd = 0\r\n\t\tself.ed.ReplaceTargetRE(len(rep), rep)\r\n\t\tself.assertEqual(self.ed.Contents(), b\"321a321d\")\r\n\t\tself.ed.SetSel(4,5)\r\n\t\tself.ed.TargetFromSelection()\r\n\t\tself.assertEqual(self.ed.TargetStart, 4)\r\n\t\tself.assertEqual(self.ed.TargetEnd, 5)\r\n\r\n\tdef testReplaceTargetMinimal(self):\r\n\t\t# 1: No common characters\r\n\t\tself.ed.SetContents(b\"abcd\")\r\n\t\tself.ed.TargetStart = 1\r\n\t\tself.ed.TargetEnd = 3\r\n\t\tself.assertEqual(self.ed.TargetStart, 1)\r\n\t\tself.assertEqual(self.ed.TargetEnd, 3)\r\n\t\trep = b\"321\"\r\n\t\tself.ed.ReplaceTargetMinimal(len(rep), rep)\r\n\t\tself.assertEqual(self.ed.Contents(), b\"a321d\")\r\n\r\n\t\t# 2: New characters with common prefix and suffix\r\n\t\tself.ed.TargetStart = 1\r\n\t\tself.ed.TargetEnd = 4\r\n\t\trep = b\"3<>1\"\r\n\t\tself.ed.ReplaceTargetMinimal(len(rep), rep)\r\n\t\tself.assertEqual(self.ed.Contents(), b\"a3<>1d\")\r\n\r\n\t\t# 3: Remove characters with common prefix and suffix\r\n\t\tself.ed.TargetStart = 1\r\n\t\tself.ed.TargetEnd = 5\r\n\t\trep = b\"31\"\r\n\t\tself.ed.ReplaceTargetMinimal(len(rep), rep)\r\n\t\tself.assertEqual(self.ed.Contents(), b\"a31d\")\r\n\r\n\t\t# 4: Common prefix\r\n\t\tself.ed.TargetStart = 1\r\n\t\tself.ed.TargetEnd = 3\r\n\t\trep = b\"3bc\"\r\n\t\tself.ed.ReplaceTargetMinimal(len(rep), rep)\r\n\t\tself.assertEqual(self.ed.Contents(), b\"a3bcd\")\r\n\r\n\t\t# 5: Common suffix\r\n\t\tself.ed.TargetStart = 2\r\n\t\tself.ed.TargetEnd = 5\r\n\t\trep = b\"cd\"\r\n\t\tself.ed.ReplaceTargetMinimal(len(rep), rep)\r\n\t\tself.assertEqual(self.ed.Contents(), b\"a3cd\")\r\n\r\n\tdef testTargetWhole(self):\r\n\t\tself.ed.SetContents(b\"abcd\")\r\n\t\tself.ed.TargetStart = 1\r\n\t\tself.ed.TargetEnd = 3\r\n\t\tself.ed.TargetWholeDocument()\r\n\t\tself.assertEqual(self.ed.TargetStart, 0)\r\n\t\tself.assertEqual(self.ed.TargetEnd, 4)\r\n\r\n\tdef testTargetEscape(self):\r\n\t\t# Checks that a literal \\ can be in the replacement. Bug #2959876\r\n\t\tself.ed.SetContents(b\"abcd\")\r\n\t\tself.ed.TargetStart = 1\r\n\t\tself.ed.TargetEnd = 3\r\n\t\trep = b\"\\\\\\\\n\"\r\n\t\tself.ed.ReplaceTargetRE(len(rep), rep)\r\n\t\tself.assertEqual(self.ed.Contents(), b\"a\\\\nd\")\r\n\r\n\tdef testTargetVirtualSpace(self):\r\n\t\tself.ed.SetContents(b\"a\\nbcd\")\r\n\t\tself.assertEqual(self.ed.TargetStart, 0)\r\n\t\tself.assertEqual(self.ed.TargetStartVirtualSpace, 0)\r\n\t\tself.assertEqual(self.ed.TargetEnd, 5)\r\n\t\tself.assertEqual(self.ed.TargetEndVirtualSpace, 0)\r\n\t\tself.ed.TargetStart = 1\r\n\t\tself.ed.TargetStartVirtualSpace = 2\r\n\t\tself.ed.TargetEnd = 3\r\n\t\tself.ed.TargetEndVirtualSpace = 4\r\n\t\t# Adds 2 spaces to first line due to virtual space, and replace 2 characters with 3\r\n\t\trep = b\"12\\n\"\r\n\t\tself.ed.ReplaceTarget(len(rep), rep)\r\n\t\tself.assertEqual(self.ed.Contents(), b\"a  12\\ncd\")\r\n\t\t# 1+2v realized to 3\r\n\t\tself.assertEqual(self.ed.TargetStart, 3)\r\n\t\tself.assertEqual(self.ed.TargetStartVirtualSpace, 0)\r\n\t\tself.assertEqual(self.ed.TargetEnd, 6)\r\n\t\tself.assertEqual(self.ed.TargetEndVirtualSpace, 0)\r\n\r\n\tdef testPointsAndPositions(self):\r\n\t\tself.ed.SetContents(b\"xyz\")\r\n\r\n\t\t# Inter-character positions\r\n\t\t# Start of text\r\n\t\tself.assertEqual(self.ed.PositionFromPoint(1,1), 0)\r\n\t\t# End of text\r\n\t\tself.assertEqual(self.ed.PositionFromPoint(100, 1), 3)\r\n\t\tself.assertEqual(self.ed.PositionFromPointClose(100, 1), -1)\r\n\t\t\r\n\t\t# Character positions\r\n\t\t# Start of text\r\n\t\tself.assertEqual(self.ed.CharPositionFromPoint(0,0), 0)\r\n\t\t# End of text\r\n\t\tself.assertEqual(self.ed.CharPositionFromPoint(100, 0), 3)\r\n\t\tself.assertEqual(self.ed.CharPositionFromPointClose(100, 0), -1)\r\n\r\n\tdef testSelectionFromPoint(self):\r\n\t\tself.ed.SetContents(b\"xxxxxx\")\r\n\t\tself.ed.SetSelection(3, 2)\r\n\t\tself.ed.AddSelection(0, 1)\r\n\t\tself.ed.AddSelection(5, 5)\t# Empty\r\n\t\txStart = self.ed.PointXFromPosition(0, 0)\r\n\t\txEnd = self.ed.PointXFromPosition(0, 5)\r\n\t\twidth = xEnd-xStart\r\n\t\tcharWidth = width // 5\r\n\t\twidthMid = charWidth // 2\r\n\r\n\t\tposMid1 = xStart+widthMid\r\n\t\tself.assertEqual(self.ed.SelectionFromPoint(posMid1, 1), 1)\r\n\t\tposMid2 = xStart+charWidth+widthMid\r\n\t\tself.assertEqual(self.ed.SelectionFromPoint(posMid2, 1), -1)\r\n\t\tposMid3 = xStart+charWidth*2+widthMid\r\n\t\tself.assertEqual(self.ed.SelectionFromPoint(posMid3, 1), 0)\r\n\t\t# Empty selection at 5. Exact and then a few pixels either side\r\n\t\tself.assertEqual(self.ed.SelectionFromPoint(xEnd, 1), 2)\r\n\t\tself.assertEqual(self.ed.SelectionFromPoint(xEnd-2, 1), 2)\r\n\t\tself.assertEqual(self.ed.SelectionFromPoint(xEnd+2, 1), 2)\r\n\t\tself.assertEqual(self.ed.SelectionFromPoint(100, 0), -1)\r\n\r\n\tdef testLinePositions(self):\r\n\t\ttext = b\"ab\\ncd\\nef\"\r\n\t\tnl = b\"\\n\"\r\n\t\tif sys.version_info[0] == 3:\r\n\t\t\tnl = ord(b\"\\n\")\r\n\t\tself.ed.AddText(len(text), text)\r\n\t\tself.assertEqual(self.ed.LineFromPosition(-1), 0)\r\n\t\tline = 0\r\n\t\tfor pos in range(len(text)+1):\r\n\t\t\tself.assertEqual(self.ed.LineFromPosition(pos), line)\r\n\t\t\tif pos < len(text) and text[pos] == nl:\r\n\t\t\t\tline += 1\r\n\r\n\tdef testWordPositions(self):\r\n\t\ttext = b\"ab cd\\tef\"\r\n\t\tself.ed.AddText(len(text), text)\r\n\t\tself.assertEqual(self.ed.WordStartPosition(3, 0), 2)\r\n\t\tself.assertEqual(self.ed.WordStartPosition(4, 0), 3)\r\n\t\tself.assertEqual(self.ed.WordStartPosition(5, 0), 3)\r\n\t\tself.assertEqual(self.ed.WordStartPosition(6, 0), 5)\r\n\r\n\t\tself.assertEqual(self.ed.WordEndPosition(2, 0), 3)\r\n\t\tself.assertEqual(self.ed.WordEndPosition(3, 0), 5)\r\n\t\tself.assertEqual(self.ed.WordEndPosition(4, 0), 5)\r\n\t\tself.assertEqual(self.ed.WordEndPosition(5, 0), 6)\r\n\t\tself.assertEqual(self.ed.WordEndPosition(6, 0), 8)\r\n\r\n\tdef testWordRange(self):\r\n\t\ttext = b\"ab cd\\t++\"\r\n\t\tself.ed.AddText(len(text), text)\r\n\t\tself.assertEqual(self.ed.IsRangeWord(0, 0), 0)\r\n\t\tself.assertEqual(self.ed.IsRangeWord(0, 1), 0)\r\n\t\tself.assertEqual(self.ed.IsRangeWord(0, 2), 1)\r\n\t\tself.assertEqual(self.ed.IsRangeWord(0, 3), 0)\r\n\t\tself.assertEqual(self.ed.IsRangeWord(0, 4), 0)\r\n\t\tself.assertEqual(self.ed.IsRangeWord(0, 5), 1)\r\n\t\tself.assertEqual(self.ed.IsRangeWord(6, 7), 0)\r\n\t\tself.assertEqual(self.ed.IsRangeWord(6, 8), 1)\r\n\r\natInsertion = 0\r\natDeletion = 1\r\nactMayCoalesce = 0x100\r\n\r\nclass TestUndoSaveRestore(unittest.TestCase):\r\n\r\n\tdef setUp(self):\r\n\t\tself.xite = Xite.xiteFrame\r\n\t\tself.ed = self.xite.ed\r\n\t\tself.ed.ClearAll()\r\n\t\tself.ed.EmptyUndoBuffer()\r\n\t\tself.data = b\"xy\"\r\n\r\n\tdef testSave(self):\r\n\t\tself.ed.InsertText(0, self.data)\r\n\t\tself.assertEqual(self.ed.Contents(), b\"xy\")\r\n\t\tself.ed.SetSavePoint()\r\n\t\tself.ed.InsertText(0, self.data)\r\n\t\tself.assertEqual(self.ed.Contents(), b\"xyxy\")\r\n\t\tself.ed.DeleteRange(1, 2)\r\n\t\tself.assertEqual(self.ed.Contents(), b\"xy\")\r\n\t\tself.ed.DeleteRange(1, 1)\r\n\t\tself.assertEqual(self.ed.Contents(), b\"x\")\r\n\r\n\t\tself.assertEqual(self.ed.UndoActions, 4)\r\n\t\tself.assertEqual(self.ed.UndoCurrent, 4)\r\n\t\tself.assertEqual(self.ed.UndoSavePoint, 1)\r\n\t\tself.assertEqual(self.ed.UndoTentative, -1)\r\n\t\tself.assertEqual(self.ed.GetUndoActionType(0), atInsertion)\r\n\t\tself.assertEqual(self.ed.GetUndoActionPosition(0), 0)\r\n\t\tself.assertEqual(bytes(self.ed.GetUndoActionText(0)), self.data)\r\n\t\tself.assertEqual(self.ed.GetUndoActionType(1), atInsertion)\r\n\t\tself.assertEqual(self.ed.GetUndoActionPosition(1), 0)\r\n\t\tself.assertEqual(bytes(self.ed.GetUndoActionText(1)), self.data)\r\n\t\tself.assertEqual(self.ed.GetUndoActionType(2), atDeletion + actMayCoalesce)\r\n\t\tself.assertEqual(self.ed.GetUndoActionPosition(2), 1)\r\n\t\tself.assertEqual(bytes(self.ed.GetUndoActionText(2)), b'yx')\r\n\t\tself.assertEqual(self.ed.GetUndoActionType(3), atDeletion + actMayCoalesce)\r\n\t\tself.assertEqual(self.ed.GetUndoActionPosition(3), 1)\r\n\t\tself.assertEqual(bytes(self.ed.GetUndoActionText(3)), b'y')\r\n\r\n\tdef testRestore(self):\r\n\t\tself.ed.InsertText(0, self.data)\r\n\t\tself.assertEqual(self.ed.Contents(), b\"xy\")\r\n\t\tself.ed.EmptyUndoBuffer()\r\n\r\n\t\tself.ed.PushUndoActionType(atInsertion, 0)\r\n\t\tself.ed.ChangeLastUndoActionText(2, b'xy')\r\n\t\tself.ed.PushUndoActionType(atInsertion, 0)\r\n\t\tself.ed.ChangeLastUndoActionText(2, b'xy')\r\n\t\tself.ed.PushUndoActionType(atDeletion + actMayCoalesce, 1)\r\n\t\tself.ed.ChangeLastUndoActionText(2, b'yx')\r\n\t\tself.ed.PushUndoActionType(atDeletion + actMayCoalesce, 1)\r\n\t\tself.ed.ChangeLastUndoActionText(1, b'y')\r\n\t\t\r\n\t\tself.assertEqual(self.ed.UndoActions, 4)\r\n\t\tself.ed.SetUndoCurrent(1)\r\n\t\tself.ed.SetUndoSavePoint(1)\r\n\t\tself.ed.SetUndoTentative(-1)\r\n\t\t\r\n\t\tself.ed.Undo()\r\n\t\tself.assertEqual(self.ed.UndoCurrent, 0)\r\n\t\tself.assertEqual(self.ed.Contents(), b\"\")\r\n\t\tself.ed.Redo()\r\n\t\tself.assertEqual(self.ed.UndoCurrent, 1)\r\n\t\tself.assertEqual(self.ed.Contents(), b\"xy\")\r\n\t\tself.ed.Redo()\r\n\t\tself.assertEqual(self.ed.UndoCurrent, 2)\r\n\t\tself.assertEqual(self.ed.Contents(), b\"xyxy\")\r\n\t\tself.ed.Redo()\t# Does 2 actions due to mayCoalesce\r\n\t\tself.assertEqual(self.ed.UndoCurrent, 4)\r\n\t\tself.assertEqual(self.ed.Contents(), b\"x\")\r\n\r\n\t\t# No more redo actions\r\n\t\tself.assertEqual(self.ed.CanRedo(), 0)\r\n\r\nclass TestChangeHistory(unittest.TestCase):\r\n\r\n\tdef setUp(self):\r\n\t\tself.xite = Xite.xiteFrame\r\n\t\tself.ed = self.xite.ed\r\n\t\tself.ed.ClearAll()\r\n\t\tself.ed.EmptyUndoBuffer()\r\n\t\tself.data = b\"xy\"\r\n\r\n\tdef testChangeHistory(self):\r\n\t\tself.assertEqual(self.ed.ChangeHistory, 0)\r\n\t\tself.assertEqual(self.ed.UndoCollection, 1)\r\n\t\tself.ed.UndoCollection = 0\r\n\t\tself.assertEqual(self.ed.UndoCollection, 0)\r\n\t\tself.ed.InsertText(0, self.data)\r\n\t\tself.ed.UndoCollection = 1\r\n\t\tself.ed.ChangeHistory = 1\r\n\t\tself.assertEqual(self.ed.ChangeHistory, 1)\r\n\t\tself.ed.InsertText(0, self.data)\r\n\t\tself.ed.DeleteRange(0, 2)\r\n\t\tself.ed.ChangeHistory = 0\r\n\t\tself.assertEqual(self.ed.ChangeHistory, 0)\r\n\t\tself.ed.ChangeHistory = 1\r\n\t\tself.assertEqual(self.ed.ChangeHistory, 1)\r\n\t\tself.ed.Undo()\r\n\r\nMODI = 1\r\nUNDO = 2\r\nREDO = 4\r\n\r\nclass TestContainerUndo(unittest.TestCase):\r\n\r\n\tdef setUp(self):\r\n\t\tself.xite = Xite.xiteFrame\r\n\t\tself.ed = self.xite.ed\r\n\t\tself.ed.ClearAll()\r\n\t\tself.ed.EmptyUndoBuffer()\r\n\t\tself.data = b\"xy\"\r\n\r\n\tdef UndoState(self):\r\n\t\treturn (MODI if self.ed.Modify else 0) | \\\r\n\t\t\t(UNDO if self.ed.CanUndo() else 0) | \\\r\n\t\t\t(REDO if self.ed.CanRedo() else 0)\r\n\r\n\tdef testContainerActNoCoalesce(self):\r\n\t\tself.ed.InsertText(0, self.data)\r\n\t\tself.assertEqual(self.ed.Length, 2)\r\n\t\tself.assertEqual(self.UndoState(), MODI | UNDO)\r\n\t\tself.ed.AddUndoAction(5, 0)\r\n\t\tself.ed.Undo()\r\n\t\tself.assertEqual(self.ed.Length, 2)\r\n\t\tself.assertEqual(self.UndoState(), MODI | UNDO | REDO)\r\n\t\tself.ed.Redo()\r\n\t\tself.assertEqual(self.ed.Length, 2)\r\n\t\tself.assertEqual(self.UndoState(), MODI | UNDO)\r\n\t\tself.ed.Undo()\r\n\r\n\tdef testContainerActCoalesce(self):\r\n\t\tself.ed.InsertText(0, self.data)\r\n\t\tself.ed.AddUndoAction(5, 1)\r\n\t\tself.ed.Undo()\r\n\t\tself.assertEqual(self.ed.Length, 0)\r\n\t\tself.assertEqual(self.UndoState(), REDO)\r\n\t\tself.ed.Redo()\r\n\t\tself.assertEqual(self.ed.Length, 2)\r\n\t\tself.assertEqual(self.UndoState(), MODI | UNDO)\r\n\r\n\tdef testContainerMultiStage(self):\r\n\t\tself.ed.InsertText(0, self.data)\r\n\t\tself.ed.AddUndoAction(5, 1)\r\n\t\tself.ed.AddUndoAction(5, 1)\r\n\t\tself.assertEqual(self.ed.Length, 2)\r\n\t\tself.assertEqual(self.UndoState(), MODI | UNDO)\r\n\t\tself.ed.Undo()\r\n\t\tself.assertEqual(self.ed.Length, 0)\r\n\t\tself.assertEqual(self.UndoState(), REDO)\r\n\t\tself.ed.Redo()\r\n\t\tself.assertEqual(self.ed.Length, 2)\r\n\t\tself.assertEqual(self.UndoState(), MODI | UNDO)\r\n\t\tself.ed.AddUndoAction(5, 1)\r\n\t\tself.assertEqual(self.ed.Length, 2)\r\n\t\tself.assertEqual(self.UndoState(), MODI | UNDO)\r\n\t\tself.ed.Undo()\r\n\t\tself.assertEqual(self.ed.Length, 0)\r\n\t\tself.assertEqual(self.UndoState(), REDO)\r\n\r\n\tdef testContainerMultiStageNoText(self):\r\n\t\tself.ed.AddUndoAction(5, 1)\r\n\t\tself.ed.AddUndoAction(5, 1)\r\n\t\tself.assertEqual(self.UndoState(), MODI | UNDO)\r\n\t\tself.ed.Undo()\r\n\t\tself.assertEqual(self.UndoState(), REDO)\r\n\t\tself.ed.Redo()\r\n\t\tself.assertEqual(self.UndoState(), MODI | UNDO)\r\n\t\tself.ed.AddUndoAction(5, 1)\r\n\t\tself.assertEqual(self.UndoState(), MODI | UNDO)\r\n\t\tself.ed.Undo()\r\n\t\tself.assertEqual(self.UndoState(), REDO)\r\n\r\n\tdef testContainerActCoalesceEnd(self):\r\n\t\tself.ed.AddUndoAction(5, 1)\r\n\t\tself.assertEqual(self.ed.Length, 0)\r\n\t\tself.assertEqual(self.UndoState(), MODI | UNDO)\r\n\t\tself.ed.InsertText(0, self.data)\r\n\t\tself.assertEqual(self.ed.Length, 2)\r\n\t\tself.assertEqual(self.UndoState(), MODI | UNDO)\r\n\t\tself.ed.Undo()\r\n\t\tself.assertEqual(self.ed.Length, 0)\r\n\t\tself.assertEqual(self.UndoState(), REDO)\r\n\t\tself.ed.Redo()\r\n\t\tself.assertEqual(self.ed.Length, 2)\r\n\t\tself.assertEqual(self.UndoState(), MODI | UNDO)\r\n\r\n\tdef testContainerBetweenInsertAndInsert(self):\r\n\t\tself.assertEqual(self.ed.Length, 0)\r\n\t\tself.ed.InsertText(0, self.data)\r\n\t\tself.assertEqual(self.ed.Length, 2)\r\n\t\tself.assertEqual(self.UndoState(), MODI | UNDO)\r\n\t\tself.ed.AddUndoAction(5, 1)\r\n\t\tself.assertEqual(self.ed.Length, 2)\r\n\t\tself.assertEqual(self.UndoState(), MODI | UNDO)\r\n\t\tself.ed.InsertText(2, self.data)\r\n\t\tself.assertEqual(self.ed.Length, 4)\r\n\t\tself.assertEqual(self.UndoState(), MODI | UNDO)\r\n\t\t# Undoes both insertions and the containerAction in the middle\r\n\t\tself.ed.Undo()\r\n\t\tself.assertEqual(self.ed.Length, 0)\r\n\t\tself.assertEqual(self.UndoState(), REDO)\r\n\r\n\tdef testContainerNoCoalesceBetweenInsertAndInsert(self):\r\n\t\tself.assertEqual(self.ed.Length, 0)\r\n\t\tself.ed.InsertText(0, self.data)\r\n\t\tself.assertEqual(self.ed.Length, 2)\r\n\t\tself.assertEqual(self.UndoState(), MODI | UNDO)\r\n\t\tself.ed.AddUndoAction(5, 0)\r\n\t\tself.assertEqual(self.ed.Length, 2)\r\n\t\tself.assertEqual(self.UndoState(), MODI | UNDO)\r\n\t\tself.ed.InsertText(2, self.data)\r\n\t\tself.assertEqual(self.ed.Length, 4)\r\n\t\tself.assertEqual(self.UndoState(), MODI | UNDO)\r\n\t\t# Undo last insertion\r\n\t\tself.ed.Undo()\r\n\t\tself.assertEqual(self.ed.Length, 2)\r\n\t\tself.assertEqual(self.UndoState(), MODI | UNDO | REDO)\r\n\t\t# Undo container\r\n\t\tself.ed.Undo()\r\n\t\tself.assertEqual(self.ed.Length, 2)\r\n\t\tself.assertEqual(self.UndoState(), MODI | UNDO | REDO)\r\n\t\t# Undo first insertion\r\n\t\tself.ed.Undo()\r\n\t\tself.assertEqual(self.ed.Length, 0)\r\n\t\tself.assertEqual(self.UndoState(), REDO)\r\n\r\n\tdef testContainerBetweenDeleteAndDelete(self):\r\n\t\tself.ed.InsertText(0, self.data)\r\n\t\tself.ed.EmptyUndoBuffer()\r\n\t\tself.assertEqual(self.ed.Length, 2)\r\n\t\tself.assertEqual(self.UndoState(), 0)\r\n\t\tself.ed.SetSel(2,2)\r\n\t\tself.ed.DeleteBack()\r\n\t\tself.assertEqual(self.ed.Length, 1)\r\n\t\tself.ed.AddUndoAction(5, 1)\r\n\t\tself.ed.DeleteBack()\r\n\t\tself.assertEqual(self.ed.Length, 0)\r\n\t\t# Undoes both deletions and the containerAction in the middle\r\n\t\tself.ed.Undo()\r\n\t\tself.assertEqual(self.ed.Length, 2)\r\n\t\tself.assertEqual(self.UndoState(), REDO)\r\n\r\n\tdef testContainerBetweenInsertAndDelete(self):\r\n\t\tself.assertEqual(self.ed.Length, 0)\r\n\t\tself.ed.InsertText(0, self.data)\r\n\t\tself.assertEqual(self.ed.Length, 2)\r\n\t\tself.assertEqual(self.UndoState(), MODI | UNDO)\r\n\t\tself.ed.AddUndoAction(5, 1)\r\n\t\tself.assertEqual(self.UndoState(), MODI | UNDO)\r\n\t\tself.ed.SetSel(0,1)\r\n\t\tself.ed.Cut()\r\n\t\tself.assertEqual(self.ed.Length, 1)\r\n\t\tself.assertEqual(self.UndoState(), MODI | UNDO)\r\n\t\tself.ed.Undo()\t# Only undoes the deletion\r\n\t\tself.assertEqual(self.ed.Length, 2)\r\n\t\tself.assertEqual(self.UndoState(), MODI | UNDO | REDO)\r\n\r\nclass TestKeyCommands(unittest.TestCase):\r\n\t\"\"\" These commands are normally assigned to keys and take no arguments \"\"\"\r\n\r\n\tdef setUp(self):\r\n\t\tself.xite = Xite.xiteFrame\r\n\t\tself.ed = self.xite.ed\r\n\t\tself.ed.ClearAll()\r\n\t\tself.ed.EmptyUndoBuffer()\r\n\r\n\tdef selRange(self):\r\n\t\treturn self.ed.CurrentPos, self.ed.Anchor\r\n\r\n\tdef testLineMove(self):\r\n\t\tself.ed.AddText(8, b\"x1\\ny2\\nz3\")\r\n\t\tself.ed.SetSel(0,0)\r\n\t\tself.ed.ChooseCaretX()\r\n\t\tself.ed.LineDown()\r\n\t\tself.ed.LineDown()\r\n\t\tself.assertEqual(self.selRange(), (6, 6))\r\n\t\tself.ed.LineUp()\r\n\t\tself.assertEqual(self.selRange(), (3, 3))\r\n\t\tself.ed.LineDownExtend()\r\n\t\tself.assertEqual(self.selRange(), (6, 3))\r\n\t\tself.ed.LineUpExtend()\r\n\t\tself.ed.LineUpExtend()\r\n\t\tself.assertEqual(self.selRange(), (0, 3))\r\n\r\n\tdef testCharMove(self):\r\n\t\tself.ed.AddText(8, b\"x1\\ny2\\nz3\")\r\n\t\tself.ed.SetSel(0,0)\r\n\t\tself.ed.CharRight()\r\n\t\tself.ed.CharRight()\r\n\t\tself.assertEqual(self.selRange(), (2, 2))\r\n\t\tself.ed.CharLeft()\r\n\t\tself.assertEqual(self.selRange(), (1, 1))\r\n\t\tself.ed.CharRightExtend()\r\n\t\tself.assertEqual(self.selRange(), (2, 1))\r\n\t\tself.ed.CharLeftExtend()\r\n\t\tself.ed.CharLeftExtend()\r\n\t\tself.assertEqual(self.selRange(), (0, 1))\r\n\r\n\tdef testWordMove(self):\r\n\t\tself.ed.AddText(10, b\"a big boat\")\r\n\t\tself.ed.SetSel(3,3)\r\n\t\tself.ed.WordRight()\r\n\t\tself.ed.WordRight()\r\n\t\tself.assertEqual(self.selRange(), (10, 10))\r\n\t\tself.ed.WordLeft()\r\n\t\tself.assertEqual(self.selRange(), (6, 6))\r\n\t\tself.ed.WordRightExtend()\r\n\t\tself.assertEqual(self.selRange(), (10, 6))\r\n\t\tself.ed.WordLeftExtend()\r\n\t\tself.ed.WordLeftExtend()\r\n\t\tself.assertEqual(self.selRange(), (2, 6))\r\n\r\n\tdef testHomeEndMove(self):\r\n\t\tself.ed.AddText(10, b\"a big boat\")\r\n\t\tself.ed.SetSel(3,3)\r\n\t\tself.ed.Home()\r\n\t\tself.assertEqual(self.selRange(), (0, 0))\r\n\t\tself.ed.LineEnd()\r\n\t\tself.assertEqual(self.selRange(), (10, 10))\r\n\t\tself.ed.SetSel(3,3)\r\n\t\tself.ed.HomeExtend()\r\n\t\tself.assertEqual(self.selRange(), (0, 3))\r\n\t\tself.ed.LineEndExtend()\r\n\t\tself.assertEqual(self.selRange(), (10, 3))\r\n\r\n\tdef testVCHome(self):\r\n\t\t# Goes to the indent unless there already when goes to origin\r\n\t\tself.ed.AddText(10, b\"   a big boat\")\r\n\t\tself.ed.SetSel(6,6)\r\n\t\tself.ed.VCHome()\r\n\t\tself.assertEqual(self.selRange(), (3, 3))\r\n\t\tself.ed.VCHome()\r\n\t\tself.assertEqual(self.selRange(), (0, 0))\r\n\t\tself.ed.VCHome()\r\n\t\tself.assertEqual(self.selRange(), (3, 3))\r\n\r\n\tdef testStartEndMove(self):\r\n\t\tself.ed.AddText(10, b\"a\\nbig\\nboat\")\r\n\t\tself.ed.SetSel(3,3)\r\n\t\tself.ed.DocumentStart()\r\n\t\tself.assertEqual(self.selRange(), (0, 0))\r\n\t\tself.ed.DocumentEnd()\r\n\t\tself.assertEqual(self.selRange(), (10, 10))\r\n\t\tself.ed.SetSel(3,3)\r\n\t\tself.ed.DocumentStartExtend()\r\n\t\tself.assertEqual(self.selRange(), (0, 3))\r\n\t\tself.ed.DocumentEndExtend()\r\n\t\tself.assertEqual(self.selRange(), (10, 3))\r\n\r\n\tdef testParagraphMove(self):\r\n\t\texample = b\"a\\n\\nbig\\n\\n\\n\\nboat\"\r\n\t\tself.ed.AddText(len(example), example)\r\n\t\tstart1 = 0\t# Before 'a'\r\n\t\tstart2 = 3\t# Before 'big'\r\n\t\tstart3 = 10\t# Before 'boat'\r\n\r\n\t\t# Paragraph 2 to 1\r\n\t\tself.ed.SetSel(start2, start2)\r\n\t\tself.ed.ParaUp()\r\n\t\tself.assertEqual(self.selRange(), (start1, start1))\r\n\t\tself.ed.ParaDown()\r\n\t\tself.assertEqual(self.selRange(), (start2, start2))\r\n\t\tself.ed.SetSel(start2, start2)\r\n\t\tself.ed.ParaUpExtend()\r\n\t\tself.assertEqual(self.selRange(), (start1, start2))\r\n\t\tself.ed.ParaDownExtend()\r\n\t\tself.assertEqual(self.selRange(), (start2, start2))\r\n\r\n\t\t# Inside paragraph 2 to start paragraph 2\r\n\t\tmid2 = start2+1\r\n\t\tself.ed.SetSel(mid2, mid2)\r\n\t\t# Next line behaved differently before change for bug #2363\r\n\t\tself.ed.ParaUp()\r\n\t\tself.assertEqual(self.selRange(), (start2, start2))\r\n\t\tself.ed.ParaDown()\r\n\t\tself.assertEqual(self.selRange(), (start3, start3))\r\n\t\tself.ed.SetSel(mid2, mid2)\r\n\t\tself.ed.ParaUpExtend()\r\n\t\tself.assertEqual(self.selRange(), (start2, mid2))\r\n\t\tself.ed.ParaDownExtend()\r\n\t\tself.assertEqual(self.selRange(), (start3, mid2))\r\n\r\n\t\t# Paragraph 3 to 2\r\n\t\tself.ed.SetSel(start3, start3)\r\n\t\tself.ed.ParaUp()\r\n\t\tself.assertEqual(self.selRange(), (start2, start2))\r\n\t\tself.ed.ParaDown()\r\n\t\tself.assertEqual(self.selRange(), (start3, start3))\r\n\r\n\r\nclass TestMarkers(unittest.TestCase):\r\n\r\n\tdef setUp(self):\r\n\t\tself.xite = Xite.xiteFrame\r\n\t\tself.ed = self.xite.ed\r\n\t\tself.ed.ClearAll()\r\n\t\tself.ed.EmptyUndoBuffer()\r\n\t\tself.ed.AddText(5, b\"x\\ny\\nz\")\r\n\r\n\tdef testMarker(self):\r\n\t\thandle = self.ed.MarkerAdd(1,1)\r\n\t\tself.assertEqual(self.ed.MarkerLineFromHandle(handle), 1)\r\n\t\tself.ed.MarkerDelete(1,1)\r\n\t\tself.assertEqual(self.ed.MarkerLineFromHandle(handle), -1)\r\n\r\n\tdef testTwiceAddedDelete(self):\r\n\t\thandle = self.ed.MarkerAdd(1,1)\r\n\t\tself.assertNotEqual(handle, -1)\r\n\t\tself.assertEqual(self.ed.MarkerGet(1), 2)\r\n\t\thandle2 = self.ed.MarkerAdd(1,1)\r\n\t\tself.assertNotEqual(handle2, -1)\r\n\t\tself.assertEqual(self.ed.MarkerGet(1), 2)\r\n\t\tself.ed.MarkerDelete(1,1)\r\n\t\tself.assertEqual(self.ed.MarkerGet(1), 2)\r\n\t\tself.ed.MarkerDelete(1,1)\r\n\t\tself.assertEqual(self.ed.MarkerGet(1), 0)\r\n\r\n\tdef testMarkerDeleteAll(self):\r\n\t\th1 = self.ed.MarkerAdd(0,1)\r\n\t\th2 = self.ed.MarkerAdd(1,2)\r\n\t\tself.assertEqual(self.ed.MarkerLineFromHandle(h1), 0)\r\n\t\tself.assertEqual(self.ed.MarkerLineFromHandle(h2), 1)\r\n\t\tself.ed.MarkerDeleteAll(1)\r\n\t\tself.assertEqual(self.ed.MarkerLineFromHandle(h1), -1)\r\n\t\tself.assertEqual(self.ed.MarkerLineFromHandle(h2), 1)\r\n\t\tself.ed.MarkerDeleteAll(-1)\r\n\t\tself.assertEqual(self.ed.MarkerLineFromHandle(h1), -1)\r\n\t\tself.assertEqual(self.ed.MarkerLineFromHandle(h2), -1)\r\n\r\n\tdef testMarkerDeleteHandle(self):\r\n\t\thandle = self.ed.MarkerAdd(0,1)\r\n\t\tself.assertEqual(self.ed.MarkerLineFromHandle(handle), 0)\r\n\t\tself.ed.MarkerDeleteHandle(handle)\r\n\t\tself.assertEqual(self.ed.MarkerLineFromHandle(handle), -1)\r\n\r\n\tdef testMarkerBits(self):\r\n\t\tself.assertEqual(self.ed.MarkerGet(0), 0)\r\n\t\tself.ed.MarkerAdd(0,1)\r\n\t\tself.assertEqual(self.ed.MarkerGet(0), 2)\r\n\t\tself.ed.MarkerAdd(0,2)\r\n\t\tself.assertEqual(self.ed.MarkerGet(0), 6)\r\n\r\n\tdef testMarkerAddSet(self):\r\n\t\tself.assertEqual(self.ed.MarkerGet(0), 0)\r\n\t\tself.ed.MarkerAddSet(0,5)\r\n\t\tself.assertEqual(self.ed.MarkerGet(0), 5)\r\n\t\tself.ed.MarkerDeleteAll(-1)\r\n\r\n\tdef testMarkerNext(self):\r\n\t\tself.assertEqual(self.ed.MarkerNext(0, 2), -1)\r\n\t\th1 = self.ed.MarkerAdd(0,1)\r\n\t\tself.assertNotEqual(h1, -1)\r\n\t\th2 = self.ed.MarkerAdd(2,1)\r\n\t\tself.assertNotEqual(h2, -1)\r\n\t\tself.assertEqual(self.ed.MarkerNext(0, 2), 0)\r\n\t\tself.assertEqual(self.ed.MarkerNext(1, 2), 2)\r\n\t\tself.assertEqual(self.ed.MarkerNext(2, 2), 2)\r\n\t\tself.assertEqual(self.ed.MarkerPrevious(0, 2), 0)\r\n\t\tself.assertEqual(self.ed.MarkerPrevious(1, 2), 0)\r\n\t\tself.assertEqual(self.ed.MarkerPrevious(2, 2), 2)\r\n\r\n\tdef testMarkerNegative(self):\r\n\t\tself.assertEqual(self.ed.MarkerNext(-1, 2), -1)\r\n\r\n\tdef testLineState(self):\r\n\t\tself.assertEqual(self.ed.MaxLineState, 0)\r\n\t\tself.assertEqual(self.ed.GetLineState(0), 0)\r\n\t\tself.assertEqual(self.ed.GetLineState(1), 0)\r\n\t\tself.assertEqual(self.ed.GetLineState(2), 0)\r\n\t\tself.ed.SetLineState(1, 100)\r\n\t\tself.assertNotEqual(self.ed.MaxLineState, 0)\r\n\t\tself.assertEqual(self.ed.GetLineState(0), 0)\r\n\t\tself.assertEqual(self.ed.GetLineState(1), 100)\r\n\t\tself.assertEqual(self.ed.GetLineState(2), 0)\r\n\r\n\tdef testSymbolRetrieval(self):\r\n\t\tself.ed.MarkerDefine(1,3)\r\n\t\tself.assertEqual(self.ed.MarkerSymbolDefined(1), 3)\r\n\r\n\tdef markerFromLineIndex(self, line, index):\r\n\t\t\"\"\" Helper that returns (handle, number) \"\"\"\r\n\t\treturn (self.ed.MarkerHandleFromLine(line, index), self.ed.MarkerNumberFromLine(line, index))\r\n\r\n\tdef markerSetFromLine(self, line):\r\n\t\t\"\"\" Helper that returns set of (handle, number) \"\"\"\r\n\t\tmarkerSet = set()\r\n\t\tindex = 0\r\n\t\twhile 1:\r\n\t\t\tmarker = self.markerFromLineIndex(line, index)\r\n\t\t\tif marker[0] == -1:\r\n\t\t\t\treturn markerSet\r\n\t\t\tmarkerSet.add(marker)\r\n\t\t\tindex += 1\r\n\r\n\tdef testMarkerFromLine(self):\r\n\t\tself.assertEqual(self.ed.MarkerHandleFromLine(1, 0), -1)\r\n\t\tself.assertEqual(self.ed.MarkerNumberFromLine(1, 0), -1)\r\n\t\tself.assertEqual(self.markerFromLineIndex(1, 0), (-1, -1))\r\n\t\tself.assertEqual(self.markerSetFromLine(1), set())\r\n\r\n\t\thandle = self.ed.MarkerAdd(1,10)\r\n\t\tself.assertEqual(self.markerFromLineIndex(1, 0), (handle, 10))\r\n\t\tself.assertEqual(self.markerFromLineIndex(1, 1), (-1, -1))\r\n\t\tself.assertEqual(self.markerSetFromLine(1), {(handle, 10)})\r\n\r\n\t\thandle2 = self.ed.MarkerAdd(1,11)\r\n\t\t# Don't want to depend on ordering so check as sets\r\n\t\tself.assertEqual(self.markerSetFromLine(1), {(handle, 10), (handle2, 11)})\r\n\r\n\t\tself.ed.MarkerDeleteHandle(handle2)\r\n\t\tself.assertEqual(self.markerSetFromLine(1), {(handle, 10)})\r\n\r\nclass TestIndicators(unittest.TestCase):\r\n\r\n\tdef setUp(self):\r\n\t\tself.xite = Xite.xiteFrame\r\n\t\tself.ed = self.xite.ed\r\n\t\tself.ed.ClearAll()\r\n\t\tself.ed.EmptyUndoBuffer()\r\n\r\n\tdef indicatorValueString(self, indicator):\r\n\t\t# create a string with -/X where indicator off/on to make checks simple\r\n\t\treturn \"\".join(\"-X\"[self.ed.IndicatorValueAt(indicator, index)] for index in range(self.ed.TextLength))\r\n\r\n\tdef testSetIndicator(self):\r\n\t\tself.assertEqual(self.ed.IndicGetStyle(0), 1)\r\n\t\tself.assertEqual(self.ed.IndicGetFore(0), 0x007f00)\r\n\t\tself.ed.IndicSetStyle(0, 2)\r\n\t\tself.ed.IndicSetFore(0, 0xff0080)\r\n\t\tself.assertEqual(self.ed.IndicGetStyle(0), 2)\r\n\t\tself.assertEqual(self.ed.IndicGetFore(0), 0xff0080)\r\n\r\n\tdef testIndicatorFill(self):\r\n\t\tself.ed.InsertText(0, b\"abc\")\r\n\t\tself.ed.IndicatorCurrent = 3\r\n\t\tself.ed.IndicatorFillRange(1,1)\r\n\t\tself.assertEqual(self.indicatorValueString(3), \"-X-\")\r\n\t\tself.assertEqual(self.ed.IndicatorStart(3, 0), 0)\r\n\t\tself.assertEqual(self.ed.IndicatorEnd(3, 0), 1)\r\n\t\tself.assertEqual(self.ed.IndicatorStart(3, 1), 1)\r\n\t\tself.assertEqual(self.ed.IndicatorEnd(3, 1), 2)\r\n\t\tself.assertEqual(self.ed.IndicatorStart(3, 2), 2)\r\n\t\tself.assertEqual(self.ed.IndicatorEnd(3, 2), 3)\r\n\r\n\tdef testIndicatorAtEnd(self):\r\n\t\tself.ed.InsertText(0, b\"ab\")\r\n\t\tself.ed.IndicatorCurrent = 3\r\n\t\tself.ed.IndicatorFillRange(1,1)\r\n\t\tself.assertEqual(self.ed.IndicatorValueAt(3, 0), 0)\r\n\t\tself.assertEqual(self.ed.IndicatorValueAt(3, 1), 1)\r\n\t\tself.assertEqual(self.ed.IndicatorStart(3, 0), 0)\r\n\t\tself.assertEqual(self.ed.IndicatorEnd(3, 0), 1)\r\n\t\tself.assertEqual(self.ed.IndicatorStart(3, 1), 1)\r\n\t\tself.assertEqual(self.ed.IndicatorEnd(3, 1), 2)\r\n\t\tself.ed.DeleteRange(1, 1)\r\n\t\t# Now only one character left and does not have indicator so indicator 3 is null\r\n\t\tself.assertEqual(self.ed.IndicatorValueAt(3, 0), 0)\r\n\t\t# Since null, remaining calls return 0\r\n\t\tself.assertEqual(self.ed.IndicatorStart(3, 0), 0)\r\n\t\tself.assertEqual(self.ed.IndicatorEnd(3, 0), 0)\r\n\t\tself.assertEqual(self.ed.IndicatorStart(3, 1), 0)\r\n\t\tself.assertEqual(self.ed.IndicatorEnd(3, 1), 0)\r\n\r\n\tdef testIndicatorMovement(self):\r\n\t\t# Create a two character indicator over \"BC\" in \"aBCd\" and ensure that it doesn't\r\n\t\t# leak onto surrounding characters when insertions made at either end but\r\n\t\t# insertion inside indicator does extend length\r\n\t\tself.ed.InsertText(0, b\"aBCd\")\r\n\t\tself.ed.IndicatorCurrent = 3\r\n\t\tself.ed.IndicatorFillRange(1,2)\r\n\t\tself.assertEqual(self.indicatorValueString(3), \"-XX-\")\r\n\r\n\t\t# Insertion 1 before\r\n\t\tself.ed.InsertText(0, b\"1\")\r\n\t\tself.assertEqual(b\"1aBCd\", self.ed.Contents())\r\n\t\tself.assertEqual(self.indicatorValueString(3), \"--XX-\")\r\n\r\n\t\t# Insertion at start of indicator\r\n\t\tself.ed.InsertText(2, b\"2\")\r\n\t\tself.assertEqual(b\"1a2BCd\", self.ed.Contents())\r\n\t\tself.assertEqual(self.indicatorValueString(3), \"---XX-\")\r\n\r\n\t\t# Insertion inside indicator\r\n\t\tself.ed.InsertText(4, b\"3\")\r\n\t\tself.assertEqual(b\"1a2B3Cd\", self.ed.Contents())\r\n\t\tself.assertEqual(self.indicatorValueString(3), \"---XXX-\")\r\n\r\n\t\t# Insertion at end of indicator\r\n\t\tself.ed.InsertText(6, b\"4\")\r\n\t\tself.assertEqual(b\"1a2B3C4d\", self.ed.Contents())\r\n\t\tself.assertEqual(self.indicatorValueString(3), \"---XXX--\")\r\n\r\n\t\t# Insertion 1 after\r\n\t\tself.ed.InsertText(8, b\"5\")\r\n\t\tself.assertEqual(self.indicatorValueString(3), \"---XXX---\")\r\n\t\tself.assertEqual(b\"1a2B3C4d5\", self.ed.Contents())\r\n\r\n\r\nclass TestScrolling(unittest.TestCase):\r\n\r\n\tdef setUp(self):\r\n\t\tself.xite = Xite.xiteFrame\r\n\t\tself.ed = self.xite.ed\r\n\t\tself.ed.ClearAll()\r\n\t\tself.ed.EmptyUndoBuffer()\r\n\t\t# 150 should be enough lines\r\n\t\tself.ed.InsertText(0, b\"a\" * 150 + b\"\\n\" * 150)\r\n\r\n\tdef testTop(self):\r\n\t\tself.ed.GotoLine(0)\r\n\t\tself.assertEqual(self.ed.FirstVisibleLine, 0)\r\n\r\n\tdef testLineScroll(self):\r\n\t\tself.ed.GotoLine(0)\r\n\t\tself.ed.LineScroll(0, 3)\r\n\t\tself.assertEqual(self.ed.FirstVisibleLine, 3)\r\n\t\tself.ed.LineScroll(0, -2)\r\n\t\tself.assertEqual(self.ed.FirstVisibleLine, 1)\r\n\t\tself.assertEqual(self.ed.XOffset, 0)\r\n\t\tself.ed.LineScroll(10, 0)\r\n\t\tself.assertGreater(self.ed.XOffset, 0)\r\n\t\tscroll_width = float(self.ed.XOffset) / 10\r\n\t\tself.ed.LineScroll(-2, 0)\r\n\t\tself.assertEqual(self.ed.XOffset, scroll_width * 8)\r\n\r\n\tdef testVisibleLine(self):\r\n\t\tself.ed.FirstVisibleLine = 7\r\n\t\tself.assertEqual(self.ed.FirstVisibleLine, 7)\r\n\r\nclass TestSearch(unittest.TestCase):\r\n\r\n\tdef setUp(self):\r\n\t\tself.xite = Xite.xiteFrame\r\n\t\tself.ed = self.xite.ed\r\n\t\tself.ed.ClearAll()\r\n\t\tself.ed.EmptyUndoBuffer()\r\n\t\tself.ed.InsertText(0, b\"a\\tbig boat\\t\")\r\n\r\n\tdef testFind(self):\r\n\t\tpos = self.ed.FindBytes(0, self.ed.Length, b\"zzz\", 0)\r\n\t\tself.assertEqual(pos, -1)\r\n\t\tpos = self.ed.FindBytes(0, self.ed.Length, b\"big\", 0)\r\n\t\tself.assertEqual(pos, 2)\r\n\r\n\tdef testFindFull(self):\r\n\t\tpos = self.ed.FindBytesFull(0, self.ed.Length, b\"zzz\", 0)\r\n\t\tself.assertEqual(pos, -1)\r\n\t\tpos = self.ed.FindBytesFull(0, self.ed.Length, b\"big\", 0)\r\n\t\tself.assertEqual(pos, 2)\r\n\r\n\tdef testFindEmpty(self):\r\n\t\tpos = self.ed.FindBytes(0, self.ed.Length, b\"\", 0)\r\n\t\tself.assertEqual(pos, 0)\r\n\r\n\tdef testCaseFind(self):\r\n\t\tself.assertEqual(self.ed.FindBytes(0, self.ed.Length, b\"big\", 0), 2)\r\n\t\tself.assertEqual(self.ed.FindBytes(0, self.ed.Length, b\"bIg\", 0), 2)\r\n\t\tself.assertEqual(self.ed.FindBytes(0, self.ed.Length, b\"bIg\",\r\n\t\t\tself.ed.SCFIND_MATCHCASE), -1)\r\n\r\n\tdef testWordFind(self):\r\n\t\tself.assertEqual(self.ed.FindBytes(0, self.ed.Length, b\"bi\", 0), 2)\r\n\t\tself.assertEqual(self.ed.FindBytes(0, self.ed.Length, b\"bi\",\r\n\t\t\tself.ed.SCFIND_WHOLEWORD), -1)\r\n\r\n\tdef testWordStartFind(self):\r\n\t\tself.assertEqual(self.ed.FindBytes(0, self.ed.Length, b\"bi\", 0), 2)\r\n\t\tself.assertEqual(self.ed.FindBytes(0, self.ed.Length, b\"bi\",\r\n\t\t\tself.ed.SCFIND_WORDSTART), 2)\r\n\t\tself.assertEqual(self.ed.FindBytes(0, self.ed.Length, b\"ig\", 0), 3)\r\n\t\tself.assertEqual(self.ed.FindBytes(0, self.ed.Length, b\"ig\",\r\n\t\t\tself.ed.SCFIND_WORDSTART), -1)\r\n\r\n\tdef testREFind(self):\r\n\t\tflags = self.ed.SCFIND_REGEXP\r\n\t\tself.assertEqual(-1, self.ed.FindBytes(0, self.ed.Length, b\"b.g\", 0))\r\n\t\tself.assertEqual(2, self.ed.FindBytes(0, self.ed.Length, b\"b.g\", flags))\r\n\t\tself.assertEqual(2, self.ed.FindBytes(0, self.ed.Length, rb\"\\<b.g\\>\", flags))\r\n\t\tself.assertEqual(-1, self.ed.FindBytes(0, self.ed.Length, b\"b[A-Z]g\",\r\n\t\t\tflags | self.ed.SCFIND_MATCHCASE))\r\n\t\tself.assertEqual(2, self.ed.FindBytes(0, self.ed.Length, b\"b[a-z]g\", flags))\r\n\t\tself.assertEqual(6, self.ed.FindBytes(0, self.ed.Length, b\"b[a-z]*t\", flags))\r\n\t\tself.assertEqual(0, self.ed.FindBytes(0, self.ed.Length, b\"^a\", flags))\r\n\t\tself.assertEqual(10, self.ed.FindBytes(0, self.ed.Length, b\"\\t$\", flags))\r\n\t\tself.assertEqual(0, self.ed.FindBytes(0, self.ed.Length, b\"\\\\([a]\\\\).*\\0\", flags))\r\n\r\n\tdef testPosixREFind(self):\r\n\t\tflags = self.ed.SCFIND_REGEXP | self.ed.SCFIND_POSIX\r\n\t\tself.assertEqual(-1, self.ed.FindBytes(0, self.ed.Length, b\"b.g\", 0))\r\n\t\tself.assertEqual(2, self.ed.FindBytes(0, self.ed.Length, b\"b.g\", flags))\r\n\t\tself.assertEqual(2, self.ed.FindBytes(0, self.ed.Length, rb\"\\<b.g\\>\", flags))\r\n\t\tself.assertEqual(-1, self.ed.FindBytes(0, self.ed.Length, b\"b[A-Z]g\",\r\n\t\t\tflags | self.ed.SCFIND_MATCHCASE))\r\n\t\tself.assertEqual(2, self.ed.FindBytes(0, self.ed.Length, b\"b[a-z]g\", flags))\r\n\t\tself.assertEqual(6, self.ed.FindBytes(0, self.ed.Length, b\"b[a-z]*t\", flags))\r\n\t\tself.assertEqual(0, self.ed.FindBytes(0, self.ed.Length, b\"^a\", flags))\r\n\t\tself.assertEqual(10, self.ed.FindBytes(0, self.ed.Length, b\"\\t$\", flags))\r\n\t\tself.assertEqual(0, self.ed.FindBytes(0, self.ed.Length, b\"([a]).*\\0\", flags))\r\n\r\n\tdef testCxx11REFind(self):\r\n\t\tflags = self.ed.SCFIND_REGEXP | self.ed.SCFIND_CXX11REGEX\r\n\t\tself.assertEqual(-1, self.ed.FindBytes(0, self.ed.Length, b\"b.g\", 0))\r\n\t\tself.assertEqual(2, self.ed.FindBytes(0, self.ed.Length, b\"b.g\", flags))\r\n\t\tself.assertEqual(2, self.ed.FindBytes(0, self.ed.Length, rb\"\\bb.g\\b\", flags))\r\n\t\tself.assertEqual(-1, self.ed.FindBytes(0, self.ed.Length, b\"b[A-Z]g\",\r\n\t\t\tflags | self.ed.SCFIND_MATCHCASE))\r\n\t\tself.assertEqual(2, self.ed.FindBytes(0, self.ed.Length, b\"b[a-z]g\", flags))\r\n\t\tself.assertEqual(6, self.ed.FindBytes(0, self.ed.Length, b\"b[a-z]*t\", flags))\r\n\t\tself.assertEqual(0, self.ed.FindBytes(0, self.ed.Length, b\"^a\", flags))\r\n\t\tself.assertEqual(10, self.ed.FindBytes(0, self.ed.Length, b\"\\t$\", flags))\r\n\t\tself.assertEqual(0, self.ed.FindBytes(0, self.ed.Length, b\"([a]).*\\0\", flags))\r\n\r\n\tdef testCxx11RETooMany(self):\r\n\t\t# For bug #2281\r\n\t\tself.ed.InsertText(0, b\"3ringsForTheElvenKing\")\r\n\t\tflags = self.ed.SCFIND_REGEXP | self.ed.SCFIND_CXX11REGEX\r\n\t\t# Only MAXTAG (10) matches allocated, but doesn't modify a vulnerable address until 15\r\n\t\tpattern = b\"(.)\" * 15\r\n\t\tself.assertEqual(0, self.ed.FindBytes(0, self.ed.Length, pattern, flags))\r\n\t\tself.assertEqual(0, self.ed.FindBytes(0, self.ed.Length, pattern, flags))\r\n\r\n\tdef testPhilippeREFind(self):\r\n\t\t# Requires 1.,72\r\n\t\tflags = self.ed.SCFIND_REGEXP\r\n\t\tself.assertEqual(0, self.ed.FindBytes(0, self.ed.Length, rb\"\\w\", flags))\r\n\t\tself.assertEqual(1, self.ed.FindBytes(0, self.ed.Length, rb\"\\W\", flags))\r\n\t\tself.assertEqual(-1, self.ed.FindBytes(0, self.ed.Length, rb\"\\d\", flags))\r\n\t\tself.assertEqual(0, self.ed.FindBytes(0, self.ed.Length, rb\"\\D\", flags))\r\n\t\tself.assertEqual(1, self.ed.FindBytes(0, self.ed.Length, rb\"\\s\", flags))\r\n\t\tself.assertEqual(0, self.ed.FindBytes(0, self.ed.Length, rb\"\\S\", flags))\r\n\t\tself.assertEqual(2, self.ed.FindBytes(0, self.ed.Length, b\"\\x62\", flags))\r\n\r\n\tdef testRENonASCII(self):\r\n\t\tself.ed.InsertText(0, b\"\\xAD\")\r\n\t\tflags = self.ed.SCFIND_REGEXP\r\n\t\tself.assertEqual(-1, self.ed.FindBytes(0, self.ed.Length, b\"\\\\x10\", flags))\r\n\t\tself.assertEqual(2, self.ed.FindBytes(0, self.ed.Length, b\"\\\\x09\", flags))\r\n\t\tself.assertEqual(-1, self.ed.FindBytes(0, self.ed.Length, b\"\\\\xAB\", flags))\r\n\t\tself.assertEqual(0, self.ed.FindBytes(0, self.ed.Length, b\"\\\\xAD\", flags))\r\n\r\n\tdef testMultipleAddSelection(self):\r\n\t\t# Find both 'a'\r\n\t\tself.assertEqual(self.ed.MultipleSelection, 0)\r\n\t\tself.ed.MultipleSelection = 1\r\n\t\tself.assertEqual(self.ed.MultipleSelection, 1)\r\n\t\tself.ed.TargetWholeDocument()\r\n\t\tself.ed.SearchFlags = 0\r\n\t\tself.ed.SetSelection(1, 0)\r\n\t\tself.assertEqual(self.ed.Selections, 1)\r\n\t\tself.ed.MultipleSelectAddNext()\r\n\t\tself.assertEqual(self.ed.Selections, 2)\r\n\t\tself.assertEqual(self.ed.GetSelectionNAnchor(0), 0)\r\n\t\tself.assertEqual(self.ed.GetSelectionNCaret(0), 1)\r\n\t\tself.assertEqual(self.ed.GetSelectionNAnchor(1), 8)\r\n\t\tself.assertEqual(self.ed.GetSelectionNCaret(1), 9)\r\n\t\tself.ed.MultipleSelection = 0\r\n\r\n\tdef testMultipleAddEachSelection(self):\r\n\t\t# Find each 'b'\r\n\t\tself.assertEqual(self.ed.MultipleSelection, 0)\r\n\t\tself.ed.MultipleSelection = 1\r\n\t\tself.assertEqual(self.ed.MultipleSelection, 1)\r\n\t\tself.ed.TargetWholeDocument()\r\n\t\tself.ed.SearchFlags = 0\r\n\t\tself.ed.SetSelection(3, 2)\r\n\t\tself.assertEqual(self.ed.Selections, 1)\r\n\t\tself.ed.MultipleSelectAddEach()\r\n\t\tself.assertEqual(self.ed.Selections, 2)\r\n\t\tself.assertEqual(self.ed.GetSelectionNAnchor(0), 2)\r\n\t\tself.assertEqual(self.ed.GetSelectionNCaret(0), 3)\r\n\t\tself.assertEqual(self.ed.GetSelectionNAnchor(1), 6)\r\n\t\tself.assertEqual(self.ed.GetSelectionNCaret(1), 7)\r\n\t\tself.ed.MultipleSelection = 0\r\n\r\nclass TestRepresentations(unittest.TestCase):\r\n\r\n\tdef setUp(self):\r\n\t\tself.xite = Xite.xiteFrame\r\n\t\tself.ed = self.xite.ed\r\n\t\tself.ed.ClearAll()\r\n\t\tself.ed.EmptyUndoBuffer()\r\n\r\n\tdef testGetControl(self):\r\n\t\tresult = self.ed.GetRepresentation(b\"\\001\")\r\n\t\tself.assertEqual(result, b\"SOH\")\r\n\r\n\tdef testClearControl(self):\r\n\t\tresult = self.ed.GetRepresentation(b\"\\002\")\r\n\t\tself.assertEqual(result, b\"STX\")\r\n\t\tself.ed.ClearRepresentation(b\"\\002\")\r\n\t\tresult = self.ed.GetRepresentation(b\"\\002\")\r\n\t\tself.assertEqual(result, b\"\")\r\n\r\n\tdef testSetOhm(self):\r\n\t\tohmSign = b\"\\xe2\\x84\\xa6\"\r\n\t\tohmExplained = b\"U+2126 \\xe2\\x84\\xa6\"\r\n\t\tself.ed.SetRepresentation(ohmSign, ohmExplained)\r\n\t\tresult = self.ed.GetRepresentation(ohmSign)\r\n\t\tself.assertEqual(result, ohmExplained)\r\n\r\n\tdef testNul(self):\r\n\t\tself.ed.SetRepresentation(b\"\", b\"Nul\")\r\n\t\tresult = self.ed.GetRepresentation(b\"\")\r\n\t\tself.assertEqual(result, b\"Nul\")\r\n\r\n\tdef testAppearance(self):\r\n\t\tohmSign = b\"\\xe2\\x84\\xa6\"\r\n\t\tohmExplained = b\"U+2126 \\xe2\\x84\\xa6\"\r\n\t\tself.ed.SetRepresentation(ohmSign, ohmExplained)\r\n\t\tresult = self.ed.GetRepresentationAppearance(ohmSign)\r\n\t\tself.assertEqual(result, self.ed.SC_REPRESENTATION_BLOB)\r\n\t\tself.ed.SetRepresentationAppearance(ohmSign, self.ed.SC_REPRESENTATION_PLAIN)\r\n\t\tresult = self.ed.GetRepresentationAppearance(ohmSign)\r\n\t\tself.assertEqual(result, self.ed.SC_REPRESENTATION_PLAIN)\r\n\r\n\tdef testColour(self):\r\n\t\tohmSign = b\"\\xe2\\x84\\xa6\"\r\n\t\tohmExplained = b\"U+2126 \\xe2\\x84\\xa6\"\r\n\t\tself.ed.SetRepresentation(ohmSign, ohmExplained)\r\n\t\tresult = self.ed.GetRepresentationColour(ohmSign)\r\n\t\tself.assertEqual(result, 0)\r\n\t\tself.ed.SetRepresentationColour(ohmSign, 0x10203040)\r\n\t\tresult = self.ed.GetRepresentationColour(ohmSign)\r\n\t\tself.assertEqual(result, 0x10203040)\r\n\r\n@unittest.skipUnless(lexersAvailable, \"no lexers included\")\r\nclass TestProperties(unittest.TestCase):\r\n\r\n\tdef setUp(self):\r\n\t\tself.xite = Xite.xiteFrame\r\n\t\tself.ed = self.xite.ed\r\n\t\tself.ed.ClearAll()\r\n\t\tself.ed.EmptyUndoBuffer()\r\n\r\n\tdef testSet(self):\r\n\t\tself.xite.ChooseLexer(b\"cpp\")\r\n\t\t# For Lexilla, only known property names may work\r\n\t\tpropName = b\"lexer.cpp.allow.dollars\"\r\n\t\tself.ed.SetProperty(propName, b\"1\")\r\n\t\tself.assertEqual(self.ed.GetPropertyInt(propName), 1)\r\n\t\tresult = self.ed.GetProperty(propName)\r\n\t\tself.assertEqual(result, b\"1\")\r\n\t\tself.ed.SetProperty(propName, b\"0\")\r\n\t\tself.assertEqual(self.ed.GetPropertyInt(propName), 0)\r\n\t\tresult = self.ed.GetProperty(propName)\r\n\t\tself.assertEqual(result, b\"0\")\r\n\t\t# No longer expands but should at least return the value\r\n\t\tresult = self.ed.GetPropertyExpanded(propName)\r\n\t\tself.assertEqual(result, b\"0\")\r\n\r\nclass TestTextMargin(unittest.TestCase):\r\n\r\n\tdef setUp(self):\r\n\t\tself.xite = Xite.xiteFrame\r\n\t\tself.ed = self.xite.ed\r\n\t\tself.ed.ClearAll()\r\n\t\tself.ed.EmptyUndoBuffer()\r\n\t\tself.txt = b\"abcd\"\r\n\t\tself.ed.AddText(1, b\"x\")\r\n\r\n\tdef testAscent(self):\r\n\t\tlineHeight = self.ed.TextHeight(0)\r\n\t\tself.assertEqual(self.ed.ExtraAscent, 0)\r\n\t\tself.assertEqual(self.ed.ExtraDescent, 0)\r\n\t\tself.ed.ExtraAscent = 1\r\n\t\tself.assertEqual(self.ed.ExtraAscent, 1)\r\n\t\tself.ed.ExtraDescent = 2\r\n\t\tself.assertEqual(self.ed.ExtraDescent, 2)\r\n\t\tlineHeightIncreased = self.ed.TextHeight(0)\r\n\t\tself.assertEqual(lineHeightIncreased, lineHeight + 2 + 1)\r\n\r\n\tdef testTextMargin(self):\r\n\t\tself.ed.MarginSetText(0, self.txt)\r\n\t\tresult = self.ed.MarginGetText(0)\r\n\t\tself.assertEqual(result, self.txt)\r\n\t\tself.ed.MarginTextClearAll()\r\n\r\n\tdef testTextMarginStyle(self):\r\n\t\tself.ed.MarginSetText(0, self.txt)\r\n\t\tself.ed.MarginSetStyle(0, 33)\r\n\t\tself.assertEqual(self.ed.MarginGetStyle(0), 33)\r\n\t\tself.ed.MarginTextClearAll()\r\n\r\n\tdef testTextMarginStyles(self):\r\n\t\tstyles = b\"\\001\\002\\003\\004\"\r\n\t\tself.ed.MarginSetText(0, self.txt)\r\n\t\tself.ed.MarginSetStyles(0, styles)\r\n\t\tresult = self.ed.MarginGetStyles(0)\r\n\t\tself.assertEqual(result, styles)\r\n\t\tself.ed.MarginTextClearAll()\r\n\r\n\tdef testTextMarginStyleOffset(self):\r\n\t\tself.ed.MarginSetStyleOffset(300)\r\n\t\tself.assertEqual(self.ed.MarginGetStyleOffset(), 300)\r\n\r\nclass TestAnnotation(unittest.TestCase):\r\n\r\n\tdef setUp(self):\r\n\t\tself.xite = Xite.xiteFrame\r\n\t\tself.ed = self.xite.ed\r\n\t\tself.ed.ClearAll()\r\n\t\tself.ed.EmptyUndoBuffer()\r\n\t\tself.txt = b\"abcd\"\r\n\t\tself.ed.AddText(1, b\"x\")\r\n\r\n\tdef testTextAnnotation(self):\r\n\t\tself.assertEqual(self.ed.AnnotationGetLines(), 0)\r\n\t\tself.ed.AnnotationSetText(0, self.txt)\r\n\t\tself.assertEqual(self.ed.AnnotationGetLines(), 1)\r\n\t\tresult = self.ed.AnnotationGetText(0)\r\n\t\tself.assertEqual(len(result), 4)\r\n\t\tself.assertEqual(result, self.txt)\r\n\t\tself.ed.AnnotationClearAll()\r\n\r\n\tdef testTextAnnotationStyle(self):\r\n\t\tself.ed.AnnotationSetText(0, self.txt)\r\n\t\tself.ed.AnnotationSetStyle(0, 33)\r\n\t\tself.assertEqual(self.ed.AnnotationGetStyle(0), 33)\r\n\t\tself.ed.AnnotationClearAll()\r\n\r\n\tdef testTextAnnotationStyles(self):\r\n\t\tstyles = b\"\\001\\002\\003\\004\"\r\n\t\tself.ed.AnnotationSetText(0, self.txt)\r\n\t\tself.ed.AnnotationSetStyles(0, styles)\r\n\t\tresult = self.ed.AnnotationGetStyles(0)\r\n\t\tself.assertEqual(result, styles)\r\n\t\tself.ed.AnnotationClearAll()\r\n\r\n\tdef testExtendedStyles(self):\r\n\t\tstart0 = self.ed.AllocateExtendedStyles(0)\r\n\t\tself.assertEqual(start0, 256)\r\n\t\tstart1 = self.ed.AllocateExtendedStyles(10)\r\n\t\tself.assertEqual(start1, 256)\r\n\t\tstart2 = self.ed.AllocateExtendedStyles(20)\r\n\t\tself.assertEqual(start2, start1 + 10)\r\n\t\t# Reset by changing lexer\r\n\t\tself.ed.ReleaseAllExtendedStyles()\r\n\t\tstart0 = self.ed.AllocateExtendedStyles(0)\r\n\t\tself.assertEqual(start0, 256)\r\n\r\n\tdef testTextAnnotationStyleOffset(self):\r\n\t\tself.ed.AnnotationSetStyleOffset(300)\r\n\t\tself.assertEqual(self.ed.AnnotationGetStyleOffset(), 300)\r\n\r\n\tdef testTextAnnotationVisible(self):\r\n\t\tself.assertEqual(self.ed.AnnotationGetVisible(), 0)\r\n\t\tself.ed.AnnotationSetVisible(2)\r\n\t\tself.assertEqual(self.ed.AnnotationGetVisible(), 2)\r\n\t\tself.ed.AnnotationSetVisible(0)\r\n\r\ndef selectionPositionRepresentation(selectionPosition):\r\n\tposition, virtualSpace = selectionPosition\r\n\trepresentation = str(position)\r\n\tif virtualSpace > 0:\r\n\t\trepresentation += \"+\" + str(virtualSpace) + \"v\"\r\n\treturn representation\r\n\r\ndef selectionRangeRepresentation(selectionRange):\r\n\tanchor, caret = selectionRange\r\n\treturn selectionPositionRepresentation(anchor) + \"-\" + selectionPositionRepresentation(caret)\r\n\r\ndef selectionRepresentation(ed, n):\r\n\tanchor = (ed.GetSelectionNAnchor(n), ed.GetSelectionNAnchorVirtualSpace(n))\r\n\tcaret = (ed.GetSelectionNCaret(n), ed.GetSelectionNCaretVirtualSpace(n))\r\n\treturn selectionRangeRepresentation((anchor, caret))\r\n\r\ndef allSelectionsRepresentation(ed):\r\n\treps = [selectionRepresentation(ed, i) for i in range(ed.Selections)]\r\n\treturn ';'.join(reps)\r\n\r\nclass TestMultiSelection(unittest.TestCase):\r\n\r\n\tdef setUp(self):\r\n\t\tself.xite = Xite.xiteFrame\r\n\t\tself.ed = self.xite.ed\r\n\t\tself.ed.ClearAll()\r\n\t\tself.ed.EmptyUndoBuffer()\r\n\t\t# 3 lines of 3 characters\r\n\t\tt = b\"xxx\\nxxx\\nxxx\"\r\n\t\tself.ed.AddText(len(t), t)\r\n\r\n\tdef textOfSelection(self, n):\r\n\t\tself.ed.TargetStart = self.ed.GetSelectionNStart(n)\r\n\t\tself.ed.TargetEnd = self.ed.GetSelectionNEnd(n)\r\n\t\treturn bytes(self.ed.GetTargetText())\r\n\r\n\tdef testSelectionCleared(self):\r\n\t\tself.ed.ClearSelections()\r\n\t\tself.assertEqual(self.ed.Selections, 1)\r\n\t\tself.assertEqual(self.ed.MainSelection, 0)\r\n\t\tself.assertEqual(self.ed.GetSelectionNCaret(0), 0)\r\n\t\tself.assertEqual(self.ed.GetSelectionNAnchor(0), 0)\r\n\r\n\tdef test1Selection(self):\r\n\t\tself.ed.SetSelection(1, 2)\r\n\t\tself.assertEqual(self.ed.Selections, 1)\r\n\t\tself.assertEqual(self.ed.MainSelection, 0)\r\n\t\tself.assertEqual(self.ed.GetSelectionNCaret(0), 1)\r\n\t\tself.assertEqual(self.ed.GetSelectionNAnchor(0), 2)\r\n\t\tself.assertEqual(self.ed.GetSelectionNStart(0), 1)\r\n\t\tself.assertEqual(self.ed.GetSelectionNEnd(0), 2)\r\n\t\tself.ed.SwapMainAnchorCaret()\r\n\t\tself.assertEqual(self.ed.Selections, 1)\r\n\t\tself.assertEqual(self.ed.MainSelection, 0)\r\n\t\tself.assertEqual(self.ed.GetSelectionNCaret(0), 2)\r\n\t\tself.assertEqual(self.ed.GetSelectionNAnchor(0), 1)\r\n\r\n\tdef test1SelectionReversed(self):\r\n\t\tself.ed.SetSelection(2, 1)\r\n\t\tself.assertEqual(self.ed.Selections, 1)\r\n\t\tself.assertEqual(self.ed.MainSelection, 0)\r\n\t\tself.assertEqual(self.ed.GetSelectionNCaret(0), 2)\r\n\t\tself.assertEqual(self.ed.GetSelectionNAnchor(0), 1)\r\n\t\tself.assertEqual(self.ed.GetSelectionNStart(0), 1)\r\n\t\tself.assertEqual(self.ed.GetSelectionNEnd(0), 2)\r\n\r\n\tdef test1SelectionByStartEnd(self):\r\n\t\tself.ed.SetSelectionNStart(0, 2)\r\n\t\tself.ed.SetSelectionNEnd(0, 3)\r\n\t\tself.assertEqual(self.ed.Selections, 1)\r\n\t\tself.assertEqual(self.ed.MainSelection, 0)\r\n\t\tself.assertEqual(self.ed.GetSelectionNAnchor(0), 2)\r\n\t\tself.assertEqual(self.ed.GetSelectionNCaret(0), 3)\r\n\t\tself.assertEqual(self.ed.GetSelectionNStart(0), 2)\r\n\t\tself.assertEqual(self.ed.GetSelectionNEnd(0), 3)\r\n\r\n\tdef test2Selections(self):\r\n\t\tself.ed.SetSelection(1, 2)\r\n\t\tself.ed.AddSelection(4, 5)\r\n\t\tself.assertEqual(self.ed.Selections, 2)\r\n\t\tself.assertEqual(self.ed.MainSelection, 1)\r\n\t\tself.assertEqual(self.ed.GetSelectionNCaret(0), 1)\r\n\t\tself.assertEqual(self.ed.GetSelectionNAnchor(0), 2)\r\n\t\tself.assertEqual(self.ed.GetSelectionNCaret(1), 4)\r\n\t\tself.assertEqual(self.ed.GetSelectionNAnchor(1), 5)\r\n\t\tself.assertEqual(self.ed.GetSelectionNStart(0), 1)\r\n\t\tself.assertEqual(self.ed.GetSelectionNEnd(0), 2)\r\n\t\tself.ed.MainSelection = 0\r\n\t\tself.assertEqual(self.ed.MainSelection, 0)\r\n\t\tself.ed.RotateSelection()\r\n\t\tself.assertEqual(self.ed.MainSelection, 1)\r\n\r\n\tdef testRectangularSelection(self):\r\n\t\tself.ed.RectangularSelectionAnchor = 1\r\n\t\tself.assertEqual(self.ed.RectangularSelectionAnchor, 1)\r\n\t\tself.ed.RectangularSelectionCaret = 10\r\n\t\tself.assertEqual(self.ed.RectangularSelectionCaret, 10)\r\n\t\tself.assertEqual(self.ed.Selections, 3)\r\n\t\tself.assertEqual(self.ed.MainSelection, 2)\r\n\t\tself.assertEqual(self.ed.GetSelectionNAnchor(0), 1)\r\n\t\tself.assertEqual(self.ed.GetSelectionNCaret(0), 2)\r\n\t\tself.assertEqual(self.ed.GetSelectionNAnchor(1), 5)\r\n\t\tself.assertEqual(self.ed.GetSelectionNCaret(1), 6)\r\n\t\tself.assertEqual(self.ed.GetSelectionNAnchor(2), 9)\r\n\t\tself.assertEqual(self.ed.GetSelectionNCaret(2), 10)\r\n\r\n\tdef testVirtualSpace(self):\r\n\t\tself.ed.SetSelection(3, 7)\r\n\t\tself.ed.SetSelectionNCaretVirtualSpace(0, 3)\r\n\t\tself.assertEqual(self.ed.GetSelectionNCaretVirtualSpace(0), 3)\r\n\t\tself.ed.SetSelectionNAnchorVirtualSpace(0, 2)\r\n\t\tself.assertEqual(self.ed.GetSelectionNAnchorVirtualSpace(0), 2)\r\n\t\tself.assertEqual(self.ed.GetSelectionNStartVirtualSpace(0), 3)\r\n\t\tself.assertEqual(self.ed.GetSelectionNEndVirtualSpace(0), 2)\r\n\t\t# Does not check that virtual space is valid by being at end of line\r\n\t\tself.ed.SetSelection(1, 1)\r\n\t\tself.ed.SetSelectionNCaretVirtualSpace(0, 3)\r\n\t\tself.assertEqual(self.ed.GetSelectionNCaretVirtualSpace(0), 3)\r\n\t\tself.assertEqual(self.ed.GetSelectionNStartVirtualSpace(0), 0)\r\n\t\tself.assertEqual(self.ed.GetSelectionNEndVirtualSpace(0), 3)\r\n\r\n\tdef testRectangularVirtualSpace(self):\r\n\t\tself.ed.VirtualSpaceOptions=1\r\n\t\tself.ed.RectangularSelectionAnchor = 3\r\n\t\tself.assertEqual(self.ed.RectangularSelectionAnchor, 3)\r\n\t\tself.ed.RectangularSelectionCaret = 7\r\n\t\tself.assertEqual(self.ed.RectangularSelectionCaret, 7)\r\n\t\tself.ed.RectangularSelectionAnchorVirtualSpace = 1\r\n\t\tself.assertEqual(self.ed.RectangularSelectionAnchorVirtualSpace, 1)\r\n\t\tself.ed.RectangularSelectionCaretVirtualSpace = 10\r\n\t\tself.assertEqual(self.ed.RectangularSelectionCaretVirtualSpace, 10)\r\n\t\tself.assertEqual(self.ed.Selections, 2)\r\n\t\tself.assertEqual(self.ed.MainSelection, 1)\r\n\t\tself.assertEqual(self.ed.GetSelectionNAnchor(0), 3)\r\n\t\tself.assertEqual(self.ed.GetSelectionNAnchorVirtualSpace(0), 1)\r\n\t\tself.assertEqual(self.ed.GetSelectionNCaret(0), 3)\r\n\t\tself.assertEqual(self.ed.GetSelectionNCaretVirtualSpace(0), 10)\r\n\r\n\tdef testRectangularVirtualSpaceOptionOff(self):\r\n\t\t# Same as previous test but virtual space option off so no virtual space in result\r\n\t\tself.ed.VirtualSpaceOptions=0\r\n\t\tself.ed.RectangularSelectionAnchor = 3\r\n\t\tself.assertEqual(self.ed.RectangularSelectionAnchor, 3)\r\n\t\tself.ed.RectangularSelectionCaret = 7\r\n\t\tself.assertEqual(self.ed.RectangularSelectionCaret, 7)\r\n\t\tself.ed.RectangularSelectionAnchorVirtualSpace = 1\r\n\t\tself.assertEqual(self.ed.RectangularSelectionAnchorVirtualSpace, 1)\r\n\t\tself.ed.RectangularSelectionCaretVirtualSpace = 10\r\n\t\tself.assertEqual(self.ed.RectangularSelectionCaretVirtualSpace, 10)\r\n\t\tself.assertEqual(self.ed.Selections, 2)\r\n\t\tself.assertEqual(self.ed.MainSelection, 1)\r\n\t\tself.assertEqual(self.ed.GetSelectionNAnchor(0), 3)\r\n\t\tself.assertEqual(self.ed.GetSelectionNAnchorVirtualSpace(0), 0)\r\n\t\tself.assertEqual(self.ed.GetSelectionNCaret(0), 3)\r\n\t\tself.assertEqual(self.ed.GetSelectionNCaretVirtualSpace(0), 0)\r\n\r\n\tdef testDropSelectionN(self):\r\n\t\tself.ed.SetSelection(1, 2)\r\n\t\t# Only one so dropping has no effect\r\n\t\tself.ed.DropSelectionN(0)\r\n\t\tself.assertEqual(self.ed.Selections, 1)\r\n\t\tself.ed.AddSelection(4, 5)\r\n\t\tself.assertEqual(self.ed.Selections, 2)\r\n\t\t# Outside bounds so no effect\r\n\t\tself.ed.DropSelectionN(2)\r\n\t\tself.assertEqual(self.ed.Selections, 2)\r\n\t\t# Dropping before main so main decreases\r\n\t\tself.ed.DropSelectionN(0)\r\n\t\tself.assertEqual(self.ed.Selections, 1)\r\n\t\tself.assertEqual(self.ed.MainSelection, 0)\r\n\t\tself.assertEqual(self.ed.GetSelectionNCaret(0), 4)\r\n\t\tself.assertEqual(self.ed.GetSelectionNAnchor(0), 5)\r\n\r\n\t\tself.ed.AddSelection(10, 11)\r\n\t\tself.ed.AddSelection(20, 21)\r\n\t\tself.assertEqual(self.ed.Selections, 3)\r\n\t\tself.assertEqual(self.ed.MainSelection, 2)\r\n\t\tself.ed.MainSelection = 1\r\n\t\t# Dropping after main so main does not change\r\n\t\tself.ed.DropSelectionN(2)\r\n\t\tself.assertEqual(self.ed.MainSelection, 1)\r\n\r\n\t\t# Dropping first selection so wraps around to new last.\r\n\t\tself.ed.AddSelection(30, 31)\r\n\t\tself.ed.AddSelection(40, 41)\r\n\t\tself.assertEqual(self.ed.Selections, 4)\r\n\t\tself.ed.MainSelection = 0\r\n\t\tself.ed.DropSelectionN(0)\r\n\t\tself.assertEqual(self.ed.MainSelection, 2)\r\n\r\n\tdef partFromSelection(self, n):\r\n\t\t# Return a tuple (order, text) from a selection part\r\n\t\t# order is a boolean whether the caret is before the anchor\r\n\t\tself.ed.TargetStart = self.ed.GetSelectionNStart(n)\r\n\t\tself.ed.TargetEnd = self.ed.GetSelectionNEnd(n)\r\n\t\treturn (self.ed.GetSelectionNCaret(n) < self.ed.GetSelectionNAnchor(n), self.textOfSelection(n))\r\n\r\n\tdef replacePart(self, n, part):\r\n\t\tstartSelection = self.ed.GetSelectionNStart(n)\r\n\t\tself.ed.TargetStart = startSelection\r\n\t\tself.ed.TargetEnd = self.ed.GetSelectionNEnd(n)\r\n\t\tdirection, text = part\r\n\t\tlength = len(text)\r\n\t\tself.ed.ReplaceTarget(len(text), text)\r\n\t\tif direction:\r\n\t\t\tself.ed.SetSelectionNCaret(n, startSelection)\r\n\t\t\tself.ed.SetSelectionNAnchor(n, startSelection + length)\r\n\t\telse:\r\n\t\t\tself.ed.SetSelectionNAnchor(n, startSelection)\r\n\t\t\tself.ed.SetSelectionNCaret(n, startSelection + length)\r\n\r\n\tdef swapSelections(self):\r\n\t\t# Swap the selections\r\n\t\tpart0 = self.partFromSelection(0)\r\n\t\tpart1 = self.partFromSelection(1)\r\n\r\n\t\tself.replacePart(1, part0)\r\n\t\tself.replacePart(0, part1)\r\n\r\n\tdef checkAdjacentSelections(self, selections, invert):\r\n\t\t# Only called from testAdjacentSelections to try one permutation\r\n\t\tself.ed.ClearAll()\r\n\t\tself.ed.EmptyUndoBuffer()\r\n\t\tt = b\"ab\"\r\n\t\ttexts = (b'b', b'a') if invert else (b'a', b'b')\r\n\t\tself.ed.AddText(len(t), t)\r\n\t\tsel0, sel1 = selections\r\n\t\tself.ed.SetSelection(sel0[0], sel0[1])\r\n\t\tself.ed.AddSelection(sel1[0], sel1[1])\r\n\t\tself.assertEqual(self.ed.Selections, 2)\r\n\t\tself.assertEqual(self.textOfSelection(0), texts[0])\r\n\t\tself.assertEqual(self.textOfSelection(1), texts[1])\r\n\t\tself.swapSelections()\r\n\t\tself.assertEqual(self.ed.Contents(), b'ba')\r\n\t\tself.assertEqual(self.ed.Selections, 2)\r\n\t\tself.assertEqual(self.textOfSelection(0), texts[1])\r\n\t\tself.assertEqual(self.textOfSelection(1), texts[0])\r\n\r\n\tdef testAdjacentSelections(self):\r\n\t\t# For various permutations of selections, try swapping the text and ensure that the\r\n\t\t# selections remain distinct\r\n\t\tself.checkAdjacentSelections(((1, 0),(1, 2)), False)\r\n\t\tself.checkAdjacentSelections(((0, 1),(1, 2)), False)\r\n\t\tself.checkAdjacentSelections(((1, 0),(2, 1)), False)\r\n\t\tself.checkAdjacentSelections(((0, 1),(2, 1)), False)\r\n\r\n\t\t# Reverse order, first selection is after second\r\n\t\tself.checkAdjacentSelections(((1, 2),(1, 0)), True)\r\n\t\tself.checkAdjacentSelections(((1, 2),(0, 1)), True)\r\n\t\tself.checkAdjacentSelections(((2, 1),(1, 0)), True)\r\n\t\tself.checkAdjacentSelections(((2, 1),(0, 1)), True)\r\n\r\n\tdef testInsertBefore(self):\r\n\t\tself.ed.ClearAll()\r\n\t\tt = b\"a\"\r\n\t\tself.ed.AddText(len(t), t)\r\n\t\tself.ed.SetSelection(0, 1)\r\n\t\tself.assertEqual(self.textOfSelection(0), b'a')\r\n\r\n\t\tself.ed.SetTargetRange(0, 0)\r\n\t\tself.ed.ReplaceTarget(1, b'1')\r\n\t\tself.assertEqual(self.ed.Contents(), b'1a')\r\n\t\tself.assertEqual(self.textOfSelection(0), b'a')\r\n\r\n\tdef testInsertAfter(self):\r\n\t\tself.ed.ClearAll()\r\n\t\tt = b\"a\"\r\n\t\tself.ed.AddText(len(t), t)\r\n\t\tself.ed.SetSelection(0, 1)\r\n\t\tself.assertEqual(self.textOfSelection(0), b'a')\r\n\r\n\t\tself.ed.SetTargetRange(1, 1)\r\n\t\tself.ed.ReplaceTarget(1, b'9')\r\n\t\tself.assertEqual(self.ed.Contents(), b'a9')\r\n\t\tself.assertEqual(self.textOfSelection(0), b'a')\r\n\r\n\tdef testInsertBeforeVirtualSpace(self):\r\n\t\tself.ed.SetContents(b\"a\")\r\n\t\tself.ed.SetSelection(1, 1)\r\n\t\tself.ed.SetSelectionNAnchorVirtualSpace(0, 2)\r\n\t\tself.ed.SetSelectionNCaretVirtualSpace(0, 2)\r\n\t\tself.assertEqual(selectionRepresentation(self.ed, 0), \"1+2v-1+2v\")\r\n\t\tself.assertEqual(self.textOfSelection(0), b'')\r\n\r\n\t\t# Append '1'\r\n\t\tself.ed.SetTargetRange(1, 1)\r\n\t\tself.ed.ReplaceTarget(1, b'1')\r\n\t\t# Selection moved on 1, but still empty\r\n\t\tself.assertEqual(selectionRepresentation(self.ed, 0), \"2+1v-2+1v\")\r\n\t\tself.assertEqual(self.ed.Contents(), b'a1')\r\n\t\tself.assertEqual(self.textOfSelection(0), b'')\r\n\r\n\tdef testInsertThroughVirtualSpace(self):\r\n\t\tself.ed.SetContents(b\"a\")\r\n\t\tself.ed.SetSelection(1, 1)\r\n\t\tself.ed.SetSelectionNAnchorVirtualSpace(0, 2)\r\n\t\tself.ed.SetSelectionNCaretVirtualSpace(0, 3)\r\n\t\tself.assertEqual(selectionRepresentation(self.ed, 0), \"1+2v-1+3v\")\r\n\t\tself.assertEqual(self.textOfSelection(0), b'')\r\n\r\n\t\t# Append '1' past current virtual space\r\n\t\tself.ed.SetTargetRange(1, 1)\r\n\t\tself.ed.SetTargetStartVirtualSpace(4)\r\n\t\tself.ed.SetTargetEndVirtualSpace(5)\r\n\t\tself.ed.ReplaceTarget(1, b'1')\r\n\t\t# Virtual space of selection all converted to real positions\r\n\t\tself.assertEqual(selectionRepresentation(self.ed, 0), \"3-4\")\r\n\t\tself.assertEqual(self.ed.Contents(), b'a    1')\r\n\t\tself.assertEqual(self.textOfSelection(0), b' ')\r\n\r\n\r\nclass TestModalSelection(unittest.TestCase):\r\n\r\n\tdef setUp(self):\r\n\t\tself.xite = Xite.xiteFrame\r\n\t\tself.ed = self.xite.ed\r\n\t\tself.ed.ClearAll()\r\n\t\tself.ed.EmptyUndoBuffer()\r\n\t\t# 3 lines of 3 characters\r\n\t\tt = b\"xxx\\nxxx\\nxxx\"\r\n\t\tself.ed.AddText(len(t), t)\r\n\r\n\tdef testCharacterSelection(self):\r\n\t\tself.ed.SetSelection(1, 1)\r\n\t\tself.assertEqual(self.ed.MainSelection, 0)\r\n\t\tself.assertEqual(allSelectionsRepresentation(self.ed), \"1-1\")\r\n\t\tself.ed.SelectionMode = self.ed.SC_SEL_STREAM\r\n\t\tself.assertEqual(self.ed.GetSelectionMode(), self.ed.SC_SEL_STREAM)\r\n\t\tself.assertEqual(self.ed.MoveExtendsSelection, True)\r\n\t\tself.assertEqual(allSelectionsRepresentation(self.ed), \"1-1\")\r\n\t\tself.ed.CharRight()\r\n\t\tself.assertEqual(allSelectionsRepresentation(self.ed), \"1-2\")\r\n\t\tself.ed.LineDown()\r\n\t\tself.assertEqual(allSelectionsRepresentation(self.ed), \"1-6\")\r\n\t\tself.ed.ClearSelections()\r\n\r\n\tdef testChangeSelectionMode(self):\r\n\t\t# Like testCharacterSelection but calling ChangeSelectionMode instead of SetSelectionMode\r\n\t\tself.ed.SetSelection(1, 1)\r\n\t\tself.assertEqual(allSelectionsRepresentation(self.ed), \"1-1\")\r\n\t\tself.ed.ChangeSelectionMode(self.ed.SC_SEL_STREAM)\r\n\t\tself.assertEqual(self.ed.GetSelectionMode(), self.ed.SC_SEL_STREAM)\r\n\t\tself.assertEqual(self.ed.MoveExtendsSelection, False)\r\n\t\tself.assertEqual(allSelectionsRepresentation(self.ed), \"1-1\")\r\n\t\tself.ed.CharRight()\r\n\t\tself.assertEqual(allSelectionsRepresentation(self.ed), \"2-2\")\r\n\t\tself.ed.LineDown()\r\n\t\tself.assertEqual(allSelectionsRepresentation(self.ed), \"6-6\")\r\n\t\tself.ed.ClearSelections()\r\n\r\n\tdef testTurningOffMoveExtendsSelection(self):\r\n\t\tself.ed.SetSelection(1, 1)\r\n\t\tself.ed.SelectionMode = self.ed.SC_SEL_STREAM\r\n\t\tself.ed.CharRight()\r\n\t\tself.ed.LineDown()\r\n\t\tself.assertEqual(self.ed.MoveExtendsSelection, True)\r\n\t\tself.ed.MoveExtendsSelection = False\r\n\t\tself.assertEqual(self.ed.MoveExtendsSelection, False)\r\n\t\tself.ed.CharRight()\r\n\t\tself.assertEqual(allSelectionsRepresentation(self.ed), \"6-6\")\r\n\t\tself.ed.CharRight()\r\n\t\tself.assertEqual(allSelectionsRepresentation(self.ed), \"7-7\")\r\n\t\tself.ed.ClearSelections()\r\n\r\n\tdef testRectangleSelection(self):\r\n\t\tself.ed.SetSelection(1, 1)\r\n\t\tself.assertEqual(self.ed.Selections, 1)\r\n\t\tself.assertEqual(self.ed.MainSelection, 0)\r\n\t\tself.assertEqual(self.ed.GetSelectionNCaret(0), 1)\r\n\t\tself.assertEqual(self.ed.GetSelectionNAnchor(0), 1)\r\n\t\tself.ed.SelectionMode = self.ed.SC_SEL_RECTANGLE\r\n\t\tself.assertEqual(self.ed.GetSelectionMode(), self.ed.SC_SEL_RECTANGLE)\r\n\t\tself.assertEqual(self.ed.Selections, 1)\r\n\t\tself.assertEqual(self.ed.MainSelection, 0)\r\n\t\tself.assertEqual(self.ed.GetSelectionNCaret(0), 1)\r\n\t\tself.assertEqual(self.ed.GetSelectionNAnchor(0), 1)\r\n\t\tself.ed.CharRight()\r\n\t\tself.assertEqual(self.ed.Selections, 1)\r\n\t\tself.assertEqual(self.ed.MainSelection, 0)\r\n\t\tself.assertEqual(self.ed.GetSelectionNCaret(0), 2)\r\n\t\tself.assertEqual(self.ed.GetSelectionNAnchor(0), 1)\r\n\t\tself.ed.LineDown()\r\n\t\tself.assertEqual(self.ed.Selections, 2)\r\n\t\tself.assertEqual(self.ed.MainSelection, 1)\r\n\t\tself.assertEqual(self.ed.GetSelectionNCaret(0), 2)\r\n\t\tself.assertEqual(self.ed.GetSelectionNAnchor(0), 1)\r\n\t\tself.assertEqual(self.ed.GetSelectionNCaret(1), 6)\r\n\t\tself.assertEqual(self.ed.GetSelectionNAnchor(1), 5)\r\n\t\tself.ed.ClearSelections()\r\n\r\n\tdef testLinesSelection(self):\r\n\t\tself.ed.SetSelection(1, 1)\r\n\t\tself.assertEqual(self.ed.Selections, 1)\r\n\t\tself.assertEqual(self.ed.MainSelection, 0)\r\n\t\tself.assertEqual(self.ed.GetSelectionNCaret(0), 1)\r\n\t\tself.assertEqual(self.ed.GetSelectionNAnchor(0), 1)\r\n\t\tself.ed.SelectionMode = self.ed.SC_SEL_LINES\r\n\t\tself.assertEqual(self.ed.GetSelectionMode(), self.ed.SC_SEL_LINES)\r\n\t\tself.assertEqual(self.ed.Selections, 1)\r\n\t\tself.assertEqual(self.ed.MainSelection, 0)\r\n\t\tself.assertEqual(self.ed.GetSelectionNCaret(0), 0)\r\n\t\tself.assertEqual(self.ed.GetSelectionNAnchor(0), 3)\r\n\t\tself.ed.CharRight()\r\n\t\tself.assertEqual(self.ed.Selections, 1)\r\n\t\tself.assertEqual(self.ed.MainSelection, 0)\r\n\t\tself.assertEqual(self.ed.GetSelectionNCaret(0), 0)\r\n\t\tself.assertEqual(self.ed.GetSelectionNAnchor(0), 3)\r\n\t\tself.ed.LineDown()\r\n\t\tself.assertEqual(self.ed.Selections, 1)\r\n\t\tself.assertEqual(self.ed.MainSelection, 0)\r\n\t\tself.assertEqual(self.ed.GetSelectionNCaret(0), 7)\r\n\t\tself.assertEqual(self.ed.GetSelectionNAnchor(0), 0)\r\n\t\tself.ed.ClearSelections()\r\n\r\nclass TestTechnology(unittest.TestCase):\r\n\t\"\"\" These tests are just to ensure that the calls set and retrieve values.\r\n\tThey assume running on a Direct2D compatible version of Windows.\r\n\tThey do not check visual appearance.\r\n\t\"\"\"\r\n\tdef setUp(self):\r\n\t\tself.xite = Xite.xiteFrame\r\n\t\tself.ed = self.xite.ed\r\n\t\tself.ed.ClearAll()\r\n\t\tself.ed.EmptyUndoBuffer()\r\n\r\n\tdef tearDown(self):\r\n\t\tself.ed.ClearAll()\r\n\t\tself.ed.EmptyUndoBuffer()\r\n\r\n\tdef testTechnologyAndBufferedDraw(self):\r\n\t\tself.ed.Technology = self.ed.SC_TECHNOLOGY_DEFAULT\r\n\t\tself.assertEqual(self.ed.GetTechnology(), self.ed.SC_TECHNOLOGY_DEFAULT)\r\n\t\tif sys.platform == \"win32\":\r\n\t\t\tself.ed.Technology = self.ed.SC_TECHNOLOGY_DIRECTWRITE\r\n\t\t\tself.assertEqual(self.ed.GetTechnology(), self.ed.SC_TECHNOLOGY_DIRECTWRITE)\r\n\t\t\tself.assertEqual(self.ed.BufferedDraw, False)\r\n\t\t\tself.ed.Technology = self.ed.SC_TECHNOLOGY_DEFAULT\r\n\t\t\tself.assertEqual(self.ed.GetTechnology(), self.ed.SC_TECHNOLOGY_DEFAULT)\r\n\t\t\tself.assertEqual(self.ed.BufferedDraw, True)\r\n\r\nclass TestStyleAttributes(unittest.TestCase):\r\n\t\"\"\" These tests are just to ensure that the calls set and retrieve values.\r\n\tThey do not check the visual appearance of the style attributes.\r\n\t\"\"\"\r\n\tdef setUp(self):\r\n\t\tself.xite = Xite.xiteFrame\r\n\t\tself.ed = self.xite.ed\r\n\t\tself.ed.ClearAll()\r\n\t\tself.ed.EmptyUndoBuffer()\r\n\t\tself.testColour = 0x171615\r\n\t\tself.testFont = b\"Georgia\"\r\n\t\tself.testRepresentation = \"\\N{BULLET}\".encode(\"utf-8\")\r\n\r\n\tdef tearDown(self):\r\n\t\tself.ed.StyleResetDefault()\r\n\r\n\tdef testFont(self):\r\n\t\tself.ed.StyleSetFont(self.ed.STYLE_DEFAULT, self.testFont)\r\n\t\tself.assertEqual(self.ed.StyleGetFont(self.ed.STYLE_DEFAULT), self.testFont)\r\n\r\n\tdef testSize(self):\r\n\t\tself.ed.StyleSetSize(self.ed.STYLE_DEFAULT, 12)\r\n\t\tself.assertEqual(self.ed.StyleGetSize(self.ed.STYLE_DEFAULT), 12)\r\n\t\tself.assertEqual(self.ed.StyleGetSizeFractional(self.ed.STYLE_DEFAULT), 12*self.ed.SC_FONT_SIZE_MULTIPLIER)\r\n\t\tself.ed.StyleSetSizeFractional(self.ed.STYLE_DEFAULT, 1234)\r\n\t\tself.assertEqual(self.ed.StyleGetSizeFractional(self.ed.STYLE_DEFAULT), 1234)\r\n\r\n\tdef testInvisibleRepresentation(self):\r\n\t\tself.assertEqual(self.ed.StyleGetInvisibleRepresentation(self.ed.STYLE_DEFAULT), b\"\")\r\n\t\tself.ed.StyleSetInvisibleRepresentation(self.ed.STYLE_DEFAULT, self.testRepresentation)\r\n\t\tself.assertEqual(self.ed.StyleGetInvisibleRepresentation(self.ed.STYLE_DEFAULT), self.testRepresentation)\r\n\t\tself.ed.StyleSetInvisibleRepresentation(self.ed.STYLE_DEFAULT, b\"\\000\")\r\n\t\tself.assertEqual(self.ed.StyleGetInvisibleRepresentation(self.ed.STYLE_DEFAULT), b\"\")\r\n\r\n\tdef testBold(self):\r\n\t\tself.ed.StyleSetBold(self.ed.STYLE_DEFAULT, 1)\r\n\t\tself.assertEqual(self.ed.StyleGetBold(self.ed.STYLE_DEFAULT), 1)\r\n\t\tself.assertEqual(self.ed.StyleGetWeight(self.ed.STYLE_DEFAULT), self.ed.SC_WEIGHT_BOLD)\r\n\t\tself.ed.StyleSetWeight(self.ed.STYLE_DEFAULT, 530)\r\n\t\tself.assertEqual(self.ed.StyleGetWeight(self.ed.STYLE_DEFAULT), 530)\r\n\r\n\tdef testItalic(self):\r\n\t\tself.ed.StyleSetItalic(self.ed.STYLE_DEFAULT, 1)\r\n\t\tself.assertEqual(self.ed.StyleGetItalic(self.ed.STYLE_DEFAULT), 1)\r\n\r\n\tdef testUnderline(self):\r\n\t\tself.assertEqual(self.ed.StyleGetUnderline(self.ed.STYLE_DEFAULT), 0)\r\n\t\tself.ed.StyleSetUnderline(self.ed.STYLE_DEFAULT, 1)\r\n\t\tself.assertEqual(self.ed.StyleGetUnderline(self.ed.STYLE_DEFAULT), 1)\r\n\r\n\tdef testFore(self):\r\n\t\tself.assertEqual(self.ed.StyleGetFore(self.ed.STYLE_DEFAULT), 0)\r\n\t\tself.ed.StyleSetFore(self.ed.STYLE_DEFAULT, self.testColour)\r\n\t\tself.assertEqual(self.ed.StyleGetFore(self.ed.STYLE_DEFAULT), self.testColour)\r\n\r\n\tdef testBack(self):\r\n\t\tself.assertEqual(self.ed.StyleGetBack(self.ed.STYLE_DEFAULT), 0xffffff)\r\n\t\tself.ed.StyleSetBack(self.ed.STYLE_DEFAULT, self.testColour)\r\n\t\tself.assertEqual(self.ed.StyleGetBack(self.ed.STYLE_DEFAULT), self.testColour)\r\n\r\n\tdef testEOLFilled(self):\r\n\t\tself.assertEqual(self.ed.StyleGetEOLFilled(self.ed.STYLE_DEFAULT), 0)\r\n\t\tself.ed.StyleSetEOLFilled(self.ed.STYLE_DEFAULT, 1)\r\n\t\tself.assertEqual(self.ed.StyleGetEOLFilled(self.ed.STYLE_DEFAULT), 1)\r\n\r\n\tdef testCharacterSet(self):\r\n\t\tself.ed.StyleSetCharacterSet(self.ed.STYLE_DEFAULT, self.ed.SC_CHARSET_RUSSIAN)\r\n\t\tself.assertEqual(self.ed.StyleGetCharacterSet(self.ed.STYLE_DEFAULT), self.ed.SC_CHARSET_RUSSIAN)\r\n\r\n\tdef testCase(self):\r\n\t\tself.assertEqual(self.ed.StyleGetCase(self.ed.STYLE_DEFAULT), self.ed.SC_CASE_MIXED)\r\n\t\tself.ed.StyleSetCase(self.ed.STYLE_DEFAULT, self.ed.SC_CASE_UPPER)\r\n\t\tself.assertEqual(self.ed.StyleGetCase(self.ed.STYLE_DEFAULT), self.ed.SC_CASE_UPPER)\r\n\t\tself.ed.StyleSetCase(self.ed.STYLE_DEFAULT, self.ed.SC_CASE_LOWER)\r\n\t\tself.assertEqual(self.ed.StyleGetCase(self.ed.STYLE_DEFAULT), self.ed.SC_CASE_LOWER)\r\n\r\n\tdef testVisible(self):\r\n\t\tself.assertEqual(self.ed.StyleGetVisible(self.ed.STYLE_DEFAULT), 1)\r\n\t\tself.ed.StyleSetVisible(self.ed.STYLE_DEFAULT, 0)\r\n\t\tself.assertEqual(self.ed.StyleGetVisible(self.ed.STYLE_DEFAULT), 0)\r\n\r\n\tdef testChangeable(self):\r\n\t\tself.assertEqual(self.ed.StyleGetChangeable(self.ed.STYLE_DEFAULT), 1)\r\n\t\tself.ed.StyleSetChangeable(self.ed.STYLE_DEFAULT, 0)\r\n\t\tself.assertEqual(self.ed.StyleGetChangeable(self.ed.STYLE_DEFAULT), 0)\r\n\r\n\tdef testHotSpot(self):\r\n\t\tself.assertEqual(self.ed.StyleGetHotSpot(self.ed.STYLE_DEFAULT), 0)\r\n\t\tself.ed.StyleSetHotSpot(self.ed.STYLE_DEFAULT, 1)\r\n\t\tself.assertEqual(self.ed.StyleGetHotSpot(self.ed.STYLE_DEFAULT), 1)\r\n\r\n\tdef testFoldDisplayTextStyle(self):\r\n\t\tself.assertEqual(self.ed.FoldDisplayTextGetStyle(), 0)\r\n\t\tself.ed.FoldDisplayTextSetStyle(self.ed.SC_FOLDDISPLAYTEXT_BOXED)\r\n\t\tself.assertEqual(self.ed.FoldDisplayTextGetStyle(), self.ed.SC_FOLDDISPLAYTEXT_BOXED)\r\n\r\n\tdef testDefaultFoldDisplayText(self):\r\n\t\tself.assertEqual(self.ed.GetDefaultFoldDisplayText(), b\"\")\r\n\t\tself.ed.SetDefaultFoldDisplayText(0, b\"...\")\r\n\t\tself.assertEqual(self.ed.GetDefaultFoldDisplayText(), b\"...\")\r\n\r\n\tdef testFontQuality(self):\r\n\t\tself.assertEqual(self.ed.GetFontQuality(), self.ed.SC_EFF_QUALITY_DEFAULT)\r\n\t\tself.ed.SetFontQuality(self.ed.SC_EFF_QUALITY_LCD_OPTIMIZED)\r\n\t\tself.assertEqual(self.ed.GetFontQuality(), self.ed.SC_EFF_QUALITY_LCD_OPTIMIZED)\r\n\r\n\tdef testFontLocale(self):\r\n\t\tinitialLocale = \"en-us\".encode(\"UTF-8\")\r\n\t\ttestLocale = \"zh-Hans\".encode(\"UTF-8\")\r\n\t\tself.assertEqual(self.ed.GetFontLocale(), initialLocale)\r\n\t\tself.ed.FontLocale = testLocale\r\n\t\tself.assertEqual(self.ed.GetFontLocale(), testLocale)\r\n\r\n\tdef testCheckMonospaced(self):\r\n\t\tself.assertEqual(self.ed.StyleGetCheckMonospaced(self.ed.STYLE_DEFAULT), 0)\r\n\t\tself.ed.StyleSetCheckMonospaced(self.ed.STYLE_DEFAULT, 1)\r\n\t\tself.assertEqual(self.ed.StyleGetCheckMonospaced(self.ed.STYLE_DEFAULT), 1)\r\n\r\nclass TestElements(unittest.TestCase):\r\n\t\"\"\" These tests are just to ensure that the calls set and retrieve values.\r\n\tThey do not check the visual appearance of the style attributes.\r\n\t\"\"\"\r\n\tdef setUp(self):\r\n\t\tself.xite = Xite.xiteFrame\r\n\t\tself.ed = self.xite.ed\r\n\t\tself.ed.ClearAll()\r\n\t\tself.ed.EmptyUndoBuffer()\r\n\t\tself.testColourAlpha = 0x18171615\r\n\t\tself.opaque = 0xff000000\r\n\t\tself.dropAlpha = 0x00ffffff\r\n\r\n\tdef tearDown(self):\r\n\t\tpass\r\n\r\n\tdef ElementColour(self, element):\r\n\t\t# & 0xffffffff prevents sign extension issues\r\n\t\treturn self.ed.GetElementColour(element) & 0xffffffff\r\n\r\n\tdef RestoreCaretLine(self):\r\n\t\tself.ed.CaretLineLayer = 0\r\n\t\tself.ed.CaretLineFrame = 0\r\n\t\tself.ed.ResetElementColour(self.ed.SC_ELEMENT_CARET_LINE_BACK)\r\n\t\tself.ed.CaretLineVisibleAlways = False\r\n\r\n\tdef testIsSet(self):\r\n\t\tself.assertFalse(self.ed.GetElementIsSet(self.ed.SC_ELEMENT_SELECTION_TEXT))\r\n\r\n\tdef testAllowsTranslucent(self):\r\n\t\tself.assertFalse(self.ed.GetElementAllowsTranslucent(self.ed.SC_ELEMENT_LIST))\r\n\t\tself.assertTrue(self.ed.GetElementAllowsTranslucent(self.ed.SC_ELEMENT_SELECTION_TEXT))\r\n\r\n\tdef testChanging(self):\r\n\t\tself.ed.SetElementColour(self.ed.SC_ELEMENT_LIST_BACK, self.testColourAlpha)\r\n\t\tself.assertEqual(self.ElementColour(self.ed.SC_ELEMENT_LIST_BACK), self.testColourAlpha)\r\n\t\tself.assertTrue(self.ed.GetElementIsSet(self.ed.SC_ELEMENT_LIST_BACK))\r\n\r\n\tdef testSubline(self):\r\n\t\t# Default is false\r\n\t\tself.assertEqual(self.ed.CaretLineHighlightSubLine, False)\r\n\t\tself.ed.CaretLineHighlightSubLine = True\r\n\t\tself.assertEqual(self.ed.CaretLineHighlightSubLine, True)\r\n\t\tself.ed.CaretLineHighlightSubLine = False\r\n\t\tself.assertEqual(self.ed.CaretLineHighlightSubLine, False)\r\n\r\n\tdef testReset(self):\r\n\t\tself.ed.SetElementColour(self.ed.SC_ELEMENT_SELECTION_ADDITIONAL_TEXT, self.testColourAlpha)\r\n\t\tself.assertEqual(self.ElementColour(self.ed.SC_ELEMENT_SELECTION_ADDITIONAL_TEXT), self.testColourAlpha)\r\n\t\tself.ed.ResetElementColour(self.ed.SC_ELEMENT_SELECTION_ADDITIONAL_TEXT)\r\n\t\tself.assertEqual(self.ElementColour(self.ed.SC_ELEMENT_SELECTION_ADDITIONAL_TEXT), 0)\r\n\t\tself.assertFalse(self.ed.GetElementIsSet(self.ed.SC_ELEMENT_SELECTION_ADDITIONAL_TEXT))\r\n\r\n\tdef testBaseColour(self):\r\n\t\tif sys.platform == \"win32\":\r\n\t\t\t# SC_ELEMENT_LIST* base colours only currently implemented on Win32\r\n\t\t\ttext = self.ed.GetElementBaseColour(self.ed.SC_ELEMENT_LIST)\r\n\t\t\tback = self.ed.GetElementBaseColour(self.ed.SC_ELEMENT_LIST_BACK)\r\n\t\t\tself.assertEqual(text & self.opaque, self.opaque)\r\n\t\t\tself.assertEqual(back & self.opaque, self.opaque)\r\n\t\t\tself.assertNotEqual(text & self.dropAlpha, back & self.dropAlpha)\r\n\t\t\tselText = self.ed.GetElementBaseColour(self.ed.SC_ELEMENT_LIST_SELECTED)\r\n\t\t\tselBack = self.ed.GetElementBaseColour(self.ed.SC_ELEMENT_LIST_SELECTED_BACK)\r\n\t\t\tself.assertEqual(selText & self.opaque, self.opaque)\r\n\t\t\tself.assertEqual(selBack & self.opaque, self.opaque)\r\n\t\t\tself.assertNotEqual(selText & self.dropAlpha, selBack & self.dropAlpha)\r\n\r\n\tdef testSelectionLayer(self):\r\n\t\tself.ed.SelectionLayer = self.ed.SC_LAYER_OVER_TEXT\r\n\t\tself.assertEqual(self.ed.SelectionLayer, self.ed.SC_LAYER_OVER_TEXT)\r\n\t\tself.ed.SelectionLayer = self.ed.SC_LAYER_BASE\r\n\t\tself.assertEqual(self.ed.SelectionLayer, self.ed.SC_LAYER_BASE)\r\n\r\n\tdef testCaretLine(self):\r\n\t\t# Newer Layer / ElementColour API\r\n\t\tself.assertEqual(self.ed.CaretLineLayer, 0)\r\n\t\tself.assertFalse(self.ed.GetElementIsSet(self.ed.SC_ELEMENT_CARET_LINE_BACK))\r\n\t\tself.assertEqual(self.ed.CaretLineFrame, 0)\r\n\t\tself.assertFalse(self.ed.CaretLineVisibleAlways)\r\n\r\n\t\tself.ed.CaretLineLayer = 2\r\n\t\tself.assertEqual(self.ed.CaretLineLayer, 2)\r\n\t\tself.ed.CaretLineFrame = 2\r\n\t\tself.assertEqual(self.ed.CaretLineFrame, 2)\r\n\t\tself.ed.CaretLineVisibleAlways = True\r\n\t\tself.assertTrue(self.ed.CaretLineVisibleAlways)\r\n\t\tself.ed.SetElementColour(self.ed.SC_ELEMENT_CARET_LINE_BACK, self.testColourAlpha)\r\n\t\tself.assertEqual(self.ElementColour(self.ed.SC_ELEMENT_CARET_LINE_BACK), self.testColourAlpha)\r\n\r\n\t\tself.RestoreCaretLine()\r\n\r\n\tdef testCaretLineLayerDiscouraged(self):\r\n\t\t# Check old discouraged APIs\r\n\t\t# This is s bit tricky as there is no clean mapping: parts of the old state are distributed to\r\n\t\t# sometimes-multiple parts of the new state.\r\n\t\tbackColour = 0x102030\r\n\t\tbackColourOpaque = backColour | self.opaque\r\n\t\tself.assertEqual(self.ed.CaretLineVisible, 0)\r\n\t\tself.ed.CaretLineVisible = 1\r\n\t\tself.assertTrue(self.ed.GetElementIsSet(self.ed.SC_ELEMENT_CARET_LINE_BACK))\r\n\t\tself.assertEqual(self.ed.CaretLineVisible, 1)\r\n\t\tself.ed.CaretLineBack = backColour\r\n\t\tself.assertEqual(self.ed.CaretLineBack, backColour)\r\n\t\t# Check with newer API\r\n\t\tself.assertTrue(self.ed.GetElementIsSet(self.ed.SC_ELEMENT_CARET_LINE_BACK))\r\n\t\tself.assertEqual(self.ElementColour(self.ed.SC_ELEMENT_CARET_LINE_BACK), backColourOpaque)\r\n\t\tself.assertEqual(self.ed.CaretLineLayer, 0)\r\n\r\n\t\talpha = 0x7f\r\n\t\tself.ed.CaretLineBackAlpha = alpha\r\n\t\tself.assertEqual(self.ed.CaretLineBackAlpha, alpha)\r\n\t\tbackColourTranslucent = backColour | (alpha << 24)\r\n\t\tself.assertEqual(self.ElementColour(self.ed.SC_ELEMENT_CARET_LINE_BACK), backColourTranslucent)\r\n\t\tself.assertEqual(self.ed.CaretLineLayer, 2)\r\n\r\n\t\tself.ed.CaretLineBackAlpha = 0x100\r\n\t\tself.assertEqual(self.ed.CaretLineBackAlpha, 0x100)\r\n\t\tself.assertEqual(self.ed.CaretLineLayer, 0)\t# SC_ALPHA_NOALPHA moved to base layer\r\n\r\n\t\tself.RestoreCaretLine()\r\n\r\n\t\t# Try other orders\r\n\r\n\t\tself.ed.CaretLineBackAlpha = 0x100\r\n\t\tself.assertEqual(self.ed.CaretLineBackAlpha, 0x100)\r\n\t\tself.assertEqual(self.ed.CaretLineLayer, 0)\t# SC_ALPHA_NOALPHA moved to base layer\r\n\t\tself.ed.CaretLineBack = backColour\r\n\t\tself.assertTrue(self.ed.GetElementIsSet(self.ed.SC_ELEMENT_CARET_LINE_BACK))\r\n\t\tself.ed.CaretLineVisible = 0\r\n\t\tself.assertFalse(self.ed.GetElementIsSet(self.ed.SC_ELEMENT_CARET_LINE_BACK))\r\n\r\n\t\tself.RestoreCaretLine()\r\n\r\n\tdef testMarkerLayer(self):\r\n\t\tself.assertEqual(self.ed.MarkerGetLayer(1), 0)\r\n\t\tself.ed.MarkerSetAlpha(1, 23)\r\n\t\tself.assertEqual(self.ed.MarkerGetLayer(1), 2)\r\n\t\tself.ed.MarkerSetAlpha(1, 0x100)\r\n\t\tself.assertEqual(self.ed.MarkerGetLayer(1), 0)\r\n\r\n\tdef testHotSpot(self):\r\n\t\tself.assertFalse(self.ed.GetElementIsSet(self.ed.SC_ELEMENT_HOT_SPOT_ACTIVE))\r\n\t\tself.assertFalse(self.ed.GetElementIsSet(self.ed.SC_ELEMENT_HOT_SPOT_ACTIVE_BACK))\r\n\t\tself.assertEqual(self.ed.HotspotActiveFore, 0)\r\n\t\tself.assertEqual(self.ed.HotspotActiveBack, 0)\r\n\r\n\t\ttestColour = 0x804020\r\n\t\tresetColour = 0x112233\t# Doesn't get set\r\n\t\tself.ed.SetHotspotActiveFore(1, testColour)\r\n\t\tself.assertEqual(self.ed.HotspotActiveFore, testColour)\r\n\t\tself.assertTrue(self.ed.GetElementIsSet(self.ed.SC_ELEMENT_HOT_SPOT_ACTIVE))\r\n\t\tself.assertEqual(self.ElementColour(self.ed.SC_ELEMENT_HOT_SPOT_ACTIVE), testColour | self.opaque)\r\n\t\tself.ed.SetHotspotActiveFore(0, resetColour)\r\n\t\tself.assertEqual(self.ed.HotspotActiveFore, 0)\r\n\t\tself.assertFalse(self.ed.GetElementIsSet(self.ed.SC_ELEMENT_HOT_SPOT_ACTIVE))\r\n\t\tself.assertEqual(self.ElementColour(self.ed.SC_ELEMENT_HOT_SPOT_ACTIVE), 0)\r\n\r\n\t\ttranslucentColour = 0x50403020\r\n\t\tself.ed.SetElementColour(self.ed.SC_ELEMENT_HOT_SPOT_ACTIVE, translucentColour)\r\n\t\tself.assertEqual(self.ElementColour(self.ed.SC_ELEMENT_HOT_SPOT_ACTIVE), translucentColour)\r\n\t\tself.assertEqual(self.ed.HotspotActiveFore, translucentColour & self.dropAlpha)\r\n\r\n\t\tbackColour = 0x204080\r\n\t\tself.ed.SetHotspotActiveBack(1, backColour)\r\n\t\tself.assertEqual(self.ed.HotspotActiveBack, backColour)\r\n\t\tself.assertTrue(self.ed.GetElementIsSet(self.ed.SC_ELEMENT_HOT_SPOT_ACTIVE_BACK))\r\n\t\tself.assertEqual(self.ElementColour(self.ed.SC_ELEMENT_HOT_SPOT_ACTIVE_BACK), backColour | self.opaque)\r\n\r\n\t\t# Restore\r\n\t\tself.ed.ResetElementColour(self.ed.SC_ELEMENT_HOT_SPOT_ACTIVE)\r\n\t\tself.ed.ResetElementColour(self.ed.SC_ELEMENT_HOT_SPOT_ACTIVE_BACK)\r\n\r\n\tdef testHideSelection(self):\r\n\t\tself.assertEqual(self.ed.SelectionHidden, False)\r\n\t\tself.ed.HideSelection(True)\r\n\t\tself.assertEqual(self.ed.SelectionHidden, True)\r\n\t\tself.ed.HideSelection(False)\t# Restore\r\n\t\tself.assertEqual(self.ed.SelectionHidden, False)\r\n\r\nclass TestIndices(unittest.TestCase):\r\n\tdef setUp(self):\r\n\t\tself.xite = Xite.xiteFrame\r\n\t\tself.ed = self.xite.ed\r\n\t\tself.ed.ClearAll()\r\n\t\tself.ed.EmptyUndoBuffer()\r\n\t\tself.ed.SetCodePage(65001)\r\n\t\t# Text includes one non-BMP character\r\n\t\tt = \"aå\\U00010348ﬂﬔ-\\n\"\r\n\t\tself.tv = t.encode(\"UTF-8\")\r\n\r\n\tdef tearDown(self):\r\n\t\tself.ed.SetCodePage(0)\r\n\r\n\tdef testAllocation(self):\r\n\t\tself.assertEqual(self.ed.GetLineCharacterIndex(), self.ed.SC_LINECHARACTERINDEX_NONE)\r\n\t\tself.ed.AllocateLineCharacterIndex(self.ed.SC_LINECHARACTERINDEX_UTF32)\r\n\t\tself.assertEqual(self.ed.GetLineCharacterIndex(), self.ed.SC_LINECHARACTERINDEX_UTF32)\r\n\t\tself.ed.ReleaseLineCharacterIndex(self.ed.SC_LINECHARACTERINDEX_UTF32)\r\n\t\tself.assertEqual(self.ed.GetLineCharacterIndex(), self.ed.SC_LINECHARACTERINDEX_NONE)\r\n\r\n\tdef testUTF32(self):\r\n\t\tself.assertEqual(self.ed.GetLineCharacterIndex(), self.ed.SC_LINECHARACTERINDEX_NONE)\r\n\t\tself.ed.SetContents(self.tv)\r\n\t\tself.ed.AllocateLineCharacterIndex(self.ed.SC_LINECHARACTERINDEX_UTF32)\r\n\t\tself.assertEqual(self.ed.IndexPositionFromLine(0, self.ed.SC_LINECHARACTERINDEX_UTF32), 0)\r\n\t\tself.assertEqual(self.ed.IndexPositionFromLine(1, self.ed.SC_LINECHARACTERINDEX_UTF32), 7)\r\n\t\tself.ed.ReleaseLineCharacterIndex(self.ed.SC_LINECHARACTERINDEX_UTF32)\r\n\t\tself.assertEqual(self.ed.GetLineCharacterIndex(), self.ed.SC_LINECHARACTERINDEX_NONE)\r\n\r\n\tdef testUTF16(self):\r\n\t\tself.assertEqual(self.ed.GetLineCharacterIndex(), self.ed.SC_LINECHARACTERINDEX_NONE)\r\n\t\tself.ed.SetContents(self.tv)\r\n\t\tself.ed.AllocateLineCharacterIndex(self.ed.SC_LINECHARACTERINDEX_UTF16)\r\n\t\tself.assertEqual(self.ed.IndexPositionFromLine(0, self.ed.SC_LINECHARACTERINDEX_UTF16), 0)\r\n\t\tself.assertEqual(self.ed.IndexPositionFromLine(1, self.ed.SC_LINECHARACTERINDEX_UTF16), 8)\r\n\t\tself.ed.ReleaseLineCharacterIndex(self.ed.SC_LINECHARACTERINDEX_UTF16)\r\n\t\tself.assertEqual(self.ed.GetLineCharacterIndex(), self.ed.SC_LINECHARACTERINDEX_NONE)\r\n\r\n\tdef testBoth(self):\r\n\t\t# Set text before turning indices on\r\n\t\tself.assertEqual(self.ed.GetLineCharacterIndex(), self.ed.SC_LINECHARACTERINDEX_NONE)\r\n\t\tself.ed.SetContents(self.tv)\r\n\t\tself.ed.AllocateLineCharacterIndex(self.ed.SC_LINECHARACTERINDEX_UTF32+self.ed.SC_LINECHARACTERINDEX_UTF16)\r\n\t\tself.assertEqual(self.ed.IndexPositionFromLine(0, self.ed.SC_LINECHARACTERINDEX_UTF32), 0)\r\n\t\tself.assertEqual(self.ed.IndexPositionFromLine(1, self.ed.SC_LINECHARACTERINDEX_UTF32), 7)\r\n\t\tself.assertEqual(self.ed.IndexPositionFromLine(0, self.ed.SC_LINECHARACTERINDEX_UTF16), 0)\r\n\t\tself.assertEqual(self.ed.IndexPositionFromLine(1, self.ed.SC_LINECHARACTERINDEX_UTF16), 8)\r\n\t\t# Test the inverse: position->line\r\n\t\tself.assertEqual(self.ed.LineFromIndexPosition(0, self.ed.SC_LINECHARACTERINDEX_UTF32), 0)\r\n\t\tself.assertEqual(self.ed.LineFromIndexPosition(7, self.ed.SC_LINECHARACTERINDEX_UTF32), 1)\r\n\t\tself.assertEqual(self.ed.LineFromIndexPosition(0, self.ed.SC_LINECHARACTERINDEX_UTF16), 0)\r\n\t\tself.assertEqual(self.ed.LineFromIndexPosition(8, self.ed.SC_LINECHARACTERINDEX_UTF16), 1)\r\n\t\tself.ed.ReleaseLineCharacterIndex(self.ed.SC_LINECHARACTERINDEX_UTF32+self.ed.SC_LINECHARACTERINDEX_UTF16)\r\n\t\tself.assertEqual(self.ed.GetLineCharacterIndex(), self.ed.SC_LINECHARACTERINDEX_NONE)\r\n\r\n\tdef testMaintenance(self):\r\n\t\t# Set text after turning indices on\r\n\t\tself.assertEqual(self.ed.GetLineCharacterIndex(), self.ed.SC_LINECHARACTERINDEX_NONE)\r\n\t\tself.ed.AllocateLineCharacterIndex(self.ed.SC_LINECHARACTERINDEX_UTF32+self.ed.SC_LINECHARACTERINDEX_UTF16)\r\n\t\tself.ed.SetContents(self.tv)\r\n\t\tself.assertEqual(self.ed.IndexPositionFromLine(0, self.ed.SC_LINECHARACTERINDEX_UTF32), 0)\r\n\t\tself.assertEqual(self.ed.IndexPositionFromLine(1, self.ed.SC_LINECHARACTERINDEX_UTF32), 7)\r\n\t\tself.assertEqual(self.ed.IndexPositionFromLine(0, self.ed.SC_LINECHARACTERINDEX_UTF16), 0)\r\n\t\tself.assertEqual(self.ed.IndexPositionFromLine(1, self.ed.SC_LINECHARACTERINDEX_UTF16), 8)\r\n\t\tself.ed.ReleaseLineCharacterIndex(self.ed.SC_LINECHARACTERINDEX_UTF32+self.ed.SC_LINECHARACTERINDEX_UTF16)\r\n\t\tself.assertEqual(self.ed.GetLineCharacterIndex(), self.ed.SC_LINECHARACTERINDEX_NONE)\r\n\r\nclass TestCharacterNavigation(unittest.TestCase):\r\n\tdef setUp(self):\r\n\t\tself.xite = Xite.xiteFrame\r\n\t\tself.ed = self.xite.ed\r\n\t\tself.ed.ClearAll()\r\n\t\tself.ed.EmptyUndoBuffer()\r\n\t\tself.ed.SetCodePage(65001)\r\n\r\n\tdef tearDown(self):\r\n\t\tself.ed.SetCodePage(0)\r\n\r\n\tdef testBeforeAfter(self):\r\n\t\tt = \"aåﬂﬔ-\"\r\n\t\ttv = t.encode(\"UTF-8\")\r\n\t\tself.ed.SetContents(tv)\r\n\t\tpos = 0\r\n\t\tfor i in range(len(t)-1):\r\n\t\t\tafter = self.ed.PositionAfter(pos)\r\n\t\t\tself.assertTrue(after > i)\r\n\t\t\tback = self.ed.PositionBefore(after)\r\n\t\t\tself.assertEqual(pos, back)\r\n\t\t\tpos = after\r\n\r\n\tdef testRelative(self):\r\n\t\t# \\x61  \\xc3\\xa5  \\xef\\xac\\x82   \\xef\\xac\\x94   \\x2d\r\n\t\tt = \"aåﬂﬔ-\"\r\n\t\ttv = t.encode(\"UTF-8\")\r\n\t\tself.ed.SetContents(tv)\r\n\t\tself.assertEqual(self.ed.PositionRelative(1, 2), 6)\r\n\t\tself.assertEqual(self.ed.CountCharacters(1, 6), 2)\r\n\t\tself.assertEqual(self.ed.PositionRelative(6, -2), 1)\r\n\t\tpos = 0\r\n\t\tprevious = 0\r\n\t\tfor i in range(1, len(t)):\r\n\t\t\tafter = self.ed.PositionRelative(pos, i)\r\n\t\t\tself.assertTrue(after > pos)\r\n\t\t\tself.assertTrue(after > previous)\r\n\t\t\tprevious = after\r\n\t\tpos = len(t)\r\n\t\tprevious = pos\r\n\t\tfor i in range(1, len(t)-1):\r\n\t\t\tafter = self.ed.PositionRelative(pos, -i)\r\n\t\t\tself.assertTrue(after < pos)\r\n\t\t\tself.assertTrue(after < previous)\r\n\t\t\tprevious = after\r\n\r\n\tdef testRelativeNonBOM(self):\r\n\t\t# \\x61  \\xF0\\x90\\x8D\\x88  \\xef\\xac\\x82   \\xef\\xac\\x94   \\x2d\r\n\t\tt = \"a\\U00010348ﬂﬔ-\"\r\n\t\ttv = t.encode(\"UTF-8\")\r\n\t\tself.ed.SetContents(tv)\r\n\t\tself.assertEqual(self.ed.PositionRelative(1, 2), 8)\r\n\t\tself.assertEqual(self.ed.CountCharacters(1, 8), 2)\r\n\t\tself.assertEqual(self.ed.CountCodeUnits(1, 8), 3)\r\n\t\tself.assertEqual(self.ed.PositionRelative(8, -2), 1)\r\n\t\tself.assertEqual(self.ed.PositionRelativeCodeUnits(8, -3), 1)\r\n\t\tpos = 0\r\n\t\tprevious = 0\r\n\t\tfor i in range(1, len(t)):\r\n\t\t\tafter = self.ed.PositionRelative(pos, i)\r\n\t\t\tself.assertTrue(after > pos)\r\n\t\t\tself.assertTrue(after > previous)\r\n\t\t\tprevious = after\r\n\t\tpos = len(t)\r\n\t\tprevious = pos\r\n\t\tfor i in range(1, len(t)-1):\r\n\t\t\tafter = self.ed.PositionRelative(pos, -i)\r\n\t\t\tself.assertTrue(after < pos)\r\n\t\t\tself.assertTrue(after <= previous)\r\n\t\t\tprevious = after\r\n\r\n\tdef testLineEnd(self):\r\n\t\tt = \"a\\r\\nb\\nc\"\r\n\t\ttv = t.encode(\"UTF-8\")\r\n\t\tself.ed.SetContents(tv)\r\n\t\tfor i in range(0, len(t)):\r\n\t\t\tself.assertEqual(self.ed.CountCharacters(0, i), i)\r\n\r\nclass TestCaseMapping(unittest.TestCase):\r\n\tdef setUp(self):\r\n\t\tself.xite = Xite.xiteFrame\r\n\t\tself.ed = self.xite.ed\r\n\t\tself.ed.ClearAll()\r\n\t\tself.ed.EmptyUndoBuffer()\r\n\r\n\tdef tearDown(self):\r\n\t\tself.ed.SetCodePage(0)\r\n\t\tself.ed.StyleSetCharacterSet(self.ed.STYLE_DEFAULT, self.ed.SC_CHARSET_DEFAULT)\r\n\r\n\tdef testEmpty(self):\r\n\t\t# Trying to upper case an empty string caused a crash at one stage\r\n\t\tt = b\"x\"\r\n\t\tself.ed.SetContents(t)\r\n\t\tself.ed.UpperCase()\r\n\t\tself.assertEqual(self.ed.Contents(), b\"x\")\r\n\r\n\tdef testASCII(self):\r\n\t\tt = b\"x\"\r\n\t\tself.ed.SetContents(t)\r\n\t\tself.ed.SetSel(0,1)\r\n\t\tself.ed.UpperCase()\r\n\t\tself.assertEqual(self.ed.Contents(), b\"X\")\r\n\r\n\tdef testLatin1(self):\r\n\t\tt = \"å\".encode(\"Latin-1\")\r\n\t\tr = \"Å\".encode(\"Latin-1\")\r\n\t\tself.ed.SetContents(t)\r\n\t\tself.ed.SetSel(0,1)\r\n\t\tself.ed.UpperCase()\r\n\t\tself.assertEqual(self.ed.Contents(), r)\r\n\r\n\tdef testRussian(self):\r\n\t\tif sys.platform == \"win32\":\r\n\t\t\tself.ed.StyleSetCharacterSet(self.ed.STYLE_DEFAULT, self.ed.SC_CHARSET_RUSSIAN)\r\n\t\telse:\r\n\t\t\tself.ed.StyleSetCharacterSet(self.ed.STYLE_DEFAULT, self.ed.SC_CHARSET_CYRILLIC)\r\n\t\tt = \"Б\".encode(\"Windows-1251\")\r\n\t\tr = \"б\".encode(\"Windows-1251\")\r\n\t\tself.ed.SetContents(t)\r\n\t\tself.ed.SetSel(0,1)\r\n\t\tself.ed.LowerCase()\r\n\t\tself.assertEqual(self.ed.Contents(), r)\r\n\r\n\tdef testUTF(self):\r\n\t\tself.ed.SetCodePage(65001)\r\n\t\tt = \"å\".encode(\"UTF-8\")\r\n\t\tr = \"Å\".encode(\"UTF-8\")\r\n\t\tself.ed.SetContents(t)\r\n\t\tself.ed.SetSel(0,2)\r\n\t\tself.ed.UpperCase()\r\n\t\tself.assertEqual(self.ed.Contents(), r)\r\n\r\n\tdef testUTFDifferentLength(self):\r\n\t\tself.ed.SetCodePage(65001)\r\n\t\tt = \"ı\".encode(\"UTF-8\")\r\n\t\tr = \"I\".encode(\"UTF-8\")\r\n\t\tself.ed.SetContents(t)\r\n\t\tself.assertEqual(self.ed.Length, 2)\r\n\t\tself.ed.SetSel(0,2)\r\n\t\tself.ed.UpperCase()\r\n\t\tself.assertEqual(self.ed.Length, 1)\r\n\t\tself.assertEqual(self.ed.Contents(), r)\r\n\r\n\tdef testUTFGrows(self):\r\n\t\t# This crashed at one point in debug builds due to looking past end of shorter string\r\n\t\tself.ed.SetCodePage(65001)\r\n\t\t# ﬖ is a single character ligature taking 3 bytes in UTF8: EF AC 96\r\n\t\tt = 'ﬖﬖ'.encode(\"UTF-8\")\r\n\t\tself.ed.SetContents(t)\r\n\t\tself.assertEqual(self.ed.Length, 6)\r\n\t\tself.ed.SetSel(0,self.ed.Length)\r\n\t\tself.ed.UpperCase()\r\n\t\t# To convert to upper case the ligature is separated into վ and ն then uppercased to Վ and Ն\r\n\t\t# each of which takes 2 bytes in UTF-8: D5 8E D5 86\r\n\t\tr = 'ՎՆՎՆ'.encode(\"UTF-8\")\r\n\t\tself.assertEqual(self.ed.Length, 8)\r\n\t\tself.assertEqual(self.ed.Contents(), r)\r\n\t\tself.assertEqual(self.ed.SelectionEnd, self.ed.Length)\r\n\r\n\tdef testUTFShrinks(self):\r\n\t\tself.ed.SetCodePage(65001)\r\n\t\t# ﬁ is a single character ligature taking 3 bytes in UTF8: EF AC 81\r\n\t\tt = 'ﬁﬁ'.encode(\"UTF-8\")\r\n\t\tself.ed.SetContents(t)\r\n\t\tself.assertEqual(self.ed.Length, 6)\r\n\t\tself.ed.SetSel(0,self.ed.Length)\r\n\t\tself.ed.UpperCase()\r\n\t\t# To convert to upper case the ligature is separated into f and i then uppercased to F and I\r\n\t\t# each of which takes 1 byte in UTF-8: 46 49\r\n\t\tr = 'FIFI'.encode(\"UTF-8\")\r\n\t\tself.assertEqual(self.ed.Length, 4)\r\n\t\tself.assertEqual(self.ed.Contents(), r)\r\n\t\tself.assertEqual(self.ed.SelectionEnd, self.ed.Length)\r\n\r\nclass TestCaseInsensitiveSearch(unittest.TestCase):\r\n\tdef setUp(self):\r\n\t\tself.xite = Xite.xiteFrame\r\n\t\tself.ed = self.xite.ed\r\n\t\tself.ed.ClearAll()\r\n\t\tself.ed.EmptyUndoBuffer()\r\n\r\n\tdef tearDown(self):\r\n\t\tself.ed.SetCodePage(0)\r\n\t\tself.ed.StyleSetCharacterSet(self.ed.STYLE_DEFAULT, self.ed.SC_CHARSET_DEFAULT)\r\n\r\n\tdef testEmpty(self):\r\n\t\ttext = b\" x X\"\r\n\t\tsearchString = b\"\"\r\n\t\tself.ed.SetContents(text)\r\n\t\tself.ed.TargetStart = 0\r\n\t\tself.ed.TargetEnd = self.ed.Length-1\r\n\t\tself.ed.SearchFlags = 0\r\n\t\tpos = self.ed.SearchInTarget(len(searchString), searchString)\r\n\t\tself.assertEqual(0, pos)\r\n\r\n\tdef testASCII(self):\r\n\t\ttext = b\" x X\"\r\n\t\tsearchString = b\"X\"\r\n\t\tself.ed.SetContents(text)\r\n\t\tself.ed.TargetStart = 0\r\n\t\tself.ed.TargetEnd = self.ed.Length-1\r\n\t\tself.ed.SearchFlags = 0\r\n\t\tpos = self.ed.SearchInTarget(len(searchString), searchString)\r\n\t\tself.assertEqual(1, pos)\r\n\r\n\tdef testLatin1(self):\r\n\t\ttext = \"Frånd Åå\".encode(\"Latin-1\")\r\n\t\tsearchString = \"Å\".encode(\"Latin-1\")\r\n\t\tself.ed.SetContents(text)\r\n\t\tself.ed.TargetStart = 0\r\n\t\tself.ed.TargetEnd = self.ed.Length-1\r\n\t\tself.ed.SearchFlags = 0\r\n\t\tpos = self.ed.SearchInTarget(len(searchString), searchString)\r\n\t\tself.assertEqual(2, pos)\r\n\r\n\tdef testRussian(self):\r\n\t\tself.ed.StyleSetCharacterSet(self.ed.STYLE_DEFAULT, self.ed.SC_CHARSET_RUSSIAN)\r\n\t\ttext = \"=(Б tex б)\".encode(\"Windows-1251\")\r\n\t\tsearchString = \"б\".encode(\"Windows-1251\")\r\n\t\tself.ed.SetContents(text)\r\n\t\tself.ed.TargetStart = 0\r\n\t\tself.ed.TargetEnd = self.ed.Length-1\r\n\t\tself.ed.SearchFlags = 0\r\n\t\tpos = self.ed.SearchInTarget(len(searchString), searchString)\r\n\t\tself.assertEqual(2, pos)\r\n\r\n\tdef testUTF(self):\r\n\t\tself.ed.SetCodePage(65001)\r\n\t\ttext = \"Frånd Åå\".encode(\"UTF-8\")\r\n\t\tsearchString = \"Å\".encode(\"UTF-8\")\r\n\t\tself.ed.SetContents(text)\r\n\t\tself.ed.TargetStart = 0\r\n\t\tself.ed.TargetEnd = self.ed.Length-1\r\n\t\tself.ed.SearchFlags = 0\r\n\t\tpos = self.ed.SearchInTarget(len(searchString), searchString)\r\n\t\tself.assertEqual(2, pos)\r\n\r\n\tdef testUTFDifferentLength(self):\r\n\t\t# Searching for a two byte string finds a single byte\r\n\t\tself.ed.SetCodePage(65001)\r\n\t\t# two byte string \"ſ\" single byte \"s\"\r\n\t\ttext = \"Frånds Ååſ $\".encode(\"UTF-8\")\r\n\t\tsearchString = \"ſ\".encode(\"UTF-8\")\r\n\t\tfirstPosition = len(\"Frånd\".encode(\"UTF-8\"))\r\n\t\tself.assertEqual(len(searchString), 2)\r\n\t\tself.ed.SetContents(text)\r\n\t\tself.ed.TargetStart = 0\r\n\t\tself.ed.TargetEnd = self.ed.Length-1\r\n\t\tself.ed.SearchFlags = 0\r\n\t\tpos = self.ed.SearchInTarget(len(searchString), searchString)\r\n\t\tself.assertEqual(firstPosition, pos)\r\n\t\tself.assertEqual(firstPosition+1, self.ed.TargetEnd)\r\n\r\n@unittest.skipUnless(lexersAvailable, \"no lexers included\")\r\nclass TestLexer(unittest.TestCase):\r\n\tdef setUp(self):\r\n\t\tself.xite = Xite.xiteFrame\r\n\t\tself.ed = self.xite.ed\r\n\t\tself.ed.ClearAll()\r\n\t\tself.ed.EmptyUndoBuffer()\r\n\r\n\tdef testLexerNumber(self):\r\n\t\tself.xite.ChooseLexer(b\"cpp\")\r\n\t\tself.assertEqual(self.ed.GetLexer(), self.ed.SCLEX_CPP)\r\n\r\n\tdef testLexerName(self):\r\n\t\tself.xite.ChooseLexer(b\"cpp\")\r\n\t\tself.assertEqual(self.ed.GetLexer(), self.ed.SCLEX_CPP)\r\n\t\tname = self.ed.GetLexerLanguage(0)\r\n\t\tself.assertEqual(name, b\"cpp\")\r\n\r\n\tdef testPropertyNames(self):\r\n\t\tpropertyNames = self.ed.PropertyNames()\r\n\t\tself.assertNotEqual(propertyNames, b\"\")\r\n\t\t# The cpp lexer has a boolean property named lexer.cpp.allow.dollars\r\n\t\tpropNameDollars = b\"lexer.cpp.allow.dollars\"\r\n\t\tpropertyType = self.ed.PropertyType(propNameDollars)\r\n\t\tself.assertEqual(propertyType, self.ed.SC_TYPE_BOOLEAN)\r\n\t\tpropertyDescription = self.ed.DescribeProperty(propNameDollars)\r\n\t\tself.assertNotEqual(propertyDescription, b\"\")\r\n\r\n\tdef testWordListDescriptions(self):\r\n\t\twordSet = self.ed.DescribeKeyWordSets()\r\n\t\tself.assertNotEqual(wordSet, b\"\")\r\n\r\n@unittest.skipUnless(lexersAvailable, \"no lexers included\")\r\nclass TestSubStyles(unittest.TestCase):\r\n\t''' These tests include knowledge of the current implementation in the cpp lexer\r\n\tand may have to change when that implementation changes.\r\n\tCurrently supports subStyles for IDENTIFIER 11 and COMMENTDOCKEYWORD 17 '''\r\n\tdef setUp(self):\r\n\t\tself.xite = Xite.xiteFrame\r\n\t\tself.ed = self.xite.ed\r\n\t\tself.ed.ClearAll()\r\n\t\tself.ed.EmptyUndoBuffer()\r\n\r\n\tdef testInfo(self):\r\n\t\tself.xite.ChooseLexer(b\"cpp\")\r\n\t\tbases = self.ed.GetSubStyleBases()\r\n\t\tself.assertEqual(bases, b\"\\x0b\\x11\")\t# 11, 17\r\n\t\tself.assertEqual(self.ed.DistanceToSecondaryStyles(), 0x40)\r\n\r\n\tdef testAllocate(self):\r\n\t\tfirstSubStyle = 0x80\t# Current implementation\r\n\t\tself.xite.ChooseLexer(b\"cpp\")\r\n\t\tself.assertEqual(self.ed.GetStyleFromSubStyle(firstSubStyle), firstSubStyle)\r\n\t\tself.assertEqual(self.ed.GetSubStylesStart(self.ed.SCE_C_IDENTIFIER), 0)\r\n\t\tself.assertEqual(self.ed.GetSubStylesLength(self.ed.SCE_C_IDENTIFIER), 0)\r\n\t\tnumSubStyles = 5\r\n\t\tsubs = self.ed.AllocateSubStyles(self.ed.SCE_C_IDENTIFIER, numSubStyles)\r\n\t\tself.assertEqual(subs, firstSubStyle)\r\n\t\tself.assertEqual(self.ed.GetSubStylesStart(self.ed.SCE_C_IDENTIFIER), firstSubStyle)\r\n\t\tself.assertEqual(self.ed.GetSubStylesLength(self.ed.SCE_C_IDENTIFIER), numSubStyles)\r\n\t\tself.assertEqual(self.ed.GetStyleFromSubStyle(subs), self.ed.SCE_C_IDENTIFIER)\r\n\t\tself.assertEqual(self.ed.GetStyleFromSubStyle(subs+numSubStyles-1), self.ed.SCE_C_IDENTIFIER)\r\n\t\tself.assertEqual(self.ed.GetStyleFromSubStyle(self.ed.SCE_C_IDENTIFIER), self.ed.SCE_C_IDENTIFIER)\r\n\t\t# Now free and check same as start\r\n\t\tself.ed.FreeSubStyles()\r\n\t\tself.assertEqual(self.ed.GetStyleFromSubStyle(subs), subs)\r\n\t\tself.assertEqual(self.ed.GetSubStylesStart(self.ed.SCE_C_IDENTIFIER), 0)\r\n\t\tself.assertEqual(self.ed.GetSubStylesLength(self.ed.SCE_C_IDENTIFIER), 0)\r\n\r\n\tdef testInactive(self):\r\n\t\tfirstSubStyle = 0x80\t# Current implementation\r\n\t\tinactiveDistance = self.ed.DistanceToSecondaryStyles()\r\n\t\tself.xite.ChooseLexer(b\"cpp\")\r\n\t\tnumSubStyles = 5\r\n\t\tsubs = self.ed.AllocateSubStyles(self.ed.SCE_C_IDENTIFIER, numSubStyles)\r\n\t\tself.assertEqual(subs, firstSubStyle)\r\n\t\tself.assertEqual(self.ed.GetStyleFromSubStyle(subs), self.ed.SCE_C_IDENTIFIER)\r\n\t\tself.assertEqual(self.ed.GetStyleFromSubStyle(subs+inactiveDistance), self.ed.SCE_C_IDENTIFIER+inactiveDistance)\r\n\t\tself.ed.FreeSubStyles()\r\n\r\n\tdef testSecondary(self):\r\n\t\tinactiveDistance = self.ed.DistanceToSecondaryStyles()\r\n\t\tinactiveIdentifier = self.ed.SCE_C_IDENTIFIER+inactiveDistance\r\n\t\tself.assertEqual(self.ed.GetPrimaryStyleFromStyle(inactiveIdentifier), self.ed.SCE_C_IDENTIFIER)\r\n\r\nclass TestCallTip(unittest.TestCase):\r\n\r\n\tdef setUp(self):\r\n\t\tself.xite = Xite.xiteFrame\r\n\t\tself.ed = self.xite.ed\r\n\t\tself.ed.ClearAll()\r\n\t\tself.ed.EmptyUndoBuffer()\r\n\t\t# 1 line of 4 characters\r\n\t\tt = b\"fun(\"\r\n\t\tself.ed.AddText(len(t), t)\r\n\r\n\tdef testBasics(self):\r\n\t\tself.assertEqual(self.ed.CallTipActive(), 0)\r\n\t\tself.ed.CallTipShow(1, \"fun(int x)\")\r\n\t\tself.assertEqual(self.ed.CallTipActive(), 1)\r\n\t\tself.assertEqual(self.ed.CallTipPosStart(), 4)\r\n\t\tself.ed.CallTipSetPosStart(1)\r\n\t\tself.assertEqual(self.ed.CallTipPosStart(), 1)\r\n\t\tself.ed.CallTipCancel()\r\n\t\tself.assertEqual(self.ed.CallTipActive(), 0)\r\n\r\nclass TestEdge(unittest.TestCase):\r\n\r\n\tdef setUp(self):\r\n\t\tself.xite = Xite.xiteFrame\r\n\t\tself.ed = self.xite.ed\r\n\t\tself.ed.ClearAll()\r\n\r\n\tdef testBasics(self):\r\n\t\tself.ed.EdgeColumn = 3\r\n\t\tself.assertEqual(self.ed.EdgeColumn, 3)\r\n\t\tself.ed.SetEdgeColour(0xA0)\r\n\t\tself.assertEqual(self.ed.GetEdgeColour(), 0xA0)\r\n\r\n\tdef testMulti(self):\r\n\t\tself.assertEqual(self.ed.GetMultiEdgeColumn(-1), -1)\r\n\t\tself.assertEqual(self.ed.GetMultiEdgeColumn(0), -1)\r\n\t\tself.ed.MultiEdgeAddLine(5, 0x50)\r\n\t\tself.assertEqual(self.ed.GetMultiEdgeColumn(0), 5)\r\n\t\tself.assertEqual(self.ed.GetMultiEdgeColumn(1), -1)\r\n\t\tself.ed.MultiEdgeAddLine(6, 0x60)\r\n\t\tself.assertEqual(self.ed.GetMultiEdgeColumn(0), 5)\r\n\t\tself.assertEqual(self.ed.GetMultiEdgeColumn(1), 6)\r\n\t\tself.assertEqual(self.ed.GetMultiEdgeColumn(2), -1)\r\n\t\tself.ed.MultiEdgeAddLine(4, 0x40)\r\n\t\tself.assertEqual(self.ed.GetMultiEdgeColumn(0), 4)\r\n\t\tself.assertEqual(self.ed.GetMultiEdgeColumn(1), 5)\r\n\t\tself.assertEqual(self.ed.GetMultiEdgeColumn(2), 6)\r\n\t\tself.assertEqual(self.ed.GetMultiEdgeColumn(3), -1)\r\n\t\tself.ed.MultiEdgeClearAll()\r\n\t\tself.assertEqual(self.ed.GetMultiEdgeColumn(0), -1)\r\n\r\n\tdef testSameTwice(self):\r\n\t\t# Tests that adding a column twice retains both\r\n\t\tself.ed.MultiEdgeAddLine(5, 0x50)\r\n\t\tself.ed.MultiEdgeAddLine(5, 0x55)\r\n\t\tself.assertEqual(self.ed.GetMultiEdgeColumn(0), 5)\r\n\t\tself.assertEqual(self.ed.GetMultiEdgeColumn(1), 5)\r\n\t\tself.assertEqual(self.ed.GetMultiEdgeColumn(2), -1)\r\n\t\tself.ed.MultiEdgeClearAll()\r\n\r\nclass TestAutoComplete(unittest.TestCase):\r\n\r\n\tdef setUp(self):\r\n\t\tself.xite = Xite.xiteFrame\r\n\t\tself.ed = self.xite.ed\r\n\t\tself.ed.ClearAll()\r\n\t\tself.ed.EmptyUndoBuffer()\r\n\t\t# 1 line of 3 characters\r\n\t\tt = b\"xxx\\n\"\r\n\t\tself.ed.AddText(len(t), t)\r\n\r\n\tdef testDefaults(self):\r\n\t\tself.assertEqual(self.ed.AutoCGetSeparator(), ord(' '))\r\n\t\tself.assertEqual(self.ed.AutoCGetMaxHeight(), 5)\r\n\t\tself.assertEqual(self.ed.AutoCGetMaxWidth(), 0)\r\n\t\tself.assertEqual(self.ed.AutoCGetTypeSeparator(), ord('?'))\r\n\t\tself.assertEqual(self.ed.AutoCGetIgnoreCase(), 0)\r\n\t\tself.assertEqual(self.ed.AutoCGetAutoHide(), 1)\r\n\t\tself.assertEqual(self.ed.AutoCGetDropRestOfWord(), 0)\r\n\r\n\tdef testChangeDefaults(self):\r\n\t\tself.ed.AutoCSetSeparator(ord('-'))\r\n\t\tself.assertEqual(self.ed.AutoCGetSeparator(), ord('-'))\r\n\t\tself.ed.AutoCSetSeparator(ord(' '))\r\n\r\n\t\tself.ed.AutoCSetMaxHeight(100)\r\n\t\tself.assertEqual(self.ed.AutoCGetMaxHeight(), 100)\r\n\t\tself.ed.AutoCSetMaxHeight(5)\r\n\r\n\t\tself.ed.AutoCSetMaxWidth(100)\r\n\t\tself.assertEqual(self.ed.AutoCGetMaxWidth(), 100)\r\n\t\tself.ed.AutoCSetMaxWidth(0)\r\n\r\n\t\tself.ed.AutoCSetTypeSeparator(ord('@'))\r\n\t\tself.assertEqual(self.ed.AutoCGetTypeSeparator(), ord('@'))\r\n\t\tself.ed.AutoCSetTypeSeparator(ord('?'))\r\n\r\n\t\tself.ed.AutoCSetIgnoreCase(1)\r\n\t\tself.assertEqual(self.ed.AutoCGetIgnoreCase(), 1)\r\n\t\tself.ed.AutoCSetIgnoreCase(0)\r\n\r\n\t\tself.ed.AutoCSetAutoHide(0)\r\n\t\tself.assertEqual(self.ed.AutoCGetAutoHide(), 0)\r\n\t\tself.ed.AutoCSetAutoHide(1)\r\n\r\n\t\tself.ed.AutoCSetDropRestOfWord(1)\r\n\t\tself.assertEqual(self.ed.AutoCGetDropRestOfWord(), 1)\r\n\t\tself.ed.AutoCSetDropRestOfWord(0)\r\n\r\n\tdef testAutoShow(self):\r\n\t\tself.assertEqual(self.ed.AutoCActive(), 0)\r\n\t\tself.ed.SetSel(0, 0)\r\n\r\n\t\tself.ed.AutoCShow(0, b\"za defn ghi\")\r\n\t\tself.assertEqual(self.ed.AutoCActive(), 1)\r\n\t\t#~ time.sleep(2)\r\n\t\tself.assertEqual(self.ed.AutoCPosStart(), 0)\r\n\t\tself.assertEqual(self.ed.AutoCGetCurrent(), 0)\r\n\t\tt = self.ed.AutoCGetCurrentText(5)\r\n\t\t#~ self.assertEqual(l, 3)\r\n\t\tself.assertEqual(t, b\"za\")\r\n\t\tself.ed.AutoCCancel()\r\n\t\tself.assertEqual(self.ed.AutoCActive(), 0)\r\n\r\n\tdef testAutoShowComplete(self):\r\n\t\tself.assertEqual(self.ed.AutoCActive(), 0)\r\n\t\tself.ed.SetSel(0, 0)\r\n\r\n\t\tself.ed.AutoCShow(0, b\"za defn ghi\")\r\n\t\tself.ed.AutoCComplete()\r\n\t\tself.assertEqual(self.ed.Contents(), b\"zaxxx\\n\")\r\n\r\n\t\tself.assertEqual(self.ed.AutoCActive(), 0)\r\n\r\n\tdef testAutoShowSelect(self):\r\n\t\tself.assertEqual(self.ed.AutoCActive(), 0)\r\n\t\tself.ed.SetSel(0, 0)\r\n\r\n\t\tself.ed.AutoCShow(0, b\"za defn ghi\")\r\n\t\tself.ed.AutoCSelect(0, b\"d\")\r\n\t\tself.ed.AutoCComplete()\r\n\t\tself.assertEqual(self.ed.Contents(), b\"defnxxx\\n\")\r\n\r\n\t\tself.assertEqual(self.ed.AutoCActive(), 0)\r\n\r\n\tdef testAutoSelectFirstItem(self):\r\n\t\tself.assertEqual(self.ed.AutoCActive(), 0)\r\n\r\n\t\tself.ed.AutoCSetOrder(self.ed.SC_ORDER_CUSTOM)\r\n\r\n\t\t# without SC_AUTOCOMPLETE_SELECT_FIRST_ITEM option\r\n\t\tself.ed.SetSel(3, 3)\r\n\t\tself.ed.AutoCShow(3, b\"aaa1 bbb1 xxx1\")\r\n\t\t# automatically selects the item with the entered prefix xxx\r\n\t\tself.ed.AutoCComplete()\r\n\t\tself.assertEqual(self.ed.Contents(), b\"xxx1\\n\")\r\n\r\n\t\t# with SC_AUTOCOMPLETE_SELECT_FIRST_ITEM option\r\n\t\tself.ed.AutoCSetOptions(2, 0)\r\n\t\tself.ed.SetSel(3, 3)\r\n\t\tself.ed.AutoCShow(3, b\"aaa1 bbb1 xxx1\")\r\n\t\t# selects the first item regardless of the entered prefix and replaces the entered xxx\r\n\t\tself.ed.AutoCComplete()\r\n\t\tself.assertEqual(self.ed.Contents(), b\"aaa11\\n\")\r\n\r\n\t\tself.assertEqual(self.ed.AutoCActive(), 0)\r\n\r\n\tdef testAutoCustomSort(self):\r\n\t\t# Checks bug #2294 where SC_ORDER_CUSTOM with an empty list asserts\r\n\t\t# https://sourceforge.net/p/scintilla/bugs/2294/\r\n\t\tself.assertEqual(self.ed.AutoCGetOrder(), self.ed.SC_ORDER_PRESORTED)\r\n\r\n\t\tself.ed.AutoCSetOrder(self.ed.SC_ORDER_CUSTOM)\r\n\t\tself.assertEqual(self.ed.AutoCGetOrder(), self.ed.SC_ORDER_CUSTOM)\r\n\r\n\t\t#~ self.ed.AutoCShow(0, b\"\")\r\n\t\t#~ self.ed.AutoCComplete()\r\n\t\t#~ self.assertEqual(self.ed.Contents(), b\"xxx\\n\")\r\n\r\n\t\tself.ed.AutoCShow(0, b\"a\")\r\n\t\tself.ed.AutoCComplete()\r\n\t\tself.assertEqual(self.ed.Contents(), b\"xxx\\na\")\r\n\r\n\t\tself.ed.AutoCSetOrder(self.ed.SC_ORDER_PERFORMSORT)\r\n\t\tself.assertEqual(self.ed.AutoCGetOrder(), self.ed.SC_ORDER_PERFORMSORT)\r\n\r\n\t\tself.ed.AutoCShow(0, b\"\")\r\n\t\tself.ed.AutoCComplete()\r\n\t\tself.assertEqual(self.ed.Contents(), b\"xxx\\na\")\r\n\r\n\t\tself.ed.AutoCShow(0, b\"b a\")\r\n\t\tself.ed.AutoCComplete()\r\n\t\tself.assertEqual(self.ed.Contents(), b\"xxx\\naa\")\r\n\r\n\t\tself.ed.AutoCSetOrder(self.ed.SC_ORDER_PRESORTED)\r\n\t\tself.assertEqual(self.ed.AutoCGetOrder(), self.ed.SC_ORDER_PRESORTED)\r\n\r\n\t\tself.ed.AutoCShow(0, b\"\")\r\n\t\tself.ed.AutoCComplete()\r\n\t\tself.assertEqual(self.ed.Contents(), b\"xxx\\naa\")\r\n\r\n\t\tself.ed.AutoCShow(0, b\"a b\")\r\n\t\tself.ed.AutoCComplete()\r\n\t\tself.assertEqual(self.ed.Contents(), b\"xxx\\naaa\")\r\n\r\n\t\tself.assertEqual(self.ed.AutoCActive(), 0)\r\n\r\n\tdef testWriteOnly(self):\r\n\t\t\"\"\" Checks that setting attributes doesn't crash or change tested behaviour\r\n\t\tbut does not check that the changed attributes are effective. \"\"\"\r\n\t\tself.ed.AutoCStops(0, b\"abcde\")\r\n\t\tself.ed.AutoCSetFillUps(0, b\"1234\")\r\n\r\nclass TestDirectAccess(unittest.TestCase):\r\n\r\n\tdef setUp(self):\r\n\t\tself.xite = Xite.xiteFrame\r\n\t\tself.ed = self.xite.ed\r\n\t\tself.ed.ClearAll()\r\n\t\tself.ed.EmptyUndoBuffer()\r\n\r\n\tdef testGapPosition(self):\r\n\t\ttext = b\"abcd\"\r\n\t\tself.ed.SetContents(text)\r\n\t\tself.assertEqual(self.ed.GapPosition, 4)\r\n\t\tself.ed.TargetStart = 1\r\n\t\tself.ed.TargetEnd = 1\r\n\t\trep = b\"-\"\r\n\t\tself.ed.ReplaceTarget(len(rep), rep)\r\n\t\tself.assertEqual(self.ed.GapPosition, 2)\r\n\r\n\tdef testCharacterPointerAndRangePointer(self):\r\n\t\ttext = b\"abcd\"\r\n\t\tself.ed.SetContents(text)\r\n\t\tcharacterPointer = self.ed.CharacterPointer\r\n\t\trangePointer = self.ed.GetRangePointer(0,3)\r\n\t\tself.assertEqual(characterPointer, rangePointer)\r\n\t\tcpBuffer = ctypes.c_char_p(characterPointer)\r\n\t\tself.assertEqual(cpBuffer.value, text)\r\n\t\t# Gap will not be moved as already moved for CharacterPointer call\r\n\t\trangePointer = self.ed.GetRangePointer(1,3)\r\n\t\tcpBuffer = ctypes.c_char_p(rangePointer)\r\n\t\tself.assertEqual(cpBuffer.value, text[1:])\r\n\r\nclass TestJoin(unittest.TestCase):\r\n\tdef setUp(self):\r\n\t\tself.xite = Xite.xiteFrame\r\n\t\tself.ed = self.xite.ed\r\n\t\tself.ed.ClearAll()\r\n\t\tself.ed.EmptyUndoBuffer()\r\n\r\n\tdef tearDown(self):\r\n\t\tself.ed.ClearAll()\r\n\t\tself.ed.EmptyUndoBuffer()\r\n\r\n\tdef testJoin(self):\r\n\t\ttext = b\"a\\r\\nb\\r\\nc\"\r\n\t\tself.ed.SetContents(text)\r\n\t\tself.ed.TargetWholeDocument()\r\n\t\tself.ed.LinesJoin()\r\n\t\tself.assertEqual(self.ed.Contents(), b\"a b c\")\r\n\r\n\tdef testJoinEndLine(self):\r\n\t\ttext = b\"a\\r\\nb\\r\\nc\"\r\n\t\tself.ed.SetContents(text)\r\n\t\t# Select a..b\r\n\t\tself.ed.SetTargetRange(0, 4)\r\n\t\tself.ed.LinesJoin()\r\n\t\tself.assertEqual(self.ed.Contents(), b\"a b\\r\\nc\")\r\n\r\n\tdef testJoinSpace(self):\r\n\t\t# Demonstration of bug #2372 which produced b\"a \\r\"\r\n\t\ttext = b\"a \\r\\n\\r\\n\"\r\n\t\tself.ed.SetContents(text)\r\n\t\tself.ed.TargetWholeDocument()\r\n\t\tself.ed.LinesJoin()\r\n\t\tself.assertEqual(self.ed.Contents(), b\"a \")\r\n\r\n\tdef testJoinOutOfBounds(self):\r\n\t\ttext = b\"a\\r\\nb\\r\\nc\"\r\n\t\tself.ed.SetContents(text)\r\n\t\t# Setting end of target after document end encourages non-termination.\r\n\t\tself.ed.SetTargetRange(-10, 16)\r\n\t\tself.ed.LinesJoin()\r\n\t\t# Out-of-bounds leaves extra space as 'c' is processed\r\n\t\tself.assertEqual(self.ed.Contents(), b\"a b c \")\r\n\r\nclass TestWordChars(unittest.TestCase):\r\n\tdef setUp(self):\r\n\t\tself.xite = Xite.xiteFrame\r\n\t\tself.ed = self.xite.ed\r\n\t\tself.ed.ClearAll()\r\n\t\tself.ed.EmptyUndoBuffer()\r\n\r\n\tdef tearDown(self):\r\n\t\tself.ed.SetCharsDefault()\r\n\r\n\tdef _setChars(self, charClass, chars):\r\n\t\t\"\"\" Wrapper to call self.ed.Set*Chars with the right type\r\n\t\t@param charClass {str} the character class, \"word\", \"space\", etc.\r\n\t\t@param chars {iterable of int} characters to set\r\n\t\t\"\"\"\r\n\t\tif sys.version_info.major == 2:\r\n\t\t\t# Python 2, use latin-1 encoded str\r\n\t\t\tunichars = (unichr(x) for x in chars if x != 0)\r\n\t\t\t# can't use literal u\"\", that's a syntax error in Py3k\r\n\t\t\t# uncode() doesn't exist in Py3k, but we never run it there\r\n\t\t\tresult = unicode(\"\").join(unichars).encode(\"latin-1\")\r\n\t\telse:\r\n\t\t\t# Python 3, use bytes()\r\n\t\t\tresult = bytes(x for x in chars if x != 0)\r\n\t\tmeth = getattr(self.ed, \"Set%sChars\" % (charClass.capitalize()))\r\n\t\treturn meth(None, result)\r\n\r\n\tdef assertCharSetsEqual(self, first, second, *args, **kwargs):\r\n\t\t\"\"\" Assert that the two character sets are equal.\r\n\t\tIf either set are an iterable of numbers, convert them to chars\r\n\t\tfirst. \"\"\"\r\n\t\tfirst_set = set()\r\n\t\tfor c in first:\r\n\t\t\tfirst_set.add(chr(c) if isinstance(c, int) else c)\r\n\t\tsecond_set = set()\r\n\t\tfor c in second:\r\n\t\t\tsecond_set.add(chr(c) if isinstance(c, int) else c)\r\n\t\treturn self.assertEqual(first_set, second_set, *args, **kwargs)\r\n\r\n\tdef testDefaultWordChars(self):\r\n\t\t# check that the default word chars are as expected\r\n\t\tdata = self.ed.GetWordChars(None)\r\n\t\texpected = set(string.digits + string.ascii_letters + '_') | \\\r\n\t\t\tset(chr(x) for x in range(0x80, 0x100))\r\n\t\tself.assertCharSetsEqual(data, expected)\r\n\r\n\tdef testDefaultWhitespaceChars(self):\r\n\t\t# check that the default whitespace chars are as expected\r\n\t\tdata = self.ed.GetWhitespaceChars(None)\r\n\t\texpected = (set(chr(x) for x in (range(0, 0x20))) | set(' ') | set('\\x7f')) - \\\r\n\t\t\tset(['\\r', '\\n'])\r\n\t\tself.assertCharSetsEqual(data, expected)\r\n\r\n\tdef testDefaultPunctuationChars(self):\r\n\t\t# check that the default punctuation chars are as expected\r\n\t\tdata = self.ed.GetPunctuationChars(None)\r\n\t\texpected = set(chr(x) for x in range(0x20, 0x80)) - \\\r\n\t\t\tset(string.ascii_letters + string.digits + \"\\r\\n\\x7f_ \")\r\n\t\tself.assertCharSetsEqual(data, expected)\r\n\r\n\tdef testCustomWordChars(self):\r\n\t\t# check that setting things to whitespace chars makes them not words\r\n\t\tself._setChars(\"whitespace\", range(1, 0x100))\r\n\t\tdata = self.ed.GetWordChars(None)\r\n\t\texpected = set()\r\n\t\tself.assertCharSetsEqual(data, expected)\r\n\t\t# and now set something to make sure that works too\r\n\t\texpected = set(range(1, 0x100, 2))\r\n\t\tself._setChars(\"word\", expected)\r\n\t\tdata = self.ed.GetWordChars(None)\r\n\t\tself.assertCharSetsEqual(data, expected)\r\n\r\n\tdef testCustomWhitespaceChars(self):\r\n\t\t# check setting whitespace chars to non-default values\r\n\t\tself._setChars(\"word\", range(1, 0x100))\r\n\t\t# we can't change chr(0) from being anything but whitespace\r\n\t\texpected = set([0])\r\n\t\tdata = self.ed.GetWhitespaceChars(None)\r\n\t\tself.assertCharSetsEqual(data, expected)\r\n\t\t# now try to set it to something custom\r\n\t\texpected = set(range(1, 0x100, 2)) | set([0])\r\n\t\tself._setChars(\"whitespace\", expected)\r\n\t\tdata = self.ed.GetWhitespaceChars(None)\r\n\t\tself.assertCharSetsEqual(data, expected)\r\n\r\n\tdef testCustomPunctuationChars(self):\r\n\t\t# check setting punctuation chars to non-default values\r\n\t\tself._setChars(\"word\", range(1, 0x100))\r\n\t\texpected = set()\r\n\t\tdata = self.ed.GetPunctuationChars(0)\r\n\t\tself.assertEqual(set(data), expected)\r\n\t\t# now try to set it to something custom\r\n\t\texpected = set(range(1, 0x100, 1))\r\n\t\tself._setChars(\"punctuation\", expected)\r\n\t\tdata = self.ed.GetPunctuationChars(None)\r\n\t\tself.assertCharSetsEqual(data, expected)\r\n\r\n\tdef testCharacterCategoryOptimization(self):\r\n\t\tself.assertEqual(self.ed.CharacterCategoryOptimization, 0x100)\r\n\t\tself.ed.CharacterCategoryOptimization = 0x1000\r\n\t\tself.assertEqual(self.ed.CharacterCategoryOptimization, 0x1000)\r\n\r\nclass TestExplicitTabStops(unittest.TestCase):\r\n\r\n\tdef setUp(self):\r\n\t\tself.xite = Xite.xiteFrame\r\n\t\tself.ed = self.xite.ed\r\n\t\tself.ed.ClearAll()\r\n\t\tself.ed.EmptyUndoBuffer()\r\n\t\t# 2 lines of 4 characters\r\n\t\tself.t = b\"fun(\\nint)\"\r\n\t\tself.ed.AddText(len(self.t), self.t)\r\n\r\n\tdef testAddingAndClearing(self):\r\n\t\tself.assertEqual(self.ed.GetNextTabStop(0,0), 0)\r\n\r\n\t\t# Add a tab stop at 7\r\n\t\tself.ed.AddTabStop(0, 7)\r\n\t\t# Check added\r\n\t\tself.assertEqual(self.ed.GetNextTabStop(0,0), 7)\r\n\t\t# Check does not affect line 1\r\n\t\tself.assertEqual(self.ed.GetNextTabStop(1,0), 0)\r\n\r\n\t\t# Add a tab stop at 18\r\n\t\tself.ed.AddTabStop(0, 18)\r\n\t\t# Check added\r\n\t\tself.assertEqual(self.ed.GetNextTabStop(0,0), 7)\r\n\t\tself.assertEqual(self.ed.GetNextTabStop(0,7), 18)\r\n\t\t# Check does not affect line 1\r\n\t\tself.assertEqual(self.ed.GetNextTabStop(1,0), 0)\r\n\t\tself.assertEqual(self.ed.GetNextTabStop(1,7), 0)\r\n\r\n\t\t# Add a tab stop between others at 13\r\n\t\tself.ed.AddTabStop(0, 13)\r\n\t\t# Check added\r\n\t\tself.assertEqual(self.ed.GetNextTabStop(0,0), 7)\r\n\t\tself.assertEqual(self.ed.GetNextTabStop(0,7), 13)\r\n\t\tself.assertEqual(self.ed.GetNextTabStop(0,13), 18)\r\n\t\t# Check does not affect line 1\r\n\t\tself.assertEqual(self.ed.GetNextTabStop(1,0), 0)\r\n\t\tself.assertEqual(self.ed.GetNextTabStop(1,7), 0)\r\n\r\n\t\tself.ed.ClearTabStops(0)\r\n\t\t# Check back to original state\r\n\t\tself.assertEqual(self.ed.GetNextTabStop(0,0), 0)\r\n\r\n\tdef testLineInsertionDeletion(self):\r\n\t\t# Add a tab stop at 7 on line 1\r\n\t\tself.ed.AddTabStop(1, 7)\r\n\t\t# Check added\r\n\t\tself.assertEqual(self.ed.GetNextTabStop(1,0), 7)\r\n\r\n\t\t# More text at end\r\n\t\tself.ed.AddText(len(self.t), self.t)\r\n\t\tself.assertEqual(self.ed.GetNextTabStop(0,0), 0)\r\n\t\tself.assertEqual(self.ed.GetNextTabStop(1,0), 7)\r\n\t\tself.assertEqual(self.ed.GetNextTabStop(2,0), 0)\r\n\t\tself.assertEqual(self.ed.GetNextTabStop(3,0), 0)\r\n\r\n\t\t# Another 2 lines before explicit line moves the explicit tab stop\r\n\t\tdata = b\"x\\ny\\n\"\r\n\t\tself.ed.InsertText(4, data)\r\n\t\tself.assertEqual(self.ed.GetNextTabStop(0,0), 0)\r\n\t\tself.assertEqual(self.ed.GetNextTabStop(1,0), 0)\r\n\t\tself.assertEqual(self.ed.GetNextTabStop(2,0), 0)\r\n\t\tself.assertEqual(self.ed.GetNextTabStop(3,0), 7)\r\n\t\tself.assertEqual(self.ed.GetNextTabStop(4,0), 0)\r\n\t\tself.assertEqual(self.ed.GetNextTabStop(5,0), 0)\r\n\r\n\t\t# Undo moves the explicit tab stop back\r\n\t\tself.ed.Undo()\r\n\t\tself.assertEqual(self.ed.GetNextTabStop(0,0), 0)\r\n\t\tself.assertEqual(self.ed.GetNextTabStop(1,0), 7)\r\n\t\tself.assertEqual(self.ed.GetNextTabStop(2,0), 0)\r\n\t\tself.assertEqual(self.ed.GetNextTabStop(3,0), 0)\r\n\r\nif __name__ == '__main__':\r\n\tuu = Xite.main(\"simpleTests\")\r\n\t#~ for x in sorted(uu.keys()):\r\n\t\t#~ print(x, uu[x])\r\n\t#~ print()\r\n"
  },
  {
    "path": "scintilla/test/unit/LICENSE_1_0.txt",
    "content": "Boost Software License - Version 1.0 - August 17th, 2003\r\n\r\nPermission is hereby granted, free of charge, to any person or organization\r\nobtaining a copy of the software and accompanying documentation covered by\r\nthis license (the \"Software\") to use, reproduce, display, distribute,\r\nexecute, and transmit the Software, and to prepare derivative works of the\r\nSoftware, and to permit third-parties to whom the Software is furnished to\r\ndo so, all subject to the following:\r\n\r\nThe copyright notices in the Software and this entire statement, including\r\nthe above license grant, this restriction and the following disclaimer,\r\nmust be included in all copies of the Software, in whole or in part, and\r\nall derivative works of the Software, unless such copies or derivative\r\nworks are solely in the form of machine-executable object code generated by\r\na source language processor.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\nFITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT\r\nSHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE\r\nFOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,\r\nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\r\nDEALINGS IN THE SOFTWARE.\r\n"
  },
  {
    "path": "scintilla/test/unit/README",
    "content": "The test/unit directory contains unit tests for Scintilla data structures.\n\nThe tests can be run on Windows, macOS, or Linux using g++ and GNU make.\nThe Catch test framework is used.\nhttps://github.com/philsquared/Catch\nThe file catch.hpp is under the Boost Software License which is contained in LICENSE_1_0.txt\n\n   To run the tests on macOS or Linux:\nmake test\n\n   To run the tests on Windows:\nmingw32-make test\n\n   Visual C++ (2010+) and nmake can also be used on Windows:\nnmake -f test.mak test\n"
  },
  {
    "path": "scintilla/test/unit/Sci.natvis",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<AutoVisualizer xmlns=\"http://schemas.microsoft.com/vstudio/debugger/natvis/2010\">\r\n  <Type Name=\"Scintilla::Internal::SplitVector&lt;*&gt;\">\r\n    <DisplayString>{{size = {lengthBody}}}</DisplayString>\r\n    <Expand>\r\n      <Item Name=\"[size]\">lengthBody</Item>\r\n      <Item Name=\"[part1Length]\">part1Length</Item>\r\n      <Item Name=\"[gap]\">gapLength</Item>\r\n      <IndexListItems>\r\n        <Size>lengthBody</Size>\r\n        <ValueNode>body[($i&lt;part1Length)?$i:$i+gapLength]</ValueNode>\r\n      </IndexListItems>\r\n    </Expand>\r\n  </Type>\r\n  <Type Name=\"Scintilla::Internal::XSparseVector&lt;*&gt;\">\r\n    <DisplayString>{{size = {values->lengthBody}}}</DisplayString>\r\n    <Expand>\r\n      <IndexListItems>\r\n        <Size>values->lengthBody</Size>\r\n        <ValueNode>starts->body->body[($i&lt;starts->body->part1Length)?$i:$i+starts->body->gapLength]+($i&gt;starts->stepPartition?starts->stepLength:0)</ValueNode>\r\n      </IndexListItems>\r\n      <IndexListItems>\r\n        <Size>values->lengthBody</Size>\r\n        <ValueNode>values->body->body[($i&lt;values->body->part1Length)?$i:$i+values->body->gapLength]+($i&gt;values->stepPartition?values->stepLength:0)</ValueNode>\r\n      </IndexListItems>\r\n    </Expand>\r\n  </Type>\r\n  <Type Name=\"Scintilla::Internal::Partitioning&lt;*&gt;\">\r\n    <DisplayString>{{size = {body->lengthBody}}}</DisplayString>\r\n    <Expand>\r\n      <IndexListItems>\r\n        <Size>body->lengthBody</Size>\r\n        <ValueNode>body->body[($i&lt;body->part1Length)?$i:$i+body->gapLength]+($i&gt;stepPartition?stepLength:0)</ValueNode>\r\n      </IndexListItems>\r\n    </Expand>\r\n  </Type>\r\n  <Type Name=\"std::unique_ptr&lt;*&gt;\">\r\n    <SmartPointer Usage=\"Minimal\">_Mypair._Myval2</SmartPointer>\r\n    <DisplayString Condition=\"_Mypair._Myval2 == 0\">empty</DisplayString>\r\n    <DisplayString Condition=\"_Mypair._Myval2 != 0\">unique_ptr {*_Mypair._Myval2}</DisplayString>\r\n    <Expand>\r\n      <ExpandedItem Condition=\"_Mypair._Myval2 != 0\">_Mypair._Myval2</ExpandedItem>\r\n      <ExpandedItem Condition=\"_Mypair._Myval2 != 0\">_Mypair</ExpandedItem>\r\n    </Expand>\r\n  </Type>\r\n</AutoVisualizer>\r\n"
  },
  {
    "path": "scintilla/test/unit/SciTE.properties",
    "content": "command.go.*.cxx=./unitTest\r\nif PLAT_WIN\r\n\tmake.command=mingw32-make\r\n\tcommand.go.*.cxx=unitTest\r\ncommand.go.needs.$(file.patterns.cplusplus)=$(make.command)\r\n"
  },
  {
    "path": "scintilla/test/unit/UnitTester.cxx",
    "content": "/** @file UnitTester.cxx\r\n ** UnitTester.cpp : Defines the entry point for the console application.\r\n **/\r\n\r\n// Catch uses std::uncaught_exception which is deprecated in C++17.\r\n// This define silences a warning from Visual C++.\r\n#define _SILENCE_CXX17_UNCAUGHT_EXCEPTION_DEPRECATION_WARNING\r\n\r\n#include <cstdio>\r\n#include <cstdarg>\r\n\r\n#include <string_view>\r\n#include <vector>\r\n#include <optional>\r\n#include <memory>\r\n\r\n#include \"Debugging.h\"\r\n\r\n#if defined(_WIN32)\r\n#define CATCH_CONFIG_WINDOWS_CRTDBG\r\n#endif\r\n#define CATCH_CONFIG_RUNNER\r\n#include \"catch.hpp\"\r\n\r\nusing namespace Scintilla::Internal;\r\n\r\n// Needed for PLATFORM_ASSERT in code being tested\r\n\r\nvoid Platform::Assert(const char *c, const char *file, int line) noexcept {\r\n\tfprintf(stderr, \"Assertion [%s] failed at %s %d\\n\", c, file, line);\r\n\tabort();\r\n}\r\n\r\nvoid Platform::DebugPrintf(const char *format, ...) noexcept {\r\n\tchar buffer[2000];\r\n\tva_list pArguments;\r\n\tva_start(pArguments, format);\r\n\tvsnprintf(buffer, std::size(buffer), format, pArguments);\r\n\tva_end(pArguments);\r\n\tfprintf(stderr, \"%s\", buffer);\r\n}\r\n\r\nint main(int argc, char* argv[]) {\r\n\tconst int result = Catch::Session().run(argc, argv);\r\n\r\n\treturn result;\r\n}\r\n"
  },
  {
    "path": "scintilla/test/unit/UnitTester.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project DefaultTargets=\"Build\" ToolsVersion=\"15.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <ItemGroup Label=\"ProjectConfigurations\">\r\n    <ProjectConfiguration Include=\"Debug|Win32\">\r\n      <Configuration>Debug</Configuration>\r\n      <Platform>Win32</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Release|Win32\">\r\n      <Configuration>Release</Configuration>\r\n      <Platform>Win32</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Debug|x64\">\r\n      <Configuration>Debug</Configuration>\r\n      <Platform>x64</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Release|x64\">\r\n      <Configuration>Release</Configuration>\r\n      <Platform>x64</Platform>\r\n    </ProjectConfiguration>\r\n  </ItemGroup>\r\n  <PropertyGroup Label=\"Globals\">\r\n    <ProjectGuid>{35688A27-D91B-453A-8A05-65A7F28DEFBF}</ProjectGuid>\r\n    <Keyword>Win32Proj</Keyword>\r\n    <RootNamespace>UnitTester</RootNamespace>\r\n    <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\r\n    <ConfigurationType>Application</ConfigurationType>\r\n    <UseDebugLibraries>true</UseDebugLibraries>\r\n    <PlatformToolset>v143</PlatformToolset>\r\n    <CharacterSet>Unicode</CharacterSet>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\r\n    <ConfigurationType>Application</ConfigurationType>\r\n    <UseDebugLibraries>false</UseDebugLibraries>\r\n    <PlatformToolset>v143</PlatformToolset>\r\n    <WholeProgramOptimization>true</WholeProgramOptimization>\r\n    <CharacterSet>Unicode</CharacterSet>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"Configuration\">\r\n    <ConfigurationType>Application</ConfigurationType>\r\n    <UseDebugLibraries>true</UseDebugLibraries>\r\n    <PlatformToolset>v143</PlatformToolset>\r\n    <CharacterSet>Unicode</CharacterSet>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"Configuration\">\r\n    <ConfigurationType>Application</ConfigurationType>\r\n    <UseDebugLibraries>false</UseDebugLibraries>\r\n    <PlatformToolset>v143</PlatformToolset>\r\n    <WholeProgramOptimization>true</WholeProgramOptimization>\r\n    <CharacterSet>Unicode</CharacterSet>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\r\n  <ImportGroup Label=\"ExtensionSettings\">\r\n  </ImportGroup>\r\n  <ImportGroup Label=\"Shared\">\r\n  </ImportGroup>\r\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n  </ImportGroup>\r\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n  </ImportGroup>\r\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n  </ImportGroup>\r\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n  </ImportGroup>\r\n  <PropertyGroup Label=\"UserMacros\" />\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n    <LinkIncremental>true</LinkIncremental>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\r\n    <LinkIncremental>true</LinkIncremental>\r\n    <EnableClangTidyCodeAnalysis>true</EnableClangTidyCodeAnalysis>\r\n    <CodeAnalysisRuleSet>..\\..\\..\\..\\..\\Users\\Neil\\SensibleRules.ruleset</CodeAnalysisRuleSet>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n    <LinkIncremental>false</LinkIncremental>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\r\n    <LinkIncremental>false</LinkIncremental>\r\n  </PropertyGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n    <ClCompile>\r\n      <PrecompiledHeader>\r\n      </PrecompiledHeader>\r\n      <WarningLevel>Level3</WarningLevel>\r\n      <Optimization>Disabled</Optimization>\r\n      <PreprocessorDefinitions>CHECK_CORRECTNESS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <AdditionalIncludeDirectories>..\\..\\include\\;..\\..\\src\\;..\\..\\lexlib\\</AdditionalIncludeDirectories>\r\n      <LanguageStandard>stdcpp17</LanguageStandard>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <GenerateDebugInformation>true</GenerateDebugInformation>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\r\n    <ClCompile>\r\n      <PrecompiledHeader>\r\n      </PrecompiledHeader>\r\n      <WarningLevel>Level3</WarningLevel>\r\n      <Optimization>Disabled</Optimization>\r\n      <PreprocessorDefinitions>CHECK_CORRECTNESS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <AdditionalIncludeDirectories>..\\..\\include\\;..\\..\\src\\;..\\..\\lexlib\\</AdditionalIncludeDirectories>\r\n      <LanguageStandard>stdcpp17</LanguageStandard>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <GenerateDebugInformation>true</GenerateDebugInformation>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n    <ClCompile>\r\n      <WarningLevel>Level3</WarningLevel>\r\n      <PrecompiledHeader>\r\n      </PrecompiledHeader>\r\n      <Optimization>MaxSpeed</Optimization>\r\n      <FunctionLevelLinking>true</FunctionLevelLinking>\r\n      <IntrinsicFunctions>true</IntrinsicFunctions>\r\n      <PreprocessorDefinitions>CHECK_CORRECTNESS;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <AdditionalIncludeDirectories>..\\..\\include\\;..\\..\\src\\;..\\..\\lexlib\\</AdditionalIncludeDirectories>\r\n      <LanguageStandard>stdcpp17</LanguageStandard>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r\n      <OptimizeReferences>true</OptimizeReferences>\r\n      <GenerateDebugInformation>true</GenerateDebugInformation>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\r\n    <ClCompile>\r\n      <WarningLevel>Level3</WarningLevel>\r\n      <PrecompiledHeader>\r\n      </PrecompiledHeader>\r\n      <Optimization>MaxSpeed</Optimization>\r\n      <FunctionLevelLinking>true</FunctionLevelLinking>\r\n      <IntrinsicFunctions>true</IntrinsicFunctions>\r\n      <PreprocessorDefinitions>CHECK_CORRECTNESS;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <AdditionalIncludeDirectories>..\\..\\include\\;..\\..\\src\\;..\\..\\lexlib\\</AdditionalIncludeDirectories>\r\n      <LanguageStandard>stdcpp17</LanguageStandard>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r\n      <OptimizeReferences>true</OptimizeReferences>\r\n      <GenerateDebugInformation>true</GenerateDebugInformation>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemGroup>\r\n    <ClCompile Include=\"..\\..\\src\\CaseConvert.cxx\" />\r\n    <ClCompile Include=\"..\\..\\src\\CaseFolder.cxx\" />\r\n    <ClCompile Include=\"..\\..\\src\\CellBuffer.cxx\" />\r\n    <ClCompile Include=\"..\\..\\src\\ChangeHistory.cxx\" />\r\n    <ClCompile Include=\"..\\..\\src\\CharacterCategoryMap.cxx\" />\r\n    <ClCompile Include=\"..\\..\\src\\CharClassify.cxx\" />\r\n    <ClCompile Include=\"..\\..\\src\\ContractionState.cxx\" />\r\n    <ClCompile Include=\"..\\..\\src\\Decoration.cxx\" />\r\n    <ClCompile Include=\"..\\..\\src\\Document.cxx\" />\r\n    <ClCompile Include=\"..\\..\\src\\Geometry.cxx\" />\r\n    <ClCompile Include=\"..\\..\\src\\PerLine.cxx\" />\r\n    <ClCompile Include=\"..\\..\\src\\RESearch.cxx\" />\r\n    <ClCompile Include=\"..\\..\\src\\RunStyles.cxx\" />\r\n    <ClCompile Include=\"..\\..\\src\\UndoHistory.cxx\" />\r\n    <ClCompile Include=\"..\\..\\src\\UniConversion.cxx\" />\r\n    <ClCompile Include=\"..\\..\\src\\UniqueString.cxx\" />\r\n    <ClCompile Include=\"test*.cxx\" />\r\n    <ClCompile Include=\"UnitTester.cxx\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <Natvis Include=\"Sci.natvis\" />\r\n  </ItemGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\r\n  <ImportGroup Label=\"ExtensionTargets\">\r\n  </ImportGroup>\r\n</Project>"
  },
  {
    "path": "scintilla/test/unit/catch.hpp",
    "content": "/*\n *  Catch v2.13.10\n *  Generated: 2022-10-16 11:01:23.452308\n *  ----------------------------------------------------------\n *  This file has been merged from multiple headers. Please don't edit it directly\n *  Copyright (c) 2022 Two Blue Cubes Ltd. All rights reserved.\n *\n *  Distributed under the Boost Software License, Version 1.0. (See accompanying\n *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\n */\n#ifndef TWOBLUECUBES_SINGLE_INCLUDE_CATCH_HPP_INCLUDED\n#define TWOBLUECUBES_SINGLE_INCLUDE_CATCH_HPP_INCLUDED\n// start catch.hpp\n\n\n#define CATCH_VERSION_MAJOR 2\n#define CATCH_VERSION_MINOR 13\n#define CATCH_VERSION_PATCH 10\n\n#ifdef __clang__\n#    pragma clang system_header\n#elif defined __GNUC__\n#    pragma GCC system_header\n#endif\n\n// start catch_suppress_warnings.h\n\n#ifdef __clang__\n#   ifdef __ICC // icpc defines the __clang__ macro\n#       pragma warning(push)\n#       pragma warning(disable: 161 1682)\n#   else // __ICC\n#       pragma clang diagnostic push\n#       pragma clang diagnostic ignored \"-Wpadded\"\n#       pragma clang diagnostic ignored \"-Wswitch-enum\"\n#       pragma clang diagnostic ignored \"-Wcovered-switch-default\"\n#    endif\n#elif defined __GNUC__\n     // Because REQUIREs trigger GCC's -Wparentheses, and because still\n     // supported version of g++ have only buggy support for _Pragmas,\n     // Wparentheses have to be suppressed globally.\n#    pragma GCC diagnostic ignored \"-Wparentheses\" // See #674 for details\n\n#    pragma GCC diagnostic push\n#    pragma GCC diagnostic ignored \"-Wunused-variable\"\n#    pragma GCC diagnostic ignored \"-Wpadded\"\n#endif\n// end catch_suppress_warnings.h\n#if defined(CATCH_CONFIG_MAIN) || defined(CATCH_CONFIG_RUNNER)\n#  define CATCH_IMPL\n#  define CATCH_CONFIG_ALL_PARTS\n#endif\n\n// In the impl file, we want to have access to all parts of the headers\n// Can also be used to sanely support PCHs\n#if defined(CATCH_CONFIG_ALL_PARTS)\n#  define CATCH_CONFIG_EXTERNAL_INTERFACES\n#  if defined(CATCH_CONFIG_DISABLE_MATCHERS)\n#    undef CATCH_CONFIG_DISABLE_MATCHERS\n#  endif\n#  if !defined(CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER)\n#    define CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER\n#  endif\n#endif\n\n#if !defined(CATCH_CONFIG_IMPL_ONLY)\n// start catch_platform.h\n\n// See e.g.:\n// https://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/TargetConditionals.h.auto.html\n#ifdef __APPLE__\n#  include <TargetConditionals.h>\n#  if (defined(TARGET_OS_OSX) && TARGET_OS_OSX == 1) || \\\n      (defined(TARGET_OS_MAC) && TARGET_OS_MAC == 1)\n#    define CATCH_PLATFORM_MAC\n#  elif (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE == 1)\n#    define CATCH_PLATFORM_IPHONE\n#  endif\n\n#elif defined(linux) || defined(__linux) || defined(__linux__)\n#  define CATCH_PLATFORM_LINUX\n\n#elif defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(_MSC_VER) || defined(__MINGW32__)\n#  define CATCH_PLATFORM_WINDOWS\n#endif\n\n// end catch_platform.h\n\n#ifdef CATCH_IMPL\n#  ifndef CLARA_CONFIG_MAIN\n#    define CLARA_CONFIG_MAIN_NOT_DEFINED\n#    define CLARA_CONFIG_MAIN\n#  endif\n#endif\n\n// start catch_user_interfaces.h\n\nnamespace Catch {\n    unsigned int rngSeed();\n}\n\n// end catch_user_interfaces.h\n// start catch_tag_alias_autoregistrar.h\n\n// start catch_common.h\n\n// start catch_compiler_capabilities.h\n\n// Detect a number of compiler features - by compiler\n// The following features are defined:\n//\n// CATCH_CONFIG_COUNTER : is the __COUNTER__ macro supported?\n// CATCH_CONFIG_WINDOWS_SEH : is Windows SEH supported?\n// CATCH_CONFIG_POSIX_SIGNALS : are POSIX signals supported?\n// CATCH_CONFIG_DISABLE_EXCEPTIONS : Are exceptions enabled?\n// ****************\n// Note to maintainers: if new toggles are added please document them\n// in configuration.md, too\n// ****************\n\n// In general each macro has a _NO_<feature name> form\n// (e.g. CATCH_CONFIG_NO_POSIX_SIGNALS) which disables the feature.\n// Many features, at point of detection, define an _INTERNAL_ macro, so they\n// can be combined, en-mass, with the _NO_ forms later.\n\n#ifdef __cplusplus\n\n#  if (__cplusplus >= 201402L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201402L)\n#    define CATCH_CPP14_OR_GREATER\n#  endif\n\n#  if (__cplusplus >= 201703L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L)\n#    define CATCH_CPP17_OR_GREATER\n#  endif\n\n#endif\n\n// Only GCC compiler should be used in this block, so other compilers trying to\n// mask themselves as GCC should be ignored.\n#if defined(__GNUC__) && !defined(__clang__) && !defined(__ICC) && !defined(__CUDACC__) && !defined(__LCC__)\n#    define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( \"GCC diagnostic push\" )\n#    define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION  _Pragma( \"GCC diagnostic pop\" )\n\n#    define CATCH_INTERNAL_IGNORE_BUT_WARN(...) (void)__builtin_constant_p(__VA_ARGS__)\n\n#endif\n\n#if defined(__clang__)\n\n#    define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( \"clang diagnostic push\" )\n#    define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION  _Pragma( \"clang diagnostic pop\" )\n\n// As of this writing, IBM XL's implementation of __builtin_constant_p has a bug\n// which results in calls to destructors being emitted for each temporary,\n// without a matching initialization. In practice, this can result in something\n// like `std::string::~string` being called on an uninitialized value.\n//\n// For example, this code will likely segfault under IBM XL:\n// ```\n// REQUIRE(std::string(\"12\") + \"34\" == \"1234\")\n// ```\n//\n// Therefore, `CATCH_INTERNAL_IGNORE_BUT_WARN` is not implemented.\n#  if !defined(__ibmxl__) && !defined(__CUDACC__)\n#    define CATCH_INTERNAL_IGNORE_BUT_WARN(...) (void)__builtin_constant_p(__VA_ARGS__) /* NOLINT(cppcoreguidelines-pro-type-vararg, hicpp-vararg) */\n#  endif\n\n#    define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \\\n         _Pragma( \"clang diagnostic ignored \\\"-Wexit-time-destructors\\\"\" ) \\\n         _Pragma( \"clang diagnostic ignored \\\"-Wglobal-constructors\\\"\")\n\n#    define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS \\\n         _Pragma( \"clang diagnostic ignored \\\"-Wparentheses\\\"\" )\n\n#    define CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS \\\n         _Pragma( \"clang diagnostic ignored \\\"-Wunused-variable\\\"\" )\n\n#    define CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS \\\n         _Pragma( \"clang diagnostic ignored \\\"-Wgnu-zero-variadic-macro-arguments\\\"\" )\n\n#    define CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \\\n         _Pragma( \"clang diagnostic ignored \\\"-Wunused-template\\\"\" )\n\n#endif // __clang__\n\n////////////////////////////////////////////////////////////////////////////////\n// Assume that non-Windows platforms support posix signals by default\n#if !defined(CATCH_PLATFORM_WINDOWS)\n    #define CATCH_INTERNAL_CONFIG_POSIX_SIGNALS\n#endif\n\n////////////////////////////////////////////////////////////////////////////////\n// We know some environments not to support full POSIX signals\n#if defined(__CYGWIN__) || defined(__QNX__) || defined(__EMSCRIPTEN__) || defined(__DJGPP__)\n    #define CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS\n#endif\n\n#ifdef __OS400__\n#       define CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS\n#       define CATCH_CONFIG_COLOUR_NONE\n#endif\n\n////////////////////////////////////////////////////////////////////////////////\n// Android somehow still does not support std::to_string\n#if defined(__ANDROID__)\n#    define CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING\n#    define CATCH_INTERNAL_CONFIG_ANDROID_LOGWRITE\n#endif\n\n////////////////////////////////////////////////////////////////////////////////\n// Not all Windows environments support SEH properly\n#if defined(__MINGW32__)\n#    define CATCH_INTERNAL_CONFIG_NO_WINDOWS_SEH\n#endif\n\n////////////////////////////////////////////////////////////////////////////////\n// PS4\n#if defined(__ORBIS__)\n#    define CATCH_INTERNAL_CONFIG_NO_NEW_CAPTURE\n#endif\n\n////////////////////////////////////////////////////////////////////////////////\n// Cygwin\n#ifdef __CYGWIN__\n\n// Required for some versions of Cygwin to declare gettimeofday\n// see: http://stackoverflow.com/questions/36901803/gettimeofday-not-declared-in-this-scope-cygwin\n#   define _BSD_SOURCE\n// some versions of cygwin (most) do not support std::to_string. Use the libstd check.\n// https://gcc.gnu.org/onlinedocs/gcc-4.8.2/libstdc++/api/a01053_source.html line 2812-2813\n# if !((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99) \\\n           && !defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF))\n\n#    define CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING\n\n# endif\n#endif // __CYGWIN__\n\n////////////////////////////////////////////////////////////////////////////////\n// Visual C++\n#if defined(_MSC_VER)\n\n// Universal Windows platform does not support SEH\n// Or console colours (or console at all...)\n#  if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP)\n#    define CATCH_CONFIG_COLOUR_NONE\n#  else\n#    define CATCH_INTERNAL_CONFIG_WINDOWS_SEH\n#  endif\n\n#  if !defined(__clang__) // Handle Clang masquerading for msvc\n\n// MSVC traditional preprocessor needs some workaround for __VA_ARGS__\n// _MSVC_TRADITIONAL == 0 means new conformant preprocessor\n// _MSVC_TRADITIONAL == 1 means old traditional non-conformant preprocessor\n#    if !defined(_MSVC_TRADITIONAL) || (defined(_MSVC_TRADITIONAL) && _MSVC_TRADITIONAL)\n#      define CATCH_INTERNAL_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n#    endif // MSVC_TRADITIONAL\n\n// Only do this if we're not using clang on Windows, which uses `diagnostic push` & `diagnostic pop`\n#    define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION __pragma( warning(push) )\n#    define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION  __pragma( warning(pop) )\n#  endif // __clang__\n\n#endif // _MSC_VER\n\n#if defined(_REENTRANT) || defined(_MSC_VER)\n// Enable async processing, as -pthread is specified or no additional linking is required\n# define CATCH_INTERNAL_CONFIG_USE_ASYNC\n#endif // _MSC_VER\n\n////////////////////////////////////////////////////////////////////////////////\n// Check if we are compiled with -fno-exceptions or equivalent\n#if defined(__EXCEPTIONS) || defined(__cpp_exceptions) || defined(_CPPUNWIND)\n#  define CATCH_INTERNAL_CONFIG_EXCEPTIONS_ENABLED\n#endif\n\n////////////////////////////////////////////////////////////////////////////////\n// DJGPP\n#ifdef __DJGPP__\n#  define CATCH_INTERNAL_CONFIG_NO_WCHAR\n#endif // __DJGPP__\n\n////////////////////////////////////////////////////////////////////////////////\n// Embarcadero C++Build\n#if defined(__BORLANDC__)\n    #define CATCH_INTERNAL_CONFIG_POLYFILL_ISNAN\n#endif\n\n////////////////////////////////////////////////////////////////////////////////\n\n// Use of __COUNTER__ is suppressed during code analysis in\n// CLion/AppCode 2017.2.x and former, because __COUNTER__ is not properly\n// handled by it.\n// Otherwise all supported compilers support COUNTER macro,\n// but user still might want to turn it off\n#if ( !defined(__JETBRAINS_IDE__) || __JETBRAINS_IDE__ >= 20170300L )\n    #define CATCH_INTERNAL_CONFIG_COUNTER\n#endif\n\n////////////////////////////////////////////////////////////////////////////////\n\n// RTX is a special version of Windows that is real time.\n// This means that it is detected as Windows, but does not provide\n// the same set of capabilities as real Windows does.\n#if defined(UNDER_RTSS) || defined(RTX64_BUILD)\n    #define CATCH_INTERNAL_CONFIG_NO_WINDOWS_SEH\n    #define CATCH_INTERNAL_CONFIG_NO_ASYNC\n    #define CATCH_CONFIG_COLOUR_NONE\n#endif\n\n#if !defined(_GLIBCXX_USE_C99_MATH_TR1)\n#define CATCH_INTERNAL_CONFIG_GLOBAL_NEXTAFTER\n#endif\n\n// Various stdlib support checks that require __has_include\n#if defined(__has_include)\n  // Check if string_view is available and usable\n  #if __has_include(<string_view>) && defined(CATCH_CPP17_OR_GREATER)\n  #    define CATCH_INTERNAL_CONFIG_CPP17_STRING_VIEW\n  #endif\n\n  // Check if optional is available and usable\n  #  if __has_include(<optional>) && defined(CATCH_CPP17_OR_GREATER)\n  #    define CATCH_INTERNAL_CONFIG_CPP17_OPTIONAL\n  #  endif // __has_include(<optional>) && defined(CATCH_CPP17_OR_GREATER)\n\n  // Check if byte is available and usable\n  #  if __has_include(<cstddef>) && defined(CATCH_CPP17_OR_GREATER)\n  #    include <cstddef>\n  #    if defined(__cpp_lib_byte) && (__cpp_lib_byte > 0)\n  #      define CATCH_INTERNAL_CONFIG_CPP17_BYTE\n  #    endif\n  #  endif // __has_include(<cstddef>) && defined(CATCH_CPP17_OR_GREATER)\n\n  // Check if variant is available and usable\n  #  if __has_include(<variant>) && defined(CATCH_CPP17_OR_GREATER)\n  #    if defined(__clang__) && (__clang_major__ < 8)\n         // work around clang bug with libstdc++ https://bugs.llvm.org/show_bug.cgi?id=31852\n         // fix should be in clang 8, workaround in libstdc++ 8.2\n  #      include <ciso646>\n  #      if defined(__GLIBCXX__) && defined(_GLIBCXX_RELEASE) && (_GLIBCXX_RELEASE < 9)\n  #        define CATCH_CONFIG_NO_CPP17_VARIANT\n  #      else\n  #        define CATCH_INTERNAL_CONFIG_CPP17_VARIANT\n  #      endif // defined(__GLIBCXX__) && defined(_GLIBCXX_RELEASE) && (_GLIBCXX_RELEASE < 9)\n  #    else\n  #      define CATCH_INTERNAL_CONFIG_CPP17_VARIANT\n  #    endif // defined(__clang__) && (__clang_major__ < 8)\n  #  endif // __has_include(<variant>) && defined(CATCH_CPP17_OR_GREATER)\n#endif // defined(__has_include)\n\n#if defined(CATCH_INTERNAL_CONFIG_COUNTER) && !defined(CATCH_CONFIG_NO_COUNTER) && !defined(CATCH_CONFIG_COUNTER)\n#   define CATCH_CONFIG_COUNTER\n#endif\n#if defined(CATCH_INTERNAL_CONFIG_WINDOWS_SEH) && !defined(CATCH_CONFIG_NO_WINDOWS_SEH) && !defined(CATCH_CONFIG_WINDOWS_SEH) && !defined(CATCH_INTERNAL_CONFIG_NO_WINDOWS_SEH)\n#   define CATCH_CONFIG_WINDOWS_SEH\n#endif\n// This is set by default, because we assume that unix compilers are posix-signal-compatible by default.\n#if defined(CATCH_INTERNAL_CONFIG_POSIX_SIGNALS) && !defined(CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS) && !defined(CATCH_CONFIG_NO_POSIX_SIGNALS) && !defined(CATCH_CONFIG_POSIX_SIGNALS)\n#   define CATCH_CONFIG_POSIX_SIGNALS\n#endif\n// This is set by default, because we assume that compilers with no wchar_t support are just rare exceptions.\n#if !defined(CATCH_INTERNAL_CONFIG_NO_WCHAR) && !defined(CATCH_CONFIG_NO_WCHAR) && !defined(CATCH_CONFIG_WCHAR)\n#   define CATCH_CONFIG_WCHAR\n#endif\n\n#if !defined(CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING) && !defined(CATCH_CONFIG_NO_CPP11_TO_STRING) && !defined(CATCH_CONFIG_CPP11_TO_STRING)\n#    define CATCH_CONFIG_CPP11_TO_STRING\n#endif\n\n#if defined(CATCH_INTERNAL_CONFIG_CPP17_OPTIONAL) && !defined(CATCH_CONFIG_NO_CPP17_OPTIONAL) && !defined(CATCH_CONFIG_CPP17_OPTIONAL)\n#  define CATCH_CONFIG_CPP17_OPTIONAL\n#endif\n\n#if defined(CATCH_INTERNAL_CONFIG_CPP17_STRING_VIEW) && !defined(CATCH_CONFIG_NO_CPP17_STRING_VIEW) && !defined(CATCH_CONFIG_CPP17_STRING_VIEW)\n#  define CATCH_CONFIG_CPP17_STRING_VIEW\n#endif\n\n#if defined(CATCH_INTERNAL_CONFIG_CPP17_VARIANT) && !defined(CATCH_CONFIG_NO_CPP17_VARIANT) && !defined(CATCH_CONFIG_CPP17_VARIANT)\n#  define CATCH_CONFIG_CPP17_VARIANT\n#endif\n\n#if defined(CATCH_INTERNAL_CONFIG_CPP17_BYTE) && !defined(CATCH_CONFIG_NO_CPP17_BYTE) && !defined(CATCH_CONFIG_CPP17_BYTE)\n#  define CATCH_CONFIG_CPP17_BYTE\n#endif\n\n#if defined(CATCH_CONFIG_EXPERIMENTAL_REDIRECT)\n#  define CATCH_INTERNAL_CONFIG_NEW_CAPTURE\n#endif\n\n#if defined(CATCH_INTERNAL_CONFIG_NEW_CAPTURE) && !defined(CATCH_INTERNAL_CONFIG_NO_NEW_CAPTURE) && !defined(CATCH_CONFIG_NO_NEW_CAPTURE) && !defined(CATCH_CONFIG_NEW_CAPTURE)\n#  define CATCH_CONFIG_NEW_CAPTURE\n#endif\n\n#if !defined(CATCH_INTERNAL_CONFIG_EXCEPTIONS_ENABLED) && !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)\n#  define CATCH_CONFIG_DISABLE_EXCEPTIONS\n#endif\n\n#if defined(CATCH_INTERNAL_CONFIG_POLYFILL_ISNAN) && !defined(CATCH_CONFIG_NO_POLYFILL_ISNAN) && !defined(CATCH_CONFIG_POLYFILL_ISNAN)\n#  define CATCH_CONFIG_POLYFILL_ISNAN\n#endif\n\n#if defined(CATCH_INTERNAL_CONFIG_USE_ASYNC)  && !defined(CATCH_INTERNAL_CONFIG_NO_ASYNC) && !defined(CATCH_CONFIG_NO_USE_ASYNC) && !defined(CATCH_CONFIG_USE_ASYNC)\n#  define CATCH_CONFIG_USE_ASYNC\n#endif\n\n#if defined(CATCH_INTERNAL_CONFIG_ANDROID_LOGWRITE) && !defined(CATCH_CONFIG_NO_ANDROID_LOGWRITE) && !defined(CATCH_CONFIG_ANDROID_LOGWRITE)\n#  define CATCH_CONFIG_ANDROID_LOGWRITE\n#endif\n\n#if defined(CATCH_INTERNAL_CONFIG_GLOBAL_NEXTAFTER) && !defined(CATCH_CONFIG_NO_GLOBAL_NEXTAFTER) && !defined(CATCH_CONFIG_GLOBAL_NEXTAFTER)\n#  define CATCH_CONFIG_GLOBAL_NEXTAFTER\n#endif\n\n// Even if we do not think the compiler has that warning, we still have\n// to provide a macro that can be used by the code.\n#if !defined(CATCH_INTERNAL_START_WARNINGS_SUPPRESSION)\n#   define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION\n#endif\n#if !defined(CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION)\n#   define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION\n#endif\n#if !defined(CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS)\n#   define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS\n#endif\n#if !defined(CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS)\n#   define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS\n#endif\n#if !defined(CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS)\n#   define CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS\n#endif\n#if !defined(CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS)\n#   define CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS\n#endif\n\n// The goal of this macro is to avoid evaluation of the arguments, but\n// still have the compiler warn on problems inside...\n#if !defined(CATCH_INTERNAL_IGNORE_BUT_WARN)\n#   define CATCH_INTERNAL_IGNORE_BUT_WARN(...)\n#endif\n\n#if defined(__APPLE__) && defined(__apple_build_version__) && (__clang_major__ < 10)\n#   undef CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS\n#elif defined(__clang__) && (__clang_major__ < 5)\n#   undef CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS\n#endif\n\n#if !defined(CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS)\n#   define CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS\n#endif\n\n#if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)\n#define CATCH_TRY if ((true))\n#define CATCH_CATCH_ALL if ((false))\n#define CATCH_CATCH_ANON(type) if ((false))\n#else\n#define CATCH_TRY try\n#define CATCH_CATCH_ALL catch (...)\n#define CATCH_CATCH_ANON(type) catch (type)\n#endif\n\n#if defined(CATCH_INTERNAL_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR) && !defined(CATCH_CONFIG_NO_TRADITIONAL_MSVC_PREPROCESSOR) && !defined(CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR)\n#define CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n#endif\n\n// end catch_compiler_capabilities.h\n#define INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) name##line\n#define INTERNAL_CATCH_UNIQUE_NAME_LINE( name, line ) INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line )\n#ifdef CATCH_CONFIG_COUNTER\n#  define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __COUNTER__ )\n#else\n#  define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __LINE__ )\n#endif\n\n#include <iosfwd>\n#include <string>\n#include <cstdint>\n\n// We need a dummy global operator<< so we can bring it into Catch namespace later\nstruct Catch_global_namespace_dummy {};\nstd::ostream& operator<<(std::ostream&, Catch_global_namespace_dummy);\n\nnamespace Catch {\n\n    struct CaseSensitive { enum Choice {\n        Yes,\n        No\n    }; };\n\n    class NonCopyable {\n        NonCopyable( NonCopyable const& )              = delete;\n        NonCopyable( NonCopyable && )                  = delete;\n        NonCopyable& operator = ( NonCopyable const& ) = delete;\n        NonCopyable& operator = ( NonCopyable && )     = delete;\n\n    protected:\n        NonCopyable();\n        virtual ~NonCopyable();\n    };\n\n    struct SourceLineInfo {\n\n        SourceLineInfo() = delete;\n        SourceLineInfo( char const* _file, std::size_t _line ) noexcept\n        :   file( _file ),\n            line( _line )\n        {}\n\n        SourceLineInfo( SourceLineInfo const& other )            = default;\n        SourceLineInfo& operator = ( SourceLineInfo const& )     = default;\n        SourceLineInfo( SourceLineInfo&& )              noexcept = default;\n        SourceLineInfo& operator = ( SourceLineInfo&& ) noexcept = default;\n\n        bool empty() const noexcept { return file[0] == '\\0'; }\n        bool operator == ( SourceLineInfo const& other ) const noexcept;\n        bool operator < ( SourceLineInfo const& other ) const noexcept;\n\n        char const* file;\n        std::size_t line;\n    };\n\n    std::ostream& operator << ( std::ostream& os, SourceLineInfo const& info );\n\n    // Bring in operator<< from global namespace into Catch namespace\n    // This is necessary because the overload of operator<< above makes\n    // lookup stop at namespace Catch\n    using ::operator<<;\n\n    // Use this in variadic streaming macros to allow\n    //    >> +StreamEndStop\n    // as well as\n    //    >> stuff +StreamEndStop\n    struct StreamEndStop {\n        std::string operator+() const;\n    };\n    template<typename T>\n    T const& operator + ( T const& value, StreamEndStop ) {\n        return value;\n    }\n}\n\n#define CATCH_INTERNAL_LINEINFO \\\n    ::Catch::SourceLineInfo( __FILE__, static_cast<std::size_t>( __LINE__ ) )\n\n// end catch_common.h\nnamespace Catch {\n\n    struct RegistrarForTagAliases {\n        RegistrarForTagAliases( char const* alias, char const* tag, SourceLineInfo const& lineInfo );\n    };\n\n} // end namespace Catch\n\n#define CATCH_REGISTER_TAG_ALIAS( alias, spec ) \\\n    CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \\\n    CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \\\n    namespace{ Catch::RegistrarForTagAliases INTERNAL_CATCH_UNIQUE_NAME( AutoRegisterTagAlias )( alias, spec, CATCH_INTERNAL_LINEINFO ); } \\\n    CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION\n\n// end catch_tag_alias_autoregistrar.h\n// start catch_test_registry.h\n\n// start catch_interfaces_testcase.h\n\n#include <vector>\n\nnamespace Catch {\n\n    class TestSpec;\n\n    struct ITestInvoker {\n        virtual void invoke () const = 0;\n        virtual ~ITestInvoker();\n    };\n\n    class TestCase;\n    struct IConfig;\n\n    struct ITestCaseRegistry {\n        virtual ~ITestCaseRegistry();\n        virtual std::vector<TestCase> const& getAllTests() const = 0;\n        virtual std::vector<TestCase> const& getAllTestsSorted( IConfig const& config ) const = 0;\n    };\n\n    bool isThrowSafe( TestCase const& testCase, IConfig const& config );\n    bool matchTest( TestCase const& testCase, TestSpec const& testSpec, IConfig const& config );\n    std::vector<TestCase> filterTests( std::vector<TestCase> const& testCases, TestSpec const& testSpec, IConfig const& config );\n    std::vector<TestCase> const& getAllTestCasesSorted( IConfig const& config );\n\n}\n\n// end catch_interfaces_testcase.h\n// start catch_stringref.h\n\n#include <cstddef>\n#include <string>\n#include <iosfwd>\n#include <cassert>\n\nnamespace Catch {\n\n    /// A non-owning string class (similar to the forthcoming std::string_view)\n    /// Note that, because a StringRef may be a substring of another string,\n    /// it may not be null terminated.\n    class StringRef {\n    public:\n        using size_type = std::size_t;\n        using const_iterator = const char*;\n\n    private:\n        static constexpr char const* const s_empty = \"\";\n\n        char const* m_start = s_empty;\n        size_type m_size = 0;\n\n    public: // construction\n        constexpr StringRef() noexcept = default;\n\n        StringRef( char const* rawChars ) noexcept;\n\n        constexpr StringRef( char const* rawChars, size_type size ) noexcept\n        :   m_start( rawChars ),\n            m_size( size )\n        {}\n\n        StringRef( std::string const& stdString ) noexcept\n        :   m_start( stdString.c_str() ),\n            m_size( stdString.size() )\n        {}\n\n        explicit operator std::string() const {\n            return std::string(m_start, m_size);\n        }\n\n    public: // operators\n        auto operator == ( StringRef const& other ) const noexcept -> bool;\n        auto operator != (StringRef const& other) const noexcept -> bool {\n            return !(*this == other);\n        }\n\n        auto operator[] ( size_type index ) const noexcept -> char {\n            assert(index < m_size);\n            return m_start[index];\n        }\n\n    public: // named queries\n        constexpr auto empty() const noexcept -> bool {\n            return m_size == 0;\n        }\n        constexpr auto size() const noexcept -> size_type {\n            return m_size;\n        }\n\n        // Returns the current start pointer. If the StringRef is not\n        // null-terminated, throws std::domain_exception\n        auto c_str() const -> char const*;\n\n    public: // substrings and searches\n        // Returns a substring of [start, start + length).\n        // If start + length > size(), then the substring is [start, size()).\n        // If start > size(), then the substring is empty.\n        auto substr( size_type start, size_type length ) const noexcept -> StringRef;\n\n        // Returns the current start pointer. May not be null-terminated.\n        auto data() const noexcept -> char const*;\n\n        constexpr auto isNullTerminated() const noexcept -> bool {\n            return m_start[m_size] == '\\0';\n        }\n\n    public: // iterators\n        constexpr const_iterator begin() const { return m_start; }\n        constexpr const_iterator end() const { return m_start + m_size; }\n    };\n\n    auto operator += ( std::string& lhs, StringRef const& sr ) -> std::string&;\n    auto operator << ( std::ostream& os, StringRef const& sr ) -> std::ostream&;\n\n    constexpr auto operator \"\" _sr( char const* rawChars, std::size_t size ) noexcept -> StringRef {\n        return StringRef( rawChars, size );\n    }\n} // namespace Catch\n\nconstexpr auto operator \"\" _catch_sr( char const* rawChars, std::size_t size ) noexcept -> Catch::StringRef {\n    return Catch::StringRef( rawChars, size );\n}\n\n// end catch_stringref.h\n// start catch_preprocessor.hpp\n\n\n#define CATCH_RECURSION_LEVEL0(...) __VA_ARGS__\n#define CATCH_RECURSION_LEVEL1(...) CATCH_RECURSION_LEVEL0(CATCH_RECURSION_LEVEL0(CATCH_RECURSION_LEVEL0(__VA_ARGS__)))\n#define CATCH_RECURSION_LEVEL2(...) CATCH_RECURSION_LEVEL1(CATCH_RECURSION_LEVEL1(CATCH_RECURSION_LEVEL1(__VA_ARGS__)))\n#define CATCH_RECURSION_LEVEL3(...) CATCH_RECURSION_LEVEL2(CATCH_RECURSION_LEVEL2(CATCH_RECURSION_LEVEL2(__VA_ARGS__)))\n#define CATCH_RECURSION_LEVEL4(...) CATCH_RECURSION_LEVEL3(CATCH_RECURSION_LEVEL3(CATCH_RECURSION_LEVEL3(__VA_ARGS__)))\n#define CATCH_RECURSION_LEVEL5(...) CATCH_RECURSION_LEVEL4(CATCH_RECURSION_LEVEL4(CATCH_RECURSION_LEVEL4(__VA_ARGS__)))\n\n#ifdef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n#define INTERNAL_CATCH_EXPAND_VARGS(...) __VA_ARGS__\n// MSVC needs more evaluations\n#define CATCH_RECURSION_LEVEL6(...) CATCH_RECURSION_LEVEL5(CATCH_RECURSION_LEVEL5(CATCH_RECURSION_LEVEL5(__VA_ARGS__)))\n#define CATCH_RECURSE(...)  CATCH_RECURSION_LEVEL6(CATCH_RECURSION_LEVEL6(__VA_ARGS__))\n#else\n#define CATCH_RECURSE(...)  CATCH_RECURSION_LEVEL5(__VA_ARGS__)\n#endif\n\n#define CATCH_REC_END(...)\n#define CATCH_REC_OUT\n\n#define CATCH_EMPTY()\n#define CATCH_DEFER(id) id CATCH_EMPTY()\n\n#define CATCH_REC_GET_END2() 0, CATCH_REC_END\n#define CATCH_REC_GET_END1(...) CATCH_REC_GET_END2\n#define CATCH_REC_GET_END(...) CATCH_REC_GET_END1\n#define CATCH_REC_NEXT0(test, next, ...) next CATCH_REC_OUT\n#define CATCH_REC_NEXT1(test, next) CATCH_DEFER ( CATCH_REC_NEXT0 ) ( test, next, 0)\n#define CATCH_REC_NEXT(test, next)  CATCH_REC_NEXT1(CATCH_REC_GET_END test, next)\n\n#define CATCH_REC_LIST0(f, x, peek, ...) , f(x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1) ) ( f, peek, __VA_ARGS__ )\n#define CATCH_REC_LIST1(f, x, peek, ...) , f(x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST0) ) ( f, peek, __VA_ARGS__ )\n#define CATCH_REC_LIST2(f, x, peek, ...)   f(x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1) ) ( f, peek, __VA_ARGS__ )\n\n#define CATCH_REC_LIST0_UD(f, userdata, x, peek, ...) , f(userdata, x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1_UD) ) ( f, userdata, peek, __VA_ARGS__ )\n#define CATCH_REC_LIST1_UD(f, userdata, x, peek, ...) , f(userdata, x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST0_UD) ) ( f, userdata, peek, __VA_ARGS__ )\n#define CATCH_REC_LIST2_UD(f, userdata, x, peek, ...)   f(userdata, x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1_UD) ) ( f, userdata, peek, __VA_ARGS__ )\n\n// Applies the function macro `f` to each of the remaining parameters, inserts commas between the results,\n// and passes userdata as the first parameter to each invocation,\n// e.g. CATCH_REC_LIST_UD(f, x, a, b, c) evaluates to f(x, a), f(x, b), f(x, c)\n#define CATCH_REC_LIST_UD(f, userdata, ...) CATCH_RECURSE(CATCH_REC_LIST2_UD(f, userdata, __VA_ARGS__, ()()(), ()()(), ()()(), 0))\n\n#define CATCH_REC_LIST(f, ...) CATCH_RECURSE(CATCH_REC_LIST2(f, __VA_ARGS__, ()()(), ()()(), ()()(), 0))\n\n#define INTERNAL_CATCH_EXPAND1(param) INTERNAL_CATCH_EXPAND2(param)\n#define INTERNAL_CATCH_EXPAND2(...) INTERNAL_CATCH_NO## __VA_ARGS__\n#define INTERNAL_CATCH_DEF(...) INTERNAL_CATCH_DEF __VA_ARGS__\n#define INTERNAL_CATCH_NOINTERNAL_CATCH_DEF\n#define INTERNAL_CATCH_STRINGIZE(...) INTERNAL_CATCH_STRINGIZE2(__VA_ARGS__)\n#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n#define INTERNAL_CATCH_STRINGIZE2(...) #__VA_ARGS__\n#define INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS(param) INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_REMOVE_PARENS(param))\n#else\n// MSVC is adding extra space and needs another indirection to expand INTERNAL_CATCH_NOINTERNAL_CATCH_DEF\n#define INTERNAL_CATCH_STRINGIZE2(...) INTERNAL_CATCH_STRINGIZE3(__VA_ARGS__)\n#define INTERNAL_CATCH_STRINGIZE3(...) #__VA_ARGS__\n#define INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS(param) (INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_REMOVE_PARENS(param)) + 1)\n#endif\n\n#define INTERNAL_CATCH_MAKE_NAMESPACE2(...) ns_##__VA_ARGS__\n#define INTERNAL_CATCH_MAKE_NAMESPACE(name) INTERNAL_CATCH_MAKE_NAMESPACE2(name)\n\n#define INTERNAL_CATCH_REMOVE_PARENS(...) INTERNAL_CATCH_EXPAND1(INTERNAL_CATCH_DEF __VA_ARGS__)\n\n#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n#define INTERNAL_CATCH_MAKE_TYPE_LIST2(...) decltype(get_wrapper<INTERNAL_CATCH_REMOVE_PARENS_GEN(__VA_ARGS__)>())\n#define INTERNAL_CATCH_MAKE_TYPE_LIST(...) INTERNAL_CATCH_MAKE_TYPE_LIST2(INTERNAL_CATCH_REMOVE_PARENS(__VA_ARGS__))\n#else\n#define INTERNAL_CATCH_MAKE_TYPE_LIST2(...) INTERNAL_CATCH_EXPAND_VARGS(decltype(get_wrapper<INTERNAL_CATCH_REMOVE_PARENS_GEN(__VA_ARGS__)>()))\n#define INTERNAL_CATCH_MAKE_TYPE_LIST(...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_MAKE_TYPE_LIST2(INTERNAL_CATCH_REMOVE_PARENS(__VA_ARGS__)))\n#endif\n\n#define INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(...)\\\n    CATCH_REC_LIST(INTERNAL_CATCH_MAKE_TYPE_LIST,__VA_ARGS__)\n\n#define INTERNAL_CATCH_REMOVE_PARENS_1_ARG(_0) INTERNAL_CATCH_REMOVE_PARENS(_0)\n#define INTERNAL_CATCH_REMOVE_PARENS_2_ARG(_0, _1) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_1_ARG(_1)\n#define INTERNAL_CATCH_REMOVE_PARENS_3_ARG(_0, _1, _2) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_2_ARG(_1, _2)\n#define INTERNAL_CATCH_REMOVE_PARENS_4_ARG(_0, _1, _2, _3) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_3_ARG(_1, _2, _3)\n#define INTERNAL_CATCH_REMOVE_PARENS_5_ARG(_0, _1, _2, _3, _4) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_4_ARG(_1, _2, _3, _4)\n#define INTERNAL_CATCH_REMOVE_PARENS_6_ARG(_0, _1, _2, _3, _4, _5) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_5_ARG(_1, _2, _3, _4, _5)\n#define INTERNAL_CATCH_REMOVE_PARENS_7_ARG(_0, _1, _2, _3, _4, _5, _6) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_6_ARG(_1, _2, _3, _4, _5, _6)\n#define INTERNAL_CATCH_REMOVE_PARENS_8_ARG(_0, _1, _2, _3, _4, _5, _6, _7) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_7_ARG(_1, _2, _3, _4, _5, _6, _7)\n#define INTERNAL_CATCH_REMOVE_PARENS_9_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_8_ARG(_1, _2, _3, _4, _5, _6, _7, _8)\n#define INTERNAL_CATCH_REMOVE_PARENS_10_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_9_ARG(_1, _2, _3, _4, _5, _6, _7, _8, _9)\n#define INTERNAL_CATCH_REMOVE_PARENS_11_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_10_ARG(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10)\n\n#define INTERNAL_CATCH_VA_NARGS_IMPL(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, N, ...) N\n\n#define INTERNAL_CATCH_TYPE_GEN\\\n    template<typename...> struct TypeList {};\\\n    template<typename...Ts>\\\n    constexpr auto get_wrapper() noexcept -> TypeList<Ts...> { return {}; }\\\n    template<template<typename...> class...> struct TemplateTypeList{};\\\n    template<template<typename...> class...Cs>\\\n    constexpr auto get_wrapper() noexcept -> TemplateTypeList<Cs...> { return {}; }\\\n    template<typename...>\\\n    struct append;\\\n    template<typename...>\\\n    struct rewrap;\\\n    template<template<typename...> class, typename...>\\\n    struct create;\\\n    template<template<typename...> class, typename>\\\n    struct convert;\\\n    \\\n    template<typename T> \\\n    struct append<T> { using type = T; };\\\n    template< template<typename...> class L1, typename...E1, template<typename...> class L2, typename...E2, typename...Rest>\\\n    struct append<L1<E1...>, L2<E2...>, Rest...> { using type = typename append<L1<E1...,E2...>, Rest...>::type; };\\\n    template< template<typename...> class L1, typename...E1, typename...Rest>\\\n    struct append<L1<E1...>, TypeList<mpl_::na>, Rest...> { using type = L1<E1...>; };\\\n    \\\n    template< template<typename...> class Container, template<typename...> class List, typename...elems>\\\n    struct rewrap<TemplateTypeList<Container>, List<elems...>> { using type = TypeList<Container<elems...>>; };\\\n    template< template<typename...> class Container, template<typename...> class List, class...Elems, typename...Elements>\\\n    struct rewrap<TemplateTypeList<Container>, List<Elems...>, Elements...> { using type = typename append<TypeList<Container<Elems...>>, typename rewrap<TemplateTypeList<Container>, Elements...>::type>::type; };\\\n    \\\n    template<template <typename...> class Final, template< typename...> class...Containers, typename...Types>\\\n    struct create<Final, TemplateTypeList<Containers...>, TypeList<Types...>> { using type = typename append<Final<>, typename rewrap<TemplateTypeList<Containers>, Types...>::type...>::type; };\\\n    template<template <typename...> class Final, template <typename...> class List, typename...Ts>\\\n    struct convert<Final, List<Ts...>> { using type = typename append<Final<>,TypeList<Ts>...>::type; };\n\n#define INTERNAL_CATCH_NTTP_1(signature, ...)\\\n    template<INTERNAL_CATCH_REMOVE_PARENS(signature)> struct Nttp{};\\\n    template<INTERNAL_CATCH_REMOVE_PARENS(signature)>\\\n    constexpr auto get_wrapper() noexcept -> Nttp<__VA_ARGS__> { return {}; } \\\n    template<template<INTERNAL_CATCH_REMOVE_PARENS(signature)> class...> struct NttpTemplateTypeList{};\\\n    template<template<INTERNAL_CATCH_REMOVE_PARENS(signature)> class...Cs>\\\n    constexpr auto get_wrapper() noexcept -> NttpTemplateTypeList<Cs...> { return {}; } \\\n    \\\n    template< template<INTERNAL_CATCH_REMOVE_PARENS(signature)> class Container, template<INTERNAL_CATCH_REMOVE_PARENS(signature)> class List, INTERNAL_CATCH_REMOVE_PARENS(signature)>\\\n    struct rewrap<NttpTemplateTypeList<Container>, List<__VA_ARGS__>> { using type = TypeList<Container<__VA_ARGS__>>; };\\\n    template< template<INTERNAL_CATCH_REMOVE_PARENS(signature)> class Container, template<INTERNAL_CATCH_REMOVE_PARENS(signature)> class List, INTERNAL_CATCH_REMOVE_PARENS(signature), typename...Elements>\\\n    struct rewrap<NttpTemplateTypeList<Container>, List<__VA_ARGS__>, Elements...> { using type = typename append<TypeList<Container<__VA_ARGS__>>, typename rewrap<NttpTemplateTypeList<Container>, Elements...>::type>::type; };\\\n    template<template <typename...> class Final, template<INTERNAL_CATCH_REMOVE_PARENS(signature)> class...Containers, typename...Types>\\\n    struct create<Final, NttpTemplateTypeList<Containers...>, TypeList<Types...>> { using type = typename append<Final<>, typename rewrap<NttpTemplateTypeList<Containers>, Types...>::type...>::type; };\n\n#define INTERNAL_CATCH_DECLARE_SIG_TEST0(TestName)\n#define INTERNAL_CATCH_DECLARE_SIG_TEST1(TestName, signature)\\\n    template<INTERNAL_CATCH_REMOVE_PARENS(signature)>\\\n    static void TestName()\n#define INTERNAL_CATCH_DECLARE_SIG_TEST_X(TestName, signature, ...)\\\n    template<INTERNAL_CATCH_REMOVE_PARENS(signature)>\\\n    static void TestName()\n\n#define INTERNAL_CATCH_DEFINE_SIG_TEST0(TestName)\n#define INTERNAL_CATCH_DEFINE_SIG_TEST1(TestName, signature)\\\n    template<INTERNAL_CATCH_REMOVE_PARENS(signature)>\\\n    static void TestName()\n#define INTERNAL_CATCH_DEFINE_SIG_TEST_X(TestName, signature,...)\\\n    template<INTERNAL_CATCH_REMOVE_PARENS(signature)>\\\n    static void TestName()\n\n#define INTERNAL_CATCH_NTTP_REGISTER0(TestFunc, signature)\\\n    template<typename Type>\\\n    void reg_test(TypeList<Type>, Catch::NameAndTags nameAndTags)\\\n    {\\\n        Catch::AutoReg( Catch::makeTestInvoker(&TestFunc<Type>), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), nameAndTags);\\\n    }\n\n#define INTERNAL_CATCH_NTTP_REGISTER(TestFunc, signature, ...)\\\n    template<INTERNAL_CATCH_REMOVE_PARENS(signature)>\\\n    void reg_test(Nttp<__VA_ARGS__>, Catch::NameAndTags nameAndTags)\\\n    {\\\n        Catch::AutoReg( Catch::makeTestInvoker(&TestFunc<__VA_ARGS__>), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), nameAndTags);\\\n    }\n\n#define INTERNAL_CATCH_NTTP_REGISTER_METHOD0(TestName, signature, ...)\\\n    template<typename Type>\\\n    void reg_test(TypeList<Type>, Catch::StringRef className, Catch::NameAndTags nameAndTags)\\\n    {\\\n        Catch::AutoReg( Catch::makeTestInvoker(&TestName<Type>::test), CATCH_INTERNAL_LINEINFO, className, nameAndTags);\\\n    }\n\n#define INTERNAL_CATCH_NTTP_REGISTER_METHOD(TestName, signature, ...)\\\n    template<INTERNAL_CATCH_REMOVE_PARENS(signature)>\\\n    void reg_test(Nttp<__VA_ARGS__>, Catch::StringRef className, Catch::NameAndTags nameAndTags)\\\n    {\\\n        Catch::AutoReg( Catch::makeTestInvoker(&TestName<__VA_ARGS__>::test), CATCH_INTERNAL_LINEINFO, className, nameAndTags);\\\n    }\n\n#define INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD0(TestName, ClassName)\n#define INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD1(TestName, ClassName, signature)\\\n    template<typename TestType> \\\n    struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName)<TestType> { \\\n        void test();\\\n    }\n\n#define INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X(TestName, ClassName, signature, ...)\\\n    template<INTERNAL_CATCH_REMOVE_PARENS(signature)> \\\n    struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName)<__VA_ARGS__> { \\\n        void test();\\\n    }\n\n#define INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD0(TestName)\n#define INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD1(TestName, signature)\\\n    template<typename TestType> \\\n    void INTERNAL_CATCH_MAKE_NAMESPACE(TestName)::TestName<TestType>::test()\n#define INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X(TestName, signature, ...)\\\n    template<INTERNAL_CATCH_REMOVE_PARENS(signature)> \\\n    void INTERNAL_CATCH_MAKE_NAMESPACE(TestName)::TestName<__VA_ARGS__>::test()\n\n#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n#define INTERNAL_CATCH_NTTP_0\n#define INTERNAL_CATCH_NTTP_GEN(...) INTERNAL_CATCH_VA_NARGS_IMPL(__VA_ARGS__, INTERNAL_CATCH_NTTP_1(__VA_ARGS__), INTERNAL_CATCH_NTTP_1(__VA_ARGS__), INTERNAL_CATCH_NTTP_1(__VA_ARGS__), INTERNAL_CATCH_NTTP_1(__VA_ARGS__), INTERNAL_CATCH_NTTP_1(__VA_ARGS__), INTERNAL_CATCH_NTTP_1( __VA_ARGS__), INTERNAL_CATCH_NTTP_1( __VA_ARGS__), INTERNAL_CATCH_NTTP_1( __VA_ARGS__), INTERNAL_CATCH_NTTP_1( __VA_ARGS__),INTERNAL_CATCH_NTTP_1( __VA_ARGS__), INTERNAL_CATCH_NTTP_0)\n#define INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD(TestName, ...) INTERNAL_CATCH_VA_NARGS_IMPL( \"dummy\", __VA_ARGS__, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD1, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD0)(TestName, __VA_ARGS__)\n#define INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD(TestName, ClassName, ...) INTERNAL_CATCH_VA_NARGS_IMPL( \"dummy\", __VA_ARGS__, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD1, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD0)(TestName, ClassName, __VA_ARGS__)\n#define INTERNAL_CATCH_NTTP_REG_METHOD_GEN(TestName, ...) INTERNAL_CATCH_VA_NARGS_IMPL( \"dummy\", __VA_ARGS__, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD0, INTERNAL_CATCH_NTTP_REGISTER_METHOD0)(TestName, __VA_ARGS__)\n#define INTERNAL_CATCH_NTTP_REG_GEN(TestFunc, ...) INTERNAL_CATCH_VA_NARGS_IMPL( \"dummy\", __VA_ARGS__, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER0, INTERNAL_CATCH_NTTP_REGISTER0)(TestFunc, __VA_ARGS__)\n#define INTERNAL_CATCH_DEFINE_SIG_TEST(TestName, ...) INTERNAL_CATCH_VA_NARGS_IMPL( \"dummy\", __VA_ARGS__, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X,INTERNAL_CATCH_DEFINE_SIG_TEST_X,INTERNAL_CATCH_DEFINE_SIG_TEST1, INTERNAL_CATCH_DEFINE_SIG_TEST0)(TestName, __VA_ARGS__)\n#define INTERNAL_CATCH_DECLARE_SIG_TEST(TestName, ...) INTERNAL_CATCH_VA_NARGS_IMPL( \"dummy\", __VA_ARGS__, INTERNAL_CATCH_DECLARE_SIG_TEST_X,INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X,INTERNAL_CATCH_DECLARE_SIG_TEST_X,INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST1, INTERNAL_CATCH_DECLARE_SIG_TEST0)(TestName, __VA_ARGS__)\n#define INTERNAL_CATCH_REMOVE_PARENS_GEN(...) INTERNAL_CATCH_VA_NARGS_IMPL(__VA_ARGS__, INTERNAL_CATCH_REMOVE_PARENS_11_ARG,INTERNAL_CATCH_REMOVE_PARENS_10_ARG,INTERNAL_CATCH_REMOVE_PARENS_9_ARG,INTERNAL_CATCH_REMOVE_PARENS_8_ARG,INTERNAL_CATCH_REMOVE_PARENS_7_ARG,INTERNAL_CATCH_REMOVE_PARENS_6_ARG,INTERNAL_CATCH_REMOVE_PARENS_5_ARG,INTERNAL_CATCH_REMOVE_PARENS_4_ARG,INTERNAL_CATCH_REMOVE_PARENS_3_ARG,INTERNAL_CATCH_REMOVE_PARENS_2_ARG,INTERNAL_CATCH_REMOVE_PARENS_1_ARG)(__VA_ARGS__)\n#else\n#define INTERNAL_CATCH_NTTP_0(signature)\n#define INTERNAL_CATCH_NTTP_GEN(...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL(__VA_ARGS__, INTERNAL_CATCH_NTTP_1, INTERNAL_CATCH_NTTP_1, INTERNAL_CATCH_NTTP_1, INTERNAL_CATCH_NTTP_1, INTERNAL_CATCH_NTTP_1, INTERNAL_CATCH_NTTP_1, INTERNAL_CATCH_NTTP_1, INTERNAL_CATCH_NTTP_1, INTERNAL_CATCH_NTTP_1,INTERNAL_CATCH_NTTP_1, INTERNAL_CATCH_NTTP_0)( __VA_ARGS__))\n#define INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD(TestName, ...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL( \"dummy\", __VA_ARGS__, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD1, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD0)(TestName, __VA_ARGS__))\n#define INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD(TestName, ClassName, ...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL( \"dummy\", __VA_ARGS__, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD1, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD0)(TestName, ClassName, __VA_ARGS__))\n#define INTERNAL_CATCH_NTTP_REG_METHOD_GEN(TestName, ...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL( \"dummy\", __VA_ARGS__, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD0, INTERNAL_CATCH_NTTP_REGISTER_METHOD0)(TestName, __VA_ARGS__))\n#define INTERNAL_CATCH_NTTP_REG_GEN(TestFunc, ...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL( \"dummy\", __VA_ARGS__, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER0, INTERNAL_CATCH_NTTP_REGISTER0)(TestFunc, __VA_ARGS__))\n#define INTERNAL_CATCH_DEFINE_SIG_TEST(TestName, ...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL( \"dummy\", __VA_ARGS__, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X,INTERNAL_CATCH_DEFINE_SIG_TEST_X,INTERNAL_CATCH_DEFINE_SIG_TEST1, INTERNAL_CATCH_DEFINE_SIG_TEST0)(TestName, __VA_ARGS__))\n#define INTERNAL_CATCH_DECLARE_SIG_TEST(TestName, ...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL( \"dummy\", __VA_ARGS__, INTERNAL_CATCH_DECLARE_SIG_TEST_X,INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X,INTERNAL_CATCH_DECLARE_SIG_TEST_X,INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST1, INTERNAL_CATCH_DECLARE_SIG_TEST0)(TestName, __VA_ARGS__))\n#define INTERNAL_CATCH_REMOVE_PARENS_GEN(...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL(__VA_ARGS__, INTERNAL_CATCH_REMOVE_PARENS_11_ARG,INTERNAL_CATCH_REMOVE_PARENS_10_ARG,INTERNAL_CATCH_REMOVE_PARENS_9_ARG,INTERNAL_CATCH_REMOVE_PARENS_8_ARG,INTERNAL_CATCH_REMOVE_PARENS_7_ARG,INTERNAL_CATCH_REMOVE_PARENS_6_ARG,INTERNAL_CATCH_REMOVE_PARENS_5_ARG,INTERNAL_CATCH_REMOVE_PARENS_4_ARG,INTERNAL_CATCH_REMOVE_PARENS_3_ARG,INTERNAL_CATCH_REMOVE_PARENS_2_ARG,INTERNAL_CATCH_REMOVE_PARENS_1_ARG)(__VA_ARGS__))\n#endif\n\n// end catch_preprocessor.hpp\n// start catch_meta.hpp\n\n\n#include <type_traits>\n\nnamespace Catch {\n    template<typename T>\n    struct always_false : std::false_type {};\n\n    template <typename> struct true_given : std::true_type {};\n    struct is_callable_tester {\n        template <typename Fun, typename... Args>\n        true_given<decltype(std::declval<Fun>()(std::declval<Args>()...))> static test(int);\n        template <typename...>\n        std::false_type static test(...);\n    };\n\n    template <typename T>\n    struct is_callable;\n\n    template <typename Fun, typename... Args>\n    struct is_callable<Fun(Args...)> : decltype(is_callable_tester::test<Fun, Args...>(0)) {};\n\n#if defined(__cpp_lib_is_invocable) && __cpp_lib_is_invocable >= 201703\n    // std::result_of is deprecated in C++17 and removed in C++20. Hence, it is\n    // replaced with std::invoke_result here.\n    template <typename Func, typename... U>\n    using FunctionReturnType = std::remove_reference_t<std::remove_cv_t<std::invoke_result_t<Func, U...>>>;\n#else\n    // Keep ::type here because we still support C++11\n    template <typename Func, typename... U>\n    using FunctionReturnType = typename std::remove_reference<typename std::remove_cv<typename std::result_of<Func(U...)>::type>::type>::type;\n#endif\n\n} // namespace Catch\n\nnamespace mpl_{\n    struct na;\n}\n\n// end catch_meta.hpp\nnamespace Catch {\n\ntemplate<typename C>\nclass TestInvokerAsMethod : public ITestInvoker {\n    void (C::*m_testAsMethod)();\npublic:\n    TestInvokerAsMethod( void (C::*testAsMethod)() ) noexcept : m_testAsMethod( testAsMethod ) {}\n\n    void invoke() const override {\n        C obj;\n        (obj.*m_testAsMethod)();\n    }\n};\n\nauto makeTestInvoker( void(*testAsFunction)() ) noexcept -> ITestInvoker*;\n\ntemplate<typename C>\nauto makeTestInvoker( void (C::*testAsMethod)() ) noexcept -> ITestInvoker* {\n    return new(std::nothrow) TestInvokerAsMethod<C>( testAsMethod );\n}\n\nstruct NameAndTags {\n    NameAndTags( StringRef const& name_ = StringRef(), StringRef const& tags_ = StringRef() ) noexcept;\n    StringRef name;\n    StringRef tags;\n};\n\nstruct AutoReg : NonCopyable {\n    AutoReg( ITestInvoker* invoker, SourceLineInfo const& lineInfo, StringRef const& classOrMethod, NameAndTags const& nameAndTags ) noexcept;\n    ~AutoReg();\n};\n\n} // end namespace Catch\n\n#if defined(CATCH_CONFIG_DISABLE)\n    #define INTERNAL_CATCH_TESTCASE_NO_REGISTRATION( TestName, ... ) \\\n        static void TestName()\n    #define INTERNAL_CATCH_TESTCASE_METHOD_NO_REGISTRATION( TestName, ClassName, ... ) \\\n        namespace{                        \\\n            struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName) { \\\n                void test();              \\\n            };                            \\\n        }                                 \\\n        void TestName::test()\n    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION_2( TestName, TestFunc, Name, Tags, Signature, ... )  \\\n        INTERNAL_CATCH_DEFINE_SIG_TEST(TestFunc, INTERNAL_CATCH_REMOVE_PARENS(Signature))\n    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION_2( TestNameClass, TestName, ClassName, Name, Tags, Signature, ... )    \\\n        namespace{                                                                                  \\\n            namespace INTERNAL_CATCH_MAKE_NAMESPACE(TestName) {                                      \\\n            INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD(TestName, ClassName, INTERNAL_CATCH_REMOVE_PARENS(Signature));\\\n        }                                                                                           \\\n        }                                                                                           \\\n        INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD(TestName, INTERNAL_CATCH_REMOVE_PARENS(Signature))\n\n    #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n        #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(Name, Tags, ...) \\\n            INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, typename TestType, __VA_ARGS__ )\n    #else\n        #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(Name, Tags, ...) \\\n            INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, typename TestType, __VA_ARGS__ ) )\n    #endif\n\n    #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n        #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG_NO_REGISTRATION(Name, Tags, Signature, ...) \\\n            INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, Signature, __VA_ARGS__ )\n    #else\n        #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG_NO_REGISTRATION(Name, Tags, Signature, ...) \\\n            INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, Signature, __VA_ARGS__ ) )\n    #endif\n\n    #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n        #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION( ClassName, Name, Tags,... ) \\\n            INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_C_L_A_S_S_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ) , ClassName, Name, Tags, typename T, __VA_ARGS__ )\n    #else\n        #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION( ClassName, Name, Tags,... ) \\\n            INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_C_L_A_S_S_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ) , ClassName, Name, Tags, typename T, __VA_ARGS__ ) )\n    #endif\n\n    #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n        #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG_NO_REGISTRATION( ClassName, Name, Tags, Signature, ... ) \\\n            INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_C_L_A_S_S_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ) , ClassName, Name, Tags, Signature, __VA_ARGS__ )\n    #else\n        #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG_NO_REGISTRATION( ClassName, Name, Tags, Signature, ... ) \\\n            INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_C_L_A_S_S_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ) , ClassName, Name, Tags, Signature, __VA_ARGS__ ) )\n    #endif\n#endif\n\n    ///////////////////////////////////////////////////////////////////////////////\n    #define INTERNAL_CATCH_TESTCASE2( TestName, ... ) \\\n        static void TestName(); \\\n        CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \\\n        CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \\\n        namespace{ Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( &TestName ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ __VA_ARGS__ } ); } /* NOLINT */ \\\n        CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \\\n        static void TestName()\n    #define INTERNAL_CATCH_TESTCASE( ... ) \\\n        INTERNAL_CATCH_TESTCASE2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ ), __VA_ARGS__ )\n\n    ///////////////////////////////////////////////////////////////////////////////\n    #define INTERNAL_CATCH_METHOD_AS_TEST_CASE( QualifiedMethod, ... ) \\\n        CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \\\n        CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \\\n        namespace{ Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( &QualifiedMethod ), CATCH_INTERNAL_LINEINFO, \"&\" #QualifiedMethod, Catch::NameAndTags{ __VA_ARGS__ } ); } /* NOLINT */ \\\n        CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION\n\n    ///////////////////////////////////////////////////////////////////////////////\n    #define INTERNAL_CATCH_TEST_CASE_METHOD2( TestName, ClassName, ... )\\\n        CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \\\n        CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \\\n        namespace{ \\\n            struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName) { \\\n                void test(); \\\n            }; \\\n            Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar ) ( Catch::makeTestInvoker( &TestName::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndTags{ __VA_ARGS__ } ); /* NOLINT */ \\\n        } \\\n        CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \\\n        void TestName::test()\n    #define INTERNAL_CATCH_TEST_CASE_METHOD( ClassName, ... ) \\\n        INTERNAL_CATCH_TEST_CASE_METHOD2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ ), ClassName, __VA_ARGS__ )\n\n    ///////////////////////////////////////////////////////////////////////////////\n    #define INTERNAL_CATCH_REGISTER_TESTCASE( Function, ... ) \\\n        CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \\\n        CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \\\n        Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( Function ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ __VA_ARGS__ } ); /* NOLINT */ \\\n        CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION\n\n    ///////////////////////////////////////////////////////////////////////////////\n    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_2(TestName, TestFunc, Name, Tags, Signature, ... )\\\n        CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \\\n        CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \\\n        CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS \\\n        CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \\\n        INTERNAL_CATCH_DECLARE_SIG_TEST(TestFunc, INTERNAL_CATCH_REMOVE_PARENS(Signature));\\\n        namespace {\\\n        namespace INTERNAL_CATCH_MAKE_NAMESPACE(TestName){\\\n            INTERNAL_CATCH_TYPE_GEN\\\n            INTERNAL_CATCH_NTTP_GEN(INTERNAL_CATCH_REMOVE_PARENS(Signature))\\\n            INTERNAL_CATCH_NTTP_REG_GEN(TestFunc,INTERNAL_CATCH_REMOVE_PARENS(Signature))\\\n            template<typename...Types> \\\n            struct TestName{\\\n                TestName(){\\\n                    int index = 0;                                    \\\n                    constexpr char const* tmpl_types[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, __VA_ARGS__)};\\\n                    using expander = int[];\\\n                    (void)expander{(reg_test(Types{}, Catch::NameAndTags{ Name \" - \" + std::string(tmpl_types[index]), Tags } ), index++)... };/* NOLINT */ \\\n                }\\\n            };\\\n            static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\\\n            TestName<INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(__VA_ARGS__)>();\\\n            return 0;\\\n        }();\\\n        }\\\n        }\\\n        CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \\\n        INTERNAL_CATCH_DEFINE_SIG_TEST(TestFunc,INTERNAL_CATCH_REMOVE_PARENS(Signature))\n\n#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE(Name, Tags, ...) \\\n        INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, typename TestType, __VA_ARGS__ )\n#else\n    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE(Name, Tags, ...) \\\n        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, typename TestType, __VA_ARGS__ ) )\n#endif\n\n#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG(Name, Tags, Signature, ...) \\\n        INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, Signature, __VA_ARGS__ )\n#else\n    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG(Name, Tags, Signature, ...) \\\n        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, Signature, __VA_ARGS__ ) )\n#endif\n\n    #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2(TestName, TestFuncName, Name, Tags, Signature, TmplTypes, TypesList) \\\n        CATCH_INTERNAL_START_WARNINGS_SUPPRESSION                      \\\n        CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS                      \\\n        CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS                \\\n        CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS              \\\n        template<typename TestType> static void TestFuncName();       \\\n        namespace {\\\n        namespace INTERNAL_CATCH_MAKE_NAMESPACE(TestName) {                                     \\\n            INTERNAL_CATCH_TYPE_GEN                                                  \\\n            INTERNAL_CATCH_NTTP_GEN(INTERNAL_CATCH_REMOVE_PARENS(Signature))         \\\n            template<typename... Types>                               \\\n            struct TestName {                                         \\\n                void reg_tests() {                                          \\\n                    int index = 0;                                    \\\n                    using expander = int[];                           \\\n                    constexpr char const* tmpl_types[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TmplTypes))};\\\n                    constexpr char const* types_list[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TypesList))};\\\n                    constexpr auto num_types = sizeof(types_list) / sizeof(types_list[0]);\\\n                    (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestFuncName<Types> ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ Name \" - \" + std::string(tmpl_types[index / num_types]) + \"<\" + std::string(types_list[index % num_types]) + \">\", Tags } ), index++)... };/* NOLINT */\\\n                }                                                     \\\n            };                                                        \\\n            static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){ \\\n                using TestInit = typename create<TestName, decltype(get_wrapper<INTERNAL_CATCH_REMOVE_PARENS(TmplTypes)>()), TypeList<INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(INTERNAL_CATCH_REMOVE_PARENS(TypesList))>>::type; \\\n                TestInit t;                                           \\\n                t.reg_tests();                                        \\\n                return 0;                                             \\\n            }();                                                      \\\n        }                                                             \\\n        }                                                             \\\n        CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION                       \\\n        template<typename TestType>                                   \\\n        static void TestFuncName()\n\n#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n    #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE(Name, Tags, ...)\\\n        INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, typename T,__VA_ARGS__)\n#else\n    #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE(Name, Tags, ...)\\\n        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, typename T, __VA_ARGS__ ) )\n#endif\n\n#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n    #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG(Name, Tags, Signature, ...)\\\n        INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, Signature, __VA_ARGS__)\n#else\n    #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG(Name, Tags, Signature, ...)\\\n        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, Signature, __VA_ARGS__ ) )\n#endif\n\n    #define INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_2(TestName, TestFunc, Name, Tags, TmplList)\\\n        CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \\\n        CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \\\n        CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \\\n        template<typename TestType> static void TestFunc();       \\\n        namespace {\\\n        namespace INTERNAL_CATCH_MAKE_NAMESPACE(TestName){\\\n        INTERNAL_CATCH_TYPE_GEN\\\n        template<typename... Types>                               \\\n        struct TestName {                                         \\\n            void reg_tests() {                                          \\\n                int index = 0;                                    \\\n                using expander = int[];                           \\\n                (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestFunc<Types> ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ Name \" - \" + std::string(INTERNAL_CATCH_STRINGIZE(TmplList)) + \" - \" + std::to_string(index), Tags } ), index++)... };/* NOLINT */\\\n            }                                                     \\\n        };\\\n        static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){ \\\n                using TestInit = typename convert<TestName, TmplList>::type; \\\n                TestInit t;                                           \\\n                t.reg_tests();                                        \\\n                return 0;                                             \\\n            }();                                                      \\\n        }}\\\n        CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION                       \\\n        template<typename TestType>                                   \\\n        static void TestFunc()\n\n    #define INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE(Name, Tags, TmplList) \\\n        INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, TmplList )\n\n    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( TestNameClass, TestName, ClassName, Name, Tags, Signature, ... ) \\\n        CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \\\n        CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \\\n        CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS \\\n        CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \\\n        namespace {\\\n        namespace INTERNAL_CATCH_MAKE_NAMESPACE(TestName){ \\\n            INTERNAL_CATCH_TYPE_GEN\\\n            INTERNAL_CATCH_NTTP_GEN(INTERNAL_CATCH_REMOVE_PARENS(Signature))\\\n            INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD(TestName, ClassName, INTERNAL_CATCH_REMOVE_PARENS(Signature));\\\n            INTERNAL_CATCH_NTTP_REG_METHOD_GEN(TestName, INTERNAL_CATCH_REMOVE_PARENS(Signature))\\\n            template<typename...Types> \\\n            struct TestNameClass{\\\n                TestNameClass(){\\\n                    int index = 0;                                    \\\n                    constexpr char const* tmpl_types[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, __VA_ARGS__)};\\\n                    using expander = int[];\\\n                    (void)expander{(reg_test(Types{}, #ClassName, Catch::NameAndTags{ Name \" - \" + std::string(tmpl_types[index]), Tags } ), index++)... };/* NOLINT */ \\\n                }\\\n            };\\\n            static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\\\n                TestNameClass<INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(__VA_ARGS__)>();\\\n                return 0;\\\n        }();\\\n        }\\\n        }\\\n        CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \\\n        INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD(TestName, INTERNAL_CATCH_REMOVE_PARENS(Signature))\n\n#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD( ClassName, Name, Tags,... ) \\\n        INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_C_L_A_S_S_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ) , ClassName, Name, Tags, typename T, __VA_ARGS__ )\n#else\n    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD( ClassName, Name, Tags,... ) \\\n        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_C_L_A_S_S_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ) , ClassName, Name, Tags, typename T, __VA_ARGS__ ) )\n#endif\n\n#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( ClassName, Name, Tags, Signature, ... ) \\\n        INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_C_L_A_S_S_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ) , ClassName, Name, Tags, Signature, __VA_ARGS__ )\n#else\n    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( ClassName, Name, Tags, Signature, ... ) \\\n        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_C_L_A_S_S_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ) , ClassName, Name, Tags, Signature, __VA_ARGS__ ) )\n#endif\n\n    #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2(TestNameClass, TestName, ClassName, Name, Tags, Signature, TmplTypes, TypesList)\\\n        CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \\\n        CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \\\n        CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS \\\n        CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \\\n        template<typename TestType> \\\n            struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName <TestType>) { \\\n                void test();\\\n            };\\\n        namespace {\\\n        namespace INTERNAL_CATCH_MAKE_NAMESPACE(TestNameClass) {\\\n            INTERNAL_CATCH_TYPE_GEN                  \\\n            INTERNAL_CATCH_NTTP_GEN(INTERNAL_CATCH_REMOVE_PARENS(Signature))\\\n            template<typename...Types>\\\n            struct TestNameClass{\\\n                void reg_tests(){\\\n                    int index = 0;\\\n                    using expander = int[];\\\n                    constexpr char const* tmpl_types[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TmplTypes))};\\\n                    constexpr char const* types_list[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TypesList))};\\\n                    constexpr auto num_types = sizeof(types_list) / sizeof(types_list[0]);\\\n                    (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestName<Types>::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndTags{ Name \" - \" + std::string(tmpl_types[index / num_types]) + \"<\" + std::string(types_list[index % num_types]) + \">\", Tags } ), index++)... };/* NOLINT */ \\\n                }\\\n            };\\\n            static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\\\n                using TestInit = typename create<TestNameClass, decltype(get_wrapper<INTERNAL_CATCH_REMOVE_PARENS(TmplTypes)>()), TypeList<INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(INTERNAL_CATCH_REMOVE_PARENS(TypesList))>>::type;\\\n                TestInit t;\\\n                t.reg_tests();\\\n                return 0;\\\n            }(); \\\n        }\\\n        }\\\n        CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \\\n        template<typename TestType> \\\n        void TestName<TestType>::test()\n\n#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n    #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( ClassName, Name, Tags, ... )\\\n        INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), ClassName, Name, Tags, typename T, __VA_ARGS__ )\n#else\n    #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( ClassName, Name, Tags, ... )\\\n        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), ClassName, Name, Tags, typename T,__VA_ARGS__ ) )\n#endif\n\n#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n    #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( ClassName, Name, Tags, Signature, ... )\\\n        INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), ClassName, Name, Tags, Signature, __VA_ARGS__ )\n#else\n    #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( ClassName, Name, Tags, Signature, ... )\\\n        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), ClassName, Name, Tags, Signature,__VA_ARGS__ ) )\n#endif\n\n    #define INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_METHOD_2( TestNameClass, TestName, ClassName, Name, Tags, TmplList) \\\n        CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \\\n        CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \\\n        CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \\\n        template<typename TestType> \\\n        struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName <TestType>) { \\\n            void test();\\\n        };\\\n        namespace {\\\n        namespace INTERNAL_CATCH_MAKE_NAMESPACE(TestName){ \\\n            INTERNAL_CATCH_TYPE_GEN\\\n            template<typename...Types>\\\n            struct TestNameClass{\\\n                void reg_tests(){\\\n                    int index = 0;\\\n                    using expander = int[];\\\n                    (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestName<Types>::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndTags{ Name \" - \" + std::string(INTERNAL_CATCH_STRINGIZE(TmplList)) + \" - \" + std::to_string(index), Tags } ), index++)... };/* NOLINT */ \\\n                }\\\n            };\\\n            static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\\\n                using TestInit = typename convert<TestNameClass, TmplList>::type;\\\n                TestInit t;\\\n                t.reg_tests();\\\n                return 0;\\\n            }(); \\\n        }}\\\n        CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \\\n        template<typename TestType> \\\n        void TestName<TestType>::test()\n\n#define INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_METHOD(ClassName, Name, Tags, TmplList) \\\n        INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), ClassName, Name, Tags, TmplList )\n\n// end catch_test_registry.h\n// start catch_capture.hpp\n\n// start catch_assertionhandler.h\n\n// start catch_assertioninfo.h\n\n// start catch_result_type.h\n\nnamespace Catch {\n\n    // ResultWas::OfType enum\n    struct ResultWas { enum OfType {\n        Unknown = -1,\n        Ok = 0,\n        Info = 1,\n        Warning = 2,\n\n        FailureBit = 0x10,\n\n        ExpressionFailed = FailureBit | 1,\n        ExplicitFailure = FailureBit | 2,\n\n        Exception = 0x100 | FailureBit,\n\n        ThrewException = Exception | 1,\n        DidntThrowException = Exception | 2,\n\n        FatalErrorCondition = 0x200 | FailureBit\n\n    }; };\n\n    bool isOk( ResultWas::OfType resultType );\n    bool isJustInfo( int flags );\n\n    // ResultDisposition::Flags enum\n    struct ResultDisposition { enum Flags {\n        Normal = 0x01,\n\n        ContinueOnFailure = 0x02,   // Failures fail test, but execution continues\n        FalseTest = 0x04,           // Prefix expression with !\n        SuppressFail = 0x08         // Failures are reported but do not fail the test\n    }; };\n\n    ResultDisposition::Flags operator | ( ResultDisposition::Flags lhs, ResultDisposition::Flags rhs );\n\n    bool shouldContinueOnFailure( int flags );\n    inline bool isFalseTest( int flags ) { return ( flags & ResultDisposition::FalseTest ) != 0; }\n    bool shouldSuppressFailure( int flags );\n\n} // end namespace Catch\n\n// end catch_result_type.h\nnamespace Catch {\n\n    struct AssertionInfo\n    {\n        StringRef macroName;\n        SourceLineInfo lineInfo;\n        StringRef capturedExpression;\n        ResultDisposition::Flags resultDisposition;\n\n        // We want to delete this constructor but a compiler bug in 4.8 means\n        // the struct is then treated as non-aggregate\n        //AssertionInfo() = delete;\n    };\n\n} // end namespace Catch\n\n// end catch_assertioninfo.h\n// start catch_decomposer.h\n\n// start catch_tostring.h\n\n#include <vector>\n#include <cstddef>\n#include <type_traits>\n#include <string>\n// start catch_stream.h\n\n#include <iosfwd>\n#include <cstddef>\n#include <ostream>\n\nnamespace Catch {\n\n    std::ostream& cout();\n    std::ostream& cerr();\n    std::ostream& clog();\n\n    class StringRef;\n\n    struct IStream {\n        virtual ~IStream();\n        virtual std::ostream& stream() const = 0;\n    };\n\n    auto makeStream( StringRef const &filename ) -> IStream const*;\n\n    class ReusableStringStream : NonCopyable {\n        std::size_t m_index;\n        std::ostream* m_oss;\n    public:\n        ReusableStringStream();\n        ~ReusableStringStream();\n\n        auto str() const -> std::string;\n\n        template<typename T>\n        auto operator << ( T const& value ) -> ReusableStringStream& {\n            *m_oss << value;\n            return *this;\n        }\n        auto get() -> std::ostream& { return *m_oss; }\n    };\n}\n\n// end catch_stream.h\n// start catch_interfaces_enum_values_registry.h\n\n#include <vector>\n\nnamespace Catch {\n\n    namespace Detail {\n        struct EnumInfo {\n            StringRef m_name;\n            std::vector<std::pair<int, StringRef>> m_values;\n\n            ~EnumInfo();\n\n            StringRef lookup( int value ) const;\n        };\n    } // namespace Detail\n\n    struct IMutableEnumValuesRegistry {\n        virtual ~IMutableEnumValuesRegistry();\n\n        virtual Detail::EnumInfo const& registerEnum( StringRef enumName, StringRef allEnums, std::vector<int> const& values ) = 0;\n\n        template<typename E>\n        Detail::EnumInfo const& registerEnum( StringRef enumName, StringRef allEnums, std::initializer_list<E> values ) {\n            static_assert(sizeof(int) >= sizeof(E), \"Cannot serialize enum to int\");\n            std::vector<int> intValues;\n            intValues.reserve( values.size() );\n            for( auto enumValue : values )\n                intValues.push_back( static_cast<int>( enumValue ) );\n            return registerEnum( enumName, allEnums, intValues );\n        }\n    };\n\n} // Catch\n\n// end catch_interfaces_enum_values_registry.h\n\n#ifdef CATCH_CONFIG_CPP17_STRING_VIEW\n#include <string_view>\n#endif\n\n#ifdef __OBJC__\n// start catch_objc_arc.hpp\n\n#import <Foundation/Foundation.h>\n\n#ifdef __has_feature\n#define CATCH_ARC_ENABLED __has_feature(objc_arc)\n#else\n#define CATCH_ARC_ENABLED 0\n#endif\n\nvoid arcSafeRelease( NSObject* obj );\nid performOptionalSelector( id obj, SEL sel );\n\n#if !CATCH_ARC_ENABLED\ninline void arcSafeRelease( NSObject* obj ) {\n    [obj release];\n}\ninline id performOptionalSelector( id obj, SEL sel ) {\n    if( [obj respondsToSelector: sel] )\n        return [obj performSelector: sel];\n    return nil;\n}\n#define CATCH_UNSAFE_UNRETAINED\n#define CATCH_ARC_STRONG\n#else\ninline void arcSafeRelease( NSObject* ){}\ninline id performOptionalSelector( id obj, SEL sel ) {\n#ifdef __clang__\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Warc-performSelector-leaks\"\n#endif\n    if( [obj respondsToSelector: sel] )\n        return [obj performSelector: sel];\n#ifdef __clang__\n#pragma clang diagnostic pop\n#endif\n    return nil;\n}\n#define CATCH_UNSAFE_UNRETAINED __unsafe_unretained\n#define CATCH_ARC_STRONG __strong\n#endif\n\n// end catch_objc_arc.hpp\n#endif\n\n#ifdef _MSC_VER\n#pragma warning(push)\n#pragma warning(disable:4180) // We attempt to stream a function (address) by const&, which MSVC complains about but is harmless\n#endif\n\nnamespace Catch {\n    namespace Detail {\n\n        extern const std::string unprintableString;\n\n        std::string rawMemoryToString( const void *object, std::size_t size );\n\n        template<typename T>\n        std::string rawMemoryToString( const T& object ) {\n          return rawMemoryToString( &object, sizeof(object) );\n        }\n\n        template<typename T>\n        class IsStreamInsertable {\n            template<typename Stream, typename U>\n            static auto test(int)\n                -> decltype(std::declval<Stream&>() << std::declval<U>(), std::true_type());\n\n            template<typename, typename>\n            static auto test(...)->std::false_type;\n\n        public:\n            static const bool value = decltype(test<std::ostream, const T&>(0))::value;\n        };\n\n        template<typename E>\n        std::string convertUnknownEnumToString( E e );\n\n        template<typename T>\n        typename std::enable_if<\n            !std::is_enum<T>::value && !std::is_base_of<std::exception, T>::value,\n        std::string>::type convertUnstreamable( T const& ) {\n            return Detail::unprintableString;\n        }\n        template<typename T>\n        typename std::enable_if<\n            !std::is_enum<T>::value && std::is_base_of<std::exception, T>::value,\n         std::string>::type convertUnstreamable(T const& ex) {\n            return ex.what();\n        }\n\n        template<typename T>\n        typename std::enable_if<\n            std::is_enum<T>::value\n        , std::string>::type convertUnstreamable( T const& value ) {\n            return convertUnknownEnumToString( value );\n        }\n\n#if defined(_MANAGED)\n        //! Convert a CLR string to a utf8 std::string\n        template<typename T>\n        std::string clrReferenceToString( T^ ref ) {\n            if (ref == nullptr)\n                return std::string(\"null\");\n            auto bytes = System::Text::Encoding::UTF8->GetBytes(ref->ToString());\n            cli::pin_ptr<System::Byte> p = &bytes[0];\n            return std::string(reinterpret_cast<char const *>(p), bytes->Length);\n        }\n#endif\n\n    } // namespace Detail\n\n    // If we decide for C++14, change these to enable_if_ts\n    template <typename T, typename = void>\n    struct StringMaker {\n        template <typename Fake = T>\n        static\n        typename std::enable_if<::Catch::Detail::IsStreamInsertable<Fake>::value, std::string>::type\n            convert(const Fake& value) {\n                ReusableStringStream rss;\n                // NB: call using the function-like syntax to avoid ambiguity with\n                // user-defined templated operator<< under clang.\n                rss.operator<<(value);\n                return rss.str();\n        }\n\n        template <typename Fake = T>\n        static\n        typename std::enable_if<!::Catch::Detail::IsStreamInsertable<Fake>::value, std::string>::type\n            convert( const Fake& value ) {\n#if !defined(CATCH_CONFIG_FALLBACK_STRINGIFIER)\n            return Detail::convertUnstreamable(value);\n#else\n            return CATCH_CONFIG_FALLBACK_STRINGIFIER(value);\n#endif\n        }\n    };\n\n    namespace Detail {\n\n        // This function dispatches all stringification requests inside of Catch.\n        // Should be preferably called fully qualified, like ::Catch::Detail::stringify\n        template <typename T>\n        std::string stringify(const T& e) {\n            return ::Catch::StringMaker<typename std::remove_cv<typename std::remove_reference<T>::type>::type>::convert(e);\n        }\n\n        template<typename E>\n        std::string convertUnknownEnumToString( E e ) {\n            return ::Catch::Detail::stringify(static_cast<typename std::underlying_type<E>::type>(e));\n        }\n\n#if defined(_MANAGED)\n        template <typename T>\n        std::string stringify( T^ e ) {\n            return ::Catch::StringMaker<T^>::convert(e);\n        }\n#endif\n\n    } // namespace Detail\n\n    // Some predefined specializations\n\n    template<>\n    struct StringMaker<std::string> {\n        static std::string convert(const std::string& str);\n    };\n\n#ifdef CATCH_CONFIG_CPP17_STRING_VIEW\n    template<>\n    struct StringMaker<std::string_view> {\n        static std::string convert(std::string_view str);\n    };\n#endif\n\n    template<>\n    struct StringMaker<char const *> {\n        static std::string convert(char const * str);\n    };\n    template<>\n    struct StringMaker<char *> {\n        static std::string convert(char * str);\n    };\n\n#ifdef CATCH_CONFIG_WCHAR\n    template<>\n    struct StringMaker<std::wstring> {\n        static std::string convert(const std::wstring& wstr);\n    };\n\n# ifdef CATCH_CONFIG_CPP17_STRING_VIEW\n    template<>\n    struct StringMaker<std::wstring_view> {\n        static std::string convert(std::wstring_view str);\n    };\n# endif\n\n    template<>\n    struct StringMaker<wchar_t const *> {\n        static std::string convert(wchar_t const * str);\n    };\n    template<>\n    struct StringMaker<wchar_t *> {\n        static std::string convert(wchar_t * str);\n    };\n#endif\n\n    // TBD: Should we use `strnlen` to ensure that we don't go out of the buffer,\n    //      while keeping string semantics?\n    template<int SZ>\n    struct StringMaker<char[SZ]> {\n        static std::string convert(char const* str) {\n            return ::Catch::Detail::stringify(std::string{ str });\n        }\n    };\n    template<int SZ>\n    struct StringMaker<signed char[SZ]> {\n        static std::string convert(signed char const* str) {\n            return ::Catch::Detail::stringify(std::string{ reinterpret_cast<char const *>(str) });\n        }\n    };\n    template<int SZ>\n    struct StringMaker<unsigned char[SZ]> {\n        static std::string convert(unsigned char const* str) {\n            return ::Catch::Detail::stringify(std::string{ reinterpret_cast<char const *>(str) });\n        }\n    };\n\n#if defined(CATCH_CONFIG_CPP17_BYTE)\n    template<>\n    struct StringMaker<std::byte> {\n        static std::string convert(std::byte value);\n    };\n#endif // defined(CATCH_CONFIG_CPP17_BYTE)\n    template<>\n    struct StringMaker<int> {\n        static std::string convert(int value);\n    };\n    template<>\n    struct StringMaker<long> {\n        static std::string convert(long value);\n    };\n    template<>\n    struct StringMaker<long long> {\n        static std::string convert(long long value);\n    };\n    template<>\n    struct StringMaker<unsigned int> {\n        static std::string convert(unsigned int value);\n    };\n    template<>\n    struct StringMaker<unsigned long> {\n        static std::string convert(unsigned long value);\n    };\n    template<>\n    struct StringMaker<unsigned long long> {\n        static std::string convert(unsigned long long value);\n    };\n\n    template<>\n    struct StringMaker<bool> {\n        static std::string convert(bool b);\n    };\n\n    template<>\n    struct StringMaker<char> {\n        static std::string convert(char c);\n    };\n    template<>\n    struct StringMaker<signed char> {\n        static std::string convert(signed char c);\n    };\n    template<>\n    struct StringMaker<unsigned char> {\n        static std::string convert(unsigned char c);\n    };\n\n    template<>\n    struct StringMaker<std::nullptr_t> {\n        static std::string convert(std::nullptr_t);\n    };\n\n    template<>\n    struct StringMaker<float> {\n        static std::string convert(float value);\n        static int precision;\n    };\n\n    template<>\n    struct StringMaker<double> {\n        static std::string convert(double value);\n        static int precision;\n    };\n\n    template <typename T>\n    struct StringMaker<T*> {\n        template <typename U>\n        static std::string convert(U* p) {\n            if (p) {\n                return ::Catch::Detail::rawMemoryToString(p);\n            } else {\n                return \"nullptr\";\n            }\n        }\n    };\n\n    template <typename R, typename C>\n    struct StringMaker<R C::*> {\n        static std::string convert(R C::* p) {\n            if (p) {\n                return ::Catch::Detail::rawMemoryToString(p);\n            } else {\n                return \"nullptr\";\n            }\n        }\n    };\n\n#if defined(_MANAGED)\n    template <typename T>\n    struct StringMaker<T^> {\n        static std::string convert( T^ ref ) {\n            return ::Catch::Detail::clrReferenceToString(ref);\n        }\n    };\n#endif\n\n    namespace Detail {\n        template<typename InputIterator, typename Sentinel = InputIterator>\n        std::string rangeToString(InputIterator first, Sentinel last) {\n            ReusableStringStream rss;\n            rss << \"{ \";\n            if (first != last) {\n                rss << ::Catch::Detail::stringify(*first);\n                for (++first; first != last; ++first)\n                    rss << \", \" << ::Catch::Detail::stringify(*first);\n            }\n            rss << \" }\";\n            return rss.str();\n        }\n    }\n\n#ifdef __OBJC__\n    template<>\n    struct StringMaker<NSString*> {\n        static std::string convert(NSString * nsstring) {\n            if (!nsstring)\n                return \"nil\";\n            return std::string(\"@\") + [nsstring UTF8String];\n        }\n    };\n    template<>\n    struct StringMaker<NSObject*> {\n        static std::string convert(NSObject* nsObject) {\n            return ::Catch::Detail::stringify([nsObject description]);\n        }\n\n    };\n    namespace Detail {\n        inline std::string stringify( NSString* nsstring ) {\n            return StringMaker<NSString*>::convert( nsstring );\n        }\n\n    } // namespace Detail\n#endif // __OBJC__\n\n} // namespace Catch\n\n//////////////////////////////////////////////////////\n// Separate std-lib types stringification, so it can be selectively enabled\n// This means that we do not bring in\n\n#if defined(CATCH_CONFIG_ENABLE_ALL_STRINGMAKERS)\n#  define CATCH_CONFIG_ENABLE_PAIR_STRINGMAKER\n#  define CATCH_CONFIG_ENABLE_TUPLE_STRINGMAKER\n#  define CATCH_CONFIG_ENABLE_VARIANT_STRINGMAKER\n#  define CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER\n#  define CATCH_CONFIG_ENABLE_OPTIONAL_STRINGMAKER\n#endif\n\n// Separate std::pair specialization\n#if defined(CATCH_CONFIG_ENABLE_PAIR_STRINGMAKER)\n#include <utility>\nnamespace Catch {\n    template<typename T1, typename T2>\n    struct StringMaker<std::pair<T1, T2> > {\n        static std::string convert(const std::pair<T1, T2>& pair) {\n            ReusableStringStream rss;\n            rss << \"{ \"\n                << ::Catch::Detail::stringify(pair.first)\n                << \", \"\n                << ::Catch::Detail::stringify(pair.second)\n                << \" }\";\n            return rss.str();\n        }\n    };\n}\n#endif // CATCH_CONFIG_ENABLE_PAIR_STRINGMAKER\n\n#if defined(CATCH_CONFIG_ENABLE_OPTIONAL_STRINGMAKER) && defined(CATCH_CONFIG_CPP17_OPTIONAL)\n#include <optional>\nnamespace Catch {\n    template<typename T>\n    struct StringMaker<std::optional<T> > {\n        static std::string convert(const std::optional<T>& optional) {\n            ReusableStringStream rss;\n            if (optional.has_value()) {\n                rss << ::Catch::Detail::stringify(*optional);\n            } else {\n                rss << \"{ }\";\n            }\n            return rss.str();\n        }\n    };\n}\n#endif // CATCH_CONFIG_ENABLE_OPTIONAL_STRINGMAKER\n\n// Separate std::tuple specialization\n#if defined(CATCH_CONFIG_ENABLE_TUPLE_STRINGMAKER)\n#include <tuple>\nnamespace Catch {\n    namespace Detail {\n        template<\n            typename Tuple,\n            std::size_t N = 0,\n            bool = (N < std::tuple_size<Tuple>::value)\n            >\n            struct TupleElementPrinter {\n            static void print(const Tuple& tuple, std::ostream& os) {\n                os << (N ? \", \" : \" \")\n                    << ::Catch::Detail::stringify(std::get<N>(tuple));\n                TupleElementPrinter<Tuple, N + 1>::print(tuple, os);\n            }\n        };\n\n        template<\n            typename Tuple,\n            std::size_t N\n        >\n            struct TupleElementPrinter<Tuple, N, false> {\n            static void print(const Tuple&, std::ostream&) {}\n        };\n\n    }\n\n    template<typename ...Types>\n    struct StringMaker<std::tuple<Types...>> {\n        static std::string convert(const std::tuple<Types...>& tuple) {\n            ReusableStringStream rss;\n            rss << '{';\n            Detail::TupleElementPrinter<std::tuple<Types...>>::print(tuple, rss.get());\n            rss << \" }\";\n            return rss.str();\n        }\n    };\n}\n#endif // CATCH_CONFIG_ENABLE_TUPLE_STRINGMAKER\n\n#if defined(CATCH_CONFIG_ENABLE_VARIANT_STRINGMAKER) && defined(CATCH_CONFIG_CPP17_VARIANT)\n#include <variant>\nnamespace Catch {\n    template<>\n    struct StringMaker<std::monostate> {\n        static std::string convert(const std::monostate&) {\n            return \"{ }\";\n        }\n    };\n\n    template<typename... Elements>\n    struct StringMaker<std::variant<Elements...>> {\n        static std::string convert(const std::variant<Elements...>& variant) {\n            if (variant.valueless_by_exception()) {\n                return \"{valueless variant}\";\n            } else {\n                return std::visit(\n                    [](const auto& value) {\n                        return ::Catch::Detail::stringify(value);\n                    },\n                    variant\n                );\n            }\n        }\n    };\n}\n#endif // CATCH_CONFIG_ENABLE_VARIANT_STRINGMAKER\n\nnamespace Catch {\n    // Import begin/ end from std here\n    using std::begin;\n    using std::end;\n\n    namespace detail {\n        template <typename...>\n        struct void_type {\n            using type = void;\n        };\n\n        template <typename T, typename = void>\n        struct is_range_impl : std::false_type {\n        };\n\n        template <typename T>\n        struct is_range_impl<T, typename void_type<decltype(begin(std::declval<T>()))>::type> : std::true_type {\n        };\n    } // namespace detail\n\n    template <typename T>\n    struct is_range : detail::is_range_impl<T> {\n    };\n\n#if defined(_MANAGED) // Managed types are never ranges\n    template <typename T>\n    struct is_range<T^> {\n        static const bool value = false;\n    };\n#endif\n\n    template<typename Range>\n    std::string rangeToString( Range const& range ) {\n        return ::Catch::Detail::rangeToString( begin( range ), end( range ) );\n    }\n\n    // Handle vector<bool> specially\n    template<typename Allocator>\n    std::string rangeToString( std::vector<bool, Allocator> const& v ) {\n        ReusableStringStream rss;\n        rss << \"{ \";\n        bool first = true;\n        for( bool b : v ) {\n            if( first )\n                first = false;\n            else\n                rss << \", \";\n            rss << ::Catch::Detail::stringify( b );\n        }\n        rss << \" }\";\n        return rss.str();\n    }\n\n    template<typename R>\n    struct StringMaker<R, typename std::enable_if<is_range<R>::value && !::Catch::Detail::IsStreamInsertable<R>::value>::type> {\n        static std::string convert( R const& range ) {\n            return rangeToString( range );\n        }\n    };\n\n    template <typename T, int SZ>\n    struct StringMaker<T[SZ]> {\n        static std::string convert(T const(&arr)[SZ]) {\n            return rangeToString(arr);\n        }\n    };\n\n} // namespace Catch\n\n// Separate std::chrono::duration specialization\n#if defined(CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER)\n#include <ctime>\n#include <ratio>\n#include <chrono>\n\nnamespace Catch {\n\ntemplate <class Ratio>\nstruct ratio_string {\n    static std::string symbol();\n};\n\ntemplate <class Ratio>\nstd::string ratio_string<Ratio>::symbol() {\n    Catch::ReusableStringStream rss;\n    rss << '[' << Ratio::num << '/'\n        << Ratio::den << ']';\n    return rss.str();\n}\ntemplate <>\nstruct ratio_string<std::atto> {\n    static std::string symbol();\n};\ntemplate <>\nstruct ratio_string<std::femto> {\n    static std::string symbol();\n};\ntemplate <>\nstruct ratio_string<std::pico> {\n    static std::string symbol();\n};\ntemplate <>\nstruct ratio_string<std::nano> {\n    static std::string symbol();\n};\ntemplate <>\nstruct ratio_string<std::micro> {\n    static std::string symbol();\n};\ntemplate <>\nstruct ratio_string<std::milli> {\n    static std::string symbol();\n};\n\n    ////////////\n    // std::chrono::duration specializations\n    template<typename Value, typename Ratio>\n    struct StringMaker<std::chrono::duration<Value, Ratio>> {\n        static std::string convert(std::chrono::duration<Value, Ratio> const& duration) {\n            ReusableStringStream rss;\n            rss << duration.count() << ' ' << ratio_string<Ratio>::symbol() << 's';\n            return rss.str();\n        }\n    };\n    template<typename Value>\n    struct StringMaker<std::chrono::duration<Value, std::ratio<1>>> {\n        static std::string convert(std::chrono::duration<Value, std::ratio<1>> const& duration) {\n            ReusableStringStream rss;\n            rss << duration.count() << \" s\";\n            return rss.str();\n        }\n    };\n    template<typename Value>\n    struct StringMaker<std::chrono::duration<Value, std::ratio<60>>> {\n        static std::string convert(std::chrono::duration<Value, std::ratio<60>> const& duration) {\n            ReusableStringStream rss;\n            rss << duration.count() << \" m\";\n            return rss.str();\n        }\n    };\n    template<typename Value>\n    struct StringMaker<std::chrono::duration<Value, std::ratio<3600>>> {\n        static std::string convert(std::chrono::duration<Value, std::ratio<3600>> const& duration) {\n            ReusableStringStream rss;\n            rss << duration.count() << \" h\";\n            return rss.str();\n        }\n    };\n\n    ////////////\n    // std::chrono::time_point specialization\n    // Generic time_point cannot be specialized, only std::chrono::time_point<system_clock>\n    template<typename Clock, typename Duration>\n    struct StringMaker<std::chrono::time_point<Clock, Duration>> {\n        static std::string convert(std::chrono::time_point<Clock, Duration> const& time_point) {\n            return ::Catch::Detail::stringify(time_point.time_since_epoch()) + \" since epoch\";\n        }\n    };\n    // std::chrono::time_point<system_clock> specialization\n    template<typename Duration>\n    struct StringMaker<std::chrono::time_point<std::chrono::system_clock, Duration>> {\n        static std::string convert(std::chrono::time_point<std::chrono::system_clock, Duration> const& time_point) {\n            auto converted = std::chrono::system_clock::to_time_t(time_point);\n\n#ifdef _MSC_VER\n            std::tm timeInfo = {};\n            gmtime_s(&timeInfo, &converted);\n#else\n            std::tm* timeInfo = std::gmtime(&converted);\n#endif\n\n            auto const timeStampSize = sizeof(\"2017-01-16T17:06:45Z\");\n            char timeStamp[timeStampSize];\n            const char * const fmt = \"%Y-%m-%dT%H:%M:%SZ\";\n\n#ifdef _MSC_VER\n            std::strftime(timeStamp, timeStampSize, fmt, &timeInfo);\n#else\n            std::strftime(timeStamp, timeStampSize, fmt, timeInfo);\n#endif\n            return std::string(timeStamp);\n        }\n    };\n}\n#endif // CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER\n\n#define INTERNAL_CATCH_REGISTER_ENUM( enumName, ... ) \\\nnamespace Catch { \\\n    template<> struct StringMaker<enumName> { \\\n        static std::string convert( enumName value ) { \\\n            static const auto& enumInfo = ::Catch::getMutableRegistryHub().getMutableEnumValuesRegistry().registerEnum( #enumName, #__VA_ARGS__, { __VA_ARGS__ } ); \\\n            return static_cast<std::string>(enumInfo.lookup( static_cast<int>( value ) )); \\\n        } \\\n    }; \\\n}\n\n#define CATCH_REGISTER_ENUM( enumName, ... ) INTERNAL_CATCH_REGISTER_ENUM( enumName, __VA_ARGS__ )\n\n#ifdef _MSC_VER\n#pragma warning(pop)\n#endif\n\n// end catch_tostring.h\n#include <iosfwd>\n\n#ifdef _MSC_VER\n#pragma warning(push)\n#pragma warning(disable:4389) // '==' : signed/unsigned mismatch\n#pragma warning(disable:4018) // more \"signed/unsigned mismatch\"\n#pragma warning(disable:4312) // Converting int to T* using reinterpret_cast (issue on x64 platform)\n#pragma warning(disable:4180) // qualifier applied to function type has no meaning\n#pragma warning(disable:4800) // Forcing result to true or false\n#endif\n\nnamespace Catch {\n\n    struct ITransientExpression {\n        auto isBinaryExpression() const -> bool { return m_isBinaryExpression; }\n        auto getResult() const -> bool { return m_result; }\n        virtual void streamReconstructedExpression( std::ostream &os ) const = 0;\n\n        ITransientExpression( bool isBinaryExpression, bool result )\n        :   m_isBinaryExpression( isBinaryExpression ),\n            m_result( result )\n        {}\n\n        // We don't actually need a virtual destructor, but many static analysers\n        // complain if it's not here :-(\n        virtual ~ITransientExpression();\n\n        bool m_isBinaryExpression;\n        bool m_result;\n\n    };\n\n    void formatReconstructedExpression( std::ostream &os, std::string const& lhs, StringRef op, std::string const& rhs );\n\n    template<typename LhsT, typename RhsT>\n    class BinaryExpr  : public ITransientExpression {\n        LhsT m_lhs;\n        StringRef m_op;\n        RhsT m_rhs;\n\n        void streamReconstructedExpression( std::ostream &os ) const override {\n            formatReconstructedExpression\n                    ( os, Catch::Detail::stringify( m_lhs ), m_op, Catch::Detail::stringify( m_rhs ) );\n        }\n\n    public:\n        BinaryExpr( bool comparisonResult, LhsT lhs, StringRef op, RhsT rhs )\n        :   ITransientExpression{ true, comparisonResult },\n            m_lhs( lhs ),\n            m_op( op ),\n            m_rhs( rhs )\n        {}\n\n        template<typename T>\n        auto operator && ( T ) const -> BinaryExpr<LhsT, RhsT const&> const {\n            static_assert(always_false<T>::value,\n            \"chained comparisons are not supported inside assertions, \"\n            \"wrap the expression inside parentheses, or decompose it\");\n        }\n\n        template<typename T>\n        auto operator || ( T ) const -> BinaryExpr<LhsT, RhsT const&> const {\n            static_assert(always_false<T>::value,\n            \"chained comparisons are not supported inside assertions, \"\n            \"wrap the expression inside parentheses, or decompose it\");\n        }\n\n        template<typename T>\n        auto operator == ( T ) const -> BinaryExpr<LhsT, RhsT const&> const {\n            static_assert(always_false<T>::value,\n            \"chained comparisons are not supported inside assertions, \"\n            \"wrap the expression inside parentheses, or decompose it\");\n        }\n\n        template<typename T>\n        auto operator != ( T ) const -> BinaryExpr<LhsT, RhsT const&> const {\n            static_assert(always_false<T>::value,\n            \"chained comparisons are not supported inside assertions, \"\n            \"wrap the expression inside parentheses, or decompose it\");\n        }\n\n        template<typename T>\n        auto operator > ( T ) const -> BinaryExpr<LhsT, RhsT const&> const {\n            static_assert(always_false<T>::value,\n            \"chained comparisons are not supported inside assertions, \"\n            \"wrap the expression inside parentheses, or decompose it\");\n        }\n\n        template<typename T>\n        auto operator < ( T ) const -> BinaryExpr<LhsT, RhsT const&> const {\n            static_assert(always_false<T>::value,\n            \"chained comparisons are not supported inside assertions, \"\n            \"wrap the expression inside parentheses, or decompose it\");\n        }\n\n        template<typename T>\n        auto operator >= ( T ) const -> BinaryExpr<LhsT, RhsT const&> const {\n            static_assert(always_false<T>::value,\n            \"chained comparisons are not supported inside assertions, \"\n            \"wrap the expression inside parentheses, or decompose it\");\n        }\n\n        template<typename T>\n        auto operator <= ( T ) const -> BinaryExpr<LhsT, RhsT const&> const {\n            static_assert(always_false<T>::value,\n            \"chained comparisons are not supported inside assertions, \"\n            \"wrap the expression inside parentheses, or decompose it\");\n        }\n    };\n\n    template<typename LhsT>\n    class UnaryExpr : public ITransientExpression {\n        LhsT m_lhs;\n\n        void streamReconstructedExpression( std::ostream &os ) const override {\n            os << Catch::Detail::stringify( m_lhs );\n        }\n\n    public:\n        explicit UnaryExpr( LhsT lhs )\n        :   ITransientExpression{ false, static_cast<bool>(lhs) },\n            m_lhs( lhs )\n        {}\n    };\n\n    // Specialised comparison functions to handle equality comparisons between ints and pointers (NULL deduces as an int)\n    template<typename LhsT, typename RhsT>\n    auto compareEqual( LhsT const& lhs, RhsT const& rhs ) -> bool { return static_cast<bool>(lhs == rhs); }\n    template<typename T>\n    auto compareEqual( T* const& lhs, int rhs ) -> bool { return lhs == reinterpret_cast<void const*>( rhs ); }\n    template<typename T>\n    auto compareEqual( T* const& lhs, long rhs ) -> bool { return lhs == reinterpret_cast<void const*>( rhs ); }\n    template<typename T>\n    auto compareEqual( int lhs, T* const& rhs ) -> bool { return reinterpret_cast<void const*>( lhs ) == rhs; }\n    template<typename T>\n    auto compareEqual( long lhs, T* const& rhs ) -> bool { return reinterpret_cast<void const*>( lhs ) == rhs; }\n\n    template<typename LhsT, typename RhsT>\n    auto compareNotEqual( LhsT const& lhs, RhsT&& rhs ) -> bool { return static_cast<bool>(lhs != rhs); }\n    template<typename T>\n    auto compareNotEqual( T* const& lhs, int rhs ) -> bool { return lhs != reinterpret_cast<void const*>( rhs ); }\n    template<typename T>\n    auto compareNotEqual( T* const& lhs, long rhs ) -> bool { return lhs != reinterpret_cast<void const*>( rhs ); }\n    template<typename T>\n    auto compareNotEqual( int lhs, T* const& rhs ) -> bool { return reinterpret_cast<void const*>( lhs ) != rhs; }\n    template<typename T>\n    auto compareNotEqual( long lhs, T* const& rhs ) -> bool { return reinterpret_cast<void const*>( lhs ) != rhs; }\n\n    template<typename LhsT>\n    class ExprLhs {\n        LhsT m_lhs;\n    public:\n        explicit ExprLhs( LhsT lhs ) : m_lhs( lhs ) {}\n\n        template<typename RhsT>\n        auto operator == ( RhsT const& rhs ) -> BinaryExpr<LhsT, RhsT const&> const {\n            return { compareEqual( m_lhs, rhs ), m_lhs, \"==\", rhs };\n        }\n        auto operator == ( bool rhs ) -> BinaryExpr<LhsT, bool> const {\n            return { m_lhs == rhs, m_lhs, \"==\", rhs };\n        }\n\n        template<typename RhsT>\n        auto operator != ( RhsT const& rhs ) -> BinaryExpr<LhsT, RhsT const&> const {\n            return { compareNotEqual( m_lhs, rhs ), m_lhs, \"!=\", rhs };\n        }\n        auto operator != ( bool rhs ) -> BinaryExpr<LhsT, bool> const {\n            return { m_lhs != rhs, m_lhs, \"!=\", rhs };\n        }\n\n        template<typename RhsT>\n        auto operator > ( RhsT const& rhs ) -> BinaryExpr<LhsT, RhsT const&> const {\n            return { static_cast<bool>(m_lhs > rhs), m_lhs, \">\", rhs };\n        }\n        template<typename RhsT>\n        auto operator < ( RhsT const& rhs ) -> BinaryExpr<LhsT, RhsT const&> const {\n            return { static_cast<bool>(m_lhs < rhs), m_lhs, \"<\", rhs };\n        }\n        template<typename RhsT>\n        auto operator >= ( RhsT const& rhs ) -> BinaryExpr<LhsT, RhsT const&> const {\n            return { static_cast<bool>(m_lhs >= rhs), m_lhs, \">=\", rhs };\n        }\n        template<typename RhsT>\n        auto operator <= ( RhsT const& rhs ) -> BinaryExpr<LhsT, RhsT const&> const {\n            return { static_cast<bool>(m_lhs <= rhs), m_lhs, \"<=\", rhs };\n        }\n        template <typename RhsT>\n        auto operator | (RhsT const& rhs) -> BinaryExpr<LhsT, RhsT const&> const {\n            return { static_cast<bool>(m_lhs | rhs), m_lhs, \"|\", rhs };\n        }\n        template <typename RhsT>\n        auto operator & (RhsT const& rhs) -> BinaryExpr<LhsT, RhsT const&> const {\n            return { static_cast<bool>(m_lhs & rhs), m_lhs, \"&\", rhs };\n        }\n        template <typename RhsT>\n        auto operator ^ (RhsT const& rhs) -> BinaryExpr<LhsT, RhsT const&> const {\n            return { static_cast<bool>(m_lhs ^ rhs), m_lhs, \"^\", rhs };\n        }\n\n        template<typename RhsT>\n        auto operator && ( RhsT const& ) -> BinaryExpr<LhsT, RhsT const&> const {\n            static_assert(always_false<RhsT>::value,\n            \"operator&& is not supported inside assertions, \"\n            \"wrap the expression inside parentheses, or decompose it\");\n        }\n\n        template<typename RhsT>\n        auto operator || ( RhsT const& ) -> BinaryExpr<LhsT, RhsT const&> const {\n            static_assert(always_false<RhsT>::value,\n            \"operator|| is not supported inside assertions, \"\n            \"wrap the expression inside parentheses, or decompose it\");\n        }\n\n        auto makeUnaryExpr() const -> UnaryExpr<LhsT> {\n            return UnaryExpr<LhsT>{ m_lhs };\n        }\n    };\n\n    void handleExpression( ITransientExpression const& expr );\n\n    template<typename T>\n    void handleExpression( ExprLhs<T> const& expr ) {\n        handleExpression( expr.makeUnaryExpr() );\n    }\n\n    struct Decomposer {\n        template<typename T>\n        auto operator <= ( T const& lhs ) -> ExprLhs<T const&> {\n            return ExprLhs<T const&>{ lhs };\n        }\n\n        auto operator <=( bool value ) -> ExprLhs<bool> {\n            return ExprLhs<bool>{ value };\n        }\n    };\n\n} // end namespace Catch\n\n#ifdef _MSC_VER\n#pragma warning(pop)\n#endif\n\n// end catch_decomposer.h\n// start catch_interfaces_capture.h\n\n#include <string>\n#include <chrono>\n\nnamespace Catch {\n\n    class AssertionResult;\n    struct AssertionInfo;\n    struct SectionInfo;\n    struct SectionEndInfo;\n    struct MessageInfo;\n    struct MessageBuilder;\n    struct Counts;\n    struct AssertionReaction;\n    struct SourceLineInfo;\n\n    struct ITransientExpression;\n    struct IGeneratorTracker;\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n    struct BenchmarkInfo;\n    template <typename Duration = std::chrono::duration<double, std::nano>>\n    struct BenchmarkStats;\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n\n    struct IResultCapture {\n\n        virtual ~IResultCapture();\n\n        virtual bool sectionStarted(    SectionInfo const& sectionInfo,\n                                        Counts& assertions ) = 0;\n        virtual void sectionEnded( SectionEndInfo const& endInfo ) = 0;\n        virtual void sectionEndedEarly( SectionEndInfo const& endInfo ) = 0;\n\n        virtual auto acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker& = 0;\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n        virtual void benchmarkPreparing( std::string const& name ) = 0;\n        virtual void benchmarkStarting( BenchmarkInfo const& info ) = 0;\n        virtual void benchmarkEnded( BenchmarkStats<> const& stats ) = 0;\n        virtual void benchmarkFailed( std::string const& error ) = 0;\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n\n        virtual void pushScopedMessage( MessageInfo const& message ) = 0;\n        virtual void popScopedMessage( MessageInfo const& message ) = 0;\n\n        virtual void emplaceUnscopedMessage( MessageBuilder const& builder ) = 0;\n\n        virtual void handleFatalErrorCondition( StringRef message ) = 0;\n\n        virtual void handleExpr\n                (   AssertionInfo const& info,\n                    ITransientExpression const& expr,\n                    AssertionReaction& reaction ) = 0;\n        virtual void handleMessage\n                (   AssertionInfo const& info,\n                    ResultWas::OfType resultType,\n                    StringRef const& message,\n                    AssertionReaction& reaction ) = 0;\n        virtual void handleUnexpectedExceptionNotThrown\n                (   AssertionInfo const& info,\n                    AssertionReaction& reaction ) = 0;\n        virtual void handleUnexpectedInflightException\n                (   AssertionInfo const& info,\n                    std::string const& message,\n                    AssertionReaction& reaction ) = 0;\n        virtual void handleIncomplete\n                (   AssertionInfo const& info ) = 0;\n        virtual void handleNonExpr\n                (   AssertionInfo const &info,\n                    ResultWas::OfType resultType,\n                    AssertionReaction &reaction ) = 0;\n\n        virtual bool lastAssertionPassed() = 0;\n        virtual void assertionPassed() = 0;\n\n        // Deprecated, do not use:\n        virtual std::string getCurrentTestName() const = 0;\n        virtual const AssertionResult* getLastResult() const = 0;\n        virtual void exceptionEarlyReported() = 0;\n    };\n\n    IResultCapture& getResultCapture();\n}\n\n// end catch_interfaces_capture.h\nnamespace Catch {\n\n    struct TestFailureException{};\n    struct AssertionResultData;\n    struct IResultCapture;\n    class RunContext;\n\n    class LazyExpression {\n        friend class AssertionHandler;\n        friend struct AssertionStats;\n        friend class RunContext;\n\n        ITransientExpression const* m_transientExpression = nullptr;\n        bool m_isNegated;\n    public:\n        LazyExpression( bool isNegated );\n        LazyExpression( LazyExpression const& other );\n        LazyExpression& operator = ( LazyExpression const& ) = delete;\n\n        explicit operator bool() const;\n\n        friend auto operator << ( std::ostream& os, LazyExpression const& lazyExpr ) -> std::ostream&;\n    };\n\n    struct AssertionReaction {\n        bool shouldDebugBreak = false;\n        bool shouldThrow = false;\n    };\n\n    class AssertionHandler {\n        AssertionInfo m_assertionInfo;\n        AssertionReaction m_reaction;\n        bool m_completed = false;\n        IResultCapture& m_resultCapture;\n\n    public:\n        AssertionHandler\n            (   StringRef const& macroName,\n                SourceLineInfo const& lineInfo,\n                StringRef capturedExpression,\n                ResultDisposition::Flags resultDisposition );\n        ~AssertionHandler() {\n            if ( !m_completed ) {\n                m_resultCapture.handleIncomplete( m_assertionInfo );\n            }\n        }\n\n        template<typename T>\n        void handleExpr( ExprLhs<T> const& expr ) {\n            handleExpr( expr.makeUnaryExpr() );\n        }\n        void handleExpr( ITransientExpression const& expr );\n\n        void handleMessage(ResultWas::OfType resultType, StringRef const& message);\n\n        void handleExceptionThrownAsExpected();\n        void handleUnexpectedExceptionNotThrown();\n        void handleExceptionNotThrownAsExpected();\n        void handleThrowingCallSkipped();\n        void handleUnexpectedInflightException();\n\n        void complete();\n        void setCompleted();\n\n        // query\n        auto allowThrows() const -> bool;\n    };\n\n    void handleExceptionMatchExpr( AssertionHandler& handler, std::string const& str, StringRef const& matcherString );\n\n} // namespace Catch\n\n// end catch_assertionhandler.h\n// start catch_message.h\n\n#include <string>\n#include <vector>\n\nnamespace Catch {\n\n    struct MessageInfo {\n        MessageInfo(    StringRef const& _macroName,\n                        SourceLineInfo const& _lineInfo,\n                        ResultWas::OfType _type );\n\n        StringRef macroName;\n        std::string message;\n        SourceLineInfo lineInfo;\n        ResultWas::OfType type;\n        unsigned int sequence;\n\n        bool operator == ( MessageInfo const& other ) const;\n        bool operator < ( MessageInfo const& other ) const;\n    private:\n        static unsigned int globalCount;\n    };\n\n    struct MessageStream {\n\n        template<typename T>\n        MessageStream& operator << ( T const& value ) {\n            m_stream << value;\n            return *this;\n        }\n\n        ReusableStringStream m_stream;\n    };\n\n    struct MessageBuilder : MessageStream {\n        MessageBuilder( StringRef const& macroName,\n                        SourceLineInfo const& lineInfo,\n                        ResultWas::OfType type );\n\n        template<typename T>\n        MessageBuilder& operator << ( T const& value ) {\n            m_stream << value;\n            return *this;\n        }\n\n        MessageInfo m_info;\n    };\n\n    class ScopedMessage {\n    public:\n        explicit ScopedMessage( MessageBuilder const& builder );\n        ScopedMessage( ScopedMessage& duplicate ) = delete;\n        ScopedMessage( ScopedMessage&& old );\n        ~ScopedMessage();\n\n        MessageInfo m_info;\n        bool m_moved;\n    };\n\n    class Capturer {\n        std::vector<MessageInfo> m_messages;\n        IResultCapture& m_resultCapture = getResultCapture();\n        size_t m_captured = 0;\n    public:\n        Capturer( StringRef macroName, SourceLineInfo const& lineInfo, ResultWas::OfType resultType, StringRef names );\n        ~Capturer();\n\n        void captureValue( size_t index, std::string const& value );\n\n        template<typename T>\n        void captureValues( size_t index, T const& value ) {\n            captureValue( index, Catch::Detail::stringify( value ) );\n        }\n\n        template<typename T, typename... Ts>\n        void captureValues( size_t index, T const& value, Ts const&... values ) {\n            captureValue( index, Catch::Detail::stringify(value) );\n            captureValues( index+1, values... );\n        }\n    };\n\n} // end namespace Catch\n\n// end catch_message.h\n#if !defined(CATCH_CONFIG_DISABLE)\n\n#if !defined(CATCH_CONFIG_DISABLE_STRINGIFICATION)\n  #define CATCH_INTERNAL_STRINGIFY(...) #__VA_ARGS__\n#else\n  #define CATCH_INTERNAL_STRINGIFY(...) \"Disabled by CATCH_CONFIG_DISABLE_STRINGIFICATION\"\n#endif\n\n#if defined(CATCH_CONFIG_FAST_COMPILE) || defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)\n\n///////////////////////////////////////////////////////////////////////////////\n// Another way to speed-up compilation is to omit local try-catch for REQUIRE*\n// macros.\n#define INTERNAL_CATCH_TRY\n#define INTERNAL_CATCH_CATCH( capturer )\n\n#else // CATCH_CONFIG_FAST_COMPILE\n\n#define INTERNAL_CATCH_TRY try\n#define INTERNAL_CATCH_CATCH( handler ) catch(...) { handler.handleUnexpectedInflightException(); }\n\n#endif\n\n#define INTERNAL_CATCH_REACT( handler ) handler.complete();\n\n///////////////////////////////////////////////////////////////////////////////\n#define INTERNAL_CATCH_TEST( macroName, resultDisposition, ... ) \\\n    do { \\\n        CATCH_INTERNAL_IGNORE_BUT_WARN(__VA_ARGS__); \\\n        Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__), resultDisposition ); \\\n        INTERNAL_CATCH_TRY { \\\n            CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \\\n            CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS \\\n            catchAssertionHandler.handleExpr( Catch::Decomposer() <= __VA_ARGS__ ); \\\n            CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \\\n        } INTERNAL_CATCH_CATCH( catchAssertionHandler ) \\\n        INTERNAL_CATCH_REACT( catchAssertionHandler ) \\\n    } while( (void)0, (false) && static_cast<bool>( !!(__VA_ARGS__) ) )\n\n///////////////////////////////////////////////////////////////////////////////\n#define INTERNAL_CATCH_IF( macroName, resultDisposition, ... ) \\\n    INTERNAL_CATCH_TEST( macroName, resultDisposition, __VA_ARGS__ ); \\\n    if( Catch::getResultCapture().lastAssertionPassed() )\n\n///////////////////////////////////////////////////////////////////////////////\n#define INTERNAL_CATCH_ELSE( macroName, resultDisposition, ... ) \\\n    INTERNAL_CATCH_TEST( macroName, resultDisposition, __VA_ARGS__ ); \\\n    if( !Catch::getResultCapture().lastAssertionPassed() )\n\n///////////////////////////////////////////////////////////////////////////////\n#define INTERNAL_CATCH_NO_THROW( macroName, resultDisposition, ... ) \\\n    do { \\\n        Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__), resultDisposition ); \\\n        try { \\\n            static_cast<void>(__VA_ARGS__); \\\n            catchAssertionHandler.handleExceptionNotThrownAsExpected(); \\\n        } \\\n        catch( ... ) { \\\n            catchAssertionHandler.handleUnexpectedInflightException(); \\\n        } \\\n        INTERNAL_CATCH_REACT( catchAssertionHandler ) \\\n    } while( false )\n\n///////////////////////////////////////////////////////////////////////////////\n#define INTERNAL_CATCH_THROWS( macroName, resultDisposition, ... ) \\\n    do { \\\n        Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__), resultDisposition); \\\n        if( catchAssertionHandler.allowThrows() ) \\\n            try { \\\n                static_cast<void>(__VA_ARGS__); \\\n                catchAssertionHandler.handleUnexpectedExceptionNotThrown(); \\\n            } \\\n            catch( ... ) { \\\n                catchAssertionHandler.handleExceptionThrownAsExpected(); \\\n            } \\\n        else \\\n            catchAssertionHandler.handleThrowingCallSkipped(); \\\n        INTERNAL_CATCH_REACT( catchAssertionHandler ) \\\n    } while( false )\n\n///////////////////////////////////////////////////////////////////////////////\n#define INTERNAL_CATCH_THROWS_AS( macroName, exceptionType, resultDisposition, expr ) \\\n    do { \\\n        Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(expr) \", \" CATCH_INTERNAL_STRINGIFY(exceptionType), resultDisposition ); \\\n        if( catchAssertionHandler.allowThrows() ) \\\n            try { \\\n                static_cast<void>(expr); \\\n                catchAssertionHandler.handleUnexpectedExceptionNotThrown(); \\\n            } \\\n            catch( exceptionType const& ) { \\\n                catchAssertionHandler.handleExceptionThrownAsExpected(); \\\n            } \\\n            catch( ... ) { \\\n                catchAssertionHandler.handleUnexpectedInflightException(); \\\n            } \\\n        else \\\n            catchAssertionHandler.handleThrowingCallSkipped(); \\\n        INTERNAL_CATCH_REACT( catchAssertionHandler ) \\\n    } while( false )\n\n///////////////////////////////////////////////////////////////////////////////\n#define INTERNAL_CATCH_MSG( macroName, messageType, resultDisposition, ... ) \\\n    do { \\\n        Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, Catch::StringRef(), resultDisposition ); \\\n        catchAssertionHandler.handleMessage( messageType, ( Catch::MessageStream() << __VA_ARGS__ + ::Catch::StreamEndStop() ).m_stream.str() ); \\\n        INTERNAL_CATCH_REACT( catchAssertionHandler ) \\\n    } while( false )\n\n///////////////////////////////////////////////////////////////////////////////\n#define INTERNAL_CATCH_CAPTURE( varName, macroName, ... ) \\\n    auto varName = Catch::Capturer( macroName, CATCH_INTERNAL_LINEINFO, Catch::ResultWas::Info, #__VA_ARGS__ ); \\\n    varName.captureValues( 0, __VA_ARGS__ )\n\n///////////////////////////////////////////////////////////////////////////////\n#define INTERNAL_CATCH_INFO( macroName, log ) \\\n    Catch::ScopedMessage INTERNAL_CATCH_UNIQUE_NAME( scopedMessage )( Catch::MessageBuilder( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, Catch::ResultWas::Info ) << log );\n\n///////////////////////////////////////////////////////////////////////////////\n#define INTERNAL_CATCH_UNSCOPED_INFO( macroName, log ) \\\n    Catch::getResultCapture().emplaceUnscopedMessage( Catch::MessageBuilder( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, Catch::ResultWas::Info ) << log )\n\n///////////////////////////////////////////////////////////////////////////////\n// Although this is matcher-based, it can be used with just a string\n#define INTERNAL_CATCH_THROWS_STR_MATCHES( macroName, resultDisposition, matcher, ... ) \\\n    do { \\\n        Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__) \", \" CATCH_INTERNAL_STRINGIFY(matcher), resultDisposition ); \\\n        if( catchAssertionHandler.allowThrows() ) \\\n            try { \\\n                static_cast<void>(__VA_ARGS__); \\\n                catchAssertionHandler.handleUnexpectedExceptionNotThrown(); \\\n            } \\\n            catch( ... ) { \\\n                Catch::handleExceptionMatchExpr( catchAssertionHandler, matcher, #matcher##_catch_sr ); \\\n            } \\\n        else \\\n            catchAssertionHandler.handleThrowingCallSkipped(); \\\n        INTERNAL_CATCH_REACT( catchAssertionHandler ) \\\n    } while( false )\n\n#endif // CATCH_CONFIG_DISABLE\n\n// end catch_capture.hpp\n// start catch_section.h\n\n// start catch_section_info.h\n\n// start catch_totals.h\n\n#include <cstddef>\n\nnamespace Catch {\n\n    struct Counts {\n        Counts operator - ( Counts const& other ) const;\n        Counts& operator += ( Counts const& other );\n\n        std::size_t total() const;\n        bool allPassed() const;\n        bool allOk() const;\n\n        std::size_t passed = 0;\n        std::size_t failed = 0;\n        std::size_t failedButOk = 0;\n    };\n\n    struct Totals {\n\n        Totals operator - ( Totals const& other ) const;\n        Totals& operator += ( Totals const& other );\n\n        Totals delta( Totals const& prevTotals ) const;\n\n        int error = 0;\n        Counts assertions;\n        Counts testCases;\n    };\n}\n\n// end catch_totals.h\n#include <string>\n\nnamespace Catch {\n\n    struct SectionInfo {\n        SectionInfo\n            (   SourceLineInfo const& _lineInfo,\n                std::string const& _name );\n\n        // Deprecated\n        SectionInfo\n            (   SourceLineInfo const& _lineInfo,\n                std::string const& _name,\n                std::string const& ) : SectionInfo( _lineInfo, _name ) {}\n\n        std::string name;\n        std::string description; // !Deprecated: this will always be empty\n        SourceLineInfo lineInfo;\n    };\n\n    struct SectionEndInfo {\n        SectionInfo sectionInfo;\n        Counts prevAssertions;\n        double durationInSeconds;\n    };\n\n} // end namespace Catch\n\n// end catch_section_info.h\n// start catch_timer.h\n\n#include <cstdint>\n\nnamespace Catch {\n\n    auto getCurrentNanosecondsSinceEpoch() -> uint64_t;\n    auto getEstimatedClockResolution() -> uint64_t;\n\n    class Timer {\n        uint64_t m_nanoseconds = 0;\n    public:\n        void start();\n        auto getElapsedNanoseconds() const -> uint64_t;\n        auto getElapsedMicroseconds() const -> uint64_t;\n        auto getElapsedMilliseconds() const -> unsigned int;\n        auto getElapsedSeconds() const -> double;\n    };\n\n} // namespace Catch\n\n// end catch_timer.h\n#include <string>\n\nnamespace Catch {\n\n    class Section : NonCopyable {\n    public:\n        Section( SectionInfo const& info );\n        ~Section();\n\n        // This indicates whether the section should be executed or not\n        explicit operator bool() const;\n\n    private:\n        SectionInfo m_info;\n\n        std::string m_name;\n        Counts m_assertions;\n        bool m_sectionIncluded;\n        Timer m_timer;\n    };\n\n} // end namespace Catch\n\n#define INTERNAL_CATCH_SECTION( ... ) \\\n    CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \\\n    CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS \\\n    if( Catch::Section const& INTERNAL_CATCH_UNIQUE_NAME( catch_internal_Section ) = Catch::SectionInfo( CATCH_INTERNAL_LINEINFO, __VA_ARGS__ ) ) \\\n    CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION\n\n#define INTERNAL_CATCH_DYNAMIC_SECTION( ... ) \\\n    CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \\\n    CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS \\\n    if( Catch::Section const& INTERNAL_CATCH_UNIQUE_NAME( catch_internal_Section ) = Catch::SectionInfo( CATCH_INTERNAL_LINEINFO, (Catch::ReusableStringStream() << __VA_ARGS__).str() ) ) \\\n    CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION\n\n// end catch_section.h\n// start catch_interfaces_exception.h\n\n// start catch_interfaces_registry_hub.h\n\n#include <string>\n#include <memory>\n\nnamespace Catch {\n\n    class TestCase;\n    struct ITestCaseRegistry;\n    struct IExceptionTranslatorRegistry;\n    struct IExceptionTranslator;\n    struct IReporterRegistry;\n    struct IReporterFactory;\n    struct ITagAliasRegistry;\n    struct IMutableEnumValuesRegistry;\n\n    class StartupExceptionRegistry;\n\n    using IReporterFactoryPtr = std::shared_ptr<IReporterFactory>;\n\n    struct IRegistryHub {\n        virtual ~IRegistryHub();\n\n        virtual IReporterRegistry const& getReporterRegistry() const = 0;\n        virtual ITestCaseRegistry const& getTestCaseRegistry() const = 0;\n        virtual ITagAliasRegistry const& getTagAliasRegistry() const = 0;\n        virtual IExceptionTranslatorRegistry const& getExceptionTranslatorRegistry() const = 0;\n\n        virtual StartupExceptionRegistry const& getStartupExceptionRegistry() const = 0;\n    };\n\n    struct IMutableRegistryHub {\n        virtual ~IMutableRegistryHub();\n        virtual void registerReporter( std::string const& name, IReporterFactoryPtr const& factory ) = 0;\n        virtual void registerListener( IReporterFactoryPtr const& factory ) = 0;\n        virtual void registerTest( TestCase const& testInfo ) = 0;\n        virtual void registerTranslator( const IExceptionTranslator* translator ) = 0;\n        virtual void registerTagAlias( std::string const& alias, std::string const& tag, SourceLineInfo const& lineInfo ) = 0;\n        virtual void registerStartupException() noexcept = 0;\n        virtual IMutableEnumValuesRegistry& getMutableEnumValuesRegistry() = 0;\n    };\n\n    IRegistryHub const& getRegistryHub();\n    IMutableRegistryHub& getMutableRegistryHub();\n    void cleanUp();\n    std::string translateActiveException();\n\n}\n\n// end catch_interfaces_registry_hub.h\n#if defined(CATCH_CONFIG_DISABLE)\n    #define INTERNAL_CATCH_TRANSLATE_EXCEPTION_NO_REG( translatorName, signature) \\\n        static std::string translatorName( signature )\n#endif\n\n#include <exception>\n#include <string>\n#include <vector>\n\nnamespace Catch {\n    using exceptionTranslateFunction = std::string(*)();\n\n    struct IExceptionTranslator;\n    using ExceptionTranslators = std::vector<std::unique_ptr<IExceptionTranslator const>>;\n\n    struct IExceptionTranslator {\n        virtual ~IExceptionTranslator();\n        virtual std::string translate( ExceptionTranslators::const_iterator it, ExceptionTranslators::const_iterator itEnd ) const = 0;\n    };\n\n    struct IExceptionTranslatorRegistry {\n        virtual ~IExceptionTranslatorRegistry();\n\n        virtual std::string translateActiveException() const = 0;\n    };\n\n    class ExceptionTranslatorRegistrar {\n        template<typename T>\n        class ExceptionTranslator : public IExceptionTranslator {\n        public:\n\n            ExceptionTranslator( std::string(*translateFunction)( T& ) )\n            : m_translateFunction( translateFunction )\n            {}\n\n            std::string translate( ExceptionTranslators::const_iterator it, ExceptionTranslators::const_iterator itEnd ) const override {\n#if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)\n                return \"\";\n#else\n                try {\n                    if( it == itEnd )\n                        std::rethrow_exception(std::current_exception());\n                    else\n                        return (*it)->translate( it+1, itEnd );\n                }\n                catch( T& ex ) {\n                    return m_translateFunction( ex );\n                }\n#endif\n            }\n\n        protected:\n            std::string(*m_translateFunction)( T& );\n        };\n\n    public:\n        template<typename T>\n        ExceptionTranslatorRegistrar( std::string(*translateFunction)( T& ) ) {\n            getMutableRegistryHub().registerTranslator\n                ( new ExceptionTranslator<T>( translateFunction ) );\n        }\n    };\n}\n\n///////////////////////////////////////////////////////////////////////////////\n#define INTERNAL_CATCH_TRANSLATE_EXCEPTION2( translatorName, signature ) \\\n    static std::string translatorName( signature ); \\\n    CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \\\n    CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \\\n    namespace{ Catch::ExceptionTranslatorRegistrar INTERNAL_CATCH_UNIQUE_NAME( catch_internal_ExceptionRegistrar )( &translatorName ); } \\\n    CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \\\n    static std::string translatorName( signature )\n\n#define INTERNAL_CATCH_TRANSLATE_EXCEPTION( signature ) INTERNAL_CATCH_TRANSLATE_EXCEPTION2( INTERNAL_CATCH_UNIQUE_NAME( catch_internal_ExceptionTranslator ), signature )\n\n// end catch_interfaces_exception.h\n// start catch_approx.h\n\n#include <type_traits>\n\nnamespace Catch {\nnamespace Detail {\n\n    class Approx {\n    private:\n        bool equalityComparisonImpl(double other) const;\n        // Validates the new margin (margin >= 0)\n        // out-of-line to avoid including stdexcept in the header\n        void setMargin(double margin);\n        // Validates the new epsilon (0 < epsilon < 1)\n        // out-of-line to avoid including stdexcept in the header\n        void setEpsilon(double epsilon);\n\n    public:\n        explicit Approx ( double value );\n\n        static Approx custom();\n\n        Approx operator-() const;\n\n        template <typename T, typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n        Approx operator()( T const& value ) const {\n            Approx approx( static_cast<double>(value) );\n            approx.m_epsilon = m_epsilon;\n            approx.m_margin = m_margin;\n            approx.m_scale = m_scale;\n            return approx;\n        }\n\n        template <typename T, typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n        explicit Approx( T const& value ): Approx(static_cast<double>(value))\n        {}\n\n        template <typename T, typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n        friend bool operator == ( const T& lhs, Approx const& rhs ) {\n            auto lhs_v = static_cast<double>(lhs);\n            return rhs.equalityComparisonImpl(lhs_v);\n        }\n\n        template <typename T, typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n        friend bool operator == ( Approx const& lhs, const T& rhs ) {\n            return operator==( rhs, lhs );\n        }\n\n        template <typename T, typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n        friend bool operator != ( T const& lhs, Approx const& rhs ) {\n            return !operator==( lhs, rhs );\n        }\n\n        template <typename T, typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n        friend bool operator != ( Approx const& lhs, T const& rhs ) {\n            return !operator==( rhs, lhs );\n        }\n\n        template <typename T, typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n        friend bool operator <= ( T const& lhs, Approx const& rhs ) {\n            return static_cast<double>(lhs) < rhs.m_value || lhs == rhs;\n        }\n\n        template <typename T, typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n        friend bool operator <= ( Approx const& lhs, T const& rhs ) {\n            return lhs.m_value < static_cast<double>(rhs) || lhs == rhs;\n        }\n\n        template <typename T, typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n        friend bool operator >= ( T const& lhs, Approx const& rhs ) {\n            return static_cast<double>(lhs) > rhs.m_value || lhs == rhs;\n        }\n\n        template <typename T, typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n        friend bool operator >= ( Approx const& lhs, T const& rhs ) {\n            return lhs.m_value > static_cast<double>(rhs) || lhs == rhs;\n        }\n\n        template <typename T, typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n        Approx& epsilon( T const& newEpsilon ) {\n            double epsilonAsDouble = static_cast<double>(newEpsilon);\n            setEpsilon(epsilonAsDouble);\n            return *this;\n        }\n\n        template <typename T, typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n        Approx& margin( T const& newMargin ) {\n            double marginAsDouble = static_cast<double>(newMargin);\n            setMargin(marginAsDouble);\n            return *this;\n        }\n\n        template <typename T, typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n        Approx& scale( T const& newScale ) {\n            m_scale = static_cast<double>(newScale);\n            return *this;\n        }\n\n        std::string toString() const;\n\n    private:\n        double m_epsilon;\n        double m_margin;\n        double m_scale;\n        double m_value;\n    };\n} // end namespace Detail\n\nnamespace literals {\n    Detail::Approx operator \"\" _a(long double val);\n    Detail::Approx operator \"\" _a(unsigned long long val);\n} // end namespace literals\n\ntemplate<>\nstruct StringMaker<Catch::Detail::Approx> {\n    static std::string convert(Catch::Detail::Approx const& value);\n};\n\n} // end namespace Catch\n\n// end catch_approx.h\n// start catch_string_manip.h\n\n#include <string>\n#include <iosfwd>\n#include <vector>\n\nnamespace Catch {\n\n    bool startsWith( std::string const& s, std::string const& prefix );\n    bool startsWith( std::string const& s, char prefix );\n    bool endsWith( std::string const& s, std::string const& suffix );\n    bool endsWith( std::string const& s, char suffix );\n    bool contains( std::string const& s, std::string const& infix );\n    void toLowerInPlace( std::string& s );\n    std::string toLower( std::string const& s );\n    //! Returns a new string without whitespace at the start/end\n    std::string trim( std::string const& str );\n    //! Returns a substring of the original ref without whitespace. Beware lifetimes!\n    StringRef trim(StringRef ref);\n\n    // !!! Be aware, returns refs into original string - make sure original string outlives them\n    std::vector<StringRef> splitStringRef( StringRef str, char delimiter );\n    bool replaceInPlace( std::string& str, std::string const& replaceThis, std::string const& withThis );\n\n    struct pluralise {\n        pluralise( std::size_t count, std::string const& label );\n\n        friend std::ostream& operator << ( std::ostream& os, pluralise const& pluraliser );\n\n        std::size_t m_count;\n        std::string m_label;\n    };\n}\n\n// end catch_string_manip.h\n#ifndef CATCH_CONFIG_DISABLE_MATCHERS\n// start catch_capture_matchers.h\n\n// start catch_matchers.h\n\n#include <string>\n#include <vector>\n\nnamespace Catch {\nnamespace Matchers {\n    namespace Impl {\n\n        template<typename ArgT> struct MatchAllOf;\n        template<typename ArgT> struct MatchAnyOf;\n        template<typename ArgT> struct MatchNotOf;\n\n        class MatcherUntypedBase {\n        public:\n            MatcherUntypedBase() = default;\n            MatcherUntypedBase ( MatcherUntypedBase const& ) = default;\n            MatcherUntypedBase& operator = ( MatcherUntypedBase const& ) = delete;\n            std::string toString() const;\n\n        protected:\n            virtual ~MatcherUntypedBase();\n            virtual std::string describe() const = 0;\n            mutable std::string m_cachedToString;\n        };\n\n#ifdef __clang__\n#    pragma clang diagnostic push\n#    pragma clang diagnostic ignored \"-Wnon-virtual-dtor\"\n#endif\n\n        template<typename ObjectT>\n        struct MatcherMethod {\n            virtual bool match( ObjectT const& arg ) const = 0;\n        };\n\n#if defined(__OBJC__)\n        // Hack to fix Catch GH issue #1661. Could use id for generic Object support.\n        // use of const for Object pointers is very uncommon and under ARC it causes some kind of signature mismatch that breaks compilation\n        template<>\n        struct MatcherMethod<NSString*> {\n            virtual bool match( NSString* arg ) const = 0;\n        };\n#endif\n\n#ifdef __clang__\n#    pragma clang diagnostic pop\n#endif\n\n        template<typename T>\n        struct MatcherBase : MatcherUntypedBase, MatcherMethod<T> {\n\n            MatchAllOf<T> operator && ( MatcherBase const& other ) const;\n            MatchAnyOf<T> operator || ( MatcherBase const& other ) const;\n            MatchNotOf<T> operator ! () const;\n        };\n\n        template<typename ArgT>\n        struct MatchAllOf : MatcherBase<ArgT> {\n            bool match( ArgT const& arg ) const override {\n                for( auto matcher : m_matchers ) {\n                    if (!matcher->match(arg))\n                        return false;\n                }\n                return true;\n            }\n            std::string describe() const override {\n                std::string description;\n                description.reserve( 4 + m_matchers.size()*32 );\n                description += \"( \";\n                bool first = true;\n                for( auto matcher : m_matchers ) {\n                    if( first )\n                        first = false;\n                    else\n                        description += \" and \";\n                    description += matcher->toString();\n                }\n                description += \" )\";\n                return description;\n            }\n\n            MatchAllOf<ArgT> operator && ( MatcherBase<ArgT> const& other ) {\n                auto copy(*this);\n                copy.m_matchers.push_back( &other );\n                return copy;\n            }\n\n            std::vector<MatcherBase<ArgT> const*> m_matchers;\n        };\n        template<typename ArgT>\n        struct MatchAnyOf : MatcherBase<ArgT> {\n\n            bool match( ArgT const& arg ) const override {\n                for( auto matcher : m_matchers ) {\n                    if (matcher->match(arg))\n                        return true;\n                }\n                return false;\n            }\n            std::string describe() const override {\n                std::string description;\n                description.reserve( 4 + m_matchers.size()*32 );\n                description += \"( \";\n                bool first = true;\n                for( auto matcher : m_matchers ) {\n                    if( first )\n                        first = false;\n                    else\n                        description += \" or \";\n                    description += matcher->toString();\n                }\n                description += \" )\";\n                return description;\n            }\n\n            MatchAnyOf<ArgT> operator || ( MatcherBase<ArgT> const& other ) {\n                auto copy(*this);\n                copy.m_matchers.push_back( &other );\n                return copy;\n            }\n\n            std::vector<MatcherBase<ArgT> const*> m_matchers;\n        };\n\n        template<typename ArgT>\n        struct MatchNotOf : MatcherBase<ArgT> {\n\n            MatchNotOf( MatcherBase<ArgT> const& underlyingMatcher ) : m_underlyingMatcher( underlyingMatcher ) {}\n\n            bool match( ArgT const& arg ) const override {\n                return !m_underlyingMatcher.match( arg );\n            }\n\n            std::string describe() const override {\n                return \"not \" + m_underlyingMatcher.toString();\n            }\n            MatcherBase<ArgT> const& m_underlyingMatcher;\n        };\n\n        template<typename T>\n        MatchAllOf<T> MatcherBase<T>::operator && ( MatcherBase const& other ) const {\n            return MatchAllOf<T>() && *this && other;\n        }\n        template<typename T>\n        MatchAnyOf<T> MatcherBase<T>::operator || ( MatcherBase const& other ) const {\n            return MatchAnyOf<T>() || *this || other;\n        }\n        template<typename T>\n        MatchNotOf<T> MatcherBase<T>::operator ! () const {\n            return MatchNotOf<T>( *this );\n        }\n\n    } // namespace Impl\n\n} // namespace Matchers\n\nusing namespace Matchers;\nusing Matchers::Impl::MatcherBase;\n\n} // namespace Catch\n\n// end catch_matchers.h\n// start catch_matchers_exception.hpp\n\nnamespace Catch {\nnamespace Matchers {\nnamespace Exception {\n\nclass ExceptionMessageMatcher : public MatcherBase<std::exception> {\n    std::string m_message;\npublic:\n\n    ExceptionMessageMatcher(std::string const& message):\n        m_message(message)\n    {}\n\n    bool match(std::exception const& ex) const override;\n\n    std::string describe() const override;\n};\n\n} // namespace Exception\n\nException::ExceptionMessageMatcher Message(std::string const& message);\n\n} // namespace Matchers\n} // namespace Catch\n\n// end catch_matchers_exception.hpp\n// start catch_matchers_floating.h\n\nnamespace Catch {\nnamespace Matchers {\n\n    namespace Floating {\n\n        enum class FloatingPointKind : uint8_t;\n\n        struct WithinAbsMatcher : MatcherBase<double> {\n            WithinAbsMatcher(double target, double margin);\n            bool match(double const& matchee) const override;\n            std::string describe() const override;\n        private:\n            double m_target;\n            double m_margin;\n        };\n\n        struct WithinUlpsMatcher : MatcherBase<double> {\n            WithinUlpsMatcher(double target, uint64_t ulps, FloatingPointKind baseType);\n            bool match(double const& matchee) const override;\n            std::string describe() const override;\n        private:\n            double m_target;\n            uint64_t m_ulps;\n            FloatingPointKind m_type;\n        };\n\n        // Given IEEE-754 format for floats and doubles, we can assume\n        // that float -> double promotion is lossless. Given this, we can\n        // assume that if we do the standard relative comparison of\n        // |lhs - rhs| <= epsilon * max(fabs(lhs), fabs(rhs)), then we get\n        // the same result if we do this for floats, as if we do this for\n        // doubles that were promoted from floats.\n        struct WithinRelMatcher : MatcherBase<double> {\n            WithinRelMatcher(double target, double epsilon);\n            bool match(double const& matchee) const override;\n            std::string describe() const override;\n        private:\n            double m_target;\n            double m_epsilon;\n        };\n\n    } // namespace Floating\n\n    // The following functions create the actual matcher objects.\n    // This allows the types to be inferred\n    Floating::WithinUlpsMatcher WithinULP(double target, uint64_t maxUlpDiff);\n    Floating::WithinUlpsMatcher WithinULP(float target, uint64_t maxUlpDiff);\n    Floating::WithinAbsMatcher WithinAbs(double target, double margin);\n    Floating::WithinRelMatcher WithinRel(double target, double eps);\n    // defaults epsilon to 100*numeric_limits<double>::epsilon()\n    Floating::WithinRelMatcher WithinRel(double target);\n    Floating::WithinRelMatcher WithinRel(float target, float eps);\n    // defaults epsilon to 100*numeric_limits<float>::epsilon()\n    Floating::WithinRelMatcher WithinRel(float target);\n\n} // namespace Matchers\n} // namespace Catch\n\n// end catch_matchers_floating.h\n// start catch_matchers_generic.hpp\n\n#include <functional>\n#include <string>\n\nnamespace Catch {\nnamespace Matchers {\nnamespace Generic {\n\nnamespace Detail {\n    std::string finalizeDescription(const std::string& desc);\n}\n\ntemplate <typename T>\nclass PredicateMatcher : public MatcherBase<T> {\n    std::function<bool(T const&)> m_predicate;\n    std::string m_description;\npublic:\n\n    PredicateMatcher(std::function<bool(T const&)> const& elem, std::string const& descr)\n        :m_predicate(std::move(elem)),\n        m_description(Detail::finalizeDescription(descr))\n    {}\n\n    bool match( T const& item ) const override {\n        return m_predicate(item);\n    }\n\n    std::string describe() const override {\n        return m_description;\n    }\n};\n\n} // namespace Generic\n\n    // The following functions create the actual matcher objects.\n    // The user has to explicitly specify type to the function, because\n    // inferring std::function<bool(T const&)> is hard (but possible) and\n    // requires a lot of TMP.\n    template<typename T>\n    Generic::PredicateMatcher<T> Predicate(std::function<bool(T const&)> const& predicate, std::string const& description = \"\") {\n        return Generic::PredicateMatcher<T>(predicate, description);\n    }\n\n} // namespace Matchers\n} // namespace Catch\n\n// end catch_matchers_generic.hpp\n// start catch_matchers_string.h\n\n#include <string>\n\nnamespace Catch {\nnamespace Matchers {\n\n    namespace StdString {\n\n        struct CasedString\n        {\n            CasedString( std::string const& str, CaseSensitive::Choice caseSensitivity );\n            std::string adjustString( std::string const& str ) const;\n            std::string caseSensitivitySuffix() const;\n\n            CaseSensitive::Choice m_caseSensitivity;\n            std::string m_str;\n        };\n\n        struct StringMatcherBase : MatcherBase<std::string> {\n            StringMatcherBase( std::string const& operation, CasedString const& comparator );\n            std::string describe() const override;\n\n            CasedString m_comparator;\n            std::string m_operation;\n        };\n\n        struct EqualsMatcher : StringMatcherBase {\n            EqualsMatcher( CasedString const& comparator );\n            bool match( std::string const& source ) const override;\n        };\n        struct ContainsMatcher : StringMatcherBase {\n            ContainsMatcher( CasedString const& comparator );\n            bool match( std::string const& source ) const override;\n        };\n        struct StartsWithMatcher : StringMatcherBase {\n            StartsWithMatcher( CasedString const& comparator );\n            bool match( std::string const& source ) const override;\n        };\n        struct EndsWithMatcher : StringMatcherBase {\n            EndsWithMatcher( CasedString const& comparator );\n            bool match( std::string const& source ) const override;\n        };\n\n        struct RegexMatcher : MatcherBase<std::string> {\n            RegexMatcher( std::string regex, CaseSensitive::Choice caseSensitivity );\n            bool match( std::string const& matchee ) const override;\n            std::string describe() const override;\n\n        private:\n            std::string m_regex;\n            CaseSensitive::Choice m_caseSensitivity;\n        };\n\n    } // namespace StdString\n\n    // The following functions create the actual matcher objects.\n    // This allows the types to be inferred\n\n    StdString::EqualsMatcher Equals( std::string const& str, CaseSensitive::Choice caseSensitivity = CaseSensitive::Yes );\n    StdString::ContainsMatcher Contains( std::string const& str, CaseSensitive::Choice caseSensitivity = CaseSensitive::Yes );\n    StdString::EndsWithMatcher EndsWith( std::string const& str, CaseSensitive::Choice caseSensitivity = CaseSensitive::Yes );\n    StdString::StartsWithMatcher StartsWith( std::string const& str, CaseSensitive::Choice caseSensitivity = CaseSensitive::Yes );\n    StdString::RegexMatcher Matches( std::string const& regex, CaseSensitive::Choice caseSensitivity = CaseSensitive::Yes );\n\n} // namespace Matchers\n} // namespace Catch\n\n// end catch_matchers_string.h\n// start catch_matchers_vector.h\n\n#include <algorithm>\n\nnamespace Catch {\nnamespace Matchers {\n\n    namespace Vector {\n        template<typename T, typename Alloc>\n        struct ContainsElementMatcher : MatcherBase<std::vector<T, Alloc>> {\n\n            ContainsElementMatcher(T const &comparator) : m_comparator( comparator) {}\n\n            bool match(std::vector<T, Alloc> const &v) const override {\n                for (auto const& el : v) {\n                    if (el == m_comparator) {\n                        return true;\n                    }\n                }\n                return false;\n            }\n\n            std::string describe() const override {\n                return \"Contains: \" + ::Catch::Detail::stringify( m_comparator );\n            }\n\n            T const& m_comparator;\n        };\n\n        template<typename T, typename AllocComp, typename AllocMatch>\n        struct ContainsMatcher : MatcherBase<std::vector<T, AllocMatch>> {\n\n            ContainsMatcher(std::vector<T, AllocComp> const &comparator) : m_comparator( comparator ) {}\n\n            bool match(std::vector<T, AllocMatch> const &v) const override {\n                // !TBD: see note in EqualsMatcher\n                if (m_comparator.size() > v.size())\n                    return false;\n                for (auto const& comparator : m_comparator) {\n                    auto present = false;\n                    for (const auto& el : v) {\n                        if (el == comparator) {\n                            present = true;\n                            break;\n                        }\n                    }\n                    if (!present) {\n                        return false;\n                    }\n                }\n                return true;\n            }\n            std::string describe() const override {\n                return \"Contains: \" + ::Catch::Detail::stringify( m_comparator );\n            }\n\n            std::vector<T, AllocComp> const& m_comparator;\n        };\n\n        template<typename T, typename AllocComp, typename AllocMatch>\n        struct EqualsMatcher : MatcherBase<std::vector<T, AllocMatch>> {\n\n            EqualsMatcher(std::vector<T, AllocComp> const &comparator) : m_comparator( comparator ) {}\n\n            bool match(std::vector<T, AllocMatch> const &v) const override {\n                // !TBD: This currently works if all elements can be compared using !=\n                // - a more general approach would be via a compare template that defaults\n                // to using !=. but could be specialised for, e.g. std::vector<T, Alloc> etc\n                // - then just call that directly\n                if (m_comparator.size() != v.size())\n                    return false;\n                for (std::size_t i = 0; i < v.size(); ++i)\n                    if (m_comparator[i] != v[i])\n                        return false;\n                return true;\n            }\n            std::string describe() const override {\n                return \"Equals: \" + ::Catch::Detail::stringify( m_comparator );\n            }\n            std::vector<T, AllocComp> const& m_comparator;\n        };\n\n        template<typename T, typename AllocComp, typename AllocMatch>\n        struct ApproxMatcher : MatcherBase<std::vector<T, AllocMatch>> {\n\n            ApproxMatcher(std::vector<T, AllocComp> const& comparator) : m_comparator( comparator ) {}\n\n            bool match(std::vector<T, AllocMatch> const &v) const override {\n                if (m_comparator.size() != v.size())\n                    return false;\n                for (std::size_t i = 0; i < v.size(); ++i)\n                    if (m_comparator[i] != approx(v[i]))\n                        return false;\n                return true;\n            }\n            std::string describe() const override {\n                return \"is approx: \" + ::Catch::Detail::stringify( m_comparator );\n            }\n            template <typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n            ApproxMatcher& epsilon( T const& newEpsilon ) {\n                approx.epsilon(newEpsilon);\n                return *this;\n            }\n            template <typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n            ApproxMatcher& margin( T const& newMargin ) {\n                approx.margin(newMargin);\n                return *this;\n            }\n            template <typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n            ApproxMatcher& scale( T const& newScale ) {\n                approx.scale(newScale);\n                return *this;\n            }\n\n            std::vector<T, AllocComp> const& m_comparator;\n            mutable Catch::Detail::Approx approx = Catch::Detail::Approx::custom();\n        };\n\n        template<typename T, typename AllocComp, typename AllocMatch>\n        struct UnorderedEqualsMatcher : MatcherBase<std::vector<T, AllocMatch>> {\n            UnorderedEqualsMatcher(std::vector<T, AllocComp> const& target) : m_target(target) {}\n            bool match(std::vector<T, AllocMatch> const& vec) const override {\n                if (m_target.size() != vec.size()) {\n                    return false;\n                }\n                return std::is_permutation(m_target.begin(), m_target.end(), vec.begin());\n            }\n\n            std::string describe() const override {\n                return \"UnorderedEquals: \" + ::Catch::Detail::stringify(m_target);\n            }\n        private:\n            std::vector<T, AllocComp> const& m_target;\n        };\n\n    } // namespace Vector\n\n    // The following functions create the actual matcher objects.\n    // This allows the types to be inferred\n\n    template<typename T, typename AllocComp = std::allocator<T>, typename AllocMatch = AllocComp>\n    Vector::ContainsMatcher<T, AllocComp, AllocMatch> Contains( std::vector<T, AllocComp> const& comparator ) {\n        return Vector::ContainsMatcher<T, AllocComp, AllocMatch>( comparator );\n    }\n\n    template<typename T, typename Alloc = std::allocator<T>>\n    Vector::ContainsElementMatcher<T, Alloc> VectorContains( T const& comparator ) {\n        return Vector::ContainsElementMatcher<T, Alloc>( comparator );\n    }\n\n    template<typename T, typename AllocComp = std::allocator<T>, typename AllocMatch = AllocComp>\n    Vector::EqualsMatcher<T, AllocComp, AllocMatch> Equals( std::vector<T, AllocComp> const& comparator ) {\n        return Vector::EqualsMatcher<T, AllocComp, AllocMatch>( comparator );\n    }\n\n    template<typename T, typename AllocComp = std::allocator<T>, typename AllocMatch = AllocComp>\n    Vector::ApproxMatcher<T, AllocComp, AllocMatch> Approx( std::vector<T, AllocComp> const& comparator ) {\n        return Vector::ApproxMatcher<T, AllocComp, AllocMatch>( comparator );\n    }\n\n    template<typename T, typename AllocComp = std::allocator<T>, typename AllocMatch = AllocComp>\n    Vector::UnorderedEqualsMatcher<T, AllocComp, AllocMatch> UnorderedEquals(std::vector<T, AllocComp> const& target) {\n        return Vector::UnorderedEqualsMatcher<T, AllocComp, AllocMatch>( target );\n    }\n\n} // namespace Matchers\n} // namespace Catch\n\n// end catch_matchers_vector.h\nnamespace Catch {\n\n    template<typename ArgT, typename MatcherT>\n    class MatchExpr : public ITransientExpression {\n        ArgT const& m_arg;\n        MatcherT m_matcher;\n        StringRef m_matcherString;\n    public:\n        MatchExpr( ArgT const& arg, MatcherT const& matcher, StringRef const& matcherString )\n        :   ITransientExpression{ true, matcher.match( arg ) },\n            m_arg( arg ),\n            m_matcher( matcher ),\n            m_matcherString( matcherString )\n        {}\n\n        void streamReconstructedExpression( std::ostream &os ) const override {\n            auto matcherAsString = m_matcher.toString();\n            os << Catch::Detail::stringify( m_arg ) << ' ';\n            if( matcherAsString == Detail::unprintableString )\n                os << m_matcherString;\n            else\n                os << matcherAsString;\n        }\n    };\n\n    using StringMatcher = Matchers::Impl::MatcherBase<std::string>;\n\n    void handleExceptionMatchExpr( AssertionHandler& handler, StringMatcher const& matcher, StringRef const& matcherString  );\n\n    template<typename ArgT, typename MatcherT>\n    auto makeMatchExpr( ArgT const& arg, MatcherT const& matcher, StringRef const& matcherString  ) -> MatchExpr<ArgT, MatcherT> {\n        return MatchExpr<ArgT, MatcherT>( arg, matcher, matcherString );\n    }\n\n} // namespace Catch\n\n///////////////////////////////////////////////////////////////////////////////\n#define INTERNAL_CHECK_THAT( macroName, matcher, resultDisposition, arg ) \\\n    do { \\\n        Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(arg) \", \" CATCH_INTERNAL_STRINGIFY(matcher), resultDisposition ); \\\n        INTERNAL_CATCH_TRY { \\\n            catchAssertionHandler.handleExpr( Catch::makeMatchExpr( arg, matcher, #matcher##_catch_sr ) ); \\\n        } INTERNAL_CATCH_CATCH( catchAssertionHandler ) \\\n        INTERNAL_CATCH_REACT( catchAssertionHandler ) \\\n    } while( false )\n\n///////////////////////////////////////////////////////////////////////////////\n#define INTERNAL_CATCH_THROWS_MATCHES( macroName, exceptionType, resultDisposition, matcher, ... ) \\\n    do { \\\n        Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__) \", \" CATCH_INTERNAL_STRINGIFY(exceptionType) \", \" CATCH_INTERNAL_STRINGIFY(matcher), resultDisposition ); \\\n        if( catchAssertionHandler.allowThrows() ) \\\n            try { \\\n                static_cast<void>(__VA_ARGS__ ); \\\n                catchAssertionHandler.handleUnexpectedExceptionNotThrown(); \\\n            } \\\n            catch( exceptionType const& ex ) { \\\n                catchAssertionHandler.handleExpr( Catch::makeMatchExpr( ex, matcher, #matcher##_catch_sr ) ); \\\n            } \\\n            catch( ... ) { \\\n                catchAssertionHandler.handleUnexpectedInflightException(); \\\n            } \\\n        else \\\n            catchAssertionHandler.handleThrowingCallSkipped(); \\\n        INTERNAL_CATCH_REACT( catchAssertionHandler ) \\\n    } while( false )\n\n// end catch_capture_matchers.h\n#endif\n// start catch_generators.hpp\n\n// start catch_interfaces_generatortracker.h\n\n\n#include <memory>\n\nnamespace Catch {\n\n    namespace Generators {\n        class GeneratorUntypedBase {\n        public:\n            GeneratorUntypedBase() = default;\n            virtual ~GeneratorUntypedBase();\n            // Attempts to move the generator to the next element\n             //\n             // Returns true iff the move succeeded (and a valid element\n             // can be retrieved).\n            virtual bool next() = 0;\n        };\n        using GeneratorBasePtr = std::unique_ptr<GeneratorUntypedBase>;\n\n    } // namespace Generators\n\n    struct IGeneratorTracker {\n        virtual ~IGeneratorTracker();\n        virtual auto hasGenerator() const -> bool = 0;\n        virtual auto getGenerator() const -> Generators::GeneratorBasePtr const& = 0;\n        virtual void setGenerator( Generators::GeneratorBasePtr&& generator ) = 0;\n    };\n\n} // namespace Catch\n\n// end catch_interfaces_generatortracker.h\n// start catch_enforce.h\n\n#include <exception>\n\nnamespace Catch {\n#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)\n    template <typename Ex>\n    [[noreturn]]\n    void throw_exception(Ex const& e) {\n        throw e;\n    }\n#else // ^^ Exceptions are enabled //  Exceptions are disabled vv\n    [[noreturn]]\n    void throw_exception(std::exception const& e);\n#endif\n\n    [[noreturn]]\n    void throw_logic_error(std::string const& msg);\n    [[noreturn]]\n    void throw_domain_error(std::string const& msg);\n    [[noreturn]]\n    void throw_runtime_error(std::string const& msg);\n\n} // namespace Catch;\n\n#define CATCH_MAKE_MSG(...) \\\n    (Catch::ReusableStringStream() << __VA_ARGS__).str()\n\n#define CATCH_INTERNAL_ERROR(...) \\\n    Catch::throw_logic_error(CATCH_MAKE_MSG( CATCH_INTERNAL_LINEINFO << \": Internal Catch2 error: \" << __VA_ARGS__))\n\n#define CATCH_ERROR(...) \\\n    Catch::throw_domain_error(CATCH_MAKE_MSG( __VA_ARGS__ ))\n\n#define CATCH_RUNTIME_ERROR(...) \\\n    Catch::throw_runtime_error(CATCH_MAKE_MSG( __VA_ARGS__ ))\n\n#define CATCH_ENFORCE( condition, ... ) \\\n    do{ if( !(condition) ) CATCH_ERROR( __VA_ARGS__ ); } while(false)\n\n// end catch_enforce.h\n#include <memory>\n#include <vector>\n#include <cassert>\n\n#include <utility>\n#include <exception>\n\nnamespace Catch {\n\nclass GeneratorException : public std::exception {\n    const char* const m_msg = \"\";\n\npublic:\n    GeneratorException(const char* msg):\n        m_msg(msg)\n    {}\n\n    const char* what() const noexcept override final;\n};\n\nnamespace Generators {\n\n    // !TBD move this into its own location?\n    namespace pf{\n        template<typename T, typename... Args>\n        std::unique_ptr<T> make_unique( Args&&... args ) {\n            return std::unique_ptr<T>(new T(std::forward<Args>(args)...));\n        }\n    }\n\n    template<typename T>\n    struct IGenerator : GeneratorUntypedBase {\n        virtual ~IGenerator() = default;\n\n        // Returns the current element of the generator\n        //\n        // \\Precondition The generator is either freshly constructed,\n        // or the last call to `next()` returned true\n        virtual T const& get() const = 0;\n        using type = T;\n    };\n\n    template<typename T>\n    class SingleValueGenerator final : public IGenerator<T> {\n        T m_value;\n    public:\n        SingleValueGenerator(T&& value) : m_value(std::move(value)) {}\n\n        T const& get() const override {\n            return m_value;\n        }\n        bool next() override {\n            return false;\n        }\n    };\n\n    template<typename T>\n    class FixedValuesGenerator final : public IGenerator<T> {\n        static_assert(!std::is_same<T, bool>::value,\n            \"FixedValuesGenerator does not support bools because of std::vector<bool>\"\n            \"specialization, use SingleValue Generator instead.\");\n        std::vector<T> m_values;\n        size_t m_idx = 0;\n    public:\n        FixedValuesGenerator( std::initializer_list<T> values ) : m_values( values ) {}\n\n        T const& get() const override {\n            return m_values[m_idx];\n        }\n        bool next() override {\n            ++m_idx;\n            return m_idx < m_values.size();\n        }\n    };\n\n    template <typename T>\n    class GeneratorWrapper final {\n        std::unique_ptr<IGenerator<T>> m_generator;\n    public:\n        GeneratorWrapper(std::unique_ptr<IGenerator<T>> generator):\n            m_generator(std::move(generator))\n        {}\n        T const& get() const {\n            return m_generator->get();\n        }\n        bool next() {\n            return m_generator->next();\n        }\n    };\n\n    template <typename T>\n    GeneratorWrapper<T> value(T&& value) {\n        return GeneratorWrapper<T>(pf::make_unique<SingleValueGenerator<T>>(std::forward<T>(value)));\n    }\n    template <typename T>\n    GeneratorWrapper<T> values(std::initializer_list<T> values) {\n        return GeneratorWrapper<T>(pf::make_unique<FixedValuesGenerator<T>>(values));\n    }\n\n    template<typename T>\n    class Generators : public IGenerator<T> {\n        std::vector<GeneratorWrapper<T>> m_generators;\n        size_t m_current = 0;\n\n        void populate(GeneratorWrapper<T>&& generator) {\n            m_generators.emplace_back(std::move(generator));\n        }\n        void populate(T&& val) {\n            m_generators.emplace_back(value(std::forward<T>(val)));\n        }\n        template<typename U>\n        void populate(U&& val) {\n            populate(T(std::forward<U>(val)));\n        }\n        template<typename U, typename... Gs>\n        void populate(U&& valueOrGenerator, Gs &&... moreGenerators) {\n            populate(std::forward<U>(valueOrGenerator));\n            populate(std::forward<Gs>(moreGenerators)...);\n        }\n\n    public:\n        template <typename... Gs>\n        Generators(Gs &&... moreGenerators) {\n            m_generators.reserve(sizeof...(Gs));\n            populate(std::forward<Gs>(moreGenerators)...);\n        }\n\n        T const& get() const override {\n            return m_generators[m_current].get();\n        }\n\n        bool next() override {\n            if (m_current >= m_generators.size()) {\n                return false;\n            }\n            const bool current_status = m_generators[m_current].next();\n            if (!current_status) {\n                ++m_current;\n            }\n            return m_current < m_generators.size();\n        }\n    };\n\n    template<typename... Ts>\n    GeneratorWrapper<std::tuple<Ts...>> table( std::initializer_list<std::tuple<typename std::decay<Ts>::type...>> tuples ) {\n        return values<std::tuple<Ts...>>( tuples );\n    }\n\n    // Tag type to signal that a generator sequence should convert arguments to a specific type\n    template <typename T>\n    struct as {};\n\n    template<typename T, typename... Gs>\n    auto makeGenerators( GeneratorWrapper<T>&& generator, Gs &&... moreGenerators ) -> Generators<T> {\n        return Generators<T>(std::move(generator), std::forward<Gs>(moreGenerators)...);\n    }\n    template<typename T>\n    auto makeGenerators( GeneratorWrapper<T>&& generator ) -> Generators<T> {\n        return Generators<T>(std::move(generator));\n    }\n    template<typename T, typename... Gs>\n    auto makeGenerators( T&& val, Gs &&... moreGenerators ) -> Generators<T> {\n        return makeGenerators( value( std::forward<T>( val ) ), std::forward<Gs>( moreGenerators )... );\n    }\n    template<typename T, typename U, typename... Gs>\n    auto makeGenerators( as<T>, U&& val, Gs &&... moreGenerators ) -> Generators<T> {\n        return makeGenerators( value( T( std::forward<U>( val ) ) ), std::forward<Gs>( moreGenerators )... );\n    }\n\n    auto acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker&;\n\n    template<typename L>\n    // Note: The type after -> is weird, because VS2015 cannot parse\n    //       the expression used in the typedef inside, when it is in\n    //       return type. Yeah.\n    auto generate( StringRef generatorName, SourceLineInfo const& lineInfo, L const& generatorExpression ) -> decltype(std::declval<decltype(generatorExpression())>().get()) {\n        using UnderlyingType = typename decltype(generatorExpression())::type;\n\n        IGeneratorTracker& tracker = acquireGeneratorTracker( generatorName, lineInfo );\n        if (!tracker.hasGenerator()) {\n            tracker.setGenerator(pf::make_unique<Generators<UnderlyingType>>(generatorExpression()));\n        }\n\n        auto const& generator = static_cast<IGenerator<UnderlyingType> const&>( *tracker.getGenerator() );\n        return generator.get();\n    }\n\n} // namespace Generators\n} // namespace Catch\n\n#define GENERATE( ... ) \\\n    Catch::Generators::generate( INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_UNIQUE_NAME(generator)), \\\n                                 CATCH_INTERNAL_LINEINFO, \\\n                                 [ ]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } ) //NOLINT(google-build-using-namespace)\n#define GENERATE_COPY( ... ) \\\n    Catch::Generators::generate( INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_UNIQUE_NAME(generator)), \\\n                                 CATCH_INTERNAL_LINEINFO, \\\n                                 [=]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } ) //NOLINT(google-build-using-namespace)\n#define GENERATE_REF( ... ) \\\n    Catch::Generators::generate( INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_UNIQUE_NAME(generator)), \\\n                                 CATCH_INTERNAL_LINEINFO, \\\n                                 [&]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } ) //NOLINT(google-build-using-namespace)\n\n// end catch_generators.hpp\n// start catch_generators_generic.hpp\n\nnamespace Catch {\nnamespace Generators {\n\n    template <typename T>\n    class TakeGenerator : public IGenerator<T> {\n        GeneratorWrapper<T> m_generator;\n        size_t m_returned = 0;\n        size_t m_target;\n    public:\n        TakeGenerator(size_t target, GeneratorWrapper<T>&& generator):\n            m_generator(std::move(generator)),\n            m_target(target)\n        {\n            assert(target != 0 && \"Empty generators are not allowed\");\n        }\n        T const& get() const override {\n            return m_generator.get();\n        }\n        bool next() override {\n            ++m_returned;\n            if (m_returned >= m_target) {\n                return false;\n            }\n\n            const auto success = m_generator.next();\n            // If the underlying generator does not contain enough values\n            // then we cut short as well\n            if (!success) {\n                m_returned = m_target;\n            }\n            return success;\n        }\n    };\n\n    template <typename T>\n    GeneratorWrapper<T> take(size_t target, GeneratorWrapper<T>&& generator) {\n        return GeneratorWrapper<T>(pf::make_unique<TakeGenerator<T>>(target, std::move(generator)));\n    }\n\n    template <typename T, typename Predicate>\n    class FilterGenerator : public IGenerator<T> {\n        GeneratorWrapper<T> m_generator;\n        Predicate m_predicate;\n    public:\n        template <typename P = Predicate>\n        FilterGenerator(P&& pred, GeneratorWrapper<T>&& generator):\n            m_generator(std::move(generator)),\n            m_predicate(std::forward<P>(pred))\n        {\n            if (!m_predicate(m_generator.get())) {\n                // It might happen that there are no values that pass the\n                // filter. In that case we throw an exception.\n                auto has_initial_value = nextImpl();\n                if (!has_initial_value) {\n                    Catch::throw_exception(GeneratorException(\"No valid value found in filtered generator\"));\n                }\n            }\n        }\n\n        T const& get() const override {\n            return m_generator.get();\n        }\n\n        bool next() override {\n            return nextImpl();\n        }\n\n    private:\n        bool nextImpl() {\n            bool success = m_generator.next();\n            if (!success) {\n                return false;\n            }\n            while (!m_predicate(m_generator.get()) && (success = m_generator.next()) == true);\n            return success;\n        }\n    };\n\n    template <typename T, typename Predicate>\n    GeneratorWrapper<T> filter(Predicate&& pred, GeneratorWrapper<T>&& generator) {\n        return GeneratorWrapper<T>(std::unique_ptr<IGenerator<T>>(pf::make_unique<FilterGenerator<T, Predicate>>(std::forward<Predicate>(pred), std::move(generator))));\n    }\n\n    template <typename T>\n    class RepeatGenerator : public IGenerator<T> {\n        static_assert(!std::is_same<T, bool>::value,\n            \"RepeatGenerator currently does not support bools\"\n            \"because of std::vector<bool> specialization\");\n        GeneratorWrapper<T> m_generator;\n        mutable std::vector<T> m_returned;\n        size_t m_target_repeats;\n        size_t m_current_repeat = 0;\n        size_t m_repeat_index = 0;\n    public:\n        RepeatGenerator(size_t repeats, GeneratorWrapper<T>&& generator):\n            m_generator(std::move(generator)),\n            m_target_repeats(repeats)\n        {\n            assert(m_target_repeats > 0 && \"Repeat generator must repeat at least once\");\n        }\n\n        T const& get() const override {\n            if (m_current_repeat == 0) {\n                m_returned.push_back(m_generator.get());\n                return m_returned.back();\n            }\n            return m_returned[m_repeat_index];\n        }\n\n        bool next() override {\n            // There are 2 basic cases:\n            // 1) We are still reading the generator\n            // 2) We are reading our own cache\n\n            // In the first case, we need to poke the underlying generator.\n            // If it happily moves, we are left in that state, otherwise it is time to start reading from our cache\n            if (m_current_repeat == 0) {\n                const auto success = m_generator.next();\n                if (!success) {\n                    ++m_current_repeat;\n                }\n                return m_current_repeat < m_target_repeats;\n            }\n\n            // In the second case, we need to move indices forward and check that we haven't run up against the end\n            ++m_repeat_index;\n            if (m_repeat_index == m_returned.size()) {\n                m_repeat_index = 0;\n                ++m_current_repeat;\n            }\n            return m_current_repeat < m_target_repeats;\n        }\n    };\n\n    template <typename T>\n    GeneratorWrapper<T> repeat(size_t repeats, GeneratorWrapper<T>&& generator) {\n        return GeneratorWrapper<T>(pf::make_unique<RepeatGenerator<T>>(repeats, std::move(generator)));\n    }\n\n    template <typename T, typename U, typename Func>\n    class MapGenerator : public IGenerator<T> {\n        // TBD: provide static assert for mapping function, for friendly error message\n        GeneratorWrapper<U> m_generator;\n        Func m_function;\n        // To avoid returning dangling reference, we have to save the values\n        T m_cache;\n    public:\n        template <typename F2 = Func>\n        MapGenerator(F2&& function, GeneratorWrapper<U>&& generator) :\n            m_generator(std::move(generator)),\n            m_function(std::forward<F2>(function)),\n            m_cache(m_function(m_generator.get()))\n        {}\n\n        T const& get() const override {\n            return m_cache;\n        }\n        bool next() override {\n            const auto success = m_generator.next();\n            if (success) {\n                m_cache = m_function(m_generator.get());\n            }\n            return success;\n        }\n    };\n\n    template <typename Func, typename U, typename T = FunctionReturnType<Func, U>>\n    GeneratorWrapper<T> map(Func&& function, GeneratorWrapper<U>&& generator) {\n        return GeneratorWrapper<T>(\n            pf::make_unique<MapGenerator<T, U, Func>>(std::forward<Func>(function), std::move(generator))\n        );\n    }\n\n    template <typename T, typename U, typename Func>\n    GeneratorWrapper<T> map(Func&& function, GeneratorWrapper<U>&& generator) {\n        return GeneratorWrapper<T>(\n            pf::make_unique<MapGenerator<T, U, Func>>(std::forward<Func>(function), std::move(generator))\n        );\n    }\n\n    template <typename T>\n    class ChunkGenerator final : public IGenerator<std::vector<T>> {\n        std::vector<T> m_chunk;\n        size_t m_chunk_size;\n        GeneratorWrapper<T> m_generator;\n        bool m_used_up = false;\n    public:\n        ChunkGenerator(size_t size, GeneratorWrapper<T> generator) :\n            m_chunk_size(size), m_generator(std::move(generator))\n        {\n            m_chunk.reserve(m_chunk_size);\n            if (m_chunk_size != 0) {\n                m_chunk.push_back(m_generator.get());\n                for (size_t i = 1; i < m_chunk_size; ++i) {\n                    if (!m_generator.next()) {\n                        Catch::throw_exception(GeneratorException(\"Not enough values to initialize the first chunk\"));\n                    }\n                    m_chunk.push_back(m_generator.get());\n                }\n            }\n        }\n        std::vector<T> const& get() const override {\n            return m_chunk;\n        }\n        bool next() override {\n            m_chunk.clear();\n            for (size_t idx = 0; idx < m_chunk_size; ++idx) {\n                if (!m_generator.next()) {\n                    return false;\n                }\n                m_chunk.push_back(m_generator.get());\n            }\n            return true;\n        }\n    };\n\n    template <typename T>\n    GeneratorWrapper<std::vector<T>> chunk(size_t size, GeneratorWrapper<T>&& generator) {\n        return GeneratorWrapper<std::vector<T>>(\n            pf::make_unique<ChunkGenerator<T>>(size, std::move(generator))\n        );\n    }\n\n} // namespace Generators\n} // namespace Catch\n\n// end catch_generators_generic.hpp\n// start catch_generators_specific.hpp\n\n// start catch_context.h\n\n#include <memory>\n\nnamespace Catch {\n\n    struct IResultCapture;\n    struct IRunner;\n    struct IConfig;\n    struct IMutableContext;\n\n    using IConfigPtr = std::shared_ptr<IConfig const>;\n\n    struct IContext\n    {\n        virtual ~IContext();\n\n        virtual IResultCapture* getResultCapture() = 0;\n        virtual IRunner* getRunner() = 0;\n        virtual IConfigPtr const& getConfig() const = 0;\n    };\n\n    struct IMutableContext : IContext\n    {\n        virtual ~IMutableContext();\n        virtual void setResultCapture( IResultCapture* resultCapture ) = 0;\n        virtual void setRunner( IRunner* runner ) = 0;\n        virtual void setConfig( IConfigPtr const& config ) = 0;\n\n    private:\n        static IMutableContext *currentContext;\n        friend IMutableContext& getCurrentMutableContext();\n        friend void cleanUpContext();\n        static void createContext();\n    };\n\n    inline IMutableContext& getCurrentMutableContext()\n    {\n        if( !IMutableContext::currentContext )\n            IMutableContext::createContext();\n        // NOLINTNEXTLINE(clang-analyzer-core.uninitialized.UndefReturn)\n        return *IMutableContext::currentContext;\n    }\n\n    inline IContext& getCurrentContext()\n    {\n        return getCurrentMutableContext();\n    }\n\n    void cleanUpContext();\n\n    class SimplePcg32;\n    SimplePcg32& rng();\n}\n\n// end catch_context.h\n// start catch_interfaces_config.h\n\n// start catch_option.hpp\n\nnamespace Catch {\n\n    // An optional type\n    template<typename T>\n    class Option {\n    public:\n        Option() : nullableValue( nullptr ) {}\n        Option( T const& _value )\n        : nullableValue( new( storage ) T( _value ) )\n        {}\n        Option( Option const& _other )\n        : nullableValue( _other ? new( storage ) T( *_other ) : nullptr )\n        {}\n\n        ~Option() {\n            reset();\n        }\n\n        Option& operator= ( Option const& _other ) {\n            if( &_other != this ) {\n                reset();\n                if( _other )\n                    nullableValue = new( storage ) T( *_other );\n            }\n            return *this;\n        }\n        Option& operator = ( T const& _value ) {\n            reset();\n            nullableValue = new( storage ) T( _value );\n            return *this;\n        }\n\n        void reset() {\n            if( nullableValue )\n                nullableValue->~T();\n            nullableValue = nullptr;\n        }\n\n        T& operator*() { return *nullableValue; }\n        T const& operator*() const { return *nullableValue; }\n        T* operator->() { return nullableValue; }\n        const T* operator->() const { return nullableValue; }\n\n        T valueOr( T const& defaultValue ) const {\n            return nullableValue ? *nullableValue : defaultValue;\n        }\n\n        bool some() const { return nullableValue != nullptr; }\n        bool none() const { return nullableValue == nullptr; }\n\n        bool operator !() const { return nullableValue == nullptr; }\n        explicit operator bool() const {\n            return some();\n        }\n\n    private:\n        T *nullableValue;\n        alignas(alignof(T)) char storage[sizeof(T)];\n    };\n\n} // end namespace Catch\n\n// end catch_option.hpp\n#include <chrono>\n#include <iosfwd>\n#include <string>\n#include <vector>\n#include <memory>\n\nnamespace Catch {\n\n    enum class Verbosity {\n        Quiet = 0,\n        Normal,\n        High\n    };\n\n    struct WarnAbout { enum What {\n        Nothing = 0x00,\n        NoAssertions = 0x01,\n        NoTests = 0x02\n    }; };\n\n    struct ShowDurations { enum OrNot {\n        DefaultForReporter,\n        Always,\n        Never\n    }; };\n    struct RunTests { enum InWhatOrder {\n        InDeclarationOrder,\n        InLexicographicalOrder,\n        InRandomOrder\n    }; };\n    struct UseColour { enum YesOrNo {\n        Auto,\n        Yes,\n        No\n    }; };\n    struct WaitForKeypress { enum When {\n        Never,\n        BeforeStart = 1,\n        BeforeExit = 2,\n        BeforeStartAndExit = BeforeStart | BeforeExit\n    }; };\n\n    class TestSpec;\n\n    struct IConfig : NonCopyable {\n\n        virtual ~IConfig();\n\n        virtual bool allowThrows() const = 0;\n        virtual std::ostream& stream() const = 0;\n        virtual std::string name() const = 0;\n        virtual bool includeSuccessfulResults() const = 0;\n        virtual bool shouldDebugBreak() const = 0;\n        virtual bool warnAboutMissingAssertions() const = 0;\n        virtual bool warnAboutNoTests() const = 0;\n        virtual int abortAfter() const = 0;\n        virtual bool showInvisibles() const = 0;\n        virtual ShowDurations::OrNot showDurations() const = 0;\n        virtual double minDuration() const = 0;\n        virtual TestSpec const& testSpec() const = 0;\n        virtual bool hasTestFilters() const = 0;\n        virtual std::vector<std::string> const& getTestsOrTags() const = 0;\n        virtual RunTests::InWhatOrder runOrder() const = 0;\n        virtual unsigned int rngSeed() const = 0;\n        virtual UseColour::YesOrNo useColour() const = 0;\n        virtual std::vector<std::string> const& getSectionsToRun() const = 0;\n        virtual Verbosity verbosity() const = 0;\n\n        virtual bool benchmarkNoAnalysis() const = 0;\n        virtual int benchmarkSamples() const = 0;\n        virtual double benchmarkConfidenceInterval() const = 0;\n        virtual unsigned int benchmarkResamples() const = 0;\n        virtual std::chrono::milliseconds benchmarkWarmupTime() const = 0;\n    };\n\n    using IConfigPtr = std::shared_ptr<IConfig const>;\n}\n\n// end catch_interfaces_config.h\n// start catch_random_number_generator.h\n\n#include <cstdint>\n\nnamespace Catch {\n\n    // This is a simple implementation of C++11 Uniform Random Number\n    // Generator. It does not provide all operators, because Catch2\n    // does not use it, but it should behave as expected inside stdlib's\n    // distributions.\n    // The implementation is based on the PCG family (http://pcg-random.org)\n    class SimplePcg32 {\n        using state_type = std::uint64_t;\n    public:\n        using result_type = std::uint32_t;\n        static constexpr result_type (min)() {\n            return 0;\n        }\n        static constexpr result_type (max)() {\n            return static_cast<result_type>(-1);\n        }\n\n        // Provide some default initial state for the default constructor\n        SimplePcg32():SimplePcg32(0xed743cc4U) {}\n\n        explicit SimplePcg32(result_type seed_);\n\n        void seed(result_type seed_);\n        void discard(uint64_t skip);\n\n        result_type operator()();\n\n    private:\n        friend bool operator==(SimplePcg32 const& lhs, SimplePcg32 const& rhs);\n        friend bool operator!=(SimplePcg32 const& lhs, SimplePcg32 const& rhs);\n\n        // In theory we also need operator<< and operator>>\n        // In practice we do not use them, so we will skip them for now\n\n        std::uint64_t m_state;\n        // This part of the state determines which \"stream\" of the numbers\n        // is chosen -- we take it as a constant for Catch2, so we only\n        // need to deal with seeding the main state.\n        // Picked by reading 8 bytes from `/dev/random` :-)\n        static const std::uint64_t s_inc = (0x13ed0cc53f939476ULL << 1ULL) | 1ULL;\n    };\n\n} // end namespace Catch\n\n// end catch_random_number_generator.h\n#include <random>\n\nnamespace Catch {\nnamespace Generators {\n\ntemplate <typename Float>\nclass RandomFloatingGenerator final : public IGenerator<Float> {\n    Catch::SimplePcg32& m_rng;\n    std::uniform_real_distribution<Float> m_dist;\n    Float m_current_number;\npublic:\n\n    RandomFloatingGenerator(Float a, Float b):\n        m_rng(rng()),\n        m_dist(a, b) {\n        static_cast<void>(next());\n    }\n\n    Float const& get() const override {\n        return m_current_number;\n    }\n    bool next() override {\n        m_current_number = m_dist(m_rng);\n        return true;\n    }\n};\n\ntemplate <typename Integer>\nclass RandomIntegerGenerator final : public IGenerator<Integer> {\n    Catch::SimplePcg32& m_rng;\n    std::uniform_int_distribution<Integer> m_dist;\n    Integer m_current_number;\npublic:\n\n    RandomIntegerGenerator(Integer a, Integer b):\n        m_rng(rng()),\n        m_dist(a, b) {\n        static_cast<void>(next());\n    }\n\n    Integer const& get() const override {\n        return m_current_number;\n    }\n    bool next() override {\n        m_current_number = m_dist(m_rng);\n        return true;\n    }\n};\n\n// TODO: Ideally this would be also constrained against the various char types,\n//       but I don't expect users to run into that in practice.\ntemplate <typename T>\ntypename std::enable_if<std::is_integral<T>::value && !std::is_same<T, bool>::value,\nGeneratorWrapper<T>>::type\nrandom(T a, T b) {\n    return GeneratorWrapper<T>(\n        pf::make_unique<RandomIntegerGenerator<T>>(a, b)\n    );\n}\n\ntemplate <typename T>\ntypename std::enable_if<std::is_floating_point<T>::value,\nGeneratorWrapper<T>>::type\nrandom(T a, T b) {\n    return GeneratorWrapper<T>(\n        pf::make_unique<RandomFloatingGenerator<T>>(a, b)\n    );\n}\n\ntemplate <typename T>\nclass RangeGenerator final : public IGenerator<T> {\n    T m_current;\n    T m_end;\n    T m_step;\n    bool m_positive;\n\npublic:\n    RangeGenerator(T const& start, T const& end, T const& step):\n        m_current(start),\n        m_end(end),\n        m_step(step),\n        m_positive(m_step > T(0))\n    {\n        assert(m_current != m_end && \"Range start and end cannot be equal\");\n        assert(m_step != T(0) && \"Step size cannot be zero\");\n        assert(((m_positive && m_current <= m_end) || (!m_positive && m_current >= m_end)) && \"Step moves away from end\");\n    }\n\n    RangeGenerator(T const& start, T const& end):\n        RangeGenerator(start, end, (start < end) ? T(1) : T(-1))\n    {}\n\n    T const& get() const override {\n        return m_current;\n    }\n\n    bool next() override {\n        m_current += m_step;\n        return (m_positive) ? (m_current < m_end) : (m_current > m_end);\n    }\n};\n\ntemplate <typename T>\nGeneratorWrapper<T> range(T const& start, T const& end, T const& step) {\n    static_assert(std::is_arithmetic<T>::value && !std::is_same<T, bool>::value, \"Type must be numeric\");\n    return GeneratorWrapper<T>(pf::make_unique<RangeGenerator<T>>(start, end, step));\n}\n\ntemplate <typename T>\nGeneratorWrapper<T> range(T const& start, T const& end) {\n    static_assert(std::is_integral<T>::value && !std::is_same<T, bool>::value, \"Type must be an integer\");\n    return GeneratorWrapper<T>(pf::make_unique<RangeGenerator<T>>(start, end));\n}\n\ntemplate <typename T>\nclass IteratorGenerator final : public IGenerator<T> {\n    static_assert(!std::is_same<T, bool>::value,\n        \"IteratorGenerator currently does not support bools\"\n        \"because of std::vector<bool> specialization\");\n\n    std::vector<T> m_elems;\n    size_t m_current = 0;\npublic:\n    template <typename InputIterator, typename InputSentinel>\n    IteratorGenerator(InputIterator first, InputSentinel last):m_elems(first, last) {\n        if (m_elems.empty()) {\n            Catch::throw_exception(GeneratorException(\"IteratorGenerator received no valid values\"));\n        }\n    }\n\n    T const& get() const override {\n        return m_elems[m_current];\n    }\n\n    bool next() override {\n        ++m_current;\n        return m_current != m_elems.size();\n    }\n};\n\ntemplate <typename InputIterator,\n          typename InputSentinel,\n          typename ResultType = typename std::iterator_traits<InputIterator>::value_type>\nGeneratorWrapper<ResultType> from_range(InputIterator from, InputSentinel to) {\n    return GeneratorWrapper<ResultType>(pf::make_unique<IteratorGenerator<ResultType>>(from, to));\n}\n\ntemplate <typename Container,\n          typename ResultType = typename Container::value_type>\nGeneratorWrapper<ResultType> from_range(Container const& cnt) {\n    return GeneratorWrapper<ResultType>(pf::make_unique<IteratorGenerator<ResultType>>(cnt.begin(), cnt.end()));\n}\n\n} // namespace Generators\n} // namespace Catch\n\n// end catch_generators_specific.hpp\n\n// These files are included here so the single_include script doesn't put them\n// in the conditionally compiled sections\n// start catch_test_case_info.h\n\n#include <string>\n#include <vector>\n#include <memory>\n\n#ifdef __clang__\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wpadded\"\n#endif\n\nnamespace Catch {\n\n    struct ITestInvoker;\n\n    struct TestCaseInfo {\n        enum SpecialProperties{\n            None = 0,\n            IsHidden = 1 << 1,\n            ShouldFail = 1 << 2,\n            MayFail = 1 << 3,\n            Throws = 1 << 4,\n            NonPortable = 1 << 5,\n            Benchmark = 1 << 6\n        };\n\n        TestCaseInfo(   std::string const& _name,\n                        std::string const& _className,\n                        std::string const& _description,\n                        std::vector<std::string> const& _tags,\n                        SourceLineInfo const& _lineInfo );\n\n        friend void setTags( TestCaseInfo& testCaseInfo, std::vector<std::string> tags );\n\n        bool isHidden() const;\n        bool throws() const;\n        bool okToFail() const;\n        bool expectedToFail() const;\n\n        std::string tagsAsString() const;\n\n        std::string name;\n        std::string className;\n        std::string description;\n        std::vector<std::string> tags;\n        std::vector<std::string> lcaseTags;\n        SourceLineInfo lineInfo;\n        SpecialProperties properties;\n    };\n\n    class TestCase : public TestCaseInfo {\n    public:\n\n        TestCase( ITestInvoker* testCase, TestCaseInfo&& info );\n\n        TestCase withName( std::string const& _newName ) const;\n\n        void invoke() const;\n\n        TestCaseInfo const& getTestCaseInfo() const;\n\n        bool operator == ( TestCase const& other ) const;\n        bool operator < ( TestCase const& other ) const;\n\n    private:\n        std::shared_ptr<ITestInvoker> test;\n    };\n\n    TestCase makeTestCase(  ITestInvoker* testCase,\n                            std::string const& className,\n                            NameAndTags const& nameAndTags,\n                            SourceLineInfo const& lineInfo );\n}\n\n#ifdef __clang__\n#pragma clang diagnostic pop\n#endif\n\n// end catch_test_case_info.h\n// start catch_interfaces_runner.h\n\nnamespace Catch {\n\n    struct IRunner {\n        virtual ~IRunner();\n        virtual bool aborting() const = 0;\n    };\n}\n\n// end catch_interfaces_runner.h\n\n#ifdef __OBJC__\n// start catch_objc.hpp\n\n#import <objc/runtime.h>\n\n#include <string>\n\n// NB. Any general catch headers included here must be included\n// in catch.hpp first to make sure they are included by the single\n// header for non obj-usage\n\n///////////////////////////////////////////////////////////////////////////////\n// This protocol is really only here for (self) documenting purposes, since\n// all its methods are optional.\n@protocol OcFixture\n\n@optional\n\n-(void) setUp;\n-(void) tearDown;\n\n@end\n\nnamespace Catch {\n\n    class OcMethod : public ITestInvoker {\n\n    public:\n        OcMethod( Class cls, SEL sel ) : m_cls( cls ), m_sel( sel ) {}\n\n        virtual void invoke() const {\n            id obj = [[m_cls alloc] init];\n\n            performOptionalSelector( obj, @selector(setUp)  );\n            performOptionalSelector( obj, m_sel );\n            performOptionalSelector( obj, @selector(tearDown)  );\n\n            arcSafeRelease( obj );\n        }\n    private:\n        virtual ~OcMethod() {}\n\n        Class m_cls;\n        SEL m_sel;\n    };\n\n    namespace Detail{\n\n        inline std::string getAnnotation(   Class cls,\n                                            std::string const& annotationName,\n                                            std::string const& testCaseName ) {\n            NSString* selStr = [[NSString alloc] initWithFormat:@\"Catch_%s_%s\", annotationName.c_str(), testCaseName.c_str()];\n            SEL sel = NSSelectorFromString( selStr );\n            arcSafeRelease( selStr );\n            id value = performOptionalSelector( cls, sel );\n            if( value )\n                return [(NSString*)value UTF8String];\n            return \"\";\n        }\n    }\n\n    inline std::size_t registerTestMethods() {\n        std::size_t noTestMethods = 0;\n        int noClasses = objc_getClassList( nullptr, 0 );\n\n        Class* classes = (CATCH_UNSAFE_UNRETAINED Class *)malloc( sizeof(Class) * noClasses);\n        objc_getClassList( classes, noClasses );\n\n        for( int c = 0; c < noClasses; c++ ) {\n            Class cls = classes[c];\n            {\n                u_int count;\n                Method* methods = class_copyMethodList( cls, &count );\n                for( u_int m = 0; m < count ; m++ ) {\n                    SEL selector = method_getName(methods[m]);\n                    std::string methodName = sel_getName(selector);\n                    if( startsWith( methodName, \"Catch_TestCase_\" ) ) {\n                        std::string testCaseName = methodName.substr( 15 );\n                        std::string name = Detail::getAnnotation( cls, \"Name\", testCaseName );\n                        std::string desc = Detail::getAnnotation( cls, \"Description\", testCaseName );\n                        const char* className = class_getName( cls );\n\n                        getMutableRegistryHub().registerTest( makeTestCase( new OcMethod( cls, selector ), className, NameAndTags( name.c_str(), desc.c_str() ), SourceLineInfo(\"\",0) ) );\n                        noTestMethods++;\n                    }\n                }\n                free(methods);\n            }\n        }\n        return noTestMethods;\n    }\n\n#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)\n\n    namespace Matchers {\n        namespace Impl {\n        namespace NSStringMatchers {\n\n            struct StringHolder : MatcherBase<NSString*>{\n                StringHolder( NSString* substr ) : m_substr( [substr copy] ){}\n                StringHolder( StringHolder const& other ) : m_substr( [other.m_substr copy] ){}\n                StringHolder() {\n                    arcSafeRelease( m_substr );\n                }\n\n                bool match( NSString* str ) const override {\n                    return false;\n                }\n\n                NSString* CATCH_ARC_STRONG m_substr;\n            };\n\n            struct Equals : StringHolder {\n                Equals( NSString* substr ) : StringHolder( substr ){}\n\n                bool match( NSString* str ) const override {\n                    return  (str != nil || m_substr == nil ) &&\n                            [str isEqualToString:m_substr];\n                }\n\n                std::string describe() const override {\n                    return \"equals string: \" + Catch::Detail::stringify( m_substr );\n                }\n            };\n\n            struct Contains : StringHolder {\n                Contains( NSString* substr ) : StringHolder( substr ){}\n\n                bool match( NSString* str ) const override {\n                    return  (str != nil || m_substr == nil ) &&\n                            [str rangeOfString:m_substr].location != NSNotFound;\n                }\n\n                std::string describe() const override {\n                    return \"contains string: \" + Catch::Detail::stringify( m_substr );\n                }\n            };\n\n            struct StartsWith : StringHolder {\n                StartsWith( NSString* substr ) : StringHolder( substr ){}\n\n                bool match( NSString* str ) const override {\n                    return  (str != nil || m_substr == nil ) &&\n                            [str rangeOfString:m_substr].location == 0;\n                }\n\n                std::string describe() const override {\n                    return \"starts with: \" + Catch::Detail::stringify( m_substr );\n                }\n            };\n            struct EndsWith : StringHolder {\n                EndsWith( NSString* substr ) : StringHolder( substr ){}\n\n                bool match( NSString* str ) const override {\n                    return  (str != nil || m_substr == nil ) &&\n                            [str rangeOfString:m_substr].location == [str length] - [m_substr length];\n                }\n\n                std::string describe() const override {\n                    return \"ends with: \" + Catch::Detail::stringify( m_substr );\n                }\n            };\n\n        } // namespace NSStringMatchers\n        } // namespace Impl\n\n        inline Impl::NSStringMatchers::Equals\n            Equals( NSString* substr ){ return Impl::NSStringMatchers::Equals( substr ); }\n\n        inline Impl::NSStringMatchers::Contains\n            Contains( NSString* substr ){ return Impl::NSStringMatchers::Contains( substr ); }\n\n        inline Impl::NSStringMatchers::StartsWith\n            StartsWith( NSString* substr ){ return Impl::NSStringMatchers::StartsWith( substr ); }\n\n        inline Impl::NSStringMatchers::EndsWith\n            EndsWith( NSString* substr ){ return Impl::NSStringMatchers::EndsWith( substr ); }\n\n    } // namespace Matchers\n\n    using namespace Matchers;\n\n#endif // CATCH_CONFIG_DISABLE_MATCHERS\n\n} // namespace Catch\n\n///////////////////////////////////////////////////////////////////////////////\n#define OC_MAKE_UNIQUE_NAME( root, uniqueSuffix ) root##uniqueSuffix\n#define OC_TEST_CASE2( name, desc, uniqueSuffix ) \\\n+(NSString*) OC_MAKE_UNIQUE_NAME( Catch_Name_test_, uniqueSuffix ) \\\n{ \\\nreturn @ name; \\\n} \\\n+(NSString*) OC_MAKE_UNIQUE_NAME( Catch_Description_test_, uniqueSuffix ) \\\n{ \\\nreturn @ desc; \\\n} \\\n-(void) OC_MAKE_UNIQUE_NAME( Catch_TestCase_test_, uniqueSuffix )\n\n#define OC_TEST_CASE( name, desc ) OC_TEST_CASE2( name, desc, __LINE__ )\n\n// end catch_objc.hpp\n#endif\n\n// Benchmarking needs the externally-facing parts of reporters to work\n#if defined(CATCH_CONFIG_EXTERNAL_INTERFACES) || defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n// start catch_external_interfaces.h\n\n// start catch_reporter_bases.hpp\n\n// start catch_interfaces_reporter.h\n\n// start catch_config.hpp\n\n// start catch_test_spec_parser.h\n\n#ifdef __clang__\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wpadded\"\n#endif\n\n// start catch_test_spec.h\n\n#ifdef __clang__\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wpadded\"\n#endif\n\n// start catch_wildcard_pattern.h\n\nnamespace Catch\n{\n    class WildcardPattern {\n        enum WildcardPosition {\n            NoWildcard = 0,\n            WildcardAtStart = 1,\n            WildcardAtEnd = 2,\n            WildcardAtBothEnds = WildcardAtStart | WildcardAtEnd\n        };\n\n    public:\n\n        WildcardPattern( std::string const& pattern, CaseSensitive::Choice caseSensitivity );\n        virtual ~WildcardPattern() = default;\n        virtual bool matches( std::string const& str ) const;\n\n    private:\n        std::string normaliseString( std::string const& str ) const;\n        CaseSensitive::Choice m_caseSensitivity;\n        WildcardPosition m_wildcard = NoWildcard;\n        std::string m_pattern;\n    };\n}\n\n// end catch_wildcard_pattern.h\n#include <string>\n#include <vector>\n#include <memory>\n\nnamespace Catch {\n\n    struct IConfig;\n\n    class TestSpec {\n        class Pattern {\n        public:\n            explicit Pattern( std::string const& name );\n            virtual ~Pattern();\n            virtual bool matches( TestCaseInfo const& testCase ) const = 0;\n            std::string const& name() const;\n        private:\n            std::string const m_name;\n        };\n        using PatternPtr = std::shared_ptr<Pattern>;\n\n        class NamePattern : public Pattern {\n        public:\n            explicit NamePattern( std::string const& name, std::string const& filterString );\n            bool matches( TestCaseInfo const& testCase ) const override;\n        private:\n            WildcardPattern m_wildcardPattern;\n        };\n\n        class TagPattern : public Pattern {\n        public:\n            explicit TagPattern( std::string const& tag, std::string const& filterString );\n            bool matches( TestCaseInfo const& testCase ) const override;\n        private:\n            std::string m_tag;\n        };\n\n        class ExcludedPattern : public Pattern {\n        public:\n            explicit ExcludedPattern( PatternPtr const& underlyingPattern );\n            bool matches( TestCaseInfo const& testCase ) const override;\n        private:\n            PatternPtr m_underlyingPattern;\n        };\n\n        struct Filter {\n            std::vector<PatternPtr> m_patterns;\n\n            bool matches( TestCaseInfo const& testCase ) const;\n            std::string name() const;\n        };\n\n    public:\n        struct FilterMatch {\n            std::string name;\n            std::vector<TestCase const*> tests;\n        };\n        using Matches = std::vector<FilterMatch>;\n        using vectorStrings = std::vector<std::string>;\n\n        bool hasFilters() const;\n        bool matches( TestCaseInfo const& testCase ) const;\n        Matches matchesByFilter( std::vector<TestCase> const& testCases, IConfig const& config ) const;\n        const vectorStrings & getInvalidArgs() const;\n\n    private:\n        std::vector<Filter> m_filters;\n        std::vector<std::string> m_invalidArgs;\n        friend class TestSpecParser;\n    };\n}\n\n#ifdef __clang__\n#pragma clang diagnostic pop\n#endif\n\n// end catch_test_spec.h\n// start catch_interfaces_tag_alias_registry.h\n\n#include <string>\n\nnamespace Catch {\n\n    struct TagAlias;\n\n    struct ITagAliasRegistry {\n        virtual ~ITagAliasRegistry();\n        // Nullptr if not present\n        virtual TagAlias const* find( std::string const& alias ) const = 0;\n        virtual std::string expandAliases( std::string const& unexpandedTestSpec ) const = 0;\n\n        static ITagAliasRegistry const& get();\n    };\n\n} // end namespace Catch\n\n// end catch_interfaces_tag_alias_registry.h\nnamespace Catch {\n\n    class TestSpecParser {\n        enum Mode{ None, Name, QuotedName, Tag, EscapedName };\n        Mode m_mode = None;\n        Mode lastMode = None;\n        bool m_exclusion = false;\n        std::size_t m_pos = 0;\n        std::size_t m_realPatternPos = 0;\n        std::string m_arg;\n        std::string m_substring;\n        std::string m_patternName;\n        std::vector<std::size_t> m_escapeChars;\n        TestSpec::Filter m_currentFilter;\n        TestSpec m_testSpec;\n        ITagAliasRegistry const* m_tagAliases = nullptr;\n\n    public:\n        TestSpecParser( ITagAliasRegistry const& tagAliases );\n\n        TestSpecParser& parse( std::string const& arg );\n        TestSpec testSpec();\n\n    private:\n        bool visitChar( char c );\n        void startNewMode( Mode mode );\n        bool processNoneChar( char c );\n        void processNameChar( char c );\n        bool processOtherChar( char c );\n        void endMode();\n        void escape();\n        bool isControlChar( char c ) const;\n        void saveLastMode();\n        void revertBackToLastMode();\n        void addFilter();\n        bool separate();\n\n        // Handles common preprocessing of the pattern for name/tag patterns\n        std::string preprocessPattern();\n        // Adds the current pattern as a test name\n        void addNamePattern();\n        // Adds the current pattern as a tag\n        void addTagPattern();\n\n        inline void addCharToPattern(char c) {\n            m_substring += c;\n            m_patternName += c;\n            m_realPatternPos++;\n        }\n\n    };\n    TestSpec parseTestSpec( std::string const& arg );\n\n} // namespace Catch\n\n#ifdef __clang__\n#pragma clang diagnostic pop\n#endif\n\n// end catch_test_spec_parser.h\n// Libstdc++ doesn't like incomplete classes for unique_ptr\n\n#include <memory>\n#include <vector>\n#include <string>\n\n#ifndef CATCH_CONFIG_CONSOLE_WIDTH\n#define CATCH_CONFIG_CONSOLE_WIDTH 80\n#endif\n\nnamespace Catch {\n\n    struct IStream;\n\n    struct ConfigData {\n        bool listTests = false;\n        bool listTags = false;\n        bool listReporters = false;\n        bool listTestNamesOnly = false;\n\n        bool showSuccessfulTests = false;\n        bool shouldDebugBreak = false;\n        bool noThrow = false;\n        bool showHelp = false;\n        bool showInvisibles = false;\n        bool filenamesAsTags = false;\n        bool libIdentify = false;\n\n        int abortAfter = -1;\n        unsigned int rngSeed = 0;\n\n        bool benchmarkNoAnalysis = false;\n        unsigned int benchmarkSamples = 100;\n        double benchmarkConfidenceInterval = 0.95;\n        unsigned int benchmarkResamples = 100000;\n        std::chrono::milliseconds::rep benchmarkWarmupTime = 100;\n\n        Verbosity verbosity = Verbosity::Normal;\n        WarnAbout::What warnings = WarnAbout::Nothing;\n        ShowDurations::OrNot showDurations = ShowDurations::DefaultForReporter;\n        double minDuration = -1;\n        RunTests::InWhatOrder runOrder = RunTests::InDeclarationOrder;\n        UseColour::YesOrNo useColour = UseColour::Auto;\n        WaitForKeypress::When waitForKeypress = WaitForKeypress::Never;\n\n        std::string outputFilename;\n        std::string name;\n        std::string processName;\n#ifndef CATCH_CONFIG_DEFAULT_REPORTER\n#define CATCH_CONFIG_DEFAULT_REPORTER \"console\"\n#endif\n        std::string reporterName = CATCH_CONFIG_DEFAULT_REPORTER;\n#undef CATCH_CONFIG_DEFAULT_REPORTER\n\n        std::vector<std::string> testsOrTags;\n        std::vector<std::string> sectionsToRun;\n    };\n\n    class Config : public IConfig {\n    public:\n\n        Config() = default;\n        Config( ConfigData const& data );\n        virtual ~Config() = default;\n\n        std::string const& getFilename() const;\n\n        bool listTests() const;\n        bool listTestNamesOnly() const;\n        bool listTags() const;\n        bool listReporters() const;\n\n        std::string getProcessName() const;\n        std::string const& getReporterName() const;\n\n        std::vector<std::string> const& getTestsOrTags() const override;\n        std::vector<std::string> const& getSectionsToRun() const override;\n\n        TestSpec const& testSpec() const override;\n        bool hasTestFilters() const override;\n\n        bool showHelp() const;\n\n        // IConfig interface\n        bool allowThrows() const override;\n        std::ostream& stream() const override;\n        std::string name() const override;\n        bool includeSuccessfulResults() const override;\n        bool warnAboutMissingAssertions() const override;\n        bool warnAboutNoTests() const override;\n        ShowDurations::OrNot showDurations() const override;\n        double minDuration() const override;\n        RunTests::InWhatOrder runOrder() const override;\n        unsigned int rngSeed() const override;\n        UseColour::YesOrNo useColour() const override;\n        bool shouldDebugBreak() const override;\n        int abortAfter() const override;\n        bool showInvisibles() const override;\n        Verbosity verbosity() const override;\n        bool benchmarkNoAnalysis() const override;\n        int benchmarkSamples() const override;\n        double benchmarkConfidenceInterval() const override;\n        unsigned int benchmarkResamples() const override;\n        std::chrono::milliseconds benchmarkWarmupTime() const override;\n\n    private:\n\n        IStream const* openStream();\n        ConfigData m_data;\n\n        std::unique_ptr<IStream const> m_stream;\n        TestSpec m_testSpec;\n        bool m_hasTestFilters = false;\n    };\n\n} // end namespace Catch\n\n// end catch_config.hpp\n// start catch_assertionresult.h\n\n#include <string>\n\nnamespace Catch {\n\n    struct AssertionResultData\n    {\n        AssertionResultData() = delete;\n\n        AssertionResultData( ResultWas::OfType _resultType, LazyExpression const& _lazyExpression );\n\n        std::string message;\n        mutable std::string reconstructedExpression;\n        LazyExpression lazyExpression;\n        ResultWas::OfType resultType;\n\n        std::string reconstructExpression() const;\n    };\n\n    class AssertionResult {\n    public:\n        AssertionResult() = delete;\n        AssertionResult( AssertionInfo const& info, AssertionResultData const& data );\n\n        bool isOk() const;\n        bool succeeded() const;\n        ResultWas::OfType getResultType() const;\n        bool hasExpression() const;\n        bool hasMessage() const;\n        std::string getExpression() const;\n        std::string getExpressionInMacro() const;\n        bool hasExpandedExpression() const;\n        std::string getExpandedExpression() const;\n        std::string getMessage() const;\n        SourceLineInfo getSourceInfo() const;\n        StringRef getTestMacroName() const;\n\n    //protected:\n        AssertionInfo m_info;\n        AssertionResultData m_resultData;\n    };\n\n} // end namespace Catch\n\n// end catch_assertionresult.h\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n// start catch_estimate.hpp\n\n // Statistics estimates\n\n\nnamespace Catch {\n    namespace Benchmark {\n        template <typename Duration>\n        struct Estimate {\n            Duration point;\n            Duration lower_bound;\n            Duration upper_bound;\n            double confidence_interval;\n\n            template <typename Duration2>\n            operator Estimate<Duration2>() const {\n                return { point, lower_bound, upper_bound, confidence_interval };\n            }\n        };\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_estimate.hpp\n// start catch_outlier_classification.hpp\n\n// Outlier information\n\nnamespace Catch {\n    namespace Benchmark {\n        struct OutlierClassification {\n            int samples_seen = 0;\n            int low_severe = 0;     // more than 3 times IQR below Q1\n            int low_mild = 0;       // 1.5 to 3 times IQR below Q1\n            int high_mild = 0;      // 1.5 to 3 times IQR above Q3\n            int high_severe = 0;    // more than 3 times IQR above Q3\n\n            int total() const {\n                return low_severe + low_mild + high_mild + high_severe;\n            }\n        };\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_outlier_classification.hpp\n\n#include <iterator>\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n\n#include <string>\n#include <iosfwd>\n#include <map>\n#include <set>\n#include <memory>\n#include <algorithm>\n\nnamespace Catch {\n\n    struct ReporterConfig {\n        explicit ReporterConfig( IConfigPtr const& _fullConfig );\n\n        ReporterConfig( IConfigPtr const& _fullConfig, std::ostream& _stream );\n\n        std::ostream& stream() const;\n        IConfigPtr fullConfig() const;\n\n    private:\n        std::ostream* m_stream;\n        IConfigPtr m_fullConfig;\n    };\n\n    struct ReporterPreferences {\n        bool shouldRedirectStdOut = false;\n        bool shouldReportAllAssertions = false;\n    };\n\n    template<typename T>\n    struct LazyStat : Option<T> {\n        LazyStat& operator=( T const& _value ) {\n            Option<T>::operator=( _value );\n            used = false;\n            return *this;\n        }\n        void reset() {\n            Option<T>::reset();\n            used = false;\n        }\n        bool used = false;\n    };\n\n    struct TestRunInfo {\n        TestRunInfo( std::string const& _name );\n        std::string name;\n    };\n    struct GroupInfo {\n        GroupInfo(  std::string const& _name,\n                    std::size_t _groupIndex,\n                    std::size_t _groupsCount );\n\n        std::string name;\n        std::size_t groupIndex;\n        std::size_t groupsCounts;\n    };\n\n    struct AssertionStats {\n        AssertionStats( AssertionResult const& _assertionResult,\n                        std::vector<MessageInfo> const& _infoMessages,\n                        Totals const& _totals );\n\n        AssertionStats( AssertionStats const& )              = default;\n        AssertionStats( AssertionStats && )                  = default;\n        AssertionStats& operator = ( AssertionStats const& ) = delete;\n        AssertionStats& operator = ( AssertionStats && )     = delete;\n        virtual ~AssertionStats();\n\n        AssertionResult assertionResult;\n        std::vector<MessageInfo> infoMessages;\n        Totals totals;\n    };\n\n    struct SectionStats {\n        SectionStats(   SectionInfo const& _sectionInfo,\n                        Counts const& _assertions,\n                        double _durationInSeconds,\n                        bool _missingAssertions );\n        SectionStats( SectionStats const& )              = default;\n        SectionStats( SectionStats && )                  = default;\n        SectionStats& operator = ( SectionStats const& ) = default;\n        SectionStats& operator = ( SectionStats && )     = default;\n        virtual ~SectionStats();\n\n        SectionInfo sectionInfo;\n        Counts assertions;\n        double durationInSeconds;\n        bool missingAssertions;\n    };\n\n    struct TestCaseStats {\n        TestCaseStats(  TestCaseInfo const& _testInfo,\n                        Totals const& _totals,\n                        std::string const& _stdOut,\n                        std::string const& _stdErr,\n                        bool _aborting );\n\n        TestCaseStats( TestCaseStats const& )              = default;\n        TestCaseStats( TestCaseStats && )                  = default;\n        TestCaseStats& operator = ( TestCaseStats const& ) = default;\n        TestCaseStats& operator = ( TestCaseStats && )     = default;\n        virtual ~TestCaseStats();\n\n        TestCaseInfo testInfo;\n        Totals totals;\n        std::string stdOut;\n        std::string stdErr;\n        bool aborting;\n    };\n\n    struct TestGroupStats {\n        TestGroupStats( GroupInfo const& _groupInfo,\n                        Totals const& _totals,\n                        bool _aborting );\n        TestGroupStats( GroupInfo const& _groupInfo );\n\n        TestGroupStats( TestGroupStats const& )              = default;\n        TestGroupStats( TestGroupStats && )                  = default;\n        TestGroupStats& operator = ( TestGroupStats const& ) = default;\n        TestGroupStats& operator = ( TestGroupStats && )     = default;\n        virtual ~TestGroupStats();\n\n        GroupInfo groupInfo;\n        Totals totals;\n        bool aborting;\n    };\n\n    struct TestRunStats {\n        TestRunStats(   TestRunInfo const& _runInfo,\n                        Totals const& _totals,\n                        bool _aborting );\n\n        TestRunStats( TestRunStats const& )              = default;\n        TestRunStats( TestRunStats && )                  = default;\n        TestRunStats& operator = ( TestRunStats const& ) = default;\n        TestRunStats& operator = ( TestRunStats && )     = default;\n        virtual ~TestRunStats();\n\n        TestRunInfo runInfo;\n        Totals totals;\n        bool aborting;\n    };\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n    struct BenchmarkInfo {\n        std::string name;\n        double estimatedDuration;\n        int iterations;\n        int samples;\n        unsigned int resamples;\n        double clockResolution;\n        double clockCost;\n    };\n\n    template <class Duration>\n    struct BenchmarkStats {\n        BenchmarkInfo info;\n\n        std::vector<Duration> samples;\n        Benchmark::Estimate<Duration> mean;\n        Benchmark::Estimate<Duration> standardDeviation;\n        Benchmark::OutlierClassification outliers;\n        double outlierVariance;\n\n        template <typename Duration2>\n        operator BenchmarkStats<Duration2>() const {\n            std::vector<Duration2> samples2;\n            samples2.reserve(samples.size());\n            std::transform(samples.begin(), samples.end(), std::back_inserter(samples2), [](Duration d) { return Duration2(d); });\n            return {\n                info,\n                std::move(samples2),\n                mean,\n                standardDeviation,\n                outliers,\n                outlierVariance,\n            };\n        }\n    };\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n\n    struct IStreamingReporter {\n        virtual ~IStreamingReporter() = default;\n\n        // Implementing class must also provide the following static methods:\n        // static std::string getDescription();\n        // static std::set<Verbosity> getSupportedVerbosities()\n\n        virtual ReporterPreferences getPreferences() const = 0;\n\n        virtual void noMatchingTestCases( std::string const& spec ) = 0;\n\n        virtual void reportInvalidArguments(std::string const&) {}\n\n        virtual void testRunStarting( TestRunInfo const& testRunInfo ) = 0;\n        virtual void testGroupStarting( GroupInfo const& groupInfo ) = 0;\n\n        virtual void testCaseStarting( TestCaseInfo const& testInfo ) = 0;\n        virtual void sectionStarting( SectionInfo const& sectionInfo ) = 0;\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n        virtual void benchmarkPreparing( std::string const& ) {}\n        virtual void benchmarkStarting( BenchmarkInfo const& ) {}\n        virtual void benchmarkEnded( BenchmarkStats<> const& ) {}\n        virtual void benchmarkFailed( std::string const& ) {}\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n\n        virtual void assertionStarting( AssertionInfo const& assertionInfo ) = 0;\n\n        // The return value indicates if the messages buffer should be cleared:\n        virtual bool assertionEnded( AssertionStats const& assertionStats ) = 0;\n\n        virtual void sectionEnded( SectionStats const& sectionStats ) = 0;\n        virtual void testCaseEnded( TestCaseStats const& testCaseStats ) = 0;\n        virtual void testGroupEnded( TestGroupStats const& testGroupStats ) = 0;\n        virtual void testRunEnded( TestRunStats const& testRunStats ) = 0;\n\n        virtual void skipTest( TestCaseInfo const& testInfo ) = 0;\n\n        // Default empty implementation provided\n        virtual void fatalErrorEncountered( StringRef name );\n\n        virtual bool isMulti() const;\n    };\n    using IStreamingReporterPtr = std::unique_ptr<IStreamingReporter>;\n\n    struct IReporterFactory {\n        virtual ~IReporterFactory();\n        virtual IStreamingReporterPtr create( ReporterConfig const& config ) const = 0;\n        virtual std::string getDescription() const = 0;\n    };\n    using IReporterFactoryPtr = std::shared_ptr<IReporterFactory>;\n\n    struct IReporterRegistry {\n        using FactoryMap = std::map<std::string, IReporterFactoryPtr>;\n        using Listeners = std::vector<IReporterFactoryPtr>;\n\n        virtual ~IReporterRegistry();\n        virtual IStreamingReporterPtr create( std::string const& name, IConfigPtr const& config ) const = 0;\n        virtual FactoryMap const& getFactories() const = 0;\n        virtual Listeners const& getListeners() const = 0;\n    };\n\n} // end namespace Catch\n\n// end catch_interfaces_reporter.h\n#include <algorithm>\n#include <cstring>\n#include <cfloat>\n#include <cstdio>\n#include <cassert>\n#include <memory>\n#include <ostream>\n\nnamespace Catch {\n    void prepareExpandedExpression(AssertionResult& result);\n\n    // Returns double formatted as %.3f (format expected on output)\n    std::string getFormattedDuration( double duration );\n\n    //! Should the reporter show\n    bool shouldShowDuration( IConfig const& config, double duration );\n\n    std::string serializeFilters( std::vector<std::string> const& container );\n\n    template<typename DerivedT>\n    struct StreamingReporterBase : IStreamingReporter {\n\n        StreamingReporterBase( ReporterConfig const& _config )\n        :   m_config( _config.fullConfig() ),\n            stream( _config.stream() )\n        {\n            m_reporterPrefs.shouldRedirectStdOut = false;\n            if( !DerivedT::getSupportedVerbosities().count( m_config->verbosity() ) )\n                CATCH_ERROR( \"Verbosity level not supported by this reporter\" );\n        }\n\n        ReporterPreferences getPreferences() const override {\n            return m_reporterPrefs;\n        }\n\n        static std::set<Verbosity> getSupportedVerbosities() {\n            return { Verbosity::Normal };\n        }\n\n        ~StreamingReporterBase() override = default;\n\n        void noMatchingTestCases(std::string const&) override {}\n\n        void reportInvalidArguments(std::string const&) override {}\n\n        void testRunStarting(TestRunInfo const& _testRunInfo) override {\n            currentTestRunInfo = _testRunInfo;\n        }\n\n        void testGroupStarting(GroupInfo const& _groupInfo) override {\n            currentGroupInfo = _groupInfo;\n        }\n\n        void testCaseStarting(TestCaseInfo const& _testInfo) override  {\n            currentTestCaseInfo = _testInfo;\n        }\n        void sectionStarting(SectionInfo const& _sectionInfo) override {\n            m_sectionStack.push_back(_sectionInfo);\n        }\n\n        void sectionEnded(SectionStats const& /* _sectionStats */) override {\n            m_sectionStack.pop_back();\n        }\n        void testCaseEnded(TestCaseStats const& /* _testCaseStats */) override {\n            currentTestCaseInfo.reset();\n        }\n        void testGroupEnded(TestGroupStats const& /* _testGroupStats */) override {\n            currentGroupInfo.reset();\n        }\n        void testRunEnded(TestRunStats const& /* _testRunStats */) override {\n            currentTestCaseInfo.reset();\n            currentGroupInfo.reset();\n            currentTestRunInfo.reset();\n        }\n\n        void skipTest(TestCaseInfo const&) override {\n            // Don't do anything with this by default.\n            // It can optionally be overridden in the derived class.\n        }\n\n        IConfigPtr m_config;\n        std::ostream& stream;\n\n        LazyStat<TestRunInfo> currentTestRunInfo;\n        LazyStat<GroupInfo> currentGroupInfo;\n        LazyStat<TestCaseInfo> currentTestCaseInfo;\n\n        std::vector<SectionInfo> m_sectionStack;\n        ReporterPreferences m_reporterPrefs;\n    };\n\n    template<typename DerivedT>\n    struct CumulativeReporterBase : IStreamingReporter {\n        template<typename T, typename ChildNodeT>\n        struct Node {\n            explicit Node( T const& _value ) : value( _value ) {}\n            virtual ~Node() {}\n\n            using ChildNodes = std::vector<std::shared_ptr<ChildNodeT>>;\n            T value;\n            ChildNodes children;\n        };\n        struct SectionNode {\n            explicit SectionNode(SectionStats const& _stats) : stats(_stats) {}\n            virtual ~SectionNode() = default;\n\n            bool operator == (SectionNode const& other) const {\n                return stats.sectionInfo.lineInfo == other.stats.sectionInfo.lineInfo;\n            }\n            bool operator == (std::shared_ptr<SectionNode> const& other) const {\n                return operator==(*other);\n            }\n\n            SectionStats stats;\n            using ChildSections = std::vector<std::shared_ptr<SectionNode>>;\n            using Assertions = std::vector<AssertionStats>;\n            ChildSections childSections;\n            Assertions assertions;\n            std::string stdOut;\n            std::string stdErr;\n        };\n\n        struct BySectionInfo {\n            BySectionInfo( SectionInfo const& other ) : m_other( other ) {}\n            BySectionInfo( BySectionInfo const& other ) : m_other( other.m_other ) {}\n            bool operator() (std::shared_ptr<SectionNode> const& node) const {\n                return ((node->stats.sectionInfo.name == m_other.name) &&\n                        (node->stats.sectionInfo.lineInfo == m_other.lineInfo));\n            }\n            void operator=(BySectionInfo const&) = delete;\n\n        private:\n            SectionInfo const& m_other;\n        };\n\n        using TestCaseNode = Node<TestCaseStats, SectionNode>;\n        using TestGroupNode = Node<TestGroupStats, TestCaseNode>;\n        using TestRunNode = Node<TestRunStats, TestGroupNode>;\n\n        CumulativeReporterBase( ReporterConfig const& _config )\n        :   m_config( _config.fullConfig() ),\n            stream( _config.stream() )\n        {\n            m_reporterPrefs.shouldRedirectStdOut = false;\n            if( !DerivedT::getSupportedVerbosities().count( m_config->verbosity() ) )\n                CATCH_ERROR( \"Verbosity level not supported by this reporter\" );\n        }\n        ~CumulativeReporterBase() override = default;\n\n        ReporterPreferences getPreferences() const override {\n            return m_reporterPrefs;\n        }\n\n        static std::set<Verbosity> getSupportedVerbosities() {\n            return { Verbosity::Normal };\n        }\n\n        void testRunStarting( TestRunInfo const& ) override {}\n        void testGroupStarting( GroupInfo const& ) override {}\n\n        void testCaseStarting( TestCaseInfo const& ) override {}\n\n        void sectionStarting( SectionInfo const& sectionInfo ) override {\n            SectionStats incompleteStats( sectionInfo, Counts(), 0, false );\n            std::shared_ptr<SectionNode> node;\n            if( m_sectionStack.empty() ) {\n                if( !m_rootSection )\n                    m_rootSection = std::make_shared<SectionNode>( incompleteStats );\n                node = m_rootSection;\n            }\n            else {\n                SectionNode& parentNode = *m_sectionStack.back();\n                auto it =\n                    std::find_if(   parentNode.childSections.begin(),\n                                    parentNode.childSections.end(),\n                                    BySectionInfo( sectionInfo ) );\n                if( it == parentNode.childSections.end() ) {\n                    node = std::make_shared<SectionNode>( incompleteStats );\n                    parentNode.childSections.push_back( node );\n                }\n                else\n                    node = *it;\n            }\n            m_sectionStack.push_back( node );\n            m_deepestSection = std::move(node);\n        }\n\n        void assertionStarting(AssertionInfo const&) override {}\n\n        bool assertionEnded(AssertionStats const& assertionStats) override {\n            assert(!m_sectionStack.empty());\n            // AssertionResult holds a pointer to a temporary DecomposedExpression,\n            // which getExpandedExpression() calls to build the expression string.\n            // Our section stack copy of the assertionResult will likely outlive the\n            // temporary, so it must be expanded or discarded now to avoid calling\n            // a destroyed object later.\n            prepareExpandedExpression(const_cast<AssertionResult&>( assertionStats.assertionResult ) );\n            SectionNode& sectionNode = *m_sectionStack.back();\n            sectionNode.assertions.push_back(assertionStats);\n            return true;\n        }\n        void sectionEnded(SectionStats const& sectionStats) override {\n            assert(!m_sectionStack.empty());\n            SectionNode& node = *m_sectionStack.back();\n            node.stats = sectionStats;\n            m_sectionStack.pop_back();\n        }\n        void testCaseEnded(TestCaseStats const& testCaseStats) override {\n            auto node = std::make_shared<TestCaseNode>(testCaseStats);\n            assert(m_sectionStack.size() == 0);\n            node->children.push_back(m_rootSection);\n            m_testCases.push_back(node);\n            m_rootSection.reset();\n\n            assert(m_deepestSection);\n            m_deepestSection->stdOut = testCaseStats.stdOut;\n            m_deepestSection->stdErr = testCaseStats.stdErr;\n        }\n        void testGroupEnded(TestGroupStats const& testGroupStats) override {\n            auto node = std::make_shared<TestGroupNode>(testGroupStats);\n            node->children.swap(m_testCases);\n            m_testGroups.push_back(node);\n        }\n        void testRunEnded(TestRunStats const& testRunStats) override {\n            auto node = std::make_shared<TestRunNode>(testRunStats);\n            node->children.swap(m_testGroups);\n            m_testRuns.push_back(node);\n            testRunEndedCumulative();\n        }\n        virtual void testRunEndedCumulative() = 0;\n\n        void skipTest(TestCaseInfo const&) override {}\n\n        IConfigPtr m_config;\n        std::ostream& stream;\n        std::vector<AssertionStats> m_assertions;\n        std::vector<std::vector<std::shared_ptr<SectionNode>>> m_sections;\n        std::vector<std::shared_ptr<TestCaseNode>> m_testCases;\n        std::vector<std::shared_ptr<TestGroupNode>> m_testGroups;\n\n        std::vector<std::shared_ptr<TestRunNode>> m_testRuns;\n\n        std::shared_ptr<SectionNode> m_rootSection;\n        std::shared_ptr<SectionNode> m_deepestSection;\n        std::vector<std::shared_ptr<SectionNode>> m_sectionStack;\n        ReporterPreferences m_reporterPrefs;\n    };\n\n    template<char C>\n    char const* getLineOfChars() {\n        static char line[CATCH_CONFIG_CONSOLE_WIDTH] = {0};\n        if( !*line ) {\n            std::memset( line, C, CATCH_CONFIG_CONSOLE_WIDTH-1 );\n            line[CATCH_CONFIG_CONSOLE_WIDTH-1] = 0;\n        }\n        return line;\n    }\n\n    struct TestEventListenerBase : StreamingReporterBase<TestEventListenerBase> {\n        TestEventListenerBase( ReporterConfig const& _config );\n\n        static std::set<Verbosity> getSupportedVerbosities();\n\n        void assertionStarting(AssertionInfo const&) override;\n        bool assertionEnded(AssertionStats const&) override;\n    };\n\n} // end namespace Catch\n\n// end catch_reporter_bases.hpp\n// start catch_console_colour.h\n\nnamespace Catch {\n\n    struct Colour {\n        enum Code {\n            None = 0,\n\n            White,\n            Red,\n            Green,\n            Blue,\n            Cyan,\n            Yellow,\n            Grey,\n\n            Bright = 0x10,\n\n            BrightRed = Bright | Red,\n            BrightGreen = Bright | Green,\n            LightGrey = Bright | Grey,\n            BrightWhite = Bright | White,\n            BrightYellow = Bright | Yellow,\n\n            // By intention\n            FileName = LightGrey,\n            Warning = BrightYellow,\n            ResultError = BrightRed,\n            ResultSuccess = BrightGreen,\n            ResultExpectedFailure = Warning,\n\n            Error = BrightRed,\n            Success = Green,\n\n            OriginalExpression = Cyan,\n            ReconstructedExpression = BrightYellow,\n\n            SecondaryText = LightGrey,\n            Headers = White\n        };\n\n        // Use constructed object for RAII guard\n        Colour( Code _colourCode );\n        Colour( Colour&& other ) noexcept;\n        Colour& operator=( Colour&& other ) noexcept;\n        ~Colour();\n\n        // Use static method for one-shot changes\n        static void use( Code _colourCode );\n\n    private:\n        bool m_moved = false;\n    };\n\n    std::ostream& operator << ( std::ostream& os, Colour const& );\n\n} // end namespace Catch\n\n// end catch_console_colour.h\n// start catch_reporter_registrars.hpp\n\n\nnamespace Catch {\n\n    template<typename T>\n    class ReporterRegistrar {\n\n        class ReporterFactory : public IReporterFactory {\n\n            IStreamingReporterPtr create( ReporterConfig const& config ) const override {\n                return std::unique_ptr<T>( new T( config ) );\n            }\n\n            std::string getDescription() const override {\n                return T::getDescription();\n            }\n        };\n\n    public:\n\n        explicit ReporterRegistrar( std::string const& name ) {\n            getMutableRegistryHub().registerReporter( name, std::make_shared<ReporterFactory>() );\n        }\n    };\n\n    template<typename T>\n    class ListenerRegistrar {\n\n        class ListenerFactory : public IReporterFactory {\n\n            IStreamingReporterPtr create( ReporterConfig const& config ) const override {\n                return std::unique_ptr<T>( new T( config ) );\n            }\n            std::string getDescription() const override {\n                return std::string();\n            }\n        };\n\n    public:\n\n        ListenerRegistrar() {\n            getMutableRegistryHub().registerListener( std::make_shared<ListenerFactory>() );\n        }\n    };\n}\n\n#if !defined(CATCH_CONFIG_DISABLE)\n\n#define CATCH_REGISTER_REPORTER( name, reporterType ) \\\n    CATCH_INTERNAL_START_WARNINGS_SUPPRESSION         \\\n    CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS          \\\n    namespace{ Catch::ReporterRegistrar<reporterType> catch_internal_RegistrarFor##reporterType( name ); } \\\n    CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION\n\n#define CATCH_REGISTER_LISTENER( listenerType ) \\\n    CATCH_INTERNAL_START_WARNINGS_SUPPRESSION   \\\n    CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS    \\\n    namespace{ Catch::ListenerRegistrar<listenerType> catch_internal_RegistrarFor##listenerType; } \\\n    CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION\n#else // CATCH_CONFIG_DISABLE\n\n#define CATCH_REGISTER_REPORTER(name, reporterType)\n#define CATCH_REGISTER_LISTENER(listenerType)\n\n#endif // CATCH_CONFIG_DISABLE\n\n// end catch_reporter_registrars.hpp\n// Allow users to base their work off existing reporters\n// start catch_reporter_compact.h\n\nnamespace Catch {\n\n    struct CompactReporter : StreamingReporterBase<CompactReporter> {\n\n        using StreamingReporterBase::StreamingReporterBase;\n\n        ~CompactReporter() override;\n\n        static std::string getDescription();\n\n        void noMatchingTestCases(std::string const& spec) override;\n\n        void assertionStarting(AssertionInfo const&) override;\n\n        bool assertionEnded(AssertionStats const& _assertionStats) override;\n\n        void sectionEnded(SectionStats const& _sectionStats) override;\n\n        void testRunEnded(TestRunStats const& _testRunStats) override;\n\n    };\n\n} // end namespace Catch\n\n// end catch_reporter_compact.h\n// start catch_reporter_console.h\n\n#if defined(_MSC_VER)\n#pragma warning(push)\n#pragma warning(disable:4061) // Not all labels are EXPLICITLY handled in switch\n                              // Note that 4062 (not all labels are handled\n                              // and default is missing) is enabled\n#endif\n\nnamespace Catch {\n    // Fwd decls\n    struct SummaryColumn;\n    class TablePrinter;\n\n    struct ConsoleReporter : StreamingReporterBase<ConsoleReporter> {\n        std::unique_ptr<TablePrinter> m_tablePrinter;\n\n        ConsoleReporter(ReporterConfig const& config);\n        ~ConsoleReporter() override;\n        static std::string getDescription();\n\n        void noMatchingTestCases(std::string const& spec) override;\n\n        void reportInvalidArguments(std::string const&arg) override;\n\n        void assertionStarting(AssertionInfo const&) override;\n\n        bool assertionEnded(AssertionStats const& _assertionStats) override;\n\n        void sectionStarting(SectionInfo const& _sectionInfo) override;\n        void sectionEnded(SectionStats const& _sectionStats) override;\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n        void benchmarkPreparing(std::string const& name) override;\n        void benchmarkStarting(BenchmarkInfo const& info) override;\n        void benchmarkEnded(BenchmarkStats<> const& stats) override;\n        void benchmarkFailed(std::string const& error) override;\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n\n        void testCaseEnded(TestCaseStats const& _testCaseStats) override;\n        void testGroupEnded(TestGroupStats const& _testGroupStats) override;\n        void testRunEnded(TestRunStats const& _testRunStats) override;\n        void testRunStarting(TestRunInfo const& _testRunInfo) override;\n    private:\n\n        void lazyPrint();\n\n        void lazyPrintWithoutClosingBenchmarkTable();\n        void lazyPrintRunInfo();\n        void lazyPrintGroupInfo();\n        void printTestCaseAndSectionHeader();\n\n        void printClosedHeader(std::string const& _name);\n        void printOpenHeader(std::string const& _name);\n\n        // if string has a : in first line will set indent to follow it on\n        // subsequent lines\n        void printHeaderString(std::string const& _string, std::size_t indent = 0);\n\n        void printTotals(Totals const& totals);\n        void printSummaryRow(std::string const& label, std::vector<SummaryColumn> const& cols, std::size_t row);\n\n        void printTotalsDivider(Totals const& totals);\n        void printSummaryDivider();\n        void printTestFilters();\n\n    private:\n        bool m_headerPrinted = false;\n    };\n\n} // end namespace Catch\n\n#if defined(_MSC_VER)\n#pragma warning(pop)\n#endif\n\n// end catch_reporter_console.h\n// start catch_reporter_junit.h\n\n// start catch_xmlwriter.h\n\n#include <vector>\n\nnamespace Catch {\n    enum class XmlFormatting {\n        None = 0x00,\n        Indent = 0x01,\n        Newline = 0x02,\n    };\n\n    XmlFormatting operator | (XmlFormatting lhs, XmlFormatting rhs);\n    XmlFormatting operator & (XmlFormatting lhs, XmlFormatting rhs);\n\n    class XmlEncode {\n    public:\n        enum ForWhat { ForTextNodes, ForAttributes };\n\n        XmlEncode( std::string const& str, ForWhat forWhat = ForTextNodes );\n\n        void encodeTo( std::ostream& os ) const;\n\n        friend std::ostream& operator << ( std::ostream& os, XmlEncode const& xmlEncode );\n\n    private:\n        std::string m_str;\n        ForWhat m_forWhat;\n    };\n\n    class XmlWriter {\n    public:\n\n        class ScopedElement {\n        public:\n            ScopedElement( XmlWriter* writer, XmlFormatting fmt );\n\n            ScopedElement( ScopedElement&& other ) noexcept;\n            ScopedElement& operator=( ScopedElement&& other ) noexcept;\n\n            ~ScopedElement();\n\n            ScopedElement& writeText( std::string const& text, XmlFormatting fmt = XmlFormatting::Newline | XmlFormatting::Indent );\n\n            template<typename T>\n            ScopedElement& writeAttribute( std::string const& name, T const& attribute ) {\n                m_writer->writeAttribute( name, attribute );\n                return *this;\n            }\n\n        private:\n            mutable XmlWriter* m_writer = nullptr;\n            XmlFormatting m_fmt;\n        };\n\n        XmlWriter( std::ostream& os = Catch::cout() );\n        ~XmlWriter();\n\n        XmlWriter( XmlWriter const& ) = delete;\n        XmlWriter& operator=( XmlWriter const& ) = delete;\n\n        XmlWriter& startElement( std::string const& name, XmlFormatting fmt = XmlFormatting::Newline | XmlFormatting::Indent);\n\n        ScopedElement scopedElement( std::string const& name, XmlFormatting fmt = XmlFormatting::Newline | XmlFormatting::Indent);\n\n        XmlWriter& endElement(XmlFormatting fmt = XmlFormatting::Newline | XmlFormatting::Indent);\n\n        XmlWriter& writeAttribute( std::string const& name, std::string const& attribute );\n\n        XmlWriter& writeAttribute( std::string const& name, bool attribute );\n\n        template<typename T>\n        XmlWriter& writeAttribute( std::string const& name, T const& attribute ) {\n            ReusableStringStream rss;\n            rss << attribute;\n            return writeAttribute( name, rss.str() );\n        }\n\n        XmlWriter& writeText( std::string const& text, XmlFormatting fmt = XmlFormatting::Newline | XmlFormatting::Indent);\n\n        XmlWriter& writeComment(std::string const& text, XmlFormatting fmt = XmlFormatting::Newline | XmlFormatting::Indent);\n\n        void writeStylesheetRef( std::string const& url );\n\n        XmlWriter& writeBlankLine();\n\n        void ensureTagClosed();\n\n    private:\n\n        void applyFormatting(XmlFormatting fmt);\n\n        void writeDeclaration();\n\n        void newlineIfNecessary();\n\n        bool m_tagIsOpen = false;\n        bool m_needsNewline = false;\n        std::vector<std::string> m_tags;\n        std::string m_indent;\n        std::ostream& m_os;\n    };\n\n}\n\n// end catch_xmlwriter.h\nnamespace Catch {\n\n    class JunitReporter : public CumulativeReporterBase<JunitReporter> {\n    public:\n        JunitReporter(ReporterConfig const& _config);\n\n        ~JunitReporter() override;\n\n        static std::string getDescription();\n\n        void noMatchingTestCases(std::string const& /*spec*/) override;\n\n        void testRunStarting(TestRunInfo const& runInfo) override;\n\n        void testGroupStarting(GroupInfo const& groupInfo) override;\n\n        void testCaseStarting(TestCaseInfo const& testCaseInfo) override;\n        bool assertionEnded(AssertionStats const& assertionStats) override;\n\n        void testCaseEnded(TestCaseStats const& testCaseStats) override;\n\n        void testGroupEnded(TestGroupStats const& testGroupStats) override;\n\n        void testRunEndedCumulative() override;\n\n        void writeGroup(TestGroupNode const& groupNode, double suiteTime);\n\n        void writeTestCase(TestCaseNode const& testCaseNode);\n\n        void writeSection( std::string const& className,\n                           std::string const& rootName,\n                           SectionNode const& sectionNode,\n                           bool testOkToFail );\n\n        void writeAssertions(SectionNode const& sectionNode);\n        void writeAssertion(AssertionStats const& stats);\n\n        XmlWriter xml;\n        Timer suiteTimer;\n        std::string stdOutForSuite;\n        std::string stdErrForSuite;\n        unsigned int unexpectedExceptions = 0;\n        bool m_okToFail = false;\n    };\n\n} // end namespace Catch\n\n// end catch_reporter_junit.h\n// start catch_reporter_xml.h\n\nnamespace Catch {\n    class XmlReporter : public StreamingReporterBase<XmlReporter> {\n    public:\n        XmlReporter(ReporterConfig const& _config);\n\n        ~XmlReporter() override;\n\n        static std::string getDescription();\n\n        virtual std::string getStylesheetRef() const;\n\n        void writeSourceInfo(SourceLineInfo const& sourceInfo);\n\n    public: // StreamingReporterBase\n\n        void noMatchingTestCases(std::string const& s) override;\n\n        void testRunStarting(TestRunInfo const& testInfo) override;\n\n        void testGroupStarting(GroupInfo const& groupInfo) override;\n\n        void testCaseStarting(TestCaseInfo const& testInfo) override;\n\n        void sectionStarting(SectionInfo const& sectionInfo) override;\n\n        void assertionStarting(AssertionInfo const&) override;\n\n        bool assertionEnded(AssertionStats const& assertionStats) override;\n\n        void sectionEnded(SectionStats const& sectionStats) override;\n\n        void testCaseEnded(TestCaseStats const& testCaseStats) override;\n\n        void testGroupEnded(TestGroupStats const& testGroupStats) override;\n\n        void testRunEnded(TestRunStats const& testRunStats) override;\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n        void benchmarkPreparing(std::string const& name) override;\n        void benchmarkStarting(BenchmarkInfo const&) override;\n        void benchmarkEnded(BenchmarkStats<> const&) override;\n        void benchmarkFailed(std::string const&) override;\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n\n    private:\n        Timer m_testCaseTimer;\n        XmlWriter m_xml;\n        int m_sectionDepth = 0;\n    };\n\n} // end namespace Catch\n\n// end catch_reporter_xml.h\n\n// end catch_external_interfaces.h\n#endif\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n// start catch_benchmarking_all.hpp\n\n// A proxy header that includes all of the benchmarking headers to allow\n// concise include of the benchmarking features. You should prefer the\n// individual includes in standard use.\n\n// start catch_benchmark.hpp\n\n // Benchmark\n\n// start catch_chronometer.hpp\n\n// User-facing chronometer\n\n\n// start catch_clock.hpp\n\n// Clocks\n\n\n#include <chrono>\n#include <ratio>\n\nnamespace Catch {\n    namespace Benchmark {\n        template <typename Clock>\n        using ClockDuration = typename Clock::duration;\n        template <typename Clock>\n        using FloatDuration = std::chrono::duration<double, typename Clock::period>;\n\n        template <typename Clock>\n        using TimePoint = typename Clock::time_point;\n\n        using default_clock = std::chrono::steady_clock;\n\n        template <typename Clock>\n        struct now {\n            TimePoint<Clock> operator()() const {\n                return Clock::now();\n            }\n        };\n\n        using fp_seconds = std::chrono::duration<double, std::ratio<1>>;\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_clock.hpp\n// start catch_optimizer.hpp\n\n // Hinting the optimizer\n\n\n#if defined(_MSC_VER)\n#   include <atomic> // atomic_thread_fence\n#endif\n\nnamespace Catch {\n    namespace Benchmark {\n#if defined(__GNUC__) || defined(__clang__)\n        template <typename T>\n        inline void keep_memory(T* p) {\n            asm volatile(\"\" : : \"g\"(p) : \"memory\");\n        }\n        inline void keep_memory() {\n            asm volatile(\"\" : : : \"memory\");\n        }\n\n        namespace Detail {\n            inline void optimizer_barrier() { keep_memory(); }\n        } // namespace Detail\n#elif defined(_MSC_VER)\n\n#pragma optimize(\"\", off)\n        template <typename T>\n        inline void keep_memory(T* p) {\n            // thanks @milleniumbug\n            *reinterpret_cast<char volatile*>(p) = *reinterpret_cast<char const volatile*>(p);\n        }\n        // TODO equivalent keep_memory()\n#pragma optimize(\"\", on)\n\n        namespace Detail {\n            inline void optimizer_barrier() {\n                std::atomic_thread_fence(std::memory_order_seq_cst);\n            }\n        } // namespace Detail\n\n#endif\n\n        template <typename T>\n        inline void deoptimize_value(T&& x) {\n            keep_memory(&x);\n        }\n\n        template <typename Fn, typename... Args>\n        inline auto invoke_deoptimized(Fn&& fn, Args&&... args) -> typename std::enable_if<!std::is_same<void, decltype(fn(args...))>::value>::type {\n            deoptimize_value(std::forward<Fn>(fn) (std::forward<Args...>(args...)));\n        }\n\n        template <typename Fn, typename... Args>\n        inline auto invoke_deoptimized(Fn&& fn, Args&&... args) -> typename std::enable_if<std::is_same<void, decltype(fn(args...))>::value>::type {\n            std::forward<Fn>(fn) (std::forward<Args...>(args...));\n        }\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_optimizer.hpp\n// start catch_complete_invoke.hpp\n\n// Invoke with a special case for void\n\n\n#include <type_traits>\n#include <utility>\n\nnamespace Catch {\n    namespace Benchmark {\n        namespace Detail {\n            template <typename T>\n            struct CompleteType { using type = T; };\n            template <>\n            struct CompleteType<void> { struct type {}; };\n\n            template <typename T>\n            using CompleteType_t = typename CompleteType<T>::type;\n\n            template <typename Result>\n            struct CompleteInvoker {\n                template <typename Fun, typename... Args>\n                static Result invoke(Fun&& fun, Args&&... args) {\n                    return std::forward<Fun>(fun)(std::forward<Args>(args)...);\n                }\n            };\n            template <>\n            struct CompleteInvoker<void> {\n                template <typename Fun, typename... Args>\n                static CompleteType_t<void> invoke(Fun&& fun, Args&&... args) {\n                    std::forward<Fun>(fun)(std::forward<Args>(args)...);\n                    return {};\n                }\n            };\n\n            // invoke and not return void :(\n            template <typename Fun, typename... Args>\n            CompleteType_t<FunctionReturnType<Fun, Args...>> complete_invoke(Fun&& fun, Args&&... args) {\n                return CompleteInvoker<FunctionReturnType<Fun, Args...>>::invoke(std::forward<Fun>(fun), std::forward<Args>(args)...);\n            }\n\n            const std::string benchmarkErrorMsg = \"a benchmark failed to run successfully\";\n        } // namespace Detail\n\n        template <typename Fun>\n        Detail::CompleteType_t<FunctionReturnType<Fun>> user_code(Fun&& fun) {\n            CATCH_TRY{\n                return Detail::complete_invoke(std::forward<Fun>(fun));\n            } CATCH_CATCH_ALL{\n                getResultCapture().benchmarkFailed(translateActiveException());\n                CATCH_RUNTIME_ERROR(Detail::benchmarkErrorMsg);\n            }\n        }\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_complete_invoke.hpp\nnamespace Catch {\n    namespace Benchmark {\n        namespace Detail {\n            struct ChronometerConcept {\n                virtual void start() = 0;\n                virtual void finish() = 0;\n                virtual ~ChronometerConcept() = default;\n            };\n            template <typename Clock>\n            struct ChronometerModel final : public ChronometerConcept {\n                void start() override { started = Clock::now(); }\n                void finish() override { finished = Clock::now(); }\n\n                ClockDuration<Clock> elapsed() const { return finished - started; }\n\n                TimePoint<Clock> started;\n                TimePoint<Clock> finished;\n            };\n        } // namespace Detail\n\n        struct Chronometer {\n        public:\n            template <typename Fun>\n            void measure(Fun&& fun) { measure(std::forward<Fun>(fun), is_callable<Fun(int)>()); }\n\n            int runs() const { return k; }\n\n            Chronometer(Detail::ChronometerConcept& meter, int k)\n                : impl(&meter)\n                , k(k) {}\n\n        private:\n            template <typename Fun>\n            void measure(Fun&& fun, std::false_type) {\n                measure([&fun](int) { return fun(); }, std::true_type());\n            }\n\n            template <typename Fun>\n            void measure(Fun&& fun, std::true_type) {\n                Detail::optimizer_barrier();\n                impl->start();\n                for (int i = 0; i < k; ++i) invoke_deoptimized(fun, i);\n                impl->finish();\n                Detail::optimizer_barrier();\n            }\n\n            Detail::ChronometerConcept* impl;\n            int k;\n        };\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_chronometer.hpp\n// start catch_environment.hpp\n\n// Environment information\n\n\nnamespace Catch {\n    namespace Benchmark {\n        template <typename Duration>\n        struct EnvironmentEstimate {\n            Duration mean;\n            OutlierClassification outliers;\n\n            template <typename Duration2>\n            operator EnvironmentEstimate<Duration2>() const {\n                return { mean, outliers };\n            }\n        };\n        template <typename Clock>\n        struct Environment {\n            using clock_type = Clock;\n            EnvironmentEstimate<FloatDuration<Clock>> clock_resolution;\n            EnvironmentEstimate<FloatDuration<Clock>> clock_cost;\n        };\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_environment.hpp\n// start catch_execution_plan.hpp\n\n // Execution plan\n\n\n// start catch_benchmark_function.hpp\n\n // Dumb std::function implementation for consistent call overhead\n\n\n#include <cassert>\n#include <type_traits>\n#include <utility>\n#include <memory>\n\nnamespace Catch {\n    namespace Benchmark {\n        namespace Detail {\n            template <typename T>\n            using Decay = typename std::decay<T>::type;\n            template <typename T, typename U>\n            struct is_related\n                : std::is_same<Decay<T>, Decay<U>> {};\n\n            /// We need to reinvent std::function because every piece of code that might add overhead\n            /// in a measurement context needs to have consistent performance characteristics so that we\n            /// can account for it in the measurement.\n            /// Implementations of std::function with optimizations that aren't always applicable, like\n            /// small buffer optimizations, are not uncommon.\n            /// This is effectively an implementation of std::function without any such optimizations;\n            /// it may be slow, but it is consistently slow.\n            struct BenchmarkFunction {\n            private:\n                struct callable {\n                    virtual void call(Chronometer meter) const = 0;\n                    virtual callable* clone() const = 0;\n                    virtual ~callable() = default;\n                };\n                template <typename Fun>\n                struct model : public callable {\n                    model(Fun&& fun) : fun(std::move(fun)) {}\n                    model(Fun const& fun) : fun(fun) {}\n\n                    model<Fun>* clone() const override { return new model<Fun>(*this); }\n\n                    void call(Chronometer meter) const override {\n                        call(meter, is_callable<Fun(Chronometer)>());\n                    }\n                    void call(Chronometer meter, std::true_type) const {\n                        fun(meter);\n                    }\n                    void call(Chronometer meter, std::false_type) const {\n                        meter.measure(fun);\n                    }\n\n                    Fun fun;\n                };\n\n                struct do_nothing { void operator()() const {} };\n\n                template <typename T>\n                BenchmarkFunction(model<T>* c) : f(c) {}\n\n            public:\n                BenchmarkFunction()\n                    : f(new model<do_nothing>{ {} }) {}\n\n                template <typename Fun,\n                    typename std::enable_if<!is_related<Fun, BenchmarkFunction>::value, int>::type = 0>\n                    BenchmarkFunction(Fun&& fun)\n                    : f(new model<typename std::decay<Fun>::type>(std::forward<Fun>(fun))) {}\n\n                BenchmarkFunction(BenchmarkFunction&& that)\n                    : f(std::move(that.f)) {}\n\n                BenchmarkFunction(BenchmarkFunction const& that)\n                    : f(that.f->clone()) {}\n\n                BenchmarkFunction& operator=(BenchmarkFunction&& that) {\n                    f = std::move(that.f);\n                    return *this;\n                }\n\n                BenchmarkFunction& operator=(BenchmarkFunction const& that) {\n                    f.reset(that.f->clone());\n                    return *this;\n                }\n\n                void operator()(Chronometer meter) const { f->call(meter); }\n\n            private:\n                std::unique_ptr<callable> f;\n            };\n        } // namespace Detail\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_benchmark_function.hpp\n// start catch_repeat.hpp\n\n// repeat algorithm\n\n\n#include <type_traits>\n#include <utility>\n\nnamespace Catch {\n    namespace Benchmark {\n        namespace Detail {\n            template <typename Fun>\n            struct repeater {\n                void operator()(int k) const {\n                    for (int i = 0; i < k; ++i) {\n                        fun();\n                    }\n                }\n                Fun fun;\n            };\n            template <typename Fun>\n            repeater<typename std::decay<Fun>::type> repeat(Fun&& fun) {\n                return { std::forward<Fun>(fun) };\n            }\n        } // namespace Detail\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_repeat.hpp\n// start catch_run_for_at_least.hpp\n\n// Run a function for a minimum amount of time\n\n\n// start catch_measure.hpp\n\n// Measure\n\n\n// start catch_timing.hpp\n\n// Timing\n\n\n#include <tuple>\n#include <type_traits>\n\nnamespace Catch {\n    namespace Benchmark {\n        template <typename Duration, typename Result>\n        struct Timing {\n            Duration elapsed;\n            Result result;\n            int iterations;\n        };\n        template <typename Clock, typename Func, typename... Args>\n        using TimingOf = Timing<ClockDuration<Clock>, Detail::CompleteType_t<FunctionReturnType<Func, Args...>>>;\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_timing.hpp\n#include <utility>\n\nnamespace Catch {\n    namespace Benchmark {\n        namespace Detail {\n            template <typename Clock, typename Fun, typename... Args>\n            TimingOf<Clock, Fun, Args...> measure(Fun&& fun, Args&&... args) {\n                auto start = Clock::now();\n                auto&& r = Detail::complete_invoke(fun, std::forward<Args>(args)...);\n                auto end = Clock::now();\n                auto delta = end - start;\n                return { delta, std::forward<decltype(r)>(r), 1 };\n            }\n        } // namespace Detail\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_measure.hpp\n#include <utility>\n#include <type_traits>\n\nnamespace Catch {\n    namespace Benchmark {\n        namespace Detail {\n            template <typename Clock, typename Fun>\n            TimingOf<Clock, Fun, int> measure_one(Fun&& fun, int iters, std::false_type) {\n                return Detail::measure<Clock>(fun, iters);\n            }\n            template <typename Clock, typename Fun>\n            TimingOf<Clock, Fun, Chronometer> measure_one(Fun&& fun, int iters, std::true_type) {\n                Detail::ChronometerModel<Clock> meter;\n                auto&& result = Detail::complete_invoke(fun, Chronometer(meter, iters));\n\n                return { meter.elapsed(), std::move(result), iters };\n            }\n\n            template <typename Clock, typename Fun>\n            using run_for_at_least_argument_t = typename std::conditional<is_callable<Fun(Chronometer)>::value, Chronometer, int>::type;\n\n            struct optimized_away_error : std::exception {\n                const char* what() const noexcept override {\n                    return \"could not measure benchmark, maybe it was optimized away\";\n                }\n            };\n\n            template <typename Clock, typename Fun>\n            TimingOf<Clock, Fun, run_for_at_least_argument_t<Clock, Fun>> run_for_at_least(ClockDuration<Clock> how_long, int seed, Fun&& fun) {\n                auto iters = seed;\n                while (iters < (1 << 30)) {\n                    auto&& Timing = measure_one<Clock>(fun, iters, is_callable<Fun(Chronometer)>());\n\n                    if (Timing.elapsed >= how_long) {\n                        return { Timing.elapsed, std::move(Timing.result), iters };\n                    }\n                    iters *= 2;\n                }\n                Catch::throw_exception(optimized_away_error{});\n            }\n        } // namespace Detail\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_run_for_at_least.hpp\n#include <algorithm>\n#include <iterator>\n\nnamespace Catch {\n    namespace Benchmark {\n        template <typename Duration>\n        struct ExecutionPlan {\n            int iterations_per_sample;\n            Duration estimated_duration;\n            Detail::BenchmarkFunction benchmark;\n            Duration warmup_time;\n            int warmup_iterations;\n\n            template <typename Duration2>\n            operator ExecutionPlan<Duration2>() const {\n                return { iterations_per_sample, estimated_duration, benchmark, warmup_time, warmup_iterations };\n            }\n\n            template <typename Clock>\n            std::vector<FloatDuration<Clock>> run(const IConfig &cfg, Environment<FloatDuration<Clock>> env) const {\n                // warmup a bit\n                Detail::run_for_at_least<Clock>(std::chrono::duration_cast<ClockDuration<Clock>>(warmup_time), warmup_iterations, Detail::repeat(now<Clock>{}));\n\n                std::vector<FloatDuration<Clock>> times;\n                times.reserve(cfg.benchmarkSamples());\n                std::generate_n(std::back_inserter(times), cfg.benchmarkSamples(), [this, env] {\n                    Detail::ChronometerModel<Clock> model;\n                    this->benchmark(Chronometer(model, iterations_per_sample));\n                    auto sample_time = model.elapsed() - env.clock_cost.mean;\n                    if (sample_time < FloatDuration<Clock>::zero()) sample_time = FloatDuration<Clock>::zero();\n                    return sample_time / iterations_per_sample;\n                });\n                return times;\n            }\n        };\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_execution_plan.hpp\n// start catch_estimate_clock.hpp\n\n // Environment measurement\n\n\n// start catch_stats.hpp\n\n// Statistical analysis tools\n\n\n#include <algorithm>\n#include <functional>\n#include <vector>\n#include <iterator>\n#include <numeric>\n#include <tuple>\n#include <cmath>\n#include <utility>\n#include <cstddef>\n#include <random>\n\nnamespace Catch {\n    namespace Benchmark {\n        namespace Detail {\n            using sample = std::vector<double>;\n\n            double weighted_average_quantile(int k, int q, std::vector<double>::iterator first, std::vector<double>::iterator last);\n\n            template <typename Iterator>\n            OutlierClassification classify_outliers(Iterator first, Iterator last) {\n                std::vector<double> copy(first, last);\n\n                auto q1 = weighted_average_quantile(1, 4, copy.begin(), copy.end());\n                auto q3 = weighted_average_quantile(3, 4, copy.begin(), copy.end());\n                auto iqr = q3 - q1;\n                auto los = q1 - (iqr * 3.);\n                auto lom = q1 - (iqr * 1.5);\n                auto him = q3 + (iqr * 1.5);\n                auto his = q3 + (iqr * 3.);\n\n                OutlierClassification o;\n                for (; first != last; ++first) {\n                    auto&& t = *first;\n                    if (t < los) ++o.low_severe;\n                    else if (t < lom) ++o.low_mild;\n                    else if (t > his) ++o.high_severe;\n                    else if (t > him) ++o.high_mild;\n                    ++o.samples_seen;\n                }\n                return o;\n            }\n\n            template <typename Iterator>\n            double mean(Iterator first, Iterator last) {\n                auto count = last - first;\n                double sum = std::accumulate(first, last, 0.);\n                return sum / count;\n            }\n\n            template <typename URng, typename Iterator, typename Estimator>\n            sample resample(URng& rng, int resamples, Iterator first, Iterator last, Estimator& estimator) {\n                auto n = last - first;\n                std::uniform_int_distribution<decltype(n)> dist(0, n - 1);\n\n                sample out;\n                out.reserve(resamples);\n                std::generate_n(std::back_inserter(out), resamples, [n, first, &estimator, &dist, &rng] {\n                    std::vector<double> resampled;\n                    resampled.reserve(n);\n                    std::generate_n(std::back_inserter(resampled), n, [first, &dist, &rng] { return first[dist(rng)]; });\n                    return estimator(resampled.begin(), resampled.end());\n                });\n                std::sort(out.begin(), out.end());\n                return out;\n            }\n\n            template <typename Estimator, typename Iterator>\n            sample jackknife(Estimator&& estimator, Iterator first, Iterator last) {\n                auto n = last - first;\n                auto second = std::next(first);\n                sample results;\n                results.reserve(n);\n\n                for (auto it = first; it != last; ++it) {\n                    std::iter_swap(it, first);\n                    results.push_back(estimator(second, last));\n                }\n\n                return results;\n            }\n\n            inline double normal_cdf(double x) {\n                return std::erfc(-x / std::sqrt(2.0)) / 2.0;\n            }\n\n            double erfc_inv(double x);\n\n            double normal_quantile(double p);\n\n            template <typename Iterator, typename Estimator>\n            Estimate<double> bootstrap(double confidence_level, Iterator first, Iterator last, sample const& resample, Estimator&& estimator) {\n                auto n_samples = last - first;\n\n                double point = estimator(first, last);\n                // Degenerate case with a single sample\n                if (n_samples == 1) return { point, point, point, confidence_level };\n\n                sample jack = jackknife(estimator, first, last);\n                double jack_mean = mean(jack.begin(), jack.end());\n                double sum_squares, sum_cubes;\n                std::tie(sum_squares, sum_cubes) = std::accumulate(jack.begin(), jack.end(), std::make_pair(0., 0.), [jack_mean](std::pair<double, double> sqcb, double x) -> std::pair<double, double> {\n                    auto d = jack_mean - x;\n                    auto d2 = d * d;\n                    auto d3 = d2 * d;\n                    return { sqcb.first + d2, sqcb.second + d3 };\n                });\n\n                double accel = sum_cubes / (6 * std::pow(sum_squares, 1.5));\n                int n = static_cast<int>(resample.size());\n                double prob_n = std::count_if(resample.begin(), resample.end(), [point](double x) { return x < point; }) / (double)n;\n                // degenerate case with uniform samples\n                if (prob_n == 0) return { point, point, point, confidence_level };\n\n                double bias = normal_quantile(prob_n);\n                double z1 = normal_quantile((1. - confidence_level) / 2.);\n\n                auto cumn = [n](double x) -> int {\n                    return std::lround(normal_cdf(x) * n); };\n                auto a = [bias, accel](double b) { return bias + b / (1. - accel * b); };\n                double b1 = bias + z1;\n                double b2 = bias - z1;\n                double a1 = a(b1);\n                double a2 = a(b2);\n                auto lo = (std::max)(cumn(a1), 0);\n                auto hi = (std::min)(cumn(a2), n - 1);\n\n                return { point, resample[lo], resample[hi], confidence_level };\n            }\n\n            double outlier_variance(Estimate<double> mean, Estimate<double> stddev, int n);\n\n            struct bootstrap_analysis {\n                Estimate<double> mean;\n                Estimate<double> standard_deviation;\n                double outlier_variance;\n            };\n\n            bootstrap_analysis analyse_samples(double confidence_level, int n_resamples, std::vector<double>::iterator first, std::vector<double>::iterator last);\n        } // namespace Detail\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_stats.hpp\n#include <algorithm>\n#include <iterator>\n#include <tuple>\n#include <vector>\n#include <cmath>\n\nnamespace Catch {\n    namespace Benchmark {\n        namespace Detail {\n            template <typename Clock>\n            std::vector<double> resolution(int k) {\n                std::vector<TimePoint<Clock>> times;\n                times.reserve(k + 1);\n                std::generate_n(std::back_inserter(times), k + 1, now<Clock>{});\n\n                std::vector<double> deltas;\n                deltas.reserve(k);\n                std::transform(std::next(times.begin()), times.end(), times.begin(),\n                    std::back_inserter(deltas),\n                    [](TimePoint<Clock> a, TimePoint<Clock> b) { return static_cast<double>((a - b).count()); });\n\n                return deltas;\n            }\n\n            const auto warmup_iterations = 10000;\n            const auto warmup_time = std::chrono::milliseconds(100);\n            const auto minimum_ticks = 1000;\n            const auto warmup_seed = 10000;\n            const auto clock_resolution_estimation_time = std::chrono::milliseconds(500);\n            const auto clock_cost_estimation_time_limit = std::chrono::seconds(1);\n            const auto clock_cost_estimation_tick_limit = 100000;\n            const auto clock_cost_estimation_time = std::chrono::milliseconds(10);\n            const auto clock_cost_estimation_iterations = 10000;\n\n            template <typename Clock>\n            int warmup() {\n                return run_for_at_least<Clock>(std::chrono::duration_cast<ClockDuration<Clock>>(warmup_time), warmup_seed, &resolution<Clock>)\n                    .iterations;\n            }\n            template <typename Clock>\n            EnvironmentEstimate<FloatDuration<Clock>> estimate_clock_resolution(int iterations) {\n                auto r = run_for_at_least<Clock>(std::chrono::duration_cast<ClockDuration<Clock>>(clock_resolution_estimation_time), iterations, &resolution<Clock>)\n                    .result;\n                return {\n                    FloatDuration<Clock>(mean(r.begin(), r.end())),\n                    classify_outliers(r.begin(), r.end()),\n                };\n            }\n            template <typename Clock>\n            EnvironmentEstimate<FloatDuration<Clock>> estimate_clock_cost(FloatDuration<Clock> resolution) {\n                auto time_limit = (std::min)(\n                    resolution * clock_cost_estimation_tick_limit,\n                    FloatDuration<Clock>(clock_cost_estimation_time_limit));\n                auto time_clock = [](int k) {\n                    return Detail::measure<Clock>([k] {\n                        for (int i = 0; i < k; ++i) {\n                            volatile auto ignored = Clock::now();\n                            (void)ignored;\n                        }\n                    }).elapsed;\n                };\n                time_clock(1);\n                int iters = clock_cost_estimation_iterations;\n                auto&& r = run_for_at_least<Clock>(std::chrono::duration_cast<ClockDuration<Clock>>(clock_cost_estimation_time), iters, time_clock);\n                std::vector<double> times;\n                int nsamples = static_cast<int>(std::ceil(time_limit / r.elapsed));\n                times.reserve(nsamples);\n                std::generate_n(std::back_inserter(times), nsamples, [time_clock, &r] {\n                    return static_cast<double>((time_clock(r.iterations) / r.iterations).count());\n                });\n                return {\n                    FloatDuration<Clock>(mean(times.begin(), times.end())),\n                    classify_outliers(times.begin(), times.end()),\n                };\n            }\n\n            template <typename Clock>\n            Environment<FloatDuration<Clock>> measure_environment() {\n                static Environment<FloatDuration<Clock>>* env = nullptr;\n                if (env) {\n                    return *env;\n                }\n\n                auto iters = Detail::warmup<Clock>();\n                auto resolution = Detail::estimate_clock_resolution<Clock>(iters);\n                auto cost = Detail::estimate_clock_cost<Clock>(resolution.mean);\n\n                env = new Environment<FloatDuration<Clock>>{ resolution, cost };\n                return *env;\n            }\n        } // namespace Detail\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_estimate_clock.hpp\n// start catch_analyse.hpp\n\n // Run and analyse one benchmark\n\n\n// start catch_sample_analysis.hpp\n\n// Benchmark results\n\n\n#include <algorithm>\n#include <vector>\n#include <string>\n#include <iterator>\n\nnamespace Catch {\n    namespace Benchmark {\n        template <typename Duration>\n        struct SampleAnalysis {\n            std::vector<Duration> samples;\n            Estimate<Duration> mean;\n            Estimate<Duration> standard_deviation;\n            OutlierClassification outliers;\n            double outlier_variance;\n\n            template <typename Duration2>\n            operator SampleAnalysis<Duration2>() const {\n                std::vector<Duration2> samples2;\n                samples2.reserve(samples.size());\n                std::transform(samples.begin(), samples.end(), std::back_inserter(samples2), [](Duration d) { return Duration2(d); });\n                return {\n                    std::move(samples2),\n                    mean,\n                    standard_deviation,\n                    outliers,\n                    outlier_variance,\n                };\n            }\n        };\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_sample_analysis.hpp\n#include <algorithm>\n#include <iterator>\n#include <vector>\n\nnamespace Catch {\n    namespace Benchmark {\n        namespace Detail {\n            template <typename Duration, typename Iterator>\n            SampleAnalysis<Duration> analyse(const IConfig &cfg, Environment<Duration>, Iterator first, Iterator last) {\n                if (!cfg.benchmarkNoAnalysis()) {\n                    std::vector<double> samples;\n                    samples.reserve(last - first);\n                    std::transform(first, last, std::back_inserter(samples), [](Duration d) { return d.count(); });\n\n                    auto analysis = Catch::Benchmark::Detail::analyse_samples(cfg.benchmarkConfidenceInterval(), cfg.benchmarkResamples(), samples.begin(), samples.end());\n                    auto outliers = Catch::Benchmark::Detail::classify_outliers(samples.begin(), samples.end());\n\n                    auto wrap_estimate = [](Estimate<double> e) {\n                        return Estimate<Duration> {\n                            Duration(e.point),\n                                Duration(e.lower_bound),\n                                Duration(e.upper_bound),\n                                e.confidence_interval,\n                        };\n                    };\n                    std::vector<Duration> samples2;\n                    samples2.reserve(samples.size());\n                    std::transform(samples.begin(), samples.end(), std::back_inserter(samples2), [](double d) { return Duration(d); });\n                    return {\n                        std::move(samples2),\n                        wrap_estimate(analysis.mean),\n                        wrap_estimate(analysis.standard_deviation),\n                        outliers,\n                        analysis.outlier_variance,\n                    };\n                } else {\n                    std::vector<Duration> samples;\n                    samples.reserve(last - first);\n\n                    Duration mean = Duration(0);\n                    int i = 0;\n                    for (auto it = first; it < last; ++it, ++i) {\n                        samples.push_back(Duration(*it));\n                        mean += Duration(*it);\n                    }\n                    mean /= i;\n\n                    return {\n                        std::move(samples),\n                        Estimate<Duration>{mean, mean, mean, 0.0},\n                        Estimate<Duration>{Duration(0), Duration(0), Duration(0), 0.0},\n                        OutlierClassification{},\n                        0.0\n                    };\n                }\n            }\n        } // namespace Detail\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_analyse.hpp\n#include <algorithm>\n#include <functional>\n#include <string>\n#include <vector>\n#include <cmath>\n\nnamespace Catch {\n    namespace Benchmark {\n        struct Benchmark {\n            Benchmark(std::string &&name)\n                : name(std::move(name)) {}\n\n            template <class FUN>\n            Benchmark(std::string &&name, FUN &&func)\n                : fun(std::move(func)), name(std::move(name)) {}\n\n            template <typename Clock>\n            ExecutionPlan<FloatDuration<Clock>> prepare(const IConfig &cfg, Environment<FloatDuration<Clock>> env) const {\n                auto min_time = env.clock_resolution.mean * Detail::minimum_ticks;\n                auto run_time = std::max(min_time, std::chrono::duration_cast<decltype(min_time)>(cfg.benchmarkWarmupTime()));\n                auto&& test = Detail::run_for_at_least<Clock>(std::chrono::duration_cast<ClockDuration<Clock>>(run_time), 1, fun);\n                int new_iters = static_cast<int>(std::ceil(min_time * test.iterations / test.elapsed));\n                return { new_iters, test.elapsed / test.iterations * new_iters * cfg.benchmarkSamples(), fun, std::chrono::duration_cast<FloatDuration<Clock>>(cfg.benchmarkWarmupTime()), Detail::warmup_iterations };\n            }\n\n            template <typename Clock = default_clock>\n            void run() {\n                IConfigPtr cfg = getCurrentContext().getConfig();\n\n                auto env = Detail::measure_environment<Clock>();\n\n                getResultCapture().benchmarkPreparing(name);\n                CATCH_TRY{\n                    auto plan = user_code([&] {\n                        return prepare<Clock>(*cfg, env);\n                    });\n\n                    BenchmarkInfo info {\n                        name,\n                        plan.estimated_duration.count(),\n                        plan.iterations_per_sample,\n                        cfg->benchmarkSamples(),\n                        cfg->benchmarkResamples(),\n                        env.clock_resolution.mean.count(),\n                        env.clock_cost.mean.count()\n                    };\n\n                    getResultCapture().benchmarkStarting(info);\n\n                    auto samples = user_code([&] {\n                        return plan.template run<Clock>(*cfg, env);\n                    });\n\n                    auto analysis = Detail::analyse(*cfg, env, samples.begin(), samples.end());\n                    BenchmarkStats<FloatDuration<Clock>> stats{ info, analysis.samples, analysis.mean, analysis.standard_deviation, analysis.outliers, analysis.outlier_variance };\n                    getResultCapture().benchmarkEnded(stats);\n\n                } CATCH_CATCH_ALL{\n                    if (translateActiveException() != Detail::benchmarkErrorMsg) // benchmark errors have been reported, otherwise rethrow.\n                        std::rethrow_exception(std::current_exception());\n                }\n            }\n\n            // sets lambda to be used in fun *and* executes benchmark!\n            template <typename Fun,\n                typename std::enable_if<!Detail::is_related<Fun, Benchmark>::value, int>::type = 0>\n                Benchmark & operator=(Fun func) {\n                fun = Detail::BenchmarkFunction(func);\n                run();\n                return *this;\n            }\n\n            explicit operator bool() {\n                return true;\n            }\n\n        private:\n            Detail::BenchmarkFunction fun;\n            std::string name;\n        };\n    }\n} // namespace Catch\n\n#define INTERNAL_CATCH_GET_1_ARG(arg1, arg2, ...) arg1\n#define INTERNAL_CATCH_GET_2_ARG(arg1, arg2, ...) arg2\n\n#define INTERNAL_CATCH_BENCHMARK(BenchmarkName, name, benchmarkIndex)\\\n    if( Catch::Benchmark::Benchmark BenchmarkName{name} ) \\\n        BenchmarkName = [&](int benchmarkIndex)\n\n#define INTERNAL_CATCH_BENCHMARK_ADVANCED(BenchmarkName, name)\\\n    if( Catch::Benchmark::Benchmark BenchmarkName{name} ) \\\n        BenchmarkName = [&]\n\n// end catch_benchmark.hpp\n// start catch_constructor.hpp\n\n// Constructor and destructor helpers\n\n\n#include <type_traits>\n\nnamespace Catch {\n    namespace Benchmark {\n        namespace Detail {\n            template <typename T, bool Destruct>\n            struct ObjectStorage\n            {\n                ObjectStorage() : data() {}\n\n                ObjectStorage(const ObjectStorage& other)\n                {\n                    new(&data) T(other.stored_object());\n                }\n\n                ObjectStorage(ObjectStorage&& other)\n                {\n                    new(&data) T(std::move(other.stored_object()));\n                }\n\n                ~ObjectStorage() { destruct_on_exit<T>(); }\n\n                template <typename... Args>\n                void construct(Args&&... args)\n                {\n                    new (&data) T(std::forward<Args>(args)...);\n                }\n\n                template <bool AllowManualDestruction = !Destruct>\n                typename std::enable_if<AllowManualDestruction>::type destruct()\n                {\n                    stored_object().~T();\n                }\n\n            private:\n                // If this is a constructor benchmark, destruct the underlying object\n                template <typename U>\n                void destruct_on_exit(typename std::enable_if<Destruct, U>::type* = 0) { destruct<true>(); }\n                // Otherwise, don't\n                template <typename U>\n                void destruct_on_exit(typename std::enable_if<!Destruct, U>::type* = 0) { }\n\n                T& stored_object() {\n                    return *static_cast<T*>(static_cast<void*>(&data));\n                }\n\n                T const& stored_object() const {\n                    return *static_cast<T*>(static_cast<void*>(&data));\n                }\n\n                struct { alignas(T) unsigned char data[sizeof(T)]; }  data;\n            };\n        }\n\n        template <typename T>\n        using storage_for = Detail::ObjectStorage<T, true>;\n\n        template <typename T>\n        using destructable_object = Detail::ObjectStorage<T, false>;\n    }\n}\n\n// end catch_constructor.hpp\n// end catch_benchmarking_all.hpp\n#endif\n\n#endif // ! CATCH_CONFIG_IMPL_ONLY\n\n#ifdef CATCH_IMPL\n// start catch_impl.hpp\n\n#ifdef __clang__\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wweak-vtables\"\n#endif\n\n// Keep these here for external reporters\n// start catch_test_case_tracker.h\n\n#include <string>\n#include <vector>\n#include <memory>\n\nnamespace Catch {\nnamespace TestCaseTracking {\n\n    struct NameAndLocation {\n        std::string name;\n        SourceLineInfo location;\n\n        NameAndLocation( std::string const& _name, SourceLineInfo const& _location );\n        friend bool operator==(NameAndLocation const& lhs, NameAndLocation const& rhs) {\n            return lhs.name == rhs.name\n                && lhs.location == rhs.location;\n        }\n    };\n\n    class ITracker;\n\n    using ITrackerPtr = std::shared_ptr<ITracker>;\n\n    class  ITracker {\n        NameAndLocation m_nameAndLocation;\n\n    public:\n        ITracker(NameAndLocation const& nameAndLoc) :\n            m_nameAndLocation(nameAndLoc)\n        {}\n\n        // static queries\n        NameAndLocation const& nameAndLocation() const {\n            return m_nameAndLocation;\n        }\n\n        virtual ~ITracker();\n\n        // dynamic queries\n        virtual bool isComplete() const = 0; // Successfully completed or failed\n        virtual bool isSuccessfullyCompleted() const = 0;\n        virtual bool isOpen() const = 0; // Started but not complete\n        virtual bool hasChildren() const = 0;\n        virtual bool hasStarted() const = 0;\n\n        virtual ITracker& parent() = 0;\n\n        // actions\n        virtual void close() = 0; // Successfully complete\n        virtual void fail() = 0;\n        virtual void markAsNeedingAnotherRun() = 0;\n\n        virtual void addChild( ITrackerPtr const& child ) = 0;\n        virtual ITrackerPtr findChild( NameAndLocation const& nameAndLocation ) = 0;\n        virtual void openChild() = 0;\n\n        // Debug/ checking\n        virtual bool isSectionTracker() const = 0;\n        virtual bool isGeneratorTracker() const = 0;\n    };\n\n    class TrackerContext {\n\n        enum RunState {\n            NotStarted,\n            Executing,\n            CompletedCycle\n        };\n\n        ITrackerPtr m_rootTracker;\n        ITracker* m_currentTracker = nullptr;\n        RunState m_runState = NotStarted;\n\n    public:\n\n        ITracker& startRun();\n        void endRun();\n\n        void startCycle();\n        void completeCycle();\n\n        bool completedCycle() const;\n        ITracker& currentTracker();\n        void setCurrentTracker( ITracker* tracker );\n    };\n\n    class TrackerBase : public ITracker {\n    protected:\n        enum CycleState {\n            NotStarted,\n            Executing,\n            ExecutingChildren,\n            NeedsAnotherRun,\n            CompletedSuccessfully,\n            Failed\n        };\n\n        using Children = std::vector<ITrackerPtr>;\n        TrackerContext& m_ctx;\n        ITracker* m_parent;\n        Children m_children;\n        CycleState m_runState = NotStarted;\n\n    public:\n        TrackerBase( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent );\n\n        bool isComplete() const override;\n        bool isSuccessfullyCompleted() const override;\n        bool isOpen() const override;\n        bool hasChildren() const override;\n        bool hasStarted() const override {\n            return m_runState != NotStarted;\n        }\n\n        void addChild( ITrackerPtr const& child ) override;\n\n        ITrackerPtr findChild( NameAndLocation const& nameAndLocation ) override;\n        ITracker& parent() override;\n\n        void openChild() override;\n\n        bool isSectionTracker() const override;\n        bool isGeneratorTracker() const override;\n\n        void open();\n\n        void close() override;\n        void fail() override;\n        void markAsNeedingAnotherRun() override;\n\n    private:\n        void moveToParent();\n        void moveToThis();\n    };\n\n    class SectionTracker : public TrackerBase {\n        std::vector<std::string> m_filters;\n        std::string m_trimmed_name;\n    public:\n        SectionTracker( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent );\n\n        bool isSectionTracker() const override;\n\n        bool isComplete() const override;\n\n        static SectionTracker& acquire( TrackerContext& ctx, NameAndLocation const& nameAndLocation );\n\n        void tryOpen();\n\n        void addInitialFilters( std::vector<std::string> const& filters );\n        void addNextFilters( std::vector<std::string> const& filters );\n        //! Returns filters active in this tracker\n        std::vector<std::string> const& getFilters() const;\n        //! Returns whitespace-trimmed name of the tracked section\n        std::string const& trimmedName() const;\n    };\n\n} // namespace TestCaseTracking\n\nusing TestCaseTracking::ITracker;\nusing TestCaseTracking::TrackerContext;\nusing TestCaseTracking::SectionTracker;\n\n} // namespace Catch\n\n// end catch_test_case_tracker.h\n\n// start catch_leak_detector.h\n\nnamespace Catch {\n\n    struct LeakDetector {\n        LeakDetector();\n        ~LeakDetector();\n    };\n\n}\n// end catch_leak_detector.h\n// Cpp files will be included in the single-header file here\n// start catch_stats.cpp\n\n// Statistical analysis tools\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n\n#include <cassert>\n#include <random>\n\n#if defined(CATCH_CONFIG_USE_ASYNC)\n#include <future>\n#endif\n\nnamespace {\n    double erf_inv(double x) {\n        // Code accompanying the article \"Approximating the erfinv function\" in GPU Computing Gems, Volume 2\n        double w, p;\n\n        w = -log((1.0 - x) * (1.0 + x));\n\n        if (w < 6.250000) {\n            w = w - 3.125000;\n            p = -3.6444120640178196996e-21;\n            p = -1.685059138182016589e-19 + p * w;\n            p = 1.2858480715256400167e-18 + p * w;\n            p = 1.115787767802518096e-17 + p * w;\n            p = -1.333171662854620906e-16 + p * w;\n            p = 2.0972767875968561637e-17 + p * w;\n            p = 6.6376381343583238325e-15 + p * w;\n            p = -4.0545662729752068639e-14 + p * w;\n            p = -8.1519341976054721522e-14 + p * w;\n            p = 2.6335093153082322977e-12 + p * w;\n            p = -1.2975133253453532498e-11 + p * w;\n            p = -5.4154120542946279317e-11 + p * w;\n            p = 1.051212273321532285e-09 + p * w;\n            p = -4.1126339803469836976e-09 + p * w;\n            p = -2.9070369957882005086e-08 + p * w;\n            p = 4.2347877827932403518e-07 + p * w;\n            p = -1.3654692000834678645e-06 + p * w;\n            p = -1.3882523362786468719e-05 + p * w;\n            p = 0.0001867342080340571352 + p * w;\n            p = -0.00074070253416626697512 + p * w;\n            p = -0.0060336708714301490533 + p * w;\n            p = 0.24015818242558961693 + p * w;\n            p = 1.6536545626831027356 + p * w;\n        } else if (w < 16.000000) {\n            w = sqrt(w) - 3.250000;\n            p = 2.2137376921775787049e-09;\n            p = 9.0756561938885390979e-08 + p * w;\n            p = -2.7517406297064545428e-07 + p * w;\n            p = 1.8239629214389227755e-08 + p * w;\n            p = 1.5027403968909827627e-06 + p * w;\n            p = -4.013867526981545969e-06 + p * w;\n            p = 2.9234449089955446044e-06 + p * w;\n            p = 1.2475304481671778723e-05 + p * w;\n            p = -4.7318229009055733981e-05 + p * w;\n            p = 6.8284851459573175448e-05 + p * w;\n            p = 2.4031110387097893999e-05 + p * w;\n            p = -0.0003550375203628474796 + p * w;\n            p = 0.00095328937973738049703 + p * w;\n            p = -0.0016882755560235047313 + p * w;\n            p = 0.0024914420961078508066 + p * w;\n            p = -0.0037512085075692412107 + p * w;\n            p = 0.005370914553590063617 + p * w;\n            p = 1.0052589676941592334 + p * w;\n            p = 3.0838856104922207635 + p * w;\n        } else {\n            w = sqrt(w) - 5.000000;\n            p = -2.7109920616438573243e-11;\n            p = -2.5556418169965252055e-10 + p * w;\n            p = 1.5076572693500548083e-09 + p * w;\n            p = -3.7894654401267369937e-09 + p * w;\n            p = 7.6157012080783393804e-09 + p * w;\n            p = -1.4960026627149240478e-08 + p * w;\n            p = 2.9147953450901080826e-08 + p * w;\n            p = -6.7711997758452339498e-08 + p * w;\n            p = 2.2900482228026654717e-07 + p * w;\n            p = -9.9298272942317002539e-07 + p * w;\n            p = 4.5260625972231537039e-06 + p * w;\n            p = -1.9681778105531670567e-05 + p * w;\n            p = 7.5995277030017761139e-05 + p * w;\n            p = -0.00021503011930044477347 + p * w;\n            p = -0.00013871931833623122026 + p * w;\n            p = 1.0103004648645343977 + p * w;\n            p = 4.8499064014085844221 + p * w;\n        }\n        return p * x;\n    }\n\n    double standard_deviation(std::vector<double>::iterator first, std::vector<double>::iterator last) {\n        auto m = Catch::Benchmark::Detail::mean(first, last);\n        double variance = std::accumulate(first, last, 0., [m](double a, double b) {\n            double diff = b - m;\n            return a + diff * diff;\n            }) / (last - first);\n            return std::sqrt(variance);\n    }\n\n}\n\nnamespace Catch {\n    namespace Benchmark {\n        namespace Detail {\n\n            double weighted_average_quantile(int k, int q, std::vector<double>::iterator first, std::vector<double>::iterator last) {\n                auto count = last - first;\n                double idx = (count - 1) * k / static_cast<double>(q);\n                int j = static_cast<int>(idx);\n                double g = idx - j;\n                std::nth_element(first, first + j, last);\n                auto xj = first[j];\n                if (g == 0) return xj;\n\n                auto xj1 = *std::min_element(first + (j + 1), last);\n                return xj + g * (xj1 - xj);\n            }\n\n            double erfc_inv(double x) {\n                return erf_inv(1.0 - x);\n            }\n\n            double normal_quantile(double p) {\n                static const double ROOT_TWO = std::sqrt(2.0);\n\n                double result = 0.0;\n                assert(p >= 0 && p <= 1);\n                if (p < 0 || p > 1) {\n                    return result;\n                }\n\n                result = -erfc_inv(2.0 * p);\n                // result *= normal distribution standard deviation (1.0) * sqrt(2)\n                result *= /*sd * */ ROOT_TWO;\n                // result += normal disttribution mean (0)\n                return result;\n            }\n\n            double outlier_variance(Estimate<double> mean, Estimate<double> stddev, int n) {\n                double sb = stddev.point;\n                double mn = mean.point / n;\n                double mg_min = mn / 2.;\n                double sg = (std::min)(mg_min / 4., sb / std::sqrt(n));\n                double sg2 = sg * sg;\n                double sb2 = sb * sb;\n\n                auto c_max = [n, mn, sb2, sg2](double x) -> double {\n                    double k = mn - x;\n                    double d = k * k;\n                    double nd = n * d;\n                    double k0 = -n * nd;\n                    double k1 = sb2 - n * sg2 + nd;\n                    double det = k1 * k1 - 4 * sg2 * k0;\n                    return (int)(-2. * k0 / (k1 + std::sqrt(det)));\n                };\n\n                auto var_out = [n, sb2, sg2](double c) {\n                    double nc = n - c;\n                    return (nc / n) * (sb2 - nc * sg2);\n                };\n\n                return (std::min)(var_out(1), var_out((std::min)(c_max(0.), c_max(mg_min)))) / sb2;\n            }\n\n            bootstrap_analysis analyse_samples(double confidence_level, int n_resamples, std::vector<double>::iterator first, std::vector<double>::iterator last) {\n                CATCH_INTERNAL_START_WARNINGS_SUPPRESSION\n                CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS\n                static std::random_device entropy;\n                CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION\n\n                auto n = static_cast<int>(last - first); // seriously, one can't use integral types without hell in C++\n\n                auto mean = &Detail::mean<std::vector<double>::iterator>;\n                auto stddev = &standard_deviation;\n\n#if defined(CATCH_CONFIG_USE_ASYNC)\n                auto Estimate = [=](double(*f)(std::vector<double>::iterator, std::vector<double>::iterator)) {\n                    auto seed = entropy();\n                    return std::async(std::launch::async, [=] {\n                        std::mt19937 rng(seed);\n                        auto resampled = resample(rng, n_resamples, first, last, f);\n                        return bootstrap(confidence_level, first, last, resampled, f);\n                    });\n                };\n\n                auto mean_future = Estimate(mean);\n                auto stddev_future = Estimate(stddev);\n\n                auto mean_estimate = mean_future.get();\n                auto stddev_estimate = stddev_future.get();\n#else\n                auto Estimate = [=](double(*f)(std::vector<double>::iterator, std::vector<double>::iterator)) {\n                    auto seed = entropy();\n                    std::mt19937 rng(seed);\n                    auto resampled = resample(rng, n_resamples, first, last, f);\n                    return bootstrap(confidence_level, first, last, resampled, f);\n                };\n\n                auto mean_estimate = Estimate(mean);\n                auto stddev_estimate = Estimate(stddev);\n#endif // CATCH_USE_ASYNC\n\n                double outlier_variance = Detail::outlier_variance(mean_estimate, stddev_estimate, n);\n\n                return { mean_estimate, stddev_estimate, outlier_variance };\n            }\n        } // namespace Detail\n    } // namespace Benchmark\n} // namespace Catch\n\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n// end catch_stats.cpp\n// start catch_approx.cpp\n\n#include <cmath>\n#include <limits>\n\nnamespace {\n\n// Performs equivalent check of std::fabs(lhs - rhs) <= margin\n// But without the subtraction to allow for INFINITY in comparison\nbool marginComparison(double lhs, double rhs, double margin) {\n    return (lhs + margin >= rhs) && (rhs + margin >= lhs);\n}\n\n}\n\nnamespace Catch {\nnamespace Detail {\n\n    Approx::Approx ( double value )\n    :   m_epsilon( std::numeric_limits<float>::epsilon()*100 ),\n        m_margin( 0.0 ),\n        m_scale( 0.0 ),\n        m_value( value )\n    {}\n\n    Approx Approx::custom() {\n        return Approx( 0 );\n    }\n\n    Approx Approx::operator-() const {\n        auto temp(*this);\n        temp.m_value = -temp.m_value;\n        return temp;\n    }\n\n    std::string Approx::toString() const {\n        ReusableStringStream rss;\n        rss << \"Approx( \" << ::Catch::Detail::stringify( m_value ) << \" )\";\n        return rss.str();\n    }\n\n    bool Approx::equalityComparisonImpl(const double other) const {\n        // First try with fixed margin, then compute margin based on epsilon, scale and Approx's value\n        // Thanks to Richard Harris for his help refining the scaled margin value\n        return marginComparison(m_value, other, m_margin)\n            || marginComparison(m_value, other, m_epsilon * (m_scale + std::fabs(std::isinf(m_value)? 0 : m_value)));\n    }\n\n    void Approx::setMargin(double newMargin) {\n        CATCH_ENFORCE(newMargin >= 0,\n            \"Invalid Approx::margin: \" << newMargin << '.'\n            << \" Approx::Margin has to be non-negative.\");\n        m_margin = newMargin;\n    }\n\n    void Approx::setEpsilon(double newEpsilon) {\n        CATCH_ENFORCE(newEpsilon >= 0 && newEpsilon <= 1.0,\n            \"Invalid Approx::epsilon: \" << newEpsilon << '.'\n            << \" Approx::epsilon has to be in [0, 1]\");\n        m_epsilon = newEpsilon;\n    }\n\n} // end namespace Detail\n\nnamespace literals {\n    Detail::Approx operator \"\" _a(long double val) {\n        return Detail::Approx(val);\n    }\n    Detail::Approx operator \"\" _a(unsigned long long val) {\n        return Detail::Approx(val);\n    }\n} // end namespace literals\n\nstd::string StringMaker<Catch::Detail::Approx>::convert(Catch::Detail::Approx const& value) {\n    return value.toString();\n}\n\n} // end namespace Catch\n// end catch_approx.cpp\n// start catch_assertionhandler.cpp\n\n// start catch_debugger.h\n\nnamespace Catch {\n    bool isDebuggerActive();\n}\n\n#ifdef CATCH_PLATFORM_MAC\n\n    #if defined(__i386__) || defined(__x86_64__)\n        #define CATCH_TRAP() __asm__(\"int $3\\n\" : : ) /* NOLINT */\n    #elif defined(__aarch64__)\n        #define CATCH_TRAP()  __asm__(\".inst 0xd43e0000\")\n    #endif\n\n#elif defined(CATCH_PLATFORM_IPHONE)\n\n    // use inline assembler\n    #if defined(__i386__) || defined(__x86_64__)\n        #define CATCH_TRAP()  __asm__(\"int $3\")\n    #elif defined(__aarch64__)\n        #define CATCH_TRAP()  __asm__(\".inst 0xd4200000\")\n    #elif defined(__arm__) && !defined(__thumb__)\n        #define CATCH_TRAP()  __asm__(\".inst 0xe7f001f0\")\n    #elif defined(__arm__) &&  defined(__thumb__)\n        #define CATCH_TRAP()  __asm__(\".inst 0xde01\")\n    #endif\n\n#elif defined(CATCH_PLATFORM_LINUX)\n    // If we can use inline assembler, do it because this allows us to break\n    // directly at the location of the failing check instead of breaking inside\n    // raise() called from it, i.e. one stack frame below.\n    #if defined(__GNUC__) && (defined(__i386) || defined(__x86_64))\n        #define CATCH_TRAP() asm volatile (\"int $3\") /* NOLINT */\n    #else // Fall back to the generic way.\n        #include <signal.h>\n\n        #define CATCH_TRAP() raise(SIGTRAP)\n    #endif\n#elif defined(_MSC_VER)\n    #define CATCH_TRAP() __debugbreak()\n#elif defined(__MINGW32__)\n    extern \"C\" __declspec(dllimport) void __stdcall DebugBreak();\n    #define CATCH_TRAP() DebugBreak()\n#endif\n\n#ifndef CATCH_BREAK_INTO_DEBUGGER\n    #ifdef CATCH_TRAP\n        #define CATCH_BREAK_INTO_DEBUGGER() []{ if( Catch::isDebuggerActive() ) { CATCH_TRAP(); } }()\n    #else\n        #define CATCH_BREAK_INTO_DEBUGGER() []{}()\n    #endif\n#endif\n\n// end catch_debugger.h\n// start catch_run_context.h\n\n// start catch_fatal_condition.h\n\n#include <cassert>\n\nnamespace Catch {\n\n    // Wrapper for platform-specific fatal error (signals/SEH) handlers\n    //\n    // Tries to be cooperative with other handlers, and not step over\n    // other handlers. This means that unknown structured exceptions\n    // are passed on, previous signal handlers are called, and so on.\n    //\n    // Can only be instantiated once, and assumes that once a signal\n    // is caught, the binary will end up terminating. Thus, there\n    class FatalConditionHandler {\n        bool m_started = false;\n\n        // Install/disengage implementation for specific platform.\n        // Should be if-defed to work on current platform, can assume\n        // engage-disengage 1:1 pairing.\n        void engage_platform();\n        void disengage_platform();\n    public:\n        // Should also have platform-specific implementations as needed\n        FatalConditionHandler();\n        ~FatalConditionHandler();\n\n        void engage() {\n            assert(!m_started && \"Handler cannot be installed twice.\");\n            m_started = true;\n            engage_platform();\n        }\n\n        void disengage() {\n            assert(m_started && \"Handler cannot be uninstalled without being installed first\");\n            m_started = false;\n            disengage_platform();\n        }\n    };\n\n    //! Simple RAII guard for (dis)engaging the FatalConditionHandler\n    class FatalConditionHandlerGuard {\n        FatalConditionHandler* m_handler;\n    public:\n        FatalConditionHandlerGuard(FatalConditionHandler* handler):\n            m_handler(handler) {\n            m_handler->engage();\n        }\n        ~FatalConditionHandlerGuard() {\n            m_handler->disengage();\n        }\n    };\n\n} // end namespace Catch\n\n// end catch_fatal_condition.h\n#include <string>\n\nnamespace Catch {\n\n    struct IMutableContext;\n\n    ///////////////////////////////////////////////////////////////////////////\n\n    class RunContext : public IResultCapture, public IRunner {\n\n    public:\n        RunContext( RunContext const& ) = delete;\n        RunContext& operator =( RunContext const& ) = delete;\n\n        explicit RunContext( IConfigPtr const& _config, IStreamingReporterPtr&& reporter );\n\n        ~RunContext() override;\n\n        void testGroupStarting( std::string const& testSpec, std::size_t groupIndex, std::size_t groupsCount );\n        void testGroupEnded( std::string const& testSpec, Totals const& totals, std::size_t groupIndex, std::size_t groupsCount );\n\n        Totals runTest(TestCase const& testCase);\n\n        IConfigPtr config() const;\n        IStreamingReporter& reporter() const;\n\n    public: // IResultCapture\n\n        // Assertion handlers\n        void handleExpr\n                (   AssertionInfo const& info,\n                    ITransientExpression const& expr,\n                    AssertionReaction& reaction ) override;\n        void handleMessage\n                (   AssertionInfo const& info,\n                    ResultWas::OfType resultType,\n                    StringRef const& message,\n                    AssertionReaction& reaction ) override;\n        void handleUnexpectedExceptionNotThrown\n                (   AssertionInfo const& info,\n                    AssertionReaction& reaction ) override;\n        void handleUnexpectedInflightException\n                (   AssertionInfo const& info,\n                    std::string const& message,\n                    AssertionReaction& reaction ) override;\n        void handleIncomplete\n                (   AssertionInfo const& info ) override;\n        void handleNonExpr\n                (   AssertionInfo const &info,\n                    ResultWas::OfType resultType,\n                    AssertionReaction &reaction ) override;\n\n        bool sectionStarted( SectionInfo const& sectionInfo, Counts& assertions ) override;\n\n        void sectionEnded( SectionEndInfo const& endInfo ) override;\n        void sectionEndedEarly( SectionEndInfo const& endInfo ) override;\n\n        auto acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker& override;\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n        void benchmarkPreparing( std::string const& name ) override;\n        void benchmarkStarting( BenchmarkInfo const& info ) override;\n        void benchmarkEnded( BenchmarkStats<> const& stats ) override;\n        void benchmarkFailed( std::string const& error ) override;\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n\n        void pushScopedMessage( MessageInfo const& message ) override;\n        void popScopedMessage( MessageInfo const& message ) override;\n\n        void emplaceUnscopedMessage( MessageBuilder const& builder ) override;\n\n        std::string getCurrentTestName() const override;\n\n        const AssertionResult* getLastResult() const override;\n\n        void exceptionEarlyReported() override;\n\n        void handleFatalErrorCondition( StringRef message ) override;\n\n        bool lastAssertionPassed() override;\n\n        void assertionPassed() override;\n\n    public:\n        // !TBD We need to do this another way!\n        bool aborting() const final;\n\n    private:\n\n        void runCurrentTest( std::string& redirectedCout, std::string& redirectedCerr );\n        void invokeActiveTestCase();\n\n        void resetAssertionInfo();\n        bool testForMissingAssertions( Counts& assertions );\n\n        void assertionEnded( AssertionResult const& result );\n        void reportExpr\n                (   AssertionInfo const &info,\n                    ResultWas::OfType resultType,\n                    ITransientExpression const *expr,\n                    bool negated );\n\n        void populateReaction( AssertionReaction& reaction );\n\n    private:\n\n        void handleUnfinishedSections();\n\n        TestRunInfo m_runInfo;\n        IMutableContext& m_context;\n        TestCase const* m_activeTestCase = nullptr;\n        ITracker* m_testCaseTracker = nullptr;\n        Option<AssertionResult> m_lastResult;\n\n        IConfigPtr m_config;\n        Totals m_totals;\n        IStreamingReporterPtr m_reporter;\n        std::vector<MessageInfo> m_messages;\n        std::vector<ScopedMessage> m_messageScopes; /* Keeps owners of so-called unscoped messages. */\n        AssertionInfo m_lastAssertionInfo;\n        std::vector<SectionEndInfo> m_unfinishedSections;\n        std::vector<ITracker*> m_activeSections;\n        TrackerContext m_trackerContext;\n        FatalConditionHandler m_fatalConditionhandler;\n        bool m_lastAssertionPassed = false;\n        bool m_shouldReportUnexpected = true;\n        bool m_includeSuccessfulResults;\n    };\n\n    void seedRng(IConfig const& config);\n    unsigned int rngSeed();\n} // end namespace Catch\n\n// end catch_run_context.h\nnamespace Catch {\n\n    namespace {\n        auto operator <<( std::ostream& os, ITransientExpression const& expr ) -> std::ostream& {\n            expr.streamReconstructedExpression( os );\n            return os;\n        }\n    }\n\n    LazyExpression::LazyExpression( bool isNegated )\n    :   m_isNegated( isNegated )\n    {}\n\n    LazyExpression::LazyExpression( LazyExpression const& other ) : m_isNegated( other.m_isNegated ) {}\n\n    LazyExpression::operator bool() const {\n        return m_transientExpression != nullptr;\n    }\n\n    auto operator << ( std::ostream& os, LazyExpression const& lazyExpr ) -> std::ostream& {\n        if( lazyExpr.m_isNegated )\n            os << \"!\";\n\n        if( lazyExpr ) {\n            if( lazyExpr.m_isNegated && lazyExpr.m_transientExpression->isBinaryExpression() )\n                os << \"(\" << *lazyExpr.m_transientExpression << \")\";\n            else\n                os << *lazyExpr.m_transientExpression;\n        }\n        else {\n            os << \"{** error - unchecked empty expression requested **}\";\n        }\n        return os;\n    }\n\n    AssertionHandler::AssertionHandler\n        (   StringRef const& macroName,\n            SourceLineInfo const& lineInfo,\n            StringRef capturedExpression,\n            ResultDisposition::Flags resultDisposition )\n    :   m_assertionInfo{ macroName, lineInfo, capturedExpression, resultDisposition },\n        m_resultCapture( getResultCapture() )\n    {}\n\n    void AssertionHandler::handleExpr( ITransientExpression const& expr ) {\n        m_resultCapture.handleExpr( m_assertionInfo, expr, m_reaction );\n    }\n    void AssertionHandler::handleMessage(ResultWas::OfType resultType, StringRef const& message) {\n        m_resultCapture.handleMessage( m_assertionInfo, resultType, message, m_reaction );\n    }\n\n    auto AssertionHandler::allowThrows() const -> bool {\n        return getCurrentContext().getConfig()->allowThrows();\n    }\n\n    void AssertionHandler::complete() {\n        setCompleted();\n        if( m_reaction.shouldDebugBreak ) {\n\n            // If you find your debugger stopping you here then go one level up on the\n            // call-stack for the code that caused it (typically a failed assertion)\n\n            // (To go back to the test and change execution, jump over the throw, next)\n            CATCH_BREAK_INTO_DEBUGGER();\n        }\n        if (m_reaction.shouldThrow) {\n#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)\n            throw Catch::TestFailureException();\n#else\n            CATCH_ERROR( \"Test failure requires aborting test!\" );\n#endif\n        }\n    }\n    void AssertionHandler::setCompleted() {\n        m_completed = true;\n    }\n\n    void AssertionHandler::handleUnexpectedInflightException() {\n        m_resultCapture.handleUnexpectedInflightException( m_assertionInfo, Catch::translateActiveException(), m_reaction );\n    }\n\n    void AssertionHandler::handleExceptionThrownAsExpected() {\n        m_resultCapture.handleNonExpr(m_assertionInfo, ResultWas::Ok, m_reaction);\n    }\n    void AssertionHandler::handleExceptionNotThrownAsExpected() {\n        m_resultCapture.handleNonExpr(m_assertionInfo, ResultWas::Ok, m_reaction);\n    }\n\n    void AssertionHandler::handleUnexpectedExceptionNotThrown() {\n        m_resultCapture.handleUnexpectedExceptionNotThrown( m_assertionInfo, m_reaction );\n    }\n\n    void AssertionHandler::handleThrowingCallSkipped() {\n        m_resultCapture.handleNonExpr(m_assertionInfo, ResultWas::Ok, m_reaction);\n    }\n\n    // This is the overload that takes a string and infers the Equals matcher from it\n    // The more general overload, that takes any string matcher, is in catch_capture_matchers.cpp\n    void handleExceptionMatchExpr( AssertionHandler& handler, std::string const& str, StringRef const& matcherString  ) {\n        handleExceptionMatchExpr( handler, Matchers::Equals( str ), matcherString );\n    }\n\n} // namespace Catch\n// end catch_assertionhandler.cpp\n// start catch_assertionresult.cpp\n\nnamespace Catch {\n    AssertionResultData::AssertionResultData(ResultWas::OfType _resultType, LazyExpression const & _lazyExpression):\n        lazyExpression(_lazyExpression),\n        resultType(_resultType) {}\n\n    std::string AssertionResultData::reconstructExpression() const {\n\n        if( reconstructedExpression.empty() ) {\n            if( lazyExpression ) {\n                ReusableStringStream rss;\n                rss << lazyExpression;\n                reconstructedExpression = rss.str();\n            }\n        }\n        return reconstructedExpression;\n    }\n\n    AssertionResult::AssertionResult( AssertionInfo const& info, AssertionResultData const& data )\n    :   m_info( info ),\n        m_resultData( data )\n    {}\n\n    // Result was a success\n    bool AssertionResult::succeeded() const {\n        return Catch::isOk( m_resultData.resultType );\n    }\n\n    // Result was a success, or failure is suppressed\n    bool AssertionResult::isOk() const {\n        return Catch::isOk( m_resultData.resultType ) || shouldSuppressFailure( m_info.resultDisposition );\n    }\n\n    ResultWas::OfType AssertionResult::getResultType() const {\n        return m_resultData.resultType;\n    }\n\n    bool AssertionResult::hasExpression() const {\n        return !m_info.capturedExpression.empty();\n    }\n\n    bool AssertionResult::hasMessage() const {\n        return !m_resultData.message.empty();\n    }\n\n    std::string AssertionResult::getExpression() const {\n        // Possibly overallocating by 3 characters should be basically free\n        std::string expr; expr.reserve(m_info.capturedExpression.size() + 3);\n        if (isFalseTest(m_info.resultDisposition)) {\n            expr += \"!(\";\n        }\n        expr += m_info.capturedExpression;\n        if (isFalseTest(m_info.resultDisposition)) {\n            expr += ')';\n        }\n        return expr;\n    }\n\n    std::string AssertionResult::getExpressionInMacro() const {\n        std::string expr;\n        if( m_info.macroName.empty() )\n            expr = static_cast<std::string>(m_info.capturedExpression);\n        else {\n            expr.reserve( m_info.macroName.size() + m_info.capturedExpression.size() + 4 );\n            expr += m_info.macroName;\n            expr += \"( \";\n            expr += m_info.capturedExpression;\n            expr += \" )\";\n        }\n        return expr;\n    }\n\n    bool AssertionResult::hasExpandedExpression() const {\n        return hasExpression() && getExpandedExpression() != getExpression();\n    }\n\n    std::string AssertionResult::getExpandedExpression() const {\n        std::string expr = m_resultData.reconstructExpression();\n        return expr.empty()\n                ? getExpression()\n                : expr;\n    }\n\n    std::string AssertionResult::getMessage() const {\n        return m_resultData.message;\n    }\n    SourceLineInfo AssertionResult::getSourceInfo() const {\n        return m_info.lineInfo;\n    }\n\n    StringRef AssertionResult::getTestMacroName() const {\n        return m_info.macroName;\n    }\n\n} // end namespace Catch\n// end catch_assertionresult.cpp\n// start catch_capture_matchers.cpp\n\nnamespace Catch {\n\n    using StringMatcher = Matchers::Impl::MatcherBase<std::string>;\n\n    // This is the general overload that takes a any string matcher\n    // There is another overload, in catch_assertionhandler.h/.cpp, that only takes a string and infers\n    // the Equals matcher (so the header does not mention matchers)\n    void handleExceptionMatchExpr( AssertionHandler& handler, StringMatcher const& matcher, StringRef const& matcherString  ) {\n        std::string exceptionMessage = Catch::translateActiveException();\n        MatchExpr<std::string, StringMatcher const&> expr( exceptionMessage, matcher, matcherString );\n        handler.handleExpr( expr );\n    }\n\n} // namespace Catch\n// end catch_capture_matchers.cpp\n// start catch_commandline.cpp\n\n// start catch_commandline.h\n\n// start catch_clara.h\n\n// Use Catch's value for console width (store Clara's off to the side, if present)\n#ifdef CLARA_CONFIG_CONSOLE_WIDTH\n#define CATCH_TEMP_CLARA_CONFIG_CONSOLE_WIDTH CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH\n#undef CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH\n#endif\n#define CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH CATCH_CONFIG_CONSOLE_WIDTH-1\n\n#ifdef __clang__\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wweak-vtables\"\n#pragma clang diagnostic ignored \"-Wexit-time-destructors\"\n#pragma clang diagnostic ignored \"-Wshadow\"\n#endif\n\n// start clara.hpp\n// Copyright 2017 Two Blue Cubes Ltd. All rights reserved.\n//\n// Distributed under the Boost Software License, Version 1.0. (See accompanying\n// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\n//\n// See https://github.com/philsquared/Clara for more details\n\n// Clara v1.1.5\n\n\n#ifndef CATCH_CLARA_CONFIG_CONSOLE_WIDTH\n#define CATCH_CLARA_CONFIG_CONSOLE_WIDTH 80\n#endif\n\n#ifndef CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH\n#define CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH CATCH_CLARA_CONFIG_CONSOLE_WIDTH\n#endif\n\n#ifndef CLARA_CONFIG_OPTIONAL_TYPE\n#ifdef __has_include\n#if __has_include(<optional>) && __cplusplus >= 201703L\n#include <optional>\n#define CLARA_CONFIG_OPTIONAL_TYPE std::optional\n#endif\n#endif\n#endif\n\n// ----------- #included from clara_textflow.hpp -----------\n\n// TextFlowCpp\n//\n// A single-header library for wrapping and laying out basic text, by Phil Nash\n//\n// Distributed under the Boost Software License, Version 1.0. (See accompanying\n// file LICENSE.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\n//\n// This project is hosted at https://github.com/philsquared/textflowcpp\n\n\n#include <cassert>\n#include <ostream>\n#include <sstream>\n#include <vector>\n\n#ifndef CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH\n#define CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH 80\n#endif\n\nnamespace Catch {\nnamespace clara {\nnamespace TextFlow {\n\ninline auto isWhitespace(char c) -> bool {\n\tstatic std::string chars = \" \\t\\n\\r\";\n\treturn chars.find(c) != std::string::npos;\n}\ninline auto isBreakableBefore(char c) -> bool {\n\tstatic std::string chars = \"[({<|\";\n\treturn chars.find(c) != std::string::npos;\n}\ninline auto isBreakableAfter(char c) -> bool {\n\tstatic std::string chars = \"])}>.,:;*+-=&/\\\\\";\n\treturn chars.find(c) != std::string::npos;\n}\n\nclass Columns;\n\nclass Column {\n\tstd::vector<std::string> m_strings;\n\tsize_t m_width = CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH;\n\tsize_t m_indent = 0;\n\tsize_t m_initialIndent = std::string::npos;\n\npublic:\n\tclass iterator {\n\t\tfriend Column;\n\n\t\tColumn const& m_column;\n\t\tsize_t m_stringIndex = 0;\n\t\tsize_t m_pos = 0;\n\n\t\tsize_t m_len = 0;\n\t\tsize_t m_end = 0;\n\t\tbool m_suffix = false;\n\n\t\titerator(Column const& column, size_t stringIndex)\n\t\t\t: m_column(column),\n\t\t\tm_stringIndex(stringIndex) {}\n\n\t\tauto line() const -> std::string const& { return m_column.m_strings[m_stringIndex]; }\n\n\t\tauto isBoundary(size_t at) const -> bool {\n\t\t\tassert(at > 0);\n\t\t\tassert(at <= line().size());\n\n\t\t\treturn at == line().size() ||\n\t\t\t\t(isWhitespace(line()[at]) && !isWhitespace(line()[at - 1])) ||\n\t\t\t\tisBreakableBefore(line()[at]) ||\n\t\t\t\tisBreakableAfter(line()[at - 1]);\n\t\t}\n\n\t\tvoid calcLength() {\n\t\t\tassert(m_stringIndex < m_column.m_strings.size());\n\n\t\t\tm_suffix = false;\n\t\t\tauto width = m_column.m_width - indent();\n\t\t\tm_end = m_pos;\n\t\t\tif (line()[m_pos] == '\\n') {\n\t\t\t\t++m_end;\n\t\t\t}\n\t\t\twhile (m_end < line().size() && line()[m_end] != '\\n')\n\t\t\t\t++m_end;\n\n\t\t\tif (m_end < m_pos + width) {\n\t\t\t\tm_len = m_end - m_pos;\n\t\t\t} else {\n\t\t\t\tsize_t len = width;\n\t\t\t\twhile (len > 0 && !isBoundary(m_pos + len))\n\t\t\t\t\t--len;\n\t\t\t\twhile (len > 0 && isWhitespace(line()[m_pos + len - 1]))\n\t\t\t\t\t--len;\n\n\t\t\t\tif (len > 0) {\n\t\t\t\t\tm_len = len;\n\t\t\t\t} else {\n\t\t\t\t\tm_suffix = true;\n\t\t\t\t\tm_len = width - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tauto indent() const -> size_t {\n\t\t\tauto initial = m_pos == 0 && m_stringIndex == 0 ? m_column.m_initialIndent : std::string::npos;\n\t\t\treturn initial == std::string::npos ? m_column.m_indent : initial;\n\t\t}\n\n\t\tauto addIndentAndSuffix(std::string const &plain) const -> std::string {\n\t\t\treturn std::string(indent(), ' ') + (m_suffix ? plain + \"-\" : plain);\n\t\t}\n\n\tpublic:\n\t\tusing difference_type = std::ptrdiff_t;\n\t\tusing value_type = std::string;\n\t\tusing pointer = value_type * ;\n\t\tusing reference = value_type & ;\n\t\tusing iterator_category = std::forward_iterator_tag;\n\n\t\texplicit iterator(Column const& column) : m_column(column) {\n\t\t\tassert(m_column.m_width > m_column.m_indent);\n\t\t\tassert(m_column.m_initialIndent == std::string::npos || m_column.m_width > m_column.m_initialIndent);\n\t\t\tcalcLength();\n\t\t\tif (m_len == 0)\n\t\t\t\tm_stringIndex++; // Empty string\n\t\t}\n\n\t\tauto operator *() const -> std::string {\n\t\t\tassert(m_stringIndex < m_column.m_strings.size());\n\t\t\tassert(m_pos <= m_end);\n\t\t\treturn addIndentAndSuffix(line().substr(m_pos, m_len));\n\t\t}\n\n\t\tauto operator ++() -> iterator& {\n\t\t\tm_pos += m_len;\n\t\t\tif (m_pos < line().size() && line()[m_pos] == '\\n')\n\t\t\t\tm_pos += 1;\n\t\t\telse\n\t\t\t\twhile (m_pos < line().size() && isWhitespace(line()[m_pos]))\n\t\t\t\t\t++m_pos;\n\n\t\t\tif (m_pos == line().size()) {\n\t\t\t\tm_pos = 0;\n\t\t\t\t++m_stringIndex;\n\t\t\t}\n\t\t\tif (m_stringIndex < m_column.m_strings.size())\n\t\t\t\tcalcLength();\n\t\t\treturn *this;\n\t\t}\n\t\tauto operator ++(int) -> iterator {\n\t\t\titerator prev(*this);\n\t\t\toperator++();\n\t\t\treturn prev;\n\t\t}\n\n\t\tauto operator ==(iterator const& other) const -> bool {\n\t\t\treturn\n\t\t\t\tm_pos == other.m_pos &&\n\t\t\t\tm_stringIndex == other.m_stringIndex &&\n\t\t\t\t&m_column == &other.m_column;\n\t\t}\n\t\tauto operator !=(iterator const& other) const -> bool {\n\t\t\treturn !operator==(other);\n\t\t}\n\t};\n\tusing const_iterator = iterator;\n\n\texplicit Column(std::string const& text) { m_strings.push_back(text); }\n\n\tauto width(size_t newWidth) -> Column& {\n\t\tassert(newWidth > 0);\n\t\tm_width = newWidth;\n\t\treturn *this;\n\t}\n\tauto indent(size_t newIndent) -> Column& {\n\t\tm_indent = newIndent;\n\t\treturn *this;\n\t}\n\tauto initialIndent(size_t newIndent) -> Column& {\n\t\tm_initialIndent = newIndent;\n\t\treturn *this;\n\t}\n\n\tauto width() const -> size_t { return m_width; }\n\tauto begin() const -> iterator { return iterator(*this); }\n\tauto end() const -> iterator { return { *this, m_strings.size() }; }\n\n\tinline friend std::ostream& operator << (std::ostream& os, Column const& col) {\n\t\tbool first = true;\n\t\tfor (auto line : col) {\n\t\t\tif (first)\n\t\t\t\tfirst = false;\n\t\t\telse\n\t\t\t\tos << \"\\n\";\n\t\t\tos << line;\n\t\t}\n\t\treturn os;\n\t}\n\n\tauto operator + (Column const& other)->Columns;\n\n\tauto toString() const -> std::string {\n\t\tstd::ostringstream oss;\n\t\toss << *this;\n\t\treturn oss.str();\n\t}\n};\n\nclass Spacer : public Column {\n\npublic:\n\texplicit Spacer(size_t spaceWidth) : Column(\"\") {\n\t\twidth(spaceWidth);\n\t}\n};\n\nclass Columns {\n\tstd::vector<Column> m_columns;\n\npublic:\n\n\tclass iterator {\n\t\tfriend Columns;\n\t\tstruct EndTag {};\n\n\t\tstd::vector<Column> const& m_columns;\n\t\tstd::vector<Column::iterator> m_iterators;\n\t\tsize_t m_activeIterators;\n\n\t\titerator(Columns const& columns, EndTag)\n\t\t\t: m_columns(columns.m_columns),\n\t\t\tm_activeIterators(0) {\n\t\t\tm_iterators.reserve(m_columns.size());\n\n\t\t\tfor (auto const& col : m_columns)\n\t\t\t\tm_iterators.push_back(col.end());\n\t\t}\n\n\tpublic:\n\t\tusing difference_type = std::ptrdiff_t;\n\t\tusing value_type = std::string;\n\t\tusing pointer = value_type * ;\n\t\tusing reference = value_type & ;\n\t\tusing iterator_category = std::forward_iterator_tag;\n\n\t\texplicit iterator(Columns const& columns)\n\t\t\t: m_columns(columns.m_columns),\n\t\t\tm_activeIterators(m_columns.size()) {\n\t\t\tm_iterators.reserve(m_columns.size());\n\n\t\t\tfor (auto const& col : m_columns)\n\t\t\t\tm_iterators.push_back(col.begin());\n\t\t}\n\n\t\tauto operator ==(iterator const& other) const -> bool {\n\t\t\treturn m_iterators == other.m_iterators;\n\t\t}\n\t\tauto operator !=(iterator const& other) const -> bool {\n\t\t\treturn m_iterators != other.m_iterators;\n\t\t}\n\t\tauto operator *() const -> std::string {\n\t\t\tstd::string row, padding;\n\n\t\t\tfor (size_t i = 0; i < m_columns.size(); ++i) {\n\t\t\t\tauto width = m_columns[i].width();\n\t\t\t\tif (m_iterators[i] != m_columns[i].end()) {\n\t\t\t\t\tstd::string col = *m_iterators[i];\n\t\t\t\t\trow += padding + col;\n\t\t\t\t\tif (col.size() < width)\n\t\t\t\t\t\tpadding = std::string(width - col.size(), ' ');\n\t\t\t\t\telse\n\t\t\t\t\t\tpadding = \"\";\n\t\t\t\t} else {\n\t\t\t\t\tpadding += std::string(width, ' ');\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn row;\n\t\t}\n\t\tauto operator ++() -> iterator& {\n\t\t\tfor (size_t i = 0; i < m_columns.size(); ++i) {\n\t\t\t\tif (m_iterators[i] != m_columns[i].end())\n\t\t\t\t\t++m_iterators[i];\n\t\t\t}\n\t\t\treturn *this;\n\t\t}\n\t\tauto operator ++(int) -> iterator {\n\t\t\titerator prev(*this);\n\t\t\toperator++();\n\t\t\treturn prev;\n\t\t}\n\t};\n\tusing const_iterator = iterator;\n\n\tauto begin() const -> iterator { return iterator(*this); }\n\tauto end() const -> iterator { return { *this, iterator::EndTag() }; }\n\n\tauto operator += (Column const& col) -> Columns& {\n\t\tm_columns.push_back(col);\n\t\treturn *this;\n\t}\n\tauto operator + (Column const& col) -> Columns {\n\t\tColumns combined = *this;\n\t\tcombined += col;\n\t\treturn combined;\n\t}\n\n\tinline friend std::ostream& operator << (std::ostream& os, Columns const& cols) {\n\n\t\tbool first = true;\n\t\tfor (auto line : cols) {\n\t\t\tif (first)\n\t\t\t\tfirst = false;\n\t\t\telse\n\t\t\t\tos << \"\\n\";\n\t\t\tos << line;\n\t\t}\n\t\treturn os;\n\t}\n\n\tauto toString() const -> std::string {\n\t\tstd::ostringstream oss;\n\t\toss << *this;\n\t\treturn oss.str();\n\t}\n};\n\ninline auto Column::operator + (Column const& other) -> Columns {\n\tColumns cols;\n\tcols += *this;\n\tcols += other;\n\treturn cols;\n}\n}\n\n}\n}\n\n// ----------- end of #include from clara_textflow.hpp -----------\n// ........... back in clara.hpp\n\n#include <cctype>\n#include <string>\n#include <memory>\n#include <set>\n#include <algorithm>\n\n#if !defined(CATCH_PLATFORM_WINDOWS) && ( defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(_MSC_VER) )\n#define CATCH_PLATFORM_WINDOWS\n#endif\n\nnamespace Catch { namespace clara {\nnamespace detail {\n\n    // Traits for extracting arg and return type of lambdas (for single argument lambdas)\n    template<typename L>\n    struct UnaryLambdaTraits : UnaryLambdaTraits<decltype( &L::operator() )> {};\n\n    template<typename ClassT, typename ReturnT, typename... Args>\n    struct UnaryLambdaTraits<ReturnT( ClassT::* )( Args... ) const> {\n        static const bool isValid = false;\n    };\n\n    template<typename ClassT, typename ReturnT, typename ArgT>\n    struct UnaryLambdaTraits<ReturnT( ClassT::* )( ArgT ) const> {\n        static const bool isValid = true;\n        using ArgType = typename std::remove_const<typename std::remove_reference<ArgT>::type>::type;\n        using ReturnType = ReturnT;\n    };\n\n    class TokenStream;\n\n    // Transport for raw args (copied from main args, or supplied via init list for testing)\n    class Args {\n        friend TokenStream;\n        std::string m_exeName;\n        std::vector<std::string> m_args;\n\n    public:\n        Args( int argc, char const* const* argv )\n            : m_exeName(argv[0]),\n              m_args(argv + 1, argv + argc) {}\n\n        Args( std::initializer_list<std::string> args )\n        :   m_exeName( *args.begin() ),\n            m_args( args.begin()+1, args.end() )\n        {}\n\n        auto exeName() const -> std::string {\n            return m_exeName;\n        }\n    };\n\n    // Wraps a token coming from a token stream. These may not directly correspond to strings as a single string\n    // may encode an option + its argument if the : or = form is used\n    enum class TokenType {\n        Option, Argument\n    };\n    struct Token {\n        TokenType type;\n        std::string token;\n    };\n\n    inline auto isOptPrefix( char c ) -> bool {\n        return c == '-'\n#ifdef CATCH_PLATFORM_WINDOWS\n            || c == '/'\n#endif\n        ;\n    }\n\n    // Abstracts iterators into args as a stream of tokens, with option arguments uniformly handled\n    class TokenStream {\n        using Iterator = std::vector<std::string>::const_iterator;\n        Iterator it;\n        Iterator itEnd;\n        std::vector<Token> m_tokenBuffer;\n\n        void loadBuffer() {\n            m_tokenBuffer.resize( 0 );\n\n            // Skip any empty strings\n            while( it != itEnd && it->empty() )\n                ++it;\n\n            if( it != itEnd ) {\n                auto const &next = *it;\n                if( isOptPrefix( next[0] ) ) {\n                    auto delimiterPos = next.find_first_of( \" :=\" );\n                    if( delimiterPos != std::string::npos ) {\n                        m_tokenBuffer.push_back( { TokenType::Option, next.substr( 0, delimiterPos ) } );\n                        m_tokenBuffer.push_back( { TokenType::Argument, next.substr( delimiterPos + 1 ) } );\n                    } else {\n                        if( next[1] != '-' && next.size() > 2 ) {\n                            std::string opt = \"- \";\n                            for( size_t i = 1; i < next.size(); ++i ) {\n                                opt[1] = next[i];\n                                m_tokenBuffer.push_back( { TokenType::Option, opt } );\n                            }\n                        } else {\n                            m_tokenBuffer.push_back( { TokenType::Option, next } );\n                        }\n                    }\n                } else {\n                    m_tokenBuffer.push_back( { TokenType::Argument, next } );\n                }\n            }\n        }\n\n    public:\n        explicit TokenStream( Args const &args ) : TokenStream( args.m_args.begin(), args.m_args.end() ) {}\n\n        TokenStream( Iterator it, Iterator itEnd ) : it( it ), itEnd( itEnd ) {\n            loadBuffer();\n        }\n\n        explicit operator bool() const {\n            return !m_tokenBuffer.empty() || it != itEnd;\n        }\n\n        auto count() const -> size_t { return m_tokenBuffer.size() + (itEnd - it); }\n\n        auto operator*() const -> Token {\n            assert( !m_tokenBuffer.empty() );\n            return m_tokenBuffer.front();\n        }\n\n        auto operator->() const -> Token const * {\n            assert( !m_tokenBuffer.empty() );\n            return &m_tokenBuffer.front();\n        }\n\n        auto operator++() -> TokenStream & {\n            if( m_tokenBuffer.size() >= 2 ) {\n                m_tokenBuffer.erase( m_tokenBuffer.begin() );\n            } else {\n                if( it != itEnd )\n                    ++it;\n                loadBuffer();\n            }\n            return *this;\n        }\n    };\n\n    class ResultBase {\n    public:\n        enum Type {\n            Ok, LogicError, RuntimeError\n        };\n\n    protected:\n        ResultBase( Type type ) : m_type( type ) {}\n        virtual ~ResultBase() = default;\n\n        virtual void enforceOk() const = 0;\n\n        Type m_type;\n    };\n\n    template<typename T>\n    class ResultValueBase : public ResultBase {\n    public:\n        auto value() const -> T const & {\n            enforceOk();\n            return m_value;\n        }\n\n    protected:\n        ResultValueBase( Type type ) : ResultBase( type ) {}\n\n        ResultValueBase( ResultValueBase const &other ) : ResultBase( other ) {\n            if( m_type == ResultBase::Ok )\n                new( &m_value ) T( other.m_value );\n        }\n\n        ResultValueBase( Type, T const &value ) : ResultBase( Ok ) {\n            new( &m_value ) T( value );\n        }\n\n        auto operator=( ResultValueBase const &other ) -> ResultValueBase & {\n            if( m_type == ResultBase::Ok )\n                m_value.~T();\n            ResultBase::operator=(other);\n            if( m_type == ResultBase::Ok )\n                new( &m_value ) T( other.m_value );\n            return *this;\n        }\n\n        ~ResultValueBase() override {\n            if( m_type == Ok )\n                m_value.~T();\n        }\n\n        union {\n            T m_value;\n        };\n    };\n\n    template<>\n    class ResultValueBase<void> : public ResultBase {\n    protected:\n        using ResultBase::ResultBase;\n    };\n\n    template<typename T = void>\n    class BasicResult : public ResultValueBase<T> {\n    public:\n        template<typename U>\n        explicit BasicResult( BasicResult<U> const &other )\n        :   ResultValueBase<T>( other.type() ),\n            m_errorMessage( other.errorMessage() )\n        {\n            assert( type() != ResultBase::Ok );\n        }\n\n        template<typename U>\n        static auto ok( U const &value ) -> BasicResult { return { ResultBase::Ok, value }; }\n        static auto ok() -> BasicResult { return { ResultBase::Ok }; }\n        static auto logicError( std::string const &message ) -> BasicResult { return { ResultBase::LogicError, message }; }\n        static auto runtimeError( std::string const &message ) -> BasicResult { return { ResultBase::RuntimeError, message }; }\n\n        explicit operator bool() const { return m_type == ResultBase::Ok; }\n        auto type() const -> ResultBase::Type { return m_type; }\n        auto errorMessage() const -> std::string { return m_errorMessage; }\n\n    protected:\n        void enforceOk() const override {\n\n            // Errors shouldn't reach this point, but if they do\n            // the actual error message will be in m_errorMessage\n            assert( m_type != ResultBase::LogicError );\n            assert( m_type != ResultBase::RuntimeError );\n            if( m_type != ResultBase::Ok )\n                std::abort();\n        }\n\n        std::string m_errorMessage; // Only populated if resultType is an error\n\n        BasicResult( ResultBase::Type type, std::string const &message )\n        :   ResultValueBase<T>(type),\n            m_errorMessage(message)\n        {\n            assert( m_type != ResultBase::Ok );\n        }\n\n        using ResultValueBase<T>::ResultValueBase;\n        using ResultBase::m_type;\n    };\n\n    enum class ParseResultType {\n        Matched, NoMatch, ShortCircuitAll, ShortCircuitSame\n    };\n\n    class ParseState {\n    public:\n\n        ParseState( ParseResultType type, TokenStream const &remainingTokens )\n        : m_type(type),\n          m_remainingTokens( remainingTokens )\n        {}\n\n        auto type() const -> ParseResultType { return m_type; }\n        auto remainingTokens() const -> TokenStream { return m_remainingTokens; }\n\n    private:\n        ParseResultType m_type;\n        TokenStream m_remainingTokens;\n    };\n\n    using Result = BasicResult<void>;\n    using ParserResult = BasicResult<ParseResultType>;\n    using InternalParseResult = BasicResult<ParseState>;\n\n    struct HelpColumns {\n        std::string left;\n        std::string right;\n    };\n\n    template<typename T>\n    inline auto convertInto( std::string const &source, T& target ) -> ParserResult {\n        std::stringstream ss;\n        ss << source;\n        ss >> target;\n        if( ss.fail() )\n            return ParserResult::runtimeError( \"Unable to convert '\" + source + \"' to destination type\" );\n        else\n            return ParserResult::ok( ParseResultType::Matched );\n    }\n    inline auto convertInto( std::string const &source, std::string& target ) -> ParserResult {\n        target = source;\n        return ParserResult::ok( ParseResultType::Matched );\n    }\n    inline auto convertInto( std::string const &source, bool &target ) -> ParserResult {\n        std::string srcLC = source;\n        std::transform( srcLC.begin(), srcLC.end(), srcLC.begin(), []( unsigned char c ) { return static_cast<char>( std::tolower(c) ); } );\n        if (srcLC == \"y\" || srcLC == \"1\" || srcLC == \"true\" || srcLC == \"yes\" || srcLC == \"on\")\n            target = true;\n        else if (srcLC == \"n\" || srcLC == \"0\" || srcLC == \"false\" || srcLC == \"no\" || srcLC == \"off\")\n            target = false;\n        else\n            return ParserResult::runtimeError( \"Expected a boolean value but did not recognise: '\" + source + \"'\" );\n        return ParserResult::ok( ParseResultType::Matched );\n    }\n#ifdef CLARA_CONFIG_OPTIONAL_TYPE\n    template<typename T>\n    inline auto convertInto( std::string const &source, CLARA_CONFIG_OPTIONAL_TYPE<T>& target ) -> ParserResult {\n        T temp;\n        auto result = convertInto( source, temp );\n        if( result )\n            target = std::move(temp);\n        return result;\n    }\n#endif // CLARA_CONFIG_OPTIONAL_TYPE\n\n    struct NonCopyable {\n        NonCopyable() = default;\n        NonCopyable( NonCopyable const & ) = delete;\n        NonCopyable( NonCopyable && ) = delete;\n        NonCopyable &operator=( NonCopyable const & ) = delete;\n        NonCopyable &operator=( NonCopyable && ) = delete;\n    };\n\n    struct BoundRef : NonCopyable {\n        virtual ~BoundRef() = default;\n        virtual auto isContainer() const -> bool { return false; }\n        virtual auto isFlag() const -> bool { return false; }\n    };\n    struct BoundValueRefBase : BoundRef {\n        virtual auto setValue( std::string const &arg ) -> ParserResult = 0;\n    };\n    struct BoundFlagRefBase : BoundRef {\n        virtual auto setFlag( bool flag ) -> ParserResult = 0;\n        virtual auto isFlag() const -> bool { return true; }\n    };\n\n    template<typename T>\n    struct BoundValueRef : BoundValueRefBase {\n        T &m_ref;\n\n        explicit BoundValueRef( T &ref ) : m_ref( ref ) {}\n\n        auto setValue( std::string const &arg ) -> ParserResult override {\n            return convertInto( arg, m_ref );\n        }\n    };\n\n    template<typename T>\n    struct BoundValueRef<std::vector<T>> : BoundValueRefBase {\n        std::vector<T> &m_ref;\n\n        explicit BoundValueRef( std::vector<T> &ref ) : m_ref( ref ) {}\n\n        auto isContainer() const -> bool override { return true; }\n\n        auto setValue( std::string const &arg ) -> ParserResult override {\n            T temp;\n            auto result = convertInto( arg, temp );\n            if( result )\n                m_ref.push_back( temp );\n            return result;\n        }\n    };\n\n    struct BoundFlagRef : BoundFlagRefBase {\n        bool &m_ref;\n\n        explicit BoundFlagRef( bool &ref ) : m_ref( ref ) {}\n\n        auto setFlag( bool flag ) -> ParserResult override {\n            m_ref = flag;\n            return ParserResult::ok( ParseResultType::Matched );\n        }\n    };\n\n    template<typename ReturnType>\n    struct LambdaInvoker {\n        static_assert( std::is_same<ReturnType, ParserResult>::value, \"Lambda must return void or clara::ParserResult\" );\n\n        template<typename L, typename ArgType>\n        static auto invoke( L const &lambda, ArgType const &arg ) -> ParserResult {\n            return lambda( arg );\n        }\n    };\n\n    template<>\n    struct LambdaInvoker<void> {\n        template<typename L, typename ArgType>\n        static auto invoke( L const &lambda, ArgType const &arg ) -> ParserResult {\n            lambda( arg );\n            return ParserResult::ok( ParseResultType::Matched );\n        }\n    };\n\n    template<typename ArgType, typename L>\n    inline auto invokeLambda( L const &lambda, std::string const &arg ) -> ParserResult {\n        ArgType temp{};\n        auto result = convertInto( arg, temp );\n        return !result\n           ? result\n           : LambdaInvoker<typename UnaryLambdaTraits<L>::ReturnType>::invoke( lambda, temp );\n    }\n\n    template<typename L>\n    struct BoundLambda : BoundValueRefBase {\n        L m_lambda;\n\n        static_assert( UnaryLambdaTraits<L>::isValid, \"Supplied lambda must take exactly one argument\" );\n        explicit BoundLambda( L const &lambda ) : m_lambda( lambda ) {}\n\n        auto setValue( std::string const &arg ) -> ParserResult override {\n            return invokeLambda<typename UnaryLambdaTraits<L>::ArgType>( m_lambda, arg );\n        }\n    };\n\n    template<typename L>\n    struct BoundFlagLambda : BoundFlagRefBase {\n        L m_lambda;\n\n        static_assert( UnaryLambdaTraits<L>::isValid, \"Supplied lambda must take exactly one argument\" );\n        static_assert( std::is_same<typename UnaryLambdaTraits<L>::ArgType, bool>::value, \"flags must be boolean\" );\n\n        explicit BoundFlagLambda( L const &lambda ) : m_lambda( lambda ) {}\n\n        auto setFlag( bool flag ) -> ParserResult override {\n            return LambdaInvoker<typename UnaryLambdaTraits<L>::ReturnType>::invoke( m_lambda, flag );\n        }\n    };\n\n    enum class Optionality { Optional, Required };\n\n    struct Parser;\n\n    class ParserBase {\n    public:\n        virtual ~ParserBase() = default;\n        virtual auto validate() const -> Result { return Result::ok(); }\n        virtual auto parse( std::string const& exeName, TokenStream const &tokens) const -> InternalParseResult  = 0;\n        virtual auto cardinality() const -> size_t { return 1; }\n\n        auto parse( Args const &args ) const -> InternalParseResult {\n            return parse( args.exeName(), TokenStream( args ) );\n        }\n    };\n\n    template<typename DerivedT>\n    class ComposableParserImpl : public ParserBase {\n    public:\n        template<typename T>\n        auto operator|( T const &other ) const -> Parser;\n\n\t\ttemplate<typename T>\n        auto operator+( T const &other ) const -> Parser;\n    };\n\n    // Common code and state for Args and Opts\n    template<typename DerivedT>\n    class ParserRefImpl : public ComposableParserImpl<DerivedT> {\n    protected:\n        Optionality m_optionality = Optionality::Optional;\n        std::shared_ptr<BoundRef> m_ref;\n        std::string m_hint;\n        std::string m_description;\n\n        explicit ParserRefImpl( std::shared_ptr<BoundRef> const &ref ) : m_ref( ref ) {}\n\n    public:\n        template<typename T>\n        ParserRefImpl( T &ref, std::string const &hint )\n        :   m_ref( std::make_shared<BoundValueRef<T>>( ref ) ),\n            m_hint( hint )\n        {}\n\n        template<typename LambdaT>\n        ParserRefImpl( LambdaT const &ref, std::string const &hint )\n        :   m_ref( std::make_shared<BoundLambda<LambdaT>>( ref ) ),\n            m_hint(hint)\n        {}\n\n        auto operator()( std::string const &description ) -> DerivedT & {\n            m_description = description;\n            return static_cast<DerivedT &>( *this );\n        }\n\n        auto optional() -> DerivedT & {\n            m_optionality = Optionality::Optional;\n            return static_cast<DerivedT &>( *this );\n        };\n\n        auto required() -> DerivedT & {\n            m_optionality = Optionality::Required;\n            return static_cast<DerivedT &>( *this );\n        };\n\n        auto isOptional() const -> bool {\n            return m_optionality == Optionality::Optional;\n        }\n\n        auto cardinality() const -> size_t override {\n            if( m_ref->isContainer() )\n                return 0;\n            else\n                return 1;\n        }\n\n        auto hint() const -> std::string { return m_hint; }\n    };\n\n    class ExeName : public ComposableParserImpl<ExeName> {\n        std::shared_ptr<std::string> m_name;\n        std::shared_ptr<BoundValueRefBase> m_ref;\n\n        template<typename LambdaT>\n        static auto makeRef(LambdaT const &lambda) -> std::shared_ptr<BoundValueRefBase> {\n            return std::make_shared<BoundLambda<LambdaT>>( lambda) ;\n        }\n\n    public:\n        ExeName() : m_name( std::make_shared<std::string>( \"<executable>\" ) ) {}\n\n        explicit ExeName( std::string &ref ) : ExeName() {\n            m_ref = std::make_shared<BoundValueRef<std::string>>( ref );\n        }\n\n        template<typename LambdaT>\n        explicit ExeName( LambdaT const& lambda ) : ExeName() {\n            m_ref = std::make_shared<BoundLambda<LambdaT>>( lambda );\n        }\n\n        // The exe name is not parsed out of the normal tokens, but is handled specially\n        auto parse( std::string const&, TokenStream const &tokens ) const -> InternalParseResult override {\n            return InternalParseResult::ok( ParseState( ParseResultType::NoMatch, tokens ) );\n        }\n\n        auto name() const -> std::string { return *m_name; }\n        auto set( std::string const& newName ) -> ParserResult {\n\n            auto lastSlash = newName.find_last_of( \"\\\\/\" );\n            auto filename = ( lastSlash == std::string::npos )\n                    ? newName\n                    : newName.substr( lastSlash+1 );\n\n            *m_name = filename;\n            if( m_ref )\n                return m_ref->setValue( filename );\n            else\n                return ParserResult::ok( ParseResultType::Matched );\n        }\n    };\n\n    class Arg : public ParserRefImpl<Arg> {\n    public:\n        using ParserRefImpl::ParserRefImpl;\n\n        auto parse( std::string const &, TokenStream const &tokens ) const -> InternalParseResult override {\n            auto validationResult = validate();\n            if( !validationResult )\n                return InternalParseResult( validationResult );\n\n            auto remainingTokens = tokens;\n            auto const &token = *remainingTokens;\n            if( token.type != TokenType::Argument )\n                return InternalParseResult::ok( ParseState( ParseResultType::NoMatch, remainingTokens ) );\n\n            assert( !m_ref->isFlag() );\n            auto valueRef = static_cast<detail::BoundValueRefBase*>( m_ref.get() );\n\n            auto result = valueRef->setValue( remainingTokens->token );\n            if( !result )\n                return InternalParseResult( result );\n            else\n                return InternalParseResult::ok( ParseState( ParseResultType::Matched, ++remainingTokens ) );\n        }\n    };\n\n    inline auto normaliseOpt( std::string const &optName ) -> std::string {\n#ifdef CATCH_PLATFORM_WINDOWS\n        if( optName[0] == '/' )\n            return \"-\" + optName.substr( 1 );\n        else\n#endif\n            return optName;\n    }\n\n    class Opt : public ParserRefImpl<Opt> {\n    protected:\n        std::vector<std::string> m_optNames;\n\n    public:\n        template<typename LambdaT>\n        explicit Opt( LambdaT const &ref ) : ParserRefImpl( std::make_shared<BoundFlagLambda<LambdaT>>( ref ) ) {}\n\n        explicit Opt( bool &ref ) : ParserRefImpl( std::make_shared<BoundFlagRef>( ref ) ) {}\n\n        template<typename LambdaT>\n        Opt( LambdaT const &ref, std::string const &hint ) : ParserRefImpl( ref, hint ) {}\n\n        template<typename T>\n        Opt( T &ref, std::string const &hint ) : ParserRefImpl( ref, hint ) {}\n\n        auto operator[]( std::string const &optName ) -> Opt & {\n            m_optNames.push_back( optName );\n            return *this;\n        }\n\n        auto getHelpColumns() const -> std::vector<HelpColumns> {\n            std::ostringstream oss;\n            bool first = true;\n            for( auto const &opt : m_optNames ) {\n                if (first)\n                    first = false;\n                else\n                    oss << \", \";\n                oss << opt;\n            }\n            if( !m_hint.empty() )\n                oss << \" <\" << m_hint << \">\";\n            return { { oss.str(), m_description } };\n        }\n\n        auto isMatch( std::string const &optToken ) const -> bool {\n            auto normalisedToken = normaliseOpt( optToken );\n            for( auto const &name : m_optNames ) {\n                if( normaliseOpt( name ) == normalisedToken )\n                    return true;\n            }\n            return false;\n        }\n\n        using ParserBase::parse;\n\n        auto parse( std::string const&, TokenStream const &tokens ) const -> InternalParseResult override {\n            auto validationResult = validate();\n            if( !validationResult )\n                return InternalParseResult( validationResult );\n\n            auto remainingTokens = tokens;\n            if( remainingTokens && remainingTokens->type == TokenType::Option ) {\n                auto const &token = *remainingTokens;\n                if( isMatch(token.token ) ) {\n                    if( m_ref->isFlag() ) {\n                        auto flagRef = static_cast<detail::BoundFlagRefBase*>( m_ref.get() );\n                        auto result = flagRef->setFlag( true );\n                        if( !result )\n                            return InternalParseResult( result );\n                        if( result.value() == ParseResultType::ShortCircuitAll )\n                            return InternalParseResult::ok( ParseState( result.value(), remainingTokens ) );\n                    } else {\n                        auto valueRef = static_cast<detail::BoundValueRefBase*>( m_ref.get() );\n                        ++remainingTokens;\n                        if( !remainingTokens )\n                            return InternalParseResult::runtimeError( \"Expected argument following \" + token.token );\n                        auto const &argToken = *remainingTokens;\n                        if( argToken.type != TokenType::Argument )\n                            return InternalParseResult::runtimeError( \"Expected argument following \" + token.token );\n                        auto result = valueRef->setValue( argToken.token );\n                        if( !result )\n                            return InternalParseResult( result );\n                        if( result.value() == ParseResultType::ShortCircuitAll )\n                            return InternalParseResult::ok( ParseState( result.value(), remainingTokens ) );\n                    }\n                    return InternalParseResult::ok( ParseState( ParseResultType::Matched, ++remainingTokens ) );\n                }\n            }\n            return InternalParseResult::ok( ParseState( ParseResultType::NoMatch, remainingTokens ) );\n        }\n\n        auto validate() const -> Result override {\n            if( m_optNames.empty() )\n                return Result::logicError( \"No options supplied to Opt\" );\n            for( auto const &name : m_optNames ) {\n                if( name.empty() )\n                    return Result::logicError( \"Option name cannot be empty\" );\n#ifdef CATCH_PLATFORM_WINDOWS\n                if( name[0] != '-' && name[0] != '/' )\n                    return Result::logicError( \"Option name must begin with '-' or '/'\" );\n#else\n                if( name[0] != '-' )\n                    return Result::logicError( \"Option name must begin with '-'\" );\n#endif\n            }\n            return ParserRefImpl::validate();\n        }\n    };\n\n    struct Help : Opt {\n        Help( bool &showHelpFlag )\n        :   Opt([&]( bool flag ) {\n                showHelpFlag = flag;\n                return ParserResult::ok( ParseResultType::ShortCircuitAll );\n            })\n        {\n            static_cast<Opt &>( *this )\n                    (\"display usage information\")\n                    [\"-?\"][\"-h\"][\"--help\"]\n                    .optional();\n        }\n    };\n\n    struct Parser : ParserBase {\n\n        mutable ExeName m_exeName;\n        std::vector<Opt> m_options;\n        std::vector<Arg> m_args;\n\n        auto operator|=( ExeName const &exeName ) -> Parser & {\n            m_exeName = exeName;\n            return *this;\n        }\n\n        auto operator|=( Arg const &arg ) -> Parser & {\n            m_args.push_back(arg);\n            return *this;\n        }\n\n        auto operator|=( Opt const &opt ) -> Parser & {\n            m_options.push_back(opt);\n            return *this;\n        }\n\n        auto operator|=( Parser const &other ) -> Parser & {\n            m_options.insert(m_options.end(), other.m_options.begin(), other.m_options.end());\n            m_args.insert(m_args.end(), other.m_args.begin(), other.m_args.end());\n            return *this;\n        }\n\n        template<typename T>\n        auto operator|( T const &other ) const -> Parser {\n            return Parser( *this ) |= other;\n        }\n\n        // Forward deprecated interface with '+' instead of '|'\n        template<typename T>\n        auto operator+=( T const &other ) -> Parser & { return operator|=( other ); }\n        template<typename T>\n        auto operator+( T const &other ) const -> Parser { return operator|( other ); }\n\n        auto getHelpColumns() const -> std::vector<HelpColumns> {\n            std::vector<HelpColumns> cols;\n            for (auto const &o : m_options) {\n                auto childCols = o.getHelpColumns();\n                cols.insert( cols.end(), childCols.begin(), childCols.end() );\n            }\n            return cols;\n        }\n\n        void writeToStream( std::ostream &os ) const {\n            if (!m_exeName.name().empty()) {\n                os << \"usage:\\n\" << \"  \" << m_exeName.name() << \" \";\n                bool required = true, first = true;\n                for( auto const &arg : m_args ) {\n                    if (first)\n                        first = false;\n                    else\n                        os << \" \";\n                    if( arg.isOptional() && required ) {\n                        os << \"[\";\n                        required = false;\n                    }\n                    os << \"<\" << arg.hint() << \">\";\n                    if( arg.cardinality() == 0 )\n                        os << \" ... \";\n                }\n                if( !required )\n                    os << \"]\";\n                if( !m_options.empty() )\n                    os << \" options\";\n                os << \"\\n\\nwhere options are:\" << std::endl;\n            }\n\n            auto rows = getHelpColumns();\n            size_t consoleWidth = CATCH_CLARA_CONFIG_CONSOLE_WIDTH;\n            size_t optWidth = 0;\n            for( auto const &cols : rows )\n                optWidth = (std::max)(optWidth, cols.left.size() + 2);\n\n            optWidth = (std::min)(optWidth, consoleWidth/2);\n\n            for( auto const &cols : rows ) {\n                auto row =\n                        TextFlow::Column( cols.left ).width( optWidth ).indent( 2 ) +\n                        TextFlow::Spacer(4) +\n                        TextFlow::Column( cols.right ).width( consoleWidth - 7 - optWidth );\n                os << row << std::endl;\n            }\n        }\n\n        friend auto operator<<( std::ostream &os, Parser const &parser ) -> std::ostream& {\n            parser.writeToStream( os );\n            return os;\n        }\n\n        auto validate() const -> Result override {\n            for( auto const &opt : m_options ) {\n                auto result = opt.validate();\n                if( !result )\n                    return result;\n            }\n            for( auto const &arg : m_args ) {\n                auto result = arg.validate();\n                if( !result )\n                    return result;\n            }\n            return Result::ok();\n        }\n\n        using ParserBase::parse;\n\n        auto parse( std::string const& exeName, TokenStream const &tokens ) const -> InternalParseResult override {\n\n            struct ParserInfo {\n                ParserBase const* parser = nullptr;\n                size_t count = 0;\n            };\n            const size_t totalParsers = m_options.size() + m_args.size();\n            assert( totalParsers < 512 );\n            // ParserInfo parseInfos[totalParsers]; // <-- this is what we really want to do\n            ParserInfo parseInfos[512];\n\n            {\n                size_t i = 0;\n                for (auto const &opt : m_options) parseInfos[i++].parser = &opt;\n                for (auto const &arg : m_args) parseInfos[i++].parser = &arg;\n            }\n\n            m_exeName.set( exeName );\n\n            auto result = InternalParseResult::ok( ParseState( ParseResultType::NoMatch, tokens ) );\n            while( result.value().remainingTokens() ) {\n                bool tokenParsed = false;\n\n                for( size_t i = 0; i < totalParsers; ++i ) {\n                    auto&  parseInfo = parseInfos[i];\n                    if( parseInfo.parser->cardinality() == 0 || parseInfo.count < parseInfo.parser->cardinality() ) {\n                        result = parseInfo.parser->parse(exeName, result.value().remainingTokens());\n                        if (!result)\n                            return result;\n                        if (result.value().type() != ParseResultType::NoMatch) {\n                            tokenParsed = true;\n                            ++parseInfo.count;\n                            break;\n                        }\n                    }\n                }\n\n                if( result.value().type() == ParseResultType::ShortCircuitAll )\n                    return result;\n                if( !tokenParsed )\n                    return InternalParseResult::runtimeError( \"Unrecognised token: \" + result.value().remainingTokens()->token );\n            }\n            // !TBD Check missing required options\n            return result;\n        }\n    };\n\n    template<typename DerivedT>\n    template<typename T>\n    auto ComposableParserImpl<DerivedT>::operator|( T const &other ) const -> Parser {\n        return Parser() | static_cast<DerivedT const &>( *this ) | other;\n    }\n} // namespace detail\n\n// A Combined parser\nusing detail::Parser;\n\n// A parser for options\nusing detail::Opt;\n\n// A parser for arguments\nusing detail::Arg;\n\n// Wrapper for argc, argv from main()\nusing detail::Args;\n\n// Specifies the name of the executable\nusing detail::ExeName;\n\n// Convenience wrapper for option parser that specifies the help option\nusing detail::Help;\n\n// enum of result types from a parse\nusing detail::ParseResultType;\n\n// Result type for parser operation\nusing detail::ParserResult;\n\n}} // namespace Catch::clara\n\n// end clara.hpp\n#ifdef __clang__\n#pragma clang diagnostic pop\n#endif\n\n// Restore Clara's value for console width, if present\n#ifdef CATCH_TEMP_CLARA_CONFIG_CONSOLE_WIDTH\n#define CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH CATCH_TEMP_CLARA_CONFIG_CONSOLE_WIDTH\n#undef CATCH_TEMP_CLARA_CONFIG_CONSOLE_WIDTH\n#endif\n\n// end catch_clara.h\nnamespace Catch {\n\n    clara::Parser makeCommandLineParser( ConfigData& config );\n\n} // end namespace Catch\n\n// end catch_commandline.h\n#include <fstream>\n#include <ctime>\n\nnamespace Catch {\n\n    clara::Parser makeCommandLineParser( ConfigData& config ) {\n\n        using namespace clara;\n\n        auto const setWarning = [&]( std::string const& warning ) {\n                auto warningSet = [&]() {\n                    if( warning == \"NoAssertions\" )\n                        return WarnAbout::NoAssertions;\n\n                    if ( warning == \"NoTests\" )\n                        return WarnAbout::NoTests;\n\n                    return WarnAbout::Nothing;\n                }();\n\n                if (warningSet == WarnAbout::Nothing)\n                    return ParserResult::runtimeError( \"Unrecognised warning: '\" + warning + \"'\" );\n                config.warnings = static_cast<WarnAbout::What>( config.warnings | warningSet );\n                return ParserResult::ok( ParseResultType::Matched );\n            };\n        auto const loadTestNamesFromFile = [&]( std::string const& filename ) {\n                std::ifstream f( filename.c_str() );\n                if( !f.is_open() )\n                    return ParserResult::runtimeError( \"Unable to load input file: '\" + filename + \"'\" );\n\n                std::string line;\n                while( std::getline( f, line ) ) {\n                    line = trim(line);\n                    if( !line.empty() && !startsWith( line, '#' ) ) {\n                        if( !startsWith( line, '\"' ) )\n                            line = '\"' + line + '\"';\n                        config.testsOrTags.push_back( line );\n                        config.testsOrTags.emplace_back( \",\" );\n                    }\n                }\n                //Remove comma in the end\n                if(!config.testsOrTags.empty())\n                    config.testsOrTags.erase( config.testsOrTags.end()-1 );\n\n                return ParserResult::ok( ParseResultType::Matched );\n            };\n        auto const setTestOrder = [&]( std::string const& order ) {\n                if( startsWith( \"declared\", order ) )\n                    config.runOrder = RunTests::InDeclarationOrder;\n                else if( startsWith( \"lexical\", order ) )\n                    config.runOrder = RunTests::InLexicographicalOrder;\n                else if( startsWith( \"random\", order ) )\n                    config.runOrder = RunTests::InRandomOrder;\n                else\n                    return clara::ParserResult::runtimeError( \"Unrecognised ordering: '\" + order + \"'\" );\n                return ParserResult::ok( ParseResultType::Matched );\n            };\n        auto const setRngSeed = [&]( std::string const& seed ) {\n                if( seed != \"time\" )\n                    return clara::detail::convertInto( seed, config.rngSeed );\n                config.rngSeed = static_cast<unsigned int>( std::time(nullptr) );\n                return ParserResult::ok( ParseResultType::Matched );\n            };\n        auto const setColourUsage = [&]( std::string const& useColour ) {\n                    auto mode = toLower( useColour );\n\n                    if( mode == \"yes\" )\n                        config.useColour = UseColour::Yes;\n                    else if( mode == \"no\" )\n                        config.useColour = UseColour::No;\n                    else if( mode == \"auto\" )\n                        config.useColour = UseColour::Auto;\n                    else\n                        return ParserResult::runtimeError( \"colour mode must be one of: auto, yes or no. '\" + useColour + \"' not recognised\" );\n                return ParserResult::ok( ParseResultType::Matched );\n            };\n        auto const setWaitForKeypress = [&]( std::string const& keypress ) {\n                auto keypressLc = toLower( keypress );\n                if (keypressLc == \"never\")\n                    config.waitForKeypress = WaitForKeypress::Never;\n                else if( keypressLc == \"start\" )\n                    config.waitForKeypress = WaitForKeypress::BeforeStart;\n                else if( keypressLc == \"exit\" )\n                    config.waitForKeypress = WaitForKeypress::BeforeExit;\n                else if( keypressLc == \"both\" )\n                    config.waitForKeypress = WaitForKeypress::BeforeStartAndExit;\n                else\n                    return ParserResult::runtimeError( \"keypress argument must be one of: never, start, exit or both. '\" + keypress + \"' not recognised\" );\n            return ParserResult::ok( ParseResultType::Matched );\n            };\n        auto const setVerbosity = [&]( std::string const& verbosity ) {\n            auto lcVerbosity = toLower( verbosity );\n            if( lcVerbosity == \"quiet\" )\n                config.verbosity = Verbosity::Quiet;\n            else if( lcVerbosity == \"normal\" )\n                config.verbosity = Verbosity::Normal;\n            else if( lcVerbosity == \"high\" )\n                config.verbosity = Verbosity::High;\n            else\n                return ParserResult::runtimeError( \"Unrecognised verbosity, '\" + verbosity + \"'\" );\n            return ParserResult::ok( ParseResultType::Matched );\n        };\n        auto const setReporter = [&]( std::string const& reporter ) {\n            IReporterRegistry::FactoryMap const& factories = getRegistryHub().getReporterRegistry().getFactories();\n\n            auto lcReporter = toLower( reporter );\n            auto result = factories.find( lcReporter );\n\n            if( factories.end() != result )\n                config.reporterName = lcReporter;\n            else\n                return ParserResult::runtimeError( \"Unrecognized reporter, '\" + reporter + \"'. Check available with --list-reporters\" );\n            return ParserResult::ok( ParseResultType::Matched );\n        };\n\n        auto cli\n            = ExeName( config.processName )\n            | Help( config.showHelp )\n            | Opt( config.listTests )\n                [\"-l\"][\"--list-tests\"]\n                ( \"list all/matching test cases\" )\n            | Opt( config.listTags )\n                [\"-t\"][\"--list-tags\"]\n                ( \"list all/matching tags\" )\n            | Opt( config.showSuccessfulTests )\n                [\"-s\"][\"--success\"]\n                ( \"include successful tests in output\" )\n            | Opt( config.shouldDebugBreak )\n                [\"-b\"][\"--break\"]\n                ( \"break into debugger on failure\" )\n            | Opt( config.noThrow )\n                [\"-e\"][\"--nothrow\"]\n                ( \"skip exception tests\" )\n            | Opt( config.showInvisibles )\n                [\"-i\"][\"--invisibles\"]\n                ( \"show invisibles (tabs, newlines)\" )\n            | Opt( config.outputFilename, \"filename\" )\n                [\"-o\"][\"--out\"]\n                ( \"output filename\" )\n            | Opt( setReporter, \"name\" )\n                [\"-r\"][\"--reporter\"]\n                ( \"reporter to use (defaults to console)\" )\n            | Opt( config.name, \"name\" )\n                [\"-n\"][\"--name\"]\n                ( \"suite name\" )\n            | Opt( [&]( bool ){ config.abortAfter = 1; } )\n                [\"-a\"][\"--abort\"]\n                ( \"abort at first failure\" )\n            | Opt( [&]( int x ){ config.abortAfter = x; }, \"no. failures\" )\n                [\"-x\"][\"--abortx\"]\n                ( \"abort after x failures\" )\n            | Opt( setWarning, \"warning name\" )\n                [\"-w\"][\"--warn\"]\n                ( \"enable warnings\" )\n            | Opt( [&]( bool flag ) { config.showDurations = flag ? ShowDurations::Always : ShowDurations::Never; }, \"yes|no\" )\n                [\"-d\"][\"--durations\"]\n                ( \"show test durations\" )\n            | Opt( config.minDuration, \"seconds\" )\n                [\"-D\"][\"--min-duration\"]\n                ( \"show test durations for tests taking at least the given number of seconds\" )\n            | Opt( loadTestNamesFromFile, \"filename\" )\n                [\"-f\"][\"--input-file\"]\n                ( \"load test names to run from a file\" )\n            | Opt( config.filenamesAsTags )\n                [\"-#\"][\"--filenames-as-tags\"]\n                ( \"adds a tag for the filename\" )\n            | Opt( config.sectionsToRun, \"section name\" )\n                [\"-c\"][\"--section\"]\n                ( \"specify section to run\" )\n            | Opt( setVerbosity, \"quiet|normal|high\" )\n                [\"-v\"][\"--verbosity\"]\n                ( \"set output verbosity\" )\n            | Opt( config.listTestNamesOnly )\n                [\"--list-test-names-only\"]\n                ( \"list all/matching test cases names only\" )\n            | Opt( config.listReporters )\n                [\"--list-reporters\"]\n                ( \"list all reporters\" )\n            | Opt( setTestOrder, \"decl|lex|rand\" )\n                [\"--order\"]\n                ( \"test case order (defaults to decl)\" )\n            | Opt( setRngSeed, \"'time'|number\" )\n                [\"--rng-seed\"]\n                ( \"set a specific seed for random numbers\" )\n            | Opt( setColourUsage, \"yes|no\" )\n                [\"--use-colour\"]\n                ( \"should output be colourised\" )\n            | Opt( config.libIdentify )\n                [\"--libidentify\"]\n                ( \"report name and version according to libidentify standard\" )\n            | Opt( setWaitForKeypress, \"never|start|exit|both\" )\n                [\"--wait-for-keypress\"]\n                ( \"waits for a keypress before exiting\" )\n            | Opt( config.benchmarkSamples, \"samples\" )\n                [\"--benchmark-samples\"]\n                ( \"number of samples to collect (default: 100)\" )\n            | Opt( config.benchmarkResamples, \"resamples\" )\n                [\"--benchmark-resamples\"]\n                ( \"number of resamples for the bootstrap (default: 100000)\" )\n            | Opt( config.benchmarkConfidenceInterval, \"confidence interval\" )\n                [\"--benchmark-confidence-interval\"]\n                ( \"confidence interval for the bootstrap (between 0 and 1, default: 0.95)\" )\n            | Opt( config.benchmarkNoAnalysis )\n                [\"--benchmark-no-analysis\"]\n                ( \"perform only measurements; do not perform any analysis\" )\n            | Opt( config.benchmarkWarmupTime, \"benchmarkWarmupTime\" )\n                [\"--benchmark-warmup-time\"]\n                ( \"amount of time in milliseconds spent on warming up each test (default: 100)\" )\n            | Arg( config.testsOrTags, \"test name|pattern|tags\" )\n                ( \"which test or tests to use\" );\n\n        return cli;\n    }\n\n} // end namespace Catch\n// end catch_commandline.cpp\n// start catch_common.cpp\n\n#include <cstring>\n#include <ostream>\n\nnamespace Catch {\n\n    bool SourceLineInfo::operator == ( SourceLineInfo const& other ) const noexcept {\n        return line == other.line && (file == other.file || std::strcmp(file, other.file) == 0);\n    }\n    bool SourceLineInfo::operator < ( SourceLineInfo const& other ) const noexcept {\n        // We can assume that the same file will usually have the same pointer.\n        // Thus, if the pointers are the same, there is no point in calling the strcmp\n        return line < other.line || ( line == other.line && file != other.file && (std::strcmp(file, other.file) < 0));\n    }\n\n    std::ostream& operator << ( std::ostream& os, SourceLineInfo const& info ) {\n#ifndef __GNUG__\n        os << info.file << '(' << info.line << ')';\n#else\n        os << info.file << ':' << info.line;\n#endif\n        return os;\n    }\n\n    std::string StreamEndStop::operator+() const {\n        return std::string();\n    }\n\n    NonCopyable::NonCopyable() = default;\n    NonCopyable::~NonCopyable() = default;\n\n}\n// end catch_common.cpp\n// start catch_config.cpp\n\nnamespace Catch {\n\n    Config::Config( ConfigData const& data )\n    :   m_data( data ),\n        m_stream( openStream() )\n    {\n        // We need to trim filter specs to avoid trouble with superfluous\n        // whitespace (esp. important for bdd macros, as those are manually\n        // aligned with whitespace).\n\n        for (auto& elem : m_data.testsOrTags) {\n            elem = trim(elem);\n        }\n        for (auto& elem : m_data.sectionsToRun) {\n            elem = trim(elem);\n        }\n\n        TestSpecParser parser(ITagAliasRegistry::get());\n        if (!m_data.testsOrTags.empty()) {\n            m_hasTestFilters = true;\n            for (auto const& testOrTags : m_data.testsOrTags) {\n                parser.parse(testOrTags);\n            }\n        }\n        m_testSpec = parser.testSpec();\n    }\n\n    std::string const& Config::getFilename() const {\n        return m_data.outputFilename ;\n    }\n\n    bool Config::listTests() const          { return m_data.listTests; }\n    bool Config::listTestNamesOnly() const  { return m_data.listTestNamesOnly; }\n    bool Config::listTags() const           { return m_data.listTags; }\n    bool Config::listReporters() const      { return m_data.listReporters; }\n\n    std::string Config::getProcessName() const { return m_data.processName; }\n    std::string const& Config::getReporterName() const { return m_data.reporterName; }\n\n    std::vector<std::string> const& Config::getTestsOrTags() const { return m_data.testsOrTags; }\n    std::vector<std::string> const& Config::getSectionsToRun() const { return m_data.sectionsToRun; }\n\n    TestSpec const& Config::testSpec() const { return m_testSpec; }\n    bool Config::hasTestFilters() const { return m_hasTestFilters; }\n\n    bool Config::showHelp() const { return m_data.showHelp; }\n\n    // IConfig interface\n    bool Config::allowThrows() const                   { return !m_data.noThrow; }\n    std::ostream& Config::stream() const               { return m_stream->stream(); }\n    std::string Config::name() const                   { return m_data.name.empty() ? m_data.processName : m_data.name; }\n    bool Config::includeSuccessfulResults() const      { return m_data.showSuccessfulTests; }\n    bool Config::warnAboutMissingAssertions() const    { return !!(m_data.warnings & WarnAbout::NoAssertions); }\n    bool Config::warnAboutNoTests() const              { return !!(m_data.warnings & WarnAbout::NoTests); }\n    ShowDurations::OrNot Config::showDurations() const { return m_data.showDurations; }\n    double Config::minDuration() const                 { return m_data.minDuration; }\n    RunTests::InWhatOrder Config::runOrder() const     { return m_data.runOrder; }\n    unsigned int Config::rngSeed() const               { return m_data.rngSeed; }\n    UseColour::YesOrNo Config::useColour() const       { return m_data.useColour; }\n    bool Config::shouldDebugBreak() const              { return m_data.shouldDebugBreak; }\n    int Config::abortAfter() const                     { return m_data.abortAfter; }\n    bool Config::showInvisibles() const                { return m_data.showInvisibles; }\n    Verbosity Config::verbosity() const                { return m_data.verbosity; }\n\n    bool Config::benchmarkNoAnalysis() const                      { return m_data.benchmarkNoAnalysis; }\n    int Config::benchmarkSamples() const                          { return m_data.benchmarkSamples; }\n    double Config::benchmarkConfidenceInterval() const            { return m_data.benchmarkConfidenceInterval; }\n    unsigned int Config::benchmarkResamples() const               { return m_data.benchmarkResamples; }\n    std::chrono::milliseconds Config::benchmarkWarmupTime() const { return std::chrono::milliseconds(m_data.benchmarkWarmupTime); }\n\n    IStream const* Config::openStream() {\n        return Catch::makeStream(m_data.outputFilename);\n    }\n\n} // end namespace Catch\n// end catch_config.cpp\n// start catch_console_colour.cpp\n\n#if defined(__clang__)\n#    pragma clang diagnostic push\n#    pragma clang diagnostic ignored \"-Wexit-time-destructors\"\n#endif\n\n// start catch_errno_guard.h\n\nnamespace Catch {\n\n    class ErrnoGuard {\n    public:\n        ErrnoGuard();\n        ~ErrnoGuard();\n    private:\n        int m_oldErrno;\n    };\n\n}\n\n// end catch_errno_guard.h\n// start catch_windows_h_proxy.h\n\n\n#if defined(CATCH_PLATFORM_WINDOWS)\n\n#if !defined(NOMINMAX) && !defined(CATCH_CONFIG_NO_NOMINMAX)\n#  define CATCH_DEFINED_NOMINMAX\n#  define NOMINMAX\n#endif\n#if !defined(WIN32_LEAN_AND_MEAN) && !defined(CATCH_CONFIG_NO_WIN32_LEAN_AND_MEAN)\n#  define CATCH_DEFINED_WIN32_LEAN_AND_MEAN\n#  define WIN32_LEAN_AND_MEAN\n#endif\n\n#ifdef __AFXDLL\n#include <AfxWin.h>\n#else\n#include <windows.h>\n#endif\n\n#ifdef CATCH_DEFINED_NOMINMAX\n#  undef NOMINMAX\n#endif\n#ifdef CATCH_DEFINED_WIN32_LEAN_AND_MEAN\n#  undef WIN32_LEAN_AND_MEAN\n#endif\n\n#endif // defined(CATCH_PLATFORM_WINDOWS)\n\n// end catch_windows_h_proxy.h\n#include <sstream>\n\nnamespace Catch {\n    namespace {\n\n        struct IColourImpl {\n            virtual ~IColourImpl() = default;\n            virtual void use( Colour::Code _colourCode ) = 0;\n        };\n\n        struct NoColourImpl : IColourImpl {\n            void use( Colour::Code ) override {}\n\n            static IColourImpl* instance() {\n                static NoColourImpl s_instance;\n                return &s_instance;\n            }\n        };\n\n    } // anon namespace\n} // namespace Catch\n\n#if !defined( CATCH_CONFIG_COLOUR_NONE ) && !defined( CATCH_CONFIG_COLOUR_WINDOWS ) && !defined( CATCH_CONFIG_COLOUR_ANSI )\n#   ifdef CATCH_PLATFORM_WINDOWS\n#       define CATCH_CONFIG_COLOUR_WINDOWS\n#   else\n#       define CATCH_CONFIG_COLOUR_ANSI\n#   endif\n#endif\n\n#if defined ( CATCH_CONFIG_COLOUR_WINDOWS ) /////////////////////////////////////////\n\nnamespace Catch {\nnamespace {\n\n    class Win32ColourImpl : public IColourImpl {\n    public:\n        Win32ColourImpl() : stdoutHandle( GetStdHandle(STD_OUTPUT_HANDLE) )\n        {\n            CONSOLE_SCREEN_BUFFER_INFO csbiInfo;\n            GetConsoleScreenBufferInfo( stdoutHandle, &csbiInfo );\n            originalForegroundAttributes = csbiInfo.wAttributes & ~( BACKGROUND_GREEN | BACKGROUND_RED | BACKGROUND_BLUE | BACKGROUND_INTENSITY );\n            originalBackgroundAttributes = csbiInfo.wAttributes & ~( FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_INTENSITY );\n        }\n\n        void use( Colour::Code _colourCode ) override {\n            switch( _colourCode ) {\n                case Colour::None:      return setTextAttribute( originalForegroundAttributes );\n                case Colour::White:     return setTextAttribute( FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE );\n                case Colour::Red:       return setTextAttribute( FOREGROUND_RED );\n                case Colour::Green:     return setTextAttribute( FOREGROUND_GREEN );\n                case Colour::Blue:      return setTextAttribute( FOREGROUND_BLUE );\n                case Colour::Cyan:      return setTextAttribute( FOREGROUND_BLUE | FOREGROUND_GREEN );\n                case Colour::Yellow:    return setTextAttribute( FOREGROUND_RED | FOREGROUND_GREEN );\n                case Colour::Grey:      return setTextAttribute( 0 );\n\n                case Colour::LightGrey:     return setTextAttribute( FOREGROUND_INTENSITY );\n                case Colour::BrightRed:     return setTextAttribute( FOREGROUND_INTENSITY | FOREGROUND_RED );\n                case Colour::BrightGreen:   return setTextAttribute( FOREGROUND_INTENSITY | FOREGROUND_GREEN );\n                case Colour::BrightWhite:   return setTextAttribute( FOREGROUND_INTENSITY | FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE );\n                case Colour::BrightYellow:  return setTextAttribute( FOREGROUND_INTENSITY | FOREGROUND_RED | FOREGROUND_GREEN );\n\n                case Colour::Bright: CATCH_INTERNAL_ERROR( \"not a colour\" );\n\n                default:\n                    CATCH_ERROR( \"Unknown colour requested\" );\n            }\n        }\n\n    private:\n        void setTextAttribute( WORD _textAttribute ) {\n            SetConsoleTextAttribute( stdoutHandle, _textAttribute | originalBackgroundAttributes );\n        }\n        HANDLE stdoutHandle;\n        WORD originalForegroundAttributes;\n        WORD originalBackgroundAttributes;\n    };\n\n    IColourImpl* platformColourInstance() {\n        static Win32ColourImpl s_instance;\n\n        IConfigPtr config = getCurrentContext().getConfig();\n        UseColour::YesOrNo colourMode = config\n            ? config->useColour()\n            : UseColour::Auto;\n        if( colourMode == UseColour::Auto )\n            colourMode = UseColour::Yes;\n        return colourMode == UseColour::Yes\n            ? &s_instance\n            : NoColourImpl::instance();\n    }\n\n} // end anon namespace\n} // end namespace Catch\n\n#elif defined( CATCH_CONFIG_COLOUR_ANSI ) //////////////////////////////////////\n\n#include <unistd.h>\n\nnamespace Catch {\nnamespace {\n\n    // use POSIX/ ANSI console terminal codes\n    // Thanks to Adam Strzelecki for original contribution\n    // (http://github.com/nanoant)\n    // https://github.com/philsquared/Catch/pull/131\n    class PosixColourImpl : public IColourImpl {\n    public:\n        void use( Colour::Code _colourCode ) override {\n            switch( _colourCode ) {\n                case Colour::None:\n                case Colour::White:     return setColour( \"[0m\" );\n                case Colour::Red:       return setColour( \"[0;31m\" );\n                case Colour::Green:     return setColour( \"[0;32m\" );\n                case Colour::Blue:      return setColour( \"[0;34m\" );\n                case Colour::Cyan:      return setColour( \"[0;36m\" );\n                case Colour::Yellow:    return setColour( \"[0;33m\" );\n                case Colour::Grey:      return setColour( \"[1;30m\" );\n\n                case Colour::LightGrey:     return setColour( \"[0;37m\" );\n                case Colour::BrightRed:     return setColour( \"[1;31m\" );\n                case Colour::BrightGreen:   return setColour( \"[1;32m\" );\n                case Colour::BrightWhite:   return setColour( \"[1;37m\" );\n                case Colour::BrightYellow:  return setColour( \"[1;33m\" );\n\n                case Colour::Bright: CATCH_INTERNAL_ERROR( \"not a colour\" );\n                default: CATCH_INTERNAL_ERROR( \"Unknown colour requested\" );\n            }\n        }\n        static IColourImpl* instance() {\n            static PosixColourImpl s_instance;\n            return &s_instance;\n        }\n\n    private:\n        void setColour( const char* _escapeCode ) {\n            getCurrentContext().getConfig()->stream()\n                << '\\033' << _escapeCode;\n        }\n    };\n\n    bool useColourOnPlatform() {\n        return\n#if defined(CATCH_PLATFORM_MAC) || defined(CATCH_PLATFORM_IPHONE)\n            !isDebuggerActive() &&\n#endif\n#if !(defined(__DJGPP__) && defined(__STRICT_ANSI__))\n            isatty(STDOUT_FILENO)\n#else\n            false\n#endif\n            ;\n    }\n    IColourImpl* platformColourInstance() {\n        ErrnoGuard guard;\n        IConfigPtr config = getCurrentContext().getConfig();\n        UseColour::YesOrNo colourMode = config\n            ? config->useColour()\n            : UseColour::Auto;\n        if( colourMode == UseColour::Auto )\n            colourMode = useColourOnPlatform()\n                ? UseColour::Yes\n                : UseColour::No;\n        return colourMode == UseColour::Yes\n            ? PosixColourImpl::instance()\n            : NoColourImpl::instance();\n    }\n\n} // end anon namespace\n} // end namespace Catch\n\n#else  // not Windows or ANSI ///////////////////////////////////////////////\n\nnamespace Catch {\n\n    static IColourImpl* platformColourInstance() { return NoColourImpl::instance(); }\n\n} // end namespace Catch\n\n#endif // Windows/ ANSI/ None\n\nnamespace Catch {\n\n    Colour::Colour( Code _colourCode ) { use( _colourCode ); }\n    Colour::Colour( Colour&& other ) noexcept {\n        m_moved = other.m_moved;\n        other.m_moved = true;\n    }\n    Colour& Colour::operator=( Colour&& other ) noexcept {\n        m_moved = other.m_moved;\n        other.m_moved  = true;\n        return *this;\n    }\n\n    Colour::~Colour(){ if( !m_moved ) use( None ); }\n\n    void Colour::use( Code _colourCode ) {\n        static IColourImpl* impl = platformColourInstance();\n        // Strictly speaking, this cannot possibly happen.\n        // However, under some conditions it does happen (see #1626),\n        // and this change is small enough that we can let practicality\n        // triumph over purity in this case.\n        if (impl != nullptr) {\n            impl->use( _colourCode );\n        }\n    }\n\n    std::ostream& operator << ( std::ostream& os, Colour const& ) {\n        return os;\n    }\n\n} // end namespace Catch\n\n#if defined(__clang__)\n#    pragma clang diagnostic pop\n#endif\n\n// end catch_console_colour.cpp\n// start catch_context.cpp\n\nnamespace Catch {\n\n    class Context : public IMutableContext, NonCopyable {\n\n    public: // IContext\n        IResultCapture* getResultCapture() override {\n            return m_resultCapture;\n        }\n        IRunner* getRunner() override {\n            return m_runner;\n        }\n\n        IConfigPtr const& getConfig() const override {\n            return m_config;\n        }\n\n        ~Context() override;\n\n    public: // IMutableContext\n        void setResultCapture( IResultCapture* resultCapture ) override {\n            m_resultCapture = resultCapture;\n        }\n        void setRunner( IRunner* runner ) override {\n            m_runner = runner;\n        }\n        void setConfig( IConfigPtr const& config ) override {\n            m_config = config;\n        }\n\n        friend IMutableContext& getCurrentMutableContext();\n\n    private:\n        IConfigPtr m_config;\n        IRunner* m_runner = nullptr;\n        IResultCapture* m_resultCapture = nullptr;\n    };\n\n    IMutableContext *IMutableContext::currentContext = nullptr;\n\n    void IMutableContext::createContext()\n    {\n        currentContext = new Context();\n    }\n\n    void cleanUpContext() {\n        delete IMutableContext::currentContext;\n        IMutableContext::currentContext = nullptr;\n    }\n    IContext::~IContext() = default;\n    IMutableContext::~IMutableContext() = default;\n    Context::~Context() = default;\n\n    SimplePcg32& rng() {\n        static SimplePcg32 s_rng;\n        return s_rng;\n    }\n\n}\n// end catch_context.cpp\n// start catch_debug_console.cpp\n\n// start catch_debug_console.h\n\n#include <string>\n\nnamespace Catch {\n    void writeToDebugConsole( std::string const& text );\n}\n\n// end catch_debug_console.h\n#if defined(CATCH_CONFIG_ANDROID_LOGWRITE)\n#include <android/log.h>\n\n    namespace Catch {\n        void writeToDebugConsole( std::string const& text ) {\n            __android_log_write( ANDROID_LOG_DEBUG, \"Catch\", text.c_str() );\n        }\n    }\n\n#elif defined(CATCH_PLATFORM_WINDOWS)\n\n    namespace Catch {\n        void writeToDebugConsole( std::string const& text ) {\n            ::OutputDebugStringA( text.c_str() );\n        }\n    }\n\n#else\n\n    namespace Catch {\n        void writeToDebugConsole( std::string const& text ) {\n            // !TBD: Need a version for Mac/ XCode and other IDEs\n            Catch::cout() << text;\n        }\n    }\n\n#endif // Platform\n// end catch_debug_console.cpp\n// start catch_debugger.cpp\n\n#if defined(CATCH_PLATFORM_MAC) || defined(CATCH_PLATFORM_IPHONE)\n\n#  include <cassert>\n#  include <sys/types.h>\n#  include <unistd.h>\n#  include <cstddef>\n#  include <ostream>\n\n#ifdef __apple_build_version__\n    // These headers will only compile with AppleClang (XCode)\n    // For other compilers (Clang, GCC, ... ) we need to exclude them\n#  include <sys/sysctl.h>\n#endif\n\n    namespace Catch {\n        #ifdef __apple_build_version__\n        // The following function is taken directly from the following technical note:\n        // https://developer.apple.com/library/archive/qa/qa1361/_index.html\n\n        // Returns true if the current process is being debugged (either\n        // running under the debugger or has a debugger attached post facto).\n        bool isDebuggerActive(){\n            int                 mib[4];\n            struct kinfo_proc   info;\n            std::size_t         size;\n\n            // Initialize the flags so that, if sysctl fails for some bizarre\n            // reason, we get a predictable result.\n\n            info.kp_proc.p_flag = 0;\n\n            // Initialize mib, which tells sysctl the info we want, in this case\n            // we're looking for information about a specific process ID.\n\n            mib[0] = CTL_KERN;\n            mib[1] = KERN_PROC;\n            mib[2] = KERN_PROC_PID;\n            mib[3] = getpid();\n\n            // Call sysctl.\n\n            size = sizeof(info);\n            if( sysctl(mib, sizeof(mib) / sizeof(*mib), &info, &size, nullptr, 0) != 0 ) {\n                Catch::cerr() << \"\\n** Call to sysctl failed - unable to determine if debugger is active **\\n\" << std::endl;\n                return false;\n            }\n\n            // We're being debugged if the P_TRACED flag is set.\n\n            return ( (info.kp_proc.p_flag & P_TRACED) != 0 );\n        }\n        #else\n        bool isDebuggerActive() {\n            // We need to find another way to determine this for non-appleclang compilers on macOS\n            return false;\n        }\n        #endif\n    } // namespace Catch\n\n#elif defined(CATCH_PLATFORM_LINUX)\n    #include <fstream>\n    #include <string>\n\n    namespace Catch{\n        // The standard POSIX way of detecting a debugger is to attempt to\n        // ptrace() the process, but this needs to be done from a child and not\n        // this process itself to still allow attaching to this process later\n        // if wanted, so is rather heavy. Under Linux we have the PID of the\n        // \"debugger\" (which doesn't need to be gdb, of course, it could also\n        // be strace, for example) in /proc/$PID/status, so just get it from\n        // there instead.\n        bool isDebuggerActive(){\n            // Libstdc++ has a bug, where std::ifstream sets errno to 0\n            // This way our users can properly assert over errno values\n            ErrnoGuard guard;\n            std::ifstream in(\"/proc/self/status\");\n            for( std::string line; std::getline(in, line); ) {\n                static const int PREFIX_LEN = 11;\n                if( line.compare(0, PREFIX_LEN, \"TracerPid:\\t\") == 0 ) {\n                    // We're traced if the PID is not 0 and no other PID starts\n                    // with 0 digit, so it's enough to check for just a single\n                    // character.\n                    return line.length() > PREFIX_LEN && line[PREFIX_LEN] != '0';\n                }\n            }\n\n            return false;\n        }\n    } // namespace Catch\n#elif defined(_MSC_VER)\n    extern \"C\" __declspec(dllimport) int __stdcall IsDebuggerPresent();\n    namespace Catch {\n        bool isDebuggerActive() {\n            return IsDebuggerPresent() != 0;\n        }\n    }\n#elif defined(__MINGW32__)\n    extern \"C\" __declspec(dllimport) int __stdcall IsDebuggerPresent();\n    namespace Catch {\n        bool isDebuggerActive() {\n            return IsDebuggerPresent() != 0;\n        }\n    }\n#else\n    namespace Catch {\n       bool isDebuggerActive() { return false; }\n    }\n#endif // Platform\n// end catch_debugger.cpp\n// start catch_decomposer.cpp\n\nnamespace Catch {\n\n    ITransientExpression::~ITransientExpression() = default;\n\n    void formatReconstructedExpression( std::ostream &os, std::string const& lhs, StringRef op, std::string const& rhs ) {\n        if( lhs.size() + rhs.size() < 40 &&\n                lhs.find('\\n') == std::string::npos &&\n                rhs.find('\\n') == std::string::npos )\n            os << lhs << \" \" << op << \" \" << rhs;\n        else\n            os << lhs << \"\\n\" << op << \"\\n\" << rhs;\n    }\n}\n// end catch_decomposer.cpp\n// start catch_enforce.cpp\n\n#include <stdexcept>\n\nnamespace Catch {\n#if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) && !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS_CUSTOM_HANDLER)\n    [[noreturn]]\n    void throw_exception(std::exception const& e) {\n        Catch::cerr() << \"Catch will terminate because it needed to throw an exception.\\n\"\n                      << \"The message was: \" << e.what() << '\\n';\n        std::terminate();\n    }\n#endif\n\n    [[noreturn]]\n    void throw_logic_error(std::string const& msg) {\n        throw_exception(std::logic_error(msg));\n    }\n\n    [[noreturn]]\n    void throw_domain_error(std::string const& msg) {\n        throw_exception(std::domain_error(msg));\n    }\n\n    [[noreturn]]\n    void throw_runtime_error(std::string const& msg) {\n        throw_exception(std::runtime_error(msg));\n    }\n\n} // namespace Catch;\n// end catch_enforce.cpp\n// start catch_enum_values_registry.cpp\n// start catch_enum_values_registry.h\n\n#include <vector>\n#include <memory>\n\nnamespace Catch {\n\n    namespace Detail {\n\n        std::unique_ptr<EnumInfo> makeEnumInfo( StringRef enumName, StringRef allValueNames, std::vector<int> const& values );\n\n        class EnumValuesRegistry : public IMutableEnumValuesRegistry {\n\n            std::vector<std::unique_ptr<EnumInfo>> m_enumInfos;\n\n            EnumInfo const& registerEnum( StringRef enumName, StringRef allEnums, std::vector<int> const& values) override;\n        };\n\n        std::vector<StringRef> parseEnums( StringRef enums );\n\n    } // Detail\n\n} // Catch\n\n// end catch_enum_values_registry.h\n\n#include <map>\n#include <cassert>\n\nnamespace Catch {\n\n    IMutableEnumValuesRegistry::~IMutableEnumValuesRegistry() {}\n\n    namespace Detail {\n\n        namespace {\n            // Extracts the actual name part of an enum instance\n            // In other words, it returns the Blue part of Bikeshed::Colour::Blue\n            StringRef extractInstanceName(StringRef enumInstance) {\n                // Find last occurrence of \":\"\n                size_t name_start = enumInstance.size();\n                while (name_start > 0 && enumInstance[name_start - 1] != ':') {\n                    --name_start;\n                }\n                return enumInstance.substr(name_start, enumInstance.size() - name_start);\n            }\n        }\n\n        std::vector<StringRef> parseEnums( StringRef enums ) {\n            auto enumValues = splitStringRef( enums, ',' );\n            std::vector<StringRef> parsed;\n            parsed.reserve( enumValues.size() );\n            for( auto const& enumValue : enumValues ) {\n                parsed.push_back(trim(extractInstanceName(enumValue)));\n            }\n            return parsed;\n        }\n\n        EnumInfo::~EnumInfo() {}\n\n        StringRef EnumInfo::lookup( int value ) const {\n            for( auto const& valueToName : m_values ) {\n                if( valueToName.first == value )\n                    return valueToName.second;\n            }\n            return \"{** unexpected enum value **}\"_sr;\n        }\n\n        std::unique_ptr<EnumInfo> makeEnumInfo( StringRef enumName, StringRef allValueNames, std::vector<int> const& values ) {\n            std::unique_ptr<EnumInfo> enumInfo( new EnumInfo );\n            enumInfo->m_name = enumName;\n            enumInfo->m_values.reserve( values.size() );\n\n            const auto valueNames = Catch::Detail::parseEnums( allValueNames );\n            assert( valueNames.size() == values.size() );\n            std::size_t i = 0;\n            for( auto value : values )\n                enumInfo->m_values.emplace_back(value, valueNames[i++]);\n\n            return enumInfo;\n        }\n\n        EnumInfo const& EnumValuesRegistry::registerEnum( StringRef enumName, StringRef allValueNames, std::vector<int> const& values ) {\n            m_enumInfos.push_back(makeEnumInfo(enumName, allValueNames, values));\n            return *m_enumInfos.back();\n        }\n\n    } // Detail\n} // Catch\n\n// end catch_enum_values_registry.cpp\n// start catch_errno_guard.cpp\n\n#include <cerrno>\n\nnamespace Catch {\n        ErrnoGuard::ErrnoGuard():m_oldErrno(errno){}\n        ErrnoGuard::~ErrnoGuard() { errno = m_oldErrno; }\n}\n// end catch_errno_guard.cpp\n// start catch_exception_translator_registry.cpp\n\n// start catch_exception_translator_registry.h\n\n#include <vector>\n#include <string>\n#include <memory>\n\nnamespace Catch {\n\n    class ExceptionTranslatorRegistry : public IExceptionTranslatorRegistry {\n    public:\n        ~ExceptionTranslatorRegistry();\n        virtual void registerTranslator( const IExceptionTranslator* translator );\n        std::string translateActiveException() const override;\n        std::string tryTranslators() const;\n\n    private:\n        std::vector<std::unique_ptr<IExceptionTranslator const>> m_translators;\n    };\n}\n\n// end catch_exception_translator_registry.h\n#ifdef __OBJC__\n#import \"Foundation/Foundation.h\"\n#endif\n\nnamespace Catch {\n\n    ExceptionTranslatorRegistry::~ExceptionTranslatorRegistry() {\n    }\n\n    void ExceptionTranslatorRegistry::registerTranslator( const IExceptionTranslator* translator ) {\n        m_translators.push_back( std::unique_ptr<const IExceptionTranslator>( translator ) );\n    }\n\n#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)\n    std::string ExceptionTranslatorRegistry::translateActiveException() const {\n        try {\n#ifdef __OBJC__\n            // In Objective-C try objective-c exceptions first\n            @try {\n                return tryTranslators();\n            }\n            @catch (NSException *exception) {\n                return Catch::Detail::stringify( [exception description] );\n            }\n#else\n            // Compiling a mixed mode project with MSVC means that CLR\n            // exceptions will be caught in (...) as well. However, these\n            // do not fill-in std::current_exception and thus lead to crash\n            // when attempting rethrow.\n            // /EHa switch also causes structured exceptions to be caught\n            // here, but they fill-in current_exception properly, so\n            // at worst the output should be a little weird, instead of\n            // causing a crash.\n            if (std::current_exception() == nullptr) {\n                return \"Non C++ exception. Possibly a CLR exception.\";\n            }\n            return tryTranslators();\n#endif\n        }\n        catch( TestFailureException& ) {\n            std::rethrow_exception(std::current_exception());\n        }\n        catch( std::exception& ex ) {\n            return ex.what();\n        }\n        catch( std::string& msg ) {\n            return msg;\n        }\n        catch( const char* msg ) {\n            return msg;\n        }\n        catch(...) {\n            return \"Unknown exception\";\n        }\n    }\n\n    std::string ExceptionTranslatorRegistry::tryTranslators() const {\n        if (m_translators.empty()) {\n            std::rethrow_exception(std::current_exception());\n        } else {\n            return m_translators[0]->translate(m_translators.begin() + 1, m_translators.end());\n        }\n    }\n\n#else // ^^ Exceptions are enabled // Exceptions are disabled vv\n    std::string ExceptionTranslatorRegistry::translateActiveException() const {\n        CATCH_INTERNAL_ERROR(\"Attempted to translate active exception under CATCH_CONFIG_DISABLE_EXCEPTIONS!\");\n    }\n\n    std::string ExceptionTranslatorRegistry::tryTranslators() const {\n        CATCH_INTERNAL_ERROR(\"Attempted to use exception translators under CATCH_CONFIG_DISABLE_EXCEPTIONS!\");\n    }\n#endif\n\n}\n// end catch_exception_translator_registry.cpp\n// start catch_fatal_condition.cpp\n\n#include <algorithm>\n\n#if !defined( CATCH_CONFIG_WINDOWS_SEH ) && !defined( CATCH_CONFIG_POSIX_SIGNALS )\n\nnamespace Catch {\n\n    // If neither SEH nor signal handling is required, the handler impls\n    // do not have to do anything, and can be empty.\n    void FatalConditionHandler::engage_platform() {}\n    void FatalConditionHandler::disengage_platform() {}\n    FatalConditionHandler::FatalConditionHandler() = default;\n    FatalConditionHandler::~FatalConditionHandler() = default;\n\n} // end namespace Catch\n\n#endif // !CATCH_CONFIG_WINDOWS_SEH && !CATCH_CONFIG_POSIX_SIGNALS\n\n#if defined( CATCH_CONFIG_WINDOWS_SEH ) && defined( CATCH_CONFIG_POSIX_SIGNALS )\n#error \"Inconsistent configuration: Windows' SEH handling and POSIX signals cannot be enabled at the same time\"\n#endif // CATCH_CONFIG_WINDOWS_SEH && CATCH_CONFIG_POSIX_SIGNALS\n\n#if defined( CATCH_CONFIG_WINDOWS_SEH ) || defined( CATCH_CONFIG_POSIX_SIGNALS )\n\nnamespace {\n    //! Signals fatal error message to the run context\n    void reportFatal( char const * const message ) {\n        Catch::getCurrentContext().getResultCapture()->handleFatalErrorCondition( message );\n    }\n\n    //! Minimal size Catch2 needs for its own fatal error handling.\n    //! Picked anecdotally, so it might not be sufficient on all\n    //! platforms, and for all configurations.\n    constexpr std::size_t minStackSizeForErrors = 32 * 1024;\n} // end unnamed namespace\n\n#endif // CATCH_CONFIG_WINDOWS_SEH || CATCH_CONFIG_POSIX_SIGNALS\n\n#if defined( CATCH_CONFIG_WINDOWS_SEH )\n\nnamespace Catch {\n\n    struct SignalDefs { DWORD id; const char* name; };\n\n    // There is no 1-1 mapping between signals and windows exceptions.\n    // Windows can easily distinguish between SO and SigSegV,\n    // but SigInt, SigTerm, etc are handled differently.\n    static SignalDefs signalDefs[] = {\n        { static_cast<DWORD>(EXCEPTION_ILLEGAL_INSTRUCTION),  \"SIGILL - Illegal instruction signal\" },\n        { static_cast<DWORD>(EXCEPTION_STACK_OVERFLOW), \"SIGSEGV - Stack overflow\" },\n        { static_cast<DWORD>(EXCEPTION_ACCESS_VIOLATION), \"SIGSEGV - Segmentation violation signal\" },\n        { static_cast<DWORD>(EXCEPTION_INT_DIVIDE_BY_ZERO), \"Divide by zero error\" },\n    };\n\n    static LONG CALLBACK handleVectoredException(PEXCEPTION_POINTERS ExceptionInfo) {\n        for (auto const& def : signalDefs) {\n            if (ExceptionInfo->ExceptionRecord->ExceptionCode == def.id) {\n                reportFatal(def.name);\n            }\n        }\n        // If its not an exception we care about, pass it along.\n        // This stops us from eating debugger breaks etc.\n        return EXCEPTION_CONTINUE_SEARCH;\n    }\n\n    // Since we do not support multiple instantiations, we put these\n    // into global variables and rely on cleaning them up in outlined\n    // constructors/destructors\n    static PVOID exceptionHandlerHandle = nullptr;\n\n    // For MSVC, we reserve part of the stack memory for handling\n    // memory overflow structured exception.\n    FatalConditionHandler::FatalConditionHandler() {\n        ULONG guaranteeSize = static_cast<ULONG>(minStackSizeForErrors);\n        if (!SetThreadStackGuarantee(&guaranteeSize)) {\n            // We do not want to fully error out, because needing\n            // the stack reserve should be rare enough anyway.\n            Catch::cerr()\n                << \"Failed to reserve piece of stack.\"\n                << \" Stack overflows will not be reported successfully.\";\n        }\n    }\n\n    // We do not attempt to unset the stack guarantee, because\n    // Windows does not support lowering the stack size guarantee.\n    FatalConditionHandler::~FatalConditionHandler() = default;\n\n    void FatalConditionHandler::engage_platform() {\n        // Register as first handler in current chain\n        exceptionHandlerHandle = AddVectoredExceptionHandler(1, handleVectoredException);\n        if (!exceptionHandlerHandle) {\n            CATCH_RUNTIME_ERROR(\"Could not register vectored exception handler\");\n        }\n    }\n\n    void FatalConditionHandler::disengage_platform() {\n        if (!RemoveVectoredExceptionHandler(exceptionHandlerHandle)) {\n            CATCH_RUNTIME_ERROR(\"Could not unregister vectored exception handler\");\n        }\n        exceptionHandlerHandle = nullptr;\n    }\n\n} // end namespace Catch\n\n#endif // CATCH_CONFIG_WINDOWS_SEH\n\n#if defined( CATCH_CONFIG_POSIX_SIGNALS )\n\n#include <signal.h>\n\nnamespace Catch {\n\n    struct SignalDefs {\n        int id;\n        const char* name;\n    };\n\n    static SignalDefs signalDefs[] = {\n        { SIGINT,  \"SIGINT - Terminal interrupt signal\" },\n        { SIGILL,  \"SIGILL - Illegal instruction signal\" },\n        { SIGFPE,  \"SIGFPE - Floating point error signal\" },\n        { SIGSEGV, \"SIGSEGV - Segmentation violation signal\" },\n        { SIGTERM, \"SIGTERM - Termination request signal\" },\n        { SIGABRT, \"SIGABRT - Abort (abnormal termination) signal\" }\n    };\n\n// Older GCCs trigger -Wmissing-field-initializers for T foo = {}\n// which is zero initialization, but not explicit. We want to avoid\n// that.\n#if defined(__GNUC__)\n#    pragma GCC diagnostic push\n#    pragma GCC diagnostic ignored \"-Wmissing-field-initializers\"\n#endif\n\n    static char* altStackMem = nullptr;\n    static std::size_t altStackSize = 0;\n    static stack_t oldSigStack{};\n    static struct sigaction oldSigActions[sizeof(signalDefs) / sizeof(SignalDefs)]{};\n\n    static void restorePreviousSignalHandlers() {\n        // We set signal handlers back to the previous ones. Hopefully\n        // nobody overwrote them in the meantime, and doesn't expect\n        // their signal handlers to live past ours given that they\n        // installed them after ours..\n        for (std::size_t i = 0; i < sizeof(signalDefs) / sizeof(SignalDefs); ++i) {\n            sigaction(signalDefs[i].id, &oldSigActions[i], nullptr);\n        }\n        // Return the old stack\n        sigaltstack(&oldSigStack, nullptr);\n    }\n\n    static void handleSignal( int sig ) {\n        char const * name = \"<unknown signal>\";\n        for (auto const& def : signalDefs) {\n            if (sig == def.id) {\n                name = def.name;\n                break;\n            }\n        }\n        // We need to restore previous signal handlers and let them do\n        // their thing, so that the users can have the debugger break\n        // when a signal is raised, and so on.\n        restorePreviousSignalHandlers();\n        reportFatal( name );\n        raise( sig );\n    }\n\n    FatalConditionHandler::FatalConditionHandler() {\n        assert(!altStackMem && \"Cannot initialize POSIX signal handler when one already exists\");\n        if (altStackSize == 0) {\n            altStackSize = std::max(static_cast<size_t>(SIGSTKSZ), minStackSizeForErrors);\n        }\n        altStackMem = new char[altStackSize]();\n    }\n\n    FatalConditionHandler::~FatalConditionHandler() {\n        delete[] altStackMem;\n        // We signal that another instance can be constructed by zeroing\n        // out the pointer.\n        altStackMem = nullptr;\n    }\n\n    void FatalConditionHandler::engage_platform() {\n        stack_t sigStack;\n        sigStack.ss_sp = altStackMem;\n        sigStack.ss_size = altStackSize;\n        sigStack.ss_flags = 0;\n        sigaltstack(&sigStack, &oldSigStack);\n        struct sigaction sa = { };\n\n        sa.sa_handler = handleSignal;\n        sa.sa_flags = SA_ONSTACK;\n        for (std::size_t i = 0; i < sizeof(signalDefs)/sizeof(SignalDefs); ++i) {\n            sigaction(signalDefs[i].id, &sa, &oldSigActions[i]);\n        }\n    }\n\n#if defined(__GNUC__)\n#    pragma GCC diagnostic pop\n#endif\n\n    void FatalConditionHandler::disengage_platform() {\n        restorePreviousSignalHandlers();\n    }\n\n} // end namespace Catch\n\n#endif // CATCH_CONFIG_POSIX_SIGNALS\n// end catch_fatal_condition.cpp\n// start catch_generators.cpp\n\n#include <limits>\n#include <set>\n\nnamespace Catch {\n\nIGeneratorTracker::~IGeneratorTracker() {}\n\nconst char* GeneratorException::what() const noexcept {\n    return m_msg;\n}\n\nnamespace Generators {\n\n    GeneratorUntypedBase::~GeneratorUntypedBase() {}\n\n    auto acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker& {\n        return getResultCapture().acquireGeneratorTracker( generatorName, lineInfo );\n    }\n\n} // namespace Generators\n} // namespace Catch\n// end catch_generators.cpp\n// start catch_interfaces_capture.cpp\n\nnamespace Catch {\n    IResultCapture::~IResultCapture() = default;\n}\n// end catch_interfaces_capture.cpp\n// start catch_interfaces_config.cpp\n\nnamespace Catch {\n    IConfig::~IConfig() = default;\n}\n// end catch_interfaces_config.cpp\n// start catch_interfaces_exception.cpp\n\nnamespace Catch {\n    IExceptionTranslator::~IExceptionTranslator() = default;\n    IExceptionTranslatorRegistry::~IExceptionTranslatorRegistry() = default;\n}\n// end catch_interfaces_exception.cpp\n// start catch_interfaces_registry_hub.cpp\n\nnamespace Catch {\n    IRegistryHub::~IRegistryHub() = default;\n    IMutableRegistryHub::~IMutableRegistryHub() = default;\n}\n// end catch_interfaces_registry_hub.cpp\n// start catch_interfaces_reporter.cpp\n\n// start catch_reporter_listening.h\n\nnamespace Catch {\n\n    class ListeningReporter : public IStreamingReporter {\n        using Reporters = std::vector<IStreamingReporterPtr>;\n        Reporters m_listeners;\n        IStreamingReporterPtr m_reporter = nullptr;\n        ReporterPreferences m_preferences;\n\n    public:\n        ListeningReporter();\n\n        void addListener( IStreamingReporterPtr&& listener );\n        void addReporter( IStreamingReporterPtr&& reporter );\n\n    public: // IStreamingReporter\n\n        ReporterPreferences getPreferences() const override;\n\n        void noMatchingTestCases( std::string const& spec ) override;\n\n        void reportInvalidArguments(std::string const&arg) override;\n\n        static std::set<Verbosity> getSupportedVerbosities();\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n        void benchmarkPreparing(std::string const& name) override;\n        void benchmarkStarting( BenchmarkInfo const& benchmarkInfo ) override;\n        void benchmarkEnded( BenchmarkStats<> const& benchmarkStats ) override;\n        void benchmarkFailed(std::string const&) override;\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n\n        void testRunStarting( TestRunInfo const& testRunInfo ) override;\n        void testGroupStarting( GroupInfo const& groupInfo ) override;\n        void testCaseStarting( TestCaseInfo const& testInfo ) override;\n        void sectionStarting( SectionInfo const& sectionInfo ) override;\n        void assertionStarting( AssertionInfo const& assertionInfo ) override;\n\n        // The return value indicates if the messages buffer should be cleared:\n        bool assertionEnded( AssertionStats const& assertionStats ) override;\n        void sectionEnded( SectionStats const& sectionStats ) override;\n        void testCaseEnded( TestCaseStats const& testCaseStats ) override;\n        void testGroupEnded( TestGroupStats const& testGroupStats ) override;\n        void testRunEnded( TestRunStats const& testRunStats ) override;\n\n        void skipTest( TestCaseInfo const& testInfo ) override;\n        bool isMulti() const override;\n\n    };\n\n} // end namespace Catch\n\n// end catch_reporter_listening.h\nnamespace Catch {\n\n    ReporterConfig::ReporterConfig( IConfigPtr const& _fullConfig )\n    :   m_stream( &_fullConfig->stream() ), m_fullConfig( _fullConfig ) {}\n\n    ReporterConfig::ReporterConfig( IConfigPtr const& _fullConfig, std::ostream& _stream )\n    :   m_stream( &_stream ), m_fullConfig( _fullConfig ) {}\n\n    std::ostream& ReporterConfig::stream() const { return *m_stream; }\n    IConfigPtr ReporterConfig::fullConfig() const { return m_fullConfig; }\n\n    TestRunInfo::TestRunInfo( std::string const& _name ) : name( _name ) {}\n\n    GroupInfo::GroupInfo(  std::string const& _name,\n                           std::size_t _groupIndex,\n                           std::size_t _groupsCount )\n    :   name( _name ),\n        groupIndex( _groupIndex ),\n        groupsCounts( _groupsCount )\n    {}\n\n     AssertionStats::AssertionStats( AssertionResult const& _assertionResult,\n                                     std::vector<MessageInfo> const& _infoMessages,\n                                     Totals const& _totals )\n    :   assertionResult( _assertionResult ),\n        infoMessages( _infoMessages ),\n        totals( _totals )\n    {\n        assertionResult.m_resultData.lazyExpression.m_transientExpression = _assertionResult.m_resultData.lazyExpression.m_transientExpression;\n\n        if( assertionResult.hasMessage() ) {\n            // Copy message into messages list.\n            // !TBD This should have been done earlier, somewhere\n            MessageBuilder builder( assertionResult.getTestMacroName(), assertionResult.getSourceInfo(), assertionResult.getResultType() );\n            builder << assertionResult.getMessage();\n            builder.m_info.message = builder.m_stream.str();\n\n            infoMessages.push_back( builder.m_info );\n        }\n    }\n\n     AssertionStats::~AssertionStats() = default;\n\n    SectionStats::SectionStats(  SectionInfo const& _sectionInfo,\n                                 Counts const& _assertions,\n                                 double _durationInSeconds,\n                                 bool _missingAssertions )\n    :   sectionInfo( _sectionInfo ),\n        assertions( _assertions ),\n        durationInSeconds( _durationInSeconds ),\n        missingAssertions( _missingAssertions )\n    {}\n\n    SectionStats::~SectionStats() = default;\n\n    TestCaseStats::TestCaseStats(  TestCaseInfo const& _testInfo,\n                                   Totals const& _totals,\n                                   std::string const& _stdOut,\n                                   std::string const& _stdErr,\n                                   bool _aborting )\n    : testInfo( _testInfo ),\n        totals( _totals ),\n        stdOut( _stdOut ),\n        stdErr( _stdErr ),\n        aborting( _aborting )\n    {}\n\n    TestCaseStats::~TestCaseStats() = default;\n\n    TestGroupStats::TestGroupStats( GroupInfo const& _groupInfo,\n                                    Totals const& _totals,\n                                    bool _aborting )\n    :   groupInfo( _groupInfo ),\n        totals( _totals ),\n        aborting( _aborting )\n    {}\n\n    TestGroupStats::TestGroupStats( GroupInfo const& _groupInfo )\n    :   groupInfo( _groupInfo ),\n        aborting( false )\n    {}\n\n    TestGroupStats::~TestGroupStats() = default;\n\n    TestRunStats::TestRunStats(   TestRunInfo const& _runInfo,\n                    Totals const& _totals,\n                    bool _aborting )\n    :   runInfo( _runInfo ),\n        totals( _totals ),\n        aborting( _aborting )\n    {}\n\n    TestRunStats::~TestRunStats() = default;\n\n    void IStreamingReporter::fatalErrorEncountered( StringRef ) {}\n    bool IStreamingReporter::isMulti() const { return false; }\n\n    IReporterFactory::~IReporterFactory() = default;\n    IReporterRegistry::~IReporterRegistry() = default;\n\n} // end namespace Catch\n// end catch_interfaces_reporter.cpp\n// start catch_interfaces_runner.cpp\n\nnamespace Catch {\n    IRunner::~IRunner() = default;\n}\n// end catch_interfaces_runner.cpp\n// start catch_interfaces_testcase.cpp\n\nnamespace Catch {\n    ITestInvoker::~ITestInvoker() = default;\n    ITestCaseRegistry::~ITestCaseRegistry() = default;\n}\n// end catch_interfaces_testcase.cpp\n// start catch_leak_detector.cpp\n\n#ifdef CATCH_CONFIG_WINDOWS_CRTDBG\n#include <crtdbg.h>\n\nnamespace Catch {\n\n    LeakDetector::LeakDetector() {\n        int flag = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);\n        flag |= _CRTDBG_LEAK_CHECK_DF;\n        flag |= _CRTDBG_ALLOC_MEM_DF;\n        _CrtSetDbgFlag(flag);\n        _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);\n        _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR);\n        // Change this to leaking allocation's number to break there\n        _CrtSetBreakAlloc(-1);\n    }\n}\n\n#else\n\n    Catch::LeakDetector::LeakDetector() {}\n\n#endif\n\nCatch::LeakDetector::~LeakDetector() {\n    Catch::cleanUp();\n}\n// end catch_leak_detector.cpp\n// start catch_list.cpp\n\n// start catch_list.h\n\n#include <set>\n\nnamespace Catch {\n\n    std::size_t listTests( Config const& config );\n\n    std::size_t listTestsNamesOnly( Config const& config );\n\n    struct TagInfo {\n        void add( std::string const& spelling );\n        std::string all() const;\n\n        std::set<std::string> spellings;\n        std::size_t count = 0;\n    };\n\n    std::size_t listTags( Config const& config );\n\n    std::size_t listReporters();\n\n    Option<std::size_t> list( std::shared_ptr<Config> const& config );\n\n} // end namespace Catch\n\n// end catch_list.h\n// start catch_text.h\n\nnamespace Catch {\n    using namespace clara::TextFlow;\n}\n\n// end catch_text.h\n#include <limits>\n#include <algorithm>\n#include <iomanip>\n\nnamespace Catch {\n\n    std::size_t listTests( Config const& config ) {\n        TestSpec const& testSpec = config.testSpec();\n        if( config.hasTestFilters() )\n            Catch::cout() << \"Matching test cases:\\n\";\n        else {\n            Catch::cout() << \"All available test cases:\\n\";\n        }\n\n        auto matchedTestCases = filterTests( getAllTestCasesSorted( config ), testSpec, config );\n        for( auto const& testCaseInfo : matchedTestCases ) {\n            Colour::Code colour = testCaseInfo.isHidden()\n                ? Colour::SecondaryText\n                : Colour::None;\n            Colour colourGuard( colour );\n\n            Catch::cout() << Column( testCaseInfo.name ).initialIndent( 2 ).indent( 4 ) << \"\\n\";\n            if( config.verbosity() >= Verbosity::High ) {\n                Catch::cout() << Column( Catch::Detail::stringify( testCaseInfo.lineInfo ) ).indent(4) << std::endl;\n                std::string description = testCaseInfo.description;\n                if( description.empty() )\n                    description = \"(NO DESCRIPTION)\";\n                Catch::cout() << Column( description ).indent(4) << std::endl;\n            }\n            if( !testCaseInfo.tags.empty() )\n                Catch::cout() << Column( testCaseInfo.tagsAsString() ).indent( 6 ) << \"\\n\";\n        }\n\n        if( !config.hasTestFilters() )\n            Catch::cout() << pluralise( matchedTestCases.size(), \"test case\" ) << '\\n' << std::endl;\n        else\n            Catch::cout() << pluralise( matchedTestCases.size(), \"matching test case\" ) << '\\n' << std::endl;\n        return matchedTestCases.size();\n    }\n\n    std::size_t listTestsNamesOnly( Config const& config ) {\n        TestSpec const& testSpec = config.testSpec();\n        std::size_t matchedTests = 0;\n        std::vector<TestCase> matchedTestCases = filterTests( getAllTestCasesSorted( config ), testSpec, config );\n        for( auto const& testCaseInfo : matchedTestCases ) {\n            matchedTests++;\n            if( startsWith( testCaseInfo.name, '#' ) )\n               Catch::cout() << '\"' << testCaseInfo.name << '\"';\n            else\n               Catch::cout() << testCaseInfo.name;\n            if ( config.verbosity() >= Verbosity::High )\n                Catch::cout() << \"\\t@\" << testCaseInfo.lineInfo;\n            Catch::cout() << std::endl;\n        }\n        return matchedTests;\n    }\n\n    void TagInfo::add( std::string const& spelling ) {\n        ++count;\n        spellings.insert( spelling );\n    }\n\n    std::string TagInfo::all() const {\n        size_t size = 0;\n        for (auto const& spelling : spellings) {\n            // Add 2 for the brackes\n            size += spelling.size() + 2;\n        }\n\n        std::string out; out.reserve(size);\n        for (auto const& spelling : spellings) {\n            out += '[';\n            out += spelling;\n            out += ']';\n        }\n        return out;\n    }\n\n    std::size_t listTags( Config const& config ) {\n        TestSpec const& testSpec = config.testSpec();\n        if( config.hasTestFilters() )\n            Catch::cout() << \"Tags for matching test cases:\\n\";\n        else {\n            Catch::cout() << \"All available tags:\\n\";\n        }\n\n        std::map<std::string, TagInfo> tagCounts;\n\n        std::vector<TestCase> matchedTestCases = filterTests( getAllTestCasesSorted( config ), testSpec, config );\n        for( auto const& testCase : matchedTestCases ) {\n            for( auto const& tagName : testCase.getTestCaseInfo().tags ) {\n                std::string lcaseTagName = toLower( tagName );\n                auto countIt = tagCounts.find( lcaseTagName );\n                if( countIt == tagCounts.end() )\n                    countIt = tagCounts.insert( std::make_pair( lcaseTagName, TagInfo() ) ).first;\n                countIt->second.add( tagName );\n            }\n        }\n\n        for( auto const& tagCount : tagCounts ) {\n            ReusableStringStream rss;\n            rss << \"  \" << std::setw(2) << tagCount.second.count << \"  \";\n            auto str = rss.str();\n            auto wrapper = Column( tagCount.second.all() )\n                                                    .initialIndent( 0 )\n                                                    .indent( str.size() )\n                                                    .width( CATCH_CONFIG_CONSOLE_WIDTH-10 );\n            Catch::cout() << str << wrapper << '\\n';\n        }\n        Catch::cout() << pluralise( tagCounts.size(), \"tag\" ) << '\\n' << std::endl;\n        return tagCounts.size();\n    }\n\n    std::size_t listReporters() {\n        Catch::cout() << \"Available reporters:\\n\";\n        IReporterRegistry::FactoryMap const& factories = getRegistryHub().getReporterRegistry().getFactories();\n        std::size_t maxNameLen = 0;\n        for( auto const& factoryKvp : factories )\n            maxNameLen = (std::max)( maxNameLen, factoryKvp.first.size() );\n\n        for( auto const& factoryKvp : factories ) {\n            Catch::cout()\n                    << Column( factoryKvp.first + \":\" )\n                            .indent(2)\n                            .width( 5+maxNameLen )\n                    +  Column( factoryKvp.second->getDescription() )\n                            .initialIndent(0)\n                            .indent(2)\n                            .width( CATCH_CONFIG_CONSOLE_WIDTH - maxNameLen-8 )\n                    << \"\\n\";\n        }\n        Catch::cout() << std::endl;\n        return factories.size();\n    }\n\n    Option<std::size_t> list( std::shared_ptr<Config> const& config ) {\n        Option<std::size_t> listedCount;\n        getCurrentMutableContext().setConfig( config );\n        if( config->listTests() )\n            listedCount = listedCount.valueOr(0) + listTests( *config );\n        if( config->listTestNamesOnly() )\n            listedCount = listedCount.valueOr(0) + listTestsNamesOnly( *config );\n        if( config->listTags() )\n            listedCount = listedCount.valueOr(0) + listTags( *config );\n        if( config->listReporters() )\n            listedCount = listedCount.valueOr(0) + listReporters();\n        return listedCount;\n    }\n\n} // end namespace Catch\n// end catch_list.cpp\n// start catch_matchers.cpp\n\nnamespace Catch {\nnamespace Matchers {\n    namespace Impl {\n\n        std::string MatcherUntypedBase::toString() const {\n            if( m_cachedToString.empty() )\n                m_cachedToString = describe();\n            return m_cachedToString;\n        }\n\n        MatcherUntypedBase::~MatcherUntypedBase() = default;\n\n    } // namespace Impl\n} // namespace Matchers\n\nusing namespace Matchers;\nusing Matchers::Impl::MatcherBase;\n\n} // namespace Catch\n// end catch_matchers.cpp\n// start catch_matchers_exception.cpp\n\nnamespace Catch {\nnamespace Matchers {\nnamespace Exception {\n\nbool ExceptionMessageMatcher::match(std::exception const& ex) const {\n    return ex.what() == m_message;\n}\n\nstd::string ExceptionMessageMatcher::describe() const {\n    return \"exception message matches \\\"\" + m_message + \"\\\"\";\n}\n\n}\nException::ExceptionMessageMatcher Message(std::string const& message) {\n    return Exception::ExceptionMessageMatcher(message);\n}\n\n// namespace Exception\n} // namespace Matchers\n} // namespace Catch\n// end catch_matchers_exception.cpp\n// start catch_matchers_floating.cpp\n\n// start catch_polyfills.hpp\n\nnamespace Catch {\n    bool isnan(float f);\n    bool isnan(double d);\n}\n\n// end catch_polyfills.hpp\n// start catch_to_string.hpp\n\n#include <string>\n\nnamespace Catch {\n    template <typename T>\n    std::string to_string(T const& t) {\n#if defined(CATCH_CONFIG_CPP11_TO_STRING)\n        return std::to_string(t);\n#else\n        ReusableStringStream rss;\n        rss << t;\n        return rss.str();\n#endif\n    }\n} // end namespace Catch\n\n// end catch_to_string.hpp\n#include <algorithm>\n#include <cmath>\n#include <cstdlib>\n#include <cstdint>\n#include <cstring>\n#include <sstream>\n#include <type_traits>\n#include <iomanip>\n#include <limits>\n\nnamespace Catch {\nnamespace {\n\n    int32_t convert(float f) {\n        static_assert(sizeof(float) == sizeof(int32_t), \"Important ULP matcher assumption violated\");\n        int32_t i;\n        std::memcpy(&i, &f, sizeof(f));\n        return i;\n    }\n\n    int64_t convert(double d) {\n        static_assert(sizeof(double) == sizeof(int64_t), \"Important ULP matcher assumption violated\");\n        int64_t i;\n        std::memcpy(&i, &d, sizeof(d));\n        return i;\n    }\n\n    template <typename FP>\n    bool almostEqualUlps(FP lhs, FP rhs, uint64_t maxUlpDiff) {\n        // Comparison with NaN should always be false.\n        // This way we can rule it out before getting into the ugly details\n        if (Catch::isnan(lhs) || Catch::isnan(rhs)) {\n            return false;\n        }\n\n        auto lc = convert(lhs);\n        auto rc = convert(rhs);\n\n        if ((lc < 0) != (rc < 0)) {\n            // Potentially we can have +0 and -0\n            return lhs == rhs;\n        }\n\n        // static cast as a workaround for IBM XLC\n        auto ulpDiff = std::abs(static_cast<FP>(lc - rc));\n        return static_cast<uint64_t>(ulpDiff) <= maxUlpDiff;\n    }\n\n#if defined(CATCH_CONFIG_GLOBAL_NEXTAFTER)\n\n    float nextafter(float x, float y) {\n        return ::nextafterf(x, y);\n    }\n\n    double nextafter(double x, double y) {\n        return ::nextafter(x, y);\n    }\n\n#endif // ^^^ CATCH_CONFIG_GLOBAL_NEXTAFTER ^^^\n\ntemplate <typename FP>\nFP step(FP start, FP direction, uint64_t steps) {\n    for (uint64_t i = 0; i < steps; ++i) {\n#if defined(CATCH_CONFIG_GLOBAL_NEXTAFTER)\n        start = Catch::nextafter(start, direction);\n#else\n        start = std::nextafter(start, direction);\n#endif\n    }\n    return start;\n}\n\n// Performs equivalent check of std::fabs(lhs - rhs) <= margin\n// But without the subtraction to allow for INFINITY in comparison\nbool marginComparison(double lhs, double rhs, double margin) {\n    return (lhs + margin >= rhs) && (rhs + margin >= lhs);\n}\n\ntemplate <typename FloatingPoint>\nvoid write(std::ostream& out, FloatingPoint num) {\n    out << std::scientific\n        << std::setprecision(std::numeric_limits<FloatingPoint>::max_digits10 - 1)\n        << num;\n}\n\n} // end anonymous namespace\n\nnamespace Matchers {\nnamespace Floating {\n\n    enum class FloatingPointKind : uint8_t {\n        Float,\n        Double\n    };\n\n    WithinAbsMatcher::WithinAbsMatcher(double target, double margin)\n        :m_target{ target }, m_margin{ margin } {\n        CATCH_ENFORCE(margin >= 0, \"Invalid margin: \" << margin << '.'\n            << \" Margin has to be non-negative.\");\n    }\n\n    // Performs equivalent check of std::fabs(lhs - rhs) <= margin\n    // But without the subtraction to allow for INFINITY in comparison\n    bool WithinAbsMatcher::match(double const& matchee) const {\n        return (matchee + m_margin >= m_target) && (m_target + m_margin >= matchee);\n    }\n\n    std::string WithinAbsMatcher::describe() const {\n        return \"is within \" + ::Catch::Detail::stringify(m_margin) + \" of \" + ::Catch::Detail::stringify(m_target);\n    }\n\n    WithinUlpsMatcher::WithinUlpsMatcher(double target, uint64_t ulps, FloatingPointKind baseType)\n        :m_target{ target }, m_ulps{ ulps }, m_type{ baseType } {\n        CATCH_ENFORCE(m_type == FloatingPointKind::Double\n                   || m_ulps < (std::numeric_limits<uint32_t>::max)(),\n            \"Provided ULP is impossibly large for a float comparison.\");\n    }\n\n#if defined(__clang__)\n#pragma clang diagnostic push\n// Clang <3.5 reports on the default branch in the switch below\n#pragma clang diagnostic ignored \"-Wunreachable-code\"\n#endif\n\n    bool WithinUlpsMatcher::match(double const& matchee) const {\n        switch (m_type) {\n        case FloatingPointKind::Float:\n            return almostEqualUlps<float>(static_cast<float>(matchee), static_cast<float>(m_target), m_ulps);\n        case FloatingPointKind::Double:\n            return almostEqualUlps<double>(matchee, m_target, m_ulps);\n        default:\n            CATCH_INTERNAL_ERROR( \"Unknown FloatingPointKind value\" );\n        }\n    }\n\n#if defined(__clang__)\n#pragma clang diagnostic pop\n#endif\n\n    std::string WithinUlpsMatcher::describe() const {\n        std::stringstream ret;\n\n        ret << \"is within \" << m_ulps << \" ULPs of \";\n\n        if (m_type == FloatingPointKind::Float) {\n            write(ret, static_cast<float>(m_target));\n            ret << 'f';\n        } else {\n            write(ret, m_target);\n        }\n\n        ret << \" ([\";\n        if (m_type == FloatingPointKind::Double) {\n            write(ret, step(m_target, static_cast<double>(-INFINITY), m_ulps));\n            ret << \", \";\n            write(ret, step(m_target, static_cast<double>( INFINITY), m_ulps));\n        } else {\n            // We have to cast INFINITY to float because of MinGW, see #1782\n            write(ret, step(static_cast<float>(m_target), static_cast<float>(-INFINITY), m_ulps));\n            ret << \", \";\n            write(ret, step(static_cast<float>(m_target), static_cast<float>( INFINITY), m_ulps));\n        }\n        ret << \"])\";\n\n        return ret.str();\n    }\n\n    WithinRelMatcher::WithinRelMatcher(double target, double epsilon):\n        m_target(target),\n        m_epsilon(epsilon){\n        CATCH_ENFORCE(m_epsilon >= 0., \"Relative comparison with epsilon <  0 does not make sense.\");\n        CATCH_ENFORCE(m_epsilon  < 1., \"Relative comparison with epsilon >= 1 does not make sense.\");\n    }\n\n    bool WithinRelMatcher::match(double const& matchee) const {\n        const auto relMargin = m_epsilon * (std::max)(std::fabs(matchee), std::fabs(m_target));\n        return marginComparison(matchee, m_target,\n                                std::isinf(relMargin)? 0 : relMargin);\n    }\n\n    std::string WithinRelMatcher::describe() const {\n        Catch::ReusableStringStream sstr;\n        sstr << \"and \" << m_target << \" are within \" << m_epsilon * 100. << \"% of each other\";\n        return sstr.str();\n    }\n\n}// namespace Floating\n\nFloating::WithinUlpsMatcher WithinULP(double target, uint64_t maxUlpDiff) {\n    return Floating::WithinUlpsMatcher(target, maxUlpDiff, Floating::FloatingPointKind::Double);\n}\n\nFloating::WithinUlpsMatcher WithinULP(float target, uint64_t maxUlpDiff) {\n    return Floating::WithinUlpsMatcher(target, maxUlpDiff, Floating::FloatingPointKind::Float);\n}\n\nFloating::WithinAbsMatcher WithinAbs(double target, double margin) {\n    return Floating::WithinAbsMatcher(target, margin);\n}\n\nFloating::WithinRelMatcher WithinRel(double target, double eps) {\n    return Floating::WithinRelMatcher(target, eps);\n}\n\nFloating::WithinRelMatcher WithinRel(double target) {\n    return Floating::WithinRelMatcher(target, std::numeric_limits<double>::epsilon() * 100);\n}\n\nFloating::WithinRelMatcher WithinRel(float target, float eps) {\n    return Floating::WithinRelMatcher(target, eps);\n}\n\nFloating::WithinRelMatcher WithinRel(float target) {\n    return Floating::WithinRelMatcher(target, std::numeric_limits<float>::epsilon() * 100);\n}\n\n} // namespace Matchers\n} // namespace Catch\n// end catch_matchers_floating.cpp\n// start catch_matchers_generic.cpp\n\nstd::string Catch::Matchers::Generic::Detail::finalizeDescription(const std::string& desc) {\n    if (desc.empty()) {\n        return \"matches undescribed predicate\";\n    } else {\n        return \"matches predicate: \\\"\" + desc + '\"';\n    }\n}\n// end catch_matchers_generic.cpp\n// start catch_matchers_string.cpp\n\n#include <regex>\n\nnamespace Catch {\nnamespace Matchers {\n\n    namespace StdString {\n\n        CasedString::CasedString( std::string const& str, CaseSensitive::Choice caseSensitivity )\n        :   m_caseSensitivity( caseSensitivity ),\n            m_str( adjustString( str ) )\n        {}\n        std::string CasedString::adjustString( std::string const& str ) const {\n            return m_caseSensitivity == CaseSensitive::No\n                   ? toLower( str )\n                   : str;\n        }\n        std::string CasedString::caseSensitivitySuffix() const {\n            return m_caseSensitivity == CaseSensitive::No\n                   ? \" (case insensitive)\"\n                   : std::string();\n        }\n\n        StringMatcherBase::StringMatcherBase( std::string const& operation, CasedString const& comparator )\n        : m_comparator( comparator ),\n          m_operation( operation ) {\n        }\n\n        std::string StringMatcherBase::describe() const {\n            std::string description;\n            description.reserve(5 + m_operation.size() + m_comparator.m_str.size() +\n                                        m_comparator.caseSensitivitySuffix().size());\n            description += m_operation;\n            description += \": \\\"\";\n            description += m_comparator.m_str;\n            description += \"\\\"\";\n            description += m_comparator.caseSensitivitySuffix();\n            return description;\n        }\n\n        EqualsMatcher::EqualsMatcher( CasedString const& comparator ) : StringMatcherBase( \"equals\", comparator ) {}\n\n        bool EqualsMatcher::match( std::string const& source ) const {\n            return m_comparator.adjustString( source ) == m_comparator.m_str;\n        }\n\n        ContainsMatcher::ContainsMatcher( CasedString const& comparator ) : StringMatcherBase( \"contains\", comparator ) {}\n\n        bool ContainsMatcher::match( std::string const& source ) const {\n            return contains( m_comparator.adjustString( source ), m_comparator.m_str );\n        }\n\n        StartsWithMatcher::StartsWithMatcher( CasedString const& comparator ) : StringMatcherBase( \"starts with\", comparator ) {}\n\n        bool StartsWithMatcher::match( std::string const& source ) const {\n            return startsWith( m_comparator.adjustString( source ), m_comparator.m_str );\n        }\n\n        EndsWithMatcher::EndsWithMatcher( CasedString const& comparator ) : StringMatcherBase( \"ends with\", comparator ) {}\n\n        bool EndsWithMatcher::match( std::string const& source ) const {\n            return endsWith( m_comparator.adjustString( source ), m_comparator.m_str );\n        }\n\n        RegexMatcher::RegexMatcher(std::string regex, CaseSensitive::Choice caseSensitivity): m_regex(std::move(regex)), m_caseSensitivity(caseSensitivity) {}\n\n        bool RegexMatcher::match(std::string const& matchee) const {\n            auto flags = std::regex::ECMAScript; // ECMAScript is the default syntax option anyway\n            if (m_caseSensitivity == CaseSensitive::Choice::No) {\n                flags |= std::regex::icase;\n            }\n            auto reg = std::regex(m_regex, flags);\n            return std::regex_match(matchee, reg);\n        }\n\n        std::string RegexMatcher::describe() const {\n            return \"matches \" + ::Catch::Detail::stringify(m_regex) + ((m_caseSensitivity == CaseSensitive::Choice::Yes)? \" case sensitively\" : \" case insensitively\");\n        }\n\n    } // namespace StdString\n\n    StdString::EqualsMatcher Equals( std::string const& str, CaseSensitive::Choice caseSensitivity ) {\n        return StdString::EqualsMatcher( StdString::CasedString( str, caseSensitivity) );\n    }\n    StdString::ContainsMatcher Contains( std::string const& str, CaseSensitive::Choice caseSensitivity ) {\n        return StdString::ContainsMatcher( StdString::CasedString( str, caseSensitivity) );\n    }\n    StdString::EndsWithMatcher EndsWith( std::string const& str, CaseSensitive::Choice caseSensitivity ) {\n        return StdString::EndsWithMatcher( StdString::CasedString( str, caseSensitivity) );\n    }\n    StdString::StartsWithMatcher StartsWith( std::string const& str, CaseSensitive::Choice caseSensitivity ) {\n        return StdString::StartsWithMatcher( StdString::CasedString( str, caseSensitivity) );\n    }\n\n    StdString::RegexMatcher Matches(std::string const& regex, CaseSensitive::Choice caseSensitivity) {\n        return StdString::RegexMatcher(regex, caseSensitivity);\n    }\n\n} // namespace Matchers\n} // namespace Catch\n// end catch_matchers_string.cpp\n// start catch_message.cpp\n\n// start catch_uncaught_exceptions.h\n\nnamespace Catch {\n    bool uncaught_exceptions();\n} // end namespace Catch\n\n// end catch_uncaught_exceptions.h\n#include <cassert>\n#include <stack>\n\nnamespace Catch {\n\n    MessageInfo::MessageInfo(   StringRef const& _macroName,\n                                SourceLineInfo const& _lineInfo,\n                                ResultWas::OfType _type )\n    :   macroName( _macroName ),\n        lineInfo( _lineInfo ),\n        type( _type ),\n        sequence( ++globalCount )\n    {}\n\n    bool MessageInfo::operator==( MessageInfo const& other ) const {\n        return sequence == other.sequence;\n    }\n\n    bool MessageInfo::operator<( MessageInfo const& other ) const {\n        return sequence < other.sequence;\n    }\n\n    // This may need protecting if threading support is added\n    unsigned int MessageInfo::globalCount = 0;\n\n    ////////////////////////////////////////////////////////////////////////////\n\n    Catch::MessageBuilder::MessageBuilder( StringRef const& macroName,\n                                           SourceLineInfo const& lineInfo,\n                                           ResultWas::OfType type )\n        :m_info(macroName, lineInfo, type) {}\n\n    ////////////////////////////////////////////////////////////////////////////\n\n    ScopedMessage::ScopedMessage( MessageBuilder const& builder )\n    : m_info( builder.m_info ), m_moved()\n    {\n        m_info.message = builder.m_stream.str();\n        getResultCapture().pushScopedMessage( m_info );\n    }\n\n    ScopedMessage::ScopedMessage( ScopedMessage&& old )\n    : m_info( old.m_info ), m_moved()\n    {\n        old.m_moved = true;\n    }\n\n    ScopedMessage::~ScopedMessage() {\n        if ( !uncaught_exceptions() && !m_moved ){\n            getResultCapture().popScopedMessage(m_info);\n        }\n    }\n\n    Capturer::Capturer( StringRef macroName, SourceLineInfo const& lineInfo, ResultWas::OfType resultType, StringRef names ) {\n        auto trimmed = [&] (size_t start, size_t end) {\n            while (names[start] == ',' || isspace(static_cast<unsigned char>(names[start]))) {\n                ++start;\n            }\n            while (names[end] == ',' || isspace(static_cast<unsigned char>(names[end]))) {\n                --end;\n            }\n            return names.substr(start, end - start + 1);\n        };\n        auto skipq = [&] (size_t start, char quote) {\n            for (auto i = start + 1; i < names.size() ; ++i) {\n                if (names[i] == quote)\n                    return i;\n                if (names[i] == '\\\\')\n                    ++i;\n            }\n            CATCH_INTERNAL_ERROR(\"CAPTURE parsing encountered unmatched quote\");\n        };\n\n        size_t start = 0;\n        std::stack<char> openings;\n        for (size_t pos = 0; pos < names.size(); ++pos) {\n            char c = names[pos];\n            switch (c) {\n            case '[':\n            case '{':\n            case '(':\n            // It is basically impossible to disambiguate between\n            // comparison and start of template args in this context\n//            case '<':\n                openings.push(c);\n                break;\n            case ']':\n            case '}':\n            case ')':\n//           case '>':\n                openings.pop();\n                break;\n            case '\"':\n            case '\\'':\n                pos = skipq(pos, c);\n                break;\n            case ',':\n                if (start != pos && openings.empty()) {\n                    m_messages.emplace_back(macroName, lineInfo, resultType);\n                    m_messages.back().message = static_cast<std::string>(trimmed(start, pos));\n                    m_messages.back().message += \" := \";\n                    start = pos;\n                }\n            }\n        }\n        assert(openings.empty() && \"Mismatched openings\");\n        m_messages.emplace_back(macroName, lineInfo, resultType);\n        m_messages.back().message = static_cast<std::string>(trimmed(start, names.size() - 1));\n        m_messages.back().message += \" := \";\n    }\n    Capturer::~Capturer() {\n        if ( !uncaught_exceptions() ){\n            assert( m_captured == m_messages.size() );\n            for( size_t i = 0; i < m_captured; ++i  )\n                m_resultCapture.popScopedMessage( m_messages[i] );\n        }\n    }\n\n    void Capturer::captureValue( size_t index, std::string const& value ) {\n        assert( index < m_messages.size() );\n        m_messages[index].message += value;\n        m_resultCapture.pushScopedMessage( m_messages[index] );\n        m_captured++;\n    }\n\n} // end namespace Catch\n// end catch_message.cpp\n// start catch_output_redirect.cpp\n\n// start catch_output_redirect.h\n#ifndef TWOBLUECUBES_CATCH_OUTPUT_REDIRECT_H\n#define TWOBLUECUBES_CATCH_OUTPUT_REDIRECT_H\n\n#include <cstdio>\n#include <iosfwd>\n#include <string>\n\nnamespace Catch {\n\n    class RedirectedStream {\n        std::ostream& m_originalStream;\n        std::ostream& m_redirectionStream;\n        std::streambuf* m_prevBuf;\n\n    public:\n        RedirectedStream( std::ostream& originalStream, std::ostream& redirectionStream );\n        ~RedirectedStream();\n    };\n\n    class RedirectedStdOut {\n        ReusableStringStream m_rss;\n        RedirectedStream m_cout;\n    public:\n        RedirectedStdOut();\n        auto str() const -> std::string;\n    };\n\n    // StdErr has two constituent streams in C++, std::cerr and std::clog\n    // This means that we need to redirect 2 streams into 1 to keep proper\n    // order of writes\n    class RedirectedStdErr {\n        ReusableStringStream m_rss;\n        RedirectedStream m_cerr;\n        RedirectedStream m_clog;\n    public:\n        RedirectedStdErr();\n        auto str() const -> std::string;\n    };\n\n    class RedirectedStreams {\n    public:\n        RedirectedStreams(RedirectedStreams const&) = delete;\n        RedirectedStreams& operator=(RedirectedStreams const&) = delete;\n        RedirectedStreams(RedirectedStreams&&) = delete;\n        RedirectedStreams& operator=(RedirectedStreams&&) = delete;\n\n        RedirectedStreams(std::string& redirectedCout, std::string& redirectedCerr);\n        ~RedirectedStreams();\n    private:\n        std::string& m_redirectedCout;\n        std::string& m_redirectedCerr;\n        RedirectedStdOut m_redirectedStdOut;\n        RedirectedStdErr m_redirectedStdErr;\n    };\n\n#if defined(CATCH_CONFIG_NEW_CAPTURE)\n\n    // Windows's implementation of std::tmpfile is terrible (it tries\n    // to create a file inside system folder, thus requiring elevated\n    // privileges for the binary), so we have to use tmpnam(_s) and\n    // create the file ourselves there.\n    class TempFile {\n    public:\n        TempFile(TempFile const&) = delete;\n        TempFile& operator=(TempFile const&) = delete;\n        TempFile(TempFile&&) = delete;\n        TempFile& operator=(TempFile&&) = delete;\n\n        TempFile();\n        ~TempFile();\n\n        std::FILE* getFile();\n        std::string getContents();\n\n    private:\n        std::FILE* m_file = nullptr;\n    #if defined(_MSC_VER)\n        char m_buffer[L_tmpnam] = { 0 };\n    #endif\n    };\n\n    class OutputRedirect {\n    public:\n        OutputRedirect(OutputRedirect const&) = delete;\n        OutputRedirect& operator=(OutputRedirect const&) = delete;\n        OutputRedirect(OutputRedirect&&) = delete;\n        OutputRedirect& operator=(OutputRedirect&&) = delete;\n\n        OutputRedirect(std::string& stdout_dest, std::string& stderr_dest);\n        ~OutputRedirect();\n\n    private:\n        int m_originalStdout = -1;\n        int m_originalStderr = -1;\n        TempFile m_stdoutFile;\n        TempFile m_stderrFile;\n        std::string& m_stdoutDest;\n        std::string& m_stderrDest;\n    };\n\n#endif\n\n} // end namespace Catch\n\n#endif // TWOBLUECUBES_CATCH_OUTPUT_REDIRECT_H\n// end catch_output_redirect.h\n#include <cstdio>\n#include <cstring>\n#include <fstream>\n#include <sstream>\n#include <stdexcept>\n\n#if defined(CATCH_CONFIG_NEW_CAPTURE)\n    #if defined(_MSC_VER)\n    #include <io.h>      //_dup and _dup2\n    #define dup _dup\n    #define dup2 _dup2\n    #define fileno _fileno\n    #else\n    #include <unistd.h>  // dup and dup2\n    #endif\n#endif\n\nnamespace Catch {\n\n    RedirectedStream::RedirectedStream( std::ostream& originalStream, std::ostream& redirectionStream )\n    :   m_originalStream( originalStream ),\n        m_redirectionStream( redirectionStream ),\n        m_prevBuf( m_originalStream.rdbuf() )\n    {\n        m_originalStream.rdbuf( m_redirectionStream.rdbuf() );\n    }\n\n    RedirectedStream::~RedirectedStream() {\n        m_originalStream.rdbuf( m_prevBuf );\n    }\n\n    RedirectedStdOut::RedirectedStdOut() : m_cout( Catch::cout(), m_rss.get() ) {}\n    auto RedirectedStdOut::str() const -> std::string { return m_rss.str(); }\n\n    RedirectedStdErr::RedirectedStdErr()\n    :   m_cerr( Catch::cerr(), m_rss.get() ),\n        m_clog( Catch::clog(), m_rss.get() )\n    {}\n    auto RedirectedStdErr::str() const -> std::string { return m_rss.str(); }\n\n    RedirectedStreams::RedirectedStreams(std::string& redirectedCout, std::string& redirectedCerr)\n    :   m_redirectedCout(redirectedCout),\n        m_redirectedCerr(redirectedCerr)\n    {}\n\n    RedirectedStreams::~RedirectedStreams() {\n        m_redirectedCout += m_redirectedStdOut.str();\n        m_redirectedCerr += m_redirectedStdErr.str();\n    }\n\n#if defined(CATCH_CONFIG_NEW_CAPTURE)\n\n#if defined(_MSC_VER)\n    TempFile::TempFile() {\n        if (tmpnam_s(m_buffer)) {\n            CATCH_RUNTIME_ERROR(\"Could not get a temp filename\");\n        }\n        if (fopen_s(&m_file, m_buffer, \"w+\")) {\n            char buffer[100];\n            if (strerror_s(buffer, errno)) {\n                CATCH_RUNTIME_ERROR(\"Could not translate errno to a string\");\n            }\n            CATCH_RUNTIME_ERROR(\"Could not open the temp file: '\" << m_buffer << \"' because: \" << buffer);\n        }\n    }\n#else\n    TempFile::TempFile() {\n        m_file = std::tmpfile();\n        if (!m_file) {\n            CATCH_RUNTIME_ERROR(\"Could not create a temp file.\");\n        }\n    }\n\n#endif\n\n    TempFile::~TempFile() {\n         // TBD: What to do about errors here?\n         std::fclose(m_file);\n         // We manually create the file on Windows only, on Linux\n         // it will be autodeleted\n#if defined(_MSC_VER)\n         std::remove(m_buffer);\n#endif\n    }\n\n    FILE* TempFile::getFile() {\n        return m_file;\n    }\n\n    std::string TempFile::getContents() {\n        std::stringstream sstr;\n        char buffer[100] = {};\n        std::rewind(m_file);\n        while (std::fgets(buffer, sizeof(buffer), m_file)) {\n            sstr << buffer;\n        }\n        return sstr.str();\n    }\n\n    OutputRedirect::OutputRedirect(std::string& stdout_dest, std::string& stderr_dest) :\n        m_originalStdout(dup(1)),\n        m_originalStderr(dup(2)),\n        m_stdoutDest(stdout_dest),\n        m_stderrDest(stderr_dest) {\n        dup2(fileno(m_stdoutFile.getFile()), 1);\n        dup2(fileno(m_stderrFile.getFile()), 2);\n    }\n\n    OutputRedirect::~OutputRedirect() {\n        Catch::cout() << std::flush;\n        fflush(stdout);\n        // Since we support overriding these streams, we flush cerr\n        // even though std::cerr is unbuffered\n        Catch::cerr() << std::flush;\n        Catch::clog() << std::flush;\n        fflush(stderr);\n\n        dup2(m_originalStdout, 1);\n        dup2(m_originalStderr, 2);\n\n        m_stdoutDest += m_stdoutFile.getContents();\n        m_stderrDest += m_stderrFile.getContents();\n    }\n\n#endif // CATCH_CONFIG_NEW_CAPTURE\n\n} // namespace Catch\n\n#if defined(CATCH_CONFIG_NEW_CAPTURE)\n    #if defined(_MSC_VER)\n    #undef dup\n    #undef dup2\n    #undef fileno\n    #endif\n#endif\n// end catch_output_redirect.cpp\n// start catch_polyfills.cpp\n\n#include <cmath>\n\nnamespace Catch {\n\n#if !defined(CATCH_CONFIG_POLYFILL_ISNAN)\n    bool isnan(float f) {\n        return std::isnan(f);\n    }\n    bool isnan(double d) {\n        return std::isnan(d);\n    }\n#else\n    // For now we only use this for embarcadero\n    bool isnan(float f) {\n        return std::_isnan(f);\n    }\n    bool isnan(double d) {\n        return std::_isnan(d);\n    }\n#endif\n\n} // end namespace Catch\n// end catch_polyfills.cpp\n// start catch_random_number_generator.cpp\n\nnamespace Catch {\n\nnamespace {\n\n#if defined(_MSC_VER)\n#pragma warning(push)\n#pragma warning(disable:4146) // we negate uint32 during the rotate\n#endif\n        // Safe rotr implementation thanks to John Regehr\n        uint32_t rotate_right(uint32_t val, uint32_t count) {\n            const uint32_t mask = 31;\n            count &= mask;\n            return (val >> count) | (val << (-count & mask));\n        }\n\n#if defined(_MSC_VER)\n#pragma warning(pop)\n#endif\n\n}\n\n    SimplePcg32::SimplePcg32(result_type seed_) {\n        seed(seed_);\n    }\n\n    void SimplePcg32::seed(result_type seed_) {\n        m_state = 0;\n        (*this)();\n        m_state += seed_;\n        (*this)();\n    }\n\n    void SimplePcg32::discard(uint64_t skip) {\n        // We could implement this to run in O(log n) steps, but this\n        // should suffice for our use case.\n        for (uint64_t s = 0; s < skip; ++s) {\n            static_cast<void>((*this)());\n        }\n    }\n\n    SimplePcg32::result_type SimplePcg32::operator()() {\n        // prepare the output value\n        const uint32_t xorshifted = static_cast<uint32_t>(((m_state >> 18u) ^ m_state) >> 27u);\n        const auto output = rotate_right(xorshifted, m_state >> 59u);\n\n        // advance state\n        m_state = m_state * 6364136223846793005ULL + s_inc;\n\n        return output;\n    }\n\n    bool operator==(SimplePcg32 const& lhs, SimplePcg32 const& rhs) {\n        return lhs.m_state == rhs.m_state;\n    }\n\n    bool operator!=(SimplePcg32 const& lhs, SimplePcg32 const& rhs) {\n        return lhs.m_state != rhs.m_state;\n    }\n}\n// end catch_random_number_generator.cpp\n// start catch_registry_hub.cpp\n\n// start catch_test_case_registry_impl.h\n\n#include <vector>\n#include <set>\n#include <algorithm>\n#include <ios>\n\nnamespace Catch {\n\n    class TestCase;\n    struct IConfig;\n\n    std::vector<TestCase> sortTests( IConfig const& config, std::vector<TestCase> const& unsortedTestCases );\n\n    bool isThrowSafe( TestCase const& testCase, IConfig const& config );\n    bool matchTest( TestCase const& testCase, TestSpec const& testSpec, IConfig const& config );\n\n    void enforceNoDuplicateTestCases( std::vector<TestCase> const& functions );\n\n    std::vector<TestCase> filterTests( std::vector<TestCase> const& testCases, TestSpec const& testSpec, IConfig const& config );\n    std::vector<TestCase> const& getAllTestCasesSorted( IConfig const& config );\n\n    class TestRegistry : public ITestCaseRegistry {\n    public:\n        virtual ~TestRegistry() = default;\n\n        virtual void registerTest( TestCase const& testCase );\n\n        std::vector<TestCase> const& getAllTests() const override;\n        std::vector<TestCase> const& getAllTestsSorted( IConfig const& config ) const override;\n\n    private:\n        std::vector<TestCase> m_functions;\n        mutable RunTests::InWhatOrder m_currentSortOrder = RunTests::InDeclarationOrder;\n        mutable std::vector<TestCase> m_sortedFunctions;\n        std::size_t m_unnamedCount = 0;\n        std::ios_base::Init m_ostreamInit; // Forces cout/ cerr to be initialised\n    };\n\n    ///////////////////////////////////////////////////////////////////////////\n\n    class TestInvokerAsFunction : public ITestInvoker {\n        void(*m_testAsFunction)();\n    public:\n        TestInvokerAsFunction( void(*testAsFunction)() ) noexcept;\n\n        void invoke() const override;\n    };\n\n    std::string extractClassName( StringRef const& classOrQualifiedMethodName );\n\n    ///////////////////////////////////////////////////////////////////////////\n\n} // end namespace Catch\n\n// end catch_test_case_registry_impl.h\n// start catch_reporter_registry.h\n\n#include <map>\n\nnamespace Catch {\n\n    class ReporterRegistry : public IReporterRegistry {\n\n    public:\n\n        ~ReporterRegistry() override;\n\n        IStreamingReporterPtr create( std::string const& name, IConfigPtr const& config ) const override;\n\n        void registerReporter( std::string const& name, IReporterFactoryPtr const& factory );\n        void registerListener( IReporterFactoryPtr const& factory );\n\n        FactoryMap const& getFactories() const override;\n        Listeners const& getListeners() const override;\n\n    private:\n        FactoryMap m_factories;\n        Listeners m_listeners;\n    };\n}\n\n// end catch_reporter_registry.h\n// start catch_tag_alias_registry.h\n\n// start catch_tag_alias.h\n\n#include <string>\n\nnamespace Catch {\n\n    struct TagAlias {\n        TagAlias(std::string const& _tag, SourceLineInfo _lineInfo);\n\n        std::string tag;\n        SourceLineInfo lineInfo;\n    };\n\n} // end namespace Catch\n\n// end catch_tag_alias.h\n#include <map>\n\nnamespace Catch {\n\n    class TagAliasRegistry : public ITagAliasRegistry {\n    public:\n        ~TagAliasRegistry() override;\n        TagAlias const* find( std::string const& alias ) const override;\n        std::string expandAliases( std::string const& unexpandedTestSpec ) const override;\n        void add( std::string const& alias, std::string const& tag, SourceLineInfo const& lineInfo );\n\n    private:\n        std::map<std::string, TagAlias> m_registry;\n    };\n\n} // end namespace Catch\n\n// end catch_tag_alias_registry.h\n// start catch_startup_exception_registry.h\n\n#include <vector>\n#include <exception>\n\nnamespace Catch {\n\n    class StartupExceptionRegistry {\n#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)\n    public:\n        void add(std::exception_ptr const& exception) noexcept;\n        std::vector<std::exception_ptr> const& getExceptions() const noexcept;\n    private:\n        std::vector<std::exception_ptr> m_exceptions;\n#endif\n    };\n\n} // end namespace Catch\n\n// end catch_startup_exception_registry.h\n// start catch_singletons.hpp\n\nnamespace Catch {\n\n    struct ISingleton {\n        virtual ~ISingleton();\n    };\n\n    void addSingleton( ISingleton* singleton );\n    void cleanupSingletons();\n\n    template<typename SingletonImplT, typename InterfaceT = SingletonImplT, typename MutableInterfaceT = InterfaceT>\n    class Singleton : SingletonImplT, public ISingleton {\n\n        static auto getInternal() -> Singleton* {\n            static Singleton* s_instance = nullptr;\n            if( !s_instance ) {\n                s_instance = new Singleton;\n                addSingleton( s_instance );\n            }\n            return s_instance;\n        }\n\n    public:\n        static auto get() -> InterfaceT const& {\n            return *getInternal();\n        }\n        static auto getMutable() -> MutableInterfaceT& {\n            return *getInternal();\n        }\n    };\n\n} // namespace Catch\n\n// end catch_singletons.hpp\nnamespace Catch {\n\n    namespace {\n\n        class RegistryHub : public IRegistryHub, public IMutableRegistryHub,\n                            private NonCopyable {\n\n        public: // IRegistryHub\n            RegistryHub() = default;\n            IReporterRegistry const& getReporterRegistry() const override {\n                return m_reporterRegistry;\n            }\n            ITestCaseRegistry const& getTestCaseRegistry() const override {\n                return m_testCaseRegistry;\n            }\n            IExceptionTranslatorRegistry const& getExceptionTranslatorRegistry() const override {\n                return m_exceptionTranslatorRegistry;\n            }\n            ITagAliasRegistry const& getTagAliasRegistry() const override {\n                return m_tagAliasRegistry;\n            }\n            StartupExceptionRegistry const& getStartupExceptionRegistry() const override {\n                return m_exceptionRegistry;\n            }\n\n        public: // IMutableRegistryHub\n            void registerReporter( std::string const& name, IReporterFactoryPtr const& factory ) override {\n                m_reporterRegistry.registerReporter( name, factory );\n            }\n            void registerListener( IReporterFactoryPtr const& factory ) override {\n                m_reporterRegistry.registerListener( factory );\n            }\n            void registerTest( TestCase const& testInfo ) override {\n                m_testCaseRegistry.registerTest( testInfo );\n            }\n            void registerTranslator( const IExceptionTranslator* translator ) override {\n                m_exceptionTranslatorRegistry.registerTranslator( translator );\n            }\n            void registerTagAlias( std::string const& alias, std::string const& tag, SourceLineInfo const& lineInfo ) override {\n                m_tagAliasRegistry.add( alias, tag, lineInfo );\n            }\n            void registerStartupException() noexcept override {\n#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)\n                m_exceptionRegistry.add(std::current_exception());\n#else\n                CATCH_INTERNAL_ERROR(\"Attempted to register active exception under CATCH_CONFIG_DISABLE_EXCEPTIONS!\");\n#endif\n            }\n            IMutableEnumValuesRegistry& getMutableEnumValuesRegistry() override {\n                return m_enumValuesRegistry;\n            }\n\n        private:\n            TestRegistry m_testCaseRegistry;\n            ReporterRegistry m_reporterRegistry;\n            ExceptionTranslatorRegistry m_exceptionTranslatorRegistry;\n            TagAliasRegistry m_tagAliasRegistry;\n            StartupExceptionRegistry m_exceptionRegistry;\n            Detail::EnumValuesRegistry m_enumValuesRegistry;\n        };\n    }\n\n    using RegistryHubSingleton = Singleton<RegistryHub, IRegistryHub, IMutableRegistryHub>;\n\n    IRegistryHub const& getRegistryHub() {\n        return RegistryHubSingleton::get();\n    }\n    IMutableRegistryHub& getMutableRegistryHub() {\n        return RegistryHubSingleton::getMutable();\n    }\n    void cleanUp() {\n        cleanupSingletons();\n        cleanUpContext();\n    }\n    std::string translateActiveException() {\n        return getRegistryHub().getExceptionTranslatorRegistry().translateActiveException();\n    }\n\n} // end namespace Catch\n// end catch_registry_hub.cpp\n// start catch_reporter_registry.cpp\n\nnamespace Catch {\n\n    ReporterRegistry::~ReporterRegistry() = default;\n\n    IStreamingReporterPtr ReporterRegistry::create( std::string const& name, IConfigPtr const& config ) const {\n        auto it =  m_factories.find( name );\n        if( it == m_factories.end() )\n            return nullptr;\n        return it->second->create( ReporterConfig( config ) );\n    }\n\n    void ReporterRegistry::registerReporter( std::string const& name, IReporterFactoryPtr const& factory ) {\n        m_factories.emplace(name, factory);\n    }\n    void ReporterRegistry::registerListener( IReporterFactoryPtr const& factory ) {\n        m_listeners.push_back( factory );\n    }\n\n    IReporterRegistry::FactoryMap const& ReporterRegistry::getFactories() const {\n        return m_factories;\n    }\n    IReporterRegistry::Listeners const& ReporterRegistry::getListeners() const {\n        return m_listeners;\n    }\n\n}\n// end catch_reporter_registry.cpp\n// start catch_result_type.cpp\n\nnamespace Catch {\n\n    bool isOk( ResultWas::OfType resultType ) {\n        return ( resultType & ResultWas::FailureBit ) == 0;\n    }\n    bool isJustInfo( int flags ) {\n        return flags == ResultWas::Info;\n    }\n\n    ResultDisposition::Flags operator | ( ResultDisposition::Flags lhs, ResultDisposition::Flags rhs ) {\n        return static_cast<ResultDisposition::Flags>( static_cast<int>( lhs ) | static_cast<int>( rhs ) );\n    }\n\n    bool shouldContinueOnFailure( int flags )    { return ( flags & ResultDisposition::ContinueOnFailure ) != 0; }\n    bool shouldSuppressFailure( int flags )      { return ( flags & ResultDisposition::SuppressFail ) != 0; }\n\n} // end namespace Catch\n// end catch_result_type.cpp\n// start catch_run_context.cpp\n\n#include <cassert>\n#include <algorithm>\n#include <sstream>\n\nnamespace Catch {\n\n    namespace Generators {\n        struct GeneratorTracker : TestCaseTracking::TrackerBase, IGeneratorTracker {\n            GeneratorBasePtr m_generator;\n\n            GeneratorTracker( TestCaseTracking::NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent )\n            :   TrackerBase( nameAndLocation, ctx, parent )\n            {}\n            ~GeneratorTracker();\n\n            static GeneratorTracker& acquire( TrackerContext& ctx, TestCaseTracking::NameAndLocation const& nameAndLocation ) {\n                std::shared_ptr<GeneratorTracker> tracker;\n\n                ITracker& currentTracker = ctx.currentTracker();\n                // Under specific circumstances, the generator we want\n                // to acquire is also the current tracker. If this is\n                // the case, we have to avoid looking through current\n                // tracker's children, and instead return the current\n                // tracker.\n                // A case where this check is important is e.g.\n                //     for (int i = 0; i < 5; ++i) {\n                //         int n = GENERATE(1, 2);\n                //     }\n                //\n                // without it, the code above creates 5 nested generators.\n                if (currentTracker.nameAndLocation() == nameAndLocation) {\n                    auto thisTracker = currentTracker.parent().findChild(nameAndLocation);\n                    assert(thisTracker);\n                    assert(thisTracker->isGeneratorTracker());\n                    tracker = std::static_pointer_cast<GeneratorTracker>(thisTracker);\n                } else if ( TestCaseTracking::ITrackerPtr childTracker = currentTracker.findChild( nameAndLocation ) ) {\n                    assert( childTracker );\n                    assert( childTracker->isGeneratorTracker() );\n                    tracker = std::static_pointer_cast<GeneratorTracker>( childTracker );\n                } else {\n                    tracker = std::make_shared<GeneratorTracker>( nameAndLocation, ctx, &currentTracker );\n                    currentTracker.addChild( tracker );\n                }\n\n                if( !tracker->isComplete() ) {\n                    tracker->open();\n                }\n\n                return *tracker;\n            }\n\n            // TrackerBase interface\n            bool isGeneratorTracker() const override { return true; }\n            auto hasGenerator() const -> bool override {\n                return !!m_generator;\n            }\n            void close() override {\n                TrackerBase::close();\n                // If a generator has a child (it is followed by a section)\n                // and none of its children have started, then we must wait\n                // until later to start consuming its values.\n                // This catches cases where `GENERATE` is placed between two\n                // `SECTION`s.\n                // **The check for m_children.empty cannot be removed**.\n                // doing so would break `GENERATE` _not_ followed by `SECTION`s.\n                const bool should_wait_for_child = [&]() {\n                    // No children -> nobody to wait for\n                    if ( m_children.empty() ) {\n                        return false;\n                    }\n                    // If at least one child started executing, don't wait\n                    if ( std::find_if(\n                             m_children.begin(),\n                             m_children.end(),\n                             []( TestCaseTracking::ITrackerPtr tracker ) {\n                                 return tracker->hasStarted();\n                             } ) != m_children.end() ) {\n                        return false;\n                    }\n\n                    // No children have started. We need to check if they _can_\n                    // start, and thus we should wait for them, or they cannot\n                    // start (due to filters), and we shouldn't wait for them\n                    auto* parent = m_parent;\n                    // This is safe: there is always at least one section\n                    // tracker in a test case tracking tree\n                    while ( !parent->isSectionTracker() ) {\n                        parent = &( parent->parent() );\n                    }\n                    assert( parent &&\n                            \"Missing root (test case) level section\" );\n\n                    auto const& parentSection =\n                        static_cast<SectionTracker&>( *parent );\n                    auto const& filters = parentSection.getFilters();\n                    // No filters -> no restrictions on running sections\n                    if ( filters.empty() ) {\n                        return true;\n                    }\n\n                    for ( auto const& child : m_children ) {\n                        if ( child->isSectionTracker() &&\n                             std::find( filters.begin(),\n                                        filters.end(),\n                                        static_cast<SectionTracker&>( *child )\n                                            .trimmedName() ) !=\n                                 filters.end() ) {\n                            return true;\n                        }\n                    }\n                    return false;\n                }();\n\n                // This check is a bit tricky, because m_generator->next()\n                // has a side-effect, where it consumes generator's current\n                // value, but we do not want to invoke the side-effect if\n                // this generator is still waiting for any child to start.\n                if ( should_wait_for_child ||\n                     ( m_runState == CompletedSuccessfully &&\n                       m_generator->next() ) ) {\n                    m_children.clear();\n                    m_runState = Executing;\n                }\n            }\n\n            // IGeneratorTracker interface\n            auto getGenerator() const -> GeneratorBasePtr const& override {\n                return m_generator;\n            }\n            void setGenerator( GeneratorBasePtr&& generator ) override {\n                m_generator = std::move( generator );\n            }\n        };\n        GeneratorTracker::~GeneratorTracker() {}\n    }\n\n    RunContext::RunContext(IConfigPtr const& _config, IStreamingReporterPtr&& reporter)\n    :   m_runInfo(_config->name()),\n        m_context(getCurrentMutableContext()),\n        m_config(_config),\n        m_reporter(std::move(reporter)),\n        m_lastAssertionInfo{ StringRef(), SourceLineInfo(\"\",0), StringRef(), ResultDisposition::Normal },\n        m_includeSuccessfulResults( m_config->includeSuccessfulResults() || m_reporter->getPreferences().shouldReportAllAssertions )\n    {\n        m_context.setRunner(this);\n        m_context.setConfig(m_config);\n        m_context.setResultCapture(this);\n        m_reporter->testRunStarting(m_runInfo);\n    }\n\n    RunContext::~RunContext() {\n        m_reporter->testRunEnded(TestRunStats(m_runInfo, m_totals, aborting()));\n    }\n\n    void RunContext::testGroupStarting(std::string const& testSpec, std::size_t groupIndex, std::size_t groupsCount) {\n        m_reporter->testGroupStarting(GroupInfo(testSpec, groupIndex, groupsCount));\n    }\n\n    void RunContext::testGroupEnded(std::string const& testSpec, Totals const& totals, std::size_t groupIndex, std::size_t groupsCount) {\n        m_reporter->testGroupEnded(TestGroupStats(GroupInfo(testSpec, groupIndex, groupsCount), totals, aborting()));\n    }\n\n    Totals RunContext::runTest(TestCase const& testCase) {\n        Totals prevTotals = m_totals;\n\n        std::string redirectedCout;\n        std::string redirectedCerr;\n\n        auto const& testInfo = testCase.getTestCaseInfo();\n\n        m_reporter->testCaseStarting(testInfo);\n\n        m_activeTestCase = &testCase;\n\n        ITracker& rootTracker = m_trackerContext.startRun();\n        assert(rootTracker.isSectionTracker());\n        static_cast<SectionTracker&>(rootTracker).addInitialFilters(m_config->getSectionsToRun());\n        do {\n            m_trackerContext.startCycle();\n            m_testCaseTracker = &SectionTracker::acquire(m_trackerContext, TestCaseTracking::NameAndLocation(testInfo.name, testInfo.lineInfo));\n            runCurrentTest(redirectedCout, redirectedCerr);\n        } while (!m_testCaseTracker->isSuccessfullyCompleted() && !aborting());\n\n        Totals deltaTotals = m_totals.delta(prevTotals);\n        if (testInfo.expectedToFail() && deltaTotals.testCases.passed > 0) {\n            deltaTotals.assertions.failed++;\n            deltaTotals.testCases.passed--;\n            deltaTotals.testCases.failed++;\n        }\n        m_totals.testCases += deltaTotals.testCases;\n        m_reporter->testCaseEnded(TestCaseStats(testInfo,\n                                  deltaTotals,\n                                  redirectedCout,\n                                  redirectedCerr,\n                                  aborting()));\n\n        m_activeTestCase = nullptr;\n        m_testCaseTracker = nullptr;\n\n        return deltaTotals;\n    }\n\n    IConfigPtr RunContext::config() const {\n        return m_config;\n    }\n\n    IStreamingReporter& RunContext::reporter() const {\n        return *m_reporter;\n    }\n\n    void RunContext::assertionEnded(AssertionResult const & result) {\n        if (result.getResultType() == ResultWas::Ok) {\n            m_totals.assertions.passed++;\n            m_lastAssertionPassed = true;\n        } else if (!result.isOk()) {\n            m_lastAssertionPassed = false;\n            if( m_activeTestCase->getTestCaseInfo().okToFail() )\n                m_totals.assertions.failedButOk++;\n            else\n                m_totals.assertions.failed++;\n        }\n        else {\n            m_lastAssertionPassed = true;\n        }\n\n        // We have no use for the return value (whether messages should be cleared), because messages were made scoped\n        // and should be let to clear themselves out.\n        static_cast<void>(m_reporter->assertionEnded(AssertionStats(result, m_messages, m_totals)));\n\n        if (result.getResultType() != ResultWas::Warning)\n            m_messageScopes.clear();\n\n        // Reset working state\n        resetAssertionInfo();\n        m_lastResult = result;\n    }\n    void RunContext::resetAssertionInfo() {\n        m_lastAssertionInfo.macroName = StringRef();\n        m_lastAssertionInfo.capturedExpression = \"{Unknown expression after the reported line}\"_sr;\n    }\n\n    bool RunContext::sectionStarted(SectionInfo const & sectionInfo, Counts & assertions) {\n        ITracker& sectionTracker = SectionTracker::acquire(m_trackerContext, TestCaseTracking::NameAndLocation(sectionInfo.name, sectionInfo.lineInfo));\n        if (!sectionTracker.isOpen())\n            return false;\n        m_activeSections.push_back(&sectionTracker);\n\n        m_lastAssertionInfo.lineInfo = sectionInfo.lineInfo;\n\n        m_reporter->sectionStarting(sectionInfo);\n\n        assertions = m_totals.assertions;\n\n        return true;\n    }\n    auto RunContext::acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker& {\n        using namespace Generators;\n        GeneratorTracker& tracker = GeneratorTracker::acquire(m_trackerContext,\n                                                              TestCaseTracking::NameAndLocation( static_cast<std::string>(generatorName), lineInfo ) );\n        m_lastAssertionInfo.lineInfo = lineInfo;\n        return tracker;\n    }\n\n    bool RunContext::testForMissingAssertions(Counts& assertions) {\n        if (assertions.total() != 0)\n            return false;\n        if (!m_config->warnAboutMissingAssertions())\n            return false;\n        if (m_trackerContext.currentTracker().hasChildren())\n            return false;\n        m_totals.assertions.failed++;\n        assertions.failed++;\n        return true;\n    }\n\n    void RunContext::sectionEnded(SectionEndInfo const & endInfo) {\n        Counts assertions = m_totals.assertions - endInfo.prevAssertions;\n        bool missingAssertions = testForMissingAssertions(assertions);\n\n        if (!m_activeSections.empty()) {\n            m_activeSections.back()->close();\n            m_activeSections.pop_back();\n        }\n\n        m_reporter->sectionEnded(SectionStats(endInfo.sectionInfo, assertions, endInfo.durationInSeconds, missingAssertions));\n        m_messages.clear();\n        m_messageScopes.clear();\n    }\n\n    void RunContext::sectionEndedEarly(SectionEndInfo const & endInfo) {\n        if (m_unfinishedSections.empty())\n            m_activeSections.back()->fail();\n        else\n            m_activeSections.back()->close();\n        m_activeSections.pop_back();\n\n        m_unfinishedSections.push_back(endInfo);\n    }\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n    void RunContext::benchmarkPreparing(std::string const& name) {\n        m_reporter->benchmarkPreparing(name);\n    }\n    void RunContext::benchmarkStarting( BenchmarkInfo const& info ) {\n        m_reporter->benchmarkStarting( info );\n    }\n    void RunContext::benchmarkEnded( BenchmarkStats<> const& stats ) {\n        m_reporter->benchmarkEnded( stats );\n    }\n    void RunContext::benchmarkFailed(std::string const & error) {\n        m_reporter->benchmarkFailed(error);\n    }\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n\n    void RunContext::pushScopedMessage(MessageInfo const & message) {\n        m_messages.push_back(message);\n    }\n\n    void RunContext::popScopedMessage(MessageInfo const & message) {\n        m_messages.erase(std::remove(m_messages.begin(), m_messages.end(), message), m_messages.end());\n    }\n\n    void RunContext::emplaceUnscopedMessage( MessageBuilder const& builder ) {\n        m_messageScopes.emplace_back( builder );\n    }\n\n    std::string RunContext::getCurrentTestName() const {\n        return m_activeTestCase\n            ? m_activeTestCase->getTestCaseInfo().name\n            : std::string();\n    }\n\n    const AssertionResult * RunContext::getLastResult() const {\n        return &(*m_lastResult);\n    }\n\n    void RunContext::exceptionEarlyReported() {\n        m_shouldReportUnexpected = false;\n    }\n\n    void RunContext::handleFatalErrorCondition( StringRef message ) {\n        // First notify reporter that bad things happened\n        m_reporter->fatalErrorEncountered(message);\n\n        // Don't rebuild the result -- the stringification itself can cause more fatal errors\n        // Instead, fake a result data.\n        AssertionResultData tempResult( ResultWas::FatalErrorCondition, { false } );\n        tempResult.message = static_cast<std::string>(message);\n        AssertionResult result(m_lastAssertionInfo, tempResult);\n\n        assertionEnded(result);\n\n        handleUnfinishedSections();\n\n        // Recreate section for test case (as we will lose the one that was in scope)\n        auto const& testCaseInfo = m_activeTestCase->getTestCaseInfo();\n        SectionInfo testCaseSection(testCaseInfo.lineInfo, testCaseInfo.name);\n\n        Counts assertions;\n        assertions.failed = 1;\n        SectionStats testCaseSectionStats(testCaseSection, assertions, 0, false);\n        m_reporter->sectionEnded(testCaseSectionStats);\n\n        auto const& testInfo = m_activeTestCase->getTestCaseInfo();\n\n        Totals deltaTotals;\n        deltaTotals.testCases.failed = 1;\n        deltaTotals.assertions.failed = 1;\n        m_reporter->testCaseEnded(TestCaseStats(testInfo,\n                                  deltaTotals,\n                                  std::string(),\n                                  std::string(),\n                                  false));\n        m_totals.testCases.failed++;\n        testGroupEnded(std::string(), m_totals, 1, 1);\n        m_reporter->testRunEnded(TestRunStats(m_runInfo, m_totals, false));\n    }\n\n    bool RunContext::lastAssertionPassed() {\n         return m_lastAssertionPassed;\n    }\n\n    void RunContext::assertionPassed() {\n        m_lastAssertionPassed = true;\n        ++m_totals.assertions.passed;\n        resetAssertionInfo();\n        m_messageScopes.clear();\n    }\n\n    bool RunContext::aborting() const {\n        return m_totals.assertions.failed >= static_cast<std::size_t>(m_config->abortAfter());\n    }\n\n    void RunContext::runCurrentTest(std::string & redirectedCout, std::string & redirectedCerr) {\n        auto const& testCaseInfo = m_activeTestCase->getTestCaseInfo();\n        SectionInfo testCaseSection(testCaseInfo.lineInfo, testCaseInfo.name);\n        m_reporter->sectionStarting(testCaseSection);\n        Counts prevAssertions = m_totals.assertions;\n        double duration = 0;\n        m_shouldReportUnexpected = true;\n        m_lastAssertionInfo = { \"TEST_CASE\"_sr, testCaseInfo.lineInfo, StringRef(), ResultDisposition::Normal };\n\n        seedRng(*m_config);\n\n        Timer timer;\n        CATCH_TRY {\n            if (m_reporter->getPreferences().shouldRedirectStdOut) {\n#if !defined(CATCH_CONFIG_EXPERIMENTAL_REDIRECT)\n                RedirectedStreams redirectedStreams(redirectedCout, redirectedCerr);\n\n                timer.start();\n                invokeActiveTestCase();\n#else\n                OutputRedirect r(redirectedCout, redirectedCerr);\n                timer.start();\n                invokeActiveTestCase();\n#endif\n            } else {\n                timer.start();\n                invokeActiveTestCase();\n            }\n            duration = timer.getElapsedSeconds();\n        } CATCH_CATCH_ANON (TestFailureException&) {\n            // This just means the test was aborted due to failure\n        } CATCH_CATCH_ALL {\n            // Under CATCH_CONFIG_FAST_COMPILE, unexpected exceptions under REQUIRE assertions\n            // are reported without translation at the point of origin.\n            if( m_shouldReportUnexpected ) {\n                AssertionReaction dummyReaction;\n                handleUnexpectedInflightException( m_lastAssertionInfo, translateActiveException(), dummyReaction );\n            }\n        }\n        Counts assertions = m_totals.assertions - prevAssertions;\n        bool missingAssertions = testForMissingAssertions(assertions);\n\n        m_testCaseTracker->close();\n        handleUnfinishedSections();\n        m_messages.clear();\n        m_messageScopes.clear();\n\n        SectionStats testCaseSectionStats(testCaseSection, assertions, duration, missingAssertions);\n        m_reporter->sectionEnded(testCaseSectionStats);\n    }\n\n    void RunContext::invokeActiveTestCase() {\n        FatalConditionHandlerGuard _(&m_fatalConditionhandler);\n        m_activeTestCase->invoke();\n    }\n\n    void RunContext::handleUnfinishedSections() {\n        // If sections ended prematurely due to an exception we stored their\n        // infos here so we can tear them down outside the unwind process.\n        for (auto it = m_unfinishedSections.rbegin(),\n             itEnd = m_unfinishedSections.rend();\n             it != itEnd;\n             ++it)\n            sectionEnded(*it);\n        m_unfinishedSections.clear();\n    }\n\n    void RunContext::handleExpr(\n        AssertionInfo const& info,\n        ITransientExpression const& expr,\n        AssertionReaction& reaction\n    ) {\n        m_reporter->assertionStarting( info );\n\n        bool negated = isFalseTest( info.resultDisposition );\n        bool result = expr.getResult() != negated;\n\n        if( result ) {\n            if (!m_includeSuccessfulResults) {\n                assertionPassed();\n            }\n            else {\n                reportExpr(info, ResultWas::Ok, &expr, negated);\n            }\n        }\n        else {\n            reportExpr(info, ResultWas::ExpressionFailed, &expr, negated );\n            populateReaction( reaction );\n        }\n    }\n    void RunContext::reportExpr(\n            AssertionInfo const &info,\n            ResultWas::OfType resultType,\n            ITransientExpression const *expr,\n            bool negated ) {\n\n        m_lastAssertionInfo = info;\n        AssertionResultData data( resultType, LazyExpression( negated ) );\n\n        AssertionResult assertionResult{ info, data };\n        assertionResult.m_resultData.lazyExpression.m_transientExpression = expr;\n\n        assertionEnded( assertionResult );\n    }\n\n    void RunContext::handleMessage(\n            AssertionInfo const& info,\n            ResultWas::OfType resultType,\n            StringRef const& message,\n            AssertionReaction& reaction\n    ) {\n        m_reporter->assertionStarting( info );\n\n        m_lastAssertionInfo = info;\n\n        AssertionResultData data( resultType, LazyExpression( false ) );\n        data.message = static_cast<std::string>(message);\n        AssertionResult assertionResult{ m_lastAssertionInfo, data };\n        assertionEnded( assertionResult );\n        if( !assertionResult.isOk() )\n            populateReaction( reaction );\n    }\n    void RunContext::handleUnexpectedExceptionNotThrown(\n            AssertionInfo const& info,\n            AssertionReaction& reaction\n    ) {\n        handleNonExpr(info, Catch::ResultWas::DidntThrowException, reaction);\n    }\n\n    void RunContext::handleUnexpectedInflightException(\n            AssertionInfo const& info,\n            std::string const& message,\n            AssertionReaction& reaction\n    ) {\n        m_lastAssertionInfo = info;\n\n        AssertionResultData data( ResultWas::ThrewException, LazyExpression( false ) );\n        data.message = message;\n        AssertionResult assertionResult{ info, data };\n        assertionEnded( assertionResult );\n        populateReaction( reaction );\n    }\n\n    void RunContext::populateReaction( AssertionReaction& reaction ) {\n        reaction.shouldDebugBreak = m_config->shouldDebugBreak();\n        reaction.shouldThrow = aborting() || (m_lastAssertionInfo.resultDisposition & ResultDisposition::Normal);\n    }\n\n    void RunContext::handleIncomplete(\n            AssertionInfo const& info\n    ) {\n        m_lastAssertionInfo = info;\n\n        AssertionResultData data( ResultWas::ThrewException, LazyExpression( false ) );\n        data.message = \"Exception translation was disabled by CATCH_CONFIG_FAST_COMPILE\";\n        AssertionResult assertionResult{ info, data };\n        assertionEnded( assertionResult );\n    }\n    void RunContext::handleNonExpr(\n            AssertionInfo const &info,\n            ResultWas::OfType resultType,\n            AssertionReaction &reaction\n    ) {\n        m_lastAssertionInfo = info;\n\n        AssertionResultData data( resultType, LazyExpression( false ) );\n        AssertionResult assertionResult{ info, data };\n        assertionEnded( assertionResult );\n\n        if( !assertionResult.isOk() )\n            populateReaction( reaction );\n    }\n\n    IResultCapture& getResultCapture() {\n        if (auto* capture = getCurrentContext().getResultCapture())\n            return *capture;\n        else\n            CATCH_INTERNAL_ERROR(\"No result capture instance\");\n    }\n\n    void seedRng(IConfig const& config) {\n        if (config.rngSeed() != 0) {\n            std::srand(config.rngSeed());\n            rng().seed(config.rngSeed());\n        }\n    }\n\n    unsigned int rngSeed() {\n        return getCurrentContext().getConfig()->rngSeed();\n    }\n\n}\n// end catch_run_context.cpp\n// start catch_section.cpp\n\nnamespace Catch {\n\n    Section::Section( SectionInfo const& info )\n    :   m_info( info ),\n        m_sectionIncluded( getResultCapture().sectionStarted( m_info, m_assertions ) )\n    {\n        m_timer.start();\n    }\n\n    Section::~Section() {\n        if( m_sectionIncluded ) {\n            SectionEndInfo endInfo{ m_info, m_assertions, m_timer.getElapsedSeconds() };\n            if( uncaught_exceptions() )\n                getResultCapture().sectionEndedEarly( endInfo );\n            else\n                getResultCapture().sectionEnded( endInfo );\n        }\n    }\n\n    // This indicates whether the section should be executed or not\n    Section::operator bool() const {\n        return m_sectionIncluded;\n    }\n\n} // end namespace Catch\n// end catch_section.cpp\n// start catch_section_info.cpp\n\nnamespace Catch {\n\n    SectionInfo::SectionInfo\n        (   SourceLineInfo const& _lineInfo,\n            std::string const& _name )\n    :   name( _name ),\n        lineInfo( _lineInfo )\n    {}\n\n} // end namespace Catch\n// end catch_section_info.cpp\n// start catch_session.cpp\n\n// start catch_session.h\n\n#include <memory>\n\nnamespace Catch {\n\n    class Session : NonCopyable {\n    public:\n\n        Session();\n        ~Session() override;\n\n        void showHelp() const;\n        void libIdentify();\n\n        int applyCommandLine( int argc, char const * const * argv );\n    #if defined(CATCH_CONFIG_WCHAR) && defined(_WIN32) && defined(UNICODE)\n        int applyCommandLine( int argc, wchar_t const * const * argv );\n    #endif\n\n        void useConfigData( ConfigData const& configData );\n\n        template<typename CharT>\n        int run(int argc, CharT const * const argv[]) {\n            if (m_startupExceptions)\n                return 1;\n            int returnCode = applyCommandLine(argc, argv);\n            if (returnCode == 0)\n                returnCode = run();\n            return returnCode;\n        }\n\n        int run();\n\n        clara::Parser const& cli() const;\n        void cli( clara::Parser const& newParser );\n        ConfigData& configData();\n        Config& config();\n    private:\n        int runInternal();\n\n        clara::Parser m_cli;\n        ConfigData m_configData;\n        std::shared_ptr<Config> m_config;\n        bool m_startupExceptions = false;\n    };\n\n} // end namespace Catch\n\n// end catch_session.h\n// start catch_version.h\n\n#include <iosfwd>\n\nnamespace Catch {\n\n    // Versioning information\n    struct Version {\n        Version( Version const& ) = delete;\n        Version& operator=( Version const& ) = delete;\n        Version(    unsigned int _majorVersion,\n                    unsigned int _minorVersion,\n                    unsigned int _patchNumber,\n                    char const * const _branchName,\n                    unsigned int _buildNumber );\n\n        unsigned int const majorVersion;\n        unsigned int const minorVersion;\n        unsigned int const patchNumber;\n\n        // buildNumber is only used if branchName is not null\n        char const * const branchName;\n        unsigned int const buildNumber;\n\n        friend std::ostream& operator << ( std::ostream& os, Version const& version );\n    };\n\n    Version const& libraryVersion();\n}\n\n// end catch_version.h\n#include <cstdlib>\n#include <iomanip>\n#include <set>\n#include <iterator>\n\nnamespace Catch {\n\n    namespace {\n        const int MaxExitCode = 255;\n\n        IStreamingReporterPtr createReporter(std::string const& reporterName, IConfigPtr const& config) {\n            auto reporter = Catch::getRegistryHub().getReporterRegistry().create(reporterName, config);\n            CATCH_ENFORCE(reporter, \"No reporter registered with name: '\" << reporterName << \"'\");\n\n            return reporter;\n        }\n\n        IStreamingReporterPtr makeReporter(std::shared_ptr<Config> const& config) {\n            if (Catch::getRegistryHub().getReporterRegistry().getListeners().empty()) {\n                return createReporter(config->getReporterName(), config);\n            }\n\n            // On older platforms, returning std::unique_ptr<ListeningReporter>\n            // when the return type is std::unique_ptr<IStreamingReporter>\n            // doesn't compile without a std::move call. However, this causes\n            // a warning on newer platforms. Thus, we have to work around\n            // it a bit and downcast the pointer manually.\n            auto ret = std::unique_ptr<IStreamingReporter>(new ListeningReporter);\n            auto& multi = static_cast<ListeningReporter&>(*ret);\n            auto const& listeners = Catch::getRegistryHub().getReporterRegistry().getListeners();\n            for (auto const& listener : listeners) {\n                multi.addListener(listener->create(Catch::ReporterConfig(config)));\n            }\n            multi.addReporter(createReporter(config->getReporterName(), config));\n            return ret;\n        }\n\n        class TestGroup {\n        public:\n            explicit TestGroup(std::shared_ptr<Config> const& config)\n            : m_config{config}\n            , m_context{config, makeReporter(config)}\n            {\n                auto const& allTestCases = getAllTestCasesSorted(*m_config);\n                m_matches = m_config->testSpec().matchesByFilter(allTestCases, *m_config);\n                auto const& invalidArgs = m_config->testSpec().getInvalidArgs();\n\n                if (m_matches.empty() && invalidArgs.empty()) {\n                    for (auto const& test : allTestCases)\n                        if (!test.isHidden())\n                            m_tests.emplace(&test);\n                } else {\n                    for (auto const& match : m_matches)\n                        m_tests.insert(match.tests.begin(), match.tests.end());\n                }\n            }\n\n            Totals execute() {\n                auto const& invalidArgs = m_config->testSpec().getInvalidArgs();\n                Totals totals;\n                m_context.testGroupStarting(m_config->name(), 1, 1);\n                for (auto const& testCase : m_tests) {\n                    if (!m_context.aborting())\n                        totals += m_context.runTest(*testCase);\n                    else\n                        m_context.reporter().skipTest(*testCase);\n                }\n\n                for (auto const& match : m_matches) {\n                    if (match.tests.empty()) {\n                        m_context.reporter().noMatchingTestCases(match.name);\n                        totals.error = -1;\n                    }\n                }\n\n                if (!invalidArgs.empty()) {\n                    for (auto const& invalidArg: invalidArgs)\n                         m_context.reporter().reportInvalidArguments(invalidArg);\n                }\n\n                m_context.testGroupEnded(m_config->name(), totals, 1, 1);\n                return totals;\n            }\n\n        private:\n            using Tests = std::set<TestCase const*>;\n\n            std::shared_ptr<Config> m_config;\n            RunContext m_context;\n            Tests m_tests;\n            TestSpec::Matches m_matches;\n        };\n\n        void applyFilenamesAsTags(Catch::IConfig const& config) {\n            auto& tests = const_cast<std::vector<TestCase>&>(getAllTestCasesSorted(config));\n            for (auto& testCase : tests) {\n                auto tags = testCase.tags;\n\n                std::string filename = testCase.lineInfo.file;\n                auto lastSlash = filename.find_last_of(\"\\\\/\");\n                if (lastSlash != std::string::npos) {\n                    filename.erase(0, lastSlash);\n                    filename[0] = '#';\n                }\n                else\n                {\n                    filename.insert(0, \"#\");\n                }\n\n                auto lastDot = filename.find_last_of('.');\n                if (lastDot != std::string::npos) {\n                    filename.erase(lastDot);\n                }\n\n                tags.push_back(std::move(filename));\n                setTags(testCase, tags);\n            }\n        }\n\n    } // anon namespace\n\n    Session::Session() {\n        static bool alreadyInstantiated = false;\n        if( alreadyInstantiated ) {\n            CATCH_TRY { CATCH_INTERNAL_ERROR( \"Only one instance of Catch::Session can ever be used\" ); }\n            CATCH_CATCH_ALL { getMutableRegistryHub().registerStartupException(); }\n        }\n\n        // There cannot be exceptions at startup in no-exception mode.\n#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)\n        const auto& exceptions = getRegistryHub().getStartupExceptionRegistry().getExceptions();\n        if ( !exceptions.empty() ) {\n            config();\n            getCurrentMutableContext().setConfig(m_config);\n\n            m_startupExceptions = true;\n            Colour colourGuard( Colour::Red );\n            Catch::cerr() << \"Errors occurred during startup!\" << '\\n';\n            // iterate over all exceptions and notify user\n            for ( const auto& ex_ptr : exceptions ) {\n                try {\n                    std::rethrow_exception(ex_ptr);\n                } catch ( std::exception const& ex ) {\n                    Catch::cerr() << Column( ex.what() ).indent(2) << '\\n';\n                }\n            }\n        }\n#endif\n\n        alreadyInstantiated = true;\n        m_cli = makeCommandLineParser( m_configData );\n    }\n    Session::~Session() {\n        Catch::cleanUp();\n    }\n\n    void Session::showHelp() const {\n        Catch::cout()\n                << \"\\nCatch v\" << libraryVersion() << \"\\n\"\n                << m_cli << std::endl\n                << \"For more detailed usage please see the project docs\\n\" << std::endl;\n    }\n    void Session::libIdentify() {\n        Catch::cout()\n                << std::left << std::setw(16) << \"description: \" << \"A Catch2 test executable\\n\"\n                << std::left << std::setw(16) << \"category: \" << \"testframework\\n\"\n                << std::left << std::setw(16) << \"framework: \" << \"Catch Test\\n\"\n                << std::left << std::setw(16) << \"version: \" << libraryVersion() << std::endl;\n    }\n\n    int Session::applyCommandLine( int argc, char const * const * argv ) {\n        if( m_startupExceptions )\n            return 1;\n\n        auto result = m_cli.parse( clara::Args( argc, argv ) );\n        if( !result ) {\n            config();\n            getCurrentMutableContext().setConfig(m_config);\n            Catch::cerr()\n                << Colour( Colour::Red )\n                << \"\\nError(s) in input:\\n\"\n                << Column( result.errorMessage() ).indent( 2 )\n                << \"\\n\\n\";\n            Catch::cerr() << \"Run with -? for usage\\n\" << std::endl;\n            return MaxExitCode;\n        }\n\n        if( m_configData.showHelp )\n            showHelp();\n        if( m_configData.libIdentify )\n            libIdentify();\n        m_config.reset();\n        return 0;\n    }\n\n#if defined(CATCH_CONFIG_WCHAR) && defined(_WIN32) && defined(UNICODE)\n    int Session::applyCommandLine( int argc, wchar_t const * const * argv ) {\n\n        char **utf8Argv = new char *[ argc ];\n\n        for ( int i = 0; i < argc; ++i ) {\n            int bufSize = WideCharToMultiByte( CP_UTF8, 0, argv[i], -1, nullptr, 0, nullptr, nullptr );\n\n            utf8Argv[ i ] = new char[ bufSize ];\n\n            WideCharToMultiByte( CP_UTF8, 0, argv[i], -1, utf8Argv[i], bufSize, nullptr, nullptr );\n        }\n\n        int returnCode = applyCommandLine( argc, utf8Argv );\n\n        for ( int i = 0; i < argc; ++i )\n            delete [] utf8Argv[ i ];\n\n        delete [] utf8Argv;\n\n        return returnCode;\n    }\n#endif\n\n    void Session::useConfigData( ConfigData const& configData ) {\n        m_configData = configData;\n        m_config.reset();\n    }\n\n    int Session::run() {\n        if( ( m_configData.waitForKeypress & WaitForKeypress::BeforeStart ) != 0 ) {\n            Catch::cout() << \"...waiting for enter/ return before starting\" << std::endl;\n            static_cast<void>(std::getchar());\n        }\n        int exitCode = runInternal();\n        if( ( m_configData.waitForKeypress & WaitForKeypress::BeforeExit ) != 0 ) {\n            Catch::cout() << \"...waiting for enter/ return before exiting, with code: \" << exitCode << std::endl;\n            static_cast<void>(std::getchar());\n        }\n        return exitCode;\n    }\n\n    clara::Parser const& Session::cli() const {\n        return m_cli;\n    }\n    void Session::cli( clara::Parser const& newParser ) {\n        m_cli = newParser;\n    }\n    ConfigData& Session::configData() {\n        return m_configData;\n    }\n    Config& Session::config() {\n        if( !m_config )\n            m_config = std::make_shared<Config>( m_configData );\n        return *m_config;\n    }\n\n    int Session::runInternal() {\n        if( m_startupExceptions )\n            return 1;\n\n        if (m_configData.showHelp || m_configData.libIdentify) {\n            return 0;\n        }\n\n        CATCH_TRY {\n            config(); // Force config to be constructed\n\n            seedRng( *m_config );\n\n            if( m_configData.filenamesAsTags )\n                applyFilenamesAsTags( *m_config );\n\n            // Handle list request\n            if( Option<std::size_t> listed = list( m_config ) )\n                return (std::min) (MaxExitCode, static_cast<int>(*listed));\n\n            TestGroup tests { m_config };\n            auto const totals = tests.execute();\n\n            if( m_config->warnAboutNoTests() && totals.error == -1 )\n                return 2;\n\n            // Note that on unices only the lower 8 bits are usually used, clamping\n            // the return value to 255 prevents false negative when some multiple\n            // of 256 tests has failed\n            return (std::min) (MaxExitCode, (std::max) (totals.error, static_cast<int>(totals.assertions.failed)));\n        }\n#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)\n        catch( std::exception& ex ) {\n            Catch::cerr() << ex.what() << std::endl;\n            return MaxExitCode;\n        }\n#endif\n    }\n\n} // end namespace Catch\n// end catch_session.cpp\n// start catch_singletons.cpp\n\n#include <vector>\n\nnamespace Catch {\n\n    namespace {\n        static auto getSingletons() -> std::vector<ISingleton*>*& {\n            static std::vector<ISingleton*>* g_singletons = nullptr;\n            if( !g_singletons )\n                g_singletons = new std::vector<ISingleton*>();\n            return g_singletons;\n        }\n    }\n\n    ISingleton::~ISingleton() {}\n\n    void addSingleton(ISingleton* singleton ) {\n        getSingletons()->push_back( singleton );\n    }\n    void cleanupSingletons() {\n        auto& singletons = getSingletons();\n        for( auto singleton : *singletons )\n            delete singleton;\n        delete singletons;\n        singletons = nullptr;\n    }\n\n} // namespace Catch\n// end catch_singletons.cpp\n// start catch_startup_exception_registry.cpp\n\n#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)\nnamespace Catch {\nvoid StartupExceptionRegistry::add( std::exception_ptr const& exception ) noexcept {\n        CATCH_TRY {\n            m_exceptions.push_back(exception);\n        } CATCH_CATCH_ALL {\n            // If we run out of memory during start-up there's really not a lot more we can do about it\n            std::terminate();\n        }\n    }\n\n    std::vector<std::exception_ptr> const& StartupExceptionRegistry::getExceptions() const noexcept {\n        return m_exceptions;\n    }\n\n} // end namespace Catch\n#endif\n// end catch_startup_exception_registry.cpp\n// start catch_stream.cpp\n\n#include <cstdio>\n#include <iostream>\n#include <fstream>\n#include <sstream>\n#include <vector>\n#include <memory>\n\nnamespace Catch {\n\n    Catch::IStream::~IStream() = default;\n\n    namespace Detail { namespace {\n        template<typename WriterF, std::size_t bufferSize=256>\n        class StreamBufImpl : public std::streambuf {\n            char data[bufferSize];\n            WriterF m_writer;\n\n        public:\n            StreamBufImpl() {\n                setp( data, data + sizeof(data) );\n            }\n\n            ~StreamBufImpl() noexcept {\n                StreamBufImpl::sync();\n            }\n\n        private:\n            int overflow( int c ) override {\n                sync();\n\n                if( c != EOF ) {\n                    if( pbase() == epptr() )\n                        m_writer( std::string( 1, static_cast<char>( c ) ) );\n                    else\n                        sputc( static_cast<char>( c ) );\n                }\n                return 0;\n            }\n\n            int sync() override {\n                if( pbase() != pptr() ) {\n                    m_writer( std::string( pbase(), static_cast<std::string::size_type>( pptr() - pbase() ) ) );\n                    setp( pbase(), epptr() );\n                }\n                return 0;\n            }\n        };\n\n        ///////////////////////////////////////////////////////////////////////////\n\n        struct OutputDebugWriter {\n\n            void operator()( std::string const&str ) {\n                writeToDebugConsole( str );\n            }\n        };\n\n        ///////////////////////////////////////////////////////////////////////////\n\n        class FileStream : public IStream {\n            mutable std::ofstream m_ofs;\n        public:\n            FileStream( StringRef filename ) {\n                m_ofs.open( filename.c_str() );\n                CATCH_ENFORCE( !m_ofs.fail(), \"Unable to open file: '\" << filename << \"'\" );\n            }\n            ~FileStream() override = default;\n        public: // IStream\n            std::ostream& stream() const override {\n                return m_ofs;\n            }\n        };\n\n        ///////////////////////////////////////////////////////////////////////////\n\n        class CoutStream : public IStream {\n            mutable std::ostream m_os;\n        public:\n            // Store the streambuf from cout up-front because\n            // cout may get redirected when running tests\n            CoutStream() : m_os( Catch::cout().rdbuf() ) {}\n            ~CoutStream() override = default;\n\n        public: // IStream\n            std::ostream& stream() const override { return m_os; }\n        };\n\n        ///////////////////////////////////////////////////////////////////////////\n\n        class DebugOutStream : public IStream {\n            std::unique_ptr<StreamBufImpl<OutputDebugWriter>> m_streamBuf;\n            mutable std::ostream m_os;\n        public:\n            DebugOutStream()\n            :   m_streamBuf( new StreamBufImpl<OutputDebugWriter>() ),\n                m_os( m_streamBuf.get() )\n            {}\n\n            ~DebugOutStream() override = default;\n\n        public: // IStream\n            std::ostream& stream() const override { return m_os; }\n        };\n\n    }} // namespace anon::detail\n\n    ///////////////////////////////////////////////////////////////////////////\n\n    auto makeStream( StringRef const &filename ) -> IStream const* {\n        if( filename.empty() )\n            return new Detail::CoutStream();\n        else if( filename[0] == '%' ) {\n            if( filename == \"%debug\" )\n                return new Detail::DebugOutStream();\n            else\n                CATCH_ERROR( \"Unrecognised stream: '\" << filename << \"'\" );\n        }\n        else\n            return new Detail::FileStream( filename );\n    }\n\n    // This class encapsulates the idea of a pool of ostringstreams that can be reused.\n    struct StringStreams {\n        std::vector<std::unique_ptr<std::ostringstream>> m_streams;\n        std::vector<std::size_t> m_unused;\n        std::ostringstream m_referenceStream; // Used for copy state/ flags from\n\n        auto add() -> std::size_t {\n            if( m_unused.empty() ) {\n                m_streams.push_back( std::unique_ptr<std::ostringstream>( new std::ostringstream ) );\n                return m_streams.size()-1;\n            }\n            else {\n                auto index = m_unused.back();\n                m_unused.pop_back();\n                return index;\n            }\n        }\n\n        void release( std::size_t index ) {\n            m_streams[index]->copyfmt( m_referenceStream ); // Restore initial flags and other state\n            m_unused.push_back(index);\n        }\n    };\n\n    ReusableStringStream::ReusableStringStream()\n    :   m_index( Singleton<StringStreams>::getMutable().add() ),\n        m_oss( Singleton<StringStreams>::getMutable().m_streams[m_index].get() )\n    {}\n\n    ReusableStringStream::~ReusableStringStream() {\n        static_cast<std::ostringstream*>( m_oss )->str(\"\");\n        m_oss->clear();\n        Singleton<StringStreams>::getMutable().release( m_index );\n    }\n\n    auto ReusableStringStream::str() const -> std::string {\n        return static_cast<std::ostringstream*>( m_oss )->str();\n    }\n\n    ///////////////////////////////////////////////////////////////////////////\n\n#ifndef CATCH_CONFIG_NOSTDOUT // If you #define this you must implement these functions\n    std::ostream& cout() { return std::cout; }\n    std::ostream& cerr() { return std::cerr; }\n    std::ostream& clog() { return std::clog; }\n#endif\n}\n// end catch_stream.cpp\n// start catch_string_manip.cpp\n\n#include <algorithm>\n#include <ostream>\n#include <cstring>\n#include <cctype>\n#include <vector>\n\nnamespace Catch {\n\n    namespace {\n        char toLowerCh(char c) {\n            return static_cast<char>( std::tolower( static_cast<unsigned char>(c) ) );\n        }\n    }\n\n    bool startsWith( std::string const& s, std::string const& prefix ) {\n        return s.size() >= prefix.size() && std::equal(prefix.begin(), prefix.end(), s.begin());\n    }\n    bool startsWith( std::string const& s, char prefix ) {\n        return !s.empty() && s[0] == prefix;\n    }\n    bool endsWith( std::string const& s, std::string const& suffix ) {\n        return s.size() >= suffix.size() && std::equal(suffix.rbegin(), suffix.rend(), s.rbegin());\n    }\n    bool endsWith( std::string const& s, char suffix ) {\n        return !s.empty() && s[s.size()-1] == suffix;\n    }\n    bool contains( std::string const& s, std::string const& infix ) {\n        return s.find( infix ) != std::string::npos;\n    }\n    void toLowerInPlace( std::string& s ) {\n        std::transform( s.begin(), s.end(), s.begin(), toLowerCh );\n    }\n    std::string toLower( std::string const& s ) {\n        std::string lc = s;\n        toLowerInPlace( lc );\n        return lc;\n    }\n    std::string trim( std::string const& str ) {\n        static char const* whitespaceChars = \"\\n\\r\\t \";\n        std::string::size_type start = str.find_first_not_of( whitespaceChars );\n        std::string::size_type end = str.find_last_not_of( whitespaceChars );\n\n        return start != std::string::npos ? str.substr( start, 1+end-start ) : std::string();\n    }\n\n    StringRef trim(StringRef ref) {\n        const auto is_ws = [](char c) {\n            return c == ' ' || c == '\\t' || c == '\\n' || c == '\\r';\n        };\n        size_t real_begin = 0;\n        while (real_begin < ref.size() && is_ws(ref[real_begin])) { ++real_begin; }\n        size_t real_end = ref.size();\n        while (real_end > real_begin && is_ws(ref[real_end - 1])) { --real_end; }\n\n        return ref.substr(real_begin, real_end - real_begin);\n    }\n\n    bool replaceInPlace( std::string& str, std::string const& replaceThis, std::string const& withThis ) {\n        bool replaced = false;\n        std::size_t i = str.find( replaceThis );\n        while( i != std::string::npos ) {\n            replaced = true;\n            str = str.substr( 0, i ) + withThis + str.substr( i+replaceThis.size() );\n            if( i < str.size()-withThis.size() )\n                i = str.find( replaceThis, i+withThis.size() );\n            else\n                i = std::string::npos;\n        }\n        return replaced;\n    }\n\n    std::vector<StringRef> splitStringRef( StringRef str, char delimiter ) {\n        std::vector<StringRef> subStrings;\n        std::size_t start = 0;\n        for(std::size_t pos = 0; pos < str.size(); ++pos ) {\n            if( str[pos] == delimiter ) {\n                if( pos - start > 1 )\n                    subStrings.push_back( str.substr( start, pos-start ) );\n                start = pos+1;\n            }\n        }\n        if( start < str.size() )\n            subStrings.push_back( str.substr( start, str.size()-start ) );\n        return subStrings;\n    }\n\n    pluralise::pluralise( std::size_t count, std::string const& label )\n    :   m_count( count ),\n        m_label( label )\n    {}\n\n    std::ostream& operator << ( std::ostream& os, pluralise const& pluraliser ) {\n        os << pluraliser.m_count << ' ' << pluraliser.m_label;\n        if( pluraliser.m_count != 1 )\n            os << 's';\n        return os;\n    }\n\n}\n// end catch_string_manip.cpp\n// start catch_stringref.cpp\n\n#include <algorithm>\n#include <ostream>\n#include <cstring>\n#include <cstdint>\n\nnamespace Catch {\n    StringRef::StringRef( char const* rawChars ) noexcept\n    : StringRef( rawChars, static_cast<StringRef::size_type>(std::strlen(rawChars) ) )\n    {}\n\n    auto StringRef::c_str() const -> char const* {\n        CATCH_ENFORCE(isNullTerminated(), \"Called StringRef::c_str() on a non-null-terminated instance\");\n        return m_start;\n    }\n    auto StringRef::data() const noexcept -> char const* {\n        return m_start;\n    }\n\n    auto StringRef::substr( size_type start, size_type size ) const noexcept -> StringRef {\n        if (start < m_size) {\n            return StringRef(m_start + start, (std::min)(m_size - start, size));\n        } else {\n            return StringRef();\n        }\n    }\n    auto StringRef::operator == ( StringRef const& other ) const noexcept -> bool {\n        return m_size == other.m_size\n            && (std::memcmp( m_start, other.m_start, m_size ) == 0);\n    }\n\n    auto operator << ( std::ostream& os, StringRef const& str ) -> std::ostream& {\n        return os.write(str.data(), str.size());\n    }\n\n    auto operator+=( std::string& lhs, StringRef const& rhs ) -> std::string& {\n        lhs.append(rhs.data(), rhs.size());\n        return lhs;\n    }\n\n} // namespace Catch\n// end catch_stringref.cpp\n// start catch_tag_alias.cpp\n\nnamespace Catch {\n    TagAlias::TagAlias(std::string const & _tag, SourceLineInfo _lineInfo): tag(_tag), lineInfo(_lineInfo) {}\n}\n// end catch_tag_alias.cpp\n// start catch_tag_alias_autoregistrar.cpp\n\nnamespace Catch {\n\n    RegistrarForTagAliases::RegistrarForTagAliases(char const* alias, char const* tag, SourceLineInfo const& lineInfo) {\n        CATCH_TRY {\n            getMutableRegistryHub().registerTagAlias(alias, tag, lineInfo);\n        } CATCH_CATCH_ALL {\n            // Do not throw when constructing global objects, instead register the exception to be processed later\n            getMutableRegistryHub().registerStartupException();\n        }\n    }\n\n}\n// end catch_tag_alias_autoregistrar.cpp\n// start catch_tag_alias_registry.cpp\n\n#include <sstream>\n\nnamespace Catch {\n\n    TagAliasRegistry::~TagAliasRegistry() {}\n\n    TagAlias const* TagAliasRegistry::find( std::string const& alias ) const {\n        auto it = m_registry.find( alias );\n        if( it != m_registry.end() )\n            return &(it->second);\n        else\n            return nullptr;\n    }\n\n    std::string TagAliasRegistry::expandAliases( std::string const& unexpandedTestSpec ) const {\n        std::string expandedTestSpec = unexpandedTestSpec;\n        for( auto const& registryKvp : m_registry ) {\n            std::size_t pos = expandedTestSpec.find( registryKvp.first );\n            if( pos != std::string::npos ) {\n                expandedTestSpec =  expandedTestSpec.substr( 0, pos ) +\n                                    registryKvp.second.tag +\n                                    expandedTestSpec.substr( pos + registryKvp.first.size() );\n            }\n        }\n        return expandedTestSpec;\n    }\n\n    void TagAliasRegistry::add( std::string const& alias, std::string const& tag, SourceLineInfo const& lineInfo ) {\n        CATCH_ENFORCE( startsWith(alias, \"[@\") && endsWith(alias, ']'),\n                      \"error: tag alias, '\" << alias << \"' is not of the form [@alias name].\\n\" << lineInfo );\n\n        CATCH_ENFORCE( m_registry.insert(std::make_pair(alias, TagAlias(tag, lineInfo))).second,\n                      \"error: tag alias, '\" << alias << \"' already registered.\\n\"\n                      << \"\\tFirst seen at: \" << find(alias)->lineInfo << \"\\n\"\n                      << \"\\tRedefined at: \" << lineInfo );\n    }\n\n    ITagAliasRegistry::~ITagAliasRegistry() {}\n\n    ITagAliasRegistry const& ITagAliasRegistry::get() {\n        return getRegistryHub().getTagAliasRegistry();\n    }\n\n} // end namespace Catch\n// end catch_tag_alias_registry.cpp\n// start catch_test_case_info.cpp\n\n#include <cctype>\n#include <exception>\n#include <algorithm>\n#include <sstream>\n\nnamespace Catch {\n\n    namespace {\n        TestCaseInfo::SpecialProperties parseSpecialTag( std::string const& tag ) {\n            if( startsWith( tag, '.' ) ||\n                tag == \"!hide\" )\n                return TestCaseInfo::IsHidden;\n            else if( tag == \"!throws\" )\n                return TestCaseInfo::Throws;\n            else if( tag == \"!shouldfail\" )\n                return TestCaseInfo::ShouldFail;\n            else if( tag == \"!mayfail\" )\n                return TestCaseInfo::MayFail;\n            else if( tag == \"!nonportable\" )\n                return TestCaseInfo::NonPortable;\n            else if( tag == \"!benchmark\" )\n                return static_cast<TestCaseInfo::SpecialProperties>( TestCaseInfo::Benchmark | TestCaseInfo::IsHidden );\n            else\n                return TestCaseInfo::None;\n        }\n        bool isReservedTag( std::string const& tag ) {\n            return parseSpecialTag( tag ) == TestCaseInfo::None && tag.size() > 0 && !std::isalnum( static_cast<unsigned char>(tag[0]) );\n        }\n        void enforceNotReservedTag( std::string const& tag, SourceLineInfo const& _lineInfo ) {\n            CATCH_ENFORCE( !isReservedTag(tag),\n                          \"Tag name: [\" << tag << \"] is not allowed.\\n\"\n                          << \"Tag names starting with non alphanumeric characters are reserved\\n\"\n                          << _lineInfo );\n        }\n    }\n\n    TestCase makeTestCase(  ITestInvoker* _testCase,\n                            std::string const& _className,\n                            NameAndTags const& nameAndTags,\n                            SourceLineInfo const& _lineInfo )\n    {\n        bool isHidden = false;\n\n        // Parse out tags\n        std::vector<std::string> tags;\n        std::string desc, tag;\n        bool inTag = false;\n        for (char c : nameAndTags.tags) {\n            if( !inTag ) {\n                if( c == '[' )\n                    inTag = true;\n                else\n                    desc += c;\n            }\n            else {\n                if( c == ']' ) {\n                    TestCaseInfo::SpecialProperties prop = parseSpecialTag( tag );\n                    if( ( prop & TestCaseInfo::IsHidden ) != 0 )\n                        isHidden = true;\n                    else if( prop == TestCaseInfo::None )\n                        enforceNotReservedTag( tag, _lineInfo );\n\n                    // Merged hide tags like `[.approvals]` should be added as\n                    // `[.][approvals]`. The `[.]` is added at later point, so\n                    // we only strip the prefix\n                    if (startsWith(tag, '.') && tag.size() > 1) {\n                        tag.erase(0, 1);\n                    }\n                    tags.push_back( tag );\n                    tag.clear();\n                    inTag = false;\n                }\n                else\n                    tag += c;\n            }\n        }\n        if( isHidden ) {\n            // Add all \"hidden\" tags to make them behave identically\n            tags.insert( tags.end(), { \".\", \"!hide\" } );\n        }\n\n        TestCaseInfo info( static_cast<std::string>(nameAndTags.name), _className, desc, tags, _lineInfo );\n        return TestCase( _testCase, std::move(info) );\n    }\n\n    void setTags( TestCaseInfo& testCaseInfo, std::vector<std::string> tags ) {\n        std::sort(begin(tags), end(tags));\n        tags.erase(std::unique(begin(tags), end(tags)), end(tags));\n        testCaseInfo.lcaseTags.clear();\n\n        for( auto const& tag : tags ) {\n            std::string lcaseTag = toLower( tag );\n            testCaseInfo.properties = static_cast<TestCaseInfo::SpecialProperties>( testCaseInfo.properties | parseSpecialTag( lcaseTag ) );\n            testCaseInfo.lcaseTags.push_back( lcaseTag );\n        }\n        testCaseInfo.tags = std::move(tags);\n    }\n\n    TestCaseInfo::TestCaseInfo( std::string const& _name,\n                                std::string const& _className,\n                                std::string const& _description,\n                                std::vector<std::string> const& _tags,\n                                SourceLineInfo const& _lineInfo )\n    :   name( _name ),\n        className( _className ),\n        description( _description ),\n        lineInfo( _lineInfo ),\n        properties( None )\n    {\n        setTags( *this, _tags );\n    }\n\n    bool TestCaseInfo::isHidden() const {\n        return ( properties & IsHidden ) != 0;\n    }\n    bool TestCaseInfo::throws() const {\n        return ( properties & Throws ) != 0;\n    }\n    bool TestCaseInfo::okToFail() const {\n        return ( properties & (ShouldFail | MayFail ) ) != 0;\n    }\n    bool TestCaseInfo::expectedToFail() const {\n        return ( properties & (ShouldFail ) ) != 0;\n    }\n\n    std::string TestCaseInfo::tagsAsString() const {\n        std::string ret;\n        // '[' and ']' per tag\n        std::size_t full_size = 2 * tags.size();\n        for (const auto& tag : tags) {\n            full_size += tag.size();\n        }\n        ret.reserve(full_size);\n        for (const auto& tag : tags) {\n            ret.push_back('[');\n            ret.append(tag);\n            ret.push_back(']');\n        }\n\n        return ret;\n    }\n\n    TestCase::TestCase( ITestInvoker* testCase, TestCaseInfo&& info ) : TestCaseInfo( std::move(info) ), test( testCase ) {}\n\n    TestCase TestCase::withName( std::string const& _newName ) const {\n        TestCase other( *this );\n        other.name = _newName;\n        return other;\n    }\n\n    void TestCase::invoke() const {\n        test->invoke();\n    }\n\n    bool TestCase::operator == ( TestCase const& other ) const {\n        return  test.get() == other.test.get() &&\n                name == other.name &&\n                className == other.className;\n    }\n\n    bool TestCase::operator < ( TestCase const& other ) const {\n        return name < other.name;\n    }\n\n    TestCaseInfo const& TestCase::getTestCaseInfo() const\n    {\n        return *this;\n    }\n\n} // end namespace Catch\n// end catch_test_case_info.cpp\n// start catch_test_case_registry_impl.cpp\n\n#include <algorithm>\n#include <sstream>\n\nnamespace Catch {\n\n    namespace {\n        struct TestHasher {\n            using hash_t = uint64_t;\n\n            explicit TestHasher( hash_t hashSuffix ):\n                m_hashSuffix{ hashSuffix } {}\n\n            uint32_t operator()( TestCase const& t ) const {\n                // FNV-1a hash with multiplication fold.\n                const hash_t prime = 1099511628211u;\n                hash_t hash = 14695981039346656037u;\n                for ( const char c : t.name ) {\n                    hash ^= c;\n                    hash *= prime;\n                }\n                hash ^= m_hashSuffix;\n                hash *= prime;\n                const uint32_t low{ static_cast<uint32_t>( hash ) };\n                const uint32_t high{ static_cast<uint32_t>( hash >> 32 ) };\n                return low * high;\n            }\n\n        private:\n            hash_t m_hashSuffix;\n        };\n    } // end unnamed namespace\n\n    std::vector<TestCase> sortTests( IConfig const& config, std::vector<TestCase> const& unsortedTestCases ) {\n        switch( config.runOrder() ) {\n            case RunTests::InDeclarationOrder:\n                // already in declaration order\n                break;\n\n            case RunTests::InLexicographicalOrder: {\n                std::vector<TestCase> sorted = unsortedTestCases;\n                std::sort( sorted.begin(), sorted.end() );\n                return sorted;\n            }\n\n            case RunTests::InRandomOrder: {\n                seedRng( config );\n                TestHasher h{ config.rngSeed() };\n\n                using hashedTest = std::pair<TestHasher::hash_t, TestCase const*>;\n                std::vector<hashedTest> indexed_tests;\n                indexed_tests.reserve( unsortedTestCases.size() );\n\n                for (auto const& testCase : unsortedTestCases) {\n                    indexed_tests.emplace_back(h(testCase), &testCase);\n                }\n\n                std::sort(indexed_tests.begin(), indexed_tests.end(),\n                          [](hashedTest const& lhs, hashedTest const& rhs) {\n                          if (lhs.first == rhs.first) {\n                              return lhs.second->name < rhs.second->name;\n                          }\n                          return lhs.first < rhs.first;\n                });\n\n                std::vector<TestCase> sorted;\n                sorted.reserve( indexed_tests.size() );\n\n                for (auto const& hashed : indexed_tests) {\n                    sorted.emplace_back(*hashed.second);\n                }\n\n                return sorted;\n            }\n        }\n        return unsortedTestCases;\n    }\n\n    bool isThrowSafe( TestCase const& testCase, IConfig const& config ) {\n        return !testCase.throws() || config.allowThrows();\n    }\n\n    bool matchTest( TestCase const& testCase, TestSpec const& testSpec, IConfig const& config ) {\n        return testSpec.matches( testCase ) && isThrowSafe( testCase, config );\n    }\n\n    void enforceNoDuplicateTestCases( std::vector<TestCase> const& functions ) {\n        std::set<TestCase> seenFunctions;\n        for( auto const& function : functions ) {\n            auto prev = seenFunctions.insert( function );\n            CATCH_ENFORCE( prev.second,\n                    \"error: TEST_CASE( \\\"\" << function.name << \"\\\" ) already defined.\\n\"\n                    << \"\\tFirst seen at \" << prev.first->getTestCaseInfo().lineInfo << \"\\n\"\n                    << \"\\tRedefined at \" << function.getTestCaseInfo().lineInfo );\n        }\n    }\n\n    std::vector<TestCase> filterTests( std::vector<TestCase> const& testCases, TestSpec const& testSpec, IConfig const& config ) {\n        std::vector<TestCase> filtered;\n        filtered.reserve( testCases.size() );\n        for (auto const& testCase : testCases) {\n            if ((!testSpec.hasFilters() && !testCase.isHidden()) ||\n                (testSpec.hasFilters() && matchTest(testCase, testSpec, config))) {\n                filtered.push_back(testCase);\n            }\n        }\n        return filtered;\n    }\n    std::vector<TestCase> const& getAllTestCasesSorted( IConfig const& config ) {\n        return getRegistryHub().getTestCaseRegistry().getAllTestsSorted( config );\n    }\n\n    void TestRegistry::registerTest( TestCase const& testCase ) {\n        std::string name = testCase.getTestCaseInfo().name;\n        if( name.empty() ) {\n            ReusableStringStream rss;\n            rss << \"Anonymous test case \" << ++m_unnamedCount;\n            return registerTest( testCase.withName( rss.str() ) );\n        }\n        m_functions.push_back( testCase );\n    }\n\n    std::vector<TestCase> const& TestRegistry::getAllTests() const {\n        return m_functions;\n    }\n    std::vector<TestCase> const& TestRegistry::getAllTestsSorted( IConfig const& config ) const {\n        if( m_sortedFunctions.empty() )\n            enforceNoDuplicateTestCases( m_functions );\n\n        if(  m_currentSortOrder != config.runOrder() || m_sortedFunctions.empty() ) {\n            m_sortedFunctions = sortTests( config, m_functions );\n            m_currentSortOrder = config.runOrder();\n        }\n        return m_sortedFunctions;\n    }\n\n    ///////////////////////////////////////////////////////////////////////////\n    TestInvokerAsFunction::TestInvokerAsFunction( void(*testAsFunction)() ) noexcept : m_testAsFunction( testAsFunction ) {}\n\n    void TestInvokerAsFunction::invoke() const {\n        m_testAsFunction();\n    }\n\n    std::string extractClassName( StringRef const& classOrQualifiedMethodName ) {\n        std::string className(classOrQualifiedMethodName);\n        if( startsWith( className, '&' ) )\n        {\n            std::size_t lastColons = className.rfind( \"::\" );\n            std::size_t penultimateColons = className.rfind( \"::\", lastColons-1 );\n            if( penultimateColons == std::string::npos )\n                penultimateColons = 1;\n            className = className.substr( penultimateColons, lastColons-penultimateColons );\n        }\n        return className;\n    }\n\n} // end namespace Catch\n// end catch_test_case_registry_impl.cpp\n// start catch_test_case_tracker.cpp\n\n#include <algorithm>\n#include <cassert>\n#include <stdexcept>\n#include <memory>\n#include <sstream>\n\n#if defined(__clang__)\n#    pragma clang diagnostic push\n#    pragma clang diagnostic ignored \"-Wexit-time-destructors\"\n#endif\n\nnamespace Catch {\nnamespace TestCaseTracking {\n\n    NameAndLocation::NameAndLocation( std::string const& _name, SourceLineInfo const& _location )\n    :   name( _name ),\n        location( _location )\n    {}\n\n    ITracker::~ITracker() = default;\n\n    ITracker& TrackerContext::startRun() {\n        m_rootTracker = std::make_shared<SectionTracker>( NameAndLocation( \"{root}\", CATCH_INTERNAL_LINEINFO ), *this, nullptr );\n        m_currentTracker = nullptr;\n        m_runState = Executing;\n        return *m_rootTracker;\n    }\n\n    void TrackerContext::endRun() {\n        m_rootTracker.reset();\n        m_currentTracker = nullptr;\n        m_runState = NotStarted;\n    }\n\n    void TrackerContext::startCycle() {\n        m_currentTracker = m_rootTracker.get();\n        m_runState = Executing;\n    }\n    void TrackerContext::completeCycle() {\n        m_runState = CompletedCycle;\n    }\n\n    bool TrackerContext::completedCycle() const {\n        return m_runState == CompletedCycle;\n    }\n    ITracker& TrackerContext::currentTracker() {\n        return *m_currentTracker;\n    }\n    void TrackerContext::setCurrentTracker( ITracker* tracker ) {\n        m_currentTracker = tracker;\n    }\n\n    TrackerBase::TrackerBase( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent ):\n        ITracker(nameAndLocation),\n        m_ctx( ctx ),\n        m_parent( parent )\n    {}\n\n    bool TrackerBase::isComplete() const {\n        return m_runState == CompletedSuccessfully || m_runState == Failed;\n    }\n    bool TrackerBase::isSuccessfullyCompleted() const {\n        return m_runState == CompletedSuccessfully;\n    }\n    bool TrackerBase::isOpen() const {\n        return m_runState != NotStarted && !isComplete();\n    }\n    bool TrackerBase::hasChildren() const {\n        return !m_children.empty();\n    }\n\n    void TrackerBase::addChild( ITrackerPtr const& child ) {\n        m_children.push_back( child );\n    }\n\n    ITrackerPtr TrackerBase::findChild( NameAndLocation const& nameAndLocation ) {\n        auto it = std::find_if( m_children.begin(), m_children.end(),\n            [&nameAndLocation]( ITrackerPtr const& tracker ){\n                return\n                    tracker->nameAndLocation().location == nameAndLocation.location &&\n                    tracker->nameAndLocation().name == nameAndLocation.name;\n            } );\n        return( it != m_children.end() )\n            ? *it\n            : nullptr;\n    }\n    ITracker& TrackerBase::parent() {\n        assert( m_parent ); // Should always be non-null except for root\n        return *m_parent;\n    }\n\n    void TrackerBase::openChild() {\n        if( m_runState != ExecutingChildren ) {\n            m_runState = ExecutingChildren;\n            if( m_parent )\n                m_parent->openChild();\n        }\n    }\n\n    bool TrackerBase::isSectionTracker() const { return false; }\n    bool TrackerBase::isGeneratorTracker() const { return false; }\n\n    void TrackerBase::open() {\n        m_runState = Executing;\n        moveToThis();\n        if( m_parent )\n            m_parent->openChild();\n    }\n\n    void TrackerBase::close() {\n\n        // Close any still open children (e.g. generators)\n        while( &m_ctx.currentTracker() != this )\n            m_ctx.currentTracker().close();\n\n        switch( m_runState ) {\n            case NeedsAnotherRun:\n                break;\n\n            case Executing:\n                m_runState = CompletedSuccessfully;\n                break;\n            case ExecutingChildren:\n                if( std::all_of(m_children.begin(), m_children.end(), [](ITrackerPtr const& t){ return t->isComplete(); }) )\n                    m_runState = CompletedSuccessfully;\n                break;\n\n            case NotStarted:\n            case CompletedSuccessfully:\n            case Failed:\n                CATCH_INTERNAL_ERROR( \"Illogical state: \" << m_runState );\n\n            default:\n                CATCH_INTERNAL_ERROR( \"Unknown state: \" << m_runState );\n        }\n        moveToParent();\n        m_ctx.completeCycle();\n    }\n    void TrackerBase::fail() {\n        m_runState = Failed;\n        if( m_parent )\n            m_parent->markAsNeedingAnotherRun();\n        moveToParent();\n        m_ctx.completeCycle();\n    }\n    void TrackerBase::markAsNeedingAnotherRun() {\n        m_runState = NeedsAnotherRun;\n    }\n\n    void TrackerBase::moveToParent() {\n        assert( m_parent );\n        m_ctx.setCurrentTracker( m_parent );\n    }\n    void TrackerBase::moveToThis() {\n        m_ctx.setCurrentTracker( this );\n    }\n\n    SectionTracker::SectionTracker( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent )\n    :   TrackerBase( nameAndLocation, ctx, parent ),\n        m_trimmed_name(trim(nameAndLocation.name))\n    {\n        if( parent ) {\n            while( !parent->isSectionTracker() )\n                parent = &parent->parent();\n\n            SectionTracker& parentSection = static_cast<SectionTracker&>( *parent );\n            addNextFilters( parentSection.m_filters );\n        }\n    }\n\n    bool SectionTracker::isComplete() const {\n        bool complete = true;\n\n        if (m_filters.empty()\n            || m_filters[0] == \"\"\n            || std::find(m_filters.begin(), m_filters.end(), m_trimmed_name) != m_filters.end()) {\n            complete = TrackerBase::isComplete();\n        }\n        return complete;\n    }\n\n    bool SectionTracker::isSectionTracker() const { return true; }\n\n    SectionTracker& SectionTracker::acquire( TrackerContext& ctx, NameAndLocation const& nameAndLocation ) {\n        std::shared_ptr<SectionTracker> section;\n\n        ITracker& currentTracker = ctx.currentTracker();\n        if( ITrackerPtr childTracker = currentTracker.findChild( nameAndLocation ) ) {\n            assert( childTracker );\n            assert( childTracker->isSectionTracker() );\n            section = std::static_pointer_cast<SectionTracker>( childTracker );\n        }\n        else {\n            section = std::make_shared<SectionTracker>( nameAndLocation, ctx, &currentTracker );\n            currentTracker.addChild( section );\n        }\n        if( !ctx.completedCycle() )\n            section->tryOpen();\n        return *section;\n    }\n\n    void SectionTracker::tryOpen() {\n        if( !isComplete() )\n            open();\n    }\n\n    void SectionTracker::addInitialFilters( std::vector<std::string> const& filters ) {\n        if( !filters.empty() ) {\n            m_filters.reserve( m_filters.size() + filters.size() + 2 );\n            m_filters.emplace_back(\"\"); // Root - should never be consulted\n            m_filters.emplace_back(\"\"); // Test Case - not a section filter\n            m_filters.insert( m_filters.end(), filters.begin(), filters.end() );\n        }\n    }\n    void SectionTracker::addNextFilters( std::vector<std::string> const& filters ) {\n        if( filters.size() > 1 )\n            m_filters.insert( m_filters.end(), filters.begin()+1, filters.end() );\n    }\n\n    std::vector<std::string> const& SectionTracker::getFilters() const {\n        return m_filters;\n    }\n\n    std::string const& SectionTracker::trimmedName() const {\n        return m_trimmed_name;\n    }\n\n} // namespace TestCaseTracking\n\nusing TestCaseTracking::ITracker;\nusing TestCaseTracking::TrackerContext;\nusing TestCaseTracking::SectionTracker;\n\n} // namespace Catch\n\n#if defined(__clang__)\n#    pragma clang diagnostic pop\n#endif\n// end catch_test_case_tracker.cpp\n// start catch_test_registry.cpp\n\nnamespace Catch {\n\n    auto makeTestInvoker( void(*testAsFunction)() ) noexcept -> ITestInvoker* {\n        return new(std::nothrow) TestInvokerAsFunction( testAsFunction );\n    }\n\n    NameAndTags::NameAndTags( StringRef const& name_ , StringRef const& tags_ ) noexcept : name( name_ ), tags( tags_ ) {}\n\n    AutoReg::AutoReg( ITestInvoker* invoker, SourceLineInfo const& lineInfo, StringRef const& classOrMethod, NameAndTags const& nameAndTags ) noexcept {\n        CATCH_TRY {\n            getMutableRegistryHub()\n                    .registerTest(\n                        makeTestCase(\n                            invoker,\n                            extractClassName( classOrMethod ),\n                            nameAndTags,\n                            lineInfo));\n        } CATCH_CATCH_ALL {\n            // Do not throw when constructing global objects, instead register the exception to be processed later\n            getMutableRegistryHub().registerStartupException();\n        }\n    }\n\n    AutoReg::~AutoReg() = default;\n}\n// end catch_test_registry.cpp\n// start catch_test_spec.cpp\n\n#include <algorithm>\n#include <string>\n#include <vector>\n#include <memory>\n\nnamespace Catch {\n\n    TestSpec::Pattern::Pattern( std::string const& name )\n    : m_name( name )\n    {}\n\n    TestSpec::Pattern::~Pattern() = default;\n\n    std::string const& TestSpec::Pattern::name() const {\n        return m_name;\n    }\n\n    TestSpec::NamePattern::NamePattern( std::string const& name, std::string const& filterString )\n    : Pattern( filterString )\n    , m_wildcardPattern( toLower( name ), CaseSensitive::No )\n    {}\n\n    bool TestSpec::NamePattern::matches( TestCaseInfo const& testCase ) const {\n        return m_wildcardPattern.matches( testCase.name );\n    }\n\n    TestSpec::TagPattern::TagPattern( std::string const& tag, std::string const& filterString )\n    : Pattern( filterString )\n    , m_tag( toLower( tag ) )\n    {}\n\n    bool TestSpec::TagPattern::matches( TestCaseInfo const& testCase ) const {\n        return std::find(begin(testCase.lcaseTags),\n                         end(testCase.lcaseTags),\n                         m_tag) != end(testCase.lcaseTags);\n    }\n\n    TestSpec::ExcludedPattern::ExcludedPattern( PatternPtr const& underlyingPattern )\n    : Pattern( underlyingPattern->name() )\n    , m_underlyingPattern( underlyingPattern )\n    {}\n\n    bool TestSpec::ExcludedPattern::matches( TestCaseInfo const& testCase ) const {\n        return !m_underlyingPattern->matches( testCase );\n    }\n\n    bool TestSpec::Filter::matches( TestCaseInfo const& testCase ) const {\n        return std::all_of( m_patterns.begin(), m_patterns.end(), [&]( PatternPtr const& p ){ return p->matches( testCase ); } );\n    }\n\n    std::string TestSpec::Filter::name() const {\n        std::string name;\n        for( auto const& p : m_patterns )\n            name += p->name();\n        return name;\n    }\n\n    bool TestSpec::hasFilters() const {\n        return !m_filters.empty();\n    }\n\n    bool TestSpec::matches( TestCaseInfo const& testCase ) const {\n        return std::any_of( m_filters.begin(), m_filters.end(), [&]( Filter const& f ){ return f.matches( testCase ); } );\n    }\n\n    TestSpec::Matches TestSpec::matchesByFilter( std::vector<TestCase> const& testCases, IConfig const& config ) const\n    {\n        Matches matches( m_filters.size() );\n        std::transform( m_filters.begin(), m_filters.end(), matches.begin(), [&]( Filter const& filter ){\n            std::vector<TestCase const*> currentMatches;\n            for( auto const& test : testCases )\n                if( isThrowSafe( test, config ) && filter.matches( test ) )\n                    currentMatches.emplace_back( &test );\n            return FilterMatch{ filter.name(), currentMatches };\n        } );\n        return matches;\n    }\n\n    const TestSpec::vectorStrings& TestSpec::getInvalidArgs() const{\n        return  (m_invalidArgs);\n    }\n\n}\n// end catch_test_spec.cpp\n// start catch_test_spec_parser.cpp\n\nnamespace Catch {\n\n    TestSpecParser::TestSpecParser( ITagAliasRegistry const& tagAliases ) : m_tagAliases( &tagAliases ) {}\n\n    TestSpecParser& TestSpecParser::parse( std::string const& arg ) {\n        m_mode = None;\n        m_exclusion = false;\n        m_arg = m_tagAliases->expandAliases( arg );\n        m_escapeChars.clear();\n        m_substring.reserve(m_arg.size());\n        m_patternName.reserve(m_arg.size());\n        m_realPatternPos = 0;\n\n        for( m_pos = 0; m_pos < m_arg.size(); ++m_pos )\n          //if visitChar fails\n           if( !visitChar( m_arg[m_pos] ) ){\n               m_testSpec.m_invalidArgs.push_back(arg);\n               break;\n           }\n        endMode();\n        return *this;\n    }\n    TestSpec TestSpecParser::testSpec() {\n        addFilter();\n        return m_testSpec;\n    }\n    bool TestSpecParser::visitChar( char c ) {\n        if( (m_mode != EscapedName) && (c == '\\\\') ) {\n            escape();\n            addCharToPattern(c);\n            return true;\n        }else if((m_mode != EscapedName) && (c == ',') )  {\n            return separate();\n        }\n\n        switch( m_mode ) {\n        case None:\n            if( processNoneChar( c ) )\n                return true;\n            break;\n        case Name:\n            processNameChar( c );\n            break;\n        case EscapedName:\n            endMode();\n            addCharToPattern(c);\n            return true;\n        default:\n        case Tag:\n        case QuotedName:\n            if( processOtherChar( c ) )\n                return true;\n            break;\n        }\n\n        m_substring += c;\n        if( !isControlChar( c ) ) {\n            m_patternName += c;\n            m_realPatternPos++;\n        }\n        return true;\n    }\n    // Two of the processing methods return true to signal the caller to return\n    // without adding the given character to the current pattern strings\n    bool TestSpecParser::processNoneChar( char c ) {\n        switch( c ) {\n        case ' ':\n            return true;\n        case '~':\n            m_exclusion = true;\n            return false;\n        case '[':\n            startNewMode( Tag );\n            return false;\n        case '\"':\n            startNewMode( QuotedName );\n            return false;\n        default:\n            startNewMode( Name );\n            return false;\n        }\n    }\n    void TestSpecParser::processNameChar( char c ) {\n        if( c == '[' ) {\n            if( m_substring == \"exclude:\" )\n                m_exclusion = true;\n            else\n                endMode();\n            startNewMode( Tag );\n        }\n    }\n    bool TestSpecParser::processOtherChar( char c ) {\n        if( !isControlChar( c ) )\n            return false;\n        m_substring += c;\n        endMode();\n        return true;\n    }\n    void TestSpecParser::startNewMode( Mode mode ) {\n        m_mode = mode;\n    }\n    void TestSpecParser::endMode() {\n        switch( m_mode ) {\n        case Name:\n        case QuotedName:\n            return addNamePattern();\n        case Tag:\n            return addTagPattern();\n        case EscapedName:\n            revertBackToLastMode();\n            return;\n        case None:\n        default:\n            return startNewMode( None );\n        }\n    }\n    void TestSpecParser::escape() {\n        saveLastMode();\n        m_mode = EscapedName;\n        m_escapeChars.push_back(m_realPatternPos);\n    }\n    bool TestSpecParser::isControlChar( char c ) const {\n        switch( m_mode ) {\n            default:\n                return false;\n            case None:\n                return c == '~';\n            case Name:\n                return c == '[';\n            case EscapedName:\n                return true;\n            case QuotedName:\n                return c == '\"';\n            case Tag:\n                return c == '[' || c == ']';\n        }\n    }\n\n    void TestSpecParser::addFilter() {\n        if( !m_currentFilter.m_patterns.empty() ) {\n            m_testSpec.m_filters.push_back( m_currentFilter );\n            m_currentFilter = TestSpec::Filter();\n        }\n    }\n\n    void TestSpecParser::saveLastMode() {\n      lastMode = m_mode;\n    }\n\n    void TestSpecParser::revertBackToLastMode() {\n      m_mode = lastMode;\n    }\n\n    bool TestSpecParser::separate() {\n      if( (m_mode==QuotedName) || (m_mode==Tag) ){\n         //invalid argument, signal failure to previous scope.\n         m_mode = None;\n         m_pos = m_arg.size();\n         m_substring.clear();\n         m_patternName.clear();\n         m_realPatternPos = 0;\n         return false;\n      }\n      endMode();\n      addFilter();\n      return true; //success\n    }\n\n    std::string TestSpecParser::preprocessPattern() {\n        std::string token = m_patternName;\n        for (std::size_t i = 0; i < m_escapeChars.size(); ++i)\n            token = token.substr(0, m_escapeChars[i] - i) + token.substr(m_escapeChars[i] - i + 1);\n        m_escapeChars.clear();\n        if (startsWith(token, \"exclude:\")) {\n            m_exclusion = true;\n            token = token.substr(8);\n        }\n\n        m_patternName.clear();\n        m_realPatternPos = 0;\n\n        return token;\n    }\n\n    void TestSpecParser::addNamePattern() {\n        auto token = preprocessPattern();\n\n        if (!token.empty()) {\n            TestSpec::PatternPtr pattern = std::make_shared<TestSpec::NamePattern>(token, m_substring);\n            if (m_exclusion)\n                pattern = std::make_shared<TestSpec::ExcludedPattern>(pattern);\n            m_currentFilter.m_patterns.push_back(pattern);\n        }\n        m_substring.clear();\n        m_exclusion = false;\n        m_mode = None;\n    }\n\n    void TestSpecParser::addTagPattern() {\n        auto token = preprocessPattern();\n\n        if (!token.empty()) {\n            // If the tag pattern is the \"hide and tag\" shorthand (e.g. [.foo])\n            // we have to create a separate hide tag and shorten the real one\n            if (token.size() > 1 && token[0] == '.') {\n                token.erase(token.begin());\n                TestSpec::PatternPtr pattern = std::make_shared<TestSpec::TagPattern>(\".\", m_substring);\n                if (m_exclusion) {\n                    pattern = std::make_shared<TestSpec::ExcludedPattern>(pattern);\n                }\n                m_currentFilter.m_patterns.push_back(pattern);\n            }\n\n            TestSpec::PatternPtr pattern = std::make_shared<TestSpec::TagPattern>(token, m_substring);\n\n            if (m_exclusion) {\n                pattern = std::make_shared<TestSpec::ExcludedPattern>(pattern);\n            }\n            m_currentFilter.m_patterns.push_back(pattern);\n        }\n        m_substring.clear();\n        m_exclusion = false;\n        m_mode = None;\n    }\n\n    TestSpec parseTestSpec( std::string const& arg ) {\n        return TestSpecParser( ITagAliasRegistry::get() ).parse( arg ).testSpec();\n    }\n\n} // namespace Catch\n// end catch_test_spec_parser.cpp\n// start catch_timer.cpp\n\n#include <chrono>\n\nstatic const uint64_t nanosecondsInSecond = 1000000000;\n\nnamespace Catch {\n\n    auto getCurrentNanosecondsSinceEpoch() -> uint64_t {\n        return std::chrono::duration_cast<std::chrono::nanoseconds>( std::chrono::high_resolution_clock::now().time_since_epoch() ).count();\n    }\n\n    namespace {\n        auto estimateClockResolution() -> uint64_t {\n            uint64_t sum = 0;\n            static const uint64_t iterations = 1000000;\n\n            auto startTime = getCurrentNanosecondsSinceEpoch();\n\n            for( std::size_t i = 0; i < iterations; ++i ) {\n\n                uint64_t ticks;\n                uint64_t baseTicks = getCurrentNanosecondsSinceEpoch();\n                do {\n                    ticks = getCurrentNanosecondsSinceEpoch();\n                } while( ticks == baseTicks );\n\n                auto delta = ticks - baseTicks;\n                sum += delta;\n\n                // If we have been calibrating for over 3 seconds -- the clock\n                // is terrible and we should move on.\n                // TBD: How to signal that the measured resolution is probably wrong?\n                if (ticks > startTime + 3 * nanosecondsInSecond) {\n                    return sum / ( i + 1u );\n                }\n            }\n\n            // We're just taking the mean, here. To do better we could take the std. dev and exclude outliers\n            // - and potentially do more iterations if there's a high variance.\n            return sum/iterations;\n        }\n    }\n    auto getEstimatedClockResolution() -> uint64_t {\n        static auto s_resolution = estimateClockResolution();\n        return s_resolution;\n    }\n\n    void Timer::start() {\n       m_nanoseconds = getCurrentNanosecondsSinceEpoch();\n    }\n    auto Timer::getElapsedNanoseconds() const -> uint64_t {\n        return getCurrentNanosecondsSinceEpoch() - m_nanoseconds;\n    }\n    auto Timer::getElapsedMicroseconds() const -> uint64_t {\n        return getElapsedNanoseconds()/1000;\n    }\n    auto Timer::getElapsedMilliseconds() const -> unsigned int {\n        return static_cast<unsigned int>(getElapsedMicroseconds()/1000);\n    }\n    auto Timer::getElapsedSeconds() const -> double {\n        return getElapsedMicroseconds()/1000000.0;\n    }\n\n} // namespace Catch\n// end catch_timer.cpp\n// start catch_tostring.cpp\n\n#if defined(__clang__)\n#    pragma clang diagnostic push\n#    pragma clang diagnostic ignored \"-Wexit-time-destructors\"\n#    pragma clang diagnostic ignored \"-Wglobal-constructors\"\n#endif\n\n// Enable specific decls locally\n#if !defined(CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER)\n#define CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER\n#endif\n\n#include <cmath>\n#include <iomanip>\n\nnamespace Catch {\n\nnamespace Detail {\n\n    const std::string unprintableString = \"{?}\";\n\n    namespace {\n        const int hexThreshold = 255;\n\n        struct Endianness {\n            enum Arch { Big, Little };\n\n            static Arch which() {\n                int one = 1;\n                // If the lowest byte we read is non-zero, we can assume\n                // that little endian format is used.\n                auto value = *reinterpret_cast<char*>(&one);\n                return value ? Little : Big;\n            }\n        };\n    }\n\n    std::string rawMemoryToString( const void *object, std::size_t size ) {\n        // Reverse order for little endian architectures\n        int i = 0, end = static_cast<int>( size ), inc = 1;\n        if( Endianness::which() == Endianness::Little ) {\n            i = end-1;\n            end = inc = -1;\n        }\n\n        unsigned char const *bytes = static_cast<unsigned char const *>(object);\n        ReusableStringStream rss;\n        rss << \"0x\" << std::setfill('0') << std::hex;\n        for( ; i != end; i += inc )\n             rss << std::setw(2) << static_cast<unsigned>(bytes[i]);\n       return rss.str();\n    }\n}\n\ntemplate<typename T>\nstd::string fpToString( T value, int precision ) {\n    if (Catch::isnan(value)) {\n        return \"nan\";\n    }\n\n    ReusableStringStream rss;\n    rss << std::setprecision( precision )\n        << std::fixed\n        << value;\n    std::string d = rss.str();\n    std::size_t i = d.find_last_not_of( '0' );\n    if( i != std::string::npos && i != d.size()-1 ) {\n        if( d[i] == '.' )\n            i++;\n        d = d.substr( 0, i+1 );\n    }\n    return d;\n}\n\n//// ======================================================= ////\n//\n//   Out-of-line defs for full specialization of StringMaker\n//\n//// ======================================================= ////\n\nstd::string StringMaker<std::string>::convert(const std::string& str) {\n    if (!getCurrentContext().getConfig()->showInvisibles()) {\n        return '\"' + str + '\"';\n    }\n\n    std::string s(\"\\\"\");\n    for (char c : str) {\n        switch (c) {\n        case '\\n':\n            s.append(\"\\\\n\");\n            break;\n        case '\\t':\n            s.append(\"\\\\t\");\n            break;\n        default:\n            s.push_back(c);\n            break;\n        }\n    }\n    s.append(\"\\\"\");\n    return s;\n}\n\n#ifdef CATCH_CONFIG_CPP17_STRING_VIEW\nstd::string StringMaker<std::string_view>::convert(std::string_view str) {\n    return ::Catch::Detail::stringify(std::string{ str });\n}\n#endif\n\nstd::string StringMaker<char const*>::convert(char const* str) {\n    if (str) {\n        return ::Catch::Detail::stringify(std::string{ str });\n    } else {\n        return{ \"{null string}\" };\n    }\n}\nstd::string StringMaker<char*>::convert(char* str) {\n    if (str) {\n        return ::Catch::Detail::stringify(std::string{ str });\n    } else {\n        return{ \"{null string}\" };\n    }\n}\n\n#ifdef CATCH_CONFIG_WCHAR\nstd::string StringMaker<std::wstring>::convert(const std::wstring& wstr) {\n    std::string s;\n    s.reserve(wstr.size());\n    for (auto c : wstr) {\n        s += (c <= 0xff) ? static_cast<char>(c) : '?';\n    }\n    return ::Catch::Detail::stringify(s);\n}\n\n# ifdef CATCH_CONFIG_CPP17_STRING_VIEW\nstd::string StringMaker<std::wstring_view>::convert(std::wstring_view str) {\n    return StringMaker<std::wstring>::convert(std::wstring(str));\n}\n# endif\n\nstd::string StringMaker<wchar_t const*>::convert(wchar_t const * str) {\n    if (str) {\n        return ::Catch::Detail::stringify(std::wstring{ str });\n    } else {\n        return{ \"{null string}\" };\n    }\n}\nstd::string StringMaker<wchar_t *>::convert(wchar_t * str) {\n    if (str) {\n        return ::Catch::Detail::stringify(std::wstring{ str });\n    } else {\n        return{ \"{null string}\" };\n    }\n}\n#endif\n\n#if defined(CATCH_CONFIG_CPP17_BYTE)\n#include <cstddef>\nstd::string StringMaker<std::byte>::convert(std::byte value) {\n    return ::Catch::Detail::stringify(std::to_integer<unsigned long long>(value));\n}\n#endif // defined(CATCH_CONFIG_CPP17_BYTE)\n\nstd::string StringMaker<int>::convert(int value) {\n    return ::Catch::Detail::stringify(static_cast<long long>(value));\n}\nstd::string StringMaker<long>::convert(long value) {\n    return ::Catch::Detail::stringify(static_cast<long long>(value));\n}\nstd::string StringMaker<long long>::convert(long long value) {\n    ReusableStringStream rss;\n    rss << value;\n    if (value > Detail::hexThreshold) {\n        rss << \" (0x\" << std::hex << value << ')';\n    }\n    return rss.str();\n}\n\nstd::string StringMaker<unsigned int>::convert(unsigned int value) {\n    return ::Catch::Detail::stringify(static_cast<unsigned long long>(value));\n}\nstd::string StringMaker<unsigned long>::convert(unsigned long value) {\n    return ::Catch::Detail::stringify(static_cast<unsigned long long>(value));\n}\nstd::string StringMaker<unsigned long long>::convert(unsigned long long value) {\n    ReusableStringStream rss;\n    rss << value;\n    if (value > Detail::hexThreshold) {\n        rss << \" (0x\" << std::hex << value << ')';\n    }\n    return rss.str();\n}\n\nstd::string StringMaker<bool>::convert(bool b) {\n    return b ? \"true\" : \"false\";\n}\n\nstd::string StringMaker<signed char>::convert(signed char value) {\n    if (value == '\\r') {\n        return \"'\\\\r'\";\n    } else if (value == '\\f') {\n        return \"'\\\\f'\";\n    } else if (value == '\\n') {\n        return \"'\\\\n'\";\n    } else if (value == '\\t') {\n        return \"'\\\\t'\";\n    } else if ('\\0' <= value && value < ' ') {\n        return ::Catch::Detail::stringify(static_cast<unsigned int>(value));\n    } else {\n        char chstr[] = \"' '\";\n        chstr[1] = value;\n        return chstr;\n    }\n}\nstd::string StringMaker<char>::convert(char c) {\n    return ::Catch::Detail::stringify(static_cast<signed char>(c));\n}\nstd::string StringMaker<unsigned char>::convert(unsigned char c) {\n    return ::Catch::Detail::stringify(static_cast<char>(c));\n}\n\nstd::string StringMaker<std::nullptr_t>::convert(std::nullptr_t) {\n    return \"nullptr\";\n}\n\nint StringMaker<float>::precision = 5;\n\nstd::string StringMaker<float>::convert(float value) {\n    return fpToString(value, precision) + 'f';\n}\n\nint StringMaker<double>::precision = 10;\n\nstd::string StringMaker<double>::convert(double value) {\n    return fpToString(value, precision);\n}\n\nstd::string ratio_string<std::atto>::symbol() { return \"a\"; }\nstd::string ratio_string<std::femto>::symbol() { return \"f\"; }\nstd::string ratio_string<std::pico>::symbol() { return \"p\"; }\nstd::string ratio_string<std::nano>::symbol() { return \"n\"; }\nstd::string ratio_string<std::micro>::symbol() { return \"u\"; }\nstd::string ratio_string<std::milli>::symbol() { return \"m\"; }\n\n} // end namespace Catch\n\n#if defined(__clang__)\n#    pragma clang diagnostic pop\n#endif\n\n// end catch_tostring.cpp\n// start catch_totals.cpp\n\nnamespace Catch {\n\n    Counts Counts::operator - ( Counts const& other ) const {\n        Counts diff;\n        diff.passed = passed - other.passed;\n        diff.failed = failed - other.failed;\n        diff.failedButOk = failedButOk - other.failedButOk;\n        return diff;\n    }\n\n    Counts& Counts::operator += ( Counts const& other ) {\n        passed += other.passed;\n        failed += other.failed;\n        failedButOk += other.failedButOk;\n        return *this;\n    }\n\n    std::size_t Counts::total() const {\n        return passed + failed + failedButOk;\n    }\n    bool Counts::allPassed() const {\n        return failed == 0 && failedButOk == 0;\n    }\n    bool Counts::allOk() const {\n        return failed == 0;\n    }\n\n    Totals Totals::operator - ( Totals const& other ) const {\n        Totals diff;\n        diff.assertions = assertions - other.assertions;\n        diff.testCases = testCases - other.testCases;\n        return diff;\n    }\n\n    Totals& Totals::operator += ( Totals const& other ) {\n        assertions += other.assertions;\n        testCases += other.testCases;\n        return *this;\n    }\n\n    Totals Totals::delta( Totals const& prevTotals ) const {\n        Totals diff = *this - prevTotals;\n        if( diff.assertions.failed > 0 )\n            ++diff.testCases.failed;\n        else if( diff.assertions.failedButOk > 0 )\n            ++diff.testCases.failedButOk;\n        else\n            ++diff.testCases.passed;\n        return diff;\n    }\n\n}\n// end catch_totals.cpp\n// start catch_uncaught_exceptions.cpp\n\n// start catch_config_uncaught_exceptions.hpp\n\n//              Copyright Catch2 Authors\n// Distributed under the Boost Software License, Version 1.0.\n//   (See accompanying file LICENSE_1_0.txt or copy at\n//        https://www.boost.org/LICENSE_1_0.txt)\n\n// SPDX-License-Identifier: BSL-1.0\n\n#ifndef CATCH_CONFIG_UNCAUGHT_EXCEPTIONS_HPP\n#define CATCH_CONFIG_UNCAUGHT_EXCEPTIONS_HPP\n\n#if defined(_MSC_VER)\n#  if _MSC_VER >= 1900 // Visual Studio 2015 or newer\n#    define CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS\n#  endif\n#endif\n\n#include <exception>\n\n#if defined(__cpp_lib_uncaught_exceptions) \\\n    && !defined(CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS)\n\n#  define CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS\n#endif // __cpp_lib_uncaught_exceptions\n\n#if defined(CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS) \\\n    && !defined(CATCH_CONFIG_NO_CPP17_UNCAUGHT_EXCEPTIONS) \\\n    && !defined(CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS)\n\n#  define CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS\n#endif\n\n#endif // CATCH_CONFIG_UNCAUGHT_EXCEPTIONS_HPP\n// end catch_config_uncaught_exceptions.hpp\n#include <exception>\n\nnamespace Catch {\n    bool uncaught_exceptions() {\n#if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)\n        return false;\n#elif defined(CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS)\n        return std::uncaught_exceptions() > 0;\n#else\n        return std::uncaught_exception();\n#endif\n  }\n} // end namespace Catch\n// end catch_uncaught_exceptions.cpp\n// start catch_version.cpp\n\n#include <ostream>\n\nnamespace Catch {\n\n    Version::Version\n        (   unsigned int _majorVersion,\n            unsigned int _minorVersion,\n            unsigned int _patchNumber,\n            char const * const _branchName,\n            unsigned int _buildNumber )\n    :   majorVersion( _majorVersion ),\n        minorVersion( _minorVersion ),\n        patchNumber( _patchNumber ),\n        branchName( _branchName ),\n        buildNumber( _buildNumber )\n    {}\n\n    std::ostream& operator << ( std::ostream& os, Version const& version ) {\n        os  << version.majorVersion << '.'\n            << version.minorVersion << '.'\n            << version.patchNumber;\n        // branchName is never null -> 0th char is \\0 if it is empty\n        if (version.branchName[0]) {\n            os << '-' << version.branchName\n               << '.' << version.buildNumber;\n        }\n        return os;\n    }\n\n    Version const& libraryVersion() {\n        static Version version( 2, 13, 10, \"\", 0 );\n        return version;\n    }\n\n}\n// end catch_version.cpp\n// start catch_wildcard_pattern.cpp\n\nnamespace Catch {\n\n    WildcardPattern::WildcardPattern( std::string const& pattern,\n                                      CaseSensitive::Choice caseSensitivity )\n    :   m_caseSensitivity( caseSensitivity ),\n        m_pattern( normaliseString( pattern ) )\n    {\n        if( startsWith( m_pattern, '*' ) ) {\n            m_pattern = m_pattern.substr( 1 );\n            m_wildcard = WildcardAtStart;\n        }\n        if( endsWith( m_pattern, '*' ) ) {\n            m_pattern = m_pattern.substr( 0, m_pattern.size()-1 );\n            m_wildcard = static_cast<WildcardPosition>( m_wildcard | WildcardAtEnd );\n        }\n    }\n\n    bool WildcardPattern::matches( std::string const& str ) const {\n        switch( m_wildcard ) {\n            case NoWildcard:\n                return m_pattern == normaliseString( str );\n            case WildcardAtStart:\n                return endsWith( normaliseString( str ), m_pattern );\n            case WildcardAtEnd:\n                return startsWith( normaliseString( str ), m_pattern );\n            case WildcardAtBothEnds:\n                return contains( normaliseString( str ), m_pattern );\n            default:\n                CATCH_INTERNAL_ERROR( \"Unknown enum\" );\n        }\n    }\n\n    std::string WildcardPattern::normaliseString( std::string const& str ) const {\n        return trim( m_caseSensitivity == CaseSensitive::No ? toLower( str ) : str );\n    }\n}\n// end catch_wildcard_pattern.cpp\n// start catch_xmlwriter.cpp\n\n#include <iomanip>\n#include <type_traits>\n\nnamespace Catch {\n\nnamespace {\n\n    size_t trailingBytes(unsigned char c) {\n        if ((c & 0xE0) == 0xC0) {\n            return 2;\n        }\n        if ((c & 0xF0) == 0xE0) {\n            return 3;\n        }\n        if ((c & 0xF8) == 0xF0) {\n            return 4;\n        }\n        CATCH_INTERNAL_ERROR(\"Invalid multibyte utf-8 start byte encountered\");\n    }\n\n    uint32_t headerValue(unsigned char c) {\n        if ((c & 0xE0) == 0xC0) {\n            return c & 0x1F;\n        }\n        if ((c & 0xF0) == 0xE0) {\n            return c & 0x0F;\n        }\n        if ((c & 0xF8) == 0xF0) {\n            return c & 0x07;\n        }\n        CATCH_INTERNAL_ERROR(\"Invalid multibyte utf-8 start byte encountered\");\n    }\n\n    void hexEscapeChar(std::ostream& os, unsigned char c) {\n        std::ios_base::fmtflags f(os.flags());\n        os << \"\\\\x\"\n            << std::uppercase << std::hex << std::setfill('0') << std::setw(2)\n            << static_cast<int>(c);\n        os.flags(f);\n    }\n\n    bool shouldNewline(XmlFormatting fmt) {\n        return !!(static_cast<std::underlying_type<XmlFormatting>::type>(fmt & XmlFormatting::Newline));\n    }\n\n    bool shouldIndent(XmlFormatting fmt) {\n        return !!(static_cast<std::underlying_type<XmlFormatting>::type>(fmt & XmlFormatting::Indent));\n    }\n\n} // anonymous namespace\n\n    XmlFormatting operator | (XmlFormatting lhs, XmlFormatting rhs) {\n        return static_cast<XmlFormatting>(\n            static_cast<std::underlying_type<XmlFormatting>::type>(lhs) |\n            static_cast<std::underlying_type<XmlFormatting>::type>(rhs)\n        );\n    }\n\n    XmlFormatting operator & (XmlFormatting lhs, XmlFormatting rhs) {\n        return static_cast<XmlFormatting>(\n            static_cast<std::underlying_type<XmlFormatting>::type>(lhs) &\n            static_cast<std::underlying_type<XmlFormatting>::type>(rhs)\n        );\n    }\n\n    XmlEncode::XmlEncode( std::string const& str, ForWhat forWhat )\n    :   m_str( str ),\n        m_forWhat( forWhat )\n    {}\n\n    void XmlEncode::encodeTo( std::ostream& os ) const {\n        // Apostrophe escaping not necessary if we always use \" to write attributes\n        // (see: http://www.w3.org/TR/xml/#syntax)\n\n        for( std::size_t idx = 0; idx < m_str.size(); ++ idx ) {\n            unsigned char c = m_str[idx];\n            switch (c) {\n            case '<':   os << \"&lt;\"; break;\n            case '&':   os << \"&amp;\"; break;\n\n            case '>':\n                // See: http://www.w3.org/TR/xml/#syntax\n                if (idx > 2 && m_str[idx - 1] == ']' && m_str[idx - 2] == ']')\n                    os << \"&gt;\";\n                else\n                    os << c;\n                break;\n\n            case '\\\"':\n                if (m_forWhat == ForAttributes)\n                    os << \"&quot;\";\n                else\n                    os << c;\n                break;\n\n            default:\n                // Check for control characters and invalid utf-8\n\n                // Escape control characters in standard ascii\n                // see http://stackoverflow.com/questions/404107/why-are-control-characters-illegal-in-xml-1-0\n                if (c < 0x09 || (c > 0x0D && c < 0x20) || c == 0x7F) {\n                    hexEscapeChar(os, c);\n                    break;\n                }\n\n                // Plain ASCII: Write it to stream\n                if (c < 0x7F) {\n                    os << c;\n                    break;\n                }\n\n                // UTF-8 territory\n                // Check if the encoding is valid and if it is not, hex escape bytes.\n                // Important: We do not check the exact decoded values for validity, only the encoding format\n                // First check that this bytes is a valid lead byte:\n                // This means that it is not encoded as 1111 1XXX\n                // Or as 10XX XXXX\n                if (c <  0xC0 ||\n                    c >= 0xF8) {\n                    hexEscapeChar(os, c);\n                    break;\n                }\n\n                auto encBytes = trailingBytes(c);\n                // Are there enough bytes left to avoid accessing out-of-bounds memory?\n                if (idx + encBytes - 1 >= m_str.size()) {\n                    hexEscapeChar(os, c);\n                    break;\n                }\n                // The header is valid, check data\n                // The next encBytes bytes must together be a valid utf-8\n                // This means: bitpattern 10XX XXXX and the extracted value is sane (ish)\n                bool valid = true;\n                uint32_t value = headerValue(c);\n                for (std::size_t n = 1; n < encBytes; ++n) {\n                    unsigned char nc = m_str[idx + n];\n                    valid &= ((nc & 0xC0) == 0x80);\n                    value = (value << 6) | (nc & 0x3F);\n                }\n\n                if (\n                    // Wrong bit pattern of following bytes\n                    (!valid) ||\n                    // Overlong encodings\n                    (value < 0x80) ||\n                    (0x80 <= value && value < 0x800   && encBytes > 2) ||\n                    (0x800 < value && value < 0x10000 && encBytes > 3) ||\n                    // Encoded value out of range\n                    (value >= 0x110000)\n                    ) {\n                    hexEscapeChar(os, c);\n                    break;\n                }\n\n                // If we got here, this is in fact a valid(ish) utf-8 sequence\n                for (std::size_t n = 0; n < encBytes; ++n) {\n                    os << m_str[idx + n];\n                }\n                idx += encBytes - 1;\n                break;\n            }\n        }\n    }\n\n    std::ostream& operator << ( std::ostream& os, XmlEncode const& xmlEncode ) {\n        xmlEncode.encodeTo( os );\n        return os;\n    }\n\n    XmlWriter::ScopedElement::ScopedElement( XmlWriter* writer, XmlFormatting fmt )\n    :   m_writer( writer ),\n        m_fmt(fmt)\n    {}\n\n    XmlWriter::ScopedElement::ScopedElement( ScopedElement&& other ) noexcept\n    :   m_writer( other.m_writer ),\n        m_fmt(other.m_fmt)\n    {\n        other.m_writer = nullptr;\n        other.m_fmt = XmlFormatting::None;\n    }\n    XmlWriter::ScopedElement& XmlWriter::ScopedElement::operator=( ScopedElement&& other ) noexcept {\n        if ( m_writer ) {\n            m_writer->endElement();\n        }\n        m_writer = other.m_writer;\n        other.m_writer = nullptr;\n        m_fmt = other.m_fmt;\n        other.m_fmt = XmlFormatting::None;\n        return *this;\n    }\n\n    XmlWriter::ScopedElement::~ScopedElement() {\n        if (m_writer) {\n            m_writer->endElement(m_fmt);\n        }\n    }\n\n    XmlWriter::ScopedElement& XmlWriter::ScopedElement::writeText( std::string const& text, XmlFormatting fmt ) {\n        m_writer->writeText( text, fmt );\n        return *this;\n    }\n\n    XmlWriter::XmlWriter( std::ostream& os ) : m_os( os )\n    {\n        writeDeclaration();\n    }\n\n    XmlWriter::~XmlWriter() {\n        while (!m_tags.empty()) {\n            endElement();\n        }\n        newlineIfNecessary();\n    }\n\n    XmlWriter& XmlWriter::startElement( std::string const& name, XmlFormatting fmt ) {\n        ensureTagClosed();\n        newlineIfNecessary();\n        if (shouldIndent(fmt)) {\n            m_os << m_indent;\n            m_indent += \"  \";\n        }\n        m_os << '<' << name;\n        m_tags.push_back( name );\n        m_tagIsOpen = true;\n        applyFormatting(fmt);\n        return *this;\n    }\n\n    XmlWriter::ScopedElement XmlWriter::scopedElement( std::string const& name, XmlFormatting fmt ) {\n        ScopedElement scoped( this, fmt );\n        startElement( name, fmt );\n        return scoped;\n    }\n\n    XmlWriter& XmlWriter::endElement(XmlFormatting fmt) {\n        m_indent = m_indent.substr(0, m_indent.size() - 2);\n\n        if( m_tagIsOpen ) {\n            m_os << \"/>\";\n            m_tagIsOpen = false;\n        } else {\n            newlineIfNecessary();\n            if (shouldIndent(fmt)) {\n                m_os << m_indent;\n            }\n            m_os << \"</\" << m_tags.back() << \">\";\n        }\n        m_os << std::flush;\n        applyFormatting(fmt);\n        m_tags.pop_back();\n        return *this;\n    }\n\n    XmlWriter& XmlWriter::writeAttribute( std::string const& name, std::string const& attribute ) {\n        if( !name.empty() && !attribute.empty() )\n            m_os << ' ' << name << \"=\\\"\" << XmlEncode( attribute, XmlEncode::ForAttributes ) << '\"';\n        return *this;\n    }\n\n    XmlWriter& XmlWriter::writeAttribute( std::string const& name, bool attribute ) {\n        m_os << ' ' << name << \"=\\\"\" << ( attribute ? \"true\" : \"false\" ) << '\"';\n        return *this;\n    }\n\n    XmlWriter& XmlWriter::writeText( std::string const& text, XmlFormatting fmt) {\n        if( !text.empty() ){\n            bool tagWasOpen = m_tagIsOpen;\n            ensureTagClosed();\n            if (tagWasOpen && shouldIndent(fmt)) {\n                m_os << m_indent;\n            }\n            m_os << XmlEncode( text );\n            applyFormatting(fmt);\n        }\n        return *this;\n    }\n\n    XmlWriter& XmlWriter::writeComment( std::string const& text, XmlFormatting fmt) {\n        ensureTagClosed();\n        if (shouldIndent(fmt)) {\n            m_os << m_indent;\n        }\n        m_os << \"<!--\" << text << \"-->\";\n        applyFormatting(fmt);\n        return *this;\n    }\n\n    void XmlWriter::writeStylesheetRef( std::string const& url ) {\n        m_os << \"<?xml-stylesheet type=\\\"text/xsl\\\" href=\\\"\" << url << \"\\\"?>\\n\";\n    }\n\n    XmlWriter& XmlWriter::writeBlankLine() {\n        ensureTagClosed();\n        m_os << '\\n';\n        return *this;\n    }\n\n    void XmlWriter::ensureTagClosed() {\n        if( m_tagIsOpen ) {\n            m_os << '>' << std::flush;\n            newlineIfNecessary();\n            m_tagIsOpen = false;\n        }\n    }\n\n    void XmlWriter::applyFormatting(XmlFormatting fmt) {\n        m_needsNewline = shouldNewline(fmt);\n    }\n\n    void XmlWriter::writeDeclaration() {\n        m_os << \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\";\n    }\n\n    void XmlWriter::newlineIfNecessary() {\n        if( m_needsNewline ) {\n            m_os << std::endl;\n            m_needsNewline = false;\n        }\n    }\n}\n// end catch_xmlwriter.cpp\n// start catch_reporter_bases.cpp\n\n#include <cstring>\n#include <cfloat>\n#include <cstdio>\n#include <cassert>\n#include <memory>\n\nnamespace Catch {\n    void prepareExpandedExpression(AssertionResult& result) {\n        result.getExpandedExpression();\n    }\n\n    // Because formatting using c++ streams is stateful, drop down to C is required\n    // Alternatively we could use stringstream, but its performance is... not good.\n    std::string getFormattedDuration( double duration ) {\n        // Max exponent + 1 is required to represent the whole part\n        // + 1 for decimal point\n        // + 3 for the 3 decimal places\n        // + 1 for null terminator\n        const std::size_t maxDoubleSize = DBL_MAX_10_EXP + 1 + 1 + 3 + 1;\n        char buffer[maxDoubleSize];\n\n        // Save previous errno, to prevent sprintf from overwriting it\n        ErrnoGuard guard;\n#ifdef _MSC_VER\n        sprintf_s(buffer, \"%.3f\", duration);\n#else\n        std::sprintf(buffer, \"%.3f\", duration);\n#endif\n        return std::string(buffer);\n    }\n\n    bool shouldShowDuration( IConfig const& config, double duration ) {\n        if ( config.showDurations() == ShowDurations::Always ) {\n            return true;\n        }\n        if ( config.showDurations() == ShowDurations::Never ) {\n            return false;\n        }\n        const double min = config.minDuration();\n        return min >= 0 && duration >= min;\n    }\n\n    std::string serializeFilters( std::vector<std::string> const& container ) {\n        ReusableStringStream oss;\n        bool first = true;\n        for (auto&& filter : container)\n        {\n            if (!first)\n                oss << ' ';\n            else\n                first = false;\n\n            oss << filter;\n        }\n        return oss.str();\n    }\n\n    TestEventListenerBase::TestEventListenerBase(ReporterConfig const & _config)\n        :StreamingReporterBase(_config) {}\n\n    std::set<Verbosity> TestEventListenerBase::getSupportedVerbosities() {\n        return { Verbosity::Quiet, Verbosity::Normal, Verbosity::High };\n    }\n\n    void TestEventListenerBase::assertionStarting(AssertionInfo const &) {}\n\n    bool TestEventListenerBase::assertionEnded(AssertionStats const &) {\n        return false;\n    }\n\n} // end namespace Catch\n// end catch_reporter_bases.cpp\n// start catch_reporter_compact.cpp\n\nnamespace {\n\n#ifdef CATCH_PLATFORM_MAC\n    const char* failedString() { return \"FAILED\"; }\n    const char* passedString() { return \"PASSED\"; }\n#else\n    const char* failedString() { return \"failed\"; }\n    const char* passedString() { return \"passed\"; }\n#endif\n\n    // Colour::LightGrey\n    Catch::Colour::Code dimColour() { return Catch::Colour::FileName; }\n\n    std::string bothOrAll( std::size_t count ) {\n        return count == 1 ? std::string() :\n               count == 2 ? \"both \" : \"all \" ;\n    }\n\n} // anon namespace\n\nnamespace Catch {\nnamespace {\n// Colour, message variants:\n// - white: No tests ran.\n// -   red: Failed [both/all] N test cases, failed [both/all] M assertions.\n// - white: Passed [both/all] N test cases (no assertions).\n// -   red: Failed N tests cases, failed M assertions.\n// - green: Passed [both/all] N tests cases with M assertions.\nvoid printTotals(std::ostream& out, const Totals& totals) {\n    if (totals.testCases.total() == 0) {\n        out << \"No tests ran.\";\n    } else if (totals.testCases.failed == totals.testCases.total()) {\n        Colour colour(Colour::ResultError);\n        const std::string qualify_assertions_failed =\n            totals.assertions.failed == totals.assertions.total() ?\n            bothOrAll(totals.assertions.failed) : std::string();\n        out <<\n            \"Failed \" << bothOrAll(totals.testCases.failed)\n            << pluralise(totals.testCases.failed, \"test case\") << \", \"\n            \"failed \" << qualify_assertions_failed <<\n            pluralise(totals.assertions.failed, \"assertion\") << '.';\n    } else if (totals.assertions.total() == 0) {\n        out <<\n            \"Passed \" << bothOrAll(totals.testCases.total())\n            << pluralise(totals.testCases.total(), \"test case\")\n            << \" (no assertions).\";\n    } else if (totals.assertions.failed) {\n        Colour colour(Colour::ResultError);\n        out <<\n            \"Failed \" << pluralise(totals.testCases.failed, \"test case\") << \", \"\n            \"failed \" << pluralise(totals.assertions.failed, \"assertion\") << '.';\n    } else {\n        Colour colour(Colour::ResultSuccess);\n        out <<\n            \"Passed \" << bothOrAll(totals.testCases.passed)\n            << pluralise(totals.testCases.passed, \"test case\") <<\n            \" with \" << pluralise(totals.assertions.passed, \"assertion\") << '.';\n    }\n}\n\n// Implementation of CompactReporter formatting\nclass AssertionPrinter {\npublic:\n    AssertionPrinter& operator= (AssertionPrinter const&) = delete;\n    AssertionPrinter(AssertionPrinter const&) = delete;\n    AssertionPrinter(std::ostream& _stream, AssertionStats const& _stats, bool _printInfoMessages)\n        : stream(_stream)\n        , result(_stats.assertionResult)\n        , messages(_stats.infoMessages)\n        , itMessage(_stats.infoMessages.begin())\n        , printInfoMessages(_printInfoMessages) {}\n\n    void print() {\n        printSourceInfo();\n\n        itMessage = messages.begin();\n\n        switch (result.getResultType()) {\n        case ResultWas::Ok:\n            printResultType(Colour::ResultSuccess, passedString());\n            printOriginalExpression();\n            printReconstructedExpression();\n            if (!result.hasExpression())\n                printRemainingMessages(Colour::None);\n            else\n                printRemainingMessages();\n            break;\n        case ResultWas::ExpressionFailed:\n            if (result.isOk())\n                printResultType(Colour::ResultSuccess, failedString() + std::string(\" - but was ok\"));\n            else\n                printResultType(Colour::Error, failedString());\n            printOriginalExpression();\n            printReconstructedExpression();\n            printRemainingMessages();\n            break;\n        case ResultWas::ThrewException:\n            printResultType(Colour::Error, failedString());\n            printIssue(\"unexpected exception with message:\");\n            printMessage();\n            printExpressionWas();\n            printRemainingMessages();\n            break;\n        case ResultWas::FatalErrorCondition:\n            printResultType(Colour::Error, failedString());\n            printIssue(\"fatal error condition with message:\");\n            printMessage();\n            printExpressionWas();\n            printRemainingMessages();\n            break;\n        case ResultWas::DidntThrowException:\n            printResultType(Colour::Error, failedString());\n            printIssue(\"expected exception, got none\");\n            printExpressionWas();\n            printRemainingMessages();\n            break;\n        case ResultWas::Info:\n            printResultType(Colour::None, \"info\");\n            printMessage();\n            printRemainingMessages();\n            break;\n        case ResultWas::Warning:\n            printResultType(Colour::None, \"warning\");\n            printMessage();\n            printRemainingMessages();\n            break;\n        case ResultWas::ExplicitFailure:\n            printResultType(Colour::Error, failedString());\n            printIssue(\"explicitly\");\n            printRemainingMessages(Colour::None);\n            break;\n            // These cases are here to prevent compiler warnings\n        case ResultWas::Unknown:\n        case ResultWas::FailureBit:\n        case ResultWas::Exception:\n            printResultType(Colour::Error, \"** internal error **\");\n            break;\n        }\n    }\n\nprivate:\n    void printSourceInfo() const {\n        Colour colourGuard(Colour::FileName);\n        stream << result.getSourceInfo() << ':';\n    }\n\n    void printResultType(Colour::Code colour, std::string const& passOrFail) const {\n        if (!passOrFail.empty()) {\n            {\n                Colour colourGuard(colour);\n                stream << ' ' << passOrFail;\n            }\n            stream << ':';\n        }\n    }\n\n    void printIssue(std::string const& issue) const {\n        stream << ' ' << issue;\n    }\n\n    void printExpressionWas() {\n        if (result.hasExpression()) {\n            stream << ';';\n            {\n                Colour colour(dimColour());\n                stream << \" expression was:\";\n            }\n            printOriginalExpression();\n        }\n    }\n\n    void printOriginalExpression() const {\n        if (result.hasExpression()) {\n            stream << ' ' << result.getExpression();\n        }\n    }\n\n    void printReconstructedExpression() const {\n        if (result.hasExpandedExpression()) {\n            {\n                Colour colour(dimColour());\n                stream << \" for: \";\n            }\n            stream << result.getExpandedExpression();\n        }\n    }\n\n    void printMessage() {\n        if (itMessage != messages.end()) {\n            stream << \" '\" << itMessage->message << '\\'';\n            ++itMessage;\n        }\n    }\n\n    void printRemainingMessages(Colour::Code colour = dimColour()) {\n        if (itMessage == messages.end())\n            return;\n\n        const auto itEnd = messages.cend();\n        const auto N = static_cast<std::size_t>(std::distance(itMessage, itEnd));\n\n        {\n            Colour colourGuard(colour);\n            stream << \" with \" << pluralise(N, \"message\") << ':';\n        }\n\n        while (itMessage != itEnd) {\n            // If this assertion is a warning ignore any INFO messages\n            if (printInfoMessages || itMessage->type != ResultWas::Info) {\n                printMessage();\n                if (itMessage != itEnd) {\n                    Colour colourGuard(dimColour());\n                    stream << \" and\";\n                }\n                continue;\n            }\n            ++itMessage;\n        }\n    }\n\nprivate:\n    std::ostream& stream;\n    AssertionResult const& result;\n    std::vector<MessageInfo> messages;\n    std::vector<MessageInfo>::const_iterator itMessage;\n    bool printInfoMessages;\n};\n\n} // anon namespace\n\n        std::string CompactReporter::getDescription() {\n            return \"Reports test results on a single line, suitable for IDEs\";\n        }\n\n        void CompactReporter::noMatchingTestCases( std::string const& spec ) {\n            stream << \"No test cases matched '\" << spec << '\\'' << std::endl;\n        }\n\n        void CompactReporter::assertionStarting( AssertionInfo const& ) {}\n\n        bool CompactReporter::assertionEnded( AssertionStats const& _assertionStats ) {\n            AssertionResult const& result = _assertionStats.assertionResult;\n\n            bool printInfoMessages = true;\n\n            // Drop out if result was successful and we're not printing those\n            if( !m_config->includeSuccessfulResults() && result.isOk() ) {\n                if( result.getResultType() != ResultWas::Warning )\n                    return false;\n                printInfoMessages = false;\n            }\n\n            AssertionPrinter printer( stream, _assertionStats, printInfoMessages );\n            printer.print();\n\n            stream << std::endl;\n            return true;\n        }\n\n        void CompactReporter::sectionEnded(SectionStats const& _sectionStats) {\n            double dur = _sectionStats.durationInSeconds;\n            if ( shouldShowDuration( *m_config, dur ) ) {\n                stream << getFormattedDuration( dur ) << \" s: \" << _sectionStats.sectionInfo.name << std::endl;\n            }\n        }\n\n        void CompactReporter::testRunEnded( TestRunStats const& _testRunStats ) {\n            printTotals( stream, _testRunStats.totals );\n            stream << '\\n' << std::endl;\n            StreamingReporterBase::testRunEnded( _testRunStats );\n        }\n\n        CompactReporter::~CompactReporter() {}\n\n    CATCH_REGISTER_REPORTER( \"compact\", CompactReporter )\n\n} // end namespace Catch\n// end catch_reporter_compact.cpp\n// start catch_reporter_console.cpp\n\n#include <cfloat>\n#include <cstdio>\n\n#if defined(_MSC_VER)\n#pragma warning(push)\n#pragma warning(disable:4061) // Not all labels are EXPLICITLY handled in switch\n // Note that 4062 (not all labels are handled and default is missing) is enabled\n#endif\n\n#if defined(__clang__)\n#  pragma clang diagnostic push\n// For simplicity, benchmarking-only helpers are always enabled\n#  pragma clang diagnostic ignored \"-Wunused-function\"\n#endif\n\nnamespace Catch {\n\nnamespace {\n\n// Formatter impl for ConsoleReporter\nclass ConsoleAssertionPrinter {\npublic:\n    ConsoleAssertionPrinter& operator= (ConsoleAssertionPrinter const&) = delete;\n    ConsoleAssertionPrinter(ConsoleAssertionPrinter const&) = delete;\n    ConsoleAssertionPrinter(std::ostream& _stream, AssertionStats const& _stats, bool _printInfoMessages)\n        : stream(_stream),\n        stats(_stats),\n        result(_stats.assertionResult),\n        colour(Colour::None),\n        message(result.getMessage()),\n        messages(_stats.infoMessages),\n        printInfoMessages(_printInfoMessages) {\n        switch (result.getResultType()) {\n        case ResultWas::Ok:\n            colour = Colour::Success;\n            passOrFail = \"PASSED\";\n            //if( result.hasMessage() )\n            if (_stats.infoMessages.size() == 1)\n                messageLabel = \"with message\";\n            if (_stats.infoMessages.size() > 1)\n                messageLabel = \"with messages\";\n            break;\n        case ResultWas::ExpressionFailed:\n            if (result.isOk()) {\n                colour = Colour::Success;\n                passOrFail = \"FAILED - but was ok\";\n            } else {\n                colour = Colour::Error;\n                passOrFail = \"FAILED\";\n            }\n            if (_stats.infoMessages.size() == 1)\n                messageLabel = \"with message\";\n            if (_stats.infoMessages.size() > 1)\n                messageLabel = \"with messages\";\n            break;\n        case ResultWas::ThrewException:\n            colour = Colour::Error;\n            passOrFail = \"FAILED\";\n            messageLabel = \"due to unexpected exception with \";\n            if (_stats.infoMessages.size() == 1)\n                messageLabel += \"message\";\n            if (_stats.infoMessages.size() > 1)\n                messageLabel += \"messages\";\n            break;\n        case ResultWas::FatalErrorCondition:\n            colour = Colour::Error;\n            passOrFail = \"FAILED\";\n            messageLabel = \"due to a fatal error condition\";\n            break;\n        case ResultWas::DidntThrowException:\n            colour = Colour::Error;\n            passOrFail = \"FAILED\";\n            messageLabel = \"because no exception was thrown where one was expected\";\n            break;\n        case ResultWas::Info:\n            messageLabel = \"info\";\n            break;\n        case ResultWas::Warning:\n            messageLabel = \"warning\";\n            break;\n        case ResultWas::ExplicitFailure:\n            passOrFail = \"FAILED\";\n            colour = Colour::Error;\n            if (_stats.infoMessages.size() == 1)\n                messageLabel = \"explicitly with message\";\n            if (_stats.infoMessages.size() > 1)\n                messageLabel = \"explicitly with messages\";\n            break;\n            // These cases are here to prevent compiler warnings\n        case ResultWas::Unknown:\n        case ResultWas::FailureBit:\n        case ResultWas::Exception:\n            passOrFail = \"** internal error **\";\n            colour = Colour::Error;\n            break;\n        }\n    }\n\n    void print() const {\n        printSourceInfo();\n        if (stats.totals.assertions.total() > 0) {\n            printResultType();\n            printOriginalExpression();\n            printReconstructedExpression();\n        } else {\n            stream << '\\n';\n        }\n        printMessage();\n    }\n\nprivate:\n    void printResultType() const {\n        if (!passOrFail.empty()) {\n            Colour colourGuard(colour);\n            stream << passOrFail << \":\\n\";\n        }\n    }\n    void printOriginalExpression() const {\n        if (result.hasExpression()) {\n            Colour colourGuard(Colour::OriginalExpression);\n            stream << \"  \";\n            stream << result.getExpressionInMacro();\n            stream << '\\n';\n        }\n    }\n    void printReconstructedExpression() const {\n        if (result.hasExpandedExpression()) {\n            stream << \"with expansion:\\n\";\n            Colour colourGuard(Colour::ReconstructedExpression);\n            stream << Column(result.getExpandedExpression()).indent(2) << '\\n';\n        }\n    }\n    void printMessage() const {\n        if (!messageLabel.empty())\n            stream << messageLabel << ':' << '\\n';\n        for (auto const& msg : messages) {\n            // If this assertion is a warning ignore any INFO messages\n            if (printInfoMessages || msg.type != ResultWas::Info)\n                stream << Column(msg.message).indent(2) << '\\n';\n        }\n    }\n    void printSourceInfo() const {\n        Colour colourGuard(Colour::FileName);\n        stream << result.getSourceInfo() << \": \";\n    }\n\n    std::ostream& stream;\n    AssertionStats const& stats;\n    AssertionResult const& result;\n    Colour::Code colour;\n    std::string passOrFail;\n    std::string messageLabel;\n    std::string message;\n    std::vector<MessageInfo> messages;\n    bool printInfoMessages;\n};\n\nstd::size_t makeRatio(std::size_t number, std::size_t total) {\n    std::size_t ratio = total > 0 ? CATCH_CONFIG_CONSOLE_WIDTH * number / total : 0;\n    return (ratio == 0 && number > 0) ? 1 : ratio;\n}\n\nstd::size_t& findMax(std::size_t& i, std::size_t& j, std::size_t& k) {\n    if (i > j && i > k)\n        return i;\n    else if (j > k)\n        return j;\n    else\n        return k;\n}\n\nstruct ColumnInfo {\n    enum Justification { Left, Right };\n    std::string name;\n    int width;\n    Justification justification;\n};\nstruct ColumnBreak {};\nstruct RowBreak {};\n\nclass Duration {\n    enum class Unit {\n        Auto,\n        Nanoseconds,\n        Microseconds,\n        Milliseconds,\n        Seconds,\n        Minutes\n    };\n    static const uint64_t s_nanosecondsInAMicrosecond = 1000;\n    static const uint64_t s_nanosecondsInAMillisecond = 1000 * s_nanosecondsInAMicrosecond;\n    static const uint64_t s_nanosecondsInASecond = 1000 * s_nanosecondsInAMillisecond;\n    static const uint64_t s_nanosecondsInAMinute = 60 * s_nanosecondsInASecond;\n\n    double m_inNanoseconds;\n    Unit m_units;\n\npublic:\n    explicit Duration(double inNanoseconds, Unit units = Unit::Auto)\n        : m_inNanoseconds(inNanoseconds),\n        m_units(units) {\n        if (m_units == Unit::Auto) {\n            if (m_inNanoseconds < s_nanosecondsInAMicrosecond)\n                m_units = Unit::Nanoseconds;\n            else if (m_inNanoseconds < s_nanosecondsInAMillisecond)\n                m_units = Unit::Microseconds;\n            else if (m_inNanoseconds < s_nanosecondsInASecond)\n                m_units = Unit::Milliseconds;\n            else if (m_inNanoseconds < s_nanosecondsInAMinute)\n                m_units = Unit::Seconds;\n            else\n                m_units = Unit::Minutes;\n        }\n\n    }\n\n    auto value() const -> double {\n        switch (m_units) {\n        case Unit::Microseconds:\n            return m_inNanoseconds / static_cast<double>(s_nanosecondsInAMicrosecond);\n        case Unit::Milliseconds:\n            return m_inNanoseconds / static_cast<double>(s_nanosecondsInAMillisecond);\n        case Unit::Seconds:\n            return m_inNanoseconds / static_cast<double>(s_nanosecondsInASecond);\n        case Unit::Minutes:\n            return m_inNanoseconds / static_cast<double>(s_nanosecondsInAMinute);\n        default:\n            return m_inNanoseconds;\n        }\n    }\n    auto unitsAsString() const -> std::string {\n        switch (m_units) {\n        case Unit::Nanoseconds:\n            return \"ns\";\n        case Unit::Microseconds:\n            return \"us\";\n        case Unit::Milliseconds:\n            return \"ms\";\n        case Unit::Seconds:\n            return \"s\";\n        case Unit::Minutes:\n            return \"m\";\n        default:\n            return \"** internal error **\";\n        }\n\n    }\n    friend auto operator << (std::ostream& os, Duration const& duration) -> std::ostream& {\n        return os << duration.value() << ' ' << duration.unitsAsString();\n    }\n};\n} // end anon namespace\n\nclass TablePrinter {\n    std::ostream& m_os;\n    std::vector<ColumnInfo> m_columnInfos;\n    std::ostringstream m_oss;\n    int m_currentColumn = -1;\n    bool m_isOpen = false;\n\npublic:\n    TablePrinter( std::ostream& os, std::vector<ColumnInfo> columnInfos )\n    :   m_os( os ),\n        m_columnInfos( std::move( columnInfos ) ) {}\n\n    auto columnInfos() const -> std::vector<ColumnInfo> const& {\n        return m_columnInfos;\n    }\n\n    void open() {\n        if (!m_isOpen) {\n            m_isOpen = true;\n            *this << RowBreak();\n\n\t\t\tColumns headerCols;\n\t\t\tSpacer spacer(2);\n\t\t\tfor (auto const& info : m_columnInfos) {\n\t\t\t\theaderCols += Column(info.name).width(static_cast<std::size_t>(info.width - 2));\n\t\t\t\theaderCols += spacer;\n\t\t\t}\n\t\t\tm_os << headerCols << '\\n';\n\n            m_os << Catch::getLineOfChars<'-'>() << '\\n';\n        }\n    }\n    void close() {\n        if (m_isOpen) {\n            *this << RowBreak();\n            m_os << std::endl;\n            m_isOpen = false;\n        }\n    }\n\n    template<typename T>\n    friend TablePrinter& operator << (TablePrinter& tp, T const& value) {\n        tp.m_oss << value;\n        return tp;\n    }\n\n    friend TablePrinter& operator << (TablePrinter& tp, ColumnBreak) {\n        auto colStr = tp.m_oss.str();\n        const auto strSize = colStr.size();\n        tp.m_oss.str(\"\");\n        tp.open();\n        if (tp.m_currentColumn == static_cast<int>(tp.m_columnInfos.size() - 1)) {\n            tp.m_currentColumn = -1;\n            tp.m_os << '\\n';\n        }\n        tp.m_currentColumn++;\n\n        auto colInfo = tp.m_columnInfos[tp.m_currentColumn];\n        auto padding = (strSize + 1 < static_cast<std::size_t>(colInfo.width))\n            ? std::string(colInfo.width - (strSize + 1), ' ')\n            : std::string();\n        if (colInfo.justification == ColumnInfo::Left)\n            tp.m_os << colStr << padding << ' ';\n        else\n            tp.m_os << padding << colStr << ' ';\n        return tp;\n    }\n\n    friend TablePrinter& operator << (TablePrinter& tp, RowBreak) {\n        if (tp.m_currentColumn > 0) {\n            tp.m_os << '\\n';\n            tp.m_currentColumn = -1;\n        }\n        return tp;\n    }\n};\n\nConsoleReporter::ConsoleReporter(ReporterConfig const& config)\n    : StreamingReporterBase(config),\n    m_tablePrinter(new TablePrinter(config.stream(),\n        [&config]() -> std::vector<ColumnInfo> {\n        if (config.fullConfig()->benchmarkNoAnalysis())\n        {\n            return{\n                { \"benchmark name\", CATCH_CONFIG_CONSOLE_WIDTH - 43, ColumnInfo::Left },\n                { \"     samples\", 14, ColumnInfo::Right },\n                { \"  iterations\", 14, ColumnInfo::Right },\n                { \"        mean\", 14, ColumnInfo::Right }\n            };\n        }\n        else\n        {\n            return{\n                { \"benchmark name\", CATCH_CONFIG_CONSOLE_WIDTH - 43, ColumnInfo::Left },\n                { \"samples      mean       std dev\", 14, ColumnInfo::Right },\n                { \"iterations   low mean   low std dev\", 14, ColumnInfo::Right },\n                { \"estimated    high mean  high std dev\", 14, ColumnInfo::Right }\n            };\n        }\n    }())) {}\nConsoleReporter::~ConsoleReporter() = default;\n\nstd::string ConsoleReporter::getDescription() {\n    return \"Reports test results as plain lines of text\";\n}\n\nvoid ConsoleReporter::noMatchingTestCases(std::string const& spec) {\n    stream << \"No test cases matched '\" << spec << '\\'' << std::endl;\n}\n\nvoid ConsoleReporter::reportInvalidArguments(std::string const&arg){\n    stream << \"Invalid Filter: \" << arg << std::endl;\n}\n\nvoid ConsoleReporter::assertionStarting(AssertionInfo const&) {}\n\nbool ConsoleReporter::assertionEnded(AssertionStats const& _assertionStats) {\n    AssertionResult const& result = _assertionStats.assertionResult;\n\n    bool includeResults = m_config->includeSuccessfulResults() || !result.isOk();\n\n    // Drop out if result was successful but we're not printing them.\n    if (!includeResults && result.getResultType() != ResultWas::Warning)\n        return false;\n\n    lazyPrint();\n\n    ConsoleAssertionPrinter printer(stream, _assertionStats, includeResults);\n    printer.print();\n    stream << std::endl;\n    return true;\n}\n\nvoid ConsoleReporter::sectionStarting(SectionInfo const& _sectionInfo) {\n    m_tablePrinter->close();\n    m_headerPrinted = false;\n    StreamingReporterBase::sectionStarting(_sectionInfo);\n}\nvoid ConsoleReporter::sectionEnded(SectionStats const& _sectionStats) {\n    m_tablePrinter->close();\n    if (_sectionStats.missingAssertions) {\n        lazyPrint();\n        Colour colour(Colour::ResultError);\n        if (m_sectionStack.size() > 1)\n            stream << \"\\nNo assertions in section\";\n        else\n            stream << \"\\nNo assertions in test case\";\n        stream << \" '\" << _sectionStats.sectionInfo.name << \"'\\n\" << std::endl;\n    }\n    double dur = _sectionStats.durationInSeconds;\n    if (shouldShowDuration(*m_config, dur)) {\n        stream << getFormattedDuration(dur) << \" s: \" << _sectionStats.sectionInfo.name << std::endl;\n    }\n    if (m_headerPrinted) {\n        m_headerPrinted = false;\n    }\n    StreamingReporterBase::sectionEnded(_sectionStats);\n}\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\nvoid ConsoleReporter::benchmarkPreparing(std::string const& name) {\n\tlazyPrintWithoutClosingBenchmarkTable();\n\n\tauto nameCol = Column(name).width(static_cast<std::size_t>(m_tablePrinter->columnInfos()[0].width - 2));\n\n\tbool firstLine = true;\n\tfor (auto line : nameCol) {\n\t\tif (!firstLine)\n\t\t\t(*m_tablePrinter) << ColumnBreak() << ColumnBreak() << ColumnBreak();\n\t\telse\n\t\t\tfirstLine = false;\n\n\t\t(*m_tablePrinter) << line << ColumnBreak();\n\t}\n}\n\nvoid ConsoleReporter::benchmarkStarting(BenchmarkInfo const& info) {\n    (*m_tablePrinter) << info.samples << ColumnBreak()\n        << info.iterations << ColumnBreak();\n    if (!m_config->benchmarkNoAnalysis())\n        (*m_tablePrinter) << Duration(info.estimatedDuration) << ColumnBreak();\n}\nvoid ConsoleReporter::benchmarkEnded(BenchmarkStats<> const& stats) {\n    if (m_config->benchmarkNoAnalysis())\n    {\n        (*m_tablePrinter) << Duration(stats.mean.point.count()) << ColumnBreak();\n    }\n    else\n    {\n        (*m_tablePrinter) << ColumnBreak()\n            << Duration(stats.mean.point.count()) << ColumnBreak()\n            << Duration(stats.mean.lower_bound.count()) << ColumnBreak()\n            << Duration(stats.mean.upper_bound.count()) << ColumnBreak() << ColumnBreak()\n            << Duration(stats.standardDeviation.point.count()) << ColumnBreak()\n            << Duration(stats.standardDeviation.lower_bound.count()) << ColumnBreak()\n            << Duration(stats.standardDeviation.upper_bound.count()) << ColumnBreak() << ColumnBreak() << ColumnBreak() << ColumnBreak() << ColumnBreak();\n    }\n}\n\nvoid ConsoleReporter::benchmarkFailed(std::string const& error) {\n\tColour colour(Colour::Red);\n    (*m_tablePrinter)\n        << \"Benchmark failed (\" << error << ')'\n        << ColumnBreak() << RowBreak();\n}\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n\nvoid ConsoleReporter::testCaseEnded(TestCaseStats const& _testCaseStats) {\n    m_tablePrinter->close();\n    StreamingReporterBase::testCaseEnded(_testCaseStats);\n    m_headerPrinted = false;\n}\nvoid ConsoleReporter::testGroupEnded(TestGroupStats const& _testGroupStats) {\n    if (currentGroupInfo.used) {\n        printSummaryDivider();\n        stream << \"Summary for group '\" << _testGroupStats.groupInfo.name << \"':\\n\";\n        printTotals(_testGroupStats.totals);\n        stream << '\\n' << std::endl;\n    }\n    StreamingReporterBase::testGroupEnded(_testGroupStats);\n}\nvoid ConsoleReporter::testRunEnded(TestRunStats const& _testRunStats) {\n    printTotalsDivider(_testRunStats.totals);\n    printTotals(_testRunStats.totals);\n    stream << std::endl;\n    StreamingReporterBase::testRunEnded(_testRunStats);\n}\nvoid ConsoleReporter::testRunStarting(TestRunInfo const& _testInfo) {\n    StreamingReporterBase::testRunStarting(_testInfo);\n    printTestFilters();\n}\n\nvoid ConsoleReporter::lazyPrint() {\n\n    m_tablePrinter->close();\n    lazyPrintWithoutClosingBenchmarkTable();\n}\n\nvoid ConsoleReporter::lazyPrintWithoutClosingBenchmarkTable() {\n\n    if (!currentTestRunInfo.used)\n        lazyPrintRunInfo();\n    if (!currentGroupInfo.used)\n        lazyPrintGroupInfo();\n\n    if (!m_headerPrinted) {\n        printTestCaseAndSectionHeader();\n        m_headerPrinted = true;\n    }\n}\nvoid ConsoleReporter::lazyPrintRunInfo() {\n    stream << '\\n' << getLineOfChars<'~'>() << '\\n';\n    Colour colour(Colour::SecondaryText);\n    stream << currentTestRunInfo->name\n        << \" is a Catch v\" << libraryVersion() << \" host application.\\n\"\n        << \"Run with -? for options\\n\\n\";\n\n    if (m_config->rngSeed() != 0)\n        stream << \"Randomness seeded to: \" << m_config->rngSeed() << \"\\n\\n\";\n\n    currentTestRunInfo.used = true;\n}\nvoid ConsoleReporter::lazyPrintGroupInfo() {\n    if (!currentGroupInfo->name.empty() && currentGroupInfo->groupsCounts > 1) {\n        printClosedHeader(\"Group: \" + currentGroupInfo->name);\n        currentGroupInfo.used = true;\n    }\n}\nvoid ConsoleReporter::printTestCaseAndSectionHeader() {\n    assert(!m_sectionStack.empty());\n    printOpenHeader(currentTestCaseInfo->name);\n\n    if (m_sectionStack.size() > 1) {\n        Colour colourGuard(Colour::Headers);\n\n        auto\n            it = m_sectionStack.begin() + 1, // Skip first section (test case)\n            itEnd = m_sectionStack.end();\n        for (; it != itEnd; ++it)\n            printHeaderString(it->name, 2);\n    }\n\n    SourceLineInfo lineInfo = m_sectionStack.back().lineInfo;\n\n    stream << getLineOfChars<'-'>() << '\\n';\n    Colour colourGuard(Colour::FileName);\n    stream << lineInfo << '\\n';\n    stream << getLineOfChars<'.'>() << '\\n' << std::endl;\n}\n\nvoid ConsoleReporter::printClosedHeader(std::string const& _name) {\n    printOpenHeader(_name);\n    stream << getLineOfChars<'.'>() << '\\n';\n}\nvoid ConsoleReporter::printOpenHeader(std::string const& _name) {\n    stream << getLineOfChars<'-'>() << '\\n';\n    {\n        Colour colourGuard(Colour::Headers);\n        printHeaderString(_name);\n    }\n}\n\n// if string has a : in first line will set indent to follow it on\n// subsequent lines\nvoid ConsoleReporter::printHeaderString(std::string const& _string, std::size_t indent) {\n    std::size_t i = _string.find(\": \");\n    if (i != std::string::npos)\n        i += 2;\n    else\n        i = 0;\n    stream << Column(_string).indent(indent + i).initialIndent(indent) << '\\n';\n}\n\nstruct SummaryColumn {\n\n    SummaryColumn( std::string _label, Colour::Code _colour )\n    :   label( std::move( _label ) ),\n        colour( _colour ) {}\n    SummaryColumn addRow( std::size_t count ) {\n        ReusableStringStream rss;\n        rss << count;\n        std::string row = rss.str();\n        for (auto& oldRow : rows) {\n            while (oldRow.size() < row.size())\n                oldRow = ' ' + oldRow;\n            while (oldRow.size() > row.size())\n                row = ' ' + row;\n        }\n        rows.push_back(row);\n        return *this;\n    }\n\n    std::string label;\n    Colour::Code colour;\n    std::vector<std::string> rows;\n\n};\n\nvoid ConsoleReporter::printTotals( Totals const& totals ) {\n    if (totals.testCases.total() == 0) {\n        stream << Colour(Colour::Warning) << \"No tests ran\\n\";\n    } else if (totals.assertions.total() > 0 && totals.testCases.allPassed()) {\n        stream << Colour(Colour::ResultSuccess) << \"All tests passed\";\n        stream << \" (\"\n            << pluralise(totals.assertions.passed, \"assertion\") << \" in \"\n            << pluralise(totals.testCases.passed, \"test case\") << ')'\n            << '\\n';\n    } else {\n\n        std::vector<SummaryColumn> columns;\n        columns.push_back(SummaryColumn(\"\", Colour::None)\n                          .addRow(totals.testCases.total())\n                          .addRow(totals.assertions.total()));\n        columns.push_back(SummaryColumn(\"passed\", Colour::Success)\n                          .addRow(totals.testCases.passed)\n                          .addRow(totals.assertions.passed));\n        columns.push_back(SummaryColumn(\"failed\", Colour::ResultError)\n                          .addRow(totals.testCases.failed)\n                          .addRow(totals.assertions.failed));\n        columns.push_back(SummaryColumn(\"failed as expected\", Colour::ResultExpectedFailure)\n                          .addRow(totals.testCases.failedButOk)\n                          .addRow(totals.assertions.failedButOk));\n\n        printSummaryRow(\"test cases\", columns, 0);\n        printSummaryRow(\"assertions\", columns, 1);\n    }\n}\nvoid ConsoleReporter::printSummaryRow(std::string const& label, std::vector<SummaryColumn> const& cols, std::size_t row) {\n    for (auto col : cols) {\n        std::string value = col.rows[row];\n        if (col.label.empty()) {\n            stream << label << \": \";\n            if (value != \"0\")\n                stream << value;\n            else\n                stream << Colour(Colour::Warning) << \"- none -\";\n        } else if (value != \"0\") {\n            stream << Colour(Colour::LightGrey) << \" | \";\n            stream << Colour(col.colour)\n                << value << ' ' << col.label;\n        }\n    }\n    stream << '\\n';\n}\n\nvoid ConsoleReporter::printTotalsDivider(Totals const& totals) {\n    if (totals.testCases.total() > 0) {\n        std::size_t failedRatio = makeRatio(totals.testCases.failed, totals.testCases.total());\n        std::size_t failedButOkRatio = makeRatio(totals.testCases.failedButOk, totals.testCases.total());\n        std::size_t passedRatio = makeRatio(totals.testCases.passed, totals.testCases.total());\n        while (failedRatio + failedButOkRatio + passedRatio < CATCH_CONFIG_CONSOLE_WIDTH - 1)\n            findMax(failedRatio, failedButOkRatio, passedRatio)++;\n        while (failedRatio + failedButOkRatio + passedRatio > CATCH_CONFIG_CONSOLE_WIDTH - 1)\n            findMax(failedRatio, failedButOkRatio, passedRatio)--;\n\n        stream << Colour(Colour::Error) << std::string(failedRatio, '=');\n        stream << Colour(Colour::ResultExpectedFailure) << std::string(failedButOkRatio, '=');\n        if (totals.testCases.allPassed())\n            stream << Colour(Colour::ResultSuccess) << std::string(passedRatio, '=');\n        else\n            stream << Colour(Colour::Success) << std::string(passedRatio, '=');\n    } else {\n        stream << Colour(Colour::Warning) << std::string(CATCH_CONFIG_CONSOLE_WIDTH - 1, '=');\n    }\n    stream << '\\n';\n}\nvoid ConsoleReporter::printSummaryDivider() {\n    stream << getLineOfChars<'-'>() << '\\n';\n}\n\nvoid ConsoleReporter::printTestFilters() {\n    if (m_config->testSpec().hasFilters()) {\n        Colour guard(Colour::BrightYellow);\n        stream << \"Filters: \" << serializeFilters(m_config->getTestsOrTags()) << '\\n';\n    }\n}\n\nCATCH_REGISTER_REPORTER(\"console\", ConsoleReporter)\n\n} // end namespace Catch\n\n#if defined(_MSC_VER)\n#pragma warning(pop)\n#endif\n\n#if defined(__clang__)\n#  pragma clang diagnostic pop\n#endif\n// end catch_reporter_console.cpp\n// start catch_reporter_junit.cpp\n\n#include <cassert>\n#include <sstream>\n#include <ctime>\n#include <algorithm>\n#include <iomanip>\n\nnamespace Catch {\n\n    namespace {\n        std::string getCurrentTimestamp() {\n            // Beware, this is not reentrant because of backward compatibility issues\n            // Also, UTC only, again because of backward compatibility (%z is C++11)\n            time_t rawtime;\n            std::time(&rawtime);\n            auto const timeStampSize = sizeof(\"2017-01-16T17:06:45Z\");\n\n#ifdef _MSC_VER\n            std::tm timeInfo = {};\n            gmtime_s(&timeInfo, &rawtime);\n#else\n            std::tm* timeInfo;\n            timeInfo = std::gmtime(&rawtime);\n#endif\n\n            char timeStamp[timeStampSize];\n            const char * const fmt = \"%Y-%m-%dT%H:%M:%SZ\";\n\n#ifdef _MSC_VER\n            std::strftime(timeStamp, timeStampSize, fmt, &timeInfo);\n#else\n            std::strftime(timeStamp, timeStampSize, fmt, timeInfo);\n#endif\n            return std::string(timeStamp, timeStampSize-1);\n        }\n\n        std::string fileNameTag(const std::vector<std::string> &tags) {\n            auto it = std::find_if(begin(tags),\n                                   end(tags),\n                                   [] (std::string const& tag) {return tag.front() == '#'; });\n            if (it != tags.end())\n                return it->substr(1);\n            return std::string();\n        }\n\n        // Formats the duration in seconds to 3 decimal places.\n        // This is done because some genius defined Maven Surefire schema\n        // in a way that only accepts 3 decimal places, and tools like\n        // Jenkins use that schema for validation JUnit reporter output.\n        std::string formatDuration( double seconds ) {\n            ReusableStringStream rss;\n            rss << std::fixed << std::setprecision( 3 ) << seconds;\n            return rss.str();\n        }\n\n    } // anonymous namespace\n\n    JunitReporter::JunitReporter( ReporterConfig const& _config )\n        :   CumulativeReporterBase( _config ),\n            xml( _config.stream() )\n        {\n            m_reporterPrefs.shouldRedirectStdOut = true;\n            m_reporterPrefs.shouldReportAllAssertions = true;\n        }\n\n    JunitReporter::~JunitReporter() {}\n\n    std::string JunitReporter::getDescription() {\n        return \"Reports test results in an XML format that looks like Ant's junitreport target\";\n    }\n\n    void JunitReporter::noMatchingTestCases( std::string const& /*spec*/ ) {}\n\n    void JunitReporter::testRunStarting( TestRunInfo const& runInfo )  {\n        CumulativeReporterBase::testRunStarting( runInfo );\n        xml.startElement( \"testsuites\" );\n    }\n\n    void JunitReporter::testGroupStarting( GroupInfo const& groupInfo ) {\n        suiteTimer.start();\n        stdOutForSuite.clear();\n        stdErrForSuite.clear();\n        unexpectedExceptions = 0;\n        CumulativeReporterBase::testGroupStarting( groupInfo );\n    }\n\n    void JunitReporter::testCaseStarting( TestCaseInfo const& testCaseInfo ) {\n        m_okToFail = testCaseInfo.okToFail();\n    }\n\n    bool JunitReporter::assertionEnded( AssertionStats const& assertionStats ) {\n        if( assertionStats.assertionResult.getResultType() == ResultWas::ThrewException && !m_okToFail )\n            unexpectedExceptions++;\n        return CumulativeReporterBase::assertionEnded( assertionStats );\n    }\n\n    void JunitReporter::testCaseEnded( TestCaseStats const& testCaseStats ) {\n        stdOutForSuite += testCaseStats.stdOut;\n        stdErrForSuite += testCaseStats.stdErr;\n        CumulativeReporterBase::testCaseEnded( testCaseStats );\n    }\n\n    void JunitReporter::testGroupEnded( TestGroupStats const& testGroupStats ) {\n        double suiteTime = suiteTimer.getElapsedSeconds();\n        CumulativeReporterBase::testGroupEnded( testGroupStats );\n        writeGroup( *m_testGroups.back(), suiteTime );\n    }\n\n    void JunitReporter::testRunEndedCumulative() {\n        xml.endElement();\n    }\n\n    void JunitReporter::writeGroup( TestGroupNode const& groupNode, double suiteTime ) {\n        XmlWriter::ScopedElement e = xml.scopedElement( \"testsuite\" );\n\n        TestGroupStats const& stats = groupNode.value;\n        xml.writeAttribute( \"name\", stats.groupInfo.name );\n        xml.writeAttribute( \"errors\", unexpectedExceptions );\n        xml.writeAttribute( \"failures\", stats.totals.assertions.failed-unexpectedExceptions );\n        xml.writeAttribute( \"tests\", stats.totals.assertions.total() );\n        xml.writeAttribute( \"hostname\", \"tbd\" ); // !TBD\n        if( m_config->showDurations() == ShowDurations::Never )\n            xml.writeAttribute( \"time\", \"\" );\n        else\n            xml.writeAttribute( \"time\", formatDuration( suiteTime ) );\n        xml.writeAttribute( \"timestamp\", getCurrentTimestamp() );\n\n        // Write properties if there are any\n        if (m_config->hasTestFilters() || m_config->rngSeed() != 0) {\n            auto properties = xml.scopedElement(\"properties\");\n            if (m_config->hasTestFilters()) {\n                xml.scopedElement(\"property\")\n                    .writeAttribute(\"name\", \"filters\")\n                    .writeAttribute(\"value\", serializeFilters(m_config->getTestsOrTags()));\n            }\n            if (m_config->rngSeed() != 0) {\n                xml.scopedElement(\"property\")\n                    .writeAttribute(\"name\", \"random-seed\")\n                    .writeAttribute(\"value\", m_config->rngSeed());\n            }\n        }\n\n        // Write test cases\n        for( auto const& child : groupNode.children )\n            writeTestCase( *child );\n\n        xml.scopedElement( \"system-out\" ).writeText( trim( stdOutForSuite ), XmlFormatting::Newline );\n        xml.scopedElement( \"system-err\" ).writeText( trim( stdErrForSuite ), XmlFormatting::Newline );\n    }\n\n    void JunitReporter::writeTestCase( TestCaseNode const& testCaseNode ) {\n        TestCaseStats const& stats = testCaseNode.value;\n\n        // All test cases have exactly one section - which represents the\n        // test case itself. That section may have 0-n nested sections\n        assert( testCaseNode.children.size() == 1 );\n        SectionNode const& rootSection = *testCaseNode.children.front();\n\n        std::string className = stats.testInfo.className;\n\n        if( className.empty() ) {\n            className = fileNameTag(stats.testInfo.tags);\n            if ( className.empty() )\n                className = \"global\";\n        }\n\n        if ( !m_config->name().empty() )\n            className = m_config->name() + \".\" + className;\n\n        writeSection( className, \"\", rootSection, stats.testInfo.okToFail() );\n    }\n\n    void JunitReporter::writeSection( std::string const& className,\n                                      std::string const& rootName,\n                                      SectionNode const& sectionNode,\n                                      bool testOkToFail) {\n        std::string name = trim( sectionNode.stats.sectionInfo.name );\n        if( !rootName.empty() )\n            name = rootName + '/' + name;\n\n        if( !sectionNode.assertions.empty() ||\n            !sectionNode.stdOut.empty() ||\n            !sectionNode.stdErr.empty() ) {\n            XmlWriter::ScopedElement e = xml.scopedElement( \"testcase\" );\n            if( className.empty() ) {\n                xml.writeAttribute( \"classname\", name );\n                xml.writeAttribute( \"name\", \"root\" );\n            }\n            else {\n                xml.writeAttribute( \"classname\", className );\n                xml.writeAttribute( \"name\", name );\n            }\n            xml.writeAttribute( \"time\", formatDuration( sectionNode.stats.durationInSeconds ) );\n            // This is not ideal, but it should be enough to mimic gtest's\n            // junit output.\n            // Ideally the JUnit reporter would also handle `skipTest`\n            // events and write those out appropriately.\n            xml.writeAttribute( \"status\", \"run\" );\n\n            if (sectionNode.stats.assertions.failedButOk) {\n                xml.scopedElement(\"skipped\")\n                    .writeAttribute(\"message\", \"TEST_CASE tagged with !mayfail\");\n            }\n\n            writeAssertions( sectionNode );\n\n            if( !sectionNode.stdOut.empty() )\n                xml.scopedElement( \"system-out\" ).writeText( trim( sectionNode.stdOut ), XmlFormatting::Newline );\n            if( !sectionNode.stdErr.empty() )\n                xml.scopedElement( \"system-err\" ).writeText( trim( sectionNode.stdErr ), XmlFormatting::Newline );\n        }\n        for( auto const& childNode : sectionNode.childSections )\n            if( className.empty() )\n                writeSection( name, \"\", *childNode, testOkToFail );\n            else\n                writeSection( className, name, *childNode, testOkToFail );\n    }\n\n    void JunitReporter::writeAssertions( SectionNode const& sectionNode ) {\n        for( auto const& assertion : sectionNode.assertions )\n            writeAssertion( assertion );\n    }\n\n    void JunitReporter::writeAssertion( AssertionStats const& stats ) {\n        AssertionResult const& result = stats.assertionResult;\n        if( !result.isOk() ) {\n            std::string elementName;\n            switch( result.getResultType() ) {\n                case ResultWas::ThrewException:\n                case ResultWas::FatalErrorCondition:\n                    elementName = \"error\";\n                    break;\n                case ResultWas::ExplicitFailure:\n                case ResultWas::ExpressionFailed:\n                case ResultWas::DidntThrowException:\n                    elementName = \"failure\";\n                    break;\n\n                // We should never see these here:\n                case ResultWas::Info:\n                case ResultWas::Warning:\n                case ResultWas::Ok:\n                case ResultWas::Unknown:\n                case ResultWas::FailureBit:\n                case ResultWas::Exception:\n                    elementName = \"internalError\";\n                    break;\n            }\n\n            XmlWriter::ScopedElement e = xml.scopedElement( elementName );\n\n            xml.writeAttribute( \"message\", result.getExpression() );\n            xml.writeAttribute( \"type\", result.getTestMacroName() );\n\n            ReusableStringStream rss;\n            if (stats.totals.assertions.total() > 0) {\n                rss << \"FAILED\" << \":\\n\";\n                if (result.hasExpression()) {\n                    rss << \"  \";\n                    rss << result.getExpressionInMacro();\n                    rss << '\\n';\n                }\n                if (result.hasExpandedExpression()) {\n                    rss << \"with expansion:\\n\";\n                    rss << Column(result.getExpandedExpression()).indent(2) << '\\n';\n                }\n            } else {\n                rss << '\\n';\n            }\n\n            if( !result.getMessage().empty() )\n                rss << result.getMessage() << '\\n';\n            for( auto const& msg : stats.infoMessages )\n                if( msg.type == ResultWas::Info )\n                    rss << msg.message << '\\n';\n\n            rss << \"at \" << result.getSourceInfo();\n            xml.writeText( rss.str(), XmlFormatting::Newline );\n        }\n    }\n\n    CATCH_REGISTER_REPORTER( \"junit\", JunitReporter )\n\n} // end namespace Catch\n// end catch_reporter_junit.cpp\n// start catch_reporter_listening.cpp\n\n#include <cassert>\n\nnamespace Catch {\n\n    ListeningReporter::ListeningReporter() {\n        // We will assume that listeners will always want all assertions\n        m_preferences.shouldReportAllAssertions = true;\n    }\n\n    void ListeningReporter::addListener( IStreamingReporterPtr&& listener ) {\n        m_listeners.push_back( std::move( listener ) );\n    }\n\n    void ListeningReporter::addReporter(IStreamingReporterPtr&& reporter) {\n        assert(!m_reporter && \"Listening reporter can wrap only 1 real reporter\");\n        m_reporter = std::move( reporter );\n        m_preferences.shouldRedirectStdOut = m_reporter->getPreferences().shouldRedirectStdOut;\n    }\n\n    ReporterPreferences ListeningReporter::getPreferences() const {\n        return m_preferences;\n    }\n\n    std::set<Verbosity> ListeningReporter::getSupportedVerbosities() {\n        return std::set<Verbosity>{ };\n    }\n\n    void ListeningReporter::noMatchingTestCases( std::string const& spec ) {\n        for ( auto const& listener : m_listeners ) {\n            listener->noMatchingTestCases( spec );\n        }\n        m_reporter->noMatchingTestCases( spec );\n    }\n\n    void ListeningReporter::reportInvalidArguments(std::string const&arg){\n        for ( auto const& listener : m_listeners ) {\n            listener->reportInvalidArguments( arg );\n        }\n        m_reporter->reportInvalidArguments( arg );\n    }\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n    void ListeningReporter::benchmarkPreparing( std::string const& name ) {\n\t\tfor (auto const& listener : m_listeners) {\n\t\t\tlistener->benchmarkPreparing(name);\n\t\t}\n\t\tm_reporter->benchmarkPreparing(name);\n\t}\n    void ListeningReporter::benchmarkStarting( BenchmarkInfo const& benchmarkInfo ) {\n        for ( auto const& listener : m_listeners ) {\n            listener->benchmarkStarting( benchmarkInfo );\n        }\n        m_reporter->benchmarkStarting( benchmarkInfo );\n    }\n    void ListeningReporter::benchmarkEnded( BenchmarkStats<> const& benchmarkStats ) {\n        for ( auto const& listener : m_listeners ) {\n            listener->benchmarkEnded( benchmarkStats );\n        }\n        m_reporter->benchmarkEnded( benchmarkStats );\n    }\n\n\tvoid ListeningReporter::benchmarkFailed( std::string const& error ) {\n\t\tfor (auto const& listener : m_listeners) {\n\t\t\tlistener->benchmarkFailed(error);\n\t\t}\n\t\tm_reporter->benchmarkFailed(error);\n\t}\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n\n    void ListeningReporter::testRunStarting( TestRunInfo const& testRunInfo ) {\n        for ( auto const& listener : m_listeners ) {\n            listener->testRunStarting( testRunInfo );\n        }\n        m_reporter->testRunStarting( testRunInfo );\n    }\n\n    void ListeningReporter::testGroupStarting( GroupInfo const& groupInfo ) {\n        for ( auto const& listener : m_listeners ) {\n            listener->testGroupStarting( groupInfo );\n        }\n        m_reporter->testGroupStarting( groupInfo );\n    }\n\n    void ListeningReporter::testCaseStarting( TestCaseInfo const& testInfo ) {\n        for ( auto const& listener : m_listeners ) {\n            listener->testCaseStarting( testInfo );\n        }\n        m_reporter->testCaseStarting( testInfo );\n    }\n\n    void ListeningReporter::sectionStarting( SectionInfo const& sectionInfo ) {\n        for ( auto const& listener : m_listeners ) {\n            listener->sectionStarting( sectionInfo );\n        }\n        m_reporter->sectionStarting( sectionInfo );\n    }\n\n    void ListeningReporter::assertionStarting( AssertionInfo const& assertionInfo ) {\n        for ( auto const& listener : m_listeners ) {\n            listener->assertionStarting( assertionInfo );\n        }\n        m_reporter->assertionStarting( assertionInfo );\n    }\n\n    // The return value indicates if the messages buffer should be cleared:\n    bool ListeningReporter::assertionEnded( AssertionStats const& assertionStats ) {\n        for( auto const& listener : m_listeners ) {\n            static_cast<void>( listener->assertionEnded( assertionStats ) );\n        }\n        return m_reporter->assertionEnded( assertionStats );\n    }\n\n    void ListeningReporter::sectionEnded( SectionStats const& sectionStats ) {\n        for ( auto const& listener : m_listeners ) {\n            listener->sectionEnded( sectionStats );\n        }\n        m_reporter->sectionEnded( sectionStats );\n    }\n\n    void ListeningReporter::testCaseEnded( TestCaseStats const& testCaseStats ) {\n        for ( auto const& listener : m_listeners ) {\n            listener->testCaseEnded( testCaseStats );\n        }\n        m_reporter->testCaseEnded( testCaseStats );\n    }\n\n    void ListeningReporter::testGroupEnded( TestGroupStats const& testGroupStats ) {\n        for ( auto const& listener : m_listeners ) {\n            listener->testGroupEnded( testGroupStats );\n        }\n        m_reporter->testGroupEnded( testGroupStats );\n    }\n\n    void ListeningReporter::testRunEnded( TestRunStats const& testRunStats ) {\n        for ( auto const& listener : m_listeners ) {\n            listener->testRunEnded( testRunStats );\n        }\n        m_reporter->testRunEnded( testRunStats );\n    }\n\n    void ListeningReporter::skipTest( TestCaseInfo const& testInfo ) {\n        for ( auto const& listener : m_listeners ) {\n            listener->skipTest( testInfo );\n        }\n        m_reporter->skipTest( testInfo );\n    }\n\n    bool ListeningReporter::isMulti() const {\n        return true;\n    }\n\n} // end namespace Catch\n// end catch_reporter_listening.cpp\n// start catch_reporter_xml.cpp\n\n#if defined(_MSC_VER)\n#pragma warning(push)\n#pragma warning(disable:4061) // Not all labels are EXPLICITLY handled in switch\n                              // Note that 4062 (not all labels are handled\n                              // and default is missing) is enabled\n#endif\n\nnamespace Catch {\n    XmlReporter::XmlReporter( ReporterConfig const& _config )\n    :   StreamingReporterBase( _config ),\n        m_xml(_config.stream())\n    {\n        m_reporterPrefs.shouldRedirectStdOut = true;\n        m_reporterPrefs.shouldReportAllAssertions = true;\n    }\n\n    XmlReporter::~XmlReporter() = default;\n\n    std::string XmlReporter::getDescription() {\n        return \"Reports test results as an XML document\";\n    }\n\n    std::string XmlReporter::getStylesheetRef() const {\n        return std::string();\n    }\n\n    void XmlReporter::writeSourceInfo( SourceLineInfo const& sourceInfo ) {\n        m_xml\n            .writeAttribute( \"filename\", sourceInfo.file )\n            .writeAttribute( \"line\", sourceInfo.line );\n    }\n\n    void XmlReporter::noMatchingTestCases( std::string const& s ) {\n        StreamingReporterBase::noMatchingTestCases( s );\n    }\n\n    void XmlReporter::testRunStarting( TestRunInfo const& testInfo ) {\n        StreamingReporterBase::testRunStarting( testInfo );\n        std::string stylesheetRef = getStylesheetRef();\n        if( !stylesheetRef.empty() )\n            m_xml.writeStylesheetRef( stylesheetRef );\n        m_xml.startElement( \"Catch\" );\n        if( !m_config->name().empty() )\n            m_xml.writeAttribute( \"name\", m_config->name() );\n        if (m_config->testSpec().hasFilters())\n            m_xml.writeAttribute( \"filters\", serializeFilters( m_config->getTestsOrTags() ) );\n        if( m_config->rngSeed() != 0 )\n            m_xml.scopedElement( \"Randomness\" )\n                .writeAttribute( \"seed\", m_config->rngSeed() );\n    }\n\n    void XmlReporter::testGroupStarting( GroupInfo const& groupInfo ) {\n        StreamingReporterBase::testGroupStarting( groupInfo );\n        m_xml.startElement( \"Group\" )\n            .writeAttribute( \"name\", groupInfo.name );\n    }\n\n    void XmlReporter::testCaseStarting( TestCaseInfo const& testInfo ) {\n        StreamingReporterBase::testCaseStarting(testInfo);\n        m_xml.startElement( \"TestCase\" )\n            .writeAttribute( \"name\", trim( testInfo.name ) )\n            .writeAttribute( \"description\", testInfo.description )\n            .writeAttribute( \"tags\", testInfo.tagsAsString() );\n\n        writeSourceInfo( testInfo.lineInfo );\n\n        if ( m_config->showDurations() == ShowDurations::Always )\n            m_testCaseTimer.start();\n        m_xml.ensureTagClosed();\n    }\n\n    void XmlReporter::sectionStarting( SectionInfo const& sectionInfo ) {\n        StreamingReporterBase::sectionStarting( sectionInfo );\n        if( m_sectionDepth++ > 0 ) {\n            m_xml.startElement( \"Section\" )\n                .writeAttribute( \"name\", trim( sectionInfo.name ) );\n            writeSourceInfo( sectionInfo.lineInfo );\n            m_xml.ensureTagClosed();\n        }\n    }\n\n    void XmlReporter::assertionStarting( AssertionInfo const& ) { }\n\n    bool XmlReporter::assertionEnded( AssertionStats const& assertionStats ) {\n\n        AssertionResult const& result = assertionStats.assertionResult;\n\n        bool includeResults = m_config->includeSuccessfulResults() || !result.isOk();\n\n        if( includeResults || result.getResultType() == ResultWas::Warning ) {\n            // Print any info messages in <Info> tags.\n            for( auto const& msg : assertionStats.infoMessages ) {\n                if( msg.type == ResultWas::Info && includeResults ) {\n                    m_xml.scopedElement( \"Info\" )\n                            .writeText( msg.message );\n                } else if ( msg.type == ResultWas::Warning ) {\n                    m_xml.scopedElement( \"Warning\" )\n                            .writeText( msg.message );\n                }\n            }\n        }\n\n        // Drop out if result was successful but we're not printing them.\n        if( !includeResults && result.getResultType() != ResultWas::Warning )\n            return true;\n\n        // Print the expression if there is one.\n        if( result.hasExpression() ) {\n            m_xml.startElement( \"Expression\" )\n                .writeAttribute( \"success\", result.succeeded() )\n                .writeAttribute( \"type\", result.getTestMacroName() );\n\n            writeSourceInfo( result.getSourceInfo() );\n\n            m_xml.scopedElement( \"Original\" )\n                .writeText( result.getExpression() );\n            m_xml.scopedElement( \"Expanded\" )\n                .writeText( result.getExpandedExpression() );\n        }\n\n        // And... Print a result applicable to each result type.\n        switch( result.getResultType() ) {\n            case ResultWas::ThrewException:\n                m_xml.startElement( \"Exception\" );\n                writeSourceInfo( result.getSourceInfo() );\n                m_xml.writeText( result.getMessage() );\n                m_xml.endElement();\n                break;\n            case ResultWas::FatalErrorCondition:\n                m_xml.startElement( \"FatalErrorCondition\" );\n                writeSourceInfo( result.getSourceInfo() );\n                m_xml.writeText( result.getMessage() );\n                m_xml.endElement();\n                break;\n            case ResultWas::Info:\n                m_xml.scopedElement( \"Info\" )\n                    .writeText( result.getMessage() );\n                break;\n            case ResultWas::Warning:\n                // Warning will already have been written\n                break;\n            case ResultWas::ExplicitFailure:\n                m_xml.startElement( \"Failure\" );\n                writeSourceInfo( result.getSourceInfo() );\n                m_xml.writeText( result.getMessage() );\n                m_xml.endElement();\n                break;\n            default:\n                break;\n        }\n\n        if( result.hasExpression() )\n            m_xml.endElement();\n\n        return true;\n    }\n\n    void XmlReporter::sectionEnded( SectionStats const& sectionStats ) {\n        StreamingReporterBase::sectionEnded( sectionStats );\n        if( --m_sectionDepth > 0 ) {\n            XmlWriter::ScopedElement e = m_xml.scopedElement( \"OverallResults\" );\n            e.writeAttribute( \"successes\", sectionStats.assertions.passed );\n            e.writeAttribute( \"failures\", sectionStats.assertions.failed );\n            e.writeAttribute( \"expectedFailures\", sectionStats.assertions.failedButOk );\n\n            if ( m_config->showDurations() == ShowDurations::Always )\n                e.writeAttribute( \"durationInSeconds\", sectionStats.durationInSeconds );\n\n            m_xml.endElement();\n        }\n    }\n\n    void XmlReporter::testCaseEnded( TestCaseStats const& testCaseStats ) {\n        StreamingReporterBase::testCaseEnded( testCaseStats );\n        XmlWriter::ScopedElement e = m_xml.scopedElement( \"OverallResult\" );\n        e.writeAttribute( \"success\", testCaseStats.totals.assertions.allOk() );\n\n        if ( m_config->showDurations() == ShowDurations::Always )\n            e.writeAttribute( \"durationInSeconds\", m_testCaseTimer.getElapsedSeconds() );\n\n        if( !testCaseStats.stdOut.empty() )\n            m_xml.scopedElement( \"StdOut\" ).writeText( trim( testCaseStats.stdOut ), XmlFormatting::Newline );\n        if( !testCaseStats.stdErr.empty() )\n            m_xml.scopedElement( \"StdErr\" ).writeText( trim( testCaseStats.stdErr ), XmlFormatting::Newline );\n\n        m_xml.endElement();\n    }\n\n    void XmlReporter::testGroupEnded( TestGroupStats const& testGroupStats ) {\n        StreamingReporterBase::testGroupEnded( testGroupStats );\n        // TODO: Check testGroupStats.aborting and act accordingly.\n        m_xml.scopedElement( \"OverallResults\" )\n            .writeAttribute( \"successes\", testGroupStats.totals.assertions.passed )\n            .writeAttribute( \"failures\", testGroupStats.totals.assertions.failed )\n            .writeAttribute( \"expectedFailures\", testGroupStats.totals.assertions.failedButOk );\n        m_xml.scopedElement( \"OverallResultsCases\")\n            .writeAttribute( \"successes\", testGroupStats.totals.testCases.passed )\n            .writeAttribute( \"failures\", testGroupStats.totals.testCases.failed )\n            .writeAttribute( \"expectedFailures\", testGroupStats.totals.testCases.failedButOk );\n        m_xml.endElement();\n    }\n\n    void XmlReporter::testRunEnded( TestRunStats const& testRunStats ) {\n        StreamingReporterBase::testRunEnded( testRunStats );\n        m_xml.scopedElement( \"OverallResults\" )\n            .writeAttribute( \"successes\", testRunStats.totals.assertions.passed )\n            .writeAttribute( \"failures\", testRunStats.totals.assertions.failed )\n            .writeAttribute( \"expectedFailures\", testRunStats.totals.assertions.failedButOk );\n        m_xml.scopedElement( \"OverallResultsCases\")\n            .writeAttribute( \"successes\", testRunStats.totals.testCases.passed )\n            .writeAttribute( \"failures\", testRunStats.totals.testCases.failed )\n            .writeAttribute( \"expectedFailures\", testRunStats.totals.testCases.failedButOk );\n        m_xml.endElement();\n    }\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n    void XmlReporter::benchmarkPreparing(std::string const& name) {\n        m_xml.startElement(\"BenchmarkResults\")\n            .writeAttribute(\"name\", name);\n    }\n\n    void XmlReporter::benchmarkStarting(BenchmarkInfo const &info) {\n        m_xml.writeAttribute(\"samples\", info.samples)\n            .writeAttribute(\"resamples\", info.resamples)\n            .writeAttribute(\"iterations\", info.iterations)\n            .writeAttribute(\"clockResolution\", info.clockResolution)\n            .writeAttribute(\"estimatedDuration\", info.estimatedDuration)\n            .writeComment(\"All values in nano seconds\");\n    }\n\n    void XmlReporter::benchmarkEnded(BenchmarkStats<> const& benchmarkStats) {\n        m_xml.startElement(\"mean\")\n            .writeAttribute(\"value\", benchmarkStats.mean.point.count())\n            .writeAttribute(\"lowerBound\", benchmarkStats.mean.lower_bound.count())\n            .writeAttribute(\"upperBound\", benchmarkStats.mean.upper_bound.count())\n            .writeAttribute(\"ci\", benchmarkStats.mean.confidence_interval);\n        m_xml.endElement();\n        m_xml.startElement(\"standardDeviation\")\n            .writeAttribute(\"value\", benchmarkStats.standardDeviation.point.count())\n            .writeAttribute(\"lowerBound\", benchmarkStats.standardDeviation.lower_bound.count())\n            .writeAttribute(\"upperBound\", benchmarkStats.standardDeviation.upper_bound.count())\n            .writeAttribute(\"ci\", benchmarkStats.standardDeviation.confidence_interval);\n        m_xml.endElement();\n        m_xml.startElement(\"outliers\")\n            .writeAttribute(\"variance\", benchmarkStats.outlierVariance)\n            .writeAttribute(\"lowMild\", benchmarkStats.outliers.low_mild)\n            .writeAttribute(\"lowSevere\", benchmarkStats.outliers.low_severe)\n            .writeAttribute(\"highMild\", benchmarkStats.outliers.high_mild)\n            .writeAttribute(\"highSevere\", benchmarkStats.outliers.high_severe);\n        m_xml.endElement();\n        m_xml.endElement();\n    }\n\n    void XmlReporter::benchmarkFailed(std::string const &error) {\n        m_xml.scopedElement(\"failed\").\n            writeAttribute(\"message\", error);\n        m_xml.endElement();\n    }\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n\n    CATCH_REGISTER_REPORTER( \"xml\", XmlReporter )\n\n} // end namespace Catch\n\n#if defined(_MSC_VER)\n#pragma warning(pop)\n#endif\n// end catch_reporter_xml.cpp\n\nnamespace Catch {\n    LeakDetector leakDetector;\n}\n\n#ifdef __clang__\n#pragma clang diagnostic pop\n#endif\n\n// end catch_impl.hpp\n#endif\n\n#ifdef CATCH_CONFIG_MAIN\n// start catch_default_main.hpp\n\n#ifndef __OBJC__\n\n#ifndef CATCH_INTERNAL_CDECL\n#ifdef _MSC_VER\n#define CATCH_INTERNAL_CDECL __cdecl\n#else\n#define CATCH_INTERNAL_CDECL\n#endif\n#endif\n\n#if defined(CATCH_CONFIG_WCHAR) && defined(CATCH_PLATFORM_WINDOWS) && defined(_UNICODE) && !defined(DO_NOT_USE_WMAIN)\n// Standard C/C++ Win32 Unicode wmain entry point\nextern \"C\" int CATCH_INTERNAL_CDECL wmain (int argc, wchar_t * argv[], wchar_t * []) {\n#else\n// Standard C/C++ main entry point\nint CATCH_INTERNAL_CDECL main (int argc, char * argv[]) {\n#endif\n\n    return Catch::Session().run( argc, argv );\n}\n\n#else // __OBJC__\n\n// Objective-C entry point\nint main (int argc, char * const argv[]) {\n#if !CATCH_ARC_ENABLED\n    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];\n#endif\n\n    Catch::registerTestMethods();\n    int result = Catch::Session().run( argc, (char**)argv );\n\n#if !CATCH_ARC_ENABLED\n    [pool drain];\n#endif\n\n    return result;\n}\n\n#endif // __OBJC__\n\n// end catch_default_main.hpp\n#endif\n\n#if !defined(CATCH_CONFIG_IMPL_ONLY)\n\n#ifdef CLARA_CONFIG_MAIN_NOT_DEFINED\n#  undef CLARA_CONFIG_MAIN\n#endif\n\n#if !defined(CATCH_CONFIG_DISABLE)\n//////\n// If this config identifier is defined then all CATCH macros are prefixed with CATCH_\n#ifdef CATCH_CONFIG_PREFIX_ALL\n\n#define CATCH_REQUIRE( ... ) INTERNAL_CATCH_TEST( \"CATCH_REQUIRE\", Catch::ResultDisposition::Normal, __VA_ARGS__ )\n#define CATCH_REQUIRE_FALSE( ... ) INTERNAL_CATCH_TEST( \"CATCH_REQUIRE_FALSE\", Catch::ResultDisposition::Normal | Catch::ResultDisposition::FalseTest, __VA_ARGS__ )\n\n#define CATCH_REQUIRE_THROWS( ... ) INTERNAL_CATCH_THROWS( \"CATCH_REQUIRE_THROWS\", Catch::ResultDisposition::Normal, __VA_ARGS__ )\n#define CATCH_REQUIRE_THROWS_AS( expr, exceptionType ) INTERNAL_CATCH_THROWS_AS( \"CATCH_REQUIRE_THROWS_AS\", exceptionType, Catch::ResultDisposition::Normal, expr )\n#define CATCH_REQUIRE_THROWS_WITH( expr, matcher ) INTERNAL_CATCH_THROWS_STR_MATCHES( \"CATCH_REQUIRE_THROWS_WITH\", Catch::ResultDisposition::Normal, matcher, expr )\n#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)\n#define CATCH_REQUIRE_THROWS_MATCHES( expr, exceptionType, matcher ) INTERNAL_CATCH_THROWS_MATCHES( \"CATCH_REQUIRE_THROWS_MATCHES\", exceptionType, Catch::ResultDisposition::Normal, matcher, expr )\n#endif// CATCH_CONFIG_DISABLE_MATCHERS\n#define CATCH_REQUIRE_NOTHROW( ... ) INTERNAL_CATCH_NO_THROW( \"CATCH_REQUIRE_NOTHROW\", Catch::ResultDisposition::Normal, __VA_ARGS__ )\n\n#define CATCH_CHECK( ... ) INTERNAL_CATCH_TEST( \"CATCH_CHECK\", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )\n#define CATCH_CHECK_FALSE( ... ) INTERNAL_CATCH_TEST( \"CATCH_CHECK_FALSE\", Catch::ResultDisposition::ContinueOnFailure | Catch::ResultDisposition::FalseTest, __VA_ARGS__ )\n#define CATCH_CHECKED_IF( ... ) INTERNAL_CATCH_IF( \"CATCH_CHECKED_IF\", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )\n#define CATCH_CHECKED_ELSE( ... ) INTERNAL_CATCH_ELSE( \"CATCH_CHECKED_ELSE\", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )\n#define CATCH_CHECK_NOFAIL( ... ) INTERNAL_CATCH_TEST( \"CATCH_CHECK_NOFAIL\", Catch::ResultDisposition::ContinueOnFailure | Catch::ResultDisposition::SuppressFail, __VA_ARGS__ )\n\n#define CATCH_CHECK_THROWS( ... )  INTERNAL_CATCH_THROWS( \"CATCH_CHECK_THROWS\", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )\n#define CATCH_CHECK_THROWS_AS( expr, exceptionType ) INTERNAL_CATCH_THROWS_AS( \"CATCH_CHECK_THROWS_AS\", exceptionType, Catch::ResultDisposition::ContinueOnFailure, expr )\n#define CATCH_CHECK_THROWS_WITH( expr, matcher ) INTERNAL_CATCH_THROWS_STR_MATCHES( \"CATCH_CHECK_THROWS_WITH\", Catch::ResultDisposition::ContinueOnFailure, matcher, expr )\n#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)\n#define CATCH_CHECK_THROWS_MATCHES( expr, exceptionType, matcher ) INTERNAL_CATCH_THROWS_MATCHES( \"CATCH_CHECK_THROWS_MATCHES\", exceptionType, Catch::ResultDisposition::ContinueOnFailure, matcher, expr )\n#endif // CATCH_CONFIG_DISABLE_MATCHERS\n#define CATCH_CHECK_NOTHROW( ... ) INTERNAL_CATCH_NO_THROW( \"CATCH_CHECK_NOTHROW\", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )\n\n#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)\n#define CATCH_CHECK_THAT( arg, matcher ) INTERNAL_CHECK_THAT( \"CATCH_CHECK_THAT\", matcher, Catch::ResultDisposition::ContinueOnFailure, arg )\n\n#define CATCH_REQUIRE_THAT( arg, matcher ) INTERNAL_CHECK_THAT( \"CATCH_REQUIRE_THAT\", matcher, Catch::ResultDisposition::Normal, arg )\n#endif // CATCH_CONFIG_DISABLE_MATCHERS\n\n#define CATCH_INFO( msg ) INTERNAL_CATCH_INFO( \"CATCH_INFO\", msg )\n#define CATCH_UNSCOPED_INFO( msg ) INTERNAL_CATCH_UNSCOPED_INFO( \"CATCH_UNSCOPED_INFO\", msg )\n#define CATCH_WARN( msg ) INTERNAL_CATCH_MSG( \"CATCH_WARN\", Catch::ResultWas::Warning, Catch::ResultDisposition::ContinueOnFailure, msg )\n#define CATCH_CAPTURE( ... ) INTERNAL_CATCH_CAPTURE( INTERNAL_CATCH_UNIQUE_NAME(capturer), \"CATCH_CAPTURE\",__VA_ARGS__ )\n\n#define CATCH_TEST_CASE( ... ) INTERNAL_CATCH_TESTCASE( __VA_ARGS__ )\n#define CATCH_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEST_CASE_METHOD( className, __VA_ARGS__ )\n#define CATCH_METHOD_AS_TEST_CASE( method, ... ) INTERNAL_CATCH_METHOD_AS_TEST_CASE( method, __VA_ARGS__ )\n#define CATCH_REGISTER_TEST_CASE( Function, ... ) INTERNAL_CATCH_REGISTER_TESTCASE( Function, __VA_ARGS__ )\n#define CATCH_SECTION( ... ) INTERNAL_CATCH_SECTION( __VA_ARGS__ )\n#define CATCH_DYNAMIC_SECTION( ... ) INTERNAL_CATCH_DYNAMIC_SECTION( __VA_ARGS__ )\n#define CATCH_FAIL( ... ) INTERNAL_CATCH_MSG( \"CATCH_FAIL\", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::Normal, __VA_ARGS__ )\n#define CATCH_FAIL_CHECK( ... ) INTERNAL_CATCH_MSG( \"CATCH_FAIL_CHECK\", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )\n#define CATCH_SUCCEED( ... ) INTERNAL_CATCH_MSG( \"CATCH_SUCCEED\", Catch::ResultWas::Ok, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )\n\n#define CATCH_ANON_TEST_CASE() INTERNAL_CATCH_TESTCASE()\n\n#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n#define CATCH_TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ )\n#define CATCH_TEMPLATE_TEST_CASE_SIG( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG( __VA_ARGS__ )\n#define CATCH_TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )\n#define CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( className, __VA_ARGS__ )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE( __VA_ARGS__ )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG( ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG( __VA_ARGS__ )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, __VA_ARGS__ )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, __VA_ARGS__ )\n#else\n#define CATCH_TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ ) )\n#define CATCH_TEMPLATE_TEST_CASE_SIG( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG( __VA_ARGS__ ) )\n#define CATCH_TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ ) )\n#define CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( className, __VA_ARGS__ ) )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE( __VA_ARGS__ ) )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG( __VA_ARGS__ ) )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, __VA_ARGS__ ) )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, __VA_ARGS__ ) )\n#endif\n\n#if !defined(CATCH_CONFIG_RUNTIME_STATIC_REQUIRE)\n#define CATCH_STATIC_REQUIRE( ... )       static_assert(   __VA_ARGS__ ,      #__VA_ARGS__ );     CATCH_SUCCEED( #__VA_ARGS__ )\n#define CATCH_STATIC_REQUIRE_FALSE( ... ) static_assert( !(__VA_ARGS__), \"!(\" #__VA_ARGS__ \")\" ); CATCH_SUCCEED( #__VA_ARGS__ )\n#else\n#define CATCH_STATIC_REQUIRE( ... )       CATCH_REQUIRE( __VA_ARGS__ )\n#define CATCH_STATIC_REQUIRE_FALSE( ... ) CATCH_REQUIRE_FALSE( __VA_ARGS__ )\n#endif\n\n// \"BDD-style\" convenience wrappers\n#define CATCH_SCENARIO( ... ) CATCH_TEST_CASE( \"Scenario: \" __VA_ARGS__ )\n#define CATCH_SCENARIO_METHOD( className, ... ) INTERNAL_CATCH_TEST_CASE_METHOD( className, \"Scenario: \" __VA_ARGS__ )\n#define CATCH_GIVEN( desc )     INTERNAL_CATCH_DYNAMIC_SECTION( \"    Given: \" << desc )\n#define CATCH_AND_GIVEN( desc ) INTERNAL_CATCH_DYNAMIC_SECTION( \"And given: \" << desc )\n#define CATCH_WHEN( desc )      INTERNAL_CATCH_DYNAMIC_SECTION( \"     When: \" << desc )\n#define CATCH_AND_WHEN( desc )  INTERNAL_CATCH_DYNAMIC_SECTION( \" And when: \" << desc )\n#define CATCH_THEN( desc )      INTERNAL_CATCH_DYNAMIC_SECTION( \"     Then: \" << desc )\n#define CATCH_AND_THEN( desc )  INTERNAL_CATCH_DYNAMIC_SECTION( \"      And: \" << desc )\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n#define CATCH_BENCHMARK(...) \\\n    INTERNAL_CATCH_BENCHMARK(INTERNAL_CATCH_UNIQUE_NAME(C_A_T_C_H_B_E_N_C_H_), INTERNAL_CATCH_GET_1_ARG(__VA_ARGS__,,), INTERNAL_CATCH_GET_2_ARG(__VA_ARGS__,,))\n#define CATCH_BENCHMARK_ADVANCED(name) \\\n    INTERNAL_CATCH_BENCHMARK_ADVANCED(INTERNAL_CATCH_UNIQUE_NAME(C_A_T_C_H_B_E_N_C_H_), name)\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n\n// If CATCH_CONFIG_PREFIX_ALL is not defined then the CATCH_ prefix is not required\n#else\n\n#define REQUIRE( ... ) INTERNAL_CATCH_TEST( \"REQUIRE\", Catch::ResultDisposition::Normal, __VA_ARGS__  )\n#define REQUIRE_FALSE( ... ) INTERNAL_CATCH_TEST( \"REQUIRE_FALSE\", Catch::ResultDisposition::Normal | Catch::ResultDisposition::FalseTest, __VA_ARGS__ )\n\n#define REQUIRE_THROWS( ... ) INTERNAL_CATCH_THROWS( \"REQUIRE_THROWS\", Catch::ResultDisposition::Normal, __VA_ARGS__ )\n#define REQUIRE_THROWS_AS( expr, exceptionType ) INTERNAL_CATCH_THROWS_AS( \"REQUIRE_THROWS_AS\", exceptionType, Catch::ResultDisposition::Normal, expr )\n#define REQUIRE_THROWS_WITH( expr, matcher ) INTERNAL_CATCH_THROWS_STR_MATCHES( \"REQUIRE_THROWS_WITH\", Catch::ResultDisposition::Normal, matcher, expr )\n#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)\n#define REQUIRE_THROWS_MATCHES( expr, exceptionType, matcher ) INTERNAL_CATCH_THROWS_MATCHES( \"REQUIRE_THROWS_MATCHES\", exceptionType, Catch::ResultDisposition::Normal, matcher, expr )\n#endif // CATCH_CONFIG_DISABLE_MATCHERS\n#define REQUIRE_NOTHROW( ... ) INTERNAL_CATCH_NO_THROW( \"REQUIRE_NOTHROW\", Catch::ResultDisposition::Normal, __VA_ARGS__ )\n\n#define CHECK( ... ) INTERNAL_CATCH_TEST( \"CHECK\", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )\n#define CHECK_FALSE( ... ) INTERNAL_CATCH_TEST( \"CHECK_FALSE\", Catch::ResultDisposition::ContinueOnFailure | Catch::ResultDisposition::FalseTest, __VA_ARGS__ )\n#define CHECKED_IF( ... ) INTERNAL_CATCH_IF( \"CHECKED_IF\", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )\n#define CHECKED_ELSE( ... ) INTERNAL_CATCH_ELSE( \"CHECKED_ELSE\", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )\n#define CHECK_NOFAIL( ... ) INTERNAL_CATCH_TEST( \"CHECK_NOFAIL\", Catch::ResultDisposition::ContinueOnFailure | Catch::ResultDisposition::SuppressFail, __VA_ARGS__ )\n\n#define CHECK_THROWS( ... )  INTERNAL_CATCH_THROWS( \"CHECK_THROWS\", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )\n#define CHECK_THROWS_AS( expr, exceptionType ) INTERNAL_CATCH_THROWS_AS( \"CHECK_THROWS_AS\", exceptionType, Catch::ResultDisposition::ContinueOnFailure, expr )\n#define CHECK_THROWS_WITH( expr, matcher ) INTERNAL_CATCH_THROWS_STR_MATCHES( \"CHECK_THROWS_WITH\", Catch::ResultDisposition::ContinueOnFailure, matcher, expr )\n#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)\n#define CHECK_THROWS_MATCHES( expr, exceptionType, matcher ) INTERNAL_CATCH_THROWS_MATCHES( \"CHECK_THROWS_MATCHES\", exceptionType, Catch::ResultDisposition::ContinueOnFailure, matcher, expr )\n#endif // CATCH_CONFIG_DISABLE_MATCHERS\n#define CHECK_NOTHROW( ... ) INTERNAL_CATCH_NO_THROW( \"CHECK_NOTHROW\", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )\n\n#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)\n#define CHECK_THAT( arg, matcher ) INTERNAL_CHECK_THAT( \"CHECK_THAT\", matcher, Catch::ResultDisposition::ContinueOnFailure, arg )\n\n#define REQUIRE_THAT( arg, matcher ) INTERNAL_CHECK_THAT( \"REQUIRE_THAT\", matcher, Catch::ResultDisposition::Normal, arg )\n#endif // CATCH_CONFIG_DISABLE_MATCHERS\n\n#define INFO( msg ) INTERNAL_CATCH_INFO( \"INFO\", msg )\n#define UNSCOPED_INFO( msg ) INTERNAL_CATCH_UNSCOPED_INFO( \"UNSCOPED_INFO\", msg )\n#define WARN( msg ) INTERNAL_CATCH_MSG( \"WARN\", Catch::ResultWas::Warning, Catch::ResultDisposition::ContinueOnFailure, msg )\n#define CAPTURE( ... ) INTERNAL_CATCH_CAPTURE( INTERNAL_CATCH_UNIQUE_NAME(capturer), \"CAPTURE\",__VA_ARGS__ )\n\n#define TEST_CASE( ... ) INTERNAL_CATCH_TESTCASE( __VA_ARGS__ )\n#define TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEST_CASE_METHOD( className, __VA_ARGS__ )\n#define METHOD_AS_TEST_CASE( method, ... ) INTERNAL_CATCH_METHOD_AS_TEST_CASE( method, __VA_ARGS__ )\n#define REGISTER_TEST_CASE( Function, ... ) INTERNAL_CATCH_REGISTER_TESTCASE( Function, __VA_ARGS__ )\n#define SECTION( ... ) INTERNAL_CATCH_SECTION( __VA_ARGS__ )\n#define DYNAMIC_SECTION( ... ) INTERNAL_CATCH_DYNAMIC_SECTION( __VA_ARGS__ )\n#define FAIL( ... ) INTERNAL_CATCH_MSG( \"FAIL\", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::Normal, __VA_ARGS__ )\n#define FAIL_CHECK( ... ) INTERNAL_CATCH_MSG( \"FAIL_CHECK\", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )\n#define SUCCEED( ... ) INTERNAL_CATCH_MSG( \"SUCCEED\", Catch::ResultWas::Ok, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )\n#define ANON_TEST_CASE() INTERNAL_CATCH_TESTCASE()\n\n#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n#define TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ )\n#define TEMPLATE_TEST_CASE_SIG( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG( __VA_ARGS__ )\n#define TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )\n#define TEMPLATE_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( className, __VA_ARGS__ )\n#define TEMPLATE_PRODUCT_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE( __VA_ARGS__ )\n#define TEMPLATE_PRODUCT_TEST_CASE_SIG( ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG( __VA_ARGS__ )\n#define TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, __VA_ARGS__ )\n#define TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, __VA_ARGS__ )\n#define TEMPLATE_LIST_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE(__VA_ARGS__)\n#define TEMPLATE_LIST_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_METHOD( className, __VA_ARGS__ )\n#else\n#define TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ ) )\n#define TEMPLATE_TEST_CASE_SIG( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG( __VA_ARGS__ ) )\n#define TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ ) )\n#define TEMPLATE_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( className, __VA_ARGS__ ) )\n#define TEMPLATE_PRODUCT_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE( __VA_ARGS__ ) )\n#define TEMPLATE_PRODUCT_TEST_CASE_SIG( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG( __VA_ARGS__ ) )\n#define TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, __VA_ARGS__ ) )\n#define TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, __VA_ARGS__ ) )\n#define TEMPLATE_LIST_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE( __VA_ARGS__ ) )\n#define TEMPLATE_LIST_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_METHOD( className, __VA_ARGS__ ) )\n#endif\n\n#if !defined(CATCH_CONFIG_RUNTIME_STATIC_REQUIRE)\n#define STATIC_REQUIRE( ... )       static_assert(   __VA_ARGS__,  #__VA_ARGS__ ); SUCCEED( #__VA_ARGS__ )\n#define STATIC_REQUIRE_FALSE( ... ) static_assert( !(__VA_ARGS__), \"!(\" #__VA_ARGS__ \")\" ); SUCCEED( \"!(\" #__VA_ARGS__ \")\" )\n#else\n#define STATIC_REQUIRE( ... )       REQUIRE( __VA_ARGS__ )\n#define STATIC_REQUIRE_FALSE( ... ) REQUIRE_FALSE( __VA_ARGS__ )\n#endif\n\n#endif\n\n#define CATCH_TRANSLATE_EXCEPTION( signature ) INTERNAL_CATCH_TRANSLATE_EXCEPTION( signature )\n\n// \"BDD-style\" convenience wrappers\n#define SCENARIO( ... ) TEST_CASE( \"Scenario: \" __VA_ARGS__ )\n#define SCENARIO_METHOD( className, ... ) INTERNAL_CATCH_TEST_CASE_METHOD( className, \"Scenario: \" __VA_ARGS__ )\n\n#define GIVEN( desc )     INTERNAL_CATCH_DYNAMIC_SECTION( \"    Given: \" << desc )\n#define AND_GIVEN( desc ) INTERNAL_CATCH_DYNAMIC_SECTION( \"And given: \" << desc )\n#define WHEN( desc )      INTERNAL_CATCH_DYNAMIC_SECTION( \"     When: \" << desc )\n#define AND_WHEN( desc )  INTERNAL_CATCH_DYNAMIC_SECTION( \" And when: \" << desc )\n#define THEN( desc )      INTERNAL_CATCH_DYNAMIC_SECTION( \"     Then: \" << desc )\n#define AND_THEN( desc )  INTERNAL_CATCH_DYNAMIC_SECTION( \"      And: \" << desc )\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n#define BENCHMARK(...) \\\n    INTERNAL_CATCH_BENCHMARK(INTERNAL_CATCH_UNIQUE_NAME(C_A_T_C_H_B_E_N_C_H_), INTERNAL_CATCH_GET_1_ARG(__VA_ARGS__,,), INTERNAL_CATCH_GET_2_ARG(__VA_ARGS__,,))\n#define BENCHMARK_ADVANCED(name) \\\n    INTERNAL_CATCH_BENCHMARK_ADVANCED(INTERNAL_CATCH_UNIQUE_NAME(C_A_T_C_H_B_E_N_C_H_), name)\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n\nusing Catch::Detail::Approx;\n\n#else // CATCH_CONFIG_DISABLE\n\n//////\n// If this config identifier is defined then all CATCH macros are prefixed with CATCH_\n#ifdef CATCH_CONFIG_PREFIX_ALL\n\n#define CATCH_REQUIRE( ... )        (void)(0)\n#define CATCH_REQUIRE_FALSE( ... )  (void)(0)\n\n#define CATCH_REQUIRE_THROWS( ... ) (void)(0)\n#define CATCH_REQUIRE_THROWS_AS( expr, exceptionType ) (void)(0)\n#define CATCH_REQUIRE_THROWS_WITH( expr, matcher )     (void)(0)\n#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)\n#define CATCH_REQUIRE_THROWS_MATCHES( expr, exceptionType, matcher ) (void)(0)\n#endif// CATCH_CONFIG_DISABLE_MATCHERS\n#define CATCH_REQUIRE_NOTHROW( ... ) (void)(0)\n\n#define CATCH_CHECK( ... )         (void)(0)\n#define CATCH_CHECK_FALSE( ... )   (void)(0)\n#define CATCH_CHECKED_IF( ... )    if (__VA_ARGS__)\n#define CATCH_CHECKED_ELSE( ... )  if (!(__VA_ARGS__))\n#define CATCH_CHECK_NOFAIL( ... )  (void)(0)\n\n#define CATCH_CHECK_THROWS( ... )  (void)(0)\n#define CATCH_CHECK_THROWS_AS( expr, exceptionType ) (void)(0)\n#define CATCH_CHECK_THROWS_WITH( expr, matcher )     (void)(0)\n#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)\n#define CATCH_CHECK_THROWS_MATCHES( expr, exceptionType, matcher ) (void)(0)\n#endif // CATCH_CONFIG_DISABLE_MATCHERS\n#define CATCH_CHECK_NOTHROW( ... ) (void)(0)\n\n#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)\n#define CATCH_CHECK_THAT( arg, matcher )   (void)(0)\n\n#define CATCH_REQUIRE_THAT( arg, matcher ) (void)(0)\n#endif // CATCH_CONFIG_DISABLE_MATCHERS\n\n#define CATCH_INFO( msg )          (void)(0)\n#define CATCH_UNSCOPED_INFO( msg ) (void)(0)\n#define CATCH_WARN( msg )          (void)(0)\n#define CATCH_CAPTURE( msg )       (void)(0)\n\n#define CATCH_TEST_CASE( ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ ))\n#define CATCH_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ ))\n#define CATCH_METHOD_AS_TEST_CASE( method, ... )\n#define CATCH_REGISTER_TEST_CASE( Function, ... ) (void)(0)\n#define CATCH_SECTION( ... )\n#define CATCH_DYNAMIC_SECTION( ... )\n#define CATCH_FAIL( ... ) (void)(0)\n#define CATCH_FAIL_CHECK( ... ) (void)(0)\n#define CATCH_SUCCEED( ... ) (void)(0)\n\n#define CATCH_ANON_TEST_CASE() INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ ))\n\n#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n#define CATCH_TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(__VA_ARGS__)\n#define CATCH_TEMPLATE_TEST_CASE_SIG( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG_NO_REGISTRATION(__VA_ARGS__)\n#define CATCH_TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION(className, __VA_ARGS__)\n#define CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG_NO_REGISTRATION(className, __VA_ARGS__ )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE( ... ) CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG( ... ) CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) CATCH_TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, ... ) CATCH_TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )\n#else\n#define CATCH_TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(__VA_ARGS__) )\n#define CATCH_TEMPLATE_TEST_CASE_SIG( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG_NO_REGISTRATION(__VA_ARGS__) )\n#define CATCH_TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION(className, __VA_ARGS__ ) )\n#define CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG_NO_REGISTRATION(className, __VA_ARGS__ ) )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE( ... ) CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG( ... ) CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) CATCH_TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, ... ) CATCH_TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )\n#endif\n\n// \"BDD-style\" convenience wrappers\n#define CATCH_SCENARIO( ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ ))\n#define CATCH_SCENARIO_METHOD( className, ... ) INTERNAL_CATCH_TESTCASE_METHOD_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ ), className )\n#define CATCH_GIVEN( desc )\n#define CATCH_AND_GIVEN( desc )\n#define CATCH_WHEN( desc )\n#define CATCH_AND_WHEN( desc )\n#define CATCH_THEN( desc )\n#define CATCH_AND_THEN( desc )\n\n#define CATCH_STATIC_REQUIRE( ... )       (void)(0)\n#define CATCH_STATIC_REQUIRE_FALSE( ... ) (void)(0)\n\n// If CATCH_CONFIG_PREFIX_ALL is not defined then the CATCH_ prefix is not required\n#else\n\n#define REQUIRE( ... )       (void)(0)\n#define REQUIRE_FALSE( ... ) (void)(0)\n\n#define REQUIRE_THROWS( ... ) (void)(0)\n#define REQUIRE_THROWS_AS( expr, exceptionType ) (void)(0)\n#define REQUIRE_THROWS_WITH( expr, matcher ) (void)(0)\n#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)\n#define REQUIRE_THROWS_MATCHES( expr, exceptionType, matcher ) (void)(0)\n#endif // CATCH_CONFIG_DISABLE_MATCHERS\n#define REQUIRE_NOTHROW( ... ) (void)(0)\n\n#define CHECK( ... ) (void)(0)\n#define CHECK_FALSE( ... ) (void)(0)\n#define CHECKED_IF( ... ) if (__VA_ARGS__)\n#define CHECKED_ELSE( ... ) if (!(__VA_ARGS__))\n#define CHECK_NOFAIL( ... ) (void)(0)\n\n#define CHECK_THROWS( ... )  (void)(0)\n#define CHECK_THROWS_AS( expr, exceptionType ) (void)(0)\n#define CHECK_THROWS_WITH( expr, matcher ) (void)(0)\n#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)\n#define CHECK_THROWS_MATCHES( expr, exceptionType, matcher ) (void)(0)\n#endif // CATCH_CONFIG_DISABLE_MATCHERS\n#define CHECK_NOTHROW( ... ) (void)(0)\n\n#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)\n#define CHECK_THAT( arg, matcher ) (void)(0)\n\n#define REQUIRE_THAT( arg, matcher ) (void)(0)\n#endif // CATCH_CONFIG_DISABLE_MATCHERS\n\n#define INFO( msg ) (void)(0)\n#define UNSCOPED_INFO( msg ) (void)(0)\n#define WARN( msg ) (void)(0)\n#define CAPTURE( ... ) (void)(0)\n\n#define TEST_CASE( ... )  INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ ))\n#define TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ ))\n#define METHOD_AS_TEST_CASE( method, ... )\n#define REGISTER_TEST_CASE( Function, ... ) (void)(0)\n#define SECTION( ... )\n#define DYNAMIC_SECTION( ... )\n#define FAIL( ... ) (void)(0)\n#define FAIL_CHECK( ... ) (void)(0)\n#define SUCCEED( ... ) (void)(0)\n#define ANON_TEST_CASE() INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ ))\n\n#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n#define TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(__VA_ARGS__)\n#define TEMPLATE_TEST_CASE_SIG( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG_NO_REGISTRATION(__VA_ARGS__)\n#define TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION(className, __VA_ARGS__)\n#define TEMPLATE_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG_NO_REGISTRATION(className, __VA_ARGS__ )\n#define TEMPLATE_PRODUCT_TEST_CASE( ... ) TEMPLATE_TEST_CASE( __VA_ARGS__ )\n#define TEMPLATE_PRODUCT_TEST_CASE_SIG( ... ) TEMPLATE_TEST_CASE( __VA_ARGS__ )\n#define TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )\n#define TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, ... ) TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )\n#else\n#define TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(__VA_ARGS__) )\n#define TEMPLATE_TEST_CASE_SIG( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG_NO_REGISTRATION(__VA_ARGS__) )\n#define TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION(className, __VA_ARGS__ ) )\n#define TEMPLATE_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG_NO_REGISTRATION(className, __VA_ARGS__ ) )\n#define TEMPLATE_PRODUCT_TEST_CASE( ... ) TEMPLATE_TEST_CASE( __VA_ARGS__ )\n#define TEMPLATE_PRODUCT_TEST_CASE_SIG( ... ) TEMPLATE_TEST_CASE( __VA_ARGS__ )\n#define TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )\n#define TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, ... ) TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )\n#endif\n\n#define STATIC_REQUIRE( ... )       (void)(0)\n#define STATIC_REQUIRE_FALSE( ... ) (void)(0)\n\n#endif\n\n#define CATCH_TRANSLATE_EXCEPTION( signature ) INTERNAL_CATCH_TRANSLATE_EXCEPTION_NO_REG( INTERNAL_CATCH_UNIQUE_NAME( catch_internal_ExceptionTranslator ), signature )\n\n// \"BDD-style\" convenience wrappers\n#define SCENARIO( ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ ) )\n#define SCENARIO_METHOD( className, ... ) INTERNAL_CATCH_TESTCASE_METHOD_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ ), className )\n\n#define GIVEN( desc )\n#define AND_GIVEN( desc )\n#define WHEN( desc )\n#define AND_WHEN( desc )\n#define THEN( desc )\n#define AND_THEN( desc )\n\nusing Catch::Detail::Approx;\n\n#endif\n\n#endif // ! CATCH_CONFIG_IMPL_ONLY\n\n// start catch_reenable_warnings.h\n\n\n#ifdef __clang__\n#    ifdef __ICC // icpc defines the __clang__ macro\n#        pragma warning(pop)\n#    else\n#        pragma clang diagnostic pop\n#    endif\n#elif defined __GNUC__\n#    pragma GCC diagnostic pop\n#endif\n\n// end catch_reenable_warnings.h\n// end catch.hpp\n#endif // TWOBLUECUBES_SINGLE_INCLUDE_CATCH_HPP_INCLUDED\n\n"
  },
  {
    "path": "scintilla/test/unit/makefile",
    "content": "# Build all the unit tests using GNU make and either g++ or clang\r\n# Should be run using mingw32-make on Windows, not nmake\r\n# On Windows g++ is used, on macOS clang, and on Linux G++ is used by default\r\n# but clang can be used by defining CLANG when invoking make\r\n# clang works only with libc++, not libstdc++\r\n# Tested with clang 9 and g++ 9\r\n\r\nCXXSTD=c++17\r\n\r\nifndef windir\r\nifeq ($(shell uname),Darwin)\r\n# On macOS (detected with Darwin uname) always use clang as g++ is old version\r\nCLANG = 1\r\nUSELIBCPP = 1\r\nendif\r\nendif\r\n\r\nCXXFLAGS += $(OPTIMIZATION)\r\nCXXFLAGS += --std=$(CXXSTD)\r\n\r\nifdef CLANG\r\nCXX = clang++\r\nifdef USELIBCPP\r\n# macOS, use libc++ but don't have sanitizers\r\nCXXFLAGS += --stdlib=libc++\r\nelse\r\nifndef windir\r\n# Linux, have sanitizers\r\nSANITIZE = -fsanitize=address,undefined\r\nCXXFLAGS += $(SANITIZE)\r\nendif\r\nendif\r\nelse\r\nCXX = g++\r\nendif\r\n\r\nifdef windir\r\nDEL = del /q\r\nEXE = unitTest.exe\r\nelse\r\nDEL = rm -f\r\nEXE = unitTest\r\nendif\r\n\r\nvpath %.cxx ../../src\r\n\r\nINCLUDEDIRS = -I ../../include -I ../../src\r\n\r\nCPPFLAGS += $(INCLUDEDIRS)\r\nCXXFLAGS += -Wall -Wextra\r\n\r\n# Files in this directory containing tests\r\nTESTSRC=$(wildcard test*.cxx)\r\nTESTOBJ=$(TESTSRC:.cxx=.o)\r\n\r\n# Files being tested from scintilla/src directory\r\nTESTEDOBJ=\\\r\nCaseConvert.o \\\r\nCaseFolder.o \\\r\nCellBuffer.o \\\r\nChangeHistory.o \\\r\nCharacterCategoryMap.o \\\r\nCharClassify.o \\\r\nContractionState.o \\\r\nDecoration.o \\\r\nDocument.o \\\r\nGeometry.o \\\r\nPerLine.o \\\r\nRESearch.o \\\r\nRunStyles.o \\\r\nUndoHistory.o \\\r\nUniConversion.o \\\r\nUniqueString.o\r\n\r\nTESTS=$(EXE)\r\n\r\nall: $(TESTS)\r\n\r\ntest: $(TESTS)\r\n\t./$(EXE)\r\n\r\nclean:\r\n\t$(DEL) $(TESTS) *.o *.obj *.exe\r\n\r\n%.o: %.cxx\r\n\t$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@\r\n\r\n$(EXE): $(TESTOBJ) $(TESTEDOBJ) unitTest.o\r\n\t$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LINKFLAGS) $^ -o $@\r\n"
  },
  {
    "path": "scintilla/test/unit/test.mak",
    "content": "# Build all the unit tests with Microsoft Visual C++ using nmake\r\n# Tested with Visual C++ 2019\r\n\r\nDEL = del /q\r\nEXE = unitTest.exe\r\n\r\nINCLUDEDIRS = /I../../include /I../../src\r\n\r\nCXXFLAGS = /MP /EHsc /std:c++17 $(OPTIMIZATION) /nologo /D_HAS_AUTO_PTR_ETC=1 /wd 4805 $(INCLUDEDIRS)\r\n\r\n# Files in this directory containing tests\r\nTESTSRC=test*.cxx\r\n# Files being tested from scintilla/src directory\r\nTESTEDSRC=\\\r\n ../../src/CaseConvert.cxx \\\r\n ../../src/CaseFolder.cxx \\\r\n ../../src/CellBuffer.cxx \\\r\n ../../src/ChangeHistory.cxx \\\r\n ../../src/CharacterCategoryMap.cxx \\\r\n ../../src/CharClassify.cxx \\\r\n ../../src/ContractionState.cxx \\\r\n ../../src/Decoration.cxx \\\r\n ../../src/Document.cxx \\\r\n ../../src/Geometry.cxx \\\r\n ../../src/PerLine.cxx \\\r\n ../../src/RESearch.cxx \\\r\n ../../src/RunStyles.cxx \\\r\n ../../src/UndoHistory.cxx \\\r\n ../../src/UniConversion.cxx \\\r\n ../../src/UniqueString.cxx\r\n\r\nTESTS=$(EXE)\r\n\r\nall: $(TESTS)\r\n\r\ntest: $(TESTS)\r\n\t$(EXE)\r\n\r\nclean:\r\n\t$(DEL) $(TESTS) *.o *.obj *.exe\r\n\r\n$(EXE): $(TESTSRC) $(TESTEDSRC) $(@B).obj\r\n\t$(CXX) $(CXXFLAGS) /Fe$@ $**\r\n"
  },
  {
    "path": "scintilla/test/unit/testCellBuffer.cxx",
    "content": "/** @file testCellBuffer.cxx\r\n ** Unit Tests for Scintilla internal data structures\r\n **/\r\n\r\n#include <cstddef>\r\n#include <cassert>\r\n#include <cstring>\r\n#include <stdexcept>\r\n#include <string>\r\n#include <string_view>\r\n#include <vector>\r\n#include <optional>\r\n#include <algorithm>\r\n#include <memory>\r\n\r\n#include \"ScintillaTypes.h\"\r\n\r\n#include \"Debugging.h\"\r\n\r\n#include \"Position.h\"\r\n#include \"SplitVector.h\"\r\n#include \"Partitioning.h\"\r\n#include \"RunStyles.h\"\r\n#include \"SparseVector.h\"\r\n#include \"ChangeHistory.h\"\r\n#include \"CellBuffer.h\"\r\n#include \"UndoHistory.h\"\r\n\r\n#include \"catch.hpp\"\r\n\r\nusing namespace Scintilla;\r\nusing namespace Scintilla::Internal;\r\n\r\n// Test CellBuffer.\r\nbool Equal(const char *ptr, std::string_view sv) noexcept {\r\n\treturn memcmp(ptr, sv.data(), sv.length()) == 0;\r\n}\r\n\r\nTEST_CASE(\"ScrapStack\") {\r\n\r\n\tScrapStack ss;\r\n\r\n\tSECTION(\"Push\") {\r\n\t\tconst char *t = ss.Push(\"abc\", 3);\r\n\t\tREQUIRE(memcmp(t, \"abc\", 3) == 0);\r\n\r\n\t\tss.MoveBack(3);\r\n\t\tconst char *text = ss.CurrentText();\r\n\t\tREQUIRE(memcmp(text, \"abc\", 3) == 0);\r\n\r\n\t\tss.MoveForward(1);\r\n\t\tconst char *text2 = ss.CurrentText();\r\n\t\tREQUIRE(memcmp(text2, \"bc\", 2) == 0);\r\n\r\n\t\tss.SetCurrent(1);\r\n\t\tconst char *text3 = ss.CurrentText();\r\n\t\tREQUIRE(memcmp(text3, \"bc\", 2) == 0);\r\n\r\n\t\tconst char *text4 = ss.TextAt(2);\r\n\t\tREQUIRE(memcmp(text4, \"c\", 1) == 0);\r\n\r\n\t\tss.Clear();\r\n\t\tconst char *text5 = ss.Push(\"1\", 1);\r\n\t\tREQUIRE(memcmp(text5, \"1\", 1) == 0);\r\n\t}\r\n}\r\n\r\nTEST_CASE(\"CellBuffer\") {\r\n\r\n\tconstexpr std::string_view sText = \"Scintilla\";\r\n\tconstexpr Sci::Position sLength = sText.length();\r\n\r\n\tCellBuffer cb(true, false);\r\n\r\n\tSECTION(\"InsertOneLine\") {\r\n\t\tbool startSequence = false;\r\n\t\tconst char *cpChange = cb.InsertString(0, sText.data(), sLength, startSequence);\r\n\t\tREQUIRE(startSequence);\r\n\t\tREQUIRE(sLength == cb.Length());\r\n\t\tREQUIRE(Equal(cpChange, sText));\r\n\t\tREQUIRE(1 == cb.Lines());\r\n\t\tREQUIRE(0 == cb.LineStart(0));\r\n\t\tREQUIRE(0 == cb.LineFromPosition(0));\r\n\t\tREQUIRE(sLength == cb.LineStart(1));\r\n\t\tREQUIRE(0 == cb.LineFromPosition(static_cast<int>(sLength)));\r\n\t\tREQUIRE(cb.CanUndo());\r\n\t\tREQUIRE(!cb.CanRedo());\r\n\t}\r\n\r\n\tSECTION(\"InsertTwoLines\") {\r\n\t\tconstexpr std::string_view sText2 = \"Two\\nLines\";\r\n\t\tconstexpr Sci::Position sLength2 = sText2.length();\r\n\t\tbool startSequence = false;\r\n\t\tconst char *cpChange = cb.InsertString(0, sText2.data(), sLength2, startSequence);\r\n\t\tREQUIRE(startSequence);\r\n\t\tREQUIRE(sLength2 == cb.Length());\r\n\t\tREQUIRE(Equal(cpChange, sText2));\r\n\t\tREQUIRE(2 == cb.Lines());\r\n\t\tREQUIRE(0 == cb.LineStart(0));\r\n\t\tREQUIRE(0 == cb.LineFromPosition(0));\r\n\t\tREQUIRE(4 == cb.LineStart(1));\r\n\t\tREQUIRE(1 == cb.LineFromPosition(5));\r\n\t\tREQUIRE(sLength2 == cb.LineStart(2));\r\n\t\tREQUIRE(1 == cb.LineFromPosition(sLength2));\r\n\t\tREQUIRE(cb.CanUndo());\r\n\t\tREQUIRE(!cb.CanRedo());\r\n\t}\r\n\r\n\tSECTION(\"LineEnds\") {\r\n\t\t// Check that various line ends produce correct result from LineEnd.\r\n\t\tcb.SetLineEndTypes(LineEndType::Unicode);\r\n\t\tbool startSequence = false;\r\n\t\t{\r\n\t\t\t// Unix \\n\r\n\t\t\tconstexpr std::string_view sText2 = \"Two\\nLines\";\r\n\t\t\tconstexpr Sci::Position sLength2 = sText2.length();\r\n\t\t\tcb.InsertString(0, sText2.data(), sLength2, startSequence);\r\n\t\t\tREQUIRE(3 == cb.LineEnd(0));\r\n\t\t\tREQUIRE(sLength2 == cb.LineEnd(1));\r\n\t\t\tcb.DeleteChars(0, sLength2, startSequence);\r\n\t\t}\r\n\t\t{\r\n\t\t\t// Windows \\r\\n\r\n\t\t\tconstexpr std::string_view sText2 = \"Two\\r\\nLines\";\r\n\t\t\tconstexpr Sci::Position sLength2 = sText2.length();\r\n\t\t\tcb.InsertString(0, sText2.data(), sLength2, startSequence);\r\n\t\t\tREQUIRE(3 == cb.LineEnd(0));\r\n\t\t\tREQUIRE(sLength2 == cb.LineEnd(1));\r\n\t\t\tcb.DeleteChars(0, sLength2, startSequence);\r\n\t\t}\r\n\t\t{\r\n\t\t\t// Old macOS \\r\r\n\t\t\tconstexpr std::string_view sText2 = \"Two\\rLines\";\r\n\t\t\tconstexpr Sci::Position sLength2 = sText2.length();\r\n\t\t\tcb.InsertString(0, sText2.data(), sLength2, startSequence);\r\n\t\t\tREQUIRE(3 == cb.LineEnd(0));\r\n\t\t\tREQUIRE(sLength2 == cb.LineEnd(1));\r\n\t\t\tcb.DeleteChars(0, sLength2, startSequence);\r\n\t\t}\r\n\t\t{\r\n\t\t\t// Unicode NEL is U+0085 \\xc2\\x85\r\n\t\t\tconstexpr std::string_view sText2 = \"Two\\xc2\\x85Lines\";\r\n\t\t\tconstexpr Sci::Position sLength2 = sText2.length();\r\n\t\t\tcb.InsertString(0, sText2.data(), sLength2, startSequence);\r\n\t\t\tREQUIRE(3 == cb.LineEnd(0));\r\n\t\t\tREQUIRE(sLength2 == cb.LineEnd(1));\r\n\t\t\tcb.DeleteChars(0, sLength2, startSequence);\r\n\t\t}\r\n\t\t{\r\n\t\t\t// Unicode LS line separator is U+2028 \\xe2\\x80\\xa8\r\n\t\t\tconstexpr std::string_view sText2 = \"Two\\xe2\\x80\\xa8Lines\";\r\n\t\t\tconstexpr Sci::Position sLength2 = sText2.length();\r\n\t\t\tcb.InsertString(0, sText2.data(), sLength2, startSequence);\r\n\t\t\tREQUIRE(3 == cb.LineEnd(0));\r\n\t\t\tREQUIRE(sLength2 == cb.LineEnd(1));\r\n\t\t\tcb.DeleteChars(0, sLength2, startSequence);\r\n\t\t}\r\n\t\tcb.SetLineEndTypes(LineEndType::Default);\r\n\t}\r\n\r\n\tSECTION(\"UndoOff\") {\r\n\t\tREQUIRE(cb.IsCollectingUndo());\r\n\t\tcb.SetUndoCollection(false);\r\n\t\tREQUIRE(!cb.IsCollectingUndo());\r\n\t\tbool startSequence = false;\r\n\t\tconst char *cpChange = cb.InsertString(0, sText.data(), sLength, startSequence);\r\n\t\tREQUIRE(!startSequence);\r\n\t\tREQUIRE(sLength == cb.Length());\r\n\t\tREQUIRE(Equal(cpChange, sText));\r\n\t\tREQUIRE(!cb.CanUndo());\r\n\t\tREQUIRE(!cb.CanRedo());\r\n\t}\r\n\r\n\tSECTION(\"UndoRedo\") {\r\n\t\tconstexpr std::string_view sTextDeleted = \"ci\";\r\n\t\tconstexpr std::string_view sTextAfterDeletion = \"Sntilla\";\r\n\t\tbool startSequence = false;\r\n\t\tconst char *cpChange = cb.InsertString(0, sText.data(), sLength, startSequence);\r\n\t\tREQUIRE(startSequence);\r\n\t\tREQUIRE(sLength == cb.Length());\r\n\t\tREQUIRE(Equal(cpChange, sText));\r\n\t\tREQUIRE(Equal(cb.BufferPointer(), sText));\r\n\t\tREQUIRE(cb.CanUndo());\r\n\t\tREQUIRE(!cb.CanRedo());\r\n\t\tconst char *cpDeletion = cb.DeleteChars(1, 2, startSequence);\r\n\t\tREQUIRE(startSequence);\r\n\t\tREQUIRE(Equal(cpDeletion, sTextDeleted));\r\n\t\tREQUIRE(Equal(cb.BufferPointer(), sTextAfterDeletion));\r\n\t\tREQUIRE(cb.CanUndo());\r\n\t\tREQUIRE(!cb.CanRedo());\r\n\r\n\t\tint steps = cb.StartUndo();\r\n\t\tREQUIRE(steps == 1);\r\n\t\tcb.PerformUndoStep();\r\n\t\tREQUIRE(Equal(cb.BufferPointer(), sText));\r\n\t\tREQUIRE(cb.CanUndo());\r\n\t\tREQUIRE(cb.CanRedo());\r\n\r\n\t\tsteps = cb.StartUndo();\r\n\t\tREQUIRE(steps == 1);\r\n\t\tcb.PerformUndoStep();\r\n\t\tREQUIRE(cb.Length() == 0);\r\n\t\tREQUIRE(!cb.CanUndo());\r\n\t\tREQUIRE(cb.CanRedo());\r\n\r\n\t\tsteps = cb.StartRedo();\r\n\t\tREQUIRE(steps == 1);\r\n\t\tcb.PerformRedoStep();\r\n\t\tREQUIRE(Equal(cb.BufferPointer(), sText));\r\n\t\tREQUIRE(cb.CanUndo());\r\n\t\tREQUIRE(cb.CanRedo());\r\n\r\n\t\tsteps = cb.StartRedo();\r\n\t\tREQUIRE(steps == 1);\r\n\t\tcb.PerformRedoStep();\r\n\t\tREQUIRE(Equal(cb.BufferPointer(), sTextAfterDeletion));\r\n\t\tREQUIRE(cb.CanUndo());\r\n\t\tREQUIRE(!cb.CanRedo());\r\n\r\n\t\tcb.DeleteUndoHistory();\r\n\t\tREQUIRE(!cb.CanUndo());\r\n\t\tREQUIRE(!cb.CanRedo());\r\n\t}\r\n\r\n\tSECTION(\"LineEndTypes\") {\r\n\t\tREQUIRE(cb.GetLineEndTypes() == LineEndType::Default);\r\n\t\tcb.SetLineEndTypes(LineEndType::Unicode);\r\n\t\tREQUIRE(cb.GetLineEndTypes() == LineEndType::Unicode);\r\n\t\tcb.SetLineEndTypes(LineEndType::Default);\r\n\t\tREQUIRE(cb.GetLineEndTypes() == LineEndType::Default);\r\n\t}\r\n\r\n\tSECTION(\"ReadOnly\") {\r\n\t\tREQUIRE(!cb.IsReadOnly());\r\n\t\tcb.SetReadOnly(true);\r\n\t\tREQUIRE(cb.IsReadOnly());\r\n\t\tbool startSequence = false;\r\n\t\tcb.InsertString(0, sText.data(), sLength, startSequence);\r\n\t\tREQUIRE(cb.Length() == 0);\r\n\t}\r\n\r\n}\r\n\r\nbool Equal(const Action &a, ActionType at, Sci::Position position, std::string_view value) noexcept {\r\n\t// Currently ignores mayCoalesce since this is not set consistently when following\r\n\t// start action implies it.\r\n\tif (a.at != at)\r\n\t\treturn false;\r\n\tif (a.position != position)\r\n\t\treturn false;\r\n\tif (a.lenData != static_cast<Sci::Position>(value.length()))\r\n\t\treturn false;\r\n\tif (memcmp(a.data, value.data(), a.lenData) != 0)\r\n\t\treturn false;\r\n\treturn true;\r\n}\r\n\r\nbool EqualContainerAction(const Action &a, Sci::Position token) noexcept {\r\n\t// Currently ignores mayCoalesce\r\n\tif (a.at != ActionType::container)\r\n\t\treturn false;\r\n\tif (a.position != token)\r\n\t\treturn false;\r\n\tif (a.lenData != 0)\r\n\t\treturn false;\r\n\tif (a.data)\r\n\t\treturn false;\r\n\treturn true;\r\n}\r\n\r\nvoid TentativeUndo(UndoHistory &uh) noexcept {\r\n\tconst int steps = uh.TentativeSteps();\r\n\tfor (int step = 0; step < steps; step++) {\r\n\t\t/* const Action &actionStep = */ uh.GetUndoStep();\r\n\t\tuh.CompletedUndoStep();\r\n\t}\r\n\tuh.TentativeCommit();\r\n}\r\n\r\nTEST_CASE(\"ScaledVector\") {\r\n\r\n\tScaledVector sv;\r\n\t\r\n\tSECTION(\"ScalingUp\") {\r\n\t\tsv.ReSize(1);\r\n\t\tREQUIRE(sv.SizeInBytes() == 1);\r\n\t\tREQUIRE(sv.ValueAt(0) == 0);\r\n\t\tsv.SetValueAt(0, 1);\r\n\t\tREQUIRE(sv.ValueAt(0) == 1);\r\n\t\tREQUIRE(sv.SignedValueAt(0) == 1);\r\n\t\tsv.ClearValueAt(0);\r\n\t\tREQUIRE(sv.ValueAt(0) == 0);\r\n\r\n\t\t// Check boundary of 1-byte values\r\n\t\tsv.SetValueAt(0, 0xff);\r\n\t\tREQUIRE(sv.ValueAt(0) == 0xff);\r\n\t\tREQUIRE(sv.SizeInBytes() == 1);\r\n\t\t// Require expansion to 2 byte elements\r\n\t\tsv.SetValueAt(0, 0x100);\r\n\t\tREQUIRE(sv.ValueAt(0) == 0x100);\r\n\t\tREQUIRE(sv.SizeInBytes() == 2);\r\n\t\t// Only ever expands, never diminishes element size\r\n\t\tsv.SetValueAt(0, 0xff);\r\n\t\tREQUIRE(sv.ValueAt(0) == 0xff);\r\n\t\tREQUIRE(sv.SizeInBytes() == 2);\r\n\r\n\t\t// Check boundary of 2-byte values\r\n\t\tsv.SetValueAt(0, 0xffff);\r\n\t\tREQUIRE(sv.ValueAt(0) == 0xffff);\r\n\t\tREQUIRE(sv.SizeInBytes() == 2);\r\n\t\t// Require expansion to 2 byte elements\r\n\t\tsv.SetValueAt(0, 0x10000);\r\n\t\tREQUIRE(sv.ValueAt(0) == 0x10000);\r\n\t\tREQUIRE(sv.SizeInBytes() == 3);\r\n\r\n\t\t// Check that its not just simple bit patterns that work\r\n\t\tsv.SetValueAt(0, 0xd4381);\r\n\t\tREQUIRE(sv.ValueAt(0) == 0xd4381);\r\n\r\n\t\t// Add a second item\r\n\t\tsv.ReSize(2);\r\n\t\tREQUIRE(sv.SizeInBytes() == 6);\r\n\t\t// Truncate\r\n\t\tsv.Truncate(1);\r\n\t\tREQUIRE(sv.SizeInBytes() == 3);\r\n\t\tREQUIRE(sv.ValueAt(0) == 0xd4381);\r\n\r\n\t\tsv.Clear();\r\n\t\tREQUIRE(sv.Size() == 0);\r\n\t\tsv.PushBack();\r\n\t\tREQUIRE(sv.Size() == 1);\r\n\t\tREQUIRE(sv.SizeInBytes() == 3);\r\n\t\tsv.SetValueAt(0, 0x1fd4381);\r\n\t\tREQUIRE(sv.SizeInBytes() == 4);\r\n\t\tREQUIRE(sv.ValueAt(0) == 0x1fd4381);\r\n\t}\r\n}\r\n\r\nTEST_CASE(\"UndoHistory\") {\r\n\r\n\tUndoHistory uh;\r\n\r\n\tSECTION(\"Basics\") {\r\n\t\tREQUIRE(uh.IsSavePoint());\r\n\t\tREQUIRE(uh.AfterSavePoint());\r\n\t\tREQUIRE(!uh.BeforeSavePoint());\r\n\t\tREQUIRE(!uh.BeforeReachableSavePoint());\r\n\t\tREQUIRE(!uh.CanUndo());\r\n\t\tREQUIRE(!uh.CanRedo());\r\n\r\n\t\tbool startSequence = false;\r\n\t\tconst char *val = uh.AppendAction(ActionType::insert, 0, \"ab\", 2, startSequence, true);\r\n\t\tREQUIRE(memcmp(val, \"ab\", 2) == 0);\r\n\t\tREQUIRE(startSequence);\r\n\t\tREQUIRE(!uh.IsSavePoint());\r\n\t\tREQUIRE(uh.AfterSavePoint());\r\n\t\tREQUIRE(uh.CanUndo());\r\n\t\tREQUIRE(!uh.CanRedo());\r\n\t\tval = uh.AppendAction(ActionType::remove, 0, \"ab\", 2, startSequence, true);\r\n\t\tREQUIRE(memcmp(val, \"ab\", 2) == 0);\r\n\t\tREQUIRE(startSequence);\r\n\r\n\t\t// Undoing\r\n\t\t{\r\n\t\t\tconst int steps = uh.StartUndo();\r\n\t\t\tREQUIRE(steps == 1);\r\n\t\t\tconst Action action = uh.GetUndoStep();\r\n\t\t\tREQUIRE(Equal(action, ActionType::remove, 0, \"ab\"));\r\n\t\t\tuh.CompletedUndoStep();\r\n\t\t}\r\n\t\t{\r\n\t\t\tconst int steps = uh.StartUndo();\r\n\t\t\tREQUIRE(steps == 1);\r\n\t\t\tconst Action action = uh.GetUndoStep();\r\n\t\t\tREQUIRE(Equal(action, ActionType::insert, 0, \"ab\"));\r\n\t\t\tuh.CompletedUndoStep();\r\n\t\t}\r\n\r\n\t\tREQUIRE(uh.IsSavePoint());\r\n\r\n\t\t// Redoing\r\n\t\t{\r\n\t\t\tconst int steps = uh.StartRedo();\r\n\t\t\tREQUIRE(steps == 1);\r\n\t\t\tconst Action action = uh.GetRedoStep();\r\n\t\t\tREQUIRE(Equal(action, ActionType::insert, 0, \"ab\"));\r\n\t\t\tuh.CompletedRedoStep();\r\n\t\t}\r\n\t\t{\r\n\t\t\tconst int steps = uh.StartRedo();\r\n\t\t\tREQUIRE(steps == 1);\r\n\t\t\tconst Action action = uh.GetRedoStep();\r\n\t\t\tREQUIRE(Equal(action, ActionType::remove, 0, \"ab\"));\r\n\t\t\tuh.CompletedRedoStep();\r\n\t\t}\r\n\r\n\t\tREQUIRE(!uh.IsSavePoint());\r\n\t}\r\n\r\n\tSECTION(\"EnsureTruncationAfterUndo\") {\r\n\r\n\t\tREQUIRE(uh.Actions() == 0);\r\n\t\tbool startSequence = false;\r\n\t\tuh.AppendAction(ActionType::insert, 0, \"ab\", 2, startSequence, true);\r\n\t\tREQUIRE(uh.Actions() == 1);\r\n\t\tuh.AppendAction(ActionType::insert, 2, \"cd\", 2, startSequence, true);\r\n\t\tREQUIRE(uh.Actions() == 2);\r\n\t\tREQUIRE(uh.CanUndo());\r\n\t\tREQUIRE(!uh.CanRedo());\r\n\r\n\t\t// Undoing\r\n\t\tconst int steps = uh.StartUndo();\r\n\t\tREQUIRE(steps == 2);\r\n\t\tuh.GetUndoStep();\r\n\t\tuh.CompletedUndoStep();\r\n\t\tREQUIRE(uh.Actions() == 2);\t// Not truncated until forward action\r\n\t\tuh.GetUndoStep();\r\n\t\tuh.CompletedUndoStep();\r\n\t\tREQUIRE(uh.Actions() == 2);\r\n\r\n\t\t// Perform action which should truncate history\r\n\t\tuh.AppendAction(ActionType::insert, 0, \"12\", 2, startSequence, true);\r\n\t\tREQUIRE(uh.Actions() == 1);\r\n\t}\r\n\r\n\tSECTION(\"Coalesce\") {\r\n\r\n\t\tbool startSequence = false;\r\n\t\tconst char *val = uh.AppendAction(ActionType::insert, 0, \"ab\", 2, startSequence, true);\r\n\t\tREQUIRE(memcmp(val, \"ab\", 2) == 0);\r\n\t\tREQUIRE(startSequence);\r\n\t\tREQUIRE(!uh.IsSavePoint());\r\n\t\tREQUIRE(uh.AfterSavePoint());\r\n\t\tREQUIRE(uh.CanUndo());\r\n\t\tREQUIRE(!uh.CanRedo());\r\n\t\tval = uh.AppendAction(ActionType::insert, 2, \"cd\", 2, startSequence, true);\r\n\t\tREQUIRE(memcmp(val, \"cd\", 2) == 0);\r\n\t\tREQUIRE(!startSequence);\r\n\r\n\t\t// Undoing\r\n\t\t{\r\n\t\t\tconst int steps = uh.StartUndo();\r\n\t\t\tREQUIRE(steps == 2);\r\n\t\t\tconst Action action2 = uh.GetUndoStep();\r\n\t\t\tREQUIRE(Equal(action2, ActionType::insert, 2, \"cd\"));\r\n\t\t\tuh.CompletedUndoStep();\r\n\t\t\tconst Action action1 = uh.GetUndoStep();\r\n\t\t\tREQUIRE(Equal(action1, ActionType::insert, 0, \"ab\"));\r\n\t\t\tuh.CompletedUndoStep();\r\n\t\t}\r\n\r\n\t\tREQUIRE(uh.IsSavePoint());\r\n\r\n\t\t// Redoing\r\n\t\t{\r\n\t\t\tconst int steps = uh.StartRedo();\r\n\t\t\tREQUIRE(steps == 2);\r\n\t\t\tconst Action action1 = uh.GetRedoStep();\r\n\t\t\tREQUIRE(Equal(action1, ActionType::insert, 0, \"ab\"));\r\n\t\t\tuh.CompletedRedoStep();\r\n\t\t\tconst Action action2 = uh.GetRedoStep();\r\n\t\t\tREQUIRE(Equal(action2, ActionType::insert, 2, \"cd\"));\r\n\t\t\tuh.CompletedRedoStep();\r\n\t\t}\r\n\r\n\t\tREQUIRE(!uh.IsSavePoint());\r\n\r\n\t}\r\n\r\n\tSECTION(\"SimpleContainer\") {\r\n\t\tbool startSequence = false;\r\n\t\tconst char *val = uh.AppendAction(ActionType::container, 1000, nullptr, 0, startSequence, true);\r\n\t\tREQUIRE(startSequence);\r\n\t\tREQUIRE(!val);\r\n\t\tval = uh.AppendAction(ActionType::container, 1001, nullptr, 0, startSequence, true);\r\n\t\tREQUIRE(!startSequence);\r\n\t\tREQUIRE(!val);\r\n\t}\r\n\r\n\tSECTION(\"CoalesceContainer\") {\r\n\t\tbool startSequence = false;\r\n\t\tconst char *val = uh.AppendAction(ActionType::insert, 0, \"ab\", 2, startSequence, true);\r\n\t\tREQUIRE(memcmp(val, \"ab\", 2) == 0);\r\n\t\tREQUIRE(startSequence);\r\n\t\tval = uh.AppendAction(ActionType::container, 1000, nullptr, 0, startSequence, true);\r\n\t\tREQUIRE(!startSequence);\r\n\t\t// container actions do not have text data, just the token store in position\r\n\t\tREQUIRE(!val);\r\n\t\tuh.AppendAction(ActionType::container, 1001, nullptr, 0, startSequence, true);\r\n\t\tREQUIRE(!startSequence);\r\n\t\t// This is a coalescible change since the container actions are skipped to determine compatibility\r\n\t\tval = uh.AppendAction(ActionType::insert, 2, \"cd\", 2, startSequence, true);\r\n\t\tREQUIRE(memcmp(val, \"cd\", 2) == 0);\r\n\t\tREQUIRE(!startSequence);\r\n\t\t// Break the sequence with a non-coalescible container action\r\n\t\tuh.AppendAction(ActionType::container, 1002, nullptr, 0, startSequence, false);\r\n\t\tREQUIRE(startSequence);\r\n\r\n\t\t{\r\n\t\t\tconst int steps = uh.StartUndo();\r\n\t\t\tREQUIRE(steps == 1);\r\n\t\t\tconst Action actionContainer = uh.GetUndoStep();\r\n\t\t\tREQUIRE(EqualContainerAction(actionContainer, 1002));\r\n\t\t\tREQUIRE(actionContainer.mayCoalesce == false);\r\n\t\t\tuh.CompletedUndoStep();\r\n\t\t}\r\n\t\t{\r\n\t\t\tconst int steps = uh.StartUndo();\r\n\t\t\tREQUIRE(steps == 4);\r\n\t\t\tconst Action actionInsert = uh.GetUndoStep();\r\n\t\t\tREQUIRE(Equal(actionInsert, ActionType::insert, 2, \"cd\"));\r\n\t\t\tuh.CompletedUndoStep();\r\n\t\t\t{\r\n\t\t\t\tconst Action actionContainer = uh.GetUndoStep();\r\n\t\t\t\tREQUIRE(EqualContainerAction(actionContainer, 1001));\r\n\t\t\t\tuh.CompletedUndoStep();\r\n\t\t\t}\r\n\t\t\t{\r\n\t\t\t\tconst Action actionContainer = uh.GetUndoStep();\r\n\t\t\t\tREQUIRE(EqualContainerAction(actionContainer, 1000));\r\n\t\t\t\tuh.CompletedUndoStep();\r\n\t\t\t}\r\n\t\t\t{\r\n\t\t\t\tconst Action actionInsert1 = uh.GetUndoStep();\r\n\t\t\t\tREQUIRE(Equal(actionInsert1, ActionType::insert, 0, \"ab\"));\r\n\t\t\t\tuh.CompletedUndoStep();\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Reached beginning\r\n\t\tREQUIRE(!uh.CanUndo());\r\n\t}\r\n\r\n\tSECTION(\"Grouping\") {\r\n\r\n\t\tuh.BeginUndoAction();\r\n\r\n\t\tbool startSequence = false;\r\n\t\tconst char *val = uh.AppendAction(ActionType::insert, 0, \"ab\", 2, startSequence, true);\r\n\t\tREQUIRE(memcmp(val, \"ab\", 2) == 0);\r\n\t\tREQUIRE(startSequence);\r\n\t\tREQUIRE(!uh.IsSavePoint());\r\n\t\tREQUIRE(uh.AfterSavePoint());\r\n\t\tREQUIRE(uh.CanUndo());\r\n\t\tREQUIRE(!uh.CanRedo());\r\n\t\tval = uh.AppendAction(ActionType::remove, 0, \"ab\", 2, startSequence, true);\r\n\t\tREQUIRE(memcmp(val, \"ab\", 2) == 0);\r\n\t\tREQUIRE(!startSequence);\r\n\t\tval = uh.AppendAction(ActionType::insert, 0, \"cde\", 3, startSequence, true);\r\n\t\tREQUIRE(memcmp(val, \"cde\", 3) == 0);\r\n\t\tREQUIRE(!startSequence);\r\n\r\n\t\tuh.EndUndoAction();\r\n\r\n\t\t// Undoing\r\n\t\t{\r\n\t\t\tconst int steps = uh.StartUndo();\r\n\t\t\tREQUIRE(steps == 3);\r\n\t\t\tconst Action action3 = uh.GetUndoStep();\r\n\t\t\tREQUIRE(Equal(action3, ActionType::insert, 0, \"cde\"));\r\n\t\t\tuh.CompletedUndoStep();\r\n\t\t\tconst Action action2 = uh.GetUndoStep();\r\n\t\t\tREQUIRE(Equal(action2, ActionType::remove, 0, \"ab\"));\r\n\t\t\tuh.CompletedUndoStep();\r\n\t\t\tconst Action action1 = uh.GetUndoStep();\r\n\t\t\tREQUIRE(Equal(action1, ActionType::insert, 0, \"ab\"));\r\n\t\t\tuh.CompletedUndoStep();\r\n\t\t}\r\n\r\n\t\tREQUIRE(uh.IsSavePoint());\r\n\r\n\t\t// Redoing\r\n\t\t{\r\n\t\t\tconst int steps = uh.StartRedo();\r\n\t\t\tREQUIRE(steps == 3);\r\n\t\t\tconst Action action1 = uh.GetRedoStep();\r\n\t\t\tREQUIRE(Equal(action1, ActionType::insert, 0, \"ab\"));\r\n\t\t\tuh.CompletedRedoStep();\r\n\t\t\tconst Action action2 = uh.GetRedoStep();\r\n\t\t\tREQUIRE(Equal(action2, ActionType::remove, 0, \"ab\"));\r\n\t\t\tuh.CompletedRedoStep();\r\n\t\t\tconst Action action3 = uh.GetRedoStep();\r\n\t\t\tREQUIRE(Equal(action3, ActionType::insert, 0, \"cde\"));\r\n\t\t\tuh.CompletedRedoStep();\r\n\t\t}\r\n\r\n\t\tREQUIRE(!uh.IsSavePoint());\r\n\r\n\t}\r\n\r\n\tSECTION(\"DeepGroup\") {\r\n\r\n\t\tuh.BeginUndoAction();\r\n\t\tuh.BeginUndoAction();\r\n\r\n\t\tbool startSequence = false;\r\n\t\tconst char *val = uh.AppendAction(ActionType::insert, 0, \"ab\", 2, startSequence, true);\r\n\t\tREQUIRE(memcmp(val, \"ab\", 2) == 0);\r\n\t\tREQUIRE(startSequence);\r\n\t\tval = uh.AppendAction(ActionType::container, 1000, nullptr, 0, startSequence, false);\r\n\t\tREQUIRE(!val);\r\n\t\tREQUIRE(!startSequence);\r\n\t\tval = uh.AppendAction(ActionType::remove, 0, \"ab\", 2, startSequence, true);\r\n\t\tREQUIRE(memcmp(val, \"ab\", 2) == 0);\r\n\t\tREQUIRE(!startSequence);\r\n\t\tval = uh.AppendAction(ActionType::insert, 0, \"cde\", 3, startSequence, true);\r\n\t\tREQUIRE(memcmp(val, \"cde\", 3) == 0);\r\n\t\tREQUIRE(!startSequence);\r\n\r\n\t\tuh.EndUndoAction();\r\n\t\tuh.EndUndoAction();\r\n\r\n\t\tconst int steps = uh.StartUndo();\r\n\t\tREQUIRE(steps == 4);\r\n\t}\r\n\r\n\tSECTION(\"Tentative\") {\r\n\r\n\t\tREQUIRE(!uh.TentativeActive());\r\n\t\tREQUIRE(uh.TentativeSteps() == -1);\r\n\t\tuh.TentativeStart();\r\n\t\tREQUIRE(uh.TentativeActive());\r\n\t\tREQUIRE(uh.TentativeSteps() == 0);\r\n\t\tbool startSequence = false;\r\n\t\tuh.AppendAction(ActionType::insert, 0, \"ab\", 2, startSequence, true);\r\n\t\tREQUIRE(uh.TentativeActive());\r\n\t\tREQUIRE(uh.TentativeSteps() == 1);\r\n\t\tREQUIRE(uh.CanUndo());\r\n\t\tuh.TentativeCommit();\r\n\t\tREQUIRE(!uh.TentativeActive());\r\n\t\tREQUIRE(uh.TentativeSteps() == -1);\r\n\t\tREQUIRE(uh.CanUndo());\r\n\r\n\t\t// TentativeUndo is the other important operation but it is performed by Document so add a local equivalent\r\n\t\tuh.TentativeStart();\r\n\t\tuh.AppendAction(ActionType::remove, 0, \"ab\", 2, startSequence, false);\r\n\t\tuh.AppendAction(ActionType::insert, 0, \"ab\", 2, startSequence, true);\r\n\t\tREQUIRE(uh.TentativeActive());\r\n\t\t// The first TentativeCommit didn't seal off the first action so it is still undoable\r\n\t\tREQUIRE(uh.TentativeSteps() == 2);\r\n\t\tREQUIRE(uh.CanUndo());\r\n\t\tTentativeUndo(uh);\r\n\t\tREQUIRE(!uh.TentativeActive());\r\n\t\tREQUIRE(uh.TentativeSteps() == -1);\r\n\t\tREQUIRE(uh.CanUndo());\r\n\t}\r\n}\r\n\r\nTEST_CASE(\"UndoActions\") {\r\n\r\n\tUndoActions ua;\r\n\r\n\tSECTION(\"Basics\") {\r\n\t\tua.PushBack();\r\n\t\tREQUIRE(ua.SSize() == 1);\r\n\t\tua.Create(0, ActionType::insert, 0, 2, false);\r\n\t\tREQUIRE(ua.AtStart(0));\r\n\t\tREQUIRE(ua.LengthTo(0) == 0);\r\n\t\tREQUIRE(ua.AtStart(1));\r\n\t\tREQUIRE(ua.LengthTo(1) == 2);\r\n\t\tua.PushBack();\r\n\t\tREQUIRE(ua.SSize() == 2);\r\n\t\tua.Create(0, ActionType::insert, 0, 2, false);\r\n\t\tREQUIRE(ua.SSize() == 2);\r\n\t\tua.Truncate(1);\r\n\t\tREQUIRE(ua.SSize() == 1);\r\n\t\tua.Clear();\r\n\t\tREQUIRE(ua.SSize() == 0);\r\n\t}\r\n}\r\n\r\n\r\nTEST_CASE(\"CharacterIndex\") {\r\n\r\n\tCellBuffer cb(true, false);\r\n\r\n\tSECTION(\"Setup\") {\r\n\t\tREQUIRE(cb.LineCharacterIndex() == LineCharacterIndexType::None);\r\n\t\tREQUIRE(cb.IndexLineStart(0, LineCharacterIndexType::Utf16) == 0);\r\n\t\tREQUIRE(cb.IndexLineStart(1, LineCharacterIndexType::Utf16) == 0);\r\n\t\tcb.SetUTF8Substance(true);\r\n\r\n\t\tcb.AllocateLineCharacterIndex(LineCharacterIndexType::Utf16);\r\n\t\tREQUIRE(cb.LineCharacterIndex() == LineCharacterIndexType::Utf16);\r\n\r\n\t\tREQUIRE(cb.IndexLineStart(0, LineCharacterIndexType::Utf16) == 0);\r\n\t\tREQUIRE(cb.IndexLineStart(1, LineCharacterIndexType::Utf16) == 0);\r\n\r\n\t\tcb.ReleaseLineCharacterIndex(LineCharacterIndexType::Utf16);\r\n\t\tREQUIRE(cb.LineCharacterIndex() == LineCharacterIndexType::None);\r\n\t}\r\n\r\n\tSECTION(\"Insertion\") {\r\n\t\tcb.SetUTF8Substance(true);\r\n\r\n\t\tcb.AllocateLineCharacterIndex(LineCharacterIndexType::Utf16 | LineCharacterIndexType::Utf32);\r\n\r\n\t\tbool startSequence = false;\r\n\t\tcb.InsertString(0, \"a\", 1, startSequence);\r\n\t\tREQUIRE(cb.IndexLineStart(0, LineCharacterIndexType::Utf16) == 0);\r\n\t\tREQUIRE(cb.IndexLineStart(1, LineCharacterIndexType::Utf16) == 1);\r\n\t\tREQUIRE(cb.IndexLineStart(0, LineCharacterIndexType::Utf32) == 0);\r\n\t\tREQUIRE(cb.IndexLineStart(1, LineCharacterIndexType::Utf32) == 1);\r\n\r\n\t\tconstexpr std::string_view hwair = \"\\xF0\\x90\\x8D\\x88\";\r\n\t\tcb.InsertString(0, hwair.data(), hwair.length(), startSequence);\r\n\t\tREQUIRE(cb.IndexLineStart(0, LineCharacterIndexType::Utf16) == 0);\r\n\t\tREQUIRE(cb.IndexLineStart(1, LineCharacterIndexType::Utf16) == 3);\r\n\t\tREQUIRE(cb.IndexLineStart(0, LineCharacterIndexType::Utf32) == 0);\r\n\t\tREQUIRE(cb.IndexLineStart(1, LineCharacterIndexType::Utf32) == 2);\r\n\t}\r\n\r\n\tSECTION(\"Deletion\") {\r\n\t\tcb.SetUTF8Substance(true);\r\n\r\n\t\tcb.AllocateLineCharacterIndex(LineCharacterIndexType::Utf16 | LineCharacterIndexType::Utf32);\r\n\r\n\t\tbool startSequence = false;\r\n\t\tconstexpr std::string_view hwair = \"a\\xF0\\x90\\x8D\\x88z\";\r\n\t\tcb.InsertString(0, hwair.data(), hwair.length(), startSequence);\r\n\r\n\t\tREQUIRE(cb.IndexLineStart(0, LineCharacterIndexType::Utf16) == 0);\r\n\t\tREQUIRE(cb.IndexLineStart(1, LineCharacterIndexType::Utf16) == 4);\r\n\t\tREQUIRE(cb.IndexLineStart(0, LineCharacterIndexType::Utf32) == 0);\r\n\t\tREQUIRE(cb.IndexLineStart(1, LineCharacterIndexType::Utf32) == 3);\r\n\r\n\t\tcb.DeleteChars(5, 1, startSequence);\r\n\r\n\t\tREQUIRE(cb.IndexLineStart(0, LineCharacterIndexType::Utf16) == 0);\r\n\t\tREQUIRE(cb.IndexLineStart(1, LineCharacterIndexType::Utf16) == 3);\r\n\t\tREQUIRE(cb.IndexLineStart(0, LineCharacterIndexType::Utf32) == 0);\r\n\t\tREQUIRE(cb.IndexLineStart(1, LineCharacterIndexType::Utf32) == 2);\r\n\r\n\t\tcb.DeleteChars(1, 4, startSequence);\r\n\r\n\t\tREQUIRE(cb.IndexLineStart(0, LineCharacterIndexType::Utf16) == 0);\r\n\t\tREQUIRE(cb.IndexLineStart(1, LineCharacterIndexType::Utf16) == 1);\r\n\t\tREQUIRE(cb.IndexLineStart(0, LineCharacterIndexType::Utf32) == 0);\r\n\t\tREQUIRE(cb.IndexLineStart(1, LineCharacterIndexType::Utf32) == 1);\r\n\t}\r\n\r\n\tSECTION(\"Insert Complex\") {\r\n\t\tcb.SetUTF8Substance(true);\r\n\t\tcb.SetLineEndTypes(LineEndType::Unicode);\r\n\t\tcb.AllocateLineCharacterIndex(LineCharacterIndexType::Utf16 | LineCharacterIndexType::Utf32);\r\n\r\n\t\tbool startSequence = false;\r\n\t\t// 3 lines of text containing 8 bytes\r\n\t\tconstexpr std::string_view data = \"a\\n\\xF0\\x90\\x8D\\x88\\nz\";\r\n\t\tcb.InsertString(0, data.data(), data.length(), startSequence);\r\n\r\n\t\tREQUIRE(cb.IndexLineStart(0, LineCharacterIndexType::Utf16) == 0);\r\n\t\tREQUIRE(cb.IndexLineStart(1, LineCharacterIndexType::Utf16) == 2);\r\n\t\tREQUIRE(cb.IndexLineStart(2, LineCharacterIndexType::Utf16) == 5);\r\n\t\tREQUIRE(cb.IndexLineStart(3, LineCharacterIndexType::Utf16) == 6);\r\n\r\n\t\tREQUIRE(cb.IndexLineStart(0, LineCharacterIndexType::Utf32) == 0);\r\n\t\tREQUIRE(cb.IndexLineStart(1, LineCharacterIndexType::Utf32) == 2);\r\n\t\tREQUIRE(cb.IndexLineStart(2, LineCharacterIndexType::Utf32) == 4);\r\n\t\tREQUIRE(cb.IndexLineStart(3, LineCharacterIndexType::Utf32) == 5);\r\n\r\n\t\t// Insert a new line at end -> \"a\\n\\xF0\\x90\\x8D\\x88\\nz\\n\" 4 lines\r\n\t\t// Last line empty\r\n\t\tcb.InsertString(data.length(), \"\\n\", 1, startSequence);\r\n\r\n\t\tREQUIRE(cb.IndexLineStart(0, LineCharacterIndexType::Utf16) == 0);\r\n\t\tREQUIRE(cb.IndexLineStart(1, LineCharacterIndexType::Utf16) == 2);\r\n\t\tREQUIRE(cb.IndexLineStart(2, LineCharacterIndexType::Utf16) == 5);\r\n\t\tREQUIRE(cb.IndexLineStart(3, LineCharacterIndexType::Utf16) == 7);\r\n\t\tREQUIRE(cb.IndexLineStart(4, LineCharacterIndexType::Utf16) == 7);\r\n\r\n\t\tREQUIRE(cb.IndexLineStart(0, LineCharacterIndexType::Utf32) == 0);\r\n\t\tREQUIRE(cb.IndexLineStart(1, LineCharacterIndexType::Utf32) == 2);\r\n\t\tREQUIRE(cb.IndexLineStart(2, LineCharacterIndexType::Utf32) == 4);\r\n\t\tREQUIRE(cb.IndexLineStart(3, LineCharacterIndexType::Utf32) == 6);\r\n\t\tREQUIRE(cb.IndexLineStart(4, LineCharacterIndexType::Utf32) == 6);\r\n\r\n\t\t// Insert a new line before end -> \"a\\n\\xF0\\x90\\x8D\\x88\\nz\\n\\n\" 5 lines\r\n\t\tcb.InsertString(data.length(), \"\\n\", 1, startSequence);\r\n\r\n\t\tREQUIRE(cb.IndexLineStart(0, LineCharacterIndexType::Utf16) == 0);\r\n\t\tREQUIRE(cb.IndexLineStart(1, LineCharacterIndexType::Utf16) == 2);\r\n\t\tREQUIRE(cb.IndexLineStart(2, LineCharacterIndexType::Utf16) == 5);\r\n\t\tREQUIRE(cb.IndexLineStart(3, LineCharacterIndexType::Utf16) == 7);\r\n\t\tREQUIRE(cb.IndexLineStart(4, LineCharacterIndexType::Utf16) == 8);\r\n\t\tREQUIRE(cb.IndexLineStart(5, LineCharacterIndexType::Utf16) == 8);\r\n\r\n\t\tREQUIRE(cb.IndexLineStart(0, LineCharacterIndexType::Utf32) == 0);\r\n\t\tREQUIRE(cb.IndexLineStart(1, LineCharacterIndexType::Utf32) == 2);\r\n\t\tREQUIRE(cb.IndexLineStart(2, LineCharacterIndexType::Utf32) == 4);\r\n\t\tREQUIRE(cb.IndexLineStart(3, LineCharacterIndexType::Utf32) == 6);\r\n\t\tREQUIRE(cb.IndexLineStart(4, LineCharacterIndexType::Utf32) == 7);\r\n\t\tREQUIRE(cb.IndexLineStart(5, LineCharacterIndexType::Utf32) == 7);\r\n\r\n\t\t// Insert a valid 3-byte UTF-8 character at start ->\r\n\t\t// \"\\xE2\\x82\\xACa\\n\\xF0\\x90\\x8D\\x88\\nz\\n\\n\" 5 lines\r\n\r\n\t\tconstexpr std::string_view euro = \"\\xE2\\x82\\xAC\";\r\n\t\tcb.InsertString(0, euro.data(), euro.length(), startSequence);\r\n\r\n\t\tREQUIRE(cb.IndexLineStart(0, LineCharacterIndexType::Utf16) == 0);\r\n\t\tREQUIRE(cb.IndexLineStart(1, LineCharacterIndexType::Utf16) == 3);\r\n\t\tREQUIRE(cb.IndexLineStart(2, LineCharacterIndexType::Utf16) == 6);\r\n\t\tREQUIRE(cb.IndexLineStart(3, LineCharacterIndexType::Utf16) == 8);\r\n\t\tREQUIRE(cb.IndexLineStart(4, LineCharacterIndexType::Utf16) == 9);\r\n\t\tREQUIRE(cb.IndexLineStart(5, LineCharacterIndexType::Utf16) == 9);\r\n\r\n\t\tREQUIRE(cb.IndexLineStart(0, LineCharacterIndexType::Utf32) == 0);\r\n\t\tREQUIRE(cb.IndexLineStart(1, LineCharacterIndexType::Utf32) == 3);\r\n\t\tREQUIRE(cb.IndexLineStart(2, LineCharacterIndexType::Utf32) == 5);\r\n\t\tREQUIRE(cb.IndexLineStart(3, LineCharacterIndexType::Utf32) == 7);\r\n\t\tREQUIRE(cb.IndexLineStart(4, LineCharacterIndexType::Utf32) == 8);\r\n\t\tREQUIRE(cb.IndexLineStart(5, LineCharacterIndexType::Utf32) == 8);\r\n\r\n\t\t// Insert a lone lead byte implying a 3 byte character at start of line 2 ->\r\n\t\t// \"\\xE2\\x82\\xACa\\n\\EF\\xF0\\x90\\x8D\\x88\\nz\\n\\n\" 5 lines\r\n\t\t// Should be treated as a single byte character\r\n\r\n\t\tconstexpr std::string_view lead = \"\\xEF\";\r\n\t\tcb.InsertString(5, lead.data(), lead.length(), startSequence);\r\n\r\n\t\tREQUIRE(cb.IndexLineStart(0, LineCharacterIndexType::Utf16) == 0);\r\n\t\tREQUIRE(cb.IndexLineStart(1, LineCharacterIndexType::Utf16) == 3);\r\n\t\tREQUIRE(cb.IndexLineStart(2, LineCharacterIndexType::Utf16) == 7);\r\n\t\tREQUIRE(cb.IndexLineStart(3, LineCharacterIndexType::Utf16) == 9);\r\n\r\n\t\tREQUIRE(cb.IndexLineStart(0, LineCharacterIndexType::Utf32) == 0);\r\n\t\tREQUIRE(cb.IndexLineStart(1, LineCharacterIndexType::Utf32) == 3);\r\n\t\tREQUIRE(cb.IndexLineStart(2, LineCharacterIndexType::Utf32) == 6);\r\n\t\tREQUIRE(cb.IndexLineStart(3, LineCharacterIndexType::Utf32) == 8);\r\n\r\n\t\t// Insert an ASCII lead byte inside the 3-byte initial character ->\r\n\t\t// \"\\xE2!\\x82\\xACa\\n\\EF\\xF0\\x90\\x8D\\x88\\nz\\n\\n\" 5 lines\r\n\t\t// It should b treated as a single character and should cause the\r\n\t\t// byte before and the 2 bytes after also be each treated as singles\r\n\t\t// so 3 more characters on line 0.\r\n\r\n\t\tconstexpr std::string_view ascii = \"!\";\r\n\t\tcb.InsertString(1, ascii.data(), ascii.length(), startSequence);\r\n\r\n\t\tREQUIRE(cb.IndexLineStart(0, LineCharacterIndexType::Utf16) == 0);\r\n\t\tREQUIRE(cb.IndexLineStart(1, LineCharacterIndexType::Utf16) == 6);\r\n\t\tREQUIRE(cb.IndexLineStart(2, LineCharacterIndexType::Utf16) == 10);\r\n\r\n\t\tREQUIRE(cb.IndexLineStart(0, LineCharacterIndexType::Utf32) == 0);\r\n\t\tREQUIRE(cb.IndexLineStart(1, LineCharacterIndexType::Utf32) == 6);\r\n\t\tREQUIRE(cb.IndexLineStart(2, LineCharacterIndexType::Utf32) == 9);\r\n\r\n\t\t// Insert a NEL after the '!' to trigger the utf8 line end case ->\r\n\t\t// \"\\xE2!\\xC2\\x85 \\x82\\xACa\\n \\EF\\xF0\\x90\\x8D\\x88\\n z\\n\\n\" 5 lines\r\n\r\n\t\tconstexpr std::string_view nel = \"\\xC2\\x85\";\r\n\t\tcb.InsertString(2, nel.data(), nel.length(), startSequence);\r\n\r\n\t\tREQUIRE(cb.IndexLineStart(0, LineCharacterIndexType::Utf16) == 0);\r\n\t\tREQUIRE(cb.IndexLineStart(1, LineCharacterIndexType::Utf16) == 3);\r\n\t\tREQUIRE(cb.IndexLineStart(2, LineCharacterIndexType::Utf16) == 7);\r\n\t\tREQUIRE(cb.IndexLineStart(3, LineCharacterIndexType::Utf16) == 11);\r\n\r\n\t\tREQUIRE(cb.IndexLineStart(0, LineCharacterIndexType::Utf32) == 0);\r\n\t\tREQUIRE(cb.IndexLineStart(1, LineCharacterIndexType::Utf32) == 3);\r\n\t\tREQUIRE(cb.IndexLineStart(2, LineCharacterIndexType::Utf32) == 7);\r\n\t\tREQUIRE(cb.IndexLineStart(3, LineCharacterIndexType::Utf32) == 10);\r\n\t}\r\n\r\n\tSECTION(\"Delete Multiple lines\") {\r\n\t\tcb.SetUTF8Substance(true);\r\n\t\tcb.AllocateLineCharacterIndex(LineCharacterIndexType::Utf16 | LineCharacterIndexType::Utf32);\r\n\r\n\t\tbool startSequence = false;\r\n\t\t// 3 lines of text containing 8 bytes\r\n\t\tconstexpr std::string_view data = \"a\\n\\xF0\\x90\\x8D\\x88\\nz\\nc\";\r\n\t\tcb.InsertString(0, data.data(), data.length(), startSequence);\r\n\r\n\t\t// Delete first 2 new lines -> \"az\\nc\"\r\n\t\tcb.DeleteChars(1, data.length() - 4, startSequence);\r\n\r\n\t\tREQUIRE(cb.IndexLineStart(0, LineCharacterIndexType::Utf16) == 0);\r\n\t\tREQUIRE(cb.IndexLineStart(1, LineCharacterIndexType::Utf16) == 3);\r\n\t\tREQUIRE(cb.IndexLineStart(2, LineCharacterIndexType::Utf16) == 4);\r\n\r\n\t\tREQUIRE(cb.IndexLineStart(0, LineCharacterIndexType::Utf32) == 0);\r\n\t\tREQUIRE(cb.IndexLineStart(1, LineCharacterIndexType::Utf32) == 3);\r\n\t\tREQUIRE(cb.IndexLineStart(2, LineCharacterIndexType::Utf32) == 4);\r\n\t}\r\n\r\n\tSECTION(\"Delete Complex\") {\r\n\t\tcb.SetUTF8Substance(true);\r\n\t\tcb.AllocateLineCharacterIndex(LineCharacterIndexType::Utf16 | LineCharacterIndexType::Utf32);\r\n\r\n\t\tbool startSequence = false;\r\n\t\t// 3 lines of text containing 8 bytes\r\n\t\tconstexpr std::string_view data = \"a\\n\\xF0\\x90\\x8D\\x88\\nz\";\r\n\t\tcb.InsertString(0, data.data(), data.length(), startSequence);\r\n\r\n\t\t// Delete lead byte from character on line 1 ->\r\n\t\t// \"a\\n\\x90\\x8D\\x88\\nz\"\r\n\t\t// line 1 becomes 4 single byte characters\r\n\t\tcb.DeleteChars(2, 1, startSequence);\r\n\r\n\t\tREQUIRE(cb.IndexLineStart(0, LineCharacterIndexType::Utf16) == 0);\r\n\t\tREQUIRE(cb.IndexLineStart(1, LineCharacterIndexType::Utf16) == 2);\r\n\t\tREQUIRE(cb.IndexLineStart(2, LineCharacterIndexType::Utf16) == 6);\r\n\t\tREQUIRE(cb.IndexLineStart(3, LineCharacterIndexType::Utf16) == 7);\r\n\r\n\t\tREQUIRE(cb.IndexLineStart(0, LineCharacterIndexType::Utf32) == 0);\r\n\t\tREQUIRE(cb.IndexLineStart(1, LineCharacterIndexType::Utf32) == 2);\r\n\t\tREQUIRE(cb.IndexLineStart(2, LineCharacterIndexType::Utf32) == 6);\r\n\t\tREQUIRE(cb.IndexLineStart(3, LineCharacterIndexType::Utf32) == 7);\r\n\r\n\t\t// Delete first new line ->\r\n\t\t// \"a\\x90\\x8D\\x88\\nz\"\r\n\t\t// Only 2 lines with line 0 containing 5 single byte characters\r\n\t\tcb.DeleteChars(1, 1, startSequence);\r\n\r\n\t\tREQUIRE(cb.IndexLineStart(0, LineCharacterIndexType::Utf16) == 0);\r\n\t\tREQUIRE(cb.IndexLineStart(1, LineCharacterIndexType::Utf16) == 5);\r\n\t\tREQUIRE(cb.IndexLineStart(2, LineCharacterIndexType::Utf16) == 6);\r\n\r\n\t\tREQUIRE(cb.IndexLineStart(0, LineCharacterIndexType::Utf32) == 0);\r\n\t\tREQUIRE(cb.IndexLineStart(1, LineCharacterIndexType::Utf32) == 5);\r\n\t\tREQUIRE(cb.IndexLineStart(2, LineCharacterIndexType::Utf32) == 6);\r\n\r\n\t\t// Restore lead byte from character on line 0 making a 4-byte character ->\r\n\t\t// \"a\\xF0\\x90\\x8D\\x88\\nz\"\r\n\r\n\t\tconstexpr std::string_view lead4 = \"\\xF0\";\r\n\t\tcb.InsertString(1, lead4.data(), lead4.length(), startSequence);\r\n\r\n\t\tREQUIRE(cb.IndexLineStart(0, LineCharacterIndexType::Utf16) == 0);\r\n\t\tREQUIRE(cb.IndexLineStart(1, LineCharacterIndexType::Utf16) == 4);\r\n\t\tREQUIRE(cb.IndexLineStart(2, LineCharacterIndexType::Utf16) == 5);\r\n\r\n\t\tREQUIRE(cb.IndexLineStart(0, LineCharacterIndexType::Utf32) == 0);\r\n\t\tREQUIRE(cb.IndexLineStart(1, LineCharacterIndexType::Utf32) == 3);\r\n\t\tREQUIRE(cb.IndexLineStart(2, LineCharacterIndexType::Utf32) == 4);\r\n\t}\r\n\r\n\tSECTION(\"Insert separates new line bytes\") {\r\n\t\tcb.SetUTF8Substance(true);\r\n\t\tcb.AllocateLineCharacterIndex(LineCharacterIndexType::Utf16 | LineCharacterIndexType::Utf32);\r\n\r\n\t\tbool startSequence = false;\r\n\t\t// 2 lines of text containing 4 bytes\r\n\t\tconstexpr std::string_view data = \"a\\r\\nb\";\r\n\t\tcb.InsertString(0, data.data(), data.length(), startSequence);\r\n\r\n\t\t// 3 lines of text containing 5 bytes ->\r\n\t\t// \"a\\r!\\nb\"\r\n\t\tconstexpr std::string_view ascii = \"!\";\r\n\t\tcb.InsertString(2, ascii.data(), ascii.length(), startSequence);\r\n\r\n\t\tREQUIRE(cb.IndexLineStart(0, LineCharacterIndexType::Utf16) == 0);\r\n\t\tREQUIRE(cb.IndexLineStart(1, LineCharacterIndexType::Utf16) == 2);\r\n\t\tREQUIRE(cb.IndexLineStart(2, LineCharacterIndexType::Utf16) == 4);\r\n\t\tREQUIRE(cb.IndexLineStart(3, LineCharacterIndexType::Utf16) == 5);\r\n\t}\r\n}\r\n\r\nTEST_CASE(\"ChangeHistory\") {\r\n\r\n\tChangeHistory il;\r\n\tstruct Spanner {\r\n\t\tSci::Position position = 0;\r\n\t\tSci::Position length = 0;\r\n\t};\r\n\r\n\tSECTION(\"Start\") {\r\n\t\tREQUIRE(il.Length() == 0);\r\n\t\tREQUIRE(il.DeletionCount(0,0) == 0);\r\n\t\tREQUIRE(il.EditionAt(0) == 0);\r\n\t\tREQUIRE(il.EditionEndRun(0) == 0);\r\n\t\tREQUIRE(il.EditionDeletesAt(0) == 0);\r\n\t\tREQUIRE(il.EditionNextDelete(0) == 1);\r\n\t}\r\n\r\n\tSECTION(\"Some Space\") {\r\n\t\til.Insert(0, 10, false, true);\r\n\t\tREQUIRE(il.Length() == 10);\r\n\t\tREQUIRE(il.DeletionCount(0,10) == 0);\r\n\t\tREQUIRE(il.EditionAt(0) == 0);\r\n\t\tREQUIRE(il.EditionEndRun(0) == 10);\r\n\t\tREQUIRE(il.EditionDeletesAt(0) == 0);\r\n\t\tREQUIRE(il.EditionNextDelete(0) == 10);\r\n\t\tREQUIRE(il.EditionDeletesAt(10) == 0);\r\n\t\tREQUIRE(il.EditionNextDelete(10) == 11);\r\n\t}\r\n\r\n\tSECTION(\"An insert\") {\r\n\t\til.Insert(0, 7, false, true);\r\n\t\til.SetSavePoint();\r\n\t\til.Insert(2, 3, true, true);\r\n\t\tREQUIRE(il.Length() == 10);\r\n\t\tREQUIRE(il.DeletionCount(0,10) == 0);\r\n\r\n\t\tREQUIRE(il.EditionAt(0) == 0);\r\n\t\tREQUIRE(il.EditionEndRun(0) == 2);\r\n\t\tREQUIRE(il.EditionAt(2) == 2);\r\n\t\tREQUIRE(il.EditionEndRun(2) == 5);\r\n\t\tREQUIRE(il.EditionAt(5) == 0);\r\n\t\tREQUIRE(il.EditionEndRun(5) == 10);\r\n\t\tREQUIRE(il.EditionAt(10) == 0);\r\n\r\n\t\tREQUIRE(il.EditionDeletesAt(0) == 0);\r\n\t\tREQUIRE(il.EditionNextDelete(0) == 10);\r\n\t\tREQUIRE(il.EditionDeletesAt(10) == 0);\r\n\t}\r\n\r\n\tSECTION(\"A delete\") {\r\n\t\til.Insert(0, 10, false, true);\r\n\t\til.SetSavePoint();\r\n\t\til.DeleteRangeSavingHistory(2, 3, true, false);\r\n\t\tREQUIRE(il.Length() == 7);\r\n\t\tREQUIRE(il.DeletionCount(0,7) == 1);\r\n\r\n\t\tREQUIRE(il.EditionAt(0) == 0);\r\n\t\tREQUIRE(il.EditionEndRun(0) == 7);\r\n\t\tREQUIRE(il.EditionAt(7) == 0);\r\n\r\n\t\tREQUIRE(il.EditionDeletesAt(0) == 0);\r\n\t\tconst EditionSet one{ 2 };\r\n\t\tREQUIRE(il.EditionNextDelete(0) == 2);\r\n\t\tREQUIRE(il.EditionDeletesAt(2) == 2);\r\n\t\tREQUIRE(il.EditionNextDelete(2) == 7);\r\n\t\tREQUIRE(il.EditionDeletesAt(7) == 0);\r\n\t}\r\n\r\n\tSECTION(\"Insert, delete, and undo\") {\r\n\t\til.Insert(0, 9, false, true);\r\n\t\til.SetSavePoint();\r\n\t\til.Insert(3, 1, true, true);\r\n\t\tREQUIRE(il.EditionEndRun(0) == 3);\r\n\t\tREQUIRE(il.EditionAt(3) == 2);\r\n\t\tREQUIRE(il.EditionEndRun(3) == 4);\r\n\t\tREQUIRE(il.EditionAt(4) == 0);\r\n\r\n\t\til.DeleteRangeSavingHistory(2, 3, true, false);\r\n\t\tREQUIRE(il.Length() == 7);\r\n\t\tREQUIRE(il.DeletionCount(0,7) == 1);\r\n\r\n\t\tREQUIRE(il.EditionAt(0) == 0);\r\n\t\tREQUIRE(il.EditionEndRun(0) == 7);\r\n\t\tREQUIRE(il.EditionAt(7) == 0);\r\n\r\n\t\tREQUIRE(il.EditionDeletesAt(0) == 0);\r\n\t\tconst EditionSet one{ 2 };\r\n\t\tREQUIRE(il.EditionNextDelete(0) == 2);\r\n\t\tREQUIRE(il.EditionDeletesAt(2) == 2);\r\n\t\tREQUIRE(il.EditionNextDelete(2) == 7);\r\n\t\tREQUIRE(il.EditionDeletesAt(7) == 0);\r\n\r\n\t\t// Undo in detail (normally inside CellBuffer::PerformUndoStep)\r\n\t\til.UndoDeleteStep(2, 3, false);\r\n\t\tREQUIRE(il.Length() == 10);\r\n\t\tREQUIRE(il.DeletionCount(0, 10) == 0);\r\n\t\t// The insertion has reappeared\r\n\t\tREQUIRE(il.EditionEndRun(0) == 3);\r\n\t\tREQUIRE(il.EditionAt(3) == 2);\r\n\t\tREQUIRE(il.EditionEndRun(3) == 4);\r\n\t\tREQUIRE(il.EditionAt(4) == 0);\r\n\t}\r\n\r\n\tSECTION(\"Deletes\") {\r\n\t\til.Insert(0, 10, false, true);\r\n\t\til.SetSavePoint();\r\n\t\til.DeleteRangeSavingHistory(2, 3, true, false);\r\n\t\tREQUIRE(il.Length() == 7);\r\n\t\tREQUIRE(il.DeletionCount(0,7) == 1);\r\n\r\n\t\tREQUIRE(il.EditionDeletesAt(0) == 0);\r\n\t\tREQUIRE(il.EditionNextDelete(0) == 2);\r\n\t\tREQUIRE(il.EditionDeletesAt(2) == 2);\r\n\t\tREQUIRE(il.EditionNextDelete(2) == 7);\r\n\t\tREQUIRE(il.EditionDeletesAt(7) == 0);\r\n\r\n\t\til.DeleteRangeSavingHistory(2, 1, true, false);\r\n\t\tREQUIRE(il.Length() == 6);\r\n\t\tREQUIRE(il.DeletionCount(0,6) == 2);\r\n\r\n\t\tREQUIRE(il.EditionDeletesAt(0) == 0);\r\n\t\tREQUIRE(il.EditionNextDelete(0) == 2);\r\n\t\tREQUIRE(il.EditionDeletesAt(2) == 2);\r\n\t\tREQUIRE(il.EditionNextDelete(2) == 6);\r\n\t\tREQUIRE(il.EditionDeletesAt(6) == 0);\r\n\r\n\t\t// Undo in detail (normally inside CellBuffer::PerformUndoStep)\r\n\t\til.UndoDeleteStep(2, 1, false);\r\n\t\tREQUIRE(il.Length() == 7);\r\n\t\tREQUIRE(il.DeletionCount(0, 7) == 1);\r\n\r\n\t\t// Undo in detail (normally inside CellBuffer::PerformUndoStep)\r\n\t\til.UndoDeleteStep(2, 3, false);\r\n\t\tREQUIRE(il.Length() == 10);\r\n\t\tREQUIRE(il.DeletionCount(0, 10) == 0);\r\n\t}\r\n\r\n\tSECTION(\"Deletes 101\") {\r\n\t\t// Deletes that hit the start and end permanent positions\r\n\t\til.Insert(0, 3, false, true);\r\n\t\til.SetSavePoint();\r\n\t\tREQUIRE(il.DeletionCount(0, 2) == 0);\r\n\t\til.DeleteRangeSavingHistory(1, 1, true, false);\r\n\t\tREQUIRE(il.DeletionCount(0,2) == 1);\r\n\t\tconst EditionSet at1 = { {2, 1} };\r\n\t\tREQUIRE(il.DeletionsAt(1) == at1);\r\n\t\til.DeleteRangeSavingHistory(1, 1, false, false);\r\n\t\tREQUIRE(il.DeletionCount(0,1) == 2);\r\n\t\tconst EditionSet at2 = { {2, 1}, {3, 1} };\r\n\t\tREQUIRE(il.DeletionsAt(1) == at2);\r\n\t\til.DeleteRangeSavingHistory(0, 1, false, false);\r\n\t\tconst EditionSet at3 = { {2, 1}, {3, 2} };\r\n\t\tREQUIRE(il.DeletionsAt(0) == at3);\r\n\t\tREQUIRE(il.DeletionCount(0,0) == 3);\r\n\r\n\t\t// Undo them\r\n\t\til.UndoDeleteStep(0, 1, false);\r\n\t\tREQUIRE(il.DeletionCount(0, 1) == 2);\r\n\t\tREQUIRE(il.DeletionsAt(1) == at2);\r\n\t\til.UndoDeleteStep(1, 1, false);\r\n\t\tREQUIRE(il.DeletionCount(0, 2) == 1);\r\n\t\tREQUIRE(il.DeletionsAt(1) == at1);\r\n\t\til.UndoDeleteStep(1, 1, false);\r\n\t\tREQUIRE(il.DeletionCount(0, 3) == 0);\r\n\t}\r\n\r\n\tSECTION(\"Deletes Stack\") {\r\n\t\tstd::vector<Spanner> spans = {\r\n\t\t\t{5, 1},\r\n\t\t\t{4, 3},\r\n\t\t\t{1, 1},\r\n\t\t\t{1, 1},\r\n\t\t\t{0, 1},\r\n\t\t\t{0, 3},\r\n\t\t};\r\n\r\n\t\t// Deletes that hit the start and end permanent positions\r\n\t\til.Insert(0, 10, false, true);\r\n\t\tREQUIRE(il.Length() == 10);\r\n\t\til.SetSavePoint();\r\n\t\tREQUIRE(il.DeletionCount(0, 10) == 0);\r\n\t\tfor (size_t i = 0; i < std::size(spans); i++) {\r\n\t\t\til.DeleteRangeSavingHistory(spans[i].position, spans[i].length, false, false);\r\n\t\t}\r\n\t\tREQUIRE(il.Length() == 0);\r\n\t\tfor (size_t j = 0; j < std::size(spans); j++) {\r\n\t\t\tconst size_t i = std::size(spans) - j - 1;\r\n\t\t\til.UndoDeleteStep(spans[i].position, spans[i].length, false);\r\n\t\t}\r\n\t\tREQUIRE(il.DeletionCount(0, 10) == 0);\r\n\t\tREQUIRE(il.Length() == 10);\r\n\r\n\t}\r\n\r\n\tSECTION(\"Delete Contiguous Backward\") {\r\n\t\t// Deletes that touch\r\n\t\tconstexpr Sci::Position length = 20;\r\n\t\tconstexpr Sci::Position rounds = 8;\r\n\t\til.Insert(0, length, false, true);\r\n\t\tREQUIRE(il.Length() == length);\r\n\t\til.SetSavePoint();\r\n\t\tfor (Sci::Position i = 0; i < rounds; i++) {\r\n\t\t\til.DeleteRangeSavingHistory(9-i, 1, false, false);\r\n\t\t}\r\n\r\n\t\tconstexpr Sci::Position lengthAfterDeletions = length - rounds;\r\n\t\tREQUIRE(il.Length() == lengthAfterDeletions);\r\n\t\tREQUIRE(il.DeletionCount(0, lengthAfterDeletions) == rounds);\r\n\r\n\t\tfor (Sci::Position j = 0; j < rounds; j++) {\r\n\t\t\til.UndoDeleteStep(2+j, 1, false);\r\n\t\t}\r\n\r\n\t\t// Restored to original\r\n\t\tREQUIRE(il.DeletionCount(0, length) == 0);\r\n\t\tREQUIRE(il.Length() == length);\r\n\t}\r\n\r\n\tSECTION(\"Delete Contiguous Forward\") {\r\n\t\t// Deletes that touch\r\n\t\tconstexpr size_t length = 20;\r\n\t\tconstexpr size_t rounds = 8;\r\n\t\til.Insert(0, length, false, true);\r\n\t\tREQUIRE(il.Length() == length);\r\n\t\til.SetSavePoint();\r\n\t\tfor (size_t i = 0; i < rounds; i++) {\r\n\t\t\til.DeleteRangeSavingHistory(2,1, false, false);\r\n\t\t}\r\n\r\n\t\tconstexpr size_t lengthAfterDeletions = length - rounds;\r\n\t\tREQUIRE(il.Length() == lengthAfterDeletions);\r\n\t\tREQUIRE(il.DeletionCount(0, lengthAfterDeletions) == rounds);\r\n\r\n\t\tfor (size_t j = 0; j < rounds; j++) {\r\n\t\t\til.UndoDeleteStep(2, 1, false);\r\n\t\t}\r\n\r\n\t\t// Restored to original\r\n\t\tREQUIRE(il.Length() == length);\r\n\t\tREQUIRE(il.DeletionCount(0, length) == 0);\r\n\t}\r\n}\r\n\r\nstruct InsertionResult {\r\n\tSci::Position position;\r\n\tSci::Position length;\r\n\tint state;\r\n\tbool operator==(const InsertionResult &other) const noexcept {\r\n\t\treturn position == other.position &&\r\n\t\t\tlength == other.length &&\r\n\t\t\tstate == other.state;\r\n\t}\r\n};\r\n\r\nstd::ostream &operator << (std::ostream &os, InsertionResult const &value) {\r\n\tos << value.position << \" \" << value.length << \" \" << value.state;\r\n\treturn os;\r\n}\r\n\r\nusing Insertions = std::vector<InsertionResult>;\r\n\r\nstd::ostream &operator << (std::ostream &os, Insertions const &value) {\r\n\tos << \"(\";\r\n\tfor (const InsertionResult &el : value) {\r\n\t\tos << \"(\" << el << \") \";\r\n\t}\r\n\tos << \")\";\r\n\treturn os;\r\n}\r\n\r\nInsertions HistoryInsertions(const CellBuffer &cb) {\r\n\tInsertions result;\r\n\tSci::Position startPos = 0;\r\n\twhile (startPos < cb.Length()) {\r\n\t\tconst Sci::Position endPos = cb.EditionEndRun(startPos);\r\n\t\tconst int ed = cb.EditionAt(startPos);\r\n\t\tif (ed) {\r\n\t\t\tresult.push_back({ startPos, endPos - startPos, ed });\r\n\t\t}\r\n\t\tstartPos = endPos;\r\n\t}\r\n\treturn result;\r\n}\r\n\r\nstruct DeletionResult {\r\n\tSci::Position position;\r\n\tint state;\r\n\tbool operator==(const DeletionResult &other) const noexcept {\r\n\t\treturn position == other.position &&\r\n\t\t\tstate == other.state;\r\n\t}\r\n};\r\n\r\nstd::ostream &operator << (std::ostream &os, DeletionResult const &value) {\r\n\tos << value.position << \" \" << value.state;\r\n\treturn os;\r\n}\r\n\r\nusing Deletions = std::vector<DeletionResult>;\r\n\r\nstd::ostream &operator << (std::ostream &os, Deletions const &value) {\r\n\tos << \"(\";\r\n\tfor (const DeletionResult &el : value) {\r\n\t\tos << \"(\" << el << \") \";\r\n\t}\r\n\tos << \")\";\r\n\treturn os;\r\n}\r\n\r\nDeletions HistoryDeletions(const CellBuffer &cb) {\r\n\tDeletions result;\r\n\tSci::Position positionDeletion = 0;\r\n\twhile (positionDeletion <= cb.Length()) {\r\n\t\tconst unsigned int editions = cb.EditionDeletesAt(positionDeletion);\r\n\t\tif (editions & 1) {\r\n\t\t\tresult.push_back({ positionDeletion, 1 });\r\n\t\t}\r\n\t\tif (editions & 2) {\r\n\t\t\tresult.push_back({ positionDeletion, 2 });\r\n\t\t}\r\n\t\tif (editions & 4) {\r\n\t\t\tresult.push_back({ positionDeletion, 3 });\r\n\t\t}\r\n\t\tif (editions & 8) {\r\n\t\t\tresult.push_back({ positionDeletion, 4 });\r\n\t\t}\r\n\t\tpositionDeletion = cb.EditionNextDelete(positionDeletion);\r\n\t}\r\n\treturn result;\r\n}\r\n\r\nstruct History {\r\n\tInsertions insertions;\r\n\tDeletions deletions;\r\n\tbool operator==(const History &other) const {\r\n\t\treturn insertions == other.insertions &&\r\n\t\t\tdeletions == other.deletions;\r\n\t}\r\n};\r\n\r\nstd::ostream &operator << (std::ostream &os, History const &value) {\r\n\tos << value.insertions << \" \" << value.deletions;\r\n\treturn os;\r\n}\r\n\r\nHistory HistoryOf(const CellBuffer &cb) {\r\n\treturn { HistoryInsertions(cb), HistoryDeletions(cb) };\r\n}\r\n\r\nvoid UndoBlock(CellBuffer &cb) {\r\n\tconst int steps = cb.StartUndo();\r\n\tfor (int step = 0; step < steps; step++) {\r\n\t\tcb.PerformUndoStep();\r\n\t}\r\n}\r\n\r\nvoid RedoBlock(CellBuffer &cb) {\r\n\tconst int steps = cb.StartRedo();\r\n\tfor (int step = 0; step < steps; step++) {\r\n\t\tcb.PerformRedoStep();\r\n\t}\r\n}\r\n\r\nTEST_CASE(\"CellBufferWithChangeHistory\") {\r\n\r\n\tSECTION(\"StraightUndoRedoSaveRevertRedo\") {\r\n\t\tCellBuffer cb(true, false);\r\n\t\tcb.SetUndoCollection(false);\r\n\t\tconstexpr std::string_view sInsert = \"abcdefghijklmnopqrstuvwxyz\";\r\n\t\tbool startSequence = false;\r\n\t\tcb.InsertString(0, sInsert.data(), sInsert.length(), startSequence);\r\n\t\tcb.SetUndoCollection(true);\r\n\t\tcb.SetSavePoint();\r\n\t\tcb.ChangeHistorySet(true);\r\n\r\n\t\tconst History history0 { {}, {} };\r\n\t\tREQUIRE(HistoryOf(cb) == history0);\r\n\r\n\t\t// 1\r\n\t\tcb.InsertString(4, \"_\", 1, startSequence);\r\n\t\tconst History history1{ {{4, 1, 3}}, {} };\r\n\t\tREQUIRE(HistoryOf(cb) == history1);\r\n\r\n\t\t// 2\r\n\t\tcb.DeleteChars(2, 1, startSequence);\r\n\t\tconst History history2{ {{3, 1, 3}},\r\n\t\t\t{{2, 3}} };\r\n\t\tREQUIRE(HistoryOf(cb) == history2);\r\n\r\n\t\t// 3\r\n\t\tcb.InsertString(1, \"[!]\", 3, startSequence);\r\n\t\tconst History history3{ { {1, 3, 3}, {6, 1, 3} },\r\n\t\t\t{ {5, 3} } };\r\n\t\tREQUIRE(HistoryOf(cb) == history3);\r\n\r\n\t\t// 4\r\n\t\tcb.DeleteChars(2, 1, startSequence);\t// Inside an insertion\r\n\t\tconst History history4{ { {1, 2, 3}, {5, 1, 3} },\r\n\t\t\t{ {2, 3}, {4, 3} }};\r\n\t\tREQUIRE(HistoryOf(cb) == history4);\r\n\r\n\t\t// 5 Delete all the insertions and deletions\r\n\t\tcb.DeleteChars(1, 6, startSequence);\t// Inside an insertion\r\n\t\tconst History history5{ { },\r\n\t\t\t{ {1, 3} } };\r\n\t\tREQUIRE(HistoryOf(cb) == history5);\r\n\r\n\t\t// Undo all\r\n\t\tUndoBlock(cb);\r\n\t\tREQUIRE(HistoryOf(cb) == history4);\r\n\r\n\t\tUndoBlock(cb);\r\n\t\tREQUIRE(HistoryOf(cb) == history3);\r\n\r\n\t\tUndoBlock(cb);\r\n\t\tREQUIRE(HistoryOf(cb) == history2);\r\n\r\n\t\tUndoBlock(cb);\r\n\t\tREQUIRE(HistoryOf(cb) == history1);\r\n\r\n\t\tUndoBlock(cb);\r\n\t\tREQUIRE(HistoryOf(cb) == history0);\r\n\r\n\t\t// Redo all\r\n\t\tRedoBlock(cb);\r\n\t\tREQUIRE(HistoryOf(cb) == history1);\r\n\r\n\t\tRedoBlock(cb);\r\n\t\tREQUIRE(HistoryOf(cb) == history2);\r\n\r\n\t\tRedoBlock(cb);\r\n\t\tREQUIRE(HistoryOf(cb) == history3);\r\n\r\n\t\tRedoBlock(cb);\r\n\t\tREQUIRE(HistoryOf(cb) == history4);\r\n\r\n\t\tRedoBlock(cb);\r\n\t\tREQUIRE(HistoryOf(cb) == history5);\r\n\r\n\t\tcb.SetSavePoint();\r\n\t\tconst History history5s{ { },\r\n\t\t\t{ {1, 2} } };\r\n\t\tREQUIRE(HistoryOf(cb) == history5s);\r\n\r\n\t\t// Change past save point\r\n\t\tcb.InsertString(4, \"123\", 3, startSequence);\r\n\t\tconst History history6{ { {4, 3, 3} },\r\n\t\t\t{ {1, 2} } };\r\n\t\tREQUIRE(HistoryOf(cb) == history6);\r\n\r\n\t\t// Undo to save point: same as 5 but with save state instead of unsaved\r\n\t\tUndoBlock(cb);\r\n\t\tREQUIRE(HistoryOf(cb) == history5s);\r\n\r\n\t\t// Reverting past save point, similar to 4 but with most saved and\r\n\t\t// reverted delete at 1\r\n\t\tUndoBlock(cb);\t// Reinsert most of original changes\r\n\t\tconst History history4s{ { {1, 2, 4}, {3, 2, 1}, {5, 1, 4}, {6, 1, 1} },\r\n\t\t\t{ {2, 2}, {4, 2} } };\r\n\t\tREQUIRE(HistoryOf(cb) == history4s);\r\n\r\n\t\tUndoBlock(cb);\t// Reinsert \"!\", \r\n\t\tconst History history3s{ { {1, 3, 4}, {4, 2, 1}, {6, 1, 4}, {7, 1, 1} },\r\n\t\t\t{ {5, 2} } };\r\n\t\tREQUIRE(HistoryOf(cb) == history3s);\r\n\r\n\t\tUndoBlock(cb);\t// Revert insertion of [!]\r\n\t\tconst History history2s{ { {1, 2, 1}, {3, 1, 4}, {4, 1, 1} },\r\n\t\t\t{ {1, 1}, {2, 2} } };\r\n\t\tREQUIRE(HistoryOf(cb) == history2s);\r\n\r\n\t\tUndoBlock(cb);\t// Revert deletion, inserts at 2\r\n\t\tconst History history1s{ { {1, 3, 1}, {4, 1, 4}, {5, 1, 1} },\r\n\t\t\t{ {1, 1} } };\r\n\t\tREQUIRE(HistoryOf(cb) == history1s);\r\n\r\n\t\tUndoBlock(cb);\t// Revert insertion of _ at 4, drops middle insertion run\r\n\t\t// So merges down to 1 insertion\r\n\t\tconst History history0s{ { {1, 4, 1} },\r\n\t\t\t{ {1, 1}, {4, 1} } };\r\n\t\tREQUIRE(HistoryOf(cb) == history0s);\r\n\r\n\t\t// At origin but with changes from disk\r\n\t\t// Now redo the steps\r\n\r\n\t\tRedoBlock(cb);\r\n\t\tREQUIRE(HistoryOf(cb) == history1s);\r\n\r\n\t\tRedoBlock(cb);\r\n\t\tREQUIRE(HistoryOf(cb) == history2s);\r\n\r\n\t\tRedoBlock(cb);\r\n\t\tREQUIRE(HistoryOf(cb) == history3s);\r\n\r\n\t\tRedoBlock(cb);\r\n\t\tREQUIRE(HistoryOf(cb) == history4s);\r\n\r\n\t\tRedoBlock(cb);\r\n\t\tREQUIRE(HistoryOf(cb) == history5s);\r\n\r\n\t\tRedoBlock(cb);\r\n\t\tREQUIRE(HistoryOf(cb) == history6);\r\n\t}\r\n\r\n\tSECTION(\"Detached\") {\r\n\t\tCellBuffer cb(true, false);\r\n\t\tcb.SetUndoCollection(false);\r\n\t\tconstexpr std::string_view sInsert = \"abcdefghijklmnopqrstuvwxyz\";\r\n\t\tbool startSequence = false;\r\n\t\tcb.InsertString(0, sInsert.data(), sInsert.length(), startSequence);\r\n\t\tcb.SetUndoCollection(true);\r\n\t\tcb.SetSavePoint();\r\n\t\tcb.ChangeHistorySet(true);\r\n\r\n\t\tconst History history0{ {}, {} };\r\n\t\tREQUIRE(HistoryOf(cb) == history0);\r\n\r\n\t\t// 1\r\n\t\tcb.InsertString(4, \"_\", 1, startSequence);\r\n\t\tconst History history1{ {{4, 1, 3}}, {} };\r\n\t\tREQUIRE(HistoryOf(cb) == history1);\r\n\r\n\t\t// 2\r\n\t\tcb.DeleteChars(2, 1, startSequence);\r\n\t\tconst History history2{ {{3, 1, 3}},\r\n\t\t\t{{2, 3}} };\r\n\t\tREQUIRE(HistoryOf(cb) == history2);\r\n\r\n\t\tcb.SetSavePoint();\r\n\r\n\t\tUndoBlock(cb);\r\n\t\tconst History history1s{ {{2, 1, 1}, {4, 1, 2}}, {} };\r\n\t\tREQUIRE(HistoryOf(cb) == history1s);\r\n\r\n\t\tcb.InsertString(6, \"()\", 2, startSequence);\r\n\t\tconst History detached2{ {{2, 1, 1}, {4, 1, 2}, {6, 2, 3}}, {} };\r\n\t\tREQUIRE(HistoryOf(cb) == detached2);\r\n\r\n\t\tcb.DeleteChars(9, 3, startSequence);\r\n\t\tconst History detached3{ {{2, 1, 1}, {4, 1, 2}, {6, 2, 3}}, {{9,3}} };\r\n\t\tREQUIRE(HistoryOf(cb) == detached3);\r\n\r\n\t\tUndoBlock(cb);\r\n\t\tREQUIRE(HistoryOf(cb) == detached2);\r\n\t\tUndoBlock(cb);\r\n\t\tconst History detached1{ {{2, 1, 1}, {4, 1, 2}}, {} };\r\n\t\tREQUIRE(HistoryOf(cb) == detached1);\r\n\t\tUndoBlock(cb);\r\n\t\tconst History detached0{ {{2, 1, 1}}, {{4,1}} };\r\n\t\tREQUIRE(HistoryOf(cb) == detached0);\r\n\t\tREQUIRE(!cb.CanUndo());\r\n\r\n\t\tRedoBlock(cb);\r\n\t\tREQUIRE(HistoryOf(cb) == detached1);\r\n\t\tRedoBlock(cb);\r\n\t\tREQUIRE(HistoryOf(cb) == detached2);\r\n\t\tRedoBlock(cb);\r\n\t\tREQUIRE(HistoryOf(cb) == detached3);\r\n\t}\r\n}\r\n\r\nnamespace {\r\n\r\nvoid PushUndoAction(CellBuffer &cb, int type, Sci::Position pos, std::string_view sv) {\r\n\tcb.PushUndoActionType(type, pos);\r\n\tcb.ChangeLastUndoActionText(sv.length(), sv.data());\r\n}\r\n\r\n}\r\n\r\nTEST_CASE(\"CellBufferLoadUndoHistory\") {\r\n\r\n\tCellBuffer cb(false, false);\r\n\tconstexpr int remove = 1;\r\n\tconstexpr int insert = 0;\r\n\r\n\tSECTION(\"Basics\") {\r\n\t\tcb.SetUndoCollection(false);\r\n\t\tconstexpr std::string_view sInsert = \"abcdef\";\r\n\t\tbool startSequence = false;\r\n\t\tcb.InsertString(0, sInsert.data(), sInsert.length(), startSequence);\r\n\t\tcb.SetUndoCollection(true);\r\n\t\tcb.ChangeHistorySet(true);\r\n\r\n\t\t// Create an undo history that matches the contents at current point 2\r\n\t\t// So, 2 actions; current point; 2 actions\r\n\t\t// a_cdef\r\n\t\tPushUndoAction(cb, remove, 1, \"_\");\r\n\t\t// acdef\r\n\t\tPushUndoAction(cb, insert, 1, \"b\");\r\n\t\t// abcdef -> current\r\n\t\tPushUndoAction(cb, remove, 3, \"d\");\r\n\t\t// abcef -> save\r\n\t\tPushUndoAction(cb, insert, 3, \"*\");\r\n\t\t// abc*ef\r\n\t\tcb.SetUndoSavePoint(3);\r\n\t\tcb.SetUndoDetach(-1);\r\n\t\tcb.SetUndoTentative(-1);\r\n\t\tcb.SetUndoCurrent(2);\r\n\r\n\t\t// 2nd insertion is removed from change history as it isn't visible and isn't saved\r\n\t\t// 2nd deletion is visible (as insertion) as it was saved but then reverted to original\r\n\t\t// 1st insertion and 1st deletion are both visible as saved\r\n\t\tconst History hist{ {{1, 1, changeSaved}, {3, 1, changeRevertedOriginal}}, {{2, changeSaved}} };\r\n\t\tREQUIRE(HistoryOf(cb) == hist);\r\n\t}\r\n\r\n\tSECTION(\"Detached\") {\r\n\t\tcb.SetUndoCollection(false);\r\n\t\tconstexpr std::string_view sInsert = \"a-b=cdef\";\r\n\t\tbool startSequence = false;\r\n\t\tcb.InsertString(0, sInsert.data(), sInsert.length(), startSequence);\r\n\t\tcb.SetUndoCollection(true);\r\n\t\tcb.ChangeHistorySet(true);\r\n\r\n\t\t// Create an undo history that matches the contents at current point 2 which detached at 1\r\n\t\t// So, insert saved; insert detached; current point\r\n\t\t// abcdef\r\n\t\tPushUndoAction(cb, insert, 1, \"-\");\r\n\t\t// a-bcdef\r\n\t\tPushUndoAction(cb, insert, 3, \"=\");\r\n\t\t// a-b=cdef\r\n\t\tcb.SetUndoSavePoint(-1);\r\n\t\tcb.SetUndoDetach(1);\r\n\t\tcb.SetUndoTentative(-1);\r\n\t\tcb.SetUndoCurrent(2);\r\n\r\n\t\t// This doesn't show elements due to undo.\r\n\t\t// There was also a modified delete (reverting the insert) at 3 in the original but that is missing.\r\n\t\tconst History hist{ {{1, 1, changeSaved}, {3, 1, changeModified}}, {} };\r\n\t\tREQUIRE(HistoryOf(cb) == hist);\r\n\t}\r\n\r\n}\r\n\r\nnamespace {\r\n\r\n// Implement low quality reproducible pseudo-random numbers.\r\n// Pseudo-random algorithm based on R. G. Dromey \"How to Solve it by Computer\" page 122.\r\n\r\nclass RandomSequence {\r\n\tstatic constexpr int mult = 109;\r\n\tstatic constexpr int incr = 853;\r\n\tstatic constexpr int modulus = 4096;\r\n\tint randomValue = 127;\r\npublic:\r\n\tint Next() noexcept {\r\n\t\trandomValue = (mult * randomValue + incr) % modulus;\r\n\t\treturn randomValue;\r\n\t}\r\n};\r\n\r\n}\r\n\r\n#if 1\r\nTEST_CASE(\"CellBufferLong\") {\r\n\r\n\t// Call methods on CellBuffer pseudo-randomly trying  to trigger assertion failures\r\n\r\n\tCellBuffer cb(true, false);\r\n\r\n\tSECTION(\"Random\") {\r\n\t\tRandomSequence rseq;\r\n\t\tfor (size_t i = 0; i < 20000; i++) {\r\n\t\t\tconst int r = rseq.Next() % 10;\r\n\t\t\tif (r <= 2) {\t\t\t// 30%\r\n\t\t\t\t// Insert text\r\n\t\t\t\tconst Sci::Position pos = rseq.Next() % (cb.Length() + 1);\r\n\t\t\t\tconst int len = rseq.Next() % 10 + 1;\r\n\t\t\t\tstd::string sInsert;\r\n\t\t\t\tfor (int j = 0; j < len; j++) {\r\n\t\t\t\t\tsInsert.push_back(static_cast<char>('a' + j));\r\n\t\t\t\t}\r\n\t\t\t\tbool startSequence = false;\r\n\t\t\t\tcb.InsertString(pos, sInsert.c_str(), len, startSequence);\r\n\t\t\t} else if (r <= 5) {\t// 30%\r\n\t\t\t\t// Delete Text\r\n\t\t\t\tconst Sci::Position pos = rseq.Next() % (cb.Length() + 1);\r\n\t\t\t\tconst int len = rseq.Next() % 10 + 1;\r\n\t\t\t\tif (pos + len <= cb.Length()) {\r\n\t\t\t\t\tbool startSequence = false;\r\n\t\t\t\t\tcb.DeleteChars(pos, len, startSequence);\r\n\t\t\t\t}\r\n\t\t\t} else if (r <= 8) {\t// 30%\r\n\t\t\t\t// Undo or redo\r\n\t\t\t\tconst bool undo = rseq.Next() % 2 == 1;\r\n\t\t\t\tif (undo) {\r\n\t\t\t\t\tUndoBlock(cb);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tRedoBlock(cb);\r\n\t\t\t\t}\r\n\t\t\t} else {\t// 10%\r\n\t\t\t\t// Save\r\n\t\t\t\tcb.SetSavePoint();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n#endif\r\n"
  },
  {
    "path": "scintilla/test/unit/testCharClassify.cxx",
    "content": "/** @file testCharClassify.cxx\r\n ** Unit Tests for Scintilla internal data structures\r\n **/\r\n\r\n#include <cstring>\r\n\r\n#include <string_view>\r\n#include <vector>\r\n#include <optional>\r\n#include <algorithm>\r\n#include <memory>\r\n#include <iostream>\r\n\r\n#include \"Debugging.h\"\r\n\r\n#include \"CharClassify.h\"\r\n\r\n#include \"catch.hpp\"\r\n\r\nusing namespace Scintilla::Internal;\r\n\r\n// Test CharClassify.\r\n\r\nclass CharClassifyTest {\r\nprotected:\r\n\tCharClassifyTest() {\r\n\t\tpcc = std::make_unique<CharClassify>();\r\n\t\tfor (int ch = 0; ch < 256; ch++) {\r\n\t\t\tif (ch == '\\r' || ch == '\\n')\r\n\t\t\t\tcharClass[ch] = CharacterClass::newLine;\r\n\t\t\telse if (ch < 0x20 || ch == ' ' || ch == '\\x7f')\r\n\t\t\t\tcharClass[ch] = CharacterClass::space;\r\n\t\t\telse if (ch >= 0x80 || isalnum(ch) || ch == '_')\r\n\t\t\t\tcharClass[ch] = CharacterClass::word;\r\n\t\t\telse\r\n\t\t\t\tcharClass[ch] = CharacterClass::punctuation;\r\n\t\t}\r\n\t}\r\n\t// Avoid warnings, deleted so never called.\r\n\tCharClassifyTest(const CharClassifyTest &) = delete;\r\n\r\n\tstd::unique_ptr<CharClassify> pcc;\r\n\tCharacterClass charClass[256] {};\r\n\r\n\tstatic const char* GetClassName(CharacterClass charClass) noexcept {\r\n\t\tswitch(charClass) {\r\n\t\t\t#define CASE(c) case CharacterClass::c: return #c\r\n\t\t\tCASE(space);\r\n\t\t\tCASE(newLine);\r\n\t\t\tCASE(word);\r\n\t\t\tCASE(punctuation);\r\n\t\t\t#undef CASE\r\n\t\t\tdefault:\r\n\t\t\t\treturn \"<unknown>\";\r\n\t\t}\r\n\t}\r\n};\r\n\r\nTEST_CASE_METHOD(CharClassifyTest, \"Defaults\") {\r\n\tfor (int i = 0; i < 256; i++) {\r\n\t\tif (charClass[i] != pcc->GetClass(i))\r\n\t\t\tstd::cerr\r\n\t\t\t<< \"Character \" << i\r\n\t\t\t<< \" should be class \" << GetClassName(charClass[i])\r\n\t\t\t<< \", but got \" << GetClassName(pcc->GetClass(i)) << std::endl;\r\n\t\tREQUIRE(charClass[i] == pcc->GetClass(i));\r\n\t}\r\n}\r\n\r\nTEST_CASE_METHOD(CharClassifyTest, \"Custom\") {\r\n\tunsigned char buf[2] = {0, 0};\r\n\tfor (int i = 0; i < 256; i++) {\r\n\t\tconst CharacterClass thisClass = static_cast<CharacterClass>(i % 4);\r\n\t\tbuf[0] = i;\r\n\t\tpcc->SetCharClasses(buf, thisClass);\r\n\t\tcharClass[i] = thisClass;\r\n\t}\r\n\tfor (int i = 0; i < 256; i++) {\r\n\t\tif (charClass[i] != pcc->GetClass(i))\r\n\t\t\tstd::cerr\r\n\t\t\t<< \"Character \" << i\r\n\t\t\t<< \" should be class \" << GetClassName(charClass[i])\r\n\t\t\t<< \", but got \" << GetClassName(pcc->GetClass(i)) << std::endl;\r\n\t\tREQUIRE(charClass[i] == pcc->GetClass(i));\r\n\t}\r\n}\r\n\r\nTEST_CASE_METHOD(CharClassifyTest, \"CharsOfClass\") {\r\n\tunsigned char buf[2] = {0, 0};\r\n\tfor (int i = 1; i < 256; i++) {\r\n\t\tconst CharacterClass thisClass = static_cast<CharacterClass>(i % 4);\r\n\t\tbuf[0] = i;\r\n\t\tpcc->SetCharClasses(buf, thisClass);\r\n\t\tcharClass[i] = thisClass;\r\n\t}\r\n\tfor (int classVal = 0; classVal < 4; ++classVal) {\r\n\t\tconst CharacterClass thisClass = static_cast<CharacterClass>(classVal % 4);\r\n\t\tconst int size = pcc->GetCharsOfClass(thisClass, nullptr);\r\n\t\tstd::vector<unsigned char> buffer(size+1);\r\n\t\tconst unsigned char *pBuffer = buffer.data();\r\n\t\tpcc->GetCharsOfClass(thisClass, buffer.data());\r\n\t\tfor (int i = 1; i < 256; i++) {\r\n\t\t\tif (charClass[i] == thisClass) {\r\n\t\t\t\tif (!memchr(pBuffer, i, size))\r\n\t\t\t\t\tstd::cerr\r\n\t\t\t\t\t<< \"Character \" << i\r\n\t\t\t\t\t<< \" should be class \" << GetClassName(thisClass)\r\n\t\t\t\t\t<< \", but was not in GetCharsOfClass;\"\r\n\t\t\t\t\t<< \" it is reported to be \"\r\n\t\t\t\t\t<< GetClassName(pcc->GetClass(i)) << std::endl;\r\n\t\t\t\tREQUIRE(memchr(pBuffer, i, size));\r\n\t\t\t} else {\r\n\t\t\t\tif (memchr(pBuffer, i, size))\r\n\t\t\t\t\tstd::cerr\r\n\t\t\t\t\t<< \"Character \" << i\r\n\t\t\t\t\t<< \" should not be class \" << GetClassName(thisClass)\r\n\t\t\t\t\t<< \", but was in GetCharsOfClass\"\r\n\t\t\t\t\t<< \" it is reported to be \"\r\n\t\t\t\t\t<< GetClassName(pcc->GetClass(i)) << std::endl;\r\n\t\t\t\tREQUIRE_FALSE(memchr(pBuffer, i, size));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n"
  },
  {
    "path": "scintilla/test/unit/testCharacterCategoryMap.cxx",
    "content": "/** @file testCharacterCategoryMap.cxx\r\n ** Unit Tests for Scintilla internal data structures\r\n **/\r\n\r\n#include <cstddef>\r\n#include <cstring>\r\n#include <stdexcept>\r\n#include <string_view>\r\n#include <vector>\r\n#include <optional>\r\n#include <algorithm>\r\n#include <memory>\r\n\r\n#include \"Debugging.h\"\r\n\r\n#include \"CharacterCategoryMap.h\"\r\n\r\n#include \"catch.hpp\"\r\n\r\nusing namespace Scintilla;\r\nusing namespace Scintilla::Internal;\r\n\r\n// Test CharacterCategoryMap.\r\n\r\nTEST_CASE(\"CharacterCategoryMap\") {\r\n\r\n\tconst CharacterCategoryMap ccm;\r\n\r\n\tSECTION(\"LowerCaseLetter\") {\r\n\t\tconst CharacterCategory cc = ccm.CategoryFor('a');\r\n\t\tREQUIRE(cc == CharacterCategory::ccLl);\r\n\t}\r\n\r\n\tSECTION(\"All\") {\r\n\t\tREQUIRE(ccm.CategoryFor('A') == CharacterCategory::ccLu);\r\n\t\tREQUIRE(ccm.CategoryFor('a') == CharacterCategory::ccLl);\r\n\t\tREQUIRE(ccm.CategoryFor(0x01C5) == CharacterCategory::ccLt);\r\n\t\tREQUIRE(ccm.CategoryFor(0x0E46) == CharacterCategory::ccLm);\r\n\t\tREQUIRE(ccm.CategoryFor(0x4E00) == CharacterCategory::ccLo);\r\n\r\n\t\tREQUIRE(ccm.CategoryFor(0x0300) == CharacterCategory::ccMn);\r\n\t\tREQUIRE(ccm.CategoryFor(0x0903) == CharacterCategory::ccMc);\r\n\t\tREQUIRE(ccm.CategoryFor(0x20E0) == CharacterCategory::ccMe);\r\n\r\n\t\tREQUIRE(ccm.CategoryFor('7') == CharacterCategory::ccNd);\r\n\t\tREQUIRE(ccm.CategoryFor(0x2160) == CharacterCategory::ccNl);\r\n\t\tREQUIRE(ccm.CategoryFor(0x00BC) == CharacterCategory::ccNo);\r\n\r\n\t\tREQUIRE(ccm.CategoryFor('_') == CharacterCategory::ccPc);\r\n\t\tREQUIRE(ccm.CategoryFor('-') == CharacterCategory::ccPd);\r\n\t\tREQUIRE(ccm.CategoryFor('(') == CharacterCategory::ccPs);\r\n\t\tREQUIRE(ccm.CategoryFor('}') == CharacterCategory::ccPe);\r\n\t\tREQUIRE(ccm.CategoryFor(0x00AB) == CharacterCategory::ccPi);\r\n\t\tREQUIRE(ccm.CategoryFor(0x00BB) == CharacterCategory::ccPf);\r\n\t\tREQUIRE(ccm.CategoryFor('\"') == CharacterCategory::ccPo);\r\n\r\n\t\tREQUIRE(ccm.CategoryFor('+') == CharacterCategory::ccSm);\r\n\t\tREQUIRE(ccm.CategoryFor('$') == CharacterCategory::ccSc);\r\n\t\tREQUIRE(ccm.CategoryFor(0x02C2) == CharacterCategory::ccSk);\r\n\t\tREQUIRE(ccm.CategoryFor(0x00A6) == CharacterCategory::ccSo);\r\n\r\n\t\tREQUIRE(ccm.CategoryFor(' ') == CharacterCategory::ccZs);\r\n\t\tREQUIRE(ccm.CategoryFor(0x2028) == CharacterCategory::ccZl);\r\n\t\tREQUIRE(ccm.CategoryFor(0x2029) == CharacterCategory::ccZp);\r\n\r\n\t\tREQUIRE(ccm.CategoryFor('\\n') == CharacterCategory::ccCc);\r\n\t\tREQUIRE(ccm.CategoryFor(0x00AD) == CharacterCategory::ccCf);\r\n\t\tREQUIRE(ccm.CategoryFor(0xD800) == CharacterCategory::ccCs);\r\n\t\tREQUIRE(ccm.CategoryFor(0xE000) == CharacterCategory::ccCo);\r\n\t\tREQUIRE(ccm.CategoryFor(0xFFFE) == CharacterCategory::ccCn);\r\n\t}\r\n\r\n}\r\n"
  },
  {
    "path": "scintilla/test/unit/testContractionState.cxx",
    "content": "/** @file testContractionState.cxx\r\n ** Unit Tests for Scintilla internal data structures\r\n **/\r\n\r\n#include <cstddef>\r\n#include <cstring>\r\n\r\n#include <stdexcept>\r\n#include <string_view>\r\n#include <vector>\r\n#include <optional>\r\n#include <algorithm>\r\n#include <memory>\r\n\r\n#include \"Debugging.h\"\r\n\r\n#include \"Position.h\"\r\n#include \"UniqueString.h\"\r\n#include \"SplitVector.h\"\r\n#include \"Partitioning.h\"\r\n#include \"RunStyles.h\"\r\n#include \"ContractionState.h\"\r\n\r\n#include \"catch.hpp\"\r\n\r\nusing namespace Scintilla::Internal;\r\n\r\n// Test ContractionState.\r\n\r\nTEST_CASE(\"ContractionState\") {\r\n\r\n\tstd::unique_ptr<IContractionState> pcs = ContractionStateCreate(false);\r\n\r\n\tSECTION(\"IsEmptyInitially\") {\r\n\t\tREQUIRE(1 == pcs->LinesInDoc());\r\n\t\tREQUIRE(1 == pcs->LinesDisplayed());\r\n\t\tREQUIRE(0 == pcs->DisplayFromDoc(0));\r\n\t\tREQUIRE(0 == pcs->DocFromDisplay(0));\r\n\t}\r\n\r\n\tSECTION(\"OneLine\") {\r\n\t\tpcs->InsertLines(0, 1);\r\n\t\tREQUIRE(2 == pcs->LinesInDoc());\r\n\t\tREQUIRE(2 == pcs->LinesDisplayed());\r\n\t\tREQUIRE(0 == pcs->DisplayFromDoc(0));\r\n\t\tREQUIRE(0 == pcs->DocFromDisplay(0));\r\n\t\tREQUIRE(1 == pcs->DisplayFromDoc(1));\r\n\t\tREQUIRE(1 == pcs->DocFromDisplay(1));\r\n\t}\r\n\r\n\tSECTION(\"InsertionThenDeletions\") {\r\n\t\tpcs->InsertLines(0,4);\r\n\t\tpcs->DeleteLines(1, 1);\r\n\r\n\t\tREQUIRE(4 == pcs->LinesInDoc());\r\n\t\tREQUIRE(4 == pcs->LinesDisplayed());\r\n\t\tfor (int l=0;l<4;l++) {\r\n\t\t\tREQUIRE(l == pcs->DisplayFromDoc(l));\r\n\t\t\tREQUIRE(l == pcs->DocFromDisplay(l));\r\n\t\t}\r\n\r\n\t\tpcs->DeleteLines(0,2);\r\n\t\tREQUIRE(2 == pcs->LinesInDoc());\r\n\t\tREQUIRE(2 == pcs->LinesDisplayed());\r\n\t\tfor (int l=0;l<2;l++) {\r\n\t\t\tREQUIRE(l == pcs->DisplayFromDoc(l));\r\n\t\t\tREQUIRE(l == pcs->DocFromDisplay(l));\r\n\t\t}\r\n\t}\r\n\r\n\tSECTION(\"ShowHide\") {\r\n\t\tpcs->InsertLines(0,4);\r\n\t\tREQUIRE(true == pcs->GetVisible(0));\r\n\t\tREQUIRE(true == pcs->GetVisible(1));\r\n\t\tREQUIRE(true == pcs->GetVisible(2));\r\n\t\tREQUIRE(5 == pcs->LinesDisplayed());\r\n\r\n\t\tpcs->SetVisible(1, 1, false);\r\n\t\tREQUIRE(true == pcs->GetVisible(0));\r\n\t\tREQUIRE(false == pcs->GetVisible(1));\r\n\t\tREQUIRE(true == pcs->GetVisible(2));\r\n\t\tREQUIRE(4 == pcs->LinesDisplayed());\r\n\t\tREQUIRE(true == pcs->HiddenLines());\r\n\r\n\t\tpcs->SetVisible(1, 2, true);\r\n\t\tfor (int l=0;l<4;l++) {\r\n\t\t\tREQUIRE(true == pcs->GetVisible(0));\r\n\t\t}\r\n\r\n\t\tpcs->SetVisible(1, 1, false);\r\n\t\tREQUIRE(false == pcs->GetVisible(1));\r\n\t\tpcs->ShowAll();\r\n\t\tfor (int l=0;l<4;l++) {\r\n\t\t\tREQUIRE(true == pcs->GetVisible(0));\r\n\t\t}\r\n\t\tREQUIRE(false == pcs->HiddenLines());\r\n\t}\r\n\r\n\tSECTION(\"Hidden\") {\r\n\t\tpcs->InsertLines(0,1);\r\n\t\tfor (int l=0;l<2;l++) {\r\n\t\t\tREQUIRE(true == pcs->GetVisible(0));\r\n\t\t}\r\n\t\tREQUIRE(false == pcs->HiddenLines());\r\n\r\n\t\tpcs->SetVisible(1, 1, false);\r\n\t\tREQUIRE(true == pcs->GetVisible(0));\r\n\t\tREQUIRE(false == pcs->GetVisible(1));\r\n\t\tREQUIRE(true == pcs->HiddenLines());\r\n\t\tREQUIRE(1 == pcs->LinesDisplayed());\r\n\r\n\t\tpcs->SetVisible(1, 1, true);\r\n\t\tfor (int l=0;l<2;l++) {\r\n\t\t\tREQUIRE(true == pcs->GetVisible(0));\r\n\t\t}\r\n\t\tREQUIRE(false == pcs->HiddenLines());\r\n\t}\r\n\r\n\tSECTION(\"Hide All\") {\r\n\t\tpcs->InsertLines(0,1);\r\n\t\tfor (int l=0;l<2;l++) {\r\n\t\t\tREQUIRE(true == pcs->GetVisible(0));\r\n\t\t}\r\n\t\tREQUIRE(false == pcs->HiddenLines());\r\n\r\n\t\tpcs->SetVisible(0, 1, false);\r\n\t\tREQUIRE(false == pcs->GetVisible(0));\r\n\t\tREQUIRE(false == pcs->GetVisible(1));\r\n\t\tREQUIRE(true == pcs->HiddenLines());\r\n\t\tREQUIRE(0 == pcs->LinesDisplayed());\r\n\t}\r\n\r\n\tSECTION(\"Contracting\") {\r\n\t\tpcs->InsertLines(0,4);\r\n\t\tfor (int l=0;l<4;l++) {\r\n\t\t\tREQUIRE(true == pcs->GetExpanded(l));\r\n\t\t}\r\n\r\n\t\tpcs->SetExpanded(2, false);\r\n\t\tREQUIRE(true == pcs->GetExpanded(1));\r\n\t\tREQUIRE(false == pcs->GetExpanded(2));\r\n\t\tREQUIRE(true == pcs->GetExpanded(3));\r\n\r\n\t\tREQUIRE(2 == pcs->ContractedNext(0));\r\n\t\tREQUIRE(2 == pcs->ContractedNext(1));\r\n\t\tREQUIRE(2 == pcs->ContractedNext(2));\r\n\t\tREQUIRE(-1 == pcs->ContractedNext(3));\r\n\r\n\t\tpcs->SetExpanded(2, true);\r\n\t\tREQUIRE(true == pcs->GetExpanded(1));\r\n\t\tREQUIRE(true == pcs->GetExpanded(2));\r\n\t\tREQUIRE(true == pcs->GetExpanded(3));\r\n\t}\r\n\r\n\tSECTION(\"ExpandAll\") {\r\n\t\tpcs->InsertLines(0,4);\r\n\t\tfor (int l=0;l<4;l++) {\r\n\t\t\tREQUIRE(true == pcs->GetExpanded(l));\r\n\t\t}\r\n\r\n\t\tpcs->SetExpanded(2, false);\r\n\t\tREQUIRE(true == pcs->GetExpanded(1));\r\n\t\tREQUIRE(false == pcs->GetExpanded(2));\r\n\t\tREQUIRE(true == pcs->GetExpanded(3));\r\n\r\n\t\tpcs->SetExpanded(1, false);\r\n\t\tREQUIRE(false == pcs->GetExpanded(1));\r\n\t\tREQUIRE(false == pcs->GetExpanded(2));\r\n\t\tREQUIRE(true == pcs->GetExpanded(3));\r\n\r\n\t\tREQUIRE(true == pcs->ExpandAll());\r\n\t\tREQUIRE(true == pcs->GetExpanded(1));\r\n\t\tREQUIRE(true == pcs->GetExpanded(2));\r\n\t\tREQUIRE(true == pcs->GetExpanded(3));\r\n\t}\r\n\r\n\tSECTION(\"ChangeHeight\") {\r\n\t\tpcs->InsertLines(0,4);\r\n\t\tfor (int l=0;l<4;l++) {\r\n\t\t\tREQUIRE(1 == pcs->GetHeight(l));\r\n\t\t}\r\n\r\n\t\tpcs->SetHeight(1, 2);\r\n\t\tREQUIRE(1 == pcs->GetHeight(0));\r\n\t\tREQUIRE(2 == pcs->GetHeight(1));\r\n\t\tREQUIRE(1 == pcs->GetHeight(2));\r\n\t}\r\n\r\n\tSECTION(\"SetFoldDisplayText\") {\r\n\t\tpcs->InsertLines(0, 4);\r\n\t\tREQUIRE(5 == pcs->LinesInDoc());\r\n\t\tpcs->SetFoldDisplayText(1, \"abc\");\r\n\t\tREQUIRE(strcmp(pcs->GetFoldDisplayText(1), \"abc\") == 0);\r\n\t\tpcs->SetFoldDisplayText(1, \"def\");\r\n\t\tREQUIRE(strcmp(pcs->GetFoldDisplayText(1), \"def\") == 0);\r\n\t\tpcs->SetFoldDisplayText(1, nullptr);\r\n\t\tREQUIRE(static_cast<const char *>(nullptr) == pcs->GetFoldDisplayText(1));\r\n\t\t// At end\r\n\t\tpcs->SetFoldDisplayText(5, \"xyz\");\r\n\t\tREQUIRE(strcmp(pcs->GetFoldDisplayText(5), \"xyz\") == 0);\r\n\t\tpcs->DeleteLines(4, 1);\r\n\t\tREQUIRE(strcmp(pcs->GetFoldDisplayText(4), \"xyz\") == 0);\r\n\t}\r\n\r\n}\r\n"
  },
  {
    "path": "scintilla/test/unit/testDecoration.cxx",
    "content": "/** @file testDecoration.cxx\r\n ** Unit Tests for Scintilla internal data structures\r\n **/\r\n\r\n#include <cstddef>\r\n#include <cstring>\r\n\r\n#include <stdexcept>\r\n#include <string_view>\r\n#include <vector>\r\n#include <optional>\r\n#include <algorithm>\r\n#include <memory>\r\n\r\n#include \"Debugging.h\"\r\n\r\n#include \"Position.h\"\r\n#include \"SplitVector.h\"\r\n#include \"Partitioning.h\"\r\n#include \"RunStyles.h\"\r\n#include \"Decoration.h\"\r\n\r\n#include \"catch.hpp\"\r\n\r\nconstexpr int indicator=4;\r\n\r\nusing namespace Scintilla::Internal;\r\n\r\n// Test Decoration.\r\n\r\nTEST_CASE(\"Decoration\") {\r\n\r\n\tstd::unique_ptr<IDecoration> deco = DecorationCreate(false, indicator);\r\n\r\n\tSECTION(\"HasCorrectIndicator\") {\r\n\t\tREQUIRE(indicator == deco->Indicator());\r\n\t}\r\n\r\n\tSECTION(\"IsEmptyInitially\") {\r\n\t\tREQUIRE(0 == deco->Length());\r\n\t\tREQUIRE(1 == deco->Runs());\r\n\t\tREQUIRE(deco->Empty());\r\n\t}\r\n\r\n\tSECTION(\"SimpleSpace\") {\r\n\t\tdeco->InsertSpace(0, 1);\r\n\t\tREQUIRE(deco->Empty());\r\n\t}\r\n\r\n\tSECTION(\"SimpleRun\") {\r\n\t\tdeco->InsertSpace(0, 1);\r\n\t\tdeco->SetValueAt(0, 2);\r\n\t\tREQUIRE(!deco->Empty());\r\n\t}\r\n}\r\n\r\n// Test DecorationList.\r\n\r\nTEST_CASE(\"DecorationList\") {\r\n\r\n\tstd::unique_ptr<IDecorationList> decol = DecorationListCreate(false);\r\n\r\n\tSECTION(\"HasCorrectIndicator\") {\r\n\t\tdecol->SetCurrentIndicator(indicator);\r\n\t\tREQUIRE(indicator == decol->GetCurrentIndicator());\r\n\t}\r\n\r\n\tSECTION(\"HasCorrectCurrentValue\") {\r\n\t\tconstexpr int value = 55;\r\n\t\tdecol->SetCurrentValue(value);\r\n\t\tREQUIRE(value == decol->GetCurrentValue());\r\n\t}\r\n\r\n\tSECTION(\"ExpandSetValues\") {\r\n\t\tdecol->SetCurrentIndicator(indicator);\r\n\t\tdecol->InsertSpace(0, 9);\r\n\t\tconstexpr int value = 59;\r\n\t\tconstexpr Sci::Position position = 4;\r\n\t\tconstexpr Sci::Position fillLength = 3;\r\n\t\tauto fr = decol->FillRange(position, value, fillLength);\r\n\t\tREQUIRE(fr.changed);\r\n\t\tREQUIRE(fr.position == 4);\r\n\t\tREQUIRE(fr.fillLength == 3);\r\n\t\tREQUIRE(decol->ValueAt(indicator, 5) == value);\r\n\t\tREQUIRE(decol->AllOnFor(5) == (1 << indicator));\r\n\t\tREQUIRE(decol->Start(indicator, 5) == 4);\r\n\t\tREQUIRE(decol->End(indicator, 5) == 7);\r\n\t\tconstexpr int indicatorB=6;\r\n\t\tdecol->SetCurrentIndicator(indicatorB);\r\n\t\tfr = decol->FillRange(position, value, fillLength);\r\n\t\tREQUIRE(fr.changed);\r\n\t\tREQUIRE(decol->AllOnFor(5) == ((1 << indicator) | (1 << indicatorB)));\r\n\t\tdecol->DeleteRange(5, 1);\r\n\t\tREQUIRE(decol->Start(indicatorB, 5) == 4);\r\n\t\tREQUIRE(decol->End(indicatorB, 5) == 6);\r\n\t}\r\n\r\n}\r\n"
  },
  {
    "path": "scintilla/test/unit/testDocument.cxx",
    "content": "/** @file testDocument.cxx\r\n ** Unit Tests for Scintilla internal data structures\r\n **/\r\n\r\n#include <cstddef>\r\n#include <cstring>\r\n#include <stdexcept>\r\n#include <string_view>\r\n#include <vector>\r\n#include <set>\r\n#include <optional>\r\n#include <algorithm>\r\n#include <memory>\r\n#include <iostream>\r\n#include <fstream>\r\n#include <iomanip>\r\n\r\n#include \"ScintillaTypes.h\"\r\n\r\n#include \"ILoader.h\"\r\n#include \"ILexer.h\"\r\n\r\n#include \"Debugging.h\"\r\n\r\n#include \"CharacterCategoryMap.h\"\r\n#include \"Position.h\"\r\n#include \"SplitVector.h\"\r\n#include \"Partitioning.h\"\r\n#include \"RunStyles.h\"\r\n#include \"CellBuffer.h\"\r\n#include \"CharClassify.h\"\r\n#include \"Decoration.h\"\r\n#include \"CaseFolder.h\"\r\n#include \"Document.h\"\r\n\r\n#include \"catch.hpp\"\r\n\r\nusing namespace Scintilla;\r\nusing namespace Scintilla::Internal;\r\n\r\n// set global locale to pass std::regex related tests\r\n// see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63776\r\nstruct GlobalLocaleInitializer {\r\n\tGlobalLocaleInitializer() {\r\n\t\ttry {\r\n\t\t\tstd::locale::global(std::locale(\"en_US.UTF-8\"));\r\n\t\t} catch (...) {}\r\n\t}\r\n} globalLocaleInitializer;\r\n\r\n// Test Document.\r\n\r\nstruct Folding {\r\n\tint from;\r\n\tint to;\r\n\tint length;\r\n};\r\n\r\n// Table of case folding for non-ASCII bytes in Windows Latin code page 1252\r\nconst Folding foldings1252[] = {\r\n\t{0x8a, 0x9a, 0x01},\r\n\t{0x8c, 0x9c, 0x01},\r\n\t{0x8e, 0x9e, 0x01},\r\n\t{0x9f, 0xff, 0x01},\r\n\t{0xc0, 0xe0, 0x17},\r\n\t{0xd8, 0xf8, 0x07},\r\n};\r\n\r\n// Table of case folding for non-ASCII bytes in Windows Russian code page 1251\r\nconst Folding foldings1251[] = {\r\n\t{0x80, 0x90, 0x01},\r\n\t{0x81, 0x83, 0x01},\r\n\t{0x8a, 0x9a, 0x01},\r\n\t{0x8c, 0x9c, 0x04},\r\n\t{0xa1, 0xa2, 0x01},\r\n\t{0xa3, 0xbc, 0x01},\r\n\t{0xa5, 0xb4, 0x01},\r\n\t{0xa8, 0xb8, 0x01},\r\n\t{0xaa, 0xba, 0x01},\r\n\t{0xaf, 0xbf, 0x01},\r\n\t{0xb2, 0xb3, 0x01},\r\n\t{0xbd, 0xbe, 0x01},\r\n\t{0xc0, 0xe0, 0x20},\r\n};\r\n\r\nstd::string ReadFile(const std::string &path) {\r\n\tstd::ifstream ifs(path, std::ios::binary);\r\n\tstd::string content((std::istreambuf_iterator<char>(ifs)),\r\n\t\t(std::istreambuf_iterator<char>()));\r\n\treturn content;\r\n}\r\n\r\nstruct Match {\r\n\tSci::Position location = 0;\r\n\tSci::Position length = 0;\r\n\tconstexpr Match() = default;\r\n\tconstexpr Match(Sci::Position location_, Sci::Position length_=0) : location(location_), length(length_) {\r\n\t}\r\n\tconstexpr bool operator==(const Match &other) const {\r\n\t\treturn location == other.location && length == other.length;\r\n\t}\r\n};\r\n\r\nstd::ostream &operator << (std::ostream &os, Match const &value) {\r\n\tos << value.location << \",\" << value.length;\r\n\treturn os;\r\n}\r\n\r\nstruct DocPlus {\r\n\tDocument document;\r\n\r\n\tDocPlus(std::string_view svInitial, int codePage) : document(DocumentOption::Default) {\r\n\t\tSetCodePage(codePage);\r\n\t\tdocument.InsertString(0, svInitial);\r\n\t}\r\n\r\n\tvoid SetCodePage(int codePage) {\r\n\t\tdocument.SetDBCSCodePage(codePage);\r\n\t\tif (codePage == CpUtf8) {\r\n\t\t\tdocument.SetCaseFolder(std::make_unique<CaseFolderUnicode>());\r\n\t\t} else {\r\n\t\t\t// This case folder will not handle many DBCS cases. Scintilla uses platform-specific code for DBCS\r\n\t\t\t// case folding which can not easily be inserted in platform-independent tests.\r\n\t\t\tstd::unique_ptr<CaseFolderTable> pcft = std::make_unique<CaseFolderTable>();\r\n\t\t\tdocument.SetCaseFolder(std::move(pcft));\r\n\t\t}\r\n\t}\r\n\r\n\tvoid SetSBCSFoldings(const Folding *foldings, size_t length) {\r\n\t\tstd::unique_ptr<CaseFolderTable> pcft = std::make_unique<CaseFolderTable>();\r\n\t\tfor (size_t block = 0; block < length; block++) {\r\n\t\t\tfor (int fold = 0; fold < foldings[block].length; fold++) {\r\n\t\t\t\tpcft->SetTranslation(foldings[block].from + fold, foldings[block].to + fold);\r\n\t\t\t}\r\n\t\t}\r\n\t\tdocument.SetCaseFolder(std::move(pcft));\r\n\t}\r\n\r\n\tSci::Position FindNeedle(std::string_view needle, FindOption options, Sci::Position *length) {\r\n\t\tassert(*length == static_cast<Sci::Position>(needle.length()));\r\n\t\treturn document.FindText(0, document.Length(), needle.data(), options, length);\r\n\t}\r\n\tSci::Position FindNeedleReverse(std::string_view needle, FindOption options, Sci::Position *length) {\r\n\t\tassert(*length == static_cast<Sci::Position>(needle.length()));\r\n\t\treturn document.FindText(document.Length(), 0, needle.data(), options, length);\r\n\t}\r\n\r\n\tMatch FindString(Sci::Position minPos, Sci::Position maxPos, std::string_view needle, FindOption flags) {\r\n\t\tSci::Position lengthFinding = needle.length();\r\n\t\tconst Sci::Position location = document.FindText(minPos, maxPos, needle.data(), flags, &lengthFinding);\r\n\t\treturn { location, lengthFinding };\r\n\t}\r\n\r\n\tstd::string Substitute(std::string_view substituteText) {\r\n\t\tSci::Position lengthsubstitute = substituteText.length();\r\n\t\tstd::string substituted = document.SubstituteByPosition(substituteText.data(), &lengthsubstitute);\r\n\t\tassert(lengthsubstitute == static_cast<Sci::Position>(substituted.length()));\r\n\t\treturn substituted;\r\n\t}\r\n\r\n\tvoid MoveGap(Sci::Position gapNew) {\r\n\t\t// Move gap to gapNew by inserting\r\n\t\tdocument.InsertString(gapNew, \"!\", 1);\r\n\t\t// Remove insertion\r\n\t\tdocument.DeleteChars(gapNew, 1);\r\n\t}\r\n\r\n\t[[nodiscard]] std::string Contents() const {\r\n\t\tconst Sci::Position length = document.Length();\r\n\t\tstd::string contents(length, 0);\r\n\t\tdocument.GetCharRange(contents.data(), 0, length);\r\n\t\treturn contents;\r\n\t}\r\n};\r\n\r\nvoid TimeTrace(std::string_view sv, const Catch::Timer &tikka) {\r\n\tstd::cout << sv << std::setw(5) << tikka.getElapsedMilliseconds() << \" milliseconds\" << std::endl;\r\n}\r\n\r\nTEST_CASE(\"Document\") {\r\n\r\n\tconstexpr std::string_view sText = \"Scintilla\";\r\n\tconstexpr Sci::Position sLength = sText.length();\r\n\tconstexpr FindOption rePosix = FindOption::RegExp | FindOption::Posix;\r\n\tconstexpr FindOption reCxx11 = FindOption::RegExp | FindOption::Cxx11RegEx;\r\n\r\n\tSECTION(\"InsertOneLine\") {\r\n\t\tDocPlus doc(\"\", 0);\r\n\t\tconst Sci::Position length = doc.document.InsertString(0, sText);\r\n\t\tREQUIRE(sLength == doc.document.Length());\r\n\t\tREQUIRE(length == sLength);\r\n\t\tREQUIRE(1 == doc.document.LinesTotal());\r\n\t\tREQUIRE(0 == doc.document.LineStart(0));\r\n\t\tREQUIRE(0 == doc.document.LineFromPosition(0));\r\n\t\tREQUIRE(0 == doc.document.LineStartPosition(0));\r\n\t\tREQUIRE(sLength == doc.document.LineStart(1));\r\n\t\tREQUIRE(0 == doc.document.LineFromPosition(static_cast<int>(sLength)));\r\n\t\tREQUIRE(doc.document.CanUndo());\r\n\t\tREQUIRE(!doc.document.CanRedo());\r\n\t}\r\n\r\n\t// Search ranges are from first argument to just before second argument\r\n\t// Arguments are expected to be at character boundaries and will be tweaked if\r\n\t// part way through a character.\r\n\tSECTION(\"SearchInLatin\") {\r\n\t\tDocPlus doc(\"abcde\", 0);\t// a b c d e\r\n\t\tconstexpr std::string_view finding = \"b\";\r\n\t\tSci::Position lengthFinding = finding.length();\r\n\t\tSci::Position location = doc.FindNeedle(finding, FindOption::MatchCase, &lengthFinding);\r\n\t\tREQUIRE(location == 1);\r\n\t\tlocation = doc.FindNeedleReverse(finding, FindOption::MatchCase, &lengthFinding);\r\n\t\tREQUIRE(location == 1);\r\n\t\tlocation = doc.document.FindText(0, 2, finding.data(), FindOption::MatchCase, &lengthFinding);\r\n\t\tREQUIRE(location == 1);\r\n\t\tlocation = doc.document.FindText(0, 1, finding.data(), FindOption::MatchCase, &lengthFinding);\r\n\t\tREQUIRE(location == -1);\r\n\t}\r\n\r\n\tSECTION(\"SearchInBothSegments\") {\r\n\t\tDocPlus doc(\"ab-ab\", 0);\t// a b - a b\r\n\t\tconstexpr std::string_view finding = \"ab\";\r\n\t\tfor (int gapPos = 0; gapPos <= 5; gapPos++) {\r\n\t\t\tdoc.MoveGap(gapPos);\r\n\t\t\tSci::Position lengthFinding = finding.length();\r\n\t\t\tSci::Position location = doc.document.FindText(0, doc.document.Length(), finding.data(), FindOption::MatchCase, &lengthFinding);\r\n\t\t\tREQUIRE(location == 0);\r\n\t\t\tlocation = doc.document.FindText(2, doc.document.Length(), finding.data(), FindOption::MatchCase, &lengthFinding);\r\n\t\t\tREQUIRE(location == 3);\r\n\t\t}\r\n\t}\r\n\r\n\tSECTION(\"InsensitiveSearchInLatin\") {\r\n\t\tDocPlus doc(\"abcde\", 0);\t// a b c d e\r\n\t\tconstexpr std::string_view finding = \"B\";\r\n\t\tSci::Position lengthFinding = finding.length();\r\n\t\tSci::Position location = doc.FindNeedle(finding, FindOption::None, &lengthFinding);\r\n\t\tREQUIRE(location == 1);\r\n\t\tlocation = doc.FindNeedleReverse(finding, FindOption::None, &lengthFinding);\r\n\t\tREQUIRE(location == 1);\r\n\t\tlocation = doc.document.FindText(0, 2, finding.data(), FindOption::None, &lengthFinding);\r\n\t\tREQUIRE(location == 1);\r\n\t\tlocation = doc.document.FindText(0, 1, finding.data(), FindOption::None, &lengthFinding);\r\n\t\tREQUIRE(location == -1);\r\n\t}\r\n\r\n\tSECTION(\"InsensitiveSearchIn1252\") {\r\n\t\t// In Windows Latin, code page 1252, C6 is AE and E6 is ae\r\n\t\tDocPlus doc(\"tru\\xc6s\\xe6t\", 0);\t// t r u AE s ae t\r\n\t\tdoc.SetSBCSFoldings(foldings1252, std::size(foldings1252));\r\n\r\n\t\t// Search for upper-case AE\r\n\t\tstd::string_view finding = \"\\xc6\";\r\n\t\tSci::Position lengthFinding = finding.length();\r\n\t\tSci::Position location = doc.FindNeedle(finding, FindOption::None, &lengthFinding);\r\n\t\tREQUIRE(location == 3);\r\n\t\tlocation = doc.document.FindText(4, doc.document.Length(), finding.data(), FindOption::None, &lengthFinding);\r\n\t\tREQUIRE(location == 5);\r\n\t\tlocation = doc.FindNeedleReverse(finding, FindOption::None, &lengthFinding);\r\n\t\tREQUIRE(location == 5);\r\n\r\n\t\t// Search for lower-case ae\r\n\t\tfinding = \"\\xe6\";\r\n\t\tlocation = doc.FindNeedle(finding, FindOption::None, &lengthFinding);\r\n\t\tREQUIRE(location == 3);\r\n\t\tlocation = doc.document.FindText(4, doc.document.Length(), finding.data(), FindOption::None, &lengthFinding);\r\n\t\tREQUIRE(location == 5);\r\n\t\tlocation = doc.FindNeedleReverse(finding, FindOption::None, &lengthFinding);\r\n\t\tREQUIRE(location == 5);\r\n\t}\r\n\r\n\tSECTION(\"Search2InLatin\") {\r\n\t\t// Checks that the initial '_' and final 'f' are ignored since they are outside the search bounds\r\n\t\tDocPlus doc(\"_abcdef\", 0);\t// _ a b c d e f\r\n\t\tconstexpr std::string_view finding = \"cd\";\r\n\t\tSci::Position lengthFinding = finding.length();\r\n\t\tconst size_t docLength = doc.document.Length() - 1;\r\n\t\tSci::Position location = doc.document.FindText(1, docLength, finding.data(), FindOption::MatchCase, &lengthFinding);\r\n\t\tREQUIRE(location == 3);\r\n\t\tlocation = doc.document.FindText(docLength, 1, finding.data(), FindOption::MatchCase, &lengthFinding);\r\n\t\tREQUIRE(location == 3);\r\n\t\tlocation = doc.document.FindText(docLength, 1, \"bc\", FindOption::MatchCase, &lengthFinding);\r\n\t\tREQUIRE(location == 2);\r\n\t\tlocation = doc.document.FindText(docLength, 1, \"ab\", FindOption::MatchCase, &lengthFinding);\r\n\t\tREQUIRE(location == 1);\r\n\t\tlocation = doc.document.FindText(docLength, 1, \"de\", FindOption::MatchCase, &lengthFinding);\r\n\t\tREQUIRE(location == 4);\r\n\t\tlocation = doc.document.FindText(docLength, 1, \"_a\", FindOption::MatchCase, &lengthFinding);\r\n\t\tREQUIRE(location == -1);\r\n\t\tlocation = doc.document.FindText(docLength, 1, \"ef\", FindOption::MatchCase, &lengthFinding);\r\n\t\tREQUIRE(location == -1);\r\n\t\tlengthFinding = 3;\r\n\t\tlocation = doc.document.FindText(docLength, 1, \"cde\", FindOption::MatchCase, &lengthFinding);\r\n\t\tREQUIRE(location == 3);\r\n\t}\r\n\r\n\tSECTION(\"SearchInUTF8\") {\r\n\t\tDocPlus doc(\"ab\\xCE\\x93\" \"d\", CpUtf8);\t// a b gamma d\r\n\t\tconstexpr std::string_view finding = \"b\";\r\n\t\tSci::Position lengthFinding = finding.length();\r\n\t\tSci::Position location = doc.FindNeedle(finding, FindOption::MatchCase, &lengthFinding);\r\n\t\tREQUIRE(location == 1);\r\n\t\tlocation = doc.document.FindText(doc.document.Length(), 0, finding.data(), FindOption::MatchCase, &lengthFinding);\r\n\t\tREQUIRE(location == 1);\r\n\t\tlocation = doc.document.FindText(0, 1, finding.data(), FindOption::MatchCase, &lengthFinding);\r\n\t\tREQUIRE(location == -1);\r\n\t\t// Check doesn't try to follow a lead-byte past the search end\r\n\t\tconstexpr std::string_view findingUTF = \"\\xCE\\x93\";\r\n\t\tlengthFinding = findingUTF.length();\r\n\t\tlocation = doc.document.FindText(0, 4, findingUTF.data(), FindOption::MatchCase, &lengthFinding);\r\n\t\tREQUIRE(location == 2);\r\n\t\t// Only succeeds as 3 is partway through character so adjusted to 4\r\n\t\tlocation = doc.document.FindText(0, 3, findingUTF.data(), FindOption::MatchCase, &lengthFinding);\r\n\t\tREQUIRE(location == 2);\r\n\t\tlocation = doc.document.FindText(0, 2, findingUTF.data(), FindOption::MatchCase, &lengthFinding);\r\n\t\tREQUIRE(location == -1);\r\n\t}\r\n\r\n\tSECTION(\"InsensitiveSearchInUTF8\") {\r\n\t\tDocPlus doc(\"ab\\xCE\\x93\" \"d\", CpUtf8);\t// a b gamma d\r\n\t\tconstexpr std::string_view finding = \"b\";\r\n\t\tSci::Position lengthFinding = finding.length();\r\n\t\tSci::Position location = doc.FindNeedle(finding, FindOption::None, &lengthFinding);\r\n\t\tREQUIRE(location == 1);\r\n\t\tlocation = doc.document.FindText(doc.document.Length(), 0, finding.data(), FindOption::None, &lengthFinding);\r\n\t\tREQUIRE(location == 1);\r\n\t\tconstexpr std::string_view findingUTF = \"\\xCE\\x93\";\r\n\t\tlengthFinding = findingUTF.length();\r\n\t\tlocation = doc.FindNeedle(findingUTF, FindOption::None, &lengthFinding);\r\n\t\tREQUIRE(location == 2);\r\n\t\tlocation = doc.document.FindText(doc.document.Length(), 0, findingUTF.data(), FindOption::None, &lengthFinding);\r\n\t\tREQUIRE(location == 2);\r\n\t\tlocation = doc.document.FindText(0, 4, findingUTF.data(), FindOption::None, &lengthFinding);\r\n\t\tREQUIRE(location == 2);\r\n\t\t// Only succeeds as 3 is partway through character so adjusted to 4\r\n\t\tlocation = doc.document.FindText(0, 3, findingUTF.data(), FindOption::None, &lengthFinding);\r\n\t\tREQUIRE(location == 2);\r\n\t\tlocation = doc.document.FindText(0, 2, findingUTF.data(), FindOption::None, &lengthFinding);\r\n\t\tREQUIRE(location == -1);\r\n\t}\r\n\r\n\tSECTION(\"SearchInShiftJIS\") {\r\n\t\t// {CJK UNIFIED IDEOGRAPH-9955} is two bytes: {0xE9, 'b'} in Shift-JIS\r\n\t\t// The 'b' can be incorrectly matched by the search string 'b' when the search\r\n\t\t// does not iterate the text correctly.\r\n\t\tDocPlus doc(\"ab\\xe9\" \"b \", 932);\t// a b {CJK UNIFIED IDEOGRAPH-9955} {space}\r\n\t\tconstexpr std::string_view finding = \"b\";\r\n\t\t// Search forwards\r\n\t\tSci::Position lengthFinding = finding.length();\r\n\t\tSci::Position location = doc.FindNeedle(finding, FindOption::MatchCase, &lengthFinding);\r\n\t\tREQUIRE(location == 1);\r\n\t\t// Search backwards\r\n\t\tlengthFinding = finding.length();\r\n\t\tlocation = doc.document.FindText(doc.document.Length(), 0, finding.data(), FindOption::MatchCase, &lengthFinding);\r\n\t\tREQUIRE(location == 1);\r\n\t}\r\n\r\n\tSECTION(\"InsensitiveSearchInShiftJIS\") {\r\n\t\t// {CJK UNIFIED IDEOGRAPH-9955} is two bytes: {0xE9, 'b'} in Shift-JIS\r\n\t\t// The 'b' can be incorrectly matched by the search string 'b' when the search\r\n\t\t// does not iterate the text correctly.\r\n\t\tDocPlus doc(\"ab\\xe9\" \"b \", 932);\t// a b {CJK UNIFIED IDEOGRAPH-9955} {space}\r\n\t\tconstexpr std::string_view finding = \"b\";\r\n\t\t// Search forwards\r\n\t\tSci::Position lengthFinding = finding.length();\r\n\t\tSci::Position location = doc.FindNeedle(finding, FindOption::None, &lengthFinding);\r\n\t\tREQUIRE(location == 1);\r\n\t\t// Search backwards\r\n\t\tlengthFinding = finding.length();\r\n\t\tlocation = doc.document.FindText(doc.document.Length(), 0, finding.data(), FindOption::None, &lengthFinding);\r\n\t\tREQUIRE(location == 1);\r\n\t\tconstexpr std::string_view finding932 = \"\\xe9\" \"b\";\r\n\t\t// Search forwards\r\n\t\tlengthFinding = finding932.length();\r\n\t\tlocation = doc.FindNeedle(finding932, FindOption::None, &lengthFinding);\r\n\t\tREQUIRE(location == 2);\r\n\t\t// Search backwards\r\n\t\tlengthFinding = finding932.length();\r\n\t\tlocation = doc.document.FindText(doc.document.Length(), 0, finding932.data(), FindOption::None, &lengthFinding);\r\n\t\tREQUIRE(location == 2);\r\n\t\tlocation = doc.document.FindText(0, 3, finding932.data(), FindOption::None, &lengthFinding);\r\n\t\tREQUIRE(location == 2);\r\n\t\tlocation = doc.document.FindText(0, 2, finding932.data(), FindOption::None, &lengthFinding);\r\n\t\tREQUIRE(location == -1);\r\n\t\t// Can not test case mapping of double byte text as folder available here does not implement this\r\n\t}\r\n\r\n\tSECTION(\"GetCharacterAndWidth DBCS\") {\r\n\t\tDocument doc(DocumentOption::Default);\r\n\t\tdoc.SetDBCSCodePage(932);\r\n\t\tREQUIRE(doc.CodePage() == 932);\r\n\t\tconst Sci::Position length = doc.InsertString(0, \"H\\x84\\xff\\x84H\", 5);\r\n\t\t// This text is invalid in code page 932.\r\n\t\t// A reasonable interpretation is as 4 items: 2 characters and 2 character fragments\r\n\t\t// The last item is a 2-byte CYRILLIC CAPITAL LETTER ZE character\r\n\t\t// H [84] [FF] ZE\r\n\t\tREQUIRE(5 == length);\r\n\t\tREQUIRE(5 == doc.Length());\r\n\t\tSci::Position width = 0;\r\n\t\t// test GetCharacterAndWidth()\r\n\t\tint ch = doc.GetCharacterAndWidth(0, &width);\r\n\t\tREQUIRE(width == 1);\r\n\t\tREQUIRE(ch == 'H');\r\n\t\tch = doc.GetCharacterAndWidth(1, &width);\r\n\t\tREQUIRE(width == 1);\r\n\t\tREQUIRE(ch == 0x84);\r\n\t\twidth = 0;\r\n\t\tch = doc.GetCharacterAndWidth(2, &width);\r\n\t\tREQUIRE(width == 1);\r\n\t\tREQUIRE(ch == 0xff);\r\n\t\twidth = 0;\r\n\t\tch = doc.GetCharacterAndWidth(3, &width);\r\n\t\tREQUIRE(width == 2);\r\n\t\tREQUIRE(ch == 0x8448);\r\n\t\t// test LenChar()\r\n\t\twidth = doc.LenChar(0);\r\n\t\tREQUIRE(width == 1);\r\n\t\twidth = doc.LenChar(1);\r\n\t\tREQUIRE(width == 1);\r\n\t\twidth = doc.LenChar(2);\r\n\t\tREQUIRE(width == 1);\r\n\t\twidth = doc.LenChar(3);\r\n\t\tREQUIRE(width == 2);\r\n\t\t// test MovePositionOutsideChar()\r\n\t\tSci::Position pos = doc.MovePositionOutsideChar(1, 1);\r\n\t\tREQUIRE(pos == 1);\r\n\t\tpos = doc.MovePositionOutsideChar(2, 1);\r\n\t\tREQUIRE(pos == 2);\r\n\t\tpos = doc.MovePositionOutsideChar(3, 1);\r\n\t\tREQUIRE(pos == 3);\r\n\t\tpos = doc.MovePositionOutsideChar(4, 1);\r\n\t\tREQUIRE(pos == 5);\r\n\t\tpos = doc.MovePositionOutsideChar(1, -1);\r\n\t\tREQUIRE(pos == 1);\r\n\t\tpos = doc.MovePositionOutsideChar(2, -1);\r\n\t\tREQUIRE(pos == 2);\r\n\t\tpos = doc.MovePositionOutsideChar(3, -1);\r\n\t\tREQUIRE(pos == 3);\r\n\t\tpos = doc.MovePositionOutsideChar(4, -1);\r\n\t\tREQUIRE(pos == 3);\r\n\t\t// test NextPosition()\r\n\t\tpos = doc.NextPosition(0, 1);\r\n\t\tREQUIRE(pos == 1);\r\n\t\tpos = doc.NextPosition(1, 1);\r\n\t\tREQUIRE(pos == 2);\r\n\t\tpos = doc.NextPosition(2, 1);\r\n\t\tREQUIRE(pos == 3);\r\n\t\tpos = doc.NextPosition(3, 1);\r\n\t\tREQUIRE(pos == 5);\r\n\t\tpos = doc.NextPosition(1, -1);\r\n\t\tREQUIRE(pos == 0);\r\n\t\tpos = doc.NextPosition(2, -1);\r\n\t\tREQUIRE(pos == 1);\r\n\t\tpos = doc.NextPosition(3, -1);\r\n\t\tREQUIRE(pos == 2);\r\n\t\tpos = doc.NextPosition(5, -1);\r\n\t\tREQUIRE(pos == 3);\r\n\t}\r\n\r\n\tSECTION(\"NextPosition Valid DBCS\") {\r\n\t\tDocument doc(DocumentOption::Default);\r\n\t\tdoc.SetDBCSCodePage(932);\r\n\t\tREQUIRE(doc.CodePage() == 932);\r\n\t\t// This text is valid in code page 932.\r\n\t\t// O p e n = U+958B Ku ( O ) U+7DE8 -\r\n\t\t// U+958B open\r\n\t\t// U+7DE8 arrange\r\n\t\tconstexpr std::string_view japaneseText = \"Open=\\x8aJ\\x82\\xad(O)\\x95\\xd2-\";\r\n\t\tconst Sci::Position length = doc.InsertString(0, japaneseText);\r\n\t\tREQUIRE(length == 15);\r\n\t\t// Forwards\r\n\t\tREQUIRE(doc.NextPosition( 0, 1) == 1);\r\n\t\tREQUIRE(doc.NextPosition( 1, 1) == 2);\r\n\t\tREQUIRE(doc.NextPosition( 2, 1) == 3);\r\n\t\tREQUIRE(doc.NextPosition( 3, 1) == 4);\r\n\t\tREQUIRE(doc.NextPosition( 4, 1) == 5);\r\n\t\tREQUIRE(doc.NextPosition( 5, 1) == 7);\t// Double byte\r\n\t\tREQUIRE(doc.NextPosition( 6, 1) == 7);\r\n\t\tREQUIRE(doc.NextPosition( 7, 1) == 9);\t// Double byte\r\n\t\tREQUIRE(doc.NextPosition( 8, 1) == 9);\r\n\t\tREQUIRE(doc.NextPosition( 9, 1) == 10);\r\n\t\tREQUIRE(doc.NextPosition(10, 1) == 11);\r\n\t\tREQUIRE(doc.NextPosition(11, 1) == 12);\r\n\t\tREQUIRE(doc.NextPosition(12, 1) == 14);\t// Double byte\r\n\t\tREQUIRE(doc.NextPosition(13, 1) == 14);\r\n\t\tREQUIRE(doc.NextPosition(14, 1) == 15);\r\n\t\tREQUIRE(doc.NextPosition(15, 1) == 15);\r\n\t\t// Backwards\r\n\t\tREQUIRE(doc.NextPosition( 0, -1) == 0);\r\n\t\tREQUIRE(doc.NextPosition( 1, -1) == 0);\r\n\t\tREQUIRE(doc.NextPosition( 2, -1) == 1);\r\n\t\tREQUIRE(doc.NextPosition( 3, -1) == 2);\r\n\t\tREQUIRE(doc.NextPosition( 4, -1) == 3);\r\n\t\tREQUIRE(doc.NextPosition( 5, -1) == 4);\r\n\t\tREQUIRE(doc.NextPosition( 6, -1) == 5);\t// Double byte\r\n\t\tREQUIRE(doc.NextPosition( 7, -1) == 5);\r\n\t\tREQUIRE(doc.NextPosition( 8, -1) == 7);\t// Double byte\r\n\t\tREQUIRE(doc.NextPosition( 9, -1) == 7);\r\n\t\tREQUIRE(doc.NextPosition(10, -1) == 9);\r\n\t\tREQUIRE(doc.NextPosition(11, -1) == 10);\r\n\t\tREQUIRE(doc.NextPosition(12, -1) == 11);\r\n\t\tREQUIRE(doc.NextPosition(13, -1) == 12);\t// Double byte\r\n\t\tREQUIRE(doc.NextPosition(14, -1) == 12);\r\n\t\tREQUIRE(doc.NextPosition(15, -1) == 14);\r\n\t}\r\n\r\n\tSECTION(\"RegexSearchAndSubstitution\") {\r\n\t\tDocPlus doc(\"\\n\\r\\r\\n 1a\\xCE\\x93z \\n\\r\\r\\n 2b\\xCE\\x93y \\n\\r\\r\\n\", CpUtf8);// 1a gamma z 2b gamma y\r\n\t\tconst Sci::Position docLength = doc.document.Length();\r\n\t\tMatch match;\r\n\r\n\t\tconstexpr std::string_view finding = R\"(\\d+(\\w+))\";\r\n\t\tconstexpr std::string_view substituteText = R\"(\\t\\1\\n)\";\r\n\t\tconstexpr std::string_view longest = \"\\\\w+\";\r\n\t\tstd::string substituted;\r\n\r\n\t\tmatch = doc.FindString(0, docLength, finding, rePosix);\r\n\t\tREQUIRE(match == Match(5, 5));\r\n\t\tsubstituted = doc.Substitute(substituteText);\r\n\t\tREQUIRE(substituted == \"\\ta\\xCE\\x93z\\n\");\r\n\r\n\t\tmatch = doc.FindString(docLength, 0, finding, rePosix);\r\n\t\tREQUIRE(match == Match(16, 5));\r\n\t\tsubstituted = doc.Substitute(substituteText);\r\n\t\tREQUIRE(substituted == \"\\tb\\xCE\\x93y\\n\");\r\n\r\n\t\tmatch = doc.FindString(docLength, 0, longest, rePosix);\r\n\t\tREQUIRE(match == Match(16, 5));\r\n\r\n\t\t#ifndef NO_CXX11_REGEX\r\n\t\tmatch = doc.FindString(0, docLength, finding, reCxx11);\r\n\t\tREQUIRE(match == Match(5, 5));\r\n\t\tsubstituted = doc.Substitute(substituteText);\r\n\t\tREQUIRE(substituted == \"\\ta\\xCE\\x93z\\n\");\r\n\r\n\t\tmatch = doc.FindString(docLength, 0, finding, reCxx11);\r\n\t\tREQUIRE(match == Match(16, 5));\r\n\t\tsubstituted = doc.Substitute(substituteText);\r\n\t\tREQUIRE(substituted == \"\\tb\\xCE\\x93y\\n\");\r\n\r\n\t\tmatch = doc.FindString(docLength, 0, longest, reCxx11);\r\n\t\tREQUIRE(match == Match(16, 5));\r\n\t\t#endif\r\n\t}\r\n\r\n\tSECTION(\"RegexAssertion\") {\r\n\t\tDocPlus doc(\"ab cd ef\\r\\ngh ij kl\", CpUtf8);\r\n\t\tconst Sci::Position docLength = doc.document.Length();\r\n\t\tMatch match;\r\n\r\n\t\tconstexpr std::string_view findingBOL = \"^\";\r\n\t\tmatch = doc.FindString(0, docLength, findingBOL, rePosix);\r\n\t\tREQUIRE(match == Match(0));\r\n\t\tmatch = doc.FindString(1, docLength, findingBOL, rePosix);\r\n\t\tREQUIRE(match == Match(10));\r\n\t\tmatch = doc.FindString(docLength, 0, findingBOL, rePosix);\r\n\t\tREQUIRE(match == Match(10));\r\n\t\tmatch = doc.FindString(docLength - 1, 0, findingBOL, rePosix);\r\n\t\tREQUIRE(match == Match(10));\r\n\r\n\t\t#ifndef NO_CXX11_REGEX\r\n\t\tmatch = doc.FindString(0, docLength, findingBOL, reCxx11);\r\n\t\tREQUIRE(match == Match(0));\r\n\t\tmatch = doc.FindString(1, docLength, findingBOL, reCxx11);\r\n\t\tREQUIRE(match == Match(10));\r\n\t\tmatch = doc.FindString(docLength, 0, findingBOL, reCxx11);\r\n\t\tREQUIRE(match == Match(10));\r\n\t\tmatch = doc.FindString(docLength - 1, 0, findingBOL, reCxx11);\r\n\t\tREQUIRE(match == Match(10));\r\n\t\t#endif\r\n\r\n\t\tconstexpr std::string_view findingEOL = \"$\";\r\n\t\tmatch = doc.FindString(0, docLength, findingEOL, rePosix);\r\n\t\tREQUIRE(match == Match(8));\r\n\t\tmatch = doc.FindString(1, docLength, findingEOL, rePosix);\r\n\t\tREQUIRE(match == Match(8));\r\n\t\tmatch = doc.FindString(docLength, 0, findingEOL, rePosix);\r\n\t\tREQUIRE(match == Match(18));\r\n\t\tmatch = doc.FindString(docLength - 1, 0, findingEOL, rePosix);\r\n\t\tREQUIRE(match == Match(8));\r\n\r\n\t\t#if !defined(NO_CXX11_REGEX) && !defined(_LIBCPP_VERSION)\r\n\t\tmatch = doc.FindString(0, docLength, findingEOL, reCxx11);\r\n\t\tREQUIRE(match == Match(8));\r\n\t\tmatch = doc.FindString(1, docLength, findingEOL, reCxx11);\r\n\t\tREQUIRE(match == Match(8));\r\n\t\tmatch = doc.FindString(docLength, 0, findingEOL, reCxx11);\r\n\t\tREQUIRE(match == Match(18));\r\n\t\tmatch = doc.FindString(docLength - 1, 0, findingEOL, reCxx11);\r\n\t\tREQUIRE(match == Match(8));\r\n\t\t#endif\r\n\r\n\t\tconstexpr std::string_view findingBOW = \"\\\\<\";\r\n\t\tmatch = doc.FindString(0, docLength, findingBOW, rePosix);\r\n\t\tREQUIRE(match == Match(0));\r\n\t\tmatch = doc.FindString(1, docLength, findingBOW, rePosix);\r\n\t\tREQUIRE(match == Match(3));\r\n\t\tmatch = doc.FindString(docLength, 0, findingBOW, rePosix);\r\n\t\tREQUIRE(match == Match(16));\r\n\t\tmatch = doc.FindString(docLength - 1, 0, findingBOW, rePosix);\r\n\t\tREQUIRE(match == Match(16));\r\n\r\n\t\tconstexpr std::string_view findingEOW = \"\\\\>\";\r\n\t\tmatch = doc.FindString(0, docLength, findingEOW, rePosix);\r\n\t\tREQUIRE(match == Match(2));\r\n\t\tmatch = doc.FindString(1, docLength, findingEOW, rePosix);\r\n\t\tREQUIRE(match == Match(2));\r\n\t\tmatch = doc.FindString(docLength, 0, findingEOW, rePosix);\r\n\t\tREQUIRE(match == Match(18));\r\n\t\tmatch = doc.FindString(docLength - 1, 0, findingEOW, rePosix);\r\n\t\tREQUIRE(match == Match(15));\r\n\r\n\t\tconstexpr std::string_view findingEOWEOL = \"\\\\>$\";\r\n\t\tmatch = doc.FindString(0, docLength, findingEOWEOL, rePosix);\r\n\t\tREQUIRE(match == Match(8));\r\n\t\tmatch = doc.FindString(10, docLength, findingEOWEOL, rePosix);\r\n\t\tREQUIRE(match == Match(18));\r\n\r\n\t\t#ifndef NO_CXX11_REGEX\r\n\t\tconstexpr std::string_view findingWB = \"\\\\b\";\r\n\t\tmatch = doc.FindString(0, docLength, findingWB, reCxx11);\r\n\t\tREQUIRE(match == Match(0));\r\n\t\tmatch = doc.FindString(1, docLength, findingWB, reCxx11);\r\n\t\tREQUIRE(match == Match(2));\r\n\t\tmatch = doc.FindString(docLength, 0, findingWB, reCxx11);\r\n\t\t#ifdef _LIBCPP_VERSION\r\n\t\tREQUIRE(match == Match(16));\r\n\t\t#else\r\n\t\tREQUIRE(match == Match(18));\r\n\t\t#endif\r\n\t\tmatch = doc.FindString(docLength - 1, 0, findingWB, reCxx11);\r\n\t\tREQUIRE(match == Match(16));\r\n\r\n\t\tconstexpr std::string_view findingNWB = \"\\\\B\";\r\n\t\tmatch = doc.FindString(0, docLength, findingNWB, reCxx11);\r\n\t\tREQUIRE(match == Match(1));\r\n\t\tmatch = doc.FindString(1, docLength, findingNWB, reCxx11);\r\n\t\tREQUIRE(match == Match(1));\r\n\t\t#ifdef _LIBCPP_VERSION\r\n\t\tmatch = doc.FindString(docLength, 0, findingNWB, reCxx11);\r\n\t\tREQUIRE(match == Match(18));\r\n\t\tmatch = doc.FindString(docLength - 1, 0, findingNWB, reCxx11);\r\n\t\tREQUIRE(match == Match(14));\r\n\t\t#else\r\n\t\tmatch = doc.FindString(docLength, 0, findingNWB, reCxx11);\r\n\t\tREQUIRE(match == Match(17));\r\n\t\tmatch = doc.FindString(docLength - 1, 0, findingNWB, reCxx11);\r\n\t\tREQUIRE(match == Match(17));\r\n\t\t#endif\r\n\t\t#endif\r\n\t}\r\n\r\n\tSECTION(\"RegexContextualAssertion\") {\r\n\t\t// For std::regex, check the use of assertions next to text in forward direction\r\n\t\t// These are more common than empty assertions\r\n\t\tDocPlus doc(\"ab cd ef\\r\\ngh ij kl\", CpUtf8);\r\n\t\tconst Sci::Position docLength = doc.document.Length();\r\n\t\tMatch match;\r\n\r\n\t\t#ifndef NO_CXX11_REGEX\r\n\r\n\t\tmatch = doc.FindString(0, docLength, \"^[a-z]\", reCxx11);\r\n\t\tREQUIRE(match == Match(0, 1));\r\n\t\tmatch = doc.FindString(1, docLength, \"^[a-z]\", reCxx11);\r\n\t\tREQUIRE(match == Match(10, 1));\r\n\r\n\t\tmatch = doc.FindString(0, docLength, \"[a-z]$\", reCxx11);\r\n\t\tREQUIRE(match == Match(7, 1));\r\n\t\tmatch = doc.FindString(10, docLength, \"[a-z]$\", reCxx11);\r\n\t\tREQUIRE(match == Match(17, 1));\r\n\r\n\t\tmatch = doc.FindString(0, docLength, \"\\\\b[a-z]\", reCxx11);\r\n\t\tREQUIRE(match == Match(0, 1));\r\n\t\tmatch = doc.FindString(1, docLength, \"\\\\b[a-z]\", reCxx11);\r\n\t\tREQUIRE(match == Match(3, 1));\r\n\t\tmatch = doc.FindString(0, docLength, \"[a-z]\\\\b\", reCxx11);\r\n\t\tREQUIRE(match == Match(1, 1));\r\n\t\tmatch = doc.FindString(2, docLength, \"[a-z]\\\\b\", reCxx11);\r\n\t\tREQUIRE(match == Match(4, 1));\r\n\r\n\t\tmatch = doc.FindString(0, docLength, \"\\\\B[a-z]\", reCxx11);\r\n\t\tREQUIRE(match == Match(1, 1));\r\n\t\tmatch = doc.FindString(1, docLength, \"\\\\B[a-z]\", reCxx11);\r\n\t\tREQUIRE(match == Match(1, 1));\r\n\t\tmatch = doc.FindString(0, docLength, \"[a-z]\\\\B\", reCxx11);\r\n\t\tREQUIRE(match == Match(0, 1));\r\n\t\tmatch = doc.FindString(2, docLength, \"[a-z]\\\\B\", reCxx11);\r\n\t\tREQUIRE(match == Match(3, 1));\r\n\r\n\t\t#endif\r\n\t}\r\n\r\n\tSECTION(\"RESearchMovePositionOutsideCharUTF8\") {\r\n\t\tDocPlus doc(\" a\\xCE\\x93\\xCE\\x93z \", CpUtf8);// a gamma gamma z\r\n\t\tconst Sci::Position docLength = doc.document.Length();\r\n\t\tconstexpr std::string_view finding = R\"([a-z](\\w)\\1)\";\r\n\r\n\t\tMatch match = doc.FindString(0, docLength, finding, rePosix);\r\n\t\tREQUIRE(match == Match(1, 5));\r\n\r\n\t\tconstexpr std::string_view substituteText = R\"(\\t\\1\\n)\";\r\n\t\tstd::string substituted = doc.Substitute(substituteText);\r\n\t\tREQUIRE(substituted == \"\\t\\xCE\\x93\\n\");\r\n\r\n\t\t#ifndef NO_CXX11_REGEX\r\n\t\tmatch = doc.FindString(0, docLength, finding, reCxx11);\r\n\t\tREQUIRE(match == Match(1, 5));\r\n\r\n\t\tsubstituted = doc.Substitute(substituteText);\r\n\t\tREQUIRE(substituted == \"\\t\\xCE\\x93\\n\");\r\n\t\t#endif\r\n\t}\r\n\r\n\tSECTION(\"RESearchMovePositionOutsideCharDBCS\") {\r\n\t\tDocPlus doc(\" \\x98\\x61xx 1aa\\x83\\xA1\\x83\\xA1z \", 932);// U+548C xx 1aa gamma gamma z\r\n\t\tconst Sci::Position docLength = doc.document.Length();\r\n\r\n\t\tMatch match = doc.FindString(0, docLength, R\"([a-z](\\w)\\1)\", rePosix);\r\n\t\tREQUIRE(match == Match(8, 5));\r\n\r\n\t\tconstexpr std::string_view substituteText = R\"(\\t\\1\\n)\";\r\n\t\tstd::string substituted = doc.Substitute(substituteText);\r\n\t\tREQUIRE(substituted == \"\\t\\x83\\xA1\\n\");\r\n\r\n\t\tmatch = doc.FindString(0, docLength, R\"(\\w([a-z])\\1)\", rePosix);\r\n\t\tREQUIRE(match == Match(6, 3));\r\n\r\n\t\tsubstituted = doc.Substitute(substituteText);\r\n\t\tREQUIRE(substituted == \"\\ta\\n\");\r\n\t}\r\n\r\n}\r\n\r\nTEST_CASE(\"DocumentUndo\") {\r\n\r\n\t// These tests check that Undo reports the end of coalesced deletes\r\n\r\n\tconstexpr std::string_view sText = \"Scintilla\";\r\n\tDocPlus doc(sText, 0);\r\n\r\n\tSECTION(\"CheckDeleteForwards\") {\r\n\t\t// Delete forwards like the Del key\r\n\t\tdoc.document.DeleteUndoHistory();\r\n\t\tdoc.document.DeleteChars(1, 1);\r\n\t\tdoc.document.DeleteChars(1, 1);\r\n\t\tdoc.document.DeleteChars(1, 1);\r\n\t\tconst Sci::Position position = doc.document.Undo();\r\n\t\tREQUIRE(position == 4);\t// End of reinsertion\r\n\t\tREQUIRE(!doc.document.CanUndo());\t// Exhausted undo stack\r\n\t\tREQUIRE(doc.document.CanRedo());\r\n\t}\r\n\r\n\tSECTION(\"CheckDeleteBackwards\") {\r\n\t\t// Delete backwards like the backspace key\r\n\t\tdoc.document.DeleteUndoHistory();\r\n\t\tdoc.document.DeleteChars(5, 1);\r\n\t\tdoc.document.DeleteChars(4, 1);\r\n\t\tdoc.document.DeleteChars(3, 1);\r\n\t\tconst Sci::Position position = doc.document.Undo();\r\n\t\tREQUIRE(position == 6);\t// End of reinsertion\r\n\t\tREQUIRE(!doc.document.CanUndo());\t// Exhausted undo stack\r\n\t}\r\n\r\n\tSECTION(\"CheckBothWays\") {\r\n\t\t// Delete backwards like the backspace key\r\n\t\tdoc.document.DeleteUndoHistory();\r\n\t\t// Like having the caret at position 5 then\r\n\t\tdoc.document.DeleteChars(5, 1);\t// Del\r\n\t\tdoc.document.DeleteChars(4, 1); // Backspace\r\n\t\tdoc.document.DeleteChars(4, 1); // Del\r\n\t\tdoc.document.DeleteChars(3, 1); // Backspace\r\n\t\tconst Sci::Position position = doc.document.Undo();\r\n\t\tREQUIRE(position == 7);\t// End of reinsertion, Start at 5, 2*Del\r\n\t\tREQUIRE(!doc.document.CanUndo());\t// Exhausted undo stack\r\n\t}\r\n\r\n\tSECTION(\"CheckInsert\") {\r\n\t\t// Insertions are only coalesced when following previous\r\n\t\tdoc.document.DeleteUndoHistory();\r\n\t\tdoc.document.InsertString(1, \"1\");\r\n\t\tdoc.document.InsertString(2, \"2\");\r\n\t\tdoc.document.InsertString(3, \"3\");\r\n\t\tREQUIRE(doc.Contents() == \"S123cintilla\");\r\n\t\tconst Sci::Position position = doc.document.Undo();\r\n\t\tREQUIRE(position == 1);\t// Start of insertions\r\n\t\tREQUIRE(!doc.document.CanUndo());\t// Exhausted undo stack\r\n\t}\r\n\r\n\tSECTION(\"CheckGrouped\") {\r\n\t\t// Check that position returned for group is that at end of first deletion set\r\n\t\t// Also include a container undo action.\r\n\t\tdoc.document.DeleteUndoHistory();\r\n\t\tdoc.document.BeginUndoAction();\r\n\t\t// At 1, 2*Del so end of initial deletion sequence is 3\r\n\t\tdoc.document.DeleteChars(1, 1); // 'c'\r\n\t\tdoc.document.DeleteChars(1, 1); // 'i'\r\n\t\tdoc.document.AddUndoAction(99, true);\r\n\t\tdoc.document.InsertString(1, \"1\");\r\n\t\tdoc.document.DeleteChars(4, 2); // 'il'\r\n\t\tdoc.document.BeginUndoAction();\r\n\t\tREQUIRE(doc.Contents() == \"S1ntla\");\r\n\t\tconst Sci::Position position = doc.document.Undo();\r\n\t\tREQUIRE(position == 3);\t// Start of insertions\r\n\t\tREQUIRE(!doc.document.CanUndo());\t// Exhausted undo stack\r\n\t}\r\n}\r\n\r\nTEST_CASE(\"Words\") {\r\n\r\n\tSECTION(\"WordsInText\") {\r\n\t\tconst DocPlus doc(\" abc \", 0);\r\n\t\tREQUIRE(doc.document.IsWordAt(1, 4));\r\n\t\tREQUIRE(!doc.document.IsWordAt(0, 1));\r\n\t\tREQUIRE(!doc.document.IsWordAt(1, 2));\r\n\t\tconst DocPlus docPunct(\" [!] \", 0);\r\n\t\tREQUIRE(docPunct.document.IsWordAt(1, 4));\r\n\t\tREQUIRE(!docPunct.document.IsWordAt(0, 1));\r\n\t\tREQUIRE(!docPunct.document.IsWordAt(1, 2));\r\n\t\tconst DocPlus docMixed(\" -ab \", 0);\t// '-' is punctuation, 'ab' is word\r\n\t\tREQUIRE(docMixed.document.IsWordAt(2, 4));\r\n\t\tREQUIRE(docMixed.document.IsWordAt(1, 4));\r\n\t\tREQUIRE(docMixed.document.IsWordAt(1, 2));\r\n\t\tREQUIRE(!docMixed.document.IsWordAt(1, 3));\t// 3 is between a and b so not word edge\r\n\t\t// Scintilla's word definition just examines the ends\r\n\t\tconst DocPlus docOverSpace(\" a b \", 0);\r\n\t\tREQUIRE(docOverSpace.document.IsWordAt(1, 4));\r\n\t}\r\n\r\n\tSECTION(\"WordsAtEnds\") {\r\n\t\tconst DocPlus doc(\"a c\", 0);\r\n\t\tREQUIRE(doc.document.IsWordAt(0, 1));\r\n\t\tREQUIRE(doc.document.IsWordAt(2, 3));\r\n\t\tconst DocPlus docEndSpace(\" a c \", 0);\r\n\t\tREQUIRE(!docEndSpace.document.IsWordAt(0, 2));\r\n\t\tREQUIRE(!docEndSpace.document.IsWordAt(3, 5));\r\n\t}\r\n}\r\n\r\nTEST_CASE(\"SafeSegment\") {\r\n\tSECTION(\"Short\") {\r\n\t\tconst DocPlus doc(\"\", 0);\r\n\t\t// all encoding: break before or after last space\r\n\t\tconstexpr std::string_view text = \"12 \";\r\n\t\tconst size_t length = doc.document.SafeSegment(text);\r\n\t\tREQUIRE(length <= text.length());\r\n\t\tREQUIRE(text[length - 1] == '2');\r\n\t\tREQUIRE(text[length] == ' ');\r\n\t}\r\n\r\n\tSECTION(\"ASCII\") {\r\n\t\tconst DocPlus doc(\"\", 0);\r\n\t\t// all encoding: break before or after last space\r\n\t\tstd::string_view text = \"12 3 \\t45\";\r\n\t\tsize_t length = doc.document.SafeSegment(text);\r\n\t\tREQUIRE(text[length - 1] == ' ');\r\n\t\tREQUIRE(text[length] == '\\t');\r\n\r\n\t\t// UTF-8 and ASCII: word and punctuation boundary in middle of text\r\n\t\ttext = \"(IsBreakSpace(text[j]))\";\r\n\t\tlength = doc.document.SafeSegment(text);\r\n\t\tREQUIRE(text[length - 1] == 'j');\r\n\t\tREQUIRE(text[length] == ']');\r\n\r\n\t\t// UTF-8 and ASCII: word and punctuation boundary near start of text\r\n\t\ttext = \"(IsBreakSpace\";\r\n\t\tlength = doc.document.SafeSegment(text);\r\n\t\tREQUIRE(text[length - 1] == '(');\r\n\t\tREQUIRE(text[length] == 'I');\r\n\r\n\t\t// UTF-8 and ASCII: word and punctuation boundary near end of text\r\n\t\ttext = \"IsBreakSpace)\";\r\n\t\tlength = doc.document.SafeSegment(text);\r\n\t\tREQUIRE(text[length - 1] == 'e');\r\n\t\tREQUIRE(text[length] == ')');\r\n\r\n\t\t// break before last character\r\n\t\ttext = \"JapaneseJa\";\r\n\t\tlength = doc.document.SafeSegment(text);\r\n\t\tREQUIRE(text[length - 1] == 'J');\r\n\t\tREQUIRE(text[length] == 'a');\r\n\t}\r\n\r\n\tSECTION(\"UTF-8\") {\r\n\t\tconst DocPlus doc(\"\", CpUtf8);\r\n\t\t// break before last character: no trail byte\r\n\t\tstd::string_view text = \"JapaneseJa\";\r\n\t\tsize_t length = doc.document.SafeSegment(text);\r\n\t\tREQUIRE(text[length - 1] == 'J');\r\n\t\tREQUIRE(text[length] == 'a');\r\n\r\n\t\t// break before last character: 1 trail byte\r\n\t\ttext = \"Japanese\\xe6\\x97\\xa5\\xe6\\x9c\\xac\\xe8\\xaa\\x9e\\xc2\\xa9\";\r\n\t\tlength = doc.document.SafeSegment(text);\r\n\t\tREQUIRE(text[length - 1] == '\\x9e');\r\n\t\tREQUIRE(text[length] == '\\xc2');\r\n\r\n\t\t// break before last character: 2 trail bytes\r\n\t\ttext = \"Japanese\\xe6\\x97\\xa5\\xe6\\x9c\\xac\\xe8\\xaa\\x9e\";\r\n\t\tlength = doc.document.SafeSegment(text);\r\n\t\tREQUIRE(text[length - 1] == '\\xac');\r\n\t\tREQUIRE(text[length] == '\\xe8');\r\n\r\n\t\t// break before last character: 3 trail bytes\r\n\t\ttext = \"Japanese\\xe6\\x97\\xa5\\xe6\\x9c\\xac\\xe8\\xaa\\x9e\\xf0\\x9f\\x98\\x8a\";\r\n\t\tlength = doc.document.SafeSegment(text);\r\n\t\tREQUIRE(text[length - 1] == '\\x9e');\r\n\t\tREQUIRE(text[length] == '\\xf0');\r\n\t}\r\n\r\n\tSECTION(\"DBCS Shift-JIS\") {\r\n\t\tconst DocPlus doc(\"\", 932);\r\n\t\t// word and punctuation boundary in middle of text: single byte\r\n\t\tstd::string_view text = \"(IsBreakSpace(text[j]))\";\r\n\t\tsize_t length = doc.document.SafeSegment(text);\r\n\t\tREQUIRE(text[length - 1] == 'j');\r\n\t\tREQUIRE(text[length] == ']');\r\n\r\n\t\t// word and punctuation boundary in middle of text: double byte\r\n\t\ttext = \"(IsBreakSpace(text[\\x8c\\xea]))\";\r\n\t\tlength = doc.document.SafeSegment(text);\r\n\t\tREQUIRE(text[length - 1] == '\\xea');\r\n\t\tREQUIRE(text[length] == ']');\r\n\r\n\t\t// word and punctuation boundary near start of text\r\n\t\ttext = \"(IsBreakSpace\";\r\n\t\tlength = doc.document.SafeSegment(text);\r\n\t\tREQUIRE(text[length - 1] == '(');\r\n\t\tREQUIRE(text[length] == 'I');\r\n\r\n\t\t// word and punctuation boundary near end of text: single byte\r\n\t\ttext = \"IsBreakSpace)\";\r\n\t\tlength = doc.document.SafeSegment(text);\r\n\t\tREQUIRE(text[length - 1] == 'e');\r\n\t\tREQUIRE(text[length] == ')');\r\n\r\n\t\t// word and punctuation boundary near end of text: double byte\r\n\t\ttext = \"IsBreakSpace\\x8c\\xea)\";\r\n\t\tlength = doc.document.SafeSegment(text);\r\n\t\tREQUIRE(text[length - 1] == '\\xea');\r\n\t\tREQUIRE(text[length] == ')');\r\n\r\n\t\t// break before last character: single byte\r\n\t\ttext = \"JapaneseJa\";\r\n\t\tlength = doc.document.SafeSegment(text);\r\n\t\tREQUIRE(text[length - 1] == 'J');\r\n\t\tREQUIRE(text[length] == 'a');\r\n\r\n\t\t// break before last character: double byte\r\n\t\ttext = \"Japanese\\x93\\xfa\\x96\\x7b\\x8c\\xea\";\r\n\t\tlength = doc.document.SafeSegment(text);\r\n\t\tREQUIRE(text[length - 1] == '\\x7b');\r\n\t\tREQUIRE(text[length] == '\\x8c');\r\n\t}\r\n}\r\n\r\nTEST_CASE(\"PerLine\") {\r\n\tSECTION(\"LineMarkers\") {\r\n\t\tDocPlus doc(\"1\\n2\\n\", CpUtf8);\r\n\t\tREQUIRE(doc.document.LinesTotal() == 3);\r\n\t\tconst int mh1 = doc.document.AddMark(0, 0);\r\n\t\tconst int mh2 = doc.document.AddMark(1, 1);\r\n\t\tconst int mh3 = doc.document.AddMark(2, 2);\r\n\t\tREQUIRE(mh1 != -1);\r\n\t\tREQUIRE(mh2 != -1);\r\n\t\tREQUIRE(mh3 != -1);\r\n\t\tREQUIRE(doc.document.AddMark(3, 3) == -1);\r\n\r\n\t\t// delete first character, no change\r\n\t\tREQUIRE(doc.document.CharAt(0) == '1');\r\n\t\tdoc.document.DeleteChars(0, 1);\r\n\t\tREQUIRE(doc.document.LinesTotal() == 3);\r\n\t\tREQUIRE(doc.document.MarkerHandleFromLine(0, 0) == mh1);\r\n\t\tREQUIRE(doc.document.MarkerHandleFromLine(0, 1) == -1);\r\n\t\tREQUIRE(doc.document.MarkerHandleFromLine(1, 0) == mh2);\r\n\t\tREQUIRE(doc.document.MarkerHandleFromLine(1, 1) == -1);\r\n\r\n\t\t// delete first line, so merged\r\n\t\tREQUIRE(doc.document.CharAt(0) == '\\n');\r\n\t\tdoc.document.DeleteChars(0, 1);\r\n\t\tREQUIRE(doc.document.CharAt(0) == '2');\r\n\t\tconst std::set handleSet {mh1, mh2};\r\n\t\tconst int handle1 = doc.document.MarkerHandleFromLine(0, 0);\r\n\t\tconst int handle2 = doc.document.MarkerHandleFromLine(0, 1);\r\n\t\tREQUIRE(handle1 != handle2);\r\n\t\tREQUIRE(handleSet.count(handle1) == 1);\r\n\t\tREQUIRE(handleSet.count(handle2) == 1);\r\n\t\tREQUIRE(doc.document.MarkerHandleFromLine(0, 2) == -1);\r\n\t\tREQUIRE(doc.document.MarkerHandleFromLine(1, 0) == mh3);\r\n\t\tREQUIRE(doc.document.MarkerHandleFromLine(1, 1) == -1);\r\n\t}\r\n\r\n\tSECTION(\"LineAnnotation\") {\r\n\t\tDocPlus doc(\"1\\n2\\n\", CpUtf8);\r\n\t\tREQUIRE(doc.document.LinesTotal() == 3);\r\n\t\tSci::Position length = doc.document.Length();\r\n\t\tdoc.document.AnnotationSetText(0, \"1\");\r\n\t\tdoc.document.AnnotationSetText(1, \"1\\n2\");\r\n\t\tdoc.document.AnnotationSetText(2, \"1\\n2\\n3\");\r\n\t\tREQUIRE(doc.document.AnnotationLines(0) == 1);\r\n\t\tREQUIRE(doc.document.AnnotationLines(1) == 2);\r\n\t\tREQUIRE(doc.document.AnnotationLines(2) == 3);\r\n\t\tREQUIRE(doc.document.AnnotationLines(3) == 0);\r\n\r\n\t\t// delete last line\r\n\t\tlength -= 1;\r\n\t\tdoc.document.DeleteChars(length, 1);\r\n\t\t// Deleting the last line moves its 3-line annotation to previous line,\r\n\t\t// deleting the 2-line annotation of the previous line.\r\n\t\tREQUIRE(doc.document.LinesTotal() == 2);\r\n\t\tREQUIRE(doc.document.AnnotationLines(0) == 1);\r\n\t\tREQUIRE(doc.document.AnnotationLines(1) == 3);\r\n\t\tREQUIRE(doc.document.AnnotationLines(2) == 0);\r\n\r\n\t\t// delete last character, no change\r\n\t\tlength -= 1;\r\n\t\tREQUIRE(doc.document.CharAt(length) == '2');\r\n\t\tdoc.document.DeleteChars(length, 1);\r\n\t\tREQUIRE(doc.document.LinesTotal() == 2);\r\n\t\tREQUIRE(doc.document.AnnotationLines(0) == 1);\r\n\t\tREQUIRE(doc.document.AnnotationLines(1) == 3);\r\n\t\tREQUIRE(doc.document.AnnotationLines(2) == 0);\r\n\t}\r\n}\r\n"
  },
  {
    "path": "scintilla/test/unit/testGeometry.cxx",
    "content": "/** @file testGeometry.cxx\r\n ** Unit Tests for Scintilla internal data structures\r\n **/\r\n\r\n#include <cstdint>\r\n\r\n#include \"Geometry.h\"\r\n\r\n#include \"catch.hpp\"\r\n\r\nusing namespace Scintilla;\r\nusing namespace Scintilla::Internal;\r\n\r\n// Test Geometry.\r\n\r\nTEST_CASE(\"Point\") {\r\n\r\n\tSECTION(\"Point\") {\r\n\t\tconstexpr Point pt(1.0, 2.0);\r\n\t\tREQUIRE(pt.x == 1.0);\r\n\t\tREQUIRE(pt.y == 2.0);\r\n\r\n\t\tconstexpr Point pti = Point::FromInts(1, 2);\r\n\t\tREQUIRE(pt == pti);\r\n\r\n\t\tconstexpr Point pt2 = pt + pt;\r\n\t\tREQUIRE(pt != pt2);\r\n\r\n\t\tconstexpr Point ptBack = pt2 - pt;\r\n\t\tREQUIRE(pt == ptBack);\r\n\t}\r\n\r\n}\r\n\r\nTEST_CASE(\"Interval\") {\r\n\r\n\tSECTION(\"Interval\") {\r\n\t\tconstexpr Interval interval { 1.0, 2.0 };\r\n\t\tREQUIRE(interval.left == 1.0);\r\n\t\tREQUIRE(interval.right == 2.0);\r\n\t\tREQUIRE(interval.Width() == 1.0);\r\n\t\tREQUIRE(!interval.Empty());\r\n\r\n\t\tconstexpr Interval empty { 4.0, 4.0 };\r\n\t\tREQUIRE(empty.Empty());\r\n\t\tREQUIRE(empty.Width() == 0.0);\r\n\t\tREQUIRE(!(interval == empty));\r\n\t\tREQUIRE(!(interval.Intersects(empty)));\r\n\r\n\t\tconstexpr Interval inside { 1.7, 1.8 };\r\n\t\tREQUIRE(interval.Intersects(inside));\r\n\t\tconstexpr Interval straddles { 1.7, 2.8 };\r\n\t\tREQUIRE(interval.Intersects(straddles));\r\n\t}\r\n\r\n\tSECTION(\"Interval\") {\r\n\t\tconstexpr Interval interval1{ 1.0, 3.0 };\r\n\t\tconstexpr Interval interval2{ 2.0, 4.0 };\r\n\t\tREQUIRE(Intersection(interval1, interval2) == Interval{ 2.0, 3.0 });\r\n\t}\r\n}\r\n\r\nTEST_CASE(\"PRectangle\") {\r\n\r\n\tSECTION(\"PRectangle\") {\r\n\t\tconstexpr PRectangle rc(1.0, 2.0, 3.0, 4.0);\r\n\t\tREQUIRE(rc.left == 1.0);\r\n\t\tREQUIRE(rc.top == 2.0);\r\n\t\tREQUIRE(rc.right == 3.0);\r\n\t\tREQUIRE(rc.bottom == 4.0);\r\n\t\tREQUIRE(rc.Width() == 2.0);\r\n\t\tREQUIRE(rc.Height() == 2.0);\r\n\t\tREQUIRE(!rc.Empty());\r\n\r\n\t\tconstexpr PRectangle rci = PRectangle::FromInts(1, 2, 3, 4);\r\n\t\tREQUIRE(rc == rci);\r\n\r\n\t\tconstexpr PRectangle rcEmpty;\r\n\t\tREQUIRE(rcEmpty.Empty());\r\n\t}\r\n\r\n\tSECTION(\"Contains\") {\r\n\t\tconstexpr PRectangle rc(1.0, 2.0, 3.0, 4.0);\r\n\t\tconstexpr Point pt(1.5, 2.5);\r\n\t\tREQUIRE(rc.Contains(pt));\r\n\t\tREQUIRE(rc.ContainsWholePixel(pt));\r\n\t\tconstexpr Point ptNearEdge(2.9, 2.5);\r\n\t\tREQUIRE(rc.Contains(ptNearEdge));\r\n\t\tREQUIRE(!rc.ContainsWholePixel(ptNearEdge));\r\n\t\tconstexpr Point ptOutside(1.5, 20.5);\r\n\t\tREQUIRE(!rc.Contains(ptOutside));\r\n\t\tREQUIRE(!rc.ContainsWholePixel(ptOutside));\r\n\r\n\t\tconstexpr PRectangle rcInside(1.5, 2.0, 2.5, 4.0);\r\n\t\tREQUIRE(rc.Contains(rcInside));\r\n\t\tREQUIRE(rc.Intersects(rcInside));\r\n\r\n\t\tconstexpr PRectangle rcIntersects(1.5, 2.0, 3.5, 4.0);\r\n\t\tREQUIRE(!rc.Contains(rcIntersects));\r\n\t\tREQUIRE(rc.Intersects(rcIntersects));\r\n\r\n\t\tconstexpr PRectangle rcSeparate(11.0, 12.0, 13.0, 14.0);\r\n\t\tREQUIRE(!rc.Contains(rcSeparate));\r\n\t\tREQUIRE(!rc.Intersects(rcSeparate));\r\n\r\n\t\tconstexpr Point ptCentre = rc.Centre();\r\n\t\tREQUIRE(ptCentre == Point(2.0, 3.0));\r\n\t}\r\n\r\n\tSECTION(\"Move\") {\r\n\t\tPRectangle rc(1.0, 2.0, 3.0, 4.0);\r\n\t\trc.Move(1.0, 10.0);\r\n\t\tREQUIRE(rc == PRectangle(2.0, 12.0, 4.0, 14.0));\r\n\t}\r\n\r\n\tSECTION(\"Inset\") {\r\n\t\tconstexpr PRectangle rc(1.0, 2.0, 3.0, 4.0);\r\n\t\tconstexpr PRectangle rcInset = rc.Inset(0.5);\r\n\t\tREQUIRE(rcInset == PRectangle(1.5, 2.5, 2.5, 3.5));\r\n\r\n\t\tconstexpr PRectangle rcInsetPt = rc.Inset(Point(0.25, 0.5));\r\n\t\tREQUIRE(rcInsetPt == PRectangle(1.25, 2.5, 2.75, 3.5));\r\n\t}\r\n\r\n\tSECTION(\"Clamp\") {\r\n\t\tconstexpr PRectangle rc(1.0, 2.0, 3.0, 4.0);\r\n\r\n\t\tconst PRectangle cutBottom = Clamp(rc, Edge::bottom, 3.5);\r\n\t\tREQUIRE(cutBottom == PRectangle(1.0, 2.0, 3.0, 3.5));\r\n\r\n\t\tconst PRectangle justBottom = Side(rc, Edge::bottom, 0.5);\r\n\t\tREQUIRE(justBottom == PRectangle(1.0, 3.5, 3.0, 4.0));\r\n\r\n\t\tconstexpr PRectangle rcInset = rc.Inset(0.5);\r\n\t\tREQUIRE(rcInset == PRectangle(1.5, 2.5, 2.5, 3.5));\r\n\r\n\t\tconstexpr PRectangle rcInsetPt = rc.Inset(Point(0.25, 0.5));\r\n\t\tREQUIRE(rcInsetPt == PRectangle(1.25, 2.5, 2.75, 3.5));\r\n\r\n\t\tconst Interval bounds = HorizontalBounds(rcInsetPt);\r\n\t\tREQUIRE(bounds == Interval{ 1.25, 2.75 });\r\n\r\n\t\tconst PRectangle applyBounds = Intersection(rc, bounds);\r\n\t\tREQUIRE(applyBounds == PRectangle(1.25, 2.0, 2.75, 4.0));\r\n\t}\r\n\r\n\tSECTION(\"PixelAlign\") {\r\n\t\t// Whole pixels\r\n\t\tREQUIRE(PixelAlign(1.0, 1) == 1.0);\r\n\t\tREQUIRE(PixelAlignFloor(1.0, 1) == 1.0);\r\n\t\tREQUIRE(PixelAlignCeil(1.0, 1) == 1.0);\r\n\r\n\t\tREQUIRE(PixelAlign(1.25, 1) == 1.0);\r\n\t\tREQUIRE(PixelAlignFloor(1.25, 1) == 1.0);\r\n\t\tREQUIRE(PixelAlignCeil(1.25, 1) == 2.0);\r\n\r\n\t\tREQUIRE(PixelAlign(1.5, 1) == 2.0);\r\n\t\tREQUIRE(PixelAlignFloor(1.5, 1) == 1.0);\r\n\t\tREQUIRE(PixelAlignCeil(1.5, 1) == 2.0);\r\n\r\n\t\tREQUIRE(PixelAlign(1.75, 1) == 2.0);\r\n\t\tREQUIRE(PixelAlignFloor(1.75, 1) == 1.0);\r\n\t\tREQUIRE(PixelAlignCeil(1.75, 1) == 2.0);\r\n\r\n\t\tREQUIRE(PixelAlign(Point(1.75, 1.25), 1) == Point(2.0, 1.0));\r\n\t\tREQUIRE(PixelAlign(Point(1.5, 1.0), 1) == Point(2.0, 1.0));\r\n\r\n\t\t// Half pixels\r\n\t\tREQUIRE(PixelAlign(1.0, 2) == 1.0);\r\n\t\tREQUIRE(PixelAlignFloor(1.0, 2) == 1.0);\r\n\t\tREQUIRE(PixelAlignCeil(1.0, 2) == 1.0);\r\n\r\n\t\tREQUIRE(PixelAlign(1.25, 2) == 1.5);\r\n\t\tREQUIRE(PixelAlignFloor(1.25, 2) == 1.0);\r\n\t\tREQUIRE(PixelAlignCeil(1.25, 2) == 1.5);\r\n\r\n\t\tREQUIRE(PixelAlign(1.5, 2) == 1.5);\r\n\t\tREQUIRE(PixelAlignFloor(1.5, 2) == 1.5);\r\n\t\tREQUIRE(PixelAlignCeil(1.5, 2) == 1.5);\r\n\r\n\t\tREQUIRE(PixelAlign(1.75, 2) == 2.0);\r\n\t\tREQUIRE(PixelAlignFloor(1.75, 2) == 1.5);\r\n\t\tREQUIRE(PixelAlignCeil(1.75, 2) == 2.0);\r\n\r\n\t\tREQUIRE(PixelAlign(Point(1.75, 1.25), 2) == Point(2.0, 1.5));\r\n\t\tREQUIRE(PixelAlign(Point(1.5, 1.0), 2) == Point(1.5, 1.0));\r\n\r\n\t\t// x->round, y->floored\r\n\t\tREQUIRE(PixelAlign(PRectangle(1.0, 1.25, 1.5, 1.75), 1) == PRectangle(1.0, 1.0, 2.0, 1.0));\r\n\t\tREQUIRE(PixelAlign(PRectangle(1.0, 1.25, 1.5, 1.75), 2) == PRectangle(1.0, 1.0, 1.5, 1.5));\r\n\r\n\t\t// x->outside(floor left, ceil right), y->floored\r\n\t\tREQUIRE(PixelAlignOutside(PRectangle(1.1, 1.25, 1.6, 1.75), 1) == PRectangle(1.0, 1.0, 2.0, 1.0));\r\n\t\tREQUIRE(PixelAlignOutside(PRectangle(1.1, 1.25, 1.6, 1.75), 2) == PRectangle(1.0, 1.0, 2.0, 1.5));\r\n\t}\r\n\r\n}\r\n\r\nTEST_CASE(\"ColourRGBA\") {\r\n\r\n\tSECTION(\"ColourRGBA\") {\r\n\t\tconstexpr ColourRGBA colour(0x10203040);\r\n\t\tconstexpr ColourRGBA colourFromRGB(0x40, 0x30, 0x20, 0x10);\r\n\r\n\t\tREQUIRE(colour == colourFromRGB);\r\n\t\tREQUIRE(colour.GetRed() == 0x40);\r\n\t\tREQUIRE(colour.GetGreen() == 0x30);\r\n\t\tREQUIRE(colour.GetBlue() == 0x20);\r\n\t\tREQUIRE(colour.GetAlpha() == 0x10);\r\n\t\tREQUIRE(!colour.IsOpaque());\r\n\t\tREQUIRE(colour.AsInteger() == 0x10203040);\r\n\r\n\t\tREQUIRE(ColourRGBA(colour, 0x80) == ColourRGBA(0x40, 0x30, 0x20, 0x80));\r\n\t\tREQUIRE(ColourRGBA::FromRGB(0x203040) == ColourRGBA(0x40, 0x30, 0x20, 0xff));\r\n\t\tREQUIRE(ColourRGBA::FromIpRGB(0x203040) == ColourRGBA(0x40, 0x30, 0x20, 0xff));\r\n\r\n\t\tconstexpr ColourRGBA colour01(0x00ff00ff);\r\n\t\tREQUIRE(colour01.GetRedComponent() == 1.0);\r\n\t\tREQUIRE(colour01.GetGreenComponent() == 0.0);\r\n\t\tREQUIRE(colour01.GetBlueComponent() == 1.0);\r\n\t\tREQUIRE(colour01.GetAlphaComponent() == 0.0);\r\n\r\n\t\t// Opaque colours\r\n\t\tconstexpr ColourRGBA colourRGB(0xff203040);\r\n\t\tREQUIRE(colourRGB.IsOpaque());\r\n\t\tconstexpr ColourRGBA colourOpaque(0x40, 0x30, 0x20, 0xff);\r\n\t\tREQUIRE(colourRGB == colourOpaque);\r\n\r\n\t\tREQUIRE(colourRGB.OpaqueRGB() == 0x203040);\r\n\t\tREQUIRE(colourRGB.WithoutAlpha() == ColourRGBA(0x40, 0x30, 0x20, 0));\r\n\t}\r\n\r\n\tSECTION(\"Mixing\") {\r\n\t\tconstexpr ColourRGBA colourMin(0x10, 0x20, 0x30, 0x40);\r\n\t\tconstexpr ColourRGBA colourMax(0x30, 0x60, 0x90, 0xC0);\r\n\r\n\t\tconstexpr ColourRGBA colourMid(0x20, 0x40, 0x60, 0x80);\r\n\t\tREQUIRE(colourMin.MixedWith(colourMax) == colourMid);\r\n\t\tREQUIRE(colourMin.MixedWith(colourMax, 0.5) == colourMid);\r\n\r\n\t\t// 3/4 between min and max\r\n\t\tconstexpr ColourRGBA colour75(0x28, 0x50, 0x78, 0xA0);\r\n\t\tREQUIRE(colourMin.MixedWith(colourMax, 0.75) == colour75);\r\n\t}\r\n\r\n}\r\n"
  },
  {
    "path": "scintilla/test/unit/testPartitioning.cxx",
    "content": "/** @file testPartitioning.cxx\r\n ** Unit Tests for Scintilla internal data structures\r\n **/\r\n\r\n#include <cstddef>\r\n#include <cstring>\r\n\r\n#include <stdexcept>\r\n#include <string_view>\r\n#include <vector>\r\n#include <optional>\r\n#include <algorithm>\r\n#include <memory>\r\n\r\n#include \"Debugging.h\"\r\n\r\n#include \"Position.h\"\r\n#include \"SplitVector.h\"\r\n#include \"Partitioning.h\"\r\n\r\n#include \"catch.hpp\"\r\n\r\nusing namespace Scintilla::Internal;\r\n\r\n// Test Partitioning.\r\n\r\nTEST_CASE(\"CompileCopying Partitioning\") {\r\n\r\n\t// These are compile-time tests to check that basic copy and move\r\n\t// operations are defined correctly.\r\n\r\n\tSECTION(\"CopyingMoving\") {\r\n\t\tPartitioning<int> s;\r\n\t\tPartitioning<int> s2;\r\n\r\n\t\t// Copy constructor\r\n\t\tconst Partitioning<int> sa(s);\r\n\t\t// Copy assignment\r\n\t\tPartitioning<int> sb;\r\n\t\tsb = s;\r\n\r\n\t\t// Move constructor\r\n\t\tconst Partitioning<int> sc(std::move(s));\r\n\t\t// Move assignment\r\n\t\tPartitioning<int> sd;\r\n\t\tsd = (std::move(s2));\r\n\t}\r\n\r\n}\r\n\r\nTEST_CASE(\"Partitioning\") {\r\n\r\n\tPartitioning<Sci::Position> part;\r\n\r\n\tSECTION(\"IsEmptyInitially\") {\r\n\t\tREQUIRE(1 == part.Partitions());\r\n\t\tREQUIRE(0 == part.PositionFromPartition(part.Partitions()));\r\n\t\tREQUIRE(0 == part.PartitionFromPosition(0));\r\n\t}\r\n\r\n\tSECTION(\"SimpleInsert\") {\r\n\t\tpart.InsertText(0, 1);\r\n\t\tREQUIRE(1 == part.Partitions());\r\n\t\tREQUIRE(1 == part.PositionFromPartition(part.Partitions()));\r\n\t}\r\n\r\n\tSECTION(\"TwoPartitions\") {\r\n\t\tpart.InsertText(0, 2);\r\n\t\tpart.InsertPartition(1, 1);\r\n\t\tREQUIRE(2 == part.Partitions());\r\n\t\tREQUIRE(0 == part.PositionFromPartition(0));\r\n\t\tREQUIRE(1 == part.PositionFromPartition(1));\r\n\t\tREQUIRE(2 == part.PositionFromPartition(2));\r\n\t}\r\n\r\n\tSECTION(\"MoveStart\") {\r\n\t\tpart.InsertText(0, 3);\r\n\t\tpart.InsertPartition(1, 2);\r\n\t\tpart.SetPartitionStartPosition(1,1);\r\n\t\tREQUIRE(2 == part.Partitions());\r\n\t\tREQUIRE(0 == part.PositionFromPartition(0));\r\n\t\tREQUIRE(1 == part.PositionFromPartition(1));\r\n\t\tREQUIRE(3 == part.PositionFromPartition(2));\r\n\t\tpart.Check();\r\n\t}\r\n\r\n\tSECTION(\"InsertAgain\") {\r\n\t\tpart.InsertText(0, 3);\r\n\t\tpart.InsertPartition(1, 2);\r\n\t\tpart.InsertText(0,3);\r\n\t\tpart.InsertText(1,2);\r\n\t\tREQUIRE(2 == part.Partitions());\r\n\t\tREQUIRE(0 == part.PositionFromPartition(0));\r\n\t\tREQUIRE(5 == part.PositionFromPartition(1));\r\n\t\tREQUIRE(8 == part.PositionFromPartition(2));\r\n\t\tpart.Check();\r\n\t}\r\n\r\n\tSECTION(\"InsertMultiple\") {\r\n\t\tpart.InsertText(0, 10);\r\n\t\tconst Sci::Position positions[] { 2, 5, 7 };\r\n\t\tpart.InsertPartitions(1, positions, std::size(positions));\r\n\t\tREQUIRE(4 == part.Partitions());\r\n\t\tREQUIRE(0 == part.PositionFromPartition(0));\r\n\t\tREQUIRE(2 == part.PositionFromPartition(1));\r\n\t\tREQUIRE(5 == part.PositionFromPartition(2));\r\n\t\tREQUIRE(7 == part.PositionFromPartition(3));\r\n\t\tREQUIRE(10 == part.PositionFromPartition(4));\r\n\t\tpart.Check();\r\n\t}\r\n\r\n\tSECTION(\"InsertMultipleWithCast\") {\r\n\t\tpart.InsertText(0, 9);\r\n\t\tREQUIRE(1 == part.Partitions());\r\n\t\tconst ptrdiff_t positionsp[]{ 2, 4, 6, 8 };\r\n\t\tpart.InsertPartitionsWithCast(1, positionsp, std::size(positionsp));\r\n\t\tREQUIRE(5 == part.Partitions());\r\n\t\tREQUIRE(0 == part.PositionFromPartition(0));\r\n\t\tREQUIRE(2 == part.PositionFromPartition(1));\r\n\t\tREQUIRE(4 == part.PositionFromPartition(2));\r\n\t\tREQUIRE(6 == part.PositionFromPartition(3));\r\n\t\tREQUIRE(8 == part.PositionFromPartition(4));\r\n\t\tREQUIRE(9 == part.PositionFromPartition(5));\r\n\t\tpart.Check();\r\n\t}\r\n\r\n\tSECTION(\"InsertReversed\") {\r\n\t\tpart.InsertText(0, 3);\r\n\t\tpart.InsertPartition(1, 2);\r\n\t\tpart.InsertText(1,2);\r\n\t\tpart.InsertText(0,3);\r\n\t\tREQUIRE(2 == part.Partitions());\r\n\t\tREQUIRE(0 == part.PositionFromPartition(0));\r\n\t\tREQUIRE(5 == part.PositionFromPartition(1));\r\n\t\tREQUIRE(8 == part.PositionFromPartition(2));\r\n\t\tpart.Check();\r\n\t}\r\n\r\n\tSECTION(\"InverseSearch\") {\r\n\t\tpart.InsertText(0, 3);\r\n\t\tpart.InsertPartition(1, 2);\r\n\t\tpart.SetPartitionStartPosition(1,1);\r\n\r\n\t\tREQUIRE(2 == part.Partitions());\r\n\t\tREQUIRE(0 == part.PositionFromPartition(0));\r\n\t\tREQUIRE(1 == part.PositionFromPartition(1));\r\n\t\tREQUIRE(3 == part.PositionFromPartition(2));\r\n\r\n\t\tREQUIRE(0 == part.PartitionFromPosition(0));\r\n\t\tREQUIRE(1 == part.PartitionFromPosition(1));\r\n\t\tREQUIRE(1 == part.PartitionFromPosition(2));\r\n\r\n\t\tREQUIRE(1 == part.PartitionFromPosition(3));\r\n\t\tpart.Check();\r\n\t}\r\n\r\n\tSECTION(\"DeletePartition\") {\r\n\t\tpart.InsertText(0, 2);\r\n\t\tpart.InsertPartition(1, 1);\r\n\t\tpart.RemovePartition(1);\r\n\t\tREQUIRE(1 == part.Partitions());\r\n\t\tREQUIRE(0 == part.PositionFromPartition(0));\r\n\t\tREQUIRE(2 == part.PositionFromPartition(1));\r\n\t\tpart.Check();\r\n\t}\r\n\r\n\tSECTION(\"DeleteAll\") {\r\n\t\tpart.InsertText(0, 3);\r\n\t\tpart.InsertPartition(1, 2);\r\n\t\tpart.SetPartitionStartPosition(1,1);\r\n\t\tpart.DeleteAll();\r\n\t\t// Back to initial state\r\n\t\tREQUIRE(1 == part.Partitions());\r\n\t\tREQUIRE(0 == part.PositionFromPartition(part.Partitions()));\r\n\t}\r\n\r\n\tSECTION(\"TestBackwards\") {\r\n\t\tpart.InsertText(0, 10);\r\n\t\tpart.InsertPartition(1, 3);\r\n\t\tpart.InsertPartition(2, 6);\r\n\t\tpart.InsertPartition(3, 9);\r\n\t\tpart.InsertText(2,4);\r\n\t\tpart.InsertText(1,2);\r\n\t\tpart.InsertText(0,3);\r\n\t\tREQUIRE(4 == part.Partitions());\r\n\t\tREQUIRE(0 == part.PositionFromPartition(0));\r\n\t\tREQUIRE(6 == part.PositionFromPartition(1));\r\n\t\tREQUIRE(11 == part.PositionFromPartition(2));\r\n\t\tREQUIRE(18 == part.PositionFromPartition(3));\r\n\t\tREQUIRE(19 == part.PositionFromPartition(4));\r\n\t\tpart.Check();\r\n\t}\r\n\r\n\tSECTION(\"TestMany\") {\r\n\t\t// Provoke backstep call\r\n\t\tpart.InsertText(0, 42);\r\n\t\tfor (int i=0; i<20; i++) {\r\n\t\t\tpart.InsertPartition(i+1, (i+1) * 2);\r\n\t\t}\r\n\t\tfor (int i=20; i>0; i--) {\r\n\t\t\tpart.InsertText(i,2);\r\n\t\t}\r\n\t\tREQUIRE(21 == part.Partitions());\r\n\t\tfor (int i=1; i<20; i++) {\r\n\t\t\tREQUIRE((i*4 - 2) == part.PositionFromPartition(i));\r\n\t\t\tREQUIRE(i == part.PartitionFromPosition(i*4 - 2));\r\n\t\t}\r\n\t\tpart.InsertText(19,2);\r\n\t\tREQUIRE(3 == part.PartitionFromPosition(10));\r\n\t\tpart.InsertText(0,2);\r\n\t\tpart.InsertText(0,-2);\r\n\t\tpart.RemovePartition(1);\r\n\t\tREQUIRE(0 == part.PositionFromPartition(0));\r\n\t\tREQUIRE(6 == part.PositionFromPartition(1));\r\n\t\tREQUIRE(10 == part.PositionFromPartition(2));\r\n\t\tpart.RemovePartition(10);\r\n\t\tREQUIRE(46 == part.PositionFromPartition(10));\r\n\t\tREQUIRE(10 == part.PartitionFromPosition(46));\r\n\t\tREQUIRE(50 == part.PositionFromPartition(11));\r\n\t\tREQUIRE(11 == part.PartitionFromPosition(50));\r\n\t\tpart.Check();\r\n\t}\r\n\r\n}\r\n"
  },
  {
    "path": "scintilla/test/unit/testPerLine.cxx",
    "content": "/** @file testPerLine.cxx\r\n ** Unit Tests for Scintilla internal data structures\r\n **/\r\n\r\n#include <cstddef>\r\n#include <cstring>\r\n#include <stdexcept>\r\n#include <string_view>\r\n#include <vector>\r\n#include <forward_list>\r\n#include <optional>\r\n#include <algorithm>\r\n#include <memory>\r\n\r\n#include \"ScintillaTypes.h\"\r\n\r\n#include \"Debugging.h\"\r\n\r\n#include \"Position.h\"\r\n#include \"SplitVector.h\"\r\n#include \"Partitioning.h\"\r\n#include \"RunStyles.h\"\r\n#include \"CellBuffer.h\"\r\n#include \"PerLine.h\"\r\n\r\n#include \"catch.hpp\"\r\n\r\nusing namespace Scintilla::Internal;\r\n\r\nconstexpr int FoldBase = static_cast<int>(Scintilla::FoldLevel::Base);\r\n\r\n// Test MarkerHandleSet.\r\n\r\nTEST_CASE(\"CompileCopying MarkerHandleSet\") {\r\n\r\n\t// These are compile-time tests to check that basic copy and move\r\n\t// operations are defined correctly.\r\n\r\n\tSECTION(\"CopyingMoving\") {\r\n\t\tMarkerHandleSet s;\r\n\t\tMarkerHandleSet s2;\r\n\r\n\t\t// Copy constructor\r\n\t\tconst MarkerHandleSet sa(s);\r\n\t\t// Copy assignment\r\n\t\tMarkerHandleSet sb;\r\n\t\tsb = s;\r\n\r\n\t\t// Move constructor\r\n\t\tconst MarkerHandleSet sc(std::move(s));\r\n\t\t// Move assignment\r\n\t\tMarkerHandleSet sd;\r\n\t\tsd = (std::move(s2));\r\n\t}\r\n\r\n}\r\n\r\nTEST_CASE(\"MarkerHandleSet\") {\r\n\r\n\tMarkerHandleSet mhs;\r\n\r\n\tSECTION(\"Initial\") {\r\n\t\t// Initial State\r\n\t\tREQUIRE(mhs.Empty());\r\n\t\tREQUIRE(0 == mhs.MarkValue());\r\n\t\tREQUIRE(!mhs.Contains(1));\r\n\t}\r\n\r\n\tSECTION(\"InsertDelete\") {\r\n\t\t// Test knows that InsertHandle inserts at front (0)\r\n\t\t// Insert 1 with handle 100\r\n\t\tREQUIRE(mhs.InsertHandle(100,1));\r\n\t\tREQUIRE(!mhs.Empty());\r\n\t\tREQUIRE(2 == mhs.MarkValue());\r\n\t\tREQUIRE(mhs.Contains(100));\r\n\r\n\t\t// Insert 2 with handle 200\r\n\t\tREQUIRE(mhs.InsertHandle(200,2));\r\n\t\tREQUIRE(!mhs.Empty());\r\n\t\tREQUIRE(mhs.Contains(100));\r\n\t\tREQUIRE(mhs.Contains(200));\r\n\t\tREQUIRE(6 == mhs.MarkValue());\r\n\r\n\t\tconst MarkerHandleNumber *mhn0 = mhs.GetMarkerHandleNumber(0);\r\n\t\tREQUIRE(200 == mhn0->handle);\r\n\t\tREQUIRE(2 == mhn0->number);\r\n\t\tconst MarkerHandleNumber *mhn1 = mhs.GetMarkerHandleNumber(1);\r\n\t\tREQUIRE(100 == mhn1->handle);\r\n\t\tREQUIRE(1 == mhn1->number);\r\n\t\tconst MarkerHandleNumber *mhn2 = mhs.GetMarkerHandleNumber(2);\r\n\t\tREQUIRE(nullptr == mhn2);\r\n\r\n\t\t// Remove first insertion\r\n\t\tmhs.RemoveHandle(100);\r\n\t\tREQUIRE(!mhs.Empty());\r\n\t\tREQUIRE(mhs.Contains(200));\r\n\t\tREQUIRE(4 == mhs.MarkValue());\r\n\r\n\t\t// Remove remaining element\r\n\t\tREQUIRE(mhs.RemoveNumber(2, true));\r\n\t\tREQUIRE(mhs.Empty());\r\n\t\tREQUIRE(!mhs.Contains(200));\r\n\t\tREQUIRE(0 == mhs.MarkValue());\r\n\t}\r\n\r\n\tSECTION(\"Combine\") {\r\n\t\tmhs.InsertHandle(100, 1);\r\n\t\tMarkerHandleSet mhsOther;\r\n\t\tmhsOther.InsertHandle(200, 2);\r\n\t\tmhs.CombineWith(&mhsOther);\r\n\t\tREQUIRE(mhsOther.Empty());\r\n\t\tmhs.RemoveHandle(100);\r\n\t\tmhs.RemoveHandle(200);\r\n\t\tREQUIRE(mhs.Empty());\r\n\t}\r\n}\r\n\r\nTEST_CASE(\"LineMarkers\") {\r\n\r\n\tLineMarkers lm;\r\n\r\n\tSECTION(\"Initial\") {\r\n\t\t// Initial State\r\n\t\tREQUIRE(0 == lm.MarkValue(0));\r\n\t}\r\n\r\n\tSECTION(\"AddDelete\") {\r\n\t\t// Test knows the way handles are allocated, starting from 1\r\n\t\tlm.InsertLines(0, 5);\r\n\t\tconst int handle1 = lm.AddMark(0, 1, 5);\r\n\t\tREQUIRE(1 == handle1);\r\n\t\tREQUIRE(2 == lm.MarkValue(0));\r\n\t\tREQUIRE(1 == lm.HandleFromLine(0, 0));\r\n\t\tREQUIRE(1 == lm.NumberFromLine(0, 0));\r\n\t\tREQUIRE(-1 == lm.HandleFromLine(0, 1));\r\n\t\tREQUIRE(-1 == lm.NumberFromLine(0, 1));\r\n\t\tREQUIRE(0 == lm.LineFromHandle(handle1));\r\n\r\n\t\tREQUIRE(lm.DeleteMark(0, 1, true));\r\n\t\tREQUIRE(0 == lm.MarkValue(0));\r\n\r\n\t\tconst int handle2 = lm.AddMark(0, 2, 5);\r\n\t\tREQUIRE(2 == handle2);\r\n\t\tREQUIRE(4 == lm.MarkValue(0));\r\n\t\tlm.DeleteMarkFromHandle(handle2);\r\n\t\tREQUIRE(0 == lm.MarkValue(0));\r\n\t}\r\n\r\n\tSECTION(\"MarkerNext\") {\r\n\t\tlm.AddMark(1, 1, 5);\r\n\t\tlm.AddMark(2, 2, 5);\r\n\t\tconst Sci::Line line1 = lm.MarkerNext(0, 6);\r\n\t\tREQUIRE(1 == line1);\r\n\t\tconst Sci::Line line2 = lm.MarkerNext(line1+1, 6);\r\n\t\tREQUIRE(2 == line2);\r\n\t\tconst Sci::Line line3 = lm.MarkerNext(line2+1, 6);\r\n\t\tREQUIRE(-1 == line3);\r\n\t}\r\n\r\n\tSECTION(\"MergeMarkers\") {\r\n\t\tlm.AddMark(1, 1, 5);\r\n\t\tlm.AddMark(2, 2, 5);\r\n\t\tlm.MergeMarkers(1);\r\n\t\tREQUIRE(6 == lm.MarkValue(1));\r\n\t\tREQUIRE(0 == lm.MarkValue(2));\r\n\t}\r\n\r\n\tSECTION(\"InsertRemoveLine\") {\r\n\t\tconst int handle1 = lm.AddMark(1, 1, 5);\r\n\t\tconst int handle2 = lm.AddMark(2, 2, 5);\r\n\t\tlm.InsertLine(2);\r\n\t\tREQUIRE(0 == lm.MarkValue(0));\r\n\t\tREQUIRE(2 == lm.MarkValue(1));\r\n\t\tREQUIRE(0 == lm.MarkValue(2));\r\n\t\tREQUIRE(4 == lm.MarkValue(3));\r\n\t\tREQUIRE(0 == lm.MarkValue(4));\r\n\t\tlm.RemoveLine(2);\r\n\t\tREQUIRE(0 == lm.MarkValue(0));\r\n\t\tREQUIRE(2 == lm.MarkValue(1));\r\n\t\tREQUIRE(4 == lm.MarkValue(2));\r\n\t\tREQUIRE(0 == lm.MarkValue(3));\r\n\t\tlm.InsertLines(2, 2);\r\n\t\tREQUIRE(0 == lm.MarkValue(0));\r\n\t\tREQUIRE(2 == lm.MarkValue(1));\r\n\t\tREQUIRE(0 == lm.MarkValue(2));\r\n\t\tREQUIRE(0 == lm.MarkValue(3));\r\n\t\tREQUIRE(4 == lm.MarkValue(4));\r\n\t\tREQUIRE(0 == lm.MarkValue(5));\r\n\t\tREQUIRE(1 == lm.LineFromHandle(handle1));\r\n\t\tREQUIRE(4 == lm.LineFromHandle(handle2));\r\n\t}\r\n}\r\n\r\nTEST_CASE(\"LineLevels\") {\r\n\r\n\tLineLevels ll;\r\n\r\n\tSECTION(\"Initial\") {\r\n\t\t// Initial State\r\n\t\tREQUIRE(FoldBase == ll.GetLevel(0));\r\n\t}\r\n\r\n\tSECTION(\"SetLevel\") {\r\n\t\tREQUIRE(FoldBase == ll.SetLevel(1, 200, 5));\r\n\t\tREQUIRE(FoldBase == ll.GetLevel(0));\r\n\t\tREQUIRE(200 == ll.GetLevel(1));\r\n\t\tREQUIRE(FoldBase == ll.GetLevel(2));\r\n\t\tll.ClearLevels();\r\n\t\tREQUIRE(FoldBase == ll.GetLevel(1));\r\n\t\tll.ExpandLevels(5);\r\n\t\tREQUIRE(FoldBase == ll.GetLevel(7));\r\n\t}\r\n\r\n\tSECTION(\"InsertRemoveLine\") {\r\n\t\tll.SetLevel(1, 1, 5);\r\n\t\tll.SetLevel(2, 2, 5);\r\n\t\tll.InsertLine(2);\r\n\t\tREQUIRE(FoldBase == ll.GetLevel(0));\r\n\t\tREQUIRE(1 == ll.GetLevel(1));\r\n\t\tREQUIRE(2 == ll.GetLevel(2));\r\n\t\tREQUIRE(2 == ll.GetLevel(3));\r\n\t\tREQUIRE(FoldBase == ll.GetLevel(4));\r\n\t\tll.RemoveLine(2);\r\n\t\tREQUIRE(FoldBase == ll.GetLevel(0));\r\n\t\tREQUIRE(1 == ll.GetLevel(1));\r\n\t\tREQUIRE(2 == ll.GetLevel(2));\r\n\t\tREQUIRE(FoldBase == ll.GetLevel(3));\r\n\t\tll.InsertLines(2, 2);\r\n\t\tREQUIRE(FoldBase == ll.GetLevel(0));\r\n\t\tREQUIRE(1 == ll.GetLevel(1));\r\n\t\tREQUIRE(2 == ll.GetLevel(2));\r\n\t\tREQUIRE(2 == ll.GetLevel(3));\r\n\t\tREQUIRE(2 == ll.GetLevel(4));\r\n\t\tREQUIRE(FoldBase == ll.GetLevel(5));\r\n\t}\r\n}\r\n\r\nTEST_CASE(\"LineState\") {\r\n\r\n\tLineState ls;\r\n\r\n\tSECTION(\"Initial\") {\r\n\t\t// Initial State\r\n\t\tREQUIRE(0 == ls.GetMaxLineState());\r\n\t\tREQUIRE(0 == ls.GetLineState(0));\r\n\t\tREQUIRE(1 == ls.GetMaxLineState());\r\n\t\tls.Init();\r\n\t\tREQUIRE(0 == ls.GetMaxLineState());\r\n\t\tREQUIRE(0 == ls.GetLineState(0));\r\n\t}\r\n\r\n\tSECTION(\"SetLineState\") {\r\n\t\tREQUIRE(0 == ls.SetLineState(1, 200, 2));\r\n\t\tREQUIRE(0 == ls.GetLineState(0));\r\n\t\tREQUIRE(200 == ls.GetLineState(1));\r\n\t\tREQUIRE(0 == ls.GetLineState(2));\r\n\t\tREQUIRE(0 == ls.SetLineState(2, 400, 3));\r\n\t\tREQUIRE(0 == ls.GetLineState(0));\r\n\t\tREQUIRE(200 == ls.GetLineState(1));\r\n\t\tREQUIRE(400 == ls.GetLineState(2));\r\n\t\tREQUIRE(0 == ls.GetLineState(3));\r\n\t\t// GetLineState(3) expands to 4 lines\r\n\t\tREQUIRE(4 == ls.GetMaxLineState());\r\n\t\tls.Init();\r\n\t\tREQUIRE(0 == ls.GetLineState(0));\r\n\t\tREQUIRE(1 == ls.GetMaxLineState());\r\n\t}\r\n\r\n\tSECTION(\"InsertRemoveLine\") {\r\n\t\tREQUIRE(0 == ls.GetMaxLineState());\r\n\t\tls.SetLineState(1, 1, 3);\r\n\t\tls.SetLineState(2, 2, 3);\r\n\t\tREQUIRE(4 == ls.GetMaxLineState());\r\n\t\tls.InsertLine(2);\r\n\t\tREQUIRE(5 == ls.GetMaxLineState());\r\n\t\tREQUIRE(0 == ls.GetLineState(0));\r\n\t\tREQUIRE(1 == ls.GetLineState(1));\r\n\t\tREQUIRE(2 == ls.GetLineState(2));\r\n\t\tREQUIRE(2 == ls.GetLineState(3));\r\n\t\tREQUIRE(0 == ls.GetLineState(4));\r\n\t\tREQUIRE(5 == ls.GetMaxLineState());\r\n\t\tls.RemoveLine(2);\r\n\t\tREQUIRE(4 == ls.GetMaxLineState());\r\n\t\tREQUIRE(0 == ls.GetLineState(0));\r\n\t\tREQUIRE(1 == ls.GetLineState(1));\r\n\t\tREQUIRE(2 == ls.GetLineState(2));\r\n\t\tREQUIRE(0 == ls.GetLineState(3));\r\n\t\tls.InsertLines(2, 2);\r\n\t\tREQUIRE(6 == ls.GetMaxLineState());\r\n\t\tREQUIRE(0 == ls.GetLineState(0));\r\n\t\tREQUIRE(1 == ls.GetLineState(1));\r\n\t\tREQUIRE(2 == ls.GetLineState(2));\r\n\t\tREQUIRE(2 == ls.GetLineState(3));\r\n\t\tREQUIRE(2 == ls.GetLineState(4));\r\n\t\tREQUIRE(0 == ls.GetLineState(5));\r\n\t}\r\n}\r\n\r\nTEST_CASE(\"LineAnnotation\") {\r\n\r\n\tLineAnnotation la;\r\n\r\n\tSECTION(\"Initial\") {\r\n\t\t// Initial State\r\n\t\tREQUIRE(0 == la.Length(0));\r\n\t\tREQUIRE(0 == la.Lines(0));\r\n\t\tREQUIRE(0 == la.Style(0));\r\n\t\tREQUIRE(false == la.MultipleStyles(0));\r\n\t}\r\n\r\n\tSECTION(\"SetText\") {\r\n\t\tla.SetText(0, \"Text\");\r\n\t\tREQUIRE(4 == la.Length(0));\r\n\t\tREQUIRE(1 == la.Lines(0));\r\n\t\tREQUIRE(memcmp(la.Text(0), \"Text\", 4) == 0);\r\n\t\tREQUIRE(nullptr == la.Styles(0));\r\n\t\tREQUIRE(0 == la.Style(0));\r\n\t\tla.SetStyle(0, 9);\r\n\t\tREQUIRE(9 == la.Style(0));\r\n\r\n\t\tla.SetText(0, \"Ant\\nBird\\nCat\");\r\n\t\tREQUIRE(3 == la.Lines(0));\r\n\r\n\t\tla.ClearAll();\r\n\t\tREQUIRE(nullptr == la.Text(0));\r\n\t}\r\n\r\n\tSECTION(\"SetStyles\") {\r\n\t\tla.SetText(0, \"Text\");\r\n\t\tconst unsigned char styles[] { 1,2,3,4 };\r\n\t\tla.SetStyles(0, styles);\r\n\t\tREQUIRE(memcmp(la.Text(0), \"Text\", 4) == 0);\r\n\t\tREQUIRE(memcmp(la.Styles(0), styles, 4) == 0);\r\n\t\tREQUIRE(la.MultipleStyles(0));\r\n\t}\r\n\r\n\tSECTION(\"InsertRemoveLine\") {\r\n\t\tla.SetText(0, \"Ant\");\r\n\t\tla.SetText(1, \"Bird\");\r\n\t\tREQUIRE(3 == la.Length(0));\r\n\t\tREQUIRE(4 == la.Length(1));\r\n\t\tREQUIRE(1 == la.Lines(0));\r\n\t\tla.InsertLine(1);\r\n\t\tREQUIRE(3 == la.Length(0));\r\n\t\tREQUIRE(0 == la.Length(1));\r\n\t\tREQUIRE(4 == la.Length(2));\r\n\t\tla.RemoveLine(2);\r\n\t\tREQUIRE(3 == la.Length(0));\r\n\t\tREQUIRE(4 == la.Length(1));\r\n\t\tla.InsertLines(1, 2);\r\n\t\tREQUIRE(3 == la.Length(0));\r\n\t\tREQUIRE(0 == la.Length(1));\r\n\t\tREQUIRE(0 == la.Length(2));\r\n\t\tREQUIRE(4 == la.Length(3));\r\n\t}\r\n}\r\n\r\nTEST_CASE(\"LineTabstops\") {\r\n\r\n\tLineTabstops lt;\r\n\r\n\tSECTION(\"Initial\") {\r\n\t\t// Initial State\r\n\t\tREQUIRE(0 == lt.GetNextTabstop(0, 0));\r\n\t}\r\n\r\n\tSECTION(\"AddClearTabstops\") {\r\n\t\tlt.AddTabstop(0, 100);\r\n\t\tREQUIRE(100 == lt.GetNextTabstop(0, 0));\r\n\t\tREQUIRE(0 == lt.GetNextTabstop(0, 100));\r\n\t\tlt.ClearTabstops(0);\r\n\t\tREQUIRE(0 == lt.GetNextTabstop(0, 0));\r\n\t}\r\n\r\n\tSECTION(\"InsertRemoveLine\") {\r\n\t\tlt.AddTabstop(0, 100);\r\n\t\tlt.AddTabstop(1, 200);\r\n\t\tlt.InsertLine(1);\r\n\t\tREQUIRE(100 == lt.GetNextTabstop(0, 0));\r\n\t\tREQUIRE(0 == lt.GetNextTabstop(1, 0));\r\n\t\tREQUIRE(200 == lt.GetNextTabstop(2, 0));\r\n\t\tlt.RemoveLine(1);\r\n\t\tREQUIRE(100 == lt.GetNextTabstop(0, 0));\r\n\t\tREQUIRE(200 == lt.GetNextTabstop(1, 0));\r\n\t\tlt.InsertLines(1, 2);\r\n\t\tREQUIRE(100 == lt.GetNextTabstop(0, 0));\r\n\t\tREQUIRE(0 == lt.GetNextTabstop(1, 0));\r\n\t\tREQUIRE(0 == lt.GetNextTabstop(2, 0));\r\n\t\tREQUIRE(200 == lt.GetNextTabstop(3, 0));\r\n\t\tlt.Init();\r\n\t\tREQUIRE(0 == lt.GetNextTabstop(0, 0));\r\n\t}\r\n}\r\n"
  },
  {
    "path": "scintilla/test/unit/testRESearch.cxx",
    "content": "/** @file testRESearch.cxx\r\n ** Unit Tests for Scintilla internal data structures\r\n **/\r\n\r\n#include <cstddef>\r\n#include <cstring>\r\n#include <stdexcept>\r\n#include <string>\r\n#include <string_view>\r\n#include <vector>\r\n#include <array>\r\n#include <optional>\r\n#include <algorithm>\r\n#include <memory>\r\n\r\n#include \"ScintillaTypes.h\"\r\n\r\n#include \"Debugging.h\"\r\n\r\n#include \"Position.h\"\r\n#include \"SplitVector.h\"\r\n#include \"Partitioning.h\"\r\n#include \"RunStyles.h\"\r\n#include \"CellBuffer.h\"\r\n#include \"CharClassify.h\"\r\n#include \"RESearch.h\"\r\n\r\n#include \"catch.hpp\"\r\n\r\nusing namespace Scintilla;\r\nusing namespace Scintilla::Internal;\r\n\r\nclass StringCI : public CharacterIndexer {\r\n\tstd::string s;\r\npublic:\r\n\texplicit StringCI(std::string_view sv_) : s(sv_) {\r\n\t}\r\n\tvirtual ~StringCI() = default;\r\n\t[[nodiscard]] Sci::Position Length() const noexcept {\r\n\t\treturn s.length();\r\n\t}\r\n\tchar CharAt(Sci::Position index) const override {\r\n\t\treturn s.at(index);\r\n\t}\r\n\tSci::Position MovePositionOutsideChar(Sci::Position pos, [[maybe_unused]] Sci::Position moveDir) const noexcept override {\r\n\t\treturn pos;\r\n\t}\r\n\t[[nodiscard]] std::string GetCharRange(Sci::Position position, Sci::Position lengthRetrieve) const {\r\n\t\treturn s.substr(position, lengthRetrieve);\r\n\t}\r\n};\r\n\r\n// Test RESearch.\r\n\r\nTEST_CASE(\"RESearch\") {\r\n\r\n\tCharClassify cc;\r\n\tconstexpr std::string_view sTextSpace = \"Scintilla \";\r\n\tconstexpr std::string_view pattern = \"[a-z]+\";\r\n\r\n\tSECTION(\"Compile\") {\r\n\t\tRESearch re(&cc);\r\n\t\tconst char *msg = re.Compile(pattern.data(), pattern.length(), true, false);\r\n\t\tREQUIRE(nullptr == msg);\r\n\t}\r\n\r\n\tSECTION(\"Bug2413\") {\r\n\t\t// Check for https://sourceforge.net/p/scintilla/bugs/2413/\r\n\t\tRESearch re(&cc);\r\n\t\tconstexpr std::string_view BOW = \"\\\\<\";\r\n\t\tconstexpr std::string_view EOW = \"\\\\>\";\r\n\t\tconst char *msg = re.Compile(BOW.data(), BOW.length(), true, false);\r\n\t\tREQUIRE(nullptr == msg);\r\n\t\tmsg = re.Compile(EOW.data(), EOW.length(), true, false);\r\n\t\tREQUIRE(nullptr == msg);\r\n\t}\r\n\r\n\tSECTION(\"Execute\") {\r\n\t\tRESearch re(&cc);\r\n\t\tre.Compile(pattern.data(), pattern.length(), true, false);\r\n\t\tconst StringCI sci(sTextSpace);\r\n\t\tconst int x = re.Execute(sci, 0, sci.Length());\r\n\t\tREQUIRE(x == 1);\r\n\t\tREQUIRE(re.bopat[0] == 1);\r\n\t\tREQUIRE(re.eopat[0] == sci.Length() - 1);\r\n\t}\r\n\r\n\tSECTION(\"Grab\") {\r\n\t\tRESearch re(&cc);\r\n\t\tre.Compile(pattern.data(), pattern.length(), true, false);\r\n\t\tconst StringCI sci(sTextSpace);\r\n\t\tre.Execute(sci, 0, sci.Length());\r\n\t\tconst std::string pat = sci.GetCharRange(re.bopat[0], re.eopat[0] - re.bopat[0]);\r\n\t\tREQUIRE(pat == \"cintilla\");\r\n\t}\r\n\r\n}\r\n"
  },
  {
    "path": "scintilla/test/unit/testRunStyles.cxx",
    "content": "/** @file testRunStyles.cxx\r\n ** Unit Tests for Scintilla internal data structures\r\n **/\r\n\r\n#include <cstddef>\r\n#include <cstring>\r\n\r\n#include <stdexcept>\r\n#include <string_view>\r\n#include <vector>\r\n#include <optional>\r\n#include <algorithm>\r\n#include <memory>\r\n\r\n#include \"Debugging.h\"\r\n\r\n#include \"Position.h\"\r\n#include \"SplitVector.h\"\r\n#include \"Partitioning.h\"\r\n#include \"RunStyles.h\"\r\n\r\n#include \"catch.hpp\"\r\n\r\nusing namespace Scintilla::Internal;\r\n\r\n// Test RunStyles.\r\n\r\nusing UniqueInt = std::unique_ptr<int>;\r\n\r\nTEST_CASE(\"CompileCopying RunStyles\") {\r\n\r\n\t// These are compile-time tests to check that basic copy and move\r\n\t// operations are defined correctly.\r\n\r\n\tSECTION(\"CopyingMoving\") {\r\n\t\tRunStyles<int, int> s;\r\n\t\tRunStyles<int, int> s2;\r\n\r\n\t\t// Copy constructor\r\n\t\tconst RunStyles<int, int> sa(s);\r\n\t\t// Copy assignment fails\r\n\t\tRunStyles<int, int> sb;\r\n\t\tsb = s;\r\n\r\n\t\t// Move constructor\r\n\t\tconst RunStyles<int, int> sc(std::move(s));\r\n\t\t// Move assignment\r\n\t\tRunStyles<int, int> sd;\r\n\t\tsd = (std::move(s2));\r\n\t}\r\n\r\n#if defined(SHOW_COPY_BUILD_FAILURES)\r\n\t// It should be reasonable to instantiate RunStyles where STYLE is move-only but fails\r\n\tSECTION(\"MoveOnly\") {\r\n\t\tRunStyles<int, UniqueInt> s;\r\n\r\n\t\t// Copy is not defined for std::unique_ptr\r\n\t\t// Copy constructor fails\r\n\t\tRunStyles<int, UniqueInt> sa(s);\r\n\t\t// Copy assignment fails\r\n\t\tRunStyles<int, UniqueInt> sb;\r\n\t\tsb = s;\r\n\r\n\t\t// Move constructor fails\r\n\t\tRunStyles<int, UniqueInt> sc(std::move(s));\r\n\t\t// Move assignment fails\r\n\t\tRunStyles<int, UniqueInt> sd;\r\n\t\tsd = (std::move(s));\r\n\t}\r\n#endif\r\n\r\n}\r\n\r\nnamespace Scintilla::Internal {\t// Xcode clang 9.0 doesn't like this when in the unnamed namespace\r\n\tbool operator==(const FillResult<int> &fra, const FillResult<int> &frb) noexcept {\r\n\t\treturn fra.changed == frb.changed &&\r\n\t\t\tfra.position == frb.position &&\r\n\t\t\tfra.fillLength == frb.fillLength;\r\n\t}\r\n}\r\n\r\nTEST_CASE(\"RunStyles\") {\r\n\r\n\tRunStyles<int, int> rs;\r\n\r\n\tSECTION(\"IsEmptyInitially\") {\r\n\t\tREQUIRE(0 == rs.Length());\r\n\t\tREQUIRE(1 == rs.Runs());\r\n\t}\r\n\r\n\tSECTION(\"SimpleInsert\") {\r\n\t\trs.InsertSpace(0, 1);\r\n\t\tREQUIRE(1 == rs.Length());\r\n\t\tREQUIRE(1 == rs.Runs());\r\n\t\tREQUIRE(0 == rs.ValueAt(0));\r\n\t\tREQUIRE(1 == rs.FindNextChange(0, rs.Length()));\r\n\t\tREQUIRE(2 == rs.FindNextChange(1, rs.Length()));\r\n\t}\r\n\r\n\tSECTION(\"TwoRuns\") {\r\n\t\trs.InsertSpace(0, 2);\r\n\t\tREQUIRE(2 == rs.Length());\r\n\t\tREQUIRE(1 == rs.Runs());\r\n\t\trs.SetValueAt(0, 2);\r\n\t\tREQUIRE(2 == rs.Runs());\r\n\t\tREQUIRE(2 == rs.ValueAt(0));\r\n\t\tREQUIRE(0 == rs.ValueAt(1));\r\n\t\tREQUIRE(1 == rs.FindNextChange(0, rs.Length()));\r\n\t\tREQUIRE(2 == rs.FindNextChange(1, rs.Length()));\r\n\t\tREQUIRE(3 == rs.FindNextChange(2, rs.Length()));\r\n\t}\r\n\r\n\tSECTION(\"LongerRuns\") {\r\n\t\trs.InsertSpace(0, 5);\r\n\t\trs.SetValueAt(0, 3);\r\n\t\trs.SetValueAt(1, 3);\r\n\t\tREQUIRE(3 == rs.ValueAt(0));\r\n\t\tREQUIRE(3 == rs.ValueAt(1));\r\n\t\tREQUIRE(0 == rs.ValueAt(2));\r\n\t\tREQUIRE(2 == rs.Runs());\r\n\r\n\t\tREQUIRE(0 == rs.StartRun(0));\r\n\t\tREQUIRE(2 == rs.EndRun(0));\r\n\r\n\t\tREQUIRE(0 == rs.StartRun(1));\r\n\t\tREQUIRE(2 == rs.EndRun(1));\r\n\r\n\t\tREQUIRE(2 == rs.StartRun(2));\r\n\t\tREQUIRE(5 == rs.EndRun(2));\r\n\r\n\t\tREQUIRE(2 == rs.StartRun(3));\r\n\t\tREQUIRE(5 == rs.EndRun(3));\r\n\r\n\t\tREQUIRE(2 == rs.StartRun(4));\r\n\t\tREQUIRE(5 == rs.EndRun(4));\r\n\r\n\t\t// At end\r\n\t\tREQUIRE(2 == rs.StartRun(5));\r\n\t\tREQUIRE(5 == rs.EndRun(5));\r\n\r\n\t\t// After end is same as end\r\n\t\tREQUIRE(2 == rs.StartRun(6));\r\n\t\tREQUIRE(5 == rs.EndRun(6));\r\n\r\n\t\tREQUIRE(2 == rs.FindNextChange(0, rs.Length()));\r\n\t\tREQUIRE(5 == rs.FindNextChange(2, rs.Length()));\r\n\t\tREQUIRE(6 == rs.FindNextChange(5, rs.Length()));\r\n\t}\r\n\r\n\tSECTION(\"FillRange\") {\r\n\t\trs.InsertSpace(0, 5);\r\n\t\tconst int startFill = 1;\r\n\t\tconst int lengthFill = 3;\r\n\t\tconst auto fr = rs.FillRange(startFill, 99, lengthFill);\r\n\t\tREQUIRE(FillResult<int>{true, 1, 3} == fr);\r\n\r\n\t\tREQUIRE(0 == rs.ValueAt(0));\r\n\t\tREQUIRE(99 == rs.ValueAt(1));\r\n\t\tREQUIRE(99 == rs.ValueAt(2));\r\n\t\tREQUIRE(99 == rs.ValueAt(3));\r\n\t\tREQUIRE(0 == rs.ValueAt(4));\r\n\r\n\t\tREQUIRE(0 == rs.StartRun(0));\r\n\t\tREQUIRE(1 == rs.EndRun(0));\r\n\r\n\t\tREQUIRE(1 == rs.StartRun(1));\r\n\t\tREQUIRE(4 == rs.EndRun(1));\r\n\t}\r\n\r\n\tSECTION(\"FillRangeAlreadyFilled\") {\r\n\t\trs.InsertSpace(0, 5);\r\n\t\tconst int startFill = 1;\r\n\t\tconst int lengthFill = 3;\r\n\t\tconst auto fr = rs.FillRange(startFill, 99, lengthFill);\r\n\t\tREQUIRE(FillResult<int>{true, 1, 3} == fr);\r\n\r\n\t\tconst int startFill2 = 2;\r\n\t\tconst int lengthFill2 = 1;\r\n\t\t// Compiler warnings if 'false' used instead of '0' as expected value:\r\n\t\tconst auto fr2 = rs.FillRange(startFill2, 99, lengthFill2);\r\n\t\tREQUIRE(FillResult<int>{false, 2, 1} == fr2);\r\n\t\tREQUIRE(0 == rs.ValueAt(0));\r\n\t\tREQUIRE(99 == rs.ValueAt(1));\r\n\t\tREQUIRE(99 == rs.ValueAt(2));\r\n\t\tREQUIRE(99 == rs.ValueAt(3));\r\n\t\tREQUIRE(0 == rs.ValueAt(4));\r\n\t\tREQUIRE(3 == rs.Runs());\r\n\t}\r\n\r\n\tSECTION(\"FillRangeAlreadyPartFilled\") {\r\n\t\trs.InsertSpace(0, 5);\r\n\t\tconst int startFill = 1;\r\n\t\tconst int lengthFill = 2;\r\n\t\tconst auto fr = rs.FillRange(startFill, 99, lengthFill);\r\n\t\tREQUIRE(FillResult<int>{true, 1, 2} == fr);\r\n\r\n\t\tconst int startFill2 = 2;\r\n\t\tconst int lengthFill2 = 2;\r\n\t\tconst auto fr2 = rs.FillRange(startFill2, 99, lengthFill2);\r\n\t\tREQUIRE(FillResult<int>{true, 3, 1} == fr2);\r\n\t\tREQUIRE(3 == rs.Runs());\r\n\t}\r\n\r\n\tSECTION(\"DeleteRange\") {\r\n\t\trs.InsertSpace(0, 5);\r\n\t\trs.SetValueAt(0, 3);\r\n\t\tREQUIRE(2 == rs.Runs());\r\n\t\trs.SetValueAt(1, 3);\r\n\t\tREQUIRE(2 == rs.Runs());\r\n\t\trs.DeleteRange(1, 1);\r\n\t\tREQUIRE(4 == rs.Length());\r\n\t\tREQUIRE(2 == rs.Runs());\r\n\t\tREQUIRE(3 == rs.ValueAt(0));\r\n\t\tREQUIRE(0 == rs.ValueAt(1));\r\n\r\n\t\tREQUIRE(0 == rs.StartRun(0));\r\n\t\tREQUIRE(1 == rs.EndRun(0));\r\n\r\n\t\tREQUIRE(1 == rs.StartRun(1));\r\n\t\tREQUIRE(4 == rs.EndRun(1));\r\n\r\n\t\tREQUIRE(1 == rs.StartRun(2));\r\n\t\tREQUIRE(4 == rs.EndRun(2));\r\n\t}\r\n\r\n\tSECTION(\"Find\") {\r\n\t\trs.InsertSpace(0, 5);\r\n\t\tconst int startFill = 1;\r\n\t\tconst int lengthFill = 3;\r\n\t\tconst auto fr = rs.FillRange(startFill, 99, lengthFill);\r\n\t\tREQUIRE(FillResult<int>{true, 1, 3} == fr);\r\n\r\n\t\tREQUIRE(0 == rs.Find(0,0));\r\n\t\tREQUIRE(1 == rs.Find(99,0));\r\n\t\tREQUIRE(-1 == rs.Find(3,0));\r\n\r\n\t\tREQUIRE(4 == rs.Find(0,1));\r\n\t\tREQUIRE(1 == rs.Find(99,1));\r\n\t\tREQUIRE(-1 == rs.Find(3,1));\r\n\r\n\t\tREQUIRE(4 == rs.Find(0,2));\r\n\t\tREQUIRE(2 == rs.Find(99,2));\r\n\t\tREQUIRE(-1 == rs.Find(3, 2));\r\n\r\n\t\tREQUIRE(4 == rs.Find(0,4));\r\n\t\tREQUIRE(-1 == rs.Find(99,4));\r\n\t\tREQUIRE(-1 == rs.Find(3,4));\r\n\r\n\t\tREQUIRE(-1 == rs.Find(0,5));\r\n\t\tREQUIRE(-1 == rs.Find(99,5));\r\n\t\tREQUIRE(-1 == rs.Find(3,5));\r\n\r\n\t\tREQUIRE(-1 == rs.Find(0,6));\r\n\t\tREQUIRE(-1 == rs.Find(99,6));\r\n\t\tREQUIRE(-1 == rs.Find(3,6));\r\n\t}\r\n\r\n\tSECTION(\"AllSame\") {\r\n\t\tREQUIRE(true == rs.AllSame());\r\n\t\trs.InsertSpace(0, 5);\r\n\t\tREQUIRE(true == rs.AllSame());\r\n\t\tREQUIRE(false == rs.AllSameAs(88));\r\n\t\tREQUIRE(true == rs.AllSameAs(0));\r\n\t\tconst int startFill = 1;\r\n\t\tconst int lengthFill = 3;\r\n\t\tconst auto fr = rs.FillRange(startFill, 99, lengthFill);\r\n\t\tREQUIRE(true == fr.changed);\r\n\t\tREQUIRE(false == rs.AllSame());\r\n\t\tREQUIRE(false == rs.AllSameAs(88));\r\n\t\tREQUIRE(false == rs.AllSameAs(0));\r\n\t\tconst auto fr2 = rs.FillRange(startFill, 0, lengthFill);\r\n\t\tREQUIRE(true == fr2.changed);\r\n\t\tREQUIRE(true == rs.AllSame());\r\n\t\tREQUIRE(false == rs.AllSameAs(88));\r\n\t\tREQUIRE(true == rs.AllSameAs(0));\r\n\t}\r\n\r\n\tSECTION(\"FindWithReversion\") {\r\n\t\trs.InsertSpace(0, 5);\r\n\t\tREQUIRE(1 == rs.Runs());\r\n\r\n\t\tint startFill = 1;\r\n\t\tint lengthFill = 1;\r\n\t\tconst auto fr = rs.FillRange(startFill, 99, lengthFill);\r\n\t\tREQUIRE(FillResult<int>{true, 1, 1} == fr);\r\n\t\tREQUIRE(3 == rs.Runs());\r\n\r\n\t\tstartFill = 2;\r\n\t\tlengthFill = 1;\r\n\t\tconst auto fr2 = rs.FillRange(startFill, 99, lengthFill);\r\n\t\tREQUIRE(FillResult<int>{true, 2, 1} == fr2);\r\n\t\tREQUIRE(3 == rs.Runs());\r\n\r\n\t\tstartFill = 1;\r\n\t\tlengthFill = 1;\r\n\t\tconst auto fr3 = rs.FillRange(startFill, 0, lengthFill);\r\n\t\tREQUIRE(FillResult<int>{true, 1, 1} == fr3);\r\n\t\tREQUIRE(3 == rs.Runs());\r\n\r\n\t\tstartFill = 2;\r\n\t\tlengthFill = 1;\r\n\t\tconst auto fr4 = rs.FillRange(startFill, 0, lengthFill);\r\n\t\tREQUIRE(FillResult<int>{true, 2, 1} == fr4);\r\n\t\tREQUIRE(1 == rs.Runs());\r\n\r\n\t\tREQUIRE(-1 == rs.Find(0,6));\r\n\t}\r\n\r\n\tSECTION(\"FinalRunInversion\") {\r\n\t\tREQUIRE(1 == rs.Runs());\r\n\t\trs.InsertSpace(0, 1);\r\n\t\tREQUIRE(1 == rs.Runs());\r\n\t\trs.SetValueAt(0, 1);\r\n\t\tREQUIRE(1 == rs.Runs());\r\n\t\trs.InsertSpace(1, 1);\r\n\t\tREQUIRE(1 == rs.Runs());\r\n\t\trs.SetValueAt(1, 1);\r\n\t\tREQUIRE(1 == rs.Runs());\r\n\t\trs.SetValueAt(1, 0);\r\n\t\tREQUIRE(2 == rs.Runs());\r\n\t\trs.SetValueAt(1, 1);\r\n\t\tREQUIRE(1 == rs.Runs());\r\n\t}\r\n\r\n\tSECTION(\"DeleteAll\") {\r\n\t\trs.InsertSpace(0, 5);\r\n\t\trs.SetValueAt(0, 3);\r\n\t\trs.SetValueAt(1, 3);\r\n\t\trs.DeleteAll();\r\n\t\tREQUIRE(0 == rs.Length());\r\n\t\tREQUIRE(0 == rs.ValueAt(0));\r\n\t\tREQUIRE(1 == rs.Runs());\r\n\t}\r\n\r\n\tSECTION(\"DeleteSecond\") {\r\n\t\trs.InsertSpace(0, 3);\r\n\t\tconst int startFill = 1;\r\n\t\tconst int lengthFill = 1;\r\n\t\tconst auto fr = rs.FillRange(startFill, 99, lengthFill);\r\n\t\tREQUIRE(true == fr.changed);\r\n\t\tREQUIRE(3 == rs.Length());\r\n\t\tREQUIRE(3 == rs.Runs());\r\n\t\trs.DeleteRange(1, 1);\r\n\t\tREQUIRE(2 == rs.Length());\r\n\t\tREQUIRE(1 == rs.Runs());\r\n\t}\r\n\r\n\tSECTION(\"DeleteEndRun\") {\r\n\t\trs.InsertSpace(0, 2);\r\n\t\tconst int startFill = 1;\r\n\t\tconst int lengthFill = 1;\r\n\t\tconst auto fr = rs.FillRange(startFill, 99, lengthFill);\r\n\t\tREQUIRE(true == fr.changed);\r\n\t\tREQUIRE(2 == rs.Length());\r\n\t\tREQUIRE(2 == rs.Runs());\r\n\t\tREQUIRE(0 == rs.StartRun(0));\r\n\t\tREQUIRE(1 == rs.EndRun(0));\r\n\t\tREQUIRE(1 == rs.StartRun(1));\r\n\t\tREQUIRE(2 == rs.EndRun(1));\r\n\t\trs.DeleteRange(1, 1);\r\n\t\tREQUIRE(1 == rs.Length());\r\n\t\tREQUIRE(1 == rs.Runs());\r\n\t\tREQUIRE(0 == rs.StartRun(0));\r\n\t\tREQUIRE(1 == rs.EndRun(0));\r\n\t\tREQUIRE(0 == rs.StartRun(1));\r\n\t\tREQUIRE(1 == rs.EndRun(1));\r\n\t\trs.Check();\r\n\t}\r\n\r\n\tSECTION(\"OutsideBounds\") {\r\n\t\trs.InsertSpace(0, 1);\r\n\t\tconst int startFill = 1;\r\n\t\tconst int lengthFill = 1;\r\n\t\trs.FillRange(startFill, 99, lengthFill);\r\n\t\tREQUIRE(1 == rs.Length());\r\n\t\tREQUIRE(1 == rs.Runs());\r\n\t\tREQUIRE(0 == rs.StartRun(0));\r\n\t\tREQUIRE(1 == rs.EndRun(0));\r\n\t}\r\n\r\n}\r\n"
  },
  {
    "path": "scintilla/test/unit/testSparseVector.cxx",
    "content": "/** @file testSparseVector.cxx\r\n ** Unit Tests for Scintilla internal data structures\r\n **/\r\n\r\n#include <cstddef>\r\n#include <cassert>\r\n#include <cstring>\r\n\r\n#include <stdexcept>\r\n#include <string_view>\r\n#include <vector>\r\n#include <optional>\r\n#include <algorithm>\r\n#include <memory>\r\n\r\n#include \"Debugging.h\"\r\n\r\n#include \"Position.h\"\r\n#include \"UniqueString.h\"\r\n#include \"SplitVector.h\"\r\n#include \"Partitioning.h\"\r\n#include \"SparseVector.h\"\r\n\r\n#include \"catch.hpp\"\r\n\r\nusing namespace Scintilla::Internal;\r\n\r\n// Test SparseVector.\r\n\r\nusing UniqueInt = std::unique_ptr<int>;\r\n\r\nTEST_CASE(\"CompileCopying SparseVector\") {\r\n\r\n\t// These are compile-time tests to check that basic copy and move\r\n\t// operations are defined correctly.\r\n\r\n\tSECTION(\"CopyingMoving\") {\r\n\t\tSparseVector<int> s;\r\n\t\tSparseVector<int> s2;\r\n\r\n\t\t// Copy constructor\r\n\t\tconst SparseVector<int> sa(s);\r\n\t\t// Copy assignment\r\n\t\tSparseVector<int> sb;\r\n\t\tsb = s;\r\n\r\n\t\t// Move constructor\r\n\t\tconst SparseVector<int> sc(std::move(s));\r\n\t\t// Move assignment\r\n\t\tSparseVector<int> sd;\r\n\t\tsd = (std::move(s2));\r\n\t}\r\n\r\n\tSECTION(\"MoveOnly\") {\r\n\t\tSparseVector<UniqueInt> s;\r\n\r\n#if defined(SHOW_COPY_BUILD_FAILURES)\r\n\t\t// Copy is not defined for std::unique_ptr\r\n\t\t// Copy constructor fails\r\n\t\tSparseVector<UniqueInt> sa(s);\r\n\t\t// Copy assignment fails\r\n\t\tSparseVector<UniqueInt> sb;\r\n\t\tsb = s;\r\n#endif\r\n\r\n\t\t// Move constructor\r\n\t\tconst SparseVector<UniqueInt> sc(std::move(s));\r\n\t\t// Move assignment\r\n\t\tSparseVector<UniqueInt> s2;\r\n\t\tSparseVector<UniqueInt> sd;\r\n\t\tsd = (std::move(s2));\r\n\t}\r\n\r\n}\r\n\r\nnamespace {\r\n\r\n// Helper to produce a string representation of a SparseVector<const char *>\r\n// to simplify checks.\r\nstd::string Representation(const SparseVector<UniqueString> &st) {\r\n\tstd::string ret;\r\n\tfor (int i = 0;i <= st.Length();i++) {\r\n\t\tconst char *value = st.ValueAt(i).get();\r\n\t\tif (value && *value)\r\n\t\t\tret += value;\r\n\t\telse\r\n\t\t\tret += \"-\";\r\n\t}\r\n\treturn ret;\r\n}\r\n\r\n}\r\n\r\nTEST_CASE(\"SparseVector\") {\r\n\r\n\tSparseVector<UniqueString> st;\r\n\r\n\tSECTION(\"IsEmptyInitially\") {\r\n\t\tREQUIRE(1 == st.Elements());\r\n\t\tREQUIRE(0 == st.Length());\r\n\t\tREQUIRE(\"-\" == Representation(st));\r\n\t\tst.Check();\r\n\t}\r\n\r\n\tSECTION(\"InsertSpace\") {\r\n\t\tst.InsertSpace(0, 5);\r\n\t\tREQUIRE(1 == st.Elements());\r\n\t\tREQUIRE(static_cast<const char *>(nullptr) == st.ValueAt(0).get());\r\n\t\tREQUIRE(static_cast<const char *>(nullptr) == st.ValueAt(1).get());\r\n\t\tREQUIRE(static_cast<const char *>(nullptr) == st.ValueAt(4).get());\r\n\t\tst.Check();\r\n\t}\r\n\r\n\tSECTION(\"InsertValue\") {\r\n\t\tst.InsertSpace(0, 5);\r\n\t\tst.SetValueAt(3, UniqueStringCopy(\"3\"));\r\n\t\tREQUIRE(2 == st.Elements());\r\n\t\tREQUIRE(\"---3--\" == Representation(st));\r\n\t\tst.Check();\r\n\t}\r\n\r\n\tSECTION(\"InsertAndChangeAndDeleteValue\") {\r\n\t\tst.InsertSpace(0, 5);\r\n\t\tREQUIRE(5 == st.Length());\r\n\t\tst.SetValueAt(3, UniqueStringCopy(\"3\"));\r\n\t\tREQUIRE(2 == st.Elements());\r\n\t\tst.SetValueAt(3, UniqueStringCopy(\"4\"));\r\n\t\tREQUIRE(2 == st.Elements());\r\n\t\tst.DeletePosition(3);\r\n\t\tREQUIRE(1 == st.Elements());\r\n\t\tREQUIRE(4 == st.Length());\r\n\t\tREQUIRE(\"-----\" == Representation(st));\r\n\t\tst.Check();\r\n\t}\r\n\r\n\tSECTION(\"InsertAndDeleteAtStart\") {\r\n\t\tREQUIRE(1 == st.Elements());\r\n\t\tst.InsertSpace(0, 5);\r\n\t\tst.SetValueAt(0, UniqueStringCopy(\"3\"));\r\n\t\tREQUIRE(1 == st.Elements());\r\n\t\tREQUIRE(\"3-----\" == Representation(st));\r\n\t\tst.DeletePosition(0);\r\n\t\tREQUIRE(1 == st.Elements());\r\n\t\tREQUIRE(\"-----\" == Representation(st));\r\n\t\tst.SetValueAt(0, UniqueStringCopy(\"4\"));\r\n\t\tREQUIRE(1 == st.Elements());\r\n\t\tREQUIRE(\"4----\" == Representation(st));\r\n\t\tst.DeletePosition(0);\r\n\t\tREQUIRE(1 == st.Elements());\r\n\t\tREQUIRE(\"----\" == Representation(st));\r\n\t\tst.SetValueAt(0, UniqueStringCopy(\"4\"));\r\n\t\tREQUIRE(1 == st.Elements());\r\n\t\tREQUIRE(\"4---\" == Representation(st));\r\n\t\tst.DeletePosition(0);\r\n\t\tREQUIRE(1 == st.Elements());\r\n\t\tREQUIRE(\"---\" == Representation(st));\r\n\t\tst.Check();\r\n\t}\r\n\r\n\tSECTION(\"InsertStringAtStartThenInsertSpaceAtStart\") {\r\n\t\tREQUIRE(1 == st.Elements());\r\n\t\tst.InsertSpace(0, 5);\r\n\t\tst.SetValueAt(0, UniqueStringCopy(\"3\"));\r\n\t\tREQUIRE(1 == st.Elements());\r\n\t\tREQUIRE(\"3-----\" == Representation(st));\r\n\t\tst.InsertSpace(0, 1);\r\n\t\tREQUIRE(2 == st.Elements());\r\n\t\tREQUIRE(\"-3-----\" == Representation(st));\r\n\t\tst.Check();\r\n\t}\r\n\r\n\tSECTION(\"InsertSpaceAfterStart\") {\r\n\t\tREQUIRE(1 == st.Elements());\r\n\t\tst.InsertSpace(0, 5);\r\n\t\tst.SetValueAt(1, UniqueStringCopy(\"1\"));\r\n\t\tREQUIRE(2 == st.Elements());\r\n\t\tREQUIRE(\"-1----\" == Representation(st));\r\n\t\tst.InsertSpace(1, 1);\r\n\t\tREQUIRE(2 == st.Elements());\r\n\t\tREQUIRE(\"--1----\" == Representation(st));\r\n\t\tst.Check();\r\n\t}\r\n\r\n\tSECTION(\"InsertStringAt1ThenInsertLettersAt1\") {\r\n\t\tREQUIRE(1 == st.Elements());\r\n\t\tst.InsertSpace(0, 5);\r\n\t\tst.SetValueAt(1, UniqueStringCopy(\"9\"));\r\n\t\tREQUIRE(2 == st.Elements());\r\n\t\tREQUIRE(\"-9----\" == Representation(st));\r\n\t\tst.InsertSpace(0, 1);\r\n\t\tREQUIRE(2 == st.Elements());\r\n\t\tREQUIRE(\"--9----\" == Representation(st));\r\n\t\t// Initial st has allocation of 9 values so this should cause reallocation\r\n\t\tconst std::string letters(\"ABCDEFGHIJKLMNOP\");\t// 16 letters\r\n\t\tfor (const char letter : letters) {\r\n\t\t\tconst char sLetter[] = { letter, 0 };\r\n\t\t\tst.InsertSpace(0, 1);\r\n\t\t\tst.SetValueAt(1, UniqueStringCopy(sLetter));\r\n\t\t}\r\n\t\tREQUIRE(\"-PONMLKJIHGFEDCBA-9----\" == Representation(st));\r\n\t\tst.Check();\r\n\t}\r\n\r\n\tSECTION(\"InsertAndDeleteAtEnd\") {\r\n\t\tREQUIRE(1 == st.Elements());\r\n\t\tst.InsertSpace(0, 5);\r\n\t\tst.SetValueAt(4, UniqueStringCopy(\"5\"));\r\n\t\tREQUIRE(2 == st.Elements());\r\n\t\tREQUIRE(\"----5-\" == Representation(st));\r\n\t\tst.SetValueAt(5, UniqueStringCopy(\"6\"));\r\n\t\tREQUIRE(2 == st.Elements());\r\n\t\tREQUIRE(\"----56\" == Representation(st));\r\n\t\tst.DeletePosition(4);\r\n\t\tREQUIRE(1 == st.Elements());\r\n\t\tREQUIRE(\"----6\" == Representation(st));\r\n\t\tst.SetValueAt(4, UniqueStringCopy(\"7\"));\r\n\t\tREQUIRE(1 == st.Elements());\r\n\t\tREQUIRE(\"----7\" == Representation(st));\r\n\t\tst.Check();\r\n\t}\r\n\r\n\tSECTION(\"SetNULL\") {\r\n\t\tREQUIRE(1 == st.Elements());\r\n\t\tst.InsertSpace(0, 5);\r\n\t\tst.SetValueAt(4, UniqueStringCopy(\"5\"));\r\n\t\tREQUIRE(2 == st.Elements());\r\n\t\tREQUIRE(\"----5-\" == Representation(st));\r\n\t\tst.SetValueAt(4, nullptr);\r\n\t\tREQUIRE(1 == st.Elements());\r\n\t\tREQUIRE(\"------\" == Representation(st));\r\n\t\tst.Check();\r\n\t\tst.SetValueAt(5, nullptr);\r\n\t\tREQUIRE(1 == st.Elements());\r\n\t\tREQUIRE(\"------\" == Representation(st));\r\n\t\tst.Check();\r\n\t}\r\n\r\n\tSECTION(\"CheckDeletionLeavesOrdered\") {\r\n\t\tREQUIRE(1 == st.Elements());\r\n\t\tst.InsertSpace(0, 1);\r\n\t\tst.SetValueAt(0, UniqueStringCopy(\"1\"));\r\n\t\tREQUIRE(\"1-\" == Representation(st));\r\n\t\tREQUIRE(1 == st.Elements());\r\n\t\tst.InsertSpace(1, 1);\r\n\t\tst.SetValueAt(1, UniqueStringCopy(\"2\"));\r\n\t\tREQUIRE(\"12-\" == Representation(st));\r\n\t\tst.DeletePosition(0);\r\n\t\tREQUIRE(\"2-\" == Representation(st));\r\n\t\tREQUIRE(1 == st.Elements());\r\n\t\tst.DeletePosition(0);\r\n\t\tREQUIRE(\"-\" == Representation(st));\r\n\t}\r\n\r\n\tSECTION(\"DeleteAll\") {\r\n\t\tREQUIRE(1 == st.Elements());\r\n\t\tst.InsertSpace(0, 10);\r\n\t\tst.SetValueAt(9, UniqueStringCopy(\"9\"));\r\n\t\tst.SetValueAt(7, UniqueStringCopy(\"7\"));\r\n\t\tst.SetValueAt(4, UniqueStringCopy(\"4\"));\r\n\t\tst.SetValueAt(3, UniqueStringCopy(\"3\"));\r\n\t\tREQUIRE(5 == st.Elements());\r\n\t\tREQUIRE(\"---34--7-9-\" == Representation(st));\r\n\t\tst.DeleteAll();\r\n\t\tREQUIRE(1 == st.Elements());\r\n\t\tREQUIRE(\"-\" == Representation(st));\r\n\t\tst.Check();\r\n\t}\r\n\r\n\tSECTION(\"DeleteStarting\") {\r\n\t\tREQUIRE(1 == st.Elements());\r\n\t\tst.InsertSpace(0, 2);\r\n\t\tst.SetValueAt(0, UniqueStringCopy(\"1\"));\r\n\t\tst.SetValueAt(1, UniqueStringCopy(\"2\"));\r\n\t\tREQUIRE(\"12-\" == Representation(st));\r\n\t\tst.DeletePosition(0);\r\n\t\tREQUIRE(\"2-\" == Representation(st));\r\n\t\tst.DeletePosition(0);\r\n\t\tREQUIRE(\"-\" == Representation(st));\r\n\t}\r\n\r\n\tSECTION(\"DeleteRange\") {\r\n\t\tREQUIRE(1 == st.Elements());\r\n\t\tst.InsertSpace(0, 10);\r\n\t\tst.SetValueAt(9, UniqueStringCopy(\"9\"));\r\n\t\tst.SetValueAt(7, UniqueStringCopy(\"7\"));\r\n\t\tst.SetValueAt(4, UniqueStringCopy(\"4\"));\r\n\t\tst.SetValueAt(3, UniqueStringCopy(\"3\"));\r\n\t\tREQUIRE(5 == st.Elements());\r\n\t\tREQUIRE(10 == st.Length());\r\n\t\tREQUIRE(\"---34--7-9-\" == Representation(st));\r\n\t\t// Delete in space\r\n\t\tst.DeleteRange(1, 1);\r\n\t\tREQUIRE(5 == st.Elements());\r\n\t\tREQUIRE(9 == st.Length());\r\n\t\tREQUIRE(\"--34--7-9-\" == Representation(st));\r\n\t\t// Delete 2 values\r\n\t\tst.DeleteRange(3, 4);\r\n\t\tREQUIRE(3 == st.Elements());\r\n\t\tREQUIRE(5 == st.Length());\r\n\t\tREQUIRE(\"--3-9-\" == Representation(st));\r\n\t\t// Deletion at start\r\n\t\tst.DeleteRange(0, 1);\r\n\t\tREQUIRE(3 == st.Elements());\r\n\t\tREQUIRE(4 == st.Length());\r\n\t\tREQUIRE(\"-3-9-\" == Representation(st));\r\n\t}\r\n\r\n\tSECTION(\"DeleteRangeAtEnds\") {\r\n\t\t// There are always elements at start and end although they can be nulled\r\n\t\tREQUIRE(1 == st.Elements());\r\n\t\tst.InsertSpace(0, 4);\r\n\t\tREQUIRE(4 == st.Length());\r\n\t\tst.SetValueAt(1, UniqueStringCopy(\"3\"));\r\n\t\tst.SetValueAt(4, UniqueStringCopy(\"9\"));\r\n\t\tREQUIRE(\"-3--9\" == Representation(st));\r\n\t\tREQUIRE(2 == st.Elements());\r\n\t\t// Empty deletion at end -> no effect\r\n\t\tst.DeleteRange(4, 0);\r\n\t\tREQUIRE(2 == st.Elements());\r\n\t\tREQUIRE(4 == st.Length());\r\n\t\tREQUIRE(\"-3--9\" == Representation(st));\r\n\t\t// Delete value at start\r\n\t\tst.InsertSpace(0, 1);\r\n\t\tst.SetValueAt(0, UniqueStringCopy(\"0\"));\r\n\t\tREQUIRE(2 == st.Elements());\r\n\t\tREQUIRE(5 == st.Length());\r\n\t\tREQUIRE(\"0-3--9\" == Representation(st));\r\n\t\tst.DeleteRange(0, 1);\r\n\t\tREQUIRE(2 == st.Elements());\r\n\t\tREQUIRE(4 == st.Length());\r\n\t\tREQUIRE(\"03--9\" == Representation(st));\r\n\t\t// Empty deletion at start -> no effect\r\n\t\tst.InsertSpace(0, 1);\r\n\t\tst.SetValueAt(0, UniqueStringCopy(\"1\"));\r\n\t\tREQUIRE(3 == st.Elements());\r\n\t\tREQUIRE(5 == st.Length());\r\n\t\tREQUIRE(\"103--9\" == Representation(st));\r\n\t\tst.DeleteRange(0, 0);\r\n\t\tREQUIRE(3 == st.Elements());\r\n\t\tREQUIRE(5 == st.Length());\r\n\t\tREQUIRE(\"103--9\" == Representation(st));\r\n\t}\r\n\r\n\tSECTION(\"DeleteStartingRange\") {\r\n\t\tREQUIRE(1 == st.Elements());\r\n\t\tst.InsertSpace(0, 2);\r\n\t\tst.SetValueAt(0, UniqueStringCopy(\"1\"));\r\n\t\tst.SetValueAt(1, UniqueStringCopy(\"2\"));\r\n\t\tREQUIRE(2 == st.Length());\r\n\t\tREQUIRE(\"12-\" == Representation(st));\r\n\t\tst.DeleteRange(0,1);\r\n\t\tREQUIRE(1 == st.Length());\r\n\t\tREQUIRE(\"2-\" == Representation(st));\r\n\t\tst.DeleteRange(0,1);\r\n\t\tREQUIRE(0 == st.Length());\r\n\t\tREQUIRE(\"-\" == Representation(st));\r\n\t\tst.InsertSpace(0, 2);\r\n\t\tst.SetValueAt(1, UniqueStringCopy(\"1\"));\r\n\t\tREQUIRE(2 == st.Length());\r\n\t\tREQUIRE(\"-1-\" == Representation(st));\r\n\t\tst.DeleteRange(0, 2);\r\n\t\tREQUIRE(\"-\" == Representation(st));\r\n\t\tst.InsertSpace(0, 4);\r\n\t\tst.SetValueAt(1, UniqueStringCopy(\"1\"));\r\n\t\tst.SetValueAt(3, UniqueStringCopy(\"3\"));\r\n\t\tREQUIRE(4 == st.Length());\r\n\t\tREQUIRE(\"-1-3-\" == Representation(st));\r\n\t\tst.DeleteRange(0, 3);\r\n\t\tREQUIRE(\"3-\" == Representation(st));\r\n\t\tst.DeleteRange(0, 1);\r\n\t\tREQUIRE(\"-\" == Representation(st));\r\n\t\tst.InsertSpace(0, 4);\r\n\t\tst.SetValueAt(1, UniqueStringCopy(\"1\"));\r\n\t\tst.SetValueAt(4, UniqueStringCopy(\"4\"));\r\n\t\tst.SetValueAt(3, UniqueStringCopy(\"3\"));\r\n\t\tREQUIRE(\"-1-34\" == Representation(st));\r\n\t\tst.DeleteRange(1, 3);\r\n\t\tREQUIRE(\"-4\" == Representation(st));\r\n\t\tst.InsertSpace(1, 3);\r\n\t\tREQUIRE(\"----4\" == Representation(st));\r\n\t\tst.SetValueAt(4, UniqueStringCopy(\"4\"));\r\n\t\tst.SetValueAt(3, UniqueStringCopy(\"3\"));\r\n\t\tREQUIRE(\"---34\" == Representation(st));\r\n\t\tst.DeleteRange(1, 3);\r\n\t\tREQUIRE(\"-4\" == Representation(st));\r\n\t}\r\n}\r\n\r\nTEST_CASE(\"SparseTextInt\") {\r\n\r\n\tSparseVector<int> st;\r\n\r\n\tSECTION(\"InsertAndDeleteValue\") {\r\n\t\tst.InsertSpace(0, 5);\r\n\t\tst.SetValueAt(3, 3);\r\n\t\tREQUIRE(2 == st.Elements());\r\n\t\tREQUIRE(0 == st.ValueAt(0));\r\n\t\tREQUIRE(0 == st.ValueAt(1));\r\n\t\tREQUIRE(0 == st.ValueAt(2));\r\n\t\tREQUIRE(3 == st.ValueAt(3));\r\n\t\tREQUIRE(0 == st.ValueAt(4));\r\n\t\tst.SetValueAt(3, -3);\r\n\t\tREQUIRE(2 == st.Elements());\r\n\t\tREQUIRE(0 == st.ValueAt(0));\r\n\t\tREQUIRE(0 == st.ValueAt(1));\r\n\t\tREQUIRE(0 == st.ValueAt(2));\r\n\t\tREQUIRE(-3 == st.ValueAt(3));\r\n\t\tREQUIRE(0 == st.ValueAt(4));\r\n\t\tst.SetValueAt(3, 0);\r\n\t\tREQUIRE(1 == st.Elements());\r\n\t\tREQUIRE(0 == st.ValueAt(0));\r\n\t\tREQUIRE(0 == st.ValueAt(1));\r\n\t\tREQUIRE(0 == st.ValueAt(2));\r\n\t\tREQUIRE(0 == st.ValueAt(3));\r\n\t\tREQUIRE(0 == st.ValueAt(4));\r\n\t\tst.Check();\r\n\t}\r\n\r\n\tSECTION(\"IndexAfter\") {\r\n\t\tst.InsertSpace(0, 5);\r\n\t\tREQUIRE(1 == st.Elements());\r\n\t\tREQUIRE(0 == st.IndexAfter(-1));\r\n\t\tREQUIRE(0 == st.PositionOfElement(0));\r\n\t\tREQUIRE(1 == st.IndexAfter(0));\r\n\t\tREQUIRE(5 == st.PositionOfElement(1));\r\n\t\tst.SetValueAt(3, 3);\r\n\t\tREQUIRE(2 == st.Elements());\r\n\t\tREQUIRE(0 == st.IndexAfter(-1));\r\n\t\tREQUIRE(0 == st.PositionOfElement(0));\r\n\t\tREQUIRE(1 == st.IndexAfter(0));\r\n\t\tREQUIRE(3 == st.PositionOfElement(1));\r\n\t\tREQUIRE(2 == st.IndexAfter(3));\r\n\t\tREQUIRE(5 == st.PositionOfElement(2));\r\n\t\tREQUIRE(2 == st.IndexAfter(4));\r\n\t}\r\n\r\n\tSECTION(\"PositionNext\") {\r\n\t\tst.InsertSpace(0, 5);\r\n\t\tREQUIRE(1 == st.Elements());\r\n\t\tREQUIRE(5 == st.PositionNext(-1));\r\n\t\tREQUIRE(5 == st.PositionNext(0));\r\n\t\tREQUIRE(6 == st.PositionNext(5));\r\n\t\tst.SetValueAt(3, 3);\r\n\t\tREQUIRE(2 == st.Elements());\r\n\t\tREQUIRE(3 == st.PositionNext(-1));\r\n\t\tREQUIRE(3 == st.PositionNext(0));\r\n\t\tREQUIRE(5 == st.PositionNext(3));\r\n\t\tREQUIRE(6 == st.PositionNext(5));\r\n\t}\r\n}\r\n\r\nTEST_CASE(\"SparseTextString\") {\r\n\r\n\tSparseVector<std::string> st;\r\n\r\n\tSECTION(\"InsertAndDeleteValue\") {\r\n\t\tst.InsertSpace(0, 5);\r\n\t\tREQUIRE(5 == st.Length());\r\n\t\tst.SetValueAt(3, std::string(\"3\"));\r\n\t\tREQUIRE(2 == st.Elements());\r\n\t\tREQUIRE(\"\" == st.ValueAt(0));\r\n\t\tREQUIRE(\"\" == st.ValueAt(2));\r\n\t\tREQUIRE(\"3\" == st.ValueAt(3));\r\n\t\tREQUIRE(\"\" == st.ValueAt(4));\r\n\t\tst.DeletePosition(0);\r\n\t\tREQUIRE(4 == st.Length());\r\n\t\tREQUIRE(\"3\" == st.ValueAt(2));\r\n\t\tst.DeletePosition(2);\r\n\t\tREQUIRE(1 == st.Elements());\r\n\t\tREQUIRE(3 == st.Length());\r\n\t\tREQUIRE(\"\" == st.ValueAt(0));\r\n\t\tREQUIRE(\"\" == st.ValueAt(1));\r\n\t\tREQUIRE(\"\" == st.ValueAt(2));\r\n\t\tst.Check();\r\n\t}\r\n\r\n\tSECTION(\"SetAndMoveString\") {\r\n\t\tst.InsertSpace(0, 2);\r\n\t\tREQUIRE(2u == st.Length());\r\n\t\tconst std::string s24(\"24\");\r\n\t\tst.SetValueAt(0, s24);\r\n\t\tREQUIRE(\"24\" == s24);\t// Not moved from\r\n\t\tREQUIRE(\"\" == st.ValueAt(-1));\r\n\t\tREQUIRE(\"24\" == st.ValueAt(0));\r\n\t\tREQUIRE(\"\" == st.ValueAt(1));\r\n\t\tstd::string s25(\"25\");\r\n\t\tst.SetValueAt(1, std::move(s25));\r\n\t\t// Deliberate check of moved from: provokes warning from Visual C++ code analysis\r\n\t\tREQUIRE(\"\" == s25);\r\n\t\tREQUIRE(\"25\" == st.ValueAt(1));\r\n\t}\r\n\r\n}\r\n"
  },
  {
    "path": "scintilla/test/unit/testSplitVector.cxx",
    "content": "/** @file testSplitVector.cxx\r\n ** Unit Tests for Scintilla internal data structures\r\n **/\r\n\r\n#include <cstddef>\r\n#include <cstring>\r\n\r\n#include <stdexcept>\r\n#include <string_view>\r\n#include <vector>\r\n#include <optional>\r\n#include <algorithm>\r\n#include <memory>\r\n\r\n#include \"Debugging.h\"\r\n\r\n#include \"Position.h\"\r\n#include \"SplitVector.h\"\r\n\r\n#include \"catch.hpp\"\r\n\r\nusing namespace Scintilla::Internal;\r\n\r\n// Test SplitVector.\r\n\r\nusing UniqueInt = std::unique_ptr<int>;\r\n\r\n// Test SplitVector.\r\n\r\nTEST_CASE(\"CompileCopying SplitVector\") {\r\n\r\n\t// These are compile-time tests to check that basic copy and move\r\n\t// operations are defined correctly.\r\n\r\n\tSECTION(\"CopyingMoving\") {\r\n\t\tSplitVector<int> s;\r\n\t\tSplitVector<int> s2;\r\n\r\n\t\t// Copy constructor fails\r\n\t\tconst SplitVector<int> sa(s);\r\n\t\t// Copy assignment fails\r\n\t\tSplitVector<int> sb;\r\n\t\tsb = s;\r\n\r\n\t\t// Move constructor fails\r\n\t\tconst SplitVector<int> sc(std::move(s));\r\n\t\t// Move assignment fails\r\n\t\tSplitVector<int> sd;\r\n\t\tsd = (std::move(s2));\r\n\t}\r\n\r\n\tSECTION(\"MoveOnly\") {\r\n\t\tSplitVector<UniqueInt> s;\r\n\r\n#if defined(SHOW_COPY_BUILD_FAILURES)\r\n\t\t// Copy is not defined for std::unique_ptr\r\n\t\t// Copy constructor fails\r\n\t\tSplitVector<UniqueInt> sa(s);\r\n\t\t// Copy assignment fails\r\n\t\tSplitVector<UniqueInt> sb;\r\n\t\tsb = s;\r\n#endif\r\n\r\n\t\t// Move constructor fails\r\n\t\tconst SplitVector<UniqueInt> sc(std::move(s));\r\n\t\t// Move assignment fails\r\n\t\tSplitVector<UniqueInt> sd;\r\n\t\tsd = (std::move(s));\r\n\t}\r\n\r\n}\r\n\r\nstruct StringSetHolder {\r\n\tSplitVector<std::string> sa;\r\n\t[[nodiscard]] bool Check() const noexcept {\r\n\t\tfor (int i = 0; i < sa.Length(); i++) {\r\n\t\t\tif (sa[i].empty()) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}\r\n};\r\n\r\nconstexpr int lengthTestArray = 4;\r\nstatic const int testArray[4] = {3, 4, 5, 6};\r\n\r\nTEST_CASE(\"SplitVector\") {\r\n\r\n\tSplitVector<int> sv;\r\n\r\n\tSECTION(\"IsEmptyInitially\") {\r\n\t\tREQUIRE(0 == sv.Length());\r\n\t}\r\n\r\n\tSECTION(\"InsertOne\") {\r\n\t\tsv.InsertValue(0, 10, 0);\r\n\t\tsv.Insert(5, 3);\r\n\t\tREQUIRE(11 == sv.Length());\r\n\t\tfor (int i=0; i<sv.Length(); i++) {\r\n\t\t\tREQUIRE(((i == 5) ? 3 : 0) == sv.ValueAt(i));\r\n\t\t}\r\n\t}\r\n\r\n\tSECTION(\"Insertion\") {\r\n\t\tsv.InsertValue(0, 10, 0);\r\n\t\tREQUIRE(10 == sv.Length());\r\n\t\tfor (int i=0; i<sv.Length(); i++) {\r\n\t\t\tREQUIRE(0 == sv.ValueAt(i));\r\n\t\t}\r\n\t}\r\n\r\n\tSECTION(\"InsertionString\") {\r\n\t\t// This test failed an earlier version of SplitVector that copied backwards incorrectly\r\n\t\tStringSetHolder ssh;\r\n\t\tssh.sa.Insert(0, \"Alpha\");\r\n\t\tREQUIRE(ssh.Check());\r\n\t\tssh.sa.Insert(0, \"Beta\");\r\n\t\tREQUIRE(ssh.Check());\r\n\t\tssh.sa.Insert(0, \"Cat\");\r\n\t\tREQUIRE(ssh.Check());\r\n\t\tssh.sa.Insert(1, \"Dog\");\r\n\t\tREQUIRE(ssh.Check());\r\n\t\tssh.sa.Insert(0, \"Elephant\");\r\n\t\tREQUIRE(ssh.Check());\r\n\t\tssh.sa.Insert(1, \"Fox\");\r\n\t\tREQUIRE(ssh.Check());\r\n\t\tssh.sa.Insert(0, \"Grass\");\r\n\t\tREQUIRE(ssh.Check());\r\n\t\tssh.sa.Insert(1, \"Hat\");\r\n\t\tREQUIRE(ssh.Check());\r\n\t\tssh.sa.Delete(4);\r\n\t\tREQUIRE(ssh.Check());\r\n\t\tssh.sa.Insert(0, \"Indigo\");\r\n\t\tREQUIRE(ssh.Check());\r\n\t\tssh.sa.Insert(1, \"Jackal\");\r\n\t\tREQUIRE(ssh.Check());\r\n\t\tssh.sa.Insert(0, \"Kanga\");\r\n\t\tREQUIRE(ssh.Check());\r\n\t\tssh.sa.Insert(1, \"Lion\");\r\n\t\tREQUIRE(ssh.Check());\r\n\t\tssh.sa.Insert(0, \"Mango\");\r\n\t\tREQUIRE(ssh.Check());\r\n\t\tssh.sa.Insert(1, \"Neon\");\r\n\t\tREQUIRE(ssh.Check());\r\n\t}\r\n\r\n\tSECTION(\"InsertionPattern\") {\r\n\t\tsv.Insert(0, 1);\t// 1\r\n\t\tsv.Insert(0, 2);\t// 21\r\n\t\tsv.Insert(0, 3);\t// 321\r\n\t\tsv.Insert(1, 4);\t// 3421\r\n\t\tsv.Insert(0, 5);\t// 53421\r\n\t\tsv.Insert(1, 6);\t// 563421\r\n\t\tsv.Insert(0, 7);\t// 7563421\r\n\t\tsv.Insert(1, 8);\t// 78563421\r\n\r\n\t\tREQUIRE(8 == sv.Length());\r\n\r\n\t\tREQUIRE(7 == sv.ValueAt(0));\r\n\t\tREQUIRE(8 == sv.ValueAt(1));\r\n\t\tREQUIRE(5 == sv.ValueAt(2));\r\n\t\tREQUIRE(6 == sv.ValueAt(3));\r\n\t\tREQUIRE(3 == sv.ValueAt(4));\r\n\t\tREQUIRE(4 == sv.ValueAt(5));\r\n\t\tREQUIRE(2 == sv.ValueAt(6));\r\n\t\tREQUIRE(1 == sv.ValueAt(7));\r\n\r\n\t\tsv.Delete(4);\t// 7856421\r\n\r\n\t\tREQUIRE(7 == sv.Length());\r\n\r\n\t\tREQUIRE(7 == sv.ValueAt(0));\r\n\t\tREQUIRE(8 == sv.ValueAt(1));\r\n\t\tREQUIRE(5 == sv.ValueAt(2));\r\n\t\tREQUIRE(6 == sv.ValueAt(3));\r\n\t\tREQUIRE(4 == sv.ValueAt(4));\r\n\t\tREQUIRE(2 == sv.ValueAt(5));\r\n\t\tREQUIRE(1 == sv.ValueAt(6));\r\n\r\n\t\tsv.Insert(0, 9);\t\t// 97856421\r\n\t\tsv.Insert(1, 0xa);\t// 9a7856421\r\n\t\tsv.Insert(0, 0xb);\t// b9a7856421\r\n\t\tsv.Insert(1, 0xc);\t// bc9a7856421\r\n\t\tsv.Insert(0, 0xd);\t// dbc9a7856421\r\n\t\tsv.Insert(1, 0xe);\t// debc9a7856421\r\n\r\n\t\tREQUIRE(13 == sv.Length());\r\n\r\n\t\tREQUIRE(0xd == sv.ValueAt(0));\r\n\t\tREQUIRE(0xe == sv.ValueAt(1));\r\n\t\tREQUIRE(0xb == sv.ValueAt(2));\r\n\t\tREQUIRE(0xc == sv.ValueAt(3));\r\n\t\tREQUIRE(9 == sv.ValueAt(4));\r\n\t\tREQUIRE(0xa == sv.ValueAt(5));\r\n\t\tREQUIRE(7 == sv.ValueAt(6));\r\n\t\tREQUIRE(8 == sv.ValueAt(7));\r\n\t\tREQUIRE(5 == sv.ValueAt(8));\r\n\t\tREQUIRE(6 == sv.ValueAt(9));\r\n\t\tREQUIRE(4 == sv.ValueAt(10));\r\n\t\tREQUIRE(2 == sv.ValueAt(11));\r\n\t\tREQUIRE(1 == sv.ValueAt(12));\r\n\t}\r\n\r\n\tSECTION(\"EnsureLength\") {\r\n\t\tsv.EnsureLength(4);\r\n\t\tREQUIRE(4 == sv.Length());\r\n\t\tfor (int i=0; i<sv.Length(); i++) {\r\n\t\t\tREQUIRE(0 == sv.ValueAt(i));\r\n\t\t}\r\n\t}\r\n\r\n\tSECTION(\"InsertFromArray\") {\r\n\t\tsv.InsertFromArray(0, testArray, 0, lengthTestArray);\r\n\t\tREQUIRE(lengthTestArray == sv.Length());\r\n\t\tfor (int i=0; i<sv.Length(); i++) {\r\n\t\t\tREQUIRE((i+3) == sv.ValueAt(i));\r\n\t\t}\r\n\t}\r\n\r\n\tSECTION(\"InsertEmpty\") {\r\n\t\tsv.InsertEmpty(0, 0);\r\n\t\tREQUIRE(0 == sv.Length());\r\n\t\tint *pi = sv.InsertEmpty(0, 2);\r\n\t\tREQUIRE(2 == sv.Length());\r\n\t\tREQUIRE(0 == sv.ValueAt(0));\r\n\t\tREQUIRE(0 == sv.ValueAt(1));\r\n\t\tpi[0] = 4;\r\n\t\tpi[1] = 5;\r\n\t\tREQUIRE(4 == sv.ValueAt(0));\r\n\t\tREQUIRE(5 == sv.ValueAt(1));\r\n\t\tpi = sv.InsertEmpty(1, 2);\r\n\t\tpi[0] = 6;\r\n\t\tpi[1] = 7;\r\n\t\tREQUIRE(4 == sv.Length());\r\n\t\tREQUIRE(4 == sv.ValueAt(0));\r\n\t\tREQUIRE(6 == sv.ValueAt(1));\r\n\t\tREQUIRE(7 == sv.ValueAt(2));\r\n\t\tREQUIRE(5 == sv.ValueAt(3));\r\n\t}\r\n\r\n\tSECTION(\"SetValue\") {\r\n\t\tsv.InsertValue(0, 10, 0);\r\n\t\tsv.SetValueAt(5, 3);\r\n\t\tREQUIRE(10 == sv.Length());\r\n\t\tfor (int i=0; i<sv.Length(); i++) {\r\n\t\t\tREQUIRE(((i == 5) ? 3 : 0) == sv.ValueAt(i));\r\n\t\t}\r\n\t\t// Move the gap\r\n\t\tsv.InsertValue(7, 1, 17);\r\n\t\tREQUIRE(17 == sv.ValueAt(7));\r\n\t\tREQUIRE(0 == sv.ValueAt(8));\r\n\t\t// Set after the gap\r\n\t\tsv.SetValueAt(8, 19);\r\n\t\tREQUIRE(19 == sv.ValueAt(8));\r\n\t}\r\n\r\n\tSECTION(\"Indexing\") {\r\n\t\tsv.InsertValue(0, 10, 0);\r\n\t\tsv.SetValueAt(5, 3);\r\n\t\tREQUIRE(10 == sv.Length());\r\n\t\tfor (int i=0; i<sv.Length(); i++) {\r\n\t\t\tREQUIRE(((i == 5) ? 3 : 0) == sv[i]);\r\n\t\t}\r\n}\r\n\r\n\tSECTION(\"Fill\") {\r\n\t\tsv.InsertValue(0, 10, 0);\r\n\t\tREQUIRE(10 == sv.Length());\r\n\t\tsv.InsertValue(7, 1, 1);\r\n\t\tREQUIRE(11 == sv.Length());\r\n\t\tfor (int i=0; i<sv.Length(); i++) {\r\n\t\t\tREQUIRE(((i == 7) ? 1 : 0) == sv.ValueAt(i));\r\n\t\t}\r\n\t}\r\n\r\n\tSECTION(\"DeleteOne\") {\r\n\t\tsv.InsertFromArray(0, testArray, 0, lengthTestArray);\r\n\t\tsv.Delete(2);\r\n\t\tREQUIRE((lengthTestArray-1) == sv.Length());\r\n\t\tREQUIRE(3 == sv[0]);\r\n\t\tREQUIRE(4 == sv[1]);\r\n\t\tREQUIRE(6 == sv[2]);\r\n\t}\r\n\r\n\tSECTION(\"DeleteRange\") {\r\n\t\tsv.InsertValue(0, 10, 0);\r\n\t\tREQUIRE(10 == sv.Length());\r\n\t\tsv.InsertValue(7, 1, 1);\r\n\t\tREQUIRE(11 == sv.Length());\r\n\t\tsv.DeleteRange(2, 3);\r\n\t\tREQUIRE(8 == sv.Length());\r\n\t\tfor (int i=0; i<sv.Length(); i++) {\r\n\t\t\tREQUIRE(((i == 4) ? 1 : 0) == sv.ValueAt(i));\r\n\t\t}\r\n\t}\r\n\r\n\tSECTION(\"DeleteAll\") {\r\n\t\tsv.InsertValue(0, 10, 0);\r\n\t\tsv.InsertValue(7, 1, 1);\r\n\t\tsv.DeleteRange(2, 3);\r\n\t\tsv.DeleteAll();\r\n\t\tREQUIRE(0 == sv.Length());\r\n\t}\r\n\r\n\tSECTION(\"GetRange\") {\r\n\t\tsv.InsertValue(0, 10, 0);\r\n\t\tsv.InsertValue(7, 1, 1);\r\n\t\tint retrieveArray[11] = {0};\r\n\t\tsv.GetRange(retrieveArray, 0, 11);\r\n\t\tfor (int i=0; i<sv.Length(); i++) {\r\n\t\t\tREQUIRE(((i==7) ? 1 : 0) == retrieveArray[i]);\r\n\t\t}\r\n\t}\r\n\r\n\tSECTION(\"GetRangeOverGap\") {\r\n\t\tsv.InsertFromArray(0, testArray, 0, lengthTestArray);\r\n\t\tREQUIRE(lengthTestArray == sv.Length());\r\n\t\tint retrieveArray[lengthTestArray] = {0};\r\n\t\tsv.GetRange(retrieveArray, 0, lengthTestArray);\r\n\t\tfor (int i=0; i<sv.Length(); i++) {\r\n\t\t\tREQUIRE((i+3) == retrieveArray[i]);\r\n\t\t}\r\n\t}\r\n\r\n\tSECTION(\"ReplaceUp\") {\r\n\t\t// Replace each element by inserting and then deleting the displaced element\r\n\t\t// This should perform many moves\r\n\t\tconstexpr int testLength=105;\r\n\t\tsv.EnsureLength(testLength);\r\n\t\tfor (int i=0; i<testLength; i++)\r\n\t\t\tsv.SetValueAt(i, i+2);\r\n\t\tREQUIRE(testLength == sv.Length());\r\n\t\tfor (int i=0; i<sv.Length(); i++) {\r\n\t\t\tsv.InsertValue(i, 1, i+9);\r\n\t\t\tsv.Delete(i+1);\r\n\t\t}\r\n\t\tfor (int i=0; i<sv.Length(); i++)\r\n\t\t\tREQUIRE((i+9) == sv.ValueAt(i));\r\n\t}\r\n\r\n\tSECTION(\"ReplaceDown\") {\r\n\t\t// From the end, replace each element by inserting and then deleting the displaced element\r\n\t\t// This should perform many moves\r\n\t\tconstexpr int testLength=24;\r\n\t\tsv.EnsureLength(testLength);\r\n\t\tfor (int i=0; i<testLength; i++)\r\n\t\t\tsv.SetValueAt(i, i+12);\r\n\t\tREQUIRE(testLength == sv.Length());\r\n\t\tfor (ptrdiff_t i=sv.Length()-1; i>=0; i--) {\r\n\t\t\tsv.InsertValue(i, 1, static_cast<int>(i+5));\r\n\t\t\tsv.Delete(i+1);\r\n\t\t}\r\n\t\tfor (int i=0; i<sv.Length(); i++)\r\n\t\t\tREQUIRE((i+5) == sv.ValueAt(i));\r\n\t}\r\n\r\n\tSECTION(\"BufferPointer\") {\r\n\t\t// Low-level access to the data\r\n\t\tsv.InsertFromArray(0, testArray, 0, lengthTestArray);\r\n\t\tsv.Insert(0, 99);\t// This moves the gap so that BufferPointer() must also move\r\n\t\tREQUIRE(1 == sv.GapPosition());\r\n\t\tconstexpr int lengthAfterInsertion = 1 + lengthTestArray;\r\n\t\tREQUIRE(lengthAfterInsertion == (sv.Length()));\r\n\t\tconst int *retrievePointer = sv.BufferPointer();\r\n\t\tfor (int i=1; i<sv.Length(); i++) {\r\n\t\t\tREQUIRE((i+3-1) == retrievePointer[i]);\r\n\t\t}\r\n\t\tREQUIRE(lengthAfterInsertion == sv.Length());\r\n\t\t// Gap was moved to end.\r\n\t\tREQUIRE(lengthAfterInsertion == sv.GapPosition());\r\n\t}\r\n\r\n\tSECTION(\"DeleteBackAndForth\") {\r\n\t\tsv.InsertValue(0, 10, 87);\r\n\t\tfor (int i=0; i<10; i+=2) {\r\n\t\t\tconst int len = 10 - i;\r\n\t\t\tREQUIRE(len == sv.Length());\r\n\t\t\tfor (int j=0; j<sv.Length(); j++) {\r\n\t\t\t\tREQUIRE(87 == sv.ValueAt(j));\r\n\t\t\t}\r\n\t\t\tsv.Delete(len-1);\r\n\t\t\tsv.Delete(0);\r\n\t\t}\r\n\t}\r\n\r\n\tSECTION(\"GrowSize\") {\r\n\t\tsv.SetGrowSize(5);\r\n\t\tREQUIRE(5 == sv.GetGrowSize());\r\n\t}\r\n\r\n\tSECTION(\"OutsideBounds\") {\r\n\t\tsv.InsertValue(0, 10, 87);\r\n\t\tREQUIRE(0 == sv.ValueAt(-1));\r\n\t\tREQUIRE(0 == sv.ValueAt(10));\r\n\r\n\t\t/* Could be a death test as this asserts:\r\n\t\tsv.SetValueAt(-1,98);\r\n\t\tsv.SetValueAt(10,99);\r\n\t\tREQUIRE(0 == sv.ValueAt(-1));\r\n\t\tREQUIRE(0 == sv.ValueAt(10));\r\n\t\t*/\r\n\t}\r\n\r\n}\r\n"
  },
  {
    "path": "scintilla/test/unit/testUniConversion.cxx",
    "content": "/** @file testUniConversion.cxx\r\n ** Unit Tests for Scintilla internal data structures\r\n **/\r\n\r\n#include <cstring>\r\n\r\n#include <string>\r\n#include <string_view>\r\n#include <vector>\r\n#include <optional>\r\n#include <algorithm>\r\n#include <memory>\r\n\r\n#include \"Debugging.h\"\r\n\r\n#include \"UniConversion.h\"\r\n\r\n#include \"catch.hpp\"\r\n\r\nusing namespace Scintilla::Internal;\r\n\r\n// Test UniConversion.\r\n// Use examples from Wikipedia:\r\n// https://en.wikipedia.org/wiki/UTF-8\r\n\r\nTEST_CASE(\"UTF16Length\") {\r\n\r\n\tSECTION(\"UTF16Length ASCII\") {\r\n\t\t// Latin Small Letter A\r\n\t\tconst char *s = \"a\";\r\n\t\tconst size_t len = UTF16Length(s);\r\n\t\tREQUIRE(len == 1U);\r\n\t}\r\n\r\n\tSECTION(\"UTF16Length Example1\") {\r\n\t\t// Dollar Sign\r\n\t\tconst char *s = \"\\x24\";\r\n\t\tconst size_t len = UTF16Length(s);\r\n\t\tREQUIRE(len == 1U);\r\n\t}\r\n\r\n\tSECTION(\"UTF16Length Example2\") {\r\n\t\t// Cent Sign\r\n\t\tconst char *s = \"\\xC2\\xA2\";\r\n\t\tconst size_t len = UTF16Length(s);\r\n\t\tREQUIRE(len == 1U);\r\n\t}\r\n\r\n\tSECTION(\"UTF16Length Example3\") {\r\n\t\t// Euro Sign\r\n\t\tconst char *s = \"\\xE2\\x82\\xAC\";\r\n\t\tconst size_t len = UTF16Length(s);\r\n\t\tREQUIRE(len == 1U);\r\n\t}\r\n\r\n\tSECTION(\"UTF16Length Example4\") {\r\n\t\t// Gothic Letter Hwair\r\n\t\tconst char *s = \"\\xF0\\x90\\x8D\\x88\";\r\n\t\tconst size_t len = UTF16Length(s);\r\n\t\tREQUIRE(len == 2U);\r\n\t}\r\n\r\n\tSECTION(\"UTF16Length Invalid Trail byte in lead position\") {\r\n\t\tconst char *s = \"a\\xB5yz\";\r\n\t\tconst size_t len = UTF16Length(s);\r\n\t\tREQUIRE(len == 4U);\r\n\t}\r\n\r\n\tSECTION(\"UTF16Length Invalid Lead byte at end\") {\r\n\t\tconst char *s = \"a\\xC2\";\r\n\t\tconst size_t len = UTF16Length(s);\r\n\t\tREQUIRE(len == 2U);\r\n\t}\r\n\r\n\tSECTION(\"UTF16Length Invalid Lead byte implies 3 trails but only 2\") {\r\n\t\tconst char *s = \"a\\xF1yz\";\r\n\t\tconst size_t len = UTF16Length(s);\r\n\t\tREQUIRE(len == 2U);\r\n\t}\r\n}\r\n\r\nTEST_CASE(\"UniConversion\") {\r\n\r\n\t// UnicodeFromUTF8\r\n\r\n\tSECTION(\"UnicodeFromUTF8 ASCII\") {\r\n\t\tconst unsigned char s[]={'a', 0, 0, 0};\r\n\t\tREQUIRE(UnicodeFromUTF8(s) == 'a');\r\n\t}\r\n\r\n\tSECTION(\"UnicodeFromUTF8 Example1\") {\r\n\t\tconst unsigned char s[]={0x24, 0, 0, 0};\r\n\t\tREQUIRE(UnicodeFromUTF8(s) == 0x24);\r\n\t}\r\n\r\n\tSECTION(\"UnicodeFromUTF8 Example2\") {\r\n\t\tconst unsigned char s[]={0xC2, 0xA2, 0, 0};\r\n\t\tREQUIRE(UnicodeFromUTF8(s) == 0xA2);\r\n\t}\r\n\r\n\tSECTION(\"UnicodeFromUTF8 Example3\") {\r\n\t\tconst unsigned char s[]={0xE2, 0x82, 0xAC, 0};\r\n\t\tREQUIRE(UnicodeFromUTF8(s) == 0x20AC);\r\n\t}\r\n\r\n\tSECTION(\"UnicodeFromUTF8 Example4\") {\r\n\t\tconst unsigned char s[]={0xF0, 0x90, 0x8D, 0x88, 0};\r\n\t\tREQUIRE(UnicodeFromUTF8(s) == 0x10348);\r\n\t}\r\n\r\n\t// UTF16FromUTF8\r\n\r\n\tSECTION(\"UTF16FromUTF8 ASCII\") {\r\n\t\tconst char s[] = {'a', 0};\r\n\t\twchar_t tbuf[1] = {0};\r\n\t\tconst size_t tlen = UTF16FromUTF8(s, tbuf, 1);\r\n\t\tREQUIRE(tlen == 1U);\r\n\t\tREQUIRE(tbuf[0] == 'a');\r\n\t}\r\n\r\n\tSECTION(\"UTF16FromUTF8 Example1\") {\r\n\t\tconst char s[] = {'\\x24', 0};\r\n\t\twchar_t tbuf[1] = {0};\r\n\t\tconst size_t tlen = UTF16FromUTF8(s, tbuf, 1);\r\n\t\tREQUIRE(tlen == 1U);\r\n\t\tREQUIRE(tbuf[0] == 0x24);\r\n\t}\r\n\r\n\tSECTION(\"UTF16FromUTF8 Example2\") {\r\n\t\tconst char s[] = {'\\xC2', '\\xA2', 0};\r\n\t\twchar_t tbuf[1] = {0};\r\n\t\tconst size_t tlen = UTF16FromUTF8(s, tbuf, 1);\r\n\t\tREQUIRE(tlen == 1U);\r\n\t\tREQUIRE(tbuf[0] == 0xA2);\r\n\t}\r\n\r\n\tSECTION(\"UTF16FromUTF8 Example3\") {\r\n\t\tconst char s[] = {'\\xE2', '\\x82', '\\xAC', 0};\r\n\t\twchar_t tbuf[1] = {0};\r\n\t\tconst size_t tlen = UTF16FromUTF8(s, tbuf, 1);;\r\n\t\tREQUIRE(tlen == 1U);\r\n\t\tREQUIRE(tbuf[0] == 0x20AC);\r\n\t}\r\n\r\n\tSECTION(\"UTF16FromUTF8 Example4\") {\r\n\t\tconst char s[] = {'\\xF0', '\\x90', '\\x8D', '\\x88', 0};\r\n\t\twchar_t tbuf[2] = {0, 0};\r\n\t\tconst size_t tlen = UTF16FromUTF8(s, tbuf, 2);\r\n\t\tREQUIRE(tlen == 2U);\r\n\t\tREQUIRE(tbuf[0] == 0xD800);\r\n\t\tREQUIRE(tbuf[1] == 0xDF48);\r\n\t}\r\n\r\n\tSECTION(\"UTF16FromUTF8 Invalid Trail byte in lead position\") {\r\n\t\tconst char s[] = \"a\\xB5yz\";\r\n\t\twchar_t tbuf[4] = {};\r\n\t\tconst size_t tlen = UTF16FromUTF8(s, tbuf, 4);\r\n\t\tREQUIRE(tlen == 4U);\r\n\t\tREQUIRE(tbuf[0] == 'a');\r\n\t\tREQUIRE(tbuf[1] == 0xB5);\r\n\t\tREQUIRE(tbuf[2] == 'y');\r\n\t\tREQUIRE(tbuf[3] == 'z');\r\n\t}\r\n\r\n\tSECTION(\"UTF16FromUTF8 Invalid Lead byte at end\") {\r\n\t\tconst char s[] = \"a\\xC2\";\r\n\t\twchar_t tbuf[2] = {};\r\n\t\tconst size_t tlen = UTF16FromUTF8(s, tbuf, 2);\r\n\t\tREQUIRE(tlen == 2U);\r\n\t\tREQUIRE(tbuf[0] == 'a');\r\n\t\tREQUIRE(tbuf[1] == 0xC2);\r\n\t}\r\n\r\n\tSECTION(\"UTF16FromUTF8 Invalid Lead byte implies 3 trails but only 2\") {\r\n\t\tconst char *s = \"a\\xF1yz\";\r\n\t\twchar_t tbuf[4] = {};\r\n\t\tconst size_t tlen = UTF16FromUTF8(s, tbuf, 4);\r\n\t\tREQUIRE(tlen == 2U);\r\n\t\tREQUIRE(tbuf[0] == 'a');\r\n\t\tREQUIRE(tbuf[1] == 0xF1);\r\n\t}\r\n\r\n\t// UTF32FromUTF8\r\n\r\n\tSECTION(\"UTF32FromUTF8 ASCII\") {\r\n\t\tconst char s[] = {'a', 0};\r\n\t\tunsigned int tbuf[1] = {0};\r\n\t\tconst size_t tlen = UTF32FromUTF8(s, tbuf, 1);\r\n\t\tREQUIRE(tlen == 1U);\r\n\t\tREQUIRE(tbuf[0] == static_cast<unsigned int>('a'));\r\n\t}\r\n\r\n\tSECTION(\"UTF32FromUTF8 Example1\") {\r\n\t\tconst char s[] = {'\\x24', 0};\r\n\t\tunsigned int tbuf[1] = {0};\r\n\t\tconst size_t tlen = UTF32FromUTF8(s, tbuf, 1);\r\n\t\tREQUIRE(tlen == 1U);\r\n\t\tREQUIRE(tbuf[0] == 0x24);\r\n\t}\r\n\r\n\tSECTION(\"UTF32FromUTF8 Example2\") {\r\n\t\tconst char s[] = {'\\xC2', '\\xA2', 0};\r\n\t\tunsigned int tbuf[1] = {0};\r\n\t\tconst size_t tlen = UTF32FromUTF8(s, tbuf, 1);\r\n\t\tREQUIRE(tlen == 1U);\r\n\t\tREQUIRE(tbuf[0] == 0xA2);\r\n\t}\r\n\r\n\tSECTION(\"UTF32FromUTF8 Example3\") {\r\n\t\tconst char s[] = {'\\xE2', '\\x82', '\\xAC', 0};\r\n\t\tunsigned int tbuf[1] = {0};\r\n\t\tconst size_t tlen = UTF32FromUTF8(s, tbuf, 1);\r\n\t\tREQUIRE(tlen == 1U);\r\n\t\tREQUIRE(tbuf[0] == 0x20AC);\r\n\t}\r\n\r\n\tSECTION(\"UTF32FromUTF8 Example4\") {\r\n\t\tconst char s[] = {'\\xF0', '\\x90', '\\x8D', '\\x88', 0};\r\n\t\tunsigned int tbuf[1] = {0};\r\n\t\tconst size_t tlen = UTF32FromUTF8(s, tbuf, 1);\r\n\t\tREQUIRE(tlen == 1U);\r\n\t\tREQUIRE(tbuf[0] == 0x10348);\r\n\t}\r\n\r\n\tSECTION(\"UTF32FromUTF8 Invalid Trail byte in lead position\") {\r\n\t\tconst char s[] = \"a\\xB5yz\";\r\n\t\tunsigned int tbuf[4] = {};\r\n\t\tconst size_t tlen = UTF32FromUTF8(s, tbuf, 4);\r\n\t\tREQUIRE(tlen == 4U);\r\n\t\tREQUIRE(tbuf[0] == static_cast<unsigned int>('a'));\r\n\t\tREQUIRE(tbuf[1] == 0xB5);\r\n\t\tREQUIRE(tbuf[2] == static_cast<unsigned int>('y'));\r\n\t\tREQUIRE(tbuf[3] == static_cast<unsigned int>('z'));\r\n\t}\r\n\r\n\tSECTION(\"UTF32FromUTF8 Invalid Lead byte at end\") {\r\n\t\tconst char s[] = \"a\\xC2\";\r\n\t\tunsigned int tbuf[2] = {};\r\n\t\tconst size_t tlen = UTF32FromUTF8(s, tbuf, 2);\r\n\t\tREQUIRE(tlen == 2U);\r\n\t\tREQUIRE(tbuf[0] == static_cast<unsigned int>('a'));\r\n\t\tREQUIRE(tbuf[1] == 0xC2);\r\n\t}\r\n\r\n\tSECTION(\"UTF32FromUTF8 Invalid Lead byte implies 3 trails but only 2\") {\r\n\t\tconst char *s = \"a\\xF1yz\";\r\n\t\tunsigned int tbuf[4] = {};\r\n\t\tconst size_t tlen = UTF32FromUTF8(s, tbuf, 4);\r\n\t\tREQUIRE(tlen == 2U);\r\n\t\tREQUIRE(tbuf[0] == static_cast<unsigned int>('a'));\r\n\t\tREQUIRE(tbuf[1] == 0xF1);\r\n\t}\r\n}\r\n\r\nnamespace {\r\n\r\n// Simple adapter to avoid casting\r\nint UTFClass(std::string_view sv) noexcept {\r\n\treturn UTF8Classify(sv);\r\n}\r\n\r\n}\r\n\r\nTEST_CASE(\"UTF8Classify\") {\r\n\r\n\t// These tests are supposed to hit every return statement in UTF8Classify in order\r\n\t// with some hit multiple times.\r\n\r\n\t// Single byte\r\n\r\n\tSECTION(\"UTF8Classify Simple ASCII\") {\r\n\t\tREQUIRE(UTFClass(\"a\") == 1);\r\n\t}\r\n\tSECTION(\"UTF8Classify Invalid Too large lead\") {\r\n\t\tREQUIRE(UTFClass(\"\\xF5\") == (1|UTF8MaskInvalid));\r\n\t}\r\n\tSECTION(\"UTF8Classify Overlong\") {\r\n\t\tREQUIRE(UTFClass(\"\\xC0\\x80\") == (1 | UTF8MaskInvalid));\r\n\t}\r\n\tSECTION(\"UTF8Classify single trail byte\") {\r\n\t\tREQUIRE(UTFClass(\"\\x80\") == (1 | UTF8MaskInvalid));\r\n\t}\r\n\r\n\t// Invalid length tests\r\n\r\n\tSECTION(\"UTF8Classify 2 byte lead, string less than 2 long\") {\r\n\t\tREQUIRE(UTFClass(\"\\xD0\") == (1 | UTF8MaskInvalid));\r\n\t}\r\n\tSECTION(\"UTF8Classify 3 byte lead, string less than 3 long\") {\r\n\t\tREQUIRE(UTFClass(\"\\xEF\") == (1 | UTF8MaskInvalid));\r\n\t}\r\n\tSECTION(\"UTF8Classify 4 byte lead, string less than 4 long\") {\r\n\t\tREQUIRE(UTFClass(\"\\xF0\") == (1 | UTF8MaskInvalid));\r\n\t}\r\n\r\n\t// Invalid first trail byte tests\r\n\r\n\tSECTION(\"UTF8Classify 2 byte lead trail is invalid\") {\r\n\t\tREQUIRE(UTFClass(\"\\xD0q\") == (1 | UTF8MaskInvalid));\r\n\t}\r\n\tSECTION(\"UTF8Classify 3 byte lead invalid trails\") {\r\n\t\tREQUIRE(UTFClass(\"\\xE2qq\") == (1 | UTF8MaskInvalid));\r\n\t}\r\n\tSECTION(\"UTF8Classify 4 byte bad trails\") {\r\n\t\tREQUIRE(UTFClass(\"\\xF0xyz\") == (1 | UTF8MaskInvalid));\r\n\t}\r\n\r\n\t// 2 byte lead\r\n\r\n\tSECTION(\"UTF8Classify 2 byte valid character\") {\r\n\t\tREQUIRE(UTFClass(\"\\xD0\\x80\") == 2);\r\n\t}\r\n\r\n\t// 3 byte lead\r\n\r\n\tSECTION(\"UTF8Classify 3 byte lead, overlong\") {\r\n\t\tREQUIRE(UTFClass(\"\\xE0\\x80\\xAF\") == (1 | UTF8MaskInvalid));\r\n\t}\r\n\tSECTION(\"UTF8Classify 3 byte lead, surrogate\") {\r\n\t\tREQUIRE(UTFClass(\"\\xED\\xA0\\x80\") == (1 | UTF8MaskInvalid));\r\n\t}\r\n\tSECTION(\"UTF8Classify FFFE non-character\") {\r\n\t\tREQUIRE(UTFClass(\"\\xEF\\xBF\\xBE\") == (3 | UTF8MaskInvalid));\r\n\t}\r\n\tSECTION(\"UTF8Classify FFFF non-character\") {\r\n\t\tREQUIRE(UTFClass(\"\\xEF\\xBF\\xBF\") == (3 | UTF8MaskInvalid));\r\n\t}\r\n\tSECTION(\"UTF8Classify FDD0 non-character\") {\r\n\t\tREQUIRE(UTFClass(\"\\xEF\\xB7\\x90\") == (3 | UTF8MaskInvalid));\r\n\t}\r\n\tSECTION(\"UTF8Classify 3 byte valid character\") {\r\n\t\tREQUIRE(UTFClass(\"\\xE2\\x82\\xAC\") == 3);\r\n\t}\r\n\r\n\t// 4 byte lead\r\n\r\n\tSECTION(\"UTF8Classify 1FFFF non-character\") {\r\n\t\tREQUIRE(UTFClass(\"\\xF0\\x9F\\xBF\\xBF\") == (4 | UTF8MaskInvalid));\r\n\t}\r\n\tSECTION(\"UTF8Classify 1 Greater than max Unicode 110000\") {\r\n\t\t// Maximum Unicode value is 10FFFF so 110000 is out of range\r\n\t\tREQUIRE(UTFClass(\"\\xF4\\x90\\x80\\x80\") == (1 | UTF8MaskInvalid));\r\n\t}\r\n\tSECTION(\"UTF8Classify 4 byte overlong\") {\r\n\t\tREQUIRE(UTFClass(\"\\xF0\\x80\\x80\\x80\") == (1 | UTF8MaskInvalid));\r\n\t}\r\n\tSECTION(\"UTF8Classify 4 byte valid character\") {\r\n\t\tREQUIRE(UTFClass(\"\\xF0\\x9F\\x8C\\x90\") == 4);\r\n\t}\r\n\r\n\t// Invalid 2nd or 3rd continuation bytes\r\n\tSECTION(\"UTF8Classify 3 byte lead invalid 2nd trail\") {\r\n\t\tREQUIRE(UTFClass(\"\\xE2\\x82q\") == (1 | UTF8MaskInvalid));\r\n\t}\r\n\tSECTION(\"UTF8Classify 4 byte lead invalid 2nd trail\") {\r\n\t\tREQUIRE(UTFClass(\"\\xF0\\x9Fq\\x9F\") == (1 | UTF8MaskInvalid));\r\n\t}\r\n\tSECTION(\"UTF8Classify 4 byte lead invalid 3rd trail\") {\r\n\t\tREQUIRE(UTFClass(\"\\xF0\\x9F\\x9Fq\") == (1 | UTF8MaskInvalid));\r\n\t}\r\n}\r\n"
  },
  {
    "path": "scintilla/test/unit/unitTest.cxx",
    "content": "/** @file unitTest.cxx\r\n ** Unit Tests for Scintilla internal data structures\r\n **/\r\n\r\n/*\r\n    Currently tested:\r\n        SplitVector\r\n        Partitioning\r\n        RunStyles\r\n        ContractionState\r\n        CharClassify\r\n        Decoration\r\n        DecorationList\r\n        CellBuffer\r\n        UniConversion\r\n\r\n    To do:\r\n        PerLine *\r\n        Range\r\n        StyledText\r\n        CaseFolder ...\r\n        Document\r\n        RESearch\r\n        Selection\r\n        Style\r\n\r\n        lexlib:\r\n        Accessor\r\n        LexAccessor\r\n        CharacterSet\r\n        OptionSet\r\n        PropSetSimple\r\n        StyleContext\r\n*/\r\n\r\n#include <cstdio>\r\n#include <cstdarg>\r\n\r\n#include <string_view>\r\n#include <vector>\r\n#include <optional>\r\n#include <memory>\r\n\r\n#include \"Debugging.h\"\r\n\r\n#if defined(__GNUC__)\r\n// Want to avoid misleading indentation warnings in catch.hpp but the pragma\r\n// may not be available so protect by turning off pragma warnings\r\n#pragma GCC diagnostic ignored \"-Wunknown-pragmas\"\r\n#pragma GCC diagnostic ignored \"-Wpragmas\"\r\n#if !defined(__clang__)\r\n#pragma GCC diagnostic ignored \"-Wmisleading-indentation\"\r\n#endif\r\n#endif\r\n\r\n#define CATCH_CONFIG_MAIN  // This tells Catch to provide a main() - only do this in one cpp file\r\n#include \"catch.hpp\"\r\n\r\nusing namespace Scintilla::Internal;\r\n\r\n// Needed for PLATFORM_ASSERT in code being tested\r\n\r\nvoid Platform::Assert(const char *c, const char *file, int line) noexcept {\r\n\tfprintf(stderr, \"Assertion [%s] failed at %s %d\\n\", c, file, line);\r\n\tabort();\r\n}\r\n\r\nvoid Platform::DebugPrintf(const char *format, ...) noexcept {\r\n\tchar buffer[2000];\r\n\tva_list pArguments;\r\n\tva_start(pArguments, format);\r\n\tvsnprintf(buffer, std::size(buffer), format, pArguments);\r\n\tva_end(pArguments);\r\n\tfprintf(stderr, \"%s\", buffer);\r\n}\r\n"
  },
  {
    "path": "scintilla/test/win32Tests.py",
    "content": "#!/usr/bin/env python3\r\n# -*- coding: utf-8 -*-\r\n# Requires Python 2.7 or later\r\n\r\n# These are tests that run only on Win32 as they use Win32 SendMessage call\r\n# to send WM_* messages to Scintilla that are not implemented on other platforms.\r\n# These help Scintilla behave like a Win32 text control and can help screen readers,\r\n# for example.\r\n\r\nfrom __future__ import with_statement\r\nfrom __future__ import unicode_literals\r\n\r\nimport ctypes, unittest\r\n\r\nfrom MessageNumbers import msgs\r\n\r\nuser32 = ctypes.windll.user32\r\n\r\nimport XiteWin as Xite\r\n\r\nclass TestWins(unittest.TestCase):\r\n\r\n\tdef setUp(self):\r\n\t\tself.xite = Xite.xiteFrame\r\n\t\tself.ed = self.xite.ed\r\n\t\tself.sciHwnd = self.xite.sciHwnd\r\n\t\tself.ed.ClearAll()\r\n\t\tself.ed.EmptyUndoBuffer()\r\n\t\tself.ed.SetCodePage(0)\r\n\t\tself.ed.SetStatus(0)\r\n\r\n\t# Helper methods\r\n\r\n\tdef Send(self, msg, wp, lp):\r\n\t\treturn user32.SendMessageW(self.sciHwnd, msgs[msg], wp, lp)\r\n\r\n\tdef GetTextLength(self):\r\n\t\treturn self.Send(\"WM_GETTEXTLENGTH\", 0, 0)\r\n\r\n\tdef GetText(self, n, s):\r\n\t\t# n = The maximum number of characters to be copied, including the terminating null character.\r\n\t\t# returns the number of characters copied, not including the terminating null character\r\n\t\treturn self.Send(\"WM_GETTEXT\", n, s)\r\n\r\n\tdef TextValue(self):\r\n\t\tself.assertEqual(self.ed.GetStatus(), 0)\r\n\t\tlenValue = self.GetTextLength()\r\n\t\tlenValueWithNUL = lenValue + 1\r\n\t\tvalue = ctypes.create_unicode_buffer(lenValueWithNUL)\r\n\t\tlenData = self.GetText(lenValueWithNUL, value)\r\n\t\tself.assertEqual(self.ed.GetStatus(), 0)\r\n\t\tself.assertEqual(lenData, lenValue)\r\n\t\treturn value.value\r\n\r\n\tdef SetText(self, s):\r\n\t\treturn self.Send(\"WM_SETTEXT\", 0, s)\r\n\r\n\t# Tests\r\n\r\n\tdef testSetText(self):\r\n\t\tself.SetText(b\"ab\")\r\n\t\tself.assertEqual(self.ed.Length, 2)\r\n\r\n\tdef testGetTextLength(self):\r\n\t\tself.SetText(b\"ab\")\r\n\t\tself.assertEqual(self.GetTextLength(), 2)\r\n\r\n\tdef testGetText(self):\r\n\t\tself.SetText(b\"ab\")\r\n\t\tdata = ctypes.create_unicode_buffer(100)\r\n\t\tlenData = self.GetText(100, data)\r\n\t\tself.assertEqual(lenData, 2)\r\n\t\tself.assertEqual(len(data.value), 2)\r\n\t\tself.assertEqual(data.value, \"ab\")\r\n\r\n\tdef testGetUTF8Text(self):\r\n\t\tself.ed.SetCodePage(65001)\r\n\t\tt = \"å\"\r\n\t\ttu8 = t.encode(\"UTF-8\")\r\n\t\tself.SetText(tu8)\r\n\t\tvalue = self.TextValue()\r\n\t\tself.assertEqual(value, t)\r\n\r\n\tdef testGetBadUTF8Text(self):\r\n\t\tself.ed.SetCodePage(65001)\r\n\t\ttu8 = b't\\xc2'\r\n\t\tt = \"t\\xc2\"\r\n\t\tself.SetText(tu8)\r\n\t\tvalue = self.TextValue()\r\n\t\tself.assertEqual(len(value), 2)\r\n\t\tself.assertEqual(value, t)\r\n\r\n\tdef testGetJISText(self):\r\n\t\tself.ed.SetCodePage(932)\r\n\t\tt = \"\\N{HIRAGANA LETTER KA}\"\r\n\t\ttu8 = t.encode(\"shift-jis\")\r\n\t\tself.SetText(tu8)\r\n\t\tvalue = self.TextValue()\r\n\t\tself.assertEqual(len(value), 1)\r\n\t\tself.assertEqual(value, t)\r\n\r\n\tdef testGetBadJISText(self):\r\n\t\tself.ed.SetCodePage(932)\r\n\t\t# This is invalid Shift-JIS, surrounded by []\r\n\t\ttu8 = b'[\\x85\\xff]'\r\n\t\t# Win32 uses Katakana Middle Dot to indicate some invalid Shift-JIS text\r\n\t\t# At other times \\uF8F3 is used which is a private use area character\r\n\t\t# See https://unicodebook.readthedocs.io/operating_systems.html\r\n\t\tkatakanaMiddleDot = '[\\N{KATAKANA MIDDLE DOT}]'\r\n\t\tprivateBad = '[\\uf8f3]'\r\n\t\tself.SetText(tu8)\r\n\t\tvalue = self.TextValue()\r\n\t\tself.assertEqual(len(value), 3)\r\n\t\tself.assertEqual(value, katakanaMiddleDot)\r\n\r\n\t\t# This is even less valid Shift-JIS\r\n\t\ttu8 = b'[\\xff]'\r\n\t\tself.SetText(tu8)\r\n\t\tvalue = self.TextValue()\r\n\t\tself.assertEqual(len(value), 3)\r\n\t\tself.assertEqual(value, privateBad)\r\n\r\n\tdef testGetTextLong(self):\r\n\t\tself.assertEqual(self.ed.GetStatus(), 0)\r\n\t\tself.SetText(b\"ab\")\r\n\t\tdata = ctypes.create_unicode_buffer(100)\r\n\t\tlenData = self.GetText(4, data)\r\n\t\tself.assertEqual(self.ed.GetStatus(), 0)\r\n\t\tself.assertEqual(lenData, 2)\r\n\t\tself.assertEqual(data.value, \"ab\")\r\n\r\n\tdef testGetTextLongNonASCII(self):\r\n\t\t# With 1 multibyte character in document ask for 4 and ensure 1 character\r\n\t\t# returned correctly.\r\n\t\tself.ed.SetCodePage(65001)\r\n\t\tt = \"å\"\r\n\t\ttu8 = t.encode(\"UTF-8\")\r\n\t\tself.SetText(tu8)\r\n\t\tdata = ctypes.create_unicode_buffer(100)\r\n\t\tlenData = self.GetText(4, data)\r\n\t\tself.assertEqual(self.ed.GetStatus(), 0)\r\n\t\tself.assertEqual(lenData, 1)\r\n\t\tself.assertEqual(data.value, t)\r\n\r\n\tdef testGetTextShort(self):\r\n\t\tself.assertEqual(self.ed.GetStatus(), 0)\r\n\t\tself.SetText(b\"ab\")\r\n\t\tdata = ctypes.create_unicode_buffer(100)\r\n\t\tlenData = self.GetText(2, data)\r\n\t\tself.assertEqual(self.ed.GetStatus(), 0)\r\n\t\tself.assertEqual(lenData, 1)\r\n\t\tself.assertEqual(data.value, \"a\")\r\n\r\n\tdef testGetTextJustNUL(self):\r\n\t\tself.assertEqual(self.ed.GetStatus(), 0)\r\n\t\tself.SetText(b\"ab\")\r\n\t\tdata = ctypes.create_unicode_buffer(100)\r\n\t\tlenData = self.GetText(1, data)\r\n\t\tself.assertEqual(self.ed.GetStatus(), 0)\r\n\t\t#~ print(data)\r\n\t\tself.assertEqual(lenData, 0)\r\n\t\tself.assertEqual(data.value, \"\")\r\n\r\n\tdef testGetTextZeroLength(self):\r\n\t\tself.assertEqual(self.ed.GetStatus(), 0)\r\n\t\tself.SetText(b\"ab\")\r\n\t\tdata = ctypes.create_unicode_buffer(100)\r\n\t\tlenData = self.GetText(0, data)\r\n\t\tself.assertEqual(self.ed.GetStatus(), 0)\r\n\t\t#~ print(data)\r\n\t\tself.assertEqual(lenData, 0)\r\n\t\tself.assertEqual(data.value, \"\")\r\n\r\nif __name__ == '__main__':\r\n\tuu = Xite.main(\"win32Tests\")\r\n"
  },
  {
    "path": "scintilla/test/xite.py",
    "content": "#!/usr/bin/env python3\r\n# -*- coding: utf-8 -*-\r\n# Requires Python 3.6 or later\r\n\r\nimport XiteWin\r\n\r\nif __name__ == \"__main__\":\r\n\tXiteWin.main(\"\")\r\n"
  },
  {
    "path": "scintilla/tgzsrc",
    "content": "cd ..\nrm -f scintilla.tgz\ntar --create --exclude \\*.o --exclude \\*.obj --exclude \\*.dll --exclude \\*.so --exclude \\*.exe --exclude \\*.a scintilla/* \\\n\t| gzip -c >scintilla.tgz\n"
  },
  {
    "path": "scintilla/version.txt",
    "content": "550\r\n"
  },
  {
    "path": "scintilla/win32/DepGen.py",
    "content": "#!/usr/bin/env python3\r\n# DepGen.py - produce a make dependencies file for Scintilla\r\n# Copyright 2019 by Neil Hodgson <neilh@scintilla.org>\r\n# The License.txt file describes the conditions under which this software may be distributed.\r\n# Requires Python 3.6 or later\r\n\r\nimport sys\r\n\r\nsys.path.append(\"..\")\r\n\r\nfrom scripts import Dependencies\r\n\r\ntopComment = \"# Created by DepGen.py. To recreate, run DepGen.py.\\n\"\r\n\r\ndef Generate():\r\n\tsources = [\"../src/*.cxx\"]\r\n\tincludes = [\"../include\", \"../src\"]\r\n\r\n\t# Create the dependencies file for g++\r\n\tdeps = Dependencies.FindDependencies([\"../win32/*.cxx\"] + sources,  [\"../win32\"] + includes, \".o\", \"../win32/\")\r\n\r\n\t# Place the objects in $(DIR_O)\r\n\tdeps = [[\"$(DIR_O)/\"+obj, headers] for obj, headers in deps]\r\n\r\n\tDependencies.UpdateDependencies(\"../win32/deps.mak\", deps, topComment)\r\n\r\n\t# Create the dependencies file for MSVC\r\n\r\n\t# Place the objects in $(DIR_O) and change extension from \".o\" to \".obj\"\r\n\tdeps = [[\"$(DIR_O)/\"+Dependencies.PathStem(obj)+\".obj\", headers] for obj, headers in deps]\r\n\r\n\tDependencies.UpdateDependencies(\"../win32/nmdeps.mak\", deps, topComment)\r\n\r\nif __name__ == \"__main__\":\r\n\tGenerate()"
  },
  {
    "path": "scintilla/win32/HanjaDic.cxx",
    "content": "// Scintilla source code edit control\r\n/** @file HanjaDic.cxx\r\n ** Korean Hanja Dictionary\r\n ** Convert between Korean Hanja and Hangul by COM interface.\r\n **/\r\n// Copyright 2015 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#include <string>\r\n#include <string_view>\r\n#include <memory>\r\n\r\n#define WIN32_LEAN_AND_MEAN 1\r\n#include <windows.h>\r\n#include <ole2.h>\r\n\r\n#include \"WinTypes.h\"\r\n#include \"HanjaDic.h\"\r\n\r\nnamespace Scintilla::Internal::HanjaDict {\r\n\r\ninterface IRadical;\r\ninterface IHanja;\r\ninterface IStrokes;\r\n\r\nenum HANJA_TYPE { HANJA_UNKNOWN = 0, HANJA_K0 = 1, HANJA_K1 = 2, HANJA_OTHER = 3 };\r\n\r\ninterface IHanjaDic : IUnknown {\r\n\tSTDMETHOD(OpenMainDic)();\r\n\tSTDMETHOD(CloseMainDic)();\r\n\tSTDMETHOD(GetHanjaWords)(BSTR bstrHangul, SAFEARRAY* ppsaHanja, VARIANT_BOOL* pfFound);\r\n\tSTDMETHOD(GetHanjaChars)(unsigned short wchHangul, BSTR* pbstrHanjaChars, VARIANT_BOOL* pfFound);\r\n\tSTDMETHOD(HanjaToHangul)(BSTR bstrHanja, BSTR* pbstrHangul);\r\n\tSTDMETHOD(GetHanjaType)(unsigned short wchHanja, HANJA_TYPE* pHanjaType);\r\n\tSTDMETHOD(GetHanjaSense)(unsigned short wchHanja, BSTR* pbstrSense);\r\n\tSTDMETHOD(GetRadicalID)(short SeqNumOfRadical, short* pRadicalID, unsigned short* pwchRadical);\r\n\tSTDMETHOD(GetRadical)(short nRadicalID, IRadical** ppIRadical);\r\n\tSTDMETHOD(RadicalIDToHanja)(short nRadicalID, unsigned short* pwchRadical);\r\n\tSTDMETHOD(GetHanja)(unsigned short wchHanja, IHanja** ppIHanja);\r\n\tSTDMETHOD(GetStrokes)(short nStrokes, IStrokes** ppIStrokes);\r\n\tSTDMETHOD(OpenDefaultCustomDic)();\r\n\tSTDMETHOD(OpenCustomDic)(BSTR bstrPath, long* plUdr);\r\n\tSTDMETHOD(CloseDefaultCustomDic)();\r\n\tSTDMETHOD(CloseCustomDic)(long lUdr);\r\n\tSTDMETHOD(CloseAllCustomDics)();\r\n\tSTDMETHOD(GetDefaultCustomHanjaWords)(BSTR bstrHangul, SAFEARRAY** ppsaHanja, VARIANT_BOOL* pfFound);\r\n\tSTDMETHOD(GetCustomHanjaWords)(long lUdr, BSTR bstrHangul, SAFEARRAY** ppsaHanja, VARIANT_BOOL* pfFound);\r\n\tSTDMETHOD(PutDefaultCustomHanjaWord)(BSTR bstrHangul, BSTR bstrHanja);\r\n\tSTDMETHOD(PutCustomHanjaWord)(long lUdr, BSTR bstrHangul, BSTR bstrHanja);\r\n\tSTDMETHOD(MaxNumOfRadicals)(short* pVal);\r\n\tSTDMETHOD(MaxNumOfStrokes)(short* pVal);\r\n\tSTDMETHOD(DefaultCustomDic)(long* pVal);\r\n\tSTDMETHOD(DefaultCustomDic)(long pVal);\r\n\tSTDMETHOD(MaxHanjaType)(HANJA_TYPE* pHanjaType);\r\n\tSTDMETHOD(MaxHanjaType)(HANJA_TYPE pHanjaType);\r\n};\r\n\r\nextern \"C\" const GUID __declspec(selectany) IID_IHanjaDic =\r\n{ 0xad75f3ac, 0x18cd, 0x48c6, { 0xa2, 0x7d, 0xf1, 0xe9, 0xa7, 0xdc, 0xe4, 0x32 } };\r\n\r\nclass ScopedBSTR {\r\n\tBSTR bstr = nullptr;\r\npublic:\r\n\tScopedBSTR() noexcept = default;\r\n\texplicit ScopedBSTR(const OLECHAR *psz) noexcept :\r\n\t\tbstr(SysAllocString(psz)) {\r\n\t}\r\n\texplicit ScopedBSTR(OLECHAR character) noexcept :\r\n\t\tbstr(SysAllocStringLen(&character, 1)) {\r\n\t}\r\n\t// Deleted so ScopedBSTR objects can not be copied. Moves are OK.\r\n\tScopedBSTR(const ScopedBSTR &) = delete;\r\n\tScopedBSTR &operator=(const ScopedBSTR &) = delete;\r\n\t// Moves are OK.\r\n\tScopedBSTR(ScopedBSTR &&) = default;\r\n\tScopedBSTR &operator=(ScopedBSTR &&) = default;\r\n\t~ScopedBSTR() {\r\n\t\tSysFreeString(bstr);\r\n\t}\r\n\r\n\tBSTR get() const noexcept {\r\n\t\treturn bstr;\r\n\t}\r\n\tvoid reset(BSTR value=nullptr) noexcept {\r\n\t\t// https://en.cppreference.com/w/cpp/memory/unique_ptr/reset\r\n\t\tBSTR const old = bstr;\r\n\t\tbstr = value;\r\n\t\tSysFreeString(old);\r\n\t}\r\n};\r\n\r\nclass HanjaDic {\r\n\tstd::unique_ptr<IHanjaDic, UnknownReleaser> HJinterface;\r\n\r\n\tbool OpenHanjaDic(LPCOLESTR lpszProgID) noexcept {\r\n\t\tCLSID CLSID_HanjaDic;\r\n\t\tHRESULT hr = CLSIDFromProgID(lpszProgID, &CLSID_HanjaDic);\r\n\t\tif (SUCCEEDED(hr)) {\r\n\t\t\tIHanjaDic *instance = nullptr;\r\n\t\t\thr = CoCreateInstance(CLSID_HanjaDic, nullptr,\r\n\t\t\t\tCLSCTX_INPROC_SERVER, IID_IHanjaDic,\r\n\t\t\t\treinterpret_cast<LPVOID *>(&instance));\r\n\t\t\tif (SUCCEEDED(hr) && instance) {\r\n\t\t\t\tHJinterface.reset(instance);\r\n\t\t\t\thr = instance->OpenMainDic();\r\n\t\t\t\treturn SUCCEEDED(hr);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\npublic:\r\n\tbool Open() noexcept {\r\n\t\treturn OpenHanjaDic(OLESTR(\"imkrhjd.hanjadic\"))\r\n\t\t\t|| OpenHanjaDic(OLESTR(\"mshjdic.hanjadic\"));\r\n\t}\r\n\r\n\tvoid Close() const noexcept {\r\n\t\tHJinterface->CloseMainDic();\r\n\t}\r\n\r\n\tbool IsHanja(wchar_t hanja) const noexcept {\r\n\t\tHANJA_TYPE hanjaType = HANJA_UNKNOWN;\r\n\t\tconst HRESULT hr = HJinterface->GetHanjaType(hanja, &hanjaType);\r\n\t\treturn SUCCEEDED(hr) && hanjaType > HANJA_UNKNOWN;\r\n\t}\r\n\r\n\tbool HanjaToHangul(const ScopedBSTR &bstrHanja, ScopedBSTR &bstrHangul) const noexcept {\r\n\t\tBSTR result = nullptr;\r\n\t\tconst HRESULT hr = HJinterface->HanjaToHangul(bstrHanja.get(), &result);\r\n\t\tbstrHangul.reset(result);\r\n\t\treturn SUCCEEDED(hr);\r\n\t}\r\n};\r\n\r\nbool GetHangulOfHanja(std::wstring &inout) noexcept {\r\n\t// Convert every hanja to hangul.\r\n\t// Return whether any character been converted.\r\n\t// Hanja linked to different notes in Hangul have different codes,\r\n\t// so current character based conversion is enough.\r\n\t// great thanks for BLUEnLIVE.\r\n\tbool changed = false;\r\n\tHanjaDic dict;\r\n\tif (dict.Open()) {\r\n\t\tfor (wchar_t &character : inout) {\r\n\t\t\tif (dict.IsHanja(character)) { // Pass hanja only!\r\n\t\t\t\tScopedBSTR bstrHangul;\r\n\t\t\t\tif (dict.HanjaToHangul(ScopedBSTR(character), bstrHangul)) {\r\n\t\t\t\t\tchanged = true;\r\n\t\t\t\t\tcharacter = *(bstrHangul.get());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tdict.Close();\r\n\t}\r\n\treturn changed;\r\n}\r\n\r\n}\r\n"
  },
  {
    "path": "scintilla/win32/HanjaDic.h",
    "content": "// Scintilla source code edit control\r\n/** @file HanjaDic.h\r\n ** Korean Hanja Dictionary\r\n ** Convert between Korean Hanja and Hangul by COM interface.\r\n **/\r\n// Copyright 2015 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef HANJADIC_H\r\n#define HANJADIC_H\r\n\r\nnamespace Scintilla::Internal {\r\n\r\nnamespace HanjaDict {\r\n\r\nbool GetHangulOfHanja(std::wstring &inout) noexcept;\r\n\r\n}\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/win32/PlatWin.cxx",
    "content": "// Scintilla source code edit control\r\n/** @file PlatWin.cxx\r\n ** Implementation of platform facilities on Windows.\r\n **/\r\n// Copyright 1998-2003 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#include <cstddef>\r\n#include <cstdlib>\r\n#include <cstring>\r\n#include <cstdio>\r\n#include <cstdarg>\r\n#include <ctime>\r\n#include <cmath>\r\n#include <climits>\r\n\r\n#include <string_view>\r\n#include <vector>\r\n#include <map>\r\n#include <optional>\r\n#include <algorithm>\r\n#include <iterator>\r\n#include <memory>\r\n#include <mutex>\r\n\r\n// Want to use std::min and std::max so don't want Windows.h version of min and max\r\n#if !defined(NOMINMAX)\r\n#define NOMINMAX\r\n#endif\r\n#undef _WIN32_WINNT\r\n#define _WIN32_WINNT 0x0A00\r\n#undef WINVER\r\n#define WINVER 0x0A00\r\n#define WIN32_LEAN_AND_MEAN 1\r\n#include <windows.h>\r\n#include <commctrl.h>\r\n#include <richedit.h>\r\n#include <windowsx.h>\r\n#include <shellscalingapi.h>\r\n\r\n#if !defined(DISABLE_D2D)\r\n#define USE_D2D 1\r\n#endif\r\n\r\n#if defined(USE_D2D)\r\n#include <d2d1.h>\r\n#include <dwrite.h>\r\n#endif\r\n\r\n#include \"ScintillaTypes.h\"\r\n\r\n#include \"Debugging.h\"\r\n#include \"Geometry.h\"\r\n#include \"Platform.h\"\r\n#include \"XPM.h\"\r\n#include \"UniConversion.h\"\r\n#include \"DBCS.h\"\r\n\r\n#include \"WinTypes.h\"\r\n#include \"PlatWin.h\"\r\n\r\n// __uuidof is a Microsoft extension but makes COM code neater, so disable warning\r\n#if defined(__clang__)\r\n#pragma clang diagnostic ignored \"-Wlanguage-extension-token\"\r\n#endif\r\n\r\nusing namespace Scintilla;\r\n\r\nnamespace Scintilla::Internal {\r\n\r\nUINT CodePageFromCharSet(CharacterSet characterSet, UINT documentCodePage) noexcept;\r\n\r\n#if defined(USE_D2D)\r\nIDWriteFactory *pIDWriteFactory = nullptr;\r\nID2D1Factory *pD2DFactory = nullptr;\r\nD2D1_DRAW_TEXT_OPTIONS d2dDrawTextOptions = D2D1_DRAW_TEXT_OPTIONS_NONE;\r\n\r\nstatic HMODULE hDLLD2D {};\r\nstatic HMODULE hDLLDWrite {};\r\n\r\nvoid LoadD2DOnce() noexcept {\r\n\tDWORD loadLibraryFlags = 0;\r\n\tHMODULE kernel32 = ::GetModuleHandleW(L\"kernel32.dll\");\r\n\tif (kernel32) {\r\n\t\tif (::GetProcAddress(kernel32, \"SetDefaultDllDirectories\")) {\r\n\t\t\t// Availability of SetDefaultDllDirectories implies Windows 8+ or\r\n\t\t\t// that KB2533623 has been installed so LoadLibraryEx can be called\r\n\t\t\t// with LOAD_LIBRARY_SEARCH_SYSTEM32.\r\n\t\t\tloadLibraryFlags = LOAD_LIBRARY_SEARCH_SYSTEM32;\r\n\t\t}\r\n\t}\r\n\r\n\ttypedef HRESULT (WINAPI *D2D1CFSig)(D2D1_FACTORY_TYPE factoryType, REFIID riid,\r\n\t\tCONST D2D1_FACTORY_OPTIONS *pFactoryOptions, IUnknown **factory);\r\n\ttypedef HRESULT (WINAPI *DWriteCFSig)(DWRITE_FACTORY_TYPE factoryType, REFIID iid,\r\n\t\tIUnknown **factory);\r\n\r\n\thDLLD2D = ::LoadLibraryEx(TEXT(\"D2D1.DLL\"), 0, loadLibraryFlags);\r\n\tD2D1CFSig fnD2DCF = DLLFunction<D2D1CFSig>(hDLLD2D, \"D2D1CreateFactory\");\r\n\tif (fnD2DCF) {\r\n\t\t// A multi threaded factory in case Scintilla is used with multiple GUI threads\r\n\t\tfnD2DCF(D2D1_FACTORY_TYPE_MULTI_THREADED,\r\n\t\t\t__uuidof(ID2D1Factory),\r\n\t\t\tnullptr,\r\n\t\t\treinterpret_cast<IUnknown**>(&pD2DFactory));\r\n\t}\r\n\thDLLDWrite = ::LoadLibraryEx(TEXT(\"DWRITE.DLL\"), 0, loadLibraryFlags);\r\n\tDWriteCFSig fnDWCF = DLLFunction<DWriteCFSig>(hDLLDWrite, \"DWriteCreateFactory\");\r\n\tif (fnDWCF) {\r\n\t\tconst GUID IID_IDWriteFactory2 = // 0439fc60-ca44-4994-8dee-3a9af7b732ec\r\n\t\t{ 0x0439fc60, 0xca44, 0x4994, { 0x8d, 0xee, 0x3a, 0x9a, 0xf7, 0xb7, 0x32, 0xec } };\r\n\r\n\t\tconst HRESULT hr = fnDWCF(DWRITE_FACTORY_TYPE_SHARED,\r\n\t\t\tIID_IDWriteFactory2,\r\n\t\t\treinterpret_cast<IUnknown**>(&pIDWriteFactory));\r\n\t\tif (SUCCEEDED(hr)) {\r\n\t\t\t// D2D1_DRAW_TEXT_OPTIONS_ENABLE_COLOR_FONT\r\n\t\t\td2dDrawTextOptions = static_cast<D2D1_DRAW_TEXT_OPTIONS>(0x00000004);\r\n\t\t} else {\r\n\t\t\tfnDWCF(DWRITE_FACTORY_TYPE_SHARED,\r\n\t\t\t\t__uuidof(IDWriteFactory),\r\n\t\t\t\treinterpret_cast<IUnknown**>(&pIDWriteFactory));\r\n\t\t}\r\n\t}\r\n}\r\n\r\nbool LoadD2D() {\r\n\tstatic std::once_flag once;\r\n\tstd::call_once(once, LoadD2DOnce);\r\n\treturn pIDWriteFactory && pD2DFactory;\r\n}\r\n\r\n#endif\r\n\r\nvoid *PointerFromWindow(HWND hWnd) noexcept {\r\n\treturn reinterpret_cast<void *>(::GetWindowLongPtr(hWnd, 0));\r\n}\r\n\r\nvoid SetWindowPointer(HWND hWnd, void *ptr) noexcept {\r\n\t::SetWindowLongPtr(hWnd, 0, reinterpret_cast<LONG_PTR>(ptr));\r\n}\r\n\r\nnamespace {\r\n\r\n// system DPI, same for all monitor.\r\nUINT uSystemDPI = USER_DEFAULT_SCREEN_DPI;\r\n\r\nusing GetDpiForWindowSig = UINT(WINAPI *)(HWND hwnd);\r\nGetDpiForWindowSig fnGetDpiForWindow = nullptr;\r\n\r\nHMODULE hDLLShcore {};\r\nusing GetDpiForMonitorSig = HRESULT (WINAPI *)(HMONITOR hmonitor, /*MONITOR_DPI_TYPE*/int dpiType, UINT *dpiX, UINT *dpiY);\r\nGetDpiForMonitorSig fnGetDpiForMonitor = nullptr;\r\n\r\nusing GetSystemMetricsForDpiSig = int(WINAPI *)(int nIndex, UINT dpi);\r\nGetSystemMetricsForDpiSig fnGetSystemMetricsForDpi = nullptr;\r\n\r\nusing AdjustWindowRectExForDpiSig = BOOL(WINAPI *)(LPRECT lpRect, DWORD dwStyle, BOOL bMenu, DWORD dwExStyle, UINT dpi);\r\nAdjustWindowRectExForDpiSig fnAdjustWindowRectExForDpi = nullptr;\r\n\r\nusing AreDpiAwarenessContextsEqualSig = BOOL(WINAPI *)(DPI_AWARENESS_CONTEXT, DPI_AWARENESS_CONTEXT);\r\nAreDpiAwarenessContextsEqualSig fnAreDpiAwarenessContextsEqual = nullptr;\r\n\r\nusing GetWindowDpiAwarenessContextSig = DPI_AWARENESS_CONTEXT(WINAPI *)(HWND);\r\nGetWindowDpiAwarenessContextSig fnGetWindowDpiAwarenessContext = nullptr;\r\n\r\nusing GetScaleFactorForMonitorSig = HRESULT(WINAPI *)(HMONITOR, DEVICE_SCALE_FACTOR *);\r\nGetScaleFactorForMonitorSig fnGetScaleFactorForMonitor = nullptr;\r\n\r\nusing GetThreadDpiAwarenessContextSig = DPI_AWARENESS_CONTEXT(WINAPI *)();\r\nGetThreadDpiAwarenessContextSig fnGetThreadDpiAwarenessContext = nullptr;\r\n\r\nusing SetThreadDpiAwarenessContextSig = DPI_AWARENESS_CONTEXT(WINAPI *)(DPI_AWARENESS_CONTEXT);\r\nSetThreadDpiAwarenessContextSig fnSetThreadDpiAwarenessContext = nullptr;\r\n\r\nvoid LoadDpiForWindow() noexcept {\r\n\tHMODULE user32 = ::GetModuleHandleW(L\"user32.dll\");\r\n\tfnGetDpiForWindow = DLLFunction<GetDpiForWindowSig>(user32, \"GetDpiForWindow\");\r\n\tfnGetSystemMetricsForDpi = DLLFunction<GetSystemMetricsForDpiSig>(user32, \"GetSystemMetricsForDpi\");\r\n\tfnAdjustWindowRectExForDpi = DLLFunction<AdjustWindowRectExForDpiSig>(user32, \"AdjustWindowRectExForDpi\");\r\n\tfnGetThreadDpiAwarenessContext = DLLFunction<GetThreadDpiAwarenessContextSig>(user32, \"GetThreadDpiAwarenessContext\");\r\n\tfnSetThreadDpiAwarenessContext = DLLFunction<SetThreadDpiAwarenessContextSig>(user32, \"SetThreadDpiAwarenessContext\");\r\n\r\n\tusing GetDpiForSystemSig = UINT(WINAPI *)(void);\r\n\tGetDpiForSystemSig fnGetDpiForSystem = DLLFunction<GetDpiForSystemSig>(user32, \"GetDpiForSystem\");\r\n\tif (fnGetDpiForSystem) {\r\n\t\tuSystemDPI = fnGetDpiForSystem();\r\n\t} else {\r\n\t\tHDC hdcMeasure = ::CreateCompatibleDC({});\r\n\t\tuSystemDPI = ::GetDeviceCaps(hdcMeasure, LOGPIXELSY);\r\n\t\t::DeleteDC(hdcMeasure);\r\n\t}\r\n\r\n\tfnGetWindowDpiAwarenessContext = DLLFunction<GetWindowDpiAwarenessContextSig>(user32, \"GetWindowDpiAwarenessContext\");\r\n\tfnAreDpiAwarenessContextsEqual = DLLFunction<AreDpiAwarenessContextsEqualSig>(user32, \"AreDpiAwarenessContextsEqual\");\r\n\r\n\thDLLShcore = ::LoadLibraryExW(L\"shcore.dll\", {}, LOAD_LIBRARY_SEARCH_SYSTEM32);\r\n\tif (hDLLShcore) {\r\n\t\tfnGetScaleFactorForMonitor = DLLFunction<GetScaleFactorForMonitorSig>(hDLLShcore, \"GetScaleFactorForMonitor\");\r\n\t\tfnGetDpiForMonitor = DLLFunction<GetDpiForMonitorSig>(hDLLShcore, \"GetDpiForMonitor\");\r\n\t}\r\n}\r\n\r\nHINSTANCE hinstPlatformRes {};\r\n\r\nconstexpr Supports SupportsGDI[] = {\r\n\tSupports::PixelModification,\r\n};\r\n\r\nconstexpr BYTE Win32MapFontQuality(FontQuality extraFontFlag) noexcept {\r\n\tswitch (extraFontFlag & FontQuality::QualityMask) {\r\n\r\n\t\tcase FontQuality::QualityNonAntialiased:\r\n\t\t\treturn NONANTIALIASED_QUALITY;\r\n\r\n\t\tcase FontQuality::QualityAntialiased:\r\n\t\t\treturn ANTIALIASED_QUALITY;\r\n\r\n\t\tcase FontQuality::QualityLcdOptimized:\r\n\t\t\treturn CLEARTYPE_QUALITY;\r\n\r\n\t\tdefault:\r\n\t\t\treturn DEFAULT_QUALITY;\r\n\t}\r\n}\r\n\r\n#if defined(USE_D2D)\r\nconstexpr D2D1_TEXT_ANTIALIAS_MODE DWriteMapFontQuality(FontQuality extraFontFlag) noexcept {\r\n\tswitch (extraFontFlag & FontQuality::QualityMask) {\r\n\r\n\t\tcase FontQuality::QualityNonAntialiased:\r\n\t\t\treturn D2D1_TEXT_ANTIALIAS_MODE_ALIASED;\r\n\r\n\t\tcase FontQuality::QualityAntialiased:\r\n\t\t\treturn D2D1_TEXT_ANTIALIAS_MODE_GRAYSCALE;\r\n\r\n\t\tcase FontQuality::QualityLcdOptimized:\r\n\t\t\treturn D2D1_TEXT_ANTIALIAS_MODE_CLEARTYPE;\r\n\r\n\t\tdefault:\r\n\t\t\treturn D2D1_TEXT_ANTIALIAS_MODE_DEFAULT;\r\n\t}\r\n}\r\n#endif\r\n\r\n// Both GDI and DirectWrite can produce a HFONT for use in list boxes\r\nstruct FontWin : public Font {\r\n\tvirtual HFONT HFont() const noexcept = 0;\r\n};\r\n\r\nvoid SetLogFont(LOGFONTW &lf, const char *faceName, CharacterSet characterSet, XYPOSITION size, FontWeight weight, bool italic, FontQuality extraFontFlag) {\r\n\tlf = LOGFONTW();\r\n\t// The negative is to allow for leading\r\n\tlf.lfHeight = -(std::abs(std::lround(size)));\r\n\tlf.lfWeight = static_cast<LONG>(weight);\r\n\tlf.lfItalic = italic ? 1 : 0;\r\n\tlf.lfCharSet = static_cast<BYTE>(characterSet);\r\n\tlf.lfQuality = Win32MapFontQuality(extraFontFlag);\r\n\tUTF16FromUTF8(faceName, lf.lfFaceName, LF_FACESIZE);\r\n}\r\n\r\nstruct FontGDI : public FontWin {\r\n\tHFONT hfont = {};\r\n\tFontGDI(const FontParameters &fp) {\r\n\t\tLOGFONTW lf;\r\n\t\tSetLogFont(lf, fp.faceName, fp.characterSet, fp.size, fp.weight, fp.italic, fp.extraFontFlag);\r\n\t\thfont = ::CreateFontIndirectW(&lf);\r\n\t}\r\n\t// Deleted so FontGDI objects can not be copied.\r\n\tFontGDI(const FontGDI &) = delete;\r\n\tFontGDI(FontGDI &&) = delete;\r\n\tFontGDI &operator=(const FontGDI &) = delete;\r\n\tFontGDI &operator=(FontGDI &&) = delete;\r\n\t~FontGDI() noexcept override {\r\n\t\tif (hfont)\r\n\t\t\t::DeleteObject(hfont);\r\n\t}\r\n\tHFONT HFont() const noexcept override {\r\n\t\t// Duplicating hfont\r\n\t\tLOGFONTW lf = {};\r\n\t\tif (0 == ::GetObjectW(hfont, sizeof(lf), &lf)) {\r\n\t\t\treturn {};\r\n\t\t}\r\n\t\treturn ::CreateFontIndirectW(&lf);\r\n\t}\r\n};\r\n\r\n#if defined(USE_D2D)\r\nstruct FontDirectWrite : public FontWin {\r\n\tIDWriteTextFormat *pTextFormat = nullptr;\r\n\tFontQuality extraFontFlag = FontQuality::QualityDefault;\r\n\tCharacterSet characterSet = CharacterSet::Ansi;\r\n\tFLOAT yAscent = 2.0f;\r\n\tFLOAT yDescent = 1.0f;\r\n\tFLOAT yInternalLeading = 0.0f;\r\n\r\n\tFontDirectWrite(const FontParameters &fp) :\r\n\t\textraFontFlag(fp.extraFontFlag),\r\n\t\tcharacterSet(fp.characterSet) {\r\n\t\tconst std::wstring wsFace = WStringFromUTF8(fp.faceName);\r\n\t\tconst std::wstring wsLocale = WStringFromUTF8(fp.localeName);\r\n\t\tconst FLOAT fHeight = static_cast<FLOAT>(fp.size);\r\n\t\tconst DWRITE_FONT_STYLE style = fp.italic ? DWRITE_FONT_STYLE_ITALIC : DWRITE_FONT_STYLE_NORMAL;\r\n\t\tHRESULT hr = pIDWriteFactory->CreateTextFormat(wsFace.c_str(), nullptr,\r\n\t\t\tstatic_cast<DWRITE_FONT_WEIGHT>(fp.weight),\r\n\t\t\tstyle,\r\n\t\t\tDWRITE_FONT_STRETCH_NORMAL, fHeight, wsLocale.c_str(), &pTextFormat);\r\n\t\tif (hr == E_INVALIDARG) {\r\n\t\t\t// Possibly a bad locale name like \"/\" so try \"en-us\".\r\n\t\t\thr = pIDWriteFactory->CreateTextFormat(wsFace.c_str(), nullptr,\r\n\t\t\t\tstatic_cast<DWRITE_FONT_WEIGHT>(fp.weight),\r\n\t\t\t\tstyle,\r\n\t\t\t\tDWRITE_FONT_STRETCH_NORMAL, fHeight, L\"en-us\", &pTextFormat);\r\n\t\t}\r\n\t\tif (SUCCEEDED(hr)) {\r\n\t\t\tpTextFormat->SetWordWrapping(DWRITE_WORD_WRAPPING_NO_WRAP);\r\n\r\n\t\t\tIDWriteTextLayout *pTextLayout = nullptr;\r\n\t\t\thr = pIDWriteFactory->CreateTextLayout(L\"X\", 1, pTextFormat,\r\n\t\t\t\t\t100.0f, 100.0f, &pTextLayout);\r\n\t\t\tif (SUCCEEDED(hr) && pTextLayout) {\r\n\t\t\t\tconstexpr int maxLines = 2;\r\n\t\t\t\tDWRITE_LINE_METRICS lineMetrics[maxLines]{};\r\n\t\t\t\tUINT32 lineCount = 0;\r\n\t\t\t\thr = pTextLayout->GetLineMetrics(lineMetrics, maxLines, &lineCount);\r\n\t\t\t\tif (SUCCEEDED(hr)) {\r\n\t\t\t\t\tyAscent = lineMetrics[0].baseline;\r\n\t\t\t\t\tyDescent = lineMetrics[0].height - lineMetrics[0].baseline;\r\n\r\n\t\t\t\t\tFLOAT emHeight;\r\n\t\t\t\t\thr = pTextLayout->GetFontSize(0, &emHeight);\r\n\t\t\t\t\tif (SUCCEEDED(hr)) {\r\n\t\t\t\t\t\tyInternalLeading = lineMetrics[0].height - emHeight;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tReleaseUnknown(pTextLayout);\r\n\t\t\t\tpTextFormat->SetLineSpacing(DWRITE_LINE_SPACING_METHOD_UNIFORM, lineMetrics[0].height, lineMetrics[0].baseline);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t// Deleted so FontDirectWrite objects can not be copied.\r\n\tFontDirectWrite(const FontDirectWrite &) = delete;\r\n\tFontDirectWrite(FontDirectWrite &&) = delete;\r\n\tFontDirectWrite &operator=(const FontDirectWrite &) = delete;\r\n\tFontDirectWrite &operator=(FontDirectWrite &&) = delete;\r\n\t~FontDirectWrite() noexcept override {\r\n\t\tReleaseUnknown(pTextFormat);\r\n\t}\r\n\tHFONT HFont() const noexcept override {\r\n\t\tLOGFONTW lf = {};\r\n\t\tconst HRESULT hr = pTextFormat->GetFontFamilyName(lf.lfFaceName, LF_FACESIZE);\r\n\t\tif (!SUCCEEDED(hr)) {\r\n\t\t\treturn {};\r\n\t\t}\r\n\t\tlf.lfWeight = pTextFormat->GetFontWeight();\r\n\t\tlf.lfItalic = pTextFormat->GetFontStyle() == DWRITE_FONT_STYLE_ITALIC;\r\n\t\tlf.lfHeight = -static_cast<int>(pTextFormat->GetFontSize());\r\n\t\treturn ::CreateFontIndirectW(&lf);\r\n\t}\r\n\r\n\tint CodePageText(int codePage) const noexcept {\r\n\t\tif (!(codePage == CpUtf8) && (characterSet != CharacterSet::Ansi)) {\r\n\t\t\tcodePage = CodePageFromCharSet(characterSet, codePage);\r\n\t\t}\r\n\t\treturn codePage;\r\n\t}\r\n\r\n\tstatic const FontDirectWrite *Cast(const Font *font_) {\r\n\t\tconst FontDirectWrite *pfm = dynamic_cast<const FontDirectWrite *>(font_);\r\n\t\tPLATFORM_ASSERT(pfm);\r\n\t\tif (!pfm) {\r\n\t\t\tthrow std::runtime_error(\"SurfaceD2D::SetFont: wrong Font type.\");\r\n\t\t}\r\n\t\treturn pfm;\r\n\t}\r\n};\r\n#endif\r\n\r\n}\r\n\r\nHMONITOR MonitorFromWindowHandleScaling(HWND hWnd) noexcept {\r\n\tconstexpr DWORD monitorFlags = MONITOR_DEFAULTTONEAREST;\r\n\r\n\tif (!fnSetThreadDpiAwarenessContext) {\r\n\t\treturn ::MonitorFromWindow(hWnd, monitorFlags);\r\n\t}\r\n\r\n\t// Temporarily switching to PerMonitorV2 to retrieve correct monitor via MonitorFromRect() in case of active GDI scaling.\r\n\tconst DPI_AWARENESS_CONTEXT oldContext = fnSetThreadDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2);\r\n\tPLATFORM_ASSERT(oldContext != nullptr);\r\n\r\n\tRECT rect;\r\n\t::GetWindowRect(hWnd, &rect);\r\n\tconst HMONITOR monitor = ::MonitorFromRect(&rect, monitorFlags);\r\n\r\n\tfnSetThreadDpiAwarenessContext(oldContext);\r\n\treturn monitor;\r\n}\r\n\r\nfloat GetDeviceScaleFactorWhenGdiScalingActive(HWND hWnd) noexcept {\r\n\tif (fnAreDpiAwarenessContextsEqual) {\r\n\t\tPLATFORM_ASSERT(fnGetWindowDpiAwarenessContext && fnGetScaleFactorForMonitor);\r\n\t\tif (fnAreDpiAwarenessContextsEqual(DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED, fnGetWindowDpiAwarenessContext(hWnd))) {\r\n\t\t\tconst HWND hRootWnd = ::GetAncestor(hWnd, GA_ROOT); // Scale factor applies to entire (root) window.\r\n\t\t\tconst HMONITOR hMonitor = MonitorFromWindowHandleScaling(hRootWnd);\r\n\t\t\tDEVICE_SCALE_FACTOR deviceScaleFactor;\r\n\t\t\tif (S_OK == fnGetScaleFactorForMonitor(hMonitor, &deviceScaleFactor))\r\n\t\t\t\treturn static_cast<int>(deviceScaleFactor) / 100.f;\r\n\t\t}\r\n\t}\r\n\treturn 1.f;\r\n}\r\n\r\nstd::shared_ptr<Font> Font::Allocate(const FontParameters &fp) {\r\n#if defined(USE_D2D)\r\n\tif (fp.technology != Technology::Default) {\r\n\t\treturn std::make_shared<FontDirectWrite>(fp);\r\n\t}\r\n#endif\r\n\treturn std::make_shared<FontGDI>(fp);\r\n}\r\n\r\n// Buffer to hold strings and string position arrays without always allocating on heap.\r\n// May sometimes have string too long to allocate on stack. So use a fixed stack-allocated buffer\r\n// when less than safe size otherwise allocate on heap and free automatically.\r\ntemplate<typename T, int lengthStandard>\r\nclass VarBuffer {\r\n\tT bufferStandard[lengthStandard];\r\npublic:\r\n\tT *buffer;\r\n\texplicit VarBuffer(size_t length) : buffer(nullptr) {\r\n\t\tif (length > lengthStandard) {\r\n\t\t\tbuffer = new T[length];\r\n\t\t} else {\r\n\t\t\tbuffer = bufferStandard;\r\n\t\t}\r\n\t}\r\n\t// Deleted so VarBuffer objects can not be copied.\r\n\tVarBuffer(const VarBuffer &) = delete;\r\n\tVarBuffer(VarBuffer &&) = delete;\r\n\tVarBuffer &operator=(const VarBuffer &) = delete;\r\n\tVarBuffer &operator=(VarBuffer &&) = delete;\r\n\r\n\t~VarBuffer() noexcept {\r\n\t\tif (buffer != bufferStandard) {\r\n\t\t\tdelete []buffer;\r\n\t\t\tbuffer = nullptr;\r\n\t\t}\r\n\t}\r\n};\r\n\r\nconstexpr int stackBufferLength = 400;\r\nclass TextWide : public VarBuffer<wchar_t, stackBufferLength> {\r\npublic:\r\n\tint tlen;\t// Using int instead of size_t as most Win32 APIs take int.\r\n\tTextWide(std::string_view text, int codePage) :\r\n\t\tVarBuffer<wchar_t, stackBufferLength>(text.length()) {\r\n\t\tif (codePage == CpUtf8) {\r\n\t\t\ttlen = static_cast<int>(UTF16FromUTF8(text, buffer, text.length()));\r\n\t\t} else {\r\n\t\t\t// Support Asian string display in 9x English\r\n\t\t\ttlen = ::MultiByteToWideChar(codePage, 0, text.data(), static_cast<int>(text.length()),\r\n\t\t\t\tbuffer, static_cast<int>(text.length()));\r\n\t\t}\r\n\t}\r\n};\r\ntypedef VarBuffer<XYPOSITION, stackBufferLength> TextPositions;\r\n\r\nUINT DpiForWindow(WindowID wid) noexcept {\r\n\tif (fnGetDpiForWindow) {\r\n\t\treturn fnGetDpiForWindow(HwndFromWindowID(wid));\r\n\t}\r\n\tif (fnGetDpiForMonitor) {\r\n\t\tHMONITOR hMonitor = ::MonitorFromWindow(HwndFromWindowID(wid), MONITOR_DEFAULTTONEAREST);\r\n\t\tUINT dpiX = 0;\r\n\t\tUINT dpiY = 0;\r\n\t\tif (fnGetDpiForMonitor(hMonitor, 0 /*MDT_EFFECTIVE_DPI*/, &dpiX, &dpiY) == S_OK) {\r\n\t\t\treturn dpiY;\r\n\t\t}\r\n\t}\r\n\treturn uSystemDPI;\r\n}\r\n\r\nint SystemMetricsForDpi(int nIndex, UINT dpi) noexcept {\r\n\tif (fnGetSystemMetricsForDpi) {\r\n\t\treturn fnGetSystemMetricsForDpi(nIndex, dpi);\r\n\t}\r\n\r\n\tint value = ::GetSystemMetrics(nIndex);\r\n\tvalue = (dpi == uSystemDPI) ? value : ::MulDiv(value, dpi, uSystemDPI);\r\n\treturn value;\r\n}\r\n\r\nclass SurfaceGDI : public Surface {\r\n\tSurfaceMode mode;\r\n\tHDC hdc{};\r\n\tbool hdcOwned=false;\r\n\tHPEN pen{};\r\n\tHPEN penOld{};\r\n\tHBRUSH brush{};\r\n\tHBRUSH brushOld{};\r\n\tHFONT fontOld{};\r\n\tHBITMAP bitmap{};\r\n\tHBITMAP bitmapOld{};\r\n\r\n\tint logPixelsY = USER_DEFAULT_SCREEN_DPI;\r\n\r\n\tstatic constexpr int maxWidthMeasure = INT_MAX;\r\n\t// There appears to be a 16 bit string length limit in GDI on NT.\r\n\tstatic constexpr int maxLenText = 65535;\r\n\r\n\tvoid PenColour(ColourRGBA fore, XYPOSITION widthStroke) noexcept;\r\n\r\n\tvoid BrushColour(ColourRGBA back) noexcept;\r\n\tvoid SetFont(const Font *font_);\r\n\tvoid Clear() noexcept;\r\n\r\npublic:\r\n\tSurfaceGDI() noexcept;\r\n\tSurfaceGDI(HDC hdcCompatible, int width, int height, SurfaceMode mode_, int logPixelsY_) noexcept;\r\n\t// Deleted so SurfaceGDI objects can not be copied.\r\n\tSurfaceGDI(const SurfaceGDI &) = delete;\r\n\tSurfaceGDI(SurfaceGDI &&) = delete;\r\n\tSurfaceGDI &operator=(const SurfaceGDI &) = delete;\r\n\tSurfaceGDI &operator=(SurfaceGDI &&) = delete;\r\n\r\n\t~SurfaceGDI() noexcept override;\r\n\r\n\tvoid Init(WindowID wid) override;\r\n\tvoid Init(SurfaceID sid, WindowID wid) override;\r\n\tstd::unique_ptr<Surface> AllocatePixMap(int width, int height) override;\r\n\r\n\tvoid SetMode(SurfaceMode mode_) override;\r\n\r\n\tvoid Release() noexcept override;\r\n\tint SupportsFeature(Supports feature) noexcept override;\r\n\tbool Initialised() override;\r\n\tint LogPixelsY() override;\r\n\tint PixelDivisions() override;\r\n\tint DeviceHeightFont(int points) override;\r\n\tvoid LineDraw(Point start, Point end, Stroke stroke) override;\r\n\tvoid PolyLine(const Point *pts, size_t npts, Stroke stroke) override;\r\n\tvoid Polygon(const Point *pts, size_t npts, FillStroke fillStroke) override;\r\n\tvoid RectangleDraw(PRectangle rc, FillStroke fillStroke) override;\r\n\tvoid RectangleFrame(PRectangle rc, Stroke stroke) override;\r\n\tvoid FillRectangle(PRectangle rc, Fill fill) override;\r\n\tvoid FillRectangleAligned(PRectangle rc, Fill fill) override;\r\n\tvoid FillRectangle(PRectangle rc, Surface &surfacePattern) override;\r\n\tvoid RoundedRectangle(PRectangle rc, FillStroke fillStroke) override;\r\n\tvoid AlphaRectangle(PRectangle rc, XYPOSITION cornerSize, FillStroke fillStroke) override;\r\n\tvoid GradientRectangle(PRectangle rc, const std::vector<ColourStop> &stops, GradientOptions options) override;\r\n\tvoid DrawRGBAImage(PRectangle rc, int width, int height, const unsigned char *pixelsImage) override;\r\n\tvoid Ellipse(PRectangle rc, FillStroke fillStroke) override;\r\n\tvoid Stadium(PRectangle rc, FillStroke fillStroke, Ends ends) override;\r\n\tvoid Copy(PRectangle rc, Point from, Surface &surfaceSource) override;\r\n\r\n\tstd::unique_ptr<IScreenLineLayout> Layout(const IScreenLine *screenLine) override;\r\n\r\n\tvoid DrawTextCommon(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, UINT fuOptions);\r\n\tvoid DrawTextNoClip(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, ColourRGBA fore, ColourRGBA back) override;\r\n\tvoid DrawTextClipped(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, ColourRGBA fore, ColourRGBA back) override;\r\n\tvoid DrawTextTransparent(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, ColourRGBA fore) override;\r\n\tvoid MeasureWidths(const Font *font_, std::string_view text, XYPOSITION *positions) override;\r\n\tXYPOSITION WidthText(const Font *font_, std::string_view text) override;\r\n\r\n\tvoid DrawTextCommonUTF8(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, UINT fuOptions);\r\n\tvoid DrawTextNoClipUTF8(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, ColourRGBA fore, ColourRGBA back) override;\r\n\tvoid DrawTextClippedUTF8(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, ColourRGBA fore, ColourRGBA back) override;\r\n\tvoid DrawTextTransparentUTF8(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, ColourRGBA fore) override;\r\n\tvoid MeasureWidthsUTF8(const Font *font_, std::string_view text, XYPOSITION *positions) override;\r\n\tXYPOSITION WidthTextUTF8(const Font *font_, std::string_view text) override;\r\n\r\n\tXYPOSITION Ascent(const Font *font_) override;\r\n\tXYPOSITION Descent(const Font *font_) override;\r\n\tXYPOSITION InternalLeading(const Font *font_) override;\r\n\tXYPOSITION Height(const Font *font_) override;\r\n\tXYPOSITION AverageCharWidth(const Font *font_) override;\r\n\r\n\tvoid SetClip(PRectangle rc) override;\r\n\tvoid PopClip() override;\r\n\tvoid FlushCachedState() override;\r\n\tvoid FlushDrawing() override;\r\n};\r\n\r\nSurfaceGDI::SurfaceGDI() noexcept {\r\n}\r\n\r\nSurfaceGDI::SurfaceGDI(HDC hdcCompatible, int width, int height, SurfaceMode mode_, int logPixelsY_) noexcept {\r\n\thdc = ::CreateCompatibleDC(hdcCompatible);\r\n\thdcOwned = true;\r\n\tbitmap = ::CreateCompatibleBitmap(hdcCompatible, width, height);\r\n\tbitmapOld = SelectBitmap(hdc, bitmap);\r\n\t::SetTextAlign(hdc, TA_BASELINE);\r\n\tmode = mode_;\r\n\tlogPixelsY = logPixelsY_;\r\n}\r\n\r\nSurfaceGDI::~SurfaceGDI() noexcept {\r\n\tClear();\r\n}\r\n\r\nvoid SurfaceGDI::Clear() noexcept {\r\n\tif (penOld) {\r\n\t\t::SelectObject(hdc, penOld);\r\n\t\t::DeleteObject(pen);\r\n\t\tpenOld = {};\r\n\t}\r\n\tpen = {};\r\n\tif (brushOld) {\r\n\t\t::SelectObject(hdc, brushOld);\r\n\t\t::DeleteObject(brush);\r\n\t\tbrushOld = {};\r\n\t}\r\n\tbrush = {};\r\n\tif (fontOld) {\r\n\t\t// Fonts are not deleted as they are owned by a Font object\r\n\t\t::SelectObject(hdc, fontOld);\r\n\t\tfontOld = {};\r\n\t}\r\n\tif (bitmapOld) {\r\n\t\t::SelectObject(hdc, bitmapOld);\r\n\t\t::DeleteObject(bitmap);\r\n\t\tbitmapOld = {};\r\n\t}\r\n\tbitmap = {};\r\n\tif (hdcOwned) {\r\n\t\t::DeleteDC(hdc);\r\n\t\thdc = {};\r\n\t\thdcOwned = false;\r\n\t}\r\n}\r\n\r\nvoid SurfaceGDI::Release() noexcept {\r\n\tClear();\r\n}\r\n\r\nint SurfaceGDI::SupportsFeature(Supports feature) noexcept {\r\n\tfor (const Supports f : SupportsGDI) {\r\n\t\tif (f == feature)\r\n\t\t\treturn 1;\r\n\t}\r\n\treturn 0;\r\n}\r\n\r\nbool SurfaceGDI::Initialised() {\r\n\treturn hdc != 0;\r\n}\r\n\r\nvoid SurfaceGDI::Init(WindowID wid) {\r\n\tRelease();\r\n\thdc = ::CreateCompatibleDC({});\r\n\thdcOwned = true;\r\n\t::SetTextAlign(hdc, TA_BASELINE);\r\n\tlogPixelsY = DpiForWindow(wid);\r\n}\r\n\r\nvoid SurfaceGDI::Init(SurfaceID sid, WindowID wid) {\r\n\tRelease();\r\n\thdc = static_cast<HDC>(sid);\r\n\t::SetTextAlign(hdc, TA_BASELINE);\r\n\t// Windows on screen are scaled but printers are not.\r\n\tconst bool printing = ::GetDeviceCaps(hdc, TECHNOLOGY) != DT_RASDISPLAY;\r\n\tlogPixelsY = printing ? ::GetDeviceCaps(hdc, LOGPIXELSY) : DpiForWindow(wid);\r\n}\r\n\r\nstd::unique_ptr<Surface> SurfaceGDI::AllocatePixMap(int width, int height) {\r\n\treturn std::make_unique<SurfaceGDI>(hdc, width, height, mode, logPixelsY);\r\n}\r\n\r\nvoid SurfaceGDI::SetMode(SurfaceMode mode_) {\r\n\tmode = mode_;\r\n}\r\n\r\nvoid SurfaceGDI::PenColour(ColourRGBA fore, XYPOSITION widthStroke) noexcept {\r\n\tif (pen) {\r\n\t\t::SelectObject(hdc, penOld);\r\n\t\t::DeleteObject(pen);\r\n\t\tpen = {};\r\n\t\tpenOld = {};\r\n\t}\r\n\tconst DWORD penWidth = std::lround(widthStroke);\r\n\tconst COLORREF penColour = fore.OpaqueRGB();\r\n\tif (widthStroke > 1) {\r\n\t\tconst LOGBRUSH brushParameters{ BS_SOLID, penColour, 0 };\r\n\t\tpen = ::ExtCreatePen(PS_GEOMETRIC | PS_ENDCAP_ROUND | PS_JOIN_MITER,\r\n\t\t\tpenWidth,\r\n\t\t\t&brushParameters,\r\n\t\t\t0,\r\n\t\t\tnullptr);\r\n\t} else {\r\n\t\tpen = ::CreatePen(PS_INSIDEFRAME, penWidth, penColour);\r\n\t}\r\n\tpenOld = SelectPen(hdc, pen);\r\n}\r\n\r\nvoid SurfaceGDI::BrushColour(ColourRGBA back) noexcept {\r\n\tif (brush) {\r\n\t\t::SelectObject(hdc, brushOld);\r\n\t\t::DeleteObject(brush);\r\n\t\tbrush = {};\r\n\t\tbrushOld = {};\r\n\t}\r\n\tbrush = ::CreateSolidBrush(back.OpaqueRGB());\r\n\tbrushOld = SelectBrush(hdc, brush);\r\n}\r\n\r\nvoid SurfaceGDI::SetFont(const Font *font_) {\r\n\tconst FontGDI *pfm = dynamic_cast<const FontGDI *>(font_);\r\n\tPLATFORM_ASSERT(pfm);\r\n\tif (!pfm) {\r\n\t\tthrow std::runtime_error(\"SurfaceGDI::SetFont: wrong Font type.\");\r\n\t}\r\n\tif (fontOld) {\r\n\t\tSelectFont(hdc, pfm->hfont);\r\n\t} else {\r\n\t\tfontOld = SelectFont(hdc, pfm->hfont);\r\n\t}\r\n}\r\n\r\nint SurfaceGDI::LogPixelsY() {\r\n\treturn logPixelsY;\r\n}\r\n\r\nint SurfaceGDI::PixelDivisions() {\r\n\t// Win32 uses device pixels.\r\n\treturn 1;\r\n}\r\n\r\nint SurfaceGDI::DeviceHeightFont(int points) {\r\n\treturn ::MulDiv(points, LogPixelsY(), 72);\r\n}\r\n\r\nvoid SurfaceGDI::LineDraw(Point start, Point end, Stroke stroke) {\r\n\tPenColour(stroke.colour, stroke.width);\r\n\t::MoveToEx(hdc, std::lround(std::floor(start.x)), std::lround(std::floor(start.y)), nullptr);\r\n\t::LineTo(hdc, std::lround(std::floor(end.x)), std::lround(std::floor(end.y)));\r\n}\r\n\r\nvoid SurfaceGDI::PolyLine(const Point *pts, size_t npts, Stroke stroke) {\r\n\tPLATFORM_ASSERT(npts > 1);\r\n\tif (npts <= 1) {\r\n\t\treturn;\r\n\t}\r\n\tPenColour(stroke.colour, stroke.width);\r\n\tstd::vector<POINT> outline;\r\n\tstd::transform(pts, pts + npts, std::back_inserter(outline), POINTFromPoint);\r\n\t::Polyline(hdc, outline.data(), static_cast<int>(npts));\r\n}\r\n\r\nvoid SurfaceGDI::Polygon(const Point *pts, size_t npts, FillStroke fillStroke) {\r\n\tPenColour(fillStroke.stroke.colour.WithoutAlpha(), fillStroke.stroke.width);\r\n\tBrushColour(fillStroke.fill.colour.WithoutAlpha());\r\n\tstd::vector<POINT> outline;\r\n\tstd::transform(pts, pts + npts, std::back_inserter(outline), POINTFromPoint);\r\n\t::Polygon(hdc, outline.data(), static_cast<int>(npts));\r\n}\r\n\r\nvoid SurfaceGDI::RectangleDraw(PRectangle rc, FillStroke fillStroke) {\r\n\tRectangleFrame(rc, fillStroke.stroke);\r\n\tFillRectangle(rc.Inset(fillStroke.stroke.width), fillStroke.fill.colour);\r\n}\r\n\r\nvoid SurfaceGDI::RectangleFrame(PRectangle rc, Stroke stroke) {\r\n\tBrushColour(stroke.colour);\r\n\tconst RECT rcw = RectFromPRectangle(rc);\r\n\t::FrameRect(hdc, &rcw, brush);\r\n}\r\n\r\nvoid SurfaceGDI::FillRectangle(PRectangle rc, Fill fill) {\r\n\tif (fill.colour.IsOpaque()) {\r\n\t\t// Using ExtTextOut rather than a FillRect ensures that no dithering occurs.\r\n\t\t// There is no need to allocate a brush either.\r\n\t\tconst RECT rcw = RectFromPRectangle(rc);\r\n\t\t::SetBkColor(hdc, fill.colour.OpaqueRGB());\r\n\t\t::ExtTextOut(hdc, rcw.left, rcw.top, ETO_OPAQUE, &rcw, TEXT(\"\"), 0, nullptr);\r\n\t} else {\r\n\t\tAlphaRectangle(rc, 0, FillStroke(fill.colour));\r\n\t}\r\n}\r\n\r\nvoid SurfaceGDI::FillRectangleAligned(PRectangle rc, Fill fill) {\r\n\tFillRectangle(PixelAlign(rc, 1), fill);\r\n}\r\n\r\nvoid SurfaceGDI::FillRectangle(PRectangle rc, Surface &surfacePattern) {\r\n\tHBRUSH br;\r\n\tif (SurfaceGDI *psgdi = dynamic_cast<SurfaceGDI *>(&surfacePattern); psgdi && psgdi->bitmap) {\r\n\t\tbr = ::CreatePatternBrush(psgdi->bitmap);\r\n\t} else {\t// Something is wrong so display in red\r\n\t\tbr = ::CreateSolidBrush(RGB(0xff, 0, 0));\r\n\t}\r\n\tconst RECT rcw = RectFromPRectangle(rc);\r\n\t::FillRect(hdc, &rcw, br);\r\n\t::DeleteObject(br);\r\n}\r\n\r\nvoid SurfaceGDI::RoundedRectangle(PRectangle rc, FillStroke fillStroke) {\r\n\tPenColour(fillStroke.stroke.colour, fillStroke.stroke.width);\r\n\tBrushColour(fillStroke.fill.colour);\r\n\tconst RECT rcw = RectFromPRectangle(rc);\r\n\t::RoundRect(hdc,\r\n\t\trcw.left + 1, rcw.top,\r\n\t\trcw.right - 1, rcw.bottom,\r\n\t\t8, 8);\r\n}\r\n\r\nnamespace {\r\n\r\nconstexpr DWORD dwordFromBGRA(byte b, byte g, byte r, byte a) noexcept {\r\n\treturn (a << 24) | (r << 16) | (g << 8) | b;\r\n}\r\n\r\nconstexpr byte AlphaScaled(unsigned char component, unsigned int alpha) noexcept {\r\n\treturn static_cast<byte>(component * alpha / 255);\r\n}\r\n\r\nconstexpr DWORD dwordMultiplied(ColourRGBA colour) noexcept {\r\n\treturn dwordFromBGRA(\r\n\t\tAlphaScaled(colour.GetBlue(), colour.GetAlpha()),\r\n\t\tAlphaScaled(colour.GetGreen(), colour.GetAlpha()),\r\n\t\tAlphaScaled(colour.GetRed(), colour.GetAlpha()),\r\n\t\tcolour.GetAlpha());\r\n}\r\n\r\nclass DIBSection {\r\n\tHDC hMemDC {};\r\n\tHBITMAP hbmMem {};\r\n\tHBITMAP hbmOld {};\r\n\tSIZE size {};\r\n\tDWORD *pixels = nullptr;\r\npublic:\r\n\tDIBSection(HDC hdc, SIZE size_) noexcept;\r\n\t// Deleted so DIBSection objects can not be copied.\r\n\tDIBSection(const DIBSection&) = delete;\r\n\tDIBSection(DIBSection&&) = delete;\r\n\tDIBSection &operator=(const DIBSection&) = delete;\r\n\tDIBSection &operator=(DIBSection&&) = delete;\r\n\t~DIBSection() noexcept;\r\n\toperator bool() const noexcept {\r\n\t\treturn hMemDC && hbmMem && pixels;\r\n\t}\r\n\tDWORD *Pixels() const noexcept {\r\n\t\treturn pixels;\r\n\t}\r\n\tunsigned char *Bytes() const noexcept {\r\n\t\treturn reinterpret_cast<unsigned char *>(pixels);\r\n\t}\r\n\tHDC DC() const noexcept {\r\n\t\treturn hMemDC;\r\n\t}\r\n\tvoid SetPixel(LONG x, LONG y, DWORD value) noexcept {\r\n\t\tPLATFORM_ASSERT(x >= 0);\r\n\t\tPLATFORM_ASSERT(y >= 0);\r\n\t\tPLATFORM_ASSERT(x < size.cx);\r\n\t\tPLATFORM_ASSERT(y < size.cy);\r\n\t\tpixels[y * size.cx + x] = value;\r\n\t}\r\n\tvoid SetSymmetric(LONG x, LONG y, DWORD value) noexcept;\r\n};\r\n\r\nDIBSection::DIBSection(HDC hdc, SIZE size_) noexcept {\r\n\thMemDC = ::CreateCompatibleDC(hdc);\r\n\tif (!hMemDC) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tsize = size_;\r\n\r\n\t// -size.y makes bitmap start from top\r\n\tconst BITMAPINFO bpih = { {sizeof(BITMAPINFOHEADER), size.cx, -size.cy, 1, 32, BI_RGB, 0, 0, 0, 0, 0},\r\n\t\t{{0, 0, 0, 0}} };\r\n\tvoid *image = nullptr;\r\n\thbmMem = CreateDIBSection(hMemDC, &bpih, DIB_RGB_COLORS, &image, {}, 0);\r\n\tif (!hbmMem || !image) {\r\n\t\treturn;\r\n\t}\r\n\tpixels = static_cast<DWORD *>(image);\r\n\thbmOld = SelectBitmap(hMemDC, hbmMem);\r\n}\r\n\r\nDIBSection::~DIBSection() noexcept {\r\n\tif (hbmOld) {\r\n\t\tSelectBitmap(hMemDC, hbmOld);\r\n\t\thbmOld = {};\r\n\t}\r\n\tif (hbmMem) {\r\n\t\t::DeleteObject(hbmMem);\r\n\t\thbmMem = {};\r\n\t}\r\n\tif (hMemDC) {\r\n\t\t::DeleteDC(hMemDC);\r\n\t\thMemDC = {};\r\n\t}\r\n}\r\n\r\nvoid DIBSection::SetSymmetric(LONG x, LONG y, DWORD value) noexcept {\r\n\t// Plot a point symmetrically to all 4 quadrants\r\n\tconst LONG xSymmetric = size.cx - 1 - x;\r\n\tconst LONG ySymmetric = size.cy - 1 - y;\r\n\tSetPixel(x, y, value);\r\n\tSetPixel(xSymmetric, y, value);\r\n\tSetPixel(x, ySymmetric, value);\r\n\tSetPixel(xSymmetric, ySymmetric, value);\r\n}\r\n\r\nColourRGBA GradientValue(const std::vector<ColourStop> &stops, XYPOSITION proportion) noexcept {\r\n\tfor (size_t stop = 0; stop < stops.size() - 1; stop++) {\r\n\t\t// Loop through each pair of stops\r\n\t\tconst XYPOSITION positionStart = stops[stop].position;\r\n\t\tconst XYPOSITION positionEnd = stops[stop + 1].position;\r\n\t\tif ((proportion >= positionStart) && (proportion <= positionEnd)) {\r\n\t\t\tconst XYPOSITION proportionInPair = (proportion - positionStart) /\r\n\t\t\t\t(positionEnd - positionStart);\r\n\t\t\treturn stops[stop].colour.MixedWith(stops[stop + 1].colour, proportionInPair);\r\n\t\t}\r\n\t}\r\n\t// Loop should always find a value\r\n\treturn ColourRGBA();\r\n}\r\n\r\nconstexpr SIZE SizeOfRect(RECT rc) noexcept {\r\n\treturn { rc.right - rc.left, rc.bottom - rc.top };\r\n}\r\n\r\nconstexpr BLENDFUNCTION mergeAlpha = { AC_SRC_OVER, 0, 255, AC_SRC_ALPHA };\r\n\r\n}\r\n\r\nvoid SurfaceGDI::AlphaRectangle(PRectangle rc, XYPOSITION cornerSize, FillStroke fillStroke) {\r\n\t// TODO: Implement strokeWidth\r\n\tconst RECT rcw = RectFromPRectangle(rc);\r\n\tconst SIZE size = SizeOfRect(rcw);\r\n\r\n\tif (size.cx > 0) {\r\n\r\n\t\tDIBSection section(hdc, size);\r\n\r\n\t\tif (section) {\r\n\r\n\t\t\t// Ensure not distorted too much by corners when small\r\n\t\t\tconst LONG corner = std::min(static_cast<LONG>(cornerSize), (std::min(size.cx, size.cy) / 2) - 2);\r\n\r\n\t\t\tconstexpr DWORD valEmpty = dwordFromBGRA(0,0,0,0);\r\n\t\t\tconst DWORD valFill = dwordMultiplied(fillStroke.fill.colour);\r\n\t\t\tconst DWORD valOutline = dwordMultiplied(fillStroke.stroke.colour);\r\n\r\n\t\t\t// Draw a framed rectangle\r\n\t\t\tfor (int y=0; y<size.cy; y++) {\r\n\t\t\t\tfor (int x=0; x<size.cx; x++) {\r\n\t\t\t\t\tif ((x==0) || (x==size.cx-1) || (y == 0) || (y == size.cy -1)) {\r\n\t\t\t\t\t\tsection.SetPixel(x, y, valOutline);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tsection.SetPixel(x, y, valFill);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Make the corners transparent\r\n\t\t\tfor (LONG c=0; c<corner; c++) {\r\n\t\t\t\tfor (LONG x=0; x<c+1; x++) {\r\n\t\t\t\t\tsection.SetSymmetric(x, c - x, valEmpty);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Draw the corner frame pieces\r\n\t\t\tfor (LONG x=1; x<corner; x++) {\r\n\t\t\t\tsection.SetSymmetric(x, corner - x, valOutline);\r\n\t\t\t}\r\n\r\n\t\t\tGdiAlphaBlend(hdc, rcw.left, rcw.top, size.cx, size.cy, section.DC(), 0, 0, size.cx, size.cy, mergeAlpha);\r\n\t\t}\r\n\t} else {\r\n\t\tBrushColour(fillStroke.stroke.colour);\r\n\t\tFrameRect(hdc, &rcw, brush);\r\n\t}\r\n}\r\n\r\nvoid SurfaceGDI::GradientRectangle(PRectangle rc, const std::vector<ColourStop> &stops, GradientOptions options) {\r\n\r\n\tconst RECT rcw = RectFromPRectangle(rc);\r\n\tconst SIZE size = SizeOfRect(rcw);\r\n\r\n\tDIBSection section(hdc, size);\r\n\r\n\tif (section) {\r\n\r\n\t\tif (options == GradientOptions::topToBottom) {\r\n\t\t\tfor (LONG y = 0; y < size.cy; y++) {\r\n\t\t\t\t// Find y/height proportional colour\r\n\t\t\t\tconst XYPOSITION proportion = y / (rc.Height() - 1.0f);\r\n\t\t\t\tconst ColourRGBA mixed = GradientValue(stops, proportion);\r\n\t\t\t\tconst DWORD valFill = dwordMultiplied(mixed);\r\n\t\t\t\tfor (LONG x = 0; x < size.cx; x++) {\r\n\t\t\t\t\tsection.SetPixel(x, y, valFill);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tfor (LONG x = 0; x < size.cx; x++) {\r\n\t\t\t\t// Find x/width proportional colour\r\n\t\t\t\tconst XYPOSITION proportion = x / (rc.Width() - 1.0f);\r\n\t\t\t\tconst ColourRGBA mixed = GradientValue(stops, proportion);\r\n\t\t\t\tconst DWORD valFill = dwordMultiplied(mixed);\r\n\t\t\t\tfor (LONG y = 0; y < size.cy; y++) {\r\n\t\t\t\t\tsection.SetPixel(x, y, valFill);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tGdiAlphaBlend(hdc, rcw.left, rcw.top, size.cx, size.cy, section.DC(), 0, 0, size.cx, size.cy, mergeAlpha);\r\n\t}\r\n}\r\n\r\nvoid SurfaceGDI::DrawRGBAImage(PRectangle rc, int width, int height, const unsigned char *pixelsImage) {\r\n\tif (rc.Width() > 0) {\r\n\t\tif (rc.Width() > width)\r\n\t\t\trc.left += std::floor((rc.Width() - width) / 2);\r\n\t\trc.right = rc.left + width;\r\n\t\tif (rc.Height() > height)\r\n\t\t\trc.top += std::floor((rc.Height() - height) / 2);\r\n\t\trc.bottom = rc.top + height;\r\n\r\n\t\tconst SIZE size { width, height };\r\n\t\tDIBSection section(hdc, size);\r\n\t\tif (section) {\r\n\t\t\tRGBAImage::BGRAFromRGBA(section.Bytes(), pixelsImage, static_cast<size_t>(width) * height);\r\n\t\t\tGdiAlphaBlend(hdc, static_cast<int>(rc.left), static_cast<int>(rc.top),\r\n\t\t\t\tstatic_cast<int>(rc.Width()), static_cast<int>(rc.Height()), section.DC(),\r\n\t\t\t\t0, 0, width, height, mergeAlpha);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid SurfaceGDI::Ellipse(PRectangle rc, FillStroke fillStroke) {\r\n\tPenColour(fillStroke.stroke.colour, fillStroke.stroke.width);\r\n\tBrushColour(fillStroke.fill.colour);\r\n\tconst RECT rcw = RectFromPRectangle(rc);\r\n\t::Ellipse(hdc, rcw.left, rcw.top, rcw.right, rcw.bottom);\r\n}\r\n\r\nvoid SurfaceGDI::Stadium(PRectangle rc, FillStroke fillStroke, [[maybe_unused]] Ends ends) {\r\n\t// TODO: Implement properly - the rectangle is just a placeholder\r\n\tRectangleDraw(rc, fillStroke);\r\n}\r\n\r\nvoid SurfaceGDI::Copy(PRectangle rc, Point from, Surface &surfaceSource) {\r\n\t::BitBlt(hdc,\r\n\t\tstatic_cast<int>(rc.left), static_cast<int>(rc.top),\r\n\t\tstatic_cast<int>(rc.Width()), static_cast<int>(rc.Height()),\r\n\t\tdynamic_cast<SurfaceGDI &>(surfaceSource).hdc,\r\n\t\tstatic_cast<int>(from.x), static_cast<int>(from.y), SRCCOPY);\r\n}\r\n\r\nstd::unique_ptr<IScreenLineLayout> SurfaceGDI::Layout(const IScreenLine *) {\r\n\treturn {};\r\n}\r\n\r\ntypedef VarBuffer<int, stackBufferLength> TextPositionsI;\r\n\r\nvoid SurfaceGDI::DrawTextCommon(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, UINT fuOptions) {\r\n\tSetFont(font_);\r\n\tconst RECT rcw = RectFromPRectangle(rc);\r\n\tconst int x = static_cast<int>(rc.left);\r\n\tconst int yBaseInt = static_cast<int>(ybase);\r\n\r\n\tif (mode.codePage == CpUtf8) {\r\n\t\tconst TextWide tbuf(text, mode.codePage);\r\n\t\t::ExtTextOutW(hdc, x, yBaseInt, fuOptions, &rcw, tbuf.buffer, tbuf.tlen, nullptr);\r\n\t} else {\r\n\t\t::ExtTextOutA(hdc, x, yBaseInt, fuOptions, &rcw, text.data(), static_cast<UINT>(text.length()), nullptr);\r\n\t}\r\n}\r\n\r\nvoid SurfaceGDI::DrawTextNoClip(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text,\r\n\tColourRGBA fore, ColourRGBA back) {\r\n\t::SetTextColor(hdc, fore.OpaqueRGB());\r\n\t::SetBkColor(hdc, back.OpaqueRGB());\r\n\tDrawTextCommon(rc, font_, ybase, text, ETO_OPAQUE);\r\n}\r\n\r\nvoid SurfaceGDI::DrawTextClipped(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text,\r\n\tColourRGBA fore, ColourRGBA back) {\r\n\t::SetTextColor(hdc, fore.OpaqueRGB());\r\n\t::SetBkColor(hdc, back.OpaqueRGB());\r\n\tDrawTextCommon(rc, font_, ybase, text, ETO_OPAQUE | ETO_CLIPPED);\r\n}\r\n\r\nvoid SurfaceGDI::DrawTextTransparent(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text,\r\n\tColourRGBA fore) {\r\n\t// Avoid drawing spaces in transparent mode\r\n\tfor (const char ch : text) {\r\n\t\tif (ch != ' ') {\r\n\t\t\t::SetTextColor(hdc, fore.OpaqueRGB());\r\n\t\t\t::SetBkMode(hdc, TRANSPARENT);\r\n\t\t\tDrawTextCommon(rc, font_, ybase, text, 0);\r\n\t\t\t::SetBkMode(hdc, OPAQUE);\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid SurfaceGDI::MeasureWidths(const Font *font_, std::string_view text, XYPOSITION *positions) {\r\n\t// Zero positions to avoid random behaviour on failure.\r\n\tstd::fill(positions, positions + text.length(), 0.0f);\r\n\tSetFont(font_);\r\n\tSIZE sz = { 0,0 };\r\n\tint fit = 0;\r\n\tint i = 0;\r\n\tconst int len = static_cast<int>(text.length());\r\n\tif (mode.codePage == CpUtf8) {\r\n\t\tconst TextWide tbuf(text, mode.codePage);\r\n\t\tTextPositionsI poses(tbuf.tlen);\r\n\t\tif (!::GetTextExtentExPointW(hdc, tbuf.buffer, tbuf.tlen, maxWidthMeasure, &fit, poses.buffer, &sz)) {\r\n\t\t\t// Failure\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// Map the widths given for UTF-16 characters back onto the UTF-8 input string\r\n\t\tfor (int ui = 0; ui < fit; ui++) {\r\n\t\t\tconst unsigned char uch = text[i];\r\n\t\t\tconst unsigned int byteCount = UTF8BytesOfLead[uch];\r\n\t\t\tif (byteCount == 4) {\t// Non-BMP\r\n\t\t\t\tui++;\r\n\t\t\t}\r\n\t\t\tfor (unsigned int bytePos = 0; (bytePos < byteCount) && (i < len); bytePos++) {\r\n\t\t\t\tpositions[i++] = static_cast<XYPOSITION>(poses.buffer[ui]);\r\n\t\t\t}\r\n\t\t}\r\n\t} else {\r\n\t\tTextPositionsI poses(len);\r\n\t\tif (!::GetTextExtentExPointA(hdc, text.data(), len, maxWidthMeasure, &fit, poses.buffer, &sz)) {\r\n\t\t\t// Eeek - a NULL DC or other foolishness could cause this.\r\n\t\t\treturn;\r\n\t\t}\r\n\t\twhile (i < fit) {\r\n\t\t\tpositions[i] = static_cast<XYPOSITION>(poses.buffer[i]);\r\n\t\t\ti++;\r\n\t\t}\r\n\t}\r\n\t// If any positions not filled in then use the last position for them\r\n\tconst XYPOSITION lastPos = (fit > 0) ? positions[fit - 1] : 0.0f;\r\n\tstd::fill(positions + i, positions + text.length(), lastPos);\r\n}\r\n\r\nXYPOSITION SurfaceGDI::WidthText(const Font *font_, std::string_view text) {\r\n\tSetFont(font_);\r\n\tSIZE sz = { 0,0 };\r\n\tif (!(mode.codePage == CpUtf8)) {\r\n\t\t::GetTextExtentPoint32A(hdc, text.data(), std::min(static_cast<int>(text.length()), maxLenText), &sz);\r\n\t} else {\r\n\t\tconst TextWide tbuf(text, mode.codePage);\r\n\t\t::GetTextExtentPoint32W(hdc, tbuf.buffer, tbuf.tlen, &sz);\r\n\t}\r\n\treturn static_cast<XYPOSITION>(sz.cx);\r\n}\r\n\r\nvoid SurfaceGDI::DrawTextCommonUTF8(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, UINT fuOptions) {\r\n\tSetFont(font_);\r\n\tconst RECT rcw = RectFromPRectangle(rc);\r\n\tconst int x = static_cast<int>(rc.left);\r\n\tconst int yBaseInt = static_cast<int>(ybase);\r\n\r\n\tconst TextWide tbuf(text, CpUtf8);\r\n\t::ExtTextOutW(hdc, x, yBaseInt, fuOptions, &rcw, tbuf.buffer, tbuf.tlen, nullptr);\r\n}\r\n\r\nvoid SurfaceGDI::DrawTextNoClipUTF8(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text,\r\n\tColourRGBA fore, ColourRGBA back) {\r\n\t::SetTextColor(hdc, fore.OpaqueRGB());\r\n\t::SetBkColor(hdc, back.OpaqueRGB());\r\n\tDrawTextCommonUTF8(rc, font_, ybase, text, ETO_OPAQUE);\r\n}\r\n\r\nvoid SurfaceGDI::DrawTextClippedUTF8(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text,\r\n\tColourRGBA fore, ColourRGBA back) {\r\n\t::SetTextColor(hdc, fore.OpaqueRGB());\r\n\t::SetBkColor(hdc, back.OpaqueRGB());\r\n\tDrawTextCommonUTF8(rc, font_, ybase, text, ETO_OPAQUE | ETO_CLIPPED);\r\n}\r\n\r\nvoid SurfaceGDI::DrawTextTransparentUTF8(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text,\r\n\tColourRGBA fore) {\r\n\t// Avoid drawing spaces in transparent mode\r\n\tfor (const char ch : text) {\r\n\t\tif (ch != ' ') {\r\n\t\t\t::SetTextColor(hdc, fore.OpaqueRGB());\r\n\t\t\t::SetBkMode(hdc, TRANSPARENT);\r\n\t\t\tDrawTextCommonUTF8(rc, font_, ybase, text, 0);\r\n\t\t\t::SetBkMode(hdc, OPAQUE);\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid SurfaceGDI::MeasureWidthsUTF8(const Font *font_, std::string_view text, XYPOSITION *positions) {\r\n\t// Zero positions to avoid random behaviour on failure.\r\n\tstd::fill(positions, positions + text.length(), 0.0f);\r\n\tSetFont(font_);\r\n\tSIZE sz = { 0,0 };\r\n\tint fit = 0;\r\n\tint i = 0;\r\n\tconst int len = static_cast<int>(text.length());\r\n\tconst TextWide tbuf(text, CpUtf8);\r\n\tTextPositionsI poses(tbuf.tlen);\r\n\tif (!::GetTextExtentExPointW(hdc, tbuf.buffer, tbuf.tlen, maxWidthMeasure, &fit, poses.buffer, &sz)) {\r\n\t\t// Failure\r\n\t\treturn;\r\n\t}\r\n\t// Map the widths given for UTF-16 characters back onto the UTF-8 input string\r\n\tfor (int ui = 0; ui < fit; ui++) {\r\n\t\tconst unsigned char uch = text[i];\r\n\t\tconst unsigned int byteCount = UTF8BytesOfLead[uch];\r\n\t\tif (byteCount == 4) {\t// Non-BMP\r\n\t\t\tui++;\r\n\t\t}\r\n\t\tfor (unsigned int bytePos = 0; (bytePos < byteCount) && (i < len); bytePos++) {\r\n\t\t\tpositions[i++] = static_cast<XYPOSITION>(poses.buffer[ui]);\r\n\t\t}\r\n\t}\r\n\t// If any positions not filled in then use the last position for them\r\n\tconst XYPOSITION lastPos = (fit > 0) ? positions[fit - 1] : 0.0f;\r\n\tstd::fill(positions + i, positions + text.length(), lastPos);\r\n}\r\n\r\nXYPOSITION SurfaceGDI::WidthTextUTF8(const Font *font_, std::string_view text) {\r\n\tSetFont(font_);\r\n\tSIZE sz = { 0,0 };\r\n\tconst TextWide tbuf(text, CpUtf8);\r\n\t::GetTextExtentPoint32W(hdc, tbuf.buffer, tbuf.tlen, &sz);\r\n\treturn static_cast<XYPOSITION>(sz.cx);\r\n}\r\n\r\nXYPOSITION SurfaceGDI::Ascent(const Font *font_) {\r\n\tSetFont(font_);\r\n\tTEXTMETRIC tm;\r\n\t::GetTextMetrics(hdc, &tm);\r\n\treturn static_cast<XYPOSITION>(tm.tmAscent);\r\n}\r\n\r\nXYPOSITION SurfaceGDI::Descent(const Font *font_) {\r\n\tSetFont(font_);\r\n\tTEXTMETRIC tm;\r\n\t::GetTextMetrics(hdc, &tm);\r\n\treturn static_cast<XYPOSITION>(tm.tmDescent);\r\n}\r\n\r\nXYPOSITION SurfaceGDI::InternalLeading(const Font *font_) {\r\n\tSetFont(font_);\r\n\tTEXTMETRIC tm;\r\n\t::GetTextMetrics(hdc, &tm);\r\n\treturn static_cast<XYPOSITION>(tm.tmInternalLeading);\r\n}\r\n\r\nXYPOSITION SurfaceGDI::Height(const Font *font_) {\r\n\tSetFont(font_);\r\n\tTEXTMETRIC tm;\r\n\t::GetTextMetrics(hdc, &tm);\r\n\treturn static_cast<XYPOSITION>(tm.tmHeight);\r\n}\r\n\r\nXYPOSITION SurfaceGDI::AverageCharWidth(const Font *font_) {\r\n\tSetFont(font_);\r\n\tTEXTMETRIC tm;\r\n\t::GetTextMetrics(hdc, &tm);\r\n\treturn static_cast<XYPOSITION>(tm.tmAveCharWidth);\r\n}\r\n\r\nvoid SurfaceGDI::SetClip(PRectangle rc) {\r\n\t::SaveDC(hdc);\r\n\t::IntersectClipRect(hdc, static_cast<int>(rc.left), static_cast<int>(rc.top),\r\n\t\tstatic_cast<int>(rc.right), static_cast<int>(rc.bottom));\r\n}\r\n\r\nvoid SurfaceGDI::PopClip() {\r\n\t::RestoreDC(hdc, -1);\r\n}\r\n\r\nvoid SurfaceGDI::FlushCachedState() {\r\n\tpen = {};\r\n\tbrush = {};\r\n}\r\n\r\nvoid SurfaceGDI::FlushDrawing() {\r\n}\r\n\r\n#if defined(USE_D2D)\r\n\r\nnamespace {\r\n\r\nconstexpr D2D1_RECT_F RectangleFromPRectangle(PRectangle rc) noexcept {\r\n\treturn {\r\n\t\tstatic_cast<FLOAT>(rc.left),\r\n\t\tstatic_cast<FLOAT>(rc.top),\r\n\t\tstatic_cast<FLOAT>(rc.right),\r\n\t\tstatic_cast<FLOAT>(rc.bottom)\r\n\t};\r\n}\r\n\r\nconstexpr D2D1_POINT_2F DPointFromPoint(Point point) noexcept {\r\n\treturn { static_cast<FLOAT>(point.x), static_cast<FLOAT>(point.y) };\r\n}\r\n\r\nconstexpr Supports SupportsD2D[] = {\r\n\tSupports::LineDrawsFinal,\r\n\tSupports::FractionalStrokeWidth,\r\n\tSupports::TranslucentStroke,\r\n\tSupports::PixelModification,\r\n\tSupports::ThreadSafeMeasureWidths,\r\n};\r\n\r\nconstexpr D2D_COLOR_F ColorFromColourAlpha(ColourRGBA colour) noexcept {\r\n\treturn D2D_COLOR_F{\r\n\t\tcolour.GetRedComponent(),\r\n\t\tcolour.GetGreenComponent(),\r\n\t\tcolour.GetBlueComponent(),\r\n\t\tcolour.GetAlphaComponent()\r\n\t};\r\n}\r\n\r\nconstexpr D2D1_RECT_F RectangleInset(D2D1_RECT_F rect, FLOAT inset) noexcept {\r\n\treturn D2D1_RECT_F{\r\n\t\trect.left + inset,\r\n\t\trect.top + inset,\r\n\t\trect.right - inset,\r\n\t\trect.bottom - inset };\r\n}\r\n\r\n}\r\n\r\nclass BlobInline;\r\n\r\nclass SurfaceD2D : public Surface, public ISetRenderingParams {\r\n\tSurfaceMode mode;\r\n\r\n\tID2D1RenderTarget *pRenderTarget = nullptr;\r\n\tID2D1BitmapRenderTarget *pBitmapRenderTarget = nullptr;\r\n\tbool ownRenderTarget = false;\r\n\tint clipsActive = 0;\r\n\r\n\tID2D1SolidColorBrush *pBrush = nullptr;\r\n\r\n\tstatic constexpr FontQuality invalidFontQuality = FontQuality::QualityMask;\r\n\tFontQuality fontQuality = invalidFontQuality;\r\n\tint logPixelsY = USER_DEFAULT_SCREEN_DPI;\r\n\tint deviceScaleFactor = 1;\r\n\tstd::shared_ptr<RenderingParams> renderingParams;\r\n\r\n\tvoid Clear() noexcept;\r\n\tvoid SetFontQuality(FontQuality extraFontFlag);\r\n\tHRESULT GetBitmap(ID2D1Bitmap **ppBitmap);\r\n\tvoid SetDeviceScaleFactor(const ID2D1RenderTarget *const pRenderTarget) noexcept;\r\n\r\npublic:\r\n\tSurfaceD2D() noexcept;\r\n\tSurfaceD2D(ID2D1RenderTarget *pRenderTargetCompatible, int width, int height, SurfaceMode mode_, int logPixelsY_) noexcept;\r\n\t// Deleted so SurfaceD2D objects can not be copied.\r\n\tSurfaceD2D(const SurfaceD2D &) = delete;\r\n\tSurfaceD2D(SurfaceD2D &&) = delete;\r\n\tSurfaceD2D &operator=(const SurfaceD2D &) = delete;\r\n\tSurfaceD2D &operator=(SurfaceD2D &&) = delete;\r\n\t~SurfaceD2D() noexcept override;\r\n\r\n\tvoid SetScale(WindowID wid) noexcept;\r\n\tvoid Init(WindowID wid) override;\r\n\tvoid Init(SurfaceID sid, WindowID wid) override;\r\n\tstd::unique_ptr<Surface> AllocatePixMap(int width, int height) override;\r\n\r\n\tvoid SetMode(SurfaceMode mode_) override;\r\n\r\n\tvoid Release() noexcept override;\r\n\tint SupportsFeature(Supports feature) noexcept override;\r\n\tbool Initialised() override;\r\n\r\n\tvoid D2DPenColourAlpha(ColourRGBA fore) noexcept;\r\n\tint LogPixelsY() override;\r\n\tint PixelDivisions() override;\r\n\tint DeviceHeightFont(int points) override;\r\n\tvoid LineDraw(Point start, Point end, Stroke stroke) override;\r\n\tID2D1PathGeometry *Geometry(const Point *pts, size_t npts, D2D1_FIGURE_BEGIN figureBegin) noexcept;\r\n\tvoid PolyLine(const Point *pts, size_t npts, Stroke stroke) override;\r\n\tvoid Polygon(const Point *pts, size_t npts, FillStroke fillStroke) override;\r\n\tvoid RectangleDraw(PRectangle rc, FillStroke fillStroke) override;\r\n\tvoid RectangleFrame(PRectangle rc, Stroke stroke) override;\r\n\tvoid FillRectangle(PRectangle rc, Fill fill) override;\r\n\tvoid FillRectangleAligned(PRectangle rc, Fill fill) override;\r\n\tvoid FillRectangle(PRectangle rc, Surface &surfacePattern) override;\r\n\tvoid RoundedRectangle(PRectangle rc, FillStroke fillStroke) override;\r\n\tvoid AlphaRectangle(PRectangle rc, XYPOSITION cornerSize, FillStroke fillStroke) override;\r\n\tvoid GradientRectangle(PRectangle rc, const std::vector<ColourStop> &stops, GradientOptions options) override;\r\n\tvoid DrawRGBAImage(PRectangle rc, int width, int height, const unsigned char *pixelsImage) override;\r\n\tvoid Ellipse(PRectangle rc, FillStroke fillStroke) override;\r\n\tvoid Stadium(PRectangle rc, FillStroke fillStroke, Ends ends) override;\r\n\tvoid Copy(PRectangle rc, Point from, Surface &surfaceSource) override;\r\n\r\n\tstd::unique_ptr<IScreenLineLayout> Layout(const IScreenLine *screenLine) override;\r\n\r\n\tvoid DrawTextCommon(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, int codePageOverride, UINT fuOptions);\r\n\r\n\tvoid DrawTextNoClip(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, ColourRGBA fore, ColourRGBA back) override;\r\n\tvoid DrawTextClipped(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, ColourRGBA fore, ColourRGBA back) override;\r\n\tvoid DrawTextTransparent(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, ColourRGBA fore) override;\r\n\tvoid MeasureWidths(const Font *font_, std::string_view text, XYPOSITION *positions) override;\r\n\tXYPOSITION WidthText(const Font *font_, std::string_view text) override;\r\n\r\n\tvoid DrawTextNoClipUTF8(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, ColourRGBA fore, ColourRGBA back) override;\r\n\tvoid DrawTextClippedUTF8(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, ColourRGBA fore, ColourRGBA back) override;\r\n\tvoid DrawTextTransparentUTF8(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, ColourRGBA fore) override;\r\n\tvoid MeasureWidthsUTF8(const Font *font_, std::string_view text, XYPOSITION *positions) override;\r\n\tXYPOSITION WidthTextUTF8(const Font *font_, std::string_view text) override;\r\n\r\n\tXYPOSITION Ascent(const Font *font_) override;\r\n\tXYPOSITION Descent(const Font *font_) override;\r\n\tXYPOSITION InternalLeading(const Font *font_) override;\r\n\tXYPOSITION Height(const Font *font_) override;\r\n\tXYPOSITION AverageCharWidth(const Font *font_) override;\r\n\r\n\tvoid SetClip(PRectangle rc) override;\r\n\tvoid PopClip() override;\r\n\tvoid FlushCachedState() override;\r\n\tvoid FlushDrawing() override;\r\n\r\n\tvoid SetRenderingParams(std::shared_ptr<RenderingParams> renderingParams_) override;\r\n};\r\n\r\nSurfaceD2D::SurfaceD2D() noexcept {\r\n}\r\n\r\nSurfaceD2D::SurfaceD2D(ID2D1RenderTarget *pRenderTargetCompatible, int width, int height, SurfaceMode mode_, int logPixelsY_) noexcept {\r\n\tconst D2D1_SIZE_F desiredSize = D2D1::SizeF(static_cast<float>(width), static_cast<float>(height));\r\n\tD2D1_PIXEL_FORMAT desiredFormat;\r\n#ifdef __MINGW32__\r\n\tdesiredFormat.format = DXGI_FORMAT_UNKNOWN;\r\n#else\r\n\tdesiredFormat = pRenderTargetCompatible->GetPixelFormat();\r\n#endif\r\n\tdesiredFormat.alphaMode = D2D1_ALPHA_MODE_IGNORE;\r\n\tconst HRESULT hr = pRenderTargetCompatible->CreateCompatibleRenderTarget(\r\n\t\t&desiredSize, nullptr, &desiredFormat, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, &pBitmapRenderTarget);\r\n\tif (SUCCEEDED(hr)) {\r\n\t\tpRenderTarget = pBitmapRenderTarget;\r\n\t\tSetDeviceScaleFactor(pRenderTarget);\r\n\t\tpRenderTarget->BeginDraw();\r\n\t\townRenderTarget = true;\r\n\t}\r\n\tmode = mode_;\r\n\tlogPixelsY = logPixelsY_;\r\n}\r\n\r\nSurfaceD2D::~SurfaceD2D() noexcept {\r\n\tClear();\r\n}\r\n\r\nvoid SurfaceD2D::Clear() noexcept {\r\n\tReleaseUnknown(pBrush);\r\n\tif (pRenderTarget) {\r\n\t\twhile (clipsActive) {\r\n\t\t\tpRenderTarget->PopAxisAlignedClip();\r\n\t\t\tclipsActive--;\r\n\t\t}\r\n\t\tif (ownRenderTarget) {\r\n\t\t\tpRenderTarget->EndDraw();\r\n\t\t\tReleaseUnknown(pRenderTarget);\r\n\t\t\townRenderTarget = false;\r\n\t\t}\r\n\t\tpRenderTarget = nullptr;\r\n\t}\r\n\tpBitmapRenderTarget = nullptr;\r\n}\r\n\r\nvoid SurfaceD2D::Release() noexcept {\r\n\tClear();\r\n}\r\n\r\nvoid SurfaceD2D::SetScale(WindowID wid) noexcept {\r\n\tfontQuality = invalidFontQuality;\r\n\tlogPixelsY = DpiForWindow(wid);\r\n}\r\n\r\nint SurfaceD2D::SupportsFeature(Supports feature) noexcept {\r\n\tfor (const Supports f : SupportsD2D) {\r\n\t\tif (f == feature)\r\n\t\t\treturn 1;\r\n\t}\r\n\treturn 0;\r\n}\r\n\r\nbool SurfaceD2D::Initialised() {\r\n\treturn pRenderTarget != nullptr;\r\n}\r\n\r\nvoid SurfaceD2D::Init(WindowID wid) {\r\n\tRelease();\r\n\tSetScale(wid);\r\n}\r\n\r\nvoid SurfaceD2D::Init(SurfaceID sid, WindowID wid) {\r\n\tRelease();\r\n\tSetScale(wid);\r\n\tpRenderTarget = static_cast<ID2D1RenderTarget *>(sid);\r\n\tSetDeviceScaleFactor(pRenderTarget);\r\n}\r\n\r\nstd::unique_ptr<Surface> SurfaceD2D::AllocatePixMap(int width, int height) {\r\n\tstd::unique_ptr<SurfaceD2D> surf = std::make_unique<SurfaceD2D>(pRenderTarget, width, height, mode, logPixelsY);\r\n\tsurf->SetRenderingParams(renderingParams);\r\n\treturn surf;\r\n}\r\n\r\nvoid SurfaceD2D::SetMode(SurfaceMode mode_) {\r\n\tmode = mode_;\r\n}\r\n\r\nHRESULT SurfaceD2D::GetBitmap(ID2D1Bitmap **ppBitmap) {\r\n\tPLATFORM_ASSERT(pBitmapRenderTarget);\r\n\treturn pBitmapRenderTarget->GetBitmap(ppBitmap);\r\n}\r\n\r\nvoid SurfaceD2D::D2DPenColourAlpha(ColourRGBA fore) noexcept {\r\n\tif (pRenderTarget) {\r\n\t\tconst D2D_COLOR_F col = ColorFromColourAlpha(fore);\r\n\t\tif (pBrush) {\r\n\t\t\tpBrush->SetColor(col);\r\n\t\t} else {\r\n\t\t\tconst HRESULT hr = pRenderTarget->CreateSolidColorBrush(col, &pBrush);\r\n\t\t\tif (!SUCCEEDED(hr)) {\r\n\t\t\t\tReleaseUnknown(pBrush);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid SurfaceD2D::SetFontQuality(FontQuality extraFontFlag) {\r\n\tif ((fontQuality != extraFontFlag) && renderingParams) {\r\n\t\tfontQuality = extraFontFlag;\r\n\t\tconst D2D1_TEXT_ANTIALIAS_MODE aaMode = DWriteMapFontQuality(extraFontFlag);\r\n\t\tif (aaMode == D2D1_TEXT_ANTIALIAS_MODE_CLEARTYPE && renderingParams->customRenderingParams) {\r\n\t\t\tpRenderTarget->SetTextRenderingParams(renderingParams->customRenderingParams.get());\r\n\t\t} else if (renderingParams->defaultRenderingParams) {\r\n\t\t\tpRenderTarget->SetTextRenderingParams(renderingParams->defaultRenderingParams.get());\r\n\t\t}\r\n\t\tpRenderTarget->SetTextAntialiasMode(aaMode);\r\n\t}\r\n}\r\n\r\nint SurfaceD2D::LogPixelsY() {\r\n\treturn logPixelsY;\r\n}\r\n\r\nvoid SurfaceD2D::SetDeviceScaleFactor(const ID2D1RenderTarget *const pD2D1RenderTarget) noexcept {\r\n\tFLOAT dpiX = 0.f;\r\n\tFLOAT dpiY = 0.f;\r\n\tpD2D1RenderTarget->GetDpi(&dpiX, &dpiY);\r\n\tdeviceScaleFactor = static_cast<int>(dpiX / 96.f);\r\n}\r\n\r\nint SurfaceD2D::PixelDivisions() {\r\n\treturn deviceScaleFactor;\r\n}\r\n\r\nint SurfaceD2D::DeviceHeightFont(int points) {\r\n\treturn ::MulDiv(points, LogPixelsY(), 72);\r\n}\r\n\r\nvoid SurfaceD2D::LineDraw(Point start, Point end, Stroke stroke) {\r\n\tD2DPenColourAlpha(stroke.colour);\r\n\r\n\tD2D1_STROKE_STYLE_PROPERTIES strokeProps {};\r\n\tstrokeProps.startCap = D2D1_CAP_STYLE_SQUARE;\r\n\tstrokeProps.endCap = D2D1_CAP_STYLE_SQUARE;\r\n\tstrokeProps.dashCap = D2D1_CAP_STYLE_FLAT;\r\n\tstrokeProps.lineJoin = D2D1_LINE_JOIN_MITER;\r\n\tstrokeProps.miterLimit = 4.0f;\r\n\tstrokeProps.dashStyle = D2D1_DASH_STYLE_SOLID;\r\n\tstrokeProps.dashOffset = 0;\r\n\r\n\t// get the stroke style to apply\r\n\tID2D1StrokeStyle *pStrokeStyle = nullptr;\r\n\tconst HRESULT hr = pD2DFactory->CreateStrokeStyle(\r\n\t\tstrokeProps, nullptr, 0, &pStrokeStyle);\r\n\tif (SUCCEEDED(hr)) {\r\n\t\tpRenderTarget->DrawLine(\r\n\t\t\tDPointFromPoint(start),\r\n\t\t\tDPointFromPoint(end), pBrush, stroke.WidthF(), pStrokeStyle);\r\n\t}\r\n\r\n\tReleaseUnknown(pStrokeStyle);\r\n}\r\n\r\nID2D1PathGeometry *SurfaceD2D::Geometry(const Point *pts, size_t npts, D2D1_FIGURE_BEGIN figureBegin) noexcept {\r\n\tID2D1PathGeometry *geometry = nullptr;\r\n\tHRESULT hr = pD2DFactory->CreatePathGeometry(&geometry);\r\n\tif (SUCCEEDED(hr) && geometry) {\r\n\t\tID2D1GeometrySink *sink = nullptr;\r\n\t\thr = geometry->Open(&sink);\r\n\t\tif (SUCCEEDED(hr) && sink) {\r\n\t\t\tsink->BeginFigure(DPointFromPoint(pts[0]), figureBegin);\r\n\t\t\tfor (size_t i = 1; i < npts; i++) {\r\n\t\t\t\tsink->AddLine(DPointFromPoint(pts[i]));\r\n\t\t\t}\r\n\t\t\tsink->EndFigure((figureBegin == D2D1_FIGURE_BEGIN_FILLED) ?\r\n\t\t\t\tD2D1_FIGURE_END_CLOSED : D2D1_FIGURE_END_OPEN);\r\n\t\t\tsink->Close();\r\n\t\t\tReleaseUnknown(sink);\r\n\t\t}\r\n\t}\r\n\treturn geometry;\r\n}\r\n\r\nvoid SurfaceD2D::PolyLine(const Point *pts, size_t npts, Stroke stroke) {\r\n\tPLATFORM_ASSERT(pRenderTarget && (npts > 1));\r\n\tif (!pRenderTarget || (npts <= 1)) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tID2D1PathGeometry *geometry = Geometry(pts, npts, D2D1_FIGURE_BEGIN_HOLLOW);\r\n\tPLATFORM_ASSERT(geometry);\r\n\tif (!geometry) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tD2DPenColourAlpha(stroke.colour);\r\n\tD2D1_STROKE_STYLE_PROPERTIES strokeProps {};\r\n\tstrokeProps.startCap = D2D1_CAP_STYLE_ROUND;\r\n\tstrokeProps.endCap = D2D1_CAP_STYLE_ROUND;\r\n\tstrokeProps.dashCap = D2D1_CAP_STYLE_FLAT;\r\n\tstrokeProps.lineJoin = D2D1_LINE_JOIN_MITER;\r\n\tstrokeProps.miterLimit = 4.0f;\r\n\tstrokeProps.dashStyle = D2D1_DASH_STYLE_SOLID;\r\n\tstrokeProps.dashOffset = 0;\r\n\r\n\t// get the stroke style to apply\r\n\tID2D1StrokeStyle *pStrokeStyle = nullptr;\r\n\tconst HRESULT hr = pD2DFactory->CreateStrokeStyle(\r\n\t\tstrokeProps, nullptr, 0, &pStrokeStyle);\r\n\tif (SUCCEEDED(hr)) {\r\n\t\tpRenderTarget->DrawGeometry(geometry, pBrush, stroke.WidthF(), pStrokeStyle);\r\n\t}\r\n\tReleaseUnknown(pStrokeStyle);\r\n\tReleaseUnknown(geometry);\r\n}\r\n\r\nvoid SurfaceD2D::Polygon(const Point *pts, size_t npts, FillStroke fillStroke) {\r\n\tPLATFORM_ASSERT(pRenderTarget && (npts > 2));\r\n\tif (pRenderTarget) {\r\n\t\tID2D1PathGeometry *geometry = Geometry(pts, npts, D2D1_FIGURE_BEGIN_FILLED);\r\n\t\tPLATFORM_ASSERT(geometry);\r\n\t\tif (geometry) {\r\n\t\t\tD2DPenColourAlpha(fillStroke.fill.colour);\r\n\t\t\tpRenderTarget->FillGeometry(geometry, pBrush);\r\n\t\t\tD2DPenColourAlpha(fillStroke.stroke.colour);\r\n\t\t\tpRenderTarget->DrawGeometry(geometry, pBrush, fillStroke.stroke.WidthF());\r\n\t\t\tReleaseUnknown(geometry);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid SurfaceD2D::RectangleDraw(PRectangle rc, FillStroke fillStroke) {\r\n\tif (!pRenderTarget)\r\n\t\treturn;\r\n\tconst D2D1_RECT_F rect = RectangleFromPRectangle(rc);\r\n\tconst D2D1_RECT_F rectFill = RectangleInset(rect, fillStroke.stroke.WidthF());\r\n\tconst float halfStroke = fillStroke.stroke.WidthF() / 2.0f;\r\n\tconst D2D1_RECT_F rectOutline = RectangleInset(rect, halfStroke);\r\n\r\n\tD2DPenColourAlpha(fillStroke.fill.colour);\r\n\tpRenderTarget->FillRectangle(&rectFill, pBrush);\r\n\tD2DPenColourAlpha(fillStroke.stroke.colour);\r\n\tpRenderTarget->DrawRectangle(&rectOutline, pBrush, fillStroke.stroke.WidthF());\r\n}\r\n\r\nvoid SurfaceD2D::RectangleFrame(PRectangle rc, Stroke stroke) {\r\n\tif (pRenderTarget) {\r\n\t\tconst XYPOSITION halfStroke = stroke.width / 2.0f;\r\n\t\tconst D2D1_RECT_F rectangle1 = RectangleFromPRectangle(rc.Inset(halfStroke));\r\n\t\tD2DPenColourAlpha(stroke.colour);\r\n\t\tpRenderTarget->DrawRectangle(&rectangle1, pBrush, stroke.WidthF());\r\n\t}\r\n}\r\n\r\nvoid SurfaceD2D::FillRectangle(PRectangle rc, Fill fill) {\r\n\tif (pRenderTarget) {\r\n\t\tD2DPenColourAlpha(fill.colour);\r\n\t\tconst D2D1_RECT_F rectangle = RectangleFromPRectangle(rc);\r\n\t\tpRenderTarget->FillRectangle(&rectangle, pBrush);\r\n\t}\r\n}\r\n\r\nvoid SurfaceD2D::FillRectangleAligned(PRectangle rc, Fill fill) {\r\n\tFillRectangle(PixelAlign(rc, PixelDivisions()), fill);\r\n}\r\n\r\nvoid SurfaceD2D::FillRectangle(PRectangle rc, Surface &surfacePattern) {\r\n\tSurfaceD2D *psurfOther = dynamic_cast<SurfaceD2D *>(&surfacePattern);\r\n\tPLATFORM_ASSERT(psurfOther);\r\n\tif (!psurfOther) {\r\n\t\tthrow std::runtime_error(\"SurfaceD2D::FillRectangle: wrong Surface type.\");\r\n\t}\r\n\tID2D1Bitmap *pBitmap = nullptr;\r\n\tHRESULT hr = psurfOther->GetBitmap(&pBitmap);\r\n\tif (SUCCEEDED(hr) && pBitmap) {\r\n\t\tID2D1BitmapBrush *pBitmapBrush = nullptr;\r\n\t\tconst D2D1_BITMAP_BRUSH_PROPERTIES brushProperties =\r\n\t        D2D1::BitmapBrushProperties(D2D1_EXTEND_MODE_WRAP, D2D1_EXTEND_MODE_WRAP,\r\n\t\t\tD2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR);\r\n\t\t// Create the bitmap brush.\r\n\t\thr = pRenderTarget->CreateBitmapBrush(pBitmap, brushProperties, &pBitmapBrush);\r\n\t\tReleaseUnknown(pBitmap);\r\n\t\tif (SUCCEEDED(hr) && pBitmapBrush) {\r\n\t\t\tpRenderTarget->FillRectangle(\r\n\t\t\t\tRectangleFromPRectangle(rc),\r\n\t\t\t\tpBitmapBrush);\r\n\t\t\tReleaseUnknown(pBitmapBrush);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid SurfaceD2D::RoundedRectangle(PRectangle rc, FillStroke fillStroke) {\r\n\tif (pRenderTarget) {\r\n\t\tconst FLOAT minDimension = static_cast<FLOAT>(std::min(rc.Width(), rc.Height())) / 2.0f;\r\n\t\tconst FLOAT radius = std::min(4.0f, minDimension);\r\n\t\tif (fillStroke.fill.colour == fillStroke.stroke.colour) {\r\n\t\t\tconst D2D1_ROUNDED_RECT roundedRectFill = {\r\n\t\t\t\tRectangleFromPRectangle(rc),\r\n\t\t\t\tradius, radius };\r\n\t\t\tD2DPenColourAlpha(fillStroke.fill.colour);\r\n\t\t\tpRenderTarget->FillRoundedRectangle(roundedRectFill, pBrush);\r\n\t\t} else {\r\n\t\t\tconst D2D1_ROUNDED_RECT roundedRectFill = {\r\n\t\t\t\tRectangleFromPRectangle(rc.Inset(1.0)),\r\n\t\t\t\tradius-1, radius-1 };\r\n\t\t\tD2DPenColourAlpha(fillStroke.fill.colour);\r\n\t\t\tpRenderTarget->FillRoundedRectangle(roundedRectFill, pBrush);\r\n\r\n\t\t\tconst D2D1_ROUNDED_RECT roundedRect = {\r\n\t\t\t\tRectangleFromPRectangle(rc.Inset(0.5)),\r\n\t\t\t\tradius, radius };\r\n\t\t\tD2DPenColourAlpha(fillStroke.stroke.colour);\r\n\t\t\tpRenderTarget->DrawRoundedRectangle(roundedRect, pBrush, fillStroke.stroke.WidthF());\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid SurfaceD2D::AlphaRectangle(PRectangle rc, XYPOSITION cornerSize, FillStroke fillStroke) {\r\n\tconst D2D1_RECT_F rect = RectangleFromPRectangle(rc);\r\n\tconst D2D1_RECT_F rectFill = RectangleInset(rect, fillStroke.stroke.WidthF());\r\n\tconst float halfStroke = fillStroke.stroke.WidthF() / 2.0f;\r\n\tconst D2D1_RECT_F rectOutline = RectangleInset(rect, halfStroke);\r\n\tif (pRenderTarget) {\r\n\t\tif (cornerSize == 0) {\r\n\t\t\t// When corner size is zero, draw square rectangle to prevent blurry pixels at corners\r\n\t\t\tD2DPenColourAlpha(fillStroke.fill.colour);\r\n\t\t\tpRenderTarget->FillRectangle(rectFill, pBrush);\r\n\r\n\t\t\tD2DPenColourAlpha(fillStroke.stroke.colour);\r\n\t\t\tpRenderTarget->DrawRectangle(rectOutline, pBrush, fillStroke.stroke.WidthF());\r\n\t\t} else {\r\n\t\t\tconst float cornerSizeF = static_cast<float>(cornerSize);\r\n\t\t\tconst D2D1_ROUNDED_RECT roundedRectFill = {\r\n\t\t\t\trectFill, cornerSizeF - 1.0f, cornerSizeF - 1.0f };\r\n\t\t\tD2DPenColourAlpha(fillStroke.fill.colour);\r\n\t\t\tpRenderTarget->FillRoundedRectangle(roundedRectFill, pBrush);\r\n\r\n\t\t\tconst D2D1_ROUNDED_RECT roundedRect = {\r\n\t\t\t\trectOutline, cornerSizeF, cornerSizeF};\r\n\t\t\tD2DPenColourAlpha(fillStroke.stroke.colour);\r\n\t\t\tpRenderTarget->DrawRoundedRectangle(roundedRect, pBrush, fillStroke.stroke.WidthF());\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid SurfaceD2D::GradientRectangle(PRectangle rc, const std::vector<ColourStop> &stops, GradientOptions options) {\r\n\tif (pRenderTarget) {\r\n\t\tD2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES lgbp {\r\n\t\t\tDPointFromPoint(Point(rc.left, rc.top)), {}\r\n\t\t};\r\n\t\tswitch (options) {\r\n\t\tcase GradientOptions::leftToRight:\r\n\t\t\tlgbp.endPoint = DPointFromPoint(Point(rc.right, rc.top));\r\n\t\t\tbreak;\r\n\t\tcase GradientOptions::topToBottom:\r\n\t\tdefault:\r\n\t\t\tlgbp.endPoint = DPointFromPoint(Point(rc.left, rc.bottom));\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tstd::vector<D2D1_GRADIENT_STOP> gradientStops;\r\n\t\tfor (const ColourStop &stop : stops) {\r\n\t\t\tgradientStops.push_back({ static_cast<FLOAT>(stop.position), ColorFromColourAlpha(stop.colour) });\r\n\t\t}\r\n\t\tID2D1GradientStopCollection *pGradientStops = nullptr;\r\n\t\tHRESULT hr = pRenderTarget->CreateGradientStopCollection(\r\n\t\t\tgradientStops.data(), static_cast<UINT32>(gradientStops.size()), &pGradientStops);\r\n\t\tif (FAILED(hr) || !pGradientStops) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tID2D1LinearGradientBrush *pBrushLinear = nullptr;\r\n\t\thr = pRenderTarget->CreateLinearGradientBrush(\r\n\t\t\tlgbp, pGradientStops, &pBrushLinear);\r\n\t\tif (SUCCEEDED(hr) && pBrushLinear) {\r\n\t\t\tconst D2D1_RECT_F rectangle = RectangleFromPRectangle(PRectangle(\r\n\t\t\t\tstd::round(rc.left), rc.top, std::round(rc.right), rc.bottom));\r\n\t\t\tpRenderTarget->FillRectangle(&rectangle, pBrushLinear);\r\n\t\t\tReleaseUnknown(pBrushLinear);\r\n\t\t}\r\n\t\tReleaseUnknown(pGradientStops);\r\n\t}\r\n}\r\n\r\nvoid SurfaceD2D::DrawRGBAImage(PRectangle rc, int width, int height, const unsigned char *pixelsImage) {\r\n\tif (pRenderTarget) {\r\n\t\tif (rc.Width() > width)\r\n\t\t\trc.left += std::floor((rc.Width() - width) / 2);\r\n\t\trc.right = rc.left + width;\r\n\t\tif (rc.Height() > height)\r\n\t\t\trc.top += std::floor((rc.Height() - height) / 2);\r\n\t\trc.bottom = rc.top + height;\r\n\r\n\t\tstd::vector<unsigned char> image(RGBAImage::bytesPerPixel * height * width);\r\n\t\tRGBAImage::BGRAFromRGBA(image.data(), pixelsImage, static_cast<ptrdiff_t>(height) * width);\r\n\r\n\t\tID2D1Bitmap *bitmap = nullptr;\r\n\t\tconst D2D1_SIZE_U size = D2D1::SizeU(width, height);\r\n\t\tconst D2D1_BITMAP_PROPERTIES props = {{DXGI_FORMAT_B8G8R8A8_UNORM,\r\n\t\t    D2D1_ALPHA_MODE_PREMULTIPLIED}, 72.0, 72.0};\r\n\t\tconst HRESULT hr = pRenderTarget->CreateBitmap(size, image.data(),\r\n                  width * 4, &props, &bitmap);\r\n\t\tif (SUCCEEDED(hr)) {\r\n\t\t\tconst D2D1_RECT_F rcDestination = RectangleFromPRectangle(rc);\r\n\t\t\tpRenderTarget->DrawBitmap(bitmap, rcDestination);\r\n\t\t\tReleaseUnknown(bitmap);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid SurfaceD2D::Ellipse(PRectangle rc, FillStroke fillStroke) {\r\n\tif (!pRenderTarget)\r\n\t\treturn;\r\n\tconst D2D1_POINT_2F centre = DPointFromPoint(rc.Centre());\r\n\r\n\tconst FLOAT radiusFill = static_cast<FLOAT>(rc.Width() / 2.0f - fillStroke.stroke.width);\r\n\tconst D2D1_ELLIPSE ellipseFill = { centre, radiusFill, radiusFill };\r\n\r\n\tD2DPenColourAlpha(fillStroke.fill.colour);\r\n\tpRenderTarget->FillEllipse(ellipseFill, pBrush);\r\n\r\n\tconst FLOAT radiusOutline = static_cast<FLOAT>(rc.Width() / 2.0f - fillStroke.stroke.width / 2.0f);\r\n\tconst D2D1_ELLIPSE ellipseOutline = { centre, radiusOutline, radiusOutline };\r\n\r\n\tD2DPenColourAlpha(fillStroke.stroke.colour);\r\n\tpRenderTarget->DrawEllipse(ellipseOutline, pBrush, fillStroke.stroke.WidthF());\r\n}\r\n\r\nvoid SurfaceD2D::Stadium(PRectangle rc, FillStroke fillStroke, Ends ends) {\r\n\tif (!pRenderTarget)\r\n\t\treturn;\r\n\tif (rc.Width() < rc.Height()) {\r\n\t\t// Can't draw nice ends so just draw a rectangle\r\n\t\tRectangleDraw(rc, fillStroke);\r\n\t\treturn;\r\n\t}\r\n\tconst FLOAT radius = static_cast<FLOAT>(rc.Height() / 2.0);\r\n\tconst FLOAT radiusFill = radius - fillStroke.stroke.WidthF();\r\n\tconst FLOAT halfStroke = fillStroke.stroke.WidthF() / 2.0f;\r\n\tif (ends == Surface::Ends::semiCircles) {\r\n\t\tconst D2D1_RECT_F rect = RectangleFromPRectangle(rc);\r\n\t\tconst D2D1_ROUNDED_RECT roundedRectFill = { RectangleInset(rect, fillStroke.stroke.WidthF()),\r\n\t\t\tradiusFill, radiusFill };\r\n\t\tD2DPenColourAlpha(fillStroke.fill.colour);\r\n\t\tpRenderTarget->FillRoundedRectangle(roundedRectFill, pBrush);\r\n\r\n\t\tconst D2D1_ROUNDED_RECT roundedRect = { RectangleInset(rect, halfStroke),\r\n\t\t\tradius, radius };\r\n\t\tD2DPenColourAlpha(fillStroke.stroke.colour);\r\n\t\tpRenderTarget->DrawRoundedRectangle(roundedRect, pBrush, fillStroke.stroke.WidthF());\r\n\t} else {\r\n\t\tconst Ends leftSide = static_cast<Ends>(static_cast<int>(ends) & 0xf);\r\n\t\tconst Ends rightSide = static_cast<Ends>(static_cast<int>(ends) & 0xf0);\r\n\t\tPRectangle rcInner = rc;\r\n\t\trcInner.left += radius;\r\n\t\trcInner.right -= radius;\r\n\t\tID2D1PathGeometry *pathGeometry = nullptr;\r\n\t\tconst HRESULT hrGeometry = pD2DFactory->CreatePathGeometry(&pathGeometry);\r\n\t\tif (FAILED(hrGeometry) || !pathGeometry)\r\n\t\t\treturn;\r\n\t\tID2D1GeometrySink *pSink = nullptr;\r\n\t\tconst HRESULT hrSink = pathGeometry->Open(&pSink);\r\n\t\tif (SUCCEEDED(hrSink) && pSink) {\r\n\t\t\tswitch (leftSide) {\r\n\t\t\t\tcase Ends::leftFlat:\r\n\t\t\t\t\tpSink->BeginFigure(DPointFromPoint(Point(rc.left + halfStroke, rc.top + halfStroke)), D2D1_FIGURE_BEGIN_FILLED);\r\n\t\t\t\t\tpSink->AddLine(DPointFromPoint(Point(rc.left + halfStroke, rc.bottom - halfStroke)));\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Ends::leftAngle:\r\n\t\t\t\t\tpSink->BeginFigure(DPointFromPoint(Point(rcInner.left + halfStroke, rc.top + halfStroke)), D2D1_FIGURE_BEGIN_FILLED);\r\n\t\t\t\t\tpSink->AddLine(DPointFromPoint(Point(rc.left + halfStroke, rc.Centre().y)));\r\n\t\t\t\t\tpSink->AddLine(DPointFromPoint(Point(rcInner.left + halfStroke, rc.bottom - halfStroke)));\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Ends::semiCircles:\r\n\t\t\t\tdefault: {\r\n\t\t\t\t\t\tpSink->BeginFigure(DPointFromPoint(Point(rcInner.left + halfStroke, rc.top + halfStroke)), D2D1_FIGURE_BEGIN_FILLED);\r\n\t\t\t\t\t\tD2D1_ARC_SEGMENT segment{};\r\n\t\t\t\t\t\tsegment.point = DPointFromPoint(Point(rcInner.left + halfStroke, rc.bottom - halfStroke));\r\n\t\t\t\t\t\tsegment.size = D2D1::SizeF(radiusFill, radiusFill);\r\n\t\t\t\t\t\tsegment.rotationAngle = 0.0f;\r\n\t\t\t\t\t\tsegment.sweepDirection = D2D1_SWEEP_DIRECTION_COUNTER_CLOCKWISE;\r\n\t\t\t\t\t\tsegment.arcSize = D2D1_ARC_SIZE_SMALL;\r\n\t\t\t\t\t\tpSink->AddArc(segment);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tswitch (rightSide) {\r\n\t\t\tcase Ends::rightFlat:\r\n\t\t\t\tpSink->AddLine(DPointFromPoint(Point(rc.right - halfStroke, rc.bottom - halfStroke)));\r\n\t\t\t\tpSink->AddLine(DPointFromPoint(Point(rc.right - halfStroke, rc.top + halfStroke)));\r\n\t\t\t\tbreak;\r\n\t\t\tcase Ends::rightAngle:\r\n\t\t\t\tpSink->AddLine(DPointFromPoint(Point(rcInner.right - halfStroke, rc.bottom - halfStroke)));\r\n\t\t\t\tpSink->AddLine(DPointFromPoint(Point(rc.right - halfStroke, rc.Centre().y)));\r\n\t\t\t\tpSink->AddLine(DPointFromPoint(Point(rcInner.right - halfStroke, rc.top + halfStroke)));\r\n\t\t\t\tbreak;\r\n\t\t\tcase Ends::semiCircles:\r\n\t\t\tdefault: {\r\n\t\t\t\t\tpSink->AddLine(DPointFromPoint(Point(rcInner.right - halfStroke, rc.bottom - halfStroke)));\r\n\t\t\t\t\tD2D1_ARC_SEGMENT segment{};\r\n\t\t\t\t\tsegment.point = DPointFromPoint(Point(rcInner.right - halfStroke, rc.top + halfStroke));\r\n\t\t\t\t\tsegment.size = D2D1::SizeF(radiusFill, radiusFill);\r\n\t\t\t\t\tsegment.rotationAngle = 0.0f;\r\n\t\t\t\t\tsegment.sweepDirection = D2D1_SWEEP_DIRECTION_COUNTER_CLOCKWISE;\r\n\t\t\t\t\tsegment.arcSize = D2D1_ARC_SIZE_SMALL;\r\n\t\t\t\t\tpSink->AddArc(segment);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tpSink->EndFigure(D2D1_FIGURE_END_CLOSED);\r\n\r\n\t\t\tpSink->Close();\r\n\t\t}\r\n\t\tReleaseUnknown(pSink);\r\n\t\tD2DPenColourAlpha(fillStroke.fill.colour);\r\n\t\tpRenderTarget->FillGeometry(pathGeometry, pBrush);\r\n\t\tD2DPenColourAlpha(fillStroke.stroke.colour);\r\n\t\tpRenderTarget->DrawGeometry(pathGeometry, pBrush, fillStroke.stroke.WidthF());\r\n\t\tReleaseUnknown(pathGeometry);\r\n\t}\r\n}\r\n\r\nvoid SurfaceD2D::Copy(PRectangle rc, Point from, Surface &surfaceSource) {\r\n\tSurfaceD2D &surfOther = dynamic_cast<SurfaceD2D &>(surfaceSource);\r\n\tID2D1Bitmap *pBitmap = nullptr;\r\n\tconst HRESULT hr = surfOther.GetBitmap(&pBitmap);\r\n\tif (SUCCEEDED(hr) && pBitmap) {\r\n\t\tconst D2D1_RECT_F rcDestination = RectangleFromPRectangle(rc);\r\n\t\tconst D2D1_RECT_F rcSource = RectangleFromPRectangle(PRectangle(\r\n\t\t\tfrom.x, from.y, from.x + rc.Width(), from.y + rc.Height()));\r\n\t\tpRenderTarget->DrawBitmap(pBitmap, rcDestination, 1.0f,\r\n\t\t\tD2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR, rcSource);\r\n\t\tReleaseUnknown(pBitmap);\r\n\t}\r\n}\r\n\r\nclass BlobInline final : public IDWriteInlineObject {\r\n\tXYPOSITION width;\r\n\r\n\t// IUnknown\r\n\tSTDMETHODIMP QueryInterface(REFIID riid, PVOID *ppv) override;\r\n\tSTDMETHODIMP_(ULONG)AddRef() override;\r\n\tSTDMETHODIMP_(ULONG)Release() override;\r\n\r\n\t// IDWriteInlineObject\r\n\tCOM_DECLSPEC_NOTHROW STDMETHODIMP Draw(\r\n\t\tvoid *clientDrawingContext,\r\n\t\tIDWriteTextRenderer *renderer,\r\n\t\tFLOAT originX,\r\n\t\tFLOAT originY,\r\n\t\tBOOL isSideways,\r\n\t\tBOOL isRightToLeft,\r\n\t\tIUnknown *clientDrawingEffect\r\n\t\t) override;\r\n\tCOM_DECLSPEC_NOTHROW STDMETHODIMP GetMetrics(DWRITE_INLINE_OBJECT_METRICS *metrics) override;\r\n\tCOM_DECLSPEC_NOTHROW STDMETHODIMP GetOverhangMetrics(DWRITE_OVERHANG_METRICS *overhangs) override;\r\n\tCOM_DECLSPEC_NOTHROW STDMETHODIMP GetBreakConditions(\r\n\t\tDWRITE_BREAK_CONDITION *breakConditionBefore,\r\n\t\tDWRITE_BREAK_CONDITION *breakConditionAfter) override;\r\npublic:\r\n\tBlobInline(XYPOSITION width_=0.0f) noexcept : width(width_) {\r\n\t}\r\n};\r\n\r\n/// Implement IUnknown\r\nSTDMETHODIMP BlobInline::QueryInterface(REFIID riid, PVOID *ppv) {\r\n\tif (!ppv)\r\n\t\treturn E_POINTER;\r\n\t// Never called so not checked.\r\n\t*ppv = nullptr;\r\n\tif (riid == IID_IUnknown)\r\n\t\t*ppv = this;\r\n\tif (riid == __uuidof(IDWriteInlineObject))\r\n\t\t*ppv = this;\r\n\tif (!*ppv)\r\n\t\treturn E_NOINTERFACE;\r\n\treturn S_OK;\r\n}\r\n\r\nSTDMETHODIMP_(ULONG) BlobInline::AddRef() {\r\n\t// Lifetime tied to Platform methods so ignore any reference operations.\r\n\treturn 1;\r\n}\r\n\r\nSTDMETHODIMP_(ULONG) BlobInline::Release() {\r\n\t// Lifetime tied to Platform methods so ignore any reference operations.\r\n\treturn 1;\r\n}\r\n\r\n/// Implement IDWriteInlineObject\r\nCOM_DECLSPEC_NOTHROW HRESULT STDMETHODCALLTYPE BlobInline::Draw(\r\n\tvoid*,\r\n\tIDWriteTextRenderer*,\r\n\tFLOAT,\r\n\tFLOAT,\r\n\tBOOL,\r\n\tBOOL,\r\n\tIUnknown*) {\r\n\t// Since not performing drawing, not necessary to implement\r\n\t// Could be implemented by calling back into platform-independent code.\r\n\t// This would allow more of the drawing to be mediated through DirectWrite.\r\n\treturn S_OK;\r\n}\r\n\r\nCOM_DECLSPEC_NOTHROW HRESULT STDMETHODCALLTYPE BlobInline::GetMetrics(\r\n\tDWRITE_INLINE_OBJECT_METRICS *metrics\r\n) {\r\n\tif (!metrics)\r\n\t\treturn E_POINTER;\r\n\tmetrics->width = static_cast<FLOAT>(width);\r\n\tmetrics->height = 2;\r\n\tmetrics->baseline = 1;\r\n\tmetrics->supportsSideways = FALSE;\r\n\treturn S_OK;\r\n}\r\n\r\nCOM_DECLSPEC_NOTHROW HRESULT STDMETHODCALLTYPE BlobInline::GetOverhangMetrics(\r\n\tDWRITE_OVERHANG_METRICS *overhangs\r\n) {\r\n\tif (!overhangs)\r\n\t\treturn E_POINTER;\r\n\toverhangs->left = 0;\r\n\toverhangs->top = 0;\r\n\toverhangs->right = 0;\r\n\toverhangs->bottom = 0;\r\n\treturn S_OK;\r\n}\r\n\r\nCOM_DECLSPEC_NOTHROW HRESULT STDMETHODCALLTYPE BlobInline::GetBreakConditions(\r\n\tDWRITE_BREAK_CONDITION *breakConditionBefore,\r\n\tDWRITE_BREAK_CONDITION *breakConditionAfter\r\n) {\r\n\tif (!breakConditionBefore || !breakConditionAfter)\r\n\t\treturn E_POINTER;\r\n\t// Since not performing 2D layout, not necessary to implement\r\n\t*breakConditionBefore = DWRITE_BREAK_CONDITION_NEUTRAL;\r\n\t*breakConditionAfter = DWRITE_BREAK_CONDITION_NEUTRAL;\r\n\treturn S_OK;\r\n}\r\n\r\nclass ScreenLineLayout : public IScreenLineLayout {\r\n\tIDWriteTextLayout *textLayout = nullptr;\r\n\tstd::string text;\r\n\tstd::wstring buffer;\r\n\tstd::vector<BlobInline> blobs;\r\n\tstatic void FillTextLayoutFormats(const IScreenLine *screenLine, IDWriteTextLayout *textLayout, std::vector<BlobInline> &blobs);\r\n\tstatic std::wstring ReplaceRepresentation(std::string_view text);\r\n\tstatic size_t GetPositionInLayout(std::string_view text, size_t position);\r\npublic:\r\n\tScreenLineLayout(const IScreenLine *screenLine);\r\n\t// Deleted so ScreenLineLayout objects can not be copied\r\n\tScreenLineLayout(const ScreenLineLayout &) = delete;\r\n\tScreenLineLayout(ScreenLineLayout &&) = delete;\r\n\tScreenLineLayout &operator=(const ScreenLineLayout &) = delete;\r\n\tScreenLineLayout &operator=(ScreenLineLayout &&) = delete;\r\n\t~ScreenLineLayout() noexcept override;\r\n\tsize_t PositionFromX(XYPOSITION xDistance, bool charPosition) override;\r\n\tXYPOSITION XFromPosition(size_t caretPosition) override;\r\n\tstd::vector<Interval> FindRangeIntervals(size_t start, size_t end) override;\r\n};\r\n\r\n// Each char can have its own style, so we fill the textLayout with the textFormat of each char\r\n\r\nvoid ScreenLineLayout::FillTextLayoutFormats(const IScreenLine *screenLine, IDWriteTextLayout *textLayout, std::vector<BlobInline> &blobs) {\r\n\t// Reserve enough entries up front so they are not moved and the pointers handed\r\n\t// to textLayout remain valid.\r\n\tconst ptrdiff_t numRepresentations = screenLine->RepresentationCount();\r\n\tstd::string_view text = screenLine->Text();\r\n\tconst ptrdiff_t numTabs = std::count(std::begin(text), std::end(text), '\\t');\r\n\tblobs.reserve(numRepresentations + numTabs);\r\n\r\n\tUINT32 layoutPosition = 0;\r\n\r\n\tfor (size_t bytePosition = 0; bytePosition < screenLine->Length();) {\r\n\t\tconst unsigned char uch = screenLine->Text()[bytePosition];\r\n\t\tconst unsigned int byteCount = UTF8BytesOfLead[uch];\r\n\t\tconst UINT32 codeUnits = UTF16LengthFromUTF8ByteCount(byteCount);\r\n\t\tconst DWRITE_TEXT_RANGE textRange = { layoutPosition, codeUnits };\r\n\r\n\t\tXYPOSITION representationWidth = screenLine->RepresentationWidth(bytePosition);\r\n\t\tif ((representationWidth == 0.0f) && (screenLine->Text()[bytePosition] == '\\t')) {\r\n\t\t\tD2D1_POINT_2F realPt {};\r\n\t\t\tDWRITE_HIT_TEST_METRICS realCaretMetrics {};\r\n\t\t\ttextLayout->HitTestTextPosition(\r\n\t\t\t\tlayoutPosition,\r\n\t\t\t\tfalse, // trailing if false, else leading edge\r\n\t\t\t\t&realPt.x,\r\n\t\t\t\t&realPt.y,\r\n\t\t\t\t&realCaretMetrics\r\n\t\t\t);\r\n\r\n\t\t\tconst XYPOSITION nextTab = screenLine->TabPositionAfter(realPt.x);\r\n\t\t\trepresentationWidth = nextTab - realPt.x;\r\n\t\t}\r\n\t\tif (representationWidth > 0.0f) {\r\n\t\t\tblobs.push_back(BlobInline(representationWidth));\r\n\t\t\ttextLayout->SetInlineObject(&blobs.back(), textRange);\r\n\t\t};\r\n\r\n\t\tconst FontDirectWrite *pfm =\r\n\t\t\tdynamic_cast<const FontDirectWrite *>(screenLine->FontOfPosition(bytePosition));\r\n\t\tif (!pfm) {\r\n\t\t\tthrow std::runtime_error(\"FillTextLayoutFormats: wrong Font type.\");\r\n\t\t}\r\n\r\n\t\tconst unsigned int fontFamilyNameSize = pfm->pTextFormat->GetFontFamilyNameLength();\r\n\t\tstd::wstring fontFamilyName(fontFamilyNameSize, 0);\r\n\t\tconst HRESULT hrFamily = pfm->pTextFormat->GetFontFamilyName(fontFamilyName.data(), fontFamilyNameSize + 1);\r\n\t\tif (SUCCEEDED(hrFamily)) {\r\n\t\t\ttextLayout->SetFontFamilyName(fontFamilyName.c_str(), textRange);\r\n\t\t}\r\n\r\n\t\ttextLayout->SetFontSize(pfm->pTextFormat->GetFontSize(), textRange);\r\n\t\ttextLayout->SetFontWeight(pfm->pTextFormat->GetFontWeight(), textRange);\r\n\t\ttextLayout->SetFontStyle(pfm->pTextFormat->GetFontStyle(), textRange);\r\n\r\n\t\tconst unsigned int localeNameSize = pfm->pTextFormat->GetLocaleNameLength();\r\n\t\tstd::wstring localeName(localeNameSize, 0);\r\n\t\tconst HRESULT hrLocale = pfm->pTextFormat->GetLocaleName(localeName.data(), localeNameSize + 1);\r\n\t\tif (SUCCEEDED(hrLocale)) {\r\n\t\t\ttextLayout->SetLocaleName(localeName.c_str(), textRange);\r\n\t\t}\r\n\r\n\t\ttextLayout->SetFontStretch(pfm->pTextFormat->GetFontStretch(), textRange);\r\n\r\n\t\tIDWriteFontCollection *fontCollection = nullptr;\r\n\t\tif (SUCCEEDED(pfm->pTextFormat->GetFontCollection(&fontCollection))) {\r\n\t\t\ttextLayout->SetFontCollection(fontCollection, textRange);\r\n\t\t}\r\n\r\n\t\tbytePosition += byteCount;\r\n\t\tlayoutPosition += codeUnits;\r\n\t}\r\n\r\n}\r\n\r\n/* Convert to a wide character string and replace tabs with X to stop DirectWrite tab expansion */\r\n\r\nstd::wstring ScreenLineLayout::ReplaceRepresentation(std::string_view text) {\r\n\tconst TextWide wideText(text, CpUtf8);\r\n\tstd::wstring ws(wideText.buffer, wideText.tlen);\r\n\tstd::replace(ws.begin(), ws.end(), L'\\t', L'X');\r\n\treturn ws;\r\n}\r\n\r\n// Finds the position in the wide character version of the text.\r\n\r\nsize_t ScreenLineLayout::GetPositionInLayout(std::string_view text, size_t position) {\r\n\tconst std::string_view textUptoPosition = text.substr(0, position);\r\n\treturn UTF16Length(textUptoPosition);\r\n}\r\n\r\nScreenLineLayout::ScreenLineLayout(const IScreenLine *screenLine) {\r\n\t// If the text is empty, then no need to go through this function\r\n\tif (!screenLine || !screenLine->Length())\r\n\t\treturn;\r\n\r\n\ttext = screenLine->Text();\r\n\r\n\t// Get textFormat\r\n\tconst FontDirectWrite *pfm = FontDirectWrite::Cast(screenLine->FontOfPosition(0));\r\n\tif (!pfm->pTextFormat) {\r\n\t\treturn;\r\n\t}\r\n\r\n\t// Convert the string to wstring and replace the original control characters with their representative chars.\r\n\tbuffer = ReplaceRepresentation(screenLine->Text());\r\n\r\n\t// Create a text layout\r\n\tconst HRESULT hrCreate = pIDWriteFactory->CreateTextLayout(\r\n\t\tbuffer.c_str(),\r\n\t\tstatic_cast<UINT32>(buffer.length()),\r\n\t\tpfm->pTextFormat,\r\n\t\tstatic_cast<FLOAT>(screenLine->Width()),\r\n\t\tstatic_cast<FLOAT>(screenLine->Height()),\r\n\t\t&textLayout);\r\n\tif (!SUCCEEDED(hrCreate)) {\r\n\t\treturn;\r\n\t}\r\n\r\n\t// Fill the textLayout chars with their own formats\r\n\tFillTextLayoutFormats(screenLine, textLayout, blobs);\r\n}\r\n\r\nScreenLineLayout::~ScreenLineLayout() noexcept {\r\n\tReleaseUnknown(textLayout);\r\n}\r\n\r\n// Get the position from the provided x\r\n\r\nsize_t ScreenLineLayout::PositionFromX(XYPOSITION xDistance, bool charPosition) {\r\n\tif (!textLayout) {\r\n\t\treturn 0;\r\n\t}\r\n\r\n\t// Returns the text position corresponding to the mouse x,y.\r\n\t// If hitting the trailing side of a cluster, return the\r\n\t// leading edge of the following text position.\r\n\r\n\tBOOL isTrailingHit = FALSE;\r\n\tBOOL isInside = FALSE;\r\n\tDWRITE_HIT_TEST_METRICS caretMetrics {};\r\n\r\n\ttextLayout->HitTestPoint(\r\n\t\tstatic_cast<FLOAT>(xDistance),\r\n\t\t0.0f,\r\n\t\t&isTrailingHit,\r\n\t\t&isInside,\r\n\t\t&caretMetrics\r\n\t);\r\n\r\n\tDWRITE_HIT_TEST_METRICS hitTestMetrics {};\r\n\tif (isTrailingHit) {\r\n\t\tFLOAT caretX = 0.0f;\r\n\t\tFLOAT caretY = 0.0f;\r\n\r\n\t\t// Uses hit-testing to align the current caret position to a whole cluster,\r\n\t\t// rather than residing in the middle of a base character + diacritic,\r\n\t\t// surrogate pair, or character + UVS.\r\n\r\n\t\t// Align the caret to the nearest whole cluster.\r\n\t\ttextLayout->HitTestTextPosition(\r\n\t\t\tcaretMetrics.textPosition,\r\n\t\t\tfalse,\r\n\t\t\t&caretX,\r\n\t\t\t&caretY,\r\n\t\t\t&hitTestMetrics\r\n\t\t);\r\n\t}\r\n\r\n\tsize_t pos;\r\n\tif (charPosition) {\r\n\t\tpos = isTrailingHit ? hitTestMetrics.textPosition : caretMetrics.textPosition;\r\n\t} else {\r\n\t\tpos = isTrailingHit ? static_cast<size_t>(hitTestMetrics.textPosition) + hitTestMetrics.length : caretMetrics.textPosition;\r\n\t}\r\n\r\n\t// Get the character position in original string\r\n\treturn UTF8PositionFromUTF16Position(text, pos);\r\n}\r\n\r\n// Finds the point of the caret position\r\n\r\nXYPOSITION ScreenLineLayout::XFromPosition(size_t caretPosition) {\r\n\tif (!textLayout) {\r\n\t\treturn 0.0;\r\n\t}\r\n\t// Convert byte positions to wchar_t positions\r\n\tconst size_t position = GetPositionInLayout(text, caretPosition);\r\n\r\n\t// Translate text character offset to point x,y.\r\n\tDWRITE_HIT_TEST_METRICS caretMetrics {};\r\n\tD2D1_POINT_2F pt {};\r\n\r\n\ttextLayout->HitTestTextPosition(\r\n\t\tstatic_cast<UINT32>(position),\r\n\t\tfalse, // trailing if false, else leading edge\r\n\t\t&pt.x,\r\n\t\t&pt.y,\r\n\t\t&caretMetrics\r\n\t);\r\n\r\n\treturn pt.x;\r\n}\r\n\r\n// Find the selection range rectangles\r\n\r\nstd::vector<Interval> ScreenLineLayout::FindRangeIntervals(size_t start, size_t end) {\r\n\tstd::vector<Interval> ret;\r\n\r\n\tif (!textLayout || (start == end)) {\r\n\t\treturn ret;\r\n\t}\r\n\r\n\t// Convert byte positions to wchar_t positions\r\n\tconst size_t startPos = GetPositionInLayout(text, start);\r\n\tconst size_t endPos = GetPositionInLayout(text, end);\r\n\r\n\t// Find selection range length\r\n\tconst size_t rangeLength = (endPos > startPos) ? (endPos - startPos) : (startPos - endPos);\r\n\r\n\t// Determine actual number of hit-test ranges\r\n\tUINT32 actualHitTestCount = 0;\r\n\r\n\t// First try with 2 elements and if more needed, allocate.\r\n\tstd::vector<DWRITE_HIT_TEST_METRICS> hitTestMetrics(2);\r\n\ttextLayout->HitTestTextRange(\r\n\t\tstatic_cast<UINT32>(startPos),\r\n\t\tstatic_cast<UINT32>(rangeLength),\r\n\t\t0, // x\r\n\t\t0, // y\r\n\t\thitTestMetrics.data(),\r\n\t\tstatic_cast<UINT32>(hitTestMetrics.size()),\r\n\t\t&actualHitTestCount\r\n\t);\r\n\r\n\tif (actualHitTestCount == 0) {\r\n\t\treturn ret;\r\n\t}\r\n\r\n\tif (hitTestMetrics.size() < actualHitTestCount) {\r\n\t\t// Allocate enough room to return all hit-test metrics.\r\n\t\thitTestMetrics.resize(actualHitTestCount);\r\n\t\ttextLayout->HitTestTextRange(\r\n\t\t\tstatic_cast<UINT32>(startPos),\r\n\t\t\tstatic_cast<UINT32>(rangeLength),\r\n\t\t\t0, // x\r\n\t\t\t0, // y\r\n\t\t\thitTestMetrics.data(),\r\n\t\t\tstatic_cast<UINT32>(hitTestMetrics.size()),\r\n\t\t\t&actualHitTestCount\r\n\t\t);\r\n\t}\r\n\r\n\t// Get the selection ranges behind the text.\r\n\r\n\tfor (size_t i = 0; i < actualHitTestCount; ++i) {\r\n\t\t// Store selection rectangle\r\n\t\tconst DWRITE_HIT_TEST_METRICS &htm = hitTestMetrics[i];\r\n\t\tconst Interval selectionInterval { htm.left, htm.left + htm.width };\r\n\t\tret.push_back(selectionInterval);\r\n\t}\r\n\r\n\treturn ret;\r\n}\r\n\r\nstd::unique_ptr<IScreenLineLayout> SurfaceD2D::Layout(const IScreenLine *screenLine) {\r\n\treturn std::make_unique<ScreenLineLayout>(screenLine);\r\n}\r\n\r\nvoid SurfaceD2D::DrawTextCommon(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, int codePageOverride, UINT fuOptions) {\r\n\tconst FontDirectWrite *pfm = FontDirectWrite::Cast(font_);\r\n\tif (pfm->pTextFormat && pRenderTarget && pBrush) {\r\n\t\t// Use Unicode calls\r\n\t\tconst int codePageDraw = codePageOverride ? codePageOverride : pfm->CodePageText(mode.codePage);\r\n\t\tconst TextWide tbuf(text, codePageDraw);\r\n\r\n\t\tSetFontQuality(pfm->extraFontFlag);\r\n\t\tif (fuOptions & ETO_CLIPPED) {\r\n\t\t\tconst D2D1_RECT_F rcClip = RectangleFromPRectangle(rc);\r\n\t\t\tpRenderTarget->PushAxisAlignedClip(rcClip, D2D1_ANTIALIAS_MODE_ALIASED);\r\n\t\t}\r\n\r\n\t\t// Explicitly creating a text layout appears a little faster\r\n\t\tIDWriteTextLayout *pTextLayout = nullptr;\r\n\t\tconst HRESULT hr = pIDWriteFactory->CreateTextLayout(\r\n\t\t\t\ttbuf.buffer,\r\n\t\t\t\ttbuf.tlen,\r\n\t\t\t\tpfm->pTextFormat,\r\n\t\t\t\tstatic_cast<FLOAT>(rc.Width()),\r\n\t\t\t\tstatic_cast<FLOAT>(rc.Height()),\r\n\t\t\t\t&pTextLayout);\r\n\t\tif (SUCCEEDED(hr)) {\r\n\t\t\tconst D2D1_POINT_2F origin = DPointFromPoint(Point(rc.left, ybase - pfm->yAscent));\r\n\t\t\tpRenderTarget->DrawTextLayout(origin, pTextLayout, pBrush, d2dDrawTextOptions);\r\n\t\t\tReleaseUnknown(pTextLayout);\r\n\t\t}\r\n\r\n\t\tif (fuOptions & ETO_CLIPPED) {\r\n\t\t\tpRenderTarget->PopAxisAlignedClip();\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid SurfaceD2D::DrawTextNoClip(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text,\r\n\tColourRGBA fore, ColourRGBA back) {\r\n\tif (pRenderTarget) {\r\n\t\tFillRectangleAligned(rc, back);\r\n\t\tD2DPenColourAlpha(fore);\r\n\t\tDrawTextCommon(rc, font_, ybase, text, 0, ETO_OPAQUE);\r\n\t}\r\n}\r\n\r\nvoid SurfaceD2D::DrawTextClipped(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text,\r\n\tColourRGBA fore, ColourRGBA back) {\r\n\tif (pRenderTarget) {\r\n\t\tFillRectangleAligned(rc, back);\r\n\t\tD2DPenColourAlpha(fore);\r\n\t\tDrawTextCommon(rc, font_, ybase, text, 0, ETO_OPAQUE | ETO_CLIPPED);\r\n\t}\r\n}\r\n\r\nvoid SurfaceD2D::DrawTextTransparent(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text,\r\n\tColourRGBA fore) {\r\n\t// Avoid drawing spaces in transparent mode\r\n\tfor (const char ch : text) {\r\n\t\tif (ch != ' ') {\r\n\t\t\tif (pRenderTarget) {\r\n\t\t\t\tD2DPenColourAlpha(fore);\r\n\t\t\t\tDrawTextCommon(rc, font_, ybase, text, 0, 0);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nnamespace {\r\n\r\nHRESULT MeasurePositions(TextPositions &poses, const TextWide &tbuf, IDWriteTextFormat *pTextFormat) {\r\n\tif (!pTextFormat) {\r\n\t\t// Unexpected failure like no access to DirectWrite so give up.\r\n\t\treturn E_FAIL;\r\n\t}\r\n\r\n\t// Initialize poses for safety.\r\n\tstd::fill(poses.buffer, poses.buffer + tbuf.tlen, 0.0f);\r\n\t// Create a layout\r\n\tIDWriteTextLayout *pTextLayout = nullptr;\r\n\tconst HRESULT hrCreate = pIDWriteFactory->CreateTextLayout(tbuf.buffer, tbuf.tlen, pTextFormat, 10000.0, 1000.0, &pTextLayout);\r\n\tif (!SUCCEEDED(hrCreate)) {\r\n\t\treturn hrCreate;\r\n\t}\r\n\tif (!pTextLayout) {\r\n\t\treturn E_FAIL;\r\n\t}\r\n\tVarBuffer<DWRITE_CLUSTER_METRICS, stackBufferLength> cm(tbuf.tlen);\r\n\tUINT32 count = 0;\r\n\tconst HRESULT hrGetCluster = pTextLayout->GetClusterMetrics(cm.buffer, tbuf.tlen, &count);\r\n\tReleaseUnknown(pTextLayout);\r\n\tif (!SUCCEEDED(hrGetCluster)) {\r\n\t\treturn hrGetCluster;\r\n\t}\r\n\tconst DWRITE_CLUSTER_METRICS * const clusterMetrics = cm.buffer;\r\n\t// A cluster may be more than one WCHAR, such as for \"ffi\" which is a ligature in the Candara font\r\n\tXYPOSITION position = 0.0;\r\n\tint ti=0;\r\n\tfor (unsigned int ci=0; ci<count; ci++) {\r\n\t\tfor (unsigned int inCluster=0; inCluster<clusterMetrics[ci].length; inCluster++) {\r\n\t\t\tposes.buffer[ti++] = position + clusterMetrics[ci].width * (inCluster + 1) / clusterMetrics[ci].length;\r\n\t\t}\r\n\t\tposition += clusterMetrics[ci].width;\r\n\t}\r\n\tPLATFORM_ASSERT(ti == tbuf.tlen);\r\n\treturn S_OK;\r\n}\r\n\r\n}\r\n\r\nvoid SurfaceD2D::MeasureWidths(const Font *font_, std::string_view text, XYPOSITION *positions) {\r\n\tconst FontDirectWrite *pfm = FontDirectWrite::Cast(font_);\r\n\tconst int codePageText = pfm->CodePageText(mode.codePage);\r\n\tconst TextWide tbuf(text, codePageText);\r\n\tTextPositions poses(tbuf.tlen);\r\n\tif (FAILED(MeasurePositions(poses, tbuf, pfm->pTextFormat))) {\r\n\t\treturn;\r\n\t}\r\n\tif (codePageText == CpUtf8) {\r\n\t\t// Map the widths given for UTF-16 characters back onto the UTF-8 input string\r\n\t\tsize_t i = 0;\r\n\t\tfor (int ui = 0; ui < tbuf.tlen; ui++) {\r\n\t\t\tconst unsigned char uch = text[i];\r\n\t\t\tconst unsigned int byteCount = UTF8BytesOfLead[uch];\r\n\t\t\tif (byteCount == 4) {\t// Non-BMP\r\n\t\t\t\tui++;\r\n\t\t\t}\r\n\t\t\tfor (unsigned int bytePos=0; (bytePos<byteCount) && (i<text.length()) && (ui<tbuf.tlen); bytePos++) {\r\n\t\t\t\tpositions[i++] = poses.buffer[ui];\r\n\t\t\t}\r\n\t\t}\r\n\t\tconst XYPOSITION lastPos = (i > 0) ? positions[i - 1] : 0.0;\r\n\t\twhile (i<text.length()) {\r\n\t\t\tpositions[i++] = lastPos;\r\n\t\t}\r\n\t} else if (!IsDBCSCodePage(codePageText)) {\r\n\r\n\t\t// One char per position\r\n\t\tPLATFORM_ASSERT(text.length() == static_cast<size_t>(tbuf.tlen));\r\n\t\tfor (int kk=0; kk<tbuf.tlen; kk++) {\r\n\t\t\tpositions[kk] = poses.buffer[kk];\r\n\t\t}\r\n\r\n\t} else {\r\n\r\n\t\t// May be one or two bytes per position\r\n\t\tint ui = 0;\r\n\t\tfor (size_t i=0; i<text.length() && ui<tbuf.tlen;) {\r\n\t\t\tpositions[i] = poses.buffer[ui];\r\n\t\t\tif (DBCSIsLeadByte(codePageText, text[i])) {\r\n\t\t\t\tpositions[i+1] = poses.buffer[ui];\r\n\t\t\t\ti += 2;\r\n\t\t\t} else {\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\r\n\t\t\tui++;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nXYPOSITION SurfaceD2D::WidthText(const Font *font_, std::string_view text) {\r\n\tFLOAT width = 1.0;\r\n\tconst FontDirectWrite *pfm = FontDirectWrite::Cast(font_);\r\n\tif (pfm->pTextFormat) {\r\n\t\tconst TextWide tbuf(text, pfm->CodePageText(mode.codePage));\r\n\t\t// Create a layout\r\n\t\tIDWriteTextLayout *pTextLayout = nullptr;\r\n\t\tconst HRESULT hr = pIDWriteFactory->CreateTextLayout(tbuf.buffer, tbuf.tlen, pfm->pTextFormat, 1000.0, 1000.0, &pTextLayout);\r\n\t\tif (SUCCEEDED(hr) && pTextLayout) {\r\n\t\t\tDWRITE_TEXT_METRICS textMetrics;\r\n\t\t\tif (SUCCEEDED(pTextLayout->GetMetrics(&textMetrics)))\r\n\t\t\t\twidth = textMetrics.widthIncludingTrailingWhitespace;\r\n\t\t\tReleaseUnknown(pTextLayout);\r\n\t\t}\r\n\t}\r\n\treturn width;\r\n}\r\n\r\nvoid SurfaceD2D::DrawTextNoClipUTF8(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text,\r\n\tColourRGBA fore, ColourRGBA back) {\r\n\tif (pRenderTarget) {\r\n\t\tFillRectangleAligned(rc, back);\r\n\t\tD2DPenColourAlpha(fore);\r\n\t\tDrawTextCommon(rc, font_, ybase, text, CpUtf8, ETO_OPAQUE);\r\n\t}\r\n}\r\n\r\nvoid SurfaceD2D::DrawTextClippedUTF8(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text,\r\n\tColourRGBA fore, ColourRGBA back) {\r\n\tif (pRenderTarget) {\r\n\t\tFillRectangleAligned(rc, back);\r\n\t\tD2DPenColourAlpha(fore);\r\n\t\tDrawTextCommon(rc, font_, ybase, text, CpUtf8, ETO_OPAQUE | ETO_CLIPPED);\r\n\t}\r\n}\r\n\r\nvoid SurfaceD2D::DrawTextTransparentUTF8(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text,\r\n\tColourRGBA fore) {\r\n\t// Avoid drawing spaces in transparent mode\r\n\tfor (const char ch : text) {\r\n\t\tif (ch != ' ') {\r\n\t\t\tif (pRenderTarget) {\r\n\t\t\t\tD2DPenColourAlpha(fore);\r\n\t\t\t\tDrawTextCommon(rc, font_, ybase, text, CpUtf8, 0);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid SurfaceD2D::MeasureWidthsUTF8(const Font *font_, std::string_view text, XYPOSITION *positions) {\r\n\tconst FontDirectWrite *pfm = FontDirectWrite::Cast(font_);\r\n\tconst TextWide tbuf(text, CpUtf8);\r\n\tTextPositions poses(tbuf.tlen);\r\n\tif (FAILED(MeasurePositions(poses, tbuf, pfm->pTextFormat))) {\r\n\t\treturn;\r\n\t}\r\n\t// Map the widths given for UTF-16 characters back onto the UTF-8 input string\r\n\tsize_t i = 0;\r\n\tfor (int ui = 0; ui < tbuf.tlen; ui++) {\r\n\t\tconst unsigned char uch = text[i];\r\n\t\tconst unsigned int byteCount = UTF8BytesOfLead[uch];\r\n\t\tif (byteCount == 4) {\t// Non-BMP\r\n\t\t\tui++;\r\n\t\t\tPLATFORM_ASSERT(ui < tbuf.tlen);\r\n\t\t}\r\n\t\tfor (unsigned int bytePos=0; (bytePos<byteCount) && (i<text.length()) && (ui < tbuf.tlen); bytePos++) {\r\n\t\t\tpositions[i++] = poses.buffer[ui];\r\n\t\t}\r\n\t}\r\n\tconst XYPOSITION lastPos = (i > 0) ? positions[i - 1] : 0.0;\r\n\twhile (i < text.length()) {\r\n\t\tpositions[i++] = lastPos;\r\n\t}\r\n}\r\n\r\nXYPOSITION SurfaceD2D::WidthTextUTF8(const Font * font_, std::string_view text) {\r\n\tFLOAT width = 1.0;\r\n\tconst FontDirectWrite *pfm = FontDirectWrite::Cast(font_);\r\n\tif (pfm->pTextFormat) {\r\n\t\tconst TextWide tbuf(text, CpUtf8);\r\n\t\t// Create a layout\r\n\t\tIDWriteTextLayout *pTextLayout = nullptr;\r\n\t\tconst HRESULT hr = pIDWriteFactory->CreateTextLayout(tbuf.buffer, tbuf.tlen, pfm->pTextFormat, 1000.0, 1000.0, &pTextLayout);\r\n\t\tif (SUCCEEDED(hr)) {\r\n\t\t\tDWRITE_TEXT_METRICS textMetrics;\r\n\t\t\tif (SUCCEEDED(pTextLayout->GetMetrics(&textMetrics)))\r\n\t\t\t\twidth = textMetrics.widthIncludingTrailingWhitespace;\r\n\t\t\tReleaseUnknown(pTextLayout);\r\n\t\t}\r\n\t}\r\n\treturn width;\r\n}\r\n\r\nXYPOSITION SurfaceD2D::Ascent(const Font *font_) {\r\n\tconst FontDirectWrite *pfm = FontDirectWrite::Cast(font_);\r\n\treturn std::ceil(pfm->yAscent);\r\n}\r\n\r\nXYPOSITION SurfaceD2D::Descent(const Font *font_) {\r\n\tconst FontDirectWrite *pfm = FontDirectWrite::Cast(font_);\r\n\treturn std::ceil(pfm->yDescent);\r\n}\r\n\r\nXYPOSITION SurfaceD2D::InternalLeading(const Font *font_) {\r\n\tconst FontDirectWrite *pfm = FontDirectWrite::Cast(font_);\r\n\treturn std::floor(pfm->yInternalLeading);\r\n}\r\n\r\nXYPOSITION SurfaceD2D::Height(const Font *font_) {\r\n\tconst FontDirectWrite *pfm = FontDirectWrite::Cast(font_);\r\n\treturn std::ceil(pfm->yAscent) + std::ceil(pfm->yDescent);\r\n}\r\n\r\nXYPOSITION SurfaceD2D::AverageCharWidth(const Font *font_) {\r\n\tFLOAT width = 1.0;\r\n\tconst FontDirectWrite *pfm = FontDirectWrite::Cast(font_);\r\n\tif (pfm->pTextFormat) {\r\n\t\t// Create a layout\r\n\t\tIDWriteTextLayout *pTextLayout = nullptr;\r\n\t\tstatic constexpr WCHAR wszAllAlpha[] = L\"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\";\r\n\t\tconst size_t lenAllAlpha = wcslen(wszAllAlpha);\r\n\t\tconst HRESULT hr = pIDWriteFactory->CreateTextLayout(wszAllAlpha, static_cast<UINT32>(lenAllAlpha),\r\n\t\t\tpfm->pTextFormat, 1000.0, 1000.0, &pTextLayout);\r\n\t\tif (SUCCEEDED(hr) && pTextLayout) {\r\n\t\t\tDWRITE_TEXT_METRICS textMetrics;\r\n\t\t\tif (SUCCEEDED(pTextLayout->GetMetrics(&textMetrics)))\r\n\t\t\t\twidth = textMetrics.width / lenAllAlpha;\r\n\t\t\tReleaseUnknown(pTextLayout);\r\n\t\t}\r\n\t}\r\n\treturn width;\r\n}\r\n\r\nvoid SurfaceD2D::SetClip(PRectangle rc) {\r\n\tif (pRenderTarget) {\r\n\t\tconst D2D1_RECT_F rcClip = RectangleFromPRectangle(rc);\r\n\t\tpRenderTarget->PushAxisAlignedClip(rcClip, D2D1_ANTIALIAS_MODE_ALIASED);\r\n\t\tclipsActive++;\r\n\t}\r\n}\r\n\r\nvoid SurfaceD2D::PopClip() {\r\n\tif (pRenderTarget) {\r\n\t\tPLATFORM_ASSERT(clipsActive > 0);\r\n\t\tpRenderTarget->PopAxisAlignedClip();\r\n\t\tclipsActive--;\r\n\t}\r\n}\r\n\r\nvoid SurfaceD2D::FlushCachedState() {\r\n}\r\n\r\nvoid SurfaceD2D::FlushDrawing() {\r\n\tif (pRenderTarget) {\r\n\t\tpRenderTarget->Flush();\r\n\t}\r\n}\r\n\r\nvoid SurfaceD2D::SetRenderingParams(std::shared_ptr<RenderingParams> renderingParams_) {\r\n\trenderingParams = std::move(renderingParams_);\r\n}\r\n\r\n#endif\r\n\r\nstd::unique_ptr<Surface> Surface::Allocate(Technology technology) {\r\n#if defined(USE_D2D)\r\n\tif (technology == Technology::Default)\r\n\t\treturn std::make_unique<SurfaceGDI>();\r\n\telse\r\n\t\treturn std::make_unique<SurfaceD2D>();\r\n#else\r\n\treturn std::make_unique<SurfaceGDI>();\r\n#endif\r\n}\r\n\r\nWindow::~Window() noexcept {\r\n}\r\n\r\nvoid Window::Destroy() noexcept {\r\n\tif (wid)\r\n\t\t::DestroyWindow(HwndFromWindowID(wid));\r\n\twid = nullptr;\r\n}\r\n\r\nPRectangle Window::GetPosition() const {\r\n\tRECT rc;\r\n\t::GetWindowRect(HwndFromWindowID(wid), &rc);\r\n\treturn PRectangle::FromInts(rc.left, rc.top, rc.right, rc.bottom);\r\n}\r\n\r\nvoid Window::SetPosition(PRectangle rc) {\r\n\t::SetWindowPos(HwndFromWindowID(wid),\r\n\t\t0, static_cast<int>(rc.left), static_cast<int>(rc.top),\r\n\t\tstatic_cast<int>(rc.Width()), static_cast<int>(rc.Height()), SWP_NOZORDER | SWP_NOACTIVATE);\r\n}\r\n\r\nnamespace {\r\n\r\nRECT RectFromMonitor(HMONITOR hMonitor) noexcept {\r\n\tMONITORINFO mi = {};\r\n\tmi.cbSize = sizeof(mi);\r\n\tif (GetMonitorInfo(hMonitor, &mi)) {\r\n\t\treturn mi.rcWork;\r\n\t}\r\n\tRECT rc = {0, 0, 0, 0};\r\n\tif (::SystemParametersInfoA(SPI_GETWORKAREA, 0, &rc, 0) == 0) {\r\n\t\trc.left = 0;\r\n\t\trc.top = 0;\r\n\t\trc.right = 0;\r\n\t\trc.bottom = 0;\r\n\t}\r\n\treturn rc;\r\n}\r\n\r\n}\r\n\r\nvoid Window::SetPositionRelative(PRectangle rc, const Window *relativeTo) {\r\n\tconst DWORD style = GetWindowStyle(HwndFromWindowID(wid));\r\n\tif (style & WS_POPUP) {\r\n\t\tPOINT ptOther = {0, 0};\r\n\t\t::ClientToScreen(HwndFromWindow(*relativeTo), &ptOther);\r\n\t\trc.Move(static_cast<XYPOSITION>(ptOther.x), static_cast<XYPOSITION>(ptOther.y));\r\n\r\n\t\tconst RECT rcMonitor = RectFromPRectangle(rc);\r\n\r\n\t\tHMONITOR hMonitor = MonitorFromRect(&rcMonitor, MONITOR_DEFAULTTONEAREST);\r\n\t\t// If hMonitor is NULL, that's just the main screen anyways.\r\n\t\tconst RECT rcWork = RectFromMonitor(hMonitor);\r\n\r\n\t\tif (rcWork.left < rcWork.right) {\r\n\t\t\t// Now clamp our desired rectangle to fit inside the work area\r\n\t\t\t// This way, the menu will fit wholly on one screen. An improvement even\r\n\t\t\t// if you don't have a second monitor on the left... Menu's appears half on\r\n\t\t\t// one screen and half on the other are just U.G.L.Y.!\r\n\t\t\tif (rc.right > rcWork.right)\r\n\t\t\t\trc.Move(rcWork.right - rc.right, 0);\r\n\t\t\tif (rc.bottom > rcWork.bottom)\r\n\t\t\t\trc.Move(0, rcWork.bottom - rc.bottom);\r\n\t\t\tif (rc.left < rcWork.left)\r\n\t\t\t\trc.Move(rcWork.left - rc.left, 0);\r\n\t\t\tif (rc.top < rcWork.top)\r\n\t\t\t\trc.Move(0, rcWork.top - rc.top);\r\n\t\t}\r\n\t}\r\n\tSetPosition(rc);\r\n}\r\n\r\nPRectangle Window::GetClientPosition() const {\r\n\tRECT rc={0,0,0,0};\r\n\tif (wid)\r\n\t\t::GetClientRect(HwndFromWindowID(wid), &rc);\r\n\treturn PRectangle::FromInts(rc.left, rc.top, rc.right, rc.bottom);\r\n}\r\n\r\nvoid Window::Show(bool show) {\r\n\tif (show)\r\n\t\t::ShowWindow(HwndFromWindowID(wid), SW_SHOWNOACTIVATE);\r\n\telse\r\n\t\t::ShowWindow(HwndFromWindowID(wid), SW_HIDE);\r\n}\r\n\r\nvoid Window::InvalidateAll() {\r\n\t::InvalidateRect(HwndFromWindowID(wid), nullptr, FALSE);\r\n}\r\n\r\nvoid Window::InvalidateRectangle(PRectangle rc) {\r\n\tconst RECT rcw = RectFromPRectangle(rc);\r\n\t::InvalidateRect(HwndFromWindowID(wid), &rcw, FALSE);\r\n}\r\n\r\nHCURSOR LoadReverseArrowCursor(UINT dpi, int cursorBaseSize) noexcept {\r\n\tclass CursorHelper {\r\n\tpublic:\r\n\t\tICONINFO info{};\r\n\t\tBITMAP bmp{};\r\n\t\tbool HasBitmap() const noexcept {\r\n\t\t\treturn bmp.bmWidth > 0;\r\n\t\t}\r\n\r\n\t\tCursorHelper(const HCURSOR cursor) noexcept {\r\n\t\t\tInit(cursor);\r\n\t\t}\r\n\t\t~CursorHelper() {\r\n\t\t\tCleanUp();\r\n\t\t}\r\n\r\n\t\tCursorHelper &operator=(const HCURSOR cursor) noexcept {\r\n\t\t\tCleanUp();\r\n\t\t\tInit(cursor);\r\n\t\t\treturn *this;\r\n\t\t}\r\n\r\n\t\tbool MatchesSize(const int width, const int height) noexcept {\r\n\t\t\treturn bmp.bmWidth == width && bmp.bmHeight == height;\r\n\t\t}\r\n\r\n\t\tHCURSOR CreateFlippedCursor() noexcept {\r\n\t\t\tif (info.hbmMask)\r\n\t\t\t\tFlipBitmap(info.hbmMask, bmp.bmWidth, bmp.bmHeight);\r\n\t\t\tif (info.hbmColor)\r\n\t\t\t\tFlipBitmap(info.hbmColor, bmp.bmWidth, bmp.bmHeight);\r\n\t\t\tinfo.xHotspot = bmp.bmWidth - 1 - info.xHotspot;\r\n\r\n\t\t\treturn ::CreateIconIndirect(&info);\r\n\t\t}\r\n\r\n\tprivate:\r\n\t\tvoid Init(const HCURSOR &cursor) noexcept {\r\n\t\t\tif (::GetIconInfo(cursor, &info)) {\r\n\t\t\t\t::GetObject(info.hbmMask, sizeof(bmp), &bmp);\r\n\t\t\t\tPLATFORM_ASSERT(HasBitmap());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvoid CleanUp() noexcept {\r\n\t\t\tif (info.hbmMask)\r\n\t\t\t\t::DeleteObject(info.hbmMask);\r\n\t\t\tif (info.hbmColor)\r\n\t\t\t\t::DeleteObject(info.hbmColor);\r\n\t\t\tinfo = {};\r\n\t\t\tbmp = {};\r\n\t\t}\r\n\r\n\t\tstatic void FlipBitmap(const HBITMAP bitmap, const int width, const int height) noexcept {\r\n\t\t\tHDC hdc = ::CreateCompatibleDC({});\r\n\t\t\tif (hdc) {\r\n\t\t\t\tHBITMAP prevBmp = SelectBitmap(hdc, bitmap);\r\n\t\t\t\t::StretchBlt(hdc, width - 1, 0, -width, height, hdc, 0, 0, width, height, SRCCOPY);\r\n\t\t\t\tSelectBitmap(hdc, prevBmp);\r\n\t\t\t\t::DeleteDC(hdc);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tHCURSOR reverseArrowCursor {};\r\n\r\n\tint width;\r\n\tint height;\r\n\tif (cursorBaseSize > defaultCursorBaseSize) {\r\n\t\twidth = ::MulDiv(cursorBaseSize, dpi, USER_DEFAULT_SCREEN_DPI);\r\n\t\theight = width;\r\n\t} else {\r\n\t\twidth = SystemMetricsForDpi(SM_CXCURSOR, dpi);\r\n\t\theight = SystemMetricsForDpi(SM_CYCURSOR, dpi);\r\n\t}\r\n\r\n\tDPI_AWARENESS_CONTEXT oldContext = nullptr;\r\n\tif (fnAreDpiAwarenessContextsEqual && fnAreDpiAwarenessContextsEqual(fnGetThreadDpiAwarenessContext(), DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED)) {\r\n\t\toldContext = fnSetThreadDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2);\r\n\t\tPLATFORM_ASSERT(oldContext != nullptr);\r\n\t}\r\n\r\n\tconst HCURSOR cursor = static_cast<HCURSOR>(::LoadImage({}, IDC_ARROW, IMAGE_CURSOR, width, height, LR_SHARED));\r\n\tif (cursor) {\r\n\t\tCursorHelper cursorHelper(cursor);\r\n\r\n\t\tif (cursorHelper.HasBitmap() && !cursorHelper.MatchesSize(width, height)) {\r\n\t\t\tconst HCURSOR copy = static_cast<HCURSOR>(::CopyImage(cursor, IMAGE_CURSOR, width, height, LR_COPYFROMRESOURCE | LR_COPYRETURNORG));\r\n\t\t\tif (copy) {\r\n\t\t\t\tcursorHelper = copy;\r\n\t\t\t\t::DestroyCursor(copy);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (cursorHelper.HasBitmap()) {\r\n\t\t\treverseArrowCursor = cursorHelper.CreateFlippedCursor();\r\n\t\t}\r\n\t}\r\n\r\n\tif (oldContext) {\r\n\t\tfnSetThreadDpiAwarenessContext(oldContext);\r\n\t}\r\n\r\n\treturn reverseArrowCursor;\r\n}\r\n\r\nvoid Window::SetCursor(Cursor curs) {\r\n\tswitch (curs) {\r\n\tcase Cursor::text:\r\n\t\t::SetCursor(::LoadCursor(NULL,IDC_IBEAM));\r\n\t\tbreak;\r\n\tcase Cursor::up:\r\n\t\t::SetCursor(::LoadCursor(NULL,IDC_UPARROW));\r\n\t\tbreak;\r\n\tcase Cursor::wait:\r\n\t\t::SetCursor(::LoadCursor(NULL,IDC_WAIT));\r\n\t\tbreak;\r\n\tcase Cursor::horizontal:\r\n\t\t::SetCursor(::LoadCursor(NULL,IDC_SIZEWE));\r\n\t\tbreak;\r\n\tcase Cursor::vertical:\r\n\t\t::SetCursor(::LoadCursor(NULL,IDC_SIZENS));\r\n\t\tbreak;\r\n\tcase Cursor::hand:\r\n\t\t::SetCursor(::LoadCursor(NULL,IDC_HAND));\r\n\t\tbreak;\r\n\tcase Cursor::reverseArrow:\r\n\tcase Cursor::arrow:\r\n\tcase Cursor::invalid:\t// Should not occur, but just in case.\r\n\t\t::SetCursor(::LoadCursor(NULL,IDC_ARROW));\r\n\t\tbreak;\r\n\t}\r\n}\r\n\r\n/* Returns rectangle of monitor pt is on, both rect and pt are in Window's\r\n   coordinates */\r\nPRectangle Window::GetMonitorRect(Point pt) {\r\n\tconst PRectangle rcPosition = GetPosition();\r\n\tconst POINT ptDesktop = {static_cast<LONG>(pt.x + rcPosition.left),\r\n\t\tstatic_cast<LONG>(pt.y + rcPosition.top)};\r\n\tHMONITOR hMonitor = MonitorFromPoint(ptDesktop, MONITOR_DEFAULTTONEAREST);\r\n\r\n\tconst RECT rcWork = RectFromMonitor(hMonitor);\r\n\tif (rcWork.left < rcWork.right) {\r\n\t\tPRectangle rcMonitor(\r\n\t\t\trcWork.left - rcPosition.left,\r\n\t\t\trcWork.top - rcPosition.top,\r\n\t\t\trcWork.right - rcPosition.left,\r\n\t\t\trcWork.bottom - rcPosition.top);\r\n\t\treturn rcMonitor;\r\n\t} else {\r\n\t\treturn PRectangle();\r\n\t}\r\n}\r\n\r\nstruct ListItemData {\r\n\tconst char *text;\r\n\tint pixId;\r\n};\r\n\r\nclass LineToItem {\r\n\tstd::vector<char> words;\r\n\r\n\tstd::vector<ListItemData> data;\r\n\r\npublic:\r\n\tvoid Clear() noexcept {\r\n\t\twords.clear();\r\n\t\tdata.clear();\r\n\t}\r\n\r\n\tListItemData Get(size_t index) const noexcept {\r\n\t\tif (index < data.size()) {\r\n\t\t\treturn data[index];\r\n\t\t} else {\r\n\t\t\tListItemData missing = {\"\", -1};\r\n\t\t\treturn missing;\r\n\t\t}\r\n\t}\r\n\tint Count() const noexcept {\r\n\t\treturn static_cast<int>(data.size());\r\n\t}\r\n\r\n\tvoid AllocItem(const char *text, int pixId) {\r\n\t\tconst ListItemData lid = { text, pixId };\r\n\t\tdata.push_back(lid);\r\n\t}\r\n\r\n\tchar *SetWords(const char *s) {\r\n\t\twords = std::vector<char>(s, s+strlen(s)+1);\r\n\t\treturn &words[0];\r\n\t}\r\n};\r\n\r\nconst TCHAR ListBoxX_ClassName[] = TEXT(\"ListBoxX\");\r\n\r\nListBox::ListBox() noexcept {\r\n}\r\n\r\nListBox::~ListBox() noexcept {\r\n}\r\n\r\nclass ListBoxX : public ListBox {\r\n\tint lineHeight;\r\n\tHFONT fontCopy;\r\n\tTechnology technology;\r\n\tRGBAImageSet images;\r\n\tLineToItem lti;\r\n\tHWND lb;\r\n\tbool unicodeMode;\r\n\tint desiredVisibleRows;\r\n\tunsigned int maxItemCharacters;\r\n\tunsigned int aveCharWidth;\r\n\tWindow *parent;\r\n\tint ctrlID;\r\n\tUINT dpi;\r\n\tIListBoxDelegate *delegate;\r\n\tconst char *widestItem;\r\n\tunsigned int maxCharWidth;\r\n\tWPARAM resizeHit;\r\n\tPRectangle rcPreSize;\r\n\tPoint dragOffset;\r\n\tPoint location;\t// Caret location at which the list is opened\r\n\tMouseWheelDelta wheelDelta;\r\n\tListOptions options;\r\n\tDWORD frameStyle = WS_THICKFRAME;\r\n\r\n\tHWND GetHWND() const noexcept;\r\n\tvoid AppendListItem(const char *text, const char *numword);\r\n\tvoid AdjustWindowRect(PRectangle *rc, UINT dpiAdjust) const noexcept;\r\n\tint ItemHeight() const;\r\n\tint MinClientWidth() const noexcept;\r\n\tint TextOffset() const;\r\n\tPOINT GetClientExtent() const noexcept;\r\n\tPOINT MinTrackSize() const;\r\n\tPOINT MaxTrackSize() const;\r\n\tvoid SetRedraw(bool on) noexcept;\r\n\tvoid OnDoubleClick();\r\n\tvoid OnSelChange();\r\n\tvoid ResizeToCursor();\r\n\tvoid StartResize(WPARAM);\r\n\tLRESULT NcHitTest(WPARAM, LPARAM) const;\r\n\tvoid CentreItem(int n);\r\n\tvoid Paint(HDC);\r\n\tstatic LRESULT PASCAL ControlWndProc(HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam);\r\n\r\n\tstatic constexpr Point ItemInset {0, 0};\t// Padding around whole item\r\n\tstatic constexpr Point TextInset {2, 0};\t// Padding around text\r\n\tstatic constexpr Point ImageInset {1, 0};\t// Padding around image\r\n\r\npublic:\r\n\tListBoxX() : lineHeight(10), fontCopy{}, technology(Technology::Default), lb{}, unicodeMode(false),\r\n\t\tdesiredVisibleRows(9), maxItemCharacters(0), aveCharWidth(8),\r\n\t\tparent(nullptr), ctrlID(0), dpi(USER_DEFAULT_SCREEN_DPI),\r\n\t\tdelegate(nullptr),\r\n\t\twidestItem(nullptr), maxCharWidth(1), resizeHit(0) {\r\n\t}\r\n\tListBoxX(const ListBoxX &) = delete;\r\n\tListBoxX(ListBoxX &&) = delete;\r\n\tListBoxX &operator=(const ListBoxX &) = delete;\r\n\tListBoxX &operator=(ListBoxX &&) = delete;\r\n\t~ListBoxX() noexcept override {\r\n\t\tif (fontCopy) {\r\n\t\t\t::DeleteObject(fontCopy);\r\n\t\t\tfontCopy = 0;\r\n\t\t}\r\n\t}\r\n\tvoid SetFont(const Font *font) override;\r\n\tvoid Create(Window &parent_, int ctrlID_, Point location_, int lineHeight_, bool unicodeMode_, Technology technology_) override;\r\n\tvoid SetAverageCharWidth(int width) override;\r\n\tvoid SetVisibleRows(int rows) override;\r\n\tint GetVisibleRows() const override;\r\n\tPRectangle GetDesiredRect() override;\r\n\tint CaretFromEdge() override;\r\n\tvoid Clear() noexcept override;\r\n\tvoid Append(char *s, int type = -1) override;\r\n\tint Length() override;\r\n\tvoid Select(int n) override;\r\n\tint GetSelection() override;\r\n\tint Find(const char *prefix) override;\r\n\tstd::string GetValue(int n) override;\r\n\tvoid RegisterImage(int type, const char *xpm_data) override;\r\n\tvoid RegisterRGBAImage(int type, int width, int height, const unsigned char *pixelsImage) override;\r\n\tvoid ClearRegisteredImages() override;\r\n\tvoid SetDelegate(IListBoxDelegate *lbDelegate) override;\r\n\tvoid SetList(const char *list, char separator, char typesep) override;\r\n\tvoid SetOptions(ListOptions options_) override;\r\n\tvoid Draw(DRAWITEMSTRUCT *pDrawItem);\r\n\tLRESULT WndProc(HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam);\r\n\tstatic LRESULT PASCAL StaticWndProc(HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam);\r\n};\r\n\r\nstd::unique_ptr<ListBox> ListBox::Allocate() {\r\n\treturn std::make_unique<ListBoxX>();\r\n}\r\n\r\nvoid ListBoxX::Create(Window &parent_, int ctrlID_, Point location_, int lineHeight_, bool unicodeMode_, Technology technology_) {\r\n\tparent = &parent_;\r\n\tctrlID = ctrlID_;\r\n\tlocation = location_;\r\n\tlineHeight = lineHeight_;\r\n\tunicodeMode = unicodeMode_;\r\n\ttechnology = technology_;\r\n\tHWND hwndParent = HwndFromWindow(*parent);\r\n\tHINSTANCE hinstanceParent = GetWindowInstance(hwndParent);\r\n\t// Window created as popup so not clipped within parent client area\r\n\twid = ::CreateWindowEx(\r\n\t\tWS_EX_WINDOWEDGE, ListBoxX_ClassName, TEXT(\"\"),\r\n\t\tWS_POPUP | frameStyle,\r\n\t\t100,100, 150,80, hwndParent,\r\n\t\tNULL,\r\n\t\thinstanceParent,\r\n\t\tthis);\r\n\r\n\tdpi = DpiForWindow(hwndParent);\r\n\tPOINT locationw = POINTFromPoint(location);\r\n\t::MapWindowPoints(hwndParent, NULL, &locationw, 1);\r\n\tlocation = PointFromPOINT(locationw);\r\n}\r\n\r\nvoid ListBoxX::SetFont(const Font *font) {\r\n\tconst FontWin *pfm = dynamic_cast<const FontWin *>(font);\r\n\tif (pfm) {\r\n\t\tif (fontCopy) {\r\n\t\t\t::DeleteObject(fontCopy);\r\n\t\t\tfontCopy = 0;\r\n\t\t}\r\n\t\tfontCopy = pfm->HFont();\r\n\t\tSetWindowFont(lb, fontCopy, 0);\r\n\t}\r\n}\r\n\r\nvoid ListBoxX::SetAverageCharWidth(int width) {\r\n\taveCharWidth = width;\r\n}\r\n\r\nvoid ListBoxX::SetVisibleRows(int rows) {\r\n\tdesiredVisibleRows = rows;\r\n}\r\n\r\nint ListBoxX::GetVisibleRows() const {\r\n\treturn desiredVisibleRows;\r\n}\r\n\r\nHWND ListBoxX::GetHWND() const noexcept {\r\n\treturn HwndFromWindowID(GetID());\r\n}\r\n\r\nPRectangle ListBoxX::GetDesiredRect() {\r\n\tPRectangle rcDesired = GetPosition();\r\n\r\n\tint rows = Length();\r\n\tif ((rows == 0) || (rows > desiredVisibleRows))\r\n\t\trows = desiredVisibleRows;\r\n\trcDesired.bottom = rcDesired.top + ItemHeight() * rows;\r\n\r\n\tint width = MinClientWidth();\r\n\tHDC hdc = ::GetDC(lb);\r\n\tHFONT oldFont = SelectFont(hdc, fontCopy);\r\n\tSIZE textSize = {0, 0};\r\n\tint len = 0;\r\n\tif (widestItem) {\r\n\t\tlen = static_cast<int>(strlen(widestItem));\r\n\t\tif (unicodeMode) {\r\n\t\t\tconst TextWide tbuf(widestItem, CpUtf8);\r\n\t\t\t::GetTextExtentPoint32W(hdc, tbuf.buffer, tbuf.tlen, &textSize);\r\n\t\t} else {\r\n\t\t\t::GetTextExtentPoint32A(hdc, widestItem, len, &textSize);\r\n\t\t}\r\n\t}\r\n\tTEXTMETRIC tm;\r\n\t::GetTextMetrics(hdc, &tm);\r\n\tmaxCharWidth = tm.tmMaxCharWidth;\r\n\tSelectFont(hdc, oldFont);\r\n\t::ReleaseDC(lb, hdc);\r\n\r\n\tconst int widthDesired = std::max(textSize.cx, (len + 1) * tm.tmAveCharWidth);\r\n\tif (width < widthDesired)\r\n\t\twidth = widthDesired;\r\n\r\n\trcDesired.right = rcDesired.left + TextOffset() + width + (TextInset.x * 2);\r\n\tif (Length() > rows)\r\n\t\trcDesired.right += SystemMetricsForDpi(SM_CXVSCROLL, dpi);\r\n\r\n\tAdjustWindowRect(&rcDesired, dpi);\r\n\treturn rcDesired;\r\n}\r\n\r\nint ListBoxX::TextOffset() const {\r\n\tconst int pixWidth = images.GetWidth();\r\n\treturn static_cast<int>(pixWidth == 0 ? ItemInset.x : ItemInset.x + pixWidth + (ImageInset.x * 2));\r\n}\r\n\r\nint ListBoxX::CaretFromEdge() {\r\n\tPRectangle rc;\r\n\tAdjustWindowRect(&rc, dpi);\r\n\treturn TextOffset() + static_cast<int>(TextInset.x + (0 - rc.left) - 1);\r\n}\r\n\r\nvoid ListBoxX::Clear() noexcept {\r\n\tListBox_ResetContent(lb);\r\n\tmaxItemCharacters = 0;\r\n\twidestItem = nullptr;\r\n\tlti.Clear();\r\n}\r\n\r\nvoid ListBoxX::Append(char *, int) {\r\n\t// This method is no longer called in Scintilla\r\n\tPLATFORM_ASSERT(false);\r\n}\r\n\r\nint ListBoxX::Length() {\r\n\treturn lti.Count();\r\n}\r\n\r\nvoid ListBoxX::Select(int n) {\r\n\t// We are going to scroll to centre on the new selection and then select it, so disable\r\n\t// redraw to avoid flicker caused by a painting new selection twice in unselected and then\r\n\t// selected states\r\n\tSetRedraw(false);\r\n\tCentreItem(n);\r\n\tListBox_SetCurSel(lb, n);\r\n\tOnSelChange();\r\n\tSetRedraw(true);\r\n}\r\n\r\nint ListBoxX::GetSelection() {\r\n\treturn ListBox_GetCurSel(lb);\r\n}\r\n\r\n// This is not actually called at present\r\nint ListBoxX::Find(const char *) {\r\n\treturn LB_ERR;\r\n}\r\n\r\nstd::string ListBoxX::GetValue(int n) {\r\n\tconst ListItemData item = lti.Get(n);\r\n\treturn item.text;\r\n}\r\n\r\nvoid ListBoxX::RegisterImage(int type, const char *xpm_data) {\r\n\tXPM xpmImage(xpm_data);\r\n\timages.AddImage(type, std::make_unique<RGBAImage>(xpmImage));\r\n}\r\n\r\nvoid ListBoxX::RegisterRGBAImage(int type, int width, int height, const unsigned char *pixelsImage) {\r\n\timages.AddImage(type, std::make_unique<RGBAImage>(width, height, 1.0f, pixelsImage));\r\n}\r\n\r\nvoid ListBoxX::ClearRegisteredImages() {\r\n\timages.Clear();\r\n}\r\n\r\nnamespace {\r\n\r\nint ColourOfElement(std::optional<ColourRGBA> colour, int nIndex) {\r\n\tif (colour.has_value()) {\r\n\t\treturn colour.value().OpaqueRGB();\r\n\t} else {\r\n\t\treturn ::GetSysColor(nIndex);\r\n\t}\r\n}\r\n\r\nvoid FillRectColour(HDC hdc, const RECT *lprc, int colour) noexcept {\r\n\tconst HBRUSH brush = ::CreateSolidBrush(colour);\r\n\t::FillRect(hdc, lprc, brush);\r\n\t::DeleteObject(brush);\r\n}\r\n\r\n}\r\n\r\nvoid ListBoxX::Draw(DRAWITEMSTRUCT *pDrawItem) {\r\n\tif ((pDrawItem->itemAction == ODA_SELECT) || (pDrawItem->itemAction == ODA_DRAWENTIRE)) {\r\n\t\tRECT rcBox = pDrawItem->rcItem;\r\n\t\trcBox.left += TextOffset();\r\n\t\tif (pDrawItem->itemState & ODS_SELECTED) {\r\n\t\t\tRECT rcImage = pDrawItem->rcItem;\r\n\t\t\trcImage.right = rcBox.left;\r\n\t\t\t// The image is not highlighted\r\n\t\t\tFillRectColour(pDrawItem->hDC, &rcImage, ColourOfElement(options.back, COLOR_WINDOW));\r\n\t\t\tFillRectColour(pDrawItem->hDC, &rcBox, ColourOfElement(options.backSelected, COLOR_HIGHLIGHT));\r\n\t\t\t::SetBkColor(pDrawItem->hDC, ColourOfElement(options.backSelected, COLOR_HIGHLIGHT));\r\n\t\t\t::SetTextColor(pDrawItem->hDC, ColourOfElement(options.foreSelected, COLOR_HIGHLIGHTTEXT));\r\n\t\t} else {\r\n\t\t\tFillRectColour(pDrawItem->hDC, &pDrawItem->rcItem, ColourOfElement(options.back, COLOR_WINDOW));\r\n\t\t\t::SetBkColor(pDrawItem->hDC, ColourOfElement(options.back, COLOR_WINDOW));\r\n\t\t\t::SetTextColor(pDrawItem->hDC, ColourOfElement(options.fore, COLOR_WINDOWTEXT));\r\n\t\t}\r\n\r\n\t\tconst ListItemData item = lti.Get(pDrawItem->itemID);\r\n\t\tconst int pixId = item.pixId;\r\n\t\tconst char *text = item.text;\r\n\t\tconst int len = static_cast<int>(strlen(text));\r\n\r\n\t\tRECT rcText = rcBox;\r\n\t\t::InsetRect(&rcText, static_cast<int>(TextInset.x), static_cast<int>(TextInset.y));\r\n\r\n\t\tif (unicodeMode) {\r\n\t\t\tconst TextWide tbuf(text, CpUtf8);\r\n\t\t\t::DrawTextW(pDrawItem->hDC, tbuf.buffer, tbuf.tlen, &rcText, DT_NOPREFIX|DT_END_ELLIPSIS|DT_SINGLELINE|DT_NOCLIP);\r\n\t\t} else {\r\n\t\t\t::DrawTextA(pDrawItem->hDC, text, len, &rcText, DT_NOPREFIX|DT_END_ELLIPSIS|DT_SINGLELINE|DT_NOCLIP);\r\n\t\t}\r\n\r\n\t\t// Draw the image, if any\r\n\t\tconst RGBAImage *pimage = images.Get(pixId);\r\n\t\tif (pimage) {\r\n\t\t\tstd::unique_ptr<Surface> surfaceItem(Surface::Allocate(technology));\r\n\t\t\tif (technology == Technology::Default) {\r\n\t\t\t\tsurfaceItem->Init(pDrawItem->hDC, pDrawItem->hwndItem);\r\n\t\t\t\tconst long left = pDrawItem->rcItem.left + static_cast<int>(ItemInset.x + ImageInset.x);\r\n\t\t\t\tconst PRectangle rcImage = PRectangle::FromInts(left, pDrawItem->rcItem.top,\r\n\t\t\t\t\tleft + images.GetWidth(), pDrawItem->rcItem.bottom);\r\n\t\t\t\tsurfaceItem->DrawRGBAImage(rcImage,\r\n\t\t\t\t\tpimage->GetWidth(), pimage->GetHeight(), pimage->Pixels());\r\n\t\t\t\t::SetTextAlign(pDrawItem->hDC, TA_TOP);\r\n\t\t\t} else {\r\n#if defined(USE_D2D)\r\n\t\t\t\tconst D2D1_RENDER_TARGET_PROPERTIES props = D2D1::RenderTargetProperties(\r\n\t\t\t\t\tD2D1_RENDER_TARGET_TYPE_DEFAULT,\r\n\t\t\t\t\tD2D1::PixelFormat(\r\n\t\t\t\t\t\tDXGI_FORMAT_B8G8R8A8_UNORM,\r\n\t\t\t\t\t\tD2D1_ALPHA_MODE_IGNORE),\r\n\t\t\t\t\t0,\r\n\t\t\t\t\t0,\r\n\t\t\t\t\tD2D1_RENDER_TARGET_USAGE_NONE,\r\n\t\t\t\t\tD2D1_FEATURE_LEVEL_DEFAULT\r\n\t\t\t\t\t);\r\n\t\t\t\tID2D1DCRenderTarget *pDCRT = nullptr;\r\n\t\t\t\tHRESULT hr = pD2DFactory->CreateDCRenderTarget(&props, &pDCRT);\r\n\t\t\t\tif (SUCCEEDED(hr) && pDCRT) {\r\n\t\t\t\t\tconst long left = pDrawItem->rcItem.left + static_cast<long>(ItemInset.x + ImageInset.x);\r\n\r\n\t\t\t\t\tRECT rcItem = pDrawItem->rcItem;\r\n\t\t\t\t\trcItem.left = left;\r\n\t\t\t\t\trcItem.right = rcItem.left + images.GetWidth();\r\n\r\n\t\t\t\t\thr = pDCRT->BindDC(pDrawItem->hDC, &rcItem);\r\n\t\t\t\t\tif (SUCCEEDED(hr)) {\r\n\t\t\t\t\t\tsurfaceItem->Init(pDCRT, pDrawItem->hwndItem);\r\n\t\t\t\t\t\tpDCRT->BeginDraw();\r\n\t\t\t\t\t\tconst PRectangle rcImage = PRectangle::FromInts(0, 0, images.GetWidth(), rcItem.bottom - rcItem.top);\r\n\t\t\t\t\t\tsurfaceItem->DrawRGBAImage(rcImage,\r\n\t\t\t\t\t\t\tpimage->GetWidth(), pimage->GetHeight(), pimage->Pixels());\r\n\t\t\t\t\t\tpDCRT->EndDraw();\r\n\t\t\t\t\t\tReleaseUnknown(pDCRT);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n#endif\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid ListBoxX::AppendListItem(const char *text, const char *numword) {\r\n\tint pixId = -1;\r\n\tif (numword) {\r\n\t\tpixId = 0;\r\n\t\tchar ch;\r\n\t\twhile ((ch = *++numword) != '\\0') {\r\n\t\t\tpixId = 10 * pixId + (ch - '0');\r\n\t\t}\r\n\t}\r\n\r\n\tlti.AllocItem(text, pixId);\r\n\tconst unsigned int len = static_cast<unsigned int>(strlen(text));\r\n\tif (maxItemCharacters < len) {\r\n\t\tmaxItemCharacters = len;\r\n\t\twidestItem = text;\r\n\t}\r\n}\r\n\r\nvoid ListBoxX::SetDelegate(IListBoxDelegate *lbDelegate) {\r\n\tdelegate = lbDelegate;\r\n}\r\n\r\nvoid ListBoxX::SetList(const char *list, char separator, char typesep) {\r\n\t// Turn off redraw while populating the list - this has a significant effect, even if\r\n\t// the listbox is not visible.\r\n\tSetRedraw(false);\r\n\tClear();\r\n\tconst size_t size = strlen(list);\r\n\tchar *words = lti.SetWords(list);\r\n\tconst char *startword = words;\r\n\tchar *numword = nullptr;\r\n\tfor (size_t i=0; i < size; i++) {\r\n\t\tif (words[i] == separator) {\r\n\t\t\twords[i] = '\\0';\r\n\t\t\tif (numword)\r\n\t\t\t\t*numword = '\\0';\r\n\t\t\tAppendListItem(startword, numword);\r\n\t\t\tstartword = words + i + 1;\r\n\t\t\tnumword = nullptr;\r\n\t\t} else if (words[i] == typesep) {\r\n\t\t\tnumword = words + i;\r\n\t\t}\r\n\t}\r\n\tif (startword) {\r\n\t\tif (numword)\r\n\t\t\t*numword = '\\0';\r\n\t\tAppendListItem(startword, numword);\r\n\t}\r\n\r\n\t// Finally populate the listbox itself with the correct number of items\r\n\tconst int count = lti.Count();\r\n\t::SendMessage(lb, LB_INITSTORAGE, count, 0);\r\n\tfor (intptr_t j=0; j<count; j++) {\r\n\t\tListBox_AddItemData(lb, j+1);\r\n\t}\r\n\tSetRedraw(true);\r\n}\r\n\r\nvoid ListBoxX::SetOptions(ListOptions options_) {\r\n\toptions = options_;\r\n\tframeStyle = FlagSet(options.options, AutoCompleteOption::FixedSize) ? WS_BORDER : WS_THICKFRAME;\r\n}\r\n\r\nvoid ListBoxX::AdjustWindowRect(PRectangle *rc, UINT dpiAdjust) const noexcept {\r\n\tRECT rcw = RectFromPRectangle(*rc);\r\n\tif (fnAdjustWindowRectExForDpi) {\r\n\t\tfnAdjustWindowRectExForDpi(&rcw, frameStyle, false, WS_EX_WINDOWEDGE, dpiAdjust);\r\n\t} else {\r\n\t\t::AdjustWindowRectEx(&rcw, frameStyle, false, WS_EX_WINDOWEDGE);\r\n\t}\r\n\t*rc = PRectangle::FromInts(rcw.left, rcw.top, rcw.right, rcw.bottom);\r\n}\r\n\r\nint ListBoxX::ItemHeight() const {\r\n\tint itemHeight = lineHeight + (static_cast<int>(TextInset.y) * 2);\r\n\tconst int pixHeight = images.GetHeight() + (static_cast<int>(ImageInset.y) * 2);\r\n\tif (itemHeight < pixHeight) {\r\n\t\titemHeight = pixHeight;\r\n\t}\r\n\treturn itemHeight;\r\n}\r\n\r\nint ListBoxX::MinClientWidth() const noexcept {\r\n\treturn 12 * (aveCharWidth+aveCharWidth/3);\r\n}\r\n\r\nPOINT ListBoxX::MinTrackSize() const {\r\n\tPRectangle rc = PRectangle::FromInts(0, 0, MinClientWidth(), ItemHeight());\r\n\tAdjustWindowRect(&rc, dpi);\r\n\tPOINT ret = {static_cast<LONG>(rc.Width()), static_cast<LONG>(rc.Height())};\r\n\treturn ret;\r\n}\r\n\r\nPOINT ListBoxX::MaxTrackSize() const {\r\n\tPRectangle rc = PRectangle::FromInts(0, 0,\r\n\t\tstd::max(static_cast<unsigned int>(MinClientWidth()),\r\n\t\tmaxCharWidth * maxItemCharacters + static_cast<int>(TextInset.x) * 2 +\r\n\t\t TextOffset() + SystemMetricsForDpi(SM_CXVSCROLL, dpi)),\r\n\t\tItemHeight() * lti.Count());\r\n\tAdjustWindowRect(&rc, dpi);\r\n\tPOINT ret = {static_cast<LONG>(rc.Width()), static_cast<LONG>(rc.Height())};\r\n\treturn ret;\r\n}\r\n\r\nvoid ListBoxX::SetRedraw(bool on) noexcept {\r\n\t::SendMessage(lb, WM_SETREDRAW, on, 0);\r\n\tif (on)\r\n\t\t::InvalidateRect(lb, nullptr, TRUE);\r\n}\r\n\r\nvoid ListBoxX::ResizeToCursor() {\r\n\tPRectangle rc = GetPosition();\r\n\tPOINT ptw;\r\n\t::GetCursorPos(&ptw);\r\n\tconst Point pt = PointFromPOINT(ptw) + dragOffset;\r\n\r\n\tswitch (resizeHit) {\r\n\t\tcase HTLEFT:\r\n\t\t\trc.left = pt.x;\r\n\t\t\tbreak;\r\n\t\tcase HTRIGHT:\r\n\t\t\trc.right = pt.x;\r\n\t\t\tbreak;\r\n\t\tcase HTTOP:\r\n\t\t\trc.top = pt.y;\r\n\t\t\tbreak;\r\n\t\tcase HTTOPLEFT:\r\n\t\t\trc.top = pt.y;\r\n\t\t\trc.left = pt.x;\r\n\t\t\tbreak;\r\n\t\tcase HTTOPRIGHT:\r\n\t\t\trc.top = pt.y;\r\n\t\t\trc.right = pt.x;\r\n\t\t\tbreak;\r\n\t\tcase HTBOTTOM:\r\n\t\t\trc.bottom = pt.y;\r\n\t\t\tbreak;\r\n\t\tcase HTBOTTOMLEFT:\r\n\t\t\trc.bottom = pt.y;\r\n\t\t\trc.left = pt.x;\r\n\t\t\tbreak;\r\n\t\tcase HTBOTTOMRIGHT:\r\n\t\t\trc.bottom = pt.y;\r\n\t\t\trc.right = pt.x;\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t}\r\n\r\n\tconst POINT ptMin = MinTrackSize();\r\n\tconst POINT ptMax = MaxTrackSize();\r\n\t// We don't allow the left edge to move at present, but just in case\r\n\trc.left = std::clamp(rc.left, rcPreSize.right - ptMax.x, rcPreSize.right - ptMin.x);\r\n\trc.top = std::clamp(rc.top, rcPreSize.bottom - ptMax.y, rcPreSize.bottom - ptMin.y);\r\n\trc.right = std::clamp(rc.right, rcPreSize.left + ptMin.x, rcPreSize.left + ptMax.x);\r\n\trc.bottom = std::clamp(rc.bottom, rcPreSize.top + ptMin.y, rcPreSize.top + ptMax.y);\r\n\r\n\tSetPosition(rc);\r\n}\r\n\r\nvoid ListBoxX::StartResize(WPARAM hitCode) {\r\n\trcPreSize = GetPosition();\r\n\tPOINT cursorPos;\r\n\t::GetCursorPos(&cursorPos);\r\n\r\n\tswitch (hitCode) {\r\n\t\tcase HTRIGHT:\r\n\t\tcase HTBOTTOM:\r\n\t\tcase HTBOTTOMRIGHT:\r\n\t\t\tdragOffset.x = rcPreSize.right - cursorPos.x;\r\n\t\t\tdragOffset.y = rcPreSize.bottom - cursorPos.y;\r\n\t\t\tbreak;\r\n\r\n\t\tcase HTTOPRIGHT:\r\n\t\t\tdragOffset.x = rcPreSize.right - cursorPos.x;\r\n\t\t\tdragOffset.y = rcPreSize.top - cursorPos.y;\r\n\t\t\tbreak;\r\n\r\n\t\t// Note that the current hit test code prevents the left edge cases ever firing\r\n\t\t// as we don't want the left edge to be movable\r\n\t\tcase HTLEFT:\r\n\t\tcase HTTOP:\r\n\t\tcase HTTOPLEFT:\r\n\t\t\tdragOffset.x = rcPreSize.left - cursorPos.x;\r\n\t\t\tdragOffset.y = rcPreSize.top - cursorPos.y;\r\n\t\t\tbreak;\r\n\t\tcase HTBOTTOMLEFT:\r\n\t\t\tdragOffset.x = rcPreSize.left - cursorPos.x;\r\n\t\t\tdragOffset.y = rcPreSize.bottom - cursorPos.y;\r\n\t\t\tbreak;\r\n\r\n\t\tdefault:\r\n\t\t\treturn;\r\n\t}\r\n\r\n\t::SetCapture(GetHWND());\r\n\tresizeHit = hitCode;\r\n}\r\n\r\nLRESULT ListBoxX::NcHitTest(WPARAM wParam, LPARAM lParam) const {\r\n\tconst PRectangle rc = GetPosition();\r\n\r\n\tLRESULT hit = ::DefWindowProc(GetHWND(), WM_NCHITTEST, wParam, lParam);\r\n\t// There is an apparent bug in the DefWindowProc hit test code whereby it will\r\n\t// return HTTOPXXX if the window in question is shorter than the default\r\n\t// window caption height + frame, even if one is hovering over the bottom edge of\r\n\t// the frame, so workaround that here\r\n\tif (hit >= HTTOP && hit <= HTTOPRIGHT) {\r\n\t\tconst int minHeight = SystemMetricsForDpi(SM_CYMINTRACK, dpi);\r\n\t\tconst int yPos = GET_Y_LPARAM(lParam);\r\n\t\tif ((rc.Height() < minHeight) && (yPos > ((rc.top + rc.bottom)/2))) {\r\n\t\t\thit += HTBOTTOM - HTTOP;\r\n\t\t}\r\n\t}\r\n\r\n\t// Never permit resizing that moves the left edge. Allow movement of top or bottom edge\r\n\t// depending on whether the list is above or below the caret\r\n\tswitch (hit) {\r\n\t\tcase HTLEFT:\r\n\t\tcase HTTOPLEFT:\r\n\t\tcase HTBOTTOMLEFT:\r\n\t\t\thit = HTERROR;\r\n\t\t\tbreak;\r\n\r\n\t\tcase HTTOP:\r\n\t\tcase HTTOPRIGHT: {\r\n\t\t\t\t// Valid only if caret below list\r\n\t\t\t\tif (location.y < rc.top)\r\n\t\t\t\t\thit = HTERROR;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\tcase HTBOTTOM:\r\n\t\tcase HTBOTTOMRIGHT: {\r\n\t\t\t\t// Valid only if caret above list\r\n\t\t\t\tif (rc.bottom <= location.y)\r\n\t\t\t\t\thit = HTERROR;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t}\r\n\r\n\treturn hit;\r\n}\r\n\r\nvoid ListBoxX::OnDoubleClick() {\r\n\tif (delegate) {\r\n\t\tListBoxEvent event(ListBoxEvent::EventType::doubleClick);\r\n\t\tdelegate->ListNotify(&event);\r\n\t}\r\n}\r\n\r\nvoid ListBoxX::OnSelChange() {\r\n\tif (delegate) {\r\n\t\tListBoxEvent event(ListBoxEvent::EventType::selectionChange);\r\n\t\tdelegate->ListNotify(&event);\r\n\t}\r\n}\r\n\r\nPOINT ListBoxX::GetClientExtent() const noexcept {\r\n\tRECT rc;\r\n\t::GetWindowRect(HwndFromWindowID(wid), &rc);\r\n\tPOINT ret { rc.right - rc.left, rc.bottom - rc.top };\r\n\treturn ret;\r\n}\r\n\r\nvoid ListBoxX::CentreItem(int n) {\r\n\t// If below mid point, scroll up to centre, but with more items below if uneven\r\n\tif (n >= 0) {\r\n\t\tconst POINT extent = GetClientExtent();\r\n\t\tconst int visible = extent.y/ItemHeight();\r\n\t\tif (visible < Length()) {\r\n\t\t\tconst int top = ListBox_GetTopIndex(lb);\r\n\t\t\tconst int half = (visible - 1) / 2;\r\n\t\t\tif (n > (top + half))\r\n\t\t\t\tListBox_SetTopIndex(lb, n - half);\r\n\t\t}\r\n\t}\r\n}\r\n\r\n// Performs a double-buffered paint operation to avoid flicker\r\nvoid ListBoxX::Paint(HDC hDC) {\r\n\tconst POINT extent = GetClientExtent();\r\n\tHBITMAP hBitmap = ::CreateCompatibleBitmap(hDC, extent.x, extent.y);\r\n\tHDC bitmapDC = ::CreateCompatibleDC(hDC);\r\n\tHBITMAP hBitmapOld = SelectBitmap(bitmapDC, hBitmap);\r\n\t// The list background is mainly erased during painting, but can be a small\r\n\t// unpainted area when at the end of a non-integrally sized list with a\r\n\t// vertical scroll bar\r\n\tconst RECT rc = { 0, 0, extent.x, extent.y };\r\n\tFillRectColour(bitmapDC, &rc, ColourOfElement(options.back, COLOR_WINDOWTEXT));\r\n\t// Paint the entire client area and vertical scrollbar\r\n\t::SendMessage(lb, WM_PRINT, reinterpret_cast<WPARAM>(bitmapDC), PRF_CLIENT|PRF_NONCLIENT);\r\n\t::BitBlt(hDC, 0, 0, extent.x, extent.y, bitmapDC, 0, 0, SRCCOPY);\r\n\t// Select a stock brush to prevent warnings from BoundsChecker\r\n\tSelectBrush(bitmapDC, GetStockBrush(WHITE_BRUSH));\r\n\tSelectBitmap(bitmapDC, hBitmapOld);\r\n\t::DeleteDC(bitmapDC);\r\n\t::DeleteObject(hBitmap);\r\n}\r\n\r\nLRESULT PASCAL ListBoxX::ControlWndProc(HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam) {\r\n\ttry {\r\n\t\tListBoxX *lbx = static_cast<ListBoxX *>(PointerFromWindow(::GetParent(hWnd)));\r\n\t\tswitch (iMessage) {\r\n\t\tcase WM_ERASEBKGND:\r\n\t\t\treturn TRUE;\r\n\r\n\t\tcase WM_PAINT: {\r\n\t\t\t\tPAINTSTRUCT ps;\r\n\t\t\t\tHDC hDC = ::BeginPaint(hWnd, &ps);\r\n\t\t\t\tif (lbx) {\r\n\t\t\t\t\tlbx->Paint(hDC);\r\n\t\t\t\t}\r\n\t\t\t\t::EndPaint(hWnd, &ps);\r\n\t\t\t}\r\n\t\t\treturn 0;\r\n\r\n\t\tcase WM_MOUSEACTIVATE:\r\n\t\t\t// This prevents the view activating when the scrollbar is clicked\r\n\t\t\treturn MA_NOACTIVATE;\r\n\r\n\t\tcase WM_LBUTTONDOWN: {\r\n\t\t\t\t// We must take control of selection to prevent the ListBox activating\r\n\t\t\t\t// the popup\r\n\t\t\t\tconst LRESULT lResult = ::SendMessage(hWnd, LB_ITEMFROMPOINT, 0, lParam);\r\n\t\t\t\tif (HIWORD(lResult) == 0) {\r\n\t\t\t\t\tListBox_SetCurSel(hWnd, LOWORD(lResult));\r\n\t\t\t\t\tif (lbx) {\r\n\t\t\t\t\t\tlbx->OnSelChange();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn 0;\r\n\r\n\t\tcase WM_LBUTTONUP:\r\n\t\t\treturn 0;\r\n\r\n\t\tcase WM_LBUTTONDBLCLK: {\r\n\t\t\t\tif (lbx) {\r\n\t\t\t\t\tlbx->OnDoubleClick();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn 0;\r\n\r\n\t\tcase WM_MBUTTONDOWN:\r\n\t\t\t// disable the scroll wheel button click action\r\n\t\t\treturn 0;\r\n\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tWNDPROC prevWndProc = reinterpret_cast<WNDPROC>(GetWindowLongPtr(hWnd, GWLP_USERDATA));\r\n\t\tif (prevWndProc) {\r\n\t\t\treturn ::CallWindowProc(prevWndProc, hWnd, iMessage, wParam, lParam);\r\n\t\t} else {\r\n\t\t\treturn ::DefWindowProc(hWnd, iMessage, wParam, lParam);\r\n\t\t}\r\n\t} catch (...) {\r\n\t}\r\n\treturn ::DefWindowProc(hWnd, iMessage, wParam, lParam);\r\n}\r\n\r\nLRESULT ListBoxX::WndProc(HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam) {\r\n\tswitch (iMessage) {\r\n\tcase WM_CREATE: {\r\n\t\t\tHINSTANCE hinstanceParent = GetWindowInstance(HwndFromWindow(*parent));\r\n\t\t\t// Note that LBS_NOINTEGRALHEIGHT is specified to fix cosmetic issue when resizing the list\r\n\t\t\t// but has useful side effect of speeding up list population significantly\r\n\t\t\tlb = ::CreateWindowEx(\r\n\t\t\t\t0, TEXT(\"listbox\"), TEXT(\"\"),\r\n\t\t\t\tWS_CHILD | WS_VSCROLL | WS_VISIBLE |\r\n\t\t\t\tLBS_OWNERDRAWFIXED | LBS_NODATA | LBS_NOINTEGRALHEIGHT,\r\n\t\t\t\t0, 0, 150,80, hWnd,\r\n\t\t\t\treinterpret_cast<HMENU>(static_cast<ptrdiff_t>(ctrlID)),\r\n\t\t\t\thinstanceParent,\r\n\t\t\t\t0);\r\n\t\t\tWNDPROC prevWndProc = SubclassWindow(lb, ControlWndProc);\r\n\t\t\t::SetWindowLongPtr(lb, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(prevWndProc));\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase WM_SIZE:\r\n\t\tif (lb) {\r\n\t\t\tSetRedraw(false);\r\n\t\t\t::SetWindowPos(lb, 0, 0,0, LOWORD(lParam), HIWORD(lParam), SWP_NOZORDER|SWP_NOACTIVATE|SWP_NOMOVE);\r\n\t\t\t// Ensure the selection remains visible\r\n\t\t\tCentreItem(GetSelection());\r\n\t\t\tSetRedraw(true);\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase WM_PAINT: {\r\n\t\t\tPAINTSTRUCT ps;\r\n\t\t\t::BeginPaint(hWnd, &ps);\r\n\t\t\t::EndPaint(hWnd, &ps);\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase WM_COMMAND:\r\n\t\t// This is not actually needed now - the registered double click action is used\r\n\t\t// directly to action a choice from the list.\r\n\t\t::SendMessage(HwndFromWindow(*parent), iMessage, wParam, lParam);\r\n\t\tbreak;\r\n\r\n\tcase WM_MEASUREITEM: {\r\n\t\t\tMEASUREITEMSTRUCT *pMeasureItem = reinterpret_cast<MEASUREITEMSTRUCT *>(lParam);\r\n\t\t\tpMeasureItem->itemHeight = ItemHeight();\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase WM_DRAWITEM:\r\n\t\tDraw(reinterpret_cast<DRAWITEMSTRUCT *>(lParam));\r\n\t\tbreak;\r\n\r\n\tcase WM_DESTROY:\r\n\t\tlb = 0;\r\n\t\tSetWindowPointer(hWnd, nullptr);\r\n\t\treturn ::DefWindowProc(hWnd, iMessage, wParam, lParam);\r\n\r\n\tcase WM_ERASEBKGND:\r\n\t\t// To reduce flicker we can elide background erasure since this window is\r\n\t\t// completely covered by its child.\r\n\t\treturn TRUE;\r\n\r\n\tcase WM_GETMINMAXINFO: {\r\n\t\t\tMINMAXINFO *minMax = reinterpret_cast<MINMAXINFO*>(lParam);\r\n\t\t\tminMax->ptMaxTrackSize = MaxTrackSize();\r\n\t\t\tminMax->ptMinTrackSize = MinTrackSize();\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase WM_MOUSEACTIVATE:\r\n\t\treturn MA_NOACTIVATE;\r\n\r\n\tcase WM_NCHITTEST:\r\n\t\treturn NcHitTest(wParam, lParam);\r\n\r\n\tcase WM_NCLBUTTONDOWN:\r\n\t\t// We have to implement our own window resizing because the DefWindowProc\r\n\t\t// implementation insists on activating the resized window\r\n\t\tStartResize(wParam);\r\n\t\treturn 0;\r\n\r\n\tcase WM_MOUSEMOVE: {\r\n\t\t\tif (resizeHit == 0) {\r\n\t\t\t\treturn ::DefWindowProc(hWnd, iMessage, wParam, lParam);\r\n\t\t\t} else {\r\n\t\t\t\tResizeToCursor();\r\n\t\t\t}\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase WM_LBUTTONUP:\r\n\tcase WM_CANCELMODE:\r\n\t\tif (resizeHit != 0) {\r\n\t\t\tresizeHit = 0;\r\n\t\t\t::ReleaseCapture();\r\n\t\t}\r\n\t\treturn ::DefWindowProc(hWnd, iMessage, wParam, lParam);\r\n\tcase WM_MOUSEWHEEL:\r\n\t\tif (wheelDelta.Accumulate(wParam)) {\r\n\t\t\tconst int nRows = GetVisibleRows();\r\n\t\t\tint linesToScroll = std::clamp(nRows - 1, 1, 3);\r\n\t\t\tlinesToScroll *= wheelDelta.Actions();\r\n\t\t\tint top = ListBox_GetTopIndex(lb) + linesToScroll;\r\n\t\t\tif (top < 0) {\r\n\t\t\t\ttop = 0;\r\n\t\t\t}\r\n\t\t\tListBox_SetTopIndex(lb, top);\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tdefault:\r\n\t\treturn ::DefWindowProc(hWnd, iMessage, wParam, lParam);\r\n\t}\r\n\r\n\treturn 0;\r\n}\r\n\r\nLRESULT PASCAL ListBoxX::StaticWndProc(\r\n    HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam) {\r\n\tif (iMessage == WM_CREATE) {\r\n\t\tCREATESTRUCT *pCreate = reinterpret_cast<CREATESTRUCT *>(lParam);\r\n\t\tSetWindowPointer(hWnd, pCreate->lpCreateParams);\r\n\t}\r\n\t// Find C++ object associated with window.\r\n\tListBoxX *lbx = static_cast<ListBoxX *>(PointerFromWindow(hWnd));\r\n\tif (lbx) {\r\n\t\treturn lbx->WndProc(hWnd, iMessage, wParam, lParam);\r\n\t} else {\r\n\t\treturn ::DefWindowProc(hWnd, iMessage, wParam, lParam);\r\n\t}\r\n}\r\n\r\nnamespace {\r\n\r\nbool ListBoxX_Register() noexcept {\r\n\tWNDCLASSEX wndclassc {};\r\n\twndclassc.cbSize = sizeof(wndclassc);\r\n\t// We need CS_HREDRAW and CS_VREDRAW because of the ellipsis that might be drawn for\r\n\t// truncated items in the list and the appearance/disappearance of the vertical scroll bar.\r\n\t// The list repaint is double-buffered to avoid the flicker this would otherwise cause.\r\n\twndclassc.style = CS_GLOBALCLASS | CS_HREDRAW | CS_VREDRAW;\r\n\twndclassc.cbWndExtra = sizeof(ListBoxX *);\r\n\twndclassc.hInstance = hinstPlatformRes;\r\n\twndclassc.lpfnWndProc = ListBoxX::StaticWndProc;\r\n\twndclassc.hCursor = ::LoadCursor(NULL, IDC_ARROW);\r\n\twndclassc.lpszClassName = ListBoxX_ClassName;\r\n\r\n\treturn ::RegisterClassEx(&wndclassc) != 0;\r\n}\r\n\r\nvoid ListBoxX_Unregister() noexcept {\r\n\tif (hinstPlatformRes) {\r\n\t\t::UnregisterClass(ListBoxX_ClassName, hinstPlatformRes);\r\n\t}\r\n}\r\n\r\n}\r\n\r\nMenu::Menu() noexcept : mid{} {\r\n}\r\n\r\nvoid Menu::CreatePopUp() {\r\n\tDestroy();\r\n\tmid = ::CreatePopupMenu();\r\n}\r\n\r\nvoid Menu::Destroy() noexcept {\r\n\tif (mid)\r\n\t\t::DestroyMenu(static_cast<HMENU>(mid));\r\n\tmid = 0;\r\n}\r\n\r\nvoid Menu::Show(Point pt, const Window &w) {\r\n\t::TrackPopupMenu(static_cast<HMENU>(mid),\r\n\t\tTPM_RIGHTBUTTON, static_cast<int>(pt.x - 4), static_cast<int>(pt.y), 0,\r\n\t\tHwndFromWindow(w), nullptr);\r\n\tDestroy();\r\n}\r\n\r\nColourRGBA Platform::Chrome() {\r\n\treturn ColourRGBA::FromRGB(static_cast<int>(::GetSysColor(COLOR_3DFACE)));\r\n}\r\n\r\nColourRGBA Platform::ChromeHighlight() {\r\n\treturn ColourRGBA::FromRGB(static_cast<int>(::GetSysColor(COLOR_3DHIGHLIGHT)));\r\n}\r\n\r\nconst char *Platform::DefaultFont() {\r\n\treturn \"Verdana\";\r\n}\r\n\r\nint Platform::DefaultFontSize() {\r\n\treturn 8;\r\n}\r\n\r\nunsigned int Platform::DoubleClickTime() {\r\n\treturn ::GetDoubleClickTime();\r\n}\r\n\r\nvoid Platform::DebugDisplay(const char *s) noexcept {\r\n\t::OutputDebugStringA(s);\r\n}\r\n\r\n//#define TRACE\r\n\r\n#ifdef TRACE\r\nvoid Platform::DebugPrintf(const char *format, ...) noexcept {\r\n\tchar buffer[2000];\r\n\tva_list pArguments;\r\n\tva_start(pArguments, format);\r\n\tvsnprintf(buffer, std::size(buffer), format, pArguments);\r\n\tva_end(pArguments);\r\n\tPlatform::DebugDisplay(buffer);\r\n}\r\n#else\r\nvoid Platform::DebugPrintf(const char *, ...) noexcept {\r\n}\r\n#endif\r\n\r\nstatic bool assertionPopUps = true;\r\n\r\nbool Platform::ShowAssertionPopUps(bool assertionPopUps_) noexcept {\r\n\tconst bool ret = assertionPopUps;\r\n\tassertionPopUps = assertionPopUps_;\r\n\treturn ret;\r\n}\r\n\r\nvoid Platform::Assert(const char *c, const char *file, int line) noexcept {\r\n\tchar buffer[2000] {};\r\n\tsnprintf(buffer, std::size(buffer), \"Assertion [%s] failed at %s %d%s\", c, file, line, assertionPopUps ? \"\" : \"\\r\\n\");\r\n\tif (assertionPopUps) {\r\n\t\tconst int idButton = ::MessageBoxA(0, buffer, \"Assertion failure\",\r\n\t\t\tMB_ABORTRETRYIGNORE|MB_ICONHAND|MB_SETFOREGROUND|MB_TASKMODAL);\r\n\t\tif (idButton == IDRETRY) {\r\n\t\t\t::DebugBreak();\r\n\t\t} else if (idButton == IDIGNORE) {\r\n\t\t\t// all OK\r\n\t\t} else {\r\n\t\t\tabort();\r\n\t\t}\r\n\t} else {\r\n\t\tPlatform::DebugDisplay(buffer);\r\n\t\t::DebugBreak();\r\n\t\tabort();\r\n\t}\r\n}\r\n\r\nvoid Platform_Initialise(void *hInstance) noexcept {\r\n\thinstPlatformRes = static_cast<HINSTANCE>(hInstance);\r\n\tLoadDpiForWindow();\r\n\tListBoxX_Register();\r\n}\r\n\r\nvoid Platform_Finalise(bool fromDllMain) noexcept {\r\n#if defined(USE_D2D)\r\n\tif (!fromDllMain) {\r\n\t\tReleaseUnknown(pIDWriteFactory);\r\n\t\tReleaseUnknown(pD2DFactory);\r\n\t\tif (hDLLDWrite) {\r\n\t\t\tFreeLibrary(hDLLDWrite);\r\n\t\t\thDLLDWrite = {};\r\n\t\t}\r\n\t\tif (hDLLD2D) {\r\n\t\t\tFreeLibrary(hDLLD2D);\r\n\t\t\thDLLD2D = {};\r\n\t\t}\r\n\t}\r\n#endif\r\n\tif (!fromDllMain && hDLLShcore) {\r\n\t\tFreeLibrary(hDLLShcore);\r\n\t\thDLLShcore = {};\r\n\t}\r\n\tListBoxX_Unregister();\r\n}\r\n\r\n}\r\n"
  },
  {
    "path": "scintilla/win32/PlatWin.h",
    "content": "// Scintilla source code edit control\r\n/** @file PlatWin.h\r\n ** Implementation of platform facilities on Windows.\r\n **/\r\n// Copyright 1998-2011 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef PLATWIN_H\r\n#define PLATWIN_H\r\n\r\nnamespace Scintilla::Internal {\r\n\r\n#ifndef USER_DEFAULT_SCREEN_DPI\r\n#define USER_DEFAULT_SCREEN_DPI\t\t96\r\n#endif\r\n\r\nextern void Platform_Initialise(void *hInstance) noexcept;\r\n\r\nextern void Platform_Finalise(bool fromDllMain) noexcept;\r\n\r\nconstexpr RECT RectFromPRectangle(PRectangle prc) noexcept {\r\n\tconst RECT rc = { static_cast<LONG>(prc.left), static_cast<LONG>(prc.top),\r\n\t\tstatic_cast<LONG>(prc.right), static_cast<LONG>(prc.bottom) };\r\n\treturn rc;\r\n}\r\n\r\nconstexpr POINT POINTFromPoint(Point pt) noexcept {\r\n\treturn POINT{ static_cast<LONG>(pt.x), static_cast<LONG>(pt.y) };\r\n}\r\n\r\nconstexpr Point PointFromPOINT(POINT pt) noexcept {\r\n\treturn Point::FromInts(pt.x, pt.y);\r\n}\r\n\r\nconstexpr HWND HwndFromWindowID(WindowID wid) noexcept {\r\n\treturn static_cast<HWND>(wid);\r\n}\r\n\r\ninline HWND HwndFromWindow(const Window &w) noexcept {\r\n\treturn HwndFromWindowID(w.GetID());\r\n}\r\n\r\nvoid *PointerFromWindow(HWND hWnd) noexcept;\r\nvoid SetWindowPointer(HWND hWnd, void *ptr) noexcept;\r\n\r\nHMONITOR MonitorFromWindowHandleScaling(HWND hWnd) noexcept;\r\n\r\nUINT DpiForWindow(WindowID wid) noexcept;\r\nfloat GetDeviceScaleFactorWhenGdiScalingActive(HWND hWnd) noexcept;\r\n\r\nint SystemMetricsForDpi(int nIndex, UINT dpi) noexcept;\r\n\r\nconstexpr int defaultCursorBaseSize = 32;\r\nHCURSOR LoadReverseArrowCursor(UINT dpi, int cursorBaseSize) noexcept;\r\n\r\nclass MouseWheelDelta {\r\n\tint wheelDelta = 0;\r\npublic:\r\n\tbool Accumulate(WPARAM wParam) noexcept {\r\n\t\twheelDelta -= GET_WHEEL_DELTA_WPARAM(wParam);\r\n\t\treturn std::abs(wheelDelta) >= WHEEL_DELTA;\r\n\t}\r\n\tint Actions() noexcept {\r\n\t\tconst int actions = wheelDelta / WHEEL_DELTA;\r\n\t\twheelDelta = wheelDelta % WHEEL_DELTA;\r\n\t\treturn actions;\r\n\t}\r\n};\r\n\r\n#if defined(USE_D2D)\r\nextern bool LoadD2D();\r\nextern ID2D1Factory *pD2DFactory;\r\nextern IDWriteFactory *pIDWriteFactory;\r\n\r\nstruct RenderingParams {\r\n\tstd::unique_ptr<IDWriteRenderingParams, UnknownReleaser> defaultRenderingParams;\r\n\tstd::unique_ptr<IDWriteRenderingParams, UnknownReleaser> customRenderingParams;\r\n};\r\n\r\nstruct ISetRenderingParams {\r\n\tvirtual void SetRenderingParams(std::shared_ptr<RenderingParams> renderingParams_) = 0;\r\n};\r\n#endif\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/win32/SciTE.properties",
    "content": "command.build.SConstruct=scons.bat .\r\ncommand.name.1.SConstruct=scons clean\r\ncommand.1.SConstruct=scons.bat --clean .\r\n\r\ncommand.build.*.mak=nmake -f $(FileNameExt) DEBUG=1 QUIET=1\r\ncommand.name.1.*.mak=nmake clean\r\ncommand.1.*.mak=nmake -f $(FileNameExt) clean\r\ncommand.name.2.*.mak=Borland Make\r\ncommand.2.*.mak=make -f $(FileNameExt)\r\ncommand.subsystem.2.*.mak=0\r\ncommand.name.3.*.mak=make clean\r\ncommand.3.*.mak=make -f $(FileNameExt) clean\r\ncommand.name.4.*.mak=make debug\r\ncommand.4.*.mak=make DEBUG=1 -f $(FileNameExt)\r\ncommand.name.5.*.mak=nmake debug\r\ncommand.5.*.mak=nmake DEBUG=1 -f $(FileNameExt)\r\n# SciTE.properties is the per directory local options file and can be used to override\r\n# settings made in SciTEGlobal.properties\r\ncommand.build.*.cxx=nmake -f scintilla.mak DEBUG=1 QUIET=1\r\ncommand.build.*.h=nmake -f scintilla.mak DEBUG=1 QUIET=1\r\ncommand.build.*.rc=nmake -f scintilla.mak DEBUG=1 QUIET=1\r\n"
  },
  {
    "path": "scintilla/win32/ScintRes.rc",
    "content": "// Resource file for Scintilla\r\n// Copyright 1998-2010 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#include <windows.h>\r\n\r\n#define VERSION_SCINTILLA \"5.5.0\"\r\n#define VERSION_WORDS 5, 5, 0, 0\r\n\r\nVS_VERSION_INFO VERSIONINFO\r\nFILEVERSION\tVERSION_WORDS\r\nPRODUCTVERSION\tVERSION_WORDS\r\nFILEFLAGSMASK\t0x3fL\r\nFILEFLAGS 0\r\nFILEOS VOS_NT_WINDOWS32\r\nFILETYPE VFT_APP\r\nFILESUBTYPE VFT2_UNKNOWN\r\nBEGIN\r\n\tBLOCK\t\"VarFileInfo\"\r\n\tBEGIN\r\n\t\tVALUE\t\"Translation\",\t0x409,\t1200\r\n\tEND\r\n\tBLOCK\t\"StringFileInfo\"\r\n\tBEGIN\r\n\t\tBLOCK \"040904b0\"\r\n\t\tBEGIN\r\n\t\t\tVALUE\t\"CompanyName\",\t\"Neil Hodgson neilh@scintilla.org\\0\"\r\n\t\t\tVALUE\t\"FileDescription\",\t\"Scintilla.DLL - a Source Editing Component\\0\"\r\n\t\t\tVALUE\t\"FileVersion\",\tVERSION_SCINTILLA \"\\0\"\r\n\t\t\tVALUE\t\"InternalName\",\t\"Scintilla\\0\"\r\n\t\t\tVALUE\t\"LegalCopyright\",\t\"Copyright 1998-2012 by Neil Hodgson\\0\"\r\n\t\t\tVALUE\t\"OriginalFilename\",\t\"Scintilla.DLL\\0\"\r\n\t\t\tVALUE\t\"ProductName\",\t\"Scintilla\\0\"\r\n\t\t\tVALUE\t\"ProductVersion\",\tVERSION_SCINTILLA \"\\0\"\r\n\t\tEND\r\n\tEND\r\nEND\r\n"
  },
  {
    "path": "scintilla/win32/Scintilla.def",
    "content": "EXPORTS\r\n\tScintilla_DirectFunction"
  },
  {
    "path": "scintilla/win32/Scintilla.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project DefaultTargets=\"Build\" ToolsVersion=\"14.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <ItemGroup Label=\"ProjectConfigurations\">\r\n    <ProjectConfiguration Include=\"Debug|ARM64\">\r\n      <Configuration>Debug</Configuration>\r\n      <Platform>ARM64</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Debug|Win32\">\r\n      <Configuration>Debug</Configuration>\r\n      <Platform>Win32</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Debug|x64\">\r\n      <Configuration>Debug</Configuration>\r\n      <Platform>x64</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Release|ARM64\">\r\n      <Configuration>Release</Configuration>\r\n      <Platform>ARM64</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Release|Win32\">\r\n      <Configuration>Release</Configuration>\r\n      <Platform>Win32</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Release|x64\">\r\n      <Configuration>Release</Configuration>\r\n      <Platform>x64</Platform>\r\n    </ProjectConfiguration>\r\n  </ItemGroup>\r\n  <PropertyGroup Label=\"Globals\">\r\n    <ProjectGuid>{19CCA8B8-46B9-4609-B7CE-198DA19F07BD}</ProjectGuid>\r\n    <Keyword>Win32Proj</Keyword>\r\n    <RootNamespace>Scintilla</RootNamespace>\r\n    <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\r\n  <PropertyGroup>\r\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\r\n    <CharacterSet>Unicode</CharacterSet>\r\n    <PlatformToolset>v143</PlatformToolset>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\r\n    <UseDebugLibraries>true</UseDebugLibraries>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"Configuration\">\r\n    <UseDebugLibraries>true</UseDebugLibraries>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\" Label=\"Configuration\">\r\n    <UseDebugLibraries>true</UseDebugLibraries>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\r\n    <UseDebugLibraries>false</UseDebugLibraries>\r\n    <WholeProgramOptimization>true</WholeProgramOptimization>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"Configuration\">\r\n    <UseDebugLibraries>false</UseDebugLibraries>\r\n    <WholeProgramOptimization>true</WholeProgramOptimization>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64'\" Label=\"Configuration\">\r\n    <UseDebugLibraries>false</UseDebugLibraries>\r\n    <WholeProgramOptimization>true</WholeProgramOptimization>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\r\n  <ImportGroup Label=\"ExtensionSettings\">\r\n  </ImportGroup>\r\n  <ImportGroup Label=\"PropertySheets\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n  </ImportGroup>\r\n  <PropertyGroup Label=\"UserMacros\" />\r\n  <PropertyGroup>\r\n    <LinkIncremental>false</LinkIncremental>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\r\n    <IntDir>Intermediates\\$(Platform)\\$(Configuration)\\</IntDir>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\r\n    <IntDir>Intermediates\\$(Platform)\\$(Configuration)\\</IntDir>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n    <IntDir>Intermediates\\$(Configuration)\\</IntDir>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n    <IntDir>Intermediates\\$(Configuration)\\</IntDir>\r\n  </PropertyGroup>\r\n  <ItemDefinitionGroup>\r\n    <ClCompile>\r\n      <WarningLevel>Level4</WarningLevel>\r\n      <PreprocessorDefinitions>_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <AdditionalIncludeDirectories>..\\include;..\\src;</AdditionalIncludeDirectories>\r\n      <BrowseInformation>true</BrowseInformation>\r\n      <MultiProcessorCompilation>true</MultiProcessorCompilation>\r\n      <MinimalRebuild>false</MinimalRebuild>\r\n      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r\n      <AdditionalOptions>/source-charset:utf-8 %(AdditionalOptions)</AdditionalOptions>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Windows</SubSystem>\r\n      <GenerateDebugInformation>true</GenerateDebugInformation>\r\n      <AdditionalDependencies>gdi32.lib;imm32.lib;ole32.lib;oleaut32.lib;advapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n    <ClCompile>\r\n      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <LanguageStandard>stdcpp17</LanguageStandard>\r\n    </ClCompile>\r\n    <Link>\r\n      <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>\r\n      <CETCompat>true</CETCompat>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\r\n    <ClCompile>\r\n      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <LanguageStandard>stdcpp17</LanguageStandard>\r\n    </ClCompile>\r\n    <Link>\r\n      <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>\r\n      <CETCompat>true</CETCompat>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\">\r\n    <ClCompile>\r\n      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <LanguageStandard>stdcpp17</LanguageStandard>\r\n    </ClCompile>\r\n    <Link>\r\n      <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n    <ClCompile>\r\n      <FunctionLevelLinking>true</FunctionLevelLinking>\r\n      <IntrinsicFunctions>true</IntrinsicFunctions>\r\n      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <LanguageStandard>stdcpp17</LanguageStandard>\r\n    </ClCompile>\r\n    <Link>\r\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r\n      <OptimizeReferences>true</OptimizeReferences>\r\n      <CETCompat>true</CETCompat>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\r\n    <ClCompile>\r\n      <FunctionLevelLinking>true</FunctionLevelLinking>\r\n      <IntrinsicFunctions>true</IntrinsicFunctions>\r\n      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <LanguageStandard>stdcpp17</LanguageStandard>\r\n    </ClCompile>\r\n    <Link>\r\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r\n      <OptimizeReferences>true</OptimizeReferences>\r\n      <CETCompat>true</CETCompat>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64'\">\r\n    <ClCompile>\r\n      <FunctionLevelLinking>true</FunctionLevelLinking>\r\n      <IntrinsicFunctions>true</IntrinsicFunctions>\r\n      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <LanguageStandard>stdcpp17</LanguageStandard>\r\n    </ClCompile>\r\n    <Link>\r\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r\n      <OptimizeReferences>true</OptimizeReferences>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemGroup>\r\n    <ClCompile Include=\"..\\src\\*.cxx\" />\r\n    <ClCompile Include=\"..\\win32\\HanjaDic.cxx\" />\r\n    <ClCompile Include=\"..\\win32\\PlatWin.cxx\" />\r\n    <ClCompile Include=\"..\\win32\\ScintillaWin.cxx\" />\r\n    <ClCompile Include=\"..\\win32\\ScintillaDLL.cxx\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ClInclude Include=\"..\\include\\*.h\" />\r\n    <ClInclude Include=\"..\\src\\*.h\" />\r\n    <ClInclude Include=\"..\\win32\\*.h\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ResourceCompile Include=\"..\\win32\\ScintRes.rc\" />\r\n  </ItemGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\r\n  <ImportGroup Label=\"ExtensionTargets\">\r\n  </ImportGroup>\r\n</Project>"
  },
  {
    "path": "scintilla/win32/ScintillaDLL.cxx",
    "content": "// Scintilla source code edit control\r\n/** @file ScintillaDLL.cxx\r\n ** DLL entry point for Scintilla.\r\n **/\r\n// Copyright 1998-2018 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#undef _WIN32_WINNT\r\n#define _WIN32_WINNT 0x0500\r\n#undef WINVER\r\n#define WINVER 0x0500\r\n#include <windows.h>\r\n\r\n#include \"ScintillaTypes.h\"\r\n#include \"ScintillaWin.h\"\r\n\r\nusing namespace Scintilla;\r\n\r\nextern \"C\"\r\n__declspec(dllexport)\r\nsptr_t __stdcall Scintilla_DirectFunction(\r\n    Internal::ScintillaWin *sci, UINT iMessage, uptr_t wParam, sptr_t lParam) {\r\n\treturn Internal::DirectFunction(sci, iMessage, wParam, lParam);\r\n}\r\n\r\nextern \"C\" int APIENTRY DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpvReserved) {\r\n\t//Platform::DebugPrintf(\"Scintilla::DllMain %d %d\\n\", hInstance, dwReason);\r\n\tif (dwReason == DLL_PROCESS_ATTACH) {\r\n\t\tif (!Internal::RegisterClasses(hInstance))\r\n\t\t\treturn FALSE;\r\n\t} else if (dwReason == DLL_PROCESS_DETACH) {\r\n\t\tif (lpvReserved == NULL) {\r\n\t\t\tInternal::ResourcesRelease(true);\r\n\t\t}\r\n\t}\r\n\treturn TRUE;\r\n}\r\n"
  },
  {
    "path": "scintilla/win32/ScintillaWin.cxx",
    "content": "// Scintilla source code edit control\r\n/** @file ScintillaWin.cxx\r\n ** Windows specific subclass of ScintillaBase.\r\n **/\r\n// Copyright 1998-2003 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#include <cstddef>\r\n#include <cstdlib>\r\n#include <cstdint>\r\n#include <cassert>\r\n#include <cstring>\r\n#include <cstdio>\r\n#include <cmath>\r\n#include <climits>\r\n\r\n#include <stdexcept>\r\n#include <new>\r\n#include <string>\r\n#include <string_view>\r\n#include <vector>\r\n#include <map>\r\n#include <set>\r\n#include <optional>\r\n#include <algorithm>\r\n#include <memory>\r\n#include <chrono>\r\n#include <mutex>\r\n\r\n// Want to use std::min and std::max so don't want Windows.h version of min and max\r\n#if !defined(NOMINMAX)\r\n#define NOMINMAX\r\n#endif\r\n#undef _WIN32_WINNT\r\n#define _WIN32_WINNT 0x0A00\r\n#undef WINVER\r\n#define WINVER 0x0A00\r\n#define WIN32_LEAN_AND_MEAN 1\r\n#include <windows.h>\r\n#include <commctrl.h>\r\n#include <richedit.h>\r\n#include <windowsx.h>\r\n#include <zmouse.h>\r\n#include <ole2.h>\r\n\r\n#if !defined(DISABLE_D2D)\r\n#define USE_D2D 1\r\n#endif\r\n\r\n#if defined(USE_D2D)\r\n#include <d2d1.h>\r\n#include <dwrite.h>\r\n#endif\r\n\r\n#include \"ScintillaTypes.h\"\r\n#include \"ScintillaMessages.h\"\r\n#include \"ScintillaStructures.h\"\r\n#include \"ILoader.h\"\r\n#include \"ILexer.h\"\r\n\r\n#include \"Debugging.h\"\r\n#include \"Geometry.h\"\r\n#include \"Platform.h\"\r\n\r\n#include \"CharacterCategoryMap.h\"\r\n#include \"Position.h\"\r\n#include \"UniqueString.h\"\r\n#include \"SplitVector.h\"\r\n#include \"Partitioning.h\"\r\n#include \"RunStyles.h\"\r\n#include \"ContractionState.h\"\r\n#include \"CellBuffer.h\"\r\n#include \"CallTip.h\"\r\n#include \"KeyMap.h\"\r\n#include \"Indicator.h\"\r\n#include \"LineMarker.h\"\r\n#include \"Style.h\"\r\n#include \"ViewStyle.h\"\r\n#include \"CharClassify.h\"\r\n#include \"Decoration.h\"\r\n#include \"CaseFolder.h\"\r\n#include \"Document.h\"\r\n#include \"CaseConvert.h\"\r\n#include \"UniConversion.h\"\r\n#include \"Selection.h\"\r\n#include \"PositionCache.h\"\r\n#include \"EditModel.h\"\r\n#include \"MarginView.h\"\r\n#include \"EditView.h\"\r\n#include \"Editor.h\"\r\n#include \"ElapsedPeriod.h\"\r\n\r\n#include \"AutoComplete.h\"\r\n#include \"ScintillaBase.h\"\r\n\r\n#include \"WinTypes.h\"\r\n#include \"PlatWin.h\"\r\n#include \"HanjaDic.h\"\r\n#include \"ScintillaWin.h\"\r\n\r\nnamespace {\r\n\r\n// Two idle messages SC_WIN_IDLE and SC_WORK_IDLE.\r\n\r\n// SC_WIN_IDLE is low priority so should occur after the next WM_PAINT\r\n// It is for lengthy actions like wrapping and background styling\r\nconstexpr UINT SC_WIN_IDLE = 5001;\r\n// SC_WORK_IDLE is high priority and should occur before the next WM_PAINT\r\n// It is for shorter actions like restyling the text just inserted\r\n// and delivering SCN_UPDATEUI\r\nconstexpr UINT SC_WORK_IDLE = 5002;\r\n\r\nconstexpr int IndicatorInput = static_cast<int>(Scintilla::IndicatorNumbers::Ime);\r\nconstexpr int IndicatorTarget = IndicatorInput + 1;\r\nconstexpr int IndicatorConverted = IndicatorInput + 2;\r\nconstexpr int IndicatorUnknown = IndicatorInput + 3;\r\n\r\ntypedef UINT_PTR (WINAPI *SetCoalescableTimerSig)(HWND hwnd, UINT_PTR nIDEvent,\r\n\tUINT uElapse, TIMERPROC lpTimerFunc, ULONG uToleranceDelay);\r\n\r\n}\r\n\r\n// GCC has trouble with the standard COM ABI so do it the old C way with explicit vtables.\r\n\r\nusing namespace Scintilla;\r\nusing namespace Scintilla::Internal;\r\n\r\nnamespace {\r\n\r\nconst TCHAR callClassName[] = TEXT(\"CallTip\");\r\n\r\nvoid SetWindowID(HWND hWnd, int identifier) noexcept {\r\n\t::SetWindowLongPtr(hWnd, GWLP_ID, identifier);\r\n}\r\n\r\nconstexpr POINT POINTFromLParam(sptr_t lParam) noexcept {\r\n\treturn { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) };\r\n};\r\n\r\nconstexpr Point PointFromLParam(sptr_t lpoint) noexcept {\r\n\treturn Point::FromInts(GET_X_LPARAM(lpoint), GET_Y_LPARAM(lpoint));\r\n}\r\n\r\nbool KeyboardIsKeyDown(int key) noexcept {\r\n\treturn (::GetKeyState(key) & 0x80000000) != 0;\r\n}\r\n\r\n// Bit 24 is the extended keyboard flag and the numeric keypad is non-extended\r\nconstexpr sptr_t extendedKeyboard = 1 << 24;\r\n\r\nconstexpr bool KeyboardIsNumericKeypadFunction(uptr_t wParam, sptr_t lParam) {\r\n\tif ((lParam & extendedKeyboard) != 0) {\r\n\t\t// Not from the numeric keypad\r\n\t\treturn false;\r\n\t}\r\n\r\n\tswitch (wParam) {\r\n\tcase VK_INSERT:\t// 0\r\n\tcase VK_END:\t// 1\r\n\tcase VK_DOWN:\t// 2\r\n\tcase VK_NEXT:\t// 3\r\n\tcase VK_LEFT:\t// 4\r\n\tcase VK_CLEAR:\t// 5\r\n\tcase VK_RIGHT:\t// 6\r\n\tcase VK_HOME:\t// 7\r\n\tcase VK_UP:\t\t// 8\r\n\tcase VK_PRIOR:\t// 9\r\n\t\treturn true;\r\n\tdefault:\r\n\t\treturn false;\r\n\t}\r\n}\r\n\r\n/**\r\n */\r\nclass FormatEnumerator final : public IEnumFORMATETC {\r\npublic:\r\n\tULONG ref;\r\n\tULONG pos;\r\n\tstd::vector<CLIPFORMAT> formats;\r\n\tFormatEnumerator(ULONG pos_, const CLIPFORMAT formats_[], size_t formatsLen_);\r\n\r\n\t// IUnknown\r\n\tSTDMETHODIMP QueryInterface(REFIID riid, PVOID *ppv) override;\r\n\tSTDMETHODIMP_(ULONG)AddRef() override;\r\n\tSTDMETHODIMP_(ULONG)Release() override;\r\n\r\n\t// IEnumFORMATETC\r\n\tSTDMETHODIMP Next(ULONG celt, FORMATETC *rgelt, ULONG *pceltFetched) override;\r\n\tSTDMETHODIMP Skip(ULONG celt) override;\r\n\tSTDMETHODIMP Reset() override;\r\n\tSTDMETHODIMP Clone(IEnumFORMATETC **ppenum) override;\r\n};\r\n\r\n/**\r\n */\r\nclass DropSource final : public IDropSource {\r\npublic:\r\n\tScintillaWin *sci = nullptr;\r\n\r\n\t// IUnknown\r\n\tSTDMETHODIMP QueryInterface(REFIID riid, PVOID *ppv) override;\r\n\tSTDMETHODIMP_(ULONG)AddRef() override;\r\n\tSTDMETHODIMP_(ULONG)Release() override;\r\n\r\n\t// IDropSource\r\n\tSTDMETHODIMP QueryContinueDrag(BOOL fEsc, DWORD grfKeyState) override;\r\n\tSTDMETHODIMP GiveFeedback(DWORD) override;\r\n};\r\n\r\n/**\r\n */\r\nclass DataObject final : public IDataObject {\r\npublic:\r\n\tScintillaWin *sci = nullptr;\r\n\r\n\t// IUnknown\r\n\tSTDMETHODIMP QueryInterface(REFIID riid, PVOID *ppv) override;\r\n\tSTDMETHODIMP_(ULONG)AddRef() override;\r\n\tSTDMETHODIMP_(ULONG)Release() override;\r\n\r\n\t// IDataObject\r\n\tSTDMETHODIMP GetData(FORMATETC *pFEIn, STGMEDIUM *pSTM) override;\r\n\tSTDMETHODIMP GetDataHere(FORMATETC *, STGMEDIUM *) override;\r\n\tSTDMETHODIMP QueryGetData(FORMATETC *pFE) override;\r\n\tSTDMETHODIMP GetCanonicalFormatEtc(FORMATETC *, FORMATETC *pFEOut)  override;\r\n\tSTDMETHODIMP SetData(FORMATETC *, STGMEDIUM *, BOOL) override;\r\n\tSTDMETHODIMP EnumFormatEtc(DWORD dwDirection, IEnumFORMATETC **ppEnum) override;\r\n\tSTDMETHODIMP DAdvise(FORMATETC *, DWORD, IAdviseSink *, PDWORD) override;\r\n\tSTDMETHODIMP DUnadvise(DWORD) override;\r\n\tSTDMETHODIMP EnumDAdvise(IEnumSTATDATA **) override;\r\n};\r\n\r\n/**\r\n */\r\nclass DropTarget final : public IDropTarget {\r\npublic:\r\n\tScintillaWin *sci = nullptr;\r\n\r\n\t// IUnknown\r\n\tSTDMETHODIMP QueryInterface(REFIID riid, PVOID *ppv) override;\r\n\tSTDMETHODIMP_(ULONG)AddRef() override;\r\n\tSTDMETHODIMP_(ULONG)Release() override;\r\n\r\n\t// IDropTarget\r\n\tSTDMETHODIMP DragEnter(LPDATAOBJECT pIDataSource, DWORD grfKeyState, POINTL pt, PDWORD pdwEffect) override;\r\n\tSTDMETHODIMP DragOver(DWORD grfKeyState, POINTL pt, PDWORD pdwEffect) override;\r\n\tSTDMETHODIMP DragLeave() override;\r\n\tSTDMETHODIMP Drop(LPDATAOBJECT pIDataSource, DWORD grfKeyState, POINTL pt, PDWORD pdwEffect) override;\r\n};\r\n\r\nclass IMContext {\r\n\tHWND hwnd;\r\npublic:\r\n\tHIMC hIMC;\r\n\tIMContext(HWND hwnd_) noexcept :\r\n\t\thwnd(hwnd_), hIMC(::ImmGetContext(hwnd_)) {\r\n\t}\r\n\t// Deleted so IMContext objects can not be copied.\r\n\tIMContext(const IMContext &) = delete;\r\n\tIMContext(IMContext &&) = delete;\r\n\tIMContext &operator=(const IMContext &) = delete;\r\n\tIMContext &operator=(IMContext &&) = delete;\r\n\t~IMContext() {\r\n\t\tif (hIMC)\r\n\t\t\t::ImmReleaseContext(hwnd, hIMC);\r\n\t}\r\n\r\n\tunsigned int GetImeCaretPos() const noexcept {\r\n\t\treturn ImmGetCompositionStringW(hIMC, GCS_CURSORPOS, nullptr, 0);\r\n\t}\r\n\r\n\tstd::vector<BYTE> GetImeAttributes() {\r\n\t\tconst int attrLen = ::ImmGetCompositionStringW(hIMC, GCS_COMPATTR, nullptr, 0);\r\n\t\tstd::vector<BYTE> attr(attrLen, 0);\r\n\t\t::ImmGetCompositionStringW(hIMC, GCS_COMPATTR, &attr[0], static_cast<DWORD>(attr.size()));\r\n\t\treturn attr;\r\n\t}\r\n\r\n\tLONG GetCompositionStringLength(DWORD dwIndex) const noexcept {\r\n\t\tconst LONG byteLen = ::ImmGetCompositionStringW(hIMC, dwIndex, nullptr, 0);\r\n\t\treturn byteLen / sizeof(wchar_t);\r\n\t}\r\n\r\n\tstd::wstring GetCompositionString(DWORD dwIndex) {\r\n\t\tconst LONG byteLen = ::ImmGetCompositionStringW(hIMC, dwIndex, nullptr, 0);\r\n\t\tstd::wstring wcs(byteLen / 2, 0);\r\n\t\t::ImmGetCompositionStringW(hIMC, dwIndex, &wcs[0], byteLen);\r\n\t\treturn wcs;\r\n\t}\r\n};\r\n\r\nclass GlobalMemory;\r\n\r\nclass ReverseArrowCursor {\r\n\tUINT dpi = USER_DEFAULT_SCREEN_DPI;\r\n\tUINT cursorBaseSize = defaultCursorBaseSize;\r\n\tHCURSOR cursor {};\r\n\r\npublic:\r\n\tReverseArrowCursor() noexcept {}\r\n\t// Deleted so ReverseArrowCursor objects can not be copied.\r\n\tReverseArrowCursor(const ReverseArrowCursor &) = delete;\r\n\tReverseArrowCursor(ReverseArrowCursor &&) = delete;\r\n\tReverseArrowCursor &operator=(const ReverseArrowCursor &) = delete;\r\n\tReverseArrowCursor &operator=(ReverseArrowCursor &&) = delete;\r\n\t~ReverseArrowCursor() {\r\n\t\tif (cursor) {\r\n\t\t\t::DestroyCursor(cursor);\r\n\t\t}\r\n\t}\r\n\r\n\tHCURSOR Load(UINT dpi_, UINT cursorBaseSize_) noexcept {\r\n\t\tif (cursor)\t {\r\n\t\t\tif (dpi == dpi_ && cursorBaseSize == cursorBaseSize_) {\r\n\t\t\t\treturn cursor;\r\n\t\t\t}\r\n\t\t\t::DestroyCursor(cursor);\r\n\t\t}\r\n\r\n\t\tdpi = dpi_;\r\n\t\tcursorBaseSize = cursorBaseSize_;\r\n\t\tcursor = LoadReverseArrowCursor(dpi_, cursorBaseSize_);\r\n\t\treturn cursor ? cursor : ::LoadCursor({}, IDC_ARROW);\r\n\t}\r\n};\r\n\r\nstruct HorizontalScrollRange {\r\n\tint pageWidth;\r\n\tint documentWidth;\r\n};\r\n\r\nCLIPFORMAT RegisterClipboardType(LPCWSTR lpszFormat) noexcept {\r\n\t// Registered clipboard format values are 0xC000 through 0xFFFF.\r\n\t// RegisterClipboardFormatW returns 32-bit unsigned and CLIPFORMAT is 16-bit\r\n\t// unsigned so choose the low 16-bits with &.\r\n\treturn ::RegisterClipboardFormatW(lpszFormat) & 0xFFFF;\r\n}\r\n\r\n}\r\n\r\nnamespace Scintilla::Internal {\r\n\r\n/**\r\n */\r\nclass ScintillaWin :\r\n\tpublic ScintillaBase {\r\n\r\n\tbool lastKeyDownConsumed;\r\n\twchar_t lastHighSurrogateChar;\r\n\r\n\tbool capturedMouse;\r\n\tbool trackedMouseLeave;\r\n\tBOOL typingWithoutCursor;\r\n\tbool cursorIsHidden;\r\n\tSetCoalescableTimerSig SetCoalescableTimerFn;\r\n\r\n\tunsigned int linesPerScroll;\t///< Intellimouse support\r\n\tunsigned int charsPerScroll;\t///< Intellimouse support\r\n\tMouseWheelDelta verticalWheelDelta;\r\n\tMouseWheelDelta horizontalWheelDelta;\r\n\r\n\tUINT dpi = USER_DEFAULT_SCREEN_DPI;\r\n\tUINT cursorBaseSize = defaultCursorBaseSize;\r\n\tReverseArrowCursor reverseArrowCursor;\r\n\r\n\tPRectangle rectangleClient;\r\n\tHRGN hRgnUpdate;\r\n\r\n\tbool hasOKText;\r\n\r\n\tCLIPFORMAT cfColumnSelect;\r\n\tCLIPFORMAT cfBorlandIDEBlockType;\r\n\tCLIPFORMAT cfLineSelect;\r\n\tCLIPFORMAT cfVSLineTag;\r\n\r\n\tHRESULT hrOle;\r\n\tDropSource ds;\r\n\tDataObject dob;\r\n\tDropTarget dt;\r\n\r\n\tstatic HINSTANCE hInstance;\r\n\tstatic ATOM scintillaClassAtom;\r\n\tstatic ATOM callClassAtom;\r\n\r\n\tfloat deviceScaleFactor = 1.f;\r\n\tint GetFirstIntegralMultipleDeviceScaleFactor() const noexcept {\r\n\t\t return static_cast<int>(std::ceil(deviceScaleFactor));\r\n\t}\r\n\r\n#if defined(USE_D2D)\r\n\tID2D1RenderTarget *pRenderTarget;\r\n\tbool renderTargetValid;\r\n\t// rendering parameters for current monitor\r\n\tHMONITOR hCurrentMonitor;\r\n\tstd::shared_ptr<RenderingParams> renderingParams;\r\n#endif\r\n\r\n\texplicit ScintillaWin(HWND hwnd);\r\n\t// Deleted so ScintillaWin objects can not be copied.\r\n\tScintillaWin(const ScintillaWin &) = delete;\r\n\tScintillaWin(ScintillaWin &&) = delete;\r\n\tScintillaWin &operator=(const ScintillaWin &) = delete;\r\n\tScintillaWin &operator=(ScintillaWin &&) = delete;\r\n\t// ~ScintillaWin() in public section\r\n\r\n\tvoid Finalise() override;\r\n#if defined(USE_D2D)\r\n\tbool UpdateRenderingParams(bool force) noexcept;\r\n\tvoid EnsureRenderTarget(HDC hdc);\r\n#endif\r\n\tvoid DropRenderTarget() noexcept;\r\n\tHWND MainHWND() const noexcept;\r\n\r\n\tstatic sptr_t DirectFunction(\r\n\t\t    sptr_t ptr, UINT iMessage, uptr_t wParam, sptr_t lParam);\r\n\tstatic sptr_t DirectStatusFunction(\r\n\t\t    sptr_t ptr, UINT iMessage, uptr_t wParam, sptr_t lParam, int *pStatus);\r\n\tstatic LRESULT PASCAL SWndProc(\r\n\t\t    HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam);\r\n\tstatic LRESULT PASCAL CTWndProc(\r\n\t\t    HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam);\r\n\r\n\tenum : UINT_PTR { invalidTimerID, standardTimerID, idleTimerID, fineTimerStart };\r\n\r\n\tvoid DisplayCursor(Window::Cursor c) override;\r\n\tbool DragThreshold(Point ptStart, Point ptNow) override;\r\n\tvoid StartDrag() override;\r\n\tstatic KeyMod MouseModifiers(uptr_t wParam) noexcept;\r\n\r\n\tSci::Position TargetAsUTF8(char *text) const;\r\n\tSci::Position EncodedFromUTF8(const char *utf8, char *encoded) const;\r\n\r\n\tvoid SetRenderingParams(Surface *psurf) const;\r\n\r\n\tbool PaintDC(HDC hdc);\r\n\tsptr_t WndPaint();\r\n\r\n\t// DBCS\r\n\tvoid ImeStartComposition();\r\n\tvoid ImeEndComposition();\r\n\tLRESULT ImeOnReconvert(LPARAM lParam);\r\n\tLRESULT ImeOnDocumentFeed(LPARAM lParam) const;\r\n\tsptr_t HandleCompositionWindowed(uptr_t wParam, sptr_t lParam);\r\n\tsptr_t HandleCompositionInline(uptr_t wParam, sptr_t lParam);\r\n\tstatic bool KoreanIME() noexcept;\r\n\tvoid MoveImeCarets(Sci::Position offset) noexcept;\r\n\tvoid DrawImeIndicator(int indicator, Sci::Position len);\r\n\tvoid SetCandidateWindowPos();\r\n\tvoid SelectionToHangul();\r\n\tvoid EscapeHanja();\r\n\tvoid ToggleHanja();\r\n\tvoid AddWString(std::wstring_view wsv, CharacterSource charSource);\r\n\r\n\tUINT CodePageOfDocument() const noexcept;\r\n\tbool ValidCodePage(int codePage) const override;\r\n\tstd::string UTF8FromEncoded(std::string_view encoded) const override;\r\n\tstd::string EncodedFromUTF8(std::string_view utf8) const override;\r\n\r\n\tstd::string EncodeWString(std::wstring_view wsv);\r\n\tsptr_t DefWndProc(Message iMessage, uptr_t wParam, sptr_t lParam) override;\r\n\tvoid IdleWork() override;\r\n\tvoid QueueIdleWork(WorkItems items, Sci::Position upTo) override;\r\n\tbool SetIdle(bool on) override;\r\n\tUINT_PTR timers[static_cast<int>(TickReason::dwell)+1] {};\r\n\tbool FineTickerRunning(TickReason reason) override;\r\n\tvoid FineTickerStart(TickReason reason, int millis, int tolerance) override;\r\n\tvoid FineTickerCancel(TickReason reason) override;\r\n\tvoid SetMouseCapture(bool on) override;\r\n\tbool HaveMouseCapture() override;\r\n\tvoid SetTrackMouseLeaveEvent(bool on) noexcept;\r\n\tvoid HideCursorIfPreferred() noexcept;\r\n\tvoid UpdateBaseElements() override;\r\n\tbool PaintContains(PRectangle rc) override;\r\n\tvoid ScrollText(Sci::Line linesToMove) override;\r\n\tvoid NotifyCaretMove() override;\r\n\tvoid UpdateSystemCaret() override;\r\n\tvoid SetVerticalScrollPos() override;\r\n\tvoid SetHorizontalScrollPos() override;\r\n\tvoid HorizontalScrollToClamped(int xPos);\r\n\tHorizontalScrollRange GetHorizontalScrollRange() const;\r\n\tbool ModifyScrollBars(Sci::Line nMax, Sci::Line nPage) override;\r\n\tvoid NotifyChange() override;\r\n\tvoid NotifyFocus(bool focus) override;\r\n\tvoid SetCtrlID(int identifier) override;\r\n\tint GetCtrlID() override;\r\n\tvoid NotifyParent(NotificationData scn) override;\r\n\tvoid NotifyDoubleClick(Point pt, KeyMod modifiers) override;\r\n\tstd::unique_ptr<CaseFolder> CaseFolderForEncoding() override;\r\n\tstd::string CaseMapString(const std::string &s, CaseMapping caseMapping) override;\r\n\tvoid Copy() override;\r\n\tbool CanPaste() override;\r\n\tvoid Paste() override;\r\n\tvoid CreateCallTipWindow(PRectangle rc) override;\r\n\tvoid AddToPopUp(const char *label, int cmd = 0, bool enabled = true) override;\r\n\tvoid ClaimSelection() override;\r\n\r\n\tvoid GetMouseParameters() noexcept;\r\n\tvoid CopyToGlobal(GlobalMemory &gmUnicode, const SelectionText &selectedText);\r\n\tvoid CopyToClipboard(const SelectionText &selectedText) override;\r\n\tvoid ScrollMessage(WPARAM wParam);\r\n\tvoid HorizontalScrollMessage(WPARAM wParam);\r\n\tvoid FullPaint();\r\n\tvoid FullPaintDC(HDC hdc);\r\n\tbool IsCompatibleDC(HDC hOtherDC) noexcept;\r\n\tDWORD EffectFromState(DWORD grfKeyState) const noexcept;\r\n\r\n\tbool IsVisible() const noexcept;\r\n\tint SetScrollInfo(int nBar, LPCSCROLLINFO lpsi, BOOL bRedraw) noexcept;\r\n\tbool GetScrollInfo(int nBar, LPSCROLLINFO lpsi) noexcept;\r\n\tbool ChangeScrollRange(int nBar, int nMin, int nMax, UINT nPage) noexcept;\r\n\tvoid ChangeScrollPos(int barType, Sci::Position pos);\r\n\tsptr_t GetTextLength();\r\n\tsptr_t GetText(uptr_t wParam, sptr_t lParam);\r\n\tWindow::Cursor ContextCursor(Point pt);\r\n\tsptr_t ShowContextMenu(unsigned int iMessage, uptr_t wParam, sptr_t lParam);\r\n\tPRectangle GetClientRectangle() const override;\r\n\tvoid SizeWindow();\r\n\tsptr_t MouseMessage(unsigned int iMessage, uptr_t wParam, sptr_t lParam);\r\n\tsptr_t KeyMessage(unsigned int iMessage, uptr_t wParam, sptr_t lParam);\r\n\tsptr_t FocusMessage(unsigned int iMessage, uptr_t wParam, sptr_t lParam);\r\n\tsptr_t IMEMessage(unsigned int iMessage, uptr_t wParam, sptr_t lParam);\r\n\tsptr_t EditMessage(unsigned int iMessage, uptr_t wParam, sptr_t lParam);\r\n\tsptr_t IdleMessage(unsigned int iMessage, uptr_t wParam, sptr_t lParam);\r\n\tsptr_t SciMessage(Message iMessage, uptr_t wParam, sptr_t lParam);\r\n\r\npublic:\r\n\t~ScintillaWin() override;\r\n\r\n\t// Public for benefit of Scintilla_DirectFunction\r\n\tsptr_t WndProc(Message iMessage, uptr_t wParam, sptr_t lParam) override;\r\n\r\n\t/// Implement IUnknown\r\n\tSTDMETHODIMP QueryInterface(REFIID riid, PVOID *ppv);\r\n\tSTDMETHODIMP_(ULONG)AddRef();\r\n\tSTDMETHODIMP_(ULONG)Release();\r\n\r\n\t/// Implement IDropTarget\r\n\tSTDMETHODIMP DragEnter(LPDATAOBJECT pIDataSource, DWORD grfKeyState,\r\n\t                       POINTL pt, PDWORD pdwEffect);\r\n\tSTDMETHODIMP DragOver(DWORD grfKeyState, POINTL pt, PDWORD pdwEffect);\r\n\tSTDMETHODIMP DragLeave();\r\n\tSTDMETHODIMP Drop(LPDATAOBJECT pIDataSource, DWORD grfKeyState,\r\n\t                  POINTL pt, PDWORD pdwEffect);\r\n\r\n\t/// Implement important part of IDataObject\r\n\tSTDMETHODIMP GetData(FORMATETC *pFEIn, STGMEDIUM *pSTM);\r\n\r\n\tstatic void Prepare() noexcept;\r\n\tstatic bool Register(HINSTANCE hInstance_) noexcept;\r\n\tstatic bool Unregister() noexcept;\r\n\r\n\tbool DragIsRectangularOK(CLIPFORMAT fmt) const noexcept {\r\n\t\treturn drag.rectangular && (fmt == cfColumnSelect);\r\n\t}\r\n\r\nprivate:\r\n\t// For use in creating a system caret\r\n\tbool HasCaretSizeChanged() const noexcept;\r\n\tBOOL CreateSystemCaret();\r\n\tBOOL DestroySystemCaret() noexcept;\r\n\tHBITMAP sysCaretBitmap;\r\n\tint sysCaretWidth;\r\n\tint sysCaretHeight;\r\n\tbool styleIdleInQueue;\r\n};\r\n\r\nHINSTANCE ScintillaWin::hInstance {};\r\nATOM ScintillaWin::scintillaClassAtom = 0;\r\nATOM ScintillaWin::callClassAtom = 0;\r\n\r\nScintillaWin::ScintillaWin(HWND hwnd) {\r\n\r\n\tlastKeyDownConsumed = false;\r\n\tlastHighSurrogateChar = 0;\r\n\r\n\tcapturedMouse = false;\r\n\ttrackedMouseLeave = false;\r\n\ttypingWithoutCursor = false;\r\n\tcursorIsHidden = false;\r\n\tSetCoalescableTimerFn = nullptr;\r\n\r\n\tlinesPerScroll = 0;\r\n\tcharsPerScroll = 0;\r\n\r\n\tdpi = DpiForWindow(hwnd);\r\n\r\n\thRgnUpdate = {};\r\n\r\n\thasOKText = false;\r\n\r\n\t// There does not seem to be a real standard for indicating that the clipboard\r\n\t// contains a rectangular selection, so copy Developer Studio and Borland Delphi.\r\n\tcfColumnSelect = RegisterClipboardType(L\"MSDEVColumnSelect\");\r\n\tcfBorlandIDEBlockType = RegisterClipboardType(L\"Borland IDE Block Type\");\r\n\r\n\t// Likewise for line-copy (copies a full line when no text is selected)\r\n\tcfLineSelect = RegisterClipboardType(L\"MSDEVLineSelect\");\r\n\tcfVSLineTag = RegisterClipboardType(L\"VisualStudioEditorOperationsLineCutCopyClipboardTag\");\r\n\thrOle = E_FAIL;\r\n\r\n\twMain = hwnd;\r\n\r\n\tdob.sci = this;\r\n\tds.sci = this;\r\n\tdt.sci = this;\r\n\r\n\tsysCaretBitmap = {};\r\n\tsysCaretWidth = 0;\r\n\tsysCaretHeight = 0;\r\n\r\n\tstyleIdleInQueue = false;\r\n\r\n#if defined(USE_D2D)\r\n\tpRenderTarget = nullptr;\r\n\trenderTargetValid = true;\r\n\thCurrentMonitor = {};\r\n#endif\r\n\r\n\tcaret.period = ::GetCaretBlinkTime();\r\n\tif (caret.period < 0)\r\n\t\tcaret.period = 0;\r\n\r\n\t// Initialize COM.  If the app has already done this it will have\r\n\t// no effect.  If the app hasn't, we really shouldn't ask them to call\r\n\t// it just so this internal feature works.\r\n\thrOle = ::OleInitialize(nullptr);\r\n\r\n\t// Find SetCoalescableTimer which is only available from Windows 8+\r\n\tHMODULE user32 = ::GetModuleHandleW(L\"user32.dll\");\r\n\tSetCoalescableTimerFn = DLLFunction<SetCoalescableTimerSig>(user32, \"SetCoalescableTimer\");\r\n\r\n\tvs.indicators[IndicatorUnknown] = Indicator(IndicatorStyle::Hidden, colourIME);\r\n\tvs.indicators[IndicatorInput] = Indicator(IndicatorStyle::Dots, colourIME);\r\n\tvs.indicators[IndicatorConverted] = Indicator(IndicatorStyle::CompositionThick, colourIME);\r\n\tvs.indicators[IndicatorTarget] = Indicator(IndicatorStyle::StraightBox, colourIME);\r\n}\r\n\r\nScintillaWin::~ScintillaWin() {\r\n\tif (sysCaretBitmap) {\r\n\t\t::DeleteObject(sysCaretBitmap);\r\n\t\tsysCaretBitmap = {};\r\n\t}\r\n}\r\n\r\nvoid ScintillaWin::Finalise() {\r\n\tScintillaBase::Finalise();\r\n\tfor (TickReason tr = TickReason::caret; tr <= TickReason::dwell;\r\n\t\ttr = static_cast<TickReason>(static_cast<int>(tr) + 1)) {\r\n\t\tFineTickerCancel(tr);\r\n\t}\r\n\tSetIdle(false);\r\n\tDropRenderTarget();\r\n\t::RevokeDragDrop(MainHWND());\r\n\tif (SUCCEEDED(hrOle)) {\r\n\t\t::OleUninitialize();\r\n\t}\r\n}\r\n\r\n#if defined(USE_D2D)\r\n\r\nbool ScintillaWin::UpdateRenderingParams(bool force) noexcept {\r\n\tif (!renderingParams) {\r\n\t\ttry {\r\n\t\t\trenderingParams = std::make_shared<RenderingParams>();\r\n\t\t} catch (const std::bad_alloc &) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\tconst HWND hRootWnd = ::GetAncestor(MainHWND(), GA_ROOT);\r\n\tconst HMONITOR monitor = Internal::MonitorFromWindowHandleScaling(hRootWnd);\r\n\tif (!force && monitor == hCurrentMonitor && renderingParams->defaultRenderingParams) {\r\n\t\treturn false;\r\n\t}\r\n\r\n\tIDWriteRenderingParams *monitorRenderingParams = nullptr;\r\n\tIDWriteRenderingParams *customClearTypeRenderingParams = nullptr;\r\n\tconst HRESULT hr = pIDWriteFactory->CreateMonitorRenderingParams(monitor, &monitorRenderingParams);\r\n\tUINT clearTypeContrast = 0;\r\n\tif (SUCCEEDED(hr) && ::SystemParametersInfo(SPI_GETFONTSMOOTHINGCONTRAST, 0, &clearTypeContrast, 0) != 0) {\r\n\t\tif (clearTypeContrast >= 1000 && clearTypeContrast <= 2200) {\r\n\t\t\tconst FLOAT gamma = static_cast<FLOAT>(clearTypeContrast) / 1000.0f;\r\n\t\t\tpIDWriteFactory->CreateCustomRenderingParams(gamma,\r\n\t\t\t\tmonitorRenderingParams->GetEnhancedContrast(),\r\n\t\t\t\tmonitorRenderingParams->GetClearTypeLevel(),\r\n\t\t\t\tmonitorRenderingParams->GetPixelGeometry(),\r\n\t\t\t\tmonitorRenderingParams->GetRenderingMode(),\r\n\t\t\t\t&customClearTypeRenderingParams);\r\n\t\t}\r\n\t}\r\n\r\n\thCurrentMonitor = monitor;\r\n\tdeviceScaleFactor = Internal::GetDeviceScaleFactorWhenGdiScalingActive(hRootWnd);\r\n\trenderingParams->defaultRenderingParams.reset(monitorRenderingParams);\r\n\trenderingParams->customRenderingParams.reset(customClearTypeRenderingParams);\r\n\treturn true;\r\n}\r\n\r\nnamespace {\r\n\r\nD2D1_SIZE_U GetSizeUFromRect(const RECT &rc, const int scaleFactor) noexcept {\r\n\tconst long width = rc.right - rc.left;\r\n\tconst long height = rc.bottom - rc.top;\r\n\tconst UINT32 scaledWidth = width * scaleFactor;\r\n\tconst UINT32 scaledHeight = height * scaleFactor;\r\n\treturn D2D1::SizeU(scaledWidth, scaledHeight);\r\n}\r\n\r\n}\r\n\r\nvoid ScintillaWin::EnsureRenderTarget(HDC hdc) {\r\n\tif (!renderTargetValid) {\r\n\t\tDropRenderTarget();\r\n\t\trenderTargetValid = true;\r\n\t}\r\n\tif (!pRenderTarget) {\r\n\t\tHWND hw = MainHWND();\r\n\t\tRECT rc;\r\n\t\t::GetClientRect(hw, &rc);\r\n\r\n\t\t// Create a Direct2D render target.\r\n\t\tD2D1_RENDER_TARGET_PROPERTIES drtp {};\r\n\t\tdrtp.type = D2D1_RENDER_TARGET_TYPE_DEFAULT;\r\n\t\tdrtp.usage = D2D1_RENDER_TARGET_USAGE_NONE;\r\n\t\tdrtp.minLevel = D2D1_FEATURE_LEVEL_DEFAULT;\r\n\r\n\t\tif (technology == Technology::DirectWriteDC) {\r\n\t\t\tdrtp.dpiX = 96.f;\r\n\t\t\tdrtp.dpiY = 96.f;\r\n\t\t\t// Explicit pixel format needed.\r\n\t\t\tdrtp.pixelFormat = D2D1::PixelFormat(DXGI_FORMAT_B8G8R8A8_UNORM,\r\n\t\t\t\tD2D1_ALPHA_MODE_IGNORE);\r\n\r\n\t\t\tID2D1DCRenderTarget *pDCRT = nullptr;\r\n\t\t\tconst HRESULT hr = pD2DFactory->CreateDCRenderTarget(&drtp, &pDCRT);\r\n\t\t\tif (SUCCEEDED(hr)) {\r\n\t\t\t\tpRenderTarget = pDCRT;\r\n\t\t\t} else {\r\n\t\t\t\tPlatform::DebugPrintf(\"Failed CreateDCRenderTarget 0x%lx\\n\", hr);\r\n\t\t\t\tpRenderTarget = nullptr;\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\tconst int integralDeviceScaleFactor = GetFirstIntegralMultipleDeviceScaleFactor();\r\n\t\t\tdrtp.dpiX = 96.f * integralDeviceScaleFactor;\r\n\t\t\tdrtp.dpiY = 96.f * integralDeviceScaleFactor;\r\n\t\t\tdrtp.pixelFormat = D2D1::PixelFormat(DXGI_FORMAT_UNKNOWN,\r\n\t\t\t\tD2D1_ALPHA_MODE_UNKNOWN);\r\n\r\n\t\t\tD2D1_HWND_RENDER_TARGET_PROPERTIES dhrtp {};\r\n\t\t\tdhrtp.hwnd = hw;\r\n\t\t\tdhrtp.pixelSize = ::GetSizeUFromRect(rc, integralDeviceScaleFactor);\r\n\t\t\tdhrtp.presentOptions = (technology == Technology::DirectWriteRetain) ?\r\n\t\t\tD2D1_PRESENT_OPTIONS_RETAIN_CONTENTS : D2D1_PRESENT_OPTIONS_NONE;\r\n\r\n\t\t\tID2D1HwndRenderTarget *pHwndRenderTarget = nullptr;\r\n\t\t\tconst HRESULT hr = pD2DFactory->CreateHwndRenderTarget(drtp, dhrtp, &pHwndRenderTarget);\r\n\t\t\tif (SUCCEEDED(hr)) {\r\n\t\t\t\tpRenderTarget = pHwndRenderTarget;\r\n\t\t\t} else {\r\n\t\t\t\tPlatform::DebugPrintf(\"Failed CreateHwndRenderTarget 0x%lx\\n\", hr);\r\n\t\t\t\tpRenderTarget = nullptr;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Pixmaps were created to be compatible with previous render target so\r\n\t\t// need to be recreated.\r\n\t\tDropGraphics();\r\n\t}\r\n\r\n\tif ((technology == Technology::DirectWriteDC) && pRenderTarget) {\r\n\t\tRECT rcWindow;\r\n\t\t::GetClientRect(MainHWND(), &rcWindow);\r\n\t\tconst HRESULT hr = static_cast<ID2D1DCRenderTarget*>(pRenderTarget)->BindDC(hdc, &rcWindow);\r\n\t\tif (FAILED(hr)) {\r\n\t\t\tPlatform::DebugPrintf(\"BindDC failed 0x%lx\\n\", hr);\r\n\t\t\tDropRenderTarget();\r\n\t\t}\r\n\t}\r\n}\r\n#endif\r\n\r\nvoid ScintillaWin::DropRenderTarget() noexcept {\r\n#if defined(USE_D2D)\r\n\tReleaseUnknown(pRenderTarget);\r\n#endif\r\n}\r\n\r\nHWND ScintillaWin::MainHWND() const noexcept {\r\n\treturn HwndFromWindow(wMain);\r\n}\r\n\r\nvoid ScintillaWin::DisplayCursor(Window::Cursor c) {\r\n\tif (cursorMode != CursorShape::Normal) {\r\n\t\tc = static_cast<Window::Cursor>(cursorMode);\r\n\t}\r\n\tif (c == Window::Cursor::reverseArrow) {\r\n\t\t::SetCursor(reverseArrowCursor.Load(static_cast<UINT>(dpi * deviceScaleFactor), cursorBaseSize));\r\n\t} else {\r\n\t\twMain.SetCursor(c);\r\n\t}\r\n}\r\n\r\nbool ScintillaWin::DragThreshold(Point ptStart, Point ptNow) {\r\n\tconst Point ptDifference = ptStart - ptNow;\r\n\tconst XYPOSITION xMove = std::trunc(std::abs(ptDifference.x));\r\n\tconst XYPOSITION yMove = std::trunc(std::abs(ptDifference.y));\r\n\treturn (xMove > SystemMetricsForDpi(SM_CXDRAG, dpi)) ||\r\n\t\t(yMove > SystemMetricsForDpi(SM_CYDRAG, dpi));\r\n}\r\n\r\nvoid ScintillaWin::StartDrag() {\r\n\tinDragDrop = DragDrop::dragging;\r\n\tDWORD dwEffect = 0;\r\n\tdropWentOutside = true;\r\n\tIDataObject *pDataObject = &dob;\r\n\tIDropSource *pDropSource = &ds;\r\n\t//Platform::DebugPrintf(\"About to DoDragDrop %x %x\\n\", pDataObject, pDropSource);\r\n\tconst HRESULT hr = ::DoDragDrop(\r\n\t                 pDataObject,\r\n\t                 pDropSource,\r\n\t                 DROPEFFECT_COPY | DROPEFFECT_MOVE, &dwEffect);\r\n\t//Platform::DebugPrintf(\"DoDragDrop = %x\\n\", hr);\r\n\tif (SUCCEEDED(hr)) {\r\n\t\tif ((hr == DRAGDROP_S_DROP) && (dwEffect == DROPEFFECT_MOVE) && dropWentOutside) {\r\n\t\t\t// Remove dragged out text\r\n\t\t\tClearSelection();\r\n\t\t}\r\n\t}\r\n\tinDragDrop = DragDrop::none;\r\n\tSetDragPosition(SelectionPosition(Sci::invalidPosition));\r\n}\r\n\r\nKeyMod ScintillaWin::MouseModifiers(uptr_t wParam) noexcept {\r\n\treturn ModifierFlags(\r\n\t\t(wParam & MK_SHIFT) != 0,\r\n\t\t(wParam & MK_CONTROL) != 0,\r\n\t\tKeyboardIsKeyDown(VK_MENU));\r\n}\r\n\r\n}\r\n\r\nnamespace {\r\n\r\nint InputCodePage() noexcept {\r\n\tHKL inputLocale = ::GetKeyboardLayout(0);\r\n\tconst LANGID inputLang = LOWORD(inputLocale);\r\n\tchar sCodePage[10];\r\n\tconst int res = ::GetLocaleInfoA(MAKELCID(inputLang, SORT_DEFAULT),\r\n\t  LOCALE_IDEFAULTANSICODEPAGE, sCodePage, sizeof(sCodePage));\r\n\tif (!res)\r\n\t\treturn 0;\r\n\treturn atoi(sCodePage);\r\n}\r\n\r\n/** Map the key codes to their equivalent Keys:: form. */\r\nKeys KeyTranslate(uptr_t keyIn) noexcept {\r\n\tswitch (keyIn) {\r\n\tcase VK_DOWN:\t\treturn Keys::Down;\r\n\t\tcase VK_UP:\t\treturn Keys::Up;\r\n\t\tcase VK_LEFT:\t\treturn Keys::Left;\r\n\t\tcase VK_RIGHT:\t\treturn Keys::Right;\r\n\t\tcase VK_HOME:\t\treturn Keys::Home;\r\n\t\tcase VK_END:\t\treturn Keys::End;\r\n\t\tcase VK_PRIOR:\t\treturn Keys::Prior;\r\n\t\tcase VK_NEXT:\t\treturn Keys::Next;\r\n\t\tcase VK_DELETE:\treturn Keys::Delete;\r\n\t\tcase VK_INSERT:\t\treturn Keys::Insert;\r\n\t\tcase VK_ESCAPE:\treturn Keys::Escape;\r\n\t\tcase VK_BACK:\t\treturn Keys::Back;\r\n\t\tcase VK_TAB:\t\treturn Keys::Tab;\r\n\t\tcase VK_RETURN:\treturn Keys::Return;\r\n\t\tcase VK_ADD:\t\treturn Keys::Add;\r\n\t\tcase VK_SUBTRACT:\treturn Keys::Subtract;\r\n\t\tcase VK_DIVIDE:\t\treturn Keys::Divide;\r\n\t\tcase VK_LWIN:\t\treturn Keys::Win;\r\n\t\tcase VK_RWIN:\t\treturn Keys::RWin;\r\n\t\tcase VK_APPS:\t\treturn Keys::Menu;\r\n\t\tcase VK_OEM_2:\t\treturn static_cast<Keys>('/');\r\n\t\tcase VK_OEM_3:\t\treturn static_cast<Keys>('`');\r\n\t\tcase VK_OEM_4:\t\treturn static_cast<Keys>('[');\r\n\t\tcase VK_OEM_5:\t\treturn static_cast<Keys>('\\\\');\r\n\t\tcase VK_OEM_6:\t\treturn static_cast<Keys>(']');\r\n\t\tdefault:\t\t\treturn static_cast<Keys>(keyIn);\r\n\t}\r\n}\r\n\r\nbool BoundsContains(PRectangle rcBounds, HRGN hRgnBounds, PRectangle rcCheck) noexcept {\r\n\tbool contains = true;\r\n\tif (!rcCheck.Empty()) {\r\n\t\tif (!rcBounds.Contains(rcCheck)) {\r\n\t\t\tcontains = false;\r\n\t\t} else if (hRgnBounds) {\r\n\t\t\t// In bounding rectangle so check more accurately using region\r\n\t\t\tconst RECT rcw = RectFromPRectangle(rcCheck);\r\n\t\t\tHRGN hRgnCheck = ::CreateRectRgnIndirect(&rcw);\r\n\t\t\tif (hRgnCheck) {\r\n\t\t\t\tHRGN hRgnDifference = ::CreateRectRgn(0, 0, 0, 0);\r\n\t\t\t\tif (hRgnDifference) {\r\n\t\t\t\t\tconst int combination = ::CombineRgn(hRgnDifference, hRgnCheck, hRgnBounds, RGN_DIFF);\r\n\t\t\t\t\tif (combination != NULLREGION) {\r\n\t\t\t\t\t\tcontains = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t::DeleteRgn(hRgnDifference);\r\n\t\t\t\t}\r\n\t\t\t\t::DeleteRgn(hRgnCheck);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn contains;\r\n}\r\n\r\n// Simplify calling WideCharToMultiByte and MultiByteToWideChar by providing default parameters and using string view.\r\n\r\nint MultiByteFromWideChar(UINT codePage, std::wstring_view wsv, LPSTR lpMultiByteStr, ptrdiff_t cbMultiByte) noexcept {\r\n\treturn ::WideCharToMultiByte(codePage, 0, wsv.data(), static_cast<int>(wsv.length()), lpMultiByteStr, static_cast<int>(cbMultiByte), nullptr, nullptr);\r\n}\r\n\r\nint MultiByteLenFromWideChar(UINT codePage, std::wstring_view wsv) noexcept {\r\n\treturn MultiByteFromWideChar(codePage, wsv, nullptr, 0);\r\n}\r\n\r\nint WideCharFromMultiByte(UINT codePage, std::string_view sv, LPWSTR lpWideCharStr, ptrdiff_t cchWideChar) noexcept {\r\n\treturn ::MultiByteToWideChar(codePage, 0, sv.data(), static_cast<int>(sv.length()), lpWideCharStr, static_cast<int>(cchWideChar));\r\n}\r\n\r\nint WideCharLenFromMultiByte(UINT codePage, std::string_view sv) noexcept {\r\n\treturn WideCharFromMultiByte(codePage, sv, nullptr, 0);\r\n}\r\n\r\nstd::string StringEncode(std::wstring_view wsv, int codePage) {\r\n\tconst int cchMulti = wsv.length() ? MultiByteLenFromWideChar(codePage, wsv) : 0;\r\n\tstd::string sMulti(cchMulti, 0);\r\n\tif (cchMulti) {\r\n\t\tMultiByteFromWideChar(codePage, wsv, sMulti.data(), cchMulti);\r\n\t}\r\n\treturn sMulti;\r\n}\r\n\r\nstd::wstring StringDecode(std::string_view sv, int codePage) {\r\n\tconst int cchWide = sv.length() ? WideCharLenFromMultiByte(codePage, sv) : 0;\r\n\tstd::wstring sWide(cchWide, 0);\r\n\tif (cchWide) {\r\n\t\tWideCharFromMultiByte(codePage, sv, sWide.data(), cchWide);\r\n\t}\r\n\treturn sWide;\r\n}\r\n\r\nstd::wstring StringMapCase(std::wstring_view wsv, DWORD mapFlags) {\r\n\tconst int charsConverted = ::LCMapStringW(LOCALE_SYSTEM_DEFAULT, mapFlags,\r\n\t\twsv.data(), static_cast<int>(wsv.length()), nullptr, 0);\r\n\tstd::wstring wsConverted(charsConverted, 0);\r\n\tif (charsConverted) {\r\n\t\t::LCMapStringW(LOCALE_SYSTEM_DEFAULT, mapFlags,\r\n\t\t\twsv.data(), static_cast<int>(wsv.length()), wsConverted.data(), charsConverted);\r\n\t}\r\n\treturn wsConverted;\r\n}\r\n\r\n}\r\n\r\n// Returns the target converted to UTF8.\r\n// Return the length in bytes.\r\nSci::Position ScintillaWin::TargetAsUTF8(char *text) const {\r\n\tconst Sci::Position targetLength = targetRange.Length();\r\n\tif (IsUnicodeMode()) {\r\n\t\tif (text) {\r\n\t\t\tpdoc->GetCharRange(text, targetRange.start.Position(), targetLength);\r\n\t\t}\r\n\t} else {\r\n\t\t// Need to convert\r\n\t\tconst std::string s = RangeText(targetRange.start.Position(), targetRange.end.Position());\r\n\t\tconst std::wstring characters = StringDecode(s, CodePageOfDocument());\r\n\t\tconst int utf8Len = MultiByteLenFromWideChar(CpUtf8, characters);\r\n\t\tif (text) {\r\n\t\t\tMultiByteFromWideChar(CpUtf8, characters, text, utf8Len);\r\n\t\t\ttext[utf8Len] = '\\0';\r\n\t\t}\r\n\t\treturn utf8Len;\r\n\t}\r\n\treturn targetLength;\r\n}\r\n\r\n// Translates a nul terminated UTF8 string into the document encoding.\r\n// Return the length of the result in bytes.\r\nSci::Position ScintillaWin::EncodedFromUTF8(const char *utf8, char *encoded) const {\r\n\tconst Sci::Position inputLength = (lengthForEncode >= 0) ? lengthForEncode : strlen(utf8);\r\n\tif (IsUnicodeMode()) {\r\n\t\tif (encoded) {\r\n\t\t\tmemcpy(encoded, utf8, inputLength);\r\n\t\t}\r\n\t\treturn inputLength;\r\n\t} else {\r\n\t\t// Need to convert\r\n\t\tconst std::string_view utf8Input(utf8, inputLength);\r\n\t\tconst int charsLen = WideCharLenFromMultiByte(CpUtf8, utf8Input);\r\n\t\tstd::wstring characters(charsLen, L'\\0');\r\n\t\tWideCharFromMultiByte(CpUtf8, utf8Input, &characters[0], charsLen);\r\n\r\n\t\tconst int encodedLen = MultiByteLenFromWideChar(CodePageOfDocument(), characters);\r\n\t\tif (encoded) {\r\n\t\t\tMultiByteFromWideChar(CodePageOfDocument(), characters, encoded, encodedLen);\r\n\t\t\tencoded[encodedLen] = '\\0';\r\n\t\t}\r\n\t\treturn encodedLen;\r\n\t}\r\n}\r\n\r\nvoid ScintillaWin::SetRenderingParams([[maybe_unused]] Surface *psurf) const {\r\n#if defined(USE_D2D)\r\n\tif (psurf) {\r\n\t\tISetRenderingParams *setDrawingParams = dynamic_cast<ISetRenderingParams *>(psurf);\r\n\t\tif (setDrawingParams) {\r\n\t\t\tsetDrawingParams->SetRenderingParams(renderingParams);\r\n\t\t}\r\n\t}\r\n#endif\r\n}\r\n\r\nbool ScintillaWin::PaintDC(HDC hdc) {\r\n\tif (technology == Technology::Default) {\r\n\t\tAutoSurface surfaceWindow(hdc, this);\r\n\t\tif (surfaceWindow) {\r\n\t\t\tPaint(surfaceWindow, rcPaint);\r\n\t\t\tsurfaceWindow->Release();\r\n\t\t}\r\n\t} else {\r\n#if defined(USE_D2D)\r\n\t\tEnsureRenderTarget(hdc);\r\n\t\tif (pRenderTarget) {\r\n\t\t\tAutoSurface surfaceWindow(pRenderTarget, this);\r\n\t\t\tif (surfaceWindow) {\r\n\t\t\t\tSetRenderingParams(surfaceWindow);\r\n\t\t\t\tpRenderTarget->BeginDraw();\r\n\t\t\t\tPaint(surfaceWindow, rcPaint);\r\n\t\t\t\tsurfaceWindow->Release();\r\n\t\t\t\tconst HRESULT hr = pRenderTarget->EndDraw();\r\n\t\t\t\tif (hr == static_cast<HRESULT>(D2DERR_RECREATE_TARGET)) {\r\n\t\t\t\t\tDropRenderTarget();\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n#endif\r\n\t}\r\n\r\n\treturn true;\r\n}\r\n\r\nsptr_t ScintillaWin::WndPaint() {\r\n\t//ElapsedPeriod ep;\r\n\r\n\t// Redirect assertions to debug output and save current state\r\n\tconst bool assertsPopup = Platform::ShowAssertionPopUps(false);\r\n\tpaintState = PaintState::painting;\r\n\tPAINTSTRUCT ps = {};\r\n\r\n\t// Removed since this interferes with reporting other assertions as it occurs repeatedly\r\n\t//PLATFORM_ASSERT(hRgnUpdate == NULL);\r\n\thRgnUpdate = ::CreateRectRgn(0, 0, 0, 0);\r\n\t::GetUpdateRgn(MainHWND(), hRgnUpdate, FALSE);\r\n\t::BeginPaint(MainHWND(), &ps);\r\n\trcPaint = PRectangle::FromInts(ps.rcPaint.left, ps.rcPaint.top, ps.rcPaint.right, ps.rcPaint.bottom);\r\n\tconst PRectangle rcClient = GetClientRectangle();\r\n\tpaintingAllText = BoundsContains(rcPaint, hRgnUpdate, rcClient);\r\n\tif (!PaintDC(ps.hdc)) {\r\n\t\tpaintState = PaintState::abandoned;\r\n\t}\r\n\tif (hRgnUpdate) {\r\n\t\t::DeleteRgn(hRgnUpdate);\r\n\t\thRgnUpdate = {};\r\n\t}\r\n\r\n\t::EndPaint(MainHWND(), &ps);\r\n\tif (paintState == PaintState::abandoned) {\r\n\t\t// Painting area was insufficient to cover new styling or brace highlight positions\r\n\t\tFullPaint();\r\n\t\t::ValidateRect(MainHWND(), nullptr);\r\n\t}\r\n\tpaintState = PaintState::notPainting;\r\n\r\n\t// Restore debug output state\r\n\tPlatform::ShowAssertionPopUps(assertsPopup);\r\n\r\n\t//Platform::DebugPrintf(\"Paint took %g\\n\", ep.Duration());\r\n\treturn 0;\r\n}\r\n\r\nsptr_t ScintillaWin::HandleCompositionWindowed(uptr_t wParam, sptr_t lParam) {\r\n\tif (lParam & GCS_RESULTSTR) {\r\n\t\tIMContext imc(MainHWND());\r\n\t\tif (imc.hIMC) {\r\n\t\t\tAddWString(imc.GetCompositionString(GCS_RESULTSTR), CharacterSource::ImeResult);\r\n\r\n\t\t\t// Set new position after converted\r\n\t\t\tconst Point pos = PointMainCaret();\r\n\t\t\tCOMPOSITIONFORM CompForm {};\r\n\t\t\tCompForm.dwStyle = CFS_POINT;\r\n\t\t\tCompForm.ptCurrentPos = POINTFromPoint(pos);\r\n\t\t\t::ImmSetCompositionWindow(imc.hIMC, &CompForm);\r\n\t\t}\r\n\t\treturn 0;\r\n\t}\r\n\treturn ::DefWindowProc(MainHWND(), WM_IME_COMPOSITION, wParam, lParam);\r\n}\r\n\r\nbool ScintillaWin::KoreanIME() noexcept {\r\n\tconst int codePage = InputCodePage();\r\n\treturn codePage == 949 || codePage == 1361;\r\n}\r\n\r\nvoid ScintillaWin::MoveImeCarets(Sci::Position offset) noexcept {\r\n\t// Move carets relatively by bytes.\r\n\tfor (size_t r=0; r<sel.Count(); r++) {\r\n\t\tconst Sci::Position positionInsert = sel.Range(r).Start().Position();\r\n\t\tsel.Range(r).caret.SetPosition(positionInsert + offset);\r\n\t\tsel.Range(r).anchor.SetPosition(positionInsert + offset);\r\n\t}\r\n}\r\n\r\nvoid ScintillaWin::DrawImeIndicator(int indicator, Sci::Position len) {\r\n\t// Emulate the visual style of IME characters with indicators.\r\n\t// Draw an indicator on the character before caret by the character bytes of len\r\n\t// so it should be called after InsertCharacter().\r\n\t// It does not affect caret positions.\r\n\tif (indicator < 8 || indicator > IndicatorMax) {\r\n\t\treturn;\r\n\t}\r\n\tpdoc->DecorationSetCurrentIndicator(indicator);\r\n\tfor (size_t r=0; r<sel.Count(); r++) {\r\n\t\tconst Sci::Position positionInsert = sel.Range(r).Start().Position();\r\n\t\tpdoc->DecorationFillRange(positionInsert - len, 1, len);\r\n\t}\r\n}\r\n\r\nvoid ScintillaWin::SetCandidateWindowPos() {\r\n\tIMContext imc(MainHWND());\r\n\tif (imc.hIMC) {\r\n\t\tconst Point pos = PointMainCaret();\r\n\t\tconst PRectangle rcClient = GetTextRectangle();\r\n\t\tCANDIDATEFORM CandForm{};\r\n\t\tCandForm.dwIndex = 0;\r\n\t\tCandForm.dwStyle = CFS_EXCLUDE;\r\n\t\tCandForm.ptCurrentPos.x = static_cast<int>(pos.x);\r\n\t\tCandForm.ptCurrentPos.y = static_cast<int>(pos.y + std::max(4, vs.lineHeight/4));\r\n\t\t// Exclude the area of the whole caret line\r\n\t\tCandForm.rcArea.top = static_cast<int>(pos.y);\r\n\t\tCandForm.rcArea.bottom = static_cast<int>(pos.y + vs.lineHeight);\r\n\t\tCandForm.rcArea.left = static_cast<int>(rcClient.left);\r\n\t\tCandForm.rcArea.right = static_cast<int>(rcClient.right);\r\n\t\t::ImmSetCandidateWindow(imc.hIMC, &CandForm);\r\n\t}\r\n}\r\n\r\nvoid ScintillaWin::SelectionToHangul() {\r\n\t// Convert every hanja to hangul within the main range.\r\n\tconst Sci::Position selStart = sel.RangeMain().Start().Position();\r\n\tconst Sci::Position documentStrLen = sel.RangeMain().Length();\r\n\tconst Sci::Position selEnd = selStart + documentStrLen;\r\n\tconst Sci::Position utf16Len = pdoc->CountUTF16(selStart, selEnd);\r\n\r\n\tif (utf16Len > 0) {\r\n\t\tstd::string documentStr(documentStrLen, '\\0');\r\n\t\tpdoc->GetCharRange(&documentStr[0], selStart, documentStrLen);\r\n\r\n\t\tstd::wstring uniStr = StringDecode(documentStr, CodePageOfDocument());\r\n\t\tconst bool converted = HanjaDict::GetHangulOfHanja(uniStr);\r\n\r\n\t\tif (converted) {\r\n\t\t\tdocumentStr = StringEncode(uniStr, CodePageOfDocument());\r\n\t\t\tpdoc->BeginUndoAction();\r\n\t\t\tClearSelection();\r\n\t\t\tInsertPaste(&documentStr[0], documentStr.size());\r\n\t\t\tpdoc->EndUndoAction();\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid ScintillaWin::EscapeHanja() {\r\n\t// The candidate box pops up to user to select a hanja.\r\n\t// It comes into WM_IME_COMPOSITION with GCS_RESULTSTR.\r\n\t// The existing hangul or hanja is replaced with it.\r\n\tif (sel.Count() > 1) {\r\n\t\treturn; // Do not allow multi carets.\r\n\t}\r\n\tconst Sci::Position currentPos = CurrentPosition();\r\n\tconst int oneCharLen = pdoc->LenChar(currentPos);\r\n\r\n\tif (oneCharLen < 2) {\r\n\t\treturn; // No need to handle SBCS.\r\n\t}\r\n\r\n\t// ImmEscapeW() may overwrite uniChar[] with a null terminated string.\r\n\t// So enlarge it enough to Maximum 4 as in UTF-8.\r\n\tconstexpr size_t safeLength = UTF8MaxBytes + 1;\r\n\tstd::string oneChar(safeLength, '\\0');\r\n\tpdoc->GetCharRange(&oneChar[0], currentPos, oneCharLen);\r\n\r\n\tstd::wstring uniChar = StringDecode(oneChar, CodePageOfDocument());\r\n\r\n\tIMContext imc(MainHWND());\r\n\tif (imc.hIMC) {\r\n\t\t// Set the candidate box position since IME may show it.\r\n\t\tSetCandidateWindowPos();\r\n\t\t// IME_ESC_HANJA_MODE appears to receive the first character only.\r\n\t\tif (::ImmEscapeW(GetKeyboardLayout(0), imc.hIMC, IME_ESC_HANJA_MODE, &uniChar[0])) {\r\n\t\t\tSetSelection(currentPos, currentPos + oneCharLen);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid ScintillaWin::ToggleHanja() {\r\n\t// If selection, convert every hanja to hangul within the main range.\r\n\t// If no selection, commit to IME.\r\n\tif (sel.Count() > 1) {\r\n\t\treturn; // Do not allow multi carets.\r\n\t}\r\n\r\n\tif (sel.Empty()) {\r\n\t\tEscapeHanja();\r\n\t} else {\r\n\t\tSelectionToHangul();\r\n\t}\r\n}\r\n\r\nnamespace {\r\n\r\nstd::vector<int> MapImeIndicators(std::vector<BYTE> inputStyle) {\r\n\tstd::vector<int> imeIndicator(inputStyle.size(), IndicatorUnknown);\r\n\tfor (size_t i = 0; i < inputStyle.size(); i++) {\r\n\t\tswitch (static_cast<int>(inputStyle.at(i))) {\r\n\t\tcase ATTR_INPUT:\r\n\t\t\timeIndicator[i] = IndicatorInput;\r\n\t\t\tbreak;\r\n\t\tcase ATTR_TARGET_NOTCONVERTED:\r\n\t\tcase ATTR_TARGET_CONVERTED:\r\n\t\t\timeIndicator[i] = IndicatorTarget;\r\n\t\t\tbreak;\r\n\t\tcase ATTR_CONVERTED:\r\n\t\t\timeIndicator[i] = IndicatorConverted;\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\timeIndicator[i] = IndicatorUnknown;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\treturn imeIndicator;\r\n}\r\n\r\n}\r\n\r\nvoid ScintillaWin::AddWString(std::wstring_view wsv, CharacterSource charSource) {\r\n\tif (wsv.empty())\r\n\t\treturn;\r\n\r\n\tconst int codePage = CodePageOfDocument();\r\n\tfor (size_t i = 0; i < wsv.size(); ) {\r\n\t\tconst size_t ucWidth = UTF16CharLength(wsv[i]);\r\n\t\tconst std::string docChar = StringEncode(wsv.substr(i, ucWidth), codePage);\r\n\r\n\t\tInsertCharacter(docChar, charSource);\r\n\t\ti += ucWidth;\r\n\t}\r\n}\r\n\r\nsptr_t ScintillaWin::HandleCompositionInline(uptr_t, sptr_t lParam) {\r\n\t// Copy & paste by johnsonj with a lot of helps of Neil.\r\n\t// Great thanks for my foreruners, jiniya and BLUEnLIVE.\r\n\r\n\tIMContext imc(MainHWND());\r\n\tif (!imc.hIMC)\r\n\t\treturn 0;\r\n\tif (pdoc->IsReadOnly() || SelectionContainsProtected()) {\r\n\t\t::ImmNotifyIME(imc.hIMC, NI_COMPOSITIONSTR, CPS_CANCEL, 0);\r\n\t\treturn 0;\r\n\t}\r\n\r\n\tbool initialCompose = false;\r\n\tif (pdoc->TentativeActive()) {\r\n\t\tpdoc->TentativeUndo();\r\n\t} else {\r\n\t\t// No tentative undo means start of this composition so\r\n\t\t// fill in any virtual spaces.\r\n\t\tinitialCompose = true;\r\n\t}\r\n\r\n\tview.imeCaretBlockOverride = false;\r\n\tHideCursorIfPreferred();\r\n\r\n\tif (lParam & GCS_RESULTSTR) {\r\n\t\tAddWString(imc.GetCompositionString(GCS_RESULTSTR), CharacterSource::ImeResult);\r\n\t}\r\n\r\n\tif (lParam & GCS_COMPSTR) {\r\n\t\tconst std::wstring wcs = imc.GetCompositionString(GCS_COMPSTR);\r\n\t\tif (wcs.empty()) {\r\n\t\t\tShowCaretAtCurrentPosition();\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\tif (initialCompose) {\r\n\t\t\tClearBeforeTentativeStart();\r\n\t\t}\r\n\r\n\t\t// Set candidate window left aligned to beginning of preedit string.\r\n\t\tSetCandidateWindowPos();\r\n\t\tpdoc->TentativeStart(); // TentativeActive from now on.\r\n\r\n\t\tstd::vector<int> imeIndicator = MapImeIndicators(imc.GetImeAttributes());\r\n\r\n\t\tconst int codePage = CodePageOfDocument();\r\n\t\tconst std::wstring_view wsv = wcs;\r\n\t\tfor (size_t i = 0; i < wsv.size(); ) {\r\n\t\t\tconst size_t ucWidth = UTF16CharLength(wsv[i]);\r\n\t\t\tconst std::string docChar = StringEncode(wsv.substr(i, ucWidth), codePage);\r\n\r\n\t\t\tInsertCharacter(docChar, CharacterSource::TentativeInput);\r\n\r\n\t\t\tDrawImeIndicator(imeIndicator[i], docChar.size());\r\n\t\t\ti += ucWidth;\r\n\t\t}\r\n\r\n\t\t// Japanese IME after pressing Tab replaces input string with first candidate item (target string);\r\n\t\t// when selecting other candidate item, previous item will be replaced with current one.\r\n\t\t// After candidate item been added, it's looks like been full selected, it's better to keep caret\r\n\t\t// at end of \"selection\" (end of input) instead of jump to beginning of input (\"selection\").\r\n\t\tconst bool onlyTarget = std::all_of(imeIndicator.begin(), imeIndicator.end(), [](int i) noexcept {\r\n\t\t\treturn i == IndicatorTarget;\r\n\t\t});\r\n\t\tif (!onlyTarget) {\r\n\t\t\t// CS_NOMOVECARET: keep caret at beginning of composition string which already moved in InsertCharacter().\r\n\t\t\t// GCS_CURSORPOS: current caret position is provided by IME.\r\n\t\t\tSci::Position imeEndToImeCaretU16 = -static_cast<Sci::Position>(wcs.size());\r\n\t\t\tif (!(lParam & CS_NOMOVECARET) && (lParam & GCS_CURSORPOS)) {\r\n\t\t\t\timeEndToImeCaretU16 += imc.GetImeCaretPos();\r\n\t\t\t}\r\n\t\t\tif (imeEndToImeCaretU16 != 0) {\r\n\t\t\t\t// Move back IME caret from current last position to imeCaretPos.\r\n\t\t\t\tconst Sci::Position currentPos = CurrentPosition();\r\n\t\t\t\tconst Sci::Position imeCaretPosDoc = pdoc->GetRelativePositionUTF16(currentPos, imeEndToImeCaretU16);\r\n\r\n\t\t\t\tMoveImeCarets(-currentPos + imeCaretPosDoc);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (KoreanIME()) {\r\n\t\t\tview.imeCaretBlockOverride = true;\r\n\t\t}\r\n\t}\r\n\tEnsureCaretVisible();\r\n\tShowCaretAtCurrentPosition();\r\n\treturn 0;\r\n}\r\n\r\nnamespace {\r\n\r\n// Translate message IDs from WM_* and EM_* to Message::* so can partly emulate Windows Edit control\r\nMessage SciMessageFromEM(unsigned int iMessage) noexcept {\r\n\tswitch (iMessage) {\r\n\tcase EM_CANPASTE: return Message::CanPaste;\r\n\tcase EM_CANUNDO: return Message::CanUndo;\r\n\tcase EM_EMPTYUNDOBUFFER: return Message::EmptyUndoBuffer;\r\n\tcase EM_FINDTEXTEX: return Message::FindText;\r\n\tcase EM_FORMATRANGE: return Message::FormatRange;\r\n\tcase EM_GETFIRSTVISIBLELINE: return Message::GetFirstVisibleLine;\r\n\tcase EM_GETLINECOUNT: return Message::GetLineCount;\r\n\tcase EM_GETSELTEXT: return Message::GetSelText;\r\n\tcase EM_GETTEXTRANGE: return Message::GetTextRange;\r\n\tcase EM_HIDESELECTION: return Message::HideSelection;\r\n\tcase EM_LINEINDEX: return Message::PositionFromLine;\r\n\tcase EM_LINESCROLL: return Message::LineScroll;\r\n\tcase EM_REPLACESEL: return Message::ReplaceSel;\r\n\tcase EM_SCROLLCARET: return Message::ScrollCaret;\r\n\tcase EM_SETREADONLY: return Message::SetReadOnly;\r\n\tcase WM_CLEAR: return Message::Clear;\r\n\tcase WM_COPY: return Message::Copy;\r\n\tcase WM_CUT: return Message::Cut;\r\n\tcase WM_SETTEXT: return Message::SetText;\r\n\tcase WM_PASTE: return Message::Paste;\r\n\tcase WM_UNDO: return Message::Undo;\r\n\t}\r\n\treturn static_cast<Message>(iMessage);\r\n}\r\n\r\n}\r\n\r\nnamespace Scintilla::Internal {\r\n\r\nUINT CodePageFromCharSet(CharacterSet characterSet, UINT documentCodePage) noexcept {\r\n\tif (documentCodePage == CpUtf8) {\r\n\t\treturn CpUtf8;\r\n\t}\r\n\tswitch (characterSet) {\r\n\tcase CharacterSet::Ansi: return 1252;\r\n\tcase CharacterSet::Default: return documentCodePage ? documentCodePage : 1252;\r\n\tcase CharacterSet::Baltic: return 1257;\r\n\tcase CharacterSet::ChineseBig5: return 950;\r\n\tcase CharacterSet::EastEurope: return 1250;\r\n\tcase CharacterSet::GB2312: return 936;\r\n\tcase CharacterSet::Greek: return 1253;\r\n\tcase CharacterSet::Hangul: return 949;\r\n\tcase CharacterSet::Mac: return 10000;\r\n\tcase CharacterSet::Oem: return 437;\r\n\tcase CharacterSet::Russian: return 1251;\r\n\tcase CharacterSet::ShiftJis: return 932;\r\n\tcase CharacterSet::Turkish: return 1254;\r\n\tcase CharacterSet::Johab: return 1361;\r\n\tcase CharacterSet::Hebrew: return 1255;\r\n\tcase CharacterSet::Arabic: return 1256;\r\n\tcase CharacterSet::Vietnamese: return 1258;\r\n\tcase CharacterSet::Thai: return 874;\r\n\tcase CharacterSet::Iso8859_15: return 28605;\r\n\t// Not supported\r\n\tcase CharacterSet::Cyrillic: return documentCodePage;\r\n\tcase CharacterSet::Symbol: return documentCodePage;\r\n\tdefault: break;\r\n\t}\r\n\treturn documentCodePage;\r\n}\r\n\r\n}\r\n\r\nUINT ScintillaWin::CodePageOfDocument() const noexcept {\r\n\treturn CodePageFromCharSet(vs.styles[StyleDefault].characterSet, pdoc->dbcsCodePage);\r\n}\r\n\r\nstd::string ScintillaWin::EncodeWString(std::wstring_view wsv) {\r\n\tif (IsUnicodeMode()) {\r\n\t\tconst size_t len = UTF8Length(wsv);\r\n\t\tstd::string putf(len, 0);\r\n\t\tUTF8FromUTF16(wsv, putf.data(), len);\r\n\t\treturn putf;\r\n\t} else {\r\n\t\t// Not in Unicode mode so convert from Unicode to current Scintilla code page\r\n\t\treturn StringEncode(wsv, CodePageOfDocument());\r\n\t}\r\n}\r\n\r\nsptr_t ScintillaWin::GetTextLength() {\r\n\tif (pdoc->dbcsCodePage == 0 || pdoc->dbcsCodePage == CpUtf8) {\r\n\t\treturn pdoc->CountUTF16(0, pdoc->Length());\r\n\t} else {\r\n\t\t// Count the number of UTF-16 code units line by line\r\n\t\tconst UINT cpSrc = CodePageOfDocument();\r\n\t\tconst Sci::Line lines = pdoc->LinesTotal();\r\n\t\tSci::Position codeUnits = 0;\r\n\t\tstd::string lineBytes;\r\n\t\tfor (Sci::Line line = 0; line < lines; line++) {\r\n\t\t\tconst Sci::Position start = pdoc->LineStart(line);\r\n\t\t\tconst Sci::Position width = pdoc->LineStart(line+1) - start;\r\n\t\t\tlineBytes.resize(width);\r\n\t\t\tpdoc->GetCharRange(lineBytes.data(), start, width);\r\n\t\t\tcodeUnits += WideCharLenFromMultiByte(cpSrc, lineBytes);\r\n\t\t}\r\n\t\treturn codeUnits;\r\n\t}\r\n}\r\n\r\nsptr_t ScintillaWin::GetText(uptr_t wParam, sptr_t lParam) {\r\n\tif (lParam == 0) {\r\n\t\treturn GetTextLength();\r\n\t}\r\n\tif (wParam == 0) {\r\n\t\treturn 0;\r\n\t}\r\n\twchar_t *ptr = static_cast<wchar_t *>(PtrFromSPtr(lParam));\r\n\tif (pdoc->Length() == 0) {\r\n\t\t*ptr = L'\\0';\r\n\t\treturn 0;\r\n\t}\r\n\tconst Sci::Position lengthWanted = wParam - 1;\r\n\tif (IsUnicodeMode()) {\r\n\t\tSci::Position sizeRequestedRange = pdoc->GetRelativePositionUTF16(0, lengthWanted);\r\n\t\tif (sizeRequestedRange < 0) {\r\n\t\t\t// Requested more text than there is in the document.\r\n\t\t\tsizeRequestedRange = pdoc->Length();\r\n\t\t}\r\n\t\tstd::string docBytes(sizeRequestedRange, '\\0');\r\n\t\tpdoc->GetCharRange(&docBytes[0], 0, sizeRequestedRange);\r\n\t\tconst size_t uLen = UTF16FromUTF8(docBytes, ptr, lengthWanted);\r\n\t\tptr[uLen] = L'\\0';\r\n\t\treturn uLen;\r\n\t} else {\r\n\t\t// Not Unicode mode\r\n\t\t// Convert to Unicode using the current Scintilla code page\r\n\t\t// Retrieve as UTF-16 line by line\r\n\t\tconst UINT cpSrc = CodePageOfDocument();\r\n\t\tconst Sci::Line lines = pdoc->LinesTotal();\r\n\t\tSci::Position codeUnits = 0;\r\n\t\tstd::string lineBytes;\r\n\t\tstd::wstring lineAsUTF16;\r\n\t\tfor (Sci::Line line = 0; line < lines && codeUnits < lengthWanted; line++) {\r\n\t\t\tconst Sci::Position start = pdoc->LineStart(line);\r\n\t\t\tconst Sci::Position width = pdoc->LineStart(line + 1) - start;\r\n\t\t\tlineBytes.resize(width);\r\n\t\t\tpdoc->GetCharRange(lineBytes.data(), start, width);\r\n\t\t\tconst Sci::Position codeUnitsLine = WideCharLenFromMultiByte(cpSrc, lineBytes);\r\n\t\t\tlineAsUTF16.resize(codeUnitsLine);\r\n\t\t\tconst Sci::Position lengthLeft = lengthWanted - codeUnits;\r\n\t\t\tWideCharFromMultiByte(cpSrc, lineBytes, lineAsUTF16.data(), lineAsUTF16.length());\r\n\t\t\tconst Sci::Position lengthToCopy = std::min(lengthLeft, codeUnitsLine);\r\n\t\t\tlineAsUTF16.copy(ptr + codeUnits, lengthToCopy);\r\n\t\t\tcodeUnits += lengthToCopy;\r\n\t\t}\r\n\t\tptr[codeUnits] = L'\\0';\r\n\t\treturn codeUnits;\r\n\t}\r\n}\r\n\r\nWindow::Cursor ScintillaWin::ContextCursor(Point pt) {\r\n\tif (inDragDrop == DragDrop::dragging) {\r\n\t\treturn Window::Cursor::up;\r\n\t} else {\r\n\t\t// Display regular (drag) cursor over selection\r\n\t\tif (PointInSelMargin(pt)) {\r\n\t\t\treturn GetMarginCursor(pt);\r\n\t\t} else if (!SelectionEmpty() && PointInSelection(pt)) {\r\n\t\t\treturn Window::Cursor::arrow;\r\n\t\t} else if (PointIsHotspot(pt)) {\r\n\t\t\treturn Window::Cursor::hand;\r\n\t\t} else if (hoverIndicatorPos != Sci::invalidPosition) {\r\n\t\t\tconst Sci::Position pos = PositionFromLocation(pt, true, true);\r\n\t\t\tif (pos != Sci::invalidPosition) {\r\n\t\t\t\treturn Window::Cursor::hand;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn Window::Cursor::text;\r\n}\r\n\r\nsptr_t ScintillaWin::ShowContextMenu(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {\r\n\tPoint ptScreen = PointFromLParam(lParam);\r\n\tPoint ptClient;\r\n\tPOINT point = POINTFromLParam(lParam);\r\n\tif ((point.x == -1) && (point.y == -1)) {\r\n\t\t// Caused by keyboard so display menu near caret\r\n\t\tptClient = PointMainCaret();\r\n\t\tpoint = POINTFromPoint(ptClient);\r\n\t\t::ClientToScreen(MainHWND(), &point);\r\n\t\tptScreen = PointFromPOINT(point);\r\n\t} else {\r\n\t\t::ScreenToClient(MainHWND(), &point);\r\n\t\tptClient = PointFromPOINT(point);\r\n\t}\r\n\tif (ShouldDisplayPopup(ptClient)) {\r\n\t\tContextMenu(ptScreen);\r\n\t\treturn 0;\r\n\t}\r\n\treturn ::DefWindowProc(MainHWND(), iMessage, wParam, lParam);\r\n}\r\n\r\nPRectangle ScintillaWin::GetClientRectangle() const {\r\n\treturn rectangleClient;\r\n}\r\n\r\nvoid ScintillaWin::SizeWindow() {\r\n#if defined(USE_D2D)\r\n\tif (paintState == PaintState::notPainting) {\r\n\t\tDropRenderTarget();\r\n\t} else {\r\n\t\trenderTargetValid = false;\r\n\t}\r\n#endif\r\n\t//Platform::DebugPrintf(\"Scintilla WM_SIZE %d %d\\n\", LOWORD(lParam), HIWORD(lParam));\r\n\trectangleClient = wMain.GetClientPosition();\r\n\tChangeSize();\r\n}\r\n\r\nsptr_t ScintillaWin::MouseMessage(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {\r\n\tswitch (iMessage) {\r\n\tcase WM_LBUTTONDOWN: {\r\n\t\t\t// For IME, set the composition string as the result string.\r\n\t\t\tIMContext imc(MainHWND());\r\n\t\t\tif (imc.hIMC) {\r\n\t\t\t\t::ImmNotifyIME(imc.hIMC, NI_COMPOSITIONSTR, CPS_COMPLETE, 0);\r\n\t\t\t}\r\n\t\t\t//\r\n\t\t\t//Platform::DebugPrintf(\"Buttdown %d %x %x %x %x %x\\n\",iMessage, wParam, lParam,\r\n\t\t\t//\tKeyboardIsKeyDown(VK_SHIFT),\r\n\t\t\t//\tKeyboardIsKeyDown(VK_CONTROL),\r\n\t\t\t//\tKeyboardIsKeyDown(VK_MENU));\r\n\t\t\t::SetFocus(MainHWND());\r\n\t\t\tButtonDownWithModifiers(PointFromLParam(lParam), ::GetMessageTime(),\r\n\t\t\t\t\t\tMouseModifiers(wParam));\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase WM_LBUTTONUP:\r\n\t\tButtonUpWithModifiers(PointFromLParam(lParam),\r\n\t\t\t\t      ::GetMessageTime(), MouseModifiers(wParam));\r\n\t\tbreak;\r\n\r\n\tcase WM_RBUTTONDOWN: {\r\n\t\t\t::SetFocus(MainHWND());\r\n\t\t\tconst Point pt = PointFromLParam(lParam);\r\n\t\t\tif (!PointInSelection(pt)) {\r\n\t\t\t\tCancelModes();\r\n\t\t\t\tSetEmptySelection(PositionFromLocation(PointFromLParam(lParam)));\r\n\t\t\t}\r\n\r\n\t\t\tRightButtonDownWithModifiers(pt, ::GetMessageTime(), MouseModifiers(wParam));\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase WM_MOUSEMOVE: {\r\n\t\t\tcursorIsHidden = false; // to be shown by ButtonMoveWithModifiers\r\n\t\t\tconst Point pt = PointFromLParam(lParam);\r\n\r\n\t\t\t// Windows might send WM_MOUSEMOVE even though the mouse has not been moved:\r\n\t\t\t// http://blogs.msdn.com/b/oldnewthing/archive/2003/10/01/55108.aspx\r\n\t\t\tif (ptMouseLast != pt) {\r\n\t\t\t\tSetTrackMouseLeaveEvent(true);\r\n\t\t\t\tButtonMoveWithModifiers(pt, ::GetMessageTime(), MouseModifiers(wParam));\r\n\t\t\t}\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase WM_MOUSELEAVE:\r\n\t\tSetTrackMouseLeaveEvent(false);\r\n\t\tMouseLeave();\r\n\t\treturn ::DefWindowProc(MainHWND(), iMessage, wParam, lParam);\r\n\r\n\tcase WM_MOUSEWHEEL:\r\n\tcase WM_MOUSEHWHEEL:\r\n\t\tif (!mouseWheelCaptures) {\r\n\t\t\t// if the mouse wheel is not captured, test if the mouse\r\n\t\t\t// pointer is over the editor window and if not, don't\r\n\t\t\t// handle the message but pass it on.\r\n\t\t\tRECT rc;\r\n\t\t\tGetWindowRect(MainHWND(), &rc);\r\n\t\t\tconst POINT pt = POINTFromLParam(lParam);\r\n\t\t\tif (!PtInRect(&rc, pt))\r\n\t\t\t\treturn ::DefWindowProc(MainHWND(), iMessage, wParam, lParam);\r\n\t\t}\r\n\t\t// if autocomplete list active then send mousewheel message to it\r\n\t\tif (ac.Active()) {\r\n\t\t\tHWND hWnd = HwndFromWindow(*(ac.lb));\r\n\t\t\t::SendMessage(hWnd, iMessage, wParam, lParam);\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\t// Treat Shift+WM_MOUSEWHEEL as horizontal scrolling, not data-zoom.\r\n\t\tif (iMessage == WM_MOUSEHWHEEL || (wParam & MK_SHIFT)) {\r\n\t\t\tif (vs.wrap.state != Wrap::None || charsPerScroll == 0) {\r\n\t\t\t\treturn ::DefWindowProc(MainHWND(), iMessage, wParam, lParam);\r\n\t\t\t}\r\n\r\n\t\t\tMouseWheelDelta &wheelDelta = (iMessage == WM_MOUSEHWHEEL) ? horizontalWheelDelta : verticalWheelDelta;\r\n\t\t\tif (wheelDelta.Accumulate(wParam)) {\r\n\t\t\t\tconst int charsToScroll = charsPerScroll * wheelDelta.Actions();\r\n\t\t\t\tconst int widthToScroll = static_cast<int>(std::lround(charsToScroll * vs.aveCharWidth));\r\n\t\t\t\tHorizontalScrollToClamped(xOffset + widthToScroll);\r\n\t\t\t}\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\t// Either SCROLL vertically or ZOOM. We handle the wheel steppings calculation\r\n\t\tif (linesPerScroll != 0 && verticalWheelDelta.Accumulate(wParam)) {\r\n\t\t\tSci::Line linesToScroll = linesPerScroll;\r\n\t\t\tif (linesPerScroll == WHEEL_PAGESCROLL)\r\n\t\t\t\tlinesToScroll = LinesOnScreen() - 1;\r\n\t\t\tif (linesToScroll == 0) {\r\n\t\t\t\tlinesToScroll = 1;\r\n\t\t\t}\r\n\t\t\tlinesToScroll *= verticalWheelDelta.Actions();\r\n\r\n\t\t\tif (wParam & MK_CONTROL) {\r\n\t\t\t\t// Zoom! We play with the font sizes in the styles.\r\n\t\t\t\t// Number of steps/line is ignored, we just care if sizing up or down\r\n\t\t\t\tif (linesToScroll < 0) {\r\n\t\t\t\t\tKeyCommand(Message::ZoomIn);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tKeyCommand(Message::ZoomOut);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// Scroll\r\n\t\t\t\tScrollTo(topLine + linesToScroll);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn 0;\r\n\t}\r\n\treturn 0;\r\n}\r\n\r\nsptr_t ScintillaWin::KeyMessage(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {\r\n\tswitch (iMessage) {\r\n\r\n\tcase WM_SYSKEYDOWN:\r\n\tcase WM_KEYDOWN: {\r\n\t\t\t// Platform::DebugPrintf(\"Keydown %c %c%c%c%c %x %x\\n\",\r\n\t\t\t// iMessage == WM_KEYDOWN ? 'K' : 'S',\r\n\t\t\t// (lParam & (1 << 24)) ? 'E' : '-',\r\n\t\t\t// KeyboardIsKeyDown(VK_SHIFT) ? 'S' : '-',\r\n\t\t\t// KeyboardIsKeyDown(VK_CONTROL) ? 'C' : '-',\r\n\t\t\t// KeyboardIsKeyDown(VK_MENU) ? 'A' : '-',\r\n\t\t\t// wParam, lParam);\r\n\t\t\tlastKeyDownConsumed = false;\r\n\t\t\tconst bool altDown = KeyboardIsKeyDown(VK_MENU);\r\n\t\t\tif (altDown && KeyboardIsNumericKeypadFunction(wParam, lParam)) {\r\n\t\t\t\t// Don't interpret these as they may be characters entered by number.\r\n\t\t\t\treturn ::DefWindowProc(MainHWND(), iMessage, wParam, lParam);\r\n\t\t\t}\r\n\t\t\tconst int ret = KeyDownWithModifiers(\r\n\t\t\t\t\t\t\t\t KeyTranslate(wParam),\r\n\t\t\t\t\t\t\t     ModifierFlags(KeyboardIsKeyDown(VK_SHIFT),\r\n\t\t\t\t\t\t\t\t\t     KeyboardIsKeyDown(VK_CONTROL),\r\n\t\t\t\t\t\t\t\t\t     altDown),\r\n\t\t\t\t\t\t\t     &lastKeyDownConsumed);\r\n\t\t\tif (!ret && !lastKeyDownConsumed) {\r\n\t\t\t\treturn ::DefWindowProc(MainHWND(), iMessage, wParam, lParam);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\tcase WM_KEYUP:\r\n\t\t//Platform::DebugPrintf(\"S keyup %d %x %x\\n\",iMessage, wParam, lParam);\r\n\t\treturn ::DefWindowProc(MainHWND(), iMessage, wParam, lParam);\r\n\r\n\tcase WM_CHAR:\r\n\t\tHideCursorIfPreferred();\r\n\t\tif (((wParam >= 128) || !iscntrl(static_cast<int>(wParam))) || !lastKeyDownConsumed) {\r\n\t\t\twchar_t wcs[3] = { static_cast<wchar_t>(wParam), 0 };\r\n\t\t\tunsigned int wclen = 1;\r\n\t\t\tif (IS_HIGH_SURROGATE(wcs[0])) {\r\n\t\t\t\t// If this is a high surrogate character, we need a second one\r\n\t\t\t\tlastHighSurrogateChar = wcs[0];\r\n\t\t\t\treturn 0;\r\n\t\t\t} else if (IS_LOW_SURROGATE(wcs[0])) {\r\n\t\t\t\twcs[1] = wcs[0];\r\n\t\t\t\twcs[0] = lastHighSurrogateChar;\r\n\t\t\t\tlastHighSurrogateChar = 0;\r\n\t\t\t\twclen = 2;\r\n\t\t\t}\r\n\t\t\tAddWString(std::wstring_view(wcs, wclen), CharacterSource::DirectInput);\r\n\t\t}\r\n\t\treturn 0;\r\n\r\n\tcase WM_UNICHAR:\r\n\t\tif (wParam == UNICODE_NOCHAR) {\r\n\t\t\treturn TRUE;\r\n\t\t} else if (lastKeyDownConsumed) {\r\n\t\t\treturn 1;\r\n\t\t} else {\r\n\t\t\twchar_t wcs[3] = { 0 };\r\n\t\t\tconst size_t wclen = UTF16FromUTF32Character(static_cast<unsigned int>(wParam), wcs);\r\n\t\t\tAddWString(std::wstring_view(wcs, wclen), CharacterSource::DirectInput);\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t}\r\n\r\n\treturn 0;\r\n}\r\n\r\nsptr_t ScintillaWin::FocusMessage(unsigned int iMessage, uptr_t wParam, sptr_t) {\r\n\tswitch (iMessage) {\r\n\tcase WM_KILLFOCUS: {\r\n\t\tHWND wOther = reinterpret_cast<HWND>(wParam);\r\n\t\tHWND wThis = MainHWND();\r\n\t\tconst HWND wCT = HwndFromWindow(ct.wCallTip);\r\n\t\tif (!wParam ||\r\n\t\t\t!(::IsChild(wThis, wOther) || (wOther == wCT))) {\r\n\t\t\tSetFocusState(false);\r\n\t\t\tDestroySystemCaret();\r\n\t\t}\r\n\t\t// Explicitly complete any IME composition\r\n\t\tIMContext imc(MainHWND());\r\n\t\tif (imc.hIMC) {\r\n\t\t\t::ImmNotifyIME(imc.hIMC, NI_COMPOSITIONSTR, CPS_COMPLETE, 0);\r\n\t\t}\r\n\t\tbreak;\r\n\t}\r\n\r\n\tcase WM_SETFOCUS:\r\n\t\tSetFocusState(true);\r\n\t\tDestroySystemCaret();\r\n\t\tCreateSystemCaret();\r\n\t\tbreak;\r\n\t}\r\n\treturn 0;\r\n}\r\n\r\nsptr_t ScintillaWin::IMEMessage(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {\r\n\tswitch (iMessage) {\r\n\r\n\tcase WM_INPUTLANGCHANGE:\r\n\t\treturn ::DefWindowProc(MainHWND(), iMessage, wParam, lParam);\r\n\r\n\tcase WM_INPUTLANGCHANGEREQUEST:\r\n\t\treturn ::DefWindowProc(MainHWND(), iMessage, wParam, lParam);\r\n\r\n\tcase WM_IME_KEYDOWN: {\r\n\t\t\tif (wParam == VK_HANJA) {\r\n\t\t\t\tToggleHanja();\r\n\t\t\t}\r\n\t\t\treturn ::DefWindowProc(MainHWND(), iMessage, wParam, lParam);\r\n\t\t}\r\n\r\n\tcase WM_IME_REQUEST: {\r\n\t\t\tif (wParam == IMR_RECONVERTSTRING) {\r\n\t\t\t\treturn ImeOnReconvert(lParam);\r\n\t\t\t}\r\n\t\t\tif (wParam == IMR_DOCUMENTFEED) {\r\n\t\t\t\treturn ImeOnDocumentFeed(lParam);\r\n\t\t\t}\r\n\t\t\treturn ::DefWindowProc(MainHWND(), iMessage, wParam, lParam);\r\n\t\t}\r\n\r\n\tcase WM_IME_STARTCOMPOSITION:\r\n\t\tif (KoreanIME() || imeInteraction == IMEInteraction::Inline) {\r\n\t\t\treturn 0;\r\n\t\t} else {\r\n\t\t\tImeStartComposition();\r\n\t\t\treturn ::DefWindowProc(MainHWND(), iMessage, wParam, lParam);\r\n\t\t}\r\n\r\n\tcase WM_IME_ENDCOMPOSITION:\r\n\t\tImeEndComposition();\r\n\t\treturn ::DefWindowProc(MainHWND(), iMessage, wParam, lParam);\r\n\r\n\tcase WM_IME_COMPOSITION:\r\n\t\tif (KoreanIME() || imeInteraction == IMEInteraction::Inline) {\r\n\t\t\treturn HandleCompositionInline(wParam, lParam);\r\n\t\t} else {\r\n\t\t\treturn HandleCompositionWindowed(wParam, lParam);\r\n\t\t}\r\n\r\n\tcase WM_IME_SETCONTEXT:\r\n\t\tif (KoreanIME() || imeInteraction == IMEInteraction::Inline) {\r\n\t\t\tif (wParam) {\r\n\t\t\t\tLPARAM NoImeWin = lParam;\r\n\t\t\t\tNoImeWin = NoImeWin & (~ISC_SHOWUICOMPOSITIONWINDOW);\r\n\t\t\t\treturn ::DefWindowProc(MainHWND(), iMessage, wParam, NoImeWin);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn ::DefWindowProc(MainHWND(), iMessage, wParam, lParam);\r\n\r\n\tcase WM_IME_NOTIFY:\r\n\t\treturn ::DefWindowProc(MainHWND(), iMessage, wParam, lParam);\r\n\r\n\t}\r\n\treturn 0;\r\n}\r\n\r\nsptr_t ScintillaWin::EditMessage(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {\r\n\tswitch (iMessage) {\r\n\r\n\tcase EM_LINEFROMCHAR:\r\n\t\tif (PositionFromUPtr(wParam) < 0) {\r\n\t\t\twParam = SelectionStart().Position();\r\n\t\t}\r\n\t\treturn pdoc->LineFromPosition(wParam);\r\n\r\n\tcase EM_EXLINEFROMCHAR:\r\n\t\treturn pdoc->LineFromPosition(lParam);\r\n\r\n\tcase EM_GETSEL:\r\n\t\tif (wParam) {\r\n\t\t\t*reinterpret_cast<DWORD *>(wParam) = static_cast<DWORD>(SelectionStart().Position());\r\n\t\t}\r\n\t\tif (lParam) {\r\n\t\t\t*reinterpret_cast<DWORD *>(lParam) = static_cast<DWORD>(SelectionEnd().Position());\r\n\t\t}\r\n\t\treturn MAKELRESULT(SelectionStart().Position(), SelectionEnd().Position());\r\n\r\n\tcase EM_EXGETSEL: {\r\n\t\t\tif (lParam == 0) {\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t\tCHARRANGE *pCR = reinterpret_cast<CHARRANGE *>(lParam);\r\n\t\t\tpCR->cpMin = static_cast<LONG>(SelectionStart().Position());\r\n\t\t\tpCR->cpMax = static_cast<LONG>(SelectionEnd().Position());\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase EM_SETSEL: {\r\n\t\t\tSci::Position nStart = wParam;\r\n\t\t\tSci::Position nEnd = lParam;\r\n\t\t\tif (nStart == 0 && nEnd == -1) {\r\n\t\t\t\tnEnd = pdoc->Length();\r\n\t\t\t}\r\n\t\t\tif (nStart == -1) {\r\n\t\t\t\tnStart = nEnd;\t// Remove selection\r\n\t\t\t}\r\n\t\t\tSetSelection(nEnd, nStart);\r\n\t\t\tEnsureCaretVisible();\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase EM_EXSETSEL: {\r\n\t\t\tif (lParam == 0) {\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t\tconst CHARRANGE *pCR = reinterpret_cast<const CHARRANGE *>(lParam);\r\n\t\t\tsel.selType = Selection::SelTypes::stream;\r\n\t\t\tif (pCR->cpMin == 0 && pCR->cpMax == -1) {\r\n\t\t\t\tSetSelection(pCR->cpMin, pdoc->Length());\r\n\t\t\t} else {\r\n\t\t\t\tSetSelection(pCR->cpMin, pCR->cpMax);\r\n\t\t\t}\r\n\t\t\tEnsureCaretVisible();\r\n\t\t\treturn pdoc->LineFromPosition(SelectionStart().Position());\r\n\t\t}\r\n\t}\r\n\treturn 0;\r\n}\r\n\r\nsptr_t ScintillaWin::IdleMessage(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {\r\n\tswitch (iMessage) {\r\n\tcase SC_WIN_IDLE:\r\n\t\t// wParam=dwTickCountInitial, or 0 to initialize.  lParam=bSkipUserInputTest\r\n\t\tif (idler.state) {\r\n\t\t\tif (lParam || (WAIT_TIMEOUT == MsgWaitForMultipleObjects(0, nullptr, 0, 0, QS_INPUT | QS_HOTKEY))) {\r\n\t\t\t\tif (Idle()) {\r\n\t\t\t\t\t// User input was given priority above, but all events do get a turn.  Other\r\n\t\t\t\t\t// messages, notifications, etc. will get interleaved with the idle messages.\r\n\r\n\t\t\t\t\t// However, some things like WM_PAINT are a lower priority, and will not fire\r\n\t\t\t\t\t// when there's a message posted.  So, several times a second, we stop and let\r\n\t\t\t\t\t// the low priority events have a turn (after which the timer will fire again).\r\n\r\n\t\t\t\t\t// Suppress a warning from Code Analysis that the GetTickCount function\r\n\t\t\t\t\t// wraps after 49 days. The WM_TIMER will kick off another SC_WIN_IDLE\r\n\t\t\t\t\t// after the wrap.\r\n#ifdef _MSC_VER\r\n#pragma warning(suppress: 28159)\r\n#endif\r\n\t\t\t\t\tconst DWORD dwCurrent = GetTickCount();\r\n\t\t\t\t\tconst DWORD dwStart = wParam ? static_cast<DWORD>(wParam) : dwCurrent;\r\n\t\t\t\t\tconstexpr DWORD maxWorkTime = 50;\r\n\r\n\t\t\t\t\tif (dwCurrent >= dwStart && dwCurrent > maxWorkTime &&dwCurrent - maxWorkTime < dwStart)\r\n\t\t\t\t\t\tPostMessage(MainHWND(), SC_WIN_IDLE, dwStart, 0);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tSetIdle(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase SC_WORK_IDLE:\r\n\t\tIdleWork();\r\n\t\tbreak;\r\n\t}\r\n\treturn 0;\r\n}\r\n\r\nsptr_t ScintillaWin::SciMessage(Message iMessage, uptr_t wParam, sptr_t lParam) {\r\n\tswitch (iMessage) {\r\n\tcase Message::GetDirectFunction:\r\n\t\treturn reinterpret_cast<sptr_t>(DirectFunction);\r\n\r\n\tcase Message::GetDirectStatusFunction:\r\n\t\treturn reinterpret_cast<sptr_t>(DirectStatusFunction);\r\n\r\n\tcase Message::GetDirectPointer:\r\n\t\treturn reinterpret_cast<sptr_t>(this);\r\n\r\n\tcase Message::GrabFocus:\r\n\t\t::SetFocus(MainHWND());\r\n\t\tbreak;\r\n\r\n#ifdef INCLUDE_DEPRECATED_FEATURES\r\n\tcase Message::SETKEYSUNICODE:\r\n\t\tbreak;\r\n\r\n\tcase Message::GETKEYSUNICODE:\r\n\t\treturn true;\r\n#endif\r\n\r\n\tcase Message::SetTechnology:\r\n\t\tif (const Technology technologyNew = static_cast<Technology>(wParam);\r\n\t\t\t(technologyNew == Technology::Default) ||\r\n\t\t\t(technologyNew == Technology::DirectWriteRetain) ||\r\n\t\t\t(technologyNew == Technology::DirectWriteDC) ||\r\n\t\t\t(technologyNew == Technology::DirectWrite)) {\r\n\t\t\tif (technology != technologyNew) {\r\n\t\t\t\tif (technologyNew > Technology::Default) {\r\n#if defined(USE_D2D)\r\n\t\t\t\t\tif (!LoadD2D()) {\r\n\t\t\t\t\t\t// Failed to load Direct2D or DirectWrite so no effect\r\n\t\t\t\t\t\treturn 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tUpdateRenderingParams(true);\r\n#else\r\n\t\t\t\t\treturn 0;\r\n#endif\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbidirectional = Bidirectional::Disabled;\r\n\t\t\t\t}\r\n\t\t\t\tDropRenderTarget();\r\n\t\t\t\ttechnology = technologyNew;\r\n\t\t\t\tview.bufferedDraw = technologyNew == Technology::Default;\r\n\t\t\t\t// Invalidate all cached information including layout.\r\n\t\t\t\tInvalidateStyleRedraw();\r\n\t\t\t}\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\tcase Message::SetBidirectional:\r\n\t\tif (technology == Technology::Default) {\r\n\t\t\tbidirectional = Bidirectional::Disabled;\r\n\t\t} else if (static_cast<Bidirectional>(wParam) <= Bidirectional::R2L) {\r\n\t\t\tbidirectional = static_cast<Bidirectional>(wParam);\r\n\t\t}\r\n\t\t// Invalidate all cached information including layout.\r\n\t\tInvalidateStyleRedraw();\r\n\t\tbreak;\r\n\r\n\tcase Message::TargetAsUTF8:\r\n\t\treturn TargetAsUTF8(CharPtrFromSPtr(lParam));\r\n\r\n\tcase Message::EncodedFromUTF8:\r\n\t\treturn EncodedFromUTF8(ConstCharPtrFromUPtr(wParam),\r\n\t\t\tCharPtrFromSPtr(lParam));\r\n\r\n\tdefault:\r\n\t\tbreak;\r\n\r\n\t}\r\n\treturn 0;\r\n}\r\n\r\nsptr_t ScintillaWin::WndProc(Message iMessage, uptr_t wParam, sptr_t lParam) {\r\n\ttry {\r\n\t\t//Platform::DebugPrintf(\"S M:%x WP:%x L:%x\\n\", iMessage, wParam, lParam);\r\n\t\tconst unsigned int msg = static_cast<unsigned int>(iMessage);\r\n\t\tswitch (msg) {\r\n\r\n\t\tcase WM_CREATE:\r\n\t\t\tctrlID = ::GetDlgCtrlID(HwndFromWindow(wMain));\r\n\t\t\tUpdateBaseElements();\r\n\t\t\t// Get Intellimouse scroll line parameters\r\n\t\t\tGetMouseParameters();\r\n\t\t\t::RegisterDragDrop(MainHWND(), &dt);\r\n\t\t\tbreak;\r\n\r\n\t\tcase WM_COMMAND:\r\n\t\t\tCommand(LOWORD(wParam));\r\n\t\t\tbreak;\r\n\r\n\t\tcase WM_PAINT:\r\n\t\t\treturn WndPaint();\r\n\r\n\t\tcase WM_PRINTCLIENT: {\r\n\t\t\t\tHDC hdc = reinterpret_cast<HDC>(wParam);\r\n\t\t\t\tif (!IsCompatibleDC(hdc)) {\r\n\t\t\t\t\treturn ::DefWindowProc(MainHWND(), msg, wParam, lParam);\r\n\t\t\t\t}\r\n\t\t\t\tFullPaintDC(hdc);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\tcase WM_VSCROLL:\r\n\t\t\tScrollMessage(wParam);\r\n\t\t\tbreak;\r\n\r\n\t\tcase WM_HSCROLL:\r\n\t\t\tHorizontalScrollMessage(wParam);\r\n\t\t\tbreak;\r\n\r\n\t\tcase WM_SIZE:\r\n\t\t\tSizeWindow();\r\n\t\t\tbreak;\r\n\r\n\t\tcase WM_TIMER:\r\n\t\t\tif (wParam == idleTimerID && idler.state) {\r\n\t\t\t\tSendMessage(MainHWND(), SC_WIN_IDLE, 0, 1);\r\n\t\t\t} else {\r\n\t\t\t\tTickFor(static_cast<TickReason>(wParam - fineTimerStart));\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\tcase SC_WIN_IDLE:\r\n\t\tcase SC_WORK_IDLE:\r\n\t\t\treturn IdleMessage(msg, wParam, lParam);\r\n\r\n\t\tcase WM_GETMINMAXINFO:\r\n\t\t\treturn ::DefWindowProc(MainHWND(), msg, wParam, lParam);\r\n\r\n\t\tcase WM_LBUTTONDOWN:\r\n\t\tcase WM_LBUTTONUP:\r\n\t\tcase WM_RBUTTONDOWN:\r\n\t\tcase WM_MOUSEMOVE:\r\n\t\tcase WM_MOUSELEAVE:\r\n\t\tcase WM_MOUSEWHEEL:\r\n\t\tcase WM_MOUSEHWHEEL:\r\n\t\t\treturn MouseMessage(msg, wParam, lParam);\r\n\r\n\t\tcase WM_SETCURSOR:\r\n\t\t\tif (LOWORD(lParam) == HTCLIENT) {\r\n\t\t\t\tif (!cursorIsHidden) {\r\n\t\t\t\t\tPOINT pt;\r\n\t\t\t\t\tif (::GetCursorPos(&pt)) {\r\n\t\t\t\t\t\t::ScreenToClient(MainHWND(), &pt);\r\n\t\t\t\t\t\tDisplayCursor(ContextCursor(PointFromPOINT(pt)));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn TRUE;\r\n\t\t\t} else {\r\n\t\t\t\treturn ::DefWindowProc(MainHWND(), msg, wParam, lParam);\r\n\t\t\t}\r\n\r\n\t\tcase WM_SYSKEYDOWN:\r\n\t\tcase WM_KEYDOWN:\r\n\t\tcase WM_KEYUP:\r\n\t\tcase WM_CHAR:\r\n\t\tcase WM_UNICHAR:\r\n\t\t\treturn KeyMessage(msg, wParam, lParam);\r\n\r\n\t\tcase WM_SETTINGCHANGE:\r\n\t\t\t//Platform::DebugPrintf(\"Setting Changed\\n\");\r\n#if defined(USE_D2D)\r\n\t\t\tif (technology != Technology::Default) {\r\n\t\t\t\tUpdateRenderingParams(true);\r\n\t\t\t}\r\n#endif\r\n\t\t\tUpdateBaseElements();\r\n\t\t\t// Get Intellimouse scroll line parameters\r\n\t\t\tGetMouseParameters();\r\n\t\t\tInvalidateStyleRedraw();\r\n\t\t\tbreak;\r\n\r\n\t\tcase WM_GETDLGCODE:\r\n\t\t\treturn DLGC_HASSETSEL | DLGC_WANTALLKEYS;\r\n\r\n\t\tcase WM_KILLFOCUS:\r\n\t\tcase WM_SETFOCUS:\r\n\t\t\treturn FocusMessage(msg, wParam, lParam);\r\n\r\n\t\tcase WM_SYSCOLORCHANGE:\r\n\t\t\t//Platform::DebugPrintf(\"Setting Changed\\n\");\r\n\t\t\tUpdateBaseElements();\r\n\t\t\tInvalidateStyleData();\r\n\t\t\tbreak;\r\n\r\n\t\tcase WM_DPICHANGED:\r\n\t\t\tdpi = HIWORD(wParam);\r\n\t\t\tInvalidateStyleRedraw();\r\n\t\t\tbreak;\r\n\r\n\t\tcase WM_DPICHANGED_AFTERPARENT: {\r\n\t\t\t\tconst UINT dpiNow = DpiForWindow(wMain.GetID());\r\n\t\t\t\tif (dpi != dpiNow) {\r\n\t\t\t\t\tdpi = dpiNow;\r\n\t\t\t\t\tInvalidateStyleRedraw();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\tcase WM_CONTEXTMENU:\r\n\t\t\treturn ShowContextMenu(msg, wParam, lParam);\r\n\r\n\t\tcase WM_ERASEBKGND:\r\n\t\t\treturn 1;   // Avoid any background erasure as whole window painted.\r\n\r\n\t\tcase WM_SETREDRAW:\r\n\t\t\t::DefWindowProc(MainHWND(), msg, wParam, lParam);\r\n\t\t\tif (wParam) {\r\n\t\t\t\tSetScrollBars();\r\n\t\t\t\tSetVerticalScrollPos();\r\n\t\t\t\tSetHorizontalScrollPos();\r\n\t\t\t}\r\n\t\t\treturn 0;\r\n\r\n\t\tcase WM_CAPTURECHANGED:\r\n\t\t\tcapturedMouse = false;\r\n\t\t\treturn 0;\r\n\r\n\t\t// These are not handled in Scintilla and its faster to dispatch them here.\r\n\t\t// Also moves time out to here so profile doesn't count lots of empty message calls.\r\n\r\n\t\tcase WM_MOVE:\r\n\t\tcase WM_MOUSEACTIVATE:\r\n\t\tcase WM_NCHITTEST:\r\n\t\tcase WM_NCCALCSIZE:\r\n\t\tcase WM_NCPAINT:\r\n\t\tcase WM_NCMOUSEMOVE:\r\n\t\tcase WM_NCLBUTTONDOWN:\r\n\t\tcase WM_SYSCOMMAND:\r\n\t\tcase WM_WINDOWPOSCHANGING:\r\n\t\t\treturn ::DefWindowProc(MainHWND(), msg, wParam, lParam);\r\n\r\n\t\tcase WM_WINDOWPOSCHANGED:\r\n#if defined(USE_D2D)\r\n\t\t\tif (technology != Technology::Default) {\r\n\t\t\t\tif (UpdateRenderingParams(false)) {\r\n\t\t\t\t\tDropGraphics();\r\n\t\t\t\t\tRedraw();\r\n\t\t\t\t}\r\n\t\t\t}\r\n#endif\r\n\t\t\treturn ::DefWindowProc(MainHWND(), msg, wParam, lParam);\r\n\r\n\t\tcase WM_GETTEXTLENGTH:\r\n\t\t\treturn GetTextLength();\r\n\r\n\t\tcase WM_GETTEXT:\r\n\t\t\treturn GetText(wParam, lParam);\r\n\r\n\t\tcase WM_INPUTLANGCHANGE:\r\n\t\tcase WM_INPUTLANGCHANGEREQUEST:\r\n\t\tcase WM_IME_KEYDOWN:\r\n\t\tcase WM_IME_REQUEST:\r\n\t\tcase WM_IME_STARTCOMPOSITION:\r\n\t\tcase WM_IME_ENDCOMPOSITION:\r\n\t\tcase WM_IME_COMPOSITION:\r\n\t\tcase WM_IME_SETCONTEXT:\r\n\t\tcase WM_IME_NOTIFY:\r\n\t\t\treturn IMEMessage(msg, wParam, lParam);\r\n\r\n\t\tcase EM_LINEFROMCHAR:\r\n\t\tcase EM_EXLINEFROMCHAR:\r\n\t\tcase EM_GETSEL:\r\n\t\tcase EM_EXGETSEL:\r\n\t\tcase EM_SETSEL:\r\n\t\tcase EM_EXSETSEL:\r\n\t\t\treturn EditMessage(msg, wParam, lParam);\r\n\t\t}\r\n\r\n\t\tiMessage = SciMessageFromEM(msg);\r\n\t\tswitch (iMessage) {\r\n\t\tcase Message::GetDirectFunction:\r\n\t\tcase Message::GetDirectStatusFunction:\r\n\t\tcase Message::GetDirectPointer:\r\n\t\tcase Message::GrabFocus:\r\n\t\tcase Message::SetTechnology:\r\n\t\tcase Message::SetBidirectional:\r\n\t\tcase Message::TargetAsUTF8:\r\n\t\tcase Message::EncodedFromUTF8:\r\n\t\t\treturn SciMessage(iMessage, wParam, lParam);\r\n\r\n\t\tdefault:\r\n\t\t\treturn ScintillaBase::WndProc(iMessage, wParam, lParam);\r\n\t\t}\r\n\t} catch (std::bad_alloc &) {\r\n\t\terrorStatus = Status::BadAlloc;\r\n\t} catch (...) {\r\n\t\terrorStatus = Status::Failure;\r\n\t}\r\n\treturn 0;\r\n}\r\n\r\nbool ScintillaWin::ValidCodePage(int codePage) const {\r\n\treturn codePage == 0 || codePage == CpUtf8 ||\r\n\t       codePage == 932 || codePage == 936 || codePage == 949 ||\r\n\t       codePage == 950 || codePage == 1361;\r\n}\r\n\r\nstd::string ScintillaWin::UTF8FromEncoded(std::string_view encoded) const {\r\n\tif (IsUnicodeMode()) {\r\n\t\treturn std::string(encoded);\r\n\t} else {\r\n\t\t// Pivot through wide string\r\n\t\tstd::wstring ws = StringDecode(encoded, CodePageOfDocument());\r\n\t\treturn StringEncode(ws, CpUtf8);\r\n\t}\r\n}\r\n\r\nstd::string ScintillaWin::EncodedFromUTF8(std::string_view utf8) const {\r\n\tif (IsUnicodeMode()) {\r\n\t\treturn std::string(utf8);\r\n\t} else {\r\n\t\t// Pivot through wide string\r\n\t\tstd::wstring ws = StringDecode(utf8, CpUtf8);\r\n\t\treturn StringEncode(ws, CodePageOfDocument());\r\n\t}\r\n}\r\n\r\nsptr_t ScintillaWin::DefWndProc(Message iMessage, uptr_t wParam, sptr_t lParam) {\r\n\treturn ::DefWindowProc(MainHWND(), static_cast<unsigned int>(iMessage), wParam, lParam);\r\n}\r\n\r\nbool ScintillaWin::FineTickerRunning(TickReason reason) {\r\n\treturn timers[static_cast<size_t>(reason)] != 0;\r\n}\r\n\r\nvoid ScintillaWin::FineTickerStart(TickReason reason, int millis, int tolerance) {\r\n\tFineTickerCancel(reason);\r\n\tconst UINT_PTR reasonIndex = static_cast<UINT_PTR>(reason);\r\n\tconst UINT_PTR eventID = static_cast<UINT_PTR>(fineTimerStart) + reasonIndex;\r\n\tif (SetCoalescableTimerFn && tolerance) {\r\n\t\ttimers[reasonIndex] = SetCoalescableTimerFn(MainHWND(), eventID, millis, nullptr, tolerance);\r\n\t} else {\r\n\t\ttimers[reasonIndex] = ::SetTimer(MainHWND(), eventID, millis, nullptr);\r\n\t}\r\n}\r\n\r\nvoid ScintillaWin::FineTickerCancel(TickReason reason) {\r\n\tconst UINT_PTR reasonIndex = static_cast<UINT_PTR>(reason);\r\n\tif (timers[reasonIndex]) {\r\n\t\t::KillTimer(MainHWND(), timers[reasonIndex]);\r\n\t\ttimers[reasonIndex] = 0;\r\n\t}\r\n}\r\n\r\n\r\nbool ScintillaWin::SetIdle(bool on) {\r\n\t// On Win32 the Idler is implemented as a Timer on the Scintilla window.  This\r\n\t// takes advantage of the fact that WM_TIMER messages are very low priority,\r\n\t// and are only posted when the message queue is empty, i.e. during idle time.\r\n\tif (idler.state != on) {\r\n\t\tif (on) {\r\n\t\t\tidler.idlerID = ::SetTimer(MainHWND(), idleTimerID, 10, nullptr)\r\n\t\t\t\t? reinterpret_cast<IdlerID>(idleTimerID) : 0;\r\n\t\t} else {\r\n\t\t\t::KillTimer(MainHWND(), reinterpret_cast<uptr_t>(idler.idlerID));\r\n\t\t\tidler.idlerID = 0;\r\n\t\t}\r\n\t\tidler.state = idler.idlerID != 0;\r\n\t}\r\n\treturn idler.state;\r\n}\r\n\r\nvoid ScintillaWin::IdleWork() {\r\n\tstyleIdleInQueue = false;\r\n\tEditor::IdleWork();\r\n}\r\n\r\nvoid ScintillaWin::QueueIdleWork(WorkItems items, Sci::Position upTo) {\r\n\tEditor::QueueIdleWork(items, upTo);\r\n\tif (!styleIdleInQueue) {\r\n\t\tif (PostMessage(MainHWND(), SC_WORK_IDLE, 0, 0)) {\r\n\t\t\tstyleIdleInQueue = true;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid ScintillaWin::SetMouseCapture(bool on) {\r\n\tif (mouseDownCaptures) {\r\n\t\tif (on) {\r\n\t\t\t::SetCapture(MainHWND());\r\n\t\t} else {\r\n\t\t\t::ReleaseCapture();\r\n\t\t}\r\n\t}\r\n\tcapturedMouse = on;\r\n}\r\n\r\nbool ScintillaWin::HaveMouseCapture() {\r\n\t// Cannot just see if GetCapture is this window as the scroll bar also sets capture for the window\r\n\treturn capturedMouse;\r\n\t//return capturedMouse && (::GetCapture() == MainHWND());\r\n}\r\n\r\nvoid ScintillaWin::SetTrackMouseLeaveEvent(bool on) noexcept {\r\n\tif (on && !trackedMouseLeave) {\r\n\t\tTRACKMOUSEEVENT tme {};\r\n\t\ttme.cbSize = sizeof(tme);\r\n\t\ttme.dwFlags = TME_LEAVE;\r\n\t\ttme.hwndTrack = MainHWND();\r\n\t\ttme.dwHoverTime = HOVER_DEFAULT;\t// Unused but triggers Dr. Memory if not initialized\r\n\t\tTrackMouseEvent(&tme);\r\n\t}\r\n\ttrackedMouseLeave = on;\r\n}\r\n\r\nvoid ScintillaWin::HideCursorIfPreferred() noexcept {\r\n\t// SPI_GETMOUSEVANISH from OS.\r\n\tif (typingWithoutCursor && !cursorIsHidden) {\r\n\t\t::SetCursor(NULL);\r\n\t\tcursorIsHidden = true;\r\n\t}\r\n}\r\n\r\nvoid ScintillaWin::UpdateBaseElements() {\r\n\tstruct ElementToIndex { Element element; int nIndex; };\r\n\tconst ElementToIndex eti[] = {\r\n\t\t{ Element::List, COLOR_WINDOWTEXT },\r\n\t\t{ Element::ListBack, COLOR_WINDOW },\r\n\t\t{ Element::ListSelected, COLOR_HIGHLIGHTTEXT },\r\n\t\t{ Element::ListSelectedBack, COLOR_HIGHLIGHT },\r\n\t};\r\n\tbool changed = false;\r\n\tfor (const ElementToIndex &ei : eti) {\r\n\t\tchanged = vs.SetElementBase(ei.element, ColourRGBA::FromRGB(static_cast<int>(::GetSysColor(ei.nIndex)))) || changed;\r\n\t}\r\n\tif (changed) {\r\n\t\tRedraw();\r\n\t}\r\n}\r\n\r\nbool ScintillaWin::PaintContains(PRectangle rc) {\r\n\tif (paintState == PaintState::painting) {\r\n\t\treturn BoundsContains(rcPaint, hRgnUpdate, rc);\r\n\t}\r\n\treturn true;\r\n}\r\n\r\nvoid ScintillaWin::ScrollText(Sci::Line /* linesToMove */) {\r\n\t//Platform::DebugPrintf(\"ScintillaWin::ScrollText %d\\n\", linesToMove);\r\n\t//::ScrollWindow(MainHWND(), 0,\r\n\t//\tvs.lineHeight * linesToMove, 0, 0);\r\n\t//::UpdateWindow(MainHWND());\r\n\tRedraw();\r\n\tUpdateSystemCaret();\r\n}\r\n\r\nvoid ScintillaWin::NotifyCaretMove() {\r\n\tNotifyWinEvent(EVENT_OBJECT_LOCATIONCHANGE, MainHWND(), OBJID_CARET, CHILDID_SELF);\r\n}\r\n\r\nvoid ScintillaWin::UpdateSystemCaret() {\r\n\tif (hasFocus) {\r\n\t\tif (pdoc->TentativeActive()) {\r\n\t\t\t// ongoing inline mode IME composition, don't inform IME of system caret position.\r\n\t\t\t// fix candidate window for Google Japanese IME moved on typing on Win7.\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (HasCaretSizeChanged()) {\r\n\t\t\tDestroySystemCaret();\r\n\t\t\tCreateSystemCaret();\r\n\t\t}\r\n\t\tconst Point pos = PointMainCaret();\r\n\t\t::SetCaretPos(static_cast<int>(pos.x), static_cast<int>(pos.y));\r\n\t}\r\n}\r\n\r\nbool ScintillaWin::IsVisible() const noexcept {\r\n\treturn GetWindowStyle(MainHWND()) & WS_VISIBLE;\r\n}\r\n\r\nint ScintillaWin::SetScrollInfo(int nBar, LPCSCROLLINFO lpsi, BOOL bRedraw) noexcept {\r\n\treturn ::SetScrollInfo(MainHWND(), nBar, lpsi, bRedraw);\r\n}\r\n\r\nbool ScintillaWin::GetScrollInfo(int nBar, LPSCROLLINFO lpsi) noexcept {\r\n\treturn ::GetScrollInfo(MainHWND(), nBar, lpsi) ? true : false;\r\n}\r\n\r\n// Change the scroll position but avoid repaint if changing to same value\r\nvoid ScintillaWin::ChangeScrollPos(int barType, Sci::Position pos) {\r\n\tif (!IsVisible()) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tSCROLLINFO sci = {\r\n\t\tsizeof(sci), 0, 0, 0, 0, 0, 0\r\n\t};\r\n\tsci.fMask = SIF_POS;\r\n\tGetScrollInfo(barType, &sci);\r\n\tif (sci.nPos != pos) {\r\n\t\tDwellEnd(true);\r\n\t\tsci.nPos = static_cast<int>(pos);\r\n\t\tSetScrollInfo(barType, &sci, TRUE);\r\n\t}\r\n}\r\n\r\nvoid ScintillaWin::SetVerticalScrollPos() {\r\n\tChangeScrollPos(SB_VERT, topLine);\r\n}\r\n\r\nvoid ScintillaWin::SetHorizontalScrollPos() {\r\n\tChangeScrollPos(SB_HORZ, xOffset);\r\n}\r\n\r\nbool ScintillaWin::ChangeScrollRange(int nBar, int nMin, int nMax, UINT nPage) noexcept {\r\n\tSCROLLINFO sci = { sizeof(sci), SIF_PAGE | SIF_RANGE, 0, 0, 0, 0, 0 };\r\n\tGetScrollInfo(nBar, &sci);\r\n\tif ((sci.nMin != nMin) || (sci.nMax != nMax) ||\t(sci.nPage != nPage)) {\r\n\t\tsci.nMin = nMin;\r\n\t\tsci.nMax = nMax;\r\n\t\tsci.nPage = nPage;\r\n\t\tSetScrollInfo(nBar, &sci, TRUE);\r\n\t\treturn true;\r\n\t}\r\n\treturn false;\r\n}\r\n\r\nvoid ScintillaWin::HorizontalScrollToClamped(int xPos) {\r\n\tconst HorizontalScrollRange range = GetHorizontalScrollRange();\r\n\tHorizontalScrollTo(std::clamp(xPos, 0, range.documentWidth - range.pageWidth + 1));\r\n}\r\n\r\nHorizontalScrollRange ScintillaWin::GetHorizontalScrollRange() const {\r\n\tconst PRectangle rcText = GetTextRectangle();\r\n\tint pageWidth = static_cast<int>(rcText.Width());\r\n\tconst int horizEndPreferred = std::max({ scrollWidth, pageWidth - 1, 0 });\r\n\tif (!horizontalScrollBarVisible || Wrapping())\r\n\t\tpageWidth = horizEndPreferred + 1;\r\n\treturn { pageWidth, horizEndPreferred };\r\n}\r\n\r\nbool ScintillaWin::ModifyScrollBars(Sci::Line nMax, Sci::Line nPage) {\r\n\tif (!IsVisible()) {\r\n\t\treturn false;\r\n\t}\r\n\r\n\tbool modified = false;\r\n\tconst Sci::Line vertEndPreferred = nMax;\r\n\tif (!verticalScrollBarVisible)\r\n\t\tnPage = vertEndPreferred + 1;\r\n\tif (ChangeScrollRange(SB_VERT, 0, static_cast<int>(vertEndPreferred), static_cast<unsigned int>(nPage))) {\r\n\t\tmodified = true;\r\n\t}\r\n\tconst HorizontalScrollRange range = GetHorizontalScrollRange();\r\n\tif (ChangeScrollRange(SB_HORZ, 0, range.documentWidth, range.pageWidth)) {\r\n\t\tmodified = true;\r\n\t\tif (scrollWidth < range.pageWidth) {\r\n\t\t\tHorizontalScrollTo(0);\r\n\t\t}\r\n\t}\r\n\r\n\treturn modified;\r\n}\r\n\r\nvoid ScintillaWin::NotifyChange() {\r\n\t::SendMessage(::GetParent(MainHWND()), WM_COMMAND,\r\n\t        MAKEWPARAM(GetCtrlID(), FocusChange::Change),\r\n\t\treinterpret_cast<LPARAM>(MainHWND()));\r\n}\r\n\r\nvoid ScintillaWin::NotifyFocus(bool focus) {\r\n\tif (commandEvents) {\r\n\t\t::SendMessage(::GetParent(MainHWND()), WM_COMMAND,\r\n\t\t\tMAKEWPARAM(GetCtrlID(), focus ? FocusChange::Setfocus : FocusChange::Killfocus),\r\n\t\t\treinterpret_cast<LPARAM>(MainHWND()));\r\n\t}\r\n\tEditor::NotifyFocus(focus);\r\n}\r\n\r\nvoid ScintillaWin::SetCtrlID(int identifier) {\r\n\t::SetWindowID(HwndFromWindow(wMain), identifier);\r\n}\r\n\r\nint ScintillaWin::GetCtrlID() {\r\n\treturn ::GetDlgCtrlID(HwndFromWindow(wMain));\r\n}\r\n\r\nvoid ScintillaWin::NotifyParent(NotificationData scn) {\r\n\tscn.nmhdr.hwndFrom = MainHWND();\r\n\tscn.nmhdr.idFrom = GetCtrlID();\r\n\t::SendMessage(::GetParent(MainHWND()), WM_NOTIFY,\r\n\t              GetCtrlID(), reinterpret_cast<LPARAM>(&scn));\r\n}\r\n\r\nvoid ScintillaWin::NotifyDoubleClick(Point pt, KeyMod modifiers) {\r\n\t//Platform::DebugPrintf(\"ScintillaWin Double click 0\\n\");\r\n\tScintillaBase::NotifyDoubleClick(pt, modifiers);\r\n\t// Send myself a WM_LBUTTONDBLCLK, so the container can handle it too.\r\n\tconst POINT point = POINTFromPoint(pt);\r\n\t::SendMessage(MainHWND(),\r\n\t\t\t  WM_LBUTTONDBLCLK,\r\n\t\t\t  FlagSet(modifiers, KeyMod::Shift) ? MK_SHIFT : 0,\r\n\t\t\t  MAKELPARAM(point.x, point.y));\r\n}\r\n\r\nnamespace {\r\n\r\nclass CaseFolderDBCS : public CaseFolderTable {\r\n\t// Allocate the expandable storage here so that it does not need to be reallocated\r\n\t// for each call to Fold.\r\n\tstd::vector<wchar_t> utf16Mixed;\r\n\tstd::vector<wchar_t> utf16Folded;\r\n\tUINT cp;\r\npublic:\r\n\texplicit CaseFolderDBCS(UINT cp_) : cp(cp_) {\r\n\t}\r\n\tsize_t Fold(char *folded, size_t sizeFolded, const char *mixed, size_t lenMixed) override {\r\n\t\tif ((lenMixed == 1) && (sizeFolded > 0)) {\r\n\t\t\tfolded[0] = mapping[static_cast<unsigned char>(mixed[0])];\r\n\t\t\treturn 1;\r\n\t\t} else {\r\n\t\t\tif (lenMixed > utf16Mixed.size()) {\r\n\t\t\t\tutf16Mixed.resize(lenMixed + 8);\r\n\t\t\t}\r\n\t\t\tconst size_t nUtf16Mixed = WideCharFromMultiByte(cp,\r\n\t\t\t\tstd::string_view(mixed, lenMixed),\r\n\t\t\t\t&utf16Mixed[0],\r\n\t\t\t\tutf16Mixed.size());\r\n\r\n\t\t\tif (nUtf16Mixed == 0) {\r\n\t\t\t\t// Failed to convert -> bad input\r\n\t\t\t\tfolded[0] = '\\0';\r\n\t\t\t\treturn 1;\r\n\t\t\t}\r\n\r\n\t\t\tsize_t lenFlat = 0;\r\n\t\t\tfor (size_t mixIndex=0; mixIndex < nUtf16Mixed; mixIndex++) {\r\n\t\t\t\tif ((lenFlat + 20) > utf16Folded.size())\r\n\t\t\t\t\tutf16Folded.resize(lenFlat + 60);\r\n\t\t\t\tconst char *foldedUTF8 = CaseConvert(utf16Mixed[mixIndex], CaseConversion::fold);\r\n\t\t\t\tif (foldedUTF8) {\r\n\t\t\t\t\t// Maximum length of a case conversion is 6 bytes, 3 characters\r\n\t\t\t\t\twchar_t wFolded[20];\r\n\t\t\t\t\tconst size_t charsConverted = UTF16FromUTF8(std::string_view(foldedUTF8),\r\n\t\t\t\t\t\t\twFolded, std::size(wFolded));\r\n\t\t\t\t\tfor (size_t j=0; j<charsConverted; j++)\r\n\t\t\t\t\t\tutf16Folded[lenFlat++] = wFolded[j];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tutf16Folded[lenFlat++] = utf16Mixed[mixIndex];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tconst std::wstring_view wsvFolded(&utf16Folded[0], lenFlat);\r\n\t\t\tconst size_t lenOut = MultiByteLenFromWideChar(cp, wsvFolded);\r\n\r\n\t\t\tif (lenOut < sizeFolded) {\r\n\t\t\t\tMultiByteFromWideChar(cp, wsvFolded, folded, lenOut);\r\n\t\t\t\treturn lenOut;\r\n\t\t\t} else {\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\n\r\n}\r\n\r\nstd::unique_ptr<CaseFolder> ScintillaWin::CaseFolderForEncoding() {\r\n\tconst UINT cpDest = CodePageOfDocument();\r\n\tif (cpDest == CpUtf8) {\r\n\t\treturn std::make_unique<CaseFolderUnicode>();\r\n\t} else {\r\n\t\tif (pdoc->dbcsCodePage == 0) {\r\n\t\t\tstd::unique_ptr<CaseFolderTable> pcf = std::make_unique<CaseFolderTable>();\r\n\t\t\t// Only for single byte encodings\r\n\t\t\tfor (int i=0x80; i<0x100; i++) {\r\n\t\t\t\tchar sCharacter[2] = \"A\";\r\n\t\t\t\tsCharacter[0] = static_cast<char>(i);\r\n\t\t\t\twchar_t wCharacter[20];\r\n\t\t\t\tconst unsigned int lengthUTF16 = WideCharFromMultiByte(cpDest, sCharacter,\r\n\t\t\t\t\twCharacter, std::size(wCharacter));\r\n\t\t\t\tif (lengthUTF16 == 1) {\r\n\t\t\t\t\tconst char *caseFolded = CaseConvert(wCharacter[0], CaseConversion::fold);\r\n\t\t\t\t\tif (caseFolded) {\r\n\t\t\t\t\t\twchar_t wLower[20];\r\n\t\t\t\t\t\tconst size_t charsConverted = UTF16FromUTF8(std::string_view(caseFolded),\r\n\t\t\t\t\t\t\twLower, std::size(wLower));\r\n\t\t\t\t\t\tif (charsConverted == 1) {\r\n\t\t\t\t\t\t\tchar sCharacterLowered[20];\r\n\t\t\t\t\t\t\tconst unsigned int lengthConverted = MultiByteFromWideChar(cpDest,\r\n\t\t\t\t\t\t\t\tstd::wstring_view(wLower, charsConverted),\r\n\t\t\t\t\t\t\t\tsCharacterLowered, std::size(sCharacterLowered));\r\n\t\t\t\t\t\t\tif ((lengthConverted == 1) && (sCharacter[0] != sCharacterLowered[0])) {\r\n\t\t\t\t\t\t\t\tpcf->SetTranslation(sCharacter[0], sCharacterLowered[0]);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn pcf;\r\n\t\t} else {\r\n\t\t\treturn std::make_unique<CaseFolderDBCS>(cpDest);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nstd::string ScintillaWin::CaseMapString(const std::string &s, CaseMapping caseMapping) {\r\n\tif ((s.size() == 0) || (caseMapping == CaseMapping::same))\r\n\t\treturn s;\r\n\r\n\tconst UINT cpDoc = CodePageOfDocument();\r\n\tif (cpDoc == CpUtf8) {\r\n\t\treturn CaseConvertString(s, (caseMapping == CaseMapping::upper) ? CaseConversion::upper : CaseConversion::lower);\r\n\t}\r\n\r\n\t// Change text to UTF-16\r\n\tconst std::wstring wsText = StringDecode(s, cpDoc);\r\n\r\n\tconst DWORD mapFlags = LCMAP_LINGUISTIC_CASING |\r\n\t\t((caseMapping == CaseMapping::upper) ? LCMAP_UPPERCASE : LCMAP_LOWERCASE);\r\n\r\n\t// Change case\r\n\tconst std::wstring wsConverted = StringMapCase(wsText, mapFlags);\r\n\r\n\t// Change back to document encoding\r\n\tstd::string sConverted = StringEncode(wsConverted, cpDoc);\r\n\r\n\treturn sConverted;\r\n}\r\n\r\nvoid ScintillaWin::Copy() {\r\n\t//Platform::DebugPrintf(\"Copy\\n\");\r\n\tif (!sel.Empty()) {\r\n\t\tSelectionText selectedText;\r\n\t\tCopySelectionRange(&selectedText);\r\n\t\tCopyToClipboard(selectedText);\r\n\t}\r\n}\r\n\r\nbool ScintillaWin::CanPaste() {\r\n\tif (!Editor::CanPaste())\r\n\t\treturn false;\r\n\treturn ::IsClipboardFormatAvailable(CF_UNICODETEXT) != FALSE;\r\n}\r\n\r\nnamespace {\r\n\r\nclass GlobalMemory {\r\n\tHGLOBAL hand {};\r\npublic:\r\n\tvoid *ptr {};\r\n\tGlobalMemory() noexcept {\r\n\t}\r\n\texplicit GlobalMemory(HGLOBAL hand_) noexcept : hand(hand_) {\r\n\t\tif (hand) {\r\n\t\t\tptr = ::GlobalLock(hand);\r\n\t\t}\r\n\t}\r\n\t// Deleted so GlobalMemory objects can not be copied.\r\n\tGlobalMemory(const GlobalMemory &) = delete;\r\n\tGlobalMemory(GlobalMemory &&) = delete;\r\n\tGlobalMemory &operator=(const GlobalMemory &) = delete;\r\n\tGlobalMemory &operator=(GlobalMemory &&) = delete;\r\n\t~GlobalMemory() {\r\n\t\tassert(!ptr);\r\n\t\tassert(!hand);\r\n\t}\r\n\tvoid Allocate(size_t bytes) noexcept {\r\n\t\tassert(!hand);\r\n\t\thand = ::GlobalAlloc(GMEM_MOVEABLE | GMEM_ZEROINIT, bytes);\r\n\t\tif (hand) {\r\n\t\t\tptr = ::GlobalLock(hand);\r\n\t\t}\r\n\t}\r\n\tHGLOBAL Unlock() noexcept {\r\n\t\tassert(ptr);\r\n\t\tHGLOBAL handCopy = hand;\r\n\t\t::GlobalUnlock(hand);\r\n\t\tptr = nullptr;\r\n\t\thand = {};\r\n\t\treturn handCopy;\r\n\t}\r\n\tvoid SetClip(UINT uFormat) noexcept {\r\n\t\t::SetClipboardData(uFormat, Unlock());\r\n\t}\r\n\toperator bool() const noexcept {\r\n\t\treturn ptr != nullptr;\r\n\t}\r\n\tSIZE_T Size() const noexcept {\r\n\t\treturn ::GlobalSize(hand);\r\n\t}\r\n};\r\n\r\n// OpenClipboard may fail if another application has opened the clipboard.\r\n// Try up to 8 times, with an initial delay of 1 ms and an exponential back off\r\n// for a maximum total delay of 127 ms (1+2+4+8+16+32+64).\r\nbool OpenClipboardRetry(HWND hwnd) noexcept {\r\n\tfor (int attempt=0; attempt<8; attempt++) {\r\n\t\tif (attempt > 0) {\r\n\t\t\t::Sleep(1 << (attempt-1));\r\n\t\t}\r\n\t\tif (::OpenClipboard(hwnd)) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\treturn false;\r\n}\r\n\r\nbool IsValidFormatEtc(const FORMATETC *pFE) noexcept {\r\n\treturn pFE->ptd == nullptr &&\r\n\t\t(pFE->dwAspect & DVASPECT_CONTENT) != 0 &&\r\n\t\tpFE->lindex == -1 &&\r\n\t\t(pFE->tymed & TYMED_HGLOBAL) != 0;\r\n}\r\n\r\nbool SupportedFormat(const FORMATETC *pFE) noexcept {\r\n\treturn pFE->cfFormat == CF_UNICODETEXT &&\r\n\t\tIsValidFormatEtc(pFE);\r\n}\r\n\r\n}\r\n\r\nvoid ScintillaWin::Paste() {\r\n\tif (!::OpenClipboardRetry(MainHWND())) {\r\n\t\treturn;\r\n\t}\r\n\tUndoGroup ug(pdoc);\r\n\tconst bool isLine = SelectionEmpty() &&\r\n\t\t(::IsClipboardFormatAvailable(cfLineSelect) || ::IsClipboardFormatAvailable(cfVSLineTag));\r\n\tClearSelection(multiPasteMode == MultiPaste::Each);\r\n\tbool isRectangular = (::IsClipboardFormatAvailable(cfColumnSelect) != 0);\r\n\r\n\tif (!isRectangular) {\r\n\t\t// Evaluate \"Borland IDE Block Type\" explicitly\r\n\t\tGlobalMemory memBorlandSelection(::GetClipboardData(cfBorlandIDEBlockType));\r\n\t\tif (memBorlandSelection) {\r\n\t\t\tisRectangular = (memBorlandSelection.Size() == 1) && (static_cast<BYTE *>(memBorlandSelection.ptr)[0] == 0x02);\r\n\t\t\tmemBorlandSelection.Unlock();\r\n\t\t}\r\n\t}\r\n\tconst PasteShape pasteShape = isRectangular ? PasteShape::rectangular : (isLine ? PasteShape::line : PasteShape::stream);\r\n\r\n\t// Use CF_UNICODETEXT if available\r\n\tGlobalMemory memUSelection(::GetClipboardData(CF_UNICODETEXT));\r\n\tif (const wchar_t *uptr = static_cast<const wchar_t *>(memUSelection.ptr)) {\r\n\t\tconst std::string putf = EncodeWString(uptr);\r\n\t\tInsertPasteShape(putf.c_str(), putf.length(), pasteShape);\r\n\t\tmemUSelection.Unlock();\r\n\t}\r\n\t::CloseClipboard();\r\n\tRedraw();\r\n}\r\n\r\nvoid ScintillaWin::CreateCallTipWindow(PRectangle) {\r\n\tif (!ct.wCallTip.Created()) {\r\n\t\tHWND wnd = ::CreateWindow(callClassName, TEXT(\"ACallTip\"),\r\n\t\t\t\t\t     WS_POPUP, 100, 100, 150, 20,\r\n\t\t\t\t\t     MainHWND(), 0,\r\n\t\t\t\t\t     GetWindowInstance(MainHWND()),\r\n\t\t\t\t\t     this);\r\n\t\tct.wCallTip = wnd;\r\n\t\tct.wDraw = wnd;\r\n\t}\r\n}\r\n\r\nvoid ScintillaWin::AddToPopUp(const char *label, int cmd, bool enabled) {\r\n\tHMENU hmenuPopup = static_cast<HMENU>(popup.GetID());\r\n\tif (!label[0])\r\n\t\t::AppendMenuA(hmenuPopup, MF_SEPARATOR, 0, \"\");\r\n\telse if (enabled)\r\n\t\t::AppendMenuA(hmenuPopup, MF_STRING, cmd, label);\r\n\telse\r\n\t\t::AppendMenuA(hmenuPopup, MF_STRING | MF_DISABLED | MF_GRAYED, cmd, label);\r\n}\r\n\r\nvoid ScintillaWin::ClaimSelection() {\r\n\t// Windows does not have a primary selection\r\n}\r\n\r\n/// Implement IUnknown\r\nSTDMETHODIMP FormatEnumerator::QueryInterface(REFIID riid, PVOID *ppv) {\r\n\t//Platform::DebugPrintf(\"EFE QI\");\r\n\t*ppv = nullptr;\r\n\tif (riid == IID_IUnknown || riid == IID_IEnumFORMATETC) {\r\n\t\t*ppv = this;\r\n\t} else {\r\n\t\treturn E_NOINTERFACE;\r\n\t}\r\n\tAddRef();\r\n\treturn S_OK;\r\n}\r\nSTDMETHODIMP_(ULONG)FormatEnumerator::AddRef() {\r\n\treturn ++ref;\r\n}\r\nSTDMETHODIMP_(ULONG)FormatEnumerator::Release() {\r\n\tconst ULONG refs = --ref;\r\n\tif (refs == 0) {\r\n\t\tdelete this;\r\n\t}\r\n\treturn refs;\r\n}\r\n/// Implement IEnumFORMATETC\r\nSTDMETHODIMP FormatEnumerator::Next(ULONG celt, FORMATETC *rgelt, ULONG *pceltFetched) {\r\n\tif (!rgelt) return E_POINTER;\r\n\tULONG putPos = 0;\r\n\twhile ((pos < formats.size()) && (putPos < celt)) {\r\n\t\trgelt->cfFormat = formats[pos];\r\n\t\trgelt->ptd = nullptr;\r\n\t\trgelt->dwAspect = DVASPECT_CONTENT;\r\n\t\trgelt->lindex = -1;\r\n\t\trgelt->tymed = TYMED_HGLOBAL;\r\n\t\trgelt++;\r\n\t\tpos++;\r\n\t\tputPos++;\r\n\t}\r\n\tif (pceltFetched)\r\n\t\t*pceltFetched = putPos;\r\n\treturn putPos ? S_OK : S_FALSE;\r\n}\r\nSTDMETHODIMP FormatEnumerator::Skip(ULONG celt) {\r\n\tpos += celt;\r\n\treturn S_OK;\r\n}\r\nSTDMETHODIMP FormatEnumerator::Reset() {\r\n\tpos = 0;\r\n\treturn S_OK;\r\n}\r\nSTDMETHODIMP FormatEnumerator::Clone(IEnumFORMATETC **ppenum) {\r\n\tFormatEnumerator *pfe;\r\n\ttry {\r\n\t\tpfe = new FormatEnumerator(pos, &formats[0], formats.size());\r\n\t} catch (...) {\r\n\t\treturn E_OUTOFMEMORY;\r\n\t}\r\n\treturn pfe->QueryInterface(IID_IEnumFORMATETC, reinterpret_cast<void **>(ppenum));\r\n}\r\n\r\nFormatEnumerator::FormatEnumerator(ULONG pos_, const CLIPFORMAT formats_[], size_t formatsLen_) {\r\n\tref = 0;   // First QI adds first reference...\r\n\tpos = pos_;\r\n\tformats.insert(formats.begin(), formats_, formats_+formatsLen_);\r\n}\r\n\r\n/// Implement IUnknown\r\nSTDMETHODIMP DropSource::QueryInterface(REFIID riid, PVOID *ppv) {\r\n\treturn sci->QueryInterface(riid, ppv);\r\n}\r\nSTDMETHODIMP_(ULONG)DropSource::AddRef() {\r\n\treturn sci->AddRef();\r\n}\r\nSTDMETHODIMP_(ULONG)DropSource::Release() {\r\n\treturn sci->Release();\r\n}\r\n\r\n/// Implement IDropSource\r\nSTDMETHODIMP DropSource::QueryContinueDrag(BOOL fEsc, DWORD grfKeyState) {\r\n\tif (fEsc)\r\n\t\treturn DRAGDROP_S_CANCEL;\r\n\tif (!(grfKeyState & MK_LBUTTON))\r\n\t\treturn DRAGDROP_S_DROP;\r\n\treturn S_OK;\r\n}\r\n\r\nSTDMETHODIMP DropSource::GiveFeedback(DWORD) {\r\n\treturn DRAGDROP_S_USEDEFAULTCURSORS;\r\n}\r\n\r\n/// Implement IUnkown\r\nSTDMETHODIMP DataObject::QueryInterface(REFIID riid, PVOID *ppv) {\r\n\t//Platform::DebugPrintf(\"DO QI %p\\n\", this);\r\n\treturn sci->QueryInterface(riid, ppv);\r\n}\r\nSTDMETHODIMP_(ULONG)DataObject::AddRef() {\r\n\treturn sci->AddRef();\r\n}\r\nSTDMETHODIMP_(ULONG)DataObject::Release() {\r\n\treturn sci->Release();\r\n}\r\n/// Implement IDataObject\r\nSTDMETHODIMP DataObject::GetData(FORMATETC *pFEIn, STGMEDIUM *pSTM) {\r\n\treturn sci->GetData(pFEIn, pSTM);\r\n}\r\n\r\nSTDMETHODIMP DataObject::GetDataHere(FORMATETC *, STGMEDIUM *) {\r\n\t//Platform::DebugPrintf(\"DOB GetDataHere\\n\");\r\n\treturn E_NOTIMPL;\r\n}\r\n\r\nSTDMETHODIMP DataObject::QueryGetData(FORMATETC *pFE) {\r\n\tif (sci->DragIsRectangularOK(pFE->cfFormat) && IsValidFormatEtc(pFE)) {\r\n\t\treturn S_OK;\r\n\t}\r\n\r\n\tif (SupportedFormat(pFE)) {\r\n\t\treturn S_OK;\r\n\t} else {\r\n\t\treturn S_FALSE;\r\n\t}\r\n}\r\n\r\nSTDMETHODIMP DataObject::GetCanonicalFormatEtc(FORMATETC *, FORMATETC *pFEOut) {\r\n\t//Platform::DebugPrintf(\"DOB GetCanon\\n\");\r\n\tpFEOut->cfFormat = CF_UNICODETEXT;\r\n\tpFEOut->ptd = nullptr;\r\n\tpFEOut->dwAspect = DVASPECT_CONTENT;\r\n\tpFEOut->lindex = -1;\r\n\tpFEOut->tymed = TYMED_HGLOBAL;\r\n\treturn S_OK;\r\n}\r\n\r\nSTDMETHODIMP DataObject::SetData(FORMATETC *, STGMEDIUM *, BOOL) {\r\n\t//Platform::DebugPrintf(\"DOB SetData\\n\");\r\n\treturn E_FAIL;\r\n}\r\n\r\nSTDMETHODIMP DataObject::EnumFormatEtc(DWORD dwDirection, IEnumFORMATETC **ppEnum) {\r\n\ttry {\r\n\t\t//Platform::DebugPrintf(\"DOB EnumFormatEtc %d\\n\", dwDirection);\r\n\t\tif (dwDirection != DATADIR_GET) {\r\n\t\t\t*ppEnum = nullptr;\r\n\t\t\treturn E_FAIL;\r\n\t\t}\r\n\r\n\t\tconst CLIPFORMAT formats[] = {CF_UNICODETEXT};\r\n\t\tFormatEnumerator *pfe = new FormatEnumerator(0, formats, std::size(formats));\r\n\t\treturn pfe->QueryInterface(IID_IEnumFORMATETC, reinterpret_cast<void **>(ppEnum));\r\n\t} catch (std::bad_alloc &) {\r\n\t\tsci->errorStatus = Status::BadAlloc;\r\n\t\treturn E_OUTOFMEMORY;\r\n\t} catch (...) {\r\n\t\tsci->errorStatus = Status::Failure;\r\n\t\treturn E_FAIL;\r\n\t}\r\n}\r\n\r\nSTDMETHODIMP DataObject::DAdvise(FORMATETC *, DWORD, IAdviseSink *, PDWORD) {\r\n\t//Platform::DebugPrintf(\"DOB DAdvise\\n\");\r\n\treturn E_FAIL;\r\n}\r\n\r\nSTDMETHODIMP DataObject::DUnadvise(DWORD) {\r\n\t//Platform::DebugPrintf(\"DOB DUnadvise\\n\");\r\n\treturn E_FAIL;\r\n}\r\n\r\nSTDMETHODIMP DataObject::EnumDAdvise(IEnumSTATDATA **) {\r\n\t//Platform::DebugPrintf(\"DOB EnumDAdvise\\n\");\r\n\treturn E_FAIL;\r\n}\r\n\r\n/// Implement IUnknown\r\nSTDMETHODIMP DropTarget::QueryInterface(REFIID riid, PVOID *ppv) {\r\n\t//Platform::DebugPrintf(\"DT QI %p\\n\", this);\r\n\treturn sci->QueryInterface(riid, ppv);\r\n}\r\nSTDMETHODIMP_(ULONG)DropTarget::AddRef() {\r\n\treturn sci->AddRef();\r\n}\r\nSTDMETHODIMP_(ULONG)DropTarget::Release() {\r\n\treturn sci->Release();\r\n}\r\n\r\n/// Implement IDropTarget by forwarding to Scintilla\r\nSTDMETHODIMP DropTarget::DragEnter(LPDATAOBJECT pIDataSource, DWORD grfKeyState, POINTL pt, PDWORD pdwEffect) {\r\n\ttry {\r\n\t\treturn sci->DragEnter(pIDataSource, grfKeyState, pt, pdwEffect);\r\n\t} catch (...) {\r\n\t\tsci->errorStatus = Status::Failure;\r\n\t}\r\n\treturn E_FAIL;\r\n}\r\nSTDMETHODIMP DropTarget::DragOver(DWORD grfKeyState, POINTL pt, PDWORD pdwEffect) {\r\n\ttry {\r\n\t\treturn sci->DragOver(grfKeyState, pt, pdwEffect);\r\n\t} catch (...) {\r\n\t\tsci->errorStatus = Status::Failure;\r\n\t}\r\n\treturn E_FAIL;\r\n}\r\nSTDMETHODIMP DropTarget::DragLeave() {\r\n\ttry {\r\n\t\treturn sci->DragLeave();\r\n\t} catch (...) {\r\n\t\tsci->errorStatus = Status::Failure;\r\n\t}\r\n\treturn E_FAIL;\r\n}\r\nSTDMETHODIMP DropTarget::Drop(LPDATAOBJECT pIDataSource, DWORD grfKeyState, POINTL pt, PDWORD pdwEffect) {\r\n\ttry {\r\n\t\treturn sci->Drop(pIDataSource, grfKeyState, pt, pdwEffect);\r\n\t} catch (...) {\r\n\t\tsci->errorStatus = Status::Failure;\r\n\t}\r\n\treturn E_FAIL;\r\n}\r\n\r\n/**\r\n * DBCS: support Input Method Editor (IME).\r\n * Called when IME Window opened.\r\n */\r\nvoid ScintillaWin::ImeStartComposition() {\r\n\tif (caret.active) {\r\n\t\t// Move IME Window to current caret position\r\n\t\tIMContext imc(MainHWND());\r\n\t\tconst Point pos = PointMainCaret();\r\n\t\tCOMPOSITIONFORM CompForm {};\r\n\t\tCompForm.dwStyle = CFS_POINT;\r\n\t\tCompForm.ptCurrentPos = POINTFromPoint(pos);\r\n\r\n\t\t::ImmSetCompositionWindow(imc.hIMC, &CompForm);\r\n\r\n\t\t// Set font of IME window to same as surrounded text.\r\n\t\tif (stylesValid) {\r\n\t\t\t// Since the style creation code has been made platform independent,\r\n\t\t\t// The logfont for the IME is recreated here.\r\n\t\t\tconst int styleHere = pdoc->StyleIndexAt(sel.MainCaret());\r\n\t\t\tLOGFONTW lf = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, L\"\"};\r\n\t\t\tint sizeZoomed = vs.styles[styleHere].size + vs.zoomLevel * FontSizeMultiplier;\r\n\t\t\tif (sizeZoomed <= 2 * FontSizeMultiplier)\t// Hangs if sizeZoomed <= 1\r\n\t\t\t\tsizeZoomed = 2 * FontSizeMultiplier;\r\n\t\t\t// The negative is to allow for leading\r\n\t\t\tlf.lfHeight = -::MulDiv(sizeZoomed, dpi, 72*FontSizeMultiplier);\r\n\t\t\tlf.lfWeight = static_cast<LONG>(vs.styles[styleHere].weight);\r\n\t\t\tlf.lfItalic = vs.styles[styleHere].italic ? 1 : 0;\r\n\t\t\tlf.lfCharSet = DEFAULT_CHARSET;\r\n\t\t\tlf.lfFaceName[0] = L'\\0';\r\n\t\t\tif (vs.styles[styleHere].fontName) {\r\n\t\t\t\tconst char* fontName = vs.styles[styleHere].fontName;\r\n\t\t\t\tUTF16FromUTF8(std::string_view(fontName), lf.lfFaceName, LF_FACESIZE);\r\n\t\t\t}\r\n\r\n\t\t\t::ImmSetCompositionFontW(imc.hIMC, &lf);\r\n\t\t}\r\n\t\t// Caret is displayed in IME window. So, caret in Scintilla is useless.\r\n\t\tDropCaret();\r\n\t}\r\n}\r\n\r\n/** Called when IME Window closed. */\r\nvoid ScintillaWin::ImeEndComposition() {\r\n\t// clear IME composition state.\r\n\tview.imeCaretBlockOverride = false;\r\n\tpdoc->TentativeUndo();\r\n\tShowCaretAtCurrentPosition();\r\n}\r\n\r\nLRESULT ScintillaWin::ImeOnReconvert(LPARAM lParam) {\r\n\t// Reconversion on windows limits within one line without eol.\r\n\t// Look around:   baseStart  <--  (|mainStart|  -- mainEnd)  --> baseEnd.\r\n\tconst Sci::Position mainStart = sel.RangeMain().Start().Position();\r\n\tconst Sci::Position mainEnd = sel.RangeMain().End().Position();\r\n\tconst Sci::Line curLine = pdoc->SciLineFromPosition(mainStart);\r\n\tif (curLine != pdoc->LineFromPosition(mainEnd))\r\n\t\treturn 0;\r\n\tconst Sci::Position baseStart = pdoc->LineStart(curLine);\r\n\tconst Sci::Position baseEnd = pdoc->LineEnd(curLine);\r\n\tif ((baseStart == baseEnd) || (mainEnd > baseEnd))\r\n\t\treturn 0;\r\n\r\n\tconst int codePage = CodePageOfDocument();\r\n\tconst std::wstring rcFeed = StringDecode(RangeText(baseStart, baseEnd), codePage);\r\n\tconst int rcFeedLen = static_cast<int>(rcFeed.length()) * sizeof(wchar_t);\r\n\tconst int rcSize = sizeof(RECONVERTSTRING) + rcFeedLen + sizeof(wchar_t);\r\n\r\n\tRECONVERTSTRING *rc = static_cast<RECONVERTSTRING *>(PtrFromSPtr(lParam));\r\n\tif (!rc)\r\n\t\treturn rcSize; // Immediately be back with rcSize of memory block.\r\n\r\n\twchar_t *rcFeedStart = reinterpret_cast<wchar_t*>(rc + 1);\r\n\tmemcpy(rcFeedStart, &rcFeed[0], rcFeedLen);\r\n\r\n\tstd::string rcCompString = RangeText(mainStart, mainEnd);\r\n\tstd::wstring rcCompWstring = StringDecode(rcCompString, codePage);\r\n\tstd::string rcCompStart = RangeText(baseStart, mainStart);\r\n\tstd::wstring rcCompWstart = StringDecode(rcCompStart, codePage);\r\n\r\n\t// Map selection to dwCompStr.\r\n\t// No selection assumes current caret as rcCompString without length.\r\n\trc->dwVersion = 0; // It should be absolutely 0.\r\n\trc->dwStrLen = static_cast<DWORD>(rcFeed.length());\r\n\trc->dwStrOffset = sizeof(RECONVERTSTRING);\r\n\trc->dwCompStrLen = static_cast<DWORD>(rcCompWstring.length());\r\n\trc->dwCompStrOffset = static_cast<DWORD>(rcCompWstart.length()) * sizeof(wchar_t);\r\n\trc->dwTargetStrLen = rc->dwCompStrLen;\r\n\trc->dwTargetStrOffset =rc->dwCompStrOffset;\r\n\r\n\tIMContext imc(MainHWND());\r\n\tif (!imc.hIMC)\r\n\t\treturn 0;\r\n\r\n\tif (!::ImmSetCompositionStringW(imc.hIMC, SCS_QUERYRECONVERTSTRING, rc, rcSize, nullptr, 0))\r\n\t\treturn 0;\r\n\r\n\t// No selection asks IME to fill target fields with its own value.\r\n\tconst int tgWlen = rc->dwTargetStrLen;\r\n\tconst int tgWstart = rc->dwTargetStrOffset / sizeof(wchar_t);\r\n\r\n\tstd::string tgCompStart = StringEncode(rcFeed.substr(0, tgWstart), codePage);\r\n\tstd::string tgComp = StringEncode(rcFeed.substr(tgWstart, tgWlen), codePage);\r\n\r\n\t// No selection needs to adjust reconvert start position for IME set.\r\n\tconst int adjust = static_cast<int>(tgCompStart.length() - rcCompStart.length());\r\n\tconst int docCompLen = static_cast<int>(tgComp.length());\r\n\r\n\t// Make place for next composition string to sit in.\r\n\tfor (size_t r=0; r<sel.Count(); r++) {\r\n\t\tconst Sci::Position rBase = sel.Range(r).Start().Position();\r\n\t\tconst Sci::Position docCompStart = rBase + adjust;\r\n\r\n\t\tif (inOverstrike) { // the docCompLen of bytes will be overstriked.\r\n\t\t\tsel.Range(r).caret.SetPosition(docCompStart);\r\n\t\t\tsel.Range(r).anchor.SetPosition(docCompStart);\r\n\t\t} else {\r\n\t\t\t// Ensure docCompStart+docCompLen be not beyond lineEnd.\r\n\t\t\t// since docCompLen by byte might break eol.\r\n\t\t\tconst Sci::Position lineEnd = pdoc->LineEndPosition(rBase);\r\n\t\t\tconst Sci::Position overflow = (docCompStart + docCompLen) - lineEnd;\r\n\t\t\tif (overflow > 0) {\r\n\t\t\t\tpdoc->DeleteChars(docCompStart, docCompLen - overflow);\r\n\t\t\t} else {\r\n\t\t\t\tpdoc->DeleteChars(docCompStart, docCompLen);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t// Immediately Target Input or candidate box choice with GCS_COMPSTR.\r\n\treturn rcSize;\r\n}\r\n\r\nLRESULT ScintillaWin::ImeOnDocumentFeed(LPARAM lParam) const {\r\n\t// This is called while typing preedit string in.\r\n\t// So there is no selection.\r\n\t// Limit feed within one line without EOL.\r\n\t// Look around:   lineStart |<--  |compStart| - caret - compEnd|  -->| lineEnd.\r\n\r\n\tconst Sci::Position curPos = CurrentPosition();\r\n\tconst Sci::Line curLine = pdoc->SciLineFromPosition(curPos);\r\n\tconst Sci::Position lineStart = pdoc->LineStart(curLine);\r\n\tconst Sci::Position lineEnd = pdoc->LineEnd(curLine);\r\n\r\n\tconst std::wstring rcFeed = StringDecode(RangeText(lineStart, lineEnd), CodePageOfDocument());\r\n\tconst int rcFeedLen = static_cast<int>(rcFeed.length()) * sizeof(wchar_t);\r\n\tconst int rcSize = sizeof(RECONVERTSTRING) + rcFeedLen + sizeof(wchar_t);\r\n\r\n\tRECONVERTSTRING *rc = static_cast<RECONVERTSTRING *>(PtrFromSPtr(lParam));\r\n\tif (!rc)\r\n\t\treturn rcSize;\r\n\r\n\twchar_t *rcFeedStart = reinterpret_cast<wchar_t*>(rc + 1);\r\n\tmemcpy(rcFeedStart, &rcFeed[0], rcFeedLen);\r\n\r\n\tIMContext imc(MainHWND());\r\n\tif (!imc.hIMC)\r\n\t\treturn 0;\r\n\r\n\tDWORD compStrLen = 0;\r\n\tSci::Position compStart = curPos;\r\n\tif (pdoc->TentativeActive()) {\r\n\t\t// rcFeed contains current composition string\r\n\t\tcompStrLen = imc.GetCompositionStringLength(GCS_COMPSTR);\r\n\t\tconst int imeCaretPos = imc.GetImeCaretPos();\r\n\t\tcompStart = pdoc->GetRelativePositionUTF16(curPos, -imeCaretPos);\r\n\t}\r\n\tconst Sci::Position compStrOffset = pdoc->CountUTF16(lineStart, compStart);\r\n\r\n\t// Fill in reconvert structure.\r\n\t// Let IME to decide what the target is.\r\n\trc->dwVersion = 0; //constant\r\n\trc->dwStrLen = static_cast<DWORD>(rcFeed.length());\r\n\trc->dwStrOffset = sizeof(RECONVERTSTRING); //constant\r\n\trc->dwCompStrLen = compStrLen;\r\n\trc->dwCompStrOffset = static_cast<DWORD>(compStrOffset) * sizeof(wchar_t);\r\n\trc->dwTargetStrLen = rc->dwCompStrLen;\r\n\trc->dwTargetStrOffset = rc->dwCompStrOffset;\r\n\r\n\treturn rcSize; // MS API says reconv structure to be returned.\r\n}\r\n\r\nvoid ScintillaWin::GetMouseParameters() noexcept {\r\n\t// This retrieves the number of lines per scroll as configured in the Mouse Properties sheet in Control Panel\r\n\t::SystemParametersInfo(SPI_GETWHEELSCROLLLINES, 0, &linesPerScroll, 0);\r\n\tif (!::SystemParametersInfo(SPI_GETWHEELSCROLLCHARS, 0, &charsPerScroll, 0)) {\r\n\t\t// no horizontal scrolling configuration on Windows XP\r\n\t\tcharsPerScroll = (linesPerScroll == WHEEL_PAGESCROLL) ? 3 : linesPerScroll;\r\n\t}\r\n\t::SystemParametersInfo(SPI_GETMOUSEVANISH, 0, &typingWithoutCursor, 0);\r\n\r\n\t// https://learn.microsoft.com/en-us/answers/questions/815036/windows-cursor-size\r\n\tHKEY hKey;\r\n\tLSTATUS status = ::RegOpenKeyExW(HKEY_CURRENT_USER, L\"Control Panel\\\\Cursors\", 0, KEY_READ, &hKey);\r\n\tif (status == ERROR_SUCCESS) {\r\n\t\tDWORD baseSize = 0;\r\n\t\tDWORD type = REG_DWORD;\r\n\t\tDWORD size = sizeof(DWORD);\r\n\t\tstatus = ::RegQueryValueExW(hKey, L\"CursorBaseSize\", nullptr, &type, reinterpret_cast<LPBYTE>(&baseSize), &size);\r\n\t\tif (status == ERROR_SUCCESS && type == REG_DWORD) {\r\n\t\t\tcursorBaseSize = baseSize;\r\n\t\t}\r\n\t\t::RegCloseKey(hKey);\r\n\t}\r\n}\r\n\r\nvoid ScintillaWin::CopyToGlobal(GlobalMemory &gmUnicode, const SelectionText &selectedText) {\r\n\tconst std::string_view svSelected(selectedText.Data(), selectedText.LengthWithTerminator());\r\n\tif (IsUnicodeMode()) {\r\n\t\tconst size_t uchars = UTF16Length(svSelected);\r\n\t\tgmUnicode.Allocate(2 * uchars);\r\n\t\tif (gmUnicode) {\r\n\t\t\tUTF16FromUTF8(svSelected,\r\n\t\t\t\tstatic_cast<wchar_t *>(gmUnicode.ptr), uchars);\r\n\t\t}\r\n\t} else {\r\n\t\t// Not Unicode mode\r\n\t\t// Convert to Unicode using the current Scintilla code page\r\n\t\tconst UINT cpSrc = CodePageFromCharSet(\r\n\t\t\tselectedText.characterSet, selectedText.codePage);\r\n\t\tconst size_t uLen = WideCharLenFromMultiByte(cpSrc, svSelected);\r\n\t\tgmUnicode.Allocate(2 * uLen);\r\n\t\tif (gmUnicode) {\r\n\t\t\tWideCharFromMultiByte(cpSrc, svSelected,\r\n\t\t\t\tstatic_cast<wchar_t *>(gmUnicode.ptr), uLen);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid ScintillaWin::CopyToClipboard(const SelectionText &selectedText) {\r\n\tif (!::OpenClipboardRetry(MainHWND())) {\r\n\t\treturn;\r\n\t}\r\n\t::EmptyClipboard();\r\n\r\n\tGlobalMemory uniText;\r\n\tCopyToGlobal(uniText, selectedText);\r\n\tif (uniText) {\r\n\t\tuniText.SetClip(CF_UNICODETEXT);\r\n\t}\r\n\r\n\tif (selectedText.rectangular) {\r\n\t\t::SetClipboardData(cfColumnSelect, 0);\r\n\r\n\t\tGlobalMemory borlandSelection;\r\n\t\tborlandSelection.Allocate(1);\r\n\t\tif (borlandSelection) {\r\n\t\t\tstatic_cast<BYTE *>(borlandSelection.ptr)[0] = 0x02;\r\n\t\t\tborlandSelection.SetClip(cfBorlandIDEBlockType);\r\n\t\t}\r\n\t}\r\n\r\n\tif (selectedText.lineCopy) {\r\n\t\t::SetClipboardData(cfLineSelect, 0);\r\n\t\t::SetClipboardData(cfVSLineTag, 0);\r\n\t}\r\n\r\n\t::CloseClipboard();\r\n}\r\n\r\nvoid ScintillaWin::ScrollMessage(WPARAM wParam) {\r\n\t//DWORD dwStart = timeGetTime();\r\n\t//Platform::DebugPrintf(\"Scroll %x %d\\n\", wParam, lParam);\r\n\r\n\tSCROLLINFO sci = {};\r\n\tsci.cbSize = sizeof(sci);\r\n\tsci.fMask = SIF_ALL;\r\n\r\n\tGetScrollInfo(SB_VERT, &sci);\r\n\r\n\t//Platform::DebugPrintf(\"ScrollInfo %d mask=%x min=%d max=%d page=%d pos=%d track=%d\\n\", b,sci.fMask,\r\n\t//sci.nMin, sci.nMax, sci.nPage, sci.nPos, sci.nTrackPos);\r\n\tSci::Line topLineNew = topLine;\r\n\tswitch (LOWORD(wParam)) {\r\n\tcase SB_LINEUP:\r\n\t\ttopLineNew -= 1;\r\n\t\tbreak;\r\n\tcase SB_LINEDOWN:\r\n\t\ttopLineNew += 1;\r\n\t\tbreak;\r\n\tcase SB_PAGEUP:\r\n\t\ttopLineNew -= LinesToScroll(); break;\r\n\tcase SB_PAGEDOWN: topLineNew += LinesToScroll(); break;\r\n\tcase SB_TOP: topLineNew = 0; break;\r\n\tcase SB_BOTTOM: topLineNew = MaxScrollPos(); break;\r\n\tcase SB_THUMBPOSITION: topLineNew = sci.nTrackPos; break;\r\n\tcase SB_THUMBTRACK: topLineNew = sci.nTrackPos; break;\r\n\t}\r\n\tScrollTo(topLineNew);\r\n}\r\n\r\nvoid ScintillaWin::HorizontalScrollMessage(WPARAM wParam) {\r\n\tint xPos = xOffset;\r\n\tconst PRectangle rcText = GetTextRectangle();\r\n\tconst int pageWidth = static_cast<int>(rcText.Width() * 2 / 3);\r\n\tswitch (LOWORD(wParam)) {\r\n\tcase SB_LINEUP:\r\n\t\txPos -= 20;\r\n\t\tbreak;\r\n\tcase SB_LINEDOWN:\t// May move past the logical end\r\n\t\txPos += 20;\r\n\t\tbreak;\r\n\tcase SB_PAGEUP:\r\n\t\txPos -= pageWidth;\r\n\t\tbreak;\r\n\tcase SB_PAGEDOWN:\r\n\t\txPos += pageWidth;\r\n\t\tbreak;\r\n\tcase SB_TOP:\r\n\t\txPos = 0;\r\n\t\tbreak;\r\n\tcase SB_BOTTOM:\r\n\t\txPos = scrollWidth;\r\n\t\tbreak;\r\n\tcase SB_THUMBPOSITION:\r\n\tcase SB_THUMBTRACK: {\r\n\t\t\t// Do NOT use wParam, its 16 bit and not enough for very long lines. Its still possible to overflow the 32 bit but you have to try harder =]\r\n\t\t\tSCROLLINFO si {};\r\n\t\t\tsi.cbSize = sizeof(si);\r\n\t\t\tsi.fMask = SIF_TRACKPOS;\r\n\t\t\tif (GetScrollInfo(SB_HORZ, &si)) {\r\n\t\t\t\txPos = si.nTrackPos;\r\n\t\t\t}\r\n\t\t}\r\n\t\tbreak;\r\n\t}\r\n\tHorizontalScrollToClamped(xPos);\r\n}\r\n\r\n/**\r\n * Redraw all of text area.\r\n * This paint will not be abandoned.\r\n */\r\nvoid ScintillaWin::FullPaint() {\r\n\tif ((technology == Technology::Default) || (technology == Technology::DirectWriteDC)) {\r\n\t\tHDC hdc = ::GetDC(MainHWND());\r\n\t\tFullPaintDC(hdc);\r\n\t\t::ReleaseDC(MainHWND(), hdc);\r\n\t} else {\r\n\t\tFullPaintDC({});\r\n\t}\r\n}\r\n\r\n/**\r\n * Redraw all of text area on the specified DC.\r\n * This paint will not be abandoned.\r\n */\r\nvoid ScintillaWin::FullPaintDC(HDC hdc) {\r\n\tpaintState = PaintState::painting;\r\n\trcPaint = GetClientRectangle();\r\n\tpaintingAllText = true;\r\n\tPaintDC(hdc);\r\n\tpaintState = PaintState::notPainting;\r\n}\r\n\r\nnamespace {\r\n\r\nbool CompareDevCap(HDC hdc, HDC hOtherDC, int nIndex) noexcept {\r\n\treturn ::GetDeviceCaps(hdc, nIndex) == ::GetDeviceCaps(hOtherDC, nIndex);\r\n}\r\n\r\n}\r\n\r\nbool ScintillaWin::IsCompatibleDC(HDC hOtherDC) noexcept {\r\n\tHDC hdc = ::GetDC(MainHWND());\r\n\tconst bool isCompatible =\r\n\t\tCompareDevCap(hdc, hOtherDC, TECHNOLOGY) &&\r\n\t\tCompareDevCap(hdc, hOtherDC, LOGPIXELSY) &&\r\n\t\tCompareDevCap(hdc, hOtherDC, LOGPIXELSX) &&\r\n\t\tCompareDevCap(hdc, hOtherDC, BITSPIXEL) &&\r\n\t\tCompareDevCap(hdc, hOtherDC, PLANES);\r\n\t::ReleaseDC(MainHWND(), hdc);\r\n\treturn isCompatible;\r\n}\r\n\r\nDWORD ScintillaWin::EffectFromState(DWORD grfKeyState) const noexcept {\r\n\t// These are the Wordpad semantics.\r\n\tDWORD dwEffect;\r\n\tif (inDragDrop == DragDrop::dragging)\t// Internal defaults to move\r\n\t\tdwEffect = DROPEFFECT_MOVE;\r\n\telse\r\n\t\tdwEffect = DROPEFFECT_COPY;\r\n\tif (grfKeyState & MK_ALT)\r\n\t\tdwEffect = DROPEFFECT_MOVE;\r\n\tif (grfKeyState & MK_CONTROL)\r\n\t\tdwEffect = DROPEFFECT_COPY;\r\n\treturn dwEffect;\r\n}\r\n\r\n/// Implement IUnknown\r\nSTDMETHODIMP ScintillaWin::QueryInterface(REFIID riid, PVOID *ppv) {\r\n\t*ppv = nullptr;\r\n\tif (riid == IID_IUnknown) {\r\n\t\t*ppv = &dt;\r\n\t} else if (riid == IID_IDropSource) {\r\n\t\t*ppv = &ds;\r\n\t} else if (riid == IID_IDropTarget) {\r\n\t\t*ppv = &dt;\r\n\t} else if (riid == IID_IDataObject) {\r\n\t\t*ppv = &dob;\r\n\t}\r\n\tif (!*ppv)\r\n\t\treturn E_NOINTERFACE;\r\n\treturn S_OK;\r\n}\r\n\r\nSTDMETHODIMP_(ULONG) ScintillaWin::AddRef() {\r\n\treturn 1;\r\n}\r\n\r\nSTDMETHODIMP_(ULONG) ScintillaWin::Release() {\r\n\treturn 1;\r\n}\r\n\r\n/// Implement IDropTarget\r\nSTDMETHODIMP ScintillaWin::DragEnter(LPDATAOBJECT pIDataSource, DWORD grfKeyState,\r\n                                     POINTL, PDWORD pdwEffect) {\r\n\tif (!pIDataSource )\r\n\t\treturn E_POINTER;\r\n\tFORMATETC fmtu = {CF_UNICODETEXT, nullptr, DVASPECT_CONTENT, -1, TYMED_HGLOBAL };\r\n\tconst HRESULT hrHasUText = pIDataSource->QueryGetData(&fmtu);\r\n\thasOKText = (hrHasUText == S_OK);\r\n\tif (hasOKText) {\r\n\t\t*pdwEffect = EffectFromState(grfKeyState);\r\n\t} else {\r\n\t\t*pdwEffect = DROPEFFECT_NONE;\r\n\t}\r\n\r\n\treturn S_OK;\r\n}\r\n\r\nSTDMETHODIMP ScintillaWin::DragOver(DWORD grfKeyState, POINTL pt, PDWORD pdwEffect) {\r\n\ttry {\r\n\t\tif (!hasOKText || pdoc->IsReadOnly()) {\r\n\t\t\t*pdwEffect = DROPEFFECT_NONE;\r\n\t\t\treturn S_OK;\r\n\t\t}\r\n\r\n\t\t*pdwEffect = EffectFromState(grfKeyState);\r\n\r\n\t\t// Update the cursor.\r\n\t\tPOINT rpt = {pt.x, pt.y};\r\n\t\t::ScreenToClient(MainHWND(), &rpt);\r\n\t\tSetDragPosition(SPositionFromLocation(PointFromPOINT(rpt), false, false, UserVirtualSpace()));\r\n\r\n\t\treturn S_OK;\r\n\t} catch (...) {\r\n\t\terrorStatus = Status::Failure;\r\n\t}\r\n\treturn E_FAIL;\r\n}\r\n\r\nSTDMETHODIMP ScintillaWin::DragLeave() {\r\n\ttry {\r\n\t\tSetDragPosition(SelectionPosition(Sci::invalidPosition));\r\n\t\treturn S_OK;\r\n\t} catch (...) {\r\n\t\terrorStatus = Status::Failure;\r\n\t}\r\n\treturn E_FAIL;\r\n}\r\n\r\nSTDMETHODIMP ScintillaWin::Drop(LPDATAOBJECT pIDataSource, DWORD grfKeyState,\r\n                                POINTL pt, PDWORD pdwEffect) {\r\n\ttry {\r\n\t\t*pdwEffect = EffectFromState(grfKeyState);\r\n\r\n\t\tif (!pIDataSource)\r\n\t\t\treturn E_POINTER;\r\n\r\n\t\tSetDragPosition(SelectionPosition(Sci::invalidPosition));\r\n\r\n\t\tstd::string putf;\r\n\t\tFORMATETC fmtu = {CF_UNICODETEXT, nullptr, DVASPECT_CONTENT, -1, TYMED_HGLOBAL};\r\n\t\tSTGMEDIUM medium{};\r\n\t\tconst HRESULT hr = pIDataSource->GetData(&fmtu, &medium);\r\n\t\tif (!SUCCEEDED(hr)) {\r\n\t\t\treturn hr;\r\n\t\t}\r\n\t\tif (medium.hGlobal) {\r\n\t\t\tGlobalMemory memUDrop(medium.hGlobal);\r\n\t\t\tif (const wchar_t *uptr = static_cast<const wchar_t *>(memUDrop.ptr)) {\r\n\t\t\t\tputf = EncodeWString(uptr);\r\n\t\t\t}\r\n\t\t\tmemUDrop.Unlock();\r\n\t\t}\r\n\r\n\t\tif (putf.empty()) {\r\n\t\t\treturn S_OK;\r\n\t\t}\r\n\r\n\t\tFORMATETC fmtr = {cfColumnSelect, nullptr, DVASPECT_CONTENT, -1, TYMED_HGLOBAL};\r\n\t\tconst bool isRectangular = S_OK == pIDataSource->QueryGetData(&fmtr);\r\n\r\n\t\tPOINT rpt = {pt.x, pt.y};\r\n\t\t::ScreenToClient(MainHWND(), &rpt);\r\n\t\tconst SelectionPosition movePos = SPositionFromLocation(PointFromPOINT(rpt), false, false, UserVirtualSpace());\r\n\r\n\t\tDropAt(movePos, putf.c_str(), putf.size(), *pdwEffect == DROPEFFECT_MOVE, isRectangular);\r\n\r\n\t\t// Free data\r\n\t\t::ReleaseStgMedium(&medium);\r\n\r\n\t\treturn S_OK;\r\n\t} catch (...) {\r\n\t\terrorStatus = Status::Failure;\r\n\t}\r\n\treturn E_FAIL;\r\n}\r\n\r\n/// Implement important part of IDataObject\r\nSTDMETHODIMP ScintillaWin::GetData(FORMATETC *pFEIn, STGMEDIUM *pSTM) {\r\n\tif (!SupportedFormat(pFEIn)) {\r\n\t\t//Platform::DebugPrintf(\"DOB GetData No %d %x %x fmt=%x\\n\", lenDrag, pFEIn, pSTM, pFEIn->cfFormat);\r\n\t\treturn DATA_E_FORMATETC;\r\n\t}\r\n\r\n\tpSTM->tymed = TYMED_HGLOBAL;\r\n\t//Platform::DebugPrintf(\"DOB GetData OK %d %x %x\\n\", lenDrag, pFEIn, pSTM);\r\n\r\n\tGlobalMemory uniText;\r\n\tCopyToGlobal(uniText, drag);\r\n\tpSTM->hGlobal = uniText ? uniText.Unlock() : 0;\r\n\tpSTM->pUnkForRelease = nullptr;\r\n\treturn S_OK;\r\n}\r\n\r\nvoid ScintillaWin::Prepare() noexcept {\r\n\tPlatform_Initialise(hInstance);\r\n\r\n\t// Register the CallTip class\r\n\tWNDCLASSEX wndclassc{};\r\n\twndclassc.cbSize = sizeof(wndclassc);\r\n\twndclassc.style = CS_GLOBALCLASS | CS_HREDRAW | CS_VREDRAW;\r\n\twndclassc.cbWndExtra = sizeof(ScintillaWin *);\r\n\twndclassc.hInstance = hInstance;\r\n\twndclassc.lpfnWndProc = ScintillaWin::CTWndProc;\r\n\twndclassc.hCursor = ::LoadCursor(NULL, IDC_ARROW);\r\n\twndclassc.lpszClassName = callClassName;\r\n\r\n\tcallClassAtom = ::RegisterClassEx(&wndclassc);\r\n}\r\n\r\nbool ScintillaWin::Register(HINSTANCE hInstance_) noexcept {\r\n\r\n\thInstance = hInstance_;\r\n\r\n\t// Register the Scintilla class\r\n\t// Register Scintilla as a wide character window\r\n\tWNDCLASSEXW wndclass {};\r\n\twndclass.cbSize = sizeof(wndclass);\r\n\twndclass.style = CS_GLOBALCLASS | CS_HREDRAW | CS_VREDRAW;\r\n\twndclass.lpfnWndProc = ScintillaWin::SWndProc;\r\n\twndclass.cbWndExtra = sizeof(ScintillaWin *);\r\n\twndclass.hInstance = hInstance;\r\n\twndclass.lpszClassName = L\"Scintilla\";\r\n\tscintillaClassAtom = ::RegisterClassExW(&wndclass);\r\n\tconst bool result = 0 != scintillaClassAtom;\r\n\r\n\treturn result;\r\n}\r\n\r\nbool ScintillaWin::Unregister() noexcept {\r\n\tbool result = true;\r\n\tif (0 != scintillaClassAtom) {\r\n\t\tif (::UnregisterClass(MAKEINTATOM(scintillaClassAtom), hInstance) == 0) {\r\n\t\t\tresult = false;\r\n\t\t}\r\n\t\tscintillaClassAtom = 0;\r\n\t}\r\n\tif (0 != callClassAtom) {\r\n\t\tif (::UnregisterClass(MAKEINTATOM(callClassAtom), hInstance) == 0) {\r\n\t\t\tresult = false;\r\n\t\t}\r\n\t\tcallClassAtom = 0;\r\n\t}\r\n\treturn result;\r\n}\r\n\r\nbool ScintillaWin::HasCaretSizeChanged() const noexcept {\r\n\tif (\r\n\t\t( (0 != vs.caret.width) && (sysCaretWidth != vs.caret.width) )\r\n\t\t|| ((0 != vs.lineHeight) && (sysCaretHeight != vs.lineHeight))\r\n\t\t) {\r\n\t\treturn true;\r\n\t}\r\n\treturn false;\r\n}\r\n\r\nBOOL ScintillaWin::CreateSystemCaret() {\r\n\tsysCaretWidth = vs.caret.width;\r\n\tif (0 == sysCaretWidth) {\r\n\t\tsysCaretWidth = 1;\r\n\t}\r\n\tsysCaretHeight = vs.lineHeight;\r\n\tconst int bitmapSize = (((sysCaretWidth + 15) & ~15) >> 3) *\r\n\t\tsysCaretHeight;\r\n\tstd::vector<BYTE> bits(bitmapSize);\r\n\tsysCaretBitmap = ::CreateBitmap(sysCaretWidth, sysCaretHeight, 1,\r\n\t\t1, &bits[0]);\r\n\tconst BOOL retval = ::CreateCaret(\r\n\t\tMainHWND(), sysCaretBitmap,\r\n\t\tsysCaretWidth, sysCaretHeight);\r\n\tif (technology == Technology::Default) {\r\n\t\t// System caret interferes with Direct2D drawing so only show it for GDI.\r\n\t\t::ShowCaret(MainHWND());\r\n\t}\r\n\treturn retval;\r\n}\r\n\r\nBOOL ScintillaWin::DestroySystemCaret() noexcept {\r\n\t::HideCaret(MainHWND());\r\n\tconst BOOL retval = ::DestroyCaret();\r\n\tif (sysCaretBitmap) {\r\n\t\t::DeleteObject(sysCaretBitmap);\r\n\t\tsysCaretBitmap = {};\r\n\t}\r\n\treturn retval;\r\n}\r\n\r\nLRESULT PASCAL ScintillaWin::CTWndProc(\r\n\tHWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam) {\r\n\t// Find C++ object associated with window.\r\n\tScintillaWin *sciThis = static_cast<ScintillaWin *>(PointerFromWindow(hWnd));\r\n\ttry {\r\n\t\t// ctp will be zero if WM_CREATE not seen yet\r\n\t\tif (sciThis == nullptr) {\r\n\t\t\tif (iMessage == WM_CREATE) {\r\n\t\t\t\t// Associate CallTip object with window\r\n\t\t\t\tCREATESTRUCT *pCreate = static_cast<CREATESTRUCT *>(PtrFromSPtr(lParam));\r\n\t\t\t\tSetWindowPointer(hWnd, pCreate->lpCreateParams);\r\n\t\t\t\treturn 0;\r\n\t\t\t} else {\r\n\t\t\t\treturn ::DefWindowProc(hWnd, iMessage, wParam, lParam);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (iMessage == WM_NCDESTROY) {\r\n\t\t\t\tSetWindowPointer(hWnd, nullptr);\r\n\t\t\t\treturn ::DefWindowProc(hWnd, iMessage, wParam, lParam);\r\n\t\t\t} else if (iMessage == WM_PAINT) {\r\n\t\t\t\tPAINTSTRUCT ps;\r\n\t\t\t\t::BeginPaint(hWnd, &ps);\r\n\t\t\t\tstd::unique_ptr<Surface> surfaceWindow(Surface::Allocate(sciThis->technology));\r\n#if defined(USE_D2D)\r\n\t\t\t\tID2D1HwndRenderTarget *pCTRenderTarget = nullptr;\r\n#endif\r\n\t\t\t\tRECT rc;\r\n\t\t\t\tGetClientRect(hWnd, &rc);\r\n\t\t\t\tif (sciThis->technology == Technology::Default) {\r\n\t\t\t\t\tsurfaceWindow->Init(ps.hdc, hWnd);\r\n\t\t\t\t} else {\r\n#if defined(USE_D2D)\r\n\t\t\t\t\tconst int scaleFactor = sciThis->GetFirstIntegralMultipleDeviceScaleFactor();\r\n\r\n\t\t\t\t\t// Create a Direct2D render target.\r\n\t\t\t\t\tD2D1_HWND_RENDER_TARGET_PROPERTIES dhrtp {};\r\n\t\t\t\t\tdhrtp.hwnd = hWnd;\r\n\t\t\t\t\tdhrtp.pixelSize = ::GetSizeUFromRect(rc, scaleFactor);\r\n\t\t\t\t\tdhrtp.presentOptions = (sciThis->technology == Technology::DirectWriteRetain) ?\r\n\t\t\t\t\t\tD2D1_PRESENT_OPTIONS_RETAIN_CONTENTS : D2D1_PRESENT_OPTIONS_NONE;\r\n\r\n\t\t\t\t\tD2D1_RENDER_TARGET_PROPERTIES drtp {};\r\n\t\t\t\t\tdrtp.type = D2D1_RENDER_TARGET_TYPE_DEFAULT;\r\n\t\t\t\t\tdrtp.pixelFormat.format = DXGI_FORMAT_UNKNOWN;\r\n\t\t\t\t\tdrtp.pixelFormat.alphaMode = D2D1_ALPHA_MODE_UNKNOWN;\r\n\t\t\t\t\tdrtp.dpiX = 96.f * scaleFactor;\r\n\t\t\t\t\tdrtp.dpiY = 96.f * scaleFactor;\r\n\t\t\t\t\tdrtp.usage = D2D1_RENDER_TARGET_USAGE_NONE;\r\n\t\t\t\t\tdrtp.minLevel = D2D1_FEATURE_LEVEL_DEFAULT;\r\n\r\n\t\t\t\t\tif (!SUCCEEDED(pD2DFactory->CreateHwndRenderTarget(drtp, dhrtp, &pCTRenderTarget))) {\r\n\t\t\t\t\t\tsurfaceWindow->Release();\r\n\t\t\t\t\t\t::EndPaint(hWnd, &ps);\r\n\t\t\t\t\t\treturn 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// If above SUCCEEDED, then pCTRenderTarget not nullptr\r\n\t\t\t\t\tassert(pCTRenderTarget);\r\n\t\t\t\t\tif (pCTRenderTarget) {\r\n\t\t\t\t\t\tsurfaceWindow->Init(pCTRenderTarget, hWnd);\r\n\t\t\t\t\t\tpCTRenderTarget->BeginDraw();\r\n\t\t\t\t\t}\r\n#endif\r\n\t\t\t\t}\r\n\t\t\t\tsurfaceWindow->SetMode(sciThis->CurrentSurfaceMode());\r\n\t\t\t\tsciThis->SetRenderingParams(surfaceWindow.get());\r\n\t\t\t\tsciThis->ct.PaintCT(surfaceWindow.get());\r\n#if defined(USE_D2D)\r\n\t\t\t\tif (pCTRenderTarget)\r\n\t\t\t\t\tpCTRenderTarget->EndDraw();\r\n#endif\r\n\t\t\t\tsurfaceWindow->Release();\r\n#if defined(USE_D2D)\r\n\t\t\t\tReleaseUnknown(pCTRenderTarget);\r\n#endif\r\n\t\t\t\t::EndPaint(hWnd, &ps);\r\n\t\t\t\treturn 0;\r\n\t\t\t} else if ((iMessage == WM_NCLBUTTONDOWN) || (iMessage == WM_NCLBUTTONDBLCLK)) {\r\n\t\t\t\tPOINT pt = POINTFromLParam(lParam);\r\n\t\t\t\t::ScreenToClient(hWnd, &pt);\r\n\t\t\t\tsciThis->ct.MouseClick(PointFromPOINT(pt));\r\n\t\t\t\tsciThis->CallTipClick();\r\n\t\t\t\treturn 0;\r\n\t\t\t} else if (iMessage == WM_LBUTTONDOWN) {\r\n\t\t\t\t// This does not fire due to the hit test code\r\n\t\t\t\tsciThis->ct.MouseClick(PointFromLParam(lParam));\r\n\t\t\t\tsciThis->CallTipClick();\r\n\t\t\t\treturn 0;\r\n\t\t\t} else if (iMessage == WM_SETCURSOR) {\r\n\t\t\t\t::SetCursor(::LoadCursor(NULL, IDC_ARROW));\r\n\t\t\t\treturn 0;\r\n\t\t\t} else if (iMessage == WM_NCHITTEST) {\r\n\t\t\t\treturn HTCAPTION;\r\n\t\t\t} else {\r\n\t\t\t\treturn ::DefWindowProc(hWnd, iMessage, wParam, lParam);\r\n\t\t\t}\r\n\t\t}\r\n\t} catch (...) {\r\n\t\tsciThis->errorStatus = Status::Failure;\r\n\t}\r\n\treturn ::DefWindowProc(hWnd, iMessage, wParam, lParam);\r\n}\r\n\r\nsptr_t ScintillaWin::DirectFunction(\r\n    sptr_t ptr, UINT iMessage, uptr_t wParam, sptr_t lParam) {\r\n\tScintillaWin *sci = reinterpret_cast<ScintillaWin *>(ptr);\r\n\tPLATFORM_ASSERT(::GetCurrentThreadId() == ::GetWindowThreadProcessId(sci->MainHWND(), nullptr));\r\n\treturn sci->WndProc(static_cast<Message>(iMessage), wParam, lParam);\r\n}\r\n\r\nsptr_t ScintillaWin::DirectStatusFunction(\r\n    sptr_t ptr, UINT iMessage, uptr_t wParam, sptr_t lParam, int *pStatus) {\r\n\tScintillaWin *sci = reinterpret_cast<ScintillaWin *>(ptr);\r\n\tPLATFORM_ASSERT(::GetCurrentThreadId() == ::GetWindowThreadProcessId(sci->MainHWND(), nullptr));\r\n\tconst sptr_t returnValue = sci->WndProc(static_cast<Message>(iMessage), wParam, lParam);\r\n\t*pStatus = static_cast<int>(sci->errorStatus);\r\n\treturn returnValue;\r\n}\r\n\r\nnamespace Scintilla::Internal {\r\n\r\nsptr_t DirectFunction(\r\n    ScintillaWin *sci, UINT iMessage, uptr_t wParam, sptr_t lParam) {\r\n\treturn sci->WndProc(static_cast<Message>(iMessage), wParam, lParam);\r\n}\r\n\r\n}\r\n\r\nLRESULT PASCAL ScintillaWin::SWndProc(\r\n\tHWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam) {\r\n\t//Platform::DebugPrintf(\"S W:%x M:%x WP:%x L:%x\\n\", hWnd, iMessage, wParam, lParam);\r\n\r\n\t// Find C++ object associated with window.\r\n\tScintillaWin *sci = static_cast<ScintillaWin *>(PointerFromWindow(hWnd));\r\n\t// sci will be zero if WM_CREATE not seen yet\r\n\tif (sci == nullptr) {\r\n\t\ttry {\r\n\t\t\tif (iMessage == WM_CREATE) {\r\n\t\t\t\tstatic std::once_flag once;\r\n\t\t\t\tstd::call_once(once, Prepare);\r\n\t\t\t\t// Create C++ object associated with window\r\n\t\t\t\tsci = new ScintillaWin(hWnd);\r\n\t\t\t\tSetWindowPointer(hWnd, sci);\r\n\t\t\t\treturn sci->WndProc(static_cast<Message>(iMessage), wParam, lParam);\r\n\t\t\t}\r\n\t\t} catch (...) {\r\n\t\t}\r\n\t\treturn ::DefWindowProc(hWnd, iMessage, wParam, lParam);\r\n\t} else {\r\n\t\tif (iMessage == WM_NCDESTROY) {\r\n\t\t\ttry {\r\n\t\t\t\tsci->Finalise();\r\n\t\t\t\tdelete sci;\r\n\t\t\t} catch (...) {\r\n\t\t\t}\r\n\t\t\tSetWindowPointer(hWnd, nullptr);\r\n\t\t\treturn ::DefWindowProc(hWnd, iMessage, wParam, lParam);\r\n\t\t} else {\r\n\t\t\treturn sci->WndProc(static_cast<Message>(iMessage), wParam, lParam);\r\n\t\t}\r\n\t}\r\n}\r\n\r\n// This function is externally visible so it can be called from container when building statically.\r\n// Must be called once only.\r\nextern \"C\" int Scintilla_RegisterClasses(void *hInstance) {\r\n\tconst bool result = ScintillaWin::Register(static_cast<HINSTANCE>(hInstance));\r\n\treturn result;\r\n}\r\n\r\nnamespace Scintilla::Internal {\r\n\r\nint ResourcesRelease(bool fromDllMain) noexcept {\r\n\tconst bool result = ScintillaWin::Unregister();\r\n\tPlatform_Finalise(fromDllMain);\r\n\treturn result;\r\n}\r\n\r\nint RegisterClasses(void *hInstance) noexcept {\r\n\tconst bool result = ScintillaWin::Register(static_cast<HINSTANCE>(hInstance));\r\n\treturn result;\r\n}\r\n\r\n}\r\n\r\n// This function is externally visible so it can be called from container when building statically.\r\nextern \"C\" int Scintilla_ReleaseResources() {\r\n\treturn Scintilla::Internal::ResourcesRelease(false);\r\n}\r\n"
  },
  {
    "path": "scintilla/win32/ScintillaWin.h",
    "content": "// Scintilla source code edit control\r\n/** @file ScintillaWin.h\r\n ** Define functions from ScintillaWin.cxx that can be called from ScintillaDLL.cxx.\r\n **/\r\n// Copyright 1998-2018 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef SCINTILLAWIN_H\r\n#define SCINTILLAWIN_H\r\n\r\nnamespace Scintilla::Internal {\r\n\r\nclass ScintillaWin;\r\n\r\nint ResourcesRelease(bool fromDllMain) noexcept;\r\nint RegisterClasses(void *hInstance) noexcept;\r\nScintilla::sptr_t DirectFunction(ScintillaWin *sci, UINT iMessage, Scintilla::uptr_t wParam, Scintilla::sptr_t lParam);\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/win32/WinTypes.h",
    "content": "// Scintilla source code edit control\r\n/** @file WinTypes.h\r\n ** Implement safe release of COM objects and access to functions in DLLs.\r\n ** Header contains all implementation - there is no .cxx file.\r\n **/\r\n// Copyright 2020-2021 by Neil Hodgson <neilh@scintilla.org>\r\n// The License.txt file describes the conditions under which this software may be distributed.\r\n\r\n#ifndef WINTYPES_H\r\n#define WINTYPES_H\r\n\r\nnamespace Scintilla::Internal {\r\n\r\n// Release an IUnknown* and set to nullptr.\r\n// While IUnknown::Release must be noexcept, it isn't marked as such so produces\r\n// warnings which are avoided by the catch.\r\ntemplate <class T>\r\ninline void ReleaseUnknown(T *&ppUnknown) noexcept {\r\n\tif (ppUnknown) {\r\n\t\ttry {\r\n\t\t\tppUnknown->Release();\r\n\t\t} catch (...) {\r\n\t\t\t// Never occurs\r\n\t\t}\r\n\t\tppUnknown = nullptr;\r\n\t}\r\n}\r\n\r\nstruct UnknownReleaser {\r\n\t// Called by unique_ptr to destroy/free the resource\r\n\ttemplate <class T>\r\n\tvoid operator()(T *pUnknown) noexcept {\r\n\t\ttry {\r\n\t\t\tpUnknown->Release();\r\n\t\t} catch (...) {\r\n\t\t\t// IUnknown::Release must not throw, ignore if it does.\r\n\t\t}\r\n\t}\r\n};\r\n\r\n\r\n/// Find a function in a DLL and convert to a function pointer.\r\n/// This avoids undefined and conditionally defined behaviour.\r\ntemplate<typename T>\r\ninline T DLLFunction(HMODULE hModule, LPCSTR lpProcName) noexcept {\r\n\tif (!hModule) {\r\n\t\treturn nullptr;\r\n\t}\r\n\tFARPROC function = ::GetProcAddress(hModule, lpProcName);\r\n\tstatic_assert(sizeof(T) == sizeof(function));\r\n\tT fp {};\r\n\tmemcpy(&fp, &function, sizeof(T));\r\n\treturn fp;\r\n}\r\n\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "scintilla/win32/deps.mak",
    "content": "# Created by DepGen.py. To recreate, run DepGen.py.\r\n$(DIR_O)/HanjaDic.o: \\\r\n\tHanjaDic.cxx \\\r\n\tWinTypes.h \\\r\n\tHanjaDic.h\r\n$(DIR_O)/PlatWin.o: \\\r\n\tPlatWin.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/XPM.h \\\r\n\t../src/UniConversion.h \\\r\n\t../src/DBCS.h \\\r\n\tWinTypes.h \\\r\n\tPlatWin.h\r\n$(DIR_O)/ScintillaDLL.o: \\\r\n\tScintillaDLL.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\tScintillaWin.h\r\n$(DIR_O)/ScintillaWin.o: \\\r\n\tScintillaWin.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../include/ScintillaMessages.h \\\r\n\t../include/ScintillaStructures.h \\\r\n\t../include/ILoader.h \\\r\n\t../include/Sci_Position.h \\\r\n\t../include/ILexer.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/CharacterCategoryMap.h \\\r\n\t../src/Position.h \\\r\n\t../src/UniqueString.h \\\r\n\t../src/SplitVector.h \\\r\n\t../src/Partitioning.h \\\r\n\t../src/RunStyles.h \\\r\n\t../src/ContractionState.h \\\r\n\t../src/CellBuffer.h \\\r\n\t../src/CallTip.h \\\r\n\t../src/KeyMap.h \\\r\n\t../src/Indicator.h \\\r\n\t../src/LineMarker.h \\\r\n\t../src/Style.h \\\r\n\t../src/ViewStyle.h \\\r\n\t../src/CharClassify.h \\\r\n\t../src/Decoration.h \\\r\n\t../src/CaseFolder.h \\\r\n\t../src/Document.h \\\r\n\t../src/CaseConvert.h \\\r\n\t../src/UniConversion.h \\\r\n\t../src/Selection.h \\\r\n\t../src/PositionCache.h \\\r\n\t../src/EditModel.h \\\r\n\t../src/MarginView.h \\\r\n\t../src/EditView.h \\\r\n\t../src/Editor.h \\\r\n\t../src/ElapsedPeriod.h \\\r\n\t../src/AutoComplete.h \\\r\n\t../src/ScintillaBase.h \\\r\n\tWinTypes.h \\\r\n\tPlatWin.h \\\r\n\tHanjaDic.h \\\r\n\tScintillaWin.h\r\n$(DIR_O)/AutoComplete.o: \\\r\n\t../src/AutoComplete.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../include/ScintillaMessages.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/CharacterType.h \\\r\n\t../src/Position.h \\\r\n\t../src/AutoComplete.h\r\n$(DIR_O)/CallTip.o: \\\r\n\t../src/CallTip.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../include/ScintillaMessages.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/Position.h \\\r\n\t../src/CallTip.h\r\n$(DIR_O)/CaseConvert.o: \\\r\n\t../src/CaseConvert.cxx \\\r\n\t../src/CaseConvert.h \\\r\n\t../src/UniConversion.h\r\n$(DIR_O)/CaseFolder.o: \\\r\n\t../src/CaseFolder.cxx \\\r\n\t../src/CharacterType.h \\\r\n\t../src/CaseFolder.h \\\r\n\t../src/CaseConvert.h\r\n$(DIR_O)/CellBuffer.o: \\\r\n\t../src/CellBuffer.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Position.h \\\r\n\t../src/SplitVector.h \\\r\n\t../src/Partitioning.h \\\r\n\t../src/RunStyles.h \\\r\n\t../src/SparseVector.h \\\r\n\t../src/ChangeHistory.h \\\r\n\t../src/CellBuffer.h \\\r\n\t../src/UndoHistory.h \\\r\n\t../src/UniConversion.h\r\n$(DIR_O)/ChangeHistory.o: \\\r\n\t../src/ChangeHistory.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Position.h \\\r\n\t../src/SplitVector.h \\\r\n\t../src/Partitioning.h \\\r\n\t../src/RunStyles.h \\\r\n\t../src/SparseVector.h \\\r\n\t../src/ChangeHistory.h\r\n$(DIR_O)/CharacterCategoryMap.o: \\\r\n\t../src/CharacterCategoryMap.cxx \\\r\n\t../src/CharacterCategoryMap.h\r\n$(DIR_O)/CharacterType.o: \\\r\n\t../src/CharacterType.cxx \\\r\n\t../src/CharacterType.h\r\n$(DIR_O)/CharClassify.o: \\\r\n\t../src/CharClassify.cxx \\\r\n\t../src/CharacterType.h \\\r\n\t../src/CharClassify.h\r\n$(DIR_O)/ContractionState.o: \\\r\n\t../src/ContractionState.cxx \\\r\n\t../src/Debugging.h \\\r\n\t../src/Position.h \\\r\n\t../src/UniqueString.h \\\r\n\t../src/SplitVector.h \\\r\n\t../src/Partitioning.h \\\r\n\t../src/RunStyles.h \\\r\n\t../src/SparseVector.h \\\r\n\t../src/ContractionState.h\r\n$(DIR_O)/DBCS.o: \\\r\n\t../src/DBCS.cxx \\\r\n\t../src/DBCS.h\r\n$(DIR_O)/Decoration.o: \\\r\n\t../src/Decoration.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Position.h \\\r\n\t../src/SplitVector.h \\\r\n\t../src/Partitioning.h \\\r\n\t../src/RunStyles.h \\\r\n\t../src/Decoration.h\r\n$(DIR_O)/Document.o: \\\r\n\t../src/Document.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../include/ILoader.h \\\r\n\t../include/Sci_Position.h \\\r\n\t../include/ILexer.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/CharacterType.h \\\r\n\t../src/CharacterCategoryMap.h \\\r\n\t../src/Position.h \\\r\n\t../src/SplitVector.h \\\r\n\t../src/Partitioning.h \\\r\n\t../src/RunStyles.h \\\r\n\t../src/CellBuffer.h \\\r\n\t../src/PerLine.h \\\r\n\t../src/CharClassify.h \\\r\n\t../src/Decoration.h \\\r\n\t../src/CaseFolder.h \\\r\n\t../src/Document.h \\\r\n\t../src/RESearch.h \\\r\n\t../src/UniConversion.h \\\r\n\t../src/ElapsedPeriod.h\r\n$(DIR_O)/EditModel.o: \\\r\n\t../src/EditModel.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../include/ILoader.h \\\r\n\t../include/Sci_Position.h \\\r\n\t../include/ILexer.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/CharacterCategoryMap.h \\\r\n\t../src/Position.h \\\r\n\t../src/UniqueString.h \\\r\n\t../src/SplitVector.h \\\r\n\t../src/Partitioning.h \\\r\n\t../src/RunStyles.h \\\r\n\t../src/ContractionState.h \\\r\n\t../src/CellBuffer.h \\\r\n\t../src/Indicator.h \\\r\n\t../src/LineMarker.h \\\r\n\t../src/Style.h \\\r\n\t../src/ViewStyle.h \\\r\n\t../src/CharClassify.h \\\r\n\t../src/Decoration.h \\\r\n\t../src/CaseFolder.h \\\r\n\t../src/Document.h \\\r\n\t../src/UniConversion.h \\\r\n\t../src/Selection.h \\\r\n\t../src/PositionCache.h \\\r\n\t../src/EditModel.h\r\n$(DIR_O)/Editor.o: \\\r\n\t../src/Editor.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../include/ScintillaMessages.h \\\r\n\t../include/ScintillaStructures.h \\\r\n\t../include/ILoader.h \\\r\n\t../include/Sci_Position.h \\\r\n\t../include/ILexer.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/CharacterType.h \\\r\n\t../src/CharacterCategoryMap.h \\\r\n\t../src/Position.h \\\r\n\t../src/UniqueString.h \\\r\n\t../src/SplitVector.h \\\r\n\t../src/Partitioning.h \\\r\n\t../src/RunStyles.h \\\r\n\t../src/ContractionState.h \\\r\n\t../src/CellBuffer.h \\\r\n\t../src/PerLine.h \\\r\n\t../src/KeyMap.h \\\r\n\t../src/Indicator.h \\\r\n\t../src/LineMarker.h \\\r\n\t../src/Style.h \\\r\n\t../src/ViewStyle.h \\\r\n\t../src/CharClassify.h \\\r\n\t../src/Decoration.h \\\r\n\t../src/CaseFolder.h \\\r\n\t../src/Document.h \\\r\n\t../src/UniConversion.h \\\r\n\t../src/DBCS.h \\\r\n\t../src/Selection.h \\\r\n\t../src/PositionCache.h \\\r\n\t../src/EditModel.h \\\r\n\t../src/MarginView.h \\\r\n\t../src/EditView.h \\\r\n\t../src/Editor.h \\\r\n\t../src/ElapsedPeriod.h\r\n$(DIR_O)/EditView.o: \\\r\n\t../src/EditView.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../include/ScintillaMessages.h \\\r\n\t../include/ScintillaStructures.h \\\r\n\t../include/ILoader.h \\\r\n\t../include/Sci_Position.h \\\r\n\t../include/ILexer.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/CharacterType.h \\\r\n\t../src/CharacterCategoryMap.h \\\r\n\t../src/Position.h \\\r\n\t../src/UniqueString.h \\\r\n\t../src/SplitVector.h \\\r\n\t../src/Partitioning.h \\\r\n\t../src/RunStyles.h \\\r\n\t../src/ContractionState.h \\\r\n\t../src/CellBuffer.h \\\r\n\t../src/PerLine.h \\\r\n\t../src/KeyMap.h \\\r\n\t../src/Indicator.h \\\r\n\t../src/LineMarker.h \\\r\n\t../src/Style.h \\\r\n\t../src/ViewStyle.h \\\r\n\t../src/CharClassify.h \\\r\n\t../src/Decoration.h \\\r\n\t../src/CaseFolder.h \\\r\n\t../src/Document.h \\\r\n\t../src/UniConversion.h \\\r\n\t../src/Selection.h \\\r\n\t../src/PositionCache.h \\\r\n\t../src/EditModel.h \\\r\n\t../src/MarginView.h \\\r\n\t../src/EditView.h \\\r\n\t../src/ElapsedPeriod.h\r\n$(DIR_O)/Geometry.o: \\\r\n\t../src/Geometry.cxx \\\r\n\t../src/Geometry.h\r\n$(DIR_O)/Indicator.o: \\\r\n\t../src/Indicator.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/Indicator.h \\\r\n\t../src/XPM.h\r\n$(DIR_O)/KeyMap.o: \\\r\n\t../src/KeyMap.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../include/ScintillaMessages.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/KeyMap.h\r\n$(DIR_O)/LineMarker.o: \\\r\n\t../src/LineMarker.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/XPM.h \\\r\n\t../src/LineMarker.h \\\r\n\t../src/UniConversion.h\r\n$(DIR_O)/MarginView.o: \\\r\n\t../src/MarginView.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../include/ScintillaMessages.h \\\r\n\t../include/ScintillaStructures.h \\\r\n\t../include/ILoader.h \\\r\n\t../include/Sci_Position.h \\\r\n\t../include/ILexer.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/CharacterCategoryMap.h \\\r\n\t../src/Position.h \\\r\n\t../src/UniqueString.h \\\r\n\t../src/SplitVector.h \\\r\n\t../src/Partitioning.h \\\r\n\t../src/RunStyles.h \\\r\n\t../src/ContractionState.h \\\r\n\t../src/CellBuffer.h \\\r\n\t../src/KeyMap.h \\\r\n\t../src/Indicator.h \\\r\n\t../src/LineMarker.h \\\r\n\t../src/Style.h \\\r\n\t../src/ViewStyle.h \\\r\n\t../src/CharClassify.h \\\r\n\t../src/Decoration.h \\\r\n\t../src/CaseFolder.h \\\r\n\t../src/Document.h \\\r\n\t../src/UniConversion.h \\\r\n\t../src/Selection.h \\\r\n\t../src/PositionCache.h \\\r\n\t../src/EditModel.h \\\r\n\t../src/MarginView.h \\\r\n\t../src/EditView.h\r\n$(DIR_O)/PerLine.o: \\\r\n\t../src/PerLine.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/Position.h \\\r\n\t../src/SplitVector.h \\\r\n\t../src/Partitioning.h \\\r\n\t../src/CellBuffer.h \\\r\n\t../src/PerLine.h\r\n$(DIR_O)/PositionCache.o: \\\r\n\t../src/PositionCache.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../include/ScintillaMessages.h \\\r\n\t../include/ILoader.h \\\r\n\t../include/Sci_Position.h \\\r\n\t../include/ILexer.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/CharacterType.h \\\r\n\t../src/CharacterCategoryMap.h \\\r\n\t../src/Position.h \\\r\n\t../src/UniqueString.h \\\r\n\t../src/SplitVector.h \\\r\n\t../src/Partitioning.h \\\r\n\t../src/RunStyles.h \\\r\n\t../src/ContractionState.h \\\r\n\t../src/CellBuffer.h \\\r\n\t../src/KeyMap.h \\\r\n\t../src/Indicator.h \\\r\n\t../src/LineMarker.h \\\r\n\t../src/Style.h \\\r\n\t../src/ViewStyle.h \\\r\n\t../src/CharClassify.h \\\r\n\t../src/Decoration.h \\\r\n\t../src/CaseFolder.h \\\r\n\t../src/Document.h \\\r\n\t../src/UniConversion.h \\\r\n\t../src/DBCS.h \\\r\n\t../src/Selection.h \\\r\n\t../src/PositionCache.h\r\n$(DIR_O)/RESearch.o: \\\r\n\t../src/RESearch.cxx \\\r\n\t../src/Position.h \\\r\n\t../src/CharClassify.h \\\r\n\t../src/RESearch.h\r\n$(DIR_O)/RunStyles.o: \\\r\n\t../src/RunStyles.cxx \\\r\n\t../src/Debugging.h \\\r\n\t../src/Position.h \\\r\n\t../src/SplitVector.h \\\r\n\t../src/Partitioning.h \\\r\n\t../src/RunStyles.h\r\n$(DIR_O)/ScintillaBase.o: \\\r\n\t../src/ScintillaBase.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../include/ScintillaMessages.h \\\r\n\t../include/ScintillaStructures.h \\\r\n\t../include/ILoader.h \\\r\n\t../include/Sci_Position.h \\\r\n\t../include/ILexer.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/CharacterCategoryMap.h \\\r\n\t../src/Position.h \\\r\n\t../src/UniqueString.h \\\r\n\t../src/SplitVector.h \\\r\n\t../src/Partitioning.h \\\r\n\t../src/RunStyles.h \\\r\n\t../src/ContractionState.h \\\r\n\t../src/CellBuffer.h \\\r\n\t../src/CallTip.h \\\r\n\t../src/KeyMap.h \\\r\n\t../src/Indicator.h \\\r\n\t../src/LineMarker.h \\\r\n\t../src/Style.h \\\r\n\t../src/ViewStyle.h \\\r\n\t../src/CharClassify.h \\\r\n\t../src/Decoration.h \\\r\n\t../src/CaseFolder.h \\\r\n\t../src/Document.h \\\r\n\t../src/Selection.h \\\r\n\t../src/PositionCache.h \\\r\n\t../src/EditModel.h \\\r\n\t../src/MarginView.h \\\r\n\t../src/EditView.h \\\r\n\t../src/Editor.h \\\r\n\t../src/AutoComplete.h \\\r\n\t../src/ScintillaBase.h\r\n$(DIR_O)/Selection.o: \\\r\n\t../src/Selection.cxx \\\r\n\t../src/Debugging.h \\\r\n\t../src/Position.h \\\r\n\t../src/Selection.h\r\n$(DIR_O)/Style.o: \\\r\n\t../src/Style.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/Style.h\r\n$(DIR_O)/UndoHistory.o: \\\r\n\t../src/UndoHistory.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Position.h \\\r\n\t../src/SplitVector.h \\\r\n\t../src/Partitioning.h \\\r\n\t../src/RunStyles.h \\\r\n\t../src/SparseVector.h \\\r\n\t../src/ChangeHistory.h \\\r\n\t../src/CellBuffer.h \\\r\n\t../src/UndoHistory.h\r\n$(DIR_O)/UniConversion.o: \\\r\n\t../src/UniConversion.cxx \\\r\n\t../src/UniConversion.h\r\n$(DIR_O)/UniqueString.o: \\\r\n\t../src/UniqueString.cxx \\\r\n\t../src/UniqueString.h\r\n$(DIR_O)/ViewStyle.o: \\\r\n\t../src/ViewStyle.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/Position.h \\\r\n\t../src/UniqueString.h \\\r\n\t../src/Indicator.h \\\r\n\t../src/XPM.h \\\r\n\t../src/LineMarker.h \\\r\n\t../src/Style.h \\\r\n\t../src/ViewStyle.h\r\n$(DIR_O)/XPM.o: \\\r\n\t../src/XPM.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/XPM.h\r\n"
  },
  {
    "path": "scintilla/win32/makefile",
    "content": "# Make file for Scintilla on Windows\r\n# @file makefile\r\n# Copyright 1998-2010 by Neil Hodgson <neilh@scintilla.org>\r\n# The License.txt file describes the conditions under which this software may be distributed.\r\n# This makefile assumes Mingw-w64 GCC 9.0+ is used and changes will be needed to use other compilers.\r\n# Clang 9.0+ can be used with CLANG=1 on command line.\r\n\r\n.PHONY: all clean analyze depend\r\n\r\n.SUFFIXES: .cxx .c .o .h .a\r\n\r\nDIR_O=.\r\nDIR_BIN=../bin\r\n\r\nCOMPONENT = $(DIR_BIN)/Scintilla.dll\r\nLIBSCI = $(DIR_BIN)/libscintilla.a\r\n\r\nWARNINGS = -Wpedantic -Wall -Wextra\r\n\r\nifdef CLANG\r\nCXX = clang++\r\nelse\r\n# MinGW GCC\r\nLIBSMINGW = -lstdc++\r\nSTRIPOPTION = -s\r\nendif\r\nARFLAGS = rc\r\nRANLIB ?= ranlib\r\nWINDRES ?= windres\r\n\r\n# Environment variable windir always defined on Win32\r\n\r\n# Take care of changing Unix style '/' directory separator to '\\' on Windows\r\nnormalize = $(if $(windir),$(subst /,\\,$1),$1)\r\n\r\nPYTHON = $(if $(windir),pyw,python3)\r\n\r\nifdef windir\r\nDEL = $(if $(wildcard $(dir $(SHELL))rm.exe), $(dir $(SHELL))rm.exe -f, del /q)\r\nelse\r\nDEL = rm -f\r\nendif\r\n\r\nvpath %.h ../src ../include\r\nvpath %.cxx ../src\r\n\r\nLDFLAGS=-shared -static -mwindows\r\nLIBS=-lgdi32 -luser32 -limm32 -lole32 -luuid -loleaut32 -ladvapi32 $(LIBSMINGW)\r\n\r\nINCLUDES=-I ../include -I ../src\r\n\r\nBASE_FLAGS += $(WARNINGS)\r\n\r\nifdef NO_CXX11_REGEX\r\nDEFINES += -DNO_CXX11_REGEX\r\nendif\r\n\r\nDEFINES += -D$(if $(DEBUG),DEBUG,NDEBUG)\r\nBASE_FLAGS += $(if $(DEBUG),-g,-O3)\r\n\r\nifndef DEBUG\r\nSTRIPFLAG=$(STRIPOPTION)\r\nendif\r\n\r\nCXX_BASE_FLAGS =--std=c++17 $(BASE_FLAGS)\r\nCXX_ALL_FLAGS =$(DEFINES) $(INCLUDES) $(CXX_BASE_FLAGS)\r\n\r\nall:\t$(COMPONENT) $(LIBSCI)\r\n\r\nclean:\r\n\t$(DEL) $(call normalize, $(addprefix $(DIR_O)/, *.exe *.o *.a *.obj *.dll *.res *.map *.plist) $(COMPONENT) $(LIBSCI))\r\n\r\n$(DIR_O)/%.o: %.cxx\r\n\t$(CXX) $(CXX_ALL_FLAGS) $(CXXFLAGS) -c $< -o $@\r\n\r\nanalyze:\r\n\t$(CXX) --analyze $(CXX_ALL_FLAGS) $(CXXFLAGS) *.cxx ../src/*.cxx\r\n\r\ndepend deps.mak:\r\n\t$(PYTHON) DepGen.py\r\n\r\n# Required for base Scintilla\r\nSRC_OBJS = \\\r\n\t$(DIR_O)/AutoComplete.o \\\r\n\t$(DIR_O)/CallTip.o \\\r\n\t$(DIR_O)/CaseConvert.o \\\r\n\t$(DIR_O)/CaseFolder.o \\\r\n\t$(DIR_O)/CellBuffer.o \\\r\n\t$(DIR_O)/ChangeHistory.o \\\r\n\t$(DIR_O)/CharacterCategoryMap.o \\\r\n\t$(DIR_O)/CharacterType.o \\\r\n\t$(DIR_O)/CharClassify.o \\\r\n\t$(DIR_O)/ContractionState.o \\\r\n\t$(DIR_O)/DBCS.o \\\r\n\t$(DIR_O)/Decoration.o \\\r\n\t$(DIR_O)/Document.o \\\r\n\t$(DIR_O)/EditModel.o \\\r\n\t$(DIR_O)/Editor.o \\\r\n\t$(DIR_O)/EditView.o \\\r\n\t$(DIR_O)/Geometry.o \\\r\n\t$(DIR_O)/Indicator.o \\\r\n\t$(DIR_O)/KeyMap.o \\\r\n\t$(DIR_O)/LineMarker.o \\\r\n\t$(DIR_O)/MarginView.o \\\r\n\t$(DIR_O)/PerLine.o \\\r\n\t$(DIR_O)/PositionCache.o \\\r\n\t$(DIR_O)/RESearch.o \\\r\n\t$(DIR_O)/RunStyles.o \\\r\n\t$(DIR_O)/Selection.o \\\r\n\t$(DIR_O)/Style.o \\\r\n\t$(DIR_O)/UndoHistory.o \\\r\n\t$(DIR_O)/UniConversion.o \\\r\n\t$(DIR_O)/UniqueString.o \\\r\n\t$(DIR_O)/ViewStyle.o \\\r\n\t$(DIR_O)/XPM.o\r\n\r\nCOMPONENT_OBJS = \\\r\n\t$(SRC_OBJS) \\\r\n\t$(DIR_O)/HanjaDic.o \\\r\n\t$(DIR_O)/PlatWin.o \\\r\n\t$(DIR_O)/ScintillaBase.o \\\r\n\t$(DIR_O)/ScintillaWin.o\r\n\r\nSHARED_OBJS = \\\r\n\t$(DIR_O)/ScintillaDLL.o \\\r\n\t$(DIR_O)/ScintRes.o\r\n\r\n$(COMPONENT): $(COMPONENT_OBJS) $(SHARED_OBJS)\r\n\t$(CXX) $(LDFLAGS) -o $@ $(STRIPFLAG) $^ $(CXXFLAGS) $(LIBS)\r\n\r\n$(LIBSCI): $(COMPONENT_OBJS)\r\n\t$(AR) $(ARFLAGS) $@ $^\r\n\t$(RANLIB) $@\r\n\r\n# Automatically generate dependencies for most files with \"make depend\"\r\ninclude deps.mak\r\n\r\n$(DIR_O)/ScintRes.o: ScintRes.rc\r\n\t$(WINDRES) $< $@\r\n\r\n"
  },
  {
    "path": "scintilla/win32/nmdeps.mak",
    "content": "# Created by DepGen.py. To recreate, run DepGen.py.\r\n$(DIR_O)/HanjaDic.obj: \\\r\n\tHanjaDic.cxx \\\r\n\tWinTypes.h \\\r\n\tHanjaDic.h\r\n$(DIR_O)/PlatWin.obj: \\\r\n\tPlatWin.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/XPM.h \\\r\n\t../src/UniConversion.h \\\r\n\t../src/DBCS.h \\\r\n\tWinTypes.h \\\r\n\tPlatWin.h\r\n$(DIR_O)/ScintillaDLL.obj: \\\r\n\tScintillaDLL.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\tScintillaWin.h\r\n$(DIR_O)/ScintillaWin.obj: \\\r\n\tScintillaWin.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../include/ScintillaMessages.h \\\r\n\t../include/ScintillaStructures.h \\\r\n\t../include/ILoader.h \\\r\n\t../include/Sci_Position.h \\\r\n\t../include/ILexer.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/CharacterCategoryMap.h \\\r\n\t../src/Position.h \\\r\n\t../src/UniqueString.h \\\r\n\t../src/SplitVector.h \\\r\n\t../src/Partitioning.h \\\r\n\t../src/RunStyles.h \\\r\n\t../src/ContractionState.h \\\r\n\t../src/CellBuffer.h \\\r\n\t../src/CallTip.h \\\r\n\t../src/KeyMap.h \\\r\n\t../src/Indicator.h \\\r\n\t../src/LineMarker.h \\\r\n\t../src/Style.h \\\r\n\t../src/ViewStyle.h \\\r\n\t../src/CharClassify.h \\\r\n\t../src/Decoration.h \\\r\n\t../src/CaseFolder.h \\\r\n\t../src/Document.h \\\r\n\t../src/CaseConvert.h \\\r\n\t../src/UniConversion.h \\\r\n\t../src/Selection.h \\\r\n\t../src/PositionCache.h \\\r\n\t../src/EditModel.h \\\r\n\t../src/MarginView.h \\\r\n\t../src/EditView.h \\\r\n\t../src/Editor.h \\\r\n\t../src/ElapsedPeriod.h \\\r\n\t../src/AutoComplete.h \\\r\n\t../src/ScintillaBase.h \\\r\n\tWinTypes.h \\\r\n\tPlatWin.h \\\r\n\tHanjaDic.h \\\r\n\tScintillaWin.h\r\n$(DIR_O)/AutoComplete.obj: \\\r\n\t../src/AutoComplete.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../include/ScintillaMessages.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/CharacterType.h \\\r\n\t../src/Position.h \\\r\n\t../src/AutoComplete.h\r\n$(DIR_O)/CallTip.obj: \\\r\n\t../src/CallTip.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../include/ScintillaMessages.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/Position.h \\\r\n\t../src/CallTip.h\r\n$(DIR_O)/CaseConvert.obj: \\\r\n\t../src/CaseConvert.cxx \\\r\n\t../src/CaseConvert.h \\\r\n\t../src/UniConversion.h\r\n$(DIR_O)/CaseFolder.obj: \\\r\n\t../src/CaseFolder.cxx \\\r\n\t../src/CharacterType.h \\\r\n\t../src/CaseFolder.h \\\r\n\t../src/CaseConvert.h\r\n$(DIR_O)/CellBuffer.obj: \\\r\n\t../src/CellBuffer.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Position.h \\\r\n\t../src/SplitVector.h \\\r\n\t../src/Partitioning.h \\\r\n\t../src/RunStyles.h \\\r\n\t../src/SparseVector.h \\\r\n\t../src/ChangeHistory.h \\\r\n\t../src/CellBuffer.h \\\r\n\t../src/UndoHistory.h \\\r\n\t../src/UniConversion.h\r\n$(DIR_O)/ChangeHistory.obj: \\\r\n\t../src/ChangeHistory.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Position.h \\\r\n\t../src/SplitVector.h \\\r\n\t../src/Partitioning.h \\\r\n\t../src/RunStyles.h \\\r\n\t../src/SparseVector.h \\\r\n\t../src/ChangeHistory.h\r\n$(DIR_O)/CharacterCategoryMap.obj: \\\r\n\t../src/CharacterCategoryMap.cxx \\\r\n\t../src/CharacterCategoryMap.h\r\n$(DIR_O)/CharacterType.obj: \\\r\n\t../src/CharacterType.cxx \\\r\n\t../src/CharacterType.h\r\n$(DIR_O)/CharClassify.obj: \\\r\n\t../src/CharClassify.cxx \\\r\n\t../src/CharacterType.h \\\r\n\t../src/CharClassify.h\r\n$(DIR_O)/ContractionState.obj: \\\r\n\t../src/ContractionState.cxx \\\r\n\t../src/Debugging.h \\\r\n\t../src/Position.h \\\r\n\t../src/UniqueString.h \\\r\n\t../src/SplitVector.h \\\r\n\t../src/Partitioning.h \\\r\n\t../src/RunStyles.h \\\r\n\t../src/SparseVector.h \\\r\n\t../src/ContractionState.h\r\n$(DIR_O)/DBCS.obj: \\\r\n\t../src/DBCS.cxx \\\r\n\t../src/DBCS.h\r\n$(DIR_O)/Decoration.obj: \\\r\n\t../src/Decoration.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Position.h \\\r\n\t../src/SplitVector.h \\\r\n\t../src/Partitioning.h \\\r\n\t../src/RunStyles.h \\\r\n\t../src/Decoration.h\r\n$(DIR_O)/Document.obj: \\\r\n\t../src/Document.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../include/ILoader.h \\\r\n\t../include/Sci_Position.h \\\r\n\t../include/ILexer.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/CharacterType.h \\\r\n\t../src/CharacterCategoryMap.h \\\r\n\t../src/Position.h \\\r\n\t../src/SplitVector.h \\\r\n\t../src/Partitioning.h \\\r\n\t../src/RunStyles.h \\\r\n\t../src/CellBuffer.h \\\r\n\t../src/PerLine.h \\\r\n\t../src/CharClassify.h \\\r\n\t../src/Decoration.h \\\r\n\t../src/CaseFolder.h \\\r\n\t../src/Document.h \\\r\n\t../src/RESearch.h \\\r\n\t../src/UniConversion.h \\\r\n\t../src/ElapsedPeriod.h\r\n$(DIR_O)/EditModel.obj: \\\r\n\t../src/EditModel.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../include/ILoader.h \\\r\n\t../include/Sci_Position.h \\\r\n\t../include/ILexer.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/CharacterCategoryMap.h \\\r\n\t../src/Position.h \\\r\n\t../src/UniqueString.h \\\r\n\t../src/SplitVector.h \\\r\n\t../src/Partitioning.h \\\r\n\t../src/RunStyles.h \\\r\n\t../src/ContractionState.h \\\r\n\t../src/CellBuffer.h \\\r\n\t../src/Indicator.h \\\r\n\t../src/LineMarker.h \\\r\n\t../src/Style.h \\\r\n\t../src/ViewStyle.h \\\r\n\t../src/CharClassify.h \\\r\n\t../src/Decoration.h \\\r\n\t../src/CaseFolder.h \\\r\n\t../src/Document.h \\\r\n\t../src/UniConversion.h \\\r\n\t../src/Selection.h \\\r\n\t../src/PositionCache.h \\\r\n\t../src/EditModel.h\r\n$(DIR_O)/Editor.obj: \\\r\n\t../src/Editor.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../include/ScintillaMessages.h \\\r\n\t../include/ScintillaStructures.h \\\r\n\t../include/ILoader.h \\\r\n\t../include/Sci_Position.h \\\r\n\t../include/ILexer.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/CharacterType.h \\\r\n\t../src/CharacterCategoryMap.h \\\r\n\t../src/Position.h \\\r\n\t../src/UniqueString.h \\\r\n\t../src/SplitVector.h \\\r\n\t../src/Partitioning.h \\\r\n\t../src/RunStyles.h \\\r\n\t../src/ContractionState.h \\\r\n\t../src/CellBuffer.h \\\r\n\t../src/PerLine.h \\\r\n\t../src/KeyMap.h \\\r\n\t../src/Indicator.h \\\r\n\t../src/LineMarker.h \\\r\n\t../src/Style.h \\\r\n\t../src/ViewStyle.h \\\r\n\t../src/CharClassify.h \\\r\n\t../src/Decoration.h \\\r\n\t../src/CaseFolder.h \\\r\n\t../src/Document.h \\\r\n\t../src/UniConversion.h \\\r\n\t../src/DBCS.h \\\r\n\t../src/Selection.h \\\r\n\t../src/PositionCache.h \\\r\n\t../src/EditModel.h \\\r\n\t../src/MarginView.h \\\r\n\t../src/EditView.h \\\r\n\t../src/Editor.h \\\r\n\t../src/ElapsedPeriod.h\r\n$(DIR_O)/EditView.obj: \\\r\n\t../src/EditView.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../include/ScintillaMessages.h \\\r\n\t../include/ScintillaStructures.h \\\r\n\t../include/ILoader.h \\\r\n\t../include/Sci_Position.h \\\r\n\t../include/ILexer.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/CharacterType.h \\\r\n\t../src/CharacterCategoryMap.h \\\r\n\t../src/Position.h \\\r\n\t../src/UniqueString.h \\\r\n\t../src/SplitVector.h \\\r\n\t../src/Partitioning.h \\\r\n\t../src/RunStyles.h \\\r\n\t../src/ContractionState.h \\\r\n\t../src/CellBuffer.h \\\r\n\t../src/PerLine.h \\\r\n\t../src/KeyMap.h \\\r\n\t../src/Indicator.h \\\r\n\t../src/LineMarker.h \\\r\n\t../src/Style.h \\\r\n\t../src/ViewStyle.h \\\r\n\t../src/CharClassify.h \\\r\n\t../src/Decoration.h \\\r\n\t../src/CaseFolder.h \\\r\n\t../src/Document.h \\\r\n\t../src/UniConversion.h \\\r\n\t../src/Selection.h \\\r\n\t../src/PositionCache.h \\\r\n\t../src/EditModel.h \\\r\n\t../src/MarginView.h \\\r\n\t../src/EditView.h \\\r\n\t../src/ElapsedPeriod.h\r\n$(DIR_O)/Geometry.obj: \\\r\n\t../src/Geometry.cxx \\\r\n\t../src/Geometry.h\r\n$(DIR_O)/Indicator.obj: \\\r\n\t../src/Indicator.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/Indicator.h \\\r\n\t../src/XPM.h\r\n$(DIR_O)/KeyMap.obj: \\\r\n\t../src/KeyMap.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../include/ScintillaMessages.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/KeyMap.h\r\n$(DIR_O)/LineMarker.obj: \\\r\n\t../src/LineMarker.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/XPM.h \\\r\n\t../src/LineMarker.h \\\r\n\t../src/UniConversion.h\r\n$(DIR_O)/MarginView.obj: \\\r\n\t../src/MarginView.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../include/ScintillaMessages.h \\\r\n\t../include/ScintillaStructures.h \\\r\n\t../include/ILoader.h \\\r\n\t../include/Sci_Position.h \\\r\n\t../include/ILexer.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/CharacterCategoryMap.h \\\r\n\t../src/Position.h \\\r\n\t../src/UniqueString.h \\\r\n\t../src/SplitVector.h \\\r\n\t../src/Partitioning.h \\\r\n\t../src/RunStyles.h \\\r\n\t../src/ContractionState.h \\\r\n\t../src/CellBuffer.h \\\r\n\t../src/KeyMap.h \\\r\n\t../src/Indicator.h \\\r\n\t../src/LineMarker.h \\\r\n\t../src/Style.h \\\r\n\t../src/ViewStyle.h \\\r\n\t../src/CharClassify.h \\\r\n\t../src/Decoration.h \\\r\n\t../src/CaseFolder.h \\\r\n\t../src/Document.h \\\r\n\t../src/UniConversion.h \\\r\n\t../src/Selection.h \\\r\n\t../src/PositionCache.h \\\r\n\t../src/EditModel.h \\\r\n\t../src/MarginView.h \\\r\n\t../src/EditView.h\r\n$(DIR_O)/PerLine.obj: \\\r\n\t../src/PerLine.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/Position.h \\\r\n\t../src/SplitVector.h \\\r\n\t../src/Partitioning.h \\\r\n\t../src/CellBuffer.h \\\r\n\t../src/PerLine.h\r\n$(DIR_O)/PositionCache.obj: \\\r\n\t../src/PositionCache.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../include/ScintillaMessages.h \\\r\n\t../include/ILoader.h \\\r\n\t../include/Sci_Position.h \\\r\n\t../include/ILexer.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/CharacterType.h \\\r\n\t../src/CharacterCategoryMap.h \\\r\n\t../src/Position.h \\\r\n\t../src/UniqueString.h \\\r\n\t../src/SplitVector.h \\\r\n\t../src/Partitioning.h \\\r\n\t../src/RunStyles.h \\\r\n\t../src/ContractionState.h \\\r\n\t../src/CellBuffer.h \\\r\n\t../src/KeyMap.h \\\r\n\t../src/Indicator.h \\\r\n\t../src/LineMarker.h \\\r\n\t../src/Style.h \\\r\n\t../src/ViewStyle.h \\\r\n\t../src/CharClassify.h \\\r\n\t../src/Decoration.h \\\r\n\t../src/CaseFolder.h \\\r\n\t../src/Document.h \\\r\n\t../src/UniConversion.h \\\r\n\t../src/DBCS.h \\\r\n\t../src/Selection.h \\\r\n\t../src/PositionCache.h\r\n$(DIR_O)/RESearch.obj: \\\r\n\t../src/RESearch.cxx \\\r\n\t../src/Position.h \\\r\n\t../src/CharClassify.h \\\r\n\t../src/RESearch.h\r\n$(DIR_O)/RunStyles.obj: \\\r\n\t../src/RunStyles.cxx \\\r\n\t../src/Debugging.h \\\r\n\t../src/Position.h \\\r\n\t../src/SplitVector.h \\\r\n\t../src/Partitioning.h \\\r\n\t../src/RunStyles.h\r\n$(DIR_O)/ScintillaBase.obj: \\\r\n\t../src/ScintillaBase.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../include/ScintillaMessages.h \\\r\n\t../include/ScintillaStructures.h \\\r\n\t../include/ILoader.h \\\r\n\t../include/Sci_Position.h \\\r\n\t../include/ILexer.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/CharacterCategoryMap.h \\\r\n\t../src/Position.h \\\r\n\t../src/UniqueString.h \\\r\n\t../src/SplitVector.h \\\r\n\t../src/Partitioning.h \\\r\n\t../src/RunStyles.h \\\r\n\t../src/ContractionState.h \\\r\n\t../src/CellBuffer.h \\\r\n\t../src/CallTip.h \\\r\n\t../src/KeyMap.h \\\r\n\t../src/Indicator.h \\\r\n\t../src/LineMarker.h \\\r\n\t../src/Style.h \\\r\n\t../src/ViewStyle.h \\\r\n\t../src/CharClassify.h \\\r\n\t../src/Decoration.h \\\r\n\t../src/CaseFolder.h \\\r\n\t../src/Document.h \\\r\n\t../src/Selection.h \\\r\n\t../src/PositionCache.h \\\r\n\t../src/EditModel.h \\\r\n\t../src/MarginView.h \\\r\n\t../src/EditView.h \\\r\n\t../src/Editor.h \\\r\n\t../src/AutoComplete.h \\\r\n\t../src/ScintillaBase.h\r\n$(DIR_O)/Selection.obj: \\\r\n\t../src/Selection.cxx \\\r\n\t../src/Debugging.h \\\r\n\t../src/Position.h \\\r\n\t../src/Selection.h\r\n$(DIR_O)/Style.obj: \\\r\n\t../src/Style.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/Style.h\r\n$(DIR_O)/UndoHistory.obj: \\\r\n\t../src/UndoHistory.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Position.h \\\r\n\t../src/SplitVector.h \\\r\n\t../src/Partitioning.h \\\r\n\t../src/RunStyles.h \\\r\n\t../src/SparseVector.h \\\r\n\t../src/ChangeHistory.h \\\r\n\t../src/CellBuffer.h \\\r\n\t../src/UndoHistory.h\r\n$(DIR_O)/UniConversion.obj: \\\r\n\t../src/UniConversion.cxx \\\r\n\t../src/UniConversion.h\r\n$(DIR_O)/UniqueString.obj: \\\r\n\t../src/UniqueString.cxx \\\r\n\t../src/UniqueString.h\r\n$(DIR_O)/ViewStyle.obj: \\\r\n\t../src/ViewStyle.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/Position.h \\\r\n\t../src/UniqueString.h \\\r\n\t../src/Indicator.h \\\r\n\t../src/XPM.h \\\r\n\t../src/LineMarker.h \\\r\n\t../src/Style.h \\\r\n\t../src/ViewStyle.h\r\n$(DIR_O)/XPM.obj: \\\r\n\t../src/XPM.cxx \\\r\n\t../include/ScintillaTypes.h \\\r\n\t../src/Debugging.h \\\r\n\t../src/Geometry.h \\\r\n\t../src/Platform.h \\\r\n\t../src/XPM.h\r\n"
  },
  {
    "path": "scintilla/win32/scintilla.mak",
    "content": "# Make file for Scintilla on Windows Visual C++ version\r\n# Copyright 1998-2010 by Neil Hodgson <neilh@scintilla.org>\r\n# The License.txt file describes the conditions under which this software may be distributed.\r\n# This makefile is for using Visual C++ with nmake.\r\n# Usage for Microsoft:\r\n#     nmake -f scintilla.mak\r\n# For debug versions define DEBUG on the command line:\r\n#     nmake DEBUG=1 -f scintilla.mak\r\n# The main makefile uses mingw32 gcc and may be more current than this file.\r\n\r\n.SUFFIXES: .cxx\r\n\r\nDIR_O=.\r\nDIR_BIN=..\\bin\r\n\r\nCOMPONENT=$(DIR_BIN)\\Scintilla.dll\r\nLIBSCI=$(DIR_BIN)\\libscintilla.lib\r\n\r\nLD=link\r\n\r\n!IFDEF SUPPORT_XP\r\nADD_DEFINE=-D_USING_V110_SDK71_\r\n# Different subsystems for 32-bit and 64-bit Windows XP so detect based on Platform\r\n# environment variable set by vcvars*.bat to be either x86 or x64\r\n!IF \"$(PLATFORM)\" == \"x64\"\r\nSUBSYSTEM=-SUBSYSTEM:WINDOWS,5.02\r\n!ELSE\r\nSUBSYSTEM=-SUBSYSTEM:WINDOWS,5.01\r\n!ENDIF\r\n!ELSE\r\nCETCOMPAT=-CETCOMPAT\r\n!IFDEF ARM64\r\nADD_DEFINE=-D_ARM64_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1\r\nSUBSYSTEM=-SUBSYSTEM:WINDOWS,10.00\r\n!ENDIF\r\n!ENDIF\r\n\r\nCRTFLAGS=$(ADD_DEFINE)\r\nCXXFLAGS=-Zi -TP -MP -W4 -EHsc -std:c++17 -utf-8 $(CRTFLAGS)\r\nCXXDEBUG=-Od -MTd -DDEBUG\r\nCXXNDEBUG=-O2 -MT -DNDEBUG -GL\r\nNAME=-Fo\r\nLDFLAGS=-OPT:REF -LTCG -IGNORE:4197 -DEBUG $(SUBSYSTEM) $(CETCOMPAT)\r\nLDDEBUG=\r\nLIBS=KERNEL32.lib USER32.lib GDI32.lib IMM32.lib OLE32.lib OLEAUT32.lib ADVAPI32.lib\r\nNOLOGO=-nologo\r\n\r\n!IFDEF QUIET\r\nCXX=@$(CXX)\r\nCXXFLAGS=$(CXXFLAGS) $(NOLOGO)\r\nLDFLAGS=$(LDFLAGS) $(NOLOGO)\r\n!ENDIF\r\n\r\n!IFDEF NO_CXX11_REGEX\r\nCXXFLAGS=$(CXXFLAGS) -DNO_CXX11_REGEX\r\n!ENDIF\r\n\r\n!IFDEF DEBUG\r\nCXXFLAGS=$(CXXFLAGS) $(CXXDEBUG)\r\nLDFLAGS=$(LDDEBUG) $(LDFLAGS)\r\n!ELSE\r\nCXXFLAGS=$(CXXFLAGS) $(CXXNDEBUG)\r\n!ENDIF\r\n\r\nINCLUDES=-I../include -I../src\r\nCXXFLAGS=$(CXXFLAGS) $(INCLUDES)\r\n\r\nall:\t$(COMPONENT) $(LIBSCI)\r\n\r\nclean:\r\n\t-del /q $(DIR_O)\\*.obj $(DIR_O)\\*.pdb $(DIR_O)\\*.asm $(COMPONENT) \\\r\n\t$(DIR_O)\\*.res $(DIR_BIN)\\*.map $(DIR_BIN)\\*.exp $(DIR_BIN)\\*.pdb \\\r\n\t$(DIR_BIN)\\Scintilla.lib $(LIBSCI)\r\n\r\ndepend:\r\n\tpyw DepGen.py\r\n\r\n# Required for base Scintilla\r\nSRC_OBJS=\\\r\n\t$(DIR_O)\\AutoComplete.obj \\\r\n\t$(DIR_O)\\CallTip.obj \\\r\n\t$(DIR_O)\\CaseConvert.obj \\\r\n\t$(DIR_O)\\CaseFolder.obj \\\r\n\t$(DIR_O)\\CellBuffer.obj \\\r\n\t$(DIR_O)\\ChangeHistory.obj \\\r\n\t$(DIR_O)\\CharacterCategoryMap.obj \\\r\n\t$(DIR_O)\\CharacterType.obj \\\r\n\t$(DIR_O)\\CharClassify.obj \\\r\n\t$(DIR_O)\\ContractionState.obj \\\r\n\t$(DIR_O)\\DBCS.obj \\\r\n\t$(DIR_O)\\Decoration.obj \\\r\n\t$(DIR_O)\\Document.obj \\\r\n\t$(DIR_O)\\EditModel.obj \\\r\n\t$(DIR_O)\\Editor.obj \\\r\n\t$(DIR_O)\\EditView.obj \\\r\n\t$(DIR_O)\\Geometry.obj \\\r\n\t$(DIR_O)\\Indicator.obj \\\r\n\t$(DIR_O)\\KeyMap.obj \\\r\n\t$(DIR_O)\\LineMarker.obj \\\r\n\t$(DIR_O)\\MarginView.obj \\\r\n\t$(DIR_O)\\PerLine.obj \\\r\n\t$(DIR_O)\\PositionCache.obj \\\r\n\t$(DIR_O)\\RESearch.obj \\\r\n\t$(DIR_O)\\RunStyles.obj \\\r\n\t$(DIR_O)\\Selection.obj \\\r\n\t$(DIR_O)\\Style.obj \\\r\n\t$(DIR_O)\\UndoHistory.obj \\\r\n\t$(DIR_O)\\UniConversion.obj \\\r\n\t$(DIR_O)\\UniqueString.obj \\\r\n\t$(DIR_O)\\ViewStyle.obj \\\r\n\t$(DIR_O)\\XPM.obj\r\n\r\nCOMPONENT_OBJS = \\\r\n\t$(DIR_O)\\HanjaDic.obj \\\r\n\t$(DIR_O)\\PlatWin.obj \\\r\n\t$(DIR_O)\\ScintillaBase.obj \\\r\n\t$(DIR_O)\\ScintillaWin.obj \\\r\n\t$(SRC_OBJS)\r\n\r\nSHARED_OBJS = \\\r\n\t$(DIR_O)\\ScintillaDLL.obj\r\n\r\n$(DIR_O)\\ScintRes.res : ScintRes.rc\r\n\t$(RC) -fo$@ $**\r\n\r\n$(COMPONENT): $(COMPONENT_OBJS) $(SHARED_OBJS) $(DIR_O)\\ScintRes.res\r\n\t$(LD) $(LDFLAGS) -DEF:Scintilla.def -DLL -OUT:$@ $** $(LIBS)\r\n\r\n$(LIBSCI): $(COMPONENT_OBJS)\r\n\tLIB /OUT:$@ $**\r\n\r\n# Define how to build all the objects and what they depend on\r\n\r\n{..\\src}.cxx{$(DIR_O)}.obj::\r\n\t$(CXX) $(CXXFLAGS) -c $(NAME)$(DIR_O)\\ $<\r\n{.}.cxx{$(DIR_O)}.obj::\r\n\t$(CXX) $(CXXFLAGS) -c $(NAME)$(DIR_O)\\ $<\r\n\r\n# Dependencies\r\n\r\n!IF EXISTS(nmdeps.mak)\r\n\r\n# Protect with !IF EXISTS to handle accidental deletion - just 'nmake -f scintilla.mak depend'\r\n\r\n!INCLUDE nmdeps.mak\r\n\r\n!ENDIF\r\n\r\n"
  },
  {
    "path": "scintilla/zipsrc.bat",
    "content": "cd ..\r\ndel/q scintilla.zip\r\nzip scintilla.zip scintilla\\*.* scintilla\\*\\*.* scintilla\\*\\*\\*.* scintilla\\*\\*\\*\\*.* scintilla\\*\\*\\*\\*\\*.* ^\r\n -x *.o *.obj *.dll *.lib *.res *.exp *.bak *.tgz ^\r\n **/__pycache__/* **/Debug/* **/Release/* **/x64/* **/ARM64/* **/cov-int/* */.hg/* @\r\ncd scintilla\r\n"
  },
  {
    "path": "showgraph/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.16.0)\nproject(ShowGraph)\n\n#ADD_DEFINITIONS( -Wall )\n\n\n  # with SET() command you can change variables or define new ones\n  # here we define SHOWGRAPH_SRCS variable that contains a list of all .cpp files\n  # note that we don't need \\ at the end of line\n  SET( SHOWGRAPH_SRCS\n./showgraph.cpp\n./Utils/mem_mgr.cpp\n./Utils/mem_utest.cpp\n./Utils/conf.cpp\n./Utils/list_utest.cpp\n./Utils/utils_utest.cpp\n./Utils/utils.cpp\n./Utils/conf_utest.cpp\n./Utils/mem_pool.cpp\n./Layout/node_group.cpp\n./Layout/aux_graph.cpp\n./Layout/layout.cpp\n./Graph/graph.cpp\n./Graph/node.cpp\n./Graph/edge.cpp\n./GraphView/edge_item.cpp\n./GraphView/style_edit.cpp\n./GraphView/graph_view.cpp\n./GraphView/visible_edge.cpp\n./GraphView/node_item.cpp\n./GraphView/edge_helper.cpp\n./GraphView/navigation.cpp\n  )\n  \n  # another list, this time it includes all header files that should be treated with moc\n  SET( SHOWGRAPH_MOC_HDRS\n./Layout/aux_graph.h\n./GraphView/graph_view.h\n./GraphView/style_edit.h\n  )\n\n  INCLUDE_DIRECTORIES( \"${CMAKE_CURRENT_BINARY_DIR}\" )\n  INCLUDE_DIRECTORIES( \".\" )\n  INCLUDE_DIRECTORIES( \"./Graph\" )\n  INCLUDE_DIRECTORIES( \"./GraphView\" )\n  INCLUDE_DIRECTORIES( \"./Layout\" )\n  INCLUDE_DIRECTORIES( \"./Utils\" )\n  \nif (BUILD_QT5)\n\n  FIND_PACKAGE( Qt5Widgets REQUIRED )\n  FIND_PACKAGE( Qt5Concurrent REQUIRED )\n  FIND_PACKAGE( Qt5Xml REQUIRED )\n\n  add_definitions( -DUSE_QT5 )\n  \n  set_target_properties(Qt5::Core PROPERTIES MAP_IMPORTED_CONFIG_COVERAGE \"RELEASE\")\n  #add_compile_definitions(QT_DISABLE_DEPRECATED_UP_TO=0x050F00)\n\n  SET(CMAKE_AUTOMOC ON)\n  SET(CMAKE_INCLUDE_CURRENT_DIR ON)\n\n  INCLUDE_DIRECTORIES( \"${Qt5Widgets_INCLUDE_DIRS}\" )\n  INCLUDE_DIRECTORIES( \"${Qt5Xml_INCLUDE_DIRS}\" )\n\n  add_library( cqshowgraph-qt5 STATIC ${SHOWGRAPH_SRCS} ${SHOWGRAPH_MOC_SRCS} )\n  target_link_libraries( cqshowgraph-qt5 Qt5::Widgets Qt5::Concurrent Qt5::Xml )\n\nelse (BUILD_QT5)\n\n  find_package(Qt6 REQUIRED COMPONENTS Core Widgets Concurrent Xml )\n  set(CMAKE_AUTOMOC ON)\n  set(CMAKE_AUTORCC ON)\n  set(CMAKE_AUTOUIC ON)\n  \n  add_definitions( -DUSE_QT6 )\n  SET(CMAKE_INCLUDE_CURRENT_DIR ON)\n\n  set_target_properties(Qt6::Core PROPERTIES MAP_IMPORTED_CONFIG_COVERAGE \"RELEASE\")\n\n  qt6_add_library( cqshowgraph-qt6 STATIC ${SHOWGRAPH_SRCS} ${SHOWGRAPH_MOC_SRCS} )\n  target_link_libraries( cqshowgraph-qt6 PRIVATE Qt6::Widgets Qt6::Concurrent Qt6::Xml )\n\nendif (BUILD_QT5)\n\n"
  },
  {
    "path": "showgraph/Graph/README.txt",
    "content": "Copyright (c) 2014, Boris Shurygin\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n\n3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "showgraph/Graph/agraph.h",
    "content": "/**\n * @file: agraph.h \n * Abstract Graph for testing of graph's properties and usage model.\n *\n * @defgroup AGr Test Graph\n *\n * @ingroup GraphBase\n * AGraph, ANode and AEdge classes present mimnimal code\n * that you need to write to employ Graph Library functionality.\n * AGraph classes differ from base in only one member of ( int) type\n */\n/*\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#ifndef AGRAPH_H\n#define AGRAPH_H\n\n/* Predeclarations */\nclass ANode;\nclass AEdge;\nclass AGraph;\n\n/**\n * Abstract node\n *\n * @ingroup AGr\n */\nclass ANode: public Node\n{\n    int dummy;\n    /** We can't create nodes separately, do it through newNode method of graph */\n    ANode( AGraph *graph_p, int _id);\n    friend class AGraph;\npublic:\n        /** Get next graph's node */\n    inline ANode* nextNode()\n    {\n        return static_cast< ANode*>( Node::nextNode());\n    }\n    /** Get prev graph's node */\n    inline ANode* prevNode()\n    {\n        return static_cast< ANode*>( Node::prevNode());\n    }\n    /** Edge connection reimplementation */\n    inline void AddEdgeInDir( AEdge *edge, GraphDir dir);\n    /** Add predecessor */\n    inline void AddPred( AEdge *edge);\n    /** Add successor */\n    inline void AddSucc( AEdge *edge);\n    /** Get first edge in given direction */\n    inline AEdge* firstEdgeInDir( GraphDir dir);\n    /** Get first successor */\n    inline AEdge* firstSucc();\n    /** Get first predecessor */\n    inline AEdge* firstPred();\n\n};\n\n/**\n * Abstract edge\n *\n * @ingroup AGr\n */\nclass AEdge: public Edge\n{\n    //int dummy;\n\n    /** Constructors are made private, only nodes and graph can create edges */\n    AEdge( AGraph *graph_p, int _id, ANode *_pred, ANode* _succ);\n        \n    friend class AGraph;\n    friend class ANode;\npublic:\n        /** Get node in given direction */\n    inline ANode *node( GraphDir dir) const\n    {\n        return static_cast< ANode *>( Edge::node( dir));\n    }\n    /** Get predecessor */\n    inline ANode *pred() const \n    {\n        return node( GRAPH_DIR_UP);\n    }\n    /** Get successor */\n    inline ANode *succ() const \n    {\n        return node( GRAPH_DIR_DOWN);\n    }  \n    /** insert node on this edge */\n    virtual ANode *insertNode()\n    {\n        return static_cast< ANode *>( Edge::insertNode());\n    }\n    /** Next edge in graph's list */\n    inline AEdge* nextEdge()\n    {\n        return static_cast< AEdge *>( Edge::nextEdge());\n    }\n    /** Next edge in give direction */\n    inline AEdge* nextEdgeInDir( GraphDir dir)\n    {\n        return static_cast< AEdge *>( Edge::nextEdgeInDir( dir));\n    }\n    /** Next successor */\n    inline AEdge* nextSucc()\n    {\n        return nextEdgeInDir( GRAPH_DIR_DOWN);\n    }\n    /** Next predecessor */\n    inline AEdge* nextPred()\n    {\n        return nextEdgeInDir( GRAPH_DIR_UP);\n    } \n};\n\n/**\n * Testing-purpose graph\n *\n * @ingroup AGr\n */\nclass AGraph: public Graph\n{\n    int dummy; //Dummy class member\n\n\n    /** Node creation overload */\n    Node * createNode( int _id);\n\t/** Edge creation overload */\n    Edge * createEdge( int _id, Node *_pred, Node* _succ);\n\n    public:\n            \n    /** New graphical node */\n    ANode* newNode()\n    {\n        return static_cast< ANode*>( Graph::newNode());\n    }\n\n    /** New graphical edge */\n    AEdge* newEdge( ANode* pred, ANode* succ)\n    {\n        return static_cast< AEdge *>( Graph::newEdge( pred, succ));\n    }\n\n    /** Get graph's first edge */\n    inline AEdge* firstEdge() \n    {\n        return static_cast< AEdge *>( Graph::firstEdge());\n    }\n    /** Get graph's first node */\n    inline ANode* firstNode()\n    {\n        return static_cast< ANode *>( Graph::firstNode());\n    }\n    /** Pools' creation routine */\n    void createPools()\n    {\n        node_pool = new FixedPool< ANode>();\n        edge_pool = new FixedPool< AEdge>();\n    }\n    /** Constructor */\n    AGraph( bool create_pools): Graph( false)\n    {\n        if ( create_pools)\n            createPools();\n    }\n};\n\n/** Node constructor */\ninline ANode::ANode( AGraph *graph_p, int _id):\n        Node( graph_p, _id)\n{\n\n}\n\n/** Edge constructor */\ninline AEdge::AEdge( AGraph *graph_p, int _id, ANode *_pred, ANode* _succ):\n        Edge( graph_p, _id, _pred, _succ)\n{\n\n}\n        \n/** Node creation overload */\ninline Node * AGraph::createNode( int _id)\n{\n    return new ( nodePool()) ANode( this, _id);\n}\n/** Edge creation overload */\ninline Edge * AGraph::createEdge( int _id, Node *_pred, Node* _succ)\n{\n    return new ( edgePool()) AEdge( this, _id, static_cast<ANode*>( _pred), static_cast< ANode *>(_succ));\n} \n\n/** Get first edge in given direction */\ninline AEdge*\nANode::firstEdgeInDir( GraphDir dir)\n{\n    return static_cast< AEdge*>( Node::firstEdgeInDir( dir));\n}\n/** Get first successor */\ninline AEdge*\nANode::firstSucc()\n{\n    return firstEdgeInDir( GRAPH_DIR_DOWN);\n}\n/** Get first predecessor */\ninline AEdge*\nANode::firstPred()\n{\n    return firstEdgeInDir( GRAPH_DIR_UP);\n}\n\n/** Edge connection reimplementation */\ninline void\nANode::AddEdgeInDir( AEdge *edge, GraphDir dir)\n{\n    Node::AddEdgeInDir( edge, dir);\n}\n/** Add predecessor */\ninline void\nANode::AddPred( AEdge *edge)\n{\n    AddEdgeInDir( edge, GRAPH_DIR_UP);\n}\n/** Add successor */\ninline void\nANode::AddSucc( AEdge *edge) \n{\n    AddEdgeInDir( edge, GRAPH_DIR_DOWN);\n}\n#endif\n"
  },
  {
    "path": "showgraph/Graph/edge.cpp",
    "content": "/**\n * @file: edge.cpp \n * Edge class implementation\n */\n/*\n * Graph library, internal representation of graphs in ShowGraph tool.\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#include \"graph_iface.h\"\n\n/**\n * Edge destructor.\n * delete edge from graph's list of edges\n */\nEdge::~Edge()\n{\n    //out(\"Deleted edge\");\n    element.parentNode().removeChild( element);\n    graph_p->detachEdge( this);\n    detachFromNode( GRAPH_DIR_UP);\n    detachFromNode( GRAPH_DIR_DOWN);\n}\n\n/**\n * Print edge in DOT format to stdout\n */\nvoid\nEdge::debugPrint()\n{\n    /**\n     * Check that edge is printable\n     * TODO: Implements graph states and in 'in process' state print node as '?'\n     *       Examples of such prints: 4->? ?->3 ?->?\n     */\n    assertd( isNotNullP( pred()));\n    assertd( isNotNullP( succ()));\n\n    out(\"%llu->%llu;\", pred()->id(), succ()->id());\n}\n\n/**\n * Update DOM tree element\n */\n\nvoid\nEdge::updateElement()\n{\n    element.setAttribute( \"source\", pred()->id());\n    element.setAttribute( \"target\", succ()->id());\n}\n\n/**\n * read properties from DOM tree element\n */\nvoid\nEdge::readFromElement( QDomElement e)\n{\n    element = e;\n}\n\n/** Node checking routine */\nbool Edge::checkNodes( Node* _pred, Node* _succ)\n{\n    return isNotNullP( _pred)\n           && isNotNullP( _succ)\n           && areEqP( this->graph(), _pred->graph())\n           && areEqP( _pred->graph(), _succ->graph());\n}\n"
  },
  {
    "path": "showgraph/Graph/edge.h",
    "content": "/**\n * @file: edge.h\n * Edge class definition\n */\n/*\n * Graph library, internal representation of graphs in ShowGraph tool.\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#ifndef EDGE_H\n#define EDGE_H\n\n/**\n * Edge lists identificators\n * @ingroup GraphBase \n */\nenum EdgeListType\n{\n    EDGE_LIST_PREDS,\n    EDGE_LIST_SUCCS,\n    EDGE_LIST_GRAPH,\n    EDGE_LISTS_NUM\n};\n\n/**\n * @class Edge\n * @brief  Representation of graph edge\n * @ingroup GraphBase\n *\n * @par\n * Edge class implements basic concept of graph edge. Every edge has two adjacent nodes.\n * Use pred() and succ() routines to get them. Edge is a member of 3 lists: edge list in graph,\n * pred list in succ node and succ list in pred node. To traverse these lists use nextEdge(),\n * nextPred() and  nextSucc() routines. Also for debug purposes all edges in a graph\n * have unique id, which can be usefull for printing to console or setting breakpoint conditions.\n *\n * @par\n * An edge can be @ref Marked \"marked\" and @ref Numbered \"numbered\". @ref Mark \"Markers\" and\n * @ref Nums \"numerations\" are managed by @ref Graph \"graph\". Note that @ref Node \"nodes\" can be marked with the\n * same marker or numbered in the same numeration.\n * Also for debug purposes all nodes in a graph\n * have unique id, which can be usefull for printing to console or setting breakpoint conditions.\n *\n * @par\n * Edges reside in memory pool that is controlled by Graph. Operator new can't be called\n * directly. Edges can be only created by calling Graph::newEdge().\n *\n * @par\n * Every edge have associated QDomElement for XML export support. The updateElement() routine should be called before\n * export to get element in sync with edge's properties.\n *\n * @sa Graph\n * @sa Node\n * @sa Mark\n * @sa Nums\n */\nclass Edge: \n    public MListIface< Edge, // List item\n                       MListItem< EDGE_LISTS_NUM>, // base class: pure multi-list item\n                       EDGE_LISTS_NUM >, // Lists number                      \n    public Marked,\n    public Numbered,\n    public PoolObj\n{\npublic:\n    /** Get edge's unique ID */\n    inline GraphUid id() const;\n\n    /** Get edge's graph */\n    inline Graph * graph() const;\n\n    /** \n     *  Destructor.\n     *  Delete edge from list in graph.\n     *  Deletion from node lists MUST be performed manually.\n     */\n    virtual ~Edge();\n\n    /**\n     * Connect edge to a node in specified direction.\n     * Note that node treats this edge in opposite direction. I.e. an edge that has node in\n     * GRAPH_DIR_UP is treated as edge in GRAPH_DIR_DOWN directions inside that node\n     */\n    inline void setNode( Node *n, GraphDir dir);\n    \n    /** Connect edge with given node as a predecessor */\n    inline void setPred( Node *n);\n    /** Connect edge with given node as a successor   */\n    inline void setSucc( Node *n);\n\n    /** Get node in specified direction  */\n    inline Node *node( GraphDir dir) const;\n    inline Node *pred() const;/**< Get predecessor node of edge */\n    inline Node *succ() const;/**< Get successor node of edge   */\n\n    /** Return next edge of the graph */\n    inline Edge* nextEdge();\n\n    /** Return next edge of the same node in given direction  */\n    inline Edge* nextEdgeInDir( GraphDir dir);\n    inline Edge* nextSucc();/**< Next successor */\n    inline Edge* nextPred();/**< Next predecessor */\n    \n    /** Print edge in dot fomat to stdout */\n    virtual void debugPrint();\n\n    /** Return corresponding document element */\n    inline QDomElement elem() const;\n\n    /** Set document element */\n    inline void setElement( QDomElement elem);\n\n    /** Update DOM element */\n    virtual void updateElement();\n\n    /** Read properties from XML */\n    virtual void readFromElement( QDomElement elem);\n\n    /**\n     * Insert a node on this edge\n     *\n     * Creates a node on edge and a new edge from new node to former successor of original edge.\n     * Original edge goes to new node.\n     * Return new node.\n     */\n    virtual Node *insertNode();\nprivate:\n    /** Representation in document */\n    QDomElement element;\n\n    /** Graph part */\n    GraphUid uid; //Unique ID\n    Graph * graph_p; //Graph\n\n    /** Nodes */\n    Node *nodes[ GRAPH_DIRS_NUM]; //Adjacent nodes\n    /** Node checking routine */\n    bool checkNodes( Node* _pred, Node* _succ);\n\nprotected:\n    /** Graph should have access to Edge's members */\n    friend class Graph;\n    /** Node should have access to Edge's members */\n\tfriend class Node;\n\n    /** Constructors are made private, only nodes and graph can create edges */\n    Edge( Graph *_graph_p, GraphUid _id, Node *_pred, Node* _succ):\n        uid(_id), graph_p(_graph_p)\n    {\n        GRAPH_ASSERTD( checkNodes( _pred, _succ),\n                       \"Predecessor and sucessor used in edge construction belong to different graphs\");\n        setPred( _pred);\n        setSucc( _succ);\n    }\n\n    /**\n     * Detach edge from a node.\n     * Made private as it is low-level routine needed for implementation of edge-node relationship\n     */\n    inline void detachFromNode( GraphDir dir);\n\n    /**\n\t * Remove myself from graph's list of edges\n\t */\n\tinline void detachFromGraph()\n    {\n        detach( EDGE_LIST_GRAPH);\n    }\n};\n\n#endif\n"
  },
  {
    "path": "showgraph/Graph/edge_inline.h",
    "content": "/**\n * @file: edge.h\n * Implementation of Edge class inline routines\n */\n/*\n * Graph library, internal representation of graphs in ShowGraph tool.\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#ifndef EDGE_INLINE_H\n#define EDGE_INLINE_H\n\n/**\n * Low level correction of node's edge list in corresponding direction\n */\ninline void\nEdge::detachFromNode( GraphDir dir)\n{\n    if ( isNotNullP( node( dir)))\n    {\n        Node *n = node( dir);\n        n->deleteEdgeInDir( RevDir( dir), (Edge* )this);\n        detach( RevDir( dir));\n        nodes[ dir] = 0;\n    }\n}\n\n/**\n * Connect edge to a node in specified direction.\n * Note that node treats this edge in opposite direction. I.e. an edge that has node in\n * GRAPH_DIR_UP is treated as edge in GRAPH_DIR_DOWN directions inside that node\n */\ninline void \nEdge::setNode( Node *n, GraphDir dir)\n{\n    assertd( isNotNullP( n));\n    nodes[ dir] = n;\n    if ( n != NULL)\n    {\n        n->AddEdgeInDir( (Edge *)this, \n            ((dir == GRAPH_DIR_UP)? GRAPH_DIR_DOWN : GRAPH_DIR_UP));\n    }\n}\n\n/**\n * Return corresponding document element\n */\ninline QDomElement Edge::elem() const\n{\n    return element;\n}\n\n/**\n * Set document element\n */\ninline void Edge::setElement( QDomElement elem)\n{\n    element = elem;\n}\n\n/**\n * Get edge's unique ID\n */\ninline GraphUid Edge::id() const\n{\n    return uid;\n}\n\n/**\n * Get edge's corresponding graph\n */\ninline Graph * Edge::graph() const\n{\n    return graph_p;\n}\n\n/**\n * Connect edge with given node as a predecessor\n */\ninline void Edge::setPred( Node *n)\n{\n    setNode( n, GRAPH_DIR_UP);\n}\n/**\n * Connect edge with given node as a successor\n */\ninline void Edge::setSucc( Node *n)\n{\n    setNode( n, GRAPH_DIR_DOWN);\n}\n\n/**\n * Get node in specified direction\n */\ninline Node *Edge::node( GraphDir dir) const\n{\n    return nodes[ dir];\n}\n/**\n * Get predecessor of edge\n */\ninline Node *Edge::pred() const\n{\n    return node( GRAPH_DIR_UP);\n}\n/**\n * Get successor of edge\n */\ninline Node *Edge::succ() const\n{\n    return node( GRAPH_DIR_DOWN);\n}\n\n/**\n * Return next edge of the graph\n */\ninline Edge* Edge::nextEdge()\n{\n    return next( EDGE_LIST_GRAPH);\n}\n\n/**\n * Return next edge of the same node in given direction\n */\ninline Edge* Edge::nextEdgeInDir( GraphDir dir)\n{\n    GRAPH_ASSERTD( dir < GRAPH_DIRS_NUM, \"Wrong direction parameter\");\n    GRAPH_ASSERTD( (int) GRAPH_DIR_DOWN == (int) EDGE_LIST_SUCCS,\n                   \"Enums of direction and edge lists are not having right values\");\n    GRAPH_ASSERTD( (int) GRAPH_DIR_UP == (int) EDGE_LIST_PREDS,\n                   \"Enums of direction and edge lists are not having right values\");\n    return next( dir);\n}\n\n/**\n * Next successor\n */\ninline Edge* Edge::nextSucc()\n{\n    return nextEdgeInDir( GRAPH_DIR_DOWN);\n}\n\n/**\n * Next predecessor\n */\ninline Edge* Edge::nextPred()\n{\n    return nextEdgeInDir( GRAPH_DIR_UP);\n}\n\n/**\n * Insert a node on this edge\n *\n * Creates a node on edge and a new edge from new node to former successor of original edge.\n * Original edge goes to new node. \n * Return new node.\n */\ninline Node *\nEdge::insertNode()\n{\n    Node *tmp_succ = succ();\n    Node *new_node = graph()->newNode();\n    detachFromNode( GRAPH_DIR_DOWN);\n    setSucc( new_node);\n    graph()->newEdge( new_node, tmp_succ);\n    return new_node;\n}\n\n\n#endif\n"
  },
  {
    "path": "showgraph/Graph/graph.cpp",
    "content": "/**\n * @file: graph.cpp\n * Graph class implementation\n */\n/*\n * Graph library, internal representation of graphs in ShowGraph tool.\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#include \"graph_iface.h\"\n\n/**\n * Constructor.\n */\nGraph::Graph( bool create_pools):\n    node_next_id( 0),\n    edge_next_id( 0),\n    node_num( 0),\n    edge_num( 0),\n    first_node( NULL),\n    first_edge( NULL),\n    node_pool( NULL),\n    edge_pool( NULL)\n{\n    QDomElement root = createElement(\"graph\");\n    appendChild( root);\n    if ( create_pools)\n        createPools();\n}\n\n/**\n * Destructor - removes all nodes\n */\nGraph::~Graph()\n{\n    for ( Node *node = firstNode();\n          isNotNullP( node);\n          )\n    {\n        Node* next = node->nextNode();\n        deleteNode( node);\n        node = next;\n    }\n    destroyPools();\n}\n\n/** Pools' creation routine */\nvoid Graph::createPools()\n{\n    node_pool = new FixedPool< Node>();\n    edge_pool = new FixedPool< Edge>();\n}\n\n/** Pools' destruction routine */\nvoid Graph::destroyPools()\n{\n    delete node_pool;\n    delete edge_pool;\n}\n\n/**\n * Build graph from XML description\n */\nvoid\nGraph::readFromXML( QString filename)\n{\n    QFile file( filename);\n\n    if ( !file.open( QIODevice::ReadOnly))\n        return;\n\n    if ( !setContent( &file))\n    {\n        GRAPH_ASSERTD( 0, \"Not a good-formated xml file\");\n        file.close();\n        return;\n    }\n    file.close();\n\n    /**\n     * Read nodes and create them\n     */\n    QDomElement docElem = documentElement();\n\n    QDomNode n = docElem.firstChild();\n    QHash< GraphUid, Node *> n_hash;\n\n    while ( !n.isNull())\n    {\n        QDomElement e = n.toElement(); // try to convert the DOM tree node to an element.\n        \n        if ( !e.isNull() && e.tagName() == QString( \"node\"))\n        {\n            Node *node = newNode( e);\n            node->readFromElement( e);\n            n_hash[ e.attribute( \"id\").toLongLong()] = node;\n        }\n        n = n.nextSibling();\n    }\n    \n    n = docElem.firstChild();\n    while ( !n.isNull())\n    {\n        QDomElement e = n.toElement(); // try to convert the DOM tree node to an element.\n        \n        if ( !e.isNull() && e.tagName() == QString( \"edge\"))\n        {\n            GraphUid pred_id = e.attribute( \"source\").toLongLong();\n            GraphUid succ_id = e.attribute( \"target\").toLongLong();\n            Node *pred = n_hash[ pred_id];\n            Node *succ = n_hash[ succ_id];\n            Edge *edge = newEdge( pred, succ, e);\n            edge->readFromElement( e);\n        }\n        n = n.nextSibling();\n    }\n}\n\n/** Node/Edge creation routines can be overloaded by derived class */\nNode * \nGraph::createNode( int _id)\n{\n    return new ( node_pool) Node ( this, _id);\n}\n\nEdge * \nGraph::createEdge( int _id, Node *_pred, Node* _succ)\n{\n    return new ( edge_pool) Edge( this, _id, _pred, _succ);\n}\n\n/**\n * Print graph to stdout in DOT format.\n * Note: Iterates through nodes and edges separately instead\n *       of iterating through nodes and at iterating through edges of each node\n */\nvoid \nGraph::debugPrint()\n{\n    Node *n;\n    Edge *e;\n    out( \"digraph{\");\n    /** Print nodes */\n    for (  n = firstNode(); isNotNullP( n); n = n->nextNode())\n    {\n        n->debugPrint();\n    }\n    /** Print edges */\n    for (  e = firstEdge(); isNotNullP( e); e = e->nextEdge())\n    {\n        e->debugPrint();\n    }\n    out( \"}\");\n}\n\n/**\n * Implementation for numerations cleanup\n */\nvoid \nGraph::clearNumerationsInObjects()\n{\n    Node *n;\n    Edge *e;\n    /** Clean markers in nodes */\n    for ( n = firstNode(); isNotNullP( n); n = n->nextNode())\n    {\n        clearUnusedNumerations( n);\n    }\n    /** Clean markers in edges */\n    for ( e = firstEdge(); isNotNullP( e); e = e->nextEdge())\n    {\n        clearUnusedNumerations( e);\n    }\n}\n\n/**\n * Implementation for markers cleanup\n */\nvoid \nGraph::clearMarkersInObjects()\n{\n    Node *n;\n    Edge *e;\n    /** Clean markers in nodes */\n    for (  n = firstNode(); isNotNullP( n); n = n->nextNode())\n    {\n        clearUnusedMarkers( static_cast<Marked *>(n));\n    }\n    /** Clean markers in edges */\n    for (  e = firstEdge(); isNotNullP( e); e = e->nextEdge())\n    {\n        clearUnusedMarkers( static_cast<Marked *>(n));\n    }\n}\n\n/**\n * Implementation of XML writing\n */\nvoid \nGraph::writeToXML( QString filename)\n{\n    QFile file( filename);\n    if (!file.open(QFile::WriteOnly | QFile::Text))\n    {\n        assertd( 0);\n        return;\n    }\n     \n    /** Update element for each node */\n    for ( Node *n = firstNode(); isNotNullP( n); n = n->nextNode())\n    {\n        n->updateElement();\n    }\n\n    /** Update element for each edge */\n    for ( Edge *e = firstEdge(); isNotNullP( e); e = e->nextEdge())\n    {\n        e->updateElement();\n    }\n\n    QTextStream out( &file);\n    save(out, IndentSize);\n}\n"
  },
  {
    "path": "showgraph/Graph/graph.h",
    "content": "/**\n * @file: graph.h \n * Graph class definition/implementation.\n */\n/*\n * Graph library, internal representation of graphs in ShowGraph tool.\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#ifndef GRAPH_H\n#define GRAPH_H\n\n/**\n * @class Graph\n * @brief Basic representation of graph\n * @ingroup GraphBase\n *\n * @par \n * The Graph class represents graph as a whole. As one can expect graph has @ref Node \"nodes\"\n * and @ref Edge edges which impement the directed graph data structure. For traversing nodes\n * and edges they are linked in two lists. One can traverse these lists using firstNode() and firstEdge()\n * routines with calling Node::nextNode() Edge::nextEdge() in a loop.\n * Example:\n * @code\n //Traversing nodes\n for ( Node *n = firstNode(); isNotNullP( n); n = n->nextNode())\n {\n     ...\n }\n //Traversing edges\n for ( Node *e = firstEdge(); isNotNullP( e); e = e->nextEdge())\n {\n     ...\n }\n @endcode\n * The same result can be achieved using macros \n * @code\n \n // Graph *g; Node *n; Edge *e;\n // Traversing nodes\n foreachNode( n, g)\n {\n    ...\n }\n \n // Traversing edges\n foreachEdge( e, g)\n {\n    ...\n }\n @endcode\n *\n * @par\n * The graph is also owner of memory allocated for its nodes and edges. This is\n * implemented via @ref FixedPool \"memory pools\" with records of fixed size. Nodes and\n * Edges should be created through newNode() and newEdge() routines. They can be deleted by\n * deleteNode() and deleteEdge() routines. Do not use operators new/delete for graph's \n * nodes and edges.\n * \n * @par\n * Graph is also manager of @ref Mark \"markers\" and @ref Nums \"numerations\" for nodes and edges.\n * New @ref Marker \"marker\" can be obtained by newMarker() routine. New @ref Numeration \"numeration\" is\n * created by newNum().\n * Example:\n * @code\n //Graph *graph; Node *n;\n Marker m = graph.newMarker();\n Numeration num = graph.newNum();\n    \n GraphNum i = 0; //unsigned int 32\n //Mark nodes without predecessors\n foreachNode( n, g)\n {\n    if ( isNullP( n->firstPred()))\n    {\n        n->mark( m);\n        n->setNumber( num, i++);\n    }\n }\n ...\n\n //Checking markers and numbers\n foreachNode( n, g)\n {\n     if ( n->isMarked( m) && n->number( num) > 10)\n     {\n        ...\n     }\n }\n graph->freeMarker( m);\n graph->freeNum( num);\n\n @endcode\n *\n * @par Deriving classes from Graph\n * To make a graph-like data structure one can use Graph as a base class. Most likely\n * it will be also necessary to implement two more classes to make a useful implementation.\n * These two class should be derived from Node and Edge to represent information  \n * associated with nodes and edges. You can see an example of such inheritance in AGraph,\n * ANode and AEdge classes.\n *\n * @sa Node\n * @sa Edge\n * @sa Mark\n * @sa Nums\n * @sa AGraph\n */\nclass Graph: public MarkerManager, public NumManager, public QDomDocument\n{\npublic:\n    /**\n     * Constructor. \n     * Derived classes may be call constructor with 'false' vaule of\n     * the parameter to prevent pools creation for base-level nodes and edges.\n     * In this case pool should be created by derived class itself.\n     */\n    Graph( bool create_pools);\n    \n    /** Destructor */\n    virtual ~Graph();\n\n    /** Create new node in graph */\n    inline Node * newNode();\n\n    /** Create new node in graph and fills it with info in element */\n    inline Node * newNode( QDomElement e);\n\n    /**\n     * Create edge between two nodes.\n     * We do not support creation of edge with undefined endpoints\n     */\n    inline Edge * newEdge( Node * pred, Node * succ);\n    /**\n     * Create edge between two nodes from an XML description\n     * We do not support creation of edge with undefined endpoints\n     */\n\tinline Edge * newEdge( Node * pred, Node * succ, QDomElement e);\n    \n    /** \n     *  Delete node. Substitution for node's operator delete, which shouldn't\n     *  be called directly since Node is a pool-residing object\n     */\n    inline void deleteNode( void *n);\n\n    /** \n     *  Delete node. Substitution for edges's operator delete, which shouldn't\n     *  be called directly since Edge is a pool-residing object\n     */\n    inline void deleteEdge( void *e);\n    \n    /** Remove node from node list of graph */\n    inline void detachNode( Node* node);\n\n    /** Remove edge from edge list of graph */\n    inline void detachEdge( Edge * edge);\n\n    /** Return number of nodes in graph */\n    inline GraphNum nodeCount() const;\n\n    /** Return number of edges in graph */\n    inline GraphNum edgeCount() const;\n    \n    /** Get first edge */\n    inline Edge* firstEdge();\n\n    /** Get first node */\n    inline Node* firstNode();\n    \n    /** Print graph to stdout in DOT format */\n    virtual void debugPrint();\n \n    /**\n     * Save graph as an XML file\n     */\n    virtual void writeToXML( QString filename);\n\n    /**\n     * Build graph from XML description\n     */\n    virtual void readFromXML( QString filename);\n\nprotected:\n\n    /** Node creation routine is to be overloaded by derived class */\n\tvirtual Node * createNode( int _id);\n\t/** Edge creation routine is to be overloaded by derived class */\n    virtual Edge * createEdge( int _id, Node *_pred, Node* _succ);\n    \n    /** Pools' creation routine */\n    virtual void createPools();\n    /** Pools' destruction routine */\n    virtual void destroyPools();\n\n    /** Get pool of nodes */\n    inline Pool *nodePool() const;\n    /** Get pool of edges */\n    inline Pool *edgePool() const;\n\n    /** Memory pool for nodes */\n    Pool *node_pool;\n    /** Memory pool for edges */\n    Pool *edge_pool;\nprivate:\n    /**\n     * Implementation of node creation\n     */\n    inline Node * newNodeImpl( GraphUid id);\n    /**\n     * Implementation of edge creation\n     */\n\tinline Edge * newEdgeImpl( Node * pred, Node * succ);\n\n    /** Clear unused markers from marked objects */\n    void clearMarkersInObjects();\n\n    /** Clear unused numerations from numbered objects */\n    void clearNumerationsInObjects();\n\n    /** First node */\n    Node* first_node;\n    /** Number of nodes */\n    GraphNum node_num;\n    \n    /** \n     *  Id of next node. Incremented each time you create a node,\n     *  needed for nodes to have unique id. In DEBUG mode node id is not reused.\n     */\n    GraphUid node_next_id;\n\n    /* List of edges and its iterator */\n    Edge* first_edge;\n    GraphNum edge_num;\n    \n    /** Id of next edge. Incremented each time you create an edge,\n     *  needed for edges to have unique id. In DEBUG mode edge id is not reused.\n     */\n    GraphUid edge_next_id;\n};\n\n#endif\n"
  },
  {
    "path": "showgraph/Graph/graph_iface.h",
    "content": "/**\n * @file: graph_iface.h\n * Interface of Graph library\n *\n * @defgroup GraphBase Graph\n * @ingroup Core\n *\n * @brief Representation of graphs\n * \n * Graph representation is implemented through 3 tightly connected classes Graph, Node and Edge.\n */\n/*\n * Graph library, internal representation of graphs in ShowGraph tool.\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#ifndef GRAPH_IFACE_H\n#define GRAPH_IFACE_H\n#include \"predecls.h\"\n\n#include \"edge.h\"\n#include \"node.h\"\n#include \"graph.h\"\n#include \"agraph.h\"\n\n/* Edges traversal implementation */\n#define ITERATE_NODE_EDGES(node, edge, dir) for ( edge = node->first##dir();\\\n\t\t\t\t\t\t\t\t\t\t          isNotNullP( edge);\\\n\t\t\t\t\t\t\t\t                  edge = edge->next##dir())\n\n/* Succs traverse implementation */\n#define ITERATE_NODE_SUCCS(edge, node) for ( edge = node->firstSucc();\\\n\t\t\t\t\t\t\t\t\t\t     isNotNullP( edge);\\\n\t\t\t\t\t\t\t\t             edge = edge->nextSucc())\n\n/* Preds traverse implementation */\n#define ITERATE_NODE_PREDS(edge, node) for ( edge = node->firstPred();\\\n\t\t\t\t\t\t\t\t\t         isNotNullP( edge);\\\n\t\t\t\t\t\t\t\t             edge = edge->nextPred())\n\n/**\n * Convenience macro for traversing edges in given direction\n * @ingroup GraphBase\n * @param node A node that we use to get first edge\n * @param edge An object of Edge type or subclass of Edge which is the loop variable\n * @param dir 'Succ' or 'Pred'\n */\n#ifndef ForEdges\n#  define ForEdges(node, edge, dir) ITERATE_NODE_EDGES(node, edge, dir)\n#endif\n\n/**\n * Convenience macro for traversing successors of node\n * @ingroup GraphBase\n * @param edge An object of Edge type or subclass of Edge which is the loop variable\n * @param node A node that we use to get first edge\n */\n#ifndef foreachSucc\n#  define foreachSucc(edge, node) ITERATE_NODE_SUCCS(edge, node)\n#endif\n\n/**\n * Convenience macro for traversing predecessors of node\n * @ingroup GraphBase\n * @param edge An object of Edge type or subclass of Edge which is the loop variable\n * @param node A node that we use to get first edge\n */\n#ifndef foreachPred\n#  define foreachPred(edge, node) ITERATE_NODE_PREDS(edge, node)\n#endif\n\n/* Graph's edges traverse implementation */\n#define ITERATE_GRAPH_EDGES(edge, graph) for ( edge = graph->firstEdge();\\\n\t\t\t\t\t\t\t\t\t           isNotNullP( edge);\\\n\t\t\t\t\t\t\t\t               edge = edge->nextEdge())\n/* Graph's nodes traverse implementation */\n#define ITERATE_GRAPH_NODES(node, graph) for ( node = graph->firstNode();\\\n\t\t\t\t\t\t\t\t\t           isNotNullP( node);\\\n\t\t\t\t\t\t\t\t               node = node->nextNode())\n\n/**\n * Convenience macro for traversing edges in graph\n * @ingroup GraphBase\n * @param edge An object of Edge type or subclass of Edge which is the loop variable\n * @param graph Graph of interest\n */\n#ifndef foreachEdge\n#  define foreachEdge(edge, graph) ITERATE_GRAPH_EDGES(edge, graph)\n#endif\n\n/**\n * Convenience macro for traversing nodes in graph\n * @ingroup GraphBase\n * @param node An object of Node type or subclass of Node which is the loop variable\n * @param graph Graph of interest\n */\n#ifndef foreachNode\n#  define foreachNode(node, graph) ITERATE_GRAPH_NODES(node, graph)\n#endif\n\n/* Implementation of inline functinality */\n#include \"edge_inline.h\"\n#include \"node_inline.h\"\n#include \"graph_inline.h\"\n\n#endif"
  },
  {
    "path": "showgraph/Graph/graph_inline.h",
    "content": "/**\n * @file: graph_inline.h\n * Implementation of Graph's inline routines\n */\n/*\n * Graph library, internal representation of graphs in ShowGraph tool.\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#pragma once\n#ifndef GRAPH_INLINE_H\n#define GRAPH_INLINE_H\n\n/** Delete node from memory pool */\ninline void Graph::deleteNode( void *n)\n{\n    node_pool->destroy( n);\n}\n\n/** Delete edge from memory pool */\ninline void Graph::deleteEdge( void *e)\n{\n    edge_pool->destroy( e);\n}\n\n/**\n * Remove node from node list of graph\n */\ninline void Graph::detachNode( Node* node)\n{\n    assertd( isNotNullP( node));\n    assertd( node->graph() == this);\n\n    if( first_node == node)\n    {\n       first_node = node->nextNode();\n    }\n    node->detachFromGraph();\n    node_num--;\n}\n\n/**\n * Remove edge from edge list of graph\n */\ninline void Graph::detachEdge( Edge * edge)\n{\n    assertd( isNotNullP( edge));\n    assertd( edge->graph() == this);\n\n    if( first_edge == edge)\n    {\n       first_edge = edge->nextEdge();\n    }\n    edge->detachFromGraph();\n    edge_num--;\n}\n\n/**\n * Return node quantity\n */\ninline GraphNum Graph::nodeCount() const\n{\n    return node_num;\n}\n\n/**\n * Return edge quantity\n */\ninline GraphNum Graph::edgeCount() const\n{\n    return edge_num;\n}\n/** \n * Get first edge\n */\ninline Edge* Graph::firstEdge() \n{\n    return first_edge;\n}\n\n/**\n * Get first node\n */\ninline Node* Graph::firstNode()\n{\n    return first_node;\n}\n\n/** Get pool of nodes */\ninline Pool *Graph::nodePool() const\n{\n    return node_pool;\n}\n/** Get pool of edges */\ninline Pool *Graph::edgePool() const\n{\n    return edge_pool;\n}\n\n/**\n * Creation node in graph implementation\n */\ninline Node * \nGraph::newNodeImpl( GraphUid id)\n{\n    /**\n     * Check that we have available node id \n     */\n    assertd( edge_next_id < GRAPH_MAX_NODE_NUM);\n    \n    /** Create node */\n    Node *node_p = this->createNode( id);\n    \n    /** Add node to graph's list of nodes */\n    node_p->attach( first_node);\n    first_node = node_p;\n    \n    node_num++;\n    \n    /** Make sure that next automatically assigned id will be greater than given id */\n    if ( node_next_id <= id)\n        node_next_id = id + 1;\n    return node_p;\n}\n\n/**\n * Creation node in graph\n */\ninline Node * \nGraph::newNode()\n{\n    Node * node_p = newNodeImpl( node_next_id);\n    node_p->setElement( createElement( \"node\"));\n    documentElement().appendChild( node_p->elem());\n    return node_p;\n}\n\n\n/**\n * Creation node in graph\n */\ninline Node * \nGraph::newNode( QDomElement e)\n{\n    assertd( !e.isNull());\n    assertd( e.tagName() == QString( \"node\"));\n    assertd( e.hasAttribute( \"id\"));\n\n    Node *node_p = newNodeImpl( node_next_id);\n    node_p->setElement( e);\n    return node_p;\n}\n\n/**\n * Create edge between two nodes.\n * We do not support creation of edge with undefined endpoints\n */\ninline Edge * \nGraph::newEdgeImpl( Node * pred, Node * succ)\n{\n    /**\n     * Check that we have available edge id \n     */\n    assertd( edge_next_id < GRAPH_MAX_NODE_NUM);\n    Edge *edge_p = this->createEdge( edge_next_id++, pred, succ);\n    edge_p->attach( EDGE_LIST_GRAPH, first_edge);\n    first_edge = edge_p;\n    edge_num++;\n    return edge_p;\n}\n\n/**\n * Create edge between two nodes.\n * We do not support creation of edge with undefined endpoints\n */\ninline Edge * \nGraph::newEdge( Node * pred, Node * succ)\n{\n    Edge *edge_p = newEdgeImpl( pred, succ);\n    edge_p->setElement( createElement( \"edge\"));\n    documentElement().appendChild( edge_p->elem());\n    return edge_p;\n}\n\n/**\n * Create edge between two nodes.\n * We do not support creation of edge with undefined endpoints\n */\ninline Edge * \nGraph::newEdge( Node * pred, Node * succ, QDomElement e)\n{\n    Edge *edge_p = newEdgeImpl( pred, succ);\n    edge_p->setElement( e);\n    return edge_p;\n}\n\n\n#endif /** GRAPH_INLINE_H */\n"
  },
  {
    "path": "showgraph/Graph/marker.h",
    "content": "/**\n * @file: marker.h \n * Interface and implementation of marker functionality.\n *\n * @defgroup Mark Markers\n *\n * @ingroup GraphBase\n *\n * Markers are used to mark objects. An object can be marked with several markers.\n * For each marker we can test if an object is marked with it.\n * To use this functinality you have to subclass Marked class to obtain marked \n * object and subclass MarkerManager class to create and free markers.\n *\n * When implementing an algorithm with markers you first create it by MarkerManager::newMarker(),\n * pass it around in your algorithm marking objects with Marked::mark() and testing them with \n * Marked::isMarked(). After your done free marker with MarkerManager::freeMarker().\n * Example:\n **@code\n //Derive your class from Marked\n class Obj: public Marked\n {\n pubic:\n     void someAction();\n     ...\n }\n //Derive class that controls Obj's instances from MarkerManager\n class ObjManager: public MarkerManager\n {\n     // QList from Qt's containers\n     QList<Obj *> objs;\n  \n     //Required reimplementation\n     void clearMarkersInObjects()\n     {\n         // Qt's macros for accessing each object in a container\n         foreach ( Obj *obj, objs)\n         {\n             clearUnusedMarkers( obj);\n         }\n     }\n public: \n    Obj *newObj(){...}\n    QList<Obj *> getObjects(){...};\n }\n //Usage\n void func()\n {\n     ObjManager man;\n     Marker m = man.newNum(); // Acquire marker\n     for ( unsigned int i = 0; i < 100; i++)\n     {\n         Obj* obj = man.newObj();\n         obj->mark( m); // Mark object\n     }\n     foreach ( Obj *obj, man.getObjects())\n     {\n         if ( obj->isMarked( m)) // Check if object is marked\n            obj->someAction();\n     }\n     man.freeMarker( m); // Free marker\n }\n @endcode\n * @sa Nums\n */\n/*\n * Graph library, internal representation of graphs in ShowGraph tool.\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n/** \n * Marker index type\n * @ingroup Mark\n */\ntypedef unsigned short int MarkerIndex;\n/**\n * Marker value type\n * @ingroup Mark\n */\ntypedef unsigned int MarkerValue;\n\n/**\n * Possible marker errors\n *\n * @ingroup Mark\n */\ntypedef enum MarkerErrorType_e\n{\n    /** Some error occured */\n    M_ERROR_GENERIC,\n    /** We've ran out of indexes. Someone forgot to free markers? */\n    M_ERROR_OUT_OF_INDEXES,\n    /** We're out of values. Seems to be interanl error of marker class.*/\n    M_ERROR_OUT_OF_VALUES,\n    /** Number of error types */\n    M_ERROR_NUM\n} MarkerErrorType;\n\n/* Marker-related constants */\n/**\n * How many markers are allowed simultaneously\n * @ingroup Mark\n */\nconst short int MAX_GRAPH_MARKERS = 10;\n/**\n * Clean value of markers\n * @ingroup Mark\n */\nconst MarkerValue GRAPH_MARKER_CLEAN = 0;\n/**\n * First value of markers\n * @ingroup Mark\n */\nconst MarkerValue GRAPH_MARKER_FIRST = 1;\n/**\n * Last value of markers \n * @ingroup Mark\n */\nconst MarkerValue GRAPH_MARKER_LAST = ( MarkerValue)( (int)-1);\n\n/**\n * Marker description\n *\n * @ingroup Mark\n */\nclass Marker\n{\npublic:\n    /** Default contructor */\n    inline Marker();\nprivate:    \n    /** Markers index */\n    MarkerIndex index;\n    /** Value */\n    MarkerValue value;\n\n    /** Two classes have acces to marker internals. All others do not. */\n    friend class Marked;\n    friend class MarkerManager;\n};\n\n/**\n * Default constructor\n */\ninline Marker::Marker(): \n    index( MAX_GRAPH_MARKERS), value( GRAPH_MARKER_CLEAN)\n{\n\n}\n\n/**\n * Represents a marked object\n *\n * @ingroup Mark\n */\nclass Marked\n{\npublic:\n    /** Default constructor */\n\tinline Marked();\n\n    /** Mark node with marker. Return false if node is already marked. True otherwise. */\n    inline bool mark( Marker marker);\n\n    /** Return true if node is marked with this marker */\n    inline bool isMarked( Marker marker);\n\n    /** Return true if node has been marked with this marker and unmarks it */\n    inline bool unmark( Marker marker);\n    \n    /** Clears value for given index */\n    inline void clear( MarkerIndex i);\nprivate:\n    /** Markers */\n    MarkerValue markers[ MAX_GRAPH_MARKERS];\n};\n\n    \n/**\n * Default constructor\n */\ninline Marked::Marked()\n{\n    MarkerIndex i;\n\n    /** Initialize markers */\n    for ( i = 0; i < MAX_GRAPH_MARKERS; i++)\n    {\n        markers [ i] = GRAPH_MARKER_CLEAN;\n    }\n}\n\n/**\n * mark node with marker. Return false if node is already marked. True otherwise.\n */\ninline bool Marked::mark( Marker marker)\n{\n    if ( markers[ marker.index] == marker.value)\n    {\n        return false;\n    }\n    markers[ marker.index] = marker.value;\n    return true;\n}\n\n/**\n * Return true if node is marked with this marker\n */\ninline bool Marked::isMarked( Marker marker)\n{\n    if ( markers[ marker.index] == marker.value)\n    {\n        return true;\n    }\n    return false;\n}\n\n/**\n * Return true if node has been marked with this marker and unmarks it\n */\ninline bool Marked::unmark( Marker marker)\n{\n    if ( markers[ marker.index] == marker.value)\n    {\n        markers[ marker.index] = GRAPH_MARKER_CLEAN;\n        return true;\n    }\n    return false;\n}\n\n/**\n * Clears value for given index\n */\ninline void Marked::clear( MarkerIndex i)\n{\n       markers[ i] = GRAPH_MARKER_CLEAN;\n}\n\n/**\n * Class that creates/frees markers\n *\n * @ingroup Mark\n */\nclass MarkerManager\n{\npublic:\n\n    /** Default Constructor */\n    MarkerManager();\n    \n    /**\n     * Acquire new marker. Markers MUST be freed after use,\n     * otherwise you run to markers number limit.\n     */\n    Marker newMarker();\n    \n    /** Free marker */\n    void freeMarker( Marker m);\n\nprotected:\n    /**\n     * Clears unused markers in given object\n     */\n    void clearUnusedMarkers( Marked *m_obj);\nprivate:\n    /** Find free index */\n    inline MarkerIndex findFreeIndex();\n    \n    /** Increment marker value */\n    inline MarkerValue nextValue();\n    \n    /** Clear markers in marked objects, MUST BE implemented in inhereted class */\n    virtual void clearMarkersInObjects() = 0;\n\n    /** Check if this value is busy */\n    inline bool isValueBusy( MarkerValue val);\n    \n    /** Return next free value */\n    inline MarkerValue findNextFreeValue();\n\n    /** Marker values for each index */\n    MarkerValue markers[ MAX_GRAPH_MARKERS];\n    \n    /** Usage flags for each index */\n    bool is_used[ MAX_GRAPH_MARKERS];\n    \n    /** Last free value */\n    MarkerValue last;\n};\n\n/**\n * Find free index\n */\ninline MarkerIndex \nMarkerManager::findFreeIndex()\n{\n    MarkerIndex i = 0;\n    /** Search for free marker index */\n    for ( i = 0; i < MAX_GRAPH_MARKERS; i++)\n    {\n        if ( !is_used [ i])\n        {\n            return i;\n        }\n    }\n    throw M_ERROR_OUT_OF_INDEXES;\n    return i;\n}\n\n/**\n * Increment marker value\n */\ninline MarkerValue \nMarkerManager::nextValue()\n{\n    if ( last == GRAPH_MARKER_LAST)\n    {\n        last = GRAPH_MARKER_FIRST;\n    } else\n    {\n        last++;\n    }\n    return last;\n}\n\n/**\n * Check if this value is busy\n */\ninline bool \nMarkerManager::isValueBusy( MarkerValue val)\n{\n    /** Check all markers */\n    for ( MarkerIndex i = 0; i < MAX_GRAPH_MARKERS; i++)\n    {\n        if ( is_used [ i] && markers[ i] == val)\n            return true;\n    }\n    return false;\n}\n\n/**\n * Return next free value\n */\ninline MarkerValue \nMarkerManager::findNextFreeValue()\n{\n    MarkerIndex i = 0;\n    bool reached_limit = false;\n    MarkerValue res = last;\n    \n    while( isValueBusy( res))\n    {\n        /** \n         * If we reached checked GRAPH_MARKER_LAST twice,\n         * then we are in infinite loop and for some reason we don't free our markers\n         */\n        if ( res == GRAPH_MARKER_LAST)\n        {\n            /*assert< MarkerErrorType> ( !reached_limit, \n                                       M_ERROR_OUT_OF_VALUES);*/\n            clearMarkersInObjects();\n            reached_limit = true;            \n        }\n        res = nextValue();\n    }\n    return res;\n}\n\n/**\n * Clears unused markers in given object\n */\ninline void \nMarkerManager::clearUnusedMarkers( Marked *m_obj)\n{\n    for ( MarkerIndex i = 0; i < MAX_GRAPH_MARKERS; i++)\n    {\n        if ( !is_used [ i])\n            m_obj->clear( i);\n    }\n}\n\n/**\n * Default Constructor\n */\ninline MarkerManager::MarkerManager()\n{\n    MarkerIndex i;\n\n    /** Initialize markers */\n    for ( i = 0; i < MAX_GRAPH_MARKERS; i++)\n    {\n        markers [ i] = GRAPH_MARKER_CLEAN;\n        is_used [ i] = false;\n    }\n    last = GRAPH_MARKER_FIRST;\n}\n\n/**\n * Acquire new marker. Markers MUST be freed after use,\n * otherwise you run to markers number limit.\n */\ninline Marker MarkerManager::newMarker()\n{\n    try {\n        Marker new_marker;\n            \n        new_marker.index = findFreeIndex();\n        is_used[ new_marker.index] = true;\n        new_marker.value = findNextFreeValue();\n        markers[ new_marker.index] = new_marker.value;\n        return new_marker;\n    } catch ( MarkerErrorType type)\n    {\n        /** Handle errors */\n        switch ( type)\n        {\n            case M_ERROR_GENERIC:    \n            default:\n                assertd(0);\n        }\n        assertd(0);\n    }\n    return newMarker();\n}\n/**\n * Free marker\n */\ninline void MarkerManager::freeMarker( Marker m)\n{\n    is_used[ m.index] = false;\n}\n"
  },
  {
    "path": "showgraph/Graph/node.cpp",
    "content": "/**\n * @file: node.cpp\n * Node class implementation\n */\n/*\n * Graph library, internal representation of graphs in ShowGraph tool.\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n/** \n * Destructor. Corrects list of nodes in corresponding graph and deletes adjacent edges\n */\n#include \"graph_iface.h\"\n\nNode::~Node()\n{\n    Edge *edge;\n    //out(\"Deleted Node\");\n\n    /** delete incidient edges */\n    for ( edge = firstSucc(); isNotNullP( edge);)\n    {\n        Edge* next = edge->nextSucc();\n        //edge->detachFromNode( GRAPH_DIR_DOWN);// Edge is detached from succ node\n        graph()->deleteEdge( edge);\n        edge = next;\n    }\n    for ( edge = firstPred(); isNotNullP( edge);)\n    {\n        Edge* next = edge->nextPred();\n        //edge->detachFromNode( GRAPH_DIR_UP);// Edge is detached from pred node\n        graph()->deleteEdge( edge);\n        edge = next;\n    }\n    \n    element.parentNode().removeChild( element);\n\n    /** delete myself from graph */\n    graph_p->detachNode( this);\n}\n\n/**\n * Print node in Dot format to stdout\n */\nvoid\nNode::debugPrint()\n{\n    out(\"%llu;\", id());\n}\n"
  },
  {
    "path": "showgraph/Graph/node.h",
    "content": "/**\n * @file: node.h \n * Node class definition\n */\n/*\n * Graph library, internal representation of graphs in ShowGraph tool.\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#pragma once\n#ifndef NODE_H\n#define NODE_H\n\n#include \"node_iter.h\"\n\n/**\n * @class Node\n * @brief Representation of graph node. \n *\n * @ingroup GraphBase\n * \n * @par\n * A graph node has two lists of edges which represent predecessors and successors. \n * Node's predecessors and successors can be traversed by using three interfaces:\n * -# Get first edge in direction of interest via firstSucc(),firstPred() and then \n *    use Edge's interface Edge::nextSucc(), Edge::nextPred()\n * -# Use iterators Node::Succ and Node::Pred wich are used for successor and predecessor traversal of edges. \n *    Routines succsBegin(), succsEnd(), predsBegin() and predsEnd() are used for creating iterators.\n * -# EdgeIter can be used for iterating trough all node's adjacent edges without respect to \n *    their direction.\n * \n * @code\n  // Traversing edges simple\n  for ( Edge* e = firstPred();\n        isNotNullP( e);\n        e = e->nextPred())\n  {\n     ...\n  }\n  //Same using macro foreachPred\n  Edge* e; \n  foreachPred( e, node)\n  {\n     ...\n  }\n  //Traversal via iterators\n  for ( Node::Succ s = node->succsBegin(),\n                   s_end = node->succsEnd();\n        s != s_end;\n        s++ )\n  {\n     ...\n  }\n  @endcode\n * @par\n * A node can be @ref Marked \"marked\" and @ref Numbered \"numbered\". @ref Mark \"Markers\" and\n * @ref Nums \"numerations\" are managed by @ref Graph \"graph\". Note that @ref Edge \"edges\" can be marked with the\n * same marker or numbered in the same numeration.\n * \n * @par\n * All nodes in graph are linked in a list. Previous and next nodes can be obtained\n * through prevNode and nextNode routines. Also for debug purposes all nodes in a graph\n * have unique id, which can be usefull for printing to console or setting breakpoint conditions.\n *\n * @par\n * A node resides in memory pool that is controlled by Graph. Operator new can't be called \n * directly. Nodes can be only created by newNode method of Graph class. \n *\n * @par\n * Nodes have associated QDomElement for XML export support. The updateElement() routine should be called before \n * export to get element in sync with node's properties.\n *\n * @sa Graph\n * @sa Edge\n * @sa Mark\n * @sa Nums\n */\nclass Node: public Marked, public Numbered, public PoolObj, public SListIface< Node>\n{\npublic:\n    /**\n     * @brief Destructor.\n     * Destructs the node. Operator delete shouldn't be called directly.\n     * Use Graph::deleteNode for freeing memory and destruction\n     */\n    virtual ~Node();\n    \n    inline QDomElement elem() const;           /**< Return corresponding element */\n    inline void setElement( QDomElement elem); /**< Set element                  */\n\n    inline GraphUid id() const;  /**< Get node's unique ID           */\n    inline Graph * graph() const;/**< Get node's corresponding graph */\n    inline Node* nextNode();     /**< Next node in graph's list      */\n    inline Node* prevNode();     /**< Prev node in graph's list      */\n    \n    /** Add edge to node in specified direction */\n    inline void AddEdgeInDir( Edge *edge, GraphDir dir);\n    \n    inline void AddPred( Edge *edge); /**< Add predecessor edge */\n    inline void AddSucc( Edge *edge); /**< Add successor edge   */\n \n    /** Get first edge in given direction */\n    inline Edge* firstEdgeInDir( GraphDir dir);\n    \n    inline Edge* firstSucc(); /**< Get first successor edge    */\n    inline Edge* firstPred(); /**< Get first predecessor edge  */\n     \n    /** Deletion of edge in specified direction */\n    void deleteEdgeInDir( GraphDir dir, Edge* edge);\n\n    inline void deletePred( Edge* edge); /**< Delete predecessor edge */\n    inline void deleteSucc( Edge* edge); /**< Delete successor edge   */\n    \n    virtual void debugPrint(); /**< Print node in DOT format to stdout */\n\n    virtual void updateElement();                    /**< Update DOM element       */ \n    virtual void readFromElement( QDomElement elem); /**< Read properties from XML */\n\n    /* Iterator types */\n    typedef EdgeIterIface< SuccIterImpl> Succ;      /**< Iterator for successors       */\n    typedef EdgeIterIface< PredIterImpl> Pred;      /**< Iterator for predecessors     */\n    typedef EdgeIterIface< UnDirIterImpl> EdgeIter; /**< Undirected iterator for edges */\n     \n    inline Succ succsBegin(); /**< Create iterator for first succ       */\n    inline Succ succsEnd();   /**< Create iterator pointing to succ end */\n    \n    inline Pred predsBegin(); /**< Create iterator for first succ       */\n    inline Pred predsEnd();   /**< Create iterator pointing to succ end */\n\n    inline EdgeIter edgesBegin(); /**< Create iterator for first succ       */\n    inline EdgeIter edgesEnd();   /**< Create iterator pointing to succ end */\n\nprotected:\n    /** We can't create nodes separately, do it through newNode method of graph */\n    inline Node( Graph *_graph_p, GraphUid _id);\nprivate:\n\t/** Graph class controls nodes */\n    friend class Graph;\t\n    \n    /** Detach this node from graph's node list */\n    inline void detachFromGraph();\n\n    /** Representation in document */\n    QDomElement element;\n\n    /* Connection with inclusive graph */\n    GraphUid uid;   /**< Unique id        */\n    Graph * graph_p;/**< Pointer to graph */\n\n    /** First edges in graph's directions */\n    Edge *first_edge[ GRAPH_DIRS_NUM];\n};\n\n#endif /* NODE_H */\n"
  },
  {
    "path": "showgraph/Graph/node_inline.h",
    "content": "/**\n * @file: node_inline.h\n * Implementation of Node and related classes' inline routines\n */\n/*\n * Graph library, internal representation of graphs in ShowGraph tool.\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#pragma once\n#ifndef NODE_INLINE_H\n#define NODE_INLINE_H\n\n/** We can't create nodes separately, do it through newNode method of graph */\ninline Node::Node( Graph *_graph_p, GraphUid _id):uid(_id), graph_p( _graph_p), element()\n{\n    first_edge[ GRAPH_DIR_UP] = NULL;\n    first_edge[ GRAPH_DIR_DOWN] = NULL;\n}\n\n/**\n * Detach myself from graph's node list\n */\ninline void Node::detachFromGraph()\n{\n    detach();\n}\n\n/** Return corresponding element */\ninline QDomElement Node::elem() const\n{\n    return element;\n}\n/**\n * Set element\n */\ninline void Node::setElement( QDomElement elem)\n{\n    element = elem;\n}\n\n/**\n * Get node's unique ID\n */\ninline GraphUid Node::id() const\n{\n    return uid;\n}\n\n/**\n * Get node's corresponding graph\n */\ninline Graph * Node::graph() const\n{\n    return graph_p;\n}\n/**\n * Next node in graph's list\n */\ninline Node* Node::nextNode()\n{\n    return next();\n}\n\n/**\n * Prev node in graph's list\n */\ninline Node* Node::prevNode()\n{\n    return prev();\n}\n\n/**\n * Add predecessor edge\n */\ninline void Node::AddPred( Edge *edge)\n{\n    AddEdgeInDir( edge, GRAPH_DIR_UP);\n}\n\n/**\n * Add successor edge\n */\ninline void Node::AddSucc( Edge *edge) \n{\n    AddEdgeInDir( edge, GRAPH_DIR_DOWN);\n}\n/**\n * First edge in given direction\n */\ninline Edge* Node::firstEdgeInDir( GraphDir dir)\n{\n    return first_edge[ dir];\n}\n/** \n * First successor edge\n */\ninline Edge* Node::firstSucc()\n{\n    return firstEdgeInDir( GRAPH_DIR_DOWN);\n}\n/** \n * First predecessor edge\n */\ninline Edge* Node::firstPred()\n{\n    return firstEdgeInDir( GRAPH_DIR_UP);\n}\n\n/**\n * delete predecessor edge\n */\ninline void Node::deletePred( Edge* edge)\n{\n    deleteEdgeInDir( GRAPH_DIR_UP, edge);\n}\n\n/**\n * delete successor edge\n */\ninline void Node::deleteSucc( Edge* edge)\n{\n    deleteEdgeInDir( GRAPH_DIR_DOWN, edge);\n}\n\n/**\n * Create iterator for first succ\n */\ninline Node::Succ Node::succsBegin()\n{\n    return Succ( this);\n}\n\n/**\n * Create iterator pointing to succ end\n */\ninline Node::Succ Node::succsEnd()\n{\n    return Succ();\n}\n/**\n * Create iterator for first succ\n */\ninline Node::Pred Node::predsBegin()\n{\n    return Pred( this);\n}\n/**\n * Create iterator pointing to succ end\n */\ninline Node::Pred Node::predsEnd()\n{\n    return Pred();\n}\n\n/**\n * Create iterator for first succ\n */\ninline Node::EdgeIter Node::edgesBegin()\n{\n    return EdgeIter( this);\n}\n/**\n * Create iterator pointing to succ end\n */\ninline Node::EdgeIter Node::edgesEnd()\n{\n    return EdgeIter();\n}\n\n/**\n * Add an edge to this node in specified direction\n */\ninline void\nNode::AddEdgeInDir( Edge *edge, GraphDir dir)\n{\n    assertd( isNotNullP( edge));\n    GRAPH_ASSERTD( (int) GRAPH_DIR_DOWN == (int) EDGE_LIST_SUCCS,\n                   \"Enums of direction and edge lists are not having right values\");\n    GRAPH_ASSERTD( (int) GRAPH_DIR_UP == (int) EDGE_LIST_PREDS,\n                   \"Enums of direction and edge lists are not having right values\");\n    edge->attach( dir, first_edge[ dir]); \n    first_edge[ dir] = edge;\n}\n\n/**\n * delete edge pointed by iterator in specidied direction\n */\ninline void\nNode::deleteEdgeInDir( GraphDir dir, Edge* edge)\n{\n    assertd( isNotNullP( edge));\n    if( first_edge[ dir] == edge)\n    {\n        first_edge[ dir] = edge->nextEdgeInDir( dir);\n    }\n}\n\n/**\n * Update DOM tree element\n */\ninline void\nNode::updateElement()\n{\n    element.setAttribute( \"id\", id());\n}\n\n/**\n * read properties from DOM tree element\n */\ninline void\nNode::readFromElement( QDomElement e)\n{\n    element = e;\n}\n\n/** Default Constructor: creates 'end' iterator */\ntemplate < class EdgeIterImpl>\ninline EdgeIterIface< EdgeIterImpl>::EdgeIterIface()\n{\n\n}\n\n/** Constructor from node: iterator points on first edge, i.e. 'begin' iterator */\ntemplate < class EdgeIterImpl>\ninline EdgeIterIface< EdgeIterImpl>::EdgeIterIface( Node *n):\n    impl( n)\n{\n\n}\n\n/** Copy constructor */\ntemplate < class EdgeIterImpl> \ninline EdgeIterIface< EdgeIterImpl>::EdgeIterIface( const EdgeIterIface& proto)\n{\n    impl = proto.impl;\n}\n\n/** Destructor */\ntemplate < class EdgeIterImpl> \ninline EdgeIterIface< EdgeIterImpl>::~EdgeIterIface()\n{\n\n}\n\n/** Postincrement operator */\ntemplate < class EdgeIterImpl>\ninline EdgeIterIface< EdgeIterImpl> \nEdgeIterIface< EdgeIterImpl>::operator++( int)\n{\n\tEdgeIterIface tmp = *this;\n    ++*this;\n    return tmp;\n}\n\n/** Dereferenece operator*/\ntemplate < class EdgeIterImpl>\ninline Edge * \nEdgeIterIface< EdgeIterImpl>::operator*()\n{\n    return impl.edge();\n}\n    \n/** Comparison operator */\ntemplate < class EdgeIterImpl> \ninline bool\nEdgeIterIface< EdgeIterImpl>::operator==(const EdgeIterIface< EdgeIterImpl>& o) const\n{\n    return impl == o.impl;\n} \n\n/** Not equals operator */\ntemplate < class EdgeIterImpl>\ninline bool\nEdgeIterIface< EdgeIterImpl>::operator!=(const EdgeIterIface< EdgeIterImpl>& o) const\n{\n    return !(*this == o);\n}\n\n/** Get Edge */\ntemplate < class EdgeIterImpl>\ninline Edge *\nEdgeIterIface< EdgeIterImpl>::edge() const\n{\n    return impl.edge();\n}\n\n/** Get Edge */\ntemplate < class EdgeIterImpl>\ninline Node *\nEdgeIterIface< EdgeIterImpl>::node() const\n{\n    return impl.node();\n}\n\n/** Preincrement operator */\ntemplate < class EdgeIterImpl>\ninline EdgeIterIface< EdgeIterImpl> & \nEdgeIterIface< EdgeIterImpl>::operator++()\n{\n    GRAPH_ASSERTD( isNotNullP( impl.edge()), \"Edge iterator is at end ( NULL in edge pointer)\");\n    impl.nextEdge();\n    return *this;\n}\n\n/** Next pred */\ninline void PredIterImpl::nextEdge()\n{\n    GRAPH_ASSERTD( isNotNullP( edge_p), \"Edge iterator is at end ( NULL in edge_p pointer)\");\n    edge_p = edge_p->nextPred();\n}\n\n\n/** Next succ */\ninline void SuccIterImpl::nextEdge()\n{\n    GRAPH_ASSERTD( isNotNullP( edge_p), \"Edge iterator is at end ( NULL in edge_p pointer)\");\n    edge_p = edge_p->nextSucc();\n}\n\n/** Preincrement operator */\ninline void UnDirIterImpl::nextEdge()\n{\n    GRAPH_ASSERTD( isNotNullP( edge_p), \"Edge iterator is at end ( NULL in edge_p pointer)\");\n    \n    if ( is_pred && isNullP( edge_p->nextPred()))\n    {\n        is_pred = false;\n        edge_p = edge_p->succ()->firstSucc();\n    } else\n    {\n        if ( is_pred)\n        {\n            edge_p = edge_p->nextPred();\n        } else\n        {\n            edge_p = edge_p->nextSucc();\n        }\n    }\n}\n\n/** Get node on the end of edge */\ninline Node * SuccIterImpl::node() const\n{\n    return edge()->succ();\n}\n\n/** Get node on the end of edge */\ninline Node * PredIterImpl::node() const\n{\n    return edge()->pred();\n}\n\n/** Get node in UnDir traversal of node's edges */\ninline Node * UnDirIterImpl::node() const\n{\n    if ( is_pred)\n    {\n        return edge()->pred();\n    } else\n    {\n        return edge()->succ();\n    }    \n}\n\n/** Constructor gets first succ */\ninline SuccIterImpl::SuccIterImpl( Node *n)\n{\n    edge_p = n->firstSucc();\n}\n\n/** Constructor gets first pred */\ninline PredIterImpl::PredIterImpl( Node *n)\n{\n    edge_p = n->firstPred();\n}\n\n\n/** Constructor gets first edge for undirected edges iteration */\ninline UnDirIterImpl::UnDirIterImpl( Node *n)\n{\n    edge_p = n->firstPred();\n    is_pred = true;\n    if ( isNullP( edge_p)) \n    {\n        is_pred = false;\n        edge_p = n->firstSucc();\n    } \n}\n\n#endif /* NODE_INLINE_H */\n"
  },
  {
    "path": "showgraph/Graph/node_iter.h",
    "content": "/**\n * @file: node_iter.h\n * Declaration of iterators for node's adjacent edges traversal and related classes\n */\n/*\n * Graph library, internal representation of graphs in ShowGraph tool.\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#pragma once\n#ifndef NODE_ITER_H\n#define NODE_ITER_H\n\n\n/** Baseclass for implementing iterator template parameters */\nclass IterImplBase\n{\npublic:\n    /** Get edge */\n    inline Edge* edge() const { return edge_p;}\n    /** Set edge */\n    inline void setEdge( Edge *e){ edge_p = e;}\n    /** Default constructor */\n    inline IterImplBase(): edge_p( NULL) {}\nprotected:\n    Edge *edge_p;\n};\n\n/** Parameter for iterator template specialization (pred traversal) */\nclass PredIterImpl: public IterImplBase\n{\npublic:\n    inline void nextEdge();       /**< Move on to the next pred */\n    inline Node *node() const;    /**< Get node */\n    inline PredIterImpl(){};      /**< Default constructor */\n    inline PredIterImpl( Node *n);/**< Configures iterator with node's first pred */\n    inline bool operator==(const PredIterImpl& o) const /**< Comparison operator */\n    { \n        return edge_p == o.edge_p;\n    }\n};\n/** Parameter for iterator template specialization (succ traversal) */\nclass SuccIterImpl: public IterImplBase\n{\npublic:\n    inline void nextEdge();       /**< Move on to the next succ */\n    inline Node *node() const;    /**< Get node */\n    inline SuccIterImpl(){};      /**< Default constructor */\n    inline SuccIterImpl( Node *n);/**< Configures iterator with node's first succ */\n    inline bool operator==(const SuccIterImpl& o) const /**< Comparison operator */\n    { \n        return edge_p == o.edge_p;\n    }\n};\n\n/** Parameter for iterator template specialization (undirected traversal) */\nclass UnDirIterImpl: public IterImplBase\n{\npublic:\n    inline void nextEdge();        /**< Move on to the next edge */\n    inline Node *node() const;     /**< Get node */\n    inline UnDirIterImpl():is_pred( false){};      /**< Default consturctor */\n    inline UnDirIterImpl( Node *n);/**< Configures iterator with node's first edge */\n    inline bool operator==(const UnDirIterImpl& o) const /**< Comparison operator */\n    { \n        return edge_p == o.edge_p \n               && is_pred == o.is_pred;\n    }\nprivate:\n    bool is_pred;\n};\n\n/**\n * Convinience template for iterating through node's adjacent edges\n */\ntemplate < class EdgeIterImpl> class EdgeIterIface\n{   \npublic:\n    /** Default constructor */\n    inline EdgeIterIface();\n    /** Copy constructor */\n    inline EdgeIterIface( const EdgeIterIface& proto);\n    /** Destructor */\n    inline ~EdgeIterIface();\n    /** Preincrement operator */\n    inline EdgeIterIface & operator++();\n    /** Postincrement operator */\n    inline EdgeIterIface operator++( int);\n    /** Dereferenece operator*/\n    inline Edge * operator*();\n    /** Comparison operator */\n    inline bool operator==(const EdgeIterIface& o) const; \n    /** Not equals operator */\n    inline bool operator!=(const EdgeIterIface& o) const;\n    /** Get Edge */\n    inline Edge *edge() const;\n    /** Get node on the end of edge */\n    inline Node *node() const;\nprivate:\n    /** Constructor from node */\n    inline EdgeIterIface( Node *e);\n    friend class Node;\n\n    /** Parameter-dependent implementation */\n    EdgeIterImpl impl;\n};\n\n#endif"
  },
  {
    "path": "showgraph/Graph/num.h",
    "content": "/**\n * @file: num.h \n * Interface and implementation of numeration functionality.\n *\n * @defgroup Nums Numeration of objects\n *\n * @ingroup GraphBase\n * Numerations can be used to assign numbers to objects.\n *\n * @par\n * In application to graphs a numeration is a mapping of graph's nodes and/or edges to \n * numbers. A node or an edge can be assigned a number in several different numerations. So\n * when we number them we say what numeration we are dealing with. Numeration class describes\n * one particular numeration. It is used as a parameter for functions like Numbered::number()\n * or Numbered::setNumber()\n *\n * @par\n * Usage model is following. To make an object numerable you derive it from Numbered class.\n * Then if you have some class representing a container for this objects you derive it from\n * the NumManager class. When you want to numerate objects derived from Numbered you ask\n * NumManager-derived object for a new numeration using NumManager::newNum(). Then use\n * Numbered::setNumber() and Numbered::number() to number objects and retrieve object number.\n * When you done with using numbers free the numeration by calling NumManager::freeNum().\n *@code\n //Derive your class from Numbered\n class Obj: public Numbered\n {\n pubic:\n     void someAction();\n     ...\n }\n //Derive class that controls Obj's instances from NumManager\n class ObjManager: public NumManager\n {\n     // QList from Qt's containers\n     QList<Obj *> objs;\n  \n     //Required reimplementation\n     void clearNumerationsInObjects()\n     {\n         // Qt's macros for accessing each object in a container\n         foreach ( Obj *obj, objs)\n         {\n             clearUnusedNumerations( obj);\n         }\n     }\n public: \n    Obj *newObj(){...}\n    QList<Obj *> getObjects(){...};\n }\n //Usage\n void func()\n {\n     ObjManager man;\n     Numeration num = man.newNum(); // Acquire numeration\n     for ( unsigned int i = 0; i < 100; i++)\n     {\n         Obj* obj = man.newObj();\n         obj->setNumber( num, i % 2); // Assign number to object\n     }\n     foreach ( Obj *obj, man.getObjects())\n     {\n         if ( obj->number( num)) // Get object's number\n            obj->someAction();\n     }\n     man.freeNum( num); // Free numeration\n }\n @endcode\n * You can have not more than MAX_NUMERATIONS at one time so if you forget to \n * free a numeration you'll run into exception telling you that there are no free numeration\n * indices left.\n *\n * @sa Mark\n */\n/*\n * Graph library, internal representation of graphs in ShowGraph tool.\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * Numeration index type\n * @ingroup Nums\n */\ntypedef unsigned short int NumIndex;\n/**\n * Numeration value type\n * @ingroup Nums\n */\ntypedef unsigned int NumValue;\n\n/**\n * Possible num errors\n *\n * @ingroup Nums\n */\nenum NumErrorType\n{\n    /** Some error occured */\n    NUM_ERROR_GENERIC,\n    /** We've ran out of indexes. Someone forgot to free nums? */\n    NUM_ERROR_OUT_OF_INDEXES,\n    /** We're out of values. Seems to be interanl error of num class.*/\n    NUM_ERROR_OUT_OF_VALUES,\n    /** Number is too big */\n    NUM_ERROR_NUMBER_OUT_OF_RANGE,\n    /** Number of error types */\n    NUM_ERROR_NUM\n};\n\n/* Num-related constants */\n/** \n * Number of numerations allowed simultaneously  \n * @ingroup Nums\n */\nconst short int MAX_NUMERATIONS = 10;\n/** \n * Clean value\n * @ingroup Nums\n */\nconst NumValue NUM_VAL_CLEAN = 0;\n/** \n * First value\n * @ingroup Nums\n */\nconst NumValue NUM_VAL_FIRST = 1;\n/**\n * Last value\n * @ingroup Nums\n */\nconst NumValue NUM_VAL_LAST = ( NumValue)( (int)-1);\n/**\n *\n * Value that means object is unnumbered\n * @ingroup Nums\n */\nconst GraphNum NUMBER_NO_NUM = ( GraphNum) -1;\n/**\n * Maximal number of object\n * @ingroup Nums\n */\nconst GraphNum NUMBER_MAX = (( GraphNum) -1) - 1;\n\n/**\n * @class Numeration\n * @ingroup Nums\n * @brief Numeration description. \n *\n * @par\n * In application to graphs a numeration is a mapping of graph's nodes and/or edges to \n * numbers. A node or an edge can be assigned a number in several different numerations. So\n * when we number them we say what numeration we are dealing with. Numeration class describes\n * one particular numeration. It is used as a parameter for functions like Numbered::number()\n * or Numbered::setNumber(). \n *\n * @par Some Implemetation Details\n * Numeration is created by NumManager class which ensures that numeration's index is used \n * for this particular numeration only and gives it new value. Value field is used for \n * comparison in routines like Numbered::isNumbered(). Value in numeration is compared to value\n * stored in @ref Numbered \"numbered\" object in array position pointed by numeration's index.\n * \n * @sa Nums\n */\nclass Numeration\n{\npublic:\n    /** Default constructor */\n    inline Numeration();\nprivate:\n    \n    /** Nums index */\n    NumIndex index;\n    /** Value */\n    NumValue value;\n\n    /* Two classes have acces to num internals. All others do not. */\n    friend class Numbered;\n    friend class NumManager;\n};\n\n/** Default constructor */\ninline Numeration::Numeration():\n    index( MAX_NUMERATIONS), value( NUM_VAL_CLEAN)\n{\n\n}\n\n/**\n * @class Numbered\n * @brief Represents an object that can be involved in several numerations\n *\n * @ingroup Nums\n * \n * To assign numbers to objects you often have to incorporate it into object's implementation or \n * make some sort of mapping of objects to numbers. The Numbered class can store several numbers\n * simultaneously so it can be member of several numerations at the same time. Being a part of\n * numeration an object can be: numbered or unnumbered. Object becomes numbered when a number is\n * given to it. Until then object is unnumbered. It is also possible to wipe the number from object\n * by calling unNumber(). Most routines have the @ref Numeration \"numeration\" parameter. It \n * describes numeration of interest and is obtained from a @ref NumManager \"numeration manager\".\n */\nclass Numbered\n{\npublic:\n    /** Constructor */\n    Numbered();\n\n    /** Assign a number to object. Return false if object is already numbered. True otherwise. */\n    inline bool setNumber( Numeration num, GraphNum new_number);\n    \n    /** Return number in given numeration or NO_NUM if it was not numbered yet */\n    inline GraphNum number( Numeration num);\n    \n    /** Return true if node is numbered in this numeration */\n    inline bool isNumbered( Numeration num);\n    \n    /** Return true if node has been numbered in this numeration and unmarks it */\n    inline bool unNumber( Numeration num);\n    \n    /** Clears value for given index */\n    inline void clear( NumIndex i);\nprivate:\n    /** Numeration descriptions */\n    NumValue nums[ MAX_NUMERATIONS];\n\n    /** Number in each numeration */\n    GraphNum numbers[ MAX_NUMERATIONS];\n};\n\n/** Constructor */\ninline Numbered::Numbered()\n{\n    NumIndex i;\n\n    /** Initialize nums */\n    for ( i = 0; i < MAX_NUMERATIONS; i++)\n    {\n        nums [ i] = NUM_VAL_CLEAN;\n    }\n}\n\n/**\n * Assign a number to object. Return false if object is already numbered. True otherwise.\n */\ninline bool \nNumbered::setNumber( Numeration num,\n                     GraphNum new_number)\n{\n    if ( new_number >= NUMBER_MAX)\n        throw NUM_ERROR_NUMBER_OUT_OF_RANGE;\n\n    nums[ num.index] = num.value;\n    numbers[ num.index] = new_number;\n    if ( nums[ num.index] == num.value)\n    {\n        return false;\n    }\n    return true;\n}\n\n/**\n * Return number in given numeration or NO_NUM if it was not numbered yet\n */\ninline GraphNum \nNumbered::number( Numeration num)\n{\n    if ( nums[ num.index] == num.value)\n    {\n        return numbers[ num.index];\n    }\n    return NUMBER_NO_NUM;\n}\n\n/**\n * Return true if node is numbered in this numeration\n */\ninline bool \nNumbered::isNumbered( Numeration num)\n{\n    if ( nums[ num.index] == num.value)\n    {\n        return true;\n    }\n    return false;\n}\n\n/**\n * Return true if node has been numbered in this numeration and unmarks it\n */\ninline bool \nNumbered::unNumber( Numeration num)\n{\n    if ( nums[ num.index] == num.value)\n    {\n        nums[ num.index] = NUM_VAL_CLEAN;\n        return true;\n    }\n    return false;\n}\n    \n/**\n * Clears value for given index\n */\ninline void \nNumbered::clear( NumIndex i)\n{\n       nums[ i] = NUM_VAL_CLEAN;\n}\n\n/**\n * @brief Class that creates/frees numerations\n * @ingroup Nums\n *\n * @par\n * @ref NumManager \"Numeration manager\" creates and frees numerations. You can have up to MAX_NUMERATIONS numerations\n * at a time. A derived class should reimplement clearNumerationsInObjects() routine which calls clearUnusedNumerations\n * for every Numbered-derived object.\n */\nclass NumManager\n{\npublic:\n\n    /** Default Constructor */\n    NumManager();\n    \n    /**\n     * @brief Create new numeration\n     * \n     * Create new numeration. Numerations MUST be freed after use,\n     * otherwise you run to numerations number limit.\n     */\n    Numeration newNum();\n\n    /** Free num */\n    void freeNum( Numeration n);\nprotected:\n    /** Clears unused markers in given object */\n    inline void clearUnusedNumerations( Numbered *n_obj);\nprivate:\n    /** Marker values for each numeration */\n    NumValue nums[ MAX_NUMERATIONS];\n    /** Usage flags for each numeration index */\n    bool is_used[ MAX_NUMERATIONS];\n    /** Last used value */\n    NumValue last;\n\n    /** Find free index */\n    inline NumIndex findFreeIndex();\n    \n    /** Increment num value */\n    inline NumValue nextValue();\n \n    /** Check if this value is busy */\n    inline bool isValueBusy( NumValue val);\n\n    /**\n     * @brief Wipe values and indices that are not in use from numbered objects\n     *\n     * Clear info in objects. MUST BE implemented in inhereted class.\n     * Implementation should call clearUnusedNumerations() for every object that can be numbered\n     */\n    virtual void clearNumerationsInObjects() = 0;\n\n    /** Return next free value */\n    inline NumValue findNextFreeValue();\n};\n\n/** Implementatinal routines */\n/**\n * Find free index\n */\ninline NumIndex NumManager::findFreeIndex()\n{\n    NumIndex i = 0;\n    /** Search for free num index */\n    for ( i = 0; i < MAX_NUMERATIONS; i++)\n    {\n        if ( !is_used [ i])\n        {\n            return i;\n        }\n    }\n    throw NUM_ERROR_OUT_OF_INDEXES;\n    return i;\n}\n\n/**\n * Increment num value\n */\ninline NumValue NumManager::nextValue()\n{\n    if ( last == NUM_VAL_LAST)\n    {\n        last = NUM_VAL_FIRST;\n    } else\n    {\n        last++;\n    }\n    return last;\n}\n\n/**\n * Check if this value is busy\n */\ninline bool NumManager::isValueBusy( NumValue val)\n{\n    /** Check all nums */\n    for ( NumIndex i = 0; i < MAX_NUMERATIONS; i++)\n    {\n        if ( is_used [ i] && nums[ i] == val)\n            return true;\n    }\n    return false;\n}\n\n/**\n * Return next free value\n */\ninline NumValue NumManager::findNextFreeValue()\n{\n    NumIndex i = 0;\n    bool reached_limit = false;\n    NumValue res = last;\n    \n    while( isValueBusy( res))\n    {\n        /** \n         * If we reached checked NUM_VAL_LAST twice,\n         * then we are in infinite loop because for \n         * some reason we don't free our numerations\n         */\n        if ( res == NUM_VAL_LAST)\n        {\n            /*assert< NumErrorType> ( !reached_limit, \n                                       NUM_ERROR_OUT_OF_VALUES);*/\n            clearNumerationsInObjects();\n            reached_limit = true;            \n        }\n        res = nextValue();\n    }\n    return res;\n}\n\n/**\n * Clears unused markers in given object\n */\ninline void NumManager::clearUnusedNumerations( Numbered *n_obj)\n{\n    for ( NumIndex i = 0; i < MAX_NUMERATIONS; i++)\n    {\n        if ( !is_used [ i])\n            n_obj->clear( i);\n    }\n}\n\n/**\n * Default Constructor\n */\ninline NumManager::NumManager()\n{\n    NumIndex i;\n\n    /** Initialize nums */\n    for ( i = 0; i < MAX_NUMERATIONS; i++)\n    {\n        nums [ i] = NUM_VAL_CLEAN;\n        is_used [ i] = false;\n    }\n    last = NUM_VAL_FIRST;\n}\n\n/**\n * Create new numeration\n */\ninline Numeration NumManager::newNum()\n{\n    Numeration new_num;\n        \n    new_num.index = findFreeIndex();\n    is_used[ new_num.index] = true;\n    new_num.value = findNextFreeValue();\n    nums[ new_num.index] = new_num.value;\n    return new_num;\n}\n\n/**\n * Free num\n */\ninline void NumManager::freeNum( Numeration n)\n{\n    is_used[ n.index] = false;\n}\n"
  },
  {
    "path": "showgraph/Graph/predecls.h",
    "content": "/**\n * @file: predecls.h\n * Predeclarations for interface of Graph library\n */\n/*\n * Graph library, internal representation of graphs in ShowGraph tool.\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#ifndef GRAPH_PREDECLS_H\n#define GRAPH_PREDECLS_H\n\n#include <QDomDocument>\n#include <QtGlobal>\n#include <QtGui>\n#include <QList>\n#include <QVector>\n#include <list>\nusing namespace std;\n\n#include \"../Utils/utils_iface.h\"\n\n/* namespaces import */\nusing namespace Utils;\nusing namespace Mem;\n\n/**\n * Debug assert for graph library\n * @ingroup GraphBase\n */\n#if !defined(GRAPH_ASSERTD)\n#    define GRAPH_ASSERTD(cond, what) ASSERT_XD(cond, \"Graph\", what)\n#endif\n\n/**\n * Directions type in graph\n * @ingroup GraphBase\n */\nenum GraphDir\n{\n    /** Upward direction */\n\tGRAPH_DIR_UP = 0,\n\t/** Downward direction */\n    GRAPH_DIR_DOWN = 1,\n\t/** Number of directions in graph */\n    GRAPH_DIRS_NUM = 2\n};\n\n/**\n * Return direction that is reverse to given one\n * @ingroup GraphBase\n */\ninline GraphDir\nRevDir( GraphDir dir)\n{\n    GRAPH_ASSERTD( GRAPH_DIRS_NUM == 2, \"Graph implementation is suited for two directions only\");\n#ifdef DIR_INVERTION_LONG_VERSION\n    return ( dir == GRAPH_DIR_UP)? GRAPH_DIR_DOWN: GRAPH_DIR_UP; \n#else\n    return (GraphDir)!dir;\n#endif\n}\n\n/**\n * Number type used for numbering nodes and edges in graph\n * @ingroup GraphBase\n */\ntypedef quint32 GraphNum;\n/**\n * Node/edge ID type\n * @ingroup GraphBase\n */\ntypedef quint64 GraphUid;\n\n/** \n * Maximum number of nodes\n * @ingroup GraphBase\n */\nconst GraphNum GRAPH_MAX_NODE_NUM = ( GraphNum)( -1);\n/**\n * Maximum number of edges\n * @ingroup GraphBase\n */\nconst GraphNum GRAPH_MAX_EDGE_NUM = ( GraphNum)( -1);\n\n/**\n * Indentation for XML writing\n * @ingroup GraphBase\n */\nconst int IndentSize = 4;\n\n/* Predeclarations of graph-related classes */\nclass Graph;\nclass Node;\nclass Edge;\n\n#include \"marker.h\"\n#include \"num.h\"\n\n#endif "
  },
  {
    "path": "showgraph/GraphView/edge_helper.cpp",
    "content": "/**\n * @file: edge_helper.cpp \n * Edge helper class implementation.\n * GUI for ShowGraph tool.\n */\n/*\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#include \"gview_impl.h\"\n\n#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)\n#define QLINEF_INTERSECT intersects\n#else\n#define QLINEF_INTERSECT intersect\n#endif\n\n#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)\n#define LEVELOFDETAIL(p,x) p->levelOfDetailFromTransform(x)\n#else\n#define LEVELOFDETAIL(p,x) p->levelOfDetail\n#endif\n\n\n\n/**\n * EdgeHelper implementaion\n */\n/** Constructor */\nEdgeHelper::EdgeHelper(): \n    src_item( NULL),\n    dst_item( NULL),\n    state( HELPER_STATE_INITIAL)\n{\n    //setZValue(1);\n}\n\n/** Convenience routine for self edge path */\nQPainterPath EdgeHelper::selfEdgePath() const\n{\n    QPainterPath path( srcP);\n    QPointF center = mapFromItem( src_item, src_item->boundingRect().center());\n    QRectF r = src_item->borderRect();\n    \n    path.cubicTo(  center + QPointF( 3 * r.width()/8, r.height()/2 + SE_VERT_MARGIN),\n                   btmRight, cp1);\n    path.cubicTo(  cp1 + QPointF( 0, -r.height()/2-SE_VERT_MARGIN),\n                   topLeft, dstP);\n    return path;\n}\n\nvoid\nEdgeHelper::adjust()\n{\n    if ( isNullP( src_item) || state == HELPER_STATE_INITIAL)\n        return;\n    \n    prepareGeometryChange();\n\n    bool is_self = ( src_item == dst_item);\n    if ( is_self)\n    {\n        QPointF center = mapFromItem( src_item, src_item->borderRect().center());\n        QRectF r = src_item->borderRect();\n        srcP = center + QPointF( 3 * r.width()/8, r.height() /2);\n        dstP = center + QPointF( 3 * r.width()/8, -r.height() /2);\n        topLeft = center + QPointF( 3 * r.width()/8, -r.height()/2 - SE_VERT_MARGIN);\n        cp1 = center + QPointF( (r.width() / 2) + SE_HOR_MARGIN, 0);\n        btmRight = cp1 + QPointF( 0, r.height()/2 + SE_VERT_MARGIN);\n        \n        prepareGeometryChange();\n        return;\n    }\n    \n    srcP = mapFromItem( src_item, src_item->boundingRect().center());\n    if ( isNotNullP( dst_item))\n        dstP = mapFromItem( dst_item, dst_item->boundingRect().center());\n    \n    topLeft = srcP;\n    btmRight = dstP;\n    QPointF srcCP = srcP;\n    QPointF dstCP = dstP;\n\n    /** Find line start */\n    {\n        QLineF line( srcP, dstP);\n        QPolygonF endPolygon = mapFromItem( src_item, src_item->shape().toFillPolygon());\n        QPointF p1 = endPolygon.first();\n        QPointF p2;\n        QPointF intersectPoint;\n        QLineF polyLine;\n        \n        for (int i = 1; i < endPolygon.count(); ++i) {\n            p2 = endPolygon.at(i);\n            polyLine = QLineF(p1, p2);\n            QLineF::IntersectType intersectType =\n                 polyLine.QLINEF_INTERSECT( line, &srcP);\n            if (intersectType == QLineF::BoundedIntersection)\n                 break;\n            p1 = p2;\n        }\n    }\n    /** Find line end */\n    if ( isNotNullP( dst_item))\n    {\n        QLineF line2( srcP, dstP);\n        QPolygonF endPolygon = mapFromItem( dst_item, dst_item->shape().toFillPolygon());\n        QPointF p1 = endPolygon.first();;\n        QPointF p2;\n        QLineF polyLine;\n        \n        for ( int i = 1; i < endPolygon.count(); ++i) {\n            p2 = endPolygon.at(i);\n            polyLine = QLineF(p1, p2);\n            QLineF::IntersectType intersectType =\n                 polyLine.QLINEF_INTERSECT( line2, &dstP);\n            if ( intersectType == QLineF::BoundedIntersection)\n                 break;\n            p1 = p2;\n        }\n    }\n    topLeft.setX( min< qreal>( srcP.x(), dstP.x()));\n    topLeft.setY( min< qreal>( srcP.y(), dstP.y()));\n    btmRight.setX( max< qreal>( srcP.x(), dstP.x()));\n    btmRight.setY( max< qreal>( srcP.y(), dstP.y()));\n    prepareGeometryChange();\n}\n\nQRectF \nEdgeHelper::boundingRect() const\n{\n    qreal penWidth = 1;\n    qreal extra = arrowSize;\n\n    return QRectF( topLeft,\n                   QSizeF( btmRight.x() - topLeft.x(),\n                           btmRight.y() - topLeft.y()))\n           .normalized()\n           .adjusted(-extra, -extra, extra, extra);\n}\n\nQPainterPath \nEdgeHelper::shape() const\n{\n    QPainterPath path( srcP);\n    QPainterPathStroker stroker;\n        \n    if ( isNullP( src_item) \n         || srcP == dstP\n         || state == HELPER_STATE_INITIAL)\n        return path;\n    \n    if ( areEqP( src_item, dst_item))\n    {\n        path = selfEdgePath();\n    } else\n    {\n        path.lineTo( dstP);\n    }\n    stroker.setWidth( 2);\n    \n    return stroker.createStroke( path); \n}\n\nvoid \nEdgeHelper::paint( QPainter *painter,\n                 const QStyleOptionGraphicsItem *option,\n                 QWidget *widget)\n{\n    if ( isNullP( src_item) || state == HELPER_STATE_INITIAL)\n        return;\n    if ( LEVELOFDETAIL(option, painter->worldTransform()) < 0.1)\n        return;\n\n    /** Do not draw edges when adjacent nodes intersect */\n    if ( isNotNullP( dst_item) && areNotEqP( src_item, dst_item))\n    {\n        QPolygonF pred_rect = mapFromItem( src_item, src_item->boundingRect());\n        QPolygonF succ_rect = mapFromItem( dst_item, dst_item->boundingRect());\n        if ( !succ_rect.intersected( pred_rect).isEmpty())\n            return;\n    }\n\n    static const qreal spline_detail_level = 0.4;\n    static const qreal draw_arrow_detail_level = 0.3;\n    QPointF curr_point;\n    QLineF line( srcP, dstP);\n    \n    QPainterPath path( srcP);\n    path.lineTo( dstP);\n    if ( areEqP( src_item, dst_item))\n    {\n        path = selfEdgePath();\n    } \n    if ( srcP == dstP)\n        return;\n\n    //Set opacity\n    painter->setOpacity( 0.3);\n    QPen pen( option->palette.windowText().color(), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin);\n        \n    // Draw the line itself\n    painter->setPen( pen);\n    painter->setBrush( option->palette.windowText().color());\n    // Draw the arrows if there's enough room and level of detail is appropriate\n    if ( LEVELOFDETAIL(option, painter->worldTransform()) >= draw_arrow_detail_level)\n    {\n        double angle = ::acos(line.dx() / line.length());\n        if ( line.dy() >= 0)\n            angle = TwoPi - angle;\n        \n        QPointF destArrowP1;\n        QPointF destArrowP2;\n\n       \n        /* NOTE:  Qt::black can be replaced by option->palette.foreground().color() */\n        if ( areEqP( src_item, dst_item))\n        {\n            angle = -2* Pi/3;\n        }  \n        destArrowP1 = dstP + QPointF( sin(angle - Pi / 3) * arrowSize,\n                                      cos(angle - Pi / 3) * arrowSize);\n        destArrowP2 = dstP + QPointF( sin(angle - Pi + Pi / 3) * arrowSize,\n                                      cos(angle - Pi + Pi / 3) * arrowSize);\n        pen.setStyle( Qt::SolidLine);\n        painter->setPen( pen);\n        \n        QPainterPath arrow_path;\n        QPainterPathStroker stroker;\n        path = stroker.createStroke( path);\n        stroker.setWidth( 0);\n        arrow_path.addPolygon( QPolygonF() << dstP << destArrowP1 << destArrowP2 <<  dstP);\n        path = path.united( arrow_path);\n        // path = path.simplified();\n        //painter->drawPolygon(QPolygonF() << dstP << destArrowP1 << destArrowP2);\n    }\n    \n    painter->drawPath( path);\n}\n\n"
  },
  {
    "path": "showgraph/GraphView/edge_helper.h",
    "content": "/**\n * @file: edge_item.h \n * Edge Widget class definition.\n */\n/*\n * GUI for ShowGraph tool.\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#ifndef EDGE_HELPER_H\n#define EDGE_HELPER_H\n\n#include \"gview_impl.h\"\n\n/**\n * states of edge helper\n */\nenum EdgeHelperState\n{\n    /* Initial state: mouse didn't move out of src node */\n    HELPER_STATE_INITIAL,\n    /* regular state */\n    HELPER_STATE_REGULAR\n};\n/**\n * Graphics item for visualizing an edge prototype so the user can see the future\n * edge during the creation process ( when he/she moves mouse holidng right button)\n * @ingroup GUIGraph\n */\nclass EdgeHelper: public QGraphicsItem\n{\n    QPointF srcP;\n    QPointF dstP;\n    QPointF cp1;\n    QPointF cp2;\n    QPointF topLeft;\n    QPointF btmRight;\n    NodeItem *src_item;\n    NodeItem *dst_item;\n    EdgeHelperState state;\npublic:\n    /** Type of graphics item for edge */\n    enum {Type = TypeEdgeHelper};\n    /** Constructor */\n    EdgeHelper();\n    \n    /** Get item type */\n    inline int type() const;\n    /** Set source item */\n    inline void setSrc( NodeItem *item);\n    /** Set destination item */\n    inline void setDst( NodeItem *item);\n    /** Get source item */\n    inline NodeItem *src() const;\n    /** Get destination item */\n    inline NodeItem *dst() const;\n    /** Set destination point */\n    inline void setDstP( QPointF p);\n    /** Reset state */\n    inline void reset();\n    /** promote state to regular */\n    inline void switchToRegular();\n    /** Adjust edge image */\n    void adjust();\n    /** Get bounding rectangle of edge image */\n    QRectF boundingRect() const;\n    /** Get shape of the edge */\n    QPainterPath shape() const;\n    /** Paint edge */\n    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);\n    /** Convenience routine for self edge path */\n    QPainterPath selfEdgePath() const;\n};\n\n/** promote state to regular */\ninline void \nEdgeHelper::switchToRegular()\n{\n    state = HELPER_STATE_REGULAR;\n}\n\n/** Reset state */\ninline void\nEdgeHelper::reset()\n{\n    src_item = NULL;\n    dst_item = NULL;\n    dstP = QPointF( 0, 0);\n    state = HELPER_STATE_INITIAL;\n}\n\n/** Get item type */\ninline int EdgeHelper::type() const\n{\n    return Type;\n}\n\n/** Set source item */\ninline void\nEdgeHelper::setSrc( NodeItem *item)\n{\n    src_item = item;\n}\n/** Set destination item */\ninline void\nEdgeHelper::setDst( NodeItem *item)\n{\n    dst_item = item;\n}\n/** Get source item */\ninline NodeItem *\nEdgeHelper::src() const\n{\n    return src_item;\n}\n/** Get destination item */\ninline NodeItem *\nEdgeHelper::dst() const\n{\n    return dst_item;\n}\n/** Set destination point */\ninline void\nEdgeHelper::setDstP( QPointF p)\n{\n    dstP = p;\n}\n\n#endif /* EDGE_HELPER_H */\n"
  },
  {
    "path": "showgraph/GraphView/edge_item.cpp",
    "content": "/**\n * @file: edge_item.cpp \n * Drawable edge implementation.\n * GUI for ShowGraph tool.\n */\n/*\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#include \"gview_impl.h\"\n#include <QVector>\n\n//#define SHOW_CONTROL_POINTS\n//#define SHOW_BACKEDGES\n\n#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)\n#define QLINEF_INTERSECT intersects\n#else\n#define QLINEF_INTERSECT intersect\n#endif\n\n#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)\n#define LEVELOFDETAIL(p,x) p->levelOfDetailFromTransform(x)\n#else\n#define LEVELOFDETAIL(p,x) p->levelOfDetail\n#endif\n\nGEdge::GEdge( GGraph *graph_p, int _id, GNode *_pred, GNode* _succ):\n    AuxEdge( (AuxGraph *)graph_p, _id, (AuxNode *)_pred, (AuxNode *)_succ), _style( NULL)\n{\n    item_p = new EdgeItem( this);\n    graph()->view()->scene()->addItem( item_p);\n    item_p->adjust();\n    graph()->invalidateRanking();\n}\n   \nGEdge::~GEdge()\n{\n    graph()->invalidateRanking();\n    item()->remove();\n    graph()->view()->deleteLaterEdgeItem( item());\n    if ( isNotNullP( _style))\n        _style->decNumItems();\n}\n\nGNode * \nGEdge::node( GraphDir dir) const \n{\n    return static_cast< GNode *>(AuxEdge::node( dir));\n}\n\nGNode * \nGEdge::realNode( GraphDir dir) const \n{\n    return static_cast< GNode *>(AuxEdge::realNode( dir));\n}\n\nGGraph *\nGEdge::graph() const\n{\n    return static_cast< GGraph *>( AuxEdge::graph());\n}\n\n/**\n * Update DOM tree element\n */\nvoid\nGEdge::updateElement()\n{\n#if 0    \n    QDomElement e = elem();\n    int i = 0;\n    QDomElement new_e = graph()->createElement( \"edge\");\n    QDomNode e2 = graph()->documentElement().removeChild( e);\n    assertd( !e2.isNull());\n    graph()->documentElement().appendChild( new_e);\n    setElement( new_e);\n    e = new_e;\n#endif\n    /* Base class method call to print generic edge properties */\n    AuxEdge::updateElement();\n    QDomElement e = elem();\n    /** Save style that describes this edge only along with edge */\n    if ( isNotNullP( style())) \n    {     \n        if ( 1 == style()->numItems())\n        {\n            e.removeAttribute(\"style\");\n            style()->writeElement( e, false);\n        } else\n        {\n            e.setAttribute(\"style\", style()->name());\n        }\n    }\n\n}\n\n/** Make all styles of edges connected with edge control or label the same */\nvoid\nGEdge::adjustStyles()\n{\n    GNode* succ_n = succ();\n\n    while ( succ_n->isEdgeControl() || succ_n->isEdgeLabel())\n    {\n        assertd( isNotNullP( succ_n->firstSucc()));\n        succ_n->firstSucc()->setStyle( style());\n        succ_n = succ_n->firstSucc()->succ();\n    }\n\n    GNode* pred_n = pred();\n\n    while ( pred_n->isEdgeControl() || pred_n->isEdgeLabel())\n    {\n        assertd( isNotNullP( pred_n->firstPred()));\n        pred_n->firstPred()->setStyle( style());\n        pred_n = pred_n->firstPred()->pred();\n    }\n}\n/**\n * read properties from DOM tree element\n */\nvoid\nGEdge::readFromElement( QDomElement e)\n{\n    AuxEdge::readFromElement( e); // Base class method\n    item()->adjust();\n}\n/**\n * Insert node of label type\n */\nGNode *\nGEdge::insertLabelNode( QPointF pos)\n{\n    GNode *new_node = static_cast<GNode *>( insertNode());\n    new_node->setTypeEdgeLabel();\n    new_node->item()->setPlainText( \"Label\");\n    new_node->item()->setPos( pos + QPointF( new_node->item()->borderRect().width()/2, 0));\n    \n    return new_node;\n}\n\n/**\n * Insert node with style propagation\n */\nAuxNode *\nGEdge::insertNode()\n{\n    GStyle *st = style();\n    GNode *new_node = static_cast<GNode *>( AuxEdge::insertNode());\n    //new_node->firstPred()->setStyle( st);\n    new_node->firstSucc()->setStyle( st);\n    return new_node;\n}\n\n/**\n * EdgeItem implementaion\n */\n/** Constructor */\nEdgeItem::EdgeItem( GEdge *e_p): edge_p( e_p)\n{\n    curr_mode = ModeShow;\n    QGraphicsItem::setCursor( Qt::ArrowCursor);\n    setFlag( ItemIsSelectable);\n    setFlag( ItemIsFocusable);\n    //setCacheMode( DeviceCoordinateCache);\n    setZValue(1);\n}\n\nQVariant\nEdgeItem::itemChange( GraphicsItemChange change, const QVariant &value)\n{\n    if ( change == QGraphicsItem::ItemSelectedChange)\n    {\n        pred()->item()->update();\n        succ()->item()->update();\n    }\n    return QGraphicsItem::itemChange( change, value);\n}    \n\n/** Convenience routine for self edge path */\nQPainterPath EdgeItem::selfEdgePath() const\n{\n    assertd( edge()->isSelf());\n    QPainterPath path( srcP);\n    QPointF center = mapFromItem( pred()->item(), pred()->item()->boundingRect().center());\n    QRectF r = pred()->item()->borderRect();\n    \n    path.cubicTo(  center + QPointF( 3 * r.width()/8, r.height()/2 + SE_VERT_MARGIN),\n                   btmRight, cp1);\n    path.cubicTo(  cp1 + QPointF( 0, -r.height()/2-SE_VERT_MARGIN),\n                   topLeft, dstP);\n    return path;\n}\n\nvoid\nEdgeItem::adjust()\n{\n    prepareGeometryChange();\n    if ( edge()->pred()->item()->isVisible()\n         && edge()->succ()->item()->isVisible())\n    {\n        setVisible( true);\n    } else\n    {\n        setVisible( false);\n        return;\n    }\n    if ( edge()->isSelf())\n    {\n        QPointF center = mapFromItem( pred()->item(), pred()->item()->borderRect().center());\n        QRectF r = pred()->item()->borderRect();\n        srcP = center + QPointF( 3 * r.width()/8, r.height() /2);\n        dstP = center + QPointF( 3 * r.width()/8, -r.height() /2);\n        topLeft = center + QPointF( 3 * r.width()/8, -r.height()/2 - SE_VERT_MARGIN);\n        cp1 = center + QPointF( (r.width() / 2) + SE_HOR_MARGIN, 0);\n        btmRight = cp1 + QPointF( 0, r.height()/2 + SE_VERT_MARGIN);\n        \n        update();\n        return;\n    }\n    srcP = mapFromItem( pred()->item(), pred()->item()->boundingRect().center());\n    dstP = mapFromItem( succ()->item(), succ()->item()->boundingRect().center());\n    topLeft = srcP;\n    btmRight = dstP;\n    QPointF srcCP = srcP;\n    QPointF dstCP = dstP;\n\n    if ( pred()->isEdgeLabel())\n    {\n        srcP = mapFromItem( pred()->item(),\n                            pred()->item()->borderRect().left(),\n                            pred()->item()->borderRect().center().y());\n        qreal w = pred()->item()->borderRect().width();\n        //srcP += QPointF( -w, 0);\n        srcCP = srcP;\n    } \n    if ( succ()->isEdgeLabel())\n    {\n        dstP = mapFromItem( succ()->item(),\n                            succ()->item()->borderRect().left(),\n                            succ()->item()->borderRect().center().y());\n        dstCP = dstP;\n    } \n\n    if ( pred()->isSimple())\n    {\n        QLineF line( srcP, dstP);\n        QPolygonF endPolygon = mapFromItem( pred()->item(), pred()->item()->shape().toFillPolygon());\n        QPointF p1 = endPolygon.first();\n        QPointF p2;\n        QPointF intersectPoint;\n        QLineF polyLine;\n        \n        for (int i = 1; i < endPolygon.count(); ++i) {\n            p2 = endPolygon.at(i);\n            polyLine = QLineF(p1, p2);\n            QLineF::IntersectType intersectType =\n                 polyLine.QLINEF_INTERSECT( line, &srcP);\n            if (intersectType == QLineF::BoundedIntersection)\n                 break;\n            p1 = p2;\n        }\n    }\n    if ( succ()->isSimple())\n    {\n        QLineF line2( srcP, dstP);\n        QPolygonF endPolygon = mapFromItem( succ()->item(), succ()->item()->shape().toFillPolygon());\n        QPointF p1 = endPolygon.first();;\n        QPointF p2;\n        QLineF polyLine;\n        \n        for ( int i = 1; i < endPolygon.count(); ++i) {\n            p2 = endPolygon.at(i);\n            polyLine = QLineF(p1, p2);\n            QLineF::IntersectType intersectType =\n                 polyLine.QLINEF_INTERSECT( line2, &dstP);\n            if ( intersectType == QLineF::BoundedIntersection)\n                 break;\n            p1 = p2;\n        }\n    }\n    topLeft.setX( min< qreal>( srcP.x(), dstP.x()));\n    topLeft.setY( min< qreal>( srcP.y(), dstP.y()));\n    btmRight.setX( max< qreal>( srcP.x(), dstP.x()));\n    btmRight.setY( max< qreal>( srcP.y(), dstP.y()));\n\n    QLineF mainLine = QLineF( srcP, dstP);\n        \n    if ( mainLine.length() < 1)\n        return;\n\n    qreal size = abs< qreal>(( min< qreal>( abs< qreal>( mainLine.dx()),\n                                            abs< qreal>( mainLine.dy()))));\n    //Stub\n    if( size < 2* EdgeControlSize)\n    {\n        size = 2* EdgeControlSize;\n    }\n    if( size > 20 * EdgeControlSize)\n    {\n        size = 20 * EdgeControlSize;\n    }\n    \n    NodeItem *next_pred = NULL;\n    NodeItem *next_succ = NULL;\n\n    if ( ( pred()->isEdgeControl() || pred()->isEdgeLabel()) \n         && isNotNullP( pred()->firstPred()))\n    {\n        next_pred = pred()->firstPred()->pred()->item();\n    } \n    if ( ( succ()->isEdgeControl() || succ()->isEdgeLabel()) \n         && isNotNullP( succ()->firstSucc()))\n    {\n        next_succ = succ()->firstSucc()->succ()->item();\n    } \n    /** Place cp1 */\n    if ( isNotNullP( next_pred))\n    {\n        QPointF p1 = mapFromItem( next_pred, next_pred->borderRect().center());\n        QLineF line( p1, dstCP);\n        QPointF cp1_offset = QPointF( (line.dx() * size)/ line.length(),\n                                      (line.dy() * size)/ line.length());\n        cp1 = srcP + cp1_offset;\n    } else\n    {\n        QPointF cp1_offset = QPointF( (mainLine.dx() * size)/ mainLine.length(),\n                                      (mainLine.dy() * size)/ mainLine.length());\n        cp1 = srcP + cp1_offset;\n    }\n    \n    topLeft.setX( min< qreal>( topLeft.x(), cp1.x()));\n    topLeft.setY( min< qreal>( topLeft.y(), cp1.y()));\n    btmRight.setX( max< qreal>( btmRight.x(), cp1.x()));\n    btmRight.setY( max< qreal>( btmRight.y(), cp1.y()));\n\n    /** Place cp2 */\n    if ( isNotNullP( next_succ))\n    {\n        QPointF p2 = mapFromItem( next_succ, next_succ->borderRect().center());\n        QLineF line( p2, srcCP);\n        QPointF cp2_offset = QPointF( (line.dx() * size)/ line.length(),\n                                      (line.dy() * size)/ line.length());\n        cp2 = dstP + cp2_offset;\n    } else\n    {\n        QPointF cp2_offset = QPointF( -(mainLine.dx() * size)/ mainLine.length(),\n                                      -(mainLine.dy() * size)/ mainLine.length());\n        cp2 = dstP + cp2_offset;\n    }\n    \n    topLeft.setX( min< qreal>( topLeft.x(), cp2.x()));\n    topLeft.setY( min< qreal>( topLeft.y(), cp2.y()));\n    btmRight.setX( max< qreal>( btmRight.x(), cp2.x()));\n    btmRight.setY( max< qreal>( btmRight.y(), cp2.y()));\n\n    update();\n}\n\nQRectF \nEdgeItem::boundingRect() const\n{\n    qreal penWidth = 1;\n    qreal extra = arrowSize;\n\n    return QRectF( topLeft,\n                   QSizeF( btmRight.x() - topLeft.x(),\n                           btmRight.y() - topLeft.y()))\n           .normalized()\n           .adjusted(-extra, -extra, extra, extra);\n}\n\nQPainterPath \nEdgeItem::shape() const\n{\n    QPainterPath path( srcP);\n    QPainterPathStroker stroker;\n        \n    if ( srcP == dstP)\n        return path;\n    \n    if ( edge()->isSelf())\n    {\n        path = selfEdgePath();\n    } else\n    {\n        path.cubicTo( cp1, cp2, dstP);\n    }\n    if ( isNotNullP( edge()->style()))\n    {\n        stroker.setWidth( edge()->style()->pen().width() + 1);\n    } else\n    {\n        stroker.setWidth( 2);\n    }\n    return stroker.createStroke( path); \n}\n\nvoid \nEdgeItem::paint( QPainter *painter,\n                 const QStyleOptionGraphicsItem *option,\n                 QWidget *widget)\n{\n    if ( LEVELOFDETAIL(option, painter->worldTransform()) < 0.1)\n        return;\n\n    /** Do not draw edges when adjacent nodes intersect */\n    QPolygonF pred_rect = mapFromItem( pred()->item(), pred()->item()->boundingRect());\n    QPolygonF succ_rect = mapFromItem( succ()->item(), succ()->item()->boundingRect());\n    if ( !succ_rect.intersected( pred_rect).isEmpty())\n        return;\n\n    static const qreal spline_detail_level = 0.4;\n    static const qreal draw_arrow_detail_level = 0.3;\n    QPointF curr_point;\n    QLineF line = QLineF();\n    curr_point = srcP;\n    QPointF nextToDst = srcP;\n    qreal opacity = min<qreal>( edge()->pred()->item()->opacityLevel(), \n                              edge()->succ()->item()->opacityLevel());\n    line.setP1( nextToDst);\n    line.setP2( dstP);\n    \n    QPainterPath path( srcP);\n    QPainterPathStroker stroker;\n    stroker.setWidth( 0);\n\n    if ( edge()->isSelf())\n    {\n        path = selfEdgePath();\n    } else if ( LEVELOFDETAIL(option, painter->worldTransform()) >= spline_detail_level)\n    {\n        path.cubicTo( cp1, cp2, dstP);\n    }\n    //path = stroker.createStroke(path);\n    if ( nextToDst == dstP)\n        return;\n\n    //Set opacity\n    if ( edge()->graph()->view()->isContext())\n        painter->setOpacity( opacity);\n\n    QPen pen( option->palette.windowText().color(),\n              1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin);\n        \n    if ( isNotNullP( edge()->style()))\n    {\n        pen = edge()->style()->pen();\n    }\n\n    // Draw the line itself\n    if ( LEVELOFDETAIL(option, painter->worldTransform()) >= spline_detail_level)\n    {\n        if ( option->state & QStyle::State_Selected)\n        {\n            pen.setWidthF( pen.widthF() + 1);\n        } \n    } else\n    {\n        pen = QPen( pen.color(),1);\n    }\n\n    painter->setPen( pen);\n    \n    //Draw edge\n    if ( edge()->isSelf() || LEVELOFDETAIL(option, painter->worldTransform()) >= spline_detail_level)\n    {\n        painter->drawPath( path);\n    } else\n    {\n        painter->drawLine( line);\n    }\n    \n    // Draw the arrows if there's enough room and level of detail is appropriate\n    if ( LEVELOFDETAIL(option, painter->worldTransform()) >= draw_arrow_detail_level)\n    {\n        double angle = ::acos(line.dx() / line.length());\n        if ( line.dy() >= 0)\n            angle = TwoPi - angle;\n        \n        QPointF destArrowP1;\n        QPointF destArrowP2;\n\n       \n        /* NOTE:  Qt::black can be replaced by option->palette.foreground().color() */\n        if ( isNotNullP( edge()->style()))\n        {\n            painter->setBrush( edge()->style()->pen().color());\n        } else\n        {\n            painter->setBrush(option->palette.windowText().color());\n        }\n        if ( edge()->isSelf())\n        {\n            angle = -2* Pi/3;\n        }  \n        destArrowP1 = dstP + QPointF( sin(angle - Pi / 3) * arrowSize,\n                                      cos(angle - Pi / 3) * arrowSize);\n        destArrowP2 = dstP + QPointF( sin(angle - Pi + Pi / 3) * arrowSize,\n                                      cos(angle - Pi + Pi / 3) * arrowSize);\n        pen.setStyle( Qt::SolidLine);\n        painter->setPen( pen);\n        if ( succ()->isSimple())\n        {\n            QPainterPath arrow_path;\n            arrow_path.addPolygon( QPolygonF() << dstP << destArrowP1 << destArrowP2 <<  dstP);\n            //path = path.united( arrow_path);\n            painter->drawPolygon(QPolygonF() << dstP << destArrowP1 << destArrowP2);\n        }\n    }\n\n    painter->setOpacity( 1);\n#ifdef SHOW_CONTROL_POINTS\n    /** For illustrative purposes */\n    painter->setPen(QPen(Qt::gray, 1, Qt::DashLine, Qt::RoundCap, Qt::RoundJoin));\n    if ( !edge()->isSelf())\n    {\n        painter->drawLine( srcP, dstP);\n        painter->drawLine( srcP, cp1);\n        painter->drawLine( cp2, dstP);\n    }   \n    painter->setPen(QPen(Qt::red, 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));\n    painter->drawPoint( srcP);\n    painter->setPen(QPen(Qt::blue, 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));\n    painter->drawPoint( dstP);\n    painter->setPen(QPen(Qt::green, 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));\n    painter->drawPoint( cp1);\n#endif\n}\nvoid EdgeItem::mousePressEvent(QGraphicsSceneMouseEvent *event)\n{\n    update();\n    if ( event->button() & Qt::RightButton)\n    {\n        adjust();\n    }\n    if ( event->button() == Qt::LeftButton && (flags() & ItemIsSelectable))\n    {\n        bool multiSelect = ( event->modifiers() & Qt::ControlModifier) != 0;\n        if ( !multiSelect)\n        {\n            if ( !isSelected())\n            {\n                if (scene())\n                    scene()->clearSelection();\n                setSelected(true);\n            }\n        }\n    } else if ( !(flags() & ItemIsMovable))\n    {\n//            event->ignore();\n    }\n}\nvoid EdgeItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *ev)\n{\n    update();\n    /** Select this edge */\n    edge()->graph()->emptySelection();\n    edge()->graph()->selectEdge( this->edge());\n    /** Show context menu */\n    if ( ev->button() & Qt::RightButton)\n    {\n        QMenu *menu = edge()->graph()->view()->createMenuForEdge( edge());\n        edge()->graph()->view()->setCurrPos( ev->pos());\n        menu->exec( ev->screenPos());\n        delete menu;\n    }\n    QGraphicsItem::mouseReleaseEvent( ev);\n}\n\nvoid EdgeItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *ev)\n{\n    if( edge()->graph()->view()->isEditable() \n        && ev->button() & Qt::LeftButton)\n    {\n        if ( edge()->isSelf())\n        {\n            GNode* new_node1 = static_cast<GNode *>( edge()->insertNode());\n            GNode* new_node2 = static_cast<GNode *>( edge()->insertNode());\n            new_node1->setTypeEdgeControl();\n            new_node2->setTypeEdgeControl();\n            new_node1->item()->setPos( ev->pos() + QPointF( 0, -10));\n            new_node2->item()->setPos( ev->pos() + QPointF( 0, 10));\n        } else\n        {\n            GNode* new_node = static_cast<GNode *>( edge()->insertNode());\n            new_node->setTypeEdgeControl();\n            new_node->item()->setPos( ev->pos());\n        }\n    }\n}\n\nvoid \nEdgeItem::keyPressEvent(QKeyEvent *event)\n{\n    int key = event->key();\n    GNode *n = NULL;\n    GEdge *e = NULL;\n    VEdge vedge( edge());\n    NavSector sector = edge()->graph()->nodeNavigationSector();\n    GNode *curr_node = edge()->graph()->nodeInFocus();\n    NodeNav node_nav( curr_node, sector);\n    switch( key)\n    {\n        case Qt::Key_Up:\n            if ( isNotNullP( curr_node) \n                 && ( sector == LEFT_SECTOR || sector == RIGHT_SECTOR))\n            {\n                e = node_nav.edgeInDir( edge(), NAV_DIR_UP);\n            } else\n            {\n                n = vedge.nodeUp();\n            }\n            break;\n        case Qt::Key_Down:\n            if ( isNotNullP( curr_node) \n                 && ( sector == LEFT_SECTOR || sector == RIGHT_SECTOR) )\n            {\n                e = node_nav.edgeInDir( edge(), NAV_DIR_DOWN);\n            } else\n            {\n                n = vedge.nodeDown();\n            }\n            break;\n        case Qt::Key_Left:\n            if ( isNotNullP( curr_node) \n                 && ( sector == TOP_SECTOR || sector == BOTTOM_SECTOR) )\n            {\n                e = node_nav.edgeInDir( edge(), NAV_DIR_LEFT);\n            } else\n            {\n                n = vedge.nodeLeft();\n            }\n            break;\n        case Qt::Key_Right:\n            if ( isNotNullP( curr_node) \n                 && ( sector == TOP_SECTOR || sector == BOTTOM_SECTOR) )\n            {\n                e = node_nav.edgeInDir( edge(), NAV_DIR_RIGHT);\n            } else\n            {\n                n = vedge.nodeRight();\n            }\n            break;\n        default:\n            break;\n    }\n    if ( isNotNullP( n))\n    {\n        if ( edge()->graph()->view()->isContext())\n        {\n            edge()->graph()->emptySelection();\n            edge()->graph()->selectNode( n);\n            edge()->graph()->view()->findContext();\n        }\n        edge()->graph()->view()->focusOnNode( n, true);\n        \n        scene()->clearFocus();\n        scene()->clearSelection();\n        n->item()->setFocus();\n        n->item()->setSelected( true);\n    } else if ( isNotNullP( e))\n    {\n        // Get focus on edge\n        scene()->clearFocus();\n        scene()->clearSelection();\n        e->item()->setFocus();\n        e->item()->setSelected( true);\n    }\n    //QGraphicsItem::keyPressEvent( event);\n}\n\n"
  },
  {
    "path": "showgraph/GraphView/edge_item.h",
    "content": "/**\n * @file: edge_item.h \n * Edge Widget class definition.\n */\n/*\n * GUI for ShowGraph tool.\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#ifndef EDGE_W_H\n#define EDGE_W_H\n\n#include \"gview_impl.h\"\n/** size of edge control */\nconst qreal EdgeControlSize  = 5;\n\n/**\n * Representation of drawable edge\n * @ingroup GUIGraph\n */\nclass GEdge: public AuxEdge\n{\n    /** Pointer to corresponding graphics item */\n    EdgeItem *item_p;\n    /** Graphical appearance style */\n    GStyle *_style;\nprotected:\n    /** Default constructor */\n    GEdge( GGraph *graph_p, int _id, GNode *_pred, GNode* _succ);\n\n\n    friend class GGraph;\n    friend class Node;\npublic:\n    /**\n     * Return pointer to graph\n     */\n    GGraph *graph() const;\n\n    /** Destructor */\n    virtual ~GEdge();\n\n    /**\n     * Return associated graphics item\n     */\n    inline EdgeItem *item() const\n    {\n        return item_p;\n    }\n    /** \n     * Update DOM element\n     */\n    virtual void updateElement();\n\n    /**\n     * Read properties from XML\n     */\n    virtual void readFromElement( QDomElement elem);\n\n    /** Overload of setNode from base class */\n    inline void setNode( GNode *n, GraphDir dir)\n    {\n        AuxEdge::setNode( ( AuxNode *)n, dir);\n    }\n    /** Set predecessor */\n    inline void setPred( GNode *n)\n    {\n        setNode( n, GRAPH_DIR_UP);\n    }\n    /** Set successor */\n    inline void setSucc( GNode *n)\n    {\n        setNode( n, GRAPH_DIR_DOWN);\n    }\n    /** Get node in given direction */\n    GNode *node( GraphDir dir) const;\n    /** Get predecessor */\n    inline GNode *pred() const \n    {\n        return node( GRAPH_DIR_UP);\n    }\n    /** Get successor */\n    inline GNode *succ() const \n    {\n        return node( GRAPH_DIR_DOWN);\n    }\n    \n    /** Get real node in given direction */\n    GNode* realNode( GraphDir) const;\n\n    /** Get real predecessor */\n    inline GNode* realPred() const\n    {\n        return realNode( GRAPH_DIR_UP);\n    }\n    /** Get real successor */\n    inline GNode* realSucc() const\n    {\n        return realNode( GRAPH_DIR_DOWN);\n    }\n\n    /** Next edge in graph's list */\n    inline GEdge* nextEdge()\n    {\n        return static_cast< GEdge *>(AuxEdge::nextEdge());\n    }\n    /** Next edge in give direction */\n    inline GEdge* nextEdgeInDir( GraphDir dir)\n    {\n        return static_cast< GEdge *>(AuxEdge::nextEdgeInDir( dir));\n    }\n    /** Next successor */\n    inline GEdge* nextSucc()\n    {\n        return nextEdgeInDir( GRAPH_DIR_DOWN);\n    }\n    /** Next predecessor */\n    inline GEdge* nextPred()\n    {\n        return nextEdgeInDir( GRAPH_DIR_UP);\n    } \n    /** Insert node of label type */\n    GNode *insertLabelNode( QPointF pos);\n        \n    /** Set edge's style */\n    inline void setStyle( GStyle *st);\n    /** Get edge's style */\n    inline GStyle * style() const\n    {\n        return _style;\n    }\n    /** Insert node */\n    virtual AuxNode *insertNode();\n    /** Make all styles the same across complex edge */\n    void adjustStyles();\n};\n/**\n * Graphics item for visualizing a graph edge\n * @ingroup GUIGraph\n */\nclass EdgeItem: public QGraphicsItem\n{\npublic:        \n    /** Modes of an edge */\n    typedef enum EdgeMode\n    {\n        ModeShow,\n        ModeEdit\n    } EdgeMode;\n\nprivate:\n    /** Graph connection */\n    GEdge* edge_p;\n\n    QPointF srcP;\n    QPointF cp1;\n    QPointF cp2;\n    QPointF dstP;\n    QPointF topLeft;\n    QPointF btmRight;\n    EdgeMode curr_mode;\npublic:\n    /** Type of graphics item for edge */\n    enum {Type = TypeEdge};\n    /** Constructor */\n    EdgeItem( GEdge *e_p);\n    /** Get item type */\n    int type() const\n    {\n        return Type;\n    }\n    /** Adjust edge image */\n    void adjust();\n    /** Get corresponding edge of the graph */\n    inline GEdge* edge() const\n    {\n        return edge_p;    \n    }\n    /** Get mode */\n    inline EdgeMode mode() const\n    {\n        return curr_mode;\n    }\n    /** Set mode */\n    inline void setMode( EdgeMode m)\n    {\n        curr_mode = m;\n    }\n    /** Get bounding rectangle of edge image */\n    QRectF boundingRect() const;\n    /** Get shape of the edge */\n    QPainterPath shape() const;\n    /** Event handler for change */\n    QVariant itemChange( GraphicsItemChange change, const QVariant &value);\n    /** Paint edge */\n    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);\n    /** Event handler for mouse press */\n    void mousePressEvent(QGraphicsSceneMouseEvent *event);\n    /** Event handler for mouse release */\n    void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);\n    /** Event handler for double click */\n    void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event);\n    /** Key press event handler */\n    void keyPressEvent(QKeyEvent *event);\n    /** Get predecessor in terms of graph model */\n    inline GNode* pred() const\n    {\n        return edge()->pred();\n    }\n    /** Get successor in terms of graph model */\n    inline GNode* succ() const\n    {\n        return edge()->succ();\n    }\n    /** Remove from scene */\n    inline void remove()\n    {\n        setVisible( false);\n        removeFromIndex();\n        scene()->removeItem( this);\n        edge_p = NULL;\n    }\n    /** Convenience routine for self edge path */\n    QPainterPath selfEdgePath() const;\n};\n\n    /** Set edge's style */\ninline void GEdge::setStyle( GStyle *st)\n{\n    if ( areNotEqP( _style, st))\n    {\n        if ( isNotNullP( _style))\n            _style->decNumItems();\n        _style = st;\n        if ( isNotNullP( _style))\n            _style->incNumItems();\n    }\n    item()->update();\n}\n#endif"
  },
  {
    "path": "showgraph/GraphView/graph_view.cpp",
    "content": "/**\n * @file: graph_view.cpp\n * Graph View Widget implementation.\n */\n/*\n * GUI for ShowGraph tool.\n * Copyright (C) 2009 Boris Shurygin\n */\n#include \"gview_impl.h\"\n\n#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)\n#define WHEELEVENTYDELTA(x)           (x->angleDelta().y())\n#else\n#define WHEELEVENTYDELTA(x)           (x->delta())\n#endif\n\n#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)\n#define QGV_MATRIX()       transform()\n#define QGV_SETMATRIX(x)   setTransform(x)\n#define QMATRIX            QTransform\n#else\n#define QGV_MATRIX()       matrix()\n#define QGV_SETMATRIX(x)   setMatrix(x)\n#define QMATRIX            QMatrix\n#endif\n\n\n/**\n * Compute scale parameter from user-controlled zoom factor\n */\ninline qreal scaleVal( qreal zoom_scale)\n{\n    return qPow( qreal(2), zoom_scale / qreal(5));\n}\n\n/** Destructor */\nGGraph::~GGraph()\n{\n    freeMarker( nodeTextIsShown);\n    for ( GNode *node = firstNode();\n          isNotNullP( node);\n          )\n    {\n        GNode* next = node->nextNode();\n        int ir_id = node->irId();\n        deleteNode( node);\n        node = next;\n    }\n    foreach ( GStyle *style, styles)\n    {\n        delete style;\n    }\n}\n\nGNode*\nGGraph::newNode()\n{\n    GNode* n = static_cast< GNode *>( AuxGraph::newNode());\n    return n;\n}\n\nGEdge*\nGGraph::newEdge( GNode* pred, GNode* succ)\n{\n    GEdge* e = \n        static_cast< GEdge *>( AuxGraph::newEdge( (AuxNode *)pred, (AuxNode *)succ));\n    return e;\n}\n\nGNode*\nGGraph::newNode( QDomElement e)\n{\n    GNode* n =  static_cast< GNode *>( AuxGraph::newNode( e));\n    return n;\n}\n\nGEdge*\nGGraph::newEdge( GNode* pred, GNode* succ, QDomElement e)\n{\n    GEdge* edge_p = \n        static_cast< GEdge *>( AuxGraph::newEdge( (AuxNode *)pred, (AuxNode *)succ, e));\n    return edge_p;\n}\n\nvoid GGraph::selectOneNode( GNode* n)\n{    \n    emptySelection();\n    selectNode( n);\n    n->item()->highlight();\n    n->item()->update();\n}\n\n/**\n * Change node's style\n */\nvoid GGraph::setNodeStyle( GStyle *style)\n{\n    if ( sel_nodes.isEmpty())\n        return;\n\n    GNode* node = sel_nodes.first();\n    node->setStyle( style);\n    node->item()->adjustAssociates();\n}\n\n/**\n * Change edge's style\n */\nvoid GGraph::setEdgeStyle( GStyle *style)\n{\n    if ( sel_edges.isEmpty())\n        return;\n\n    GEdge* edge = sel_edges.first();\n    edge->setStyle( style);\n    edge->item()->adjust();\n}\n\nvoid GGraph::showNodesText()\n{\n    foreach (GNode *n, sel_nodes)\n    {\n        view()->showNodeText( n);\n    }\n}\n\n/**\n * Delete scheduled nodes\n */\nvoid GGraph::deleteNodes()\n{\n    foreach (GNode *n, sel_nodes)\n    {\n        deleteNode( n);\n    }\n    sel_nodes.clear();\n}\n\n/**\n * Delete scheduled edges\n */\nvoid GGraph::deleteEdges()\n{\n\tforeach (GEdge *e, sel_edges)\n\t{\n\t\tdeleteEdgeWithControls( e);\n\t}\n    sel_edges.clear();\n}\n/**\n * Create self edge on selected node\n */\nvoid GGraph::createSelfEdge()\n{\n    if ( !sel_nodes.isEmpty())\n    {\n        GNode *n = sel_nodes.first();\n        newEdge( n, n);\n    }\n}\n\n/** Create label on selected edge */\nvoid GGraph::createEdgeLabel( QPointF pos)\n{\n    if ( !sel_edges.isEmpty())\n    {\n        sel_edges.first()->insertLabelNode( pos);\n    }\n}\n\nvoid GGraph::showEdgePred()\n{\n    if ( !sel_edges.isEmpty())\n    {\n        if ( view()->isContext())\n        {\n            selectNode( sel_edges.first()->realPred());\n            view()->findContext();\n        } else\n        {\n            view()->focusOnNode( sel_edges.first()->realPred(), true);\n        }\n    }\n}\n\nvoid GGraph::showEdgeSucc()\n{\n    if ( !sel_edges.isEmpty())\n    {\n        if ( view()->isContext())\n        {\n            selectNode( sel_edges.first()->realSucc());\n            view()->findContext();\n        } else\n        {\n            view()->focusOnNode( sel_edges.first()->realSucc(), true);\n        }\n    }\n}\n\nvoid GGraph::clearNodesPriority()\n{\n    GNode* n;\n    foreachNode( n, this)\n    {\n        n->setPriority( 0);\n    }\n}\n\n/** Style edit finished */\nvoid GraphView::styleEditFinished( int result)\n{\n    if ( isNotNullP( style_edit_info->node))\n    {\n        GNode *node = style_edit_info->node;\n        GStyle *old_style = style_edit_info->old_style;\n        GStyle *new_style = style_edit_info->new_style;\n\n        if ( result == QDialog::Accepted)\n        {\n            if ( isNotNullP( old_style))\n            {\n                *(old_style) = *(new_style);\n                node->setStyle( old_style);\n                delete new_style;\n            } else\n            {\n                QString name = QString(\"node %1 style\").arg(node->id());\n                new_style->setName( name);\n                graph()->addStyle( name, new_style);\n            }\n        } else\n        {\n            node->setStyle( old_style);\n            delete new_style;\n        }\n        node->item()->adjustAssociates();\n    } else\n    {\n    \n    }\n\n    style_edit_info->dialog->disconnect();\n    style_edit_info->dialog->deleteLater();\n    delete style_edit_info;\n}\n\nvoid GGraph::showEditEdgeStyle()\n{\n    if ( sel_edges.isEmpty())\n        return;\n    \n    StyleEdit dialog;\n    GEdge* edge = sel_edges.first();\n    \n    GStyle* old_style = edge->style();\n    GStyle* new_style;\n    if ( isNullP( old_style))\n    {\n        QColor color( view()->palette().windowText().color());\n        new_style = new GStyle();\n        new_style->setPenColor( color);\n        new_style->setPenWidth( 1);\n    } else\n    {\n        new_style = new GStyle( *edge->style());\n    }    \n    dialog.setWindowTitle( \"Edge style editor\");\n    dialog.setGStyle( new_style);\n    edge->setStyle( new_style);\n    connect( &dialog, SIGNAL( styleChanged( GStyle *)), view(), SLOT( setEdgeStyle( GStyle *)));\n    if ( dialog.exec() == QDialog::Accepted)\n    {\n        if ( isNotNullP( old_style))\n        {\n            *(old_style) = *(new_style);\n            edge->setStyle( old_style);\n            delete new_style;\n        } else\n        {\n            QString name = QString(\"edge %1 style\").arg(edge->id());\n            new_style->setName( name);\n            styles[ name] = new_style;\n        }\n    } else\n    {\n        edge->setStyle( old_style);\n        delete new_style;\n    }\n    edge->adjustStyles();\n    edge->item()->adjust();\n}\n\nvoid GGraph::showEditNodeStyle()\n{\n    if ( sel_nodes.isEmpty())\n        return;\n    \n    StyleEdit* dialog = new StyleEdit( NULL, true);\n    GNode* node = sel_nodes.first();\n    \n    GStyle* old_style = node->style();\n    GStyle* new_style;\n    if ( isNullP( old_style))\n    {\n        QColor color( view()->palette().windowText().color());\n        new_style = new GStyle();\n        new_style->setPenColor( color);\n        new_style->setPenWidth( 1);\n    } else\n    {\n        new_style = new GStyle( *node->style());\n    }   \n    \n    view()->setStyleEditInfo( new GraphView::StyleEditInfo( node, old_style, new_style, dialog));\n\n    dialog->setWindowTitle( \"Node style editor\");\n    dialog->setGStyle( new_style);\n    node->setStyle( new_style);\n    connect( dialog, SIGNAL( styleChanged( GStyle *)), view(), SLOT( setNodeStyle( GStyle *)));\n    connect( dialog, SIGNAL( finished( int)), view(), SLOT( styleEditFinished( int)));\n    dialog->exec();\n}\n\nvoid GGraph::showWholeGraph()\n{\n    assertd( !view()->isContext());\n    emptySelection();\n    GNode* n;\n    foreachNode( n, this)\n    {\n        n->item()->setVisible( true);\n        n->item()->setOpacityLevel( 1);\n        n->setPriority( MAX_OPACITY);\n        n->setForPlacement( true);\n        n->setStable( false);\n        n->item()->update();\n    }\n    doLayout();\n}\n\n/** Create label on selected edge */\nvoid GGraph::findContext()\n{\n    if ( sel_nodes.isEmpty())\n        return;\n    \n    QQueue< GNode *> border;\n    Marker m = newMarker();\n    foreach( GNode *n, sel_nodes)\n    {\n        n->mark( m);\n        n->setPriority( GVIEW_MAX_PRIORITY);\n        //n->setStable( true);\n        border.enqueue( n);\n    }\n    for ( int i = 0; i < MAX_PLACE_LEN; i++)\n    {\n        int added = border.count();\n        for ( int j = 0; j < added; j++)\n        {\n            GNode *n = border.dequeue(); \n            if ( !n->isPseudo())\n            {\n                selectNode( n);\n                n->item()->highlight();\n            }\n            n->item()->update();\n            GEdge *e;\n            foreachPred( e, n)\n            {\n                GNode * pred = e->pred();\n                \n                if ( pred->mark( m))\n                {\n                    if ( i <= MAX_VISIBLE_LEN \n                         && pred->priority() < MAX_VISIBLE_LEN - i)\n                    {\n                        pred->setPriority( MAX_VISIBLE_LEN - i);\n                    }/* else\n                    {\n                        pred->setPriority( 0);\n                    }*/\n                    border.enqueue( pred);\n                }\n            }\n            foreachSucc( e, n)\n            {\n                GNode * succ = e->succ();\n                if ( succ->mark( m))\n                {\n                    if ( i <= MAX_VISIBLE_LEN\n                         && succ->priority() < MAX_VISIBLE_LEN - i)\n                    {\n                        succ->setPriority( MAX_VISIBLE_LEN - i);\n                    }/* else\n                    {\n                        succ->setPriority( 0);\n                    }*/\n                    border.enqueue( succ);\n                }\n            }\n        }\n    }\n    if ( view()->isContext())\n    {\n        GNode* n;\n        foreachNode( n, this)\n        {\n            /*if ( n->item()->isVisible())\n            {\n                n->setStable();\n            }*/\n            if ( n->isMarked( m))\n            {\n                if ( !n->item()->isVisible())\n                {\n                    n->item()->setVisible( true);\n                    n->item()->setOpacityLevel( 0);\n                }\n                n->setForPlacement( true);\n            } else\n            {\n                if ( n->priority() < GVIEW_MAX_PRIORITY)\n                {\n                    n->setPriority( 0);\n                    n->setForPlacement( false);\n                }\n                n->setStable( false);\n            }\n        }\n        GEdge *e;\n        foreachEdge( e, this)\n        {\n            if ( e->pred()->isPseudo() && e->succ()->isPseudo())\n            {\n                if ( e->realPred()->item()->isVisible()\n                     && e->realSucc()->item()->isVisible())\n                {\n                    int priority = \n                        min<int>( e->realPred()->priority(), e->realSucc()->priority());\n                    e->pred()->item()->setVisible( true);   \n                    e->succ()->item()->setVisible( true);   \n                    e->pred()->setForPlacement( true);\n                    e->succ()->setForPlacement( true);\n                    e->pred()->setPriority( priority);\n                    e->succ()->setPriority( priority);\n                }\n            }\n        }\n        selectOneNode( sel_nodes.first());\n    \n        if ( view()->hasSmoothFocus())\n        {\n            view()->focusOnNode( sel_nodes.first(), true);\n        }\n        doLayout(); \n        foreachNode( n, this)\n        {\n            if ( n->item()->isVisible() && !n->item()->opacityLevel())\n            {\n                n->item()->setPos( n->modelX(), n->modelY());\n            }\n        }\n        view()->startAnimationNodes();\n    }\n    freeMarker( m);\n    \n}\n\nvoid GGraph::deleteEdgeWithControls( GEdge *edge)\n{\n\tQList< GNode *> nodes;\n\tQList< GEdge *> edges;\n    \n    /** Check successor */\n    GNode * succ = edge->succ();\n    while ( succ->isEdgeControl() || succ->isEdgeLabel())\n    {\n        assertd( isNotNullP( succ->firstSucc()));\n        nodes << succ;\n        edges << succ->firstSucc();\n\t\tsucc = succ->firstSucc()->succ();\n    }\n    GNode * pred = edge->pred(); \n    while ( pred->isEdgeControl() || pred->isEdgeLabel())\n    {\n        assertd( isNotNullP( pred->firstPred()));\n        nodes << pred;\n\t\tedges << pred->firstPred();\n        pred = pred->firstPred()->pred();\n    }\n    deleteEdge( edge);\n\tforeach ( GEdge *e, edges)\n    {\n        deleteEdge( e);\n    }\n    foreach ( GNode *n, nodes)\n    {\n        deleteNode( n);\n    }\n\t\n}\n\nvoid GGraph::UpdatePlacement()\n{\n\tQGraphicsScene *scene = view()->scene();\n\t\n\t/**\n\t * Prevent BSP tree from being modified - significantly speeds up node positioning \n\t * For this purpose tree depth is set to one and indexing is turned off\n\t */\n\tint depth = scene->bspTreeDepth();\n    scene->setBspTreeDepth( 1);\n    scene->setItemIndexMethod( QGraphicsScene::NoIndex);\n    GNode *n;\n\tfor ( n = firstNode();\n          isNotNullP( n);\n          n = n->nextNode())\n    {\n        qreal x, y;\n        \n        if ( !n->isEdgeControl())\n        {\n            x = n->modelX() + ( n->item()->borderRect().width() - n->item()->textRect().width()) / 2;\n            y = n->modelY() + ( n->item()->borderRect().height() - n->item()->textRect().height()) / 2;\n\n            //QString str = QString(\"DFS num %1\").arg(n->order());\n            //n->item()->setPlainText(str);\n        } else\n        {\n            x = n->modelX() + n->item()->borderRect().width() / 2;\n            y = n->modelY() + n->item()->borderRect().height() / 2;\n        }\n        n->item()->setPos( x, y);\n    }\n\n    GEdge *e;\n    \n    foreachNode( n, this)\n    {\n        n->item()->show();\n    }\n    foreachEdge( e, this)\n    {\n        e->item()->show();\n    }\n\t/** Restore indexing */\n\tscene->setItemIndexMethod( QGraphicsScene::BspTreeIndex);\n    scene->setBspTreeDepth( depth); \n}\n/**\n * Run layout procedure\n */\nvoid GGraph::doLayout()\n{\n    if ( view()->isContext())\n    {\n        if ( rankingValid())\n        {\n            arrangeHorizontally();\n        } else\n        {\n            /** Run layout algorithm */\n\t        AuxGraph::doLayout();\n            UpdatePlacement();\n        }\n    } else\n    {\n        GNode *n;\n        GEdge *e;\n        \n        foreachNode( n, this)\n        {\n            n->item()->hide();\n        }\n        foreachEdge( e, this)\n        {\n            e->item()->hide();\n        }\n        /** Run layout algorithm */\n\t    AuxGraph::doLayoutConcurrent();\n        //AuxGraph::doLayout();\n        //layoutPostProcess();\n    }\n}\n\n/**\n * Run layout procedure in single thread\n */\nvoid GGraph::doLayoutSingle()\n{\n    if ( view()->isContext())\n    {\n        if ( rankingValid())\n        {\n            arrangeHorizontally();\n        } else\n        {\n            /** Run layout algorithm */\n\t        AuxGraph::doLayout();\n            UpdatePlacement();\n        }\n    } else\n    {\n        GNode *n;\n        GEdge *e;\n        \n        foreachNode( n, this)\n        {\n            n->item()->hide();\n        }\n        foreachEdge( e, this)\n        {\n            e->item()->hide();\n        }\n        /** Run layout algorithm */\n\t    AuxGraph::doLayout();\n        layoutPostProcess();\n    }\n}\n\nvoid GGraph::layoutPostProcess()\n{\n    UpdatePlacement();\n    \n    /** Center view on root node */\n    GNode *root = static_cast<GNode*>( rootNode());\n    if ( isNotNullP( root))\n    {\n        view_p->centerOn( root->item());\n    }\n}\n\n/** Constructor */\nGraphView::GraphView(): \n    curr_pos(),\n    createEdge( false),\n    graph_p( 0),\n\tzoom_scale( 0),\n    view_history( new GraphViewHistory),\n    timer_id( 0),\n    node_animation_timer( 0),\n    smooth_focus( false),\n    editable( false),\n    view_mode( WHOLE_GRAPH_VIEW),\n    style_edit_info( NULL),\n    helper( new EdgeHelper)\n{\n    QGraphicsScene *scene = new QGraphicsScene( this);\n    //scene->setItemIndexMethod( QGraphicsScene::NoIndex);\n    //scene->setSceneRect(0, 0, 10000, 10000);\n    setScene( scene);\n    //setCacheMode( CacheBackground);\n    setViewportUpdateMode( SmartViewportUpdate);\n    setRenderHint( QPainter::Antialiasing);\n    setTransformationAnchor( AnchorViewCenter);\n    setResizeAnchor( AnchorViewCenter);\n    setMinimumSize( 200, 200);\n    setWindowTitle( tr(\"ShowGraph\"));\n    setDragMode( ScrollHandDrag);\n    //setDragMode( RubberBandDrag);\n    tmpSrc = NULL;\n    search_node = NULL;\n\tcreateActions();\n\tcreateMenus();\n\tshow_menus = true;\n\tsetAcceptDrops( false);\n    scene->addItem( helper);\n}\n\n/** Destructor */\nGraphView::~GraphView()\n{\n    scene()->setItemIndexMethod( QGraphicsScene::NoIndex);\n    delete graph_p;\n    delete view_history;\n    delete helper;\n}\n\nvoid GraphView::startAnimationNodes()\n{\n    if ( !node_animation_timer)\n         node_animation_timer = startTimer(1000/25);\n}\n\nvoid \nGraphView::drawBackground(QPainter *painter, const QRectF &rect)\n{\n\n}\n\nvoid \nGraphView::mouseDoubleClickEvent(QMouseEvent *ev)\n{\n    QGraphicsView::mouseDoubleClickEvent( ev);   \n    if( ev->button() & Qt::LeftButton)\n    {\n        QPoint p = ev->pos();\n#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)\n        if ( isEditable() && !scene()->itemAt( mapToScene( ev->pos()), QTransform()))\n#else\n        if ( isEditable() && !scene()->itemAt( mapToScene( ev->pos())))\n#endif\n        {\n            GNode* node = graph()->newNode();\n            QString text = QString(\"Node %1\").arg( node->id());\n            node->item()->setPlainText( text);\n            node->item()->setPos( mapToScene( p));\n        }\n    } else if( isEditable() \n               && ev->button() & Qt::RightButton)\n    {\n#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)\n        QGraphicsItem *node = scene()->itemAt( mapToScene( ev->pos()), QTransform());\n#else\n        QGraphicsItem *node = scene()->itemAt( mapToScene( ev->pos()));\n#endif\n        if ( isNotNullP( node) && qgraphicsitem_cast<NodeItem *>( node))\n        {\n            graph()->emptySelection();\n            graph()->setNodeInFocus( NULL);\n            graph()->deleteNode( qgraphicsitem_cast<NodeItem *>( node)->node());\n        }\n    }\n}\n\nvoid\nGraphView::mousePressEvent(QMouseEvent *ev)\n{\n    if( timer_id)\n    {\n        killTimer( timer_id);\n        timer_id = 0;\n    }\n    QGraphicsView::mousePressEvent( ev);\n}\n\n/** Enable/disable edition */\nvoid GraphView::toggleEdition( bool e)\n{\n    setEditable( e);\n}\n\n/** Insert node in center of view */\nvoid GraphView::insertNodeOnCenter()\n{\n\n}\n\n/** Run layout */\nvoid GraphView::runLayout()\n{\n    graph()->doLayout();\n}\n\nvoid\nGraphView::contextMenuEvent( QContextMenuEvent * e)\n{\n\n}\n\nvoid\nGraphView::mouseReleaseEvent( QMouseEvent *ev)\n{\n    if( ev->button() & Qt::RightButton)\n    {\n        if ( createEdge)\n        {\n#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)\n            QGraphicsItem* item = scene()->itemAt( mapToScene( ev->pos()), QTransform());\n#else\n            QGraphicsItem* item = scene()->itemAt( mapToScene( ev->pos()));\n#endif\n            if ( isNotNullP( item) && qgraphicsitem_cast<NodeItem *>(item))\n            {\n                if ( tmpSrc != qgraphicsitem_cast<NodeItem *>(item)->node())\n                {\n                    GNode* dst_node = qgraphicsitem_cast<NodeItem *>(item)->node();\n                    if ( tmpSrc->isSimple() && dst_node->isSimple())\n                    {   \n                        graph()->newEdge( tmpSrc, dst_node);\n                        show_menus = false;\n                    }\n\t\t\t\t}\n            }\n#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)\n        } else if ( !scene()->itemAt( mapToScene( ev->pos()), QTransform()))\n#else\n        } else if ( !scene()->itemAt( mapToScene( ev->pos())))\n#endif\n        {\n            QMenu *menu = new QMenu( tr( \"&View Menu\"));\n            menu->addAction( editableSwitchAct);\n            menu->addAction( runLayoutAct);\n            menu->exec( mapToGlobal( ev->pos()));\n            delete menu;\n        }\n    }\n    helper->hide();\n    helper->reset();\n    QGraphicsView::mouseReleaseEvent(ev);\n\tcreateEdge = false;\n\tshow_menus = true;\n\ttmpSrc = NULL;\n}\n\nvoid\nGraphView::mouseMoveEvent(QMouseEvent *ev)\n{\n    if ( createEdge)\n    {\n#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)\n        QGraphicsItem* item = scene()->itemAt( mapToScene( ev->pos()), QTransform());\n#else\n        QGraphicsItem* item = scene()->itemAt( mapToScene( ev->pos()));\n#endif\n        if ( isNotNullP( item))\n        {\n            NodeItem *node_item = qgraphicsitem_cast<NodeItem *>(item);\n            if ( isNotNullP( node_item)\n                 && node_item->node()->isSimple())\n            {   \n                if ( areNotEqP( node_item->node(), tmpSrc))\n                    helper->switchToRegular();\n                helper->setDst( node_item);\n            } else\n            {\n                helper->switchToRegular();\n                helper->setDstP( helper->mapFromScene( mapToScene( ev->pos())));\n                helper->setDst( NULL);\n            }\n        } else\n        {\n            helper->switchToRegular();\n            helper->setDstP( helper->mapFromScene( mapToScene( ev->pos())));\n            helper->setDst( NULL);\n        }\n        helper->adjust();\n    }\n    QGraphicsView::mouseMoveEvent(ev);\n}\n\nvoid \nGraphView::keyPressEvent(QKeyEvent *event)\n{\n    QGraphicsView::keyPressEvent( event);\n    if ( !event->isAccepted())\n    {\n        if ( event->key() == Qt::Key_Plus)\n        {\n            zoomIn();\n        } else if ( event->key() == Qt::Key_Minus)\n        {\n            zoomOut();\n        }\n    }\n}\n\n/**\n * Actions for wheel event\n */\nvoid GraphView::wheelEvent(QWheelEvent *event)\n{\n    zoom_scale += WHEELEVENTYDELTA(event) / 100;\n\tupdateMatrix();\n}\n\nvoid GraphView::zoomIn()\n{\n    zoom_scale++;\n    updateMatrix();\n}\n\nvoid GraphView::zoomOut()\n{\n\tzoom_scale--;\n    updateMatrix();\n}\n\nvoid GraphView::zoomOrig()\n{\n    zoom_scale = 0;\n    ensureVisible( 0,0,0,0);\n    checkDelItems();\n    updateMatrix();\n}\n\nvoid GraphView::updateMatrix()\n{\n     qreal scale_val = scaleVal( zoom_scale); \n     QMATRIX scale;\n     qreal prev_scale = QGV_MATRIX().m11();\n     qreal scale_ratio = scale_val / prev_scale; \n     scale.scale( scale_val, scale_val);\n     GNode * focus = graph()->nodeInFocus();\n     if ( isNotNullP( focus))\n     {\n         QPointF item_center = focus->item()->mapToScene( focus->item()->boundingRect())\n                               .boundingRect()\n                               .center();\n         QPointF old_center = mapToScene( viewport()->rect())\n                             .boundingRect()\n                             .center();\n\n         QPointF item_in_view = item_center - old_center;\n         QGV_SETMATRIX( scale); // scale\n         QPointF new_center = old_center + item_in_view * ( scale_ratio - 1) / scale_ratio;\n         centerOn( new_center); // adjust to keep focus point in place\n     } else\n     {\n         QGV_SETMATRIX( scale);\n     }\n     \n}\n\nvoid\nGraphView::deleteItems()\n{\n    int depth = scene()->bspTreeDepth();\n    scene()->setBspTreeDepth( 1);\n    scene()->setItemIndexMethod( QGraphicsScene::NoIndex);\n    foreach ( NodeItem* item, del_node_items)\n    {\n        del_node_items.removeAll( item);  \n        delete item;\n    }\n    foreach ( EdgeItem* item, del_edge_items)\n    {\n        del_edge_items.removeAll( item);  \n        delete item;  \n    }\n    scene()->setItemIndexMethod( QGraphicsScene::BspTreeIndex);\n    scene()->setBspTreeDepth( depth);\n}\n\nvoid GraphView::deleteSelected()\n{\n    graph()->deleteNodes();\n\tgraph()->deleteEdges();\n}\n\nvoid GraphView::createSESelected()\n{\n    graph()->createSelfEdge();\n}\n\nvoid GraphView::createEdgeLabel()\n{\n    graph()->createEdgeLabel( curr_pos);\n}\n\nvoid GraphView::showEdgePred()\n{\n    graph()->showEdgePred();\n}\n\nvoid GraphView::showEdgeSucc()\n{\n    graph()->showEdgeSucc();\n}\n\nvoid GraphView::findContext()\n{\n    graph()->findContext();\n}\n\n/** Show text of the clicked node */\nvoid GraphView::showSelectedNodesText()\n{\n    graph()->showNodesText();\n}\n\n/** Show style editor for node */\nvoid GraphView::showEditNodeStyle()\n{\n    graph()->showEditNodeStyle();\n}\n/** Show style editor for edge */\nvoid GraphView::showEditEdgeStyle()\n{\n    graph()->showEditEdgeStyle();\n}\n\nvoid GraphView::createActions()\n{\n    QString system = QLatin1String(\"win\");\n#ifdef Q_OS_MAC\n    system = QLatin1String(\"mac\");\n#endif\n\n    deleteItemAct = new QAction(tr(\"&Delete\"), this);\n    deleteItemAct->setShortcut(tr(\"Ctrl+D\"));\n    connect(deleteItemAct, SIGNAL(triggered()), this, SLOT( deleteSelected()));\n\n    createSelfEdgeAct = new QAction(tr(\"&Create self-edge\"), this);\n    connect( createSelfEdgeAct, SIGNAL(triggered()), this, SLOT( createSESelected()));\n\n    createEdgeLabelAct = new QAction(tr(\"&Create label\"), this);\n    connect( createEdgeLabelAct, SIGNAL(triggered()), this, SLOT( createEdgeLabel()));\n\n    findContextAct = new QAction(tr(\"&Highlight context\"), this);\n    connect( findContextAct, SIGNAL(triggered()), this, SLOT( findContext()));\n    \n    showTextAct = new QAction(tr(\"&Show text\"), this);\n    connect( showTextAct, SIGNAL(triggered()), this, SLOT( showSelectedNodesText()));\n\n    showPredAct = new QAction(tr(\"Pred\"), this);\n    connect( showPredAct, SIGNAL(triggered()), this, SLOT( showEdgePred()));\n\n    showSuccAct = new QAction(tr(\"Succ\"), this);\n    connect( showSuccAct, SIGNAL(triggered()), this, SLOT( showEdgeSucc()));\n\n    editableSwitchAct = \n        new QAction( QIcon( QString::fromUtf8(\":/images/%1/Edit/Edit.ico\").arg( system)),\n                     tr(\"Editable\"), this);\n    editableSwitchAct->setCheckable( true);\n    editableSwitchAct->setChecked( false);\n    connect( editableSwitchAct, SIGNAL( toggled( bool)), this, SLOT( toggleEdition( bool)));\n    \n    insertNodeAct = new QAction(tr(\"Insert node\"), this);\n    \n    showEditNodeStyleAct = new QAction(tr(\"Change style\"), this);\n    connect( showEditNodeStyleAct, SIGNAL( triggered()), this, SLOT(showEditNodeStyle()));\n\n    showEditEdgeStyleAct = new QAction(tr(\"Change style\"), this);\n    connect( showEditEdgeStyleAct, SIGNAL( triggered()), this, SLOT(showEditEdgeStyle()));\n\n    runLayoutAct = \n        new QAction( QIcon( QString::fromUtf8(\":/images/%1/Synchronize/Synchronize.ico\").arg( system)),\n                     tr(\"&Run Layout\"), this);\n    connect( runLayoutAct, SIGNAL(triggered()), this, SLOT( runLayout()));\n}\n\nvoid GraphView::createMenus()\n{\n    nodeItemMenu = new QMenu( tr( \"&Node Item\"));\n    nodeItemMenu->addAction( deleteItemAct);\n    nodeItemMenu->addAction( createSelfEdgeAct);\n\n\tedgeItemMenu = new QMenu( tr( \"&Edge Item\"));\n    edgeItemMenu->addAction( deleteItemAct);\n}\n\nQMenu* GraphView::createMenuForNode( GNode *n)\n{\n    QMenu* menu = new QMenu( tr( \"&Node\"));\n    menu->addAction( deleteItemAct);\n    deleteItemAct->setEnabled( isEditable());\n    if ( !n->isPseudo())\n    {\n        menu->addAction( findContextAct);\n        menu->addAction( showTextAct);\n        menu->addSeparator();\n        menu->addAction( createSelfEdgeAct);\n        createSelfEdgeAct->setEnabled( isEditable());\n        menu->addAction( showEditNodeStyleAct);\n        showEditNodeStyleAct->setEnabled( isEditable());\n    }\n    return menu;\n}\n\nQMenu* GraphView::createMenuForEdge( GEdge *e)\n{\n    QMenu* menu = new QMenu( tr( \"&Edge\"));\n    menu->addAction( showPredAct);\n    menu->addAction( showSuccAct);\n    menu->addSeparator();\n    menu->addAction( deleteItemAct);\n    deleteItemAct->setEnabled( isEditable());\n    menu->addAction( createEdgeLabelAct);\n    createEdgeLabelAct->setEnabled( isEditable());\n    menu->addAction( showEditEdgeStyleAct);\n    showEditEdgeStyleAct->setEnabled( isEditable());\n    return menu;\n}\n\nvoid GraphView::dragEnterEvent(QDragEnterEvent *event)\n{\n\t/*if ( event->mimeData()->hasUrls())\n\t\tevent->acceptProposedAction();*/\n}\n\nvoid GraphView::dropEvent(QDropEvent *event)\n{\n\t/*const QMimeData *mimeData = event->mimeData();\n\n\tif ( mimeData->hasUrls())\n\t{\n\t\tQList<QUrl> urlList = mimeData->urls();\n\t\tQString text;\n\n\t\tfor ( int i = 0; i < urlList.size(); ++i)\n\t\t{\n\t\t\tQString url = urlList.at(i).path();\n\n\t\t}\n    }\n\n\tevent->acceptProposedAction();*/\n}\n \nvoid GraphView::dragMoveEvent( QDragMoveEvent *event)\n{\n\t//event->acceptProposedAction();\n}\n\nvoid GraphView::advanceNodes()\n{\n    GNode *n;\n    bool advanced = false;\n    foreachNode( n, graph())\n    {\n        if ( n->item()->advance())\n            advanced = true;\n    }\n    if ( !advanced)\n    {\n        killTimer( node_animation_timer);\n        node_animation_timer = 0;\n    }\n}\n\nvoid GraphView::advanceView()\n{\n    GNode *target = graph()->nodeInFocus(); \n    qreal STEP_LEN = 10 / scaleVal( zoom_scale);\n    const qreal STEP_SCALE = 0.2;\n    if ( isNotNullP( target))\n    {\n        QRectF item_rect = target->item()->mapToScene( target->item()->boundingRect()).boundingRect();\n        QRectF view_rect = mapToScene( viewport()->rect())\n                           .boundingRect();\n        \n        QLineF line( view_rect.center(), item_rect.center());\n        \n        qreal dist = line.length();\n        QPointF displacement( STEP_LEN * line.dx() / dist, STEP_LEN * line.dy() / dist);\n        if ( dist > STEP_LEN /2)\n            centerOn( view_rect.center() + displacement);\n        \n        QRectF new_view_rect = mapToScene( viewport()->rect()).boundingRect();\n        QLineF step( new_view_rect.center(), view_rect.center());\n        qreal len = step.length();\n        \n        if ( zoom_out_done)\n        {   \n            if ( dist < STEP_LEN || len < STEP_LEN /2)\n            {\n                zoom_scale+=STEP_SCALE;\n                updateMatrix();\n                if ( abs<qreal>( zoom_scale - preferred_zoom) <= STEP_SCALE * 2)\n                {\n                    zoom_scale = preferred_zoom;\n                    updateMatrix();\n                    killTimer( timer_id);\n                    timer_id = 0;\n                    centerOn( target->item());\n                }\n            }\n        }\n        if ( ! zoom_out_done\n             && ( abs<qreal>( line.dx()) > view_rect.width()\n                  || abs<qreal>( line.dy()) > view_rect.height()))\n        {\n            zoom_scale-=STEP_SCALE;\n            QMATRIX scale;\n            scale.scale( scaleVal( zoom_scale), scaleVal( zoom_scale));\n            QGV_SETMATRIX( scale);\n        } else\n        {\n            zoom_out_done = true;\n        }\n    }\n}\n\nvoid GraphView::timerEvent( QTimerEvent *event)\n{\n    if ( !event->timerId())\n        return;\n    if ( event->timerId() == timer_id)\n    {\n        advanceView();\n    }\n    if ( event->timerId() == node_animation_timer)\n    {\n        advanceNodes();\n    }\n}\nvoid GraphView::clearSearch()\n{\n    search_node = NULL;\n}\n\nvoid GraphView::focusOnNode( GNode *n, bool gen_event)\n{\n    graph()->selectOneNode( n);\n    \n    if ( smooth_focus)\n    {\n        if (!timer_id)\n             timer_id = startTimer(1000/25);\n        preferred_zoom = zoom_scale;\n        zoom_out_done = false;\n    } else\n    {\n        centerOn( n->item());\n    }\n    if ( gen_event && !n->isNodeInFocus())\n        view_history->focusEvent( n);\n    graph()->setNodeInFocus( n);\n}\n\nGNode *\nGraphView::findNextNodeWithText( QString &findStr,\n                                 QTextDocument::FindFlags flags)\n{\n\tGNode *n;\n\t\n    if ( isNullP( search_node))\n    {\n        foreachNode( n, graph())\n        {\n            if ( isNullP( n->nextNode()))\n                break;\n        }\n    } else\n    {\n        n = search_node->prevNode();\n    }\n\n    while ( isNotNullP( n))\n    {\n\t\tQTextDocument *doc = n->doc();\n\t\tif ( isNotNullP( doc) && !doc->find( findStr, 0, flags).isNull())\n        {\n            search_node = n;        \n            break;\n        }\n        n = n->prevNode();\n\t}\n\tif ( isNotNullP( n))\n\t{\n\t\tif ( isContext())\n        {\n            graph()->emptySelection();\n            graph()->selectNode( n);\n            findContext();\n        }\n        focusOnNode( n, true);\n\t\treturn n;\n\t} else\n\t{\n\t\tsearch_node = NULL;        \n        return NULL;\n\t}\n}\n\nGNode *\nGraphView::findPrevNodeWithText( QString &findStr,\n                                 QTextDocument::FindFlags flags)\n{\n\tGNode *n;\n\t\n    flags ^= QTextDocument::FindBackward; // Unset backward search flag\n    for ( n = isNullP( search_node) ? graph()->firstNode() : search_node->nextNode();\n          isNotNullP( n);\n          n = n->nextNode())\n    {\n\t\tQTextDocument *doc = n->doc();\n\t\tif ( isNotNullP( doc) && !doc->find( findStr, 0, flags).isNull())\n        {\n            search_node = n;        \n            break;\n        }\n\t}\n\tif ( isNotNullP( n))\n\t{\n\t\tif ( isContext())\n        {\n            graph()->emptySelection();\n            graph()->selectNode( n);\n            findContext();\n        }\n        focusOnNode( n, true);\n\t\treturn n;\n\t} else\n\t{\n\t\tsearch_node = NULL;        \n        return NULL;\n\t}\n}\n/**\n * Find node by its ID from dump\n */\nGNode* GraphView::findNodeById( int id)\n{\n\tGNode *n;\n\tforeachNode( n, graph())\n\t{\n        if ( !n->isEdgeControl()\n             && !n->isEdgeLabel()\n             && n->irId() == id)\n\t\t\tbreak;\n\t}\n\tif ( isNotNullP( n))\n\t{\n        if ( isContext())\n        {\n            graph()->emptySelection();\n            graph()->selectNode( n);\n            findContext();\n        }\n        focusOnNode( n, true);\n\t\treturn n;\n\t} else\n\t{\n\t\treturn NULL;\n\t}\n}\n\n/**\n * Find node by its label\n */\nGNode* GraphView::findNodeByLabel( QString label)\n{\n\tGNode *n;\n\tforeachNode( n, graph())\n\t{\n        if ( !n->isEdgeControl()\n             && !n->isEdgeLabel())\n        {\n            QString node_label = n->item()->toPlainText();        \n            if ( node_label == label)\n                 break;\n        }\n\t}\n\tif ( isNotNullP( n))\n\t{\n        if ( isContext())\n        {\n            graph()->emptySelection();\n            graph()->selectNode( n);\n            findContext();\n        }\n        focusOnNode( n, true);\n\t\treturn n;\n\t} else\n\t{\n\t\treturn NULL;\n\t}\n}\n\n/** Repeat navigation event */\nvoid GraphView::replayNavigationEvent( NavEvent *ev)\n{\n    assertd( isNotNullP( ev));\n    \n    if ( ev->isFocus())\n    {\n        assertd( isNotNullP( ev->node()));\n        if ( isContext())\n        {\n            graph()->emptySelection();\n            graph()->selectNode( ev->node());\n            findContext();\n        }\n        focusOnNode( ev->node(), false); \n    }\n}\n\nvoid GraphView::toggleSmoothFocus( bool smooth)\n{\n    smooth_focus = smooth;\n}\n\nvoid GraphView::toggleViewMode( bool context)\n{\n    if ( context && CONTEXT_VIEW != view_mode)\n    {\n        view_mode = CONTEXT_VIEW;\n        graph()->clearNodesPriority();\n    } else if ( !context && WHOLE_GRAPH_VIEW != view_mode)\n    {\n        view_mode = WHOLE_GRAPH_VIEW;\n        graph()->showWholeGraph();\n    }\n}\n\n/** Navigate backward */\nvoid GraphView::navPrev()\n{\n    NavEvent * ev = view_history->prev();\n    if ( isNotNullP( ev))\n        replayNavigationEvent( ev);\n}\n\n/** Navigate forward */\nvoid GraphView::navNext()\n{\n    NavEvent * ev = view_history->next();\n    if ( isNotNullP( ev))\n        replayNavigationEvent( ev);\n}\n/** Erase node from history */\nvoid GraphViewHistory::eraseNode( GNode *n)\n{\n    it = events.begin();\n    while ( it != events.end())\n    {\n        NavEvent *ev = *it;\n        if ( ev->isFocus() && areEqP( ev->node(), n))\n        {\n            it = events.erase( it);\n        } else\n        {\n            it++;\n        }\n    }\n}\n/** Get last event */\nNavEvent *GraphViewHistory::last()\n{\n    if ( events.count() > 0)\n    {\n        it = events.end();\n        it--;\n        return *it;\n    }\n    return NULL;\n}\n/** Get prev event */\nNavEvent *GraphViewHistory::prev()\n{\n    if ( it != events.begin())\n    {\n        it--;\n        return *it;\n    }\n    return NULL;\n}\n/** Get next event */\nNavEvent *GraphViewHistory::next()\n{\n    if ( it != events.end())\n        it++;\n    if ( it != events.end())\n    {\n        return *it;\n    }\n    return NULL;\n}\n/** New event */\nvoid GraphViewHistory::viewEvent( NavEventType t, GNode *n)\n{\n    NavEvent *ev = new NavEvent( t, n);\n    if ( it != events.end())\n        it++;\n    if ( it != events.end())\n        events.erase( it, events.end());\n    events.push_back( ev);\n    it = events.end();\n    it--;\n}\n\n/**\n * Implementation of XML writing\n */\nvoid \nGGraph::writeToXML( QString filename)\n{\n    QFile file( filename);\n    if (!file.open(QFile::WriteOnly | QFile::Text))\n    {\n        assertd( 0);\n        return;\n    }\n    \n    QList< QDomElement> elements;\n\n    foreach ( GStyle *style, styles)\n    {\n        if ( style->numItems() != 1)\n        {\n            QDomElement e = createElement( \"style\");\n            elements.push_back( e);\n            style->writeElement( e);\n            //QDomNode e2 = graph()->documentElement().removeChild( e);\n            //assertd( !e2.isNull());\n            QDomNode n = documentElement().insertBefore( e, documentElement().firstChild());\n            ASSERTD( !n.isNull());\n        }\n    }\n\n    /** Update element for each node */\n    for ( GNode *n = firstNode(); isNotNullP( n); n = n->nextNode())\n    {\n        n->updateElement();\n    }\n\n    /** Update element for each edge */\n    for ( GEdge *e = firstEdge(); isNotNullP( e); e = e->nextEdge())\n    {\n        e->updateElement();\n    }\n\n    QTextStream out( &file);\n    save(out, IndentSize);\n\n    foreach ( QDomElement el, elements)\n    {\n        QDomNode n = documentElement().removeChild( el);\n        ASSERTD( !n.isNull());\n    }\n}\n/**\n * Build graph from XML description\n */\nvoid\nGGraph::readFromXML( QString txt)\n{\n\n    if ( !setContent( txt))\n    {\n        throw GGraphError( \"Not a good-formated xml file\");\n    }\n\n    /**\n     * Read nodes and create them\n     */\n    QDomElement docElem = documentElement();\n\n    QHash< GraphUid, GNode *> n_hash;\n    \n    for ( QDomNode n = docElem.firstChild();\n          !n.isNull();\n          )\n    {\n        QDomElement e = n.toElement(); // try to convert the DOM tree node to an element.\n        QString error_msg = QString(\"in line %1: \").arg( n.lineNumber());\n\n        //Not an element, proceed to next node\n        if ( e.isNull())\n            continue;\n        \n        /** Parse element and its attributes */\n        //Node\n        if ( e.tagName() == QString( \"node\"))\n        {\n            GNode *node = newNode( e);\n            node->readFromElement( e);\n            n_hash[ e.attribute( \"id\").toLongLong()] = node;\n\n            if ( e.hasAttribute(\"style\"))\n            {\n                if ( styles.find( e.attribute(\"style\")) == styles.end())\n                    throw GGraphError( error_msg.append(\"unknown style\"));\n                node->setStyle( styles[ e.attribute(\"style\")]);\n            } else\n            {\n                // Try to parse style-definining fields\n                GStyle *style = new GStyle( e); // possible exception GGraphError\n                if ( style->isDefault())\n                {\n                    delete style;\n                } else\n                {\n                    QString name(\"node %1 style\");\n                    name.arg( node->id());\n                    style->setName( name);\n                    styles[ name] = style;\n                    node->setStyle( style);\n                }\n            }\n        }\n        if ( e.tagName() == QString( \"style\"))\n        {\n            GStyle *style = new GStyle( e); // possible exception GGraphError\n            styles[ e.attribute( \"name\")] = style;\n            n = n.nextSibling();\n            documentElement().removeChild( e);\n            continue;\n        }\n        n = n.nextSibling();\n    }\n    \n    for ( QDomNode n = docElem.firstChild();\n          !n.isNull();\n          n = n.nextSibling())\n    {\n        QDomElement e = n.toElement(); // try to convert the DOM tree node to an element.\n        QString error_msg = QString(\"in line %1: \").arg( n.lineNumber());\n\n        /** Cannot convert node to element or this element is not a edge description */\n        if ( e.isNull() \n             || !( e.tagName() == QString( \"edge\")))\n             continue;\n       \n        if ( !e.hasAttribute(\"source\"))\n                throw GGraphError( error_msg.append(\"malformed edge description: no source\"));\n\n        if ( !e.hasAttribute(\"target\"))\n            throw GGraphError( error_msg.append(\"malformed edge description: no target\"));\n\n        bool ok = false;\n        GraphUid pred_id = e.attribute( \"source\").toLongLong( &ok);\n        if ( !ok)\n            throw GGraphError( error_msg.append(\"malformed edge description: wrong source id\"));\n\n        GraphUid succ_id = e.attribute( \"target\").toLongLong( &ok);\n        if ( !ok)\n            throw GGraphError( error_msg.append(\"malformed edge description: wrong target id\"));\n\n        if ( n_hash.find( pred_id) == n_hash.end())\n            throw GGraphError( error_msg\n                               .append(\"malformed edge description: predecessor node missing in graph\"));\n        if ( n_hash.find( succ_id) == n_hash.end())\n            throw GGraphError( error_msg\n                               .append(\"malformed edge description: successor node missing in graph\"));\n\n        GNode *pred = n_hash[ pred_id];\n        GNode *succ = n_hash[ succ_id];\n        GEdge *edge = newEdge( pred, succ, e);\n        edge->readFromElement( e);\n\n        if ( e.hasAttribute(\"style\"))\n        {\n            if ( styles.find( e.attribute(\"style\")) == styles.end())\n                throw GGraphError( error_msg.append(\"unknown style\"));\n            edge->setStyle( styles[ e.attribute(\"style\")]);\n        } else\n        {\n            // Try to parse style-definining fields\n            GStyle *style = new GStyle( e); // possible exception GGraphError\n            if ( style->isDefault())\n            {\n                delete style;\n            } else\n            {\n                QString name(\"edge %1 style\");\n                name.arg( edge->id());\n                style->setName( name);\n                styles[ name] = style;\n                edge->setStyle( style);\n            }\n        }\n    }\n}\n\n/**\n * Change node's style\n */\nvoid GraphView::setNodeStyle( GStyle *style)\n{\n    graph()->setNodeStyle( style);\n}\n\n/**\n * Change edge's style\n */\nvoid GraphView::setEdgeStyle( GStyle *style)\n{\n    graph()->setEdgeStyle( style);\n}\n"
  },
  {
    "path": "showgraph/GraphView/graph_view.h",
    "content": "/**\n * @file: graph_view.h \n * Graph View class definition.\n * @defgroup GUIGraph Graph Visualization System\n * @ingroup GUI\n */\n/* GUI for ShowGraph tool.\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @page iface Graph editor interface\n * Graph editor.\n * \n * Here's list of conventional editing tasks and how they are performed with Showgraph\n * -# Create new node - double click on free space\n * -# Create edge - draw edge holding down right mouse button\n * -# Delete node/edge - use delete option from context menu\n * -# Enter text in node - double click on node to enable its text editor\n * -# Move node - press left mouse button on it and drag\n * -# Create edge control point - double click on edge\n * -# Zoom view - press '-' and '+' or use mouse wheel\n * -# Invoke auto layout - select 'Run Layout' from View menu or simply press F5 \n */\n#ifndef GRAPH_VIEW_H\n#define GRAPH_VIEW_H\n\n#include \"gview_impl.h\"\n\n/**\n * Navigation event types\n * @ingroup GUIGraph\n */\nenum NavEventType\n{\n    /** Focus on node event */\n    NAV_EVENT_NODE_FOCUS,\n    /** Number of event types */\n    NAV_EVENT_TYPES_NUM\n};\n\n/**\n * Navigation event\n * @ingroup GUIGraph\n */\nclass NavEvent\n{\n    /** data associated with event */\n    union NavEventData\n    {\n        /** Node */\n        GNode *node;\n    };\n\n    NavEventType type;\n    NavEventData data;\npublic:\n    /** Constructor from type only */\n    inline NavEvent( NavEventType t): type( t)\n    {\n        data.node = NULL;\n    }\n    /** Constructor from type and node */\n    inline NavEvent( NavEventType t, GNode *n): type( t)\n    {\n        data.node = n;\n    }\n    /** Get associated node */\n    inline GNode *node() const\n    {\n        return data.node;\n    }\n    /** Set node */\n    inline void setNode( GNode *n)\n    {\n        data.node = n;\n    }\n    /** Check if event is a focus on node */\n    bool isFocus() const\n    {\n        return type == NAV_EVENT_NODE_FOCUS; \n    }\n};\n\n/**\n * History of graph view navigation\n * @ingroup GUIGraph\n */\nclass GraphViewHistory\n{\n    QList< NavEvent *> events; // List of events\n    QList< NavEvent *>::Iterator it; // Iterator to hold current position in list\npublic:\n    /** Constructor */\n    GraphViewHistory(): events()\n    {\n        it = events.end();\n    };\n    /** Destructor */\n    ~GraphViewHistory()\n    {\n        foreach ( NavEvent *ev, events)\n        {\n            delete ev;\n        }\n    }\n    /** Get last event */\n    NavEvent *last();\n    /** Get prev event */\n    NavEvent *prev();\n    /** Get next event */\n    NavEvent *next();\n    /** New event */\n    void viewEvent( NavEventType t, GNode *n = NULL);\n\n    /** New focus event */\n    inline void focusEvent( GNode *n)\n    {\n        assertd( isNotNullP( n));\n        viewEvent( NAV_EVENT_NODE_FOCUS, n);\n    }\n    /** Erase node from history */\n    void eraseNode( GNode *n);\n};\n\n/**\n * Graph for graphics. Graph model layer of GraphView.\n * @ingroup GUIGraph\n */\nclass GGraph: public AuxGraph\n{\n    GraphView *view_p;\nprotected:\n    Marker nodeTextIsShown;\n    QList< GNode* > sel_nodes;\n    QList< GEdge* > sel_edges;\n    QHash< QString, GStyle *> styles;\n    NodeNav node_in_focus;// Node in focus + navigation sector\n    \n    /** Node creation reimplementaiton */\n    virtual Node * createNode( int _id)\n    {\n        GNode* node_p = new ( node_pool) GNode( this, _id);\n        return node_p;\n    }\n    /** Edge creation reimplementation */\n    virtual Edge * createEdge( int _id, Node *_pred, Node* _succ)\n    {\n        return new ( edge_pool) GEdge(  this, _id,\n                                        static_cast<GNode *>( _pred), \n                                        static_cast<GNode *>( _succ));\n    }\npublic:\n    /** Constructor */\n    inline GGraph( GraphView *v, bool create_pools):\n        AuxGraph( false),\n        view_p( v),\n        node_in_focus( NULL, UNDEF_SECTOR)\n    {\n        nodeTextIsShown = newMarker();\n \n        /** Pools' creation routine */\n        if ( create_pools)\n        {\n            node_pool = new FixedPool< GNode>();\n            edge_pool = new FixedPool< GEdge>();\n        }\n    }\n    \n    /** Destructor */\n    virtual ~GGraph();\n\n    /** New graphical node */\n    virtual GNode* newNode();\n    /** New graphical node */\n    virtual GNode* newNode( QDomElement e);\n    /** New graphical edge */\n    virtual GEdge* newEdge( GNode* pred, GNode* succ);\n    /** New graphical edge */\n    virtual GEdge* newEdge( GNode* pred, GNode* succ, QDomElement e);\n    \n    /** Reimplementation of newEdge virtual function of base class */\n    AuxEdge* newEdge( AuxNode * pred, AuxNode *succ)\n    {\n        return ( AuxEdge*)newEdge( static_cast< GNode *>( pred),\n                                    static_cast< GNode *> (succ));\n    }\n    /** Reimplementation of newEdge virtual function of base class */\n    AuxEdge* newEdge( AuxNode * pred, AuxNode *succ, QDomElement e)\n    {\n        return ( AuxEdge*)newEdge( static_cast< GNode *>( pred),\n                                    static_cast< GNode *> (succ), e);\n    }\n    /** Get graph's first edge */\n    inline GEdge* firstEdge() \n    {\n        return static_cast< GEdge *>( AuxGraph::firstEdge());\n    }\n    /** Get graph's first node */\n    inline GNode* firstNode()\n    {\n        return static_cast< GNode *>( AuxGraph::firstNode());\n    }\n    /**\n     * Run layout procedure\n     */\n    void doLayout();\n    /**\n     * Run layout procedure in single thread mode\n     */\n    void doLayoutSingle();\n\n    /**\n     * Assign placement coordinates to node items\n     */\n    void UpdatePlacement();\n    /**\n     * Reimplementation of layout's post processing step\n     */\n    void layoutPostProcess();\n\n    /** Get corresponding graph view widget */\n    inline GraphView *view() const\n    {\n        return view_p;\n    }\n    void showNodesText();\n    /**\n     * Add node to selection\n     */\n    inline void selectNode( GNode *n)\n    {\n        sel_nodes << n;\n    }\n    /** Get node in focus */\n    inline GNode* nodeInFocus() const\n    {\n        return node_in_focus.node();\n    }\n    /** Get current navigation sector */\n    inline NavSector nodeNavigationSector() const\n    {\n        return node_in_focus.sector();\n    }\n    /** Set node in focus */\n    inline void setNodeInFocus( GNode *n, NavSector sector = UNDEF_SECTOR)\n    {\n        node_in_focus = NodeNav( n, sector);\n    }\n    void selectOneNode(GNode *n);\n    /**\n     * Clear list of selected nodes\n     */\n    inline void emptySelection()\n    {\n        foreach (GNode *n, sel_nodes)\n        {\n            n->item()->toRegular();\n            n->item()->update();\n        }\n        sel_nodes.clear();\n        sel_edges.clear();\n    }\n    /**\n     * Add node to selection\n     */\n    inline void selectEdge( GEdge *e)\n    {\n        sel_edges << e;\n    }\n    /**\n     * Delete scheduled nodes\n     */\n    void deleteNodes();\n\n    /** Delete edge with all of the edge controls on it */\n    void deleteEdgeWithControls( GEdge *e);\n\n    /**\n     * Delete scheduled edges\n     */\n    void deleteEdges();\n\n    /**\n     * Create self edge on selected node\n     */\n    void createSelfEdge();\n\n    /**\n     * Create label on selected edge\n     */\n    void createEdgeLabel( QPointF pos);\n\n    /**\n     * Create label on selected edge\n     */\n    void findContext();\n    \n    /**\n     * Make all nodes of graph visible and eligible for placement\n     */\n    void showWholeGraph();\n\n    /**\n     * Zero nodes' priorities\n     */\n    void clearNodesPriority();\n\n    /**\n     * Show predecessor of selected edge\n     */\n    void showEdgePred();\n    /**\n     * Show successor of selected edge\n     */\n    void showEdgeSucc();\n\n    /**\n     * Save graph as an XML file\n     */\n    virtual void writeToXML( QString filename);\n\n    /**\n     * Build graph from XML description\n     */\n    virtual void readFromXML( QString filename);\n    /**\n     * Show style editor for selected nodes\n     */\n    void showEditNodeStyle();\n    /**\n     * Change node's style\n     */\n    void setNodeStyle( GStyle *style);\n    /**\n     * Show style editor for selected edges\n     */\n    void showEditEdgeStyle();\n    /**\n     * Change edge's style\n     */\n    void setEdgeStyle( GStyle *style);\n    /**\n     * Add a style\n     */\n    void addStyle( QString &name, GStyle *style)\n    {\n        styles[ name] = style;\n    }\n};\n\n/**\n * View mode types\n */\nenum GraphViewMode\n{\n    /** Whole graph view mode */\n    WHOLE_GRAPH_VIEW,\n    /** Context view mode */\n    CONTEXT_VIEW,\n    /** Number of view modes for graph */\n    GRAPH_VIEW_MODES_NUM\n};\n\n/**\n * Graph visualization class\n */\nclass GraphView: public QGraphicsView\n{\n    Q_OBJECT; /** For MOC */\nprivate:\n    /** Pointer to model graph */   \n    GGraph * graph_p;\n    /** History of view events */\n    GraphViewHistory *view_history;\n    /** View mode */\n    GraphViewMode view_mode;\n    /** Item for showing future edge during the edge creation process */\n    EdgeHelper *helper;\n    /** Edition enabled/disabled */\n    bool editable;\n    /** Deleted items lists */\n    QList< NodeItem* > del_node_items;\n    QList< EdgeItem* > del_edge_items;\n\n    /** Actions */\n    QAction *editableSwitchAct;\n    QAction *insertNodeAct;\n    QAction *runLayoutAct;\n    QAction *deleteItemAct;\n    QAction *createSelfEdgeAct;\n    QAction *createEdgeLabelAct;\n    QAction *showPredAct;\n    QAction *showSuccAct;\n    QAction *findContextAct;\n    QAction *showEditNodeStyleAct;\n    QAction *showEditEdgeStyleAct;\n    QAction *showTextAct;\n    \n    /** Context menus */\n    QMenu *nodeItemMenu;\n    QMenu *edgeItemMenu;\n    \n    /** Temporary data */\n    int timer_id;\n    int node_animation_timer;\n    QPointF curr_pos;\n    bool createEdge;\n    bool show_menus;\n    \n    bool smooth_focus;\n    bool smooth_layout_adjustment;\n\n    bool zoom_out_done;\n    GNode *tmpSrc;\n    GNode *search_node;\n    qreal zoom_scale;\n    qreal preferred_zoom;\n\n\nprotected:\n    void createActions();\n    void createMenus();\nsignals:\n    /** Signal that node is clicked */\n    void nodeClicked( GNode *n);\npublic:\n    /**\n     * @brief Stores temporary info used for saving old style and node/edge being edited.\n     * When showing style edit dialog we need to remember old state and the object\n     * that is being edited. The StyleEditInfo structure is used for these purposes.\n     */\n    struct StyleEditInfo\n    {\n        GEdge* edge;\n        GNode* node;\n        GStyle *old_style;\n        GStyle *new_style;\n        StyleEdit* dialog;\n        StyleEditInfo( GEdge* e, GStyle *olds, GStyle *news, StyleEdit* d):\n            edge( e), node(NULL), old_style(olds), new_style( news), dialog( d)\n        {}\n        StyleEditInfo( GNode* n, GStyle *olds, GStyle *news, StyleEdit* d):\n            edge( NULL), node(n), old_style(olds), new_style( news), dialog( d)\n        {}\n    };\nprotected:\n    /** Temporary info for style edition */\n    StyleEditInfo *style_edit_info;\npublic slots:\n    /** Navigate backward */\n    void navPrev();\n    /** Navigate forward */\n    void navNext();\n    /** Clear search node */\n    void clearSearch();\n    /** Delete one item     */\n    void deleteSelected();\n    /** create self edge on selected node */\n    void createSESelected();\n    /** Create edge label */\n    void createEdgeLabel();\n    /** Show edge predecessor */\n    void showEdgePred();\n    /** Show edge successor */\n    void showEdgeSucc();\n    /** Find node's context */\n    void findContext();\n    /** Toggle smooth focusing mode ( moving viewport to show user how to get from one node to anoter) */\n    void toggleSmoothFocus( bool smooth);\n    /** Toggle view mode */\n    void toggleViewMode( bool context);\n    /** Show text of the clicked node */\n    void showSelectedNodesText();\n    /** Enable/disable edition */\n    void toggleEdition( bool e);\n    /** Insert node in center of view */\n    void insertNodeOnCenter();\n    /** Show style editor for node */\n    void showEditNodeStyle();\n    /** Show style editor for edge */\n    void showEditEdgeStyle();\n    /** Run layout */\n    void runLayout();\n    /** Change node's style */\n    void setNodeStyle( GStyle *style);\n    /** Change edge's style */\n    void setEdgeStyle( GStyle *style);\n    /** Style edit finished */\n    void styleEditFinished( int result);\npublic:\n    QProgressDialog *dialog;\n    /** Constants */\n#ifdef _DEBUG\n    static const int MAX_DELETED_ITEMS_COUNT = 100;\n#else\n    static const int MAX_DELETED_ITEMS_COUNT = 10000;\n#endif\n    /** Constructor */\n    GraphView();\n    /** Destructor */\n    virtual ~GraphView();\n    /** Get action for toggling edit mode */\n    inline QAction* toggleEditableAction() const\n    {\n        return editableSwitchAct;\n    }\n    /** Return true if graph enabled for edition */\n    inline bool isEditable() const\n    {\n        return editable;\n    }\n    /** Return true if graph enabled for edition */\n    inline void setEditable( bool val = true)\n    {\n        editable = val;\n    }\n    /** Return true if smooth focus is enabled */\n    inline bool hasSmoothFocus() const\n    {\n        return smooth_focus;\n    }\n    \n    /** Return true if view operates in context mode */\n    inline bool isContext() const\n    {\n        return view_mode == CONTEXT_VIEW;\n    }\n    /** Return saved position */\n    inline QPointF currPos() const\n    {\n        return curr_pos;\n    }\n    /** Set current event position */\n    inline void setCurrPos( QPointF p)\n    {\n        curr_pos = p;\n    }\n    /** Get view history */\n    inline GraphViewHistory * viewHistory() const\n    {\n        return view_history;\n    }\n    /** Get current search point */\n    inline GNode * searchNode() const\n    {\n        return search_node;\n    }\n    /** Show text of the clicked node */\n    inline void showNodeText( GNode * n)\n    {\n        emit nodeClicked( n);\n    }\n\n    /** Set model graph */\n    inline void setGraph( GGraph *g)\n    {\n        graph_p = g;\n    }\n    /** Get pointer to model graph */\n    inline GGraph *graph() const\n    {\n        return graph_p;\n    }\n    /** Get context menu for nodes */\n    inline QMenu *nodeMenu() const\n    {\n        return nodeItemMenu;\n    }\n    /** Get context menu for edges */\n    inline QMenu *edgeMenu() const\n    {\n        return edgeItemMenu;\n    }\n\n    /** Create menu for particular node */\n    virtual QMenu* createMenuForNode( GNode *n);\n    \n    /** Create menu for particular edge */\n    virtual QMenu* createMenuForEdge( GEdge *e);\n\n    void dragEnterEvent( QDragEnterEvent *event);\n\n    void dropEvent( QDropEvent *event);\n\n    void dragMoveEvent( QDragMoveEvent *event);\n\n    /** draw background reimplementation */\n    void drawBackground( QPainter *painter, const QRectF &rect);\n    /** Mouse double click event handler reimplementation */\n    void mouseDoubleClickEvent( QMouseEvent *event);\n    /** Mouse press event handler reimplementation */\n    void mousePressEvent( QMouseEvent *event);\n    /** Mouse move event handler reimplementation */\n    void mouseMoveEvent( QMouseEvent *event);\n    /** Mouse release event handler reimplementation */\n    void mouseReleaseEvent( QMouseEvent *event);\n    /** Context menu event handler */\n    void contextMenuEvent( QContextMenuEvent * e );\n    /** Keypress event handler reimplementation */\n    void keyPressEvent( QKeyEvent *event);\n\n    /** Mouse wheel event handler reimplementation */\n    void wheelEvent( QWheelEvent *event);\n    /** Zoom the view in */\n    void zoomIn();\n    /** Zoom the view out */\n    void zoomOut();\n    /** Restore original zoom */\n    void zoomOrig();\n    /** Do the transofrmation( scale) */\n    void updateMatrix();\n    /** Focus on node */\n    void focusOnNode( GNode *n, bool gen_event);\n    /** Start animation for nodes */\n    void startAnimationNodes();\n    /** Advance view in animated focusing procedure */\n    void advanceView();\n    /** Advance nodes in animation sequence */\n    void advanceNodes();\n    /** Replay navigation event */\n    void replayNavigationEvent( NavEvent *event);\n    /** Check if we are in the process of the edge creation */\n    inline bool isCreateEdge() const\n    {\n        return createEdge;\n    }\n    /** Check if we are in the process of the edge creation */\n    inline bool isShowContextMenus() const\n    {\n        return show_menus;\n    }\n    /** Set the state of ege creation */\n    inline void SetCreateEdge( bool val)\n    {\n        createEdge = val;\n    }\n    /** Save the pointer to source node for new edge */\n    inline void SetTmpSrc( GNode* node)\n    {\n        tmpSrc = node;\n        helper->setSrc( node->item());\n        helper->setDst( NULL);\n        helper->adjust();\n    }\n    /** Show edge helper item */\n    inline void showHelper()\n    {\n        helper->adjust();\n        helper->show();\n    }\n    /** Get the pointer to source node of new edge */\n    inline GNode* GetTmpSrc()\n    {\n        return tmpSrc;\n    }\n\n    /**\n     * Schedule node item for deletion\n     */\n    void deleteLaterNodeItem( NodeItem *item)\n    {\n        del_node_items << item;\n        checkDelItems();\n    }\n    /**\n     * Schedule edge item for deletion\n     */\n    void deleteLaterEdgeItem( EdgeItem *item)\n    {\n        del_edge_items << item;\n        checkDelItems();\n    }\n    \n    /** Timer event handler */\n    void timerEvent(QTimerEvent *event);\n     \n    /**\n     * Delete items that have been disconnected from scene\n     */\n    void deleteItems();\n    \n    /**\n     * Find node by its ID from dump\n     */\n    GNode* findNodeById( int id);\n\n     /**\n     * Find node by its label\n     */\n    GNode* findNodeByLabel( QString label);\n\n    /**\n     * Find next node with matching text\n     */\n    GNode *findNextNodeWithText( QString &findStr, QTextDocument::FindFlags flags);\n\n    /**\n     * Find prev node with matching text\n     */\n    GNode *findPrevNodeWithText( QString &findStr, QTextDocument::FindFlags flags);\n\n    /** \n     * Check that we haven't exceeded the max amount of deleted items\n     */\n    inline void checkDelItems()\n    {\n        int item_count = del_node_items.count() + del_edge_items.count();\n        if ( item_count >= MAX_DELETED_ITEMS_COUNT)\n        {\n            /** deleteItems(); !!! FIXME: MEMORY LEACKAGE( yes, not potential... known leakage) */\n        }\n    }\n    /** Set the pointer to style edition temporary info */\n    inline void setStyleEditInfo( StyleEditInfo* info)\n    {\n        style_edit_info = info;\n    }\n\n};\n\n#endif\n"
  },
  {
    "path": "showgraph/GraphView/gstyle.h",
    "content": "/**\n * @file: gstyle.h \n * Node/Edge styles in graph\n */\n/*\n * GUI for ShowGraph tool.\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#ifndef GSTYLE_H\n#define GSTYLE_H\n\n/** Style id type */\ntypedef quint32 StyleId;\n\n/**\n * Node shape enum\n */\nenum NodeShape\n{\n    NODE_SHAPE_BOX,\n    NODE_SHAPE_DEFAULT = NODE_SHAPE_BOX,\n    NODE_SHAPE_ROUNDED_BOX,\n    NODE_SHAPE_CIRCLE,\n    NODE_SHAPE_DIAMOND,\n    NODE_SHAPE_ELLIPSE,\n    NODE_SHAPES_NUM    \n};\n\n/**\n * Convert node shape to string \n */\nstatic QString\nnodeShape2Str( NodeShape shape)\n{\n    ASSERTD( shape < NODE_SHAPES_NUM);\n    switch ( shape)\n    {\n      case NODE_SHAPE_BOX:\n        return QString(\"box\");\n      case NODE_SHAPE_ROUNDED_BOX:\n        return QString(\"rounded_box\");\n      case NODE_SHAPE_CIRCLE:\n        return QString(\"circle\");\n      case NODE_SHAPE_DIAMOND:\n        return QString(\"diamond\");\n      case NODE_SHAPE_ELLIPSE:\n        return QString(\"ellipse\");\n      default:\n        ASSERTD( 0);\n        return QString(); \n    }\n    //return QString();\n}\n\n/**\n * Convert string to node shape \n */\nstatic NodeShape\nstr2NodeShape( const QString &str)\n{\n    if ( str == \"box\")\n    {\n        return NODE_SHAPE_BOX;\n    } else if ( str == \"rounded_box\")\n    {\n        return NODE_SHAPE_ROUNDED_BOX;\n    } else if ( str == \"circle\")\n    {\n        return NODE_SHAPE_CIRCLE;\n    } else if ( str ==\"diamond\")\n    {\n        return NODE_SHAPE_DIAMOND;\n    } else if ( str == \"ellipse\")\n    {\n        return NODE_SHAPE_ELLIPSE;\n    } else\n    {\n        return NODE_SHAPES_NUM;\n    }\n}\n\n/**\n * Graphic style for nodes and edges\n */ \nclass GStyle\n{\npublic:\n    /** Constructor */\n    inline GStyle();\n    /** Copy constructor */\n    inline GStyle( const GStyle&);\n    /** Copy constructor with name specification */\n    inline GStyle( QString nm, const GStyle&);\n    /** \n     * Construction from XML description\n     * @param Element wih style description\n     * @throws GGraphError\n     */\n    inline GStyle( QDomElement e);\n    /** Assignment */\n    inline GStyle& operator = ( const GStyle&);\n    /** Destructor */\n    virtual ~GStyle(){};\n    /** Get name of style */\n    inline QString name() const;\n    /** Get pen */\n    inline QPen pen() const;\n    /** Get brush */\n    inline QBrush brush() const;\n    /** Set default/changed state*/\n    inline void setState( bool default_state = false);\n    /** Set name of style */\n    inline void setName( QString &str);\n    /** Set pen */\n    inline void setPen( QPen &pn);\n    /** Set brush */\n    inline void setBrush( QBrush &br);\n    /** Set pen color */\n    inline void setPenColor( QColor &color);\n    /** Set pen style */\n    inline void setPenStyle( Qt::PenStyle st);\n    /** Set pen width */\n    inline void setPenWidth( qreal width);\n    /** Set brush color */\n    inline void setBrushColor( QColor &color);\n    /** Check if style uses default pen */\n    inline bool isDefault() const;\n    /** Get node shape */\n    inline NodeShape shape() const;\n    /** Set node shape */\n    inline void setShape( NodeShape new_shape);\n    /** Saving to element */\n    inline void writeElement( QDomElement e, bool save_name = true);\n    /** Increase items num */\n    inline void incNumItems();\n    /** Decrease items num */\n    inline void decNumItems();\n    /** Get number of affected items */\n    inline GraphNum numItems();\nprivate:\n    QString name_priv;\n    QPen pen_priv;\n    QBrush brush_priv;\n    bool is_default;\n    GraphNum num_items;\n    NodeShape shape_priv;\n    //StyleId id;\n};\n\n/** Constructor */\ninline GStyle::GStyle(): \n    is_default( true), num_items( 0), shape_priv(NODE_SHAPE_DEFAULT)\n{}\n\n/** Copy constructor */\ninline GStyle::GStyle( const GStyle& st)\n{\n    name_priv = st.name_priv;\n    name_priv.append(\"_copy\");\n    pen_priv = st.pen_priv;\n    brush_priv = st.brush_priv;\n    is_default = st.is_default;\n    shape_priv = st.shape_priv;\n    num_items = 0;\n}\n/** Copy constructor with name specification */\ninline \nGStyle::GStyle( QString nm, const GStyle& st)\n{\n    num_items = 0;\n    name_priv = nm;\n    pen_priv = st.pen_priv;\n    brush_priv = st.brush_priv;\n    is_default = st.is_default;\n    shape_priv = st.shape_priv;\n}\n\n/** Construction from XML description */\ninline \nGStyle::GStyle( QDomElement e ): \n    is_default( true),\n    shape_priv(NODE_SHAPE_DEFAULT)\n{\n    num_items = 0;\n    ASSERTD( !e.isNull());\n    \n    QString error_msg = QString(\"in line %1: \").arg( e.lineNumber());\n        \n    /** A style must be named in XML */\n    if( e.tagName() == QString( \"style\") && !e.hasAttribute( \"name\"))\n    {\n        throw GGraphError( error_msg.append(\"style without a name\"));\n    } else\n    {\n       name_priv = e.attribute( \"name\");    \n    }\n    /** Parse pen color */\n    if ( e.hasAttribute( \"pen_color\"))\n    {\n        is_default = false;\n        QColor color( e.attribute( \"pen_color\"));\n        \n        if ( color.isValid())\n        {\n            pen_priv.setColor( color);\n        } else\n        {\n            throw GGraphError( error_msg.append(\"invalid pen color\"));\n        }\n    }\n    /** Parse pen style */\n    if ( e.hasAttribute( \"pen_style\"))\n    {\n        is_default = false;\n        \n        QString stl = e.attribute( \"pen_style\");\n        \n        if ( stl == \"no_pen\")\n        {\n            pen_priv.setStyle( Qt::NoPen);\n        } else if ( stl == \"solid\")\n        {\n            pen_priv.setStyle( Qt::SolidLine);\n        } else if ( stl == \"dash\")\n        {\n            pen_priv.setStyle( Qt::DashLine);\n        } else if ( stl == \"dot\")\n        {\n            pen_priv.setStyle( Qt::DotLine);\n        } else if ( stl == \"dash_dot\")\n        {\n            pen_priv.setStyle( Qt::DashDotLine);\n        } else\n        {\n            throw GGraphError( error_msg.append(\"invalid pen style\"));\n        }\n    }\n    /** Parse pen width */\n    if ( e.hasAttribute( \"pen_width\"))\n    {\n        is_default = false;\n        bool ok;\n        qreal width = e.attribute( \"pen_width\").toDouble( &ok);\n        \n        if ( ok)\n        {\n            pen_priv.setWidthF( width);\n        } else\n        {\n            throw GGraphError( error_msg.append(\"invalid pen width\"));\n        }\n    } else\n    {\n        pen_priv.setWidth( 1);\n    }\n    /** Parse fill color */\n    if ( e.hasAttribute( \"fill\"))\n    {\n        is_default = false;\n        QString fill = e.attribute( \"fill\");\n        QColor color( fill);\n        \n        if ( fill == \"no_fill\")\n        {\n            brush_priv.setStyle( Qt::NoBrush);\n        } else if ( color.isValid())\n        {\n            brush_priv.setStyle( Qt::SolidPattern);\n            brush_priv.setColor( color);\n        } else\n        {\n            throw GGraphError( error_msg.append(\"invalid fill color\"));\n        }\n    } else\n    {\n        brush_priv.setStyle( Qt::NoBrush);\n    }\n    if ( e.hasAttribute(\"shape\"))\n    {\n        NodeShape shp =  str2NodeShape( e.attribute(\"shape\"));\n        if ( shp != NODE_SHAPES_NUM)\n        {\n            is_default = false;        \n            setShape( shp);\n        } else\n        {\n            throw GGraphError( error_msg.append(\"invalid shape\"));\n        }\n    }\n}\n\n/** Saving to element */\ninline void \nGStyle::writeElement( QDomElement e, bool save_name)\n{\n    if ( is_default)\n        return;\n    \n    if ( save_name)\n        e.setAttribute( \"name\", name_priv);\n\n    /** Save pen color */\n    e.setAttribute( \"pen_color\", pen_priv.color().name());\n\n    /** Save pen style */\n    Qt::PenStyle pen_style = pen_priv.style();\n\n    switch ( pen_style)\n    {\n        case Qt::NoPen:\n            e.setAttribute( \"pen_style\",\"no_pen\");\n            break;\n        case Qt::SolidLine:\n            e.setAttribute( \"pen_style\",\"solid\");\n            break;\n        case Qt::DashLine:\n            e.setAttribute( \"pen_style\",\"dash\");\n            break;\n        case Qt::DotLine:           \n            e.setAttribute( \"pen_style\",\"dot\");\n            break;\n        case Qt::DashDotLine:\n            e.setAttribute( \"pen_style\",\"dash_dot\");\n            break;\n        default:\n            ASSERTD( 0);\n            e.setAttribute( \"pen_style\",\"solid\");\n            break;\n    }\n    /** Save pen width */\n    e.setAttribute( \"pen_width\", pen_priv.widthF());\n    \n    /** Save fill color */\n    if ( !( Qt::NoBrush == brush_priv.style()))\n    {\n        e.setAttribute( \"fill\", brush_priv.color().name());\n    }\n    if ( NODE_SHAPE_DEFAULT != shape())\n    {\n        e.setAttribute(\"shape\", nodeShape2Str( shape()));\n    }\n}\n\n/** Assignment */\ninline GStyle&\nGStyle::operator = ( const GStyle& st)\n{\n    name_priv = st.name_priv;\n    name_priv.append(\"_copy\");\n    pen_priv = st.pen_priv;\n    is_default = st.is_default;\n    brush_priv = st.brush_priv;\n    shape_priv = st.shape_priv;\n    num_items = 0;\n    return *this;\n}\n\n/** Get name of style */\ninline QString GStyle::name() const\n{\n    return name_priv;\n}\n/** Get pen */\ninline QPen GStyle::pen() const\n{\n    return pen_priv;\n}\n/** Get brush */\ninline QBrush GStyle::brush() const\n{\n    return brush_priv;\n}\n/** Check if style uses default pen */\ninline bool GStyle::isDefault() const\n{\n    return is_default;\n}\n\n/** Increase items num */\ninline void GStyle::incNumItems()\n{\n    num_items++;\n}\n/** Decrease items num */\ninline void GStyle::decNumItems()\n{\n    ASSERTD( num_items > 0);\n    num_items--;\n}\n/** Get number of affected items */\ninline GraphNum GStyle::numItems()\n{\n    return num_items;\n}\n\n/** Set name of style */\ninline void GStyle::setName( QString &str)\n{\n    name_priv = str;\n}\n/** Set pen */\ninline void GStyle::setPen( QPen &pn)\n{\n    pen_priv = pn;\n}\n/** Set brush */\ninline void GStyle::setBrush( QBrush &br)\n{\n    brush_priv = br;\n}\n/** Set pen color */\ninline void GStyle::setPenColor( QColor &color)\n{\n    pen_priv.setColor( color);\n}\n/** Set pen style */\ninline void GStyle::setPenStyle( Qt::PenStyle st)\n{\n    pen_priv.setStyle( st);\n}\n/** Set pen width */\ninline void GStyle::setPenWidth( qreal width)\n{\n    pen_priv.setWidthF( width);\n}\n/** Set brush color */\ninline void GStyle::setBrushColor( QColor &color)\n{\n    brush_priv.setColor( color);\n}\n/** Set default/changed state*/\ninline void GStyle::setState( bool default_state)\n{\n    is_default = default_state;\n}\n\n/** Get node shape */\ninline NodeShape GStyle::shape() const\n{\n    return shape_priv;\n}\n/** Set node shape */\ninline void GStyle::setShape( NodeShape new_shape)\n{\n    shape_priv = new_shape;\n}\n#endif /* GSTYLE_H */\n"
  },
  {
    "path": "showgraph/GraphView/gview_iface.h",
    "content": "/**\n * @file: gview_iface.h \n * Graph view classes interface\n * @defgroup GUI Graphical User Interface \n * @author Boris Shurygin\n *\n * Graphical part of ShowGraph is arranged around MainWindow wich has \n * GraphView as a center widget.\n */\n/**\n * Graph view implementation.\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#pragma once\n#ifndef GVIEW_IFACE_H\n#define GVIEW_IFACE_H\n\n/**\n * Debug assert for graph library\n */\n#if !defined(GVIEW_ASSERTD)\n#    define GVIEW_ASSERTD(cond, what) ASSERT_XD(cond, \"GUI\", what)\n#endif\n\n/** Predeclarations */\nclass GGraph;\nclass GNode;\nclass GEdge;\nclass NodeItem;\nclass EdgeItem;\nclass GraphView;\nclass StyleEdit;\n\n#include <QList>\n#include <QGraphicsItem>\n#include <QGraphicsScene>\n#include <QGraphicsView>\n#include <QDebug>\n#include <QWheelEvent>\n#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)\n#include <QtWidgets>\n#else\n#include <QtGui>\n#endif\n\n#include \"../Graph/graph_iface.h\"\n#include \"../Layout/layout_iface.h\"\n\n/**\n * Subclasses of QGraphicsItem types\n */\nenum { \n    TypeNode = QGraphicsItem::UserType + 1, /** Node item */\n    TypeEdge = QGraphicsItem::UserType + 2, /** Edge item */\n    TypeEdgeControl = QGraphicsItem::UserType + 3,/** EdgeControl item */\n    TypeEdgeHelper = QGraphicsItem::UserType + 4 /** Edge helper item */\n};\n\n/** Max opacity level for items in graph view */\nconst qreal MAX_OPACITY = 6;\n\n/**\n * Exception type for graph errors\n * @ingroup GUIGraph\n */\nclass GGraphError\n{\npublic:\n    /** No message constructor */\n    GGraphError(){};\n    /** Message-based constructor*/\n    GGraphError( QString str): msg_priv( str){};\n    /** Get message */\n    inline QString message()\n    {\n        return msg_priv;\n    }\nprivate:\n    /** Error message */\n    QString msg_priv;\n};\n\n#include \"navigation.h\"\n#include \"visible_edge.h\"\n#include \"gstyle.h\"\n#include \"edge_item.h\"\n#include \"node_item.h\"\n#include \"edge_helper.h\"\n#include \"graph_view.h\"\n#include \"style_edit.h\"\n\n#endif /* GVIEW_IFACE_H */\n"
  },
  {
    "path": "showgraph/GraphView/gview_impl.h",
    "content": "/**\n * @file: gview_impl.h \n * Implementational header for QtGUI sub-project\n */\n/*\n * GUI for ShowGraph tool.\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#ifndef GVIEW_IMPL_H\n#define GVIEW_IMPL_H\n\n#include \"gview_iface.h\"\n#include <math.h>\n/** Pi definition */\nstatic const double Pi = 3.14159265358979323846264338327950288419717;\n/**  2 * Pi constant */\nstatic double TwoPi = 2.0 * Pi;\n\n/** Arrow size constant */\nconst qreal arrowSize = 10;\n\n/** Self edge vertical margin*/\nconst qreal SE_VERT_MARGIN = 20;\n\n/** Self edge horizontal margin*/\nconst qreal SE_HOR_MARGIN = 20;\n\n/** Node speed */\nconst qreal NODE_SPEED = 4;\n\n/** Opacity step */\nconst qreal OPACITY_STEP = 0.1;\n\n/** Context visible border */\nconst int MAX_VISIBLE_LEN = 3;\n\n/** Context visible border */\nconst int GVIEW_MAX_PRIORITY = 6;\n\n/** Context far border */\nconst int MAX_PLACE_LEN = 3;\n\n#endif /* GVIEW_IMPL_H */\n"
  },
  {
    "path": "showgraph/GraphView/navigation.cpp",
    "content": "/**\n * @file: navigation.cpp \n * Implemetation of navigation helper classes\n * @ingroup GUIGraph\n */\n/*\n * GUI for ShowGraph tool.\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n#include \"gview_impl.h\"\n\n/** Constructor */\nNodeNav::NodeNav( GNode *curr_node, NavSector nav_sector):\n    node_priv( curr_node),\n    sector_priv( nav_sector)\n{\n\n}\n    \n/** Get edge to the bottom of current node */\nGEdge *\nNodeNav::firstEdgeInSector() const\n{\n    GEdge *res = NULL;\n    qreal min_delta = 0;\n\n    /** For each edge */   \n    for ( Node::EdgeIter e_iter = node()->edgesBegin(),\n                         e_end = node()->edgesEnd();\n          e_iter != e_end;\n          e_iter++ )\n    {\n        GEdge *e = static_cast<GEdge *>( e_iter.edge());\n        if ( isEdgeInSector( e))\n        {\n            NodeItem *p_item = static_cast<GNode *>( e_iter.node())->item();\n            QPointF center = node()->item()->boundingRect().center();\n            QPointF point = node()->item()->mapFromItem( p_item, p_item->boundingRect().center());\n            \n            qreal delta;\n            if ( sector() == TOP_SECTOR || sector() == BOTTOM_SECTOR)\n            {\n                delta = abs<qreal>( center.x() - point.x());\n            } else\n            {\n                delta = abs<qreal>( center.y() - point.y());\n            }\n\n            if ( isNullP( res) \n                 || delta < min_delta) // for selection of closest edge\n            {\n                res = e;\n                min_delta = delta;\n            }\n        }\n    }\n    return res;\n}\n\n/** Checks if navigation direction is applicable in current sector */\nbool NodeNav::isDirApplicable( NavDirection dir, NavSector s)\n{\n    /* Applicable only for top and bottom sectors */\n    if ( s == UNDEF_SECTOR)\n        return false;\n\n    if ( s == LEFT_SECTOR\n         || s == RIGHT_SECTOR)\n    {\n        return dir == NAV_DIR_UP\n               || dir == NAV_DIR_DOWN;\n    } else if ( s == TOP_SECTOR\n                || s == BOTTOM_SECTOR)\n    {\n        return dir == NAV_DIR_LEFT\n               || dir == NAV_DIR_RIGHT;\n    }\n    GVIEW_ASSERTD( 0, \"Invalid sector type\");\n    return false;\n}\n\n/**\n * Check that given point is in given direction from reference point\n */\nbool NodeNav::isPointInDir( QPointF point, QPointF ref, NavDirection dir)\n{\n    switch ( dir)\n    {\n    case NAV_DIR_UP: \n        return point.y() <= ref.y();\n    case NAV_DIR_DOWN: \n        return point.y() >= ref.y();\n    case NAV_DIR_LEFT:\n        return point.x() <= ref.x();\n    case NAV_DIR_RIGHT:\n        return point.x() >= ref.x();\n    default:\n        return false;\n    }\n    //return false;\n}\n\n/**\n * Compute coordinate difference in given direction \n * between given point and reference point\n */\nqreal NodeNav::deltaInDir( QPointF point, QPointF ref, NavDirection dir)\n{\n    switch ( dir)\n    {\n    case NAV_DIR_UP: \n       return ref.y() - point.y();\n    case NAV_DIR_DOWN: \n        return point.y() - ref.y();\n    case NAV_DIR_LEFT: \n        return ref.x() - point.x();\n    case NAV_DIR_RIGHT:\n        return point.x() - ref.x();\n    default:\n        return 0;\n    }\n    //return 0;\n}\n/** Get edge to the left of given edge */\nGEdge *\nNodeNav::edgeInDir( GEdge * edge, NavDirection dir) const\n{\n    /* Applicable only for top and bottom sectors */\n    if ( !isDirApplicable( dir, sector()))\n    {\n        return NULL;\n    }\n    \n    GNode *n = otherEnd( edge);\n    /* item corresponding to other (than node_priv) node */\n    if ( isNullP( n))\n        return NULL;\n\n    NodeItem *item = n->item();\n    \n    // in current node's coordinates\n    QPointF edge_point = node()->item()->mapFromItem( item, item->boundingRect().center());\n\n    GEdge *res = NULL;\n    qreal min_delta = 0;\n    /** For each edge */   \n    for ( Node::EdgeIter e_iter = node()->edgesBegin(),\n                         e_end = node()->edgesEnd();\n          e_iter != e_end;\n          e_iter++ )\n    {\n        GEdge *e = static_cast<GEdge *>( e_iter.edge());\n        if ( isEdgeInSector( e) && areNotEqP( e, edge))\n        {\n            NodeItem *p_item = static_cast<GNode *>( e_iter.node())->item();\n            QPointF point = node()->item()->mapFromItem( p_item, p_item->boundingRect().center());\n            if ( isPointInDir( point, edge_point, dir))\n            {\n                qreal delta = deltaInDir( point, edge_point, dir);\n                if ( isNullP( res) \n                     || delta < min_delta) // for selection of closest edge\n                {\n                    res = e;\n                    min_delta = delta;\n                }\n            }\n        }\n    }\n\n    return res;\n}\n\n/* Other edge's node */\nGNode *\nNodeNav::otherEnd( GEdge *edge) const\n{\n    if ( areEqP( node_priv, edge->pred()))\n    {\n        return edge->succ();\n    } else if ( areEqP( node_priv, edge->succ()))\n    {\n        return edge->pred();\n    }\n    return NULL;\n}\n\n/** Check that given edge is in current sector */\nbool NodeNav::isEdgeInSector( GEdge * edge) const\n{\n    GNode *n = otherEnd( edge);\n    /* item corresponding to other (than node_priv) node */\n    if ( isNullP( n) || sector() == UNDEF_SECTOR)\n        return false;\n\n    NodeItem *item = n->item();\n    \n    // Both points in current node's coordinates\n    QPointF p_center = node_priv->item()->boundingRect().center();\n    QPointF s_center = node_priv->item()->mapFromItem( item, item->boundingRect().center());\n\n    qreal angle = QLineF( p_center, s_center).angle();\n    \n    qreal max_angle = sectorMaxAngle();\n    qreal min_angle = sectorMinAngle();\n\n    if ( angle > 270 && sector() == RIGHT_SECTOR)\n    {\n        max_angle +=360;\n    }\n    if ( angle < 90 && sector() == RIGHT_SECTOR)\n    {\n        min_angle -=360;\n    }\n\n    if ( angle <= max_angle && angle >= min_angle)\n        return true;\n    return false;\n}\n\n/** Compute max angle for sector */\nqreal NodeNav::sectorMaxAngle() const\n{\n    QLineF line;\n    QRectF rect = node_priv->item()->boundingRect();\n    QPointF center = rect.center();\n    \n    switch ( sector_priv)\n    {\n        case TOP_SECTOR:\n            line = QLineF( center, rect.topLeft());\n            break;\n        case BOTTOM_SECTOR:\n            line = QLineF( center, rect.bottomRight());\n            break;\n        case LEFT_SECTOR:\n            line = QLineF( center, rect.bottomLeft());\n            break;\n        case RIGHT_SECTOR:\n            line = QLineF( center, rect.topRight());\n            break;\n        case UNDEF_SECTOR:\n        default:\n            return 0;\n    }\n    return line.angle();\n}\n\n/** Compute min angle for sector */\nqreal NodeNav::sectorMinAngle() const\n{\n    QLineF line;\n    QRectF rect = node_priv->item()->boundingRect();\n    QPointF center = rect.center();\n    \n    switch ( sector_priv)\n    {\n        case TOP_SECTOR:\n            line = QLineF( center, rect.topRight());\n            break;\n        case BOTTOM_SECTOR:\n            line = QLineF( center, rect.bottomLeft());\n            break;\n        case LEFT_SECTOR:\n            line = QLineF( center, rect.topLeft());\n            break;\n        case RIGHT_SECTOR:\n            line = QLineF( center, rect.bottomRight());\n            break;\n        case UNDEF_SECTOR:\n        default:\n            return 0;\n    }\n    return line.angle();\n}\n"
  },
  {
    "path": "showgraph/GraphView/navigation.h",
    "content": "/**\n * @file: navigation.h \n * Interfaces for graph navigation\n * @ingroup GUIGraph\n */\n/**\n * @page navigation Navigation Support Classes\n * \n * NodeNav\n * NodeNav class is used for browsing graph with keyboard. Conceptually\n */\n/*\n * GUI for ShowGraph tool.\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#ifndef NAVIGATION_H\n#define NAVIGATION_H\n\n#include \"gview_impl.h\"\n\n/**\n * Directions around node: four sectors between\n * diagonals of node's bounding rectangle\n */\nenum NavSector\n{\n    /** Sector on the top of the node */\n    TOP_SECTOR,\n    /** Sector in the bottom of the node */\n    BOTTOM_SECTOR,\n    /** Sector to the left of the node */\n    LEFT_SECTOR,\n    /** Sector to the right of the node */\n    RIGHT_SECTOR,\n    /** Undefined sector */\n    UNDEF_SECTOR\n};\n\n/**\n * Directions around node: four sectors between\n * diagonals of node's bounding rectangle\n */\nenum NavDirection\n{\n    /** Upward direction of navigation */\n    NAV_DIR_UP,\n    /** Downward direction of navigation */\n    NAV_DIR_DOWN,\n    /** Left direction of navigation */\n    NAV_DIR_LEFT,\n    /** Right direction of navigation */\n    NAV_DIR_RIGHT\n};\n\n/**\n * Navigation around node: edge selection and jump to one of its endpoints\n * @ingroup GUIGraph\n */\nclass NodeNav\n{\npublic:\n    /** Constructor */\n    NodeNav( GNode *curr_node, NavSector nav_sector);\n\n    /** Get edge to the left of given edge */\n    GEdge *firstEdgeInSector() const;\n    /** Get edge in given direction of given edge */\n    GEdge *edgeInDir( GEdge * edge, NavDirection dir) const;\n    /** Check that given edge is in current sector */\n    bool isEdgeInSector( GEdge * edge) const;    \n    \n    /** Get node */\n    inline GNode* node() const;\n    /** Get sector */\n    inline NavSector sector() const;\n    /** Check if navigation direction is applicable in current sector */\n    static bool isDirApplicable( NavDirection dir, NavSector s);\n    /** Check that given point is in given direction from reference point */\n    static bool isPointInDir( QPointF point, QPointF ref, NavDirection dir);\n    /** Compute coordinate difference between points in given direction */\n    static qreal deltaInDir( QPointF point, QPointF ref, NavDirection dir);\n\nprivate:    \n\n    /** Compute max angle for sector */\n    qreal sectorMaxAngle() const;\n    /** Compute min angle for sector */\n    qreal sectorMinAngle() const;\n    /**\n     * Get node on other end of edge\n     *  NOTE:if node_priv is not adjacent to edge then returns NULL\n     */\n    GNode* otherEnd( GEdge *) const;\n\n    GNode *node_priv;\n    NavSector sector_priv;\n};\n\n/** Get pred */\nGNode* NodeNav::node() const\n{\n    return node_priv;\n}\n/** Get succ */\nNavSector NodeNav::sector() const\n{\n    return sector_priv;\n}\n\n#endif /** NAVIGATION_H */"
  },
  {
    "path": "showgraph/GraphView/node_item.cpp",
    "content": "/**\n * @file: node_item.cpp \n * Drawable node implementation\n */\n/* \n * GUI for ShowGraph tool.\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#include \"gview_impl.h\"\n\n//#define DRAW_AXIS\n\n#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)\n#define LEVELOFDETAIL(p,x) p->levelOfDetailFromTransform(x)\n#else\n#define LEVELOFDETAIL(p,x) p->levelOfDetail\n#endif\n\n\n/** Constant for adjusting item's border rectangle */\nconst qreal box_adjust = 5;\n        \n\n/** We can't create nodes separately, do it through newNode method of graph */\nGNode::GNode( GGraph *graph_p, int _id):\n    AuxNode( ( AuxGraph *)graph_p, _id),\n\t_doc( NULL),\n\tir_id( GRAPH_MAX_NODE_NUM),\n\ttext_shown( false),\n    _style( NULL)\n{\n    item_p = new NodeItem( this);\n    graph()->view()->scene()->addItem( item_p);\n\tsetIRId( id());\n    graph()->invalidateRanking();\n    if ( graph()->view()->isContext())\n    {\n        item()->hide();\n        setForPlacement( false);\n        setPriority( 0);\n    }\n}\n\n/** Contructor of node with specified position */\nGNode::GNode( GGraph *graph_p, int _id, QPointF _pos):\n    AuxNode( ( AuxGraph *)graph_p, _id),\n\t_doc( NULL),\n\tir_id( GRAPH_MAX_NODE_NUM),\n\ttext_shown( false),\n    _style( NULL)\n{\n    item_p = new NodeItem( this);\n    item_p->setPos( _pos);\n\tgraph()->view()->scene()->addItem( item_p);\n\tsetIRId( id());\n    graph()->invalidateRanking();\n    if ( graph()->view()->isContext())\n    {\n        item()->hide();\n        setForPlacement( false);\n        setPriority( 0);\n    }\n}\n\n/**\n * Destructor for node - removes edge controls on incidient edges and disconnects item from scene\n */\nGNode::~GNode()\n{\n    graph()->invalidateRanking();\n    if ( ( isEdgeControl() || isEdgeLabel())\n         && isNotNullP( firstPred()) \n         && isNotNullP( firstSucc())\n         && isNotNullP( firstPred()->pred())\n         && isNotNullP( firstSucc()->succ()))\n    {\n        GRAPH_ASSERTD( areEqP( firstPred()->style(), firstSucc()->style()),\n                       \"Different styles on the same edge\");\n        GEdge *e = graph()->newEdge( firstPred()->pred(), firstSucc()->succ());\n        e->setStyle( firstPred()->style());\n    } else if ( isSimple())\n    {\n        QList< GNode *> nodes;\n        GEdge* edge;\n\t\tMarker m = graph()->newMarker();\n        for ( edge = firstSucc(); isNotNullP( edge); edge = edge->nextSucc())\n        {\n            edge->item()->adjust();\n            GNode* succ = edge->succ();\n\n            while ( succ->isEdgeControl() || succ->isEdgeLabel())\n            {\n                assertd( isNotNullP( succ->firstSucc()));\n                if ( succ->mark( m))\n\t\t\t\t{\n\t\t\t\t\tnodes << succ;\n\t\t\t\t}\n                succ = succ->firstSucc()->succ();\n            }\n        }\n        for ( edge = firstPred(); isNotNullP( edge); edge = edge->nextPred())\n        {\n            if ( edge->isSelf()) // We've already processed this one in previous loop\n\t\t\t\tcontinue;\n\n\t\t\tedge->item()->adjust();\n            GNode* pred = edge->pred();\n\n            while ( pred->isEdgeControl() || pred->isEdgeLabel())\n            {\n                assertd( isNotNullP( pred->firstPred()));\n                if ( pred->mark( m))\n\t\t\t\t{\n\t\t\t\t\tnodes << pred;\n\t\t\t\t}\n                pred = pred->firstPred()->pred();\n            }\n        }\n        \n        foreach ( GNode *n, nodes)\n        {\n            graph()->deleteNode( n);\n        }\n\t\tgraph()->freeMarker( m);\n    }\n    if ( isNodeInFocus())\n        graph()->setNodeInFocus( NULL);\n    graph()->view()->viewHistory()->eraseNode( this);\n    item()->remove();\n    graph()->view()->deleteLaterNodeItem( item());\n    delete _doc;\n            \n    if ( isNotNullP( _style))\n        _style->decNumItems();\n}\n/**\n * Get the pointer to graph\n */\nGGraph* GNode::graph() const\n{\n    return static_cast< GGraph *>( AuxNode::graph());\n}\n\n/**\n * Update DOM tree element\n */\nvoid\nGNode::updateElement()\n{\n    AuxNode::updateElement();// Base class method call\n    QDomElement e = elem();\n    e.setAttribute( \"x\", item()->x());\n    e.setAttribute( \"y\", item()->y());\n    e.setAttribute( \"label\", item()->toPlainText());\n    if ( isSimple())\n    {  \n       // e.setAttribute( \"type\", \"simple\");\n    } else if ( isEdgeControl())\n    {\n        e.setAttribute( \"type\", \"edge_control\");\n    } else if ( isEdgeLabel())\n    {\n        e.setAttribute( \"type\", \"edge_label\");\n    }\n    /** Save style that describes this node only along with node */\n    if ( isNotNullP( style())) \n    {     \n        if ( 1 == style()->numItems())\n        {\n            e.removeAttribute(\"style\");\n            style()->writeElement( e, false);\n        } else\n        {\n            e.setAttribute(\"style\", style()->name());\n        }\n    }\n}\n\n/**\n * read properties from DOM tree element\n */\nvoid\nGNode::readFromElement( QDomElement e)\n{\n    assertd( !e.isNull());\n    assertd( e.tagName() == QString( \"node\"));\n    \n    if ( e.hasAttribute( \"x\") && e.hasAttribute( \"y\"))\n    {\n        qreal x = e.attribute( \"x\").toDouble();\n        qreal y = e.attribute( \"y\").toDouble();\n        item()->setPos( x, y);\n    }\n    if ( e.hasAttribute( \"label\"))\n    {\n        QString str = e.attribute( \"label\");\n        item()->setPlainText( str);\n        QRegularExpression rx(\"(\\\\d+)\");\n        auto pos = rx.match(str);\n        if (pos.hasMatch())\n        {\n            setIRId( pos.captured(1).toInt());\n        }\n    }\n    if ( e.hasAttribute(\"type\"))\n    {\n        QString type_str = e.attribute( \"type\");\n        if ( type_str == QString( \"edge_control\"))\n        {\n            setTypeEdgeControl();\n        } else if (type_str == QString( \"edge_label\"))\n        {\n            setTypeEdgeLabel();\n        } \n    }\n\n    AuxNode::readFromElement( e); // Base class method\n}\nbool GNode::isNodeInFocus() const\n{\n    return areEqP( this, graph()->nodeInFocus());\n}\n\n/*********************** NodeItem implementation ***************************************/\n\n\n/** Initialization */\nvoid \nNodeItem::SetInitFlags()\n{\n    setFlag( ItemIsMovable);\n    setFlag( ItemIsFocusable);\n// needed for Qt 4.6 and higher\n#if (QT_VERSION >= QT_VERSION_CHECK(4, 6, 0))\n    setFlag( ItemSendsGeometryChanges);\n#endif\n    setCacheMode( DeviceCoordinateCache);\n    setZValue(2);\n    QGraphicsItem::setCursor( Qt::ArrowCursor);\n    /**\n     * Sets text to create text control. \n     * FIXME: Should find a way to prevent this for edgeControl nodes, since text\n     *        contol is not needed for them and this procedure is quite expensive\n     */\n    setPlainText( \"\");\n}\n\n/** Path of box type that given inner rectangle */\ninline QRectF boxRect( QRectF rect)\n{\n    return rect.adjusted( -box_adjust, -box_adjust, box_adjust, box_adjust);\n}\n/** Bounding rect that outlines the shape of box type for given inner rectangle */\ninline QPainterPath boxPath( QRectF rect)\n{\n    QPainterPath path;\n    path.addRect( rect.adjusted( -box_adjust, -box_adjust, box_adjust, box_adjust));\n    return path;\n}\n\n/** Path of rounded box type that given inner rectangle */\ninline QRectF rboxRect( QRectF rect)\n{\n    return rect.adjusted( -box_adjust, -box_adjust, box_adjust, box_adjust);\n}\n/** Bounding rect that outlines the shape of rounded box type for given inner rectangle */\ninline QPainterPath rboxPath( QRectF rect)\n{\n    QPainterPath path;\n    path.addRoundedRect( rect.adjusted( -box_adjust, -box_adjust, box_adjust, box_adjust), 2*box_adjust, 2*box_adjust);\n    return path;\n}\n\n/** Path of circle type that given inner rectangle */\ninline QRectF circleRect( QRectF rect)\n{\n    QRectF recta = rect.adjusted( -box_adjust, -box_adjust, box_adjust, box_adjust);\n    qreal radius = sqrt( (recta.width() * recta.width()) + (recta.height() * recta.height())) /2;\n    return QRectF( -radius + rect.width() /2, -radius + rect.height() /2, 2*radius, 2*radius);\n}\n/** Bounding rect that outlines the shape of circle type for given inner rectangle */\ninline QPainterPath circlePath( QRectF rect)\n{\n    QPainterPath path;\n    path.addEllipse( circleRect( rect));\n    return path;\n}\n\n/** Path of diamond type that given inner rectangle */\ninline QRectF diamondRect( QRectF rect)\n{\n    return rect.adjusted( -rect.width() /2, -rect.height() /2, rect.width() /2, rect.height() /2);\n}\n/** Bounding rect that outlines the shape of diamond type for given inner rectangle */\ninline QPainterPath diamondPath( QRectF rect)\n{\n    QRectF drect = diamondRect( rect);\n    QPainterPath path( drect.center() - QPointF(drect.width() / 2, 0));\n    path.lineTo( drect.center() - QPointF(0, drect.height() / 2));\n    path.lineTo( drect.center() + QPointF(drect.width() / 2, 0));\n    path.lineTo( drect.center() + QPointF(0, drect.height() / 2));\n    path.closeSubpath();\n\n    return path;\n}\n\n/** Path of ellipse type that given inner rectangle */\ninline QRectF ellipseRect( QRectF rect)\n{\n    return diamondRect( rect);\n}\n/** Bounding rect that outlines the shape of ellipse type for given inner rectangle */\ninline QPainterPath ellipsePath( QRectF rect)\n{\n    QPainterPath path;\n    path.addEllipse( ellipseRect( rect));\n    return path;\n}\n\nvoid NodeItem::shapeChanged()\n{\n    prepareGeometryChange();\n}\n/**\n * Implementation of shape calculation\n */\ninline QPainterPath\nshape2Path( NodeShape shape, QRectF rect)\n{\n    ASSERTD( shape < NODE_SHAPES_NUM);\n    switch ( shape)\n    {\n      case NODE_SHAPE_BOX:\n        return boxPath( rect);\n      case NODE_SHAPE_ROUNDED_BOX:\n        return rboxPath( rect);\n      case NODE_SHAPE_CIRCLE:\n        return circlePath( rect);\n      case NODE_SHAPE_DIAMOND:\n        return diamondPath( rect);\n      case NODE_SHAPE_ELLIPSE:\n        return ellipsePath( rect);\n      default:\n        ASSERTD( 0);\n        QPainterPath path;\n        path.addRect( rect);\n        return path;\n    }\n/*        QPainterPath path;\n    path.addRect( rect);\n    return path;*/\n}\n\n/**\n * Implementation of shape calculation\n */\ninline QRectF\nshape2Rect( NodeShape shape, QRectF rect)\n{\n    ASSERTD( shape < NODE_SHAPES_NUM);\n    switch ( shape)\n    {\n      case NODE_SHAPE_BOX:\n        return boxRect( rect);\n      case NODE_SHAPE_ROUNDED_BOX:\n        return rboxRect( rect);\n      case NODE_SHAPE_CIRCLE:\n        return circleRect( rect);\n      case NODE_SHAPE_DIAMOND:\n        return diamondRect( rect);\n      case NODE_SHAPE_ELLIPSE:\n        return ellipseRect( rect);\n      default:\n        ASSERTD( 0);\n        return rect; \n    }\n    return rect;\n}\n\n/**\n * Rectangle that marks border of node\n */\nQRectF \nNodeItem::borderRect() const\n{\n    if ( isNullP( node_p))\n        return QRectF();\n\n    if ( node()->isEdgeControl())\n    {\n        qreal adjust = 2;\n        return QRectF( -EdgeControlSize - adjust, -EdgeControlSize - adjust,\n              2*( EdgeControlSize + adjust), 2*( EdgeControlSize + adjust));\n    } else if ( node()->isEdgeLabel())\n    {\n        return QGraphicsTextItem::boundingRect()\n            .adjusted( -box_adjust, -box_adjust, box_adjust, box_adjust);    \n    } else\n    {\n        QRectF rect =  QGraphicsTextItem::boundingRect();\n        if ( isNotNullP( node()->style()))\n        {\n            return shape2Rect( node()->style()->shape(), rect);\n        } else\n        {\n            return rect.adjusted( -box_adjust, -box_adjust, box_adjust, box_adjust);\n        }\n    }\n}\n\n/**\n * Overload of QGraphicsItem::bounding rectangle\n */\nQRectF \nNodeItem::boundingRect() const\n{\n    qreal adjust = 2;\n    return borderRect().adjusted( -adjust, -adjust, adjust, adjust);\n}\n\n/**\n * Shape of NodeItem: circle for EdgeControl and rectangle for simple\n */\nQPainterPath \nNodeItem::shape() const\n{\n    if ( isNullP( node_p))\n        return QPainterPath();\n\n    if ( node()->isEdgeControl())\n    {\n        QPainterPath path;\n        path.addEllipse( -EdgeControlSize, -EdgeControlSize, 2*EdgeControlSize, 2*EdgeControlSize);\n        return path; \n    } else\n    {\n        QRectF rect =  QGraphicsTextItem::boundingRect();\n        if ( isNotNullP( node()->style()))\n        {\n            return shape2Path( node()->style()->shape(), rect);\n        } else\n        {\n            QPainterPath path;\n            path.addRect( borderRect());\n            return path;\n        }\n    }\n}\n\nbool NodeItem::contains(const QPointF &point) const\n{\n    return shape().contains(point);\n}\n\n/**\n * Painting procedure for NodeItem\n */\nvoid \nNodeItem::paint( QPainter *painter,\n                 const QStyleOptionGraphicsItem *option,\n                 QWidget *widget)\n{\n    if ( isNullP( node_p))\n        return;\n    \n    if ( node()->graph()->view()->isContext())\n        painter->setOpacity( opacityLevel());\n\n    if ( node()->isSimple() || node()->isEdgeLabel())\n    {\n#ifdef DRAW_AXIS\n        QPen axis_pen( \"red\");\n        painter->setPen( axis_pen);\n        painter->drawRect( borderRect());\n        painter->drawLine( QPoint( -boundingRect().width(), 0), QPoint( boundingRect().width(),0));\n        painter->drawLine( QPoint( 0, -boundingRect().height()), QPoint( 0, boundingRect().height()));\n#endif\n        QPen pen( option->palette.windowText().color(), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin);\n        if ( LEVELOFDETAIL(option, painter->worldTransform()) < 0.1)\n        {\n            painter->fillRect( borderRect(), option->palette.highlight().color());\n        }\n        qreal adjust = 3;\n        \n        if ( isNotNullP( node()->style()))\n        {\n            pen = node()->style()->pen();\n            painter->setBrush( node()->style()->brush());\n        }\n        if ( bold_border )// ( option->state & QStyle::State_Sunken))\n        {\n            pen.setWidthF( pen.widthF() + 1);\n        } \n        if ( alternate_background)\n        {\n            painter->setBrush( option->palette.highlight().color());\n        }\n        \n        painter->setPen( pen);\n\n        if ( node()->isSimple())\n        {\n            QRectF rect =  QGraphicsTextItem::boundingRect();\n            if ( isNotNullP( node()->style()))\n            {\n                painter->drawPath( shape2Path( node()->style()->shape(), rect));\n            } else\n            {\n                painter->drawRect( borderRect());\n            }\n        }\n        if ( LEVELOFDETAIL(option, painter->worldTransform()) >= 0.2)\n        {\n            if ( painter->isActive())     \n                QGraphicsTextItem::paint( painter, option, widget);\n        }\n    } else if ( node()->isEdgeControl())\n    {\n        if ( LEVELOFDETAIL(option, painter->worldTransform()) < 0.2)\n            return;\n        if ( node()->firstPred()->item()->isSelected()\n             || node()->firstSucc()->item()->isSelected())\n        {\n            if ( bold_border && ( option->state & QStyle::State_Sunken)) \n            {\n                painter->setBrush( option->palette.highlight().color());\n                painter->setPen( QPen(option->palette.windowText().color(), 0));\n            } else\n            {\n                painter->setBrush( option->palette.highlight().color());\n                painter->setPen( QPen(option->palette.windowText().color(), 0));\n            }\n            painter->drawEllipse( -EdgeControlSize, -EdgeControlSize,\n                                  2*EdgeControlSize, 2*EdgeControlSize);\n        }\n    }\n    painter->setOpacity( 1);\n}\n\n/**\n * Right button press starts edge drawing process \n */\nvoid NodeItem::mousePressEvent( QGraphicsSceneMouseEvent *event)\n{\n    bold_border = true;\n\tif ( event->button() & Qt::RightButton && !node()->isEdgeControl())\n    {\n        if ( node()->graph()->view()->isEditable())\n        {\n            node()->graph()->view()->SetCreateEdge( true);\n            node()->graph()->view()->SetTmpSrc( node());\n            node()->graph()->view()->showHelper();\n        }\n    } else if ( node()->isEdgeControl() || node()->isEdgeLabel())\n    {\n        node()->firstPred()->item()->setSelected( true);\n        node()->firstSucc()->item()->setSelected( true);\n    }\n    QGraphicsTextItem::mousePressEvent(event);\n    update();\n}\n\n/**\n * On mouse release we do nothing - graph will handle it for us\n */\nvoid NodeItem::mouseReleaseEvent( QGraphicsSceneMouseEvent *event)\n{\n    bold_border = false;\n    bool call_baseclass = true;\n\n\t/** Select this node */\n\tnode()->graph()->emptySelection();\n    if ( !node()->isNodeInFocus())\n    {\n        node()->graph()->view()->viewHistory()->focusEvent( node());\n        node()->graph()->setNodeInFocus( node());\n    }\n\tnode()->graph()->selectNode( this->node());\n\t/** Show context menu */\n\tif ( node()->graph()->view()->isShowContextMenus()\n        && ( event->button() & Qt::RightButton) )\n    {\n\t    QMenu *menu = node()->graph()->view()->createMenuForNode( node());\n        menu->exec( event->screenPos());\n        call_baseclass = false;\n        delete menu;\n    } else if ( event->button() & Qt::LeftButton \n                && !( node()->isEdgeControl() || node()->isEdgeLabel()))\n    {\n        if (  node()->graph()->view()->isContext())\n        {\n            node()->graph()->view()->findContext();\n            //node()->graph()->view()->showNodeText( node());\n        } else\n        {\n            //node()->graph()->view()->showNodeText( node());\n        }\n\t}\n\tif ( call_baseclass)\n        QGraphicsTextItem::mouseReleaseEvent( event);\n\tupdate();\n    setFlag( ItemIsMovable, true);\n}\n\n/**\n * Double click enables text edition for simple nodes\n */\nvoid NodeItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)\n{\n    setFlag( ItemIsMovable, false);\n    if ( node()->graph()->view()->isEditable())\n    {\n        if ( event->button() & Qt::LeftButton && !node()->isEdgeControl())\n        {\n            if ( textInteractionFlags() == Qt::NoTextInteraction)\n            {\n                setTextInteractionFlags(Qt::TextEditorInteraction);\n                setFocus( Qt::MouseFocusReason);\n            }\n\t\t\t    //QGraphicsTextItem::mousePressEvent(event);\n        }\n    } else\n    {\n        node()->graph()->view()->showNodeText( node());\n    }\n}\n\nvoid NodeItem::focusOutEvent(QFocusEvent *event)\n{\n    setTextInteractionFlags(Qt::NoTextInteraction);\n\tQGraphicsTextItem::focusOutEvent(event);\n    setFlag( ItemIsFocusable, true);\n}\n\n/**\n * We should adjust edges when entering the text as the size of item changes\n */\nvoid NodeItem::keyPressEvent(QKeyEvent *event)\n{\n    \n    prepareGeometryChange();\n    if ( textInteractionFlags() == Qt::TextEditorInteraction)\n    {\n        GEdge *edge = NULL;\n        QGraphicsTextItem::keyPressEvent(event);\n        for ( edge = node()->firstSucc(); isNotNullP( edge); edge = edge->nextSucc())\n        {\n            edge->item()->adjust();\n        }\n        for ( edge = node()->firstPred(); isNotNullP( edge); edge = edge->nextPred())\n        {\n            edge->item()->adjust();\n        }\n    } else\n    {\n        int key = event->key();\n        GEdge *edge = NULL;\n        NavSector sector = UNDEF_SECTOR;\n        if ( node()->isNodeInFocus())\n        {\n            switch( key)\n            {\n                case Qt::Key_Up:\n                    sector = TOP_SECTOR;\n                    break;\n                case Qt::Key_Down:\n                    sector = BOTTOM_SECTOR;\n                    break;\n                case Qt::Key_Left:\n                    sector = LEFT_SECTOR;\n                    break;\n                case Qt::Key_Right:\n                    sector = RIGHT_SECTOR;\n                    break;\n                default:\n                    sector = UNDEF_SECTOR;\n                    break;\n            }\n            \n            node()->graph()->setNodeInFocus( node(), sector);\n            edge = NodeNav( node(), sector).firstEdgeInSector();\n                    \n            if ( isNotNullP( edge))\n            {\n                // Get focus on edge\n                scene()->clearFocus();\n                scene()->clearSelection();\n                edge->item()->setFocus();\n                edge->item()->setSelected( true);\n            }\n        }\n    }\n    update();\n}\n\n/** \n * Perform animation step\n * Advance node's coordinates and opacity towards goal values of these parameters\n * Return true if node have advanced somehow. False if node hasn't change\n */\nbool NodeItem::advance()\n{\n    QPointF target( node()->modelX(), node()->modelY());\n    QLineF line( pos(), target); \n    qreal dist = line.length();\n    bool changed = false;\n\n    if ( !isVisible())\n        return false;\n\n    qreal target_opacity = ((qreal)node()->priority())/ GVIEW_MAX_PRIORITY;\n    \n    if ( target_opacity > opacityLevel() + OPACITY_STEP)\n    {\n        setOpacityLevel( opacityLevel() + OPACITY_STEP);\n        changed = true;\n    } else if ( target_opacity < opacityLevel() - OPACITY_STEP)\n    {\n        setOpacityLevel( opacityLevel() - OPACITY_STEP);\n        changed = true;\n    } else\n    {\n        setOpacityLevel( target_opacity);\n        if ( !target_opacity)\n        {\n            setVisible( false);\n            changed = true;\n        }\n    }\n    if ( changed)\n    {\n        adjustAssociates();\n        updateAssociates();\n        update();\n    }\n\n    if ( dist > NODE_SPEED)\n    {\n        QPointF displacement( NODE_SPEED * line.dx() / dist, NODE_SPEED * line.dy() / dist);\n        setPos( pos() + displacement);   \n        changed = true;\n    }\n    return changed;\n}\n\nvoid NodeItem::adjustAssociates()\n{\n    GEdge *edge = NULL;\n\n    for ( edge = node()->firstSucc(); isNotNullP( edge); edge = edge->nextSucc())\n    {\n        edge->item()->adjust();\n        GNode* succ = edge->succ();\n\n        if ( succ->isEdgeControl() || succ->isEdgeLabel())\n        {\n            assertd( isNotNullP( succ->firstSucc()));\n            succ->firstSucc()->item()->adjust();\n        }\n    }\n    for ( edge = node()->firstPred(); isNotNullP( edge); edge = edge->nextPred())\n    {\n        edge->item()->adjust();\n        GNode* pred = edge->pred();\n\n        if ( pred->isEdgeControl() || pred->isEdgeLabel())\n        {\n            assertd( isNotNullP( pred->firstPred()));\n            pred->firstPred()->item()->adjust();\n        }\n    }\n    prepareGeometryChange();\n}\n\nvoid NodeItem::updateAssociates()\n{\n    GEdge *edge = NULL;\n\n    for ( edge = node()->firstSucc(); isNotNullP( edge); edge = edge->nextSucc())\n    {\n        edge->item()->adjust();\n        GNode* succ = edge->succ();\n\n        if ( succ->isEdgeControl() || succ->isEdgeLabel())\n        {\n            assertd( isNotNullP( succ->firstSucc()));\n            succ->firstSucc()->item()->update();\n        }\n    }\n    for ( edge = node()->firstPred(); isNotNullP( edge); edge = edge->nextPred())\n    {\n        edge->item()->adjust();\n        GNode* pred = edge->pred();\n\n        if ( pred->isEdgeControl() || pred->isEdgeLabel())\n        {\n            assertd( isNotNullP( pred->firstPred()));\n            pred->firstPred()->item()->update();\n        }\n    }\n}\n/**\n * Adjust edges when node changes\n */\nQVariant NodeItem::itemChange( GraphicsItemChange change, const QVariant &value)\n{\n    GEdge *edge = NULL;\n\n    if ( change != QGraphicsItem::ItemSceneChange \n         || change != QGraphicsItem::ItemSceneHasChanged)\n    {\n        adjustAssociates();\n    }\n    return QGraphicsTextItem::itemChange(change, value);\n}\n\n\n"
  },
  {
    "path": "showgraph/GraphView/node_item.h",
    "content": "/**\n * @file: node_item.h \n * Drawable Node class definition.\n */\n/*\n * GUI for ShowGraph tool.\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#ifndef NODE_W_H\n#define NODE_W_H\n\n/**\n * Subclass of QGraphicsItem for representing a node in scene\n * @ingroup GUIGraph\n */\nclass NodeItem: public QGraphicsTextItem\n{    \n    GNode *node_p;\n\tQDockWidget *text_dock;\n    qreal opacity;\n    bool bold_border;\n    bool alternate_background; \n\n    /** Initialization */\n    void SetInitFlags();\npublic:\n    /** Type of graphics item that corresponds to node */\n    enum {Type = TypeNode};\n\n    /** Constructor */\n\tinline NodeItem( GNode *n_p):\n        opacity( MAX_OPACITY),\n        bold_border( false),\n        alternate_background( false)\n    {\n        node_p = n_p;\n        SetInitFlags();\n    }\n    /** Get item's opacity level */\n    inline qreal opacityLevel() const\n    {\n        return opacity;\n    }\n    /** Set item's opacity level */\n    inline void setOpacityLevel( qreal op_l)\n    {\n        opacity = op_l;\n    }\n    /** Set node to be highlighted */\n    inline void highlight()\n    {\n        bold_border = true;\n        alternate_background = true;\n        update();\n    }\n    /** Set node to be regular */\n    inline void toRegular()\n    {\n        bold_border = false;\n        alternate_background = false;\n        update();\n    }\n    /** Get corresponding text doc */\n\tinline QDockWidget *textDock() const\n\t{\n\t\treturn text_dock;\n\t}\n\t/** Set corresponding text doc */\n\tinline void setTextDock( QDockWidget *dock)\n\t{\n\t\ttext_dock = dock;\n\t}\n\t/** Get pointer to model node */\n    inline GNode *node() const\n    {\n        return node_p;\n    }\n    /** Get the node type */\n    inline int type() const\n    {\n        return Type;\n    }\n    /** Get text border rectangle */\n    inline QRectF textRect() const\n    {\n        return QGraphicsTextItem::boundingRect();\n    }\n    /** Get the inner border rectangle */\n    QRectF borderRect() const;\n    /** Get the bounding rectangle */\n    QRectF boundingRect() const;\n    /** Get node shape */\n    QPainterPath shape() const;\n    /** Determine that node's shape contains point */\n    bool contains(const QPointF &point) const;\n    /** Paint procedure */\n    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);\n    /** Reimplementation of mouse press event handler */\n    void mousePressEvent(QGraphicsSceneMouseEvent *event);\n    /** Reimplementation of mouse release event handler */\n    void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);\n    /** Reimplementation of double click event handler */\n    void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event);\n    /** Reimplementation of focus out event */\n    void focusOutEvent(QFocusEvent *event);\n    /** Reimplementation of key press event */\n    void keyPressEvent(QKeyEvent *event);\n    /** Adjust associated items */\n    void adjustAssociates();\n    /** Update associated items */\n    void updateAssociates();\n    /** Item change event handler */\n    QVariant itemChange(GraphicsItemChange change, const QVariant &value);\n\t/** \n     * Perform animation step\n     * Advance node's coordinates and opacity towards goal values of these parameters\n     * Return true if node have advanced somehow. False if node hasn't change\n     */\n    bool advance();\n    \n    /** Remove from scene */\n    inline void remove()\n    {\n        setVisible( false);\n        removeFromIndex();\n        scene()->removeItem( this);\n        node_p = NULL;\n    }\n\n    /** Change shape */\n    void shapeChanged();\n};\n/**\n * Representation of model graph node\n * @ingroup GUIGraph\n */\nclass GNode: public AuxNode\n{\n    GraphNum ir_id;\n\tbool text_shown;\n\t/** Representation of node in graph view */\n    NodeItem *item_p; \n    /** Graphical appearance style */\n    GStyle *_style;\n\n    /** Representation of node as text */\n    QTextDocument* _doc;\nprotected:    \n    /** We can't create nodes separately, do it through newNode method of graph */\n    GNode( GGraph *graph_p, int _id);\n    /** Contructor of node with specified position */\n    GNode( GGraph *graph_p, int _id, QPointF _pos);\n\n    friend class GGraph;\n    \npublic:\n    /** Destructor */\n    virtual ~GNode();\n\t\n\t/** Tell whether the text is shown */\n\tinline bool isTextShown() const\n\t{\n\t\treturn text_shown;\n\t}\n    /** Check if this node is in focus */\n    bool isNodeInFocus() const;\n    \n    /** Memorize that the text is shown */\n\tinline void setTextShown( bool shown = true)\n\t{\n\t\ttext_shown = shown;\n\t}\n\n\t/** Get node's Id as it was parsed from ir dump */\n\tinline GraphNum irId() const\n\t{\n\t\treturn ir_id;\n\t}\n\t/** Set node's IR ID */\n\tinline void setIRId( GraphNum i)\n\t{\n\t\tir_id = i;\n\t}\n\n\t/** Get the pointer to item */\n    inline NodeItem* item() const\n    {\n        return item_p;\n    }\n    /** Get the corresponding text */\n    inline QTextDocument *doc() const\n    {\n        return _doc;\n    }\n    /** Set node's text document */\n    inline void setDoc( QTextDocument* doc)\n    {\n        _doc = doc;\n    }\n    \n    /** \n     * Update DOM element\n     */\n    virtual void updateElement();\n\n    /**\n     * Read properties from XML\n     */\n    virtual void readFromElement( QDomElement elem);\n\n    GGraph * graph() const;\n    /** Get next graph's node */\n    inline GNode* nextNode()\n    {\n        return static_cast< GNode*>( AuxNode::nextNode());\n    }\n    /** Get prev graph's node */\n    inline GNode* prevNode()\n    {\n        return static_cast< GNode*>( AuxNode::prevNode());\n    }\n    /** Edge connection reimplementation */\n    inline void AddEdgeInDir( GEdge *edge, GraphDir dir)\n    {\n        AuxNode::AddEdgeInDir( (AuxEdge *)edge, dir);\n    }\n    /** Add predecessor */\n    inline void AddPred( GEdge *edge)\n    {\n        AddEdgeInDir( edge, GRAPH_DIR_UP);\n    }\n    /** Add successor */\n    inline void AddSucc( GEdge *edge) \n    {\n        AddEdgeInDir( edge, GRAPH_DIR_DOWN);\n    }\n    /** Get first edge in given direction */\n    inline GEdge* firstEdgeInDir( GraphDir dir)\n    {\n        return static_cast< GEdge*>( AuxNode::firstEdgeInDir( dir));\n    }\n    /** Get first successor */\n    inline GEdge* firstSucc()\n    {\n        return firstEdgeInDir( GRAPH_DIR_DOWN);\n    }\n    /** Get first predecessor */\n    inline GEdge* firstPred()\n    {\n        return firstEdgeInDir( GRAPH_DIR_UP);\n    }\n    /** Get node's width */\n    virtual inline double width() const\n    {\n        return item()->borderRect().width();\n    }\n\n    /** Get node's nodes height */\n    virtual inline double height() const\n    {\n        return item()->boundingRect().height();\n    }\n    /** Set node's style */\n    inline void setStyle( GStyle *st)\n    {\n        if ( isNotNullP( _style))\n            _style->decNumItems();\n        _style = st;\n        if ( isNotNullP( _style))\n            _style->incNumItems();\n        item()->update();\n    }\n    /** Get node's style */\n    inline GStyle * style() const\n    {\n        return _style;\n    }\n};\n#endif"
  },
  {
    "path": "showgraph/GraphView/style_edit.cpp",
    "content": "/**\n * @file: style_edit.cpp \n * Widgets for style manipulation\n */\n/* \n * GUI for ShowGraph tool.\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#include \"gview_impl.h\"\n\nColorButton::ColorButton( QWidget *parent):\n    QAbstractButton( parent)\n{\n\n}\n\nvoid ColorButton::paintEvent( QPaintEvent *event)\n{\n    QPainter painter( this);\n    painter.setPen( palette().windowText().color());\n    painter.setBrush( color);\n    painter.drawRect( rect());\n}\n\nQSize ColorButton::sizeHint() const\n{\n    return QSize( 20,20);\n}\n\nStyleEdit::StyleEdit( QWidget *parent, bool show_additional)\n: name_label(NULL),\n  line_color_label(NULL),\n  line_style_label(NULL),\n  line_width_label(NULL),\n  fill_color_label(NULL),\n  shape_label(NULL),\n  name_combo(NULL),\n  fill_check(NULL),\n  shape_combo(NULL),\n  line_color_button(NULL),\n  line_style_combo(NULL),\n  line_width_spin(NULL),\n  fill_color_button(NULL),\n  ok(NULL),\n  cancel(NULL)\n{\n    QColor color;\n    if ( show_additional)\n    {        \n        shape_combo = new QComboBox( this);\n        shape_combo->addItem(tr(\"Box\"), NODE_SHAPE_BOX);\n        shape_combo->addItem(tr(\"Rounded box\"), NODE_SHAPE_ROUNDED_BOX);\n        shape_combo->addItem(tr(\"Ellipse\"), NODE_SHAPE_ELLIPSE);\n        shape_combo->addItem(tr(\"Circle\"), NODE_SHAPE_CIRCLE);\n        shape_combo->addItem(tr(\"Diamond\"), NODE_SHAPE_DIAMOND);\n\n        shape_label = new QLabel( \"Shape:\", this);\n        shape_label->setBuddy( shape_combo);\n    } else\n    {\n        shape_combo = NULL;\n    }\n\n    color = QColor(palette().windowText().color());\n    line_color_button = new ColorButton( this);\n    line_color_button->setColor( color);\n    \n    line_color_label = new QLabel( \"Line color:\", this);\n    line_color_label->setBuddy( line_color_button);\n\n    line_style_combo = new QComboBox( this);\n#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)\n    line_style_combo->addItem(tr(\"Solid\"), QPen(Qt::SolidLine));\n    line_style_combo->addItem(tr(\"Dash\"), QPen(Qt::DashLine));\n    line_style_combo->addItem(tr(\"Dot\"), QPen(Qt::DotLine));\n    line_style_combo->addItem(tr(\"Dash Dot\"), QPen(Qt::DashDotLine));\n    line_style_combo->addItem(tr(\"Dash Dot Dot\"), QPen(Qt::DashDotDotLine));\n    line_style_combo->addItem(tr(\"None\"), QPen(Qt::NoPen));\n#else\n    line_style_combo->addItem(tr(\"Solid\"), Qt::SolidLine);\n    line_style_combo->addItem(tr(\"Dash\"), Qt::DashLine);\n    line_style_combo->addItem(tr(\"Dot\"), Qt::DotLine);\n    line_style_combo->addItem(tr(\"Dash Dot\"), Qt::DashDotLine);\n    line_style_combo->addItem(tr(\"Dash Dot Dot\"), Qt::DashDotDotLine);\n    line_style_combo->addItem(tr(\"None\"), Qt::NoPen);\n#endif\n\n    line_style_label = new QLabel( \"Line style:\", this);\n    line_style_label->setBuddy( line_style_combo);\n    \n    line_width_spin = new QDoubleSpinBox( this);\n    line_width_spin->setMaximum( 12);\n    \n    line_width_label = new QLabel( \"Line width:\", this);\n    line_width_label->setBuddy( line_width_spin);\n\n    if ( show_additional)\n    {\n        color = QColor(palette().base().color());\n        fill_check = new QCheckBox( \"Fill\", this);\n        fill_color_button = new ColorButton( this);\n        fill_color_button->setColor( color);\n        \n        fill_color_label = new QLabel( \"Fill color:\", this);\n        fill_color_label->setBuddy( fill_color_button);\n    } else\n    {\n        fill_color_button = NULL;\n        fill_color_label = NULL;\n        fill_check = NULL;\n    }\n\n\n    ok = new QPushButton( \"&OK\", this);\n    cancel = new QPushButton( \"&Cancel\", this);\n\n    QGridLayout *mainLayout = new QGridLayout;\n    //mainLayout->setColumnStretch(1, 3);\n    \n    //Row 0 name\n    if ( show_additional)\n    {\n        mainLayout->addWidget( shape_label, 0, 0, Qt::AlignRight);\n        mainLayout->addWidget( shape_combo, 0, 1);\n    }\n    //Row 1 line color\n    mainLayout->addWidget( line_color_label, 1, 0, Qt::AlignRight);\n    mainLayout->addWidget( line_color_button, 1, 1);\n    //Row 2 line style\n    mainLayout->addWidget( line_style_label, 2, 0, Qt::AlignRight);\n    mainLayout->addWidget( line_style_combo, 2, 1);\n     //Row 3 line width\n    mainLayout->addWidget( line_width_label, 3, 0, Qt::AlignRight);\n    mainLayout->addWidget( line_width_spin, 3, 1);\n    //Row 4 fill color\n    if ( show_additional)\n    {\n        mainLayout->addWidget( fill_check, 4, 0, 1, 2);\n        mainLayout->addWidget( fill_color_label, 5, 0, Qt::AlignRight);\n        mainLayout->addWidget( fill_color_button, 5, 1);\n    }\n    // Row 5 ok & cancel\n    mainLayout->addWidget( ok, 6, 0);\n    mainLayout->addWidget( cancel, 6, 1);\n    \n    setLayout( mainLayout);\n\n    if ( show_additional)\n    {\n        connect( shape_combo, SIGNAL( currentIndexChanged( int)), this, SLOT( changeShape()) );\n        connect( fill_color_button, SIGNAL( clicked()), this, SLOT( selectFillColor()) );\n        connect( fill_check, SIGNAL( clicked()), this, SLOT( changeFillStyle()) );\n    }\n    connect( line_color_button, SIGNAL( clicked()), this, SLOT( selectLineColor()) );\n    connect( line_style_combo, SIGNAL( currentIndexChanged( int)), this, SLOT( changeLineStyle()) );\n    connect( line_width_spin, SIGNAL( valueChanged( double)), this, SLOT( changeLineWidth( double)) );\n    \n\n    connect( ok, SIGNAL( clicked()), this, SLOT( accept()));\n    connect( cancel, SIGNAL( clicked()), this, SLOT( reject()));\n\n    setWindowTitle( \"Edit style\");\n    setWindowFlags( windowFlags() | Qt::MSWindowsFixedSizeDialogHint);\n}\n\n/** Change name of the current style */\nvoid StyleEdit::changeStyleName()\n{\n\n}\n\n/** Invoke color selection for line */\nvoid StyleEdit::selectLineColor()\n{\n    QColor color = QColorDialog::getColor();\n    line_color_button->setColor( color);\n    gstyle->setPenColor( color);\n    gstyle->setState();\n    emit styleChanged( gstyle);\n}\n\n/** Change line style */\nvoid StyleEdit::changeLineStyle()\n{\n    gstyle->setPenStyle((Qt::PenStyle)line_style_combo->itemData( line_style_combo->currentIndex()).toInt());\n    gstyle->setState();\n    emit styleChanged( gstyle);\n}\n\n/** Change line style */\nvoid StyleEdit::changeShape()\n{\n    emit styleChanged( gstyle);\n    gstyle->setShape((NodeShape)shape_combo->itemData( shape_combo->currentIndex()).toInt());\n    gstyle->setState();\n    emit styleChanged( gstyle);\n}\n\n/** Change line width */\nvoid StyleEdit::changeLineWidth( double width)\n{\n    gstyle->setPenWidth(line_width_spin->value());\n    gstyle->setState();\n    emit styleChanged( gstyle);\n}\n/** Set fill style */\nvoid StyleEdit::changeFillStyle()\n{\n    if ( !fill_check->isChecked())\n    { \n        QBrush br = gstyle->brush();\n        br.setStyle( Qt::NoBrush);\n        gstyle->setBrush( br);\n    } else\n    {\n        QBrush br = gstyle->brush();\n        br.setStyle( Qt::SolidPattern);\n        gstyle->setBrush( br);\n        gstyle->setState();\n    }\n    emit styleChanged( gstyle);\n}\n/** Invoke color selection for fill */\nvoid StyleEdit::selectFillColor()\n{\n    QColor color = QColorDialog::getColor();\n    QBrush brush( color);\n    fill_color_button->setColor( color);\n    gstyle->setBrush( brush);\n    gstyle->setState();\n    fill_check->setChecked( true);\n    emit styleChanged( gstyle);\n}\n\n/** Set style */\nvoid StyleEdit::setGStyle( GStyle *st)\n{\n    gstyle = st;\n    QColor color( st->pen().color());\n    line_color_button->setColor( color);\n    if ( isNotNullP( shape_combo))\n    {\n        color =  QColor( st->brush().color());\n        shape_combo->setCurrentIndex( shape_combo->findData( gstyle->shape()));\n        fill_color_button->setColor( color);\n        fill_check->setChecked( st->brush().style() != Qt::NoBrush);\n        if ( st->brush().style() == Qt::NoBrush)\n        {\n            QBrush br = gstyle->brush();\n            color = QColor( \"White\");\n            br.setColor( color);\n            gstyle->setBrush( br);\n            fill_color_button->setColor( color);\n        }\n    }\n#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)\n    line_style_combo->setCurrentIndex( line_style_combo->findData( QPen(gstyle->pen().style())));\n#else\n    line_style_combo->setCurrentIndex( line_style_combo->findData( gstyle->pen().style()));\n#endif\n    line_width_spin->setValue( gstyle->pen().widthF());\n}\n"
  },
  {
    "path": "showgraph/GraphView/style_edit.h",
    "content": "/**\n * @file: style_edit.h\n * Interface of style-manipulation widgets\n */\n/*\n * Graph library, internal representation of graphs in ShowGraph tool.\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#pragma once\n\n#ifndef STYLE_EDIT_H\n#define STYLE_EDIT_H\n\n#include \"gview_impl.h\"\n/**\n * Colored button\n */\nclass ColorButton: public QAbstractButton\n{\npublic:\n    ColorButton( QWidget *parent = 0);    /** Constructor */\n    void paintEvent( QPaintEvent *event); /** Paint event handler reimplementation */\n    QSize sizeHint() const;               /** Size hint reimplementation */\n    \n    /** Change the button's color */\n    void setColor( QColor &cl)            \n    {\n        color = cl;\n    }\nprivate:\n    /** Color of the button */\n    QColor color;\n};\n\n/**\n * Widget for creating/editing styles\n */\nclass StyleEdit: public QDialog\n{\n    Q_OBJECT;\npublic:\n    /** Constructor */\n    StyleEdit( QWidget *parent = 0, bool show_additional = false);\n    /** Set style */\n    void setGStyle( GStyle *);\nsignals:\n    /** Lets everyone know that the style has changed and affected objects should be redrwan */\n    void styleChanged( GStyle *style);\n\npublic slots:\n    /** Change name of the current style */\n    void changeStyleName();\n    /** Invoke color selection for line */\n    void selectLineColor();\n    /** Change line style */\n    void changeLineStyle();\n    /** Change line style */\n    void changeShape();\n    /** Change line width */\n    void changeLineWidth( double width);\n    /** Invoke color selection for fill */\n    void selectFillColor();\n    /** Change fill style */\n    void changeFillStyle();\nprivate:\n    GStyle *gstyle;\n    //QHash< QString, GStyle *> styles;\n    QLabel *name_label;\n    QLabel *line_color_label;\n    QLabel *line_style_label;\n    QLabel *line_width_label;\n    QLabel *fill_color_label;\n    QLabel *shape_label;\n\n    QComboBox *name_combo;\n    QCheckBox *fill_check; \n    QComboBox *shape_combo;\n    ColorButton *line_color_button;\n    QComboBox *line_style_combo;\n    QDoubleSpinBox *line_width_spin;\n    ColorButton *fill_color_button;\n    QPushButton *ok;\n    QPushButton *cancel;\n};\n\n#endif"
  },
  {
    "path": "showgraph/GraphView/visible_edge.cpp",
    "content": "/**\n * @file: visible_edge.cpp \n * Implemetation of VEdge class\n * @ingroup GUIGraph\n */\n/*\n * GUI for ShowGraph tool.\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n#include \"gview_impl.h\"\n\n/** Maximal contangent for edge to be considered 'vertical' */\nconst qreal MAX_COT_VERTICAL = 0.1;\n/** Maximal tangent for edge to be considered 'horizontal' */\nconst qreal MAX_TAN_HORIZONTAL = 0.1;\n\n/** Constructor from two nodes */\nVEdge::VEdge( GNode *pred_node, GNode *succ_node):\n    pred_priv( pred_node),\n    succ_priv( succ_node)\n{\n\n}\n\n/** Constructor from existing graph edge */\nVEdge::VEdge( GEdge *prototype)\n{\n    pred_priv = prototype->realPred();\n    succ_priv = prototype->realSucc();\n}\n\n/** Returns true if edge looks vertical in general */\nbool VEdge::isVertical() const\n{\n    NodeItem *p_item = pred()->item();\n    NodeItem *s_item = succ()->item();\n    \n    // Both points in p_item's coordinates\n    QPointF p_center = p_item->boundingRect().center();\n    QPointF s_center = p_item->mapFromItem( s_item, s_item->boundingRect().center());\n    qreal delta_x = abs<qreal>( p_center.x() - s_center.x());\n    qreal delta_y = abs<qreal>( p_center.y() - s_center.y());\n\n    if ( delta_x/delta_y > MAX_COT_VERTICAL)\n        return false;\n    return true;\n}\n\n/** Returns true if edge looks horizontal in general */\nbool VEdge::isHorizontal() const\n{\n    NodeItem *p_item = pred()->item();\n    NodeItem *s_item = succ()->item();\n    \n    // Both points in p_item's coordinates\n    QPointF p_center = p_item->boundingRect().center();\n    QPointF s_center = p_item->mapFromItem( s_item, s_item->boundingRect().center());\n    qreal delta_x = abs<qreal>( p_center.x() - s_center.x());\n    qreal delta_y = abs<qreal>( p_center.y() - s_center.y());\n\n    if ( delta_y/delta_x > MAX_TAN_HORIZONTAL)\n        return false;\n    return true;\n}\n\n/** Get end node that is in 'up' direction, returns NULL if edge is horizontal */\nGNode * \nVEdge::nodeUp() const\n{\n    NodeItem *p_item = pred()->item();\n    NodeItem *s_item = succ()->item();\n    \n    // Both points in p_item's coordinates\n    QPointF p_center = p_item->boundingRect().center();\n    QPointF s_center = p_item->mapFromItem( s_item, s_item->boundingRect().center());\n    \n    if ( isHorizontal())\n        return NULL;\n    // Note: y axis goes downwards\n    if ( p_center.y() > s_center.y()) \n    {\n        return succ();\n    } else\n    {\n        return pred();\n    }\n}\n/** Get end node that is in 'down' direction, returns NULL if edge is horizontal */\nGNode * \nVEdge::nodeDown() const\n{\n    NodeItem *p_item = pred()->item();\n    NodeItem *s_item = succ()->item();\n    \n    // Both points in p_item's coordinates\n    QPointF p_center = p_item->boundingRect().center();\n    QPointF s_center = p_item->mapFromItem( s_item, s_item->boundingRect().center());\n    \n    if ( isHorizontal())\n        return NULL;\n    // Note: y axis goes downwards\n    if ( p_center.y() > s_center.y()) \n    {\n        return pred();\n    } else\n    {\n        return succ();\n    }\n}\n\n/** Get end node that is in 'left' direction, returns NULL if edge is vertical */\nGNode * \nVEdge::nodeLeft() const\n{\n    NodeItem *p_item = pred()->item();\n    NodeItem *s_item = succ()->item();\n    \n    // Both points in p_item's coordinates\n    QPointF p_center = p_item->boundingRect().center();\n    QPointF s_center = p_item->mapFromItem( s_item, s_item->boundingRect().center());\n    \n    if ( isVertical())\n        return NULL;\n    // Note: x axis goes right\n    if ( p_center.x() > s_center.x()) \n    {\n        return succ();\n    } else\n    {\n        return pred();\n    }\n}\n\n/** Get end node that is in 'right' direction, returns NULL if edge is vertical */\nGNode * \nVEdge::nodeRight() const\n{\n    NodeItem *p_item = pred()->item();\n    NodeItem *s_item = succ()->item();\n    \n    // Both points in p_item's coordinates\n    QPointF p_center = p_item->boundingRect().center();\n    QPointF s_center = p_item->mapFromItem( s_item, s_item->boundingRect().center());\n    \n    if ( isVertical())\n        return NULL;\n    // Note: x axis goes right\n    if ( p_center.x() > s_center.x()) \n    {\n        return pred();\n    } else\n    {\n        return succ();\n    }\n}\n"
  },
  {
    "path": "showgraph/GraphView/visible_edge.h",
    "content": "/**\n * @file: visible_edge.h \n * Definition of VEdge class\n * @ingroup GUIGraph\n */\n/**\n * @page vedge Visible Edge Class\n * \n * Visible Edge Class\n * VEdge stands for \"visible edge\". It is a class for manipulating\n * an edge like the user see it. The need for this stems from\n * the fact that edge seen by user is actually composed of \n * several low-level edges between pseudo nodes.\n */\n/*\n * GUI for ShowGraph tool.\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#ifndef VISIBLE_EDGE_H\n#define VISIBLE_EDGE_H\n\n#include \"gview_impl.h\"\n\n/**\n * Visible edge\n * @ingroup GUIGraph\n */\nclass VEdge\n{\npublic:\n    /** Constructor from two nodes */\n    VEdge( GNode *pred_node, GNode *succ_node);\n    /** Constructor from existing graph edge */\n    VEdge( GEdge *prototype);\n    \n    /** Returns true if edge looks vertical in general */\n    bool isVertical() const;\n    /** Returns true if edge looks horizontal in general */\n    bool isHorizontal() const;\n    \n    /** Get end node that is in 'up' direction, returns NULL if edge is horizontal */\n    GNode *nodeUp() const;\n    /** Get end node that is in 'down' direction, returns NULL if edge is horizontal */\n    GNode *nodeDown() const;\n    /** Get end node that is in 'left' direction, returns NULL if edge is vertical */\n    GNode *nodeLeft() const;\n    /** Get end node that is in 'right' direction, returns NULL if edge is vertical */\n    GNode *nodeRight() const;\n    \n    /** Get pred */\n    inline GNode* pred() const;\n    /** Get succ */\n    inline GNode *succ() const;\nprivate:    \n    GNode *pred_priv;\n    GNode *succ_priv;\n};\n\n/** Get pred */\nGNode* VEdge::pred() const\n{\n    return pred_priv;\n}\n/** Get succ */\nGNode *VEdge::succ() const\n{\n    return succ_priv;\n}\n\n#endif /** VISIBLE_EDGE_H */"
  },
  {
    "path": "showgraph/LICENSE.txt",
    "content": "Copyright (c) 2014, Boris Shurygin\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n\n3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
  },
  {
    "path": "showgraph/Layout/aux_edge.h",
    "content": "/**\n * @file: aux_edge.h\n * Layout Edge class\n *\n * Graph for performing layouts, consists of dummy nodes.\n * Layout library, 2d graph placement of graphs in ShowGraph tool.\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * AuxGraph, AuxNode and AuxEdge classes represent auxiliary graph used for layout purposes\n */\n#ifndef AUX_EDGE_H\n#define AUX_EDGE_H\n/**\n * Edge types\n *\n * @ingroup Layout\n */\nenum AuxEdgeType\n{\n\t/** Unknown type (typically before classification) */\n\tUNKNOWN_TYPE_EDGE = 0,\n\n\t/** Tree edge */\n\tTREE_EDGE,\n\t\n\t/** Back edge */\n\tBACK_EDGE,\n\n\t/** Forward edge */\n\tFORWARD_EDGE,\n\n\t/** Self-edge */\n\tSELF_EDGE,\n\n\t/** Number of edge types */\n\tEDGE_TYPES_NUM\n};\n\n/**\n * Edge of model graph used in Layout\n *\n * @ingroup Layout\n */\nclass AuxEdge: public Edge\n{\n    bool priv_fixed;\n\n    AuxEdgeType priv_type;\n   \nprotected:\n    /** Constructors are made private, only nodes and graph can create edges */\n    AuxEdge( AuxGraph *graph_p, int _id, AuxNode *_pred, AuxNode* _succ);\npublic:\n    friend class AuxGraph;\n    friend class AuxNode;\n\n    /** Get node in given direction */\n    inline AuxNode *node( GraphDir dir) const\n    {\n        return static_cast< AuxNode *>( Edge::node( dir));\n    }\n    /** Get predecessor */\n    inline AuxNode *pred() const \n    {\n        return node( GRAPH_DIR_UP);\n    }\n    /** Get successor */\n    inline AuxNode *succ() const \n    {\n        return node( GRAPH_DIR_DOWN);\n    }  \n    /** insert node on this edge */\n    inline AuxNode *insertNode()\n    {\n        return static_cast< AuxNode *>( Edge::insertNode());\n    }\n    /** Next edge in graph's list */\n    inline AuxEdge* nextEdge()\n    {\n        return static_cast< AuxEdge *>( Edge::nextEdge());\n    }\n    /** Next edge in give direction */\n    inline AuxEdge* nextEdgeInDir( GraphDir dir)\n    {\n        return static_cast< AuxEdge *>( Edge::nextEdgeInDir( dir));\n    }\n    /** Next successor */\n    inline AuxEdge* nextSucc()\n    {\n        return nextEdgeInDir( GRAPH_DIR_DOWN);\n    }\n    /** Next predecessor */\n    inline AuxEdge* nextPred()\n    {\n        return nextEdgeInDir( GRAPH_DIR_UP);\n    } \n    /** Check if an edge is fixed */\n    inline bool isFixed() const\n    {\n        return priv_fixed;\n    }\n    /** Set edge to be fixed */\n    inline void setFixed( bool fx)\n    {\n        priv_fixed = fx;\n    }\n    /** Check if edge was classified as a 'Backedge' */\n    inline bool isBack() const\n    {\n        return priv_type == BACK_EDGE;\n    }\n\t/** Get edge type */\n\tinline AuxEdgeType type() const\n\t{\n\t\treturn priv_type;\n\t}\n    /** Set edge type */\n    inline void setType( AuxEdgeType t = UNKNOWN_TYPE_EDGE)\n    {\n\t\tif ( isSelf())\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tpriv_type = t;\n    }\n\t/** Set edge to be of unknown type */\n    inline void setUnknown()\n    {\n        setType( UNKNOWN_TYPE_EDGE);\n    }\n\t/** Set edge to be a tree edge */\n    inline void setTree()\n    {\n       setType( TREE_EDGE);\n    }\n\t/** Set edge to be a backedge */\n    inline void setBack()\n    {\n        setType( BACK_EDGE);\n    }\n    /** Set edge to be a forward edge */\n    inline void setForward()\n    {\n        priv_type = FORWARD_EDGE;\n    }\n\t/** Set edge to be a self-edge */\n    inline void setSelf()\n    {\n        assertd( pred() == succ());\n\t\tsetType( SELF_EDGE);\n    }\n    /** Check if edge is a self-edge */\n    inline bool isSelf() const\n    {\n        return pred() == succ();\n    }\n\t/** Check whether this edge is inverted */\n    inline bool isInverted() const\n    {\n        return isBack();\n    }\n\t/** Return real node in given direction */\n\tinline AuxNode* realNode( GraphDir dir) const\n\t{\n\t\tAuxNode* n = node( dir);\n\t\tassertd( isNotNullP( n));\n\t\twhile ( n->isPseudo())\n\t\t{\n\t\t\tn = n->firstEdgeInDir( dir)->node( dir);\n\t\t}\n\t\treturn n;\n\t}\n\t/** Get real predecessor */\n\tinline AuxNode* realPred() const\n\t{\n\t\treturn realNode( GRAPH_DIR_UP);\n\t}\n\t/** Get real successor */\n\tinline AuxNode* realSucc() const\n\t{\n\t\treturn realNode( GRAPH_DIR_DOWN);\n\t}\n};\n\n#endif /* AUX_EDGE_H */"
  },
  {
    "path": "showgraph/Layout/aux_graph.cpp",
    "content": "/**\n * @file: aux_graph.cpp\n * Implementation of auxiliary graph\n * Layout library, 2d graph placement of graphs in ShowGraph tool.\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#include \"layout_iface.h\"\n\n/** Destructor for node */\nAuxNode::~AuxNode()\n{\n\n}\n\n/**\n * Default constructor\n */\nAuxGraph::AuxGraph( bool create_pools):\n    Graph( false),\n    ranking_valid( false),\n    levels(),\n    cur_level(0),\n    cur_pass(0),\n    max_rank(0),\n    layout_in_process( false) \n{\n    ranking = newNum();\n    order = newNum();\n    \n    watcher = new QFutureWatcher<void>();\n    \n    /** Pools' creation routine */\n    if ( create_pools)\n    {\n        node_pool = new FixedPool< AuxNode>();\n        edge_pool = new FixedPool< AuxEdge>();\n    }\n \n    connect( watcher, SIGNAL(finished()), this, SLOT( layoutNextStep()));\n}\n\n/**\n * Initialize levels\n */\nvoid\nAuxGraph::initLevels( Rank max_level)\n{\n    levels.resize( max_level + 1);\n    for ( Rank i = 0; i <= max_level; i++)\n    {\n        levels[ i] = new Level( i);\n    } \n}\n\n/**\n * Delete levels\n */\nvoid\nAuxGraph::deleteLevels()\n{\n    for ( int i = 0; i < levels.size(); i++)\n    {\n        delete levels[ i];\n    } \n}\n\n\n/**\n * Destructor. Cleans up level info\n */\nAuxGraph::~AuxGraph()\n{\n    deleteLevels();\n    delete watcher;\n    freeNum( ranking);\n    freeNum( order);\n}\n\n/**\n * Get root node of the graph\n */\nAuxNode*\nAuxGraph::rootNode()\n{\n    Level* root_level = levels[ 0];\n\n    if( isNullP( root_level) || isNullP( firstNode()))\n    {\n        return firstNode();\n    }\n    /** Use median heuristic to select root node */\n    qreal center = 0;\n    foreach ( AuxNode* node, root_level->nodes())\n    {\n        center = node->modelX() + node->width()/ 2;\n    }\n    center = center / root_level->nodes().count();\n    \n    AuxNode* prev = NULL;\n    AuxNode* node = NULL;\n    \n    foreach ( node, root_level->nodes())\n    {\n        if ( center <= node->modelX() + node->width()/ 2)\n        {\n            qreal delta_curr = node->modelX() + node->width()/ 2 - center;\n            if ( isNotNullP( prev)\n                 && ( delta_curr > center - prev->modelX() - prev->width()/ 2))\n            {\n                return prev;\n            } else\n            {\n                return node;\n            }\n        }\n        prev = node;\n    }\n    return firstNode();\n}\n"
  },
  {
    "path": "showgraph/Layout/aux_graph.h",
    "content": "/**\n * @file: aux_graph.h\n * Layout Graph class\n *\n * Graph for performing layouts, consists of dummy nodes.\n * Layout library, 2d graph placement of graphs in ShowGraph tool.\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * AuxGraph, AuxNode and AuxEdge classes represent auxiliary graph used for layout purposes\n */\n#ifndef AUX_GRAPH_H\n#define AUX_GRAPH_H\n\n#include \"layout_iface.h\"\n\n/** Get first edge in given direction */\ninline AuxEdge*\nAuxNode::firstEdgeInDir( GraphDir dir)\n{\n    return static_cast< AuxEdge*>( Node::firstEdgeInDir( dir));\n}\n/** Get first successor */\ninline AuxEdge*\nAuxNode::firstSucc()\n{\n    return firstEdgeInDir( GRAPH_DIR_DOWN);\n}\n/** Get first predecessor */\ninline AuxEdge*\nAuxNode::firstPred()\n{\n    return firstEdgeInDir( GRAPH_DIR_UP);\n}\n\n/** Edge connection reimplementation */\ninline void\nAuxNode::AddEdgeInDir( AuxEdge *edge, GraphDir dir)\n{\n    Node::AddEdgeInDir( edge, dir);\n}\n/** Add predecessor */\ninline void\nAuxNode::AddPred( AuxEdge *edge)\n{\n    AddEdgeInDir( edge, GRAPH_DIR_UP);\n}\n/** Add successor */\ninline void\nAuxNode::AddSucc( AuxEdge *edge) \n{\n    AddEdgeInDir( edge, GRAPH_DIR_DOWN);\n}\n/**\n * Graph with nodes of two types: simple nodes and edge controls\n *\n * @ingroup Layout\n */\nclass AuxGraph: public QObject, public Graph\n{\n    Q_OBJECT;\nprivate:\n    /** Layout algorithm inner variables */\n    bool layout_in_process;\n    int cur_level; //last processed level\n    int cur_pass; // current pass\n    \n    /** Watcher for processing layout in parallel with main event loop */\n    QFutureWatcher< void> *watcher;\n\n    /** Array of node lists for ranks */\n    QVector< Level*> levels;\n\n    /** Order numeration */\n    Numeration order;\n    \n    /** Ranking state */\n    bool ranking_valid;\n\n    /** Ranking numeration */\n    Numeration ranking;\n\n    /** Maximum used for ranking */\n    GraphNum max_rank;\n\n    /**\n     * Structure used for dfs traversal loop-wise implementation\n     * Not part of interface used internally\n     */\n    struct SimpleDfsStepInfo\n    {\n        AuxNode *node; // Node in consideration\n        AuxEdge *edge; // Next edge\n\n        /* Constructor */\n        SimpleDfsStepInfo( AuxNode *n)\n        {\n            node = n;\n            edge = n->firstSucc();\n        }\n        /* Constructor with direction specification */\n        SimpleDfsStepInfo( AuxNode *n, GraphDir dir)\n        {\n            node = n;\n            edge = n->firstEdgeInDir( dir);\n        }\n    };\n\n    /**\n     * Find enters for graph so that\n     * for every node there would exist an enter from wich it is reachable\n     */\n    QStack< SimpleDfsStepInfo *> findEnterNodes();\n\n    /**\n     * Mark nodes that are reachable down from given node\n     */\n    GraphNum markReachableDown( AuxNode *n, Marker m);\n\n    /** Initialize levels */\n    void initLevels( Rank max_level);\n    /** Delete levels */\n    void deleteLevels();\n    /** Set order of every node using DFS */\n    void orderNodesByDFS();\n    /** Try to reduce crossings */\n    void reduceCrossings();\n    /** Find proper vertical position for each level */\n    void adjustVerticalLevels();\n\n    /** Assign ranks to nodes in respect to maximum length of path from top */\n    Numeration rankNodes();\n    /** Assign edge types, mark edges that should be inverted */\n    void classifyEdges();\n\n    /** Get numeration that describes ranks in graph */\n    inline Numeration ranks() const\n    {\n        return ranking;\n    }\n    /** Get max rank number */\n    inline GraphNum maxRank() const\n    {\n        return max_rank;\n    }\nprotected:\n    /** Create node overload */\n    virtual Node * createNode( int _id)\n    {\n        return new ( node_pool) AuxNode( this, _id);\n    }\n    /** Create edge overload */\n    virtual Edge * createEdge( int _id, Node *_pred, Node* _succ)\n    {\n        return new ( edge_pool) AuxEdge( this, _id, \n                                         static_cast<AuxNode *>( _pred),\n                                         static_cast<AuxNode *>( _succ) );\n    }\n    /** Get node that is considered root one after the layout */\n    AuxNode* rootNode();\n    /** Arrange nodes horizontally */\n    void arrangeHorizontally();\n    /** Arrange nodes horizontally without respect of stable nodes */\n    void arrangeHorizontallyWOStable();\n    /** Arrange nodes horizontally with respect of stable nodes */\n    void arrangeHorizontallyWithStable( Rank min, Rank max);\npublic slots:\n    /** Process next level while doing layout in parallel with main event loop */\n    void layoutNextStep();\nsignals:\n    /** signal some progess in layout process */\n    void progressChange( int value);\n    /** signal that layout has finished */\n    void layoutDone();\npublic:\n    /** Default constructor */\n    AuxGraph( bool create_pools);\n    /** Destructor */\n    virtual ~AuxGraph();\n\n    /** Get graph's first edge */\n    inline AuxEdge* firstEdge() \n    {\n        return static_cast< AuxEdge *>( Graph::firstEdge());\n    }\n    /** Get graph's first node */\n    inline AuxNode* firstNode()\n    {\n        return static_cast< AuxNode *>( Graph::firstNode());\n    }\n\n    /** Check if ranking is is valid */\n    inline bool rankingValid() const\n    {\n        return ranking_valid;\n    }\n\n    /** Set ranking to invalid state */\n    inline void invalidateRanking()\n    {\n        ranking_valid = false;\n    }\n    /** Set ranking to valid state */\n    inline void validateRanking()\n    {\n        ranking_valid = true;\n    }\n\n    /** Debug info print */\n    virtual void debugPrint()\n    {\n        out( \"AuxGraph debug print\");\n        Graph::debugPrint();\n    }\n    \n    /** Perform layout */\n    void doLayout();\n    \n    /** Perform layout using concurrent threads */\n    void doLayoutConcurrent();\n    \n    /**\n     * Run some actions after main layout algorithm\n     */\n    virtual void layoutPostProcess();\n};\n\n/**\n * Representation of rank level\n *\n * @ingroup HLayout\n * A level rpresents a group of nodes that should have same/close vertical position\n */\nclass Level\n{\n    qreal _height;\n    qreal y_pos;\n    Rank level_rank;\n    QList< AuxNode*> node_list;\npublic:\n    /** Default constructor */\n    inline Level(): level_rank( 0), node_list(), _height( 0), y_pos( 0){};\n    /** Constructor with rank parameter */\n    inline Level( Rank r): level_rank( r), node_list(), _height( 0), y_pos( 0){};\n    /** Arrange nodes with respect to adjacent level*/\n    void arrangeNodes( GraphDir dir, bool commit_placement, bool first_pass);\n    /** Sort nodes by their order */\n    void sortNodesByOrder();\n    /** Get level's rank */\n    inline Rank rank() const\n    {\n        return level_rank;\n    }\n    /** Set level's rank */\n    inline void setRank( Rank r)\n    {\n        level_rank = r;\n    }\n    /** Get node list */\n    inline QList< AuxNode*> nodes() const\n    {\n        return node_list;\n    }\n    /** Add a node to list */\n    inline void add( AuxNode *node)\n    {\n        node_list.push_back( node);\n        if ( _height < node->height())\n            _height = node->height();\n        node->setLevel( this);\n        node->setRank( level_rank);\n    }\n    /** Set level height */\n    inline void setHeight( qreal h)\n    {\n        _height = h;\n    }\n    /** Get level height */\n    inline qreal height() const\n    {\n        return _height;\n    }\n    /** Set level vertical position */\n    inline void setY( qreal yy)\n    {\n        y_pos = yy;\n    }\n    /** Get level vertical pos */\n    inline qreal y() const\n    {\n        return y_pos;\n    }\n};\n\n/** Constructors are made private, only nodes and graph can create edges */\ninline AuxEdge::AuxEdge( AuxGraph *graph_p, int _id, AuxNode *_pred, AuxNode* _succ):\n    Edge( graph_p, _id, _pred, _succ),\n    priv_fixed( true), priv_type( UNKNOWN_TYPE_EDGE) \n{\n    if ( _pred == _succ)\n        priv_type = SELF_EDGE;\n};\n\n/** Constructor for node */\ninline AuxNode::AuxNode( AuxGraph *graph_p, int _id):\n    Node( graph_p, _id),\n    priv_x(0),\n    priv_y(0),\n    priv_height(0),\n    priv_width(0),\n    priv_priority(-1),\n    priv_level( NULL),\n    priv_order(-1),\n    node_type( AUX_NODE_SIMPLE),\n    is_for_placement( true),\n    barycenter(0),\n    priv_rank(RANK_UNDEF),\n    stable( false)\n{\n}\n#endif /** AUX_GRAPH_H */\n"
  },
  {
    "path": "showgraph/Layout/aux_node.h",
    "content": "/**\n * @file: aux_node.h\n * Layout Node class\n *\n * Graph for performing layouts, consists of dummy nodes.\n * Layout library, 2d graph placement of graphs in ShowGraph tool.\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * AuxGraph, AuxNode and AuxEdge classes represent auxiliary graph used for layout purposes\n */\n#ifndef AUX_NODE_H\n#define AUX_NODE_H\n\n/**\n * Types of a node\n *\n * @ingroup Layout\n */\nenum AuxNodeType\n{\n    /* Simple aux node that represents one node of processed graph */\n    AUX_NODE_SIMPLE,\n    /* Aux node that represents a control point of edge in processed graph */\n    AUX_EDGE_CONTROL,\n    /** Aux node that represents an edge label */\n    AUX_EDGE_LABEL,\n    /* Number of aux node types */\n    AUX_NODE_TYPES_NUM\n};\n\n/**\n * Represents nodes and edge controls in Layout\n * \n * @ingroup Layout\n */\nclass AuxNode: public Node\n{\n    double priv_x;\n    double priv_y;\n    double priv_height;\n    double priv_width;\n    qreal barycenter;\n    int priv_priority;\n    Level * priv_level;\n    int priv_order;\n    Rank priv_rank;\n    AuxNodeType node_type;\n    bool is_for_placement;\n    bool stable;\npublic:\n        /** Get next graph's node */\n    inline AuxNode* nextNode()\n    {\n        return static_cast< AuxNode*>( Node::nextNode());\n    }\n    /** Get prev graph's node */\n    inline AuxNode* prevNode()\n    {\n        return static_cast< AuxNode*>( Node::prevNode());\n    }\n    /** Edge connection reimplementation */\n    inline void AddEdgeInDir( AuxEdge *edge, GraphDir dir);\n    /** Add predecessor */\n    inline void AddPred( AuxEdge *edge);\n    /** Add successor */\n    inline void AddSucc( AuxEdge *edge);\n    /** Get first edge in given direction */\n    inline AuxEdge* firstEdgeInDir( GraphDir dir);\n    /** Get first successor */\n    inline AuxEdge* firstSucc();\n    /** Get first predecessor */\n    inline AuxEdge* firstPred();\n    /** Check is node should be 'more stable' during layout process */\n    inline bool isStable() const\n    {\n        return stable;\n    }\n    /** Set node to be 'more stable' during layout process */\n    inline void setStable( bool st = true)\n    {\n        stable = st;\n    }\n    /** Get Height */\n    virtual double height() const\n    {\n        return priv_height;\n    }\n    /** Get Width */\n    virtual double width() const\n    {\n        return priv_width;\n    }\n    /** Get x coordinate */\n    inline double modelX() const\n    {\n        return priv_x;\n    }\n    /** Get y coordinate */\n    inline double modelY() const\n    {\n        return priv_y;\n    }\n    /** Get node's priority */\n    inline int priority() const\n    {\n        return priv_priority;\n    }\n    /** Get rank */\n    inline int rank() const\n    {\n        return priv_rank;\n    }\n    /** Get order */\n    inline int order() const\n    {\n        return priv_order;\n    }\n    /** Set horizontal coordinate */\n    inline void setX( double x)\n    {\n        priv_x = x;\n    }\n    /** Set vertical coordinate */\n    inline void setY( double y)\n    {\n        priv_y = y;\n    }\n    /** Get barycenter horizontal coordinate */\n    inline qreal bc() const\n    {\n        return barycenter;\n    }\n    /** Set barycenter horizontal coordinate */\n    inline void setBc( qreal center)\n    {\n        barycenter = center;\n    }\n    /** Set Height */\n    inline void setHeight( double h) \n    {\n        priv_height = h;\n    }\n    /** Set Width */\n    inline void setWidth( double w) \n    {\n        priv_width = w;\n    }\n    /** Set priority */\n    inline void setPriority( int p) \n    {\n        priv_priority = p;\n    }\n    /** Set level */\n    inline void setLevel( Level* l) \n    {\n        priv_level = l;\n    }\n    /** Get level */\n    inline Level *level() const\n    {\n        return priv_level;\n    }\n    /** Set order */\n    inline void setOrder( int order)\n    {\n        priv_order = order;\n    }\n    /** Set rank */\n    inline void setRank( Rank r)\n    {\n        priv_rank = r;\n    }\n    /** Set type */\n    inline void setType( AuxNodeType t)\n    {\n        node_type = t;\n    }\n    /** Get type */\n    inline AuxNodeType type() const\n    {\n        return node_type;\n    }\n    /** Check if this node is a simple one */\n    inline bool isSimple() const\n    {\n        return node_type == AUX_NODE_SIMPLE;\n    }\n    /** Check if this node is an edge control */\n    inline bool isEdgeControl() const\n    {\n        return node_type == AUX_EDGE_CONTROL;\n    }\n    /** Check if this node is an edge control */\n    inline bool isEdgeLabel() const\n    {\n        return node_type == AUX_EDGE_LABEL;\n    }\n    /** Check whether node is pseudo */\n    inline bool isPseudo() const\n    {\n        return isEdgeControl() || isEdgeLabel();\n    }\n    /** Set node to be an edge control */\n    inline void setTypeEdgeControl()\n    {\n        node_type = AUX_EDGE_CONTROL;\n    }\n    /** Set node's type to simple */\n    inline void setTypeSimple()\n    {\n        node_type = AUX_NODE_SIMPLE;\n    }\n    /** Set node's type to simple */\n    inline void setTypeEdgeLabel()\n    {\n        node_type = AUX_EDGE_LABEL;\n    }\n    /** Check if this node participates in horizontal arrangement */\n    inline bool isForPlacement() const\n    {\n        return is_for_placement;\n    }\n    /** Set node to participate in horizontal arrangement */\n    inline void setForPlacement( bool placed = true)\n    {\n        is_for_placement = placed;\n    }\n    /** Print node's debug info */\n    inline void debugPrint()\n    {\n        switch( node_type)\n        {\n            case AUX_NODE_SIMPLE:\n                out(\"SIMPLE %llu;\", id());\n                break;\n            case AUX_EDGE_CONTROL:\n                out(\"EDGE CONTROL %llu;\", id());\n                break;\n            case AUX_EDGE_LABEL:\n                out(\"EDGE LABEL %llu;\", id());\n                break;\n            default:         \n                assertd( 0);\n                out(\"NO_TYPE %llu;\", id());\n                break;\n        }\n    }\n\n    /**\n     * Return value of spacing between previous and current node due to their types\n     */\n    inline qreal spacing( AuxNodeType prev_type) const\n    {\n        switch ( prev_type)\n        {\n            case AUX_NODE_SIMPLE:\n                if ( node_type == AUX_NODE_SIMPLE)\n                {\n                    return NODE_NODE_MARGIN;\n                } else\n                {\n                    return NODE_CONTROL_MARGIN;\n                }\n            case AUX_EDGE_CONTROL:\n                if ( node_type == AUX_NODE_SIMPLE)\n                {\n                    return NODE_CONTROL_MARGIN;\n                } else\n                {\n                    return CONTROL_CONTROL_MARGIN;\n                }\n            case AUX_EDGE_LABEL:\n                if ( node_type == AUX_NODE_SIMPLE)\n                {\n                    return NODE_NODE_MARGIN;\n                } else\n                {\n                    return NODE_CONTROL_MARGIN;\n                }\n            case AUX_NODE_TYPES_NUM:\n                return 0;\n        }\n        return NODE_NODE_MARGIN;\n    }\n    \n    /** Destructor */\n    virtual ~AuxNode();\n\nprotected:\n    /** We can't create nodes separately, do it through newNode method of graph */\n    AuxNode( AuxGraph *graph_p, int _id);\n    \n    friend class AuxGraph;\n};\n\n\n\n#endif /* AUX_NODE_H */\n"
  },
  {
    "path": "showgraph/Layout/layout.cpp",
    "content": "/**\n * @file: layout.cpp \n * Layout algorithms implementation file\n * Layout library, 2d graph placement of graphs in ShowGraph tool.\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n#include <algorithm>\n#include \"layout_iface.h\"\n\n/**\n * Arrange nodes in level\n */\nvoid arrangeLevel( Level *level, GraphDir dir, bool commit_placement, bool first_pass)\n{\n    level->arrangeNodes( dir, commit_placement, first_pass);\n}\n\n/**\n * Compare orders of nodes\n */\nbool compareOrders( AuxNode* node1,\n                    AuxNode* node2)\n{\n    return ( node1->order() < node2->order());\n}\n\n/**\n * compare center coordinates of group\n */\nbool compareGroups( NodeGroup* g1,\n                    NodeGroup* g2)\n{\n    /*\n     * center = g.left + width / 2 = g.left + ( g.right - g.left) / 2 = ( g.left + g.right)/2\n     *\n     *                g1.center < g2.center \n     * (g1.left + g1.right) / 2 < (g2.left + g2.right) / 2\n     *       g1.left + g1.right < g2.left + g2.right\n     */\n    \n    if ( g1->nodes().count() == 1 && g1->nodes().count() == 1)\n    {\n        if ( g1->left() + g1->right() == g2->left() + g2->right()) \n        {\n            return g1->nodes().first()->order() < g2->nodes().first()->order();\n        }\n    }\n    return ( g1->left() + g1->right() < g2->left() + g2->right());\n}\n\n/**\n * Sort nodes in a level with respect to their order\n */\nvoid Level::sortNodesByOrder()\n{\n    std::sort( node_list.begin(), node_list.end(), compareOrders);\n}\n\n/**\n * Arranges nodes using group merge algorithm.\n * NodeGroup is a group of nodes which interleave if we apply barycentric heuristic directly.\n * These nodes are placed within group borders. If two groups interleave they are merged.\n * Arrangement is performed iteratively starting with groups that have one node each.\n */\nvoid Level::arrangeNodes( GraphDir dir, bool commit_placement, bool first_pass)\n{\n    QList< NodeGroup *> list;\n    foreach ( AuxNode* node, node_list)\n    {\n        if ( node->isForPlacement())\n        {\n            NodeGroup* group = new NodeGroup( node, dir, first_pass);\n            list.push_back( group);\n        }\n    }\n    /** Sort groups with respect to their coordinates */\n    std::sort( list.begin(), list.end(), compareGroups);\n    \n    std::list< NodeGroup *> groups;\n    \n    foreach( NodeGroup *group, list)\n    {\n        groups.push_back( group);\n    }\n    \n    std::list< NodeGroup *>::iterator it = groups.begin();\n\n    /**\n     * For each group\n     */\n    while( groups.size())\n    {\n        /*\n         * 1. Look at the group to the right and left and see they interleave\n         *    if they do -> merge groups and repeat\n         */\n        NodeGroup* grp = *it;\n        std::list< NodeGroup *>::iterator it_right = it;\n        it_right++;\n        bool no_merge = true; \n\n        /** Group to the left */\n        if ( it != groups.begin())\n        {\n            std::list< NodeGroup *>::iterator it_left = it;\n            it_left--;\n            NodeGroup* left_grp = *it_left;\n            if ( grp->interleaves( left_grp))\n            {\n                groups.erase( it_left);\n                grp->merge( left_grp);\n                no_merge = false;\n                delete ( left_grp);\n            }\n        }\n        /** Group to the right */\n        if ( it_right != groups.end())\n        {\n            NodeGroup* right_grp = *it_right;\n            if ( grp->interleaves( right_grp))\n            {\n                groups.erase( it_right);\n                grp->merge( right_grp);\n                no_merge = false;\n                delete ( right_grp);\n            }    \n        }\n        /** Proceed to the next group */\n        if ( no_merge)\n            it++;\n        /** End loop if we have processed all groups and merged everything we could */\n        if ( it == groups.end())\n            break;\n    }\n\n    if ( commit_placement)\n    {\n        /** Assign coordinates to nodes */\n        for ( it = groups.begin(); it != groups.end(); it++)\n        {\n            NodeGroup *grp = *it;\n            grp->placeNodesFinal( dir);\n            delete grp;\n        }\n    } else \n    {\n        /** Assign coordinates to nodes */\n        for ( it = groups.begin(); it != groups.end(); it++)\n        {\n            NodeGroup *grp = *it;\n            grp->placeNodes();\n            delete grp;\n        }\n    }\n}\n\n/**\n * Mark nodes that are reachable in direction GRAPH_DIR_DOWN from given node \n */\nGraphNum\nAuxGraph::markReachableDown( AuxNode *n,\n                             Marker m)\n{\n    GraphNum marked = 1;\n    QStack< AuxNode *> trav;\n    trav.push( n);\n    n->mark( m);\n    while ( !trav.isEmpty())\n    {\n        AuxNode *n = trav.pop();\n        AuxEdge *e;\n\n        foreachSucc( e, n)\n        {\n            AuxNode* succ = e->succ();\n            if ( succ->mark( m))\n            {\n                marked++;\n                trav.push( succ);\n            }\n        }\n    }\n    return marked;\n}\n\n/**\n * Find enter nodes\n */\nQStack< AuxGraph::SimpleDfsStepInfo *>\nAuxGraph::findEnterNodes()\n{\n    QStack< SimpleDfsStepInfo *> stack;\n    Marker m = newMarker();\n    GraphNum marked = 0;\n    QStack< AuxNode *> trav;\n\n    /** Find nodes that have no predecessors */\n    for ( AuxNode *n = firstNode();\n          isNotNullP( n);\n          n = n->nextNode())\n    {\n        if ( isNullP( n->firstPred()))\n        {\n            n->mark( m);\n            marked++;\n            stack.push( new SimpleDfsStepInfo( n));\n            trav.push( n);\n        } else\n        {\n            bool has_valid_pred = false;\n            AuxEdge* e = n->firstPred();\n\n            while ( isNotNullP( e))\n            {\n                if ( areNotEqP( e->pred(),n))\n                {\n                    has_valid_pred = true;\n                    break;\n                }\n                e = e->nextPred();\n            }\n            if ( !has_valid_pred)\n            {\n                n->mark( m);\n                marked++;\n                stack.push( new SimpleDfsStepInfo( n));\n                trav.push( n);\n            }\n        }\n    }\n    /** Mark nodes from enters */\n    while ( !trav.isEmpty())\n    {\n        AuxNode *n = trav.pop();\n        AuxEdge *e;\n\n        ForEdges( n, e, Succ)\n        {\n            AuxNode* succ = e->succ();\n            if ( succ->mark( m))\n            {\n                marked++;\n                trav.push( succ);\n            }\n        }\n    }\n    /** Check if we're done */\n    if ( marked == nodeCount())\n    {\n        freeMarker( m);\n        return stack;\n    }\n\n    /** Begin traverse from exits */\n    QStack< SimpleDfsStepInfo *> rev_trav;\n    Marker visited = newMarker();\n\n    /* Fill stack with nodes that have no successors */\n    for ( AuxNode *n = firstNode();\n          isNotNullP( n);\n          n = n->nextNode())\n    {\n        bool has_valid_succ = false;\n\n        if ( n->isMarked( m))\n            continue;\n\n        AuxEdge* e = n->firstSucc();\n\n        while ( isNotNullP( e))\n        {\n            if ( !e->succ()->isMarked( m) && areNotEqP( e->succ(),n))\n            {\n                has_valid_succ = true;\n                break;\n            }\n            e = e->nextSucc();\n        }\n        if ( !has_valid_succ)\n        {\n            n->mark( m);\n            n->mark( visited);\n            rev_trav.push( new SimpleDfsStepInfo( n, GRAPH_DIR_UP));\n        }\n    }\n\n    /** Upward pass */\n    while( !rev_trav.isEmpty())\n    {\n        SimpleDfsStepInfo *info = rev_trav.top();\n        AuxNode *node = info->node;\n        AuxEdge *edge = info->edge;\n        \n        if ( isNotNullP( edge)) // Add predecessor to stack\n        {\n            AuxNode* pred_node = edge->pred();\n            info->edge = edge->nextPred();\n            \n            if ( !pred_node->isMarked( m)\n                 && pred_node->isMarked( visited))\n            {\n                //Backedge in reverse traversal terms. Consider edge's predecessor as enter node\n                stack.push( new SimpleDfsStepInfo( edge->succ()));\n            }\n            if ( pred_node->mark( visited))\n                 rev_trav.push( new SimpleDfsStepInfo( pred_node, GRAPH_DIR_UP));\n        } else // We're done with this node\n        {\n            node->mark( m);\n            marked++;\n            delete info;\n            rev_trav.pop();\n        }\n    }\n    freeMarker( visited);\n\n    /** Check if we're done */\n    if ( marked == nodeCount())\n    {\n        freeMarker( m);\n        return stack;\n    }\n\n    /** \n     *  If we didn't find all the nodes on previous passes then\n     *  they must be in infinite loops without a head so let's break these loops\n     *  r a n d o m l y\n     */\n    for ( AuxNode *n = firstNode();\n          isNotNullP( n);\n          n = n->nextNode())\n    {\n        if ( !n->isMarked( m))\n        {\n            stack.push( new SimpleDfsStepInfo( n));\n            marked+=markReachableDown( n, m);\n        }\n    }\n    assertd( marked == nodeCount());// FIXME: node count needs updating on node delete\n    freeMarker( m);\n    return stack;\n}\n\n/**\n * Perform edge classification\n */\nvoid AuxGraph::classifyEdges()\n{\n    Marker m = newMarker(); // Marker for visiting nodes\n    Marker doneMarker = newMarker(); // Marker for nodes that are finished\n    AuxEdge* e;\n\n    foreachEdge ( e, this)\n    {\n        e->setUnknown();   \n    }\n\n    /* Fill the traverse stack with enter nodes */\n    QStack< SimpleDfsStepInfo *> stack = findEnterNodes();\n    \n    foreach ( SimpleDfsStepInfo *info, stack)\n    {\n        info->node->mark( m);\n    }\n\n    /* Walk graph with marker and perform classification */\n    while ( !stack.isEmpty())\n    {\n        SimpleDfsStepInfo *info = stack.top();\n        AuxNode *node = info->node;\n        AuxEdge *edge = info->edge;\n        \n        if ( isNotNullP( edge)) // Add successor to stack\n        {\n            AuxNode* succ_node = edge->succ();\n            info->edge = edge->nextSucc();\n            \n            if ( !succ_node->isMarked( doneMarker)\n                 && succ_node->isMarked( m))\n            {\n                edge->setBack();\n                AuxNode *pred = edge->pred();\n                while ( pred->isEdgeLabel())\n                {\n                    pred->firstPred()->setBack();\n                    pred = pred->firstPred()->pred();\n                }\n            }\n            if ( succ_node->mark( m))\n                 stack.push( new SimpleDfsStepInfo( succ_node));\n        } else // We're done with this node\n        {\n            node->mark( doneMarker);\n            delete info;\n            stack.pop();\n        }\n    }\n\n    freeMarker( m);\n    freeMarker( doneMarker);\n    return;\n}\n\n/**\n * Ranking of nodes. Level distribution of nodes. Marks tree edges.\n */\nNumeration AuxGraph::rankNodes()\n{\n    QVector< int> pred_nums( nodeCount());\n    QStack< AuxNode *> stack; // Node stack\n    \n    invalidateRanking();\n\n    Numeration own = newNum();\n    GraphNum i = 0;\n    max_rank = 0;\n    /**\n     *  Set numbers to nodes and count predecessors of each node.\n     *  predecessors include inverted edges \n     */\n    AuxNode *n;\n    foreachNode( n, this)\n    {\n        int pred_num = 0;\n        n->setNumber( own, i);\n        AuxEdge* e; \n        foreachPred( e, n)\n        {\n            if ( e->pred() == e->succ())\n                continue;\n\n            if ( !e->isInverted())\n                pred_num++;\n        }\n        foreachSucc( e, n)\n        {\n            if ( e->pred() == e->succ())\n                continue;\n\n            if ( e->isInverted())\n                pred_num++;\n        }\n        pred_nums[ i] = pred_num;\n        i++;\n    }\n    /* Fill ranking and ordering numerations by walking the nodes */\n    /* Add nodes with no preds to stack */\n    foreachNode( n, this)\n    {\n        if ( pred_nums[ n->number( own)] == 0)\n        {\n            stack.push( n);\n        }\n    }\n    while( !stack.isEmpty())\n    {\n        AuxNode* n = stack.pop();\n        AuxEdge* e;\n        GraphNum rank = 0;\n\n        /* Propagation part */\n        foreachPred( e, n)\n        {\n            if ( e->pred() == e->succ())\n                continue;\n\n            if ( !e->isInverted())\n            {\n                if ( rank < e->pred()->number( ranking) + 1)\n                {\n                    rank = e->pred()->number( ranking) + 1;\n                }\n            }\n        }\n        foreachSucc( e, n)\n        {\n            if ( e->pred() == e->succ())\n                continue;\n\n            if ( e->isInverted())\n            {\n                if ( rank < e->succ()->number( ranking) + 1)\n                {\n                    rank = e->succ()->number( ranking) + 1;\n                }\n            }\n        }\n\n        if ( rank > max_rank)\n            max_rank = rank;\n\n        n->setNumber( ranking, rank);\n#ifdef _DEBUG\n        out( \"%llu node rank is %u\", n->id(), rank);\n#endif\n        //n->setY( rank * RANK_SPACING);\n\n        /* Traversal continuation */\n        foreachSucc( e, n)\n        {\n            if ( e->pred() == e->succ())\n                continue;\n\n            if ( !e->isInverted())\n            {\n                AuxNode* succ = e->succ();\n                pred_nums[ succ->number( own)] =\n                    pred_nums[ succ->number( own)] - 1;\n                \n                if ( pred_nums[ succ->number( own)] == 0)\n                {\n                    stack.push( succ);\n                }\n            }  \n        }\n        foreachPred( e, n)\n        {\n            if ( e->pred() == e->succ())\n                continue;\n            if ( e->isInverted())\n            {\n                AuxNode* succ = e->pred();\n                pred_nums[ succ->number( own)] =\n                    pred_nums[ succ->number( own)] - 1;\n                if ( pred_nums[ succ->number( own)] == 0)\n                {\n                    stack.push( succ);\n                }\n            }\n        }\n    }\n    freeNum( own);\n\n    /** Fill levels */\n    initLevels( maxRank());\n    foreachNode( n, this)\n    {\n        Rank rank = n->number( ranking);\n        if ( rank == NUMBER_NO_NUM)\n        {\n            rank = 0;\n            assertd( 0); // Shouldn't be here. Means ranking did not cover all nodes\n        } \n        levels[ rank]->add( n);\n    }\n    /** Create edge control nodes */\n    AuxEdge* e;\n    foreachEdge( e, this)\n    {\n        AuxNode* pred;\n        AuxNode* succ;\n        \n        if ( e->pred() == e->succ())\n            continue;\n\n        if ( e->isInverted())\n        {\n            pred = e->succ();\n            succ = e->pred();\n        } else\n        {\n            pred = e->pred();\n            succ = e->succ();\n        }\n\n        Rank pred_rank = pred->number( ranking);\n        Rank succ_rank = succ->number( ranking);\n        if ( pred_rank == NUMBER_NO_NUM)\n        {\n            pred_rank = 0;\n        } \n        if ( succ_rank == NUMBER_NO_NUM)\n        {\n            succ_rank = pred_rank + 1;\n        } \n        Rank curr_rank = pred_rank + 1;\n        AuxEdge *curr_edge = e;\n        while ( curr_rank != succ_rank)\n        {\n            AuxNode *node = curr_edge->insertNode();\n            if ( e->isInverted())\n            {\n                curr_edge = node->firstPred();\n            } else\n            {\n                curr_edge = node->firstSucc();\n            }\n            node->firstSucc()->setType( e->type());\n            node->setType( AUX_EDGE_CONTROL);\n            node->setY( pred->modelY() + RANK_SPACING);\n            levels[ curr_rank]->add( node);\n            node->setNumber( ranking, curr_rank);\n            pred = node;\n            curr_rank++;\n        }\n    }\n    validateRanking();\n#ifdef _DEBUG\n    //debugPrint();\n#endif\n    return ranking; \n}\n\n/**\n * Perform layout\n */\nvoid AuxGraph::doLayout()\n{\n    if ( layout_in_process)\n        return;\n    /**\n     * 0. Remove all edge controls\n     * FIXME: This is a stub. we should not delete controls,\n     *        instead we should reuse them and create new ones only if necessary\n     */\n    for ( AuxNode* n = firstNode();\n          isNotNullP( n);\n          )\n    {\n        AuxNode *next = n->nextNode();\n        if ( n->isEdgeControl())\n        {\n            deleteNode( n);\n        }\n        n = next;\n    }\n\n    /** 1. Perfrom edge classification */\n    classifyEdges();\n    \n    /** 2. Rank nodes */\n    rankNodes();\n\n    /** 3. Adjust levels vertically */\n    adjustVerticalLevels();\n\n    /** 4. Perform edge crossings minimization */\n    reduceCrossings();\n\n    /** 5. Perform horizontal arrangement of nodes */\n    arrangeHorizontally();\n\n    /** 6. Move edge controls to enchance the picture readability */\n}\n\n/**\n * Perform layout\n */\nvoid AuxGraph::doLayoutConcurrent()\n{\n    if ( layout_in_process)\n        return;\n    \n    /**\n     * 0. Remove all edge controls\n     * FIXME: This is a stub. we should not delete controls,\n     *        instead we should reuse them and create new ones only if necessary\n     */\n    for ( AuxNode* n = firstNode();\n          isNotNullP( n);\n          )\n    {\n        AuxNode *next = n->nextNode();\n        if ( n->isEdgeControl())\n        {\n            deleteNode( n);\n        }\n        n = next;\n    }\n\n    /** 1. Perfrom edge classification */\n    classifyEdges();\n    \n    /** 2. Rank nodes */\n    rankNodes();\n\n    /** 3. Adjust levels vertically */\n    adjustVerticalLevels();\n\n    /** 4. Perform edge crossings minimization */\n    reduceCrossings();\n\n    /** 5. Perform horizontal arrangement of nodes */\n    layout_in_process = true;\n    cur_pass = 0;\n    cur_level = 0;\n    layoutNextStep();\n\n    /** 6. Move edge controls to enchance the picture readability */\n}\n\n#define SIMPLE_DFS\n/**\n * Check if a node doesn't have any successors ( including inverted predecessors)\n */\nstatic bool isStartNode( AuxNode *n)\n{\n#ifdef SIMPLE_DFS\n    if ( isNotNullP( n->firstSucc()))\n    {\n        return false;\n    } \n    return true;\n#else\n    AuxEdge *edge = n->firstSucc();\n    if ( isNullP( edge))\n    {\n        edge = n->firstPred();\n        while ( isNotNullP( edge))\n        {\n            if ( edge->isInverted())\n            {\n                return false;\n            }\n            edge = edge->nextPred();\n        }\n    } else\n    {\n        while ( isNotNullP( edge))\n        {\n            if ( !edge->isInverted())\n            {\n                return false;\n            }\n            edge = edge->nextSucc();\n        }\n        if ( isNullP( edge))\n        {\n            edge = n->firstPred();\n            while ( isNotNullP( edge))\n            {\n                if ( edge->isInverted())\n                {\n                    return false;\n                }\n                edge = edge->nextPred();\n            }\n        }\n    }\n    return true;\n#endif\n}\n\n/** Structure used for dfs traversal */\nstruct DfsStepInfo\n{\n    AuxNode *node; /** Node in consideration */\n    AuxEdge *edge; /** Next edge */\n    bool inverted; /** If we have already processed preds and */\n\n#ifdef SIMPLE_DFS\n    /* Constructor */\n    DfsStepInfo( AuxNode *n)\n    {\n        LAYOUT_ASSERTD( isNotNullP( n), \"Null ptr to node in ordering traversal\");\n        node = n;\n        edge = n->firstPred();\n        inverted = false;\n    }\n    /** Next edge of this node */\n    void shiftEdge()\n    {\n        LAYOUT_ASSERTD( isNotNullP( edge), \"Null ptr to edge in ordering traversal\");\n        edge = edge->nextPred();\n    }\n    /** Node in direction of traversal */\n    AuxNode *nodeInDepth()\n    {\n        LAYOUT_ASSERTD( isNotNullP( edge), \"Null ptr to edge in ordering traversal\");\n        return edge->pred();\n    }\n#else \n    /* Constructor */\n    DfsStepInfo( AuxNode *n)\n    {\n        LAYOUT_ASSERTD( isNotNullP( n), \"Null ptr to node in ordering traversal\");\n        node = n;\n        edge = n->firstPred();\n        inverted = false;\n        if ( isNullP( edge))\n        {\n            inverted = true;\n            edge = node->firstSucc();\n            while ( isNotNullP( edge)\n                    && !edge->isInverted())\n            {\n                edge = edge->nextSucc();\n            }\n            LAYOUT_ASSERTD( isNullP( edge)\n                            || edge->isInverted(), \"Should be inverted or null\");\n        } else\n        {\n            while ( isNotNullP( edge)\n                    && edge->isInverted())\n            {\n                edge = edge->nextPred();\n            }\n            if ( isNullP( edge))\n            {\n                inverted = true;\n                edge = node->firstSucc();\n                while ( isNotNullP( edge)\n                        && !edge->isInverted())\n                {\n                    edge = edge->nextSucc();\n                }\n                LAYOUT_ASSERTD( isNullP( edge)\n                                || edge->isInverted(), \"Should be inverted or null\");\n            }\n        }\n    }\n    /** Next edge of this node */\n    void shiftEdge()\n    {\n        LAYOUT_ASSERTD( isNotNullP( edge), \"Null ptr to edge in ordering traversal\");\n        if ( inverted)\n        {\n            edge = edge->nextSucc();\n            while ( isNotNullP( edge)\n                    && !edge->isInverted())\n            {\n                edge = edge->nextSucc();\n            }\n            LAYOUT_ASSERTD( isNullP( edge)\n                            || edge->isInverted(), \"Should be inverted or null\");\n        } else\n        {\n            edge = edge->nextPred();\n            while ( isNotNullP( edge)\n                    && edge->isInverted())\n            {\n                edge = edge->nextPred();\n            }\n\n            if ( isNullP( edge))\n            {\n                inverted = true;\n                edge = node->firstSucc();\n                while ( isNotNullP( edge)\n                        && !edge->isInverted())\n                {\n                    edge = edge->nextSucc();\n                }\n            }\n        }\n    }\n    /** Node in direction of traversal */\n    AuxNode *nodeInDepth()\n    {\n        LAYOUT_ASSERTD( isNotNullP( edge), \"Null ptr to edge in ordering traversal\");\n\n        if ( edge->isInverted())\n        {\n            return edge->succ();\n        } else\n        {\n            return edge->pred();\n        }\n    }\n#endif\n};\n\n/**\n * Assign order to nodes by numbering in a reverse DFS traversal\n */\nvoid AuxGraph::orderNodesByDFS()\n{\n    if ( layout_in_process)\n        return;\n\n    Marker m = newMarker(); // Marker for visiting nodes\n    QStack< ::DfsStepInfo *> stack;\n    GraphNum num = nodeCount();\n    \n    /* Fill stack with nodes that have no predecessors */\n    for ( AuxNode *n = firstNode();\n          isNotNullP( n);\n          n = n->nextNode())\n    {\n        if ( isStartNode( n) && !n->isMarked( m))\n        {\n            //n->setOrder( num++);\n            stack.push( new DfsStepInfo( n));\n\n            /* Walk graph with marker and perform classification */\n            while ( !stack.isEmpty())\n            {\n                ::DfsStepInfo *info = stack.top();\n                \n                if ( isNotNullP( info->edge)) // Add successor to stack\n                {\n                    AuxNode* pred_node = info->nodeInDepth();\n                    info->shiftEdge();\n                    \n                    if ( pred_node->mark( m))\n                    {\n                        stack.push( new DfsStepInfo( pred_node));\n                        //pred_node->setOrder( num++);\n                    }\n                } else // We're done with this node\n                {\n                    info->node->setOrder( num--);\n                    delete info;\n                    stack.pop();\n                }\n            }\n        }\n    }\n    freeMarker( m);\n}\n\n/**\n * Arrange ranks vertically\n */\nvoid AuxGraph::adjustVerticalLevels()\n{\n    if ( layout_in_process)\n        return;\n    qreal y = 0;\n    qreal prev_height = 0;\n    for ( int i = 0; i < levels.size(); i++)\n    {\n        Level* level = levels[ i];\n        y += (prev_height + level->height() + RANK_SPACING) / 2;\n        level->setY( y );\n        prev_height = level->height();\n    }\n}\n\n/**\n * Try to reduce number of edge crossings between levels\n */\nvoid AuxGraph::reduceCrossings()\n{\n    if ( layout_in_process)\n        return;\n    /** Perform numeration and sort nodes to avoid tree edges crossings */\n    orderNodesByDFS();\n\n    for ( int i = 0; i < levels.size(); i++)\n    {\n        Level* level = levels[ i];\n        level->sortNodesByOrder();\n    }\n}\n\n/**\n * Assign X coordinates to the nodes\n */\nvoid AuxGraph::arrangeHorizontallyWOStable()\n{\n    if ( layout_in_process)\n        return;\n    /* Descending pass */\n    for ( int i = 0; i < levels.size(); i++)\n    {\n        levels[ i]->arrangeNodes( GRAPH_DIR_DOWN, false, true);\n    }\n    \n    /* Ascending pass */\n    for ( int i = levels.size() - 1; i >= 0; i--)\n    {\n        levels[ i]->arrangeNodes( GRAPH_DIR_UP, false, false);\n    }\n    /* Final pass */\n    for ( int i = 0; i < levels.size(); i++)\n    {\n        levels[ i]->arrangeNodes( GRAPH_DIR_DOWN, true, false);\n    }\n}\n\n/**\n * Arrange with respect to stable nodes\n */\nvoid\nAuxGraph::arrangeHorizontallyWithStable( Rank min, Rank max)\n{\n    /* Descending pass */\n    for ( int i = min; i < levels.size(); i++)\n    {\n        levels[ i]->arrangeNodes( GRAPH_DIR_DOWN, true, true);\n    }\n    \n    /* Ascending pass */\n    for ( int i = max; i >= 0; i--)\n    {\n        levels[ i]->arrangeNodes( GRAPH_DIR_UP, true, true);\n    }\n    /* Final pass */\n    for ( int i = min; i < levels.size(); i++)\n    {\n        //levels[ i]->arrangeNodes( GRAPH_DIR_DOWN, true, false);\n    }\n}\n\n/**\n * Assign X coordinates to the nodes\n */\nvoid\nAuxGraph::arrangeHorizontally()\n{\n    AuxNode *n;\n    bool with_stable = false;\n    Rank min_stable_rank = this->nodeCount();\n    Rank max_stable_rank = 0;\n    \n    foreachNode( n, this)\n    {\n        if ( n->isStable())\n        {\n            with_stable = true;\n            Rank rank = n->number( ranking);\n            if ( rank > max_stable_rank)\n                max_stable_rank = rank;\n            if ( rank < min_stable_rank)\n                min_stable_rank = rank;\n        }\n    }\n    if ( !with_stable)\n    {\n        arrangeHorizontallyWOStable();\n    } else\n    {\n        arrangeHorizontallyWithStable( min_stable_rank, max_stable_rank);\n    }\n}\n\n/** Empty implementation */\nvoid AuxGraph::layoutPostProcess()\n{\n\n}\n/**\n * Next step in concurrent processing of layout\n */\nvoid AuxGraph::layoutNextStep()\n{\n    if ( cur_pass)\n    {\n        int progress = 100 * ( (cur_pass - 1) * levels.size() + cur_level) / ( 3 * levels.size());\n        emit progressChange( progress);\n    }\n    switch ( cur_pass)\n    {\n        case 0:/* prepare data */\n            cur_level = 0;\n            cur_pass++;\n        case 1:/* Descending pass */\n            if ( cur_level < levels.size())\n            {\n                watcher->setFuture( QtConcurrent::run( arrangeLevel, levels[ cur_level], GRAPH_DIR_DOWN, false, true));\n                cur_level++;\n                break;\n            } else\n            {\n                cur_pass++;\n                cur_level = 0;\n            }\n        case 2:/* Ascending pass */\n            if ( cur_level < levels.size())\n            {\n                watcher->setFuture( QtConcurrent::run( arrangeLevel, levels[ cur_level], GRAPH_DIR_UP, false, false));\n                cur_level++;\n                break;\n            } else\n            {\n                cur_level = 0;\n                cur_pass++;\n            }\n        case 3:\n            if ( cur_level < levels.size())\n            {\n                watcher->setFuture( QtConcurrent::run( arrangeLevel, levels[ cur_level], GRAPH_DIR_DOWN, true, false));\n                cur_level++;\n                break;\n            } else\n            {\n                cur_level = 0;\n                cur_pass++;\n            }\n        default:\n            layoutPostProcess();\n            emit layoutDone();\n            layout_in_process = false;\n            break;\n    }\n}\n"
  },
  {
    "path": "showgraph/Layout/layout_iface.h",
    "content": "/**\n * @file: layout_iface.h \n * Layout interface\n *\n * Layout library, 2d graph placement of graphs in ShowGraph tool.\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * @defgroup Layout 2D Graph layout\n * @ingroup Core\n * @page layout Graph layout\n * Drawing graph on a 2D plane is done via Sugiyama-like algorithm. \n * Drawing is done in two steps:\n * - Ranking, wich defines vertical position of every node and inserts\n *   pseudo nodes on edges that span across multiple levels.\n * - Horizontal placement, wich uses barycenter heuristic to position a node close\n *   to the nodes connected with it on other levels\n */\n#ifndef LAYOUT_IFACE_H\n#define LAYOUT_IFACE_H\n\nclass AuxNode;\nclass AuxEdge;\nclass AuxGraph;\nclass Level;\n\n#include <QList>\n#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)\n#include <QtWidgets>\n#include <QtConcurrent/QtConcurrent>\n#else\n#include <QtGui>\n#endif\n\n/** Spacing between simple nodes */\nconst qreal NODE_NODE_MARGIN = 30;\n/** Spacing between node and edge control */\nconst qreal NODE_CONTROL_MARGIN = 5;\n/** Spacing between edge controls */\nconst qreal CONTROL_CONTROL_MARGIN = 5;\n/** Edge control width */\nconst qreal EDGE_CONTROL_WIDTH = 5;\n/** Edge control height */\nconst qreal EDGE_CONTROL_HEIGHT = 5;\n/** Vertical spacing between ranks */\nconst qreal RANK_SPACING = 40;\n\n\n/** Rank type and its undefined constant */\ntypedef unsigned int Rank;\n/** Rank undefined value constant */\nconst Rank RANK_UNDEF = (Rank) (-1);\n\n/**\n * Debug assert for layout library\n */\n#if !defined(LAYOUT_ASSERTD)\n#    define LAYOUT_ASSERTD(cond, what) ASSERT_XD(cond, \"Layout\", what)\n#endif\n\n#include \"../Graph/graph_iface.h\"\n#include \"aux_node.h\"\n#include \"aux_edge.h\"\n#include \"aux_graph.h\"\n#include \"node_group.h\"\n\n#endif /** LAYOUT_IFACE_H */\n"
  },
  {
    "path": "showgraph/Layout/node_group.cpp",
    "content": "/**\n * @file: node_group.cpp \n * Implementation of node group class\n * Layout library, 2d graph placement of graphs in ShowGraph tool.\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n#include <algorithm>\n#include \"layout_iface.h\"\n\n/**\n * Compare orders of nodes\n */\nbool compareBc( AuxNode* node1,\n                AuxNode* node2)\n{\n    if ( qFuzzyCompare( node1->bc(), node2->bc()))\n    {\n        return node1->order() < node2->order();\n    }\n    return ( node1->bc() < node2->bc());\n}\n\n/**\n * Constructor of group from a node.\n * Coordinates are computed with respect to pass direction\n */\nNodeGroup::NodeGroup( AuxNode *n,   // Parent node\n                      GraphDir dir, // Pass direction\n                      bool first_pass) // If this is the first run\n                      : node_list()\n{\n    init();\n    addNode( n);\n    /** Compute coordinates */\n    double sum = 0;\n    unsigned int num_peers = 0;\n    /**\n     * On descending pass we compute center coordinate with respect to coordinates of predecessors,\n     * on ascending - we look at successors\n     */\n    GraphDir rdir = RevDir( dir);\n    for ( AuxEdge* e = n->firstEdgeInDir( rdir);\n          isNotNullP( e);\n          e = e->nextEdgeInDir( rdir))\n    {\n        if ( !e->isInverted())\n        {\n            if ( !e->node( rdir)->isForPlacement())\n                continue;\n            num_peers++;\n            if ( e->node( rdir)->isEdgeLabel())\n            {\n                sum+= ( e->node( rdir)->modelX());\n            } else\n            {\n                sum+= ( e->node( rdir)->modelX() + ( e->node( rdir)->width() / 2));\n            }\n        }\n    }\n    for ( AuxEdge* e = n->firstEdgeInDir( dir);\n          isNotNullP( e);\n          e = e->nextEdgeInDir( dir))\n    {\n        if ( e->isInverted())\n        {\n            if ( !e->node( dir)->isForPlacement())\n                continue;\n            \n            num_peers++;\n\n            if ( e->node( dir)->isEdgeLabel())\n            {\n                sum+= ( e->node( dir)->modelX());\n            } else\n            {\n                sum+= ( e->node( dir)->modelX() + ( e->node( dir)->width() / 2));\n            }\n        }\n    }\n\n    /** Barycenter heuristic */\n    double center = 0;\n    edge_num = 1;\n    if ( num_peers > 0)\n    {\n        edge_num = num_peers;\n        center = sum / num_peers;\n    } else if ( !first_pass)\n    {\n        edge_num = 1;\n        center = n->modelX() + n->width() / 2;\n    }\n    if ( n->isEdgeLabel())\n        center += ( n->width() / 2);\n    if ( n->isStable())\n    {\n        center = n->modelX() + n->width() / 2;\n    }\n    n->setBc( center);\n    barycenter = center;\n    \n    border_left = center - n->width() / 2;\n    border_right = center + n->width() / 2;\n}\n\n/**\n * Merge two groups correcting borders and nodes list of resulting group\n */\nvoid NodeGroup::merge( NodeGroup *grp)\n{\n    /** Add nodes from group on the left */\n    node_list += grp->nodes();\n    AuxNodeType prev_type = AUX_NODE_TYPES_NUM;\n\n    /** Recalculate border coordinates */\n    /* 1. calculate center coordinate */\n    qreal bc1 = bc();\n    qreal bc2 = grp->bc();\n    unsigned int e1 = adjEdgesNum();\n    unsigned int e2 = grp->adjEdgesNum();\n    qreal center = ( right() + left()) / 2; \n    center = ( bc1 * e1 + bc2 * e2) / (e1 + e2);\n    \n    /* 2. calculate width */\n    qreal width = 0;\n    int num = 0;\n    qreal nodes_barycenter = 0;\n    \n    std::sort( node_list.begin(), node_list.end(), compareBc);\n    \n    foreach ( AuxNode* node, node_list)\n    {\n        width += node->spacing( prev_type);\n        nodes_barycenter += width + node->width() / 2; \n        width += node->width();\n        prev_type = node->type();\n        num++;\n    }\n    if (num != 0) nodes_barycenter = nodes_barycenter / num;\n\n    /* 3. set borders */\n    setLeft( center - nodes_barycenter);\n    setRight( left() + width);\n    barycenter = center;\n    edge_num = e1 + e2;\n    \n    //out(\"Width %e, center %e, barycenter %e\", width, center, barycenter);\n\n}\n\n/**\n * Place nodes withing the group\n */\nvoid NodeGroup::placeNodes()\n{\n    AuxNodeType prev_type = AUX_NODE_TYPES_NUM;\n    \n    qreal curr_left = left();\n    foreach ( AuxNode* node, node_list)\n    {\n        curr_left += node->spacing( prev_type);\n        node->setX( curr_left);\n        curr_left += node->width();\n        prev_type = node->type();\n    }\n}\n\n/**\n * Place nodes withing the group\n */\nvoid NodeGroup::placeNodesFinal( GraphDir dir)\n{\n    AuxNodeType prev_type = AUX_NODE_TYPES_NUM;\n    \n    qreal curr_left = left();\n    //out(\"Node placement: from %e to %e\", left(), right());\n\n    foreach ( AuxNode* node, node_list)\n    {\n        //out(\"Node %d\", node->id()); \n        curr_left += node->spacing( prev_type);\n        node->setX( curr_left);\n        curr_left += node->width();\n        prev_type = node->type();\n        node->setY( node->level()->y() - node->height() / 2 );\n    }\n}\n"
  },
  {
    "path": "showgraph/Layout/node_group.h",
    "content": "/**\n * @file: node_group.h\n * Group of nodes\n *\n * Layout library, 2d graph placement of graphs in ShowGraph tool.\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n * @defgroup HLayout Horizontal placement\n * @ingroup Layout\n */\n#ifndef NODE_GROUP_H\n#define NODE_GROUP_H\n\n/**\n * Group of nodes\n *\n * Abstraction that aids multiple nodes manipulation inside a level.\n *\n * @ingroup HLayout\n */\nclass NodeGroup\n{\n    /** Number of edges in adjacent layer */\n    unsigned int edge_num;\n    /** Barycenter */\n    qreal barycenter;\n    /** List of group's nodes */\n    QList< AuxNode *> node_list;\n    /** Horizontal coordinate of left border */\n    qreal border_left;\n    /** Horizontal coordinate of right border */\n    qreal border_right;\n    /** The heuristic weight of the group */\n    float group_weight;\npublic:\n    /** Initialize attributes of the group */\n    inline void init()\n    {\n        border_left = 0;\n        border_right = 0;\n        group_weight = 0;        \n    }\n    /** Get adjacent number of adjacent edges */\n    inline unsigned int adjEdgesNum() const\n    {\n        return edge_num;\n    }\n    /** Get barycenter of adjacent edges */\n    inline qreal bc() const\n    {\n        return barycenter;\n    }\n    /** Get weight */\n    inline float weight() const\n    {\n        return group_weight;\n    }\n    /** Get left border coordinate */\n    inline qreal left() const\n    {\n        return border_left;\n    }\n    /** Get right border coordinate */\n    inline qreal right() const\n    {\n        return border_right;\n    }\n    /** Set left border coordinate */\n    inline void setLeft( qreal pos)\n    {\n        border_left = pos;\n    }\n    /** Set right border coordinate */\n    inline void setRight( qreal pos)\n    {\n        border_right = pos;\n    }\n    /** Get node list */\n    QList<AuxNode *> nodes() const\n    {\n        return node_list;\n    }\n\n    /** Add node to list */\n    inline void addNode( AuxNode *node)\n    {\n        node_list.push_back( node);\n        group_weight += 1;\n    }\n\n    /** Default constructor */\n    NodeGroup() : node_list()\n    {\n        init();\n    }\n\n    /** Constructor of group from a node */\n    NodeGroup( AuxNode *n, GraphDir dir, bool first_pass);\n\n    /** Check if this groups interleaves with the given one */\n    inline bool interleaves( NodeGroup *grp) const\n    {\n        return !( left() > grp->right() \n                  || right() < grp->left());\n    }\n    \n    /** Merge two groups correcting borders and nodes list of resulting group */\n    void merge( NodeGroup *grp);\n\n    /** Place nodes inside group */\n    void placeNodes();\n    /** Place nodes and adjust the view */\n    void placeNodesFinal( GraphDir dir);\n};\n#endif"
  },
  {
    "path": "showgraph/README.txt",
    "content": "\nhttps://github.com/boris-shurygin/showgraph\nhttp://code.google.com/p/showgraph/\n\nShowgraph is a simple graph editor/viewer. It allows for creating nodes and connecting them with edges. Nodes have editable labels and edges can be routed using control points. One of primary goals was to create lightweight and easy-to-use tool for fast construction of a graph's visual representation. Showgraph features an auto-layout for directed graphs.\n\nAuthor: Boris Shurygin\n\n\n\nLicense:\n\nCopyright (c) 2014, Boris Shurygin\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n\n3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n"
  },
  {
    "path": "showgraph/Utils/asrt.h",
    "content": "/**\n * @file: asrt.h \n * Assertion related routines of Utils library for ShowGraph\n * @defgroup Asserts Assertions\n * @brief Assertion routines/macros\n * @ingroup Utils\n */\n/*\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#ifndef ASRT_H\n#define ASRT_H\n\n/**\n * Assert macro that works only in debug version\n * @ingroup Asserts\n */\n#if !defined(ASSERTD)\n#  ifdef _DEBUG\n#    define ASSERTD(cond) Q_ASSERT(cond)\n#  else\n#    define ASSERTD(cond)\n#  endif\n#endif\n\n/**\n * @brief Assert macro with description that works only in debug version\n * @ingroup Asserts\n * @param cond The condition\n * @param where Description of functionality where failure occured\n * @param what Error message explaining what happened\n *\n * Assertion that in case of failure provides additional info about what happened\n */\n#if !defined(ASSERT_XD)\n#  ifdef _DEBUG\n#    define ASSERT_XD(cond, where, what) Q_ASSERT_X(cond, where, what)\n#  else\n#    define ASSERT_XD(cond, where, what)\n#  endif\n#endif\n\n/** \n * Simple assert macro\n * @ingroup Asserts\n */\n#if !defined(ASSERT)\n#  define ASSERT(cond) Q_ASSERT(cond)\n#endif\n\n#if 0\n/**\n * Generic assertion routine template\n * @ingroup Asserts\n */\ntemplate<class Excpt> inline void assert( bool assertion)\n{\n    if ( !assertion)\n    {\n        throw Excpt();\n    }\n}\n\n/**\n * Assertion routine template parameterized with thrown exception type\n * @ingroup Asserts\n */\ntemplate<class Excpt> inline void assert( bool asrt, Excpt e)\n{\n    if ( !asrt)\n    {\n        throw e;\n    }\n}\n\n/**\n * Simple assertion routine \n * @ingroup Asserts\n */\ninline void assert( bool asrt)\n{\n    assert< int>( asrt);\n}\n#endif\n\n/**\n * Assert that works only in debug version\n * @ingroup Asserts\n */\ninline void assertd( bool asrt)\n{\n#ifdef _DEBUG\n    //assert< int>( asrt);\n#endif\n}\n\n#endif /* ASRT_H */\n"
  },
  {
    "path": "showgraph/Utils/conf.cpp",
    "content": "/**\n * @file: conf.cpp \n * Implementation of configuration tools\n */\n/*\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#include <QtWidgets>\n#include \"utils_iface.h\"\n\n#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)\n#define QTENDL     Qt::endl\n#else\n#define QTENDL     endl\n#endif\n\n/** \n * namespaces import\n */\nusing namespace Utils;\n\n/** Option's print routine */\nvoid\nOption::print( QTextStream &stream)\n{\n    //QTextStream stream( stdout);\n    \n    stream << \"-\" << short_name << \", \"\n           << \"--\" << long_name << \"    \"\n           << descr << QTENDL;\n}\n\n/** Default constructor of configuration */\nConf::Conf(): short_opts(), long_opts(), unknown_options()\n{\n#ifdef _DEBUG\n    /* Debug options */\n\n#endif\n    /* General purpose options */\n}\n\n/** Print options */\nvoid Conf::printOpts()\n{\n    QTextStream stream( stdout);\n    \n    foreach( Option *opt, short_opts)\n    {\n        opt->print( stream);\n    }\n}\n\n/** Print value defaults */\nvoid Conf::printDefaults()\n{\n\n}\n\n/** Read input arguments */\nvoid Conf::readArgs( int argc, char** argv)\n{\n    app_name = QString( argv[ 0]);\n\n    QTextStream err( stderr);\n    \n    for ( int i = 1; i < argc; i++)\n    {\n        QString curr( argv[ i]);\n        QRegularExpression short_rx(\"^-([^-]+)\");\n        QRegularExpression long_rx(\"^--([^-]+)\");\n        Option *opt = NULL;\n        auto short_pos = short_rx.match ( curr);\n        auto long_pos  = long_rx.match ( curr);\n        if ( short_pos.hasMatch() )\n        {\n            /* We look for expression among short option names */\n            QString name = short_pos.captured( 1);\n            \n            if ( short_opts.find( name) != short_opts.end())\n            {\n                opt = short_opts[ name];\n            } else\n            {\n                err << \"No such option \" << name << QTENDL;\n                unknown_options.push_back( name);\n            }\n        } else if ( long_pos.hasMatch() )\n        {\n            /* We look for expression among long option names */\n            QString name = long_pos.captured( 1);\n            if ( long_opts.find( name) != long_opts.end())\n            {\n                opt = long_opts[ name];\n            } else\n            {\n                err << \"No such option \" << name << QTENDL;\n                unknown_options.push_back( name);\n            }\n        } else\n        {\n            out(\"WTF\");\n            /* Is not an option specifier */\n            err << \"Unrecognized argument \" << curr << QTENDL;\n            unknown_options.push_back( curr);\n        }\n        if ( isNotNullP( opt))\n        {\n            OptType tp = opt->type();\n            opt->setDefined(); // option is defined now\n            switch( tp)\n            {\n                case OPT_BOOL:\n                    /* For bool options we expect argument only if its default value is 'true' */\n                    if ( opt->defBoolVal())\n                    {\n                        i++; // advance in argument array\n                        QString val( argv[ i]);\n                        opt->setBoolVal( val.toInt());\n                    } else /* However most bool options have default value of 'false' */\n                    {\n                        opt->setBoolVal( true);\n                    }\n                    break;\n                case OPT_INT:\n                {\n                    i++; // advance in argument array\n                    QString val( argv[ i]);\n                    opt->setIntVal( val.toInt());\n                    break;\n                }\n                case OPT_FLOAT:\n                {\n                    i++; // advance in argument array\n                    QString val( argv[ i]);\n                    opt->setFloatVal( val.toFloat());\n                    break;\n                }\n                case OPT_STRING:\n                {\n                    i++; // advance in argument array\n                    QString val( argv[ i]);\n                    opt->setStringVal( val);\n                    break;\n                }\n                default:\n                    break;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "showgraph/Utils/conf.h",
    "content": "/**\n * @file: conf.h\n * Implementation of options configuration of ShowGraph\n * @defgroup Opts Options\n * @brief Classes for configuring and parsing command-line options\n * @ingroup Utils\n */\n/*\n * Utils library in Showgraph tool\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#ifndef CONF_H\n#define CONF_H\n\n#include <QString>\n#include <QHash>\n\n/**\n * Command line option type\n * @ingroup Opts\n */\nenum OptType\n{\n    /** Boolean */\n    OPT_BOOL,\n    /** Integer */\n    OPT_INT,\n    /** Float */\n    OPT_FLOAT,\n    /** String */\n    OPT_STRING,\n    /** Number of types */\n    OPT_TYPES_NUM\n};\n\n/**\n * Union type for option's values\n * @ingroup Opts\n */\nunion OptValues\n{\n    /** Value for boolean option */\n    bool bool_val;\n    /** Value for integer option */\n    int int_val;\n    /** Value for floating point option */\n    qreal float_val;\n}; \n\n/**\n * Command line option descrition\n * @ingroup Opts\n */\nclass Option\n{\n    /** Whether user has set value of this option */\n    bool defined;\n\n    /** Type */\n    OptType _type;\n\n    /** Option default values */\n    OptValues def_values;\n\n    /** Option user's values */\n    OptValues values;\n\n    QString string_val;\n    \n    /** Short name */\n    QString short_name;\n    \n    /** Long name */\n    QString long_name;\n\n    /** Description */\n    QString descr;\npublic:\n    /** Constructor without default val */\n    Option( OptType _t, QString sname, QString lname, QString d):\n        defined( false),_type( _t), short_name( sname), long_name( lname), descr( d)\n    {\n        switch ( _t)\n        {   \n            case OPT_BOOL:\n                def_values.bool_val = false;\n                break;\n            case OPT_INT:\n                def_values.int_val = 0;\n                break;\n            case OPT_FLOAT:\n                def_values.float_val = 0;\n                break;\n            case OPT_STRING:\n            default:\n                break;\n        }\n        values = def_values;\n    };\n\n    /** Constructor with default bool val */\n    Option( QString sname, QString lname, QString d, bool val):\n        defined( false), _type( OPT_BOOL), short_name( sname), long_name( lname), descr( d)\n    {\n        def_values.bool_val = val;\n        values = def_values;\n    }\n\n    /** Constructor for string option */\n    Option( QString sname, QString lname, QString d):\n        defined( false), _type( OPT_STRING), short_name( sname), long_name( lname), descr( d){};\n\n    /** Check if the option was defined */\n    inline bool isDefined() const\n    {\n        return defined;    \n    }\n    /** Set the option to 'defined' state*/\n    inline void setDefined( bool def = true)\n    {\n        defined = def;\n    }\n    /** Get short name */\n    inline QString shortName() const\n    {\n        return short_name;    \n    }\n    /** Get long name */\n    inline QString longName() const\n    {\n        return long_name;    \n    }\n    /** Get option type */\n    inline OptType type() const\n    {\n        return _type;\n    }\n    /** Get option default val */\n    inline bool defBoolVal() const\n    {\n        assertd( _type == OPT_BOOL);\n        return def_values.bool_val;\n    }\n    /** Set option boolean value */\n    inline void setBoolVal( bool val)\n    {\n        assertd( _type == OPT_BOOL);\n        values.bool_val = val;\n    }\n    /** Set option boolean value */\n    inline void setIntVal( int val)\n    {\n        assertd( _type == OPT_INT);\n        values.int_val = val;\n    }\n    /** Set option boolean value */\n    inline void setFloatVal( qreal val)\n    {\n        assertd( _type == OPT_FLOAT);\n        values.float_val = val;\n    }\n    /** Set option boolean value */\n    inline void setStringVal( QString val)\n    {\n        assertd( _type == OPT_STRING);\n        string_val = val;\n    }\n    /** Get string value of option */\n    inline QString string() const\n    {\n        assertd( _type == OPT_STRING);\n        return string_val;\n    }\n    /** Get int value of option */\n    inline int intVal() const\n    {\n        assertd( _type == OPT_INT);\n        return values.int_val;\n    }\n    /** Get float value of option */\n    inline qreal floatVal() const\n    {\n        assertd( _type == OPT_FLOAT);\n        return values.float_val;\n    }\n    /** Get int value of option */\n    inline int isSet() const\n    {\n        assertd( _type == OPT_BOOL);\n        return values.bool_val;\n    }\n    /** Print option's synopsis and description */\n    void print( QTextStream &stream);\n};\n\n/**\n * @brief Configuration represention\n * @ingroup Opts\n *\n * @par\n * Allows for configuring command line options and reading them from C-string array.\n * Usage example:\n @code\n // simple main routine\n int main( int argc, char **argv)\n {\n     Conf conf;\n\n     // Configuring possible options and their type\n     conf.addOption( new Option( OPT_STRING, \"f\", \"file\", \"input graph description file name\"));\n     conf.addOption( new Option( OPT_STRING, \"o\", \"output\", \"output image file name\"));\n     conf.readArgs( argc, argv);\n\n     //checking options and reading their values\n     if ( conf.longOption(\"file\")->isDefined() \n          && conf.longOption(\"output\")->isDefined())\n     { \n         QString xmlname = conf.longOption(\"file\")->string(); // read value passed with '-file ...'\n         ...\n     } else\n     {\n         conf.printOpts(); // Print options to console\n     }\n }\n @endcode\n */\nclass Conf\n{\n    QString app_name;\n    QHash< QString, Option *> short_opts;\n    QHash< QString, Option *> long_opts;\n\n    QList< QString> unknown_options;\npublic:\n    /** Constructor */\n    Conf();\n    \n    /** Destructor wipes all the options */\n    ~Conf()\n    {\n        foreach( Option *opt, short_opts)\n        {\n            delete opt;\n        }\n    }\n    /** Get number of arguments that were not recognized */\n    inline int unknownOptsNum() const\n    {\n        return unknown_options.count();\n    }\n    /** Add option */\n    inline void addOption( Option *opt)\n    {\n        short_opts[ opt->shortName()] = opt;\n        long_opts[ opt->longName()] = opt;\n    }\n\n    /** Convenience routine: adds option without default val */\n    inline void addOption( OptType _t, QString sname, QString lname, QString d)\n    {\n        Option *opt = new Option( _t, sname, lname, d);\n        addOption( opt);\n    }\n\n    /** Convenience routine: adds option with default bool val */\n    inline void addOption( QString sname, QString lname, QString d, bool val)\n    {\n        Option *opt = new Option( sname, lname, d, val);\n        addOption( opt);\n    }\n    /** Convenience routine: adds string option without default value */\n    inline void addOption( QString sname, QString lname, QString d)\n    {\n        Option *opt = new Option( sname, lname, d);\n        addOption( opt);\n    }\n    \n    /** Print options */\n    void printOpts();\n\n    /** Print value defaults */\n    void printDefaults();\n\n    /**\n     * Parse arguments from C-string\n     * @param argc number of arguments\n     * @param argv pointer to array of C-strings\n     */\n    void readArgs( int argc, char** argv);\n\n    /** Get option based on its name */\n    inline Option* option( QString name)\n    {\n        /* try to look among short options */\n        if ( short_opts.find( name) != short_opts.end())\n        {\n            return short_opts[ name];\n        }\n        /* try to look among long options */\n        if ( long_opts.find( name) != long_opts.end())\n        {\n            return long_opts[ name];\n        }\n        /* if nothing's found return NULL */\n        return NULL;\n    }\n    /** Get option based on its short name */\n    inline Option* shortOption( QString name)\n    {\n        /* try to look among short options */\n        if ( short_opts.find( name) != short_opts.end())\n        {\n            return short_opts[ name];\n        }\n        /* if nothing's found return NULL */\n        return NULL;\n    }\n    /** Get option based on its long name */\n    inline Option* longOption( QString name)\n    {\n        /* try to look among long options */\n        if ( long_opts.find( name) != long_opts.end())\n        {\n            return long_opts[ name];\n        }\n        /* if nothing's found return NULL */\n        return NULL;\n    }\n};\n\n#endif"
  },
  {
    "path": "showgraph/Utils/conf_utest.cpp",
    "content": "/**\n * @file: conf_utest.cpp \n * Implementation of testing of configuration \n */\n/*\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#include \"utils_iface.h\"\n\n/**\n * Test configuration and options parsing\n */\nbool uTestConf()\n{\n    Conf *conf = new Conf();\n    \n    /** Create some example options */\n    conf->addOption( new Option( OPT_STRING, \"o\", \"output\", \"output file name( string option example)\"));\n    conf->addOption( new Option( OPT_BOOL, \"b\", \"boolean\", \"boolean option example\"));\n    conf->addOption( new Option( OPT_INT, \"i\", \"integer\", \"integer option example\"));\n    conf->addOption( new Option( OPT_FLOAT, \"f\", \"float\", \"float option example\"));\n    conf->printOpts(); // Print them to console\n\n    /** Check that created options can be accessed */\n    assertd( isNullP( conf->option( \"file\")));\n    assertd( isNotNullP( conf->option(\"output\")));\n    assertd( isNotNullP( conf->shortOption( \"o\")));\n    assertd( isNullP( conf->shortOption( \"output\")));\n    assertd( isNotNullP( conf->longOption(\"output\")));\n\n    /** Create array of arguments */\n    char *args[ 8];\n    args[ 0] = (char*)\"string\";// treated as app name\n    args[ 1] = (char*)\"--output\";\n    args[ 2] = (char*)\"file\";\n    args[ 3] = (char*)\"-a\";\n    args[ 4] = (char*)\"--b\";\n    args[ 5] = (char*)\"-b\";\n    args[ 6] = (char*)\"-i\";\n    args[ 7] = (char*)\"80\";\n\n    /** Read arguments from array and parse them */\n    conf->readArgs( 8, args);\n\n    /** Check options values */\n    assertd( conf->unknownOptsNum() == 2); // Check number of unknown arguments\n    assertd( !(conf->option( \"output\")->string().compare(\"file\")));\n    Option *int_opt = conf->option( \"integer\");\n    assertd( int_opt->isDefined());\n    assertd( int_opt->intVal()== 80);\n    assertd( conf->option( \"b\")->isSet());\n    \n    delete conf;\n    return true;\n}\n"
  },
  {
    "path": "showgraph/Utils/list.h",
    "content": "/**\n * @file: list.h \n * List-related functionality implementation\n * @defgroup List Two-way linked list\n *\n * Implementation of two-way linked list\n * @ingroup Utils\n */\n/*\n * Utils library in Showgraph tool\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#ifndef LIST_H\n#define LIST_H\n/**\n * @brief Types of direction in lists.\n * @ingroup List  \n *\n * Lists are built from left to right by default.\n * That means if you take next in default direction - it will be element to the right.\n */\nenum ListDir\n{\n    /** Right direction */\n    LIST_DIR_RIGHT = 0,\n    /** Default direction */\n    LIST_DIR_DEFAULT = LIST_DIR_RIGHT,\n    /** Left Direction */\n    LIST_DIR_LEFT = 1,\n    /** Direction reverse to default */\n    LIST_DIR_RDEFAULT = LIST_DIR_LEFT,\n    /** Number of directions */\n    LIST_DIR_NUM = 2\n};\n\n/**\n * Return direction that is reverse to given one\n * @ingroup List\n */\ninline ListDir\nListRDir( ListDir dir)\n{\n    assertd( LIST_DIR_NUM == 2);\n    return ( dir == LIST_DIR_DEFAULT)? LIST_DIR_RDEFAULT: LIST_DIR_DEFAULT; \n}\n\n\n/**\n * @brief Item of two-way connected list of pointers\n * @ingroup List\n *\n * @par\n * ListItem is used for storing pointers to objects in list. Items in list are two-way connected \n * with each other. This allows insertion and deletion of items in constant time.\n */\ntemplate <class Data> class ListItem\n{\n    ListItem<Data> * peer[ LIST_DIR_NUM];\n    Data *data_p;\npublic:\n    \n    /**Get data */\n    inline Data *data() const\n    {\n        return data_p;\n    }\n    /** Set data */\n    inline void setData( Data* d)\n    {\n        data_p = d;\n    }\n    \n    /** Get neighbour */\n    inline ListItem<Data> * GetPeerInDir( ListDir dir) const\n    {\n        return peer[ dir];\n    }\n    \n    /** Set neighbour */\n    inline void SetPeerInDir( ListItem<Data> *p, ListDir dir)\n    {\n        peer[ dir] = p;\n    }\n    /* Default peers gets */\n    /** Return next peer in default direction */\n    inline ListItem<Data> *next() const\n    {\n        return GetPeerInDir( LIST_DIR_DEFAULT);\n    }\n    /** Return prev peer in default direction */\n    inline ListItem<Data>* prev() const\n    {\n        return GetPeerInDir( LIST_DIR_RDEFAULT);\n    }\n    /** Set next peer */\n    inline void SetNext( ListItem<Data> *n)\n    {\n        SetPeerInDir( n, LIST_DIR_DEFAULT);\n    }\n    /** Set previous peer */\n    inline void SetPrev( ListItem<Data> *p)\n    {\n        SetPeerInDir( p, LIST_DIR_RDEFAULT);\n    }\n    \n    /** Attach this item to peeer in give direction */\n    inline void AttachInDir( ListItem<Data>* p, ListDir dir)\n    {\n        ListDir rdir = ListRDir( dir);\n        SetPeerInDir( p, dir);\n        SetPeerInDir( NULL, rdir);\n\n        if ( isNotNullP( p))\n        {\n            ListItem<Data>* rdir_peer = p->GetPeerInDir( rdir);\n            if ( isNotNullP( rdir_peer))\n            {\n                rdir_peer->SetPeerInDir( this, dir);\n            }\n            p->SetPeerInDir( this, rdir);\n            SetPeerInDir( rdir_peer, rdir);\n        }\n    }\n    \n    /** Attach in default direction */\n    inline void Attach( ListItem<Data>* peer)\n    {\n        AttachInDir( peer, LIST_DIR_DEFAULT);\n    }\n\n    /** Detach from neighbours */\n    inline void Detach()\n    {\n        /* Correct links in peers */\n        if ( isNotNullP( peer[ LIST_DIR_DEFAULT]))\n        {\n            peer[ LIST_DIR_DEFAULT]->SetPeerInDir( peer[ LIST_DIR_RDEFAULT], LIST_DIR_RDEFAULT);\n        }\n        if ( isNotNullP( peer[ LIST_DIR_RDEFAULT]))\n        {\n            peer[ LIST_DIR_RDEFAULT]->SetPeerInDir( peer[ LIST_DIR_DEFAULT], LIST_DIR_DEFAULT);\n        }\n        SetPeerInDir( NULL, LIST_DIR_DEFAULT);\n        SetPeerInDir( NULL, LIST_DIR_RDEFAULT);\n    }\n\n    /** Default constructor */\n    ListItem()\n    {\n        setData( NULL);\n        SetPeerInDir( NULL, LIST_DIR_DEFAULT);\n        SetPeerInDir( NULL, LIST_DIR_RDEFAULT);\n    };\n\n    /** Constructor from data pointer */\n    ListItem( Data* d)\n    {\n        setData( d);\n        SetPeerInDir( NULL, LIST_DIR_DEFAULT);\n        SetPeerInDir( NULL, LIST_DIR_RDEFAULT);\n    };\n\n    /** Insert element before the given one */\n    ListItem( ListItem<Data> *peer, Data* d)\n    {\n        setData( d);\n        SetPeerInDir( NULL, LIST_DIR_DEFAULT);\n        SetPeerInDir( NULL, LIST_DIR_RDEFAULT);\n        AttachInDir( peer, LIST_DIR_DEFAULT);\n    }\n\n    /** Insert element in given direction */\n    ListItem( ListItem<Data> *peer, ListDir dir, Data *d)\n    {\n        setData( d);\n        SetPeerInDir( NULL, LIST_DIR_DEFAULT);\n        SetPeerInDir( NULL, LIST_DIR_RDEFAULT);\n        AttachInDir( peer, dir);\n    }\n\n    /** Destructor */\n    ~ListItem()\n    {\n        Detach();\n    }\n};\n\n/** List number */\ntypedef quint16 ListId;\n\n/**\n * @brief List item that can be part of multiple lists. \n * @param dim Number of lists\n * @ingroup List\n *\n * The MListItem class provides means for making an object an item of multiple lists. The\n * implementation is intrusive: you have to inherit MListItem in your object to make it\n * a multiple list item. It is more convenient to inherit MListIface though, which in\n * turn inherits MListItem and provides list-related routines in terms of client type. E.g.\n * if you implement some MyObj class this way your MyObj::next() routine will return MyObj * instead of \n * MListItem<num_of_lists> *.\n */\ntemplate <unsigned int dim> class MListItem\n{\n    MListItem< dim> * peer[ dim][ LIST_DIR_NUM];\npublic:\n    \n    /** Get neighbour */\n    inline MListItem< dim> * peerInDir( ListId list, ListDir dir) const\n    {\n        ASSERTD( list < dim);\n        return peer[ list][ dir];\n    }\n    \n    /** Set neighbour */\n    inline void setPeerInDir( ListId list, MListItem< dim> *p, ListDir dir)\n    {\n        ASSERTD( list < dim);\n        peer[list][ dir] = p;\n    }\n    /** Set all pointeers to peeers to zero */\n    inline void zeroLinks()\n    {\n        for ( ListId list = 0; list < dim; list++)\n        {\n            setPeerInDir( list, NULL, LIST_DIR_DEFAULT);\n            setPeerInDir( list, NULL, LIST_DIR_RDEFAULT);\n        }\n    }\n    /* Default peers gets */\n    /** Return next peer in default direction */\n    inline MListItem< dim> *next( ListId list) const\n    {\n        return peerInDir( list, LIST_DIR_DEFAULT);\n    }\n    /** Return prev peer in default direction */\n    inline MListItem< dim>* prev( ListId list) const\n    {\n        return peerInDir( list, LIST_DIR_RDEFAULT);\n    }\n    /** Set next peer */\n    inline void setNext( ListId list, MListItem< dim> *n)\n    {\n        setPeerInDir( list, n, LIST_DIR_DEFAULT);\n    }\n    /** Set previous peer */\n    inline void setPrev( ListId list, MListItem< dim> *p)\n    {\n        setPeerInDir( list, p, LIST_DIR_RDEFAULT);\n    }\n    \n    /** Attach this item to peeer in give direction */\n    inline void attachInDir( ListId list, MListItem< dim>* p, ListDir dir)\n    {\n        ListDir rdir = ListRDir( dir);\n        setPeerInDir( list, p, dir);\n        setPeerInDir( list, NULL, rdir);\n\n        if ( isNotNullP( p))\n        {\n            MListItem< dim>* rdir_peer = p->peerInDir( list, rdir);\n            if ( isNotNullP( rdir_peer))\n            {\n                rdir_peer->setPeerInDir( list, this, dir);\n            }\n            p->setPeerInDir( list, this, rdir);\n            setPeerInDir( list, rdir_peer, rdir);\n        }\n    }\n    \n    /** Attach in default direction */\n    inline void attach( ListId list, MListItem< dim>* peer)\n    {\n        attachInDir( list, peer, LIST_DIR_DEFAULT);\n    }\n\n    /** Detach from neighbours */\n    inline void detach( ListId list)\n    {\n        ASSERTD( list < dim);\n        /* Correct links in peers */\n        if ( isNotNullP( peer[ list][ LIST_DIR_DEFAULT]))\n        {\n            peer[ list][ LIST_DIR_DEFAULT]->setPeerInDir( list, peer[ list][ LIST_DIR_RDEFAULT], LIST_DIR_RDEFAULT);\n        }\n        if ( isNotNullP( peer[ list][ LIST_DIR_RDEFAULT]))\n        {\n            peer[ list][ LIST_DIR_RDEFAULT]->setPeerInDir( list, peer[ list][ LIST_DIR_DEFAULT], LIST_DIR_DEFAULT);\n        }\n        setPeerInDir( list, NULL, LIST_DIR_DEFAULT);\n        setPeerInDir( list, NULL, LIST_DIR_RDEFAULT);\n    }\n    /** Detach from all lists */\n    inline void detachAll()\n    {\n        for ( ListId list = 0; list < dim; list++)\n        {\n            detach( list);\n        }    \n    }\n\n    /** Default constructor */\n    MListItem()\n    {\n        zeroLinks();\n    };\n\n    /** Insert element before the given one */\n    MListItem( ListId list, MListItem< dim> *peer)\n    {\n        zeroLinks();\n        attachInDir( list, peer, LIST_DIR_DEFAULT);\n    }\n\n    /** Insert element in given direction */\n    MListItem( ListId list, MListItem< dim> *peer, ListDir dir)\n    {\n        zeroLinks();\n        attachInDir( list, peer, dir);\n    }\n\n    /** Destructor */\n    virtual ~MListItem()\n    {\n        detachAll();\n    }\n};\n\n/**\n * @brief Interface for Multi-list\n * @ingroup List\n * @param Item The type of list item\n * @param ListBase MListItem parameterized by list number or some derived class\n * @param dim Number of lists\n * \n * Allows for incorporating a list item functionality into object via inheritance. \n * Example:\n * @code\n // Define the lists we use\n enum ListTypes { LIST_ONE, LIST_TWO, LISTS_NUM };\n // Derive class of linked objects\n class MyObj: public MListIface< MyObj, MListItem<LISTS_NUM>, LISTS_NUM>\n { ... };\n // Usage\n void foo()\n {\n     MyObj obj1();\n     MyObj obj2();\n     MyObj obj3();\n     obj1.attach( LIST_ONE, &obj2); // \"LIST_ONE\" is now obj1--obj2\n     obj2.attach( LIST_ONE, &obj3); // \"LIST_ONE\" is now obj1--obj2--obj3\n     obj1.attach( LIST_TWO, &obj3); // \"LIST_TWO\" is now obj1--obj3\n }\n @endcode\n */\ntemplate < class Item, class ListBase, unsigned int dim> class MListIface: public ListBase\n{\npublic:\n    /** Return next item in default direction */\n    inline Item *next( ListId list) const\n    {\n        return static_cast< Item *>( MListItem< dim>::next( list));\n    }\n    /** Return prev item in default direction */\n    inline Item* prev( ListId list) const\n    {\n        return static_cast< Item *>( MListItem< dim>::prev( list));\n    }\n    /** Default constructor */\n    inline MListIface():\n        ListBase(){};\n\n    /** Insert element before the given one */\n    inline MListIface( ListId list, Item *peer):\n        ListBase( list, peer){};\n\n    /** Insert element in given direction */\n    inline MListIface( ListId list, Item *peer, ListDir dir):\n        ListBase( list, peer, dir){};\n};\n\n/**\n * @brief Specialization of the MListItem template for important case when the object \n * is intended to be item in only one list.\n * @ingroup List\n */\ntemplate<> class MListItem<1>\n{\n    MListItem< 1> * peer[ LIST_DIR_NUM];\n    \n    /** Get neighbour */\n    inline MListItem< 1> * peerInDir( ListDir dir) const\n    {\n        return peer[ dir];\n    }\n    \n    /** Set neighbour */\n    inline void setPeerInDir( MListItem< 1> *p, ListDir dir)\n    {\n        peer[ dir] = p;\n    }\n\npublic:\n    /** Set all pointeers to peeers to zero */\n    inline void zeroLinks()\n    {\n        setPeerInDir( NULL, LIST_DIR_DEFAULT);\n        setPeerInDir( NULL, LIST_DIR_RDEFAULT);\n    }    \n    /* Default peers gets */\n    /** Return next peer in default direction */\n    inline MListItem< 1> *next() const\n    {\n        return peerInDir( LIST_DIR_DEFAULT);\n    }\n    /** Return prev peer in default direction */\n    inline MListItem< 1>* prev() const\n    {\n        return peerInDir( LIST_DIR_RDEFAULT);\n    }\n    /** Set next peer */\n    inline void setNext( MListItem< 1> *n)\n    {\n        setPeerInDir( n, LIST_DIR_DEFAULT);\n    }\n    /** Set previous peer */\n    inline void setPrev( MListItem< 1> *p)\n    {\n        setPeerInDir( p, LIST_DIR_RDEFAULT);\n    }\n    \n    /** Attach this item to peeer in give direction */\n    inline void attachInDir( MListItem< 1>* p, ListDir dir)\n    {\n        ListDir rdir = ListRDir( dir);\n        setPeerInDir( p, dir);\n        setPeerInDir( NULL, rdir);\n\n        if ( isNotNullP( p))\n        {\n            MListItem< 1>* rdir_peer = p->peerInDir( rdir);\n            if ( isNotNullP( rdir_peer))\n            {\n                rdir_peer->setPeerInDir( this, dir);\n            }\n            p->setPeerInDir( this, rdir);\n            setPeerInDir( rdir_peer, rdir);\n        }\n    }\n    \n    /** Attach in default direction */\n    inline void attach( MListItem< 1>* peer)\n    {\n        attachInDir( peer, LIST_DIR_DEFAULT);\n    }\n\n    /** Detach from neighbours */\n    inline void detach()\n    {\n        /* Correct links in peers */\n        if ( isNotNullP( peer[ LIST_DIR_DEFAULT]))\n        {\n            peer[ LIST_DIR_DEFAULT]->setPeerInDir( peer[ LIST_DIR_RDEFAULT], LIST_DIR_RDEFAULT);\n        }\n        if ( isNotNullP( peer[ LIST_DIR_RDEFAULT]))\n        {\n            peer[ LIST_DIR_RDEFAULT]->setPeerInDir( peer[ LIST_DIR_DEFAULT], LIST_DIR_DEFAULT);\n        }\n        setPeerInDir( NULL, LIST_DIR_DEFAULT);\n        setPeerInDir( NULL, LIST_DIR_RDEFAULT);\n    }\n\n    /** Default constructor */\n    MListItem()\n    {\n        zeroLinks();\n    };\n\n    /** Insert element before the given one */\n    MListItem( MListItem< 1> *peer)\n    {\n        zeroLinks();\n        attachInDir( peer, LIST_DIR_DEFAULT);\n    }\n\n    /** Insert element in given direction */\n    MListItem( MListItem< 1> *peer, ListDir dir)\n    {\n        zeroLinks();\n        attachInDir( peer, dir);\n    }\n\n    /** Destructor */\n    virtual ~MListItem()\n    {\n        detach();\n    }\n};\n\n/** Short name for simple list item */\ntypedef MListItem< 1> SListItem;\n\n/**\n * @brief Specialization of MListIface for case of one list\n * @ingroup List\n * @param Item The type of list item\n * @param ListBase MListItem or some derived class\n * \n * Allows for incorporating a single-list item functionality into object via inheritance. \n */\ntemplate< class Item, class ListBase> class MListIface< Item, ListBase, 1>: public ListBase\n{\npublic:\n    /** Return next item in default direction */\n    inline Item *next() const\n    {\n        return static_cast< Item *>( SListItem::next());\n    }\n    /** Return prev item in default direction */\n    inline Item* prev() const\n    {\n        return static_cast< Item *>( SListItem::prev());\n    }\n    /** Insert element before the given one */\n    inline MListIface(): ListBase(){};\n    /** Insert element before the given one */\n    inline MListIface( Item *peer):\n        ListBase( peer){};\n\n    /** Insert element in given direction */\n    inline MListIface( Item *peer, ListDir dir):\n        ListBase( peer, dir){};\n};\n\n/**\n * @brief Interface for simple list item\n * @ingroup List\n * @param Item The type of list item\n * @param ListBase SListItem (default) or some derived class.\n * \n * Allows for incorporating a list item functionality into object via inheritance. \n * Example:\n * @code\n // Derive class of linked objects\n class MyObj: public SListIface< MyObj>\n { ... };\n // Usage\n void foo()\n {\n     MyObj obj1();\n     MyObj obj2();\n     MyObj obj3();\n     obj1.attach( &obj2); // list is now obj1--obj2\n     obj2.attach( &obj3); // list is now obj1--obj2--obj3\n }\n @endcode\n */\ntemplate< class Item, class ListBase=SListItem> class SListIface: public ListBase\n{\npublic:\n    /** Return next item in default direction */\n    inline Item *next() const\n    {\n        return static_cast< Item *>( SListItem::next());\n    }\n    /** Return prev item in default direction */\n    inline Item* prev() const\n    {\n        return static_cast< Item *>( SListItem::prev());\n    }\n    /** Insert element before the given one */\n    inline SListIface():\n        ListBase(){};\n\n    /** Insert element before the given one */\n    inline SListIface( Item *peer):\n        ListBase( peer){};\n\n    /** Insert element in given direction */\n    inline SListIface( Item *peer, ListDir dir):\n        SListItem( peer, dir){};\n};\n\n#endif\n"
  },
  {
    "path": "showgraph/Utils/list_utest.cpp",
    "content": "/**\n * @file: conf_utest.cpp \n * Implementation of testing for lists \n */\n/*\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#include \"utils_iface.h\"\n\n/** Define the lists we use */\nenum ListTypes\n{\n    LIST_ONE,\n    LIST_TWO,\n    LISTS_NUM\n};\n/** Derive class of linked objects */\nclass classA: public MListIface< classA, MListItem<LISTS_NUM>, LISTS_NUM>\n{\n\n};\n/** Derive class from A */\nclass B: public MListIface< B, classA, LISTS_NUM>\n{\n\n};\n\n/** MList testing */\nstatic bool uTestMList()\n{\n    B *obj1 = new B();\n    B *obj2 = new B();\n    B *obj3 = new B();\n    obj1->attach( LIST_ONE, obj2);\n    obj1->attach( LIST_TWO, obj3);\n    ASSERT( areEqP( obj1->next( LIST_ONE), obj2));\n    ASSERT( areEqP( obj1->next( LIST_TWO), obj3));\n    ASSERT( isNullP( obj1->prev( LIST_ONE)));\n    ASSERT( isNullP( obj1->prev( LIST_TWO)));\n    ASSERT( areEqP( obj2->prev( LIST_ONE), obj1));\n    ASSERT( areEqP( obj3->prev( LIST_TWO), obj1));\n    ASSERT( isNullP( obj3->prev( LIST_ONE)));\n    ASSERT( isNullP( obj2->prev( LIST_TWO)));\n    ASSERT( isNullP( obj2->next( LIST_ONE)));\n    ASSERT( isNullP( obj3->next( LIST_TWO)));\n    obj2->detachAll();\n    delete obj2;\n    delete obj1;\n    delete obj3;\n    return true;\n}\n\n/**\n * Test list classes operation\n */\nbool uTestList()\n{\n    if ( !uTestMList())\n        return false;\n\n    return true;\n}\n"
  },
  {
    "path": "showgraph/Utils/mem.h",
    "content": "/**\n * @file: mem.h \n * Some experiments with memory manager\n * @defgroup Mem Memory Manager\n *\n * Implementation of memory manager, In Process of Design&Implementation.\n *\n * Memory manager should solve the following memory-related problems\n * - Dangling pointers. Solution: reference counting via smart pointers\n * - Memory leaks. Solution: Various checks in pools and in pointers\n * - Fragmentation. Solution: Fixed-sized chunks used in pools\n * - Poor locality. Solution: not clear yet :(\n * @ingroup Utils\n */\n/*\n * Utils library in Showgraph tool\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#pragma once\n\n#ifndef MEM_H\n#define MEM_H\n\n#undef CHECK_CHUNKS\n#undef CHECK_ENTRY\n#undef USE_REF_COUNTERS\n#undef USE_MEM_EVENTS\n#undef CHECK_DELETE\n\n#ifdef _DEBUG\n#  define CHECK_CHUNKS\n#  define CHECK_ENTRY\n#  define USE_REF_COUNTERS\n#  define USE_MEM_EVENTS\n#  define CHECK_DELETE\n#endif\n\n#include <QtGlobal>\n\n/**\n * Debug assert in memory manager\n * @ingroup Mem\n */\n#if !defined(MEM_ASSERTD)\n#    define MEM_ASSERTD(cond, what) ASSERT_XD(cond, \"Memory manager\", what)\n#endif\n\n/**\n * Namespace for memory-related routines\n * @ingroup Mem\n */\nnamespace Mem\n{\n    /* Class pool predeclaration */\n    class Pool;\n}\n\n\n\n/**\n * Low level functinality for Mem package \n * @defgroup MemImpl Memory Manager Low Level\n * @ingroup Mem\n */\nnamespace MemImpl\n{\n    /* Predeclaration on MemInfo */\n    class MemInfo;\n    /* Predeclaration of mem entry class */\n    template < class Data> class Entry;\n    /* Predeclaration of chunk class */\n    template < class Data> class Chunk;\n    /**\n     * Position in chunk type\n     * @ingroup MemImpl\n     */\n    typedef quint8 ChunkPos;\n    /** \n     * Max number of entries in chunk\n     * @ingroup MemImpl\n     */\n#ifndef MEM_SMALL_CHUNKS\n    const quint8 MAX_CHUNK_ENTRIES_NUM = ( quint8)( -1);\n#else\n    const quint8 MAX_CHUNK_ENTRIES_NUM = 2;\n#endif\n    /**\n     * 'NULL' equivalent for ChunkPos\n     * @ingroup MemImpl\n     */\n    const ChunkPos UNDEF_POS = MAX_CHUNK_ENTRIES_NUM; \n};\n\nnamespace Mem\n{\n    /**\n     * Singleton for memory manager\n     * @ingroup MemImpl\n     */\n    typedef Single< MemImpl::MemInfo> MemMgr;\n};\n\n#include <stdlib.h>\n#include \"mem_mgr.h\"        /** Memory manager */\n#include \"mem_ref.h\"        /** Memory reference */\n#include \"mem_obj.h\"        /** Memory object base class */\n#include \"mem_chunk.h\"      /** Memory chunk class */\n#include \"mem_pool.h\"       /** Memory pool */\n#include \"mem_entry.h\"      /** Memory entry class */\n#include \"mem_fixed_pool.h\" /** Memory pool */\n\n#endif /* MEM_H */\n"
  },
  {
    "path": "showgraph/Utils/mem_chunk.h",
    "content": "/**\n * @file: mem_chunk.h \n * Implementation of memory chunk\n */\n/*\n * Utils/Mem library in Showgraph tool\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#pragma once\n\n#ifndef MEM_H\n#    error\n#endif\n\n#ifndef MEM_CHUNK_H\n#define MEM_CHUNK_H\n\nnamespace MemImpl\n{\n    /**\n     * Chunk lists identificators\n     * @ingroup MemImpl\n     */\n    enum ChunkListType\n    {\n        CHUNK_LIST_ALL,\n        CHUNK_LIST_FREE,\n        CHUNK_LISTS_NUM\n    };\n\n    /**\n     * Memory chunk representation\n     * @ingroup MemImpl\n     */\n    template<class Data> class Chunk: \n        public MListIface< Chunk< Data>, // List client data\n                           MListItem< CHUNK_LISTS_NUM>, // base class: pure multi-list item\n                           CHUNK_LISTS_NUM > // Lists number\n    {\n        void *dummy_ptr; //for alignment\n        /** position of first free entry */\n        ChunkPos free_entry;\n        /** busy entries num */\n        ChunkPos busy;\n        /** Get chunk for given number */\n        inline Entry<Data> *entry( ChunkPos pos);\n\n    public:\n#ifdef CHECK_CHUNKS\n        void *pool;       \n        /** Get chunk's first busy entry */\n        inline Entry<Data> *firstBusyEntry();\n#endif\n        /** Constructor */\n        inline Chunk();\n        /** Check if this chunk has free entries */\n        inline bool isFree() const;\n        /** Check if this chunk is empty */\n        inline bool isEmpty() const;\n        /** Initialization of chunk */\n        inline void initialize();\n        /** Allocate on entry */\n        inline Data *allocateEntry();\n        /** Deallocate one entry */\n        inline void deallocateEntry( Entry<Data> *e);\n        /** For some reason GCC asks for it :( */\n        inline void operator delete( void* mem);\n        /** Placement new */\n        inline void *operator new ( size_t size, void* mem);\n        /**\n         * Operator 'delete' corresponding to placement new\n         * WARNING: Compiler won't call this for deletion. \n         *          It is needed for freeing memory in case of exceptions in constructor\n         */\n        inline void operator delete( void* ptr, void* mem);\n    };\n    \n    /** Constructor */\n    template <class Data> \n    Chunk< Data>::Chunk()\n    :dummy_ptr(NULL)\n    {\n        Entry<Data> *e = NULL;\n        \n        for ( int i = 0; i < MAX_CHUNK_ENTRIES_NUM; i++)\n        {\n            e = ( Entry< Data> *)( (quint8 *) this \n                                       + sizeof( Chunk< Data>) \n                                       + sizeof( Entry< Data>) * i);\n            /** Initialization of every entry */\n            e->setPos( i);\n            e->setNextFree( i + 1);\n#ifdef CHECK_ENTRY\n            e->is_busy = false;\n#endif\n#ifdef USE_MEM_EVENTS        \n            e->alloc_event = 0;\n            e->dealloc_event = 0;\n#endif \n        }\n        MEM_ASSERTD( e->nextFree() == UNDEF_POS, \"Chunk size constant and undefined value do not match\");\n        free_entry = 0;\n        busy = 0;\n    }\n    /** Placement new */\n    template <class Data> \n    void*\n    Chunk< Data>::operator new ( size_t size, void* mem)\n    {\n        return mem;\n    }\n    \n    /** For some reason GCC asks for it :( */\n    template <class Data>\n    void\n    Chunk< Data>::operator delete( void* mem)\n    {\n\n    }\n    /**\n     * Operator 'delete' corresponding to placement new\n     * WARNING: Compiler won't call this for deletion. \n     *          It is needed for freeing memory in case of exceptions in constructor\n     */\n    template <class Data> \n    void\n    Chunk< Data>::operator delete( void* ptr, void* mem)\n    {\n    \n    }\n  \n    /** Get entry by number */\n    template<class Data> \n    Entry< Data>*\n    Chunk< Data>::entry( ChunkPos pos)\n    {\n        MEM_ASSERTD( pos != UNDEF_POS, \"Requested entry with undefined number\");\n        return ( Entry< Data> *)( (quint8 *) this \n                                  + sizeof( Chunk< Data>) \n                                  + sizeof( Entry< Data>) * pos);\n    }\n   \n#ifdef CHECK_CHUNKS        \n    /** Get chunk's first busy entry */\n    template<class Data> \n    Entry< Data>*\n    Chunk< Data>::firstBusyEntry()\n    {\n        Entry<Data> *e = NULL;\n        \n        for ( int i = 0; i < MAX_CHUNK_ENTRIES_NUM; i++)\n        {\n            e = ( Entry< Data> *)( (quint8 *) this \n                                       + sizeof( Chunk< Data>) \n                                       + sizeof( Entry< Data>) * i);\n            if ( e->is_busy)\n                return e;\n        }\n        return NULL;\n    }\n#endif\n\n    /** Check if this chunk has free entries */\n    template<class Data> \n    bool \n    Chunk< Data>::isFree() const\n    {\n        return free_entry != UNDEF_POS;\n    }\n    /** Check if this chunk is empty */\n    template<class Data> \n    bool \n    Chunk< Data>::isEmpty() const\n    {\n        return busy == 0;\n    }      \n    /** Allocate one entry */\n    template<class Data> \n    Data*\n    Chunk< Data>::allocateEntry()\n    {\n        MEM_ASSERTD( this->isFree(), \"Trying to allocated entry in a full chunk\");\n        \n        Entry< Data> *e = entry( free_entry);\n#ifdef CHECK_ENTRY\n        e->is_busy = true;\n#endif\n#ifdef USE_MEM_EVENTS        \n        e->alloc_event = Mem::MemMgr::instance()->allocEvent();\n#endif        \n        Data *res = static_cast<Data *>( e);\n        free_entry = e->nextFree();\n        busy++;\n        return res;\n    }\n    /** Deallocate one entry */\n    template<class Data> \n    void\n    Chunk< Data>::deallocateEntry( Entry<Data> *e)\n    {\n        MEM_ASSERTD( busy > 0, \"Trying to deallocate entry of an empty chunk\");\n#ifdef CHECK_ENTRY\n        MEM_ASSERTD( e->is_busy, \n                     \"Trying to deallocate entry that is free. Check deallocation event ID\");\n        e->is_busy = false;\n#endif\n#ifdef USE_MEM_EVENTS        \n        e->dealloc_event = Mem::MemMgr::instance()->deallocEvent();\n#endif \n        e->setNextFree( free_entry);\n        free_entry = e->pos();\n        busy--;\n    }\n}; /* namespace MemImpl */\n#endif /* MEM_CHUNK_H */\n"
  },
  {
    "path": "showgraph/Utils/mem_entry.h",
    "content": "/**\n * @file: mem_entry.h \n * Implementation of memory entry\n */\n/*\n * Utils/Mem library in Showgraph tool\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#pragma once\n\n#ifndef MEM_H\n#    error\n#endif\n\n#ifndef MEM_ENTRY_H\n#define MEM_ENTRY_H\n\nnamespace MemImpl\n{\n    /**\n     * Entry in memory that holds user data\n     *\n     * @ingroup MemImpl\n     */\n    template < class Data> class Entry: private Data\n    {\n    public:\n        /** Get position */\n        inline ChunkPos pos() const;\n        /** Get position of next free chunk */\n        inline ChunkPos nextFree() const;\n        /** Set position */\n        inline void setPos( ChunkPos pos);\n        /** Set position of next free chunk */\n        inline void setNextFree( ChunkPos next);\n    private:\n        /** Classes fixed pool and chunk should have access to data and constructors */\n        friend class Chunk<Data>;\n\n        /** Own position of this entry in chunk */\n        ChunkPos my_pos;\n        /** Position of next free entry in chunk */\n        ChunkPos next_free_pos;\n\n#ifdef CHECK_ENTRY        \n        /** Debug info: entry status */\n        bool is_busy;\n#endif\n\n#ifdef USE_MEM_EVENTS        \n        /** Debug info: alloc event */\n        MemEventId alloc_event;\n        /** Debug info: dealloc event */\n        MemEventId dealloc_event;\n#endif  \n\n        /** Private constructor to prevent direct creation of such objects */\n        Entry();\n        /** Private destructor */\n        ~Entry();\n    };\n\n    /**\n     * Private constructor to prevent direct creation of such objects\n     */\n    template< class Data>\n    Entry< Data>::Entry()\n    {\n        assertd( 0);\n    }\n    /**\n     * Private destructor\n     */\n    template< class Data>\n    Entry< Data>::~Entry()\n    {\n        assertd( 0);\n    }\n    /** Get position */\n    template< class Data>\n    ChunkPos \n    Entry< Data>::pos() const\n    {\n        return my_pos;\n    }\n    /** Get position of next free chunk */\n    template< class Data>\n    ChunkPos\n    Entry< Data>::nextFree() const\n    {\n        return next_free_pos;\n    }\n    /** Set position */\n    template< class Data>\n    void\n    Entry< Data>::setPos( ChunkPos pos)\n    {\n        my_pos = pos;\n    }\n    /** Set position of next free chunk */\n    template< class Data>\n    void\n    Entry< Data>::setNextFree( ChunkPos next)\n    {\n        next_free_pos = next;\n    }\n};\n\n#endif /* MEM_ENTRY_H */\n"
  },
  {
    "path": "showgraph/Utils/mem_fixed_pool.h",
    "content": "/**\n * @file: mem_fixed_pool.h \n * Implementation of memory pool with fixed entry size\n */\n/*\n * Utils library in Showgraph tool\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#pragma once\n\n#ifndef MEM_H\n#    error\n#endif\n\n#ifndef MEM_FIXED_POOL_H\n#define MEM_FIXED_POOL_H\n\n\nnamespace Mem\n{\n    /**\n     * @brief Memory pool with fixed-size entries.\n     * @ingroup Mem\n     * @param Data Type of objects stored in pool.\n     *\n     * @details  \n     * A <em>Fixed pool</em> is a pool that creates entries of the same size which\n     * is defined by template parameter. It uses the knowledge of the entry size for\n     * optimization of allocation/deallocation process and for simplifying the internal\n     * bookkeeping. This simplification significantly speeds up pool's operation.\n     *\n     * Internal implementation of a fixed pool is based on allocating memory in so-called\n     * <em>chunks</em>. A <em>chunk</em> is a continuous block of memory which holds\n     * a number of entries and is allocated with one system call. The allocated memory\n     * is managed by the pool and released to system when pool doesn't need it. This\n     * policy effectively avoids calling malloc() and free() routines for every entry\n     * and prevents fragmentation. FixedPool internal implementattion trades off compactness\n     * for quickness and uses additional info for every entry. Every entry keeps:\n     *  - Its own number. To calculate pointer to chunk info from pointer to entry.\n     *  - Number of next free entry in this chunk. For speeding up the allocation.\n     *  - Debug info like allocation/deallocation event number or ``free'' flag for checking \n     *    double deallocation.\n     *\n     * The chunks are organized in doubly-liked list to have constant time for chunk \n     * creation and destruction. Free chunks are also linked in list to speed up the \n     * allocation. On allocation request pool simply gets its first free chunk and \n     * returns pointer to its first entry. On deallocation, pointer to chunk is calculated\n     * from pointer to entry using its own number and entry is simply connected to the\n     * head of free entry list in the chunk. The chunk itself is enrolled in the list of\n     * free chunks if it isn't already there. If the chunk is completely empty after \n     * this deallocation it may be deleted if there are other free chunks present. Both\n     * allocation and deallocation demand constant time unless we have to allocate a new\n     * chunk or free existing empty one.\n     *\n     * To decrease memory usage overhead the numbers in entries are effectively one byte long.\n     * Thats two byte per entry overhead if we don't align entries on 8, 16, 32 or 64 bytes.\n     * Thus memory overhead is significant if we store small objects in such a pool but for \n     * a list unit this overhead is about 25% and for graph's node or edge it is 6.2%.\n     *\n     * When project is built in debug mode the pools keep track of every entry's allocation\n     * and deallocation ID. This allows programmer to put in a breakpoint if a memory leak\n     * or double-delete occurred. The conditional breakpoint should be placed in\n     * MemInfo::allocReg( n) or MemInfo::deallocReg( n) where 'n' should be the ID that\n     * can be obtained from suspicious entry.\n     */\n    template < class Data> \n    class FixedPool: public Pool\n    {\n        static const size_t CHUNK_SIZE = sizeof( MemImpl::Chunk< Data>) \n            + sizeof( MemImpl::Entry< Data>) * MemImpl::MAX_CHUNK_ENTRIES_NUM;\n    public:\n        /** Create fixed pool with default parameters */\n        FixedPool();\n        \n        /** Destroy the pool */\n        ~FixedPool();\n                \n        /** Allocate new memory block */\n        void* allocate( size_t size);\n        /** Free memory block */\n        void deallocate( void *ptr);\n        /** Functionality of 'operator delete' for pooled objects */\n        void destroy( void *ptr); \n#ifdef _DEBUG\n        /** Get first busy chunk */\n        inline MemImpl::Chunk< Data> *firstBusyChunk();\n#endif\n    private:        \n        /** Number of used entries */\n        EntryNum entry_count;\n        /** First chunk */\n        MemImpl::Chunk< Data> *first_chunk;\n        /** First free chunk */\n        MemImpl::Chunk< Data> *free_chunk;\n\n        /* Internal routines */\n        \n        /** Allocate one chunk */\n        inline MemImpl::Chunk< Data> *allocateChunk();\n        /** Deallocate one chunk */\n        inline void deallocateChunk( MemImpl::Chunk< Data> *chunk);\n        /** Get pointer to chunk from pointer to entry */\n        inline MemImpl::Chunk< Data> *entryChunk( MemImpl::Entry< Data> *e);\n    };\n\n    /** Create fixed pool with default parameters */\n    template < class Data> \n    FixedPool<Data>::FixedPool(): \n        entry_count( 0),\n        first_chunk( NULL),\n        free_chunk( NULL)\n    {\n\n    }\n\n    /** Destroy the pool */\n    template < class Data> \n    FixedPool< Data>::~FixedPool()\n    {\n        /** Deallocated cached chunks */\n        while ( isNotNullP( first_chunk))\n        {\n            deallocateChunk( first_chunk);\n        }\n        /** Check that all entries are freed */\n        MEM_ASSERTD( entry_count == 0, \"Trying to delete non-empty pool\");\n    }\n#ifdef _DEBUG\n    /** Get first busy chunk */\n    template < class Data> \n    MemImpl::Chunk< Data> *\n    FixedPool< Data>::firstBusyChunk()\n    {\n        MemImpl::Chunk< Data> *chunk = first_chunk;\n        while ( isNotNullP( chunk))\n        {\n            if ( !chunk->isEmpty())\n                return chunk;\n            chunk = chunk->next( MemImpl::CHUNK_LIST_ALL);\n        }\n        return NULL;\n    }\n#endif\n    /** Allocate one chunk */\n    template < class Data> \n    MemImpl::Chunk< Data> *\n    FixedPool< Data>::allocateChunk()\n    {\n        /* We should only allocate chunk if there are no free chunks left */\n        MEM_ASSERTD( isNullP( free_chunk ), \"Tried to deallocate chunk while there is a free chunk\");\n        \n        /* Allocate memory for chunk */\n        void *chunk_mem = \n              ( MemImpl::Chunk< Data> *) new quint8[ CHUNK_SIZE];\n        MemImpl::Chunk< Data> * chunk = new ( chunk_mem) MemImpl::Chunk< Data>();\n\n        /* Add this chunk to pool */\n        chunk->attach( MemImpl::CHUNK_LIST_ALL, first_chunk);\n        chunk->attach( MemImpl::CHUNK_LIST_FREE, free_chunk);\n        first_chunk = chunk;\n        free_chunk = chunk;\n        \n#ifdef CHECK_CHUNKS\n        chunk->pool = ( void *)this;\n#endif\n        return chunk;\n    }\n    \n    /** Deallocate one chunk */\n    template < class Data> \n    void\n    FixedPool<Data>::deallocateChunk( MemImpl::Chunk< Data> *chunk)\n    {\n#ifdef CHECK_CHUNKS\n        if ( !chunk->isEmpty())\n        {\n            MEM_ASSERTD( isNotNullP( chunk->firstBusyEntry()),\n                         \"Can't get first busy entry of non-empty chunk\");\n            MEM_ASSERTD( 0, \"Deallocated chunk is not empty. Check allocation ID of some busy entry\");\n        }\n        MEM_ASSERTD( areEqP( chunk->pool, this), \"Deallocated chunk does not belong to this pool\");\n#endif\n        if ( areEqP( first_chunk, chunk))\n        {\n            first_chunk = chunk->next( MemImpl::CHUNK_LIST_ALL);\n        }\n        chunk->~Chunk();\n        delete[] (quint8 *)chunk;\n    }\n\n    /* Calculate pointer to chunk from pointer to entry */\n    template < class Data> \n    MemImpl::Chunk< Data> *\n    FixedPool<Data>::entryChunk( MemImpl::Entry< Data> *e)\n    {\n        MemImpl::ChunkPos e_pos = e->pos();\n        quint8 *ptr = ( quint8 *) e;\n        ptr = ptr - sizeof( MemImpl::Entry< Data>) * e_pos - sizeof ( MemImpl::Chunk< Data>);\n        return (MemImpl::Chunk< Data> *) ptr;\n    }\n\n    /* Allocate new memory block */\n    template < class Data> \n    void* \n    FixedPool<Data>::allocate( size_t size)\n    {\n        MEM_ASSERTD( sizeof( Data) == size,\n                     \"Allocation size doesn't match FixedPool's template parameter size\");\n        void *ptr = NULL;\n        /* If we don't have a free chunk */\n        if ( isNullP( free_chunk))\n        {\n            /* We need to create new chunk */\n            allocateChunk();\n        } \n        MEM_ASSERTD( free_chunk->isFree(), \"Pool's first free chunk is not free\");\n        /* allocate one entry */\n        ptr = ( void *)free_chunk->allocateEntry();\n        /* if no more entries left */\n        if ( !free_chunk->isFree())\n        {\n            MemImpl::Chunk< Data> *chunk = free_chunk;\n            free_chunk = chunk->next( MemImpl::CHUNK_LIST_FREE);\n            chunk->detach( MemImpl::CHUNK_LIST_FREE);\n        }\n        entry_count++;\n        return ptr;\n    }\n\n    /** Free memory block */\n    template < class Data> \n    void\n    FixedPool<Data>::deallocate( void *ptr)\n    {\n        /* 1. Check pointer */\n        MEM_ASSERTD( isNotNullP( ptr), \"Deallocation tried on NULL pointer\");\n        \n        /* 2. Check entry count */\n        MEM_ASSERTD( entry_count > 0, \"Trying deallocate entry of an empty pool\"); \n\n        MemImpl::Entry< Data> *e =(MemImpl::Entry< Data> *) ptr;\n        \n        /* 3. Get chunk of the deallocated entry */\n        MemImpl::Chunk< Data> *chunk = entryChunk( e);\n\n#ifdef CHECK_CHUNKS\n        /* 4. Check that we are deleting entry from this pool */\n        MEM_ASSERTD( areEqP( this, chunk->pool), \"Trying deallocate entry from a wrong pool\"); \n#endif\n        /*\n         * 5. If chunk is free already - it must be in free list \n         * no need to add it again\n         */\n        bool add_to_free_list = !chunk->isFree();\n\n        /* 6. Free entry in chunk */\n        chunk->deallocateEntry( e);\n        \n        /*\n         * 7. If this chunk is not the same as the current 'free chunk' \n         *     add it to free list or deallocate it if it is empty\n         */\n        if ( areNotEqP( chunk, free_chunk))\n        {\n            if ( add_to_free_list)\n            {\n                /* Add chunk to free list if it is not already there */\n                chunk->attach( MemImpl::CHUNK_LIST_FREE, free_chunk);\n                /* Deallocate previous free chunk if it is empty */\n                if ( isNotNullP( free_chunk) && free_chunk->isEmpty())\n                {\n                    deallocateChunk( free_chunk);\n                }\n                free_chunk = chunk;\n            } else if ( chunk->isEmpty())\n            {\n                /* Deallocate this chunk if it is empty and not the first free chunk */\n                deallocateChunk( chunk);\n            }\n        }\n        entry_count--;\n    }\n    /** Functionality of 'operator delete' for pooled objects */\n    template < class Data> \n    void\n    FixedPool<Data>::destroy( void *ptr)\n    {\n        /* 1. Check null pointer( in DEBUG mode) */\n        MEM_ASSERTD( isNotNullP( ptr), \"Destruction tried on NULL pointer\");\n\n        Data *data_p = static_cast< Data *>( ptr);\n        \n#ifdef CHECK_DELETE\n        /* 2. Mark for deletion */\n        data_p->toBeDeleted();\n#endif\n        /* 3. Call destructor */\n        data_p->~Data();\n        \n        /* 4. Free memory */\n        deallocate( ptr);\n    }\n}; /* namespace Mem */\n#endif /* MEM_FIXED_POOL_H */"
  },
  {
    "path": "showgraph/Utils/mem_mgr.cpp",
    "content": "/**\n * @file: mem_mgr.cpp \n * Implementation of memory manager\n */\n/*\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#include \"utils_iface.h\"\n#include \"mem.h\"\n\nusing namespace MemImpl;\n\nMemInfo::MemInfo()\n{\n    alloc_counter = 1;\n    dealloc_counter = 1;\n}\n\n/** Place for breakpoint on event number */\nvoid MemInfo::allocReg( MemEventId n)\n{\n\n}\n\n/** Place for breakpoint on event number */\nvoid MemInfo::deallocReg( MemEventId n)\n{\n\n}\n\n/** Registers the allocation event and returns its number */\nMemEventId MemInfo::allocEvent()\n{\n    /** Increase counter */\n    alloc_counter++;\n    allocReg( alloc_counter);\n    return alloc_counter;\n}\n\n/** Registers the deallocation event and returns its number */\nMemEventId MemInfo::deallocEvent()\n{\n    /** Increase counter */\n    dealloc_counter++;\n    deallocReg( dealloc_counter);\n    return dealloc_counter;\n}\n"
  },
  {
    "path": "showgraph/Utils/mem_mgr.h",
    "content": "/**\n * @file: asrt.h \n * Definition of memory manager class. Utils library in ShowGraph.\n */\n/*\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#ifndef MEM_MGR_H\n#define MEM_MGR_H\n\nnamespace MemImpl\n{\n    /**\n     * Event id type\n     * @ingroup MemImpl\n     */\n    typedef quint64 MemEventId;\n\n    /**\n     * Memory manager implementation\n     * @ingroup MemImpl\n     */\n    class MemInfo\n    {\n    public:\n        /** Registers the allocation event and returns its number */\n        MemEventId allocEvent();\n        /** Registers the deallocation event and returns its number */\n        MemEventId deallocEvent();\n    private:\n        \n        /** Registers the allocation event - place for breakpoints */\n        void allocReg( MemEventId n);\n        /** Registers the deallocation event - place for breakpoints */\n        void deallocReg( MemEventId n);\n        \n        /** Counter for allocation events */\n        MemEventId alloc_counter;\n        /** Counter for deallocation event */\n        MemEventId dealloc_counter;\n        /** private constructors, assignment and destructor */\n        MemInfo();\n        MemInfo( const MemInfo&){};\n        MemInfo& operator =( const MemInfo&){return *this;}\n        ~MemInfo(){};\n        /** Needed for singleton creation */\n        friend class Single< MemImpl::MemInfo>;\n    };\n};\n#endif /* MEM_MGR_H */\n"
  },
  {
    "path": "showgraph/Utils/mem_obj.h",
    "content": "/**\n * @file: mem_obj.h \n * Implementation of memory object base class\n */\n/*\n * Utils library in Showgraph tool\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#pragma once\n\n#ifndef MEM_H\n#\terror\n#endif\n\n#ifndef MEM_OBJ_H\n#define MEM_OBJ_H\n\n/**\n * Namespace for memory manager\n * @ingroup Mem\n */\nnamespace Mem\n{\n    /** Type of reference count */\n\ttypedef unsigned int RefNumber;\n\n\t/**\n     * Base class for all memory-managed objects\n     * @ingroup Mem\n     */\n    class Obj\n    {\n    private:\n        /** Pointer to pool */\n        Pool *_pool;\n        \n#ifdef USE_REF_COUNTERS\n\tprivate:\n\t\t/** Counter for references */\n\t\tRefNumber ref_count; /* Additional memory used, the overhead of counted references */\n\tpublic:\t\n\t\t/** Get the number of references */\n\t\tinline RefNumber refCount() const\n\t\t{\n\t\t\treturn ref_count;\n\t\t}\n\t\t/** Increase reference count */\n\t\tinline void incRefCount()\n\t\t{\n\t\t\tref_count++;\n\t\t}\n\t\t/** Decrease reference count */\n\t\tinline void decRefCount()\n\t\t{\n\t\t\tassertd( ref_count > 0);\n\t\t\tref_count--;\n\t\t}\n#endif\t\t\n\tpublic:\n        /** Get pointer to pool */\n        inline Pool* pool() const\n        {\n            return _pool;\n        }\n\n\t\t/** Constructor */\n\t\tinline Obj():\n#ifdef USE_REF_COUNTERS\n\t\tref_count( 0),\n#endif\n\t\t_pool(NULL)\n\t\t{\n\t\t\n\t\t}\n\t\t/** Destructor */\n\t\t~Obj()\n\t\t{\n#ifdef USE_REF_COUNTERS\n\t\t\tassertd( ref_count == 0);\n#endif\n\t\t}\n    };\n};\n\n#endif /** MEM_OBJ_H */\n"
  },
  {
    "path": "showgraph/Utils/mem_pool.cpp",
    "content": "/**\n * @file: mem_pool.cpp \n * Implementation of memory pool\n */\n/*\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#include \"utils_iface.h\"\n\nusing namespace Mem;\n\n/**\n * Default operator 'new' is disabled\n */\nvoid *\nPoolObj::operator new( size_t size)\n{\n    ASSERT( 0);\n#ifdef _MSC_VER\n    return NULL;\n#endif\n}\n/**\n * Default operator 'delete' is disabled\n */\nvoid \nPoolObj::operator delete( void *ptr)\n{\n    ASSERT( 0);\n}\n/**\n * Default operator 'new[]' is disabled\n */\nvoid *\nPoolObj::operator new[]( size_t size)\n{\n    ASSERT( 0);\n#ifdef _MSC_VER\n    return NULL;\n#endif\n}\n/**\n * Default operator 'delete[]' is disabled\n */\nvoid \nPoolObj::operator delete[]( void *ptr)\n{\n    ASSERT( 0);\n}\n\n"
  },
  {
    "path": "showgraph/Utils/mem_pool.h",
    "content": "/**\n * @file: mem_pool.h \n * Implementation of memory pool\n */\n/*\n * Utils library in Showgraph tool\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#pragma once\n\n#ifndef MEM_H\n#    error\n#endif\n\n#ifndef MEM_POOL_H\n#define MEM_POOL_H\n\nnamespace Mem\n{\n    /**\n     * Type for  memory entry size  \n     * @ingroup Mem\n     */\n    typedef quint32 EntrySize;\n\n    /** \n     * Type for number of memory entries \n     * @ingroup Mem\n     */\n    typedef quint32 EntryNum;\n\n    /**\n     * Pool types\n     * @ingroup Mem\n     */\n    enum PoolType\n    {\n        /** Fixed-size entry pool */\n        POOL_FIXED,\n        /** Float-size entry pool */\n        POOL_FLOAT,\n        /** Number of types */\n        POOL_TYPES_NUM\n    };\n\n    /**\n     * Base class for memory pools\n     *\n     * @ingroup Mem\n     */\n    class Pool\n    {\n    public:\n        /** Allocate new memory block */\n        virtual void* allocate( size_t size) = 0;\n        /** Free memory block */\n        virtual void deallocate( void *ptr) = 0;\n        /** Functionality of 'operator delete' for pooled objects */\n        virtual void destroy( void *ptr) = 0;\n        /** Destructor */\n        virtual ~Pool(){};\n    };\n\n    /**\n     * Base class for all objects allocated in pools\n     *\n     * @ingroup Mem\n     */    \n    class PoolObj\n    {\n#ifdef CHECK_DELETE\n        bool to_be_deleted;\n#endif  \n        /** Copy constructor disabled*/\n        PoolObj( PoolObj &obj){};\n        /** Assignment disabled */\n        PoolObj& operator = ( const PoolObj& obj){ return *this;};\n\n        public:\n#ifdef CHECK_DELETE\n        /** Default constructor */\n        PoolObj(): to_be_deleted( false){};\n\n        /** Mark for deletion */\n        inline void toBeDeleted()\n        {\n            MEM_ASSERTD( !to_be_deleted, \"Tried to mark object for deletion more than once\");\n            to_be_deleted = true;\n        }\n#else\n        /** Default constructor */\n        inline PoolObj(){};\n#endif\n        /** Default operator 'new' is disabled */\n        void *operator new ( size_t size);\n        /** Default operator 'delete' is disabled */\n        void operator delete( void *ptr);\n        \n        /** Default operator 'new' is disabled */\n        void *operator new[] ( size_t size);\n        /** Default operator 'delete' is disabled */\n        void operator delete[] ( void *ptr);\n        \n        /** Placement new */\n        inline void *operator new ( size_t size, Pool* pool);\n        /**\n         * Operator 'delete' corresponding to placement new\n         * WARNING: Compiler won't call this for deletion. \n         *          It is needed for freeing memory in case of exceptions in constructor\n         */\n        inline void operator delete( void *ptr, Pool* pool);\n        /** Destructor is to be called by 'destroy' routine of pool class */\n        virtual ~PoolObj()\n        {\n#ifdef CHECK_DELETE\n            MEM_ASSERTD( to_be_deleted, \"Deleted pool object not through pool interface. Probably operator delete used.\");\n#endif        \n        }\n    };\n\n    /**\n     * Placement new\n     */\n    inline void *\n    PoolObj::operator new ( size_t size, Pool* pool)\n    {\n        return pool->allocate( size);\n    }\n    /**\n     * Operator 'delete' corresponding to placement new\n     * WARNING: Compiler won't call this for deletion. \n     *          It is needed for freeing memory in case of exceptions in constructor\n     */\n    inline void\n    PoolObj::operator delete( void *ptr, Pool* pool)\n    {\n        pool->deallocate( ptr);\n    }\n}; /* namespace Mem */\n#endif /* MEM_POOL_H */\n"
  },
  {
    "path": "showgraph/Utils/mem_ref.h",
    "content": "/**\n * @file: mem_ref.h \n * Implementation of memory reference template\n */\n/*\n * Utils library in Showgraph tool\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#pragma once\n\n#ifndef MEM_H\n#\terror\n#endif\n\n#ifndef MEM_REF_H\n#define MEM_REF_H\n\nnamespace Mem\n{\n   /**\n     * Memory reference template\n     * @ingroup Mem\n     */\n    template < class RefObj> class Ref\n    {\n#ifdef USE_REF_COUNTERS\n\n#endif\n\tprivate:\n\t\tRefObj *ptr;\n\tpublic:\n\t\t/** Default constructor */\n\t\tRef(): ptr( NULL){};\n\t\t/** Copy constructor !!! NO uTEST !!! */\n\t\tRef( const Ref< RefObj>& orig): ptr( orig.ptr)\n\t\t{\n#ifdef USE_REF_COUNTERS\n\t\t\tptr->incRefCount();\n#endif\n\t\t}\n\t\t/** Assignement operator overloading */\n\t\tRef< RefObj> & operator=( const Ref< RefObj>& orig)\n\t\t{\n\t\t\tptr = orig.ptr;\n#ifdef USE_REF_COUNTERS\n\t\t\tptr->incRefCount();\n#endif\n\t\t\treturn *this;\n\t\t}\n\t    /**\n\t\t * Constructor from pointer\n\t\t * Used in Ref ref = new Obj(...) initialization\n\t\t * !!! No uTEST !!!\n\t\t */\n\t\tRef( RefObj* p): ptr( p)\n\t\t{\n#ifdef USE_REF_COUNTERS\n\t\t\tif ( ptr != 0)\n\t\t\t\tptr->incRefCount();\n#endif\t\n\t\t}\n\t\t/**\n\t\t * Assignement of pointer\n\t\t * Used in Ref ref; ref = new Obj(...) expression\n\t\t */\n\t\tRef< RefObj> & operator=( RefObj* p)\n\t\t{\n#ifdef USE_REF_COUNTERS\n\t\t\t/** Decrement object's ref count */\n\t\t\tif ( ptr != 0)\n\t\t\t\tptr->decRefCount();\n#endif\t\n\t\t\t/** Assign a new pointer */\n\t\t\tptr = p;\n#ifdef USE_REF_COUNTERS\n\t\t\t/** Increment ref count */\n\t\t\tif ( ptr != 0)\n\t\t\t\tptr->incRefCount();\n#endif\t\n\t\t\treturn *this;\n\t\t}\n\t\t/** Destructor */\n\t\t~Ref()\n\t\t{\n#ifdef USE_REF_COUNTERS\n\t\t\tif ( ptr != 0)\n\t\t\t\tptr->decRefCount();\n#endif\n\t\t}\n\t\t/** Member access operator */\n\t\tinline RefObj* operator->()\n\t\t{\n\t\t\treturn ptr;\n\t\t}\n\t\t/** Equals operator */\n\t\tinline bool operator == ( Ref< RefObj> &r)\n\t\t{\n\t\t\treturn ptr == r.ptr;\n\t\t}\n\t\t/** Conversion to boolean */\n\t\tinline operator bool()\n\t\t{\n\t\t\treturn ptr != NULL;\n\t\t}\n\t\t/**\n\t\t * Conversion to Pointer\n\t\t * For using ref as delete operator argument.\n\t\t * Use in other expressions is prohibited. Unfortunatelly this is not ( can't be?) enforced.\n\t\t */\n\t\tinline operator RefObj*()\n\t\t{\n                        RefObj *ret_val = ptr;\n\t\t\tassertd( ret_val != NULL);\n\t\t\t/** Decrement object's ref count */\n\t\t\tif ( ptr != 0)\n\t\t\t{\n#ifdef USE_REF_COUNTERS\n\t\t\t\tptr->decRefCount();\t\n#endif\n\t\t\t\tptr = 0;\n\t\t\t}\n\t\t\treturn ret_val;\n\t\t}\n    };\n};\n#endif /* MEM_REF_H */"
  },
  {
    "path": "showgraph/Utils/mem_utest.cpp",
    "content": "/**\n * @file: mem_utest.cpp \n * Implementation of testing of memory manager\n */\n/*\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#include \"utils_iface.h\"\n#include \"mem.h\"\n\nusing namespace Mem;\n\n/** Test object class */\nclass TestObj: public Obj\n{\n\t\npublic:\t\n\t/** Some variable */\n\tint a;\n};\n\n/**\n * Reference to object\n */\ntypedef Ref< TestObj> ObjRef;\n\n/**\n * Test smart pointers\n */\nstatic bool\nuTestRef()\n{\n/** #Test smart pointers behaviour */\n    ObjRef ref = new TestObj(); /** Test constructor from pointer */\n    ObjRef ref2; /** Test default constructor */\n\n    /** Test operator bool() */\n    assertd( !ref2 && ref);\n    //assertd( ref2 == NULL && ref != NULL);\n    assertd( ref2 == 0 && ref != 0);\n    /** Test copy constructor */\n    ref2 = ref;\n    assertd( ref2 && ref);\n    /** Test operator == ( ref) */\n    assertd( ref == ref2);\n\n    /** Test operator -> */\n    ref->a = 2;\n#ifdef USE_REF_COUNTERS\n    assertd( ref->refCount() == 2);\n#endif\t\n    bool catched = false;\n\n    /** Test exception generation */\n    try\n    {\n            delete ref;\n    } catch( int a)\n    {\n            catched = true;\n            ref2->a = a;\n    }\n    assertd( catched);\n\n    /** Test ref to pointer conversion and Obj destructor */\n    delete ref2;\n    return true;\n}\n\n/** Sample object used as a baseclass for more complicated pool-stored objects */\nclass PoolBase: public PoolObj \n{\n    virtual void setVal( quint32 val) = 0;\n    virtual quint32 val() const = 0;\n};\n\n/**\n * @brief Fairly complex pool-stored object\n * Class for testing complex objects stored in pool. Built with \n * multiple inheritance, virtual functions and additional members.\n */\nclass MyPoolObj: public PoolBase, public SListIface< MyPoolObj, SListItem>\n{\n    quint32 priv_field;\npublic:\n    /** Some public fields */\n    quint32 a;\n    quint32 b;\n    bool *called;\n    /** Base class routines implementation */\n    void setVal( quint32 val)\n    {\n        priv_field = val;\n    }\n    quint32 val() const\n    {\n        return priv_field;\n    }\n    ~MyPoolObj()\n    {\n        *called = true;\n    }\n};\n/**\n * Test memory pools\n */\nstatic bool\nuTestPools()\n{\n\n    Pool *pool = new FixedPool< MyPoolObj>();\n    MyPoolObj *p1 = new ( pool) MyPoolObj();\n    MyPoolObj *p2 = new ( pool) MyPoolObj();\n    bool called_destructor1 = false;\n    bool called_destructor2 = false;\n\n    ASSERT( p1 != p2);\n    p1->a = 1;\n    p2->a = 2;\n    p1->b = 3;\n    p2->b = 4;\n    p1->called = &called_destructor1;\n    p2->called = &called_destructor2;\n\n    p1->setVal( 5);\n    p2->setVal( 6);\n    ASSERT( p1->a != p1->b);\n    ASSERT( p1->a != p2->a);\n    ASSERT( p1->b != p2->a);\n    ASSERT( p1->b != p2->b);\n    ASSERT( p1->a != p2->a);\n    \n    ASSERT( !called_destructor1);\n    ASSERT( !called_destructor2);\n    \n    pool->destroy( p1);\n    \n    ASSERT( called_destructor1);\n    ASSERT( !called_destructor2);\n\n    pool->destroy( p2);\n    \n    ASSERT( called_destructor1);\n    ASSERT( called_destructor2);\n\n    /** More objects */\n    MyPoolObj *obj = NULL;\n    for ( int i = 0; i < 20000; i++)\n    {\n        MyPoolObj *prev_obj = obj;\n        obj = new ( pool) MyPoolObj();\n        obj->called = &called_destructor1;\n        obj->attach( prev_obj);\n        prev_obj = obj->next();\n    }\n    while ( isNotNullP( obj))\n    {\n        MyPoolObj *next = obj->next();\n        pool->destroy( obj);\n        obj = next;\n    }\n    delete pool;\n    return true;\n}\n\n\n/**\n * Test smart pointers, objects and pools\n */\nbool uTestMem()\n{\n    /** Test smart pointers */\n    if ( !uTestRef())\n        return false;\n    /** Test memory pools */\n    if ( !uTestPools())\n        return false;\n    return true;\n}\n"
  },
  {
    "path": "showgraph/Utils/misc.h",
    "content": "/**\n * @file: misc.h \n * @defgroup Misc Miscellaneous\n * @brief Various auxiliary routines\n * @ingroup Utils\n */\n/*\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#ifndef MISC_H\n#define MISC_H\n\n/**\n * Check if pointer is not null\n * @ingroup Misc\n */\ninline bool isNotNullP( const void *pointer)\n{\n    return pointer != NULL;\n}\n/**\n * Check if pointer is null\n * @ingroup Misc\n */\ninline bool isNullP( const void *pointer)\n{\n    return pointer == NULL;\n}\n\n/**\n * Check if pointers are equal\n * @ingroup Misc\n */\ninline bool areEqP( const void *p1, const void *p2)\n{\n    return p1 == p2;\n}\n\n/**\n * Check if pointers are not equal\n * @ingroup Misc\n */\ninline bool areNotEqP( const void *p1, const void *p2)\n{\n    return p1 != p2;\n}\n\n/**\n * @brief Get absolute value\n * @ingroup Misc\n * @param Value value type\n * @param val signed value used to get absolute value\n *\n * @par \n * Returns absolute value for a given signed operand. Note that operators\n * \"<\" and \"-\" must be defined for parameter class\n */\ntemplate<class Value> inline Value abs( Value val)\n{\n    if( val < 0)\n        return -val;\n\n    return val;\n}\n\n#endif"
  },
  {
    "path": "showgraph/Utils/print.h",
    "content": "/**\n * File: print.h - Wrapper for printing routines in ShowGraph\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#ifndef PRINT_H\n#define PRINT_H\n\n#include <cstdio>\n#include <cstdarg>\n\nnamespace PrintUtils\n{\n    /** Print to file */\n    \n    /** Print to console's STDOUT */\n    inline void out( const char* format, ...)\n    {\n#ifdef _DEBUG\n        va_list args;\n        va_start( args, format);\n        vfprintf( stdout, format, args);\n        va_end( args);\n        fprintf( stdout, \"\\n\");\n#endif\n    }\n    /** Print to console's STDERR */\n    inline void err( const char* format, ...)\n    {\n#ifdef _DEBUG\n        va_list args;\n        va_start( args, format);\n        vfprintf( stderr, format, args);\n        va_end( args);\n        fprintf( stderr, \"\\n\");\n#endif\n    }\n};\n\n#endif"
  },
  {
    "path": "showgraph/Utils/singleton.h",
    "content": "/**\n * @file: singleton.h \n * @defgroup Singleton Singleton\n * @brief Definition of singleton template\n * @ingroup Utils\n */\n/*\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#pragma once\n\n#ifndef SINGLETON_H\n#define SINGLETON_H\n\n/**\n * @brief Template for simple singleton objects.\n * @ingroup Singleton\n * @param T type of client object\n *\n * Singleton is a type of object that is guaranteed to have only one instance at any\n * given point of program execution. The Single template manages global access to single\n * instance of client object. Client object type is specified by template parameter. \n * A pointer to the single instance of client object can be obtained by calling intance().\n * To control singleton's lifetime its initialization and destruction are made explicit.\n * Use init() and deinit() routines for these purposes.\n * Example of usage:\n @code\n // Sample class\n class classA\n {\n public:\n     doSomething() {...}\n private:\n     // private constructors, assignment and destructor\n     classA(){};\n     classA( const classA&){};\n     classA& operator =( const classA&){};\n     ~classA(){};\n     // Needed for singleton opration\n     friend class Single< classA>;\n };\n \n // Typedef for classA encapsulated in singleton\n typedef Single< classA> SingleA;\n\n //void myfunc()\n {\n    SingleA::instance()->doSomething();\n }\n // Usage\n void useSingleA()\n {\n    SingleA::init();\n    myfunc();\n    SingleA::deinit();\n }\n @endcode\n */\ntemplate < class T> class Single\n{\npublic:\n    /** Create and initialize client object */\n    static void init();\n    /** Destroy client object */\n    static void deinit();\n    /** Get a pointer to client object */\n    static T* instance();\n\nprivate:/* Uniqueness ensurance */\n    /** Private constructor */\n    Single();\n    /** Private copy constructor */\n    Single( const Single&);\n    /** Private assignment */\n    Single& operator = ( const Single&);\n    /** Private destructor */\n    ~Single();\n    /**\n     * @brief Pointer to client object.\n     * \n     * Initialized to NULL on start and points to instance after init() is called \n     */\n    static T* instance_p; \n};\n\n/**\n * Initializtion of singleton\n */\ntemplate < class T> \nvoid\nSingle< T>::init()\n{\n    ASSERTD( isNullP( instance_p));\n    instance_p = new T();\n}\n/**\n * Destruction of singleton\n */\ntemplate < class T> \nvoid\nSingle< T>::deinit()\n{\n    ASSERTD( isNotNullP( instance_p));\n    delete instance_p;\n    instance_p = 0;\n}\n/**\n * Access to client object\n */\ntemplate < class T> \nT*\nSingle< T>::instance()\n{\n    ASSERTD( isNotNullP( instance_p));\n    return instance_p;\n}\n\n/**\n * Initialization of instance pointer\n */\ntemplate < class T> T *Single<T>::instance_p = 0;                                       \n\n\n\n#endif /* SINGLETON_H */\n"
  },
  {
    "path": "showgraph/Utils/ulist.h",
    "content": "#ifndef ULIST_H\n#define ULIST_H\n\n#endif"
  },
  {
    "path": "showgraph/Utils/utils.cpp",
    "content": ""
  },
  {
    "path": "showgraph/Utils/utils_iface.h",
    "content": "/**\n * @file: utils_iface.h \n * Interface of Utils library in ShowGraph\n * @defgroup Utils Utils\n * @ingroup Core\n * @brief Low level utils\n */\n/*\n * Utils library in Showgraph tool\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#pragma once\n\n#ifndef UTILS_IFACE_H\n#define UTILS_IFACE_H\n#include <stdio.h>\n#include <QTextStream>\n#include <QtGlobal>\n#include \"misc.h\"\n#include \"asrt.h\"\n#include \"print.h\"\n#include \"list.h\"\n#include \"singleton.h\"\n#include \"mem.h\"\n#include \"conf.h\"\n\n\nnamespace Utils\n{\n    using namespace PrintUtils;\n};\n\n/**\n * Test list classes\n */\nbool uTestList();\n\n/**\n * Test memory manager\n */\nbool uTestMem();\n\n/**\n * Test configuration-related functionality\n */\nbool uTestConf();\n\n#endif"
  },
  {
    "path": "showgraph/Utils/utils_utest.cpp",
    "content": "/**\n * @file: utils_utest.cpp \n * Implementation of testing of utils\n */\n/*\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#include \"utils_iface.h\"\n\n\n/** Sample class */\nclass classA\n{\nprivate:\n    /** private constructors, assignment and destructor */\n    classA(){};\n    classA( const classA&){};\n    classA& operator =( const classA&){return *this;}\n    ~classA(){};\n    /** Needed for singleton creation */\n    friend class Single< classA>;\n};\n\n/** Typedef for classA encapsulated in singleton */\ntypedef Single< classA> SingleA;\n\n/**\n * Test simple singleton\n */\nbool uTestSingle()\n{\n    SingleA::init();\n\n    classA* a1 = SingleA::instance();\n    classA* a2 = SingleA::instance();\n    ASSERT( areEqP( a1, a2));\n    SingleA::deinit();\n    return true;\n}\n\n/**\n * Test Utils package\n */\nbool uTestUtils()\n{\n    /** test singleton */\n    if ( !uTestSingle())\n        return false;\n\n    /** Tets list classes */\n    if ( !uTestList())\n        return false;\n\n    /** Test memory management */\n    if ( !uTestMem())\n\t\treturn false;\n\n    /** Test configuration classes functionality */\n    if ( !uTestConf())\n    \treturn false;\n\treturn true;\n}\n"
  },
  {
    "path": "showgraph/core_iface.h",
    "content": "/**\n * @file: core_iface.h \n * Interface file of showgraph's core library\n * @defgroup Core Core library for visualization of graphs\n */\n/* \n * GraphCore for ShowGraph tool.\n * Copyright (c) 2009, Boris Shurygin\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * \n * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#ifndef CORE_IFFACE_H\n#define CORE_IFFACE_H\n\n#include \"GraphView/gview_iface.h\"\n\n#endif /** CORE_IFFACE_H */"
  },
  {
    "path": "showgraph/showgraph.cpp",
    "content": "\r\n/*\r\n * CodeQuery\r\n * Copyright (C) 2013-2016 ruben2020 https://github.com/ruben2020/\r\n * \r\n * This program is free software: you can redistribute it and/or modify\r\n * it under the terms of the GNU General Public License as published by\r\n * the Free Software Foundation, either version 2 of the License, or\r\n * (at your option) any later version.\r\n * \r\n * This program is distributed in the hope that it will be useful,\r\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r\n * GNU General Public License for more details.\r\n * \r\n * You should have received a copy of the GNU General Public License\r\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\r\n * \r\n */\r\n\r\n#include \"asrt.h\"\r\n#include \"core_iface.h\"\r\n#include \"showgraph.h\"\r\n\r\n/** Magnifying factor for getting more detailed images */\r\nconst int IMAGE_EXPORT_SCALE_FACTOR = 2;\r\n\r\n/** Adjust value for image's bounding rectangle on scene rendering */\r\nconst qreal IMAGE_RECT_ADJUST = 10;\r\n\r\nQImage showgraph::convertToImage(QString grpxml)\r\n{\r\n\r\n    /** Create graph instance */\r\n    GraphView* graph_view = new GraphView();\r\n    graph_view->setGraph( new GGraph( graph_view, true));\r\n\r\n    /** Read graph from XML */\r\n    graph_view->graph()->readFromXML( grpxml);\r\n \r\n    /**\r\n     * Perform layout in single thread.\r\n     * Multi thread wouldn't work since we do not run QApplication::exec() and there is not event loop\r\n     */\r\n    graph_view->graph()->doLayoutSingle();\r\n\r\n    /** Get scene rectangle */\r\n    QRectF scene_rect( graph_view->scene()->itemsBoundingRect()\r\n                       .adjusted( -IMAGE_RECT_ADJUST, -IMAGE_RECT_ADJUST,\r\n                                   IMAGE_RECT_ADJUST, IMAGE_RECT_ADJUST));\r\n\r\n    /** Render to image */\r\n        QImage image( scene_rect.width() * IMAGE_EXPORT_SCALE_FACTOR,\r\n                          scene_rect.height() * IMAGE_EXPORT_SCALE_FACTOR,\r\n                                   QImage::Format_RGB32);\r\n    image.fill( graph_view->palette().base().color().rgb());\r\n    QPainter pp( &image);\r\n        pp.setRenderHints( graph_view->renderHints());\r\n    graph_view->scene()->render( &pp, image.rect(), scene_rect);\r\n\r\n    delete graph_view;\r\n    return image;\r\n}\r\n\r\n"
  },
  {
    "path": "showgraph/showgraph.h",
    "content": "\n/*\n * CodeQuery\n * Copyright (C) 2013-2016 ruben2020 https://github.com/ruben2020/\n * \n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 2 of the License, or\n * (at your option) any later version.\n * \n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n * \n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n * \n */\n\n#ifndef SHOWGRAPH_H_CQ\n#define SHOWGRAPH_H_CQ\n\n#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)\n#include <QtWidgets>\n#else\n#include <QtGui>\n#endif\n\nclass showgraph\n{\npublic:\n\tstatic QImage convertToImage(QString grpxml);\n};\n\n\n#endif //SHOWGRAPH_H_CQ\n\n\n"
  },
  {
    "path": "windows-install/qt5/buildqt5.bat",
    "content": "cd c:\\workspace\\codequery\r\ncmake -G \"Ninja\" -DBUILD_QT5=ON -DSQLITE_INCLUDE_DIR=\"%MinGW64_DIR%\\x86_64-w64-mingw32\\include\" -DSQLITE_LIBRARY_RELEASE=\"%MinGW64_DIR%\\bin\\sqlite3.dll\" -S . -B buildqt5\r\ncmake --build buildqt5\r\ncd buildqt5\r\nmd output\r\ncopy *.exe output\r\ncopy \"%MinGW64_DIR%\\bin\\sqlite3.dll\" output\r\ncd output\r\nwindeployqt --release codequery.exe\r\ndir/b/a/s\r\ncandle.exe -ext WixUIExtension -ext WixUtilExtension \"c:\\workspace\\codequery\\windows-install\\qt5\\codequeryqt5.wxs\"\r\nlight.exe -ext WixUIExtension -ext WixUtilExtension codequeryqt5.wixobj\r\n"
  },
  {
    "path": "windows-install/qt5/buildqt5_github.bat",
    "content": "set PATH=%Qt5_DIR%/bin;%PATH%\r\ncmake --version\r\ngcc -v\r\ng++ -v\r\ncmake -G Ninja -DBUILD_QT5=ON -DGHAWIN=ON -DVCPKG_TARGET_TRIPLET=x64-windows -DCMAKE_TOOLCHAIN_FILE=\"c:\\vcpkg\\scripts\\buildsystems\\vcpkg.cmake\" -S . -B buildqt5\r\ncmake --build buildqt5\r\n\r\n"
  },
  {
    "path": "windows-install/qt5/codequeryqt5.wxs",
    "content": "<?xml version='1.0' encoding='windows-1252'?>\r\n<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>\r\n    <Product Name='CodeQuery 1.0.1 (Qt5, 64-bit)' Manufacturer='ruben2020_foss'\r\n        Id='*' \r\n        UpgradeCode='2368ce2d-f635-4c8c-9b92-6fa348b292af'\r\n        Language='1033' Codepage='1252' Version='1.0.1'>\r\n\t\t<Package Id='*' Keywords='Installer' Description=\"CodeQuery 1.0.1 (Qt5, 64-bit) Installer\"\r\n\t\t\tComments='Copyright 2013-2024 (C) ruben2020' Manufacturer='ruben2020_foss'\r\n\t\t\tInstallerVersion='200' Languages='1033' Compressed='yes' SummaryCodepage='1252'\r\n\t\t\tPlatform=\"x64\" />\r\n\t\t<Condition Message=\"You need to be an administrator to install this product.\">\r\n\t\t\tPrivileged\r\n\t\t</Condition>\r\n\t\t<Condition Message='This application only runs on 64-bit Windows.'>\r\n\t\t\tVersionNT64\r\n\t\t</Condition>\r\n\t\t<Property Id=\"WIXUI_INSTALLDIR\" Value=\"INSTALLDIR\" />\r\n\t\t<WixVariable Id=\"WixUILicenseRtf\" Value=\"..\\..\\windows-install\\wincommon\\LICENSE.rtf\" />\r\n\t\t<WixVariable Id=\"WixUIBannerBmp\" Value=\"..\\..\\doc\\banner.bmp\" />\r\n\t\t<WixVariable Id=\"WixUIDialogBmp\" Value=\"..\\..\\doc\\dialog.bmp\" />\r\n\t\t<Property Id=\"WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT\" Value=\"Launch 'How to use CodeQuery'\" />\r\n\t\t<Property Id='NOTEPAD'>Notepad.exe</Property>\r\n\t\t<CustomAction Id='LaunchFile' Property='NOTEPAD' ExeCommand='[#HOWTO]' Return='asyncNoWait' />\r\n\t\t<Icon Id=\"codequery.ico\" SourceFile=\"..\\..\\gui\\images\\codequery.ico\" />\r\n\t\t<Icon Id=\"msiexec.ico\" SourceFile=\"C:\\Windows\\System32\\msiexec.exe\" />\r\n\t\t<Property Id=\"ARPPRODUCTICON\" Value=\"codequery.ico\" />\r\n\t\t<UI>\r\n\t\t\t<UIRef Id=\"WixUI_InstallDir\" />\r\n\t\t\t<UIRef Id=\"WixUI_ErrorProgressText\" />\r\n\t\t\t<Publish Dialog=\"ExitDialog\"\r\n\t\t\t\tControl=\"Finish\" \r\n\t\t\t\tEvent=\"DoAction\" \r\n\t\t\t\tValue=\"LaunchFile\">WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed</Publish>\r\n\t\t</UI>\r\n\t\t<Media Id='1' Cabinet='CodeQuery64.cab' EmbedCab='yes' DiskPrompt='CD-ROM #1' />\r\n\t\t<Property Id='DiskPrompt' Value=\"CodeQuery Installation [1]\" />\r\n\t\t<Directory Id='TARGETDIR' Name='SourceDir'>\r\n\t\t\t<Directory Id='ProgramFilesFolder' Name='PFiles'>\r\n\t\t\t\t<Directory Id='CodeQuery' Name='CodeQuery'>\r\n\t\t\t\t\t<Directory Id='INSTALLDIR' Name='CodeQuery 1.0.1 64bit'>\r\n\t\t\t\t\t\t<Component Id='CodeQueryGUI_64bit' Guid='2989278c-93cd-4ef7-a692-4eef77e747fb'>\r\n\t\t\t\t\t\t\t<File Id='codequeryEXE' Name='codequery.exe' DiskId='1' Source='codequery.exe' KeyPath='yes'>\r\n\t\t\t\t\t\t\t\t<Shortcut Id=\"startmenuCodeQueryShortcut\" Directory=\"AppProgramMenuFolder\" Name=\"CodeQuery\"\r\n\t\t\t\t\t\t\t\t\tAdvertise=\"yes\" WorkingDirectory='INSTALLDIR' Icon=\"codequery.ico\" IconIndex=\"0\" />\r\n\t\t\t\t\t\t\t</File>\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Component Id='cqmakedb_64bit' Guid='fe72a848-eb9d-471e-89c2-a81f1f26f8e0'>\r\n\t\t\t\t\t\t\t<File Id='cqmakedbEXE' Name='cqmakedb.exe' DiskId='1' Source='cqmakedb.exe' KeyPath='yes' />\r\n\t\t\t\t\t\t\t<Environment Id=\"PATH\" Name=\"PATH\" Value=\"[INSTALLDIR]\" Permanent=\"no\" Part=\"last\" Action=\"set\" System=\"no\" />\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Component Id='cqsearch_64bit' Guid='2753d8be-ff18-415f-99fb-bc6e2c5eb71c'>\r\n\t\t\t\t\t\t\t<File Id='cqsearchEXE' Name='cqsearch.exe' DiskId='1' Source='cqsearch.exe' KeyPath='yes' />\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Component Id='cscope_64bit' Guid='22027772-b5a6-44c2-aac8-b62e5ac30d2d'>\r\n\t\t\t\t\t\t\t<File Id='cscopeEXE' Name='cscope.exe' DiskId='1' Source='..\\..\\windows-install\\wincommon\\cscope.exe' KeyPath='yes' />\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Component Id='ctags_64bit' Guid='9596f520-e82c-46b6-aa51-dc7a675d50da'>\r\n\t\t\t\t\t\t\t<File Id='ctagsEXE' Name='ctags.exe' DiskId='1' Source='..\\..\\windows-install\\wincommon\\ctags.exe' KeyPath='yes' />\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Component Id='docHOWTO' Guid='a8a737a0-9aef-4105-8004-2973e56a3f6d'>\r\n\t\t\t\t\t\t\t<File Id='HOWTO' Name='HOWTO-WINDOWS.txt' DiskId='1' Source='..\\..\\windows-install\\wincommon\\HOWTO-WINDOWS.txt' KeyPath='yes'>\r\n\t\t\t\t\t\t\t\t<Shortcut Id=\"startmenuHOWTOShortcut\" Directory=\"AppProgramMenuFolder\" Name=\"How to use CodeQuery\"\r\n\t\t\t\t\t\t\t\t\tAdvertise=\"yes\" WorkingDirectory='INSTALLDIR' />\r\n\t\t\t\t\t\t\t</File>\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Component Id='docLICENSE' Guid='0a2ca9df-dc81-4b7f-8b82-fcbbd60181ca'>\r\n\t\t\t\t\t\t\t<File Id='LICENSE' Name='LICENSE.txt' DiskId='1' Source='..\\..\\windows-install\\wincommon\\LICENSE.txt' KeyPath='yes'>\r\n\t\t\t\t\t\t\t\t<Shortcut Id=\"startmenuLicenseShortcut\" Directory=\"AppProgramMenuFolder\" Name=\"LICENSE\"\r\n\t\t\t\t\t\t\t\t\tAdvertise=\"yes\" WorkingDirectory='INSTALLDIR' />\r\n\t\t\t\t\t\t\t</File>\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Component Id='docREADME' Guid='cf10df14-cf2e-4200-b502-bdbdabebbdd2'>\r\n\t\t\t\t\t\t\t<File Id='README' Name='README.txt' DiskId='1' Source='..\\..\\windows-install\\wincommon\\README.txt' KeyPath='yes'>\r\n\t\t\t\t\t\t\t\t<Shortcut Id=\"startmenuREADMEShortcut\" Directory=\"AppProgramMenuFolder\" Name=\"README\"\r\n\t\t\t\t\t\t\t\t\tAdvertise=\"yes\" WorkingDirectory='INSTALLDIR' />\r\n\t\t\t\t\t\t\t</File>\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Component Id='sqlite3_64bit' Guid='3becd97b-1493-48f1-8a0a-564d8e84a041'>\r\n\t\t\t\t\t\t\t<File Id='sqlite3DLL' Name='sqlite3.dll' DiskId='1' Source='sqlite3.dll' KeyPath='yes' />\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Component Id='BaseDLLsWin64' Guid='fa02bb08-440f-4170-9588-7eef443e572e'>\r\n\t\t\t\t\t\t\t<File Id='GCCDLL' Name='libgcc_s_seh-1.dll' DiskId='1' Source='libgcc_s_seh-1.dll' KeyPath='yes' />\r\n\t\t\t\t\t\t\t<File Id='STDCPPDLL' Name='libstdc++-6.dll' DiskId='1' Source='libstdc++-6.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t<File Id='WinPThreadDLL' Name='libwinpthread-1.dll' DiskId='1' Source='libwinpthread-1.dll' KeyPath='no' />\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Component Id='GraphicsDLL64' Guid='4f5e985b-c383-447c-be0f-871002bdeb58'>\r\n\t\t\t\t\t\t\t<File Id='Direct3D' Name='D3Dcompiler_47.dll' DiskId='1' Source='D3Dcompiler_47.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t<File Id='EGL' Name='libEGL.dll' DiskId='1' Source='libEGL.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t<File Id='GLESV2' Name='libGLESV2.dll' DiskId='1' Source='libGLESV2.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t<File Id='OpenGL' Name='opengl32sw.dll' DiskId='1' Source='opengl32sw.dll' KeyPath='yes' />\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Component Id='QT5MainDLL' Guid='4bd506fd-dd4f-4eed-a2ca-da8d95be829d'>\r\n\t\t\t\t\t\t\t<File Id='Qt5Concurrent' Name='Qt5Concurrent.dll' DiskId='1' Source='Qt5Concurrent.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t<File Id='Qt5Core' Name='Qt5Core.dll' DiskId='1' Source='Qt5Core.dll' KeyPath='yes' />\r\n\t\t\t\t\t\t\t<File Id='Qt5Gui' Name='Qt5Gui.dll' DiskId='1' Source='Qt5Gui.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t<File Id='Qt5Svg' Name='Qt5Svg.dll' DiskId='1' Source='Qt5Svg.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t<File Id='Qt5Widgets' Name='Qt5Widgets.dll' DiskId='1' Source='Qt5Widgets.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t<File Id='Qt5Xml' Name='Qt5Xml.dll' DiskId='1' Source='Qt5Xml.dll' KeyPath='no' />\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Directory Id='iconengines' Name='iconengines'>\r\n\t\t\t\t\t\t\t<Component Id='QT5IconEngines' Guid='4d0e247a-7b12-4b2d-b48c-3feee2db38c2'>\r\n\t\t\t\t\t\t\t\t<File Id='qsvgicon' Name='qsvgicon.dll' DiskId='1' Source='iconengines\\qsvgicon.dll' KeyPath='yes' />\r\n\t\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t</Directory>\r\n\t\t\t\t\t\t<Directory Id='imageformats' Name='imageformats'>\r\n\t\t\t\t\t\t\t<Component Id='QT5ImageFormats' Guid='9cdb7a20-ef68-49a3-9c90-458b54ff22c2'>\r\n\t\t\t\t\t\t\t\t<File Id='qgif' Name='qgif.dll' DiskId='1' Source='imageformats\\qgif.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qicns' Name='qicns.dll' DiskId='1' Source='imageformats\\qicns.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qico' Name='qico.dll' DiskId='1' Source='imageformats\\qico.dll' KeyPath='yes' />\r\n\t\t\t\t\t\t\t\t<File Id='qjpeg' Name='qjpeg.dll' DiskId='1' Source='imageformats\\qjpeg.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qsvg' Name='qsvg.dll' DiskId='1' Source='imageformats\\qsvg.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qtga' Name='qtga.dll' DiskId='1' Source='imageformats\\qtga.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qtiff' Name='qtiff.dll' DiskId='1' Source='imageformats\\qtiff.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qwbmp' Name='qwbmp.dll' DiskId='1' Source='imageformats\\qwbmp.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qwebp' Name='qwebp.dll' DiskId='1' Source='imageformats\\qwebp.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t</Directory>\r\n\t\t\t\t\t\t<Directory Id='platforms' Name='platforms'>\r\n\t\t\t\t\t\t\t<Component Id='QT5Platforms' Guid='eee144c7-e872-4760-8632-854b7959a761'>\r\n\t\t\t\t\t\t\t\t<File Id='qwindows' Name='qwindows.dll' DiskId='1' Source='platforms\\qwindows.dll' KeyPath='yes' />\r\n\t\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t</Directory>\r\n\t\t\t\t\t\t<Directory Id='styles' Name='styles'>\r\n\t\t\t\t\t\t\t<Component Id='QT5Styles' Guid='136c1dfb-d763-4c20-a030-eaa9052b7210'>\r\n\t\t\t\t\t\t\t\t<File Id='qwindowsvistastyle' Name='qwindowsvistastyle.dll' DiskId='1' Source='styles\\qwindowsvistastyle.dll' KeyPath='yes' />\r\n\t\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t</Directory>\r\n\t\t\t\t\t\t<Directory Id='translations' Name='translations'>\r\n\t\t\t\t\t\t\t<Component Id='QT5Translations' Guid='a7d44fc5-0d8c-49b3-b441-41750e69489d'>\r\n\t\t\t\t\t\t\t\t<File Id='qt_ar' Name='qt_ar.qm' DiskId='1' Source='translations\\qt_ar.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_bg' Name='qt_bg.qm' DiskId='1' Source='translations\\qt_bg.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_ca' Name='qt_ca.qm' DiskId='1' Source='translations\\qt_ca.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_cs' Name='qt_cs.qm' DiskId='1' Source='translations\\qt_cs.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_da' Name='qt_da.qm' DiskId='1' Source='translations\\qt_da.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_de' Name='qt_de.qm' DiskId='1' Source='translations\\qt_de.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_en' Name='qt_en.qm' DiskId='1' Source='translations\\qt_en.qm' KeyPath='yes' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_es' Name='qt_es.qm' DiskId='1' Source='translations\\qt_es.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_fi' Name='qt_fi.qm' DiskId='1' Source='translations\\qt_fi.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_fr' Name='qt_fr.qm' DiskId='1' Source='translations\\qt_fr.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_gd' Name='qt_gd.qm' DiskId='1' Source='translations\\qt_gd.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_he' Name='qt_he.qm' DiskId='1' Source='translations\\qt_he.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_hu' Name='qt_hu.qm' DiskId='1' Source='translations\\qt_hu.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_it' Name='qt_it.qm' DiskId='1' Source='translations\\qt_it.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_ja' Name='qt_ja.qm' DiskId='1' Source='translations\\qt_ja.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_ko' Name='qt_ko.qm' DiskId='1' Source='translations\\qt_ko.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_lv' Name='qt_lv.qm' DiskId='1' Source='translations\\qt_lv.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_pl' Name='qt_pl.qm' DiskId='1' Source='translations\\qt_pl.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_ru' Name='qt_ru.qm' DiskId='1' Source='translations\\qt_ru.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_sk' Name='qt_sk.qm' DiskId='1' Source='translations\\qt_sk.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_uk' Name='qt_uk.qm' DiskId='1' Source='translations\\qt_uk.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_zh_TW' Name='qt_zh_TW.qm' DiskId='1' Source='translations\\qt_zh_TW.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t</Directory>\r\n\t\t\t\t\t\t<Component Id='CodeQueryUninstall' Guid='089a8038-775a-11ea-bc55-0242ac130003'>\r\n\t\t\t\t\t\t\t<File Id='uninstallBAT' Name='uninstall.bat' DiskId='1' Source='..\\..\\windows-install\\wincommon\\uninstall.bat' \r\n\t\t\t\t\t\t\t\t\tKeyPath='yes' >\r\n\t\t\t\t\t\t\t\t\t<Shortcut Id=\"startmenuUninstallShortcut\" Directory=\"AppProgramMenuFolder\" Name=\"Uninstall CodeQuery\" Show='minimized'\r\n\t\t\t\t\t\t\t\t\tArguments='[ProductCode]' Advertise=\"yes\" WorkingDirectory='INSTALLDIR' Icon=\"msiexec.ico\" IconIndex=\"0\" />\r\n\t\t\t\t\t\t\t</File>\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t</Directory>\r\n\t\t\t\t</Directory>\r\n\t\t\t</Directory>\r\n\t\t\t<Directory Id=\"ProgramMenuFolder\" Name=\"Programs\">\r\n\t\t\t\t<Directory Id=\"AppProgramMenuFolder\" Name=\"CodeQuery 1.0.1 (64-bit)\" />\r\n\t\t\t</Directory>\r\n\t\t</Directory>\r\n\t\t<DirectoryRef Id=\"AppProgramMenuFolder\">\r\n\t\t\t<Component Id=\"AppProgramMenuFolder\" Guid=\"5a6c2529-ab92-4324-b48e-9a14c43f09ef\">\r\n\t\t\t\t<RemoveFolder Id='AppProgramMenuFolder' On='uninstall' />\r\n\t\t\t\t<RegistryValue Root='HKCU' Key='Software\\[Manufacturer]\\[ProductName]' Type='string' Value='' KeyPath='yes' />\r\n\t\t\t</Component>\r\n\t\t</DirectoryRef>\r\n\t\t<Feature Id='Complete' Title='CodeQuery 1.0.1 (Qt5, 64-bit)' Description='The complete package.' Level='1' ConfigurableDirectory='INSTALLDIR' InstallDefault='local' Absent='disallow'>\r\n\t\t\t<ComponentRef Id='CodeQueryGUI_64bit' />\r\n\t\t\t<ComponentRef Id='cqmakedb_64bit' />\r\n\t\t\t<ComponentRef Id='cqsearch_64bit' />\r\n\t\t\t<ComponentRef Id='cscope_64bit' />\r\n\t\t\t<ComponentRef Id='ctags_64bit' />\r\n\t\t\t<ComponentRef Id='docHOWTO' />\r\n\t\t\t<ComponentRef Id='docLICENSE' />\r\n\t\t\t<ComponentRef Id='docREADME' />\r\n\t\t\t<ComponentRef Id='sqlite3_64bit' />\r\n\t\t\t<ComponentRef Id='BaseDLLsWin64' />\r\n\t\t\t<ComponentRef Id='GraphicsDLL64' />\r\n\t\t\t<ComponentRef Id='QT5MainDLL' />\r\n\t\t\t<ComponentRef Id='QT5IconEngines' />\r\n\t\t\t<ComponentRef Id='QT5ImageFormats' />\r\n\t\t\t<ComponentRef Id='QT5Platforms' />\r\n\t\t\t<ComponentRef Id='QT5Styles' />\r\n\t\t\t<ComponentRef Id='QT5Translations' />\r\n\t\t\t<ComponentRef Id='CodeQueryUninstall' />\r\n\t\t\t<ComponentRef Id='AppProgramMenuFolder' />\r\n\t\t</Feature>\r\n    </Product>\r\n</Wix>\r\n"
  },
  {
    "path": "windows-install/qt5/packqt5_github.bat",
    "content": "set PATH=%PATH%;\"%WIX%\\bin\"\r\ncd buildqt5\r\nmd output\r\ncopy *.exe output\r\ncopy \"c:\\vcpkg\\installed\\x64-windows\\bin\\sqlite3.dll\" output\r\ncopy \"C:\\mingw64\\bin\\libgcc_s_seh-1.dll\" output\r\ncopy \"C:\\mingw64\\bin\\libstdc++-6.dll\" output\r\ncopy \"C:\\mingw64\\bin\\libwinpthread-1.dll\" output\r\ncd output\r\nrem windeployqt --release --verbose 0 --list relative codequery.exe\r\nwindeployqt codequery.exe\r\ndir /b/a/s\r\ncandle.exe -ext WixUIExtension -ext WixUtilExtension \"..\\..\\windows-install\\qt5\\codequeryqt5.wxs\"\r\nlight.exe -ext WixUIExtension -ext WixUtilExtension codequeryqt5.wixobj\r\ndir /a/s *.msi\r\n\r\n"
  },
  {
    "path": "windows-install/qt5/testqt5_github.bat",
    "content": "copy \"c:\\vcpkg\\installed\\x64-windows\\bin\\sqlite3.dll\" buildqt5\r\ncopy \"C:\\mingw64\\bin\\libgcc_s_seh-1.dll\" buildqt5\r\ncopy \"C:\\mingw64\\bin\\libstdc++-6.dll\" buildqt5\r\ncopy \"C:\\mingw64\\bin\\libwinpthread-1.dll\" buildqt5\r\n\"buildqt5\\cqmakedb.exe\" -v\r\ndir /b/a/s *.h   > cscope.files\r\ndir /b/a/s *.c   >> cscope.files\r\ndir /b/a/s *.cpp >> cscope.files\r\ndir /b/a/s *.cxx >> cscope.files\r\n\"windows-install\\wincommon\\cscope.exe\" -cb\r\n\"windows-install\\wincommon\\ctags.exe\" --fields=+i -n -L cscope.files\r\n\"buildqt5\\cqmakedb.exe\" -s cq.db -c cscope.out -t tags -p -d\r\n\"buildqt5\\cqsearch.exe\" -s cq.db -p 1 -t CODEQUERY_SW_VERSION -u\r\n\"windows-install\\wincommon\\cscope.exe\" -b -f cscope1.out\r\n\"buildqt5\\cqmakedb.exe\" -s cq1.db -c cscope1.out -t tags -p -d\r\n\"buildqt5\\cqsearch.exe\" -s cq1.db -p 1 -t CODEQUERY_SW_VERSION -u\r\n"
  },
  {
    "path": "windows-install/qt6/buildqt6.bat",
    "content": "cd c:\\workspace\\codequery\r\ncmake -G \"Ninja\" -DSQLITE_INCLUDE_DIR=\"%MinGW64_DIR%\\x86_64-w64-mingw32\\include\" -DSQLITE_LIBRARY_RELEASE=\"%MinGW64_DIR%\\bin\\sqlite3.dll\" -S . -B buildqt6\r\ncmake --build buildqt6\r\ncd buildqt6\r\nmd output\r\ncopy *.exe output\r\ncopy \"%MinGW64_DIR%\\bin\\sqlite3.dll\" output\r\ncd output\r\nwindeployqt --release codequery.exe\r\ndir/b/a/s\r\ncandle.exe -ext WixUIExtension -ext WixUtilExtension \"c:\\workspace\\codequery\\windows-install\\qt6\\codequeryqt690.wxs\"\r\nlight.exe -ext WixUIExtension -ext WixUtilExtension codequeryqt690.wixobj\r\n"
  },
  {
    "path": "windows-install/qt6/buildqt6_github.bat",
    "content": "aqt list-qt windows desktop\r\naqt list-qt windows desktop --arch 6.9.0\r\naqt list-qt windows desktop --modules 6.9.0 win64_mingw\r\nset PATH=%Qt6_DIR%/bin;%PATH%\r\ncmake --version\r\ngcc -v\r\ng++ -v\r\ncmake -G Ninja -DGHAWIN=ON -DVCPKG_TARGET_TRIPLET=x64-windows -DCMAKE_TOOLCHAIN_FILE=\"c:\\vcpkg\\scripts\\buildsystems\\vcpkg.cmake\" -S . -B buildqt6\r\ncmake --build buildqt6\r\n"
  },
  {
    "path": "windows-install/qt6/codequeryqt661.wxs",
    "content": "<?xml version='1.0' encoding='windows-1252'?>\r\n<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>\r\n    <Product Name='CodeQuery 1.0.1 (Qt6, 64-bit)' Manufacturer='ruben2020_foss'\r\n        Id='*' \r\n        UpgradeCode='2368ce2d-f635-4c8c-9b92-6fa348b292af'\r\n        Language='1033' Codepage='1252' Version='1.0.1'>\r\n\t\t<Package Id='*' Keywords='Installer' Description=\"CodeQuery 1.0.1 (Qt6, 64-bit) Installer\"\r\n\t\t\tComments='Copyright 2013-2024 (C) ruben2020' Manufacturer='ruben2020_foss'\r\n\t\t\tInstallerVersion='200' Languages='1033' Compressed='yes' SummaryCodepage='1252'\r\n\t\t\tPlatform=\"x64\" />\r\n\t\t<Condition Message=\"You need to be an administrator to install this product.\">\r\n\t\t\tPrivileged\r\n\t\t</Condition>\r\n\t\t<Condition Message='This application only runs on 64-bit Windows.'>\r\n\t\t\tVersionNT64\r\n\t\t</Condition>\r\n\t\t<Property Id=\"WIXUI_INSTALLDIR\" Value=\"INSTALLDIR\" />\r\n\t\t<WixVariable Id=\"WixUILicenseRtf\" Value=\"..\\..\\windows-install\\wincommon\\LICENSE.rtf\" />\r\n\t\t<WixVariable Id=\"WixUIBannerBmp\" Value=\"..\\..\\doc\\banner.bmp\" />\r\n\t\t<WixVariable Id=\"WixUIDialogBmp\" Value=\"..\\..\\doc\\dialog.bmp\" />\r\n\t\t<Property Id=\"WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT\" Value=\"Launch 'How to use CodeQuery'\" />\r\n\t\t<Property Id='NOTEPAD'>Notepad.exe</Property>\r\n\t\t<CustomAction Id='LaunchFile' Property='NOTEPAD' ExeCommand='[#HOWTO]' Return='asyncNoWait' />\r\n\t\t<Icon Id=\"codequery.ico\" SourceFile=\"..\\..\\gui\\images\\codequery.ico\" />\r\n\t\t<Icon Id=\"msiexec.ico\" SourceFile=\"C:\\Windows\\System32\\msiexec.exe\" />\r\n\t\t<Property Id=\"ARPPRODUCTICON\" Value=\"codequery.ico\" />\r\n\t\t<UI>\r\n\t\t\t<UIRef Id=\"WixUI_InstallDir\" />\r\n\t\t\t<UIRef Id=\"WixUI_ErrorProgressText\" />\r\n\t\t\t<Publish Dialog=\"ExitDialog\"\r\n\t\t\t\tControl=\"Finish\" \r\n\t\t\t\tEvent=\"DoAction\" \r\n\t\t\t\tValue=\"LaunchFile\">WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed</Publish>\r\n\t\t</UI>\r\n\t\t<Media Id='1' Cabinet='CodeQuery64.cab' EmbedCab='yes' DiskPrompt='CD-ROM #1' />\r\n\t\t<Property Id='DiskPrompt' Value=\"CodeQuery Installation [1]\" />\r\n\t\t<Directory Id='TARGETDIR' Name='SourceDir'>\r\n\t\t\t<Directory Id='ProgramFilesFolder' Name='PFiles'>\r\n\t\t\t\t<Directory Id='CodeQuery' Name='CodeQuery'>\r\n\t\t\t\t\t<Directory Id='INSTALLDIR' Name='CodeQuery 1.0.1 64bit'>\r\n\t\t\t\t\t\t<Component Id='CodeQueryGUI_64bit' Guid='dbac3c37-625f-46ac-9050-b470361351e7'>\r\n\t\t\t\t\t\t\t<File Id='codequeryEXE' Name='codequery.exe' DiskId='1' Source='codequery.exe' KeyPath='yes'>\r\n\t\t\t\t\t\t\t\t<Shortcut Id=\"startmenuCodeQueryShortcut\" Directory=\"AppProgramMenuFolder\" Name=\"CodeQuery\"\r\n\t\t\t\t\t\t\t\t\tAdvertise=\"yes\" WorkingDirectory='INSTALLDIR' Icon=\"codequery.ico\" IconIndex=\"0\" />\r\n\t\t\t\t\t\t\t</File>\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Component Id='cqmakedb_64bit' Guid='cd4795c7-e324-42df-852e-fca4e8d06f6e'>\r\n\t\t\t\t\t\t\t<File Id='cqmakedbEXE' Name='cqmakedb.exe' DiskId='1' Source='cqmakedb.exe' KeyPath='yes' />\r\n\t\t\t\t\t\t\t<Environment Id=\"PATH\" Name=\"PATH\" Value=\"[INSTALLDIR]\" Permanent=\"no\" Part=\"last\" Action=\"set\" System=\"no\" />\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Component Id='cqsearch_64bit' Guid='3186d51d-896d-4b4a-b6a4-135b13478b89'>\r\n\t\t\t\t\t\t\t<File Id='cqsearchEXE' Name='cqsearch.exe' DiskId='1' Source='cqsearch.exe' KeyPath='yes' />\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Component Id='cscope_64bit' Guid='b4691d05-05b0-439c-a710-e76a6f2c5663'>\r\n\t\t\t\t\t\t\t<File Id='cscopeEXE' Name='cscope.exe' DiskId='1' Source='..\\..\\windows-install\\wincommon\\cscope.exe' KeyPath='yes' />\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Component Id='ctags_64bit' Guid='eae5bea8-5e4b-4f22-9fc3-87f600ea9290'>\r\n\t\t\t\t\t\t\t<File Id='ctagsEXE' Name='ctags.exe' DiskId='1' Source='..\\..\\windows-install\\wincommon\\ctags.exe' KeyPath='yes' />\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Component Id='docHOWTO' Guid='7ec4912d-8651-4508-a1dc-cbed5fdea69e'>\r\n\t\t\t\t\t\t\t<File Id='HOWTO' Name='HOWTO-WINDOWS.txt' DiskId='1' Source='..\\..\\windows-install\\wincommon\\HOWTO-WINDOWS.txt' KeyPath='yes'>\r\n\t\t\t\t\t\t\t\t<Shortcut Id=\"startmenuHOWTOShortcut\" Directory=\"AppProgramMenuFolder\" Name=\"How to use CodeQuery\"\r\n\t\t\t\t\t\t\t\t\tAdvertise=\"yes\" WorkingDirectory='INSTALLDIR' />\r\n\t\t\t\t\t\t\t</File>\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Component Id='docLICENSE' Guid='92846404-91b4-4218-85a0-7243c83ee6e0'>\r\n\t\t\t\t\t\t\t<File Id='LICENSE' Name='LICENSE.txt' DiskId='1' Source='..\\..\\windows-install\\wincommon\\LICENSE.txt' KeyPath='yes'>\r\n\t\t\t\t\t\t\t\t<Shortcut Id=\"startmenuLicenseShortcut\" Directory=\"AppProgramMenuFolder\" Name=\"LICENSE\"\r\n\t\t\t\t\t\t\t\t\tAdvertise=\"yes\" WorkingDirectory='INSTALLDIR' />\r\n\t\t\t\t\t\t\t</File>\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Component Id='docREADME' Guid='9128116e-9015-45be-bf3c-1a43c162c2d3'>\r\n\t\t\t\t\t\t\t<File Id='README' Name='README.txt' DiskId='1' Source='..\\..\\windows-install\\wincommon\\README.txt' KeyPath='yes'>\r\n\t\t\t\t\t\t\t\t<Shortcut Id=\"startmenuREADMEShortcut\" Directory=\"AppProgramMenuFolder\" Name=\"README\"\r\n\t\t\t\t\t\t\t\t\tAdvertise=\"yes\" WorkingDirectory='INSTALLDIR' />\r\n\t\t\t\t\t\t\t</File>\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Component Id='sqlite3_64bit' Guid='30d870ff-0a4e-4dcf-b02e-af1cc1ba40d9'>\r\n\t\t\t\t\t\t\t<File Id='sqlite3DLL' Name='sqlite3.dll' DiskId='1' Source='sqlite3.dll' KeyPath='yes' />\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Component Id='BaseDLLsWin64' Guid='8ec9395d-83f5-43ef-b9d9-1c5e20fa309e'>\r\n\t\t\t\t\t\t\t<File Id='GCCDLL' Name='libgcc_s_seh-1.dll' DiskId='1' Source='libgcc_s_seh-1.dll' KeyPath='yes' />\r\n\t\t\t\t\t\t\t<File Id='STDCPPDLL' Name='libstdc++-6.dll' DiskId='1' Source='libstdc++-6.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t<File Id='WinPThreadDLL' Name='libwinpthread-1.dll' DiskId='1' Source='libwinpthread-1.dll' KeyPath='no' />\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Component Id='GraphicsDLL64' Guid='9d6c5d83-9fc1-49b6-b3a0-e2b40fc97fcc'>\r\n\t\t\t\t\t\t\t<File Id='Direct3D' Name='D3Dcompiler_47.dll' DiskId='1' Source='D3Dcompiler_47.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t<File Id='OpenGL' Name='opengl32sw.dll' DiskId='1' Source='opengl32sw.dll' KeyPath='yes' />\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Component Id='QT6MainDLL' Guid='ba3688a5-ce0d-4d4e-8c24-3d7d3597f2b0'>\r\n\t\t\t\t\t\t\t<File Id='Qt6Concurrent' Name='Qt6Concurrent.dll' DiskId='1' Source='Qt6Concurrent.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t<File Id='Qt6Core' Name='Qt6Core.dll' DiskId='1' Source='Qt6Core.dll' KeyPath='yes' />\r\n\t\t\t\t\t\t\t<File Id='Qt6Gui' Name='Qt6Gui.dll' DiskId='1' Source='Qt6Gui.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t<File Id='Qt6Svg' Name='Qt6Svg.dll' DiskId='1' Source='Qt6Svg.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t<File Id='Qt6Widgets' Name='Qt6Widgets.dll' DiskId='1' Source='Qt6Widgets.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t<File Id='Qt6Xml' Name='Qt6Xml.dll' DiskId='1' Source='Qt6Xml.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t<File Id='Qt6Core5Compat' Name='Qt6Core5Compat.dll' DiskId='1' Source='Qt6Core5Compat.dll' KeyPath='no' />\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Directory Id='iconengines' Name='iconengines'>\r\n\t\t\t\t\t\t\t<Component Id='QT6IconEngines' Guid='e9d0d52b-4b9f-4fa4-88eb-169208a4e4ea'>\r\n\t\t\t\t\t\t\t\t<File Id='qsvgicon' Name='qsvgicon.dll' DiskId='1' Source='iconengines\\qsvgicon.dll' KeyPath='yes' />\r\n\t\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t</Directory>\r\n\t\t\t\t\t\t<Directory Id='imageformats' Name='imageformats'>\r\n\t\t\t\t\t\t\t<Component Id='QT6ImageFormats' Guid='79dc182e-cca3-4662-a6bd-c509469b39f2'>\r\n\t\t\t\t\t\t\t\t<File Id='qgif' Name='qgif.dll' DiskId='1' Source='imageformats\\qgif.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qico' Name='qico.dll' DiskId='1' Source='imageformats\\qico.dll' KeyPath='yes' />\r\n\t\t\t\t\t\t\t\t<File Id='qjpeg' Name='qjpeg.dll' DiskId='1' Source='imageformats\\qjpeg.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qsvg' Name='qsvg.dll' DiskId='1' Source='imageformats\\qsvg.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t</Directory>\r\n\t\t\t\t\t\t<Directory Id='platforms' Name='platforms'>\r\n\t\t\t\t\t\t\t<Component Id='QT6Platforms' Guid='ddf5da25-f17e-4244-8a02-d14b383f7d8d'>\r\n\t\t\t\t\t\t\t\t<File Id='qwindows' Name='qwindows.dll' DiskId='1' Source='platforms\\qwindows.dll' KeyPath='yes' />\r\n\t\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t</Directory>\r\n\t\t\t\t\t\t<Directory Id='styles' Name='styles'>\r\n\t\t\t\t\t\t\t<Component Id='QT6Styles' Guid='247d54df-7f3c-40f7-a1f7-2cc3f70e7db1'>\r\n\t\t\t\t\t\t\t\t<File Id='qwindowsvistastyle' Name='qwindowsvistastyle.dll' DiskId='1' Source='styles\\qwindowsvistastyle.dll' KeyPath='yes' />\r\n\t\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t</Directory>\r\n\t\t\t\t\t\t<Directory Id='generic' Name='generic'>\r\n\t\t\t\t\t\t\t<Component Id='QT6Generic' Guid='ee67889c-1428-46c1-b3b1-13ce4374522c'>\r\n\t\t\t\t\t\t\t\t<File Id='qtuiotouchplugin' Name='qtuiotouchplugin.dll' DiskId='1' Source='generic\\qtuiotouchplugin.dll' KeyPath='yes' />\r\n\t\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t</Directory>\r\n\t\t\t\t\t\t<Directory Id='networkinformation' Name='networkinformation'>\r\n\t\t\t\t\t\t\t<Component Id='QT6NetworkInformation' Guid='24eecbd4-7d77-4ca9-a2a4-723f1e859976'>\r\n\t\t\t\t\t\t\t\t<File Id='qnetworklistmanager' Name='qnetworklistmanager.dll' DiskId='1' Source='networkinformation\\qnetworklistmanager.dll' KeyPath='yes' />\r\n\t\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t</Directory>\r\n\t\t\t\t\t\t<Directory Id='tls' Name='tls'>\r\n\t\t\t\t\t\t\t<Component Id='QT6TLS' Guid='47410719-3419-4c30-a947-99650eebc95e'>\r\n\t\t\t\t\t\t\t\t<File Id='qcertonlybackend' Name='qcertonlybackend.dll' DiskId='1' Source='tls\\qcertonlybackend.dll' KeyPath='yes' />\r\n\t\t\t\t\t\t\t\t<File Id='qopensslbackend' Name='qopensslbackend.dll' DiskId='1' Source='tls\\qopensslbackend.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qschannelbackend' Name='qschannelbackend.dll' DiskId='1' Source='tls\\qschannelbackend.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t</Directory>\r\n\t\t\t\t\t\t<Directory Id='translations' Name='translations'>\r\n\t\t\t\t\t\t\t<Component Id='QT6Translations' Guid='5830199b-4009-4d9b-a788-306e19a498a8'>\r\n\t\t\t\t\t\t\t\t<File Id='qt_ar' Name='qt_ar.qm' DiskId='1' Source='translations\\qt_ar.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_bg' Name='qt_bg.qm' DiskId='1' Source='translations\\qt_bg.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_ca' Name='qt_ca.qm' DiskId='1' Source='translations\\qt_ca.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_cs' Name='qt_cs.qm' DiskId='1' Source='translations\\qt_cs.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_da' Name='qt_da.qm' DiskId='1' Source='translations\\qt_da.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_de' Name='qt_de.qm' DiskId='1' Source='translations\\qt_de.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_en' Name='qt_en.qm' DiskId='1' Source='translations\\qt_en.qm' KeyPath='yes' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_es' Name='qt_es.qm' DiskId='1' Source='translations\\qt_es.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_fi' Name='qt_fi.qm' DiskId='1' Source='translations\\qt_fi.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_fr' Name='qt_fr.qm' DiskId='1' Source='translations\\qt_fr.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_gd' Name='qt_gd.qm' DiskId='1' Source='translations\\qt_gd.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_he' Name='qt_he.qm' DiskId='1' Source='translations\\qt_he.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_hu' Name='qt_hu.qm' DiskId='1' Source='translations\\qt_hu.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_it' Name='qt_it.qm' DiskId='1' Source='translations\\qt_it.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_ja' Name='qt_ja.qm' DiskId='1' Source='translations\\qt_ja.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_ko' Name='qt_ko.qm' DiskId='1' Source='translations\\qt_ko.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_lv' Name='qt_lv.qm' DiskId='1' Source='translations\\qt_lv.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_pl' Name='qt_pl.qm' DiskId='1' Source='translations\\qt_pl.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_ru' Name='qt_ru.qm' DiskId='1' Source='translations\\qt_ru.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_sk' Name='qt_sk.qm' DiskId='1' Source='translations\\qt_sk.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_uk' Name='qt_uk.qm' DiskId='1' Source='translations\\qt_uk.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_zh_TW' Name='qt_zh_TW.qm' DiskId='1' Source='translations\\qt_zh_TW.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t</Directory>\r\n\t\t\t\t\t\t<Component Id='CodeQueryUninstall' Guid='72881870-977f-40c7-991d-00dc5c04540e'>\r\n\t\t\t\t\t\t\t<File Id='uninstallBAT' Name='uninstall.bat' DiskId='1' Source='..\\..\\windows-install\\wincommon\\uninstall.bat' \r\n\t\t\t\t\t\t\t\t\tKeyPath='yes' >\r\n\t\t\t\t\t\t\t\t\t<Shortcut Id=\"startmenuUninstallShortcut\" Directory=\"AppProgramMenuFolder\" Name=\"Uninstall CodeQuery\" Show='minimized'\r\n\t\t\t\t\t\t\t\t\tArguments='[ProductCode]' Advertise=\"yes\" WorkingDirectory='INSTALLDIR' Icon=\"msiexec.ico\" IconIndex=\"0\" />\r\n\t\t\t\t\t\t\t</File>\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t</Directory>\r\n\t\t\t\t</Directory>\r\n\t\t\t</Directory>\r\n\t\t\t<Directory Id=\"ProgramMenuFolder\" Name=\"Programs\">\r\n\t\t\t\t<Directory Id=\"AppProgramMenuFolder\" Name=\"CodeQuery 1.0.1 (64-bit)\" />\r\n\t\t\t</Directory>\r\n\t\t</Directory>\r\n\t\t<DirectoryRef Id=\"AppProgramMenuFolder\">\r\n\t\t\t<Component Id=\"AppProgramMenuFolder\" Guid=\"54927fbd-15b3-4599-998d-e3acad24120a\">\r\n\t\t\t\t<RemoveFolder Id='AppProgramMenuFolder' On='uninstall' />\r\n\t\t\t\t<RegistryValue Root='HKCU' Key='Software\\[Manufacturer]\\[ProductName]' Type='string' Value='' KeyPath='yes' />\r\n\t\t\t</Component>\r\n\t\t</DirectoryRef>\r\n\t\t<Feature Id='Complete' Title='CodeQuery 1.0.1 (Qt6, 64-bit)' Description='The complete package.' Level='1' ConfigurableDirectory='INSTALLDIR' InstallDefault='local' Absent='disallow'>\r\n\t\t\t<ComponentRef Id='CodeQueryGUI_64bit' />\r\n\t\t\t<ComponentRef Id='cqmakedb_64bit' />\r\n\t\t\t<ComponentRef Id='cqsearch_64bit' />\r\n\t\t\t<ComponentRef Id='cscope_64bit' />\r\n\t\t\t<ComponentRef Id='ctags_64bit' />\r\n\t\t\t<ComponentRef Id='docHOWTO' />\r\n\t\t\t<ComponentRef Id='docLICENSE' />\r\n\t\t\t<ComponentRef Id='docREADME' />\r\n\t\t\t<ComponentRef Id='sqlite3_64bit' />\r\n\t\t\t<ComponentRef Id='BaseDLLsWin64' />\r\n\t\t\t<ComponentRef Id='GraphicsDLL64' />\r\n\t\t\t<ComponentRef Id='QT6MainDLL' />\r\n\t\t\t<ComponentRef Id='QT6IconEngines' />\r\n\t\t\t<ComponentRef Id='QT6ImageFormats' />\r\n\t\t\t<ComponentRef Id='QT6Platforms' />\r\n\t\t\t<ComponentRef Id='QT6Styles' />\r\n\t\t\t<ComponentRef Id='QT6Generic' />\r\n\t\t\t<ComponentRef Id='QT6NetworkInformation' />\r\n\t\t\t<ComponentRef Id='QT6TLS' />\r\n\t\t\t<ComponentRef Id='QT6Translations' />\r\n\t\t\t<ComponentRef Id='CodeQueryUninstall' />\r\n\t\t\t<ComponentRef Id='AppProgramMenuFolder' />\r\n\t\t</Feature>\r\n    </Product>\r\n</Wix>\r\n"
  },
  {
    "path": "windows-install/qt6/codequeryqt671.wxs",
    "content": "<?xml version='1.0' encoding='windows-1252'?>\r\n<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>\r\n    <Product Name='CodeQuery 1.0.1 (Qt6, 64-bit)' Manufacturer='ruben2020_foss'\r\n        Id='*' \r\n        UpgradeCode='2368ce2d-f635-4c8c-9b92-6fa348b292af'\r\n        Language='1033' Codepage='1252' Version='1.0.1'>\r\n\t\t<Package Id='*' Keywords='Installer' Description=\"CodeQuery 1.0.1 (Qt6, 64-bit) Installer\"\r\n\t\t\tComments='Copyright 2013-2024 (C) ruben2020' Manufacturer='ruben2020_foss'\r\n\t\t\tInstallerVersion='200' Languages='1033' Compressed='yes' SummaryCodepage='1252'\r\n\t\t\tPlatform=\"x64\" />\r\n\t\t<Condition Message=\"You need to be an administrator to install this product.\">\r\n\t\t\tPrivileged\r\n\t\t</Condition>\r\n\t\t<Condition Message='This application only runs on 64-bit Windows.'>\r\n\t\t\tVersionNT64\r\n\t\t</Condition>\r\n\t\t<Property Id=\"WIXUI_INSTALLDIR\" Value=\"INSTALLDIR\" />\r\n\t\t<WixVariable Id=\"WixUILicenseRtf\" Value=\"..\\..\\windows-install\\wincommon\\LICENSE.rtf\" />\r\n\t\t<WixVariable Id=\"WixUIBannerBmp\" Value=\"..\\..\\doc\\banner.bmp\" />\r\n\t\t<WixVariable Id=\"WixUIDialogBmp\" Value=\"..\\..\\doc\\dialog.bmp\" />\r\n\t\t<Property Id=\"WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT\" Value=\"Launch 'How to use CodeQuery'\" />\r\n\t\t<Property Id='NOTEPAD'>Notepad.exe</Property>\r\n\t\t<CustomAction Id='LaunchFile' Property='NOTEPAD' ExeCommand='[#HOWTO]' Return='asyncNoWait' />\r\n\t\t<Icon Id=\"codequery.ico\" SourceFile=\"..\\..\\gui\\images\\codequery.ico\" />\r\n\t\t<Icon Id=\"msiexec.ico\" SourceFile=\"C:\\Windows\\System32\\msiexec.exe\" />\r\n\t\t<Property Id=\"ARPPRODUCTICON\" Value=\"codequery.ico\" />\r\n\t\t<UI>\r\n\t\t\t<UIRef Id=\"WixUI_InstallDir\" />\r\n\t\t\t<UIRef Id=\"WixUI_ErrorProgressText\" />\r\n\t\t\t<Publish Dialog=\"ExitDialog\"\r\n\t\t\t\tControl=\"Finish\" \r\n\t\t\t\tEvent=\"DoAction\" \r\n\t\t\t\tValue=\"LaunchFile\">WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed</Publish>\r\n\t\t</UI>\r\n\t\t<Media Id='1' Cabinet='CodeQuery64.cab' EmbedCab='yes' DiskPrompt='CD-ROM #1' />\r\n\t\t<Property Id='DiskPrompt' Value=\"CodeQuery Installation [1]\" />\r\n\t\t<Directory Id='TARGETDIR' Name='SourceDir'>\r\n\t\t\t<Directory Id='ProgramFilesFolder' Name='PFiles'>\r\n\t\t\t\t<Directory Id='CodeQuery' Name='CodeQuery'>\r\n\t\t\t\t\t<Directory Id='INSTALLDIR' Name='CodeQuery 1.0.1 64bit'>\r\n\t\t\t\t\t\t<Component Id='CodeQueryGUI_64bit' Guid='dbac3c37-625f-46ac-9050-b470361351e7'>\r\n\t\t\t\t\t\t\t<File Id='codequeryEXE' Name='codequery.exe' DiskId='1' Source='codequery.exe' KeyPath='yes'>\r\n\t\t\t\t\t\t\t\t<Shortcut Id=\"startmenuCodeQueryShortcut\" Directory=\"AppProgramMenuFolder\" Name=\"CodeQuery\"\r\n\t\t\t\t\t\t\t\t\tAdvertise=\"yes\" WorkingDirectory='INSTALLDIR' Icon=\"codequery.ico\" IconIndex=\"0\" />\r\n\t\t\t\t\t\t\t</File>\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Component Id='cqmakedb_64bit' Guid='cd4795c7-e324-42df-852e-fca4e8d06f6e'>\r\n\t\t\t\t\t\t\t<File Id='cqmakedbEXE' Name='cqmakedb.exe' DiskId='1' Source='cqmakedb.exe' KeyPath='yes' />\r\n\t\t\t\t\t\t\t<Environment Id=\"PATH\" Name=\"PATH\" Value=\"[INSTALLDIR]\" Permanent=\"no\" Part=\"last\" Action=\"set\" System=\"no\" />\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Component Id='cqsearch_64bit' Guid='3186d51d-896d-4b4a-b6a4-135b13478b89'>\r\n\t\t\t\t\t\t\t<File Id='cqsearchEXE' Name='cqsearch.exe' DiskId='1' Source='cqsearch.exe' KeyPath='yes' />\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Component Id='cscope_64bit' Guid='b4691d05-05b0-439c-a710-e76a6f2c5663'>\r\n\t\t\t\t\t\t\t<File Id='cscopeEXE' Name='cscope.exe' DiskId='1' Source='..\\..\\windows-install\\wincommon\\cscope.exe' KeyPath='yes' />\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Component Id='ctags_64bit' Guid='eae5bea8-5e4b-4f22-9fc3-87f600ea9290'>\r\n\t\t\t\t\t\t\t<File Id='ctagsEXE' Name='ctags.exe' DiskId='1' Source='..\\..\\windows-install\\wincommon\\ctags.exe' KeyPath='yes' />\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Component Id='docHOWTO' Guid='7ec4912d-8651-4508-a1dc-cbed5fdea69e'>\r\n\t\t\t\t\t\t\t<File Id='HOWTO' Name='HOWTO-WINDOWS.txt' DiskId='1' Source='..\\..\\windows-install\\wincommon\\HOWTO-WINDOWS.txt' KeyPath='yes'>\r\n\t\t\t\t\t\t\t\t<Shortcut Id=\"startmenuHOWTOShortcut\" Directory=\"AppProgramMenuFolder\" Name=\"How to use CodeQuery\"\r\n\t\t\t\t\t\t\t\t\tAdvertise=\"yes\" WorkingDirectory='INSTALLDIR' />\r\n\t\t\t\t\t\t\t</File>\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Component Id='docLICENSE' Guid='92846404-91b4-4218-85a0-7243c83ee6e0'>\r\n\t\t\t\t\t\t\t<File Id='LICENSE' Name='LICENSE.txt' DiskId='1' Source='..\\..\\windows-install\\wincommon\\LICENSE.txt' KeyPath='yes'>\r\n\t\t\t\t\t\t\t\t<Shortcut Id=\"startmenuLicenseShortcut\" Directory=\"AppProgramMenuFolder\" Name=\"LICENSE\"\r\n\t\t\t\t\t\t\t\t\tAdvertise=\"yes\" WorkingDirectory='INSTALLDIR' />\r\n\t\t\t\t\t\t\t</File>\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Component Id='docREADME' Guid='9128116e-9015-45be-bf3c-1a43c162c2d3'>\r\n\t\t\t\t\t\t\t<File Id='README' Name='README.txt' DiskId='1' Source='..\\..\\windows-install\\wincommon\\README.txt' KeyPath='yes'>\r\n\t\t\t\t\t\t\t\t<Shortcut Id=\"startmenuREADMEShortcut\" Directory=\"AppProgramMenuFolder\" Name=\"README\"\r\n\t\t\t\t\t\t\t\t\tAdvertise=\"yes\" WorkingDirectory='INSTALLDIR' />\r\n\t\t\t\t\t\t\t</File>\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Component Id='sqlite3_64bit' Guid='30d870ff-0a4e-4dcf-b02e-af1cc1ba40d9'>\r\n\t\t\t\t\t\t\t<File Id='sqlite3DLL' Name='sqlite3.dll' DiskId='1' Source='sqlite3.dll' KeyPath='yes' />\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Component Id='BaseDLLsWin64' Guid='8ec9395d-83f5-43ef-b9d9-1c5e20fa309e'>\r\n\t\t\t\t\t\t\t<File Id='GCCDLL' Name='libgcc_s_seh-1.dll' DiskId='1' Source='libgcc_s_seh-1.dll' KeyPath='yes' />\r\n\t\t\t\t\t\t\t<File Id='STDCPPDLL' Name='libstdc++-6.dll' DiskId='1' Source='libstdc++-6.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t<File Id='WinPThreadDLL' Name='libwinpthread-1.dll' DiskId='1' Source='libwinpthread-1.dll' KeyPath='no' />\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Component Id='GraphicsDLL64' Guid='9d6c5d83-9fc1-49b6-b3a0-e2b40fc97fcc'>\r\n\t\t\t\t\t\t\t<File Id='Direct3D' Name='D3Dcompiler_47.dll' DiskId='1' Source='D3Dcompiler_47.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t<File Id='OpenGL' Name='opengl32sw.dll' DiskId='1' Source='opengl32sw.dll' KeyPath='yes' />\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Component Id='QT6MainDLL' Guid='ba3688a5-ce0d-4d4e-8c24-3d7d3597f2b0'>\r\n\t\t\t\t\t\t\t<File Id='Qt6Concurrent' Name='Qt6Concurrent.dll' DiskId='1' Source='Qt6Concurrent.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t<File Id='Qt6Core' Name='Qt6Core.dll' DiskId='1' Source='Qt6Core.dll' KeyPath='yes' />\r\n\t\t\t\t\t\t\t<File Id='Qt6Gui' Name='Qt6Gui.dll' DiskId='1' Source='Qt6Gui.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t<File Id='Qt6Svg' Name='Qt6Svg.dll' DiskId='1' Source='Qt6Svg.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t<File Id='Qt6Widgets' Name='Qt6Widgets.dll' DiskId='1' Source='Qt6Widgets.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t<File Id='Qt6Xml' Name='Qt6Xml.dll' DiskId='1' Source='Qt6Xml.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t<File Id='Qt6Core5Compat' Name='Qt6Core5Compat.dll' DiskId='1' Source='Qt6Core5Compat.dll' KeyPath='no' />\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Directory Id='iconengines' Name='iconengines'>\r\n\t\t\t\t\t\t\t<Component Id='QT6IconEngines' Guid='e9d0d52b-4b9f-4fa4-88eb-169208a4e4ea'>\r\n\t\t\t\t\t\t\t\t<File Id='qsvgicon' Name='qsvgicon.dll' DiskId='1' Source='iconengines\\qsvgicon.dll' KeyPath='yes' />\r\n\t\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t</Directory>\r\n\t\t\t\t\t\t<Directory Id='imageformats' Name='imageformats'>\r\n\t\t\t\t\t\t\t<Component Id='QT6ImageFormats' Guid='79dc182e-cca3-4662-a6bd-c509469b39f2'>\r\n\t\t\t\t\t\t\t\t<File Id='qgif' Name='qgif.dll' DiskId='1' Source='imageformats\\qgif.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qico' Name='qico.dll' DiskId='1' Source='imageformats\\qico.dll' KeyPath='yes' />\r\n\t\t\t\t\t\t\t\t<File Id='qjpeg' Name='qjpeg.dll' DiskId='1' Source='imageformats\\qjpeg.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qsvg' Name='qsvg.dll' DiskId='1' Source='imageformats\\qsvg.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t</Directory>\r\n\t\t\t\t\t\t<Directory Id='platforms' Name='platforms'>\r\n\t\t\t\t\t\t\t<Component Id='QT6Platforms' Guid='ddf5da25-f17e-4244-8a02-d14b383f7d8d'>\r\n\t\t\t\t\t\t\t\t<File Id='qwindows' Name='qwindows.dll' DiskId='1' Source='platforms\\qwindows.dll' KeyPath='yes' />\r\n\t\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t</Directory>\r\n\t\t\t\t\t\t<Directory Id='styles' Name='styles'>\r\n\t\t\t\t\t\t\t<Component Id='QT6Styles' Guid='247d54df-7f3c-40f7-a1f7-2cc3f70e7db1'>\r\n\t\t\t\t\t\t\t\t<File Id='qmodernwindowsstyle' Name='qmodernwindowsstyle.dll' DiskId='1' Source='styles\\qmodernwindowsstyle.dll' KeyPath='yes' />\r\n\t\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t</Directory>\r\n\t\t\t\t\t\t<Directory Id='generic' Name='generic'>\r\n\t\t\t\t\t\t\t<Component Id='QT6Generic' Guid='ee67889c-1428-46c1-b3b1-13ce4374522c'>\r\n\t\t\t\t\t\t\t\t<File Id='qtuiotouchplugin' Name='qtuiotouchplugin.dll' DiskId='1' Source='generic\\qtuiotouchplugin.dll' KeyPath='yes' />\r\n\t\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t</Directory>\r\n\t\t\t\t\t\t<Directory Id='networkinformation' Name='networkinformation'>\r\n\t\t\t\t\t\t\t<Component Id='QT6NetworkInformation' Guid='24eecbd4-7d77-4ca9-a2a4-723f1e859976'>\r\n\t\t\t\t\t\t\t\t<File Id='qnetworklistmanager' Name='qnetworklistmanager.dll' DiskId='1' Source='networkinformation\\qnetworklistmanager.dll' KeyPath='yes' />\r\n\t\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t</Directory>\r\n\t\t\t\t\t\t<Directory Id='tls' Name='tls'>\r\n\t\t\t\t\t\t\t<Component Id='QT6TLS' Guid='47410719-3419-4c30-a947-99650eebc95e'>\r\n\t\t\t\t\t\t\t\t<File Id='qcertonlybackend' Name='qcertonlybackend.dll' DiskId='1' Source='tls\\qcertonlybackend.dll' KeyPath='yes' />\r\n\t\t\t\t\t\t\t\t<File Id='qopensslbackend' Name='qopensslbackend.dll' DiskId='1' Source='tls\\qopensslbackend.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qschannelbackend' Name='qschannelbackend.dll' DiskId='1' Source='tls\\qschannelbackend.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t</Directory>\r\n\t\t\t\t\t\t<Directory Id='translations' Name='translations'>\r\n\t\t\t\t\t\t\t<Component Id='QT6Translations' Guid='5830199b-4009-4d9b-a788-306e19a498a8'>\r\n\t\t\t\t\t\t\t\t<File Id='qt_ar' Name='qt_ar.qm' DiskId='1' Source='translations\\qt_ar.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_bg' Name='qt_bg.qm' DiskId='1' Source='translations\\qt_bg.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_ca' Name='qt_ca.qm' DiskId='1' Source='translations\\qt_ca.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_cs' Name='qt_cs.qm' DiskId='1' Source='translations\\qt_cs.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_da' Name='qt_da.qm' DiskId='1' Source='translations\\qt_da.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_de' Name='qt_de.qm' DiskId='1' Source='translations\\qt_de.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_en' Name='qt_en.qm' DiskId='1' Source='translations\\qt_en.qm' KeyPath='yes' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_es' Name='qt_es.qm' DiskId='1' Source='translations\\qt_es.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_fi' Name='qt_fi.qm' DiskId='1' Source='translations\\qt_fi.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_fr' Name='qt_fr.qm' DiskId='1' Source='translations\\qt_fr.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_gd' Name='qt_gd.qm' DiskId='1' Source='translations\\qt_gd.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_he' Name='qt_he.qm' DiskId='1' Source='translations\\qt_he.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_hu' Name='qt_hu.qm' DiskId='1' Source='translations\\qt_hu.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_it' Name='qt_it.qm' DiskId='1' Source='translations\\qt_it.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_ja' Name='qt_ja.qm' DiskId='1' Source='translations\\qt_ja.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_ko' Name='qt_ko.qm' DiskId='1' Source='translations\\qt_ko.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_lv' Name='qt_lv.qm' DiskId='1' Source='translations\\qt_lv.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_pl' Name='qt_pl.qm' DiskId='1' Source='translations\\qt_pl.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_ru' Name='qt_ru.qm' DiskId='1' Source='translations\\qt_ru.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_sk' Name='qt_sk.qm' DiskId='1' Source='translations\\qt_sk.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_uk' Name='qt_uk.qm' DiskId='1' Source='translations\\qt_uk.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_zh_TW' Name='qt_zh_TW.qm' DiskId='1' Source='translations\\qt_zh_TW.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t</Directory>\r\n\t\t\t\t\t\t<Component Id='CodeQueryUninstall' Guid='72881870-977f-40c7-991d-00dc5c04540e'>\r\n\t\t\t\t\t\t\t<File Id='uninstallBAT' Name='uninstall.bat' DiskId='1' Source='..\\..\\windows-install\\wincommon\\uninstall.bat' \r\n\t\t\t\t\t\t\t\t\tKeyPath='yes' >\r\n\t\t\t\t\t\t\t\t\t<Shortcut Id=\"startmenuUninstallShortcut\" Directory=\"AppProgramMenuFolder\" Name=\"Uninstall CodeQuery\" Show='minimized'\r\n\t\t\t\t\t\t\t\t\tArguments='[ProductCode]' Advertise=\"yes\" WorkingDirectory='INSTALLDIR' Icon=\"msiexec.ico\" IconIndex=\"0\" />\r\n\t\t\t\t\t\t\t</File>\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t</Directory>\r\n\t\t\t\t</Directory>\r\n\t\t\t</Directory>\r\n\t\t\t<Directory Id=\"ProgramMenuFolder\" Name=\"Programs\">\r\n\t\t\t\t<Directory Id=\"AppProgramMenuFolder\" Name=\"CodeQuery 1.0.1 (64-bit)\" />\r\n\t\t\t</Directory>\r\n\t\t</Directory>\r\n\t\t<DirectoryRef Id=\"AppProgramMenuFolder\">\r\n\t\t\t<Component Id=\"AppProgramMenuFolder\" Guid=\"54927fbd-15b3-4599-998d-e3acad24120a\">\r\n\t\t\t\t<RemoveFolder Id='AppProgramMenuFolder' On='uninstall' />\r\n\t\t\t\t<RegistryValue Root='HKCU' Key='Software\\[Manufacturer]\\[ProductName]' Type='string' Value='' KeyPath='yes' />\r\n\t\t\t</Component>\r\n\t\t</DirectoryRef>\r\n\t\t<Feature Id='Complete' Title='CodeQuery 1.0.1 (Qt6, 64-bit)' Description='The complete package.' Level='1' ConfigurableDirectory='INSTALLDIR' InstallDefault='local' Absent='disallow'>\r\n\t\t\t<ComponentRef Id='CodeQueryGUI_64bit' />\r\n\t\t\t<ComponentRef Id='cqmakedb_64bit' />\r\n\t\t\t<ComponentRef Id='cqsearch_64bit' />\r\n\t\t\t<ComponentRef Id='cscope_64bit' />\r\n\t\t\t<ComponentRef Id='ctags_64bit' />\r\n\t\t\t<ComponentRef Id='docHOWTO' />\r\n\t\t\t<ComponentRef Id='docLICENSE' />\r\n\t\t\t<ComponentRef Id='docREADME' />\r\n\t\t\t<ComponentRef Id='sqlite3_64bit' />\r\n\t\t\t<ComponentRef Id='BaseDLLsWin64' />\r\n\t\t\t<ComponentRef Id='GraphicsDLL64' />\r\n\t\t\t<ComponentRef Id='QT6MainDLL' />\r\n\t\t\t<ComponentRef Id='QT6IconEngines' />\r\n\t\t\t<ComponentRef Id='QT6ImageFormats' />\r\n\t\t\t<ComponentRef Id='QT6Platforms' />\r\n\t\t\t<ComponentRef Id='QT6Styles' />\r\n\t\t\t<ComponentRef Id='QT6Generic' />\r\n\t\t\t<ComponentRef Id='QT6NetworkInformation' />\r\n\t\t\t<ComponentRef Id='QT6TLS' />\r\n\t\t\t<ComponentRef Id='QT6Translations' />\r\n\t\t\t<ComponentRef Id='CodeQueryUninstall' />\r\n\t\t\t<ComponentRef Id='AppProgramMenuFolder' />\r\n\t\t</Feature>\r\n    </Product>\r\n</Wix>\r\n"
  },
  {
    "path": "windows-install/qt6/codequeryqt690.wxs",
    "content": "<?xml version='1.0' encoding='windows-1252'?>\r\n<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>\r\n    <Product Name='CodeQuery 1.0.1 (Qt6, 64-bit)' Manufacturer='ruben2020_foss'\r\n        Id='*' \r\n        UpgradeCode='2368ce2d-f635-4c8c-9b92-6fa348b292af'\r\n        Language='1033' Codepage='1252' Version='1.0.1'>\r\n\t\t<Package Id='*' Keywords='Installer' Description=\"CodeQuery 1.0.1 (Qt6, 64-bit) Installer\"\r\n\t\t\tComments='Copyright 2013-2024 (C) ruben2020' Manufacturer='ruben2020_foss'\r\n\t\t\tInstallerVersion='200' Languages='1033' Compressed='yes' SummaryCodepage='1252'\r\n\t\t\tPlatform=\"x64\" />\r\n\t\t<Condition Message=\"You need to be an administrator to install this product.\">\r\n\t\t\tPrivileged\r\n\t\t</Condition>\r\n\t\t<Condition Message='This application only runs on 64-bit Windows.'>\r\n\t\t\tVersionNT64\r\n\t\t</Condition>\r\n\t\t<Property Id=\"WIXUI_INSTALLDIR\" Value=\"INSTALLDIR\" />\r\n\t\t<WixVariable Id=\"WixUILicenseRtf\" Value=\"..\\..\\windows-install\\wincommon\\LICENSE.rtf\" />\r\n\t\t<WixVariable Id=\"WixUIBannerBmp\" Value=\"..\\..\\doc\\banner.bmp\" />\r\n\t\t<WixVariable Id=\"WixUIDialogBmp\" Value=\"..\\..\\doc\\dialog.bmp\" />\r\n\t\t<Property Id=\"WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT\" Value=\"Launch 'How to use CodeQuery'\" />\r\n\t\t<Property Id='NOTEPAD'>Notepad.exe</Property>\r\n\t\t<CustomAction Id='LaunchFile' Property='NOTEPAD' ExeCommand='[#HOWTO]' Return='asyncNoWait' />\r\n\t\t<Icon Id=\"codequery.ico\" SourceFile=\"..\\..\\gui\\images\\codequery.ico\" />\r\n\t\t<Icon Id=\"msiexec.ico\" SourceFile=\"C:\\Windows\\System32\\msiexec.exe\" />\r\n\t\t<Property Id=\"ARPPRODUCTICON\" Value=\"codequery.ico\" />\r\n\t\t<UI>\r\n\t\t\t<UIRef Id=\"WixUI_InstallDir\" />\r\n\t\t\t<UIRef Id=\"WixUI_ErrorProgressText\" />\r\n\t\t\t<Publish Dialog=\"ExitDialog\"\r\n\t\t\t\tControl=\"Finish\" \r\n\t\t\t\tEvent=\"DoAction\" \r\n\t\t\t\tValue=\"LaunchFile\">WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed</Publish>\r\n\t\t</UI>\r\n\t\t<Media Id='1' Cabinet='CodeQuery64.cab' EmbedCab='yes' DiskPrompt='CD-ROM #1' />\r\n\t\t<Property Id='DiskPrompt' Value=\"CodeQuery Installation [1]\" />\r\n\t\t<Directory Id='TARGETDIR' Name='SourceDir'>\r\n\t\t\t<Directory Id='ProgramFilesFolder' Name='PFiles'>\r\n\t\t\t\t<Directory Id='CodeQuery' Name='CodeQuery'>\r\n\t\t\t\t\t<Directory Id='INSTALLDIR' Name='CodeQuery 1.0.1 64bit'>\r\n\t\t\t\t\t\t<Component Id='CodeQueryGUI_64bit' Guid='dbac3c37-625f-46ac-9050-b470361351e7'>\r\n\t\t\t\t\t\t\t<File Id='codequeryEXE' Name='codequery.exe' DiskId='1' Source='codequery.exe' KeyPath='yes'>\r\n\t\t\t\t\t\t\t\t<Shortcut Id=\"startmenuCodeQueryShortcut\" Directory=\"AppProgramMenuFolder\" Name=\"CodeQuery\"\r\n\t\t\t\t\t\t\t\t\tAdvertise=\"yes\" WorkingDirectory='INSTALLDIR' Icon=\"codequery.ico\" IconIndex=\"0\" />\r\n\t\t\t\t\t\t\t</File>\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Component Id='cqmakedb_64bit' Guid='cd4795c7-e324-42df-852e-fca4e8d06f6e'>\r\n\t\t\t\t\t\t\t<File Id='cqmakedbEXE' Name='cqmakedb.exe' DiskId='1' Source='cqmakedb.exe' KeyPath='yes' />\r\n\t\t\t\t\t\t\t<Environment Id=\"PATH\" Name=\"PATH\" Value=\"[INSTALLDIR]\" Permanent=\"no\" Part=\"last\" Action=\"set\" System=\"no\" />\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Component Id='cqsearch_64bit' Guid='3186d51d-896d-4b4a-b6a4-135b13478b89'>\r\n\t\t\t\t\t\t\t<File Id='cqsearchEXE' Name='cqsearch.exe' DiskId='1' Source='cqsearch.exe' KeyPath='yes' />\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Component Id='cscope_64bit' Guid='b4691d05-05b0-439c-a710-e76a6f2c5663'>\r\n\t\t\t\t\t\t\t<File Id='cscopeEXE' Name='cscope.exe' DiskId='1' Source='..\\..\\windows-install\\wincommon\\cscope.exe' KeyPath='yes' />\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Component Id='ctags_64bit' Guid='eae5bea8-5e4b-4f22-9fc3-87f600ea9290'>\r\n\t\t\t\t\t\t\t<File Id='ctagsEXE' Name='ctags.exe' DiskId='1' Source='..\\..\\windows-install\\wincommon\\ctags.exe' KeyPath='yes' />\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Component Id='docHOWTO' Guid='7ec4912d-8651-4508-a1dc-cbed5fdea69e'>\r\n\t\t\t\t\t\t\t<File Id='HOWTO' Name='HOWTO-WINDOWS.txt' DiskId='1' Source='..\\..\\windows-install\\wincommon\\HOWTO-WINDOWS.txt' KeyPath='yes'>\r\n\t\t\t\t\t\t\t\t<Shortcut Id=\"startmenuHOWTOShortcut\" Directory=\"AppProgramMenuFolder\" Name=\"How to use CodeQuery\"\r\n\t\t\t\t\t\t\t\t\tAdvertise=\"yes\" WorkingDirectory='INSTALLDIR' />\r\n\t\t\t\t\t\t\t</File>\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Component Id='docLICENSE' Guid='92846404-91b4-4218-85a0-7243c83ee6e0'>\r\n\t\t\t\t\t\t\t<File Id='LICENSE' Name='LICENSE.txt' DiskId='1' Source='..\\..\\windows-install\\wincommon\\LICENSE.txt' KeyPath='yes'>\r\n\t\t\t\t\t\t\t\t<Shortcut Id=\"startmenuLicenseShortcut\" Directory=\"AppProgramMenuFolder\" Name=\"LICENSE\"\r\n\t\t\t\t\t\t\t\t\tAdvertise=\"yes\" WorkingDirectory='INSTALLDIR' />\r\n\t\t\t\t\t\t\t</File>\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Component Id='docREADME' Guid='9128116e-9015-45be-bf3c-1a43c162c2d3'>\r\n\t\t\t\t\t\t\t<File Id='README' Name='README.txt' DiskId='1' Source='..\\..\\windows-install\\wincommon\\README.txt' KeyPath='yes'>\r\n\t\t\t\t\t\t\t\t<Shortcut Id=\"startmenuREADMEShortcut\" Directory=\"AppProgramMenuFolder\" Name=\"README\"\r\n\t\t\t\t\t\t\t\t\tAdvertise=\"yes\" WorkingDirectory='INSTALLDIR' />\r\n\t\t\t\t\t\t\t</File>\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Component Id='sqlite3_64bit' Guid='30d870ff-0a4e-4dcf-b02e-af1cc1ba40d9'>\r\n\t\t\t\t\t\t\t<File Id='sqlite3DLL' Name='sqlite3.dll' DiskId='1' Source='sqlite3.dll' KeyPath='yes' />\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Component Id='BaseDLLsWin64' Guid='8ec9395d-83f5-43ef-b9d9-1c5e20fa309e'>\r\n\t\t\t\t\t\t\t<File Id='GCCDLL' Name='libgcc_s_seh-1.dll' DiskId='1' Source='libgcc_s_seh-1.dll' KeyPath='yes' />\r\n\t\t\t\t\t\t\t<File Id='STDCPPDLL' Name='libstdc++-6.dll' DiskId='1' Source='libstdc++-6.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t<File Id='WinPThreadDLL' Name='libwinpthread-1.dll' DiskId='1' Source='libwinpthread-1.dll' KeyPath='no' />\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Component Id='GraphicsDLL64' Guid='9d6c5d83-9fc1-49b6-b3a0-e2b40fc97fcc'>\r\n\t\t\t\t\t\t\t<File Id='Direct3D' Name='D3Dcompiler_47.dll' DiskId='1' Source='D3Dcompiler_47.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t<File Id='OpenGL' Name='opengl32sw.dll' DiskId='1' Source='opengl32sw.dll' KeyPath='yes' />\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Component Id='QT6MainDLL' Guid='ba3688a5-ce0d-4d4e-8c24-3d7d3597f2b0'>\r\n\t\t\t\t\t\t\t<File Id='Qt6Concurrent' Name='Qt6Concurrent.dll' DiskId='1' Source='Qt6Concurrent.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t<File Id='Qt6Core' Name='Qt6Core.dll' DiskId='1' Source='Qt6Core.dll' KeyPath='yes' />\r\n\t\t\t\t\t\t\t<File Id='Qt6Gui' Name='Qt6Gui.dll' DiskId='1' Source='Qt6Gui.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t<File Id='Qt6Svg' Name='Qt6Svg.dll' DiskId='1' Source='Qt6Svg.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t<File Id='Qt6Widgets' Name='Qt6Widgets.dll' DiskId='1' Source='Qt6Widgets.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t<File Id='Qt6Xml' Name='Qt6Xml.dll' DiskId='1' Source='Qt6Xml.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t<File Id='Qt6Core5Compat' Name='Qt6Core5Compat.dll' DiskId='1' Source='Qt6Core5Compat.dll' KeyPath='no' />\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t<Directory Id='iconengines' Name='iconengines'>\r\n\t\t\t\t\t\t\t<Component Id='QT6IconEngines' Guid='e9d0d52b-4b9f-4fa4-88eb-169208a4e4ea'>\r\n\t\t\t\t\t\t\t\t<File Id='qsvgicon' Name='qsvgicon.dll' DiskId='1' Source='iconengines\\qsvgicon.dll' KeyPath='yes' />\r\n\t\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t</Directory>\r\n\t\t\t\t\t\t<Directory Id='imageformats' Name='imageformats'>\r\n\t\t\t\t\t\t\t<Component Id='QT6ImageFormats' Guid='79dc182e-cca3-4662-a6bd-c509469b39f2'>\r\n\t\t\t\t\t\t\t\t<File Id='qgif' Name='qgif.dll' DiskId='1' Source='imageformats\\qgif.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qico' Name='qico.dll' DiskId='1' Source='imageformats\\qico.dll' KeyPath='yes' />\r\n\t\t\t\t\t\t\t\t<File Id='qjpeg' Name='qjpeg.dll' DiskId='1' Source='imageformats\\qjpeg.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qsvg' Name='qsvg.dll' DiskId='1' Source='imageformats\\qsvg.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t</Directory>\r\n\t\t\t\t\t\t<Directory Id='platforms' Name='platforms'>\r\n\t\t\t\t\t\t\t<Component Id='QT6Platforms' Guid='ddf5da25-f17e-4244-8a02-d14b383f7d8d'>\r\n\t\t\t\t\t\t\t\t<File Id='qwindows' Name='qwindows.dll' DiskId='1' Source='platforms\\qwindows.dll' KeyPath='yes' />\r\n\t\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t</Directory>\r\n\t\t\t\t\t\t<Directory Id='styles' Name='styles'>\r\n\t\t\t\t\t\t\t<Component Id='QT6Styles' Guid='247d54df-7f3c-40f7-a1f7-2cc3f70e7db1'>\r\n\t\t\t\t\t\t\t\t<File Id='qmodernwindowsstyle' Name='qmodernwindowsstyle.dll' DiskId='1' Source='styles\\qmodernwindowsstyle.dll' KeyPath='yes' />\r\n\t\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t</Directory>\r\n\t\t\t\t\t\t<Directory Id='generic' Name='generic'>\r\n\t\t\t\t\t\t\t<Component Id='QT6Generic' Guid='ee67889c-1428-46c1-b3b1-13ce4374522c'>\r\n\t\t\t\t\t\t\t\t<File Id='qtuiotouchplugin' Name='qtuiotouchplugin.dll' DiskId='1' Source='generic\\qtuiotouchplugin.dll' KeyPath='yes' />\r\n\t\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t</Directory>\r\n\t\t\t\t\t\t<Directory Id='networkinformation' Name='networkinformation'>\r\n\t\t\t\t\t\t\t<Component Id='QT6NetworkInformation' Guid='24eecbd4-7d77-4ca9-a2a4-723f1e859976'>\r\n\t\t\t\t\t\t\t\t<File Id='qnetworklistmanager' Name='qnetworklistmanager.dll' DiskId='1' Source='networkinformation\\qnetworklistmanager.dll' KeyPath='yes' />\r\n\t\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t</Directory>\r\n\t\t\t\t\t\t<Directory Id='tls' Name='tls'>\r\n\t\t\t\t\t\t\t<Component Id='QT6TLS' Guid='47410719-3419-4c30-a947-99650eebc95e'>\r\n\t\t\t\t\t\t\t\t<File Id='qcertonlybackend' Name='qcertonlybackend.dll' DiskId='1' Source='tls\\qcertonlybackend.dll' KeyPath='yes' />\r\n\t\t\t\t\t\t\t\t<!--<File Id='qopensslbackend' Name='qopensslbackend.dll' DiskId='1' Source='tls\\qopensslbackend.dll' KeyPath='no' />-->\r\n\t\t\t\t\t\t\t\t<File Id='qschannelbackend' Name='qschannelbackend.dll' DiskId='1' Source='tls\\qschannelbackend.dll' KeyPath='no' />\r\n\t\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t</Directory>\r\n\t\t\t\t\t\t<Directory Id='translations' Name='translations'>\r\n\t\t\t\t\t\t\t<Component Id='QT6Translations' Guid='5830199b-4009-4d9b-a788-306e19a498a8'>\r\n\t\t\t\t\t\t\t\t<File Id='qt_ar' Name='qt_ar.qm' DiskId='1' Source='translations\\qt_ar.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_bg' Name='qt_bg.qm' DiskId='1' Source='translations\\qt_bg.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_ca' Name='qt_ca.qm' DiskId='1' Source='translations\\qt_ca.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_cs' Name='qt_cs.qm' DiskId='1' Source='translations\\qt_cs.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_da' Name='qt_da.qm' DiskId='1' Source='translations\\qt_da.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_de' Name='qt_de.qm' DiskId='1' Source='translations\\qt_de.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_en' Name='qt_en.qm' DiskId='1' Source='translations\\qt_en.qm' KeyPath='yes' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_es' Name='qt_es.qm' DiskId='1' Source='translations\\qt_es.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_fi' Name='qt_fi.qm' DiskId='1' Source='translations\\qt_fi.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_fr' Name='qt_fr.qm' DiskId='1' Source='translations\\qt_fr.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_gd' Name='qt_gd.qm' DiskId='1' Source='translations\\qt_gd.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_he' Name='qt_he.qm' DiskId='1' Source='translations\\qt_he.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_hu' Name='qt_hu.qm' DiskId='1' Source='translations\\qt_hu.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_it' Name='qt_it.qm' DiskId='1' Source='translations\\qt_it.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_ja' Name='qt_ja.qm' DiskId='1' Source='translations\\qt_ja.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_ko' Name='qt_ko.qm' DiskId='1' Source='translations\\qt_ko.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_lv' Name='qt_lv.qm' DiskId='1' Source='translations\\qt_lv.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_pl' Name='qt_pl.qm' DiskId='1' Source='translations\\qt_pl.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_ru' Name='qt_ru.qm' DiskId='1' Source='translations\\qt_ru.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_sk' Name='qt_sk.qm' DiskId='1' Source='translations\\qt_sk.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_uk' Name='qt_uk.qm' DiskId='1' Source='translations\\qt_uk.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t\t<File Id='qt_zh_TW' Name='qt_zh_TW.qm' DiskId='1' Source='translations\\qt_zh_TW.qm' KeyPath='no' />\r\n\t\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t\t</Directory>\r\n\t\t\t\t\t\t<Component Id='CodeQueryUninstall' Guid='72881870-977f-40c7-991d-00dc5c04540e'>\r\n\t\t\t\t\t\t\t<File Id='uninstallBAT' Name='uninstall.bat' DiskId='1' Source='..\\..\\windows-install\\wincommon\\uninstall.bat' \r\n\t\t\t\t\t\t\t\t\tKeyPath='yes' >\r\n\t\t\t\t\t\t\t\t\t<Shortcut Id=\"startmenuUninstallShortcut\" Directory=\"AppProgramMenuFolder\" Name=\"Uninstall CodeQuery\" Show='minimized'\r\n\t\t\t\t\t\t\t\t\tArguments='[ProductCode]' Advertise=\"yes\" WorkingDirectory='INSTALLDIR' Icon=\"msiexec.ico\" IconIndex=\"0\" />\r\n\t\t\t\t\t\t\t</File>\r\n\t\t\t\t\t\t</Component>\r\n\t\t\t\t\t</Directory>\r\n\t\t\t\t</Directory>\r\n\t\t\t</Directory>\r\n\t\t\t<Directory Id=\"ProgramMenuFolder\" Name=\"Programs\">\r\n\t\t\t\t<Directory Id=\"AppProgramMenuFolder\" Name=\"CodeQuery 1.0.1 (64-bit)\" />\r\n\t\t\t</Directory>\r\n\t\t</Directory>\r\n\t\t<DirectoryRef Id=\"AppProgramMenuFolder\">\r\n\t\t\t<Component Id=\"AppProgramMenuFolder\" Guid=\"54927fbd-15b3-4599-998d-e3acad24120a\">\r\n\t\t\t\t<RemoveFolder Id='AppProgramMenuFolder' On='uninstall' />\r\n\t\t\t\t<RegistryValue Root='HKCU' Key='Software\\[Manufacturer]\\[ProductName]' Type='string' Value='' KeyPath='yes' />\r\n\t\t\t</Component>\r\n\t\t</DirectoryRef>\r\n\t\t<Feature Id='Complete' Title='CodeQuery 1.0.1 (Qt6, 64-bit)' Description='The complete package.' Level='1' ConfigurableDirectory='INSTALLDIR' InstallDefault='local' Absent='disallow'>\r\n\t\t\t<ComponentRef Id='CodeQueryGUI_64bit' />\r\n\t\t\t<ComponentRef Id='cqmakedb_64bit' />\r\n\t\t\t<ComponentRef Id='cqsearch_64bit' />\r\n\t\t\t<ComponentRef Id='cscope_64bit' />\r\n\t\t\t<ComponentRef Id='ctags_64bit' />\r\n\t\t\t<ComponentRef Id='docHOWTO' />\r\n\t\t\t<ComponentRef Id='docLICENSE' />\r\n\t\t\t<ComponentRef Id='docREADME' />\r\n\t\t\t<ComponentRef Id='sqlite3_64bit' />\r\n\t\t\t<ComponentRef Id='BaseDLLsWin64' />\r\n\t\t\t<ComponentRef Id='GraphicsDLL64' />\r\n\t\t\t<ComponentRef Id='QT6MainDLL' />\r\n\t\t\t<ComponentRef Id='QT6IconEngines' />\r\n\t\t\t<ComponentRef Id='QT6ImageFormats' />\r\n\t\t\t<ComponentRef Id='QT6Platforms' />\r\n\t\t\t<ComponentRef Id='QT6Styles' />\r\n\t\t\t<ComponentRef Id='QT6Generic' />\r\n\t\t\t<ComponentRef Id='QT6NetworkInformation' />\r\n\t\t\t<ComponentRef Id='QT6TLS' />\r\n\t\t\t<ComponentRef Id='QT6Translations' />\r\n\t\t\t<ComponentRef Id='CodeQueryUninstall' />\r\n\t\t\t<ComponentRef Id='AppProgramMenuFolder' />\r\n\t\t</Feature>\r\n    </Product>\r\n</Wix>\r\n"
  },
  {
    "path": "windows-install/qt6/packqt6_github.bat",
    "content": "set PATH=%PATH%;\"%WIX%\\bin\"\r\ncd buildqt6\r\nmd output\r\ncopy *.exe output\r\ncopy \"c:\\vcpkg\\installed\\x64-windows\\bin\\sqlite3.dll\" output\r\ncopy \"C:\\mingw64\\bin\\libgcc_s_seh-1.dll\" output\r\ncopy \"C:\\mingw64\\bin\\libstdc++-6.dll\" output\r\ncopy \"C:\\mingw64\\bin\\libwinpthread-1.dll\" output\r\ncd output\r\nrem windeployqt --release --verbose 0 --list relative codequery.exe\r\nwindeployqt codequery.exe\r\ndir /b/a/s\r\ncandle.exe -ext WixUIExtension -ext WixUtilExtension \"..\\..\\windows-install\\qt6\\codequeryqt690.wxs\"\r\nlight.exe -ext WixUIExtension -ext WixUtilExtension codequeryqt690.wixobj\r\ndir /a/s *.msi\r\n\r\n"
  },
  {
    "path": "windows-install/qt6/testqt6_github.bat",
    "content": "copy \"c:\\vcpkg\\installed\\x64-windows\\bin\\sqlite3.dll\" buildqt6\r\ncopy \"C:\\mingw64\\bin\\libgcc_s_seh-1.dll\" buildqt6\r\ncopy \"C:\\mingw64\\bin\\libstdc++-6.dll\" buildqt6\r\ncopy \"C:\\mingw64\\bin\\libwinpthread-1.dll\" buildqt6\r\n\"buildqt6\\cqmakedb.exe\" -v\r\ndir /b/a/s *.h   > cscope.files\r\ndir /b/a/s *.c   >> cscope.files\r\ndir /b/a/s *.cpp >> cscope.files\r\ndir /b/a/s *.cxx >> cscope.files\r\n\"windows-install\\wincommon\\cscope.exe\" -cb\r\n\"windows-install\\wincommon\\ctags.exe\" --fields=+i -n -L cscope.files\r\n\"buildqt6\\cqmakedb.exe\" -s cq.db -c cscope.out -t tags -p -d\r\n\"buildqt6\\cqsearch.exe\" -s cq.db -p 1 -t CODEQUERY_SW_VERSION -u\r\n\"windows-install\\wincommon\\cscope.exe\" -b -f cscope1.out\r\n\"buildqt6\\cqmakedb.exe\" -s cq1.db -c cscope1.out -t tags -p -d\r\n\"buildqt6\\cqsearch.exe\" -s cq1.db -p 1 -t CODEQUERY_SW_VERSION -u\r\n"
  },
  {
    "path": "windows-install/wincommon/HOWTO-WINDOWS.txt",
    "content": "\r\nThis HOWTO guide applies to Windows only\r\n\r\n\r\nHOW TO USE CODEQUERY WITH C/C++ CODE?\r\n\r\n\r\n1. Change directory to the base folder of your source code like this:\r\n\r\ncd c:\\projects\\myproject\\src\r\n\r\n\r\n2. Create a cscope.files file with all the C/C++ source files listed\r\n   in it. Files with inline assembly code should be excluded from\r\n   this list. See: http://en.wikipedia.org/wiki/Inline_assembler\r\n\r\ndir /b/a/s *.c    > cscope.files   \r\ndir /b/a/s *.cpp >> cscope.files   \r\ndir /b/a/s *.cxx >> cscope.files   \r\ndir /b/a/s *.cc  >> cscope.files   \r\ndir /b/a/s *.h   >> cscope.files   \r\ndir /b/a/s *.hpp >> cscope.files   \r\ndir /b/a/s *.hxx >> cscope.files   \r\ndir /b/a/s *.hh  >> cscope.files   \r\n\r\n\r\n3. Create a cscope database like this (add k, if you don't want standard include paths like for stdio.h):\r\n\r\ncscope -cb\r\n\r\nOmission of c (to use compressed cscope database) is now supported experimentally.\r\n\r\n4. Create a ctags database like this.\r\n\r\nctags --fields=+i -n -L cscope.files\r\n\r\n\r\n5. Run cqmakedb to create a CodeQuery database out of the\r\n   cscope and ctags databases, like this:\r\n\r\ncqmakedb -s .\\myproject.db -c cscope.out -t tags -p\r\n\r\n\r\n6. Open myproject.db using the CodeQuery GUI tool. Wild card search\r\n   (* and ?) supported if Exact Match is switched off.\r\n   Or use cqsearch, the CLI-version of CodeQuery (type `cqsearch -h`\r\n   for more info).\r\n\r\nUse cqmakedb -h to get help on cqmakedb command line arguments.\r\nUse codequery -h to get help on codequery command line arguments.\r\n\r\n\r\n\r\n\r\nHOW TO USE CODEQUERY WITH JAVA CODE?\r\n\r\n\r\n1. Change directory to the base folder of your source code like this:\r\n\r\ncd c:\\projects\\myproject\\src\r\n\r\n\r\n2. Create a cscope.files file with all the Java source\r\n   files listed in it.\r\n\r\ndir /b/a/s *.java > cscope.files \r\n\r\n\r\n3. Create a cscope database like this:\r\n\r\ncscope -cb\r\n\r\nOmission of c (to use compressed cscope database) is now supported experimentally.\r\n\r\n4. Create a ctags database like this:\r\n\r\nctags --fields=+i -n -L cscope.files\r\n\r\n\r\n5. Run cqmakedb to create a CodeQuery database out of the\r\n   cscope and ctags databases, like this:\r\n\r\ncqmakedb -s .\\myproject.db -c cscope.out -t tags -p\r\n\r\n\r\n6. Open myproject.db using the CodeQuery GUI tool. Wild card search\r\n   (* and ?) supported if Exact Match is switched off.\r\n   Or use cqsearch, the CLI-version of CodeQuery (type `cqsearch -h`\r\n   for more info).\r\n\r\nUse cqmakedb -h to get help on cqmakedb command line arguments.\r\nUse codequery -h to get help on codequery command line arguments.\r\n\r\n\r\n\r\nHOW TO USE CODEQUERY WITH PYTHON CODE?\r\n\r\nPlease install pycscope manually by following instructions on its page here:\r\nhttps://github.com/portante/pycscope\r\n\r\n1. Change directory to the base folder of your source code like this:\r\n\r\ncd c:\\projects\\myproject\\src\r\n\r\n\r\n2. Create a cscope.files file with all the Python source\r\n   files listed in it.\r\n\r\ndir /b/a/s *.py    > cscope.files  \r\n\r\n\r\n3. Create a cscope database like this:\r\n\r\npycscope -i cscope.files\r\n\r\n\r\n4. Create a ctags database like this.\r\n\r\nctags --fields=+i -n -L cscope.files\r\n\r\n\r\n5. Run cqmakedb to create a CodeQuery database out of the\r\n   cscope and ctags databases, like this:\r\n\r\ncqmakedb -s .\\myproject.db -c cscope.out -t tags -p\r\n\r\n\r\n6. Open myproject.db using the CodeQuery GUI tool. Wild card search\r\n   (* and ?) supported if Exact Match is switched off.\r\n   Or use cqsearch, the CLI-version of CodeQuery (type `cqsearch -h`\r\n   for more info).\r\n\r\nUse cqmakedb -h to get help on cqmakedb command line arguments.\r\nUse codequery -h to get help on codequery command line arguments.\r\n\r\n\r\n\r\n\r\nHOW TO USE CODEQUERY WITH RUBY, GO AND JAVASCRIPT CODE?\r\n\r\nPlease install starscope manually by following instructions on its page here:\r\nhttps://github.com/eapache/starscope\r\n\r\n1. Change directory to the base folder of your source code like this:\r\n\r\ncd c:\\projects\\myproject\\src\r\n\r\n\r\n2. Create a cscope.files file with all the Ruby, Go or Javascript source\r\n   files listed in it.\r\n\r\ndir /b/a/s *.rb    > cscope.files  \r\ndir /b/a/s *.go    > cscope.files \r\ndir /b/a/s *.js    > cscope.files \r\n\r\n\r\n3. Create a cscope database like this:\r\n\r\nstarscope -e cscope\r\n\r\n\r\n4. Create a ctags database like this.\r\n\r\nctags --fields=+i -n -L cscope.files\r\n\r\n\r\n5. Run cqmakedb to create a CodeQuery database out of the\r\n   cscope and ctags databases, like this:\r\n\r\ncqmakedb -s .\\myproject.db -c cscope.out -t tags -p\r\n\r\n\r\n6. Open myproject.db using the CodeQuery GUI tool. Wild card search\r\n   (* and ?) supported if Exact Match is switched off.\r\n   Or use cqsearch, the CLI-version of CodeQuery (type `cqsearch -h`\r\n   for more info).\r\n\r\nUse cqmakedb -h to get help on cqmakedb command line arguments.\r\nUse codequery -h to get help on codequery command line arguments.\r\n\r\n"
  },
  {
    "path": "windows-install/wincommon/LICENSE.rtf",
    "content": "{\\rtf1\\ansi\\ansicpg1252\\deff0\\nouicompat{\\fonttbl{\\f0\\fnil\\fcharset0 Times New Roman;}{\\f1\\fnil\\fcharset0 Courier New;}}\r\n{\\colortbl ;\\red0\\green0\\blue255;}\r\n{\\*\\generator Riched20 10.0.18362}\\viewkind4\\uc1 \r\n\\pard\\ul\\f0\\fs28\\lang17417 Mozilla Public License Version 2.0\\ulnone\\fs22\\par\r\n\\par\r\n\\ul\\fs24 1. Definitions\\ulnone\\par\r\n\\fs22\\par\r\n1.1. \"Contributor\"\\par\r\nmeans each individual or legal entity that creates, contributes to the creation of, or owns Covered Software.\\par\r\n\\par\r\n1.2. \"Contributor Version\"\\par\r\nmeans the combination of the Contributions of others (if any) used by a Contributor and that particular Contributor's Contribution.\\par\r\n\\par\r\n1.3. \"Contribution\"\\par\r\nmeans Covered Software of a particular Contributor.\\par\r\n\\par\r\n1.4. \"Covered Software\"\\par\r\nmeans Source Code Form to which the initial Contributor has attached the notice in Exhibit A, the Executable Form of such Source Code Form, and Modifications of such Source Code Form, in each case including portions thereof.\\par\r\n\\par\r\n1.5. \"Incompatible With Secondary Licenses\"\\par\r\nmeans\\par\r\n\\par\r\n(a) that the initial Contributor has attached the notice described in Exhibit B to the Covered Software; or\\par\r\n\\par\r\n(b) that the Covered Software was made available under the terms of version 1.1 or earlier of the License, but not also under the terms of a Secondary License.\\par\r\n\\par\r\n1.6. \"Executable Form\"\\par\r\nmeans any form of the work other than Source Code Form.\\par\r\n\\par\r\n1.7. \"Larger Work\"\\par\r\nmeans a work that combines Covered Software with other material, in a separate file or files, that is not Covered Software.\\par\r\n\\par\r\n1.8. \"License\"\\par\r\nmeans this document.\\par\r\n\\par\r\n1.9. \"Licensable\"\\par\r\nmeans having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently, any and all of the rights conveyed by this License.\\par\r\n\\par\r\n1.10. \"Modifications\"\\par\r\nmeans any of the following:\\par\r\n\\par\r\n(a) any file in Source Code Form that results from an addition to, deletion from, or modification of the contents of Covered Software; or\\par\r\n\\par\r\n(b) any new file in Source Code Form that contains any Covered Software.\\par\r\n\\par\r\n1.11. \"Patent Claims\" of a Contributor\\par\r\nmeans any patent claim(s), including without limitation, method, process, and apparatus claims, in any patent Licensable by such Contributor that would be infringed, but for the grant of the License, by the making, using, selling, offering for sale, having made, import, or transfer of either its Contributions or its Contributor Version.\\par\r\n\\par\r\n1.12. \"Secondary License\"\\par\r\nmeans either the GNU General Public License, Version 2.0, the GNU Lesser General Public License, Version 2.1, the GNU Affero General Public License, Version 3.0, or any later versions of those licenses.\\par\r\n\\par\r\n1.13. \"Source Code Form\"\\par\r\nmeans the form of the work preferred for making modifications.\\par\r\n\\par\r\n1.14. \"You\" (or \"Your\")\\par\r\nmeans an individual or a legal entity exercising rights under this License. For legal entities, \"You\" includes any entity that controls, is controlled by, or is under common control with You. For purposes of this definition, \"control\" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity.\\par\r\n\\par\r\n\\ul\\fs24 2. License Grants and Conditions\\fs28\\par\r\n\\ulnone\\fs22\\par\r\n2.1. Grants\\par\r\n\\par\r\nEach Contributor hereby grants You a world-wide, royalty-free,\\par\r\nnon-exclusive license:\\par\r\n\\par\r\n(a) under intellectual property rights (other than patent or trademark) Licensable by such Contributor to use, reproduce, make available, modify, display, perform, distribute, and otherwise exploit its Contributions, either on an unmodified basis, with Modifications, or as part of a Larger Work; and\\par\r\n\\par\r\n(b) under Patent Claims of such Contributor to make, use, sell, offer for sale, have made, import, and otherwise transfer either its Contributions or its Contributor Version.\\par\r\n\\par\r\n2.2. Effective Date\\par\r\n\\par\r\nThe licenses granted in Section 2.1 with respect to any Contribution become effective for each Contribution on the date the Contributor first distributes such Contribution.\\par\r\n\\par\r\n2.3. Limitations on Grant Scope\\par\r\n\\par\r\nThe licenses granted in this Section 2 are the only rights granted under this License. No additional rights or licenses will be implied from the distribution or licensing of Covered Software under this License. Notwithstanding Section 2.1(b) above, no patent license is granted by a Contributor:\\par\r\n\\par\r\n(a) for any code that a Contributor has removed from Covered Software; or\\par\r\n\\par\r\n(b) for infringements caused by: (i) Your and any other third party's modifications of Covered Software, or (ii) the combination of its Contributions with other software (except as part of its Contributor Version); or\\par\r\n\\par\r\n(c) under Patent Claims infringed by Covered Software in the absence of its Contributions.\\par\r\n\\par\r\nThis License does not grant any rights in the trademarks, service marks, or logos of any Contributor (except as may be necessary to comply with the notice requirements in Section 3.4).\\par\r\n\\par\r\n2.4. Subsequent Licenses\\par\r\n\\par\r\nNo Contributor makes additional grants as a result of Your choice to distribute the Covered Software under a subsequent version of this License (see Section 10.2) or under the terms of a Secondary License (if permitted under the terms of Section 3.3).\\par\r\n\\par\r\n2.5. Representation\\par\r\n\\par\r\nEach Contributor represents that the Contributor believes its Contributions are its original creation(s) or it has sufficient rights to grant the rights to its Contributions conveyed by this License.\\par\r\n\\par\r\n2.6. Fair Use\\par\r\n\\par\r\nThis License is not intended to limit any rights You have under applicable copyright doctrines of fair use, fair dealing, or other equivalents.\\par\r\n\\par\r\n2.7. Conditions\\par\r\n\\par\r\nSections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in Section 2.1.\\par\r\n\\par\r\n\\ul\\fs24 3. Responsibilities\\fs28\\par\r\n\\ulnone\\fs22\\par\r\n3.1. Distribution of Source Form\\par\r\n\\par\r\nAll distribution of Covered Software in Source Code Form, including any Modifications that You create or to which You contribute, must be under the terms of this License. You must inform recipients that the Source Code Form of the Covered Software is governed by the terms of this License, and how they can obtain a copy of this License. You may not attempt to alter or restrict the recipients' rights in the Source Code Form.\\par\r\n\\par\r\n3.2. Distribution of Executable Form\\par\r\n\\par\r\nIf You distribute Covered Software in Executable Form then:\\par\r\n\\par\r\n(a) such Covered Software must also be made available in Source Code Form, as described in Section 3.1, and You must inform recipients of the Executable Form how they can obtain a copy of such Source Code Form by reasonable means in a timely manner, at a charge no more than the cost of distribution to the recipient; and\\par\r\n\\par\r\n(b) You may distribute such Executable Form under the terms of this License, or sublicense it under different terms, provided that the license for the Executable Form does not attempt to limit or alter the recipients' rights in the Source Code Form under this License.\\par\r\n\\par\r\n3.3. Distribution of a Larger Work\\par\r\n\\par\r\nYou may create and distribute a Larger Work under terms of Your choice, provided that You also comply with the requirements of this License for the Covered Software. If the Larger Work is a combination of Covered Software with a work governed by one or more Secondary Licenses, and the Covered Software is not Incompatible With Secondary Licenses, this License permits You to additionally distribute such Covered Software under the terms of such Secondary License(s), so that the recipient of the Larger Work may, at their option, further distribute the Covered Software under the terms of either this License or such Secondary License(s).\\par\r\n\\par\r\n3.4. Notices\\par\r\n\\par\r\nYou may not remove or alter the substance of any license notices (including copyright notices, patent notices, disclaimers of warranty, or limitations of liability) contained within the Source Code Form of the Covered Software, except that You may alter any license notices to the extent required to remedy known factual inaccuracies.\\par\r\n\\par\r\n3.5. Application of Additional Terms\\par\r\n\\par\r\nYou may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, You may do so only on Your own behalf, and not on behalf of any Contributor. You must make it absolutely clear that any such warranty, support, indemnity, or liability obligation is offered by You alone, and You hereby agree to indemnify every Contributor for any liability incurred by such Contributor as a result of warranty, support, indemnity or liability terms You offer. You may include additional disclaimers of warranty and limitations of liability specific to any jurisdiction.\\par\r\n\\par\r\n\\ul\\fs24 4. Inability to Comply Due to Statute or Regulation\\fs28\\par\r\n\\ulnone\\fs22\\par\r\nIf it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Software due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be placed in a text file included with all distributions of the Covered Software under this License. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it.\\par\r\n\\par\r\n\\ul\\fs24 5. Termination\\fs28\\par\r\n\\ulnone\\fs22\\par\r\n5.1. The rights granted under this License will terminate automatically if You fail to comply with any of its terms. However, if You become compliant, then the rights granted under this License from a particular Contributor are reinstated (a) provisionally, unless and until such\\par\r\nContributor explicitly and finally terminates Your grants, and (b) on an ongoing basis, if such Contributor fails to notify You of the non-compliance by some reasonable means prior to 60 days after You have come back into compliance. Moreover, Your grants from a particular\\par\r\nContributor are reinstated on an ongoing basis if such Contributor notifies You of the non-compliance by some reasonable means, this is the first time You have received notice of non-compliance with this License from such Contributor, and You become compliant prior to 30 days after Your receipt of the notice.\\par\r\n\\par\r\n5.2. If You initiate litigation against any entity by asserting a patent infringement claim (excluding declaratory judgment actions, counter-claims, and cross-claims) alleging that a Contributor Version\\par\r\ndirectly or indirectly infringes any patent, then the rights granted to You by any and all Contributors for the Covered Software under Section 2.1 of this License shall terminate.\\par\r\n\\par\r\n5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or Your distributors under this License prior to termination shall survive termination.\\par\r\n\\par\r\n\r\n\\pard\\sl240\\slmult1\\ul\\fs24 6. Disclaimer of Warranty\\b\\fs28\\par\r\n\\ulnone\\fs22\\par\r\nCovered Software is provided under this License on an \"as is\" basis, without warranty of any kind, either expressed, implied, or statutory, including, without limitation, warranties that the Covered Software is free of defects, merchantable, fit for a particular purpose or non-infringing. The entire risk as to the quality and performance of the Covered Software is with You. Should any Covered Software prove defective in any respect, You (not any Contributor) assume the cost of any necessary servicing, repair, or correction. This disclaimer of warranty constitutes an essential part of this License. No use of any Covered Software is authorized under this License except under this disclaimer.\\par\r\n\r\n\\pard\\b0\\par\r\n\\par\r\n\\ul\\fs24 7. Limitation of Liability\\b\\fs28\\par\r\n\\ulnone\\fs22\\par\r\nUnder no circumstances and under no legal theory, whether tort (including negligence), contract, or otherwise, shall any Contributor, or anyone who distributes Covered Software as permitted above, be liable to You for any direct, indirect, special, incidental, or consequential damages of any character including, without limitation, damages for lost profits, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses, even if such party shall have been informed of the possibility of such damages. This limitation of liability shall not apply to liability for death or personal injury resulting from such party's negligence to the extent applicable law prohibits such limitation. Some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so this exclusion and limitation may not apply to You.\\par\r\n\\b0\\par\r\n\\ul\\fs24 8. Litigation\\fs28\\par\r\n\\ulnone\\fs22\\par\r\nAny litigation relating to this License may be brought only in the courts of a jurisdiction where the defendant maintains its principal place of business and such litigation shall be governed by laws of that jurisdiction, without reference to its conflict-of-law provisions. Nothing in this Section shall prevent a party's ability to bring cross-claims or counter-claims.\\par\r\n\\par\r\n\\ul\\fs24 9. Miscellaneous\\ulnone\\fs20\\par\r\n\\fs22\\par\r\nThis License represents the complete agreement concerning the subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not be used to construe this License against a Contributor.\\par\r\n\\par\r\n\\ul\\fs24 10. Versions of the License\\ulnone\\fs22\\par\r\n\\par\r\n10.1. New Versions\\par\r\n\\par\r\nMozilla Foundation is the license steward. Except as provided in Section 10.3, no one other than the license steward has the right to modify or publish new versions of this License. Each version will be given a distinguishing version number.\\par\r\n\\par\r\n10.2. Effect of New Versions\\par\r\n\\par\r\nYou may distribute the Covered Software under the terms of the version of the License under which You originally received the Covered Software, or under the terms of any subsequent version published by the license steward.\\par\r\n\\par\r\n10.3. Modified Versions\\par\r\n\\par\r\nIf you create software not governed by this License, and you want to create a new license for such software, you may create and use a modified version of this License if you rename the license and remove any references to the name of the license steward (except to note that\\par\r\nsuch modified license differs from this License).\\par\r\n\\par\r\n10.4. Distributing Source Code Form that is Incompatible With Secondary\\par\r\nLicenses\\par\r\n\\par\r\nIf You choose to distribute Source Code Form that is Incompatible With Secondary Licenses under the terms of this version of the License, the notice described in Exhibit B of this License must be attached.\\par\r\n\\par\r\n\\ul\\fs24 Exhibit A - Source Code Form License Notice\\ulnone\\fs22\\par\r\n\\par\r\n\\f1\\fs18 This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at {{\\field{\\*\\fldinst{HYPERLINK http://mozilla.org/MPL/2.0/ }}{\\fldrslt{http://mozilla.org/MPL/2.0/\\ul0\\cf0}}}}\\f1\\fs18 .\\par\r\n\\f0\\fs22\\par\r\nIf it is not possible or desirable to put the notice in a particular file, then You may include the notice in a location (such as a LICENSE file in a relevant directory) where a recipient would be likely to look for such a notice.\\par\r\n\\par\r\nYou may add additional accurate notices of copyright ownership.\\par\r\n\\par\r\n\\ul\\fs24 Exhibit B - \"Incompatible With Secondary Licenses\" Notice\\ulnone\\fs20\\par\r\n\\fs22\\par\r\n\\f1\\fs18 This Source Code Form is \"Incompatible With Secondary Licenses\", as defined by the Mozilla Public License, v. 2.0.\\par\r\n\\f0\\fs22\\par\r\n}\r\n\u0000"
  },
  {
    "path": "windows-install/wincommon/LICENSE.txt",
    "content": "Mozilla Public License Version 2.0\r\n==================================\r\n\r\n1. Definitions\r\n--------------\r\n\r\n1.1. \"Contributor\"\r\n    means each individual or legal entity that creates, contributes to\r\n    the creation of, or owns Covered Software.\r\n\r\n1.2. \"Contributor Version\"\r\n    means the combination of the Contributions of others (if any) used\r\n    by a Contributor and that particular Contributor's Contribution.\r\n\r\n1.3. \"Contribution\"\r\n    means Covered Software of a particular Contributor.\r\n\r\n1.4. \"Covered Software\"\r\n    means Source Code Form to which the initial Contributor has attached\r\n    the notice in Exhibit A, the Executable Form of such Source Code\r\n    Form, and Modifications of such Source Code Form, in each case\r\n    including portions thereof.\r\n\r\n1.5. \"Incompatible With Secondary Licenses\"\r\n    means\r\n\r\n    (a) that the initial Contributor has attached the notice described\r\n        in Exhibit B to the Covered Software; or\r\n\r\n    (b) that the Covered Software was made available under the terms of\r\n        version 1.1 or earlier of the License, but not also under the\r\n        terms of a Secondary License.\r\n\r\n1.6. \"Executable Form\"\r\n    means any form of the work other than Source Code Form.\r\n\r\n1.7. \"Larger Work\"\r\n    means a work that combines Covered Software with other material, in \r\n    a separate file or files, that is not Covered Software.\r\n\r\n1.8. \"License\"\r\n    means this document.\r\n\r\n1.9. \"Licensable\"\r\n    means having the right to grant, to the maximum extent possible,\r\n    whether at the time of the initial grant or subsequently, any and\r\n    all of the rights conveyed by this License.\r\n\r\n1.10. \"Modifications\"\r\n    means any of the following:\r\n\r\n    (a) any file in Source Code Form that results from an addition to,\r\n        deletion from, or modification of the contents of Covered\r\n        Software; or\r\n\r\n    (b) any new file in Source Code Form that contains any Covered\r\n        Software.\r\n\r\n1.11. \"Patent Claims\" of a Contributor\r\n    means any patent claim(s), including without limitation, method,\r\n    process, and apparatus claims, in any patent Licensable by such\r\n    Contributor that would be infringed, but for the grant of the\r\n    License, by the making, using, selling, offering for sale, having\r\n    made, import, or transfer of either its Contributions or its\r\n    Contributor Version.\r\n\r\n1.12. \"Secondary License\"\r\n    means either the GNU General Public License, Version 2.0, the GNU\r\n    Lesser General Public License, Version 2.1, the GNU Affero General\r\n    Public License, Version 3.0, or any later versions of those\r\n    licenses.\r\n\r\n1.13. \"Source Code Form\"\r\n    means the form of the work preferred for making modifications.\r\n\r\n1.14. \"You\" (or \"Your\")\r\n    means an individual or a legal entity exercising rights under this\r\n    License. For legal entities, \"You\" includes any entity that\r\n    controls, is controlled by, or is under common control with You. For\r\n    purposes of this definition, \"control\" means (a) the power, direct\r\n    or indirect, to cause the direction or management of such entity,\r\n    whether by contract or otherwise, or (b) ownership of more than\r\n    fifty percent (50%) of the outstanding shares or beneficial\r\n    ownership of such entity.\r\n\r\n2. License Grants and Conditions\r\n--------------------------------\r\n\r\n2.1. Grants\r\n\r\nEach Contributor hereby grants You a world-wide, royalty-free,\r\nnon-exclusive license:\r\n\r\n(a) under intellectual property rights (other than patent or trademark)\r\n    Licensable by such Contributor to use, reproduce, make available,\r\n    modify, display, perform, distribute, and otherwise exploit its\r\n    Contributions, either on an unmodified basis, with Modifications, or\r\n    as part of a Larger Work; and\r\n\r\n(b) under Patent Claims of such Contributor to make, use, sell, offer\r\n    for sale, have made, import, and otherwise transfer either its\r\n    Contributions or its Contributor Version.\r\n\r\n2.2. Effective Date\r\n\r\nThe licenses granted in Section 2.1 with respect to any Contribution\r\nbecome effective for each Contribution on the date the Contributor first\r\ndistributes such Contribution.\r\n\r\n2.3. Limitations on Grant Scope\r\n\r\nThe licenses granted in this Section 2 are the only rights granted under\r\nthis License. No additional rights or licenses will be implied from the\r\ndistribution or licensing of Covered Software under this License.\r\nNotwithstanding Section 2.1(b) above, no patent license is granted by a\r\nContributor:\r\n\r\n(a) for any code that a Contributor has removed from Covered Software;\r\n    or\r\n\r\n(b) for infringements caused by: (i) Your and any other third party's\r\n    modifications of Covered Software, or (ii) the combination of its\r\n    Contributions with other software (except as part of its Contributor\r\n    Version); or\r\n\r\n(c) under Patent Claims infringed by Covered Software in the absence of\r\n    its Contributions.\r\n\r\nThis License does not grant any rights in the trademarks, service marks,\r\nor logos of any Contributor (except as may be necessary to comply with\r\nthe notice requirements in Section 3.4).\r\n\r\n2.4. Subsequent Licenses\r\n\r\nNo Contributor makes additional grants as a result of Your choice to\r\ndistribute the Covered Software under a subsequent version of this\r\nLicense (see Section 10.2) or under the terms of a Secondary License (if\r\npermitted under the terms of Section 3.3).\r\n\r\n2.5. Representation\r\n\r\nEach Contributor represents that the Contributor believes its\r\nContributions are its original creation(s) or it has sufficient rights\r\nto grant the rights to its Contributions conveyed by this License.\r\n\r\n2.6. Fair Use\r\n\r\nThis License is not intended to limit any rights You have under\r\napplicable copyright doctrines of fair use, fair dealing, or other\r\nequivalents.\r\n\r\n2.7. Conditions\r\n\r\nSections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted\r\nin Section 2.1.\r\n\r\n3. Responsibilities\r\n-------------------\r\n\r\n3.1. Distribution of Source Form\r\n\r\nAll distribution of Covered Software in Source Code Form, including any\r\nModifications that You create or to which You contribute, must be under\r\nthe terms of this License. You must inform recipients that the Source\r\nCode Form of the Covered Software is governed by the terms of this\r\nLicense, and how they can obtain a copy of this License. You may not\r\nattempt to alter or restrict the recipients' rights in the Source Code\r\nForm.\r\n\r\n3.2. Distribution of Executable Form\r\n\r\nIf You distribute Covered Software in Executable Form then:\r\n\r\n(a) such Covered Software must also be made available in Source Code\r\n    Form, as described in Section 3.1, and You must inform recipients of\r\n    the Executable Form how they can obtain a copy of such Source Code\r\n    Form by reasonable means in a timely manner, at a charge no more\r\n    than the cost of distribution to the recipient; and\r\n\r\n(b) You may distribute such Executable Form under the terms of this\r\n    License, or sublicense it under different terms, provided that the\r\n    license for the Executable Form does not attempt to limit or alter\r\n    the recipients' rights in the Source Code Form under this License.\r\n\r\n3.3. Distribution of a Larger Work\r\n\r\nYou may create and distribute a Larger Work under terms of Your choice,\r\nprovided that You also comply with the requirements of this License for\r\nthe Covered Software. If the Larger Work is a combination of Covered\r\nSoftware with a work governed by one or more Secondary Licenses, and the\r\nCovered Software is not Incompatible With Secondary Licenses, this\r\nLicense permits You to additionally distribute such Covered Software\r\nunder the terms of such Secondary License(s), so that the recipient of\r\nthe Larger Work may, at their option, further distribute the Covered\r\nSoftware under the terms of either this License or such Secondary\r\nLicense(s).\r\n\r\n3.4. Notices\r\n\r\nYou may not remove or alter the substance of any license notices\r\n(including copyright notices, patent notices, disclaimers of warranty,\r\nor limitations of liability) contained within the Source Code Form of\r\nthe Covered Software, except that You may alter any license notices to\r\nthe extent required to remedy known factual inaccuracies.\r\n\r\n3.5. Application of Additional Terms\r\n\r\nYou may choose to offer, and to charge a fee for, warranty, support,\r\nindemnity or liability obligations to one or more recipients of Covered\r\nSoftware. However, You may do so only on Your own behalf, and not on\r\nbehalf of any Contributor. You must make it absolutely clear that any\r\nsuch warranty, support, indemnity, or liability obligation is offered by\r\nYou alone, and You hereby agree to indemnify every Contributor for any\r\nliability incurred by such Contributor as a result of warranty, support,\r\nindemnity or liability terms You offer. You may include additional\r\ndisclaimers of warranty and limitations of liability specific to any\r\njurisdiction.\r\n\r\n4. Inability to Comply Due to Statute or Regulation\r\n---------------------------------------------------\r\n\r\nIf it is impossible for You to comply with any of the terms of this\r\nLicense with respect to some or all of the Covered Software due to\r\nstatute, judicial order, or regulation then You must: (a) comply with\r\nthe terms of this License to the maximum extent possible; and (b)\r\ndescribe the limitations and the code they affect. Such description must\r\nbe placed in a text file included with all distributions of the Covered\r\nSoftware under this License. Except to the extent prohibited by statute\r\nor regulation, such description must be sufficiently detailed for a\r\nrecipient of ordinary skill to be able to understand it.\r\n\r\n5. Termination\r\n--------------\r\n\r\n5.1. The rights granted under this License will terminate automatically\r\nif You fail to comply with any of its terms. However, if You become\r\ncompliant, then the rights granted under this License from a particular\r\nContributor are reinstated (a) provisionally, unless and until such\r\nContributor explicitly and finally terminates Your grants, and (b) on an\r\nongoing basis, if such Contributor fails to notify You of the\r\nnon-compliance by some reasonable means prior to 60 days after You have\r\ncome back into compliance. Moreover, Your grants from a particular\r\nContributor are reinstated on an ongoing basis if such Contributor\r\nnotifies You of the non-compliance by some reasonable means, this is the\r\nfirst time You have received notice of non-compliance with this License\r\nfrom such Contributor, and You become compliant prior to 30 days after\r\nYour receipt of the notice.\r\n\r\n5.2. If You initiate litigation against any entity by asserting a patent\r\ninfringement claim (excluding declaratory judgment actions,\r\ncounter-claims, and cross-claims) alleging that a Contributor Version\r\ndirectly or indirectly infringes any patent, then the rights granted to\r\nYou by any and all Contributors for the Covered Software under Section\r\n2.1 of this License shall terminate.\r\n\r\n5.3. In the event of termination under Sections 5.1 or 5.2 above, all\r\nend user license agreements (excluding distributors and resellers) which\r\nhave been validly granted by You or Your distributors under this License\r\nprior to termination shall survive termination.\r\n\r\n************************************************************************\r\n*                                                                      *\r\n*  6. Disclaimer of Warranty                                           *\r\n*  -------------------------                                           *\r\n*                                                                      *\r\n*  Covered Software is provided under this License on an \"as is\"       *\r\n*  basis, without warranty of any kind, either expressed, implied, or  *\r\n*  statutory, including, without limitation, warranties that the       *\r\n*  Covered Software is free of defects, merchantable, fit for a        *\r\n*  particular purpose or non-infringing. The entire risk as to the     *\r\n*  quality and performance of the Covered Software is with You.        *\r\n*  Should any Covered Software prove defective in any respect, You     *\r\n*  (not any Contributor) assume the cost of any necessary servicing,   *\r\n*  repair, or correction. This disclaimer of warranty constitutes an   *\r\n*  essential part of this License. No use of any Covered Software is   *\r\n*  authorized under this License except under this disclaimer.         *\r\n*                                                                      *\r\n************************************************************************\r\n\r\n************************************************************************\r\n*                                                                      *\r\n*  7. Limitation of Liability                                          *\r\n*  --------------------------                                          *\r\n*                                                                      *\r\n*  Under no circumstances and under no legal theory, whether tort      *\r\n*  (including negligence), contract, or otherwise, shall any           *\r\n*  Contributor, or anyone who distributes Covered Software as          *\r\n*  permitted above, be liable to You for any direct, indirect,         *\r\n*  special, incidental, or consequential damages of any character      *\r\n*  including, without limitation, damages for lost profits, loss of    *\r\n*  goodwill, work stoppage, computer failure or malfunction, or any    *\r\n*  and all other commercial damages or losses, even if such party      *\r\n*  shall have been informed of the possibility of such damages. This   *\r\n*  limitation of liability shall not apply to liability for death or   *\r\n*  personal injury resulting from such party's negligence to the       *\r\n*  extent applicable law prohibits such limitation. Some               *\r\n*  jurisdictions do not allow the exclusion or limitation of           *\r\n*  incidental or consequential damages, so this exclusion and          *\r\n*  limitation may not apply to You.                                    *\r\n*                                                                      *\r\n************************************************************************\r\n\r\n8. Litigation\r\n-------------\r\n\r\nAny litigation relating to this License may be brought only in the\r\ncourts of a jurisdiction where the defendant maintains its principal\r\nplace of business and such litigation shall be governed by laws of that\r\njurisdiction, without reference to its conflict-of-law provisions.\r\nNothing in this Section shall prevent a party's ability to bring\r\ncross-claims or counter-claims.\r\n\r\n9. Miscellaneous\r\n----------------\r\n\r\nThis License represents the complete agreement concerning the subject\r\nmatter hereof. If any provision of this License is held to be\r\nunenforceable, such provision shall be reformed only to the extent\r\nnecessary to make it enforceable. Any law or regulation which provides\r\nthat the language of a contract shall be construed against the drafter\r\nshall not be used to construe this License against a Contributor.\r\n\r\n10. Versions of the License\r\n---------------------------\r\n\r\n10.1. New Versions\r\n\r\nMozilla Foundation is the license steward. Except as provided in Section\r\n10.3, no one other than the license steward has the right to modify or\r\npublish new versions of this License. Each version will be given a\r\ndistinguishing version number.\r\n\r\n10.2. Effect of New Versions\r\n\r\nYou may distribute the Covered Software under the terms of the version\r\nof the License under which You originally received the Covered Software,\r\nor under the terms of any subsequent version published by the license\r\nsteward.\r\n\r\n10.3. Modified Versions\r\n\r\nIf you create software not governed by this License, and you want to\r\ncreate a new license for such software, you may create and use a\r\nmodified version of this License if you rename the license and remove\r\nany references to the name of the license steward (except to note that\r\nsuch modified license differs from this License).\r\n\r\n10.4. Distributing Source Code Form that is Incompatible With Secondary\r\nLicenses\r\n\r\nIf You choose to distribute Source Code Form that is Incompatible With\r\nSecondary Licenses under the terms of this version of the License, the\r\nnotice described in Exhibit B of this License must be attached.\r\n\r\nExhibit A - Source Code Form License Notice\r\n-------------------------------------------\r\n\r\n  This Source Code Form is subject to the terms of the Mozilla Public\r\n  License, v. 2.0. If a copy of the MPL was not distributed with this\r\n  file, You can obtain one at http://mozilla.org/MPL/2.0/.\r\n\r\nIf it is not possible or desirable to put the notice in a particular\r\nfile, then You may include the notice in a location (such as a LICENSE\r\nfile in a relevant directory) where a recipient would be likely to look\r\nfor such a notice.\r\n\r\nYou may add additional accurate notices of copyright ownership.\r\n\r\nExhibit B - \"Incompatible With Secondary Licenses\" Notice\r\n---------------------------------------------------------\r\n\r\n  This Source Code Form is \"Incompatible With Secondary Licenses\", as\r\n  defined by the Mozilla Public License, v. 2.0.\r\n\r\n"
  },
  {
    "path": "windows-install/wincommon/README.txt",
    "content": "![CodeQuery](doc/logotitle.png)\r\n===============================\r\n\r\nThis is a tool to index, then query or search C, C++, Java, Python, Ruby, Go and Javascript source code.\r\n\r\nIt builds upon the databases of [cscope](http://cscope.sourceforge.net/) and [Exuberant ctags](http://ctags.sourceforge.net/). It can also work with [Universal ctags](https://github.com/universal-ctags/ctags/), which is a drop-in replacement for Exuberant ctags.\r\n\r\nThe databases of *cscope* and *ctags* would be processed by the *cqmakedb* tool to generate the CodeQuery database file.\r\n\r\nThe CodeQuery database file can be viewed and queried using the *codequery* GUI tool.\r\n\r\n\r\n## Latest version\r\n\r\nWindows binaries available here for download: [CodeQuery@sourceforge downloads](https://sourceforge.net/projects/codequery/files/)\r\n\r\nOn Debian and Ubuntu Linux, the software can be installed using `apt-get install codequery`.\r\n\r\nTo build on Linux, please read the [INSTALL-LINUX](doc/INSTALL-LINUX.md) file.\r\n\r\nOn Mac, the software can be installed through [Brew](http://brew.sh/) using `brew install codequery`.\r\n\r\nPlease read [NEWS](NEWS.md) to find out more.\r\n\r\n\r\n## How is it different from cscope and ctags? What are the advantages?\r\n\r\nBoth cscope and ctags can do symbol lookup and identify functions, macros, classes and structs.\r\n\r\ncscope is very C-centric, but is fuzzy enough to cover C++ and Java, but not very well for e.g. it doesn't understand destructors and class member instantiations. It can't provide relationships of class inheritance and membership. cscope can do \"functions that call this function\" and \"functions called by this function\". This is a very powerful feature that makes cscope stand out among comparable tools.\r\n\r\nctags does many languages well and understands destructors, member instantiations, and the relationships of class membership and inheritance. From ctags, we can find out \"members and methods of this class\", \"class which owns this member or method\", \"parent of this class\", \"child of this class\" etc. However, it doesn't do \"functions that call this function\" or \"functions called by this function\".\r\n\r\nSo both these tools have their pros and cons, but complement each other.\r\n\r\nCodeQuery is a project that attempts to combine the features available from both cscope and ctags, provide faster database access compared to cscope (because it uses sqlite) and provides a nice GUI tool as well. Due to this faster database access, fast auto-completion of search terms and multiple complex queries to perform visualization is possible.\r\n\r\nIn addition, [pycscope](https://github.com/portante/pycscope) is used to add support for Python, in place of cscope.\r\n\r\nIn addition, [starscope](https://github.com/eapache/starscope) is used to add support for Ruby, Go and Javascript, in place of cscope.\r\n\r\n\r\n## What features does CodeQuery have?\r\n\r\n* Combines the best of both cscope and ctags\r\n* Faster due to the use of sqlite for the CodeQuery database\r\n* Cross-platform GUI tool\r\n* Fast auto-completion of search term\r\n* Case-insensitive, partial keyword search - wildcard search supported * and ?\r\n* Exact match search\r\n* Filter search results by file path\r\n* File viewer with syntax highlighting, for UTF-8 encoded source files\r\n* Ability to open viewed file in an external editor or IDE\r\n* Visualization of function call graph and class inheritance based on search term\r\n* Visualization graphs can be saved to PNG or Graphviz DOT files\r\n\r\n\r\n## What types of query can I make?\r\n\r\n* Symbol\r\n* Function or macro definition\r\n* Class or struct\r\n* Functions calling this function\r\n* Functions called by this function\r\n* Calls of this function or macro\r\n* Class which owns this member or method\r\n* Members and methods of this class\r\n* Parent of this class (inheritance)\r\n* Children of this class (inheritance)\r\n* Files including this file\r\n* Full path for file\r\n* Functions and macros inside this file\r\n* Grep\r\n\r\n\r\n## What does it look like?\r\n\r\n![CodeQuery screenshot](doc/screenshot.png)\r\n\r\n\r\n## How does the visualization look like?\r\n\r\nHere's a function call graph based on the search term of \"updateFilePathLabel\". A -> B means A calls B:    \r\n![Visualization screenshot](doc/screenshot2.png)\r\n\r\n\r\n## Are other editors like vim or emacs or Visual Studio Code supported?\r\n\r\nYes!\r\n\r\nThere is a vim plugin for CodeQuery called [vim-codequery](https://github.com/devjoe/vim-codequery) by [devjoe](https://github.com/devjoe).\r\n\r\nThere is a Visual Studio Code extension for CodeQuery called [codequery4vscode](https://github.com/ruben2020/codequery4vscode) by [ruben2020](https://github.com/ruben2020). The Visual Studio Code Extension Marketplace page for this extension is [ruben2020.codequery4vscode](https://marketplace.visualstudio.com/items?itemName=ruben2020.codequery4vscode).\r\n\r\nWe welcome contributors to develop plugins for other editors too.\r\n\r\n\r\n## What does it cost? How is it licensed?\r\n\r\nIt's freeware and free open source software.\r\n\r\nThis software is licensed under the [Mozilla Public License, version 2.0 (MPL-2.0)](https://www.mozilla.org/en-US/MPL/2.0/). See [LICENSE.md](LICENSE.md) or [LICENSE.txt](windows-install/wincommon/LICENSE.txt). This applies to both the distributed Source Code Form and the distributed Executable Form of the software.\r\n\r\nTo understand the MPL-2.0 license, please read the [MPL-2.0 FAQ by mozilla.org](https://www.mozilla.org/en-US/MPL/2.0/FAQ/).\r\n\r\nFiles under the `querylib` directory are licensed under the [MIT license](http://opensource.org/licenses/MIT). See [QueryLib README](querylib/README.txt). This is a library to query CodeQuery database files. This library is MIT-licensed, so that it may be used to create plugins for editors, IDEs and other software without restrictions. It's only dependency is on sqlite3.\r\n\r\n\r\n## Can I use it in a commercial environment without purchasing, for an unlimited time?\r\n\r\nYes. However, donations are welcomed.\r\n\r\n\r\n## Which platforms are supported?\r\n\r\nIt has been tested on Windows 10 64-bit, Mac OS X, Ubuntu and Arch Linux 64-bit.\r\n\r\nContributions are welcomed to attempt ports to other operating systems.\r\n\r\n\r\n## Is the software available in other languages?\r\n\r\nYes. This applies only to the GUI tool.\r\n\r\nContributions are welcomed to update or provide new translations.\r\n\r\n\r\n## How to install it?\r\n\r\nOn Windows, EXE setup packages will be provided here: [CodeQuery@sourceforge downloads](https://sourceforge.net/projects/codequery/files/). The EXE setup package shall also contain cscope.exe, ctags.exe and the required DLLs. So, everything you need is in one package. However, [pycscope](https://github.com/portante/pycscope) (optional - only for Python) and [starscope](https://github.com/eapache/starscope) (optional - only for Ruby, Go and Javascript) are not bundled together with this setup package and need to be installed separately.\r\n\r\nOn Debian and Ubuntu Linux, the software can be installed using `apt-get install codequery`.\r\n\r\nOn Mac, the software can be installed through [Brew](http://brew.sh/) using `brew install codequery`.\r\n\r\nTo build on Linux and Mac, please read the [INSTALL-LINUX](doc/INSTALL-LINUX.md) file.\r\n\r\nVersion 15.8a of [cscope](http://cscope.sourceforge.net/) or higher, works best with CodeQuery.\r\n\r\n\r\n## How do I use it?\r\n\r\nOn Windows: [HOWTO-WINDOWS](windows-install/wincommon/HOWTO-WINDOWS.txt). This file is included in the EXE setup package.\r\n\r\nOn Linux and Mac: [HOWTO-LINUX](doc/HOWTO-LINUX.md)\r\n\r\nPlease read the HOWTO file provided for each platform. The workflow looks like this:\r\n![CodeQuery workflow](doc/workflow.png)\r\n\r\n\r\n## How do I generate whole-program call graphs or UML class diagrams?\r\n\r\nCodeQuery cannot do this at the moment.\r\n\r\nTo generate whole-program call graphs, please use [GNU cflow](https://www.gnu.org/software/cflow/) or [CodeViz](https://github.com/petersenna/codeviz) for C and C++. For Java, there is [Javashot](http://code.google.com/p/javashot/). \r\n\r\nTo generate whole-program UML class diagrams for various object-oriented languages, please use [tags2uml](https://github.com/ruben2020/tags2uml). \r\n\r\n\r\n## Are there any known limitations?\r\n\r\nFor C and C++, [inline assembly code](http://en.wikipedia.org/wiki/Inline_assembler) is not supported by all the tools. This mainly affects embedded software, OS and driver code.\r\n\r\nPlease exclude files with inline assembly code from the list of files (cscope.files) to be scanned.\r\n\r\n\r\n## How do I contact the authors for support, issues, bug reports, fix patches, feature requests etc.?\r\n\r\nPlease see the email address below, and also the Issues tab in GitHub.\r\n\r\nEmail address:    \r\n![Contact address](doc/emailaddr.png)\r\n\r\nWebsite: [CodeQuery website](https://github.com/ruben2020/codequery)\r\n\r\n\r\n## How can I contribute?\r\n\r\n* Report bugs\r\n* Provide feedback, new ideas, suggestions etc. What would you like to see?\r\n* Tell your friends, recommend it on StackOverflow or social media\r\n* Fix bugs (see Issues tab)\r\n* Update translations (Deutsch, Francais, Japanese etc.)\r\n* Port to other platforms\r\n* Write plugins for emacs, eclipse, Notepad++, NetBeans, Jenkins etc.\r\n* Add support for other languages e.g. Objective-C, Swift\r\n\r\n\r\n## List of Contributors\r\n\r\n[ruben2020](https://github.com/ruben2020)    \r\n[naseer](https://github.com/naseer)    \r\n[bruno-](https://github.com/bruno-)    \r\n[devjoe](https://github.com/devjoe)    \r\n[jonashaag](https://github.com/jonashaag)    \r\n[ilovezfs](https://github.com/ilovezfs)    \r\n[JCount](https://github.com/JCount)    \r\n[brianonn](https://github.com/brianonn)    \r\n[teungri](https://github.com/teungri)    \r\n[stweise](https://github.com/stweise)    \r\n(More welcomed)\r\n\r\n\r\n## Credits\r\n\r\nWe thank the people behind the following projects:    \r\n[cscope](http://cscope.sourceforge.net/) - our database is derived from this   \r\n[Exuberant ctags](http://ctags.sourceforge.net/)- our database is derived from this   \r\n[Universal ctags](https://github.com/universal-ctags/ctags/) - drop-in replacement for Exuberant ctags    \r\n[pycscope](https://github.com/portante/pycscope) - our database (for Python) is derived from this    \r\n[starscope](https://github.com/eapache/starscope) - our database (for Ruby, Go and Javascript) is derived from this    \r\n[sqlite3](http://www.sqlite.org/) - our database is using this format    \r\n[CMake](http://www.cmake.org/) - cross-platform build toolchain for CodeQuery    \r\n[Qt open source](http://qt-project.org/) - GUI toolkit used to build CodeQuery    \r\n[showgraph](http://code.google.com/p/showgraph/) - visualization done using this library    \r\n[scintilla](http://www.scintilla.org/) - our code editing widget    \r\n[vim-codequery](https://github.com/devjoe/vim-codequery) - vim plugin for CodeQuery    \r\n[Axialis](http://www.axialis.com/iconworkshop) - free images for CodeQuery and this website    \r\n[brew](http://brew.sh/) - binaries for Mac here    \r\n\r\n\r\n"
  },
  {
    "path": "windows-install/wincommon/uninstall.bat",
    "content": "@cmd /c msiexec /x %1\r\n"
  }
]